From 82f268f0bbc1f514f984347f41d09d33e805aadc Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Mon, 16 Jun 2025 12:37:12 +0000 Subject: [PATCH 001/457] WIP --- .../storage_control_anywhere_cache_test.rb | 38 ++++++++++++++++ .../storage_control_create_anywhere_cache.rb | 45 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb create mode 100644 google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb diff --git a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb new file mode 100644 index 000000000000..3d9c327d8679 --- /dev/null +++ b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb @@ -0,0 +1,38 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_relative "helper" +require_relative "../storage_control_create_anywhere_cache" +require 'pry' + +describe "Storage Control Anywhere Cache" do + let(:bucket_name) { random_bucket_name } + let(:storage_client) { Google::Cloud::Storage.new } + let(:project_name) { storage_client.project } + + before :all do + create_bucket_helper bucket_name + end + + after do + delete_bucket_helper bucket_name + end + + it "Gets the storage layout" do + # layout_name = "projects/_/buckets/#{bucket_name}/storageLayout" + # binding.pry + + create_anywhere_cache bucket_name: bucket_name, project_name: project_name + end +end diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb new file mode 100644 index 000000000000..17345c75c3a5 --- /dev/null +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -0,0 +1,45 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START storage_control_create_folder] +def create_anywhere_cache bucket_name:, project_name: + # The ID of your GCS bucket + # bucket_name = "your-unique-bucket-name" + + # The name of the folder to be created + # folder_name = "folder-name" + + require "google/cloud/storage/control/v2" + require "pry" + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client + parent = "projects/#{project_name}/locations/global" + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::CreateAnywhereCacheRequest.new( + parent: parent + + ) +binding.pry +# Call the create_anywhere_cache method. +result = client.create_anywhere_cache request +# cache: Google::Cloud::Storage::Control::V2::AnywhereCache.new( +# name: "#{parent}/anywhereCaches/your-cache-id", +# ttl: { seconds: 3600 } # 1 hour TTL +# ), + +end +# [END storage_control_create_folder] + +create_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ From 26cc10f13e19cbd8c67713f20650dd1a7b08c4f6 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 20 Jun 2025 05:10:51 +0000 Subject: [PATCH 002/457] wip --- .../storage_control_anywhere_cache_test.rb | 9 ++-- .../storage_control_create_anywhere_cache.rb | 46 ++++++++++++------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb index 3d9c327d8679..bf6c118a9c74 100644 --- a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb +++ b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb @@ -22,17 +22,16 @@ let(:project_name) { storage_client.project } before :all do - create_bucket_helper bucket_name + @bucket = create_bucket_helper bucket_name end after do delete_bucket_helper bucket_name end - it "Gets the storage layout" do - # layout_name = "projects/_/buckets/#{bucket_name}/storageLayout" - # binding.pry + it "create Anywhere cache" do + binding.pry - create_anywhere_cache bucket_name: bucket_name, project_name: project_name + create_anywhere_cache bucket_name: bucket_name, project_name: project_name, zone: @bucket.location end end diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index 17345c75c3a5..7a5cd3ecc69c 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -12,34 +12,48 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START storage_control_create_folder] -def create_anywhere_cache bucket_name:, project_name: +# [START storage_control_create_anywhere_cache] +def create_anywhere_cache bucket_name:, project_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - # The name of the folder to be created - # folder_name = "folder-name" - require "google/cloud/storage/control/v2" + require "google/cloud/storage/control" + require "google/cloud/storage/control/v2" + require "pry" # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client - parent = "projects/#{project_name}/locations/global" + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + + anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new( + name: "test_cache_shubhangi", + zone: zone + ) # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::CreateAnywhereCacheRequest.new( - parent: parent - + parent: parent, + anywhere_cache: anywhere_cache ) -binding.pry # Call the create_anywhere_cache method. -result = client.create_anywhere_cache request -# cache: Google::Cloud::Storage::Control::V2::AnywhereCache.new( -# name: "#{parent}/anywhereCaches/your-cache-id", -# ttl: { seconds: 3600 } # 1 hour TTL -# ), + +result = client.create_anywhere_cache(request) end -# [END storage_control_create_folder] +# [END storage_control_create_anywhere_cache] create_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ + +# request=> +# , +# request_id: ""> + +# GRPC::InvalidArgument: 3:This operation does not support custom billing projects at this time.. debug_error_string:{UNKNOWN:Error received from peer ipv4:64.233.189.207:443 {grpc_status:3, grpc_message:"This operation does not support custom billing projects at this time."}} \ No newline at end of file From 280a3fa754a6a760a77b1394dc3f6af497b9ec6f Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 20 Jun 2025 05:11:00 +0000 Subject: [PATCH 003/457] wip --- .../samples/acceptance/storage_control_anywhere_cache_test.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb index bf6c118a9c74..cbd9fb9a1603 100644 --- a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb +++ b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb @@ -30,8 +30,6 @@ end it "create Anywhere cache" do - binding.pry - create_anywhere_cache bucket_name: bucket_name, project_name: project_name, zone: @bucket.location end end From 6d2bb49fd6ef87fc7fa42a7b9443524c999f2876 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 20 Jun 2025 11:10:46 +0000 Subject: [PATCH 004/457] get and list working --- .../storage_control_anywhere_cache_test.rb | 34 +++++++++++--- .../storage_control_get_anywhere_cache.rb | 42 +++++++++++++++++ .../storage_control_list_anywhere_caches.rb | 47 +++++++++++++++++++ 3 files changed, 116 insertions(+), 7 deletions(-) create mode 100644 google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb create mode 100644 google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb diff --git a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb index cbd9fb9a1603..78efb8a8f03b 100644 --- a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb +++ b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb @@ -14,22 +14,42 @@ require_relative "helper" require_relative "../storage_control_create_anywhere_cache" +require_relative "../storage_control_list_anywhere_caches" +require_relative "../storage_control_get_anywhere_cache" + require 'pry' describe "Storage Control Anywhere Cache" do - let(:bucket_name) { random_bucket_name } + let(:bucket_name) { 'ruby_7' } let(:storage_client) { Google::Cloud::Storage.new } - let(:project_name) { storage_client.project } + let(:zone) {'us-east1-b'} +# let(:zone) {@bucket.location} before :all do - @bucket = create_bucket_helper bucket_name + @bucket= storage_client.bucket bucket_name + # @bucket = create_bucket_helper bucket_name end - after do - delete_bucket_helper bucket_name +# after do +# delete_bucket_helper bucket_name +# end + +# it "create Anywhere cache" do +# create_anywhere_cache bucket_name: bucket_name, project_name: project_name, zone: @bucket.location +# end + + it "list Anywhere cache" do + out, _err = capture_io do + list_anywhere_caches bucket_name: bucket_name + end + + assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" end - it "create Anywhere cache" do - create_anywhere_cache bucket_name: bucket_name, project_name: project_name, zone: @bucket.location + it "Get Anywhere cache" do + out, _err = capture_io do + get_anywhere_cache bucket_name: bucket_name, zone: zone + end + assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" end end diff --git a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb new file mode 100644 index 000000000000..a7a5c47992c4 --- /dev/null +++ b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb @@ -0,0 +1,42 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START storage_control_create_anywhere_cache] +def get_anywhere_cache bucket_name:, zone: + # The ID of your GCS bucket + # bucket_name = "your-unique-bucket-name" + + + require "google/cloud/storage/control" + require "google/cloud/storage/control/v2" + + require "pry" + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name= "#{parent}/anywhereCaches/#{zone}" + + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::GetAnywhereCacheRequest.new( + name: name, + ) +# Call the create_anywhere_cache method. + +result = client.get_anywhere_cache(request) +puts result +end +# [END storage_control_create_anywhere_cache] + +create_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb new file mode 100644 index 000000000000..1f94f7757157 --- /dev/null +++ b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb @@ -0,0 +1,47 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START storage_control_create_anywhere_caches] +def list_anywhere_caches bucket_name: + # The ID of your GCS bucket + # bucket_name = "your-unique-bucket-name" + + + require "google/cloud/storage/control" + require "google/cloud/storage/control/v2" + + require "pry" + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + + # anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new( + # name: "test_cache_shubhangi", + # zone: zone + # ) + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::ListAnywhereCachesRequest.new( + parent: parent + ) +# Call the create_anywhere_cache method. + + result = client.list_anywhere_caches(request) + result.response.anywhere_caches.each do |item| + puts item.name + end + +end +# [END storage_control_create_anywhere_caches] + list_anywhere_caches bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ From 75e1c16b077bf230151a4205646859491accc314 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Tue, 24 Jun 2025 11:38:53 +0000 Subject: [PATCH 005/457] pause_disable_resume_working --- .../storage_control_anywhere_cache_test.rb | 32 ++++++++++++++ .../storage_control_create_anywhere_cache.rb | 9 ++-- .../storage_control_disable_anywhere_cache.rb | 40 +++++++++++++++++ .../storage_control_get_anywhere_cache.rb | 32 +++++++------- .../storage_control_list_anywhere_caches.rb | 20 +++------ .../storage_control_pause_anywhere_cache.rb | 39 ++++++++++++++++ .../storage_control_resume_anywhere_cache.rb | 41 +++++++++++++++++ .../storage_control_update_anywhere_cache.rb | 44 +++++++++++++++++++ 8 files changed, 222 insertions(+), 35 deletions(-) create mode 100644 google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb create mode 100644 google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb create mode 100644 google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb create mode 100644 google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb diff --git a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb index 78efb8a8f03b..ed5c5724cb56 100644 --- a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb +++ b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb @@ -16,6 +16,10 @@ require_relative "../storage_control_create_anywhere_cache" require_relative "../storage_control_list_anywhere_caches" require_relative "../storage_control_get_anywhere_cache" +require_relative "../storage_control_update_anywhere_cache" +require_relative "../storage_control_pause_anywhere_cache" +require_relative "../storage_control_resume_anywhere_cache" +require_relative "../storage_control_disable_anywhere_cache" require 'pry' @@ -52,4 +56,32 @@ end assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" end + + it "Pause Anywhere cache" do + out, _err = capture_io do + pause_anywhere_cache bucket_name: bucket_name, zone: zone + end + assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" + end + + it "Resume Anywhere cache" do + out, _err = capture_io do + resume_anywhere_cache bucket_name: bucket_name, zone: zone + end + assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" + end + + it "Disable Anywhere cache" do + out, _err = capture_io do + resume_anywhere_cache bucket_name: bucket_name, zone: zone + end + assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" + end + +# it "Update Anywhere cache" do +# out, _err = capture_io do +# update_anywhere_cache bucket_name: bucket_name, zone: zone +# end +# assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" +# end end diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index 7a5cd3ecc69c..3cfee86babaf 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -13,7 +13,7 @@ # limitations under the License. # [START storage_control_create_anywhere_cache] -def create_anywhere_cache bucket_name:, project_name:, zone: +def create_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" @@ -21,14 +21,13 @@ def create_anywhere_cache bucket_name:, project_name:, zone: require "google/cloud/storage/control" require "google/cloud/storage/control/v2" - require "pry" - # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" + name= "#{parent}/anywhereCaches/#{zone}" anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new( - name: "test_cache_shubhangi", + name: name, zone: zone ) # Create a request. Replace the placeholder values with actual data. @@ -40,6 +39,8 @@ def create_anywhere_cache bucket_name:, project_name:, zone: result = client.create_anywhere_cache(request) +puts result + end # [END storage_control_create_anywhere_cache] diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb new file mode 100644 index 000000000000..9bcdd5c375cc --- /dev/null +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -0,0 +1,40 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START storage_control_create_anywhere_cache] +def disable_anywhere_cache bucket_name:, zone: + # The ID of your GCS bucket + # bucket_name = "your-unique-bucket-name" + + + require "google/cloud/storage/control" + require "google/cloud/storage/control/v2" + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name= "#{parent}/anywhereCaches/#{zone}" + + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::DisableAnywhereCacheRequest.new( + name: name + ) + # Call the disable_anywhere_cache method. + + result = client.disable_anywhere_cache(request) + puts result +end +# [END storage_control_create_anywhere_cache] + +disable_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb index a7a5c47992c4..4fd3e01e0898 100644 --- a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb @@ -12,31 +12,29 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START storage_control_create_anywhere_cache] +# [START storage_control_get_anywhere_cache] def get_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" require "google/cloud/storage/control" - require "google/cloud/storage/control/v2" + require "google/cloud/storage/control/v2" - require "pry" + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name= "#{parent}/anywhereCaches/#{zone}" - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new - parent = "projects/_/buckets/#{bucket_name}" - name= "#{parent}/anywhereCaches/#{zone}" + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::GetAnywhereCacheRequest.new( + name: name + ) + # Call the create_anywhere_cache method. - # Create a request. Replace the placeholder values with actual data. - request = Google::Cloud::Storage::Control::V2::GetAnywhereCacheRequest.new( - name: name, - ) -# Call the create_anywhere_cache method. - -result = client.get_anywhere_cache(request) -puts result + result = client.get_anywhere_cache(request) + puts result end -# [END storage_control_create_anywhere_cache] +# [END storage_control_get_anywhere_cache] -create_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ +get_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb index 1f94f7757157..165b0649eba1 100644 --- a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb +++ b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb @@ -12,36 +12,28 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START storage_control_create_anywhere_caches] +# [START storage_control_list_anywhere_caches] def list_anywhere_caches bucket_name: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - require "google/cloud/storage/control" require "google/cloud/storage/control/v2" - require "pry" - # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" - # anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new( - # name: "test_cache_shubhangi", - # zone: zone - # ) - # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::ListAnywhereCachesRequest.new( parent: parent ) -# Call the create_anywhere_cache method. + # Call the create_anywhere_cache method. result = client.list_anywhere_caches(request) - result.response.anywhere_caches.each do |item| - puts item.name - end + result.response.anywhere_caches.each do |item| + puts item.name + end end -# [END storage_control_create_anywhere_caches] +# [END storage_control_list_anywhere_caches] list_anywhere_caches bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb new file mode 100644 index 000000000000..30a2289888b9 --- /dev/null +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -0,0 +1,39 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START storage_control_create_anywhere_cache] +def pause_anywhere_cache bucket_name:, zone: + # The ID of your GCS bucket + # bucket_name = "your-unique-bucket-name" + + + require "google/cloud/storage/control" + require "google/cloud/storage/control/v2" + + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name= "#{parent}/anywhereCaches/#{zone}" +# Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::PauseAnywhereCacheRequest.new( + name: name + ) + # Call the create_anywhere_cache method. + result = client.pause_anywhere_cache(request) + puts result +end +# [END storage_control_pause_anywhere_cache] + +pause_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb new file mode 100644 index 000000000000..64ad27697b73 --- /dev/null +++ b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb @@ -0,0 +1,41 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START storage_control_resume_anywhere_cache] +def resume_anywhere_cache bucket_name:, zone: + # The ID of your GCS bucket + # bucket_name = "your-unique-bucket-name" + + + require "google/cloud/storage/control" + require "google/cloud/storage/control/v2" + + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name= "#{parent}/anywhereCaches/#{zone}" + + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::ResumeAnywhereCacheRequest.new( + name: name + ) + # Call the resume_anywhere_cache method. + + result = client.resume_anywhere_cache(request) + puts result +end +# [END storage_control_resume_anywhere_cache] + +resume_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb new file mode 100644 index 000000000000..d0c03d5218a2 --- /dev/null +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -0,0 +1,44 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START storage_control_update_anywhere_cache] +def update_anywhere_cache bucket_name:, zone: + # The ID of your GCS bucket + # bucket_name = "your-unique-bucket-name" + + require "google/cloud/storage/control" + require "google/cloud/storage/control/v2" + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name= "#{parent}/anywhereCaches/#{zone}" + binding.pry + + + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::UpdateAnywhereCacheRequest.new( + request_id: name + ) + # Call the update_anywhere_cache method. + + result = client.update_anywhere_cache(request1) + puts result +end +# [END storage_control_update_anywhere_cache] + +update_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ + +# => , admission_policy: "admit-on-first-miss", state: "running", create_time: , update_time: , pending_update: false>, update_mask: , request_id: ""> +# Google::Cloud::InvalidArgumentError: 3:Please specify anywhere_cache.name in request.. debug_error_string:{UNKNOWN:Error received from peer ipv4:108.177.97.207:443 {grpc_message:"Please specify anywhere_cache.name in request.", grpc_status:3} From 799e6fb92af2eb00e671a171e8dd9bfd2326b15a Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Tue, 1 Jul 2025 11:43:43 +0000 Subject: [PATCH 006/457] adding all samples --- .../storage_control_anywhere_cache_test.rb | 87 ------------------- .../storage_control_create_anywhere_cache.rb | 66 ++++++-------- .../storage_control_disable_anywhere_cache.rb | 13 ++- .../storage_control_get_anywhere_cache.rb | 11 +-- .../storage_control_list_anywhere_caches.rb | 19 ++-- .../storage_control_pause_anywhere_cache.rb | 22 ++--- .../storage_control_resume_anywhere_cache.rb | 27 +++--- .../storage_control_update_anywhere_cache.rb | 46 +++++----- 8 files changed, 99 insertions(+), 192 deletions(-) delete mode 100644 google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb diff --git a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb deleted file mode 100644 index ed5c5724cb56..000000000000 --- a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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_relative "helper" -require_relative "../storage_control_create_anywhere_cache" -require_relative "../storage_control_list_anywhere_caches" -require_relative "../storage_control_get_anywhere_cache" -require_relative "../storage_control_update_anywhere_cache" -require_relative "../storage_control_pause_anywhere_cache" -require_relative "../storage_control_resume_anywhere_cache" -require_relative "../storage_control_disable_anywhere_cache" - -require 'pry' - -describe "Storage Control Anywhere Cache" do - let(:bucket_name) { 'ruby_7' } - let(:storage_client) { Google::Cloud::Storage.new } - let(:zone) {'us-east1-b'} -# let(:zone) {@bucket.location} - - before :all do - @bucket= storage_client.bucket bucket_name - # @bucket = create_bucket_helper bucket_name - end - -# after do -# delete_bucket_helper bucket_name -# end - -# it "create Anywhere cache" do -# create_anywhere_cache bucket_name: bucket_name, project_name: project_name, zone: @bucket.location -# end - - it "list Anywhere cache" do - out, _err = capture_io do - list_anywhere_caches bucket_name: bucket_name - end - - assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" - end - - it "Get Anywhere cache" do - out, _err = capture_io do - get_anywhere_cache bucket_name: bucket_name, zone: zone - end - assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" - end - - it "Pause Anywhere cache" do - out, _err = capture_io do - pause_anywhere_cache bucket_name: bucket_name, zone: zone - end - assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" - end - - it "Resume Anywhere cache" do - out, _err = capture_io do - resume_anywhere_cache bucket_name: bucket_name, zone: zone - end - assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" - end - - it "Disable Anywhere cache" do - out, _err = capture_io do - resume_anywhere_cache bucket_name: bucket_name, zone: zone - end - assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" - end - -# it "Update Anywhere cache" do -# out, _err = capture_io do -# update_anywhere_cache bucket_name: bucket_name, zone: zone -# end -# assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" -# end -end diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index 3cfee86babaf..11f69247543c 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -17,44 +17,34 @@ def create_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - - require "google/cloud/storage/control" - require "google/cloud/storage/control/v2" - - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new - parent = "projects/_/buckets/#{bucket_name}" - name= "#{parent}/anywhereCaches/#{zone}" - - anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new( - name: name, - zone: zone - ) - # Create a request. Replace the placeholder values with actual data. - request = Google::Cloud::Storage::Control::V2::CreateAnywhereCacheRequest.new( - parent: parent, - anywhere_cache: anywhere_cache - ) -# Call the create_anywhere_cache method. - -result = client.create_anywhere_cache(request) - -puts result - + # Zone where you want to create cache + # zone = "your-zone-name" + + require "google/cloud/storage/control/v2" + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name = "#{parent}/anywhereCaches/#{zone}" + + anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new( + name: name, + zone: zone + ) + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::CreateAnywhereCacheRequest.new( + parent: parent, + anywhere_cache: anywhere_cache + ) + # Call the create_anywhere_cache method. + result = client.create_anywhere_cache request + + if result.instance_of?(Gapic::Operation) + puts "Anywhere cache created" + else + puts "operation failed" + end end # [END storage_control_create_anywhere_cache] -create_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ - -# request=> -# , -# request_id: ""> - -# GRPC::InvalidArgument: 3:This operation does not support custom billing projects at this time.. debug_error_string:{UNKNOWN:Error received from peer ipv4:64.233.189.207:443 {grpc_status:3, grpc_message:"This operation does not support custom billing projects at this time."}} \ No newline at end of file +create_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb index 9bcdd5c375cc..4fea9bd7f668 100644 --- a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -17,24 +17,23 @@ def disable_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - - require "google/cloud/storage/control" + # Zone where you want to create cache + # zone = "your-zone-name" require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" - name= "#{parent}/anywhereCaches/#{zone}" + name = "#{parent}/anywhereCaches/#{zone}" # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::DisableAnywhereCacheRequest.new( - name: name + name: name ) # Call the disable_anywhere_cache method. - - result = client.disable_anywhere_cache(request) + result = client.disable_anywhere_cache request puts result end # [END storage_control_create_anywhere_cache] -disable_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ +disable_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb index 4fd3e01e0898..3220104bc8f1 100644 --- a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb @@ -17,24 +17,25 @@ def get_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" + # Zone where you want to create cache + # zone = "your-zone-name" - require "google/cloud/storage/control" require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" - name= "#{parent}/anywhereCaches/#{zone}" + name = "#{parent}/anywhereCaches/#{zone}" # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::GetAnywhereCacheRequest.new( - name: name + name: name ) # Call the create_anywhere_cache method. - result = client.get_anywhere_cache(request) + result = client.get_anywhere_cache request puts result end # [END storage_control_get_anywhere_cache] -get_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ +get_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ \ No newline at end of file diff --git a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb index 165b0649eba1..97672a2a8747 100644 --- a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb +++ b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb @@ -17,23 +17,22 @@ def list_anywhere_caches bucket_name: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - require "google/cloud/storage/control" - require "google/cloud/storage/control/v2" + require "google/cloud/storage/control/v2" - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new - parent = "projects/_/buckets/#{bucket_name}" + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" - request = Google::Cloud::Storage::Control::V2::ListAnywhereCachesRequest.new( - parent: parent - ) + request = Google::Cloud::Storage::Control::V2::ListAnywhereCachesRequest.new( + parent: parent + ) # Call the create_anywhere_cache method. + result = client.list_anywhere_caches request - result = client.list_anywhere_caches(request) result.response.anywhere_caches.each do |item| puts item.name end end # [END storage_control_list_anywhere_caches] - list_anywhere_caches bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ +list_anywhere_caches bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb index 30a2289888b9..1f84462e0504 100644 --- a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -17,23 +17,23 @@ def pause_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" + # Zone where you want to create cache + # zone = "your-zone-name" - require "google/cloud/storage/control" - require "google/cloud/storage/control/v2" + require "google/cloud/storage/control/v2" - - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new - parent = "projects/_/buckets/#{bucket_name}" - name= "#{parent}/anywhereCaches/#{zone}" -# Create a request. Replace the placeholder values with actual data. + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name = "#{parent}/anywhereCaches/#{zone}" + # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::PauseAnywhereCacheRequest.new( name: name - ) + ) # Call the create_anywhere_cache method. - result = client.pause_anywhere_cache(request) + result = client.pause_anywhere_cache request puts result end # [END storage_control_pause_anywhere_cache] -pause_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ +pause_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb index 64ad27697b73..9e2abf1be2f1 100644 --- a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb @@ -17,25 +17,24 @@ def resume_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" + # Zone where you want to create cache + # zone = "your-zone-name" - require "google/cloud/storage/control" - require "google/cloud/storage/control/v2" + require "google/cloud/storage/control/v2" + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name = "#{parent}/anywhereCaches/#{zone}" - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new - parent = "projects/_/buckets/#{bucket_name}" - name= "#{parent}/anywhereCaches/#{zone}" - - # Create a request. Replace the placeholder values with actual data. - request = Google::Cloud::Storage::Control::V2::ResumeAnywhereCacheRequest.new( - name: name - ) + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::ResumeAnywhereCacheRequest.new( + name: name + ) # Call the resume_anywhere_cache method. - - result = client.resume_anywhere_cache(request) + result = client.resume_anywhere_cache request puts result end # [END storage_control_resume_anywhere_cache] -resume_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ +resume_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb index d0c03d5218a2..7bd70a08dc16 100644 --- a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -17,28 +17,34 @@ def update_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - require "google/cloud/storage/control" - require "google/cloud/storage/control/v2" - - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new - parent = "projects/_/buckets/#{bucket_name}" - name= "#{parent}/anywhereCaches/#{zone}" - binding.pry - - - # Create a request. Replace the placeholder values with actual data. - request = Google::Cloud::Storage::Control::V2::UpdateAnywhereCacheRequest.new( - request_id: name - ) + # Zone where you want to create cache + # zone = "your-zone-name" + require "google/cloud/storage/control/v2" + + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + parent = "projects/_/buckets/#{bucket_name}" + name = "#{parent}/anywhereCaches/#{zone}" + + anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new( + name: name, + ttl: 7200 + ) + mask = Google::Protobuf::FieldMask.new paths: ["ttl"] + # Create a request. Replace the placeholder values with actual data. + request = Google::Cloud::Storage::Control::V2::UpdateAnywhereCacheRequest.new( + anywhere_cache: anywhere_cache, + update_mask: mask + ) # Call the update_anywhere_cache method. + result = client.update_anywhere_cache request - result = client.update_anywhere_cache(request1) - puts result + if result.instance_of? Gapic::Operation + puts "Anywhere cache updated" + else + puts "operation failed" + end end # [END storage_control_update_anywhere_cache] -update_anywhere_cache bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ - -# => , admission_policy: "admit-on-first-miss", state: "running", create_time: , update_time: , pending_update: false>, update_mask: , request_id: ""> -# Google::Cloud::InvalidArgumentError: 3:Please specify anywhere_cache.name in request.. debug_error_string:{UNKNOWN:Error received from peer ipv4:108.177.97.207:443 {grpc_message:"Please specify anywhere_cache.name in request.", grpc_status:3} +update_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ From 4f2fcbda5462510959bb74762bbd9f925431aea8 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 3 Jul 2025 08:05:02 +0000 Subject: [PATCH 007/457] adding comments --- .../storage_control_create_anywhere_cache.rb | 8 +++---- .../storage_control_disable_anywhere_cache.rb | 21 ++++++++++--------- .../storage_control_list_anywhere_caches.rb | 7 +++---- .../storage_control_pause_anywhere_cache.rb | 21 ++++++++++--------- .../storage_control_resume_anywhere_cache.rb | 14 ++++++------- .../storage_control_update_anywhere_cache.rb | 17 ++++++++------- 6 files changed, 45 insertions(+), 43 deletions(-) diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index 11f69247543c..927b25a29eb0 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -23,7 +23,7 @@ def create_anywhere_cache bucket_name:, zone: require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" name = "#{parent}/anywhereCaches/#{zone}" @@ -31,20 +31,20 @@ def create_anywhere_cache bucket_name:, zone: name: name, zone: zone ) + # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::CreateAnywhereCacheRequest.new( parent: parent, anywhere_cache: anywhere_cache ) # Call the create_anywhere_cache method. - result = client.create_anywhere_cache request + result = storage_control_client.create_anywhere_cache request if result.instance_of?(Gapic::Operation) - puts "Anywhere cache created" + puts "AnywhereCache created - #{result.name}" else puts "operation failed" end end # [END storage_control_create_anywhere_cache] - create_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb index 4fea9bd7f668..e3e20e288a0b 100644 --- a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -12,28 +12,29 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START storage_control_create_anywhere_cache] -def disable_anywhere_cache bucket_name:, zone: +# [START storage_control_disable_anywhere_cache] +def disable_anywhere_cache bucket_name:, anywhere_cache_id: + require "google/cloud/storage/control/v2" + # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - # Zone where you want to create cache - # zone = "your-zone-name" - require "google/cloud/storage/control/v2" + # A value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" - name = "#{parent}/anywhereCaches/#{zone}" + name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::DisableAnywhereCacheRequest.new( name: name ) # Call the disable_anywhere_cache method. - result = client.disable_anywhere_cache request - puts result + result = storage_control_client.disable_anywhere_cache request + puts "AnywhereCache #{result.name} #{result.state}" end -# [END storage_control_create_anywhere_cache] +# [END storage_control_disable_anywhere_cache] disable_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb index 97672a2a8747..5babbc8dce32 100644 --- a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb +++ b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb @@ -20,19 +20,18 @@ def list_anywhere_caches bucket_name: require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" request = Google::Cloud::Storage::Control::V2::ListAnywhereCachesRequest.new( parent: parent ) - # Call the create_anywhere_cache method. - result = client.list_anywhere_caches request + # Call the list_anywhere_caches method. + result = storage_control_client.list_anywhere_caches request result.response.anywhere_caches.each do |item| puts item.name end - end # [END storage_control_list_anywhere_caches] list_anywhere_caches bucket_name: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb index 1f84462e0504..0f163c197153 100644 --- a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -13,26 +13,27 @@ # limitations under the License. # [START storage_control_create_anywhere_cache] -def pause_anywhere_cache bucket_name:, zone: +def pause_anywhere_cache bucket_name:, anywhere_cache_id: + require "google/cloud/storage/control/v2" + # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - # Zone where you want to create cache - # zone = "your-zone-name" - - require "google/cloud/storage/control/v2" + # A value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" - name = "#{parent}/anywhereCaches/#{zone}" + name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" + # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::PauseAnywhereCacheRequest.new( name: name ) - # Call the create_anywhere_cache method. - result = client.pause_anywhere_cache request - puts result + # Call the pause_anywhere_cache method. + result = storage_control_client.pause_anywhere_cache request + puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_pause_anywhere_cache] diff --git a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb index 9e2abf1be2f1..a38fc7f21d0d 100644 --- a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb @@ -13,19 +13,19 @@ # limitations under the License. # [START storage_control_resume_anywhere_cache] -def resume_anywhere_cache bucket_name:, zone: +def resume_anywhere_cache bucket_name:, anywhere_cache_id: + require "google/cloud/storage/control/v2" + # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - # Zone where you want to create cache - # zone = "your-zone-name" - - require "google/cloud/storage/control/v2" + # A value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" - name = "#{parent}/anywhereCaches/#{zone}" + name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::ResumeAnywhereCacheRequest.new( @@ -33,7 +33,7 @@ def resume_anywhere_cache bucket_name:, zone: ) # Call the resume_anywhere_cache method. result = client.resume_anywhere_cache request - puts result + puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_resume_anywhere_cache] diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb index 7bd70a08dc16..8d0ce8e4817a 100644 --- a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -13,18 +13,19 @@ # limitations under the License. # [START storage_control_update_anywhere_cache] -def update_anywhere_cache bucket_name:, zone: +def update_anywhere_cache bucket_name:, anywhere_cache_id: + require "google/cloud/storage/control/v2" + # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - # Zone where you want to create cache - # zone = "your-zone-name" - require "google/cloud/storage/control/v2" + # A value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" - name = "#{parent}/anywhereCaches/#{zone}" + name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new( name: name, @@ -37,10 +38,10 @@ def update_anywhere_cache bucket_name:, zone: update_mask: mask ) # Call the update_anywhere_cache method. - result = client.update_anywhere_cache request + result = storage_control_client.update_anywhere_cache request if result.instance_of? Gapic::Operation - puts "Anywhere cache updated" + puts "AnywhereCache updated - #{result.name}" else puts "operation failed" end From 85414705f6d82d537e2a9b32e327f294ff26f144 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 3 Jul 2025 08:07:33 +0000 Subject: [PATCH 008/457] adding comment --- .../samples/storage_control_create_anywhere_cache.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index 927b25a29eb0..f7d56cb95058 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -14,14 +14,14 @@ # [START storage_control_create_anywhere_cache] def create_anywhere_cache bucket_name:, zone: + require "google/cloud/storage/control/v2" + # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # Zone where you want to create cache # zone = "your-zone-name" - require "google/cloud/storage/control/v2" - # Create a client object. The client can be reused for multiple calls. storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" From 26c1b8977fa256cb8ce30fbca3e16d944381f4af Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 3 Jul 2025 08:29:08 +0000 Subject: [PATCH 009/457] updates --- .../storage_control_create_anywhere_cache.rb | 3 +++ .../storage_control_disable_anywhere_cache.rb | 5 +++- .../storage_control_get_anywhere_cache.rb | 26 ++++++++++--------- .../storage_control_list_anywhere_caches.rb | 2 ++ .../storage_control_pause_anywhere_cache.rb | 5 +++- .../storage_control_resume_anywhere_cache.rb | 5 +++- .../storage_control_update_anywhere_cache.rb | 4 ++- 7 files changed, 34 insertions(+), 16 deletions(-) diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index f7d56cb95058..ba524b3ebdb1 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -37,6 +37,9 @@ def create_anywhere_cache bucket_name:, zone: parent: parent, anywhere_cache: anywhere_cache ) + # The request creates a new cache in the specified zone. + # The cache is created in the specified bucket. + # The cache is created in the specified zone. # Call the create_anywhere_cache method. result = storage_control_client.create_anywhere_cache request diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb index e3e20e288a0b..70fc197579f7 100644 --- a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -31,10 +31,13 @@ def disable_anywhere_cache bucket_name:, anywhere_cache_id: request = Google::Cloud::Storage::Control::V2::DisableAnywhereCacheRequest.new( name: name ) + # The request disables the cache, but does not delete it. + # The cache can be re-enabled later. # Call the disable_anywhere_cache method. result = storage_control_client.disable_anywhere_cache request puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_disable_anywhere_cache] -disable_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ +disable_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ + diff --git a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb index 3220104bc8f1..af52cc09c031 100644 --- a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb @@ -13,29 +13,31 @@ # limitations under the License. # [START storage_control_get_anywhere_cache] -def get_anywhere_cache bucket_name:, zone: +def get_anywhere_cache bucket_name:, anywhere_cache_id: + require "google/cloud/storage/control/v2" + # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - # Zone where you want to create cache - # zone = "your-zone-name" - - require "google/cloud/storage/control/v2" + # A value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" - name = "#{parent}/anywhereCaches/#{zone}" + name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" # Create a request. Replace the placeholder values with actual data. request = Google::Cloud::Storage::Control::V2::GetAnywhereCacheRequest.new( name: name ) - # Call the create_anywhere_cache method. - - result = client.get_anywhere_cache request - puts result + # The request retrieves the cache in the specified bucket. + # The cache is identified by the specified ID. + # The cache is in the specified bucket. + # Call the get_anywhere_cache method. + result = storage_control_client.get_anywhere_cache request + puts "AnywhereCache #{result.name}" end # [END storage_control_get_anywhere_cache] -get_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ \ No newline at end of file +get_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb index 5babbc8dce32..03335ff74e82 100644 --- a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb +++ b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb @@ -26,6 +26,8 @@ def list_anywhere_caches bucket_name: request = Google::Cloud::Storage::Control::V2::ListAnywhereCachesRequest.new( parent: parent ) + # The request lists all caches in the specified bucket. + # The caches are identified by the specified bucket name. # Call the list_anywhere_caches method. result = storage_control_client.list_anywhere_caches request diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb index 0f163c197153..a404caceb7c1 100644 --- a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -31,10 +31,13 @@ def pause_anywhere_cache bucket_name:, anywhere_cache_id: request = Google::Cloud::Storage::Control::V2::PauseAnywhereCacheRequest.new( name: name ) + # The request pauses the cache, but does not delete it. + # The cache can be resumed later. + # The cache is paused in the specified bucket. # Call the pause_anywhere_cache method. result = storage_control_client.pause_anywhere_cache request puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_pause_anywhere_cache] -pause_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ +pause_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb index a38fc7f21d0d..5c40fb535aba 100644 --- a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb @@ -31,10 +31,13 @@ def resume_anywhere_cache bucket_name:, anywhere_cache_id: request = Google::Cloud::Storage::Control::V2::ResumeAnywhereCacheRequest.new( name: name ) + # The request resumes the cache, which was previously paused. + # The cache is resumed in the specified bucket. + # The cache is identified by the specified ID. # Call the resume_anywhere_cache method. result = client.resume_anywhere_cache request puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_resume_anywhere_cache] -resume_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ +resume_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb index 8d0ce8e4817a..e577b4fa3369 100644 --- a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -37,6 +37,8 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id: anywhere_cache: anywhere_cache, update_mask: mask ) + # The request updates the cache in the specified bucket. + # The cache is identified by the specified ID. # Call the update_anywhere_cache method. result = storage_control_client.update_anywhere_cache request @@ -48,4 +50,4 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id: end # [END storage_control_update_anywhere_cache] -update_anywhere_cache bucket_name: ARGV.shift, zone: ARGV.shift if $PROGRAM_NAME == __FILE__ +update_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ From 678bec86a4bf26276d2daf7c38d572b48a9f3cd6 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 3 Jul 2025 14:00:08 +0530 Subject: [PATCH 010/457] Update storage_control_create_anywhere_cache.rb --- .../samples/storage_control_create_anywhere_cache.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index ba524b3ebdb1..564e4b052084 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -39,7 +39,6 @@ def create_anywhere_cache bucket_name:, zone: ) # The request creates a new cache in the specified zone. # The cache is created in the specified bucket. - # The cache is created in the specified zone. # Call the create_anywhere_cache method. result = storage_control_client.create_anywhere_cache request From f83006e1b05192119e073e55dc28a79fb7bca902 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 3 Jul 2025 14:01:03 +0530 Subject: [PATCH 011/457] Update storage_control_disable_anywhere_cache.rb --- .../samples/storage_control_disable_anywhere_cache.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb index 70fc197579f7..e898d70b7e8a 100644 --- a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -40,4 +40,3 @@ def disable_anywhere_cache bucket_name:, anywhere_cache_id: # [END storage_control_disable_anywhere_cache] disable_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ - From 1aeb701e8f1bef2b24413fe038dbd61d2eea8343 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 3 Jul 2025 08:34:08 +0000 Subject: [PATCH 012/457] updates --- .../samples/storage_control_disable_anywhere_cache.rb | 1 - .../samples/storage_control_get_anywhere_cache.rb | 1 - .../samples/storage_control_pause_anywhere_cache.rb | 1 - .../samples/storage_control_resume_anywhere_cache.rb | 1 - .../samples/storage_control_update_anywhere_cache.rb | 1 - 5 files changed, 5 deletions(-) diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb index e898d70b7e8a..85c2962d8777 100644 --- a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -38,5 +38,4 @@ def disable_anywhere_cache bucket_name:, anywhere_cache_id: puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_disable_anywhere_cache] - disable_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb index af52cc09c031..f25a8362b183 100644 --- a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb @@ -39,5 +39,4 @@ def get_anywhere_cache bucket_name:, anywhere_cache_id: puts "AnywhereCache #{result.name}" end # [END storage_control_get_anywhere_cache] - get_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb index a404caceb7c1..bd77ab36f87f 100644 --- a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -39,5 +39,4 @@ def pause_anywhere_cache bucket_name:, anywhere_cache_id: puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_pause_anywhere_cache] - pause_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb index 5c40fb535aba..f00ce446926c 100644 --- a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb @@ -39,5 +39,4 @@ def resume_anywhere_cache bucket_name:, anywhere_cache_id: puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_resume_anywhere_cache] - resume_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb index e577b4fa3369..7184920ab8c9 100644 --- a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -49,5 +49,4 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id: end end # [END storage_control_update_anywhere_cache] - update_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ From 9a4f1d3057e8779229085509de56464da7d4eece Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 4 Jul 2025 05:16:40 +0000 Subject: [PATCH 013/457] updates --- .../samples/storage_control_create_anywhere_cache.rb | 3 +-- .../samples/storage_control_disable_anywhere_cache.rb | 3 +-- .../samples/storage_control_get_anywhere_cache.rb | 3 +-- .../samples/storage_control_list_anywhere_caches.rb | 1 - .../samples/storage_control_pause_anywhere_cache.rb | 3 +-- .../samples/storage_control_resume_anywhere_cache.rb | 7 +++---- .../samples/storage_control_update_anywhere_cache.rb | 3 +-- 7 files changed, 8 insertions(+), 15 deletions(-) diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index 564e4b052084..0df38df93e1c 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -14,13 +14,12 @@ # [START storage_control_create_anywhere_cache] def create_anywhere_cache bucket_name:, zone: - require "google/cloud/storage/control/v2" - # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # Zone where you want to create cache # zone = "your-zone-name" + require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb index 85c2962d8777..1d7bdc1ab091 100644 --- a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -14,13 +14,12 @@ # [START storage_control_disable_anywhere_cache] def disable_anywhere_cache bucket_name:, anywhere_cache_id: - require "google/cloud/storage/control/v2" - # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new diff --git a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb index f25a8362b183..f7420739187e 100644 --- a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb @@ -14,13 +14,12 @@ # [START storage_control_get_anywhere_cache] def get_anywhere_cache bucket_name:, anywhere_cache_id: - require "google/cloud/storage/control/v2" - # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new diff --git a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb index 03335ff74e82..4e17cea3d53a 100644 --- a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb +++ b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb @@ -16,7 +16,6 @@ def list_anywhere_caches bucket_name: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb index bd77ab36f87f..16fd0d60a1d0 100644 --- a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -14,13 +14,12 @@ # [START storage_control_create_anywhere_cache] def pause_anywhere_cache bucket_name:, anywhere_cache_id: - require "google/cloud/storage/control/v2" - # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new diff --git a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb index f00ce446926c..dba458215b1c 100644 --- a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb @@ -14,16 +14,15 @@ # [START storage_control_resume_anywhere_cache] def resume_anywhere_cache bucket_name:, anywhere_cache_id: - require "google/cloud/storage/control/v2" - # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new parent = "projects/_/buckets/#{bucket_name}" name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" @@ -35,7 +34,7 @@ def resume_anywhere_cache bucket_name:, anywhere_cache_id: # The cache is resumed in the specified bucket. # The cache is identified by the specified ID. # Call the resume_anywhere_cache method. - result = client.resume_anywhere_cache request + result = storage_control_client.resume_anywhere_cache request puts "AnywhereCache #{result.name} #{result.state}" end # [END storage_control_resume_anywhere_cache] diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb index 7184920ab8c9..5ab886753c96 100644 --- a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -14,13 +14,12 @@ # [START storage_control_update_anywhere_cache] def update_anywhere_cache bucket_name:, anywhere_cache_id: - require "google/cloud/storage/control/v2" - # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new From 80d9d5a7af2bf6ff4a3c782a5349c8b921eff205 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 4 Jul 2025 14:26:00 +0530 Subject: [PATCH 014/457] Update storage_control_create_anywhere_cache.rb --- .../samples/storage_control_create_anywhere_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index 0df38df93e1c..faa75b841bfa 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -41,7 +41,7 @@ def create_anywhere_cache bucket_name:, zone: # Call the create_anywhere_cache method. result = storage_control_client.create_anywhere_cache request - if result.instance_of?(Gapic::Operation) + if result.instance_of? Gapic::Operation puts "AnywhereCache created - #{result.name}" else puts "operation failed" From f624fc646275e1ddca4b9d9b1b6a46f8fbe4eaaa Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 4 Jul 2025 14:34:20 +0530 Subject: [PATCH 015/457] Update storage_control_pause_anywhere_cache.rb --- .../samples/storage_control_pause_anywhere_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb index 16fd0d60a1d0..36201dd34280 100644 --- a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START storage_control_create_anywhere_cache] +# [START storage_control_pause_anywhere_cache] def pause_anywhere_cache bucket_name:, anywhere_cache_id: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" From 55c18dc8ed5e8ce365b7f37e1c835c8ac440027a Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 4 Jul 2025 10:59:17 +0000 Subject: [PATCH 016/457] updating --- .../samples/storage_control_disable_anywhere_cache.rb | 2 +- .../samples/storage_control_get_anywhere_cache.rb | 2 +- .../samples/storage_control_pause_anywhere_cache.rb | 2 +- .../samples/storage_control_resume_anywhere_cache.rb | 2 +- .../samples/storage_control_update_anywhere_cache.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb index 1d7bdc1ab091..2b258df6d344 100644 --- a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -18,7 +18,7 @@ def disable_anywhere_cache bucket_name:, anywhere_cache_id: # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache - # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = "us-east1-b" require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. diff --git a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb index f7420739187e..961b55893391 100644 --- a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb @@ -18,7 +18,7 @@ def get_anywhere_cache bucket_name:, anywhere_cache_id: # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache - # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = "us-east1-b" require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb index 36201dd34280..7b8a9e1cb12a 100644 --- a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -18,7 +18,7 @@ def pause_anywhere_cache bucket_name:, anywhere_cache_id: # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache - # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = "us-east1-b" require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. diff --git a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb index dba458215b1c..dec58b50c16c 100644 --- a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb @@ -18,7 +18,7 @@ def resume_anywhere_cache bucket_name:, anywhere_cache_id: # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache - # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = "us-east1-b" require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb index 5ab886753c96..bf3a911d815d 100644 --- a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -18,7 +18,7 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id: # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache - # anywhere_cache_id = value that, along with the bucket's name, uniquely identifies the cache + # anywhere_cache_id = "us-east1-b" require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. From 4e495b23208331839771a8e4ae498193825ae480 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 11 Jul 2025 11:44:39 +0000 Subject: [PATCH 017/457] removing reference for V2 library --- google-cloud-storage-control/README.md | 5 +++++ .../storage_control_create_anywhere_cache.rb | 18 ++++++++---------- .../storage_control_disable_anywhere_cache.rb | 16 ++++++++++------ .../storage_control_get_anywhere_cache.rb | 15 ++++++++++----- .../storage_control_list_anywhere_caches.rb | 17 ++++++++++------- .../storage_control_pause_anywhere_cache.rb | 14 +++++++++----- .../storage_control_resume_anywhere_cache.rb | 16 ++++++++++------ .../storage_control_update_anywhere_cache.rb | 16 ++++++++-------- 8 files changed, 70 insertions(+), 47 deletions(-) diff --git a/google-cloud-storage-control/README.md b/google-cloud-storage-control/README.md index d93efd496b40..7dab4f4c40d7 100644 --- a/google-cloud-storage-control/README.md +++ b/google-cloud-storage-control/README.md @@ -132,3 +132,8 @@ 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. + +## Note + +Tests for Anywhere cache Sample are not included due to the long operation times typical for cache operations. + diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index faa75b841bfa..9bc1f977af1f 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -13,16 +13,17 @@ # limitations under the License. # [START storage_control_create_anywhere_cache] +require "google/cloud/storage/control" + def create_anywhere_cache bucket_name:, zone: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # Zone where you want to create cache # zone = "your-zone-name" - require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control.storage_control parent = "projects/_/buckets/#{bucket_name}" name = "#{parent}/anywhereCaches/#{zone}" @@ -30,21 +31,18 @@ def create_anywhere_cache bucket_name:, zone: name: name, zone: zone ) - - # Create a request. Replace the placeholder values with actual data. + # Create a request. request = Google::Cloud::Storage::Control::V2::CreateAnywhereCacheRequest.new( parent: parent, anywhere_cache: anywhere_cache ) # The request creates a new cache in the specified zone. # The cache is created in the specified bucket. - # Call the create_anywhere_cache method. - result = storage_control_client.create_anywhere_cache request - - if result.instance_of? Gapic::Operation + begin + result = storage_control_client.create_anywhere_cache request puts "AnywhereCache created - #{result.name}" - else - puts "operation failed" + rescue StandardError => e + puts "Error creating AnywhereCache: #{e.message}" end end # [END storage_control_create_anywhere_cache] diff --git a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb index 2b258df6d344..4b60c0853f33 100644 --- a/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_disable_anywhere_cache.rb @@ -13,28 +13,32 @@ # limitations under the License. # [START storage_control_disable_anywhere_cache] +require "google/cloud/storage/control" + def disable_anywhere_cache bucket_name:, anywhere_cache_id: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = "us-east1-b" - require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control.storage_control parent = "projects/_/buckets/#{bucket_name}" name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" - # Create a request. Replace the placeholder values with actual data. + # Create a request. request = Google::Cloud::Storage::Control::V2::DisableAnywhereCacheRequest.new( name: name ) # The request disables the cache, but does not delete it. # The cache can be re-enabled later. - # Call the disable_anywhere_cache method. - result = storage_control_client.disable_anywhere_cache request - puts "AnywhereCache #{result.name} #{result.state}" + begin + result = storage_control_client.disable_anywhere_cache request + puts "AnywhereCache #{result.name} #{result.state}" + rescue StandardError => e + puts "Error disabling AnywhereCache: #{e.message}" + end end # [END storage_control_disable_anywhere_cache] disable_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb index 961b55893391..16003168343e 100644 --- a/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_get_anywhere_cache.rb @@ -13,16 +13,17 @@ # limitations under the License. # [START storage_control_get_anywhere_cache] +require "google/cloud/storage/control" + def get_anywhere_cache bucket_name:, anywhere_cache_id: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = "us-east1-b" - require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control.storage_control parent = "projects/_/buckets/#{bucket_name}" name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" @@ -33,9 +34,13 @@ def get_anywhere_cache bucket_name:, anywhere_cache_id: # The request retrieves the cache in the specified bucket. # The cache is identified by the specified ID. # The cache is in the specified bucket. - # Call the get_anywhere_cache method. - result = storage_control_client.get_anywhere_cache request - puts "AnywhereCache #{result.name}" + + begin + result = storage_control_client.get_anywhere_cache request + puts "AnywhereCache fetched - #{result.name}" + rescue StandardError => e + puts "Error fetching AnywhereCache: #{e.message}" + end end # [END storage_control_get_anywhere_cache] get_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb index 4e17cea3d53a..e97bfa494bdd 100644 --- a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb +++ b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb @@ -13,13 +13,14 @@ # limitations under the License. # [START storage_control_list_anywhere_caches] +require "google/cloud/storage/control" + def list_anywhere_caches bucket_name: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control.storage_control parent = "projects/_/buckets/#{bucket_name}" request = Google::Cloud::Storage::Control::V2::ListAnywhereCachesRequest.new( @@ -27,11 +28,13 @@ def list_anywhere_caches bucket_name: ) # The request lists all caches in the specified bucket. # The caches are identified by the specified bucket name. - # Call the list_anywhere_caches method. - result = storage_control_client.list_anywhere_caches request - - result.response.anywhere_caches.each do |item| - puts item.name + begin + result = storage_control_client.list_anywhere_caches request + result.response.anywhere_caches.each do |item| + puts item.name + end + rescue StandardError => e + puts "Error listing AnywhereCaches: #{e.message}" end end # [END storage_control_list_anywhere_caches] diff --git a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb index 7b8a9e1cb12a..c8ec52d798d9 100644 --- a/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_pause_anywhere_cache.rb @@ -13,16 +13,17 @@ # limitations under the License. # [START storage_control_pause_anywhere_cache] +require "google/cloud/storage/control" + def pause_anywhere_cache bucket_name:, anywhere_cache_id: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = "us-east1-b" - require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control.storage_control parent = "projects/_/buckets/#{bucket_name}" name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" @@ -33,9 +34,12 @@ def pause_anywhere_cache bucket_name:, anywhere_cache_id: # The request pauses the cache, but does not delete it. # The cache can be resumed later. # The cache is paused in the specified bucket. - # Call the pause_anywhere_cache method. - result = storage_control_client.pause_anywhere_cache request - puts "AnywhereCache #{result.name} #{result.state}" + begin + result = storage_control_client.pause_anywhere_cache request + puts "AnywhereCache #{result.name} #{result.state}" + rescue StandardError => e + puts "Error pausing AnywhereCache: #{e.message}" + end end # [END storage_control_pause_anywhere_cache] pause_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb index dec58b50c16c..ab05838de4b3 100644 --- a/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb @@ -13,29 +13,33 @@ # limitations under the License. # [START storage_control_resume_anywhere_cache] +require "google/cloud/storage/control" + def resume_anywhere_cache bucket_name:, anywhere_cache_id: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = "us-east1-b" - require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control.storage_control parent = "projects/_/buckets/#{bucket_name}" name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" - # Create a request. Replace the placeholder values with actual data. + # Create a request. request = Google::Cloud::Storage::Control::V2::ResumeAnywhereCacheRequest.new( name: name ) # The request resumes the cache, which was previously paused. # The cache is resumed in the specified bucket. # The cache is identified by the specified ID. - # Call the resume_anywhere_cache method. - result = storage_control_client.resume_anywhere_cache request - puts "AnywhereCache #{result.name} #{result.state}" + begin + result = storage_control_client.resume_anywhere_cache request + puts "AnywhereCache #{result.name} #{result.state}" + rescue StandardError => e + puts "Error resuming AnywhereCache: #{e.message}" + end end # [END storage_control_resume_anywhere_cache] resume_anywhere_cache bucket_name: ARGV.shift, anywhere_cache_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb index bf3a911d815d..e9621c3b15a7 100644 --- a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -13,6 +13,8 @@ # limitations under the License. # [START storage_control_update_anywhere_cache] +require "google/cloud/storage/control" + def update_anywhere_cache bucket_name:, anywhere_cache_id: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" @@ -22,7 +24,7 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id: require "google/cloud/storage/control/v2" # Create a client object. The client can be reused for multiple calls. - storage_control_client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new + storage_control_client = Google::Cloud::Storage::Control.storage_control parent = "projects/_/buckets/#{bucket_name}" name = "#{parent}/anywhereCaches/#{anywhere_cache_id}" @@ -31,20 +33,18 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id: ttl: 7200 ) mask = Google::Protobuf::FieldMask.new paths: ["ttl"] - # Create a request. Replace the placeholder values with actual data. + # Create a request. request = Google::Cloud::Storage::Control::V2::UpdateAnywhereCacheRequest.new( anywhere_cache: anywhere_cache, update_mask: mask ) # The request updates the cache in the specified bucket. # The cache is identified by the specified ID. - # Call the update_anywhere_cache method. - result = storage_control_client.update_anywhere_cache request - - if result.instance_of? Gapic::Operation + begin + result = storage_control_client.update_anywhere_cache request puts "AnywhereCache updated - #{result.name}" - else - puts "operation failed" + rescue StandardError => e + puts "Error updating AnywhereCache: #{e.message}" end end # [END storage_control_update_anywhere_cache] From 81b26efb626064363bf3e674b8351145ee605201 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Tue, 15 Jul 2025 07:59:56 +0000 Subject: [PATCH 018/457] fix lint --- .../samples/storage_control_list_anywhere_caches.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb index e97bfa494bdd..fa9bc2cd25d6 100644 --- a/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb +++ b/google-cloud-storage-control/samples/storage_control_list_anywhere_caches.rb @@ -29,10 +29,10 @@ def list_anywhere_caches bucket_name: # The request lists all caches in the specified bucket. # The caches are identified by the specified bucket name. begin - result = storage_control_client.list_anywhere_caches request - result.response.anywhere_caches.each do |item| - puts item.name - end + result = storage_control_client.list_anywhere_caches request + result.response.anywhere_caches.each do |item| + puts item.name + end rescue StandardError => e puts "Error listing AnywhereCaches: #{e.message}" end From 659374080f561f45ebd29c4e27c6276bf3829daa Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Fri, 1 Aug 2025 13:34:26 +0530 Subject: [PATCH 019/457] Update storage_control_update_anywhere_cache.rb --- .../samples/storage_control_update_anywhere_cache.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb index e9621c3b15a7..4496a56fe003 100644 --- a/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_update_anywhere_cache.rb @@ -18,7 +18,6 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id: # The ID of your GCS bucket # bucket_name = "your-unique-bucket-name" - # A value that, along with the bucket's name, uniquely identifies the cache # anywhere_cache_id = "us-east1-b" require "google/cloud/storage/control/v2" From ef421f82cc6b3e4972bc451be19c65900de3a03a Mon Sep 17 00:00:00 2001 From: Viacheslav Rostovtsev <58152857+viacheslav-rostovtsev@users.noreply.github.com> Date: Wed, 21 May 2025 12:54:25 -0700 Subject: [PATCH 020/457] feat: add Query explanation features for Ruby Firestore (#29469) --- .../firestore/query_explain_test.rb | 186 +++++++++++ .../lib/google/cloud/firestore/query.rb | 137 +++++++- .../cloud/firestore/query_explain_result.rb | 130 ++++++++ .../lib/google/cloud/firestore/service.rb | 8 +- .../cloud/firestore/query/explain_test.rb | 300 ++++++++++++++++++ .../google/cloud/firestore/query/get_test.rb | 131 ++++++++ google-cloud-firestore/test/helper.rb | 31 +- 7 files changed, 909 insertions(+), 14 deletions(-) create mode 100644 google-cloud-firestore/acceptance/firestore/query_explain_test.rb create mode 100644 google-cloud-firestore/lib/google/cloud/firestore/query_explain_result.rb create mode 100644 google-cloud-firestore/test/google/cloud/firestore/query/explain_test.rb diff --git a/google-cloud-firestore/acceptance/firestore/query_explain_test.rb b/google-cloud-firestore/acceptance/firestore/query_explain_test.rb new file mode 100644 index 000000000000..b4fba9004155 --- /dev/null +++ b/google-cloud-firestore/acceptance/firestore/query_explain_test.rb @@ -0,0 +1,186 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "firestore_helper" + +describe "Query Explain", :firestore_acceptance do + # Basic explain feature tests + it "runs a query with explain (analyze: false) - returns only metrics, no results" do + rand_query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents + rand_query_col.add({name: "Alice", population: 100}) + rand_query_col.add({name: "Bob", population: 200}) + rand_query_col.add({name: "Charlie", population: 300}) + + # Run a query with explain(analyze: false) + results = rand_query_col.explain + + # Should have no actual document results + _(results.to_a).must_be :empty? + + # But should have explain_metrics + _(results.explain_metrics).wont_be_nil + _(results.explain_metrics).must_be_kind_of Google::Cloud::Firestore::V1::ExplainMetrics + _(results.explain_metrics.plan_summary).wont_be_nil + end + + it "runs a query with explain (analyze: true) - returns both results and metrics" do + rand_query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents + rand_query_col.add({name: "Alice", population: 100}) + rand_query_col.add({name: "Bob", population: 200}) + rand_query_col.add({name: "Charlie", population: 300}) + + # Run a query with explain(analyze: true) + results = rand_query_col.explain analyze: true + + # Should have actual document results + _(results.count).must_equal 3 + + # And should have explain_metrics with both planning and execution data + _(results.explain_metrics).wont_be_nil + _(results.explain_metrics).must_be_kind_of Google::Cloud::Firestore::V1::ExplainMetrics + + # Verify metrics have proper structure (specific fields may vary based on implementation) + # This verifies that execution metrics are present (when analyze is true) + _(results.explain_metrics.plan_summary).wont_be_nil + _(results.explain_metrics.execution_stats).wont_be_nil + end + + it "returns explain_metrics only after full enumeration" do + rand_query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents + rand_query_col.add({name: "Alice", population: 100}) + rand_query_col.add({name: "Bob", population: 200}) + rand_query_col.add({name: "Charlie", population: 300}) + + # Run a query with explain(analyze: true) + results = rand_query_col.explain analyze: true + + # Before iteration, explain_metrics should be nil + _(results.metrics_fetched?).must_equal false + + # Get just the first element + first = results.first + _(first).wont_be_nil + + # fetching the first element should populate explain_metrics + _(results.explain_metrics).wont_be_nil + _(results.metrics_fetched?).must_equal true + + # Force complete enumeration + all_results = results.to_a + + # Now explain_metrics should be populated + _(results.explain_metrics).wont_be_nil + _(results.explain_metrics).must_be_kind_of Google::Cloud::Firestore::V1::ExplainMetrics + end + + # Limit test - standard limit + it "works with limit and analyze: true" do + rand_query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents + rand_query_col.add({name: "Alice", population: 100}) + rand_query_col.add({name: "Bob", population: 200}) + rand_query_col.add({name: "Charlie", population: 300}) + + # Run a query with limit and explain(analyze: true) + results = rand_query_col.order(:population).limit(2).explain analyze: true + + # Should respect the limit + _(results.count).must_equal 2 + + # Verify correct ordering and limit + names = results.map { |doc| doc[:name] } + _(names).must_equal ["Alice", "Bob"] + + # And should have explain_metrics + _(results.explain_metrics).wont_be_nil + end + + # Limit_to_last test - special case because of reversing + it "works with limit_to_last and analyze: true" do + rand_query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents + rand_query_col.add({name: "Alice", population: 100}) + rand_query_col.add({name: "Bob", population: 200}) + rand_query_col.add({name: "Charlie", population: 300}) + + # Run a query with limit_to_last and explain(analyze: true) + results = rand_query_col.order(:population).limit_to_last(2).explain analyze: true + + # Should respect the limit_to_last + _(results.count).must_equal 2 + + # Verify correct ordering - should be the last 2 items + names = results.map { |doc| doc[:name] } + _(names).must_equal ["Bob", "Charlie"] + + # And should have explain_metrics + _(results.explain_metrics).wont_be_nil + end + + # Compatibility and edge cases + it "handles empty result sets with analyze: true" do + rand_query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents that won't match our filter + rand_query_col.add({name: "Alice", population: 100}) + rand_query_col.add({name: "Bob", population: 200}) + + # Run a query with filter that returns no results + results = rand_query_col.where(:population, :>, 1000).explain analyze: true + + # Should have no results + _(results.to_a).must_be :empty? + + # But should still have explain_metrics + _(results.explain_metrics).wont_be_nil + end + + it "works with order and limit" do + rand_query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents + rand_query_col.add({name: "Alice", population: 100}) + rand_query_col.add({name: "Bob", population: 200}) + rand_query_col.add({name: "Charlie", population: 300}) + + results = rand_query_col.order(:population).limit(2).explain analyze: true + _(results.count).must_equal 2 + _(results.explain_metrics).wont_be_nil + end + + it "doesn't produce different results from queries without explain" do + rand_query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents + rand_query_col.add({name: "Alice", population: 100}) + rand_query_col.add({name: "Bob", population: 200}) + rand_query_col.add({name: "Charlie", population: 300}) + + # Run identical queries with and without explain(analyze: true) + results_with_explain = rand_query_col.order(:population).explain analyze: true + results_without_explain = rand_query_col.order(:population).get + + # Both should return the same document count + _(results_with_explain.count).must_equal results_without_explain.count + + # Both should return the same document content in the same order + names_with_explain = results_with_explain.map { |doc| doc[:name] } + names_without_explain = results_without_explain.map { |doc| doc[:name] } + _(names_with_explain).must_equal names_without_explain + + # Only the explain query should have metrics + _(results_with_explain.explain_metrics).wont_be_nil + _(results_without_explain).wont_respond_to :explain_metrics + end +end \ No newline at end of file diff --git a/google-cloud-firestore/lib/google/cloud/firestore/query.rb b/google-cloud-firestore/lib/google/cloud/firestore/query.rb index 9e0fd6f2958d..25781072680b 100644 --- a/google-cloud-firestore/lib/google/cloud/firestore/query.rb +++ b/google-cloud-firestore/lib/google/cloud/firestore/query.rb @@ -20,6 +20,7 @@ require "google/cloud/firestore/aggregate_query" require "google/cloud/firestore/filter" require "json" +require "google/cloud/firestore/query_explain_result" module Google module Cloud @@ -79,6 +80,12 @@ class Query ## # @private Creates a new Query. + # + # @param [Google::Cloud::Firestore::V1::StructuredQuery] query The structured query object. + # @param [String] parent_path The parent path for the query. + # @param [Google::Cloud::Firestore::Client] client The firestore client object. + # @param [Symbol] limit_type (Optional) The type of limit query (:first or :last). + # Defaults to `nil` if not provided. def initialize query, parent_path, client, limit_type: nil query ||= StructuredQuery.new @query = query @@ -135,7 +142,7 @@ def select *fields new_query.select.fields << field_ref end - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -171,7 +178,7 @@ def all_descendants new_query.from.last.all_descendants = true - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -207,7 +214,7 @@ def direct_descendants new_query.from.last.all_descendants = false - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -305,7 +312,7 @@ def where filter_or_field = nil, operator = nil, value = nil add_filters_to_query new_query, new_filter.filter end - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -373,7 +380,7 @@ def order field, direction = :asc direction: order_direction(direction) ) - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end alias order_by order @@ -406,7 +413,7 @@ def offset num new_query.offset = num - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -443,7 +450,7 @@ def limit num new_query.limit = Google::Protobuf::Int32Value.new value: num - Query.start new_query, parent_path, client, limit_type: :first + start_new_query new_query, limit_type_override: :first end ## @@ -503,7 +510,7 @@ def limit_to_last num new_query.limit = Google::Protobuf::Int32Value.new value: num - Query.start new_query, parent_path, client, limit_type: :last + start_new_query new_query, limit_type_override: :last end ## @@ -611,7 +618,7 @@ def start_at *values cursor.before = true new_query.start_at = cursor - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -720,7 +727,7 @@ def start_after *values cursor.before = false new_query.start_at = cursor - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -829,7 +836,7 @@ def end_before *values cursor.before = true new_query.end_at = cursor - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -938,7 +945,7 @@ def end_at *values cursor.before = false new_query.end_at = cursor - Query.start new_query, parent_path, client, limit_type: limit_type + start_new_query new_query end ## @@ -1001,6 +1008,83 @@ def get read_time: nil end alias run get + ## + # Retrieves the query explanation for the query. + # By default the query is only planned, not executed. returning only metrics from the + # planning stages. If `analyze` is set to `true` the query will be planned and executed, + # returning the full query results alongside both planning and execution stage metrics. + # + # Unlike the Enumerator object that is returned from the `Query#get`, + # iterating over QueryExplainResult multiple times will not result in + # multiple requests to the server. The first set of results will be saved + # and re-used instead. + # This is to avoid the situations where the metrics change unpredictably when results are looked at. + # + # @param [Time] read_time Reads documents as they were at the given time. + # This may not be older than 270 seconds. Optional + # + # @param [Boolean] analyze + # Whether to execute the query and return the execution stage metrics + # in addition to planning metrics. + # If set to `false` the query will be planned only and will return planning + # stage metrics without results. + # If set to `true` the query will be executed, and will return the query results, + # planning stage metrics, and execution stage metrics. + # Defaults to `false`. + # + # @example Iterating over results multiple times + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # query = firestore.col(:cities).where(:population, :>, 100000) + # explanation_result = query.explain analyze: true + # results = explanation_result.to_a + # results_2 = explanation_result.to_a # same results, no re-query + # + # @return [QueryExplainResult] + # + # @example Getting only the planning stage metrics for the query + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # query = firestore.col(:cities).where(:population, :>, 100000) + # + # # Get the execution plan without running the query + # explain_result = query.explain + # metrics = explain_result.explain_metrics + # puts "Plan summary: #{metrics.plan_summary}" if metrics&.plan_summary + # + # @example Getting planning and execution stage metrics, as well as query results + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # query = firestore.col(:cities).where(:population, :>, 100000) + # + # # Run the query and return metrics from the planning and execution stages + # explain_result = query.explain analyze: true + # metrics = explain_result.explain_metrics + # puts "Plan summary: #{metrics.plan_summary}" if metrics&.plan_summary + # puts "Results returned: #{metrics.execution_stats.results_returned}" if metrics&.execution_stats + # results = explain_result.to_a + # + def explain read_time: false, analyze: false + ensure_service! + + # Validate analyze parameter + unless [true, false].include? analyze + raise ArgumentError, "analyze must be a boolean" + end + + explain_options = ::Google::Cloud::Firestore::V1::ExplainOptions.new + explain_options.analyze = analyze + + results = service.run_query parent_path, @query, read_time: read_time, explain_options: explain_options + + # Reverse the results for Query#limit_to_last queries since that method reversed the order_by directions. + results = results.to_a.reverse if limit_type == :last + QueryExplainResult.new results, client + end + ## # Creates an AggregateQuery object for the query. # @@ -1117,12 +1201,41 @@ def self.from_json json, client ## # @private Start a new Query. + # + # This method creates and returns a new `Query` instance, initializing it with the provided parameters. + # + # @param [Google::Cloud::Firestore::V1::StructuredQuery] query + # The structured query object representing the query to be executed. + # @param [String] parent_path + # The parent path of the collection or document the query is operating on. + # @param [Google::Cloud::Firestore::Client] client + # The Firestore client instance. + # @param [Symbol, nil] limit_type + # (Optional) The type of limit to apply to the query results, either `:first` or `:last`. + # Defaults to `nil` if no limit is applied. + # @return [Google::Cloud::Firestore::Query] + # A new `Query` instance initialized with the given parameters. def self.start query, parent_path, client, limit_type: nil new query, parent_path, client, limit_type: limit_type end protected + ## + # @private Helper for starting a new query copying existing parameters. + # + # @param [Google::Cloud::Firestore::V1::StructuredQuery] new_query + # The new structured query object. + # @param [Symbol] limit_type_override The limit type override for the new query + # + # @return [Query] A new query + def start_new_query new_query, limit_type_override: nil + Query.start(new_query, + parent_path, + client, + limit_type: limit_type_override || limit_type) + end + ## # @private StructuredQuery = Google::Cloud::Firestore::V1::StructuredQuery diff --git a/google-cloud-firestore/lib/google/cloud/firestore/query_explain_result.rb b/google-cloud-firestore/lib/google/cloud/firestore/query_explain_result.rb new file mode 100644 index 000000000000..280370639952 --- /dev/null +++ b/google-cloud-firestore/lib/google/cloud/firestore/query_explain_result.rb @@ -0,0 +1,130 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + + +module Google + module Cloud + module Firestore + ## + # # QueryExplainResult + # + # Represents the result of a Firestore query explanation. This class + # provides an enumerable interface to iterate over the {DocumentSnapshot} + # results (if the explanation was run with `analyze: true`) and allows + # access to the {Google::Cloud::Firestore::V1::ExplainMetrics} which + # contain details about the query plan and execution statistics. + # + # Unlike the Enumerator object that is returned from the `Query#get`, + # iterating over QueryExplainResult multiple times will not result in + # multiple requests to the server. The first set of results will be saved + # and re-used instead. + # + # This is to avoid the situations where the metrics do not correspond to the results + # if results are partially re-enumerated + # + # @see Query#explain + # + # @example Iterating over results and accessing metrics + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # query = firestore.col(:cities).where(:population, :>, 100000) + # + # # Run the query and return metrics from the planning and execution stages + # explanation_result = query.explain analyze: true + # + # explanation_result.each do |city_snapshot| + # puts "City: #{city_snapshot.document_id}, Population: #{city_snapshot[:population]}" + # end + # + # metrics = explanation_result.explain_metrics + # puts "Results returned: #{metrics.execution_stats.results_returned}" if metrics&.execution_stats + # + # @example Fetching metrics directly (which also iterates internally if needed) + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # query = firestore.col(:cities).where(:population, :>, 100000) + # + # # Get the execution plan without running the query (or with analyze: true) + # explanation_result = query.explain analyze: false # or true + # + # metrics = explanation_result.explain_metrics + # puts "Plan summary: #{metrics.plan_summary}" if metrics&.plan_summary + # puts "Results returned: #{metrics.execution_stats.results_returned}" if metrics&.execution_stats + # + # @example Iterating over results multiple times + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # query = firestore.col(:cities).where(:population, :>, 100000) + # explanation_result = query.explain analyze: true + # results = explanation_result.to_a + # results_2 = explanation_result.to_a # same results, no re-query + # + ## + class QueryExplainResult + include Enumerable + + # Indicates whether the {#explain_metrics} have been populated. + # This becomes `true` after iterating through the results (e.g., via {#each}) + # or by explicitly calling {#explain_metrics}. + # + # @return [Boolean] `true` if metrics are populated, `false` otherwise. + attr_reader :metrics_fetched + alias metrics_fetched? metrics_fetched + + # @private Creates a new QueryRunResult. + def initialize results_enum, client + @results_enum = results_enum + @client = client + @metrics_fetched = false + end + + # The metrics from planning and execution stages of the query. + # Calling this the first time will enumerate and cache all results as well as cache the metrics. + # + # Subsequent calls will return the cached value. + # + # @return [Google::Cloud::Firestore::V1::ExplainMetrics] The query explanation metrics. + def explain_metrics + # rubocop:disable Lint/EmptyBlock + each {} unless metrics_fetched? + # rubocop:enable Lint/EmptyBlock + @explain_metrics + end + + # Iterates over the document snapshots returned by the query explanation + # if `analyze: true` was used. If `analyze: false` was used, this + # method will still iterate but will not yield any documents, though it + # will populate the query explanation metrics. + # + # @yieldparam [DocumentSnapshot] snapshot A document snapshot from the query results. + # @return [Enumerator] If no block is given. + def each + return enum_for :each unless block_given? + @results ||= @results_enum.to_a + + @results.each do |result| + @explain_metrics ||= result.explain_metrics if result.explain_metrics + @metrics_fetched = !@explain_metrics.nil? + next if result.document.nil? + + yield DocumentSnapshot.from_query_result(result, @client) + end + end + end + end + end +end diff --git a/google-cloud-firestore/lib/google/cloud/firestore/service.rb b/google-cloud-firestore/lib/google/cloud/firestore/service.rb index c12b2ac24824..429d2084d96b 100644 --- a/google-cloud-firestore/lib/google/cloud/firestore/service.rb +++ b/google-cloud-firestore/lib/google/cloud/firestore/service.rb @@ -120,20 +120,26 @@ def partition_query parent, query_grpc, partition_count, token: nil, max: nil, r paged_enum.response end - def run_query path, query_grpc, transaction: nil, read_time: nil + def run_query path, query_grpc, transaction: nil, read_time: nil, explain_options: nil run_query_req = { parent: path, structured_query: query_grpc } + if transaction.is_a? String run_query_req[:transaction] = transaction elsif transaction run_query_req[:new_transaction] = transaction end + if read_time run_query_req[:read_time] = read_time_to_timestamp(read_time) end + if explain_options + run_query_req[:explain_options] = explain_options + end + firestore.run_query run_query_req, call_options(parent: database_path) end diff --git a/google-cloud-firestore/test/google/cloud/firestore/query/explain_test.rb b/google-cloud-firestore/test/google/cloud/firestore/query/explain_test.rb new file mode 100644 index 000000000000..50eb69ea0da7 --- /dev/null +++ b/google-cloud-firestore/test/google/cloud/firestore/query/explain_test.rb @@ -0,0 +1,300 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "helper" + +describe Google::Cloud::Firestore::Query, :explain_options, :mock_firestore do + let(:query) { Google::Cloud::Firestore::Query.start nil, "#{firestore.path}/documents", firestore } + let(:read_time) { Time.now } + let :query_results_enum do + [ + Google::Cloud::Firestore::V1::RunQueryResponse.new( + read_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time), + document: Google::Cloud::Firestore::V1::Document.new( + name: "projects/#{project}/databases/(default)/documents/users/alice", + fields: { "name" => Google::Cloud::Firestore::V1::Value.new(string_value: "Alice") }, + create_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time), + update_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time) + )), + Google::Cloud::Firestore::V1::RunQueryResponse.new( + read_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time), + document: Google::Cloud::Firestore::V1::Document.new( + name: "projects/#{project}/databases/(default)/documents/users/carol", + fields: { "name" => Google::Cloud::Firestore::V1::Value.new(string_value: "Bob") }, + create_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time), + update_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time) + ), + explain_metrics: Google::Cloud::Firestore::V1::ExplainMetrics.new() + ) + ].to_enum + end + + it "runs query with explain options (analyze: false)" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]) + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: false) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + results = query.select(:name).explain + # Results and metrics are not fetched at first + refute results.metrics_fetched? + + results_enum = results.to_enum + assert_results_enum results_enum + + # Enumerating the results fetches the metrics + assert results.metrics_fetched? + end + + it "runs query with explain options (analyze: false)" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]) + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: false) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + results = query.select(:name).explain + + # Results and metrics are not fetched at first + refute results.metrics_fetched? + + # accessing metrics fetches metrics and results + metrics = results.explain_metrics + refute_nil metrics + assert results.metrics_fetched? + + assert_results_enum results.to_enum + end + + it "runs query with explain options (analyze: true)" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]) + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: true) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + results_enum = query.select(:name).explain(analyze: true).to_enum + assert_results_enum results_enum + end + + it "returns same results without re-querying" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]) + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: true) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + results = query.select(:name).explain(analyze: true) + + assert_results_enum results.to_a.to_enum + assert_results_enum results.to_a.to_enum # second call to to_a does not result in a second call to mock + end + + it "runs query with explain and order_by" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + order_by: [ + Google::Cloud::Firestore::V1::StructuredQuery::Order.new( + field: Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "age"), + direction: :ASCENDING + ) + ] + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: false) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + results_enum = query.order(:age).explain.to_enum + assert_results_enum results_enum + end + + # Test explain with limit + it "runs query with explain and limit" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + limit: Google::Protobuf::Int32Value.new(value: 5) + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: false) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + results_enum = query.limit(5).explain.to_enum + assert_results_enum results_enum + end + + # Test explain with limit_to_last + it "runs query with explain and limit_to_last" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + limit: Google::Protobuf::Int32Value.new(value: 5), + order_by: [ + Google::Cloud::Firestore::V1::StructuredQuery::Order.new( + field: Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "__name__"), + direction: :DESCENDING + ) + ] + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: false) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + # Need to start with an order for limit_to_last to work + results_enum = query.order("__name__").limit_to_last(5).explain.to_enum + + # The query enumerator will reverse the results for limit_to_last so we have to undo that for verification + reversed_results_enum = results_enum.to_a.reverse.to_enum + assert_results_enum reversed_results_enum + end + + it "runs query with explain and start_at field value" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + start_at: Google::Cloud::Firestore::V1::Cursor.new( + values: [Google::Cloud::Firestore::Convert.raw_to_value("Alice")], + before: true + ), + order_by: [ + Google::Cloud::Firestore::V1::StructuredQuery::Order.new( + field: Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name"), + direction: :ASCENDING + ) + ] + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: false) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + results_enum = query.order("name").start_at("Alice").explain.to_enum + assert_results_enum results_enum + end + + # Test explain with end_at cursor using field values instead of document snapshot + it "runs query with explain and end_at field value" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + end_at: Google::Cloud::Firestore::V1::Cursor.new( + values: [Google::Cloud::Firestore::Convert.raw_to_value("Bob")], + before: false + ), + order_by: [ + Google::Cloud::Firestore::V1::StructuredQuery::Order.new( + field: Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name"), + direction: :ASCENDING + ) + ] + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: false) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query, explain_options: explain_options) + + results_enum = query.order("name").end_at("Bob").explain.to_enum + assert_results_enum results_enum + end + + + it "raises an error when explain is called with invalid analyze parameter" do + # Test with a non-boolean parameter + error = assert_raises ArgumentError do + query.select(:name).explain(analyze: "true") + end + _(error.message).must_match(/analyze must be a boolean/) + + # Test with nil parameter + error = assert_raises ArgumentError do + query.select(:name).explain(analyze: nil) + end + _(error.message).must_match(/analyze must be a boolean/) + + # Test with something other than analyze parameter + error = assert_raises ArgumentError do + query.select(:name).explain(invalid_param: true) + end + _(error.message).must_match(/unknown keyword/) + end + + it "does eagerly read all documents when analyze: true and taking one" do + exploding_enum = ExplodingEnum.new query_results_enum + + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]) + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: true) + + firestore_mock.expect :run_query, exploding_enum, run_query_args(expected_query, explain_options: explain_options) + + assert_raises RuntimeError do + results_enum = query.select(:name).explain(analyze: true).to_enum + first_doc = results_enum.first + end + end + + it "does eagerly read all documents when analyze: true and taking one with limit_to_last" do + exploding_enum = ExplodingEnum.new query_results_enum + + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + limit: Google::Protobuf::Int32Value.new(value: 5), + order_by: [ + Google::Cloud::Firestore::V1::StructuredQuery::Order.new( + field: Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "__name__"), + direction: :DESCENDING + ) + ] + ) + explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: true) + + firestore_mock.expect :run_query, exploding_enum, run_query_args(expected_query, explain_options: explain_options) + + # Need to start with an order for limit_to_last to work + assert_raises RuntimeError do + results_enum = query.order("__name__").limit_to_last(5).explain(analyze: true).to_enum + first_doc = results_enum.first + end + end + + def assert_results_enum enum + _(enum).must_be_kind_of Enumerator + + results = enum.to_a + _(results.count).must_equal 2 + + results.each do |result| + _(result).must_be_kind_of Google::Cloud::Firestore::DocumentSnapshot + + _(result.ref).must_be_kind_of Google::Cloud::Firestore::DocumentReference + _(result.ref.client).must_equal firestore + + _(result.parent).must_be_kind_of Google::Cloud::Firestore::CollectionReference + _(result.parent.collection_id).must_equal "users" + _(result.parent.collection_path).must_equal "users" + _(result.parent.client).must_equal firestore + end + + _(results.first.data).must_be_kind_of Hash + _(results.first.data).must_equal({ name: "Alice" }) + _(results.first.created_at).must_equal read_time + _(results.first.updated_at).must_equal read_time + _(results.first.read_at).must_equal read_time + + _(results.last.data).must_be_kind_of Hash + _(results.last.data).must_equal({ name: "Bob" }) + _(results.last.created_at).must_equal read_time + _(results.last.updated_at).must_equal read_time + _(results.last.read_at).must_equal read_time + end +end diff --git a/google-cloud-firestore/test/google/cloud/firestore/query/get_test.rb b/google-cloud-firestore/test/google/cloud/firestore/query/get_test.rb index ecb893452fe7..6d1a70c11ada 100644 --- a/google-cloud-firestore/test/google/cloud/firestore/query/get_test.rb +++ b/google-cloud-firestore/test/google/cloud/firestore/query/get_test.rb @@ -50,6 +50,21 @@ assert_results_enum results_enum end + it "re-queries Firestore every time the get results are enumerated" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]) + ) + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query) + + results_enum = query.select(:name).get + assert_results_enum results_enum + + # second iteration through enum results in a second call to firestore_mock + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query) + assert_results_enum results_enum + end + it "gets a query with a single select and read time set" do expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( @@ -301,6 +316,122 @@ assert_results_enum results_enum end + + it "gets a query with limit_last" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]), + order_by: [ + Google::Cloud::Firestore::V1::StructuredQuery::Order.new( + field: Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name"), + direction: :DESCENDING)], + limit: Google::Protobuf::Int32Value.new(value: 2) + ) + + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query) + # Later calls to `first` and `to_a` will result in separate firestore mock reads + firestore_mock.expect :run_query, query_results_enum, run_query_args(expected_query) + + results_enum = query.select(:name).order_by(:name).limit_to_last(2).get + _(results_enum).must_be_kind_of Enumerator + + # The results are reverted with limit_last, so "Bob" becomes the first result + first = results_enum.first + _(first).must_be_kind_of Google::Cloud::Firestore::DocumentSnapshot + _(first.data).must_equal({ name: "Bob" }) + + results = results_enum.to_a + _(results.last).must_be_kind_of Google::Cloud::Firestore::DocumentSnapshot + _(results.last.data).must_equal({ name: "Alice" }) + end + + it "does not eagerly read without `limit_last`" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]) + ) + firestore_mock.expect(:run_query, ExplodingEnum.new(query_results_enum), run_query_args(expected_query)) + # Later calls to `first` and `to_a` will result in separate firestore mock reads + firestore_mock.expect(:run_query, ExplodingEnum.new(query_results_enum), run_query_args(expected_query)) + + results_enum = query.select(:name).get + _(results_enum).must_be_kind_of Enumerator + + first = results_enum.first + _(first).must_be_kind_of Google::Cloud::Firestore::DocumentSnapshot + + assert_raises(RuntimeError) { results_enum.to_a } + end + + it "does eagerly read the whole enum with `limit_last` when first entry is read" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]), + order_by: [ + Google::Cloud::Firestore::V1::StructuredQuery::Order.new( + field: Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name"), + direction: :DESCENDING)], + limit: Google::Protobuf::Int32Value.new(value: 2) + ) + + firestore_mock.expect :run_query, ExplodingEnum.new(query_results_enum), run_query_args(expected_query) + + results_enum = query.select(:name).order_by(:name).limit_to_last(2).get + _(results_enum).must_be_kind_of Enumerator + + assert_raises(RuntimeError) { results_enum.first } + end + + it "gets a query with explanation" do + expected_query = Google::Cloud::Firestore::V1::StructuredQuery.new( + select: Google::Cloud::Firestore::V1::StructuredQuery::Projection.new( + fields: [Google::Cloud::Firestore::V1::StructuredQuery::FieldReference.new(field_path: "name")]) + ) + expected_explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: true) + + query_result_metrics = Google::Cloud::Firestore::V1::ExplainMetrics.new( + plan_summary: Google::Cloud::Firestore::V1::PlanSummary.new( + indexes_used: [ + + ] + ), + execution_stats: Google::Cloud::Firestore::V1::ExecutionStats.new( + results_returned: 2 + ) + ) + + query_results_with_explanation = [ + Google::Cloud::Firestore::V1::RunQueryResponse.new( + read_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time), + document: Google::Cloud::Firestore::V1::Document.new( + name: "projects/#{project}/databases/(default)/documents/users/alice", + fields: { "name" => Google::Cloud::Firestore::V1::Value.new(string_value: "Alice") }, + create_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time), + update_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time) + )), + Google::Cloud::Firestore::V1::RunQueryResponse.new( + explain_metrics: query_result_metrics, + read_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time), + document: Google::Cloud::Firestore::V1::Document.new( + name: "projects/#{project}/databases/(default)/documents/users/bob", + fields: { "name" => Google::Cloud::Firestore::V1::Value.new(string_value: "Bob") }, + create_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time), + update_time: Google::Cloud::Firestore::Convert.time_to_timestamp(read_time) + )) + ].to_enum + + firestore_mock.expect :run_query, query_results_with_explanation, run_query_args(expected_query, explain_options: expected_explain_options) + + explain_result = query.select(:name).explain(analyze: true) + + _(explain_result).must_be_kind_of Google::Cloud::Firestore::QueryExplainResult + + _(explain_result.metrics_fetched?).must_equal false + _(explain_result.explain_metrics).must_equal query_result_metrics + _(explain_result.metrics_fetched?).must_equal true + + assert_results_enum explain_result.to_enum + end def assert_results_enum enum _(enum).must_be_kind_of Enumerator diff --git a/google-cloud-firestore/test/helper.rb b/google-cloud-firestore/test/helper.rb index 04a7001b6f1a..5f3948f24313 100644 --- a/google-cloud-firestore/test/helper.rb +++ b/google-cloud-firestore/test/helper.rb @@ -126,6 +126,33 @@ def batch_write_fail_resp size = 20, code: nil, message: nil end end +## +# Used to test the moment the enum is reverted (and therefore read) +# for `limit_last` queries + +class ExplodingEnum + include Enumerable + + def initialize responses, explode_on: 1 + raise if !responses.to_a.empty? && responses.first.nil? + + @responses = responses.to_a + @explode_on = explode_on + end + + def each + return enum_for(:each) unless block_given? + + @responses.each_with_index do |response, index| + if index >= @explode_on + raise "BOOM! Attempted to read past allowed count (allowed: #{@explode_on}, tried index: #{index})." + end + + yield response + end + end +end + class MockFirestore < Minitest::Spec let(:project) { "projectID" } let(:database) { "(default)" } @@ -209,7 +236,8 @@ def run_query_args query, parent: "projects/#{project}/databases/(default)/documents", transaction: nil, new_transaction: nil, - read_time: nil + read_time: nil, + explain_options: nil req = { parent: parent, structured_query: query @@ -217,6 +245,7 @@ def run_query_args query, req[:transaction] = transaction if transaction req[:new_transaction] = new_transaction if new_transaction req[:read_time] = firestore.service.read_time_to_timestamp(read_time) if read_time + req[:explain_options] = explain_options if explain_options [req, default_options] end From 6d09be1f479c4551865799ce9afa9fcc47b63804 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 14:02:03 -0700 Subject: [PATCH 021/457] chore(main): release google-shopping-merchant-order_tracking-v1beta 0.1.0 (#30427) --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- .../CHANGELOG.md | 9 ++++++++- .../shopping/merchant/order_tracking/v1beta/version.rb | 2 +- ...ta_google.shopping.merchant.ordertracking.v1beta.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b628da879972..8a6ae9499d9c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -929,7 +929,7 @@ "google-shopping-merchant-notifications-v1beta+FILLER": "0.0.0", "google-shopping-merchant-order_tracking": "0.0.1", "google-shopping-merchant-order_tracking+FILLER": "0.0.0", - "google-shopping-merchant-order_tracking-v1beta": "0.0.1", + "google-shopping-merchant-order_tracking-v1beta": "0.1.0", "google-shopping-merchant-order_tracking-v1beta+FILLER": "0.0.0", "google-shopping-merchant-products": "0.2.2", "google-shopping-merchant-products+FILLER": "0.0.0", diff --git a/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json b/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json index 507d94da3767..0ed7c584e741 100644 --- a/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json +++ b/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1BETA API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-order_tracking-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking instead. See the readme for more details.", diff --git a/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md b/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md index f88957a62ba2..ae38c6b567f5 100644 --- a/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md +++ b/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-21) + +#### Features + +* Initial generation of google-shopping-merchant-order_tracking-v1beta ([#30411](https://github.com/googleapis/google-cloud-ruby/issues/30411)) + +## Release History diff --git a/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb b/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb index e7b337881b5b..33de8ff9b5c9 100644 --- a/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb +++ b/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module OrderTracking module V1beta - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json b/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json index ad8adf5a1e92..6af952ebabe7 100644 --- a/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json +++ b/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-order_tracking-v1beta", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 86daad2a8ce6edc4b95b1715593bb5dea3a476c9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 14:02:16 -0700 Subject: [PATCH 022/457] chore(main): release google-shopping-merchant-order_tracking 0.1.0 (#30426) --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-shopping-merchant-order_tracking/CHANGELOG.md | 9 ++++++++- .../google/shopping/merchant/order_tracking/version.rb | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8a6ae9499d9c..bd00129cdcc3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -927,7 +927,7 @@ "google-shopping-merchant-notifications+FILLER": "0.0.0", "google-shopping-merchant-notifications-v1beta": "0.4.0", "google-shopping-merchant-notifications-v1beta+FILLER": "0.0.0", - "google-shopping-merchant-order_tracking": "0.0.1", + "google-shopping-merchant-order_tracking": "0.1.0", "google-shopping-merchant-order_tracking+FILLER": "0.0.0", "google-shopping-merchant-order_tracking-v1beta": "0.1.0", "google-shopping-merchant-order_tracking-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-order_tracking/.repo-metadata.json b/google-shopping-merchant-order_tracking/.repo-metadata.json index 64004baa6037..0019ae9f64d8 100644 --- a/google-shopping-merchant-order_tracking/.repo-metadata.json +++ b/google-shopping-merchant-order_tracking/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.", diff --git a/google-shopping-merchant-order_tracking/CHANGELOG.md b/google-shopping-merchant-order_tracking/CHANGELOG.md index f88957a62ba2..9e3c8b5e11ac 100644 --- a/google-shopping-merchant-order_tracking/CHANGELOG.md +++ b/google-shopping-merchant-order_tracking/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-21) + +#### Features + +* Initial generation of google-shopping-merchant-order_tracking ([#30415](https://github.com/googleapis/google-cloud-ruby/issues/30415)) + +## Release History diff --git a/google-shopping-merchant-order_tracking/lib/google/shopping/merchant/order_tracking/version.rb b/google-shopping-merchant-order_tracking/lib/google/shopping/merchant/order_tracking/version.rb index 6bfcf220acdf..6cad099e4f41 100644 --- a/google-shopping-merchant-order_tracking/lib/google/shopping/merchant/order_tracking/version.rb +++ b/google-shopping-merchant-order_tracking/lib/google/shopping/merchant/order_tracking/version.rb @@ -21,7 +21,7 @@ module Google module Shopping module Merchant module OrderTracking - VERSION = "0.0.1" + VERSION = "0.1.0" end end end From a0be8506cb3a46acdcb02e771fee985f8943f8ba Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 14:02:50 -0700 Subject: [PATCH 023/457] chore(main): release google-cloud-device_streaming 0.1.0 (#30421) --- .release-please-manifest.json | 2 +- google-cloud-device_streaming/.repo-metadata.json | 2 +- google-cloud-device_streaming/CHANGELOG.md | 9 ++++++++- .../lib/google/cloud/device_streaming/version.rb | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bd00129cdcc3..badf0f15236f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -315,7 +315,7 @@ "google-cloud-developer_connect+FILLER": "0.0.0", "google-cloud-developer_connect-v1": "1.1.0", "google-cloud-developer_connect-v1+FILLER": "0.0.0", - "google-cloud-device_streaming": "0.0.1", + "google-cloud-device_streaming": "0.1.0", "google-cloud-device_streaming+FILLER": "0.0.0", "google-cloud-device_streaming-v1": "0.0.1", "google-cloud-device_streaming-v1+FILLER": "0.0.0", diff --git a/google-cloud-device_streaming/.repo-metadata.json b/google-cloud-device_streaming/.repo-metadata.json index f7f8576ee72b..4c703bcff6f5 100644 --- a/google-cloud-device_streaming/.repo-metadata.json +++ b/google-cloud-device_streaming/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "devicestreaming", "name_pretty": "Device Streaming API", "product_documentation": "https://cloud.google.com/device-streaming/docs", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Cloud API for device streaming usage.", diff --git a/google-cloud-device_streaming/CHANGELOG.md b/google-cloud-device_streaming/CHANGELOG.md index f88957a62ba2..eeae17becd52 100644 --- a/google-cloud-device_streaming/CHANGELOG.md +++ b/google-cloud-device_streaming/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-21) + +#### Features + +* Initial generation of google-cloud-device_streaming ([#30413](https://github.com/googleapis/google-cloud-ruby/issues/30413)) + +## Release History diff --git a/google-cloud-device_streaming/lib/google/cloud/device_streaming/version.rb b/google-cloud-device_streaming/lib/google/cloud/device_streaming/version.rb index cbbea5f89ee7..4499e22eb396 100644 --- a/google-cloud-device_streaming/lib/google/cloud/device_streaming/version.rb +++ b/google-cloud-device_streaming/lib/google/cloud/device_streaming/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module DeviceStreaming - VERSION = "0.0.1" + VERSION = "0.1.0" end end end From eb100d662f848b259c815c28aafaa8f44750ede2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 14:03:04 -0700 Subject: [PATCH 024/457] chore(main): release google-cloud-device_streaming-v1 0.1.0 (#30422) --- .release-please-manifest.json | 2 +- google-cloud-device_streaming-v1/.repo-metadata.json | 2 +- google-cloud-device_streaming-v1/CHANGELOG.md | 9 ++++++++- .../lib/google/cloud/device_streaming/v1/version.rb | 2 +- ...snippet_metadata_google.cloud.devicestreaming.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index badf0f15236f..5da4a6cd4bd2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -317,7 +317,7 @@ "google-cloud-developer_connect-v1+FILLER": "0.0.0", "google-cloud-device_streaming": "0.1.0", "google-cloud-device_streaming+FILLER": "0.0.0", - "google-cloud-device_streaming-v1": "0.0.1", + "google-cloud-device_streaming-v1": "0.1.0", "google-cloud-device_streaming-v1+FILLER": "0.0.0", "google-cloud-dialogflow": "1.11.1", "google-cloud-dialogflow+FILLER": "0.0.0", diff --git a/google-cloud-device_streaming-v1/.repo-metadata.json b/google-cloud-device_streaming-v1/.repo-metadata.json index 50c32634b753..8999c7f65a50 100644 --- a/google-cloud-device_streaming-v1/.repo-metadata.json +++ b/google-cloud-device_streaming-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "devicestreaming", "name_pretty": "Device Streaming V1 API", "product_documentation": "https://cloud.google.com/device-streaming/docs", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Cloud API for device streaming usage. Note that google-cloud-device_streaming-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-device_streaming instead. See the readme for more details.", diff --git a/google-cloud-device_streaming-v1/CHANGELOG.md b/google-cloud-device_streaming-v1/CHANGELOG.md index f88957a62ba2..77a207c5805b 100644 --- a/google-cloud-device_streaming-v1/CHANGELOG.md +++ b/google-cloud-device_streaming-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-21) + +#### Features + +* Initial generation of google-cloud-device_streaming-v1 ([#30408](https://github.com/googleapis/google-cloud-ruby/issues/30408)) + +## Release History diff --git a/google-cloud-device_streaming-v1/lib/google/cloud/device_streaming/v1/version.rb b/google-cloud-device_streaming-v1/lib/google/cloud/device_streaming/v1/version.rb index 87ea12ec8b29..b81750a2a9cb 100644 --- a/google-cloud-device_streaming-v1/lib/google/cloud/device_streaming/v1/version.rb +++ b/google-cloud-device_streaming-v1/lib/google/cloud/device_streaming/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DeviceStreaming module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-cloud-device_streaming-v1/snippets/snippet_metadata_google.cloud.devicestreaming.v1.json b/google-cloud-device_streaming-v1/snippets/snippet_metadata_google.cloud.devicestreaming.v1.json index 6d4476b4a946..3c4fea4150f2 100644 --- a/google-cloud-device_streaming-v1/snippets/snippet_metadata_google.cloud.devicestreaming.v1.json +++ b/google-cloud-device_streaming-v1/snippets/snippet_metadata_google.cloud.devicestreaming.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-device_streaming-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From ac7e76e9f3c6d551b41c7c1dfc0b37e2019fc45e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 14:03:38 -0700 Subject: [PATCH 025/457] chore(main): release google-cloud-chronicle 0.1.0 (#30419) --- .release-please-manifest.json | 2 +- google-cloud-chronicle/.repo-metadata.json | 2 +- google-cloud-chronicle/CHANGELOG.md | 9 ++++++++- .../lib/google/cloud/chronicle/version.rb | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5da4a6cd4bd2..00a4097a7198 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -197,7 +197,7 @@ "google-cloud-channel+FILLER": "0.0.0", "google-cloud-channel-v1": "2.1.0", "google-cloud-channel-v1+FILLER": "0.0.0", - "google-cloud-chronicle": "0.0.1", + "google-cloud-chronicle": "0.1.0", "google-cloud-chronicle+FILLER": "0.0.0", "google-cloud-chronicle-v1": "0.0.1", "google-cloud-chronicle-v1+FILLER": "0.0.0", diff --git a/google-cloud-chronicle/.repo-metadata.json b/google-cloud-chronicle/.repo-metadata.json index d0a503f05749..0a8ff545f299 100644 --- a/google-cloud-chronicle/.repo-metadata.json +++ b/google-cloud-chronicle/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "chronicle", "name_pretty": "Chronicle API", "product_documentation": "https://cloud.google.com/chronicle/docs/secops/secops-overview", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle.", diff --git a/google-cloud-chronicle/CHANGELOG.md b/google-cloud-chronicle/CHANGELOG.md index f88957a62ba2..392e02ae226b 100644 --- a/google-cloud-chronicle/CHANGELOG.md +++ b/google-cloud-chronicle/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-21) + +#### Features + +* Initial generation of google-cloud-chronicle ([#30412](https://github.com/googleapis/google-cloud-ruby/issues/30412)) + +## Release History diff --git a/google-cloud-chronicle/lib/google/cloud/chronicle/version.rb b/google-cloud-chronicle/lib/google/cloud/chronicle/version.rb index a74389a52883..c48a1ea34a5a 100644 --- a/google-cloud-chronicle/lib/google/cloud/chronicle/version.rb +++ b/google-cloud-chronicle/lib/google/cloud/chronicle/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Chronicle - VERSION = "0.0.1" + VERSION = "0.1.0" end end end From 7d5786f487c87a974a378990de5216176b316f1b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 14:03:51 -0700 Subject: [PATCH 026/457] chore(main): release google-cloud-chronicle-v1 0.1.0 (#30420) --- .release-please-manifest.json | 2 +- google-cloud-chronicle-v1/.repo-metadata.json | 2 +- google-cloud-chronicle-v1/CHANGELOG.md | 9 ++++++++- .../lib/google/cloud/chronicle/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.chronicle.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 00a4097a7198..67d449cfb56e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -199,7 +199,7 @@ "google-cloud-channel-v1+FILLER": "0.0.0", "google-cloud-chronicle": "0.1.0", "google-cloud-chronicle+FILLER": "0.0.0", - "google-cloud-chronicle-v1": "0.0.1", + "google-cloud-chronicle-v1": "0.1.0", "google-cloud-chronicle-v1+FILLER": "0.0.0", "google-cloud-cloud_controls_partner": "2.0.1", "google-cloud-cloud_controls_partner+FILLER": "0.0.0", diff --git a/google-cloud-chronicle-v1/.repo-metadata.json b/google-cloud-chronicle-v1/.repo-metadata.json index aa41429c48f2..af3755dd1621 100644 --- a/google-cloud-chronicle-v1/.repo-metadata.json +++ b/google-cloud-chronicle-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "chronicle", "name_pretty": "Chronicle V1 API", "product_documentation": "https://cloud.google.com/chronicle/docs/secops/secops-overview", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details.", diff --git a/google-cloud-chronicle-v1/CHANGELOG.md b/google-cloud-chronicle-v1/CHANGELOG.md index f88957a62ba2..13506f656690 100644 --- a/google-cloud-chronicle-v1/CHANGELOG.md +++ b/google-cloud-chronicle-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-21) + +#### Features + +* Initial generation of google-cloud-chronicle-v1 ([#30407](https://github.com/googleapis/google-cloud-ruby/issues/30407)) + +## Release History diff --git a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb index d96ff7207700..b8d6c5161fb5 100644 --- a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb +++ b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Chronicle module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json index 97757c48b4dd..1439a6243d93 100644 --- a/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json +++ b/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-chronicle-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From f328f917e2df3d503091df703b57e6528d9004a0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 14:04:53 -0700 Subject: [PATCH 027/457] chore(main): release google-ads-marketing_platform-admin-v1alpha 0.1.0 (#30417) --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-ads-marketing_platform-admin-v1alpha/CHANGELOG.md | 9 ++++++++- .../ads/marketing_platform/admin/v1alpha/version.rb | 2 +- ..._metadata_google.marketingplatform.admin.v1alpha.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 67d449cfb56e..70416af9d64a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -5,7 +5,7 @@ "google-ads-ad_manager-v1+FILLER": "0.0.0", "google-ads-marketing_platform-admin": "0.0.1", "google-ads-marketing_platform-admin+FILLER": "0.0.0", - "google-ads-marketing_platform-admin-v1alpha": "0.0.1", + "google-ads-marketing_platform-admin-v1alpha": "0.1.0", "google-ads-marketing_platform-admin-v1alpha+FILLER": "0.0.0", "google-analytics-admin": "0.6.2", "google-analytics-admin+FILLER": "0.0.0", diff --git a/google-ads-marketing_platform-admin-v1alpha/.repo-metadata.json b/google-ads-marketing_platform-admin-v1alpha/.repo-metadata.json index 85674c6f3233..d3eae7b0d768 100644 --- a/google-ads-marketing_platform-admin-v1alpha/.repo-metadata.json +++ b/google-ads-marketing_platform-admin-v1alpha/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "marketingplatformadminapi", "name_pretty": "Google Marketing Platform Admin V1ALPHA API", "product_documentation": "https://developers.google.com/analytics/devguides/config/gmp/v1", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Google Marketing Platform Admin API allows for programmatic access to the Google Marketing Platform configuration data. You can use the Google Marketing Platform Admin API to manage links between your Google Marketing Platform organization and Google Analytics accounts, and to set the service level of your GA4 properties. Note that google-ads-marketing_platform-admin-v1alpha is a version-specific client library. For most uses, we recommend installing the main client library google-ads-marketing_platform-admin instead. See the readme for more details.", diff --git a/google-ads-marketing_platform-admin-v1alpha/CHANGELOG.md b/google-ads-marketing_platform-admin-v1alpha/CHANGELOG.md index f88957a62ba2..48b96f09cd6f 100644 --- a/google-ads-marketing_platform-admin-v1alpha/CHANGELOG.md +++ b/google-ads-marketing_platform-admin-v1alpha/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-21) + +#### Features + +* Initial generation of google-ads-marketing_platform-admin-v1alpha ([#30409](https://github.com/googleapis/google-cloud-ruby/issues/30409)) + +## Release History diff --git a/google-ads-marketing_platform-admin-v1alpha/lib/google/ads/marketing_platform/admin/v1alpha/version.rb b/google-ads-marketing_platform-admin-v1alpha/lib/google/ads/marketing_platform/admin/v1alpha/version.rb index d4cb1f634592..d2c19e049f8f 100644 --- a/google-ads-marketing_platform-admin-v1alpha/lib/google/ads/marketing_platform/admin/v1alpha/version.rb +++ b/google-ads-marketing_platform-admin-v1alpha/lib/google/ads/marketing_platform/admin/v1alpha/version.rb @@ -22,7 +22,7 @@ module Ads module MarketingPlatform module Admin module V1alpha - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-ads-marketing_platform-admin-v1alpha/snippets/snippet_metadata_google.marketingplatform.admin.v1alpha.json b/google-ads-marketing_platform-admin-v1alpha/snippets/snippet_metadata_google.marketingplatform.admin.v1alpha.json index 49c305048c0f..f46bc7f3410a 100644 --- a/google-ads-marketing_platform-admin-v1alpha/snippets/snippet_metadata_google.marketingplatform.admin.v1alpha.json +++ b/google-ads-marketing_platform-admin-v1alpha/snippets/snippet_metadata_google.marketingplatform.admin.v1alpha.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-ads-marketing_platform-admin-v1alpha", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 1e62ef378280c8c4e1109bc1e5d100b31a6e2c3a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 14:05:06 -0700 Subject: [PATCH 028/457] chore(main): release google-ads-marketing_platform-admin 0.1.0 (#30416) --- .release-please-manifest.json | 2 +- google-ads-marketing_platform-admin/.repo-metadata.json | 2 +- google-ads-marketing_platform-admin/CHANGELOG.md | 9 ++++++++- .../lib/google/ads/marketing_platform/admin/version.rb | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 70416af9d64a..60fef1bc78e8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -3,7 +3,7 @@ "google-ads-ad_manager+FILLER": "0.0.0", "google-ads-ad_manager-v1": "1.1.0", "google-ads-ad_manager-v1+FILLER": "0.0.0", - "google-ads-marketing_platform-admin": "0.0.1", + "google-ads-marketing_platform-admin": "0.1.0", "google-ads-marketing_platform-admin+FILLER": "0.0.0", "google-ads-marketing_platform-admin-v1alpha": "0.1.0", "google-ads-marketing_platform-admin-v1alpha+FILLER": "0.0.0", diff --git a/google-ads-marketing_platform-admin/.repo-metadata.json b/google-ads-marketing_platform-admin/.repo-metadata.json index 1da7d3f28e6e..d02873b0b9c2 100644 --- a/google-ads-marketing_platform-admin/.repo-metadata.json +++ b/google-ads-marketing_platform-admin/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "marketingplatformadminapi", "name_pretty": "Google Marketing Platform Admin API", "product_documentation": "https://developers.google.com/analytics/devguides/config/gmp/v1", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Google Marketing Platform Admin API allows for programmatic access to the Google Marketing Platform configuration data. You can use the Google Marketing Platform Admin API to manage links between your Google Marketing Platform organization and Google Analytics accounts, and to set the service level of your GA4 properties.", diff --git a/google-ads-marketing_platform-admin/CHANGELOG.md b/google-ads-marketing_platform-admin/CHANGELOG.md index f88957a62ba2..08d09aa5cdc1 100644 --- a/google-ads-marketing_platform-admin/CHANGELOG.md +++ b/google-ads-marketing_platform-admin/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-21) + +#### Features + +* Initial generation of google-ads-marketing_platform-admin ([#30414](https://github.com/googleapis/google-cloud-ruby/issues/30414)) + +## Release History diff --git a/google-ads-marketing_platform-admin/lib/google/ads/marketing_platform/admin/version.rb b/google-ads-marketing_platform-admin/lib/google/ads/marketing_platform/admin/version.rb index fc027515ba6f..287c9089bfcc 100644 --- a/google-ads-marketing_platform-admin/lib/google/ads/marketing_platform/admin/version.rb +++ b/google-ads-marketing_platform-admin/lib/google/ads/marketing_platform/admin/version.rb @@ -21,7 +21,7 @@ module Google module Ads module MarketingPlatform module Admin - VERSION = "0.0.1" + VERSION = "0.1.0" end end end From 6a1975aa908c1ece3016d7b172b53751f7aa300c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 12:26:43 -0700 Subject: [PATCH 029/457] chore(main): release google-cloud-ai_platform-v1 1.13.0 (#30418) --- .release-please-manifest.json | 2 +- google-cloud-ai_platform-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/ai_platform/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 60fef1bc78e8..5af65a8cb67e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -43,7 +43,7 @@ "google-cloud-advisory_notifications-v1+FILLER": "0.0.0", "google-cloud-ai_platform": "2.0.1", "google-cloud-ai_platform+FILLER": "0.0.0", - "google-cloud-ai_platform-v1": "1.12.0", + "google-cloud-ai_platform-v1": "1.13.0", "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", diff --git a/google-cloud-ai_platform-v1/CHANGELOG.md b/google-cloud-ai_platform-v1/CHANGELOG.md index 80ecff766e08..fcb3190c7937 100644 --- a/google-cloud-ai_platform-v1/CHANGELOG.md +++ b/google-cloud-ai_platform-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.13.0 (2025-05-22) + +#### Features + +* Support thoughts_token_count to prediction service ([#30403](https://github.com/googleapis/google-cloud-ruby/issues/30403)) + ### 1.12.0 (2025-05-16) #### Features diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb index ef4fe08f745d..e80998db26a6 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AIPlatform module V1 - VERSION = "1.12.0" + VERSION = "1.13.0" end end end diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index 408ee13ba4cf..89681f2a9e77 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-ai_platform-v1", - "version": "1.12.0", + "version": "1.13.0", "language": "RUBY", "apis": [ { From 5a4753b1941511be3b5dc381c5ba23af648dd504 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 12:27:39 -0700 Subject: [PATCH 030/457] feat: Support throughput_mode in UpdateDatabaseDdlRequest to be used by Spanner Migration Tool --- .../admin/database/v1/database_admin/client.rb | 6 +++++- .../admin/database/v1/database_admin/rest/client.rb | 6 +++++- .../admin/database/v1/spanner_database_admin_pb.rb | 2 +- .../admin/database/v1/spanner_database_admin.rb | 5 +++++ .../admin/database/v1/database_admin_rest_test.rb | 11 ++++++----- .../spanner/admin/database/v1/database_admin_test.rb | 12 +++++++----- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb index 827bb4a5ea85..4ccb9e8c6988 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb @@ -792,7 +792,7 @@ def update_database request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload update_database_ddl(database: nil, statements: nil, operation_id: nil, proto_descriptors: nil) + # @overload update_database_ddl(database: nil, statements: nil, operation_id: nil, proto_descriptors: nil, throughput_mode: nil) # Pass arguments to `update_database_ddl` 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). @@ -838,6 +838,10 @@ def update_database request, options = nil # ``` # For more details, see protobuffer [self # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + # @param throughput_mode [::Boolean] + # Optional. This field is exposed to be used by the Spanner Migration Tool. + # For more details, see + # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] diff --git a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb index 8a307f986ee8..f7c0b64c9867 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb @@ -757,7 +757,7 @@ def update_database request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload update_database_ddl(database: nil, statements: nil, operation_id: nil, proto_descriptors: nil) + # @overload update_database_ddl(database: nil, statements: nil, operation_id: nil, proto_descriptors: nil, throughput_mode: nil) # Pass arguments to `update_database_ddl` 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). @@ -803,6 +803,10 @@ def update_database request, options = nil # ``` # For more details, see protobuffer [self # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + # @param throughput_mode [::Boolean] + # Optional. This field is exposed to be used by the Spanner Migration Tool. + # For more details, see + # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb b/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb index 6287dca270fa..52b1401ebd82 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb @@ -20,7 +20,7 @@ require 'google/spanner/admin/database/v1/common_pb' -descriptor_data = "\n=google/spanner/admin/database/v1/spanner_database_admin.proto\x12 google.spanner.admin.database.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/database/v1/backup.proto\x1a\x36google/spanner/admin/database/v1/backup_schedule.proto\x1a-google/spanner/admin/database/v1/common.proto\"\xab\x01\n\x0bRestoreInfo\x12H\n\x0bsource_type\x18\x01 \x01(\x0e\x32\x33.google.spanner.admin.database.v1.RestoreSourceType\x12\x43\n\x0b\x62\x61\x63kup_info\x18\x02 \x01(\x0b\x32,.google.spanner.admin.database.v1.BackupInfoH\x00\x42\r\n\x0bsource_info\"\xca\x06\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.spanner.admin.database.v1.Database.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0crestore_info\x18\x04 \x01(\x0b\x32-.google.spanner.admin.database.v1.RestoreInfoB\x03\xe0\x41\x03\x12R\n\x11\x65ncryption_config\x18\x05 \x01(\x0b\x32\x32.google.spanner.admin.database.v1.EncryptionConfigB\x03\xe0\x41\x03\x12N\n\x0f\x65ncryption_info\x18\x08 \x03(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12%\n\x18version_retention_period\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x64\x65\x66\x61ult_leader\x18\t \x01(\tB\x03\xe0\x41\x03\x12P\n\x10\x64\x61tabase_dialect\x18\n \x01(\x0e\x32\x31.google.spanner.admin.database.v1.DatabaseDialectB\x03\xe0\x41\x03\x12\x1e\n\x16\x65nable_drop_protection\x18\x0b \x01(\x08\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\"M\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x14\n\x10READY_OPTIMIZING\x10\x03:b\xea\x41_\n\x1fspanner.googleapis.com/Database\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/instances/*}/databases\x12\xa4\x02\n\x0e\x43reateDatabase\x12\x37.google.spanner.admin.database.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41\x64\n)google.spanner.admin.database.v1.Database\x12\x37google.spanner.admin.database.v1.CreateDatabaseMetadata\xda\x41\x17parent,create_statement\x82\xd3\xe4\x93\x02\x32\"-/v1/{parent=projects/*/instances/*}/databases:\x01*\x12\xad\x01\n\x0bGetDatabase\x12\x34.google.spanner.admin.database.v1.GetDatabaseRequest\x1a*.google.spanner.admin.database.v1.Database\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/instances/*/databases/*}\x12\xef\x01\n\x0eUpdateDatabase\x12\x37.google.spanner.admin.database.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{database.name=projects/*/instances/*/databases/*}:\x08\x64\x61tabase\x12\x9d\x02\n\x11UpdateDatabaseDdl\x12:.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata\xda\x41\x13\x64\x61tabase,statements\x82\xd3\xe4\x93\x02:25/v1/{database=projects/*/instances/*/databases/*}/ddl:\x01*\x12\xa3\x01\n\x0c\x44ropDatabase\x12\x35.google.spanner.admin.database.v1.DropDatabaseRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x33*1/v1/{database=projects/*/instances/*/databases/*}\x12\xcd\x01\n\x0eGetDatabaseDdl\x12\x37.google.spanner.admin.database.v1.GetDatabaseDdlRequest\x1a\x38.google.spanner.admin.database.v1.GetDatabaseDdlResponse\"H\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{database=projects/*/instances/*/databases/*}/ddl\x12\xc2\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xf6\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\xdd\x01\">/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy:\x01*ZA\"/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy:\x01*ZA\".google.spanner.admin.database.v1.ListBackupOperationsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/instances/*}/backupOperations\x12\xdc\x01\n\x11ListDatabaseRoles\x12:.google.spanner.admin.database.v1.ListDatabaseRolesRequest\x1a;.google.spanner.admin.database.v1.ListDatabaseRolesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles\x12\xe8\x01\n\x0e\x41\x64\x64SplitPoints\x12\x37.google.spanner.admin.database.v1.AddSplitPointsRequest\x1a\x38.google.spanner.admin.database.v1.AddSplitPointsResponse\"c\xda\x41\x15\x64\x61tabase,split_points\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints:\x01*\x12\x8e\x02\n\x14\x43reateBackupSchedule\x12=.google.spanner.admin.database.v1.CreateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x84\x01\xda\x41)parent,backup_schedule,backup_schedule_id\x82\xd3\xe4\x93\x02R\"?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xd1\x01\n\x11GetBackupSchedule\x12:.google.spanner.admin.database.v1.GetBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\x90\x02\n\x14UpdateBackupSchedule\x12=.google.spanner.admin.database.v1.UpdateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x86\x01\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02\x62\x32O/v1/{backup_schedule.name=projects/*/instances/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xbd\x01\n\x14\x44\x65leteBackupSchedule\x12=.google.spanner.admin.database.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\xe4\x01\n\x13ListBackupSchedules\x12<.google.spanner.admin.database.v1.ListBackupSchedulesRequest\x1a=.google.spanner.admin.database.v1.ListBackupSchedulesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules\x1ax\xca\x41\x16spanner.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.adminB\xd6\x03\n$com.google.spanner.admin.database.v1B\x19SpannerDatabaseAdminProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1\xea\x41J\n\x1fspanner.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41{\n(spanner.googleapis.com/InstancePartition\x12Oprojects/{project}/instances/{instance}/instancePartitions/{instance_partition}b\x06proto3" +descriptor_data = "\n=google/spanner/admin/database/v1/spanner_database_admin.proto\x12 google.spanner.admin.database.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/database/v1/backup.proto\x1a\x36google/spanner/admin/database/v1/backup_schedule.proto\x1a-google/spanner/admin/database/v1/common.proto\"\xab\x01\n\x0bRestoreInfo\x12H\n\x0bsource_type\x18\x01 \x01(\x0e\x32\x33.google.spanner.admin.database.v1.RestoreSourceType\x12\x43\n\x0b\x62\x61\x63kup_info\x18\x02 \x01(\x0b\x32,.google.spanner.admin.database.v1.BackupInfoH\x00\x42\r\n\x0bsource_info\"\xca\x06\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.spanner.admin.database.v1.Database.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0crestore_info\x18\x04 \x01(\x0b\x32-.google.spanner.admin.database.v1.RestoreInfoB\x03\xe0\x41\x03\x12R\n\x11\x65ncryption_config\x18\x05 \x01(\x0b\x32\x32.google.spanner.admin.database.v1.EncryptionConfigB\x03\xe0\x41\x03\x12N\n\x0f\x65ncryption_info\x18\x08 \x03(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12%\n\x18version_retention_period\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x64\x65\x66\x61ult_leader\x18\t \x01(\tB\x03\xe0\x41\x03\x12P\n\x10\x64\x61tabase_dialect\x18\n \x01(\x0e\x32\x31.google.spanner.admin.database.v1.DatabaseDialectB\x03\xe0\x41\x03\x12\x1e\n\x16\x65nable_drop_protection\x18\x0b \x01(\x08\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\"M\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x14\n\x10READY_OPTIMIZING\x10\x03:b\xea\x41_\n\x1fspanner.googleapis.com/Database\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/instances/*}/databases\x12\xa4\x02\n\x0e\x43reateDatabase\x12\x37.google.spanner.admin.database.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41\x64\n)google.spanner.admin.database.v1.Database\x12\x37google.spanner.admin.database.v1.CreateDatabaseMetadata\xda\x41\x17parent,create_statement\x82\xd3\xe4\x93\x02\x32\"-/v1/{parent=projects/*/instances/*}/databases:\x01*\x12\xad\x01\n\x0bGetDatabase\x12\x34.google.spanner.admin.database.v1.GetDatabaseRequest\x1a*.google.spanner.admin.database.v1.Database\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/instances/*/databases/*}\x12\xef\x01\n\x0eUpdateDatabase\x12\x37.google.spanner.admin.database.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{database.name=projects/*/instances/*/databases/*}:\x08\x64\x61tabase\x12\x9d\x02\n\x11UpdateDatabaseDdl\x12:.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata\xda\x41\x13\x64\x61tabase,statements\x82\xd3\xe4\x93\x02:25/v1/{database=projects/*/instances/*/databases/*}/ddl:\x01*\x12\xa3\x01\n\x0c\x44ropDatabase\x12\x35.google.spanner.admin.database.v1.DropDatabaseRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x33*1/v1/{database=projects/*/instances/*/databases/*}\x12\xcd\x01\n\x0eGetDatabaseDdl\x12\x37.google.spanner.admin.database.v1.GetDatabaseDdlRequest\x1a\x38.google.spanner.admin.database.v1.GetDatabaseDdlResponse\"H\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{database=projects/*/instances/*/databases/*}/ddl\x12\xc2\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xf6\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\xdd\x01\">/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy:\x01*ZA\"/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy:\x01*ZA\".google.spanner.admin.database.v1.ListBackupOperationsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/instances/*}/backupOperations\x12\xdc\x01\n\x11ListDatabaseRoles\x12:.google.spanner.admin.database.v1.ListDatabaseRolesRequest\x1a;.google.spanner.admin.database.v1.ListDatabaseRolesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles\x12\xe8\x01\n\x0e\x41\x64\x64SplitPoints\x12\x37.google.spanner.admin.database.v1.AddSplitPointsRequest\x1a\x38.google.spanner.admin.database.v1.AddSplitPointsResponse\"c\xda\x41\x15\x64\x61tabase,split_points\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints:\x01*\x12\x8e\x02\n\x14\x43reateBackupSchedule\x12=.google.spanner.admin.database.v1.CreateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x84\x01\xda\x41)parent,backup_schedule,backup_schedule_id\x82\xd3\xe4\x93\x02R\"?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xd1\x01\n\x11GetBackupSchedule\x12:.google.spanner.admin.database.v1.GetBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\x90\x02\n\x14UpdateBackupSchedule\x12=.google.spanner.admin.database.v1.UpdateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x86\x01\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02\x62\x32O/v1/{backup_schedule.name=projects/*/instances/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xbd\x01\n\x14\x44\x65leteBackupSchedule\x12=.google.spanner.admin.database.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\xe4\x01\n\x13ListBackupSchedules\x12<.google.spanner.admin.database.v1.ListBackupSchedulesRequest\x1a=.google.spanner.admin.database.v1.ListBackupSchedulesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules\x1ax\xca\x41\x16spanner.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.adminB\xd6\x03\n$com.google.spanner.admin.database.v1B\x19SpannerDatabaseAdminProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1\xea\x41J\n\x1fspanner.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41{\n(spanner.googleapis.com/InstancePartition\x12Oprojects/{project}/instances/{instance}/instancePartitions/{instance_partition}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb index 20e9ada0f4fe..a47ec2ef7cd0 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb @@ -338,6 +338,11 @@ class UpdateDatabaseMetadata # ``` # For more details, see protobuffer [self # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + # @!attribute [rw] throughput_mode + # @return [::Boolean] + # Optional. This field is exposed to be used by the Spanner Migration Tool. + # For more details, see + # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). class UpdateDatabaseDdlRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb index 8f23febe8a77..19836e3cddd8 100644 --- a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb +++ b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb @@ -314,6 +314,7 @@ def test_update_database_ddl statements = ["hello world"] operation_id = "hello world" proto_descriptors = "hello world" + throughput_mode = true update_database_ddl_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -329,27 +330,27 @@ def test_update_database_ddl end # Use hash object - client.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors }) do |_result, response| + client.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.update_database_ddl database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors do |_result, response| + client.update_database_ddl database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.update_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors) do |_result, response| + client.update_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors }, call_options) do |_result, response| + client.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.update_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors), call_options) do |_result, response| + client.update_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb index bdc98a2fb807..508f2aea3cad 100644 --- a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb +++ b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb @@ -339,6 +339,7 @@ def test_update_database_ddl statements = ["hello world"] operation_id = "hello world" proto_descriptors = "hello world" + throughput_mode = true update_database_ddl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :update_database_ddl, name @@ -347,6 +348,7 @@ def test_update_database_ddl assert_equal ["hello world"], request["statements"] assert_equal "hello world", request["operation_id"] assert_equal "hello world", request["proto_descriptors"] + assert_equal true, request["throughput_mode"] refute_nil options end @@ -357,35 +359,35 @@ def test_update_database_ddl end # Use hash object - client.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors }) do |response, operation| + client.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.update_database_ddl database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors do |response, operation| + client.update_database_ddl database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.update_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors) do |response, operation| + client.update_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors }, grpc_options) do |response, operation| + client.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.update_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors), grpc_options) do |response, operation| + client.update_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation From a50d273f334d8eb34af826273fa98f885dd6cdf7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 12:28:55 -0700 Subject: [PATCH 031/457] chore: remove C++ arenas in generated code (#30432) --- .../lib/google/cloud/security/publicca/v1/resources_pb.rb | 2 +- .../lib/google/cloud/security/publicca/v1/service_pb.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-security-public_ca-v1/lib/google/cloud/security/publicca/v1/resources_pb.rb b/google-cloud-security-public_ca-v1/lib/google/cloud/security/publicca/v1/resources_pb.rb index f96f9f2ec76b..3d4ce6940b00 100644 --- a/google-cloud-security-public_ca-v1/lib/google/cloud/security/publicca/v1/resources_pb.rb +++ b/google-cloud-security-public_ca-v1/lib/google/cloud/security/publicca/v1/resources_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n1google/cloud/security/publicca/v1/resources.proto\x12!google.cloud.security.publicca.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdd\x01\n\x12\x45xternalAccountKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06key_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x62\x36\x34_mac_key\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x03:\x84\x01\xea\x41\x80\x01\n*publicca.googleapis.com/ExternalAccountKey\x12Rprojects/{project}/locations/{location}/externalAccountKeys/{external_account_key}B\xef\x01\n%com.google.cloud.security.publicca.v1B\x0eResourcesProtoP\x01ZAcloud.google.com/go/security/publicca/apiv1/publiccapb;publiccapb\xf8\x01\x01\xaa\x02!Google.Cloud.Security.PublicCA.V1\xca\x02!Google\\Cloud\\Security\\PublicCA\\V1\xea\x02%Google::Cloud::Security::PublicCA::V1b\x06proto3" +descriptor_data = "\n1google/cloud/security/publicca/v1/resources.proto\x12!google.cloud.security.publicca.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdd\x01\n\x12\x45xternalAccountKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06key_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x62\x36\x34_mac_key\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x03:\x84\x01\xea\x41\x80\x01\n*publicca.googleapis.com/ExternalAccountKey\x12Rprojects/{project}/locations/{location}/externalAccountKeys/{external_account_key}B\xec\x01\n%com.google.cloud.security.publicca.v1B\x0eResourcesProtoP\x01ZAcloud.google.com/go/security/publicca/apiv1/publiccapb;publiccapb\xaa\x02!Google.Cloud.Security.PublicCA.V1\xca\x02!Google\\Cloud\\Security\\PublicCA\\V1\xea\x02%Google::Cloud::Security::PublicCA::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-security-public_ca-v1/lib/google/cloud/security/publicca/v1/service_pb.rb b/google-cloud-security-public_ca-v1/lib/google/cloud/security/publicca/v1/service_pb.rb index 14bfa20e2412..0a2ff4ec2b9c 100644 --- a/google-cloud-security-public_ca-v1/lib/google/cloud/security/publicca/v1/service_pb.rb +++ b/google-cloud-security-public_ca-v1/lib/google/cloud/security/publicca/v1/service_pb.rb @@ -11,7 +11,7 @@ require 'google/cloud/security/publicca/v1/resources_pb' -descriptor_data = "\n/google/cloud/security/publicca/v1/service.proto\x12!google.cloud.security.publicca.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/security/publicca/v1/resources.proto\"\xbf\x01\n\x1f\x43reateExternalAccountKeyRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*publicca.googleapis.com/ExternalAccountKey\x12X\n\x14\x65xternal_account_key\x18\x02 \x01(\x0b\x32\x35.google.cloud.security.publicca.v1.ExternalAccountKeyB\x03\xe0\x41\x02\x32\xfd\x02\n!PublicCertificateAuthorityService\x12\x8a\x02\n\x18\x43reateExternalAccountKey\x12\x42.google.cloud.security.publicca.v1.CreateExternalAccountKeyRequest\x1a\x35.google.cloud.security.publicca.v1.ExternalAccountKey\"s\xda\x41\x1bparent,external_account_key\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/externalAccountKeys:\x14\x65xternal_account_key\x1aK\xca\x41\x17publicca.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xed\x01\n%com.google.cloud.security.publicca.v1B\x0cServiceProtoP\x01ZAcloud.google.com/go/security/publicca/apiv1/publiccapb;publiccapb\xf8\x01\x01\xaa\x02!Google.Cloud.Security.PublicCA.V1\xca\x02!Google\\Cloud\\Security\\PublicCA\\V1\xea\x02%Google::Cloud::Security::PublicCA::V1b\x06proto3" +descriptor_data = "\n/google/cloud/security/publicca/v1/service.proto\x12!google.cloud.security.publicca.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/security/publicca/v1/resources.proto\"\xbf\x01\n\x1f\x43reateExternalAccountKeyRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*publicca.googleapis.com/ExternalAccountKey\x12X\n\x14\x65xternal_account_key\x18\x02 \x01(\x0b\x32\x35.google.cloud.security.publicca.v1.ExternalAccountKeyB\x03\xe0\x41\x02\x32\xfd\x02\n!PublicCertificateAuthorityService\x12\x8a\x02\n\x18\x43reateExternalAccountKey\x12\x42.google.cloud.security.publicca.v1.CreateExternalAccountKeyRequest\x1a\x35.google.cloud.security.publicca.v1.ExternalAccountKey\"s\xda\x41\x1bparent,external_account_key\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/externalAccountKeys:\x14\x65xternal_account_key\x1aK\xca\x41\x17publicca.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xea\x01\n%com.google.cloud.security.publicca.v1B\x0cServiceProtoP\x01ZAcloud.google.com/go/security/publicca/apiv1/publiccapb;publiccapb\xaa\x02!Google.Cloud.Security.PublicCA.V1\xca\x02!Google\\Cloud\\Security\\PublicCA\\V1\xea\x02%Google::Cloud::Security::PublicCA::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool From 67059f630bcf5db96a1646725d066eb1822f25ed Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 12:30:21 -0700 Subject: [PATCH 032/457] docs: Remove unnecessary curl and Python documentation (#30430) docs: Minor updates --- .../cloud/support/v2beta/attachment_pb.rb | 2 +- .../v2beta/attachment_service_services_pb.rb | 30 -- .../v2beta/case_attachment_service/client.rb | 30 -- .../case_attachment_service/rest/client.rb | 30 -- .../google/cloud/support/v2beta/case_pb.rb | 2 +- .../support/v2beta/case_service/client.rb | 274 ------------------ .../v2beta/case_service/rest/client.rb | 274 ------------------ .../v2beta/case_service_services_pb.rb | 274 ------------------ .../support/v2beta/comment_service/client.rb | 68 ----- .../v2beta/comment_service/rest/client.rb | 68 ----- .../v2beta/comment_service_services_pb.rb | 68 ----- .../google/cloud/support/v2beta/actor.rb | 2 +- .../google/cloud/support/v2beta/attachment.rb | 2 +- .../google/cloud/support/v2beta/case.rb | 2 +- 14 files changed, 5 insertions(+), 1121 deletions(-) diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_pb.rb index 2cca1e4e5d52..79d0ed5fa87a 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/support/v2beta/attachment.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/support/v2beta/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x03\n\nAttachment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x07\x63reator\x18\x03 \x01(\x0b\x32\".google.cloud.support.v2beta.ActorB\x03\xe0\x41\x03\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x16\n\tmime_type\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03:\xb0\x01\xea\x41\xac\x01\n&cloudsupport.googleapis.com/Attachment\x12\x45organizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xcc\x01\n\x1f\x63om.google.cloud.support.v2betaB\x0f\x41ttachmentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3" +descriptor_data = "\n,google/cloud/support/v2beta/attachment.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/support/v2beta/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x03\n\nAttachment\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x07\x63reator\x18\x03 \x01(\x0b\x32\".google.cloud.support.v2beta.ActorB\x03\xe0\x41\x03\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x16\n\tmime_type\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03:\xb0\x01\xea\x41\xac\x01\n&cloudsupport.googleapis.com/Attachment\x12\x45organizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xcc\x01\n\x1f\x63om.google.cloud.support.v2betaB\x0f\x41ttachmentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb index e3bbf3d8a41c..1020cb8d6b3c 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb @@ -34,36 +34,6 @@ class Service self.service_name = 'google.cloud.support.v2beta.CaseAttachmentService' # List all the attachments associated with a support case. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/23598314" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/attachments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = ( - # supportApiService.cases() - # .attachments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` rpc :ListAttachments, ::Google::Cloud::Support::V2beta::ListAttachmentsRequest, ::Google::Cloud::Support::V2beta::ListAttachmentsResponse end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/client.rb index 75be9ddc9954..3bc90415b67b 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/client.rb @@ -191,36 +191,6 @@ def logger ## # List all the attachments associated with a support case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/23598314" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/attachments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .attachments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` - # # @overload list_attachments(request, options = nil) # Pass arguments to `list_attachments` via a request object, either of type # {::Google::Cloud::Support::V2beta::ListAttachmentsRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb index 3a1863a26e59..4c84ab06df6c 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb @@ -184,36 +184,6 @@ def logger ## # List all the attachments associated with a support case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/23598314" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/attachments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .attachments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` - # # @overload list_attachments(request, options = nil) # Pass arguments to `list_attachments` via a request object, either of type # {::Google::Cloud::Support::V2beta::ListAttachmentsRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_pb.rb index fb910b51c89b..eae2a8219463 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n&google/cloud/support/v2beta/case.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/support/v2beta/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf1\x06\n\x04\x43\x61se\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12G\n\x0e\x63lassification\x18\x04 \x01(\x0b\x32/.google.cloud.support.v2beta.CaseClassification\x12\x11\n\ttime_zone\x18\x08 \x01(\t\x12\"\n\x1asubscriber_email_addresses\x18\t \x03(\t\x12;\n\x05state\x18\x0c \x01(\x0e\x32\'.google.cloud.support.v2beta.Case.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\x07\x63reator\x18\x0f \x01(\x0b\x32\".google.cloud.support.v2beta.Actor\x12\x15\n\rcontact_email\x18# \x01(\t\x12\x11\n\tescalated\x18\x11 \x01(\x08\x12\x11\n\ttest_case\x18\x13 \x01(\x08\x12\x15\n\rlanguage_code\x18\x17 \x01(\t\x12<\n\x08priority\x18 \x01(\x0e\x32*.google.cloud.support.v2beta.Case.Priority\"\x7f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x1e\n\x1aIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x03\x12\x15\n\x11SOLUTION_PROVIDED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05\"L\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\n\x02P0\x10\x01\x12\x06\n\x02P1\x10\x02\x12\x06\n\x02P2\x10\x03\x12\x06\n\x02P3\x10\x04\x12\x06\n\x02P4\x10\x05:q\xea\x41n\n cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1fprojects/{project}/cases/{case}\"m\n\x12\x43\x61seClassification\x12\n\n\x02id\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12\x35\n\x07product\x18\n \x01(\x0b\x32$.google.cloud.support.v2beta.Product\"I\n\x07Product\x12>\n\x0cproduct_line\x18\x01 \x01(\x0e\x32(.google.cloud.support.v2beta.ProductLine*N\n\x0bProductLine\x12\x1c\n\x18PRODUCT_LINE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGOOGLE_CLOUD\x10\x01\x12\x0f\n\x0bGOOGLE_MAPS\x10\x02\x42\xc6\x01\n\x1f\x63om.google.cloud.support.v2betaB\tCaseProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3" +descriptor_data = "\n&google/cloud/support/v2beta/case.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/support/v2beta/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf6\x06\n\x04\x43\x61se\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12G\n\x0e\x63lassification\x18\x04 \x01(\x0b\x32/.google.cloud.support.v2beta.CaseClassification\x12\x11\n\ttime_zone\x18\x08 \x01(\t\x12\"\n\x1asubscriber_email_addresses\x18\t \x03(\t\x12;\n\x05state\x18\x0c \x01(\x0e\x32\'.google.cloud.support.v2beta.Case.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\x07\x63reator\x18\x0f \x01(\x0b\x32\".google.cloud.support.v2beta.Actor\x12\x15\n\rcontact_email\x18# \x01(\t\x12\x11\n\tescalated\x18\x11 \x01(\x08\x12\x11\n\ttest_case\x18\x13 \x01(\x08\x12\x15\n\rlanguage_code\x18\x17 \x01(\t\x12<\n\x08priority\x18 \x01(\x0e\x32*.google.cloud.support.v2beta.Case.Priority\"\x7f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x1e\n\x1aIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x03\x12\x15\n\x11SOLUTION_PROVIDED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05\"L\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\n\x02P0\x10\x01\x12\x06\n\x02P1\x10\x02\x12\x06\n\x02P2\x10\x03\x12\x06\n\x02P3\x10\x04\x12\x06\n\x02P4\x10\x05:q\xea\x41n\n cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1fprojects/{project}/cases/{case}\"m\n\x12\x43\x61seClassification\x12\n\n\x02id\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12\x35\n\x07product\x18\n \x01(\x0b\x32$.google.cloud.support.v2beta.Product\"I\n\x07Product\x12>\n\x0cproduct_line\x18\x01 \x01(\x0e\x32(.google.cloud.support.v2beta.ProductLine*N\n\x0bProductLine\x12\x1c\n\x18PRODUCT_LINE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGOOGLE_CLOUD\x10\x01\x12\x0f\n\x0bGOOGLE_MAPS\x10\x02\x42\xc6\x01\n\x1f\x63om.google.cloud.support.v2betaB\tCaseProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service/client.rb index b4e9adfd4419..a0ca6488c163 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service/client.rb @@ -214,35 +214,6 @@ def logger ## # Retrieve a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/16033687" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # - # request = supportApiService.cases().get( - # name="projects/some-project/cases/43595344", - # ) - # print(request.execute()) - # ``` - # # @overload get_case(request, options = nil) # Pass arguments to `get_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::GetCaseRequest} or an equivalent Hash. @@ -332,34 +303,6 @@ def get_case request, options = nil # that are directly parented by that organization. To retrieve cases # under an organization and its projects, use `cases.search`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # - # request = - # supportApiService.cases().list(parent="projects/some-project") - # print(request.execute()) - # ``` - # # @overload list_cases(request, options = nil) # Pass arguments to `list_cases` via a request object, either of type # {::Google::Cloud::Support::V2beta::ListCasesRequest} or an equivalent Hash. @@ -479,34 +422,6 @@ def list_cases request, options = nil ## # Search for cases using a query. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases:search" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().search( - # parent="projects/some-project", query="state=OPEN" - # ) - # print(request.execute()) - # ``` - # # @overload search_cases(request, options = nil) # Pass arguments to `search_cases` via a request object, either of type # {::Google::Cloud::Support::V2beta::SearchCasesRequest} or an equivalent Hash. @@ -641,61 +556,6 @@ def search_cases request, options = nil # `classification`, and `priority`. If you're just testing the API and don't # want to route your case to an agent, set `testCase=true`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "display_name": "Test case created by me.", - # "description": "a random test case, feel free to close", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # "time_zone": "-07:00", - # "subscriber_email_addresses": [ - # "foo@domain.com", - # "bar@domain.com" - # ], - # "testCase": true, - # "priority": "P3" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().create( - # parent="projects/some-project", - # body={ - # "displayName": "A Test Case", - # "description": "This is a test case.", - # "testCase": True, - # "priority": "P2", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # }, - # ) - # print(request.execute()) - # ``` - # # @overload create_case(request, options = nil) # Pass arguments to `create_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::CreateCaseRequest} or an equivalent Hash. @@ -783,43 +643,6 @@ def create_case request, options = nil ## # Update a case. Only some fields can be updated. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request PATCH \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "priority": "P1" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().patch( - # name="projects/some-project/cases/43112854", - # body={ - # "displayName": "This is Now a New Title", - # "priority": "P2", - # }, - # ) - # print(request.execute()) - # ``` - # # @overload update_case(request, options = nil) # Pass arguments to `update_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::UpdateCaseRequest} or an equivalent Hash. @@ -920,48 +743,6 @@ def update_case request, options = nil # escalations' in the feature list to find out which ones let you # do that. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation." - # } - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case:escalate" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().escalate( - # name="projects/some-project/cases/43595344", - # body={ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation.", - # }, - # }, - # ) - # print(request.execute()) - # ``` - # # @overload escalate_case(request, options = nil) # Pass arguments to `escalate_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::EscalateCaseRequest} or an equivalent Hash. @@ -1049,35 +830,6 @@ def escalate_case request, options = nil ## # Close a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case:close" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().close( - # name="projects/some-project/cases/43595344" - # ) - # print(request.execute()) - # ``` - # # @overload close_case(request, options = nil) # Pass arguments to `close_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::CloseCaseRequest} or an equivalent Hash. @@ -1172,32 +924,6 @@ def close_case request, options = nil # stops returning it. After six months, `case.create` requests using the # classification will fail. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version="v2", - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", - # ) - # request = supportApiService.caseClassifications().search( - # query='display_name:"*Compute Engine*"' - # ) - # print(request.execute()) - # ``` - # # @overload search_case_classifications(request, options = nil) # Pass arguments to `search_case_classifications` via a request object, either of type # {::Google::Cloud::Support::V2beta::SearchCaseClassificationsRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service/rest/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service/rest/client.rb index ca2f858d970c..4e48c125ebfb 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service/rest/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service/rest/client.rb @@ -207,35 +207,6 @@ def logger ## # Retrieve a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/16033687" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # - # request = supportApiService.cases().get( - # name="projects/some-project/cases/43595344", - # ) - # print(request.execute()) - # ``` - # # @overload get_case(request, options = nil) # Pass arguments to `get_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::GetCaseRequest} or an equivalent Hash. @@ -318,34 +289,6 @@ def get_case request, options = nil # that are directly parented by that organization. To retrieve cases # under an organization and its projects, use `cases.search`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # - # request = - # supportApiService.cases().list(parent="projects/some-project") - # print(request.execute()) - # ``` - # # @overload list_cases(request, options = nil) # Pass arguments to `list_cases` via a request object, either of type # {::Google::Cloud::Support::V2beta::ListCasesRequest} or an equivalent Hash. @@ -458,34 +401,6 @@ def list_cases request, options = nil ## # Search for cases using a query. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases:search" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().search( - # parent="projects/some-project", query="state=OPEN" - # ) - # print(request.execute()) - # ``` - # # @overload search_cases(request, options = nil) # Pass arguments to `search_cases` via a request object, either of type # {::Google::Cloud::Support::V2beta::SearchCasesRequest} or an equivalent Hash. @@ -613,61 +528,6 @@ def search_cases request, options = nil # `classification`, and `priority`. If you're just testing the API and don't # want to route your case to an agent, set `testCase=true`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "display_name": "Test case created by me.", - # "description": "a random test case, feel free to close", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # "time_zone": "-07:00", - # "subscriber_email_addresses": [ - # "foo@domain.com", - # "bar@domain.com" - # ], - # "testCase": true, - # "priority": "P3" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().create( - # parent="projects/some-project", - # body={ - # "displayName": "A Test Case", - # "description": "This is a test case.", - # "testCase": True, - # "priority": "P2", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # }, - # ) - # print(request.execute()) - # ``` - # # @overload create_case(request, options = nil) # Pass arguments to `create_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::CreateCaseRequest} or an equivalent Hash. @@ -748,43 +608,6 @@ def create_case request, options = nil ## # Update a case. Only some fields can be updated. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request PATCH \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "priority": "P1" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().patch( - # name="projects/some-project/cases/43112854", - # body={ - # "displayName": "This is Now a New Title", - # "priority": "P2", - # }, - # ) - # print(request.execute()) - # ``` - # # @overload update_case(request, options = nil) # Pass arguments to `update_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::UpdateCaseRequest} or an equivalent Hash. @@ -878,48 +701,6 @@ def update_case request, options = nil # escalations' in the feature list to find out which ones let you # do that. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation." - # } - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case:escalate" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().escalate( - # name="projects/some-project/cases/43595344", - # body={ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation.", - # }, - # }, - # ) - # print(request.execute()) - # ``` - # # @overload escalate_case(request, options = nil) # Pass arguments to `escalate_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::EscalateCaseRequest} or an equivalent Hash. @@ -1000,35 +781,6 @@ def escalate_case request, options = nil ## # Close a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case:close" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().close( - # name="projects/some-project/cases/43595344" - # ) - # print(request.execute()) - # ``` - # # @overload close_case(request, options = nil) # Pass arguments to `close_case` via a request object, either of type # {::Google::Cloud::Support::V2beta::CloseCaseRequest} or an equivalent Hash. @@ -1116,32 +868,6 @@ def close_case request, options = nil # stops returning it. After six months, `case.create` requests using the # classification will fail. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version="v2", - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", - # ) - # request = supportApiService.caseClassifications().search( - # query='display_name:"*Compute Engine*"' - # ) - # print(request.execute()) - # ``` - # # @overload search_case_classifications(request, options = nil) # Pass arguments to `search_case_classifications` via a request object, either of type # {::Google::Cloud::Support::V2beta::SearchCaseClassificationsRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service_services_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service_services_pb.rb index bee6de21c383..8425b7116aa8 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service_services_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_service_services_pb.rb @@ -34,199 +34,22 @@ class Service self.service_name = 'google.cloud.support.v2beta.CaseService' # Retrieve a case. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/16033687" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # - # request = supportApiService.cases().get( - # name="projects/some-project/cases/43595344", - # ) - # print(request.execute()) - # ``` rpc :GetCase, ::Google::Cloud::Support::V2beta::GetCaseRequest, ::Google::Cloud::Support::V2beta::Case # Retrieve all cases under a parent, but not its children. # # For example, listing cases under an organization only returns the cases # that are directly parented by that organization. To retrieve cases # under an organization and its projects, use `cases.search`. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # - # request = - # supportApiService.cases().list(parent="projects/some-project") - # print(request.execute()) - # ``` rpc :ListCases, ::Google::Cloud::Support::V2beta::ListCasesRequest, ::Google::Cloud::Support::V2beta::ListCasesResponse # Search for cases using a query. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases:search" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().search( - # parent="projects/some-project", query="state=OPEN" - # ) - # print(request.execute()) - # ``` rpc :SearchCases, ::Google::Cloud::Support::V2beta::SearchCasesRequest, ::Google::Cloud::Support::V2beta::SearchCasesResponse # Create a new case and associate it with a parent. # # It must have the following fields set: `display_name`, `description`, # `classification`, and `priority`. If you're just testing the API and don't # want to route your case to an agent, set `testCase=true`. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "display_name": "Test case created by me.", - # "description": "a random test case, feel free to close", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # "time_zone": "-07:00", - # "subscriber_email_addresses": [ - # "foo@domain.com", - # "bar@domain.com" - # ], - # "testCase": true, - # "priority": "P3" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().create( - # parent="projects/some-project", - # body={ - # "displayName": "A Test Case", - # "description": "This is a test case.", - # "testCase": True, - # "priority": "P2", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # }, - # ) - # print(request.execute()) - # ``` rpc :CreateCase, ::Google::Cloud::Support::V2beta::CreateCaseRequest, ::Google::Cloud::Support::V2beta::Case # Update a case. Only some fields can be updated. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request PATCH \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "priority": "P1" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().patch( - # name="projects/some-project/cases/43112854", - # body={ - # "displayName": "This is Now a New Title", - # "priority": "P2", - # }, - # ) - # print(request.execute()) - # ``` rpc :UpdateCase, ::Google::Cloud::Support::V2beta::UpdateCaseRequest, ::Google::Cloud::Support::V2beta::Case # Escalate a case, starting the Google Cloud Support escalation management # process. @@ -235,79 +58,8 @@ class Service # https://cloud.google.com/support and look for 'Technical support # escalations' in the feature list to find out which ones let you # do that. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation." - # } - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case:escalate" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().escalate( - # name="projects/some-project/cases/43595344", - # body={ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation.", - # }, - # }, - # ) - # print(request.execute()) - # ``` rpc :EscalateCase, ::Google::Cloud::Support::V2beta::EscalateCaseRequest, ::Google::Cloud::Support::V2beta::Case # Close a case. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case:close" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().close( - # name="projects/some-project/cases/43595344" - # ) - # print(request.execute()) - # ``` rpc :CloseCase, ::Google::Cloud::Support::V2beta::CloseCaseRequest, ::Google::Cloud::Support::V2beta::Case # Retrieve valid classifications to use when creating a support case. # @@ -319,32 +71,6 @@ class Service # months. When a classification is deactivated, this endpoint immediately # stops returning it. After six months, `case.create` requests using the # classification will fail. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version="v2", - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", - # ) - # request = supportApiService.caseClassifications().search( - # query='display_name:"*Compute Engine*"' - # ) - # print(request.execute()) - # ``` rpc :SearchCaseClassifications, ::Google::Cloud::Support::V2beta::SearchCaseClassificationsRequest, ::Google::Cloud::Support::V2beta::SearchCaseClassificationsResponse end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/client.rb index e91908a427e4..7952abac780e 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/client.rb @@ -193,36 +193,6 @@ def logger ## # List all the comments associated with a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` - # # @overload list_comments(request, options = nil) # Pass arguments to `list_comments` via a request object, either of type # {::Google::Cloud::Support::V2beta::ListCommentsRequest} or an equivalent Hash. @@ -321,44 +291,6 @@ def list_comments request, options = nil # # The comment must have the following fields set: `body`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43591344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "body": "This is a test comment." - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .create( - # parent="projects/some-project/cases/43595344", - # body=\\{"body": "This is a test comment."}, - # ) - # ) - # print(request.execute()) - # ``` - # # @overload create_comment(request, options = nil) # Pass arguments to `create_comment` via a request object, either of type # {::Google::Cloud::Support::V2beta::CreateCommentRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/client.rb index 950f9a3eb41c..c9b2c01e5c17 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/client.rb @@ -186,36 +186,6 @@ def logger ## # List all the comments associated with a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` - # # @overload list_comments(request, options = nil) # Pass arguments to `list_comments` via a request object, either of type # {::Google::Cloud::Support::V2beta::ListCommentsRequest} or an equivalent Hash. @@ -307,44 +277,6 @@ def list_comments request, options = nil # # The comment must have the following fields set: `body`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43591344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "body": "This is a test comment." - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .create( - # parent="projects/some-project/cases/43595344", - # body=\\{"body": "This is a test comment."}, - # ) - # ) - # print(request.execute()) - # ``` - # # @overload create_comment(request, options = nil) # Pass arguments to `create_comment` via a request object, either of type # {::Google::Cloud::Support::V2beta::CreateCommentRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_services_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_services_pb.rb index 700329b58f5a..4e6b09604018 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_services_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_services_pb.rb @@ -34,78 +34,10 @@ class Service self.service_name = 'google.cloud.support.v2beta.CommentService' # List all the comments associated with a case. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` rpc :ListComments, ::Google::Cloud::Support::V2beta::ListCommentsRequest, ::Google::Cloud::Support::V2beta::ListCommentsResponse # Add a new comment to a case. # # The comment must have the following fields set: `body`. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43591344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "body": "This is a test comment." - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .create( - # parent="projects/some-project/cases/43595344", - # body={"body": "This is a test comment."}, - # ) - # ) - # print(request.execute()) - # ``` rpc :CreateComment, ::Google::Cloud::Support::V2beta::CreateCommentRequest, ::Google::Cloud::Support::V2beta::Comment end diff --git a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/actor.rb b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/actor.rb index 581a8dbf028d..29a3e47aa8ea 100644 --- a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/actor.rb +++ b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/actor.rb @@ -38,7 +38,7 @@ module V2beta # email must also be provided. If the user is a Google Support agent, this is # obfuscated. # - # This field is deprecated. Use **username** field instead. + # This field is deprecated. Use `username` instead. # @!attribute [r] google_support # @return [::Boolean] # Output only. Whether the actor is a Google support actor. diff --git a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/attachment.rb b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/attachment.rb index cae371b5ec84..008e94c3dda0 100644 --- a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/attachment.rb +++ b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/attachment.rb @@ -31,7 +31,7 @@ module V2beta # "comment" level. # @!attribute [r] name # @return [::String] - # Output only. The resource name of the attachment. + # Output only. Identifier. The resource name of the attachment. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the attachment was created. diff --git a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/case.rb b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/case.rb index e087f71bbee2..ae01f6a63647 100644 --- a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/case.rb +++ b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/case.rb @@ -50,7 +50,7 @@ module V2beta # about project identifiers, see [AIP-2510](https://google.aip.dev/cloud/2510). # @!attribute [rw] name # @return [::String] - # The resource name for the case. + # Identifier. The resource name for the case. # @!attribute [rw] display_name # @return [::String] # The short summary of the issue reported in this case. From b06976e1c89a1ace64100b6804a81c7fd138323e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 12:32:37 -0700 Subject: [PATCH 033/457] feat: add max_results, filter, data_store_specs options to VertexAISearch. (#30429) --- .../lib/google/cloud/aiplatform/v1/tool_pb.rb | 3 +- .../google/cloud/aiplatform/v1/tool.rb | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb index 78c82ee42486..5e9eb0b5398d 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb @@ -11,7 +11,7 @@ require 'google/type/latlng_pb' -descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\x81\x04\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x1a\x0e\n\x0cGoogleSearch\x1a\x0f\n\rCodeExecution\"\xba\x01\n\x13\x46unctionDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"U\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"=\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"\x15\n\x13\x45nterpriseWebSearch\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\x81\x04\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x1a\x0e\n\x0cGoogleSearch\x1a\x0f\n\rCodeExecution\"\xba\x01\n\x13\x46unctionDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"U\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"\xfa\x01\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmax_results\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12R\n\x10\x64\x61ta_store_specs\x18\x05 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec\x1a\x38\n\rDataStoreSpec\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"\x15\n\x13\x45nterpriseWebSearch\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -58,6 +58,7 @@ module V1 VertexRagStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.VertexRagStore").msgclass VertexRagStore::RagResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.VertexRagStore.RagResource").msgclass VertexAISearch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.VertexAISearch").msgclass + VertexAISearch::DataStoreSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec").msgclass GoogleSearchRetrieval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GoogleSearchRetrieval").msgclass EnterpriseWebSearch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.EnterpriseWebSearch").msgclass DynamicRetrievalConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DynamicRetrievalConfig").msgclass diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb index 9189e3c4e4a3..a68438368db1 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb @@ -289,9 +289,41 @@ class RagResource # Optional. Fully-qualified Vertex AI Search engine resource ID. # Format: # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + # @!attribute [rw] max_results + # @return [::Integer] + # Optional. Number of search results to return per query. + # The default value is 10. + # The maximumm allowed value is 10. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter strings to be passed to the search API. + # @!attribute [rw] data_store_specs + # @return [::Array<::Google::Cloud::AIPlatform::V1::VertexAISearch::DataStoreSpec>] + # Specifications that define the specific DataStores to be searched, along + # with configurations for those data stores. This is only considered for + # Engines with multiple data stores. + # It should only be set if engine is used. class VertexAISearch include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # Define data stores within engine to filter on in a search call and + # configurations for those data stores. For more information, see + # https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec + # @!attribute [rw] data_store + # @return [::String] + # Full resource name of DataStore, such as + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter specification to filter documents in the data store + # specified by data_store field. For more information on filtering, see + # [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + class DataStoreSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # Tool to retrieve public web data for grounding, powered by Google. From d85a470ad2f728d800da828e351930ba72645bef Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 12:33:55 -0700 Subject: [PATCH 034/457] docs: Update Cloud Support RPC comments to no longer include cURL and Python examples (#30428) docs: Minor updates --- .../google/cloud/support/v2/attachment_pb.rb | 2 +- .../v2/attachment_service_services_pb.rb | 30 -- .../v2/case_attachment_service/client.rb | 30 -- .../lib/google/cloud/support/v2/case_pb.rb | 2 +- .../cloud/support/v2/case_service/client.rb | 274 ------------------ .../support/v2/case_service_services_pb.rb | 274 ------------------ .../support/v2/comment_service/client.rb | 68 ----- .../support/v2/comment_service_services_pb.rb | 68 ----- .../google/cloud/support/v2/actor.rb | 2 +- .../google/cloud/support/v2/attachment.rb | 2 +- .../google/cloud/support/v2/case.rb | 2 +- 11 files changed, 5 insertions(+), 749 deletions(-) diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/attachment_pb.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/attachment_pb.rb index b7590a18b662..9a2776d689a9 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/attachment_pb.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/attachment_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n(google/cloud/support/v2/attachment.proto\x12\x17google.cloud.support.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/support/v2/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x03\n\nAttachment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x07\x63reator\x18\x03 \x01(\x0b\x32\x1e.google.cloud.support.v2.ActorB\x03\xe0\x41\x03\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x16\n\tmime_type\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03:\xb0\x01\xea\x41\xac\x01\n&cloudsupport.googleapis.com/Attachment\x12\x45organizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xb8\x01\n\x1b\x63om.google.cloud.support.v2B\x0f\x41ttachmentProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xaa\x02\x17Google.Cloud.Support.V2\xca\x02\x17Google\\Cloud\\Support\\V2\xea\x02\x1aGoogle::Cloud::Support::V2b\x06proto3" +descriptor_data = "\n(google/cloud/support/v2/attachment.proto\x12\x17google.cloud.support.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/support/v2/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x84\x03\n\nAttachment\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x07\x63reator\x18\x03 \x01(\x0b\x32\x1e.google.cloud.support.v2.ActorB\x03\xe0\x41\x03\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x16\n\tmime_type\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03:\xb0\x01\xea\x41\xac\x01\n&cloudsupport.googleapis.com/Attachment\x12\x45organizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xb8\x01\n\x1b\x63om.google.cloud.support.v2B\x0f\x41ttachmentProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xaa\x02\x17Google.Cloud.Support.V2\xca\x02\x17Google\\Cloud\\Support\\V2\xea\x02\x1aGoogle::Cloud::Support::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/attachment_service_services_pb.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/attachment_service_services_pb.rb index 57e1fd44f1d4..523fcd6b83d7 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/attachment_service_services_pb.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/attachment_service_services_pb.rb @@ -34,36 +34,6 @@ class Service self.service_name = 'google.cloud.support.v2.CaseAttachmentService' # List all the attachments associated with a support case. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/23598314" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/attachments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = ( - # supportApiService.cases() - # .attachments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` rpc :ListAttachments, ::Google::Cloud::Support::V2::ListAttachmentsRequest, ::Google::Cloud::Support::V2::ListAttachmentsResponse end diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/case_attachment_service/client.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/case_attachment_service/client.rb index 8c6d89a71e72..70ac8d3b52f4 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/case_attachment_service/client.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/case_attachment_service/client.rb @@ -191,36 +191,6 @@ def logger ## # List all the attachments associated with a support case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/23598314" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/attachments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .attachments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` - # # @overload list_attachments(request, options = nil) # Pass arguments to `list_attachments` via a request object, either of type # {::Google::Cloud::Support::V2::ListAttachmentsRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/case_pb.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/case_pb.rb index 0423b85f9563..8d06fee37580 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/case_pb.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/case_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n\"google/cloud/support/v2/case.proto\x12\x17google.cloud.support.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/support/v2/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe1\x06\n\x04\x43\x61se\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x43\n\x0e\x63lassification\x18\x04 \x01(\x0b\x32+.google.cloud.support.v2.CaseClassification\x12\x11\n\ttime_zone\x18\x08 \x01(\t\x12\"\n\x1asubscriber_email_addresses\x18\t \x03(\t\x12\x37\n\x05state\x18\x0c \x01(\x0e\x32#.google.cloud.support.v2.Case.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12/\n\x07\x63reator\x18\x0f \x01(\x0b\x32\x1e.google.cloud.support.v2.Actor\x12\x15\n\rcontact_email\x18# \x01(\t\x12\x11\n\tescalated\x18\x11 \x01(\x08\x12\x11\n\ttest_case\x18\x13 \x01(\x08\x12\x15\n\rlanguage_code\x18\x17 \x01(\t\x12\x38\n\x08priority\x18 \x01(\x0e\x32&.google.cloud.support.v2.Case.Priority\"\x7f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x1e\n\x1aIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x03\x12\x15\n\x11SOLUTION_PROVIDED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05\"L\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\n\x02P0\x10\x01\x12\x06\n\x02P1\x10\x02\x12\x06\n\x02P2\x10\x03\x12\x06\n\x02P3\x10\x04\x12\x06\n\x02P4\x10\x05:q\xea\x41n\n cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1fprojects/{project}/cases/{case}\"6\n\x12\x43\x61seClassification\x12\n\n\x02id\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\tB\xb2\x01\n\x1b\x63om.google.cloud.support.v2B\tCaseProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xaa\x02\x17Google.Cloud.Support.V2\xca\x02\x17Google\\Cloud\\Support\\V2\xea\x02\x1aGoogle::Cloud::Support::V2b\x06proto3" +descriptor_data = "\n\"google/cloud/support/v2/case.proto\x12\x17google.cloud.support.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/support/v2/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe6\x06\n\x04\x43\x61se\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x43\n\x0e\x63lassification\x18\x04 \x01(\x0b\x32+.google.cloud.support.v2.CaseClassification\x12\x11\n\ttime_zone\x18\x08 \x01(\t\x12\"\n\x1asubscriber_email_addresses\x18\t \x03(\t\x12\x37\n\x05state\x18\x0c \x01(\x0e\x32#.google.cloud.support.v2.Case.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12/\n\x07\x63reator\x18\x0f \x01(\x0b\x32\x1e.google.cloud.support.v2.Actor\x12\x15\n\rcontact_email\x18# \x01(\t\x12\x11\n\tescalated\x18\x11 \x01(\x08\x12\x11\n\ttest_case\x18\x13 \x01(\x08\x12\x15\n\rlanguage_code\x18\x17 \x01(\t\x12\x38\n\x08priority\x18 \x01(\x0e\x32&.google.cloud.support.v2.Case.Priority\"\x7f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x1e\n\x1aIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x03\x12\x15\n\x11SOLUTION_PROVIDED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05\"L\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\n\x02P0\x10\x01\x12\x06\n\x02P1\x10\x02\x12\x06\n\x02P2\x10\x03\x12\x06\n\x02P3\x10\x04\x12\x06\n\x02P4\x10\x05:q\xea\x41n\n cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1fprojects/{project}/cases/{case}\"6\n\x12\x43\x61seClassification\x12\n\n\x02id\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\tB\xb2\x01\n\x1b\x63om.google.cloud.support.v2B\tCaseProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xaa\x02\x17Google.Cloud.Support.V2\xca\x02\x17Google\\Cloud\\Support\\V2\xea\x02\x1aGoogle::Cloud::Support::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/case_service/client.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/case_service/client.rb index e2aff2276758..16bbae7db275 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/case_service/client.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/case_service/client.rb @@ -214,35 +214,6 @@ def logger ## # Retrieve a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/16033687" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # - # request = supportApiService.cases().get( - # name="projects/some-project/cases/43595344", - # ) - # print(request.execute()) - # ``` - # # @overload get_case(request, options = nil) # Pass arguments to `get_case` via a request object, either of type # {::Google::Cloud::Support::V2::GetCaseRequest} or an equivalent Hash. @@ -332,34 +303,6 @@ def get_case request, options = nil # that are directly parented by that organization. To retrieve cases # under an organization and its projects, use `cases.search`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # - # request = - # supportApiService.cases().list(parent="projects/some-project") - # print(request.execute()) - # ``` - # # @overload list_cases(request, options = nil) # Pass arguments to `list_cases` via a request object, either of type # {::Google::Cloud::Support::V2::ListCasesRequest} or an equivalent Hash. @@ -476,34 +419,6 @@ def list_cases request, options = nil ## # Search for cases using a query. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases:search" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().search( - # parent="projects/some-project", query="state=OPEN" - # ) - # print(request.execute()) - # ``` - # # @overload search_cases(request, options = nil) # Pass arguments to `search_cases` via a request object, either of type # {::Google::Cloud::Support::V2::SearchCasesRequest} or an equivalent Hash. @@ -638,61 +553,6 @@ def search_cases request, options = nil # `classification`, and `priority`. If you're just testing the API and don't # want to route your case to an agent, set `testCase=true`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "display_name": "Test case created by me.", - # "description": "a random test case, feel free to close", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # "time_zone": "-07:00", - # "subscriber_email_addresses": [ - # "foo@domain.com", - # "bar@domain.com" - # ], - # "testCase": true, - # "priority": "P3" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().create( - # parent="projects/some-project", - # body={ - # "displayName": "A Test Case", - # "description": "This is a test case.", - # "testCase": True, - # "priority": "P2", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # }, - # ) - # print(request.execute()) - # ``` - # # @overload create_case(request, options = nil) # Pass arguments to `create_case` via a request object, either of type # {::Google::Cloud::Support::V2::CreateCaseRequest} or an equivalent Hash. @@ -780,43 +640,6 @@ def create_case request, options = nil ## # Update a case. Only some fields can be updated. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request PATCH \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "priority": "P1" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().patch( - # name="projects/some-project/cases/43112854", - # body={ - # "displayName": "This is Now a New Title", - # "priority": "P2", - # }, - # ) - # print(request.execute()) - # ``` - # # @overload update_case(request, options = nil) # Pass arguments to `update_case` via a request object, either of type # {::Google::Cloud::Support::V2::UpdateCaseRequest} or an equivalent Hash. @@ -917,48 +740,6 @@ def update_case request, options = nil # escalations' in the feature list to find out which ones let you # do that. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation." - # } - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case:escalate" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().escalate( - # name="projects/some-project/cases/43595344", - # body={ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation.", - # }, - # }, - # ) - # print(request.execute()) - # ``` - # # @overload escalate_case(request, options = nil) # Pass arguments to `escalate_case` via a request object, either of type # {::Google::Cloud::Support::V2::EscalateCaseRequest} or an equivalent Hash. @@ -1046,35 +827,6 @@ def escalate_case request, options = nil ## # Close a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case:close" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = supportApiService.cases().close( - # name="projects/some-project/cases/43595344" - # ) - # print(request.execute()) - # ``` - # # @overload close_case(request, options = nil) # Pass arguments to `close_case` via a request object, either of type # {::Google::Cloud::Support::V2::CloseCaseRequest} or an equivalent Hash. @@ -1169,32 +921,6 @@ def close_case request, options = nil # stops returning it. After six months, `case.create` requests using the # classification will fail. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version="v2", - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", - # ) - # request = supportApiService.caseClassifications().search( - # query='display_name:"*Compute Engine*"' - # ) - # print(request.execute()) - # ``` - # # @overload search_case_classifications(request, options = nil) # Pass arguments to `search_case_classifications` via a request object, either of type # {::Google::Cloud::Support::V2::SearchCaseClassificationsRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/case_service_services_pb.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/case_service_services_pb.rb index 9ca798fbbd3d..61eb673337a5 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/case_service_services_pb.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/case_service_services_pb.rb @@ -34,199 +34,22 @@ class Service self.service_name = 'google.cloud.support.v2.CaseService' # Retrieve a case. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/16033687" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # - # request = supportApiService.cases().get( - # name="projects/some-project/cases/43595344", - # ) - # print(request.execute()) - # ``` rpc :GetCase, ::Google::Cloud::Support::V2::GetCaseRequest, ::Google::Cloud::Support::V2::Case # Retrieve all cases under a parent, but not its children. # # For example, listing cases under an organization only returns the cases # that are directly parented by that organization. To retrieve cases # under an organization and its projects, use `cases.search`. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # - # request = - # supportApiService.cases().list(parent="projects/some-project") - # print(request.execute()) - # ``` rpc :ListCases, ::Google::Cloud::Support::V2::ListCasesRequest, ::Google::Cloud::Support::V2::ListCasesResponse # Search for cases using a query. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases:search" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().search( - # parent="projects/some-project", query="state=OPEN" - # ) - # print(request.execute()) - # ``` rpc :SearchCases, ::Google::Cloud::Support::V2::SearchCasesRequest, ::Google::Cloud::Support::V2::SearchCasesResponse # Create a new case and associate it with a parent. # # It must have the following fields set: `display_name`, `description`, # `classification`, and `priority`. If you're just testing the API and don't # want to route your case to an agent, set `testCase=true`. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # parent="projects/some-project" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "display_name": "Test case created by me.", - # "description": "a random test case, feel free to close", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # "time_zone": "-07:00", - # "subscriber_email_addresses": [ - # "foo@domain.com", - # "bar@domain.com" - # ], - # "testCase": true, - # "priority": "P3" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$parent/cases" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().create( - # parent="projects/some-project", - # body={ - # "displayName": "A Test Case", - # "description": "This is a test case.", - # "testCase": True, - # "priority": "P2", - # "classification": { - # "id": - # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" - # }, - # }, - # ) - # print(request.execute()) - # ``` rpc :CreateCase, ::Google::Cloud::Support::V2::CreateCaseRequest, ::Google::Cloud::Support::V2::Case # Update a case. Only some fields can be updated. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request PATCH \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "priority": "P1" - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().patch( - # name="projects/some-project/cases/43112854", - # body={ - # "displayName": "This is Now a New Title", - # "priority": "P2", - # }, - # ) - # print(request.execute()) - # ``` rpc :UpdateCase, ::Google::Cloud::Support::V2::UpdateCaseRequest, ::Google::Cloud::Support::V2::Case # Escalate a case, starting the Google Cloud Support escalation management # process. @@ -235,79 +58,8 @@ class Service # https://cloud.google.com/support and look for 'Technical support # escalations' in the feature list to find out which ones let you # do that. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header "Content-Type: application/json" \ - # --data '{ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation." - # } - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case:escalate" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().escalate( - # name="projects/some-project/cases/43595344", - # body={ - # "escalation": { - # "reason": "BUSINESS_IMPACT", - # "justification": "This is a test escalation.", - # }, - # }, - # ) - # print(request.execute()) - # ``` rpc :EscalateCase, ::Google::Cloud::Support::V2::EscalateCaseRequest, ::Google::Cloud::Support::V2::Case # Close a case. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case:close" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = supportApiService.cases().close( - # name="projects/some-project/cases/43595344" - # ) - # print(request.execute()) - # ``` rpc :CloseCase, ::Google::Cloud::Support::V2::CloseCaseRequest, ::Google::Cloud::Support::V2::Case # Retrieve valid classifications to use when creating a support case. # @@ -319,32 +71,6 @@ class Service # months. When a classification is deactivated, this endpoint immediately # stops returning it. After six months, `case.create` requests using the # classification will fail. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version="v2", - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", - # ) - # request = supportApiService.caseClassifications().search( - # query='display_name:"*Compute Engine*"' - # ) - # print(request.execute()) - # ``` rpc :SearchCaseClassifications, ::Google::Cloud::Support::V2::SearchCaseClassificationsRequest, ::Google::Cloud::Support::V2::SearchCaseClassificationsResponse end diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/comment_service/client.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/comment_service/client.rb index 45197f7a39e4..c6471619d8bb 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/comment_service/client.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/comment_service/client.rb @@ -193,36 +193,6 @@ def logger ## # List all the comments associated with a case. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` - # # @overload list_comments(request, options = nil) # Pass arguments to `list_comments` via a request object, either of type # {::Google::Cloud::Support::V2::ListCommentsRequest} or an equivalent Hash. @@ -321,44 +291,6 @@ def list_comments request, options = nil # # The comment must have the following fields set: `body`. # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43591344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "body": "This is a test comment." - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .create( - # parent="projects/some-project/cases/43595344", - # body=\\{"body": "This is a test comment."}, - # ) - # ) - # print(request.execute()) - # ``` - # # @overload create_comment(request, options = nil) # Pass arguments to `create_comment` via a request object, either of type # {::Google::Cloud::Support::V2::CreateCommentRequest} or an equivalent Hash. diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/comment_service_services_pb.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/comment_service_services_pb.rb index a7c0060ae91f..667513cb3cce 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/comment_service_services_pb.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/comment_service_services_pb.rb @@ -34,78 +34,10 @@ class Service self.service_name = 'google.cloud.support.v2.CommentService' # List all the comments associated with a case. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43595344" - # curl \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .list(parent="projects/some-project/cases/43595344") - # ) - # print(request.execute()) - # ``` rpc :ListComments, ::Google::Cloud::Support::V2::ListCommentsRequest, ::Google::Cloud::Support::V2::ListCommentsResponse # Add a new comment to a case. # # The comment must have the following fields set: `body`. - # - # EXAMPLES: - # - # cURL: - # - # ```shell - # case="projects/some-project/cases/43591344" - # curl \ - # --request POST \ - # --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - # --header 'Content-Type: application/json' \ - # --data '{ - # "body": "This is a test comment." - # }' \ - # "https://cloudsupport.googleapis.com/v2/$case/comments" - # ``` - # - # Python: - # - # ```python - # import googleapiclient.discovery - # - # api_version = "v2" - # supportApiService = googleapiclient.discovery.build( - # serviceName="cloudsupport", - # version=api_version, - # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - # ) - # request = ( - # supportApiService.cases() - # .comments() - # .create( - # parent="projects/some-project/cases/43595344", - # body={"body": "This is a test comment."}, - # ) - # ) - # print(request.execute()) - # ``` rpc :CreateComment, ::Google::Cloud::Support::V2::CreateCommentRequest, ::Google::Cloud::Support::V2::Comment end diff --git a/google-cloud-support-v2/proto_docs/google/cloud/support/v2/actor.rb b/google-cloud-support-v2/proto_docs/google/cloud/support/v2/actor.rb index 31832c33ba7c..6641c9eb3365 100644 --- a/google-cloud-support-v2/proto_docs/google/cloud/support/v2/actor.rb +++ b/google-cloud-support-v2/proto_docs/google/cloud/support/v2/actor.rb @@ -38,7 +38,7 @@ module V2 # email must also be provided. If the user is a Google Support agent, this is # obfuscated. # - # This field is deprecated. Use **username** field instead. + # This field is deprecated. Use `username` instead. # @!attribute [r] google_support # @return [::Boolean] # Output only. Whether the actor is a Google support actor. diff --git a/google-cloud-support-v2/proto_docs/google/cloud/support/v2/attachment.rb b/google-cloud-support-v2/proto_docs/google/cloud/support/v2/attachment.rb index 540124d2abc2..734454965e9b 100644 --- a/google-cloud-support-v2/proto_docs/google/cloud/support/v2/attachment.rb +++ b/google-cloud-support-v2/proto_docs/google/cloud/support/v2/attachment.rb @@ -31,7 +31,7 @@ module V2 # "comment" level. # @!attribute [r] name # @return [::String] - # Output only. The resource name of the attachment. + # Output only. Identifier. The resource name of the attachment. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the attachment was created. diff --git a/google-cloud-support-v2/proto_docs/google/cloud/support/v2/case.rb b/google-cloud-support-v2/proto_docs/google/cloud/support/v2/case.rb index b34e3e1988b6..d8e2c944a241 100644 --- a/google-cloud-support-v2/proto_docs/google/cloud/support/v2/case.rb +++ b/google-cloud-support-v2/proto_docs/google/cloud/support/v2/case.rb @@ -50,7 +50,7 @@ module V2 # about project identifiers, see [AIP-2510](https://google.aip.dev/cloud/2510). # @!attribute [rw] name # @return [::String] - # The resource name for the case. + # Identifier. The resource name for the case. # @!attribute [rw] display_name # @return [::String] # The short summary of the issue reported in this case. From 3d00119f5dde441369b3f457e07b6386e367fa89 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 12:42:06 -0700 Subject: [PATCH 035/457] feat: Add new method signature `parent,online_return_policy` to `CreateOnlineReturnPolicy` (#30431) docs: Minor updates --- .../v1beta/online_return_policy_pb.rb | 4 +- .../online_return_policy_service/client.rb | 24 ++++- .../rest/client.rb | 24 ++++- .../online_return_policy_services_pb.rb | 2 +- .../accounts/v1beta/online_return_policy.rb | 96 +++++++++++-------- 5 files changed, 100 insertions(+), 50 deletions(-) diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb index d5420095978e..29baad2715be 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb @@ -14,7 +14,7 @@ require 'google/type/date_pb' -descriptor_data = "\nCgoogle/shopping/merchant/accounts/v1beta/online_return_policy.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\x1a\x16google/type/date.proto\"c\n\x1cGetOnlineReturnPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OnlineReturnPolicy\"\x99\x01\n\x1fListOnlineReturnPoliciesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-merchantapi.googleapis.com/OnlineReturnPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc9\x01\n\x1f\x43reateOnlineReturnPolicyRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-merchantapi.googleapis.com/OnlineReturnPolicy\x12_\n\x14online_return_policy\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyB\x03\xe0\x41\x02\"\xb3\x01\n\x1fUpdateOnlineReturnPolicyRequest\x12_\n\x14online_return_policy\x18\x01 \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"f\n\x1f\x44\x65leteOnlineReturnPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OnlineReturnPolicy\"\x99\x01\n ListOnlineReturnPoliciesResponse\x12\\\n\x16online_return_policies\x18\x01 \x03(\x0b\x32<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x88\x12\n\x12OnlineReturnPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1d\n\x10return_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x05label\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\tcountries\x18\x04 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12X\n\x06policy\x18\x05 \x01(\x0b\x32\x43.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.PolicyB\x03\xe0\x41\x01\x12n\n\x12seasonal_overrides\x18\x0e \x03(\x0b\x32M.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.SeasonalOverrideB\x03\xe0\x41\x01\x12g\n\x0erestocking_fee\x18\x06 \x01(\x0b\x32J.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFeeB\x03\xe0\x41\x01\x12\x66\n\x0ereturn_methods\x18\x07 \x03(\x0e\x32I.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethodB\x03\xe0\x41\x01\x12h\n\x0fitem_conditions\x18\x08 \x03(\x0e\x32J.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemConditionB\x03\xe0\x41\x01\x12p\n\x13return_shipping_fee\x18\t \x01(\x0b\x32N.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFeeB\x03\xe0\x41\x01\x12\x1e\n\x11return_policy_uri\x18\n \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15\x61\x63\x63\x65pt_defective_only\x18\x0b \x01(\x08H\x00\x88\x01\x01\x12 \n\x13process_refund_days\x18\x0c \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0f\x61\x63\x63\x65pt_exchange\x18\r \x01(\x08H\x02\x88\x01\x01\x12p\n\x13return_label_source\x18\x0f \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnLabelSourceH\x03\x88\x01\x01\x1a\xf4\x01\n\x11ReturnShippingFee\x12\x66\n\x04type\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee.TypeB\x03\xe0\x41\x02\x12.\n\tfixed_fee\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\"G\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x1e\n\x1a\x43USTOMER_PAYING_ACTUAL_FEE\x10\x02\x1a\x62\n\rRestockingFee\x12\x30\n\tfixed_fee\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x17\n\rmicro_percent\x18\x02 \x01(\x05H\x00\x42\x06\n\x04type\x1a\xd5\x01\n\x06Policy\x12V\n\x04type\x18\x01 \x01(\x0e\x32H.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy.Type\x12\x0c\n\x04\x64\x61ys\x18\x02 \x01(\x03\"e\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12!\n\x1dNUMBER_OF_DAYS_AFTER_DELIVERY\x10\x01\x12\x0e\n\nNO_RETURNS\x10\x02\x12\x14\n\x10LIFETIME_RETURNS\x10\x03\x1a\xd4\x01\n\x10SeasonalOverride\x12\x15\n\x0breturn_days\x18\x05 \x01(\x05H\x00\x12.\n\x11return_until_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x12\n\x05label\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\nstart_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x03 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x42\x0f\n\rreturn_window\"X\n\x0cReturnMethod\x12\x1d\n\x19RETURN_METHOD_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42Y_MAIL\x10\x01\x12\x0c\n\x08IN_STORE\x10\x02\x12\x0e\n\nAT_A_KIOSK\x10\x03\"B\n\rItemCondition\x12\x1e\n\x1aITEM_CONDITION_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x08\n\x04USED\x10\x02\"\x81\x01\n\x11ReturnLabelSource\x12#\n\x1fRETURN_LABEL_SOURCE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x44OWNLOAD_AND_PRINT\x10\x01\x12\x12\n\x0eIN_THE_PACKAGE\x10\x02\x12\x1b\n\x17\x43USTOMER_RESPONSIBILITY\x10\x03:\x96\x01\xea\x41\x92\x01\n-merchantapi.googleapis.com/OnlineReturnPolicy\x12\x37\x61\x63\x63ounts/{account}/onlineReturnPolicies/{return_policy}*\x14onlineReturnPolicies2\x12onlineReturnPolicyB\x18\n\x16_accept_defective_onlyB\x16\n\x14_process_refund_daysB\x12\n\x10_accept_exchangeB\x16\n\x14_return_label_source2\xd8\n\n\x19OnlineReturnPolicyService\x12\xe7\x01\n\x15GetOnlineReturnPolicy\x12\x46.google.shopping.merchant.accounts.v1beta.GetOnlineReturnPolicyRequest\x1a<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/accounts/v1beta/{name=accounts/*/onlineReturnPolicies/*}\x12\xfd\x01\n\x18ListOnlineReturnPolicies\x12I.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest\x1aJ.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/accounts/v1beta/{parent=accounts/*}/onlineReturnPolicies\x12\x85\x02\n\x18\x43reateOnlineReturnPolicy\x12I.google.shopping.merchant.accounts.v1beta.CreateOnlineReturnPolicyRequest\x1a<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy\"`\xda\x41\x06parent\x82\xd3\xe4\x93\x02Q\"9/accounts/v1beta/{parent=accounts/*}/onlineReturnPolicies:\x14online_return_policy\x12\xb5\x02\n\x18UpdateOnlineReturnPolicy\x12I.google.shopping.merchant.accounts.v1beta.UpdateOnlineReturnPolicyRequest\x1a<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy\"\x8f\x01\xda\x41 online_return_policy,update_mask\x82\xd3\xe4\x93\x02\x66\x32N/accounts/v1beta/{online_return_policy.name=accounts/*/onlineReturnPolicies/*}:\x14online_return_policy\x12\xc7\x01\n\x18\x44\x65leteOnlineReturnPolicy\x12I.google.shopping.merchant.accounts.v1beta.DeleteOnlineReturnPolicyRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/accounts/v1beta/{name=accounts/*/onlineReturnPolicies/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x99\x01\n,com.google.shopping.merchant.accounts.v1betaB\x17OnlineReturnPolicyProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" +descriptor_data = "\nCgoogle/shopping/merchant/accounts/v1beta/online_return_policy.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\x1a\x16google/type/date.proto\"c\n\x1cGetOnlineReturnPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OnlineReturnPolicy\"\xc9\x01\n\x1f\x43reateOnlineReturnPolicyRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-merchantapi.googleapis.com/OnlineReturnPolicy\x12_\n\x14online_return_policy\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyB\x03\xe0\x41\x02\"\xb8\x01\n\x1fUpdateOnlineReturnPolicyRequest\x12_\n\x14online_return_policy\x18\x01 \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x1f\x44\x65leteOnlineReturnPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OnlineReturnPolicy\"\x99\x01\n\x1fListOnlineReturnPoliciesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-merchantapi.googleapis.com/OnlineReturnPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n ListOnlineReturnPoliciesResponse\x12\\\n\x16online_return_policies\x18\x01 \x03(\x0b\x32<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x12\n\x12OnlineReturnPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1d\n\x10return_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x05label\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\tcountries\x18\x04 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12X\n\x06policy\x18\x05 \x01(\x0b\x32\x43.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.PolicyB\x03\xe0\x41\x01\x12n\n\x12seasonal_overrides\x18\x0e \x03(\x0b\x32M.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.SeasonalOverrideB\x03\xe0\x41\x01\x12g\n\x0erestocking_fee\x18\x06 \x01(\x0b\x32J.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFeeB\x03\xe0\x41\x01\x12\x66\n\x0ereturn_methods\x18\x07 \x03(\x0e\x32I.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethodB\x03\xe0\x41\x01\x12h\n\x0fitem_conditions\x18\x08 \x03(\x0e\x32J.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemConditionB\x03\xe0\x41\x01\x12p\n\x13return_shipping_fee\x18\t \x01(\x0b\x32N.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFeeB\x03\xe0\x41\x01\x12\x1e\n\x11return_policy_uri\x18\n \x01(\tB\x03\xe0\x41\x02\x12\'\n\x15\x61\x63\x63\x65pt_defective_only\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12%\n\x13process_refund_days\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12!\n\x0f\x61\x63\x63\x65pt_exchange\x18\r \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12u\n\x13return_label_source\x18\x0f \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnLabelSourceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x1a\xf4\x01\n\x11ReturnShippingFee\x12\x66\n\x04type\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee.TypeB\x03\xe0\x41\x02\x12.\n\tfixed_fee\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\"G\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x1e\n\x1a\x43USTOMER_PAYING_ACTUAL_FEE\x10\x02\x1a\x62\n\rRestockingFee\x12\x30\n\tfixed_fee\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x17\n\rmicro_percent\x18\x02 \x01(\x05H\x00\x42\x06\n\x04type\x1a\xd5\x01\n\x06Policy\x12V\n\x04type\x18\x01 \x01(\x0e\x32H.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy.Type\x12\x0c\n\x04\x64\x61ys\x18\x02 \x01(\x03\"e\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12!\n\x1dNUMBER_OF_DAYS_AFTER_DELIVERY\x10\x01\x12\x0e\n\nNO_RETURNS\x10\x02\x12\x14\n\x10LIFETIME_RETURNS\x10\x03\x1a\xd4\x01\n\x10SeasonalOverride\x12\x15\n\x0breturn_days\x18\x05 \x01(\x05H\x00\x12.\n\x11return_until_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x12\n\x05label\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\nstart_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x03 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x42\x0f\n\rreturn_window\"X\n\x0cReturnMethod\x12\x1d\n\x19RETURN_METHOD_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42Y_MAIL\x10\x01\x12\x0c\n\x08IN_STORE\x10\x02\x12\x0e\n\nAT_A_KIOSK\x10\x03\"B\n\rItemCondition\x12\x1e\n\x1aITEM_CONDITION_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x08\n\x04USED\x10\x02\"\x81\x01\n\x11ReturnLabelSource\x12#\n\x1fRETURN_LABEL_SOURCE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x44OWNLOAD_AND_PRINT\x10\x01\x12\x12\n\x0eIN_THE_PACKAGE\x10\x02\x12\x1b\n\x17\x43USTOMER_RESPONSIBILITY\x10\x03:\x96\x01\xea\x41\x92\x01\n-merchantapi.googleapis.com/OnlineReturnPolicy\x12\x37\x61\x63\x63ounts/{account}/onlineReturnPolicies/{return_policy}*\x14onlineReturnPolicies2\x12onlineReturnPolicyB\x18\n\x16_accept_defective_onlyB\x16\n\x14_process_refund_daysB\x12\n\x10_accept_exchangeB\x16\n\x14_return_label_source2\xf6\n\n\x19OnlineReturnPolicyService\x12\xe7\x01\n\x15GetOnlineReturnPolicy\x12\x46.google.shopping.merchant.accounts.v1beta.GetOnlineReturnPolicyRequest\x1a<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/accounts/v1beta/{name=accounts/*/onlineReturnPolicies/*}\x12\xfd\x01\n\x18ListOnlineReturnPolicies\x12I.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest\x1aJ.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/accounts/v1beta/{parent=accounts/*}/onlineReturnPolicies\x12\xa3\x02\n\x18\x43reateOnlineReturnPolicy\x12I.google.shopping.merchant.accounts.v1beta.CreateOnlineReturnPolicyRequest\x1a<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy\"~\xda\x41\x06parent\xda\x41\x1bparent,online_return_policy\x82\xd3\xe4\x93\x02Q\"9/accounts/v1beta/{parent=accounts/*}/onlineReturnPolicies:\x14online_return_policy\x12\xb5\x02\n\x18UpdateOnlineReturnPolicy\x12I.google.shopping.merchant.accounts.v1beta.UpdateOnlineReturnPolicyRequest\x1a<.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy\"\x8f\x01\xda\x41 online_return_policy,update_mask\x82\xd3\xe4\x93\x02\x66\x32N/accounts/v1beta/{online_return_policy.name=accounts/*/onlineReturnPolicies/*}:\x14online_return_policy\x12\xc7\x01\n\x18\x44\x65leteOnlineReturnPolicy\x12I.google.shopping.merchant.accounts.v1beta.DeleteOnlineReturnPolicyRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/accounts/v1beta/{name=accounts/*/onlineReturnPolicies/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x99\x01\n,com.google.shopping.merchant.accounts.v1betaB\x17OnlineReturnPolicyProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -49,10 +49,10 @@ module Merchant module Accounts module V1beta GetOnlineReturnPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetOnlineReturnPolicyRequest").msgclass - ListOnlineReturnPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest").msgclass CreateOnlineReturnPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateOnlineReturnPolicyRequest").msgclass UpdateOnlineReturnPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateOnlineReturnPolicyRequest").msgclass DeleteOnlineReturnPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteOnlineReturnPolicyRequest").msgclass + ListOnlineReturnPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest").msgclass ListOnlineReturnPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesResponse").msgclass OnlineReturnPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy").msgclass OnlineReturnPolicy::ReturnShippingFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee").msgclass diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb index 74f3da27df57..171c7a551aae 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb @@ -405,10 +405,10 @@ def list_online_return_policies request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The merchant account for which to create a return policy. + # Required. The merchant account for which the return policy will be created. # Format: `accounts/{account}` # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy to create. + # Required. The return policy object to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] @@ -493,8 +493,24 @@ def create_online_return_policy request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy to update. + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] @@ -561,7 +577,7 @@ def update_online_return_policy request, options = nil end ## - # Deletes an existing return policy for a given merchant. + # Deletes an existing return policy. # # @overload delete_online_return_policy(request, options = nil) # Pass arguments to `delete_online_return_policy` via a request object, either of type diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb index 9a7ea3ef92be..aaf64c4e6214 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb @@ -384,10 +384,10 @@ def list_online_return_policies request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The merchant account for which to create a return policy. + # Required. The merchant account for which the return policy will be created. # Format: `accounts/{account}` # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy to create. + # Required. The return policy object to create. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -465,8 +465,24 @@ def create_online_return_policy request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy to update. + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -526,7 +542,7 @@ def update_online_return_policy request, options = nil end ## - # Deletes an existing return policy for a given merchant. + # Deletes an existing return policy. # # @overload delete_online_return_policy(request, options = nil) # Pass arguments to `delete_online_return_policy` via a request object, either of type diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb index b24917c13b0c..dc6fa57dda92 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb @@ -46,7 +46,7 @@ class Service rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy # Updates an existing return policy for a given merchant. rpc :UpdateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Deletes an existing return policy for a given merchant. + # Deletes an existing return policy. rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty end diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb index e657636c9445..1a94c0383167 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb @@ -32,52 +32,43 @@ class GetOnlineReturnPolicyRequest extend ::Google::Protobuf::MessageExts::ClassMethods end - # Request message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListOnlineReturnPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - # Request message for the `CreateOnlineReturnPolicy` method. # @!attribute [rw] parent # @return [::String] - # Required. The merchant account for which to create a return policy. + # Required. The merchant account for which the return policy will be created. # Format: `accounts/{account}` # @!attribute [rw] online_return_policy # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # Required. The return policy to create. + # Required. The return policy object to create. class CreateOnlineReturnPolicyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # Request message for the `UpdateOnlineReturnPolicy` method. + # Request message for the `UpdateOnlineReturnPolicy` method. The method + # supports field masks and when the mask is provided, only the fields specified + # in the mask are updated. # @!attribute [rw] online_return_policy # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # Required. The return policy to update. + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. # @!attribute [rw] update_mask # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` class UpdateOnlineReturnPolicyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -93,6 +84,33 @@ class DeleteOnlineReturnPolicyRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which to list return policies. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given merchant is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListOnlineReturnPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Response message for the `ListOnlineReturnPolicies` method. # @!attribute [rw] online_return_policies # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] @@ -160,20 +178,20 @@ class ListOnlineReturnPoliciesResponse # check for the policy. It must be a valid URL. # @!attribute [rw] accept_defective_only # @return [::Boolean] - # This field specifies if merchant only accepts defective products for - # returns, and this field is required. + # Optional. This field specifies if merchant + # only accepts defective products for returns. # @!attribute [rw] process_refund_days # @return [::Integer] - # The field specifies the number of days it takes for merchants to process - # refunds, field is optional. + # Optional. The field specifies the number of + # days it takes for merchants to process refunds. # @!attribute [rw] accept_exchange # @return [::Boolean] - # This field specifies if merchant allows customers to exchange products, - # this field is required. + # Optional. This field specifies if merchant + # allows customers to exchange products. # @!attribute [rw] return_label_source # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnLabelSource] - # The field specifies the return label source. This field is required when - # return method is BY_MAIL. + # Optional. The field specifies the return + # label source. class OnlineReturnPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From 9d9829f730da0540b8aa0efdebf56997b16a641c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Thu, 22 May 2025 15:20:07 -0700 Subject: [PATCH 036/457] =?UTF-8?q?Revert=20"feat:=20Initial=20generation?= =?UTF-8?q?=20of=20google-cloud-merchant-issue=5Fresolution-v1=E2=80=A6"?= =?UTF-8?q?=20(#30435)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9b5c2b9ad36f5f6c03b2acf01a17f3ae94d860df. --- .release-please-manifest.json | 2 - .../.OwlBot.yaml | 3 - .../.gitignore | 22 - .../.owlbot-manifest.json | 49 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 ---- .../README.md | 154 --- .../Rakefile | 169 ---- .../gapic_metadata.json | 33 - ...d-merchant-issue_resolution-v1beta.gemspec | 28 - ...-cloud-merchant-issue_resolution-v1beta.rb | 21 - .../issue_resolution/v1beta/version.rb | 30 - .../merchant/issue_resolution/v1beta.rb | 47 - .../v1beta/issue_resolution_service.rb | 58 -- .../v1beta/issue_resolution_service/client.rb | 692 ------------- .../issue_resolution_service/credentials.rb | 49 - .../v1beta/issue_resolution_service/paths.rb | 66 -- .../v1beta/issue_resolution_service/rest.rb | 55 - .../issue_resolution_service/rest/client.rb | 645 ------------ .../rest/service_stub.rb | 269 ----- .../merchant/issue_resolution/v1beta/rest.rb | 39 - .../v1beta/issueresolution_pb.rb | 87 -- .../v1beta/issueresolution_services_pb.rb | 66 -- .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --------- .../proto_docs/google/api/field_behavior.rb | 85 -- .../proto_docs/google/api/launch_stage.rb | 71 -- .../proto_docs/google/api/resource.rb | 227 ----- .../proto_docs/google/protobuf/duration.rb | 98 -- .../issueresolution/v1beta/issueresolution.rb | 954 ------------------ .../snippets/Gemfile | 32 - .../render_account_issues.rb | 47 - .../render_product_issues.rb | 47 - .../trigger_action.rb | 47 - ...pping.merchant.issueresolution.v1beta.json | 135 --- .../issue_resolution_service_paths_test.rb | 67 -- .../issue_resolution_service_rest_test.rb | 269 ----- .../v1beta/issue_resolution_service_test.rb | 275 ----- .../test/helper.rb | 25 - release-please-config.json | 4 - 46 files changed, 5870 deletions(-) delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/.OwlBot.yaml delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/.gitignore delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/.owlbot-manifest.json delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/.repo-metadata.json delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/.rubocop.yml delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/.toys.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/.yardopts delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/AUTHENTICATION.md delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/CHANGELOG.md delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/Gemfile delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/LICENSE.md delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/README.md delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/Rakefile delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/gapic_metadata.json delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/google-cloud-merchant-issue_resolution-v1beta.gemspec delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google-cloud-merchant-issue_resolution-v1beta.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/cloud/merchant/issue_resolution/v1beta/version.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/proto_docs/README.md delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/snippets/Gemfile delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb delete mode 100644 google-cloud-merchant-issue_resolution-v1beta/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5af65a8cb67e..7cb23e3cec29 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -489,8 +489,6 @@ "google-cloud-memorystore-v1+FILLER": "0.0.0", "google-cloud-memorystore-v1beta": "0.6.0", "google-cloud-memorystore-v1beta+FILLER": "0.0.0", - "google-cloud-merchant-issue_resolution-v1beta": "0.0.1", - "google-cloud-merchant-issue_resolution-v1beta+FILLER": "0.0.0", "google-cloud-metastore": "2.0.1", "google-cloud-metastore+FILLER": "0.0.0", "google-cloud-metastore-v1": "2.1.0", diff --git a/google-cloud-merchant-issue_resolution-v1beta/.OwlBot.yaml b/google-cloud-merchant-issue_resolution-v1beta/.OwlBot.yaml deleted file mode 100644 index 6cc5f967b0f7..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/.OwlBot.yaml +++ /dev/null @@ -1,3 +0,0 @@ -deep-copy-regex: - - source: /google/shopping/merchant/issueresolution/v1beta/[^/]+-ruby/(.*) - dest: /owl-bot-staging/google-cloud-merchant-issue_resolution-v1beta/$1 diff --git a/google-cloud-merchant-issue_resolution-v1beta/.gitignore b/google-cloud-merchant-issue_resolution-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/.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/google-cloud-merchant-issue_resolution-v1beta/.owlbot-manifest.json b/google-cloud-merchant-issue_resolution-v1beta/.owlbot-manifest.json deleted file mode 100644 index 6379830c7a75..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/.owlbot-manifest.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "generated": [ - ".gitignore", - ".repo-metadata.json", - ".rubocop.yml", - ".toys.rb", - ".yardopts", - "AUTHENTICATION.md", - "CHANGELOG.md", - "Gemfile", - "LICENSE.md", - "README.md", - "Rakefile", - "gapic_metadata.json", - "google-cloud-merchant-issue_resolution-v1beta.gemspec", - "lib/google-cloud-merchant-issue_resolution-v1beta.rb", - "lib/google/cloud/merchant/issue_resolution/v1beta/version.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb", - "lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb", - "lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb", - "lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb", - "proto_docs/README.md", - "proto_docs/google/api/client.rb", - "proto_docs/google/api/field_behavior.rb", - "proto_docs/google/api/launch_stage.rb", - "proto_docs/google/api/resource.rb", - "proto_docs/google/protobuf/duration.rb", - "proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb", - "snippets/Gemfile", - "snippets/issue_resolution_service/render_account_issues.rb", - "snippets/issue_resolution_service/render_product_issues.rb", - "snippets/issue_resolution_service/trigger_action.rb", - "snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json", - "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb", - "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb", - "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb", - "test/helper.rb" - ], - "static": [ - ".OwlBot.yaml" - ] -} diff --git a/google-cloud-merchant-issue_resolution-v1beta/.repo-metadata.json b/google-cloud-merchant-issue_resolution-v1beta/.repo-metadata.json deleted file mode 100644 index 2422edb335ab..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-cloud-merchant-issue_resolution-v1beta", - "distribution_name": "google-cloud-merchant-issue_resolution-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-cloud-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-merchant-issue_resolution instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/google-cloud-merchant-issue_resolution-v1beta/.rubocop.yml b/google-cloud-merchant-issue_resolution-v1beta/.rubocop.yml deleted file mode 100644 index 190374aa3d3b..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-merchant-issue_resolution-v1beta.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-merchant-issue_resolution-v1beta.rb" diff --git a/google-cloud-merchant-issue_resolution-v1beta/.toys.rb b/google-cloud-merchant-issue_resolution-v1beta/.toys.rb deleted file mode 100644 index 9a210f1427c7..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/google-cloud-merchant-issue_resolution-v1beta/.yardopts b/google-cloud-merchant-issue_resolution-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/google-cloud-merchant-issue_resolution-v1beta/AUTHENTICATION.md b/google-cloud-merchant-issue_resolution-v1beta/AUTHENTICATION.md deleted file mode 100644 index 79d7ec455e36..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-merchant-issue_resolution-v1beta 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-merchant-issue_resolution-v1beta 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/shopping/merchant/issue_resolution/v1beta" - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/issue_resolution/v1beta" - -::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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-merchant-issue_resolution-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/issue_resolution/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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/google-cloud-merchant-issue_resolution-v1beta/CHANGELOG.md b/google-cloud-merchant-issue_resolution-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/google-cloud-merchant-issue_resolution-v1beta/Gemfile b/google-cloud-merchant-issue_resolution-v1beta/Gemfile deleted file mode 100644 index d1825e41a44f..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.0" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/google-cloud-merchant-issue_resolution-v1beta/LICENSE.md b/google-cloud-merchant-issue_resolution-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/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/google-cloud-merchant-issue_resolution-v1beta/README.md b/google-cloud-merchant-issue_resolution-v1beta/README.md deleted file mode 100644 index 67aa3dcf3c3b..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-cloud-merchant-issue_resolution](https://rubygems.org/gems/google-cloud-merchant-issue_resolution). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-merchant-issue_resolution-v1beta -``` - -## 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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/issue_resolution/v1beta" - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new -request = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new # (request fields as keyword arguments...) -response = client.render_account_issues request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-cloud-merchant-issue_resolution-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/issue_resolution/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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-merchant-issue_resolution`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-merchant-issue_resolution-v1beta`. -_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-merchant-issue_resolution`. -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-merchant-issue_resolution-v1beta`. - -### 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/google-cloud-merchant-issue_resolution-v1beta/Rakefile b/google-cloud-merchant-issue_resolution-v1beta/Rakefile deleted file mode 100644 index 9d2c3c14baec..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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-merchant-issue_resolution-v1beta 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" - ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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-merchant-issue_resolution-v1beta 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-merchant-issue_resolution-v1beta 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-merchant-issue_resolution-v1beta 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-merchant-issue_resolution-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-merchant-issue_resolution-v1beta" - header "google-cloud-merchant-issue_resolution-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-merchant-issue_resolution-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-merchant-issue_resolution-v1beta 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-merchant-issue_resolution-v1beta 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-merchant-issue_resolution-v1beta 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/google-cloud-merchant-issue_resolution-v1beta/gapic_metadata.json b/google-cloud-merchant-issue_resolution-v1beta/gapic_metadata.json deleted file mode 100644 index 70b76dcc73d1..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.issueresolution.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::IssueResolution::V1beta", - "services": { - "IssueResolutionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client", - "rpcs": { - "RenderAccountIssues": { - "methods": [ - "render_account_issues" - ] - }, - "RenderProductIssues": { - "methods": [ - "render_product_issues" - ] - }, - "TriggerAction": { - "methods": [ - "trigger_action" - ] - } - } - } - } - } - } -} diff --git a/google-cloud-merchant-issue_resolution-v1beta/google-cloud-merchant-issue_resolution-v1beta.gemspec b/google-cloud-merchant-issue_resolution-v1beta/google-cloud-merchant-issue_resolution-v1beta.gemspec deleted file mode 100644 index 3de0dc7eb54d..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/google-cloud-merchant-issue_resolution-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/merchant/issue_resolution/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-merchant-issue_resolution-v1beta" - gem.version = Google::Cloud::Merchant::IssueResolution::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-cloud-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-merchant-issue_resolution instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - 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.1" - - gem.add_dependency "gapic-common", "~> 1.0" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google-cloud-merchant-issue_resolution-v1beta.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google-cloud-merchant-issue_resolution-v1beta.rb deleted file mode 100644 index 81037d956b1f..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google-cloud-merchant-issue_resolution-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issue_resolution/v1beta" diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/cloud/merchant/issue_resolution/v1beta/version.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/cloud/merchant/issue_resolution/v1beta/version.rb deleted file mode 100644 index 7dbb4f34bec8..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/cloud/merchant/issue_resolution/v1beta/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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 Merchant - module IssueResolution - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb deleted file mode 100644 index 48be86df0084..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" -require "google/cloud/merchant/issue_resolution/v1beta/version" - -module Google - module Shopping - module Merchant - module IssueResolution - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/issue_resolution/v1beta" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/issue_resolution/v1beta" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/issue_resolution/v1beta/_helpers" if ::File.file? helper_path diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb deleted file mode 100644 index 4d70a61ffc7d..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/merchant/issue_resolution/v1beta/version" - -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - ## - # Service to provide an issue resolution content for account issues and product - # issues. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - module IssueResolutionService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "issue_resolution_service", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb deleted file mode 100644 index 0a61e2be9d01..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb +++ /dev/null @@ -1,692 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - ## - # Client for the IssueResolutionService service. - # - # Service to provide an issue resolution content for account issues and product - # issues. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :issue_resolution_service_stub - - ## - # Configure the IssueResolutionService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IssueResolutionService clients - # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] - 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.timeout = 60.0 - default_config.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 IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - @issue_resolution_service_stub.universe_domain - end - - ## - # Create a new IssueResolutionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IssueResolutionService 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/shopping/merchant/issueresolution/v1beta/issueresolution_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 - - @issue_resolution_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - ) - - @issue_resolution_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 - @issue_resolution_service_stub.logger - end - - # Service calls - - ## - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_account_issues(request, options = nil) - # Pass arguments to `render_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::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 render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_account_issues` 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 account to fetch issues for. - # Format: `accounts/{account}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new - # - # # Call the render_account_issues method. - # result = client.render_account_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. - # p result - # - def render_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest - - # 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.render_account_issues.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::Merchant::IssueResolution::V1beta::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.render_account_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.render_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :render_account_issues, 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 - - ## - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_product_issues(request, options = nil) - # Pass arguments to `render_product_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::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 render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_product_issues` 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 name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new - # - # # Call the render_product_issues method. - # result = client.render_product_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. - # p result - # - def render_product_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest - - # 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.render_product_issues.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::Merchant::IssueResolution::V1beta::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.render_product_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.render_product_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :render_product_issues, 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 - - ## - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Ids} for - # all problematic field together with translated, human readable error - # messages that can be shown to the user. - # - # @overload trigger_action(request, options = nil) - # Pass arguments to `trigger_action` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::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 trigger_action(name: nil, payload: nil, language_code: nil) - # Pass arguments to `trigger_action` 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 business's account that is triggering the action. - # Format: `accounts/{account}` - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload, ::Hash] - # Required. The payload for the triggered action. - # @param language_code [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new - # - # # Call the trigger_action method. - # result = client.trigger_action request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. - # p result - # - def trigger_action request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest - - # 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.trigger_action.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::Merchant::IssueResolution::V1beta::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.trigger_action.timeout, - metadata: metadata, - retry_policy: @config.rpcs.trigger_action.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.call_rpc :trigger_action, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the IssueResolutionService API. - # - # This class represents the configuration for IssueResolutionService, - # 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - # # render_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.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)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`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] 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 = "merchantapi.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 IssueResolutionService 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 `render_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_account_issues - ## - # RPC-specific configuration for `render_product_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_product_issues - ## - # RPC-specific configuration for `trigger_action` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_action - - # @private - def initialize parent_rpcs = nil - render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues - @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config - render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues - @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config - trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action - @trigger_action = ::Gapic::Config::Method.new trigger_action_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb deleted file mode 100644 index 06300ffde483..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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 Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - # Credentials for the IssueResolutionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb deleted file mode 100644 index 743a7bf49c6a..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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 Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - # Path helper methods for the IssueResolutionService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - extend self - end - end - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb deleted file mode 100644 index 0e39e7e6fa9e..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/merchant/issue_resolution/v1beta/version" - -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - ## - # Service to provide an issue resolution content for account issues and product - # issues. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - module IssueResolutionService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb deleted file mode 100644 index dabe6f32194e..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb +++ /dev/null @@ -1,645 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - module Rest - ## - # REST client for the IssueResolutionService service. - # - # Service to provide an issue resolution content for account issues and product - # issues. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :issue_resolution_service_stub - - ## - # Configure the IssueResolutionService Client class. - # - # See {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IssueResolutionService clients - # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] - 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.timeout = 60.0 - default_config.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 IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - @issue_resolution_service_stub.universe_domain - end - - ## - # Create a new IssueResolutionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IssueResolutionService 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 - - @issue_resolution_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @issue_resolution_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 - @issue_resolution_service_stub.logger - end - - # Service calls - - ## - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_account_issues(request, options = nil) - # Pass arguments to `render_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::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 render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_account_issues` 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 account to fetch issues for. - # Format: `accounts/{account}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new - # - # # Call the render_account_issues method. - # result = client.render_account_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. - # p result - # - def render_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest - - # 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.render_account_issues.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::Merchant::IssueResolution::V1beta::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.render_account_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.render_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.render_account_issues 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 - - ## - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - # - # @overload render_product_issues(request, options = nil) - # Pass arguments to `render_product_issues` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::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 render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) - # Pass arguments to `render_product_issues` 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 name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @param language_code [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] - # Optional. The payload for configuring how the content should be rendered. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new - # - # # Call the render_product_issues method. - # result = client.render_product_issues request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. - # p result - # - def render_product_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest - - # 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.render_product_issues.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::Merchant::IssueResolution::V1beta::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.render_product_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.render_product_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.render_product_issues 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 - - ## - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Ids} for - # all problematic field together with translated, human readable error - # messages that can be shown to the user. - # - # @overload trigger_action(request, options = nil) - # Pass arguments to `trigger_action` via a request object, either of type - # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::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 trigger_action(name: nil, payload: nil, language_code: nil) - # Pass arguments to `trigger_action` 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 business's account that is triggering the action. - # Format: `accounts/{account}` - # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload, ::Hash] - # Required. The payload for the triggered action. - # @param language_code [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/issue_resolution/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new - # - # # Call the trigger_action method. - # result = client.trigger_action request - # - # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. - # p result - # - def trigger_action request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest - - # 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.trigger_action.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::Merchant::IssueResolution::V1beta::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.trigger_action.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.trigger_action.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @issue_resolution_service_stub.trigger_action 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 - - ## - # Configuration class for the IssueResolutionService REST API. - # - # This class represents the configuration for IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 - # # render_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.render_account_issues.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 = "merchantapi.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 IssueResolutionService 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 `render_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_account_issues - ## - # RPC-specific configuration for `render_product_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :render_product_issues - ## - # RPC-specific configuration for `trigger_action` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_action - - # @private - def initialize parent_rpcs = nil - render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues - @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config - render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues - @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config - trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action - @trigger_action = ::Gapic::Config::Method.new trigger_action_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb deleted file mode 100644 index 07c43d4c0679..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb +++ /dev/null @@ -1,269 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - module Rest - ## - # REST service stub for the IssueResolutionService 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: true, - 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 render_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest] - # 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::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] - # A result object deserialized from the server's reply - def render_account_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_render_account_issues_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: "render_account_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the render_product_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest] - # 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::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] - # A result object deserialized from the server's reply - def render_product_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_render_product_issues_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: "render_product_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the trigger_action REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest] - # 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::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] - # A result object deserialized from the server's reply - def trigger_action request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_trigger_action_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: "trigger_action", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.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 render_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_render_account_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1beta/{name}:renderaccountissues", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the render_product_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_render_product_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1beta/{name}:renderproductissues", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the trigger_action REST call - # - # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_trigger_action_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/issueresolution/v1beta/{name}:triggeraction", - body: "payload", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb deleted file mode 100644 index ee9b80cef2e2..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" -require "google/cloud/merchant/issue_resolution/v1beta/version" - -module Google - module Shopping - module Merchant - module IssueResolution - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/issue_resolution/v1beta/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb deleted file mode 100644 index c09dcd182d55..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/issueresolution/v1beta/issueresolution.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' - - -descriptor_data = "\nEgoogle/shopping/merchant/issueresolution/v1beta/issueresolution.proto\x12/google.shopping.merchant.issueresolution.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"v\n\x1bRenderAccountIssuesResponse\x12W\n\x0frendered_issues\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.RenderedIssue\"\xed\x01\n\x1aRenderAccountIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x07payload\x18\x04 \x01(\x0b\x32K.google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xab\x02\n\x1aRenderIssuesRequestPayload\x12`\n\x0e\x63ontent_option\x18\x01 \x01(\x0e\x32>.google.shopping.merchant.issueresolution.v1beta.ContentOptionB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12{\n\x18user_input_action_option\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.issueresolution.v1beta.UserInputActionRenderingOptionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x11\n\x0f_content_optionB\x1b\n\x19_user_input_action_option\"v\n\x1bRenderProductIssuesResponse\x12W\n\x0frendered_issues\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.RenderedIssue\"\xed\x01\n\x1aRenderProductIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x07payload\x18\x04 \x01(\x0b\x32K.google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xb5\x02\n\rRenderedIssue\x12\x1d\n\x13prerendered_content\x18\x03 \x01(\tH\x00\x12\x35\n+prerendered_out_of_court_dispute_settlement\x18\x05 \x01(\tH\x01\x12\r\n\x05title\x18\x01 \x01(\t\x12G\n\x06impact\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.Impact\x12H\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.ActionB\t\n\x07\x63ontentB!\n\x1fout_of_court_dispute_settlement\"\xbb\x01\n\x06Impact\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12K\n\x08severity\x18\x02 \x01(\x0e\x32\x39.google.shopping.merchant.issueresolution.v1beta.Severity\x12N\n\nbreakdowns\x18\x03 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1beta.Breakdown\"\x96\x01\n\tBreakdown\x12R\n\x07regions\x18\x01 \x03(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1beta.Breakdown.Region\x12\x0f\n\x07\x64\x65tails\x18\x04 \x03(\t\x1a$\n\x06Region\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xda\x04\n\x06\x41\x63tion\x12\x65\n\x15\x62uiltin_simple_action\x18\x02 \x01(\x0b\x32\x44.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleActionH\x00\x12Z\n\x0f\x65xternal_action\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.issueresolution.v1beta.ExternalActionH\x00\x12l\n\x19\x62uiltin_user_input_action\x18\x07 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.BuiltInUserInputActionH\x00\x12\x14\n\x0c\x62utton_label\x18\x04 \x01(\t\x12\x14\n\x0cis_available\x18\x05 \x01(\x08\x12O\n\x07reasons\x18\x06 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.Action.Reason\x1a\x97\x01\n\x06Reason\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x13\n\x06\x64\x65tail\x18\x02 \x01(\tH\x00\x88\x01\x01\x12Q\n\x06\x61\x63tion\x18\x03 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.ActionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_detailB\t\n\x07_actionB\x08\n\x06\x61\x63tion\"\x98\x05\n\x13\x42uiltInSimpleAction\x12j\n\x04type\x18\x01 \x01(\x0e\x32\\.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.BuiltInSimpleActionType\x12\x1b\n\x0e\x61ttribute_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12w\n\x12\x61\x64\x64itional_content\x18\x03 \x01(\x0b\x32V.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.AdditionalContentH\x01\x88\x01\x01\x1a\x36\n\x11\x41\x64\x64itionalContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x12\n\nparagraphs\x18\x02 \x03(\t\"\x9c\x02\n\x17\x42uiltInSimpleActionType\x12+\n\'BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cVERIFY_PHONE\x10\x01\x12\x11\n\rCLAIM_WEBSITE\x10\x02\x12\x10\n\x0c\x41\x44\x44_PRODUCTS\x10\x03\x12\x14\n\x10\x41\x44\x44_CONTACT_INFO\x10\x04\x12\x14\n\x10LINK_ADS_ACCOUNT\x10\x05\x12$\n ADD_BUSINESS_REGISTRATION_NUMBER\x10\x06\x12\x17\n\x13\x45\x44IT_ITEM_ATTRIBUTE\x10\x07\x12\x15\n\x11\x46IX_ACCOUNT_ISSUE\x10\x08\x12\x1b\n\x17SHOW_ADDITIONAL_CONTENT\x10\tB\x11\n\x0f_attribute_codeB\x15\n\x13_additional_content\"|\n\x16\x42uiltInUserInputAction\x12\x16\n\x0e\x61\x63tion_context\x18\x01 \x01(\t\x12J\n\x05\x66lows\x18\x03 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.ActionFlow\"\x83\x03\n\nActionFlow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12K\n\x06inputs\x18\x03 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputField\x12\x14\n\x0c\x64ialog_title\x18\x04 \x01(\t\x12]\n\x0e\x64ialog_message\x18\x07 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltipH\x00\x88\x01\x01\x12U\n\x0e\x64ialog_callout\x18\x08 \x01(\x0b\x32\x38.google.shopping.merchant.issueresolution.v1beta.CalloutH\x01\x88\x01\x01\x12\x1b\n\x13\x64ialog_button_label\x18\t \x01(\tB\x11\n\x0f_dialog_messageB\x11\n\x0f_dialog_callout\"\xb6\t\n\nInputField\x12[\n\ntext_input\x18\x04 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1beta.InputField.TextInputH\x00\x12_\n\x0c\x63hoice_input\x18\x05 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInputH\x00\x12\x63\n\x0e\x63heckbox_input\x18\x06 \x01(\x0b\x32I.google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInputH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05label\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\x12\x10\n\x08required\x18\x03 \x01(\x08\x1a\x95\x03\n\tTextInput\x12\x61\n\x04type\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.issueresolution.v1beta.InputField.TextInput.TextInputType\x12^\n\x0f\x61\x64\x64itional_info\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltipH\x00\x88\x01\x01\x12\x18\n\x0b\x66ormat_info\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\naria_label\x18\x04 \x01(\tH\x02\x88\x01\x01\"_\n\rTextInputType\x12\x1f\n\x1bTEXT_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12GENERIC_SHORT_TEXT\x10\x01\x12\x15\n\x11GENERIC_LONG_TEXT\x10\x02\x42\x12\n\x10_additional_infoB\x0e\n\x0c_format_infoB\r\n\x0b_aria_label\x1a\xdd\x02\n\x0b\x43hoiceInput\x12j\n\x07options\x18\x01 \x03(\x0b\x32Y.google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput.ChoiceInputOption\x1a\xe1\x01\n\x11\x43hoiceInputOption\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05label\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\x12Z\n\x10\x61\x64\x64itional_input\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputFieldH\x00\x88\x01\x01\x42\x13\n\x11_additional_input\x1a\x0f\n\rCheckboxInputB\r\n\x0bvalue_input\"\xa2\x02\n\x0fTextWithTooltip\x12\x16\n\x0csimple_value\x18\x01 \x01(\tH\x00\x12\x1e\n\x14simple_tooltip_value\x18\x02 \x01(\tH\x01\x12m\n\x12tooltip_icon_style\x18\x03 \x01(\x0e\x32Q.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip.TooltipIconStyle\"N\n\x10TooltipIconStyle\x12\"\n\x1eTOOLTIP_ICON_STYLE_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0c\n\x08QUESTION\x10\x02\x42\x07\n\x05valueB\x0f\n\rtooltip_value\"\x9a\x02\n\x07\x43\x61llout\x12]\n\nstyle_hint\x18\x01 \x01(\x0e\x32I.google.shopping.merchant.issueresolution.v1beta.Callout.CalloutStyleHint\x12V\n\x0c\x66ull_message\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\"X\n\x10\x43\x61lloutStyleHint\x12\"\n\x1e\x43\x41LLOUT_STYLE_HINT_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03\"\xdf\x02\n\x0e\x45xternalAction\x12`\n\x04type\x18\x01 \x01(\x0e\x32R.google.shopping.merchant.issueresolution.v1beta.ExternalAction.ExternalActionType\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xdd\x01\n\x12\x45xternalActionType\x12$\n EXTERNAL_ACTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER\x10\x01\x12+\n\'REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER\x10\x02\x12\x1f\n\x1bLEGAL_APPEAL_IN_HELP_CENTER\x10\x03\x12&\n\"VERIFY_IDENTITY_IN_MERCHANT_CENTER\x10\x04\"\xc9\x01\n\x14TriggerActionRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12[\n\x07payload\x18\x02 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1beta.TriggerActionPayloadB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8c\x01\n\x14TriggerActionPayload\x12\x1b\n\x0e\x61\x63tion_context\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x0c\x61\x63tion_input\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1beta.ActionInputB\x03\xe0\x41\x02\"(\n\x15TriggerActionResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x82\x01\n\x0b\x41\x63tionInput\x12\x1b\n\x0e\x61\x63tion_flow_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\x0cinput_values\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputValueB\x03\xe0\x41\x02\"\xff\x03\n\nInputValue\x12\x66\n\x10text_input_value\x18\x02 \x01(\x0b\x32J.google.shopping.merchant.issueresolution.v1beta.InputValue.TextInputValueH\x00\x12j\n\x12\x63hoice_input_value\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.issueresolution.v1beta.InputValue.ChoiceInputValueH\x00\x12n\n\x14\x63heckbox_input_value\x18\x04 \x01(\x0b\x32N.google.shopping.merchant.issueresolution.v1beta.InputValue.CheckboxInputValueH\x00\x12\x1b\n\x0einput_field_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a$\n\x0eTextInputValue\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x37\n\x10\x43hoiceInputValue\x12#\n\x16\x63hoice_input_option_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a(\n\x12\x43heckboxInputValue\x12\x12\n\x05value\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x42\x07\n\x05value*F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03*F\n\rContentOption\x12\x1e\n\x1a\x43ONTENT_OPTION_UNSPECIFIED\x10\x00\x12\x15\n\x11PRE_RENDERED_HTML\x10\x01*\x96\x01\n\x1eUserInputActionRenderingOption\x12\x32\n.USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bREDIRECT_TO_MERCHANT_CENTER\x10\x01\x12\x1f\n\x1b\x42UILT_IN_USER_INPUT_ACTIONS\x10\x02\x32\xf2\x06\n\x16IssueResolutionService\x12\x87\x02\n\x13RenderAccountIssues\x12K.google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesRequest\x1aL.google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesResponse\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\"=/issueresolution/v1beta/{name=accounts/*}:renderaccountissues:\x07payload\x12\x92\x02\n\x13RenderProductIssues\x12K.google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesRequest\x1aL.google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesResponse\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"H/issueresolution/v1beta/{name=accounts/*/products/*}:renderproductissues:\x07payload\x12\xef\x01\n\rTriggerAction\x12\x45.google.shopping.merchant.issueresolution.v1beta.TriggerActionRequest\x1a\x46.google.shopping.merchant.issueresolution.v1beta.TriggerActionResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\"7/issueresolution/v1beta/{name=accounts/*}:triggeraction:\x07payload\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd5\x03\n3com.google.shopping.merchant.issueresolution.v1betaB\x14IssueResolutionProtoP\x01Zccloud.google.com/go/shopping/merchant/issueresolution/apiv1beta/issueresolutionpb;issueresolutionpb\xaa\x02/Google.Shopping.Merchant.IssueResolution.V1Beta\xca\x02/Google\\Shopping\\Merchant\\IssueResolution\\V1beta\xea\x02\x33Google::Shopping::Merchant::IssueResolution::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - RenderAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesResponse").msgclass - RenderAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesRequest").msgclass - RenderIssuesRequestPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayload").msgclass - RenderProductIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesResponse").msgclass - RenderProductIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesRequest").msgclass - RenderedIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderedIssue").msgclass - Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Impact").msgclass - Breakdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Breakdown").msgclass - Breakdown::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Breakdown.Region").msgclass - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Action").msgclass - Action::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Action.Reason").msgclass - BuiltInSimpleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction").msgclass - BuiltInSimpleAction::AdditionalContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.AdditionalContent").msgclass - BuiltInSimpleAction::BuiltInSimpleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.BuiltInSimpleActionType").enummodule - BuiltInUserInputAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInUserInputAction").msgclass - ActionFlow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ActionFlow").msgclass - InputField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField").msgclass - InputField::TextInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.TextInput").msgclass - InputField::TextInput::TextInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.TextInput.TextInputType").enummodule - InputField::ChoiceInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput").msgclass - InputField::ChoiceInput::ChoiceInputOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput.ChoiceInputOption").msgclass - InputField::CheckboxInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput").msgclass - TextWithTooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TextWithTooltip").msgclass - TextWithTooltip::TooltipIconStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TextWithTooltip.TooltipIconStyle").enummodule - Callout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Callout").msgclass - Callout::CalloutStyleHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Callout.CalloutStyleHint").enummodule - ExternalAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ExternalAction").msgclass - ExternalAction::ExternalActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ExternalAction.ExternalActionType").enummodule - TriggerActionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionRequest").msgclass - TriggerActionPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionPayload").msgclass - TriggerActionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionResponse").msgclass - ActionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ActionInput").msgclass - InputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue").msgclass - InputValue::TextInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.TextInputValue").msgclass - InputValue::ChoiceInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.ChoiceInputValue").msgclass - InputValue::CheckboxInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.CheckboxInputValue").msgclass - Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Severity").enummodule - ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ContentOption").enummodule - UserInputActionRenderingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.UserInputActionRenderingOption").enummodule - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb b/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb deleted file mode 100644 index 485d5f24b813..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/issueresolution/v1beta/issueresolution.proto for package 'Google.Shopping.Merchant.IssueResolution.V1beta' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb' - -module Google - module Shopping - module Merchant - module IssueResolution - module V1beta - module IssueResolutionService - # Service to provide an issue resolution content for account issues and product - # issues. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.issueresolution.v1beta.IssueResolutionService' - - # Provide a list of business's account issues with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - rpc :RenderAccountIssues, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse - # Provide a list of issues for business's product with an issue resolution - # content and available actions. This content and actions are meant to be - # rendered and shown in third-party applications. - rpc :RenderProductIssues, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse - # Start an action. The action can be requested by a business in - # third-party application. Before the business can request the action, the - # third-party application needs to show them action specific content and - # display a user input form. - # - # The action can be successfully started only once all `required` inputs are - # provided. If any `required` input is missing, or invalid value was - # provided, the service will return 400 error. Validation errors will contain - # [Ids][google.shopping.merchant.issueresolution.v1beta.InputField.id] for - # all problematic field together with translated, human readable error - # messages that can be shown to the user. - rpc :TriggerAction, ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/README.md b/google-cloud-merchant-issue_resolution-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA 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/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb b/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index c6b6b60729c9..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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. - 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: - # 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. - 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. - # - # 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 - 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. - # @!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 - - # 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 - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index fb9115c630af..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index b836bdb60b21..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb b/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 71b994c7ef20..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index 341efa296c29..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb b/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb deleted file mode 100644 index abf3eeada7f1..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb +++ /dev/null @@ -1,954 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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 Shopping - module Merchant - module IssueResolution - module V1beta - # Response containing an issue resolution content and actions for listed - # account issues. - # @!attribute [rw] rendered_issues - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue>] - # List of account issues for a given account. - # - # This list can be shown with compressed, expandable items. In the compressed - # form, the title and impact should be shown for each issue. Once the issue - # is expanded, the detailed - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#prerendered_content content} - # and available - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#actions actions} - # should be rendered. - class RenderAccountIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to provide issue resolution content and actions for business's - # account issues. - # @!attribute [rw] name - # @return [::String] - # Required. The account to fetch issues for. - # Format: `accounts/{account}` - # @!attribute [rw] language_code - # @return [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize issue resolution content. If not set, the result will - # be in default language `en-US`. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload] - # Optional. The payload for configuring how the content should be rendered. - class RenderAccountIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payload for configuring how the content should be rendered. - # @!attribute [rw] content_option - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ContentOption] - # Optional. How the detailed content should be returned. Default option is to - # return the content as a pre-rendered HTML text. - # @!attribute [rw] user_input_action_option - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::UserInputActionRenderingOption] - # Optional. How actions with user input form should be handled. If not - # provided, actions will be returned as links that points the business to - # Merchant Center where they can request the action. - class RenderIssuesRequestPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response containing an issue resolution content and actions for listed - # product issues. - # @!attribute [rw] rendered_issues - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue>] - # List of issues for a given product. - # - # This list can be shown with compressed, expandable items. In the compressed - # form, the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#title title} - # and - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#impact impact} - # should be shown for each issue. Once the issue is expanded, the detailed - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#prerendered_content content} - # and available - # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#actions actions} - # should be rendered. - class RenderProductIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to provide an issue resolution content and actions for product issues - # of business's product. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the product to fetch issues for. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] language_code - # @return [::String] - # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language - # code used to localize an issue resolution content. If not set, the result - # will be in default language `en-US`. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in an issue resolution content. For example - # 'America/Los_Angeles'. If not set, results will use as a default UTC. - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload] - # Optional. The payload for configuring how the content should be rendered. - class RenderProductIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An issue affecting specific business or their product. - # @!attribute [rw] prerendered_content - # @return [::String] - # Details of the issue as a pre-rendered HTML. HTML elements contain CSS - # classes that can be used to customize the style of the content. - # - # Always sanitize the HTML before embedding it directly to your - # application. The sanitizer needs to allow basic HTML tags, such as: - # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, - # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). - # - # CSS classes: - # - # * `issue-detail` - top level container for the detail of the issue - # * `callout-banners` - section of the `issue-detail` with callout banners - # * `callout-banner` - single callout banner, inside `callout-banners` - # * `callout-banner-info` - callout with important information (default) - # * `callout-banner-warning` - callout with a warning - # * `callout-banner-error` - callout informing about an error (most severe) - # * `issue-content` - section of the `issue-detail`, contains multiple - # `content-element` - # * `content-element` - content element such as a list, link or paragraph, - # inside `issue-content` - # * `root-causes` - unordered list with items describing root causes of the - # issue, inside `issue-content` - # * `root-causes-intro` - intro text before the `root-causes` list, inside - # `issue-content` - # * `segment` - section of the text, `span` inside paragraph - # * `segment-attribute` - section of the text that represents a product - # attribute, for example 'image\_link' - # * `segment-literal` - section of the text that contains a special value, - # for example '0-1000 kg' - # * `segment-bold` - section of the text that should be rendered as bold - # * `segment-italic` - section of the text that should be rendered as - # italic - # * `tooltip` - used on paragraphs that should be rendered with a tooltip. - # A section of the text in such a paragraph will have a class - # `tooltip-text` and is intended to be shown in a mouse over dialog. If the - # style is not used, the `tooltip-text` section would be shown on a new - # line, after the main part of the text. - # * `tooltip-text` - marks a section of the text within a `tooltip`, that - # is intended to be shown in a mouse over dialog. - # * `tooltip-icon` - marks a section of the text within a `tooltip`, that - # can be replaced with a tooltip icon, for example '?' or 'i'. By default, - # this section contains a `br` tag, that is separating the main text and - # the tooltip text when the style is not used. - # * `tooltip-style-question` - the tooltip shows helpful information, - # can use the '?' as an icon. - # * `tooltip-style-info` - the tooltip adds additional information fitting - # to the context, can use the 'i' as an icon. - # * `content-moderation` - marks the paragraph that explains how the issue - # was identified. - # * `new-element` - Present for new elements added to the pre-rendered - # content in the future. To make sure that a new content element does not - # break your style, you can hide everything with this class. - # @!attribute [rw] prerendered_out_of_court_dispute_settlement - # @return [::String] - # Pre-rendered HTML that contains a link to the external location where the - # ODS can be requested and instructions for how to request it. HTML - # elements contain CSS classes that can be used to customize the style of - # this snippet. - # - # Always sanitize the HTML before embedding it directly to your - # application. The sanitizer needs to allow basic HTML tags, such as: - # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, - # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). - # - # CSS classes: - # - # * `ods-section`* - wrapper around the out-of-court dispute resolution - # section - # * `ods-description`* - intro text for the out-of-court dispute - # resolution. It may contain multiple segments and a link. - # * `ods-param`* - wrapper around the header-value pair for parameters that - # the business may need to provide during the ODS process. - # * `ods-routing-id`* - ods param for the Routing ID. - # * `ods-reference-id`* - ods param for the Routing ID. - # * `ods-param-header`* - header for the ODS parameter - # * `ods-param-value`* - value of the ODS parameter. This value should be - # rendered in a way that it is easy for the user to identify and copy. - # * `segment` - section of the text, `span` inside paragraph - # * `segment-attribute` - section of the text that represents a product - # attribute, for example 'image\_link' - # * `segment-literal` - section of the text that contains a special value, - # for example '0-1000 kg' - # * `segment-bold` - section of the text that should be rendered as bold - # * `segment-italic` - section of the text that should be rendered as - # italic - # * `tooltip` - used on paragraphs that should be rendered with a tooltip. - # A section of the text in such a paragraph will have a class - # `tooltip-text` and is intended to be shown in a mouse over dialog. If the - # style is not used, the `tooltip-text` section would be shown on a new - # line, after the main part of the text. - # * `tooltip-text` - marks a section of the text within a `tooltip`, that - # is intended to be shown in a mouse over dialog. - # * `tooltip-icon` - marks a section of the text within a `tooltip`, that - # can be replaced with a tooltip icon, for example '?' or 'i'. By default, - # this section contains a `br` tag, that is separating the main text and - # the tooltip text when the style is not used. - # * `tooltip-style-question` - the tooltip shows helpful information, - # can use the '?' as an icon. - # * `tooltip-style-info` - the tooltip adds additional information fitting - # to the context, can use the 'i' as an icon. - # @!attribute [rw] title - # @return [::String] - # Title of the issue. - # @!attribute [rw] impact - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Impact] - # Clarifies the severity of the issue. - # - # The [summarizing - # message][google.shopping.merchant.issueresolution.v1beta.Impact.message], - # if present, should be shown right under the title for each issue. It helps - # business to quickly understand the impact of the issue. - # - # The detailed - # {::Google::Shopping::Merchant::IssueResolution::V1beta::Impact#breakdowns breakdown} - # helps the business to fully understand the impact of the issue. It can be - # rendered as dialog that opens when the business mouse over the summarized - # impact statement. - # - # Issues with different - # {::Google::Shopping::Merchant::IssueResolution::V1beta::Impact#severity severity} - # can be styled differently. They may use a different color or icon to signal - # the difference between `ERROR`, `WARNING` and `INFO`. - # @!attribute [rw] actions - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Action>] - # A list of actionable steps that can be executed to solve the issue. An - # example is requesting a re-review or providing arguments when business - # disagrees with the issue. - # - # Actions that are supported in (your) third-party application can be - # rendered as buttons and should be available to the business when they - # expand the issue. - class RenderedIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Overall impact of the issue. - # @!attribute [rw] message - # @return [::String] - # Optional. Message summarizing the overall impact of the issue. If present, - # it should be rendered to the business. For example: "Disapproves 90k offers - # in 25 countries" - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Severity] - # The severity of the issue. - # @!attribute [rw] breakdowns - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Breakdown>] - # Detailed impact breakdown. Explains the types of restriction the issue has - # in different shopping destinations and territory. If present, it should be - # rendered to the business. Can be shown as a mouse over dropdown or a - # dialog. Each breakdown item represents a group of regions with the same - # impact details. - class Impact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A detailed impact breakdown for a group of regions where the impact of the - # issue on different shopping destinations is the same. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Breakdown::Region>] - # Lists of regions. Should be rendered as a title for this group of details. - # The full list should be shown to the business. If the list is too long, it - # is recommended to make it expandable. - # @!attribute [rw] details - # @return [::Array<::String>] - # Human readable, localized description of issue's effect on different - # targets. Should be rendered as a list. - # - # For example: - # - # * "Products not showing in ads" - # * "Products not showing organically" - class Breakdown - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Region with code and localized name. - # @!attribute [rw] code - # @return [::String] - # The [CLDR territory code] - # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # @!attribute [rw] name - # @return [::String] - # The localized name of the region. - # For region with code='001' the value is 'All countries' or the equivalent - # in other languages. - class Region - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An actionable step that can be executed to solve the issue. - # @!attribute [rw] builtin_simple_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction] - # Action implemented and performed in (your) third-party application. The - # application should point the business to the place, where they can access - # the corresponding functionality or provide instructions, if the specific - # functionality is not available. - # - # Note: The following fields are mutually exclusive: `builtin_simple_action`, `external_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] external_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ExternalAction] - # Action that is implemented and performed outside of (your) third-party - # application. The application needs to redirect the business to the - # external location where they can perform the action. - # - # Note: The following fields are mutually exclusive: `external_action`, `builtin_simple_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] builtin_user_input_action - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInUserInputAction] - # Action implemented and performed in (your) third-party application. - # The application needs to show an additional content and input form to the - # business as specified for given action. They can trigger the action only - # when they provided all required inputs. - # - # Note: The following fields are mutually exclusive: `builtin_user_input_action`, `builtin_simple_action`, `external_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] button_label - # @return [::String] - # Label of the action button. - # @!attribute [rw] is_available - # @return [::Boolean] - # Controlling whether the button is active or disabled. The value is 'false' - # when the action was already requested or is not available. If the action is - # not available then a - # {::Google::Shopping::Merchant::IssueResolution::V1beta::Action#reasons reason} - # will be present. If (your) third-party application shows a disabled button - # for action that is not available, then it should also show reasons. - # @!attribute [rw] reasons - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Action::Reason>] - # List of reasons why the action is not available. The list of reasons is - # empty if the action is available. If there is only one reason, it can be - # displayed next to the disabled button. If there are more reasons, all of - # them should be displayed, for example in a pop-up dialog. - class Action - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A single reason why the action is not available. - # @!attribute [rw] message - # @return [::String] - # Messages summarizing the reason, why the action is not available. - # For example: "Review requested on Jan 03. Review requests can take a few - # days to complete." - # @!attribute [rw] detail - # @return [::String] - # Detailed explanation of the reason. Should be displayed as a hint if - # present. - # @!attribute [rw] action - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Action] - # Optional. An action that needs to be performed to solve the problem - # represented by this reason. This action will always be available. Should - # be rendered as a link or button next to the summarizing message. - # - # For example, the review may be available only once the business configure - # all required attributes. In such a situation this action can be a link to - # the form, where they can fill the missing attribute to unblock the main - # action. - class Reason - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Action that is implemented and performed in (your) third-party application. - # Represents various functionality that is expected to be available to business - # and will help them with resolving the issue. The application should point the - # business to the place, where they can access the corresponding functionality. - # If the functionality is not supported, it is recommended to explain the - # situation to the business and provide them with instructions how to solve the - # issue. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction::BuiltInSimpleActionType] - # The type of action that represents a functionality that is expected to be - # available in third-party application. - # @!attribute [rw] attribute_code - # @return [::String] - # The attribute that needs to be updated. Present when the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#type type} - # is `EDIT_ITEM_ATTRIBUTE`. - # - # This field contains a code for attribute, represented in snake_case. You - # can find a list of product's attributes, with their codes - # [here](https://support.google.com/merchants/answer/7052112). - # @!attribute [rw] additional_content - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction::AdditionalContent] - # Long text from an external source that should be available to the business. - # Present when the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#type type} - # is `SHOW_ADDITIONAL_CONTENT`. - class BuiltInSimpleAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Long text from external source. - # @!attribute [rw] title - # @return [::String] - # Title of the additional content; - # @!attribute [rw] paragraphs - # @return [::Array<::String>] - # Long text organized into paragraphs. - class AdditionalContent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum specifying the type of action in third-party application. - module BuiltInSimpleActionType - # Default value. Will never be provided by the API. - BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED = 0 - - # Redirect the business to the part of your application where they can - # verify their phone. - VERIFY_PHONE = 1 - - # Redirect the business to the part of your application where they can - # claim their website. - CLAIM_WEBSITE = 2 - - # Redirect the business to the part of your application where they can add - # products. - ADD_PRODUCTS = 3 - - # Open a form where the business can edit their contact information. - ADD_CONTACT_INFO = 4 - - # Redirect the business to the part of your application where they can link - # ads account. - LINK_ADS_ACCOUNT = 5 - - # Open a form where the business can add their business registration - # number. - ADD_BUSINESS_REGISTRATION_NUMBER = 6 - - # Open a form where the business can edit an attribute. The attribute that - # needs to be updated is specified in - # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#attribute_code attribute_code} - # field of the action. - EDIT_ITEM_ATTRIBUTE = 7 - - # Redirect the business from the product issues to the diagnostic page with - # their account issues in your application. - # - # This action will be returned only for product issues that are caused by - # an account issue and thus the business should resolve the problem on the - # account level. - FIX_ACCOUNT_ISSUE = 8 - - # Show [additional - # content][google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.additional_content] - # to the business. - # - # This action will be used for example to deliver a justification from - # national authority. - SHOW_ADDITIONAL_CONTENT = 9 - end - end - - # Action that is implemented and performed in (your) third-party application. - # The application needs to show an additional content and input form to the - # business. They can start the action only when they provided all required - # inputs. The application will request processing of the action by calling the - # [triggeraction - # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1beta/issueresolution/triggeraction). - # @!attribute [rw] action_context - # @return [::String] - # Contains the action's context that must be included as part of the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload#action_context TriggerActionPayload.action_context} - # in - # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest#payload TriggerActionRequest.payload} - # to call the `triggeraction` method. The content should be treated as opaque - # and must not be modified. - # @!attribute [rw] flows - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::ActionFlow>] - # Actions may provide multiple different flows. Business selects one that - # fits best to their intent. Selecting the flow is the first step in user's - # interaction with the action. It affects what input fields will be available - # and required and also how the request will be processed. - class BuiltInUserInputAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Flow that can be selected for an action. When a business selects a flow, - # application should open a dialog with more information and input form. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the selected action flow. - # @!attribute [rw] label - # @return [::String] - # Text value describing the intent for the action flow. It can be used as an - # input label if business needs to pick one of multiple flows. For example: - # "I disagree with the issue" - # @!attribute [rw] inputs - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputField>] - # A list of input fields. - # @!attribute [rw] dialog_title - # @return [::String] - # Title of the request dialog. For example: "Before you request a review" - # @!attribute [rw] dialog_message - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # Message displayed in the request dialog. For example: "Make sure you've - # fixed all your country-specific issues. If not, you may have to wait 7 days - # to request another review". There may be an more information to be shown in - # a tooltip. - # @!attribute [rw] dialog_callout - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Callout] - # Important message to be highlighted in the request dialog. For example: - # "You can only request a review for disagreeing with this issue once. If - # it's not approved, you'll need to fix the issue and wait a few days before - # you can request another review." - # @!attribute [rw] dialog_button_label - # @return [::String] - # Label for the button to trigger the action from the action dialog. For - # example: "Request review" - class ActionFlow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input field that needs to be available to the business. If the field is - # marked as required, then a value needs to be provided for a successful - # processing of the request. - # @!attribute [rw] text_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::TextInput] - # Input field to provide text information. - # Corresponds to the [html input - # type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) - # or [html - # textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). - # - # Note: The following fields are mutually exclusive: `text_input`, `choice_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] choice_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::ChoiceInput] - # Input field to select one of the offered choices. - # Corresponds to the [html input - # type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). - # - # Note: The following fields are mutually exclusive: `choice_input`, `text_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] checkbox_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::CheckboxInput] - # Input field to provide a boolean value. - # Corresponds to the [html input - # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). - # - # Note: The following fields are mutually exclusive: `checkbox_input`, `text_input`, `choice_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the given input field. - # @!attribute [rw] label - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # Input field label. There may be more information to be shown in a tooltip. - # @!attribute [rw] required - # @return [::Boolean] - # Whether the field is required. The action button needs to stay disabled - # till values for all required fields are provided. - class InputField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Text input allows the business to provide a text value. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::TextInput::TextInputType] - # Type of the text input - # @!attribute [rw] additional_info - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # Additional info regarding the field to be displayed to the business. For - # example, warning to not include personal identifiable information. There - # may be more information to be shown in a tooltip. - # @!attribute [rw] format_info - # @return [::String] - # Information about the required format. If present, it should be shown - # close to the input field to help the business to provide a correct value. - # For example: "VAT numbers should be in a format similar to SK9999999999" - # @!attribute [rw] aria_label - # @return [::String] - # Text to be used as the - # [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the - # input. - class TextInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of the text input and how it should be rendered. - module TextInputType - # Default value. Will never be provided by the API. - TEXT_INPUT_TYPE_UNSPECIFIED = 0 - - # Used when a short text is expected. The field can be rendered as a - # [text - # field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text). - GENERIC_SHORT_TEXT = 1 - - # Used when a longer text is expected. The field should be rendered as a - # [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). - GENERIC_LONG_TEXT = 2 - end - end - - # Choice input allows the business to select one of the offered choices. Some - # choices may be linked to additional input fields that should be displayed - # under or next to the choice option. The value for the additional input - # field needs to be provided only when the specific choice is selected by the - # the business. For example, additional input field can be hidden or disabled - # until the business selects the specific choice. - # @!attribute [rw] options - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::ChoiceInput::ChoiceInputOption>] - # A list of choices. Only one option can be selected. - class ChoiceInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A choice that the business can select. - # @!attribute [rw] id - # @return [::String] - # Not for display but need to be sent back for the selected choice - # option. - # @!attribute [rw] label - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # Short description of the choice option. There may be more information - # to be shown as a tooltip. - # @!attribute [rw] additional_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField] - # Input that should be displayed when this option is selected. - # The additional input will not contain a `ChoiceInput`. - class ChoiceInputOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Checkbox input allows the business to provide a boolean value. Corresponds - # to the [html input - # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). - # - # If the business checks the box, the input value for the field is `true`, - # otherwise it is `false`. - # - # This type of input is often used as a confirmation that the business - # completed required steps before they are allowed to start the action. In - # such a case, the input field is marked as - # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#required required} - # and the button to trigger the action should stay disabled until the - # business checks the box. - class CheckboxInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Block of text that may contain a tooltip with more information. - # @!attribute [rw] simple_value - # @return [::String] - # Value of the message as a simple text. - # @!attribute [rw] simple_tooltip_value - # @return [::String] - # Value of the tooltip as a simple text. - # @!attribute [rw] tooltip_icon_style - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip::TooltipIconStyle] - # The suggested type of an icon for tooltip, if a tooltip is present. - class TextWithTooltip - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of an icon that is being used to display a - # corresponding tooltip in the Merchant Center. - module TooltipIconStyle - # Default value. Will never be provided by the API. - TOOLTIP_ICON_STYLE_UNSPECIFIED = 0 - - # Used when the tooltip adds additional information to the context, - # the 'i' can be used as an icon. - INFO = 1 - - # Used when the tooltip shows helpful information, the '?' can be used as - # an icon. - QUESTION = 2 - end - end - - # An important message that should be highlighted. Usually displayed as a - # banner. - # @!attribute [rw] style_hint - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Callout::CalloutStyleHint] - # Can be used to render messages with different severity in different styles. - # Snippets off all types contain important information that should be - # displayed to the business. - # @!attribute [rw] full_message - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] - # A full message that needs to be shown to the business. - class Callout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the suggested style, how the message should be rendered. - module CalloutStyleHint - # Default value. Will never be provided by the API. - CALLOUT_STYLE_HINT_UNSPECIFIED = 0 - - # The most important type of information highlighting problems, like an - # unsuccessful outcome of previously requested actions. - ERROR = 1 - - # Information warning about pending problems, risks or deadlines. - WARNING = 2 - - # Default severity for important information like pending status of - # previously requested action or cooldown for re-review. - INFO = 3 - end - end - - # Action that is implemented and performed outside of the third-party - # application. It should redirect the business to the provided URL of an - # external system where they can perform the action. For example to request a - # review in the Merchant Center. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ExternalAction::ExternalActionType] - # The type of external action. - # @!attribute [rw] uri - # @return [::String] - # URL to external system, for example Merchant Center, where the business can - # perform the action. - class ExternalAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum specifying the type of action that requires to redirect the business - # to an external location. - module ExternalActionType - # Default value. Will never be provided by the API. - EXTERNAL_ACTION_TYPE_UNSPECIFIED = 0 - - # Redirect to Merchant Center where the business can request a review for - # issue related to their product. - REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER = 1 - - # Redirect to Merchant Center where the business can request a review for - # issue related to their account. - REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER = 2 - - # Redirect to the form in Help Center where the business can request a - # legal appeal for the issue. - LEGAL_APPEAL_IN_HELP_CENTER = 3 - - # Redirect to Merchant Center where the business can perform identity - # verification. - VERIFY_IDENTITY_IN_MERCHANT_CENTER = 4 - end - end - - # Request to start the selected action - # @!attribute [rw] name - # @return [::String] - # Required. The business's account that is triggering the action. - # Format: `accounts/{account}` - # @!attribute [rw] payload - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload] - # Required. The payload for the triggered action. - # @!attribute [rw] language_code - # @return [::String] - # Optional. Language code [IETF BCP 47 - # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. - # If not set, the result will be in default language `en-US`. - class TriggerActionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payload for the triggered action. - # @!attribute [rw] action_context - # @return [::String] - # Required. The - # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInUserInputAction#action_context context} - # from the selected action. The value is obtained from rendered issues and - # needs to be sent back to identify the - # {::Google::Shopping::Merchant::IssueResolution::V1beta::Action#builtin_user_input_action action} - # that is being triggered. - # @!attribute [rw] action_input - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ActionInput] - # Required. Input provided by the business. - class TriggerActionPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response informing about the started action. - # @!attribute [rw] message - # @return [::String] - # The message for the business. - class TriggerActionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input provided by the business. - # @!attribute [rw] action_flow_id - # @return [::String] - # Required. - # {::Google::Shopping::Merchant::IssueResolution::V1beta::ActionFlow#id Id} of the - # selected action flow. - # @!attribute [rw] input_values - # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue>] - # Required. Values for input fields. - class ActionInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input provided by the business for input field. - # @!attribute [rw] text_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::TextInputValue] - # Value for [text - # input][google.shopping.merchant.issueresolution.v1beta.InputField.TextInput] - # field. - # - # Note: The following fields are mutually exclusive: `text_input_value`, `choice_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] choice_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::ChoiceInputValue] - # Value for [choice - # input][google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput] - # field. - # - # Note: The following fields are mutually exclusive: `choice_input_value`, `text_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] checkbox_input_value - # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::CheckboxInputValue] - # Value for [checkbox - # input][google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput] - # field. - # - # Note: The following fields are mutually exclusive: `checkbox_input_value`, `text_input_value`, `choice_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_field_id - # @return [::String] - # Required. - # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Id} of the - # corresponding input field. - class InputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value for [text - # input][google.shopping.merchant.issueresolution.v1beta.InputField.TextInput] - # field. - # @!attribute [rw] value - # @return [::String] - # Required. Text provided by the business. - class TextInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Value for [choice - # input][google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput] - # field. - # @!attribute [rw] choice_input_option_id - # @return [::String] - # Required. [Id][InputField.ChoiceInput.id] of the option that was selected - # by the business. - class ChoiceInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Value for [checkbox - # input][google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput] - # field. - # @!attribute [rw] value - # @return [::Boolean] - # Required. True if the business checked the box field. False otherwise. - class CheckboxInputValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Enum specifying the severity of the issue. - module Severity - # Default value. Will never be provided by the API. - SEVERITY_UNSPECIFIED = 0 - - # Causes either an account suspension or an item disapproval. Errors should - # be resolved as soon as possible to ensure items are eligible to appear in - # results again. - ERROR = 1 - - # Warnings can negatively impact the performance of ads and can lead to item - # or account suspensions in the future unless the issue is resolved. - WARNING = 2 - - # Infos are suggested optimizations to increase data quality. Resolving these - # issues is recommended, but not required. - INFO = 3 - end - - # Enum specifying how is the content returned. - module ContentOption - # Default value. Will never be provided by the API. - CONTENT_OPTION_UNSPECIFIED = 0 - - # Returns the detail of the issue as a pre-rendered HTML text. - PRE_RENDERED_HTML = 1 - end - - # Enum specifying how actions with user input forms, such as requesting - # re-review, are handled. - module UserInputActionRenderingOption - # Default value. Will never be provided by the API. - USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED = 0 - - # Actions that require user input are represented only as links that points - # the business to Merchant Center where they can request the action. Provides - # easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`. - REDIRECT_TO_MERCHANT_CENTER = 1 - - # Returns content and input form definition for each complex action. Your - # application needs to display this content and input form to the business - # before they can request processing of the action. To start the action, your - # application needs to call the `triggeraction` method. - BUILT_IN_USER_INPUT_ACTIONS = 2 - end - end - end - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/snippets/Gemfile b/google-cloud-merchant-issue_resolution-v1beta/snippets/Gemfile deleted file mode 100644 index 83a581942c55..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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-merchant-issue_resolution-v1beta", path: "../" -else - gem "google-cloud-merchant-issue_resolution-v1beta" -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/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb b/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb deleted file mode 100644 index 14ec86c323fd..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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 merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync] -require "google/shopping/merchant/issue_resolution/v1beta" - -## -# Snippet for the render_account_issues call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues. -# -def render_account_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new - - # Call the render_account_issues method. - result = client.render_account_issues request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. - p result -end -# [END merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync] diff --git a/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb b/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb deleted file mode 100644 index 9674f8c02f90..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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 merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync] -require "google/shopping/merchant/issue_resolution/v1beta" - -## -# Snippet for the render_product_issues call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues. -# -def render_product_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new - - # Call the render_product_issues method. - result = client.render_product_issues request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. - p result -end -# [END merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync] diff --git a/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb b/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb deleted file mode 100644 index 537df11369fb..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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 merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync] -require "google/shopping/merchant/issue_resolution/v1beta" - -## -# Snippet for the trigger_action call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action. -# -def trigger_action - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new - - # Call the trigger_action method. - result = client.trigger_action request - - # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. - p result -end -# [END merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync] diff --git a/google-cloud-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json b/google-cloud-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json deleted file mode 100644 index 9e1334b73bea..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-merchant-issue_resolution-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.issueresolution.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync", - "title": "Snippet for the render_account_issues call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues.", - "file": "issue_resolution_service/render_account_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "render_account_issues", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" - }, - "method": { - "short_name": "RenderAccountIssues", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.RenderAccountIssues", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync", - "title": "Snippet for the render_product_issues call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues.", - "file": "issue_resolution_service/render_product_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "render_product_issues", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" - }, - "method": { - "short_name": "RenderProductIssues", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.RenderProductIssues", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync", - "title": "Snippet for the trigger_action call in the IssueResolutionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action.", - "file": "issue_resolution_service/trigger_action.rb", - "language": "RUBY", - "client_method": { - "short_name": "trigger_action", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse", - "client": { - "short_name": "IssueResolutionService::Client", - "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" - }, - "method": { - "short_name": "TriggerAction", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.TriggerAction", - "service": { - "short_name": "IssueResolutionService", - "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb b/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb deleted file mode 100644 index 60a110d92a27..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb b/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb deleted file mode 100644 index c2778d04f48f..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb +++ /dev/null @@ -1,269 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" - - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_render_account_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_account_issues_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_account_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, render_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, render_account_issues_client_stub.call_count - end - end - end - - def test_render_product_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_product_issues_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_product_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, render_product_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, render_product_issues_client_stub.call_count - end - end - end - - def test_trigger_action - # Create test objects. - client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - language_code = "hello world" - - trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_trigger_action_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, trigger_action_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.trigger_action name: name, payload: payload, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.trigger_action({ name: name, payload: payload, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client::Configuration, config - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb b/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb deleted file mode 100644 index 68ca85b23f9a..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb +++ /dev/null @@ -1,275 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" -require "google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb" -require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" - -class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_render_account_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.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" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :render_account_issues, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["language_code"] - assert_equal "hello world", request["time_zone"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload), request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, render_account_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, render_account_issues_client_stub.call_rpc_count - end - end - - def test_render_product_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.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" - language_code = "hello world" - time_zone = "hello world" - payload = {} - - render_product_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :render_product_issues, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["language_code"] - assert_equal "hello world", request["time_zone"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload), request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, render_product_issues_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, render_product_issues_client_stub.call_rpc_count - end - end - - def test_trigger_action - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.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" - payload = {} - language_code = "hello world" - - trigger_action_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :trigger_action, name - assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload), request["payload"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, trigger_action_client_stub do - # Create client - client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.trigger_action name: name, payload: payload, language_code: language_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.trigger_action({ name: name, payload: payload, language_code: language_code }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client::Configuration, config - end -end diff --git a/google-cloud-merchant-issue_resolution-v1beta/test/helper.rb b/google-cloud-merchant-issue_resolution-v1beta/test/helper.rb deleted file mode 100644 index 968201e8049d..000000000000 --- a/google-cloud-merchant-issue_resolution-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# 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/rg" - -require "grpc" - -require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 0268e44ea9b2..c30c66799e5d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -991,10 +991,6 @@ "component": "google-cloud-memorystore-v1beta", "version_file": "lib/google/cloud/memorystore/v1beta/version.rb" }, - "google-cloud-merchant-issue_resolution-v1beta": { - "component": "google-cloud-merchant-issue_resolution-v1beta", - "version_file": "lib/google/cloud/merchant/issue_resolution/v1beta/version.rb" - }, "google-cloud-metastore": { "component": "google-cloud-metastore", "version_file": "lib/google/cloud/metastore/version.rb" From 4835f21ffc988d82b61c7b90c94da427bd3d063f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Thu, 22 May 2025 15:33:24 -0700 Subject: [PATCH 037/457] docs: Add h1 heading to migration docs (#30436) --- google-cloud-asset/MIGRATING.md | 2 +- google-cloud-automl/MIGRATING.md | 2 +- google-cloud-bigquery-data_transfer/MIGRATING.md | 2 +- google-cloud-container/MIGRATING.md | 2 +- google-cloud-container_analysis/MIGRATING.md | 2 +- google-cloud-dataproc/MIGRATING.md | 2 +- google-cloud-dialogflow/MIGRATING.md | 2 +- google-cloud-dlp/MIGRATING.md | 2 +- google-cloud-kms/MIGRATING.md | 2 +- google-cloud-language/MIGRATING.md | 2 +- google-cloud-monitoring/MIGRATING.md | 2 +- google-cloud-os_login/MIGRATING.md | 2 +- google-cloud-phishing_protection/MIGRATING.md | 2 +- google-cloud-recaptcha_enterprise/MIGRATING.md | 2 +- google-cloud-redis/MIGRATING.md | 2 +- google-cloud-resource_manager/MIGRATING.md | 2 +- google-cloud-scheduler/MIGRATING.md | 2 +- google-cloud-security_center/MIGRATING.md | 2 +- google-cloud-speech/MIGRATING.md | 2 +- google-cloud-talent/MIGRATING.md | 2 +- google-cloud-tasks/MIGRATING.md | 2 +- google-cloud-text_to_speech/MIGRATING.md | 2 +- google-cloud-translate/MIGRATING.md | 2 +- google-cloud-video_intelligence/MIGRATING.md | 2 +- google-cloud-vision/MIGRATING.md | 2 +- google-cloud-web_risk/MIGRATING.md | 2 +- grafeas/MIGRATING.md | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-asset/MIGRATING.md b/google-cloud-asset/MIGRATING.md index 962b8a143e82..4d9937d738d6 100644 --- a/google-cloud-asset/MIGRATING.md +++ b/google-cloud-asset/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-asset 1.0 +# Migrating to google-cloud-asset 1.0 The 1.0 release of the google-cloud-asset client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-automl/MIGRATING.md b/google-cloud-automl/MIGRATING.md index 33be896f0a51..47c057d78eb1 100644 --- a/google-cloud-automl/MIGRATING.md +++ b/google-cloud-automl/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-automl 1.0 +# Migrating to google-cloud-automl 1.0 The 1.0 release of the google-cloud-automl client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-bigquery-data_transfer/MIGRATING.md b/google-cloud-bigquery-data_transfer/MIGRATING.md index 4c307c456f5a..0c76e1792762 100644 --- a/google-cloud-bigquery-data_transfer/MIGRATING.md +++ b/google-cloud-bigquery-data_transfer/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-bigquery-data_transfer 1.0 +# Migrating to google-cloud-bigquery-data_transfer 1.0 The 1.0 release of the google-cloud-bigquery-data_transfer client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-container/MIGRATING.md b/google-cloud-container/MIGRATING.md index 3adf62128e68..f45667c5b6ac 100644 --- a/google-cloud-container/MIGRATING.md +++ b/google-cloud-container/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-container 1.0 +# Migrating to google-cloud-container 1.0 The 1.0 release of the google-cloud-container client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-container_analysis/MIGRATING.md b/google-cloud-container_analysis/MIGRATING.md index d90305659f64..7e0aef3a083c 100644 --- a/google-cloud-container_analysis/MIGRATING.md +++ b/google-cloud-container_analysis/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-container_analysis 1.0 +# Migrating to google-cloud-container_analysis 1.0 The 1.0 release of the Container Analysis client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-dataproc/MIGRATING.md b/google-cloud-dataproc/MIGRATING.md index 5ed66be645dd..13a4eaf98074 100644 --- a/google-cloud-dataproc/MIGRATING.md +++ b/google-cloud-dataproc/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-dataproc 1.0 +# Migrating to google-cloud-dataproc 1.0 The 1.0 release of the google-cloud-dataproc client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-dialogflow/MIGRATING.md b/google-cloud-dialogflow/MIGRATING.md index fb948c628c02..076d17167fb4 100644 --- a/google-cloud-dialogflow/MIGRATING.md +++ b/google-cloud-dialogflow/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-dialogflow 1.0 +# Migrating to google-cloud-dialogflow 1.0 The 1.0 release of the google-cloud-dialogflow client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-dlp/MIGRATING.md b/google-cloud-dlp/MIGRATING.md index 43d3386964e9..fa00822f7070 100644 --- a/google-cloud-dlp/MIGRATING.md +++ b/google-cloud-dlp/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-dlp 1.0 +# Migrating to google-cloud-dlp 1.0 The 1.0 release of the google-cloud-dlp client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-kms/MIGRATING.md b/google-cloud-kms/MIGRATING.md index 5cd5a023772f..799688867142 100644 --- a/google-cloud-kms/MIGRATING.md +++ b/google-cloud-kms/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-kms 2.0 +# Migrating to google-cloud-kms 2.0 The 2.0 release of the google-cloud-kms client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-language/MIGRATING.md b/google-cloud-language/MIGRATING.md index 1a55cdd67227..765cbe9d39a1 100644 --- a/google-cloud-language/MIGRATING.md +++ b/google-cloud-language/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-language 1.0 +# Migrating to google-cloud-language 1.0 The 1.0 release of the google-cloud-language client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-monitoring/MIGRATING.md b/google-cloud-monitoring/MIGRATING.md index 372e492b4ab8..3d500eca7aba 100644 --- a/google-cloud-monitoring/MIGRATING.md +++ b/google-cloud-monitoring/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-monitoring 1.0 +# Migrating to google-cloud-monitoring 1.0 The 1.0 release of the google-cloud-monitoring client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-os_login/MIGRATING.md b/google-cloud-os_login/MIGRATING.md index b23d78d92b49..359e470c916e 100644 --- a/google-cloud-os_login/MIGRATING.md +++ b/google-cloud-os_login/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-os_login 1.0 +# Migrating to google-cloud-os_login 1.0 The 1.0 release of the google-cloud-os_login client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-phishing_protection/MIGRATING.md b/google-cloud-phishing_protection/MIGRATING.md index 7f7924f2c1c7..c1159119dba3 100644 --- a/google-cloud-phishing_protection/MIGRATING.md +++ b/google-cloud-phishing_protection/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-phishing_protection 0.10 +# Migrating to google-cloud-phishing_protection 0.10 The 0.10 release of the google-cloud-phishing_protection client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-recaptcha_enterprise/MIGRATING.md b/google-cloud-recaptcha_enterprise/MIGRATING.md index a85dbec4d9d1..0416e7ca4ffe 100644 --- a/google-cloud-recaptcha_enterprise/MIGRATING.md +++ b/google-cloud-recaptcha_enterprise/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-recaptcha_enterprise 1.0 +# Migrating to google-cloud-recaptcha_enterprise 1.0 The 1.0 release of the google-cloud-recaptcha_enterprise client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-redis/MIGRATING.md b/google-cloud-redis/MIGRATING.md index f3a8e7bbabc4..004288c6838f 100644 --- a/google-cloud-redis/MIGRATING.md +++ b/google-cloud-redis/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-redis 1.0 +# Migrating to google-cloud-redis 1.0 The 1.0 release of the google-cloud-redis client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-resource_manager/MIGRATING.md b/google-cloud-resource_manager/MIGRATING.md index c80f92b5bc70..371df792f675 100644 --- a/google-cloud-resource_manager/MIGRATING.md +++ b/google-cloud-resource_manager/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-resource_manager 1.0 +# Migrating to google-cloud-resource_manager 1.0 The 1.0 release of the google-cloud-resource_manager client is a significant upgrade to add a number of new features in version V3 of the resource manager diff --git a/google-cloud-scheduler/MIGRATING.md b/google-cloud-scheduler/MIGRATING.md index 72e38aa58e36..1aa70c436ca9 100644 --- a/google-cloud-scheduler/MIGRATING.md +++ b/google-cloud-scheduler/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-scheduler 2.0 +# Migrating to google-cloud-scheduler 2.0 The 2.0 release of the google-cloud-scheduler client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-security_center/MIGRATING.md b/google-cloud-security_center/MIGRATING.md index 993bce0278c0..eeeb21abb032 100644 --- a/google-cloud-security_center/MIGRATING.md +++ b/google-cloud-security_center/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-security_center 1.0 +# Migrating to google-cloud-security_center 1.0 The 1.0 release of the google-cloud-security_center client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-speech/MIGRATING.md b/google-cloud-speech/MIGRATING.md index 48769e3db17c..95ec7908f507 100644 --- a/google-cloud-speech/MIGRATING.md +++ b/google-cloud-speech/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-speech 1.0 +# Migrating to google-cloud-speech 1.0 The 1.0 release of the google-cloud-speech client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-talent/MIGRATING.md b/google-cloud-talent/MIGRATING.md index 2fcf7ec99ce8..27e6747de1a7 100644 --- a/google-cloud-talent/MIGRATING.md +++ b/google-cloud-talent/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-talent 0.20 +# Migrating to google-cloud-talent 0.20 The 0.20 release of the google-cloud-talent client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-tasks/MIGRATING.md b/google-cloud-tasks/MIGRATING.md index 3cddbc3cead2..bf6af09db6ba 100644 --- a/google-cloud-tasks/MIGRATING.md +++ b/google-cloud-tasks/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-tasks 2.0 +# Migrating to google-cloud-tasks 2.0 The 2.0 release of the google-cloud-tasks client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-text_to_speech/MIGRATING.md b/google-cloud-text_to_speech/MIGRATING.md index 81fd88877f4f..51e420edac94 100644 --- a/google-cloud-text_to_speech/MIGRATING.md +++ b/google-cloud-text_to_speech/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-text_to_speech 1.0 +# Migrating to google-cloud-text_to_speech 1.0 The 1.0 release of the google-cloud-text_to_speech client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-translate/MIGRATING.md b/google-cloud-translate/MIGRATING.md index ebd8ab39d0f0..aa4648face99 100644 --- a/google-cloud-translate/MIGRATING.md +++ b/google-cloud-translate/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-translate 3.0 +# Migrating to google-cloud-translate 3.0 The 3.0 release of the google-cloud-translate client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-video_intelligence/MIGRATING.md b/google-cloud-video_intelligence/MIGRATING.md index 34d090600df0..a7e886522764 100644 --- a/google-cloud-video_intelligence/MIGRATING.md +++ b/google-cloud-video_intelligence/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-video_intelligence 3.0 +# Migrating to google-cloud-video_intelligence 3.0 The 3.0 release of the google-cloud-video_intelligence client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-vision/MIGRATING.md b/google-cloud-vision/MIGRATING.md index eb6ce4af3224..6c04fe5207f8 100644 --- a/google-cloud-vision/MIGRATING.md +++ b/google-cloud-vision/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-vision 1.0 +# Migrating to google-cloud-vision 1.0 The 1.0 release of the google-cloud-vision client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), diff --git a/google-cloud-web_risk/MIGRATING.md b/google-cloud-web_risk/MIGRATING.md index 766984dead33..b1d86c543b80 100644 --- a/google-cloud-web_risk/MIGRATING.md +++ b/google-cloud-web_risk/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to google-cloud-web_risk 1.0 +# Migrating to google-cloud-web_risk 1.0 The `google-cloud-web_risk` gem is a significant upgrade over the older and now deprecated `google-cloud-webrisk` gem. It is based on a diff --git a/grafeas/MIGRATING.md b/grafeas/MIGRATING.md index 8ab5aed4b1f8..a31219aaf615 100644 --- a/grafeas/MIGRATING.md +++ b/grafeas/MIGRATING.md @@ -1,4 +1,4 @@ -## Migrating to grafeas 1.0 +# Migrating to grafeas 1.0 The 1.0 release of the grafeas client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), From df23b9b199e3d218c960da4ee22d49797ecf69ba Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Thu, 22 May 2025 15:53:28 -0700 Subject: [PATCH 038/457] feat: Initial generation of google-shopping-merchant-issue_resolution-v1beta (#30438) --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 49 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++++ .../README.md | 154 +++ .../Rakefile | 169 ++++ .../gapic_metadata.json | 33 + ...g-merchant-issue_resolution-v1beta.gemspec | 28 + ...opping-merchant-issue_resolution-v1beta.rb | 21 + .../merchant/issue_resolution/v1beta.rb | 47 + .../v1beta/issue_resolution_service.rb | 58 ++ .../v1beta/issue_resolution_service/client.rb | 692 +++++++++++++ .../issue_resolution_service/credentials.rb | 49 + .../v1beta/issue_resolution_service/paths.rb | 66 ++ .../v1beta/issue_resolution_service/rest.rb | 55 + .../issue_resolution_service/rest/client.rb | 645 ++++++++++++ .../rest/service_stub.rb | 269 +++++ .../merchant/issue_resolution/v1beta/rest.rb | 39 + .../issue_resolution/v1beta/version.rb | 30 + .../v1beta/issueresolution_pb.rb | 87 ++ .../v1beta/issueresolution_services_pb.rb | 66 ++ .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 +++++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../issueresolution/v1beta/issueresolution.rb | 954 ++++++++++++++++++ .../snippets/Gemfile | 32 + .../render_account_issues.rb | 47 + .../render_product_issues.rb | 47 + .../trigger_action.rb | 47 + ...pping.merchant.issueresolution.v1beta.json | 135 +++ .../issue_resolution_service_paths_test.rb | 67 ++ .../issue_resolution_service_rest_test.rb | 269 +++++ .../v1beta/issue_resolution_service_test.rb | 275 +++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 46 files changed, 5870 insertions(+) create mode 100644 google-shopping-merchant-issue_resolution-v1beta/.OwlBot.yaml create mode 100644 google-shopping-merchant-issue_resolution-v1beta/.gitignore create mode 100644 google-shopping-merchant-issue_resolution-v1beta/.owlbot-manifest.json create mode 100644 google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json create mode 100644 google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml create mode 100644 google-shopping-merchant-issue_resolution-v1beta/.toys.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/.yardopts create mode 100644 google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md create mode 100644 google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md create mode 100644 google-shopping-merchant-issue_resolution-v1beta/Gemfile create mode 100644 google-shopping-merchant-issue_resolution-v1beta/LICENSE.md create mode 100644 google-shopping-merchant-issue_resolution-v1beta/README.md create mode 100644 google-shopping-merchant-issue_resolution-v1beta/Rakefile create mode 100644 google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json create mode 100644 google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile create mode 100644 google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json create mode 100644 google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7cb23e3cec29..1ff11a97b7f7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -917,6 +917,8 @@ "google-shopping-merchant-inventories+FILLER": "0.0.0", "google-shopping-merchant-inventories-v1beta": "0.7.0", "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", + "google-shopping-merchant-issue_resolution-v1beta": "0.0.1", + "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", "google-shopping-merchant-lfp": "0.3.1", "google-shopping-merchant-lfp+FILLER": "0.0.0", "google-shopping-merchant-lfp-v1beta": "0.5.0", diff --git a/google-shopping-merchant-issue_resolution-v1beta/.OwlBot.yaml b/google-shopping-merchant-issue_resolution-v1beta/.OwlBot.yaml new file mode 100644 index 000000000000..43d8b5775764 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/issueresolution/v1beta/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-issue_resolution-v1beta/$1 diff --git a/google-shopping-merchant-issue_resolution-v1beta/.gitignore b/google-shopping-merchant-issue_resolution-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/.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/google-shopping-merchant-issue_resolution-v1beta/.owlbot-manifest.json b/google-shopping-merchant-issue_resolution-v1beta/.owlbot-manifest.json new file mode 100644 index 000000000000..942a478f67ea --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/.owlbot-manifest.json @@ -0,0 +1,49 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-issue_resolution-v1beta.gemspec", + "lib/google-shopping-merchant-issue_resolution-v1beta.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/version.rb", + "lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb", + "lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb", + "snippets/Gemfile", + "snippets/issue_resolution_service/render_account_issues.rb", + "snippets/issue_resolution_service/render_product_issues.rb", + "snippets/issue_resolution_service/trigger_action.rb", + "snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json", + "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb", + "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb", + "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json b/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..b3093d31ccee --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta", + "distribution_name": "google-shopping-merchant-issue_resolution-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml b/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml new file mode 100644 index 000000000000..b16689bf7e9e --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-issue_resolution-v1beta.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-shopping-merchant-issue_resolution-v1beta.rb" diff --git a/google-shopping-merchant-issue_resolution-v1beta/.toys.rb b/google-shopping-merchant-issue_resolution-v1beta/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1beta/.yardopts b/google-shopping-merchant-issue_resolution-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md b/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..2ff7b95b7a25 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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/shopping/merchant/issue_resolution/v1beta" + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/issue_resolution/v1beta" + +::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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-shopping-merchant-issue_resolution-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/issue_resolution/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md b/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-issue_resolution-v1beta/Gemfile b/google-shopping-merchant-issue_resolution-v1beta/Gemfile new file mode 100644 index 000000000000..d1825e41a44f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.0" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-issue_resolution-v1beta/LICENSE.md b/google-shopping-merchant-issue_resolution-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/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/google-shopping-merchant-issue_resolution-v1beta/README.md b/google-shopping-merchant-issue_resolution-v1beta/README.md new file mode 100644 index 000000000000..a03aab45ec0b --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-issue_resolution](https://rubygems.org/gems/google-shopping-merchant-issue_resolution). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-issue_resolution-v1beta +``` + +## 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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/issue_resolution/v1beta" + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new +request = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new # (request fields as keyword arguments...) +response = client.render_account_issues request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/issue_resolution/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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-shopping-merchant-issue_resolution`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-issue_resolution-v1beta`. +_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-shopping-merchant-issue_resolution`. +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-shopping-merchant-issue_resolution-v1beta`. + +### 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/google-shopping-merchant-issue_resolution-v1beta/Rakefile b/google-shopping-merchant-issue_resolution-v1beta/Rakefile new file mode 100644 index 000000000000..185a5d4e080f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-issue_resolution-v1beta 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" + ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-issue_resolution-v1beta" + header "google-shopping-merchant-issue_resolution-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-issue_resolution-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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-shopping-merchant-issue_resolution-v1beta 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/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json b/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..70b76dcc73d1 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.issueresolution.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::IssueResolution::V1beta", + "services": { + "IssueResolutionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client", + "rpcs": { + "RenderAccountIssues": { + "methods": [ + "render_account_issues" + ] + }, + "RenderProductIssues": { + "methods": [ + "render_product_issues" + ] + }, + "TriggerAction": { + "methods": [ + "trigger_action" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec b/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec new file mode 100644 index 000000000000..a9a2a4e5c4a8 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/issue_resolution/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-issue_resolution-v1beta" + gem.version = Google::Shopping::Merchant::IssueResolution::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb new file mode 100644 index 000000000000..81037d956b1f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google-shopping-merchant-issue_resolution-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta" diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb new file mode 100644 index 000000000000..913f65543ff3 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" +require "google/shopping/merchant/issue_resolution/v1beta/version" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1beta" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1beta" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb new file mode 100644 index 000000000000..5d078a6ec9e3 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta/version" + +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ## + # Service to provide an issue resolution content for account issues and product + # issues. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + module IssueResolutionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "issue_resolution_service", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb new file mode 100644 index 000000000000..9b1f640b2ced --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb @@ -0,0 +1,692 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + ## + # Client for the IssueResolutionService service. + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :issue_resolution_service_stub + + ## + # Configure the IssueResolutionService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IssueResolutionService clients + # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] + 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.timeout = 60.0 + default_config.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 IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + @issue_resolution_service_stub.universe_domain + end + + ## + # Create a new IssueResolutionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IssueResolutionService 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/shopping/merchant/issueresolution/v1beta/issueresolution_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 + + @issue_resolution_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + ) + + @issue_resolution_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 + @issue_resolution_service_stub.logger + end + + # Service calls + + ## + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_account_issues(request, options = nil) + # Pass arguments to `render_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::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 render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_account_issues` 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 account to fetch issues for. + # Format: `accounts/{account}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new + # + # # Call the render_account_issues method. + # result = client.render_account_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. + # p result + # + def render_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest + + # 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.render_account_issues.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::Shopping::Merchant::IssueResolution::V1beta::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.render_account_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.render_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :render_account_issues, 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 + + ## + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_product_issues(request, options = nil) + # Pass arguments to `render_product_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::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 render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_product_issues` 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 name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new + # + # # Call the render_product_issues method. + # result = client.render_product_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. + # p result + # + def render_product_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest + + # 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.render_product_issues.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::Shopping::Merchant::IssueResolution::V1beta::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.render_product_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.render_product_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :render_product_issues, 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 + + ## + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Ids} for + # all problematic field together with translated, human readable error + # messages that can be shown to the user. + # + # @overload trigger_action(request, options = nil) + # Pass arguments to `trigger_action` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::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 trigger_action(name: nil, payload: nil, language_code: nil) + # Pass arguments to `trigger_action` 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 business's account that is triggering the action. + # Format: `accounts/{account}` + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload, ::Hash] + # Required. The payload for the triggered action. + # @param language_code [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new + # + # # Call the trigger_action method. + # result = client.trigger_action request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. + # p result + # + def trigger_action request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest + + # 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.trigger_action.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::Shopping::Merchant::IssueResolution::V1beta::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.trigger_action.timeout, + metadata: metadata, + retry_policy: @config.rpcs.trigger_action.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :trigger_action, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the IssueResolutionService API. + # + # This class represents the configuration for IssueResolutionService, + # 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + # # render_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 IssueResolutionService 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 `render_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_account_issues + ## + # RPC-specific configuration for `render_product_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_product_issues + ## + # RPC-specific configuration for `trigger_action` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_action + + # @private + def initialize parent_rpcs = nil + render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues + @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config + render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues + @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config + trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action + @trigger_action = ::Gapic::Config::Method.new trigger_action_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb new file mode 100644 index 000000000000..06300ffde483 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + # Credentials for the IssueResolutionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb new file mode 100644 index 000000000000..743a7bf49c6a --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + # Path helper methods for the IssueResolutionService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb new file mode 100644 index 000000000000..61bb893cd06f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta/version" + +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/paths" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ## + # Service to provide an issue resolution content for account issues and product + # issues. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + module IssueResolutionService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb new file mode 100644 index 000000000000..e3d3d8a31a13 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/client.rb @@ -0,0 +1,645 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + module Rest + ## + # REST client for the IssueResolutionService service. + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :issue_resolution_service_stub + + ## + # Configure the IssueResolutionService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IssueResolutionService clients + # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] + 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.timeout = 60.0 + default_config.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 IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + @issue_resolution_service_stub.universe_domain + end + + ## + # Create a new IssueResolutionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IssueResolutionService 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 + + @issue_resolution_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @issue_resolution_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 + @issue_resolution_service_stub.logger + end + + # Service calls + + ## + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_account_issues(request, options = nil) + # Pass arguments to `render_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::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 render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_account_issues` 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 account to fetch issues for. + # Format: `accounts/{account}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new + # + # # Call the render_account_issues method. + # result = client.render_account_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. + # p result + # + def render_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest + + # 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.render_account_issues.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::Shopping::Merchant::IssueResolution::V1beta::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.render_account_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.render_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.render_account_issues 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 + + ## + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_product_issues(request, options = nil) + # Pass arguments to `render_product_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::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 render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_product_issues` 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 name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new + # + # # Call the render_product_issues method. + # result = client.render_product_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. + # p result + # + def render_product_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest + + # 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.render_product_issues.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::Shopping::Merchant::IssueResolution::V1beta::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.render_product_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.render_product_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.render_product_issues 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 + + ## + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Ids} for + # all problematic field together with translated, human readable error + # messages that can be shown to the user. + # + # @overload trigger_action(request, options = nil) + # Pass arguments to `trigger_action` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::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 trigger_action(name: nil, payload: nil, language_code: nil) + # Pass arguments to `trigger_action` 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 business's account that is triggering the action. + # Format: `accounts/{account}` + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload, ::Hash] + # Required. The payload for the triggered action. + # @param language_code [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new + # + # # Call the trigger_action method. + # result = client.trigger_action request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. + # p result + # + def trigger_action request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest + + # 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.trigger_action.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::Shopping::Merchant::IssueResolution::V1beta::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.trigger_action.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.trigger_action.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.trigger_action 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 + + ## + # Configuration class for the IssueResolutionService REST API. + # + # This class represents the configuration for IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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 + # # render_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.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 = "merchantapi.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 IssueResolutionService 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 `render_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_account_issues + ## + # RPC-specific configuration for `render_product_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_product_issues + ## + # RPC-specific configuration for `trigger_action` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_action + + # @private + def initialize parent_rpcs = nil + render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues + @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config + render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues + @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config + trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action + @trigger_action = ::Gapic::Config::Method.new trigger_action_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb new file mode 100644 index 000000000000..07c43d4c0679 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + module Rest + ## + # REST service stub for the IssueResolutionService 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: true, + 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 render_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest] + # 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::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse] + # A result object deserialized from the server's reply + def render_account_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_render_account_issues_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: "render_account_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the render_product_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest] + # 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::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse] + # A result object deserialized from the server's reply + def render_product_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_render_product_issues_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: "render_product_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the trigger_action REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest] + # 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::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse] + # A result object deserialized from the server's reply + def trigger_action request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_trigger_action_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: "trigger_action", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.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 render_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_render_account_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1beta/{name}:renderaccountissues", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the render_product_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_render_product_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1beta/{name}:renderproductissues", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the trigger_action REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_trigger_action_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1beta/{name}:triggeraction", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb new file mode 100644 index 000000000000..3149144d6c11 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" +require "google/shopping/merchant/issue_resolution/v1beta/version" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/issue_resolution/v1beta/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb new file mode 100644 index 000000000000..4d3407d908e6 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb new file mode 100644 index 000000000000..c09dcd182d55 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/issueresolution/v1beta/issueresolution.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' + + +descriptor_data = "\nEgoogle/shopping/merchant/issueresolution/v1beta/issueresolution.proto\x12/google.shopping.merchant.issueresolution.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"v\n\x1bRenderAccountIssuesResponse\x12W\n\x0frendered_issues\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.RenderedIssue\"\xed\x01\n\x1aRenderAccountIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x07payload\x18\x04 \x01(\x0b\x32K.google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xab\x02\n\x1aRenderIssuesRequestPayload\x12`\n\x0e\x63ontent_option\x18\x01 \x01(\x0e\x32>.google.shopping.merchant.issueresolution.v1beta.ContentOptionB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12{\n\x18user_input_action_option\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.issueresolution.v1beta.UserInputActionRenderingOptionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x11\n\x0f_content_optionB\x1b\n\x19_user_input_action_option\"v\n\x1bRenderProductIssuesResponse\x12W\n\x0frendered_issues\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.RenderedIssue\"\xed\x01\n\x1aRenderProductIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x07payload\x18\x04 \x01(\x0b\x32K.google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xb5\x02\n\rRenderedIssue\x12\x1d\n\x13prerendered_content\x18\x03 \x01(\tH\x00\x12\x35\n+prerendered_out_of_court_dispute_settlement\x18\x05 \x01(\tH\x01\x12\r\n\x05title\x18\x01 \x01(\t\x12G\n\x06impact\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.Impact\x12H\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.ActionB\t\n\x07\x63ontentB!\n\x1fout_of_court_dispute_settlement\"\xbb\x01\n\x06Impact\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12K\n\x08severity\x18\x02 \x01(\x0e\x32\x39.google.shopping.merchant.issueresolution.v1beta.Severity\x12N\n\nbreakdowns\x18\x03 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1beta.Breakdown\"\x96\x01\n\tBreakdown\x12R\n\x07regions\x18\x01 \x03(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1beta.Breakdown.Region\x12\x0f\n\x07\x64\x65tails\x18\x04 \x03(\t\x1a$\n\x06Region\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xda\x04\n\x06\x41\x63tion\x12\x65\n\x15\x62uiltin_simple_action\x18\x02 \x01(\x0b\x32\x44.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleActionH\x00\x12Z\n\x0f\x65xternal_action\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.issueresolution.v1beta.ExternalActionH\x00\x12l\n\x19\x62uiltin_user_input_action\x18\x07 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.BuiltInUserInputActionH\x00\x12\x14\n\x0c\x62utton_label\x18\x04 \x01(\t\x12\x14\n\x0cis_available\x18\x05 \x01(\x08\x12O\n\x07reasons\x18\x06 \x03(\x0b\x32>.google.shopping.merchant.issueresolution.v1beta.Action.Reason\x1a\x97\x01\n\x06Reason\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x13\n\x06\x64\x65tail\x18\x02 \x01(\tH\x00\x88\x01\x01\x12Q\n\x06\x61\x63tion\x18\x03 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1beta.ActionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_detailB\t\n\x07_actionB\x08\n\x06\x61\x63tion\"\x98\x05\n\x13\x42uiltInSimpleAction\x12j\n\x04type\x18\x01 \x01(\x0e\x32\\.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.BuiltInSimpleActionType\x12\x1b\n\x0e\x61ttribute_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12w\n\x12\x61\x64\x64itional_content\x18\x03 \x01(\x0b\x32V.google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.AdditionalContentH\x01\x88\x01\x01\x1a\x36\n\x11\x41\x64\x64itionalContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x12\n\nparagraphs\x18\x02 \x03(\t\"\x9c\x02\n\x17\x42uiltInSimpleActionType\x12+\n\'BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cVERIFY_PHONE\x10\x01\x12\x11\n\rCLAIM_WEBSITE\x10\x02\x12\x10\n\x0c\x41\x44\x44_PRODUCTS\x10\x03\x12\x14\n\x10\x41\x44\x44_CONTACT_INFO\x10\x04\x12\x14\n\x10LINK_ADS_ACCOUNT\x10\x05\x12$\n ADD_BUSINESS_REGISTRATION_NUMBER\x10\x06\x12\x17\n\x13\x45\x44IT_ITEM_ATTRIBUTE\x10\x07\x12\x15\n\x11\x46IX_ACCOUNT_ISSUE\x10\x08\x12\x1b\n\x17SHOW_ADDITIONAL_CONTENT\x10\tB\x11\n\x0f_attribute_codeB\x15\n\x13_additional_content\"|\n\x16\x42uiltInUserInputAction\x12\x16\n\x0e\x61\x63tion_context\x18\x01 \x01(\t\x12J\n\x05\x66lows\x18\x03 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.ActionFlow\"\x83\x03\n\nActionFlow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12K\n\x06inputs\x18\x03 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputField\x12\x14\n\x0c\x64ialog_title\x18\x04 \x01(\t\x12]\n\x0e\x64ialog_message\x18\x07 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltipH\x00\x88\x01\x01\x12U\n\x0e\x64ialog_callout\x18\x08 \x01(\x0b\x32\x38.google.shopping.merchant.issueresolution.v1beta.CalloutH\x01\x88\x01\x01\x12\x1b\n\x13\x64ialog_button_label\x18\t \x01(\tB\x11\n\x0f_dialog_messageB\x11\n\x0f_dialog_callout\"\xb6\t\n\nInputField\x12[\n\ntext_input\x18\x04 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1beta.InputField.TextInputH\x00\x12_\n\x0c\x63hoice_input\x18\x05 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInputH\x00\x12\x63\n\x0e\x63heckbox_input\x18\x06 \x01(\x0b\x32I.google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInputH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05label\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\x12\x10\n\x08required\x18\x03 \x01(\x08\x1a\x95\x03\n\tTextInput\x12\x61\n\x04type\x18\x01 \x01(\x0e\x32S.google.shopping.merchant.issueresolution.v1beta.InputField.TextInput.TextInputType\x12^\n\x0f\x61\x64\x64itional_info\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltipH\x00\x88\x01\x01\x12\x18\n\x0b\x66ormat_info\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\naria_label\x18\x04 \x01(\tH\x02\x88\x01\x01\"_\n\rTextInputType\x12\x1f\n\x1bTEXT_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12GENERIC_SHORT_TEXT\x10\x01\x12\x15\n\x11GENERIC_LONG_TEXT\x10\x02\x42\x12\n\x10_additional_infoB\x0e\n\x0c_format_infoB\r\n\x0b_aria_label\x1a\xdd\x02\n\x0b\x43hoiceInput\x12j\n\x07options\x18\x01 \x03(\x0b\x32Y.google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput.ChoiceInputOption\x1a\xe1\x01\n\x11\x43hoiceInputOption\x12\n\n\x02id\x18\x01 \x01(\t\x12O\n\x05label\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\x12Z\n\x10\x61\x64\x64itional_input\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputFieldH\x00\x88\x01\x01\x42\x13\n\x11_additional_input\x1a\x0f\n\rCheckboxInputB\r\n\x0bvalue_input\"\xa2\x02\n\x0fTextWithTooltip\x12\x16\n\x0csimple_value\x18\x01 \x01(\tH\x00\x12\x1e\n\x14simple_tooltip_value\x18\x02 \x01(\tH\x01\x12m\n\x12tooltip_icon_style\x18\x03 \x01(\x0e\x32Q.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip.TooltipIconStyle\"N\n\x10TooltipIconStyle\x12\"\n\x1eTOOLTIP_ICON_STYLE_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0c\n\x08QUESTION\x10\x02\x42\x07\n\x05valueB\x0f\n\rtooltip_value\"\x9a\x02\n\x07\x43\x61llout\x12]\n\nstyle_hint\x18\x01 \x01(\x0e\x32I.google.shopping.merchant.issueresolution.v1beta.Callout.CalloutStyleHint\x12V\n\x0c\x66ull_message\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1beta.TextWithTooltip\"X\n\x10\x43\x61lloutStyleHint\x12\"\n\x1e\x43\x41LLOUT_STYLE_HINT_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03\"\xdf\x02\n\x0e\x45xternalAction\x12`\n\x04type\x18\x01 \x01(\x0e\x32R.google.shopping.merchant.issueresolution.v1beta.ExternalAction.ExternalActionType\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xdd\x01\n\x12\x45xternalActionType\x12$\n EXTERNAL_ACTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER\x10\x01\x12+\n\'REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER\x10\x02\x12\x1f\n\x1bLEGAL_APPEAL_IN_HELP_CENTER\x10\x03\x12&\n\"VERIFY_IDENTITY_IN_MERCHANT_CENTER\x10\x04\"\xc9\x01\n\x14TriggerActionRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12[\n\x07payload\x18\x02 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1beta.TriggerActionPayloadB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8c\x01\n\x14TriggerActionPayload\x12\x1b\n\x0e\x61\x63tion_context\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x0c\x61\x63tion_input\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1beta.ActionInputB\x03\xe0\x41\x02\"(\n\x15TriggerActionResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x82\x01\n\x0b\x41\x63tionInput\x12\x1b\n\x0e\x61\x63tion_flow_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\x0cinput_values\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.issueresolution.v1beta.InputValueB\x03\xe0\x41\x02\"\xff\x03\n\nInputValue\x12\x66\n\x10text_input_value\x18\x02 \x01(\x0b\x32J.google.shopping.merchant.issueresolution.v1beta.InputValue.TextInputValueH\x00\x12j\n\x12\x63hoice_input_value\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.issueresolution.v1beta.InputValue.ChoiceInputValueH\x00\x12n\n\x14\x63heckbox_input_value\x18\x04 \x01(\x0b\x32N.google.shopping.merchant.issueresolution.v1beta.InputValue.CheckboxInputValueH\x00\x12\x1b\n\x0einput_field_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a$\n\x0eTextInputValue\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x37\n\x10\x43hoiceInputValue\x12#\n\x16\x63hoice_input_option_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a(\n\x12\x43heckboxInputValue\x12\x12\n\x05value\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x42\x07\n\x05value*F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03*F\n\rContentOption\x12\x1e\n\x1a\x43ONTENT_OPTION_UNSPECIFIED\x10\x00\x12\x15\n\x11PRE_RENDERED_HTML\x10\x01*\x96\x01\n\x1eUserInputActionRenderingOption\x12\x32\n.USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bREDIRECT_TO_MERCHANT_CENTER\x10\x01\x12\x1f\n\x1b\x42UILT_IN_USER_INPUT_ACTIONS\x10\x02\x32\xf2\x06\n\x16IssueResolutionService\x12\x87\x02\n\x13RenderAccountIssues\x12K.google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesRequest\x1aL.google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesResponse\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\"=/issueresolution/v1beta/{name=accounts/*}:renderaccountissues:\x07payload\x12\x92\x02\n\x13RenderProductIssues\x12K.google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesRequest\x1aL.google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesResponse\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"H/issueresolution/v1beta/{name=accounts/*/products/*}:renderproductissues:\x07payload\x12\xef\x01\n\rTriggerAction\x12\x45.google.shopping.merchant.issueresolution.v1beta.TriggerActionRequest\x1a\x46.google.shopping.merchant.issueresolution.v1beta.TriggerActionResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\"7/issueresolution/v1beta/{name=accounts/*}:triggeraction:\x07payload\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd5\x03\n3com.google.shopping.merchant.issueresolution.v1betaB\x14IssueResolutionProtoP\x01Zccloud.google.com/go/shopping/merchant/issueresolution/apiv1beta/issueresolutionpb;issueresolutionpb\xaa\x02/Google.Shopping.Merchant.IssueResolution.V1Beta\xca\x02/Google\\Shopping\\Merchant\\IssueResolution\\V1beta\xea\x02\x33Google::Shopping::Merchant::IssueResolution::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + RenderAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesResponse").msgclass + RenderAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderAccountIssuesRequest").msgclass + RenderIssuesRequestPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderIssuesRequestPayload").msgclass + RenderProductIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesResponse").msgclass + RenderProductIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderProductIssuesRequest").msgclass + RenderedIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.RenderedIssue").msgclass + Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Impact").msgclass + Breakdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Breakdown").msgclass + Breakdown::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Breakdown.Region").msgclass + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Action").msgclass + Action::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Action.Reason").msgclass + BuiltInSimpleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction").msgclass + BuiltInSimpleAction::AdditionalContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.AdditionalContent").msgclass + BuiltInSimpleAction::BuiltInSimpleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.BuiltInSimpleActionType").enummodule + BuiltInUserInputAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.BuiltInUserInputAction").msgclass + ActionFlow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ActionFlow").msgclass + InputField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField").msgclass + InputField::TextInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.TextInput").msgclass + InputField::TextInput::TextInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.TextInput.TextInputType").enummodule + InputField::ChoiceInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput").msgclass + InputField::ChoiceInput::ChoiceInputOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput.ChoiceInputOption").msgclass + InputField::CheckboxInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput").msgclass + TextWithTooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TextWithTooltip").msgclass + TextWithTooltip::TooltipIconStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TextWithTooltip.TooltipIconStyle").enummodule + Callout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Callout").msgclass + Callout::CalloutStyleHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Callout.CalloutStyleHint").enummodule + ExternalAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ExternalAction").msgclass + ExternalAction::ExternalActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ExternalAction.ExternalActionType").enummodule + TriggerActionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionRequest").msgclass + TriggerActionPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionPayload").msgclass + TriggerActionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.TriggerActionResponse").msgclass + ActionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ActionInput").msgclass + InputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue").msgclass + InputValue::TextInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.TextInputValue").msgclass + InputValue::ChoiceInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.ChoiceInputValue").msgclass + InputValue::CheckboxInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.InputValue.CheckboxInputValue").msgclass + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.Severity").enummodule + ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ContentOption").enummodule + UserInputActionRenderingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.UserInputActionRenderingOption").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb new file mode 100644 index 000000000000..485d5f24b813 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/issueresolution/v1beta/issueresolution.proto for package 'Google.Shopping.Merchant.IssueResolution.V1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb' + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module IssueResolutionService + # Service to provide an issue resolution content for account issues and product + # issues. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.issueresolution.v1beta.IssueResolutionService' + + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + rpc :RenderAccountIssues, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + rpc :RenderProductIssues, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # [Ids][google.shopping.merchant.issueresolution.v1beta.InputField.id] for + # all problematic field together with translated, human readable error + # messages that can be shown to the user. + rpc :TriggerAction, ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA 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/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb new file mode 100644 index 000000000000..abf3eeada7f1 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb @@ -0,0 +1,954 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1beta + # Response containing an issue resolution content and actions for listed + # account issues. + # @!attribute [rw] rendered_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue>] + # List of account issues for a given account. + # + # This list can be shown with compressed, expandable items. In the compressed + # form, the title and impact should be shown for each issue. Once the issue + # is expanded, the detailed + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#prerendered_content content} + # and available + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#actions actions} + # should be rendered. + class RenderAccountIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to provide issue resolution content and actions for business's + # account issues. + # @!attribute [rw] name + # @return [::String] + # Required. The account to fetch issues for. + # Format: `accounts/{account}` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload] + # Optional. The payload for configuring how the content should be rendered. + class RenderAccountIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload for configuring how the content should be rendered. + # @!attribute [rw] content_option + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ContentOption] + # Optional. How the detailed content should be returned. Default option is to + # return the content as a pre-rendered HTML text. + # @!attribute [rw] user_input_action_option + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::UserInputActionRenderingOption] + # Optional. How actions with user input form should be handled. If not + # provided, actions will be returned as links that points the business to + # Merchant Center where they can request the action. + class RenderIssuesRequestPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response containing an issue resolution content and actions for listed + # product issues. + # @!attribute [rw] rendered_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue>] + # List of issues for a given product. + # + # This list can be shown with compressed, expandable items. In the compressed + # form, the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#title title} + # and + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#impact impact} + # should be shown for each issue. Once the issue is expanded, the detailed + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#prerendered_content content} + # and available + # {::Google::Shopping::Merchant::IssueResolution::V1beta::RenderedIssue#actions actions} + # should be rendered. + class RenderProductIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to provide an issue resolution content and actions for product issues + # of business's product. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload] + # Optional. The payload for configuring how the content should be rendered. + class RenderProductIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An issue affecting specific business or their product. + # @!attribute [rw] prerendered_content + # @return [::String] + # Details of the issue as a pre-rendered HTML. HTML elements contain CSS + # classes that can be used to customize the style of the content. + # + # Always sanitize the HTML before embedding it directly to your + # application. The sanitizer needs to allow basic HTML tags, such as: + # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, + # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). + # + # CSS classes: + # + # * `issue-detail` - top level container for the detail of the issue + # * `callout-banners` - section of the `issue-detail` with callout banners + # * `callout-banner` - single callout banner, inside `callout-banners` + # * `callout-banner-info` - callout with important information (default) + # * `callout-banner-warning` - callout with a warning + # * `callout-banner-error` - callout informing about an error (most severe) + # * `issue-content` - section of the `issue-detail`, contains multiple + # `content-element` + # * `content-element` - content element such as a list, link or paragraph, + # inside `issue-content` + # * `root-causes` - unordered list with items describing root causes of the + # issue, inside `issue-content` + # * `root-causes-intro` - intro text before the `root-causes` list, inside + # `issue-content` + # * `segment` - section of the text, `span` inside paragraph + # * `segment-attribute` - section of the text that represents a product + # attribute, for example 'image\_link' + # * `segment-literal` - section of the text that contains a special value, + # for example '0-1000 kg' + # * `segment-bold` - section of the text that should be rendered as bold + # * `segment-italic` - section of the text that should be rendered as + # italic + # * `tooltip` - used on paragraphs that should be rendered with a tooltip. + # A section of the text in such a paragraph will have a class + # `tooltip-text` and is intended to be shown in a mouse over dialog. If the + # style is not used, the `tooltip-text` section would be shown on a new + # line, after the main part of the text. + # * `tooltip-text` - marks a section of the text within a `tooltip`, that + # is intended to be shown in a mouse over dialog. + # * `tooltip-icon` - marks a section of the text within a `tooltip`, that + # can be replaced with a tooltip icon, for example '?' or 'i'. By default, + # this section contains a `br` tag, that is separating the main text and + # the tooltip text when the style is not used. + # * `tooltip-style-question` - the tooltip shows helpful information, + # can use the '?' as an icon. + # * `tooltip-style-info` - the tooltip adds additional information fitting + # to the context, can use the 'i' as an icon. + # * `content-moderation` - marks the paragraph that explains how the issue + # was identified. + # * `new-element` - Present for new elements added to the pre-rendered + # content in the future. To make sure that a new content element does not + # break your style, you can hide everything with this class. + # @!attribute [rw] prerendered_out_of_court_dispute_settlement + # @return [::String] + # Pre-rendered HTML that contains a link to the external location where the + # ODS can be requested and instructions for how to request it. HTML + # elements contain CSS classes that can be used to customize the style of + # this snippet. + # + # Always sanitize the HTML before embedding it directly to your + # application. The sanitizer needs to allow basic HTML tags, such as: + # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, + # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). + # + # CSS classes: + # + # * `ods-section`* - wrapper around the out-of-court dispute resolution + # section + # * `ods-description`* - intro text for the out-of-court dispute + # resolution. It may contain multiple segments and a link. + # * `ods-param`* - wrapper around the header-value pair for parameters that + # the business may need to provide during the ODS process. + # * `ods-routing-id`* - ods param for the Routing ID. + # * `ods-reference-id`* - ods param for the Routing ID. + # * `ods-param-header`* - header for the ODS parameter + # * `ods-param-value`* - value of the ODS parameter. This value should be + # rendered in a way that it is easy for the user to identify and copy. + # * `segment` - section of the text, `span` inside paragraph + # * `segment-attribute` - section of the text that represents a product + # attribute, for example 'image\_link' + # * `segment-literal` - section of the text that contains a special value, + # for example '0-1000 kg' + # * `segment-bold` - section of the text that should be rendered as bold + # * `segment-italic` - section of the text that should be rendered as + # italic + # * `tooltip` - used on paragraphs that should be rendered with a tooltip. + # A section of the text in such a paragraph will have a class + # `tooltip-text` and is intended to be shown in a mouse over dialog. If the + # style is not used, the `tooltip-text` section would be shown on a new + # line, after the main part of the text. + # * `tooltip-text` - marks a section of the text within a `tooltip`, that + # is intended to be shown in a mouse over dialog. + # * `tooltip-icon` - marks a section of the text within a `tooltip`, that + # can be replaced with a tooltip icon, for example '?' or 'i'. By default, + # this section contains a `br` tag, that is separating the main text and + # the tooltip text when the style is not used. + # * `tooltip-style-question` - the tooltip shows helpful information, + # can use the '?' as an icon. + # * `tooltip-style-info` - the tooltip adds additional information fitting + # to the context, can use the 'i' as an icon. + # @!attribute [rw] title + # @return [::String] + # Title of the issue. + # @!attribute [rw] impact + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Impact] + # Clarifies the severity of the issue. + # + # The [summarizing + # message][google.shopping.merchant.issueresolution.v1beta.Impact.message], + # if present, should be shown right under the title for each issue. It helps + # business to quickly understand the impact of the issue. + # + # The detailed + # {::Google::Shopping::Merchant::IssueResolution::V1beta::Impact#breakdowns breakdown} + # helps the business to fully understand the impact of the issue. It can be + # rendered as dialog that opens when the business mouse over the summarized + # impact statement. + # + # Issues with different + # {::Google::Shopping::Merchant::IssueResolution::V1beta::Impact#severity severity} + # can be styled differently. They may use a different color or icon to signal + # the difference between `ERROR`, `WARNING` and `INFO`. + # @!attribute [rw] actions + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Action>] + # A list of actionable steps that can be executed to solve the issue. An + # example is requesting a re-review or providing arguments when business + # disagrees with the issue. + # + # Actions that are supported in (your) third-party application can be + # rendered as buttons and should be available to the business when they + # expand the issue. + class RenderedIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Overall impact of the issue. + # @!attribute [rw] message + # @return [::String] + # Optional. Message summarizing the overall impact of the issue. If present, + # it should be rendered to the business. For example: "Disapproves 90k offers + # in 25 countries" + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Severity] + # The severity of the issue. + # @!attribute [rw] breakdowns + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Breakdown>] + # Detailed impact breakdown. Explains the types of restriction the issue has + # in different shopping destinations and territory. If present, it should be + # rendered to the business. Can be shown as a mouse over dropdown or a + # dialog. Each breakdown item represents a group of regions with the same + # impact details. + class Impact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A detailed impact breakdown for a group of regions where the impact of the + # issue on different shopping destinations is the same. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Breakdown::Region>] + # Lists of regions. Should be rendered as a title for this group of details. + # The full list should be shown to the business. If the list is too long, it + # is recommended to make it expandable. + # @!attribute [rw] details + # @return [::Array<::String>] + # Human readable, localized description of issue's effect on different + # targets. Should be rendered as a list. + # + # For example: + # + # * "Products not showing in ads" + # * "Products not showing organically" + class Breakdown + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Region with code and localized name. + # @!attribute [rw] code + # @return [::String] + # The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # @!attribute [rw] name + # @return [::String] + # The localized name of the region. + # For region with code='001' the value is 'All countries' or the equivalent + # in other languages. + class Region + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An actionable step that can be executed to solve the issue. + # @!attribute [rw] builtin_simple_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction] + # Action implemented and performed in (your) third-party application. The + # application should point the business to the place, where they can access + # the corresponding functionality or provide instructions, if the specific + # functionality is not available. + # + # Note: The following fields are mutually exclusive: `builtin_simple_action`, `external_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] external_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ExternalAction] + # Action that is implemented and performed outside of (your) third-party + # application. The application needs to redirect the business to the + # external location where they can perform the action. + # + # Note: The following fields are mutually exclusive: `external_action`, `builtin_simple_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] builtin_user_input_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInUserInputAction] + # Action implemented and performed in (your) third-party application. + # The application needs to show an additional content and input form to the + # business as specified for given action. They can trigger the action only + # when they provided all required inputs. + # + # Note: The following fields are mutually exclusive: `builtin_user_input_action`, `builtin_simple_action`, `external_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] button_label + # @return [::String] + # Label of the action button. + # @!attribute [rw] is_available + # @return [::Boolean] + # Controlling whether the button is active or disabled. The value is 'false' + # when the action was already requested or is not available. If the action is + # not available then a + # {::Google::Shopping::Merchant::IssueResolution::V1beta::Action#reasons reason} + # will be present. If (your) third-party application shows a disabled button + # for action that is not available, then it should also show reasons. + # @!attribute [rw] reasons + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::Action::Reason>] + # List of reasons why the action is not available. The list of reasons is + # empty if the action is available. If there is only one reason, it can be + # displayed next to the disabled button. If there are more reasons, all of + # them should be displayed, for example in a pop-up dialog. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single reason why the action is not available. + # @!attribute [rw] message + # @return [::String] + # Messages summarizing the reason, why the action is not available. + # For example: "Review requested on Jan 03. Review requests can take a few + # days to complete." + # @!attribute [rw] detail + # @return [::String] + # Detailed explanation of the reason. Should be displayed as a hint if + # present. + # @!attribute [rw] action + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Action] + # Optional. An action that needs to be performed to solve the problem + # represented by this reason. This action will always be available. Should + # be rendered as a link or button next to the summarizing message. + # + # For example, the review may be available only once the business configure + # all required attributes. In such a situation this action can be a link to + # the form, where they can fill the missing attribute to unblock the main + # action. + class Reason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Action that is implemented and performed in (your) third-party application. + # Represents various functionality that is expected to be available to business + # and will help them with resolving the issue. The application should point the + # business to the place, where they can access the corresponding functionality. + # If the functionality is not supported, it is recommended to explain the + # situation to the business and provide them with instructions how to solve the + # issue. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction::BuiltInSimpleActionType] + # The type of action that represents a functionality that is expected to be + # available in third-party application. + # @!attribute [rw] attribute_code + # @return [::String] + # The attribute that needs to be updated. Present when the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#type type} + # is `EDIT_ITEM_ATTRIBUTE`. + # + # This field contains a code for attribute, represented in snake_case. You + # can find a list of product's attributes, with their codes + # [here](https://support.google.com/merchants/answer/7052112). + # @!attribute [rw] additional_content + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction::AdditionalContent] + # Long text from an external source that should be available to the business. + # Present when the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#type type} + # is `SHOW_ADDITIONAL_CONTENT`. + class BuiltInSimpleAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Long text from external source. + # @!attribute [rw] title + # @return [::String] + # Title of the additional content; + # @!attribute [rw] paragraphs + # @return [::Array<::String>] + # Long text organized into paragraphs. + class AdditionalContent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum specifying the type of action in third-party application. + module BuiltInSimpleActionType + # Default value. Will never be provided by the API. + BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED = 0 + + # Redirect the business to the part of your application where they can + # verify their phone. + VERIFY_PHONE = 1 + + # Redirect the business to the part of your application where they can + # claim their website. + CLAIM_WEBSITE = 2 + + # Redirect the business to the part of your application where they can add + # products. + ADD_PRODUCTS = 3 + + # Open a form where the business can edit their contact information. + ADD_CONTACT_INFO = 4 + + # Redirect the business to the part of your application where they can link + # ads account. + LINK_ADS_ACCOUNT = 5 + + # Open a form where the business can add their business registration + # number. + ADD_BUSINESS_REGISTRATION_NUMBER = 6 + + # Open a form where the business can edit an attribute. The attribute that + # needs to be updated is specified in + # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInSimpleAction#attribute_code attribute_code} + # field of the action. + EDIT_ITEM_ATTRIBUTE = 7 + + # Redirect the business from the product issues to the diagnostic page with + # their account issues in your application. + # + # This action will be returned only for product issues that are caused by + # an account issue and thus the business should resolve the problem on the + # account level. + FIX_ACCOUNT_ISSUE = 8 + + # Show [additional + # content][google.shopping.merchant.issueresolution.v1beta.BuiltInSimpleAction.additional_content] + # to the business. + # + # This action will be used for example to deliver a justification from + # national authority. + SHOW_ADDITIONAL_CONTENT = 9 + end + end + + # Action that is implemented and performed in (your) third-party application. + # The application needs to show an additional content and input form to the + # business. They can start the action only when they provided all required + # inputs. The application will request processing of the action by calling the + # [triggeraction + # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1beta/issueresolution/triggeraction). + # @!attribute [rw] action_context + # @return [::String] + # Contains the action's context that must be included as part of the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload#action_context TriggerActionPayload.action_context} + # in + # {::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest#payload TriggerActionRequest.payload} + # to call the `triggeraction` method. The content should be treated as opaque + # and must not be modified. + # @!attribute [rw] flows + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::ActionFlow>] + # Actions may provide multiple different flows. Business selects one that + # fits best to their intent. Selecting the flow is the first step in user's + # interaction with the action. It affects what input fields will be available + # and required and also how the request will be processed. + class BuiltInUserInputAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Flow that can be selected for an action. When a business selects a flow, + # application should open a dialog with more information and input form. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the selected action flow. + # @!attribute [rw] label + # @return [::String] + # Text value describing the intent for the action flow. It can be used as an + # input label if business needs to pick one of multiple flows. For example: + # "I disagree with the issue" + # @!attribute [rw] inputs + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputField>] + # A list of input fields. + # @!attribute [rw] dialog_title + # @return [::String] + # Title of the request dialog. For example: "Before you request a review" + # @!attribute [rw] dialog_message + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # Message displayed in the request dialog. For example: "Make sure you've + # fixed all your country-specific issues. If not, you may have to wait 7 days + # to request another review". There may be an more information to be shown in + # a tooltip. + # @!attribute [rw] dialog_callout + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Callout] + # Important message to be highlighted in the request dialog. For example: + # "You can only request a review for disagreeing with this issue once. If + # it's not approved, you'll need to fix the issue and wait a few days before + # you can request another review." + # @!attribute [rw] dialog_button_label + # @return [::String] + # Label for the button to trigger the action from the action dialog. For + # example: "Request review" + class ActionFlow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input field that needs to be available to the business. If the field is + # marked as required, then a value needs to be provided for a successful + # processing of the request. + # @!attribute [rw] text_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::TextInput] + # Input field to provide text information. + # Corresponds to the [html input + # type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) + # or [html + # textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + # + # Note: The following fields are mutually exclusive: `text_input`, `choice_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] choice_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::ChoiceInput] + # Input field to select one of the offered choices. + # Corresponds to the [html input + # type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). + # + # Note: The following fields are mutually exclusive: `choice_input`, `text_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] checkbox_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::CheckboxInput] + # Input field to provide a boolean value. + # Corresponds to the [html input + # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + # + # Note: The following fields are mutually exclusive: `checkbox_input`, `text_input`, `choice_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the given input field. + # @!attribute [rw] label + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # Input field label. There may be more information to be shown in a tooltip. + # @!attribute [rw] required + # @return [::Boolean] + # Whether the field is required. The action button needs to stay disabled + # till values for all required fields are provided. + class InputField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Text input allows the business to provide a text value. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::TextInput::TextInputType] + # Type of the text input + # @!attribute [rw] additional_info + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # Additional info regarding the field to be displayed to the business. For + # example, warning to not include personal identifiable information. There + # may be more information to be shown in a tooltip. + # @!attribute [rw] format_info + # @return [::String] + # Information about the required format. If present, it should be shown + # close to the input field to help the business to provide a correct value. + # For example: "VAT numbers should be in a format similar to SK9999999999" + # @!attribute [rw] aria_label + # @return [::String] + # Text to be used as the + # [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the + # input. + class TextInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of the text input and how it should be rendered. + module TextInputType + # Default value. Will never be provided by the API. + TEXT_INPUT_TYPE_UNSPECIFIED = 0 + + # Used when a short text is expected. The field can be rendered as a + # [text + # field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text). + GENERIC_SHORT_TEXT = 1 + + # Used when a longer text is expected. The field should be rendered as a + # [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + GENERIC_LONG_TEXT = 2 + end + end + + # Choice input allows the business to select one of the offered choices. Some + # choices may be linked to additional input fields that should be displayed + # under or next to the choice option. The value for the additional input + # field needs to be provided only when the specific choice is selected by the + # the business. For example, additional input field can be hidden or disabled + # until the business selects the specific choice. + # @!attribute [rw] options + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputField::ChoiceInput::ChoiceInputOption>] + # A list of choices. Only one option can be selected. + class ChoiceInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A choice that the business can select. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the selected choice + # option. + # @!attribute [rw] label + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # Short description of the choice option. There may be more information + # to be shown as a tooltip. + # @!attribute [rw] additional_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputField] + # Input that should be displayed when this option is selected. + # The additional input will not contain a `ChoiceInput`. + class ChoiceInputOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Checkbox input allows the business to provide a boolean value. Corresponds + # to the [html input + # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + # + # If the business checks the box, the input value for the field is `true`, + # otherwise it is `false`. + # + # This type of input is often used as a confirmation that the business + # completed required steps before they are allowed to start the action. In + # such a case, the input field is marked as + # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#required required} + # and the button to trigger the action should stay disabled until the + # business checks the box. + class CheckboxInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Block of text that may contain a tooltip with more information. + # @!attribute [rw] simple_value + # @return [::String] + # Value of the message as a simple text. + # @!attribute [rw] simple_tooltip_value + # @return [::String] + # Value of the tooltip as a simple text. + # @!attribute [rw] tooltip_icon_style + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip::TooltipIconStyle] + # The suggested type of an icon for tooltip, if a tooltip is present. + class TextWithTooltip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of an icon that is being used to display a + # corresponding tooltip in the Merchant Center. + module TooltipIconStyle + # Default value. Will never be provided by the API. + TOOLTIP_ICON_STYLE_UNSPECIFIED = 0 + + # Used when the tooltip adds additional information to the context, + # the 'i' can be used as an icon. + INFO = 1 + + # Used when the tooltip shows helpful information, the '?' can be used as + # an icon. + QUESTION = 2 + end + end + + # An important message that should be highlighted. Usually displayed as a + # banner. + # @!attribute [rw] style_hint + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::Callout::CalloutStyleHint] + # Can be used to render messages with different severity in different styles. + # Snippets off all types contain important information that should be + # displayed to the business. + # @!attribute [rw] full_message + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TextWithTooltip] + # A full message that needs to be shown to the business. + class Callout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the suggested style, how the message should be rendered. + module CalloutStyleHint + # Default value. Will never be provided by the API. + CALLOUT_STYLE_HINT_UNSPECIFIED = 0 + + # The most important type of information highlighting problems, like an + # unsuccessful outcome of previously requested actions. + ERROR = 1 + + # Information warning about pending problems, risks or deadlines. + WARNING = 2 + + # Default severity for important information like pending status of + # previously requested action or cooldown for re-review. + INFO = 3 + end + end + + # Action that is implemented and performed outside of the third-party + # application. It should redirect the business to the provided URL of an + # external system where they can perform the action. For example to request a + # review in the Merchant Center. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ExternalAction::ExternalActionType] + # The type of external action. + # @!attribute [rw] uri + # @return [::String] + # URL to external system, for example Merchant Center, where the business can + # perform the action. + class ExternalAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of action that requires to redirect the business + # to an external location. + module ExternalActionType + # Default value. Will never be provided by the API. + EXTERNAL_ACTION_TYPE_UNSPECIFIED = 0 + + # Redirect to Merchant Center where the business can request a review for + # issue related to their product. + REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER = 1 + + # Redirect to Merchant Center where the business can request a review for + # issue related to their account. + REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER = 2 + + # Redirect to the form in Help Center where the business can request a + # legal appeal for the issue. + LEGAL_APPEAL_IN_HELP_CENTER = 3 + + # Redirect to Merchant Center where the business can perform identity + # verification. + VERIFY_IDENTITY_IN_MERCHANT_CENTER = 4 + end + end + + # Request to start the selected action + # @!attribute [rw] name + # @return [::String] + # Required. The business's account that is triggering the action. + # Format: `accounts/{account}` + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload] + # Required. The payload for the triggered action. + # @!attribute [rw] language_code + # @return [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + class TriggerActionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload for the triggered action. + # @!attribute [rw] action_context + # @return [::String] + # Required. The + # {::Google::Shopping::Merchant::IssueResolution::V1beta::BuiltInUserInputAction#action_context context} + # from the selected action. The value is obtained from rendered issues and + # needs to be sent back to identify the + # {::Google::Shopping::Merchant::IssueResolution::V1beta::Action#builtin_user_input_action action} + # that is being triggered. + # @!attribute [rw] action_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ActionInput] + # Required. Input provided by the business. + class TriggerActionPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response informing about the started action. + # @!attribute [rw] message + # @return [::String] + # The message for the business. + class TriggerActionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input provided by the business. + # @!attribute [rw] action_flow_id + # @return [::String] + # Required. + # {::Google::Shopping::Merchant::IssueResolution::V1beta::ActionFlow#id Id} of the + # selected action flow. + # @!attribute [rw] input_values + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue>] + # Required. Values for input fields. + class ActionInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input provided by the business for input field. + # @!attribute [rw] text_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::TextInputValue] + # Value for [text + # input][google.shopping.merchant.issueresolution.v1beta.InputField.TextInput] + # field. + # + # Note: The following fields are mutually exclusive: `text_input_value`, `choice_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] choice_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::ChoiceInputValue] + # Value for [choice + # input][google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput] + # field. + # + # Note: The following fields are mutually exclusive: `choice_input_value`, `text_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] checkbox_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::InputValue::CheckboxInputValue] + # Value for [checkbox + # input][google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput] + # field. + # + # Note: The following fields are mutually exclusive: `checkbox_input_value`, `text_input_value`, `choice_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_field_id + # @return [::String] + # Required. + # {::Google::Shopping::Merchant::IssueResolution::V1beta::InputField#id Id} of the + # corresponding input field. + class InputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value for [text + # input][google.shopping.merchant.issueresolution.v1beta.InputField.TextInput] + # field. + # @!attribute [rw] value + # @return [::String] + # Required. Text provided by the business. + class TextInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Value for [choice + # input][google.shopping.merchant.issueresolution.v1beta.InputField.ChoiceInput] + # field. + # @!attribute [rw] choice_input_option_id + # @return [::String] + # Required. [Id][InputField.ChoiceInput.id] of the option that was selected + # by the business. + class ChoiceInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Value for [checkbox + # input][google.shopping.merchant.issueresolution.v1beta.InputField.CheckboxInput] + # field. + # @!attribute [rw] value + # @return [::Boolean] + # Required. True if the business checked the box field. False otherwise. + class CheckboxInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Enum specifying the severity of the issue. + module Severity + # Default value. Will never be provided by the API. + SEVERITY_UNSPECIFIED = 0 + + # Causes either an account suspension or an item disapproval. Errors should + # be resolved as soon as possible to ensure items are eligible to appear in + # results again. + ERROR = 1 + + # Warnings can negatively impact the performance of ads and can lead to item + # or account suspensions in the future unless the issue is resolved. + WARNING = 2 + + # Infos are suggested optimizations to increase data quality. Resolving these + # issues is recommended, but not required. + INFO = 3 + end + + # Enum specifying how is the content returned. + module ContentOption + # Default value. Will never be provided by the API. + CONTENT_OPTION_UNSPECIFIED = 0 + + # Returns the detail of the issue as a pre-rendered HTML text. + PRE_RENDERED_HTML = 1 + end + + # Enum specifying how actions with user input forms, such as requesting + # re-review, are handled. + module UserInputActionRenderingOption + # Default value. Will never be provided by the API. + USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED = 0 + + # Actions that require user input are represented only as links that points + # the business to Merchant Center where they can request the action. Provides + # easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`. + REDIRECT_TO_MERCHANT_CENTER = 1 + + # Returns content and input form definition for each complex action. Your + # application needs to display this content and input form to the business + # before they can request processing of the action. To start the action, your + # application needs to call the `triggeraction` method. + BUILT_IN_USER_INPUT_ACTIONS = 2 + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile b/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..652251986d76 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-issue_resolution-v1beta", path: "../" +else + gem "google-shopping-merchant-issue_resolution-v1beta" +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/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb b/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb new file mode 100644 index 000000000000..14ec86c323fd --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_account_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync] +require "google/shopping/merchant/issue_resolution/v1beta" + +## +# Snippet for the render_account_issues call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues. +# +def render_account_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new + + # Call the render_account_issues method. + result = client.render_account_issues request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse. + p result +end +# [END merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync] diff --git a/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb b/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb new file mode 100644 index 000000000000..9674f8c02f90 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/render_product_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync] +require "google/shopping/merchant/issue_resolution/v1beta" + +## +# Snippet for the render_product_issues call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues. +# +def render_product_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new + + # Call the render_product_issues method. + result = client.render_product_issues request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse. + p result +end +# [END merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync] diff --git a/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb b/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb new file mode 100644 index 000000000000..537df11369fb --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/issue_resolution_service/trigger_action.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync] +require "google/shopping/merchant/issue_resolution/v1beta" + +## +# Snippet for the trigger_action call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action. +# +def trigger_action + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new + + # Call the trigger_action method. + result = client.trigger_action request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse. + p result +end +# [END merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync] diff --git a/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json b/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json new file mode 100644 index 000000000000..166874f3ed72 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-shopping-merchant-issue_resolution-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.issueresolution.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync", + "title": "Snippet for the render_account_issues call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues.", + "file": "issue_resolution_service/render_account_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "render_account_issues", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_account_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" + }, + "method": { + "short_name": "RenderAccountIssues", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.RenderAccountIssues", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderProductIssues_sync", + "title": "Snippet for the render_product_issues call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues.", + "file": "issue_resolution_service/render_product_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "render_product_issues", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#render_product_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" + }, + "method": { + "short_name": "RenderProductIssues", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.RenderProductIssues", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_TriggerAction_sync", + "title": "Snippet for the trigger_action call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action.", + "file": "issue_resolution_service/trigger_action.rb", + "language": "RUBY", + "client_method": { + "short_name": "trigger_action", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client#trigger_action", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client" + }, + "method": { + "short_name": "TriggerAction", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService.TriggerAction", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb new file mode 100644 index 000000000000..60a110d92a27 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb new file mode 100644 index 000000000000..c2778d04f48f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" + + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_render_account_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_account_issues_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_account_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, render_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, render_account_issues_client_stub.call_count + end + end + end + + def test_render_product_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_product_issues_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_product_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, render_product_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, render_product_issues_client_stub.call_count + end + end + end + + def test_trigger_action + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + language_code = "hello world" + + trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::ServiceStub.stub :transcode_trigger_action_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, trigger_action_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.trigger_action name: name, payload: payload, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.trigger_action({ name: name, payload: payload, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb new file mode 100644 index 000000000000..68ca85b23f9a --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb @@ -0,0 +1,275 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/issueresolution_pb" +require "google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb" +require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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_render_account_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesResponse.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" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :render_account_issues, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, render_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, render_account_issues_client_stub.call_rpc_count + end + end + + def test_render_product_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesResponse.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" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_product_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :render_product_issues, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderIssuesRequestPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, render_product_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1beta::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, render_product_issues_client_stub.call_rpc_count + end + end + + def test_trigger_action + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionResponse.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" + payload = {} + language_code = "hello world" + + trigger_action_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :trigger_action, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionPayload), request["payload"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, trigger_action_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.trigger_action name: name, payload: payload, language_code: language_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.trigger_action({ name: name, payload: payload, language_code: language_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1beta::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb b/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index c30c66799e5d..36974456fc30 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1847,6 +1847,10 @@ "component": "google-shopping-merchant-inventories-v1beta", "version_file": "lib/google/shopping/merchant/inventories/v1beta/version.rb" }, + "google-shopping-merchant-issue_resolution-v1beta": { + "component": "google-shopping-merchant-issue_resolution-v1beta", + "version_file": "lib/google/shopping/merchant/issue_resolution/v1beta/version.rb" + }, "google-shopping-merchant-lfp": { "component": "google-shopping-merchant-lfp", "version_file": "lib/google/shopping/merchant/lfp/version.rb" From 5fbcf785e35dbbb09784efdf233737695f09d289 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 15:55:32 -0700 Subject: [PATCH 039/457] feat: add Managed Kafka ACL API (#30437) --- .../.owlbot-manifest.json | 7 + .../gapic_metadata.json | 35 + .../managed_kafka/v1/managed_kafka/client.rb | 726 ++++++++++++++++++ .../managed_kafka/v1/managed_kafka/paths.rb | 21 + .../v1/managed_kafka/rest/client.rb | 677 ++++++++++++++++ .../v1/managed_kafka/rest/service_stub.rb | 431 +++++++++++ .../cloud/managedkafka/v1/managed_kafka_pb.rb | 12 +- .../v1/managed_kafka_services_pb.rb | 17 + .../cloud/managedkafka/v1/resources_pb.rb | 4 +- .../cloud/managedkafka/v1/managed_kafka.rb | 187 +++++ .../google/cloud/managedkafka/v1/resources.rb | 89 +++ .../snippets/managed_kafka/add_acl_entry.rb | 47 ++ .../snippets/managed_kafka/create_acl.rb | 47 ++ .../snippets/managed_kafka/delete_acl.rb | 47 ++ .../snippets/managed_kafka/get_acl.rb | 47 ++ .../snippets/managed_kafka/list_acls.rb | 51 ++ .../managed_kafka/remove_acl_entry.rb | 47 ++ .../snippets/managed_kafka/update_acl.rb | 47 ++ ...metadata_google.cloud.managedkafka.v1.json | 280 +++++++ .../v1/managed_kafka_paths_test.rb | 12 + .../v1/managed_kafka_rest_test.rb | 385 ++++++++++ .../managed_kafka/v1/managed_kafka_test.rb | 425 ++++++++++ 22 files changed, 3639 insertions(+), 2 deletions(-) create mode 100644 google-cloud-managed_kafka-v1/snippets/managed_kafka/add_acl_entry.rb create mode 100644 google-cloud-managed_kafka-v1/snippets/managed_kafka/create_acl.rb create mode 100644 google-cloud-managed_kafka-v1/snippets/managed_kafka/delete_acl.rb create mode 100644 google-cloud-managed_kafka-v1/snippets/managed_kafka/get_acl.rb create mode 100644 google-cloud-managed_kafka-v1/snippets/managed_kafka/list_acls.rb create mode 100644 google-cloud-managed_kafka-v1/snippets/managed_kafka/remove_acl_entry.rb create mode 100644 google-cloud-managed_kafka-v1/snippets/managed_kafka/update_acl.rb diff --git a/google-cloud-managed_kafka-v1/.owlbot-manifest.json b/google-cloud-managed_kafka-v1/.owlbot-manifest.json index 1fcc42485298..a656e309530a 100644 --- a/google-cloud-managed_kafka-v1/.owlbot-manifest.json +++ b/google-cloud-managed_kafka-v1/.owlbot-manifest.json @@ -58,17 +58,24 @@ "proto_docs/google/protobuf/timestamp.rb", "proto_docs/google/rpc/status.rb", "snippets/Gemfile", + "snippets/managed_kafka/add_acl_entry.rb", + "snippets/managed_kafka/create_acl.rb", "snippets/managed_kafka/create_cluster.rb", "snippets/managed_kafka/create_topic.rb", + "snippets/managed_kafka/delete_acl.rb", "snippets/managed_kafka/delete_cluster.rb", "snippets/managed_kafka/delete_consumer_group.rb", "snippets/managed_kafka/delete_topic.rb", + "snippets/managed_kafka/get_acl.rb", "snippets/managed_kafka/get_cluster.rb", "snippets/managed_kafka/get_consumer_group.rb", "snippets/managed_kafka/get_topic.rb", + "snippets/managed_kafka/list_acls.rb", "snippets/managed_kafka/list_clusters.rb", "snippets/managed_kafka/list_consumer_groups.rb", "snippets/managed_kafka/list_topics.rb", + "snippets/managed_kafka/remove_acl_entry.rb", + "snippets/managed_kafka/update_acl.rb", "snippets/managed_kafka/update_cluster.rb", "snippets/managed_kafka/update_consumer_group.rb", "snippets/managed_kafka/update_topic.rb", diff --git a/google-cloud-managed_kafka-v1/gapic_metadata.json b/google-cloud-managed_kafka-v1/gapic_metadata.json index a8093836faf7..b06afe1d8ad7 100644 --- a/google-cloud-managed_kafka-v1/gapic_metadata.json +++ b/google-cloud-managed_kafka-v1/gapic_metadata.json @@ -79,6 +79,41 @@ "methods": [ "delete_consumer_group" ] + }, + "ListAcls": { + "methods": [ + "list_acls" + ] + }, + "GetAcl": { + "methods": [ + "get_acl" + ] + }, + "CreateAcl": { + "methods": [ + "create_acl" + ] + }, + "UpdateAcl": { + "methods": [ + "update_acl" + ] + }, + "DeleteAcl": { + "methods": [ + "delete_acl" + ] + }, + "AddAclEntry": { + "methods": [ + "add_acl_entry" + ] + }, + "RemoveAclEntry": { + "methods": [ + "remove_acl_entry" + ] } } } diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/client.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/client.rb index ebdfd90157e0..b3eaff98d81e 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/client.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/client.rb @@ -1622,6 +1622,683 @@ def delete_consumer_group request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists the acls in a given cluster. + # + # @overload list_acls(request, options = nil) + # Pass arguments to `list_acls` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::ListAclsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::ListAclsRequest, ::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_acls(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_acls` 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 parent cluster whose acls are to be listed. + # Structured like + # `projects/{project}/locations/{location}/clusters/{cluster}`. + # @param page_size [::Integer] + # Optional. The maximum number of acls to return. The service may return + # fewer than this value. If unset or zero, all acls for the parent is + # returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAcls` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAcls` 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::ManagedKafka::V1::Acl>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Acl>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::ListAclsRequest.new + # + # # Call the list_acls method. + # result = client.list_acls 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::ManagedKafka::V1::Acl. + # p item + # end + # + def list_acls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::ListAclsRequest + + # 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_acls.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::ManagedKafka::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_acls.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_acls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.call_rpc :list_acls, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @managed_kafka_stub, :list_acls, 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 + + ## + # Returns the properties of a single acl. + # + # @overload get_acl(request, options = nil) + # Pass arguments to `get_acl` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::GetAclRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::GetAclRequest, ::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_acl(name: nil) + # Pass arguments to `get_acl` 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 name of the acl to return. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::V1::Acl] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::GetAclRequest.new + # + # # Call the get_acl method. + # result = client.get_acl request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + # p result + # + def get_acl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::GetAclRequest + + # 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_acl.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::ManagedKafka::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_acl.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_acl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.call_rpc :get_acl, 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 + + ## + # Creates a new acl in the given project, location, and cluster. + # + # @overload create_acl(request, options = nil) + # Pass arguments to `create_acl` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::CreateAclRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::CreateAclRequest, ::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_acl(parent: nil, acl_id: nil, acl: nil) + # Pass arguments to `create_acl` 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 parent cluster in which to create the acl. + # Structured like + # `projects/{project}/locations/{location}/clusters/{cluster}`. + # @param acl_id [::String] + # Required. The ID to use for the acl, which will become the final component + # of the acl's name. The structure of `acl_id` defines the Resource Pattern + # (resource_type, resource_name, pattern_type) of the acl. `acl_id` is + # structured like one of the following: + # + # For acls on the cluster: + # `cluster` + # + # For acls on a single resource within the cluster: + # `topic/{resource_name}` + # `consumerGroup/{resource_name}` + # `transactionalId/{resource_name}` + # + # For acls on all resources that match a prefix: + # `topicPrefixed/{resource_name}` + # `consumerGroupPrefixed/{resource_name}` + # `transactionalIdPrefixed/{resource_name}` + # + # For acls on all resources of a given type (i.e. the wildcard literal "*"): + # `allTopics` (represents `topic/*`) + # `allConsumerGroups` (represents `consumerGroup/*`) + # `allTransactionalIds` (represents `transactionalId/*`) + # @param acl [::Google::Cloud::ManagedKafka::V1::Acl, ::Hash] + # Required. Configuration of the acl to create. Its `name` field is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::V1::Acl] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::CreateAclRequest.new + # + # # Call the create_acl method. + # result = client.create_acl request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + # p result + # + def create_acl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::CreateAclRequest + + # 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_acl.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::ManagedKafka::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_acl.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_acl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.call_rpc :create_acl, 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 + + ## + # Updates the properties of a single acl. + # + # @overload update_acl(request, options = nil) + # Pass arguments to `update_acl` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::UpdateAclRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::UpdateAclRequest, ::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 update_acl(acl: nil, update_mask: nil) + # Pass arguments to `update_acl` 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 acl [::Google::Cloud::ManagedKafka::V1::Acl, ::Hash] + # Required. The updated acl. Its `name` and `etag` fields must be populated. + # `acl_entries` must not be empty in the updated acl; to remove all acl + # entries for an acl, use DeleteAcl. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Acl resource by the update. The fields specified in the update_mask are + # relative to the resource, not the full request. A field will be overwritten + # if it is in the mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::V1::Acl] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::UpdateAclRequest.new + # + # # Call the update_acl method. + # result = client.update_acl request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + # p result + # + def update_acl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::UpdateAclRequest + + # 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.update_acl.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::ManagedKafka::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.acl&.name + header_params["acl.name"] = request.acl.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.update_acl.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_acl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.call_rpc :update_acl, 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 + + ## + # Deletes an acl. + # + # @overload delete_acl(request, options = nil) + # Pass arguments to `delete_acl` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::DeleteAclRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::DeleteAclRequest, ::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_acl(name: nil) + # Pass arguments to `delete_acl` 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 name of the acl to delete. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for details. + # + # @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/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::DeleteAclRequest.new + # + # # Call the delete_acl method. + # result = client.delete_acl request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_acl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::DeleteAclRequest + + # 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_acl.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::ManagedKafka::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_acl.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_acl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.call_rpc :delete_acl, 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 + + ## + # Incremental update: Adds an acl entry to an acl. Creates the acl if it does + # not exist yet. + # + # @overload add_acl_entry(request, options = nil) + # Pass arguments to `add_acl_entry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest, ::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 add_acl_entry(acl: nil, acl_entry: nil) + # Pass arguments to `add_acl_entry` 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 acl [::String] + # Required. The name of the acl to add the acl entry to. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + # @param acl_entry [::Google::Cloud::ManagedKafka::V1::AclEntry, ::Hash] + # Required. The acl entry to add. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::AddAclEntryRequest.new + # + # # Call the add_acl_entry method. + # result = client.add_acl_entry request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::AddAclEntryResponse. + # p result + # + def add_acl_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest + + # 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.add_acl_entry.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::ManagedKafka::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.acl + header_params["acl"] = request.acl + 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.add_acl_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_acl_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.call_rpc :add_acl_entry, 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 + + ## + # Incremental update: Removes an acl entry from an acl. Deletes the acl if + # its acl entries become empty (i.e. if the removed entry was the last one in + # the acl). + # + # @overload remove_acl_entry(request, options = nil) + # Pass arguments to `remove_acl_entry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest, ::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 remove_acl_entry(acl: nil, acl_entry: nil) + # Pass arguments to `remove_acl_entry` 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 acl [::String] + # Required. The name of the acl to remove the acl entry from. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + # @param acl_entry [::Google::Cloud::ManagedKafka::V1::AclEntry, ::Hash] + # Required. The acl entry to remove. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest.new + # + # # Call the remove_acl_entry method. + # result = client.remove_acl_entry request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse. + # p result + # + def remove_acl_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest + + # 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.remove_acl_entry.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::ManagedKafka::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.acl + header_params["acl"] = request.acl + 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.remove_acl_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_acl_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.call_rpc :remove_acl_entry, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the ManagedKafka API. # @@ -1858,6 +2535,41 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_consumer_group + ## + # RPC-specific configuration for `list_acls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_acls + ## + # RPC-specific configuration for `get_acl` + # @return [::Gapic::Config::Method] + # + attr_reader :get_acl + ## + # RPC-specific configuration for `create_acl` + # @return [::Gapic::Config::Method] + # + attr_reader :create_acl + ## + # RPC-specific configuration for `update_acl` + # @return [::Gapic::Config::Method] + # + attr_reader :update_acl + ## + # RPC-specific configuration for `delete_acl` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_acl + ## + # RPC-specific configuration for `add_acl_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :add_acl_entry + ## + # RPC-specific configuration for `remove_acl_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_acl_entry # @private def initialize parent_rpcs = nil @@ -1889,6 +2601,20 @@ def initialize parent_rpcs = nil @update_consumer_group = ::Gapic::Config::Method.new update_consumer_group_config delete_consumer_group_config = parent_rpcs.delete_consumer_group if parent_rpcs.respond_to? :delete_consumer_group @delete_consumer_group = ::Gapic::Config::Method.new delete_consumer_group_config + list_acls_config = parent_rpcs.list_acls if parent_rpcs.respond_to? :list_acls + @list_acls = ::Gapic::Config::Method.new list_acls_config + get_acl_config = parent_rpcs.get_acl if parent_rpcs.respond_to? :get_acl + @get_acl = ::Gapic::Config::Method.new get_acl_config + create_acl_config = parent_rpcs.create_acl if parent_rpcs.respond_to? :create_acl + @create_acl = ::Gapic::Config::Method.new create_acl_config + update_acl_config = parent_rpcs.update_acl if parent_rpcs.respond_to? :update_acl + @update_acl = ::Gapic::Config::Method.new update_acl_config + delete_acl_config = parent_rpcs.delete_acl if parent_rpcs.respond_to? :delete_acl + @delete_acl = ::Gapic::Config::Method.new delete_acl_config + add_acl_entry_config = parent_rpcs.add_acl_entry if parent_rpcs.respond_to? :add_acl_entry + @add_acl_entry = ::Gapic::Config::Method.new add_acl_entry_config + remove_acl_entry_config = parent_rpcs.remove_acl_entry if parent_rpcs.respond_to? :remove_acl_entry + @remove_acl_entry = ::Gapic::Config::Method.new remove_acl_entry_config yield self if block_given? end diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/paths.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/paths.rb index c0903c930d12..bdf892bce026 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/paths.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/paths.rb @@ -24,6 +24,27 @@ module V1 module ManagedKafka # Path helper methods for the ManagedKafka API. module Paths + ## + # Create a fully-qualified Acl resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl}` + # + # @param project [String] + # @param location [String] + # @param cluster [String] + # @param acl [String] + # + # @return [::String] + def acl_path project:, location:, cluster:, acl: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "cluster cannot contain /" if cluster.to_s.include? "/" + + "projects/#{project}/locations/#{location}/clusters/#{cluster}/acls/#{acl}" + end + ## # Create a fully-qualified Cluster resource string. # diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/rest/client.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/rest/client.rb index 14b00d617dbd..61d94def34c8 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/rest/client.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/rest/client.rb @@ -1518,6 +1518,634 @@ def delete_consumer_group request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists the acls in a given cluster. + # + # @overload list_acls(request, options = nil) + # Pass arguments to `list_acls` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::ListAclsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::ListAclsRequest, ::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_acls(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_acls` 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 parent cluster whose acls are to be listed. + # Structured like + # `projects/{project}/locations/{location}/clusters/{cluster}`. + # @param page_size [::Integer] + # Optional. The maximum number of acls to return. The service may return + # fewer than this value. If unset or zero, all acls for the parent is + # returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAcls` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAcls` 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::ManagedKafka::V1::Acl>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Acl>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::ListAclsRequest.new + # + # # Call the list_acls method. + # result = client.list_acls 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::ManagedKafka::V1::Acl. + # p item + # end + # + def list_acls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::ListAclsRequest + + # 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_acls.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::ManagedKafka::V1::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_acls.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_acls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.list_acls request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @managed_kafka_stub, :list_acls, "acls", 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 + + ## + # Returns the properties of a single acl. + # + # @overload get_acl(request, options = nil) + # Pass arguments to `get_acl` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::GetAclRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::GetAclRequest, ::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_acl(name: nil) + # Pass arguments to `get_acl` 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 name of the acl to return. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::V1::Acl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::GetAclRequest.new + # + # # Call the get_acl method. + # result = client.get_acl request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + # p result + # + def get_acl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::GetAclRequest + + # 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_acl.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::ManagedKafka::V1::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_acl.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_acl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.get_acl 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 + + ## + # Creates a new acl in the given project, location, and cluster. + # + # @overload create_acl(request, options = nil) + # Pass arguments to `create_acl` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::CreateAclRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::CreateAclRequest, ::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_acl(parent: nil, acl_id: nil, acl: nil) + # Pass arguments to `create_acl` 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 parent cluster in which to create the acl. + # Structured like + # `projects/{project}/locations/{location}/clusters/{cluster}`. + # @param acl_id [::String] + # Required. The ID to use for the acl, which will become the final component + # of the acl's name. The structure of `acl_id` defines the Resource Pattern + # (resource_type, resource_name, pattern_type) of the acl. `acl_id` is + # structured like one of the following: + # + # For acls on the cluster: + # `cluster` + # + # For acls on a single resource within the cluster: + # `topic/{resource_name}` + # `consumerGroup/{resource_name}` + # `transactionalId/{resource_name}` + # + # For acls on all resources that match a prefix: + # `topicPrefixed/{resource_name}` + # `consumerGroupPrefixed/{resource_name}` + # `transactionalIdPrefixed/{resource_name}` + # + # For acls on all resources of a given type (i.e. the wildcard literal "*"): + # `allTopics` (represents `topic/*`) + # `allConsumerGroups` (represents `consumerGroup/*`) + # `allTransactionalIds` (represents `transactionalId/*`) + # @param acl [::Google::Cloud::ManagedKafka::V1::Acl, ::Hash] + # Required. Configuration of the acl to create. Its `name` field is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::V1::Acl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::CreateAclRequest.new + # + # # Call the create_acl method. + # result = client.create_acl request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + # p result + # + def create_acl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::CreateAclRequest + + # 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_acl.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::ManagedKafka::V1::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_acl.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_acl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.create_acl 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 + + ## + # Updates the properties of a single acl. + # + # @overload update_acl(request, options = nil) + # Pass arguments to `update_acl` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::UpdateAclRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::UpdateAclRequest, ::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 update_acl(acl: nil, update_mask: nil) + # Pass arguments to `update_acl` 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 acl [::Google::Cloud::ManagedKafka::V1::Acl, ::Hash] + # Required. The updated acl. Its `name` and `etag` fields must be populated. + # `acl_entries` must not be empty in the updated acl; to remove all acl + # entries for an acl, use DeleteAcl. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Acl resource by the update. The fields specified in the update_mask are + # relative to the resource, not the full request. A field will be overwritten + # if it is in the mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::V1::Acl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::UpdateAclRequest.new + # + # # Call the update_acl method. + # result = client.update_acl request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + # p result + # + def update_acl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::UpdateAclRequest + + # 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.update_acl.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::ManagedKafka::V1::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.update_acl.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_acl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.update_acl 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 + + ## + # Deletes an acl. + # + # @overload delete_acl(request, options = nil) + # Pass arguments to `delete_acl` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::DeleteAclRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::DeleteAclRequest, ::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_acl(name: nil) + # Pass arguments to `delete_acl` 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 name of the acl to delete. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for details. + # @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/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::DeleteAclRequest.new + # + # # Call the delete_acl method. + # result = client.delete_acl request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_acl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::DeleteAclRequest + + # 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_acl.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::ManagedKafka::V1::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_acl.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_acl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.delete_acl 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 + + ## + # Incremental update: Adds an acl entry to an acl. Creates the acl if it does + # not exist yet. + # + # @overload add_acl_entry(request, options = nil) + # Pass arguments to `add_acl_entry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest, ::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 add_acl_entry(acl: nil, acl_entry: nil) + # Pass arguments to `add_acl_entry` 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 acl [::String] + # Required. The name of the acl to add the acl entry to. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + # @param acl_entry [::Google::Cloud::ManagedKafka::V1::AclEntry, ::Hash] + # Required. The acl entry to add. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::AddAclEntryRequest.new + # + # # Call the add_acl_entry method. + # result = client.add_acl_entry request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::AddAclEntryResponse. + # p result + # + def add_acl_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest + + # 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.add_acl_entry.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::ManagedKafka::V1::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.add_acl_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.add_acl_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.add_acl_entry 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 + + ## + # Incremental update: Removes an acl entry from an acl. Deletes the acl if + # its acl entries become empty (i.e. if the removed entry was the last one in + # the acl). + # + # @overload remove_acl_entry(request, options = nil) + # Pass arguments to `remove_acl_entry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest, ::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 remove_acl_entry(acl: nil, acl_entry: nil) + # Pass arguments to `remove_acl_entry` 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 acl [::String] + # Required. The name of the acl to remove the acl entry from. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + # @param acl_entry [::Google::Cloud::ManagedKafka::V1::AclEntry, ::Hash] + # Required. The acl entry to remove. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest.new + # + # # Call the remove_acl_entry method. + # result = client.remove_acl_entry request + # + # # The returned object is of type Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse. + # p result + # + def remove_acl_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest + + # 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.remove_acl_entry.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::ManagedKafka::V1::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.remove_acl_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.remove_acl_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_kafka_stub.remove_acl_entry 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 + ## # Configuration class for the ManagedKafka REST API. # @@ -1741,6 +2369,41 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_consumer_group + ## + # RPC-specific configuration for `list_acls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_acls + ## + # RPC-specific configuration for `get_acl` + # @return [::Gapic::Config::Method] + # + attr_reader :get_acl + ## + # RPC-specific configuration for `create_acl` + # @return [::Gapic::Config::Method] + # + attr_reader :create_acl + ## + # RPC-specific configuration for `update_acl` + # @return [::Gapic::Config::Method] + # + attr_reader :update_acl + ## + # RPC-specific configuration for `delete_acl` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_acl + ## + # RPC-specific configuration for `add_acl_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :add_acl_entry + ## + # RPC-specific configuration for `remove_acl_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_acl_entry # @private def initialize parent_rpcs = nil @@ -1772,6 +2435,20 @@ def initialize parent_rpcs = nil @update_consumer_group = ::Gapic::Config::Method.new update_consumer_group_config delete_consumer_group_config = parent_rpcs.delete_consumer_group if parent_rpcs.respond_to? :delete_consumer_group @delete_consumer_group = ::Gapic::Config::Method.new delete_consumer_group_config + list_acls_config = parent_rpcs.list_acls if parent_rpcs.respond_to? :list_acls + @list_acls = ::Gapic::Config::Method.new list_acls_config + get_acl_config = parent_rpcs.get_acl if parent_rpcs.respond_to? :get_acl + @get_acl = ::Gapic::Config::Method.new get_acl_config + create_acl_config = parent_rpcs.create_acl if parent_rpcs.respond_to? :create_acl + @create_acl = ::Gapic::Config::Method.new create_acl_config + update_acl_config = parent_rpcs.update_acl if parent_rpcs.respond_to? :update_acl + @update_acl = ::Gapic::Config::Method.new update_acl_config + delete_acl_config = parent_rpcs.delete_acl if parent_rpcs.respond_to? :delete_acl + @delete_acl = ::Gapic::Config::Method.new delete_acl_config + add_acl_entry_config = parent_rpcs.add_acl_entry if parent_rpcs.respond_to? :add_acl_entry + @add_acl_entry = ::Gapic::Config::Method.new add_acl_entry_config + remove_acl_entry_config = parent_rpcs.remove_acl_entry if parent_rpcs.respond_to? :remove_acl_entry + @remove_acl_entry = ::Gapic::Config::Method.new remove_acl_entry_config yield self if block_given? end diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/rest/service_stub.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/rest/service_stub.rb index 1ea650b49e35..e2c88086f369 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/rest/service_stub.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/rest/service_stub.rb @@ -633,6 +633,286 @@ def delete_consumer_group request_pb, options = nil end end + ## + # Baseline implementation for the list_acls REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::ListAclsRequest] + # 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::ManagedKafka::V1::ListAclsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::ListAclsResponse] + # A result object deserialized from the server's reply + def list_acls request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_acls_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_acls", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::V1::ListAclsResponse.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_acl REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::GetAclRequest] + # 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::ManagedKafka::V1::Acl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # A result object deserialized from the server's reply + def get_acl request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_acl_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_acl", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::V1::Acl.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_acl REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::CreateAclRequest] + # 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::ManagedKafka::V1::Acl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # A result object deserialized from the server's reply + def create_acl request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_acl_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_acl", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::V1::Acl.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_acl REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::UpdateAclRequest] + # 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::ManagedKafka::V1::Acl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # A result object deserialized from the server's reply + def update_acl request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_acl_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: "update_acl", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::V1::Acl.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_acl REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::DeleteAclRequest] + # 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_acl request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_acl_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_acl", + 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 add_acl_entry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest] + # 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::ManagedKafka::V1::AddAclEntryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse] + # A result object deserialized from the server's reply + def add_acl_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_add_acl_entry_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: "add_acl_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the remove_acl_entry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest] + # 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::ManagedKafka::V1::RemoveAclEntryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse] + # A result object deserialized from the server's reply + def remove_acl_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_remove_acl_entry_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: "remove_acl_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -931,6 +1211,157 @@ def self.transcode_delete_consumer_group_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the list_acls REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::ListAclsRequest] + # 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_acls_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/acls", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_acl REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::GetAclRequest] + # 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_acl_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/acls(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_acl REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::CreateAclRequest] + # 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_acl_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/acls", + body: "acl", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_acl REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::UpdateAclRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_acl_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{acl.name}", + body: "acl", + matches: [ + ["acl.name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/acls(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_acl REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::DeleteAclRequest] + # 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_acl_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/acls(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the add_acl_entry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_add_acl_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{acl}:addAclEntry", + body: "acl_entry", + matches: [ + ["acl", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/acls(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the remove_acl_entry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_remove_acl_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{acl}:removeAclEntry", + body: "acl_entry", + matches: [ + ["acl", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/acls(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/managed_kafka_pb.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/managed_kafka_pb.rb index 77275c460fcb..64715488154a 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/managed_kafka_pb.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/managed_kafka_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/field_mask_pb' -descriptor_data = "\n0google/cloud/managedkafka/v1/managed_kafka.proto\x12\x1cgoogle.cloud.managedkafka.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/managedkafka/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xaf\x01\n\x13ListClustersRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#managedkafka.googleapis.com/Cluster\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"}\n\x14ListClustersResponse\x12\x37\n\x08\x63lusters\x18\x01 \x03(\x0b\x32%.google.cloud.managedkafka.v1.Cluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x11GetClusterRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#managedkafka.googleapis.com/Cluster\"\xca\x01\n\x14\x43reateClusterRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#managedkafka.googleapis.com/Cluster\x12\x17\n\ncluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\x07\x63luster\x18\x03 \x01(\x0b\x32%.google.cloud.managedkafka.v1.ClusterB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xaa\x01\n\x14UpdateClusterRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12;\n\x07\x63luster\x18\x02 \x01(\x0b\x32%.google.cloud.managedkafka.v1.ClusterB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"r\n\x14\x44\x65leteClusterRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#managedkafka.googleapis.com/Cluster\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x7f\n\x11ListTopicsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!managedkafka.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"b\n\x12ListTopicsResponse\x12\x33\n\x06topics\x18\x01 \x03(\x0b\x32#.google.cloud.managedkafka.v1.Topic\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"J\n\x0fGetTopicRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!managedkafka.googleapis.com/Topic\"\x9f\x01\n\x12\x43reateTopicRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!managedkafka.googleapis.com/Topic\x12\x15\n\x08topic_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x05topic\x18\x03 \x01(\x0b\x32#.google.cloud.managedkafka.v1.TopicB\x03\xe0\x41\x02\"\x83\x01\n\x12UpdateTopicRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x05topic\x18\x02 \x01(\x0b\x32#.google.cloud.managedkafka.v1.TopicB\x03\xe0\x41\x02\"M\n\x12\x44\x65leteTopicRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!managedkafka.googleapis.com/Topic\"\x8f\x01\n\x19ListConsumerGroupsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)managedkafka.googleapis.com/ConsumerGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"{\n\x1aListConsumerGroupsResponse\x12\x44\n\x0f\x63onsumer_groups\x18\x01 \x03(\x0b\x32+.google.cloud.managedkafka.v1.ConsumerGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x17GetConsumerGroupRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/ConsumerGroup\"\x9c\x01\n\x1aUpdateConsumerGroupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12H\n\x0e\x63onsumer_group\x18\x02 \x01(\x0b\x32+.google.cloud.managedkafka.v1.ConsumerGroupB\x03\xe0\x41\x02\"]\n\x1a\x44\x65leteConsumerGroupRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/ConsumerGroup2\xb5\x16\n\x0cManagedKafka\x12\xb4\x01\n\x0cListClusters\x12\x31.google.cloud.managedkafka.v1.ListClustersRequest\x1a\x32.google.cloud.managedkafka.v1.ListClustersResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\xa1\x01\n\nGetCluster\x12/.google.cloud.managedkafka.v1.GetClusterRequest\x1a%.google.cloud.managedkafka.v1.Cluster\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\x12\xdc\x01\n\rCreateCluster\x12\x32.google.cloud.managedkafka.v1.CreateClusterRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1c\n\x07\x43luster\x12\x11OperationMetadata\xda\x41\x19parent,cluster,cluster_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/clusters:\x07\x63luster\x12\xde\x01\n\rUpdateCluster\x12\x32.google.cloud.managedkafka.v1.UpdateClusterRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x43luster\x12\x11OperationMetadata\xda\x41\x13\x63luster,update_mask\x82\xd3\xe4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07\x63luster\x12\xcc\x01\n\rDeleteCluster\x12\x32.google.cloud.managedkafka.v1.DeleteClusterRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\x12\xb7\x01\n\nListTopics\x12/.google.cloud.managedkafka.v1.ListTopicsRequest\x1a\x30.google.cloud.managedkafka.v1.ListTopicsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/clusters/*}/topics\x12\xa4\x01\n\x08GetTopic\x12-.google.cloud.managedkafka.v1.GetTopicRequest\x1a#.google.cloud.managedkafka.v1.Topic\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/clusters/*/topics/*}\x12\xc2\x01\n\x0b\x43reateTopic\x12\x30.google.cloud.managedkafka.v1.CreateTopicRequest\x1a#.google.cloud.managedkafka.v1.Topic\"\\\xda\x41\x15parent,topic,topic_id\x82\xd3\xe4\x93\x02>\"5/v1/{parent=projects/*/locations/*/clusters/*}/topics:\x05topic\x12\xc4\x01\n\x0bUpdateTopic\x12\x30.google.cloud.managedkafka.v1.UpdateTopicRequest\x1a#.google.cloud.managedkafka.v1.Topic\"^\xda\x41\x11topic,update_mask\x82\xd3\xe4\x93\x02\x44\x32;/v1/{topic.name=projects/*/locations/*/clusters/*/topics/*}:\x05topic\x12\x9d\x01\n\x0b\x44\x65leteTopic\x12\x30.google.cloud.managedkafka.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/clusters/*/topics/*}\x12\xd7\x01\n\x12ListConsumerGroups\x12\x37.google.cloud.managedkafka.v1.ListConsumerGroupsRequest\x1a\x38.google.cloud.managedkafka.v1.ListConsumerGroupsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/clusters/*}/consumerGroups\x12\xc5\x01\n\x10GetConsumerGroup\x12\x35.google.cloud.managedkafka.v1.GetConsumerGroupRequest\x1a+.google.cloud.managedkafka.v1.ConsumerGroup\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/**}\x12\x81\x02\n\x13UpdateConsumerGroup\x12\x38.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest\x1a+.google.cloud.managedkafka.v1.ConsumerGroup\"\x82\x01\xda\x41\x1a\x63onsumer_group,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{consumer_group.name=projects/*/locations/*/clusters/*/consumerGroups/**}:\x0e\x63onsumer_group\x12\xb6\x01\n\x13\x44\x65leteConsumerGroup\x12\x38.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/**}\x1aO\xca\x41\x1bmanagedkafka.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdd\x01\n com.google.cloud.managedkafka.v1B\x11ManagedKafkaProtoP\x01ZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb\xaa\x02\x1cGoogle.Cloud.ManagedKafka.V1\xca\x02\x1cGoogle\\Cloud\\ManagedKafka\\V1\xea\x02\x1fGoogle::Cloud::ManagedKafka::V1b\x06proto3" +descriptor_data = "\n0google/cloud/managedkafka/v1/managed_kafka.proto\x12\x1cgoogle.cloud.managedkafka.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/managedkafka/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xaf\x01\n\x13ListClustersRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#managedkafka.googleapis.com/Cluster\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"}\n\x14ListClustersResponse\x12\x37\n\x08\x63lusters\x18\x01 \x03(\x0b\x32%.google.cloud.managedkafka.v1.Cluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x11GetClusterRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#managedkafka.googleapis.com/Cluster\"\xca\x01\n\x14\x43reateClusterRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#managedkafka.googleapis.com/Cluster\x12\x17\n\ncluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\x07\x63luster\x18\x03 \x01(\x0b\x32%.google.cloud.managedkafka.v1.ClusterB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xaa\x01\n\x14UpdateClusterRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12;\n\x07\x63luster\x18\x02 \x01(\x0b\x32%.google.cloud.managedkafka.v1.ClusterB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"r\n\x14\x44\x65leteClusterRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#managedkafka.googleapis.com/Cluster\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x7f\n\x11ListTopicsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!managedkafka.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"b\n\x12ListTopicsResponse\x12\x33\n\x06topics\x18\x01 \x03(\x0b\x32#.google.cloud.managedkafka.v1.Topic\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"J\n\x0fGetTopicRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!managedkafka.googleapis.com/Topic\"\x9f\x01\n\x12\x43reateTopicRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!managedkafka.googleapis.com/Topic\x12\x15\n\x08topic_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x05topic\x18\x03 \x01(\x0b\x32#.google.cloud.managedkafka.v1.TopicB\x03\xe0\x41\x02\"\x83\x01\n\x12UpdateTopicRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x05topic\x18\x02 \x01(\x0b\x32#.google.cloud.managedkafka.v1.TopicB\x03\xe0\x41\x02\"M\n\x12\x44\x65leteTopicRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!managedkafka.googleapis.com/Topic\"\x8f\x01\n\x19ListConsumerGroupsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)managedkafka.googleapis.com/ConsumerGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"{\n\x1aListConsumerGroupsResponse\x12\x44\n\x0f\x63onsumer_groups\x18\x01 \x03(\x0b\x32+.google.cloud.managedkafka.v1.ConsumerGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x17GetConsumerGroupRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/ConsumerGroup\"\x9c\x01\n\x1aUpdateConsumerGroupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12H\n\x0e\x63onsumer_group\x18\x02 \x01(\x0b\x32+.google.cloud.managedkafka.v1.ConsumerGroupB\x03\xe0\x41\x02\"]\n\x1a\x44\x65leteConsumerGroupRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/ConsumerGroup\"{\n\x0fListAclsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fmanagedkafka.googleapis.com/Acl\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\\\n\x10ListAclsResponse\x12/\n\x04\x61\x63ls\x18\x01 \x03(\x0b\x32!.google.cloud.managedkafka.v1.Acl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\rGetAclRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmanagedkafka.googleapis.com/Acl\"\x95\x01\n\x10\x43reateAclRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fmanagedkafka.googleapis.com/Acl\x12\x13\n\x06\x61\x63l_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x03\x61\x63l\x18\x03 \x01(\x0b\x32!.google.cloud.managedkafka.v1.AclB\x03\xe0\x41\x02\"}\n\x10UpdateAclRequest\x12\x33\n\x03\x61\x63l\x18\x01 \x01(\x0b\x32!.google.cloud.managedkafka.v1.AclB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"I\n\x10\x44\x65leteAclRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmanagedkafka.googleapis.com/Acl\"\x8a\x01\n\x12\x41\x64\x64\x41\x63lEntryRequest\x12\x34\n\x03\x61\x63l\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmanagedkafka.googleapis.com/Acl\x12>\n\tacl_entry\x18\x02 \x01(\x0b\x32&.google.cloud.managedkafka.v1.AclEntryB\x03\xe0\x41\x02\"Z\n\x13\x41\x64\x64\x41\x63lEntryResponse\x12.\n\x03\x61\x63l\x18\x01 \x01(\x0b\x32!.google.cloud.managedkafka.v1.Acl\x12\x13\n\x0b\x61\x63l_created\x18\x02 \x01(\x08\"\x8d\x01\n\x15RemoveAclEntryRequest\x12\x34\n\x03\x61\x63l\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmanagedkafka.googleapis.com/Acl\x12>\n\tacl_entry\x18\x02 \x01(\x0b\x32&.google.cloud.managedkafka.v1.AclEntryB\x03\xe0\x41\x02\"k\n\x16RemoveAclEntryResponse\x12\x30\n\x03\x61\x63l\x18\x01 \x01(\x0b\x32!.google.cloud.managedkafka.v1.AclH\x00\x12\x15\n\x0b\x61\x63l_deleted\x18\x02 \x01(\x08H\x00\x42\x08\n\x06result2\xd1 \n\x0cManagedKafka\x12\xb4\x01\n\x0cListClusters\x12\x31.google.cloud.managedkafka.v1.ListClustersRequest\x1a\x32.google.cloud.managedkafka.v1.ListClustersResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\xa1\x01\n\nGetCluster\x12/.google.cloud.managedkafka.v1.GetClusterRequest\x1a%.google.cloud.managedkafka.v1.Cluster\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\x12\xdc\x01\n\rCreateCluster\x12\x32.google.cloud.managedkafka.v1.CreateClusterRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1c\n\x07\x43luster\x12\x11OperationMetadata\xda\x41\x19parent,cluster,cluster_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/clusters:\x07\x63luster\x12\xde\x01\n\rUpdateCluster\x12\x32.google.cloud.managedkafka.v1.UpdateClusterRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x43luster\x12\x11OperationMetadata\xda\x41\x13\x63luster,update_mask\x82\xd3\xe4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07\x63luster\x12\xcc\x01\n\rDeleteCluster\x12\x32.google.cloud.managedkafka.v1.DeleteClusterRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\x12\xb7\x01\n\nListTopics\x12/.google.cloud.managedkafka.v1.ListTopicsRequest\x1a\x30.google.cloud.managedkafka.v1.ListTopicsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/clusters/*}/topics\x12\xa4\x01\n\x08GetTopic\x12-.google.cloud.managedkafka.v1.GetTopicRequest\x1a#.google.cloud.managedkafka.v1.Topic\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/clusters/*/topics/*}\x12\xc2\x01\n\x0b\x43reateTopic\x12\x30.google.cloud.managedkafka.v1.CreateTopicRequest\x1a#.google.cloud.managedkafka.v1.Topic\"\\\xda\x41\x15parent,topic,topic_id\x82\xd3\xe4\x93\x02>\"5/v1/{parent=projects/*/locations/*/clusters/*}/topics:\x05topic\x12\xc4\x01\n\x0bUpdateTopic\x12\x30.google.cloud.managedkafka.v1.UpdateTopicRequest\x1a#.google.cloud.managedkafka.v1.Topic\"^\xda\x41\x11topic,update_mask\x82\xd3\xe4\x93\x02\x44\x32;/v1/{topic.name=projects/*/locations/*/clusters/*/topics/*}:\x05topic\x12\x9d\x01\n\x0b\x44\x65leteTopic\x12\x30.google.cloud.managedkafka.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/clusters/*/topics/*}\x12\xd7\x01\n\x12ListConsumerGroups\x12\x37.google.cloud.managedkafka.v1.ListConsumerGroupsRequest\x1a\x38.google.cloud.managedkafka.v1.ListConsumerGroupsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/clusters/*}/consumerGroups\x12\xc5\x01\n\x10GetConsumerGroup\x12\x35.google.cloud.managedkafka.v1.GetConsumerGroupRequest\x1a+.google.cloud.managedkafka.v1.ConsumerGroup\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/**}\x12\x81\x02\n\x13UpdateConsumerGroup\x12\x38.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest\x1a+.google.cloud.managedkafka.v1.ConsumerGroup\"\x82\x01\xda\x41\x1a\x63onsumer_group,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{consumer_group.name=projects/*/locations/*/clusters/*/consumerGroups/**}:\x0e\x63onsumer_group\x12\xb6\x01\n\x13\x44\x65leteConsumerGroup\x12\x38.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/**}\x12\xaf\x01\n\x08ListAcls\x12-.google.cloud.managedkafka.v1.ListAclsRequest\x1a..google.cloud.managedkafka.v1.ListAclsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*/clusters/*}/acls\x12\x9d\x01\n\x06GetAcl\x12+.google.cloud.managedkafka.v1.GetAclRequest\x1a!.google.cloud.managedkafka.v1.Acl\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/clusters/*/acls/**}\x12\xb4\x01\n\tCreateAcl\x12..google.cloud.managedkafka.v1.CreateAclRequest\x1a!.google.cloud.managedkafka.v1.Acl\"T\xda\x41\x11parent,acl,acl_id\x82\xd3\xe4\x93\x02:\"3/v1/{parent=projects/*/locations/*/clusters/*}/acls:\x03\x61\x63l\x12\xb7\x01\n\tUpdateAcl\x12..google.cloud.managedkafka.v1.UpdateAclRequest\x1a!.google.cloud.managedkafka.v1.Acl\"W\xda\x41\x0f\x61\x63l,update_mask\x82\xd3\xe4\x93\x02?28/v1/{acl.name=projects/*/locations/*/clusters/*/acls/**}:\x03\x61\x63l\x12\x98\x01\n\tDeleteAcl\x12..google.cloud.managedkafka.v1.DeleteAclRequest\x1a\x16.google.protobuf.Empty\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/clusters/*/acls/**}\x12\xd6\x01\n\x0b\x41\x64\x64\x41\x63lEntry\x12\x30.google.cloud.managedkafka.v1.AddAclEntryRequest\x1a\x31.google.cloud.managedkafka.v1.AddAclEntryResponse\"b\xda\x41\racl,acl_entry\x82\xd3\xe4\x93\x02L\"?/v1/{acl=projects/*/locations/*/clusters/*/acls/**}:addAclEntry:\tacl_entry\x12\xe2\x01\n\x0eRemoveAclEntry\x12\x33.google.cloud.managedkafka.v1.RemoveAclEntryRequest\x1a\x34.google.cloud.managedkafka.v1.RemoveAclEntryResponse\"e\xda\x41\racl,acl_entry\x82\xd3\xe4\x93\x02O\"B/v1/{acl=projects/*/locations/*/clusters/*/acls/**}:removeAclEntry:\tacl_entry\x1aO\xca\x41\x1bmanagedkafka.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdd\x01\n com.google.cloud.managedkafka.v1B\x11ManagedKafkaProtoP\x01ZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb\xaa\x02\x1cGoogle.Cloud.ManagedKafka.V1\xca\x02\x1cGoogle\\Cloud\\ManagedKafka\\V1\xea\x02\x1fGoogle::Cloud::ManagedKafka::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -64,6 +64,16 @@ module V1 GetConsumerGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.GetConsumerGroupRequest").msgclass UpdateConsumerGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.UpdateConsumerGroupRequest").msgclass DeleteConsumerGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.DeleteConsumerGroupRequest").msgclass + ListAclsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.ListAclsRequest").msgclass + ListAclsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.ListAclsResponse").msgclass + GetAclRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.GetAclRequest").msgclass + CreateAclRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.CreateAclRequest").msgclass + UpdateAclRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.UpdateAclRequest").msgclass + DeleteAclRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.DeleteAclRequest").msgclass + AddAclEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.AddAclEntryRequest").msgclass + AddAclEntryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.AddAclEntryResponse").msgclass + RemoveAclEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.RemoveAclEntryRequest").msgclass + RemoveAclEntryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.RemoveAclEntryResponse").msgclass end end end diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/managed_kafka_services_pb.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/managed_kafka_services_pb.rb index 76b39ff49f7b..dedfd60bd5d4 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/managed_kafka_services_pb.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/managed_kafka_services_pb.rb @@ -62,6 +62,23 @@ class Service rpc :UpdateConsumerGroup, ::Google::Cloud::ManagedKafka::V1::UpdateConsumerGroupRequest, ::Google::Cloud::ManagedKafka::V1::ConsumerGroup # Deletes a single consumer group. rpc :DeleteConsumerGroup, ::Google::Cloud::ManagedKafka::V1::DeleteConsumerGroupRequest, ::Google::Protobuf::Empty + # Lists the acls in a given cluster. + rpc :ListAcls, ::Google::Cloud::ManagedKafka::V1::ListAclsRequest, ::Google::Cloud::ManagedKafka::V1::ListAclsResponse + # Returns the properties of a single acl. + rpc :GetAcl, ::Google::Cloud::ManagedKafka::V1::GetAclRequest, ::Google::Cloud::ManagedKafka::V1::Acl + # Creates a new acl in the given project, location, and cluster. + rpc :CreateAcl, ::Google::Cloud::ManagedKafka::V1::CreateAclRequest, ::Google::Cloud::ManagedKafka::V1::Acl + # Updates the properties of a single acl. + rpc :UpdateAcl, ::Google::Cloud::ManagedKafka::V1::UpdateAclRequest, ::Google::Cloud::ManagedKafka::V1::Acl + # Deletes an acl. + rpc :DeleteAcl, ::Google::Cloud::ManagedKafka::V1::DeleteAclRequest, ::Google::Protobuf::Empty + # Incremental update: Adds an acl entry to an acl. Creates the acl if it does + # not exist yet. + rpc :AddAclEntry, ::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest, ::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse + # Incremental update: Removes an acl entry from an acl. Deletes the acl if + # its acl entries become empty (i.e. if the removed entry was the last one in + # the acl). + rpc :RemoveAclEntry, ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest, ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse end Stub = Service.rpc_stub_class diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/resources_pb.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/resources_pb.rb index 3e21e6724ba5..a7d5fc19fc95 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/resources_pb.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/resources_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/managedkafka/v1/resources.proto\x12\x1cgoogle.cloud.managedkafka.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x07\x43luster\x12\x42\n\ngcp_config\x18\t \x01(\x0b\x32\'.google.cloud.managedkafka.v1.GcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.managedkafka.v1.Cluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x05 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12L\n\x10rebalance_config\x18\x08 \x01(\x0b\x32-.google.cloud.managedkafka.v1.RebalanceConfigB\x03\xe0\x41\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.managedkafka.v1.Cluster.StateB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzi\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:w\xea\x41t\n#managedkafka.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterB\x11\n\x0fplatform_configB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzs\"D\n\x0e\x43\x61pacityConfig\x12\x17\n\nvcpu_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"\xa8\x01\n\x0fRebalanceConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.RebalanceConfig.ModeB\x03\xe0\x41\x01\"N\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNO_REBALANCE\x10\x01\x12\x1e\n\x1a\x41UTO_REBALANCE_ON_SCALE_UP\x10\x02\"$\n\rNetworkConfig\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x02\"Y\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32+.google.cloud.managedkafka.v1.NetworkConfigB\x03\xe0\x41\x02\"\x92\x01\n\tGcpConfig\x12\x46\n\raccess_config\x18\x03 \x01(\x0b\x32*.google.cloud.managedkafka.v1.AccessConfigB\x03\xe0\x41\x02\x12=\n\x07kms_key\x18\x02 \x01(\tB,\xe0\x41\x01\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xd7\x02\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fpartition_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\"\n\x12replication_factor\x18\x03 \x01(\x05\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x46\n\x07\x63onfigs\x18\x04 \x03(\x0b\x32\x30.google.cloud.managedkafka.v1.Topic.ConfigsEntryB\x03\xe0\x41\x01\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n!managedkafka.googleapis.com/Topic\x12Iprojects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}*\x06topics2\x05topic\"\xe1\x01\n\x15\x43onsumerTopicMetadata\x12\\\n\npartitions\x18\x01 \x03(\x0b\x32\x43.google.cloud.managedkafka.v1.ConsumerTopicMetadata.PartitionsEntryB\x03\xe0\x41\x01\x1aj\n\x0fPartitionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerPartitionMetadata:\x02\x38\x01\"G\n\x19\x43onsumerPartitionMetadata\x12\x13\n\x06offset\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x15\n\x08metadata\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x81\x03\n\rConsumerGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x06topics\x18\x02 \x03(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerGroup.TopicsEntryB\x03\xe0\x41\x01\x1a\x62\n\x0bTopicsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.managedkafka.v1.ConsumerTopicMetadata:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n)managedkafka.googleapis.com/ConsumerGroup\x12Zprojects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}*\x0e\x63onsumerGroups2\rconsumerGroup\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x83\x07\n\x0e\x43onnectCluster\x12I\n\ngcp_config\x18\x07 \x01(\x0b\x32..google.cloud.managedkafka.v1.ConnectGcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1d\n\rkafka_cluster\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x05 \x03(\x0b\x32\x38.google.cloud.managedkafka.v1.ConnectCluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x06 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12\x46\n\x05state\x18\x08 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.ConnectCluster.StateB\x03\xe0\x41\x03\x12M\n\x06\x63onfig\x18\t \x03(\x0b\x32\x38.google.cloud.managedkafka.v1.ConnectCluster.ConfigEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:\x9c\x01\xea\x41\x98\x01\n*managedkafka.googleapis.com/ConnectCluster\x12Iprojects/{project}/locations/{location}/connectClusters/{connect_cluster}*\x0f\x63onnectClusters2\x0e\x63onnectClusterB\x11\n\x0fplatform_config\"s\n\x14\x43onnectNetworkConfig\x12\x1b\n\x0eprimary_subnet\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x61\x64\x64itional_subnets\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64ns_domain_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"g\n\x13\x43onnectAccessConfig\x12P\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.managedkafka.v1.ConnectNetworkConfigB\x03\xe0\x41\x02\"\xab\x01\n\x10\x43onnectGcpConfig\x12M\n\raccess_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.managedkafka.v1.ConnectAccessConfigB\x03\xe0\x41\x02\x12H\n\x0csecret_paths\x18\x02 \x03(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xdb\x04\n\tConnector\x12Q\n\x13task_restart_policy\x18\x04 \x01(\x0b\x32-.google.cloud.managedkafka.v1.TaskRetryPolicyB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12J\n\x07\x63onfigs\x18\x02 \x03(\x0b\x32\x34.google.cloud.managedkafka.v1.Connector.ConfigsEntryB\x03\xe0\x41\x01\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.managedkafka.v1.Connector.StateB\x03\xe0\x41\x03\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nUNASSIGNED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0e\n\nRESTARTING\x10\x05\x12\x0b\n\x07STOPPED\x10\x06:\xa4\x01\xea\x41\xa0\x01\n%managedkafka.googleapis.com/Connector\x12`projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}*\nconnectors2\tconnectorB\x10\n\x0erestart_policy\"\x83\x01\n\x0fTaskRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x42\xa2\x04\n com.google.cloud.managedkafka.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb\xaa\x02\x1cGoogle.Cloud.ManagedKafka.V1\xca\x02\x1cGoogle\\Cloud\\ManagedKafka\\V1\xea\x02\x1fGoogle::Cloud::ManagedKafka::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" +descriptor_data = "\n,google/cloud/managedkafka/v1/resources.proto\x12\x1cgoogle.cloud.managedkafka.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x07\x43luster\x12\x42\n\ngcp_config\x18\t \x01(\x0b\x32\'.google.cloud.managedkafka.v1.GcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.managedkafka.v1.Cluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x05 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12L\n\x10rebalance_config\x18\x08 \x01(\x0b\x32-.google.cloud.managedkafka.v1.RebalanceConfigB\x03\xe0\x41\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.managedkafka.v1.Cluster.StateB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzi\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:w\xea\x41t\n#managedkafka.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterB\x11\n\x0fplatform_configB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzs\"D\n\x0e\x43\x61pacityConfig\x12\x17\n\nvcpu_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"\xa8\x01\n\x0fRebalanceConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.RebalanceConfig.ModeB\x03\xe0\x41\x01\"N\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNO_REBALANCE\x10\x01\x12\x1e\n\x1a\x41UTO_REBALANCE_ON_SCALE_UP\x10\x02\"$\n\rNetworkConfig\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x02\"Y\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32+.google.cloud.managedkafka.v1.NetworkConfigB\x03\xe0\x41\x02\"\x92\x01\n\tGcpConfig\x12\x46\n\raccess_config\x18\x03 \x01(\x0b\x32*.google.cloud.managedkafka.v1.AccessConfigB\x03\xe0\x41\x02\x12=\n\x07kms_key\x18\x02 \x01(\tB,\xe0\x41\x01\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xd7\x02\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fpartition_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\"\n\x12replication_factor\x18\x03 \x01(\x05\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x46\n\x07\x63onfigs\x18\x04 \x03(\x0b\x32\x30.google.cloud.managedkafka.v1.Topic.ConfigsEntryB\x03\xe0\x41\x01\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n!managedkafka.googleapis.com/Topic\x12Iprojects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}*\x06topics2\x05topic\"\xe1\x01\n\x15\x43onsumerTopicMetadata\x12\\\n\npartitions\x18\x01 \x03(\x0b\x32\x43.google.cloud.managedkafka.v1.ConsumerTopicMetadata.PartitionsEntryB\x03\xe0\x41\x01\x1aj\n\x0fPartitionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerPartitionMetadata:\x02\x38\x01\"G\n\x19\x43onsumerPartitionMetadata\x12\x13\n\x06offset\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x15\n\x08metadata\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x81\x03\n\rConsumerGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x06topics\x18\x02 \x03(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerGroup.TopicsEntryB\x03\xe0\x41\x01\x1a\x62\n\x0bTopicsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.managedkafka.v1.ConsumerTopicMetadata:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n)managedkafka.googleapis.com/ConsumerGroup\x12Zprojects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}*\x0e\x63onsumerGroups2\rconsumerGroup\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x83\x07\n\x0e\x43onnectCluster\x12I\n\ngcp_config\x18\x07 \x01(\x0b\x32..google.cloud.managedkafka.v1.ConnectGcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1d\n\rkafka_cluster\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x05 \x03(\x0b\x32\x38.google.cloud.managedkafka.v1.ConnectCluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x06 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12\x46\n\x05state\x18\x08 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.ConnectCluster.StateB\x03\xe0\x41\x03\x12M\n\x06\x63onfig\x18\t \x03(\x0b\x32\x38.google.cloud.managedkafka.v1.ConnectCluster.ConfigEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:\x9c\x01\xea\x41\x98\x01\n*managedkafka.googleapis.com/ConnectCluster\x12Iprojects/{project}/locations/{location}/connectClusters/{connect_cluster}*\x0f\x63onnectClusters2\x0e\x63onnectClusterB\x11\n\x0fplatform_config\"s\n\x14\x43onnectNetworkConfig\x12\x1b\n\x0eprimary_subnet\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x61\x64\x64itional_subnets\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64ns_domain_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"g\n\x13\x43onnectAccessConfig\x12P\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.managedkafka.v1.ConnectNetworkConfigB\x03\xe0\x41\x02\"\xab\x01\n\x10\x43onnectGcpConfig\x12M\n\raccess_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.managedkafka.v1.ConnectAccessConfigB\x03\xe0\x41\x02\x12H\n\x0csecret_paths\x18\x02 \x03(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xdb\x04\n\tConnector\x12Q\n\x13task_restart_policy\x18\x04 \x01(\x0b\x32-.google.cloud.managedkafka.v1.TaskRetryPolicyB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12J\n\x07\x63onfigs\x18\x02 \x03(\x0b\x32\x34.google.cloud.managedkafka.v1.Connector.ConfigsEntryB\x03\xe0\x41\x01\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.managedkafka.v1.Connector.StateB\x03\xe0\x41\x03\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nUNASSIGNED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0e\n\nRESTARTING\x10\x05\x12\x0b\n\x07STOPPED\x10\x06:\xa4\x01\xea\x41\xa0\x01\n%managedkafka.googleapis.com/Connector\x12`projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}*\nconnectors2\tconnectorB\x10\n\x0erestart_policy\"\x83\x01\n\x0fTaskRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xb8\x02\n\x03\x41\x63l\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12@\n\x0b\x61\x63l_entries\x18\x02 \x03(\x0b\x32&.google.cloud.managedkafka.v1.AclEntryB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rresource_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rresource_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpattern_type\x18\x06 \x01(\tB\x03\xe0\x41\x03:v\xea\x41s\n\x1fmanagedkafka.googleapis.com/Acl\x12\x45projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl}*\x04\x61\x63ls2\x03\x61\x63l\"k\n\x08\x41\x63lEntry\x12\x16\n\tprincipal\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0fpermission_type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\toperation\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04host\x18\x07 \x01(\tB\x03\xe0\x41\x02\x42\xa2\x04\n com.google.cloud.managedkafka.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb\xaa\x02\x1cGoogle.Cloud.ManagedKafka.V1\xca\x02\x1cGoogle\\Cloud\\ManagedKafka\\V1\xea\x02\x1fGoogle::Cloud::ManagedKafka::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -63,6 +63,8 @@ module V1 Connector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.Connector").msgclass Connector::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.Connector.State").enummodule TaskRetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.TaskRetryPolicy").msgclass + Acl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.Acl").msgclass + AclEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.AclEntry").msgclass end end end diff --git a/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/managed_kafka.rb b/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/managed_kafka.rb index 70ed1388aaaf..90f77025b37b 100644 --- a/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/managed_kafka.rb +++ b/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/managed_kafka.rb @@ -335,6 +335,193 @@ class DeleteConsumerGroupRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Request for ListAcls. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent cluster whose acls are to be listed. + # Structured like + # `projects/{project}/locations/{location}/clusters/{cluster}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of acls to return. The service may return + # fewer than this value. If unset or zero, all acls for the parent is + # returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAcls` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAcls` must match + # the call that provided the page token. + class ListAclsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListAcls. + # @!attribute [rw] acls + # @return [::Array<::Google::Cloud::ManagedKafka::V1::Acl>] + # The list of acls in the requested parent. The order of the acls is + # unspecified. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page of + # results. If this field is omitted, there are no more results. + class ListAclsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetAcl. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the acl to return. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + class GetAclRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateAcl. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent cluster in which to create the acl. + # Structured like + # `projects/{project}/locations/{location}/clusters/{cluster}`. + # @!attribute [rw] acl_id + # @return [::String] + # Required. The ID to use for the acl, which will become the final component + # of the acl's name. The structure of `acl_id` defines the Resource Pattern + # (resource_type, resource_name, pattern_type) of the acl. `acl_id` is + # structured like one of the following: + # + # For acls on the cluster: + # `cluster` + # + # For acls on a single resource within the cluster: + # `topic/{resource_name}` + # `consumerGroup/{resource_name}` + # `transactionalId/{resource_name}` + # + # For acls on all resources that match a prefix: + # `topicPrefixed/{resource_name}` + # `consumerGroupPrefixed/{resource_name}` + # `transactionalIdPrefixed/{resource_name}` + # + # For acls on all resources of a given type (i.e. the wildcard literal "*"): + # `allTopics` (represents `topic/*`) + # `allConsumerGroups` (represents `consumerGroup/*`) + # `allTransactionalIds` (represents `transactionalId/*`) + # @!attribute [rw] acl + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # Required. Configuration of the acl to create. Its `name` field is ignored. + class CreateAclRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateAcl. + # @!attribute [rw] acl + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # Required. The updated acl. Its `name` and `etag` fields must be populated. + # `acl_entries` must not be empty in the updated acl; to remove all acl + # entries for an acl, use DeleteAcl. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Acl resource by the update. The fields specified in the update_mask are + # relative to the resource, not the full request. A field will be overwritten + # if it is in the mask. + class UpdateAclRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteAcl. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the acl to delete. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for details. + class DeleteAclRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for AddAclEntry. + # @!attribute [rw] acl + # @return [::String] + # Required. The name of the acl to add the acl entry to. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + # @!attribute [rw] acl_entry + # @return [::Google::Cloud::ManagedKafka::V1::AclEntry] + # Required. The acl entry to add. + class AddAclEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for AddAclEntry. + # @!attribute [rw] acl + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # The updated acl. + # @!attribute [rw] acl_created + # @return [::Boolean] + # Whether the acl was created as a result of adding the acl entry. + class AddAclEntryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for RemoveAclEntry. + # @!attribute [rw] acl + # @return [::String] + # Required. The name of the acl to remove the acl entry from. + # Structured like: + # `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`. + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. See `Acl.name` for + # details. + # @!attribute [rw] acl_entry + # @return [::Google::Cloud::ManagedKafka::V1::AclEntry] + # Required. The acl entry to remove. + class RemoveAclEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for RemoveAclEntry. + # @!attribute [rw] acl + # @return [::Google::Cloud::ManagedKafka::V1::Acl] + # The updated acl. Returned if the removed acl entry was not the last entry + # in the acl. + # + # Note: The following fields are mutually exclusive: `acl`, `acl_deleted`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] acl_deleted + # @return [::Boolean] + # Returned with value true if the removed acl entry was the last entry in + # the acl, resulting in acl deletion. + # + # Note: The following fields are mutually exclusive: `acl_deleted`, `acl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RemoveAclEntryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/resources.rb b/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/resources.rb index ea309a9bb056..7c28868baa20 100644 --- a/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/resources.rb +++ b/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/resources.rb @@ -496,6 +496,95 @@ class TaskRetryPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Represents the set of ACLs for a given Kafka Resource Pattern, which consists + # of resource_type, resource_name and pattern_type. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name for the acl. Represents a single Resource Pattern. + # Structured like: + # projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/acls/\\{acl_id} + # + # The structure of `acl_id` defines the Resource Pattern (resource_type, + # resource_name, pattern_type) of the acl. `acl_id` is structured like one of + # the following: + # + # For acls on the cluster: + # `cluster` + # + # For acls on a single resource within the cluster: + # `topic/{resource_name}` + # `consumerGroup/{resource_name}` + # `transactionalId/{resource_name}` + # + # For acls on all resources that match a prefix: + # `topicPrefixed/{resource_name}` + # `consumerGroupPrefixed/{resource_name}` + # `transactionalIdPrefixed/{resource_name}` + # + # For acls on all resources of a given type (i.e. the wildcard literal "*"): + # `allTopics` (represents `topic/*`) + # `allConsumerGroups` (represents `consumerGroup/*`) + # `allTransactionalIds` (represents `transactionalId/*`) + # @!attribute [rw] acl_entries + # @return [::Array<::Google::Cloud::ManagedKafka::V1::AclEntry>] + # Required. The ACL entries that apply to the resource pattern. The maximum + # number of allowed entries 100. + # @!attribute [rw] etag + # @return [::String] + # Optional. `etag` is used for concurrency control. An `etag` is returned in + # the response to `GetAcl` and `CreateAcl`. Callers are required to put that + # etag in the request to `UpdateAcl` to ensure that their change will be + # applied to the same version of the acl that exists in the Kafka Cluster. + # + # A terminal 'T' character in the etag indicates that the AclEntries were + # truncated; more entries for the Acl exist on the Kafka Cluster, but can't + # be returned in the Acl due to repeated field limits. + # @!attribute [r] resource_type + # @return [::String] + # Output only. The ACL resource type derived from the name. One of: CLUSTER, + # TOPIC, GROUP, TRANSACTIONAL_ID. + # @!attribute [r] resource_name + # @return [::String] + # Output only. The ACL resource name derived from the name. For cluster + # resource_type, this is always "kafka-cluster". Can be the wildcard literal + # "*". + # @!attribute [r] pattern_type + # @return [::String] + # Output only. The ACL pattern type derived from the name. One of: LITERAL, + # PREFIXED. + class Acl + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the access granted for a given Resource Pattern in an ACL. + # @!attribute [rw] principal + # @return [::String] + # Required. The principal. Specified as Google Cloud account, with the Kafka + # StandardAuthorizer prefix "User:". For example: + # "User:test-kafka-client@test-project.iam.gserviceaccount.com". + # Can be the wildcard "User:*" to refer to all users. + # @!attribute [rw] permission_type + # @return [::String] + # Required. The permission type. Accepted values are (case insensitive): + # ALLOW, DENY. + # @!attribute [rw] operation + # @return [::String] + # Required. The operation type. Allowed values are (case insensitive): ALL, + # READ, WRITE, CREATE, DELETE, ALTER, DESCRIBE, CLUSTER_ACTION, + # DESCRIBE_CONFIGS, ALTER_CONFIGS, and IDEMPOTENT_WRITE. See + # https://kafka.apache.org/documentation/#operations_resources_and_protocols + # for valid combinations of resource_type and operation for different Kafka + # API requests. + # @!attribute [rw] host + # @return [::String] + # Required. The host. Must be set to "*" for Managed Service for Apache + # Kafka. + class AclEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-managed_kafka-v1/snippets/managed_kafka/add_acl_entry.rb b/google-cloud-managed_kafka-v1/snippets/managed_kafka/add_acl_entry.rb new file mode 100644 index 000000000000..b1959bc9cefe --- /dev/null +++ b/google-cloud-managed_kafka-v1/snippets/managed_kafka/add_acl_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedKafka_AddAclEntry_sync] +require "google/cloud/managed_kafka/v1" + +## +# Snippet for the add_acl_entry call in the ManagedKafka 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::ManagedKafka::V1::ManagedKafka::Client#add_acl_entry. +# +def add_acl_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::V1::AddAclEntryRequest.new + + # Call the add_acl_entry method. + result = client.add_acl_entry request + + # The returned object is of type Google::Cloud::ManagedKafka::V1::AddAclEntryResponse. + p result +end +# [END managedkafka_v1_generated_ManagedKafka_AddAclEntry_sync] diff --git a/google-cloud-managed_kafka-v1/snippets/managed_kafka/create_acl.rb b/google-cloud-managed_kafka-v1/snippets/managed_kafka/create_acl.rb new file mode 100644 index 000000000000..f051cb7f1763 --- /dev/null +++ b/google-cloud-managed_kafka-v1/snippets/managed_kafka/create_acl.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedKafka_CreateAcl_sync] +require "google/cloud/managed_kafka/v1" + +## +# Snippet for the create_acl call in the ManagedKafka 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::ManagedKafka::V1::ManagedKafka::Client#create_acl. +# +def create_acl + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::V1::CreateAclRequest.new + + # Call the create_acl method. + result = client.create_acl request + + # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + p result +end +# [END managedkafka_v1_generated_ManagedKafka_CreateAcl_sync] diff --git a/google-cloud-managed_kafka-v1/snippets/managed_kafka/delete_acl.rb b/google-cloud-managed_kafka-v1/snippets/managed_kafka/delete_acl.rb new file mode 100644 index 000000000000..a10ad03c9159 --- /dev/null +++ b/google-cloud-managed_kafka-v1/snippets/managed_kafka/delete_acl.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedKafka_DeleteAcl_sync] +require "google/cloud/managed_kafka/v1" + +## +# Snippet for the delete_acl call in the ManagedKafka 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::ManagedKafka::V1::ManagedKafka::Client#delete_acl. +# +def delete_acl + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::V1::DeleteAclRequest.new + + # Call the delete_acl method. + result = client.delete_acl request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END managedkafka_v1_generated_ManagedKafka_DeleteAcl_sync] diff --git a/google-cloud-managed_kafka-v1/snippets/managed_kafka/get_acl.rb b/google-cloud-managed_kafka-v1/snippets/managed_kafka/get_acl.rb new file mode 100644 index 000000000000..193c511de858 --- /dev/null +++ b/google-cloud-managed_kafka-v1/snippets/managed_kafka/get_acl.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedKafka_GetAcl_sync] +require "google/cloud/managed_kafka/v1" + +## +# Snippet for the get_acl call in the ManagedKafka 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::ManagedKafka::V1::ManagedKafka::Client#get_acl. +# +def get_acl + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::V1::GetAclRequest.new + + # Call the get_acl method. + result = client.get_acl request + + # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + p result +end +# [END managedkafka_v1_generated_ManagedKafka_GetAcl_sync] diff --git a/google-cloud-managed_kafka-v1/snippets/managed_kafka/list_acls.rb b/google-cloud-managed_kafka-v1/snippets/managed_kafka/list_acls.rb new file mode 100644 index 000000000000..6fef61eb9e10 --- /dev/null +++ b/google-cloud-managed_kafka-v1/snippets/managed_kafka/list_acls.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedKafka_ListAcls_sync] +require "google/cloud/managed_kafka/v1" + +## +# Snippet for the list_acls call in the ManagedKafka 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::ManagedKafka::V1::ManagedKafka::Client#list_acls. +# +def list_acls + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::V1::ListAclsRequest.new + + # Call the list_acls method. + result = client.list_acls 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::ManagedKafka::V1::Acl. + p item + end +end +# [END managedkafka_v1_generated_ManagedKafka_ListAcls_sync] diff --git a/google-cloud-managed_kafka-v1/snippets/managed_kafka/remove_acl_entry.rb b/google-cloud-managed_kafka-v1/snippets/managed_kafka/remove_acl_entry.rb new file mode 100644 index 000000000000..9902650da0fb --- /dev/null +++ b/google-cloud-managed_kafka-v1/snippets/managed_kafka/remove_acl_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedKafka_RemoveAclEntry_sync] +require "google/cloud/managed_kafka/v1" + +## +# Snippet for the remove_acl_entry call in the ManagedKafka 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::ManagedKafka::V1::ManagedKafka::Client#remove_acl_entry. +# +def remove_acl_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest.new + + # Call the remove_acl_entry method. + result = client.remove_acl_entry request + + # The returned object is of type Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse. + p result +end +# [END managedkafka_v1_generated_ManagedKafka_RemoveAclEntry_sync] diff --git a/google-cloud-managed_kafka-v1/snippets/managed_kafka/update_acl.rb b/google-cloud-managed_kafka-v1/snippets/managed_kafka/update_acl.rb new file mode 100644 index 000000000000..8bb59116d67b --- /dev/null +++ b/google-cloud-managed_kafka-v1/snippets/managed_kafka/update_acl.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedKafka_UpdateAcl_sync] +require "google/cloud/managed_kafka/v1" + +## +# Snippet for the update_acl call in the ManagedKafka 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::ManagedKafka::V1::ManagedKafka::Client#update_acl. +# +def update_acl + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::V1::UpdateAclRequest.new + + # Call the update_acl method. + result = client.update_acl request + + # The returned object is of type Google::Cloud::ManagedKafka::V1::Acl. + p result +end +# [END managedkafka_v1_generated_ManagedKafka_UpdateAcl_sync] diff --git a/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json b/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json index 11f06d0304d3..133c2e4e75b0 100644 --- a/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json +++ b/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json @@ -571,6 +571,286 @@ } ] }, + { + "region_tag": "managedkafka_v1_generated_ManagedKafka_ListAcls_sync", + "title": "Snippet for the list_acls call in the ManagedKafka service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#list_acls.", + "file": "managed_kafka/list_acls.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_acls", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#list_acls", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::V1::ListAclsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::V1::ListAclsResponse", + "client": { + "short_name": "ManagedKafka::Client", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client" + }, + "method": { + "short_name": "ListAcls", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka.ListAcls", + "service": { + "short_name": "ManagedKafka", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedKafka_GetAcl_sync", + "title": "Snippet for the get_acl call in the ManagedKafka service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#get_acl.", + "file": "managed_kafka/get_acl.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_acl", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#get_acl", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::V1::GetAclRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::V1::Acl", + "client": { + "short_name": "ManagedKafka::Client", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client" + }, + "method": { + "short_name": "GetAcl", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka.GetAcl", + "service": { + "short_name": "ManagedKafka", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedKafka_CreateAcl_sync", + "title": "Snippet for the create_acl call in the ManagedKafka service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#create_acl.", + "file": "managed_kafka/create_acl.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_acl", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#create_acl", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::V1::CreateAclRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::V1::Acl", + "client": { + "short_name": "ManagedKafka::Client", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client" + }, + "method": { + "short_name": "CreateAcl", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka.CreateAcl", + "service": { + "short_name": "ManagedKafka", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedKafka_UpdateAcl_sync", + "title": "Snippet for the update_acl call in the ManagedKafka service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#update_acl.", + "file": "managed_kafka/update_acl.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_acl", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#update_acl", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::V1::UpdateAclRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::V1::Acl", + "client": { + "short_name": "ManagedKafka::Client", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client" + }, + "method": { + "short_name": "UpdateAcl", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka.UpdateAcl", + "service": { + "short_name": "ManagedKafka", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedKafka_DeleteAcl_sync", + "title": "Snippet for the delete_acl call in the ManagedKafka service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#delete_acl.", + "file": "managed_kafka/delete_acl.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_acl", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#delete_acl", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::V1::DeleteAclRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ManagedKafka::Client", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client" + }, + "method": { + "short_name": "DeleteAcl", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka.DeleteAcl", + "service": { + "short_name": "ManagedKafka", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedKafka_AddAclEntry_sync", + "title": "Snippet for the add_acl_entry call in the ManagedKafka service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#add_acl_entry.", + "file": "managed_kafka/add_acl_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_acl_entry", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#add_acl_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse", + "client": { + "short_name": "ManagedKafka::Client", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client" + }, + "method": { + "short_name": "AddAclEntry", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka.AddAclEntry", + "service": { + "short_name": "ManagedKafka", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedKafka_RemoveAclEntry_sync", + "title": "Snippet for the remove_acl_entry call in the ManagedKafka service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#remove_acl_entry.", + "file": "managed_kafka/remove_acl_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "remove_acl_entry", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client#remove_acl_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse", + "client": { + "short_name": "ManagedKafka::Client", + "full_name": "::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client" + }, + "method": { + "short_name": "RemoveAclEntry", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka.RemoveAclEntry", + "service": { + "short_name": "ManagedKafka", + "full_name": "google.cloud.managedkafka.v1.ManagedKafka" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "managedkafka_v1_generated_ManagedKafkaConnect_ListConnectClusters_sync", "title": "Snippet for the list_connect_clusters call in the ManagedKafkaConnect service", diff --git a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_paths_test.rb b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_paths_test.rb index a1f162024e9f..a387b24629f6 100644 --- a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_paths_test.rb +++ b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_paths_test.rb @@ -41,6 +41,18 @@ def logger end end + def test_acl_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.acl_path project: "value0", location: "value1", cluster: "value2", acl: "value3" + assert_equal "projects/value0/locations/value1/clusters/value2/acls/value3", path + end + end + def test_cluster_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_rest_test.rb b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_rest_test.rb index 9a49249d037c..86af5d3825f5 100644 --- a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_rest_test.rb +++ b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_rest_test.rb @@ -852,6 +852,391 @@ def test_delete_consumer_group end end + def test_list_acls + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::V1::ListAclsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_acls_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::ManagedKafka::V1::ManagedKafka::Rest::ServiceStub.stub :transcode_list_acls_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_acls_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_acls({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_acls parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_acls ::Google::Cloud::ManagedKafka::V1::ListAclsRequest.new(parent: parent, 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_acls({ parent: parent, 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_acls(::Google::Cloud::ManagedKafka::V1::ListAclsRequest.new(parent: parent, 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_acls_client_stub.call_count + end + end + end + + def test_get_acl + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::V1::Acl.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_acl_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::ManagedKafka::V1::ManagedKafka::Rest::ServiceStub.stub :transcode_get_acl_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_acl_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_acl({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_acl name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_acl ::Google::Cloud::ManagedKafka::V1::GetAclRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_acl({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_acl(::Google::Cloud::ManagedKafka::V1::GetAclRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_acl_client_stub.call_count + end + end + end + + def test_create_acl + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::V1::Acl.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + acl_id = "hello world" + acl = {} + + create_acl_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::ManagedKafka::V1::ManagedKafka::Rest::ServiceStub.stub :transcode_create_acl_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_acl_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_acl({ parent: parent, acl_id: acl_id, acl: acl }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_acl parent: parent, acl_id: acl_id, acl: acl do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_acl ::Google::Cloud::ManagedKafka::V1::CreateAclRequest.new(parent: parent, acl_id: acl_id, acl: acl) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_acl({ parent: parent, acl_id: acl_id, acl: acl }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_acl(::Google::Cloud::ManagedKafka::V1::CreateAclRequest.new(parent: parent, acl_id: acl_id, acl: acl), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_acl_client_stub.call_count + end + end + end + + def test_update_acl + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::V1::Acl.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + acl = {} + update_mask = {} + + update_acl_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::ManagedKafka::V1::ManagedKafka::Rest::ServiceStub.stub :transcode_update_acl_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_acl_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_acl({ acl: acl, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_acl acl: acl, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_acl ::Google::Cloud::ManagedKafka::V1::UpdateAclRequest.new(acl: acl, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_acl({ acl: acl, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_acl(::Google::Cloud::ManagedKafka::V1::UpdateAclRequest.new(acl: acl, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_acl_client_stub.call_count + end + end + end + + def test_delete_acl + # 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_acl_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::ManagedKafka::V1::ManagedKafka::Rest::ServiceStub.stub :transcode_delete_acl_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_acl_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_acl({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_acl name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_acl ::Google::Cloud::ManagedKafka::V1::DeleteAclRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_acl({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_acl(::Google::Cloud::ManagedKafka::V1::DeleteAclRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_acl_client_stub.call_count + end + end + end + + def test_add_acl_entry + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + acl = "hello world" + acl_entry = {} + + add_acl_entry_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::ManagedKafka::V1::ManagedKafka::Rest::ServiceStub.stub :transcode_add_acl_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, add_acl_entry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.add_acl_entry({ acl: acl, acl_entry: acl_entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.add_acl_entry acl: acl, acl_entry: acl_entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.add_acl_entry ::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest.new(acl: acl, acl_entry: acl_entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.add_acl_entry({ acl: acl, acl_entry: acl_entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.add_acl_entry(::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest.new(acl: acl, acl_entry: acl_entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, add_acl_entry_client_stub.call_count + end + end + end + + def test_remove_acl_entry + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + acl = "hello world" + acl_entry = {} + + remove_acl_entry_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::ManagedKafka::V1::ManagedKafka::Rest::ServiceStub.stub :transcode_remove_acl_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, remove_acl_entry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.remove_acl_entry({ acl: acl, acl_entry: acl_entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.remove_acl_entry acl: acl, acl_entry: acl_entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.remove_acl_entry ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest.new(acl: acl, acl_entry: acl_entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.remove_acl_entry({ acl: acl, acl_entry: acl_entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.remove_acl_entry(::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest.new(acl: acl, acl_entry: acl_entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, remove_acl_entry_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_test.rb b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_test.rb index 53f8d5e31c38..556918fe72ef 100644 --- a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_test.rb +++ b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_test.rb @@ -942,6 +942,431 @@ def test_delete_consumer_group end end + def test_list_acls + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::V1::ListAclsResponse.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" + page_size = 42 + page_token = "hello world" + + list_acls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_acls, name + assert_kind_of ::Google::Cloud::ManagedKafka::V1::ListAclsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_acls_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_acls({ parent: parent, 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_acls parent: parent, 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_acls ::Google::Cloud::ManagedKafka::V1::ListAclsRequest.new(parent: parent, 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_acls({ parent: parent, 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_acls(::Google::Cloud::ManagedKafka::V1::ListAclsRequest.new(parent: parent, 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_acls_client_stub.call_rpc_count + end + end + + def test_get_acl + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::V1::Acl.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" + + get_acl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_acl, name + assert_kind_of ::Google::Cloud::ManagedKafka::V1::GetAclRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_acl_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_acl({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_acl name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_acl ::Google::Cloud::ManagedKafka::V1::GetAclRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_acl({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_acl(::Google::Cloud::ManagedKafka::V1::GetAclRequest.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, get_acl_client_stub.call_rpc_count + end + end + + def test_create_acl + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::V1::Acl.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" + acl_id = "hello world" + acl = {} + + create_acl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_acl, name + assert_kind_of ::Google::Cloud::ManagedKafka::V1::CreateAclRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["acl_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ManagedKafka::V1::Acl), request["acl"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_acl_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_acl({ parent: parent, acl_id: acl_id, acl: acl }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_acl parent: parent, acl_id: acl_id, acl: acl do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_acl ::Google::Cloud::ManagedKafka::V1::CreateAclRequest.new(parent: parent, acl_id: acl_id, acl: acl) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_acl({ parent: parent, acl_id: acl_id, acl: acl }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_acl(::Google::Cloud::ManagedKafka::V1::CreateAclRequest.new(parent: parent, acl_id: acl_id, acl: acl), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_acl_client_stub.call_rpc_count + end + end + + def test_update_acl + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::V1::Acl.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. + acl = {} + update_mask = {} + + update_acl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_acl, name + assert_kind_of ::Google::Cloud::ManagedKafka::V1::UpdateAclRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ManagedKafka::V1::Acl), request["acl"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_acl_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_acl({ acl: acl, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_acl acl: acl, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_acl ::Google::Cloud::ManagedKafka::V1::UpdateAclRequest.new(acl: acl, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_acl({ acl: acl, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_acl(::Google::Cloud::ManagedKafka::V1::UpdateAclRequest.new(acl: acl, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_acl_client_stub.call_rpc_count + end + end + + def test_delete_acl + # 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_acl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_acl, name + assert_kind_of ::Google::Cloud::ManagedKafka::V1::DeleteAclRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_acl_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_acl({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_acl name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_acl ::Google::Cloud::ManagedKafka::V1::DeleteAclRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_acl({ 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_acl(::Google::Cloud::ManagedKafka::V1::DeleteAclRequest.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_acl_client_stub.call_rpc_count + end + end + + def test_add_acl_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::V1::AddAclEntryResponse.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. + acl = "hello world" + acl_entry = {} + + add_acl_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_acl_entry, name + assert_kind_of ::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest, request + assert_equal "hello world", request["acl"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ManagedKafka::V1::AclEntry), request["acl_entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_acl_entry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.add_acl_entry({ acl: acl, acl_entry: acl_entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.add_acl_entry acl: acl, acl_entry: acl_entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.add_acl_entry ::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest.new(acl: acl, acl_entry: acl_entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.add_acl_entry({ acl: acl, acl_entry: acl_entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.add_acl_entry(::Google::Cloud::ManagedKafka::V1::AddAclEntryRequest.new(acl: acl, acl_entry: acl_entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_acl_entry_client_stub.call_rpc_count + end + end + + def test_remove_acl_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryResponse.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. + acl = "hello world" + acl_entry = {} + + remove_acl_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :remove_acl_entry, name + assert_kind_of ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest, request + assert_equal "hello world", request["acl"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ManagedKafka::V1::AclEntry), request["acl_entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, remove_acl_entry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.remove_acl_entry({ acl: acl, acl_entry: acl_entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.remove_acl_entry acl: acl, acl_entry: acl_entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.remove_acl_entry ::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest.new(acl: acl, acl_entry: acl_entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.remove_acl_entry({ acl: acl, acl_entry: acl_entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.remove_acl_entry(::Google::Cloud::ManagedKafka::V1::RemoveAclEntryRequest.new(acl: acl, acl_entry: acl_entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, remove_acl_entry_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From 600dc2da2f9b6968f2e4883ad79bd643fc1029ac Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Thu, 22 May 2025 16:08:34 -0700 Subject: [PATCH 040/457] feat: Initial generation of google-shopping-merchant-issue_resolution (#30439) --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 ++ .../.owlbot-manifest.json | 25 +++ .../.repo-metadata.json | 17 ++ .../.rubocop.yml | 39 ++++ .../.toys.rb | 28 +++ .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++++++++++ .../CHANGELOG.md | 2 + .../Gemfile | 28 +++ .../LICENSE.md | 201 ++++++++++++++++++ .../README.md | 134 ++++++++++++ .../Rakefile | 169 +++++++++++++++ ...shopping-merchant-issue_resolution.gemspec | 27 +++ ...ogle-shopping-merchant-issue_resolution.rb | 19 ++ .../shopping/merchant/issue_resolution.rb | 107 ++++++++++ .../merchant/issue_resolution/version.rb | 28 +++ .../merchant/issue_resolution/client_test.rb | 64 ++++++ .../merchant/issue_resolution/version_test.rb | 26 +++ .../test/helper.rb | 25 +++ release-please-config.json | 4 + 22 files changed, 1103 insertions(+) create mode 100644 google-shopping-merchant-issue_resolution/.OwlBot.yaml create mode 100644 google-shopping-merchant-issue_resolution/.gitignore create mode 100644 google-shopping-merchant-issue_resolution/.owlbot-manifest.json create mode 100644 google-shopping-merchant-issue_resolution/.repo-metadata.json create mode 100644 google-shopping-merchant-issue_resolution/.rubocop.yml create mode 100644 google-shopping-merchant-issue_resolution/.toys.rb create mode 100644 google-shopping-merchant-issue_resolution/.yardopts create mode 100644 google-shopping-merchant-issue_resolution/AUTHENTICATION.md create mode 100644 google-shopping-merchant-issue_resolution/CHANGELOG.md create mode 100644 google-shopping-merchant-issue_resolution/Gemfile create mode 100644 google-shopping-merchant-issue_resolution/LICENSE.md create mode 100644 google-shopping-merchant-issue_resolution/README.md create mode 100644 google-shopping-merchant-issue_resolution/Rakefile create mode 100644 google-shopping-merchant-issue_resolution/google-shopping-merchant-issue_resolution.gemspec create mode 100644 google-shopping-merchant-issue_resolution/lib/google-shopping-merchant-issue_resolution.rb create mode 100644 google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution.rb create mode 100644 google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb create mode 100644 google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/client_test.rb create mode 100644 google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/version_test.rb create mode 100644 google-shopping-merchant-issue_resolution/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1ff11a97b7f7..66311e40a888 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -917,6 +917,8 @@ "google-shopping-merchant-inventories+FILLER": "0.0.0", "google-shopping-merchant-inventories-v1beta": "0.7.0", "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", + "google-shopping-merchant-issue_resolution": "0.0.1", + "google-shopping-merchant-issue_resolution+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution-v1beta": "0.0.1", "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", "google-shopping-merchant-lfp": "0.3.1", diff --git a/google-shopping-merchant-issue_resolution/.OwlBot.yaml b/google-shopping-merchant-issue_resolution/.OwlBot.yaml new file mode 100644 index 000000000000..67c3108aaea3 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/issueresolution/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-issue_resolution/$1 diff --git a/google-shopping-merchant-issue_resolution/.gitignore b/google-shopping-merchant-issue_resolution/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-issue_resolution/.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/google-shopping-merchant-issue_resolution/.owlbot-manifest.json b/google-shopping-merchant-issue_resolution/.owlbot-manifest.json new file mode 100644 index 000000000000..5c3871706814 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/.owlbot-manifest.json @@ -0,0 +1,25 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "google-shopping-merchant-issue_resolution.gemspec", + "lib/google-shopping-merchant-issue_resolution.rb", + "lib/google/shopping/merchant/issue_resolution.rb", + "lib/google/shopping/merchant/issue_resolution/version.rb", + "test/google/shopping/merchant/issue_resolution/client_test.rb", + "test/google/shopping/merchant/issue_resolution/version_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-issue_resolution/.repo-metadata.json b/google-shopping-merchant-issue_resolution/.repo-metadata.json new file mode 100644 index 000000000000..85545df2a7ff --- /dev/null +++ b/google-shopping-merchant-issue_resolution/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-issue_resolution", + "distribution_name": "google-shopping-merchant-issue_resolution", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_MANUAL" +} diff --git a/google-shopping-merchant-issue_resolution/.rubocop.yml b/google-shopping-merchant-issue_resolution/.rubocop.yml new file mode 100644 index 000000000000..5c2d2814f84e --- /dev/null +++ b/google-shopping-merchant-issue_resolution/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-issue_resolution.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-shopping-merchant-issue_resolution.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/google-shopping-merchant-issue_resolution/.toys.rb b/google-shopping-merchant-issue_resolution/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution/.yardopts b/google-shopping-merchant-issue_resolution/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/google-shopping-merchant-issue_resolution/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/google-shopping-merchant-issue_resolution/AUTHENTICATION.md b/google-shopping-merchant-issue_resolution/AUTHENTICATION.md new file mode 100644 index 000000000000..df96eec6c32e --- /dev/null +++ b/google-shopping-merchant-issue_resolution/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-issue_resolution 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-shopping-merchant-issue_resolution 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/shopping/merchant/issue_resolution" + +client = Google::Shopping::Merchant::IssueResolution.issue_resolution_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/issue_resolution" + +Google::Shopping::Merchant::IssueResolution.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::IssueResolution.issue_resolution_service +``` + +### 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-shopping-merchant-issue_resolution +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/issue_resolution" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::IssueResolution.issue_resolution_service +``` + +### 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/google-shopping-merchant-issue_resolution/CHANGELOG.md b/google-shopping-merchant-issue_resolution/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-issue_resolution/Gemfile b/google-shopping-merchant-issue_resolution/Gemfile new file mode 100644 index 000000000000..2f80a09a5655 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-shopping-merchant-issue_resolution-v1beta"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-shopping-merchant-issue_resolution.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-issue_resolution/LICENSE.md b/google-shopping-merchant-issue_resolution/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-issue_resolution/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/google-shopping-merchant-issue_resolution/README.md b/google-shopping-merchant-issue_resolution/README.md new file mode 100644 index 000000000000..2ba41b9f88fa --- /dev/null +++ b/google-shopping-merchant-issue_resolution/README.md @@ -0,0 +1,134 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-issue_resolution-v*`. +The gem `google-shopping-merchant-issue_resolution` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution) +for this library, google-shopping-merchant-issue_resolution, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-issue_resolution-v1beta](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-issue_resolution +``` + +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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-shopping-merchant-issue_resolution-v1beta](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta). + +## 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-shopping-merchant-issue_resolution`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-issue_resolution-v1beta`. +_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-shopping-merchant-issue_resolution`. +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-shopping-merchant-issue_resolution-v1beta`. + +### 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/google-shopping-merchant-issue_resolution/Rakefile b/google-shopping-merchant-issue_resolution/Rakefile new file mode 100644 index 000000000000..4191a5a1cfb1 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 = true +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-shopping-merchant-issue_resolution 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" + ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::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-shopping-merchant-issue_resolution 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-shopping-merchant-issue_resolution 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-shopping-merchant-issue_resolution 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-shopping-merchant-issue_resolution gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-issue_resolution" + header "google-shopping-merchant-issue_resolution rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-issue_resolution yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-issue_resolution 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-shopping-merchant-issue_resolution 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-shopping-merchant-issue_resolution 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/google-shopping-merchant-issue_resolution/google-shopping-merchant-issue_resolution.gemspec b/google-shopping-merchant-issue_resolution/google-shopping-merchant-issue_resolution.gemspec new file mode 100644 index 000000000000..f1b23c30ac11 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/google-shopping-merchant-issue_resolution.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/issue_resolution/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-issue_resolution" + gem.version = Google::Shopping::Merchant::IssueResolution::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-issue_resolution-v1beta", ">= 0.0", "< 2.a" +end diff --git a/google-shopping-merchant-issue_resolution/lib/google-shopping-merchant-issue_resolution.rb b/google-shopping-merchant-issue_resolution/lib/google-shopping-merchant-issue_resolution.rb new file mode 100644 index 000000000000..5199dc354bd8 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/lib/google-shopping-merchant-issue_resolution.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution" unless defined? Google::Shopping::Merchant::IssueResolution::VERSION diff --git a/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution.rb b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution.rb new file mode 100644 index 000000000000..cad3c31c7d64 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/issue_resolution/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # Create a new client object for IssueResolutionService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta/Google/Shopping/Merchant/IssueResolution/V1beta/IssueResolutionService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the IssueResolutionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the IssueResolutionService service. + # You can determine whether the method will succeed by calling + # {Google::Shopping::Merchant::IssueResolution.issue_resolution_service_available?}. + # + # ## About IssueResolutionService + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.issue_resolution_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/issue_resolution/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::IssueResolution + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::IssueResolution.const_get(package_name).const_get(:IssueResolutionService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the IssueResolutionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::IssueResolution.issue_resolution_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the IssueResolutionService service, + # or if the versioned client gem needs an update to support the IssueResolutionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.issue_resolution_service_available? version: :v1beta, transport: :grpc + require "google/shopping/merchant/issue_resolution/#{version.to_s.downcase}" + package_name = Google::Shopping::Merchant::IssueResolution + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Shopping::Merchant::IssueResolution.const_get package_name + return false unless service_module.const_defined? :IssueResolutionService + service_module = service_module.const_get :IssueResolutionService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + end + end + end +end + +helper_path = ::File.join __dir__, "issue_resolution", "helpers.rb" +require "google/shopping/merchant/issue_resolution/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb new file mode 100644 index 000000000000..47b3d0713fe8 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + VERSION = "0.0.1" + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/client_test.rb b/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/client_test.rb new file mode 100644 index 000000000000..98a56fcbb1d7 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/shopping/merchant/issue_resolution" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::IssueResolution::ClientConstructionMinitest < 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_issue_resolution_service_grpc + skip unless Google::Shopping::Merchant::IssueResolution.issue_resolution_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::IssueResolution.issue_resolution_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client, client + end + end + + def test_issue_resolution_service_rest + skip unless Google::Shopping::Merchant::IssueResolution.issue_resolution_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::IssueResolution.issue_resolution_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client, client + end + end +end diff --git a/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/version_test.rb b/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/version_test.rb new file mode 100644 index 000000000000..34a5e10d55d5 --- /dev/null +++ b/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/shopping/merchant/issue_resolution/version" + +class Google::Shopping::Merchant::IssueResolution::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::IssueResolution::VERSION + end +end diff --git a/google-shopping-merchant-issue_resolution/test/helper.rb b/google-shopping-merchant-issue_resolution/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-issue_resolution/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 36974456fc30..fa4d850a45b7 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1847,6 +1847,10 @@ "component": "google-shopping-merchant-inventories-v1beta", "version_file": "lib/google/shopping/merchant/inventories/v1beta/version.rb" }, + "google-shopping-merchant-issue_resolution": { + "component": "google-shopping-merchant-issue_resolution", + "version_file": "lib/google/shopping/merchant/issue_resolution/version.rb" + }, "google-shopping-merchant-issue_resolution-v1beta": { "component": "google-shopping-merchant-issue_resolution-v1beta", "version_file": "lib/google/shopping/merchant/issue_resolution/v1beta/version.rb" From 2c468b17719d73597002a8c443cadf865641a17f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 10:59:45 -0700 Subject: [PATCH 041/457] chore(main): release google-cloud-security_center 2.0.2 (#30462) --- .release-please-manifest.json | 2 +- google-cloud-security_center/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/security_center/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 66311e40a888..65bf8deecf0d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -677,7 +677,7 @@ "google-cloud-security-public_ca-v1+FILLER": "0.0.0", "google-cloud-security-public_ca-v1beta1": "0.9.0", "google-cloud-security-public_ca-v1beta1+FILLER": "0.0.0", - "google-cloud-security_center": "2.0.1", + "google-cloud-security_center": "2.0.2", "google-cloud-security_center+FILLER": "0.0.0", "google-cloud-security_center-v1": "1.5.0", "google-cloud-security_center-v1+FILLER": "0.0.0", diff --git a/google-cloud-security_center/CHANGELOG.md b/google-cloud-security_center/CHANGELOG.md index 796b436a9466..3fd7df1261a7 100644 --- a/google-cloud-security_center/CHANGELOG.md +++ b/google-cloud-security_center/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-security_center/lib/google/cloud/security_center/version.rb b/google-cloud-security_center/lib/google/cloud/security_center/version.rb index 4d25d5829568..b3c721e3ae19 100644 --- a/google-cloud-security_center/lib/google/cloud/security_center/version.rb +++ b/google-cloud-security_center/lib/google/cloud/security_center/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module SecurityCenter - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 1c38f1a389d5871514ae404ef879c868365905a3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 11:30:17 -0700 Subject: [PATCH 042/457] chore(main): release google-shopping-merchant-issue_resolution-v1beta 0.1.0 (#30476) --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- .../CHANGELOG.md | 9 ++++++++- .../shopping/merchant/issue_resolution/v1beta/version.rb | 2 +- ..._google.shopping.merchant.issueresolution.v1beta.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 65bf8deecf0d..56627ae91bce 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -919,7 +919,7 @@ "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution": "0.0.1", "google-shopping-merchant-issue_resolution+FILLER": "0.0.0", - "google-shopping-merchant-issue_resolution-v1beta": "0.0.1", + "google-shopping-merchant-issue_resolution-v1beta": "0.1.0", "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", "google-shopping-merchant-lfp": "0.3.1", "google-shopping-merchant-lfp+FILLER": "0.0.0", diff --git a/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json b/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json index b3093d31ccee..9d8a78c6a348 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json +++ b/google-shopping-merchant-issue_resolution-v1beta/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1BETA API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details.", diff --git a/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md b/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md index f88957a62ba2..9123b34fa919 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md +++ b/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-27) + +#### Features + +* Initial generation of google-shopping-merchant-issue_resolution-v1beta ([#30438](https://github.com/googleapis/google-cloud-ruby/issues/30438)) + +## Release History diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb index 4d3407d908e6..8d3b4ff9213e 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module IssueResolution module V1beta - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json b/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json index 166874f3ed72..08e429c4b265 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-issue_resolution-v1beta", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 4e1d13a95d45ca38faf10e5c6f5ab3e378d7a092 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 11:30:46 -0700 Subject: [PATCH 043/457] chore(main): release google-shopping-merchant-issue_resolution 0.1.0 (#30475) --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-shopping-merchant-issue_resolution/CHANGELOG.md | 9 ++++++++- .../google/shopping/merchant/issue_resolution/version.rb | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 56627ae91bce..48d223736cb8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -917,7 +917,7 @@ "google-shopping-merchant-inventories+FILLER": "0.0.0", "google-shopping-merchant-inventories-v1beta": "0.7.0", "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", - "google-shopping-merchant-issue_resolution": "0.0.1", + "google-shopping-merchant-issue_resolution": "0.1.0", "google-shopping-merchant-issue_resolution+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution-v1beta": "0.1.0", "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-issue_resolution/.repo-metadata.json b/google-shopping-merchant-issue_resolution/.repo-metadata.json index 85545df2a7ff..829ac509b0d6 100644 --- a/google-shopping-merchant-issue_resolution/.repo-metadata.json +++ b/google-shopping-merchant-issue_resolution/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.", diff --git a/google-shopping-merchant-issue_resolution/CHANGELOG.md b/google-shopping-merchant-issue_resolution/CHANGELOG.md index f88957a62ba2..46e151964f5c 100644 --- a/google-shopping-merchant-issue_resolution/CHANGELOG.md +++ b/google-shopping-merchant-issue_resolution/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-05-27) + +#### Features + +* Initial generation of google-shopping-merchant-issue_resolution ([#30439](https://github.com/googleapis/google-cloud-ruby/issues/30439)) + +## Release History diff --git a/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb index 47b3d0713fe8..508a3660bbb6 100644 --- a/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb +++ b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb @@ -21,7 +21,7 @@ module Google module Shopping module Merchant module IssueResolution - VERSION = "0.0.1" + VERSION = "0.1.0" end end end From fe1bbe2a0ebca3aa37abc07979cb22d94303e6cf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:00:16 -0700 Subject: [PATCH 044/457] chore(main): release google-shopping-merchant-accounts-v1beta 0.10.0 (#30474) --- .release-please-manifest.json | 2 +- google-shopping-merchant-accounts-v1beta/CHANGELOG.md | 9 +++++++++ .../google/shopping/merchant/accounts/v1beta/version.rb | 2 +- ...etadata_google.shopping.merchant.accounts.v1beta.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 48d223736cb8..75b0672fc6fe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -903,7 +903,7 @@ "google-shopping-css-v1+FILLER": "0.0.0", "google-shopping-merchant-accounts": "0.5.0", "google-shopping-merchant-accounts+FILLER": "0.0.0", - "google-shopping-merchant-accounts-v1beta": "0.9.0", + "google-shopping-merchant-accounts-v1beta": "0.10.0", "google-shopping-merchant-accounts-v1beta+FILLER": "0.0.0", "google-shopping-merchant-conversions": "0.2.1", "google-shopping-merchant-conversions+FILLER": "0.0.0", diff --git a/google-shopping-merchant-accounts-v1beta/CHANGELOG.md b/google-shopping-merchant-accounts-v1beta/CHANGELOG.md index 3a9d9533abfc..f084635b8267 100644 --- a/google-shopping-merchant-accounts-v1beta/CHANGELOG.md +++ b/google-shopping-merchant-accounts-v1beta/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 0.10.0 (2025-05-27) + +#### Features + +* Add new method signature `parent,online_return_policy` to `CreateOnlineReturnPolicy` ([#30431](https://github.com/googleapis/google-cloud-ruby/issues/30431)) +#### Documentation + +* Minor updates + ### 0.9.0 (2025-05-16) #### Features diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb index 678491fd1afe..1720dd6860e9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Accounts module V1beta - VERSION = "0.9.0" + VERSION = "0.10.0" end end end diff --git a/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json index 0f3a8d2192ee..d29720756629 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ b/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-accounts-v1beta", - "version": "0.9.0", + "version": "0.10.0", "language": "RUBY", "apis": [ { From 58aebcb4812358227fffab1f76f0d25ec072c6cf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:00:33 -0700 Subject: [PATCH 045/457] chore(main): release google-cloud-web_risk 2.0.2 (#30473) --- .release-please-manifest.json | 2 +- google-cloud-web_risk/CHANGELOG.md | 6 ++++++ google-cloud-web_risk/lib/google/cloud/web_risk/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 75b0672fc6fe..c1b2f5042140 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -841,7 +841,7 @@ "google-cloud-vpc_access+FILLER": "0.0.0", "google-cloud-vpc_access-v1": "1.3.0", "google-cloud-vpc_access-v1+FILLER": "0.0.0", - "google-cloud-web_risk": "2.0.1", + "google-cloud-web_risk": "2.0.2", "google-cloud-web_risk+FILLER": "0.0.0", "google-cloud-web_risk-v1": "1.4.0", "google-cloud-web_risk-v1+FILLER": "0.0.0", diff --git a/google-cloud-web_risk/CHANGELOG.md b/google-cloud-web_risk/CHANGELOG.md index 99605bac4c2c..7e1035f1a0bd 100644 --- a/google-cloud-web_risk/CHANGELOG.md +++ b/google-cloud-web_risk/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb b/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb index ebcfed2e3bbf..3efe623c9802 100644 --- a/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb +++ b/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module WebRisk - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 26be42ed06b091440526059b8b179e58be731805 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:00:53 -0700 Subject: [PATCH 046/457] chore(main): release google-cloud-vision 2.0.2 (#30472) --- .release-please-manifest.json | 2 +- google-cloud-vision/CHANGELOG.md | 6 ++++++ google-cloud-vision/lib/google/cloud/vision/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c1b2f5042140..966cafe1acc0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -817,7 +817,7 @@ "google-cloud-video_intelligence-v1p2beta1+FILLER": "0.0.0", "google-cloud-video_intelligence-v1p3beta1": "0.10.0", "google-cloud-video_intelligence-v1p3beta1+FILLER": "0.0.0", - "google-cloud-vision": "2.0.1", + "google-cloud-vision": "2.0.2", "google-cloud-vision+FILLER": "0.0.0", "google-cloud-vision-v1": "1.3.0", "google-cloud-vision-v1+FILLER": "0.0.0", diff --git a/google-cloud-vision/CHANGELOG.md b/google-cloud-vision/CHANGELOG.md index cdd7964b4216..601f964a8a42 100644 --- a/google-cloud-vision/CHANGELOG.md +++ b/google-cloud-vision/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-vision/lib/google/cloud/vision/version.rb b/google-cloud-vision/lib/google/cloud/vision/version.rb index 8eeca60a3062..3f86d88b3b60 100644 --- a/google-cloud-vision/lib/google/cloud/vision/version.rb +++ b/google-cloud-vision/lib/google/cloud/vision/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Vision - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 895a9b4d7e08ef993b9d6ffacff8b5e7ae5c4138 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:01:29 -0700 Subject: [PATCH 047/457] chore(main): release google-cloud-video_intelligence 4.0.2 (#30471) --- .release-please-manifest.json | 2 +- google-cloud-video_intelligence/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/video_intelligence/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 966cafe1acc0..67d7aa1a2e5c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -805,7 +805,7 @@ "google-cloud-video-transcoder+FILLER": "0.0.0", "google-cloud-video-transcoder-v1": "2.1.0", "google-cloud-video-transcoder-v1+FILLER": "0.0.0", - "google-cloud-video_intelligence": "4.0.1", + "google-cloud-video_intelligence": "4.0.2", "google-cloud-video_intelligence+FILLER": "0.0.0", "google-cloud-video_intelligence-v1": "1.3.0", "google-cloud-video_intelligence-v1+FILLER": "0.0.0", diff --git a/google-cloud-video_intelligence/CHANGELOG.md b/google-cloud-video_intelligence/CHANGELOG.md index 922c3edb8a31..c2c20c482f40 100644 --- a/google-cloud-video_intelligence/CHANGELOG.md +++ b/google-cloud-video_intelligence/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 4.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 4.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-video_intelligence/lib/google/cloud/video_intelligence/version.rb b/google-cloud-video_intelligence/lib/google/cloud/video_intelligence/version.rb index fc5a0695244d..57e81579efbd 100644 --- a/google-cloud-video_intelligence/lib/google/cloud/video_intelligence/version.rb +++ b/google-cloud-video_intelligence/lib/google/cloud/video_intelligence/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module VideoIntelligence - VERSION = "4.0.1" + VERSION = "4.0.2" end end end From 6020fdbb260f9cbfea9919373c1599c51d87532f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:02:08 -0700 Subject: [PATCH 048/457] chore(main): release google-cloud-text_to_speech 2.0.2 (#30469) --- .release-please-manifest.json | 2 +- google-cloud-text_to_speech/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/text_to_speech/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 67d7aa1a2e5c..d44581434385 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -771,7 +771,7 @@ "google-cloud-telco_automation+FILLER": "0.0.0", "google-cloud-telco_automation-v1": "2.1.0", "google-cloud-telco_automation-v1+FILLER": "0.0.0", - "google-cloud-text_to_speech": "2.0.1", + "google-cloud-text_to_speech": "2.0.2", "google-cloud-text_to_speech+FILLER": "0.0.0", "google-cloud-text_to_speech-v1": "1.9.0", "google-cloud-text_to_speech-v1+FILLER": "0.0.0", diff --git a/google-cloud-text_to_speech/CHANGELOG.md b/google-cloud-text_to_speech/CHANGELOG.md index 549d51133879..6a7a30b925d2 100644 --- a/google-cloud-text_to_speech/CHANGELOG.md +++ b/google-cloud-text_to_speech/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-text_to_speech/lib/google/cloud/text_to_speech/version.rb b/google-cloud-text_to_speech/lib/google/cloud/text_to_speech/version.rb index f60036423532..1c015ca22d0c 100644 --- a/google-cloud-text_to_speech/lib/google/cloud/text_to_speech/version.rb +++ b/google-cloud-text_to_speech/lib/google/cloud/text_to_speech/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module TextToSpeech - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 90143b3159a3258e264102e50a358820320bcbcc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:02:33 -0700 Subject: [PATCH 049/457] chore(main): release google-cloud-tasks 3.0.2 (#30468) --- .release-please-manifest.json | 2 +- google-cloud-tasks/CHANGELOG.md | 6 ++++++ google-cloud-tasks/lib/google/cloud/tasks/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d44581434385..19f6553dbe06 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -759,7 +759,7 @@ "google-cloud-talent-v4+FILLER": "0.0.0", "google-cloud-talent-v4beta1": "0.15.0", "google-cloud-talent-v4beta1+FILLER": "0.0.0", - "google-cloud-tasks": "3.0.1", + "google-cloud-tasks": "3.0.2", "google-cloud-tasks+FILLER": "0.0.0", "google-cloud-tasks-v2": "1.3.0", "google-cloud-tasks-v2+FILLER": "0.0.0", diff --git a/google-cloud-tasks/CHANGELOG.md b/google-cloud-tasks/CHANGELOG.md index 5895ca1b1f78..726e311c34e1 100644 --- a/google-cloud-tasks/CHANGELOG.md +++ b/google-cloud-tasks/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 3.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 3.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-tasks/lib/google/cloud/tasks/version.rb b/google-cloud-tasks/lib/google/cloud/tasks/version.rb index 6fe857833810..a7c4e0581ec9 100644 --- a/google-cloud-tasks/lib/google/cloud/tasks/version.rb +++ b/google-cloud-tasks/lib/google/cloud/tasks/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Tasks - VERSION = "3.0.1" + VERSION = "3.0.2" end end end From 670f6d4620192d2059f11500a21eb54363e445c9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:03:01 -0700 Subject: [PATCH 050/457] chore(main): release google-cloud-talent 2.0.2 (#30467) --- .release-please-manifest.json | 2 +- google-cloud-talent/CHANGELOG.md | 6 ++++++ google-cloud-talent/lib/google/cloud/talent/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 19f6553dbe06..4013950a0574 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -753,7 +753,7 @@ "google-cloud-support-v2+FILLER": "0.0.0", "google-cloud-support-v2beta": "0.1.0", "google-cloud-support-v2beta+FILLER": "0.0.0", - "google-cloud-talent": "2.0.1", + "google-cloud-talent": "2.0.2", "google-cloud-talent+FILLER": "0.0.0", "google-cloud-talent-v4": "1.4.0", "google-cloud-talent-v4+FILLER": "0.0.0", diff --git a/google-cloud-talent/CHANGELOG.md b/google-cloud-talent/CHANGELOG.md index 9ec7b95a9dd5..415b3b4551b7 100644 --- a/google-cloud-talent/CHANGELOG.md +++ b/google-cloud-talent/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-talent/lib/google/cloud/talent/version.rb b/google-cloud-talent/lib/google/cloud/talent/version.rb index 92f5953caedc..676ca89f3462 100644 --- a/google-cloud-talent/lib/google/cloud/talent/version.rb +++ b/google-cloud-talent/lib/google/cloud/talent/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Talent - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 0dbf86f0541954d93e34a79fd91d338e4eb50ff1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:04:01 -0700 Subject: [PATCH 051/457] chore(main): release grafeas 1.5.2 (#30477) --- .release-please-manifest.json | 2 +- grafeas/CHANGELOG.md | 6 ++++++ grafeas/lib/grafeas/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4013950a0574..b95c8605e9a8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -953,7 +953,7 @@ "google-shopping-merchant-reviews+FILLER": "0.0.0", "google-shopping-merchant-reviews-v1beta": "0.3.0", "google-shopping-merchant-reviews-v1beta+FILLER": "0.0.0", - "grafeas": "1.5.1", + "grafeas": "1.5.2", "grafeas+FILLER": "0.0.0", "grafeas-v1": "1.4.0", "grafeas-v1+FILLER": "0.0.0", diff --git a/grafeas/CHANGELOG.md b/grafeas/CHANGELOG.md index 4479ae5286f1..cad55e89d9b0 100644 --- a/grafeas/CHANGELOG.md +++ b/grafeas/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.5.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 1.5.1 (2025-04-29) #### Bug Fixes diff --git a/grafeas/lib/grafeas/version.rb b/grafeas/lib/grafeas/version.rb index 2d6b39c509fc..acc3f00493a7 100644 --- a/grafeas/lib/grafeas/version.rb +++ b/grafeas/lib/grafeas/version.rb @@ -18,5 +18,5 @@ module Grafeas - VERSION = "1.5.1" + VERSION = "1.5.2" end From 9f0a667d8814deaab823bcf96f5071f0c46c3d94 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:04:15 -0700 Subject: [PATCH 052/457] chore(main): release google-cloud-translate 3.7.2 (#30470) --- .release-please-manifest.json | 2 +- google-cloud-translate/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/translate/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b95c8605e9a8..f9c46ea38f5b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -787,7 +787,7 @@ "google-cloud-trace-v1+FILLER": "0.0.0", "google-cloud-trace-v2": "1.3.0", "google-cloud-trace-v2+FILLER": "0.0.0", - "google-cloud-translate": "3.7.1", + "google-cloud-translate": "3.7.2", "google-cloud-translate+FILLER": "0.0.0", "google-cloud-translate-v2": "1.1.0", "google-cloud-translate-v2+FILLER": "0.0.0", diff --git a/google-cloud-translate/CHANGELOG.md b/google-cloud-translate/CHANGELOG.md index c96d5ee41557..456aef0228cf 100644 --- a/google-cloud-translate/CHANGELOG.md +++ b/google-cloud-translate/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 3.7.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 3.7.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-translate/lib/google/cloud/translate/version.rb b/google-cloud-translate/lib/google/cloud/translate/version.rb index 846439bb1946..403e7b312e8d 100644 --- a/google-cloud-translate/lib/google/cloud/translate/version.rb +++ b/google-cloud-translate/lib/google/cloud/translate/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Translate - VERSION = "3.7.1" + VERSION = "3.7.2" end end end From b00f306e0b8394b3618c842f2b2e44eee842c3cf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:06:30 -0700 Subject: [PATCH 053/457] chore(main): release google-cloud-support-v2beta 0.1.1 (#30466) --- .release-please-manifest.json | 2 +- google-cloud-support-v2beta/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/support/v2beta/version.rb | 2 +- .../snippet_metadata_google.cloud.support.v2beta.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f9c46ea38f5b..036946b90f6e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -751,7 +751,7 @@ "google-cloud-support+FILLER": "0.0.0", "google-cloud-support-v2": "1.4.0", "google-cloud-support-v2+FILLER": "0.0.0", - "google-cloud-support-v2beta": "0.1.0", + "google-cloud-support-v2beta": "0.1.1", "google-cloud-support-v2beta+FILLER": "0.0.0", "google-cloud-talent": "2.0.2", "google-cloud-talent+FILLER": "0.0.0", diff --git a/google-cloud-support-v2beta/CHANGELOG.md b/google-cloud-support-v2beta/CHANGELOG.md index 520602898ad0..2c7ae2ceb502 100644 --- a/google-cloud-support-v2beta/CHANGELOG.md +++ b/google-cloud-support-v2beta/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 0.1.1 (2025-05-27) + +#### Documentation + +* Minor updates +* Remove unnecessary curl and Python documentation ([#30430](https://github.com/googleapis/google-cloud-ruby/issues/30430)) + ### 0.1.0 (2025-05-16) #### Features diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/version.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/version.rb index f31bf448dbda..dcef78e77fe0 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/version.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Support module V2beta - VERSION = "0.1.0" + VERSION = "0.1.1" end end end diff --git a/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json b/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json index 9ebdfab47665..8a07180f0705 100644 --- a/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json +++ b/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-support-v2beta", - "version": "0.1.0", + "version": "0.1.1", "language": "RUBY", "apis": [ { From 53b873a8e3d1c2c6dcb3e7617193bf28f4e105b1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:07:06 -0700 Subject: [PATCH 054/457] chore(main): release google-cloud-support-v2 1.4.1 (#30465) --- .release-please-manifest.json | 2 +- google-cloud-support-v2/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/support/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.support.v2.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 036946b90f6e..eb555ac6d947 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -749,7 +749,7 @@ "google-cloud-storage_transfer-v1+FILLER": "0.0.0", "google-cloud-support": "1.1.2", "google-cloud-support+FILLER": "0.0.0", - "google-cloud-support-v2": "1.4.0", + "google-cloud-support-v2": "1.4.1", "google-cloud-support-v2+FILLER": "0.0.0", "google-cloud-support-v2beta": "0.1.1", "google-cloud-support-v2beta+FILLER": "0.0.0", diff --git a/google-cloud-support-v2/CHANGELOG.md b/google-cloud-support-v2/CHANGELOG.md index b247c2ad840d..9167f8fe141c 100644 --- a/google-cloud-support-v2/CHANGELOG.md +++ b/google-cloud-support-v2/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 1.4.1 (2025-05-27) + +#### Documentation + +* Minor updates +* Update Cloud Support RPC comments to no longer include cURL and Python examples ([#30428](https://github.com/googleapis/google-cloud-ruby/issues/30428)) + ### 1.4.0 (2025-05-16) #### Features diff --git a/google-cloud-support-v2/lib/google/cloud/support/v2/version.rb b/google-cloud-support-v2/lib/google/cloud/support/v2/version.rb index 9df95b4e7432..467893b85ba3 100644 --- a/google-cloud-support-v2/lib/google/cloud/support/v2/version.rb +++ b/google-cloud-support-v2/lib/google/cloud/support/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Support module V2 - VERSION = "1.4.0" + VERSION = "1.4.1" end end end diff --git a/google-cloud-support-v2/snippets/snippet_metadata_google.cloud.support.v2.json b/google-cloud-support-v2/snippets/snippet_metadata_google.cloud.support.v2.json index c33f12fd215e..88e0a53d7744 100644 --- a/google-cloud-support-v2/snippets/snippet_metadata_google.cloud.support.v2.json +++ b/google-cloud-support-v2/snippets/snippet_metadata_google.cloud.support.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-support-v2", - "version": "1.4.0", + "version": "1.4.1", "language": "RUBY", "apis": [ { From d0e04e622afb3abddff35cb03adde026e3b8b124 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:55:04 -0700 Subject: [PATCH 055/457] chore(main): release google-cloud-scheduler 3.0.2 (#30461) --- .release-please-manifest.json | 2 +- google-cloud-scheduler/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/scheduler/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index eb555ac6d947..98d54a63e027 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -647,7 +647,7 @@ "google-cloud-run-client+FILLER": "0.0.0", "google-cloud-run-v2": "0.24.0", "google-cloud-run-v2+FILLER": "0.0.0", - "google-cloud-scheduler": "3.0.1", + "google-cloud-scheduler": "3.0.2", "google-cloud-scheduler+FILLER": "0.0.0", "google-cloud-scheduler-v1": "1.3.0", "google-cloud-scheduler-v1+FILLER": "0.0.0", diff --git a/google-cloud-scheduler/CHANGELOG.md b/google-cloud-scheduler/CHANGELOG.md index fe84e5808aa6..e8a696f0048c 100644 --- a/google-cloud-scheduler/CHANGELOG.md +++ b/google-cloud-scheduler/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 3.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 3.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb b/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb index 05dc7dbd672a..aca9ab158cb6 100644 --- a/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb +++ b/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Scheduler - VERSION = "3.0.1" + VERSION = "3.0.2" end end end From ec76d1ce6f34c3190b9afb222137e94edd52e1b1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:55:20 -0700 Subject: [PATCH 056/457] chore(main): release google-cloud-resource_manager 1.0.2 (#30460) --- .release-please-manifest.json | 2 +- google-cloud-resource_manager/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/resource_manager/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 98d54a63e027..383c1a48624b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -635,7 +635,7 @@ "google-cloud-redis-v1+FILLER": "0.0.0", "google-cloud-redis-v1beta1": "0.17.0", "google-cloud-redis-v1beta1+FILLER": "0.0.0", - "google-cloud-resource_manager": "1.0.1", + "google-cloud-resource_manager": "1.0.2", "google-cloud-resource_manager+FILLER": "0.0.0", "google-cloud-resource_manager-v3": "1.3.0", "google-cloud-resource_manager-v3+FILLER": "0.0.0", diff --git a/google-cloud-resource_manager/CHANGELOG.md b/google-cloud-resource_manager/CHANGELOG.md index c8d64d13a486..c1afeb75d240 100644 --- a/google-cloud-resource_manager/CHANGELOG.md +++ b/google-cloud-resource_manager/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 1.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb b/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb index dbefaf111057..777425a6c1b4 100644 --- a/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb +++ b/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module ResourceManager - VERSION = "1.0.1" + VERSION = "1.0.2" end end end From d67fbee7022173410f059bbc453057cd84d24e94 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:55:37 -0700 Subject: [PATCH 057/457] chore(main): release google-cloud-redis 2.0.2 (#30459) --- .release-please-manifest.json | 2 +- google-cloud-redis/CHANGELOG.md | 6 ++++++ google-cloud-redis/lib/google/cloud/redis/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 383c1a48624b..f20092310d22 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -623,7 +623,7 @@ "google-cloud-recommender+FILLER": "0.0.0", "google-cloud-recommender-v1": "1.3.0", "google-cloud-recommender-v1+FILLER": "0.0.0", - "google-cloud-redis": "2.0.1", + "google-cloud-redis": "2.0.2", "google-cloud-redis+FILLER": "0.0.0", "google-cloud-redis-cluster": "2.0.1", "google-cloud-redis-cluster+FILLER": "0.0.0", diff --git a/google-cloud-redis/CHANGELOG.md b/google-cloud-redis/CHANGELOG.md index b0ae395ff428..44c302d4cc50 100644 --- a/google-cloud-redis/CHANGELOG.md +++ b/google-cloud-redis/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-redis/lib/google/cloud/redis/version.rb b/google-cloud-redis/lib/google/cloud/redis/version.rb index 192df6e55721..36cce4ea1493 100644 --- a/google-cloud-redis/lib/google/cloud/redis/version.rb +++ b/google-cloud-redis/lib/google/cloud/redis/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Redis - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 2c32a72f0c7d96e6c33d464483a6de4a405ed0e7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:55:51 -0700 Subject: [PATCH 058/457] chore(main): release google-cloud-phishing_protection 0.16.2 (#30457) --- .release-please-manifest.json | 2 +- google-cloud-phishing_protection/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/phishing_protection/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f20092310d22..77fd339c92e1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -575,7 +575,7 @@ "google-cloud-parameter_manager+FILLER": "0.0.0", "google-cloud-parameter_manager-v1": "0.3.0", "google-cloud-parameter_manager-v1+FILLER": "0.0.0", - "google-cloud-phishing_protection": "0.16.1", + "google-cloud-phishing_protection": "0.16.2", "google-cloud-phishing_protection+FILLER": "0.0.0", "google-cloud-phishing_protection-v1beta1": "0.12.0", "google-cloud-phishing_protection-v1beta1+FILLER": "0.0.0", diff --git a/google-cloud-phishing_protection/CHANGELOG.md b/google-cloud-phishing_protection/CHANGELOG.md index f5520f30388d..3789d178b4d6 100644 --- a/google-cloud-phishing_protection/CHANGELOG.md +++ b/google-cloud-phishing_protection/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 0.16.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 0.16.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-phishing_protection/lib/google/cloud/phishing_protection/version.rb b/google-cloud-phishing_protection/lib/google/cloud/phishing_protection/version.rb index b03829290933..3bd0767e45e3 100644 --- a/google-cloud-phishing_protection/lib/google/cloud/phishing_protection/version.rb +++ b/google-cloud-phishing_protection/lib/google/cloud/phishing_protection/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module PhishingProtection - VERSION = "0.16.1" + VERSION = "0.16.2" end end end From ccbf6b7376fe0528535b75b85ea3ffdff08a3491 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:56:09 -0700 Subject: [PATCH 059/457] chore(main): release google-cloud-os_login 2.0.2 (#30456) --- .release-please-manifest.json | 2 +- google-cloud-os_login/CHANGELOG.md | 6 ++++++ google-cloud-os_login/lib/google/cloud/os_login/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 77fd339c92e1..a4ccbca011d2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -559,7 +559,7 @@ "google-cloud-os_config-v1+FILLER": "0.0.0", "google-cloud-os_config-v1alpha": "0.12.0", "google-cloud-os_config-v1alpha+FILLER": "0.0.0", - "google-cloud-os_login": "2.0.1", + "google-cloud-os_login": "2.0.2", "google-cloud-os_login+FILLER": "0.0.0", "google-cloud-os_login-v1": "1.3.0", "google-cloud-os_login-v1+FILLER": "0.0.0", diff --git a/google-cloud-os_login/CHANGELOG.md b/google-cloud-os_login/CHANGELOG.md index 4c28ccb9df66..0c820de37c6c 100644 --- a/google-cloud-os_login/CHANGELOG.md +++ b/google-cloud-os_login/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-os_login/lib/google/cloud/os_login/version.rb b/google-cloud-os_login/lib/google/cloud/os_login/version.rb index 8d5fa1a447e2..82d80e134b0c 100644 --- a/google-cloud-os_login/lib/google/cloud/os_login/version.rb +++ b/google-cloud-os_login/lib/google/cloud/os_login/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module OsLogin - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 3b6d94fdb47832b094af1828ccce0af1933032aa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:56:27 -0700 Subject: [PATCH 060/457] chore(main): release google-cloud-monitoring 1.9.2 (#30455) --- .release-please-manifest.json | 2 +- google-cloud-monitoring/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/monitoring/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a4ccbca011d2..2a5314d26bfa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -499,7 +499,7 @@ "google-cloud-migration_center+FILLER": "0.0.0", "google-cloud-migration_center-v1": "2.1.0", "google-cloud-migration_center-v1+FILLER": "0.0.0", - "google-cloud-monitoring": "1.9.1", + "google-cloud-monitoring": "1.9.2", "google-cloud-monitoring+FILLER": "0.0.0", "google-cloud-monitoring-dashboard-v1": "1.3.0", "google-cloud-monitoring-dashboard-v1+FILLER": "0.0.0", diff --git a/google-cloud-monitoring/CHANGELOG.md b/google-cloud-monitoring/CHANGELOG.md index 422b4b656a7c..c0feb7ad2ae5 100644 --- a/google-cloud-monitoring/CHANGELOG.md +++ b/google-cloud-monitoring/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.9.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 1.9.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-monitoring/lib/google/cloud/monitoring/version.rb b/google-cloud-monitoring/lib/google/cloud/monitoring/version.rb index 371f212522fc..45737efdc27b 100644 --- a/google-cloud-monitoring/lib/google/cloud/monitoring/version.rb +++ b/google-cloud-monitoring/lib/google/cloud/monitoring/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Monitoring - VERSION = "1.9.1" + VERSION = "1.9.2" end end end From 12c36581e8414d7043d984d95b3cfdf1d84c394a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:56:49 -0700 Subject: [PATCH 061/457] chore(main): release google-cloud-speech 2.0.2 (#30464) --- .release-please-manifest.json | 2 +- google-cloud-speech/CHANGELOG.md | 6 ++++++ google-cloud-speech/lib/google/cloud/speech/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2a5314d26bfa..1c776012bf3a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -721,7 +721,7 @@ "google-cloud-spanner-admin-instance-v1+FILLER": "0.0.0", "google-cloud-spanner-v1": "1.8.0", "google-cloud-spanner-v1+FILLER": "0.0.0", - "google-cloud-speech": "2.0.1", + "google-cloud-speech": "2.0.2", "google-cloud-speech+FILLER": "0.0.0", "google-cloud-speech-v1": "1.3.0", "google-cloud-speech-v1+FILLER": "0.0.0", diff --git a/google-cloud-speech/CHANGELOG.md b/google-cloud-speech/CHANGELOG.md index 2d5df7986788..bf8888261e7f 100644 --- a/google-cloud-speech/CHANGELOG.md +++ b/google-cloud-speech/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-speech/lib/google/cloud/speech/version.rb b/google-cloud-speech/lib/google/cloud/speech/version.rb index c7dd7c032287..10f9bce18069 100644 --- a/google-cloud-speech/lib/google/cloud/speech/version.rb +++ b/google-cloud-speech/lib/google/cloud/speech/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Speech - VERSION = "2.0.1".freeze + VERSION = "2.0.2".freeze end end end From bb0c4e16296f22bee441c6b46a0d472ece449a48 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:57:16 -0700 Subject: [PATCH 062/457] chore(main): release google-cloud-dlp 1.8.2 (#30451) --- .release-please-manifest.json | 2 +- google-cloud-dlp/CHANGELOG.md | 6 ++++++ google-cloud-dlp/lib/google/cloud/dlp/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1c776012bf3a..b796336d0e5a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -333,7 +333,7 @@ "google-cloud-discovery_engine-v1+FILLER": "0.0.0", "google-cloud-discovery_engine-v1beta": "0.20.0", "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", - "google-cloud-dlp": "1.8.1", + "google-cloud-dlp": "1.8.2", "google-cloud-dlp+FILLER": "0.0.0", "google-cloud-dlp-v2": "1.10.0", "google-cloud-dlp-v2+FILLER": "0.0.0", diff --git a/google-cloud-dlp/CHANGELOG.md b/google-cloud-dlp/CHANGELOG.md index 634fd3fbff64..da2d49231695 100644 --- a/google-cloud-dlp/CHANGELOG.md +++ b/google-cloud-dlp/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.8.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 1.8.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-dlp/lib/google/cloud/dlp/version.rb b/google-cloud-dlp/lib/google/cloud/dlp/version.rb index 6ebbd94c9b1e..c3493c906727 100644 --- a/google-cloud-dlp/lib/google/cloud/dlp/version.rb +++ b/google-cloud-dlp/lib/google/cloud/dlp/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Dlp - VERSION = "1.8.1" + VERSION = "1.8.2" end end end From ba5eaf6ecd27975b80122231e20548655a1808d6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:57:53 -0700 Subject: [PATCH 063/457] chore(main): release google-cloud-container 2.0.2 (#30447) --- .release-please-manifest.json | 2 +- google-cloud-container/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/container/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b796336d0e5a..355ff6ee0289 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -241,7 +241,7 @@ "google-cloud-contact_center_insights+FILLER": "0.0.0", "google-cloud-contact_center_insights-v1": "1.6.0", "google-cloud-contact_center_insights-v1+FILLER": "0.0.0", - "google-cloud-container": "2.0.1", + "google-cloud-container": "2.0.2", "google-cloud-container+FILLER": "0.0.0", "google-cloud-container-v1": "1.7.0", "google-cloud-container-v1+FILLER": "0.0.0", diff --git a/google-cloud-container/CHANGELOG.md b/google-cloud-container/CHANGELOG.md index 68e93977368a..b086acafb2fa 100644 --- a/google-cloud-container/CHANGELOG.md +++ b/google-cloud-container/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-container/lib/google/cloud/container/version.rb b/google-cloud-container/lib/google/cloud/container/version.rb index 9ecc7bc75c53..bd2926686df1 100644 --- a/google-cloud-container/lib/google/cloud/container/version.rb +++ b/google-cloud-container/lib/google/cloud/container/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Container - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 8762eab8cba904ad50fefea05a1e098d37d24057 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:58:36 -0700 Subject: [PATCH 064/457] chore(main): release google-cloud-dataproc 2.7.2 (#30449) --- .release-please-manifest.json | 2 +- google-cloud-dataproc/CHANGELOG.md | 6 ++++++ google-cloud-dataproc/lib/google/cloud/dataproc/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 355ff6ee0289..6ce28e103bd4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -285,7 +285,7 @@ "google-cloud-dataplex+FILLER": "0.0.0", "google-cloud-dataplex-v1": "2.4.1", "google-cloud-dataplex-v1+FILLER": "0.0.0", - "google-cloud-dataproc": "2.7.1", + "google-cloud-dataproc": "2.7.2", "google-cloud-dataproc+FILLER": "0.0.0", "google-cloud-dataproc-v1": "1.4.0", "google-cloud-dataproc-v1+FILLER": "0.0.0", diff --git a/google-cloud-dataproc/CHANGELOG.md b/google-cloud-dataproc/CHANGELOG.md index 7c749ee538aa..9cd068bac2d5 100644 --- a/google-cloud-dataproc/CHANGELOG.md +++ b/google-cloud-dataproc/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.7.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.7.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-dataproc/lib/google/cloud/dataproc/version.rb b/google-cloud-dataproc/lib/google/cloud/dataproc/version.rb index fa1922754a13..b15f32da8404 100644 --- a/google-cloud-dataproc/lib/google/cloud/dataproc/version.rb +++ b/google-cloud-dataproc/lib/google/cloud/dataproc/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Dataproc - VERSION = "2.7.1" + VERSION = "2.7.2" end end end From cbc2da9a796f145d770fa13e792912ced3d3c124 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:00:22 -0700 Subject: [PATCH 065/457] chore(main): release google-cloud-ai_platform-v1 1.14.0 (#30443) --- .release-please-manifest.json | 2 +- google-cloud-ai_platform-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/ai_platform/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6ce28e103bd4..33c3a460ee85 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -43,7 +43,7 @@ "google-cloud-advisory_notifications-v1+FILLER": "0.0.0", "google-cloud-ai_platform": "2.0.1", "google-cloud-ai_platform+FILLER": "0.0.0", - "google-cloud-ai_platform-v1": "1.13.0", + "google-cloud-ai_platform-v1": "1.14.0", "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", diff --git a/google-cloud-ai_platform-v1/CHANGELOG.md b/google-cloud-ai_platform-v1/CHANGELOG.md index fcb3190c7937..2a8a521d315c 100644 --- a/google-cloud-ai_platform-v1/CHANGELOG.md +++ b/google-cloud-ai_platform-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.14.0 (2025-05-27) + +#### Features + +* add max_results, filter, data_store_specs options to VertexAISearch. ([#30429](https://github.com/googleapis/google-cloud-ruby/issues/30429)) + ### 1.13.0 (2025-05-22) #### Features diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb index e80998db26a6..1f7b5cca10ff 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AIPlatform module V1 - VERSION = "1.13.0" + VERSION = "1.14.0" end end end diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index 89681f2a9e77..ce97c6ee2e60 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-ai_platform-v1", - "version": "1.13.0", + "version": "1.14.0", "language": "RUBY", "apis": [ { From e6dbb040924eb52265e6d4c2168e12da933005a1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:00:41 -0700 Subject: [PATCH 066/457] chore(main): release google-cloud-asset 1.8.2 (#30444) --- .release-please-manifest.json | 2 +- google-cloud-asset/CHANGELOG.md | 6 ++++++ google-cloud-asset/lib/google/cloud/asset/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 33c3a460ee85..6c2491b1df4f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -87,7 +87,7 @@ "google-cloud-artifact_registry-v1+FILLER": "0.0.0", "google-cloud-artifact_registry-v1beta2": "0.15.0", "google-cloud-artifact_registry-v1beta2+FILLER": "0.0.0", - "google-cloud-asset": "1.8.1", + "google-cloud-asset": "1.8.2", "google-cloud-asset+FILLER": "0.0.0", "google-cloud-asset-v1": "1.4.0", "google-cloud-asset-v1+FILLER": "0.0.0", diff --git a/google-cloud-asset/CHANGELOG.md b/google-cloud-asset/CHANGELOG.md index a7263febe76b..a38fef14ed9d 100644 --- a/google-cloud-asset/CHANGELOG.md +++ b/google-cloud-asset/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.8.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 1.8.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-asset/lib/google/cloud/asset/version.rb b/google-cloud-asset/lib/google/cloud/asset/version.rb index ac0606b5a378..53b1b1574e4c 100644 --- a/google-cloud-asset/lib/google/cloud/asset/version.rb +++ b/google-cloud-asset/lib/google/cloud/asset/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Asset - VERSION = "1.8.1".freeze + VERSION = "1.8.2".freeze end end end From ff539e4da06dfb7b616f53f0907aa7bc1d16acfa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:00:55 -0700 Subject: [PATCH 067/457] chore(main): release google-cloud-automl 2.0.2 (#30445) --- .release-please-manifest.json | 2 +- google-cloud-automl/CHANGELOG.md | 6 ++++++ google-cloud-automl/lib/google/cloud/automl/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6c2491b1df4f..693a2f15265e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -97,7 +97,7 @@ "google-cloud-assured_workloads-v1+FILLER": "0.0.0", "google-cloud-assured_workloads-v1beta1": "0.21.0", "google-cloud-assured_workloads-v1beta1+FILLER": "0.0.0", - "google-cloud-automl": "2.0.1", + "google-cloud-automl": "2.0.2", "google-cloud-automl+FILLER": "0.0.0", "google-cloud-automl-v1": "1.3.0", "google-cloud-automl-v1+FILLER": "0.0.0", diff --git a/google-cloud-automl/CHANGELOG.md b/google-cloud-automl/CHANGELOG.md index 0778a9e581a5..d287c4bd1061 100644 --- a/google-cloud-automl/CHANGELOG.md +++ b/google-cloud-automl/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-automl/lib/google/cloud/automl/version.rb b/google-cloud-automl/lib/google/cloud/automl/version.rb index 0cc687ec54c1..bb595749e820 100644 --- a/google-cloud-automl/lib/google/cloud/automl/version.rb +++ b/google-cloud-automl/lib/google/cloud/automl/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module AutoML - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 7f37b7bd01f9b995d5297c3a284449fbdcb5dd1e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:01:10 -0700 Subject: [PATCH 068/457] chore(main): release google-cloud-bigquery-data_transfer 1.7.2 (#30446) --- .release-please-manifest.json | 2 +- google-cloud-bigquery-data_transfer/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/bigquery/data_transfer/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 693a2f15265e..4af027edae30 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -145,7 +145,7 @@ "google-cloud-bigquery-data_policies-v1+FILLER": "0.0.0", "google-cloud-bigquery-data_policies-v1beta1": "0.8.0", "google-cloud-bigquery-data_policies-v1beta1+FILLER": "0.0.0", - "google-cloud-bigquery-data_transfer": "1.7.1", + "google-cloud-bigquery-data_transfer": "1.7.2", "google-cloud-bigquery-data_transfer+FILLER": "0.0.0", "google-cloud-bigquery-data_transfer-v1": "1.4.0", "google-cloud-bigquery-data_transfer-v1+FILLER": "0.0.0", diff --git a/google-cloud-bigquery-data_transfer/CHANGELOG.md b/google-cloud-bigquery-data_transfer/CHANGELOG.md index 0f466941cfd6..19ccfc7e856c 100644 --- a/google-cloud-bigquery-data_transfer/CHANGELOG.md +++ b/google-cloud-bigquery-data_transfer/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.7.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 1.7.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-bigquery-data_transfer/lib/google/cloud/bigquery/data_transfer/version.rb b/google-cloud-bigquery-data_transfer/lib/google/cloud/bigquery/data_transfer/version.rb index 22a673a1584c..2a4d67e61463 100644 --- a/google-cloud-bigquery-data_transfer/lib/google/cloud/bigquery/data_transfer/version.rb +++ b/google-cloud-bigquery-data_transfer/lib/google/cloud/bigquery/data_transfer/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Bigquery module DataTransfer - VERSION = "1.7.1" + VERSION = "1.7.2" end end end From 470126d8e9111117ad60a830a741f2d1e4c57c18 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:02:19 -0700 Subject: [PATCH 069/457] chore(main): release google-cloud-managed_kafka-v1 1.3.0 (#30454) --- .release-please-manifest.json | 2 +- google-cloud-managed_kafka-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/managed_kafka/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.managedkafka.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4af027edae30..c77df06227ba 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -471,7 +471,7 @@ "google-cloud-managed_identities-v1+FILLER": "0.0.0", "google-cloud-managed_kafka": "2.1.1", "google-cloud-managed_kafka+FILLER": "0.0.0", - "google-cloud-managed_kafka-v1": "1.2.0", + "google-cloud-managed_kafka-v1": "1.3.0", "google-cloud-managed_kafka-v1+FILLER": "0.0.0", "google-cloud-media_translation": "0.6.1", "google-cloud-media_translation+FILLER": "0.0.0", diff --git a/google-cloud-managed_kafka-v1/CHANGELOG.md b/google-cloud-managed_kafka-v1/CHANGELOG.md index a39ac155eb3c..8bc4eedda345 100644 --- a/google-cloud-managed_kafka-v1/CHANGELOG.md +++ b/google-cloud-managed_kafka-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.3.0 (2025-05-27) + +#### Features + +* add Managed Kafka ACL API ([#30437](https://github.com/googleapis/google-cloud-ruby/issues/30437)) + ### 1.2.0 (2025-05-12) #### Features diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/version.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/version.rb index 6ce7afd1d028..d3498266ed06 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/version.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module ManagedKafka module V1 - VERSION = "1.2.0" + VERSION = "1.3.0" end end end diff --git a/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json b/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json index 133c2e4e75b0..929a305ef288 100644 --- a/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json +++ b/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-managed_kafka-v1", - "version": "1.2.0", + "version": "1.3.0", "language": "RUBY", "apis": [ { From e3b77b09934ba262dba35d3cae6a8a05afba7d16 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:02:33 -0700 Subject: [PATCH 070/457] chore(main): release google-cloud-language 2.0.2 (#30453) --- .release-please-manifest.json | 2 +- google-cloud-language/CHANGELOG.md | 6 ++++++ google-cloud-language/lib/google/cloud/language/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c77df06227ba..2b386864bef8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -443,7 +443,7 @@ "google-cloud-kms-inventory-v1+FILLER": "0.0.0", "google-cloud-kms-v1": "1.7.0", "google-cloud-kms-v1+FILLER": "0.0.0", - "google-cloud-language": "2.0.1", + "google-cloud-language": "2.0.2", "google-cloud-language+FILLER": "0.0.0", "google-cloud-language-v1": "1.3.0", "google-cloud-language-v1+FILLER": "0.0.0", diff --git a/google-cloud-language/CHANGELOG.md b/google-cloud-language/CHANGELOG.md index 7590bc5681e8..d167ee617a0a 100644 --- a/google-cloud-language/CHANGELOG.md +++ b/google-cloud-language/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-language/lib/google/cloud/language/version.rb b/google-cloud-language/lib/google/cloud/language/version.rb index 4b30f3c86d62..455344ae61ff 100644 --- a/google-cloud-language/lib/google/cloud/language/version.rb +++ b/google-cloud-language/lib/google/cloud/language/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Language - VERSION = "2.0.1".freeze + VERSION = "2.0.2".freeze end end end From fe943c5006c34b71cb794d822decf00daed145d3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:02:48 -0700 Subject: [PATCH 071/457] chore(main): release google-cloud-kms 2.9.2 (#30452) --- .release-please-manifest.json | 2 +- google-cloud-kms/CHANGELOG.md | 6 ++++++ google-cloud-kms/lib/google/cloud/kms/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2b386864bef8..65cfbefd4adc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -435,7 +435,7 @@ "google-cloud-ids+FILLER": "0.0.0", "google-cloud-ids-v1": "2.1.0", "google-cloud-ids-v1+FILLER": "0.0.0", - "google-cloud-kms": "2.9.1", + "google-cloud-kms": "2.9.2", "google-cloud-kms+FILLER": "0.0.0", "google-cloud-kms-inventory": "1.3.1", "google-cloud-kms-inventory+FILLER": "0.0.0", diff --git a/google-cloud-kms/CHANGELOG.md b/google-cloud-kms/CHANGELOG.md index ee0e95bcea1a..c87581e39dfd 100644 --- a/google-cloud-kms/CHANGELOG.md +++ b/google-cloud-kms/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.9.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.9.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-kms/lib/google/cloud/kms/version.rb b/google-cloud-kms/lib/google/cloud/kms/version.rb index 6717d9db2e73..a0eeef8e032c 100644 --- a/google-cloud-kms/lib/google/cloud/kms/version.rb +++ b/google-cloud-kms/lib/google/cloud/kms/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module Kms - VERSION = "2.9.1" + VERSION = "2.9.2" end end end From 8bec63a36ec2e8fddc4e751caa85905e2081dc5e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:03:04 -0700 Subject: [PATCH 072/457] chore(main): release google-cloud-dialogflow 1.11.2 (#30450) --- .release-please-manifest.json | 2 +- google-cloud-dialogflow/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/dialogflow/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 65cfbefd4adc..4dd3b4235f15 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -319,7 +319,7 @@ "google-cloud-device_streaming+FILLER": "0.0.0", "google-cloud-device_streaming-v1": "0.1.0", "google-cloud-device_streaming-v1+FILLER": "0.0.0", - "google-cloud-dialogflow": "1.11.1", + "google-cloud-dialogflow": "1.11.2", "google-cloud-dialogflow+FILLER": "0.0.0", "google-cloud-dialogflow-cx": "1.3.1", "google-cloud-dialogflow-cx+FILLER": "0.0.0", diff --git a/google-cloud-dialogflow/CHANGELOG.md b/google-cloud-dialogflow/CHANGELOG.md index a91c00ad8f7b..b9a0581801db 100644 --- a/google-cloud-dialogflow/CHANGELOG.md +++ b/google-cloud-dialogflow/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.11.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 1.11.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-dialogflow/lib/google/cloud/dialogflow/version.rb b/google-cloud-dialogflow/lib/google/cloud/dialogflow/version.rb index 92c06d550bd6..7698a8924fc0 100644 --- a/google-cloud-dialogflow/lib/google/cloud/dialogflow/version.rb +++ b/google-cloud-dialogflow/lib/google/cloud/dialogflow/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Dialogflow - VERSION = "1.11.1".freeze + VERSION = "1.11.2".freeze end end end From 91325ed83cbce0b219b85347c1317febe8b51607 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:03:20 -0700 Subject: [PATCH 073/457] chore(main): release google-cloud-container_analysis 1.5.2 (#30448) --- .release-please-manifest.json | 2 +- google-cloud-container_analysis/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/container_analysis/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4dd3b4235f15..33a15b967fcc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -247,7 +247,7 @@ "google-cloud-container-v1+FILLER": "0.0.0", "google-cloud-container-v1beta1": "0.46.0", "google-cloud-container-v1beta1+FILLER": "0.0.0", - "google-cloud-container_analysis": "1.5.1", + "google-cloud-container_analysis": "1.5.2", "google-cloud-container_analysis+FILLER": "0.0.0", "google-cloud-container_analysis-v1": "1.4.0", "google-cloud-container_analysis-v1+FILLER": "0.0.0", diff --git a/google-cloud-container_analysis/CHANGELOG.md b/google-cloud-container_analysis/CHANGELOG.md index bd0fd5a164ca..78b2631c677a 100644 --- a/google-cloud-container_analysis/CHANGELOG.md +++ b/google-cloud-container_analysis/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.5.2 (2025-05-27) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 1.5.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-container_analysis/lib/google/cloud/container_analysis/version.rb b/google-cloud-container_analysis/lib/google/cloud/container_analysis/version.rb index bc56e68e7468..0c4426833689 100644 --- a/google-cloud-container_analysis/lib/google/cloud/container_analysis/version.rb +++ b/google-cloud-container_analysis/lib/google/cloud/container_analysis/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module ContainerAnalysis - VERSION = "1.5.1" + VERSION = "1.5.2" end end end From adbfc5c797ddc3773e61d4f67871aef69f464b8f Mon Sep 17 00:00:00 2001 From: Viacheslav Rostovtsev <58152857+viacheslav-rostovtsev@users.noreply.github.com> Date: Wed, 28 May 2025 12:45:20 -0700 Subject: [PATCH 074/457] feat: update routing headers to new format (#30481) --- .../acceptance/firestore/collection_test.rb | 6 +- .../acceptance/firestore/service_test.rb | 5 +- .../acceptance/firestore/watch_test.rb | 112 ++++++++++++++++++ .../acceptance/firestore_helper.rb | 18 +-- .../lib/google/cloud/firestore/service.rb | 7 +- google-cloud-firestore/test/helper.rb | 10 +- 6 files changed, 140 insertions(+), 18 deletions(-) diff --git a/google-cloud-firestore/acceptance/firestore/collection_test.rb b/google-cloud-firestore/acceptance/firestore/collection_test.rb index 73d694dbd053..e582d0a37aa1 100644 --- a/google-cloud-firestore/acceptance/firestore/collection_test.rb +++ b/google-cloud-firestore/acceptance/firestore/collection_test.rb @@ -61,7 +61,7 @@ rand_col.list_documents.map(&:delete) _(rand_col.list_documents).must_be :empty? end - + it "lists its documents with read_time" do rand_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" rand_col.add({foo: "bar"}) @@ -86,7 +86,7 @@ _(docs.first.client).must_be_kind_of Google::Cloud::Firestore::Client rand_col.list_documents.map(&:delete) - _(rand_col.list_documents).must_be :empty? + _(rand_col.list_documents).must_be :empty? end describe "Multiple database tests" do @@ -117,5 +117,5 @@ rand_col_2.list_documents.map(&:delete) _(rand_col_2.list_documents).must_be :empty? end - end + end end diff --git a/google-cloud-firestore/acceptance/firestore/service_test.rb b/google-cloud-firestore/acceptance/firestore/service_test.rb index 3a09568f4328..7dcddd187ff5 100644 --- a/google-cloud-firestore/acceptance/firestore/service_test.rb +++ b/google-cloud-firestore/acceptance/firestore/service_test.rb @@ -16,11 +16,14 @@ require "firestore_helper" +require "cgi/escape" describe Google::Cloud::Firestore::Service, :firestore_acceptance do let :config_metadata do + routing_val = CGI.escapeURIComponent("projects/#{firestore.project_id}/databases/(default)") + { - "google-cloud-resource-prefix": "projects/#{firestore.project_id}/databases/(default)" + "x-goog-request-params": "database=#{routing_val}" } end diff --git a/google-cloud-firestore/acceptance/firestore/watch_test.rb b/google-cloud-firestore/acceptance/firestore/watch_test.rb index cf0e83b36a2b..7faf78fbbb86 100644 --- a/google-cloud-firestore/acceptance/firestore/watch_test.rb +++ b/google-cloud-firestore/acceptance/firestore/watch_test.rb @@ -187,6 +187,118 @@ _(snps[3][:val]).must_equal 1 end + describe "Watch -- multiple database tests" do + it "watches a query" do + skip "Don't have secondary database to run the test" unless firestore_2 + col_id = "#{root_path}/query/#{SecureRandom.hex(4)}" + watch_col = firestore_2.col(col_id).doc("watch-#{SecureRandom.hex(4)}").col("watch-query") + + watch_col.doc("nil").create val: nil + watch_col.doc("int").create val: 0 + watch_col.doc("true").create val: true + watch_col.doc("false").create val: false + watch_col.doc("num").create val: 0.0 + watch_col.doc("str").create val: "" + watch_col.doc("time").create val: Time.now + watch_col.doc("array").create val: [] + watch_col.doc("hash").create val: {} + watch_col.doc("ref").create val: root_col.doc("ref") + watch_col.doc("geo").create val: { longitude: 45, latitude: 45 } + watch_col.doc("io").create val: StringIO.new + + snps = [] + listener = watch_col.order(:val, :desc).listen { |snp| snps << snp } + + wait_until { snps.count == 1 } + + watch_col.doc("added").create val: false + + wait_until { snps.count == 2 } + + watch_col.doc("array").delete + + wait_until { snps.count == 3 } + + watch_col.doc("added").update({val: true}) + + wait_until { snps.count == 4 } + + listener.stop + + _(snps.count).must_equal 4 + snps.each { |qs| _(qs).must_be_kind_of Google::Cloud::Firestore::QuerySnapshot } + + _(snps[0].count).must_equal 12 + _(snps[0].changes.count).must_equal 12 + _(snps[0].docs.map(&:document_id)).must_equal ["hash", "array", "geo", "ref", "io", "str", "time", "num", "int", "true", "false", "nil"] + snps[0].changes.each { |change| _(change).must_be :added? } + _(snps[0].changes.map(&:doc).map(&:document_id)).must_equal ["hash", "array", "geo", "ref", "io", "str", "time", "num", "int", "true", "false", "nil"] + + _(snps[1].count).must_equal 13 + _(snps[1].changes.count).must_equal 1 + _(snps[1].docs.map(&:document_id)).must_equal ["hash", "array", "geo", "ref", "io", "str", "time", "num", "int", "true", "false", "added", "nil"] + snps[1].changes.each { |change| _(change).must_be :added? } + _(snps[1].changes.map(&:doc).map(&:document_id)).must_equal ["added"] + + _(snps[2].count).must_equal 12 + _(snps[2].changes.count).must_equal 1 + _(snps[2].docs.map(&:document_id)).must_equal ["hash", "geo", "ref", "io", "str", "time", "num", "int", "true", "false", "added", "nil"] + snps[2].changes.each { |change| _(change).must_be :removed? } + _(snps[2].changes.map(&:doc).map(&:document_id)).must_equal ["array"] + + _(snps[3].count).must_equal 12 + _(snps[3].changes.count).must_equal 1 + _(snps[3].docs.map(&:document_id)).must_equal ["hash", "geo", "ref", "io", "str", "time", "num", "int", "true", "added", "false", "nil"] + snps[3].changes.each { |change| _(change).must_be :modified? } + _(snps[3].changes.map(&:doc).map(&:document_id)).must_equal ["added"] + end + + it "watches a document" do + skip "Don't have secondary database to run the test" unless firestore_2 + col_id = "#{root_path}/query/#{SecureRandom.hex(4)}" + watch_col = firestore_2.col(col_id).doc("watch-#{SecureRandom.hex(4)}").col("watch-docs") + + watch_col.doc("watch-doc").create val: true + + snps = [] + listener = watch_col.doc("watch-doc").listen { |snp| snps << snp } + + wait_until { snps.count == 1 } + + watch_col.doc("watch-doc").update({val: false}) + + wait_until { snps.count == 2 } + + watch_col.doc("watch-doc").delete + + wait_until { snps.count == 3 } + + watch_col.doc("watch-doc").set({val: 1}) + + wait_until { snps.count == 4 } + + listener.stop + + _(snps.count).must_equal 4 + snps.each { |qs| _(qs).must_be_kind_of Google::Cloud::Firestore::DocumentSnapshot } + + _(snps[0].document_path).must_equal watch_col.doc("watch-doc").document_path + _(snps[0]).must_be :exists? + _(snps[0][:val]).must_equal true + + _(snps[1].document_path).must_equal watch_col.doc("watch-doc").document_path + _(snps[1]).must_be :exists? + _(snps[1][:val]).must_equal false + + _(snps[2].document_path).must_equal watch_col.doc("watch-doc").document_path + _(snps[2]).must_be :missing? + + _(snps[3].document_path).must_equal watch_col.doc("watch-doc").document_path + _(snps[3]).must_be :exists? + _(snps[3][:val]).must_equal 1 + end + end + def wait_until &block wait_count = 0 until block.call diff --git a/google-cloud-firestore/acceptance/firestore_helper.rb b/google-cloud-firestore/acceptance/firestore_helper.rb index 60b79e198d89..8dcae16b27cc 100644 --- a/google-cloud-firestore/acceptance/firestore_helper.rb +++ b/google-cloud-firestore/acceptance/firestore_helper.rb @@ -90,17 +90,17 @@ def self.run_one_method klass, method_name, reporter t = Time.now.utc.iso8601.gsub ":", "-" $firestore_prefix = "gcloud-#{t}-#{SecureRandom.hex(4)}".downcase -def clean_up_firestore - puts "Cleaning up documents and collections after firestore tests." +def clean_up_firestore firestore_db, name="main" + puts "Cleaning up documents and collections after firestore tests in the #{name} db" - $firestore.batch do |b| - $firestore.col($firestore_prefix).select($firestore.document_id).all_descendants.run.each_slice(500).with_index do |slice, index| - $firestore.batch do |b| + firestore_db.batch do |b| + firestore_db.col($firestore_prefix).select(Google::Cloud::Firestore::FieldPath.document_id).all_descendants.run.each_slice(500).with_index do |slice, index| + firestore_db.batch do |b| slice.each do |doc| b.delete doc end end - puts "Deleted batch #{index+1} of #{slice.count} documents" + puts "\tDeleted batch #{index+1} consisting of #{slice.count} documents" end end rescue => e @@ -108,8 +108,10 @@ def clean_up_firestore end Minitest.after_run do - clean_up_firestore - unless $firestore_2 + clean_up_firestore $firestore + if $firestore_2 + clean_up_firestore $firestore_2, "secondary" + else puts "The multiple database tests were not run. These tests require a secondary " \ "database which is not configured. To enable, ensure that the following " \ "is present in the environment: \n" \ diff --git a/google-cloud-firestore/lib/google/cloud/firestore/service.rb b/google-cloud-firestore/lib/google/cloud/firestore/service.rb index 429d2084d96b..9af1e442b112 100644 --- a/google-cloud-firestore/lib/google/cloud/firestore/service.rb +++ b/google-cloud-firestore/lib/google/cloud/firestore/service.rb @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "cgi/escape" require "google/cloud/env" require "google/cloud/errors" @@ -52,7 +53,8 @@ def firestore config.endpoint = host if host config.lib_name = "gccl" config.lib_version = Google::Cloud::Firestore::VERSION - config.metadata = { "google-cloud-resource-prefix": "projects/#{@project}/databases/#{@database}" } + routing_val = CGI.escapeURIComponent "projects/#{@project}/databases/#{@database}" + config.metadata = { "x-goog-request-params": "database=#{routing_val}" } end end end @@ -233,7 +235,8 @@ def read_time_to_timestamp read_time def default_headers parent = nil parent ||= database_path - { "google-cloud-resource-prefix" => parent } + routing_val = CGI.escapeURIComponent parent + { "x-goog-request-params" => "database=#{routing_val}" } end def call_options parent: nil, token: nil diff --git a/google-cloud-firestore/test/helper.rb b/google-cloud-firestore/test/helper.rb index 5f3948f24313..b5b10d5ebf0a 100644 --- a/google-cloud-firestore/test/helper.rb +++ b/google-cloud-firestore/test/helper.rb @@ -18,11 +18,14 @@ require "minitest/autorun" require "minitest/focus" require "minitest/rg" -require "google/cloud/firestore" -require "google/cloud/firestore/rate_limiter" + +require "cgi/escape" require "grpc" require "ostruct" +require "google/cloud/firestore" +require "google/cloud/firestore/rate_limiter" + ## # Monkey-Patch CallOptions to support Mocks # @@ -163,8 +166,7 @@ class MockFirestore < Minitest::Spec let(:full_doc_paths) { ["#{documents_path}/users/alice", "#{documents_path}/users/bob", "#{documents_path}/users/carol"] } - let(:default_project_options) { Gapic::CallOptions.new(metadata: { "google-cloud-resource-prefix" => "projects/#{project}" }) } - let(:default_options) { Gapic::CallOptions.new(metadata: { "google-cloud-resource-prefix" => database_path }, retry_policy: {}) } + let(:default_options) { Gapic::CallOptions.new(metadata: { "x-goog-request-params" => "database=#{CGI.escapeURIComponent(database_path)}"}, retry_policy: {}) } let(:credentials) { OpenStruct.new(client: OpenStruct.new(updater_proc: Proc.new {})) } let(:firestore) { Google::Cloud::Firestore::Client.new(Google::Cloud::Firestore::Service.new(project, credentials, database: database)) } let(:secondary_firestore) { Google::Cloud::Firestore::Client.new(Google::Cloud::Firestore::Service.new(project, credentials, database: secondary_database)) } From ec89296322f2eb02e6dda07bb3b9eb2e54e812fc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 14:48:19 -0700 Subject: [PATCH 075/457] docs: fix various typos in commentary (#30486) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: fix various typos in commentary PiperOrigin-RevId: 764977880 Source-Link: https://github.com/googleapis/googleapis/commit/021fc2e17e44fb13c0583b24ea8a27364632211e Source-Link: https://github.com/googleapis/googleapis-gen/commit/9fb7f64f81686c672cf73b92bd54263c9559ce18 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI5ZmI3ZjY0ZjgxNjg2YzY3MmNmNzNiOTJiZDU0MjYzYzk1NTljZTE4In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1beta/parallelstore/client.rb | 20 ++++++------- .../v1beta/parallelstore/rest/client.rb | 20 ++++++------- .../parallelstore/v1beta/parallelstore.rb | 30 +++++++++---------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/parallelstore/client.rb b/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/parallelstore/client.rb index 2ad846a6d73f..31d2d10e1b6c 100644 --- a/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/parallelstore/client.rb +++ b/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/parallelstore/client.rb @@ -455,8 +455,8 @@ def get_instance request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -568,8 +568,8 @@ def create_instance request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -676,8 +676,8 @@ def update_instance request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes after the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -788,8 +788,8 @@ def delete_instance request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -914,8 +914,8 @@ def import_data request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. diff --git a/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/parallelstore/rest/client.rb b/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/parallelstore/rest/client.rb index e7c33a1b717d..cf5b7d15c9b2 100644 --- a/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/parallelstore/rest/client.rb +++ b/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/parallelstore/rest/client.rb @@ -435,8 +435,8 @@ def get_instance request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -541,8 +541,8 @@ def create_instance request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -642,8 +642,8 @@ def update_instance request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes after the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -747,8 +747,8 @@ def delete_instance request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -866,8 +866,8 @@ def import_data request, options = nil # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. diff --git a/google-cloud-parallelstore-v1beta/proto_docs/google/cloud/parallelstore/v1beta/parallelstore.rb b/google-cloud-parallelstore-v1beta/proto_docs/google/cloud/parallelstore/v1beta/parallelstore.rb index de87c107c0d0..faff1358910d 100644 --- a/google-cloud-parallelstore-v1beta/proto_docs/google/cloud/parallelstore/v1beta/parallelstore.rb +++ b/google-cloud-parallelstore-v1beta/proto_docs/google/cloud/parallelstore/v1beta/parallelstore.rb @@ -52,8 +52,8 @@ module V1beta # @!attribute [r] daos_version # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Output only. Deprecated 'daos_version' field. - # Output only. The version of DAOS software running in the instance. + # Output only. Deprecated: The version of DAOS software running in the + # instance. # @!attribute [r] access_points # @return [::Array<::String>] # Output only. A list of IPv4 addresses used for client side configuration. @@ -152,7 +152,7 @@ class TransferMetadataOptions include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # The UID perservation behavior. + # The UID preservation behavior. module Uid # default is UID_NUMBER_PRESERVE. UID_UNSPECIFIED = 0 @@ -266,8 +266,8 @@ class GetInstanceRequest # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -296,8 +296,8 @@ class CreateInstanceRequest # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -320,8 +320,8 @@ class UpdateInstanceRequest # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes after the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -423,8 +423,8 @@ class DestinationParallelstore # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -469,8 +469,8 @@ class ImportDataRequest # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. @@ -669,10 +669,10 @@ class TransferOperationMetadata # Bytes that are copied to the data destination. # @!attribute [rw] objects_failed # @return [::Integer] - # Objects that are failed to write to the data destination. + # Objects that failed to be written to the data destination. # @!attribute [rw] bytes_failed # @return [::Integer] - # Bytes that are failed to write to the data destination. + # Bytes that failed to be written to the data destination. class TransferCounters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From 428502a00570f5905739c7953c65b518bc7a012e Mon Sep 17 00:00:00 2001 From: Viacheslav Rostovtsev <58152857+viacheslav-rostovtsev@users.noreply.github.com> Date: Mon, 2 Jun 2025 11:02:10 -0700 Subject: [PATCH 076/457] feat: add AggregateQuery explanation features for RubyFirestore (#30484) --- google-cloud-firestore/.yardopts | 1 + google-cloud-firestore/QUERY_PERFORMANCE.md | 74 +++++++ .../firestore/aggregate_query_explain_test.rb | 101 +++++++++ .../firestore/aggregate_query_test.rb | 8 +- .../acceptance/firestore_helper.rb | 2 +- .../google/cloud/firestore/aggregate_query.rb | 62 ++++++ .../aggregate_query_explain_result.rb | 152 +++++++++++++ .../lib/google/cloud/firestore/service.rb | 5 +- .../firestore/aggregate_query/explain_test.rb | 209 ++++++++++++++++++ 9 files changed, 608 insertions(+), 6 deletions(-) create mode 100644 google-cloud-firestore/QUERY_PERFORMANCE.md create mode 100644 google-cloud-firestore/acceptance/firestore/aggregate_query_explain_test.rb create mode 100644 google-cloud-firestore/lib/google/cloud/firestore/aggregate_query_explain_result.rb create mode 100644 google-cloud-firestore/test/google/cloud/firestore/aggregate_query/explain_test.rb diff --git a/google-cloud-firestore/.yardopts b/google-cloud-firestore/.yardopts index 213c11064417..1b9b3c24e612 100644 --- a/google-cloud-firestore/.yardopts +++ b/google-cloud-firestore/.yardopts @@ -11,6 +11,7 @@ OVERVIEW.md AUTHENTICATION.md EMULATOR.md LOGGING.md +QUERY_PERFORMANCE.md CONTRIBUTING.md TROUBLESHOOTING.md CHANGELOG.md diff --git a/google-cloud-firestore/QUERY_PERFORMANCE.md b/google-cloud-firestore/QUERY_PERFORMANCE.md new file mode 100644 index 000000000000..91f34f59a83e --- /dev/null +++ b/google-cloud-firestore/QUERY_PERFORMANCE.md @@ -0,0 +1,74 @@ +# Understanding Query Performance + +Query Explain methods allows you receive detailed performance statistics on backend query execution. It functions like the `EXPLAIN` \[`ANALYZE`\] operation in relational database systems. The `explain` method, available on both `Query` and `AggregateQuery` objects, is the primary way to access this information. + +## Query#explain + +The `explain` method on a `Query` instance allows you to retrieve planning and execution metrics for your standard document queries. + +**Method Signature:** `explain(analyze: false, read_time: nil)` + +* `analyze` (Boolean, optional): + * `false` (default): Returns only planning-stage metrics. The query is not executed, and no documents are returned. + * `true`: Executes the query and returns both planning and execution-stage metrics, along with the actual query results (document snapshots). +* `read_time` (Time, optional): This is same as `read_time` parameter on regular `Query.get` Reads documents as they were at the given time. This may not be older than 270 seconds. + +**Returns:** `Google::Cloud::Firestore::QueryExplainResult` + +The `QueryExplainResult` object is enumerable and provides access to: +* `explain_metrics`: A `Google::Cloud::Firestore::V1::ExplainMetrics` object containing plan summaries and, if `analyze: true`, execution statistics. +* Document snapshots: If `analyze: true`, you can iterate over the `QueryExplainResult` to get the `DocumentSnapshot` objects returned by the query. + +**Example:** + +```ruby +require "google/cloud/firestore" + +firestore = Google::Cloud::Firestore.new +query = firestore.col(:cities).where(:population, :>, 100000) + +# Get only planning metrics +plan_only_result = query.explain +puts "Plan Summary: #{plan_only_result.explain_metrics.plan_summary}" + +# Get planning, execution metrics, and results +full_explain_result = query.explain analyze: true +puts "Execution Stats: #{full_explain_result.explain_metrics.execution_stats}" +full_explain_result.each do |city_doc| + puts "City: #{city_doc.document_id}" +end +``` + +## AggregateQuery#explain + +Similarly, the `explain` method on an `AggregateQuery` instance provides performance insights for your aggregation queries (e.g., `count`, `sum`, `avg`). + +**Method Signature:** `explain(analyze: false)` + +* `analyze` (Boolean, optional): + * `false` (default): Returns only planning-stage metrics. The aggregation query is not executed. + * `true`: Executes the aggregation query and returns both planning and execution-stage metrics, along with the `AggregateQuerySnapshot`. + +**Returns:** `Google::Cloud::Firestore::AggregateQueryExplainResult` + +The `AggregateQueryExplainResult` object provides access to: +* `explain_metrics`: A `Google::Cloud::Firestore::V1::ExplainMetrics` object. +* `snapshot`: An `AggregateQuerySnapshot` containing the aggregation result (e.g., the count value), available if `analyze: true` and the query yielded a result. + +**Example:** + +```ruby +require "google/cloud/firestore" + +firestore = Google::Cloud::Firestore.new +aggregate_query = firestore.col(:cities).where(:population, :>, 100000).aggregate_query.add_count + +# Get only planning metrics +plan_only_result = aggregate_query.explain +puts "Plan Summary: #{plan_only_result.explain_metrics.plan_summary}" + +# Get planning, execution metrics, and results +full_explain_result = aggregate_query.explain analyze: true +puts "Execution Stats: #{full_explain_result.explain_metrics.execution_stats}" +puts "Total cities: #{full_explain_result.snapshot.get}" +``` diff --git a/google-cloud-firestore/acceptance/firestore/aggregate_query_explain_test.rb b/google-cloud-firestore/acceptance/firestore/aggregate_query_explain_test.rb new file mode 100644 index 000000000000..6434aa7a49bc --- /dev/null +++ b/google-cloud-firestore/acceptance/firestore/aggregate_query_explain_test.rb @@ -0,0 +1,101 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "firestore_helper" + +describe "AggregateQuery Explain", :firestore_acceptance do + let(:rand_query_col) do + query_col = firestore.col "#{root_path}/query/#{SecureRandom.hex(4)}" + # Add some documents + query_col.add({ name: "Alice", type: "human", population: 100 }) + query_col.add({ name: "Bob", type: "human", population: 200 }) + query_col.add({ name: "Charlie", type: "human", population: 300 }) + query_col.add({ name: "Robot", type: "robot", population: 50 }) + query_col + end + + let(:aggregate_query) { rand_query_col.aggregate_query.add_count(aggregate_alias: "total").add_sum("population", aggregate_alias: "total_pop") } + + it "runs an aggregate query with explain (analyze: false) - returns only metrics, no snapshot" do + explain_result = aggregate_query.explain + + _(explain_result).must_be_kind_of Google::Cloud::Firestore::AggregateQueryExplainResult + + # Should have no actual snapshot + _(explain_result.snapshot).must_be_nil + + # Should have explain_metrics + metrics = explain_result.explain_metrics + _(metrics).wont_be_nil + _(metrics).must_be_kind_of Google::Cloud::Firestore::V1::ExplainMetrics + _(metrics.plan_summary).wont_be_nil + + # Execution stats should be nil as analyze was false + _(metrics.execution_stats).must_be_nil + end + + it "runs an aggregate query with explain (analyze: true) - returns both snapshot and metrics" do + explain_result = aggregate_query.explain analyze: true + + _(explain_result).must_be_kind_of Google::Cloud::Firestore::AggregateQueryExplainResult + + # Before access metrics_fetched should be false + _(explain_result.metrics_fetched?).must_equal false + + # Should have an actual snapshot + snapshot = explain_result.snapshot + _(snapshot).wont_be_nil + _(snapshot).must_be_kind_of Google::Cloud::Firestore::AggregateQuerySnapshot + _(snapshot.get("total")).must_equal 4 + _(snapshot.get("total_pop")).must_equal 100 + 200 + 300 + 50 + + # After access metrics_fetched should be true + _(explain_result.metrics_fetched?).must_equal true + + # Should have explain_metrics with both planning and execution data + metrics = explain_result.explain_metrics + _(metrics).wont_be_nil + _(metrics).must_be_kind_of Google::Cloud::Firestore::V1::ExplainMetrics + _(metrics.plan_summary).wont_be_nil + _(metrics.execution_stats).wont_be_nil + _(metrics.execution_stats.results_returned).must_equal 1 + end + + it "produces consistent results between explain(analyze:true).snapshot and normal get" do + explain_result_analyzed = aggregate_query.explain analyze: true + + snapshot_from_explain = explain_result_analyzed.snapshot + snapshot_from_get = aggregate_query.get.first + + _(snapshot_from_explain).wont_be_nil + _(snapshot_from_get).wont_be_nil + + _(snapshot_from_explain.get("total")).must_equal snapshot_from_get.get("total") + _(snapshot_from_explain.get("total_pop")).must_equal snapshot_from_get.get("total_pop") + + metrics_analyzed = explain_result_analyzed.explain_metrics + _(metrics_analyzed).wont_be_nil + _(metrics_analyzed.plan_summary).wont_be_nil + _(metrics_analyzed.execution_stats).wont_be_nil + end + + it "handles empty result sets for aggregation with analyze: true" do + empty_query = rand_query_col.where(:type, :==, "alien").aggregate_query.add_count(aggregate_alias: "alien_count") + explain_result = empty_query.explain analyze: true + + _(explain_result.snapshot.get("alien_count")).must_equal 0 + _(explain_result.explain_metrics).wont_be_nil + _(explain_result.explain_metrics.execution_stats.results_returned).must_equal 1 # empty result is still reflected + end +end diff --git a/google-cloud-firestore/acceptance/firestore/aggregate_query_test.rb b/google-cloud-firestore/acceptance/firestore/aggregate_query_test.rb index c528e9de07ec..b42d79469dde 100644 --- a/google-cloud-firestore/acceptance/firestore/aggregate_query_test.rb +++ b/google-cloud-firestore/acceptance/firestore/aggregate_query_test.rb @@ -81,13 +81,13 @@ aq = @rand_query_col.aggregate_query .add_count(aggregate_alias: 'one') .add_count(aggregate_alias: 'one') - expect { snapshot = aq.get.first }.must_raise expected_error_class + expect { aq.get.first }.must_raise expected_error_class end it "throws error when no aggregate is added" do # aggregate object with no added aggregate (ex: aq.add_count) aq = @rand_query_col.aggregate_query - expect { snapshot = aq.get.first }.must_raise expected_error_class + expect { aq.get.first }.must_raise expected_error_class end it "returns count inside a transaction" do @@ -174,7 +174,7 @@ aq = @rand_query_col.aggregate_query .add_sum('foo', aggregate_alias: 'one') .add_sum('foo', aggregate_alias: 'one') - expect { snapshot = aq.get.first }.must_raise expected_error_class + expect { aq.get.first }.must_raise expected_error_class end it "returns sum inside a transaction" do @@ -263,7 +263,7 @@ aq = @rand_query_col.aggregate_query .add_avg('foo', aggregate_alias: 'one') .add_avg('foo', aggregate_alias: 'one') - expect { snapshot = aq.get.first }.must_raise expected_error_class + expect { aq.get.first }.must_raise expected_error_class end it "returns avg inside a transaction" do diff --git a/google-cloud-firestore/acceptance/firestore_helper.rb b/google-cloud-firestore/acceptance/firestore_helper.rb index 8dcae16b27cc..30d0bfdb5d89 100644 --- a/google-cloud-firestore/acceptance/firestore_helper.rb +++ b/google-cloud-firestore/acceptance/firestore_helper.rb @@ -48,7 +48,7 @@ class FirestoreTest < Minitest::Test # Setup project based on available ENV variables def setup @firestore = $firestore - @firestore_2 = $firestore_2 + @firestore_2 = $firestore_2 if defined?($firestore_2) refute_nil @firestore, "You do not have an active firestore to run the tests." diff --git a/google-cloud-firestore/lib/google/cloud/firestore/aggregate_query.rb b/google-cloud-firestore/lib/google/cloud/firestore/aggregate_query.rb index 5c9ea66a187d..fa1810dae093 100644 --- a/google-cloud-firestore/lib/google/cloud/firestore/aggregate_query.rb +++ b/google-cloud-firestore/lib/google/cloud/firestore/aggregate_query.rb @@ -14,6 +14,7 @@ require "google/cloud/firestore/v1" require "google/cloud/firestore/aggregate_query_snapshot" +require "google/cloud/firestore/aggregate_query_explain_result" module Google module Cloud @@ -252,6 +253,60 @@ def get end end + ## + # Retrieves the query explanation for the aggregate query. + # By default, the query is only planned, not executed, returning only metrics from the + # planning stages. If `analyze` is set to `true` the query will be planned and executed, + # returning the `AggregateQuerySnapshot` alongside both planning and execution stage metrics. + # + # Unlike the enumerator returned from `AggregateQuery#get`, the `AggregateQueryExplainResult` + # caches its snapshot and metrics after the first access. + # + # @param [Boolean] analyze + # Whether to execute the query and return the execution stage metrics + # in addition to planning metrics. + # If set to `false` the query will be planned only and will return planning + # stage metrics without results. + # If set to `true` the query will be executed, and will return the query results, + # planning stage metrics, and execution stage metrics. + # Defaults to `false`. + # + # @return [AggregateQueryExplainResult] + # + # @example Getting only the planning stage metrics for the aggregate query + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # query = firestore.col(:cities).aggregate_query.add_count + # + # explain_result = query.explain + # metrics = explain_result.explain_metrics + # puts "Plan summary: #{metrics.plan_summary}" if metrics&.plan_summary + # + # @example Getting planning and execution stage metrics, as well as aggregate query results + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # query = firestore.col(:cities).aggregate_query.add_count + # + # explain_result = query.explain analyze: true + # metrics = explain_result.explain_metrics + # puts "Plan summary: #{metrics.plan_summary}" if metrics&.plan_summary + # puts "Results returned: #{metrics.execution_stats.results_returned}" if metrics&.execution_stats + # snapshot = explain_result.snapshot + # puts "Count: #{snapshot.get}" if snapshot + # + def explain analyze: false + ensure_service! + validate_analyze_option! analyze + + explain_options = ::Google::Cloud::Firestore::V1::ExplainOptions.new analyze: analyze + + responses_enum = service.run_aggregate_query @parent_path, @grpc, explain_options: explain_options + + AggregateQueryExplainResult.new responses_enum + end + ## # @private def to_grpc @@ -279,6 +334,13 @@ def service ensure_client! client.service end + + # @private + # Validates the analyze option. + def validate_analyze_option! analyze_value + return if [true, false].include? analyze_value + raise ArgumentError, "analyze must be a boolean" + end end end end diff --git a/google-cloud-firestore/lib/google/cloud/firestore/aggregate_query_explain_result.rb b/google-cloud-firestore/lib/google/cloud/firestore/aggregate_query_explain_result.rb new file mode 100644 index 000000000000..06331473ecd0 --- /dev/null +++ b/google-cloud-firestore/lib/google/cloud/firestore/aggregate_query_explain_result.rb @@ -0,0 +1,152 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "google/cloud/firestore/aggregate_query_snapshot" +require "google/cloud/firestore/convert" +require "google/cloud/firestore/v1" # For ExplainMetrics and AggregationResult types + +module Google + module Cloud + module Firestore + ## + # # AggregateQueryExplainResult + # + # Represents the result of a Firestore aggregate query explanation. + # This class provides access to the + # {Google::Cloud::Firestore::V1::ExplainMetrics}, which contain details + # about the query plan and execution statistics. If the explanation was + # run with `analyze: true`, it also provides access to the + # {AggregateQuerySnapshot}. + # + # The metrics and snapshot (if applicable) are fetched and cached upon + # the first call to either {#explain_metrics} or {#snapshot}. + # + # @see AggregateQuery#explain + # + # @example Getting planning and execution metrics with the snapshot + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # aggregate_query = firestore.col(:cities).aggregate_query.add_count + # + # explain_result = aggregate_query.explain analyze: true + # + # metrics = explain_result.explain_metrics + # if metrics + # puts "Plan summary: #{metrics.plan_summary&.to_json}" + # puts "Execution stats: #{metrics.execution_stats&.to_json}" + # end + # + # snapshot = explain_result.snapshot + # puts "Count: #{snapshot.get}" if snapshot + # + # @example Getting only planning metrics + # require "google/cloud/firestore" + # + # firestore = Google::Cloud::Firestore.new + # aggregate_query = firestore.col(:cities).aggregate_query.add_count + # + # explain_result = aggregate_query.explain analyze: false # Default + # + # metrics = explain_result.explain_metrics + # puts "Plan summary: #{metrics.plan_summary&.to_json}" if metrics + # + # # Snapshot will be nil because analyze was false + # puts "Snapshot is nil: #{explain_result.snapshot.nil?}" + # + class AggregateQueryExplainResult + # Indicates whether the metrics and snapshot (if applicable) have been + # fetched from the server response and cached. + # This becomes `true` after the first call to {#explain_metrics} or + # {#snapshot}. + # + # @return [Boolean] `true` if data has been fetched, `false` otherwise. + attr_reader :metrics_fetched + alias metrics_fetched? metrics_fetched + + ## + # @private Creates a new AggregateQueryExplainResult. + # + # @param responses_enum [Enumerable] + # The enum of response objects from the gRPC call. + # + def initialize responses_enum + @responses_enum = responses_enum + + @metrics_fetched = false + @explain_metrics = nil + @snapshot = nil + end + + # The metrics from planning and potentially execution stages of the + # aggregate query. + # + # Calling this method for the first time will process the server + # responses to extract and cache the metrics (and snapshot if + # `analyze: true` was used). Subsequent calls return the cached metrics. + # + # @return [Google::Cloud::Firestore::V1::ExplainMetrics, nil] + # The query explanation metrics, or `nil` if no metrics were returned + # by the server. + # + def explain_metrics + ensure_fetched! + @explain_metrics + end + + # The {AggregateQuerySnapshot} containing the aggregation results. + # + # This is only available if the explanation was run with `analyze: true`. + # If `analyze: false` was used, or if the query yielded no results + # even with `analyze: true`, this method returns `nil`. + # + # Calling this method for the first time will process the server + # responses to extract and cache the snapshot (and metrics). + # Subsequent calls return the cached snapshot. + # + # @return [AggregateQuerySnapshot, nil] + # The aggregate query snapshot if `analyze: true` was used and results + # are available, otherwise `nil`. + # + def snapshot + ensure_fetched! + @snapshot + end + + private + + # Processes the responses from the server to populate metrics and, + # if applicable, the snapshot. This method is called internally by + # {#explain_metrics} and {#snapshot} and ensures that processing + # happens only once. + # @private + def ensure_fetched! + return if @metrics_fetched + + @responses_enum.each do |response| + if @explain_metrics.nil? && response.explain_metrics + @explain_metrics = response.explain_metrics + end + + if @snapshot.nil? && response.result + @snapshot = AggregateQuerySnapshot.from_run_aggregate_query_response response + end + end + + @metrics_fetched = true + end + end + end + end +end diff --git a/google-cloud-firestore/lib/google/cloud/firestore/service.rb b/google-cloud-firestore/lib/google/cloud/firestore/service.rb index 9af1e442b112..2107258f7d9e 100644 --- a/google-cloud-firestore/lib/google/cloud/firestore/service.rb +++ b/google-cloud-firestore/lib/google/cloud/firestore/service.rb @@ -147,7 +147,7 @@ def run_query path, query_grpc, transaction: nil, read_time: nil, explain_option ## # Returns Google::Cloud::Firestore::V1::RunAggregationQueryResponse - def run_aggregate_query parent, structured_aggregation_query, transaction: nil + def run_aggregate_query parent, structured_aggregation_query, transaction: nil, explain_options: nil request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new( parent: parent, structured_aggregation_query: structured_aggregation_query @@ -157,6 +157,9 @@ def run_aggregate_query parent, structured_aggregation_query, transaction: nil elsif transaction request.new_transaction = transaction end + if explain_options + request.explain_options = explain_options + end firestore.run_aggregation_query request end diff --git a/google-cloud-firestore/test/google/cloud/firestore/aggregate_query/explain_test.rb b/google-cloud-firestore/test/google/cloud/firestore/aggregate_query/explain_test.rb new file mode 100644 index 000000000000..66d8a7e44d44 --- /dev/null +++ b/google-cloud-firestore/test/google/cloud/firestore/aggregate_query/explain_test.rb @@ -0,0 +1,209 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "helper" + +describe Google::Cloud::Firestore::AggregateQuery, :explain_options, :mock_firestore do + let(:query_path) { "projects/#{project}/databases/(default)/documents" } + let(:query) { Google::Cloud::Firestore::Query.start nil, query_path, firestore } + let(:aggregate_query) { query.aggregate_query } + + let(:plan_summary_grpc) { Google::Cloud::Firestore::V1::PlanSummary.new(indexes_used: []) } + let(:execution_stats_grpc) { Google::Cloud::Firestore::V1::ExecutionStats.new(results_returned: 1, read_operations: 5) } + let(:explain_metrics_grpc) { Google::Cloud::Firestore::V1::ExplainMetrics.new(plan_summary: plan_summary_grpc, execution_stats: execution_stats_grpc) } + let(:explain_metrics_planning_only_grpc) { Google::Cloud::Firestore::V1::ExplainMetrics.new(plan_summary: plan_summary_grpc) } + + let(:aggregation_result_grpc) do + Google::Cloud::Firestore::V1::AggregationResult.new( + aggregate_fields: { + "total" => Google::Cloud::Firestore::V1::Value.new(integer_value: 5) + } + ) + end + let(:read_time) { Time.now } + let(:read_time_grpc) { Google::Cloud::Firestore::Convert.time_to_timestamp read_time } + + let(:response_with_metrics_and_result) do + [ + Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new( + result: aggregation_result_grpc, + read_time: read_time_grpc + ), + Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new( + explain_metrics: explain_metrics_grpc + ) + ].to_enum + end + + let(:response_with_planning_metrics_only) do + [ + Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new( + explain_metrics: explain_metrics_planning_only_grpc + ) + ].to_enum + end + + let(:empty_response) { [].to_enum } + + describe "AggregateQuery#explain" do + it "calls service with analyze: false by default" do + expected_explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: false) + + request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new( + parent: query_path, + structured_aggregation_query: aggregate_query.to_grpc, + explain_options: expected_explain_options + ) + + firestore_mock.expect :run_aggregation_query, response_with_planning_metrics_only, [request] + + explain_result = aggregate_query.explain + _(explain_result).must_be_kind_of Google::Cloud::Firestore::AggregateQueryExplainResult + _(explain_result.explain_metrics).must_equal explain_metrics_planning_only_grpc + _(explain_result.snapshot).must_be_nil + end + + it "calls service with analyze: true" do + expected_explain_options = Google::Cloud::Firestore::V1::ExplainOptions.new(analyze: true) + request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new( + parent: query_path, + structured_aggregation_query: aggregate_query.to_grpc, + explain_options: expected_explain_options + ) + + firestore_mock.expect :run_aggregation_query, response_with_metrics_and_result, [request] + + explain_result = aggregate_query.explain analyze: true + _(explain_result).must_be_kind_of Google::Cloud::Firestore::AggregateQueryExplainResult + _(explain_result.explain_metrics).must_equal explain_metrics_grpc + _(explain_result.snapshot).wont_be_nil + _(explain_result.snapshot.get("total")).must_equal 5 + end + + it "raises ArgumentError for invalid analyze option" do + expect { aggregate_query.explain analyze: "not_a_boolean" }.must_raise ArgumentError + expect { aggregate_query.explain analyze: nil }.must_raise ArgumentError + end + end + + describe "AggregateQueryExplainResult" do + it "initializes correctly" do + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new response_with_metrics_and_result + _(explain_result.metrics_fetched?).must_equal false + end + + describe "#explain_metrics" do + it "extracts metrics when present" do + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new response_with_metrics_and_result + _(explain_result.explain_metrics).must_equal explain_metrics_grpc + _(explain_result.metrics_fetched?).must_equal true + end + + it "returns nil if no metrics in response" do + response_with_result_only = [ + Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new( + result: aggregation_result_grpc, + read_time: read_time_grpc + ) + ].to_enum + + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new response_with_result_only + _(explain_result.explain_metrics).must_be_nil + _(explain_result.metrics_fetched?).must_equal true + end + + it "caches metrics after first call" do + mock_enum = Minitest::Mock.new + # Expect each to be called only once since `AggregateQueryExplainResult` caches the results internally + mock_enum.expect :each, response_with_planning_metrics_only + + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new mock_enum + explain_result.explain_metrics # First call + explain_result.explain_metrics # Second call, should use cache + + mock_enum.verify + end + end + + describe "#snapshot" do + it "constructs snapshot if result is present (simulating analyze: true)" do + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new response_with_metrics_and_result + snapshot = explain_result.snapshot + _(snapshot).must_be_kind_of Google::Cloud::Firestore::AggregateQuerySnapshot + _(snapshot.get("total")).must_equal 5 + _(explain_result.metrics_fetched?).must_equal true + end + + it "returns nil if no result in response (simulating analyze: false or empty result)" do + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new response_with_planning_metrics_only + _(explain_result.snapshot).must_be_nil + _(explain_result.metrics_fetched?).must_equal true + end + + it "caches snapshot after first call" do + mock_enum = Minitest::Mock.new + # Expect each to be called only once since `AggregateQueryExplainResult` caches the results internally + mock_enum.expect :each, response_with_metrics_and_result + + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new mock_enum + explain_result.snapshot # First call + explain_result.snapshot # Second call, should use cache + + mock_enum.verify + end + end + + describe "#metrics_fetched?" do + it "is false initially" do + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new empty_response + _(explain_result.metrics_fetched?).must_equal false + end + + it "is true after calling explain_metrics" do + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new response_with_planning_metrics_only + explain_result.explain_metrics + _(explain_result.metrics_fetched?).must_equal true + end + + it "is true after calling snapshot" do + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new response_with_metrics_and_result + explain_result.snapshot + _(explain_result.metrics_fetched?).must_equal true + end + end + + it "handles single response object in result stream correctly" do + single_part_response = [ + Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new( + result: aggregation_result_grpc, + read_time: read_time_grpc, + explain_metrics: explain_metrics_grpc + ) + ].to_enum + + explain_result = Google::Cloud::Firestore::AggregateQueryExplainResult.new single_part_response + + # Access snapshot first + snapshot = explain_result.snapshot + _(snapshot).wont_be_nil + _(snapshot.get("total")).must_equal 5 + + # Then access metrics + metrics = explain_result.explain_metrics + _(metrics).must_equal explain_metrics_grpc + + _(explain_result.metrics_fetched?).must_equal true + end + end +end From 44329ae8c6cedaf9ae81e343b431f5201559952f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:36:08 -0700 Subject: [PATCH 077/457] build: ensure there's only a single service config file for the Spanner Admin Instances API (#30480) --- .../README.md | 3 +- ...le-cloud-spanner-admin-instance-v1.gemspec | 2 +- .../v1/instance_admin/rest/operations.rb | 112 ++++++++++++++++++ 3 files changed, 114 insertions(+), 3 deletions(-) diff --git a/google-cloud-spanner-admin-instance-v1/README.md b/google-cloud-spanner-admin-instance-v1/README.md index 00ad25514ab7..b579b9d0f741 100644 --- a/google-cloud-spanner-admin-instance-v1/README.md +++ b/google-cloud-spanner-admin-instance-v1/README.md @@ -1,9 +1,8 @@ # Ruby Client for the Cloud Spanner Instance Admin V1 API -API Client library for the Cloud Spanner Instance Admin V1 API - Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. + https://github.com/googleapis/google-cloud-ruby This gem is a _versioned_ client. It provides basic client classes for a diff --git a/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec b/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec index 93ea791d9646..5ee13dbf3112 100644 --- a/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec +++ b/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |gem| gem.authors = ["Google LLC"] gem.email = "googleapis-packages@google.com" gem.description = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-instance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details." - gem.summary = "API Client library for the Cloud Spanner Instance Admin V1 API" + gem.summary = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service." gem.homepage = "https://github.com/googleapis/google-cloud-ruby" gem.license = "Apache-2.0" diff --git a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb index 785fdc275679..efa7c892dfed 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb @@ -848,6 +848,34 @@ def self.transcode_list_operations_request request_pb ["name", %r{^projects/[^/]+/instances/[^/]+/operations/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -876,6 +904,34 @@ def self.transcode_get_operation_request request_pb ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -904,6 +960,34 @@ def self.transcode_delete_operation_request request_pb ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -932,6 +1016,34 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end end From 6093b3d287c99bc60cbbc5e5100989814e1925f7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:36:38 -0700 Subject: [PATCH 078/457] docs: Add clarifications on IAP CorsSettings behavior (#30483) --- .../proto_docs/google/cloud/iap/v1/service.rb | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/google-cloud-iap-v1/proto_docs/google/cloud/iap/v1/service.rb b/google-cloud-iap-v1/proto_docs/google/cloud/iap/v1/service.rb index 676df6e55c24..9d86d4e6ae99 100644 --- a/google-cloud-iap-v1/proto_docs/google/cloud/iap/v1/service.rb +++ b/google-cloud-iap-v1/proto_docs/google/cloud/iap/v1/service.rb @@ -222,15 +222,16 @@ module IdentitySource end end - # Allows customers to configure tenant_id for GCIP instance per-app. + # Allows customers to configure tenant IDs for a Cloud Identity Platform (GCIP) + # instance for each application. # @!attribute [rw] tenant_ids # @return [::Array<::String>] - # Optional. GCIP tenant ids that are linked to the IAP resource. - # tenant_ids could be a string beginning with a number character to indicate - # authenticating with GCIP tenant flow, or in the format of _ - # to indicate authenticating with GCIP agent flow. - # If agent flow is used, tenant_ids should only contain one single element, - # while for tenant flow, tenant_ids can contain multiple elements. + # Optional. GCIP tenant IDs that are linked to the IAP resource. `tenant_ids` + # could be a string beginning with a number character to indicate + # authenticating with GCIP tenant flow, or in the format of + # `_` to indicate authenticating with GCIP agent flow. If + # agent flow is used, `tenant_ids` should only contain one single element, + # while for tenant flow, `tenant_ids` can contain multiple elements. # @!attribute [rw] login_page_uri # @return [::Google::Protobuf::StringValue] # Login page URI associated with the GCIP tenants. @@ -241,12 +242,13 @@ class GcipSettings extend ::Google::Protobuf::MessageExts::ClassMethods end - # Allows customers to configure HTTP request paths that'll allow HTTP OPTIONS - # call to bypass authentication and authorization. + # Allows customers to configure HTTP request paths that'll allow HTTP + # `OPTIONS` call to bypass authentication and authorization. # @!attribute [rw] allow_http_options # @return [::Google::Protobuf::BoolValue] - # Configuration to allow HTTP OPTIONS calls to skip authorization. If - # undefined, IAP will not apply any special logic to OPTIONS requests. + # Configuration to allow HTTP `OPTIONS` calls to skip + # authentication and authorization. If undefined, IAP will not apply any + # special logic to `OPTIONS` requests. class CorsSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From 1c2abc0a3abc542666422c671fe2005331f04dd0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:37:11 -0700 Subject: [PATCH 079/457] feat: add Dataplex Catalog action for discovery configs (#30482) feat: add a project ID to table reference so that org parents can create single table discovery configs. feat: new fields for data profile finding. docs: various doc revisions --- .../lib/google/privacy/dlp/v2/dlp_pb.rb | 3 +- .../lib/google/privacy/dlp/v2/storage_pb.rb | 2 +- .../proto_docs/google/privacy/dlp/v2/dlp.rb | 120 ++++++++++++++---- .../google/privacy/dlp/v2/storage.rb | 5 + 4 files changed, 106 insertions(+), 24 deletions(-) diff --git a/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb b/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb index ab867f2d21c8..fd37aa1f918a 100644 --- a/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb +++ b/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb @@ -19,7 +19,7 @@ require 'google/type/timeofday_pb' -descriptor_data = "\n\x1fgoogle/privacy/dlp/v2/dlp.proto\x12\x15google.privacy.dlp.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/privacy/dlp/v2/storage.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"G\n\x10\x45xcludeInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xa8\x01\n\x10\x45xcludeByHotword\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\"\xe7\x02\n\rExclusionRule\x12\x46\n\ndictionary\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12\x45\n\x12\x65xclude_info_types\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeInfoTypesH\x00\x12\x45\n\x12\x65xclude_by_hotword\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeByHotwordH\x00\x12:\n\rmatching_type\x18\x04 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingTypeB\x06\n\x04type\"\xb1\x01\n\x0eInspectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x12>\n\x0e\x65xclusion_rule\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.ExclusionRuleH\x00\x42\x06\n\x04type\"~\n\x11InspectionRuleSet\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\x05rules\x18\x02 \x03(\x0b\x32%.google.privacy.dlp.v2.InspectionRule\"\xac\x07\n\rInspectConfig\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12]\n\x1cmin_likelihood_per_info_type\x18\x0b \x03(\x0b\x32\x37.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood\x12\x42\n\x06limits\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.InspectConfig.FindingLimits\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x1a\n\x12\x65xclude_info_types\x18\x05 \x01(\x08\x12@\n\x11\x63ustom_info_types\x18\x06 \x03(\x0b\x32%.google.privacy.dlp.v2.CustomInfoType\x12=\n\x0f\x63ontent_options\x18\x08 \x03(\x0e\x32$.google.privacy.dlp.v2.ContentOption\x12:\n\x08rule_set\x18\n \x03(\x0b\x32(.google.privacy.dlp.v2.InspectionRuleSet\x1a\x83\x01\n\x12InfoTypeLikelihood\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x1a\x91\x02\n\rFindingLimits\x12\x1d\n\x15max_findings_per_item\x18\x01 \x01(\x05\x12 \n\x18max_findings_per_request\x18\x02 \x01(\x05\x12\x64\n\x1amax_findings_per_info_type\x18\x03 \x03(\x0b\x32@.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit\x1aY\n\rInfoTypeLimit\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x14\n\x0cmax_findings\x18\x02 \x01(\x05\"\xf9\x02\n\x0f\x42yteContentItem\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.privacy.dlp.v2.ByteContentItem.BytesType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x97\x02\n\tBytesType\x12\x1a\n\x16\x42YTES_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05IMAGE\x10\x06\x12\x0e\n\nIMAGE_JPEG\x10\x01\x12\r\n\tIMAGE_BMP\x10\x02\x12\r\n\tIMAGE_PNG\x10\x03\x12\r\n\tIMAGE_SVG\x10\x04\x12\r\n\tTEXT_UTF8\x10\x05\x12\x11\n\rWORD_DOCUMENT\x10\x07\x12\x07\n\x03PDF\x10\x08\x12\x17\n\x13POWERPOINT_DOCUMENT\x10\t\x12\x12\n\x0e\x45XCEL_DOCUMENT\x10\n\x12\x08\n\x04\x41VRO\x10\x0b\x12\x07\n\x03\x43SV\x10\x0c\x12\x07\n\x03TSV\x10\r\x12\t\n\x05\x41UDIO\x10\x0f\x12\t\n\x05VIDEO\x10\x10\x12\x0e\n\nEXECUTABLE\x10\x11\x12\x0c\n\x08\x41I_MODEL\x10\x12\"\x97\x01\n\x0b\x43ontentItem\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12-\n\x05table\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.TableH\x00\x12;\n\tbyte_item\x18\x05 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItemH\x00\x42\x0b\n\tdata_item\"\x9d\x01\n\x05Table\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12.\n\x04rows\x18\x02 \x03(\x0b\x32 .google.privacy.dlp.v2.Table.Row\x1a\x33\n\x03Row\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"]\n\rInspectResult\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xdf\x05\n\x07\x46inding\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x32\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x03 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nquote_info\x18\x07 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\x35\n\rresource_name\x18\x08 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x38\n\x0ctrigger_name\x18\t \x01(\tB\"\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12:\n\x06labels\x18\n \x03(\x0b\x32*.google.privacy.dlp.v2.Finding.LabelsEntry\x12\x33\n\x0fjob_create_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x08job_name\x18\r \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x12\n\nfinding_id\x18\x0f \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:[\xea\x41X\n\x1a\x64lp.googleapis.com/Finding\x12:projects/{project}/locations/{location}/findings/{finding}\"\xeb\x01\n\x08Location\x12\x30\n\nbyte_range\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x35\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x41\n\x11\x63ontent_locations\x18\x07 \x03(\x0b\x32&.google.privacy.dlp.v2.ContentLocation\x12\x33\n\tcontainer\x18\x08 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\"\x97\x03\n\x0f\x43ontentLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12@\n\x0frecord_location\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.RecordLocationH\x00\x12>\n\x0eimage_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.ImageLocationH\x00\x12\x44\n\x11\x64ocument_location\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.DocumentLocationH\x00\x12\x44\n\x11metadata_location\x18\x08 \x01(\x0b\x32\'.google.privacy.dlp.v2.MetadataLocationH\x00\x12\x37\n\x13\x63ontainer_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x07 \x01(\tB\n\n\x08location\"\x94\x01\n\x10MetadataLocation\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.google.privacy.dlp.v2.MetadataType\x12\x44\n\rstorage_label\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.StorageMetadataLabelH\x00\x42\x07\n\x05label\"#\n\x14StorageMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"\'\n\x10\x44ocumentLocation\x12\x13\n\x0b\x66ile_offset\x18\x01 \x01(\x03\"\xb6\x01\n\x0eRecordLocation\x12\x34\n\nrecord_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.RecordKey\x12\x30\n\x08\x66ield_id\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12<\n\x0etable_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.TableLocation\"\"\n\rTableLocation\x12\x11\n\trow_index\x18\x01 \x01(\x03\"\xac\x01\n\tContainer\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tfull_path\x18\x03 \x01(\t\x12\x11\n\troot_path\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"K\n\rImageLocation\x12:\n\x0e\x62ounding_boxes\x18\x01 \x03(\x0b\x32\".google.privacy.dlp.v2.BoundingBox\"G\n\x0b\x42oundingBox\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xfc\x03\n\x12RedactImageRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x13\n\x0blocation_id\x18\x08 \x01(\t\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12_\n\x17image_redaction_configs\x18\x05 \x03(\x0b\x32>.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig\x12\x18\n\x10include_findings\x18\x06 \x01(\x08\x12\x39\n\tbyte_item\x18\x07 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItem\x1a\xa8\x01\n\x14ImageRedactionConfig\x12\x34\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x19\n\x0fredact_all_text\x18\x02 \x01(\x08H\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ColorB\x08\n\x06target\"1\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\"\x83\x01\n\x13RedactImageResponse\x12\x16\n\x0eredacted_image\x18\x01 \x01(\x0c\x12\x16\n\x0e\x65xtracted_text\x18\x02 \x01(\t\x12<\n\x0einspect_result\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xd8\x02\n\x18\x44\x65identifyContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11\x64\x65identify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18\x64\x65identify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19\x44\x65identifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xdb\x02\n\x18ReidentifyContentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11reidentify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18reidentify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19ReidentifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xef\x01\n\x15InspectContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"N\n\x16InspectContentResponse\x12\x34\n\x06result\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xb7\x02\n\x13OutputStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x12N\n\routput_schema\x18\x03 \x01(\x0e\x32\x37.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema\"\x90\x01\n\x0cOutputSchema\x12\x1d\n\x19OUTPUT_SCHEMA_UNSPECIFIED\x10\x00\x12\x11\n\rBASIC_COLUMNS\x10\x01\x12\x0f\n\x0bGCS_COLUMNS\x10\x02\x12\x15\n\x11\x44\x41TASTORE_COLUMNS\x10\x03\x12\x15\n\x11\x42IG_QUERY_COLUMNS\x10\x04\x12\x0f\n\x0b\x41LL_COLUMNS\x10\x05\x42\x06\n\x04type\"R\n\rInfoTypeStats\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc0\x04\n\x18InspectDataSourceDetails\x12[\n\x11requested_options\x18\x02 \x01(\x0b\x32@.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions\x12\x46\n\x06result\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.InspectDataSourceDetails.Result\x1a\x9a\x01\n\x10RequestedOptions\x12I\n\x19snapshot_inspect_template\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12;\n\njob_config\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfig\x1a\xe1\x01\n\x06Result\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x02 \x01(\x03\x12=\n\x0finfo_type_stats\x18\x03 \x03(\x0b\x32$.google.privacy.dlp.v2.InfoTypeStats\x12\x1a\n\x12num_rows_processed\x18\x05 \x01(\x03\x12\x44\n\x0chybrid_stats\x18\x07 \x01(\x0b\x32..google.privacy.dlp.v2.HybridInspectStatistics\"\xff\x01\n\x1c\x44\x61taProfileBigQueryRowSchema\x12@\n\rtable_profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfileH\x00\x12\x42\n\x0e\x63olumn_profile\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfileH\x00\x12I\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfileH\x00\x42\x0e\n\x0c\x64\x61ta_profile\"`\n\x17HybridInspectStatistics\x12\x17\n\x0fprocessed_count\x18\x01 \x01(\x03\x12\x15\n\raborted_count\x18\x02 \x01(\x03\x12\x15\n\rpending_count\x18\x03 \x01(\x03\"l\n\rActionDetails\x12P\n\x12\x64\x65identify_details\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DeidentifyDataSourceDetailsH\x00\x42\t\n\x07\x64\x65tails\"x\n\x19\x44\x65identifyDataSourceStats\x12\x19\n\x11transformed_bytes\x18\x01 \x01(\x03\x12\x1c\n\x14transformation_count\x18\x02 \x01(\x03\x12\"\n\x1atransformation_error_count\x18\x03 \x01(\x03\"\xf2\x03\n\x1b\x44\x65identifyDataSourceDetails\x12h\n\x11requested_options\x18\x01 \x01(\x0b\x32M.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions\x12J\n\x10\x64\x65identify_stats\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DeidentifyDataSourceStats\x1a\x9c\x02\n\x1aRequestedDeidentifyOptions\x12O\n\x1csnapshot_deidentify_template\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Z\n\'snapshot_structured_deidentify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Q\n\x1esnapshot_image_redact_template\x18\x03 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\"\xfc\x02\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x0csupported_by\x18\x03 \x03(\x0e\x32*.google.privacy.dlp.v2.InfoTypeSupportedBy\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0f\n\x07\x65xample\x18\x08 \x01(\t\x12;\n\x08versions\x18\t \x03(\x0b\x32).google.privacy.dlp.v2.VersionDescription\x12;\n\ncategories\x18\n \x03(\x0b\x32\'.google.privacy.dlp.v2.InfoTypeCategory\x12\x42\n\x11sensitivity_score\x18\x0b \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12\x1b\n\x13specific_info_types\x18\x0c \x03(\t\"\x83\n\n\x10InfoTypeCategory\x12U\n\x11location_category\x18\x01 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.LocationCategoryH\x00\x12U\n\x11industry_category\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategoryH\x00\x12M\n\rtype_category\x18\x03 \x01(\x0e\x32\x34.google.privacy.dlp.v2.InfoTypeCategory.TypeCategoryH\x00\"\xe2\x05\n\x10LocationCategory\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\r\n\tARGENTINA\x10\x02\x12\x0b\n\x07\x41RMENIA\x10\x33\x12\r\n\tAUSTRALIA\x10\x03\x12\x0e\n\nAZERBAIJAN\x10\x30\x12\x0b\n\x07\x42\x45LARUS\x10\x32\x12\x0b\n\x07\x42\x45LGIUM\x10\x04\x12\n\n\x06\x42RAZIL\x10\x05\x12\n\n\x06\x43\x41NADA\x10\x06\x12\t\n\x05\x43HILE\x10\x07\x12\t\n\x05\x43HINA\x10\x08\x12\x0c\n\x08\x43OLOMBIA\x10\t\x12\x0b\n\x07\x43ROATIA\x10*\x12\x0b\n\x07\x43ZECHIA\x10\x34\x12\x0b\n\x07\x44\x45NMARK\x10\n\x12\n\n\x06\x46RANCE\x10\x0b\x12\x0b\n\x07\x46INLAND\x10\x0c\x12\x0b\n\x07GERMANY\x10\r\x12\r\n\tHONG_KONG\x10\x0e\x12\t\n\x05INDIA\x10\x0f\x12\r\n\tINDONESIA\x10\x10\x12\x0b\n\x07IRELAND\x10\x11\x12\n\n\x06ISRAEL\x10\x12\x12\t\n\x05ITALY\x10\x13\x12\t\n\x05JAPAN\x10\x14\x12\x0e\n\nKAZAKHSTAN\x10/\x12\t\n\x05KOREA\x10\x15\x12\n\n\x06MEXICO\x10\x16\x12\x13\n\x0fTHE_NETHERLANDS\x10\x17\x12\x0f\n\x0bNEW_ZEALAND\x10)\x12\n\n\x06NORWAY\x10\x18\x12\x0c\n\x08PARAGUAY\x10\x19\x12\x08\n\x04PERU\x10\x1a\x12\n\n\x06POLAND\x10\x1b\x12\x0c\n\x08PORTUGAL\x10\x1c\x12\n\n\x06RUSSIA\x10,\x12\r\n\tSINGAPORE\x10\x1d\x12\x10\n\x0cSOUTH_AFRICA\x10\x1e\x12\t\n\x05SPAIN\x10\x1f\x12\n\n\x06SWEDEN\x10 \x12\x0f\n\x0bSWITZERLAND\x10+\x12\n\n\x06TAIWAN\x10!\x12\x0c\n\x08THAILAND\x10\"\x12\n\n\x06TURKEY\x10#\x12\x0b\n\x07UKRAINE\x10-\x12\x12\n\x0eUNITED_KINGDOM\x10$\x12\x11\n\rUNITED_STATES\x10%\x12\x0b\n\x07URUGUAY\x10&\x12\x0e\n\nUZBEKISTAN\x10.\x12\r\n\tVENEZUELA\x10\'\x12\x0c\n\x08INTERNAL\x10(\"]\n\x10IndustryCategory\x12\x18\n\x14INDUSTRY_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\n\n\x06HEALTH\x10\x02\x12\x16\n\x12TELECOMMUNICATIONS\x10\x03\"\xa1\x01\n\x0cTypeCategory\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03PII\x10\x01\x12\x08\n\x04SPII\x10\x02\x12\x0f\n\x0b\x44\x45MOGRAPHIC\x10\x03\x12\x0e\n\nCREDENTIAL\x10\x04\x12\x11\n\rGOVERNMENT_ID\x10\x05\x12\x0c\n\x08\x44OCUMENT\x10\x06\x12\x1a\n\x16\x43ONTEXTUAL_INFORMATION\x10\x07\x12\n\n\x06\x43USTOM\x10\x08\x42\n\n\x08\x63\x61tegory\":\n\x12VersionDescription\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"b\n\x14ListInfoTypesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x13\n\x0blocation_id\x18\x03 \x01(\t\"W\n\x15ListInfoTypesResponse\x12>\n\ninfo_types\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.InfoTypeDescription\"\xc1\x01\n\x15RiskAnalysisJobConfig\x12<\n\x0eprivacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12:\n\x0csource_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xbc\x01\n\x07QuasiId\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\"\xbe\x02\n\x10StatisticalTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12T\n\tquasi_ids\x18\x01 \x03(\x0b\x32<.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aY\n\x14QuasiIdentifierField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\"\x93\x0f\n\rPrivacyMetric\x12[\n\x16numerical_stats_config\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigH\x00\x12_\n\x18\x63\x61tegorical_stats_config\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigH\x00\x12S\n\x12k_anonymity_config\x18\x03 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigH\x00\x12S\n\x12l_diversity_config\x18\x04 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigH\x00\x12\\\n\x17k_map_estimation_config\x18\x05 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigH\x00\x12n\n delta_presence_estimation_config\x18\x06 \x01(\x0b\x32\x42.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigH\x00\x1a\x45\n\x14NumericalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1aG\n\x16\x43\x61tegoricalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1ay\n\x10KAnonymityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x32\n\tentity_id\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EntityId\x1a\x82\x01\n\x10LDiversityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12;\n\x13sensitive_attribute\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1a\x81\x06\n\x14KMapEstimationConfig\x12]\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x62\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32H.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable\x1a\xc0\x01\n\x0bTaggedField\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\x1a\xcd\x02\n\x0e\x41uxiliaryTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12m\n\tquasi_ids\x18\x01 \x03(\x0b\x32U.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aQ\n\x0cQuasiIdField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\x1a\xaf\x01\n\x1d\x44\x65ltaPresenceEstimationConfig\x12\x36\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.QuasiIdB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x41\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32\'.google.privacy.dlp.v2.StatisticalTableB\x06\n\x04type\"\xc1\x1f\n\x1c\x41nalyzeDataSourceRiskDetails\x12\x46\n\x18requested_privacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12\x44\n\x16requested_source_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12j\n\x16numerical_stats_result\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultH\x00\x12n\n\x18\x63\x61tegorical_stats_result\x18\x04 \x01(\x0b\x32J.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultH\x00\x12\x62\n\x12k_anonymity_result\x18\x05 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultH\x00\x12\x62\n\x12l_diversity_result\x18\x06 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultH\x00\x12k\n\x17k_map_estimation_result\x18\x07 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultH\x00\x12}\n delta_presence_estimation_result\x18\t \x01(\x0b\x32Q.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultH\x00\x12k\n\x11requested_options\x18\n \x01(\x0b\x32P.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions\x1a\xaf\x01\n\x14NumericalStatsResult\x12/\n\tmin_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12/\n\tmax_value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x35\n\x0fquantile_values\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1a\x8d\x03\n\x16\x43\x61tegoricalStatsResult\x12\x95\x01\n!value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32j.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket\x1a\xda\x01\n\x1f\x43\x61tegoricalStatsHistogramBucket\x12#\n\x1bvalue_frequency_lower_bound\x18\x01 \x01(\x03\x12#\n\x1bvalue_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12<\n\rbucket_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb5\x04\n\x10KAnonymityResult\x12\x8b\x01\n#equivalence_class_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket\x1at\n\x1aKAnonymityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x1a\x9c\x02\n\x19KAnonymityHistogramBucket\x12*\n\"equivalence_class_size_lower_bound\x18\x01 \x01(\x03\x12*\n\"equivalence_class_size_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb0\x05\n\x10LDiversityResult\x12\x93\x01\n+sensitive_value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket\x1a\xe0\x01\n\x1aLDiversityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x12%\n\x1dnum_distinct_sensitive_values\x18\x03 \x01(\x03\x12\x43\n\x14top_sensitive_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x1a\xa2\x02\n\x19LDiversityHistogramBucket\x12-\n%sensitive_value_frequency_lower_bound\x18\x01 \x01(\x03\x12-\n%sensitive_value_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\x95\x04\n\x14KMapEstimationResult\x12\x8a\x01\n\x1ak_map_estimation_histogram\x18\x01 \x03(\x0b\x32\x66.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket\x1ar\n\x1bKMapEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1b\n\x13\x65stimated_anonymity\x18\x02 \x01(\x03\x1a\xfb\x01\n\x1dKMapEstimationHistogramBucket\x12\x15\n\rmin_anonymity\x18\x01 \x01(\x03\x12\x15\n\rmax_anonymity\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12{\n\rbucket_values\x18\x06 \x03(\x0b\x32\x64.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a\xe4\x04\n\x1d\x44\x65ltaPresenceEstimationResult\x12\xa5\x01\n#delta_presence_estimation_histogram\x18\x01 \x03(\x0b\x32x.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket\x1a}\n$DeltaPresenceEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1d\n\x15\x65stimated_probability\x18\x02 \x01(\x01\x1a\x9b\x02\n&DeltaPresenceEstimationHistogramBucket\x12\x17\n\x0fmin_probability\x18\x01 \x01(\x01\x12\x17\n\x0fmax_probability\x18\x02 \x01(\x01\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12\x8d\x01\n\rbucket_values\x18\x06 \x03(\x0b\x32v.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a`\n\x1cRequestedRiskAnalysisOptions\x12@\n\njob_config\x18\x01 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigB\x08\n\x06result\"L\n\x0eValueFrequency\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb3\x02\n\x05Value\x12\x17\n\rinteger_value\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x17\n\rboolean_value\x18\x04 \x01(\x08H\x00\x12\x35\n\x0ftimestamp_value\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12,\n\ntime_value\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\x12\'\n\ndate_value\x18\x07 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x33\n\x11\x64\x61y_of_week_value\x18\x08 \x01(\x0e\x32\x16.google.type.DayOfWeekH\x00\x42\x06\n\x04type\"Q\n\tQuoteInfo\x12\x34\n\tdate_time\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DateTimeH\x00\x42\x0e\n\x0cparsed_quote\"\xdf\x01\n\x08\x44\x61teTime\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12;\n\ttime_zone\x18\x04 \x01(\x0b\x32(.google.privacy.dlp.v2.DateTime.TimeZone\x1a\"\n\x08TimeZone\x12\x16\n\x0eoffset_minutes\x18\x01 \x01(\x05\"\xf2\x02\n\x10\x44\x65identifyConfig\x12S\n\x19info_type_transformations\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x12N\n\x16record_transformations\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.RecordTransformationsH\x00\x12L\n\x15image_transformations\x18\x04 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageTransformationsH\x00\x12Y\n\x1dtransformation_error_handling\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.TransformationErrorHandlingB\x10\n\x0etransformation\"\xe5\x04\n\x14ImageTransformations\x12S\n\ntransforms\x18\x02 \x03(\x0b\x32?.google.privacy.dlp.v2.ImageTransformations.ImageTransformation\x1a\xf7\x03\n\x13ImageTransformation\x12p\n\x13selected_info_types\x18\x04 \x01(\x0b\x32Q.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesH\x00\x12\x66\n\x0e\x61ll_info_types\x18\x05 \x01(\x0b\x32L.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesH\x00\x12[\n\x08\x61ll_text\x18\x06 \x01(\x0b\x32G.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextH\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Color\x1aM\n\x11SelectedInfoTypes\x12\x38\n\ninfo_types\x18\x05 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeB\x03\xe0\x41\x02\x1a\x0e\n\x0c\x41llInfoTypes\x1a\t\n\x07\x41llTextB\x08\n\x06target\"\x85\x02\n\x1bTransformationErrorHandling\x12T\n\x0bthrow_error\x18\x01 \x01(\x0b\x32=.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorH\x00\x12\x64\n\x13leave_untransformed\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedH\x00\x1a\x0c\n\nThrowError\x1a\x14\n\x12LeaveUntransformedB\x06\n\x04mode\"\xca\x07\n\x17PrimitiveTransformation\x12\x43\n\x0ereplace_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.ReplaceValueConfigH\x00\x12<\n\rredact_config\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.RedactConfigH\x00\x12K\n\x15\x63haracter_mask_config\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CharacterMaskConfigH\x00\x12Y\n\x1d\x63rypto_replace_ffx_fpe_config\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigH\x00\x12V\n\x1b\x66ixed_size_bucketing_config\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.FixedSizeBucketingConfigH\x00\x12\x42\n\x10\x62ucketing_config\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.BucketingConfigH\x00\x12Y\n\x1dreplace_with_info_type_config\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigH\x00\x12\x41\n\x10time_part_config\x18\x08 \x01(\x0b\x32%.google.privacy.dlp.v2.TimePartConfigH\x00\x12\x45\n\x12\x63rypto_hash_config\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.CryptoHashConfigH\x00\x12\x43\n\x11\x64\x61te_shift_config\x18\x0b \x01(\x0b\x32&.google.privacy.dlp.v2.DateShiftConfigH\x00\x12W\n\x1b\x63rypto_deterministic_config\x18\x0c \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoDeterministicConfigH\x00\x12S\n\x19replace_dictionary_config\x18\r \x01(\x0b\x32..google.privacy.dlp.v2.ReplaceDictionaryConfigH\x00\x42\x10\n\x0etransformation\"\xdc\x01\n\x0eTimePartConfig\x12G\n\x0fpart_to_extract\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.TimePartConfig.TimePart\"\x80\x01\n\x08TimePart\x12\x19\n\x15TIME_PART_UNSPECIFIED\x10\x00\x12\x08\n\x04YEAR\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x10\n\x0c\x44\x41Y_OF_MONTH\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x10\n\x0cWEEK_OF_YEAR\x10\x05\x12\x0f\n\x0bHOUR_OF_DAY\x10\x06\"H\n\x10\x43ryptoHashConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\"\xc0\x01\n\x19\x43ryptoDeterministicConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\x12<\n\x13surrogate_info_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"E\n\x12ReplaceValueConfig\x12/\n\tnew_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"q\n\x17ReplaceDictionaryConfig\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x42\x06\n\x04type\"\x1b\n\x19ReplaceWithInfoTypeConfig\"\x0e\n\x0cRedactConfig\"\xb6\x02\n\rCharsToIgnore\x12\x1c\n\x12\x63haracters_to_skip\x18\x01 \x01(\tH\x00\x12_\n\x1b\x63ommon_characters_to_ignore\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnoreH\x00\"\x97\x01\n\x13\x43ommonCharsToIgnore\x12&\n\"COMMON_CHARS_TO_IGNORE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x14\n\x10\x41LPHA_UPPER_CASE\x10\x02\x12\x14\n\x10\x41LPHA_LOWER_CASE\x10\x03\x12\x0f\n\x0bPUNCTUATION\x10\x04\x12\x0e\n\nWHITESPACE\x10\x05\x42\x0c\n\ncharacters\"\xa3\x01\n\x13\x43haracterMaskConfig\x12\x19\n\x11masking_character\x18\x01 \x01(\t\x12\x16\n\x0enumber_to_mask\x18\x02 \x01(\x05\x12\x15\n\rreverse_order\x18\x03 \x01(\x08\x12\x42\n\x14\x63haracters_to_ignore\x18\x04 \x03(\x0b\x32$.google.privacy.dlp.v2.CharsToIgnore\"\xa4\x01\n\x18\x46ixedSizeBucketingConfig\x12\x36\n\x0blower_bound\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x36\n\x0bupper_bound\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_size\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\"\xf0\x01\n\x0f\x42ucketingConfig\x12>\n\x07\x62uckets\x18\x01 \x03(\x0b\x32-.google.privacy.dlp.v2.BucketingConfig.Bucket\x1a\x9c\x01\n\x06\x42ucket\x12)\n\x03min\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12)\n\x03max\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12<\n\x11replacement_value\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\"\xf9\x03\n\x19\x43ryptoReplaceFfxFpeConfig\x12\x39\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyB\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x63\n\x0f\x63ommon_alphabet\x18\x04 \x01(\x0e\x32H.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabetH\x00\x12\x19\n\x0f\x63ustom_alphabet\x18\x05 \x01(\tH\x00\x12\x0f\n\x05radix\x18\x06 \x01(\x05H\x00\x12<\n\x13surrogate_info_type\x18\x08 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\x94\x01\n\x17\x46\x66xCommonNativeAlphabet\x12*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x0f\n\x0bHEXADECIMAL\x10\x02\x12\x1c\n\x18UPPER_CASE_ALPHA_NUMERIC\x10\x03\x12\x11\n\rALPHA_NUMERIC\x10\x04\x42\n\n\x08\x61lphabet\"\xd8\x01\n\tCryptoKey\x12>\n\ttransient\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.TransientCryptoKeyH\x00\x12>\n\tunwrapped\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.UnwrappedCryptoKeyH\x00\x12\x41\n\x0bkms_wrapped\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.KmsWrappedCryptoKeyH\x00\x42\x08\n\x06source\"\'\n\x12TransientCryptoKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"&\n\x12UnwrappedCryptoKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"M\n\x13KmsWrappedCryptoKey\x12\x18\n\x0bwrapped_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x63rypto_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc2\x01\n\x0f\x44\x61teShiftConfig\x12\x1d\n\x10upper_bound_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10lower_bound_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x36\n\ncrypto_key\x18\x04 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyH\x00\x42\x08\n\x06method\"\xa5\x02\n\x17InfoTypeTransformations\x12\x63\n\x0ftransformations\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationB\x03\xe0\x41\x02\x1a\xa4\x01\n\x16InfoTypeTransformation\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12U\n\x18primitive_transformation\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationB\x03\xe0\x41\x02\"\xc0\x02\n\x13\x46ieldTransformation\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x39\n\tcondition\x18\x03 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\x12R\n\x18primitive_transformation\x18\x04 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationH\x00\x12S\n\x19info_type_transformations\x18\x05 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x42\x10\n\x0etransformation\"\xa9\x01\n\x15RecordTransformations\x12I\n\x15\x66ield_transformations\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x45\n\x13record_suppressions\x18\x02 \x03(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\"N\n\x11RecordSuppression\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\"\xdc\x04\n\x0fRecordCondition\x12G\n\x0b\x65xpressions\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.RecordCondition.Expressions\x1a\xae\x01\n\tCondition\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12@\n\x08operator\x18\x03 \x01(\x0e\x32).google.privacy.dlp.v2.RelationalOperatorB\x03\xe0\x41\x02\x12+\n\x05value\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1aR\n\nConditions\x12\x44\n\nconditions\x18\x01 \x03(\x0b\x32\x30.google.privacy.dlp.v2.RecordCondition.Condition\x1a\xfa\x01\n\x0b\x45xpressions\x12\\\n\x10logical_operator\x18\x01 \x01(\x0e\x32\x42.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator\x12G\n\nconditions\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.RecordCondition.ConditionsH\x00\"<\n\x0fLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x42\x06\n\x04type\"\x83\x01\n\x16TransformationOverview\x12\x19\n\x11transformed_bytes\x18\x02 \x01(\x03\x12N\n\x18transformation_summaries\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.TransformationSummary\"\x9f\x05\n\x15TransformationSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x46\n\x0etransformation\x18\x03 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformation\x12I\n\x15\x66ield_transformations\x18\x05 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x41\n\x0frecord_suppress\x18\x06 \x01(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\x12K\n\x07results\x18\x04 \x03(\x0b\x32:.google.privacy.dlp.v2.TransformationSummary.SummaryResult\x12\x19\n\x11transformed_bytes\x18\x07 \x01(\x03\x1a\x84\x01\n\rSummaryResult\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12S\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x45.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"^\n\x18TransformationResultCode\x12*\n&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xb0\x01\n\x19TransformationDescription\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.privacy.dlp.v2.TransformationType\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x11\n\tcondition\x18\x03 \x01(\t\x12\x32\n\tinfo_type\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xc6\x02\n\x15TransformationDetails\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x02 \x01(\t\x12H\n\x0etransformation\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.TransformationDescription\x12I\n\x0estatus_details\x18\x04 \x01(\x0b\x32\x31.google.privacy.dlp.v2.TransformationResultStatus\x12\x19\n\x11transformed_bytes\x18\x05 \x01(\x03\x12N\n\x17transformation_location\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationLocation\"\xd9\x01\n\x16TransformationLocation\x12\x14\n\nfinding_id\x18\x01 \x01(\tH\x00\x12L\n\x15record_transformation\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.RecordTransformationH\x00\x12J\n\x0e\x63ontainer_type\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.TransformationContainerTypeB\x0f\n\rlocation_type\"\x9c\x01\n\x14RecordTransformation\x12\x30\n\x08\x66ield_id\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x13\x63ontainer_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x03 \x01(\t\"\x94\x01\n\x1aTransformationResultStatus\x12Q\n\x12result_status_type\x18\x01 \x01(\x0e\x32\x35.google.privacy.dlp.v2.TransformationResultStatusType\x12#\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\"TransformationDetailsStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x42\x06\n\x04type\"U\n\x08Schedule\x12?\n\x1arecurrence_period_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x42\x08\n\x06option\"\x08\n\x06Manual\"\xc2\x04\n\x0fInspectTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0einspect_config\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig:\xc6\x02\xea\x41\xc2\x02\n\"dlp.googleapis.com/InspectTemplate\x12@organizations/{organization}/inspectTemplates/{inspect_template}\x12\x36projects/{project}/inspectTemplates/{inspect_template}\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\"\xe6\x04\n\x12\x44\x65identifyTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x11\x64\x65identify_config\x18\x06 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig:\xe1\x02\xea\x41\xdd\x02\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46organizations/{organization}/deidentifyTemplates/{deidentify_template}\x12\n\x0binspect_job\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12;\n\x08triggers\x18\x05 \x03(\x0b\x32).google.privacy.dlp.v2.JobTrigger.Trigger\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06status\x18\n \x01(\x0e\x32(.google.privacy.dlp.v2.JobTrigger.StatusB\x03\xe0\x41\x02\x1az\n\x07Trigger\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.ScheduleH\x00\x12/\n\x06manual\x18\x02 \x01(\x0b\x32\x1d.google.privacy.dlp.v2.ManualH\x00\x42\t\n\x07trigger\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCANCELLED\x10\x03:\x94\x01\xea\x41\x90\x01\n\x1d\x64lp.googleapis.com/JobTrigger\x12,projects/{project}/jobTriggers/{job_trigger}\x12\x41projects/{project}/locations/{location}/jobTriggers/{job_trigger}B\x05\n\x03job\"\xea\x08\n\x06\x41\x63tion\x12\x43\n\rsave_findings\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.Action.SaveFindingsH\x00\x12@\n\x07pub_sub\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.Action.PublishToPubSubH\x00\x12U\n\x17publish_summary_to_cscc\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishSummaryToCsccH\x00\x12q\n&publish_findings_to_cloud_data_catalog\x18\x05 \x01(\x0b\x32?.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogH\x00\x12>\n\ndeidentify\x18\x07 \x01(\x0b\x32(.google.privacy.dlp.v2.Action.DeidentifyH\x00\x12V\n\x17job_notification_emails\x18\x08 \x01(\x0b\x32\x33.google.privacy.dlp.v2.Action.JobNotificationEmailsH\x00\x12T\n\x16publish_to_stackdriver\x18\t \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishToStackdriverH\x00\x1aQ\n\x0cSaveFindings\x12\x41\n\routput_config\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.OutputStorageConfig\x1a \n\x0fPublishToPubSub\x12\r\n\x05topic\x18\x01 \x01(\t\x1a\x16\n\x14PublishSummaryToCscc\x1a#\n!PublishFindingsToCloudDataCatalog\x1a\xb3\x02\n\nDeidentify\x12J\n\x15transformation_config\x18\x07 \x01(\x0b\x32+.google.privacy.dlp.v2.TransformationConfig\x12h\n%transformation_details_storage_config\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.TransformationDetailsStorageConfig\x12#\n\x14\x63loud_storage_output\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12@\n\x17\x66ile_types_to_transform\x18\x08 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileTypeB\x08\n\x06output\x1a\x17\n\x15JobNotificationEmails\x1a\x16\n\x14PublishToStackdriverB\x08\n\x06\x61\x63tion\"z\n\x14TransformationConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12&\n\x1estructured_deidentify_template\x18\x02 \x01(\t\x12\x1d\n\x15image_redact_template\x18\x04 \x01(\t\"\xcb\x01\n\x1c\x43reateInspectTemplateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x45\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xcb\x01\n\x1cUpdateInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12@\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xa7\x01\n\x1bListInspectTemplatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"z\n\x1cListInspectTemplatesResponse\x12\x41\n\x11inspect_templates\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xb6\x01\n\x17\x43reateJobTriggerRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12;\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTriggerB\x03\xe0\x41\x02\x12\x12\n\ntrigger_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"P\n\x19\x41\x63tivateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb7\x01\n\x17UpdateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12\x36\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14GetJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb4\x01\n\x1c\x43reateDiscoveryConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12\x11\n\tconfig_id\x18\x03 \x01(\t\"\xd0\x01\n\x1cUpdateDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\x92\x01\n\x1bListDiscoveryConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\"z\n\x1cListDiscoveryConfigsResponse\x12\x41\n\x11\x64iscovery_configs\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\xf6\x01\n\x13\x43reateDlpJobRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12>\n\x0binspect_job\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12@\n\x08risk_job\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigH\x00\x12\x0e\n\x06job_id\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\tB\x05\n\x03job\"\xde\x01\n\x16ListJobTriggersRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12/\n\x04type\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"k\n\x17ListJobTriggersResponse\x12\x37\n\x0cjob_triggers\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x17\x44\x65leteJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xdd\x01\n\x10InspectJobConfig\x12<\n\x0estorage_config\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.StorageConfig\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x1d\n\x15inspect_template_name\x18\x03 \x01(\t\x12.\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xcc\x0c\n\x11\x44\x61taProfileAction\x12\x46\n\x0b\x65xport_data\x18\x01 \x01(\x0b\x32/.google.privacy.dlp.v2.DataProfileAction.ExportH\x00\x12[\n\x14pub_sub_notification\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationH\x00\x12[\n\x14publish_to_chronicle\x18\x03 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PublishToChronicleH\x00\x12\x61\n\x0epublish_to_scc\x18\x04 \x01(\x0b\x32G.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenterH\x00\x12N\n\rtag_resources\x18\x08 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DataProfileAction.TagResourcesH\x00\x1a\x8a\x01\n\x06\x45xport\x12;\n\rprofile_table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x43\n\x15sample_findings_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x1a\x82\x03\n\x12PubSubNotification\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\x12K\n\x10pubsub_condition\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfilePubSubCondition\x12\x62\n\x11\x64\x65tail_of_message\x18\x04 \x01(\x0e\x32G.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel\"i\n\x0b\x44\x65tailLevel\x12\x1c\n\x18\x44\x45TAIL_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rTABLE_PROFILE\x10\x01\x12\x11\n\rRESOURCE_NAME\x10\x02\x12\x16\n\x12\x46ILE_STORE_PROFILE\x10\x03\x1a\x14\n\x12PublishToChronicle\x1a \n\x1ePublishToSecurityCommandCenter\x1a\xb6\x03\n\x0cTagResources\x12Z\n\x0etag_conditions\x18\x01 \x03(\x0b\x32\x42.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition\x12L\n\x1aprofile_generations_to_tag\x18\x02 \x03(\x0e\x32(.google.privacy.dlp.v2.ProfileGeneration\x12\x1e\n\x16lower_data_risk_to_low\x18\x03 \x01(\x08\x1a\xa9\x01\n\x0cTagCondition\x12K\n\x03tag\x18\x01 \x01(\x0b\x32>.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue\x12\x44\n\x11sensitivity_score\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScoreH\x00\x42\x06\n\x04type\x1a\x30\n\x08TagValue\x12\x1a\n\x10namespaced_value\x18\x01 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"u\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_PROFILE\x10\x01\x12\x13\n\x0f\x43HANGED_PROFILE\x10\x02\x12\x13\n\x0fSCORE_INCREASED\x10\x03\x12\x11\n\rERROR_CHANGED\x10\x04\x42\x08\n\x06\x61\x63tion\"\x80\x03\n\x12\x44\x61taProfileFinding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x31\n\x08infotype\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\nquote_info\x18\x03 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\"\n\x1a\x64\x61ta_profile_resource_name\x18\x04 \x01(\t\x12\x12\n\nfinding_id\x18\x05 \x01(\t\x12-\n\ttimestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x08location\x18\x07 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfileFindingLocation\x12\x46\n\x13resource_visibility\x18\x08 \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\"\xb7\x01\n\x1a\x44\x61taProfileFindingLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12g\n$data_profile_finding_record_location\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DataProfileFindingRecordLocationH\x00\x42\x18\n\x16location_extra_details\"Q\n DataProfileFindingRecordLocation\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"\xae\x02\n\x14\x44\x61taProfileJobConfig\x12<\n\x08location\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.DataProfileLocation\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x61\n\x1dother_cloud_starting_location\x18\x08 \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x07 \x03(\t\x12\x46\n\x14\x64\x61ta_profile_actions\x18\x06 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\"[\n\rBigQueryRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x18\n\x10\x64\x61taset_id_regex\x18\x02 \x01(\t\x12\x16\n\x0etable_id_regex\x18\x03 \x01(\t\"I\n\x0f\x42igQueryRegexes\x12\x36\n\x08patterns\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2.BigQueryRegex\"M\n\x12\x42igQueryTableTypes\x12\x37\n\x05types\x18\x01 \x03(\x0e\x32(.google.privacy.dlp.v2.BigQueryTableType\"\n\n\x08\x44isabled\"Q\n\x13\x44\x61taProfileLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\xeb\x07\n\x0f\x44iscoveryConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x44\n\norg_config\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig\x12\x61\n\x1dother_cloud_starting_location\x18\x0c \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x03 \x03(\t\x12\x39\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\x12\x37\n\x07targets\x18\x05 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryTarget\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06status\x18\n \x01(\x0e\x32-.google.privacy.dlp.v2.DiscoveryConfig.StatusB\x03\xe0\x41\x02\x12K\n\x13processing_location\x18\r \x01(\x0b\x32).google.privacy.dlp.v2.ProcessingLocationB\x03\xe0\x41\x01\x1a\x63\n\tOrgConfig\x12\x42\n\x08location\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryStartingLocation\x12\x12\n\nproject_id\x18\x02 \x01(\t\"9\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02:t\xea\x41q\n\"dlp.googleapis.com/DiscoveryConfig\x12Kprojects/{project}/locations/{location}/discoveryConfigs/{discovery_config}\"\xf6\x03\n\x0f\x44iscoveryTarget\x12J\n\x10\x62ig_query_target\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryDiscoveryTargetH\x00\x12J\n\x10\x63loud_sql_target\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.CloudSqlDiscoveryTargetH\x00\x12G\n\x0esecrets_target\x18\x03 \x01(\x0b\x32-.google.privacy.dlp.v2.SecretsDiscoveryTargetH\x00\x12R\n\x14\x63loud_storage_target\x18\x04 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageDiscoveryTargetH\x00\x12N\n\x12other_cloud_target\x18\x05 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudDiscoveryTargetH\x00\x12T\n\x15vertex_dataset_target\x18\x07 \x01(\x0b\x32\x33.google.privacy.dlp.v2.VertexDatasetDiscoveryTargetH\x00\x42\x08\n\x06target\"\xae\x02\n\x17\x42igQueryDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryBigQueryFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryBigQueryConditions\x12\x44\n\x07\x63\x61\x64\x65nce\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DiscoveryGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\x0b\n\tfrequency\"\xa0\x02\n\x17\x44iscoveryBigQueryFilter\x12@\n\x06tables\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryTableCollectionH\x00\x12]\n\x0cother_tables\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTablesH\x00\x12@\n\x0ftable_reference\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.TableReferenceH\x00\x1a\x18\n\x16\x41llOtherBigQueryTablesB\x08\n\x06\x66ilter\"g\n\x17\x42igQueryTableCollection\x12\x41\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryRegexesH\x00\x42\t\n\x07pattern\"\x98\x03\n\x1b\x44iscoveryBigQueryConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x05types\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.BigQueryTableTypesH\x00\x12M\n\x0ftype_collection\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.BigQueryTableTypeCollectionH\x00\x12V\n\ror_conditions\x18\x04 \x01(\x0b\x32?.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions\x1aQ\n\x0cOrConditions\x12\x15\n\rmin_row_count\x18\x01 \x01(\x05\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\n\x0eincluded_types\"\x83\x03\n\x1a\x44iscoveryGenerationCadence\x12V\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence\x12T\n\x16table_modified_cadence\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryTableModifiedCadence\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x12L\n\x11refresh_frequency\x18\x04 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa6\x01\n\x1d\x44iscoveryTableModifiedCadence\x12?\n\x05types\x18\x01 \x03(\x0e\x32\x30.google.privacy.dlp.v2.BigQueryTableModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa8\x01\n\x1e\x44iscoverySchemaModifiedCadence\x12@\n\x05types\x18\x01 \x03(\x0e\x32\x31.google.privacy.dlp.v2.BigQuerySchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"o\n\'DiscoveryInspectTemplateModifiedCadence\x12\x44\n\tfrequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xbf\x02\n\x17\x43loudSqlDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryCloudSqlFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudSqlConditions\x12W\n\x12generation_cadence\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x89\x02\n\x17\x44iscoveryCloudSqlFilter\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DatabaseResourceCollectionH\x00\x12\x42\n\x06others\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AllOtherDatabaseResourcesH\x00\x12W\n\x1b\x64\x61tabase_resource_reference\x18\x03 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DatabaseResourceReferenceH\x00\x42\x08\n\x06\x66ilter\"r\n\x1a\x44\x61tabaseResourceCollection\x12I\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DatabaseResourceRegexesH\x00\x42\t\n\x07pattern\"Y\n\x17\x44\x61tabaseResourceRegexes\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32,.google.privacy.dlp.v2.DatabaseResourceRegex\"\x87\x01\n\x15\x44\x61tabaseResourceRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x16\n\x0einstance_regex\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x61tabase_regex\x18\x03 \x01(\t\x12$\n\x1c\x64\x61tabase_resource_name_regex\x18\x04 \x01(\t\"\x1b\n\x19\x41llOtherDatabaseResources\"\x82\x01\n\x19\x44\x61tabaseResourceReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64\x61tabase\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x64\x61tabase_resource\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xda\x03\n\x1b\x44iscoveryCloudSqlConditions\x12`\n\x10\x64\x61tabase_engines\x18\x01 \x03(\x0e\x32\x41.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngineB\x03\xe0\x41\x01\x12V\n\x05types\x18\x03 \x03(\x0e\x32G.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType\"n\n\x0e\x44\x61tabaseEngine\x12\x1f\n\x1b\x44\x41TABASE_ENGINE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41LL_SUPPORTED_DATABASE_ENGINES\x10\x01\x12\t\n\x05MYSQL\x10\x02\x12\x0c\n\x08POSTGRES\x10\x03\"\x90\x01\n\x14\x44\x61tabaseResourceType\x12&\n\"DATABASE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12.\n*DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES\x10\x01\x12 \n\x1c\x44\x41TABASE_RESOURCE_TYPE_TABLE\x10\x02\"\x97\x05\n\"DiscoveryCloudSqlGenerationCadence\x12p\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32O.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence\x12L\n\x11refresh_frequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x1a\xc5\x02\n\x15SchemaModifiedCadence\x12y\n\x05types\x18\x01 \x03(\x0e\x32j.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"k\n\x1a\x43loudSqlSchemaModification\x12\'\n#SQL_SCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_COLUMNS\x10\x01\x12\x13\n\x0fREMOVED_COLUMNS\x10\x02\"\x18\n\x16SecretsDiscoveryTarget\"\xdb\x02\n\x1b\x43loudStorageDiscoveryTarget\x12G\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudStorageFilterB\x03\xe0\x41\x02\x12L\n\nconditions\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryFileStoreConditionsB\x03\xe0\x41\x01\x12`\n\x12generation_cadence\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadenceB\x03\xe0\x41\x01H\x00\x12\x38\n\x08\x64isabled\x18\x03 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x96\x02\n\x1b\x44iscoveryCloudStorageFilter\x12\x45\n\ncollection\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.FileStoreCollectionB\x03\xe0\x41\x01H\x00\x12\x65\n cloud_storage_resource_reference\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.CloudStorageResourceReferenceB\x03\xe0\x41\x01H\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"i\n\x13\x46ileStoreCollection\x12G\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.FileStoreRegexesB\x03\xe0\x41\x01H\x00\x42\t\n\x07pattern\"P\n\x10\x46ileStoreRegexes\x12<\n\x08patterns\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.FileStoreRegexB\x03\xe0\x41\x02\"p\n\x0e\x46ileStoreRegex\x12L\n\x13\x63loud_storage_regex\x18\x01 \x01(\x0b\x32(.google.privacy.dlp.v2.CloudStorageRegexB\x03\xe0\x41\x01H\x00\x42\x10\n\x0eresource_regex\"R\n\x11\x43loudStorageRegex\x12\x1d\n\x10project_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"R\n\x1d\x43loudStorageResourceReference\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x01\n&DiscoveryCloudStorageGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"\x9b\x05\n\x1f\x44iscoveryCloudStorageConditions\x12{\n\x1aincluded_object_attributes\x18\x01 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttributeB\x03\xe0\x41\x02\x12{\n\x1aincluded_bucket_attributes\x18\x02 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttributeB\x03\xe0\x41\x02\"\xe3\x01\n\x1b\x43loudStorageObjectAttribute\x12.\n*CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_OBJECTS\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08NEARLINE\x10\x03\x12\x0c\n\x08\x43OLDLINE\x10\x04\x12\x0b\n\x07\x41RCHIVE\x10\x05\x12\x0c\n\x08REGIONAL\x10\x06\x12\x12\n\x0eMULTI_REGIONAL\x10\x07\x12 \n\x1c\x44URABLE_REDUCED_AVAILABILITY\x10\x08\"\x97\x01\n\x1b\x43loudStorageBucketAttribute\x12.\n*CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_BUCKETS\x10\x01\x12\x16\n\x12\x41UTOCLASS_DISABLED\x10\x02\x12\x15\n\x11\x41UTOCLASS_ENABLED\x10\x03\"\xf6\x01\n\x1c\x44iscoveryFileStoreConditions\x12\x36\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12/\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12_\n\x18\x63loud_storage_conditions\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.DiscoveryCloudStorageConditionsB\x03\xe0\x41\x01H\x00\x42\x0c\n\nconditions\"\x92\x03\n\x19OtherCloudDiscoveryTarget\x12\x44\n\x10\x64\x61ta_source_type\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceTypeB\x03\xe0\x41\x02\x12\x45\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryOtherCloudFilterB\x03\xe0\x41\x02\x12M\n\nconditions\x18\x03 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryOtherCloudConditionsB\x03\xe0\x41\x01\x12Y\n\x12generation_cadence\x18\x04 \x01(\x0b\x32;.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x05 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x86\x02\n\x19\x44iscoveryOtherCloudFilter\x12I\n\ncollection\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.OtherCloudResourceCollectionH\x00\x12S\n\x0fsingle_resource\x18\x02 \x01(\x0b\x32\x38.google.privacy.dlp.v2.OtherCloudSingleResourceReferenceH\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"v\n\x1cOtherCloudResourceCollection\x12K\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudResourceRegexesH\x00\x42\t\n\x07pattern\"]\n\x19OtherCloudResourceRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32..google.privacy.dlp.v2.OtherCloudResourceRegex\"y\n\x17OtherCloudResourceRegex\x12L\n\x16\x61mazon_s3_bucket_regex\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.AmazonS3BucketRegexH\x00\x42\x10\n\x0eresource_regex\"0\n\x0f\x41wsAccountRegex\x12\x1d\n\x10\x61\x63\x63ount_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\"x\n\x13\x41mazonS3BucketRegex\x12\x41\n\x11\x61ws_account_regex\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.AwsAccountRegex\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n!OtherCloudSingleResourceReference\x12\x41\n\x10\x61mazon_s3_bucket\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.AmazonS3BucketH\x00\x42\n\n\x08resource\"%\n\nAwsAccount\x12\x17\n\naccount_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x0e\x41mazonS3Bucket\x12\x36\n\x0b\x61ws_account\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2.AwsAccount\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x1d\x44iscoveryOtherCloudConditions\x12*\n\x07min_age\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12V\n\x1b\x61mazon_s3_bucket_conditions\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.AmazonS3BucketConditionsH\x00\x42\x0c\n\nconditions\"\xd9\x03\n\x18\x41mazonS3BucketConditions\x12U\n\x0c\x62ucket_types\x18\x01 \x03(\x0e\x32:.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketTypeB\x03\xe0\x41\x01\x12g\n\x16object_storage_classes\x18\x02 \x03(\x0e\x32\x42.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClassB\x03\xe0\x41\x01\"T\n\nBucketType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12TYPE_ALL_SUPPORTED\x10\x01\x12\x18\n\x14TYPE_GENERAL_PURPOSE\x10\x02\"\xa6\x01\n\x12ObjectStorageClass\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_CLASSES\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x1e\n\x1aSTANDARD_INFREQUENT_ACCESS\x10\x04\x12\x1d\n\x19GLACIER_INSTANT_RETRIEVAL\x10\x06\x12\x17\n\x13INTELLIGENT_TIERING\x10\x07\"\xe9\x01\n$DiscoveryOtherCloudGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"W\n\x19\x44iscoveryStartingLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\x87\x02\n#OtherCloudDiscoveryStartingLocation\x12o\n\x0c\x61ws_location\x18\x01 \x01(\x0b\x32W.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocationH\x00\x1a\x63\n\x1c\x41wsDiscoveryStartingLocation\x12\x14\n\naccount_id\x18\x02 \x01(\tH\x00\x12$\n\x1a\x61ll_asset_inventory_assets\x18\x03 \x01(\x08H\x00\x42\x07\n\x05scopeB\n\n\x08location\"\x13\n\x11\x41llOtherResources\"\xd3\x02\n\x1cVertexDatasetDiscoveryTarget\x12H\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryVertexDatasetFilterB\x03\xe0\x41\x02\x12K\n\nconditions\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions\x12\\\n\x12generation_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x8e\x02\n\x1c\x44iscoveryVertexDatasetFilter\x12\x44\n\ncollection\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.VertexDatasetCollectionH\x00\x12\x62\n!vertex_dataset_resource_reference\x18\x02 \x01(\x0b\x32\x35.google.privacy.dlp.v2.VertexDatasetResourceReferenceH\x00\x12:\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesH\x00\x42\x08\n\x06\x66ilter\"s\n\x17VertexDatasetCollection\x12M\n\x16vertex_dataset_regexes\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.VertexDatasetRegexesH\x00\x42\t\n\x07pattern\"X\n\x14VertexDatasetRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.VertexDatasetRegexB\x03\xe0\x41\x02\".\n\x12VertexDatasetRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\"D\n\x1eVertexDatasetResourceReference\x12\"\n\x15\x64\x61taset_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n DiscoveryVertexDatasetConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe2\x01\n\'DiscoveryVertexDatasetGenerationCadence\x12L\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\"\xdc\x06\n\x06\x44lpJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2.DlpJob.JobState\x12K\n\x0crisk_details\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsH\x00\x12J\n\x0finspect_details\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.InspectDataSourceDetailsH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_modified\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10job_trigger_name\x18\n \x01(\t\x12,\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12<\n\x0e\x61\x63tion_details\x18\x0c \x03(\x0b\x32$.google.privacy.dlp.v2.ActionDetails\"o\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06:\x7f\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}B\t\n\x07\x64\x65tails\"C\n\x10GetDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd6\x01\n\x12ListDlpJobsRequest\x12\x31\n\x06parent\x18\x04 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\x04type\x18\x05 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"[\n\x13ListDlpJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.DlpJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x13\x43\x61ncelDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x46inishDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x44\x65leteDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd7\x01\n\x1f\x43reateDeidentifyTemplateRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12K\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xd7\x01\n\x1fUpdateDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x1cGetDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xad\x01\n\x1eListDeidentifyTemplatesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"\x83\x01\n\x1fListDeidentifyTemplatesResponse\x12G\n\x14\x64\x65identify_templates\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1f\x44\x65leteDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xf4\x01\n\x1bLargeCustomDictionaryConfig\x12<\n\x0boutput_path\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePath\x12L\n\x16\x63loud_storage_file_set\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageFileSetH\x00\x12?\n\x0f\x62ig_query_field\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryFieldH\x00\x42\x08\n\x06source\"8\n\x1aLargeCustomDictionaryStats\x12\x1a\n\x12\x61pprox_num_phrases\x18\x01 \x01(\x03\"\xa6\x02\n\x14StoredInfoTypeConfig\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\x17large_custom_dictionary\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.LargeCustomDictionaryConfigH\x00\x12\x46\n\ndictionary\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x05 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x42\x06\n\x04type\"s\n\x13StoredInfoTypeStats\x12T\n\x17large_custom_dictionary\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.LargeCustomDictionaryStatsH\x00\x42\x06\n\x04type\"\xa9\x02\n\x15StoredInfoTypeVersion\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.google.privacy.dlp.v2.StoredInfoTypeState\x12,\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12\x39\n\x05stats\x18\x05 \x01(\x0b\x32*.google.privacy.dlp.v2.StoredInfoTypeStats\"\xf1\x03\n\x0eStoredInfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0f\x63urrent_version\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion\x12\x46\n\x10pending_versions\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion:\xc1\x02\xea\x41\xbd\x02\n!dlp.googleapis.com/StoredInfoType\x12?organizations/{organization}/storedInfoTypes/{stored_info_type}\x12\x35projects/{project}/storedInfoTypes/{stored_info_type}\x12Torganizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}\x12Jprojects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}\"\xcc\x01\n\x1b\x43reateStoredInfoTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfigB\x03\xe0\x41\x02\x12\x1b\n\x13stored_info_type_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xc4\x01\n\x1bUpdateStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x18GetStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\xa5\x01\n\x1aListStoredInfoTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"x\n\x1bListStoredInfoTypesResponse\x12@\n\x11stored_info_types\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.StoredInfoType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x1b\x44\x65leteStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\x94\x01\n\x1eHybridInspectJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8c\x01\n\x1aHybridInspectDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8b\x01\n\x11HybridContentItem\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x44\n\x0f\x66inding_details\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.HybridFindingDetails\"\xb0\x02\n\x14HybridFindingDetails\x12;\n\x11\x63ontainer_details\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\x12\x13\n\x0b\x66ile_offset\x18\x02 \x01(\x03\x12\x12\n\nrow_offset\x18\x03 \x01(\x03\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x12G\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.privacy.dlp.v2.HybridFindingDetails.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x17\n\x15HybridInspectResponse\"\xa8\x01\n\x1eListProjectDataProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/ProjectDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x84\x01\n\x1fListProjectDataProfilesResponse\x12H\n\x15project_data_profiles\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.ProjectDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n\x1cListTableDataProfilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#dlp.googleapis.com/TableDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"~\n\x1dListTableDataProfilesResponse\x12\x44\n\x13table_data_profiles\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa6\x01\n\x1dListColumnDataProfilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dlp.googleapis.com/ColumnDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x81\x01\n\x1eListColumnDataProfilesResponse\x12\x46\n\x14\x63olumn_data_profiles\x18\x01 \x03(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n\rDataRiskLevel\x12\x46\n\x05score\x18\x01 \x01(\x0e\x32\x37.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore\"r\n\x12\x44\x61taRiskLevelScore\x12\x1a\n\x16RISK_SCORE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RISK_LOW\x10\n\x12\x10\n\x0cRISK_UNKNOWN\x10\x0c\x12\x11\n\rRISK_MODERATE\x10\x14\x12\r\n\tRISK_HIGH\x10\x1e\"\xdc\x04\n\x12ProjectDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11sensitivity_score\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x05 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12<\n\x0eprofile_status\x18\x07 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12 \n\x18table_data_profile_count\x18\t \x01(\x03\x12%\n\x1d\x66ile_store_data_profile_count\x18\n \x01(\x03:\xdd\x01\xea\x41\xd9\x01\n%dlp.googleapis.com/ProjectDataProfile\x12\\organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}\x12Rprojects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}\"\xc9\x02\n\x19\x44\x61taProfileConfigSnapshot\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12I\n\x10\x64\x61ta_profile_job\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.DataProfileJobConfigB\x02\x18\x01\x12@\n\x10\x64iscovery_config\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12\x42\n\x1einspect_template_modified_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe3\r\n\x10TableDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18$ \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x02 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x18 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x1d \x01(\t\x12\x12\n\ndataset_id\x18\x19 \x01(\t\x12\x10\n\x08table_id\x18\x1a \x01(\t\x12\x15\n\rfull_resource\x18\x03 \x01(\t\x12<\n\x0eprofile_status\x18\x15 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12<\n\x05state\x18\x16 \x01(\x0e\x32-.google.privacy.dlp.v2.TableDataProfile.State\x12\x42\n\x11sensitivity_score\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12\x44\n\x14predicted_info_types\x18\x1b \x03(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x45\n\x10other_info_types\x18\x1c \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14scanned_column_count\x18\n \x01(\x03\x12\x1b\n\x13\x66\x61iled_column_count\x18\x0b \x01(\x03\x12\x18\n\x10table_size_bytes\x18\x0c \x01(\x03\x12\x11\n\trow_count\x18\r \x01(\x03\x12\x42\n\x11\x65ncryption_status\x18\x0e \x01(\x0e\x32\'.google.privacy.dlp.v2.EncryptionStatus\x12\x46\n\x13resource_visibility\x18\x0f \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12:\n\x16profile_last_generated\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fresource_labels\x18\x11 \x03(\x0b\x32;.google.privacy.dlp.v2.TableDataProfile.ResourceLabelsEntry\x12/\n\x0b\x63reate_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x15sample_findings_table\x18% \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12(\n\x04tags\x18\' \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18) \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xd3\x01\xea\x41\xcf\x01\n#dlp.googleapis.com/TableDataProfile\x12Xorganizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}\x12Nprojects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}\"b\n\rProfileStatus\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"g\n\x0fInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12 \n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x42\x02\x18\x01\"\x88\x01\n\x14OtherInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x1c\n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x12\x1e\n\x16\x65xcluded_from_analysis\x18\x03 \x01(\x08\"\xc9\r\n\x11\x43olumnDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x0eprofile_status\x18\x11 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12=\n\x05state\x18\x12 \x01(\x0e\x32..google.privacy.dlp.v2.ColumnDataProfile.State\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12table_data_profile\x18\x04 \x01(\t\x12\x1b\n\x13table_full_resource\x18\x05 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x13 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x14 \x01(\t\x12\x12\n\ndataset_id\x18\x15 \x01(\t\x12\x10\n\x08table_id\x18\x16 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x06 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x07 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12@\n\x10\x63olumn_info_type\x18\t \x01(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x42\n\rother_matches\x18\n \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12M\n\x19\x65stimated_null_percentage\x18\x17 \x01(\x0e\x32*.google.privacy.dlp.v2.NullPercentageLevel\x12O\n\x1a\x65stimated_uniqueness_score\x18\x18 \x01(\x0e\x32+.google.privacy.dlp.v2.UniquenessScoreLevel\x12\x17\n\x0f\x66ree_text_score\x18\r \x01(\x01\x12L\n\x0b\x63olumn_type\x18\x0e \x01(\x0e\x32\x37.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType\x12P\n\x0cpolicy_state\x18\x0f \x01(\x0e\x32:.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\"\xff\x02\n\x0e\x43olumnDataType\x12 \n\x1c\x43OLUMN_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTYPE_INT64\x10\x01\x12\r\n\tTYPE_BOOL\x10\x02\x12\x10\n\x0cTYPE_FLOAT64\x10\x03\x12\x0f\n\x0bTYPE_STRING\x10\x04\x12\x0e\n\nTYPE_BYTES\x10\x05\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x06\x12\r\n\tTYPE_DATE\x10\x07\x12\r\n\tTYPE_TIME\x10\x08\x12\x11\n\rTYPE_DATETIME\x10\t\x12\x12\n\x0eTYPE_GEOGRAPHY\x10\n\x12\x10\n\x0cTYPE_NUMERIC\x10\x0b\x12\x0f\n\x0bTYPE_RECORD\x10\x0c\x12\x13\n\x0fTYPE_BIGNUMERIC\x10\r\x12\r\n\tTYPE_JSON\x10\x0e\x12\x11\n\rTYPE_INTERVAL\x10\x0f\x12\x13\n\x0fTYPE_RANGE_DATE\x10\x10\x12\x17\n\x13TYPE_RANGE_DATETIME\x10\x11\x12\x18\n\x14TYPE_RANGE_TIMESTAMP\x10\x12\"R\n\x11\x43olumnPolicyState\x12#\n\x1f\x43OLUMN_POLICY_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x43OLUMN_POLICY_TAGGED\x10\x01:\xd8\x01\xea\x41\xd4\x01\n$dlp.googleapis.com/ColumnDataProfile\x12Zorganizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}\x12Pprojects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}\"\xb8\x0e\n\x14\x46ileStoreDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x03 \x01(\t\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x1b\n\x13\x66ile_store_location\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_storage_locations\x18\x13 \x03(\t\x12\x15\n\rlocation_type\x18\x14 \x01(\t\x12\x17\n\x0f\x66ile_store_path\x18\x06 \x01(\t\x12\x15\n\rfull_resource\x18\x18 \x01(\t\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12<\n\x0eprofile_status\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12@\n\x05state\x18\t \x01(\x0e\x32\x31.google.privacy.dlp.v2.FileStoreDataProfile.State\x12:\n\x16profile_last_generated\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x13resource_visibility\x18\x0b \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x42\n\x11sensitivity_score\x18\x0c \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\r \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16\x66ile_cluster_summaries\x18\x10 \x03(\x0b\x32).google.privacy.dlp.v2.FileClusterSummary\x12`\n\x13resource_attributes\x18\x11 \x03(\x0b\x32\x43.google.privacy.dlp.v2.FileStoreDataProfile.ResourceAttributesEntry\x12X\n\x0fresource_labels\x18\x12 \x03(\x0b\x32?.google.privacy.dlp.v2.FileStoreDataProfile.ResourceLabelsEntry\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x15 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x43\n\x15sample_findings_table\x18\x16 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x1b\n\x13\x66ile_store_is_empty\x18\x17 \x01(\x08\x12(\n\x04tags\x18\x19 \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18\x1a \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x1aW\n\x17ResourceAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xe9\x01\xea\x41\xe5\x01\n\'dlp.googleapis.com/FileStoreDataProfile\x12\x61organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\x12Wprojects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\"?\n\x03Tag\x12\x1c\n\x14namespaced_tag_value\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"(\n\x0fRelatedResource\x12\x15\n\rfull_resource\x18\x01 \x01(\t\"N\n\x18\x46ileStoreInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"+\n\x11\x46ileExtensionInfo\x12\x16\n\x0e\x66ile_extension\x18\x01 \x01(\t\"\x8c\x04\n\x12\x46ileClusterSummary\x12\x41\n\x11\x66ile_cluster_type\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.FileClusterType\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12,\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12I\n\x17\x66ile_extensions_scanned\x18\x07 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x46\n\x14\x66ile_extensions_seen\x18\x08 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x16\n\x0eno_files_exist\x18\t \x01(\x08\"[\n\x1cGetProjectDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"]\n\x1eGetFileStoreDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"\xc0\x01\n ListFileStoreDataProfilesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dlp.googleapis.com/FileStoreDataProfile\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!ListFileStoreDataProfilesResponse\x12M\n\x18\x66ile_store_data_profiles\x18\x01 \x03(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n!DeleteFileStoreDataProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dlp.googleapis.com/FileStoreDataProfile\"W\n\x1aGetTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"Y\n\x1bGetColumnDataProfileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dlp.googleapis.com/ColumnDataProfile\"\xea\x05\n\x1a\x44\x61taProfilePubSubCondition\x12X\n\x0b\x65xpressions\x18\x01 \x01(\x0b\x32\x43.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions\x1a\xe9\x01\n\x0fPubSubCondition\x12\x62\n\x12minimum_risk_score\x18\x01 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x12i\n\x19minimum_sensitivity_score\x18\x02 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x42\x07\n\x05value\x1a\xab\x02\n\x11PubSubExpressions\x12s\n\x10logical_operator\x18\x01 \x01(\x0e\x32Y.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator\x12U\n\nconditions\x18\x02 \x03(\x0b\x32\x41.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition\"J\n\x15PubSubLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02OR\x10\x01\x12\x07\n\x03\x41ND\x10\x02\"X\n\x12ProfileScoreBucket\x12$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x12\n\x0eMEDIUM_OR_HIGH\x10\x02\"\xe0\x01\n\x18\x44\x61taProfilePubSubMessage\x12\x38\n\x07profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12G\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\"\x8c\x01\n\x17\x43reateConnectionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\"K\n\x14GetConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x95\x01\n\x16ListConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x18SearchConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x17ListConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x19SearchConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x01\n\x17UpdateConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x17\x44\x65leteConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x90\x03\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2.ConnectionStateB\x03\xe0\x41\x02\x12\x31\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12>\n\tcloud_sql\x18\x04 \x01(\x0b\x32).google.privacy.dlp.v2.CloudSqlPropertiesH\x00:\xb1\x01\xea\x41\xad\x01\n\x1d\x64lp.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}\x12Jorganizations/{organization}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"[\n\x17SecretManagerCredential\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x1cpassword_secret_version_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x43loudSqlIamCredential\"\xb5\x03\n\x12\x43loudSqlProperties\x12\x1f\n\x0f\x63onnection_name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12K\n\x11username_password\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.SecretManagerCredentialH\x00\x12\x45\n\rcloud_sql_iam\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.CloudSqlIamCredentialH\x00\x12\x1c\n\x0fmax_connections\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12V\n\x0f\x64\x61tabase_engine\x18\x07 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngineB\x03\xe0\x41\x02\"f\n\x0e\x44\x61tabaseEngine\x12\x1b\n\x17\x44\x41TABASE_ENGINE_UNKNOWN\x10\x00\x12\x19\n\x15\x44\x41TABASE_ENGINE_MYSQL\x10\x01\x12\x1c\n\x18\x44\x41TABASE_ENGINE_POSTGRES\x10\x02\x42\x0c\n\ncredential\"Z\n\x1d\x44\x65leteTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"*\n\x0e\x44\x61taSourceType\x12\x18\n\x0b\x64\x61ta_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xf4\x02\n\x0f\x46ileClusterType\x12\x41\n\x07\x63luster\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.FileClusterType.ClusterH\x00\"\x88\x02\n\x07\x43luster\x12\x17\n\x13\x43LUSTER_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_UNKNOWN\x10\x01\x12\x10\n\x0c\x43LUSTER_TEXT\x10\x02\x12\x1b\n\x17\x43LUSTER_STRUCTURED_DATA\x10\x03\x12\x17\n\x13\x43LUSTER_SOURCE_CODE\x10\x04\x12\x19\n\x15\x43LUSTER_RICH_DOCUMENT\x10\x05\x12\x11\n\rCLUSTER_IMAGE\x10\x06\x12\x13\n\x0f\x43LUSTER_ARCHIVE\x10\x07\x12\x16\n\x12\x43LUSTER_MULTIMEDIA\x10\x08\x12\x16\n\x12\x43LUSTER_EXECUTABLE\x10\t\x12\x14\n\x10\x43LUSTER_AI_MODEL\x10\nB\x13\n\x11\x66ile_cluster_type\"\xf7\x02\n\x12ProcessingLocation\x12`\n\x17image_fallback_location\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation\x1a\x17\n\x15MultiRegionProcessing\x1a\x12\n\x10GlobalProcessing\x1a\xd1\x01\n\x15ImageFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing*\xa0\x01\n\x1eTransformationResultStatusType\x12\x1a\n\x16STATE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11INVALID_TRANSFORM\x10\x01\x12\"\n\x1e\x42IGQUERY_MAX_ROW_SIZE_EXCEEDED\x10\x02\x12\x1a\n\x16METADATA_UNRETRIEVABLE\x10\x03\x12\x0b\n\x07SUCCESS\x10\x04*\x7f\n\x1bTransformationContainerType\x12\x1f\n\x1bTRANSFORM_UNKNOWN_CONTAINER\x10\x00\x12\x12\n\x0eTRANSFORM_BODY\x10\x01\x12\x16\n\x12TRANSFORM_METADATA\x10\x02\x12\x13\n\x0fTRANSFORM_TABLE\x10\x03*\xe0\x02\n\x12TransformationType\x12#\n\x1fTRANSFORMATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_SUPPRESSION\x10\x01\x12\x11\n\rREPLACE_VALUE\x10\x02\x12\x16\n\x12REPLACE_DICTIONARY\x10\x0f\x12\n\n\x06REDACT\x10\x03\x12\x12\n\x0e\x43HARACTER_MASK\x10\x04\x12\x1a\n\x16\x43RYPTO_REPLACE_FFX_FPE\x10\x05\x12\x18\n\x14\x46IXED_SIZE_BUCKETING\x10\x06\x12\r\n\tBUCKETING\x10\x07\x12\x1a\n\x16REPLACE_WITH_INFO_TYPE\x10\x08\x12\r\n\tTIME_PART\x10\t\x12\x0f\n\x0b\x43RYPTO_HASH\x10\n\x12\x0e\n\nDATE_SHIFT\x10\x0c\x12\x1f\n\x1b\x43RYPTO_DETERMINISTIC_CONFIG\x10\r\x12\x10\n\x0cREDACT_IMAGE\x10\x0e*r\n\x11ProfileGeneration\x12\"\n\x1ePROFILE_GENERATION_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROFILE_GENERATION_NEW\x10\x01\x12\x1d\n\x19PROFILE_GENERATION_UPDATE\x10\x02*\x96\x01\n\x1b\x42igQueryTableTypeCollection\x12$\n BIG_QUERY_COLLECTION_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_COLLECTION_ALL_TYPES\x10\x01\x12-\n)BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES\x10\x02*\xa8\x01\n\x11\x42igQueryTableType\x12$\n BIG_QUERY_TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x42IG_QUERY_TABLE_TYPE_TABLE\x10\x01\x12*\n&BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE\x10\x02\x12!\n\x1d\x42IG_QUERY_TABLE_TYPE_SNAPSHOT\x10\x03*\x94\x01\n\x1a\x44\x61taProfileUpdateFrequency\x12 \n\x1cUPDATE_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPDATE_FREQUENCY_NEVER\x10\x01\x12\x1a\n\x16UPDATE_FREQUENCY_DAILY\x10\x02\x12\x1c\n\x18UPDATE_FREQUENCY_MONTHLY\x10\x04*]\n\x19\x42igQueryTableModification\x12\"\n\x1eTABLE_MODIFICATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18TABLE_MODIFIED_TIMESTAMP\x10\x01*u\n\x1a\x42igQuerySchemaModification\x12#\n\x1fSCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SCHEMA_NEW_COLUMNS\x10\x01\x12\x1a\n\x16SCHEMA_REMOVED_COLUMNS\x10\x02*\xbb\x01\n\x12RelationalOperator\x12#\n\x1fRELATIONAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45QUAL_TO\x10\x01\x12\x10\n\x0cNOT_EQUAL_TO\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x05\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x06\x12\n\n\x06\x45XISTS\x10\x07*\x8d\x01\n\x0cMatchingType\x12\x1d\n\x19MATCHING_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18MATCHING_TYPE_FULL_MATCH\x10\x01\x12\x1f\n\x1bMATCHING_TYPE_PARTIAL_MATCH\x10\x02\x12\x1f\n\x1bMATCHING_TYPE_INVERSE_MATCH\x10\x03*M\n\rContentOption\x12\x17\n\x13\x43ONTENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONTENT_TEXT\x10\x01\x12\x11\n\rCONTENT_IMAGE\x10\x02*B\n\x0cMetadataType\x12\x1c\n\x18METADATATYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STORAGE_METADATA\x10\x02*P\n\x13InfoTypeSupportedBy\x12\x19\n\x15\x45NUM_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INSPECT\x10\x01\x12\x11\n\rRISK_ANALYSIS\x10\x02*R\n\nDlpJobType\x12\x1c\n\x18\x44LP_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINSPECT_JOB\x10\x01\x12\x15\n\x11RISK_ANALYSIS_JOB\x10\x02*n\n\x13StoredInfoTypeState\x12&\n\"STORED_INFO_TYPE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07INVALID\x10\x04*\xa3\x01\n\x12ResourceVisibility\x12#\n\x1fRESOURCE_VISIBILITY_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_VISIBILITY_PUBLIC\x10\n\x12$\n RESOURCE_VISIBILITY_INCONCLUSIVE\x10\x0f\x12\"\n\x1eRESOURCE_VISIBILITY_RESTRICTED\x10\x14*u\n\x10\x45ncryptionStatus\x12!\n\x1d\x45NCRYPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NCRYPTION_GOOGLE_MANAGED\x10\x01\x12\x1f\n\x1b\x45NCRYPTION_CUSTOMER_MANAGED\x10\x02*\xa9\x01\n\x13NullPercentageLevel\x12%\n!NULL_PERCENTAGE_LEVEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18NULL_PERCENTAGE_VERY_LOW\x10\x01\x12\x17\n\x13NULL_PERCENTAGE_LOW\x10\x02\x12\x1a\n\x16NULL_PERCENTAGE_MEDIUM\x10\x03\x12\x18\n\x14NULL_PERCENTAGE_HIGH\x10\x04*\x90\x01\n\x14UniquenessScoreLevel\x12&\n\"UNIQUENESS_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x18\n\x14UNIQUENESS_SCORE_LOW\x10\x01\x12\x1b\n\x17UNIQUENESS_SCORE_MEDIUM\x10\x02\x12\x19\n\x15UNIQUENESS_SCORE_HIGH\x10\x03*f\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13MISSING_CREDENTIALS\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xddv\n\nDlpService\x12\xdb\x01\n\x0eInspectContent\x12,.google.privacy.dlp.v2.InspectContentRequest\x1a-.google.privacy.dlp.v2.InspectContentResponse\"l\x82\xd3\xe4\x93\x02\x66\"\'/v2/{parent=projects/*}/content:inspect:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/content:inspect:\x01*\x12\xcc\x01\n\x0bRedactImage\x12).google.privacy.dlp.v2.RedactImageRequest\x1a*.google.privacy.dlp.v2.RedactImageResponse\"f\x82\xd3\xe4\x93\x02`\"$/v2/{parent=projects/*}/image:redact:\x01*Z5\"0/v2/{parent=projects/*/locations/*}/image:redact:\x01*\x12\xea\x01\n\x11\x44\x65identifyContent\x12/.google.privacy.dlp.v2.DeidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.DeidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:deidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:deidentify:\x01*\x12\xea\x01\n\x11ReidentifyContent\x12/.google.privacy.dlp.v2.ReidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.ReidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:reidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:reidentify:\x01*\x12\x99\x02\n\rListInfoTypes\x12+.google.privacy.dlp.v2.ListInfoTypesRequest\x1a,.google.privacy.dlp.v2.ListInfoTypesResponse\"\xac\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9c\x01\x12\r/v2/infoTypesZ$\x12\"/v2/{parent=locations/*}/infoTypesZ/\x12-/v2/{parent=projects/*/locations/*}/infoTypesZ4\x12\x32/v2/{parent=organizations/*/locations/*}/infoTypes\x12\xf4\x02\n\x15\x43reateInspectTemplate\x12\x33.google.privacy.dlp.v2.CreateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xfd\x01\xda\x41\x17parent,inspect_template\x82\xd3\xe4\x93\x02\xdc\x01\"4/v2/{parent=projects/*/locations/*}/inspectTemplates:\x01*Z>\"9/v2/{parent=organizations/*/locations/*}/inspectTemplates:\x01*Z-\"(/v2/{parent=projects/*}/inspectTemplates:\x01*Z2\"-/v2/{parent=organizations/*}/inspectTemplates:\x01*\x12\xfe\x02\n\x15UpdateInspectTemplate\x12\x33.google.privacy.dlp.v2.UpdateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\x87\x02\xda\x41!name,inspect_template,update_mask\x82\xd3\xe4\x93\x02\xdc\x01\x32\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/inspectTemplates/*}:\x01*Z-2(/v2/{name=projects/*/inspectTemplates/*}:\x01*Z22-/v2/{name=organizations/*/inspectTemplates/*}:\x01*\x12\xcf\x02\n\x12GetInspectTemplate\x12\x30.google.privacy.dlp.v2.GetInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z*\x12(/v2/{name=projects/*/inspectTemplates/*}Z/\x12-/v2/{name=organizations/*/inspectTemplates/*}\x12\xe2\x02\n\x14ListInspectTemplates\x12\x32.google.privacy.dlp.v2.ListInspectTemplatesRequest\x1a\x33.google.privacy.dlp.v2.ListInspectTemplatesResponse\"\xe0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{parent=projects/*/locations/*}/inspectTemplatesZ;\x12\x39/v2/{parent=organizations/*/locations/*}/inspectTemplatesZ*\x12(/v2/{parent=projects/*}/inspectTemplatesZ/\x12-/v2/{parent=organizations/*}/inspectTemplates\x12\xc5\x02\n\x15\x44\x65leteInspectTemplate\x12\x33.google.privacy.dlp.v2.DeleteInspectTemplateRequest\x1a\x16.google.protobuf.Empty\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01*4/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;*9/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z**(/v2/{name=projects/*/inspectTemplates/*}Z/*-/v2/{name=organizations/*/inspectTemplates/*}\x12\x8c\x03\n\x18\x43reateDeidentifyTemplate\x12\x36.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest\x1a).google.privacy.dlp.v2.DeidentifyTemplate\"\x8c\x02\xda\x41\x1aparent,deidentify_template\x82\xd3\xe4\x93\x02\xe8\x01\"0/v2/{parent=organizations/*}/deidentifyTemplates:\x01*ZA\"\x12\x12*\"9/v2/{parent=organizations/*/locations/*}/discoveryConfigs:\x01*\x12\x9a\x02\n\x15UpdateDiscoveryConfig\x12\x33.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\xa3\x01\xda\x41!name,discovery_config,update_mask\x82\xd3\xe4\x93\x02y24/v2/{name=projects/*/locations/*/discoveryConfigs/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/discoveryConfigs/*}:\x01*\x12\xf1\x01\n\x12GetDiscoveryConfig\x12\x30.google.privacy.dlp.v2.GetDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s\x12\x34/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\x84\x02\n\x14ListDiscoveryConfigs\x12\x32.google.privacy.dlp.v2.ListDiscoveryConfigsRequest\x1a\x33.google.privacy.dlp.v2.ListDiscoveryConfigsResponse\"\x82\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x34/v2/{parent=projects/*/locations/*}/discoveryConfigsZ;\x12\x39/v2/{parent=organizations/*/locations/*}/discoveryConfigs\x12\xe7\x01\n\x15\x44\x65leteDiscoveryConfig\x12\x33.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest\x1a\x16.google.protobuf.Empty\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s*4/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;*9/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\xdf\x01\n\x0c\x43reateDlpJob\x12*.google.privacy.dlp.v2.CreateDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"\x83\x01\xda\x41\x12parent,inspect_job\xda\x41\x0fparent,risk_job\x82\xd3\xe4\x93\x02V\"\x1f/v2/{parent=projects/*}/dlpJobs:\x01*Z0\"+/v2/{parent=projects/*/locations/*}/dlpJobs:\x01*\x12\xfb\x01\n\x0bListDlpJobs\x12).google.privacy.dlp.v2.ListDlpJobsRequest\x1a*.google.privacy.dlp.v2.ListDlpJobsResponse\"\x94\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x84\x01\x12\x1f/v2/{parent=projects/*}/dlpJobsZ-\x12+/v2/{parent=projects/*/locations/*}/dlpJobsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/dlpJobs\x12\xb2\x01\n\tGetDlpJob\x12\'.google.privacy.dlp.v2.GetDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12\x1f/v2/{name=projects/*/dlpJobs/*}Z-\x12+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xb1\x01\n\x0c\x44\x65leteDlpJob\x12*.google.privacy.dlp.v2.DeleteDlpJobRequest\x1a\x16.google.protobuf.Empty\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P*\x1f/v2/{name=projects/*/dlpJobs/*}Z-*+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xbe\x01\n\x0c\x43\x61ncelDlpJob\x12*.google.privacy.dlp.v2.CancelDlpJobRequest\x1a\x16.google.protobuf.Empty\"j\x82\xd3\xe4\x93\x02\x64\"&/v2/{name=projects/*/dlpJobs/*}:cancel:\x01*Z7\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel:\x01*\x12\xe3\x02\n\x14\x43reateStoredInfoType\x12\x32.google.privacy.dlp.v2.CreateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xef\x01\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\xd8\x01\",/v2/{parent=organizations/*}/storedInfoTypes:\x01*Z=\"8/v2/{parent=organizations/*/locations/*}/storedInfoTypes:\x01*Z,\"\'/v2/{parent=projects/*}/storedInfoTypes:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/storedInfoTypes:\x01*\x12\xed\x02\n\x14UpdateStoredInfoType\x12\x32.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xf9\x01\xda\x41\x17name,config,update_mask\x82\xd3\xe4\x93\x02\xd8\x01\x32,/v2/{name=organizations/*/storedInfoTypes/*}:\x01*Z=28/v2/{name=organizations/*/locations/*/storedInfoTypes/*}:\x01*Z,2\'/v2/{name=projects/*/storedInfoTypes/*}:\x01*Z823/v2/{name=projects/*/locations/*/storedInfoTypes/*}:\x01*\x12\xc8\x02\n\x11GetStoredInfoType\x12/.google.privacy.dlp.v2.GetStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{name=organizations/*/storedInfoTypes/*}Z:\x12\x38/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)\x12\'/v2/{name=projects/*/storedInfoTypes/*}Z5\x12\x33/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\xdb\x02\n\x13ListStoredInfoTypes\x12\x31.google.privacy.dlp.v2.ListStoredInfoTypesRequest\x1a\x32.google.privacy.dlp.v2.ListStoredInfoTypesResponse\"\xdc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{parent=organizations/*}/storedInfoTypesZ:\x12\x38/v2/{parent=organizations/*/locations/*}/storedInfoTypesZ)\x12\'/v2/{parent=projects/*}/storedInfoTypesZ5\x12\x33/v2/{parent=projects/*/locations/*}/storedInfoTypes\x12\xbf\x02\n\x14\x44\x65leteStoredInfoType\x12\x32.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest\x1a\x16.google.protobuf.Empty\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01*,/v2/{name=organizations/*/storedInfoTypes/*}Z:*8/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)*\'/v2/{name=projects/*/storedInfoTypes/*}Z5*3/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\x93\x02\n\x17ListProjectDataProfiles\x12\x35.google.privacy.dlp.v2.ListProjectDataProfilesRequest\x1a\x36.google.privacy.dlp.v2.ListProjectDataProfilesResponse\"\x88\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12/v2/{parent=organizations/*/locations/*}/fileStoreDataProfilesZ;\x12\x39/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles\x12\x8a\x02\n\x17GetFileStoreDataProfile\x12\x35.google.privacy.dlp.v2.GetFileStoreDataProfileRequest\x1a+.google.privacy.dlp.v2.FileStoreDataProfile\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}\x12>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;\x12\x39/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xfb\x01\n\x1a\x44\x65leteFileStoreDataProfile\x12\x38.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}*>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;*9/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xf6\x01\n\x13GetTableDataProfile\x12\x31.google.privacy.dlp.v2.GetTableDataProfileRequest\x1a\'.google.privacy.dlp.v2.TableDataProfile\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u\x12:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7\x12\x35/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xfb\x01\n\x14GetColumnDataProfile\x12\x32.google.privacy.dlp.v2.GetColumnDataProfileRequest\x1a(.google.privacy.dlp.v2.ColumnDataProfile\"\x84\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02w\x12;/v2/{name=organizations/*/locations/*/columnDataProfiles/*}Z8\x12\x36/v2/{name=projects/*/locations/*/columnDataProfiles/*}\x12\xeb\x01\n\x16\x44\x65leteTableDataProfile\x12\x34.google.privacy.dlp.v2.DeleteTableDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u*:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7*5/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xc3\x01\n\x13HybridInspectDlpJob\x12\x31.google.privacy.dlp.v2.HybridInspectDlpJobRequest\x1a,.google.privacy.dlp.v2.HybridInspectResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect:\x01*\x12\x91\x01\n\x0c\x46inishDlpJob\x12*.google.privacy.dlp.v2.FinishDlpJobRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:finish:\x01*\x12\xf2\x01\n\x10\x43reateConnection\x12..google.privacy.dlp.v2.CreateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"\x8a\x01\xda\x41\x12parent, connection\x82\xd3\xe4\x93\x02o\"//v2/{parent=projects/*/locations/*}/connections:\x01*Z9\"4/v2/{parent=organizations/*/locations/*}/connections:\x01*\x12\xd7\x01\n\rGetConnection\x12+.google.privacy.dlp.v2.GetConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i\x12//v2/{name=projects/*/locations/*/connections/*}Z6\x12\x34/v2/{name=organizations/*/locations/*/connections/*}\x12\xea\x01\n\x0fListConnections\x12-.google.privacy.dlp.v2.ListConnectionsRequest\x1a..google.privacy.dlp.v2.ListConnectionsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2/{parent=projects/*/locations/*}/connectionsZ6\x12\x34/v2/{parent=organizations/*/locations/*}/connections\x12\xff\x01\n\x11SearchConnections\x12/.google.privacy.dlp.v2.SearchConnectionsRequest\x1a\x30.google.privacy.dlp.v2.SearchConnectionsResponse\"\x86\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02w\x12\x36/v2/{parent=projects/*/locations/*}/connections:searchZ=\x12;/v2/{parent=organizations/*/locations/*}/connections:search\x12\xd2\x01\n\x10\x44\x65leteConnection\x12..google.privacy.dlp.v2.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i*//v2/{name=projects/*/locations/*/connections/*}Z6*4/v2/{name=organizations/*/locations/*/connections/*}\x12\xe3\x01\n\x10UpdateConnection\x12..google.privacy.dlp.v2.UpdateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"|\xda\x41\x04name\x82\xd3\xe4\x93\x02o2//v2/{name=projects/*/locations/*/connections/*}:\x01*Z924/v2/{name=organizations/*/locations/*/connections/*}:\x01*\x1a\x46\xca\x41\x12\x64lp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x02\n\x19\x63om.google.privacy.dlp.v2B\x08\x44lpProtoP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2\xea\x41r\n\x1d\x64lp.googleapis.com/DlpContent\x12\x1dprojects/{project}/dlpContent\x12\x32projects/{project}/locations/{location}/dlpContent\xea\x41\\\n\'dlp.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" +descriptor_data = "\n\x1fgoogle/privacy/dlp/v2/dlp.proto\x12\x15google.privacy.dlp.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/privacy/dlp/v2/storage.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"G\n\x10\x45xcludeInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xa8\x01\n\x10\x45xcludeByHotword\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\"\xe7\x02\n\rExclusionRule\x12\x46\n\ndictionary\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12\x45\n\x12\x65xclude_info_types\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeInfoTypesH\x00\x12\x45\n\x12\x65xclude_by_hotword\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeByHotwordH\x00\x12:\n\rmatching_type\x18\x04 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingTypeB\x06\n\x04type\"\xb1\x01\n\x0eInspectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x12>\n\x0e\x65xclusion_rule\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.ExclusionRuleH\x00\x42\x06\n\x04type\"~\n\x11InspectionRuleSet\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\x05rules\x18\x02 \x03(\x0b\x32%.google.privacy.dlp.v2.InspectionRule\"\xac\x07\n\rInspectConfig\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12]\n\x1cmin_likelihood_per_info_type\x18\x0b \x03(\x0b\x32\x37.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood\x12\x42\n\x06limits\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.InspectConfig.FindingLimits\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x1a\n\x12\x65xclude_info_types\x18\x05 \x01(\x08\x12@\n\x11\x63ustom_info_types\x18\x06 \x03(\x0b\x32%.google.privacy.dlp.v2.CustomInfoType\x12=\n\x0f\x63ontent_options\x18\x08 \x03(\x0e\x32$.google.privacy.dlp.v2.ContentOption\x12:\n\x08rule_set\x18\n \x03(\x0b\x32(.google.privacy.dlp.v2.InspectionRuleSet\x1a\x83\x01\n\x12InfoTypeLikelihood\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x1a\x91\x02\n\rFindingLimits\x12\x1d\n\x15max_findings_per_item\x18\x01 \x01(\x05\x12 \n\x18max_findings_per_request\x18\x02 \x01(\x05\x12\x64\n\x1amax_findings_per_info_type\x18\x03 \x03(\x0b\x32@.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit\x1aY\n\rInfoTypeLimit\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x14\n\x0cmax_findings\x18\x02 \x01(\x05\"\xf9\x02\n\x0f\x42yteContentItem\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.privacy.dlp.v2.ByteContentItem.BytesType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x97\x02\n\tBytesType\x12\x1a\n\x16\x42YTES_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05IMAGE\x10\x06\x12\x0e\n\nIMAGE_JPEG\x10\x01\x12\r\n\tIMAGE_BMP\x10\x02\x12\r\n\tIMAGE_PNG\x10\x03\x12\r\n\tIMAGE_SVG\x10\x04\x12\r\n\tTEXT_UTF8\x10\x05\x12\x11\n\rWORD_DOCUMENT\x10\x07\x12\x07\n\x03PDF\x10\x08\x12\x17\n\x13POWERPOINT_DOCUMENT\x10\t\x12\x12\n\x0e\x45XCEL_DOCUMENT\x10\n\x12\x08\n\x04\x41VRO\x10\x0b\x12\x07\n\x03\x43SV\x10\x0c\x12\x07\n\x03TSV\x10\r\x12\t\n\x05\x41UDIO\x10\x0f\x12\t\n\x05VIDEO\x10\x10\x12\x0e\n\nEXECUTABLE\x10\x11\x12\x0c\n\x08\x41I_MODEL\x10\x12\"\x97\x01\n\x0b\x43ontentItem\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12-\n\x05table\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.TableH\x00\x12;\n\tbyte_item\x18\x05 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItemH\x00\x42\x0b\n\tdata_item\"\x9d\x01\n\x05Table\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12.\n\x04rows\x18\x02 \x03(\x0b\x32 .google.privacy.dlp.v2.Table.Row\x1a\x33\n\x03Row\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"]\n\rInspectResult\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xdf\x05\n\x07\x46inding\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x32\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x03 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nquote_info\x18\x07 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\x35\n\rresource_name\x18\x08 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x38\n\x0ctrigger_name\x18\t \x01(\tB\"\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12:\n\x06labels\x18\n \x03(\x0b\x32*.google.privacy.dlp.v2.Finding.LabelsEntry\x12\x33\n\x0fjob_create_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x08job_name\x18\r \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x12\n\nfinding_id\x18\x0f \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:[\xea\x41X\n\x1a\x64lp.googleapis.com/Finding\x12:projects/{project}/locations/{location}/findings/{finding}\"\xeb\x01\n\x08Location\x12\x30\n\nbyte_range\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x35\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x41\n\x11\x63ontent_locations\x18\x07 \x03(\x0b\x32&.google.privacy.dlp.v2.ContentLocation\x12\x33\n\tcontainer\x18\x08 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\"\x97\x03\n\x0f\x43ontentLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12@\n\x0frecord_location\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.RecordLocationH\x00\x12>\n\x0eimage_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.ImageLocationH\x00\x12\x44\n\x11\x64ocument_location\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.DocumentLocationH\x00\x12\x44\n\x11metadata_location\x18\x08 \x01(\x0b\x32\'.google.privacy.dlp.v2.MetadataLocationH\x00\x12\x37\n\x13\x63ontainer_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x07 \x01(\tB\n\n\x08location\"\x94\x01\n\x10MetadataLocation\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.google.privacy.dlp.v2.MetadataType\x12\x44\n\rstorage_label\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.StorageMetadataLabelH\x00\x42\x07\n\x05label\"#\n\x14StorageMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"\'\n\x10\x44ocumentLocation\x12\x13\n\x0b\x66ile_offset\x18\x01 \x01(\x03\"\xb6\x01\n\x0eRecordLocation\x12\x34\n\nrecord_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.RecordKey\x12\x30\n\x08\x66ield_id\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12<\n\x0etable_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.TableLocation\"\"\n\rTableLocation\x12\x11\n\trow_index\x18\x01 \x01(\x03\"\xac\x01\n\tContainer\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tfull_path\x18\x03 \x01(\t\x12\x11\n\troot_path\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"K\n\rImageLocation\x12:\n\x0e\x62ounding_boxes\x18\x01 \x03(\x0b\x32\".google.privacy.dlp.v2.BoundingBox\"G\n\x0b\x42oundingBox\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xfc\x03\n\x12RedactImageRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x13\n\x0blocation_id\x18\x08 \x01(\t\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12_\n\x17image_redaction_configs\x18\x05 \x03(\x0b\x32>.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig\x12\x18\n\x10include_findings\x18\x06 \x01(\x08\x12\x39\n\tbyte_item\x18\x07 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItem\x1a\xa8\x01\n\x14ImageRedactionConfig\x12\x34\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x19\n\x0fredact_all_text\x18\x02 \x01(\x08H\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ColorB\x08\n\x06target\"1\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\"\x83\x01\n\x13RedactImageResponse\x12\x16\n\x0eredacted_image\x18\x01 \x01(\x0c\x12\x16\n\x0e\x65xtracted_text\x18\x02 \x01(\t\x12<\n\x0einspect_result\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xd8\x02\n\x18\x44\x65identifyContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11\x64\x65identify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18\x64\x65identify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19\x44\x65identifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xdb\x02\n\x18ReidentifyContentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11reidentify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18reidentify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19ReidentifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xef\x01\n\x15InspectContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"N\n\x16InspectContentResponse\x12\x34\n\x06result\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xb7\x02\n\x13OutputStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x12N\n\routput_schema\x18\x03 \x01(\x0e\x32\x37.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema\"\x90\x01\n\x0cOutputSchema\x12\x1d\n\x19OUTPUT_SCHEMA_UNSPECIFIED\x10\x00\x12\x11\n\rBASIC_COLUMNS\x10\x01\x12\x0f\n\x0bGCS_COLUMNS\x10\x02\x12\x15\n\x11\x44\x41TASTORE_COLUMNS\x10\x03\x12\x15\n\x11\x42IG_QUERY_COLUMNS\x10\x04\x12\x0f\n\x0b\x41LL_COLUMNS\x10\x05\x42\x06\n\x04type\"R\n\rInfoTypeStats\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc0\x04\n\x18InspectDataSourceDetails\x12[\n\x11requested_options\x18\x02 \x01(\x0b\x32@.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions\x12\x46\n\x06result\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.InspectDataSourceDetails.Result\x1a\x9a\x01\n\x10RequestedOptions\x12I\n\x19snapshot_inspect_template\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12;\n\njob_config\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfig\x1a\xe1\x01\n\x06Result\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x02 \x01(\x03\x12=\n\x0finfo_type_stats\x18\x03 \x03(\x0b\x32$.google.privacy.dlp.v2.InfoTypeStats\x12\x1a\n\x12num_rows_processed\x18\x05 \x01(\x03\x12\x44\n\x0chybrid_stats\x18\x07 \x01(\x0b\x32..google.privacy.dlp.v2.HybridInspectStatistics\"\xff\x01\n\x1c\x44\x61taProfileBigQueryRowSchema\x12@\n\rtable_profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfileH\x00\x12\x42\n\x0e\x63olumn_profile\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfileH\x00\x12I\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfileH\x00\x42\x0e\n\x0c\x64\x61ta_profile\"`\n\x17HybridInspectStatistics\x12\x17\n\x0fprocessed_count\x18\x01 \x01(\x03\x12\x15\n\raborted_count\x18\x02 \x01(\x03\x12\x15\n\rpending_count\x18\x03 \x01(\x03\"l\n\rActionDetails\x12P\n\x12\x64\x65identify_details\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DeidentifyDataSourceDetailsH\x00\x42\t\n\x07\x64\x65tails\"x\n\x19\x44\x65identifyDataSourceStats\x12\x19\n\x11transformed_bytes\x18\x01 \x01(\x03\x12\x1c\n\x14transformation_count\x18\x02 \x01(\x03\x12\"\n\x1atransformation_error_count\x18\x03 \x01(\x03\"\xf2\x03\n\x1b\x44\x65identifyDataSourceDetails\x12h\n\x11requested_options\x18\x01 \x01(\x0b\x32M.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions\x12J\n\x10\x64\x65identify_stats\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DeidentifyDataSourceStats\x1a\x9c\x02\n\x1aRequestedDeidentifyOptions\x12O\n\x1csnapshot_deidentify_template\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Z\n\'snapshot_structured_deidentify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Q\n\x1esnapshot_image_redact_template\x18\x03 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\"\xfc\x02\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x0csupported_by\x18\x03 \x03(\x0e\x32*.google.privacy.dlp.v2.InfoTypeSupportedBy\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0f\n\x07\x65xample\x18\x08 \x01(\t\x12;\n\x08versions\x18\t \x03(\x0b\x32).google.privacy.dlp.v2.VersionDescription\x12;\n\ncategories\x18\n \x03(\x0b\x32\'.google.privacy.dlp.v2.InfoTypeCategory\x12\x42\n\x11sensitivity_score\x18\x0b \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12\x1b\n\x13specific_info_types\x18\x0c \x03(\t\"\x83\n\n\x10InfoTypeCategory\x12U\n\x11location_category\x18\x01 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.LocationCategoryH\x00\x12U\n\x11industry_category\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategoryH\x00\x12M\n\rtype_category\x18\x03 \x01(\x0e\x32\x34.google.privacy.dlp.v2.InfoTypeCategory.TypeCategoryH\x00\"\xe2\x05\n\x10LocationCategory\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\r\n\tARGENTINA\x10\x02\x12\x0b\n\x07\x41RMENIA\x10\x33\x12\r\n\tAUSTRALIA\x10\x03\x12\x0e\n\nAZERBAIJAN\x10\x30\x12\x0b\n\x07\x42\x45LARUS\x10\x32\x12\x0b\n\x07\x42\x45LGIUM\x10\x04\x12\n\n\x06\x42RAZIL\x10\x05\x12\n\n\x06\x43\x41NADA\x10\x06\x12\t\n\x05\x43HILE\x10\x07\x12\t\n\x05\x43HINA\x10\x08\x12\x0c\n\x08\x43OLOMBIA\x10\t\x12\x0b\n\x07\x43ROATIA\x10*\x12\x0b\n\x07\x43ZECHIA\x10\x34\x12\x0b\n\x07\x44\x45NMARK\x10\n\x12\n\n\x06\x46RANCE\x10\x0b\x12\x0b\n\x07\x46INLAND\x10\x0c\x12\x0b\n\x07GERMANY\x10\r\x12\r\n\tHONG_KONG\x10\x0e\x12\t\n\x05INDIA\x10\x0f\x12\r\n\tINDONESIA\x10\x10\x12\x0b\n\x07IRELAND\x10\x11\x12\n\n\x06ISRAEL\x10\x12\x12\t\n\x05ITALY\x10\x13\x12\t\n\x05JAPAN\x10\x14\x12\x0e\n\nKAZAKHSTAN\x10/\x12\t\n\x05KOREA\x10\x15\x12\n\n\x06MEXICO\x10\x16\x12\x13\n\x0fTHE_NETHERLANDS\x10\x17\x12\x0f\n\x0bNEW_ZEALAND\x10)\x12\n\n\x06NORWAY\x10\x18\x12\x0c\n\x08PARAGUAY\x10\x19\x12\x08\n\x04PERU\x10\x1a\x12\n\n\x06POLAND\x10\x1b\x12\x0c\n\x08PORTUGAL\x10\x1c\x12\n\n\x06RUSSIA\x10,\x12\r\n\tSINGAPORE\x10\x1d\x12\x10\n\x0cSOUTH_AFRICA\x10\x1e\x12\t\n\x05SPAIN\x10\x1f\x12\n\n\x06SWEDEN\x10 \x12\x0f\n\x0bSWITZERLAND\x10+\x12\n\n\x06TAIWAN\x10!\x12\x0c\n\x08THAILAND\x10\"\x12\n\n\x06TURKEY\x10#\x12\x0b\n\x07UKRAINE\x10-\x12\x12\n\x0eUNITED_KINGDOM\x10$\x12\x11\n\rUNITED_STATES\x10%\x12\x0b\n\x07URUGUAY\x10&\x12\x0e\n\nUZBEKISTAN\x10.\x12\r\n\tVENEZUELA\x10\'\x12\x0c\n\x08INTERNAL\x10(\"]\n\x10IndustryCategory\x12\x18\n\x14INDUSTRY_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\n\n\x06HEALTH\x10\x02\x12\x16\n\x12TELECOMMUNICATIONS\x10\x03\"\xa1\x01\n\x0cTypeCategory\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03PII\x10\x01\x12\x08\n\x04SPII\x10\x02\x12\x0f\n\x0b\x44\x45MOGRAPHIC\x10\x03\x12\x0e\n\nCREDENTIAL\x10\x04\x12\x11\n\rGOVERNMENT_ID\x10\x05\x12\x0c\n\x08\x44OCUMENT\x10\x06\x12\x1a\n\x16\x43ONTEXTUAL_INFORMATION\x10\x07\x12\n\n\x06\x43USTOM\x10\x08\x42\n\n\x08\x63\x61tegory\":\n\x12VersionDescription\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"b\n\x14ListInfoTypesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x13\n\x0blocation_id\x18\x03 \x01(\t\"W\n\x15ListInfoTypesResponse\x12>\n\ninfo_types\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.InfoTypeDescription\"\xc1\x01\n\x15RiskAnalysisJobConfig\x12<\n\x0eprivacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12:\n\x0csource_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xbc\x01\n\x07QuasiId\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\"\xbe\x02\n\x10StatisticalTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12T\n\tquasi_ids\x18\x01 \x03(\x0b\x32<.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aY\n\x14QuasiIdentifierField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\"\x93\x0f\n\rPrivacyMetric\x12[\n\x16numerical_stats_config\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigH\x00\x12_\n\x18\x63\x61tegorical_stats_config\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigH\x00\x12S\n\x12k_anonymity_config\x18\x03 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigH\x00\x12S\n\x12l_diversity_config\x18\x04 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigH\x00\x12\\\n\x17k_map_estimation_config\x18\x05 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigH\x00\x12n\n delta_presence_estimation_config\x18\x06 \x01(\x0b\x32\x42.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigH\x00\x1a\x45\n\x14NumericalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1aG\n\x16\x43\x61tegoricalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1ay\n\x10KAnonymityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x32\n\tentity_id\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EntityId\x1a\x82\x01\n\x10LDiversityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12;\n\x13sensitive_attribute\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1a\x81\x06\n\x14KMapEstimationConfig\x12]\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x62\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32H.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable\x1a\xc0\x01\n\x0bTaggedField\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\x1a\xcd\x02\n\x0e\x41uxiliaryTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12m\n\tquasi_ids\x18\x01 \x03(\x0b\x32U.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aQ\n\x0cQuasiIdField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\x1a\xaf\x01\n\x1d\x44\x65ltaPresenceEstimationConfig\x12\x36\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.QuasiIdB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x41\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32\'.google.privacy.dlp.v2.StatisticalTableB\x06\n\x04type\"\xc1\x1f\n\x1c\x41nalyzeDataSourceRiskDetails\x12\x46\n\x18requested_privacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12\x44\n\x16requested_source_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12j\n\x16numerical_stats_result\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultH\x00\x12n\n\x18\x63\x61tegorical_stats_result\x18\x04 \x01(\x0b\x32J.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultH\x00\x12\x62\n\x12k_anonymity_result\x18\x05 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultH\x00\x12\x62\n\x12l_diversity_result\x18\x06 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultH\x00\x12k\n\x17k_map_estimation_result\x18\x07 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultH\x00\x12}\n delta_presence_estimation_result\x18\t \x01(\x0b\x32Q.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultH\x00\x12k\n\x11requested_options\x18\n \x01(\x0b\x32P.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions\x1a\xaf\x01\n\x14NumericalStatsResult\x12/\n\tmin_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12/\n\tmax_value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x35\n\x0fquantile_values\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1a\x8d\x03\n\x16\x43\x61tegoricalStatsResult\x12\x95\x01\n!value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32j.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket\x1a\xda\x01\n\x1f\x43\x61tegoricalStatsHistogramBucket\x12#\n\x1bvalue_frequency_lower_bound\x18\x01 \x01(\x03\x12#\n\x1bvalue_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12<\n\rbucket_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb5\x04\n\x10KAnonymityResult\x12\x8b\x01\n#equivalence_class_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket\x1at\n\x1aKAnonymityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x1a\x9c\x02\n\x19KAnonymityHistogramBucket\x12*\n\"equivalence_class_size_lower_bound\x18\x01 \x01(\x03\x12*\n\"equivalence_class_size_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb0\x05\n\x10LDiversityResult\x12\x93\x01\n+sensitive_value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket\x1a\xe0\x01\n\x1aLDiversityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x12%\n\x1dnum_distinct_sensitive_values\x18\x03 \x01(\x03\x12\x43\n\x14top_sensitive_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x1a\xa2\x02\n\x19LDiversityHistogramBucket\x12-\n%sensitive_value_frequency_lower_bound\x18\x01 \x01(\x03\x12-\n%sensitive_value_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\x95\x04\n\x14KMapEstimationResult\x12\x8a\x01\n\x1ak_map_estimation_histogram\x18\x01 \x03(\x0b\x32\x66.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket\x1ar\n\x1bKMapEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1b\n\x13\x65stimated_anonymity\x18\x02 \x01(\x03\x1a\xfb\x01\n\x1dKMapEstimationHistogramBucket\x12\x15\n\rmin_anonymity\x18\x01 \x01(\x03\x12\x15\n\rmax_anonymity\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12{\n\rbucket_values\x18\x06 \x03(\x0b\x32\x64.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a\xe4\x04\n\x1d\x44\x65ltaPresenceEstimationResult\x12\xa5\x01\n#delta_presence_estimation_histogram\x18\x01 \x03(\x0b\x32x.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket\x1a}\n$DeltaPresenceEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1d\n\x15\x65stimated_probability\x18\x02 \x01(\x01\x1a\x9b\x02\n&DeltaPresenceEstimationHistogramBucket\x12\x17\n\x0fmin_probability\x18\x01 \x01(\x01\x12\x17\n\x0fmax_probability\x18\x02 \x01(\x01\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12\x8d\x01\n\rbucket_values\x18\x06 \x03(\x0b\x32v.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a`\n\x1cRequestedRiskAnalysisOptions\x12@\n\njob_config\x18\x01 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigB\x08\n\x06result\"L\n\x0eValueFrequency\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb3\x02\n\x05Value\x12\x17\n\rinteger_value\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x17\n\rboolean_value\x18\x04 \x01(\x08H\x00\x12\x35\n\x0ftimestamp_value\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12,\n\ntime_value\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\x12\'\n\ndate_value\x18\x07 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x33\n\x11\x64\x61y_of_week_value\x18\x08 \x01(\x0e\x32\x16.google.type.DayOfWeekH\x00\x42\x06\n\x04type\"Q\n\tQuoteInfo\x12\x34\n\tdate_time\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DateTimeH\x00\x42\x0e\n\x0cparsed_quote\"\xdf\x01\n\x08\x44\x61teTime\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12;\n\ttime_zone\x18\x04 \x01(\x0b\x32(.google.privacy.dlp.v2.DateTime.TimeZone\x1a\"\n\x08TimeZone\x12\x16\n\x0eoffset_minutes\x18\x01 \x01(\x05\"\xf2\x02\n\x10\x44\x65identifyConfig\x12S\n\x19info_type_transformations\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x12N\n\x16record_transformations\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.RecordTransformationsH\x00\x12L\n\x15image_transformations\x18\x04 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageTransformationsH\x00\x12Y\n\x1dtransformation_error_handling\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.TransformationErrorHandlingB\x10\n\x0etransformation\"\xe5\x04\n\x14ImageTransformations\x12S\n\ntransforms\x18\x02 \x03(\x0b\x32?.google.privacy.dlp.v2.ImageTransformations.ImageTransformation\x1a\xf7\x03\n\x13ImageTransformation\x12p\n\x13selected_info_types\x18\x04 \x01(\x0b\x32Q.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesH\x00\x12\x66\n\x0e\x61ll_info_types\x18\x05 \x01(\x0b\x32L.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesH\x00\x12[\n\x08\x61ll_text\x18\x06 \x01(\x0b\x32G.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextH\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Color\x1aM\n\x11SelectedInfoTypes\x12\x38\n\ninfo_types\x18\x05 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeB\x03\xe0\x41\x02\x1a\x0e\n\x0c\x41llInfoTypes\x1a\t\n\x07\x41llTextB\x08\n\x06target\"\x85\x02\n\x1bTransformationErrorHandling\x12T\n\x0bthrow_error\x18\x01 \x01(\x0b\x32=.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorH\x00\x12\x64\n\x13leave_untransformed\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedH\x00\x1a\x0c\n\nThrowError\x1a\x14\n\x12LeaveUntransformedB\x06\n\x04mode\"\xca\x07\n\x17PrimitiveTransformation\x12\x43\n\x0ereplace_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.ReplaceValueConfigH\x00\x12<\n\rredact_config\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.RedactConfigH\x00\x12K\n\x15\x63haracter_mask_config\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CharacterMaskConfigH\x00\x12Y\n\x1d\x63rypto_replace_ffx_fpe_config\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigH\x00\x12V\n\x1b\x66ixed_size_bucketing_config\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.FixedSizeBucketingConfigH\x00\x12\x42\n\x10\x62ucketing_config\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.BucketingConfigH\x00\x12Y\n\x1dreplace_with_info_type_config\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigH\x00\x12\x41\n\x10time_part_config\x18\x08 \x01(\x0b\x32%.google.privacy.dlp.v2.TimePartConfigH\x00\x12\x45\n\x12\x63rypto_hash_config\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.CryptoHashConfigH\x00\x12\x43\n\x11\x64\x61te_shift_config\x18\x0b \x01(\x0b\x32&.google.privacy.dlp.v2.DateShiftConfigH\x00\x12W\n\x1b\x63rypto_deterministic_config\x18\x0c \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoDeterministicConfigH\x00\x12S\n\x19replace_dictionary_config\x18\r \x01(\x0b\x32..google.privacy.dlp.v2.ReplaceDictionaryConfigH\x00\x42\x10\n\x0etransformation\"\xdc\x01\n\x0eTimePartConfig\x12G\n\x0fpart_to_extract\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.TimePartConfig.TimePart\"\x80\x01\n\x08TimePart\x12\x19\n\x15TIME_PART_UNSPECIFIED\x10\x00\x12\x08\n\x04YEAR\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x10\n\x0c\x44\x41Y_OF_MONTH\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x10\n\x0cWEEK_OF_YEAR\x10\x05\x12\x0f\n\x0bHOUR_OF_DAY\x10\x06\"H\n\x10\x43ryptoHashConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\"\xc0\x01\n\x19\x43ryptoDeterministicConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\x12<\n\x13surrogate_info_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"E\n\x12ReplaceValueConfig\x12/\n\tnew_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"q\n\x17ReplaceDictionaryConfig\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x42\x06\n\x04type\"\x1b\n\x19ReplaceWithInfoTypeConfig\"\x0e\n\x0cRedactConfig\"\xb6\x02\n\rCharsToIgnore\x12\x1c\n\x12\x63haracters_to_skip\x18\x01 \x01(\tH\x00\x12_\n\x1b\x63ommon_characters_to_ignore\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnoreH\x00\"\x97\x01\n\x13\x43ommonCharsToIgnore\x12&\n\"COMMON_CHARS_TO_IGNORE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x14\n\x10\x41LPHA_UPPER_CASE\x10\x02\x12\x14\n\x10\x41LPHA_LOWER_CASE\x10\x03\x12\x0f\n\x0bPUNCTUATION\x10\x04\x12\x0e\n\nWHITESPACE\x10\x05\x42\x0c\n\ncharacters\"\xa3\x01\n\x13\x43haracterMaskConfig\x12\x19\n\x11masking_character\x18\x01 \x01(\t\x12\x16\n\x0enumber_to_mask\x18\x02 \x01(\x05\x12\x15\n\rreverse_order\x18\x03 \x01(\x08\x12\x42\n\x14\x63haracters_to_ignore\x18\x04 \x03(\x0b\x32$.google.privacy.dlp.v2.CharsToIgnore\"\xa4\x01\n\x18\x46ixedSizeBucketingConfig\x12\x36\n\x0blower_bound\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x36\n\x0bupper_bound\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_size\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\"\xf0\x01\n\x0f\x42ucketingConfig\x12>\n\x07\x62uckets\x18\x01 \x03(\x0b\x32-.google.privacy.dlp.v2.BucketingConfig.Bucket\x1a\x9c\x01\n\x06\x42ucket\x12)\n\x03min\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12)\n\x03max\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12<\n\x11replacement_value\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\"\xf9\x03\n\x19\x43ryptoReplaceFfxFpeConfig\x12\x39\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyB\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x63\n\x0f\x63ommon_alphabet\x18\x04 \x01(\x0e\x32H.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabetH\x00\x12\x19\n\x0f\x63ustom_alphabet\x18\x05 \x01(\tH\x00\x12\x0f\n\x05radix\x18\x06 \x01(\x05H\x00\x12<\n\x13surrogate_info_type\x18\x08 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\x94\x01\n\x17\x46\x66xCommonNativeAlphabet\x12*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x0f\n\x0bHEXADECIMAL\x10\x02\x12\x1c\n\x18UPPER_CASE_ALPHA_NUMERIC\x10\x03\x12\x11\n\rALPHA_NUMERIC\x10\x04\x42\n\n\x08\x61lphabet\"\xd8\x01\n\tCryptoKey\x12>\n\ttransient\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.TransientCryptoKeyH\x00\x12>\n\tunwrapped\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.UnwrappedCryptoKeyH\x00\x12\x41\n\x0bkms_wrapped\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.KmsWrappedCryptoKeyH\x00\x42\x08\n\x06source\"\'\n\x12TransientCryptoKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"&\n\x12UnwrappedCryptoKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"M\n\x13KmsWrappedCryptoKey\x12\x18\n\x0bwrapped_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x63rypto_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc2\x01\n\x0f\x44\x61teShiftConfig\x12\x1d\n\x10upper_bound_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10lower_bound_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x36\n\ncrypto_key\x18\x04 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyH\x00\x42\x08\n\x06method\"\xa5\x02\n\x17InfoTypeTransformations\x12\x63\n\x0ftransformations\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationB\x03\xe0\x41\x02\x1a\xa4\x01\n\x16InfoTypeTransformation\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12U\n\x18primitive_transformation\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationB\x03\xe0\x41\x02\"\xc0\x02\n\x13\x46ieldTransformation\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x39\n\tcondition\x18\x03 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\x12R\n\x18primitive_transformation\x18\x04 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationH\x00\x12S\n\x19info_type_transformations\x18\x05 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x42\x10\n\x0etransformation\"\xa9\x01\n\x15RecordTransformations\x12I\n\x15\x66ield_transformations\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x45\n\x13record_suppressions\x18\x02 \x03(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\"N\n\x11RecordSuppression\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\"\xdc\x04\n\x0fRecordCondition\x12G\n\x0b\x65xpressions\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.RecordCondition.Expressions\x1a\xae\x01\n\tCondition\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12@\n\x08operator\x18\x03 \x01(\x0e\x32).google.privacy.dlp.v2.RelationalOperatorB\x03\xe0\x41\x02\x12+\n\x05value\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1aR\n\nConditions\x12\x44\n\nconditions\x18\x01 \x03(\x0b\x32\x30.google.privacy.dlp.v2.RecordCondition.Condition\x1a\xfa\x01\n\x0b\x45xpressions\x12\\\n\x10logical_operator\x18\x01 \x01(\x0e\x32\x42.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator\x12G\n\nconditions\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.RecordCondition.ConditionsH\x00\"<\n\x0fLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x42\x06\n\x04type\"\x83\x01\n\x16TransformationOverview\x12\x19\n\x11transformed_bytes\x18\x02 \x01(\x03\x12N\n\x18transformation_summaries\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.TransformationSummary\"\x9f\x05\n\x15TransformationSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x46\n\x0etransformation\x18\x03 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformation\x12I\n\x15\x66ield_transformations\x18\x05 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x41\n\x0frecord_suppress\x18\x06 \x01(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\x12K\n\x07results\x18\x04 \x03(\x0b\x32:.google.privacy.dlp.v2.TransformationSummary.SummaryResult\x12\x19\n\x11transformed_bytes\x18\x07 \x01(\x03\x1a\x84\x01\n\rSummaryResult\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12S\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x45.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"^\n\x18TransformationResultCode\x12*\n&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xb0\x01\n\x19TransformationDescription\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.privacy.dlp.v2.TransformationType\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x11\n\tcondition\x18\x03 \x01(\t\x12\x32\n\tinfo_type\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xc6\x02\n\x15TransformationDetails\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x02 \x01(\t\x12H\n\x0etransformation\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.TransformationDescription\x12I\n\x0estatus_details\x18\x04 \x01(\x0b\x32\x31.google.privacy.dlp.v2.TransformationResultStatus\x12\x19\n\x11transformed_bytes\x18\x05 \x01(\x03\x12N\n\x17transformation_location\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationLocation\"\xd9\x01\n\x16TransformationLocation\x12\x14\n\nfinding_id\x18\x01 \x01(\tH\x00\x12L\n\x15record_transformation\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.RecordTransformationH\x00\x12J\n\x0e\x63ontainer_type\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.TransformationContainerTypeB\x0f\n\rlocation_type\"\x9c\x01\n\x14RecordTransformation\x12\x30\n\x08\x66ield_id\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x13\x63ontainer_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x03 \x01(\t\"\x94\x01\n\x1aTransformationResultStatus\x12Q\n\x12result_status_type\x18\x01 \x01(\x0e\x32\x35.google.privacy.dlp.v2.TransformationResultStatusType\x12#\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\"TransformationDetailsStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x42\x06\n\x04type\"U\n\x08Schedule\x12?\n\x1arecurrence_period_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x42\x08\n\x06option\"\x08\n\x06Manual\"\xc2\x04\n\x0fInspectTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0einspect_config\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig:\xc6\x02\xea\x41\xc2\x02\n\"dlp.googleapis.com/InspectTemplate\x12@organizations/{organization}/inspectTemplates/{inspect_template}\x12\x36projects/{project}/inspectTemplates/{inspect_template}\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\"\xe6\x04\n\x12\x44\x65identifyTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x11\x64\x65identify_config\x18\x06 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig:\xe1\x02\xea\x41\xdd\x02\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46organizations/{organization}/deidentifyTemplates/{deidentify_template}\x12\n\x0binspect_job\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12;\n\x08triggers\x18\x05 \x03(\x0b\x32).google.privacy.dlp.v2.JobTrigger.Trigger\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06status\x18\n \x01(\x0e\x32(.google.privacy.dlp.v2.JobTrigger.StatusB\x03\xe0\x41\x02\x1az\n\x07Trigger\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.ScheduleH\x00\x12/\n\x06manual\x18\x02 \x01(\x0b\x32\x1d.google.privacy.dlp.v2.ManualH\x00\x42\t\n\x07trigger\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCANCELLED\x10\x03:\x94\x01\xea\x41\x90\x01\n\x1d\x64lp.googleapis.com/JobTrigger\x12,projects/{project}/jobTriggers/{job_trigger}\x12\x41projects/{project}/locations/{location}/jobTriggers/{job_trigger}B\x05\n\x03job\"\xea\x08\n\x06\x41\x63tion\x12\x43\n\rsave_findings\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.Action.SaveFindingsH\x00\x12@\n\x07pub_sub\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.Action.PublishToPubSubH\x00\x12U\n\x17publish_summary_to_cscc\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishSummaryToCsccH\x00\x12q\n&publish_findings_to_cloud_data_catalog\x18\x05 \x01(\x0b\x32?.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogH\x00\x12>\n\ndeidentify\x18\x07 \x01(\x0b\x32(.google.privacy.dlp.v2.Action.DeidentifyH\x00\x12V\n\x17job_notification_emails\x18\x08 \x01(\x0b\x32\x33.google.privacy.dlp.v2.Action.JobNotificationEmailsH\x00\x12T\n\x16publish_to_stackdriver\x18\t \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishToStackdriverH\x00\x1aQ\n\x0cSaveFindings\x12\x41\n\routput_config\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.OutputStorageConfig\x1a \n\x0fPublishToPubSub\x12\r\n\x05topic\x18\x01 \x01(\t\x1a\x16\n\x14PublishSummaryToCscc\x1a#\n!PublishFindingsToCloudDataCatalog\x1a\xb3\x02\n\nDeidentify\x12J\n\x15transformation_config\x18\x07 \x01(\x0b\x32+.google.privacy.dlp.v2.TransformationConfig\x12h\n%transformation_details_storage_config\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.TransformationDetailsStorageConfig\x12#\n\x14\x63loud_storage_output\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12@\n\x17\x66ile_types_to_transform\x18\x08 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileTypeB\x08\n\x06output\x1a\x17\n\x15JobNotificationEmails\x1a\x16\n\x14PublishToStackdriverB\x08\n\x06\x61\x63tion\"z\n\x14TransformationConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12&\n\x1estructured_deidentify_template\x18\x02 \x01(\t\x12\x1d\n\x15image_redact_template\x18\x04 \x01(\t\"\xcb\x01\n\x1c\x43reateInspectTemplateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x45\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xcb\x01\n\x1cUpdateInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12@\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xa7\x01\n\x1bListInspectTemplatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"z\n\x1cListInspectTemplatesResponse\x12\x41\n\x11inspect_templates\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xb6\x01\n\x17\x43reateJobTriggerRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12;\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTriggerB\x03\xe0\x41\x02\x12\x12\n\ntrigger_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"P\n\x19\x41\x63tivateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb7\x01\n\x17UpdateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12\x36\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14GetJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb4\x01\n\x1c\x43reateDiscoveryConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12\x11\n\tconfig_id\x18\x03 \x01(\t\"\xd0\x01\n\x1cUpdateDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\x92\x01\n\x1bListDiscoveryConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\"z\n\x1cListDiscoveryConfigsResponse\x12\x41\n\x11\x64iscovery_configs\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\xf6\x01\n\x13\x43reateDlpJobRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12>\n\x0binspect_job\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12@\n\x08risk_job\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigH\x00\x12\x0e\n\x06job_id\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\tB\x05\n\x03job\"\xde\x01\n\x16ListJobTriggersRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12/\n\x04type\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"k\n\x17ListJobTriggersResponse\x12\x37\n\x0cjob_triggers\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x17\x44\x65leteJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xdd\x01\n\x10InspectJobConfig\x12<\n\x0estorage_config\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.StorageConfig\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x1d\n\x15inspect_template_name\x18\x03 \x01(\t\x12.\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xf2\r\n\x11\x44\x61taProfileAction\x12\x46\n\x0b\x65xport_data\x18\x01 \x01(\x0b\x32/.google.privacy.dlp.v2.DataProfileAction.ExportH\x00\x12[\n\x14pub_sub_notification\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationH\x00\x12[\n\x14publish_to_chronicle\x18\x03 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PublishToChronicleH\x00\x12\x61\n\x0epublish_to_scc\x18\x04 \x01(\x0b\x32G.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenterH\x00\x12N\n\rtag_resources\x18\x08 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DataProfileAction.TagResourcesH\x00\x12h\n\x1bpublish_to_dataplex_catalog\x18\t \x01(\x0b\x32\x41.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalogH\x00\x1a\x8a\x01\n\x06\x45xport\x12;\n\rprofile_table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x43\n\x15sample_findings_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x1a\x82\x03\n\x12PubSubNotification\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\x12K\n\x10pubsub_condition\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfilePubSubCondition\x12\x62\n\x11\x64\x65tail_of_message\x18\x04 \x01(\x0e\x32G.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel\"i\n\x0b\x44\x65tailLevel\x12\x1c\n\x18\x44\x45TAIL_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rTABLE_PROFILE\x10\x01\x12\x11\n\rRESOURCE_NAME\x10\x02\x12\x16\n\x12\x46ILE_STORE_PROFILE\x10\x03\x1a\x14\n\x12PublishToChronicle\x1a \n\x1ePublishToSecurityCommandCenter\x1a:\n\x18PublishToDataplexCatalog\x12\x1e\n\x16lower_data_risk_to_low\x18\x01 \x01(\x08\x1a\xb6\x03\n\x0cTagResources\x12Z\n\x0etag_conditions\x18\x01 \x03(\x0b\x32\x42.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition\x12L\n\x1aprofile_generations_to_tag\x18\x02 \x03(\x0e\x32(.google.privacy.dlp.v2.ProfileGeneration\x12\x1e\n\x16lower_data_risk_to_low\x18\x03 \x01(\x08\x1a\xa9\x01\n\x0cTagCondition\x12K\n\x03tag\x18\x01 \x01(\x0b\x32>.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue\x12\x44\n\x11sensitivity_score\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScoreH\x00\x42\x06\n\x04type\x1a\x30\n\x08TagValue\x12\x1a\n\x10namespaced_value\x18\x01 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"u\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_PROFILE\x10\x01\x12\x13\n\x0f\x43HANGED_PROFILE\x10\x02\x12\x13\n\x0fSCORE_INCREASED\x10\x03\x12\x11\n\rERROR_CHANGED\x10\x04\x42\x08\n\x06\x61\x63tion\"\xdd\x03\n\x12\x44\x61taProfileFinding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x31\n\x08infotype\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\nquote_info\x18\x03 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\"\n\x1a\x64\x61ta_profile_resource_name\x18\x04 \x01(\t\x12\x12\n\nfinding_id\x18\x05 \x01(\t\x12-\n\ttimestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x08location\x18\x07 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfileFindingLocation\x12\x46\n\x13resource_visibility\x18\x08 \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x1a\n\x12\x66ull_resource_name\x18\t \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\n \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\"\xb7\x01\n\x1a\x44\x61taProfileFindingLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12g\n$data_profile_finding_record_location\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DataProfileFindingRecordLocationH\x00\x42\x18\n\x16location_extra_details\"Q\n DataProfileFindingRecordLocation\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"\xae\x02\n\x14\x44\x61taProfileJobConfig\x12<\n\x08location\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.DataProfileLocation\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x61\n\x1dother_cloud_starting_location\x18\x08 \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x07 \x03(\t\x12\x46\n\x14\x64\x61ta_profile_actions\x18\x06 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\"[\n\rBigQueryRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x18\n\x10\x64\x61taset_id_regex\x18\x02 \x01(\t\x12\x16\n\x0etable_id_regex\x18\x03 \x01(\t\"I\n\x0f\x42igQueryRegexes\x12\x36\n\x08patterns\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2.BigQueryRegex\"M\n\x12\x42igQueryTableTypes\x12\x37\n\x05types\x18\x01 \x03(\x0e\x32(.google.privacy.dlp.v2.BigQueryTableType\"\n\n\x08\x44isabled\"Q\n\x13\x44\x61taProfileLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\xeb\x07\n\x0f\x44iscoveryConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x44\n\norg_config\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig\x12\x61\n\x1dother_cloud_starting_location\x18\x0c \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x03 \x03(\t\x12\x39\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\x12\x37\n\x07targets\x18\x05 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryTarget\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06status\x18\n \x01(\x0e\x32-.google.privacy.dlp.v2.DiscoveryConfig.StatusB\x03\xe0\x41\x02\x12K\n\x13processing_location\x18\r \x01(\x0b\x32).google.privacy.dlp.v2.ProcessingLocationB\x03\xe0\x41\x01\x1a\x63\n\tOrgConfig\x12\x42\n\x08location\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryStartingLocation\x12\x12\n\nproject_id\x18\x02 \x01(\t\"9\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02:t\xea\x41q\n\"dlp.googleapis.com/DiscoveryConfig\x12Kprojects/{project}/locations/{location}/discoveryConfigs/{discovery_config}\"\xf6\x03\n\x0f\x44iscoveryTarget\x12J\n\x10\x62ig_query_target\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryDiscoveryTargetH\x00\x12J\n\x10\x63loud_sql_target\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.CloudSqlDiscoveryTargetH\x00\x12G\n\x0esecrets_target\x18\x03 \x01(\x0b\x32-.google.privacy.dlp.v2.SecretsDiscoveryTargetH\x00\x12R\n\x14\x63loud_storage_target\x18\x04 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageDiscoveryTargetH\x00\x12N\n\x12other_cloud_target\x18\x05 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudDiscoveryTargetH\x00\x12T\n\x15vertex_dataset_target\x18\x07 \x01(\x0b\x32\x33.google.privacy.dlp.v2.VertexDatasetDiscoveryTargetH\x00\x42\x08\n\x06target\"\xae\x02\n\x17\x42igQueryDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryBigQueryFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryBigQueryConditions\x12\x44\n\x07\x63\x61\x64\x65nce\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DiscoveryGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\x0b\n\tfrequency\"\xa0\x02\n\x17\x44iscoveryBigQueryFilter\x12@\n\x06tables\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryTableCollectionH\x00\x12]\n\x0cother_tables\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTablesH\x00\x12@\n\x0ftable_reference\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.TableReferenceH\x00\x1a\x18\n\x16\x41llOtherBigQueryTablesB\x08\n\x06\x66ilter\"g\n\x17\x42igQueryTableCollection\x12\x41\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryRegexesH\x00\x42\t\n\x07pattern\"\x98\x03\n\x1b\x44iscoveryBigQueryConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x05types\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.BigQueryTableTypesH\x00\x12M\n\x0ftype_collection\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.BigQueryTableTypeCollectionH\x00\x12V\n\ror_conditions\x18\x04 \x01(\x0b\x32?.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions\x1aQ\n\x0cOrConditions\x12\x15\n\rmin_row_count\x18\x01 \x01(\x05\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\n\x0eincluded_types\"\x83\x03\n\x1a\x44iscoveryGenerationCadence\x12V\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence\x12T\n\x16table_modified_cadence\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryTableModifiedCadence\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x12L\n\x11refresh_frequency\x18\x04 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa6\x01\n\x1d\x44iscoveryTableModifiedCadence\x12?\n\x05types\x18\x01 \x03(\x0e\x32\x30.google.privacy.dlp.v2.BigQueryTableModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa8\x01\n\x1e\x44iscoverySchemaModifiedCadence\x12@\n\x05types\x18\x01 \x03(\x0e\x32\x31.google.privacy.dlp.v2.BigQuerySchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"o\n\'DiscoveryInspectTemplateModifiedCadence\x12\x44\n\tfrequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xbf\x02\n\x17\x43loudSqlDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryCloudSqlFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudSqlConditions\x12W\n\x12generation_cadence\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x89\x02\n\x17\x44iscoveryCloudSqlFilter\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DatabaseResourceCollectionH\x00\x12\x42\n\x06others\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AllOtherDatabaseResourcesH\x00\x12W\n\x1b\x64\x61tabase_resource_reference\x18\x03 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DatabaseResourceReferenceH\x00\x42\x08\n\x06\x66ilter\"r\n\x1a\x44\x61tabaseResourceCollection\x12I\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DatabaseResourceRegexesH\x00\x42\t\n\x07pattern\"Y\n\x17\x44\x61tabaseResourceRegexes\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32,.google.privacy.dlp.v2.DatabaseResourceRegex\"\x87\x01\n\x15\x44\x61tabaseResourceRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x16\n\x0einstance_regex\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x61tabase_regex\x18\x03 \x01(\t\x12$\n\x1c\x64\x61tabase_resource_name_regex\x18\x04 \x01(\t\"\x1b\n\x19\x41llOtherDatabaseResources\"\x82\x01\n\x19\x44\x61tabaseResourceReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64\x61tabase\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x64\x61tabase_resource\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xda\x03\n\x1b\x44iscoveryCloudSqlConditions\x12`\n\x10\x64\x61tabase_engines\x18\x01 \x03(\x0e\x32\x41.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngineB\x03\xe0\x41\x01\x12V\n\x05types\x18\x03 \x03(\x0e\x32G.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType\"n\n\x0e\x44\x61tabaseEngine\x12\x1f\n\x1b\x44\x41TABASE_ENGINE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41LL_SUPPORTED_DATABASE_ENGINES\x10\x01\x12\t\n\x05MYSQL\x10\x02\x12\x0c\n\x08POSTGRES\x10\x03\"\x90\x01\n\x14\x44\x61tabaseResourceType\x12&\n\"DATABASE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12.\n*DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES\x10\x01\x12 \n\x1c\x44\x41TABASE_RESOURCE_TYPE_TABLE\x10\x02\"\x97\x05\n\"DiscoveryCloudSqlGenerationCadence\x12p\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32O.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence\x12L\n\x11refresh_frequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x1a\xc5\x02\n\x15SchemaModifiedCadence\x12y\n\x05types\x18\x01 \x03(\x0e\x32j.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"k\n\x1a\x43loudSqlSchemaModification\x12\'\n#SQL_SCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_COLUMNS\x10\x01\x12\x13\n\x0fREMOVED_COLUMNS\x10\x02\"\x18\n\x16SecretsDiscoveryTarget\"\xdb\x02\n\x1b\x43loudStorageDiscoveryTarget\x12G\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudStorageFilterB\x03\xe0\x41\x02\x12L\n\nconditions\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryFileStoreConditionsB\x03\xe0\x41\x01\x12`\n\x12generation_cadence\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadenceB\x03\xe0\x41\x01H\x00\x12\x38\n\x08\x64isabled\x18\x03 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x96\x02\n\x1b\x44iscoveryCloudStorageFilter\x12\x45\n\ncollection\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.FileStoreCollectionB\x03\xe0\x41\x01H\x00\x12\x65\n cloud_storage_resource_reference\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.CloudStorageResourceReferenceB\x03\xe0\x41\x01H\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"i\n\x13\x46ileStoreCollection\x12G\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.FileStoreRegexesB\x03\xe0\x41\x01H\x00\x42\t\n\x07pattern\"P\n\x10\x46ileStoreRegexes\x12<\n\x08patterns\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.FileStoreRegexB\x03\xe0\x41\x02\"p\n\x0e\x46ileStoreRegex\x12L\n\x13\x63loud_storage_regex\x18\x01 \x01(\x0b\x32(.google.privacy.dlp.v2.CloudStorageRegexB\x03\xe0\x41\x01H\x00\x42\x10\n\x0eresource_regex\"R\n\x11\x43loudStorageRegex\x12\x1d\n\x10project_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"R\n\x1d\x43loudStorageResourceReference\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x01\n&DiscoveryCloudStorageGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"\x9b\x05\n\x1f\x44iscoveryCloudStorageConditions\x12{\n\x1aincluded_object_attributes\x18\x01 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttributeB\x03\xe0\x41\x02\x12{\n\x1aincluded_bucket_attributes\x18\x02 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttributeB\x03\xe0\x41\x02\"\xe3\x01\n\x1b\x43loudStorageObjectAttribute\x12.\n*CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_OBJECTS\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08NEARLINE\x10\x03\x12\x0c\n\x08\x43OLDLINE\x10\x04\x12\x0b\n\x07\x41RCHIVE\x10\x05\x12\x0c\n\x08REGIONAL\x10\x06\x12\x12\n\x0eMULTI_REGIONAL\x10\x07\x12 \n\x1c\x44URABLE_REDUCED_AVAILABILITY\x10\x08\"\x97\x01\n\x1b\x43loudStorageBucketAttribute\x12.\n*CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_BUCKETS\x10\x01\x12\x16\n\x12\x41UTOCLASS_DISABLED\x10\x02\x12\x15\n\x11\x41UTOCLASS_ENABLED\x10\x03\"\xf6\x01\n\x1c\x44iscoveryFileStoreConditions\x12\x36\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12/\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12_\n\x18\x63loud_storage_conditions\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.DiscoveryCloudStorageConditionsB\x03\xe0\x41\x01H\x00\x42\x0c\n\nconditions\"\x92\x03\n\x19OtherCloudDiscoveryTarget\x12\x44\n\x10\x64\x61ta_source_type\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceTypeB\x03\xe0\x41\x02\x12\x45\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryOtherCloudFilterB\x03\xe0\x41\x02\x12M\n\nconditions\x18\x03 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryOtherCloudConditionsB\x03\xe0\x41\x01\x12Y\n\x12generation_cadence\x18\x04 \x01(\x0b\x32;.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x05 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x86\x02\n\x19\x44iscoveryOtherCloudFilter\x12I\n\ncollection\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.OtherCloudResourceCollectionH\x00\x12S\n\x0fsingle_resource\x18\x02 \x01(\x0b\x32\x38.google.privacy.dlp.v2.OtherCloudSingleResourceReferenceH\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"v\n\x1cOtherCloudResourceCollection\x12K\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudResourceRegexesH\x00\x42\t\n\x07pattern\"]\n\x19OtherCloudResourceRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32..google.privacy.dlp.v2.OtherCloudResourceRegex\"y\n\x17OtherCloudResourceRegex\x12L\n\x16\x61mazon_s3_bucket_regex\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.AmazonS3BucketRegexH\x00\x42\x10\n\x0eresource_regex\"0\n\x0f\x41wsAccountRegex\x12\x1d\n\x10\x61\x63\x63ount_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\"x\n\x13\x41mazonS3BucketRegex\x12\x41\n\x11\x61ws_account_regex\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.AwsAccountRegex\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n!OtherCloudSingleResourceReference\x12\x41\n\x10\x61mazon_s3_bucket\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.AmazonS3BucketH\x00\x42\n\n\x08resource\"%\n\nAwsAccount\x12\x17\n\naccount_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x0e\x41mazonS3Bucket\x12\x36\n\x0b\x61ws_account\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2.AwsAccount\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x1d\x44iscoveryOtherCloudConditions\x12*\n\x07min_age\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12V\n\x1b\x61mazon_s3_bucket_conditions\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.AmazonS3BucketConditionsH\x00\x42\x0c\n\nconditions\"\xd9\x03\n\x18\x41mazonS3BucketConditions\x12U\n\x0c\x62ucket_types\x18\x01 \x03(\x0e\x32:.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketTypeB\x03\xe0\x41\x01\x12g\n\x16object_storage_classes\x18\x02 \x03(\x0e\x32\x42.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClassB\x03\xe0\x41\x01\"T\n\nBucketType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12TYPE_ALL_SUPPORTED\x10\x01\x12\x18\n\x14TYPE_GENERAL_PURPOSE\x10\x02\"\xa6\x01\n\x12ObjectStorageClass\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_CLASSES\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x1e\n\x1aSTANDARD_INFREQUENT_ACCESS\x10\x04\x12\x1d\n\x19GLACIER_INSTANT_RETRIEVAL\x10\x06\x12\x17\n\x13INTELLIGENT_TIERING\x10\x07\"\xe9\x01\n$DiscoveryOtherCloudGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"W\n\x19\x44iscoveryStartingLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\x87\x02\n#OtherCloudDiscoveryStartingLocation\x12o\n\x0c\x61ws_location\x18\x01 \x01(\x0b\x32W.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocationH\x00\x1a\x63\n\x1c\x41wsDiscoveryStartingLocation\x12\x14\n\naccount_id\x18\x02 \x01(\tH\x00\x12$\n\x1a\x61ll_asset_inventory_assets\x18\x03 \x01(\x08H\x00\x42\x07\n\x05scopeB\n\n\x08location\"\x13\n\x11\x41llOtherResources\"\xd3\x02\n\x1cVertexDatasetDiscoveryTarget\x12H\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryVertexDatasetFilterB\x03\xe0\x41\x02\x12K\n\nconditions\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions\x12\\\n\x12generation_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x8e\x02\n\x1c\x44iscoveryVertexDatasetFilter\x12\x44\n\ncollection\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.VertexDatasetCollectionH\x00\x12\x62\n!vertex_dataset_resource_reference\x18\x02 \x01(\x0b\x32\x35.google.privacy.dlp.v2.VertexDatasetResourceReferenceH\x00\x12:\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesH\x00\x42\x08\n\x06\x66ilter\"s\n\x17VertexDatasetCollection\x12M\n\x16vertex_dataset_regexes\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.VertexDatasetRegexesH\x00\x42\t\n\x07pattern\"X\n\x14VertexDatasetRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.VertexDatasetRegexB\x03\xe0\x41\x02\".\n\x12VertexDatasetRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\"D\n\x1eVertexDatasetResourceReference\x12\"\n\x15\x64\x61taset_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n DiscoveryVertexDatasetConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe2\x01\n\'DiscoveryVertexDatasetGenerationCadence\x12L\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\"\xdc\x06\n\x06\x44lpJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2.DlpJob.JobState\x12K\n\x0crisk_details\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsH\x00\x12J\n\x0finspect_details\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.InspectDataSourceDetailsH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_modified\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10job_trigger_name\x18\n \x01(\t\x12,\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12<\n\x0e\x61\x63tion_details\x18\x0c \x03(\x0b\x32$.google.privacy.dlp.v2.ActionDetails\"o\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06:\x7f\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}B\t\n\x07\x64\x65tails\"C\n\x10GetDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd6\x01\n\x12ListDlpJobsRequest\x12\x31\n\x06parent\x18\x04 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\x04type\x18\x05 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"[\n\x13ListDlpJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.DlpJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x13\x43\x61ncelDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x46inishDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x44\x65leteDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd7\x01\n\x1f\x43reateDeidentifyTemplateRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12K\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xd7\x01\n\x1fUpdateDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x1cGetDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xad\x01\n\x1eListDeidentifyTemplatesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"\x83\x01\n\x1fListDeidentifyTemplatesResponse\x12G\n\x14\x64\x65identify_templates\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1f\x44\x65leteDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xf4\x01\n\x1bLargeCustomDictionaryConfig\x12<\n\x0boutput_path\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePath\x12L\n\x16\x63loud_storage_file_set\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageFileSetH\x00\x12?\n\x0f\x62ig_query_field\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryFieldH\x00\x42\x08\n\x06source\"8\n\x1aLargeCustomDictionaryStats\x12\x1a\n\x12\x61pprox_num_phrases\x18\x01 \x01(\x03\"\xa6\x02\n\x14StoredInfoTypeConfig\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\x17large_custom_dictionary\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.LargeCustomDictionaryConfigH\x00\x12\x46\n\ndictionary\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x05 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x42\x06\n\x04type\"s\n\x13StoredInfoTypeStats\x12T\n\x17large_custom_dictionary\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.LargeCustomDictionaryStatsH\x00\x42\x06\n\x04type\"\xa9\x02\n\x15StoredInfoTypeVersion\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.google.privacy.dlp.v2.StoredInfoTypeState\x12,\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12\x39\n\x05stats\x18\x05 \x01(\x0b\x32*.google.privacy.dlp.v2.StoredInfoTypeStats\"\xf1\x03\n\x0eStoredInfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0f\x63urrent_version\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion\x12\x46\n\x10pending_versions\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion:\xc1\x02\xea\x41\xbd\x02\n!dlp.googleapis.com/StoredInfoType\x12?organizations/{organization}/storedInfoTypes/{stored_info_type}\x12\x35projects/{project}/storedInfoTypes/{stored_info_type}\x12Torganizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}\x12Jprojects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}\"\xcc\x01\n\x1b\x43reateStoredInfoTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfigB\x03\xe0\x41\x02\x12\x1b\n\x13stored_info_type_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xc4\x01\n\x1bUpdateStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x18GetStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\xa5\x01\n\x1aListStoredInfoTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"x\n\x1bListStoredInfoTypesResponse\x12@\n\x11stored_info_types\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.StoredInfoType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x1b\x44\x65leteStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\x94\x01\n\x1eHybridInspectJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8c\x01\n\x1aHybridInspectDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8b\x01\n\x11HybridContentItem\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x44\n\x0f\x66inding_details\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.HybridFindingDetails\"\xb0\x02\n\x14HybridFindingDetails\x12;\n\x11\x63ontainer_details\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\x12\x13\n\x0b\x66ile_offset\x18\x02 \x01(\x03\x12\x12\n\nrow_offset\x18\x03 \x01(\x03\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x12G\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.privacy.dlp.v2.HybridFindingDetails.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x17\n\x15HybridInspectResponse\"\xa8\x01\n\x1eListProjectDataProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/ProjectDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x84\x01\n\x1fListProjectDataProfilesResponse\x12H\n\x15project_data_profiles\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.ProjectDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n\x1cListTableDataProfilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#dlp.googleapis.com/TableDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"~\n\x1dListTableDataProfilesResponse\x12\x44\n\x13table_data_profiles\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa6\x01\n\x1dListColumnDataProfilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dlp.googleapis.com/ColumnDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x81\x01\n\x1eListColumnDataProfilesResponse\x12\x46\n\x14\x63olumn_data_profiles\x18\x01 \x03(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n\rDataRiskLevel\x12\x46\n\x05score\x18\x01 \x01(\x0e\x32\x37.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore\"r\n\x12\x44\x61taRiskLevelScore\x12\x1a\n\x16RISK_SCORE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RISK_LOW\x10\n\x12\x10\n\x0cRISK_UNKNOWN\x10\x0c\x12\x11\n\rRISK_MODERATE\x10\x14\x12\r\n\tRISK_HIGH\x10\x1e\"\xdc\x04\n\x12ProjectDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11sensitivity_score\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x05 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12<\n\x0eprofile_status\x18\x07 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12 \n\x18table_data_profile_count\x18\t \x01(\x03\x12%\n\x1d\x66ile_store_data_profile_count\x18\n \x01(\x03:\xdd\x01\xea\x41\xd9\x01\n%dlp.googleapis.com/ProjectDataProfile\x12\\organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}\x12Rprojects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}\"\xc9\x02\n\x19\x44\x61taProfileConfigSnapshot\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12I\n\x10\x64\x61ta_profile_job\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.DataProfileJobConfigB\x02\x18\x01\x12@\n\x10\x64iscovery_config\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12\x42\n\x1einspect_template_modified_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe3\r\n\x10TableDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18$ \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x02 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x18 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x1d \x01(\t\x12\x12\n\ndataset_id\x18\x19 \x01(\t\x12\x10\n\x08table_id\x18\x1a \x01(\t\x12\x15\n\rfull_resource\x18\x03 \x01(\t\x12<\n\x0eprofile_status\x18\x15 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12<\n\x05state\x18\x16 \x01(\x0e\x32-.google.privacy.dlp.v2.TableDataProfile.State\x12\x42\n\x11sensitivity_score\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12\x44\n\x14predicted_info_types\x18\x1b \x03(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x45\n\x10other_info_types\x18\x1c \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14scanned_column_count\x18\n \x01(\x03\x12\x1b\n\x13\x66\x61iled_column_count\x18\x0b \x01(\x03\x12\x18\n\x10table_size_bytes\x18\x0c \x01(\x03\x12\x11\n\trow_count\x18\r \x01(\x03\x12\x42\n\x11\x65ncryption_status\x18\x0e \x01(\x0e\x32\'.google.privacy.dlp.v2.EncryptionStatus\x12\x46\n\x13resource_visibility\x18\x0f \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12:\n\x16profile_last_generated\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fresource_labels\x18\x11 \x03(\x0b\x32;.google.privacy.dlp.v2.TableDataProfile.ResourceLabelsEntry\x12/\n\x0b\x63reate_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x15sample_findings_table\x18% \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12(\n\x04tags\x18\' \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18) \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xd3\x01\xea\x41\xcf\x01\n#dlp.googleapis.com/TableDataProfile\x12Xorganizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}\x12Nprojects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}\"b\n\rProfileStatus\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"g\n\x0fInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12 \n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x42\x02\x18\x01\"\x88\x01\n\x14OtherInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x1c\n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x12\x1e\n\x16\x65xcluded_from_analysis\x18\x03 \x01(\x08\"\xc9\r\n\x11\x43olumnDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x0eprofile_status\x18\x11 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12=\n\x05state\x18\x12 \x01(\x0e\x32..google.privacy.dlp.v2.ColumnDataProfile.State\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12table_data_profile\x18\x04 \x01(\t\x12\x1b\n\x13table_full_resource\x18\x05 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x13 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x14 \x01(\t\x12\x12\n\ndataset_id\x18\x15 \x01(\t\x12\x10\n\x08table_id\x18\x16 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x06 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x07 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12@\n\x10\x63olumn_info_type\x18\t \x01(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x42\n\rother_matches\x18\n \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12M\n\x19\x65stimated_null_percentage\x18\x17 \x01(\x0e\x32*.google.privacy.dlp.v2.NullPercentageLevel\x12O\n\x1a\x65stimated_uniqueness_score\x18\x18 \x01(\x0e\x32+.google.privacy.dlp.v2.UniquenessScoreLevel\x12\x17\n\x0f\x66ree_text_score\x18\r \x01(\x01\x12L\n\x0b\x63olumn_type\x18\x0e \x01(\x0e\x32\x37.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType\x12P\n\x0cpolicy_state\x18\x0f \x01(\x0e\x32:.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\"\xff\x02\n\x0e\x43olumnDataType\x12 \n\x1c\x43OLUMN_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTYPE_INT64\x10\x01\x12\r\n\tTYPE_BOOL\x10\x02\x12\x10\n\x0cTYPE_FLOAT64\x10\x03\x12\x0f\n\x0bTYPE_STRING\x10\x04\x12\x0e\n\nTYPE_BYTES\x10\x05\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x06\x12\r\n\tTYPE_DATE\x10\x07\x12\r\n\tTYPE_TIME\x10\x08\x12\x11\n\rTYPE_DATETIME\x10\t\x12\x12\n\x0eTYPE_GEOGRAPHY\x10\n\x12\x10\n\x0cTYPE_NUMERIC\x10\x0b\x12\x0f\n\x0bTYPE_RECORD\x10\x0c\x12\x13\n\x0fTYPE_BIGNUMERIC\x10\r\x12\r\n\tTYPE_JSON\x10\x0e\x12\x11\n\rTYPE_INTERVAL\x10\x0f\x12\x13\n\x0fTYPE_RANGE_DATE\x10\x10\x12\x17\n\x13TYPE_RANGE_DATETIME\x10\x11\x12\x18\n\x14TYPE_RANGE_TIMESTAMP\x10\x12\"R\n\x11\x43olumnPolicyState\x12#\n\x1f\x43OLUMN_POLICY_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x43OLUMN_POLICY_TAGGED\x10\x01:\xd8\x01\xea\x41\xd4\x01\n$dlp.googleapis.com/ColumnDataProfile\x12Zorganizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}\x12Pprojects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}\"\xb8\x0e\n\x14\x46ileStoreDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x03 \x01(\t\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x1b\n\x13\x66ile_store_location\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_storage_locations\x18\x13 \x03(\t\x12\x15\n\rlocation_type\x18\x14 \x01(\t\x12\x17\n\x0f\x66ile_store_path\x18\x06 \x01(\t\x12\x15\n\rfull_resource\x18\x18 \x01(\t\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12<\n\x0eprofile_status\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12@\n\x05state\x18\t \x01(\x0e\x32\x31.google.privacy.dlp.v2.FileStoreDataProfile.State\x12:\n\x16profile_last_generated\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x13resource_visibility\x18\x0b \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x42\n\x11sensitivity_score\x18\x0c \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\r \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16\x66ile_cluster_summaries\x18\x10 \x03(\x0b\x32).google.privacy.dlp.v2.FileClusterSummary\x12`\n\x13resource_attributes\x18\x11 \x03(\x0b\x32\x43.google.privacy.dlp.v2.FileStoreDataProfile.ResourceAttributesEntry\x12X\n\x0fresource_labels\x18\x12 \x03(\x0b\x32?.google.privacy.dlp.v2.FileStoreDataProfile.ResourceLabelsEntry\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x15 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x43\n\x15sample_findings_table\x18\x16 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x1b\n\x13\x66ile_store_is_empty\x18\x17 \x01(\x08\x12(\n\x04tags\x18\x19 \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18\x1a \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x1aW\n\x17ResourceAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xe9\x01\xea\x41\xe5\x01\n\'dlp.googleapis.com/FileStoreDataProfile\x12\x61organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\x12Wprojects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\"?\n\x03Tag\x12\x1c\n\x14namespaced_tag_value\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"(\n\x0fRelatedResource\x12\x15\n\rfull_resource\x18\x01 \x01(\t\"N\n\x18\x46ileStoreInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"+\n\x11\x46ileExtensionInfo\x12\x16\n\x0e\x66ile_extension\x18\x01 \x01(\t\"\x8c\x04\n\x12\x46ileClusterSummary\x12\x41\n\x11\x66ile_cluster_type\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.FileClusterType\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12,\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12I\n\x17\x66ile_extensions_scanned\x18\x07 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x46\n\x14\x66ile_extensions_seen\x18\x08 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x16\n\x0eno_files_exist\x18\t \x01(\x08\"[\n\x1cGetProjectDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"]\n\x1eGetFileStoreDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"\xc0\x01\n ListFileStoreDataProfilesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dlp.googleapis.com/FileStoreDataProfile\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!ListFileStoreDataProfilesResponse\x12M\n\x18\x66ile_store_data_profiles\x18\x01 \x03(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n!DeleteFileStoreDataProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dlp.googleapis.com/FileStoreDataProfile\"W\n\x1aGetTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"Y\n\x1bGetColumnDataProfileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dlp.googleapis.com/ColumnDataProfile\"\xea\x05\n\x1a\x44\x61taProfilePubSubCondition\x12X\n\x0b\x65xpressions\x18\x01 \x01(\x0b\x32\x43.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions\x1a\xe9\x01\n\x0fPubSubCondition\x12\x62\n\x12minimum_risk_score\x18\x01 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x12i\n\x19minimum_sensitivity_score\x18\x02 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x42\x07\n\x05value\x1a\xab\x02\n\x11PubSubExpressions\x12s\n\x10logical_operator\x18\x01 \x01(\x0e\x32Y.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator\x12U\n\nconditions\x18\x02 \x03(\x0b\x32\x41.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition\"J\n\x15PubSubLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02OR\x10\x01\x12\x07\n\x03\x41ND\x10\x02\"X\n\x12ProfileScoreBucket\x12$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x12\n\x0eMEDIUM_OR_HIGH\x10\x02\"\xe0\x01\n\x18\x44\x61taProfilePubSubMessage\x12\x38\n\x07profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12G\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\"\x8c\x01\n\x17\x43reateConnectionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\"K\n\x14GetConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x95\x01\n\x16ListConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x18SearchConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x17ListConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x19SearchConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x01\n\x17UpdateConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x17\x44\x65leteConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x90\x03\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2.ConnectionStateB\x03\xe0\x41\x02\x12\x31\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12>\n\tcloud_sql\x18\x04 \x01(\x0b\x32).google.privacy.dlp.v2.CloudSqlPropertiesH\x00:\xb1\x01\xea\x41\xad\x01\n\x1d\x64lp.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}\x12Jorganizations/{organization}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"[\n\x17SecretManagerCredential\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x1cpassword_secret_version_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x43loudSqlIamCredential\"\xb5\x03\n\x12\x43loudSqlProperties\x12\x1f\n\x0f\x63onnection_name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12K\n\x11username_password\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.SecretManagerCredentialH\x00\x12\x45\n\rcloud_sql_iam\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.CloudSqlIamCredentialH\x00\x12\x1c\n\x0fmax_connections\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12V\n\x0f\x64\x61tabase_engine\x18\x07 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngineB\x03\xe0\x41\x02\"f\n\x0e\x44\x61tabaseEngine\x12\x1b\n\x17\x44\x41TABASE_ENGINE_UNKNOWN\x10\x00\x12\x19\n\x15\x44\x41TABASE_ENGINE_MYSQL\x10\x01\x12\x1c\n\x18\x44\x41TABASE_ENGINE_POSTGRES\x10\x02\x42\x0c\n\ncredential\"Z\n\x1d\x44\x65leteTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"*\n\x0e\x44\x61taSourceType\x12\x18\n\x0b\x64\x61ta_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xf4\x02\n\x0f\x46ileClusterType\x12\x41\n\x07\x63luster\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.FileClusterType.ClusterH\x00\"\x88\x02\n\x07\x43luster\x12\x17\n\x13\x43LUSTER_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_UNKNOWN\x10\x01\x12\x10\n\x0c\x43LUSTER_TEXT\x10\x02\x12\x1b\n\x17\x43LUSTER_STRUCTURED_DATA\x10\x03\x12\x17\n\x13\x43LUSTER_SOURCE_CODE\x10\x04\x12\x19\n\x15\x43LUSTER_RICH_DOCUMENT\x10\x05\x12\x11\n\rCLUSTER_IMAGE\x10\x06\x12\x13\n\x0f\x43LUSTER_ARCHIVE\x10\x07\x12\x16\n\x12\x43LUSTER_MULTIMEDIA\x10\x08\x12\x16\n\x12\x43LUSTER_EXECUTABLE\x10\t\x12\x14\n\x10\x43LUSTER_AI_MODEL\x10\nB\x13\n\x11\x66ile_cluster_type\"\xf7\x02\n\x12ProcessingLocation\x12`\n\x17image_fallback_location\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation\x1a\x17\n\x15MultiRegionProcessing\x1a\x12\n\x10GlobalProcessing\x1a\xd1\x01\n\x15ImageFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing*\xa0\x01\n\x1eTransformationResultStatusType\x12\x1a\n\x16STATE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11INVALID_TRANSFORM\x10\x01\x12\"\n\x1e\x42IGQUERY_MAX_ROW_SIZE_EXCEEDED\x10\x02\x12\x1a\n\x16METADATA_UNRETRIEVABLE\x10\x03\x12\x0b\n\x07SUCCESS\x10\x04*\x7f\n\x1bTransformationContainerType\x12\x1f\n\x1bTRANSFORM_UNKNOWN_CONTAINER\x10\x00\x12\x12\n\x0eTRANSFORM_BODY\x10\x01\x12\x16\n\x12TRANSFORM_METADATA\x10\x02\x12\x13\n\x0fTRANSFORM_TABLE\x10\x03*\xe0\x02\n\x12TransformationType\x12#\n\x1fTRANSFORMATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_SUPPRESSION\x10\x01\x12\x11\n\rREPLACE_VALUE\x10\x02\x12\x16\n\x12REPLACE_DICTIONARY\x10\x0f\x12\n\n\x06REDACT\x10\x03\x12\x12\n\x0e\x43HARACTER_MASK\x10\x04\x12\x1a\n\x16\x43RYPTO_REPLACE_FFX_FPE\x10\x05\x12\x18\n\x14\x46IXED_SIZE_BUCKETING\x10\x06\x12\r\n\tBUCKETING\x10\x07\x12\x1a\n\x16REPLACE_WITH_INFO_TYPE\x10\x08\x12\r\n\tTIME_PART\x10\t\x12\x0f\n\x0b\x43RYPTO_HASH\x10\n\x12\x0e\n\nDATE_SHIFT\x10\x0c\x12\x1f\n\x1b\x43RYPTO_DETERMINISTIC_CONFIG\x10\r\x12\x10\n\x0cREDACT_IMAGE\x10\x0e*r\n\x11ProfileGeneration\x12\"\n\x1ePROFILE_GENERATION_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROFILE_GENERATION_NEW\x10\x01\x12\x1d\n\x19PROFILE_GENERATION_UPDATE\x10\x02*\x96\x01\n\x1b\x42igQueryTableTypeCollection\x12$\n BIG_QUERY_COLLECTION_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_COLLECTION_ALL_TYPES\x10\x01\x12-\n)BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES\x10\x02*\xa8\x01\n\x11\x42igQueryTableType\x12$\n BIG_QUERY_TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x42IG_QUERY_TABLE_TYPE_TABLE\x10\x01\x12*\n&BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE\x10\x02\x12!\n\x1d\x42IG_QUERY_TABLE_TYPE_SNAPSHOT\x10\x03*\x94\x01\n\x1a\x44\x61taProfileUpdateFrequency\x12 \n\x1cUPDATE_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPDATE_FREQUENCY_NEVER\x10\x01\x12\x1a\n\x16UPDATE_FREQUENCY_DAILY\x10\x02\x12\x1c\n\x18UPDATE_FREQUENCY_MONTHLY\x10\x04*]\n\x19\x42igQueryTableModification\x12\"\n\x1eTABLE_MODIFICATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18TABLE_MODIFIED_TIMESTAMP\x10\x01*u\n\x1a\x42igQuerySchemaModification\x12#\n\x1fSCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SCHEMA_NEW_COLUMNS\x10\x01\x12\x1a\n\x16SCHEMA_REMOVED_COLUMNS\x10\x02*\xbb\x01\n\x12RelationalOperator\x12#\n\x1fRELATIONAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45QUAL_TO\x10\x01\x12\x10\n\x0cNOT_EQUAL_TO\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x05\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x06\x12\n\n\x06\x45XISTS\x10\x07*\x8d\x01\n\x0cMatchingType\x12\x1d\n\x19MATCHING_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18MATCHING_TYPE_FULL_MATCH\x10\x01\x12\x1f\n\x1bMATCHING_TYPE_PARTIAL_MATCH\x10\x02\x12\x1f\n\x1bMATCHING_TYPE_INVERSE_MATCH\x10\x03*M\n\rContentOption\x12\x17\n\x13\x43ONTENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONTENT_TEXT\x10\x01\x12\x11\n\rCONTENT_IMAGE\x10\x02*B\n\x0cMetadataType\x12\x1c\n\x18METADATATYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STORAGE_METADATA\x10\x02*P\n\x13InfoTypeSupportedBy\x12\x19\n\x15\x45NUM_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INSPECT\x10\x01\x12\x11\n\rRISK_ANALYSIS\x10\x02*R\n\nDlpJobType\x12\x1c\n\x18\x44LP_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINSPECT_JOB\x10\x01\x12\x15\n\x11RISK_ANALYSIS_JOB\x10\x02*n\n\x13StoredInfoTypeState\x12&\n\"STORED_INFO_TYPE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07INVALID\x10\x04*\xa3\x01\n\x12ResourceVisibility\x12#\n\x1fRESOURCE_VISIBILITY_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_VISIBILITY_PUBLIC\x10\n\x12$\n RESOURCE_VISIBILITY_INCONCLUSIVE\x10\x0f\x12\"\n\x1eRESOURCE_VISIBILITY_RESTRICTED\x10\x14*u\n\x10\x45ncryptionStatus\x12!\n\x1d\x45NCRYPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NCRYPTION_GOOGLE_MANAGED\x10\x01\x12\x1f\n\x1b\x45NCRYPTION_CUSTOMER_MANAGED\x10\x02*\xa9\x01\n\x13NullPercentageLevel\x12%\n!NULL_PERCENTAGE_LEVEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18NULL_PERCENTAGE_VERY_LOW\x10\x01\x12\x17\n\x13NULL_PERCENTAGE_LOW\x10\x02\x12\x1a\n\x16NULL_PERCENTAGE_MEDIUM\x10\x03\x12\x18\n\x14NULL_PERCENTAGE_HIGH\x10\x04*\x90\x01\n\x14UniquenessScoreLevel\x12&\n\"UNIQUENESS_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x18\n\x14UNIQUENESS_SCORE_LOW\x10\x01\x12\x1b\n\x17UNIQUENESS_SCORE_MEDIUM\x10\x02\x12\x19\n\x15UNIQUENESS_SCORE_HIGH\x10\x03*f\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13MISSING_CREDENTIALS\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xddv\n\nDlpService\x12\xdb\x01\n\x0eInspectContent\x12,.google.privacy.dlp.v2.InspectContentRequest\x1a-.google.privacy.dlp.v2.InspectContentResponse\"l\x82\xd3\xe4\x93\x02\x66\"\'/v2/{parent=projects/*}/content:inspect:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/content:inspect:\x01*\x12\xcc\x01\n\x0bRedactImage\x12).google.privacy.dlp.v2.RedactImageRequest\x1a*.google.privacy.dlp.v2.RedactImageResponse\"f\x82\xd3\xe4\x93\x02`\"$/v2/{parent=projects/*}/image:redact:\x01*Z5\"0/v2/{parent=projects/*/locations/*}/image:redact:\x01*\x12\xea\x01\n\x11\x44\x65identifyContent\x12/.google.privacy.dlp.v2.DeidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.DeidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:deidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:deidentify:\x01*\x12\xea\x01\n\x11ReidentifyContent\x12/.google.privacy.dlp.v2.ReidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.ReidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:reidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:reidentify:\x01*\x12\x99\x02\n\rListInfoTypes\x12+.google.privacy.dlp.v2.ListInfoTypesRequest\x1a,.google.privacy.dlp.v2.ListInfoTypesResponse\"\xac\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9c\x01\x12\r/v2/infoTypesZ$\x12\"/v2/{parent=locations/*}/infoTypesZ/\x12-/v2/{parent=projects/*/locations/*}/infoTypesZ4\x12\x32/v2/{parent=organizations/*/locations/*}/infoTypes\x12\xf4\x02\n\x15\x43reateInspectTemplate\x12\x33.google.privacy.dlp.v2.CreateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xfd\x01\xda\x41\x17parent,inspect_template\x82\xd3\xe4\x93\x02\xdc\x01\"4/v2/{parent=projects/*/locations/*}/inspectTemplates:\x01*Z>\"9/v2/{parent=organizations/*/locations/*}/inspectTemplates:\x01*Z-\"(/v2/{parent=projects/*}/inspectTemplates:\x01*Z2\"-/v2/{parent=organizations/*}/inspectTemplates:\x01*\x12\xfe\x02\n\x15UpdateInspectTemplate\x12\x33.google.privacy.dlp.v2.UpdateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\x87\x02\xda\x41!name,inspect_template,update_mask\x82\xd3\xe4\x93\x02\xdc\x01\x32\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/inspectTemplates/*}:\x01*Z-2(/v2/{name=projects/*/inspectTemplates/*}:\x01*Z22-/v2/{name=organizations/*/inspectTemplates/*}:\x01*\x12\xcf\x02\n\x12GetInspectTemplate\x12\x30.google.privacy.dlp.v2.GetInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z*\x12(/v2/{name=projects/*/inspectTemplates/*}Z/\x12-/v2/{name=organizations/*/inspectTemplates/*}\x12\xe2\x02\n\x14ListInspectTemplates\x12\x32.google.privacy.dlp.v2.ListInspectTemplatesRequest\x1a\x33.google.privacy.dlp.v2.ListInspectTemplatesResponse\"\xe0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{parent=projects/*/locations/*}/inspectTemplatesZ;\x12\x39/v2/{parent=organizations/*/locations/*}/inspectTemplatesZ*\x12(/v2/{parent=projects/*}/inspectTemplatesZ/\x12-/v2/{parent=organizations/*}/inspectTemplates\x12\xc5\x02\n\x15\x44\x65leteInspectTemplate\x12\x33.google.privacy.dlp.v2.DeleteInspectTemplateRequest\x1a\x16.google.protobuf.Empty\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01*4/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;*9/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z**(/v2/{name=projects/*/inspectTemplates/*}Z/*-/v2/{name=organizations/*/inspectTemplates/*}\x12\x8c\x03\n\x18\x43reateDeidentifyTemplate\x12\x36.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest\x1a).google.privacy.dlp.v2.DeidentifyTemplate\"\x8c\x02\xda\x41\x1aparent,deidentify_template\x82\xd3\xe4\x93\x02\xe8\x01\"0/v2/{parent=organizations/*}/deidentifyTemplates:\x01*ZA\"\x12\x12*\"9/v2/{parent=organizations/*/locations/*}/discoveryConfigs:\x01*\x12\x9a\x02\n\x15UpdateDiscoveryConfig\x12\x33.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\xa3\x01\xda\x41!name,discovery_config,update_mask\x82\xd3\xe4\x93\x02y24/v2/{name=projects/*/locations/*/discoveryConfigs/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/discoveryConfigs/*}:\x01*\x12\xf1\x01\n\x12GetDiscoveryConfig\x12\x30.google.privacy.dlp.v2.GetDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s\x12\x34/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\x84\x02\n\x14ListDiscoveryConfigs\x12\x32.google.privacy.dlp.v2.ListDiscoveryConfigsRequest\x1a\x33.google.privacy.dlp.v2.ListDiscoveryConfigsResponse\"\x82\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x34/v2/{parent=projects/*/locations/*}/discoveryConfigsZ;\x12\x39/v2/{parent=organizations/*/locations/*}/discoveryConfigs\x12\xe7\x01\n\x15\x44\x65leteDiscoveryConfig\x12\x33.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest\x1a\x16.google.protobuf.Empty\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s*4/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;*9/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\xdf\x01\n\x0c\x43reateDlpJob\x12*.google.privacy.dlp.v2.CreateDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"\x83\x01\xda\x41\x12parent,inspect_job\xda\x41\x0fparent,risk_job\x82\xd3\xe4\x93\x02V\"\x1f/v2/{parent=projects/*}/dlpJobs:\x01*Z0\"+/v2/{parent=projects/*/locations/*}/dlpJobs:\x01*\x12\xfb\x01\n\x0bListDlpJobs\x12).google.privacy.dlp.v2.ListDlpJobsRequest\x1a*.google.privacy.dlp.v2.ListDlpJobsResponse\"\x94\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x84\x01\x12\x1f/v2/{parent=projects/*}/dlpJobsZ-\x12+/v2/{parent=projects/*/locations/*}/dlpJobsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/dlpJobs\x12\xb2\x01\n\tGetDlpJob\x12\'.google.privacy.dlp.v2.GetDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12\x1f/v2/{name=projects/*/dlpJobs/*}Z-\x12+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xb1\x01\n\x0c\x44\x65leteDlpJob\x12*.google.privacy.dlp.v2.DeleteDlpJobRequest\x1a\x16.google.protobuf.Empty\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P*\x1f/v2/{name=projects/*/dlpJobs/*}Z-*+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xbe\x01\n\x0c\x43\x61ncelDlpJob\x12*.google.privacy.dlp.v2.CancelDlpJobRequest\x1a\x16.google.protobuf.Empty\"j\x82\xd3\xe4\x93\x02\x64\"&/v2/{name=projects/*/dlpJobs/*}:cancel:\x01*Z7\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel:\x01*\x12\xe3\x02\n\x14\x43reateStoredInfoType\x12\x32.google.privacy.dlp.v2.CreateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xef\x01\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\xd8\x01\",/v2/{parent=organizations/*}/storedInfoTypes:\x01*Z=\"8/v2/{parent=organizations/*/locations/*}/storedInfoTypes:\x01*Z,\"\'/v2/{parent=projects/*}/storedInfoTypes:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/storedInfoTypes:\x01*\x12\xed\x02\n\x14UpdateStoredInfoType\x12\x32.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xf9\x01\xda\x41\x17name,config,update_mask\x82\xd3\xe4\x93\x02\xd8\x01\x32,/v2/{name=organizations/*/storedInfoTypes/*}:\x01*Z=28/v2/{name=organizations/*/locations/*/storedInfoTypes/*}:\x01*Z,2\'/v2/{name=projects/*/storedInfoTypes/*}:\x01*Z823/v2/{name=projects/*/locations/*/storedInfoTypes/*}:\x01*\x12\xc8\x02\n\x11GetStoredInfoType\x12/.google.privacy.dlp.v2.GetStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{name=organizations/*/storedInfoTypes/*}Z:\x12\x38/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)\x12\'/v2/{name=projects/*/storedInfoTypes/*}Z5\x12\x33/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\xdb\x02\n\x13ListStoredInfoTypes\x12\x31.google.privacy.dlp.v2.ListStoredInfoTypesRequest\x1a\x32.google.privacy.dlp.v2.ListStoredInfoTypesResponse\"\xdc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{parent=organizations/*}/storedInfoTypesZ:\x12\x38/v2/{parent=organizations/*/locations/*}/storedInfoTypesZ)\x12\'/v2/{parent=projects/*}/storedInfoTypesZ5\x12\x33/v2/{parent=projects/*/locations/*}/storedInfoTypes\x12\xbf\x02\n\x14\x44\x65leteStoredInfoType\x12\x32.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest\x1a\x16.google.protobuf.Empty\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01*,/v2/{name=organizations/*/storedInfoTypes/*}Z:*8/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)*\'/v2/{name=projects/*/storedInfoTypes/*}Z5*3/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\x93\x02\n\x17ListProjectDataProfiles\x12\x35.google.privacy.dlp.v2.ListProjectDataProfilesRequest\x1a\x36.google.privacy.dlp.v2.ListProjectDataProfilesResponse\"\x88\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12/v2/{parent=organizations/*/locations/*}/fileStoreDataProfilesZ;\x12\x39/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles\x12\x8a\x02\n\x17GetFileStoreDataProfile\x12\x35.google.privacy.dlp.v2.GetFileStoreDataProfileRequest\x1a+.google.privacy.dlp.v2.FileStoreDataProfile\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}\x12>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;\x12\x39/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xfb\x01\n\x1a\x44\x65leteFileStoreDataProfile\x12\x38.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}*>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;*9/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xf6\x01\n\x13GetTableDataProfile\x12\x31.google.privacy.dlp.v2.GetTableDataProfileRequest\x1a\'.google.privacy.dlp.v2.TableDataProfile\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u\x12:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7\x12\x35/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xfb\x01\n\x14GetColumnDataProfile\x12\x32.google.privacy.dlp.v2.GetColumnDataProfileRequest\x1a(.google.privacy.dlp.v2.ColumnDataProfile\"\x84\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02w\x12;/v2/{name=organizations/*/locations/*/columnDataProfiles/*}Z8\x12\x36/v2/{name=projects/*/locations/*/columnDataProfiles/*}\x12\xeb\x01\n\x16\x44\x65leteTableDataProfile\x12\x34.google.privacy.dlp.v2.DeleteTableDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u*:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7*5/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xc3\x01\n\x13HybridInspectDlpJob\x12\x31.google.privacy.dlp.v2.HybridInspectDlpJobRequest\x1a,.google.privacy.dlp.v2.HybridInspectResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect:\x01*\x12\x91\x01\n\x0c\x46inishDlpJob\x12*.google.privacy.dlp.v2.FinishDlpJobRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:finish:\x01*\x12\xf2\x01\n\x10\x43reateConnection\x12..google.privacy.dlp.v2.CreateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"\x8a\x01\xda\x41\x12parent, connection\x82\xd3\xe4\x93\x02o\"//v2/{parent=projects/*/locations/*}/connections:\x01*Z9\"4/v2/{parent=organizations/*/locations/*}/connections:\x01*\x12\xd7\x01\n\rGetConnection\x12+.google.privacy.dlp.v2.GetConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i\x12//v2/{name=projects/*/locations/*/connections/*}Z6\x12\x34/v2/{name=organizations/*/locations/*/connections/*}\x12\xea\x01\n\x0fListConnections\x12-.google.privacy.dlp.v2.ListConnectionsRequest\x1a..google.privacy.dlp.v2.ListConnectionsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2/{parent=projects/*/locations/*}/connectionsZ6\x12\x34/v2/{parent=organizations/*/locations/*}/connections\x12\xff\x01\n\x11SearchConnections\x12/.google.privacy.dlp.v2.SearchConnectionsRequest\x1a\x30.google.privacy.dlp.v2.SearchConnectionsResponse\"\x86\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02w\x12\x36/v2/{parent=projects/*/locations/*}/connections:searchZ=\x12;/v2/{parent=organizations/*/locations/*}/connections:search\x12\xd2\x01\n\x10\x44\x65leteConnection\x12..google.privacy.dlp.v2.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i*//v2/{name=projects/*/locations/*/connections/*}Z6*4/v2/{name=organizations/*/locations/*/connections/*}\x12\xe3\x01\n\x10UpdateConnection\x12..google.privacy.dlp.v2.UpdateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"|\xda\x41\x04name\x82\xd3\xe4\x93\x02o2//v2/{name=projects/*/locations/*/connections/*}:\x01*Z924/v2/{name=organizations/*/locations/*/connections/*}:\x01*\x1a\x46\xca\x41\x12\x64lp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x02\n\x19\x63om.google.privacy.dlp.v2B\x08\x44lpProtoP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2\xea\x41r\n\x1d\x64lp.googleapis.com/DlpContent\x12\x1dprojects/{project}/dlpContent\x12\x32projects/{project}/locations/{location}/dlpContent\xea\x41\\\n\'dlp.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -246,6 +246,7 @@ module V2 DataProfileAction::PubSubNotification::DetailLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel").enummodule DataProfileAction::PublishToChronicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToChronicle").msgclass DataProfileAction::PublishToSecurityCommandCenter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter").msgclass + DataProfileAction::PublishToDataplexCatalog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog").msgclass DataProfileAction::TagResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources").msgclass DataProfileAction::TagResources::TagCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition").msgclass DataProfileAction::TagResources::TagValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue").msgclass diff --git a/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb b/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb index b5d6159ce4b4..9228ccc0267d 100644 --- a/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb +++ b/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb @@ -8,7 +8,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n#google/privacy/dlp/v2/storage.proto\x12\x15google.privacy.dlp.v2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"m\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\"\xfb\x01\n\x10SensitivityScore\x12L\n\x05score\x18\x01 \x01(\x0e\x32=.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel\"\x98\x01\n\x15SensitivityScoreLevel\x12!\n\x1dSENSITIVITY_SCORE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSENSITIVITY_LOW\x10\n\x12\x17\n\x13SENSITIVITY_UNKNOWN\x10\x0c\x12\x18\n\x14SENSITIVITY_MODERATE\x10\x14\x12\x14\n\x10SENSITIVITY_HIGH\x10\x1e\"K\n\nStoredType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8c\x0c\n\x0e\x43ustomInfoType\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x46\n\ndictionary\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12M\n\x0esurrogate_type\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeH\x00\x12\x38\n\x0bstored_type\x18\x05 \x01(\x0b\x32!.google.privacy.dlp.v2.StoredTypeH\x00\x12L\n\x0f\x64\x65tection_rules\x18\x07 \x03(\x0b\x32\x33.google.privacy.dlp.v2.CustomInfoType.DetectionRule\x12K\n\x0e\x65xclusion_type\x18\x08 \x01(\x0e\x32\x33.google.privacy.dlp.v2.CustomInfoType.ExclusionType\x12\x42\n\x11sensitivity_score\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x1a\xc8\x01\n\nDictionary\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x12\x45\n\x12\x63loud_storage_path\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePathH\x00\x1a\x19\n\x08WordList\x12\r\n\x05words\x18\x01 \x03(\tB\x08\n\x06source\x1a/\n\x05Regex\x12\x0f\n\x07pattern\x18\x01 \x01(\t\x12\x15\n\rgroup_indexes\x18\x02 \x03(\x05\x1a\x0f\n\rSurrogateType\x1a\xbe\x04\n\rDetectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x1a\x38\n\tProximity\x12\x15\n\rwindow_before\x18\x01 \x01(\x05\x12\x14\n\x0cwindow_after\x18\x02 \x01(\x05\x1a\x82\x01\n\x14LikelihoodAdjustment\x12=\n\x10\x66ixed_likelihood\x18\x01 \x01(\x0e\x32!.google.privacy.dlp.v2.LikelihoodH\x00\x12\x1d\n\x13relative_likelihood\x18\x02 \x01(\x05H\x00\x42\x0c\n\nadjustment\x1a\x8c\x02\n\x0bHotwordRule\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\x12g\n\x15likelihood_adjustment\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentB\x06\n\x04type\"K\n\rExclusionType\x12\x1e\n\x1a\x45XCLUSION_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45XCLUSION_TYPE_EXCLUDE\x10\x01\x42\x06\n\x04type\"\x17\n\x07\x46ieldId\x12\x0c\n\x04name\x18\x01 \x01(\t\"7\n\x0bPartitionId\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\"\x1e\n\x0eKindExpression\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x81\x01\n\x10\x44\x61tastoreOptions\x12\x38\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.PartitionId\x12\x33\n\x04kind\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.KindExpression\"]\n\x18\x43loudStorageRegexFileSet\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x15\n\rinclude_regex\x18\x02 \x03(\t\x12\x15\n\rexclude_regex\x18\x03 \x03(\t\"\xec\x03\n\x13\x43loudStorageOptions\x12\x44\n\x08\x66ile_set\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageOptions.FileSet\x12\x1c\n\x14\x62ytes_limit_per_file\x18\x04 \x01(\x03\x12$\n\x1c\x62ytes_limit_per_file_percent\x18\x08 \x01(\x05\x12\x33\n\nfile_types\x18\x05 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileType\x12N\n\rsample_method\x18\x06 \x01(\x0e\x32\x37.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod\x12\x1b\n\x13\x66iles_limit_percent\x18\x07 \x01(\x05\x1a_\n\x07\x46ileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\x12G\n\x0eregex_file_set\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.CloudStorageRegexFileSet\"H\n\x0cSampleMethod\x12\x1d\n\x19SAMPLE_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\x10\n\x0cRANDOM_START\x10\x02\"\"\n\x13\x43loudStorageFileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\" \n\x10\x43loudStoragePath\x12\x0c\n\x04path\x18\x01 \x01(\t\"\xc4\x03\n\x0f\x42igQueryOptions\x12=\n\x0ftable_reference\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12:\n\x12identifying_fields\x18\x02 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\nrows_limit\x18\x03 \x01(\x03\x12\x1a\n\x12rows_limit_percent\x18\x06 \x01(\x05\x12J\n\rsample_method\x18\x04 \x01(\x0e\x32\x33.google.privacy.dlp.v2.BigQueryOptions.SampleMethod\x12\x37\n\x0f\x65xcluded_fields\x18\x05 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x0fincluded_fields\x18\x07 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"H\n\x0cSampleMethod\x12\x1d\n\x19SAMPLE_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\x10\n\x0cRANDOM_START\x10\x02\"\xda\x04\n\rStorageConfig\x12\x44\n\x11\x64\x61tastore_options\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DatastoreOptionsH\x00\x12K\n\x15\x63loud_storage_options\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageOptionsH\x00\x12\x43\n\x11\x62ig_query_options\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryOptionsH\x00\x12>\n\x0ehybrid_options\x18\t \x01(\x0b\x32$.google.privacy.dlp.v2.HybridOptionsH\x00\x12L\n\x0ftimespan_config\x18\x06 \x01(\x0b\x32\x33.google.privacy.dlp.v2.StorageConfig.TimespanConfig\x1a\xda\x01\n\x0eTimespanConfig\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0ftimestamp_field\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x31\n)enable_auto_population_of_timespan_config\x18\x04 \x01(\x08\x42\x06\n\x04type\"\xf6\x01\n\rHybridOptions\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12#\n\x1brequired_finding_label_keys\x18\x02 \x03(\t\x12@\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.HybridOptions.LabelsEntry\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x0b\x42igQueryKey\x12=\n\x0ftable_reference\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x12\n\nrow_number\x18\x02 \x01(\x03\">\n\x0c\x44\x61tastoreKey\x12.\n\nentity_key\x18\x01 \x01(\x0b\x32\x1a.google.privacy.dlp.v2.Key\"\xbb\x01\n\x03Key\x12\x38\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.PartitionId\x12\x34\n\x04path\x18\x02 \x03(\x0b\x32&.google.privacy.dlp.v2.Key.PathElement\x1a\x44\n\x0bPathElement\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x02id\x18\x02 \x01(\x03H\x00\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x42\t\n\x07id_type\"\xa1\x01\n\tRecordKey\x12<\n\rdatastore_key\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.DatastoreKeyH\x00\x12;\n\rbig_query_key\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.BigQueryKeyH\x00\x12\x11\n\tid_values\x18\x05 \x03(\tB\x06\n\x04type\"I\n\rBigQueryTable\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x12\n\ndataset_id\x18\x02 \x01(\t\x12\x10\n\x08table_id\x18\x03 \x01(\t\"6\n\x0eTableReference\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x12\x10\n\x08table_id\x18\x02 \x01(\t\"s\n\rBigQueryField\x12\x33\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"9\n\x08\x45ntityId\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"J\n\x0cTableOptions\x12:\n\x12identifying_fields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05*\x9a\x01\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x42INARY_FILE\x10\x01\x12\r\n\tTEXT_FILE\x10\x02\x12\t\n\x05IMAGE\x10\x03\x12\x08\n\x04WORD\x10\x05\x12\x07\n\x03PDF\x10\x06\x12\x08\n\x04\x41VRO\x10\x07\x12\x07\n\x03\x43SV\x10\x08\x12\x07\n\x03TSV\x10\t\x12\x0e\n\nPOWERPOINT\x10\x0b\x12\t\n\x05\x45XCEL\x10\x0c\x42\x99\x01\n\x19\x63om.google.privacy.dlp.v2B\nDlpStorageP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2b\x06proto3" +descriptor_data = "\n#google/privacy/dlp/v2/storage.proto\x12\x15google.privacy.dlp.v2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"m\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\"\xfb\x01\n\x10SensitivityScore\x12L\n\x05score\x18\x01 \x01(\x0e\x32=.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel\"\x98\x01\n\x15SensitivityScoreLevel\x12!\n\x1dSENSITIVITY_SCORE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSENSITIVITY_LOW\x10\n\x12\x17\n\x13SENSITIVITY_UNKNOWN\x10\x0c\x12\x18\n\x14SENSITIVITY_MODERATE\x10\x14\x12\x14\n\x10SENSITIVITY_HIGH\x10\x1e\"K\n\nStoredType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8c\x0c\n\x0e\x43ustomInfoType\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x46\n\ndictionary\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12M\n\x0esurrogate_type\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeH\x00\x12\x38\n\x0bstored_type\x18\x05 \x01(\x0b\x32!.google.privacy.dlp.v2.StoredTypeH\x00\x12L\n\x0f\x64\x65tection_rules\x18\x07 \x03(\x0b\x32\x33.google.privacy.dlp.v2.CustomInfoType.DetectionRule\x12K\n\x0e\x65xclusion_type\x18\x08 \x01(\x0e\x32\x33.google.privacy.dlp.v2.CustomInfoType.ExclusionType\x12\x42\n\x11sensitivity_score\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x1a\xc8\x01\n\nDictionary\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x12\x45\n\x12\x63loud_storage_path\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePathH\x00\x1a\x19\n\x08WordList\x12\r\n\x05words\x18\x01 \x03(\tB\x08\n\x06source\x1a/\n\x05Regex\x12\x0f\n\x07pattern\x18\x01 \x01(\t\x12\x15\n\rgroup_indexes\x18\x02 \x03(\x05\x1a\x0f\n\rSurrogateType\x1a\xbe\x04\n\rDetectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x1a\x38\n\tProximity\x12\x15\n\rwindow_before\x18\x01 \x01(\x05\x12\x14\n\x0cwindow_after\x18\x02 \x01(\x05\x1a\x82\x01\n\x14LikelihoodAdjustment\x12=\n\x10\x66ixed_likelihood\x18\x01 \x01(\x0e\x32!.google.privacy.dlp.v2.LikelihoodH\x00\x12\x1d\n\x13relative_likelihood\x18\x02 \x01(\x05H\x00\x42\x0c\n\nadjustment\x1a\x8c\x02\n\x0bHotwordRule\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\x12g\n\x15likelihood_adjustment\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentB\x06\n\x04type\"K\n\rExclusionType\x12\x1e\n\x1a\x45XCLUSION_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45XCLUSION_TYPE_EXCLUDE\x10\x01\x42\x06\n\x04type\"\x17\n\x07\x46ieldId\x12\x0c\n\x04name\x18\x01 \x01(\t\"7\n\x0bPartitionId\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\"\x1e\n\x0eKindExpression\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x81\x01\n\x10\x44\x61tastoreOptions\x12\x38\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.PartitionId\x12\x33\n\x04kind\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.KindExpression\"]\n\x18\x43loudStorageRegexFileSet\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x15\n\rinclude_regex\x18\x02 \x03(\t\x12\x15\n\rexclude_regex\x18\x03 \x03(\t\"\xec\x03\n\x13\x43loudStorageOptions\x12\x44\n\x08\x66ile_set\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageOptions.FileSet\x12\x1c\n\x14\x62ytes_limit_per_file\x18\x04 \x01(\x03\x12$\n\x1c\x62ytes_limit_per_file_percent\x18\x08 \x01(\x05\x12\x33\n\nfile_types\x18\x05 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileType\x12N\n\rsample_method\x18\x06 \x01(\x0e\x32\x37.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod\x12\x1b\n\x13\x66iles_limit_percent\x18\x07 \x01(\x05\x1a_\n\x07\x46ileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\x12G\n\x0eregex_file_set\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.CloudStorageRegexFileSet\"H\n\x0cSampleMethod\x12\x1d\n\x19SAMPLE_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\x10\n\x0cRANDOM_START\x10\x02\"\"\n\x13\x43loudStorageFileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\" \n\x10\x43loudStoragePath\x12\x0c\n\x04path\x18\x01 \x01(\t\"\xc4\x03\n\x0f\x42igQueryOptions\x12=\n\x0ftable_reference\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12:\n\x12identifying_fields\x18\x02 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\nrows_limit\x18\x03 \x01(\x03\x12\x1a\n\x12rows_limit_percent\x18\x06 \x01(\x05\x12J\n\rsample_method\x18\x04 \x01(\x0e\x32\x33.google.privacy.dlp.v2.BigQueryOptions.SampleMethod\x12\x37\n\x0f\x65xcluded_fields\x18\x05 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x0fincluded_fields\x18\x07 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"H\n\x0cSampleMethod\x12\x1d\n\x19SAMPLE_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\x10\n\x0cRANDOM_START\x10\x02\"\xda\x04\n\rStorageConfig\x12\x44\n\x11\x64\x61tastore_options\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DatastoreOptionsH\x00\x12K\n\x15\x63loud_storage_options\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageOptionsH\x00\x12\x43\n\x11\x62ig_query_options\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryOptionsH\x00\x12>\n\x0ehybrid_options\x18\t \x01(\x0b\x32$.google.privacy.dlp.v2.HybridOptionsH\x00\x12L\n\x0ftimespan_config\x18\x06 \x01(\x0b\x32\x33.google.privacy.dlp.v2.StorageConfig.TimespanConfig\x1a\xda\x01\n\x0eTimespanConfig\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0ftimestamp_field\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x31\n)enable_auto_population_of_timespan_config\x18\x04 \x01(\x08\x42\x06\n\x04type\"\xf6\x01\n\rHybridOptions\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12#\n\x1brequired_finding_label_keys\x18\x02 \x03(\t\x12@\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.HybridOptions.LabelsEntry\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x0b\x42igQueryKey\x12=\n\x0ftable_reference\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x12\n\nrow_number\x18\x02 \x01(\x03\">\n\x0c\x44\x61tastoreKey\x12.\n\nentity_key\x18\x01 \x01(\x0b\x32\x1a.google.privacy.dlp.v2.Key\"\xbb\x01\n\x03Key\x12\x38\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.PartitionId\x12\x34\n\x04path\x18\x02 \x03(\x0b\x32&.google.privacy.dlp.v2.Key.PathElement\x1a\x44\n\x0bPathElement\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x02id\x18\x02 \x01(\x03H\x00\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x42\t\n\x07id_type\"\xa1\x01\n\tRecordKey\x12<\n\rdatastore_key\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.DatastoreKeyH\x00\x12;\n\rbig_query_key\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.BigQueryKeyH\x00\x12\x11\n\tid_values\x18\x05 \x03(\tB\x06\n\x04type\"I\n\rBigQueryTable\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x12\n\ndataset_id\x18\x02 \x01(\t\x12\x10\n\x08table_id\x18\x03 \x01(\t\"J\n\x0eTableReference\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x12\x10\n\x08table_id\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x03 \x01(\t\"s\n\rBigQueryField\x12\x33\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"9\n\x08\x45ntityId\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"J\n\x0cTableOptions\x12:\n\x12identifying_fields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05*\x9a\x01\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x42INARY_FILE\x10\x01\x12\r\n\tTEXT_FILE\x10\x02\x12\t\n\x05IMAGE\x10\x03\x12\x08\n\x04WORD\x10\x05\x12\x07\n\x03PDF\x10\x06\x12\x08\n\x04\x41VRO\x10\x07\x12\x07\n\x03\x43SV\x10\x08\x12\x07\n\x03TSV\x10\t\x12\x0e\n\nPOWERPOINT\x10\x0b\x12\t\n\x05\x45XCEL\x10\x0c\x42\x99\x01\n\x19\x63om.google.privacy.dlp.v2B\nDlpStorageP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb b/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb index 64a3967c6822..6f69d65cdda4 100644 --- a/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb +++ b/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb @@ -3645,33 +3645,79 @@ class PublishFindingsToCloudDataCatalog extend ::Google::Protobuf::MessageExts::ClassMethods end - # Create a de-identified copy of the requested table or files. + # Create a de-identified copy of a storage bucket. Only compatible + # with Cloud Storage buckets. + # # # A TransformationDetail will be created for each transformation. # - # If any rows in BigQuery are skipped during de-identification - # (transformation errors or row size exceeds BigQuery insert API limits) they - # are placed in the failure output table. If the original row exceeds - # the BigQuery insert API limit it will be truncated when written to the - # failure output table. The failure output table can be set in the - # action.deidentify.output.big_query_output.deidentified_failure_output_table - # field, if no table is set, a table will be automatically created in the - # same project and dataset as the original table. # - # Compatible with: Inspect + # Compatible with: Inspection of Cloud Storage # @!attribute [rw] transformation_config # @return [::Google::Cloud::Dlp::V2::TransformationConfig] # User specified deidentify templates and configs for structured, # unstructured, and image files. # @!attribute [rw] transformation_details_storage_config # @return [::Google::Cloud::Dlp::V2::TransformationDetailsStorageConfig] - # Config for storing transformation details. This is separate from the - # de-identified content, and contains metadata about the successful - # transformations and/or failures that occurred while de-identifying. This - # needs to be set in order for users to access information about the status - # of each transformation (see + # Config for storing transformation details. + # + # This field specifies the configuration for storing detailed metadata + # about each transformation performed during a de-identification process. + # The metadata is stored separately from the de-identified content itself + # and provides a granular record of both successful transformations and any + # failures that occurred. + # + # Enabling this configuration is essential for users who need to access + # comprehensive information about the status, outcome, and specifics of + # each transformation. The details are captured in the # {::Google::Cloud::Dlp::V2::TransformationDetails TransformationDetails} - # message for more information about what is noted). + # message for each operation. + # + # Key use cases: + # + # * **Auditing and compliance** + # * Provides a verifiable audit trail of de-identification activities, + # which is crucial for meeting regulatory requirements and internal + # data governance policies. + # * Logs what data was transformed, what transformations were applied, + # when they occurred, and their success status. This helps + # demonstrate accountability and due diligence in protecting + # sensitive data. + # + # * **Troubleshooting and debugging** + # * Offers detailed error messages and context if a transformation + # fails. This information is useful for diagnosing and resolving + # issues in the de-identification pipeline. + # * Helps pinpoint the exact location and nature of failures, speeding + # up the debugging process. + # + # * **Process verification and quality assurance** + # * Allows users to confirm that de-identification rules and + # transformations were applied correctly and consistently across + # the dataset as intended. + # * Helps in verifying the effectiveness of the chosen + # de-identification strategies. + # + # * **Data lineage and impact analysis** + # * Creates a record of how data elements were modified, contributing + # to data lineage. This is useful for understanding the provenance + # of de-identified data. + # * Aids in assessing the potential impact of de-identification choices + # on downstream analytical processes or data usability. + # + # * **Reporting and operational insights** + # * You can analyze the metadata stored in a queryable BigQuery table + # to generate reports on transformation success rates, common + # error types, processing volumes (e.g., transformedBytes), and the + # types of transformations applied. + # * These insights can inform optimization of de-identification + # configurations and resource planning. + # + # To take advantage of these benefits, set this configuration. The stored + # details include a description of the transformation, success or + # error codes, error messages, the number of bytes transformed, the + # location of the transformed content, and identifiers for the job and + # source data. # @!attribute [rw] cloud_storage_output # @return [::String] # Required. User settable Cloud Storage bucket and folders to store @@ -4258,12 +4304,12 @@ class InspectJobConfig # @return [::Google::Cloud::Dlp::V2::DataProfileAction::Export] # Export data profiles into a provided location. # - # Note: The following fields are mutually exclusive: `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`. 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: `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] pub_sub_notification # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification] # Publish a message into the Pub/Sub topic. # - # Note: The following fields are mutually exclusive: `pub_sub_notification`, `export_data`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`. 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: `pub_sub_notification`, `export_data`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] publish_to_chronicle # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToChronicle] # Publishes generated data profiles to Google Security Operations. @@ -4271,17 +4317,23 @@ class InspectJobConfig # context-aware # analytics](https://cloud.google.com/chronicle/docs/detection/usecase-dlp-high-risk-user-download). # - # Note: The following fields are mutually exclusive: `publish_to_chronicle`, `export_data`, `pub_sub_notification`, `publish_to_scc`, `tag_resources`. 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: `publish_to_chronicle`, `export_data`, `pub_sub_notification`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] publish_to_scc # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToSecurityCommandCenter] # Publishes findings to Security Command Center for each data profile. # - # Note: The following fields are mutually exclusive: `publish_to_scc`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `tag_resources`. 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: `publish_to_scc`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] tag_resources # @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources] # Tags the profiled resources with the specified tag values. # - # Note: The following fields are mutually exclusive: `tag_resources`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`. 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: `tag_resources`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] publish_to_dataplex_catalog + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToDataplexCatalog] + # Publishes a portion of each profile to Dataplex Catalog with the aspect + # type Sensitive Data Protection Profile. + # + # Note: The following fields are mutually exclusive: `publish_to_dataplex_catalog`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`. If a field in that set is populated, all other fields in the set will automatically be cleared. class DataProfileAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -4383,6 +4435,21 @@ class PublishToSecurityCommandCenter extend ::Google::Protobuf::MessageExts::ClassMethods end + # Create Dataplex Catalog aspects for profiled resources with the aspect type + # Sensitive Data Protection Profile. To learn more about aspects, see + # https://cloud.google.com/sensitive-data-protection/docs/add-aspects. + # @!attribute [rw] lower_data_risk_to_low + # @return [::Boolean] + # Whether creating a Dataplex Catalog aspect for a profiled resource should + # lower the risk of the profile for that resource. This also lowers the + # data risk of resources at the lower levels of the resource hierarchy. For + # example, reducing the data risk of a table data profile also reduces the + # data risk of the constituent column data profiles. + class PublishToDataplexCatalog + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # If set, attaches the [tags] # (https://cloud.google.com/resource-manager/docs/tags/tags-overview) # provided to profiled resources. Tags support [access @@ -4492,6 +4559,14 @@ module EventType # @!attribute [rw] resource_visibility # @return [::Google::Cloud::Dlp::V2::ResourceVisibility] # How broadly a resource has been shared. + # @!attribute [rw] full_resource_name + # @return [::String] + # The [full resource + # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # of the resource profiled for this finding. + # @!attribute [rw] data_source_type + # @return [::Google::Cloud::Dlp::V2::DataSourceType] + # The type of the resource that was profiled. class DataProfileFinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -7313,7 +7388,8 @@ module ColumnPolicyState # The BigQuery table to which the sample findings are written. # @!attribute [rw] file_store_is_empty # @return [::Boolean] - # The file store does not have any files. + # The file store does not have any files. If the profiling operation failed, + # this is false. # @!attribute [rw] tags # @return [::Array<::Google::Cloud::Dlp::V2::Tag>] # The tags attached to the resource, including any tags attached during diff --git a/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb b/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb index 34cf859c7e64..2a78e7bbd9bc 100644 --- a/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb +++ b/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb @@ -872,6 +872,11 @@ class BigQueryTable # @!attribute [rw] table_id # @return [::String] # Name of the table. + # @!attribute [rw] project_id + # @return [::String] + # The Google Cloud project ID of the project containing the table. + # If omitted, the project ID is inferred from the parent project. This field + # is required if the parent resource is an organization. class TableReference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From 3382ebc1a3b85ca07ea1f92ca846ad137955655c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:38:04 -0700 Subject: [PATCH 080/457] feat: add topology_manager in NodeKubeletConfig (#30479) feat: add image_gc_low_threshold_percent in NodeKubeletConfig feat: add image_gc_high_threshold_percent in NodeKubeletConfig feat: add image_minimum_gc_age in NodeKubeletConfig feat: add image_maximum_gc_age in NodeKubeletConfig feat: add container_log_max_size in NodeKubeletConfig feat: add container_log_max_files in NodeKubeletConfig feat: add allowed_unsafe_sysctls in NodeKubeletConfig feat: add TopologyManager feat: add MemoryManager feat: add storage_pools in NodeConfig feat: add max_run_duration in NodeConfig feat: add local_ssd_encryption_mode in NodeConfig feat: add effective_cgroup_mode in NodeConfig feat: add flex_start in NodeConfig feat: add performance_monitoring_unit in AdvancedMachineFeatures feat: add parallelstore_csi_driver_config in AddonsConfig feat: add high_scale_checkpointing_config in AddonsConfig feat: add private_endpoint_enforcement_enabled in MasterAuthorizedNetworksConfig feat: add alpha_cluster_feature_gates in Cluster feat: add pod_autoscaling in Cluster feat: add control_plane_endpoints_config in Cluster feat: add user_managed_keys_config in Cluster feat: add rbac_binding_config in Cluster feat: add anonymous_authentication_config in Cluster feat: add linux_node_config in NodePoolAutoConfig feat: add desired_default_enable_private_nodes in ClusterUpdate feat: add desired_control_plane_endpoints_config in ClusterUpdate feat: add desired_pod_autoscaling in ClusterUpdate feat: add user_managed_keys_config in ClusterUpdate feat: add desired_rbac_binding_config in ClusterUpdate feat: add desired_enterprise_config in ClusterUpdate feat: add desired_disable_l4_lb_firewall_reconciliation in ClusterUpdate feat: add desired_node_pool_auto_config_linux_node_config in ClusterUpdate feat: add desired_compliance_posture_config in ClusterUpdate feat: add desired_anonymous_authentication_config in ClusterUpdate feat: add storage_pools in UpdateNodePoolRequest feat: add max_run_duration in UpdateNodePoolRequest feat: add flex_start in UpdateNodePoolRequest feat: add upgrade_target_version in ReleaseChannelConfig feat: add NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS in StatusCondition.Code feat: add disable_l4_lb_firewall_reconciliation in NetworkConfig feat: add UPGRADE_INFO_EVENT in NotificationConfig.EventType feat: add confidential_instance_type in ConfidentialNodes feat: add event_type in UpgradeInfoEvent feat: add standard_support_end_time in UpgradeInfoEvent feat: add extended_support_end_time in UpgradeInfoEvent feat: add mitigated_versions in SecurityBulletinEvent feat: add autopilot_compatibility_auditing_enabled in WorkloadPolicyConfig feat: add KCP_HPA in LoggingComponentConfig.Component feat: add JOBSET in MonitoringComponentConfig.Component feat: add auto_monitoring_config in ManagedPrometheusConfig feat: add data_cache_count in EphemeralStorageLocalSsdConfig feat: add FetchClusterUpgradeInfoRequest feat: add ClusterUpgradeInfo feat: add UpgradeDetails feat: add FetchNodePoolUpgradeInfoRequest feat: add NodePoolUpgradeInfo docs: Minor documentation updates --- .../.owlbot-manifest.json | 2 + .../gapic_metadata.json | 10 + .../v1beta1/cluster_manager/client.rb | 385 ++++-- .../v1beta1/cluster_manager/paths.rb | 42 + .../container/v1beta1/cluster_service_pb.rb | 36 +- .../v1beta1/cluster_service_services_pb.rb | 6 + .../container/v1beta1/cluster_service.rb | 1224 +++++++++++++++-- .../fetch_cluster_upgrade_info.rb | 47 + .../fetch_node_pool_upgrade_info.rb | 47 + ...pet_metadata_google.container.v1beta1.json | 80 ++ .../v1beta1/cluster_manager_paths_test.rb | 24 + .../container/v1beta1/cluster_manager_test.rb | 137 +- 12 files changed, 1822 insertions(+), 218 deletions(-) create mode 100644 google-cloud-container-v1beta1/snippets/cluster_manager/fetch_cluster_upgrade_info.rb create mode 100644 google-cloud-container-v1beta1/snippets/cluster_manager/fetch_node_pool_upgrade_info.rb diff --git a/google-cloud-container-v1beta1/.owlbot-manifest.json b/google-cloud-container-v1beta1/.owlbot-manifest.json index 916070dd8a07..bb29eb071c9d 100644 --- a/google-cloud-container-v1beta1/.owlbot-manifest.json +++ b/google-cloud-container-v1beta1/.owlbot-manifest.json @@ -45,6 +45,8 @@ "snippets/cluster_manager/create_node_pool.rb", "snippets/cluster_manager/delete_cluster.rb", "snippets/cluster_manager/delete_node_pool.rb", + "snippets/cluster_manager/fetch_cluster_upgrade_info.rb", + "snippets/cluster_manager/fetch_node_pool_upgrade_info.rb", "snippets/cluster_manager/get_cluster.rb", "snippets/cluster_manager/get_json_web_keys.rb", "snippets/cluster_manager/get_node_pool.rb", diff --git a/google-cloud-container-v1beta1/gapic_metadata.json b/google-cloud-container-v1beta1/gapic_metadata.json index 435f628465ea..587a1ca6597a 100644 --- a/google-cloud-container-v1beta1/gapic_metadata.json +++ b/google-cloud-container-v1beta1/gapic_metadata.json @@ -184,6 +184,16 @@ "methods": [ "list_locations" ] + }, + "FetchClusterUpgradeInfo": { + "methods": [ + "fetch_cluster_upgrade_info" + ] + }, + "FetchNodePoolUpgradeInfo": { + "methods": [ + "fetch_node_pool_upgrade_info" + ] } } } diff --git a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb index 85fda10ee9e5..5210107efc89 100644 --- a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb +++ b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb @@ -300,11 +300,11 @@ def logger # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides, or "-" for all zones. This field has been deprecated and # replaced by the parent field. @@ -396,16 +396,16 @@ def list_clusters request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to retrieve. + # Deprecated. The name of the cluster to retrieve. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, cluster) of the cluster to retrieve. @@ -507,11 +507,11 @@ def get_cluster request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the parent # field. @@ -605,16 +605,16 @@ def create_cluster request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param update [::Google::Cloud::Container::V1beta1::ClusterUpdate, ::Hash] # Required. A description of the update. @@ -699,25 +699,25 @@ def update_cluster request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil) + # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil) # Pass arguments to `update_node_pool` 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 project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param node_pool_id [::String] - # Required. Deprecated. The name of the node pool to upgrade. + # Deprecated. The name of the node pool to upgrade. # This field has been deprecated and replaced by the name field. # @param node_version [::String] # Required. The Kubernetes version to change the nodes to (typically an @@ -813,6 +813,14 @@ def update_cluster request, options = nil # config. # @param queued_provisioning [::Google::Cloud::Container::V1beta1::NodePool::QueuedProvisioning, ::Hash] # Specifies the configuration of queued provisioning. + # @param storage_pools [::Array<::String>] + # List of Storage Pools where boot disks are provisioned. + # Existing Storage Pools will be replaced with storage-pools. + # @param max_run_duration [::Google::Protobuf::Duration, ::Hash] + # The maximum duration for the nodes to exist. + # If unspecified, the nodes can exist indefinitely. + # @param flex_start [::Boolean] + # Flex Start flag for enabling Flex Start VM. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Container::V1beta1::Operation] @@ -897,19 +905,19 @@ def update_node_pool request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param node_pool_id [::String] - # Required. Deprecated. The name of the node pool to upgrade. + # Deprecated. The name of the node pool to upgrade. # This field has been deprecated and replaced by the name field. # @param autoscaling [::Google::Cloud::Container::V1beta1::NodePoolAutoscaling, ::Hash] # Required. Autoscaling configuration for the node pool. @@ -1001,16 +1009,16 @@ def set_node_pool_autoscaling request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param logging_service [::String] # Required. The logging service the cluster should use to write logs. @@ -1111,22 +1119,22 @@ def set_logging_service request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param monitoring_service [::String] # Required. The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -1221,16 +1229,16 @@ def set_monitoring_service request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param addons_config [::Google::Cloud::Container::V1beta1::AddonsConfig, ::Hash] # Required. The desired configurations for the various addons available to @@ -1327,16 +1335,16 @@ def set_addons_config request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param locations [::Array<::String>] # Required. The desired list of Google Compute Engine @@ -1433,16 +1441,16 @@ def set_locations request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param master_version [::String] # Required. The Kubernetes version to change the master to. @@ -1544,16 +1552,16 @@ def update_master request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param action [::Google::Cloud::Container::V1beta1::SetMasterAuthRequest::Action] # Required. The exact form of action to be taken on the master auth. @@ -1654,16 +1662,16 @@ def set_master_auth request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to delete. + # Deprecated. The name of the cluster to delete. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, cluster) of the cluster to delete. @@ -1752,11 +1760,11 @@ def delete_cluster request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) to return # operations for, or `-` for all zones. This field has been deprecated and # replaced by the parent field. @@ -1848,16 +1856,16 @@ def list_operations request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param operation_id [::String] - # Required. Deprecated. The server-assigned `name` of the operation. + # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, operation id) of the operation to get. @@ -1946,16 +1954,16 @@ def get_operation request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # operation resides. This field has been deprecated and replaced by the name # field. # @param operation_id [::String] - # Required. Deprecated. The server-assigned `name` of the operation. + # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, operation id) of the operation to cancel. @@ -2044,11 +2052,11 @@ def cancel_operation request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) to return # operations for. This field has been deprecated and replaced by the name # field. @@ -2226,16 +2234,16 @@ def get_json_web_keys request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the parent # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. # @param parent [::String] # The parent (project, location, cluster name) where the node pools will be @@ -2324,19 +2332,19 @@ def list_node_pools request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @param node_pool_id [::String] - # Required. Deprecated. The name of the node pool. + # Deprecated. The name of the node pool. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, cluster, node pool id) of the node pool to @@ -2426,16 +2434,16 @@ def get_node_pool request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the parent # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. # @param node_pool [::Google::Cloud::Container::V1beta1::NodePool, ::Hash] # Required. The node pool to create. @@ -2527,19 +2535,19 @@ def create_node_pool request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @param node_pool_id [::String] - # Required. Deprecated. The name of the node pool to delete. + # Deprecated. The name of the node pool to delete. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, cluster, node pool id) of the node pool to @@ -2718,19 +2726,19 @@ def complete_node_pool_upgrade request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to rollback. + # Deprecated. The name of the cluster to rollback. # This field has been deprecated and replaced by the name field. # @param node_pool_id [::String] - # Required. Deprecated. The name of the node pool to rollback. + # Deprecated. The name of the node pool to rollback. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, cluster, node pool id) of the node poll to @@ -2823,19 +2831,19 @@ def rollback_node_pool_upgrade request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to update. + # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. # @param node_pool_id [::String] - # Required. Deprecated. The name of the node pool to update. + # Deprecated. The name of the node pool to update. # This field has been deprecated and replaced by the name field. # @param management [::Google::Cloud::Container::V1beta1::NodeManagement, ::Hash] # Required. NodeManagement configuration for the node pool. @@ -2927,16 +2935,16 @@ def set_node_pool_management request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @param resource_labels [::Hash{::String => ::String}] # Required. The labels to set for that cluster. @@ -3034,16 +3042,16 @@ def set_labels request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to update. + # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. # @param enabled [::Boolean] # Required. Whether ABAC authorization will be enabled in the cluster. @@ -3134,16 +3142,16 @@ def set_legacy_abac request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, cluster name) of the cluster to start IP @@ -3234,16 +3242,16 @@ def start_ip_rotation request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @param name [::String] # The name (project, location, cluster name) of the cluster to complete IP @@ -3334,19 +3342,19 @@ def complete_ip_rotation request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster to update. + # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. # @param node_pool_id [::String] - # Required. Deprecated. The name of the node pool to update. + # Deprecated. The name of the node pool to update. # This field has been deprecated and replaced by the name field. # @param node_count [::Integer] # Required. The desired node count for the pool. @@ -3438,16 +3446,16 @@ def set_node_pool_size request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param project_id [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @param zone [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @param cluster_id [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @param network_policy [::Google::Cloud::Container::V1beta1::NetworkPolicy, ::Hash] # Required. Configuration options for the NetworkPolicy feature. @@ -3896,6 +3904,185 @@ def list_locations request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Fetch upgrade information of a specific cluster. + # + # @overload fetch_cluster_upgrade_info(request, options = nil) + # Pass arguments to `fetch_cluster_upgrade_info` via a request object, either of type + # {::Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest, ::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 fetch_cluster_upgrade_info(name: nil, version: nil) + # Pass arguments to `fetch_cluster_upgrade_info` 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 name (project, location, cluster) of the cluster to get. + # Specified in the format `projects/*/locations/*/clusters/*` or + # `projects/*/zones/*/clusters/*`. + # @param version [::String] + # API request version that initiates this operation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Container::V1beta1::ClusterUpgradeInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Container::V1beta1::ClusterUpgradeInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/container/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest.new + # + # # Call the fetch_cluster_upgrade_info method. + # result = client.fetch_cluster_upgrade_info request + # + # # The returned object is of type Google::Cloud::Container::V1beta1::ClusterUpgradeInfo. + # p result + # + def fetch_cluster_upgrade_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest + + # 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.fetch_cluster_upgrade_info.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::Container::V1beta1::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.fetch_cluster_upgrade_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_cluster_upgrade_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cluster_manager_stub.call_rpc :fetch_cluster_upgrade_info, 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 + + ## + # Fetch upgrade information of a specific nodepool. + # + # @overload fetch_node_pool_upgrade_info(request, options = nil) + # Pass arguments to `fetch_node_pool_upgrade_info` via a request object, either of type + # {::Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest, ::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 fetch_node_pool_upgrade_info(name: nil, version: nil) + # Pass arguments to `fetch_node_pool_upgrade_info` 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 name (project, location, cluster, nodepool) of the nodepool + # to get. Specified in the format + # `projects/*/locations/*/clusters/*/nodePools/*` or + # `projects/*/zones/*/clusters/*/nodePools/*`. + # @param version [::String] + # API request version that initiates this operation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Container::V1beta1::NodePoolUpgradeInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Container::V1beta1::NodePoolUpgradeInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/container/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest.new + # + # # Call the fetch_node_pool_upgrade_info method. + # result = client.fetch_node_pool_upgrade_info request + # + # # The returned object is of type Google::Cloud::Container::V1beta1::NodePoolUpgradeInfo. + # p result + # + def fetch_node_pool_upgrade_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest + + # 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.fetch_node_pool_upgrade_info.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::Container::V1beta1::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.fetch_node_pool_upgrade_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_node_pool_upgrade_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cluster_manager_stub.call_rpc :fetch_node_pool_upgrade_info, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the ClusterManager API. # @@ -4237,6 +4424,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :list_locations + ## + # RPC-specific configuration for `fetch_cluster_upgrade_info` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_cluster_upgrade_info + ## + # RPC-specific configuration for `fetch_node_pool_upgrade_info` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_node_pool_upgrade_info # @private def initialize parent_rpcs = nil @@ -4310,6 +4507,10 @@ def initialize parent_rpcs = nil @check_autopilot_compatibility = ::Gapic::Config::Method.new check_autopilot_compatibility_config list_locations_config = parent_rpcs.list_locations if parent_rpcs.respond_to? :list_locations @list_locations = ::Gapic::Config::Method.new list_locations_config + fetch_cluster_upgrade_info_config = parent_rpcs.fetch_cluster_upgrade_info if parent_rpcs.respond_to? :fetch_cluster_upgrade_info + @fetch_cluster_upgrade_info = ::Gapic::Config::Method.new fetch_cluster_upgrade_info_config + fetch_node_pool_upgrade_info_config = parent_rpcs.fetch_node_pool_upgrade_info if parent_rpcs.respond_to? :fetch_node_pool_upgrade_info + @fetch_node_pool_upgrade_info = ::Gapic::Config::Method.new fetch_node_pool_upgrade_info_config yield self if block_given? end diff --git a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/paths.rb b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/paths.rb index afff1b9fbd93..9ea577dde502 100644 --- a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/paths.rb +++ b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/paths.rb @@ -24,6 +24,48 @@ module V1beta1 module ClusterManager # Path helper methods for the ClusterManager API. module Paths + ## + # Create a fully-qualified CaPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # + # @return [::String] + def ca_pool_path project:, location:, ca_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" + end + + ## + # Create a fully-qualified CryptoKeyVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + ## # Create a fully-qualified Topic resource string. # diff --git a/google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb b/google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb index db26492f148d..6b89d1994eaa 100644 --- a/google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb +++ b/google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb @@ -17,7 +17,7 @@ require 'google/type/date_pb' -descriptor_data = "\n.google/container/v1beta1/cluster_service.proto\x12\x18google.container.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x15google/rpc/code.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"\x8f\x04\n\x0fLinuxNodeConfig\x12G\n\x07sysctls\x18\x01 \x03(\x0b\x32\x36.google.container.v1beta1.LinuxNodeConfig.SysctlsEntry\x12I\n\x0b\x63group_mode\x18\x02 \x01(\x0e\x32\x34.google.container.v1beta1.LinuxNodeConfig.CgroupMode\x12V\n\thugepages\x18\x03 \x01(\x0b\x32\x39.google.container.v1beta1.LinuxNodeConfig.HugepagesConfigB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x7f\n\x0fHugepagesConfig\x12!\n\x0fhugepage_size2m\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0fhugepage_size1g\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x12\n\x10_hugepage_size2mB\x12\n\x10_hugepage_size1g\x1a.\n\x0cSysctlsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\nCgroupMode\x12\x1b\n\x17\x43GROUP_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43GROUP_MODE_V1\x10\x01\x12\x12\n\x0e\x43GROUP_MODE_V2\x10\x02\x42\x0c\n\n_hugepages\"\xb9\x01\n\x11WindowsNodeConfig\x12I\n\nos_version\x18\x01 \x01(\x0e\x32\x35.google.container.v1beta1.WindowsNodeConfig.OSVersion\"Y\n\tOSVersion\x12\x1a\n\x16OS_VERSION_UNSPECIFIED\x10\x00\x12\x17\n\x13OS_VERSION_LTSC2019\x10\x01\x12\x17\n\x13OS_VERSION_LTSC2022\x10\x02\"\xf8\x01\n\x11NodeKubeletConfig\x12\x1a\n\x12\x63pu_manager_policy\x18\x01 \x01(\t\x12\x31\n\rcpu_cfs_quota\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x1c\n\x14\x63pu_cfs_quota_period\x18\x03 \x01(\t\x12\x16\n\x0epod_pids_limit\x18\x04 \x01(\x03\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\x07 \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"\x89\x14\n\nNodeConfig\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x05\x12\x14\n\x0coauth_scopes\x18\x03 \x03(\t\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x44\n\x08metadata\x18\x04 \x03(\x0b\x32\x32.google.container.v1beta1.NodeConfig.MetadataEntry\x12\x12\n\nimage_type\x18\x05 \x01(\t\x12@\n\x06labels\x18\x06 \x03(\x0b\x32\x30.google.container.v1beta1.NodeConfig.LabelsEntry\x12\x17\n\x0flocal_ssd_count\x18\x07 \x01(\x05\x12\x0c\n\x04tags\x18\x08 \x03(\t\x12\x13\n\x0bpreemptible\x18\n \x01(\x08\x12\x41\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32+.google.container.v1beta1.AcceleratorConfig\x12?\n\x0esandbox_config\x18\x11 \x01(\x0b\x32\'.google.container.v1beta1.SandboxConfig\x12\x12\n\nnode_group\x18\x12 \x01(\t\x12K\n\x14reservation_affinity\x18\x13 \x01(\x0b\x32-.google.container.v1beta1.ReservationAffinity\x12\x11\n\tdisk_type\x18\x0c \x01(\t\x12\x18\n\x10min_cpu_platform\x18\r \x01(\t\x12R\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadMetadataConfig\x12\x33\n\x06taints\x18\x0f \x03(\x0b\x32#.google.container.v1beta1.NodeTaint\x12\x19\n\x11\x62oot_disk_kms_key\x18\x17 \x01(\t\x12R\n\x18shielded_instance_config\x18\x14 \x01(\x0b\x32\x30.google.container.v1beta1.ShieldedInstanceConfig\x12\x44\n\x11linux_node_config\x18\x15 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12\x43\n\x0ekubelet_config\x18\x16 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12R\n\x18\x65phemeral_storage_config\x18\x18 \x01(\x0b\x32\x30.google.container.v1beta1.EphemeralStorageConfig\x12\x39\n\x0bgcfs_config\x18\x19 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12T\n\x19\x61\x64vanced_machine_features\x18\x1a \x01(\x0b\x32\x31.google.container.v1beta1.AdvancedMachineFeatures\x12\x33\n\x05gvnic\x18\x1d \x01(\x0b\x32$.google.container.v1beta1.VirtualNIC\x12\x0c\n\x04spot\x18 \x01(\x08\x12G\n\x12\x63onfidential_nodes\x18# \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12>\n\x0b\x66\x61st_socket\x18$ \x01(\x0b\x32$.google.container.v1beta1.FastSocketH\x00\x88\x01\x01\x12Q\n\x0fresource_labels\x18% \x03(\x0b\x32\x38.google.container.v1beta1.NodeConfig.ResourceLabelsEntry\x12G\n\x0elogging_config\x18& \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12H\n\x13windows_node_config\x18\' \x01(\x0b\x32+.google.container.v1beta1.WindowsNodeConfig\x12V\n\x1blocal_nvme_ssd_block_config\x18( \x01(\x0b\x32\x31.google.container.v1beta1.LocalNvmeSsdBlockConfig\x12\x64\n\"ephemeral_storage_local_ssd_config\x18) \x01(\x0b\x32\x38.google.container.v1beta1.EphemeralStorageLocalSsdConfig\x12\x46\n\x12sole_tenant_config\x18* \x01(\x0b\x32*.google.container.v1beta1.SoleTenantConfig\x12\x45\n\x11\x63ontainerd_config\x18+ \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12P\n\x17host_maintenance_policy\x18, \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12L\n\x15resource_manager_tags\x18- \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12(\n\x1b\x65nable_confidential_storage\x18. \x01(\x08\x42\x03\xe0\x41\x01\x12I\n\x14secondary_boot_disks\x18\x30 \x03(\x0b\x32+.google.container.v1beta1.SecondaryBootDisk\x12k\n#secondary_boot_disk_update_strategy\x18\x32 \x01(\x0b\x32\x39.google.container.v1beta1.SecondaryBootDiskUpdateStrategyH\x01\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_fast_socketB&\n$_secondary_boot_disk_update_strategy\"\x99\x01\n\x17\x41\x64vancedMachineFeatures\x12\x1d\n\x10threads_per_core\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x13\n\x11_threads_per_coreB\x1f\n\x1d_enable_nested_virtualization\"\xed\x07\n\x11NodeNetworkConfig\x12\x1d\n\x10\x63reate_pod_range\x18\x04 \x01(\x08\x42\x03\xe0\x41\x04\x12\x11\n\tpod_range\x18\x05 \x01(\t\x12\x1b\n\x13pod_ipv4_cidr_block\x18\x06 \x01(\t\x12!\n\x14\x65nable_private_nodes\x18\t \x01(\x08H\x00\x88\x01\x01\x12m\n\x1anetwork_performance_config\x18\x0b \x01(\x0b\x32\x44.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfigH\x01\x88\x01\x01\x12[\n\x1dpod_cidr_overprovision_config\x18\r \x01(\x0b\x32\x34.google.container.v1beta1.PodCIDROverprovisionConfig\x12^\n\x1f\x61\x64\x64itional_node_network_configs\x18\x0e \x03(\x0b\x32\x35.google.container.v1beta1.AdditionalNodeNetworkConfig\x12\\\n\x1e\x61\x64\x64itional_pod_network_configs\x18\x0f \x03(\x0b\x32\x34.google.container.v1beta1.AdditionalPodNetworkConfig\x12\'\n\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01\x42\x03\xe0\x41\x03\x1a\xfa\x02\n\x18NetworkPerformanceConfig\x12s\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32I.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00\x88\x01\x01\x12y\n!external_ip_egress_bandwidth_tier\x18\x02 \x01(\x0e\x32I.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x01\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB$\n\"_external_ip_egress_bandwidth_tierB\x17\n\x15_enable_private_nodesB\x1d\n\x1b_network_performance_config\"B\n\x1b\x41\x64\x64itionalNodeNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\"\xb0\x01\n\x1a\x41\x64\x64itionalPodNetworkConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1b\n\x13secondary_pod_range\x18\x02 \x01(\t\x12K\n\x11max_pods_per_node\x18\x03 \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraintH\x00\x88\x01\x01\x42\x14\n\x12_max_pods_per_node\"Y\n\x16ShieldedInstanceConfig\x12\x1a\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x12#\n\x1b\x65nable_integrity_monitoring\x18\x02 \x01(\x08\"\x8a\x01\n\rSandboxConfig\x12\x18\n\x0csandbox_type\x18\x01 \x01(\tB\x02\x18\x01\x12:\n\x04type\x18\x02 \x01(\x0e\x32,.google.container.v1beta1.SandboxConfig.Type\"#\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06GVISOR\x10\x01\"1\n\x16\x45phemeralStorageConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"2\n\x17LocalNvmeSsdBlockConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"9\n\x1e\x45phemeralStorageLocalSsdConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"\x1d\n\nGcfsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe4\x01\n\x13ReservationAffinity\x12T\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32\x32.google.container.v1beta1.ReservationAffinity.Type\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"Z\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\"\xa0\x02\n\x10SoleTenantConfig\x12P\n\x0fnode_affinities\x18\x01 \x03(\x0b\x32\x37.google.container.v1beta1.SoleTenantConfig.NodeAffinity\x1a\xb9\x01\n\x0cNodeAffinity\x12\x0b\n\x03key\x18\x01 \x01(\t\x12R\n\x08operator\x18\x02 \x01(\x0e\x32@.google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator\x12\x0e\n\x06values\x18\x03 \x03(\t\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\"\x8b\x05\n\x10\x43ontainerdConfig\x12n\n\x1eprivate_registry_access_config\x18\x01 \x01(\x0b\x32\x46.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig\x1a\x86\x04\n\x1bPrivateRegistryAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x94\x01\n#certificate_authority_domain_config\x18\x02 \x03(\x0b\x32g.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig\x1a\xbe\x02\n CertificateAuthorityDomainConfig\x12\r\n\x05\x66qdns\x18\x01 \x03(\t\x12\xbb\x01\n%gcp_secret_manager_certificate_config\x18\x02 \x01(\x0b\x32\x89\x01.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00\x1a\x37\n!GCPSecretManagerCertificateConfig\x12\x12\n\nsecret_uri\x18\x01 \x01(\tB\x14\n\x12\x63\x65rtificate_config\"\xad\x05\n\x15HostMaintenancePolicy\x12\x66\n\x14maintenance_interval\x18\x01 \x01(\x0e\x32\x43.google.container.v1beta1.HostMaintenancePolicy.MaintenanceIntervalH\x01\x88\x01\x01\x12~\n\"opportunistic_maintenance_strategy\x18\x02 \x01(\x0b\x32P.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategyH\x00\x1a\xa0\x02\n OpportunisticMaintenanceStrategy\x12=\n\x15node_idle_time_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12G\n\x1fmaintenance_availability_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x12\x1f\n\x12min_nodes_per_pool\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x18\n\x16_node_idle_time_windowB\"\n _maintenance_availability_windowB\x15\n\x13_min_nodes_per_pool\"X\n\x13MaintenanceInterval\x12$\n MAINTENANCE_INTERVAL_UNSPECIFIED\x10\x00\x12\r\n\tAS_NEEDED\x10\x01\x12\x0c\n\x08PERIODIC\x10\x02\x42\x16\n\x14maintenance_strategyB\x17\n\x15_maintenance_interval\"\xbe\x01\n\tNodeTaint\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12:\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32*.google.container.v1beta1.NodeTaint.Effect\"Y\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNO_SCHEDULE\x10\x01\x12\x16\n\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n\nNO_EXECUTE\x10\x03\"A\n\nNodeTaints\x12\x33\n\x06taints\x18\x01 \x03(\x0b\x32#.google.container.v1beta1.NodeTaint\"}\n\nNodeLabels\x12@\n\x06labels\x18\x01 \x03(\x0b\x32\x30.google.container.v1beta1.NodeLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x0eResourceLabels\x12\x44\n\x06labels\x18\x01 \x03(\x0b\x32\x34.google.container.v1beta1.ResourceLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x0bNetworkTags\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\xed\x01\n\nMasterAuth\x12\x14\n\x08username\x18\x01 \x01(\tB\x02\x18\x01\x12\x14\n\x08password\x18\x02 \x01(\tB\x02\x18\x01\x12T\n\x19\x63lient_certificate_config\x18\x03 \x01(\x0b\x32\x31.google.container.v1beta1.ClientCertificateConfig\x12#\n\x16\x63luster_ca_certificate\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63lient_certificate\x18\x65 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nclient_key\x18\x66 \x01(\tB\x03\xe0\x41\x03\";\n\x17\x43lientCertificateConfig\x12 \n\x18issue_client_certificate\x18\x01 \x01(\x08\"\xb7\t\n\x0c\x41\x64\x64onsConfig\x12H\n\x13http_load_balancing\x18\x01 \x01(\x0b\x32+.google.container.v1beta1.HttpLoadBalancing\x12V\n\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\x0b\x32\x32.google.container.v1beta1.HorizontalPodAutoscaling\x12O\n\x14kubernetes_dashboard\x18\x03 \x01(\x0b\x32-.google.container.v1beta1.KubernetesDashboardB\x02\x18\x01\x12L\n\x15network_policy_config\x18\x04 \x01(\x0b\x32-.google.container.v1beta1.NetworkPolicyConfig\x12?\n\x0cistio_config\x18\x05 \x01(\x0b\x32%.google.container.v1beta1.IstioConfigB\x02\x18\x01\x12\x42\n\x10\x63loud_run_config\x18\x07 \x01(\x0b\x32(.google.container.v1beta1.CloudRunConfig\x12\x42\n\x10\x64ns_cache_config\x18\x08 \x01(\x0b\x32(.google.container.v1beta1.DnsCacheConfig\x12P\n\x17\x63onfig_connector_config\x18\n \x01(\x0b\x32/.google.container.v1beta1.ConfigConnectorConfig\x12i\n%gce_persistent_disk_csi_driver_config\x18\x0b \x01(\x0b\x32:.google.container.v1beta1.GcePersistentDiskCsiDriverConfig\x12=\n\x0bkalm_config\x18\x0c \x01(\x0b\x32$.google.container.v1beta1.KalmConfigB\x02\x18\x01\x12^\n\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\x0b\x32\x35.google.container.v1beta1.GcpFilestoreCsiDriverConfig\x12O\n\x17gke_backup_agent_config\x18\x10 \x01(\x0b\x32..google.container.v1beta1.GkeBackupAgentConfig\x12T\n\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\x0b\x32\x30.google.container.v1beta1.GcsFuseCsiDriverConfig\x12K\n\x12stateful_ha_config\x18\x12 \x01(\x0b\x32*.google.container.v1beta1.StatefulHAConfigB\x03\xe0\x41\x01\x12M\n\x13ray_operator_config\x18\x15 \x01(\x0b\x32+.google.container.v1beta1.RayOperatorConfigB\x03\xe0\x41\x01\"%\n\x11HttpLoadBalancing\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x18HorizontalPodAutoscaling\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13KubernetesDashboard\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13NetworkPolicyConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"!\n\x0e\x44nsCacheConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"!\n\nKalmConfig\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\"\'\n\x14GkeBackupAgentConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"#\n\x10StatefulHAConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x15\x43onfigConnectorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"3\n GcePersistentDiskCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\".\n\x1bGcpFilestoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16GcsFuseCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe2\x01\n\x11RayOperatorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12Z\n\x1aray_cluster_logging_config\x18\x02 \x01(\x0b\x32\x31.google.container.v1beta1.RayClusterLoggingConfigB\x03\xe0\x41\x01\x12`\n\x1dray_cluster_monitoring_config\x18\x03 \x01(\x0b\x32\x34.google.container.v1beta1.RayClusterMonitoringConfigB\x03\xe0\x41\x01\"9\n&PrivateClusterMasterGlobalAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd9\x02\n\x14PrivateClusterConfig\x12\x1c\n\x14\x65nable_private_nodes\x18\x01 \x01(\x08\x12\x1f\n\x17\x65nable_private_endpoint\x18\x02 \x01(\x08\x12\x1e\n\x16master_ipv4_cidr_block\x18\x03 \x01(\t\x12\x1d\n\x10private_endpoint\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpeering_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x65\n\x1bmaster_global_access_config\x18\x08 \x01(\x0b\x32@.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig\x12#\n\x1bprivate_endpoint_subnetwork\x18\n \x01(\t\"\x9f\x01\n\x0bIstioConfig\x12\x14\n\x08\x64isabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12\x45\n\x04\x61uth\x18\x02 \x01(\x0e\x32\x33.google.container.v1beta1.IstioConfig.IstioAuthModeB\x02\x18\x01\"3\n\rIstioAuthMode\x12\r\n\tAUTH_NONE\x10\x00\x12\x13\n\x0f\x41UTH_MUTUAL_TLS\x10\x01\"\xf3\x01\n\x0e\x43loudRunConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12U\n\x12load_balancer_type\x18\x03 \x01(\x0e\x32\x39.google.container.v1beta1.CloudRunConfig.LoadBalancerType\"x\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"\x93\x02\n\x1eMasterAuthorizedNetworksConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12W\n\x0b\x63idr_blocks\x18\x02 \x03(\x0b\x32\x42.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock\x12,\n\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\x08H\x00\x88\x01\x01\x1a\x35\n\tCidrBlock\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x12\n\ncidr_block\x18\x02 \x01(\tB\"\n _gcp_public_cidrs_access_enabled\"\x1d\n\nLegacyAbac\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x96\x01\n\rNetworkPolicy\x12\x42\n\x08provider\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.NetworkPolicy.Provider\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"0\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41LICO\x10\x01\"-\n\x1aPodCIDROverprovisionConfig\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\"\xa6\x08\n\x12IPAllocationPolicy\x12\x16\n\x0euse_ip_aliases\x18\x01 \x01(\x08\x12\x19\n\x11\x63reate_subnetwork\x18\x02 \x01(\x08\x12\x17\n\x0fsubnetwork_name\x18\x03 \x01(\t\x12\x1d\n\x11\x63luster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01\x12\x1a\n\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01\x12\x1e\n\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01\x12$\n\x1c\x63luster_secondary_range_name\x18\x07 \x01(\t\x12%\n\x1dservices_secondary_range_name\x18\x08 \x01(\t\x12\x1f\n\x17\x63luster_ipv4_cidr_block\x18\t \x01(\t\x12\x1c\n\x14node_ipv4_cidr_block\x18\n \x01(\t\x12 \n\x18services_ipv4_cidr_block\x18\x0b \x01(\t\x12\x1b\n\x13\x61llow_route_overlap\x18\x0c \x01(\x08\x12\x1b\n\x13tpu_ipv4_cidr_block\x18\r \x01(\t\x12\x12\n\nuse_routes\x18\x0f \x01(\x08\x12J\n\nstack_type\x18\x10 \x01(\x0e\x32\x36.google.container.v1beta1.IPAllocationPolicy.StackType\x12U\n\x10ipv6_access_type\x18\x11 \x01(\x0e\x32;.google.container.v1beta1.IPAllocationPolicy.IPv6AccessType\x12[\n\x1dpod_cidr_overprovision_config\x18\x15 \x01(\x0b\x32\x34.google.container.v1beta1.PodCIDROverprovisionConfig\x12#\n\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12^\n\x1c\x61\x64\x64itional_pod_ranges_config\x18\x18 \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfigB\x03\xe0\x41\x03\x12/\n\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01\x42\x03\xe0\x41\x03\"@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIPv6AccessType\x12 \n\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\"\xc0\x03\n\x13\x42inaryAuthorization\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12U\n\x0f\x65valuation_mode\x18\x02 \x01(\x0e\x32<.google.container.v1beta1.BinaryAuthorization.EvaluationMode\x12Y\n\x0fpolicy_bindings\x18\x05 \x03(\x0b\x32;.google.container.v1beta1.BinaryAuthorization.PolicyBindingB\x03\xe0\x41\x01\x1a+\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xb4\x01\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12$\n PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\x12\x13\n\x0fPOLICY_BINDINGS\x10\x05\x12\x38\n4POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE\x10\x06\"*\n\x17PodSecurityPolicyConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"D\n\x19\x41uthenticatorGroupsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0esecurity_group\x18\x02 \x01(\t\"\x96\x01\n\x10\x43lusterTelemetry\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.container.v1beta1.ClusterTelemetry.Type\"C\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0f\n\x0bSYSTEM_ONLY\x10\x03\"\xe9#\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x12initial_node_count\x18\x03 \x01(\x05\x42\x02\x18\x01\x12=\n\x0bnode_config\x18\x04 \x01(\x0b\x32$.google.container.v1beta1.NodeConfigB\x02\x18\x01\x12\x39\n\x0bmaster_auth\x18\x05 \x01(\x0b\x32$.google.container.v1beta1.MasterAuth\x12\x17\n\x0flogging_service\x18\x06 \x01(\t\x12\x1a\n\x12monitoring_service\x18\x07 \x01(\t\x12\x0f\n\x07network\x18\x08 \x01(\t\x12\x19\n\x11\x63luster_ipv4_cidr\x18\t \x01(\t\x12=\n\raddons_config\x18\n \x01(\x0b\x32&.google.container.v1beta1.AddonsConfig\x12\x12\n\nsubnetwork\x18\x0b \x01(\t\x12\x36\n\nnode_pools\x18\x0c \x03(\x0b\x32\".google.container.v1beta1.NodePool\x12\x11\n\tlocations\x18\r \x03(\t\x12\x1f\n\x17\x65nable_kubernetes_alpha\x18\x0e \x01(\x08\x12I\n\x14\x65nable_k8s_beta_apis\x18\x8f\x01 \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12N\n\x0fresource_labels\x18\x0f \x03(\x0b\x32\x35.google.container.v1beta1.Cluster.ResourceLabelsEntry\x12\x19\n\x11label_fingerprint\x18\x10 \x01(\t\x12\x39\n\x0blegacy_abac\x18\x12 \x01(\x0b\x32$.google.container.v1beta1.LegacyAbac\x12?\n\x0enetwork_policy\x18\x13 \x01(\x0b\x32\'.google.container.v1beta1.NetworkPolicy\x12J\n\x14ip_allocation_policy\x18\x14 \x01(\x0b\x32,.google.container.v1beta1.IPAllocationPolicy\x12\x63\n!master_authorized_networks_config\x18\x16 \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfig\x12G\n\x12maintenance_policy\x18\x17 \x01(\x0b\x32+.google.container.v1beta1.MaintenancePolicy\x12K\n\x14\x62inary_authorization\x18\x18 \x01(\x0b\x32-.google.container.v1beta1.BinaryAuthorization\x12U\n\x1apod_security_policy_config\x18\x19 \x01(\x0b\x32\x31.google.container.v1beta1.PodSecurityPolicyConfig\x12\x41\n\x0b\x61utoscaling\x18\x1a \x01(\x0b\x32,.google.container.v1beta1.ClusterAutoscaling\x12?\n\x0enetwork_config\x18\x1b \x01(\x0b\x32\'.google.container.v1beta1.NetworkConfig\x12\x1b\n\x0fprivate_cluster\x18\x1c \x01(\x08\x42\x02\x18\x01\x12\"\n\x16master_ipv4_cidr_block\x18\x1d \x01(\tB\x02\x18\x01\x12P\n\x1b\x64\x65\x66\x61ult_max_pods_constraint\x18\x1e \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraint\x12Y\n\x1cresource_usage_export_config\x18! \x01(\x0b\x32\x33.google.container.v1beta1.ResourceUsageExportConfig\x12X\n\x1b\x61uthenticator_groups_config\x18\" \x01(\x0b\x32\x33.google.container.v1beta1.AuthenticatorGroupsConfig\x12N\n\x16private_cluster_config\x18% \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfig\x12R\n\x18vertical_pod_autoscaling\x18\' \x01(\x0b\x32\x30.google.container.v1beta1.VerticalPodAutoscaling\x12?\n\x0eshielded_nodes\x18( \x01(\x0b\x32\'.google.container.v1beta1.ShieldedNodes\x12\x41\n\x0frelease_channel\x18) \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12R\n\x18workload_identity_config\x18+ \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadIdentityConfig\x12M\n\x15workload_certificates\x18\x34 \x01(\x0b\x32..google.container.v1beta1.WorkloadCertificates\x12\x45\n\x11mesh_certificates\x18\x43 \x01(\x0b\x32*.google.container.v1beta1.MeshCertificates\x12J\n\x14workload_alts_config\x18\x35 \x01(\x0b\x32,.google.container.v1beta1.WorkloadALTSConfig\x12N\n\x16\x63ost_management_config\x18- \x01(\x0b\x32..google.container.v1beta1.CostManagementConfig\x12\x45\n\x11\x63luster_telemetry\x18. \x01(\x0b\x32*.google.container.v1beta1.ClusterTelemetry\x12\x37\n\ntpu_config\x18/ \x01(\x0b\x32#.google.container.v1beta1.TpuConfig\x12I\n\x13notification_config\x18\x31 \x01(\x0b\x32,.google.container.v1beta1.NotificationConfig\x12G\n\x12\x63onfidential_nodes\x18\x32 \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12P\n\x17identity_service_config\x18\x36 \x01(\x0b\x32/.google.container.v1beta1.IdentityServiceConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x65 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x15\n\x08\x65ndpoint\x18\x66 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17initial_cluster_version\x18g \x01(\t\x12#\n\x16\x63urrent_master_version\x18h \x01(\tB\x03\xe0\x41\x03\x12#\n\x14\x63urrent_node_version\x18i \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x63reate_time\x18j \x01(\tB\x03\xe0\x41\x03\x12=\n\x06status\x18k \x01(\x0e\x32(.google.container.v1beta1.Cluster.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18l \x01(\tB\x05\x18\x01\xe0\x41\x03\x12 \n\x13node_ipv4_cidr_size\x18m \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0\x41\x03\x12\"\n\x13instance_group_urls\x18o \x03(\tB\x05\x18\x01\xe0\x41\x03\x12!\n\x12\x63urrent_node_count\x18p \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x65xpire_time\x18q \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18r \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nenable_tpu\x18s \x01(\x08\x12 \n\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x03\xe0\x41\x03\x12I\n\x13\x64\x61tabase_encryption\x18& \x01(\x0b\x32,.google.container.v1beta1.DatabaseEncryption\x12=\n\nconditions\x18v \x03(\x0b\x32).google.container.v1beta1.StatusCondition\x12\x30\n\x06master\x18| \x01(\x0b\x32 .google.container.v1beta1.Master\x12\x37\n\tautopilot\x18\x80\x01 \x01(\x0b\x32#.google.container.v1beta1.Autopilot\x12\x10\n\x02id\x18\x81\x01 \x01(\tB\x03\xe0\x41\x03\x12L\n\x12node_pool_defaults\x18\x83\x01 \x01(\x0b\x32*.google.container.v1beta1.NodePoolDefaultsH\x00\x88\x01\x01\x12@\n\x0elogging_config\x18\x84\x01 \x01(\x0b\x32\'.google.container.v1beta1.LoggingConfig\x12\x46\n\x11monitoring_config\x18\x85\x01 \x01(\x0b\x32*.google.container.v1beta1.MonitoringConfig\x12L\n\x15node_pool_auto_config\x18\x88\x01 \x01(\x0b\x32,.google.container.v1beta1.NodePoolAutoConfig\x12I\n\x0eprotect_config\x18\x89\x01 \x01(\x0b\x32\'.google.container.v1beta1.ProtectConfigB\x02\x18\x01H\x01\x88\x01\x01\x12\r\n\x04\x65tag\x18\x8b\x01 \x01(\t\x12/\n\x05\x66leet\x18\x8c\x01 \x01(\x0b\x32\x1f.google.container.v1beta1.Fleet\x12Q\n\x17security_posture_config\x18\x91\x01 \x01(\x0b\x32/.google.container.v1beta1.SecurityPostureConfig\x12\x46\n\x11\x65nterprise_config\x18\x95\x01 \x01(\x0b\x32*.google.container.v1beta1.EnterpriseConfig\x12M\n\x15secret_manager_config\x18\x96\x01 \x01(\x0b\x32-.google.container.v1beta1.SecretManagerConfig\x12U\n\x19\x63ompliance_posture_config\x18\x97\x01 \x01(\x0b\x32\x31.google.container.v1beta1.CompliancePostureConfig\x12 \n\rsatisfies_pzs\x18\x98\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12 \n\rsatisfies_pzi\x18\x99\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"w\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0f\n\x0bRECONCILING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x44\x45GRADED\x10\x06\x42\x15\n\x13_node_pool_defaultsB\x11\n\x0f_protect_configB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xc4\x02\n\x17\x43ompliancePostureConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.CompliancePostureConfig.ModeH\x00\x88\x01\x01\x12\x62\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32\x44.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard\x1a\x38\n\x12\x43omplianceStandard\x12\x15\n\x08standard\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_standard\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\x07\n\x05_mode\"(\n\x10K8sBetaAPIConfig\x12\x14\n\x0c\x65nabled_apis\x18\x01 \x03(\t\"\xc4\x01\n\x0eWorkloadConfig\x12\x46\n\naudit_mode\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.WorkloadConfig.ModeH\x00\x88\x01\x01\"[\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x04\x12\x10\n\x08\x42\x41SELINE\x10\x02\x1a\x02\x08\x01\x12\x12\n\nRESTRICTED\x10\x03\x1a\x02\x08\x01\x42\r\n\x0b_audit_mode\"\xdb\x02\n\rProtectConfig\x12\x46\n\x0fworkload_config\x18\x01 \x01(\x0b\x32(.google.container.v1beta1.WorkloadConfigH\x00\x88\x01\x01\x12k\n\x1bworkload_vulnerability_mode\x18\x02 \x01(\x0e\x32\x41.google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityModeH\x01\x88\x01\x01\"a\n\x19WorkloadVulnerabilityMode\x12+\n\'WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x42\x12\n\x10_workload_configB\x1e\n\x1c_workload_vulnerability_mode\"\xb8\x03\n\x15SecurityPostureConfig\x12G\n\x04mode\x18\x01 \x01(\x0e\x32\x34.google.container.v1beta1.SecurityPostureConfig.ModeH\x00\x88\x01\x01\x12\x62\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32\x41.google.container.v1beta1.SecurityPostureConfig.VulnerabilityModeH\x01\x88\x01\x01\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\x42\x07\n\x05_modeB\x15\n\x13_vulnerability_mode\"^\n\x10NodePoolDefaults\x12J\n\x14node_config_defaults\x18\x01 \x01(\x0b\x32,.google.container.v1beta1.NodeConfigDefaults\"\xfb\x02\n\x12NodeConfigDefaults\x12\x39\n\x0bgcfs_config\x18\x01 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12G\n\x0elogging_config\x18\x03 \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x45\n\x11\x63ontainerd_config\x18\x04 \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12P\n\x17host_maintenance_policy\x18\x05 \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12H\n\x13node_kubelet_config\x18\x06 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\"\xe9\x01\n\x12NodePoolAutoConfig\x12;\n\x0cnetwork_tags\x18\x01 \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12L\n\x15resource_manager_tags\x18\x02 \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12H\n\x13node_kubelet_config\x18\x03 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\"\xda)\n\rClusterUpdate\x12\x1c\n\x14\x64\x65sired_node_version\x18\x04 \x01(\t\x12\"\n\x1a\x64\x65sired_monitoring_service\x18\x05 \x01(\t\x12\x45\n\x15\x64\x65sired_addons_config\x18\x06 \x01(\x0b\x32&.google.container.v1beta1.AddonsConfig\x12\x1c\n\x14\x64\x65sired_node_pool_id\x18\x07 \x01(\t\x12\x1a\n\x12\x64\x65sired_image_type\x18\x08 \x01(\t\x12T\n\x1d\x64\x65sired_node_pool_autoscaling\x18\t \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscaling\x12\x19\n\x11\x64\x65sired_locations\x18\n \x03(\t\x12k\n)desired_master_authorized_networks_config\x18\x0c \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfig\x12]\n\"desired_pod_security_policy_config\x18\x0e \x01(\x0b\x32\x31.google.container.v1beta1.PodSecurityPolicyConfig\x12Q\n\x1b\x64\x65sired_cluster_autoscaling\x18\x0f \x01(\x0b\x32,.google.container.v1beta1.ClusterAutoscaling\x12S\n\x1c\x64\x65sired_binary_authorization\x18\x10 \x01(\x0b\x32-.google.container.v1beta1.BinaryAuthorization\x12\x1f\n\x17\x64\x65sired_logging_service\x18\x13 \x01(\t\x12\x61\n$desired_resource_usage_export_config\x18\x15 \x01(\x0b\x32\x33.google.container.v1beta1.ResourceUsageExportConfig\x12Z\n desired_vertical_pod_autoscaling\x18\x16 \x01(\x0b\x32\x30.google.container.v1beta1.VerticalPodAutoscaling\x12V\n\x1e\x64\x65sired_private_cluster_config\x18\x19 \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfig\x12\x61\n$desired_intra_node_visibility_config\x18\x1a \x01(\x0b\x32\x33.google.container.v1beta1.IntraNodeVisibilityConfig\x12P\n\x1b\x64\x65sired_default_snat_status\x18\x1c \x01(\x0b\x32+.google.container.v1beta1.DefaultSnatStatus\x12M\n\x19\x64\x65sired_cluster_telemetry\x18\x1e \x01(\x0b\x32*.google.container.v1beta1.ClusterTelemetry\x12I\n\x17\x64\x65sired_release_channel\x18\x1f \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12R\n\x16private_cluster_config\x18% \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfigB\x02\x18\x01\x12?\n\x12\x64\x65sired_tpu_config\x18& \x01(\x0b\x32#.google.container.v1beta1.TpuConfig\x12V\n\x1f\x64\x65sired_l4ilb_subsetting_config\x18\' \x01(\x0b\x32-.google.container.v1beta1.ILBSubsettingConfig\x12M\n\x19\x64\x65sired_datapath_provider\x18\x32 \x01(\x0e\x32*.google.container.v1beta1.DatapathProvider\x12]\n\"desired_private_ipv6_google_access\x18\x33 \x01(\x0e\x32\x31.google.container.v1beta1.PrivateIPv6GoogleAccess\x12Q\n\x1b\x64\x65sired_notification_config\x18\x37 \x01(\x0b\x32,.google.container.v1beta1.NotificationConfig\x12\x1e\n\x16\x64\x65sired_master_version\x18\x64 \x01(\t\x12\x41\n\x13\x64\x65sired_gcfs_config\x18m \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12Q\n\x1b\x64\x65sired_database_encryption\x18. \x01(\x0b\x32,.google.container.v1beta1.DatabaseEncryption\x12Z\n desired_workload_identity_config\x18/ \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadIdentityConfig\x12U\n\x1d\x64\x65sired_workload_certificates\x18= \x01(\x0b\x32..google.container.v1beta1.WorkloadCertificates\x12M\n\x19\x64\x65sired_mesh_certificates\x18\x43 \x01(\x0b\x32*.google.container.v1beta1.MeshCertificates\x12R\n\x1c\x64\x65sired_workload_alts_config\x18> \x01(\x0b\x32,.google.container.v1beta1.WorkloadALTSConfig\x12G\n\x16\x64\x65sired_shielded_nodes\x18\x30 \x01(\x0b\x32\'.google.container.v1beta1.ShieldedNodes\x12V\n\x1e\x64\x65sired_cost_management_config\x18\x31 \x01(\x0b\x32..google.container.v1beta1.CostManagementConfig\x12\x38\n\x0e\x64\x65sired_master\x18\x34 \x01(\x0b\x32 .google.container.v1beta1.Master\x12?\n\x12\x64\x65sired_dns_config\x18\x35 \x01(\x0b\x32#.google.container.v1beta1.DNSConfig\x12_\n#desired_service_external_ips_config\x18< \x01(\x0b\x32\x32.google.container.v1beta1.ServiceExternalIPsConfig\x12`\n#desired_authenticator_groups_config\x18? \x01(\x0b\x32\x33.google.container.v1beta1.AuthenticatorGroupsConfig\x12G\n\x16\x64\x65sired_logging_config\x18@ \x01(\x0b\x32\'.google.container.v1beta1.LoggingConfig\x12M\n\x19\x64\x65sired_monitoring_config\x18\x41 \x01(\x0b\x32*.google.container.v1beta1.MonitoringConfig\x12X\n\x1f\x64\x65sired_identity_service_config\x18\x42 \x01(\x0b\x32/.google.container.v1beta1.IdentityServiceConfig\x12,\n\x1f\x64\x65sired_enable_private_endpoint\x18G \x01(\x08H\x00\x88\x01\x01\x12Y\n*desired_node_pool_auto_config_network_tags\x18n \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12P\n\x16\x64\x65sired_protect_config\x18p \x01(\x0b\x32\'.google.container.v1beta1.ProtectConfigB\x02\x18\x01H\x01\x88\x01\x01\x12N\n\x1a\x64\x65sired_gateway_api_config\x18r \x01(\x0b\x32*.google.container.v1beta1.GatewayAPIConfig\x12\x0c\n\x04\x65tag\x18s \x01(\t\x12Y\n desired_node_pool_logging_config\x18t \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x36\n\rdesired_fleet\x18u \x01(\x0b\x32\x1f.google.container.v1beta1.Fleet\x12?\n\x12\x64\x65sired_stack_type\x18w \x01(\x0e\x32#.google.container.v1beta1.StackType\x12Y\n\x1c\x61\x64\x64itional_pod_ranges_config\x18x \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfig\x12\x61\n$removed_additional_pod_ranges_config\x18y \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfig\x12H\n\x14\x65nable_k8s_beta_apis\x18z \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12X\n\x1f\x64\x65sired_security_posture_config\x18| \x01(\x0b\x32/.google.container.v1beta1.SecurityPostureConfig\x12s\n\"desired_network_performance_config\x18} \x01(\x0b\x32G.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig\x12/\n\"desired_enable_fqdn_network_policy\x18~ \x01(\x08H\x02\x88\x01\x01\x12\x61\n(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\x0b\x32..google.container.v1beta1.WorkloadPolicyConfig\x12J\n\x15\x64\x65sired_k8s_beta_apis\x18\x83\x01 \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12Y\n\x1f\x64\x65sired_host_maintenance_policy\x18\x84\x01 \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12N\n\x19\x64\x65sired_containerd_config\x18\x86\x01 \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12-\n\x1f\x64\x65sired_enable_multi_networking\x18\x87\x01 \x01(\x08H\x03\x88\x01\x01\x12k\n3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12g\n$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e\x32\x33.google.container.v1beta1.InTransitEncryptionConfigH\x04\x88\x01\x01\x12>\n0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\x08H\x05\x88\x01\x01\x12Z\n\x1d\x64\x65sired_secret_manager_config\x18\x8b\x01 \x01(\x0b\x32-.google.container.v1beta1.SecretManagerConfigH\x06\x88\x01\x01\x12Q\n\x1b\x64\x65sired_node_kubelet_config\x18\x8d\x01 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12\x62\n,desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfigB\"\n _desired_enable_private_endpointB\x19\n\x17_desired_protect_configB%\n#_desired_enable_fqdn_network_policyB\"\n _desired_enable_multi_networkingB\'\n%_desired_in_transit_encryption_configB3\n1_desired_enable_cilium_clusterwide_network_policyB \n\x1e_desired_secret_manager_config\"v\n\x19\x41\x64\x64itionalPodRangesConfig\x12\x17\n\x0fpod_range_names\x18\x01 \x03(\t\x12@\n\x0epod_range_info\x18\x02 \x03(\x0b\x32#.google.container.v1beta1.RangeInfoB\x03\xe0\x41\x03\">\n\tRangeInfo\x12\x17\n\nrange_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0butilization\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"\xfd\x08\n\tOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x45\n\x0eoperation_type\x18\x03 \x01(\x0e\x32(.google.container.v1beta1.Operation.TypeB\x03\xe0\x41\x03\x12?\n\x06status\x18\x04 \x01(\x0e\x32*.google.container.v1beta1.Operation.StatusB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x16\n\tself_link\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0btarget_link\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nstart_time\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_time\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x08progress\x18\x0c \x01(\x0b\x32+.google.container.v1beta1.OperationProgressB\x03\xe0\x41\x03\x12I\n\x12\x63luster_conditions\x18\r \x03(\x0b\x32).google.container.v1beta1.StatusConditionB\x02\x18\x01\x12J\n\x13nodepool_conditions\x18\x0e \x03(\x0b\x32).google.container.v1beta1.StatusConditionB\x02\x18\x01\x12!\n\x05\x65rror\x18\x0f \x01(\x0b\x32\x12.google.rpc.Status\"R\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x41\x42ORTING\x10\x04\"\xc0\x03\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43REATE_CLUSTER\x10\x01\x12\x12\n\x0e\x44\x45LETE_CLUSTER\x10\x02\x12\x12\n\x0eUPGRADE_MASTER\x10\x03\x12\x11\n\rUPGRADE_NODES\x10\x04\x12\x12\n\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n\x10\x43REATE_NODE_POOL\x10\x07\x12\x14\n\x10\x44\x45LETE_NODE_POOL\x10\x08\x12\x1c\n\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n\x11\x41UTO_REPAIR_NODES\x10\n\x12\x1a\n\x12\x41UTO_UPGRADE_NODES\x10\x0b\x1a\x02\x08\x01\x12\x12\n\nSET_LABELS\x10\x0c\x1a\x02\x08\x01\x12\x17\n\x0fSET_MASTER_AUTH\x10\r\x1a\x02\x08\x01\x12\x16\n\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\x08\x01\x12\x1e\n\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\x08\x01\x12\x12\n\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n\x15\x46LEET_FEATURE_UPGRADE\x10\x13\"\xca\x02\n\x11OperationProgress\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x06status\x18\x02 \x01(\x0e\x32*.google.container.v1beta1.Operation.Status\x12\x43\n\x07metrics\x18\x03 \x03(\x0b\x32\x32.google.container.v1beta1.OperationProgress.Metric\x12;\n\x06stages\x18\x04 \x03(\x0b\x32+.google.container.v1beta1.OperationProgress\x1ai\n\x06Metric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\tint_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\x42\x07\n\x05value\"\x8f\x01\n\x14\x43reateClusterRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x37\n\x07\x63luster\x18\x03 \x01(\x0b\x32!.google.container.v1beta1.ClusterB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"l\n\x11GetClusterRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xad\x01\n\x14UpdateClusterRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12<\n\x06update\x18\x04 \x01(\x0b\x32\'.google.container.v1beta1.ClusterUpdateB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xbe\x0c\n\x15UpdateNodePoolRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0cnode_pool_id\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\x0cnode_version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nimage_type\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tlocations\x18\r \x03(\t\x12R\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadMetadataConfig\x12\x0c\n\x04name\x18\x08 \x01(\t\x12L\n\x10upgrade_settings\x18\x0f \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12\x33\n\x04tags\x18\x10 \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12\x34\n\x06taints\x18\x11 \x01(\x0b\x32$.google.container.v1beta1.NodeTaints\x12\x34\n\x06labels\x18\x12 \x01(\x0b\x32$.google.container.v1beta1.NodeLabels\x12\x44\n\x11linux_node_config\x18\x13 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12\x43\n\x0ekubelet_config\x18\x14 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12H\n\x13node_network_config\x18\x15 \x01(\x0b\x32+.google.container.v1beta1.NodeNetworkConfig\x12\x39\n\x0bgcfs_config\x18\x16 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12G\n\x12\x63onfidential_nodes\x18\x17 \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12\x33\n\x05gvnic\x18\x1d \x01(\x0b\x32$.google.container.v1beta1.VirtualNIC\x12\x0c\n\x04\x65tag\x18\x1e \x01(\t\x12\x39\n\x0b\x66\x61st_socket\x18\x1f \x01(\x0b\x32$.google.container.v1beta1.FastSocket\x12G\n\x0elogging_config\x18 \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x41\n\x0fresource_labels\x18! \x01(\x0b\x32(.google.container.v1beta1.ResourceLabels\x12H\n\x13windows_node_config\x18\" \x01(\x0b\x32+.google.container.v1beta1.WindowsNodeConfig\x12\x41\n\x0c\x61\x63\x63\x65lerators\x18# \x03(\x0b\x32+.google.container.v1beta1.AcceleratorConfig\x12\x19\n\x0cmachine_type\x18$ \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18% \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isk_size_gb\x18& \x01(\x03\x42\x03\xe0\x41\x01\x12L\n\x15resource_manager_tags\x18\' \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12\x45\n\x11\x63ontainerd_config\x18( \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12R\n\x13queued_provisioning\x18* \x01(\x0b\x32\x35.google.container.v1beta1.NodePool.QueuedProvisioning\"\xde\x01\n\x1dSetNodePoolAutoscalingRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0cnode_pool_id\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12G\n\x0b\x61utoscaling\x18\x05 \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscalingB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x91\x01\n\x18SetLoggingServiceRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1c\n\x0flogging_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x97\x01\n\x1bSetMonitoringServiceRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1f\n\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xb5\x01\n\x16SetAddonsConfigRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x42\n\raddons_config\x18\x04 \x01(\x0b\x32&.google.container.v1beta1.AddonsConfigB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x86\x01\n\x13SetLocationsRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\tlocations\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x8b\x01\n\x13UpdateMasterRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0emaster_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xc8\x02\n\x14SetMasterAuthRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x35.google.container.v1beta1.SetMasterAuthRequest.ActionB\x03\xe0\x41\x02\x12\x39\n\x06update\x18\x05 \x01(\x0b\x32$.google.container.v1beta1.MasterAuthB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"P\n\x06\x41\x63tion\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cSET_PASSWORD\x10\x01\x12\x15\n\x11GENERATE_PASSWORD\x10\x02\x12\x10\n\x0cSET_USERNAME\x10\x03\"o\n\x14\x44\x65leteClusterRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x04 \x01(\t\"U\n\x13ListClustersRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\"b\n\x14ListClustersResponse\x12\x33\n\x08\x63lusters\x18\x01 \x03(\x0b\x32!.google.container.v1beta1.Cluster\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"p\n\x13GetOperationRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0coperation_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"W\n\x15ListOperationsRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\"s\n\x16\x43\x61ncelOperationRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0coperation_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x04 \x01(\t\"h\n\x16ListOperationsResponse\x12\x37\n\noperations\x18\x01 \x03(\x0b\x32#.google.container.v1beta1.Operation\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"V\n\x16GetServerConfigRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x04 \x01(\t\"\xe9\x05\n\x0cServerConfig\x12\x1f\n\x17\x64\x65\x66\x61ult_cluster_version\x18\x01 \x01(\t\x12\x1b\n\x13valid_node_versions\x18\x03 \x03(\t\x12\x1a\n\x12\x64\x65\x66\x61ult_image_type\x18\x04 \x01(\t\x12\x19\n\x11valid_image_types\x18\x05 \x03(\t\x12\x1d\n\x15valid_master_versions\x18\x06 \x03(\t\x12M\n\x08\x63hannels\x18\t \x03(\x0b\x32;.google.container.v1beta1.ServerConfig.ReleaseChannelConfig\x12\\\n\x14windows_version_maps\x18\n \x03(\x0b\x32>.google.container.v1beta1.ServerConfig.WindowsVersionMapsEntry\x1a\xb1\x02\n\x14ReleaseChannelConfig\x12\x41\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.ReleaseChannel.Channel\x12\x17\n\x0f\x64\x65\x66\x61ult_version\x18\x02 \x01(\t\x12l\n\x12\x61vailable_versions\x18\x03 \x03(\x0b\x32L.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersionB\x02\x18\x01\x12\x16\n\x0evalid_versions\x18\x04 \x03(\t\x1a\x37\n\x10\x41vailableVersion\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t:\x02\x18\x01\x1a\x64\n\x17WindowsVersionMapsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.container.v1beta1.WindowsVersions:\x02\x38\x01\"F\n\x16\x42\x65stEffortProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x13min_provision_nodes\x18\x02 \x01(\x05\"\xcc\x01\n\x0fWindowsVersions\x12R\n\x10windows_versions\x18\x01 \x03(\x0b\x32\x38.google.container.v1beta1.WindowsVersions.WindowsVersion\x1a\x65\n\x0eWindowsVersion\x12\x12\n\nimage_type\x18\x01 \x01(\t\x12\x12\n\nos_version\x18\x02 \x01(\t\x12+\n\x10support_end_date\x18\x03 \x01(\x0b\x32\x11.google.type.Date\"\xae\x01\n\x15\x43reateNodePoolRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12:\n\tnode_pool\x18\x04 \x01(\x0b\x32\".google.container.v1beta1.NodePoolB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x06 \x01(\t\"\x8d\x01\n\x15\x44\x65leteNodePoolRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0cnode_pool_id\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"q\n\x14ListNodePoolsRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"\x8a\x01\n\x12GetNodePoolRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0cnode_pool_id\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xa9\x04\n\x11\x42lueGreenSettings\x12\x64\n\x17standard_rollout_policy\x18\x01 \x01(\x0b\x32\x41.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicyH\x00\x12h\n\x19\x61utoscaled_rollout_policy\x18\x03 \x01(\x0b\x32\x43.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicyH\x00\x12?\n\x17node_pool_soak_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x1a\xb9\x01\n\x15StandardRolloutPolicy\x12\x1a\n\x10\x62\x61tch_percentage\x18\x01 \x01(\x02H\x00\x12\x1a\n\x10\x62\x61tch_node_count\x18\x02 \x01(\x05H\x00\x12;\n\x13\x62\x61tch_soak_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\x13\n\x11update_batch_sizeB\x16\n\x14_batch_soak_duration\x1a\x19\n\x17\x41utoscaledRolloutPolicyB\x10\n\x0erollout_policyB\x1a\n\x18_node_pool_soak_duration\"\xc1\x11\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x63onfig\x18\x02 \x01(\x0b\x32$.google.container.v1beta1.NodeConfig\x12\x1a\n\x12initial_node_count\x18\x03 \x01(\x05\x12\x11\n\tlocations\x18\r \x03(\t\x12\x43\n\x0enetwork_config\x18\x0e \x01(\x0b\x32+.google.container.v1beta1.NodeNetworkConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x65 \x01(\t\x12 \n\x13instance_group_urls\x18\x66 \x03(\tB\x03\xe0\x41\x03\x12>\n\x06status\x18g \x01(\x0e\x32).google.container.v1beta1.NodePool.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18h \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x42\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscaling\x12<\n\nmanagement\x18\x05 \x01(\x0b\x32(.google.container.v1beta1.NodeManagement\x12H\n\x13max_pods_constraint\x18\x06 \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraint\x12=\n\nconditions\x18i \x03(\x0b\x32).google.container.v1beta1.StatusCondition\x12\x1f\n\x12pod_ipv4_cidr_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12L\n\x10upgrade_settings\x18k \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12L\n\x10placement_policy\x18l \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.PlacementPolicy\x12G\n\x0bupdate_info\x18m \x01(\x0b\x32-.google.container.v1beta1.NodePool.UpdateInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18n \x01(\t\x12R\n\x13queued_provisioning\x18p \x01(\x0b\x32\x35.google.container.v1beta1.NodePool.QueuedProvisioning\x12R\n\x18\x62\x65st_effort_provisioning\x18q \x01(\x0b\x32\x30.google.container.v1beta1.BestEffortProvisioning\x1a\xfa\x01\n\x0fUpgradeSettings\x12\x11\n\tmax_surge\x18\x01 \x01(\x05\x12\x17\n\x0fmax_unavailable\x18\x02 \x01(\x05\x12G\n\x08strategy\x18\x03 \x01(\x0e\x32\x30.google.container.v1beta1.NodePoolUpdateStrategyH\x00\x88\x01\x01\x12M\n\x13\x62lue_green_settings\x18\x04 \x01(\x0b\x32+.google.container.v1beta1.BlueGreenSettingsH\x01\x88\x01\x01\x42\x0b\n\t_strategyB\x16\n\x14_blue_green_settings\x1a\xb2\x04\n\nUpdateInfo\x12T\n\x0f\x62lue_green_info\x18\x01 \x01(\x0b\x32;.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo\x1a\xcd\x03\n\rBlueGreenInfo\x12P\n\x05phase\x18\x01 \x01(\x0e\x32\x41.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase\x12 \n\x18\x62lue_instance_group_urls\x18\x02 \x03(\t\x12!\n\x19green_instance_group_urls\x18\x03 \x03(\t\x12%\n\x1d\x62lue_pool_deletion_start_time\x18\x04 \x01(\t\x12\x1a\n\x12green_pool_version\x18\x05 \x01(\t\"\xe1\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUPDATE_STARTED\x10\x01\x12\x17\n\x13\x43REATING_GREEN_POOL\x10\x02\x12\x17\n\x13\x43ORDONING_BLUE_POOL\x10\x03\x12\x1e\n\x1aWAITING_TO_DRAIN_BLUE_POOL\x10\x08\x12\x16\n\x12\x44RAINING_BLUE_POOL\x10\x04\x12\x15\n\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n\x12\x44\x45LETING_BLUE_POOL\x10\x06\x12\x14\n\x10ROLLBACK_STARTED\x10\x07\x1a\xae\x01\n\x0fPlacementPolicy\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.container.v1beta1.NodePool.PlacementPolicy.Type\x12\x14\n\x0ctpu_topology\x18\x02 \x01(\t\x12\x13\n\x0bpolicy_name\x18\x03 \x01(\t\")\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMPACT\x10\x01\x1a%\n\x12QueuedProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x16\n\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n\x0bRECONCILING\x10\x04\x12\x0c\n\x08STOPPING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\"\x82\x01\n\x0eNodeManagement\x12\x14\n\x0c\x61uto_upgrade\x18\x01 \x01(\x08\x12\x13\n\x0b\x61uto_repair\x18\x02 \x01(\x08\x12\x45\n\x0fupgrade_options\x18\n \x01(\x0b\x32,.google.container.v1beta1.AutoUpgradeOptions\"T\n\x12\x41utoUpgradeOptions\x12$\n\x17\x61uto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"j\n\x11MaintenancePolicy\x12;\n\x06window\x18\x01 \x01(\x0b\x32+.google.container.v1beta1.MaintenanceWindow\x12\x18\n\x10resource_version\x18\x03 \x01(\t\"\x8a\x03\n\x11MaintenanceWindow\x12T\n\x18\x64\x61ily_maintenance_window\x18\x02 \x01(\x0b\x32\x30.google.container.v1beta1.DailyMaintenanceWindowH\x00\x12I\n\x10recurring_window\x18\x03 \x01(\x0b\x32-.google.container.v1beta1.RecurringTimeWindowH\x00\x12\x66\n\x16maintenance_exclusions\x18\x04 \x03(\x0b\x32\x46.google.container.v1beta1.MaintenanceWindow.MaintenanceExclusionsEntry\x1a\x62\n\x1aMaintenanceExclusionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.google.container.v1beta1.TimeWindow:\x02\x38\x01\x42\x08\n\x06policy\"\xd5\x01\n\nTimeWindow\x12^\n\x1dmaintenance_exclusion_options\x18\x03 \x01(\x0b\x32\x35.google.container.v1beta1.MaintenanceExclusionOptionsH\x00\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07options\"\xb9\x01\n\x1bMaintenanceExclusionOptions\x12J\n\x05scope\x18\x01 \x01(\x0e\x32;.google.container.v1beta1.MaintenanceExclusionOptions.Scope\"N\n\x05Scope\x12\x0f\n\x0bNO_UPGRADES\x10\x00\x12\x15\n\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"_\n\x13RecurringTimeWindow\x12\x34\n\x06window\x18\x01 \x01(\x0b\x32$.google.container.v1beta1.TimeWindow\x12\x12\n\nrecurrence\x18\x02 \x01(\t\"C\n\x16\x44\x61ilyMaintenanceWindow\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x15\n\x08\x64uration\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xd7\x01\n\x1cSetNodePoolManagementRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0cnode_pool_id\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x41\n\nmanagement\x18\x05 \x01(\x0b\x32(.google.container.v1beta1.NodeManagementB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xa7\x01\n\x16SetNodePoolSizeRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0cnode_pool_id\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x17\n\nnode_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\".\n\x1e\x43ompleteNodePoolUpgradeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xab\x01\n\x1eRollbackNodePoolUpgradeRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x1b\n\x0cnode_pool_id\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0brespect_pdb\x18\x07 \x01(\x08\"O\n\x15ListNodePoolsResponse\x12\x36\n\nnode_pools\x18\x01 \x03(\x0b\x32\".google.container.v1beta1.NodePool\"\xbe\x03\n\x12\x43lusterAutoscaling\x12$\n\x1c\x65nable_node_autoprovisioning\x18\x01 \x01(\x08\x12@\n\x0fresource_limits\x18\x02 \x03(\x0b\x32\'.google.container.v1beta1.ResourceLimit\x12\\\n\x13\x61utoscaling_profile\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile\x12g\n#autoprovisioning_node_pool_defaults\x18\x04 \x01(\x0b\x32:.google.container.v1beta1.AutoprovisioningNodePoolDefaults\x12\"\n\x1a\x61utoprovisioning_locations\x18\x05 \x03(\t\"U\n\x12\x41utoscalingProfile\x12\x17\n\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n\x14OPTIMIZE_UTILIZATION\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\"\x87\x04\n AutoprovisioningNodePoolDefaults\x12\x14\n\x0coauth_scopes\x18\x01 \x03(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12L\n\x10upgrade_settings\x18\x03 \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12<\n\nmanagement\x18\x04 \x01(\x0b\x32(.google.container.v1beta1.NodeManagement\x12\x1c\n\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x05\x12\x11\n\tdisk_type\x18\x07 \x01(\t\x12R\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32\x30.google.container.v1beta1.ShieldedInstanceConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\t \x01(\t\x12\x12\n\nimage_type\x18\n \x01(\t\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\r \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"H\n\rResourceLimit\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x0f\n\x07minimum\x18\x02 \x01(\x03\x12\x0f\n\x07maximum\x18\x03 \x01(\x03\"\xcc\x02\n\x13NodePoolAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\x12\x17\n\x0f\x61utoprovisioned\x18\x04 \x01(\x08\x12U\n\x0flocation_policy\x18\x05 \x01(\x0e\x32<.google.container.v1beta1.NodePoolAutoscaling.LocationPolicy\x12\x1c\n\x14total_min_node_count\x18\x06 \x01(\x05\x12\x1c\n\x14total_max_node_count\x18\x07 \x01(\x05\"H\n\x0eLocationPolicy\x12\x1f\n\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"\xa0\x02\n\x10SetLabelsRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\\\n\x0fresource_labels\x18\x04 \x03(\x0b\x32>.google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0\x41\x02\x12\x1e\n\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x14SetLegacyAbacRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x14\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x8d\x01\n\x16StartIPRotationRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x1a\n\x12rotate_credentials\x18\x07 \x01(\x08\"t\n\x19\x43ompleteIPRotationRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xfc\x02\n\x11\x41\x63\x63\x65leratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x12+\n\x1fmax_time_shared_clients_per_gpu\x18\x04 \x01(\x03\x42\x02\x18\x01\x12K\n\x12gpu_sharing_config\x18\x05 \x01(\x0b\x32*.google.container.v1beta1.GPUSharingConfigH\x00\x88\x01\x01\x12\x62\n\x1egpu_driver_installation_config\x18\x06 \x01(\x0b\x32\x35.google.container.v1beta1.GPUDriverInstallationConfigH\x01\x88\x01\x01\x42\x15\n\x13_gpu_sharing_configB!\n\x1f_gpu_driver_installation_config\"\x88\x02\n\x10GPUSharingConfig\x12\"\n\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03\x12`\n\x14gpu_sharing_strategy\x18\x02 \x01(\x0e\x32=.google.container.v1beta1.GPUSharingConfig.GPUSharingStrategyH\x00\x88\x01\x01\"U\n\x12GPUSharingStrategy\x12$\n GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n\x0cTIME_SHARING\x10\x01\x12\x07\n\x03MPS\x10\x02\x42\x17\n\x15_gpu_sharing_strategy\"\x89\x02\n\x1bGPUDriverInstallationConfig\x12g\n\x12gpu_driver_version\x18\x01 \x01(\x0e\x32\x46.google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersionH\x00\x88\x01\x01\"j\n\x10GPUDriverVersion\x12\"\n\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n\x15INSTALLATION_DISABLED\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\n\n\x06LATEST\x10\x03\x42\x15\n\x13_gpu_driver_version\"*\n\x17ManagedPrometheusConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xcb\x02\n\x16WorkloadMetadataConfig\x12X\n\rnode_metadata\x18\x01 \x01(\x0e\x32=.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadataB\x02\x18\x01\x12\x43\n\x04mode\x18\x02 \x01(\x0e\x32\x35.google.container.v1beta1.WorkloadMetadataConfig.Mode\"P\n\x0cNodeMetadata\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06SECURE\x10\x01\x12\n\n\x06\x45XPOSE\x10\x02\x12\x17\n\x13GKE_METADATA_SERVER\x10\x03\"@\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCE_METADATA\x10\x01\x12\x10\n\x0cGKE_METADATA\x10\x02\"\xb8\x01\n\x17SetNetworkPolicyRequest\x12\x19\n\nproject_id\x18\x01 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x19\n\ncluster_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x44\n\x0enetwork_policy\x18\x04 \x01(\x0b\x32\'.google.container.v1beta1.NetworkPolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xbe\x01\n\x1bSetMaintenancePolicyRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12L\n\x12maintenance_policy\x18\x04 \x01(\x0b\x32+.google.container.v1beta1.MaintenancePolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"+\n\x14ListLocationsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"g\n\x15ListLocationsResponse\x12\x35\n\tlocations\x18\x01 \x03(\x0b\x32\".google.container.v1beta1.Location\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x08Location\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.container.v1beta1.Location.LocationType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0brecommended\x18\x03 \x01(\x08\"C\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04ZONE\x10\x01\x12\n\n\x06REGION\x10\x02\"\xb2\x02\n\x0fStatusCondition\x12@\n\x04\x63ode\x18\x01 \x01(\x0e\x32..google.container.v1beta1.StatusCondition.CodeB\x02\x18\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12(\n\x0e\x63\x61nonical_code\x18\x03 \x01(\x0e\x32\x10.google.rpc.Code\"\xa1\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cGCE_STOCKOUT\x10\x01\x12\x1f\n\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n\x13\x43LOUD_KMS_KEY_ERROR\x10\x07\x12\x0f\n\x0b\x43\x41_EXPIRING\x10\t\x1a\x02\x18\x01\"\xe8\t\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x1c\x65nable_intra_node_visibility\x18\x05 \x01(\x08\x12H\n\x13\x64\x65\x66\x61ult_snat_status\x18\x07 \x01(\x0b\x32+.google.container.v1beta1.DefaultSnatStatus\x12\x1f\n\x17\x65nable_l4ilb_subsetting\x18\n \x01(\x08\x12\x45\n\x11\x64\x61tapath_provider\x18\x0b \x01(\x0e\x32*.google.container.v1beta1.DatapathProvider\x12U\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32\x31.google.container.v1beta1.PrivateIPv6GoogleAccess\x12\x37\n\ndns_config\x18\r \x01(\x0b\x32#.google.container.v1beta1.DNSConfig\x12W\n\x1bservice_external_ips_config\x18\x0f \x01(\x0b\x32\x32.google.container.v1beta1.ServiceExternalIPsConfig\x12\x46\n\x12gateway_api_config\x18\x10 \x01(\x0b\x32*.google.container.v1beta1.GatewayAPIConfig\x12\x1f\n\x17\x65nable_multi_networking\x18\x11 \x01(\x08\x12k\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32G.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig\x12\'\n\x1a\x65nable_fqdn_network_policy\x18\x13 \x01(\x08H\x00\x88\x01\x01\x12^\n\x1cin_transit_encryption_config\x18\x14 \x01(\x0e\x32\x33.google.container.v1beta1.InTransitEncryptionConfigH\x01\x88\x01\x01\x12\x35\n(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\x08H\x02\x88\x01\x01\x1a\xe3\x01\n\x1f\x43lusterNetworkPerformanceConfig\x12v\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32L.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x1d\n\x1b_enable_fqdn_network_policyB\x1f\n\x1d_in_transit_encryption_configB+\n)_enable_cilium_clusterwide_network_policy\"\xc5\x01\n\x10GatewayAPIConfig\x12\x43\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x32.google.container.v1beta1.GatewayAPIConfig.Channel\"l\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HANNEL_DISABLED\x10\x01\x12\x1c\n\x14\x43HANNEL_EXPERIMENTAL\x10\x03\x1a\x02\x08\x01\x12\x14\n\x10\x43HANNEL_STANDARD\x10\x04\"+\n\x18ServiceExternalIPsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"j\n\x1cListUsableSubnetworksRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"y\n\x1dListUsableSubnetworksResponse\x12?\n\x0bsubnetworks\x18\x01 \x03(\x0b\x32*.google.container.v1beta1.UsableSubnetwork\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x85\x02\n\x1eUsableSubnetworkSecondaryRange\x12\x12\n\nrange_name\x18\x01 \x01(\t\x12\x15\n\rip_cidr_range\x18\x02 \x01(\t\x12O\n\x06status\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.UsableSubnetworkSecondaryRange.Status\"g\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x12\n\x0eIN_USE_SERVICE\x10\x02\x12\x18\n\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n\x12IN_USE_MANAGED_POD\x10\x04\"\xbd\x01\n\x10UsableSubnetwork\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12U\n\x13secondary_ip_ranges\x18\x04 \x03(\x0b\x32\x38.google.container.v1beta1.UsableSubnetworkSecondaryRange\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\")\n\x16VerticalPodAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x11\x44\x65\x66\x61ultSnatStatus\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x19IntraNodeVisibilityConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"&\n\x13ILBSubsettingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x03\n\tDNSConfig\x12\x41\n\x0b\x63luster_dns\x18\x01 \x01(\x0e\x32,.google.container.v1beta1.DNSConfig.Provider\x12G\n\x11\x63luster_dns_scope\x18\x02 \x01(\x0e\x32,.google.container.v1beta1.DNSConfig.DNSScope\x12\x1a\n\x12\x63luster_dns_domain\x18\x03 \x01(\t\x12*\n\x1d\x61\x64\x64itive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n\x10PLATFORM_DEFAULT\x10\x01\x12\r\n\tCLOUD_DNS\x10\x02\x12\x0c\n\x08KUBE_DNS\x10\x03\"G\n\x08\x44NSScope\x12\x19\n\x15\x44NS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rCLUSTER_SCOPE\x10\x01\x12\r\n\tVPC_SCOPE\x10\x02\".\n\x11MaxPodsConstraint\x12\x19\n\x11max_pods_per_node\x18\x01 \x01(\x03\"j\n\x16WorkloadIdentityConfig\x12\x1e\n\x12identity_namespace\x18\x01 \x01(\tB\x02\x18\x01\x12\x15\n\rworkload_pool\x18\x02 \x01(\t\x12\x19\n\x11identity_provider\x18\x03 \x01(\t\"E\n\x12WorkloadALTSConfig\x12/\n\x0b\x65nable_alts\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"O\n\x14WorkloadCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"K\n\x10MeshCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"\xf2\x05\n\x12\x44\x61tabaseEncryption\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32\x32.google.container.v1beta1.DatabaseEncryption.State\x12Z\n\rcurrent_state\x18\x03 \x01(\x0e\x32\x39.google.container.v1beta1.DatabaseEncryption.CurrentStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x63ryption_keys\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12_\n\x15last_operation_errors\x18\x05 \x03(\x0b\x32;.google.container.v1beta1.DatabaseEncryption.OperationErrorB\x03\xe0\x41\x03\x1ah\n\x0eOperationError\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"2\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tENCRYPTED\x10\x01\x12\r\n\tDECRYPTED\x10\x02\"\xfb\x01\n\x0c\x43urrentState\x12\x1d\n\x19\x43URRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43URRENT_STATE_ENCRYPTED\x10\x07\x12\x1b\n\x17\x43URRENT_STATE_DECRYPTED\x10\x02\x12$\n CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n\x1e\x43URRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n\x1e\x43URRENT_STATE_DECRYPTION_ERROR\x10\x06\x42\x10\n\x0e_current_state\"\xf7\x02\n\x19ResourceUsageExportConfig\x12\x65\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32G.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination\x12&\n\x1e\x65nable_network_egress_metering\x18\x02 \x01(\x08\x12r\n\x1b\x63onsumption_metering_config\x18\x03 \x01(\x0b\x32M.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig\x1a)\n\x13\x42igQueryDestination\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a,\n\x19\x43onsumptionMeteringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\" \n\rShieldedNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nVirtualNIC\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nFastSocket\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x16GetOpenIDConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"\xdc\x01\n\x17GetOpenIDConfigResponse\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x10\n\x08jwks_uri\x18\x02 \x01(\t\x12 \n\x18response_types_supported\x18\x03 \x03(\t\x12\x1f\n\x17subject_types_supported\x18\x04 \x03(\t\x12-\n%id_token_signing_alg_values_supported\x18\x05 \x03(\t\x12\x18\n\x10\x63laims_supported\x18\x06 \x03(\t\x12\x13\n\x0bgrant_types\x18\x07 \x03(\t\"\'\n\x15GetJSONWebKeysRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"r\n\x03Jwk\x12\x0b\n\x03kty\x18\x01 \x01(\t\x12\x0b\n\x03\x61lg\x18\x02 \x01(\t\x12\x0b\n\x03use\x18\x03 \x01(\t\x12\x0b\n\x03kid\x18\x04 \x01(\t\x12\t\n\x01n\x18\x05 \x01(\t\x12\t\n\x01\x65\x18\x06 \x01(\t\x12\t\n\x01x\x18\x07 \x01(\t\x12\t\n\x01y\x18\x08 \x01(\t\x12\x0b\n\x03\x63rv\x18\t \x01(\t\"E\n\x16GetJSONWebKeysResponse\x12+\n\x04keys\x18\x01 \x03(\x0b\x32\x1d.google.container.v1beta1.Jwk\"2\n\"CheckAutopilotCompatibilityRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x81\x03\n\x1b\x41utopilotCompatibilityIssue\x12\x34\n\x10last_observation\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onstraint_type\x18\x02 \x01(\t\x12]\n\x14incompatibility_type\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.AutopilotCompatibilityIssue.IssueType\x12\x10\n\x08subjects\x18\x04 \x03(\t\x12\x19\n\x11\x64ocumentation_url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"r\n\tIssueType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n\x1a\x41\x44\x44ITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"}\n#CheckAutopilotCompatibilityResponse\x12\x45\n\x06issues\x18\x01 \x03(\x0b\x32\x35.google.container.v1beta1.AutopilotCompatibilityIssue\x12\x0f\n\x07summary\x18\x02 \x01(\t\"\xa1\x01\n\x0eReleaseChannel\x12\x41\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.ReleaseChannel.Channel\"L\n\x07\x43hannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05RAPID\x10\x01\x12\x0b\n\x07REGULAR\x10\x02\x12\n\n\x06STABLE\x10\x03\x12\x0c\n\x08\x45XTENDED\x10\x04\"\'\n\x14\x43ostManagementConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"U\n\tTpuConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x16use_service_networking\x18\x02 \x01(\x08\x12\x17\n\x0fipv4_cidr_block\x18\x03 \x01(\t\"\x08\n\x06Master\"\x94\x01\n\x19\x41utopilotConversionStatus\x12M\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.container.v1beta1.AutopilotConversionStatus.StateB\x03\xe0\x41\x03\"(\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44ONE\x10\x05\"\xc1\x01\n\tAutopilot\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12N\n\x16workload_policy_config\x18\x02 \x01(\x0b\x32..google.container.v1beta1.WorkloadPolicyConfig\x12S\n\x11\x63onversion_status\x18\x03 \x01(\x0b\x32\x33.google.container.v1beta1.AutopilotConversionStatusB\x03\xe0\x41\x03\"H\n\x14WorkloadPolicyConfig\x12\x1c\n\x0f\x61llow_net_admin\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x12\n\x10_allow_net_admin\"\xb7\x03\n\x12NotificationConfig\x12\x43\n\x06pubsub\x18\x01 \x01(\x0b\x32\x33.google.container.v1beta1.NotificationConfig.PubSub\x1a\x8f\x01\n\x06PubSub\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x43\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x33.google.container.v1beta1.NotificationConfig.Filter\x1aT\n\x06\x46ilter\x12J\n\nevent_type\x18\x01 \x03(\x0e\x32\x36.google.container.v1beta1.NotificationConfig.EventType\"t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n\rUPGRADE_EVENT\x10\x02\x12\x1b\n\x17SECURITY_BULLETIN_EVENT\x10\x03\"$\n\x11\x43onfidentialNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe4\x01\n\x0cUpgradeEvent\x12\x44\n\rresource_type\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x38\n\x14operation_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x10\n\x08resource\x18\x06 \x01(\t\"\x88\x02\n\x15UpgradeAvailableEvent\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x44\n\rresource_type\x18\x02 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x41\n\x0frelease_channel\x18\x03 \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x43\n\x10windows_versions\x18\x05 \x01(\x0b\x32).google.container.v1beta1.WindowsVersions\"\x9e\x02\n\x15SecurityBulletinEvent\x12\x1e\n\x16resource_type_affected\x18\x01 \x01(\t\x12\x13\n\x0b\x62ulletin_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ve_ids\x18\x03 \x03(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x14\n\x0c\x62ulletin_uri\x18\x05 \x01(\t\x12\x19\n\x11\x62rief_description\x18\x06 \x01(\t\x12!\n\x19\x61\x66\x66\x65\x63ted_supported_minors\x18\x07 \x03(\t\x12\x18\n\x10patched_versions\x18\x08 \x03(\t\x12 \n\x18suggested_upgrade_target\x18\t \x01(\t\x12\x1d\n\x15manual_steps_required\x18\n \x01(\x08\"(\n\x15IdentityServiceConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"[\n\rLoggingConfig\x12J\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32\x30.google.container.v1beta1.LoggingComponentConfig\"\xf4\x01\n\x16LoggingComponentConfig\x12U\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32:.google.container.v1beta1.LoggingComponentConfig.Component\"\x82\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tWORKLOADS\x10\x02\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\"*\n\x17RayClusterLoggingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xa6\x02\n\x10MonitoringConfig\x12M\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32\x33.google.container.v1beta1.MonitoringComponentConfig\x12T\n\x19managed_prometheus_config\x18\x02 \x01(\x0b\x32\x31.google.container.v1beta1.ManagedPrometheusConfig\x12m\n&advanced_datapath_observability_config\x18\x03 \x01(\x0b\x32=.google.container.v1beta1.AdvancedDatapathObservabilityConfig\"\xa3\x02\n#AdvancedDatapathObservabilityConfig\x12\x16\n\x0e\x65nable_metrics\x18\x01 \x01(\x08\x12[\n\nrelay_mode\x18\x02 \x01(\x0e\x32G.google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode\x12\x19\n\x0c\x65nable_relay\x18\x03 \x01(\x08H\x00\x88\x01\x01\"[\n\tRelayMode\x12\x1a\n\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n\x0b\x45XTERNAL_LB\x10\x04\x42\x0f\n\r_enable_relay\"-\n\x1aRayClusterMonitoringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"_\n\x15NodePoolLoggingConfig\x12\x46\n\x0evariant_config\x18\x01 \x01(\x0b\x32..google.container.v1beta1.LoggingVariantConfig\"\xa4\x01\n\x14LoggingVariantConfig\x12G\n\x07variant\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.LoggingVariantConfig.Variant\"C\n\x07Variant\x12\x17\n\x13VARIANT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x12\n\x0eMAX_THROUGHPUT\x10\x02\"\xf2\x02\n\x19MonitoringComponentConfig\x12X\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32=.google.container.v1beta1.MonitoringComponentConfig.Component\"\xfa\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\x11\n\tWORKLOADS\x10\x02\x1a\x02\x08\x01\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0b\n\x07STORAGE\x10\x07\x12\x07\n\x03HPA\x10\x08\x12\x07\n\x03POD\x10\t\x12\r\n\tDAEMONSET\x10\n\x12\x0e\n\nDEPLOYMENT\x10\x0b\x12\x0f\n\x0bSTATEFULSET\x10\x0c\x12\x0c\n\x08\x43\x41\x44VISOR\x10\r\x12\x0b\n\x07KUBELET\x10\x0e\x12\x08\n\x04\x44\x43GM\x10\x0f\"N\n\x05\x46leet\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x17\n\nmembership\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0epre_registered\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x01\n\x13ResourceManagerTags\x12\x45\n\x04tags\x18\x01 \x03(\x0b\x32\x37.google.container.v1beta1.ResourceManagerTags.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb0\x01\n\x10\x45nterpriseConfig\x12Q\n\x0c\x63luster_tier\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTierB\x03\xe0\x41\x03\"I\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\"7\n\x13SecretManagerConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_enabled\"\xa0\x01\n\x11SecondaryBootDisk\x12>\n\x04mode\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.SecondaryBootDisk.Mode\x12\x12\n\ndisk_image\x18\x02 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONTAINER_IMAGE_CACHE\x10\x01\"!\n\x1fSecondaryBootDiskUpdateStrategy*\xc6\x01\n\x17PrivateIPv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\'\n#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n\x13UpgradeResourceType\x12%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MASTER\x10\x01\x12\r\n\tNODE_POOL\x10\x02*^\n\x16NodePoolUpdateStrategy\x12)\n%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nBLUE_GREEN\x10\x02\x12\t\n\x05SURGE\x10\x03*a\n\x10\x44\x61tapathProvider\x12!\n\x1d\x44\x41TAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n\x11\x41\x44VANCED_DATAPATH\x10\x02*@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02*\x9f\x01\n\x19InTransitEncryptionConfig\x12,\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x30\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x02\x32\xa6N\n\x0e\x43lusterManager\x12\xf3\x01\n\x0cListClusters\x12-.google.container.v1beta1.ListClustersRequest\x1a..google.container.v1beta1.ListClustersResponse\"\x83\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02k\x12\x31/v1beta1/{parent=projects/*/locations/*}/clustersZ6\x12\x34/v1beta1/projects/{project_id}/zones/{zone}/clusters\x12\xfa\x01\n\nGetCluster\x12+.google.container.v1beta1.GetClusterRequest\x1a!.google.container.v1beta1.Cluster\"\x9b\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02x\x12\x31/v1beta1/{name=projects/*/locations/*/clusters/*}ZC\x12\x41/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}\x12\xf8\x01\n\rCreateCluster\x12..google.container.v1beta1.CreateClusterRequest\x1a#.google.container.v1beta1.Operation\"\x91\x01\xda\x41\x17project_id,zone,cluster\x82\xd3\xe4\x93\x02q\"1/v1beta1/{parent=projects/*/locations/*}/clusters:\x01*Z9\"4/v1beta1/projects/{project_id}/zones/{zone}/clusters:\x01*\x12\x8f\x02\n\rUpdateCluster\x12..google.container.v1beta1.UpdateClusterRequest\x1a#.google.container.v1beta1.Operation\"\xa8\x01\xda\x41!project_id,zone,cluster_id,update\x82\xd3\xe4\x93\x02~\x1a\x31/v1beta1/{name=projects/*/locations/*/clusters/*}:\x01*ZF\x1a\x41/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:\x01*\x12\x9a\x02\n\x0eUpdateNodePool\x12/.google.container.v1beta1.UpdateNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xb1\x01\x82\xd3\xe4\x93\x02\xaa\x01\x1a=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:\x01*Zf\"a/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update:\x01*\x12\xbe\x02\n\x16SetNodePoolAutoscaling\x12\x37.google.container.v1beta1.SetNodePoolAutoscalingRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\x82\xd3\xe4\x93\x02\xbe\x01\"L/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling:\x01*Zk\"f/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling:\x01*\x12\xb4\x02\n\x11SetLoggingService\x12\x32.google.container.v1beta1.SetLoggingServiceRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\xda\x41*project_id,zone,cluster_id,logging_service\x82\xd3\xe4\x93\x02\x91\x01\"/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations:\x01*ZP\"K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations:\x01*\x12\xaa\x02\n\x0cUpdateMaster\x12-.google.container.v1beta1.UpdateMasterRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\xda\x41)project_id,zone,cluster_id,master_version\x82\xd3\xe4\x93\x02\x92\x01\">/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster:\x01*ZM\"H/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master:\x01*\x12\x88\x02\n\rSetMasterAuth\x12..google.container.v1beta1.SetMasterAuthRequest\x1a#.google.container.v1beta1.Operation\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"?/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth:\x01*ZT\"O/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth:\x01*\x12\x82\x02\n\rDeleteCluster\x12..google.container.v1beta1.DeleteClusterRequest\x1a#.google.container.v1beta1.Operation\"\x9b\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02x*1/v1beta1/{name=projects/*/locations/*/clusters/*}ZC*A/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}\x12\xfd\x01\n\x0eListOperations\x12/.google.container.v1beta1.ListOperationsRequest\x1a\x30.google.container.v1beta1.ListOperationsResponse\"\x87\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02o\x12\x33/v1beta1/{parent=projects/*/locations/*}/operationsZ8\x12\x36/v1beta1/projects/{project_id}/zones/{zone}/operations\x12\x88\x02\n\x0cGetOperation\x12-.google.container.v1beta1.GetOperationRequest\x1a#.google.container.v1beta1.Operation\"\xa3\x01\xda\x41\x1cproject_id,zone,operation_id\x82\xd3\xe4\x93\x02~\x12\x33/v1beta1/{name=projects/*/locations/*/operations/*}ZG\x12\x45/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}\x12\x96\x02\n\x0f\x43\x61ncelOperation\x12\x30.google.container.v1beta1.CancelOperationRequest\x1a\x16.google.protobuf.Empty\"\xb8\x01\xda\x41\x1cproject_id,zone,operation_id\x82\xd3\xe4\x93\x02\x92\x01\":/v1beta1/{name=projects/*/locations/*/operations/*}:cancel:\x01*ZQ\"L/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel:\x01*\x12\xf7\x01\n\x0fGetServerConfig\x12\x30.google.container.v1beta1.GetServerConfigRequest\x1a&.google.container.v1beta1.ServerConfig\"\x89\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02q\x12\x33/v1beta1/{name=projects/*/locations/*}/serverConfigZ:\x12\x38/v1beta1/projects/{project_id}/zones/{zone}/serverconfig\x12\xb5\x01\n\x0eGetJSONWebKeys\x12/.google.container.v1beta1.GetJSONWebKeysRequest\x1a\x30.google.container.v1beta1.GetJSONWebKeysResponse\"@\x82\xd3\xe4\x93\x02:\x12\x38/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks\x12\xa5\x02\n\rListNodePools\x12..google.container.v1beta1.ListNodePoolsRequest\x1a/.google.container.v1beta1.ListNodePoolsResponse\"\xb2\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02\x8e\x01\x12=/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePoolsZM\x12K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools\x12\xb0\x02\n\x0bGetNodePool\x12,.google.container.v1beta1.GetNodePoolRequest\x1a\".google.container.v1beta1.NodePool\"\xce\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\x9d\x01\x12=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}Z\\\x12Z/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}\x12\xab\x02\n\x0e\x43reateNodePool\x12/.google.container.v1beta1.CreateNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xc2\x01\xda\x41$project_id,zone,cluster_id,node_pool\x82\xd3\xe4\x93\x02\x94\x01\"=/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools:\x01*ZP\"K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools:\x01*\x12\xb7\x02\n\x0e\x44\x65leteNodePool\x12/.google.container.v1beta1.DeleteNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xce\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\x9d\x01*=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}Z\\*Z/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}\x12\xc5\x01\n\x17\x43ompleteNodePoolUpgrade\x12\x38.google.container.v1beta1.CompleteNodePoolUpgradeRequest\x1a\x16.google.protobuf.Empty\"X\x82\xd3\xe4\x93\x02R\"M/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade:\x01*\x12\xe1\x02\n\x17RollbackNodePoolUpgrade\x12\x38.google.container.v1beta1.RollbackNodePoolUpgradeRequest\x1a#.google.container.v1beta1.Operation\"\xe6\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\xb5\x01\"F/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback:\x01*Zh\"c/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback:\x01*\x12\xf2\x02\n\x15SetNodePoolManagement\x12\x36.google.container.v1beta1.SetNodePoolManagementRequest\x1a#.google.container.v1beta1.Operation\"\xfb\x01\xda\x41\x32project_id,zone,cluster_id,node_pool_id,management\x82\xd3\xe4\x93\x02\xbf\x01\"K/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement:\x01*Zm\"h/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement:\x01*\x12\xc4\x02\n\tSetLabels\x12*.google.container.v1beta1.SetLabelsRequest\x1a#.google.container.v1beta1.Operation\"\xe5\x01\xda\x41\n\x0b\x66\x61st_socket\x18$ \x01(\x0b\x32$.google.container.v1beta1.FastSocketH\x00\x88\x01\x01\x12Q\n\x0fresource_labels\x18% \x03(\x0b\x32\x38.google.container.v1beta1.NodeConfig.ResourceLabelsEntry\x12G\n\x0elogging_config\x18& \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12H\n\x13windows_node_config\x18\' \x01(\x0b\x32+.google.container.v1beta1.WindowsNodeConfig\x12V\n\x1blocal_nvme_ssd_block_config\x18( \x01(\x0b\x32\x31.google.container.v1beta1.LocalNvmeSsdBlockConfig\x12\x64\n\"ephemeral_storage_local_ssd_config\x18) \x01(\x0b\x32\x38.google.container.v1beta1.EphemeralStorageLocalSsdConfig\x12\x46\n\x12sole_tenant_config\x18* \x01(\x0b\x32*.google.container.v1beta1.SoleTenantConfig\x12\x45\n\x11\x63ontainerd_config\x18+ \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12P\n\x17host_maintenance_policy\x18, \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12L\n\x15resource_manager_tags\x18- \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12(\n\x1b\x65nable_confidential_storage\x18. \x01(\x08\x42\x03\xe0\x41\x01\x12I\n\x14secondary_boot_disks\x18\x30 \x03(\x0b\x32+.google.container.v1beta1.SecondaryBootDisk\x12\x15\n\rstorage_pools\x18\x31 \x03(\t\x12k\n#secondary_boot_disk_update_strategy\x18\x32 \x01(\x0b\x32\x39.google.container.v1beta1.SecondaryBootDiskUpdateStrategyH\x01\x88\x01\x01\x12\x33\n\x10max_run_duration\x18\x35 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x63\n\x19local_ssd_encryption_mode\x18\x36 \x01(\x0e\x32;.google.container.v1beta1.NodeConfig.LocalSsdEncryptionModeH\x02\x88\x01\x01\x12\\\n\x15\x65\x66\x66\x65\x63tive_cgroup_mode\x18\x37 \x01(\x0e\x32\x38.google.container.v1beta1.NodeConfig.EffectiveCgroupModeB\x03\xe0\x41\x03\x12\x17\n\nflex_start\x18\x38 \x01(\x08H\x03\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x16LocalSsdEncryptionMode\x12)\n%LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_ENCRYPTION\x10\x01\x12\x1c\n\x18\x45PHEMERAL_KEY_ENCRYPTION\x10\x02\"x\n\x13\x45\x66\x66\x65\x63tiveCgroupMode\x12%\n!EFFECTIVE_CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V1\x10\x01\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V2\x10\x02\x42\x0e\n\x0c_fast_socketB&\n$_secondary_boot_disk_update_strategyB\x1c\n\x1a_local_ssd_encryption_modeB\r\n\x0b_flex_start\"\xa9\x03\n\x17\x41\x64vancedMachineFeatures\x12\x1d\n\x10threads_per_core\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12u\n\x1bperformance_monitoring_unit\x18\x03 \x01(\x0e\x32K.google.container.v1beta1.AdvancedMachineFeatures.PerformanceMonitoringUnitH\x02\x88\x01\x01\"w\n\x19PerformanceMonitoringUnit\x12+\n\'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\x00\x12\x11\n\rARCHITECTURAL\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08\x45NHANCED\x10\x03\x42\x13\n\x11_threads_per_coreB\x1f\n\x1d_enable_nested_virtualizationB\x1e\n\x1c_performance_monitoring_unit\"\xed\x07\n\x11NodeNetworkConfig\x12\x1d\n\x10\x63reate_pod_range\x18\x04 \x01(\x08\x42\x03\xe0\x41\x04\x12\x11\n\tpod_range\x18\x05 \x01(\t\x12\x1b\n\x13pod_ipv4_cidr_block\x18\x06 \x01(\t\x12!\n\x14\x65nable_private_nodes\x18\t \x01(\x08H\x00\x88\x01\x01\x12m\n\x1anetwork_performance_config\x18\x0b \x01(\x0b\x32\x44.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfigH\x01\x88\x01\x01\x12[\n\x1dpod_cidr_overprovision_config\x18\r \x01(\x0b\x32\x34.google.container.v1beta1.PodCIDROverprovisionConfig\x12^\n\x1f\x61\x64\x64itional_node_network_configs\x18\x0e \x03(\x0b\x32\x35.google.container.v1beta1.AdditionalNodeNetworkConfig\x12\\\n\x1e\x61\x64\x64itional_pod_network_configs\x18\x0f \x03(\x0b\x32\x34.google.container.v1beta1.AdditionalPodNetworkConfig\x12\'\n\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01\x42\x03\xe0\x41\x03\x1a\xfa\x02\n\x18NetworkPerformanceConfig\x12s\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32I.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00\x88\x01\x01\x12y\n!external_ip_egress_bandwidth_tier\x18\x02 \x01(\x0e\x32I.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x01\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB$\n\"_external_ip_egress_bandwidth_tierB\x17\n\x15_enable_private_nodesB\x1d\n\x1b_network_performance_config\"B\n\x1b\x41\x64\x64itionalNodeNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\"\xb0\x01\n\x1a\x41\x64\x64itionalPodNetworkConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1b\n\x13secondary_pod_range\x18\x02 \x01(\t\x12K\n\x11max_pods_per_node\x18\x03 \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraintH\x00\x88\x01\x01\x42\x14\n\x12_max_pods_per_node\"Y\n\x16ShieldedInstanceConfig\x12\x1a\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x12#\n\x1b\x65nable_integrity_monitoring\x18\x02 \x01(\x08\"\x8a\x01\n\rSandboxConfig\x12\x18\n\x0csandbox_type\x18\x01 \x01(\tB\x02\x18\x01\x12:\n\x04type\x18\x02 \x01(\x0e\x32,.google.container.v1beta1.SandboxConfig.Type\"#\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06GVISOR\x10\x01\"1\n\x16\x45phemeralStorageConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"2\n\x17LocalNvmeSsdBlockConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"S\n\x1e\x45phemeralStorageLocalSsdConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\x12\x18\n\x10\x64\x61ta_cache_count\x18\x02 \x01(\x05\"\x1d\n\nGcfsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe4\x01\n\x13ReservationAffinity\x12T\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32\x32.google.container.v1beta1.ReservationAffinity.Type\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"Z\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\"\xa0\x02\n\x10SoleTenantConfig\x12P\n\x0fnode_affinities\x18\x01 \x03(\x0b\x32\x37.google.container.v1beta1.SoleTenantConfig.NodeAffinity\x1a\xb9\x01\n\x0cNodeAffinity\x12\x0b\n\x03key\x18\x01 \x01(\t\x12R\n\x08operator\x18\x02 \x01(\x0e\x32@.google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator\x12\x0e\n\x06values\x18\x03 \x03(\t\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\"\x8b\x05\n\x10\x43ontainerdConfig\x12n\n\x1eprivate_registry_access_config\x18\x01 \x01(\x0b\x32\x46.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig\x1a\x86\x04\n\x1bPrivateRegistryAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x94\x01\n#certificate_authority_domain_config\x18\x02 \x03(\x0b\x32g.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig\x1a\xbe\x02\n CertificateAuthorityDomainConfig\x12\r\n\x05\x66qdns\x18\x01 \x03(\t\x12\xbb\x01\n%gcp_secret_manager_certificate_config\x18\x02 \x01(\x0b\x32\x89\x01.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00\x1a\x37\n!GCPSecretManagerCertificateConfig\x12\x12\n\nsecret_uri\x18\x01 \x01(\tB\x14\n\x12\x63\x65rtificate_config\"\xad\x05\n\x15HostMaintenancePolicy\x12\x66\n\x14maintenance_interval\x18\x01 \x01(\x0e\x32\x43.google.container.v1beta1.HostMaintenancePolicy.MaintenanceIntervalH\x01\x88\x01\x01\x12~\n\"opportunistic_maintenance_strategy\x18\x02 \x01(\x0b\x32P.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategyH\x00\x1a\xa0\x02\n OpportunisticMaintenanceStrategy\x12=\n\x15node_idle_time_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12G\n\x1fmaintenance_availability_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x12\x1f\n\x12min_nodes_per_pool\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x18\n\x16_node_idle_time_windowB\"\n _maintenance_availability_windowB\x15\n\x13_min_nodes_per_pool\"X\n\x13MaintenanceInterval\x12$\n MAINTENANCE_INTERVAL_UNSPECIFIED\x10\x00\x12\r\n\tAS_NEEDED\x10\x01\x12\x0c\n\x08PERIODIC\x10\x02\x42\x16\n\x14maintenance_strategyB\x17\n\x15_maintenance_interval\"\xbe\x01\n\tNodeTaint\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12:\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32*.google.container.v1beta1.NodeTaint.Effect\"Y\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNO_SCHEDULE\x10\x01\x12\x16\n\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n\nNO_EXECUTE\x10\x03\"A\n\nNodeTaints\x12\x33\n\x06taints\x18\x01 \x03(\x0b\x32#.google.container.v1beta1.NodeTaint\"}\n\nNodeLabels\x12@\n\x06labels\x18\x01 \x03(\x0b\x32\x30.google.container.v1beta1.NodeLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x0eResourceLabels\x12\x44\n\x06labels\x18\x01 \x03(\x0b\x32\x34.google.container.v1beta1.ResourceLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x0bNetworkTags\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\xed\x01\n\nMasterAuth\x12\x14\n\x08username\x18\x01 \x01(\tB\x02\x18\x01\x12\x14\n\x08password\x18\x02 \x01(\tB\x02\x18\x01\x12T\n\x19\x63lient_certificate_config\x18\x03 \x01(\x0b\x32\x31.google.container.v1beta1.ClientCertificateConfig\x12#\n\x16\x63luster_ca_certificate\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63lient_certificate\x18\x65 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nclient_key\x18\x66 \x01(\tB\x03\xe0\x41\x03\";\n\x17\x43lientCertificateConfig\x12 \n\x18issue_client_certificate\x18\x01 \x01(\x08\"\xf9\n\n\x0c\x41\x64\x64onsConfig\x12H\n\x13http_load_balancing\x18\x01 \x01(\x0b\x32+.google.container.v1beta1.HttpLoadBalancing\x12V\n\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\x0b\x32\x32.google.container.v1beta1.HorizontalPodAutoscaling\x12O\n\x14kubernetes_dashboard\x18\x03 \x01(\x0b\x32-.google.container.v1beta1.KubernetesDashboardB\x02\x18\x01\x12L\n\x15network_policy_config\x18\x04 \x01(\x0b\x32-.google.container.v1beta1.NetworkPolicyConfig\x12?\n\x0cistio_config\x18\x05 \x01(\x0b\x32%.google.container.v1beta1.IstioConfigB\x02\x18\x01\x12\x42\n\x10\x63loud_run_config\x18\x07 \x01(\x0b\x32(.google.container.v1beta1.CloudRunConfig\x12\x42\n\x10\x64ns_cache_config\x18\x08 \x01(\x0b\x32(.google.container.v1beta1.DnsCacheConfig\x12P\n\x17\x63onfig_connector_config\x18\n \x01(\x0b\x32/.google.container.v1beta1.ConfigConnectorConfig\x12i\n%gce_persistent_disk_csi_driver_config\x18\x0b \x01(\x0b\x32:.google.container.v1beta1.GcePersistentDiskCsiDriverConfig\x12=\n\x0bkalm_config\x18\x0c \x01(\x0b\x32$.google.container.v1beta1.KalmConfigB\x02\x18\x01\x12^\n\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\x0b\x32\x35.google.container.v1beta1.GcpFilestoreCsiDriverConfig\x12O\n\x17gke_backup_agent_config\x18\x10 \x01(\x0b\x32..google.container.v1beta1.GkeBackupAgentConfig\x12T\n\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\x0b\x32\x30.google.container.v1beta1.GcsFuseCsiDriverConfig\x12K\n\x12stateful_ha_config\x18\x12 \x01(\x0b\x32*.google.container.v1beta1.StatefulHAConfigB\x03\xe0\x41\x01\x12_\n\x1fparallelstore_csi_driver_config\x18\x13 \x01(\x0b\x32\x36.google.container.v1beta1.ParallelstoreCsiDriverConfig\x12M\n\x13ray_operator_config\x18\x15 \x01(\x0b\x32+.google.container.v1beta1.RayOperatorConfigB\x03\xe0\x41\x01\x12_\n\x1fhigh_scale_checkpointing_config\x18\x16 \x01(\x0b\x32\x36.google.container.v1beta1.HighScaleCheckpointingConfig\"%\n\x11HttpLoadBalancing\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x18HorizontalPodAutoscaling\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13KubernetesDashboard\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13NetworkPolicyConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"!\n\x0e\x44nsCacheConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"!\n\nKalmConfig\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\"\'\n\x14GkeBackupAgentConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"#\n\x10StatefulHAConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x15\x43onfigConnectorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"3\n GcePersistentDiskCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\".\n\x1bGcpFilestoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16GcsFuseCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cParallelstoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cHighScaleCheckpointingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe2\x01\n\x11RayOperatorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12Z\n\x1aray_cluster_logging_config\x18\x02 \x01(\x0b\x32\x31.google.container.v1beta1.RayClusterLoggingConfigB\x03\xe0\x41\x01\x12`\n\x1dray_cluster_monitoring_config\x18\x03 \x01(\x0b\x32\x34.google.container.v1beta1.RayClusterMonitoringConfigB\x03\xe0\x41\x01\"9\n&PrivateClusterMasterGlobalAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xed\x02\n\x14PrivateClusterConfig\x12 \n\x14\x65nable_private_nodes\x18\x01 \x01(\x08\x42\x02\x18\x01\x12#\n\x17\x65nable_private_endpoint\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x1e\n\x16master_ipv4_cidr_block\x18\x03 \x01(\t\x12\x1f\n\x10private_endpoint\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x1e\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cpeering_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12i\n\x1bmaster_global_access_config\x18\x08 \x01(\x0b\x32@.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfigB\x02\x18\x01\x12\'\n\x1bprivate_endpoint_subnetwork\x18\n \x01(\tB\x02\x18\x01\"\x9f\x01\n\x0bIstioConfig\x12\x14\n\x08\x64isabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12\x45\n\x04\x61uth\x18\x02 \x01(\x0e\x32\x33.google.container.v1beta1.IstioConfig.IstioAuthModeB\x02\x18\x01\"3\n\rIstioAuthMode\x12\r\n\tAUTH_NONE\x10\x00\x12\x13\n\x0f\x41UTH_MUTUAL_TLS\x10\x01\"\xf3\x01\n\x0e\x43loudRunConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12U\n\x12load_balancer_type\x18\x03 \x01(\x0e\x32\x39.google.container.v1beta1.CloudRunConfig.LoadBalancerType\"x\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"\xef\x02\n\x1eMasterAuthorizedNetworksConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12W\n\x0b\x63idr_blocks\x18\x02 \x03(\x0b\x32\x42.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock\x12,\n\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x31\n$private_endpoint_enforcement_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x1a\x35\n\tCidrBlock\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x12\n\ncidr_block\x18\x02 \x01(\tB\"\n _gcp_public_cidrs_access_enabledB\'\n%_private_endpoint_enforcement_enabled\"\x1d\n\nLegacyAbac\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x96\x01\n\rNetworkPolicy\x12\x42\n\x08provider\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.NetworkPolicy.Provider\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"0\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41LICO\x10\x01\"-\n\x1aPodCIDROverprovisionConfig\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\"\xaa\x08\n\x12IPAllocationPolicy\x12\x16\n\x0euse_ip_aliases\x18\x01 \x01(\x08\x12\x19\n\x11\x63reate_subnetwork\x18\x02 \x01(\x08\x12\x17\n\x0fsubnetwork_name\x18\x03 \x01(\t\x12\x1d\n\x11\x63luster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01\x12\x1a\n\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01\x12\x1e\n\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01\x12$\n\x1c\x63luster_secondary_range_name\x18\x07 \x01(\t\x12%\n\x1dservices_secondary_range_name\x18\x08 \x01(\t\x12\x1f\n\x17\x63luster_ipv4_cidr_block\x18\t \x01(\t\x12\x1c\n\x14node_ipv4_cidr_block\x18\n \x01(\t\x12 \n\x18services_ipv4_cidr_block\x18\x0b \x01(\t\x12\x1b\n\x13\x61llow_route_overlap\x18\x0c \x01(\x08\x12\x1f\n\x13tpu_ipv4_cidr_block\x18\r \x01(\tB\x02\x18\x01\x12\x12\n\nuse_routes\x18\x0f \x01(\x08\x12J\n\nstack_type\x18\x10 \x01(\x0e\x32\x36.google.container.v1beta1.IPAllocationPolicy.StackType\x12U\n\x10ipv6_access_type\x18\x11 \x01(\x0e\x32;.google.container.v1beta1.IPAllocationPolicy.IPv6AccessType\x12[\n\x1dpod_cidr_overprovision_config\x18\x15 \x01(\x0b\x32\x34.google.container.v1beta1.PodCIDROverprovisionConfig\x12#\n\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12^\n\x1c\x61\x64\x64itional_pod_ranges_config\x18\x18 \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfigB\x03\xe0\x41\x03\x12/\n\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01\x42\x03\xe0\x41\x03\"@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIPv6AccessType\x12 \n\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\"\xc0\x03\n\x13\x42inaryAuthorization\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12U\n\x0f\x65valuation_mode\x18\x02 \x01(\x0e\x32<.google.container.v1beta1.BinaryAuthorization.EvaluationMode\x12Y\n\x0fpolicy_bindings\x18\x05 \x03(\x0b\x32;.google.container.v1beta1.BinaryAuthorization.PolicyBindingB\x03\xe0\x41\x01\x1a+\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xb4\x01\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12$\n PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\x12\x13\n\x0fPOLICY_BINDINGS\x10\x05\x12\x38\n4POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE\x10\x06\"*\n\x17PodSecurityPolicyConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"D\n\x19\x41uthenticatorGroupsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0esecurity_group\x18\x02 \x01(\t\"\x96\x01\n\x10\x43lusterTelemetry\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.container.v1beta1.ClusterTelemetry.Type\"C\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0f\n\x0bSYSTEM_ONLY\x10\x03\"\x82(\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x12initial_node_count\x18\x03 \x01(\x05\x42\x02\x18\x01\x12=\n\x0bnode_config\x18\x04 \x01(\x0b\x32$.google.container.v1beta1.NodeConfigB\x02\x18\x01\x12\x39\n\x0bmaster_auth\x18\x05 \x01(\x0b\x32$.google.container.v1beta1.MasterAuth\x12\x17\n\x0flogging_service\x18\x06 \x01(\t\x12\x1a\n\x12monitoring_service\x18\x07 \x01(\t\x12\x0f\n\x07network\x18\x08 \x01(\t\x12\x19\n\x11\x63luster_ipv4_cidr\x18\t \x01(\t\x12=\n\raddons_config\x18\n \x01(\x0b\x32&.google.container.v1beta1.AddonsConfig\x12\x12\n\nsubnetwork\x18\x0b \x01(\t\x12\x36\n\nnode_pools\x18\x0c \x03(\x0b\x32\".google.container.v1beta1.NodePool\x12\x11\n\tlocations\x18\r \x03(\t\x12\x1f\n\x17\x65nable_kubernetes_alpha\x18\x0e \x01(\x08\x12$\n\x1b\x61lpha_cluster_feature_gates\x18\xa0\x01 \x03(\t\x12I\n\x14\x65nable_k8s_beta_apis\x18\x8f\x01 \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12N\n\x0fresource_labels\x18\x0f \x03(\x0b\x32\x35.google.container.v1beta1.Cluster.ResourceLabelsEntry\x12\x19\n\x11label_fingerprint\x18\x10 \x01(\t\x12\x39\n\x0blegacy_abac\x18\x12 \x01(\x0b\x32$.google.container.v1beta1.LegacyAbac\x12?\n\x0enetwork_policy\x18\x13 \x01(\x0b\x32\'.google.container.v1beta1.NetworkPolicy\x12J\n\x14ip_allocation_policy\x18\x14 \x01(\x0b\x32,.google.container.v1beta1.IPAllocationPolicy\x12g\n!master_authorized_networks_config\x18\x16 \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12G\n\x12maintenance_policy\x18\x17 \x01(\x0b\x32+.google.container.v1beta1.MaintenancePolicy\x12K\n\x14\x62inary_authorization\x18\x18 \x01(\x0b\x32-.google.container.v1beta1.BinaryAuthorization\x12U\n\x1apod_security_policy_config\x18\x19 \x01(\x0b\x32\x31.google.container.v1beta1.PodSecurityPolicyConfig\x12\x41\n\x0b\x61utoscaling\x18\x1a \x01(\x0b\x32,.google.container.v1beta1.ClusterAutoscaling\x12?\n\x0enetwork_config\x18\x1b \x01(\x0b\x32\'.google.container.v1beta1.NetworkConfig\x12\x1b\n\x0fprivate_cluster\x18\x1c \x01(\x08\x42\x02\x18\x01\x12\"\n\x16master_ipv4_cidr_block\x18\x1d \x01(\tB\x02\x18\x01\x12P\n\x1b\x64\x65\x66\x61ult_max_pods_constraint\x18\x1e \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraint\x12Y\n\x1cresource_usage_export_config\x18! \x01(\x0b\x32\x33.google.container.v1beta1.ResourceUsageExportConfig\x12X\n\x1b\x61uthenticator_groups_config\x18\" \x01(\x0b\x32\x33.google.container.v1beta1.AuthenticatorGroupsConfig\x12N\n\x16private_cluster_config\x18% \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfig\x12R\n\x18vertical_pod_autoscaling\x18\' \x01(\x0b\x32\x30.google.container.v1beta1.VerticalPodAutoscaling\x12?\n\x0eshielded_nodes\x18( \x01(\x0b\x32\'.google.container.v1beta1.ShieldedNodes\x12\x41\n\x0frelease_channel\x18) \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12R\n\x18workload_identity_config\x18+ \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadIdentityConfig\x12M\n\x15workload_certificates\x18\x34 \x01(\x0b\x32..google.container.v1beta1.WorkloadCertificates\x12\x45\n\x11mesh_certificates\x18\x43 \x01(\x0b\x32*.google.container.v1beta1.MeshCertificates\x12J\n\x14workload_alts_config\x18\x35 \x01(\x0b\x32,.google.container.v1beta1.WorkloadALTSConfig\x12N\n\x16\x63ost_management_config\x18- \x01(\x0b\x32..google.container.v1beta1.CostManagementConfig\x12\x45\n\x11\x63luster_telemetry\x18. \x01(\x0b\x32*.google.container.v1beta1.ClusterTelemetry\x12;\n\ntpu_config\x18/ \x01(\x0b\x32#.google.container.v1beta1.TpuConfigB\x02\x18\x01\x12I\n\x13notification_config\x18\x31 \x01(\x0b\x32,.google.container.v1beta1.NotificationConfig\x12G\n\x12\x63onfidential_nodes\x18\x32 \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12P\n\x17identity_service_config\x18\x36 \x01(\x0b\x32/.google.container.v1beta1.IdentityServiceConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x65 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x15\n\x08\x65ndpoint\x18\x66 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17initial_cluster_version\x18g \x01(\t\x12#\n\x16\x63urrent_master_version\x18h \x01(\tB\x03\xe0\x41\x03\x12#\n\x14\x63urrent_node_version\x18i \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x63reate_time\x18j \x01(\tB\x03\xe0\x41\x03\x12=\n\x06status\x18k \x01(\x0e\x32(.google.container.v1beta1.Cluster.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18l \x01(\tB\x05\x18\x01\xe0\x41\x03\x12 \n\x13node_ipv4_cidr_size\x18m \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0\x41\x03\x12\"\n\x13instance_group_urls\x18o \x03(\tB\x05\x18\x01\xe0\x41\x03\x12!\n\x12\x63urrent_node_count\x18p \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x65xpire_time\x18q \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18r \x01(\tB\x03\xe0\x41\x03\x12\x16\n\nenable_tpu\x18s \x01(\x08\x42\x02\x18\x01\x12\"\n\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x05\x18\x01\xe0\x41\x03\x12I\n\x13\x64\x61tabase_encryption\x18& \x01(\x0b\x32,.google.container.v1beta1.DatabaseEncryption\x12=\n\nconditions\x18v \x03(\x0b\x32).google.container.v1beta1.StatusCondition\x12\x30\n\x06master\x18| \x01(\x0b\x32 .google.container.v1beta1.Master\x12\x37\n\tautopilot\x18\x80\x01 \x01(\x0b\x32#.google.container.v1beta1.Autopilot\x12\x10\n\x02id\x18\x81\x01 \x01(\tB\x03\xe0\x41\x03\x12L\n\x12node_pool_defaults\x18\x83\x01 \x01(\x0b\x32*.google.container.v1beta1.NodePoolDefaultsH\x00\x88\x01\x01\x12@\n\x0elogging_config\x18\x84\x01 \x01(\x0b\x32\'.google.container.v1beta1.LoggingConfig\x12\x46\n\x11monitoring_config\x18\x85\x01 \x01(\x0b\x32*.google.container.v1beta1.MonitoringConfig\x12L\n\x15node_pool_auto_config\x18\x88\x01 \x01(\x0b\x32,.google.container.v1beta1.NodePoolAutoConfig\x12I\n\x0eprotect_config\x18\x89\x01 \x01(\x0b\x32\'.google.container.v1beta1.ProtectConfigB\x02\x18\x01H\x01\x88\x01\x01\x12\x42\n\x0fpod_autoscaling\x18\x8a\x01 \x01(\x0b\x32(.google.container.v1beta1.PodAutoscaling\x12\r\n\x04\x65tag\x18\x8b\x01 \x01(\t\x12/\n\x05\x66leet\x18\x8c\x01 \x01(\x0b\x32\x1f.google.container.v1beta1.Fleet\x12Q\n\x17security_posture_config\x18\x91\x01 \x01(\x0b\x32/.google.container.v1beta1.SecurityPostureConfig\x12^\n\x1e\x63ontrol_plane_endpoints_config\x18\x92\x01 \x01(\x0b\x32\x35.google.container.v1beta1.ControlPlaneEndpointsConfig\x12\x46\n\x11\x65nterprise_config\x18\x95\x01 \x01(\x0b\x32*.google.container.v1beta1.EnterpriseConfig\x12M\n\x15secret_manager_config\x18\x96\x01 \x01(\x0b\x32-.google.container.v1beta1.SecretManagerConfig\x12U\n\x19\x63ompliance_posture_config\x18\x97\x01 \x01(\x0b\x32\x31.google.container.v1beta1.CompliancePostureConfig\x12 \n\rsatisfies_pzs\x18\x98\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12 \n\rsatisfies_pzi\x18\x99\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12W\n\x18user_managed_keys_config\x18\x9a\x01 \x01(\x0b\x32/.google.container.v1beta1.UserManagedKeysConfigH\x04\x88\x01\x01\x12N\n\x13rbac_binding_config\x18\x9c\x01 \x01(\x0b\x32+.google.container.v1beta1.RBACBindingConfigH\x05\x88\x01\x01\x12\x61\n\x1f\x61nonymous_authentication_config\x18\xa4\x01 \x01(\x0b\x32\x37.google.container.v1beta1.AnonymousAuthenticationConfig\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"w\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0f\n\x0bRECONCILING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x44\x45GRADED\x10\x06\x42\x15\n\x13_node_pool_defaultsB\x11\n\x0f_protect_configB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pziB\x1b\n\x19_user_managed_keys_configB\x16\n\x14_rbac_binding_config\"\xef\x01\n\x11RBACBindingConfig\x12;\n.enable_insecure_binding_system_unauthenticated\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n,enable_insecure_binding_system_authenticated\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x31\n/_enable_insecure_binding_system_unauthenticatedB/\n-_enable_insecure_binding_system_authenticated\"\xe9\x04\n\x15UserManagedKeysConfig\x12\x38\n\ncluster_ca\x18\n \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x39\n\x0b\x65tcd_api_ca\x18\x0b \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12:\n\x0c\x65tcd_peer_ca\x18\x0c \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12S\n\x1cservice_account_signing_keys\x18\r \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!service_account_verification_keys\x18\x0e \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12<\n\x0e\x61ggregation_ca\x18\x0f \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12X\n!control_plane_disk_encryption_key\x18\x10 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!gkeops_etcd_backup_encryption_key\x18\x11 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\x1f\n\x1d\x41nonymousAuthenticationConfig\"\xc4\x02\n\x17\x43ompliancePostureConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.CompliancePostureConfig.ModeH\x00\x88\x01\x01\x12\x62\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32\x44.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard\x1a\x38\n\x12\x43omplianceStandard\x12\x15\n\x08standard\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_standard\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\x07\n\x05_mode\"(\n\x10K8sBetaAPIConfig\x12\x14\n\x0c\x65nabled_apis\x18\x01 \x03(\t\"\xc4\x01\n\x0eWorkloadConfig\x12\x46\n\naudit_mode\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.WorkloadConfig.ModeH\x00\x88\x01\x01\"[\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x04\x12\x10\n\x08\x42\x41SELINE\x10\x02\x1a\x02\x08\x01\x12\x12\n\nRESTRICTED\x10\x03\x1a\x02\x08\x01\x42\r\n\x0b_audit_mode\"\xdb\x02\n\rProtectConfig\x12\x46\n\x0fworkload_config\x18\x01 \x01(\x0b\x32(.google.container.v1beta1.WorkloadConfigH\x00\x88\x01\x01\x12k\n\x1bworkload_vulnerability_mode\x18\x02 \x01(\x0e\x32\x41.google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityModeH\x01\x88\x01\x01\"a\n\x19WorkloadVulnerabilityMode\x12+\n\'WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x42\x12\n\x10_workload_configB\x1e\n\x1c_workload_vulnerability_mode\"\xb8\x03\n\x15SecurityPostureConfig\x12G\n\x04mode\x18\x01 \x01(\x0e\x32\x34.google.container.v1beta1.SecurityPostureConfig.ModeH\x00\x88\x01\x01\x12\x62\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32\x41.google.container.v1beta1.SecurityPostureConfig.VulnerabilityModeH\x01\x88\x01\x01\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\x42\x07\n\x05_modeB\x15\n\x13_vulnerability_mode\"^\n\x10NodePoolDefaults\x12J\n\x14node_config_defaults\x18\x01 \x01(\x0b\x32,.google.container.v1beta1.NodeConfigDefaults\"\xfb\x02\n\x12NodeConfigDefaults\x12\x39\n\x0bgcfs_config\x18\x01 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12G\n\x0elogging_config\x18\x03 \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x45\n\x11\x63ontainerd_config\x18\x04 \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12P\n\x17host_maintenance_policy\x18\x05 \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12H\n\x13node_kubelet_config\x18\x06 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\"\xb4\x02\n\x12NodePoolAutoConfig\x12;\n\x0cnetwork_tags\x18\x01 \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12L\n\x15resource_manager_tags\x18\x02 \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12H\n\x13node_kubelet_config\x18\x03 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12I\n\x11linux_node_config\x18\x04 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfigB\x03\xe0\x41\x03\"\xe4\x31\n\rClusterUpdate\x12\x1c\n\x14\x64\x65sired_node_version\x18\x04 \x01(\t\x12\"\n\x1a\x64\x65sired_monitoring_service\x18\x05 \x01(\t\x12\x45\n\x15\x64\x65sired_addons_config\x18\x06 \x01(\x0b\x32&.google.container.v1beta1.AddonsConfig\x12\x1c\n\x14\x64\x65sired_node_pool_id\x18\x07 \x01(\t\x12\x1a\n\x12\x64\x65sired_image_type\x18\x08 \x01(\t\x12T\n\x1d\x64\x65sired_node_pool_autoscaling\x18\t \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscaling\x12\x19\n\x11\x64\x65sired_locations\x18\n \x03(\t\x12o\n)desired_master_authorized_networks_config\x18\x0c \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12]\n\"desired_pod_security_policy_config\x18\x0e \x01(\x0b\x32\x31.google.container.v1beta1.PodSecurityPolicyConfig\x12Q\n\x1b\x64\x65sired_cluster_autoscaling\x18\x0f \x01(\x0b\x32,.google.container.v1beta1.ClusterAutoscaling\x12S\n\x1c\x64\x65sired_binary_authorization\x18\x10 \x01(\x0b\x32-.google.container.v1beta1.BinaryAuthorization\x12\x1f\n\x17\x64\x65sired_logging_service\x18\x13 \x01(\t\x12\x61\n$desired_resource_usage_export_config\x18\x15 \x01(\x0b\x32\x33.google.container.v1beta1.ResourceUsageExportConfig\x12Z\n desired_vertical_pod_autoscaling\x18\x16 \x01(\x0b\x32\x30.google.container.v1beta1.VerticalPodAutoscaling\x12Z\n\x1e\x64\x65sired_private_cluster_config\x18\x19 \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfigB\x02\x18\x01\x12\x61\n$desired_intra_node_visibility_config\x18\x1a \x01(\x0b\x32\x33.google.container.v1beta1.IntraNodeVisibilityConfig\x12P\n\x1b\x64\x65sired_default_snat_status\x18\x1c \x01(\x0b\x32+.google.container.v1beta1.DefaultSnatStatus\x12M\n\x19\x64\x65sired_cluster_telemetry\x18\x1e \x01(\x0b\x32*.google.container.v1beta1.ClusterTelemetry\x12I\n\x17\x64\x65sired_release_channel\x18\x1f \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12R\n\x16private_cluster_config\x18% \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfigB\x02\x18\x01\x12\x43\n\x12\x64\x65sired_tpu_config\x18& \x01(\x0b\x32#.google.container.v1beta1.TpuConfigB\x02\x18\x01\x12V\n\x1f\x64\x65sired_l4ilb_subsetting_config\x18\' \x01(\x0b\x32-.google.container.v1beta1.ILBSubsettingConfig\x12M\n\x19\x64\x65sired_datapath_provider\x18\x32 \x01(\x0e\x32*.google.container.v1beta1.DatapathProvider\x12]\n\"desired_private_ipv6_google_access\x18\x33 \x01(\x0e\x32\x31.google.container.v1beta1.PrivateIPv6GoogleAccess\x12Q\n\x1b\x64\x65sired_notification_config\x18\x37 \x01(\x0b\x32,.google.container.v1beta1.NotificationConfig\x12\x1e\n\x16\x64\x65sired_master_version\x18\x64 \x01(\t\x12\x41\n\x13\x64\x65sired_gcfs_config\x18m \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12Q\n\x1b\x64\x65sired_database_encryption\x18. \x01(\x0b\x32,.google.container.v1beta1.DatabaseEncryption\x12Z\n desired_workload_identity_config\x18/ \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadIdentityConfig\x12U\n\x1d\x64\x65sired_workload_certificates\x18= \x01(\x0b\x32..google.container.v1beta1.WorkloadCertificates\x12M\n\x19\x64\x65sired_mesh_certificates\x18\x43 \x01(\x0b\x32*.google.container.v1beta1.MeshCertificates\x12R\n\x1c\x64\x65sired_workload_alts_config\x18> \x01(\x0b\x32,.google.container.v1beta1.WorkloadALTSConfig\x12G\n\x16\x64\x65sired_shielded_nodes\x18\x30 \x01(\x0b\x32\'.google.container.v1beta1.ShieldedNodes\x12V\n\x1e\x64\x65sired_cost_management_config\x18\x31 \x01(\x0b\x32..google.container.v1beta1.CostManagementConfig\x12\x38\n\x0e\x64\x65sired_master\x18\x34 \x01(\x0b\x32 .google.container.v1beta1.Master\x12?\n\x12\x64\x65sired_dns_config\x18\x35 \x01(\x0b\x32#.google.container.v1beta1.DNSConfig\x12_\n#desired_service_external_ips_config\x18< \x01(\x0b\x32\x32.google.container.v1beta1.ServiceExternalIPsConfig\x12`\n#desired_authenticator_groups_config\x18? \x01(\x0b\x32\x33.google.container.v1beta1.AuthenticatorGroupsConfig\x12G\n\x16\x64\x65sired_logging_config\x18@ \x01(\x0b\x32\'.google.container.v1beta1.LoggingConfig\x12M\n\x19\x64\x65sired_monitoring_config\x18\x41 \x01(\x0b\x32*.google.container.v1beta1.MonitoringConfig\x12X\n\x1f\x64\x65sired_identity_service_config\x18\x42 \x01(\x0b\x32/.google.container.v1beta1.IdentityServiceConfig\x12\x30\n\x1f\x64\x65sired_enable_private_endpoint\x18G \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x31\n$desired_default_enable_private_nodes\x18H \x01(\x08H\x01\x88\x01\x01\x12\x65\n&desired_control_plane_endpoints_config\x18I \x01(\x0b\x32\x35.google.container.v1beta1.ControlPlaneEndpointsConfig\x12Y\n*desired_node_pool_auto_config_network_tags\x18n \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12P\n\x16\x64\x65sired_protect_config\x18p \x01(\x0b\x32\'.google.container.v1beta1.ProtectConfigB\x02\x18\x01H\x02\x88\x01\x01\x12I\n\x17\x64\x65sired_pod_autoscaling\x18q \x01(\x0b\x32(.google.container.v1beta1.PodAutoscaling\x12N\n\x1a\x64\x65sired_gateway_api_config\x18r \x01(\x0b\x32*.google.container.v1beta1.GatewayAPIConfig\x12\x0c\n\x04\x65tag\x18s \x01(\t\x12Y\n desired_node_pool_logging_config\x18t \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x36\n\rdesired_fleet\x18u \x01(\x0b\x32\x1f.google.container.v1beta1.Fleet\x12?\n\x12\x64\x65sired_stack_type\x18w \x01(\x0e\x32#.google.container.v1beta1.StackType\x12Y\n\x1c\x61\x64\x64itional_pod_ranges_config\x18x \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfig\x12\x61\n$removed_additional_pod_ranges_config\x18y \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfig\x12H\n\x14\x65nable_k8s_beta_apis\x18z \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12X\n\x1f\x64\x65sired_security_posture_config\x18| \x01(\x0b\x32/.google.container.v1beta1.SecurityPostureConfig\x12s\n\"desired_network_performance_config\x18} \x01(\x0b\x32G.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig\x12/\n\"desired_enable_fqdn_network_policy\x18~ \x01(\x08H\x03\x88\x01\x01\x12\x61\n(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\x0b\x32..google.container.v1beta1.WorkloadPolicyConfig\x12J\n\x15\x64\x65sired_k8s_beta_apis\x18\x83\x01 \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12Y\n\x1f\x64\x65sired_host_maintenance_policy\x18\x84\x01 \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12N\n\x19\x64\x65sired_containerd_config\x18\x86\x01 \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12-\n\x1f\x64\x65sired_enable_multi_networking\x18\x87\x01 \x01(\x08H\x04\x88\x01\x01\x12k\n3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12g\n$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e\x32\x33.google.container.v1beta1.InTransitEncryptionConfigH\x05\x88\x01\x01\x12>\n0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\x08H\x06\x88\x01\x01\x12Z\n\x1d\x64\x65sired_secret_manager_config\x18\x8b\x01 \x01(\x0b\x32-.google.container.v1beta1.SecretManagerConfigH\x07\x88\x01\x01\x12\x62\n!desired_compliance_posture_config\x18\x8c\x01 \x01(\x0b\x32\x31.google.container.v1beta1.CompliancePostureConfigH\x08\x88\x01\x01\x12Q\n\x1b\x64\x65sired_node_kubelet_config\x18\x8d\x01 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12\x62\n,desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12R\n\x18user_managed_keys_config\x18\x8f\x01 \x01(\x0b\x32/.google.container.v1beta1.UserManagedKeysConfig\x12V\n\x1b\x64\x65sired_rbac_binding_config\x18\x90\x01 \x01(\x0b\x32+.google.container.v1beta1.RBACBindingConfigH\t\x88\x01\x01\x12U\n\x19\x64\x65sired_enterprise_config\x18\x93\x01 \x01(\x0b\x32\x31.google.container.v1beta1.DesiredEnterpriseConfig\x12;\n-desired_disable_l4_lb_firewall_reconciliation\x18\x95\x01 \x01(\x08H\n\x88\x01\x01\x12\x63\n/desired_node_pool_auto_config_linux_node_config\x18\x96\x01 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12i\n\'desired_anonymous_authentication_config\x18\x9c\x01 \x01(\x0b\x32\x37.google.container.v1beta1.AnonymousAuthenticationConfigB\"\n _desired_enable_private_endpointB\'\n%_desired_default_enable_private_nodesB\x19\n\x17_desired_protect_configB%\n#_desired_enable_fqdn_network_policyB\"\n _desired_enable_multi_networkingB\'\n%_desired_in_transit_encryption_configB3\n1_desired_enable_cilium_clusterwide_network_policyB \n\x1e_desired_secret_manager_configB$\n\"_desired_compliance_posture_configB\x1e\n\x1c_desired_rbac_binding_configB0\n._desired_disable_l4_lb_firewall_reconciliation\"v\n\x19\x41\x64\x64itionalPodRangesConfig\x12\x17\n\x0fpod_range_names\x18\x01 \x03(\t\x12@\n\x0epod_range_info\x18\x02 \x03(\x0b\x32#.google.container.v1beta1.RangeInfoB\x03\xe0\x41\x03\">\n\tRangeInfo\x12\x17\n\nrange_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0butilization\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"g\n\x17\x44\x65siredEnterpriseConfig\x12L\n\x0c\x64\x65sired_tier\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTier\"\xfd\x08\n\tOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x45\n\x0eoperation_type\x18\x03 \x01(\x0e\x32(.google.container.v1beta1.Operation.TypeB\x03\xe0\x41\x03\x12?\n\x06status\x18\x04 \x01(\x0e\x32*.google.container.v1beta1.Operation.StatusB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x16\n\tself_link\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0btarget_link\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nstart_time\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_time\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x08progress\x18\x0c \x01(\x0b\x32+.google.container.v1beta1.OperationProgressB\x03\xe0\x41\x03\x12I\n\x12\x63luster_conditions\x18\r \x03(\x0b\x32).google.container.v1beta1.StatusConditionB\x02\x18\x01\x12J\n\x13nodepool_conditions\x18\x0e \x03(\x0b\x32).google.container.v1beta1.StatusConditionB\x02\x18\x01\x12!\n\x05\x65rror\x18\x0f \x01(\x0b\x32\x12.google.rpc.Status\"R\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x41\x42ORTING\x10\x04\"\xc0\x03\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43REATE_CLUSTER\x10\x01\x12\x12\n\x0e\x44\x45LETE_CLUSTER\x10\x02\x12\x12\n\x0eUPGRADE_MASTER\x10\x03\x12\x11\n\rUPGRADE_NODES\x10\x04\x12\x12\n\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n\x10\x43REATE_NODE_POOL\x10\x07\x12\x14\n\x10\x44\x45LETE_NODE_POOL\x10\x08\x12\x1c\n\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n\x11\x41UTO_REPAIR_NODES\x10\n\x12\x1a\n\x12\x41UTO_UPGRADE_NODES\x10\x0b\x1a\x02\x08\x01\x12\x12\n\nSET_LABELS\x10\x0c\x1a\x02\x08\x01\x12\x17\n\x0fSET_MASTER_AUTH\x10\r\x1a\x02\x08\x01\x12\x16\n\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\x08\x01\x12\x1e\n\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\x08\x01\x12\x12\n\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n\x15\x46LEET_FEATURE_UPGRADE\x10\x13\"\xca\x02\n\x11OperationProgress\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x06status\x18\x02 \x01(\x0e\x32*.google.container.v1beta1.Operation.Status\x12\x43\n\x07metrics\x18\x03 \x03(\x0b\x32\x32.google.container.v1beta1.OperationProgress.Metric\x12;\n\x06stages\x18\x04 \x03(\x0b\x32+.google.container.v1beta1.OperationProgress\x1ai\n\x06Metric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\tint_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\x42\x07\n\x05value\"\x89\x01\n\x14\x43reateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x37\n\x07\x63luster\x18\x03 \x01(\x0b\x32!.google.container.v1beta1.ClusterB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"c\n\x11GetClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xa4\x01\n\x14UpdateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12<\n\x06update\x18\x04 \x01(\x0b\x32\'.google.container.v1beta1.ClusterUpdateB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xa6\r\n\x15UpdateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x19\n\x0cnode_version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nimage_type\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tlocations\x18\r \x03(\t\x12R\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadMetadataConfig\x12\x0c\n\x04name\x18\x08 \x01(\t\x12L\n\x10upgrade_settings\x18\x0f \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12\x33\n\x04tags\x18\x10 \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12\x34\n\x06taints\x18\x11 \x01(\x0b\x32$.google.container.v1beta1.NodeTaints\x12\x34\n\x06labels\x18\x12 \x01(\x0b\x32$.google.container.v1beta1.NodeLabels\x12\x44\n\x11linux_node_config\x18\x13 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12\x43\n\x0ekubelet_config\x18\x14 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12H\n\x13node_network_config\x18\x15 \x01(\x0b\x32+.google.container.v1beta1.NodeNetworkConfig\x12\x39\n\x0bgcfs_config\x18\x16 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12G\n\x12\x63onfidential_nodes\x18\x17 \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12\x33\n\x05gvnic\x18\x1d \x01(\x0b\x32$.google.container.v1beta1.VirtualNIC\x12\x0c\n\x04\x65tag\x18\x1e \x01(\t\x12\x39\n\x0b\x66\x61st_socket\x18\x1f \x01(\x0b\x32$.google.container.v1beta1.FastSocket\x12G\n\x0elogging_config\x18 \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x41\n\x0fresource_labels\x18! \x01(\x0b\x32(.google.container.v1beta1.ResourceLabels\x12H\n\x13windows_node_config\x18\" \x01(\x0b\x32+.google.container.v1beta1.WindowsNodeConfig\x12\x41\n\x0c\x61\x63\x63\x65lerators\x18# \x03(\x0b\x32+.google.container.v1beta1.AcceleratorConfig\x12\x19\n\x0cmachine_type\x18$ \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18% \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isk_size_gb\x18& \x01(\x03\x42\x03\xe0\x41\x01\x12L\n\x15resource_manager_tags\x18\' \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12\x45\n\x11\x63ontainerd_config\x18( \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12R\n\x13queued_provisioning\x18* \x01(\x0b\x32\x35.google.container.v1beta1.NodePool.QueuedProvisioning\x12\x15\n\rstorage_pools\x18+ \x03(\t\x12\x33\n\x10max_run_duration\x18- \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\nflex_start\x18. \x01(\x08H\x00\x88\x01\x01\x42\r\n\x0b_flex_start\"\xd2\x01\n\x1dSetNodePoolAutoscalingRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12G\n\x0b\x61utoscaling\x18\x05 \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscalingB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x88\x01\n\x18SetLoggingServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1c\n\x0flogging_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x8e\x01\n\x1bSetMonitoringServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xac\x01\n\x16SetAddonsConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x42\n\raddons_config\x18\x04 \x01(\x0b\x32&.google.container.v1beta1.AddonsConfigB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"}\n\x13SetLocationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\tlocations\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x82\x01\n\x13UpdateMasterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1b\n\x0emaster_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xbf\x02\n\x14SetMasterAuthRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12J\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x35.google.container.v1beta1.SetMasterAuthRequest.ActionB\x03\xe0\x41\x02\x12\x39\n\x06update\x18\x05 \x01(\x0b\x32$.google.container.v1beta1.MasterAuthB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"P\n\x06\x41\x63tion\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cSET_PASSWORD\x10\x01\x12\x15\n\x11GENERATE_PASSWORD\x10\x02\x12\x10\n\x0cSET_USERNAME\x10\x03\"f\n\x14\x44\x65leteClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"O\n\x13ListClustersRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"b\n\x14ListClustersResponse\x12\x33\n\x08\x63lusters\x18\x01 \x03(\x0b\x32!.google.container.v1beta1.Cluster\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"g\n\x13GetOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"Q\n\x15ListOperationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"j\n\x16\x43\x61ncelOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"h\n\x16ListOperationsResponse\x12\x37\n\noperations\x18\x01 \x03(\x0b\x32#.google.container.v1beta1.Operation\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"P\n\x16GetServerConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"\x89\x06\n\x0cServerConfig\x12\x1f\n\x17\x64\x65\x66\x61ult_cluster_version\x18\x01 \x01(\t\x12\x1b\n\x13valid_node_versions\x18\x03 \x03(\t\x12\x1a\n\x12\x64\x65\x66\x61ult_image_type\x18\x04 \x01(\t\x12\x19\n\x11valid_image_types\x18\x05 \x03(\t\x12\x1d\n\x15valid_master_versions\x18\x06 \x03(\t\x12M\n\x08\x63hannels\x18\t \x03(\x0b\x32;.google.container.v1beta1.ServerConfig.ReleaseChannelConfig\x12\\\n\x14windows_version_maps\x18\n \x03(\x0b\x32>.google.container.v1beta1.ServerConfig.WindowsVersionMapsEntry\x1a\xd1\x02\n\x14ReleaseChannelConfig\x12\x41\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.ReleaseChannel.Channel\x12\x17\n\x0f\x64\x65\x66\x61ult_version\x18\x02 \x01(\t\x12l\n\x12\x61vailable_versions\x18\x03 \x03(\x0b\x32L.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersionB\x02\x18\x01\x12\x16\n\x0evalid_versions\x18\x04 \x03(\t\x12\x1e\n\x16upgrade_target_version\x18\x05 \x01(\t\x1a\x37\n\x10\x41vailableVersion\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t:\x02\x18\x01\x1a\x64\n\x17WindowsVersionMapsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.container.v1beta1.WindowsVersions:\x02\x38\x01\"F\n\x16\x42\x65stEffortProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x13min_provision_nodes\x18\x02 \x01(\x05\"\xcc\x01\n\x0fWindowsVersions\x12R\n\x10windows_versions\x18\x01 \x03(\x0b\x32\x38.google.container.v1beta1.WindowsVersions.WindowsVersion\x1a\x65\n\x0eWindowsVersion\x12\x12\n\nimage_type\x18\x01 \x01(\t\x12\x12\n\nos_version\x18\x02 \x01(\t\x12+\n\x10support_end_date\x18\x03 \x01(\x0b\x32\x11.google.type.Date\"\xa5\x01\n\x15\x43reateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12:\n\tnode_pool\x18\x04 \x01(\x0b\x32\".google.container.v1beta1.NodePoolB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x06 \x01(\t\"\x81\x01\n\x15\x44\x65leteNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"h\n\x14ListNodePoolsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x05 \x01(\t\"~\n\x12GetNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xa9\x04\n\x11\x42lueGreenSettings\x12\x64\n\x17standard_rollout_policy\x18\x01 \x01(\x0b\x32\x41.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicyH\x00\x12h\n\x19\x61utoscaled_rollout_policy\x18\x03 \x01(\x0b\x32\x43.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicyH\x00\x12?\n\x17node_pool_soak_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x1a\xb9\x01\n\x15StandardRolloutPolicy\x12\x1a\n\x10\x62\x61tch_percentage\x18\x01 \x01(\x02H\x00\x12\x1a\n\x10\x62\x61tch_node_count\x18\x02 \x01(\x05H\x00\x12;\n\x13\x62\x61tch_soak_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\x13\n\x11update_batch_sizeB\x16\n\x14_batch_soak_duration\x1a\x19\n\x17\x41utoscaledRolloutPolicyB\x10\n\x0erollout_policyB\x1a\n\x18_node_pool_soak_duration\"\xc1\x11\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x63onfig\x18\x02 \x01(\x0b\x32$.google.container.v1beta1.NodeConfig\x12\x1a\n\x12initial_node_count\x18\x03 \x01(\x05\x12\x11\n\tlocations\x18\r \x03(\t\x12\x43\n\x0enetwork_config\x18\x0e \x01(\x0b\x32+.google.container.v1beta1.NodeNetworkConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x65 \x01(\t\x12 \n\x13instance_group_urls\x18\x66 \x03(\tB\x03\xe0\x41\x03\x12>\n\x06status\x18g \x01(\x0e\x32).google.container.v1beta1.NodePool.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18h \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x42\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscaling\x12<\n\nmanagement\x18\x05 \x01(\x0b\x32(.google.container.v1beta1.NodeManagement\x12H\n\x13max_pods_constraint\x18\x06 \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraint\x12=\n\nconditions\x18i \x03(\x0b\x32).google.container.v1beta1.StatusCondition\x12\x1f\n\x12pod_ipv4_cidr_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12L\n\x10upgrade_settings\x18k \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12L\n\x10placement_policy\x18l \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.PlacementPolicy\x12G\n\x0bupdate_info\x18m \x01(\x0b\x32-.google.container.v1beta1.NodePool.UpdateInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18n \x01(\t\x12R\n\x13queued_provisioning\x18p \x01(\x0b\x32\x35.google.container.v1beta1.NodePool.QueuedProvisioning\x12R\n\x18\x62\x65st_effort_provisioning\x18q \x01(\x0b\x32\x30.google.container.v1beta1.BestEffortProvisioning\x1a\xfa\x01\n\x0fUpgradeSettings\x12\x11\n\tmax_surge\x18\x01 \x01(\x05\x12\x17\n\x0fmax_unavailable\x18\x02 \x01(\x05\x12G\n\x08strategy\x18\x03 \x01(\x0e\x32\x30.google.container.v1beta1.NodePoolUpdateStrategyH\x00\x88\x01\x01\x12M\n\x13\x62lue_green_settings\x18\x04 \x01(\x0b\x32+.google.container.v1beta1.BlueGreenSettingsH\x01\x88\x01\x01\x42\x0b\n\t_strategyB\x16\n\x14_blue_green_settings\x1a\xb2\x04\n\nUpdateInfo\x12T\n\x0f\x62lue_green_info\x18\x01 \x01(\x0b\x32;.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo\x1a\xcd\x03\n\rBlueGreenInfo\x12P\n\x05phase\x18\x01 \x01(\x0e\x32\x41.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase\x12 \n\x18\x62lue_instance_group_urls\x18\x02 \x03(\t\x12!\n\x19green_instance_group_urls\x18\x03 \x03(\t\x12%\n\x1d\x62lue_pool_deletion_start_time\x18\x04 \x01(\t\x12\x1a\n\x12green_pool_version\x18\x05 \x01(\t\"\xe1\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUPDATE_STARTED\x10\x01\x12\x17\n\x13\x43REATING_GREEN_POOL\x10\x02\x12\x17\n\x13\x43ORDONING_BLUE_POOL\x10\x03\x12\x1e\n\x1aWAITING_TO_DRAIN_BLUE_POOL\x10\x08\x12\x16\n\x12\x44RAINING_BLUE_POOL\x10\x04\x12\x15\n\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n\x12\x44\x45LETING_BLUE_POOL\x10\x06\x12\x14\n\x10ROLLBACK_STARTED\x10\x07\x1a\xae\x01\n\x0fPlacementPolicy\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.container.v1beta1.NodePool.PlacementPolicy.Type\x12\x14\n\x0ctpu_topology\x18\x02 \x01(\t\x12\x13\n\x0bpolicy_name\x18\x03 \x01(\t\")\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMPACT\x10\x01\x1a%\n\x12QueuedProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x16\n\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n\x0bRECONCILING\x10\x04\x12\x0c\n\x08STOPPING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\"\x82\x01\n\x0eNodeManagement\x12\x14\n\x0c\x61uto_upgrade\x18\x01 \x01(\x08\x12\x13\n\x0b\x61uto_repair\x18\x02 \x01(\x08\x12\x45\n\x0fupgrade_options\x18\n \x01(\x0b\x32,.google.container.v1beta1.AutoUpgradeOptions\"T\n\x12\x41utoUpgradeOptions\x12$\n\x17\x61uto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"j\n\x11MaintenancePolicy\x12;\n\x06window\x18\x01 \x01(\x0b\x32+.google.container.v1beta1.MaintenanceWindow\x12\x18\n\x10resource_version\x18\x03 \x01(\t\"\x8a\x03\n\x11MaintenanceWindow\x12T\n\x18\x64\x61ily_maintenance_window\x18\x02 \x01(\x0b\x32\x30.google.container.v1beta1.DailyMaintenanceWindowH\x00\x12I\n\x10recurring_window\x18\x03 \x01(\x0b\x32-.google.container.v1beta1.RecurringTimeWindowH\x00\x12\x66\n\x16maintenance_exclusions\x18\x04 \x03(\x0b\x32\x46.google.container.v1beta1.MaintenanceWindow.MaintenanceExclusionsEntry\x1a\x62\n\x1aMaintenanceExclusionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.google.container.v1beta1.TimeWindow:\x02\x38\x01\x42\x08\n\x06policy\"\xd5\x01\n\nTimeWindow\x12^\n\x1dmaintenance_exclusion_options\x18\x03 \x01(\x0b\x32\x35.google.container.v1beta1.MaintenanceExclusionOptionsH\x00\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07options\"\xb9\x01\n\x1bMaintenanceExclusionOptions\x12J\n\x05scope\x18\x01 \x01(\x0e\x32;.google.container.v1beta1.MaintenanceExclusionOptions.Scope\"N\n\x05Scope\x12\x0f\n\x0bNO_UPGRADES\x10\x00\x12\x15\n\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"_\n\x13RecurringTimeWindow\x12\x34\n\x06window\x18\x01 \x01(\x0b\x32$.google.container.v1beta1.TimeWindow\x12\x12\n\nrecurrence\x18\x02 \x01(\t\"C\n\x16\x44\x61ilyMaintenanceWindow\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x15\n\x08\x64uration\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcb\x01\n\x1cSetNodePoolManagementRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x41\n\nmanagement\x18\x05 \x01(\x0b\x32(.google.container.v1beta1.NodeManagementB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\x9b\x01\n\x16SetNodePoolSizeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x17\n\nnode_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\".\n\x1e\x43ompleteNodePoolUpgradeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9f\x01\n\x1eRollbackNodePoolUpgradeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0brespect_pdb\x18\x07 \x01(\x08\"O\n\x15ListNodePoolsResponse\x12\x36\n\nnode_pools\x18\x01 \x03(\x0b\x32\".google.container.v1beta1.NodePool\"\xbe\x03\n\x12\x43lusterAutoscaling\x12$\n\x1c\x65nable_node_autoprovisioning\x18\x01 \x01(\x08\x12@\n\x0fresource_limits\x18\x02 \x03(\x0b\x32\'.google.container.v1beta1.ResourceLimit\x12\\\n\x13\x61utoscaling_profile\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile\x12g\n#autoprovisioning_node_pool_defaults\x18\x04 \x01(\x0b\x32:.google.container.v1beta1.AutoprovisioningNodePoolDefaults\x12\"\n\x1a\x61utoprovisioning_locations\x18\x05 \x03(\t\"U\n\x12\x41utoscalingProfile\x12\x17\n\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n\x14OPTIMIZE_UTILIZATION\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\"\x87\x04\n AutoprovisioningNodePoolDefaults\x12\x14\n\x0coauth_scopes\x18\x01 \x03(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12L\n\x10upgrade_settings\x18\x03 \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12<\n\nmanagement\x18\x04 \x01(\x0b\x32(.google.container.v1beta1.NodeManagement\x12\x1c\n\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x05\x12\x11\n\tdisk_type\x18\x07 \x01(\t\x12R\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32\x30.google.container.v1beta1.ShieldedInstanceConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\t \x01(\t\x12\x12\n\nimage_type\x18\n \x01(\t\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\r \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"H\n\rResourceLimit\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x0f\n\x07minimum\x18\x02 \x01(\x03\x12\x0f\n\x07maximum\x18\x03 \x01(\x03\"\xcc\x02\n\x13NodePoolAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\x12\x17\n\x0f\x61utoprovisioned\x18\x04 \x01(\x08\x12U\n\x0flocation_policy\x18\x05 \x01(\x0e\x32<.google.container.v1beta1.NodePoolAutoscaling.LocationPolicy\x12\x1c\n\x14total_min_node_count\x18\x06 \x01(\x05\x12\x1c\n\x14total_max_node_count\x18\x07 \x01(\x05\"H\n\x0eLocationPolicy\x12\x1f\n\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"\x97\x02\n\x10SetLabelsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\\\n\x0fresource_labels\x18\x04 \x03(\x0b\x32>.google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0\x41\x02\x12\x1e\n\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x14SetLegacyAbacRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x84\x01\n\x16StartIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x1a\n\x12rotate_credentials\x18\x07 \x01(\x08\"k\n\x19\x43ompleteIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xfc\x02\n\x11\x41\x63\x63\x65leratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x12+\n\x1fmax_time_shared_clients_per_gpu\x18\x04 \x01(\x03\x42\x02\x18\x01\x12K\n\x12gpu_sharing_config\x18\x05 \x01(\x0b\x32*.google.container.v1beta1.GPUSharingConfigH\x00\x88\x01\x01\x12\x62\n\x1egpu_driver_installation_config\x18\x06 \x01(\x0b\x32\x35.google.container.v1beta1.GPUDriverInstallationConfigH\x01\x88\x01\x01\x42\x15\n\x13_gpu_sharing_configB!\n\x1f_gpu_driver_installation_config\"\x88\x02\n\x10GPUSharingConfig\x12\"\n\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03\x12`\n\x14gpu_sharing_strategy\x18\x02 \x01(\x0e\x32=.google.container.v1beta1.GPUSharingConfig.GPUSharingStrategyH\x00\x88\x01\x01\"U\n\x12GPUSharingStrategy\x12$\n GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n\x0cTIME_SHARING\x10\x01\x12\x07\n\x03MPS\x10\x02\x42\x17\n\x15_gpu_sharing_strategy\"\x89\x02\n\x1bGPUDriverInstallationConfig\x12g\n\x12gpu_driver_version\x18\x01 \x01(\x0e\x32\x46.google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersionH\x00\x88\x01\x01\"j\n\x10GPUDriverVersion\x12\"\n\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n\x15INSTALLATION_DISABLED\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\n\n\x06LATEST\x10\x03\x42\x15\n\x13_gpu_driver_version\"z\n\x17ManagedPrometheusConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12N\n\x16\x61uto_monitoring_config\x18\x02 \x01(\x0b\x32..google.container.v1beta1.AutoMonitoringConfig\"\x8e\x01\n\x14\x41utoMonitoringConfig\x12\x43\n\x05scope\x18\x01 \x01(\x0e\x32\x34.google.container.v1beta1.AutoMonitoringConfig.Scope\"1\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x08\n\x04NONE\x10\x02\"\xcb\x02\n\x16WorkloadMetadataConfig\x12X\n\rnode_metadata\x18\x01 \x01(\x0e\x32=.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadataB\x02\x18\x01\x12\x43\n\x04mode\x18\x02 \x01(\x0e\x32\x35.google.container.v1beta1.WorkloadMetadataConfig.Mode\"P\n\x0cNodeMetadata\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06SECURE\x10\x01\x12\n\n\x06\x45XPOSE\x10\x02\x12\x17\n\x13GKE_METADATA_SERVER\x10\x03\"@\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCE_METADATA\x10\x01\x12\x10\n\x0cGKE_METADATA\x10\x02\"\xaf\x01\n\x17SetNetworkPolicyRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x44\n\x0enetwork_policy\x18\x04 \x01(\x0b\x32\'.google.container.v1beta1.NetworkPolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xbe\x01\n\x1bSetMaintenancePolicyRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12L\n\x12maintenance_policy\x18\x04 \x01(\x0b\x32+.google.container.v1beta1.MaintenancePolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"+\n\x14ListLocationsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"g\n\x15ListLocationsResponse\x12\x35\n\tlocations\x18\x01 \x03(\x0b\x32\".google.container.v1beta1.Location\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x08Location\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.container.v1beta1.Location.LocationType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0brecommended\x18\x03 \x01(\x08\"C\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04ZONE\x10\x01\x12\n\n\x06REGION\x10\x02\"\xe0\x02\n\x0fStatusCondition\x12@\n\x04\x63ode\x18\x01 \x01(\x0e\x32..google.container.v1beta1.StatusCondition.CodeB\x02\x18\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12(\n\x0e\x63\x61nonical_code\x18\x03 \x01(\x0e\x32\x10.google.rpc.Code\"\xcf\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cGCE_STOCKOUT\x10\x01\x12\x1f\n\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n\x13\x43LOUD_KMS_KEY_ERROR\x10\x07\x12\x0f\n\x0b\x43\x41_EXPIRING\x10\t\x12,\n(NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS\x10\n\x1a\x02\x18\x01\"\x92\x0b\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x1c\x65nable_intra_node_visibility\x18\x05 \x01(\x08\x12H\n\x13\x64\x65\x66\x61ult_snat_status\x18\x07 \x01(\x0b\x32+.google.container.v1beta1.DefaultSnatStatus\x12\x1f\n\x17\x65nable_l4ilb_subsetting\x18\n \x01(\x08\x12\x45\n\x11\x64\x61tapath_provider\x18\x0b \x01(\x0e\x32*.google.container.v1beta1.DatapathProvider\x12U\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32\x31.google.container.v1beta1.PrivateIPv6GoogleAccess\x12\x37\n\ndns_config\x18\r \x01(\x0b\x32#.google.container.v1beta1.DNSConfig\x12W\n\x1bservice_external_ips_config\x18\x0f \x01(\x0b\x32\x32.google.container.v1beta1.ServiceExternalIPsConfig\x12\x46\n\x12gateway_api_config\x18\x10 \x01(\x0b\x32*.google.container.v1beta1.GatewayAPIConfig\x12\x1f\n\x17\x65nable_multi_networking\x18\x11 \x01(\x08\x12k\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32G.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig\x12\'\n\x1a\x65nable_fqdn_network_policy\x18\x13 \x01(\x08H\x00\x88\x01\x01\x12^\n\x1cin_transit_encryption_config\x18\x14 \x01(\x0e\x32\x33.google.container.v1beta1.InTransitEncryptionConfigH\x01\x88\x01\x01\x12\x35\n(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\x08H\x02\x88\x01\x01\x12)\n\x1c\x64\x65\x66\x61ult_enable_private_nodes\x18\x16 \x01(\x08H\x03\x88\x01\x01\x12\x32\n%disable_l4_lb_firewall_reconciliation\x18\x18 \x01(\x08H\x04\x88\x01\x01\x1a\xe3\x01\n\x1f\x43lusterNetworkPerformanceConfig\x12v\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32L.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x1d\n\x1b_enable_fqdn_network_policyB\x1f\n\x1d_in_transit_encryption_configB+\n)_enable_cilium_clusterwide_network_policyB\x1f\n\x1d_default_enable_private_nodesB(\n&_disable_l4_lb_firewall_reconciliation\"\xc5\x01\n\x10GatewayAPIConfig\x12\x43\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x32.google.container.v1beta1.GatewayAPIConfig.Channel\"l\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HANNEL_DISABLED\x10\x01\x12\x1c\n\x14\x43HANNEL_EXPERIMENTAL\x10\x03\x1a\x02\x08\x01\x12\x14\n\x10\x43HANNEL_STANDARD\x10\x04\"+\n\x18ServiceExternalIPsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"j\n\x1cListUsableSubnetworksRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"y\n\x1dListUsableSubnetworksResponse\x12?\n\x0bsubnetworks\x18\x01 \x03(\x0b\x32*.google.container.v1beta1.UsableSubnetwork\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x85\x02\n\x1eUsableSubnetworkSecondaryRange\x12\x12\n\nrange_name\x18\x01 \x01(\t\x12\x15\n\rip_cidr_range\x18\x02 \x01(\t\x12O\n\x06status\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.UsableSubnetworkSecondaryRange.Status\"g\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x12\n\x0eIN_USE_SERVICE\x10\x02\x12\x18\n\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n\x12IN_USE_MANAGED_POD\x10\x04\"\xbd\x01\n\x10UsableSubnetwork\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12U\n\x13secondary_ip_ranges\x18\x04 \x03(\x0b\x32\x38.google.container.v1beta1.UsableSubnetworkSecondaryRange\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\")\n\x16VerticalPodAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x11\x44\x65\x66\x61ultSnatStatus\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x19IntraNodeVisibilityConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"&\n\x13ILBSubsettingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x03\n\tDNSConfig\x12\x41\n\x0b\x63luster_dns\x18\x01 \x01(\x0e\x32,.google.container.v1beta1.DNSConfig.Provider\x12G\n\x11\x63luster_dns_scope\x18\x02 \x01(\x0e\x32,.google.container.v1beta1.DNSConfig.DNSScope\x12\x1a\n\x12\x63luster_dns_domain\x18\x03 \x01(\t\x12*\n\x1d\x61\x64\x64itive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n\x10PLATFORM_DEFAULT\x10\x01\x12\r\n\tCLOUD_DNS\x10\x02\x12\x0c\n\x08KUBE_DNS\x10\x03\"G\n\x08\x44NSScope\x12\x19\n\x15\x44NS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rCLUSTER_SCOPE\x10\x01\x12\r\n\tVPC_SCOPE\x10\x02\".\n\x11MaxPodsConstraint\x12\x19\n\x11max_pods_per_node\x18\x01 \x01(\x03\"j\n\x16WorkloadIdentityConfig\x12\x1e\n\x12identity_namespace\x18\x01 \x01(\tB\x02\x18\x01\x12\x15\n\rworkload_pool\x18\x02 \x01(\t\x12\x19\n\x11identity_provider\x18\x03 \x01(\t\"E\n\x12WorkloadALTSConfig\x12/\n\x0b\x65nable_alts\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"O\n\x14WorkloadCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"K\n\x10MeshCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"\xf2\x05\n\x12\x44\x61tabaseEncryption\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32\x32.google.container.v1beta1.DatabaseEncryption.State\x12Z\n\rcurrent_state\x18\x03 \x01(\x0e\x32\x39.google.container.v1beta1.DatabaseEncryption.CurrentStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x63ryption_keys\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12_\n\x15last_operation_errors\x18\x05 \x03(\x0b\x32;.google.container.v1beta1.DatabaseEncryption.OperationErrorB\x03\xe0\x41\x03\x1ah\n\x0eOperationError\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"2\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tENCRYPTED\x10\x01\x12\r\n\tDECRYPTED\x10\x02\"\xfb\x01\n\x0c\x43urrentState\x12\x1d\n\x19\x43URRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43URRENT_STATE_ENCRYPTED\x10\x07\x12\x1b\n\x17\x43URRENT_STATE_DECRYPTED\x10\x02\x12$\n CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n\x1e\x43URRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n\x1e\x43URRENT_STATE_DECRYPTION_ERROR\x10\x06\x42\x10\n\x0e_current_state\"\xf7\x02\n\x19ResourceUsageExportConfig\x12\x65\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32G.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination\x12&\n\x1e\x65nable_network_egress_metering\x18\x02 \x01(\x08\x12r\n\x1b\x63onsumption_metering_config\x18\x03 \x01(\x0b\x32M.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig\x1a)\n\x13\x42igQueryDestination\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a,\n\x19\x43onsumptionMeteringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\" \n\rShieldedNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nVirtualNIC\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nFastSocket\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x16GetOpenIDConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"\xdf\x02\n\x17GetOpenIDConfigResponse\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x1a\n\x08jwks_uri\x18\x02 \x01(\tR\x08jwks_uri\x12:\n\x18response_types_supported\x18\x03 \x03(\tR\x18response_types_supported\x12\x38\n\x17subject_types_supported\x18\x04 \x03(\tR\x17subject_types_supported\x12T\n%id_token_signing_alg_values_supported\x18\x05 \x03(\tR%id_token_signing_alg_values_supported\x12*\n\x10\x63laims_supported\x18\x06 \x03(\tR\x10\x63laims_supported\x12 \n\x0bgrant_types\x18\x07 \x03(\tR\x0bgrant_types\"\'\n\x15GetJSONWebKeysRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"r\n\x03Jwk\x12\x0b\n\x03kty\x18\x01 \x01(\t\x12\x0b\n\x03\x61lg\x18\x02 \x01(\t\x12\x0b\n\x03use\x18\x03 \x01(\t\x12\x0b\n\x03kid\x18\x04 \x01(\t\x12\t\n\x01n\x18\x05 \x01(\t\x12\t\n\x01\x65\x18\x06 \x01(\t\x12\t\n\x01x\x18\x07 \x01(\t\x12\t\n\x01y\x18\x08 \x01(\t\x12\x0b\n\x03\x63rv\x18\t \x01(\t\"E\n\x16GetJSONWebKeysResponse\x12+\n\x04keys\x18\x01 \x03(\x0b\x32\x1d.google.container.v1beta1.Jwk\"2\n\"CheckAutopilotCompatibilityRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x81\x03\n\x1b\x41utopilotCompatibilityIssue\x12\x34\n\x10last_observation\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onstraint_type\x18\x02 \x01(\t\x12]\n\x14incompatibility_type\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.AutopilotCompatibilityIssue.IssueType\x12\x10\n\x08subjects\x18\x04 \x03(\t\x12\x19\n\x11\x64ocumentation_url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"r\n\tIssueType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n\x1a\x41\x44\x44ITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"}\n#CheckAutopilotCompatibilityResponse\x12\x45\n\x06issues\x18\x01 \x03(\x0b\x32\x35.google.container.v1beta1.AutopilotCompatibilityIssue\x12\x0f\n\x07summary\x18\x02 \x01(\t\"\xa1\x01\n\x0eReleaseChannel\x12\x41\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.ReleaseChannel.Channel\"L\n\x07\x43hannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05RAPID\x10\x01\x12\x0b\n\x07REGULAR\x10\x02\x12\n\n\x06STABLE\x10\x03\x12\x0c\n\x08\x45XTENDED\x10\x04\"\'\n\x14\x43ostManagementConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"Y\n\tTpuConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x16use_service_networking\x18\x02 \x01(\x08\x12\x17\n\x0fipv4_cidr_block\x18\x03 \x01(\t:\x02\x18\x01\"\x08\n\x06Master\"\x94\x01\n\x19\x41utopilotConversionStatus\x12M\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.container.v1beta1.AutopilotConversionStatus.StateB\x03\xe0\x41\x03\"(\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44ONE\x10\x05\"\xc1\x01\n\tAutopilot\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12N\n\x16workload_policy_config\x18\x02 \x01(\x0b\x32..google.container.v1beta1.WorkloadPolicyConfig\x12S\n\x11\x63onversion_status\x18\x03 \x01(\x0b\x32\x33.google.container.v1beta1.AutopilotConversionStatusB\x03\xe0\x41\x03\"\xac\x01\n\x14WorkloadPolicyConfig\x12\x1c\n\x0f\x61llow_net_admin\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x35\n(autopilot_compatibility_auditing_enabled\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_allow_net_adminB+\n)_autopilot_compatibility_auditing_enabled\"\xd0\x03\n\x12NotificationConfig\x12\x43\n\x06pubsub\x18\x01 \x01(\x0b\x32\x33.google.container.v1beta1.NotificationConfig.PubSub\x1a\x8f\x01\n\x06PubSub\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x43\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x33.google.container.v1beta1.NotificationConfig.Filter\x1aT\n\x06\x46ilter\x12J\n\nevent_type\x18\x01 \x03(\x0e\x32\x36.google.container.v1beta1.NotificationConfig.EventType\"\x8c\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n\rUPGRADE_EVENT\x10\x02\x12\x1b\n\x17SECURITY_BULLETIN_EVENT\x10\x03\x12\x16\n\x12UPGRADE_INFO_EVENT\x10\x04\"\xf5\x01\n\x11\x43onfidentialNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12h\n\x1a\x63onfidential_instance_type\x18\x02 \x01(\x0e\x32\x44.google.container.v1beta1.ConfidentialNodes.ConfidentialInstanceType\"e\n\x18\x43onfidentialInstanceType\x12*\n&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SEV\x10\x01\x12\x0b\n\x07SEV_SNP\x10\x02\x12\x07\n\x03TDX\x10\x03\"\xe4\x01\n\x0cUpgradeEvent\x12\x44\n\rresource_type\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x38\n\x14operation_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x10\n\x08resource\x18\x06 \x01(\t\"\xc1\x06\n\x10UpgradeInfoEvent\x12\x44\n\rresource_type\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x05 \x01(\t\x12\x16\n\x0etarget_version\x18\x06 \x01(\t\x12\x10\n\x08resource\x18\x07 \x01(\t\x12\x44\n\x05state\x18\x08 \x01(\x0e\x32\x30.google.container.v1beta1.UpgradeInfoEvent.StateB\x03\xe0\x41\x03\x12\x42\n\x19standard_support_end_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x42\n\x19\x65xtended_support_end_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\x12H\n\nevent_type\x18\x0c \x01(\x0e\x32\x34.google.container.v1beta1.UpgradeInfoEvent.EventType\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06\"t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45ND_OF_SUPPORT\x10\x01\x12 \n\x1c\x43OS_MILESTONE_VERSION_UPDATE\x10\x02\x12\x15\n\x11UPGRADE_LIFECYCLE\x10\x03\x42\x1c\n\x1a_standard_support_end_timeB\x1c\n\x1a_extended_support_end_time\"\x88\x02\n\x15UpgradeAvailableEvent\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x44\n\rresource_type\x18\x02 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x41\n\x0frelease_channel\x18\x03 \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x43\n\x10windows_versions\x18\x05 \x01(\x0b\x32).google.container.v1beta1.WindowsVersions\"\xba\x02\n\x15SecurityBulletinEvent\x12\x1e\n\x16resource_type_affected\x18\x01 \x01(\t\x12\x13\n\x0b\x62ulletin_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ve_ids\x18\x03 \x03(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x14\n\x0c\x62ulletin_uri\x18\x05 \x01(\t\x12\x19\n\x11\x62rief_description\x18\x06 \x01(\t\x12!\n\x19\x61\x66\x66\x65\x63ted_supported_minors\x18\x07 \x03(\t\x12\x18\n\x10patched_versions\x18\x08 \x03(\t\x12 \n\x18suggested_upgrade_target\x18\t \x01(\t\x12\x1d\n\x15manual_steps_required\x18\n \x01(\x08\x12\x1a\n\x12mitigated_versions\x18\x0b \x03(\t\"(\n\x15IdentityServiceConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"[\n\rLoggingConfig\x12J\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32\x30.google.container.v1beta1.LoggingComponentConfig\"\xa3\x02\n\x16LoggingComponentConfig\x12U\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32:.google.container.v1beta1.LoggingComponentConfig.Component\"\xb1\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tWORKLOADS\x10\x02\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0c\n\x08KCP_SSHD\x10\x07\x12\x12\n\x0eKCP_CONNECTION\x10\x08\x12\x0b\n\x07KCP_HPA\x10\t\"*\n\x17RayClusterLoggingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xa6\x02\n\x10MonitoringConfig\x12M\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32\x33.google.container.v1beta1.MonitoringComponentConfig\x12T\n\x19managed_prometheus_config\x18\x02 \x01(\x0b\x32\x31.google.container.v1beta1.ManagedPrometheusConfig\x12m\n&advanced_datapath_observability_config\x18\x03 \x01(\x0b\x32=.google.container.v1beta1.AdvancedDatapathObservabilityConfig\"\xa3\x02\n#AdvancedDatapathObservabilityConfig\x12\x16\n\x0e\x65nable_metrics\x18\x01 \x01(\x08\x12[\n\nrelay_mode\x18\x02 \x01(\x0e\x32G.google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode\x12\x19\n\x0c\x65nable_relay\x18\x03 \x01(\x08H\x00\x88\x01\x01\"[\n\tRelayMode\x12\x1a\n\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n\x0b\x45XTERNAL_LB\x10\x04\x42\x0f\n\r_enable_relay\"-\n\x1aRayClusterMonitoringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"_\n\x15NodePoolLoggingConfig\x12\x46\n\x0evariant_config\x18\x01 \x01(\x0b\x32..google.container.v1beta1.LoggingVariantConfig\"\xa4\x01\n\x14LoggingVariantConfig\x12G\n\x07variant\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.LoggingVariantConfig.Variant\"C\n\x07Variant\x12\x17\n\x13VARIANT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x12\n\x0eMAX_THROUGHPUT\x10\x02\"\xfe\x02\n\x19MonitoringComponentConfig\x12X\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32=.google.container.v1beta1.MonitoringComponentConfig.Component\"\x86\x02\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\x11\n\tWORKLOADS\x10\x02\x1a\x02\x08\x01\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0b\n\x07STORAGE\x10\x07\x12\x07\n\x03HPA\x10\x08\x12\x07\n\x03POD\x10\t\x12\r\n\tDAEMONSET\x10\n\x12\x0e\n\nDEPLOYMENT\x10\x0b\x12\x0f\n\x0bSTATEFULSET\x10\x0c\x12\x0c\n\x08\x43\x41\x44VISOR\x10\r\x12\x0b\n\x07KUBELET\x10\x0e\x12\x08\n\x04\x44\x43GM\x10\x0f\x12\n\n\x06JOBSET\x10\x10\"\xb5\x01\n\x0ePodAutoscaling\x12M\n\x0bhpa_profile\x18\x02 \x01(\x0e\x32\x33.google.container.v1beta1.PodAutoscaling.HPAProfileH\x00\x88\x01\x01\"D\n\nHPAProfile\x12\x1b\n\x17HPA_PROFILE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0f\n\x0bPERFORMANCE\x10\x02\x42\x0e\n\x0c_hpa_profile\"N\n\x05\x46leet\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x17\n\nmembership\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0epre_registered\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\xbb\x05\n\x1b\x43ontrolPlaneEndpointsConfig\x12\x64\n\x13\x64ns_endpoint_config\x18\x01 \x01(\x0b\x32G.google.container.v1beta1.ControlPlaneEndpointsConfig.DNSEndpointConfig\x12\x64\n\x13ip_endpoints_config\x18\x03 \x01(\x0b\x32G.google.container.v1beta1.ControlPlaneEndpointsConfig.IPEndpointsConfig\x1aj\n\x11\x44NSEndpointConfig\x12\x15\n\x08\x65ndpoint\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61llow_external_traffic\x18\x03 \x01(\x08H\x00\x88\x01\x01\x42\x19\n\x17_allow_external_traffic\x1a\xe3\x02\n\x11IPEndpointsConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x65nable_public_endpoint\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\rglobal_access\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\\\n\x1a\x61uthorized_networks_config\x18\x04 \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfig\x12\x1c\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10private_endpoint\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1bprivate_endpoint_subnetwork\x18\x07 \x01(\tB\n\n\x08_enabledB\x19\n\x17_enable_public_endpointB\x10\n\x0e_global_access\"\x89\x01\n\x13ResourceManagerTags\x12\x45\n\x04tags\x18\x01 \x03(\x0b\x32\x37.google.container.v1beta1.ResourceManagerTags.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfe\x01\n\x10\x45nterpriseConfig\x12Q\n\x0c\x63luster_tier\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTierB\x03\xe0\x41\x03\x12L\n\x0c\x64\x65sired_tier\x18\x02 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTier\"I\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\"\xad\x02\n\x13SecretManagerConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12Z\n\x0frotation_config\x18\x02 \x01(\x0b\x32<.google.container.v1beta1.SecretManagerConfig.RotationConfigH\x01\x88\x01\x01\x1a\x83\x01\n\x0eRotationConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n\x11rotation_interval\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_rotation_intervalB\n\n\x08_enabledB\x12\n\x10_rotation_config\"\xa0\x01\n\x11SecondaryBootDisk\x12>\n\x04mode\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.SecondaryBootDisk.Mode\x12\x12\n\ndisk_image\x18\x02 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONTAINER_IMAGE_CACHE\x10\x01\"!\n\x1fSecondaryBootDiskUpdateStrategy\"D\n\x1e\x46\x65tchClusterUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xa4\x07\n\x12\x43lusterUpgradeInfo\x12!\n\x14minor_target_version\x18\x07 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x08 \x01(\tH\x01\x88\x01\x01\x12[\n\x13\x61uto_upgrade_status\x18\x02 \x03(\x0e\x32>.google.container.v1beta1.ClusterUpgradeInfo.AutoUpgradeStatus\x12[\n\rpaused_reason\x18\x03 \x03(\x0e\x32\x44.google.container.v1beta1.ClusterUpgradeInfo.AutoUpgradePausedReason\x12\x41\n\x0fupgrade_details\x18\x04 \x03(\x0b\x32(.google.container.v1beta1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x05 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x06 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x04\x12\x12\n\x0eUPGRADE_PAUSED\x10\x05\"\x90\x02\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x05\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x06\x12\x1d\n\x19\x43LUSTER_DISRUPTION_BUDGET\x10\x04\x12+\n\'CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE\x10\x07\x12\x11\n\rSYSTEM_CONFIG\x10\x08\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp\"\xe1\x03\n\x0eUpgradeDetails\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.container.v1beta1.UpgradeDetails.StateB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x17\n\x0finitial_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x46\n\nstart_type\x18\x06 \x01(\x0e\x32\x32.google.container.v1beta1.UpgradeDetails.StartType\"J\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\"B\n\tStartType\x12\x1a\n\x16START_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\x42\r\n\x0b_start_timeB\x0b\n\t_end_time\"E\n\x1f\x46\x65tchNodePoolUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xdb\x06\n\x13NodePoolUpgradeInfo\x12!\n\x14minor_target_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\\\n\x13\x61uto_upgrade_status\x18\x03 \x03(\x0e\x32?.google.container.v1beta1.NodePoolUpgradeInfo.AutoUpgradeStatus\x12\\\n\rpaused_reason\x18\x04 \x03(\x0e\x32\x45.google.container.v1beta1.NodePoolUpgradeInfo.AutoUpgradePausedReason\x12\x41\n\x0fupgrade_details\x18\x05 \x03(\x0b\x32(.google.container.v1beta1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x06 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x07 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x02\x12\x12\n\x0eUPGRADE_PAUSED\x10\x03\"\xc4\x01\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x02\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x03\x12\x11\n\rSYSTEM_CONFIG\x10\x04\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp*\xc6\x01\n\x17PrivateIPv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\'\n#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n\x13UpgradeResourceType\x12%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MASTER\x10\x01\x12\r\n\tNODE_POOL\x10\x02*^\n\x16NodePoolUpdateStrategy\x12)\n%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nBLUE_GREEN\x10\x02\x12\t\n\x05SURGE\x10\x03*a\n\x10\x44\x61tapathProvider\x12!\n\x1d\x44\x41TAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n\x11\x41\x44VANCED_DATAPATH\x10\x02*@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02*\x9f\x01\n\x19InTransitEncryptionConfig\x12,\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x30\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x02\x32\x95S\n\x0e\x43lusterManager\x12\xf3\x01\n\x0cListClusters\x12-.google.container.v1beta1.ListClustersRequest\x1a..google.container.v1beta1.ListClustersResponse\"\x83\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02k\x12\x31/v1beta1/{parent=projects/*/locations/*}/clustersZ6\x12\x34/v1beta1/projects/{project_id}/zones/{zone}/clusters\x12\xfa\x01\n\nGetCluster\x12+.google.container.v1beta1.GetClusterRequest\x1a!.google.container.v1beta1.Cluster\"\x9b\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02x\x12\x31/v1beta1/{name=projects/*/locations/*/clusters/*}ZC\x12\x41/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}\x12\xf8\x01\n\rCreateCluster\x12..google.container.v1beta1.CreateClusterRequest\x1a#.google.container.v1beta1.Operation\"\x91\x01\xda\x41\x17project_id,zone,cluster\x82\xd3\xe4\x93\x02q\"1/v1beta1/{parent=projects/*/locations/*}/clusters:\x01*Z9\"4/v1beta1/projects/{project_id}/zones/{zone}/clusters:\x01*\x12\x8f\x02\n\rUpdateCluster\x12..google.container.v1beta1.UpdateClusterRequest\x1a#.google.container.v1beta1.Operation\"\xa8\x01\xda\x41!project_id,zone,cluster_id,update\x82\xd3\xe4\x93\x02~\x1a\x31/v1beta1/{name=projects/*/locations/*/clusters/*}:\x01*ZF\x1a\x41/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:\x01*\x12\x9a\x02\n\x0eUpdateNodePool\x12/.google.container.v1beta1.UpdateNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xb1\x01\x82\xd3\xe4\x93\x02\xaa\x01\x1a=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:\x01*Zf\"a/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update:\x01*\x12\xbe\x02\n\x16SetNodePoolAutoscaling\x12\x37.google.container.v1beta1.SetNodePoolAutoscalingRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\x82\xd3\xe4\x93\x02\xbe\x01\"L/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling:\x01*Zk\"f/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling:\x01*\x12\xb4\x02\n\x11SetLoggingService\x12\x32.google.container.v1beta1.SetLoggingServiceRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\xda\x41*project_id,zone,cluster_id,logging_service\x82\xd3\xe4\x93\x02\x91\x01\"/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations:\x01*ZP\"K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations:\x01*\x12\xaa\x02\n\x0cUpdateMaster\x12-.google.container.v1beta1.UpdateMasterRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\xda\x41)project_id,zone,cluster_id,master_version\x82\xd3\xe4\x93\x02\x92\x01\">/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster:\x01*ZM\"H/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master:\x01*\x12\x88\x02\n\rSetMasterAuth\x12..google.container.v1beta1.SetMasterAuthRequest\x1a#.google.container.v1beta1.Operation\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"?/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth:\x01*ZT\"O/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth:\x01*\x12\x82\x02\n\rDeleteCluster\x12..google.container.v1beta1.DeleteClusterRequest\x1a#.google.container.v1beta1.Operation\"\x9b\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02x*1/v1beta1/{name=projects/*/locations/*/clusters/*}ZC*A/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}\x12\xfd\x01\n\x0eListOperations\x12/.google.container.v1beta1.ListOperationsRequest\x1a\x30.google.container.v1beta1.ListOperationsResponse\"\x87\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02o\x12\x33/v1beta1/{parent=projects/*/locations/*}/operationsZ8\x12\x36/v1beta1/projects/{project_id}/zones/{zone}/operations\x12\x88\x02\n\x0cGetOperation\x12-.google.container.v1beta1.GetOperationRequest\x1a#.google.container.v1beta1.Operation\"\xa3\x01\xda\x41\x1cproject_id,zone,operation_id\x82\xd3\xe4\x93\x02~\x12\x33/v1beta1/{name=projects/*/locations/*/operations/*}ZG\x12\x45/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}\x12\x96\x02\n\x0f\x43\x61ncelOperation\x12\x30.google.container.v1beta1.CancelOperationRequest\x1a\x16.google.protobuf.Empty\"\xb8\x01\xda\x41\x1cproject_id,zone,operation_id\x82\xd3\xe4\x93\x02\x92\x01\":/v1beta1/{name=projects/*/locations/*/operations/*}:cancel:\x01*ZQ\"L/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel:\x01*\x12\xf7\x01\n\x0fGetServerConfig\x12\x30.google.container.v1beta1.GetServerConfigRequest\x1a&.google.container.v1beta1.ServerConfig\"\x89\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02q\x12\x33/v1beta1/{name=projects/*/locations/*}/serverConfigZ:\x12\x38/v1beta1/projects/{project_id}/zones/{zone}/serverconfig\x12\xb5\x01\n\x0eGetJSONWebKeys\x12/.google.container.v1beta1.GetJSONWebKeysRequest\x1a\x30.google.container.v1beta1.GetJSONWebKeysResponse\"@\x82\xd3\xe4\x93\x02:\x12\x38/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks\x12\xa5\x02\n\rListNodePools\x12..google.container.v1beta1.ListNodePoolsRequest\x1a/.google.container.v1beta1.ListNodePoolsResponse\"\xb2\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02\x8e\x01\x12=/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePoolsZM\x12K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools\x12\xb0\x02\n\x0bGetNodePool\x12,.google.container.v1beta1.GetNodePoolRequest\x1a\".google.container.v1beta1.NodePool\"\xce\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\x9d\x01\x12=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}Z\\\x12Z/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}\x12\xab\x02\n\x0e\x43reateNodePool\x12/.google.container.v1beta1.CreateNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xc2\x01\xda\x41$project_id,zone,cluster_id,node_pool\x82\xd3\xe4\x93\x02\x94\x01\"=/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools:\x01*ZP\"K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools:\x01*\x12\xb7\x02\n\x0e\x44\x65leteNodePool\x12/.google.container.v1beta1.DeleteNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xce\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\x9d\x01*=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}Z\\*Z/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}\x12\xc5\x01\n\x17\x43ompleteNodePoolUpgrade\x12\x38.google.container.v1beta1.CompleteNodePoolUpgradeRequest\x1a\x16.google.protobuf.Empty\"X\x82\xd3\xe4\x93\x02R\"M/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade:\x01*\x12\xe1\x02\n\x17RollbackNodePoolUpgrade\x12\x38.google.container.v1beta1.RollbackNodePoolUpgradeRequest\x1a#.google.container.v1beta1.Operation\"\xe6\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\xb5\x01\"F/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback:\x01*Zh\"c/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback:\x01*\x12\xf2\x02\n\x15SetNodePoolManagement\x12\x36.google.container.v1beta1.SetNodePoolManagementRequest\x1a#.google.container.v1beta1.Operation\"\xfb\x01\xda\x41\x32project_id,zone,cluster_id,node_pool_id,management\x82\xd3\xe4\x93\x02\xbf\x01\"K/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement:\x01*Zm\"h/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement:\x01*\x12\xc4\x02\n\tSetLabels\x12*.google.container.v1beta1.SetLabelsRequest\x1a#.google.container.v1beta1.Operation\"\xe5\x01\xda\x41] + # Optional. Defines a comma-separated allowlist of unsafe sysctls or sysctl + # patterns (ending in `*`). + # + # The unsafe namespaced sysctl groups are `kernel.shm*`, `kernel.msg*`, + # `kernel.sem`, `fs.mqueue.*`, and `net.*`. Leaving this allowlist empty + # means they cannot be set on Pods. + # + # To allow certain sysctls or sysctl patterns to be set on Pods, list them + # separated by commas. + # For example: `kernel.msg*,net.ipv4.route.min_pmtu`. + # + # See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ + # for more details. class NodeKubeletConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # TopologyManager defines the configuration options for Topology Manager + # feature. See + # https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/ + # @!attribute [rw] policy + # @return [::String] + # Configures the strategy for resource alignment. + # Allowed values are: + # + # * none: the default policy, and does not perform any topology alignment. + # * restricted: the topology manager stores the preferred NUMA node affinity + # for the container, and will reject the pod if the affinity if not + # preferred. + # * best-effort: the topology manager stores the preferred NUMA node affinity + # for the container. If the affinity is not preferred, the topology manager + # will admit the pod to the node anyway. + # * single-numa-node: the topology manager determines if the single NUMA node + # affinity is possible. If it is, Topology Manager will store this and the + # Hint Providers can then use this information when making the resource + # allocation decision. If, however, this is not possible then the + # Topology Manager will reject the pod from the node. This will result in a + # pod in a Terminated state with a pod admission failure. + # + # The default policy value is 'none' if unspecified. + # Details about each strategy can be found + # [here](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies). + # @!attribute [rw] scope + # @return [::String] + # The Topology Manager aligns resources in following scopes: + # + # * container + # * pod + # + # The default scope is 'container' if unspecified. + # See + # https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes + class TopologyManager + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The option enables the Kubernetes NUMA-aware Memory Manager feature. + # Detailed description about the feature can be found + # [here](https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/). + # @!attribute [rw] policy + # @return [::String] + # Controls the memory management policy on the Node. + # See + # https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#policies + # + # The following values are allowed. + # * "none" + # * "static" + # The default value is 'none' if unspecified. + class MemoryManager + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Parameters that describe the nodes in a cluster. # # GKE Autopilot clusters do not @@ -175,7 +337,6 @@ class NodeKubeletConfig # @return [::Integer] # Size of the disk attached to each node, specified in GB. # The smallest allowed disk size is 10GB. - # # If unspecified, the default disk size is 100GB. # @!attribute [rw] oauth_scopes # @return [::Array<::String>] @@ -390,9 +551,29 @@ class NodeKubeletConfig # @!attribute [rw] secondary_boot_disks # @return [::Array<::Google::Cloud::Container::V1beta1::SecondaryBootDisk>] # List of secondary boot disks attached to the nodes. + # @!attribute [rw] storage_pools + # @return [::Array<::String>] + # List of Storage Pools where boot disks are provisioned. # @!attribute [rw] secondary_boot_disk_update_strategy # @return [::Google::Cloud::Container::V1beta1::SecondaryBootDiskUpdateStrategy] # Secondary boot disk update strategy. + # @!attribute [rw] max_run_duration + # @return [::Google::Protobuf::Duration] + # The maximum duration for the nodes to exist. + # If unspecified, the nodes can exist indefinitely. + # @!attribute [rw] local_ssd_encryption_mode + # @return [::Google::Cloud::Container::V1beta1::NodeConfig::LocalSsdEncryptionMode] + # Specifies which method should be used for encrypting the + # Local SSDs attached to the node. + # @!attribute [r] effective_cgroup_mode + # @return [::Google::Cloud::Container::V1beta1::NodeConfig::EffectiveCgroupMode] + # Output only. effective_cgroup_mode is the cgroup mode actually used by the + # node pool. It is determined by the cgroup mode specified in the + # LinuxNodeConfig or the default cgroup mode based on the cluster creation + # version. + # @!attribute [rw] flex_start + # @return [::Boolean] + # Flex Start flag for enabling Flex Start VM. class NodeConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -423,6 +604,41 @@ class ResourceLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # LocalSsdEncryptionMode specifies the method used for encrypting the Local + # SSDs attached to the node. + module LocalSsdEncryptionMode + # The given node will be encrypted using keys managed by Google + # infrastructure and the keys will be deleted when the node is + # deleted. + LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0 + + # The given node will be encrypted using keys managed by Google + # infrastructure and the keys will be deleted when the node is + # deleted. + STANDARD_ENCRYPTION = 1 + + # The given node will opt-in for using ephemeral key for + # encryption of Local SSDs. + # The Local SSDs will not be able to recover data in case of node + # crash. + EPHEMERAL_KEY_ENCRYPTION = 2 + end + + # Possible effective cgroup modes for the node. + module EffectiveCgroupMode + # EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the + # node pool is unspecified, i.e. the node pool is a Windows node pool. + EFFECTIVE_CGROUP_MODE_UNSPECIFIED = 0 + + # CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the + # cgroup configuration. + EFFECTIVE_CGROUP_MODE_V1 = 1 + + # CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the + # cgroup configuration. + EFFECTIVE_CGROUP_MODE_V2 = 2 + end end # Specifies options for controlling advanced machine features. @@ -434,9 +650,28 @@ class ResourceLabelsEntry # @!attribute [rw] enable_nested_virtualization # @return [::Boolean] # Whether or not to enable nested virtualization (defaults to false). + # @!attribute [rw] performance_monitoring_unit + # @return [::Google::Cloud::Container::V1beta1::AdvancedMachineFeatures::PerformanceMonitoringUnit] + # Type of Performance Monitoring Unit (PMU) requested on node pool instances. + # If unset, PMU will not be available to the node. class AdvancedMachineFeatures include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # Level of PMU access + module PerformanceMonitoringUnit + # PMU not enabled. + PERFORMANCE_MONITORING_UNIT_UNSPECIFIED = 0 + + # Architecturally defined non-LLC events. + ARCHITECTURAL = 1 + + # Most documented core/L2 events. + STANDARD = 2 + + # Most documented core/L2 and LLC events. + ENHANCED = 3 + end end # Parameters for node pool-level network config. @@ -485,7 +720,7 @@ class AdvancedMachineFeatures # @return [::Boolean] # Whether nodes have internal IP addresses only. # If enable_private_nodes is not specified, then the value is derived from - # [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes] + # [Cluster.NetworkConfig.default_enable_private_nodes][] # @!attribute [rw] network_performance_config # @return [::Google::Cloud::Container::V1beta1::NodeNetworkConfig::NetworkPerformanceConfig] # Network bandwidth tier configuration. @@ -689,6 +924,9 @@ class LocalNvmeSsdBlockConfig # ssds), 0 will be provisioned. See # https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds # for more info. + # @!attribute [rw] data_cache_count + # @return [::Integer] + # Number of local SSDs to use for GKE Data Cache. class EphemeralStorageLocalSsdConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -806,7 +1044,7 @@ class PrivateRegistryAccessConfig # @return [::Array<::String>] # List of fully qualified domain names (FQDN). # Specifying port is supported. - # Wilcards are NOT supported. + # Wildcards are NOT supported. # Examples: # - my.customdomain.com # - 10.0.1.2:5000 @@ -1019,7 +1257,8 @@ class NetworkTags # @!attribute [r] client_certificate # @return [::String] # Output only. Base64-encoded public certificate used by clients to - # authenticate to the cluster endpoint. + # authenticate to the cluster endpoint. Issued only if + # client_certificate_config is set. # @!attribute [r] client_key # @return [::String] # Output only. Base64-encoded private key used by clients to authenticate @@ -1099,9 +1338,15 @@ class ClientCertificateConfig # @!attribute [rw] stateful_ha_config # @return [::Google::Cloud::Container::V1beta1::StatefulHAConfig] # Optional. Configuration for the StatefulHA add-on. + # @!attribute [rw] parallelstore_csi_driver_config + # @return [::Google::Cloud::Container::V1beta1::ParallelstoreCsiDriverConfig] + # Configuration for the Cloud Storage Parallelstore CSI driver. # @!attribute [rw] ray_operator_config # @return [::Google::Cloud::Container::V1beta1::RayOperatorConfig] # Optional. Configuration for Ray Operator addon. + # @!attribute [rw] high_scale_checkpointing_config + # @return [::Google::Cloud::Container::V1beta1::HighScaleCheckpointingConfig] + # Configuration for the High Scale Checkpointing add-on. class AddonsConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1225,6 +1470,26 @@ class GcsFuseCsiDriverConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for the Cloud Storage Parallelstore CSI driver. + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the Cloud Storage Parallelstore CSI driver is enabled for this + # cluster. + class ParallelstoreCsiDriverConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for the High Scale Checkpointing. + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the High Scale Checkpointing is enabled for this + # cluster. + class HighScaleCheckpointingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Configuration options for the Ray Operator add-on. # @!attribute [rw] enabled # @return [::Boolean] @@ -1251,13 +1516,23 @@ class PrivateClusterMasterGlobalAccessConfig # Configuration options for private clusters. # @!attribute [rw] enable_private_nodes + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] # Whether nodes have internal IP addresses only. If enabled, all nodes are # given only RFC 1918 private addresses and communicate with the master via # private networking. + # + # Deprecated: Use + # {::Google::Cloud::Container::V1beta1::NetworkConfig#default_enable_private_nodes NetworkConfig.default_enable_private_nodes} + # instead. # @!attribute [rw] enable_private_endpoint + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] # Whether the master's internal IP address is used as the cluster endpoint. + # Use + # {::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig::IPEndpointsConfig#enable_public_endpoint ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint} + # instead. Note that the value of enable_public_endpoint is reversed: if + # enable_private_endpoint is false, then enable_public_endpoint will be true. # @!attribute [rw] master_ipv4_cidr_block # @return [::String] # The IP range in CIDR notation to use for the hosted master network. This @@ -1265,21 +1540,41 @@ class PrivateClusterMasterGlobalAccessConfig # set of masters, as well as the ILB VIP. This range must not overlap with # any other ranges in use within the cluster's network. # @!attribute [r] private_endpoint + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Output only. The internal IP address of this cluster's master endpoint. + # + # Deprecated: Use + # {::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig::IPEndpointsConfig#private_endpoint ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint} + # instead. # @!attribute [r] public_endpoint + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Output only. The external IP address of this cluster's master endpoint. + # + # Deprecated: Use + # {::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig::IPEndpointsConfig#public_endpoint ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint} + # instead. # @!attribute [r] peering_name # @return [::String] # Output only. The peering name in the customer VPC used by this cluster. # @!attribute [rw] master_global_access_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::Container::V1beta1::PrivateClusterMasterGlobalAccessConfig] # Controls master global access settings. + # + # Deprecated: Use + # [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][] + # instead. # @!attribute [rw] private_endpoint_subnetwork + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Subnet to provision the master's private endpoint during cluster creation. # Specified in projects/*/regions/*/subnetworks/* format. + # + # Deprecated: Use + # {::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig::IPEndpointsConfig#private_endpoint_subnetwork ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork} + # instead. class PrivateClusterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1345,7 +1640,10 @@ module LoadBalancerType # Kubernetes master through HTTPS. # @!attribute [rw] gcp_public_cidrs_access_enabled # @return [::Boolean] - # Whether master is accessbile via Google Compute Engine Public IP addresses. + # Whether master is accessible via Google Compute Engine Public IP addresses. + # @!attribute [rw] private_endpoint_enforcement_enabled + # @return [::Boolean] + # Whether master authorized networks is enforced on private endpoint or not. class MasterAuthorizedNetworksConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1521,6 +1819,7 @@ class PodCIDROverprovisionConfig # 2) When `use_ip_aliases` is false, `cluster.cluster_ipv4_cidr` muse be # fully-specified. # @!attribute [rw] tpu_ipv4_cidr_block + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # The IP address range of the Cloud TPUs in this cluster. If unspecified, a # range will be automatically chosen with the default size. @@ -1776,7 +2075,7 @@ module Type # The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -1832,6 +2131,11 @@ module Type # The cluster has no SLA for uptime and master/node upgrades are disabled. # Alpha enabled clusters are automatically deleted thirty days after # creation. + # @!attribute [rw] alpha_cluster_feature_gates + # @return [::Array<::String>] + # The list of user specified Kubernetes feature gates. + # Each string represents the activation status of a feature gate (e.g. + # "featureX=true" or "featureX=false") # @!attribute [rw] enable_k8s_beta_apis # @return [::Google::Cloud::Container::V1beta1::K8sBetaAPIConfig] # Kubernetes open source beta apis enabled on the cluster. Only beta apis. @@ -1852,8 +2156,13 @@ module Type # @return [::Google::Cloud::Container::V1beta1::IPAllocationPolicy] # Configuration for cluster IP allocation. # @!attribute [rw] master_authorized_networks_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::Container::V1beta1::MasterAuthorizedNetworksConfig] # The configuration options for master authorized networks feature. + # + # Deprecated: Use + # {::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig::IPEndpointsConfig#authorized_networks_config ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config} + # instead. # @!attribute [rw] maintenance_policy # @return [::Google::Cloud::Container::V1beta1::MaintenancePolicy] # Configure the maintenance policy for this cluster. @@ -1936,8 +2245,11 @@ module Type # @return [::Google::Cloud::Container::V1beta1::ClusterTelemetry] # Telemetry integration for the cluster. # @!attribute [rw] tpu_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::Container::V1beta1::TpuConfig] # Configuration for Cloud TPU support; + # This field is deprecated due to the deprecation of 2VM TPU. The end of life + # date for 2VM TPU is 2025-04-25. # @!attribute [rw] notification_config # @return [::Google::Cloud::Container::V1beta1::NotificationConfig] # Notification configuration of the cluster. @@ -2038,14 +2350,20 @@ module Type # [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) # in which the cluster resides. # @!attribute [rw] enable_tpu + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] # Enable the ability to use Cloud TPUs in this cluster. # This field is deprecated, use tpu_config.enabled instead. + # This field is deprecated due to the deprecation of 2VM TPU. The end of life + # date for 2VM TPU is 2025-04-25. # @!attribute [r] tpu_ipv4_cidr_block + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Output only. The IP address range of the Cloud TPUs in this cluster, in # [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) # notation (e.g. `1.2.3.4/29`). + # This field is deprecated due to the deprecation of 2VM TPU. The end of life + # date for 2VM TPU is 2025-04-25. # @!attribute [rw] database_encryption # @return [::Google::Cloud::Container::V1beta1::DatabaseEncryption] # Configuration of etcd encryption. @@ -2080,6 +2398,9 @@ module Type # @return [::Google::Cloud::Container::V1beta1::ProtectConfig] # Deprecated: Use SecurityPostureConfig instead. # Enable/Disable Protect API features for the cluster. + # @!attribute [rw] pod_autoscaling + # @return [::Google::Cloud::Container::V1beta1::PodAutoscaling] + # The config for pod autoscaling. # @!attribute [rw] etag # @return [::String] # This checksum is computed by the server based on the value of cluster @@ -2091,6 +2412,9 @@ module Type # @!attribute [rw] security_posture_config # @return [::Google::Cloud::Container::V1beta1::SecurityPostureConfig] # Enable/Disable Security Posture API features for the cluster. + # @!attribute [rw] control_plane_endpoints_config + # @return [::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig] + # Configuration for all cluster's control plane endpoints. # @!attribute [rw] enterprise_config # @return [::Google::Cloud::Container::V1beta1::EnterpriseConfig] # GKE Enterprise Configuration. @@ -2106,6 +2430,17 @@ module Type # @!attribute [r] satisfies_pzi # @return [::Boolean] # Output only. Reserved for future use. + # @!attribute [rw] user_managed_keys_config + # @return [::Google::Cloud::Container::V1beta1::UserManagedKeysConfig] + # The Custom keys configuration for the cluster. + # @!attribute [rw] rbac_binding_config + # @return [::Google::Cloud::Container::V1beta1::RBACBindingConfig] + # RBACBindingConfig allows user to restrict ClusterRoleBindings an + # RoleBindings that can be created. + # @!attribute [rw] anonymous_authentication_config + # @return [::Google::Cloud::Container::V1beta1::AnonymousAuthenticationConfig] + # Configuration for limiting anonymous access to all endpoints except the + # health checks. class Cluster include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2149,6 +2484,73 @@ module Status end end + # RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings + # that can be created. + # @!attribute [rw] enable_insecure_binding_system_unauthenticated + # @return [::Boolean] + # Setting this to true will allow any ClusterRoleBinding and RoleBinding + # with subjets system:anonymous or system:unauthenticated. + # @!attribute [rw] enable_insecure_binding_system_authenticated + # @return [::Boolean] + # Setting this to true will allow any ClusterRoleBinding and RoleBinding + # with subjects system:authenticated. + class RBACBindingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UserManagedKeysConfig holds the resource address to Keys which are used + # for signing certs and token that are used for communication within cluster. + # @!attribute [rw] cluster_ca + # @return [::String] + # The Certificate Authority Service caPool to use for the cluster CA in this + # cluster. + # @!attribute [rw] etcd_api_ca + # @return [::String] + # Resource path of the Certificate Authority Service caPool to use for the + # etcd API CA in this cluster. + # @!attribute [rw] etcd_peer_ca + # @return [::String] + # Resource path of the Certificate Authority Service caPool to use for the + # etcd peer CA in this cluster. + # @!attribute [rw] service_account_signing_keys + # @return [::Array<::String>] + # The Cloud KMS cryptoKeyVersions to use for signing service account JWTs + # issued by this cluster. + # + # Format: + # `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` + # @!attribute [rw] service_account_verification_keys + # @return [::Array<::String>] + # The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs + # issued by this cluster. + # + # Format: + # `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` + # @!attribute [rw] aggregation_ca + # @return [::String] + # The Certificate Authority Service caPool to use for the aggregation CA in + # this cluster. + # @!attribute [rw] control_plane_disk_encryption_key + # @return [::String] + # The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control + # plane nodes. + # @!attribute [rw] gkeops_etcd_backup_encryption_key + # @return [::String] + # Resource path of the Cloud KMS cryptoKey to use for encryption of internal + # etcd backups. + class UserManagedKeysConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AnonymousAuthenticationConfig defines the settings needed to limit endpoints + # that allow anonymous authentication. + class AnonymousAuthenticationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # CompliancePostureConfig defines the settings needed to enable/disable # features for the Compliance Posture. # @!attribute [rw] mode @@ -2343,6 +2745,9 @@ class NodeConfigDefaults # NodeKubeletConfig controls the defaults for autoprovisioned node-pools. # # Currently only `insecure_kubelet_readonly_port_enabled` can be set here. + # @!attribute [r] linux_node_config + # @return [::Google::Cloud::Container::V1beta1::LinuxNodeConfig] + # Output only. Configuration options for Linux nodes. class NodePoolAutoConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2369,7 +2774,7 @@ class NodePoolAutoConfig # The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -2407,8 +2812,13 @@ class NodePoolAutoConfig # Warning: changing cluster locations will update the locations of all node # pools and will result in nodes being added and/or removed. # @!attribute [rw] desired_master_authorized_networks_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::Container::V1beta1::MasterAuthorizedNetworksConfig] # The desired configuration options for master authorized networks feature. + # + # Deprecated: Use + # desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config + # instead. # @!attribute [rw] desired_pod_security_policy_config # @return [::Google::Cloud::Container::V1beta1::PodSecurityPolicyConfig] # The desired configuration options for the PodSecurityPolicy feature. @@ -2438,6 +2848,7 @@ class NodePoolAutoConfig # @return [::Google::Cloud::Container::V1beta1::VerticalPodAutoscaling] # Cluster-level Vertical Pod Autoscaling configuration. # @!attribute [rw] desired_private_cluster_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::Container::V1beta1::PrivateClusterConfig] # The desired private cluster configuration. master_global_access_config is # the only field that can be changed via this field. @@ -2445,6 +2856,10 @@ class NodePoolAutoConfig # {::Google::Cloud::Container::V1beta1::ClusterUpdate#desired_enable_private_endpoint ClusterUpdate.desired_enable_private_endpoint} # for modifying other fields within # {::Google::Cloud::Container::V1beta1::PrivateClusterConfig PrivateClusterConfig}. + # + # Deprecated: Use + # desired_control_plane_endpoints_config.ip_endpoints_config.global_access + # instead. # @!attribute [rw] desired_intra_node_visibility_config # @return [::Google::Cloud::Container::V1beta1::IntraNodeVisibilityConfig] # The desired config of Intra-node visibility. @@ -2464,8 +2879,11 @@ class NodePoolAutoConfig # {::Google::Cloud::Container::V1beta1::ClusterUpdate#desired_private_cluster_config desired_private_cluster_config} # instead. # @!attribute [rw] desired_tpu_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::Container::V1beta1::TpuConfig] # The desired Cloud TPU configuration. + # This field is deprecated due to the deprecation of 2VM TPU. The end of life + # date for 2VM TPU is 2025-04-25. # @!attribute [rw] desired_l4ilb_subsetting_config # @return [::Google::Cloud::Container::V1beta1::ILBSubsettingConfig] # The desired L4 Internal Load Balancer Subsetting configuration. @@ -2541,8 +2959,24 @@ class NodePoolAutoConfig # @return [::Google::Cloud::Container::V1beta1::IdentityServiceConfig] # The desired Identity Service component configuration. # @!attribute [rw] desired_enable_private_endpoint + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] # Enable/Disable private endpoint for the cluster's master. + # + # Deprecated: Use + # desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint + # instead. Note that the value of enable_public_endpoint is reversed: if + # enable_private_endpoint is false, then enable_public_endpoint will be true. + # @!attribute [rw] desired_default_enable_private_nodes + # @return [::Boolean] + # Override the default setting of whether future created + # nodes have private IP addresses only, namely + # {::Google::Cloud::Container::V1beta1::NetworkConfig#default_enable_private_nodes NetworkConfig.default_enable_private_nodes} + # @!attribute [rw] desired_control_plane_endpoints_config + # @return [::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig] + # [Control plane + # endpoints][google.container.v1beta1.Cluster.control_plane_endpoints_config] + # configuration. # @!attribute [rw] desired_node_pool_auto_config_network_tags # @return [::Google::Cloud::Container::V1beta1::NetworkTags] # The desired network tags that apply to all auto-provisioned node pools @@ -2552,6 +2986,9 @@ class NodePoolAutoConfig # @return [::Google::Cloud::Container::V1beta1::ProtectConfig] # Deprecated: Use DesiredSecurityPostureConfig instead. # Enable/Disable Protect API features for the cluster. + # @!attribute [rw] desired_pod_autoscaling + # @return [::Google::Cloud::Container::V1beta1::PodAutoscaling] + # The desired config for pod autoscaling. # @!attribute [rw] desired_gateway_api_config # @return [::Google::Cloud::Container::V1beta1::GatewayAPIConfig] # The desired config of Gateway API on this cluster. @@ -2594,7 +3031,7 @@ class NodePoolAutoConfig # Enable/Disable FQDN Network Policy for the cluster. # @!attribute [rw] desired_autopilot_workload_policy_config # @return [::Google::Cloud::Container::V1beta1::WorkloadPolicyConfig] - # The desired workload policy configuration for the autopilot cluster. + # WorkloadPolicyConfig is the configuration related to GCW workload policy # @!attribute [rw] desired_k8s_beta_apis # @return [::Google::Cloud::Container::V1beta1::K8sBetaAPIConfig] # Beta APIs enabled for cluster. @@ -2622,6 +3059,9 @@ class NodePoolAutoConfig # @!attribute [rw] desired_secret_manager_config # @return [::Google::Cloud::Container::V1beta1::SecretManagerConfig] # Enable/Disable Secret Manager Config. + # @!attribute [rw] desired_compliance_posture_config + # @return [::Google::Cloud::Container::V1beta1::CompliancePostureConfig] + # Enable/Disable Compliance Posture features for the cluster. # @!attribute [rw] desired_node_kubelet_config # @return [::Google::Cloud::Container::V1beta1::NodeKubeletConfig] # The desired node kubelet config for the cluster. @@ -2629,6 +3069,29 @@ class NodePoolAutoConfig # @return [::Google::Cloud::Container::V1beta1::NodeKubeletConfig] # The desired node kubelet config for all auto-provisioned node pools # in autopilot clusters and node auto-provisioning enabled clusters. + # @!attribute [rw] user_managed_keys_config + # @return [::Google::Cloud::Container::V1beta1::UserManagedKeysConfig] + # The Custom keys configuration for the cluster. + # @!attribute [rw] desired_rbac_binding_config + # @return [::Google::Cloud::Container::V1beta1::RBACBindingConfig] + # RBACBindingConfig allows user to restrict ClusterRoleBindings an + # RoleBindings that can be created. + # @!attribute [rw] desired_enterprise_config + # @return [::Google::Cloud::Container::V1beta1::DesiredEnterpriseConfig] + # The desired enterprise configuration for the cluster. + # @!attribute [rw] desired_disable_l4_lb_firewall_reconciliation + # @return [::Boolean] + # Enable/Disable L4 LB VPC firewall reconciliation for the cluster. + # @!attribute [rw] desired_node_pool_auto_config_linux_node_config + # @return [::Google::Cloud::Container::V1beta1::LinuxNodeConfig] + # The desired Linux node config for all auto-provisioned node pools + # in autopilot clusters and node auto-provisioning enabled clusters. + # + # Currently only `cgroup_mode` can be set here. + # @!attribute [rw] desired_anonymous_authentication_config + # @return [::Google::Cloud::Container::V1beta1::AnonymousAuthenticationConfig] + # Configuration for limiting anonymous access to all endpoints except the + # health checks. class ClusterUpdate include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2659,6 +3122,15 @@ class RangeInfo extend ::Google::Protobuf::MessageExts::ClassMethods end + # DesiredEnterpriseConfig is a wrapper used for updating enterprise_config. + # @!attribute [rw] desired_tier + # @return [::Google::Cloud::Container::V1beta1::EnterpriseConfig::ClusterTier] + # desired_tier specifies the desired tier of the cluster. + class DesiredEnterpriseConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # This operation resource represents operations that may have happened or are # happening on the cluster. All fields are output only. # @!attribute [r] name @@ -2938,13 +3410,13 @@ class Metric # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the parent # field. @@ -2965,20 +3437,20 @@ class CreateClusterRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to retrieve. + # Deprecated. The name of the cluster to retrieve. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -2993,20 +3465,20 @@ class GetClusterRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] update # @return [::Google::Cloud::Container::V1beta1::ClusterUpdate] @@ -3024,25 +3496,25 @@ class UpdateClusterRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_pool_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the node pool to upgrade. + # Deprecated. The name of the node pool to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_version # @return [::String] @@ -3165,6 +3637,17 @@ class UpdateClusterRequest # @!attribute [rw] queued_provisioning # @return [::Google::Cloud::Container::V1beta1::NodePool::QueuedProvisioning] # Specifies the configuration of queued provisioning. + # @!attribute [rw] storage_pools + # @return [::Array<::String>] + # List of Storage Pools where boot disks are provisioned. + # Existing Storage Pools will be replaced with storage-pools. + # @!attribute [rw] max_run_duration + # @return [::Google::Protobuf::Duration] + # The maximum duration for the nodes to exist. + # If unspecified, the nodes can exist indefinitely. + # @!attribute [rw] flex_start + # @return [::Boolean] + # Flex Start flag for enabling Flex Start VM. class UpdateNodePoolRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -3174,25 +3657,25 @@ class UpdateNodePoolRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_pool_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the node pool to upgrade. + # Deprecated. The name of the node pool to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] autoscaling # @return [::Google::Cloud::Container::V1beta1::NodePoolAutoscaling] @@ -3211,20 +3694,20 @@ class SetNodePoolAutoscalingRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] logging_service # @return [::String] @@ -3252,27 +3735,27 @@ class SetLoggingServiceRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] monitoring_service # @return [::String] # Required. The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -3293,20 +3776,20 @@ class SetMonitoringServiceRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] addons_config # @return [::Google::Cloud::Container::V1beta1::AddonsConfig] @@ -3325,20 +3808,20 @@ class SetAddonsConfigRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] locations # @return [::Array<::String>] @@ -3362,20 +3845,20 @@ class SetLocationsRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] master_version # @return [::String] @@ -3402,20 +3885,20 @@ class UpdateMasterRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to upgrade. + # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @!attribute [rw] action # @return [::Google::Cloud::Container::V1beta1::SetMasterAuthRequest::Action] @@ -3454,20 +3937,20 @@ module Action # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to delete. + # Deprecated. The name of the cluster to delete. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -3482,13 +3965,13 @@ class DeleteClusterRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides, or "-" for all zones. This field has been deprecated and # replaced by the parent field. @@ -3520,20 +4003,20 @@ class ListClustersResponse # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] operation_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The server-assigned `name` of the operation. + # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -3548,13 +4031,13 @@ class GetOperationRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) to return # operations for, or `-` for all zones. This field has been deprecated and # replaced by the parent field. @@ -3572,20 +4055,20 @@ class ListOperationsRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # operation resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] operation_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The server-assigned `name` of the operation. + # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -3613,13 +4096,13 @@ class ListOperationsResponse # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) to return # operations for. This field has been deprecated and replaced by the name # field. @@ -3674,6 +4157,9 @@ class ServerConfig # @!attribute [rw] valid_versions # @return [::Array<::String>] # List of valid versions for the channel. + # @!attribute [rw] upgrade_target_version + # @return [::String] + # The auto upgrade target version for clusters on the channel. class ReleaseChannelConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -3746,20 +4232,20 @@ class WindowsVersion # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the parent # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. # @!attribute [rw] node_pool # @return [::Google::Cloud::Container::V1beta1::NodePool] @@ -3778,25 +4264,25 @@ class CreateNodePoolRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_pool_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the node pool to delete. + # Deprecated. The name of the node pool to delete. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -3812,20 +4298,20 @@ class DeleteNodePoolRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the parent field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the parent # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. # @!attribute [rw] parent # @return [::String] @@ -3840,25 +4326,25 @@ class ListNodePoolsRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_pool_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the node pool. + # Deprecated. The name of the node pool. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -4406,25 +4892,25 @@ class DailyMaintenanceWindow # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to update. + # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_pool_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the node pool to update. + # Deprecated. The name of the node pool to update. # This field has been deprecated and replaced by the name field. # @!attribute [rw] management # @return [::Google::Cloud::Container::V1beta1::NodeManagement] @@ -4443,25 +4929,25 @@ class SetNodePoolManagementRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to update. + # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_pool_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the node pool to update. + # Deprecated. The name of the node pool to update. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_count # @return [::Integer] @@ -4489,30 +4975,30 @@ class CompleteNodePoolUpgradeRequest end # RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed - # NodePool upgrade. This will be an no-op if the last upgrade successfully - # completed. + # NodePool upgrade. This will be an no-op if the last upgrade successfully + # completed. # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to rollback. + # Deprecated. The name of the cluster to rollback. # This field has been deprecated and replaced by the name field. # @!attribute [rw] node_pool_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the node pool to rollback. + # Deprecated. The name of the node pool to rollback. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -4651,7 +5137,7 @@ module AutoscalingProfile # available image types. # @!attribute [rw] insecure_kubelet_readonly_port_enabled # @return [::Boolean] - # Enable or disable Kubelet read only port. + # DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead. class AutoprovisioningNodePoolDefaults include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -4680,11 +5166,11 @@ class ResourceLimit # Is autoscaling enabled for this node pool. # @!attribute [rw] min_node_count # @return [::Integer] - # Minimum number of nodes for one location in the NodePool. Must be >= 1 and - # <= max_node_count. + # Minimum number of nodes for one location in the node pool. Must be greater + # than or equal to 0 and less than or equal to max_node_count. # @!attribute [rw] max_node_count # @return [::Integer] - # Maximum number of nodes for one location in the NodePool. Must be >= + # Maximum number of nodes for one location in the node pool. Must be >= # min_node_count. There has to be enough quota to scale up the cluster. # @!attribute [rw] autoprovisioned # @return [::Boolean] @@ -4694,13 +5180,13 @@ class ResourceLimit # Location policy used when scaling up a nodepool. # @!attribute [rw] total_min_node_count # @return [::Integer] - # Minimum number of nodes in the node pool. Must be greater than 1 less than - # total_max_node_count. + # Minimum number of nodes in the node pool. Must be greater than or equal + # to 0 and less than or equal to total_max_node_count. # The total_*_node_count fields are mutually exclusive with the *_node_count # fields. # @!attribute [rw] total_max_node_count # @return [::Integer] - # Maximum number of nodes in the node pool. Must be greater than + # Maximum number of nodes in the node pool. Must be greater than or equal to # total_min_node_count. There has to be enough quota to scale up the cluster. # The total_*_node_count fields are mutually exclusive with the *_node_count # fields. @@ -4729,20 +5215,20 @@ module LocationPolicy # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @!attribute [rw] resource_labels # @return [::Google::Protobuf::Map{::String => ::String}] @@ -4778,20 +5264,20 @@ class ResourceLabelsEntry # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster to update. + # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. # @!attribute [rw] enabled # @return [::Boolean] @@ -4810,20 +5296,20 @@ class SetLegacyAbacRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -4841,20 +5327,20 @@ class StartIPRotationRequest # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @!attribute [rw] name # @return [::String] @@ -4948,11 +5434,36 @@ module GPUDriverVersion # @!attribute [rw] enabled # @return [::Boolean] # Enable Managed Collection. + # @!attribute [rw] auto_monitoring_config + # @return [::Google::Cloud::Container::V1beta1::AutoMonitoringConfig] + # GKE Workload Auto-Monitoring Configuration. class ManagedPrometheusConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # AutoMonitoringConfig defines the configuration for GKE Workload + # Auto-Monitoring. + # @!attribute [rw] scope + # @return [::Google::Cloud::Container::V1beta1::AutoMonitoringConfig::Scope] + # Scope for GKE Workload Auto-Monitoring. + class AutoMonitoringConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Scope for applications monitored by Auto-Monitoring + module Scope + # Not set. + SCOPE_UNSPECIFIED = 0 + + # Auto-Monitoring is enabled for all supported applications. + ALL = 1 + + # Disable Auto-Monitoring. + NONE = 2 + end + end + # WorkloadMetadataConfig defines the metadata configuration to expose to # workloads on the node pool. # @!attribute [rw] node_metadata @@ -5017,20 +5528,20 @@ module Mode # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The Google Developers Console [project ID or project + # Deprecated. The Google Developers Console [project ID or project # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # This field has been deprecated and replaced by the name field. # @!attribute [rw] zone # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the Google Compute Engine + # Deprecated. The name of the Google Compute Engine # [zone](https://cloud.google.com/compute/docs/zones#available) in which the # cluster resides. This field has been deprecated and replaced by the name # field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. Deprecated. The name of the cluster. + # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. # @!attribute [rw] network_policy # @return [::Google::Cloud::Container::V1beta1::NetworkPolicy] @@ -5169,8 +5680,10 @@ module Code CLOUD_KMS_KEY_ERROR = 7 # Cluster CA is expiring soon. - # More codes TBA CA_EXPIRING = 9 + + # Node service account is missing permissions. + NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS = 10 end end @@ -5235,6 +5748,16 @@ module Code # @!attribute [rw] enable_cilium_clusterwide_network_policy # @return [::Boolean] # Whether CiliumClusterWideNetworkPolicy is enabled on this cluster. + # @!attribute [rw] default_enable_private_nodes + # @return [::Boolean] + # Controls whether by default nodes have private IP addresses only. + # It is invalid to specify both [PrivateClusterConfig.enablePrivateNodes][] + # and this field at the same time. + # To update the default setting, use + # {::Google::Cloud::Container::V1beta1::ClusterUpdate#desired_default_enable_private_nodes ClusterUpdate.desired_default_enable_private_nodes} + # @!attribute [rw] disable_l4_lb_firewall_reconciliation + # @return [::Boolean] + # Disable L4 load balancer VPC firewalls to enable firewall policies. class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -5791,7 +6314,7 @@ class Jwk extend ::Google::Protobuf::MessageExts::ClassMethods end - # GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 + # GetJSONWebKeysResponse is a valid JSON Web Key Set as specified in rfc 7517 # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Container::V1beta1::Jwk>] # The public component of the keys used by the cluster to sign token @@ -5828,7 +6351,7 @@ class CheckAutopilotCompatibilityRequest # The name of the resources which are subject to this issue. # @!attribute [rw] documentation_url # @return [::String] - # A URL to a public documnetation, which addresses resolving this issue. + # A URL to a public documentation, which addresses resolving this issue. # @!attribute [rw] description # @return [::String] # The description of the issue. @@ -5919,6 +6442,9 @@ class CostManagementConfig end # Configuration for Cloud TPU. + # This message is deprecated due to the deprecation of 2VM TPU. The end of life + # date for 2VM TPU is 2025-04-25. + # @deprecated This message is deprecated and may be removed in the next major version update. # @!attribute [rw] enabled # @return [::Boolean] # Whether Cloud TPU integration is enabled or not. @@ -5964,7 +6490,7 @@ module State # Enable Autopilot # @!attribute [rw] workload_policy_config # @return [::Google::Cloud::Container::V1beta1::WorkloadPolicyConfig] - # Workload policy configuration for Autopilot. + # WorkloadPolicyConfig is the configuration related to GCW workload policy # @!attribute [r] conversion_status # @return [::Google::Cloud::Container::V1beta1::AutopilotConversionStatus] # Output only. ConversionStatus shows conversion status. @@ -5973,11 +6499,14 @@ class Autopilot extend ::Google::Protobuf::MessageExts::ClassMethods end - # WorkloadPolicyConfig is the configuration of workload policy for autopilot - # clusters. + # WorkloadPolicyConfig is the configuration related to GCW workload policy # @!attribute [rw] allow_net_admin # @return [::Boolean] # If true, workloads can use NET_ADMIN capability. + # @!attribute [rw] autopilot_compatibility_auditing_enabled + # @return [::Boolean] + # If true, enables the GCW Auditor that audits workloads on + # standard clusters. class WorkloadPolicyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -6035,6 +6564,9 @@ module EventType # Corresponds with SecurityBulletinEvent. SECURITY_BULLETIN_EVENT = 3 + + # Corresponds with UpgradeInfoEvent. + UPGRADE_INFO_EVENT = 4 end end @@ -6043,9 +6575,27 @@ module EventType # @!attribute [rw] enabled # @return [::Boolean] # Whether Confidential Nodes feature is enabled. + # @!attribute [rw] confidential_instance_type + # @return [::Google::Cloud::Container::V1beta1::ConfidentialNodes::ConfidentialInstanceType] + # Defines the type of technology used by the confidential node. class ConfidentialNodes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of technology used by the confidential node. + module ConfidentialInstanceType + # No type specified. Do not use this value. + CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED = 0 + + # AMD Secure Encrypted Virtualization. + SEV = 1 + + # AMD Secure Encrypted Virtualization - Secure Nested Paging. + SEV_SNP = 2 + + # Intel Trust Domain eXtension. + TDX = 3 + end end # UpgradeEvent is a notification sent to customers by the cluster server when @@ -6074,6 +6624,86 @@ class UpgradeEvent extend ::Google::Protobuf::MessageExts::ClassMethods end + # UpgradeInfoEvent is a notification sent to customers about the upgrade + # information of a resource. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::Container::V1beta1::UpgradeResourceType] + # The resource type associated with the upgrade. + # @!attribute [rw] operation + # @return [::String] + # The operation associated with this upgrade. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation was started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation ended. + # @!attribute [rw] current_version + # @return [::String] + # The current version before the upgrade. + # @!attribute [rw] target_version + # @return [::String] + # The target version for the upgrade. + # @!attribute [rw] resource + # @return [::String] + # Optional relative path to the resource. For example in node pool upgrades, + # the relative path of the node pool. + # @!attribute [r] state + # @return [::Google::Cloud::Container::V1beta1::UpgradeInfoEvent::State] + # Output only. The state of the upgrade. + # @!attribute [rw] standard_support_end_time + # @return [::Google::Protobuf::Timestamp] + # The end of standard support timestamp. + # @!attribute [rw] extended_support_end_time + # @return [::Google::Protobuf::Timestamp] + # The end of extended support timestamp. + # @!attribute [rw] description + # @return [::String] + # A brief description of the event. + # @!attribute [rw] event_type + # @return [::Google::Cloud::Container::V1beta1::UpgradeInfoEvent::EventType] + # The type of the event. + class UpgradeInfoEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the upgrade. + module State + # STATE_UNSPECIFIED indicates the state is unspecified. + STATE_UNSPECIFIED = 0 + + # STARTED indicates the upgrade has started. + STARTED = 3 + + # SUCCEEDED indicates the upgrade has completed successfully. + SUCCEEDED = 4 + + # FAILED indicates the upgrade has failed. + FAILED = 5 + + # CANCELED indicates the upgrade has canceled. + CANCELED = 6 + end + + # The type of the event. + module EventType + # EVENT_TYPE_UNSPECIFIED indicates the event type is unspecified. + EVENT_TYPE_UNSPECIFIED = 0 + + # END_OF_SUPPORT indicates GKE version reaches end of support, check + # standard_support_end_time and extended_support_end_time for more details. + END_OF_SUPPORT = 1 + + # COS_MILESTONE_VERSION_UPDATE indicates that the COS node image will + # update COS milestone version for new patch versions starting with + # the one in the description. + COS_MILESTONE_VERSION_UPDATE = 2 + + # UPGRADE_LIFECYCLE indicates the event is about the upgrade lifecycle. + UPGRADE_LIFECYCLE = 3 + end + end + # UpgradeAvailableEvent is a notification sent to customers when a new # available version is released. # @!attribute [rw] version @@ -6138,6 +6768,9 @@ class UpgradeAvailableEvent # @return [::Boolean] # If this field is specified, it means there are manual steps that the user # must take to make their clusters safe. + # @!attribute [rw] mitigated_versions + # @return [::Array<::String>] + # The GKE versions where this vulnerability is mitigated. class SecurityBulletinEvent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -6189,6 +6822,15 @@ module Component # kube-controller-manager CONTROLLER_MANAGER = 5 + + # kcp-sshd + KCP_SSHD = 7 + + # kcp connection logs + KCP_CONNECTION = 8 + + # horizontal pod autoscaler decision logs + KCP_HPA = 9 end end @@ -6343,6 +6985,33 @@ module Component # NVIDIA Data Center GPU Manager (DCGM) DCGM = 15 + + # JobSet + JOBSET = 16 + end + end + + # PodAutoscaling is used for configuration of parameters + # for workload autoscaling. + # @!attribute [rw] hpa_profile + # @return [::Google::Cloud::Container::V1beta1::PodAutoscaling::HPAProfile] + # Selected Horizontal Pod Autoscaling profile. + class PodAutoscaling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of Horizontal Pod Autoscaling profile. + module HPAProfile + # HPA_PROFILE_UNSPECIFIED is used when no custom HPA profile is set. + HPA_PROFILE_UNSPECIFIED = 0 + + # Customers explicitly opt-out of HPA profiles. + NONE = 1 + + # PERFORMANCE is used when customers opt-in to the performance HPA profile. + # In this profile we support a higher number of HPAs per cluster and faster + # metrics collection for workload autoscaling. + PERFORMANCE = 2 end end @@ -6366,6 +7035,79 @@ class Fleet extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for all of the cluster's control plane endpoints. + # @!attribute [rw] dns_endpoint_config + # @return [::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig::DNSEndpointConfig] + # DNS endpoint configuration. + # @!attribute [rw] ip_endpoints_config + # @return [::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig::IPEndpointsConfig] + # IP endpoints configuration. + class ControlPlaneEndpointsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the configuration of a DNS endpoint. + # @!attribute [r] endpoint + # @return [::String] + # Output only. The cluster's DNS endpoint configuration. + # A DNS format address. This is accessible from the public internet. + # Ex: uid.us-central1.gke.goog. + # Always present, but the behavior may change according to the value of + # {::Google::Cloud::Container::V1beta1::ControlPlaneEndpointsConfig::DNSEndpointConfig#allow_external_traffic DNSEndpointConfig.allow_external_traffic}. + # @!attribute [rw] allow_external_traffic + # @return [::Boolean] + # Controls whether user traffic is allowed over this endpoint. Note that + # GCP-managed services may still use the endpoint even if this is false. + class DNSEndpointConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # IP endpoints configuration. + # @!attribute [rw] enabled + # @return [::Boolean] + # Controls whether to allow direct IP access. + # @!attribute [rw] enable_public_endpoint + # @return [::Boolean] + # Controls whether the control plane allows access through a public IP. + # It is invalid to specify both + # [PrivateClusterConfig.enablePrivateEndpoint][] and this field at the same + # time. + # @!attribute [rw] global_access + # @return [::Boolean] + # Controls whether the control plane's private endpoint is accessible from + # sources in other regions. + # It is invalid to specify both + # {::Google::Cloud::Container::V1beta1::PrivateClusterMasterGlobalAccessConfig#enabled PrivateClusterMasterGlobalAccessConfig.enabled} + # and this field at the same time. + # @!attribute [rw] authorized_networks_config + # @return [::Google::Cloud::Container::V1beta1::MasterAuthorizedNetworksConfig] + # Configuration of authorized networks. If enabled, restricts access to the + # control plane based on source IP. + # It is invalid to specify both + # [Cluster.masterAuthorizedNetworksConfig][] and this field at the same + # time. + # @!attribute [r] public_endpoint + # @return [::String] + # Output only. The external IP address of this cluster's control plane. + # Only populated if enabled. + # @!attribute [r] private_endpoint + # @return [::String] + # Output only. The internal IP address of this cluster's control plane. + # Only populated if enabled. + # @!attribute [rw] private_endpoint_subnetwork + # @return [::String] + # Subnet to provision the master's private endpoint during cluster + # creation. Specified in projects/*/regions/*/subnetworks/* format. It is + # invalid to specify both + # [PrivateClusterConfig.privateEndpointSubnetwork][] and this field at the + # same time. + class IPEndpointsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # A map of resource manager tag keys and values to be attached to the nodes # for managing Compute Engine firewalls using Network Firewall Policies. # Tags must be according to specifications in @@ -6395,7 +7137,10 @@ class TagsEntry # EnterpriseConfig is the cluster enterprise configuration. # @!attribute [r] cluster_tier # @return [::Google::Cloud::Container::V1beta1::EnterpriseConfig::ClusterTier] - # Output only. cluster_tier specifies the premium tier of the cluster. + # Output only. cluster_tier indicates the effective tier of the cluster. + # @!attribute [rw] desired_tier + # @return [::Google::Cloud::Container::V1beta1::EnterpriseConfig::ClusterTier] + # desired_tier specifies the desired tier of the cluster. class EnterpriseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -6416,10 +7161,26 @@ module ClusterTier # SecretManagerConfig is config for secret manager enablement. # @!attribute [rw] enabled # @return [::Boolean] - # Whether the cluster is configured to use secret manager CSI component. + # Enable/Disable Secret Manager Config. + # @!attribute [rw] rotation_config + # @return [::Google::Cloud::Container::V1beta1::SecretManagerConfig::RotationConfig] + # Rotation config for secret manager. class SecretManagerConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # RotationConfig is config for secret manager auto rotation. + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the rotation is enabled. + # @!attribute [rw] rotation_interval + # @return [::Google::Protobuf::Duration] + # The interval between two consecutive rotations. Default rotation interval + # is 2 minutes. + class RotationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # SecondaryBootDisk represents a persistent disk attached to a node @@ -6453,6 +7214,229 @@ class SecondaryBootDiskUpdateStrategy extend ::Google::Protobuf::MessageExts::ClassMethods end + # FetchClusterUpgradeInfoRequest fetches the upgrade information of a cluster. + # @!attribute [rw] name + # @return [::String] + # Required. The name (project, location, cluster) of the cluster to get. + # Specified in the format `projects/*/locations/*/clusters/*` or + # `projects/*/zones/*/clusters/*`. + # @!attribute [rw] version + # @return [::String] + # API request version that initiates this operation. + class FetchClusterUpgradeInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ClusterUpgradeInfo contains the upgrade information of a cluster. + # @!attribute [rw] minor_target_version + # @return [::String] + # minor_target_version indicates the target version for minor upgrade. + # @!attribute [rw] patch_target_version + # @return [::String] + # patch_target_version indicates the target version for patch upgrade. + # @!attribute [rw] auto_upgrade_status + # @return [::Array<::Google::Cloud::Container::V1beta1::ClusterUpgradeInfo::AutoUpgradeStatus>] + # The auto upgrade status. + # @!attribute [rw] paused_reason + # @return [::Array<::Google::Cloud::Container::V1beta1::ClusterUpgradeInfo::AutoUpgradePausedReason>] + # The auto upgrade paused reason. + # @!attribute [rw] upgrade_details + # @return [::Array<::Google::Cloud::Container::V1beta1::UpgradeDetails>] + # The list of past auto upgrades. + # @!attribute [rw] end_of_standard_support_timestamp + # @return [::String] + # The cluster's current minor version's end of standard support timestamp. + # @!attribute [rw] end_of_extended_support_timestamp + # @return [::String] + # The cluster's current minor version's end of extended support timestamp. + class ClusterUpgradeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # AutoUpgradeStatus indicates the status of auto upgrade. + module AutoUpgradeStatus + # UNKNOWN indicates an unknown status. + UNKNOWN = 0 + + # ACTIVE indicates an active status. + ACTIVE = 1 + + # MINOR_UPGRADE_PAUSED indicates the minor version upgrade is + # paused. + MINOR_UPGRADE_PAUSED = 4 + + # UPGRADE_PAUSED indicates the upgrade is paused. + UPGRADE_PAUSED = 5 + end + + # AutoUpgradePausedReason indicates the reason for auto upgrade paused + # status. + module AutoUpgradePausedReason + # AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason. + AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED = 0 + + # MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance + # window. + MAINTENANCE_WINDOW = 1 + + # MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a + # maintenance exclusion with scope NO_UPGRADES. + MAINTENANCE_EXCLUSION_NO_UPGRADES = 5 + + # MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a + # maintenance exclusion with scope NO_MINOR_UPGRADES. + MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES = 6 + + # CLUSTER_DISRUPTION_BUDGET indicates the cluster is outside the cluster + # disruption budget. + CLUSTER_DISRUPTION_BUDGET = 4 + + # CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE indicates the cluster is outside + # the cluster disruption budget for minor version upgrade. + CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE = 7 + + # SYSTEM_CONFIG indicates the cluster upgrade is paused by system config. + SYSTEM_CONFIG = 8 + end + end + + # UpgradeDetails contains detailed information of each individual upgrade + # operation. + # @!attribute [r] state + # @return [::Google::Cloud::Container::V1beta1::UpgradeDetails::State] + # Output only. The state of the upgrade. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The start timestamp of the upgrade. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The end timestamp of the upgrade. + # @!attribute [rw] initial_version + # @return [::String] + # The version before the upgrade. + # @!attribute [rw] target_version + # @return [::String] + # The version after the upgrade. + # @!attribute [rw] start_type + # @return [::Google::Cloud::Container::V1beta1::UpgradeDetails::StartType] + # The start type of the upgrade. + class UpgradeDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State indicates the state of the upgrade. + module State + # Upgrade state is unknown. + UNKNOWN = 0 + + # Upgrade has failed with an error. + FAILED = 1 + + # Upgrade has succeeded. + SUCCEEDED = 2 + + # Upgrade has been canceled. + CANCELED = 3 + + # Upgrade is running. + RUNNING = 4 + end + + # StartType indicates the type of starting the upgrade. + module StartType + # Upgrade start type is unspecified. + START_TYPE_UNSPECIFIED = 0 + + # Upgrade started automatically. + AUTOMATIC = 1 + + # Upgrade started manually. + MANUAL = 2 + end + end + + # FetchNodePoolUpgradeInfoRequest fetches the upgrade information of a + # nodepool. + # @!attribute [rw] name + # @return [::String] + # Required. The name (project, location, cluster, nodepool) of the nodepool + # to get. Specified in the format + # `projects/*/locations/*/clusters/*/nodePools/*` or + # `projects/*/zones/*/clusters/*/nodePools/*`. + # @!attribute [rw] version + # @return [::String] + # API request version that initiates this operation. + class FetchNodePoolUpgradeInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NodePoolUpgradeInfo contains the upgrade information of a nodepool. + # @!attribute [rw] minor_target_version + # @return [::String] + # minor_target_version indicates the target version for minor upgrade. + # @!attribute [rw] patch_target_version + # @return [::String] + # patch_target_version indicates the target version for patch upgrade. + # @!attribute [rw] auto_upgrade_status + # @return [::Array<::Google::Cloud::Container::V1beta1::NodePoolUpgradeInfo::AutoUpgradeStatus>] + # The auto upgrade status. + # @!attribute [rw] paused_reason + # @return [::Array<::Google::Cloud::Container::V1beta1::NodePoolUpgradeInfo::AutoUpgradePausedReason>] + # The auto upgrade paused reason. + # @!attribute [rw] upgrade_details + # @return [::Array<::Google::Cloud::Container::V1beta1::UpgradeDetails>] + # The list of past auto upgrades. + # @!attribute [rw] end_of_standard_support_timestamp + # @return [::String] + # The nodepool's current minor version's end of standard support timestamp. + # @!attribute [rw] end_of_extended_support_timestamp + # @return [::String] + # The nodepool's current minor version's end of extended support timestamp. + class NodePoolUpgradeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # AutoUpgradeStatus indicates the status of auto upgrade. + module AutoUpgradeStatus + # UNKNOWN indicates an unknown status. + UNKNOWN = 0 + + # ACTIVE indicates an active status. + ACTIVE = 1 + + # MINOR_UPGRADE_PAUSED indicates the minor version upgrade is + # paused. + MINOR_UPGRADE_PAUSED = 2 + + # UPGRADE_PAUSED indicates the upgrade is paused. + UPGRADE_PAUSED = 3 + end + + # AutoUpgradePausedReason indicates the reason for auto upgrade paused + # status. + module AutoUpgradePausedReason + # AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason. + AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED = 0 + + # MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance + # window. + MAINTENANCE_WINDOW = 1 + + # MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a + # maintenance exclusion with scope NO_UPGRADES. + MAINTENANCE_EXCLUSION_NO_UPGRADES = 2 + + # MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a + # maintenance exclusion with scope NO_MINOR_UPGRADES. + MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES = 3 + + # SYSTEM_CONFIG indicates the cluster upgrade is paused by system config. + SYSTEM_CONFIG = 4 + end + end + # PrivateIPv6GoogleAccess controls whether and how the pods can communicate # with Google Services through gRPC over IPv6. module PrivateIPv6GoogleAccess diff --git a/google-cloud-container-v1beta1/snippets/cluster_manager/fetch_cluster_upgrade_info.rb b/google-cloud-container-v1beta1/snippets/cluster_manager/fetch_cluster_upgrade_info.rb new file mode 100644 index 000000000000..ed5343e071b8 --- /dev/null +++ b/google-cloud-container-v1beta1/snippets/cluster_manager/fetch_cluster_upgrade_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 container_v1beta1_generated_ClusterManager_FetchClusterUpgradeInfo_sync] +require "google/cloud/container/v1beta1" + +## +# Snippet for the fetch_cluster_upgrade_info call in the ClusterManager 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::Container::V1beta1::ClusterManager::Client#fetch_cluster_upgrade_info. +# +def fetch_cluster_upgrade_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest.new + + # Call the fetch_cluster_upgrade_info method. + result = client.fetch_cluster_upgrade_info request + + # The returned object is of type Google::Cloud::Container::V1beta1::ClusterUpgradeInfo. + p result +end +# [END container_v1beta1_generated_ClusterManager_FetchClusterUpgradeInfo_sync] diff --git a/google-cloud-container-v1beta1/snippets/cluster_manager/fetch_node_pool_upgrade_info.rb b/google-cloud-container-v1beta1/snippets/cluster_manager/fetch_node_pool_upgrade_info.rb new file mode 100644 index 000000000000..d6f27ee9af71 --- /dev/null +++ b/google-cloud-container-v1beta1/snippets/cluster_manager/fetch_node_pool_upgrade_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 container_v1beta1_generated_ClusterManager_FetchNodePoolUpgradeInfo_sync] +require "google/cloud/container/v1beta1" + +## +# Snippet for the fetch_node_pool_upgrade_info call in the ClusterManager 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::Container::V1beta1::ClusterManager::Client#fetch_node_pool_upgrade_info. +# +def fetch_node_pool_upgrade_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest.new + + # Call the fetch_node_pool_upgrade_info method. + result = client.fetch_node_pool_upgrade_info request + + # The returned object is of type Google::Cloud::Container::V1beta1::NodePoolUpgradeInfo. + p result +end +# [END container_v1beta1_generated_ClusterManager_FetchNodePoolUpgradeInfo_sync] diff --git a/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json b/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json index 280d5450d9b5..4afea57e424a 100644 --- a/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json +++ b/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json @@ -1410,6 +1410,86 @@ "type": "FULL" } ] + }, + { + "region_tag": "container_v1beta1_generated_ClusterManager_FetchClusterUpgradeInfo_sync", + "title": "Snippet for the fetch_cluster_upgrade_info call in the ClusterManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Container::V1beta1::ClusterManager::Client#fetch_cluster_upgrade_info.", + "file": "cluster_manager/fetch_cluster_upgrade_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_cluster_upgrade_info", + "full_name": "::Google::Cloud::Container::V1beta1::ClusterManager::Client#fetch_cluster_upgrade_info", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Container::V1beta1::ClusterUpgradeInfo", + "client": { + "short_name": "ClusterManager::Client", + "full_name": "::Google::Cloud::Container::V1beta1::ClusterManager::Client" + }, + "method": { + "short_name": "FetchClusterUpgradeInfo", + "full_name": "google.container.v1beta1.ClusterManager.FetchClusterUpgradeInfo", + "service": { + "short_name": "ClusterManager", + "full_name": "google.container.v1beta1.ClusterManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "container_v1beta1_generated_ClusterManager_FetchNodePoolUpgradeInfo_sync", + "title": "Snippet for the fetch_node_pool_upgrade_info call in the ClusterManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Container::V1beta1::ClusterManager::Client#fetch_node_pool_upgrade_info.", + "file": "cluster_manager/fetch_node_pool_upgrade_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_node_pool_upgrade_info", + "full_name": "::Google::Cloud::Container::V1beta1::ClusterManager::Client#fetch_node_pool_upgrade_info", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Container::V1beta1::NodePoolUpgradeInfo", + "client": { + "short_name": "ClusterManager::Client", + "full_name": "::Google::Cloud::Container::V1beta1::ClusterManager::Client" + }, + "method": { + "short_name": "FetchNodePoolUpgradeInfo", + "full_name": "google.container.v1beta1.ClusterManager.FetchNodePoolUpgradeInfo", + "service": { + "short_name": "ClusterManager", + "full_name": "google.container.v1beta1.ClusterManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_paths_test.rb b/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_paths_test.rb index 3ac40a71aed1..6374810a4cd8 100644 --- a/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_paths_test.rb +++ b/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_paths_test.rb @@ -41,6 +41,30 @@ def logger end end + def test_ca_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ca_pool_path project: "value0", location: "value1", ca_pool: "value2" + assert_equal "projects/value0/locations/value1/caPools/value2", path + end + end + + def test_crypto_key_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + def test_topic_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb b/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb index 033ecfd1bdbb..750f4396e8fb 100644 --- a/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb +++ b/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb @@ -359,6 +359,9 @@ def test_update_node_pool resource_manager_tags = {} containerd_config = {} queued_provisioning = {} + storage_pools = ["hello world"] + max_run_duration = {} + flex_start = true update_node_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :update_node_pool, name @@ -394,6 +397,10 @@ def test_update_node_pool assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Container::V1beta1::ResourceManagerTags), request["resource_manager_tags"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Container::V1beta1::ContainerdConfig), request["containerd_config"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Container::V1beta1::NodePool::QueuedProvisioning), request["queued_provisioning"] + assert_equal ["hello world"], request["storage_pools"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["max_run_duration"] + assert_equal true, request["flex_start"] + assert request.has_flex_start? refute_nil options end @@ -404,31 +411,31 @@ def test_update_node_pool end # Use hash object - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning }) do |response, operation| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning do |response, operation| + client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.update_node_pool ::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning) do |response, operation| + client.update_node_pool ::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning }, grpc_options) do |response, operation| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.update_node_pool(::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning), grpc_options) do |response, operation| + client.update_node_pool(::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end @@ -2383,6 +2390,126 @@ def test_list_locations end end + def test_fetch_cluster_upgrade_info + # Create GRPC objects. + grpc_response = ::Google::Cloud::Container::V1beta1::ClusterUpgradeInfo.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" + version = "hello world" + + fetch_cluster_upgrade_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_cluster_upgrade_info, name + assert_kind_of ::Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_cluster_upgrade_info_client_stub do + # Create client + client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_cluster_upgrade_info({ name: name, version: version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_cluster_upgrade_info name: name, version: version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_cluster_upgrade_info ::Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest.new(name: name, version: version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_cluster_upgrade_info({ name: name, version: version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_cluster_upgrade_info(::Google::Cloud::Container::V1beta1::FetchClusterUpgradeInfoRequest.new(name: name, version: version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_cluster_upgrade_info_client_stub.call_rpc_count + end + end + + def test_fetch_node_pool_upgrade_info + # Create GRPC objects. + grpc_response = ::Google::Cloud::Container::V1beta1::NodePoolUpgradeInfo.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" + version = "hello world" + + fetch_node_pool_upgrade_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_node_pool_upgrade_info, name + assert_kind_of ::Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_node_pool_upgrade_info_client_stub do + # Create client + client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_node_pool_upgrade_info({ name: name, version: version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_node_pool_upgrade_info name: name, version: version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_node_pool_upgrade_info ::Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest.new(name: name, version: version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_node_pool_upgrade_info({ name: name, version: version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_node_pool_upgrade_info(::Google::Cloud::Container::V1beta1::FetchNodePoolUpgradeInfoRequest.new(name: name, version: version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_node_pool_upgrade_info_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From 393c9b6834bc1daa0c9e2a782ad916bb5683b9f4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:38:38 -0700 Subject: [PATCH 081/457] feat: add topology_manager in NodeKubeletConfig (#30442) feat: add image_gc_low_threshold_percent in NodeKubeletConfig feat: add image_gc_high_threshold_percent in NodeKubeletConfig feat: add image_minimum_gc_age in NodeKubeletConfig feat: add image_maximum_gc_age in NodeKubeletConfig feat: add container_log_max_size in NodeKubeletConfig feat: add container_log_max_files in NodeKubeletConfig feat: add allowed_unsafe_sysctls in NodeKubeletConfig feat: add max_run_duration in NodeConfig feat: add flex_start in NodeConfig feat: add performance_monitoring_unit in AdvancedMachineFeatures feat: add high_scale_checkpointing_config in AddonsConfig feat: add alpha_cluster_feature_gates in Cluster feat: add pod_autoscaling in Cluster feat: add desired_pod_autoscaling in ClusterUpdate feat: add desired_disable_l4_lb_firewall_reconciliation in ClusterUpdate feat: add desired_anonymous_authentication_config in ClusterUpdate feat: add max_run_duration in UpdateNodePoolRequest feat: add flex_start in UpdateNodePoolRequest feat: add NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS in StatusCondition.Code feat: add disable_l4_lb_firewall_reconciliation in NetworkConfig feat: add UPGRADE_INFO_EVENT in NotificationConfig.EventType feat: add confidential_instance_type in ConfidentialNodes feat: add event_type in UpgradeInfoEvent feat: add standard_support_end_time in UpgradeInfoEvent feat: add extended_support_end_time in UpgradeInfoEvent feat: add mitigated_versions in SecurityBulletinEvent feat: add autopilot_compatibility_auditing_enabled in WorkloadPolicyConfig feat: add KCP_HPA in LoggingComponentConfig.Component feat: add JOBSET in MonitoringComponentConfig.Component feat: add auto_monitoring_config in ManagedPrometheusConfig feat: add data_cache_count in EphemeralStorageLocalSsdConfig feat: add FetchClusterUpgradeInfoRequest feat: add ClusterUpgradeInfo feat: add UpgradeDetails feat: add FetchNodePoolUpgradeInfoRequest feat: add NodePoolUpgradeInfo docs: Minor documentation updates --- .../.owlbot-manifest.json | 2 + google-cloud-container-v1/gapic_metadata.json | 10 + .../container/v1/cluster_manager/client.rb | 202 +++++- .../v1/cluster_manager/rest/client.rb | 188 +++++- .../v1/cluster_manager/rest/service_stub.rb | 136 ++++ .../google/container/v1/cluster_service_pb.rb | 26 +- .../v1/cluster_service_services_pb.rb | 6 + .../google/container/v1/cluster_service.rb | 636 +++++++++++++++++- .../fetch_cluster_upgrade_info.rb | 47 ++ .../fetch_node_pool_upgrade_info.rb | 47 ++ .../snippet_metadata_google.container.v1.json | 80 +++ .../container/v1/cluster_manager_rest_test.rb | 122 +++- .../container/v1/cluster_manager_test.rb | 135 +++- 13 files changed, 1596 insertions(+), 41 deletions(-) create mode 100644 google-cloud-container-v1/snippets/cluster_manager/fetch_cluster_upgrade_info.rb create mode 100644 google-cloud-container-v1/snippets/cluster_manager/fetch_node_pool_upgrade_info.rb diff --git a/google-cloud-container-v1/.owlbot-manifest.json b/google-cloud-container-v1/.owlbot-manifest.json index 76df95415ab1..902edd634878 100644 --- a/google-cloud-container-v1/.owlbot-manifest.json +++ b/google-cloud-container-v1/.owlbot-manifest.json @@ -48,6 +48,8 @@ "snippets/cluster_manager/create_node_pool.rb", "snippets/cluster_manager/delete_cluster.rb", "snippets/cluster_manager/delete_node_pool.rb", + "snippets/cluster_manager/fetch_cluster_upgrade_info.rb", + "snippets/cluster_manager/fetch_node_pool_upgrade_info.rb", "snippets/cluster_manager/get_cluster.rb", "snippets/cluster_manager/get_json_web_keys.rb", "snippets/cluster_manager/get_node_pool.rb", diff --git a/google-cloud-container-v1/gapic_metadata.json b/google-cloud-container-v1/gapic_metadata.json index a4969939fc1b..b1e81c12a41d 100644 --- a/google-cloud-container-v1/gapic_metadata.json +++ b/google-cloud-container-v1/gapic_metadata.json @@ -179,6 +179,16 @@ "methods": [ "check_autopilot_compatibility" ] + }, + "FetchClusterUpgradeInfo": { + "methods": [ + "fetch_cluster_upgrade_info" + ] + }, + "FetchNodePoolUpgradeInfo": { + "methods": [ + "fetch_node_pool_upgrade_info" + ] } } } diff --git a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/client.rb b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/client.rb index eff0643af346..ec07d4de2bc6 100644 --- a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/client.rb +++ b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/client.rb @@ -689,7 +689,7 @@ def update_cluster request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil) + # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil) # Pass arguments to `update_node_pool` 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). @@ -809,6 +809,11 @@ def update_cluster request, options = nil # @param storage_pools [::Array<::String>] # List of Storage Pools where boot disks are provisioned. # Existing Storage Pools will be replaced with storage-pools. + # @param max_run_duration [::Google::Protobuf::Duration, ::Hash] + # The maximum duration for the nodes to exist. + # If unspecified, the nodes can exist indefinitely. + # @param flex_start [::Boolean] + # Flex Start flag for enabling Flex Start VM. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Container::V1::Operation] @@ -1122,7 +1127,7 @@ def set_logging_service request, options = nil # Required. The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -3806,6 +3811,185 @@ def check_autopilot_compatibility request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Fetch upgrade information of a specific cluster. + # + # @overload fetch_cluster_upgrade_info(request, options = nil) + # Pass arguments to `fetch_cluster_upgrade_info` via a request object, either of type + # {::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest, ::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 fetch_cluster_upgrade_info(name: nil, version: nil) + # Pass arguments to `fetch_cluster_upgrade_info` 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 name (project, location, cluster) of the cluster to get. + # Specified in the format `projects/*/locations/*/clusters/*` or + # `projects/*/zones/*/clusters/*`. + # @param version [::String] + # API request version that initiates this operation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Container::V1::ClusterUpgradeInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Container::V1::ClusterUpgradeInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/container/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Container::V1::ClusterManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new + # + # # Call the fetch_cluster_upgrade_info method. + # result = client.fetch_cluster_upgrade_info request + # + # # The returned object is of type Google::Cloud::Container::V1::ClusterUpgradeInfo. + # p result + # + def fetch_cluster_upgrade_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest + + # 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.fetch_cluster_upgrade_info.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::Container::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_cluster_upgrade_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_cluster_upgrade_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cluster_manager_stub.call_rpc :fetch_cluster_upgrade_info, 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 + + ## + # Fetch upgrade information of a specific nodepool. + # + # @overload fetch_node_pool_upgrade_info(request, options = nil) + # Pass arguments to `fetch_node_pool_upgrade_info` via a request object, either of type + # {::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest, ::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 fetch_node_pool_upgrade_info(name: nil, version: nil) + # Pass arguments to `fetch_node_pool_upgrade_info` 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 name (project, location, cluster, nodepool) of the nodepool + # to get. Specified in the format + # `projects/*/locations/*/clusters/*/nodePools/*` or + # `projects/*/zones/*/clusters/*/nodePools/*`. + # @param version [::String] + # API request version that initiates this operation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Container::V1::NodePoolUpgradeInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Container::V1::NodePoolUpgradeInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/container/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Container::V1::ClusterManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new + # + # # Call the fetch_node_pool_upgrade_info method. + # result = client.fetch_node_pool_upgrade_info request + # + # # The returned object is of type Google::Cloud::Container::V1::NodePoolUpgradeInfo. + # p result + # + def fetch_node_pool_upgrade_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest + + # 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.fetch_node_pool_upgrade_info.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::Container::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_node_pool_upgrade_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_node_pool_upgrade_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cluster_manager_stub.call_rpc :fetch_node_pool_upgrade_info, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the ClusterManager API. # @@ -4142,6 +4326,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :check_autopilot_compatibility + ## + # RPC-specific configuration for `fetch_cluster_upgrade_info` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_cluster_upgrade_info + ## + # RPC-specific configuration for `fetch_node_pool_upgrade_info` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_node_pool_upgrade_info # @private def initialize parent_rpcs = nil @@ -4213,6 +4407,10 @@ def initialize parent_rpcs = nil @list_usable_subnetworks = ::Gapic::Config::Method.new list_usable_subnetworks_config check_autopilot_compatibility_config = parent_rpcs.check_autopilot_compatibility if parent_rpcs.respond_to? :check_autopilot_compatibility @check_autopilot_compatibility = ::Gapic::Config::Method.new check_autopilot_compatibility_config + fetch_cluster_upgrade_info_config = parent_rpcs.fetch_cluster_upgrade_info if parent_rpcs.respond_to? :fetch_cluster_upgrade_info + @fetch_cluster_upgrade_info = ::Gapic::Config::Method.new fetch_cluster_upgrade_info_config + fetch_node_pool_upgrade_info_config = parent_rpcs.fetch_node_pool_upgrade_info if parent_rpcs.respond_to? :fetch_node_pool_upgrade_info + @fetch_node_pool_upgrade_info = ::Gapic::Config::Method.new fetch_node_pool_upgrade_info_config yield self if block_given? end diff --git a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/client.rb b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/client.rb index 1a9a11c972a3..a416b28001f4 100644 --- a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/client.rb +++ b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/client.rb @@ -654,7 +654,7 @@ def update_cluster request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil) + # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil) # Pass arguments to `update_node_pool` 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). @@ -774,6 +774,11 @@ def update_cluster request, options = nil # @param storage_pools [::Array<::String>] # List of Storage Pools where boot disks are provisioned. # Existing Storage Pools will be replaced with storage-pools. + # @param max_run_duration [::Google::Protobuf::Duration, ::Hash] + # The maximum duration for the nodes to exist. + # If unspecified, the nodes can exist indefinitely. + # @param flex_start [::Boolean] + # Flex Start flag for enabling Flex Start VM. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1066,7 +1071,7 @@ def set_logging_service request, options = nil # Required. The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -3559,6 +3564,171 @@ def check_autopilot_compatibility request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Fetch upgrade information of a specific cluster. + # + # @overload fetch_cluster_upgrade_info(request, options = nil) + # Pass arguments to `fetch_cluster_upgrade_info` via a request object, either of type + # {::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest, ::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 fetch_cluster_upgrade_info(name: nil, version: nil) + # Pass arguments to `fetch_cluster_upgrade_info` 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 name (project, location, cluster) of the cluster to get. + # Specified in the format `projects/*/locations/*/clusters/*` or + # `projects/*/zones/*/clusters/*`. + # @param version [::String] + # API request version that initiates this operation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Container::V1::ClusterUpgradeInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Container::V1::ClusterUpgradeInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/container/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Container::V1::ClusterManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new + # + # # Call the fetch_cluster_upgrade_info method. + # result = client.fetch_cluster_upgrade_info request + # + # # The returned object is of type Google::Cloud::Container::V1::ClusterUpgradeInfo. + # p result + # + def fetch_cluster_upgrade_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest + + # 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.fetch_cluster_upgrade_info.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::Container::V1::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.fetch_cluster_upgrade_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_cluster_upgrade_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cluster_manager_stub.fetch_cluster_upgrade_info 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 + + ## + # Fetch upgrade information of a specific nodepool. + # + # @overload fetch_node_pool_upgrade_info(request, options = nil) + # Pass arguments to `fetch_node_pool_upgrade_info` via a request object, either of type + # {::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest, ::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 fetch_node_pool_upgrade_info(name: nil, version: nil) + # Pass arguments to `fetch_node_pool_upgrade_info` 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 name (project, location, cluster, nodepool) of the nodepool + # to get. Specified in the format + # `projects/*/locations/*/clusters/*/nodePools/*` or + # `projects/*/zones/*/clusters/*/nodePools/*`. + # @param version [::String] + # API request version that initiates this operation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Container::V1::NodePoolUpgradeInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Container::V1::NodePoolUpgradeInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/container/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Container::V1::ClusterManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new + # + # # Call the fetch_node_pool_upgrade_info method. + # result = client.fetch_node_pool_upgrade_info request + # + # # The returned object is of type Google::Cloud::Container::V1::NodePoolUpgradeInfo. + # p result + # + def fetch_node_pool_upgrade_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest + + # 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.fetch_node_pool_upgrade_info.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::Container::V1::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.fetch_node_pool_upgrade_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_node_pool_upgrade_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cluster_manager_stub.fetch_node_pool_upgrade_info 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 + ## # Configuration class for the ClusterManager REST API. # @@ -3875,6 +4045,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :check_autopilot_compatibility + ## + # RPC-specific configuration for `fetch_cluster_upgrade_info` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_cluster_upgrade_info + ## + # RPC-specific configuration for `fetch_node_pool_upgrade_info` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_node_pool_upgrade_info # @private def initialize parent_rpcs = nil @@ -3946,6 +4126,10 @@ def initialize parent_rpcs = nil @list_usable_subnetworks = ::Gapic::Config::Method.new list_usable_subnetworks_config check_autopilot_compatibility_config = parent_rpcs.check_autopilot_compatibility if parent_rpcs.respond_to? :check_autopilot_compatibility @check_autopilot_compatibility = ::Gapic::Config::Method.new check_autopilot_compatibility_config + fetch_cluster_upgrade_info_config = parent_rpcs.fetch_cluster_upgrade_info if parent_rpcs.respond_to? :fetch_cluster_upgrade_info + @fetch_cluster_upgrade_info = ::Gapic::Config::Method.new fetch_cluster_upgrade_info_config + fetch_node_pool_upgrade_info_config = parent_rpcs.fetch_node_pool_upgrade_info if parent_rpcs.respond_to? :fetch_node_pool_upgrade_info + @fetch_node_pool_upgrade_info = ::Gapic::Config::Method.new fetch_node_pool_upgrade_info_config yield self if block_given? end diff --git a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/service_stub.rb b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/service_stub.rb index 98cbad48b595..4086007bb91a 100644 --- a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/service_stub.rb +++ b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/service_stub.rb @@ -1433,6 +1433,86 @@ def check_autopilot_compatibility request_pb, options = nil end end + ## + # Baseline implementation for the fetch_cluster_upgrade_info REST call + # + # @param request_pb [::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest] + # 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::Container::V1::ClusterUpgradeInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Container::V1::ClusterUpgradeInfo] + # A result object deserialized from the server's reply + def fetch_cluster_upgrade_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_cluster_upgrade_info_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: "fetch_cluster_upgrade_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Container::V1::ClusterUpgradeInfo.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_node_pool_upgrade_info REST call + # + # @param request_pb [::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest] + # 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::Container::V1::NodePoolUpgradeInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Container::V1::NodePoolUpgradeInfo] + # A result object deserialized from the server's reply + def fetch_node_pool_upgrade_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_node_pool_upgrade_info_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: "fetch_node_pool_upgrade_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Container::V1::NodePoolUpgradeInfo.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -2462,6 +2542,62 @@ def self.transcode_check_autopilot_compatibility_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_cluster_upgrade_info REST call + # + # @param request_pb [::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_cluster_upgrade_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:fetchClusterUpgradeInfo", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:fetchClusterUpgradeInfo", + matches: [ + ["name", %r{^projects/[^/]+/zones/[^/]+/clusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_node_pool_upgrade_info REST call + # + # @param request_pb [::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_node_pool_upgrade_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:fetchNodePoolUpgradeInfo", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:fetchNodePoolUpgradeInfo", + matches: [ + ["name", %r{^projects/[^/]+/zones/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-container-v1/lib/google/container/v1/cluster_service_pb.rb b/google-cloud-container-v1/lib/google/container/v1/cluster_service_pb.rb index 6f6242038ab4..b6394347bd4e 100644 --- a/google-cloud-container-v1/lib/google/container/v1/cluster_service_pb.rb +++ b/google-cloud-container-v1/lib/google/container/v1/cluster_service_pb.rb @@ -16,7 +16,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n)google/container/v1/cluster_service.proto\x12\x13google.container.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x15google/rpc/code.proto\x1a\x17google/rpc/status.proto\"\x80\x04\n\x0fLinuxNodeConfig\x12\x42\n\x07sysctls\x18\x01 \x03(\x0b\x32\x31.google.container.v1.LinuxNodeConfig.SysctlsEntry\x12\x44\n\x0b\x63group_mode\x18\x02 \x01(\x0e\x32/.google.container.v1.LinuxNodeConfig.CgroupMode\x12Q\n\thugepages\x18\x03 \x01(\x0b\x32\x34.google.container.v1.LinuxNodeConfig.HugepagesConfigB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x7f\n\x0fHugepagesConfig\x12!\n\x0fhugepage_size2m\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0fhugepage_size1g\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x12\n\x10_hugepage_size2mB\x12\n\x10_hugepage_size1g\x1a.\n\x0cSysctlsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\nCgroupMode\x12\x1b\n\x17\x43GROUP_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43GROUP_MODE_V1\x10\x01\x12\x12\n\x0e\x43GROUP_MODE_V2\x10\x02\x42\x0c\n\n_hugepages\"\xb4\x01\n\x11WindowsNodeConfig\x12\x44\n\nos_version\x18\x01 \x01(\x0e\x32\x30.google.container.v1.WindowsNodeConfig.OSVersion\"Y\n\tOSVersion\x12\x1a\n\x16OS_VERSION_UNSPECIFIED\x10\x00\x12\x17\n\x13OS_VERSION_LTSC2019\x10\x01\x12\x17\n\x13OS_VERSION_LTSC2022\x10\x02\"\xf8\x01\n\x11NodeKubeletConfig\x12\x1a\n\x12\x63pu_manager_policy\x18\x01 \x01(\t\x12\x31\n\rcpu_cfs_quota\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x1c\n\x14\x63pu_cfs_quota_period\x18\x03 \x01(\t\x12\x16\n\x0epod_pids_limit\x18\x04 \x01(\x03\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\x07 \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"\xca\x15\n\nNodeConfig\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x05\x12\x14\n\x0coauth_scopes\x18\x03 \x03(\t\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12?\n\x08metadata\x18\x04 \x03(\x0b\x32-.google.container.v1.NodeConfig.MetadataEntry\x12\x12\n\nimage_type\x18\x05 \x01(\t\x12;\n\x06labels\x18\x06 \x03(\x0b\x32+.google.container.v1.NodeConfig.LabelsEntry\x12\x17\n\x0flocal_ssd_count\x18\x07 \x01(\x05\x12\x0c\n\x04tags\x18\x08 \x03(\t\x12\x13\n\x0bpreemptible\x18\n \x01(\x08\x12<\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32&.google.container.v1.AcceleratorConfig\x12\x11\n\tdisk_type\x18\x0c \x01(\t\x12\x18\n\x10min_cpu_platform\x18\r \x01(\t\x12M\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32+.google.container.v1.WorkloadMetadataConfig\x12.\n\x06taints\x18\x0f \x03(\x0b\x32\x1e.google.container.v1.NodeTaint\x12:\n\x0esandbox_config\x18\x11 \x01(\x0b\x32\".google.container.v1.SandboxConfig\x12\x12\n\nnode_group\x18\x12 \x01(\t\x12\x46\n\x14reservation_affinity\x18\x13 \x01(\x0b\x32(.google.container.v1.ReservationAffinity\x12M\n\x18shielded_instance_config\x18\x14 \x01(\x0b\x32+.google.container.v1.ShieldedInstanceConfig\x12?\n\x11linux_node_config\x18\x15 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12>\n\x0ekubelet_config\x18\x16 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\x17 \x01(\t\x12\x34\n\x0bgcfs_config\x18\x19 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12O\n\x19\x61\x64vanced_machine_features\x18\x1a \x01(\x0b\x32,.google.container.v1.AdvancedMachineFeatures\x12.\n\x05gvnic\x18\x1d \x01(\x0b\x32\x1f.google.container.v1.VirtualNIC\x12\x0c\n\x04spot\x18 \x01(\x08\x12\x42\n\x12\x63onfidential_nodes\x18# \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12\x39\n\x0b\x66\x61st_socket\x18$ \x01(\x0b\x32\x1f.google.container.v1.FastSocketH\x00\x88\x01\x01\x12L\n\x0fresource_labels\x18% \x03(\x0b\x32\x33.google.container.v1.NodeConfig.ResourceLabelsEntry\x12\x42\n\x0elogging_config\x18& \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12\x43\n\x13windows_node_config\x18\' \x01(\x0b\x32&.google.container.v1.WindowsNodeConfig\x12Q\n\x1blocal_nvme_ssd_block_config\x18( \x01(\x0b\x32,.google.container.v1.LocalNvmeSsdBlockConfig\x12_\n\"ephemeral_storage_local_ssd_config\x18) \x01(\x0b\x32\x33.google.container.v1.EphemeralStorageLocalSsdConfig\x12\x41\n\x12sole_tenant_config\x18* \x01(\x0b\x32%.google.container.v1.SoleTenantConfig\x12@\n\x11\x63ontainerd_config\x18+ \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12G\n\x15resource_manager_tags\x18- \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12(\n\x1b\x65nable_confidential_storage\x18. \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x14secondary_boot_disks\x18\x30 \x03(\x0b\x32&.google.container.v1.SecondaryBootDisk\x12\x15\n\rstorage_pools\x18\x31 \x03(\t\x12\x66\n#secondary_boot_disk_update_strategy\x18\x32 \x01(\x0b\x32\x34.google.container.v1.SecondaryBootDiskUpdateStrategyH\x01\x88\x01\x01\x12^\n\x19local_ssd_encryption_mode\x18\x36 \x01(\x0e\x32\x36.google.container.v1.NodeConfig.LocalSsdEncryptionModeH\x02\x88\x01\x01\x12W\n\x15\x65\x66\x66\x65\x63tive_cgroup_mode\x18\x37 \x01(\x0e\x32\x33.google.container.v1.NodeConfig.EffectiveCgroupModeB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x16LocalSsdEncryptionMode\x12)\n%LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_ENCRYPTION\x10\x01\x12\x1c\n\x18\x45PHEMERAL_KEY_ENCRYPTION\x10\x02\"x\n\x13\x45\x66\x66\x65\x63tiveCgroupMode\x12%\n!EFFECTIVE_CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V1\x10\x01\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V2\x10\x02\x42\x0e\n\x0c_fast_socketB&\n$_secondary_boot_disk_update_strategyB\x1c\n\x1a_local_ssd_encryption_mode\"\x99\x01\n\x17\x41\x64vancedMachineFeatures\x12\x1d\n\x10threads_per_core\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x13\n\x11_threads_per_coreB\x1f\n\x1d_enable_nested_virtualization\"\xb3\x06\n\x11NodeNetworkConfig\x12\x1d\n\x10\x63reate_pod_range\x18\x04 \x01(\x08\x42\x03\xe0\x41\x04\x12\x11\n\tpod_range\x18\x05 \x01(\t\x12\x1b\n\x13pod_ipv4_cidr_block\x18\x06 \x01(\t\x12!\n\x14\x65nable_private_nodes\x18\t \x01(\x08H\x00\x88\x01\x01\x12h\n\x1anetwork_performance_config\x18\x0b \x01(\x0b\x32?.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfigH\x01\x88\x01\x01\x12V\n\x1dpod_cidr_overprovision_config\x18\r \x01(\x0b\x32/.google.container.v1.PodCIDROverprovisionConfig\x12Y\n\x1f\x61\x64\x64itional_node_network_configs\x18\x0e \x03(\x0b\x32\x30.google.container.v1.AdditionalNodeNetworkConfig\x12W\n\x1e\x61\x64\x64itional_pod_network_configs\x18\x0f \x03(\x0b\x32/.google.container.v1.AdditionalPodNetworkConfig\x12\'\n\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01\x42\x03\xe0\x41\x03\x1a\xd4\x01\n\x18NetworkPerformanceConfig\x12n\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x44.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x17\n\x15_enable_private_nodesB\x1d\n\x1b_network_performance_config\"B\n\x1b\x41\x64\x64itionalNodeNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\"\xab\x01\n\x1a\x41\x64\x64itionalPodNetworkConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1b\n\x13secondary_pod_range\x18\x02 \x01(\t\x12\x46\n\x11max_pods_per_node\x18\x03 \x01(\x0b\x32&.google.container.v1.MaxPodsConstraintH\x00\x88\x01\x01\x42\x14\n\x12_max_pods_per_node\"Y\n\x16ShieldedInstanceConfig\x12\x1a\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x12#\n\x1b\x65nable_integrity_monitoring\x18\x02 \x01(\x08\"k\n\rSandboxConfig\x12\x35\n\x04type\x18\x02 \x01(\x0e\x32\'.google.container.v1.SandboxConfig.Type\"#\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06GVISOR\x10\x01\"\x1d\n\nGcfsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xdf\x01\n\x13ReservationAffinity\x12O\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32-.google.container.v1.ReservationAffinity.Type\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"Z\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\"\x96\x02\n\x10SoleTenantConfig\x12K\n\x0fnode_affinities\x18\x01 \x03(\x0b\x32\x32.google.container.v1.SoleTenantConfig.NodeAffinity\x1a\xb4\x01\n\x0cNodeAffinity\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x08operator\x18\x02 \x01(\x0e\x32;.google.container.v1.SoleTenantConfig.NodeAffinity.Operator\x12\x0e\n\x06values\x18\x03 \x03(\t\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\"\xfc\x04\n\x10\x43ontainerdConfig\x12i\n\x1eprivate_registry_access_config\x18\x01 \x01(\x0b\x32\x41.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig\x1a\xfc\x03\n\x1bPrivateRegistryAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x8f\x01\n#certificate_authority_domain_config\x18\x02 \x03(\x0b\x32\x62.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig\x1a\xb9\x02\n CertificateAuthorityDomainConfig\x12\r\n\x05\x66qdns\x18\x01 \x03(\t\x12\xb6\x01\n%gcp_secret_manager_certificate_config\x18\x02 \x01(\x0b\x32\x84\x01.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00\x1a\x37\n!GCPSecretManagerCertificateConfig\x12\x12\n\nsecret_uri\x18\x01 \x01(\tB\x14\n\x12\x63\x65rtificate_config\"\xb9\x01\n\tNodeTaint\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x35\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32%.google.container.v1.NodeTaint.Effect\"Y\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNO_SCHEDULE\x10\x01\x12\x16\n\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n\nNO_EXECUTE\x10\x03\"<\n\nNodeTaints\x12.\n\x06taints\x18\x01 \x03(\x0b\x32\x1e.google.container.v1.NodeTaint\"x\n\nNodeLabels\x12;\n\x06labels\x18\x01 \x03(\x0b\x32+.google.container.v1.NodeLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\x0eResourceLabels\x12?\n\x06labels\x18\x01 \x03(\x0b\x32/.google.container.v1.ResourceLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x0bNetworkTags\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\xe8\x01\n\nMasterAuth\x12\x14\n\x08username\x18\x01 \x01(\tB\x02\x18\x01\x12\x14\n\x08password\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x19\x63lient_certificate_config\x18\x03 \x01(\x0b\x32,.google.container.v1.ClientCertificateConfig\x12#\n\x16\x63luster_ca_certificate\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63lient_certificate\x18\x65 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nclient_key\x18\x66 \x01(\tB\x03\xe0\x41\x03\";\n\x17\x43lientCertificateConfig\x12 \n\x18issue_client_certificate\x18\x01 \x01(\x08\"\xd2\x08\n\x0c\x41\x64\x64onsConfig\x12\x43\n\x13http_load_balancing\x18\x01 \x01(\x0b\x32&.google.container.v1.HttpLoadBalancing\x12Q\n\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\x0b\x32-.google.container.v1.HorizontalPodAutoscaling\x12J\n\x14kubernetes_dashboard\x18\x03 \x01(\x0b\x32(.google.container.v1.KubernetesDashboardB\x02\x18\x01\x12G\n\x15network_policy_config\x18\x04 \x01(\x0b\x32(.google.container.v1.NetworkPolicyConfig\x12=\n\x10\x63loud_run_config\x18\x07 \x01(\x0b\x32#.google.container.v1.CloudRunConfig\x12=\n\x10\x64ns_cache_config\x18\x08 \x01(\x0b\x32#.google.container.v1.DnsCacheConfig\x12K\n\x17\x63onfig_connector_config\x18\n \x01(\x0b\x32*.google.container.v1.ConfigConnectorConfig\x12\x64\n%gce_persistent_disk_csi_driver_config\x18\x0b \x01(\x0b\x32\x35.google.container.v1.GcePersistentDiskCsiDriverConfig\x12Y\n\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1.GcpFilestoreCsiDriverConfig\x12J\n\x17gke_backup_agent_config\x18\x10 \x01(\x0b\x32).google.container.v1.GkeBackupAgentConfig\x12O\n\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\x0b\x32+.google.container.v1.GcsFuseCsiDriverConfig\x12\x46\n\x12stateful_ha_config\x18\x12 \x01(\x0b\x32%.google.container.v1.StatefulHAConfigB\x03\xe0\x41\x01\x12Z\n\x1fparallelstore_csi_driver_config\x18\x13 \x01(\x0b\x32\x31.google.container.v1.ParallelstoreCsiDriverConfig\x12H\n\x13ray_operator_config\x18\x15 \x01(\x0b\x32&.google.container.v1.RayOperatorConfigB\x03\xe0\x41\x01\"%\n\x11HttpLoadBalancing\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x18HorizontalPodAutoscaling\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13KubernetesDashboard\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13NetworkPolicyConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"!\n\x0e\x44nsCacheConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"9\n&PrivateClusterMasterGlobalAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe8\x02\n\x14PrivateClusterConfig\x12 \n\x14\x65nable_private_nodes\x18\x01 \x01(\x08\x42\x02\x18\x01\x12#\n\x17\x65nable_private_endpoint\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x1e\n\x16master_ipv4_cidr_block\x18\x03 \x01(\t\x12\x1f\n\x10private_endpoint\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x1e\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cpeering_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x1bmaster_global_access_config\x18\x08 \x01(\x0b\x32;.google.container.v1.PrivateClusterMasterGlobalAccessConfigB\x02\x18\x01\x12\'\n\x1bprivate_endpoint_subnetwork\x18\n \x01(\tB\x02\x18\x01\"D\n\x19\x41uthenticatorGroupsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0esecurity_group\x18\x02 \x01(\t\"\xee\x01\n\x0e\x43loudRunConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12P\n\x12load_balancer_type\x18\x03 \x01(\x0e\x32\x34.google.container.v1.CloudRunConfig.LoadBalancerType\"x\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"(\n\x15\x43onfigConnectorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"3\n GcePersistentDiskCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\".\n\x1bGcpFilestoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16GcsFuseCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cParallelstoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd8\x01\n\x11RayOperatorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12U\n\x1aray_cluster_logging_config\x18\x02 \x01(\x0b\x32,.google.container.v1.RayClusterLoggingConfigB\x03\xe0\x41\x01\x12[\n\x1dray_cluster_monitoring_config\x18\x03 \x01(\x0b\x32/.google.container.v1.RayClusterMonitoringConfigB\x03\xe0\x41\x01\"\'\n\x14GkeBackupAgentConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"#\n\x10StatefulHAConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xea\x02\n\x1eMasterAuthorizedNetworksConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12R\n\x0b\x63idr_blocks\x18\x02 \x03(\x0b\x32=.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock\x12,\n\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x31\n$private_endpoint_enforcement_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x1a\x35\n\tCidrBlock\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x12\n\ncidr_block\x18\x02 \x01(\tB\"\n _gcp_public_cidrs_access_enabledB\'\n%_private_endpoint_enforcement_enabled\"\x1d\n\nLegacyAbac\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x91\x01\n\rNetworkPolicy\x12=\n\x08provider\x18\x01 \x01(\x0e\x32+.google.container.v1.NetworkPolicy.Provider\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"0\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41LICO\x10\x01\"\xe3\x01\n\x13\x42inaryAuthorization\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12P\n\x0f\x65valuation_mode\x18\x02 \x01(\x0e\x32\x37.google.container.v1.BinaryAuthorization.EvaluationMode\"e\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12$\n PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\"-\n\x1aPodCIDROverprovisionConfig\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\"\xbd\x06\n\x12IPAllocationPolicy\x12\x16\n\x0euse_ip_aliases\x18\x01 \x01(\x08\x12\x19\n\x11\x63reate_subnetwork\x18\x02 \x01(\x08\x12\x17\n\x0fsubnetwork_name\x18\x03 \x01(\t\x12\x1d\n\x11\x63luster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01\x12\x1a\n\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01\x12\x1e\n\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01\x12$\n\x1c\x63luster_secondary_range_name\x18\x07 \x01(\t\x12%\n\x1dservices_secondary_range_name\x18\x08 \x01(\t\x12\x1f\n\x17\x63luster_ipv4_cidr_block\x18\t \x01(\t\x12\x1c\n\x14node_ipv4_cidr_block\x18\n \x01(\t\x12 \n\x18services_ipv4_cidr_block\x18\x0b \x01(\t\x12\x1b\n\x13tpu_ipv4_cidr_block\x18\r \x01(\t\x12\x12\n\nuse_routes\x18\x0f \x01(\x08\x12\x32\n\nstack_type\x18\x10 \x01(\x0e\x32\x1e.google.container.v1.StackType\x12=\n\x10ipv6_access_type\x18\x11 \x01(\x0e\x32#.google.container.v1.IPv6AccessType\x12V\n\x1dpod_cidr_overprovision_config\x18\x15 \x01(\x0b\x32/.google.container.v1.PodCIDROverprovisionConfig\x12#\n\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12Y\n\x1c\x61\x64\x64itional_pod_ranges_config\x18\x18 \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfigB\x03\xe0\x41\x03\x12/\n\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01\x42\x03\xe0\x41\x03\"\x91 \n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x12initial_node_count\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x38\n\x0bnode_config\x18\x04 \x01(\x0b\x32\x1f.google.container.v1.NodeConfigB\x02\x18\x01\x12\x34\n\x0bmaster_auth\x18\x05 \x01(\x0b\x32\x1f.google.container.v1.MasterAuth\x12\x17\n\x0flogging_service\x18\x06 \x01(\t\x12\x1a\n\x12monitoring_service\x18\x07 \x01(\t\x12\x0f\n\x07network\x18\x08 \x01(\t\x12\x19\n\x11\x63luster_ipv4_cidr\x18\t \x01(\t\x12\x38\n\raddons_config\x18\n \x01(\x0b\x32!.google.container.v1.AddonsConfig\x12\x12\n\nsubnetwork\x18\x0b \x01(\t\x12\x31\n\nnode_pools\x18\x0c \x03(\x0b\x32\x1d.google.container.v1.NodePool\x12\x11\n\tlocations\x18\r \x03(\t\x12\x1f\n\x17\x65nable_kubernetes_alpha\x18\x0e \x01(\x08\x12I\n\x0fresource_labels\x18\x0f \x03(\x0b\x32\x30.google.container.v1.Cluster.ResourceLabelsEntry\x12\x19\n\x11label_fingerprint\x18\x10 \x01(\t\x12\x34\n\x0blegacy_abac\x18\x12 \x01(\x0b\x32\x1f.google.container.v1.LegacyAbac\x12:\n\x0enetwork_policy\x18\x13 \x01(\x0b\x32\".google.container.v1.NetworkPolicy\x12\x45\n\x14ip_allocation_policy\x18\x14 \x01(\x0b\x32\'.google.container.v1.IPAllocationPolicy\x12\x62\n!master_authorized_networks_config\x18\x16 \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12\x42\n\x12maintenance_policy\x18\x17 \x01(\x0b\x32&.google.container.v1.MaintenancePolicy\x12\x46\n\x14\x62inary_authorization\x18\x18 \x01(\x0b\x32(.google.container.v1.BinaryAuthorization\x12<\n\x0b\x61utoscaling\x18\x1a \x01(\x0b\x32\'.google.container.v1.ClusterAutoscaling\x12:\n\x0enetwork_config\x18\x1b \x01(\x0b\x32\".google.container.v1.NetworkConfig\x12K\n\x1b\x64\x65\x66\x61ult_max_pods_constraint\x18\x1e \x01(\x0b\x32&.google.container.v1.MaxPodsConstraint\x12T\n\x1cresource_usage_export_config\x18! \x01(\x0b\x32..google.container.v1.ResourceUsageExportConfig\x12S\n\x1b\x61uthenticator_groups_config\x18\" \x01(\x0b\x32..google.container.v1.AuthenticatorGroupsConfig\x12I\n\x16private_cluster_config\x18% \x01(\x0b\x32).google.container.v1.PrivateClusterConfig\x12\x44\n\x13\x64\x61tabase_encryption\x18& \x01(\x0b\x32\'.google.container.v1.DatabaseEncryption\x12M\n\x18vertical_pod_autoscaling\x18\' \x01(\x0b\x32+.google.container.v1.VerticalPodAutoscaling\x12:\n\x0eshielded_nodes\x18( \x01(\x0b\x32\".google.container.v1.ShieldedNodes\x12<\n\x0frelease_channel\x18) \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12M\n\x18workload_identity_config\x18+ \x01(\x0b\x32+.google.container.v1.WorkloadIdentityConfig\x12@\n\x11mesh_certificates\x18\x43 \x01(\x0b\x32%.google.container.v1.MeshCertificates\x12I\n\x16\x63ost_management_config\x18- \x01(\x0b\x32).google.container.v1.CostManagementConfig\x12\x44\n\x13notification_config\x18\x31 \x01(\x0b\x32\'.google.container.v1.NotificationConfig\x12\x42\n\x12\x63onfidential_nodes\x18\x32 \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12K\n\x17identity_service_config\x18\x36 \x01(\x0b\x32*.google.container.v1.IdentityServiceConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x65 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x15\n\x08\x65ndpoint\x18\x66 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17initial_cluster_version\x18g \x01(\t\x12#\n\x16\x63urrent_master_version\x18h \x01(\tB\x03\xe0\x41\x03\x12#\n\x14\x63urrent_node_version\x18i \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x63reate_time\x18j \x01(\tB\x03\xe0\x41\x03\x12\x38\n\x06status\x18k \x01(\x0e\x32#.google.container.v1.Cluster.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18l \x01(\tB\x05\x18\x01\xe0\x41\x03\x12 \n\x13node_ipv4_cidr_size\x18m \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0\x41\x03\x12\"\n\x13instance_group_urls\x18o \x03(\tB\x05\x18\x01\xe0\x41\x03\x12!\n\x12\x63urrent_node_count\x18p \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x65xpire_time\x18q \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18r \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nenable_tpu\x18s \x01(\x08\x12 \n\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x03\xe0\x41\x03\x12\x38\n\nconditions\x18v \x03(\x0b\x32$.google.container.v1.StatusCondition\x12\x32\n\tautopilot\x18\x80\x01 \x01(\x0b\x32\x1e.google.container.v1.Autopilot\x12\x10\n\x02id\x18\x81\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x12node_pool_defaults\x18\x83\x01 \x01(\x0b\x32%.google.container.v1.NodePoolDefaultsH\x00\x88\x01\x01\x12;\n\x0elogging_config\x18\x84\x01 \x01(\x0b\x32\".google.container.v1.LoggingConfig\x12\x41\n\x11monitoring_config\x18\x85\x01 \x01(\x0b\x32%.google.container.v1.MonitoringConfig\x12G\n\x15node_pool_auto_config\x18\x88\x01 \x01(\x0b\x32\'.google.container.v1.NodePoolAutoConfig\x12\r\n\x04\x65tag\x18\x8b\x01 \x01(\t\x12*\n\x05\x66leet\x18\x8c\x01 \x01(\x0b\x32\x1a.google.container.v1.Fleet\x12L\n\x17security_posture_config\x18\x91\x01 \x01(\x0b\x32*.google.container.v1.SecurityPostureConfig\x12Y\n\x1e\x63ontrol_plane_endpoints_config\x18\x92\x01 \x01(\x0b\x32\x30.google.container.v1.ControlPlaneEndpointsConfig\x12\x44\n\x14\x65nable_k8s_beta_apis\x18\x8f\x01 \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12\x41\n\x11\x65nterprise_config\x18\x95\x01 \x01(\x0b\x32%.google.container.v1.EnterpriseConfig\x12H\n\x15secret_manager_config\x18\x96\x01 \x01(\x0b\x32(.google.container.v1.SecretManagerConfig\x12P\n\x19\x63ompliance_posture_config\x18\x97\x01 \x01(\x0b\x32,.google.container.v1.CompliancePostureConfig\x12 \n\rsatisfies_pzs\x18\x98\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12 \n\rsatisfies_pzi\x18\x99\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x18user_managed_keys_config\x18\x9a\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfigH\x03\x88\x01\x01\x12I\n\x13rbac_binding_config\x18\x9c\x01 \x01(\x0b\x32&.google.container.v1.RBACBindingConfigH\x04\x88\x01\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"w\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0f\n\x0bRECONCILING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x44\x45GRADED\x10\x06\x42\x15\n\x13_node_pool_defaultsB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pziB\x1b\n\x19_user_managed_keys_configB\x16\n\x14_rbac_binding_config\"\xef\x01\n\x11RBACBindingConfig\x12;\n.enable_insecure_binding_system_unauthenticated\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n,enable_insecure_binding_system_authenticated\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x31\n/_enable_insecure_binding_system_unauthenticatedB/\n-_enable_insecure_binding_system_authenticated\"\xe9\x04\n\x15UserManagedKeysConfig\x12\x38\n\ncluster_ca\x18\n \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x39\n\x0b\x65tcd_api_ca\x18\x0b \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12:\n\x0c\x65tcd_peer_ca\x18\x0c \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12S\n\x1cservice_account_signing_keys\x18\r \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!service_account_verification_keys\x18\x0e \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12<\n\x0e\x61ggregation_ca\x18\x0f \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12X\n!control_plane_disk_encryption_key\x18\x10 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!gkeops_etcd_backup_encryption_key\x18\x11 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\xba\x02\n\x17\x43ompliancePostureConfig\x12\x44\n\x04mode\x18\x01 \x01(\x0e\x32\x31.google.container.v1.CompliancePostureConfig.ModeH\x00\x88\x01\x01\x12]\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32?.google.container.v1.CompliancePostureConfig.ComplianceStandard\x1a\x38\n\x12\x43omplianceStandard\x12\x15\n\x08standard\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_standard\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\x07\n\x05_mode\"(\n\x10K8sBetaAPIConfig\x12\x14\n\x0c\x65nabled_apis\x18\x01 \x03(\t\"\xae\x03\n\x15SecurityPostureConfig\x12\x42\n\x04mode\x18\x01 \x01(\x0e\x32/.google.container.v1.SecurityPostureConfig.ModeH\x00\x88\x01\x01\x12]\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32<.google.container.v1.SecurityPostureConfig.VulnerabilityModeH\x01\x88\x01\x01\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\x42\x07\n\x05_modeB\x15\n\x13_vulnerability_mode\"\xa0\x02\n\x12NodePoolAutoConfig\x12\x36\n\x0cnetwork_tags\x18\x01 \x01(\x0b\x32 .google.container.v1.NetworkTags\x12G\n\x15resource_manager_tags\x18\x02 \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12\x43\n\x13node_kubelet_config\x18\x03 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x44\n\x11linux_node_config\x18\x04 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfigB\x03\xe0\x41\x03\"Y\n\x10NodePoolDefaults\x12\x45\n\x14node_config_defaults\x18\x01 \x01(\x0b\x32\'.google.container.v1.NodeConfigDefaults\"\x95\x02\n\x12NodeConfigDefaults\x12\x34\n\x0bgcfs_config\x18\x01 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12\x42\n\x0elogging_config\x18\x03 \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12@\n\x11\x63ontainerd_config\x18\x04 \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12\x43\n\x13node_kubelet_config\x18\x06 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\"\xcc\'\n\rClusterUpdate\x12\x1c\n\x14\x64\x65sired_node_version\x18\x04 \x01(\t\x12\"\n\x1a\x64\x65sired_monitoring_service\x18\x05 \x01(\t\x12@\n\x15\x64\x65sired_addons_config\x18\x06 \x01(\x0b\x32!.google.container.v1.AddonsConfig\x12\x1c\n\x14\x64\x65sired_node_pool_id\x18\x07 \x01(\t\x12\x1a\n\x12\x64\x65sired_image_type\x18\x08 \x01(\t\x12L\n\x1b\x64\x65sired_database_encryption\x18. \x01(\x0b\x32\'.google.container.v1.DatabaseEncryption\x12U\n desired_workload_identity_config\x18/ \x01(\x0b\x32+.google.container.v1.WorkloadIdentityConfig\x12H\n\x19\x64\x65sired_mesh_certificates\x18\x43 \x01(\x0b\x32%.google.container.v1.MeshCertificates\x12\x42\n\x16\x64\x65sired_shielded_nodes\x18\x30 \x01(\x0b\x32\".google.container.v1.ShieldedNodes\x12Q\n\x1e\x64\x65sired_cost_management_config\x18\x31 \x01(\x0b\x32).google.container.v1.CostManagementConfig\x12:\n\x12\x64\x65sired_dns_config\x18\x35 \x01(\x0b\x32\x1e.google.container.v1.DNSConfig\x12O\n\x1d\x64\x65sired_node_pool_autoscaling\x18\t \x01(\x0b\x32(.google.container.v1.NodePoolAutoscaling\x12\x19\n\x11\x64\x65sired_locations\x18\n \x03(\t\x12j\n)desired_master_authorized_networks_config\x18\x0c \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12L\n\x1b\x64\x65sired_cluster_autoscaling\x18\x0f \x01(\x0b\x32\'.google.container.v1.ClusterAutoscaling\x12N\n\x1c\x64\x65sired_binary_authorization\x18\x10 \x01(\x0b\x32(.google.container.v1.BinaryAuthorization\x12\x1f\n\x17\x64\x65sired_logging_service\x18\x13 \x01(\t\x12\\\n$desired_resource_usage_export_config\x18\x15 \x01(\x0b\x32..google.container.v1.ResourceUsageExportConfig\x12U\n desired_vertical_pod_autoscaling\x18\x16 \x01(\x0b\x32+.google.container.v1.VerticalPodAutoscaling\x12U\n\x1e\x64\x65sired_private_cluster_config\x18\x19 \x01(\x0b\x32).google.container.v1.PrivateClusterConfigB\x02\x18\x01\x12\\\n$desired_intra_node_visibility_config\x18\x1a \x01(\x0b\x32..google.container.v1.IntraNodeVisibilityConfig\x12K\n\x1b\x64\x65sired_default_snat_status\x18\x1c \x01(\x0b\x32&.google.container.v1.DefaultSnatStatus\x12\x44\n\x17\x64\x65sired_release_channel\x18\x1f \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12Q\n\x1f\x64\x65sired_l4ilb_subsetting_config\x18\' \x01(\x0b\x32(.google.container.v1.ILBSubsettingConfig\x12H\n\x19\x64\x65sired_datapath_provider\x18\x32 \x01(\x0e\x32%.google.container.v1.DatapathProvider\x12X\n\"desired_private_ipv6_google_access\x18\x33 \x01(\x0e\x32,.google.container.v1.PrivateIPv6GoogleAccess\x12L\n\x1b\x64\x65sired_notification_config\x18\x37 \x01(\x0b\x32\'.google.container.v1.NotificationConfig\x12[\n#desired_authenticator_groups_config\x18? \x01(\x0b\x32..google.container.v1.AuthenticatorGroupsConfig\x12\x42\n\x16\x64\x65sired_logging_config\x18@ \x01(\x0b\x32\".google.container.v1.LoggingConfig\x12H\n\x19\x64\x65sired_monitoring_config\x18\x41 \x01(\x0b\x32%.google.container.v1.MonitoringConfig\x12S\n\x1f\x64\x65sired_identity_service_config\x18\x42 \x01(\x0b\x32*.google.container.v1.IdentityServiceConfig\x12Z\n#desired_service_external_ips_config\x18< \x01(\x0b\x32-.google.container.v1.ServiceExternalIPsConfig\x12\x30\n\x1f\x64\x65sired_enable_private_endpoint\x18G \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x31\n$desired_default_enable_private_nodes\x18H \x01(\x08H\x01\x88\x01\x01\x12`\n&desired_control_plane_endpoints_config\x18I \x01(\x0b\x32\x30.google.container.v1.ControlPlaneEndpointsConfig\x12\x1e\n\x16\x64\x65sired_master_version\x18\x64 \x01(\t\x12<\n\x13\x64\x65sired_gcfs_config\x18m \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12T\n*desired_node_pool_auto_config_network_tags\x18n \x01(\x0b\x32 .google.container.v1.NetworkTags\x12I\n\x1a\x64\x65sired_gateway_api_config\x18r \x01(\x0b\x32%.google.container.v1.GatewayAPIConfig\x12\x0c\n\x04\x65tag\x18s \x01(\t\x12T\n desired_node_pool_logging_config\x18t \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12\x31\n\rdesired_fleet\x18u \x01(\x0b\x32\x1a.google.container.v1.Fleet\x12:\n\x12\x64\x65sired_stack_type\x18w \x01(\x0e\x32\x1e.google.container.v1.StackType\x12T\n\x1c\x61\x64\x64itional_pod_ranges_config\x18x \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfig\x12\\\n$removed_additional_pod_ranges_config\x18y \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfig\x12\x43\n\x14\x65nable_k8s_beta_apis\x18z \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12S\n\x1f\x64\x65sired_security_posture_config\x18| \x01(\x0b\x32*.google.container.v1.SecurityPostureConfig\x12n\n\"desired_network_performance_config\x18} \x01(\x0b\x32\x42.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig\x12/\n\"desired_enable_fqdn_network_policy\x18~ \x01(\x08H\x02\x88\x01\x01\x12\\\n(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\x0b\x32).google.container.v1.WorkloadPolicyConfig\x12\x45\n\x15\x64\x65sired_k8s_beta_apis\x18\x83\x01 \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12I\n\x19\x64\x65sired_containerd_config\x18\x86\x01 \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12-\n\x1f\x64\x65sired_enable_multi_networking\x18\x87\x01 \x01(\x08H\x03\x88\x01\x01\x12\x66\n3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12\x62\n$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e\x32..google.container.v1.InTransitEncryptionConfigH\x04\x88\x01\x01\x12>\n0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\x08H\x05\x88\x01\x01\x12U\n\x1d\x64\x65sired_secret_manager_config\x18\x8b\x01 \x01(\x0b\x32(.google.container.v1.SecretManagerConfigH\x06\x88\x01\x01\x12]\n!desired_compliance_posture_config\x18\x8c\x01 \x01(\x0b\x32,.google.container.v1.CompliancePostureConfigH\x07\x88\x01\x01\x12L\n\x1b\x64\x65sired_node_kubelet_config\x18\x8d\x01 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12]\n,desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12M\n\x18user_managed_keys_config\x18\x8f\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfig\x12Q\n\x1b\x64\x65sired_rbac_binding_config\x18\x90\x01 \x01(\x0b\x32&.google.container.v1.RBACBindingConfigH\x08\x88\x01\x01\x12P\n\x19\x64\x65sired_enterprise_config\x18\x93\x01 \x01(\x0b\x32,.google.container.v1.DesiredEnterpriseConfig\x12^\n/desired_node_pool_auto_config_linux_node_config\x18\x96\x01 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfigB\"\n _desired_enable_private_endpointB\'\n%_desired_default_enable_private_nodesB%\n#_desired_enable_fqdn_network_policyB\"\n _desired_enable_multi_networkingB\'\n%_desired_in_transit_encryption_configB3\n1_desired_enable_cilium_clusterwide_network_policyB \n\x1e_desired_secret_manager_configB$\n\"_desired_compliance_posture_configB\x1e\n\x1c_desired_rbac_binding_config\"q\n\x19\x41\x64\x64itionalPodRangesConfig\x12\x17\n\x0fpod_range_names\x18\x01 \x03(\t\x12;\n\x0epod_range_info\x18\x02 \x03(\x0b\x32\x1e.google.container.v1.RangeInfoB\x03\xe0\x41\x03\">\n\tRangeInfo\x12\x17\n\nrange_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0butilization\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"b\n\x17\x44\x65siredEnterpriseConfig\x12G\n\x0c\x64\x65sired_tier\x18\x01 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTier\"\xe4\x08\n\tOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12@\n\x0eoperation_type\x18\x03 \x01(\x0e\x32#.google.container.v1.Operation.TypeB\x03\xe0\x41\x03\x12:\n\x06status\x18\x04 \x01(\x0e\x32%.google.container.v1.Operation.StatusB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x16\n\tself_link\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0btarget_link\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nstart_time\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_time\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12=\n\x08progress\x18\x0c \x01(\x0b\x32&.google.container.v1.OperationProgressB\x03\xe0\x41\x03\x12\x44\n\x12\x63luster_conditions\x18\r \x03(\x0b\x32$.google.container.v1.StatusConditionB\x02\x18\x01\x12\x45\n\x13nodepool_conditions\x18\x0e \x03(\x0b\x32$.google.container.v1.StatusConditionB\x02\x18\x01\x12!\n\x05\x65rror\x18\x0f \x01(\x0b\x32\x12.google.rpc.Status\"R\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x41\x42ORTING\x10\x04\"\xc0\x03\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43REATE_CLUSTER\x10\x01\x12\x12\n\x0e\x44\x45LETE_CLUSTER\x10\x02\x12\x12\n\x0eUPGRADE_MASTER\x10\x03\x12\x11\n\rUPGRADE_NODES\x10\x04\x12\x12\n\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n\x10\x43REATE_NODE_POOL\x10\x07\x12\x14\n\x10\x44\x45LETE_NODE_POOL\x10\x08\x12\x1c\n\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n\x11\x41UTO_REPAIR_NODES\x10\n\x12\x1a\n\x12\x41UTO_UPGRADE_NODES\x10\x0b\x1a\x02\x08\x01\x12\x12\n\nSET_LABELS\x10\x0c\x1a\x02\x08\x01\x12\x17\n\x0fSET_MASTER_AUTH\x10\r\x1a\x02\x08\x01\x12\x16\n\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\x08\x01\x12\x1e\n\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\x08\x01\x12\x12\n\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n\x15\x46LEET_FEATURE_UPGRADE\x10\x13\"\xbb\x02\n\x11OperationProgress\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x06status\x18\x02 \x01(\x0e\x32%.google.container.v1.Operation.Status\x12>\n\x07metrics\x18\x03 \x03(\x0b\x32-.google.container.v1.OperationProgress.Metric\x12\x36\n\x06stages\x18\x04 \x03(\x0b\x32&.google.container.v1.OperationProgress\x1ai\n\x06Metric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\tint_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\x42\x07\n\x05value\"\x84\x01\n\x14\x43reateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x32\n\x07\x63luster\x18\x03 \x01(\x0b\x32\x1c.google.container.v1.ClusterB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"c\n\x11GetClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x9f\x01\n\x14UpdateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x37\n\x06update\x18\x04 \x01(\x0b\x32\".google.container.v1.ClusterUpdateB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xea\x0b\n\x15UpdateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x19\n\x0cnode_version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nimage_type\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x11\n\tlocations\x18\r \x03(\t\x12M\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32+.google.container.v1.WorkloadMetadataConfig\x12G\n\x10upgrade_settings\x18\x0f \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12.\n\x04tags\x18\x10 \x01(\x0b\x32 .google.container.v1.NetworkTags\x12/\n\x06taints\x18\x11 \x01(\x0b\x32\x1f.google.container.v1.NodeTaints\x12/\n\x06labels\x18\x12 \x01(\x0b\x32\x1f.google.container.v1.NodeLabels\x12?\n\x11linux_node_config\x18\x13 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12>\n\x0ekubelet_config\x18\x14 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x43\n\x13node_network_config\x18\x15 \x01(\x0b\x32&.google.container.v1.NodeNetworkConfig\x12\x34\n\x0bgcfs_config\x18\x16 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12\x42\n\x12\x63onfidential_nodes\x18\x17 \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12.\n\x05gvnic\x18\x1d \x01(\x0b\x32\x1f.google.container.v1.VirtualNIC\x12\x0c\n\x04\x65tag\x18\x1e \x01(\t\x12\x34\n\x0b\x66\x61st_socket\x18\x1f \x01(\x0b\x32\x1f.google.container.v1.FastSocket\x12\x42\n\x0elogging_config\x18 \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12<\n\x0fresource_labels\x18! \x01(\x0b\x32#.google.container.v1.ResourceLabels\x12\x43\n\x13windows_node_config\x18\" \x01(\x0b\x32&.google.container.v1.WindowsNodeConfig\x12<\n\x0c\x61\x63\x63\x65lerators\x18# \x03(\x0b\x32&.google.container.v1.AcceleratorConfig\x12\x19\n\x0cmachine_type\x18$ \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18% \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isk_size_gb\x18& \x01(\x03\x42\x03\xe0\x41\x01\x12G\n\x15resource_manager_tags\x18\' \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12@\n\x11\x63ontainerd_config\x18( \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12M\n\x13queued_provisioning\x18* \x01(\x0b\x32\x30.google.container.v1.NodePool.QueuedProvisioning\x12\x15\n\rstorage_pools\x18+ \x03(\t\"\xcd\x01\n\x1dSetNodePoolAutoscalingRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x42\n\x0b\x61utoscaling\x18\x05 \x01(\x0b\x32(.google.container.v1.NodePoolAutoscalingB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x88\x01\n\x18SetLoggingServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1c\n\x0flogging_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x8e\x01\n\x1bSetMonitoringServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xa7\x01\n\x16SetAddonsConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12=\n\raddons_config\x18\x04 \x01(\x0b\x32!.google.container.v1.AddonsConfigB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"}\n\x13SetLocationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\tlocations\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x82\x01\n\x13UpdateMasterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1b\n\x0emaster_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xb5\x02\n\x14SetMasterAuthRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x45\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x30.google.container.v1.SetMasterAuthRequest.ActionB\x03\xe0\x41\x02\x12\x34\n\x06update\x18\x05 \x01(\x0b\x32\x1f.google.container.v1.MasterAuthB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"P\n\x06\x41\x63tion\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cSET_PASSWORD\x10\x01\x12\x15\n\x11GENERATE_PASSWORD\x10\x02\x12\x10\n\x0cSET_USERNAME\x10\x03\"f\n\x14\x44\x65leteClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"O\n\x13ListClustersRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"]\n\x14ListClustersResponse\x12.\n\x08\x63lusters\x18\x01 \x03(\x0b\x32\x1c.google.container.v1.Cluster\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"g\n\x13GetOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"Q\n\x15ListOperationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"j\n\x16\x43\x61ncelOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"c\n\x16ListOperationsResponse\x12\x32\n\noperations\x18\x01 \x03(\x0b\x32\x1e.google.container.v1.Operation\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"P\n\x16GetServerConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"\x94\x03\n\x0cServerConfig\x12\x1f\n\x17\x64\x65\x66\x61ult_cluster_version\x18\x01 \x01(\t\x12\x1b\n\x13valid_node_versions\x18\x03 \x03(\t\x12\x1a\n\x12\x64\x65\x66\x61ult_image_type\x18\x04 \x01(\t\x12\x19\n\x11valid_image_types\x18\x05 \x03(\t\x12\x1d\n\x15valid_master_versions\x18\x06 \x03(\t\x12H\n\x08\x63hannels\x18\t \x03(\x0b\x32\x36.google.container.v1.ServerConfig.ReleaseChannelConfig\x1a\xa5\x01\n\x14ReleaseChannelConfig\x12<\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.google.container.v1.ReleaseChannel.Channel\x12\x17\n\x0f\x64\x65\x66\x61ult_version\x18\x02 \x01(\t\x12\x16\n\x0evalid_versions\x18\x04 \x03(\t\x12\x1e\n\x16upgrade_target_version\x18\x05 \x01(\t\"\xa0\x01\n\x15\x43reateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x35\n\tnode_pool\x18\x04 \x01(\x0b\x32\x1d.google.container.v1.NodePoolB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x06 \x01(\t\"\x81\x01\n\x15\x44\x65leteNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"h\n\x14ListNodePoolsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x05 \x01(\t\"~\n\x12GetNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x9f\x03\n\x11\x42lueGreenSettings\x12_\n\x17standard_rollout_policy\x18\x01 \x01(\x0b\x32<.google.container.v1.BlueGreenSettings.StandardRolloutPolicyH\x00\x12?\n\x17node_pool_soak_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x1a\xb9\x01\n\x15StandardRolloutPolicy\x12\x1a\n\x10\x62\x61tch_percentage\x18\x01 \x01(\x02H\x00\x12\x1a\n\x10\x62\x61tch_node_count\x18\x02 \x01(\x05H\x00\x12;\n\x13\x62\x61tch_soak_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\x13\n\x11update_batch_sizeB\x16\n\x14_batch_soak_durationB\x10\n\x0erollout_policyB\x1a\n\x18_node_pool_soak_duration\"\xd1\x10\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x1f.google.container.v1.NodeConfig\x12\x1a\n\x12initial_node_count\x18\x03 \x01(\x05\x12\x11\n\tlocations\x18\r \x03(\t\x12>\n\x0enetwork_config\x18\x0e \x01(\x0b\x32&.google.container.v1.NodeNetworkConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x65 \x01(\t\x12 \n\x13instance_group_urls\x18\x66 \x03(\tB\x03\xe0\x41\x03\x12\x39\n\x06status\x18g \x01(\x0e\x32$.google.container.v1.NodePool.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18h \x01(\tB\x05\x18\x01\xe0\x41\x03\x12=\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32(.google.container.v1.NodePoolAutoscaling\x12\x37\n\nmanagement\x18\x05 \x01(\x0b\x32#.google.container.v1.NodeManagement\x12\x43\n\x13max_pods_constraint\x18\x06 \x01(\x0b\x32&.google.container.v1.MaxPodsConstraint\x12\x38\n\nconditions\x18i \x03(\x0b\x32$.google.container.v1.StatusCondition\x12\x1f\n\x12pod_ipv4_cidr_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12G\n\x10upgrade_settings\x18k \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12G\n\x10placement_policy\x18l \x01(\x0b\x32-.google.container.v1.NodePool.PlacementPolicy\x12\x42\n\x0bupdate_info\x18m \x01(\x0b\x32(.google.container.v1.NodePool.UpdateInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18n \x01(\t\x12M\n\x13queued_provisioning\x18p \x01(\x0b\x32\x30.google.container.v1.NodePool.QueuedProvisioning\x12M\n\x18\x62\x65st_effort_provisioning\x18q \x01(\x0b\x32+.google.container.v1.BestEffortProvisioning\x1a\xf0\x01\n\x0fUpgradeSettings\x12\x11\n\tmax_surge\x18\x01 \x01(\x05\x12\x17\n\x0fmax_unavailable\x18\x02 \x01(\x05\x12\x42\n\x08strategy\x18\x03 \x01(\x0e\x32+.google.container.v1.NodePoolUpdateStrategyH\x00\x88\x01\x01\x12H\n\x13\x62lue_green_settings\x18\x04 \x01(\x0b\x32&.google.container.v1.BlueGreenSettingsH\x01\x88\x01\x01\x42\x0b\n\t_strategyB\x16\n\x14_blue_green_settings\x1a\x88\x04\n\nUpdateInfo\x12O\n\x0f\x62lue_green_info\x18\x01 \x01(\x0b\x32\x36.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo\x1a\xa8\x03\n\rBlueGreenInfo\x12K\n\x05phase\x18\x01 \x01(\x0e\x32<.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase\x12 \n\x18\x62lue_instance_group_urls\x18\x02 \x03(\t\x12!\n\x19green_instance_group_urls\x18\x03 \x03(\t\x12%\n\x1d\x62lue_pool_deletion_start_time\x18\x04 \x01(\t\x12\x1a\n\x12green_pool_version\x18\x05 \x01(\t\"\xc1\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUPDATE_STARTED\x10\x01\x12\x17\n\x13\x43REATING_GREEN_POOL\x10\x02\x12\x17\n\x13\x43ORDONING_BLUE_POOL\x10\x03\x12\x16\n\x12\x44RAINING_BLUE_POOL\x10\x04\x12\x15\n\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n\x12\x44\x45LETING_BLUE_POOL\x10\x06\x12\x14\n\x10ROLLBACK_STARTED\x10\x07\x1a\xae\x01\n\x0fPlacementPolicy\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.container.v1.NodePool.PlacementPolicy.Type\x12\x19\n\x0ctpu_topology\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x0bpolicy_name\x18\x03 \x01(\t\")\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMPACT\x10\x01\x1a%\n\x12QueuedProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x16\n\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n\x0bRECONCILING\x10\x04\x12\x0c\n\x08STOPPING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\"}\n\x0eNodeManagement\x12\x14\n\x0c\x61uto_upgrade\x18\x01 \x01(\x08\x12\x13\n\x0b\x61uto_repair\x18\x02 \x01(\x08\x12@\n\x0fupgrade_options\x18\n \x01(\x0b\x32\'.google.container.v1.AutoUpgradeOptions\"F\n\x16\x42\x65stEffortProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x13min_provision_nodes\x18\x02 \x01(\x05\"T\n\x12\x41utoUpgradeOptions\x12$\n\x17\x61uto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"e\n\x11MaintenancePolicy\x12\x36\n\x06window\x18\x01 \x01(\x0b\x32&.google.container.v1.MaintenanceWindow\x12\x18\n\x10resource_version\x18\x03 \x01(\t\"\xf6\x02\n\x11MaintenanceWindow\x12O\n\x18\x64\x61ily_maintenance_window\x18\x02 \x01(\x0b\x32+.google.container.v1.DailyMaintenanceWindowH\x00\x12\x44\n\x10recurring_window\x18\x03 \x01(\x0b\x32(.google.container.v1.RecurringTimeWindowH\x00\x12\x61\n\x16maintenance_exclusions\x18\x04 \x03(\x0b\x32\x41.google.container.v1.MaintenanceWindow.MaintenanceExclusionsEntry\x1a]\n\x1aMaintenanceExclusionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.google.container.v1.TimeWindow:\x02\x38\x01\x42\x08\n\x06policy\"\xd0\x01\n\nTimeWindow\x12Y\n\x1dmaintenance_exclusion_options\x18\x03 \x01(\x0b\x32\x30.google.container.v1.MaintenanceExclusionOptionsH\x00\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07options\"\xb4\x01\n\x1bMaintenanceExclusionOptions\x12\x45\n\x05scope\x18\x01 \x01(\x0e\x32\x36.google.container.v1.MaintenanceExclusionOptions.Scope\"N\n\x05Scope\x12\x0f\n\x0bNO_UPGRADES\x10\x00\x12\x15\n\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"Z\n\x13RecurringTimeWindow\x12/\n\x06window\x18\x01 \x01(\x0b\x32\x1f.google.container.v1.TimeWindow\x12\x12\n\nrecurrence\x18\x02 \x01(\t\"C\n\x16\x44\x61ilyMaintenanceWindow\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x15\n\x08\x64uration\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x1cSetNodePoolManagementRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\nmanagement\x18\x05 \x01(\x0b\x32#.google.container.v1.NodeManagementB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\x9b\x01\n\x16SetNodePoolSizeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x17\n\nnode_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\".\n\x1e\x43ompleteNodePoolUpgradeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9f\x01\n\x1eRollbackNodePoolUpgradeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0brespect_pdb\x18\x07 \x01(\x08\"J\n\x15ListNodePoolsResponse\x12\x31\n\nnode_pools\x18\x01 \x03(\x0b\x32\x1d.google.container.v1.NodePool\"\xaf\x03\n\x12\x43lusterAutoscaling\x12$\n\x1c\x65nable_node_autoprovisioning\x18\x01 \x01(\x08\x12;\n\x0fresource_limits\x18\x02 \x03(\x0b\x32\".google.container.v1.ResourceLimit\x12W\n\x13\x61utoscaling_profile\x18\x03 \x01(\x0e\x32:.google.container.v1.ClusterAutoscaling.AutoscalingProfile\x12\x62\n#autoprovisioning_node_pool_defaults\x18\x04 \x01(\x0b\x32\x35.google.container.v1.AutoprovisioningNodePoolDefaults\x12\"\n\x1a\x61utoprovisioning_locations\x18\x05 \x03(\t\"U\n\x12\x41utoscalingProfile\x12\x17\n\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n\x14OPTIMIZE_UTILIZATION\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\"\xf8\x03\n AutoprovisioningNodePoolDefaults\x12\x14\n\x0coauth_scopes\x18\x01 \x03(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12G\n\x10upgrade_settings\x18\x03 \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12\x37\n\nmanagement\x18\x04 \x01(\x0b\x32#.google.container.v1.NodeManagement\x12\x1c\n\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x05\x12\x11\n\tdisk_type\x18\x07 \x01(\t\x12M\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32+.google.container.v1.ShieldedInstanceConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\t \x01(\t\x12\x12\n\nimage_type\x18\n \x01(\t\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\r \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"H\n\rResourceLimit\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x0f\n\x07minimum\x18\x02 \x01(\x03\x12\x0f\n\x07maximum\x18\x03 \x01(\x03\"\xc7\x02\n\x13NodePoolAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\x12\x17\n\x0f\x61utoprovisioned\x18\x04 \x01(\x08\x12P\n\x0flocation_policy\x18\x05 \x01(\x0e\x32\x37.google.container.v1.NodePoolAutoscaling.LocationPolicy\x12\x1c\n\x14total_min_node_count\x18\x06 \x01(\x05\x12\x1c\n\x14total_max_node_count\x18\x07 \x01(\x05\"H\n\x0eLocationPolicy\x12\x1f\n\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"\x92\x02\n\x10SetLabelsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12W\n\x0fresource_labels\x18\x04 \x03(\x0b\x32\x39.google.container.v1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0\x41\x02\x12\x1e\n\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x14SetLegacyAbacRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x84\x01\n\x16StartIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x1a\n\x12rotate_credentials\x18\x07 \x01(\x08\"k\n\x19\x43ompleteIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xc5\x02\n\x11\x41\x63\x63\x65leratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x12\x46\n\x12gpu_sharing_config\x18\x05 \x01(\x0b\x32%.google.container.v1.GPUSharingConfigH\x00\x88\x01\x01\x12]\n\x1egpu_driver_installation_config\x18\x06 \x01(\x0b\x32\x30.google.container.v1.GPUDriverInstallationConfigH\x01\x88\x01\x01\x42\x15\n\x13_gpu_sharing_configB!\n\x1f_gpu_driver_installation_config\"\x83\x02\n\x10GPUSharingConfig\x12\"\n\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03\x12[\n\x14gpu_sharing_strategy\x18\x02 \x01(\x0e\x32\x38.google.container.v1.GPUSharingConfig.GPUSharingStrategyH\x00\x88\x01\x01\"U\n\x12GPUSharingStrategy\x12$\n GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n\x0cTIME_SHARING\x10\x01\x12\x07\n\x03MPS\x10\x02\x42\x17\n\x15_gpu_sharing_strategy\"\x84\x02\n\x1bGPUDriverInstallationConfig\x12\x62\n\x12gpu_driver_version\x18\x01 \x01(\x0e\x32\x41.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersionH\x00\x88\x01\x01\"j\n\x10GPUDriverVersion\x12\"\n\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n\x15INSTALLATION_DISABLED\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\n\n\x06LATEST\x10\x03\x42\x15\n\x13_gpu_driver_version\"\x9a\x01\n\x16WorkloadMetadataConfig\x12>\n\x04mode\x18\x02 \x01(\x0e\x32\x30.google.container.v1.WorkloadMetadataConfig.Mode\"@\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCE_METADATA\x10\x01\x12\x10\n\x0cGKE_METADATA\x10\x02\"\xaa\x01\n\x17SetNetworkPolicyRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12?\n\x0enetwork_policy\x18\x04 \x01(\x0b\x32\".google.container.v1.NetworkPolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xb9\x01\n\x1bSetMaintenancePolicyRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x12maintenance_policy\x18\x04 \x01(\x0b\x32&.google.container.v1.MaintenancePolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xa9\x02\n\x0fStatusCondition\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32).google.container.v1.StatusCondition.CodeB\x02\x18\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12(\n\x0e\x63\x61nonical_code\x18\x03 \x01(\x0e\x32\x10.google.rpc.Code\"\x9d\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cGCE_STOCKOUT\x10\x01\x12\x1f\n\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n\x13\x43LOUD_KMS_KEY_ERROR\x10\x07\x12\x0f\n\x0b\x43\x41_EXPIRING\x10\t\"\x87\n\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x1c\x65nable_intra_node_visibility\x18\x05 \x01(\x08\x12\x43\n\x13\x64\x65\x66\x61ult_snat_status\x18\x07 \x01(\x0b\x32&.google.container.v1.DefaultSnatStatus\x12\x1f\n\x17\x65nable_l4ilb_subsetting\x18\n \x01(\x08\x12@\n\x11\x64\x61tapath_provider\x18\x0b \x01(\x0e\x32%.google.container.v1.DatapathProvider\x12P\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32,.google.container.v1.PrivateIPv6GoogleAccess\x12\x32\n\ndns_config\x18\r \x01(\x0b\x32\x1e.google.container.v1.DNSConfig\x12R\n\x1bservice_external_ips_config\x18\x0f \x01(\x0b\x32-.google.container.v1.ServiceExternalIPsConfig\x12\x41\n\x12gateway_api_config\x18\x10 \x01(\x0b\x32%.google.container.v1.GatewayAPIConfig\x12\x1f\n\x17\x65nable_multi_networking\x18\x11 \x01(\x08\x12\x66\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x42.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig\x12\'\n\x1a\x65nable_fqdn_network_policy\x18\x13 \x01(\x08H\x00\x88\x01\x01\x12Y\n\x1cin_transit_encryption_config\x18\x14 \x01(\x0e\x32..google.container.v1.InTransitEncryptionConfigH\x01\x88\x01\x01\x12\x35\n(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\x08H\x02\x88\x01\x01\x12)\n\x1c\x64\x65\x66\x61ult_enable_private_nodes\x18\x16 \x01(\x08H\x03\x88\x01\x01\x1a\xde\x01\n\x1f\x43lusterNetworkPerformanceConfig\x12q\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32G.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x1d\n\x1b_enable_fqdn_network_policyB\x1f\n\x1d_in_transit_encryption_configB+\n)_enable_cilium_clusterwide_network_policyB\x1f\n\x1d_default_enable_private_nodes\"\xc0\x01\n\x10GatewayAPIConfig\x12>\n\x07\x63hannel\x18\x01 \x01(\x0e\x32-.google.container.v1.GatewayAPIConfig.Channel\"l\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HANNEL_DISABLED\x10\x01\x12\x1c\n\x14\x43HANNEL_EXPERIMENTAL\x10\x03\x1a\x02\x08\x01\x12\x14\n\x10\x43HANNEL_STANDARD\x10\x04\"+\n\x18ServiceExternalIPsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x16GetOpenIDConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"\xdc\x01\n\x17GetOpenIDConfigResponse\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x10\n\x08jwks_uri\x18\x02 \x01(\t\x12 \n\x18response_types_supported\x18\x03 \x03(\t\x12\x1f\n\x17subject_types_supported\x18\x04 \x03(\t\x12-\n%id_token_signing_alg_values_supported\x18\x05 \x03(\t\x12\x18\n\x10\x63laims_supported\x18\x06 \x03(\t\x12\x13\n\x0bgrant_types\x18\x07 \x03(\t\"\'\n\x15GetJSONWebKeysRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"r\n\x03Jwk\x12\x0b\n\x03kty\x18\x01 \x01(\t\x12\x0b\n\x03\x61lg\x18\x02 \x01(\t\x12\x0b\n\x03use\x18\x03 \x01(\t\x12\x0b\n\x03kid\x18\x04 \x01(\t\x12\t\n\x01n\x18\x05 \x01(\t\x12\t\n\x01\x65\x18\x06 \x01(\t\x12\t\n\x01x\x18\x07 \x01(\t\x12\t\n\x01y\x18\x08 \x01(\t\x12\x0b\n\x03\x63rv\x18\t \x01(\t\"@\n\x16GetJSONWebKeysResponse\x12&\n\x04keys\x18\x01 \x03(\x0b\x32\x18.google.container.v1.Jwk\"2\n\"CheckAutopilotCompatibilityRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xfc\x02\n\x1b\x41utopilotCompatibilityIssue\x12\x34\n\x10last_observation\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onstraint_type\x18\x02 \x01(\t\x12X\n\x14incompatibility_type\x18\x03 \x01(\x0e\x32:.google.container.v1.AutopilotCompatibilityIssue.IssueType\x12\x10\n\x08subjects\x18\x04 \x03(\t\x12\x19\n\x11\x64ocumentation_url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"r\n\tIssueType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n\x1a\x41\x44\x44ITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"x\n#CheckAutopilotCompatibilityResponse\x12@\n\x06issues\x18\x01 \x03(\x0b\x32\x30.google.container.v1.AutopilotCompatibilityIssue\x12\x0f\n\x07summary\x18\x02 \x01(\t\"\x9c\x01\n\x0eReleaseChannel\x12<\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.google.container.v1.ReleaseChannel.Channel\"L\n\x07\x43hannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05RAPID\x10\x01\x12\x0b\n\x07REGULAR\x10\x02\x12\n\n\x06STABLE\x10\x03\x12\x0c\n\x08\x45XTENDED\x10\x04\"\'\n\x14\x43ostManagementConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\",\n\x19IntraNodeVisibilityConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"&\n\x13ILBSubsettingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xf7\x02\n\tDNSConfig\x12<\n\x0b\x63luster_dns\x18\x01 \x01(\x0e\x32\'.google.container.v1.DNSConfig.Provider\x12\x42\n\x11\x63luster_dns_scope\x18\x02 \x01(\x0e\x32\'.google.container.v1.DNSConfig.DNSScope\x12\x1a\n\x12\x63luster_dns_domain\x18\x03 \x01(\t\x12*\n\x1d\x61\x64\x64itive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n\x10PLATFORM_DEFAULT\x10\x01\x12\r\n\tCLOUD_DNS\x10\x02\x12\x0c\n\x08KUBE_DNS\x10\x03\"G\n\x08\x44NSScope\x12\x19\n\x15\x44NS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rCLUSTER_SCOPE\x10\x01\x12\r\n\tVPC_SCOPE\x10\x02\".\n\x11MaxPodsConstraint\x12\x19\n\x11max_pods_per_node\x18\x01 \x01(\x03\"/\n\x16WorkloadIdentityConfig\x12\x15\n\rworkload_pool\x18\x02 \x01(\t\"(\n\x15IdentityServiceConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"K\n\x10MeshCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"\xe3\x05\n\x12\x44\x61tabaseEncryption\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.container.v1.DatabaseEncryption.State\x12U\n\rcurrent_state\x18\x03 \x01(\x0e\x32\x34.google.container.v1.DatabaseEncryption.CurrentStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x63ryption_keys\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12Z\n\x15last_operation_errors\x18\x05 \x03(\x0b\x32\x36.google.container.v1.DatabaseEncryption.OperationErrorB\x03\xe0\x41\x03\x1ah\n\x0eOperationError\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"2\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tENCRYPTED\x10\x01\x12\r\n\tDECRYPTED\x10\x02\"\xfb\x01\n\x0c\x43urrentState\x12\x1d\n\x19\x43URRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43URRENT_STATE_ENCRYPTED\x10\x07\x12\x1b\n\x17\x43URRENT_STATE_DECRYPTED\x10\x02\x12$\n CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n\x1e\x43URRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n\x1e\x43URRENT_STATE_DECRYPTION_ERROR\x10\x06\x42\x10\n\x0e_current_state\"e\n\x1cListUsableSubnetworksRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"t\n\x1dListUsableSubnetworksResponse\x12:\n\x0bsubnetworks\x18\x01 \x03(\x0b\x32%.google.container.v1.UsableSubnetwork\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x80\x02\n\x1eUsableSubnetworkSecondaryRange\x12\x12\n\nrange_name\x18\x01 \x01(\t\x12\x15\n\rip_cidr_range\x18\x02 \x01(\t\x12J\n\x06status\x18\x03 \x01(\x0e\x32:.google.container.v1.UsableSubnetworkSecondaryRange.Status\"g\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x12\n\x0eIN_USE_SERVICE\x10\x02\x12\x18\n\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n\x12IN_USE_MANAGED_POD\x10\x04\"\xb8\x01\n\x10UsableSubnetwork\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12P\n\x13secondary_ip_ranges\x18\x04 \x03(\x0b\x32\x33.google.container.v1.UsableSubnetworkSecondaryRange\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\"\xed\x02\n\x19ResourceUsageExportConfig\x12`\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32\x42.google.container.v1.ResourceUsageExportConfig.BigQueryDestination\x12&\n\x1e\x65nable_network_egress_metering\x18\x02 \x01(\x08\x12m\n\x1b\x63onsumption_metering_config\x18\x03 \x01(\x0b\x32H.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig\x1a)\n\x13\x42igQueryDestination\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a,\n\x19\x43onsumptionMeteringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16VerticalPodAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x11\x44\x65\x66\x61ultSnatStatus\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\" \n\rShieldedNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nVirtualNIC\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nFastSocket\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xa8\x03\n\x12NotificationConfig\x12>\n\x06pubsub\x18\x01 \x01(\x0b\x32..google.container.v1.NotificationConfig.PubSub\x1a\x8a\x01\n\x06PubSub\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12>\n\x06\x66ilter\x18\x03 \x01(\x0b\x32..google.container.v1.NotificationConfig.Filter\x1aO\n\x06\x46ilter\x12\x45\n\nevent_type\x18\x01 \x03(\x0e\x32\x31.google.container.v1.NotificationConfig.EventType\"t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n\rUPGRADE_EVENT\x10\x02\x12\x1b\n\x17SECURITY_BULLETIN_EVENT\x10\x03\"$\n\x11\x43onfidentialNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xdf\x01\n\x0cUpgradeEvent\x12?\n\rresource_type\x18\x01 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x38\n\x14operation_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x10\n\x08resource\x18\x06 \x01(\t\"\xb3\x03\n\x10UpgradeInfoEvent\x12?\n\rresource_type\x18\x01 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x05 \x01(\t\x12\x16\n\x0etarget_version\x18\x06 \x01(\t\x12\x10\n\x08resource\x18\x07 \x01(\t\x12?\n\x05state\x18\x08 \x01(\x0e\x32+.google.container.v1.UpgradeInfoEvent.StateB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06\"\xb9\x01\n\x15UpgradeAvailableEvent\x12\x0f\n\x07version\x18\x01 \x01(\t\x12?\n\rresource_type\x18\x02 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12<\n\x0frelease_channel\x18\x03 \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12\x10\n\x08resource\x18\x04 \x01(\t\"\x9e\x02\n\x15SecurityBulletinEvent\x12\x1e\n\x16resource_type_affected\x18\x01 \x01(\t\x12\x13\n\x0b\x62ulletin_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ve_ids\x18\x03 \x03(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x14\n\x0c\x62ulletin_uri\x18\x05 \x01(\t\x12\x19\n\x11\x62rief_description\x18\x06 \x01(\t\x12!\n\x19\x61\x66\x66\x65\x63ted_supported_minors\x18\x07 \x03(\t\x12\x18\n\x10patched_versions\x18\x08 \x03(\t\x12 \n\x18suggested_upgrade_target\x18\t \x01(\t\x12\x1d\n\x15manual_steps_required\x18\n \x01(\x08\"g\n\tAutopilot\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12I\n\x16workload_policy_config\x18\x02 \x01(\x0b\x32).google.container.v1.WorkloadPolicyConfig\"H\n\x14WorkloadPolicyConfig\x12\x1c\n\x0f\x61llow_net_admin\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x12\n\x10_allow_net_admin\"V\n\rLoggingConfig\x12\x45\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32+.google.container.v1.LoggingComponentConfig\"\x91\x02\n\x16LoggingComponentConfig\x12P\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32\x35.google.container.v1.LoggingComponentConfig.Component\"\xa4\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tWORKLOADS\x10\x02\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0c\n\x08KCP_SSHD\x10\x07\x12\x12\n\x0eKCP_CONNECTION\x10\x08\"*\n\x17RayClusterLoggingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x97\x02\n\x10MonitoringConfig\x12H\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32..google.container.v1.MonitoringComponentConfig\x12O\n\x19managed_prometheus_config\x18\x02 \x01(\x0b\x32,.google.container.v1.ManagedPrometheusConfig\x12h\n&advanced_datapath_observability_config\x18\x03 \x01(\x0b\x32\x38.google.container.v1.AdvancedDatapathObservabilityConfig\"\x9e\x02\n#AdvancedDatapathObservabilityConfig\x12\x16\n\x0e\x65nable_metrics\x18\x01 \x01(\x08\x12V\n\nrelay_mode\x18\x02 \x01(\x0e\x32\x42.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode\x12\x19\n\x0c\x65nable_relay\x18\x03 \x01(\x08H\x00\x88\x01\x01\"[\n\tRelayMode\x12\x1a\n\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n\x0b\x45XTERNAL_LB\x10\x04\x42\x0f\n\r_enable_relay\"-\n\x1aRayClusterMonitoringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"Z\n\x15NodePoolLoggingConfig\x12\x41\n\x0evariant_config\x18\x01 \x01(\x0b\x32).google.container.v1.LoggingVariantConfig\"\x9f\x01\n\x14LoggingVariantConfig\x12\x42\n\x07variant\x18\x01 \x01(\x0e\x32\x31.google.container.v1.LoggingVariantConfig.Variant\"C\n\x07Variant\x12\x17\n\x13VARIANT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x12\n\x0eMAX_THROUGHPUT\x10\x02\"\xda\x02\n\x19MonitoringComponentConfig\x12S\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32\x38.google.container.v1.MonitoringComponentConfig.Component\"\xe7\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0b\n\x07STORAGE\x10\x07\x12\x07\n\x03HPA\x10\x08\x12\x07\n\x03POD\x10\t\x12\r\n\tDAEMONSET\x10\n\x12\x0e\n\nDEPLOYMENT\x10\x0b\x12\x0f\n\x0bSTATEFULSET\x10\x0c\x12\x0c\n\x08\x43\x41\x44VISOR\x10\r\x12\x0b\n\x07KUBELET\x10\x0e\x12\x08\n\x04\x44\x43GM\x10\x0f\"*\n\x17ManagedPrometheusConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"N\n\x05\x46leet\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x17\n\nmembership\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0epre_registered\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\xac\x05\n\x1b\x43ontrolPlaneEndpointsConfig\x12_\n\x13\x64ns_endpoint_config\x18\x01 \x01(\x0b\x32\x42.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig\x12_\n\x13ip_endpoints_config\x18\x03 \x01(\x0b\x32\x42.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig\x1aj\n\x11\x44NSEndpointConfig\x12\x15\n\x08\x65ndpoint\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61llow_external_traffic\x18\x03 \x01(\x08H\x00\x88\x01\x01\x42\x19\n\x17_allow_external_traffic\x1a\xde\x02\n\x11IPEndpointsConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x65nable_public_endpoint\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\rglobal_access\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12W\n\x1a\x61uthorized_networks_config\x18\x04 \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfig\x12\x1c\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10private_endpoint\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1bprivate_endpoint_subnetwork\x18\x07 \x01(\tB\n\n\x08_enabledB\x19\n\x17_enable_public_endpointB\x10\n\x0e_global_access\"2\n\x17LocalNvmeSsdBlockConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"9\n\x1e\x45phemeralStorageLocalSsdConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"\x84\x01\n\x13ResourceManagerTags\x12@\n\x04tags\x18\x01 \x03(\x0b\x32\x32.google.container.v1.ResourceManagerTags.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf4\x01\n\x10\x45nterpriseConfig\x12L\n\x0c\x63luster_tier\x18\x01 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTierB\x03\xe0\x41\x03\x12G\n\x0c\x64\x65sired_tier\x18\x02 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTier\"I\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\"7\n\x13SecretManagerConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_enabled\"\x9b\x01\n\x11SecondaryBootDisk\x12\x39\n\x04mode\x18\x01 \x01(\x0e\x32+.google.container.v1.SecondaryBootDisk.Mode\x12\x12\n\ndisk_image\x18\x02 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONTAINER_IMAGE_CACHE\x10\x01\"!\n\x1fSecondaryBootDiskUpdateStrategy*\xc6\x01\n\x17PrivateIPv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\'\n#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n\x13UpgradeResourceType\x12%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MASTER\x10\x01\x12\r\n\tNODE_POOL\x10\x02*a\n\x10\x44\x61tapathProvider\x12!\n\x1d\x44\x41TAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n\x11\x41\x44VANCED_DATAPATH\x10\x02*^\n\x16NodePoolUpdateStrategy\x12)\n%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nBLUE_GREEN\x10\x02\x12\t\n\x05SURGE\x10\x03*@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02*N\n\x0eIPv6AccessType\x12 \n\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02*\x9f\x01\n\x19InTransitEncryptionConfig\x12,\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x30\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x02\x32\xb2I\n\x0e\x43lusterManager\x12\xe8\x01\n\x0cListClusters\x12(.google.container.v1.ListClustersRequest\x1a).google.container.v1.ListClustersResponse\"\x82\x01\xda\x41\x0fproject_id,zone\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x61\x12,/v1/{parent=projects/*/locations/*}/clustersZ1\x12//v1/projects/{project_id}/zones/{zone}/clusters\x12\xed\x01\n\nGetCluster\x12&.google.container.v1.GetClusterRequest\x1a\x1c.google.container.v1.Cluster\"\x98\x01\xda\x41\x1aproject_id,zone,cluster_id\xda\x41\x04name\x82\xd3\xe4\x93\x02n\x12,/v1/{name=projects/*/locations/*/clusters/*}Z>\x12*/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels:\x01*ZP\"K/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels:\x01*\x12\xa5\x02\n\rSetLegacyAbac\x12).google.container.v1.SetLegacyAbacRequest\x1a\x1e.google.container.v1.Operation\"\xc8\x01\xda\x41\"project_id,zone,cluster_id,enabled\xda\x41\x0cname,enabled\x82\xd3\xe4\x93\x02\x8d\x01\":/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac:\x01*ZL\"G/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac:\x01*\x12\xa0\x02\n\x0fStartIPRotation\x12+.google.container.v1.StartIPRotationRequest\x1a\x1e.google.container.v1.Operation\"\xbf\x01\xda\x41\x1aproject_id,zone,cluster_id\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x01\"\n\x0ekubelet_config\x18\x16 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\x17 \x01(\t\x12\x34\n\x0bgcfs_config\x18\x19 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12O\n\x19\x61\x64vanced_machine_features\x18\x1a \x01(\x0b\x32,.google.container.v1.AdvancedMachineFeatures\x12.\n\x05gvnic\x18\x1d \x01(\x0b\x32\x1f.google.container.v1.VirtualNIC\x12\x0c\n\x04spot\x18 \x01(\x08\x12\x42\n\x12\x63onfidential_nodes\x18# \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12\x39\n\x0b\x66\x61st_socket\x18$ \x01(\x0b\x32\x1f.google.container.v1.FastSocketH\x00\x88\x01\x01\x12L\n\x0fresource_labels\x18% \x03(\x0b\x32\x33.google.container.v1.NodeConfig.ResourceLabelsEntry\x12\x42\n\x0elogging_config\x18& \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12\x43\n\x13windows_node_config\x18\' \x01(\x0b\x32&.google.container.v1.WindowsNodeConfig\x12Q\n\x1blocal_nvme_ssd_block_config\x18( \x01(\x0b\x32,.google.container.v1.LocalNvmeSsdBlockConfig\x12_\n\"ephemeral_storage_local_ssd_config\x18) \x01(\x0b\x32\x33.google.container.v1.EphemeralStorageLocalSsdConfig\x12\x41\n\x12sole_tenant_config\x18* \x01(\x0b\x32%.google.container.v1.SoleTenantConfig\x12@\n\x11\x63ontainerd_config\x18+ \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12G\n\x15resource_manager_tags\x18- \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12(\n\x1b\x65nable_confidential_storage\x18. \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x14secondary_boot_disks\x18\x30 \x03(\x0b\x32&.google.container.v1.SecondaryBootDisk\x12\x15\n\rstorage_pools\x18\x31 \x03(\t\x12\x66\n#secondary_boot_disk_update_strategy\x18\x32 \x01(\x0b\x32\x34.google.container.v1.SecondaryBootDiskUpdateStrategyH\x01\x88\x01\x01\x12\x33\n\x10max_run_duration\x18\x35 \x01(\x0b\x32\x19.google.protobuf.Duration\x12^\n\x19local_ssd_encryption_mode\x18\x36 \x01(\x0e\x32\x36.google.container.v1.NodeConfig.LocalSsdEncryptionModeH\x02\x88\x01\x01\x12W\n\x15\x65\x66\x66\x65\x63tive_cgroup_mode\x18\x37 \x01(\x0e\x32\x33.google.container.v1.NodeConfig.EffectiveCgroupModeB\x03\xe0\x41\x03\x12\x17\n\nflex_start\x18\x38 \x01(\x08H\x03\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x16LocalSsdEncryptionMode\x12)\n%LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_ENCRYPTION\x10\x01\x12\x1c\n\x18\x45PHEMERAL_KEY_ENCRYPTION\x10\x02\"x\n\x13\x45\x66\x66\x65\x63tiveCgroupMode\x12%\n!EFFECTIVE_CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V1\x10\x01\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V2\x10\x02\x42\x0e\n\x0c_fast_socketB&\n$_secondary_boot_disk_update_strategyB\x1c\n\x1a_local_ssd_encryption_modeB\r\n\x0b_flex_start\"\xa4\x03\n\x17\x41\x64vancedMachineFeatures\x12\x1d\n\x10threads_per_core\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12p\n\x1bperformance_monitoring_unit\x18\x03 \x01(\x0e\x32\x46.google.container.v1.AdvancedMachineFeatures.PerformanceMonitoringUnitH\x02\x88\x01\x01\"w\n\x19PerformanceMonitoringUnit\x12+\n\'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\x00\x12\x11\n\rARCHITECTURAL\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08\x45NHANCED\x10\x03\x42\x13\n\x11_threads_per_coreB\x1f\n\x1d_enable_nested_virtualizationB\x1e\n\x1c_performance_monitoring_unit\"\xb3\x06\n\x11NodeNetworkConfig\x12\x1d\n\x10\x63reate_pod_range\x18\x04 \x01(\x08\x42\x03\xe0\x41\x04\x12\x11\n\tpod_range\x18\x05 \x01(\t\x12\x1b\n\x13pod_ipv4_cidr_block\x18\x06 \x01(\t\x12!\n\x14\x65nable_private_nodes\x18\t \x01(\x08H\x00\x88\x01\x01\x12h\n\x1anetwork_performance_config\x18\x0b \x01(\x0b\x32?.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfigH\x01\x88\x01\x01\x12V\n\x1dpod_cidr_overprovision_config\x18\r \x01(\x0b\x32/.google.container.v1.PodCIDROverprovisionConfig\x12Y\n\x1f\x61\x64\x64itional_node_network_configs\x18\x0e \x03(\x0b\x32\x30.google.container.v1.AdditionalNodeNetworkConfig\x12W\n\x1e\x61\x64\x64itional_pod_network_configs\x18\x0f \x03(\x0b\x32/.google.container.v1.AdditionalPodNetworkConfig\x12\'\n\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01\x42\x03\xe0\x41\x03\x1a\xd4\x01\n\x18NetworkPerformanceConfig\x12n\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x44.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x17\n\x15_enable_private_nodesB\x1d\n\x1b_network_performance_config\"B\n\x1b\x41\x64\x64itionalNodeNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\"\xab\x01\n\x1a\x41\x64\x64itionalPodNetworkConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1b\n\x13secondary_pod_range\x18\x02 \x01(\t\x12\x46\n\x11max_pods_per_node\x18\x03 \x01(\x0b\x32&.google.container.v1.MaxPodsConstraintH\x00\x88\x01\x01\x42\x14\n\x12_max_pods_per_node\"Y\n\x16ShieldedInstanceConfig\x12\x1a\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x12#\n\x1b\x65nable_integrity_monitoring\x18\x02 \x01(\x08\"k\n\rSandboxConfig\x12\x35\n\x04type\x18\x02 \x01(\x0e\x32\'.google.container.v1.SandboxConfig.Type\"#\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06GVISOR\x10\x01\"\x1d\n\nGcfsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xdf\x01\n\x13ReservationAffinity\x12O\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32-.google.container.v1.ReservationAffinity.Type\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"Z\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\"\x96\x02\n\x10SoleTenantConfig\x12K\n\x0fnode_affinities\x18\x01 \x03(\x0b\x32\x32.google.container.v1.SoleTenantConfig.NodeAffinity\x1a\xb4\x01\n\x0cNodeAffinity\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x08operator\x18\x02 \x01(\x0e\x32;.google.container.v1.SoleTenantConfig.NodeAffinity.Operator\x12\x0e\n\x06values\x18\x03 \x03(\t\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\"\xfc\x04\n\x10\x43ontainerdConfig\x12i\n\x1eprivate_registry_access_config\x18\x01 \x01(\x0b\x32\x41.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig\x1a\xfc\x03\n\x1bPrivateRegistryAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x8f\x01\n#certificate_authority_domain_config\x18\x02 \x03(\x0b\x32\x62.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig\x1a\xb9\x02\n CertificateAuthorityDomainConfig\x12\r\n\x05\x66qdns\x18\x01 \x03(\t\x12\xb6\x01\n%gcp_secret_manager_certificate_config\x18\x02 \x01(\x0b\x32\x84\x01.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00\x1a\x37\n!GCPSecretManagerCertificateConfig\x12\x12\n\nsecret_uri\x18\x01 \x01(\tB\x14\n\x12\x63\x65rtificate_config\"\xb9\x01\n\tNodeTaint\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x35\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32%.google.container.v1.NodeTaint.Effect\"Y\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNO_SCHEDULE\x10\x01\x12\x16\n\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n\nNO_EXECUTE\x10\x03\"<\n\nNodeTaints\x12.\n\x06taints\x18\x01 \x03(\x0b\x32\x1e.google.container.v1.NodeTaint\"x\n\nNodeLabels\x12;\n\x06labels\x18\x01 \x03(\x0b\x32+.google.container.v1.NodeLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\x0eResourceLabels\x12?\n\x06labels\x18\x01 \x03(\x0b\x32/.google.container.v1.ResourceLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x0bNetworkTags\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\xe8\x01\n\nMasterAuth\x12\x14\n\x08username\x18\x01 \x01(\tB\x02\x18\x01\x12\x14\n\x08password\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x19\x63lient_certificate_config\x18\x03 \x01(\x0b\x32,.google.container.v1.ClientCertificateConfig\x12#\n\x16\x63luster_ca_certificate\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63lient_certificate\x18\x65 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nclient_key\x18\x66 \x01(\tB\x03\xe0\x41\x03\";\n\x17\x43lientCertificateConfig\x12 \n\x18issue_client_certificate\x18\x01 \x01(\x08\"\xae\t\n\x0c\x41\x64\x64onsConfig\x12\x43\n\x13http_load_balancing\x18\x01 \x01(\x0b\x32&.google.container.v1.HttpLoadBalancing\x12Q\n\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\x0b\x32-.google.container.v1.HorizontalPodAutoscaling\x12J\n\x14kubernetes_dashboard\x18\x03 \x01(\x0b\x32(.google.container.v1.KubernetesDashboardB\x02\x18\x01\x12G\n\x15network_policy_config\x18\x04 \x01(\x0b\x32(.google.container.v1.NetworkPolicyConfig\x12=\n\x10\x63loud_run_config\x18\x07 \x01(\x0b\x32#.google.container.v1.CloudRunConfig\x12=\n\x10\x64ns_cache_config\x18\x08 \x01(\x0b\x32#.google.container.v1.DnsCacheConfig\x12K\n\x17\x63onfig_connector_config\x18\n \x01(\x0b\x32*.google.container.v1.ConfigConnectorConfig\x12\x64\n%gce_persistent_disk_csi_driver_config\x18\x0b \x01(\x0b\x32\x35.google.container.v1.GcePersistentDiskCsiDriverConfig\x12Y\n\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1.GcpFilestoreCsiDriverConfig\x12J\n\x17gke_backup_agent_config\x18\x10 \x01(\x0b\x32).google.container.v1.GkeBackupAgentConfig\x12O\n\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\x0b\x32+.google.container.v1.GcsFuseCsiDriverConfig\x12\x46\n\x12stateful_ha_config\x18\x12 \x01(\x0b\x32%.google.container.v1.StatefulHAConfigB\x03\xe0\x41\x01\x12Z\n\x1fparallelstore_csi_driver_config\x18\x13 \x01(\x0b\x32\x31.google.container.v1.ParallelstoreCsiDriverConfig\x12H\n\x13ray_operator_config\x18\x15 \x01(\x0b\x32&.google.container.v1.RayOperatorConfigB\x03\xe0\x41\x01\x12Z\n\x1fhigh_scale_checkpointing_config\x18\x16 \x01(\x0b\x32\x31.google.container.v1.HighScaleCheckpointingConfig\"%\n\x11HttpLoadBalancing\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x18HorizontalPodAutoscaling\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13KubernetesDashboard\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13NetworkPolicyConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"!\n\x0e\x44nsCacheConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"9\n&PrivateClusterMasterGlobalAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe8\x02\n\x14PrivateClusterConfig\x12 \n\x14\x65nable_private_nodes\x18\x01 \x01(\x08\x42\x02\x18\x01\x12#\n\x17\x65nable_private_endpoint\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x1e\n\x16master_ipv4_cidr_block\x18\x03 \x01(\t\x12\x1f\n\x10private_endpoint\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x1e\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cpeering_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x1bmaster_global_access_config\x18\x08 \x01(\x0b\x32;.google.container.v1.PrivateClusterMasterGlobalAccessConfigB\x02\x18\x01\x12\'\n\x1bprivate_endpoint_subnetwork\x18\n \x01(\tB\x02\x18\x01\"D\n\x19\x41uthenticatorGroupsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0esecurity_group\x18\x02 \x01(\t\"\xee\x01\n\x0e\x43loudRunConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12P\n\x12load_balancer_type\x18\x03 \x01(\x0e\x32\x34.google.container.v1.CloudRunConfig.LoadBalancerType\"x\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"(\n\x15\x43onfigConnectorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"3\n GcePersistentDiskCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\".\n\x1bGcpFilestoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16GcsFuseCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cParallelstoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cHighScaleCheckpointingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd8\x01\n\x11RayOperatorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12U\n\x1aray_cluster_logging_config\x18\x02 \x01(\x0b\x32,.google.container.v1.RayClusterLoggingConfigB\x03\xe0\x41\x01\x12[\n\x1dray_cluster_monitoring_config\x18\x03 \x01(\x0b\x32/.google.container.v1.RayClusterMonitoringConfigB\x03\xe0\x41\x01\"\'\n\x14GkeBackupAgentConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"#\n\x10StatefulHAConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xea\x02\n\x1eMasterAuthorizedNetworksConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12R\n\x0b\x63idr_blocks\x18\x02 \x03(\x0b\x32=.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock\x12,\n\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x31\n$private_endpoint_enforcement_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x1a\x35\n\tCidrBlock\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x12\n\ncidr_block\x18\x02 \x01(\tB\"\n _gcp_public_cidrs_access_enabledB\'\n%_private_endpoint_enforcement_enabled\"\x1d\n\nLegacyAbac\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x91\x01\n\rNetworkPolicy\x12=\n\x08provider\x18\x01 \x01(\x0e\x32+.google.container.v1.NetworkPolicy.Provider\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"0\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41LICO\x10\x01\"\xe3\x01\n\x13\x42inaryAuthorization\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12P\n\x0f\x65valuation_mode\x18\x02 \x01(\x0e\x32\x37.google.container.v1.BinaryAuthorization.EvaluationMode\"e\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12$\n PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\"-\n\x1aPodCIDROverprovisionConfig\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\"\xc1\x06\n\x12IPAllocationPolicy\x12\x16\n\x0euse_ip_aliases\x18\x01 \x01(\x08\x12\x19\n\x11\x63reate_subnetwork\x18\x02 \x01(\x08\x12\x17\n\x0fsubnetwork_name\x18\x03 \x01(\t\x12\x1d\n\x11\x63luster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01\x12\x1a\n\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01\x12\x1e\n\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01\x12$\n\x1c\x63luster_secondary_range_name\x18\x07 \x01(\t\x12%\n\x1dservices_secondary_range_name\x18\x08 \x01(\t\x12\x1f\n\x17\x63luster_ipv4_cidr_block\x18\t \x01(\t\x12\x1c\n\x14node_ipv4_cidr_block\x18\n \x01(\t\x12 \n\x18services_ipv4_cidr_block\x18\x0b \x01(\t\x12\x1f\n\x13tpu_ipv4_cidr_block\x18\r \x01(\tB\x02\x18\x01\x12\x12\n\nuse_routes\x18\x0f \x01(\x08\x12\x32\n\nstack_type\x18\x10 \x01(\x0e\x32\x1e.google.container.v1.StackType\x12=\n\x10ipv6_access_type\x18\x11 \x01(\x0e\x32#.google.container.v1.IPv6AccessType\x12V\n\x1dpod_cidr_overprovision_config\x18\x15 \x01(\x0b\x32/.google.container.v1.PodCIDROverprovisionConfig\x12#\n\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12Y\n\x1c\x61\x64\x64itional_pod_ranges_config\x18\x18 \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfigB\x03\xe0\x41\x03\x12/\n\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01\x42\x03\xe0\x41\x03\"\xda!\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x12initial_node_count\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x38\n\x0bnode_config\x18\x04 \x01(\x0b\x32\x1f.google.container.v1.NodeConfigB\x02\x18\x01\x12\x34\n\x0bmaster_auth\x18\x05 \x01(\x0b\x32\x1f.google.container.v1.MasterAuth\x12\x17\n\x0flogging_service\x18\x06 \x01(\t\x12\x1a\n\x12monitoring_service\x18\x07 \x01(\t\x12\x0f\n\x07network\x18\x08 \x01(\t\x12\x19\n\x11\x63luster_ipv4_cidr\x18\t \x01(\t\x12\x38\n\raddons_config\x18\n \x01(\x0b\x32!.google.container.v1.AddonsConfig\x12\x12\n\nsubnetwork\x18\x0b \x01(\t\x12\x31\n\nnode_pools\x18\x0c \x03(\x0b\x32\x1d.google.container.v1.NodePool\x12\x11\n\tlocations\x18\r \x03(\t\x12\x1f\n\x17\x65nable_kubernetes_alpha\x18\x0e \x01(\x08\x12$\n\x1b\x61lpha_cluster_feature_gates\x18\xa0\x01 \x03(\t\x12I\n\x0fresource_labels\x18\x0f \x03(\x0b\x32\x30.google.container.v1.Cluster.ResourceLabelsEntry\x12\x19\n\x11label_fingerprint\x18\x10 \x01(\t\x12\x34\n\x0blegacy_abac\x18\x12 \x01(\x0b\x32\x1f.google.container.v1.LegacyAbac\x12:\n\x0enetwork_policy\x18\x13 \x01(\x0b\x32\".google.container.v1.NetworkPolicy\x12\x45\n\x14ip_allocation_policy\x18\x14 \x01(\x0b\x32\'.google.container.v1.IPAllocationPolicy\x12\x62\n!master_authorized_networks_config\x18\x16 \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12\x42\n\x12maintenance_policy\x18\x17 \x01(\x0b\x32&.google.container.v1.MaintenancePolicy\x12\x46\n\x14\x62inary_authorization\x18\x18 \x01(\x0b\x32(.google.container.v1.BinaryAuthorization\x12<\n\x0b\x61utoscaling\x18\x1a \x01(\x0b\x32\'.google.container.v1.ClusterAutoscaling\x12:\n\x0enetwork_config\x18\x1b \x01(\x0b\x32\".google.container.v1.NetworkConfig\x12K\n\x1b\x64\x65\x66\x61ult_max_pods_constraint\x18\x1e \x01(\x0b\x32&.google.container.v1.MaxPodsConstraint\x12T\n\x1cresource_usage_export_config\x18! \x01(\x0b\x32..google.container.v1.ResourceUsageExportConfig\x12S\n\x1b\x61uthenticator_groups_config\x18\" \x01(\x0b\x32..google.container.v1.AuthenticatorGroupsConfig\x12I\n\x16private_cluster_config\x18% \x01(\x0b\x32).google.container.v1.PrivateClusterConfig\x12\x44\n\x13\x64\x61tabase_encryption\x18& \x01(\x0b\x32\'.google.container.v1.DatabaseEncryption\x12M\n\x18vertical_pod_autoscaling\x18\' \x01(\x0b\x32+.google.container.v1.VerticalPodAutoscaling\x12:\n\x0eshielded_nodes\x18( \x01(\x0b\x32\".google.container.v1.ShieldedNodes\x12<\n\x0frelease_channel\x18) \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12M\n\x18workload_identity_config\x18+ \x01(\x0b\x32+.google.container.v1.WorkloadIdentityConfig\x12@\n\x11mesh_certificates\x18\x43 \x01(\x0b\x32%.google.container.v1.MeshCertificates\x12I\n\x16\x63ost_management_config\x18- \x01(\x0b\x32).google.container.v1.CostManagementConfig\x12\x44\n\x13notification_config\x18\x31 \x01(\x0b\x32\'.google.container.v1.NotificationConfig\x12\x42\n\x12\x63onfidential_nodes\x18\x32 \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12K\n\x17identity_service_config\x18\x36 \x01(\x0b\x32*.google.container.v1.IdentityServiceConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x65 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x15\n\x08\x65ndpoint\x18\x66 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17initial_cluster_version\x18g \x01(\t\x12#\n\x16\x63urrent_master_version\x18h \x01(\tB\x03\xe0\x41\x03\x12#\n\x14\x63urrent_node_version\x18i \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x63reate_time\x18j \x01(\tB\x03\xe0\x41\x03\x12\x38\n\x06status\x18k \x01(\x0e\x32#.google.container.v1.Cluster.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18l \x01(\tB\x05\x18\x01\xe0\x41\x03\x12 \n\x13node_ipv4_cidr_size\x18m \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0\x41\x03\x12\"\n\x13instance_group_urls\x18o \x03(\tB\x05\x18\x01\xe0\x41\x03\x12!\n\x12\x63urrent_node_count\x18p \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x65xpire_time\x18q \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18r \x01(\tB\x03\xe0\x41\x03\x12\x16\n\nenable_tpu\x18s \x01(\x08\x42\x02\x18\x01\x12\"\n\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x38\n\nconditions\x18v \x03(\x0b\x32$.google.container.v1.StatusCondition\x12\x32\n\tautopilot\x18\x80\x01 \x01(\x0b\x32\x1e.google.container.v1.Autopilot\x12\x10\n\x02id\x18\x81\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x12node_pool_defaults\x18\x83\x01 \x01(\x0b\x32%.google.container.v1.NodePoolDefaultsH\x00\x88\x01\x01\x12;\n\x0elogging_config\x18\x84\x01 \x01(\x0b\x32\".google.container.v1.LoggingConfig\x12\x41\n\x11monitoring_config\x18\x85\x01 \x01(\x0b\x32%.google.container.v1.MonitoringConfig\x12G\n\x15node_pool_auto_config\x18\x88\x01 \x01(\x0b\x32\'.google.container.v1.NodePoolAutoConfig\x12=\n\x0fpod_autoscaling\x18\x8a\x01 \x01(\x0b\x32#.google.container.v1.PodAutoscaling\x12\r\n\x04\x65tag\x18\x8b\x01 \x01(\t\x12*\n\x05\x66leet\x18\x8c\x01 \x01(\x0b\x32\x1a.google.container.v1.Fleet\x12L\n\x17security_posture_config\x18\x91\x01 \x01(\x0b\x32*.google.container.v1.SecurityPostureConfig\x12Y\n\x1e\x63ontrol_plane_endpoints_config\x18\x92\x01 \x01(\x0b\x32\x30.google.container.v1.ControlPlaneEndpointsConfig\x12\x44\n\x14\x65nable_k8s_beta_apis\x18\x8f\x01 \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12\x41\n\x11\x65nterprise_config\x18\x95\x01 \x01(\x0b\x32%.google.container.v1.EnterpriseConfig\x12H\n\x15secret_manager_config\x18\x96\x01 \x01(\x0b\x32(.google.container.v1.SecretManagerConfig\x12P\n\x19\x63ompliance_posture_config\x18\x97\x01 \x01(\x0b\x32,.google.container.v1.CompliancePostureConfig\x12 \n\rsatisfies_pzs\x18\x98\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12 \n\rsatisfies_pzi\x18\x99\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x18user_managed_keys_config\x18\x9a\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfigH\x03\x88\x01\x01\x12I\n\x13rbac_binding_config\x18\x9c\x01 \x01(\x0b\x32&.google.container.v1.RBACBindingConfigH\x04\x88\x01\x01\x12\\\n\x1f\x61nonymous_authentication_config\x18\xa4\x01 \x01(\x0b\x32\x32.google.container.v1.AnonymousAuthenticationConfig\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"w\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0f\n\x0bRECONCILING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x44\x45GRADED\x10\x06\x42\x15\n\x13_node_pool_defaultsB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pziB\x1b\n\x19_user_managed_keys_configB\x16\n\x14_rbac_binding_config\"\xef\x01\n\x11RBACBindingConfig\x12;\n.enable_insecure_binding_system_unauthenticated\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n,enable_insecure_binding_system_authenticated\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x31\n/_enable_insecure_binding_system_unauthenticatedB/\n-_enable_insecure_binding_system_authenticated\"\xe9\x04\n\x15UserManagedKeysConfig\x12\x38\n\ncluster_ca\x18\n \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x39\n\x0b\x65tcd_api_ca\x18\x0b \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12:\n\x0c\x65tcd_peer_ca\x18\x0c \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12S\n\x1cservice_account_signing_keys\x18\r \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!service_account_verification_keys\x18\x0e \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12<\n\x0e\x61ggregation_ca\x18\x0f \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12X\n!control_plane_disk_encryption_key\x18\x10 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!gkeops_etcd_backup_encryption_key\x18\x11 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\x1f\n\x1d\x41nonymousAuthenticationConfig\"\xba\x02\n\x17\x43ompliancePostureConfig\x12\x44\n\x04mode\x18\x01 \x01(\x0e\x32\x31.google.container.v1.CompliancePostureConfig.ModeH\x00\x88\x01\x01\x12]\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32?.google.container.v1.CompliancePostureConfig.ComplianceStandard\x1a\x38\n\x12\x43omplianceStandard\x12\x15\n\x08standard\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_standard\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\x07\n\x05_mode\"(\n\x10K8sBetaAPIConfig\x12\x14\n\x0c\x65nabled_apis\x18\x01 \x03(\t\"\xae\x03\n\x15SecurityPostureConfig\x12\x42\n\x04mode\x18\x01 \x01(\x0e\x32/.google.container.v1.SecurityPostureConfig.ModeH\x00\x88\x01\x01\x12]\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32<.google.container.v1.SecurityPostureConfig.VulnerabilityModeH\x01\x88\x01\x01\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\x42\x07\n\x05_modeB\x15\n\x13_vulnerability_mode\"\xa0\x02\n\x12NodePoolAutoConfig\x12\x36\n\x0cnetwork_tags\x18\x01 \x01(\x0b\x32 .google.container.v1.NetworkTags\x12G\n\x15resource_manager_tags\x18\x02 \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12\x43\n\x13node_kubelet_config\x18\x03 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x44\n\x11linux_node_config\x18\x04 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfigB\x03\xe0\x41\x03\"Y\n\x10NodePoolDefaults\x12\x45\n\x14node_config_defaults\x18\x01 \x01(\x0b\x32\'.google.container.v1.NodeConfigDefaults\"\x95\x02\n\x12NodeConfigDefaults\x12\x34\n\x0bgcfs_config\x18\x01 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12\x42\n\x0elogging_config\x18\x03 \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12@\n\x11\x63ontainerd_config\x18\x04 \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12\x43\n\x13node_kubelet_config\x18\x06 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\"\xe7)\n\rClusterUpdate\x12\x1c\n\x14\x64\x65sired_node_version\x18\x04 \x01(\t\x12\"\n\x1a\x64\x65sired_monitoring_service\x18\x05 \x01(\t\x12@\n\x15\x64\x65sired_addons_config\x18\x06 \x01(\x0b\x32!.google.container.v1.AddonsConfig\x12\x1c\n\x14\x64\x65sired_node_pool_id\x18\x07 \x01(\t\x12\x1a\n\x12\x64\x65sired_image_type\x18\x08 \x01(\t\x12L\n\x1b\x64\x65sired_database_encryption\x18. \x01(\x0b\x32\'.google.container.v1.DatabaseEncryption\x12U\n desired_workload_identity_config\x18/ \x01(\x0b\x32+.google.container.v1.WorkloadIdentityConfig\x12H\n\x19\x64\x65sired_mesh_certificates\x18\x43 \x01(\x0b\x32%.google.container.v1.MeshCertificates\x12\x42\n\x16\x64\x65sired_shielded_nodes\x18\x30 \x01(\x0b\x32\".google.container.v1.ShieldedNodes\x12Q\n\x1e\x64\x65sired_cost_management_config\x18\x31 \x01(\x0b\x32).google.container.v1.CostManagementConfig\x12:\n\x12\x64\x65sired_dns_config\x18\x35 \x01(\x0b\x32\x1e.google.container.v1.DNSConfig\x12O\n\x1d\x64\x65sired_node_pool_autoscaling\x18\t \x01(\x0b\x32(.google.container.v1.NodePoolAutoscaling\x12\x19\n\x11\x64\x65sired_locations\x18\n \x03(\t\x12j\n)desired_master_authorized_networks_config\x18\x0c \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12L\n\x1b\x64\x65sired_cluster_autoscaling\x18\x0f \x01(\x0b\x32\'.google.container.v1.ClusterAutoscaling\x12N\n\x1c\x64\x65sired_binary_authorization\x18\x10 \x01(\x0b\x32(.google.container.v1.BinaryAuthorization\x12\x1f\n\x17\x64\x65sired_logging_service\x18\x13 \x01(\t\x12\\\n$desired_resource_usage_export_config\x18\x15 \x01(\x0b\x32..google.container.v1.ResourceUsageExportConfig\x12U\n desired_vertical_pod_autoscaling\x18\x16 \x01(\x0b\x32+.google.container.v1.VerticalPodAutoscaling\x12U\n\x1e\x64\x65sired_private_cluster_config\x18\x19 \x01(\x0b\x32).google.container.v1.PrivateClusterConfigB\x02\x18\x01\x12\\\n$desired_intra_node_visibility_config\x18\x1a \x01(\x0b\x32..google.container.v1.IntraNodeVisibilityConfig\x12K\n\x1b\x64\x65sired_default_snat_status\x18\x1c \x01(\x0b\x32&.google.container.v1.DefaultSnatStatus\x12\x44\n\x17\x64\x65sired_release_channel\x18\x1f \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12Q\n\x1f\x64\x65sired_l4ilb_subsetting_config\x18\' \x01(\x0b\x32(.google.container.v1.ILBSubsettingConfig\x12H\n\x19\x64\x65sired_datapath_provider\x18\x32 \x01(\x0e\x32%.google.container.v1.DatapathProvider\x12X\n\"desired_private_ipv6_google_access\x18\x33 \x01(\x0e\x32,.google.container.v1.PrivateIPv6GoogleAccess\x12L\n\x1b\x64\x65sired_notification_config\x18\x37 \x01(\x0b\x32\'.google.container.v1.NotificationConfig\x12[\n#desired_authenticator_groups_config\x18? \x01(\x0b\x32..google.container.v1.AuthenticatorGroupsConfig\x12\x42\n\x16\x64\x65sired_logging_config\x18@ \x01(\x0b\x32\".google.container.v1.LoggingConfig\x12H\n\x19\x64\x65sired_monitoring_config\x18\x41 \x01(\x0b\x32%.google.container.v1.MonitoringConfig\x12S\n\x1f\x64\x65sired_identity_service_config\x18\x42 \x01(\x0b\x32*.google.container.v1.IdentityServiceConfig\x12Z\n#desired_service_external_ips_config\x18< \x01(\x0b\x32-.google.container.v1.ServiceExternalIPsConfig\x12\x30\n\x1f\x64\x65sired_enable_private_endpoint\x18G \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x31\n$desired_default_enable_private_nodes\x18H \x01(\x08H\x01\x88\x01\x01\x12`\n&desired_control_plane_endpoints_config\x18I \x01(\x0b\x32\x30.google.container.v1.ControlPlaneEndpointsConfig\x12\x1e\n\x16\x64\x65sired_master_version\x18\x64 \x01(\t\x12<\n\x13\x64\x65sired_gcfs_config\x18m \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12T\n*desired_node_pool_auto_config_network_tags\x18n \x01(\x0b\x32 .google.container.v1.NetworkTags\x12\x44\n\x17\x64\x65sired_pod_autoscaling\x18q \x01(\x0b\x32#.google.container.v1.PodAutoscaling\x12I\n\x1a\x64\x65sired_gateway_api_config\x18r \x01(\x0b\x32%.google.container.v1.GatewayAPIConfig\x12\x0c\n\x04\x65tag\x18s \x01(\t\x12T\n desired_node_pool_logging_config\x18t \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12\x31\n\rdesired_fleet\x18u \x01(\x0b\x32\x1a.google.container.v1.Fleet\x12:\n\x12\x64\x65sired_stack_type\x18w \x01(\x0e\x32\x1e.google.container.v1.StackType\x12T\n\x1c\x61\x64\x64itional_pod_ranges_config\x18x \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfig\x12\\\n$removed_additional_pod_ranges_config\x18y \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfig\x12\x43\n\x14\x65nable_k8s_beta_apis\x18z \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12S\n\x1f\x64\x65sired_security_posture_config\x18| \x01(\x0b\x32*.google.container.v1.SecurityPostureConfig\x12n\n\"desired_network_performance_config\x18} \x01(\x0b\x32\x42.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig\x12/\n\"desired_enable_fqdn_network_policy\x18~ \x01(\x08H\x02\x88\x01\x01\x12\\\n(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\x0b\x32).google.container.v1.WorkloadPolicyConfig\x12\x45\n\x15\x64\x65sired_k8s_beta_apis\x18\x83\x01 \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12I\n\x19\x64\x65sired_containerd_config\x18\x86\x01 \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12-\n\x1f\x64\x65sired_enable_multi_networking\x18\x87\x01 \x01(\x08H\x03\x88\x01\x01\x12\x66\n3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12\x62\n$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e\x32..google.container.v1.InTransitEncryptionConfigH\x04\x88\x01\x01\x12>\n0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\x08H\x05\x88\x01\x01\x12U\n\x1d\x64\x65sired_secret_manager_config\x18\x8b\x01 \x01(\x0b\x32(.google.container.v1.SecretManagerConfigH\x06\x88\x01\x01\x12]\n!desired_compliance_posture_config\x18\x8c\x01 \x01(\x0b\x32,.google.container.v1.CompliancePostureConfigH\x07\x88\x01\x01\x12L\n\x1b\x64\x65sired_node_kubelet_config\x18\x8d\x01 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12]\n,desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12M\n\x18user_managed_keys_config\x18\x8f\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfig\x12Q\n\x1b\x64\x65sired_rbac_binding_config\x18\x90\x01 \x01(\x0b\x32&.google.container.v1.RBACBindingConfigH\x08\x88\x01\x01\x12P\n\x19\x64\x65sired_enterprise_config\x18\x93\x01 \x01(\x0b\x32,.google.container.v1.DesiredEnterpriseConfig\x12;\n-desired_disable_l4_lb_firewall_reconciliation\x18\x95\x01 \x01(\x08H\t\x88\x01\x01\x12^\n/desired_node_pool_auto_config_linux_node_config\x18\x96\x01 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12\x64\n\'desired_anonymous_authentication_config\x18\x9c\x01 \x01(\x0b\x32\x32.google.container.v1.AnonymousAuthenticationConfigB\"\n _desired_enable_private_endpointB\'\n%_desired_default_enable_private_nodesB%\n#_desired_enable_fqdn_network_policyB\"\n _desired_enable_multi_networkingB\'\n%_desired_in_transit_encryption_configB3\n1_desired_enable_cilium_clusterwide_network_policyB \n\x1e_desired_secret_manager_configB$\n\"_desired_compliance_posture_configB\x1e\n\x1c_desired_rbac_binding_configB0\n._desired_disable_l4_lb_firewall_reconciliation\"q\n\x19\x41\x64\x64itionalPodRangesConfig\x12\x17\n\x0fpod_range_names\x18\x01 \x03(\t\x12;\n\x0epod_range_info\x18\x02 \x03(\x0b\x32\x1e.google.container.v1.RangeInfoB\x03\xe0\x41\x03\">\n\tRangeInfo\x12\x17\n\nrange_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0butilization\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"b\n\x17\x44\x65siredEnterpriseConfig\x12G\n\x0c\x64\x65sired_tier\x18\x01 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTier\"\xe4\x08\n\tOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12@\n\x0eoperation_type\x18\x03 \x01(\x0e\x32#.google.container.v1.Operation.TypeB\x03\xe0\x41\x03\x12:\n\x06status\x18\x04 \x01(\x0e\x32%.google.container.v1.Operation.StatusB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x16\n\tself_link\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0btarget_link\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nstart_time\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_time\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12=\n\x08progress\x18\x0c \x01(\x0b\x32&.google.container.v1.OperationProgressB\x03\xe0\x41\x03\x12\x44\n\x12\x63luster_conditions\x18\r \x03(\x0b\x32$.google.container.v1.StatusConditionB\x02\x18\x01\x12\x45\n\x13nodepool_conditions\x18\x0e \x03(\x0b\x32$.google.container.v1.StatusConditionB\x02\x18\x01\x12!\n\x05\x65rror\x18\x0f \x01(\x0b\x32\x12.google.rpc.Status\"R\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x41\x42ORTING\x10\x04\"\xc0\x03\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43REATE_CLUSTER\x10\x01\x12\x12\n\x0e\x44\x45LETE_CLUSTER\x10\x02\x12\x12\n\x0eUPGRADE_MASTER\x10\x03\x12\x11\n\rUPGRADE_NODES\x10\x04\x12\x12\n\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n\x10\x43REATE_NODE_POOL\x10\x07\x12\x14\n\x10\x44\x45LETE_NODE_POOL\x10\x08\x12\x1c\n\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n\x11\x41UTO_REPAIR_NODES\x10\n\x12\x1a\n\x12\x41UTO_UPGRADE_NODES\x10\x0b\x1a\x02\x08\x01\x12\x12\n\nSET_LABELS\x10\x0c\x1a\x02\x08\x01\x12\x17\n\x0fSET_MASTER_AUTH\x10\r\x1a\x02\x08\x01\x12\x16\n\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\x08\x01\x12\x1e\n\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\x08\x01\x12\x12\n\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n\x15\x46LEET_FEATURE_UPGRADE\x10\x13\"\xbb\x02\n\x11OperationProgress\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x06status\x18\x02 \x01(\x0e\x32%.google.container.v1.Operation.Status\x12>\n\x07metrics\x18\x03 \x03(\x0b\x32-.google.container.v1.OperationProgress.Metric\x12\x36\n\x06stages\x18\x04 \x03(\x0b\x32&.google.container.v1.OperationProgress\x1ai\n\x06Metric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\tint_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\x42\x07\n\x05value\"\x84\x01\n\x14\x43reateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x32\n\x07\x63luster\x18\x03 \x01(\x0b\x32\x1c.google.container.v1.ClusterB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"c\n\x11GetClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x9f\x01\n\x14UpdateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x37\n\x06update\x18\x04 \x01(\x0b\x32\".google.container.v1.ClusterUpdateB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xc7\x0c\n\x15UpdateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x19\n\x0cnode_version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nimage_type\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x11\n\tlocations\x18\r \x03(\t\x12M\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32+.google.container.v1.WorkloadMetadataConfig\x12G\n\x10upgrade_settings\x18\x0f \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12.\n\x04tags\x18\x10 \x01(\x0b\x32 .google.container.v1.NetworkTags\x12/\n\x06taints\x18\x11 \x01(\x0b\x32\x1f.google.container.v1.NodeTaints\x12/\n\x06labels\x18\x12 \x01(\x0b\x32\x1f.google.container.v1.NodeLabels\x12?\n\x11linux_node_config\x18\x13 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12>\n\x0ekubelet_config\x18\x14 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x43\n\x13node_network_config\x18\x15 \x01(\x0b\x32&.google.container.v1.NodeNetworkConfig\x12\x34\n\x0bgcfs_config\x18\x16 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12\x42\n\x12\x63onfidential_nodes\x18\x17 \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12.\n\x05gvnic\x18\x1d \x01(\x0b\x32\x1f.google.container.v1.VirtualNIC\x12\x0c\n\x04\x65tag\x18\x1e \x01(\t\x12\x34\n\x0b\x66\x61st_socket\x18\x1f \x01(\x0b\x32\x1f.google.container.v1.FastSocket\x12\x42\n\x0elogging_config\x18 \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12<\n\x0fresource_labels\x18! \x01(\x0b\x32#.google.container.v1.ResourceLabels\x12\x43\n\x13windows_node_config\x18\" \x01(\x0b\x32&.google.container.v1.WindowsNodeConfig\x12<\n\x0c\x61\x63\x63\x65lerators\x18# \x03(\x0b\x32&.google.container.v1.AcceleratorConfig\x12\x19\n\x0cmachine_type\x18$ \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18% \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isk_size_gb\x18& \x01(\x03\x42\x03\xe0\x41\x01\x12G\n\x15resource_manager_tags\x18\' \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12@\n\x11\x63ontainerd_config\x18( \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12M\n\x13queued_provisioning\x18* \x01(\x0b\x32\x30.google.container.v1.NodePool.QueuedProvisioning\x12\x15\n\rstorage_pools\x18+ \x03(\t\x12\x33\n\x10max_run_duration\x18- \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\nflex_start\x18. \x01(\x08H\x00\x88\x01\x01\x42\r\n\x0b_flex_start\"\xcd\x01\n\x1dSetNodePoolAutoscalingRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x42\n\x0b\x61utoscaling\x18\x05 \x01(\x0b\x32(.google.container.v1.NodePoolAutoscalingB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x88\x01\n\x18SetLoggingServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1c\n\x0flogging_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x8e\x01\n\x1bSetMonitoringServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xa7\x01\n\x16SetAddonsConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12=\n\raddons_config\x18\x04 \x01(\x0b\x32!.google.container.v1.AddonsConfigB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"}\n\x13SetLocationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\tlocations\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x82\x01\n\x13UpdateMasterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1b\n\x0emaster_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xb5\x02\n\x14SetMasterAuthRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x45\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x30.google.container.v1.SetMasterAuthRequest.ActionB\x03\xe0\x41\x02\x12\x34\n\x06update\x18\x05 \x01(\x0b\x32\x1f.google.container.v1.MasterAuthB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"P\n\x06\x41\x63tion\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cSET_PASSWORD\x10\x01\x12\x15\n\x11GENERATE_PASSWORD\x10\x02\x12\x10\n\x0cSET_USERNAME\x10\x03\"f\n\x14\x44\x65leteClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"O\n\x13ListClustersRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"]\n\x14ListClustersResponse\x12.\n\x08\x63lusters\x18\x01 \x03(\x0b\x32\x1c.google.container.v1.Cluster\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"g\n\x13GetOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"Q\n\x15ListOperationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"j\n\x16\x43\x61ncelOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"c\n\x16ListOperationsResponse\x12\x32\n\noperations\x18\x01 \x03(\x0b\x32\x1e.google.container.v1.Operation\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"P\n\x16GetServerConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"\x94\x03\n\x0cServerConfig\x12\x1f\n\x17\x64\x65\x66\x61ult_cluster_version\x18\x01 \x01(\t\x12\x1b\n\x13valid_node_versions\x18\x03 \x03(\t\x12\x1a\n\x12\x64\x65\x66\x61ult_image_type\x18\x04 \x01(\t\x12\x19\n\x11valid_image_types\x18\x05 \x03(\t\x12\x1d\n\x15valid_master_versions\x18\x06 \x03(\t\x12H\n\x08\x63hannels\x18\t \x03(\x0b\x32\x36.google.container.v1.ServerConfig.ReleaseChannelConfig\x1a\xa5\x01\n\x14ReleaseChannelConfig\x12<\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.google.container.v1.ReleaseChannel.Channel\x12\x17\n\x0f\x64\x65\x66\x61ult_version\x18\x02 \x01(\t\x12\x16\n\x0evalid_versions\x18\x04 \x03(\t\x12\x1e\n\x16upgrade_target_version\x18\x05 \x01(\t\"\xa0\x01\n\x15\x43reateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x35\n\tnode_pool\x18\x04 \x01(\x0b\x32\x1d.google.container.v1.NodePoolB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x06 \x01(\t\"\x81\x01\n\x15\x44\x65leteNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"h\n\x14ListNodePoolsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x05 \x01(\t\"~\n\x12GetNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x9f\x03\n\x11\x42lueGreenSettings\x12_\n\x17standard_rollout_policy\x18\x01 \x01(\x0b\x32<.google.container.v1.BlueGreenSettings.StandardRolloutPolicyH\x00\x12?\n\x17node_pool_soak_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x1a\xb9\x01\n\x15StandardRolloutPolicy\x12\x1a\n\x10\x62\x61tch_percentage\x18\x01 \x01(\x02H\x00\x12\x1a\n\x10\x62\x61tch_node_count\x18\x02 \x01(\x05H\x00\x12;\n\x13\x62\x61tch_soak_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\x13\n\x11update_batch_sizeB\x16\n\x14_batch_soak_durationB\x10\n\x0erollout_policyB\x1a\n\x18_node_pool_soak_duration\"\xd1\x10\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x1f.google.container.v1.NodeConfig\x12\x1a\n\x12initial_node_count\x18\x03 \x01(\x05\x12\x11\n\tlocations\x18\r \x03(\t\x12>\n\x0enetwork_config\x18\x0e \x01(\x0b\x32&.google.container.v1.NodeNetworkConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x65 \x01(\t\x12 \n\x13instance_group_urls\x18\x66 \x03(\tB\x03\xe0\x41\x03\x12\x39\n\x06status\x18g \x01(\x0e\x32$.google.container.v1.NodePool.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18h \x01(\tB\x05\x18\x01\xe0\x41\x03\x12=\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32(.google.container.v1.NodePoolAutoscaling\x12\x37\n\nmanagement\x18\x05 \x01(\x0b\x32#.google.container.v1.NodeManagement\x12\x43\n\x13max_pods_constraint\x18\x06 \x01(\x0b\x32&.google.container.v1.MaxPodsConstraint\x12\x38\n\nconditions\x18i \x03(\x0b\x32$.google.container.v1.StatusCondition\x12\x1f\n\x12pod_ipv4_cidr_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12G\n\x10upgrade_settings\x18k \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12G\n\x10placement_policy\x18l \x01(\x0b\x32-.google.container.v1.NodePool.PlacementPolicy\x12\x42\n\x0bupdate_info\x18m \x01(\x0b\x32(.google.container.v1.NodePool.UpdateInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18n \x01(\t\x12M\n\x13queued_provisioning\x18p \x01(\x0b\x32\x30.google.container.v1.NodePool.QueuedProvisioning\x12M\n\x18\x62\x65st_effort_provisioning\x18q \x01(\x0b\x32+.google.container.v1.BestEffortProvisioning\x1a\xf0\x01\n\x0fUpgradeSettings\x12\x11\n\tmax_surge\x18\x01 \x01(\x05\x12\x17\n\x0fmax_unavailable\x18\x02 \x01(\x05\x12\x42\n\x08strategy\x18\x03 \x01(\x0e\x32+.google.container.v1.NodePoolUpdateStrategyH\x00\x88\x01\x01\x12H\n\x13\x62lue_green_settings\x18\x04 \x01(\x0b\x32&.google.container.v1.BlueGreenSettingsH\x01\x88\x01\x01\x42\x0b\n\t_strategyB\x16\n\x14_blue_green_settings\x1a\x88\x04\n\nUpdateInfo\x12O\n\x0f\x62lue_green_info\x18\x01 \x01(\x0b\x32\x36.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo\x1a\xa8\x03\n\rBlueGreenInfo\x12K\n\x05phase\x18\x01 \x01(\x0e\x32<.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase\x12 \n\x18\x62lue_instance_group_urls\x18\x02 \x03(\t\x12!\n\x19green_instance_group_urls\x18\x03 \x03(\t\x12%\n\x1d\x62lue_pool_deletion_start_time\x18\x04 \x01(\t\x12\x1a\n\x12green_pool_version\x18\x05 \x01(\t\"\xc1\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUPDATE_STARTED\x10\x01\x12\x17\n\x13\x43REATING_GREEN_POOL\x10\x02\x12\x17\n\x13\x43ORDONING_BLUE_POOL\x10\x03\x12\x16\n\x12\x44RAINING_BLUE_POOL\x10\x04\x12\x15\n\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n\x12\x44\x45LETING_BLUE_POOL\x10\x06\x12\x14\n\x10ROLLBACK_STARTED\x10\x07\x1a\xae\x01\n\x0fPlacementPolicy\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.container.v1.NodePool.PlacementPolicy.Type\x12\x19\n\x0ctpu_topology\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x0bpolicy_name\x18\x03 \x01(\t\")\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMPACT\x10\x01\x1a%\n\x12QueuedProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x16\n\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n\x0bRECONCILING\x10\x04\x12\x0c\n\x08STOPPING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\"}\n\x0eNodeManagement\x12\x14\n\x0c\x61uto_upgrade\x18\x01 \x01(\x08\x12\x13\n\x0b\x61uto_repair\x18\x02 \x01(\x08\x12@\n\x0fupgrade_options\x18\n \x01(\x0b\x32\'.google.container.v1.AutoUpgradeOptions\"F\n\x16\x42\x65stEffortProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x13min_provision_nodes\x18\x02 \x01(\x05\"T\n\x12\x41utoUpgradeOptions\x12$\n\x17\x61uto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"e\n\x11MaintenancePolicy\x12\x36\n\x06window\x18\x01 \x01(\x0b\x32&.google.container.v1.MaintenanceWindow\x12\x18\n\x10resource_version\x18\x03 \x01(\t\"\xf6\x02\n\x11MaintenanceWindow\x12O\n\x18\x64\x61ily_maintenance_window\x18\x02 \x01(\x0b\x32+.google.container.v1.DailyMaintenanceWindowH\x00\x12\x44\n\x10recurring_window\x18\x03 \x01(\x0b\x32(.google.container.v1.RecurringTimeWindowH\x00\x12\x61\n\x16maintenance_exclusions\x18\x04 \x03(\x0b\x32\x41.google.container.v1.MaintenanceWindow.MaintenanceExclusionsEntry\x1a]\n\x1aMaintenanceExclusionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.google.container.v1.TimeWindow:\x02\x38\x01\x42\x08\n\x06policy\"\xd0\x01\n\nTimeWindow\x12Y\n\x1dmaintenance_exclusion_options\x18\x03 \x01(\x0b\x32\x30.google.container.v1.MaintenanceExclusionOptionsH\x00\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07options\"\xb4\x01\n\x1bMaintenanceExclusionOptions\x12\x45\n\x05scope\x18\x01 \x01(\x0e\x32\x36.google.container.v1.MaintenanceExclusionOptions.Scope\"N\n\x05Scope\x12\x0f\n\x0bNO_UPGRADES\x10\x00\x12\x15\n\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"Z\n\x13RecurringTimeWindow\x12/\n\x06window\x18\x01 \x01(\x0b\x32\x1f.google.container.v1.TimeWindow\x12\x12\n\nrecurrence\x18\x02 \x01(\t\"C\n\x16\x44\x61ilyMaintenanceWindow\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x15\n\x08\x64uration\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x1cSetNodePoolManagementRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\nmanagement\x18\x05 \x01(\x0b\x32#.google.container.v1.NodeManagementB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\x9b\x01\n\x16SetNodePoolSizeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x17\n\nnode_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\".\n\x1e\x43ompleteNodePoolUpgradeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9f\x01\n\x1eRollbackNodePoolUpgradeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0brespect_pdb\x18\x07 \x01(\x08\"J\n\x15ListNodePoolsResponse\x12\x31\n\nnode_pools\x18\x01 \x03(\x0b\x32\x1d.google.container.v1.NodePool\"\xaf\x03\n\x12\x43lusterAutoscaling\x12$\n\x1c\x65nable_node_autoprovisioning\x18\x01 \x01(\x08\x12;\n\x0fresource_limits\x18\x02 \x03(\x0b\x32\".google.container.v1.ResourceLimit\x12W\n\x13\x61utoscaling_profile\x18\x03 \x01(\x0e\x32:.google.container.v1.ClusterAutoscaling.AutoscalingProfile\x12\x62\n#autoprovisioning_node_pool_defaults\x18\x04 \x01(\x0b\x32\x35.google.container.v1.AutoprovisioningNodePoolDefaults\x12\"\n\x1a\x61utoprovisioning_locations\x18\x05 \x03(\t\"U\n\x12\x41utoscalingProfile\x12\x17\n\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n\x14OPTIMIZE_UTILIZATION\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\"\xf8\x03\n AutoprovisioningNodePoolDefaults\x12\x14\n\x0coauth_scopes\x18\x01 \x03(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12G\n\x10upgrade_settings\x18\x03 \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12\x37\n\nmanagement\x18\x04 \x01(\x0b\x32#.google.container.v1.NodeManagement\x12\x1c\n\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x05\x12\x11\n\tdisk_type\x18\x07 \x01(\t\x12M\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32+.google.container.v1.ShieldedInstanceConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\t \x01(\t\x12\x12\n\nimage_type\x18\n \x01(\t\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\r \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"H\n\rResourceLimit\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x0f\n\x07minimum\x18\x02 \x01(\x03\x12\x0f\n\x07maximum\x18\x03 \x01(\x03\"\xc7\x02\n\x13NodePoolAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\x12\x17\n\x0f\x61utoprovisioned\x18\x04 \x01(\x08\x12P\n\x0flocation_policy\x18\x05 \x01(\x0e\x32\x37.google.container.v1.NodePoolAutoscaling.LocationPolicy\x12\x1c\n\x14total_min_node_count\x18\x06 \x01(\x05\x12\x1c\n\x14total_max_node_count\x18\x07 \x01(\x05\"H\n\x0eLocationPolicy\x12\x1f\n\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"\x92\x02\n\x10SetLabelsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12W\n\x0fresource_labels\x18\x04 \x03(\x0b\x32\x39.google.container.v1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0\x41\x02\x12\x1e\n\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x14SetLegacyAbacRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x84\x01\n\x16StartIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x1a\n\x12rotate_credentials\x18\x07 \x01(\x08\"k\n\x19\x43ompleteIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xc5\x02\n\x11\x41\x63\x63\x65leratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x12\x46\n\x12gpu_sharing_config\x18\x05 \x01(\x0b\x32%.google.container.v1.GPUSharingConfigH\x00\x88\x01\x01\x12]\n\x1egpu_driver_installation_config\x18\x06 \x01(\x0b\x32\x30.google.container.v1.GPUDriverInstallationConfigH\x01\x88\x01\x01\x42\x15\n\x13_gpu_sharing_configB!\n\x1f_gpu_driver_installation_config\"\x83\x02\n\x10GPUSharingConfig\x12\"\n\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03\x12[\n\x14gpu_sharing_strategy\x18\x02 \x01(\x0e\x32\x38.google.container.v1.GPUSharingConfig.GPUSharingStrategyH\x00\x88\x01\x01\"U\n\x12GPUSharingStrategy\x12$\n GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n\x0cTIME_SHARING\x10\x01\x12\x07\n\x03MPS\x10\x02\x42\x17\n\x15_gpu_sharing_strategy\"\x84\x02\n\x1bGPUDriverInstallationConfig\x12\x62\n\x12gpu_driver_version\x18\x01 \x01(\x0e\x32\x41.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersionH\x00\x88\x01\x01\"j\n\x10GPUDriverVersion\x12\"\n\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n\x15INSTALLATION_DISABLED\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\n\n\x06LATEST\x10\x03\x42\x15\n\x13_gpu_driver_version\"\x9a\x01\n\x16WorkloadMetadataConfig\x12>\n\x04mode\x18\x02 \x01(\x0e\x32\x30.google.container.v1.WorkloadMetadataConfig.Mode\"@\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCE_METADATA\x10\x01\x12\x10\n\x0cGKE_METADATA\x10\x02\"\xaa\x01\n\x17SetNetworkPolicyRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12?\n\x0enetwork_policy\x18\x04 \x01(\x0b\x32\".google.container.v1.NetworkPolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xb9\x01\n\x1bSetMaintenancePolicyRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x12maintenance_policy\x18\x04 \x01(\x0b\x32&.google.container.v1.MaintenancePolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xd7\x02\n\x0fStatusCondition\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32).google.container.v1.StatusCondition.CodeB\x02\x18\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12(\n\x0e\x63\x61nonical_code\x18\x03 \x01(\x0e\x32\x10.google.rpc.Code\"\xcb\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cGCE_STOCKOUT\x10\x01\x12\x1f\n\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n\x13\x43LOUD_KMS_KEY_ERROR\x10\x07\x12\x0f\n\x0b\x43\x41_EXPIRING\x10\t\x12,\n(NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS\x10\n\"\xe5\n\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x1c\x65nable_intra_node_visibility\x18\x05 \x01(\x08\x12\x43\n\x13\x64\x65\x66\x61ult_snat_status\x18\x07 \x01(\x0b\x32&.google.container.v1.DefaultSnatStatus\x12\x1f\n\x17\x65nable_l4ilb_subsetting\x18\n \x01(\x08\x12@\n\x11\x64\x61tapath_provider\x18\x0b \x01(\x0e\x32%.google.container.v1.DatapathProvider\x12P\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32,.google.container.v1.PrivateIPv6GoogleAccess\x12\x32\n\ndns_config\x18\r \x01(\x0b\x32\x1e.google.container.v1.DNSConfig\x12R\n\x1bservice_external_ips_config\x18\x0f \x01(\x0b\x32-.google.container.v1.ServiceExternalIPsConfig\x12\x41\n\x12gateway_api_config\x18\x10 \x01(\x0b\x32%.google.container.v1.GatewayAPIConfig\x12\x1f\n\x17\x65nable_multi_networking\x18\x11 \x01(\x08\x12\x66\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x42.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig\x12\'\n\x1a\x65nable_fqdn_network_policy\x18\x13 \x01(\x08H\x00\x88\x01\x01\x12Y\n\x1cin_transit_encryption_config\x18\x14 \x01(\x0e\x32..google.container.v1.InTransitEncryptionConfigH\x01\x88\x01\x01\x12\x35\n(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\x08H\x02\x88\x01\x01\x12)\n\x1c\x64\x65\x66\x61ult_enable_private_nodes\x18\x16 \x01(\x08H\x03\x88\x01\x01\x12\x32\n%disable_l4_lb_firewall_reconciliation\x18\x18 \x01(\x08H\x04\x88\x01\x01\x1a\xde\x01\n\x1f\x43lusterNetworkPerformanceConfig\x12q\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32G.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x1d\n\x1b_enable_fqdn_network_policyB\x1f\n\x1d_in_transit_encryption_configB+\n)_enable_cilium_clusterwide_network_policyB\x1f\n\x1d_default_enable_private_nodesB(\n&_disable_l4_lb_firewall_reconciliation\"\xc0\x01\n\x10GatewayAPIConfig\x12>\n\x07\x63hannel\x18\x01 \x01(\x0e\x32-.google.container.v1.GatewayAPIConfig.Channel\"l\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HANNEL_DISABLED\x10\x01\x12\x1c\n\x14\x43HANNEL_EXPERIMENTAL\x10\x03\x1a\x02\x08\x01\x12\x14\n\x10\x43HANNEL_STANDARD\x10\x04\"+\n\x18ServiceExternalIPsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x16GetOpenIDConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"\xdf\x02\n\x17GetOpenIDConfigResponse\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x1a\n\x08jwks_uri\x18\x02 \x01(\tR\x08jwks_uri\x12:\n\x18response_types_supported\x18\x03 \x03(\tR\x18response_types_supported\x12\x38\n\x17subject_types_supported\x18\x04 \x03(\tR\x17subject_types_supported\x12T\n%id_token_signing_alg_values_supported\x18\x05 \x03(\tR%id_token_signing_alg_values_supported\x12*\n\x10\x63laims_supported\x18\x06 \x03(\tR\x10\x63laims_supported\x12 \n\x0bgrant_types\x18\x07 \x03(\tR\x0bgrant_types\"\'\n\x15GetJSONWebKeysRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"r\n\x03Jwk\x12\x0b\n\x03kty\x18\x01 \x01(\t\x12\x0b\n\x03\x61lg\x18\x02 \x01(\t\x12\x0b\n\x03use\x18\x03 \x01(\t\x12\x0b\n\x03kid\x18\x04 \x01(\t\x12\t\n\x01n\x18\x05 \x01(\t\x12\t\n\x01\x65\x18\x06 \x01(\t\x12\t\n\x01x\x18\x07 \x01(\t\x12\t\n\x01y\x18\x08 \x01(\t\x12\x0b\n\x03\x63rv\x18\t \x01(\t\"@\n\x16GetJSONWebKeysResponse\x12&\n\x04keys\x18\x01 \x03(\x0b\x32\x18.google.container.v1.Jwk\"2\n\"CheckAutopilotCompatibilityRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xfc\x02\n\x1b\x41utopilotCompatibilityIssue\x12\x34\n\x10last_observation\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onstraint_type\x18\x02 \x01(\t\x12X\n\x14incompatibility_type\x18\x03 \x01(\x0e\x32:.google.container.v1.AutopilotCompatibilityIssue.IssueType\x12\x10\n\x08subjects\x18\x04 \x03(\t\x12\x19\n\x11\x64ocumentation_url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"r\n\tIssueType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n\x1a\x41\x44\x44ITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"x\n#CheckAutopilotCompatibilityResponse\x12@\n\x06issues\x18\x01 \x03(\x0b\x32\x30.google.container.v1.AutopilotCompatibilityIssue\x12\x0f\n\x07summary\x18\x02 \x01(\t\"\x9c\x01\n\x0eReleaseChannel\x12<\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.google.container.v1.ReleaseChannel.Channel\"L\n\x07\x43hannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05RAPID\x10\x01\x12\x0b\n\x07REGULAR\x10\x02\x12\n\n\x06STABLE\x10\x03\x12\x0c\n\x08\x45XTENDED\x10\x04\"\'\n\x14\x43ostManagementConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\",\n\x19IntraNodeVisibilityConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"&\n\x13ILBSubsettingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xf7\x02\n\tDNSConfig\x12<\n\x0b\x63luster_dns\x18\x01 \x01(\x0e\x32\'.google.container.v1.DNSConfig.Provider\x12\x42\n\x11\x63luster_dns_scope\x18\x02 \x01(\x0e\x32\'.google.container.v1.DNSConfig.DNSScope\x12\x1a\n\x12\x63luster_dns_domain\x18\x03 \x01(\t\x12*\n\x1d\x61\x64\x64itive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n\x10PLATFORM_DEFAULT\x10\x01\x12\r\n\tCLOUD_DNS\x10\x02\x12\x0c\n\x08KUBE_DNS\x10\x03\"G\n\x08\x44NSScope\x12\x19\n\x15\x44NS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rCLUSTER_SCOPE\x10\x01\x12\r\n\tVPC_SCOPE\x10\x02\".\n\x11MaxPodsConstraint\x12\x19\n\x11max_pods_per_node\x18\x01 \x01(\x03\"/\n\x16WorkloadIdentityConfig\x12\x15\n\rworkload_pool\x18\x02 \x01(\t\"(\n\x15IdentityServiceConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"K\n\x10MeshCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"\xe3\x05\n\x12\x44\x61tabaseEncryption\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.container.v1.DatabaseEncryption.State\x12U\n\rcurrent_state\x18\x03 \x01(\x0e\x32\x34.google.container.v1.DatabaseEncryption.CurrentStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x63ryption_keys\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12Z\n\x15last_operation_errors\x18\x05 \x03(\x0b\x32\x36.google.container.v1.DatabaseEncryption.OperationErrorB\x03\xe0\x41\x03\x1ah\n\x0eOperationError\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"2\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tENCRYPTED\x10\x01\x12\r\n\tDECRYPTED\x10\x02\"\xfb\x01\n\x0c\x43urrentState\x12\x1d\n\x19\x43URRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43URRENT_STATE_ENCRYPTED\x10\x07\x12\x1b\n\x17\x43URRENT_STATE_DECRYPTED\x10\x02\x12$\n CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n\x1e\x43URRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n\x1e\x43URRENT_STATE_DECRYPTION_ERROR\x10\x06\x42\x10\n\x0e_current_state\"e\n\x1cListUsableSubnetworksRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"t\n\x1dListUsableSubnetworksResponse\x12:\n\x0bsubnetworks\x18\x01 \x03(\x0b\x32%.google.container.v1.UsableSubnetwork\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x80\x02\n\x1eUsableSubnetworkSecondaryRange\x12\x12\n\nrange_name\x18\x01 \x01(\t\x12\x15\n\rip_cidr_range\x18\x02 \x01(\t\x12J\n\x06status\x18\x03 \x01(\x0e\x32:.google.container.v1.UsableSubnetworkSecondaryRange.Status\"g\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x12\n\x0eIN_USE_SERVICE\x10\x02\x12\x18\n\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n\x12IN_USE_MANAGED_POD\x10\x04\"\xb8\x01\n\x10UsableSubnetwork\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12P\n\x13secondary_ip_ranges\x18\x04 \x03(\x0b\x32\x33.google.container.v1.UsableSubnetworkSecondaryRange\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\"\xed\x02\n\x19ResourceUsageExportConfig\x12`\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32\x42.google.container.v1.ResourceUsageExportConfig.BigQueryDestination\x12&\n\x1e\x65nable_network_egress_metering\x18\x02 \x01(\x08\x12m\n\x1b\x63onsumption_metering_config\x18\x03 \x01(\x0b\x32H.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig\x1a)\n\x13\x42igQueryDestination\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a,\n\x19\x43onsumptionMeteringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16VerticalPodAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x11\x44\x65\x66\x61ultSnatStatus\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\" \n\rShieldedNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nVirtualNIC\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nFastSocket\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xc1\x03\n\x12NotificationConfig\x12>\n\x06pubsub\x18\x01 \x01(\x0b\x32..google.container.v1.NotificationConfig.PubSub\x1a\x8a\x01\n\x06PubSub\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12>\n\x06\x66ilter\x18\x03 \x01(\x0b\x32..google.container.v1.NotificationConfig.Filter\x1aO\n\x06\x46ilter\x12\x45\n\nevent_type\x18\x01 \x03(\x0e\x32\x31.google.container.v1.NotificationConfig.EventType\"\x8c\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n\rUPGRADE_EVENT\x10\x02\x12\x1b\n\x17SECURITY_BULLETIN_EVENT\x10\x03\x12\x16\n\x12UPGRADE_INFO_EVENT\x10\x04\"\xf0\x01\n\x11\x43onfidentialNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x63\n\x1a\x63onfidential_instance_type\x18\x02 \x01(\x0e\x32?.google.container.v1.ConfidentialNodes.ConfidentialInstanceType\"e\n\x18\x43onfidentialInstanceType\x12*\n&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SEV\x10\x01\x12\x0b\n\x07SEV_SNP\x10\x02\x12\x07\n\x03TDX\x10\x03\"\xdf\x01\n\x0cUpgradeEvent\x12?\n\rresource_type\x18\x01 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x38\n\x14operation_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x10\n\x08resource\x18\x06 \x01(\t\"\xb2\x06\n\x10UpgradeInfoEvent\x12?\n\rresource_type\x18\x01 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x05 \x01(\t\x12\x16\n\x0etarget_version\x18\x06 \x01(\t\x12\x10\n\x08resource\x18\x07 \x01(\t\x12?\n\x05state\x18\x08 \x01(\x0e\x32+.google.container.v1.UpgradeInfoEvent.StateB\x03\xe0\x41\x03\x12\x42\n\x19standard_support_end_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x42\n\x19\x65xtended_support_end_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\x12\x43\n\nevent_type\x18\x0c \x01(\x0e\x32/.google.container.v1.UpgradeInfoEvent.EventType\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06\"t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45ND_OF_SUPPORT\x10\x01\x12 \n\x1c\x43OS_MILESTONE_VERSION_UPDATE\x10\x02\x12\x15\n\x11UPGRADE_LIFECYCLE\x10\x03\x42\x1c\n\x1a_standard_support_end_timeB\x1c\n\x1a_extended_support_end_time\"\xb9\x01\n\x15UpgradeAvailableEvent\x12\x0f\n\x07version\x18\x01 \x01(\t\x12?\n\rresource_type\x18\x02 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12<\n\x0frelease_channel\x18\x03 \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12\x10\n\x08resource\x18\x04 \x01(\t\"\xba\x02\n\x15SecurityBulletinEvent\x12\x1e\n\x16resource_type_affected\x18\x01 \x01(\t\x12\x13\n\x0b\x62ulletin_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ve_ids\x18\x03 \x03(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x14\n\x0c\x62ulletin_uri\x18\x05 \x01(\t\x12\x19\n\x11\x62rief_description\x18\x06 \x01(\t\x12!\n\x19\x61\x66\x66\x65\x63ted_supported_minors\x18\x07 \x03(\t\x12\x18\n\x10patched_versions\x18\x08 \x03(\t\x12 \n\x18suggested_upgrade_target\x18\t \x01(\t\x12\x1d\n\x15manual_steps_required\x18\n \x01(\x08\x12\x1a\n\x12mitigated_versions\x18\x0b \x03(\t\"g\n\tAutopilot\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12I\n\x16workload_policy_config\x18\x02 \x01(\x0b\x32).google.container.v1.WorkloadPolicyConfig\"\xac\x01\n\x14WorkloadPolicyConfig\x12\x1c\n\x0f\x61llow_net_admin\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x35\n(autopilot_compatibility_auditing_enabled\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_allow_net_adminB+\n)_autopilot_compatibility_auditing_enabled\"V\n\rLoggingConfig\x12\x45\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32+.google.container.v1.LoggingComponentConfig\"\x9e\x02\n\x16LoggingComponentConfig\x12P\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32\x35.google.container.v1.LoggingComponentConfig.Component\"\xb1\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tWORKLOADS\x10\x02\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0c\n\x08KCP_SSHD\x10\x07\x12\x12\n\x0eKCP_CONNECTION\x10\x08\x12\x0b\n\x07KCP_HPA\x10\t\"*\n\x17RayClusterLoggingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x97\x02\n\x10MonitoringConfig\x12H\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32..google.container.v1.MonitoringComponentConfig\x12O\n\x19managed_prometheus_config\x18\x02 \x01(\x0b\x32,.google.container.v1.ManagedPrometheusConfig\x12h\n&advanced_datapath_observability_config\x18\x03 \x01(\x0b\x32\x38.google.container.v1.AdvancedDatapathObservabilityConfig\"\x9e\x02\n#AdvancedDatapathObservabilityConfig\x12\x16\n\x0e\x65nable_metrics\x18\x01 \x01(\x08\x12V\n\nrelay_mode\x18\x02 \x01(\x0e\x32\x42.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode\x12\x19\n\x0c\x65nable_relay\x18\x03 \x01(\x08H\x00\x88\x01\x01\"[\n\tRelayMode\x12\x1a\n\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n\x0b\x45XTERNAL_LB\x10\x04\x42\x0f\n\r_enable_relay\"-\n\x1aRayClusterMonitoringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"Z\n\x15NodePoolLoggingConfig\x12\x41\n\x0evariant_config\x18\x01 \x01(\x0b\x32).google.container.v1.LoggingVariantConfig\"\x9f\x01\n\x14LoggingVariantConfig\x12\x42\n\x07variant\x18\x01 \x01(\x0e\x32\x31.google.container.v1.LoggingVariantConfig.Variant\"C\n\x07Variant\x12\x17\n\x13VARIANT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x12\n\x0eMAX_THROUGHPUT\x10\x02\"\xe6\x02\n\x19MonitoringComponentConfig\x12S\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32\x38.google.container.v1.MonitoringComponentConfig.Component\"\xf3\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0b\n\x07STORAGE\x10\x07\x12\x07\n\x03HPA\x10\x08\x12\x07\n\x03POD\x10\t\x12\r\n\tDAEMONSET\x10\n\x12\x0e\n\nDEPLOYMENT\x10\x0b\x12\x0f\n\x0bSTATEFULSET\x10\x0c\x12\x0c\n\x08\x43\x41\x44VISOR\x10\r\x12\x0b\n\x07KUBELET\x10\x0e\x12\x08\n\x04\x44\x43GM\x10\x0f\x12\n\n\x06JOBSET\x10\x10\"u\n\x17ManagedPrometheusConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12I\n\x16\x61uto_monitoring_config\x18\x02 \x01(\x0b\x32).google.container.v1.AutoMonitoringConfig\"\x89\x01\n\x14\x41utoMonitoringConfig\x12>\n\x05scope\x18\x01 \x01(\x0e\x32/.google.container.v1.AutoMonitoringConfig.Scope\"1\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x08\n\x04NONE\x10\x02\"\xb0\x01\n\x0ePodAutoscaling\x12H\n\x0bhpa_profile\x18\x02 \x01(\x0e\x32..google.container.v1.PodAutoscaling.HPAProfileH\x00\x88\x01\x01\"D\n\nHPAProfile\x12\x1b\n\x17HPA_PROFILE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0f\n\x0bPERFORMANCE\x10\x02\x42\x0e\n\x0c_hpa_profile\"N\n\x05\x46leet\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x17\n\nmembership\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0epre_registered\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\xac\x05\n\x1b\x43ontrolPlaneEndpointsConfig\x12_\n\x13\x64ns_endpoint_config\x18\x01 \x01(\x0b\x32\x42.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig\x12_\n\x13ip_endpoints_config\x18\x03 \x01(\x0b\x32\x42.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig\x1aj\n\x11\x44NSEndpointConfig\x12\x15\n\x08\x65ndpoint\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61llow_external_traffic\x18\x03 \x01(\x08H\x00\x88\x01\x01\x42\x19\n\x17_allow_external_traffic\x1a\xde\x02\n\x11IPEndpointsConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x65nable_public_endpoint\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\rglobal_access\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12W\n\x1a\x61uthorized_networks_config\x18\x04 \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfig\x12\x1c\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10private_endpoint\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1bprivate_endpoint_subnetwork\x18\x07 \x01(\tB\n\n\x08_enabledB\x19\n\x17_enable_public_endpointB\x10\n\x0e_global_access\"2\n\x17LocalNvmeSsdBlockConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"S\n\x1e\x45phemeralStorageLocalSsdConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\x12\x18\n\x10\x64\x61ta_cache_count\x18\x02 \x01(\x05\"\x84\x01\n\x13ResourceManagerTags\x12@\n\x04tags\x18\x01 \x03(\x0b\x32\x32.google.container.v1.ResourceManagerTags.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf4\x01\n\x10\x45nterpriseConfig\x12L\n\x0c\x63luster_tier\x18\x01 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTierB\x03\xe0\x41\x03\x12G\n\x0c\x64\x65sired_tier\x18\x02 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTier\"I\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\"7\n\x13SecretManagerConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_enabled\"\x9b\x01\n\x11SecondaryBootDisk\x12\x39\n\x04mode\x18\x01 \x01(\x0e\x32+.google.container.v1.SecondaryBootDisk.Mode\x12\x12\n\ndisk_image\x18\x02 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONTAINER_IMAGE_CACHE\x10\x01\"!\n\x1fSecondaryBootDiskUpdateStrategy\"D\n\x1e\x46\x65tchClusterUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\x95\x07\n\x12\x43lusterUpgradeInfo\x12!\n\x14minor_target_version\x18\x07 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x08 \x01(\tH\x01\x88\x01\x01\x12V\n\x13\x61uto_upgrade_status\x18\x02 \x03(\x0e\x32\x39.google.container.v1.ClusterUpgradeInfo.AutoUpgradeStatus\x12V\n\rpaused_reason\x18\x03 \x03(\x0e\x32?.google.container.v1.ClusterUpgradeInfo.AutoUpgradePausedReason\x12<\n\x0fupgrade_details\x18\x04 \x03(\x0b\x32#.google.container.v1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x05 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x06 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x04\x12\x12\n\x0eUPGRADE_PAUSED\x10\x05\"\x90\x02\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x05\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x06\x12\x1d\n\x19\x43LUSTER_DISRUPTION_BUDGET\x10\x04\x12+\n\'CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE\x10\x07\x12\x11\n\rSYSTEM_CONFIG\x10\x08\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp\"\xd7\x03\n\x0eUpgradeDetails\x12=\n\x05state\x18\x01 \x01(\x0e\x32).google.container.v1.UpgradeDetails.StateB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x17\n\x0finitial_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x41\n\nstart_type\x18\x06 \x01(\x0e\x32-.google.container.v1.UpgradeDetails.StartType\"J\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\"B\n\tStartType\x12\x1a\n\x16START_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\x42\r\n\x0b_start_timeB\x0b\n\t_end_time\"E\n\x1f\x46\x65tchNodePoolUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xcc\x06\n\x13NodePoolUpgradeInfo\x12!\n\x14minor_target_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12W\n\x13\x61uto_upgrade_status\x18\x03 \x03(\x0e\x32:.google.container.v1.NodePoolUpgradeInfo.AutoUpgradeStatus\x12W\n\rpaused_reason\x18\x04 \x03(\x0e\x32@.google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReason\x12<\n\x0fupgrade_details\x18\x05 \x03(\x0b\x32#.google.container.v1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x06 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x07 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x02\x12\x12\n\x0eUPGRADE_PAUSED\x10\x03\"\xc4\x01\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x02\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x03\x12\x11\n\rSYSTEM_CONFIG\x10\x04\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp*\xc6\x01\n\x17PrivateIPv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\'\n#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n\x13UpgradeResourceType\x12%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MASTER\x10\x01\x12\r\n\tNODE_POOL\x10\x02*a\n\x10\x44\x61tapathProvider\x12!\n\x1d\x44\x41TAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n\x11\x41\x44VANCED_DATAPATH\x10\x02*^\n\x16NodePoolUpdateStrategy\x12)\n%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nBLUE_GREEN\x10\x02\x12\t\n\x05SURGE\x10\x03*@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02*N\n\x0eIPv6AccessType\x12 \n\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02*\x9f\x01\n\x19InTransitEncryptionConfig\x12,\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x30\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x02\x32\xf9M\n\x0e\x43lusterManager\x12\xe8\x01\n\x0cListClusters\x12(.google.container.v1.ListClustersRequest\x1a).google.container.v1.ListClustersResponse\"\x82\x01\xda\x41\x0fproject_id,zone\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x61\x12,/v1/{parent=projects/*/locations/*}/clustersZ1\x12//v1/projects/{project_id}/zones/{zone}/clusters\x12\xed\x01\n\nGetCluster\x12&.google.container.v1.GetClusterRequest\x1a\x1c.google.container.v1.Cluster\"\x98\x01\xda\x41\x1aproject_id,zone,cluster_id\xda\x41\x04name\x82\xd3\xe4\x93\x02n\x12,/v1/{name=projects/*/locations/*/clusters/*}Z>\x12*/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels:\x01*ZP\"K/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels:\x01*\x12\xa5\x02\n\rSetLegacyAbac\x12).google.container.v1.SetLegacyAbacRequest\x1a\x1e.google.container.v1.Operation\"\xc8\x01\xda\x41\"project_id,zone,cluster_id,enabled\xda\x41\x0cname,enabled\x82\xd3\xe4\x93\x02\x8d\x01\":/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac:\x01*ZL\"G/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac:\x01*\x12\xa0\x02\n\x0fStartIPRotation\x12+.google.container.v1.StartIPRotationRequest\x1a\x1e.google.container.v1.Operation\"\xbf\x01\xda\x41\x1aproject_id,zone,cluster_id\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x01\"] + # Optional. Defines a comma-separated allowlist of unsafe sysctls or sysctl + # patterns (ending in `*`). + # + # The unsafe namespaced sysctl groups are `kernel.shm*`, `kernel.msg*`, + # `kernel.sem`, `fs.mqueue.*`, and `net.*`. Leaving this allowlist empty + # means they cannot be set on Pods. + # + # To allow certain sysctls or sysctl patterns to be set on Pods, list them + # separated by commas. + # For example: `kernel.msg*,net.ipv4.route.min_pmtu`. + # + # See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ + # for more details. class NodeKubeletConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # TopologyManager defines the configuration options for Topology Manager + # feature. See + # https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/ + # @!attribute [rw] policy + # @return [::String] + # Configures the strategy for resource alignment. + # Allowed values are: + # + # * none: the default policy, and does not perform any topology alignment. + # * restricted: the topology manager stores the preferred NUMA node affinity + # for the container, and will reject the pod if the affinity if not + # preferred. + # * best-effort: the topology manager stores the preferred NUMA node affinity + # for the container. If the affinity is not preferred, the topology manager + # will admit the pod to the node anyway. + # * single-numa-node: the topology manager determines if the single NUMA node + # affinity is possible. If it is, Topology Manager will store this and the + # Hint Providers can then use this information when making the resource + # allocation decision. If, however, this is not possible then the + # Topology Manager will reject the pod from the node. This will result in a + # pod in a Terminated state with a pod admission failure. + # + # The default policy value is 'none' if unspecified. + # Details about each strategy can be found + # [here](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies). + # @!attribute [rw] scope + # @return [::String] + # The Topology Manager aligns resources in following scopes: + # + # * container + # * pod + # + # The default scope is 'container' if unspecified. + # See + # https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes + class TopologyManager + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The option enables the Kubernetes NUMA-aware Memory Manager feature. + # Detailed description about the feature can be found + # [here](https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/). + # @!attribute [rw] policy + # @return [::String] + # Controls the memory management policy on the Node. + # See + # https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#policies + # + # The following values are allowed. + # * "none" + # * "static" + # The default value is 'none' if unspecified. + class MemoryManager + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Parameters that describe the nodes in a cluster. # # GKE Autopilot clusters do not @@ -389,16 +548,23 @@ class NodeKubeletConfig # @!attribute [rw] secondary_boot_disk_update_strategy # @return [::Google::Cloud::Container::V1::SecondaryBootDiskUpdateStrategy] # Secondary boot disk update strategy. + # @!attribute [rw] max_run_duration + # @return [::Google::Protobuf::Duration] + # The maximum duration for the nodes to exist. + # If unspecified, the nodes can exist indefinitely. # @!attribute [rw] local_ssd_encryption_mode # @return [::Google::Cloud::Container::V1::NodeConfig::LocalSsdEncryptionMode] # Specifies which method should be used for encrypting the - # Local SSDs attahced to the node. + # Local SSDs attached to the node. # @!attribute [r] effective_cgroup_mode # @return [::Google::Cloud::Container::V1::NodeConfig::EffectiveCgroupMode] # Output only. effective_cgroup_mode is the cgroup mode actually used by the # node pool. It is determined by the cgroup mode specified in the # LinuxNodeConfig or the default cgroup mode based on the cluster creation # version. + # @!attribute [rw] flex_start + # @return [::Boolean] + # Flex Start flag for enabling Flex Start VM. class NodeConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -475,9 +641,28 @@ module EffectiveCgroupMode # @!attribute [rw] enable_nested_virtualization # @return [::Boolean] # Whether or not to enable nested virtualization (defaults to false). + # @!attribute [rw] performance_monitoring_unit + # @return [::Google::Cloud::Container::V1::AdvancedMachineFeatures::PerformanceMonitoringUnit] + # Type of Performance Monitoring Unit (PMU) requested on node pool instances. + # If unset, PMU will not be available to the node. class AdvancedMachineFeatures include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # Level of PMU access + module PerformanceMonitoringUnit + # PMU not enabled. + PERFORMANCE_MONITORING_UNIT_UNSPECIFIED = 0 + + # Architecturally defined non-LLC events. + ARCHITECTURAL = 1 + + # Most documented core/L2 events. + STANDARD = 2 + + # Most documented core/L2 and LLC events. + ENHANCED = 3 + end end # Parameters for node pool-level network config. @@ -762,7 +947,7 @@ class PrivateRegistryAccessConfig # @return [::Array<::String>] # List of fully qualified domain names (FQDN). # Specifying port is supported. - # Wilcards are NOT supported. + # Wildcards are NOT supported. # Examples: # - my.customdomain.com # - 10.0.1.2:5000 @@ -995,6 +1180,9 @@ class ClientCertificateConfig # @!attribute [rw] ray_operator_config # @return [::Google::Cloud::Container::V1::RayOperatorConfig] # Optional. Configuration for Ray Operator addon. + # @!attribute [rw] high_scale_checkpointing_config + # @return [::Google::Cloud::Container::V1::HighScaleCheckpointingConfig] + # Configuration for the High Scale Checkpointing add-on. class AddonsConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1214,6 +1402,16 @@ class ParallelstoreCsiDriverConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for the High Scale Checkpointing. + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the High Scale Checkpointing is enabled for this + # cluster. + class HighScaleCheckpointingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Configuration options for the Ray Operator add-on. # @!attribute [rw] enabled # @return [::Boolean] @@ -1260,7 +1458,7 @@ class StatefulHAConfig # Kubernetes master through HTTPS. # @!attribute [rw] gcp_public_cidrs_access_enabled # @return [::Boolean] - # Whether master is accessbile via Google Compute Engine Public IP addresses. + # Whether master is accessible via Google Compute Engine Public IP addresses. # @!attribute [rw] private_endpoint_enforcement_enabled # @return [::Boolean] # Whether master authorized networks is enforced on private endpoint or not. @@ -1455,6 +1653,7 @@ class PodCIDROverprovisionConfig # `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range # to use. # @!attribute [rw] tpu_ipv4_cidr_block + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # The IP address range of the Cloud TPUs in this cluster. If unspecified, a # range will be automatically chosen with the default size. @@ -1471,6 +1670,9 @@ class PodCIDROverprovisionConfig # notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. # `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range # to use. + # + # This field is deprecated due to the deprecation of 2VM TPU. The end of life + # date for 2VM TPU is 2025-04-25. # @!attribute [rw] use_routes # @return [::Boolean] # Whether routes will be used for pod IPs in the cluster. @@ -1584,7 +1786,7 @@ class IPAllocationPolicy # The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -1638,6 +1840,11 @@ class IPAllocationPolicy # The cluster has no SLA for uptime and master/node upgrades are disabled. # Alpha enabled clusters are automatically deleted thirty days after # creation. + # @!attribute [rw] alpha_cluster_feature_gates + # @return [::Array<::String>] + # The list of user specified Kubernetes feature gates. + # Each string represents the activation status of a feature gate (e.g. + # "featureX=true" or "featureX=false") # @!attribute [rw] resource_labels # @return [::Google::Protobuf::Map{::String => ::String}] # The resource labels for the cluster to use to annotate any related @@ -1817,13 +2024,19 @@ class IPAllocationPolicy # [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) # in which the cluster resides. # @!attribute [rw] enable_tpu + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] # Enable the ability to use Cloud TPUs in this cluster. + # This field is deprecated due to the deprecation of 2VM TPU. The end of life + # date for 2VM TPU is 2025-04-25. # @!attribute [r] tpu_ipv4_cidr_block + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Output only. The IP address range of the Cloud TPUs in this cluster, in # [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) # notation (e.g. `1.2.3.4/29`). + # This field is deprecated due to the deprecation of 2VM TPU. The end of life + # date for 2VM TPU is 2025-04-25. # @!attribute [rw] conditions # @return [::Array<::Google::Cloud::Container::V1::StatusCondition>] # Which conditions caused the current cluster state. @@ -1847,6 +2060,9 @@ class IPAllocationPolicy # @return [::Google::Cloud::Container::V1::NodePoolAutoConfig] # Node pool configs that apply to all auto-provisioned node pools # in autopilot clusters and node auto-provisioning enabled clusters. + # @!attribute [rw] pod_autoscaling + # @return [::Google::Cloud::Container::V1::PodAutoscaling] + # The config for pod autoscaling. # @!attribute [rw] etag # @return [::String] # This checksum is computed by the server based on the value of cluster @@ -1886,6 +2102,10 @@ class IPAllocationPolicy # @return [::Google::Cloud::Container::V1::RBACBindingConfig] # RBACBindingConfig allows user to restrict ClusterRoleBindings an # RoleBindings that can be created. + # @!attribute [rw] anonymous_authentication_config + # @return [::Google::Cloud::Container::V1::AnonymousAuthenticationConfig] + # Configuration for limiting anonymous access to all endpoints except the + # health checks. class Cluster include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1989,6 +2209,13 @@ class UserManagedKeysConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # AnonymousAuthenticationConfig defines the settings needed to limit endpoints + # that allow anonymous authentication. + class AnonymousAuthenticationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # CompliancePostureConfig defines the settings needed to enable/disable # features for the Compliance Posture. # @!attribute [rw] mode @@ -2151,7 +2378,7 @@ class NodeConfigDefaults # The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -2328,6 +2555,9 @@ class NodeConfigDefaults # @return [::Google::Cloud::Container::V1::NetworkTags] # The desired network tags that apply to all auto-provisioned node pools # in autopilot clusters and node auto-provisioning enabled clusters. + # @!attribute [rw] desired_pod_autoscaling + # @return [::Google::Cloud::Container::V1::PodAutoscaling] + # The desired config for pod autoscaling. # @!attribute [rw] desired_gateway_api_config # @return [::Google::Cloud::Container::V1::GatewayAPIConfig] # The desired config of Gateway API on this cluster. @@ -2370,7 +2600,7 @@ class NodeConfigDefaults # Enable/Disable FQDN Network Policy for the cluster. # @!attribute [rw] desired_autopilot_workload_policy_config # @return [::Google::Cloud::Container::V1::WorkloadPolicyConfig] - # The desired workload policy configuration for the autopilot cluster. + # WorkloadPolicyConfig is the configuration related to GCW workload policy # @!attribute [rw] desired_k8s_beta_apis # @return [::Google::Cloud::Container::V1::K8sBetaAPIConfig] # Desired Beta APIs to be enabled for cluster. @@ -2413,12 +2643,19 @@ class NodeConfigDefaults # @!attribute [rw] desired_enterprise_config # @return [::Google::Cloud::Container::V1::DesiredEnterpriseConfig] # The desired enterprise configuration for the cluster. + # @!attribute [rw] desired_disable_l4_lb_firewall_reconciliation + # @return [::Boolean] + # Enable/Disable L4 LB VPC firewall reconciliation for the cluster. # @!attribute [rw] desired_node_pool_auto_config_linux_node_config # @return [::Google::Cloud::Container::V1::LinuxNodeConfig] # The desired Linux node config for all auto-provisioned node pools # in autopilot clusters and node auto-provisioning enabled clusters. # # Currently only `cgroup_mode` can be set here. + # @!attribute [rw] desired_anonymous_authentication_config + # @return [::Google::Cloud::Container::V1::AnonymousAuthenticationConfig] + # Configuration for limiting anonymous access to all endpoints except the + # health checks. class ClusterUpdate include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2565,16 +2802,17 @@ module Type # The cluster is being created. The cluster should be assumed to be # unusable until the operation finishes. # - # In the event of the operation failing, the cluster will enter the [ERROR - # state][Cluster.Status.ERROR] and eventually be deleted. + # In the event of the operation failing, the cluster will enter the + # {::Google::Cloud::Container::V1::Cluster::Status::ERROR ERROR state} and eventually be + # deleted. CREATE_CLUSTER = 1 # The cluster is being deleted. The cluster should be assumed to be # unusable as soon as this operation starts. # - # In the event of the operation failing, the cluster will enter the [ERROR - # state][Cluster.Status.ERROR] and the deletion will be automatically - # retried until completed. + # In the event of the operation failing, the cluster will enter the + # {::Google::Cloud::Container::V1::Cluster::Status::ERROR ERROR state} and the deletion + # will be automatically retried until completed. DELETE_CLUSTER = 2 # The [cluster @@ -2970,6 +3208,13 @@ class UpdateClusterRequest # @return [::Array<::String>] # List of Storage Pools where boot disks are provisioned. # Existing Storage Pools will be replaced with storage-pools. + # @!attribute [rw] max_run_duration + # @return [::Google::Protobuf::Duration] + # The maximum duration for the nodes to exist. + # If unspecified, the nodes can exist indefinitely. + # @!attribute [rw] flex_start + # @return [::Boolean] + # Flex Start flag for enabling Flex Start VM. class UpdateNodePoolRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -3077,7 +3322,7 @@ class SetLoggingServiceRequest # Required. The monitoring service the cluster should use to write metrics. # Currently available options: # - # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring # service with a Kubernetes-native resource model # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no # longer available as of GKE 1.15). @@ -4233,8 +4478,8 @@ class CompleteNodePoolUpgradeRequest end # RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed - # NodePool upgrade. This will be an no-op if the last upgrade successfully - # completed. + # NodePool upgrade. This will be an no-op if the last upgrade successfully + # completed. # @!attribute [rw] project_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4379,7 +4624,7 @@ module AutoscalingProfile # available image types. # @!attribute [rw] insecure_kubelet_readonly_port_enabled # @return [::Boolean] - # Enable or disable Kubelet read only port. + # DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead. class AutoprovisioningNodePoolDefaults include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -4795,6 +5040,9 @@ module Code # Cluster CA is expiring soon. CA_EXPIRING = 9 + + # Node service account is missing permissions. + NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS = 10 end end @@ -4867,6 +5115,9 @@ module Code # and this field at the same time. # To update the default setting, use # {::Google::Cloud::Container::V1::ClusterUpdate#desired_default_enable_private_nodes ClusterUpdate.desired_default_enable_private_nodes} + # @!attribute [rw] disable_l4_lb_firewall_reconciliation + # @return [::Boolean] + # Disable L4 load balancer VPC firewalls to enable firewall policies. class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -5010,7 +5261,7 @@ class Jwk extend ::Google::Protobuf::MessageExts::ClassMethods end - # GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 + # GetJSONWebKeysResponse is a valid JSON Web Key Set as specified in rfc 7517 # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Container::V1::Jwk>] # The public component of the keys used by the cluster to sign token @@ -5047,7 +5298,7 @@ class CheckAutopilotCompatibilityRequest # The name of the resources which are subject to this issue. # @!attribute [rw] documentation_url # @return [::String] - # A URL to a public documnetation, which addresses resolving this issue. + # A URL to a public documentation, which addresses resolving this issue. # @!attribute [rw] description # @return [::String] # The description of the issue. @@ -5575,6 +5826,9 @@ module EventType # Corresponds with SecurityBulletinEvent. SECURITY_BULLETIN_EVENT = 3 + + # Corresponds with UpgradeInfoEvent. + UPGRADE_INFO_EVENT = 4 end end @@ -5583,9 +5837,27 @@ module EventType # @!attribute [rw] enabled # @return [::Boolean] # Whether Confidential Nodes feature is enabled. + # @!attribute [rw] confidential_instance_type + # @return [::Google::Cloud::Container::V1::ConfidentialNodes::ConfidentialInstanceType] + # Defines the type of technology used by the confidential node. class ConfidentialNodes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of technology used by the confidential node. + module ConfidentialInstanceType + # No type specified. Do not use this value. + CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED = 0 + + # AMD Secure Encrypted Virtualization. + SEV = 1 + + # AMD Secure Encrypted Virtualization - Secure Nested Paging. + SEV_SNP = 2 + + # Intel Trust Domain eXtension. + TDX = 3 + end end # UpgradeEvent is a notification sent to customers by the cluster server when @@ -5641,9 +5913,18 @@ class UpgradeEvent # @!attribute [r] state # @return [::Google::Cloud::Container::V1::UpgradeInfoEvent::State] # Output only. The state of the upgrade. + # @!attribute [rw] standard_support_end_time + # @return [::Google::Protobuf::Timestamp] + # The end of standard support timestamp. + # @!attribute [rw] extended_support_end_time + # @return [::Google::Protobuf::Timestamp] + # The end of extended support timestamp. # @!attribute [rw] description # @return [::String] # A brief description of the event. + # @!attribute [rw] event_type + # @return [::Google::Cloud::Container::V1::UpgradeInfoEvent::EventType] + # The type of the event. class UpgradeInfoEvent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -5665,6 +5946,24 @@ module State # CANCELED indicates the upgrade has canceled. CANCELED = 6 end + + # The type of the event. + module EventType + # EVENT_TYPE_UNSPECIFIED indicates the event type is unspecified. + EVENT_TYPE_UNSPECIFIED = 0 + + # END_OF_SUPPORT indicates GKE version reaches end of support, check + # standard_support_end_time and extended_support_end_time for more details. + END_OF_SUPPORT = 1 + + # COS_MILESTONE_VERSION_UPDATE indicates that the COS node image will + # update COS milestone version for new patch versions starting with + # the one in the description. + COS_MILESTONE_VERSION_UPDATE = 2 + + # UPGRADE_LIFECYCLE indicates the event is about the upgrade lifecycle. + UPGRADE_LIFECYCLE = 3 + end end # UpgradeAvailableEvent is a notification sent to customers when a new @@ -5728,6 +6027,9 @@ class UpgradeAvailableEvent # @return [::Boolean] # If this field is specified, it means there are manual steps that the user # must take to make their clusters safe. + # @!attribute [rw] mitigated_versions + # @return [::Array<::String>] + # The GKE versions where this vulnerability is mitigated. class SecurityBulletinEvent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -5739,17 +6041,20 @@ class SecurityBulletinEvent # Enable Autopilot # @!attribute [rw] workload_policy_config # @return [::Google::Cloud::Container::V1::WorkloadPolicyConfig] - # Workload policy configuration for Autopilot. + # WorkloadPolicyConfig is the configuration related to GCW workload policy class Autopilot include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # WorkloadPolicyConfig is the configuration of workload policy for autopilot - # clusters. + # WorkloadPolicyConfig is the configuration related to GCW workload policy # @!attribute [rw] allow_net_admin # @return [::Boolean] # If true, workloads can use NET_ADMIN capability. + # @!attribute [rw] autopilot_compatibility_auditing_enabled + # @return [::Boolean] + # If true, enables the GCW Auditor that audits workloads on + # standard clusters. class WorkloadPolicyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -5797,6 +6102,9 @@ module Component # kcp connection logs KCP_CONNECTION = 8 + + # horizontal pod autoscaler decision logs + KCP_HPA = 9 end end @@ -5948,6 +6256,9 @@ module Component # NVIDIA Data Center GPU Manager (DCGM) DCGM = 15 + + # JobSet + JOBSET = 16 end end @@ -5956,11 +6267,60 @@ module Component # @!attribute [rw] enabled # @return [::Boolean] # Enable Managed Collection. + # @!attribute [rw] auto_monitoring_config + # @return [::Google::Cloud::Container::V1::AutoMonitoringConfig] + # GKE Workload Auto-Monitoring Configuration. class ManagedPrometheusConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # AutoMonitoringConfig defines the configuration for GKE Workload + # Auto-Monitoring. + # @!attribute [rw] scope + # @return [::Google::Cloud::Container::V1::AutoMonitoringConfig::Scope] + # Scope for GKE Workload Auto-Monitoring. + class AutoMonitoringConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Scope for applications monitored by Auto-Monitoring + module Scope + # Not set. + SCOPE_UNSPECIFIED = 0 + + # Auto-Monitoring is enabled for all supported applications. + ALL = 1 + + # Disable Auto-Monitoring. + NONE = 2 + end + end + + # PodAutoscaling is used for configuration of parameters + # for workload autoscaling. + # @!attribute [rw] hpa_profile + # @return [::Google::Cloud::Container::V1::PodAutoscaling::HPAProfile] + # Selected Horizontal Pod Autoscaling profile. + class PodAutoscaling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of Horizontal Pod Autoscaling profile. + module HPAProfile + # HPA_PROFILE_UNSPECIFIED is used when no custom HPA profile is set. + HPA_PROFILE_UNSPECIFIED = 0 + + # Customers explicitly opt-out of HPA profiles. + NONE = 1 + + # PERFORMANCE is used when customers opt-in to the performance HPA profile. + # In this profile we support a higher number of HPAs per cluster and faster + # metrics collection for workload autoscaling. + PERFORMANCE = 2 + end + end + # Fleet is the fleet configuration for the cluster. # @!attribute [rw] project # @return [::String] @@ -6101,6 +6461,9 @@ class LocalNvmeSsdBlockConfig # ssds), 0 will be provisioned. See # https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds # for more info. + # @!attribute [rw] data_cache_count + # @return [::Integer] + # Number of local SSDs to use for GKE Data Cache. class EphemeralStorageLocalSsdConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -6196,6 +6559,229 @@ class SecondaryBootDiskUpdateStrategy extend ::Google::Protobuf::MessageExts::ClassMethods end + # FetchClusterUpgradeInfoRequest fetches the upgrade information of a cluster. + # @!attribute [rw] name + # @return [::String] + # Required. The name (project, location, cluster) of the cluster to get. + # Specified in the format `projects/*/locations/*/clusters/*` or + # `projects/*/zones/*/clusters/*`. + # @!attribute [rw] version + # @return [::String] + # API request version that initiates this operation. + class FetchClusterUpgradeInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ClusterUpgradeInfo contains the upgrade information of a cluster. + # @!attribute [rw] minor_target_version + # @return [::String] + # minor_target_version indicates the target version for minor upgrade. + # @!attribute [rw] patch_target_version + # @return [::String] + # patch_target_version indicates the target version for patch upgrade. + # @!attribute [rw] auto_upgrade_status + # @return [::Array<::Google::Cloud::Container::V1::ClusterUpgradeInfo::AutoUpgradeStatus>] + # The auto upgrade status. + # @!attribute [rw] paused_reason + # @return [::Array<::Google::Cloud::Container::V1::ClusterUpgradeInfo::AutoUpgradePausedReason>] + # The auto upgrade paused reason. + # @!attribute [rw] upgrade_details + # @return [::Array<::Google::Cloud::Container::V1::UpgradeDetails>] + # The list of past auto upgrades. + # @!attribute [rw] end_of_standard_support_timestamp + # @return [::String] + # The cluster's current minor version's end of standard support timestamp. + # @!attribute [rw] end_of_extended_support_timestamp + # @return [::String] + # The cluster's current minor version's end of extended support timestamp. + class ClusterUpgradeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # AutoUpgradeStatus indicates the status of auto upgrade. + module AutoUpgradeStatus + # UNKNOWN indicates an unknown status. + UNKNOWN = 0 + + # ACTIVE indicates an active status. + ACTIVE = 1 + + # MINOR_UPGRADE_PAUSED indicates the minor version upgrade is + # paused. + MINOR_UPGRADE_PAUSED = 4 + + # UPGRADE_PAUSED indicates the upgrade is paused. + UPGRADE_PAUSED = 5 + end + + # AutoUpgradePausedReason indicates the reason for auto upgrade paused + # status. + module AutoUpgradePausedReason + # AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason. + AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED = 0 + + # MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance + # window. + MAINTENANCE_WINDOW = 1 + + # MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a + # maintenance exclusion with scope NO_UPGRADES. + MAINTENANCE_EXCLUSION_NO_UPGRADES = 5 + + # MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a + # maintenance exclusion with scope NO_MINOR_UPGRADES. + MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES = 6 + + # CLUSTER_DISRUPTION_BUDGET indicates the cluster is outside the cluster + # disruption budget. + CLUSTER_DISRUPTION_BUDGET = 4 + + # CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE indicates the cluster is outside + # the cluster disruption budget for minor version upgrade. + CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE = 7 + + # SYSTEM_CONFIG indicates the cluster upgrade is paused by system config. + SYSTEM_CONFIG = 8 + end + end + + # UpgradeDetails contains detailed information of each individual upgrade + # operation. + # @!attribute [r] state + # @return [::Google::Cloud::Container::V1::UpgradeDetails::State] + # Output only. The state of the upgrade. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The start timestamp of the upgrade. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The end timestamp of the upgrade. + # @!attribute [rw] initial_version + # @return [::String] + # The version before the upgrade. + # @!attribute [rw] target_version + # @return [::String] + # The version after the upgrade. + # @!attribute [rw] start_type + # @return [::Google::Cloud::Container::V1::UpgradeDetails::StartType] + # The start type of the upgrade. + class UpgradeDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State indicates the state of the upgrade. + module State + # Upgrade state is unknown. + UNKNOWN = 0 + + # Upgrade has failed with an error. + FAILED = 1 + + # Upgrade has succeeded. + SUCCEEDED = 2 + + # Upgrade has been canceled. + CANCELED = 3 + + # Upgrade is running. + RUNNING = 4 + end + + # StartType indicates the type of starting the upgrade. + module StartType + # Upgrade start type is unspecified. + START_TYPE_UNSPECIFIED = 0 + + # Upgrade started automatically. + AUTOMATIC = 1 + + # Upgrade started manually. + MANUAL = 2 + end + end + + # FetchNodePoolUpgradeInfoRequest fetches the upgrade information of a + # nodepool. + # @!attribute [rw] name + # @return [::String] + # Required. The name (project, location, cluster, nodepool) of the nodepool + # to get. Specified in the format + # `projects/*/locations/*/clusters/*/nodePools/*` or + # `projects/*/zones/*/clusters/*/nodePools/*`. + # @!attribute [rw] version + # @return [::String] + # API request version that initiates this operation. + class FetchNodePoolUpgradeInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NodePoolUpgradeInfo contains the upgrade information of a nodepool. + # @!attribute [rw] minor_target_version + # @return [::String] + # minor_target_version indicates the target version for minor upgrade. + # @!attribute [rw] patch_target_version + # @return [::String] + # patch_target_version indicates the target version for patch upgrade. + # @!attribute [rw] auto_upgrade_status + # @return [::Array<::Google::Cloud::Container::V1::NodePoolUpgradeInfo::AutoUpgradeStatus>] + # The auto upgrade status. + # @!attribute [rw] paused_reason + # @return [::Array<::Google::Cloud::Container::V1::NodePoolUpgradeInfo::AutoUpgradePausedReason>] + # The auto upgrade paused reason. + # @!attribute [rw] upgrade_details + # @return [::Array<::Google::Cloud::Container::V1::UpgradeDetails>] + # The list of past auto upgrades. + # @!attribute [rw] end_of_standard_support_timestamp + # @return [::String] + # The nodepool's current minor version's end of standard support timestamp. + # @!attribute [rw] end_of_extended_support_timestamp + # @return [::String] + # The nodepool's current minor version's end of extended support timestamp. + class NodePoolUpgradeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # AutoUpgradeStatus indicates the status of auto upgrade. + module AutoUpgradeStatus + # UNKNOWN indicates an unknown status. + UNKNOWN = 0 + + # ACTIVE indicates an active status. + ACTIVE = 1 + + # MINOR_UPGRADE_PAUSED indicates the minor version upgrade is + # paused. + MINOR_UPGRADE_PAUSED = 2 + + # UPGRADE_PAUSED indicates the upgrade is paused. + UPGRADE_PAUSED = 3 + end + + # AutoUpgradePausedReason indicates the reason for auto upgrade paused + # status. + module AutoUpgradePausedReason + # AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason. + AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED = 0 + + # MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance + # window. + MAINTENANCE_WINDOW = 1 + + # MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a + # maintenance exclusion with scope NO_UPGRADES. + MAINTENANCE_EXCLUSION_NO_UPGRADES = 2 + + # MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a + # maintenance exclusion with scope NO_MINOR_UPGRADES. + MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES = 3 + + # SYSTEM_CONFIG indicates the cluster upgrade is paused by system config. + SYSTEM_CONFIG = 4 + end + end + # PrivateIPv6GoogleAccess controls whether and how the pods can communicate # with Google Services through gRPC over IPv6. module PrivateIPv6GoogleAccess diff --git a/google-cloud-container-v1/snippets/cluster_manager/fetch_cluster_upgrade_info.rb b/google-cloud-container-v1/snippets/cluster_manager/fetch_cluster_upgrade_info.rb new file mode 100644 index 000000000000..7d6e6ffe1aa8 --- /dev/null +++ b/google-cloud-container-v1/snippets/cluster_manager/fetch_cluster_upgrade_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 container_v1_generated_ClusterManager_FetchClusterUpgradeInfo_sync] +require "google/cloud/container/v1" + +## +# Snippet for the fetch_cluster_upgrade_info call in the ClusterManager 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::Container::V1::ClusterManager::Client#fetch_cluster_upgrade_info. +# +def fetch_cluster_upgrade_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Container::V1::ClusterManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new + + # Call the fetch_cluster_upgrade_info method. + result = client.fetch_cluster_upgrade_info request + + # The returned object is of type Google::Cloud::Container::V1::ClusterUpgradeInfo. + p result +end +# [END container_v1_generated_ClusterManager_FetchClusterUpgradeInfo_sync] diff --git a/google-cloud-container-v1/snippets/cluster_manager/fetch_node_pool_upgrade_info.rb b/google-cloud-container-v1/snippets/cluster_manager/fetch_node_pool_upgrade_info.rb new file mode 100644 index 000000000000..d92054c2111a --- /dev/null +++ b/google-cloud-container-v1/snippets/cluster_manager/fetch_node_pool_upgrade_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 container_v1_generated_ClusterManager_FetchNodePoolUpgradeInfo_sync] +require "google/cloud/container/v1" + +## +# Snippet for the fetch_node_pool_upgrade_info call in the ClusterManager 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::Container::V1::ClusterManager::Client#fetch_node_pool_upgrade_info. +# +def fetch_node_pool_upgrade_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Container::V1::ClusterManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new + + # Call the fetch_node_pool_upgrade_info method. + result = client.fetch_node_pool_upgrade_info request + + # The returned object is of type Google::Cloud::Container::V1::NodePoolUpgradeInfo. + p result +end +# [END container_v1_generated_ClusterManager_FetchNodePoolUpgradeInfo_sync] diff --git a/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json b/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json index a5aa49a61ea3..2c719487006d 100644 --- a/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json +++ b/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json @@ -1370,6 +1370,86 @@ "type": "FULL" } ] + }, + { + "region_tag": "container_v1_generated_ClusterManager_FetchClusterUpgradeInfo_sync", + "title": "Snippet for the fetch_cluster_upgrade_info call in the ClusterManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Container::V1::ClusterManager::Client#fetch_cluster_upgrade_info.", + "file": "cluster_manager/fetch_cluster_upgrade_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_cluster_upgrade_info", + "full_name": "::Google::Cloud::Container::V1::ClusterManager::Client#fetch_cluster_upgrade_info", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Container::V1::ClusterUpgradeInfo", + "client": { + "short_name": "ClusterManager::Client", + "full_name": "::Google::Cloud::Container::V1::ClusterManager::Client" + }, + "method": { + "short_name": "FetchClusterUpgradeInfo", + "full_name": "google.container.v1.ClusterManager.FetchClusterUpgradeInfo", + "service": { + "short_name": "ClusterManager", + "full_name": "google.container.v1.ClusterManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "container_v1_generated_ClusterManager_FetchNodePoolUpgradeInfo_sync", + "title": "Snippet for the fetch_node_pool_upgrade_info call in the ClusterManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Container::V1::ClusterManager::Client#fetch_node_pool_upgrade_info.", + "file": "cluster_manager/fetch_node_pool_upgrade_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_node_pool_upgrade_info", + "full_name": "::Google::Cloud::Container::V1::ClusterManager::Client#fetch_node_pool_upgrade_info", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Container::V1::NodePoolUpgradeInfo", + "client": { + "short_name": "ClusterManager::Client", + "full_name": "::Google::Cloud::Container::V1::ClusterManager::Client" + }, + "method": { + "short_name": "FetchNodePoolUpgradeInfo", + "full_name": "google.container.v1.ClusterManager.FetchNodePoolUpgradeInfo", + "service": { + "short_name": "ClusterManager", + "full_name": "google.container.v1.ClusterManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_rest_test.rb b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_rest_test.rb index 487b435c1c43..3ce542fc8f1c 100644 --- a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_rest_test.rb +++ b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_rest_test.rb @@ -346,6 +346,8 @@ def test_update_node_pool containerd_config = {} queued_provisioning = {} storage_pools = ["hello world"] + max_run_duration = {} + flex_start = true update_node_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -361,27 +363,27 @@ def test_update_node_pool end # Use hash object - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools }) do |_result, response| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools do |_result, response| + client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.update_node_pool ::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools) do |_result, response| + client.update_node_pool ::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools }, call_options) do |_result, response| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.update_node_pool(::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools), call_options) do |_result, response| + client.update_node_pool(::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -2057,6 +2059,116 @@ def test_check_autopilot_compatibility end end + def test_fetch_cluster_upgrade_info + # Create test objects. + client_result = ::Google::Cloud::Container::V1::ClusterUpgradeInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + version = "hello world" + + fetch_cluster_upgrade_info_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::Container::V1::ClusterManager::Rest::ServiceStub.stub :transcode_fetch_cluster_upgrade_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_cluster_upgrade_info_client_stub do + # Create client + client = ::Google::Cloud::Container::V1::ClusterManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_cluster_upgrade_info({ name: name, version: version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_cluster_upgrade_info name: name, version: version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_cluster_upgrade_info ::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new(name: name, version: version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_cluster_upgrade_info({ name: name, version: version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_cluster_upgrade_info(::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new(name: name, version: version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_cluster_upgrade_info_client_stub.call_count + end + end + end + + def test_fetch_node_pool_upgrade_info + # Create test objects. + client_result = ::Google::Cloud::Container::V1::NodePoolUpgradeInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + version = "hello world" + + fetch_node_pool_upgrade_info_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::Container::V1::ClusterManager::Rest::ServiceStub.stub :transcode_fetch_node_pool_upgrade_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_node_pool_upgrade_info_client_stub do + # Create client + client = ::Google::Cloud::Container::V1::ClusterManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_node_pool_upgrade_info({ name: name, version: version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_node_pool_upgrade_info name: name, version: version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_node_pool_upgrade_info ::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new(name: name, version: version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_node_pool_upgrade_info({ name: name, version: version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_node_pool_upgrade_info(::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new(name: name, version: version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_node_pool_upgrade_info_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb index 788cbafcad62..5c2f82482729 100644 --- a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb +++ b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb @@ -360,6 +360,8 @@ def test_update_node_pool containerd_config = {} queued_provisioning = {} storage_pools = ["hello world"] + max_run_duration = {} + flex_start = true update_node_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :update_node_pool, name @@ -396,6 +398,9 @@ def test_update_node_pool assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Container::V1::ContainerdConfig), request["containerd_config"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Container::V1::NodePool::QueuedProvisioning), request["queued_provisioning"] assert_equal ["hello world"], request["storage_pools"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["max_run_duration"] + assert_equal true, request["flex_start"] + assert request.has_flex_start? refute_nil options end @@ -406,31 +411,31 @@ def test_update_node_pool end # Use hash object - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools }) do |response, operation| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools do |response, operation| + client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.update_node_pool ::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools) do |response, operation| + client.update_node_pool ::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools }, grpc_options) do |response, operation| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.update_node_pool(::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools), grpc_options) do |response, operation| + client.update_node_pool(::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end @@ -2327,6 +2332,126 @@ def test_check_autopilot_compatibility end end + def test_fetch_cluster_upgrade_info + # Create GRPC objects. + grpc_response = ::Google::Cloud::Container::V1::ClusterUpgradeInfo.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" + version = "hello world" + + fetch_cluster_upgrade_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_cluster_upgrade_info, name + assert_kind_of ::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_cluster_upgrade_info_client_stub do + # Create client + client = ::Google::Cloud::Container::V1::ClusterManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_cluster_upgrade_info({ name: name, version: version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_cluster_upgrade_info name: name, version: version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_cluster_upgrade_info ::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new(name: name, version: version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_cluster_upgrade_info({ name: name, version: version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_cluster_upgrade_info(::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new(name: name, version: version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_cluster_upgrade_info_client_stub.call_rpc_count + end + end + + def test_fetch_node_pool_upgrade_info + # Create GRPC objects. + grpc_response = ::Google::Cloud::Container::V1::NodePoolUpgradeInfo.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" + version = "hello world" + + fetch_node_pool_upgrade_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_node_pool_upgrade_info, name + assert_kind_of ::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_node_pool_upgrade_info_client_stub do + # Create client + client = ::Google::Cloud::Container::V1::ClusterManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_node_pool_upgrade_info({ name: name, version: version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_node_pool_upgrade_info name: name, version: version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_node_pool_upgrade_info ::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new(name: name, version: version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_node_pool_upgrade_info({ name: name, version: version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_node_pool_upgrade_info(::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new(name: name, version: version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_node_pool_upgrade_info_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From 5b13e3cb19d44441503140ab4b68a4db7c992374 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:04:14 -0700 Subject: [PATCH 082/457] chore(main): release google-cloud-iap-v1 1.4.1 (#30492) --- .release-please-manifest.json | 2 +- google-cloud-iap-v1/CHANGELOG.md | 6 ++++++ google-cloud-iap-v1/lib/google/cloud/iap/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.iap.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 33a15b967fcc..5bc23953bdc0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -429,7 +429,7 @@ "google-cloud-gsuite_add_ons-v1+FILLER": "0.0.0", "google-cloud-iap": "1.5.1", "google-cloud-iap+FILLER": "0.0.0", - "google-cloud-iap-v1": "1.4.0", + "google-cloud-iap-v1": "1.4.1", "google-cloud-iap-v1+FILLER": "0.0.0", "google-cloud-ids": "2.0.1", "google-cloud-ids+FILLER": "0.0.0", diff --git a/google-cloud-iap-v1/CHANGELOG.md b/google-cloud-iap-v1/CHANGELOG.md index a7bd11c25798..d9c97e172f37 100644 --- a/google-cloud-iap-v1/CHANGELOG.md +++ b/google-cloud-iap-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.4.1 (2025-06-05) + +#### Documentation + +* Add clarifications on IAP CorsSettings behavior ([#30483](https://github.com/googleapis/google-cloud-ruby/issues/30483)) + ### 1.4.0 (2025-05-12) #### Features diff --git a/google-cloud-iap-v1/lib/google/cloud/iap/v1/version.rb b/google-cloud-iap-v1/lib/google/cloud/iap/v1/version.rb index b943c00af8fb..053ec3ff79f0 100644 --- a/google-cloud-iap-v1/lib/google/cloud/iap/v1/version.rb +++ b/google-cloud-iap-v1/lib/google/cloud/iap/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Iap module V1 - VERSION = "1.4.0" + VERSION = "1.4.1" end end end diff --git a/google-cloud-iap-v1/snippets/snippet_metadata_google.cloud.iap.v1.json b/google-cloud-iap-v1/snippets/snippet_metadata_google.cloud.iap.v1.json index c571f37dab42..1af299c806d1 100644 --- a/google-cloud-iap-v1/snippets/snippet_metadata_google.cloud.iap.v1.json +++ b/google-cloud-iap-v1/snippets/snippet_metadata_google.cloud.iap.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-iap-v1", - "version": "1.4.0", + "version": "1.4.1", "language": "RUBY", "apis": [ { From 1243a60c9b8e3ba3a0d656ed4a6292be18de6ca7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:05:15 -0700 Subject: [PATCH 083/457] chore(main): release google-cloud-dlp-v2 1.11.0 (#30490) --- .release-please-manifest.json | 2 +- google-cloud-dlp-v2/CHANGELOG.md | 11 +++++++++++ .../lib/google/cloud/dlp/v2/version.rb | 2 +- .../snippet_metadata_google.privacy.dlp.v2.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5bc23953bdc0..8e9d9e78dc0b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -335,7 +335,7 @@ "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", "google-cloud-dlp": "1.8.2", "google-cloud-dlp+FILLER": "0.0.0", - "google-cloud-dlp-v2": "1.10.0", + "google-cloud-dlp-v2": "1.11.0", "google-cloud-dlp-v2+FILLER": "0.0.0", "google-cloud-dns": "1.1.0", "google-cloud-dns+FILLER": "0.0.0", diff --git a/google-cloud-dlp-v2/CHANGELOG.md b/google-cloud-dlp-v2/CHANGELOG.md index 6ad5751d93dd..a0e4a085f198 100644 --- a/google-cloud-dlp-v2/CHANGELOG.md +++ b/google-cloud-dlp-v2/CHANGELOG.md @@ -1,5 +1,16 @@ # Release History +### 1.11.0 (2025-06-05) + +#### Features + +* add a project ID to table reference so that org parents can create single table discovery configs. +* add Dataplex Catalog action for discovery configs ([#30482](https://github.com/googleapis/google-cloud-ruby/issues/30482)) +* new fields for data profile finding. +#### Documentation + +* various doc revisions + ### 1.10.0 (2025-05-12) #### Features diff --git a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb index cabb6d4f201f..8fbaeb7d62ad 100644 --- a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb +++ b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Dlp module V2 - VERSION = "1.10.0" + VERSION = "1.11.0" end end end diff --git a/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json b/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json index 7f708ce59c38..d3b7319a88d5 100644 --- a/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json +++ b/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dlp-v2", - "version": "1.10.0", + "version": "1.11.0", "language": "RUBY", "apis": [ { From cb783d43f78029e6c31a0d0b59804b18549d96e1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:05:42 -0700 Subject: [PATCH 084/457] chore(main): release google-cloud-container-v1beta1 0.47.0 (#30489) --- .release-please-manifest.json | 2 +- google-cloud-container-v1beta1/CHANGELOG.md | 66 +++++++++++++++++++ .../google/cloud/container/v1beta1/version.rb | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- 4 files changed, 69 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8e9d9e78dc0b..72cb226f9107 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -245,7 +245,7 @@ "google-cloud-container+FILLER": "0.0.0", "google-cloud-container-v1": "1.7.0", "google-cloud-container-v1+FILLER": "0.0.0", - "google-cloud-container-v1beta1": "0.46.0", + "google-cloud-container-v1beta1": "0.47.0", "google-cloud-container-v1beta1+FILLER": "0.0.0", "google-cloud-container_analysis": "1.5.2", "google-cloud-container_analysis+FILLER": "0.0.0", diff --git a/google-cloud-container-v1beta1/CHANGELOG.md b/google-cloud-container-v1beta1/CHANGELOG.md index 183d2f58126f..1c08b6236d68 100644 --- a/google-cloud-container-v1beta1/CHANGELOG.md +++ b/google-cloud-container-v1beta1/CHANGELOG.md @@ -1,5 +1,71 @@ # Release History +### 0.47.0 (2025-06-05) + +#### Features + +* add allowed_unsafe_sysctls in NodeKubeletConfig +* add alpha_cluster_feature_gates in Cluster +* add anonymous_authentication_config in Cluster +* add auto_monitoring_config in ManagedPrometheusConfig +* add autopilot_compatibility_auditing_enabled in WorkloadPolicyConfig +* add ClusterUpgradeInfo +* add confidential_instance_type in ConfidentialNodes +* add container_log_max_files in NodeKubeletConfig +* add container_log_max_size in NodeKubeletConfig +* add control_plane_endpoints_config in Cluster +* add data_cache_count in EphemeralStorageLocalSsdConfig +* add desired_anonymous_authentication_config in ClusterUpdate +* add desired_compliance_posture_config in ClusterUpdate +* add desired_control_plane_endpoints_config in ClusterUpdate +* add desired_default_enable_private_nodes in ClusterUpdate +* add desired_disable_l4_lb_firewall_reconciliation in ClusterUpdate +* add desired_enterprise_config in ClusterUpdate +* add desired_node_pool_auto_config_linux_node_config in ClusterUpdate +* add desired_pod_autoscaling in ClusterUpdate +* add desired_rbac_binding_config in ClusterUpdate +* add disable_l4_lb_firewall_reconciliation in NetworkConfig +* add effective_cgroup_mode in NodeConfig +* add event_type in UpgradeInfoEvent +* add extended_support_end_time in UpgradeInfoEvent +* add FetchClusterUpgradeInfoRequest +* add FetchNodePoolUpgradeInfoRequest +* add flex_start in NodeConfig +* add flex_start in UpdateNodePoolRequest +* add high_scale_checkpointing_config in AddonsConfig +* add image_gc_high_threshold_percent in NodeKubeletConfig +* add image_gc_low_threshold_percent in NodeKubeletConfig +* add image_maximum_gc_age in NodeKubeletConfig +* add image_minimum_gc_age in NodeKubeletConfig +* add JOBSET in MonitoringComponentConfig.Component +* add KCP_HPA in LoggingComponentConfig.Component +* add linux_node_config in NodePoolAutoConfig +* add local_ssd_encryption_mode in NodeConfig +* add max_run_duration in NodeConfig +* add max_run_duration in UpdateNodePoolRequest +* add MemoryManager +* add mitigated_versions in SecurityBulletinEvent +* add NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS in StatusCondition.Code +* add NodePoolUpgradeInfo +* add parallelstore_csi_driver_config in AddonsConfig +* add performance_monitoring_unit in AdvancedMachineFeatures +* add pod_autoscaling in Cluster +* add private_endpoint_enforcement_enabled in MasterAuthorizedNetworksConfig +* add rbac_binding_config in Cluster +* add standard_support_end_time in UpgradeInfoEvent +* add storage_pools in NodeConfig +* add storage_pools in UpdateNodePoolRequest +* add topology_manager in NodeKubeletConfig ([#30479](https://github.com/googleapis/google-cloud-ruby/issues/30479)) +* add TopologyManager +* add UPGRADE_INFO_EVENT in NotificationConfig.EventType +* add upgrade_target_version in ReleaseChannelConfig +* add UpgradeDetails +* add user_managed_keys_config in Cluster +* add user_managed_keys_config in ClusterUpdate +#### Documentation + +* Minor documentation updates + ### 0.46.0 (2025-05-12) #### Features diff --git a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/version.rb b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/version.rb index 603503b0def8..63afd8a89411 100644 --- a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/version.rb +++ b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Container module V1beta1 - VERSION = "0.46.0" + VERSION = "0.47.0" end end end diff --git a/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json b/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json index 4afea57e424a..88ec33f7b9d0 100644 --- a/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json +++ b/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-container-v1beta1", - "version": "0.46.0", + "version": "0.47.0", "language": "RUBY", "apis": [ { From b2c981fb1e91ae4bacf9dbfc65eb1682e53554c4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:06:03 -0700 Subject: [PATCH 085/457] chore(main): release google-cloud-parallelstore-v1beta 0.9.1 (#30487) --- .release-please-manifest.json | 2 +- google-cloud-parallelstore-v1beta/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/parallelstore/v1beta/version.rb | 2 +- .../snippet_metadata_google.cloud.parallelstore.v1beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 72cb226f9107..ab6eb488238d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -569,7 +569,7 @@ "google-cloud-parallelstore+FILLER": "0.0.0", "google-cloud-parallelstore-v1": "1.2.0", "google-cloud-parallelstore-v1+FILLER": "0.0.0", - "google-cloud-parallelstore-v1beta": "0.9.0", + "google-cloud-parallelstore-v1beta": "0.9.1", "google-cloud-parallelstore-v1beta+FILLER": "0.0.0", "google-cloud-parameter_manager": "0.1.2", "google-cloud-parameter_manager+FILLER": "0.0.0", diff --git a/google-cloud-parallelstore-v1beta/CHANGELOG.md b/google-cloud-parallelstore-v1beta/CHANGELOG.md index 88097b101a26..367a30fbb5ea 100644 --- a/google-cloud-parallelstore-v1beta/CHANGELOG.md +++ b/google-cloud-parallelstore-v1beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.9.1 (2025-06-05) + +#### Documentation + +* fix various typos in commentary ([#30486](https://github.com/googleapis/google-cloud-ruby/issues/30486)) + ### 0.9.0 (2025-05-12) #### Features diff --git a/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/version.rb b/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/version.rb index d85dd94bf47c..6a7bda8736d2 100644 --- a/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/version.rb +++ b/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Parallelstore module V1beta - VERSION = "0.9.0" + VERSION = "0.9.1" end end end diff --git a/google-cloud-parallelstore-v1beta/snippets/snippet_metadata_google.cloud.parallelstore.v1beta.json b/google-cloud-parallelstore-v1beta/snippets/snippet_metadata_google.cloud.parallelstore.v1beta.json index d2ee9605be1d..5e72ab36be61 100644 --- a/google-cloud-parallelstore-v1beta/snippets/snippet_metadata_google.cloud.parallelstore.v1beta.json +++ b/google-cloud-parallelstore-v1beta/snippets/snippet_metadata_google.cloud.parallelstore.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-parallelstore-v1beta", - "version": "0.9.0", + "version": "0.9.1", "language": "RUBY", "apis": [ { From d67a318ddf0e2aa1ba74bfaa6b004984b8eb23df Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:16:43 -0700 Subject: [PATCH 086/457] chore(main): release google-cloud-container-v1 1.8.0 (#30488) --- .release-please-manifest.json | 2 +- google-cloud-container-v1/CHANGELOG.md | 45 +++++++++++++++++++ .../lib/google/cloud/container/v1/version.rb | 2 +- .../snippet_metadata_google.container.v1.json | 2 +- 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ab6eb488238d..8fc96841114e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -243,7 +243,7 @@ "google-cloud-contact_center_insights-v1+FILLER": "0.0.0", "google-cloud-container": "2.0.2", "google-cloud-container+FILLER": "0.0.0", - "google-cloud-container-v1": "1.7.0", + "google-cloud-container-v1": "1.8.0", "google-cloud-container-v1+FILLER": "0.0.0", "google-cloud-container-v1beta1": "0.47.0", "google-cloud-container-v1beta1+FILLER": "0.0.0", diff --git a/google-cloud-container-v1/CHANGELOG.md b/google-cloud-container-v1/CHANGELOG.md index 95b78eaf1ffa..83691755ee3b 100644 --- a/google-cloud-container-v1/CHANGELOG.md +++ b/google-cloud-container-v1/CHANGELOG.md @@ -1,5 +1,50 @@ # Release History +### 1.8.0 (2025-06-05) + +#### Features + +* add allowed_unsafe_sysctls in NodeKubeletConfig +* add alpha_cluster_feature_gates in Cluster +* add auto_monitoring_config in ManagedPrometheusConfig +* add autopilot_compatibility_auditing_enabled in WorkloadPolicyConfig +* add ClusterUpgradeInfo +* add confidential_instance_type in ConfidentialNodes +* add container_log_max_files in NodeKubeletConfig +* add container_log_max_size in NodeKubeletConfig +* add data_cache_count in EphemeralStorageLocalSsdConfig +* add desired_anonymous_authentication_config in ClusterUpdate +* add desired_disable_l4_lb_firewall_reconciliation in ClusterUpdate +* add desired_pod_autoscaling in ClusterUpdate +* add disable_l4_lb_firewall_reconciliation in NetworkConfig +* add event_type in UpgradeInfoEvent +* add extended_support_end_time in UpgradeInfoEvent +* add FetchClusterUpgradeInfoRequest +* add FetchNodePoolUpgradeInfoRequest +* add flex_start in NodeConfig +* add flex_start in UpdateNodePoolRequest +* add high_scale_checkpointing_config in AddonsConfig +* add image_gc_high_threshold_percent in NodeKubeletConfig +* add image_gc_low_threshold_percent in NodeKubeletConfig +* add image_maximum_gc_age in NodeKubeletConfig +* add image_minimum_gc_age in NodeKubeletConfig +* add JOBSET in MonitoringComponentConfig.Component +* add KCP_HPA in LoggingComponentConfig.Component +* add max_run_duration in NodeConfig +* add max_run_duration in UpdateNodePoolRequest +* add mitigated_versions in SecurityBulletinEvent +* add NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS in StatusCondition.Code +* add NodePoolUpgradeInfo +* add performance_monitoring_unit in AdvancedMachineFeatures +* add pod_autoscaling in Cluster +* add standard_support_end_time in UpgradeInfoEvent +* add topology_manager in NodeKubeletConfig ([#30442](https://github.com/googleapis/google-cloud-ruby/issues/30442)) +* add UPGRADE_INFO_EVENT in NotificationConfig.EventType +* add UpgradeDetails +#### Documentation + +* Minor documentation updates + ### 1.7.0 (2025-05-12) #### Features diff --git a/google-cloud-container-v1/lib/google/cloud/container/v1/version.rb b/google-cloud-container-v1/lib/google/cloud/container/v1/version.rb index c292533fcb0c..a19d0c3fe91d 100644 --- a/google-cloud-container-v1/lib/google/cloud/container/v1/version.rb +++ b/google-cloud-container-v1/lib/google/cloud/container/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Container module V1 - VERSION = "1.7.0" + VERSION = "1.8.0" end end end diff --git a/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json b/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json index 2c719487006d..7e10a9c3f80d 100644 --- a/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json +++ b/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-container-v1", - "version": "1.7.0", + "version": "1.8.0", "language": "RUBY", "apis": [ { From 3dda95018d484191fbc0e7b82eaf9fabfdae615b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:17:49 -0700 Subject: [PATCH 087/457] chore(main): release google-cloud-spanner-admin-database-v1 1.8.0 (#30463) --- .release-please-manifest.json | 2 +- google-cloud-spanner-admin-database-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/spanner/admin/database/v1/version.rb | 2 +- .../snippet_metadata_google.spanner.admin.database.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8fc96841114e..a8df2d2ecdf8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -715,7 +715,7 @@ "google-cloud-shell+FILLER": "0.0.0", "google-cloud-shell-v1": "1.3.0", "google-cloud-shell-v1+FILLER": "0.0.0", - "google-cloud-spanner-admin-database-v1": "1.7.0", + "google-cloud-spanner-admin-database-v1": "1.8.0", "google-cloud-spanner-admin-database-v1+FILLER": "0.0.0", "google-cloud-spanner-admin-instance-v1": "2.1.0", "google-cloud-spanner-admin-instance-v1+FILLER": "0.0.0", diff --git a/google-cloud-spanner-admin-database-v1/CHANGELOG.md b/google-cloud-spanner-admin-database-v1/CHANGELOG.md index 80758d7ffc80..0dfe3d027acc 100644 --- a/google-cloud-spanner-admin-database-v1/CHANGELOG.md +++ b/google-cloud-spanner-admin-database-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.8.0 (2025-06-05) + +#### Features + +* Support throughput_mode in UpdateDatabaseDdlRequest to be used by Spanner Migration Tool + ### 1.7.0 (2025-05-12) #### Features diff --git a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb index 25fa6231473c..4229d0dafa84 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb @@ -23,7 +23,7 @@ module Spanner module Admin module Database module V1 - VERSION = "1.7.0" + VERSION = "1.8.0" end end end diff --git a/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json b/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json index cd699ac828ec..fac73b6b4db4 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json +++ b/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-spanner-admin-database-v1", - "version": "1.7.0", + "version": "1.8.0", "language": "RUBY", "apis": [ { From 5930e81edcdd7cd2d4743fb4305574774076df91 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:22:35 -0700 Subject: [PATCH 088/457] feat: add CMEK config service (#30498) feat: add identity mapping service feat: add user license config service feat: add HealthcareFhirConfig to FHIR data store feat: add ConnectorRunErrorContext to error log feat: support structured content for chunk feat: support ACL data store and document feat: add more options for layout parser config feat: support media recommendation engine feat: enable claim level score for grounding feat: add custom search operators for Workspace search feat: add more indexing state for site search engine docs: keep the API doc up-to-date with recent changes --- .../.owlbot-manifest.json | 65 + .../AUTHENTICATION.md | 8 +- google-cloud-discovery_engine-v1/README.md | 8 +- google-cloud-discovery_engine-v1/Rakefile | 4 +- .../gapic_metadata.json | 92 ++ .../lib/google/cloud/discovery_engine/v1.rb | 7 +- .../v1/cmek_config_service.rb | 56 + .../v1/cmek_config_service/client.rb | 803 ++++++++++++ .../v1/cmek_config_service/credentials.rb | 47 + .../v1/cmek_config_service/operations.rb | 813 ++++++++++++ .../v1/cmek_config_service/paths.rb | 135 ++ .../v1/cmek_config_service/rest.rb | 53 + .../v1/cmek_config_service/rest/client.rb | 749 +++++++++++ .../v1/cmek_config_service/rest/operations.rb | 1148 ++++++++++++++++ .../cmek_config_service/rest/service_stub.rb | 341 +++++ .../v1/completion_service/rest/operations.rb | 8 + .../v1/control_service/paths.rb | 53 + .../v1/data_store_service/client.rb | 12 +- .../v1/data_store_service/paths.rb | 104 ++ .../v1/data_store_service/rest/client.rb | 12 +- .../v1/data_store_service/rest/operations.rb | 8 + .../v1/document_service/rest/operations.rb | 8 + .../v1/engine_service/rest/operations.rb | 8 + .../v1/identity_mapping_store_service.rb | 56 + .../identity_mapping_store_service/client.rb | 1160 +++++++++++++++++ .../credentials.rb | 47 + .../operations.rb | 813 ++++++++++++ .../identity_mapping_store_service/paths.rb | 154 +++ .../v1/identity_mapping_store_service/rest.rb | 53 + .../rest/client.rb | 1085 +++++++++++++++ .../rest/operations.rb | 1148 ++++++++++++++++ .../rest/service_stub.rb | 511 ++++++++ .../v1/project_service/rest/operations.rb | 8 + .../google/cloud/discovery_engine/v1/rest.rb | 5 +- .../v1/schema_service/rest/operations.rb | 8 + .../search_tuning_service/rest/operations.rb | 8 + .../rest/operations.rb | 8 + .../v1/user_event_service/rest/operations.rb | 8 + .../v1/user_license_service.rb | 56 + .../v1/user_license_service/client.rb | 630 +++++++++ .../v1/user_license_service/credentials.rb | 47 + .../v1/user_license_service/operations.rb | 813 ++++++++++++ .../v1/user_license_service/paths.rb | 71 + .../v1/user_license_service/rest.rb | 53 + .../v1/user_license_service/rest/client.rb | 590 +++++++++ .../user_license_service/rest/operations.rb | 1148 ++++++++++++++++ .../user_license_service/rest/service_stub.rb | 204 +++ .../cloud/discoveryengine/v1/answer_pb.rb | 2 +- .../cloud/discoveryengine/v1/chunk_pb.rb | 5 +- .../v1/cmek_config_service_pb.rb | 61 + .../v1/cmek_config_service_services_pb.rb | 55 + .../cloud/discoveryengine/v1/common_pb.rb | 4 +- .../v1/conversational_search_service_pb.rb | 2 +- .../cloud/discoveryengine/v1/data_store_pb.rb | 5 +- .../v1/data_store_service_pb.rb | 2 +- .../cloud/discoveryengine/v1/document_pb.rb | 6 +- .../v1/document_processing_config_pb.rb | 2 +- .../cloud/discoveryengine/v1/engine_pb.rb | 8 +- .../v1/grounded_generation_service_pb.rb | 2 +- .../cloud/discoveryengine/v1/grounding_pb.rb | 2 +- .../v1/identity_mapping_store_pb.rb | 48 + .../v1/identity_mapping_store_service_pb.rb | 68 + ...ntity_mapping_store_service_services_pb.rb | 58 + .../discoveryengine/v1/search_service_pb.rb | 2 +- .../v1/site_search_engine_pb.rb | 2 +- .../discoveryengine/v1/user_license_pb.rb | 48 + .../v1/user_license_service_pb.rb | 61 + .../v1/user_license_service_services_pb.rb | 48 + .../google/cloud/discoveryengine/v1/answer.rb | 17 + .../google/cloud/discoveryengine/v1/chunk.rb | 54 + .../discoveryengine/v1/cmek_config_service.rb | 222 ++++ .../google/cloud/discoveryengine/v1/common.rb | 55 + .../cloud/discoveryengine/v1/control.rb | 4 +- .../v1/conversational_search_service.rb | 3 + .../cloud/discoveryengine/v1/data_store.rb | 44 +- .../discoveryengine/v1/data_store_service.rb | 12 + .../cloud/discoveryengine/v1/document.rb | 103 +- .../v1/document_processing_config.rb | 23 + .../google/cloud/discoveryengine/v1/engine.rb | 146 ++- .../v1/grounded_generation_service.rb | 8 + .../cloud/discoveryengine/v1/grounding.rb | 9 + .../v1/identity_mapping_store.rb | 81 ++ .../v1/identity_mapping_store_service.rb | 279 ++++ .../discoveryengine/v1/search_service.rb | 6 + .../discoveryengine/v1/site_search_engine.rb | 6 + .../cloud/discoveryengine/v1/user_license.rb | 85 ++ .../v1/user_license_service.rb | 153 +++ .../cmek_config_service/delete_cmek_config.rb | 54 + .../cmek_config_service/get_cmek_config.rb | 47 + .../cmek_config_service/list_cmek_configs.rb | 47 + .../cmek_config_service/update_cmek_config.rb | 54 + .../create_identity_mapping_store.rb | 47 + .../delete_identity_mapping_store.rb | 54 + .../get_identity_mapping_store.rb | 47 + .../import_identity_mappings.rb | 54 + .../list_identity_mapping_stores.rb | 51 + .../list_identity_mappings.rb | 51 + .../purge_identity_mappings.rb | 54 + ...adata_google.cloud.discoveryengine.v1.json | 520 ++++++++ .../batch_update_user_licenses.rb | 54 + .../list_user_licenses.rb | 51 + .../v1/cmek_config_service_operations_test.rb | 398 ++++++ .../v1/cmek_config_service_paths_test.rb | 94 ++ .../v1/cmek_config_service_rest_test.rb | 316 +++++ .../v1/cmek_config_service_test.rb | 343 +++++ .../v1/control_service_paths_test.rb | 15 + .../v1/data_store_service_paths_test.rb | 51 + .../v1/data_store_service_rest_test.rb | 11 +- .../v1/data_store_service_test.rb | 13 +- ...y_mapping_store_service_operations_test.rb | 398 ++++++ ...entity_mapping_store_service_paths_test.rb | 106 ++ ...dentity_mapping_store_service_rest_test.rb | 488 +++++++ .../v1/identity_mapping_store_service_test.rb | 556 ++++++++ .../user_license_service_operations_test.rb | 398 ++++++ .../v1/user_license_service_paths_test.rb | 67 + .../v1/user_license_service_rest_test.rb | 212 +++ .../v1/user_license_service_test.rb | 236 ++++ 117 files changed, 19863 insertions(+), 51 deletions(-) create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/credentials.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/operations.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/paths.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/operations.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/service_stub.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/operations.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/operations.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/service_stub.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/credentials.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/operations.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/paths.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/operations.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/service_stub.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/cmek_config_service_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/cmek_config_service_services_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_service_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_service_services_pb.rb create mode 100644 google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/cmek_config_service.rb create mode 100644 google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store.rb create mode 100644 google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store_service.rb create mode 100644 google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_license.rb create mode 100644 google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_license_service.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/cmek_config_service/delete_cmek_config.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/cmek_config_service/get_cmek_config.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/cmek_config_service/list_cmek_configs.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/cmek_config_service/update_cmek_config.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/create_identity_mapping_store.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/delete_identity_mapping_store.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/get_identity_mapping_store.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/import_identity_mappings.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/list_identity_mapping_stores.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/list_identity_mappings.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/purge_identity_mappings.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/user_license_service/batch_update_user_licenses.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/user_license_service/list_user_licenses.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_operations_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_paths_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_rest_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_operations_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_paths_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_rest_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_operations_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_paths_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_rest_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_test.rb diff --git a/google-cloud-discovery_engine-v1/.owlbot-manifest.json b/google-cloud-discovery_engine-v1/.owlbot-manifest.json index ca7cb0931c22..082d96f2849b 100644 --- a/google-cloud-discovery_engine-v1/.owlbot-manifest.json +++ b/google-cloud-discovery_engine-v1/.owlbot-manifest.json @@ -15,6 +15,15 @@ "google-cloud-discovery_engine-v1.gemspec", "lib/google-cloud-discovery_engine-v1.rb", "lib/google/cloud/discovery_engine/v1.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service/client.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service/credentials.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service/operations.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service/paths.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service/rest.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/client.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/operations.rb", + "lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/service_stub.rb", "lib/google/cloud/discovery_engine/v1/completion_service.rb", "lib/google/cloud/discovery_engine/v1/completion_service/client.rb", "lib/google/cloud/discovery_engine/v1/completion_service/credentials.rb", @@ -72,6 +81,15 @@ "lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb", "lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb", "lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/operations.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/operations.rb", + "lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/service_stub.rb", "lib/google/cloud/discovery_engine/v1/project_service.rb", "lib/google/cloud/discovery_engine/v1/project_service/client.rb", "lib/google/cloud/discovery_engine/v1/project_service/credentials.rb", @@ -146,9 +164,20 @@ "lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb", "lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb", "lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service/client.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service/credentials.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service/operations.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service/paths.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service/rest.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service/rest/client.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service/rest/operations.rb", + "lib/google/cloud/discovery_engine/v1/user_license_service/rest/service_stub.rb", "lib/google/cloud/discovery_engine/v1/version.rb", "lib/google/cloud/discoveryengine/v1/answer_pb.rb", "lib/google/cloud/discoveryengine/v1/chunk_pb.rb", + "lib/google/cloud/discoveryengine/v1/cmek_config_service_pb.rb", + "lib/google/cloud/discoveryengine/v1/cmek_config_service_services_pb.rb", "lib/google/cloud/discoveryengine/v1/common_pb.rb", "lib/google/cloud/discoveryengine/v1/completion_pb.rb", "lib/google/cloud/discoveryengine/v1/completion_service_pb.rb", @@ -173,6 +202,9 @@ "lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb", "lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb", "lib/google/cloud/discoveryengine/v1/grounding_pb.rb", + "lib/google/cloud/discoveryengine/v1/identity_mapping_store_pb.rb", + "lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_pb.rb", + "lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb.rb", "lib/google/cloud/discoveryengine/v1/import_config_pb.rb", "lib/google/cloud/discoveryengine/v1/project_pb.rb", "lib/google/cloud/discoveryengine/v1/project_service_pb.rb", @@ -200,6 +232,9 @@ "lib/google/cloud/discoveryengine/v1/user_event_pb.rb", "lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb", "lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb", + "lib/google/cloud/discoveryengine/v1/user_license_pb.rb", + "lib/google/cloud/discoveryengine/v1/user_license_service_pb.rb", + "lib/google/cloud/discoveryengine/v1/user_license_service_services_pb.rb", "proto_docs/README.md", "proto_docs/google/api/client.rb", "proto_docs/google/api/field_behavior.rb", @@ -208,6 +243,7 @@ "proto_docs/google/api/resource.rb", "proto_docs/google/cloud/discoveryengine/v1/answer.rb", "proto_docs/google/cloud/discoveryengine/v1/chunk.rb", + "proto_docs/google/cloud/discoveryengine/v1/cmek_config_service.rb", "proto_docs/google/cloud/discoveryengine/v1/common.rb", "proto_docs/google/cloud/discoveryengine/v1/completion.rb", "proto_docs/google/cloud/discoveryengine/v1/completion_service.rb", @@ -225,6 +261,8 @@ "proto_docs/google/cloud/discoveryengine/v1/engine_service.rb", "proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb", "proto_docs/google/cloud/discoveryengine/v1/grounding.rb", + "proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store.rb", + "proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store_service.rb", "proto_docs/google/cloud/discoveryengine/v1/import_config.rb", "proto_docs/google/cloud/discoveryengine/v1/project.rb", "proto_docs/google/cloud/discoveryengine/v1/project_service.rb", @@ -243,6 +281,8 @@ "proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb", "proto_docs/google/cloud/discoveryengine/v1/user_event.rb", "proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb", + "proto_docs/google/cloud/discoveryengine/v1/user_license.rb", + "proto_docs/google/cloud/discoveryengine/v1/user_license_service.rb", "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", "proto_docs/google/protobuf/duration.rb", @@ -253,6 +293,10 @@ "proto_docs/google/rpc/status.rb", "proto_docs/google/type/date.rb", "snippets/Gemfile", + "snippets/cmek_config_service/delete_cmek_config.rb", + "snippets/cmek_config_service/get_cmek_config.rb", + "snippets/cmek_config_service/list_cmek_configs.rb", + "snippets/cmek_config_service/update_cmek_config.rb", "snippets/completion_service/complete_query.rb", "snippets/completion_service/import_completion_suggestions.rb", "snippets/completion_service/import_suggestion_deny_list_entries.rb", @@ -298,6 +342,13 @@ "snippets/grounded_generation_service/check_grounding.rb", "snippets/grounded_generation_service/generate_grounded_content.rb", "snippets/grounded_generation_service/stream_generate_grounded_content.rb", + "snippets/identity_mapping_store_service/create_identity_mapping_store.rb", + "snippets/identity_mapping_store_service/delete_identity_mapping_store.rb", + "snippets/identity_mapping_store_service/get_identity_mapping_store.rb", + "snippets/identity_mapping_store_service/import_identity_mappings.rb", + "snippets/identity_mapping_store_service/list_identity_mapping_stores.rb", + "snippets/identity_mapping_store_service/list_identity_mappings.rb", + "snippets/identity_mapping_store_service/purge_identity_mappings.rb", "snippets/project_service/provision_project.rb", "snippets/rank_service/rank.rb", "snippets/recommendation_service/recommend.rb", @@ -331,6 +382,12 @@ "snippets/user_event_service/import_user_events.rb", "snippets/user_event_service/purge_user_events.rb", "snippets/user_event_service/write_user_event.rb", + "snippets/user_license_service/batch_update_user_licenses.rb", + "snippets/user_license_service/list_user_licenses.rb", + "test/google/cloud/discovery_engine/v1/cmek_config_service_operations_test.rb", + "test/google/cloud/discovery_engine/v1/cmek_config_service_paths_test.rb", + "test/google/cloud/discovery_engine/v1/cmek_config_service_rest_test.rb", + "test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb", "test/google/cloud/discovery_engine/v1/completion_service_operations_test.rb", "test/google/cloud/discovery_engine/v1/completion_service_paths_test.rb", "test/google/cloud/discovery_engine/v1/completion_service_rest_test.rb", @@ -356,6 +413,10 @@ "test/google/cloud/discovery_engine/v1/grounded_generation_service_paths_test.rb", "test/google/cloud/discovery_engine/v1/grounded_generation_service_rest_test.rb", "test/google/cloud/discovery_engine/v1/grounded_generation_service_test.rb", + "test/google/cloud/discovery_engine/v1/identity_mapping_store_service_operations_test.rb", + "test/google/cloud/discovery_engine/v1/identity_mapping_store_service_paths_test.rb", + "test/google/cloud/discovery_engine/v1/identity_mapping_store_service_rest_test.rb", + "test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb", "test/google/cloud/discovery_engine/v1/project_service_operations_test.rb", "test/google/cloud/discovery_engine/v1/project_service_paths_test.rb", "test/google/cloud/discovery_engine/v1/project_service_rest_test.rb", @@ -388,6 +449,10 @@ "test/google/cloud/discovery_engine/v1/user_event_service_paths_test.rb", "test/google/cloud/discovery_engine/v1/user_event_service_rest_test.rb", "test/google/cloud/discovery_engine/v1/user_event_service_test.rb", + "test/google/cloud/discovery_engine/v1/user_license_service_operations_test.rb", + "test/google/cloud/discovery_engine/v1/user_license_service_paths_test.rb", + "test/google/cloud/discovery_engine/v1/user_license_service_rest_test.rb", + "test/google/cloud/discovery_engine/v1/user_license_service_test.rb", "test/helper.rb" ], "static": [ diff --git a/google-cloud-discovery_engine-v1/AUTHENTICATION.md b/google-cloud-discovery_engine-v1/AUTHENTICATION.md index 376858e8e1f7..33d159012e26 100644 --- a/google-cloud-discovery_engine-v1/AUTHENTICATION.md +++ b/google-cloud-discovery_engine-v1/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/discovery_engine/v1" -client = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new do |config| +client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients: ```ruby require "google/cloud/discovery_engine/v1" -::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.configure do |config| +::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new +client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/discovery_engine/v1" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new +client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new ``` ### Local ADC file diff --git a/google-cloud-discovery_engine-v1/README.md b/google-cloud-discovery_engine-v1/README.md index 5e7d69df1089..63db707810c4 100644 --- a/google-cloud-discovery_engine-v1/README.md +++ b/google-cloud-discovery_engine-v1/README.md @@ -31,9 +31,9 @@ In order to use this library, you first need to go through the following steps: ```ruby require "google/cloud/discovery_engine/v1" -client = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new -request = ::Google::Cloud::DiscoveryEngine::V1::CompleteQueryRequest.new # (request fields as keyword arguments...) -response = client.complete_query request +client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new +request = ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new # (request fields as keyword arguments...) +response = client.update_cmek_config request ``` View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest) @@ -74,7 +74,7 @@ constructing a client object. For example: require "google/cloud/discovery_engine/v1" require "logger" -client = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new do |config| +client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| config.logger = Logger.new "my-app.log" end ``` diff --git a/google-cloud-discovery_engine-v1/Rakefile b/google-cloud-discovery_engine-v1/Rakefile index 1d789c465d6d..b23e2b1eb863 100644 --- a/google-cloud-discovery_engine-v1/Rakefile +++ b/google-cloud-discovery_engine-v1/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/discovery_engine/v1/completion_service/credentials" - ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Credentials.env_vars.each do |path| + require "google/cloud/discovery_engine/v1/cmek_config_service/credentials" + ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-discovery_engine-v1/gapic_metadata.json b/google-cloud-discovery_engine-v1/gapic_metadata.json index 1964aa496867..cc167336c413 100644 --- a/google-cloud-discovery_engine-v1/gapic_metadata.json +++ b/google-cloud-discovery_engine-v1/gapic_metadata.json @@ -5,6 +5,35 @@ "protoPackage": "google.cloud.discoveryengine.v1", "libraryPackage": "::Google::Cloud::DiscoveryEngine::V1", "services": { + "CmekConfigService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client", + "rpcs": { + "UpdateCmekConfig": { + "methods": [ + "update_cmek_config" + ] + }, + "GetCmekConfig": { + "methods": [ + "get_cmek_config" + ] + }, + "ListCmekConfigs": { + "methods": [ + "list_cmek_configs" + ] + }, + "DeleteCmekConfig": { + "methods": [ + "delete_cmek_config" + ] + } + } + } + } + }, "CompletionService": { "clients": { "grpc": { @@ -312,6 +341,50 @@ } } }, + "IdentityMappingStoreService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client", + "rpcs": { + "CreateIdentityMappingStore": { + "methods": [ + "create_identity_mapping_store" + ] + }, + "GetIdentityMappingStore": { + "methods": [ + "get_identity_mapping_store" + ] + }, + "DeleteIdentityMappingStore": { + "methods": [ + "delete_identity_mapping_store" + ] + }, + "ImportIdentityMappings": { + "methods": [ + "import_identity_mappings" + ] + }, + "PurgeIdentityMappings": { + "methods": [ + "purge_identity_mappings" + ] + }, + "ListIdentityMappings": { + "methods": [ + "list_identity_mappings" + ] + }, + "ListIdentityMappingStores": { + "methods": [ + "list_identity_mapping_stores" + ] + } + } + } + } + }, "ProjectService": { "clients": { "grpc": { @@ -533,6 +606,25 @@ } } } + }, + "UserLicenseService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client", + "rpcs": { + "ListUserLicenses": { + "methods": [ + "list_user_licenses" + ] + }, + "BatchUpdateUserLicenses": { + "methods": [ + "batch_update_user_licenses" + ] + } + } + } + } } } } diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1.rb index bb972e23316e..aaf0d19c323f 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1.rb @@ -16,6 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/discovery_engine/v1/cmek_config_service" require "google/cloud/discovery_engine/v1/completion_service" require "google/cloud/discovery_engine/v1/control_service" require "google/cloud/discovery_engine/v1/search_service" @@ -24,6 +25,7 @@ require "google/cloud/discovery_engine/v1/document_service" require "google/cloud/discovery_engine/v1/engine_service" require "google/cloud/discovery_engine/v1/grounded_generation_service" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service" require "google/cloud/discovery_engine/v1/project_service" require "google/cloud/discovery_engine/v1/rank_service" require "google/cloud/discovery_engine/v1/recommendation_service" @@ -32,6 +34,7 @@ require "google/cloud/discovery_engine/v1/serving_config_service" require "google/cloud/discovery_engine/v1/site_search_engine_service" require "google/cloud/discovery_engine/v1/user_event_service" +require "google/cloud/discovery_engine/v1/user_license_service" require "google/cloud/discovery_engine/v1/version" module Google @@ -43,12 +46,12 @@ module DiscoveryEngine # @example Load this package, including all its services, and instantiate a gRPC client # # require "google/cloud/discovery_engine/v1" - # client = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new # # @example Load this package, including all its services, and instantiate a REST client # # require "google/cloud/discovery_engine/v1" - # client = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Rest::Client.new + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new # module V1 end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service.rb new file mode 100644 index 000000000000..d203d9dd35b8 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/cmek_config_service/credentials" +require "google/cloud/discovery_engine/v1/cmek_config_service/paths" +require "google/cloud/discovery_engine/v1/cmek_config_service/operations" +require "google/cloud/discovery_engine/v1/cmek_config_service/client" +require "google/cloud/discovery_engine/v1/cmek_config_service/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing CMEK related tasks + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/discovery_engine/v1/cmek_config_service" + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/discovery_engine/v1/cmek_config_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # + module CmekConfigService + end + end + end + end +end + +helper_path = ::File.join __dir__, "cmek_config_service", "helpers.rb" +require "google/cloud/discovery_engine/v1/cmek_config_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/client.rb new file mode 100644 index 000000000000..b79197ecba7b --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/client.rb @@ -0,0 +1,803 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/cmek_config_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module CmekConfigService + ## + # Client for the CmekConfigService service. + # + # Service for managing CMEK related tasks + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cmek_config_service_stub + + ## + # Configure the CmekConfigService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CmekConfigService clients + # ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CmekConfigService 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::DiscoveryEngine::V1::CmekConfigService::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 + @cmek_config_service_stub.universe_domain + end + + ## + # Create a new CmekConfigService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CmekConfigService 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/discoveryengine/v1/cmek_config_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cmek_config_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::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 + ) + + @cmek_config_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @cmek_config_service_stub.endpoint + config.universe_domain = @cmek_config_service_stub.universe_domain + config.logger = @cmek_config_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cmek_config_service_stub.logger + end + + # Service calls + + ## + # Provisions a CMEK key for use in a location of a customer's project. + # This method will also conduct location validation on the provided + # cmekConfig to make sure the key is valid and can be used in the + # selected location. + # + # @overload update_cmek_config(request, options = nil) + # Pass arguments to `update_cmek_config` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest, ::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 update_cmek_config(config: nil, set_default: nil) + # Pass arguments to `update_cmek_config` 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 config [::Google::Cloud::DiscoveryEngine::V1::CmekConfig, ::Hash] + # Required. The CmekConfig resource. + # @param set_default [::Boolean] + # Set the following CmekConfig as the default to be used for child + # resources if one is not specified. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new + # + # # Call the update_cmek_config method. + # result = client.update_cmek_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_cmek_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest + + # 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.update_cmek_config.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.config&.name + header_params["config.name"] = request.config.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.update_cmek_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_cmek_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_config_service_stub.call_rpc :update_cmek_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}. + # + # @overload get_cmek_config(request, options = nil) + # Pass arguments to `get_cmek_config` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest, ::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_cmek_config(name: nil) + # Pass arguments to `get_cmek_config` 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. Resource name of + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}, such as + # `projects/*/locations/*/cmekConfig` or + # `projects/*/locations/*/cmekConfigs/*`. + # + # If the caller does not have permission to access the + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}, regardless of + # whether or not it exists, a PERMISSION_DENIED error is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::CmekConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.new + # + # # Call the get_cmek_config method. + # result = client.get_cmek_config request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::CmekConfig. + # p result + # + def get_cmek_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest + + # 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_cmek_config.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_cmek_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_cmek_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_config_service_stub.call_rpc :get_cmek_config, 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 all the {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s + # with the project. + # + # @overload list_cmek_configs(request, options = nil) + # Pass arguments to `list_cmek_configs` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest, ::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_cmek_configs(parent: nil) + # Pass arguments to `list_cmek_configs` 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 parent location resource name, such as + # `projects/{project}/locations/{location}`. + # + # If the caller does not have permission to list + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s under this + # location, regardless of whether or not a CmekConfig exists, a + # PERMISSION_DENIED error is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new + # + # # Call the list_cmek_configs method. + # result = client.list_cmek_configs request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse. + # p result + # + def list_cmek_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest + + # 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_cmek_configs.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_cmek_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_cmek_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_config_service_stub.call_rpc :list_cmek_configs, 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 + + ## + # De-provisions a CmekConfig. + # + # @overload delete_cmek_config(request, options = nil) + # Pass arguments to `delete_cmek_config` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest, ::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_cmek_config(name: nil) + # Pass arguments to `delete_cmek_config` 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 resource name of the + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig} to delete, such as + # `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new + # + # # Call the delete_cmek_config method. + # result = client.delete_cmek_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_cmek_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest + + # 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_cmek_config.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_cmek_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_cmek_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_config_service_stub.call_rpc :delete_cmek_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 CmekConfigService API. + # + # This class represents the configuration for CmekConfigService, + # 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::DiscoveryEngine::V1::CmekConfigService::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 + # # update_cmek_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.update_cmek_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.update_cmek_config.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 CmekConfigService 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 `update_cmek_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_cmek_config + ## + # RPC-specific configuration for `get_cmek_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_cmek_config + ## + # RPC-specific configuration for `list_cmek_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_cmek_configs + ## + # RPC-specific configuration for `delete_cmek_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_cmek_config + + # @private + def initialize parent_rpcs = nil + update_cmek_config_config = parent_rpcs.update_cmek_config if parent_rpcs.respond_to? :update_cmek_config + @update_cmek_config = ::Gapic::Config::Method.new update_cmek_config_config + get_cmek_config_config = parent_rpcs.get_cmek_config if parent_rpcs.respond_to? :get_cmek_config + @get_cmek_config = ::Gapic::Config::Method.new get_cmek_config_config + list_cmek_configs_config = parent_rpcs.list_cmek_configs if parent_rpcs.respond_to? :list_cmek_configs + @list_cmek_configs = ::Gapic::Config::Method.new list_cmek_configs_config + delete_cmek_config_config = parent_rpcs.delete_cmek_config if parent_rpcs.respond_to? :delete_cmek_config + @delete_cmek_config = ::Gapic::Config::Method.new delete_cmek_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/credentials.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/credentials.rb new file mode 100644 index 000000000000..5932eb02721e --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module CmekConfigService + # Credentials for the CmekConfigService 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 diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/operations.rb new file mode 100644 index 000000000000..07b6b25c94b2 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/operations.rb @@ -0,0 +1,813 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module CmekConfigService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CmekConfigService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CmekConfigService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/paths.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/paths.rb new file mode 100644 index 000000000000..36396bdad5af --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/paths.rb @@ -0,0 +1,135 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module CmekConfigService + # Path helper methods for the CmekConfigService API. + module Paths + ## + # Create a fully-qualified CmekConfig resource string. + # + # @overload cmek_config_path(project:, location:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cmekConfig` + # + # @param project [String] + # @param location [String] + # + # @overload cmek_config_path(project:, location:, cmek_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}` + # + # @param project [String] + # @param location [String] + # @param cmek_config [String] + # + # @return [::String] + def cmek_config_path **args + resources = { + "location:project" => (proc do |project:, location:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cmekConfig" + end), + "cmek_config:location:project" => (proc do |project:, location:, cmek_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cmekConfigs/#{cmek_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified CryptoKeyVersions resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_versions_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified CryptoKeys resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_keys_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # 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 + + extend self + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest.rb new file mode 100644 index 000000000000..dd943178f0db --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/cmek_config_service/credentials" +require "google/cloud/discovery_engine/v1/cmek_config_service/paths" +require "google/cloud/discovery_engine/v1/cmek_config_service/rest/operations" +require "google/cloud/discovery_engine/v1/cmek_config_service/rest/client" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing CMEK related tasks + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/discovery_engine/v1/cmek_config_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # + module CmekConfigService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/discovery_engine/v1/cmek_config_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/client.rb new file mode 100644 index 000000000000..1ce889ec4d43 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/client.rb @@ -0,0 +1,749 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/cmek_config_service_pb" +require "google/cloud/discovery_engine/v1/cmek_config_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module CmekConfigService + module Rest + ## + # REST client for the CmekConfigService service. + # + # Service for managing CMEK related tasks + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cmek_config_service_stub + + ## + # Configure the CmekConfigService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CmekConfigService clients + # ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CmekConfigService 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::DiscoveryEngine::V1::CmekConfigService::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 + @cmek_config_service_stub.universe_domain + end + + ## + # Create a new CmekConfigService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CmekConfigService 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 + + @operations_client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cmek_config_service_stub = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cmek_config_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @cmek_config_service_stub.endpoint + config.universe_domain = @cmek_config_service_stub.universe_domain + config.logger = @cmek_config_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cmek_config_service_stub.logger + end + + # Service calls + + ## + # Provisions a CMEK key for use in a location of a customer's project. + # This method will also conduct location validation on the provided + # cmekConfig to make sure the key is valid and can be used in the + # selected location. + # + # @overload update_cmek_config(request, options = nil) + # Pass arguments to `update_cmek_config` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest, ::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 update_cmek_config(config: nil, set_default: nil) + # Pass arguments to `update_cmek_config` 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 config [::Google::Cloud::DiscoveryEngine::V1::CmekConfig, ::Hash] + # Required. The CmekConfig resource. + # @param set_default [::Boolean] + # Set the following CmekConfig as the default to be used for child + # resources if one is not specified. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new + # + # # Call the update_cmek_config method. + # result = client.update_cmek_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_cmek_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest + + # 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.update_cmek_config.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::DiscoveryEngine::V1::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.update_cmek_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_cmek_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_config_service_stub.update_cmek_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}. + # + # @overload get_cmek_config(request, options = nil) + # Pass arguments to `get_cmek_config` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest, ::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_cmek_config(name: nil) + # Pass arguments to `get_cmek_config` 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. Resource name of + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}, such as + # `projects/*/locations/*/cmekConfig` or + # `projects/*/locations/*/cmekConfigs/*`. + # + # If the caller does not have permission to access the + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}, regardless of + # whether or not it exists, a PERMISSION_DENIED error is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::CmekConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.new + # + # # Call the get_cmek_config method. + # result = client.get_cmek_config request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::CmekConfig. + # p result + # + def get_cmek_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest + + # 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_cmek_config.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::DiscoveryEngine::V1::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_cmek_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_cmek_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_config_service_stub.get_cmek_config 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 all the {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s + # with the project. + # + # @overload list_cmek_configs(request, options = nil) + # Pass arguments to `list_cmek_configs` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest, ::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_cmek_configs(parent: nil) + # Pass arguments to `list_cmek_configs` 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 parent location resource name, such as + # `projects/{project}/locations/{location}`. + # + # If the caller does not have permission to list + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s under this + # location, regardless of whether or not a CmekConfig exists, a + # PERMISSION_DENIED error is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new + # + # # Call the list_cmek_configs method. + # result = client.list_cmek_configs request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse. + # p result + # + def list_cmek_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest + + # 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_cmek_configs.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::DiscoveryEngine::V1::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_cmek_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_cmek_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_config_service_stub.list_cmek_configs 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 + + ## + # De-provisions a CmekConfig. + # + # @overload delete_cmek_config(request, options = nil) + # Pass arguments to `delete_cmek_config` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest, ::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_cmek_config(name: nil) + # Pass arguments to `delete_cmek_config` 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 resource name of the + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig} to delete, such as + # `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new + # + # # Call the delete_cmek_config method. + # result = client.delete_cmek_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_cmek_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest + + # 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_cmek_config.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::DiscoveryEngine::V1::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_cmek_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_cmek_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_config_service_stub.delete_cmek_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 CmekConfigService REST API. + # + # This class represents the configuration for CmekConfigService 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::DiscoveryEngine::V1::CmekConfigService::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 + # # update_cmek_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.update_cmek_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.update_cmek_config.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 = "discoveryengine.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 CmekConfigService 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 `update_cmek_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_cmek_config + ## + # RPC-specific configuration for `get_cmek_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_cmek_config + ## + # RPC-specific configuration for `list_cmek_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_cmek_configs + ## + # RPC-specific configuration for `delete_cmek_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_cmek_config + + # @private + def initialize parent_rpcs = nil + update_cmek_config_config = parent_rpcs.update_cmek_config if parent_rpcs.respond_to? :update_cmek_config + @update_cmek_config = ::Gapic::Config::Method.new update_cmek_config_config + get_cmek_config_config = parent_rpcs.get_cmek_config if parent_rpcs.respond_to? :get_cmek_config + @get_cmek_config = ::Gapic::Config::Method.new get_cmek_config_config + list_cmek_configs_config = parent_rpcs.list_cmek_configs if parent_rpcs.respond_to? :list_cmek_configs + @list_cmek_configs = ::Gapic::Config::Method.new list_cmek_configs_config + delete_cmek_config_config = parent_rpcs.delete_cmek_config if parent_rpcs.respond_to? :delete_cmek_config + @delete_cmek_config = ::Gapic::Config::Method.new delete_cmek_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/operations.rb new file mode 100644 index 000000000000..812fe778df33 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/operations.rb @@ -0,0 +1,1148 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module CmekConfigService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CmekConfigService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CmekConfigService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::DiscoveryEngine::V1::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::DiscoveryEngine::V1::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "discoveryengine.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/service_stub.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/service_stub.rb new file mode 100644 index 000000000000..549e28e41a65 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/service_stub.rb @@ -0,0 +1,341 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/cmek_config_service_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module CmekConfigService + module Rest + ## + # REST service stub for the CmekConfigService 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: true, + 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 update_cmek_config REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_cmek_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_cmek_config_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: "update_cmek_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_cmek_config REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest] + # 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::DiscoveryEngine::V1::CmekConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig] + # A result object deserialized from the server's reply + def get_cmek_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_cmek_config_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_cmek_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::CmekConfig.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_cmek_configs REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest] + # 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::DiscoveryEngine::V1::ListCmekConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse] + # A result object deserialized from the server's reply + def list_cmek_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_cmek_configs_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_cmek_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse.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_cmek_config REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_cmek_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_cmek_config_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_cmek_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 update_cmek_config REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_cmek_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{config.name}", + body: "config", + matches: [ + ["config.name", %r{^projects/[^/]+/locations/[^/]+/cmekConfig/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{config.name}", + body: "config", + matches: [ + ["config.name", %r{^projects/[^/]+/locations/[^/]+/cmekConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_cmek_config REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest] + # 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_cmek_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cmekConfig/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cmekConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_cmek_configs REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest] + # 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_cmek_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cmekConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_cmek_config REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest] + # 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_cmek_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cmekConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb index fa35994d2f6c..48d053470b0c 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/control_service/paths.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/control_service/paths.rb index 86b8d7a656a7..c4db3477ffb5 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/control_service/paths.rb @@ -137,6 +137,59 @@ def data_store_path **args resource.call(**args) end + ## + # Create a fully-qualified Document resource string. + # + # @overload document_path(project:, location:, data_store:, branch:, document:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # + # @overload document_path(project:, location:, collection:, data_store:, branch:, document:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # + # @return [::String] + def document_path **args + resources = { + "branch:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}" + end), + "branch:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + ## # Create a fully-qualified Engine resource string. # diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb index b4d9a1c92590..f9334848c0bd 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb @@ -233,11 +233,21 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload create_data_store(parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil, skip_default_schema_creation: nil) + # @overload create_data_store(cmek_config_name: nil, disable_cmek: nil, parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil, skip_default_schema_creation: nil) # Pass arguments to `create_data_store` 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 cmek_config_name [::String] + # Resource name of the CmekConfig to use for protecting this DataStore. + # + # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param disable_cmek [::Boolean] + # DataStore without CMEK protections. If a default CmekConfig is set for + # the project, setting this field will override the default CmekConfig as + # well. + # + # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @param parent [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb index e01dfc8eb72b..11c96c8ea40e 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb @@ -24,6 +24,47 @@ module V1 module DataStoreService # Path helper methods for the DataStoreService API. module Paths + ## + # Create a fully-qualified CmekConfig resource string. + # + # @overload cmek_config_path(project:, location:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cmekConfig` + # + # @param project [String] + # @param location [String] + # + # @overload cmek_config_path(project:, location:, cmek_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}` + # + # @param project [String] + # @param location [String] + # @param cmek_config [String] + # + # @return [::String] + def cmek_config_path **args + resources = { + "location:project" => (proc do |project:, location:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cmekConfig" + end), + "cmek_config:location:project" => (proc do |project:, location:, cmek_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cmekConfigs/#{cmek_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + ## # Create a fully-qualified Collection resource string. # @@ -43,6 +84,50 @@ def collection_path project:, location:, collection: "projects/#{project}/locations/#{location}/collections/#{collection}" end + ## + # Create a fully-qualified CryptoKeyVersions resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_versions_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified CryptoKeys resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_keys_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + ## # Create a fully-qualified DataStore resource string. # @@ -133,6 +218,25 @@ def document_processing_config_path **args resource.call(**args) end + ## + # Create a fully-qualified IdentityMappingStore resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}` + # + # @param project [String] + # @param location [String] + # @param identity_mapping_store [String] + # + # @return [::String] + def identity_mapping_store_path project:, location:, identity_mapping_store: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/identityMappingStores/#{identity_mapping_store}" + end + ## # Create a fully-qualified Schema resource string. # diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb index a3c9d09b941a..1e0c125e671a 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb @@ -226,11 +226,21 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload create_data_store(parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil, skip_default_schema_creation: nil) + # @overload create_data_store(cmek_config_name: nil, disable_cmek: nil, parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil, skip_default_schema_creation: nil) # Pass arguments to `create_data_store` 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 cmek_config_name [::String] + # Resource name of the CmekConfig to use for protecting this DataStore. + # + # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param disable_cmek [::Boolean] + # DataStore without CMEK protections. If a default CmekConfig is set for + # the project, setting this field will override the default CmekConfig as + # well. + # + # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @param parent [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb index 3132b00ee0f8..58a2adea208d 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb index c9a29a715e44..1704b46c970e 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb index e6f7b7ece123..baab39b017e6 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service.rb new file mode 100644 index 000000000000..d529cac66de3 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/paths" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/operations" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/client" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing Identity Mapping Stores. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/discovery_engine/v1/identity_mapping_store_service" + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + module IdentityMappingStoreService + end + end + end + end +end + +helper_path = ::File.join __dir__, "identity_mapping_store_service", "helpers.rb" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb new file mode 100644 index 000000000000..43de79e2a25d --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb @@ -0,0 +1,1160 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/identity_mapping_store_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module IdentityMappingStoreService + ## + # Client for the IdentityMappingStoreService service. + # + # Service for managing Identity Mapping Stores. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :identity_mapping_store_service_stub + + ## + # Configure the IdentityMappingStoreService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IdentityMappingStoreService clients + # ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::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 + @identity_mapping_store_service_stub.universe_domain + end + + ## + # Create a new IdentityMappingStoreService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IdentityMappingStoreService 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/discoveryengine/v1/identity_mapping_store_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @identity_mapping_store_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::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 + ) + + @identity_mapping_store_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @identity_mapping_store_service_stub.endpoint + config.universe_domain = @identity_mapping_store_service_stub.universe_domain + config.logger = @identity_mapping_store_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @identity_mapping_store_service_stub.logger + end + + # Service calls + + ## + # Creates a new Identity Mapping Store. + # + # @overload create_identity_mapping_store(request, options = nil) + # Pass arguments to `create_identity_mapping_store` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest, ::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_identity_mapping_store(cmek_config_name: nil, disable_cmek: nil, parent: nil, identity_mapping_store_id: nil, identity_mapping_store: nil) + # Pass arguments to `create_identity_mapping_store` 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 cmek_config_name [::String] + # Resource name of the CmekConfig to use for protecting this Identity + # Mapping Store. + # + # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param disable_cmek [::Boolean] + # Identity Mapping Store without CMEK protections. If a default CmekConfig + # is set for the project, setting this field will override the default + # CmekConfig as well. + # + # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param parent [::String] + # Required. The parent collection resource name, such as + # `projects/{project}/locations/{location}`. + # @param identity_mapping_store_id [::String] + # Required. The ID of the Identity Mapping Store to create. + # + # The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + # (_), and hyphens (-). The maximum length is 63 characters. + # @param identity_mapping_store [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore, ::Hash] + # Required. The Identity Mapping Store to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest.new + # + # # Call the create_identity_mapping_store method. + # result = client.create_identity_mapping_store request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore. + # p result + # + def create_identity_mapping_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest + + # 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_identity_mapping_store.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_identity_mapping_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_identity_mapping_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.call_rpc :create_identity_mapping_store, 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 the Identity Mapping Store. + # + # @overload get_identity_mapping_store(request, options = nil) + # Pass arguments to `get_identity_mapping_store` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest, ::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_identity_mapping_store(name: nil) + # Pass arguments to `get_identity_mapping_store` 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 name of the Identity Mapping Store to get. + # Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest.new + # + # # Call the get_identity_mapping_store method. + # result = client.get_identity_mapping_store request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore. + # p result + # + def get_identity_mapping_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest + + # 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_identity_mapping_store.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_identity_mapping_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_identity_mapping_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.call_rpc :get_identity_mapping_store, 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 + + ## + # Deletes the Identity Mapping Store. + # + # @overload delete_identity_mapping_store(request, options = nil) + # Pass arguments to `delete_identity_mapping_store` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest, ::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_identity_mapping_store(name: nil) + # Pass arguments to `delete_identity_mapping_store` 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 name of the Identity Mapping Store to delete. + # Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest.new + # + # # Call the delete_identity_mapping_store method. + # result = client.delete_identity_mapping_store request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_identity_mapping_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest + + # 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_identity_mapping_store.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_identity_mapping_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_identity_mapping_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.call_rpc :delete_identity_mapping_store, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports a list of Identity Mapping Entries to an Identity Mapping Store. + # + # @overload import_identity_mappings(request, options = nil) + # Pass arguments to `import_identity_mappings` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest, ::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 import_identity_mappings(inline_source: nil, identity_mapping_store: nil) + # Pass arguments to `import_identity_mappings` 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 inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest::InlineSource, ::Hash] + # The inline source to import identity mapping entries from. + # @param identity_mapping_store [::String] + # Required. The name of the Identity Mapping Store to import Identity Mapping + # Entries to. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest.new + # + # # Call the import_identity_mappings method. + # result = client.import_identity_mappings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_identity_mappings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest + + # 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.import_identity_mappings.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.identity_mapping_store + header_params["identity_mapping_store"] = request.identity_mapping_store + 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.import_identity_mappings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_identity_mappings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.call_rpc :import_identity_mappings, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Purges specified or all Identity Mapping Entries from an Identity Mapping + # Store. + # + # @overload purge_identity_mappings(request, options = nil) + # Pass arguments to `purge_identity_mappings` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest, ::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 purge_identity_mappings(inline_source: nil, identity_mapping_store: nil, filter: nil, force: nil) + # Pass arguments to `purge_identity_mappings` 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 inline_source [::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest::InlineSource, ::Hash] + # The inline source to purge identity mapping entries from. + # @param identity_mapping_store [::String] + # Required. The name of the Identity Mapping Store to purge Identity Mapping + # Entries from. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @param filter [::String] + # Filter matching identity mappings to purge. + # The eligible field for filtering is: + # * `update_time`: in ISO 8601 "zulu" format. + # * `external_id` + # + # Examples: + # + # * Deleting all identity mappings updated in a time range: + # `update_time > "2012-04-23T18:25:43.511Z" AND update_time < + # "2012-04-23T18:30:43.511Z"` + # * Deleting all identity mappings for a given external_id: + # `external_id = "id1"` + # * Deleting all identity mappings inside an identity mapping store: + # `*` + # + # The filtering fields are assumed to have an implicit AND. + # Should not be used with source. An error will be thrown, if both are + # provided. + # @param force [::Boolean] + # Actually performs the purge. If `force` is set to false, return the + # expected purge count without deleting any identity mappings. This field is + # only supported for purge with filter. For input source this field is + # ignored and data will be purged regardless of the value of this field. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest.new + # + # # Call the purge_identity_mappings method. + # result = client.purge_identity_mappings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def purge_identity_mappings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest + + # 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.purge_identity_mappings.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.identity_mapping_store + header_params["identity_mapping_store"] = request.identity_mapping_store + 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.purge_identity_mappings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.purge_identity_mappings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.call_rpc :purge_identity_mappings, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Identity Mappings in an Identity Mapping Store. + # + # @overload list_identity_mappings(request, options = nil) + # Pass arguments to `list_identity_mappings` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest, ::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_identity_mappings(identity_mapping_store: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_identity_mappings` 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 identity_mapping_store [::String] + # Required. The name of the Identity Mapping Store to list Identity Mapping + # Entries in. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @param page_size [::Integer] + # Maximum number of IdentityMappings to return. If unspecified, defaults + # to 2000. The maximum allowed value is 10000. Values above 10000 will be + # coerced to 10000. + # @param page_token [::String] + # A page token, received from a previous `ListIdentityMappings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListIdentityMappings` 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::DiscoveryEngine::V1::IdentityMappingEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::IdentityMappingEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest.new + # + # # Call the list_identity_mappings method. + # result = client.list_identity_mappings 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::DiscoveryEngine::V1::IdentityMappingEntry. + # p item + # end + # + def list_identity_mappings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest + + # 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_identity_mappings.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.identity_mapping_store + header_params["identity_mapping_store"] = request.identity_mapping_store + 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_identity_mappings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_identity_mappings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.call_rpc :list_identity_mappings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @identity_mapping_store_service_stub, :list_identity_mappings, 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 + + ## + # Lists all Identity Mapping Stores. + # + # @overload list_identity_mapping_stores(request, options = nil) + # Pass arguments to `list_identity_mapping_stores` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest, ::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_identity_mapping_stores(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_identity_mapping_stores` 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 parent of the Identity Mapping Stores to list. + # Format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Maximum number of IdentityMappingStores to return. If unspecified, defaults + # to 100. The maximum allowed value is 1000. Values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListIdentityMappingStores` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListIdentityMappingStores` 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::DiscoveryEngine::V1::IdentityMappingStore>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest.new + # + # # Call the list_identity_mapping_stores method. + # result = client.list_identity_mapping_stores 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::DiscoveryEngine::V1::IdentityMappingStore. + # p item + # end + # + def list_identity_mapping_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest + + # 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_identity_mapping_stores.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_identity_mapping_stores.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_identity_mapping_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.call_rpc :list_identity_mapping_stores, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @identity_mapping_store_service_stub, :list_identity_mapping_stores, 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 IdentityMappingStoreService API. + # + # This class represents the configuration for IdentityMappingStoreService, + # 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::DiscoveryEngine::V1::IdentityMappingStoreService::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_identity_mapping_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_identity_mapping_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_identity_mapping_store.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 IdentityMappingStoreService 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_identity_mapping_store` + # @return [::Gapic::Config::Method] + # + attr_reader :create_identity_mapping_store + ## + # RPC-specific configuration for `get_identity_mapping_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_identity_mapping_store + ## + # RPC-specific configuration for `delete_identity_mapping_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_identity_mapping_store + ## + # RPC-specific configuration for `import_identity_mappings` + # @return [::Gapic::Config::Method] + # + attr_reader :import_identity_mappings + ## + # RPC-specific configuration for `purge_identity_mappings` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_identity_mappings + ## + # RPC-specific configuration for `list_identity_mappings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_identity_mappings + ## + # RPC-specific configuration for `list_identity_mapping_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_identity_mapping_stores + + # @private + def initialize parent_rpcs = nil + create_identity_mapping_store_config = parent_rpcs.create_identity_mapping_store if parent_rpcs.respond_to? :create_identity_mapping_store + @create_identity_mapping_store = ::Gapic::Config::Method.new create_identity_mapping_store_config + get_identity_mapping_store_config = parent_rpcs.get_identity_mapping_store if parent_rpcs.respond_to? :get_identity_mapping_store + @get_identity_mapping_store = ::Gapic::Config::Method.new get_identity_mapping_store_config + delete_identity_mapping_store_config = parent_rpcs.delete_identity_mapping_store if parent_rpcs.respond_to? :delete_identity_mapping_store + @delete_identity_mapping_store = ::Gapic::Config::Method.new delete_identity_mapping_store_config + import_identity_mappings_config = parent_rpcs.import_identity_mappings if parent_rpcs.respond_to? :import_identity_mappings + @import_identity_mappings = ::Gapic::Config::Method.new import_identity_mappings_config + purge_identity_mappings_config = parent_rpcs.purge_identity_mappings if parent_rpcs.respond_to? :purge_identity_mappings + @purge_identity_mappings = ::Gapic::Config::Method.new purge_identity_mappings_config + list_identity_mappings_config = parent_rpcs.list_identity_mappings if parent_rpcs.respond_to? :list_identity_mappings + @list_identity_mappings = ::Gapic::Config::Method.new list_identity_mappings_config + list_identity_mapping_stores_config = parent_rpcs.list_identity_mapping_stores if parent_rpcs.respond_to? :list_identity_mapping_stores + @list_identity_mapping_stores = ::Gapic::Config::Method.new list_identity_mapping_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials.rb new file mode 100644 index 000000000000..04895e427702 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module IdentityMappingStoreService + # Credentials for the IdentityMappingStoreService 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 diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/operations.rb new file mode 100644 index 000000000000..df2ba6ed5b92 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/operations.rb @@ -0,0 +1,813 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module IdentityMappingStoreService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the IdentityMappingStoreService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the IdentityMappingStoreService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb new file mode 100644 index 000000000000..710cfff6c1bd --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module IdentityMappingStoreService + # Path helper methods for the IdentityMappingStoreService API. + module Paths + ## + # Create a fully-qualified CmekConfig resource string. + # + # @overload cmek_config_path(project:, location:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cmekConfig` + # + # @param project [String] + # @param location [String] + # + # @overload cmek_config_path(project:, location:, cmek_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}` + # + # @param project [String] + # @param location [String] + # @param cmek_config [String] + # + # @return [::String] + def cmek_config_path **args + resources = { + "location:project" => (proc do |project:, location:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cmekConfig" + end), + "cmek_config:location:project" => (proc do |project:, location:, cmek_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cmekConfigs/#{cmek_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified CryptoKeyVersions resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_versions_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified CryptoKeys resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_keys_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified IdentityMappingStore resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}` + # + # @param project [String] + # @param location [String] + # @param identity_mapping_store [String] + # + # @return [::String] + def identity_mapping_store_path project:, location:, identity_mapping_store: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/identityMappingStores/#{identity_mapping_store}" + end + + ## + # 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 + + extend self + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest.rb new file mode 100644 index 000000000000..f64f9d0f3721 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/paths" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/operations" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing Identity Mapping Stores. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + module IdentityMappingStoreService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb new file mode 100644 index 000000000000..c1ac17cd9cae --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb @@ -0,0 +1,1085 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/identity_mapping_store_service_pb" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module IdentityMappingStoreService + module Rest + ## + # REST client for the IdentityMappingStoreService service. + # + # Service for managing Identity Mapping Stores. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :identity_mapping_store_service_stub + + ## + # Configure the IdentityMappingStoreService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IdentityMappingStoreService clients + # ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::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 + @identity_mapping_store_service_stub.universe_domain + end + + ## + # Create a new IdentityMappingStoreService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IdentityMappingStoreService 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 + + @operations_client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @identity_mapping_store_service_stub = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @identity_mapping_store_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @identity_mapping_store_service_stub.endpoint + config.universe_domain = @identity_mapping_store_service_stub.universe_domain + config.logger = @identity_mapping_store_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @identity_mapping_store_service_stub.logger + end + + # Service calls + + ## + # Creates a new Identity Mapping Store. + # + # @overload create_identity_mapping_store(request, options = nil) + # Pass arguments to `create_identity_mapping_store` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest, ::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_identity_mapping_store(cmek_config_name: nil, disable_cmek: nil, parent: nil, identity_mapping_store_id: nil, identity_mapping_store: nil) + # Pass arguments to `create_identity_mapping_store` 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 cmek_config_name [::String] + # Resource name of the CmekConfig to use for protecting this Identity + # Mapping Store. + # + # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param disable_cmek [::Boolean] + # Identity Mapping Store without CMEK protections. If a default CmekConfig + # is set for the project, setting this field will override the default + # CmekConfig as well. + # + # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param parent [::String] + # Required. The parent collection resource name, such as + # `projects/{project}/locations/{location}`. + # @param identity_mapping_store_id [::String] + # Required. The ID of the Identity Mapping Store to create. + # + # The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + # (_), and hyphens (-). The maximum length is 63 characters. + # @param identity_mapping_store [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore, ::Hash] + # Required. The Identity Mapping Store to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest.new + # + # # Call the create_identity_mapping_store method. + # result = client.create_identity_mapping_store request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore. + # p result + # + def create_identity_mapping_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest + + # 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_identity_mapping_store.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::DiscoveryEngine::V1::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_identity_mapping_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_identity_mapping_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.create_identity_mapping_store 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 the Identity Mapping Store. + # + # @overload get_identity_mapping_store(request, options = nil) + # Pass arguments to `get_identity_mapping_store` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest, ::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_identity_mapping_store(name: nil) + # Pass arguments to `get_identity_mapping_store` 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 name of the Identity Mapping Store to get. + # Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest.new + # + # # Call the get_identity_mapping_store method. + # result = client.get_identity_mapping_store request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore. + # p result + # + def get_identity_mapping_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest + + # 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_identity_mapping_store.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::DiscoveryEngine::V1::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_identity_mapping_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_identity_mapping_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.get_identity_mapping_store 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 + + ## + # Deletes the Identity Mapping Store. + # + # @overload delete_identity_mapping_store(request, options = nil) + # Pass arguments to `delete_identity_mapping_store` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest, ::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_identity_mapping_store(name: nil) + # Pass arguments to `delete_identity_mapping_store` 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 name of the Identity Mapping Store to delete. + # Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest.new + # + # # Call the delete_identity_mapping_store method. + # result = client.delete_identity_mapping_store request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_identity_mapping_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest + + # 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_identity_mapping_store.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::DiscoveryEngine::V1::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_identity_mapping_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_identity_mapping_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.delete_identity_mapping_store request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports a list of Identity Mapping Entries to an Identity Mapping Store. + # + # @overload import_identity_mappings(request, options = nil) + # Pass arguments to `import_identity_mappings` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest, ::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 import_identity_mappings(inline_source: nil, identity_mapping_store: nil) + # Pass arguments to `import_identity_mappings` 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 inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest::InlineSource, ::Hash] + # The inline source to import identity mapping entries from. + # @param identity_mapping_store [::String] + # Required. The name of the Identity Mapping Store to import Identity Mapping + # Entries to. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest.new + # + # # Call the import_identity_mappings method. + # result = client.import_identity_mappings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_identity_mappings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest + + # 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.import_identity_mappings.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::DiscoveryEngine::V1::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.import_identity_mappings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_identity_mappings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.import_identity_mappings request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Purges specified or all Identity Mapping Entries from an Identity Mapping + # Store. + # + # @overload purge_identity_mappings(request, options = nil) + # Pass arguments to `purge_identity_mappings` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest, ::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 purge_identity_mappings(inline_source: nil, identity_mapping_store: nil, filter: nil, force: nil) + # Pass arguments to `purge_identity_mappings` 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 inline_source [::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest::InlineSource, ::Hash] + # The inline source to purge identity mapping entries from. + # @param identity_mapping_store [::String] + # Required. The name of the Identity Mapping Store to purge Identity Mapping + # Entries from. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @param filter [::String] + # Filter matching identity mappings to purge. + # The eligible field for filtering is: + # * `update_time`: in ISO 8601 "zulu" format. + # * `external_id` + # + # Examples: + # + # * Deleting all identity mappings updated in a time range: + # `update_time > "2012-04-23T18:25:43.511Z" AND update_time < + # "2012-04-23T18:30:43.511Z"` + # * Deleting all identity mappings for a given external_id: + # `external_id = "id1"` + # * Deleting all identity mappings inside an identity mapping store: + # `*` + # + # The filtering fields are assumed to have an implicit AND. + # Should not be used with source. An error will be thrown, if both are + # provided. + # @param force [::Boolean] + # Actually performs the purge. If `force` is set to false, return the + # expected purge count without deleting any identity mappings. This field is + # only supported for purge with filter. For input source this field is + # ignored and data will be purged regardless of the value of this field. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest.new + # + # # Call the purge_identity_mappings method. + # result = client.purge_identity_mappings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def purge_identity_mappings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest + + # 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.purge_identity_mappings.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::DiscoveryEngine::V1::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.purge_identity_mappings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.purge_identity_mappings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.purge_identity_mappings request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Identity Mappings in an Identity Mapping Store. + # + # @overload list_identity_mappings(request, options = nil) + # Pass arguments to `list_identity_mappings` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest, ::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_identity_mappings(identity_mapping_store: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_identity_mappings` 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 identity_mapping_store [::String] + # Required. The name of the Identity Mapping Store to list Identity Mapping + # Entries in. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @param page_size [::Integer] + # Maximum number of IdentityMappings to return. If unspecified, defaults + # to 2000. The maximum allowed value is 10000. Values above 10000 will be + # coerced to 10000. + # @param page_token [::String] + # A page token, received from a previous `ListIdentityMappings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListIdentityMappings` 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::DiscoveryEngine::V1::IdentityMappingEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::IdentityMappingEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest.new + # + # # Call the list_identity_mappings method. + # result = client.list_identity_mappings 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::DiscoveryEngine::V1::IdentityMappingEntry. + # p item + # end + # + def list_identity_mappings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest + + # 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_identity_mappings.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::DiscoveryEngine::V1::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_identity_mappings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_identity_mappings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.list_identity_mappings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @identity_mapping_store_service_stub, :list_identity_mappings, "identity_mapping_entries", 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 + + ## + # Lists all Identity Mapping Stores. + # + # @overload list_identity_mapping_stores(request, options = nil) + # Pass arguments to `list_identity_mapping_stores` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest, ::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_identity_mapping_stores(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_identity_mapping_stores` 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 parent of the Identity Mapping Stores to list. + # Format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Maximum number of IdentityMappingStores to return. If unspecified, defaults + # to 100. The maximum allowed value is 1000. Values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListIdentityMappingStores` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListIdentityMappingStores` 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::DiscoveryEngine::V1::IdentityMappingStore>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest.new + # + # # Call the list_identity_mapping_stores method. + # result = client.list_identity_mapping_stores 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::DiscoveryEngine::V1::IdentityMappingStore. + # p item + # end + # + def list_identity_mapping_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest + + # 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_identity_mapping_stores.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::DiscoveryEngine::V1::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_identity_mapping_stores.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_identity_mapping_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_mapping_store_service_stub.list_identity_mapping_stores request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @identity_mapping_store_service_stub, :list_identity_mapping_stores, "identity_mapping_stores", 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 IdentityMappingStoreService REST API. + # + # This class represents the configuration for IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::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_identity_mapping_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_identity_mapping_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_identity_mapping_store.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 = "discoveryengine.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 IdentityMappingStoreService 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_identity_mapping_store` + # @return [::Gapic::Config::Method] + # + attr_reader :create_identity_mapping_store + ## + # RPC-specific configuration for `get_identity_mapping_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_identity_mapping_store + ## + # RPC-specific configuration for `delete_identity_mapping_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_identity_mapping_store + ## + # RPC-specific configuration for `import_identity_mappings` + # @return [::Gapic::Config::Method] + # + attr_reader :import_identity_mappings + ## + # RPC-specific configuration for `purge_identity_mappings` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_identity_mappings + ## + # RPC-specific configuration for `list_identity_mappings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_identity_mappings + ## + # RPC-specific configuration for `list_identity_mapping_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_identity_mapping_stores + + # @private + def initialize parent_rpcs = nil + create_identity_mapping_store_config = parent_rpcs.create_identity_mapping_store if parent_rpcs.respond_to? :create_identity_mapping_store + @create_identity_mapping_store = ::Gapic::Config::Method.new create_identity_mapping_store_config + get_identity_mapping_store_config = parent_rpcs.get_identity_mapping_store if parent_rpcs.respond_to? :get_identity_mapping_store + @get_identity_mapping_store = ::Gapic::Config::Method.new get_identity_mapping_store_config + delete_identity_mapping_store_config = parent_rpcs.delete_identity_mapping_store if parent_rpcs.respond_to? :delete_identity_mapping_store + @delete_identity_mapping_store = ::Gapic::Config::Method.new delete_identity_mapping_store_config + import_identity_mappings_config = parent_rpcs.import_identity_mappings if parent_rpcs.respond_to? :import_identity_mappings + @import_identity_mappings = ::Gapic::Config::Method.new import_identity_mappings_config + purge_identity_mappings_config = parent_rpcs.purge_identity_mappings if parent_rpcs.respond_to? :purge_identity_mappings + @purge_identity_mappings = ::Gapic::Config::Method.new purge_identity_mappings_config + list_identity_mappings_config = parent_rpcs.list_identity_mappings if parent_rpcs.respond_to? :list_identity_mappings + @list_identity_mappings = ::Gapic::Config::Method.new list_identity_mappings_config + list_identity_mapping_stores_config = parent_rpcs.list_identity_mapping_stores if parent_rpcs.respond_to? :list_identity_mapping_stores + @list_identity_mapping_stores = ::Gapic::Config::Method.new list_identity_mapping_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/operations.rb new file mode 100644 index 000000000000..0874363cb39d --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/operations.rb @@ -0,0 +1,1148 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module IdentityMappingStoreService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the IdentityMappingStoreService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the IdentityMappingStoreService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::DiscoveryEngine::V1::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::DiscoveryEngine::V1::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "discoveryengine.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/service_stub.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/service_stub.rb new file mode 100644 index 000000000000..867353012fc9 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/service_stub.rb @@ -0,0 +1,511 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/identity_mapping_store_service_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module IdentityMappingStoreService + module Rest + ## + # REST service stub for the IdentityMappingStoreService 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: true, + 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_identity_mapping_store REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest] + # 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::DiscoveryEngine::V1::IdentityMappingStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # A result object deserialized from the server's reply + def create_identity_mapping_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_identity_mapping_store_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_identity_mapping_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore.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_identity_mapping_store REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest] + # 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::DiscoveryEngine::V1::IdentityMappingStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # A result object deserialized from the server's reply + def get_identity_mapping_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_identity_mapping_store_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_identity_mapping_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore.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_identity_mapping_store REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_identity_mapping_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_identity_mapping_store_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_identity_mapping_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_identity_mappings REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_identity_mappings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_identity_mappings_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: "import_identity_mappings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the purge_identity_mappings REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def purge_identity_mappings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_purge_identity_mappings_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: "purge_identity_mappings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_identity_mappings REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest] + # 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::DiscoveryEngine::V1::ListIdentityMappingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsResponse] + # A result object deserialized from the server's reply + def list_identity_mappings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_identity_mappings_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_identity_mappings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsResponse.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_identity_mapping_stores REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest] + # 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::DiscoveryEngine::V1::ListIdentityMappingStoresResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresResponse] + # A result object deserialized from the server's reply + def list_identity_mapping_stores request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_identity_mapping_stores_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_identity_mapping_stores", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresResponse.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_identity_mapping_store REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest] + # 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_identity_mapping_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/identityMappingStores", + body: "identity_mapping_store", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_identity_mapping_store REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest] + # 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_identity_mapping_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_identity_mapping_store REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest] + # 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_identity_mapping_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_identity_mappings REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_identity_mappings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{identity_mapping_store}:importIdentityMappings", + body: "*", + matches: [ + ["identity_mapping_store", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the purge_identity_mappings REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_purge_identity_mappings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{identity_mapping_store}:purgeIdentityMappings", + body: "*", + matches: [ + ["identity_mapping_store", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_identity_mappings REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest] + # 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_identity_mappings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{identity_mapping_store}:listIdentityMappings", + matches: [ + ["identity_mapping_store", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_identity_mapping_stores REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest] + # 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_identity_mapping_stores_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/identityMappingStores", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb index cd35b8a56dfc..7a9b22ba9a2f 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/rest.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/rest.rb index daa1f86a0c97..5171995c17f1 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/rest.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/rest.rb @@ -16,6 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/discovery_engine/v1/cmek_config_service/rest" require "google/cloud/discovery_engine/v1/completion_service/rest" require "google/cloud/discovery_engine/v1/control_service/rest" require "google/cloud/discovery_engine/v1/search_service/rest" @@ -24,6 +25,7 @@ require "google/cloud/discovery_engine/v1/document_service/rest" require "google/cloud/discovery_engine/v1/engine_service/rest" require "google/cloud/discovery_engine/v1/grounded_generation_service/rest" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest" require "google/cloud/discovery_engine/v1/project_service/rest" require "google/cloud/discovery_engine/v1/rank_service/rest" require "google/cloud/discovery_engine/v1/recommendation_service/rest" @@ -32,6 +34,7 @@ require "google/cloud/discovery_engine/v1/serving_config_service/rest" require "google/cloud/discovery_engine/v1/site_search_engine_service/rest" require "google/cloud/discovery_engine/v1/user_event_service/rest" +require "google/cloud/discovery_engine/v1/user_license_service/rest" require "google/cloud/discovery_engine/v1/version" module Google @@ -43,7 +46,7 @@ module DiscoveryEngine # @example # # require "google/cloud/discovery_engine/v1/rest" - # client = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Rest::Client.new + # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new # module V1 end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb index 1da408db1031..3e17381e714c 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb index 80415dafd707..9735cafdf0f2 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb index 38779b45845d..3c6b22bac6c2 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb index 0d174c2d13ae..7839e33f0248 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb @@ -1121,6 +1121,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service.rb new file mode 100644 index 000000000000..913520d6254c --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/user_license_service/credentials" +require "google/cloud/discovery_engine/v1/user_license_service/paths" +require "google/cloud/discovery_engine/v1/user_license_service/operations" +require "google/cloud/discovery_engine/v1/user_license_service/client" +require "google/cloud/discovery_engine/v1/user_license_service/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing User Licenses. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/discovery_engine/v1/user_license_service" + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/discovery_engine/v1/user_license_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new + # + module UserLicenseService + end + end + end + end +end + +helper_path = ::File.join __dir__, "user_license_service", "helpers.rb" +require "google/cloud/discovery_engine/v1/user_license_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/client.rb new file mode 100644 index 000000000000..f975b19887fd --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/client.rb @@ -0,0 +1,630 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/user_license_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module UserLicenseService + ## + # Client for the UserLicenseService service. + # + # Service for managing User Licenses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_license_service_stub + + ## + # Configure the UserLicenseService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserLicenseService clients + # ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserLicenseService 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::DiscoveryEngine::V1::UserLicenseService::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 + @user_license_service_stub.universe_domain + end + + ## + # Create a new UserLicenseService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserLicenseService 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/discoveryengine/v1/user_license_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @user_license_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::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 + ) + + @user_license_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @user_license_service_stub.endpoint + config.universe_domain = @user_license_service_stub.universe_domain + config.logger = @user_license_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @user_license_service_stub.logger + end + + # Service calls + + ## + # Lists the User Licenses. + # + # @overload list_user_licenses(request, options = nil) + # Pass arguments to `list_user_licenses` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest, ::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_user_licenses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_user_licenses` 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 parent [UserStore][] resource name, format: + # `projects/{project}/locations/{location}/userStores/{user_store_id}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, defaults to 10. The maximum value is 50; values + # above 50 will be coerced to 50. + # + # If this field is negative, an INVALID_ARGUMENT error is returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUserLicenses` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUserLicenses` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter for the list request. + # + # Supported fields: + # + # * `license_assignment_state` + # + # Examples: + # + # * `license_assignment_state = ASSIGNED` to list assigned user licenses. + # * `license_assignment_state = NO_LICENSE` to list not licensed users. + # * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users + # who attempted login but no license assigned. + # * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter + # out users who attempted login but no license assigned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest.new + # + # # Call the list_user_licenses method. + # result = client.list_user_licenses 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::DiscoveryEngine::V1::UserLicense. + # p item + # end + # + def list_user_licenses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest + + # 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_user_licenses.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_user_licenses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_user_licenses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_license_service_stub.call_rpc :list_user_licenses, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @user_license_service_stub, :list_user_licenses, 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 + + ## + # Updates the User License. + # This method is used for batch assign/unassign licenses to users. + # + # @overload batch_update_user_licenses(request, options = nil) + # Pass arguments to `batch_update_user_licenses` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_update_user_licenses(inline_source: nil, parent: nil, delete_unassigned_user_licenses: nil) + # Pass arguments to `batch_update_user_licenses` 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 inline_source [::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest::InlineSource, ::Hash] + # The inline source for the input content for document embeddings. + # @param parent [::String] + # Required. The parent [UserStore][] resource name, format: + # `projects/{project}/locations/{location}/userStores/{user_store_id}`. + # @param delete_unassigned_user_licenses [::Boolean] + # Optional. If true, if user licenses removed associated license config, the + # user license will be deleted. By default which is false, the user license + # will be updated to unassigned state. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest.new + # + # # Call the batch_update_user_licenses method. + # result = client.batch_update_user_licenses request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_update_user_licenses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_update_user_licenses.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_update_user_licenses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_update_user_licenses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_license_service_stub.call_rpc :batch_update_user_licenses, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 UserLicenseService API. + # + # This class represents the configuration for UserLicenseService, + # 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::DiscoveryEngine::V1::UserLicenseService::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 + # # list_user_licenses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_user_licenses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_user_licenses.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 UserLicenseService 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 `list_user_licenses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_user_licenses + ## + # RPC-specific configuration for `batch_update_user_licenses` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_update_user_licenses + + # @private + def initialize parent_rpcs = nil + list_user_licenses_config = parent_rpcs.list_user_licenses if parent_rpcs.respond_to? :list_user_licenses + @list_user_licenses = ::Gapic::Config::Method.new list_user_licenses_config + batch_update_user_licenses_config = parent_rpcs.batch_update_user_licenses if parent_rpcs.respond_to? :batch_update_user_licenses + @batch_update_user_licenses = ::Gapic::Config::Method.new batch_update_user_licenses_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/credentials.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/credentials.rb new file mode 100644 index 000000000000..16487ab8c74e --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module UserLicenseService + # Credentials for the UserLicenseService 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 diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/operations.rb new file mode 100644 index 000000000000..9eb1cfd12ed1 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/operations.rb @@ -0,0 +1,813 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module UserLicenseService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the UserLicenseService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the UserLicenseService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/paths.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/paths.rb new file mode 100644 index 000000000000..364b80ad9a8d --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module UserLicenseService + # Path helper methods for the UserLicenseService API. + module Paths + ## + # Create a fully-qualified LicenseConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/licenseConfigs/{license_config}` + # + # @param project [String] + # @param location [String] + # @param license_config [String] + # + # @return [::String] + def license_config_path project:, location:, license_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/licenseConfigs/#{license_config}" + end + + ## + # Create a fully-qualified UserStore resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/userStores/{user_store}` + # + # @param project [String] + # @param location [String] + # @param user_store [String] + # + # @return [::String] + def user_store_path project:, location:, user_store: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/userStores/#{user_store}" + end + + extend self + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest.rb new file mode 100644 index 000000000000..ed0f7305e3f4 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/user_license_service/credentials" +require "google/cloud/discovery_engine/v1/user_license_service/paths" +require "google/cloud/discovery_engine/v1/user_license_service/rest/operations" +require "google/cloud/discovery_engine/v1/user_license_service/rest/client" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing User Licenses. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/discovery_engine/v1/user_license_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new + # + module UserLicenseService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/discovery_engine/v1/user_license_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/client.rb new file mode 100644 index 000000000000..4cea68976a0e --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/client.rb @@ -0,0 +1,590 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/user_license_service_pb" +require "google/cloud/discovery_engine/v1/user_license_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module UserLicenseService + module Rest + ## + # REST client for the UserLicenseService service. + # + # Service for managing User Licenses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_license_service_stub + + ## + # Configure the UserLicenseService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserLicenseService clients + # ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserLicenseService 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::DiscoveryEngine::V1::UserLicenseService::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 + @user_license_service_stub.universe_domain + end + + ## + # Create a new UserLicenseService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserLicenseService 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 + + @operations_client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @user_license_service_stub = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @user_license_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @user_license_service_stub.endpoint + config.universe_domain = @user_license_service_stub.universe_domain + config.logger = @user_license_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @user_license_service_stub.logger + end + + # Service calls + + ## + # Lists the User Licenses. + # + # @overload list_user_licenses(request, options = nil) + # Pass arguments to `list_user_licenses` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest, ::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_user_licenses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_user_licenses` 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 parent [UserStore][] resource name, format: + # `projects/{project}/locations/{location}/userStores/{user_store_id}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, defaults to 10. The maximum value is 50; values + # above 50 will be coerced to 50. + # + # If this field is negative, an INVALID_ARGUMENT error is returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUserLicenses` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUserLicenses` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter for the list request. + # + # Supported fields: + # + # * `license_assignment_state` + # + # Examples: + # + # * `license_assignment_state = ASSIGNED` to list assigned user licenses. + # * `license_assignment_state = NO_LICENSE` to list not licensed users. + # * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users + # who attempted login but no license assigned. + # * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter + # out users who attempted login but no license assigned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest.new + # + # # Call the list_user_licenses method. + # result = client.list_user_licenses 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::DiscoveryEngine::V1::UserLicense. + # p item + # end + # + def list_user_licenses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest + + # 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_user_licenses.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::DiscoveryEngine::V1::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_user_licenses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_user_licenses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_license_service_stub.list_user_licenses request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @user_license_service_stub, :list_user_licenses, "user_licenses", 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 + + ## + # Updates the User License. + # This method is used for batch assign/unassign licenses to users. + # + # @overload batch_update_user_licenses(request, options = nil) + # Pass arguments to `batch_update_user_licenses` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_update_user_licenses(inline_source: nil, parent: nil, delete_unassigned_user_licenses: nil) + # Pass arguments to `batch_update_user_licenses` 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 inline_source [::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest::InlineSource, ::Hash] + # The inline source for the input content for document embeddings. + # @param parent [::String] + # Required. The parent [UserStore][] resource name, format: + # `projects/{project}/locations/{location}/userStores/{user_store_id}`. + # @param delete_unassigned_user_licenses [::Boolean] + # Optional. If true, if user licenses removed associated license config, the + # user license will be deleted. By default which is false, the user license + # will be updated to unassigned state. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest.new + # + # # Call the batch_update_user_licenses method. + # result = client.batch_update_user_licenses request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_update_user_licenses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest + + # 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.batch_update_user_licenses.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::DiscoveryEngine::V1::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.batch_update_user_licenses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_update_user_licenses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_license_service_stub.batch_update_user_licenses request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 UserLicenseService REST API. + # + # This class represents the configuration for UserLicenseService 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::DiscoveryEngine::V1::UserLicenseService::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 + # # list_user_licenses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_user_licenses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_user_licenses.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 = "discoveryengine.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 UserLicenseService 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 `list_user_licenses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_user_licenses + ## + # RPC-specific configuration for `batch_update_user_licenses` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_update_user_licenses + + # @private + def initialize parent_rpcs = nil + list_user_licenses_config = parent_rpcs.list_user_licenses if parent_rpcs.respond_to? :list_user_licenses + @list_user_licenses = ::Gapic::Config::Method.new list_user_licenses_config + batch_update_user_licenses_config = parent_rpcs.batch_update_user_licenses if parent_rpcs.respond_to? :batch_update_user_licenses + @batch_update_user_licenses = ::Gapic::Config::Method.new batch_update_user_licenses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/operations.rb new file mode 100644 index 000000000000..f586c20fcd6b --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/operations.rb @@ -0,0 +1,1148 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module UserLicenseService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the UserLicenseService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the UserLicenseService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::DiscoveryEngine::V1::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::DiscoveryEngine::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::DiscoveryEngine::V1::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "discoveryengine.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/service_stub.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/service_stub.rb new file mode 100644 index 000000000000..c3134896d266 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_license_service/rest/service_stub.rb @@ -0,0 +1,204 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/user_license_service_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module UserLicenseService + module Rest + ## + # REST service stub for the UserLicenseService 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: true, + 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 list_user_licenses REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest] + # 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::DiscoveryEngine::V1::ListUserLicensesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesResponse] + # A result object deserialized from the server's reply + def list_user_licenses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_user_licenses_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_user_licenses", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_update_user_licenses REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_update_user_licenses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_user_licenses_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: "batch_update_user_licenses", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 list_user_licenses REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest] + # 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_user_licenses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/userLicenses", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/userStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_update_user_licenses REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_update_user_licenses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:batchUpdateUserLicenses", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/userStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/answer_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/answer_pb.rb index 0f0b6dc61f6e..75c21b8df255 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/answer_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/answer_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/discoveryengine/v1/answer.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/safety.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf2&\n\x06\x41nswer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.Answer.State\x12\x13\n\x0b\x61nswer_text\x18\x03 \x01(\t\x12\x1c\n\x0fgrounding_score\x18\x0c \x01(\x01H\x00\x88\x01\x01\x12\x43\n\tcitations\x18\x04 \x03(\x0b\x32\x30.google.cloud.discoveryengine.v1.Answer.Citation\x12Y\n\x12grounding_supports\x18\r \x03(\x0b\x32\x38.google.cloud.discoveryengine.v1.Answer.GroundingSupportB\x03\xe0\x41\x01\x12\x45\n\nreferences\x18\x05 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1.Answer.Reference\x12\x19\n\x11related_questions\x18\x06 \x03(\t\x12;\n\x05steps\x18\x07 \x03(\x0b\x32,.google.cloud.discoveryengine.v1.Answer.Step\x12`\n\x18query_understanding_info\x18\n \x01(\x0b\x32>.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo\x12[\n\x16\x61nswer_skipped_reasons\x18\x0b \x03(\x0e\x32;.google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x0esafety_ratings\x18\x0e \x03(\x0b\x32-.google.cloud.discoveryengine.v1.SafetyRatingB\x03\xe0\x41\x01\x1a{\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12G\n\x07sources\x18\x03 \x03(\x0b\x32\x36.google.cloud.discoveryengine.v1.Answer.CitationSource\x1a&\n\x0e\x43itationSource\x12\x14\n\x0creference_id\x18\x01 \x01(\t\x1a\x88\x02\n\x10GroundingSupport\x12\x18\n\x0bstart_index\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x16\n\tend_index\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1c\n\x0fgrounding_score\x18\x03 \x01(\x01H\x00\x88\x01\x01\x12%\n\x18grounding_check_required\x18\x04 \x01(\x08H\x01\x88\x01\x01\x12L\n\x07sources\x18\x05 \x03(\x0b\x32\x36.google.cloud.discoveryengine.v1.Answer.CitationSourceB\x03\xe0\x41\x01\x42\x12\n\x10_grounding_scoreB\x1b\n\x19_grounding_check_required\x1a\xa8\n\n\tReference\x12p\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfoH\x00\x12Q\n\nchunk_info\x18\x02 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfoH\x00\x12l\n\x18structured_document_info\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.Answer.Reference.StructuredDocumentInfoH\x00\x1a\x81\x03\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12o\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32W.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo.ChunkContent\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x1aj\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_score\x1a\xa9\x03\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12g\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata\x1a\xb5\x01\n\x10\x44ocumentMetadata\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x04 \x01(\t\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x12\n\x10_relevance_score\x1a\xac\x01\n\x16StructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12,\n\x0bstruct_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x12\n\x05title\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x42\t\n\x07\x63ontent\x1a\xbc\x08\n\x04Step\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.discoveryengine.v1.Answer.Step.State\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07thought\x18\x03 \x01(\t\x12\x44\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x33.google.cloud.discoveryengine.v1.Answer.Step.Action\x1a\xb8\x06\n\x06\x41\x63tion\x12Y\n\rsearch_action\x18\x02 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.Answer.Step.Action.SearchActionH\x00\x12T\n\x0bobservation\x18\x03 \x01(\x0b\x32?.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation\x1a\x1d\n\x0cSearchAction\x12\r\n\x05query\x18\x01 \x01(\t\x1a\xd3\x04\n\x0bObservation\x12\x64\n\x0esearch_results\x18\x02 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult\x1a\xdd\x03\n\x0cSearchResult\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12n\n\x0csnippet_info\x18\x04 \x03(\x0b\x32X.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.SnippetInfo\x12j\n\nchunk_info\x18\x05 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo\x12,\n\x0bstruct_data\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\x36\n\x0bSnippetInfo\x12\x0f\n\x07snippet\x18\x01 \x01(\t\x12\x16\n\x0esnippet_status\x18\x02 \x01(\t\x1a]\n\tChunkInfo\x12\r\n\x05\x63hunk\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_scoreB\x08\n\x06\x61\x63tion\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x1a\xba\x03\n\x16QueryUnderstandingInfo\x12y\n\x19query_classification_info\x18\x01 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo\x1a\xa4\x02\n\x17QueryClassificationInfo\x12i\n\x04type\x18\x01 \x01(\x0e\x32[.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type\x12\x10\n\x08positive\x18\x02 \x01(\x08\"\x8b\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\x12\x1f\n\x1bNON_ANSWER_SEEKING_QUERY_V2\x10\x04\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\r\n\tSTREAMING\x10\x04\"\xdd\x02\n\x13\x41nswerSkippedReason\x12%\n!ANSWER_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12$\n NON_ANSWER_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x05\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x06\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x07\x12\'\n#NON_ANSWER_SEEKING_QUERY_IGNORED_V2\x10\x08\x12\x17\n\x13LOW_GROUNDED_ANSWER\x10\t:\x85\x03\xea\x41\x81\x03\n%discoveryengine.googleapis.com/Answer\x12\x63projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12|projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12uprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}B\x12\n\x10_grounding_scoreB\xfe\x01\n#com.google.cloud.discoveryengine.v1B\x0b\x41nswerProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n,google/cloud/discoveryengine/v1/answer.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/safety.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xde\'\n\x06\x41nswer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.Answer.State\x12\x13\n\x0b\x61nswer_text\x18\x03 \x01(\t\x12\x1c\n\x0fgrounding_score\x18\x0c \x01(\x01H\x00\x88\x01\x01\x12\x43\n\tcitations\x18\x04 \x03(\x0b\x32\x30.google.cloud.discoveryengine.v1.Answer.Citation\x12Y\n\x12grounding_supports\x18\r \x03(\x0b\x32\x38.google.cloud.discoveryengine.v1.Answer.GroundingSupportB\x03\xe0\x41\x01\x12\x45\n\nreferences\x18\x05 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1.Answer.Reference\x12\x19\n\x11related_questions\x18\x06 \x03(\t\x12;\n\x05steps\x18\x07 \x03(\x0b\x32,.google.cloud.discoveryengine.v1.Answer.Step\x12`\n\x18query_understanding_info\x18\n \x01(\x0b\x32>.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo\x12[\n\x16\x61nswer_skipped_reasons\x18\x0b \x03(\x0e\x32;.google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x0esafety_ratings\x18\x0e \x03(\x0b\x32-.google.cloud.discoveryengine.v1.SafetyRatingB\x03\xe0\x41\x01\x1a{\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12G\n\x07sources\x18\x03 \x03(\x0b\x32\x36.google.cloud.discoveryengine.v1.Answer.CitationSource\x1a&\n\x0e\x43itationSource\x12\x14\n\x0creference_id\x18\x01 \x01(\t\x1a\x88\x02\n\x10GroundingSupport\x12\x18\n\x0bstart_index\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x16\n\tend_index\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1c\n\x0fgrounding_score\x18\x03 \x01(\x01H\x00\x88\x01\x01\x12%\n\x18grounding_check_required\x18\x04 \x01(\x08H\x01\x88\x01\x01\x12L\n\x07sources\x18\x05 \x03(\x0b\x32\x36.google.cloud.discoveryengine.v1.Answer.CitationSourceB\x03\xe0\x41\x01\x42\x12\n\x10_grounding_scoreB\x1b\n\x19_grounding_check_required\x1a\xa8\n\n\tReference\x12p\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfoH\x00\x12Q\n\nchunk_info\x18\x02 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfoH\x00\x12l\n\x18structured_document_info\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.Answer.Reference.StructuredDocumentInfoH\x00\x1a\x81\x03\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12o\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32W.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo.ChunkContent\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x1aj\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_score\x1a\xa9\x03\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12g\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata\x1a\xb5\x01\n\x10\x44ocumentMetadata\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x04 \x01(\t\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x12\n\x10_relevance_score\x1a\xac\x01\n\x16StructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12,\n\x0bstruct_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x12\n\x05title\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x42\t\n\x07\x63ontent\x1a\xbc\x08\n\x04Step\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.discoveryengine.v1.Answer.Step.State\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07thought\x18\x03 \x01(\t\x12\x44\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x33.google.cloud.discoveryengine.v1.Answer.Step.Action\x1a\xb8\x06\n\x06\x41\x63tion\x12Y\n\rsearch_action\x18\x02 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.Answer.Step.Action.SearchActionH\x00\x12T\n\x0bobservation\x18\x03 \x01(\x0b\x32?.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation\x1a\x1d\n\x0cSearchAction\x12\r\n\x05query\x18\x01 \x01(\t\x1a\xd3\x04\n\x0bObservation\x12\x64\n\x0esearch_results\x18\x02 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult\x1a\xdd\x03\n\x0cSearchResult\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12n\n\x0csnippet_info\x18\x04 \x03(\x0b\x32X.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.SnippetInfo\x12j\n\nchunk_info\x18\x05 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo\x12,\n\x0bstruct_data\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\x36\n\x0bSnippetInfo\x12\x0f\n\x07snippet\x18\x01 \x01(\t\x12\x16\n\x0esnippet_status\x18\x02 \x01(\t\x1a]\n\tChunkInfo\x12\r\n\x05\x63hunk\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_scoreB\x08\n\x06\x61\x63tion\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x1a\xe1\x03\n\x16QueryUnderstandingInfo\x12y\n\x19query_classification_info\x18\x01 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo\x1a\xcb\x02\n\x17QueryClassificationInfo\x12i\n\x04type\x18\x01 \x01(\x0e\x32[.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type\x12\x10\n\x08positive\x18\x02 \x01(\x08\"\xb2\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\x12\x1f\n\x1bNON_ANSWER_SEEKING_QUERY_V2\x10\x04\x12%\n!USER_DEFINED_CLASSIFICATION_QUERY\x10\x05\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\r\n\tSTREAMING\x10\x04\"\xa2\x03\n\x13\x41nswerSkippedReason\x12%\n!ANSWER_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12$\n NON_ANSWER_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x05\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x06\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x07\x12\'\n#NON_ANSWER_SEEKING_QUERY_IGNORED_V2\x10\x08\x12\x17\n\x13LOW_GROUNDED_ANSWER\x10\t\x12-\n)USER_DEFINED_CLASSIFICATION_QUERY_IGNORED\x10\n\x12\x14\n\x10UNHELPFUL_ANSWER\x10\x0b:\x85\x03\xea\x41\x81\x03\n%discoveryengine.googleapis.com/Answer\x12\x63projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12|projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12uprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}B\x12\n\x10_grounding_scoreB\xfe\x01\n#com.google.cloud.discoveryengine.v1B\x0b\x41nswerProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/chunk_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/chunk_pb.rb index bb46c72562e8..85726d7ee387 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/chunk_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/chunk_pb.rb @@ -9,7 +9,7 @@ require 'google/protobuf/struct_pb' -descriptor_data = "\n+google/cloud/discoveryengine/v1/chunk.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xe4\x07\n\x05\x43hunk\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12!\n\x0frelevance_score\x18\x08 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12R\n\x11\x64ocument_metadata\x18\x05 \x01(\x0b\x32\x37.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata\x12\x39\n\x13\x64\x65rived_struct_data\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x42\n\tpage_span\x18\x06 \x01(\x0b\x32/.google.cloud.discoveryengine.v1.Chunk.PageSpan\x12Q\n\x0e\x63hunk_metadata\x18\x07 \x01(\x0b\x32\x34.google.cloud.discoveryengine.v1.Chunk.ChunkMetadataB\x03\xe0\x41\x03\x1a\\\n\x10\x44ocumentMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12,\n\x0bstruct_data\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\x30\n\x08PageSpan\x12\x12\n\npage_start\x18\x01 \x01(\x05\x12\x10\n\x08page_end\x18\x02 \x01(\x05\x1a\x8d\x01\n\rChunkMetadata\x12?\n\x0fprevious_chunks\x18\x01 \x03(\x0b\x32&.google.cloud.discoveryengine.v1.Chunk\x12;\n\x0bnext_chunks\x18\x02 \x03(\x0b\x32&.google.cloud.discoveryengine.v1.Chunk:\xb2\x02\xea\x41\xae\x02\n$discoveryengine.googleapis.com/Chunk\x12uprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}\x12\x8e\x01projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}B\x12\n\x10_relevance_scoreB\xfd\x01\n#com.google.cloud.discoveryengine.v1B\nChunkProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n+google/cloud/discoveryengine/v1/chunk.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xff\x0b\n\x05\x43hunk\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12!\n\x0frelevance_score\x18\x08 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12R\n\x11\x64ocument_metadata\x18\x05 \x01(\x0b\x32\x37.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata\x12\x39\n\x13\x64\x65rived_struct_data\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x42\n\tpage_span\x18\x06 \x01(\x0b\x32/.google.cloud.discoveryengine.v1.Chunk.PageSpan\x12Q\n\x0e\x63hunk_metadata\x18\x07 \x01(\x0b\x32\x34.google.cloud.discoveryengine.v1.Chunk.ChunkMetadataB\x03\xe0\x41\x03\x12\x16\n\tdata_urls\x18\t \x03(\tB\x03\xe0\x41\x03\x12 \n\x13\x61nnotation_contents\x18\x0b \x03(\tB\x03\xe0\x41\x03\x12[\n\x13\x61nnotation_metadata\x18\x0c \x03(\x0b\x32\x39.google.cloud.discoveryengine.v1.Chunk.AnnotationMetadataB\x03\xe0\x41\x03\x1a\\\n\x10\x44ocumentMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12,\n\x0bstruct_data\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\x30\n\x08PageSpan\x12\x12\n\npage_start\x18\x01 \x01(\x05\x12\x10\n\x08page_end\x18\x02 \x01(\x05\x1a\x8d\x01\n\rChunkMetadata\x12?\n\x0fprevious_chunks\x18\x01 \x03(\x0b\x32&.google.cloud.discoveryengine.v1.Chunk\x12;\n\x0bnext_chunks\x18\x02 \x03(\x0b\x32&.google.cloud.discoveryengine.v1.Chunk\x1a|\n\x11StructuredContent\x12Q\n\x0estructure_type\x18\x01 \x01(\x0e\x32\x34.google.cloud.discoveryengine.v1.Chunk.StructureTypeB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x86\x01\n\x12\x41nnotationMetadata\x12Y\n\x12structured_content\x18\x01 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.Chunk.StructuredContentB\x03\xe0\x41\x03\x12\x15\n\x08image_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"{\n\rStructureType\x12\x1e\n\x1aSTRUCTURE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15SHAREHOLDER_STRUCTURE\x10\x01\x12\x17\n\x13SIGNATURE_STRUCTURE\x10\x02\x12\x16\n\x12\x43HECKBOX_STRUCTURE\x10\x03:\xb2\x02\xea\x41\xae\x02\n$discoveryengine.googleapis.com/Chunk\x12uprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}\x12\x8e\x01projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}B\x12\n\x10_relevance_scoreB\xfd\x01\n#com.google.cloud.discoveryengine.v1B\nChunkProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -44,6 +44,9 @@ module V1 Chunk::DocumentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Chunk.DocumentMetadata").msgclass Chunk::PageSpan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Chunk.PageSpan").msgclass Chunk::ChunkMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Chunk.ChunkMetadata").msgclass + Chunk::StructuredContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Chunk.StructuredContent").msgclass + Chunk::AnnotationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata").msgclass + Chunk::StructureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Chunk.StructureType").enummodule end end end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/cmek_config_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/cmek_config_service_pb.rb new file mode 100644 index 000000000000..f33f9d187550 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/cmek_config_service_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1/cmek_config_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/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/cloud/discoveryengine/v1/cmek_config_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"p\n\x17UpdateCmekConfigRequest\x12@\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.CmekConfigB\x03\xe0\x41\x02\x12\x13\n\x0bset_default\x18\x02 \x01(\x08\"W\n\x14GetCmekConfigRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)discoveryengine.googleapis.com/CmekConfig\"N\n\x0fSingleRegionKey\x12;\n\x07kms_key\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"cloudkms.googleapis.com/CryptoKeys\"\xc1\x07\n\nCmekConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x07kms_key\x18\x02 \x01(\tB\'\xfa\x41$\n\"cloudkms.googleapis.com/CryptoKeys\x12G\n\x0fkms_key_version\x18\x06 \x01(\tB.\xfa\x41+\n)cloudkms.googleapis.com/CryptoKeyVersions\x12\x45\n\x05state\x18\x03 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1.CmekConfig.StateB\x03\xe0\x41\x03\x12\x17\n\nis_default\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\x1elast_rotation_timestamp_micros\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12Q\n\x12single_region_keys\x18\x07 \x03(\x0b\x32\x30.google.cloud.discoveryengine.v1.SingleRegionKeyB\x03\xe0\x41\x01\x12Z\n\x10notebooklm_state\x18\x08 \x01(\x0e\x32;.google.cloud.discoveryengine.v1.CmekConfig.NotebookLMStateB\x03\xe0\x41\x03\"\x98\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\r\n\tKEY_ISSUE\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x11\n\rDELETE_FAILED\x10\x07\x12\x0c\n\x08UNUSABLE\x10\x05\x12\x13\n\x0f\x41\x43TIVE_ROTATING\x10\x06\x12\x0b\n\x07\x44\x45LETED\x10\x08\"\x83\x01\n\x0fNotebookLMState\x12!\n\x1dNOTEBOOK_LM_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15NOTEBOOK_LM_NOT_READY\x10\x01\x12\x15\n\x11NOTEBOOK_LM_READY\x10\x02\x12\x1b\n\x17NOTEBOOK_LM_NOT_ENABLED\x10\x03:\xbf\x01\xea\x41\xbb\x01\n)discoveryengine.googleapis.com/CmekConfig\x12\x32projects/{project}/locations/{location}/cmekConfig\x12\x41projects/{project}/locations/{location}/cmekConfigs/{cmek_config}*\x0b\x63mekConfigs2\ncmekConfig\"|\n\x18UpdateCmekConfigMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x16ListCmekConfigsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Location\"\\\n\x17ListCmekConfigsResponse\x12\x41\n\x0c\x63mek_configs\x18\x01 \x03(\x0b\x32+.google.cloud.discoveryengine.v1.CmekConfig\"Z\n\x17\x44\x65leteCmekConfigRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)discoveryengine.googleapis.com/CmekConfig\"|\n\x18\x44\x65leteCmekConfigMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\x81\t\n\x11\x43mekConfigService\x12\xe5\x02\n\x10UpdateCmekConfig\x12\x38.google.cloud.discoveryengine.v1.UpdateCmekConfigRequest\x1a\x1d.google.longrunning.Operation\"\xf7\x01\xca\x41\x66\n*google.cloud.discoveryengine.v1.CmekConfig\x12\x38google.cloud.discoveryengine.v1.UpdateCmekConfigMetadata\xda\x41\x06\x63onfig\x82\xd3\xe4\x93\x02\x7f\x32\x33/v1/{config.name=projects/*/locations/*/cmekConfig}:\x06\x63onfigZ@26/v1/{config.name=projects/*/locations/*/cmekConfigs/*}:\x06\x63onfig\x12\xe3\x01\n\rGetCmekConfig\x12\x35.google.cloud.discoveryengine.v1.GetCmekConfigRequest\x1a+.google.cloud.discoveryengine.v1.CmekConfig\"n\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61\x12,/v1/{name=projects/*/locations/*/cmekConfig}Z1\x12//v1/{name=projects/*/locations/*/cmekConfigs/*}\x12\xc6\x01\n\x0fListCmekConfigs\x12\x37.google.cloud.discoveryengine.v1.ListCmekConfigsRequest\x1a\x38.google.cloud.discoveryengine.v1.ListCmekConfigsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/cmekConfigs\x12\x80\x02\n\x10\x44\x65leteCmekConfig\x12\x38.google.cloud.discoveryengine.v1.DeleteCmekConfigRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41Q\n\x15google.protobuf.Empty\x12\x38google.cloud.discoveryengine.v1.DeleteCmekConfigMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/cmekConfigs/*}\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x02\n#com.google.cloud.discoveryengine.v1B\x16\x43mekConfigServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1 + UpdateCmekConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.UpdateCmekConfigRequest").msgclass + GetCmekConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.GetCmekConfigRequest").msgclass + SingleRegionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SingleRegionKey").msgclass + CmekConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.CmekConfig").msgclass + CmekConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.CmekConfig.State").enummodule + CmekConfig::NotebookLMState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.CmekConfig.NotebookLMState").enummodule + UpdateCmekConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.UpdateCmekConfigMetadata").msgclass + ListCmekConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ListCmekConfigsRequest").msgclass + ListCmekConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ListCmekConfigsResponse").msgclass + DeleteCmekConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DeleteCmekConfigRequest").msgclass + DeleteCmekConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DeleteCmekConfigMetadata").msgclass + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/cmek_config_service_services_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/cmek_config_service_services_pb.rb new file mode 100644 index 000000000000..0cc0e58b4fd1 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/cmek_config_service_services_pb.rb @@ -0,0 +1,55 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/discoveryengine/v1/cmek_config_service.proto for package 'Google.Cloud.DiscoveryEngine.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/cmek_config_service_pb' + +module Google + module Cloud + module DiscoveryEngine + module V1 + module CmekConfigService + # Service for managing CMEK related tasks + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.discoveryengine.v1.CmekConfigService' + + # Provisions a CMEK key for use in a location of a customer's project. + # This method will also conduct location validation on the provided + # cmekConfig to make sure the key is valid and can be used in the + # selected location. + rpc :UpdateCmekConfig, ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest, ::Google::Longrunning::Operation + # Gets the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]. + rpc :GetCmekConfig, ::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest, ::Google::Cloud::DiscoveryEngine::V1::CmekConfig + # Lists all the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s + # with the project. + rpc :ListCmekConfigs, ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest, ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse + # De-provisions a CmekConfig. + rpc :DeleteCmekConfig, ::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/common_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/common_pb.rb index 8d7a0e69fd50..f319917117f9 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/common_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/common_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n,google/cloud/discoveryengine/v1/common.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"0\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\"G\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nuser_agent\x18\x02 \x01(\t\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x1c\n\nDoubleList\x12\x0e\n\x06values\x18\x01 \x03(\x01\"\x83\x01\n\x13SearchLinkPromotion\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x65nabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01*b\n\x10IndustryVertical\x12!\n\x1dINDUSTRY_VERTICAL_UNSPECIFIED\x10\x00\x12\x0b\n\x07GENERIC\x10\x01\x12\t\n\x05MEDIA\x10\x02\x12\x13\n\x0fHEALTHCARE_FHIR\x10\x07*\xa4\x01\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cSOLUTION_TYPE_RECOMMENDATION\x10\x01\x12\x18\n\x14SOLUTION_TYPE_SEARCH\x10\x02\x12\x16\n\x12SOLUTION_TYPE_CHAT\x10\x03\x12!\n\x1dSOLUTION_TYPE_GENERATIVE_CHAT\x10\x04*h\n\rSearchUseCase\x12\x1f\n\x1bSEARCH_USE_CASE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEARCH_USE_CASE_SEARCH\x10\x01\x12\x1a\n\x16SEARCH_USE_CASE_BROWSE\x10\x02*_\n\nSearchTier\x12\x1b\n\x17SEARCH_TIER_UNSPECIFIED\x10\x00\x12\x18\n\x14SEARCH_TIER_STANDARD\x10\x01\x12\x1a\n\x16SEARCH_TIER_ENTERPRISE\x10\x02*C\n\x0bSearchAddOn\x12\x1d\n\x19SEARCH_ADD_ON_UNSPECIFIED\x10\x00\x12\x15\n\x11SEARCH_ADD_ON_LLM\x10\x01\x42\xcb\t\n#com.google.cloud.discoveryengine.v1B\x0b\x43ommonProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1\xea\x41\xe6\x01\n%discoveryengine.googleapis.com/Branch\x12Qprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}\x12jprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}\xea\x41m\n)discoveryengine.googleapis.com/Collection\x12@projects/{project}/locations/{location}/collections/{collection}\xea\x41R\n\'discoveryengine.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41}\n.discoveryengine.googleapis.com/GroundingConfig\x12Kprojects/{project}/locations/{location}/groundingConfigs/{grounding_config}\xea\x41w\n,discoveryengine.googleapis.com/RankingConfig\x12Gprojects/{project}/locations/{location}/rankingConfigs/{ranking_config}\xea\x41y\n#healthcare.googleapis.com/FhirStore\x12Rprojects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}\xea\x41\xa4\x01\n&healthcare.googleapis.com/FhirResource\x12zprojects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}b\x06proto3" +descriptor_data = "\n,google/cloud/discoveryengine/v1/common.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"0\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\"G\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nuser_agent\x18\x02 \x01(\t\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x1c\n\nDoubleList\x12\x0e\n\x06values\x18\x01 \x03(\x01\"]\n\tPrincipal\x12\x11\n\x07user_id\x18\x01 \x01(\tH\x00\x12\x12\n\x08group_id\x18\x02 \x01(\tH\x00\x12\x1c\n\x12\x65xternal_entity_id\x18\x03 \x01(\tH\x00\x42\x0b\n\tprincipal\"n\n\x14HealthcareFhirConfig\x12\"\n\x1a\x65nable_configurable_schema\x18\x01 \x01(\x08\x12\x32\n*enable_static_indexing_for_batch_ingestion\x18\x02 \x01(\x08\"\xc6\x01\n\x13SearchLinkPromotion\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x08\x64ocument\x18\x06 \x01(\tB/\xe0\x41\x01\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x16\n\timage_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x65nabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01*b\n\x10IndustryVertical\x12!\n\x1dINDUSTRY_VERTICAL_UNSPECIFIED\x10\x00\x12\x0b\n\x07GENERIC\x10\x01\x12\t\n\x05MEDIA\x10\x02\x12\x13\n\x0fHEALTHCARE_FHIR\x10\x07*\xa4\x01\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cSOLUTION_TYPE_RECOMMENDATION\x10\x01\x12\x18\n\x14SOLUTION_TYPE_SEARCH\x10\x02\x12\x16\n\x12SOLUTION_TYPE_CHAT\x10\x03\x12!\n\x1dSOLUTION_TYPE_GENERATIVE_CHAT\x10\x04*h\n\rSearchUseCase\x12\x1f\n\x1bSEARCH_USE_CASE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEARCH_USE_CASE_SEARCH\x10\x01\x12\x1a\n\x16SEARCH_USE_CASE_BROWSE\x10\x02*_\n\nSearchTier\x12\x1b\n\x17SEARCH_TIER_UNSPECIFIED\x10\x00\x12\x18\n\x14SEARCH_TIER_STANDARD\x10\x01\x12\x1a\n\x16SEARCH_TIER_ENTERPRISE\x10\x02*C\n\x0bSearchAddOn\x12\x1d\n\x19SEARCH_ADD_ON_UNSPECIFIED\x10\x00\x12\x15\n\x11SEARCH_ADD_ON_LLM\x10\x01\x42\xda\r\n#com.google.cloud.discoveryengine.v1B\x0b\x43ommonProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1\xea\x41\xe6\x01\n%discoveryengine.googleapis.com/Branch\x12Qprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}\x12jprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}\xea\x41m\n)discoveryengine.googleapis.com/Collection\x12@projects/{project}/locations/{location}/collections/{collection}\xea\x41R\n\'discoveryengine.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41}\n.discoveryengine.googleapis.com/GroundingConfig\x12Kprojects/{project}/locations/{location}/groundingConfigs/{grounding_config}\xea\x41w\n,discoveryengine.googleapis.com/RankingConfig\x12Gprojects/{project}/locations/{location}/rankingConfigs/{ranking_config}\xea\x41w\n,discoveryengine.googleapis.com/LicenseConfig\x12Gprojects/{project}/locations/{location}/licenseConfigs/{license_config}\xea\x41k\n(discoveryengine.googleapis.com/UserStore\x12?projects/{project}/locations/{location}/userStores/{user_store}\xea\x41y\n#healthcare.googleapis.com/FhirStore\x12Rprojects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}\xea\x41\xa4\x01\n&healthcare.googleapis.com/FhirResource\x12zprojects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}\xea\x41y\n\"cloudkms.googleapis.com/CryptoKeys\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa7\x01\n)cloudkms.googleapis.com/CryptoKeyVersions\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -42,6 +42,8 @@ module V1 CustomAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.CustomAttribute").msgclass UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.UserInfo").msgclass DoubleList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DoubleList").msgclass + Principal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Principal").msgclass + HealthcareFhirConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.HealthcareFhirConfig").msgclass SearchLinkPromotion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchLinkPromotion").msgclass IndustryVertical = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.IndustryVertical").enummodule SolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SolutionType").enummodule diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb index 2d29457e148d..dd9d20a907d5 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb @@ -17,7 +17,7 @@ require 'google/protobuf/field_mask_pb' -descriptor_data = "\nCgoogle/cloud/discoveryengine/v1/conversational_search_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/answer.proto\x1a\x32google/cloud/discoveryengine/v1/conversation.proto\x1a,google/cloud/discoveryengine/v1/safety.proto\x1a\x34google/cloud/discoveryengine/v1/search_service.proto\x1a-google/cloud/discoveryengine/v1/session.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x9d\x05\n\x1b\x43onverseConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\x12>\n\x05query\x18\x02 \x01(\x0b\x32*.google.cloud.discoveryengine.v1.TextInputB\x03\xe0\x41\x02\x12I\n\x0eserving_config\x18\x03 \x01(\tB1\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12\x43\n\x0c\x63onversation\x18\x05 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.Conversation\x12\x13\n\x0bsafe_search\x18\x06 \x01(\x08\x12\x61\n\x0buser_labels\x18\x07 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.ConverseConversationRequest.UserLabelsEntry\x12\x62\n\x0csummary_spec\x18\x08 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec\x12\x0e\n\x06\x66ilter\x18\t \x01(\t\x12L\n\nboost_spec\x18\n \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf0\x01\n\x1c\x43onverseConversationResponse\x12\x35\n\x05reply\x18\x01 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.Reply\x12\x43\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.Conversation\x12T\n\x0esearch_results\x18\x03 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchResponse.SearchResult\"\xa7\x01\n\x19\x43reateConversationRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12H\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.ConversationB\x03\xe0\x41\x02\"\x96\x01\n\x19UpdateConversationRequest\x12H\n\x0c\x63onversation\x18\x01 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.ConversationB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x19\x44\x65leteConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\"[\n\x16GetConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\"\xa5\x01\n\x18ListConversationsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"z\n\x19ListConversationsResponse\x12\x44\n\rconversations\x18\x01 \x03(\x0b\x32-.google.cloud.discoveryengine.v1.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe4/\n\x12\x41nswerQueryRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x05query\x18\x02 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.QueryB\x03\xe0\x41\x02\x12<\n\x07session\x18\x03 \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12S\n\x0bsafety_spec\x18\x04 \x01(\x0b\x32>.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec\x12h\n\x16related_questions_spec\x18\x05 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.AnswerQueryRequest.RelatedQuestionsSpec\x12^\n\x0egrounding_spec\x18\x06 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.AnswerQueryRequest.GroundingSpecB\x03\xe0\x41\x01\x12h\n\x16\x61nswer_generation_spec\x18\x07 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec\x12S\n\x0bsearch_spec\x18\x08 \x01(\x0b\x32>.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec\x12l\n\x18query_understanding_spec\x18\t \x01(\x0b\x32J.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec\x12\x1d\n\x11\x61synchronous_mode\x18\n \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0euser_pseudo_id\x18\x0c \x01(\t\x12X\n\x0buser_labels\x18\r \x03(\x0b\x32\x43.google.cloud.discoveryengine.v1.AnswerQueryRequest.UserLabelsEntry\x12[\n\rend_user_spec\x18\x0e \x01(\x0b\x32?.google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpecB\x03\xe0\x41\x01\x1a\xf9\x03\n\nSafetySpec\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\x12j\n\x0fsafety_settings\x18\x02 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySettingB\x03\xe0\x41\x01\x1a\xee\x02\n\rSafetySetting\x12\x44\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.HarmCategoryB\x03\xe0\x41\x02\x12w\n\tthreshold\x18\x02 \x01(\x0e\x32_.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThresholdB\x03\xe0\x41\x02\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\x1a&\n\x14RelatedQuestionsSpec\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\x1a\x8e\x02\n\rGroundingSpec\x12\'\n\x1ainclude_grounding_supports\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12n\n\x0f\x66iltering_level\x18\x03 \x01(\x0e\x32P.google.cloud.discoveryengine.v1.AnswerQueryRequest.GroundingSpec.FilteringLevelB\x03\xe0\x41\x01\"d\n\x0e\x46ilteringLevel\x12\x1f\n\x1b\x46ILTERING_LEVEL_UNSPECIFIED\x10\x00\x12\x17\n\x13\x46ILTERING_LEVEL_LOW\x10\x01\x12\x18\n\x14\x46ILTERING_LEVEL_HIGH\x10\x02\x1a\xa3\x04\n\x14\x41nswerGenerationSpec\x12\x66\n\nmodel_spec\x18\x01 \x01(\x0b\x32R.google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec\x12h\n\x0bprompt_spec\x18\x02 \x01(\x0b\x32S.google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec\x12\x19\n\x11include_citations\x18\x03 \x01(\x08\x12\x1c\n\x14\x61nswer_language_code\x18\x04 \x01(\t\x12 \n\x18ignore_adversarial_query\x18\x05 \x01(\x08\x12\'\n\x1fignore_non_answer_seeking_query\x18\x06 \x01(\x08\x12(\n\x1bignore_low_relevant_content\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1aignore_jail_breaking_query\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\"\n\tModelSpec\x12\x15\n\rmodel_version\x18\x01 \x01(\t\x1a\x1e\n\nPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\tB\x1e\n\x1c_ignore_low_relevant_content\x1a\xd8\x10\n\nSearchSpec\x12\x64\n\rsearch_params\x18\x01 \x01(\x0b\x32K.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParamsH\x00\x12m\n\x12search_result_list\x18\x02 \x01(\x0b\x32O.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultListH\x00\x1a\xe1\x02\n\x0cSearchParams\x12\x1a\n\x12max_return_results\x18\x01 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12L\n\nboost_spec\x18\x03 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12m\n\x12search_result_mode\x18\x05 \x01(\x0e\x32Q.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode\x12V\n\x10\x64\x61ta_store_specs\x18\x07 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec\x1a\x87\x0c\n\x10SearchResultList\x12t\n\x0esearch_results\x18\x01 \x03(\x0b\x32\\.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult\x1a\xfc\n\n\x0cSearchResult\x12\x9b\x01\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32u.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfoH\x00\x12|\n\nchunk_info\x18\x02 \x01(\x0b\x32\x66.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfoH\x00\x1a\xa6\x06\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\xa1\x01\n\x11\x64ocument_contexts\x18\x04 \x03(\x0b\x32\x85\x01.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext\x12\xa5\x01\n\x13\x65xtractive_segments\x18\x05 \x03(\x0b\x32\x87\x01.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment\x12\xa7\x01\n\x12\x65xtractive_answers\x18\x06 \x03(\x0b\x32\x86\x01.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerB\x02\x18\x01\x1a;\n\x0f\x44ocumentContext\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a=\n\x11\x45xtractiveSegment\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a<\n\x10\x45xtractiveAnswer\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a\x9b\x02\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x92\x01\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32w.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata\x1a.\n\x10\x44ocumentMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\tB\t\n\x07\x63ontentB\x07\n\x05input\x1a\x87\x08\n\x16QueryUnderstandingSpec\x12\x85\x01\n\x19query_classification_spec\x18\x01 \x01(\x0b\x32\x62.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec\x12{\n\x14query_rephraser_spec\x18\x02 \x01(\x0b\x32].google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec\x12%\n\x18\x64isable_spell_correction\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x9f\x02\n\x17QueryClassificationSpec\x12v\n\x05types\x18\x01 \x03(\x0e\x32g.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type\"\x8b\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\x12\x1f\n\x1bNON_ANSWER_SEEKING_QUERY_V2\x10\x04\x1a\x9e\x03\n\x12QueryRephraserSpec\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\x12\x1a\n\x12max_rephrase_steps\x18\x02 \x01(\x05\x12\x80\x01\n\nmodel_spec\x18\x03 \x01(\x0b\x32g.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpecB\x03\xe0\x41\x01\x1a\xd7\x01\n\tModelSpec\x12\x8a\x01\n\nmodel_type\x18\x01 \x01(\x0e\x32q.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelTypeB\x03\xe0\x41\x01\"=\n\tModelType\x12\x1a\n\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SMALL\x10\x01\x12\t\n\x05LARGE\x10\x02\x1a\xd8\x03\n\x0b\x45ndUserSpec\x12o\n\x11\x65nd_user_metadata\x18\x01 \x03(\x0b\x32O.google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaDataB\x03\xe0\x41\x01\x1a\xd7\x02\n\x0f\x45ndUserMetaData\x12o\n\nchunk_info\x18\x01 \x01(\x0b\x32Y.google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfoH\x00\x1a\xc7\x01\n\tChunkInfo\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x85\x01\n\x11\x64ocument_metadata\x18\x02 \x01(\x0b\x32j.google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata\x1a!\n\x10\x44ocumentMetadata\x12\r\n\x05title\x18\x01 \x01(\tB\t\n\x07\x63ontent\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa5\x01\n\x13\x41nswerQueryResponse\x12\x37\n\x06\x61nswer\x18\x01 \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.Answer\x12\x39\n\x07session\x18\x02 \x01(\x0b\x32(.google.cloud.discoveryengine.v1.Session\x12\x1a\n\x12\x61nswer_query_token\x18\x03 \x01(\t\"O\n\x10GetAnswerRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%discoveryengine.googleapis.com/Answer\"\x98\x01\n\x14\x43reateSessionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12>\n\x07session\x18\x02 \x01(\x0b\x32(.google.cloud.discoveryengine.v1.SessionB\x03\xe0\x41\x02\"\x87\x01\n\x14UpdateSessionRequest\x12>\n\x07session\x18\x01 \x01(\x0b\x32(.google.cloud.discoveryengine.v1.SessionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"T\n\x14\x44\x65leteSessionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&discoveryengine.googleapis.com/Session\"v\n\x11GetSessionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12#\n\x16include_answer_details\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa0\x01\n\x13ListSessionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"k\n\x14ListSessionsResponse\x12:\n\x08sessions\x18\x01 \x03(\x0b\x32(.google.cloud.discoveryengine.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x96+\n\x1b\x43onversationalSearchService\x12\xab\x03\n\x14\x43onverseConversation\x12<.google.cloud.discoveryengine.v1.ConverseConversationRequest\x1a=.google.cloud.discoveryengine.v1.ConverseConversationResponse\"\x95\x02\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x81\x02\"G/v1/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse:\x01*ZZ\"U/v1/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse:\x01*ZW\"R/v1/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}:converse:\x01*\x12\xa6\x03\n\x12\x43reateConversation\x12:.google.cloud.discoveryengine.v1.CreateConversationRequest\x1a-.google.cloud.discoveryengine.v1.Conversation\"\xa4\x02\xda\x41\x13parent,conversation\x82\xd3\xe4\x93\x02\x87\x02\">/v1/{parent=projects/*/locations/*/dataStores/*}/conversations:\x0c\x63onversationZ\\\"L/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations:\x0c\x63onversationZY\"I/v1/{parent=projects/*/locations/*/collections/*/engines/*}/conversations:\x0c\x63onversation\x12\xd6\x02\n\x12\x44\x65leteConversation\x12:.google.cloud.discoveryengine.v1.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01*>/v1/{name=projects/*/locations/*/dataStores/*/conversations/*}ZN*L/v1/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZK*I/v1/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}\x12\xd2\x03\n\x12UpdateConversation\x12:.google.cloud.discoveryengine.v1.UpdateConversationRequest\x1a-.google.cloud.discoveryengine.v1.Conversation\"\xd0\x02\xda\x41\x18\x63onversation,update_mask\x82\xd3\xe4\x93\x02\xae\x02\x32K/v1/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}:\x0c\x63onversationZi2Y/v1/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:\x0c\x63onversationZf2V/v1/{conversation.name=projects/*/locations/*/collections/*/engines/*/conversations/*}:\x0c\x63onversation\x12\xe7\x02\n\x0fGetConversation\x12\x37.google.cloud.discoveryengine.v1.GetConversationRequest\x1a-.google.cloud.discoveryengine.v1.Conversation\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01\x12>/v1/{name=projects/*/locations/*/dataStores/*/conversations/*}ZN\x12L/v1/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZK\x12I/v1/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}\x12\xfa\x02\n\x11ListConversations\x12\x39.google.cloud.discoveryengine.v1.ListConversationsRequest\x1a:.google.cloud.discoveryengine.v1.ListConversationsResponse\"\xed\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xdd\x01\x12>/v1/{parent=projects/*/locations/*/dataStores/*}/conversationsZN\x12L/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversationsZK\x12I/v1/{parent=projects/*/locations/*/collections/*/engines/*}/conversations\x12\x9e\x03\n\x0b\x41nswerQuery\x12\x33.google.cloud.discoveryengine.v1.AnswerQueryRequest\x1a\x34.google.cloud.discoveryengine.v1.AnswerQueryResponse\"\xa3\x02\x82\xd3\xe4\x93\x02\x9c\x02\"P/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer:\x01*Zc\"^/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer:\x01*Z`\"[/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer:\x01*\x12\xb8\x03\n\x11StreamAnswerQuery\x12\x33.google.cloud.discoveryengine.v1.AnswerQueryRequest\x1a\x34.google.cloud.discoveryengine.v1.AnswerQueryResponse\"\xb5\x02\x82\xd3\xe4\x93\x02\xae\x02\"V/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:streamAnswer:\x01*Zi\"d/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:streamAnswer:\x01*Zf\"a/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:streamAnswer:\x01*0\x01\x12\xe4\x02\n\tGetAnswer\x12\x31.google.cloud.discoveryengine.v1.GetAnswerRequest\x1a\'.google.cloud.discoveryengine.v1.Answer\"\xfa\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xec\x01\x12\x43/v1/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}ZS\x12Q/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}ZP\x12N/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*/answers/*}\x12\xf4\x02\n\rCreateSession\x12\x35.google.cloud.discoveryengine.v1.CreateSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\x81\x02\xda\x41\x0eparent,session\x82\xd3\xe4\x93\x02\xe9\x01\"9/v1/{parent=projects/*/locations/*/dataStores/*}/sessions:\x07sessionZR\"G/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions:\x07sessionZO\"D/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions:\x07session\x12\xbd\x02\n\rDeleteSession\x12\x35.google.cloud.discoveryengine.v1.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"\xdc\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xce\x01*9/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}ZI*G/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZF*D/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\x91\x03\n\rUpdateSession\x12\x35.google.cloud.discoveryengine.v1.UpdateSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\x9e\x02\xda\x41\x13session,update_mask\x82\xd3\xe4\x93\x02\x81\x02\x32\x41/v1/{session.name=projects/*/locations/*/dataStores/*/sessions/*}:\x07sessionZZ2O/v1/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}:\x07sessionZW2L/v1/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}:\x07session\x12\xc9\x02\n\nGetSession\x12\x32.google.cloud.discoveryengine.v1.GetSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\xdc\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xce\x01\x12\x39/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}ZI\x12G/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZF\x12\x44/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xdc\x02\n\x0cListSessions\x12\x34.google.cloud.discoveryengine.v1.ListSessionsRequest\x1a\x35.google.cloud.discoveryengine.v1.ListSessionsResponse\"\xde\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xce\x01\x12\x39/v1/{parent=projects/*/locations/*/dataStores/*}/sessionsZI\x12G/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessionsZF\x12\x44/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x02\n#com.google.cloud.discoveryengine.v1B ConversationalSearchServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\nCgoogle/cloud/discoveryengine/v1/conversational_search_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/answer.proto\x1a\x32google/cloud/discoveryengine/v1/conversation.proto\x1a,google/cloud/discoveryengine/v1/safety.proto\x1a\x34google/cloud/discoveryengine/v1/search_service.proto\x1a-google/cloud/discoveryengine/v1/session.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x9d\x05\n\x1b\x43onverseConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\x12>\n\x05query\x18\x02 \x01(\x0b\x32*.google.cloud.discoveryengine.v1.TextInputB\x03\xe0\x41\x02\x12I\n\x0eserving_config\x18\x03 \x01(\tB1\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12\x43\n\x0c\x63onversation\x18\x05 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.Conversation\x12\x13\n\x0bsafe_search\x18\x06 \x01(\x08\x12\x61\n\x0buser_labels\x18\x07 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.ConverseConversationRequest.UserLabelsEntry\x12\x62\n\x0csummary_spec\x18\x08 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec\x12\x0e\n\x06\x66ilter\x18\t \x01(\t\x12L\n\nboost_spec\x18\n \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf0\x01\n\x1c\x43onverseConversationResponse\x12\x35\n\x05reply\x18\x01 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.Reply\x12\x43\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.Conversation\x12T\n\x0esearch_results\x18\x03 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchResponse.SearchResult\"\xa7\x01\n\x19\x43reateConversationRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12H\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.ConversationB\x03\xe0\x41\x02\"\x96\x01\n\x19UpdateConversationRequest\x12H\n\x0c\x63onversation\x18\x01 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.ConversationB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x19\x44\x65leteConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\"[\n\x16GetConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\"\xa5\x01\n\x18ListConversationsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"z\n\x19ListConversationsResponse\x12\x44\n\rconversations\x18\x01 \x03(\x0b\x32-.google.cloud.discoveryengine.v1.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8b\x30\n\x12\x41nswerQueryRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x05query\x18\x02 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.QueryB\x03\xe0\x41\x02\x12<\n\x07session\x18\x03 \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12S\n\x0bsafety_spec\x18\x04 \x01(\x0b\x32>.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec\x12h\n\x16related_questions_spec\x18\x05 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.AnswerQueryRequest.RelatedQuestionsSpec\x12^\n\x0egrounding_spec\x18\x06 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.AnswerQueryRequest.GroundingSpecB\x03\xe0\x41\x01\x12h\n\x16\x61nswer_generation_spec\x18\x07 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec\x12S\n\x0bsearch_spec\x18\x08 \x01(\x0b\x32>.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec\x12l\n\x18query_understanding_spec\x18\t \x01(\x0b\x32J.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec\x12\x1d\n\x11\x61synchronous_mode\x18\n \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0euser_pseudo_id\x18\x0c \x01(\t\x12X\n\x0buser_labels\x18\r \x03(\x0b\x32\x43.google.cloud.discoveryengine.v1.AnswerQueryRequest.UserLabelsEntry\x12[\n\rend_user_spec\x18\x0e \x01(\x0b\x32?.google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpecB\x03\xe0\x41\x01\x1a\xf9\x03\n\nSafetySpec\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\x12j\n\x0fsafety_settings\x18\x02 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySettingB\x03\xe0\x41\x01\x1a\xee\x02\n\rSafetySetting\x12\x44\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.HarmCategoryB\x03\xe0\x41\x02\x12w\n\tthreshold\x18\x02 \x01(\x0e\x32_.google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThresholdB\x03\xe0\x41\x02\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\x1a&\n\x14RelatedQuestionsSpec\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\x1a\x8e\x02\n\rGroundingSpec\x12\'\n\x1ainclude_grounding_supports\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12n\n\x0f\x66iltering_level\x18\x03 \x01(\x0e\x32P.google.cloud.discoveryengine.v1.AnswerQueryRequest.GroundingSpec.FilteringLevelB\x03\xe0\x41\x01\"d\n\x0e\x46ilteringLevel\x12\x1f\n\x1b\x46ILTERING_LEVEL_UNSPECIFIED\x10\x00\x12\x17\n\x13\x46ILTERING_LEVEL_LOW\x10\x01\x12\x18\n\x14\x46ILTERING_LEVEL_HIGH\x10\x02\x1a\xa3\x04\n\x14\x41nswerGenerationSpec\x12\x66\n\nmodel_spec\x18\x01 \x01(\x0b\x32R.google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec\x12h\n\x0bprompt_spec\x18\x02 \x01(\x0b\x32S.google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec\x12\x19\n\x11include_citations\x18\x03 \x01(\x08\x12\x1c\n\x14\x61nswer_language_code\x18\x04 \x01(\t\x12 \n\x18ignore_adversarial_query\x18\x05 \x01(\x08\x12\'\n\x1fignore_non_answer_seeking_query\x18\x06 \x01(\x08\x12(\n\x1bignore_low_relevant_content\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1aignore_jail_breaking_query\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\"\n\tModelSpec\x12\x15\n\rmodel_version\x18\x01 \x01(\t\x1a\x1e\n\nPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\tB\x1e\n\x1c_ignore_low_relevant_content\x1a\xd8\x10\n\nSearchSpec\x12\x64\n\rsearch_params\x18\x01 \x01(\x0b\x32K.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParamsH\x00\x12m\n\x12search_result_list\x18\x02 \x01(\x0b\x32O.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultListH\x00\x1a\xe1\x02\n\x0cSearchParams\x12\x1a\n\x12max_return_results\x18\x01 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12L\n\nboost_spec\x18\x03 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12m\n\x12search_result_mode\x18\x05 \x01(\x0e\x32Q.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode\x12V\n\x10\x64\x61ta_store_specs\x18\x07 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec\x1a\x87\x0c\n\x10SearchResultList\x12t\n\x0esearch_results\x18\x01 \x03(\x0b\x32\\.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult\x1a\xfc\n\n\x0cSearchResult\x12\x9b\x01\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32u.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfoH\x00\x12|\n\nchunk_info\x18\x02 \x01(\x0b\x32\x66.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfoH\x00\x1a\xa6\x06\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\xa1\x01\n\x11\x64ocument_contexts\x18\x04 \x03(\x0b\x32\x85\x01.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext\x12\xa5\x01\n\x13\x65xtractive_segments\x18\x05 \x03(\x0b\x32\x87\x01.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment\x12\xa7\x01\n\x12\x65xtractive_answers\x18\x06 \x03(\x0b\x32\x86\x01.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerB\x02\x18\x01\x1a;\n\x0f\x44ocumentContext\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a=\n\x11\x45xtractiveSegment\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a<\n\x10\x45xtractiveAnswer\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a\x9b\x02\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x92\x01\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32w.google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata\x1a.\n\x10\x44ocumentMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\tB\t\n\x07\x63ontentB\x07\n\x05input\x1a\xae\x08\n\x16QueryUnderstandingSpec\x12\x85\x01\n\x19query_classification_spec\x18\x01 \x01(\x0b\x32\x62.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec\x12{\n\x14query_rephraser_spec\x18\x02 \x01(\x0b\x32].google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec\x12%\n\x18\x64isable_spell_correction\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xc6\x02\n\x17QueryClassificationSpec\x12v\n\x05types\x18\x01 \x03(\x0e\x32g.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type\"\xb2\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\x12\x1f\n\x1bNON_ANSWER_SEEKING_QUERY_V2\x10\x04\x12%\n!USER_DEFINED_CLASSIFICATION_QUERY\x10\x05\x1a\x9e\x03\n\x12QueryRephraserSpec\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\x12\x1a\n\x12max_rephrase_steps\x18\x02 \x01(\x05\x12\x80\x01\n\nmodel_spec\x18\x03 \x01(\x0b\x32g.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpecB\x03\xe0\x41\x01\x1a\xd7\x01\n\tModelSpec\x12\x8a\x01\n\nmodel_type\x18\x01 \x01(\x0e\x32q.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelTypeB\x03\xe0\x41\x01\"=\n\tModelType\x12\x1a\n\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SMALL\x10\x01\x12\t\n\x05LARGE\x10\x02\x1a\xd8\x03\n\x0b\x45ndUserSpec\x12o\n\x11\x65nd_user_metadata\x18\x01 \x03(\x0b\x32O.google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaDataB\x03\xe0\x41\x01\x1a\xd7\x02\n\x0f\x45ndUserMetaData\x12o\n\nchunk_info\x18\x01 \x01(\x0b\x32Y.google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfoH\x00\x1a\xc7\x01\n\tChunkInfo\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x85\x01\n\x11\x64ocument_metadata\x18\x02 \x01(\x0b\x32j.google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata\x1a!\n\x10\x44ocumentMetadata\x12\r\n\x05title\x18\x01 \x01(\tB\t\n\x07\x63ontent\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa5\x01\n\x13\x41nswerQueryResponse\x12\x37\n\x06\x61nswer\x18\x01 \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.Answer\x12\x39\n\x07session\x18\x02 \x01(\x0b\x32(.google.cloud.discoveryengine.v1.Session\x12\x1a\n\x12\x61nswer_query_token\x18\x03 \x01(\t\"O\n\x10GetAnswerRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%discoveryengine.googleapis.com/Answer\"\x98\x01\n\x14\x43reateSessionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12>\n\x07session\x18\x02 \x01(\x0b\x32(.google.cloud.discoveryengine.v1.SessionB\x03\xe0\x41\x02\"\x87\x01\n\x14UpdateSessionRequest\x12>\n\x07session\x18\x01 \x01(\x0b\x32(.google.cloud.discoveryengine.v1.SessionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"T\n\x14\x44\x65leteSessionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&discoveryengine.googleapis.com/Session\"v\n\x11GetSessionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12#\n\x16include_answer_details\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa0\x01\n\x13ListSessionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"k\n\x14ListSessionsResponse\x12:\n\x08sessions\x18\x01 \x03(\x0b\x32(.google.cloud.discoveryengine.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x96+\n\x1b\x43onversationalSearchService\x12\xab\x03\n\x14\x43onverseConversation\x12<.google.cloud.discoveryengine.v1.ConverseConversationRequest\x1a=.google.cloud.discoveryengine.v1.ConverseConversationResponse\"\x95\x02\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x81\x02\"G/v1/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse:\x01*ZZ\"U/v1/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse:\x01*ZW\"R/v1/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}:converse:\x01*\x12\xa6\x03\n\x12\x43reateConversation\x12:.google.cloud.discoveryengine.v1.CreateConversationRequest\x1a-.google.cloud.discoveryengine.v1.Conversation\"\xa4\x02\xda\x41\x13parent,conversation\x82\xd3\xe4\x93\x02\x87\x02\">/v1/{parent=projects/*/locations/*/dataStores/*}/conversations:\x0c\x63onversationZ\\\"L/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations:\x0c\x63onversationZY\"I/v1/{parent=projects/*/locations/*/collections/*/engines/*}/conversations:\x0c\x63onversation\x12\xd6\x02\n\x12\x44\x65leteConversation\x12:.google.cloud.discoveryengine.v1.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01*>/v1/{name=projects/*/locations/*/dataStores/*/conversations/*}ZN*L/v1/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZK*I/v1/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}\x12\xd2\x03\n\x12UpdateConversation\x12:.google.cloud.discoveryengine.v1.UpdateConversationRequest\x1a-.google.cloud.discoveryengine.v1.Conversation\"\xd0\x02\xda\x41\x18\x63onversation,update_mask\x82\xd3\xe4\x93\x02\xae\x02\x32K/v1/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}:\x0c\x63onversationZi2Y/v1/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:\x0c\x63onversationZf2V/v1/{conversation.name=projects/*/locations/*/collections/*/engines/*/conversations/*}:\x0c\x63onversation\x12\xe7\x02\n\x0fGetConversation\x12\x37.google.cloud.discoveryengine.v1.GetConversationRequest\x1a-.google.cloud.discoveryengine.v1.Conversation\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01\x12>/v1/{name=projects/*/locations/*/dataStores/*/conversations/*}ZN\x12L/v1/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZK\x12I/v1/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}\x12\xfa\x02\n\x11ListConversations\x12\x39.google.cloud.discoveryengine.v1.ListConversationsRequest\x1a:.google.cloud.discoveryengine.v1.ListConversationsResponse\"\xed\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xdd\x01\x12>/v1/{parent=projects/*/locations/*/dataStores/*}/conversationsZN\x12L/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversationsZK\x12I/v1/{parent=projects/*/locations/*/collections/*/engines/*}/conversations\x12\x9e\x03\n\x0b\x41nswerQuery\x12\x33.google.cloud.discoveryengine.v1.AnswerQueryRequest\x1a\x34.google.cloud.discoveryengine.v1.AnswerQueryResponse\"\xa3\x02\x82\xd3\xe4\x93\x02\x9c\x02\"P/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer:\x01*Zc\"^/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer:\x01*Z`\"[/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer:\x01*\x12\xb8\x03\n\x11StreamAnswerQuery\x12\x33.google.cloud.discoveryengine.v1.AnswerQueryRequest\x1a\x34.google.cloud.discoveryengine.v1.AnswerQueryResponse\"\xb5\x02\x82\xd3\xe4\x93\x02\xae\x02\"V/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:streamAnswer:\x01*Zi\"d/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:streamAnswer:\x01*Zf\"a/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:streamAnswer:\x01*0\x01\x12\xe4\x02\n\tGetAnswer\x12\x31.google.cloud.discoveryengine.v1.GetAnswerRequest\x1a\'.google.cloud.discoveryengine.v1.Answer\"\xfa\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xec\x01\x12\x43/v1/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}ZS\x12Q/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}ZP\x12N/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*/answers/*}\x12\xf4\x02\n\rCreateSession\x12\x35.google.cloud.discoveryengine.v1.CreateSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\x81\x02\xda\x41\x0eparent,session\x82\xd3\xe4\x93\x02\xe9\x01\"9/v1/{parent=projects/*/locations/*/dataStores/*}/sessions:\x07sessionZR\"G/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions:\x07sessionZO\"D/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions:\x07session\x12\xbd\x02\n\rDeleteSession\x12\x35.google.cloud.discoveryengine.v1.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"\xdc\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xce\x01*9/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}ZI*G/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZF*D/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\x91\x03\n\rUpdateSession\x12\x35.google.cloud.discoveryengine.v1.UpdateSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\x9e\x02\xda\x41\x13session,update_mask\x82\xd3\xe4\x93\x02\x81\x02\x32\x41/v1/{session.name=projects/*/locations/*/dataStores/*/sessions/*}:\x07sessionZZ2O/v1/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}:\x07sessionZW2L/v1/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}:\x07session\x12\xc9\x02\n\nGetSession\x12\x32.google.cloud.discoveryengine.v1.GetSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\xdc\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xce\x01\x12\x39/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}ZI\x12G/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZF\x12\x44/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xdc\x02\n\x0cListSessions\x12\x34.google.cloud.discoveryengine.v1.ListSessionsRequest\x1a\x35.google.cloud.discoveryengine.v1.ListSessionsResponse\"\xde\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xce\x01\x12\x39/v1/{parent=projects/*/locations/*/dataStores/*}/sessionsZI\x12G/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessionsZF\x12\x44/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x02\n#com.google.cloud.discoveryengine.v1B ConversationalSearchServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_pb.rb index d66bd13a3722..be1680f24e50 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_pb.rb @@ -6,13 +6,14 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/cloud/discoveryengine/v1/cmek_config_service_pb' require 'google/cloud/discoveryengine/v1/common_pb' require 'google/cloud/discoveryengine/v1/document_processing_config_pb' require 'google/cloud/discoveryengine/v1/schema_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n0google/cloud/discoveryengine/v1/data_store.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a@google/cloud/discoveryengine/v1/document_processing_config.proto\x1a,google/cloud/discoveryengine/v1/schema.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x0b\n\tDataStore\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x11industry_vertical\x18\x03 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1.IndustryVerticalB\x03\xe0\x41\x05\x12\x45\n\x0esolution_types\x18\x05 \x03(\x0e\x32-.google.cloud.discoveryengine.v1.SolutionType\x12\x1e\n\x11\x64\x65\x66\x61ult_schema_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12U\n\x0e\x63ontent_config\x18\x06 \x01(\x0e\x32\x38.google.cloud.discoveryengine.v1.DataStore.ContentConfigB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x63\n\x1b\x61\x64vanced_site_search_config\x18\x0c \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.AdvancedSiteSearchConfigB\x03\xe0\x41\x01\x12]\n\x12\x62illing_estimation\x18\x17 \x01(\x0b\x32<.google.cloud.discoveryengine.v1.DataStore.BillingEstimationB\x03\xe0\x41\x03\x12J\n\x10workspace_config\x18\x19 \x01(\x0b\x32\x30.google.cloud.discoveryengine.v1.WorkspaceConfig\x12]\n\x1a\x64ocument_processing_config\x18\x1b \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.DocumentProcessingConfig\x12@\n\x0fstarting_schema\x18\x1c \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.Schema\x1a\xae\x02\n\x11\x42illingEstimation\x12\x1c\n\x14structured_data_size\x18\x01 \x01(\x03\x12\x1e\n\x16unstructured_data_size\x18\x02 \x01(\x03\x12\x19\n\x11website_data_size\x18\x03 \x01(\x03\x12?\n\x1bstructured_data_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x1dunstructured_data_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x18website_data_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x7f\n\rContentConfig\x12\x1e\n\x1a\x43ONTENT_CONFIG_UNSPECIFIED\x10\x00\x12\x0e\n\nNO_CONTENT\x10\x01\x12\x14\n\x10\x43ONTENT_REQUIRED\x10\x02\x12\x12\n\x0ePUBLIC_WEBSITE\x10\x03\x12\x14\n\x10GOOGLE_WORKSPACE\x10\x04:\xc9\x01\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12?projects/{project}/locations/{location}/dataStores/{data_store}\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\"\x9e\x01\n\x18\x41\x64vancedSiteSearchConfig\x12\"\n\x15\x64isable_initial_index\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12&\n\x19\x64isable_automatic_refresh\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x18\n\x16_disable_initial_indexB\x1c\n\x1a_disable_automatic_refresh\"\xf5\x02\n\x0fWorkspaceConfig\x12\x43\n\x04type\x18\x01 \x01(\x0e\x32\x35.google.cloud.discoveryengine.v1.WorkspaceConfig.Type\x12\x1a\n\x12\x64\x61sher_customer_id\x18\x02 \x01(\t\x12(\n\x1bsuper_admin_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19super_admin_email_address\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xae\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGOOGLE_DRIVE\x10\x01\x12\x0f\n\x0bGOOGLE_MAIL\x10\x02\x12\x10\n\x0cGOOGLE_SITES\x10\x03\x12\x13\n\x0fGOOGLE_CALENDAR\x10\x04\x12\x0f\n\x0bGOOGLE_CHAT\x10\x05\x12\x11\n\rGOOGLE_GROUPS\x10\x06\x12\x0f\n\x0bGOOGLE_KEEP\x10\x07\x12\x11\n\rGOOGLE_PEOPLE\x10\x08\x42\x81\x02\n#com.google.cloud.discoveryengine.v1B\x0e\x44\x61taStoreProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n0google/cloud/discoveryengine/v1/data_store.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/discoveryengine/v1/cmek_config_service.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a@google/cloud/discoveryengine/v1/document_processing_config.proto\x1a,google/cloud/discoveryengine/v1/schema.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\r\n\tDataStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x11industry_vertical\x18\x03 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1.IndustryVerticalB\x03\xe0\x41\x05\x12\x45\n\x0esolution_types\x18\x05 \x03(\x0e\x32-.google.cloud.discoveryengine.v1.SolutionType\x12\x1e\n\x11\x64\x65\x66\x61ult_schema_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12U\n\x0e\x63ontent_config\x18\x06 \x01(\x0e\x32\x38.google.cloud.discoveryengine.v1.DataStore.ContentConfigB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x63\n\x1b\x61\x64vanced_site_search_config\x18\x0c \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.AdvancedSiteSearchConfigB\x03\xe0\x41\x01\x12\x19\n\x0ckms_key_name\x18 \x01(\tB\x03\xe0\x41\x04\x12\x45\n\x0b\x63mek_config\x18\x12 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.CmekConfigB\x03\xe0\x41\x03\x12]\n\x12\x62illing_estimation\x18\x17 \x01(\x0b\x32<.google.cloud.discoveryengine.v1.DataStore.BillingEstimationB\x03\xe0\x41\x03\x12\x18\n\x0b\x61\x63l_enabled\x18\x18 \x01(\x08\x42\x03\xe0\x41\x05\x12J\n\x10workspace_config\x18\x19 \x01(\x0b\x32\x30.google.cloud.discoveryengine.v1.WorkspaceConfig\x12]\n\x1a\x64ocument_processing_config\x18\x1b \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.DocumentProcessingConfig\x12@\n\x0fstarting_schema\x18\x1c \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.Schema\x12Z\n\x16healthcare_fhir_config\x18\x1d \x01(\x0b\x32\x35.google.cloud.discoveryengine.v1.HealthcareFhirConfigB\x03\xe0\x41\x01\x12[\n\x16identity_mapping_store\x18\x1f \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3discoveryengine.googleapis.com/IdentityMappingStore\x1a\xae\x02\n\x11\x42illingEstimation\x12\x1c\n\x14structured_data_size\x18\x01 \x01(\x03\x12\x1e\n\x16unstructured_data_size\x18\x02 \x01(\x03\x12\x19\n\x11website_data_size\x18\x03 \x01(\x03\x12?\n\x1bstructured_data_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x1dunstructured_data_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x18website_data_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x7f\n\rContentConfig\x12\x1e\n\x1a\x43ONTENT_CONFIG_UNSPECIFIED\x10\x00\x12\x0e\n\nNO_CONTENT\x10\x01\x12\x14\n\x10\x43ONTENT_REQUIRED\x10\x02\x12\x12\n\x0ePUBLIC_WEBSITE\x10\x03\x12\x14\n\x10GOOGLE_WORKSPACE\x10\x04:\xc9\x01\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12?projects/{project}/locations/{location}/dataStores/{data_store}\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\"\x9e\x01\n\x18\x41\x64vancedSiteSearchConfig\x12\"\n\x15\x64isable_initial_index\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12&\n\x19\x64isable_automatic_refresh\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x18\n\x16_disable_initial_indexB\x1c\n\x1a_disable_automatic_refresh\"\xf5\x02\n\x0fWorkspaceConfig\x12\x43\n\x04type\x18\x01 \x01(\x0e\x32\x35.google.cloud.discoveryengine.v1.WorkspaceConfig.Type\x12\x1a\n\x12\x64\x61sher_customer_id\x18\x02 \x01(\t\x12(\n\x1bsuper_admin_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19super_admin_email_address\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xae\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGOOGLE_DRIVE\x10\x01\x12\x0f\n\x0bGOOGLE_MAIL\x10\x02\x12\x10\n\x0cGOOGLE_SITES\x10\x03\x12\x13\n\x0fGOOGLE_CALENDAR\x10\x04\x12\x0f\n\x0bGOOGLE_CHAT\x10\x05\x12\x11\n\rGOOGLE_GROUPS\x10\x06\x12\x0f\n\x0bGOOGLE_KEEP\x10\x07\x12\x11\n\rGOOGLE_PEOPLE\x10\x08\x42\x81\x02\n#com.google.cloud.discoveryengine.v1B\x0e\x44\x61taStoreProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -28,8 +29,10 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.discoveryengine.v1.CmekConfig", "google/cloud/discoveryengine/v1/cmek_config_service.proto"], ["google.cloud.discoveryengine.v1.DocumentProcessingConfig", "google/cloud/discoveryengine/v1/document_processing_config.proto"], ["google.cloud.discoveryengine.v1.Schema", "google/cloud/discoveryengine/v1/schema.proto"], + ["google.cloud.discoveryengine.v1.HealthcareFhirConfig", "google/cloud/discoveryengine/v1/common.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb index cf7299497297..2a40be456b65 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n8google/cloud/discoveryengine/v1/data_store_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/discoveryengine/v1/data_store.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x87\x02\n\x16\x43reateDataStoreRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)discoveryengine.googleapis.com/Collection\x12\x43\n\ndata_store\x18\x02 \x01(\x0b\x32*.google.cloud.discoveryengine.v1.DataStoreB\x03\xe0\x41\x02\x12\x1a\n\rdata_store_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12#\n\x1b\x63reate_advanced_site_search\x18\x04 \x01(\x08\x12$\n\x1cskip_default_schema_creation\x18\x07 \x01(\x08\"U\n\x13GetDataStoreRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\"{\n\x17\x43reateDataStoreMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x91\x01\n\x15ListDataStoresRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)discoveryengine.googleapis.com/Collection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"r\n\x16ListDataStoresResponse\x12?\n\x0b\x64\x61ta_stores\x18\x01 \x03(\x0b\x32*.google.cloud.discoveryengine.v1.DataStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x16\x44\x65leteDataStoreRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\"\x8e\x01\n\x16UpdateDataStoreRequest\x12\x43\n\ndata_store\x18\x01 \x01(\x0b\x32*.google.cloud.discoveryengine.v1.DataStoreB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"{\n\x17\x44\x65leteDataStoreMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xdd\x0c\n\x10\x44\x61taStoreService\x12\x84\x03\n\x0f\x43reateDataStore\x12\x37.google.cloud.discoveryengine.v1.CreateDataStoreRequest\x1a\x1d.google.longrunning.Operation\"\x98\x02\xca\x41\x64\n)google.cloud.discoveryengine.v1.DataStore\x12\x37google.cloud.discoveryengine.v1.CreateDataStoreMetadata\xda\x41\x1fparent,data_store,data_store_id\x82\xd3\xe4\x93\x02\x88\x01\"./v1/{parent=projects/*/locations/*}/dataStores:\ndata_storeZJ\"\x12\x12*\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\"{\n\x17\x43reateDataStoreMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x91\x01\n\x15ListDataStoresRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)discoveryengine.googleapis.com/Collection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"r\n\x16ListDataStoresResponse\x12?\n\x0b\x64\x61ta_stores\x18\x01 \x03(\x0b\x32*.google.cloud.discoveryengine.v1.DataStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x16\x44\x65leteDataStoreRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\"\x8e\x01\n\x16UpdateDataStoreRequest\x12\x43\n\ndata_store\x18\x01 \x01(\x0b\x32*.google.cloud.discoveryengine.v1.DataStoreB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"{\n\x17\x44\x65leteDataStoreMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xdd\x0c\n\x10\x44\x61taStoreService\x12\x84\x03\n\x0f\x43reateDataStore\x12\x37.google.cloud.discoveryengine.v1.CreateDataStoreRequest\x1a\x1d.google.longrunning.Operation\"\x98\x02\xca\x41\x64\n)google.cloud.discoveryengine.v1.DataStore\x12\x37google.cloud.discoveryengine.v1.CreateDataStoreMetadata\xda\x41\x1fparent,data_store,data_store_id\x82\xd3\xe4\x93\x02\x88\x01\"./v1/{parent=projects/*/locations/*}/dataStores:\ndata_storeZJ\"\x12\x12*\n\nprincipals\x18\x01 \x03(\x0b\x32*.google.cloud.discoveryengine.v1.Principal\x12\x10\n\x08idp_wide\x18\x02 \x01(\x08\x1a\x86\x01\n\x0bIndexStatus\x12.\n\nindex_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\rerror_samples\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12\x1c\n\x0fpending_message\x18\x03 \x01(\tB\x03\xe0\x41\x05:\x96\x02\xea\x41\x92\x02\n\'discoveryengine.googleapis.com/Document\x12\x66projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}\x12\x7fprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}B\x06\n\x04\x64\x61taB\x80\x02\n#com.google.cloud.discoveryengine.v1B\rDocumentProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -28,6 +29,7 @@ imports = [ ["google.protobuf.Struct", "google/protobuf/struct.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.discoveryengine.v1.Principal", "google/cloud/discoveryengine/v1/common.proto"], ["google.rpc.Status", "google/rpc/status.proto"], ] imports.each do |type_name, expected_filename| @@ -46,6 +48,8 @@ module DiscoveryEngine module V1 Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Document").msgclass Document::Content = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Document.Content").msgclass + Document::AclInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Document.AclInfo").msgclass + Document::AclInfo::AccessRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Document.AclInfo.AccessRestriction").msgclass Document::IndexStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Document.IndexStatus").msgclass end end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb index afc888fa605f..da24f28e1803 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n@google/cloud/discoveryengine/v1/document_processing_config.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xaa\x0c\n\x18\x44ocumentProcessingConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x61\n\x0f\x63hunking_config\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig\x12g\n\x16\x64\x65\x66\x61ult_parsing_config\x18\x04 \x01(\x0b\x32G.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig\x12w\n\x18parsing_config_overrides\x18\x05 \x03(\x0b\x32U.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfigOverridesEntry\x1a\xff\x01\n\x0e\x43hunkingConfig\x12\x8a\x01\n\x1clayout_based_chunking_config\x18\x01 \x01(\x0b\x32\x62.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfigH\x00\x1aR\n\x19LayoutBasedChunkingConfig\x12\x12\n\nchunk_size\x18\x01 \x01(\x05\x12!\n\x19include_ancestor_headings\x18\x02 \x01(\x08\x42\x0c\n\nchunk_mode\x1a\xa2\x04\n\rParsingConfig\x12~\n\x16\x64igital_parsing_config\x18\x01 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.DigitalParsingConfigH\x00\x12v\n\x12ocr_parsing_config\x18\x02 \x01(\x0b\x32X.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.OcrParsingConfigH\x00\x12|\n\x15layout_parsing_config\x18\x03 \x01(\x0b\x32[.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfigH\x00\x1a\x16\n\x14\x44igitalParsingConfig\x1aS\n\x10OcrParsingConfig\x12&\n\x1a\x65nhanced_document_elements\x18\x01 \x03(\tB\x02\x18\x01\x12\x17\n\x0fuse_native_text\x18\x02 \x01(\x08\x1a\x15\n\x13LayoutParsingConfigB\x17\n\x15type_dedicated_config\x1a\x86\x01\n\x1bParsingConfigOverridesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12V\n\x05value\x18\x02 \x01(\x0b\x32G.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig:\x02\x38\x01:\x8a\x02\xea\x41\x86\x02\n7discoveryengine.googleapis.com/DocumentProcessingConfig\x12Xprojects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig\x12qprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfigB\x90\x02\n#com.google.cloud.discoveryengine.v1B\x1d\x44ocumentProcessingConfigProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n@google/cloud/discoveryengine/v1/document_processing_config.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x84\x0e\n\x18\x44ocumentProcessingConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x61\n\x0f\x63hunking_config\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig\x12g\n\x16\x64\x65\x66\x61ult_parsing_config\x18\x04 \x01(\x0b\x32G.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig\x12w\n\x18parsing_config_overrides\x18\x05 \x03(\x0b\x32U.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfigOverridesEntry\x1a\xff\x01\n\x0e\x43hunkingConfig\x12\x8a\x01\n\x1clayout_based_chunking_config\x18\x01 \x01(\x0b\x32\x62.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfigH\x00\x1aR\n\x19LayoutBasedChunkingConfig\x12\x12\n\nchunk_size\x18\x01 \x01(\x05\x12!\n\x19include_ancestor_headings\x18\x02 \x01(\x08\x42\x0c\n\nchunk_mode\x1a\xfc\x05\n\rParsingConfig\x12~\n\x16\x64igital_parsing_config\x18\x01 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.DigitalParsingConfigH\x00\x12v\n\x12ocr_parsing_config\x18\x02 \x01(\x0b\x32X.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.OcrParsingConfigH\x00\x12|\n\x15layout_parsing_config\x18\x03 \x01(\x0b\x32[.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfigH\x00\x1a\x16\n\x14\x44igitalParsingConfig\x1aS\n\x10OcrParsingConfig\x12&\n\x1a\x65nhanced_document_elements\x18\x01 \x03(\tB\x02\x18\x01\x12\x17\n\x0fuse_native_text\x18\x02 \x01(\x08\x1a\xee\x01\n\x13LayoutParsingConfig\x12$\n\x17\x65nable_table_annotation\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17\x65nable_image_annotation\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12%\n\x18structured_content_types\x18\t \x03(\tB\x03\xe0\x41\x01\x12\"\n\x15\x65xclude_html_elements\x18\n \x03(\tB\x03\xe0\x41\x01\x12!\n\x14\x65xclude_html_classes\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_html_ids\x18\x0c \x03(\tB\x03\xe0\x41\x01\x42\x17\n\x15type_dedicated_config\x1a\x86\x01\n\x1bParsingConfigOverridesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12V\n\x05value\x18\x02 \x01(\x0b\x32G.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig:\x02\x38\x01:\x8a\x02\xea\x41\x86\x02\n7discoveryengine.googleapis.com/DocumentProcessingConfig\x12Xprojects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig\x12qprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfigB\x90\x02\n#com.google.cloud.discoveryengine.v1B\x1d\x44ocumentProcessingConfigProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/engine_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/engine_pb.rb index 9a604d673409..3f1bef602c6d 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/engine_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/engine_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/discoveryengine/v1/engine.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa4\x0b\n\x06\x45ngine\x12V\n\x12\x63hat_engine_config\x18\x0b \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.Engine.ChatEngineConfigH\x00\x12Z\n\x14search_engine_config\x18\r \x01(\x0b\x32:.google.cloud.discoveryengine.v1.Engine.SearchEngineConfigH\x00\x12_\n\x14\x63hat_engine_metadata\x18\x0c \x01(\x0b\x32:.google.cloud.discoveryengine.v1.Engine.ChatEngineMetadataB\x03\xe0\x41\x03H\x01\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0e\x64\x61ta_store_ids\x18\x05 \x03(\t\x12I\n\rsolution_type\x18\x06 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.SolutionTypeB\x03\xe0\x41\x02\x12L\n\x11industry_vertical\x18\x10 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1.IndustryVertical\x12K\n\rcommon_config\x18\x0f \x01(\x0b\x32\x34.google.cloud.discoveryengine.v1.Engine.CommonConfig\x12\x1e\n\x11\x64isable_analytics\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01\x1a\x9c\x01\n\x12SearchEngineConfig\x12@\n\x0bsearch_tier\x18\x01 \x01(\x0e\x32+.google.cloud.discoveryengine.v1.SearchTier\x12\x44\n\x0esearch_add_ons\x18\x02 \x03(\x0e\x32,.google.cloud.discoveryengine.v1.SearchAddOn\x1a\xb4\x02\n\x10\x43hatEngineConfig\x12k\n\x15\x61gent_creation_config\x18\x01 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.Engine.ChatEngineConfig.AgentCreationConfig\x12 \n\x18\x64ialogflow_agent_to_link\x18\x02 \x01(\t\x12\x1f\n\x12\x61llow_cross_region\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1ap\n\x13\x41gentCreationConfig\x12\x10\n\x08\x62usiness\x18\x01 \x01(\t\x12\x1d\n\x15\x64\x65\x66\x61ult_language_code\x18\x02 \x01(\t\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08location\x18\x04 \x01(\t\x1a$\n\x0c\x43ommonConfig\x12\x14\n\x0c\x63ompany_name\x18\x01 \x01(\t\x1a.\n\x12\x43hatEngineMetadata\x12\x18\n\x10\x64ialogflow_agent\x18\x01 \x01(\t:}\xea\x41z\n%discoveryengine.googleapis.com/Engine\x12Qprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}B\x0f\n\rengine_configB\x11\n\x0f\x65ngine_metadataB\xfe\x01\n#com.google.cloud.discoveryengine.v1B\x0b\x45ngineProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n,google/cloud/discoveryengine/v1/engine.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe1\x14\n\x06\x45ngine\x12V\n\x12\x63hat_engine_config\x18\x0b \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.Engine.ChatEngineConfigH\x00\x12Z\n\x14search_engine_config\x18\r \x01(\x0b\x32:.google.cloud.discoveryengine.v1.Engine.SearchEngineConfigH\x00\x12u\n\"media_recommendation_engine_config\x18\x0e \x01(\x0b\x32G.google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfigH\x00\x12_\n\x14\x63hat_engine_metadata\x18\x0c \x01(\x0b\x32:.google.cloud.discoveryengine.v1.Engine.ChatEngineMetadataB\x03\xe0\x41\x03H\x01\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x64\x61ta_store_ids\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12I\n\rsolution_type\x18\x06 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.SolutionTypeB\x03\xe0\x41\x02\x12Q\n\x11industry_vertical\x18\x10 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1.IndustryVerticalB\x03\xe0\x41\x01\x12K\n\rcommon_config\x18\x0f \x01(\x0b\x32\x34.google.cloud.discoveryengine.v1.Engine.CommonConfig\x12\x1e\n\x11\x64isable_analytics\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01\x1a\x9c\x01\n\x12SearchEngineConfig\x12@\n\x0bsearch_tier\x18\x01 \x01(\x0e\x32+.google.cloud.discoveryengine.v1.SearchTier\x12\x44\n\x0esearch_add_ons\x18\x02 \x03(\x0e\x32,.google.cloud.discoveryengine.v1.SearchAddOn\x1a\xb6\x08\n\x1fMediaRecommendationEngineConfig\x12\x11\n\x04type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x16optimization_objective\x18\x02 \x01(\t\x12\x8a\x01\n\x1doptimization_objective_config\x18\x03 \x01(\x0b\x32\x63.google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig\x12m\n\x0etraining_state\x18\x04 \x01(\x0e\x32U.google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.TrainingState\x12\x81\x01\n\x16\x65ngine_features_config\x18\x05 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfigB\x03\xe0\x41\x01\x1a_\n\x1bOptimizationObjectiveConfig\x12\x19\n\x0ctarget_field\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12%\n\x18target_field_value_float\x18\x02 \x01(\x02\x42\x03\xe0\x41\x02\x1a\xbf\x02\n\x14\x45ngineFeaturesConfig\x12\x8c\x01\n\x1arecommended_for_you_config\x18\x01 \x01(\x0b\x32\x66.google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfigH\x00\x12\x7f\n\x13most_popular_config\x18\x02 \x01(\x0b\x32`.google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfigH\x00\x42\x17\n\x15type_dedicated_config\x1a<\n\x1eRecommendedForYouFeatureConfig\x12\x1a\n\x12\x63ontext_event_type\x18\x01 \x01(\t\x1a\x34\n\x18MostPopularFeatureConfig\x12\x18\n\x10time_window_days\x18\x01 \x01(\x03\"I\n\rTrainingState\x12\x1e\n\x1aTRAINING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06PAUSED\x10\x01\x12\x0c\n\x08TRAINING\x10\x02\x1a\xb4\x02\n\x10\x43hatEngineConfig\x12k\n\x15\x61gent_creation_config\x18\x01 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.Engine.ChatEngineConfig.AgentCreationConfig\x12 \n\x18\x64ialogflow_agent_to_link\x18\x02 \x01(\t\x12\x1f\n\x12\x61llow_cross_region\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1ap\n\x13\x41gentCreationConfig\x12\x10\n\x08\x62usiness\x18\x01 \x01(\t\x12\x1d\n\x15\x64\x65\x66\x61ult_language_code\x18\x02 \x01(\t\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08location\x18\x04 \x01(\t\x1a$\n\x0c\x43ommonConfig\x12\x14\n\x0c\x63ompany_name\x18\x01 \x01(\t\x1a.\n\x12\x43hatEngineMetadata\x12\x18\n\x10\x64ialogflow_agent\x18\x01 \x01(\t:}\xea\x41z\n%discoveryengine.googleapis.com/Engine\x12Qprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}B\x0f\n\rengine_configB\x11\n\x0f\x65ngine_metadataB\xfe\x01\n#com.google.cloud.discoveryengine.v1B\x0b\x45ngineProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -43,6 +43,12 @@ module DiscoveryEngine module V1 Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine").msgclass Engine::SearchEngineConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.SearchEngineConfig").msgclass + Engine::MediaRecommendationEngineConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig").msgclass + Engine::MediaRecommendationEngineConfig::OptimizationObjectiveConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig").msgclass + Engine::MediaRecommendationEngineConfig::EngineFeaturesConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig").msgclass + Engine::MediaRecommendationEngineConfig::RecommendedForYouFeatureConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig").msgclass + Engine::MediaRecommendationEngineConfig::MostPopularFeatureConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig").msgclass + Engine::MediaRecommendationEngineConfig::TrainingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.TrainingState").enummodule Engine::ChatEngineConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.ChatEngineConfig").msgclass Engine::ChatEngineConfig::AgentCreationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.ChatEngineConfig.AgentCreationConfig").msgclass Engine::CommonConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Engine.CommonConfig").msgclass diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb index 245ab455180f..f506c7527d54 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb @@ -11,7 +11,7 @@ require 'google/cloud/discoveryengine/v1/grounding_pb' -descriptor_data = "\nAgoogle/cloud/discoveryengine/v1/grounded_generation_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/discoveryengine/v1/grounding.proto\"\x99\x01\n\x19GroundedGenerationContent\x12\x0c\n\x04role\x18\x01 \x01(\t\x12N\n\x05parts\x18\x02 \x03(\x0b\x32?.google.cloud.discoveryengine.v1.GroundedGenerationContent.Part\x1a\x1e\n\x04Part\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x42\x06\n\x04\x64\x61ta\"\x9f\x15\n\x1eGenerateGroundedContentRequest\x12\x41\n\x08location\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Location\x12V\n\x12system_instruction\x18\x05 \x01(\x0b\x32:.google.cloud.discoveryengine.v1.GroundedGenerationContent\x12L\n\x08\x63ontents\x18\x02 \x03(\x0b\x32:.google.cloud.discoveryengine.v1.GroundedGenerationContent\x12g\n\x0fgeneration_spec\x18\x03 \x01(\x0b\x32N.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GenerationSpec\x12\x65\n\x0egrounding_spec\x18\x04 \x01(\x0b\x32M.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSpec\x12\x64\n\x0buser_labels\x18\x06 \x03(\x0b\x32O.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.UserLabelsEntry\x1a\xdb\x02\n\x0eGenerationSpec\x12\x10\n\x08model_id\x18\x03 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x18\n\x0btemperature\x18\x04 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05top_p\x18\x05 \x01(\x02H\x01\x88\x01\x01\x12\x12\n\x05top_k\x18\x07 \x01(\x05H\x02\x88\x01\x01\x12\x1e\n\x11\x66requency_penalty\x18\x08 \x01(\x02H\x03\x88\x01\x01\x12\x11\n\x04seed\x18\x0c \x01(\x05H\x04\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\t \x01(\x02H\x05\x88\x01\x01\x12\x1e\n\x11max_output_tokens\x18\n \x01(\x05H\x06\x88\x01\x01\x42\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x14\n\x12_frequency_penaltyB\x07\n\x05_seedB\x13\n\x11_presence_penaltyB\x14\n\x12_max_output_tokens\x1a\xbb\x03\n\x1d\x44ynamicRetrievalConfiguration\x12\x8a\x01\n\tpredictor\x18\x01 \x01(\x0b\x32w.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor\x1a\x8c\x02\n\x19\x44ynamicRetrievalPredictor\x12\x90\x01\n\x07version\x18\x01 \x01(\x0e\x32\x7f.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor.Version\x12\x16\n\tthreshold\x18\x02 \x01(\x02H\x00\x88\x01\x01\"6\n\x07Version\x12\x17\n\x13VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0eV1_INDEPENDENT\x10\x01\x42\x0c\n\n_threshold\x1a\x91\t\n\x0fGroundingSource\x12u\n\rinline_source\x18\x01 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.InlineSourceH\x00\x12u\n\rsearch_source\x18\x02 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.SearchSourceH\x00\x12\x82\x01\n\x14google_search_source\x18\x03 \x01(\x0b\x32\x62.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSourceH\x00\x12\x97\x01\n\x1f\x65nterprise_web_retrieval_source\x18\x08 \x01(\x0b\x32l.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSourceH\x00\x1a\x8d\x02\n\x0cInlineSource\x12G\n\x0fgrounding_facts\x18\x01 \x03(\x0b\x32..google.cloud.discoveryengine.v1.GroundingFact\x12\x80\x01\n\nattributes\x18\x02 \x03(\x0b\x32l.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.InlineSource.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x98\x01\n\x0cSearchSource\x12I\n\x0eserving_config\x18\x01 \x01(\tB1\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12\x18\n\x10max_result_count\x18\x02 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x13\n\x0bsafe_search\x18\x05 \x01(\x08\x1a\x9b\x01\n\x12GoogleSearchSource\x12\x84\x01\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32].google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfigurationB\x03\xe0\x41\x01\x1a\x1e\n\x1c\x45nterpriseWebRetrievalSourceB\x08\n\x06source\x1a{\n\rGroundingSpec\x12j\n\x11grounding_sources\x18\x01 \x03(\x0b\x32O.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe9\x14\n\x1fGenerateGroundedContentResponse\x12^\n\ncandidates\x18\x01 \x03(\x0b\x32J.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate\x1a\xe5\x13\n\tCandidate\x12\r\n\x05index\x18\x01 \x01(\x05\x12K\n\x07\x63ontent\x18\x02 \x01(\x0b\x32:.google.cloud.discoveryengine.v1.GroundedGenerationContent\x12\x1c\n\x0fgrounding_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12x\n\x12grounding_metadata\x18\x04 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata\x1a\xcf\x11\n\x11GroundingMetadata\x12\x8a\x01\n\x12retrieval_metadata\x18\x05 \x03(\x0b\x32n.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata\x12\x42\n\x0esupport_chunks\x18\x01 \x03(\x0b\x32*.google.cloud.discoveryengine.v1.FactChunk\x12\x1a\n\x12web_search_queries\x18\x03 \x03(\t\x12\x89\x01\n\x12search_entry_point\x18\x04 \x01(\x0b\x32m.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint\x12\x88\x01\n\x11grounding_support\x18\x02 \x03(\x0b\x32m.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport\x12z\n\x06images\x18\t \x03(\x0b\x32j.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata\x1a\xa7\x03\n\x11RetrievalMetadata\x12\x85\x01\n\x06source\x18\x01 \x01(\x0e\x32u.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata.Source\x12\x99\x01\n\x1a\x64ynamic_retrieval_metadata\x18\x02 \x01(\x0b\x32u.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalMetadata\"n\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x14\n\x10VERTEX_AI_SEARCH\x10\x01\x12\x11\n\rGOOGLE_SEARCH\x10\x03\x12\x12\n\x0eINLINE_CONTENT\x10\x02\x12\x0f\n\x0bGOOGLE_MAPS\x10\x04\x1a\xb7\x01\n\x18\x44ynamicRetrievalMetadata\x12\x9a\x01\n\x12predictor_metadata\x18\x01 \x01(\x0b\x32~.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata\x1a\x9e\x02\n!DynamicRetrievalPredictorMetadata\x12\x98\x01\n\x07version\x18\x01 \x01(\x0e\x32\x86\x01.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata.Version\x12\x17\n\nprediction\x18\x02 \x01(\x02H\x00\x88\x01\x01\"6\n\x07Version\x12\x17\n\x13VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0eV1_INDEPENDENT\x10\x01\x42\r\n\x0b_prediction\x1a>\n\x10SearchEntryPoint\x12\x18\n\x10rendered_content\x18\x01 \x01(\t\x12\x10\n\x08sdk_blob\x18\x02 \x01(\x0c\x1as\n\x10GroundingSupport\x12\x12\n\nclaim_text\x18\x01 \x01(\t\x12\x1d\n\x15support_chunk_indices\x18\x03 \x03(\x05\x12\x1a\n\rsupport_score\x18\x02 \x01(\x02H\x00\x88\x01\x01\x42\x10\n\x0e_support_score\x1a\xff\x03\n\rImageMetadata\x12\x7f\n\x05image\x18\x01 \x01(\x0b\x32p.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image\x12\x83\x01\n\tthumbnail\x18\x02 \x01(\x0b\x32p.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image\x12\x86\x01\n\x06source\x18\x03 \x01(\x0b\x32v.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo\x1a)\n\x0bWebsiteInfo\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x1a\x33\n\x05Image\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x42\x12\n\x10_grounding_score\"L\n\x12\x43heckGroundingSpec\x12\x1f\n\x12\x63itation_threshold\x18\x01 \x01(\x01H\x00\x88\x01\x01\x42\x15\n\x13_citation_threshold\"\x9f\x03\n\x15\x43heckGroundingRequest\x12P\n\x10grounding_config\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.discoveryengine.googleapis.com/GroundingConfig\x12\x18\n\x10\x61nswer_candidate\x18\x02 \x01(\t\x12=\n\x05\x66\x61\x63ts\x18\x03 \x03(\x0b\x32..google.cloud.discoveryengine.v1.GroundingFact\x12K\n\x0egrounding_spec\x18\x04 \x01(\x0b\x32\x33.google.cloud.discoveryengine.v1.CheckGroundingSpec\x12[\n\x0buser_labels\x18\x05 \x03(\x0b\x32\x46.google.cloud.discoveryengine.v1.CheckGroundingRequest.UserLabelsEntry\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb0\x04\n\x16\x43heckGroundingResponse\x12\x1a\n\rsupport_score\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12@\n\x0c\x63ited_chunks\x18\x03 \x03(\x0b\x32*.google.cloud.discoveryengine.v1.FactChunk\x12\x64\n\x0b\x63ited_facts\x18\x06 \x03(\x0b\x32O.google.cloud.discoveryengine.v1.CheckGroundingResponse.CheckGroundingFactChunk\x12M\n\x06\x63laims\x18\x04 \x03(\x0b\x32=.google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim\x1a-\n\x17\x43heckGroundingFactChunk\x12\x12\n\nchunk_text\x18\x01 \x01(\t\x1a\xc1\x01\n\x05\x43laim\x12\x16\n\tstart_pos\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07\x65nd_pos\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x12\n\nclaim_text\x18\x03 \x01(\t\x12\x18\n\x10\x63itation_indices\x18\x04 \x03(\x05\x12%\n\x18grounding_check_required\x18\x06 \x01(\x08H\x02\x88\x01\x01\x42\x0c\n\n_start_posB\n\n\x08_end_posB\x1b\n\x19_grounding_check_requiredB\x10\n\x0e_support_score2\xa8\x06\n\x19GroundedGenerationService\x12\xf6\x01\n\x1dStreamGenerateGroundedContent\x12?.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest\x1a@.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse\"N\x82\xd3\xe4\x93\x02H\"C/v1/{location=projects/*/locations/*}:streamGenerateGroundedContent:\x01*(\x01\x30\x01\x12\xe6\x01\n\x17GenerateGroundedContent\x12?.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest\x1a@.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse\"H\x82\xd3\xe4\x93\x02\x42\"=/v1/{location=projects/*/locations/*}:generateGroundedContent:\x01*\x12\xd4\x01\n\x0e\x43heckGrounding\x12\x36.google.cloud.discoveryengine.v1.CheckGroundingRequest\x1a\x37.google.cloud.discoveryengine.v1.CheckGroundingResponse\"Q\x82\xd3\xe4\x93\x02K\"F/v1/{grounding_config=projects/*/locations/*/groundingConfigs/*}:check:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x02\n#com.google.cloud.discoveryengine.v1B\x1eGroundedGenerationServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\nAgoogle/cloud/discoveryengine/v1/grounded_generation_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/discoveryengine/v1/grounding.proto\"\x99\x01\n\x19GroundedGenerationContent\x12\x0c\n\x04role\x18\x01 \x01(\t\x12N\n\x05parts\x18\x02 \x03(\x0b\x32?.google.cloud.discoveryengine.v1.GroundedGenerationContent.Part\x1a\x1e\n\x04Part\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x42\x06\n\x04\x64\x61ta\"\x9f\x15\n\x1eGenerateGroundedContentRequest\x12\x41\n\x08location\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Location\x12V\n\x12system_instruction\x18\x05 \x01(\x0b\x32:.google.cloud.discoveryengine.v1.GroundedGenerationContent\x12L\n\x08\x63ontents\x18\x02 \x03(\x0b\x32:.google.cloud.discoveryengine.v1.GroundedGenerationContent\x12g\n\x0fgeneration_spec\x18\x03 \x01(\x0b\x32N.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GenerationSpec\x12\x65\n\x0egrounding_spec\x18\x04 \x01(\x0b\x32M.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSpec\x12\x64\n\x0buser_labels\x18\x06 \x03(\x0b\x32O.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.UserLabelsEntry\x1a\xdb\x02\n\x0eGenerationSpec\x12\x10\n\x08model_id\x18\x03 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x18\n\x0btemperature\x18\x04 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05top_p\x18\x05 \x01(\x02H\x01\x88\x01\x01\x12\x12\n\x05top_k\x18\x07 \x01(\x05H\x02\x88\x01\x01\x12\x1e\n\x11\x66requency_penalty\x18\x08 \x01(\x02H\x03\x88\x01\x01\x12\x11\n\x04seed\x18\x0c \x01(\x05H\x04\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\t \x01(\x02H\x05\x88\x01\x01\x12\x1e\n\x11max_output_tokens\x18\n \x01(\x05H\x06\x88\x01\x01\x42\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x14\n\x12_frequency_penaltyB\x07\n\x05_seedB\x13\n\x11_presence_penaltyB\x14\n\x12_max_output_tokens\x1a\xbb\x03\n\x1d\x44ynamicRetrievalConfiguration\x12\x8a\x01\n\tpredictor\x18\x01 \x01(\x0b\x32w.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor\x1a\x8c\x02\n\x19\x44ynamicRetrievalPredictor\x12\x90\x01\n\x07version\x18\x01 \x01(\x0e\x32\x7f.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor.Version\x12\x16\n\tthreshold\x18\x02 \x01(\x02H\x00\x88\x01\x01\"6\n\x07Version\x12\x17\n\x13VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0eV1_INDEPENDENT\x10\x01\x42\x0c\n\n_threshold\x1a\x91\t\n\x0fGroundingSource\x12u\n\rinline_source\x18\x01 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.InlineSourceH\x00\x12u\n\rsearch_source\x18\x02 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.SearchSourceH\x00\x12\x82\x01\n\x14google_search_source\x18\x03 \x01(\x0b\x32\x62.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSourceH\x00\x12\x97\x01\n\x1f\x65nterprise_web_retrieval_source\x18\x08 \x01(\x0b\x32l.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSourceH\x00\x1a\x8d\x02\n\x0cInlineSource\x12G\n\x0fgrounding_facts\x18\x01 \x03(\x0b\x32..google.cloud.discoveryengine.v1.GroundingFact\x12\x80\x01\n\nattributes\x18\x02 \x03(\x0b\x32l.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.InlineSource.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x98\x01\n\x0cSearchSource\x12I\n\x0eserving_config\x18\x01 \x01(\tB1\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12\x18\n\x10max_result_count\x18\x02 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x13\n\x0bsafe_search\x18\x05 \x01(\x08\x1a\x9b\x01\n\x12GoogleSearchSource\x12\x84\x01\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32].google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfigurationB\x03\xe0\x41\x01\x1a\x1e\n\x1c\x45nterpriseWebRetrievalSourceB\x08\n\x06source\x1a{\n\rGroundingSpec\x12j\n\x11grounding_sources\x18\x01 \x03(\x0b\x32O.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe9\x14\n\x1fGenerateGroundedContentResponse\x12^\n\ncandidates\x18\x01 \x03(\x0b\x32J.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate\x1a\xe5\x13\n\tCandidate\x12\r\n\x05index\x18\x01 \x01(\x05\x12K\n\x07\x63ontent\x18\x02 \x01(\x0b\x32:.google.cloud.discoveryengine.v1.GroundedGenerationContent\x12\x1c\n\x0fgrounding_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12x\n\x12grounding_metadata\x18\x04 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata\x1a\xcf\x11\n\x11GroundingMetadata\x12\x8a\x01\n\x12retrieval_metadata\x18\x05 \x03(\x0b\x32n.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata\x12\x42\n\x0esupport_chunks\x18\x01 \x03(\x0b\x32*.google.cloud.discoveryengine.v1.FactChunk\x12\x1a\n\x12web_search_queries\x18\x03 \x03(\t\x12\x89\x01\n\x12search_entry_point\x18\x04 \x01(\x0b\x32m.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint\x12\x88\x01\n\x11grounding_support\x18\x02 \x03(\x0b\x32m.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport\x12z\n\x06images\x18\t \x03(\x0b\x32j.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata\x1a\xa7\x03\n\x11RetrievalMetadata\x12\x85\x01\n\x06source\x18\x01 \x01(\x0e\x32u.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata.Source\x12\x99\x01\n\x1a\x64ynamic_retrieval_metadata\x18\x02 \x01(\x0b\x32u.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalMetadata\"n\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x14\n\x10VERTEX_AI_SEARCH\x10\x01\x12\x11\n\rGOOGLE_SEARCH\x10\x03\x12\x12\n\x0eINLINE_CONTENT\x10\x02\x12\x0f\n\x0bGOOGLE_MAPS\x10\x04\x1a\xb7\x01\n\x18\x44ynamicRetrievalMetadata\x12\x9a\x01\n\x12predictor_metadata\x18\x01 \x01(\x0b\x32~.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata\x1a\x9e\x02\n!DynamicRetrievalPredictorMetadata\x12\x98\x01\n\x07version\x18\x01 \x01(\x0e\x32\x86\x01.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata.Version\x12\x17\n\nprediction\x18\x02 \x01(\x02H\x00\x88\x01\x01\"6\n\x07Version\x12\x17\n\x13VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0eV1_INDEPENDENT\x10\x01\x42\r\n\x0b_prediction\x1a>\n\x10SearchEntryPoint\x12\x18\n\x10rendered_content\x18\x01 \x01(\t\x12\x10\n\x08sdk_blob\x18\x02 \x01(\x0c\x1as\n\x10GroundingSupport\x12\x12\n\nclaim_text\x18\x01 \x01(\t\x12\x1d\n\x15support_chunk_indices\x18\x03 \x03(\x05\x12\x1a\n\rsupport_score\x18\x02 \x01(\x02H\x00\x88\x01\x01\x42\x10\n\x0e_support_score\x1a\xff\x03\n\rImageMetadata\x12\x7f\n\x05image\x18\x01 \x01(\x0b\x32p.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image\x12\x83\x01\n\tthumbnail\x18\x02 \x01(\x0b\x32p.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image\x12\x86\x01\n\x06source\x18\x03 \x01(\x0b\x32v.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo\x1a)\n\x0bWebsiteInfo\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x1a\x33\n\x05Image\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x42\x12\n\x10_grounding_score\"\x90\x01\n\x12\x43heckGroundingSpec\x12\x1f\n\x12\x63itation_threshold\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12%\n\x18\x65nable_claim_level_score\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x15\n\x13_citation_thresholdB\x1b\n\x19_enable_claim_level_score\"\x9f\x03\n\x15\x43heckGroundingRequest\x12P\n\x10grounding_config\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.discoveryengine.googleapis.com/GroundingConfig\x12\x18\n\x10\x61nswer_candidate\x18\x02 \x01(\t\x12=\n\x05\x66\x61\x63ts\x18\x03 \x03(\x0b\x32..google.cloud.discoveryengine.v1.GroundingFact\x12K\n\x0egrounding_spec\x18\x04 \x01(\x0b\x32\x33.google.cloud.discoveryengine.v1.CheckGroundingSpec\x12[\n\x0buser_labels\x18\x05 \x03(\x0b\x32\x46.google.cloud.discoveryengine.v1.CheckGroundingRequest.UserLabelsEntry\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xce\x04\n\x16\x43heckGroundingResponse\x12\x1a\n\rsupport_score\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12@\n\x0c\x63ited_chunks\x18\x03 \x03(\x0b\x32*.google.cloud.discoveryengine.v1.FactChunk\x12\x64\n\x0b\x63ited_facts\x18\x06 \x03(\x0b\x32O.google.cloud.discoveryengine.v1.CheckGroundingResponse.CheckGroundingFactChunk\x12M\n\x06\x63laims\x18\x04 \x03(\x0b\x32=.google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim\x1a-\n\x17\x43heckGroundingFactChunk\x12\x12\n\nchunk_text\x18\x01 \x01(\t\x1a\xdf\x01\n\x05\x43laim\x12\x16\n\tstart_pos\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07\x65nd_pos\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x12\n\nclaim_text\x18\x03 \x01(\t\x12\x18\n\x10\x63itation_indices\x18\x04 \x03(\x05\x12%\n\x18grounding_check_required\x18\x06 \x01(\x08H\x02\x88\x01\x01\x12\x12\n\x05score\x18\x07 \x01(\x01H\x03\x88\x01\x01\x42\x0c\n\n_start_posB\n\n\x08_end_posB\x1b\n\x19_grounding_check_requiredB\x08\n\x06_scoreB\x10\n\x0e_support_score2\xa8\x06\n\x19GroundedGenerationService\x12\xf6\x01\n\x1dStreamGenerateGroundedContent\x12?.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest\x1a@.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse\"N\x82\xd3\xe4\x93\x02H\"C/v1/{location=projects/*/locations/*}:streamGenerateGroundedContent:\x01*(\x01\x30\x01\x12\xe6\x01\n\x17GenerateGroundedContent\x12?.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest\x1a@.google.cloud.discoveryengine.v1.GenerateGroundedContentResponse\"H\x82\xd3\xe4\x93\x02\x42\"=/v1/{location=projects/*/locations/*}:generateGroundedContent:\x01*\x12\xd4\x01\n\x0e\x43heckGrounding\x12\x36.google.cloud.discoveryengine.v1.CheckGroundingRequest\x1a\x37.google.cloud.discoveryengine.v1.CheckGroundingResponse\"Q\x82\xd3\xe4\x93\x02K\"F/v1/{grounding_config=projects/*/locations/*/groundingConfigs/*}:check:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x02\n#com.google.cloud.discoveryengine.v1B\x1eGroundedGenerationServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/grounding_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/grounding_pb.rb index e6a5d1c9ef89..300c5940833b 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/grounding_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n/google/cloud/discoveryengine/v1/grounding.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa9\x01\n\rGroundingFact\x12\x11\n\tfact_text\x18\x01 \x01(\t\x12R\n\nattributes\x18\x02 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.GroundingFact.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xce\x01\n\tFactChunk\x12\x12\n\nchunk_text\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\r\n\x05index\x18\x04 \x01(\x05\x12W\n\x0fsource_metadata\x18\x03 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.FactChunk.SourceMetadataEntry\x1a\x35\n\x13SourceMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x81\x02\n#com.google.cloud.discoveryengine.v1B\x0eGroundingProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n/google/cloud/discoveryengine/v1/grounding.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa9\x01\n\rGroundingFact\x12\x11\n\tfact_text\x18\x01 \x01(\t\x12R\n\nattributes\x18\x02 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.GroundingFact.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfa\x01\n\tFactChunk\x12\x12\n\nchunk_text\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\r\n\x05index\x18\x04 \x01(\x05\x12W\n\x0fsource_metadata\x18\x03 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.FactChunk.SourceMetadataEntry\x12\x0b\n\x03uri\x18\x05 \x01(\t\x12\r\n\x05title\x18\x06 \x01(\t\x12\x0e\n\x06\x64omain\x18\x07 \x01(\t\x1a\x35\n\x13SourceMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x81\x02\n#com.google.cloud.discoveryengine.v1B\x0eGroundingProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_pb.rb new file mode 100644 index 000000000000..55f73b95b1a6 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1/identity_mapping_store.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/discoveryengine/v1/cmek_config_service_pb' + + +descriptor_data = "\n.google.cloud.discoveryengine.v1.ImportIdentityMappingsRequest\x1a\x1d.google.longrunning.Operation\"\xf8\x01\xca\x41\x87\x01\n>google.cloud.discoveryengine.v1.ImportIdentityMappingsResponse\x12\x45google.cloud.discoveryengine.v1.IdentityMappingEntryOperationMetadata\x82\xd3\xe4\x93\x02g\"b/v1/{identity_mapping_store=projects/*/locations/*/identityMappingStores/*}:importIdentityMappings:\x01*\x12\xc5\x02\n\x15PurgeIdentityMappings\x12=.google.cloud.discoveryengine.v1.PurgeIdentityMappingsRequest\x1a\x1d.google.longrunning.Operation\"\xcd\x01\xca\x41^\n\x15google.protobuf.Empty\x12\x45google.cloud.discoveryengine.v1.IdentityMappingEntryOperationMetadata\x82\xd3\xe4\x93\x02\x66\"a/v1/{identity_mapping_store=projects/*/locations/*/identityMappingStores/*}:purgeIdentityMappings:\x01*\x12\xfd\x01\n\x14ListIdentityMappings\x12<.google.cloud.discoveryengine.v1.ListIdentityMappingsRequest\x1a=.google.cloud.discoveryengine.v1.ListIdentityMappingsResponse\"h\x82\xd3\xe4\x93\x02\x62\x12`/v1/{identity_mapping_store=projects/*/locations/*/identityMappingStores/*}:listIdentityMappings\x12\xee\x01\n\x19ListIdentityMappingStores\x12\x41.google.cloud.discoveryengine.v1.ListIdentityMappingStoresRequest\x1a\x42.google.cloud.discoveryengine.v1.ListIdentityMappingStoresResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/identityMappingStores\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x02\n#com.google.cloud.discoveryengine.v1B IdentityMappingStoreServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.discoveryengine.v1.IdentityMappingStore", "google/cloud/discoveryengine/v1/identity_mapping_store.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1 + CreateIdentityMappingStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.CreateIdentityMappingStoreRequest").msgclass + GetIdentityMappingStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.GetIdentityMappingStoreRequest").msgclass + DeleteIdentityMappingStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DeleteIdentityMappingStoreRequest").msgclass + ImportIdentityMappingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ImportIdentityMappingsRequest").msgclass + ImportIdentityMappingsRequest::InlineSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ImportIdentityMappingsRequest.InlineSource").msgclass + ImportIdentityMappingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ImportIdentityMappingsResponse").msgclass + PurgeIdentityMappingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.PurgeIdentityMappingsRequest").msgclass + PurgeIdentityMappingsRequest::InlineSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.PurgeIdentityMappingsRequest.InlineSource").msgclass + ListIdentityMappingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ListIdentityMappingsRequest").msgclass + ListIdentityMappingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ListIdentityMappingsResponse").msgclass + ListIdentityMappingStoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ListIdentityMappingStoresRequest").msgclass + ListIdentityMappingStoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ListIdentityMappingStoresResponse").msgclass + IdentityMappingEntryOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.IdentityMappingEntryOperationMetadata").msgclass + DeleteIdentityMappingStoreMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DeleteIdentityMappingStoreMetadata").msgclass + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb.rb new file mode 100644 index 000000000000..1794bb14c265 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/discoveryengine/v1/identity_mapping_store_service.proto for package 'Google.Cloud.DiscoveryEngine.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/identity_mapping_store_service_pb' + +module Google + module Cloud + module DiscoveryEngine + module V1 + module IdentityMappingStoreService + # Service for managing Identity Mapping Stores. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.discoveryengine.v1.IdentityMappingStoreService' + + # Creates a new Identity Mapping Store. + rpc :CreateIdentityMappingStore, ::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest, ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore + # Gets the Identity Mapping Store. + rpc :GetIdentityMappingStore, ::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest, ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore + # Deletes the Identity Mapping Store. + rpc :DeleteIdentityMappingStore, ::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest, ::Google::Longrunning::Operation + # Imports a list of Identity Mapping Entries to an Identity Mapping Store. + rpc :ImportIdentityMappings, ::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest, ::Google::Longrunning::Operation + # Purges specified or all Identity Mapping Entries from an Identity Mapping + # Store. + rpc :PurgeIdentityMappings, ::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest, ::Google::Longrunning::Operation + # Lists Identity Mappings in an Identity Mapping Store. + rpc :ListIdentityMappings, ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest, ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsResponse + # Lists all Identity Mapping Stores. + rpc :ListIdentityMappingStores, ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest, ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/search_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/search_service_pb.rb index aad0b86043b3..042c7fe7392f 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/search_service_pb.rb @@ -14,7 +14,7 @@ require 'google/protobuf/struct_pb' -descriptor_data = "\n4google/cloud/discoveryengine/v1/search_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/discoveryengine/v1/chunk.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a.google/cloud/discoveryengine/v1/document.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x96\x30\n\rSearchRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x06\x62ranch\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12N\n\x0bimage_query\x18\x13 \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.SearchRequest.ImageQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x19\n\x11one_box_page_size\x18/ \x01(\x05\x12V\n\x10\x64\x61ta_store_specs\x18 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec\x12\x0e\n\x06\x66ilter\x18\x07 \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1d \x01(\t\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12<\n\tuser_info\x18\x15 \x01(\x0b\x32).google.cloud.discoveryengine.v1.UserInfo\x12\x15\n\rlanguage_code\x18# \x01(\t\x12M\n\x0b\x66\x61\x63\x65t_specs\x18\t \x03(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.FacetSpec\x12L\n\nboost_spec\x18\n \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec\x12J\n\x06params\x18\x0b \x03(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.ParamsEntry\x12_\n\x14query_expansion_spec\x18\r \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec\x12\x61\n\x15spell_correction_spec\x18\x0e \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec\x12\x16\n\x0euser_pseudo_id\x18\x0f \x01(\t\x12]\n\x13\x63ontent_search_spec\x18\x18 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec\x12\x13\n\x0bsafe_search\x18\x14 \x01(\x08\x12S\n\x0buser_labels\x18\x16 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.SearchRequest.UserLabelsEntry\x12\x63\n\x17search_as_you_type_spec\x18\x1f \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec\x12U\n\x0c\x64isplay_spec\x18& \x01(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpecB\x03\xe0\x41\x01\x12<\n\x07session\x18) \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12P\n\x0csession_spec\x18* \x01(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec\x12^\n\x13relevance_threshold\x18, \x01(\x0e\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold\x12\x64\n\x14relevance_score_spec\x18\x34 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpecB\x03\xe0\x41\x01\x1a,\n\nImageQuery\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\tH\x00\x42\x07\n\x05image\x1a\xbd\x01\n\rDataStoreSpec\x12\x44\n\ndata_store\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Q\n\nboost_spec\x18\x06 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpecB\x03\xe0\x41\x01\x1a\xfc\x02\n\tFacetSpec\x12Y\n\tfacet_key\x18\x01 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xc5\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\tintervals\x18\x02 \x03(\x0b\x32).google.cloud.discoveryengine.v1.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x04 \x03(\t\x12\x10\n\x08\x63ontains\x18\x05 \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\x06 \x01(\x08\x12\x10\n\x08order_by\x18\x07 \x01(\t\x1a\xbc\x07\n\tBoostSpec\x12j\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32K.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec\x1a\xc2\x06\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x12x\n\x12\x62oost_control_spec\x18\x03 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec\x1a\x8f\x05\n\x10\x42oostControlSpec\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x82\x01\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32j.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType\x12\x8a\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32n.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType\x12\x81\x01\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32i.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint\x1a=\n\x0c\x43ontrolPoint\x12\x17\n\x0f\x61ttribute_value\x18\x01 \x01(\t\x12\x14\n\x0c\x62oost_amount\x18\x02 \x01(\x02\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a\xd4\x01\n\x12QueryExpansionSpec\x12^\n\tcondition\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xa9\x01\n\x13SpellCorrectionSpec\x12U\n\x04mode\x18\x01 \x01(\x0e\x32G.google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xa2\x0c\n\x11\x43ontentSearchSpec\x12\x62\n\x0csnippet_spec\x18\x01 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec\x12\x62\n\x0csummary_spec\x18\x02 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec\x12w\n\x17\x65xtractive_content_spec\x18\x03 \x01(\x0b\x32V.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec\x12m\n\x12search_result_mode\x18\x04 \x01(\x0e\x32Q.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode\x12^\n\nchunk_spec\x18\x05 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec\x1a`\n\x0bSnippetSpec\x12\x1d\n\x11max_snippet_count\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x1a\n\x0ereference_only\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0ereturn_snippet\x18\x03 \x01(\x08\x1a\xbc\x04\n\x0bSummarySpec\x12\x1c\n\x14summary_result_count\x18\x01 \x01(\x05\x12\x19\n\x11include_citations\x18\x02 \x01(\x08\x12 \n\x18ignore_adversarial_query\x18\x03 \x01(\x08\x12(\n ignore_non_summary_seeking_query\x18\x04 \x01(\x08\x12#\n\x1bignore_low_relevant_content\x18\t \x01(\x08\x12\'\n\x1aignore_jail_breaking_query\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\x11model_prompt_spec\x18\x05 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec\x12\x15\n\rlanguage_code\x18\x06 \x01(\t\x12j\n\nmodel_spec\x18\x07 \x01(\x0b\x32V.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec\x12\x1b\n\x13use_semantic_chunks\x18\x08 \x01(\x08\x1a#\n\x0fModelPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\t\x1a\x1c\n\tModelSpec\x12\x0f\n\x07version\x18\x01 \x01(\t\x1a\xc5\x01\n\x15\x45xtractiveContentSpec\x12#\n\x1bmax_extractive_answer_count\x18\x01 \x01(\x05\x12$\n\x1cmax_extractive_segment_count\x18\x02 \x01(\x05\x12\'\n\x1freturn_extractive_segment_score\x18\x03 \x01(\x08\x12\x1d\n\x15num_previous_segments\x18\x04 \x01(\x05\x12\x19\n\x11num_next_segments\x18\x05 \x01(\x05\x1a\x41\n\tChunkSpec\x12\x1b\n\x13num_previous_chunks\x18\x01 \x01(\x05\x12\x17\n\x0fnum_next_chunks\x18\x02 \x01(\x05\"Q\n\x10SearchResultMode\x12\"\n\x1eSEARCH_RESULT_MODE_UNSPECIFIED\x10\x00\x12\r\n\tDOCUMENTS\x10\x01\x12\n\n\x06\x43HUNKS\x10\x02\x1a\xc3\x01\n\x13SearchAsYouTypeSpec\x12_\n\tcondition\x18\x01 \x01(\x0e\x32L.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition\"K\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x08\n\x04\x41UTO\x10\x03\x1a\x98\x02\n\x0b\x44isplaySpec\x12{\n\x1cmatch_highlighting_condition\x18\x01 \x01(\x0e\x32U.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.MatchHighlightingCondition\"\x8b\x01\n\x1aMatchHighlightingCondition\x12,\n(MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMATCH_HIGHLIGHTING_DISABLED\x10\x01\x12\x1e\n\x1aMATCH_HIGHLIGHTING_ENABLED\x10\x02\x1aq\n\x0bSessionSpec\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12,\n\x1fsearch_result_persistence_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\"\n _search_result_persistence_count\x1a\x39\n\x12RelevanceScoreSpec\x12#\n\x16return_relevance_score\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"d\n\x12RelevanceThreshold\x12#\n\x1fRELEVANCE_THRESHOLD_UNSPECIFIED\x10\x00\x12\n\n\x06LOWEST\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\xe8\x16\n\x0eSearchResponse\x12M\n\x07results\x18\x01 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchResponse.SearchResult\x12\x45\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x35.google.cloud.discoveryengine.v1.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x19\n\x11\x61ttribution_token\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x0c \x01(\t\x12\x17\n\x0fnext_page_token\x18\x05 \x01(\t\x12\x17\n\x0f\x63orrected_query\x18\x07 \x01(\t\x12H\n\x07summary\x18\t \x01(\x0b\x32\x37.google.cloud.discoveryengine.v1.SearchResponse.Summary\x12`\n\x14query_expansion_info\x18\x0e \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo\x12Q\n\x0csession_info\x18\x13 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo\x12T\n\x16search_link_promotions\x18\x17 \x03(\x0b\x32\x34.google.cloud.discoveryengine.v1.SearchLinkPromotion\x1a\xd9\x02\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12;\n\x08\x64ocument\x18\x02 \x01(\x0b\x32).google.cloud.discoveryengine.v1.Document\x12\x35\n\x05\x63hunk\x18\x12 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.Chunk\x12h\n\x0cmodel_scores\x18\x04 \x03(\x0b\x32M.google.cloud.discoveryengine.v1.SearchResponse.SearchResult.ModelScoresEntryB\x03\xe0\x41\x03\x1a_\n\x10ModelScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.DoubleList:\x02\x38\x01\x1a\xf9\x01\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12P\n\x06values\x18\x02 \x03(\x0b\x32@.google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1az\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12=\n\x08interval\x18\x02 \x01(\x0b\x32).google.cloud.discoveryengine.v1.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x42\r\n\x0b\x66\x61\x63\x65t_value\x1a\xa1\x0c\n\x07Summary\x12\x14\n\x0csummary_text\x18\x01 \x01(\t\x12m\n\x17summary_skipped_reasons\x18\x02 \x03(\x0e\x32L.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason\x12\x63\n\x11safety_attributes\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes\x12j\n\x15summary_with_metadata\x18\x04 \x01(\x0b\x32K.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata\x1a\x36\n\x10SafetyAttributes\x12\x12\n\ncategories\x18\x01 \x03(\t\x12\x0e\n\x06scores\x18\x02 \x03(\x02\x1ag\n\x10\x43itationMetadata\x12S\n\tcitations\x18\x01 \x03(\x0b\x32@.google.cloud.discoveryengine.v1.SearchResponse.Summary.Citation\x1a\x8b\x01\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12W\n\x07sources\x18\x03 \x03(\x0b\x32\x46.google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationSource\x1a)\n\x0e\x43itationSource\x12\x17\n\x0freference_index\x18\x04 \x01(\x03\x1a\x8c\x02\n\tReference\x12\r\n\x05title\x18\x01 \x01(\t\x12\x41\n\x08\x64ocument\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x66\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32N.google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference.ChunkContent\x1a\x38\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x1a\xe2\x01\n\x13SummaryWithMetadata\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x63\n\x11\x63itation_metadata\x18\x02 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationMetadata\x12U\n\nreferences\x18\x03 \x03(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference\"\xf1\x02\n\x14SummarySkippedReason\x12&\n\"SUMMARY_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12%\n!NON_SUMMARY_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x19\n\x15LLM_ADDON_NOT_ENABLED\x10\x05\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x06\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x07\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x08\x12(\n$NON_SUMMARY_SEEKING_QUERY_IGNORED_V2\x10\t\x12\x0c\n\x08TIME_OUT\x10\n\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a-\n\x0bSessionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08query_id\x18\x02 \x01(\t2\x97\x07\n\rSearchService\x12\x8f\x03\n\x06Search\x12..google.cloud.discoveryengine.v1.SearchRequest\x1a/.google.cloud.discoveryengine.v1.SearchResponse\"\xa3\x02\x82\xd3\xe4\x93\x02\x9c\x02\"P/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\x01*Zc\"^/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search:\x01*Z`\"[/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:search:\x01*\x12\x9f\x03\n\nSearchLite\x12..google.cloud.discoveryengine.v1.SearchRequest\x1a/.google.cloud.discoveryengine.v1.SearchResponse\"\xaf\x02\x82\xd3\xe4\x93\x02\xa8\x02\"T/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zg\"b/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zd\"_/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:searchLite:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x02\n#com.google.cloud.discoveryengine.v1B\x12SearchServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n4google/cloud/discoveryengine/v1/search_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/discoveryengine/v1/chunk.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a.google/cloud/discoveryengine/v1/document.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xbc\x30\n\rSearchRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x06\x62ranch\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12N\n\x0bimage_query\x18\x13 \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.SearchRequest.ImageQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x19\n\x11one_box_page_size\x18/ \x01(\x05\x12V\n\x10\x64\x61ta_store_specs\x18 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec\x12\x0e\n\x06\x66ilter\x18\x07 \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1d \x01(\t\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12<\n\tuser_info\x18\x15 \x01(\x0b\x32).google.cloud.discoveryengine.v1.UserInfo\x12\x15\n\rlanguage_code\x18# \x01(\t\x12M\n\x0b\x66\x61\x63\x65t_specs\x18\t \x03(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.FacetSpec\x12L\n\nboost_spec\x18\n \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec\x12J\n\x06params\x18\x0b \x03(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.ParamsEntry\x12_\n\x14query_expansion_spec\x18\r \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec\x12\x61\n\x15spell_correction_spec\x18\x0e \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec\x12\x16\n\x0euser_pseudo_id\x18\x0f \x01(\t\x12]\n\x13\x63ontent_search_spec\x18\x18 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec\x12\x13\n\x0bsafe_search\x18\x14 \x01(\x08\x12S\n\x0buser_labels\x18\x16 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.SearchRequest.UserLabelsEntry\x12\x63\n\x17search_as_you_type_spec\x18\x1f \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec\x12U\n\x0c\x64isplay_spec\x18& \x01(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpecB\x03\xe0\x41\x01\x12<\n\x07session\x18) \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12P\n\x0csession_spec\x18* \x01(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec\x12^\n\x13relevance_threshold\x18, \x01(\x0e\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold\x12\x64\n\x14relevance_score_spec\x18\x34 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpecB\x03\xe0\x41\x01\x1a,\n\nImageQuery\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\tH\x00\x42\x07\n\x05image\x1a\xe3\x01\n\rDataStoreSpec\x12\x44\n\ndata_store\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Q\n\nboost_spec\x18\x06 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpecB\x03\xe0\x41\x01\x12$\n\x17\x63ustom_search_operators\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xfc\x02\n\tFacetSpec\x12Y\n\tfacet_key\x18\x01 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xc5\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\tintervals\x18\x02 \x03(\x0b\x32).google.cloud.discoveryengine.v1.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x04 \x03(\t\x12\x10\n\x08\x63ontains\x18\x05 \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\x06 \x01(\x08\x12\x10\n\x08order_by\x18\x07 \x01(\t\x1a\xbc\x07\n\tBoostSpec\x12j\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32K.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec\x1a\xc2\x06\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x12x\n\x12\x62oost_control_spec\x18\x03 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec\x1a\x8f\x05\n\x10\x42oostControlSpec\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x82\x01\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32j.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType\x12\x8a\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32n.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType\x12\x81\x01\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32i.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint\x1a=\n\x0c\x43ontrolPoint\x12\x17\n\x0f\x61ttribute_value\x18\x01 \x01(\t\x12\x14\n\x0c\x62oost_amount\x18\x02 \x01(\x02\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a\xd4\x01\n\x12QueryExpansionSpec\x12^\n\tcondition\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xa9\x01\n\x13SpellCorrectionSpec\x12U\n\x04mode\x18\x01 \x01(\x0e\x32G.google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xa2\x0c\n\x11\x43ontentSearchSpec\x12\x62\n\x0csnippet_spec\x18\x01 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec\x12\x62\n\x0csummary_spec\x18\x02 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec\x12w\n\x17\x65xtractive_content_spec\x18\x03 \x01(\x0b\x32V.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec\x12m\n\x12search_result_mode\x18\x04 \x01(\x0e\x32Q.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode\x12^\n\nchunk_spec\x18\x05 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec\x1a`\n\x0bSnippetSpec\x12\x1d\n\x11max_snippet_count\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x1a\n\x0ereference_only\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0ereturn_snippet\x18\x03 \x01(\x08\x1a\xbc\x04\n\x0bSummarySpec\x12\x1c\n\x14summary_result_count\x18\x01 \x01(\x05\x12\x19\n\x11include_citations\x18\x02 \x01(\x08\x12 \n\x18ignore_adversarial_query\x18\x03 \x01(\x08\x12(\n ignore_non_summary_seeking_query\x18\x04 \x01(\x08\x12#\n\x1bignore_low_relevant_content\x18\t \x01(\x08\x12\'\n\x1aignore_jail_breaking_query\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\x11model_prompt_spec\x18\x05 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec\x12\x15\n\rlanguage_code\x18\x06 \x01(\t\x12j\n\nmodel_spec\x18\x07 \x01(\x0b\x32V.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec\x12\x1b\n\x13use_semantic_chunks\x18\x08 \x01(\x08\x1a#\n\x0fModelPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\t\x1a\x1c\n\tModelSpec\x12\x0f\n\x07version\x18\x01 \x01(\t\x1a\xc5\x01\n\x15\x45xtractiveContentSpec\x12#\n\x1bmax_extractive_answer_count\x18\x01 \x01(\x05\x12$\n\x1cmax_extractive_segment_count\x18\x02 \x01(\x05\x12\'\n\x1freturn_extractive_segment_score\x18\x03 \x01(\x08\x12\x1d\n\x15num_previous_segments\x18\x04 \x01(\x05\x12\x19\n\x11num_next_segments\x18\x05 \x01(\x05\x1a\x41\n\tChunkSpec\x12\x1b\n\x13num_previous_chunks\x18\x01 \x01(\x05\x12\x17\n\x0fnum_next_chunks\x18\x02 \x01(\x05\"Q\n\x10SearchResultMode\x12\"\n\x1eSEARCH_RESULT_MODE_UNSPECIFIED\x10\x00\x12\r\n\tDOCUMENTS\x10\x01\x12\n\n\x06\x43HUNKS\x10\x02\x1a\xc3\x01\n\x13SearchAsYouTypeSpec\x12_\n\tcondition\x18\x01 \x01(\x0e\x32L.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition\"K\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x08\n\x04\x41UTO\x10\x03\x1a\x98\x02\n\x0b\x44isplaySpec\x12{\n\x1cmatch_highlighting_condition\x18\x01 \x01(\x0e\x32U.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.MatchHighlightingCondition\"\x8b\x01\n\x1aMatchHighlightingCondition\x12,\n(MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMATCH_HIGHLIGHTING_DISABLED\x10\x01\x12\x1e\n\x1aMATCH_HIGHLIGHTING_ENABLED\x10\x02\x1aq\n\x0bSessionSpec\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12,\n\x1fsearch_result_persistence_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\"\n _search_result_persistence_count\x1a\x39\n\x12RelevanceScoreSpec\x12#\n\x16return_relevance_score\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"d\n\x12RelevanceThreshold\x12#\n\x1fRELEVANCE_THRESHOLD_UNSPECIFIED\x10\x00\x12\n\n\x06LOWEST\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\xe8\x16\n\x0eSearchResponse\x12M\n\x07results\x18\x01 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchResponse.SearchResult\x12\x45\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x35.google.cloud.discoveryengine.v1.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x19\n\x11\x61ttribution_token\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x0c \x01(\t\x12\x17\n\x0fnext_page_token\x18\x05 \x01(\t\x12\x17\n\x0f\x63orrected_query\x18\x07 \x01(\t\x12H\n\x07summary\x18\t \x01(\x0b\x32\x37.google.cloud.discoveryengine.v1.SearchResponse.Summary\x12`\n\x14query_expansion_info\x18\x0e \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo\x12Q\n\x0csession_info\x18\x13 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo\x12T\n\x16search_link_promotions\x18\x17 \x03(\x0b\x32\x34.google.cloud.discoveryengine.v1.SearchLinkPromotion\x1a\xd9\x02\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12;\n\x08\x64ocument\x18\x02 \x01(\x0b\x32).google.cloud.discoveryengine.v1.Document\x12\x35\n\x05\x63hunk\x18\x12 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.Chunk\x12h\n\x0cmodel_scores\x18\x04 \x03(\x0b\x32M.google.cloud.discoveryengine.v1.SearchResponse.SearchResult.ModelScoresEntryB\x03\xe0\x41\x03\x1a_\n\x10ModelScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.DoubleList:\x02\x38\x01\x1a\xf9\x01\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12P\n\x06values\x18\x02 \x03(\x0b\x32@.google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1az\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12=\n\x08interval\x18\x02 \x01(\x0b\x32).google.cloud.discoveryengine.v1.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x42\r\n\x0b\x66\x61\x63\x65t_value\x1a\xa1\x0c\n\x07Summary\x12\x14\n\x0csummary_text\x18\x01 \x01(\t\x12m\n\x17summary_skipped_reasons\x18\x02 \x03(\x0e\x32L.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason\x12\x63\n\x11safety_attributes\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes\x12j\n\x15summary_with_metadata\x18\x04 \x01(\x0b\x32K.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata\x1a\x36\n\x10SafetyAttributes\x12\x12\n\ncategories\x18\x01 \x03(\t\x12\x0e\n\x06scores\x18\x02 \x03(\x02\x1ag\n\x10\x43itationMetadata\x12S\n\tcitations\x18\x01 \x03(\x0b\x32@.google.cloud.discoveryengine.v1.SearchResponse.Summary.Citation\x1a\x8b\x01\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12W\n\x07sources\x18\x03 \x03(\x0b\x32\x46.google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationSource\x1a)\n\x0e\x43itationSource\x12\x17\n\x0freference_index\x18\x04 \x01(\x03\x1a\x8c\x02\n\tReference\x12\r\n\x05title\x18\x01 \x01(\t\x12\x41\n\x08\x64ocument\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x66\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32N.google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference.ChunkContent\x1a\x38\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x1a\xe2\x01\n\x13SummaryWithMetadata\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x63\n\x11\x63itation_metadata\x18\x02 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationMetadata\x12U\n\nreferences\x18\x03 \x03(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference\"\xf1\x02\n\x14SummarySkippedReason\x12&\n\"SUMMARY_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12%\n!NON_SUMMARY_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x19\n\x15LLM_ADDON_NOT_ENABLED\x10\x05\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x06\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x07\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x08\x12(\n$NON_SUMMARY_SEEKING_QUERY_IGNORED_V2\x10\t\x12\x0c\n\x08TIME_OUT\x10\n\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a-\n\x0bSessionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08query_id\x18\x02 \x01(\t2\x97\x07\n\rSearchService\x12\x8f\x03\n\x06Search\x12..google.cloud.discoveryengine.v1.SearchRequest\x1a/.google.cloud.discoveryengine.v1.SearchResponse\"\xa3\x02\x82\xd3\xe4\x93\x02\x9c\x02\"P/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\x01*Zc\"^/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search:\x01*Z`\"[/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:search:\x01*\x12\x9f\x03\n\nSearchLite\x12..google.cloud.discoveryengine.v1.SearchRequest\x1a/.google.cloud.discoveryengine.v1.SearchResponse\"\xaf\x02\x82\xd3\xe4\x93\x02\xa8\x02\"T/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zg\"b/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zd\"_/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:searchLite:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x02\n#com.google.cloud.discoveryengine.v1B\x12SearchServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb index b5d52ebc1ae5..d625b1812b46 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb @@ -9,7 +9,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n8google/cloud/discoveryengine/v1/site_search_engine.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x02\n\x10SiteSearchEngine\x12\x0c\n\x04name\x18\x01 \x01(\t:\xf2\x01\xea\x41\xee\x01\n/discoveryengine.googleapis.com/SiteSearchEngine\x12Pprojects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine\x12iprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine\"\x96\t\n\nTargetSite\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12$\n\x14provided_uri_pattern\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12>\n\x04type\x18\x03 \x01(\x0e\x32\x30.google.cloud.discoveryengine.v1.TargetSite.Type\x12\x18\n\x0b\x65xact_match\x18\x06 \x01(\x08\x42\x03\xe0\x41\x05\x12\"\n\x15generated_uri_pattern\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0froot_domain_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x12Z\n\x16site_verification_info\x18\x07 \x01(\x0b\x32\x35.google.cloud.discoveryengine.v1.SiteVerificationInfoB\x03\xe0\x41\x03\x12X\n\x0findexing_status\x18\x08 \x01(\x0e\x32:.google.cloud.discoveryengine.v1.TargetSite.IndexingStatusB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x0e\x66\x61ilure_reason\x18\t \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.TargetSite.FailureReasonB\x03\xe0\x41\x03\x1a\xa9\x01\n\rFailureReason\x12_\n\rquota_failure\x18\x01 \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1.TargetSite.FailureReason.QuotaFailureH\x00\x1a,\n\x0cQuotaFailure\x12\x1c\n\x14total_required_quota\x18\x01 \x01(\x03\x42\t\n\x07\x66\x61ilure\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INCLUDE\x10\x01\x12\x0b\n\x07\x45XCLUDE\x10\x02\"g\n\x0eIndexingStatus\x12\x1f\n\x1bINDEXING_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04:\xa1\x02\xea\x41\x9d\x02\n)discoveryengine.googleapis.com/TargetSite\x12jprojects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}\x12\x83\x01projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}\"\xa3\x02\n\x14SiteVerificationInfo\x12l\n\x17site_verification_state\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1.SiteVerificationInfo.SiteVerificationState\x12/\n\x0bverify_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"l\n\x15SiteVerificationState\x12\'\n#SITE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01\x12\x0e\n\nUNVERIFIED\x10\x02\x12\x0c\n\x08\x45XEMPTED\x10\x03\"\xfb\x02\n\x07Sitemap\x12\r\n\x03uri\x18\x02 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x8f\x02\xea\x41\x8b\x02\n&discoveryengine.googleapis.com/Sitemap\x12\x63projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}\x12|projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}B\x06\n\x04\x66\x65\x65\x64\x42\x88\x02\n#com.google.cloud.discoveryengine.v1B\x15SiteSearchEngineProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n8google/cloud/discoveryengine/v1/site_search_engine.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x02\n\x10SiteSearchEngine\x12\x0c\n\x04name\x18\x01 \x01(\t:\xf2\x01\xea\x41\xee\x01\n/discoveryengine.googleapis.com/SiteSearchEngine\x12Pprojects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine\x12iprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine\"\xb7\t\n\nTargetSite\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12$\n\x14provided_uri_pattern\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12>\n\x04type\x18\x03 \x01(\x0e\x32\x30.google.cloud.discoveryengine.v1.TargetSite.Type\x12\x18\n\x0b\x65xact_match\x18\x06 \x01(\x08\x42\x03\xe0\x41\x05\x12\"\n\x15generated_uri_pattern\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0froot_domain_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x12Z\n\x16site_verification_info\x18\x07 \x01(\x0b\x32\x35.google.cloud.discoveryengine.v1.SiteVerificationInfoB\x03\xe0\x41\x03\x12X\n\x0findexing_status\x18\x08 \x01(\x0e\x32:.google.cloud.discoveryengine.v1.TargetSite.IndexingStatusB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x0e\x66\x61ilure_reason\x18\t \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.TargetSite.FailureReasonB\x03\xe0\x41\x03\x1a\xa9\x01\n\rFailureReason\x12_\n\rquota_failure\x18\x01 \x01(\x0b\x32\x46.google.cloud.discoveryengine.v1.TargetSite.FailureReason.QuotaFailureH\x00\x1a,\n\x0cQuotaFailure\x12\x1c\n\x14total_required_quota\x18\x01 \x01(\x03\x42\t\n\x07\x66\x61ilure\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INCLUDE\x10\x01\x12\x0b\n\x07\x45XCLUDE\x10\x02\"\x87\x01\n\x0eIndexingStatus\x12\x1f\n\x1bINDEXING_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0f\n\x0b\x43\x41NCELLABLE\x10\x05\x12\r\n\tCANCELLED\x10\x06:\xa1\x02\xea\x41\x9d\x02\n)discoveryengine.googleapis.com/TargetSite\x12jprojects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}\x12\x83\x01projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}\"\xa3\x02\n\x14SiteVerificationInfo\x12l\n\x17site_verification_state\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1.SiteVerificationInfo.SiteVerificationState\x12/\n\x0bverify_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"l\n\x15SiteVerificationState\x12\'\n#SITE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01\x12\x0e\n\nUNVERIFIED\x10\x02\x12\x0c\n\x08\x45XEMPTED\x10\x03\"\xfb\x02\n\x07Sitemap\x12\r\n\x03uri\x18\x02 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x8f\x02\xea\x41\x8b\x02\n&discoveryengine.googleapis.com/Sitemap\x12\x63projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}\x12|projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}B\x06\n\x04\x66\x65\x65\x64\x42\x88\x02\n#com.google.cloud.discoveryengine.v1B\x15SiteSearchEngineProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_pb.rb new file mode 100644 index 000000000000..48d43125af75 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1/user_license.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/discoveryengine/v1/user_license.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x04\n\x0bUserLicense\x12\x1e\n\x0euser_principal\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x19\n\x0cuser_profile\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12j\n\x18license_assignment_state\x18\x04 \x01(\x0e\x32\x43.google.cloud.discoveryengine.v1.UserLicense.LicenseAssignmentStateB\x03\xe0\x41\x03\x12L\n\x0elicense_config\x18\x05 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,discoveryengine.googleapis.com/LicenseConfig\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x0flast_login_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x90\x01\n\x16LicenseAssignmentState\x12(\n$LICENSE_ASSIGNMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41SSIGNED\x10\x01\x12\x0e\n\nUNASSIGNED\x10\x02\x12\x0e\n\nNO_LICENSE\x10\x03\x12\x1e\n\x1aNO_LICENSE_ATTEMPTED_LOGIN\x10\x04\x42\x83\x02\n#com.google.cloud.discoveryengine.v1B\x10UserLicenseProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1 + UserLicense = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.UserLicense").msgclass + UserLicense::LicenseAssignmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.UserLicense.LicenseAssignmentState").enummodule + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_service_pb.rb new file mode 100644 index 000000000000..731bd218da25 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_service_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1/user_license_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/discoveryengine/v1/user_license_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n:google/cloud/discoveryengine/v1/user_license_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/discoveryengine/v1/user_license.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xa1\x01\n\x17ListUserLicensesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/UserStore\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x18ListUserLicensesResponse\x12\x43\n\ruser_licenses\x18\x01 \x03(\x0b\x32,.google.cloud.discoveryengine.v1.UserLicense\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x03\n\x1e\x42\x61tchUpdateUserLicensesRequest\x12\x65\n\rinline_source\x18\x02 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.BatchUpdateUserLicensesRequest.InlineSourceH\x00\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/UserStore\x12,\n\x1f\x64\x65lete_unassigned_user_licenses\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x8e\x01\n\x0cInlineSource\x12H\n\ruser_licenses\x18\x01 \x03(\x0b\x32,.google.cloud.discoveryengine.v1.UserLicenseB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x42\x08\n\x06source\"\xb1\x01\n\x1f\x42\x61tchUpdateUserLicensesMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rsuccess_count\x18\x03 \x01(\x03\x12\x15\n\rfailure_count\x18\x04 \x01(\x03\"\x91\x01\n\x1f\x42\x61tchUpdateUserLicensesResponse\x12\x43\n\ruser_licenses\x18\x01 \x03(\x0b\x32,.google.cloud.discoveryengine.v1.UserLicense\x12)\n\rerror_samples\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status2\x9a\x05\n\x12UserLicenseService\x12\xd7\x01\n\x10ListUserLicenses\x12\x38.google.cloud.discoveryengine.v1.ListUserLicensesRequest\x1a\x39.google.cloud.discoveryengine.v1.ListUserLicensesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/userStores/*}/userLicenses\x12\xd5\x02\n\x17\x42\x61tchUpdateUserLicenses\x12?.google.cloud.discoveryengine.v1.BatchUpdateUserLicensesRequest\x1a\x1d.google.longrunning.Operation\"\xd9\x01\xca\x41\x82\x01\n?google.cloud.discoveryengine.v1.BatchUpdateUserLicensesResponse\x12?google.cloud.discoveryengine.v1.BatchUpdateUserLicensesMetadata\x82\xd3\xe4\x93\x02M\"H/v1/{parent=projects/*/locations/*/userStores/*}:batchUpdateUserLicenses:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8a\x02\n#com.google.cloud.discoveryengine.v1B\x17UserLicenseServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.discoveryengine.v1.UserLicense", "google/cloud/discoveryengine/v1/user_license.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1 + ListUserLicensesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ListUserLicensesRequest").msgclass + ListUserLicensesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.ListUserLicensesResponse").msgclass + BatchUpdateUserLicensesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.BatchUpdateUserLicensesRequest").msgclass + BatchUpdateUserLicensesRequest::InlineSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.BatchUpdateUserLicensesRequest.InlineSource").msgclass + BatchUpdateUserLicensesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.BatchUpdateUserLicensesMetadata").msgclass + BatchUpdateUserLicensesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.BatchUpdateUserLicensesResponse").msgclass + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_service_services_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_service_services_pb.rb new file mode 100644 index 000000000000..4991b3aec63d --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/user_license_service_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/discoveryengine/v1/user_license_service.proto for package 'Google.Cloud.DiscoveryEngine.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/user_license_service_pb' + +module Google + module Cloud + module DiscoveryEngine + module V1 + module UserLicenseService + # Service for managing User Licenses. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.discoveryengine.v1.UserLicenseService' + + # Lists the User Licenses. + rpc :ListUserLicenses, ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest, ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesResponse + # Updates the User License. + # This method is used for batch assign/unassign licenses to users. + rpc :BatchUpdateUserLicenses, ::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/answer.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/answer.rb index e8cad72ff715..f4aae4835246 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/answer.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/answer.rb @@ -410,6 +410,9 @@ module Type # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 + + # User defined query classification type. + USER_DEFINED_CLASSIFICATION_QUERY = 5 end end end @@ -485,6 +488,20 @@ module AnswerSkippedReason # Google skips the answer if a well grounded answer was unable to be # generated. LOW_GROUNDED_ANSWER = 9 + + # The user defined query classification ignored case. + # + # Google skips the answer if the query is classified as a user defined + # query classification. + USER_DEFINED_CLASSIFICATION_QUERY_IGNORED = 10 + + # The unhelpful answer case. + # + # Google skips the answer if the answer is not helpful. This can be due to + # a variety of factors, including but not limited to: the query is not + # answerable, the answer is not relevant to the query, or the answer is + # not well-formatted. + UNHELPFUL_ANSWER = 11 end end end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/chunk.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/chunk.rb index 5d68a0f92e4e..e1ce3abc4997 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/chunk.rb @@ -57,6 +57,20 @@ module V1 # @!attribute [r] chunk_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk::ChunkMetadata] # Output only. Metadata of the current chunk. + # @!attribute [r] data_urls + # @return [::Array<::String>] + # Output only. Image Data URLs if the current chunk contains images. + # Data URLs are composed of four parts: a prefix (data:), a MIME type + # indicating the type of data, an optional base64 token if non-textual, + # and the data itself: + # data:[][;base64], + # @!attribute [r] annotation_contents + # @return [::Array<::String>] + # Output only. Annotation contents if the current chunk contains annotations. + # @!attribute [r] annotation_metadata + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Chunk::AnnotationMetadata>] + # Output only. The annotation metadata includes structured content in the + # current chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -113,6 +127,46 @@ class ChunkMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # The structured content information. + # @!attribute [r] structure_type + # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk::StructureType] + # Output only. The structure type of the structured content. + # @!attribute [r] content + # @return [::String] + # Output only. The content of the structured content. + class StructuredContent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The annotation metadata includes structured content in the current chunk. + # @!attribute [r] structured_content + # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk::StructuredContent] + # Output only. The structured content information. + # @!attribute [r] image_id + # @return [::String] + # Output only. Image id is provided if the structured content is based on + # an image. + class AnnotationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the types of the structured content that can be extracted. + module StructureType + # Default value. + STRUCTURE_TYPE_UNSPECIFIED = 0 + + # Shareholder structure. + SHAREHOLDER_STRUCTURE = 1 + + # Signature structure. + SIGNATURE_STRUCTURE = 2 + + # Checkbox structure. + CHECKBOX_STRUCTURE = 3 + end end end end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/cmek_config_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/cmek_config_service.rb new file mode 100644 index 000000000000..3fd6180210d7 --- /dev/null +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/cmek_config_service.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + # Request message for UpdateCmekConfig method. + # rpc. + # @!attribute [rw] config + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig] + # Required. The CmekConfig resource. + # @!attribute [rw] set_default + # @return [::Boolean] + # Set the following CmekConfig as the default to be used for child + # resources if one is not specified. + class UpdateCmekConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetCmekConfigRequest method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}, such as + # `projects/*/locations/*/cmekConfig` or + # `projects/*/locations/*/cmekConfigs/*`. + # + # If the caller does not have permission to access the + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}, regardless of + # whether or not it exists, a PERMISSION_DENIED error is returned. + class GetCmekConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for single-regional CMEKs. + # @!attribute [rw] kms_key + # @return [::String] + # Required. Single-regional kms key resource name which will be used to + # encrypt resources + # `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. + class SingleRegionKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configurations used to enable CMEK data encryption with Cloud KMS keys. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the CmekConfig of the form + # `projects/{project}/locations/{location}/cmekConfig` or + # `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. + # @!attribute [rw] kms_key + # @return [::String] + # KMS key resource name which will be used to encrypt resources + # `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. + # @!attribute [rw] kms_key_version + # @return [::String] + # KMS key version resource name which will be used to encrypt resources + # `/cryptoKeyVersions/{keyVersion}`. + # @!attribute [r] state + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig::State] + # Output only. The states of the CmekConfig. + # @!attribute [r] is_default + # @return [::Boolean] + # Output only. The default CmekConfig for the Customer. + # @!attribute [r] last_rotation_timestamp_micros + # @return [::Integer] + # Output only. The timestamp of the last key rotation. + # @!attribute [rw] single_region_keys + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SingleRegionKey>] + # Optional. Single-regional CMEKs that are required for some VAIS features. + # @!attribute [r] notebooklm_state + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig::NotebookLMState] + # Output only. Whether the NotebookLM Corpus is ready to be used. + class CmekConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # States of the CmekConfig. + module State + # The CmekConfig state is unknown. + STATE_UNSPECIFIED = 0 + + # The CmekConfig is creating. + CREATING = 1 + + # The CmekConfig can be used with DataStores. + ACTIVE = 2 + + # The CmekConfig is unavailable, most likely due to the KMS Key being + # revoked. + KEY_ISSUE = 3 + + # The CmekConfig is deleting. + DELETING = 4 + + # The CmekConfig deletion process failed. + DELETE_FAILED = 7 + + # The CmekConfig is not usable, most likely due to some internal issue. + UNUSABLE = 5 + + # The KMS key version is being rotated. + ACTIVE_ROTATING = 6 + + # The KMS key is soft deleted. Some cleanup policy will eventually be + # applied. + DELETED = 8 + end + + # States of NotebookLM. + module NotebookLMState + # The NotebookLM state is unknown. + NOTEBOOK_LM_STATE_UNSPECIFIED = 0 + + # The NotebookLM is not ready. + NOTEBOOK_LM_NOT_READY = 1 + + # The NotebookLM is ready to be used. + NOTEBOOK_LM_READY = 2 + + # The NotebookLM is not enabled. + NOTEBOOK_LM_NOT_ENABLED = 3 + end + end + + # Metadata related to the progress of the + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#update_cmek_config CmekConfigService.UpdateCmekConfig} + # operation. This will be returned by the google.longrunning.Operation.metadata + # field. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Operation create time. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Operation last update time. If the operation is done, this is also the + # finish time. + class UpdateCmekConfigMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#list_cmek_configs CmekConfigService.ListCmekConfigs} + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location resource name, such as + # `projects/{project}/locations/{location}`. + # + # If the caller does not have permission to list + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s under this + # location, regardless of whether or not a CmekConfig exists, a + # PERMISSION_DENIED error is returned. + class ListCmekConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#list_cmek_configs CmekConfigService.ListCmekConfigs} + # method. + # @!attribute [rw] cmek_configs + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CmekConfig>] + # All the customer's + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s. + class ListCmekConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#delete_cmek_config CmekConfigService.DeleteCmekConfig} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig} to delete, such as + # `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. + class DeleteCmekConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata related to the progress of the + # {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#delete_cmek_config CmekConfigService.DeleteCmekConfig} + # operation. This will be returned by the google.longrunning.Operation.metadata + # field. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Operation create time. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Operation last update time. If the operation is done, this is also the + # finish time. + class DeleteCmekConfigMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/common.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/common.rb index 3d789ddb684a..4a8002aef829 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/common.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/common.rb @@ -121,6 +121,56 @@ class DoubleList extend ::Google::Protobuf::MessageExts::ClassMethods end + # Principal identifier of a user or a group. + # @!attribute [rw] user_id + # @return [::String] + # User identifier. + # For Google Workspace user account, user_id should be the google workspace + # user email. + # For non-google identity provider user account, user_id is the mapped user + # identifier configured during the workforcepool config. + # + # Note: The following fields are mutually exclusive: `user_id`, `group_id`, `external_entity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] group_id + # @return [::String] + # Group identifier. + # For Google Workspace user account, group_id should be the google + # workspace group email. + # For non-google identity provider user account, group_id is the mapped + # group identifier configured during the workforcepool config. + # + # Note: The following fields are mutually exclusive: `group_id`, `user_id`, `external_entity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] external_entity_id + # @return [::String] + # For 3P application identities which are not present in the customer + # identity provider. + # + # Note: The following fields are mutually exclusive: `external_entity_id`, `user_id`, `group_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Principal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config to data store for `HEALTHCARE_FHIR` vertical. + # @!attribute [rw] enable_configurable_schema + # @return [::Boolean] + # Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical. + # + # If set to `true`, the predefined healthcare fhir schema can be extended + # for more customized searching and filtering. + # @!attribute [rw] enable_static_indexing_for_batch_ingestion + # @return [::Boolean] + # Whether to enable static indexing for `HEALTHCARE_FHIR` batch + # ingestion. + # + # If set to `true`, the batch ingestion will be processed in a static + # indexing mode which is slower but more capable of handling larger + # volume. + class HealthcareFhirConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Promotion proto includes uri and other helping information to display the # promotion. # @!attribute [rw] title @@ -131,6 +181,11 @@ class DoubleList # @return [::String] # Optional. The URL for the page the user wants to promote. Must be set for # site search. For other verticals, this is optional. + # @!attribute [rw] document + # @return [::String] + # Optional. The {::Google::Cloud::DiscoveryEngine::V1::Document Document} the user + # wants to promote. For site search, leave unset and only populate uri. Can + # be set along with uri. # @!attribute [rw] image_uri # @return [::String] # Optional. The promotion thumbnail image url. diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/control.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/control.rb index 4b408364d6b2..dc8d91c622b7 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/control.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/control.rb @@ -41,7 +41,7 @@ module V1 # Optional. Query regex to match the whole search query. # Cannot be set when # {::Google::Cloud::DiscoveryEngine::V1::Condition#query_terms Condition.query_terms} - # is set. This is currently supporting promotion use case. + # is set. Only supported for Basic Site Search promotion serving controls. class Condition include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -110,8 +110,6 @@ class TimeRange # @return [::Google::Cloud::DiscoveryEngine::V1::Control::PromoteAction] # Promote certain links based on predefined trigger queries. # - # This now only supports basic site search. - # # Note: The following fields are mutually exclusive: `promote_action`, `boost_action`, `filter_action`, `redirect_action`, `synonyms_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] name # @return [::String] diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb index d754132b45cf..c4fc7289298b 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb @@ -721,6 +721,9 @@ module Type # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 + + # User defined query classification type. + USER_DEFINED_CLASSIFICATION_QUERY = 5 end end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store.rb index ea6f71712530..199e7f965f7f 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store.rb @@ -24,7 +24,7 @@ module V1 # DataStore captures global settings and configs at the DataStore level. # @!attribute [rw] name # @return [::String] - # Immutable. The full resource name of the data store. + # Immutable. Identifier. The full resource name of the data store. # Format: # `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. # @@ -64,9 +64,41 @@ module V1 # @!attribute [rw] advanced_site_search_config # @return [::Google::Cloud::DiscoveryEngine::V1::AdvancedSiteSearchConfig] # Optional. Configuration for advanced site search. + # @!attribute [rw] kms_key_name + # @return [::String] + # Input only. The KMS key to be used to protect this DataStore at creation + # time. + # + # Must be set for requests that need to comply with CMEK Org Policy + # protections. + # + # If this field is set and processed successfully, the DataStore will be + # protected by the KMS key, as indicated in the cmek_config field. + # @!attribute [r] cmek_config + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig] + # Output only. CMEK-related information for the DataStore. # @!attribute [r] billing_estimation # @return [::Google::Cloud::DiscoveryEngine::V1::DataStore::BillingEstimation] # Output only. Data size estimation for billing. + # @!attribute [rw] acl_enabled + # @return [::Boolean] + # Immutable. Whether data in the + # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} has ACL information. + # If set to `true`, the source data must have ACL. ACL will be ingested when + # data is ingested by + # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#import_documents DocumentService.ImportDocuments} + # methods. + # + # When ACL is enabled for the + # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, + # {::Google::Cloud::DiscoveryEngine::V1::Document Document} can't be accessed by + # calling + # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#get_document DocumentService.GetDocument} + # or + # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#list_documents DocumentService.ListDocuments}. + # + # Currently ACL is only supported in `GENERIC` industry vertical with + # non-`PUBLIC_WEBSITE` content config. # @!attribute [rw] workspace_config # @return [::Google::Cloud::DiscoveryEngine::V1::WorkspaceConfig] # Config to store data store type configuration for workspace data. This @@ -96,6 +128,16 @@ module V1 # The provided schema will be validated against certain rules on schema. # Learn more from [this # doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + # @!attribute [rw] healthcare_fhir_config + # @return [::Google::Cloud::DiscoveryEngine::V1::HealthcareFhirConfig] + # Optional. Configuration for `HEALTHCARE_FHIR` vertical. + # @!attribute [rw] identity_mapping_store + # @return [::String] + # Immutable. The fully qualified resource name of the associated + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore IdentityMappingStore}. + # This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or + # `GSUITE` IdP. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`. class DataStore include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb index f21beb3d6118..be17f5ab8fdf 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb @@ -24,6 +24,18 @@ module V1 # Request for # {::Google::Cloud::DiscoveryEngine::V1::DataStoreService::Client#create_data_store DataStoreService.CreateDataStore} # method. + # @!attribute [rw] cmek_config_name + # @return [::String] + # Resource name of the CmekConfig to use for protecting this DataStore. + # + # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disable_cmek + # @return [::Boolean] + # DataStore without CMEK protections. If a default CmekConfig is set for + # the project, setting this field will override the default CmekConfig as + # well. + # + # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] parent # @return [::String] # Required. The parent resource name, such as diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/document.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/document.rb index 3ad033fa5a89..3bcff5d55947 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/document.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/document.rb @@ -56,9 +56,8 @@ module V1 # The identifier of the schema located in the same data store. # @!attribute [rw] content # @return [::Google::Cloud::DiscoveryEngine::V1::Document::Content] - # The unstructured data linked to this document. Content must be set if this - # document is under a - # `CONTENT_REQUIRED` data store. + # The unstructured data linked to this document. Content can only be set + # and must be set if this document is under a `CONTENT_REQUIRED` data store. # @!attribute [rw] parent_document_id # @return [::String] # The identifier of the parent document. Currently supports at most two level @@ -70,6 +69,9 @@ module V1 # @return [::Google::Protobuf::Struct] # Output only. This field is OUTPUT_ONLY. # It contains derived data that are not in the original input document. + # @!attribute [rw] acl_info + # @return [::Google::Cloud::DiscoveryEngine::V1::Document::AclInfo] + # Access control information for the document. # @!attribute [r] index_time # @return [::Google::Protobuf::Timestamp] # Output only. The last time the document was indexed. If this field is set, @@ -116,9 +118,23 @@ class Document # # * `application/pdf` (PDF, only native PDFs are supported for now) # * `text/html` (HTML) + # * `text/plain` (TXT) + # * `application/xml` or `text/xml` (XML) + # * `application/json` (JSON) # * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) # * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - # * `text/plain` (TXT) + # * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` + # (XLSX) + # * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) + # + # The following types are supported only if layout parser is enabled in the + # data store: + # + # * `image/bmp` (BMP) + # * `image/gif` (GIF) + # * `image/jpeg` (JPEG) + # * `image/png` (PNG) + # * `image/tiff` (TIFF) # # See https://www.iana.org/assignments/media-types/media-types.xhtml. class Content @@ -126,6 +142,85 @@ class Content extend ::Google::Protobuf::MessageExts::ClassMethods end + # ACL Information of the Document. + # @!attribute [rw] readers + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Document::AclInfo::AccessRestriction>] + # Readers of the document. + class AclInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # AclRestriction to model complex inheritance restrictions. + # + # Example: Modeling a "Both Permit" inheritance, where to access a + # child document, user needs to have access to parent document. + # + # Document Hierarchy - Space_S --> Page_P. + # + # Readers: + # Space_S: group_1, user_1 + # Page_P: group_2, group_3, user_2 + # + # Space_S ACL Restriction - + # { + # "acl_info": { + # "readers": [ + # { + # "principals": [ + # { + # "group_id": "group_1" + # }, + # { + # "user_id": "user_1" + # } + # ] + # } + # ] + # } + # } + # + # Page_P ACL Restriction. + # { + # "acl_info": { + # "readers": [ + # { + # "principals": [ + # { + # "group_id": "group_2" + # }, + # { + # "group_id": "group_3" + # }, + # { + # "user_id": "user_2" + # } + # ], + # }, + # { + # "principals": [ + # { + # "group_id": "group_1" + # }, + # { + # "user_id": "user_1" + # } + # ], + # } + # ] + # } + # } + # @!attribute [rw] principals + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Principal>] + # List of principals. + # @!attribute [rw] idp_wide + # @return [::Boolean] + # All users within the Identity Provider. + class AccessRestriction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # Index status of the document. # @!attribute [rw] index_time # @return [::Google::Protobuf::Timestamp] diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb index 809b30a228dd..8e98b5883925 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb @@ -132,6 +132,29 @@ class OcrParsingConfig end # The layout parsing configurations for documents. + # @!attribute [rw] enable_table_annotation + # @return [::Boolean] + # Optional. If true, the LLM based annotation is added to the table + # during parsing. + # @!attribute [rw] enable_image_annotation + # @return [::Boolean] + # Optional. If true, the LLM based annotation is added to the image + # during parsing. + # @!attribute [rw] structured_content_types + # @return [::Array<::String>] + # Optional. Contains the required structure types to extract from the + # document. Supported values: + # + # * `shareholder-structure` + # @!attribute [rw] exclude_html_elements + # @return [::Array<::String>] + # Optional. List of HTML elements to exclude from the parsed content. + # @!attribute [rw] exclude_html_classes + # @return [::Array<::String>] + # Optional. List of HTML classes to exclude from the parsed content. + # @!attribute [rw] exclude_html_ids + # @return [::Array<::String>] + # Optional. List of HTML ids to exclude from the parsed content. class LayoutParsingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/engine.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/engine.rb index 11c3640b5ea6..3d1e3f202728 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/engine.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/engine.rb @@ -29,14 +29,25 @@ module V1 # {::Google::Cloud::DiscoveryEngine::V1::Engine#solution_type solution_type} is # {::Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_CHAT SOLUTION_TYPE_CHAT}. # - # Note: The following fields are mutually exclusive: `chat_engine_config`, `search_engine_config`. 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: `chat_engine_config`, `search_engine_config`, `media_recommendation_engine_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_engine_config # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::SearchEngineConfig] # Configurations for the Search Engine. Only applicable if # {::Google::Cloud::DiscoveryEngine::V1::Engine#solution_type solution_type} is # {::Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}. # - # Note: The following fields are mutually exclusive: `search_engine_config`, `chat_engine_config`. 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: `search_engine_config`, `chat_engine_config`, `media_recommendation_engine_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] media_recommendation_engine_config + # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig] + # Configurations for the Media Engine. Only applicable on the data + # stores with + # {::Google::Cloud::DiscoveryEngine::V1::Engine#solution_type solution_type} + # {::Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_RECOMMENDATION SOLUTION_TYPE_RECOMMENDATION} + # and + # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} + # vertical. + # + # Note: The following fields are mutually exclusive: `media_recommendation_engine_config`, `chat_engine_config`, `search_engine_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] chat_engine_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::ChatEngineMetadata] # Output only. Additional information of the Chat Engine. Only applicable @@ -45,7 +56,7 @@ module V1 # {::Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_CHAT SOLUTION_TYPE_CHAT}. # @!attribute [rw] name # @return [::String] - # Immutable. The fully qualified resource name of the engine. + # Immutable. Identifier. The fully qualified resource name of the engine. # # This field must be a UTF-8 encoded string with a length limit of 1024 # characters. @@ -66,7 +77,7 @@ module V1 # Output only. Timestamp the Recommendation Engine was last updated. # @!attribute [rw] data_store_ids # @return [::Array<::String>] - # The data stores associated with this engine. + # Optional. The data stores associated with this engine. # # For # {::Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH} @@ -89,7 +100,7 @@ module V1 # Required. The solutions of the engine. # @!attribute [rw] industry_vertical # @return [::Google::Cloud::DiscoveryEngine::V1::IndustryVertical] - # The industry vertical that the engine registers. + # Optional. The industry vertical that the engine registers. # The restriction of the Engine industry vertical is based on # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}: Vertical on Engine # has to match vertical of the DataStore linked to the engine. @@ -123,6 +134,131 @@ class SearchEngineConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Additional config specs for a Media Recommendation engine. + # @!attribute [rw] type + # @return [::String] + # Required. The type of engine. e.g., `recommended-for-you`. + # + # This field together with + # {::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig#optimization_objective optimization_objective} + # describe engine metadata to use to control engine training and serving. + # + # Currently supported values: `recommended-for-you`, `others-you-may-like`, + # `more-like-this`, `most-popular-items`. + # @!attribute [rw] optimization_objective + # @return [::String] + # The optimization objective. e.g., `cvr`. + # + # This field together with + # {::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig#type optimization_objective} + # describe engine metadata to use to control engine training and serving. + # + # Currently supported + # values: `ctr`, `cvr`. + # + # If not specified, we choose default based on engine type. + # Default depends on type of recommendation: + # + # `recommended-for-you` => `ctr` + # + # `others-you-may-like` => `ctr` + # @!attribute [rw] optimization_objective_config + # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::OptimizationObjectiveConfig] + # Name and value of the custom threshold for cvr optimization_objective. + # For target_field `watch-time`, target_field_value must be an integer + # value indicating the media progress time in seconds between (0, 86400] + # (excludes 0, includes 86400) (e.g., 90). + # For target_field `watch-percentage`, the target_field_value must be a + # valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., + # 0.5). + # @!attribute [rw] training_state + # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::TrainingState] + # The training state that the engine is in (e.g. + # `TRAINING` or `PAUSED`). + # + # Since part of the cost of running the service + # is frequency of training - this can be used to determine when to train + # engine in order to control cost. If not specified: the default value for + # `CreateEngine` method is `TRAINING`. The default value for + # `UpdateEngine` method is to keep the state the same as before. + # @!attribute [rw] engine_features_config + # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::EngineFeaturesConfig] + # Optional. Additional engine features config. + class MediaRecommendationEngineConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Custom threshold for `cvr` optimization_objective. + # @!attribute [rw] target_field + # @return [::String] + # Required. The name of the field to target. Currently supported + # values: `watch-percentage`, `watch-time`. + # @!attribute [rw] target_field_value_float + # @return [::Float] + # Required. The threshold to be applied to the target (e.g., 0.5). + class OptimizationObjectiveConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # More feature configs of the selected engine type. + # @!attribute [rw] recommended_for_you_config + # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::RecommendedForYouFeatureConfig] + # Recommended for you engine feature config. + # + # Note: The following fields are mutually exclusive: `recommended_for_you_config`, `most_popular_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] most_popular_config + # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::MediaRecommendationEngineConfig::MostPopularFeatureConfig] + # Most popular engine feature config. + # + # Note: The following fields are mutually exclusive: `most_popular_config`, `recommended_for_you_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class EngineFeaturesConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional feature configurations for creating a `recommended-for-you` + # engine. + # @!attribute [rw] context_event_type + # @return [::String] + # The type of event with which the engine is queried at prediction time. + # If set to `generic`, only `view-item`, `media-play`,and + # `media-complete` will be used as `context-event` in engine training. If + # set to `view-home-page`, `view-home-page` will also be used as + # `context-events` in addition to `view-item`, `media-play`, and + # `media-complete`. Currently supported for the `recommended-for-you` + # engine. Currently supported values: `view-home-page`, `generic`. + class RecommendedForYouFeatureConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Feature configurations that are required for creating a Most Popular + # engine. + # @!attribute [rw] time_window_days + # @return [::Integer] + # The time window of which the engine is queried at training and + # prediction time. Positive integers only. The value translates to the + # last X days of events. Currently required for the `most-popular-items` + # engine. + class MostPopularFeatureConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The training state of the engine. + module TrainingState + # Unspecified training state. + TRAINING_STATE_UNSPECIFIED = 0 + + # The engine training is paused. + PAUSED = 1 + + # The engine is training. + TRAINING = 2 + end + end + # Configurations for a Chat Engine. # @!attribute [rw] agent_creation_config # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::ChatEngineConfig::AgentCreationConfig] diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb index e6a19a5d5f36..71e3d6e69b64 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb @@ -476,6 +476,9 @@ class Image # will lead to fewer but very strong citations, while choosing a lower # threshold may lead to more but somewhat weaker citations. If unset, the # threshold will default to 0.6. + # @!attribute [rw] enable_claim_level_score + # @return [::Boolean] + # The control flag that enables claim-level grounding score in the response. class CheckGroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -601,6 +604,11 @@ class CheckGroundingFactChunk # the claim and therefore # {::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim#citation_indices citation_indices} # should not be returned. + # @!attribute [rw] score + # @return [::Float] + # Confidence score for the claim in the answer candidate, in the range of + # [0, 1]. This is set only when + # `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true. class Claim include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/grounding.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/grounding.rb index 9249bf41c26f..f19c84c2aa16 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/grounding.rb @@ -60,6 +60,15 @@ class AttributesEntry # @!attribute [rw] source_metadata # @return [::Google::Protobuf::Map{::String => ::String}] # More fine-grained information for the source reference. + # @!attribute [rw] uri + # @return [::String] + # The URI of the source. + # @!attribute [rw] title + # @return [::String] + # The title of the source. + # @!attribute [rw] domain + # @return [::String] + # The domain of the source. class FactChunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store.rb new file mode 100644 index 000000000000..e97d4516317e --- /dev/null +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + # Identity Mapping Store which contains Identity Mapping Entries. + # @!attribute [rw] name + # @return [::String] + # Immutable. The full resource name of the identity mapping store. + # Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`. + # This field must be a UTF-8 encoded string with a length limit of 1024 + # characters. + # @!attribute [rw] kms_key_name + # @return [::String] + # Input only. The KMS key to be used to protect this Identity Mapping Store + # at creation time. + # + # Must be set for requests that need to comply with CMEK Org Policy + # protections. + # + # If this field is set and processed successfully, the Identity Mapping Store + # will be protected by the KMS key, as indicated in the cmek_config field. + # @!attribute [r] cmek_config + # @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig] + # Output only. CMEK-related information for the Identity Mapping Store. + class IdentityMappingStore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identity Mapping Entry that maps an external identity to an internal + # identity. + # @!attribute [rw] user_id + # @return [::String] + # User identifier. + # For Google Workspace user account, user_id should be the google workspace + # user email. + # For non-google identity provider, user_id is the mapped user identifier + # configured during the workforcepool config. + # + # Note: The following fields are mutually exclusive: `user_id`, `group_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] group_id + # @return [::String] + # Group identifier. + # For Google Workspace user account, group_id should be the google + # workspace group email. + # For non-google identity provider, group_id is the mapped group identifier + # configured during the workforcepool config. + # + # Note: The following fields are mutually exclusive: `group_id`, `user_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] external_identity + # @return [::String] + # Required. Identity outside the customer identity provider. + # The length limit of external identity will be of 100 characters. + class IdentityMappingEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store_service.rb new file mode 100644 index 000000000000..a8b51526c361 --- /dev/null +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store_service.rb @@ -0,0 +1,279 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#create_identity_mapping_store IdentityMappingStoreService.CreateIdentityMappingStore} + # @!attribute [rw] cmek_config_name + # @return [::String] + # Resource name of the CmekConfig to use for protecting this Identity + # Mapping Store. + # + # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disable_cmek + # @return [::Boolean] + # Identity Mapping Store without CMEK protections. If a default CmekConfig + # is set for the project, setting this field will override the default + # CmekConfig as well. + # + # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection resource name, such as + # `projects/{project}/locations/{location}`. + # @!attribute [rw] identity_mapping_store_id + # @return [::String] + # Required. The ID of the Identity Mapping Store to create. + # + # The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + # (_), and hyphens (-). The maximum length is 63 characters. + # @!attribute [rw] identity_mapping_store + # @return [::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore] + # Required. The Identity Mapping Store to create. + class CreateIdentityMappingStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#get_identity_mapping_store IdentityMappingStoreService.GetIdentityMappingStore} + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Identity Mapping Store to get. + # Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + class GetIdentityMappingStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#delete_identity_mapping_store IdentityMappingStoreService.DeleteIdentityMappingStore} + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Identity Mapping Store to delete. + # Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + class DeleteIdentityMappingStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#import_identity_mappings IdentityMappingStoreService.ImportIdentityMappings} + # @!attribute [rw] inline_source + # @return [::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest::InlineSource] + # The inline source to import identity mapping entries from. + # @!attribute [rw] identity_mapping_store + # @return [::String] + # Required. The name of the Identity Mapping Store to import Identity Mapping + # Entries to. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + class ImportIdentityMappingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The inline source to import identity mapping entries from. + # @!attribute [rw] identity_mapping_entries + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::IdentityMappingEntry>] + # A maximum of 10000 entries can be imported at one time + class InlineSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#import_identity_mappings IdentityMappingStoreService.ImportIdentityMappings} + # @!attribute [rw] error_samples + # @return [::Array<::Google::Rpc::Status>] + # A sample of errors encountered while processing the request. + class ImportIdentityMappingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#purge_identity_mappings IdentityMappingStoreService.PurgeIdentityMappings} + # @!attribute [rw] inline_source + # @return [::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest::InlineSource] + # The inline source to purge identity mapping entries from. + # @!attribute [rw] identity_mapping_store + # @return [::String] + # Required. The name of the Identity Mapping Store to purge Identity Mapping + # Entries from. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @!attribute [rw] filter + # @return [::String] + # Filter matching identity mappings to purge. + # The eligible field for filtering is: + # * `update_time`: in ISO 8601 "zulu" format. + # * `external_id` + # + # Examples: + # + # * Deleting all identity mappings updated in a time range: + # `update_time > "2012-04-23T18:25:43.511Z" AND update_time < + # "2012-04-23T18:30:43.511Z"` + # * Deleting all identity mappings for a given external_id: + # `external_id = "id1"` + # * Deleting all identity mappings inside an identity mapping store: + # `*` + # + # The filtering fields are assumed to have an implicit AND. + # Should not be used with source. An error will be thrown, if both are + # provided. + # @!attribute [rw] force + # @return [::Boolean] + # Actually performs the purge. If `force` is set to false, return the + # expected purge count without deleting any identity mappings. This field is + # only supported for purge with filter. For input source this field is + # ignored and data will be purged regardless of the value of this field. + class PurgeIdentityMappingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The inline source to purge identity mapping entries from. + # @!attribute [rw] identity_mapping_entries + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::IdentityMappingEntry>] + # A maximum of 10000 entries can be purged at one time + class InlineSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mappings IdentityMappingStoreService.ListIdentityMappings} + # @!attribute [rw] identity_mapping_store + # @return [::String] + # Required. The name of the Identity Mapping Store to list Identity Mapping + # Entries in. Format: + # `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of IdentityMappings to return. If unspecified, defaults + # to 2000. The maximum allowed value is 10000. Values above 10000 will be + # coerced to 10000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListIdentityMappings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListIdentityMappings` must match the call that provided the page + # token. + class ListIdentityMappingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mappings IdentityMappingStoreService.ListIdentityMappings} + # @!attribute [rw] identity_mapping_entries + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::IdentityMappingEntry>] + # The Identity Mapping Entries. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. If this + # field is omitted, there are no subsequent pages. + class ListIdentityMappingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mapping_stores IdentityMappingStoreService.ListIdentityMappingStores} + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the Identity Mapping Stores to list. + # Format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of IdentityMappingStores to return. If unspecified, defaults + # to 100. The maximum allowed value is 1000. Values above 1000 will be + # coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListIdentityMappingStores` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListIdentityMappingStores` must match the call that provided the page + # token. + class ListIdentityMappingStoresRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mapping_stores IdentityMappingStoreService.ListIdentityMappingStores} + # @!attribute [rw] identity_mapping_stores + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore>] + # The Identity Mapping Stores. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. If this + # field is omitted, there are no subsequent pages. + class ListIdentityMappingStoresResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # IdentityMappingEntry LongRunningOperation metadata for + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#import_identity_mappings IdentityMappingStoreService.ImportIdentityMappings} + # and + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#purge_identity_mappings IdentityMappingStoreService.PurgeIdentityMappings} + # @!attribute [rw] success_count + # @return [::Integer] + # The number of IdentityMappingEntries that were successfully processed. + # @!attribute [rw] failure_count + # @return [::Integer] + # The number of IdentityMappingEntries that failed to be processed. + # @!attribute [rw] total_count + # @return [::Integer] + # The total number of IdentityMappingEntries that were processed. + class IdentityMappingEntryOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata related to the progress of the + # {::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#delete_identity_mapping_store IdentityMappingStoreService.DeleteIdentityMappingStore} + # operation. This will be returned by the google.longrunning.Operation.metadata + # field. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Operation create time. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Operation last update time. If the operation is done, this is also the + # finish time. + class DeleteIdentityMappingStoreMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb index e1345bba4390..f2ce4d7b30af 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb @@ -312,6 +312,12 @@ class ImageQuery # Optional. Boost specification to boost certain documents. # For more information on boosting, see # [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + # @!attribute [rw] custom_search_operators + # @return [::String] + # Optional. Custom search operators which if specified will be used to + # filter results from workspace data stores. For more information on custom + # search operators, see + # [SearchOperators](https://support.google.com/cloudsearch/answer/6172299). class DataStoreSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb index 57dc65d4920c..616093774b8c 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb @@ -128,6 +128,12 @@ module IndexingStatus # 1. target site deleted if unindexing is successful; # 2. state reverts to SUCCEEDED if the unindexing fails. DELETING = 4 + + # The target site change is pending but cancellable. + CANCELLABLE = 5 + + # The target site change is cancelled. + CANCELLED = 6 end end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_license.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_license.rb new file mode 100644 index 000000000000..b413d70bd440 --- /dev/null +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_license.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + # User License information assigned by the admin. + # @!attribute [rw] user_principal + # @return [::String] + # Required. Immutable. The user principal of the User, could be email address + # or other prinical identifier. This field is immutable. Admin assign + # licenses based on the user principal. + # @!attribute [rw] user_profile + # @return [::String] + # Optional. The user profile. + # We user user full name(First name + Last name) as user profile. + # @!attribute [r] license_assignment_state + # @return [::Google::Cloud::DiscoveryEngine::V1::UserLicense::LicenseAssignmentState] + # Output only. License assignment state of the user. + # If the user is assigned with a license config, the user loggin will be + # assigned with the license; + # If the user's license assignment state is unassigned or unspecified, no + # license config will be associated to the user; + # @!attribute [rw] license_config + # @return [::String] + # Optional. The full resource name of the Subscription(LicenseConfig) + # assigned to the user. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. User created timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. User update timestamp. + # @!attribute [r] last_login_time + # @return [::Google::Protobuf::Timestamp] + # Output only. User last logged in time. + # If the user has not logged in yet, this field will be empty. + class UserLicense + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # License assignment state enumeration. + module LicenseAssignmentState + # Default value. + LICENSE_ASSIGNMENT_STATE_UNSPECIFIED = 0 + + # License assigned to the user. + ASSIGNED = 1 + + # No license assigned to the user. + # Deprecated, translated to NO_LICENSE. + UNASSIGNED = 2 + + # No license assigned to the user. + NO_LICENSE = 3 + + # User attempted to login but no license assigned to the user. + # This state is only used for no user first time login attempt but cannot + # get license assigned. + # Users already logged in but cannot get license assigned will be assigned + # NO_LICENSE state(License could be unassigned by admin). + NO_LICENSE_ATTEMPTED_LOGIN = 4 + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_license_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_license_service.rb new file mode 100644 index 000000000000..991c03677fa6 --- /dev/null +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_license_service.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#list_user_licenses UserLicenseService.ListUserLicenses}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent [UserStore][] resource name, format: + # `projects/{project}/locations/{location}/userStores/{user_store_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, defaults to 10. The maximum value is 50; values + # above 50 will be coerced to 50. + # + # If this field is negative, an INVALID_ARGUMENT error is returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListUserLicenses` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUserLicenses` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter for the list request. + # + # Supported fields: + # + # * `license_assignment_state` + # + # Examples: + # + # * `license_assignment_state = ASSIGNED` to list assigned user licenses. + # * `license_assignment_state = NO_LICENSE` to list not licensed users. + # * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users + # who attempted login but no license assigned. + # * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter + # out users who attempted login but no license assigned. + class ListUserLicensesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#list_user_licenses UserLicenseService.ListUserLicenses}. + # @!attribute [rw] user_licenses + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::UserLicense>] + # All the customer's + # {::Google::Cloud::DiscoveryEngine::V1::UserLicense UserLicense}s. + # @!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 ListUserLicensesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#batch_update_user_licenses UserLicenseService.BatchUpdateUserLicenses} + # method. + # @!attribute [rw] inline_source + # @return [::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest::InlineSource] + # The inline source for the input content for document embeddings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent [UserStore][] resource name, format: + # `projects/{project}/locations/{location}/userStores/{user_store_id}`. + # @!attribute [rw] delete_unassigned_user_licenses + # @return [::Boolean] + # Optional. If true, if user licenses removed associated license config, the + # user license will be deleted. By default which is false, the user license + # will be updated to unassigned state. + class BatchUpdateUserLicensesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The inline source for the input config for BatchUpdateUserLicenses + # method. + # @!attribute [rw] user_licenses + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::UserLicense>] + # Required. A list of user licenses to update. Each user license + # must have a valid + # {::Google::Cloud::DiscoveryEngine::V1::UserLicense#user_principal UserLicense.user_principal}. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + class InlineSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Metadata related to the progress of the + # {::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#batch_update_user_licenses UserLicenseService.BatchUpdateUserLicenses} + # operation. This will be returned by the google.longrunning.Operation.metadata + # field. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Operation create time. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Operation last update time. If the operation is done, this is also the + # finish time. + # @!attribute [rw] success_count + # @return [::Integer] + # Count of user licenses successfully updated. + # @!attribute [rw] failure_count + # @return [::Integer] + # Count of user licenses that failed to be updated. + class BatchUpdateUserLicensesMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#batch_update_user_licenses UserLicenseService.BatchUpdateUserLicenses} + # method. + # @!attribute [rw] user_licenses + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::UserLicense>] + # UserLicenses successfully updated. + # @!attribute [rw] error_samples + # @return [::Array<::Google::Rpc::Status>] + # A sample of errors encountered while processing the request. + class BatchUpdateUserLicensesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/snippets/cmek_config_service/delete_cmek_config.rb b/google-cloud-discovery_engine-v1/snippets/cmek_config_service/delete_cmek_config.rb new file mode 100644 index 000000000000..4940c87251a6 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/cmek_config_service/delete_cmek_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_CmekConfigService_DeleteCmekConfig_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the delete_cmek_config call in the CmekConfigService 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::DiscoveryEngine::V1::CmekConfigService::Client#delete_cmek_config. +# +def delete_cmek_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new + + # Call the delete_cmek_config method. + result = client.delete_cmek_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END discoveryengine_v1_generated_CmekConfigService_DeleteCmekConfig_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/cmek_config_service/get_cmek_config.rb b/google-cloud-discovery_engine-v1/snippets/cmek_config_service/get_cmek_config.rb new file mode 100644 index 000000000000..2ef4291ab7ef --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/cmek_config_service/get_cmek_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_CmekConfigService_GetCmekConfig_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the get_cmek_config call in the CmekConfigService 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::DiscoveryEngine::V1::CmekConfigService::Client#get_cmek_config. +# +def get_cmek_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.new + + # Call the get_cmek_config method. + result = client.get_cmek_config request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1::CmekConfig. + p result +end +# [END discoveryengine_v1_generated_CmekConfigService_GetCmekConfig_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/cmek_config_service/list_cmek_configs.rb b/google-cloud-discovery_engine-v1/snippets/cmek_config_service/list_cmek_configs.rb new file mode 100644 index 000000000000..f31c13c926fd --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/cmek_config_service/list_cmek_configs.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_CmekConfigService_ListCmekConfigs_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the list_cmek_configs call in the CmekConfigService 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::DiscoveryEngine::V1::CmekConfigService::Client#list_cmek_configs. +# +def list_cmek_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new + + # Call the list_cmek_configs method. + result = client.list_cmek_configs request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse. + p result +end +# [END discoveryengine_v1_generated_CmekConfigService_ListCmekConfigs_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/cmek_config_service/update_cmek_config.rb b/google-cloud-discovery_engine-v1/snippets/cmek_config_service/update_cmek_config.rb new file mode 100644 index 000000000000..52aedee2d456 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/cmek_config_service/update_cmek_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_CmekConfigService_UpdateCmekConfig_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the update_cmek_config call in the CmekConfigService 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::DiscoveryEngine::V1::CmekConfigService::Client#update_cmek_config. +# +def update_cmek_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new + + # Call the update_cmek_config method. + result = client.update_cmek_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END discoveryengine_v1_generated_CmekConfigService_UpdateCmekConfig_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/create_identity_mapping_store.rb b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/create_identity_mapping_store.rb new file mode 100644 index 000000000000..14e6bc2d30c1 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/create_identity_mapping_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_IdentityMappingStoreService_CreateIdentityMappingStore_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the create_identity_mapping_store call in the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::Client#create_identity_mapping_store. +# +def create_identity_mapping_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest.new + + # Call the create_identity_mapping_store method. + result = client.create_identity_mapping_store request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore. + p result +end +# [END discoveryengine_v1_generated_IdentityMappingStoreService_CreateIdentityMappingStore_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/delete_identity_mapping_store.rb b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/delete_identity_mapping_store.rb new file mode 100644 index 000000000000..0eeefa0603af --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/delete_identity_mapping_store.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the delete_identity_mapping_store call in the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::Client#delete_identity_mapping_store. +# +def delete_identity_mapping_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest.new + + # Call the delete_identity_mapping_store method. + result = client.delete_identity_mapping_store request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END discoveryengine_v1_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/get_identity_mapping_store.rb b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/get_identity_mapping_store.rb new file mode 100644 index 000000000000..2c3f523a21ee --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/get_identity_mapping_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_IdentityMappingStoreService_GetIdentityMappingStore_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the get_identity_mapping_store call in the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::Client#get_identity_mapping_store. +# +def get_identity_mapping_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest.new + + # Call the get_identity_mapping_store method. + result = client.get_identity_mapping_store request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore. + p result +end +# [END discoveryengine_v1_generated_IdentityMappingStoreService_GetIdentityMappingStore_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/import_identity_mappings.rb b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/import_identity_mappings.rb new file mode 100644 index 000000000000..9a0df18c3e44 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/import_identity_mappings.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_IdentityMappingStoreService_ImportIdentityMappings_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the import_identity_mappings call in the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::Client#import_identity_mappings. +# +def import_identity_mappings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest.new + + # Call the import_identity_mappings method. + result = client.import_identity_mappings request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END discoveryengine_v1_generated_IdentityMappingStoreService_ImportIdentityMappings_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/list_identity_mapping_stores.rb b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/list_identity_mapping_stores.rb new file mode 100644 index 000000000000..ac6249d97d88 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/list_identity_mapping_stores.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_IdentityMappingStoreService_ListIdentityMappingStores_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the list_identity_mapping_stores call in the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mapping_stores. +# +def list_identity_mapping_stores + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest.new + + # Call the list_identity_mapping_stores method. + result = client.list_identity_mapping_stores 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::DiscoveryEngine::V1::IdentityMappingStore. + p item + end +end +# [END discoveryengine_v1_generated_IdentityMappingStoreService_ListIdentityMappingStores_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/list_identity_mappings.rb b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/list_identity_mappings.rb new file mode 100644 index 000000000000..80a2719d1b10 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/list_identity_mappings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_IdentityMappingStoreService_ListIdentityMappings_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the list_identity_mappings call in the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mappings. +# +def list_identity_mappings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest.new + + # Call the list_identity_mappings method. + result = client.list_identity_mappings 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::DiscoveryEngine::V1::IdentityMappingEntry. + p item + end +end +# [END discoveryengine_v1_generated_IdentityMappingStoreService_ListIdentityMappings_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/purge_identity_mappings.rb b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/purge_identity_mappings.rb new file mode 100644 index 000000000000..199b8714d645 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/identity_mapping_store_service/purge_identity_mappings.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_IdentityMappingStoreService_PurgeIdentityMappings_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the purge_identity_mappings call in the IdentityMappingStoreService 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::DiscoveryEngine::V1::IdentityMappingStoreService::Client#purge_identity_mappings. +# +def purge_identity_mappings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest.new + + # Call the purge_identity_mappings method. + result = client.purge_identity_mappings request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END discoveryengine_v1_generated_IdentityMappingStoreService_PurgeIdentityMappings_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json index c8b30fd653b0..bdf5f7ac894b 100644 --- a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -11,6 +11,166 @@ ] }, "snippets": [ + { + "region_tag": "discoveryengine_v1_generated_CmekConfigService_UpdateCmekConfig_sync", + "title": "Snippet for the update_cmek_config call in the CmekConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#update_cmek_config.", + "file": "cmek_config_service/update_cmek_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_cmek_config", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#update_cmek_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CmekConfigService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client" + }, + "method": { + "short_name": "UpdateCmekConfig", + "full_name": "google.cloud.discoveryengine.v1.CmekConfigService.UpdateCmekConfig", + "service": { + "short_name": "CmekConfigService", + "full_name": "google.cloud.discoveryengine.v1.CmekConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_CmekConfigService_GetCmekConfig_sync", + "title": "Snippet for the get_cmek_config call in the CmekConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#get_cmek_config.", + "file": "cmek_config_service/get_cmek_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_cmek_config", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#get_cmek_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::CmekConfig", + "client": { + "short_name": "CmekConfigService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client" + }, + "method": { + "short_name": "GetCmekConfig", + "full_name": "google.cloud.discoveryengine.v1.CmekConfigService.GetCmekConfig", + "service": { + "short_name": "CmekConfigService", + "full_name": "google.cloud.discoveryengine.v1.CmekConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_CmekConfigService_ListCmekConfigs_sync", + "title": "Snippet for the list_cmek_configs call in the CmekConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#list_cmek_configs.", + "file": "cmek_config_service/list_cmek_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_cmek_configs", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#list_cmek_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse", + "client": { + "short_name": "CmekConfigService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client" + }, + "method": { + "short_name": "ListCmekConfigs", + "full_name": "google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs", + "service": { + "short_name": "CmekConfigService", + "full_name": "google.cloud.discoveryengine.v1.CmekConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_CmekConfigService_DeleteCmekConfig_sync", + "title": "Snippet for the delete_cmek_config call in the CmekConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#delete_cmek_config.", + "file": "cmek_config_service/delete_cmek_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_cmek_config", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client#delete_cmek_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CmekConfigService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client" + }, + "method": { + "short_name": "DeleteCmekConfig", + "full_name": "google.cloud.discoveryengine.v1.CmekConfigService.DeleteCmekConfig", + "service": { + "short_name": "CmekConfigService", + "full_name": "google.cloud.discoveryengine.v1.CmekConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "discoveryengine_v1_generated_CompletionService_CompleteQuery_sync", "title": "Snippet for the complete_query call in the CompletionService service", @@ -1891,6 +2051,286 @@ } ] }, + { + "region_tag": "discoveryengine_v1_generated_IdentityMappingStoreService_CreateIdentityMappingStore_sync", + "title": "Snippet for the create_identity_mapping_store call in the IdentityMappingStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#create_identity_mapping_store.", + "file": "identity_mapping_store_service/create_identity_mapping_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_identity_mapping_store", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#create_identity_mapping_store", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore", + "client": { + "short_name": "IdentityMappingStoreService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client" + }, + "method": { + "short_name": "CreateIdentityMappingStore", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService.CreateIdentityMappingStore", + "service": { + "short_name": "IdentityMappingStoreService", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_IdentityMappingStoreService_GetIdentityMappingStore_sync", + "title": "Snippet for the get_identity_mapping_store call in the IdentityMappingStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#get_identity_mapping_store.", + "file": "identity_mapping_store_service/get_identity_mapping_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_identity_mapping_store", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#get_identity_mapping_store", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore", + "client": { + "short_name": "IdentityMappingStoreService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client" + }, + "method": { + "short_name": "GetIdentityMappingStore", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService.GetIdentityMappingStore", + "service": { + "short_name": "IdentityMappingStoreService", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_sync", + "title": "Snippet for the delete_identity_mapping_store call in the IdentityMappingStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#delete_identity_mapping_store.", + "file": "identity_mapping_store_service/delete_identity_mapping_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_identity_mapping_store", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#delete_identity_mapping_store", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "IdentityMappingStoreService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client" + }, + "method": { + "short_name": "DeleteIdentityMappingStore", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService.DeleteIdentityMappingStore", + "service": { + "short_name": "IdentityMappingStoreService", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_IdentityMappingStoreService_ImportIdentityMappings_sync", + "title": "Snippet for the import_identity_mappings call in the IdentityMappingStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#import_identity_mappings.", + "file": "identity_mapping_store_service/import_identity_mappings.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_identity_mappings", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#import_identity_mappings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "IdentityMappingStoreService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client" + }, + "method": { + "short_name": "ImportIdentityMappings", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings", + "service": { + "short_name": "IdentityMappingStoreService", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_IdentityMappingStoreService_PurgeIdentityMappings_sync", + "title": "Snippet for the purge_identity_mappings call in the IdentityMappingStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#purge_identity_mappings.", + "file": "identity_mapping_store_service/purge_identity_mappings.rb", + "language": "RUBY", + "client_method": { + "short_name": "purge_identity_mappings", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#purge_identity_mappings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "IdentityMappingStoreService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client" + }, + "method": { + "short_name": "PurgeIdentityMappings", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService.PurgeIdentityMappings", + "service": { + "short_name": "IdentityMappingStoreService", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_IdentityMappingStoreService_ListIdentityMappings_sync", + "title": "Snippet for the list_identity_mappings call in the IdentityMappingStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mappings.", + "file": "identity_mapping_store_service/list_identity_mappings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_identity_mappings", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mappings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsResponse", + "client": { + "short_name": "IdentityMappingStoreService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client" + }, + "method": { + "short_name": "ListIdentityMappings", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings", + "service": { + "short_name": "IdentityMappingStoreService", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_IdentityMappingStoreService_ListIdentityMappingStores_sync", + "title": "Snippet for the list_identity_mapping_stores call in the IdentityMappingStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mapping_stores.", + "file": "identity_mapping_store_service/list_identity_mapping_stores.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_identity_mapping_stores", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client#list_identity_mapping_stores", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresResponse", + "client": { + "short_name": "IdentityMappingStoreService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client" + }, + "method": { + "short_name": "ListIdentityMappingStores", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores", + "service": { + "short_name": "IdentityMappingStoreService", + "full_name": "google.cloud.discoveryengine.v1.IdentityMappingStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "discoveryengine_v1_generated_ProjectService_ProvisionProject_sync", "title": "Snippet for the provision_project call in the ProjectService service", @@ -3090,6 +3530,86 @@ "type": "FULL" } ] + }, + { + "region_tag": "discoveryengine_v1_generated_UserLicenseService_ListUserLicenses_sync", + "title": "Snippet for the list_user_licenses call in the UserLicenseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#list_user_licenses.", + "file": "user_license_service/list_user_licenses.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_user_licenses", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#list_user_licenses", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesResponse", + "client": { + "short_name": "UserLicenseService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client" + }, + "method": { + "short_name": "ListUserLicenses", + "full_name": "google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses", + "service": { + "short_name": "UserLicenseService", + "full_name": "google.cloud.discoveryengine.v1.UserLicenseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_UserLicenseService_BatchUpdateUserLicenses_sync", + "title": "Snippet for the batch_update_user_licenses call in the UserLicenseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#batch_update_user_licenses.", + "file": "user_license_service/batch_update_user_licenses.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_update_user_licenses", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client#batch_update_user_licenses", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "UserLicenseService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client" + }, + "method": { + "short_name": "BatchUpdateUserLicenses", + "full_name": "google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses", + "service": { + "short_name": "UserLicenseService", + "full_name": "google.cloud.discoveryengine.v1.UserLicenseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-discovery_engine-v1/snippets/user_license_service/batch_update_user_licenses.rb b/google-cloud-discovery_engine-v1/snippets/user_license_service/batch_update_user_licenses.rb new file mode 100644 index 000000000000..c8ceb0d43ce5 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/user_license_service/batch_update_user_licenses.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_UserLicenseService_BatchUpdateUserLicenses_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the batch_update_user_licenses call in the UserLicenseService 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::DiscoveryEngine::V1::UserLicenseService::Client#batch_update_user_licenses. +# +def batch_update_user_licenses + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest.new + + # Call the batch_update_user_licenses method. + result = client.batch_update_user_licenses request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END discoveryengine_v1_generated_UserLicenseService_BatchUpdateUserLicenses_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/user_license_service/list_user_licenses.rb b/google-cloud-discovery_engine-v1/snippets/user_license_service/list_user_licenses.rb new file mode 100644 index 000000000000..63fca1f8ad81 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/user_license_service/list_user_licenses.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_UserLicenseService_ListUserLicenses_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the list_user_licenses call in the UserLicenseService 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::DiscoveryEngine::V1::UserLicenseService::Client#list_user_licenses. +# +def list_user_licenses + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest.new + + # Call the list_user_licenses method. + result = client.list_user_licenses 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::DiscoveryEngine::V1::UserLicense. + p item + end +end +# [END discoveryengine_v1_generated_UserLicenseService_ListUserLicenses_sync] diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_operations_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_operations_test.rb new file mode 100644 index 000000000000..74d9b24931a6 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/cmek_config_service_pb" +require "google/cloud/discoveryengine/v1/cmek_config_service_services_pb" +require "google/cloud/discovery_engine/v1/cmek_config_service" + +class ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::DiscoveryEngine::V1::CmekConfigService::Operations.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::DiscoveryEngine::V1::CmekConfigService::Operations::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_paths_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_paths_test.rb new file mode 100644 index 000000000000..963fc7c88aa9 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_paths_test.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/cmek_config_service" + +class ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::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_cmek_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cmek_config_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/cmekConfig", path + + path = client.cmek_config_path project: "value0", location: "value1", cmek_config: "value2" + assert_equal "projects/value0/locations/value1/cmekConfigs/value2", path + end + end + + def test_crypto_key_versions_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_versions_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + + def test_crypto_keys_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_keys_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + 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::DiscoveryEngine::V1::CmekConfigService::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 +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_rest_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_rest_test.rb new file mode 100644 index 000000000000..723f31151687 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_rest_test.rb @@ -0,0 +1,316 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/cmek_config_service_pb" +require "google/cloud/discovery_engine/v1/cmek_config_service/rest" + + +class ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::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_update_cmek_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + config = {} + set_default = true + + update_cmek_config_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::DiscoveryEngine::V1::CmekConfigService::Rest::ServiceStub.stub :transcode_update_cmek_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_cmek_config_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_cmek_config({ config: config, set_default: set_default }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_cmek_config config: config, set_default: set_default do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_cmek_config ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new(config: config, set_default: set_default) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_cmek_config({ config: config, set_default: set_default }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_cmek_config(::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new(config: config, set_default: set_default), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_cmek_config_client_stub.call_count + end + end + end + + def test_get_cmek_config + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::CmekConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_cmek_config_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::DiscoveryEngine::V1::CmekConfigService::Rest::ServiceStub.stub :transcode_get_cmek_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_cmek_config_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_cmek_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_cmek_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_cmek_config ::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_cmek_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_cmek_config(::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_cmek_config_client_stub.call_count + end + end + end + + def test_list_cmek_configs + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_cmek_configs_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::DiscoveryEngine::V1::CmekConfigService::Rest::ServiceStub.stub :transcode_list_cmek_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_cmek_configs_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_cmek_configs({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_cmek_configs parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_cmek_configs ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_cmek_configs({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_cmek_configs(::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_cmek_configs_client_stub.call_count + end + end + end + + def test_delete_cmek_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_cmek_config_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::DiscoveryEngine::V1::CmekConfigService::Rest::ServiceStub.stub :transcode_delete_cmek_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_cmek_config_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_cmek_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_cmek_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_cmek_config ::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_cmek_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_cmek_config(::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_cmek_config_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::DiscoveryEngine::V1::CmekConfigService::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::DiscoveryEngine::V1::CmekConfigService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb new file mode 100644 index 000000000000..c72d0ca5f3eb --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb @@ -0,0 +1,343 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/cmek_config_service_pb" +require "google/cloud/discoveryengine/v1/cmek_config_service_services_pb" +require "google/cloud/discovery_engine/v1/cmek_config_service" + +class ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::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_update_cmek_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + config = {} + set_default = true + + update_cmek_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_cmek_config, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::CmekConfig), request["config"] + assert_equal true, request["set_default"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_cmek_config_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_cmek_config({ config: config, set_default: set_default }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_cmek_config config: config, set_default: set_default do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_cmek_config ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new(config: config, set_default: set_default) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_cmek_config({ config: config, set_default: set_default }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_cmek_config(::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new(config: config, set_default: set_default), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_cmek_config_client_stub.call_rpc_count + end + end + + def test_get_cmek_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::CmekConfig.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" + + get_cmek_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_cmek_config, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_cmek_config_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_cmek_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_cmek_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_cmek_config ::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_cmek_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_cmek_config(::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.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, get_cmek_config_client_stub.call_rpc_count + end + end + + def test_list_cmek_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse.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" + + list_cmek_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_cmek_configs, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_cmek_configs_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_cmek_configs({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_cmek_configs parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_cmek_configs ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_cmek_configs({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_cmek_configs(::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_cmek_configs_client_stub.call_rpc_count + end + end + + def test_delete_cmek_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_cmek_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_cmek_config, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_cmek_config_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_cmek_config({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_cmek_config name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_cmek_config ::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_cmek_config({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_cmek_config(::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_cmek_config_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::DiscoveryEngine::V1::CmekConfigService::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::DiscoveryEngine::V1::CmekConfigService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations, client.operations_client + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/control_service_paths_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/control_service_paths_test.rb index 674250d43890..18798243d8c4 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/control_service_paths_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/control_service_paths_test.rb @@ -74,6 +74,21 @@ def test_data_store_path end end + def test_document_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::ControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.document_path project: "value0", location: "value1", data_store: "value2", branch: "value3", document: "value4" + assert_equal "projects/value0/locations/value1/dataStores/value2/branches/value3/documents/value4", path + + path = client.document_path project: "value0", location: "value1", collection: "value2", data_store: "value3", branch: "value4", document: "value5" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/branches/value4/documents/value5", path + end + end + def test_engine_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_paths_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_paths_test.rb index 6d50090184e7..a7ac90a3176b 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_paths_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_paths_test.rb @@ -41,6 +41,21 @@ def logger end end + def test_cmek_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::DataStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cmek_config_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/cmekConfig", path + + path = client.cmek_config_path project: "value0", location: "value1", cmek_config: "value2" + assert_equal "projects/value0/locations/value1/cmekConfigs/value2", path + end + end + def test_collection_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -53,6 +68,30 @@ def test_collection_path end end + def test_crypto_key_versions_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::DataStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_versions_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + + def test_crypto_keys_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::DataStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_keys_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + def test_data_store_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -83,6 +122,18 @@ def test_document_processing_config_path end end + def test_identity_mapping_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::DataStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.identity_mapping_store_path project: "value0", location: "value1", identity_mapping_store: "value2" + assert_equal "projects/value0/locations/value1/identityMappingStores/value2", path + end + end + def test_schema_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_rest_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_rest_test.rb index 3e12950fe2f4..c90df5a17602 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_rest_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_rest_test.rb @@ -86,6 +86,7 @@ def test_create_data_store call_options = {} # Create request parameters for a unary method. + cmek_config_name = "hello world" parent = "hello world" data_store = {} data_store_id = "hello world" @@ -106,27 +107,27 @@ def test_create_data_store end # Use hash object - client.create_data_store({ parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation }) do |_result, response| + client.create_data_store({ cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.create_data_store parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation do |_result, response| + client.create_data_store cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.create_data_store ::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest.new(parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation) do |_result, response| + client.create_data_store ::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest.new(cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.create_data_store({ parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation }, call_options) do |_result, response| + client.create_data_store({ cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.create_data_store(::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest.new(parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation), call_options) do |_result, response| + client.create_data_store(::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest.new(cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_test.rb index 25012bdb8b2c..683d301237bf 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_test.rb @@ -72,6 +72,7 @@ def test_create_data_store grpc_options = {} # Create request parameters for a unary method. + cmek_config_name = "hello world" parent = "hello world" data_store = {} data_store_id = "hello world" @@ -81,6 +82,8 @@ def test_create_data_store create_data_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :create_data_store, name assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest, request + assert_equal "hello world", request["cmek_config_name"] + assert_equal :cmek_config_name, request.cmek_options assert_equal "hello world", request["parent"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::DataStore), request["data_store"] assert_equal "hello world", request["data_store_id"] @@ -96,35 +99,35 @@ def test_create_data_store end # Use hash object - client.create_data_store({ parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation }) do |response, operation| + client.create_data_store({ cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.create_data_store parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation do |response, operation| + client.create_data_store cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.create_data_store ::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest.new(parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation) do |response, operation| + client.create_data_store ::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest.new(cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.create_data_store({ parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation }, grpc_options) do |response, operation| + client.create_data_store({ cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.create_data_store(::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest.new(parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation), grpc_options) do |response, operation| + client.create_data_store(::Google::Cloud::DiscoveryEngine::V1::CreateDataStoreRequest.new(cmek_config_name: cmek_config_name, parent: parent, data_store: data_store, data_store_id: data_store_id, create_advanced_site_search: create_advanced_site_search, skip_default_schema_creation: skip_default_schema_creation), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_operations_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_operations_test.rb new file mode 100644 index 000000000000..b98421ba1e08 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/identity_mapping_store_service_pb" +require "google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service" + +class ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::DiscoveryEngine::V1::IdentityMappingStoreService::Operations.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::DiscoveryEngine::V1::IdentityMappingStoreService::Operations::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_paths_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_paths_test.rb new file mode 100644 index 000000000000..26625e168930 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_paths_test.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/identity_mapping_store_service" + +class ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::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_cmek_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cmek_config_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/cmekConfig", path + + path = client.cmek_config_path project: "value0", location: "value1", cmek_config: "value2" + assert_equal "projects/value0/locations/value1/cmekConfigs/value2", path + end + end + + def test_crypto_key_versions_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_versions_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + + def test_crypto_keys_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_keys_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_identity_mapping_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.identity_mapping_store_path project: "value0", location: "value1", identity_mapping_store: "value2" + assert_equal "projects/value0/locations/value1/identityMappingStores/value2", path + 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::DiscoveryEngine::V1::IdentityMappingStoreService::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 +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_rest_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_rest_test.rb new file mode 100644 index 000000000000..bb7b19f79ba8 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_rest_test.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/identity_mapping_store_service_pb" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service/rest" + + +class ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::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_identity_mapping_store + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + cmek_config_name = "hello world" + parent = "hello world" + identity_mapping_store_id = "hello world" + identity_mapping_store = {} + + create_identity_mapping_store_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::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::ServiceStub.stub :transcode_create_identity_mapping_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_identity_mapping_store_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_identity_mapping_store({ cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_identity_mapping_store cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_identity_mapping_store ::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest.new(cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_identity_mapping_store({ cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_identity_mapping_store(::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest.new(cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_identity_mapping_store_client_stub.call_count + end + end + end + + def test_get_identity_mapping_store + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_identity_mapping_store_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::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::ServiceStub.stub :transcode_get_identity_mapping_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_identity_mapping_store_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_identity_mapping_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_identity_mapping_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_identity_mapping_store ::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_identity_mapping_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_identity_mapping_store(::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_identity_mapping_store_client_stub.call_count + end + end + end + + def test_delete_identity_mapping_store + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_identity_mapping_store_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::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::ServiceStub.stub :transcode_delete_identity_mapping_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_identity_mapping_store_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_identity_mapping_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_identity_mapping_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_identity_mapping_store ::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_identity_mapping_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_identity_mapping_store(::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_identity_mapping_store_client_stub.call_count + end + end + end + + def test_import_identity_mappings + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + inline_source = {} + identity_mapping_store = "hello world" + + import_identity_mappings_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::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::ServiceStub.stub :transcode_import_identity_mappings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_identity_mappings_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_identity_mappings({ inline_source: inline_source, identity_mapping_store: identity_mapping_store }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_identity_mappings inline_source: inline_source, identity_mapping_store: identity_mapping_store do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_identity_mappings ::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest.new(inline_source: inline_source, identity_mapping_store: identity_mapping_store) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_identity_mappings({ inline_source: inline_source, identity_mapping_store: identity_mapping_store }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_identity_mappings(::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest.new(inline_source: inline_source, identity_mapping_store: identity_mapping_store), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_identity_mappings_client_stub.call_count + end + end + end + + def test_purge_identity_mappings + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + inline_source = {} + identity_mapping_store = "hello world" + filter = "hello world" + force = true + + purge_identity_mappings_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::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::ServiceStub.stub :transcode_purge_identity_mappings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, purge_identity_mappings_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.purge_identity_mappings({ inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.purge_identity_mappings inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.purge_identity_mappings ::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest.new(inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.purge_identity_mappings({ inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.purge_identity_mappings(::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest.new(inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, purge_identity_mappings_client_stub.call_count + end + end + end + + def test_list_identity_mappings + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + identity_mapping_store = "hello world" + page_size = 42 + page_token = "hello world" + + list_identity_mappings_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::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::ServiceStub.stub :transcode_list_identity_mappings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_identity_mappings_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_identity_mappings({ identity_mapping_store: identity_mapping_store, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_identity_mappings identity_mapping_store: identity_mapping_store, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_identity_mappings ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest.new(identity_mapping_store: identity_mapping_store, 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_identity_mappings({ identity_mapping_store: identity_mapping_store, 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_identity_mappings(::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest.new(identity_mapping_store: identity_mapping_store, 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_identity_mappings_client_stub.call_count + end + end + end + + def test_list_identity_mapping_stores + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_identity_mapping_stores_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::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::ServiceStub.stub :transcode_list_identity_mapping_stores_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_identity_mapping_stores_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_identity_mapping_stores({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_identity_mapping_stores parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_identity_mapping_stores ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest.new(parent: parent, 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_identity_mapping_stores({ parent: parent, 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_identity_mapping_stores(::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest.new(parent: parent, 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_identity_mapping_stores_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::DiscoveryEngine::V1::IdentityMappingStoreService::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::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb new file mode 100644 index 000000000000..2edb6bb53d4b --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb @@ -0,0 +1,556 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/identity_mapping_store_service_pb" +require "google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb" +require "google/cloud/discovery_engine/v1/identity_mapping_store_service" + +class ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::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_identity_mapping_store + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore.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. + cmek_config_name = "hello world" + parent = "hello world" + identity_mapping_store_id = "hello world" + identity_mapping_store = {} + + create_identity_mapping_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_identity_mapping_store, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest, request + assert_equal "hello world", request["cmek_config_name"] + assert_equal :cmek_config_name, request.cmek_options + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["identity_mapping_store_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore), request["identity_mapping_store"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_identity_mapping_store_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_identity_mapping_store({ cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_identity_mapping_store cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_identity_mapping_store ::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest.new(cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_identity_mapping_store({ cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_identity_mapping_store(::Google::Cloud::DiscoveryEngine::V1::CreateIdentityMappingStoreRequest.new(cmek_config_name: cmek_config_name, parent: parent, identity_mapping_store_id: identity_mapping_store_id, identity_mapping_store: identity_mapping_store), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_identity_mapping_store_client_stub.call_rpc_count + end + end + + def test_get_identity_mapping_store + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStore.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" + + get_identity_mapping_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_identity_mapping_store, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_identity_mapping_store_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_identity_mapping_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_identity_mapping_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_identity_mapping_store ::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_identity_mapping_store({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_identity_mapping_store(::Google::Cloud::DiscoveryEngine::V1::GetIdentityMappingStoreRequest.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, get_identity_mapping_store_client_stub.call_rpc_count + end + end + + def test_delete_identity_mapping_store + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_identity_mapping_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_identity_mapping_store, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_identity_mapping_store_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_identity_mapping_store({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_identity_mapping_store name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_identity_mapping_store ::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_identity_mapping_store({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_identity_mapping_store(::Google::Cloud::DiscoveryEngine::V1::DeleteIdentityMappingStoreRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_identity_mapping_store_client_stub.call_rpc_count + end + end + + def test_import_identity_mappings + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + inline_source = {} + identity_mapping_store = "hello world" + + import_identity_mappings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_identity_mappings, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest::InlineSource), request["inline_source"] + assert_equal :inline_source, request.source + assert_equal "hello world", request["identity_mapping_store"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_identity_mappings_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_identity_mappings({ inline_source: inline_source, identity_mapping_store: identity_mapping_store }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_identity_mappings inline_source: inline_source, identity_mapping_store: identity_mapping_store do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_identity_mappings ::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest.new(inline_source: inline_source, identity_mapping_store: identity_mapping_store) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_identity_mappings({ inline_source: inline_source, identity_mapping_store: identity_mapping_store }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_identity_mappings(::Google::Cloud::DiscoveryEngine::V1::ImportIdentityMappingsRequest.new(inline_source: inline_source, identity_mapping_store: identity_mapping_store), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_identity_mappings_client_stub.call_rpc_count + end + end + + def test_purge_identity_mappings + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + inline_source = {} + identity_mapping_store = "hello world" + filter = "hello world" + force = true + + purge_identity_mappings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :purge_identity_mappings, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest::InlineSource), request["inline_source"] + assert_equal :inline_source, request.source + assert_equal "hello world", request["identity_mapping_store"] + assert_equal "hello world", request["filter"] + assert_equal true, request["force"] + assert request.has_force? + refute_nil options + end + + Gapic::ServiceStub.stub :new, purge_identity_mappings_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.purge_identity_mappings({ inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.purge_identity_mappings inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.purge_identity_mappings ::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest.new(inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.purge_identity_mappings({ inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.purge_identity_mappings(::Google::Cloud::DiscoveryEngine::V1::PurgeIdentityMappingsRequest.new(inline_source: inline_source, identity_mapping_store: identity_mapping_store, filter: filter, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, purge_identity_mappings_client_stub.call_rpc_count + end + end + + def test_list_identity_mappings + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsResponse.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. + identity_mapping_store = "hello world" + page_size = 42 + page_token = "hello world" + + list_identity_mappings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_identity_mappings, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest, request + assert_equal "hello world", request["identity_mapping_store"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_identity_mappings_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_identity_mappings({ identity_mapping_store: identity_mapping_store, 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_identity_mappings identity_mapping_store: identity_mapping_store, 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_identity_mappings ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest.new(identity_mapping_store: identity_mapping_store, 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_identity_mappings({ identity_mapping_store: identity_mapping_store, 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_identity_mappings(::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingsRequest.new(identity_mapping_store: identity_mapping_store, 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_identity_mappings_client_stub.call_rpc_count + end + end + + def test_list_identity_mapping_stores + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresResponse.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" + page_size = 42 + page_token = "hello world" + + list_identity_mapping_stores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_identity_mapping_stores, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_identity_mapping_stores_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_identity_mapping_stores({ parent: parent, 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_identity_mapping_stores parent: parent, 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_identity_mapping_stores ::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest.new(parent: parent, 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_identity_mapping_stores({ parent: parent, 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_identity_mapping_stores(::Google::Cloud::DiscoveryEngine::V1::ListIdentityMappingStoresRequest.new(parent: parent, 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_identity_mapping_stores_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::DiscoveryEngine::V1::IdentityMappingStoreService::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::DiscoveryEngine::V1::IdentityMappingStoreService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Operations, client.operations_client + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_operations_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_operations_test.rb new file mode 100644 index 000000000000..d3b92adeaad4 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/user_license_service_pb" +require "google/cloud/discoveryengine/v1/user_license_service_services_pb" +require "google/cloud/discovery_engine/v1/user_license_service" + +class ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::DiscoveryEngine::V1::UserLicenseService::Operations.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::DiscoveryEngine::V1::UserLicenseService::Operations::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_paths_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_paths_test.rb new file mode 100644 index 000000000000..f346cab0fb63 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/user_license_service" + +class ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::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_license_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.license_config_path project: "value0", location: "value1", license_config: "value2" + assert_equal "projects/value0/locations/value1/licenseConfigs/value2", path + end + end + + def test_user_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_store_path project: "value0", location: "value1", user_store: "value2" + assert_equal "projects/value0/locations/value1/userStores/value2", path + end + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_rest_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_rest_test.rb new file mode 100644 index 000000000000..2a8d34c199bd --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/user_license_service_pb" +require "google/cloud/discovery_engine/v1/user_license_service/rest" + + +class ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::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_list_user_licenses + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_user_licenses_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::DiscoveryEngine::V1::UserLicenseService::Rest::ServiceStub.stub :transcode_list_user_licenses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_user_licenses_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_user_licenses({ parent: parent, 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_user_licenses parent: parent, 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_user_licenses ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest.new(parent: parent, 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_user_licenses({ parent: parent, 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_user_licenses(::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest.new(parent: parent, 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_user_licenses_client_stub.call_count + end + end + end + + def test_batch_update_user_licenses + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + inline_source = {} + parent = "hello world" + delete_unassigned_user_licenses = true + + batch_update_user_licenses_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::DiscoveryEngine::V1::UserLicenseService::Rest::ServiceStub.stub :transcode_batch_update_user_licenses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_update_user_licenses_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_update_user_licenses({ inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_update_user_licenses inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_update_user_licenses ::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest.new(inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_update_user_licenses({ inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_update_user_licenses(::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest.new(inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_update_user_licenses_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::DiscoveryEngine::V1::UserLicenseService::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::DiscoveryEngine::V1::UserLicenseService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_test.rb new file mode 100644 index 000000000000..c152d2b57688 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_test.rb @@ -0,0 +1,236 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/user_license_service_pb" +require "google/cloud/discoveryengine/v1/user_license_service_services_pb" +require "google/cloud/discovery_engine/v1/user_license_service" + +class ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::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_list_user_licenses + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_user_licenses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_user_licenses, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest, request + assert_equal "hello world", request["parent"] + 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_user_licenses_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_user_licenses({ parent: parent, 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_user_licenses parent: parent, 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_user_licenses ::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest.new(parent: parent, 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_user_licenses({ parent: parent, 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_user_licenses(::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest.new(parent: parent, 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_user_licenses_client_stub.call_rpc_count + end + end + + def test_batch_update_user_licenses + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + inline_source = {} + parent = "hello world" + delete_unassigned_user_licenses = true + + batch_update_user_licenses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_update_user_licenses, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest::InlineSource), request["inline_source"] + assert_equal :inline_source, request.source + assert_equal "hello world", request["parent"] + assert_equal true, request["delete_unassigned_user_licenses"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_update_user_licenses_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_update_user_licenses({ inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_update_user_licenses inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_update_user_licenses ::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest.new(inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_update_user_licenses({ inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_update_user_licenses(::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest.new(inline_source: inline_source, parent: parent, delete_unassigned_user_licenses: delete_unassigned_user_licenses), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_update_user_licenses_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::DiscoveryEngine::V1::UserLicenseService::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::DiscoveryEngine::V1::UserLicenseService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Operations, client.operations_client + end +end From 9e1fd8ab21c6ed6fe52017cf2a7ba0b0331c6c0c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:22:56 -0700 Subject: [PATCH 089/457] feat: add CMEK config service (#30497) feat: add identity mapping service feat: add user license config service feat: add HealthcareFhirConfig to FHIR data store feat: add ConnectorRunErrorContext to error log feat: support structured content for chunk feat: support ACL data store and document feat: add more options for layout parser config feat: support media recommendation engine feat: enable claim level score for grounding feat: add custom search operators for Workspace search feat: add more indexing state for site search engine docs: keep the API doc up-to-date with recent changes --- .../AUTHENTICATION.md | 6 +- google-cloud-discovery_engine/Rakefile | 4 +- .../lib/google/cloud/discovery_engine.rb | 210 ++++++++++++++++++ .../cloud/discovery_engine/client_test.rb | 63 ++++++ 4 files changed, 278 insertions(+), 5 deletions(-) diff --git a/google-cloud-discovery_engine/AUTHENTICATION.md b/google-cloud-discovery_engine/AUTHENTICATION.md index c9b17c8083a8..a40ebeeadfff 100644 --- a/google-cloud-discovery_engine/AUTHENTICATION.md +++ b/google-cloud-discovery_engine/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/discovery_engine" -client = Google::Cloud::DiscoveryEngine.completion_service do |config| +client = Google::Cloud::DiscoveryEngine.cmek_config_service do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -70,7 +70,7 @@ Google::Cloud::DiscoveryEngine.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = Google::Cloud::DiscoveryEngine.completion_service +client = Google::Cloud::DiscoveryEngine.cmek_config_service ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/discovery_engine" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = Google::Cloud::DiscoveryEngine.completion_service +client = Google::Cloud::DiscoveryEngine.cmek_config_service ``` ### Local ADC file diff --git a/google-cloud-discovery_engine/Rakefile b/google-cloud-discovery_engine/Rakefile index 89f5059f48f4..4190ec5f593e 100644 --- a/google-cloud-discovery_engine/Rakefile +++ b/google-cloud-discovery_engine/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/discovery_engine/v1/completion_service/credentials" - ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Credentials.env_vars.each do |path| + require "google/cloud/discovery_engine/v1/cmek_config_service/credentials" + ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-discovery_engine/lib/google/cloud/discovery_engine.rb b/google-cloud-discovery_engine/lib/google/cloud/discovery_engine.rb index a0bfa2cde695..ff24822bac3d 100644 --- a/google-cloud-discovery_engine/lib/google/cloud/discovery_engine.rb +++ b/google-cloud-discovery_engine/lib/google/cloud/discovery_engine.rb @@ -45,6 +45,76 @@ module Google module Cloud module DiscoveryEngine + ## + # Create a new client object for CmekConfigService. + # + # By default, this returns an instance of + # [Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CmekConfigService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CmekConfigService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CmekConfigService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::DiscoveryEngine.cmek_config_service_available?}. + # + # ## About CmekConfigService + # + # Service for managing CMEK related tasks + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.cmek_config_service version: :v1, transport: :grpc, &block + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CmekConfigService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CmekConfigService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.cmek_config_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CmekConfigService service, + # or if the versioned client gem needs an update to support the CmekConfigService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.cmek_config_service_available? version: :v1, transport: :grpc + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::DiscoveryEngine.const_get package_name + return false unless service_module.const_defined? :CmekConfigService + service_module = service_module.const_get :CmekConfigService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for CompletionService. # @@ -611,6 +681,76 @@ def self.grounded_generation_service_available? version: :v1, transport: :grpc false end + ## + # Create a new client object for IdentityMappingStoreService. + # + # By default, this returns an instance of + # [Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-IdentityMappingStoreService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the IdentityMappingStoreService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the IdentityMappingStoreService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::DiscoveryEngine.identity_mapping_store_service_available?}. + # + # ## About IdentityMappingStoreService + # + # Service for managing Identity Mapping Stores. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.identity_mapping_store_service version: :v1, transport: :grpc, &block + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:IdentityMappingStoreService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the IdentityMappingStoreService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.identity_mapping_store_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the IdentityMappingStoreService service, + # or if the versioned client gem needs an update to support the IdentityMappingStoreService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.identity_mapping_store_service_available? version: :v1, transport: :grpc + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::DiscoveryEngine.const_get package_name + return false unless service_module.const_defined? :IdentityMappingStoreService + service_module = service_module.const_get :IdentityMappingStoreService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for ProjectService. # @@ -1173,6 +1313,76 @@ def self.user_event_service_available? version: :v1, transport: :grpc false end + ## + # Create a new client object for UserLicenseService. + # + # By default, this returns an instance of + # [Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UserLicenseService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the UserLicenseService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the UserLicenseService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::DiscoveryEngine.user_license_service_available?}. + # + # ## About UserLicenseService + # + # Service for managing User Licenses. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.user_license_service version: :v1, transport: :grpc, &block + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:UserLicenseService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the UserLicenseService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.user_license_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the UserLicenseService service, + # or if the versioned client gem needs an update to support the UserLicenseService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.user_license_service_available? version: :v1, transport: :grpc + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::DiscoveryEngine.const_get package_name + return false unless service_module.const_defined? :UserLicenseService + service_module = service_module.const_get :UserLicenseService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Configure the google-cloud-discovery_engine library. # diff --git a/google-cloud-discovery_engine/test/google/cloud/discovery_engine/client_test.rb b/google-cloud-discovery_engine/test/google/cloud/discovery_engine/client_test.rb index bd86dfbc7fc8..2a7f41bd80f8 100644 --- a/google-cloud-discovery_engine/test/google/cloud/discovery_engine/client_test.rb +++ b/google-cloud-discovery_engine/test/google/cloud/discovery_engine/client_test.rb @@ -41,6 +41,27 @@ def logger end end + def test_cmek_config_service_grpc + skip unless Google::Cloud::DiscoveryEngine.cmek_config_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::DiscoveryEngine.cmek_config_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client, client + end + end + + def test_cmek_config_service_rest + skip unless Google::Cloud::DiscoveryEngine.cmek_config_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::DiscoveryEngine.cmek_config_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client, client + end + end + def test_completion_service_grpc skip unless Google::Cloud::DiscoveryEngine.completion_service_available? transport: :grpc Gapic::ServiceStub.stub :new, DummyStub.new do @@ -209,6 +230,27 @@ def test_grounded_generation_service_rest end end + def test_identity_mapping_store_service_grpc + skip unless Google::Cloud::DiscoveryEngine.identity_mapping_store_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::DiscoveryEngine.identity_mapping_store_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client, client + end + end + + def test_identity_mapping_store_service_rest + skip unless Google::Cloud::DiscoveryEngine.identity_mapping_store_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::DiscoveryEngine.identity_mapping_store_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Rest::Client, client + end + end + def test_project_service_grpc skip unless Google::Cloud::DiscoveryEngine.project_service_available? transport: :grpc Gapic::ServiceStub.stub :new, DummyStub.new do @@ -376,4 +418,25 @@ def test_user_event_service_rest assert_kind_of Google::Cloud::DiscoveryEngine::V1::UserEventService::Rest::Client, client end end + + def test_user_license_service_grpc + skip unless Google::Cloud::DiscoveryEngine.user_license_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::DiscoveryEngine.user_license_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client, client + end + end + + def test_user_license_service_rest + skip unless Google::Cloud::DiscoveryEngine.user_license_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::DiscoveryEngine.user_license_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client, client + end + end end From fabe0addaccaf784dc4879e978c19ee73521f655 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:24:14 -0700 Subject: [PATCH 090/457] feat(spanner): add new change_stream.proto (#30493) --- google-cloud-spanner-v1/.owlbot-manifest.json | 2 + .../lib/google/spanner/v1/change_stream_pb.rb | 61 +++ .../google/spanner/v1/change_stream.rb | 488 ++++++++++++++++++ 3 files changed, 551 insertions(+) create mode 100644 google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb create mode 100644 google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb diff --git a/google-cloud-spanner-v1/.owlbot-manifest.json b/google-cloud-spanner-v1/.owlbot-manifest.json index 2503407662c0..660137160297 100644 --- a/google-cloud-spanner-v1/.owlbot-manifest.json +++ b/google-cloud-spanner-v1/.owlbot-manifest.json @@ -20,6 +20,7 @@ "lib/google/cloud/spanner/v1/spanner/credentials.rb", "lib/google/cloud/spanner/v1/spanner/paths.rb", "lib/google/cloud/spanner/v1/version.rb", + "lib/google/spanner/v1/change_stream_pb.rb", "lib/google/spanner/v1/commit_response_pb.rb", "lib/google/spanner/v1/keys_pb.rb", "lib/google/spanner/v1/mutation_pb.rb", @@ -40,6 +41,7 @@ "proto_docs/google/protobuf/struct.rb", "proto_docs/google/protobuf/timestamp.rb", "proto_docs/google/rpc/status.rb", + "proto_docs/google/spanner/v1/change_stream.rb", "proto_docs/google/spanner/v1/commit_response.rb", "proto_docs/google/spanner/v1/keys.rb", "proto_docs/google/spanner/v1/mutation.rb", diff --git a/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb b/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb new file mode 100644 index 000000000000..7aadb137310b --- /dev/null +++ b/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/change_stream.proto + +require 'google/protobuf' + +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/spanner/v1/type_pb' + + +descriptor_data = "\n%google/spanner/v1/change_stream.proto\x12\x11google.spanner.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\x96\x14\n\x12\x43hangeStreamRecord\x12T\n\x12\x64\x61ta_change_record\x18\x01 \x01(\x0b\x32\x36.google.spanner.v1.ChangeStreamRecord.DataChangeRecordH\x00\x12Q\n\x10heartbeat_record\x18\x02 \x01(\x0b\x32\x35.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordH\x00\x12\\\n\x16partition_start_record\x18\x03 \x01(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordH\x00\x12X\n\x14partition_end_record\x18\x04 \x01(\x0b\x32\x38.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordH\x00\x12\\\n\x16partition_event_record\x18\x05 \x01(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordH\x00\x1a\xd2\n\n\x10\x44\x61taChangeRecord\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x1d\n\x15server_transaction_id\x18\x03 \x01(\t\x12\x32\n*is_last_record_in_transaction_in_partition\x18\x04 \x01(\x08\x12\r\n\x05table\x18\x05 \x01(\t\x12^\n\x0f\x63olumn_metadata\x18\x06 \x03(\x0b\x32\x45.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata\x12H\n\x04mods\x18\x07 \x03(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod\x12P\n\x08mod_type\x18\x08 \x01(\x0e\x32>.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType\x12\x63\n\x12value_capture_type\x18\t \x01(\x0e\x32G.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType\x12(\n number_of_records_in_transaction\x18\n \x01(\x05\x12+\n#number_of_partitions_in_transaction\x18\x0b \x01(\x05\x12\x17\n\x0ftransaction_tag\x18\x0c \x01(\t\x12\x1d\n\x15is_system_transaction\x18\r \x01(\x08\x1aw\n\x0e\x43olumnMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04type\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type\x12\x16\n\x0eis_primary_key\x18\x03 \x01(\x08\x12\x18\n\x10ordinal_position\x18\x04 \x01(\x03\x1aP\n\x08ModValue\x12\x1d\n\x15\x63olumn_metadata_index\x18\x01 \x01(\x05\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x1a\xfe\x01\n\x03Mod\x12M\n\x04keys\x18\x01 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\x12S\n\nold_values\x18\x02 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\x12S\n\nnew_values\x18\x03 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\"G\n\x07ModType\x12\x18\n\x14MOD_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06INSERT\x10\n\x12\n\n\x06UPDATE\x10\x14\x12\n\n\x06\x44\x45LETE\x10\x1e\"\x87\x01\n\x10ValueCaptureType\x12\"\n\x1eVALUE_CAPTURE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12OLD_AND_NEW_VALUES\x10\n\x12\x0e\n\nNEW_VALUES\x10\x14\x12\x0b\n\x07NEW_ROW\x10\x1e\x12\x1a\n\x16NEW_ROW_AND_OLD_VALUES\x10(\x1a@\n\x0fHeartbeatRecord\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a~\n\x14PartitionStartRecord\x12\x33\n\x0fstart_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x18\n\x10partition_tokens\x18\x03 \x03(\t\x1ay\n\x12PartitionEndRecord\x12\x31\n\rend_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x17\n\x0fpartition_token\x18\x03 \x01(\t\x1a\xa4\x03\n\x14PartitionEventRecord\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x17\n\x0fpartition_token\x18\x03 \x01(\t\x12^\n\x0emove_in_events\x18\x04 \x03(\x0b\x32\x46.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent\x12`\n\x0fmove_out_events\x18\x05 \x03(\x0b\x32G.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent\x1a-\n\x0bMoveInEvent\x12\x1e\n\x16source_partition_token\x18\x01 \x01(\t\x1a\x33\n\x0cMoveOutEvent\x12#\n\x1b\x64\x65stination_partition_token\x18\x01 \x01(\tB\x08\n\x06recordB\xb4\x01\n\x15\x63om.google.spanner.v1B\x11\x43hangeStreamProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.spanner.v1.Type", "google/spanner/v1/type.proto"], + ["google.protobuf.Value", "google/protobuf/struct.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Spanner + module V1 + ChangeStreamRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord").msgclass + ChangeStreamRecord::DataChangeRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord").msgclass + ChangeStreamRecord::DataChangeRecord::ColumnMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata").msgclass + ChangeStreamRecord::DataChangeRecord::ModValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue").msgclass + ChangeStreamRecord::DataChangeRecord::Mod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod").msgclass + ChangeStreamRecord::DataChangeRecord::ModType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType").enummodule + ChangeStreamRecord::DataChangeRecord::ValueCaptureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType").enummodule + ChangeStreamRecord::HeartbeatRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.HeartbeatRecord").msgclass + ChangeStreamRecord::PartitionStartRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionStartRecord").msgclass + ChangeStreamRecord::PartitionEndRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEndRecord").msgclass + ChangeStreamRecord::PartitionEventRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord").msgclass + ChangeStreamRecord::PartitionEventRecord::MoveInEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent").msgclass + ChangeStreamRecord::PartitionEventRecord::MoveOutEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent").msgclass + end + end + end +end diff --git a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb new file mode 100644 index 000000000000..811c1f8a886f --- /dev/null +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Spanner + module V1 + # Spanner Change Streams enable customers to capture and stream out changes to + # their Spanner databases in real-time. A change stream + # can be created with option partition_mode='IMMUTABLE_KEY_RANGE' or + # partition_mode='MUTABLE_KEY_RANGE'. + # + # This message is only used in Change Streams created with the option + # partition_mode='MUTABLE_KEY_RANGE'. Spanner automatically creates a special + # Table-Valued Function (TVF) along with each Change Streams. The function + # provides access to the change stream's records. The function is named + # READ_ (where is the + # name of the change stream), and it returns a table with only one column + # called ChangeRecord. + # @!attribute [rw] data_change_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord] + # Data change record describing a data change for a change stream + # partition. + # + # Note: The following fields are mutually exclusive: `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] heartbeat_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::HeartbeatRecord] + # Heartbeat record describing a heartbeat for a change stream partition. + # + # Note: The following fields are mutually exclusive: `heartbeat_record`, `data_change_record`, `partition_start_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] partition_start_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionStartRecord] + # Partition start record describing a new change stream partition. + # + # Note: The following fields are mutually exclusive: `partition_start_record`, `data_change_record`, `heartbeat_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] partition_end_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord] + # Partition end record describing a terminated change stream partition. + # + # Note: The following fields are mutually exclusive: `partition_end_record`, `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] partition_event_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord] + # Partition event record describing key range changes for a change stream + # partition. + # + # Note: The following fields are mutually exclusive: `partition_event_record`, `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_end_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ChangeStreamRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A data change record contains a set of changes to a table with the same + # modification type (insert, update, or delete) committed at the same commit + # timestamp in one change stream partition for the same transaction. Multiple + # data change records can be returned for the same transaction across + # multiple change stream partitions. + # @!attribute [rw] commit_timestamp + # @return [::Google::Protobuf::Timestamp] + # Indicates the timestamp in which the change was committed. + # DataChangeRecord.commit_timestamps, + # PartitionStartRecord.start_timestamps, + # PartitionEventRecord.commit_timestamps, and + # PartitionEndRecord.end_timestamps can have the same value in the same + # partition. + # @!attribute [rw] record_sequence + # @return [::String] + # Record sequence numbers are unique and monotonically increasing (but not + # necessarily contiguous) for a specific timestamp across record + # types in the same partition. To guarantee ordered processing, the reader + # should process records (of potentially different types) in + # record_sequence order for a specific timestamp in the same partition. + # + # The record sequence number ordering across partitions is only meaningful + # in the context of a specific transaction. Record sequence numbers are + # unique across partitions for a specific transaction. Sort the + # DataChangeRecords for the same + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#server_transaction_id server_transaction_id} + # by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#record_sequence record_sequence} + # to reconstruct the ordering of the changes within the transaction. + # @!attribute [rw] server_transaction_id + # @return [::String] + # Provides a globally unique string that represents the transaction in + # which the change was committed. Multiple transactions can have the same + # commit timestamp, but each transaction has a unique + # server_transaction_id. + # @!attribute [rw] is_last_record_in_transaction_in_partition + # @return [::Boolean] + # Indicates whether this is the last record for a transaction in the + # current partition. Clients can use this field to determine when all + # records for a transaction in the current partition have been received. + # @!attribute [rw] table + # @return [::String] + # Name of the table affected by the change. + # @!attribute [rw] column_metadata + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ColumnMetadata>] + # Provides metadata describing the columns associated with the + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#mods mods} listed + # below. + # @!attribute [rw] mods + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod>] + # Describes the changes that were made. + # @!attribute [rw] mod_type + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType] + # Describes the type of change. + # @!attribute [rw] value_capture_type + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType] + # Describes the value capture type that was specified in the change stream + # configuration when this change was captured. + # @!attribute [rw] number_of_records_in_transaction + # @return [::Integer] + # Indicates the number of data change records that are part of this + # transaction across all change stream partitions. This value can be used + # to assemble all the records associated with a particular transaction. + # @!attribute [rw] number_of_partitions_in_transaction + # @return [::Integer] + # Indicates the number of partitions that return data change records for + # this transaction. This value can be helpful in assembling all records + # associated with a particular transaction. + # @!attribute [rw] transaction_tag + # @return [::String] + # Indicates the transaction tag associated with this transaction. + # @!attribute [rw] is_system_transaction + # @return [::Boolean] + # Indicates whether the transaction is a system transaction. System + # transactions include those issued by time-to-live (TTL), column backfill, + # etc. + class DataChangeRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metadata for a column. + # @!attribute [rw] name + # @return [::String] + # Name of the column. + # @!attribute [rw] type + # @return [::Google::Cloud::Spanner::V1::Type] + # Type of the column. + # @!attribute [rw] is_primary_key + # @return [::Boolean] + # Indicates whether the column is a primary key column. + # @!attribute [rw] ordinal_position + # @return [::Integer] + # Ordinal position of the column based on the original table definition + # in the schema starting with a value of 1. + class ColumnMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Returns the value and associated metadata for a particular field of the + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. + # @!attribute [rw] column_metadata_index + # @return [::Integer] + # Index within the repeated + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} + # field, to obtain the column metadata for the column that was modified. + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + # The value of the column. + class ModValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A mod describes all data changes in a watched table row. + # @!attribute [rw] keys + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] + # Returns the value of the primary key of the modified row. + # @!attribute [rw] old_values + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] + # Returns the old values before the change for the modified columns. + # Always empty for + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, + # or if old values are not being captured specified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. + # @!attribute [rw] new_values + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] + # Returns the new values after the change for the modified columns. + # Always empty for + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. + class Mod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Mod type describes the type of change Spanner applied to the data. For + # example, if the client submits an INSERT_OR_UPDATE request, Spanner will + # perform an insert if there is no existing row and return ModType INSERT. + # Alternatively, if there is an existing row, Spanner will perform an + # update and return ModType UPDATE. + module ModType + # Not specified. + MOD_TYPE_UNSPECIFIED = 0 + + # Indicates data was inserted. + INSERT = 10 + + # Indicates existing data was updated. + UPDATE = 20 + + # Indicates existing data was deleted. + DELETE = 30 + end + + # Value capture type describes which values are recorded in the data + # change record. + module ValueCaptureType + # Not specified. + VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 + + # Records both old and new values of the modified watched columns. + OLD_AND_NEW_VALUES = 10 + + # Records only new values of the modified watched columns. + NEW_VALUES = 20 + + # Records new values of all watched columns, including modified and + # unmodified columns. + NEW_ROW = 30 + + # Records the new values of all watched columns, including modified and + # unmodified columns. Also records the old values of the modified + # columns. + NEW_ROW_AND_OLD_VALUES = 40 + end + end + + # A heartbeat record is returned as a progress indicator, when there are no + # data changes or any other partition record types in the change stream + # partition. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # Indicates the timestamp at which the query has returned all the records + # in the change stream partition with timestamp <= heartbeat timestamp. + # The heartbeat timestamp will not be the same as the timestamps of other + # record types in the same partition. + class HeartbeatRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A partition start record serves as a notification that the client should + # schedule the partitions to be queried. PartitionStartRecord returns + # information about one or more partitions. + # @!attribute [rw] start_timestamp + # @return [::Google::Protobuf::Timestamp] + # Start timestamp at which the partitions should be queried to return + # change stream records with timestamps >= start_timestamp. + # DataChangeRecord.commit_timestamps, + # PartitionStartRecord.start_timestamps, + # PartitionEventRecord.commit_timestamps, and + # PartitionEndRecord.end_timestamps can have the same value in the same + # partition. + # @!attribute [rw] record_sequence + # @return [::String] + # Record sequence numbers are unique and monotonically increasing (but not + # necessarily contiguous) for a specific timestamp across record + # types in the same partition. To guarantee ordered processing, the reader + # should process records (of potentially different types) in + # record_sequence order for a specific timestamp in the same partition. + # @!attribute [rw] partition_tokens + # @return [::Array<::String>] + # Unique partition identifiers to be used in queries. + class PartitionStartRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A partition end record serves as a notification that the client should stop + # reading the partition. No further records are expected to be retrieved on + # it. + # @!attribute [rw] end_timestamp + # @return [::Google::Protobuf::Timestamp] + # End timestamp at which the change stream partition is terminated. All + # changes generated by this partition will have timestamps <= + # end_timestamp. DataChangeRecord.commit_timestamps, + # PartitionStartRecord.start_timestamps, + # PartitionEventRecord.commit_timestamps, and + # PartitionEndRecord.end_timestamps can have the same value in the same + # partition. PartitionEndRecord is the last record returned for a + # partition. + # @!attribute [rw] record_sequence + # @return [::String] + # Record sequence numbers are unique and monotonically increasing (but not + # necessarily contiguous) for a specific timestamp across record + # types in the same partition. To guarantee ordered processing, the reader + # should process records (of potentially different types) in + # record_sequence order for a specific timestamp in the same partition. + # @!attribute [rw] partition_token + # @return [::String] + # Unique partition identifier describing the terminated change stream + # partition. + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord#partition_token partition_token} + # is equal to the partition token of the change stream partition currently + # queried to return this PartitionEndRecord. + class PartitionEndRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A partition event record describes key range changes for a change stream + # partition. The changes to a row defined by its primary key can be captured + # in one change stream partition for a specific time range, and then be + # captured in a different change stream partition for a different time range. + # This movement of key ranges across change stream partitions is a reflection + # of activities, such as Spanner's dynamic splitting and load balancing, etc. + # Processing this event is needed if users want to guarantee processing of + # the changes for any key in timestamp order. If time ordered processing of + # changes for a primary key is not needed, this event can be ignored. + # To guarantee time ordered processing for each primary key, if the event + # describes move-ins, the reader of this partition needs to wait until the + # readers of the source partitions have processed all records with timestamps + # <= this PartitionEventRecord.commit_timestamp, before advancing beyond this + # PartitionEventRecord. If the event describes move-outs, the reader can + # notify the readers of the destination partitions that they can continue + # processing. + # @!attribute [rw] commit_timestamp + # @return [::Google::Protobuf::Timestamp] + # Indicates the commit timestamp at which the key range change occurred. + # DataChangeRecord.commit_timestamps, + # PartitionStartRecord.start_timestamps, + # PartitionEventRecord.commit_timestamps, and + # PartitionEndRecord.end_timestamps can have the same value in the same + # partition. + # @!attribute [rw] record_sequence + # @return [::String] + # Record sequence numbers are unique and monotonically increasing (but not + # necessarily contiguous) for a specific timestamp across record + # types in the same partition. To guarantee ordered processing, the reader + # should process records (of potentially different types) in + # record_sequence order for a specific timestamp in the same partition. + # @!attribute [rw] partition_token + # @return [::String] + # Unique partition identifier describing the partition this event + # occurred on. + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} + # is equal to the partition token of the change stream partition currently + # queried to return this PartitionEventRecord. + # @!attribute [rw] move_in_events + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveInEvent>] + # Set when one or more key ranges are moved into the change stream + # partition identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. + # + # Example: Two key ranges are moved into partition (P1) from partition (P2) + # and partition (P3) in a single transaction at timestamp T. + # + # The PartitionEventRecord returned in P1 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P1" + # move_in_events { + # source_partition_token: "P2" + # } + # move_in_events { + # source_partition_token: "P3" + # } + # } + # + # The PartitionEventRecord returned in P2 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P2" + # move_out_events { + # destination_partition_token: "P1" + # } + # } + # + # The PartitionEventRecord returned in P3 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P3" + # move_out_events { + # destination_partition_token: "P1" + # } + # } + # @!attribute [rw] move_out_events + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveOutEvent>] + # Set when one or more key ranges are moved out of the change stream + # partition identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. + # + # Example: Two key ranges are moved out of partition (P1) to partition (P2) + # and partition (P3) in a single transaction at timestamp T. + # + # The PartitionEventRecord returned in P1 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P1" + # move_out_events { + # destination_partition_token: "P2" + # } + # move_out_events { + # destination_partition_token: "P3" + # } + # } + # + # The PartitionEventRecord returned in P2 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P2" + # move_in_events { + # source_partition_token: "P1" + # } + # } + # + # The PartitionEventRecord returned in P3 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P3" + # move_in_events { + # source_partition_token: "P1" + # } + # } + class PartitionEventRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes move-in of the key ranges into the change stream partition + # identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. + # + # To maintain processing the changes for a particular key in timestamp + # order, the query processing the change stream partition identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} + # should not advance beyond the partition event record commit timestamp + # until the queries processing the source change stream partitions have + # processed all change stream records with timestamps <= the partition + # event record commit timestamp. + # @!attribute [rw] source_partition_token + # @return [::String] + # An unique partition identifier describing the source change stream + # partition that recorded changes for the key range that is moving + # into this partition. + class MoveInEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes move-out of the key ranges out of the change stream partition + # identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. + # + # To maintain processing the changes for a particular key in timestamp + # order, the query processing the + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveOutEvent MoveOutEvent} + # in the partition identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} + # should inform the queries processing the destination partitions that + # they can unblock and proceed processing records past the + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#commit_timestamp commit_timestamp}. + # @!attribute [rw] destination_partition_token + # @return [::String] + # An unique partition identifier describing the destination change + # stream partition that will record changes for the key range that is + # moving out of this partition. + class MoveOutEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end From eeb66e361edbc2e4064b681ff774644aa97e0142 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:16:34 -0700 Subject: [PATCH 091/457] feat: A new enum `CustomerAttestationState` is added (#30513) feat: A new field `customer_attestation_state` is added to message `.google.cloud.channel.v1.Customer` --- .../google/cloud/channel/v1/customers_pb.rb | 3 ++- .../google/cloud/channel/v1/customers.rb | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb index 4b2841835775..e072fb6b13c7 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb @@ -11,7 +11,7 @@ require 'google/type/postal_address_pb' -descriptor_data = "\n\'google/cloud/channel/v1/customers.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/type/postal_address.proto\"\xee\x04\n\x08\x43ustomer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10org_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\x12org_postal_address\x18\x03 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x02\x12\x42\n\x14primary_contact_info\x18\x04 \x01(\x0b\x32$.google.cloud.channel.v1.ContactInfo\x12\x17\n\x0f\x61lternate_email\x18\x05 \x01(\t\x12\x13\n\x06\x64omain\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11\x63loud_identity_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\n \x01(\tB\x03\xe0\x41\x01\x12L\n\x13\x63loud_identity_info\x18\x0c \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfoB\x03\xe0\x41\x03\x12\x1a\n\x12\x63hannel_partner_id\x18\r \x01(\t\x12\x1b\n\x0e\x63orrelation_id\x18\x0e \x01(\tB\x03\xe0\x41\x01:R\xea\x41O\n$cloudchannel.googleapis.com/Customer\x12\'accounts/{account}/customers/{customer}\"\x81\x01\n\x0b\x43ontactInfo\x12\x12\n\nfirst_name\x18\x01 \x01(\t\x12\x11\n\tlast_name\x18\x02 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\r\n\x05\x65mail\x18\x05 \x01(\t\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\r\n\x05phone\x18\x07 \x01(\tBf\n\x1b\x63om.google.cloud.channel.v1B\x0e\x43ustomersProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" +descriptor_data = "\n\'google/cloud/channel/v1/customers.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/type/postal_address.proto\"\xc9\x06\n\x08\x43ustomer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10org_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\x12org_postal_address\x18\x03 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x02\x12\x42\n\x14primary_contact_info\x18\x04 \x01(\x0b\x32$.google.cloud.channel.v1.ContactInfo\x12\x17\n\x0f\x61lternate_email\x18\x05 \x01(\t\x12\x13\n\x06\x64omain\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11\x63loud_identity_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\n \x01(\tB\x03\xe0\x41\x01\x12L\n\x13\x63loud_identity_info\x18\x0c \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfoB\x03\xe0\x41\x03\x12\x1a\n\x12\x63hannel_partner_id\x18\r \x01(\t\x12\x1b\n\x0e\x63orrelation_id\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12\x63\n\x1a\x63ustomer_attestation_state\x18\x10 \x01(\x0e\x32:.google.cloud.channel.v1.Customer.CustomerAttestationStateB\x03\xe0\x41\x01\"t\n\x18\x43ustomerAttestationState\x12*\n&CUSTOMER_ATTESTATION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45XEMPT\x10\x01\x12 \n\x1cNON_EXEMPT_AND_INFO_VERIFIED\x10\x02:R\xea\x41O\n$cloudchannel.googleapis.com/Customer\x12\'accounts/{account}/customers/{customer}\"\x81\x01\n\x0b\x43ontactInfo\x12\x12\n\nfirst_name\x18\x01 \x01(\t\x12\x11\n\tlast_name\x18\x02 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\r\n\x05\x65mail\x18\x05 \x01(\t\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\r\n\x05phone\x18\x07 \x01(\tBf\n\x1b\x63om.google.cloud.channel.v1B\x0e\x43ustomersProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -45,6 +45,7 @@ module Cloud module Channel module V1 Customer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Customer").msgclass + Customer::CustomerAttestationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Customer.CustomerAttestationState").enummodule ContactInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ContactInfo").msgclass end end diff --git a/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb b/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb index 7ea4e33fd8af..e39be16b04c3 100644 --- a/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb +++ b/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb @@ -76,9 +76,28 @@ module V1 # @return [::String] # Optional. External CRM ID for the customer. # Populated only if a CRM ID exists for this customer. + # @!attribute [rw] customer_attestation_state + # @return [::Google::Cloud::Channel::V1::Customer::CustomerAttestationState] + # Optional. Indicate whether a customer is attesting about the correctness of + # provided information. Only required if creating a GCP Entitlement. class Customer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enum represents whether a customer belongs to public sector + module CustomerAttestationState + # Default value if not set yet + CUSTOMER_ATTESTATION_STATE_UNSPECIFIED = 0 + + # Customer is exempt from attesting based on exemption list at + # https://cloud.google.com/terms/direct-tos-exemptions. Contact information + # of customer will be mandatory. + EXEMPT = 1 + + # Customer is not exempt and has verified the information provided is + # correct. Contact information of customer will be mandatory. + NON_EXEMPT_AND_INFO_VERIFIED = 2 + end end # Contact information for a customer account. From daee28e938ea1cb3b085730288e4f3c1034886a7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:17:10 -0700 Subject: [PATCH 092/457] feat: add the `GetSubpropertySyncConfigRequest` method (#30512) feat: add the `ListSubpropertySyncConfigsRequest` method feat: add the `UpdateSubpropertySyncConfigRequest` method --- .../.owlbot-manifest.json | 3 + .../gapic_metadata.json | 15 + .../admin/v1alpha/analytics_admin_pb.rb | 6 +- .../v1alpha/analytics_admin_service/client.rb | 308 +++++++++++++++++- .../v1alpha/analytics_admin_service/paths.rb | 17 + .../analytics_admin_service/rest/client.rb | 287 +++++++++++++++- .../rest/service_stub.rb | 184 +++++++++++ .../v1alpha/analytics_admin_services_pb.rb | 6 + .../analytics/admin/v1alpha/resources_pb.rb | 4 +- .../admin/v1alpha/analytics_admin.rb | 68 ++++ .../analytics/admin/v1alpha/resources.rb | 107 ++++-- .../get_subproperty_sync_config.rb | 47 +++ .../list_subproperty_sync_configs.rb | 51 +++ .../update_subproperty_sync_config.rb | 47 +++ ...tadata_google.analytics.admin.v1alpha.json | 120 +++++++ .../analytics_admin_service_paths_test.rb | 12 + .../analytics_admin_service_rest_test.rb | 176 +++++++++- .../v1alpha/analytics_admin_service_test.rb | 197 ++++++++++- 18 files changed, 1614 insertions(+), 41 deletions(-) create mode 100644 google-analytics-admin-v1alpha/snippets/analytics_admin_service/get_subproperty_sync_config.rb create mode 100644 google-analytics-admin-v1alpha/snippets/analytics_admin_service/list_subproperty_sync_configs.rb create mode 100644 google-analytics-admin-v1alpha/snippets/analytics_admin_service/update_subproperty_sync_config.rb diff --git a/google-analytics-admin-v1alpha/.owlbot-manifest.json b/google-analytics-admin-v1alpha/.owlbot-manifest.json index 7599b9af328f..9ba8ab95c34e 100644 --- a/google-analytics-admin-v1alpha/.owlbot-manifest.json +++ b/google-analytics-admin-v1alpha/.owlbot-manifest.json @@ -147,6 +147,7 @@ "snippets/analytics_admin_service/get_search_ads360_link.rb", "snippets/analytics_admin_service/get_sk_ad_network_conversion_value_schema.rb", "snippets/analytics_admin_service/get_subproperty_event_filter.rb", + "snippets/analytics_admin_service/get_subproperty_sync_config.rb", "snippets/analytics_admin_service/list_access_bindings.rb", "snippets/analytics_admin_service/list_account_summaries.rb", "snippets/analytics_admin_service/list_accounts.rb", @@ -175,6 +176,7 @@ "snippets/analytics_admin_service/list_search_ads360_links.rb", "snippets/analytics_admin_service/list_sk_ad_network_conversion_value_schemas.rb", "snippets/analytics_admin_service/list_subproperty_event_filters.rb", + "snippets/analytics_admin_service/list_subproperty_sync_configs.rb", "snippets/analytics_admin_service/provision_account_ticket.rb", "snippets/analytics_admin_service/provision_subproperty.rb", "snippets/analytics_admin_service/reorder_event_edit_rules.rb", @@ -209,6 +211,7 @@ "snippets/analytics_admin_service/update_search_ads360_link.rb", "snippets/analytics_admin_service/update_sk_ad_network_conversion_value_schema.rb", "snippets/analytics_admin_service/update_subproperty_event_filter.rb", + "snippets/analytics_admin_service/update_subproperty_sync_config.rb", "snippets/snippet_metadata_google.analytics.admin.v1alpha.json", "test/google/analytics/admin/v1alpha/analytics_admin_service_paths_test.rb", "test/google/analytics/admin/v1alpha/analytics_admin_service_rest_test.rb", diff --git a/google-analytics-admin-v1alpha/gapic_metadata.json b/google-analytics-admin-v1alpha/gapic_metadata.json index c61dda060182..98e096445120 100644 --- a/google-analytics-admin-v1alpha/gapic_metadata.json +++ b/google-analytics-admin-v1alpha/gapic_metadata.json @@ -789,6 +789,21 @@ "methods": [ "submit_user_deletion" ] + }, + "ListSubpropertySyncConfigs": { + "methods": [ + "list_subproperty_sync_configs" + ] + }, + "UpdateSubpropertySyncConfig": { + "methods": [ + "update_subproperty_sync_config" + ] + }, + "GetSubpropertySyncConfig": { + "methods": [ + "get_subproperty_sync_config" + ] } } } diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_pb.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_pb.rb index 3dbc1c217ca0..09776157033f 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_pb.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_pb.rb @@ -20,7 +20,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n4google/analytics/admin/v1alpha/analytics_admin.proto\x12\x1egoogle.analytics.admin.v1alpha\x1a\x32google/analytics/admin/v1alpha/access_report.proto\x1a-google/analytics/admin/v1alpha/audience.proto\x1a\x32google/analytics/admin/v1alpha/channel_group.proto\x1a:google/analytics/admin/v1alpha/event_create_and_edit.proto\x1a\x36google/analytics/admin/v1alpha/expanded_data_set.proto\x1a.google/analytics/admin/v1alpha/resources.proto\x1a=google/analytics/admin/v1alpha/subproperty_event_filter.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x04\n\x16RunAccessReportRequest\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x43\n\ndimensions\x18\x02 \x03(\x0b\x32/.google.analytics.admin.v1alpha.AccessDimension\x12=\n\x07metrics\x18\x03 \x03(\x0b\x32,.google.analytics.admin.v1alpha.AccessMetric\x12\x44\n\x0b\x64\x61te_ranges\x18\x04 \x03(\x0b\x32/.google.analytics.admin.v1alpha.AccessDateRange\x12P\n\x10\x64imension_filter\x18\x05 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.AccessFilterExpression\x12M\n\rmetric_filter\x18\x06 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.AccessFilterExpression\x12\x0e\n\x06offset\x18\x07 \x01(\x03\x12\r\n\x05limit\x18\x08 \x01(\x03\x12\x11\n\ttime_zone\x18\t \x01(\t\x12@\n\torder_bys\x18\n \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessOrderBy\x12\x1b\n\x13return_entity_quota\x18\x0b \x01(\x08\x12\x1e\n\x11include_all_users\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rexpand_groups\x18\r \x01(\x08\x42\x03\xe0\x41\x01\"\xbf\x02\n\x17RunAccessReportResponse\x12P\n\x11\x64imension_headers\x18\x01 \x03(\x0b\x32\x35.google.analytics.admin.v1alpha.AccessDimensionHeader\x12J\n\x0emetric_headers\x18\x02 \x03(\x0b\x32\x32.google.analytics.admin.v1alpha.AccessMetricHeader\x12\x37\n\x04rows\x18\x03 \x03(\x0b\x32).google.analytics.admin.v1alpha.AccessRow\x12\x11\n\trow_count\x18\x04 \x01(\x05\x12:\n\x05quota\x18\x05 \x01(\x0b\x32+.google.analytics.admin.v1alpha.AccessQuota\"P\n\x11GetAccountRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%analyticsadmin.googleapis.com/Account\"R\n\x13ListAccountsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x03 \x01(\x08\"j\n\x14ListAccountsResponse\x12\x39\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\'.google.analytics.admin.v1alpha.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x14\x44\x65leteAccountRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%analyticsadmin.googleapis.com/Account\"\x8b\x01\n\x14UpdateAccountRequest\x12=\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\'.google.analytics.admin.v1alpha.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"o\n\x1dProvisionAccountTicketRequest\x12\x38\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\'.google.analytics.admin.v1alpha.Account\x12\x14\n\x0credirect_uri\x18\x02 \x01(\t\";\n\x1eProvisionAccountTicketResponse\x12\x19\n\x11\x61\x63\x63ount_ticket_id\x18\x01 \x01(\t\"R\n\x12GetPropertyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Property\"i\n\x15ListPropertiesRequest\x12\x13\n\x06\x66ilter\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"o\n\x16ListPropertiesResponse\x12<\n\nproperties\x18\x01 \x03(\x0b\x32(.google.analytics.admin.v1alpha.Property\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8e\x01\n\x15UpdatePropertyRequest\x12?\n\x08property\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"X\n\x15\x43reatePropertyRequest\x12?\n\x08property\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyB\x03\xe0\x41\x02\"U\n\x15\x44\x65letePropertyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Property\"\xa9\x01\n\x19\x43reateFirebaseLinkRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/FirebaseLink\x12H\n\rfirebase_link\x18\x02 \x01(\x0b\x32,.google.analytics.admin.v1alpha.FirebaseLinkB\x03\xe0\x41\x02\"]\n\x19\x44\x65leteFirebaseLinkRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/FirebaseLink\"\x85\x01\n\x18ListFirebaseLinksRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/FirebaseLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x19ListFirebaseLinksResponse\x12\x44\n\x0e\x66irebase_links\x18\x01 \x03(\x0b\x32,.google.analytics.admin.v1alpha.FirebaseLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x17GetGlobalSiteTagRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/GlobalSiteTag\"\xae\x01\n\x1a\x43reateGoogleAdsLinkRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/GoogleAdsLink\x12K\n\x0fgoogle_ads_link\x18\x02 \x01(\x0b\x32-.google.analytics.admin.v1alpha.GoogleAdsLinkB\x03\xe0\x41\x02\"\x9a\x01\n\x1aUpdateGoogleAdsLinkRequest\x12\x46\n\x0fgoogle_ads_link\x18\x01 \x01(\x0b\x32-.google.analytics.admin.v1alpha.GoogleAdsLink\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n\x1a\x44\x65leteGoogleAdsLinkRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/GoogleAdsLink\"\x87\x01\n\x19ListGoogleAdsLinksRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/GoogleAdsLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"~\n\x1aListGoogleAdsLinksResponse\x12G\n\x10google_ads_links\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.GoogleAdsLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1dGetDataSharingSettingsRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1analyticsadmin.googleapis.com/DataSharingSettings\"D\n\x1bListAccountSummariesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\"\x82\x01\n\x1cListAccountSummariesResponse\x12I\n\x11\x61\x63\x63ount_summaries\x18\x01 \x03(\x0b\x32..google.analytics.admin.v1alpha.AccountSummary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x86\x01\n$AcknowledgeUserDataCollectionRequest\x12@\n\x08property\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Property\x12\x1c\n\x0f\x61\x63knowledgement\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\'\n%AcknowledgeUserDataCollectionResponse\"\x83\x04\n SearchChangeHistoryEventsRequest\x12>\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%analyticsadmin.googleapis.com/Account\x12@\n\x08property\x18\x02 \x01(\tB.\xe0\x41\x01\xfa\x41(\n&analyticsadmin.googleapis.com/Property\x12U\n\rresource_type\x18\x03 \x03(\x0e\x32\x39.google.analytics.admin.v1alpha.ChangeHistoryResourceTypeB\x03\xe0\x41\x01\x12?\n\x06\x61\x63tion\x18\x04 \x03(\x0e\x32*.google.analytics.admin.v1alpha.ActionTypeB\x03\xe0\x41\x01\x12\x18\n\x0b\x61\x63tor_email\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12=\n\x14\x65\x61rliest_change_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12;\n\x12latest_change_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\t \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n!SearchChangeHistoryEventsResponse\x12Q\n\x15\x63hange_history_events\x18\x01 \x03(\x0b\x32\x32.google.analytics.admin.v1alpha.ChangeHistoryEvent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"t\n#GetMeasurementProtocolSecretRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7analyticsadmin.googleapis.com/MeasurementProtocolSecret\"\xde\x01\n&CreateMeasurementProtocolSecretRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37\x61nalyticsadmin.googleapis.com/MeasurementProtocolSecret\x12\x63\n\x1bmeasurement_protocol_secret\x18\x02 \x01(\x0b\x32\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecretB\x03\xe0\x41\x02\"w\n&DeleteMeasurementProtocolSecretRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7analyticsadmin.googleapis.com/MeasurementProtocolSecret\"\xc3\x01\n&UpdateMeasurementProtocolSecretRequest\x12\x63\n\x1bmeasurement_protocol_secret\x18\x01 \x01(\x0b\x32\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecretB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x9f\x01\n%ListMeasurementProtocolSecretsRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37\x61nalyticsadmin.googleapis.com/MeasurementProtocolSecret\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa2\x01\n&ListMeasurementProtocolSecretsResponse\x12_\n\x1cmeasurement_protocol_secrets\x18\x01 \x03(\x0b\x32\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecret\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n*GetSKAdNetworkConversionValueSchemaRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\"\xfb\x01\n-CreateSKAdNetworkConversionValueSchemaRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\x12r\n#skadnetwork_conversion_value_schema\x18\x02 \x01(\x0b\x32@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchemaB\x03\xe0\x41\x02\"\x85\x01\n-DeleteSKAdNetworkConversionValueSchemaRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\"\xd9\x01\n-UpdateSKAdNetworkConversionValueSchemaRequest\x12r\n#skadnetwork_conversion_value_schema\x18\x01 \x01(\x0b\x32@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchemaB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xad\x01\n,ListSKAdNetworkConversionValueSchemasRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xb8\x01\n-ListSKAdNetworkConversionValueSchemasResponse\x12n\n$skadnetwork_conversion_value_schemas\x18\x01 \x03(\x0b\x32@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x1fGetGoogleSignalsSettingsRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3analyticsadmin.googleapis.com/GoogleSignalsSettings\"\xb7\x01\n\"UpdateGoogleSignalsSettingsRequest\x12[\n\x17google_signals_settings\x18\x01 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.GoogleSignalsSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xb5\x01\n\x1c\x43reateConversionEventRequest\x12N\n\x10\x63onversion_event\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ConversionEventB\x03\xe0\x41\x02\x12\x45\n\x06parent\x18\x02 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/ConversionEvent\"\xa4\x01\n\x1cUpdateConversionEventRequest\x12N\n\x10\x63onversion_event\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ConversionEventB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"`\n\x19GetConversionEventRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/ConversionEvent\"c\n\x1c\x44\x65leteConversionEventRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/ConversionEvent\"\x8b\x01\n\x1bListConversionEventsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/ConversionEvent\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x83\x01\n\x1cListConversionEventsResponse\x12J\n\x11\x63onversion_events\x18\x01 \x03(\x0b\x32/.google.analytics.admin.v1alpha.ConversionEvent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x99\x01\n\x15\x43reateKeyEventRequest\x12@\n\tkey_event\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.KeyEventB\x03\xe0\x41\x02\x12>\n\x06parent\x18\x02 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/KeyEvent\"\x8f\x01\n\x15UpdateKeyEventRequest\x12@\n\tkey_event\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.KeyEventB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"R\n\x12GetKeyEventRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/KeyEvent\"U\n\x15\x44\x65leteKeyEventRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/KeyEvent\"}\n\x14ListKeyEventsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/KeyEvent\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n\x15ListKeyEventsResponse\x12<\n\nkey_events\x18\x01 \x03(\x0b\x32(.google.analytics.admin.v1alpha.KeyEvent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"|\n\'GetDisplayVideo360AdvertiserLinkRequest\x12Q\n\x04name\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\n;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\"\xa7\x01\n)ListDisplayVideo360AdvertiserLinksRequest\x12S\n\x06parent\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\x12;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xb0\x01\n*ListDisplayVideo360AdvertiserLinksResponse\x12i\n\"display_video_360_advertiser_links\x18\x01 \x03(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf0\x01\n*CreateDisplayVideo360AdvertiserLinkRequest\x12S\n\x06parent\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\x12;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\x12m\n!display_video_360_advertiser_link\x18\x02 \x01(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkB\x03\xe0\x41\x02\"\x7f\n*DeleteDisplayVideo360AdvertiserLinkRequest\x12Q\n\x04name\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\n;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\"\xcc\x01\n*UpdateDisplayVideo360AdvertiserLinkRequest\x12h\n!display_video_360_advertiser_link\x18\x01 \x01(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x8c\x01\n/GetDisplayVideo360AdvertiserLinkProposalRequest\x12Y\n\x04name\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\"\xb7\x01\n1ListDisplayVideo360AdvertiserLinkProposalsRequest\x12[\n\x06parent\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\x12\x43\x61nalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xc9\x01\n2ListDisplayVideo360AdvertiserLinkProposalsResponse\x12z\n+display_video_360_advertiser_link_proposals\x18\x01 \x03(\x0b\x32\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x02\n2CreateDisplayVideo360AdvertiserLinkProposalRequest\x12[\n\x06parent\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\x12\x43\x61nalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\x12~\n*display_video_360_advertiser_link_proposal\x18\x02 \x01(\x0b\x32\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposalB\x03\xe0\x41\x02\"\x8f\x01\n2DeleteDisplayVideo360AdvertiserLinkProposalRequest\x12Y\n\x04name\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\"\x90\x01\n3ApproveDisplayVideo360AdvertiserLinkProposalRequest\x12Y\n\x04name\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\"\xa0\x01\n4ApproveDisplayVideo360AdvertiserLinkProposalResponse\x12h\n!display_video_360_advertiser_link\x18\x01 \x01(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\"\x8f\x01\n2CancelDisplayVideo360AdvertiserLinkProposalRequest\x12Y\n\x04name\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\"b\n\x1aGetSearchAds360LinkRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.analyticsadmin.googleapis.com/SearchAds360Link\"\x8d\x01\n\x1cListSearchAds360LinksRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.analyticsadmin.googleapis.com/SearchAds360Link\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x88\x01\n\x1dListSearchAds360LinksResponse\x12N\n\x14search_ads_360_links\x18\x01 \x03(\x0b\x32\x30.google.analytics.admin.v1alpha.SearchAds360Link\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbb\x01\n\x1d\x43reateSearchAds360LinkRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.analyticsadmin.googleapis.com/SearchAds360Link\x12R\n\x13search_ads_360_link\x18\x02 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.SearchAds360LinkB\x03\xe0\x41\x02\"e\n\x1d\x44\x65leteSearchAds360LinkRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.analyticsadmin.googleapis.com/SearchAds360Link\"\xa4\x01\n\x1dUpdateSearchAds360LinkRequest\x12M\n\x13search_ads_360_link\x18\x01 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.SearchAds360Link\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xb5\x01\n\x1c\x43reateCustomDimensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/CustomDimension\x12N\n\x10\x63ustom_dimension\x18\x02 \x01(\x0b\x32/.google.analytics.admin.v1alpha.CustomDimensionB\x03\xe0\x41\x02\"\x9f\x01\n\x1cUpdateCustomDimensionRequest\x12I\n\x10\x63ustom_dimension\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.CustomDimension\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x8b\x01\n\x1bListCustomDimensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/CustomDimension\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x83\x01\n\x1cListCustomDimensionsResponse\x12J\n\x11\x63ustom_dimensions\x18\x01 \x03(\x0b\x32/.google.analytics.admin.v1alpha.CustomDimension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"d\n\x1d\x41rchiveCustomDimensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/CustomDimension\"`\n\x19GetCustomDimensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/CustomDimension\"\xa9\x01\n\x19\x43reateCustomMetricRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/CustomMetric\x12H\n\rcustom_metric\x18\x02 \x01(\x0b\x32,.google.analytics.admin.v1alpha.CustomMetricB\x03\xe0\x41\x02\"\x96\x01\n\x19UpdateCustomMetricRequest\x12\x43\n\rcustom_metric\x18\x01 \x01(\x0b\x32,.google.analytics.admin.v1alpha.CustomMetric\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x85\x01\n\x18ListCustomMetricsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/CustomMetric\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x19ListCustomMetricsResponse\x12\x44\n\x0e\x63ustom_metrics\x18\x01 \x03(\x0b\x32,.google.analytics.admin.v1alpha.CustomMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1a\x41rchiveCustomMetricRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/CustomMetric\"Z\n\x16GetCustomMetricRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/CustomMetric\"\xdc\x01\n\x1d\x43reateCalculatedMetricRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.analyticsadmin.googleapis.com/CalculatedMetric\x12!\n\x14\x63\x61lculated_metric_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11\x63\x61lculated_metric\x18\x03 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.CalculatedMetricB\x03\xe0\x41\x02\"\xa7\x01\n\x1dUpdateCalculatedMetricRequest\x12P\n\x11\x63\x61lculated_metric\x18\x01 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.CalculatedMetricB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"e\n\x1d\x44\x65leteCalculatedMetricRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.analyticsadmin.googleapis.com/CalculatedMetric\"\x97\x01\n\x1cListCalculatedMetricsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.analyticsadmin.googleapis.com/CalculatedMetric\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x1dListCalculatedMetricsResponse\x12L\n\x12\x63\x61lculated_metrics\x18\x01 \x03(\x0b\x32\x30.google.analytics.admin.v1alpha.CalculatedMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x1aGetCalculatedMetricRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.analyticsadmin.googleapis.com/CalculatedMetric\"l\n\x1fGetDataRetentionSettingsRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3analyticsadmin.googleapis.com/DataRetentionSettings\"\xb7\x01\n\"UpdateDataRetentionSettingsRequest\x12[\n\x17\x64\x61ta_retention_settings\x18\x01 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.DataRetentionSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa1\x01\n\x17\x43reateDataStreamRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticsadmin.googleapis.com/DataStream\x12\x44\n\x0b\x64\x61ta_stream\x18\x02 \x01(\x0b\x32*.google.analytics.admin.v1alpha.DataStreamB\x03\xe0\x41\x02\"Y\n\x17\x44\x65leteDataStreamRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticsadmin.googleapis.com/DataStream\"\x90\x01\n\x17UpdateDataStreamRequest\x12?\n\x0b\x64\x61ta_stream\x18\x01 \x01(\x0b\x32*.google.analytics.admin.v1alpha.DataStream\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x81\x01\n\x16ListDataStreamsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticsadmin.googleapis.com/DataStream\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListDataStreamsResponse\x12@\n\x0c\x64\x61ta_streams\x18\x01 \x03(\x0b\x32*.google.analytics.admin.v1alpha.DataStream\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetDataStreamRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticsadmin.googleapis.com/DataStream\"R\n\x12GetAudienceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Audience\"}\n\x14ListAudiencesRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/Audience\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"m\n\x15ListAudiencesResponse\x12;\n\taudiences\x18\x01 \x03(\x0b\x32(.google.analytics.admin.v1alpha.Audience\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x98\x01\n\x15\x43reateAudienceRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/Audience\x12?\n\x08\x61udience\x18\x02 \x01(\x0b\x32(.google.analytics.admin.v1alpha.AudienceB\x03\xe0\x41\x02\"\x8e\x01\n\x15UpdateAudienceRequest\x12?\n\x08\x61udience\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.AudienceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"V\n\x16\x41rchiveAudienceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/Audience\"h\n\x1dGetAttributionSettingsRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1analyticsadmin.googleapis.com/AttributionSettings\"\xb0\x01\n UpdateAttributionSettingsRequest\x12V\n\x14\x61ttribution_settings\x18\x01 \x01(\x0b\x32\x33.google.analytics.admin.v1alpha.AttributionSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\\\n\x17GetAccessBindingRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/AccessBinding\"\xa8\x01\n\x1d\x42\x61tchGetAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12\x42\n\x05names\x18\x02 \x03(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/AccessBinding\"h\n\x1e\x42\x61tchGetAccessBindingsResponse\x12\x46\n\x0f\x61\x63\x63\x65ss_bindings\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessBinding\"\x87\x01\n\x19ListAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"}\n\x1aListAccessBindingsResponse\x12\x46\n\x0f\x61\x63\x63\x65ss_bindings\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x1a\x43reateAccessBindingRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12J\n\x0e\x61\x63\x63\x65ss_binding\x18\x02 \x01(\x0b\x32-.google.analytics.admin.v1alpha.AccessBindingB\x03\xe0\x41\x02\"\xba\x01\n BatchCreateAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12Q\n\x08requests\x18\x03 \x03(\x0b\x32:.google.analytics.admin.v1alpha.CreateAccessBindingRequestB\x03\xe0\x41\x02\"k\n!BatchCreateAccessBindingsResponse\x12\x46\n\x0f\x61\x63\x63\x65ss_bindings\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessBinding\"h\n\x1aUpdateAccessBindingRequest\x12J\n\x0e\x61\x63\x63\x65ss_binding\x18\x01 \x01(\x0b\x32-.google.analytics.admin.v1alpha.AccessBindingB\x03\xe0\x41\x02\"\xba\x01\n BatchUpdateAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12Q\n\x08requests\x18\x02 \x03(\x0b\x32:.google.analytics.admin.v1alpha.UpdateAccessBindingRequestB\x03\xe0\x41\x02\"k\n!BatchUpdateAccessBindingsResponse\x12\x46\n\x0f\x61\x63\x63\x65ss_bindings\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessBinding\"_\n\x1a\x44\x65leteAccessBindingRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/AccessBinding\"\xba\x01\n BatchDeleteAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12Q\n\x08requests\x18\x02 \x03(\x0b\x32:.google.analytics.admin.v1alpha.DeleteAccessBindingRequestB\x03\xe0\x41\x02\"\xb6\x01\n\x1c\x43reateExpandedDataSetRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/ExpandedDataSet\x12O\n\x11\x65xpanded_data_set\x18\x02 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ExpandedDataSetB\x03\xe0\x41\x02\"\xa5\x01\n\x1cUpdateExpandedDataSetRequest\x12O\n\x11\x65xpanded_data_set\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ExpandedDataSetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x1c\x44\x65leteExpandedDataSetRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/ExpandedDataSet\"`\n\x19GetExpandedDataSetRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/ExpandedDataSet\"\x8b\x01\n\x1bListExpandedDataSetsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/ExpandedDataSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListExpandedDataSetsResponse\x12K\n\x12\x65xpanded_data_sets\x18\x01 \x03(\x0b\x32/.google.analytics.admin.v1alpha.ExpandedDataSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa9\x01\n\x19\x43reateChannelGroupRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/ChannelGroup\x12H\n\rchannel_group\x18\x02 \x01(\x0b\x32,.google.analytics.admin.v1alpha.ChannelGroupB\x03\xe0\x41\x02\"\x9b\x01\n\x19UpdateChannelGroupRequest\x12H\n\rchannel_group\x18\x01 \x01(\x0b\x32,.google.analytics.admin.v1alpha.ChannelGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"]\n\x19\x44\x65leteChannelGroupRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/ChannelGroup\"Z\n\x16GetChannelGroupRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/ChannelGroup\"\x85\x01\n\x18ListChannelGroupsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/ChannelGroup\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x19ListChannelGroupsResponse\x12\x44\n\x0e\x63hannel_groups\x18\x01 \x03(\x0b\x32,.google.analytics.admin.v1alpha.ChannelGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n)SetAutomatedGa4ConfigurationOptOutRequest\x12\x15\n\x08property\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07opt_out\x18\x02 \x01(\x08\",\n*SetAutomatedGa4ConfigurationOptOutResponse\"D\n+FetchAutomatedGa4ConfigurationOptOutRequest\x12\x15\n\x08property\x18\x01 \x01(\tB\x03\xe0\x41\x02\"?\n,FetchAutomatedGa4ConfigurationOptOutResponse\x12\x0f\n\x07opt_out\x18\x01 \x01(\x08\"\xa9\x01\n\x19\x43reateBigQueryLinkRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/BigQueryLink\x12H\n\rbigquery_link\x18\x02 \x01(\x0b\x32,.google.analytics.admin.v1alpha.BigQueryLinkB\x03\xe0\x41\x02\"Z\n\x16GetBigQueryLinkRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/BigQueryLink\"\x85\x01\n\x18ListBigQueryLinksRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/BigQueryLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x19ListBigQueryLinksResponse\x12\x44\n\x0e\x62igquery_links\x18\x01 \x03(\x0b\x32,.google.analytics.admin.v1alpha.BigQueryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x19UpdateBigQueryLinkRequest\x12H\n\rbigquery_link\x18\x01 \x01(\x0b\x32,.google.analytics.admin.v1alpha.BigQueryLinkB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"]\n\x19\x44\x65leteBigQueryLinkRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/BigQueryLink\"x\n%GetEnhancedMeasurementSettingsRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9analyticsadmin.googleapis.com/EnhancedMeasurementSettings\"\xc9\x01\n(UpdateEnhancedMeasurementSettingsRequest\x12g\n\x1d\x65nhanced_measurement_settings\x18\x01 \x01(\x0b\x32;.google.analytics.admin.v1alpha.EnhancedMeasurementSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"l\n\x1fGetDataRedactionSettingsRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3analyticsadmin.googleapis.com/DataRedactionSettings\"\xb7\x01\n\"UpdateDataRedactionSettingsRequest\x12[\n\x17\x64\x61ta_redaction_settings\x18\x01 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.DataRedactionSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x84\x01\n\x1d\x43reateConnectedSiteTagRequest\x12\x10\n\x08property\x18\x01 \x01(\t\x12Q\n\x12\x63onnected_site_tag\x18\x02 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.ConnectedSiteTagB\x03\xe0\x41\x02\" \n\x1e\x43reateConnectedSiteTagResponse\"A\n\x1d\x44\x65leteConnectedSiteTagRequest\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\"0\n\x1cListConnectedSiteTagsRequest\x12\x10\n\x08property\x18\x01 \x01(\t\"n\n\x1dListConnectedSiteTagsResponse\x12M\n\x13\x63onnected_site_tags\x18\x01 \x03(\x0b\x32\x30.google.analytics.admin.v1alpha.ConnectedSiteTag\"\xa5\x01\n\x18\x43reateAdSenseLinkRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)analyticsadmin.googleapis.com/AdSenseLink\x12\x46\n\x0c\x61\x64sense_link\x18\x02 \x01(\x0b\x32+.google.analytics.admin.v1alpha.AdSenseLinkB\x03\xe0\x41\x02\"X\n\x15GetAdSenseLinkRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticsadmin.googleapis.com/AdSenseLink\"[\n\x18\x44\x65leteAdSenseLinkRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticsadmin.googleapis.com/AdSenseLink\"\x83\x01\n\x17ListAdSenseLinksRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)analyticsadmin.googleapis.com/AdSenseLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"w\n\x18ListAdSenseLinksResponse\x12\x42\n\radsense_links\x18\x01 \x03(\x0b\x32+.google.analytics.admin.v1alpha.AdSenseLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"d\n FetchConnectedGa4PropertyRequest\x12@\n\x08property\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Property\"b\n!FetchConnectedGa4PropertyResponse\x12=\n\x08property\x18\x01 \x01(\tB+\xfa\x41(\n&analyticsadmin.googleapis.com/Property\"\xb6\x01\n\x1c\x43reateEventCreateRuleRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/EventCreateRule\x12O\n\x11\x65vent_create_rule\x18\x02 \x01(\x0b\x32/.google.analytics.admin.v1alpha.EventCreateRuleB\x03\xe0\x41\x02\"\xa5\x01\n\x1cUpdateEventCreateRuleRequest\x12O\n\x11\x65vent_create_rule\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.EventCreateRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x1c\x44\x65leteEventCreateRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/EventCreateRule\"`\n\x19GetEventCreateRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/EventCreateRule\"\x8b\x01\n\x1bListEventCreateRulesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/EventCreateRule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListEventCreateRulesResponse\x12K\n\x12\x65vent_create_rules\x18\x01 \x03(\x0b\x32/.google.analytics.admin.v1alpha.EventCreateRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xae\x01\n\x1a\x43reateEventEditRuleRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/EventEditRule\x12K\n\x0f\x65vent_edit_rule\x18\x02 \x01(\x0b\x32-.google.analytics.admin.v1alpha.EventEditRuleB\x03\xe0\x41\x02\"\x9f\x01\n\x1aUpdateEventEditRuleRequest\x12K\n\x0f\x65vent_edit_rule\x18\x01 \x01(\x0b\x32-.google.analytics.admin.v1alpha.EventEditRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n\x1a\x44\x65leteEventEditRuleRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/EventEditRule\"\\\n\x17GetEventEditRuleRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/EventEditRule\"\x91\x01\n\x19ListEventEditRulesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/EventEditRule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"~\n\x1aListEventEditRulesResponse\x12G\n\x10\x65vent_edit_rules\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.EventEditRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n\x1cReorderEventEditRulesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/EventEditRule\x12\x1d\n\x10\x65vent_edit_rules\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x85\x01\n\x1b\x43reateRollupPropertyRequest\x12\x46\n\x0frollup_property\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyB\x03\xe0\x41\x02\x12\x1e\n\x11source_properties\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\xc1\x01\n\x1c\x43reateRollupPropertyResponse\x12\x41\n\x0frollup_property\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.Property\x12^\n\x1crollup_property_source_links\x18\x02 \x03(\x0b\x32\x38.google.analytics.admin.v1alpha.RollupPropertySourceLink\"r\n\"GetRollupPropertySourceLinkRequest\x12L\n\x04name\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\n6analyticsadmin.googleapis.com/RollupPropertySourceLink\"\xa7\x01\n$ListRollupPropertySourceLinksRequest\x12N\n\x06parent\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\x12\x36\x61nalyticsadmin.googleapis.com/RollupPropertySourceLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n%ListRollupPropertySourceLinksResponse\x12^\n\x1crollup_property_source_links\x18\x01 \x03(\x0b\x32\x38.google.analytics.admin.v1alpha.RollupPropertySourceLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdb\x01\n%CreateRollupPropertySourceLinkRequest\x12N\n\x06parent\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\x12\x36\x61nalyticsadmin.googleapis.com/RollupPropertySourceLink\x12\x62\n\x1brollup_property_source_link\x18\x02 \x01(\x0b\x32\x38.google.analytics.admin.v1alpha.RollupPropertySourceLinkB\x03\xe0\x41\x02\"u\n%DeleteRollupPropertySourceLinkRequest\x12L\n\x04name\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\n6analyticsadmin.googleapis.com/RollupPropertySourceLink\"\xc0\x01\n\x1bProvisionSubpropertyRequest\x12\x42\n\x0bsubproperty\x18\x02 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyB\x03\xe0\x41\x02\x12]\n\x18subproperty_event_filter\x18\x03 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilterB\x03\xe0\x41\x01\"\xb7\x01\n\x1cProvisionSubpropertyResponse\x12=\n\x0bsubproperty\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.Property\x12X\n\x18subproperty_event_filter\x18\x02 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\"\xd2\x01\n#CreateSubpropertyEventFilterRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61nalyticsadmin.googleapis.com/SubpropertyEventFilter\x12]\n\x18subproperty_event_filter\x18\x02 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilterB\x03\xe0\x41\x02\"n\n GetSubpropertyEventFilterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4analyticsadmin.googleapis.com/SubpropertyEventFilter\"\xa3\x01\n\"ListSubpropertyEventFiltersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61nalyticsadmin.googleapis.com/SubpropertyEventFilter\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n#ListSubpropertyEventFiltersResponse\x12Y\n\x19subproperty_event_filters\x18\x01 \x03(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xba\x01\n#UpdateSubpropertyEventFilterRequest\x12]\n\x18subproperty_event_filter\x18\x01 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"q\n#DeleteSubpropertyEventFilterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4analyticsadmin.googleapis.com/SubpropertyEventFilter\"\xd6\x01\n$CreateReportingDataAnnotationRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x61nalyticsadmin.googleapis.com/ReportingDataAnnotation\x12_\n\x19reporting_data_annotation\x18\x02 \x01(\x0b\x32\x37.google.analytics.admin.v1alpha.ReportingDataAnnotationB\x03\xe0\x41\x02\"p\n!GetReportingDataAnnotationRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5analyticsadmin.googleapis.com/ReportingDataAnnotation\"\xba\x01\n#ListReportingDataAnnotationsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x61nalyticsadmin.googleapis.com/ReportingDataAnnotation\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\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\"\x9c\x01\n$ListReportingDataAnnotationsResponse\x12[\n\x1areporting_data_annotations\x18\x01 \x03(\x0b\x32\x37.google.analytics.admin.v1alpha.ReportingDataAnnotation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbd\x01\n$UpdateReportingDataAnnotationRequest\x12_\n\x19reporting_data_annotation\x18\x01 \x01(\x0b\x32\x37.google.analytics.admin.v1alpha.ReportingDataAnnotationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n$DeleteReportingDataAnnotationRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5analyticsadmin.googleapis.com/ReportingDataAnnotation\"\xc2\x01\n\x19SubmitUserDeletionRequest\x12\x11\n\x07user_id\x18\x02 \x01(\tH\x00\x12\x13\n\tclient_id\x18\x03 \x01(\tH\x00\x12\x19\n\x0f\x61pp_instance_id\x18\x04 \x01(\tH\x00\x12\x1c\n\x12user_provided_data\x18\x05 \x01(\tH\x00\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/PropertyB\x06\n\x04user\"W\n\x1aSubmitUserDeletionResponse\x12\x39\n\x15\x64\x65letion_request_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xec\x99\x02\n\x15\x41nalyticsAdminService\x12\x93\x01\n\nGetAccount\x12\x31.google.analytics.admin.v1alpha.GetAccountRequest\x1a\'.google.analytics.admin.v1alpha.Account\")\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1c\x12\x1a/v1alpha/{name=accounts/*}\x12\x94\x01\n\x0cListAccounts\x12\x33.google.analytics.admin.v1alpha.ListAccountsRequest\x1a\x34.google.analytics.admin.v1alpha.ListAccountsResponse\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/v1alpha/accounts\x12\x88\x01\n\rDeleteAccount\x12\x34.google.analytics.admin.v1alpha.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\")\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1c*\x1a/v1alpha/{name=accounts/*}\x12\xb9\x01\n\rUpdateAccount\x12\x34.google.analytics.admin.v1alpha.UpdateAccountRequest\x1a\'.google.analytics.admin.v1alpha.Account\"I\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02-2\"/v1alpha/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xcc\x01\n\x16ProvisionAccountTicket\x12=.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest\x1a>.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1alpha/accounts:provisionAccountTicket:\x01*\x12\xb4\x01\n\x14ListAccountSummaries\x12;.google.analytics.admin.v1alpha.ListAccountSummariesRequest\x1a<.google.analytics.admin.v1alpha.ListAccountSummariesResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1alpha/accountSummaries\x12\x98\x01\n\x0bGetProperty\x12\x32.google.analytics.admin.v1alpha.GetPropertyRequest\x1a(.google.analytics.admin.v1alpha.Property\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1alpha/{name=properties/*}\x12\x9c\x01\n\x0eListProperties\x12\x35.google.analytics.admin.v1alpha.ListPropertiesRequest\x1a\x36.google.analytics.admin.v1alpha.ListPropertiesResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/v1alpha/properties\x12\xa3\x01\n\x0e\x43reateProperty\x12\x35.google.analytics.admin.v1alpha.CreatePropertyRequest\x1a(.google.analytics.admin.v1alpha.Property\"0\xda\x41\x08property\x82\xd3\xe4\x93\x02\x1f\"\x13/v1alpha/properties:\x08property\x12\x9e\x01\n\x0e\x44\x65leteProperty\x12\x35.google.analytics.admin.v1alpha.DeletePropertyRequest\x1a(.google.analytics.admin.v1alpha.Property\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e*\x1c/v1alpha/{name=properties/*}\x12\xc1\x01\n\x0eUpdateProperty\x12\x35.google.analytics.admin.v1alpha.UpdatePropertyRequest\x1a(.google.analytics.admin.v1alpha.Property\"N\xda\x41\x14property,update_mask\x82\xd3\xe4\x93\x02\x31\x32%/v1alpha/{property.name=properties/*}:\x08property\x12\xd9\x01\n\x12\x43reateFirebaseLink\x12\x39.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest\x1a,.google.analytics.admin.v1alpha.FirebaseLink\"Z\xda\x41\x14parent,firebase_link\x82\xd3\xe4\x93\x02=\",/v1alpha/{parent=properties/*}/firebaseLinks:\rfirebase_link\x12\xa4\x01\n\x12\x44\x65leteFirebaseLink\x12\x39.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1alpha/{name=properties/*/firebaseLinks/*}\x12\xc7\x01\n\x11ListFirebaseLinks\x12\x38.google.analytics.admin.v1alpha.ListFirebaseLinksRequest\x1a\x39.google.analytics.admin.v1alpha.ListFirebaseLinksResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{parent=properties/*}/firebaseLinks\x12\xc3\x01\n\x10GetGlobalSiteTag\x12\x37.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest\x1a-.google.analytics.admin.v1alpha.GlobalSiteTag\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}\x12\xe1\x01\n\x13\x43reateGoogleAdsLink\x12:.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest\x1a-.google.analytics.admin.v1alpha.GoogleAdsLink\"_\xda\x41\x16parent,google_ads_link\x82\xd3\xe4\x93\x02@\"-/v1alpha/{parent=properties/*}/googleAdsLinks:\x0fgoogle_ads_link\x12\xf6\x01\n\x13UpdateGoogleAdsLink\x12:.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest\x1a-.google.analytics.admin.v1alpha.GoogleAdsLink\"t\xda\x41\x1bgoogle_ads_link,update_mask\x82\xd3\xe4\x93\x02P2=/v1alpha/{google_ads_link.name=properties/*/googleAdsLinks/*}:\x0fgoogle_ads_link\x12\xa7\x01\n\x13\x44\x65leteGoogleAdsLink\x12:.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1alpha/{name=properties/*/googleAdsLinks/*}\x12\xcb\x01\n\x12ListGoogleAdsLinks\x12\x39.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest\x1a:.google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1alpha/{parent=properties/*}/googleAdsLinks\x12\xcb\x01\n\x16GetDataSharingSettings\x12=.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest\x1a\x33.google.analytics.admin.v1alpha.DataSharingSettings\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{name=accounts/*/dataSharingSettings}\x12\xf6\x01\n\x1cGetMeasurementProtocolSecret\x12\x43.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest\x1a\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecret\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}\x12\x89\x02\n\x1eListMeasurementProtocolSecrets\x12\x45.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest\x1a\x46.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets\x12\xb8\x02\n\x1f\x43reateMeasurementProtocolSecret\x12\x46.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest\x1a\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecret\"\x91\x01\xda\x41\"parent,measurement_protocol_secret\x82\xd3\xe4\x93\x02\x66\"G/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets:\x1bmeasurement_protocol_secret\x12\xd9\x01\n\x1f\x44\x65leteMeasurementProtocolSecret\x12\x46.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I*G/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}\x12\xda\x02\n\x1fUpdateMeasurementProtocolSecret\x12\x46.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest\x1a\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecret\"\xb3\x01\xda\x41\'measurement_protocol_secret,update_mask\x82\xd3\xe4\x93\x02\x82\x01\x32\x63/v1alpha/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}:\x1bmeasurement_protocol_secret\x12\xf7\x01\n\x1d\x41\x63knowledgeUserDataCollection\x12\x44.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest\x1a\x45.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse\"I\x82\xd3\xe4\x93\x02\x43\">/v1alpha/{property=properties/*}:acknowledgeUserDataCollection:\x01*\x12\x91\x02\n#GetSKAdNetworkConversionValueSchema\x12J.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest\x1a@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\x12M/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}\x12\xe3\x02\n&CreateSKAdNetworkConversionValueSchema\x12M.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest\x1a@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema\"\xa7\x01\xda\x41*parent,skadnetwork_conversion_value_schema\x82\xd3\xe4\x93\x02t\"M/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema:#skadnetwork_conversion_value_schema\x12\xed\x01\n&DeleteSKAdNetworkConversionValueSchema\x12M.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest\x1a\x16.google.protobuf.Empty\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O*M/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}\x12\x8d\x03\n&UpdateSKAdNetworkConversionValueSchema\x12M.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest\x1a@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema\"\xd1\x01\xda\x41/skadnetwork_conversion_value_schema,update_mask\x82\xd3\xe4\x93\x02\x98\x01\x32q/v1alpha/{skadnetwork_conversion_value_schema.name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}:#skadnetwork_conversion_value_schema\x12\xa4\x02\n%ListSKAdNetworkConversionValueSchemas\x12L.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest\x1aM.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasResponse\"^\xda\x41\x06parent\x82\xd3\xe4\x93\x02O\x12M/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema\x12\xe4\x01\n\x19SearchChangeHistoryEvents\x12@.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest\x1a\x41.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1alpha/{account=accounts/*}:searchChangeHistoryEvents:\x01*\x12\xd5\x01\n\x18GetGoogleSignalsSettings\x12?.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.GoogleSignalsSettings\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1alpha/{name=properties/*/googleSignalsSettings}\x12\xac\x02\n\x1bUpdateGoogleSignalsSettings\x12\x42.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.GoogleSignalsSettings\"\x91\x01\xda\x41#google_signals_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1alpha/{google_signals_settings.name=properties/*/googleSignalsSettings}:\x17google_signals_settings\x12\xee\x01\n\x15\x43reateConversionEvent\x12<.google.analytics.admin.v1alpha.CreateConversionEventRequest\x1a/.google.analytics.admin.v1alpha.ConversionEvent\"f\x88\x02\x01\xda\x41\x17parent,conversion_event\x82\xd3\xe4\x93\x02\x43\"//v1alpha/{parent=properties/*}/conversionEvents:\x10\x63onversion_event\x12\x84\x02\n\x15UpdateConversionEvent\x12<.google.analytics.admin.v1alpha.UpdateConversionEventRequest\x1a/.google.analytics.admin.v1alpha.ConversionEvent\"|\x88\x02\x01\xda\x41\x1c\x63onversion_event,update_mask\x82\xd3\xe4\x93\x02T2@/v1alpha/{conversion_event.name=properties/*/conversionEvents/*}:\x10\x63onversion_event\x12\xc3\x01\n\x12GetConversionEvent\x12\x39.google.analytics.admin.v1alpha.GetConversionEventRequest\x1a/.google.analytics.admin.v1alpha.ConversionEvent\"A\x88\x02\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{name=properties/*/conversionEvents/*}\x12\xb0\x01\n\x15\x44\x65leteConversionEvent\x12<.google.analytics.admin.v1alpha.DeleteConversionEventRequest\x1a\x16.google.protobuf.Empty\"A\x88\x02\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1alpha/{name=properties/*/conversionEvents/*}\x12\xd6\x01\n\x14ListConversionEvents\x12;.google.analytics.admin.v1alpha.ListConversionEventsRequest\x1a<.google.analytics.admin.v1alpha.ListConversionEventsResponse\"C\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{parent=properties/*}/conversionEvents\x12\xc1\x01\n\x0e\x43reateKeyEvent\x12\x35.google.analytics.admin.v1alpha.CreateKeyEventRequest\x1a(.google.analytics.admin.v1alpha.KeyEvent\"N\xda\x41\x10parent,key_event\x82\xd3\xe4\x93\x02\x35\"(/v1alpha/{parent=properties/*}/keyEvents:\tkey_event\x12\xd0\x01\n\x0eUpdateKeyEvent\x12\x35.google.analytics.admin.v1alpha.UpdateKeyEventRequest\x1a(.google.analytics.admin.v1alpha.KeyEvent\"]\xda\x41\x15key_event,update_mask\x82\xd3\xe4\x93\x02?22/v1alpha/{key_event.name=properties/*/keyEvents/*}:\tkey_event\x12\xa4\x01\n\x0bGetKeyEvent\x12\x32.google.analytics.admin.v1alpha.GetKeyEventRequest\x1a(.google.analytics.admin.v1alpha.KeyEvent\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1alpha/{name=properties/*/keyEvents/*}\x12\x98\x01\n\x0e\x44\x65leteKeyEvent\x12\x35.google.analytics.admin.v1alpha.DeleteKeyEventRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1alpha/{name=properties/*/keyEvents/*}\x12\xb7\x01\n\rListKeyEvents\x12\x34.google.analytics.admin.v1alpha.ListKeyEventsRequest\x1a\x35.google.analytics.admin.v1alpha.ListKeyEventsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1alpha/{parent=properties/*}/keyEvents\x12\xf8\x01\n GetDisplayVideo360AdvertiserLink\x12G.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest\x1a=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}\x12\x8b\x02\n\"ListDisplayVideo360AdvertiserLinks\x12I.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest\x1aJ.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks\x12\xc6\x02\n#CreateDisplayVideo360AdvertiserLink\x12J.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest\x1a=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\"\x93\x01\xda\x41(parent,display_video_360_advertiser_link\x82\xd3\xe4\x93\x02\x62\"=/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks:!display_video_360_advertiser_link\x12\xd7\x01\n#DeleteDisplayVideo360AdvertiserLink\x12J.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest\x1a\x16.google.protobuf.Empty\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}\x12\xee\x02\n#UpdateDisplayVideo360AdvertiserLink\x12J.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest\x1a=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\"\xbb\x01\xda\x41-display_video_360_advertiser_link,update_mask\x82\xd3\xe4\x93\x02\x84\x01\x32_/v1alpha/{display_video_360_advertiser_link.name=properties/*/displayVideo360AdvertiserLinks/*}:!display_video_360_advertiser_link\x12\x98\x02\n(GetDisplayVideo360AdvertiserLinkProposal\x12O.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest\x1a\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}\x12\xab\x02\n*ListDisplayVideo360AdvertiserLinkProposals\x12Q.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest\x1aR.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals\x12\xf8\x02\n+CreateDisplayVideo360AdvertiserLinkProposal\x12R.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest\x1a\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal\"\xad\x01\xda\x41\x31parent,display_video_360_advertiser_link_proposal\x82\xd3\xe4\x93\x02s\"E/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals:*display_video_360_advertiser_link_proposal\x12\xef\x01\n+DeleteDisplayVideo360AdvertiserLinkProposal\x12R.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest\x1a\x16.google.protobuf.Empty\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}\x12\xb3\x02\n,ApproveDisplayVideo360AdvertiserLinkProposal\x12S.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest\x1aT.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse\"X\x82\xd3\xe4\x93\x02R\"M/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:approve:\x01*\x12\xa1\x02\n+CancelDisplayVideo360AdvertiserLinkProposal\x12R.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest\x1a\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal\"W\x82\xd3\xe4\x93\x02Q\"L/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:cancel:\x01*\x12\xeb\x01\n\x15\x43reateCustomDimension\x12<.google.analytics.admin.v1alpha.CreateCustomDimensionRequest\x1a/.google.analytics.admin.v1alpha.CustomDimension\"c\xda\x41\x17parent,custom_dimension\x82\xd3\xe4\x93\x02\x43\"//v1alpha/{parent=properties/*}/customDimensions:\x10\x63ustom_dimension\x12\x81\x02\n\x15UpdateCustomDimension\x12<.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest\x1a/.google.analytics.admin.v1alpha.CustomDimension\"y\xda\x41\x1c\x63ustom_dimension,update_mask\x82\xd3\xe4\x93\x02T2@/v1alpha/{custom_dimension.name=properties/*/customDimensions/*}:\x10\x63ustom_dimension\x12\xd3\x01\n\x14ListCustomDimensions\x12;.google.analytics.admin.v1alpha.ListCustomDimensionsRequest\x1a<.google.analytics.admin.v1alpha.ListCustomDimensionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{parent=properties/*}/customDimensions\x12\xba\x01\n\x16\x41rchiveCustomDimension\x12=.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1alpha/{name=properties/*/customDimensions/*}:archive:\x01*\x12\xc0\x01\n\x12GetCustomDimension\x12\x39.google.analytics.admin.v1alpha.GetCustomDimensionRequest\x1a/.google.analytics.admin.v1alpha.CustomDimension\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{name=properties/*/customDimensions/*}\x12\xd9\x01\n\x12\x43reateCustomMetric\x12\x39.google.analytics.admin.v1alpha.CreateCustomMetricRequest\x1a,.google.analytics.admin.v1alpha.CustomMetric\"Z\xda\x41\x14parent,custom_metric\x82\xd3\xe4\x93\x02=\",/v1alpha/{parent=properties/*}/customMetrics:\rcustom_metric\x12\xec\x01\n\x12UpdateCustomMetric\x12\x39.google.analytics.admin.v1alpha.UpdateCustomMetricRequest\x1a,.google.analytics.admin.v1alpha.CustomMetric\"m\xda\x41\x19\x63ustom_metric,update_mask\x82\xd3\xe4\x93\x02K2:/v1alpha/{custom_metric.name=properties/*/customMetrics/*}:\rcustom_metric\x12\xc7\x01\n\x11ListCustomMetrics\x12\x38.google.analytics.admin.v1alpha.ListCustomMetricsRequest\x1a\x39.google.analytics.admin.v1alpha.ListCustomMetricsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{parent=properties/*}/customMetrics\x12\xb1\x01\n\x13\x41rchiveCustomMetric\x12:.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1alpha/{name=properties/*/customMetrics/*}:archive:\x01*\x12\xb4\x01\n\x0fGetCustomMetric\x12\x36.google.analytics.admin.v1alpha.GetCustomMetricRequest\x1a,.google.analytics.admin.v1alpha.CustomMetric\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{name=properties/*/customMetrics/*}\x12\xd5\x01\n\x18GetDataRetentionSettings\x12?.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.DataRetentionSettings\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1alpha/{name=properties/*/dataRetentionSettings}\x12\xac\x02\n\x1bUpdateDataRetentionSettings\x12\x42.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.DataRetentionSettings\"\x91\x01\xda\x41#data_retention_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1alpha/{data_retention_settings.name=properties/*/dataRetentionSettings}:\x17\x64\x61ta_retention_settings\x12\xcd\x01\n\x10\x43reateDataStream\x12\x37.google.analytics.admin.v1alpha.CreateDataStreamRequest\x1a*.google.analytics.admin.v1alpha.DataStream\"T\xda\x41\x12parent,data_stream\x82\xd3\xe4\x93\x02\x39\"*/v1alpha/{parent=properties/*}/dataStreams:\x0b\x64\x61ta_stream\x12\x9e\x01\n\x10\x44\x65leteDataStream\x12\x37.google.analytics.admin.v1alpha.DeleteDataStreamRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1alpha/{name=properties/*/dataStreams/*}\x12\xde\x01\n\x10UpdateDataStream\x12\x37.google.analytics.admin.v1alpha.UpdateDataStreamRequest\x1a*.google.analytics.admin.v1alpha.DataStream\"e\xda\x41\x17\x64\x61ta_stream,update_mask\x82\xd3\xe4\x93\x02\x45\x32\x36/v1alpha/{data_stream.name=properties/*/dataStreams/*}:\x0b\x64\x61ta_stream\x12\xbf\x01\n\x0fListDataStreams\x12\x36.google.analytics.admin.v1alpha.ListDataStreamsRequest\x1a\x37.google.analytics.admin.v1alpha.ListDataStreamsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1alpha/{parent=properties/*}/dataStreams\x12\xac\x01\n\rGetDataStream\x12\x34.google.analytics.admin.v1alpha.GetDataStreamRequest\x1a*.google.analytics.admin.v1alpha.DataStream\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1alpha/{name=properties/*/dataStreams/*}\x12\xa4\x01\n\x0bGetAudience\x12\x32.google.analytics.admin.v1alpha.GetAudienceRequest\x1a(.google.analytics.admin.v1alpha.Audience\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1alpha/{name=properties/*/audiences/*}\x12\xb7\x01\n\rListAudiences\x12\x34.google.analytics.admin.v1alpha.ListAudiencesRequest\x1a\x35.google.analytics.admin.v1alpha.ListAudiencesResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1alpha/{parent=properties/*}/audiences\x12\xbf\x01\n\x0e\x43reateAudience\x12\x35.google.analytics.admin.v1alpha.CreateAudienceRequest\x1a(.google.analytics.admin.v1alpha.Audience\"L\xda\x41\x0fparent,audience\x82\xd3\xe4\x93\x02\x34\"(/v1alpha/{parent=properties/*}/audiences:\x08\x61udience\x12\xcd\x01\n\x0eUpdateAudience\x12\x35.google.analytics.admin.v1alpha.UpdateAudienceRequest\x1a(.google.analytics.admin.v1alpha.Audience\"Z\xda\x41\x14\x61udience,update_mask\x82\xd3\xe4\x93\x02=21/v1alpha/{audience.name=properties/*/audiences/*}:\x08\x61udience\x12\x9e\x01\n\x0f\x41rchiveAudience\x12\x36.google.analytics.admin.v1alpha.ArchiveAudienceRequest\x1a\x16.google.protobuf.Empty\";\x82\xd3\xe4\x93\x02\x35\"0/v1alpha/{name=properties/*/audiences/*}:archive:\x01*\x12\xc4\x01\n\x13GetSearchAds360Link\x12:.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest\x1a\x30.google.analytics.admin.v1alpha.SearchAds360Link\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{name=properties/*/searchAds360Links/*}\x12\xd7\x01\n\x15ListSearchAds360Links\x12<.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest\x1a=.google.analytics.admin.v1alpha.ListSearchAds360LinksResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{parent=properties/*}/searchAds360Links\x12\xf5\x01\n\x16\x43reateSearchAds360Link\x12=.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest\x1a\x30.google.analytics.admin.v1alpha.SearchAds360Link\"j\xda\x41\x1aparent,search_ads_360_link\x82\xd3\xe4\x93\x02G\"0/v1alpha/{parent=properties/*}/searchAds360Links:\x13search_ads_360_link\x12\xb0\x01\n\x16\x44\x65leteSearchAds360Link\x12=.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1alpha/{name=properties/*/searchAds360Links/*}\x12\x8f\x02\n\x16UpdateSearchAds360Link\x12=.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest\x1a\x30.google.analytics.admin.v1alpha.SearchAds360Link\"\x83\x01\xda\x41\x1fsearch_ads_360_link,update_mask\x82\xd3\xe4\x93\x02[2D/v1alpha/{search_ads_360_link.name=properties/*/searchAds360Links/*}:\x13search_ads_360_link\x12\xcd\x01\n\x16GetAttributionSettings\x12=.google.analytics.admin.v1alpha.GetAttributionSettingsRequest\x1a\x33.google.analytics.admin.v1alpha.AttributionSettings\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{name=properties/*/attributionSettings}\x12\x9b\x02\n\x19UpdateAttributionSettings\x12@.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest\x1a\x33.google.analytics.admin.v1alpha.AttributionSettings\"\x86\x01\xda\x41 attribution_settings,update_mask\x82\xd3\xe4\x93\x02]2E/v1alpha/{attribution_settings.name=properties/*/attributionSettings}:\x14\x61ttribution_settings\x12\xf0\x01\n\x0fRunAccessReport\x12\x36.google.analytics.admin.v1alpha.RunAccessReportRequest\x1a\x37.google.analytics.admin.v1alpha.RunAccessReportResponse\"l\x82\xd3\xe4\x93\x02\x66\"./v1alpha/{entity=properties/*}:runAccessReport:\x01*Z1\",/v1alpha/{entity=accounts/*}:runAccessReport:\x01*\x12\x9f\x02\n\x13\x43reateAccessBinding\x12:.google.analytics.admin.v1alpha.CreateAccessBindingRequest\x1a-.google.analytics.admin.v1alpha.AccessBinding\"\x9c\x01\xda\x41\x15parent,access_binding\x82\xd3\xe4\x93\x02~\"+/v1alpha/{parent=accounts/*}/accessBindings:\x0e\x61\x63\x63\x65ss_bindingZ?\"-/v1alpha/{parent=properties/*}/accessBindings:\x0e\x61\x63\x63\x65ss_binding\x12\xe7\x01\n\x10GetAccessBinding\x12\x37.google.analytics.admin.v1alpha.GetAccessBindingRequest\x1a-.google.analytics.admin.v1alpha.AccessBinding\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^\x12+/v1alpha/{name=accounts/*/accessBindings/*}Z/\x12-/v1alpha/{name=properties/*/accessBindings/*}\x12\xb7\x02\n\x13UpdateAccessBinding\x12:.google.analytics.admin.v1alpha.UpdateAccessBindingRequest\x1a-.google.analytics.admin.v1alpha.AccessBinding\"\xb4\x01\xda\x41\x0e\x61\x63\x63\x65ss_binding\x82\xd3\xe4\x93\x02\x9c\x01\x32:/v1alpha/{access_binding.name=accounts/*/accessBindings/*}:\x0e\x61\x63\x63\x65ss_bindingZN2\"9/v1alpha/{parent=properties/*}/accessBindings:batchCreate:\x01*\x12\x8f\x02\n\x16\x42\x61tchGetAccessBindings\x12=.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest\x1a>.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse\"v\x82\xd3\xe4\x93\x02p\x12\x34/v1alpha/{parent=accounts/*}/accessBindings:batchGetZ8\x12\x36/v1alpha/{parent=properties/*}/accessBindings:batchGet\x12\xa5\x02\n\x19\x42\x61tchUpdateAccessBindings\x12@.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest\x1a\x41.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse\"\x82\x01\x82\xd3\xe4\x93\x02|\"7/v1alpha/{parent=accounts/*}/accessBindings:batchUpdate:\x01*Z>\"9/v1alpha/{parent=properties/*}/accessBindings:batchUpdate:\x01*\x12\xfa\x01\n\x19\x42\x61tchDeleteAccessBindings\x12@.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\x82\xd3\xe4\x93\x02|\"7/v1alpha/{parent=accounts/*}/accessBindings:batchDelete:\x01*Z>\"9/v1alpha/{parent=properties/*}/accessBindings:batchDelete:\x01*\x12\xc0\x01\n\x12GetExpandedDataSet\x12\x39.google.analytics.admin.v1alpha.GetExpandedDataSetRequest\x1a/.google.analytics.admin.v1alpha.ExpandedDataSet\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{name=properties/*/expandedDataSets/*}\x12\xd3\x01\n\x14ListExpandedDataSets\x12;.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest\x1a<.google.analytics.admin.v1alpha.ListExpandedDataSetsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{parent=properties/*}/expandedDataSets\x12\xed\x01\n\x15\x43reateExpandedDataSet\x12<.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest\x1a/.google.analytics.admin.v1alpha.ExpandedDataSet\"e\xda\x41\x18parent,expanded_data_set\x82\xd3\xe4\x93\x02\x44\"//v1alpha/{parent=properties/*}/expandedDataSets:\x11\x65xpanded_data_set\x12\x84\x02\n\x15UpdateExpandedDataSet\x12<.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest\x1a/.google.analytics.admin.v1alpha.ExpandedDataSet\"|\xda\x41\x1d\x65xpanded_data_set,update_mask\x82\xd3\xe4\x93\x02V2A/v1alpha/{expanded_data_set.name=properties/*/expandedDataSets/*}:\x11\x65xpanded_data_set\x12\xad\x01\n\x15\x44\x65leteExpandedDataSet\x12<.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1alpha/{name=properties/*/expandedDataSets/*}\x12\xb4\x01\n\x0fGetChannelGroup\x12\x36.google.analytics.admin.v1alpha.GetChannelGroupRequest\x1a,.google.analytics.admin.v1alpha.ChannelGroup\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{name=properties/*/channelGroups/*}\x12\xc7\x01\n\x11ListChannelGroups\x12\x38.google.analytics.admin.v1alpha.ListChannelGroupsRequest\x1a\x39.google.analytics.admin.v1alpha.ListChannelGroupsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{parent=properties/*}/channelGroups\x12\xd9\x01\n\x12\x43reateChannelGroup\x12\x39.google.analytics.admin.v1alpha.CreateChannelGroupRequest\x1a,.google.analytics.admin.v1alpha.ChannelGroup\"Z\xda\x41\x14parent,channel_group\x82\xd3\xe4\x93\x02=\",/v1alpha/{parent=properties/*}/channelGroups:\rchannel_group\x12\xec\x01\n\x12UpdateChannelGroup\x12\x39.google.analytics.admin.v1alpha.UpdateChannelGroupRequest\x1a,.google.analytics.admin.v1alpha.ChannelGroup\"m\xda\x41\x19\x63hannel_group,update_mask\x82\xd3\xe4\x93\x02K2:/v1alpha/{channel_group.name=properties/*/channelGroups/*}:\rchannel_group\x12\xa4\x01\n\x12\x44\x65leteChannelGroup\x12\x39.google.analytics.admin.v1alpha.DeleteChannelGroupRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1alpha/{name=properties/*/channelGroups/*}\x12\xfe\x01\n\"SetAutomatedGa4ConfigurationOptOut\x12I.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest\x1aJ.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse\"A\x82\xd3\xe4\x93\x02;\"6/v1alpha/properties:setAutomatedGa4ConfigurationOptOut:\x01*\x12\x86\x02\n$FetchAutomatedGa4ConfigurationOptOut\x12K.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest\x1aL.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse\"C\x82\xd3\xe4\x93\x02=\"8/v1alpha/properties:fetchAutomatedGa4ConfigurationOptOut:\x01*\x12\xd9\x01\n\x12\x43reateBigQueryLink\x12\x39.google.analytics.admin.v1alpha.CreateBigQueryLinkRequest\x1a,.google.analytics.admin.v1alpha.BigQueryLink\"Z\xda\x41\x14parent,bigquery_link\x82\xd3\xe4\x93\x02=\",/v1alpha/{parent=properties/*}/bigQueryLinks:\rbigquery_link\x12\xb4\x01\n\x0fGetBigQueryLink\x12\x36.google.analytics.admin.v1alpha.GetBigQueryLinkRequest\x1a,.google.analytics.admin.v1alpha.BigQueryLink\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{name=properties/*/bigQueryLinks/*}\x12\xc7\x01\n\x11ListBigQueryLinks\x12\x38.google.analytics.admin.v1alpha.ListBigQueryLinksRequest\x1a\x39.google.analytics.admin.v1alpha.ListBigQueryLinksResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{parent=properties/*}/bigQueryLinks\x12\xa4\x01\n\x12\x44\x65leteBigQueryLink\x12\x39.google.analytics.admin.v1alpha.DeleteBigQueryLinkRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1alpha/{name=properties/*/bigQueryLinks/*}\x12\xec\x01\n\x12UpdateBigQueryLink\x12\x39.google.analytics.admin.v1alpha.UpdateBigQueryLinkRequest\x1a,.google.analytics.admin.v1alpha.BigQueryLink\"m\xda\x41\x19\x62igquery_link,update_mask\x82\xd3\xe4\x93\x02K2:/v1alpha/{bigquery_link.name=properties/*/bigQueryLinks/*}:\rbigquery_link\x12\xfb\x01\n\x1eGetEnhancedMeasurementSettings\x12\x45.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest\x1a;.google.analytics.admin.v1alpha.EnhancedMeasurementSettings\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1alpha/{name=properties/*/dataStreams/*/enhancedMeasurementSettings}\x12\xe5\x02\n!UpdateEnhancedMeasurementSettings\x12H.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest\x1a;.google.analytics.admin.v1alpha.EnhancedMeasurementSettings\"\xb8\x01\xda\x41)enhanced_measurement_settings,update_mask\x82\xd3\xe4\x93\x02\x85\x01\x32\x64/v1alpha/{enhanced_measurement_settings.name=properties/*/dataStreams/*/enhancedMeasurementSettings}:\x1d\x65nhanced_measurement_settings\x12\xce\x01\n\x16\x43reateConnectedSiteTag\x12=.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest\x1a>.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse\"5\x82\xd3\xe4\x93\x02/\"*/v1alpha/properties:createConnectedSiteTag:\x01*\x12\xa6\x01\n\x16\x44\x65leteConnectedSiteTag\x12=.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest\x1a\x16.google.protobuf.Empty\"5\x82\xd3\xe4\x93\x02/\"*/v1alpha/properties:deleteConnectedSiteTag:\x01*\x12\xca\x01\n\x15ListConnectedSiteTags\x12<.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest\x1a=.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse\"4\x82\xd3\xe4\x93\x02.\")/v1alpha/properties:listConnectedSiteTags:\x01*\x12\xd7\x01\n\x19\x46\x65tchConnectedGa4Property\x12@.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest\x1a\x41.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1alpha/properties:fetchConnectedGa4Property\x12\xb0\x01\n\x0eGetAdSenseLink\x12\x35.google.analytics.admin.v1alpha.GetAdSenseLinkRequest\x1a+.google.analytics.admin.v1alpha.AdSenseLink\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1alpha/{name=properties/*/adSenseLinks/*}\x12\xd3\x01\n\x11\x43reateAdSenseLink\x12\x38.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest\x1a+.google.analytics.admin.v1alpha.AdSenseLink\"W\xda\x41\x13parent,adsense_link\x82\xd3\xe4\x93\x02;\"+/v1alpha/{parent=properties/*}/adSenseLinks:\x0c\x61\x64sense_link\x12\xa1\x01\n\x11\x44\x65leteAdSenseLink\x12\x38.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1alpha/{name=properties/*/adSenseLinks/*}\x12\xc3\x01\n\x10ListAdSenseLinks\x12\x37.google.analytics.admin.v1alpha.ListAdSenseLinksRequest\x1a\x38.google.analytics.admin.v1alpha.ListAdSenseLinksResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1alpha/{parent=properties/*}/adSenseLinks\x12\xce\x01\n\x12GetEventCreateRule\x12\x39.google.analytics.admin.v1alpha.GetEventCreateRuleRequest\x1a/.google.analytics.admin.v1alpha.EventCreateRule\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}\x12\xe1\x01\n\x14ListEventCreateRules\x12;.google.analytics.admin.v1alpha.ListEventCreateRulesRequest\x1a<.google.analytics.admin.v1alpha.ListEventCreateRulesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules\x12\xfb\x01\n\x15\x43reateEventCreateRule\x12<.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest\x1a/.google.analytics.admin.v1alpha.EventCreateRule\"s\xda\x41\x18parent,event_create_rule\x82\xd3\xe4\x93\x02R\"=/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules:\x11\x65vent_create_rule\x12\x93\x02\n\x15UpdateEventCreateRule\x12<.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest\x1a/.google.analytics.admin.v1alpha.EventCreateRule\"\x8a\x01\xda\x41\x1d\x65vent_create_rule,update_mask\x82\xd3\xe4\x93\x02\x64\x32O/v1alpha/{event_create_rule.name=properties/*/dataStreams/*/eventCreateRules/*}:\x11\x65vent_create_rule\x12\xbb\x01\n\x15\x44\x65leteEventCreateRule\x12<.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest\x1a\x16.google.protobuf.Empty\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}\x12\xc6\x01\n\x10GetEventEditRule\x12\x37.google.analytics.admin.v1alpha.GetEventEditRuleRequest\x1a-.google.analytics.admin.v1alpha.EventEditRule\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1alpha/{name=properties/*/dataStreams/*/eventEditRules/*}\x12\xd9\x01\n\x12ListEventEditRules\x12\x39.google.analytics.admin.v1alpha.ListEventEditRulesRequest\x1a:.google.analytics.admin.v1alpha.ListEventEditRulesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1alpha/{parent=properties/*/dataStreams/*}/eventEditRules\x12\xef\x01\n\x13\x43reateEventEditRule\x12:.google.analytics.admin.v1alpha.CreateEventEditRuleRequest\x1a-.google.analytics.admin.v1alpha.EventEditRule\"m\xda\x41\x16parent,event_edit_rule\x82\xd3\xe4\x93\x02N\";/v1alpha/{parent=properties/*/dataStreams/*}/eventEditRules:\x0f\x65vent_edit_rule\x12\x85\x02\n\x13UpdateEventEditRule\x12:.google.analytics.admin.v1alpha.UpdateEventEditRuleRequest\x1a-.google.analytics.admin.v1alpha.EventEditRule\"\x82\x01\xda\x41\x1b\x65vent_edit_rule,update_mask\x82\xd3\xe4\x93\x02^2K/v1alpha/{event_edit_rule.name=properties/*/dataStreams/*/eventEditRules/*}:\x0f\x65vent_edit_rule\x12\xb5\x01\n\x13\x44\x65leteEventEditRule\x12:.google.analytics.admin.v1alpha.DeleteEventEditRuleRequest\x1a\x16.google.protobuf.Empty\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1alpha/{name=properties/*/dataStreams/*/eventEditRules/*}\x12\xbd\x01\n\x15ReorderEventEditRules\x12<.google.analytics.admin.v1alpha.ReorderEventEditRulesRequest\x1a\x16.google.protobuf.Empty\"N\x82\xd3\xe4\x93\x02H\"C/v1alpha/{parent=properties/*/dataStreams/*}/eventEditRules:reorder:\x01*\x12\xba\x02\n\x1bUpdateDataRedactionSettings\x12\x42.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.DataRedactionSettings\"\x9f\x01\xda\x41#data_redaction_settings,update_mask\x82\xd3\xe4\x93\x02s2X/v1alpha/{data_redaction_settings.name=properties/*/dataStreams/*/dataRedactionSettings}:\x17\x64\x61ta_redaction_settings\x12\xe3\x01\n\x18GetDataRedactionSettings\x12?.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.DataRedactionSettings\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1alpha/{name=properties/*/dataStreams/*/dataRedactionSettings}\x12\xc4\x01\n\x13GetCalculatedMetric\x12:.google.analytics.admin.v1alpha.GetCalculatedMetricRequest\x1a\x30.google.analytics.admin.v1alpha.CalculatedMetric\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{name=properties/*/calculatedMetrics/*}\x12\x86\x02\n\x16\x43reateCalculatedMetric\x12=.google.analytics.admin.v1alpha.CreateCalculatedMetricRequest\x1a\x30.google.analytics.admin.v1alpha.CalculatedMetric\"{\xda\x41-parent,calculated_metric,calculated_metric_id\x82\xd3\xe4\x93\x02\x45\"0/v1alpha/{parent=properties/*}/calculatedMetrics:\x11\x63\x61lculated_metric\x12\xd7\x01\n\x15ListCalculatedMetrics\x12<.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest\x1a=.google.analytics.admin.v1alpha.ListCalculatedMetricsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{parent=properties/*}/calculatedMetrics\x12\x88\x02\n\x16UpdateCalculatedMetric\x12=.google.analytics.admin.v1alpha.UpdateCalculatedMetricRequest\x1a\x30.google.analytics.admin.v1alpha.CalculatedMetric\"}\xda\x41\x1d\x63\x61lculated_metric,update_mask\x82\xd3\xe4\x93\x02W2B/v1alpha/{calculated_metric.name=properties/*/calculatedMetrics/*}:\x11\x63\x61lculated_metric\x12\xb0\x01\n\x16\x44\x65leteCalculatedMetric\x12=.google.analytics.admin.v1alpha.DeleteCalculatedMetricRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1alpha/{name=properties/*/calculatedMetrics/*}\x12\xc6\x01\n\x14\x43reateRollupProperty\x12;.google.analytics.admin.v1alpha.CreateRollupPropertyRequest\x1a<.google.analytics.admin.v1alpha.CreateRollupPropertyResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1alpha/properties:createRollupProperty:\x01*\x12\xe4\x01\n\x1bGetRollupPropertySourceLink\x12\x42.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest\x1a\x38.google.analytics.admin.v1alpha.RollupPropertySourceLink\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1alpha/{name=properties/*/rollupPropertySourceLinks/*}\x12\xf7\x01\n\x1dListRollupPropertySourceLinks\x12\x44.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest\x1a\x45.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1alpha/{parent=properties/*}/rollupPropertySourceLinks\x12\xa6\x02\n\x1e\x43reateRollupPropertySourceLink\x12\x45.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest\x1a\x38.google.analytics.admin.v1alpha.RollupPropertySourceLink\"\x82\x01\xda\x41\"parent,rollup_property_source_link\x82\xd3\xe4\x93\x02W\"8/v1alpha/{parent=properties/*}/rollupPropertySourceLinks:\x1brollup_property_source_link\x12\xc8\x01\n\x1e\x44\x65leteRollupPropertySourceLink\x12\x45.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1alpha/{name=properties/*/rollupPropertySourceLinks/*}\x12\xc6\x01\n\x14ProvisionSubproperty\x12;.google.analytics.admin.v1alpha.ProvisionSubpropertyRequest\x1a<.google.analytics.admin.v1alpha.ProvisionSubpropertyResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1alpha/properties:provisionSubproperty:\x01*\x12\x97\x02\n\x1c\x43reateSubpropertyEventFilter\x12\x43.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest\x1a\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\"z\xda\x41\x1fparent,subproperty_event_filter\x82\xd3\xe4\x93\x02R\"6/v1alpha/{parent=properties/*}/subpropertyEventFilters:\x18subproperty_event_filter\x12\xdc\x01\n\x19GetSubpropertyEventFilter\x12@.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest\x1a\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1alpha/{name=properties/*/subpropertyEventFilters/*}\x12\xef\x01\n\x1bListSubpropertyEventFilters\x12\x42.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest\x1a\x43.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1alpha/{parent=properties/*}/subpropertyEventFilters\x12\xb6\x02\n\x1cUpdateSubpropertyEventFilter\x12\x43.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest\x1a\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\"\x98\x01\xda\x41$subproperty_event_filter,update_mask\x82\xd3\xe4\x93\x02k2O/v1alpha/{subproperty_event_filter.name=properties/*/subpropertyEventFilters/*}:\x18subproperty_event_filter\x12\xc2\x01\n\x1c\x44\x65leteSubpropertyEventFilter\x12\x43.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1alpha/{name=properties/*/subpropertyEventFilters/*}\x12\x9d\x02\n\x1d\x43reateReportingDataAnnotation\x12\x44.google.analytics.admin.v1alpha.CreateReportingDataAnnotationRequest\x1a\x37.google.analytics.admin.v1alpha.ReportingDataAnnotation\"}\xda\x41 parent,reporting_data_annotation\x82\xd3\xe4\x93\x02T\"7/v1alpha/{parent=properties/*}/reportingDataAnnotations:\x19reporting_data_annotation\x12\xe0\x01\n\x1aGetReportingDataAnnotation\x12\x41.google.analytics.admin.v1alpha.GetReportingDataAnnotationRequest\x1a\x37.google.analytics.admin.v1alpha.ReportingDataAnnotation\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1alpha/{name=properties/*/reportingDataAnnotations/*}\x12\xf3\x01\n\x1cListReportingDataAnnotations\x12\x43.google.analytics.admin.v1alpha.ListReportingDataAnnotationsRequest\x1a\x44.google.analytics.admin.v1alpha.ListReportingDataAnnotationsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1alpha/{parent=properties/*}/reportingDataAnnotations\x12\xbd\x02\n\x1dUpdateReportingDataAnnotation\x12\x44.google.analytics.admin.v1alpha.UpdateReportingDataAnnotationRequest\x1a\x37.google.analytics.admin.v1alpha.ReportingDataAnnotation\"\x9c\x01\xda\x41%reporting_data_annotation,update_mask\x82\xd3\xe4\x93\x02n2Q/v1alpha/{reporting_data_annotation.name=properties/*/reportingDataAnnotations/*}:\x19reporting_data_annotation\x12\xc5\x01\n\x1d\x44\x65leteReportingDataAnnotation\x12\x44.google.analytics.admin.v1alpha.DeleteReportingDataAnnotationRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1alpha/{name=properties/*/reportingDataAnnotations/*}\x12\xce\x01\n\x12SubmitUserDeletion\x12\x39.google.analytics.admin.v1alpha.SubmitUserDeletionRequest\x1a:.google.analytics.admin.v1alpha.SubmitUserDeletionResponse\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\"//v1alpha/{name=properties/*}:submitUserDeletion:\x01*\x1a\xfc\x01\xca\x41\x1d\x61nalyticsadmin.googleapis.com\xd2\x41\xd8\x01https://www.googleapis.com/auth/analytics.edit,https://www.googleapis.com/auth/analytics.manage.users,https://www.googleapis.com/auth/analytics.manage.users.readonly,https://www.googleapis.com/auth/analytics.readonlyB{\n\"com.google.analytics.admin.v1alphaB\x13\x41nalyticsAdminProtoP\x01Z>cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpbb\x06proto3" +descriptor_data = "\n4google/analytics/admin/v1alpha/analytics_admin.proto\x12\x1egoogle.analytics.admin.v1alpha\x1a\x32google/analytics/admin/v1alpha/access_report.proto\x1a-google/analytics/admin/v1alpha/audience.proto\x1a\x32google/analytics/admin/v1alpha/channel_group.proto\x1a:google/analytics/admin/v1alpha/event_create_and_edit.proto\x1a\x36google/analytics/admin/v1alpha/expanded_data_set.proto\x1a.google/analytics/admin/v1alpha/resources.proto\x1a=google/analytics/admin/v1alpha/subproperty_event_filter.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x04\n\x16RunAccessReportRequest\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x43\n\ndimensions\x18\x02 \x03(\x0b\x32/.google.analytics.admin.v1alpha.AccessDimension\x12=\n\x07metrics\x18\x03 \x03(\x0b\x32,.google.analytics.admin.v1alpha.AccessMetric\x12\x44\n\x0b\x64\x61te_ranges\x18\x04 \x03(\x0b\x32/.google.analytics.admin.v1alpha.AccessDateRange\x12P\n\x10\x64imension_filter\x18\x05 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.AccessFilterExpression\x12M\n\rmetric_filter\x18\x06 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.AccessFilterExpression\x12\x0e\n\x06offset\x18\x07 \x01(\x03\x12\r\n\x05limit\x18\x08 \x01(\x03\x12\x11\n\ttime_zone\x18\t \x01(\t\x12@\n\torder_bys\x18\n \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessOrderBy\x12\x1b\n\x13return_entity_quota\x18\x0b \x01(\x08\x12\x1e\n\x11include_all_users\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rexpand_groups\x18\r \x01(\x08\x42\x03\xe0\x41\x01\"\xbf\x02\n\x17RunAccessReportResponse\x12P\n\x11\x64imension_headers\x18\x01 \x03(\x0b\x32\x35.google.analytics.admin.v1alpha.AccessDimensionHeader\x12J\n\x0emetric_headers\x18\x02 \x03(\x0b\x32\x32.google.analytics.admin.v1alpha.AccessMetricHeader\x12\x37\n\x04rows\x18\x03 \x03(\x0b\x32).google.analytics.admin.v1alpha.AccessRow\x12\x11\n\trow_count\x18\x04 \x01(\x05\x12:\n\x05quota\x18\x05 \x01(\x0b\x32+.google.analytics.admin.v1alpha.AccessQuota\"P\n\x11GetAccountRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%analyticsadmin.googleapis.com/Account\"R\n\x13ListAccountsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x03 \x01(\x08\"j\n\x14ListAccountsResponse\x12\x39\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\'.google.analytics.admin.v1alpha.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x14\x44\x65leteAccountRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%analyticsadmin.googleapis.com/Account\"\x8b\x01\n\x14UpdateAccountRequest\x12=\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\'.google.analytics.admin.v1alpha.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"o\n\x1dProvisionAccountTicketRequest\x12\x38\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\'.google.analytics.admin.v1alpha.Account\x12\x14\n\x0credirect_uri\x18\x02 \x01(\t\";\n\x1eProvisionAccountTicketResponse\x12\x19\n\x11\x61\x63\x63ount_ticket_id\x18\x01 \x01(\t\"R\n\x12GetPropertyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Property\"i\n\x15ListPropertiesRequest\x12\x13\n\x06\x66ilter\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"o\n\x16ListPropertiesResponse\x12<\n\nproperties\x18\x01 \x03(\x0b\x32(.google.analytics.admin.v1alpha.Property\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8e\x01\n\x15UpdatePropertyRequest\x12?\n\x08property\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"X\n\x15\x43reatePropertyRequest\x12?\n\x08property\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyB\x03\xe0\x41\x02\"U\n\x15\x44\x65letePropertyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Property\"\xa9\x01\n\x19\x43reateFirebaseLinkRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/FirebaseLink\x12H\n\rfirebase_link\x18\x02 \x01(\x0b\x32,.google.analytics.admin.v1alpha.FirebaseLinkB\x03\xe0\x41\x02\"]\n\x19\x44\x65leteFirebaseLinkRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/FirebaseLink\"\x85\x01\n\x18ListFirebaseLinksRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/FirebaseLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x19ListFirebaseLinksResponse\x12\x44\n\x0e\x66irebase_links\x18\x01 \x03(\x0b\x32,.google.analytics.admin.v1alpha.FirebaseLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x17GetGlobalSiteTagRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/GlobalSiteTag\"\xae\x01\n\x1a\x43reateGoogleAdsLinkRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/GoogleAdsLink\x12K\n\x0fgoogle_ads_link\x18\x02 \x01(\x0b\x32-.google.analytics.admin.v1alpha.GoogleAdsLinkB\x03\xe0\x41\x02\"\x9a\x01\n\x1aUpdateGoogleAdsLinkRequest\x12\x46\n\x0fgoogle_ads_link\x18\x01 \x01(\x0b\x32-.google.analytics.admin.v1alpha.GoogleAdsLink\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n\x1a\x44\x65leteGoogleAdsLinkRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/GoogleAdsLink\"\x87\x01\n\x19ListGoogleAdsLinksRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/GoogleAdsLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"~\n\x1aListGoogleAdsLinksResponse\x12G\n\x10google_ads_links\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.GoogleAdsLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1dGetDataSharingSettingsRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1analyticsadmin.googleapis.com/DataSharingSettings\"D\n\x1bListAccountSummariesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\"\x82\x01\n\x1cListAccountSummariesResponse\x12I\n\x11\x61\x63\x63ount_summaries\x18\x01 \x03(\x0b\x32..google.analytics.admin.v1alpha.AccountSummary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x86\x01\n$AcknowledgeUserDataCollectionRequest\x12@\n\x08property\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Property\x12\x1c\n\x0f\x61\x63knowledgement\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\'\n%AcknowledgeUserDataCollectionResponse\"\x83\x04\n SearchChangeHistoryEventsRequest\x12>\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%analyticsadmin.googleapis.com/Account\x12@\n\x08property\x18\x02 \x01(\tB.\xe0\x41\x01\xfa\x41(\n&analyticsadmin.googleapis.com/Property\x12U\n\rresource_type\x18\x03 \x03(\x0e\x32\x39.google.analytics.admin.v1alpha.ChangeHistoryResourceTypeB\x03\xe0\x41\x01\x12?\n\x06\x61\x63tion\x18\x04 \x03(\x0e\x32*.google.analytics.admin.v1alpha.ActionTypeB\x03\xe0\x41\x01\x12\x18\n\x0b\x61\x63tor_email\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12=\n\x14\x65\x61rliest_change_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12;\n\x12latest_change_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\t \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n!SearchChangeHistoryEventsResponse\x12Q\n\x15\x63hange_history_events\x18\x01 \x03(\x0b\x32\x32.google.analytics.admin.v1alpha.ChangeHistoryEvent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"t\n#GetMeasurementProtocolSecretRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7analyticsadmin.googleapis.com/MeasurementProtocolSecret\"\xde\x01\n&CreateMeasurementProtocolSecretRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37\x61nalyticsadmin.googleapis.com/MeasurementProtocolSecret\x12\x63\n\x1bmeasurement_protocol_secret\x18\x02 \x01(\x0b\x32\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecretB\x03\xe0\x41\x02\"w\n&DeleteMeasurementProtocolSecretRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7analyticsadmin.googleapis.com/MeasurementProtocolSecret\"\xc3\x01\n&UpdateMeasurementProtocolSecretRequest\x12\x63\n\x1bmeasurement_protocol_secret\x18\x01 \x01(\x0b\x32\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecretB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x9f\x01\n%ListMeasurementProtocolSecretsRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37\x61nalyticsadmin.googleapis.com/MeasurementProtocolSecret\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa2\x01\n&ListMeasurementProtocolSecretsResponse\x12_\n\x1cmeasurement_protocol_secrets\x18\x01 \x03(\x0b\x32\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecret\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n*GetSKAdNetworkConversionValueSchemaRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\"\xfb\x01\n-CreateSKAdNetworkConversionValueSchemaRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\x12r\n#skadnetwork_conversion_value_schema\x18\x02 \x01(\x0b\x32@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchemaB\x03\xe0\x41\x02\"\x85\x01\n-DeleteSKAdNetworkConversionValueSchemaRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\"\xd9\x01\n-UpdateSKAdNetworkConversionValueSchemaRequest\x12r\n#skadnetwork_conversion_value_schema\x18\x01 \x01(\x0b\x32@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchemaB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xad\x01\n,ListSKAdNetworkConversionValueSchemasRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xb8\x01\n-ListSKAdNetworkConversionValueSchemasResponse\x12n\n$skadnetwork_conversion_value_schemas\x18\x01 \x03(\x0b\x32@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x1fGetGoogleSignalsSettingsRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3analyticsadmin.googleapis.com/GoogleSignalsSettings\"\xb7\x01\n\"UpdateGoogleSignalsSettingsRequest\x12[\n\x17google_signals_settings\x18\x01 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.GoogleSignalsSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xb5\x01\n\x1c\x43reateConversionEventRequest\x12N\n\x10\x63onversion_event\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ConversionEventB\x03\xe0\x41\x02\x12\x45\n\x06parent\x18\x02 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/ConversionEvent\"\xa4\x01\n\x1cUpdateConversionEventRequest\x12N\n\x10\x63onversion_event\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ConversionEventB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"`\n\x19GetConversionEventRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/ConversionEvent\"c\n\x1c\x44\x65leteConversionEventRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/ConversionEvent\"\x8b\x01\n\x1bListConversionEventsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/ConversionEvent\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x83\x01\n\x1cListConversionEventsResponse\x12J\n\x11\x63onversion_events\x18\x01 \x03(\x0b\x32/.google.analytics.admin.v1alpha.ConversionEvent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x99\x01\n\x15\x43reateKeyEventRequest\x12@\n\tkey_event\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.KeyEventB\x03\xe0\x41\x02\x12>\n\x06parent\x18\x02 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/KeyEvent\"\x8f\x01\n\x15UpdateKeyEventRequest\x12@\n\tkey_event\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.KeyEventB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"R\n\x12GetKeyEventRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/KeyEvent\"U\n\x15\x44\x65leteKeyEventRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/KeyEvent\"}\n\x14ListKeyEventsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/KeyEvent\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n\x15ListKeyEventsResponse\x12<\n\nkey_events\x18\x01 \x03(\x0b\x32(.google.analytics.admin.v1alpha.KeyEvent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"|\n\'GetDisplayVideo360AdvertiserLinkRequest\x12Q\n\x04name\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\n;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\"\xa7\x01\n)ListDisplayVideo360AdvertiserLinksRequest\x12S\n\x06parent\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\x12;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xb0\x01\n*ListDisplayVideo360AdvertiserLinksResponse\x12i\n\"display_video_360_advertiser_links\x18\x01 \x03(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf0\x01\n*CreateDisplayVideo360AdvertiserLinkRequest\x12S\n\x06parent\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\x12;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\x12m\n!display_video_360_advertiser_link\x18\x02 \x01(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkB\x03\xe0\x41\x02\"\x7f\n*DeleteDisplayVideo360AdvertiserLinkRequest\x12Q\n\x04name\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\n;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\"\xcc\x01\n*UpdateDisplayVideo360AdvertiserLinkRequest\x12h\n!display_video_360_advertiser_link\x18\x01 \x01(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x8c\x01\n/GetDisplayVideo360AdvertiserLinkProposalRequest\x12Y\n\x04name\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\"\xb7\x01\n1ListDisplayVideo360AdvertiserLinkProposalsRequest\x12[\n\x06parent\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\x12\x43\x61nalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xc9\x01\n2ListDisplayVideo360AdvertiserLinkProposalsResponse\x12z\n+display_video_360_advertiser_link_proposals\x18\x01 \x03(\x0b\x32\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x02\n2CreateDisplayVideo360AdvertiserLinkProposalRequest\x12[\n\x06parent\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\x12\x43\x61nalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\x12~\n*display_video_360_advertiser_link_proposal\x18\x02 \x01(\x0b\x32\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposalB\x03\xe0\x41\x02\"\x8f\x01\n2DeleteDisplayVideo360AdvertiserLinkProposalRequest\x12Y\n\x04name\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\"\x90\x01\n3ApproveDisplayVideo360AdvertiserLinkProposalRequest\x12Y\n\x04name\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\"\xa0\x01\n4ApproveDisplayVideo360AdvertiserLinkProposalResponse\x12h\n!display_video_360_advertiser_link\x18\x01 \x01(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\"\x8f\x01\n2CancelDisplayVideo360AdvertiserLinkProposalRequest\x12Y\n\x04name\x18\x01 \x01(\tBK\xe0\x41\x02\xfa\x41\x45\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\"b\n\x1aGetSearchAds360LinkRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.analyticsadmin.googleapis.com/SearchAds360Link\"\x8d\x01\n\x1cListSearchAds360LinksRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.analyticsadmin.googleapis.com/SearchAds360Link\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x88\x01\n\x1dListSearchAds360LinksResponse\x12N\n\x14search_ads_360_links\x18\x01 \x03(\x0b\x32\x30.google.analytics.admin.v1alpha.SearchAds360Link\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbb\x01\n\x1d\x43reateSearchAds360LinkRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.analyticsadmin.googleapis.com/SearchAds360Link\x12R\n\x13search_ads_360_link\x18\x02 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.SearchAds360LinkB\x03\xe0\x41\x02\"e\n\x1d\x44\x65leteSearchAds360LinkRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.analyticsadmin.googleapis.com/SearchAds360Link\"\xa4\x01\n\x1dUpdateSearchAds360LinkRequest\x12M\n\x13search_ads_360_link\x18\x01 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.SearchAds360Link\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xb5\x01\n\x1c\x43reateCustomDimensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/CustomDimension\x12N\n\x10\x63ustom_dimension\x18\x02 \x01(\x0b\x32/.google.analytics.admin.v1alpha.CustomDimensionB\x03\xe0\x41\x02\"\x9f\x01\n\x1cUpdateCustomDimensionRequest\x12I\n\x10\x63ustom_dimension\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.CustomDimension\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x8b\x01\n\x1bListCustomDimensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/CustomDimension\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x83\x01\n\x1cListCustomDimensionsResponse\x12J\n\x11\x63ustom_dimensions\x18\x01 \x03(\x0b\x32/.google.analytics.admin.v1alpha.CustomDimension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"d\n\x1d\x41rchiveCustomDimensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/CustomDimension\"`\n\x19GetCustomDimensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/CustomDimension\"\xa9\x01\n\x19\x43reateCustomMetricRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/CustomMetric\x12H\n\rcustom_metric\x18\x02 \x01(\x0b\x32,.google.analytics.admin.v1alpha.CustomMetricB\x03\xe0\x41\x02\"\x96\x01\n\x19UpdateCustomMetricRequest\x12\x43\n\rcustom_metric\x18\x01 \x01(\x0b\x32,.google.analytics.admin.v1alpha.CustomMetric\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x85\x01\n\x18ListCustomMetricsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/CustomMetric\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x19ListCustomMetricsResponse\x12\x44\n\x0e\x63ustom_metrics\x18\x01 \x03(\x0b\x32,.google.analytics.admin.v1alpha.CustomMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1a\x41rchiveCustomMetricRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/CustomMetric\"Z\n\x16GetCustomMetricRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/CustomMetric\"\xdc\x01\n\x1d\x43reateCalculatedMetricRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.analyticsadmin.googleapis.com/CalculatedMetric\x12!\n\x14\x63\x61lculated_metric_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11\x63\x61lculated_metric\x18\x03 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.CalculatedMetricB\x03\xe0\x41\x02\"\xa7\x01\n\x1dUpdateCalculatedMetricRequest\x12P\n\x11\x63\x61lculated_metric\x18\x01 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.CalculatedMetricB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"e\n\x1d\x44\x65leteCalculatedMetricRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.analyticsadmin.googleapis.com/CalculatedMetric\"\x97\x01\n\x1cListCalculatedMetricsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.analyticsadmin.googleapis.com/CalculatedMetric\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x1dListCalculatedMetricsResponse\x12L\n\x12\x63\x61lculated_metrics\x18\x01 \x03(\x0b\x32\x30.google.analytics.admin.v1alpha.CalculatedMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x1aGetCalculatedMetricRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.analyticsadmin.googleapis.com/CalculatedMetric\"l\n\x1fGetDataRetentionSettingsRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3analyticsadmin.googleapis.com/DataRetentionSettings\"\xb7\x01\n\"UpdateDataRetentionSettingsRequest\x12[\n\x17\x64\x61ta_retention_settings\x18\x01 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.DataRetentionSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa1\x01\n\x17\x43reateDataStreamRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticsadmin.googleapis.com/DataStream\x12\x44\n\x0b\x64\x61ta_stream\x18\x02 \x01(\x0b\x32*.google.analytics.admin.v1alpha.DataStreamB\x03\xe0\x41\x02\"Y\n\x17\x44\x65leteDataStreamRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticsadmin.googleapis.com/DataStream\"\x90\x01\n\x17UpdateDataStreamRequest\x12?\n\x0b\x64\x61ta_stream\x18\x01 \x01(\x0b\x32*.google.analytics.admin.v1alpha.DataStream\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x81\x01\n\x16ListDataStreamsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticsadmin.googleapis.com/DataStream\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListDataStreamsResponse\x12@\n\x0c\x64\x61ta_streams\x18\x01 \x03(\x0b\x32*.google.analytics.admin.v1alpha.DataStream\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetDataStreamRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticsadmin.googleapis.com/DataStream\"R\n\x12GetAudienceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Audience\"}\n\x14ListAudiencesRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/Audience\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"m\n\x15ListAudiencesResponse\x12;\n\taudiences\x18\x01 \x03(\x0b\x32(.google.analytics.admin.v1alpha.Audience\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x98\x01\n\x15\x43reateAudienceRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/Audience\x12?\n\x08\x61udience\x18\x02 \x01(\x0b\x32(.google.analytics.admin.v1alpha.AudienceB\x03\xe0\x41\x02\"\x8e\x01\n\x15UpdateAudienceRequest\x12?\n\x08\x61udience\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.AudienceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"V\n\x16\x41rchiveAudienceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&analyticsadmin.googleapis.com/Audience\"h\n\x1dGetAttributionSettingsRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1analyticsadmin.googleapis.com/AttributionSettings\"\xb0\x01\n UpdateAttributionSettingsRequest\x12V\n\x14\x61ttribution_settings\x18\x01 \x01(\x0b\x32\x33.google.analytics.admin.v1alpha.AttributionSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\\\n\x17GetAccessBindingRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/AccessBinding\"\xa8\x01\n\x1d\x42\x61tchGetAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12\x42\n\x05names\x18\x02 \x03(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/AccessBinding\"h\n\x1e\x42\x61tchGetAccessBindingsResponse\x12\x46\n\x0f\x61\x63\x63\x65ss_bindings\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessBinding\"\x87\x01\n\x19ListAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"}\n\x1aListAccessBindingsResponse\x12\x46\n\x0f\x61\x63\x63\x65ss_bindings\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x1a\x43reateAccessBindingRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12J\n\x0e\x61\x63\x63\x65ss_binding\x18\x02 \x01(\x0b\x32-.google.analytics.admin.v1alpha.AccessBindingB\x03\xe0\x41\x02\"\xba\x01\n BatchCreateAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12Q\n\x08requests\x18\x03 \x03(\x0b\x32:.google.analytics.admin.v1alpha.CreateAccessBindingRequestB\x03\xe0\x41\x02\"k\n!BatchCreateAccessBindingsResponse\x12\x46\n\x0f\x61\x63\x63\x65ss_bindings\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessBinding\"h\n\x1aUpdateAccessBindingRequest\x12J\n\x0e\x61\x63\x63\x65ss_binding\x18\x01 \x01(\x0b\x32-.google.analytics.admin.v1alpha.AccessBindingB\x03\xe0\x41\x02\"\xba\x01\n BatchUpdateAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12Q\n\x08requests\x18\x02 \x03(\x0b\x32:.google.analytics.admin.v1alpha.UpdateAccessBindingRequestB\x03\xe0\x41\x02\"k\n!BatchUpdateAccessBindingsResponse\x12\x46\n\x0f\x61\x63\x63\x65ss_bindings\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.AccessBinding\"_\n\x1a\x44\x65leteAccessBindingRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/AccessBinding\"\xba\x01\n BatchDeleteAccessBindingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/AccessBinding\x12Q\n\x08requests\x18\x02 \x03(\x0b\x32:.google.analytics.admin.v1alpha.DeleteAccessBindingRequestB\x03\xe0\x41\x02\"\xb6\x01\n\x1c\x43reateExpandedDataSetRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/ExpandedDataSet\x12O\n\x11\x65xpanded_data_set\x18\x02 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ExpandedDataSetB\x03\xe0\x41\x02\"\xa5\x01\n\x1cUpdateExpandedDataSetRequest\x12O\n\x11\x65xpanded_data_set\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ExpandedDataSetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x1c\x44\x65leteExpandedDataSetRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/ExpandedDataSet\"`\n\x19GetExpandedDataSetRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/ExpandedDataSet\"\x8b\x01\n\x1bListExpandedDataSetsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/ExpandedDataSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListExpandedDataSetsResponse\x12K\n\x12\x65xpanded_data_sets\x18\x01 \x03(\x0b\x32/.google.analytics.admin.v1alpha.ExpandedDataSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa9\x01\n\x19\x43reateChannelGroupRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/ChannelGroup\x12H\n\rchannel_group\x18\x02 \x01(\x0b\x32,.google.analytics.admin.v1alpha.ChannelGroupB\x03\xe0\x41\x02\"\x9b\x01\n\x19UpdateChannelGroupRequest\x12H\n\rchannel_group\x18\x01 \x01(\x0b\x32,.google.analytics.admin.v1alpha.ChannelGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"]\n\x19\x44\x65leteChannelGroupRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/ChannelGroup\"Z\n\x16GetChannelGroupRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/ChannelGroup\"\x85\x01\n\x18ListChannelGroupsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/ChannelGroup\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x19ListChannelGroupsResponse\x12\x44\n\x0e\x63hannel_groups\x18\x01 \x03(\x0b\x32,.google.analytics.admin.v1alpha.ChannelGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n)SetAutomatedGa4ConfigurationOptOutRequest\x12\x15\n\x08property\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07opt_out\x18\x02 \x01(\x08\",\n*SetAutomatedGa4ConfigurationOptOutResponse\"D\n+FetchAutomatedGa4ConfigurationOptOutRequest\x12\x15\n\x08property\x18\x01 \x01(\tB\x03\xe0\x41\x02\"?\n,FetchAutomatedGa4ConfigurationOptOutResponse\x12\x0f\n\x07opt_out\x18\x01 \x01(\x08\"\xa9\x01\n\x19\x43reateBigQueryLinkRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/BigQueryLink\x12H\n\rbigquery_link\x18\x02 \x01(\x0b\x32,.google.analytics.admin.v1alpha.BigQueryLinkB\x03\xe0\x41\x02\"Z\n\x16GetBigQueryLinkRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/BigQueryLink\"\x85\x01\n\x18ListBigQueryLinksRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*analyticsadmin.googleapis.com/BigQueryLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x19ListBigQueryLinksResponse\x12\x44\n\x0e\x62igquery_links\x18\x01 \x03(\x0b\x32,.google.analytics.admin.v1alpha.BigQueryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x19UpdateBigQueryLinkRequest\x12H\n\rbigquery_link\x18\x01 \x01(\x0b\x32,.google.analytics.admin.v1alpha.BigQueryLinkB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"]\n\x19\x44\x65leteBigQueryLinkRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*analyticsadmin.googleapis.com/BigQueryLink\"x\n%GetEnhancedMeasurementSettingsRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9analyticsadmin.googleapis.com/EnhancedMeasurementSettings\"\xc9\x01\n(UpdateEnhancedMeasurementSettingsRequest\x12g\n\x1d\x65nhanced_measurement_settings\x18\x01 \x01(\x0b\x32;.google.analytics.admin.v1alpha.EnhancedMeasurementSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"l\n\x1fGetDataRedactionSettingsRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3analyticsadmin.googleapis.com/DataRedactionSettings\"\xb7\x01\n\"UpdateDataRedactionSettingsRequest\x12[\n\x17\x64\x61ta_redaction_settings\x18\x01 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.DataRedactionSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x84\x01\n\x1d\x43reateConnectedSiteTagRequest\x12\x10\n\x08property\x18\x01 \x01(\t\x12Q\n\x12\x63onnected_site_tag\x18\x02 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.ConnectedSiteTagB\x03\xe0\x41\x02\" \n\x1e\x43reateConnectedSiteTagResponse\"A\n\x1d\x44\x65leteConnectedSiteTagRequest\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\"0\n\x1cListConnectedSiteTagsRequest\x12\x10\n\x08property\x18\x01 \x01(\t\"n\n\x1dListConnectedSiteTagsResponse\x12M\n\x13\x63onnected_site_tags\x18\x01 \x03(\x0b\x32\x30.google.analytics.admin.v1alpha.ConnectedSiteTag\"\xa5\x01\n\x18\x43reateAdSenseLinkRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)analyticsadmin.googleapis.com/AdSenseLink\x12\x46\n\x0c\x61\x64sense_link\x18\x02 \x01(\x0b\x32+.google.analytics.admin.v1alpha.AdSenseLinkB\x03\xe0\x41\x02\"X\n\x15GetAdSenseLinkRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticsadmin.googleapis.com/AdSenseLink\"[\n\x18\x44\x65leteAdSenseLinkRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticsadmin.googleapis.com/AdSenseLink\"\x83\x01\n\x17ListAdSenseLinksRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)analyticsadmin.googleapis.com/AdSenseLink\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"w\n\x18ListAdSenseLinksResponse\x12\x42\n\radsense_links\x18\x01 \x03(\x0b\x32+.google.analytics.admin.v1alpha.AdSenseLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"d\n FetchConnectedGa4PropertyRequest\x12@\n\x08property\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/Property\"b\n!FetchConnectedGa4PropertyResponse\x12=\n\x08property\x18\x01 \x01(\tB+\xfa\x41(\n&analyticsadmin.googleapis.com/Property\"\xb6\x01\n\x1c\x43reateEventCreateRuleRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/EventCreateRule\x12O\n\x11\x65vent_create_rule\x18\x02 \x01(\x0b\x32/.google.analytics.admin.v1alpha.EventCreateRuleB\x03\xe0\x41\x02\"\xa5\x01\n\x1cUpdateEventCreateRuleRequest\x12O\n\x11\x65vent_create_rule\x18\x01 \x01(\x0b\x32/.google.analytics.admin.v1alpha.EventCreateRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x1c\x44\x65leteEventCreateRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/EventCreateRule\"`\n\x19GetEventCreateRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-analyticsadmin.googleapis.com/EventCreateRule\"\x8b\x01\n\x1bListEventCreateRulesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-analyticsadmin.googleapis.com/EventCreateRule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListEventCreateRulesResponse\x12K\n\x12\x65vent_create_rules\x18\x01 \x03(\x0b\x32/.google.analytics.admin.v1alpha.EventCreateRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xae\x01\n\x1a\x43reateEventEditRuleRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/EventEditRule\x12K\n\x0f\x65vent_edit_rule\x18\x02 \x01(\x0b\x32-.google.analytics.admin.v1alpha.EventEditRuleB\x03\xe0\x41\x02\"\x9f\x01\n\x1aUpdateEventEditRuleRequest\x12K\n\x0f\x65vent_edit_rule\x18\x01 \x01(\x0b\x32-.google.analytics.admin.v1alpha.EventEditRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n\x1a\x44\x65leteEventEditRuleRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/EventEditRule\"\\\n\x17GetEventEditRuleRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+analyticsadmin.googleapis.com/EventEditRule\"\x91\x01\n\x19ListEventEditRulesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/EventEditRule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"~\n\x1aListEventEditRulesResponse\x12G\n\x10\x65vent_edit_rules\x18\x01 \x03(\x0b\x32-.google.analytics.admin.v1alpha.EventEditRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n\x1cReorderEventEditRulesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+analyticsadmin.googleapis.com/EventEditRule\x12\x1d\n\x10\x65vent_edit_rules\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x85\x01\n\x1b\x43reateRollupPropertyRequest\x12\x46\n\x0frollup_property\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyB\x03\xe0\x41\x02\x12\x1e\n\x11source_properties\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\xc1\x01\n\x1c\x43reateRollupPropertyResponse\x12\x41\n\x0frollup_property\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.Property\x12^\n\x1crollup_property_source_links\x18\x02 \x03(\x0b\x32\x38.google.analytics.admin.v1alpha.RollupPropertySourceLink\"r\n\"GetRollupPropertySourceLinkRequest\x12L\n\x04name\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\n6analyticsadmin.googleapis.com/RollupPropertySourceLink\"\xa7\x01\n$ListRollupPropertySourceLinksRequest\x12N\n\x06parent\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\x12\x36\x61nalyticsadmin.googleapis.com/RollupPropertySourceLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n%ListRollupPropertySourceLinksResponse\x12^\n\x1crollup_property_source_links\x18\x01 \x03(\x0b\x32\x38.google.analytics.admin.v1alpha.RollupPropertySourceLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdb\x01\n%CreateRollupPropertySourceLinkRequest\x12N\n\x06parent\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\x12\x36\x61nalyticsadmin.googleapis.com/RollupPropertySourceLink\x12\x62\n\x1brollup_property_source_link\x18\x02 \x01(\x0b\x32\x38.google.analytics.admin.v1alpha.RollupPropertySourceLinkB\x03\xe0\x41\x02\"u\n%DeleteRollupPropertySourceLinkRequest\x12L\n\x04name\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\n6analyticsadmin.googleapis.com/RollupPropertySourceLink\"\xcb\x02\n\x1bProvisionSubpropertyRequest\x12\x42\n\x0bsubproperty\x18\x02 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyB\x03\xe0\x41\x02\x12]\n\x18subproperty_event_filter\x18\x03 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilterB\x03\xe0\x41\x01\x12\x88\x01\n0custom_dimension_and_metric_synchronization_mode\x18\x04 \x01(\x0e\x32I.google.analytics.admin.v1alpha.SubpropertySyncConfig.SynchronizationModeB\x03\xe0\x41\x01\"\xb7\x01\n\x1cProvisionSubpropertyResponse\x12=\n\x0bsubproperty\x18\x01 \x01(\x0b\x32(.google.analytics.admin.v1alpha.Property\x12X\n\x18subproperty_event_filter\x18\x02 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\"\xd2\x01\n#CreateSubpropertyEventFilterRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61nalyticsadmin.googleapis.com/SubpropertyEventFilter\x12]\n\x18subproperty_event_filter\x18\x02 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilterB\x03\xe0\x41\x02\"n\n GetSubpropertyEventFilterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4analyticsadmin.googleapis.com/SubpropertyEventFilter\"\xa3\x01\n\"ListSubpropertyEventFiltersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61nalyticsadmin.googleapis.com/SubpropertyEventFilter\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n#ListSubpropertyEventFiltersResponse\x12Y\n\x19subproperty_event_filters\x18\x01 \x03(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xba\x01\n#UpdateSubpropertyEventFilterRequest\x12]\n\x18subproperty_event_filter\x18\x01 \x01(\x0b\x32\x36.google.analytics.admin.v1alpha.SubpropertyEventFilterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"q\n#DeleteSubpropertyEventFilterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4analyticsadmin.googleapis.com/SubpropertyEventFilter\"\xd6\x01\n$CreateReportingDataAnnotationRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x61nalyticsadmin.googleapis.com/ReportingDataAnnotation\x12_\n\x19reporting_data_annotation\x18\x02 \x01(\x0b\x32\x37.google.analytics.admin.v1alpha.ReportingDataAnnotationB\x03\xe0\x41\x02\"p\n!GetReportingDataAnnotationRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5analyticsadmin.googleapis.com/ReportingDataAnnotation\"\xba\x01\n#ListReportingDataAnnotationsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x61nalyticsadmin.googleapis.com/ReportingDataAnnotation\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\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\"\x9c\x01\n$ListReportingDataAnnotationsResponse\x12[\n\x1areporting_data_annotations\x18\x01 \x03(\x0b\x32\x37.google.analytics.admin.v1alpha.ReportingDataAnnotation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbd\x01\n$UpdateReportingDataAnnotationRequest\x12_\n\x19reporting_data_annotation\x18\x01 \x01(\x0b\x32\x37.google.analytics.admin.v1alpha.ReportingDataAnnotationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n$DeleteReportingDataAnnotationRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5analyticsadmin.googleapis.com/ReportingDataAnnotation\"\xc2\x01\n\x19SubmitUserDeletionRequest\x12\x11\n\x07user_id\x18\x02 \x01(\tH\x00\x12\x13\n\tclient_id\x18\x03 \x01(\tH\x00\x12\x19\n\x0f\x61pp_instance_id\x18\x04 \x01(\tH\x00\x12\x1c\n\x12user_provided_data\x18\x05 \x01(\tH\x00\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&analyticsadmin.googleapis.com/PropertyB\x06\n\x04user\"W\n\x1aSubmitUserDeletionResponse\x12\x39\n\x15\x64\x65letion_request_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"l\n\x1fGetSubpropertySyncConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3analyticsadmin.googleapis.com/SubpropertySyncConfig\"\xa1\x01\n!ListSubpropertySyncConfigsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x61nalyticsadmin.googleapis.com/SubpropertySyncConfig\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\"ListSubpropertySyncConfigsResponse\x12W\n\x18subproperty_sync_configs\x18\x01 \x03(\x0b\x32\x35.google.analytics.admin.v1alpha.SubpropertySyncConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb7\x01\n\"UpdateSubpropertySyncConfigRequest\x12[\n\x17subproperty_sync_config\x18\x01 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.SubpropertySyncConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xe7\x9f\x02\n\x15\x41nalyticsAdminService\x12\x93\x01\n\nGetAccount\x12\x31.google.analytics.admin.v1alpha.GetAccountRequest\x1a\'.google.analytics.admin.v1alpha.Account\")\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1c\x12\x1a/v1alpha/{name=accounts/*}\x12\x94\x01\n\x0cListAccounts\x12\x33.google.analytics.admin.v1alpha.ListAccountsRequest\x1a\x34.google.analytics.admin.v1alpha.ListAccountsResponse\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/v1alpha/accounts\x12\x88\x01\n\rDeleteAccount\x12\x34.google.analytics.admin.v1alpha.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\")\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1c*\x1a/v1alpha/{name=accounts/*}\x12\xb9\x01\n\rUpdateAccount\x12\x34.google.analytics.admin.v1alpha.UpdateAccountRequest\x1a\'.google.analytics.admin.v1alpha.Account\"I\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02-2\"/v1alpha/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xcc\x01\n\x16ProvisionAccountTicket\x12=.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest\x1a>.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1alpha/accounts:provisionAccountTicket:\x01*\x12\xb4\x01\n\x14ListAccountSummaries\x12;.google.analytics.admin.v1alpha.ListAccountSummariesRequest\x1a<.google.analytics.admin.v1alpha.ListAccountSummariesResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1alpha/accountSummaries\x12\x98\x01\n\x0bGetProperty\x12\x32.google.analytics.admin.v1alpha.GetPropertyRequest\x1a(.google.analytics.admin.v1alpha.Property\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1alpha/{name=properties/*}\x12\x9c\x01\n\x0eListProperties\x12\x35.google.analytics.admin.v1alpha.ListPropertiesRequest\x1a\x36.google.analytics.admin.v1alpha.ListPropertiesResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/v1alpha/properties\x12\xa3\x01\n\x0e\x43reateProperty\x12\x35.google.analytics.admin.v1alpha.CreatePropertyRequest\x1a(.google.analytics.admin.v1alpha.Property\"0\xda\x41\x08property\x82\xd3\xe4\x93\x02\x1f\"\x13/v1alpha/properties:\x08property\x12\x9e\x01\n\x0e\x44\x65leteProperty\x12\x35.google.analytics.admin.v1alpha.DeletePropertyRequest\x1a(.google.analytics.admin.v1alpha.Property\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e*\x1c/v1alpha/{name=properties/*}\x12\xc1\x01\n\x0eUpdateProperty\x12\x35.google.analytics.admin.v1alpha.UpdatePropertyRequest\x1a(.google.analytics.admin.v1alpha.Property\"N\xda\x41\x14property,update_mask\x82\xd3\xe4\x93\x02\x31\x32%/v1alpha/{property.name=properties/*}:\x08property\x12\xd9\x01\n\x12\x43reateFirebaseLink\x12\x39.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest\x1a,.google.analytics.admin.v1alpha.FirebaseLink\"Z\xda\x41\x14parent,firebase_link\x82\xd3\xe4\x93\x02=\",/v1alpha/{parent=properties/*}/firebaseLinks:\rfirebase_link\x12\xa4\x01\n\x12\x44\x65leteFirebaseLink\x12\x39.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1alpha/{name=properties/*/firebaseLinks/*}\x12\xc7\x01\n\x11ListFirebaseLinks\x12\x38.google.analytics.admin.v1alpha.ListFirebaseLinksRequest\x1a\x39.google.analytics.admin.v1alpha.ListFirebaseLinksResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{parent=properties/*}/firebaseLinks\x12\xc3\x01\n\x10GetGlobalSiteTag\x12\x37.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest\x1a-.google.analytics.admin.v1alpha.GlobalSiteTag\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}\x12\xe1\x01\n\x13\x43reateGoogleAdsLink\x12:.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest\x1a-.google.analytics.admin.v1alpha.GoogleAdsLink\"_\xda\x41\x16parent,google_ads_link\x82\xd3\xe4\x93\x02@\"-/v1alpha/{parent=properties/*}/googleAdsLinks:\x0fgoogle_ads_link\x12\xf6\x01\n\x13UpdateGoogleAdsLink\x12:.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest\x1a-.google.analytics.admin.v1alpha.GoogleAdsLink\"t\xda\x41\x1bgoogle_ads_link,update_mask\x82\xd3\xe4\x93\x02P2=/v1alpha/{google_ads_link.name=properties/*/googleAdsLinks/*}:\x0fgoogle_ads_link\x12\xa7\x01\n\x13\x44\x65leteGoogleAdsLink\x12:.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1alpha/{name=properties/*/googleAdsLinks/*}\x12\xcb\x01\n\x12ListGoogleAdsLinks\x12\x39.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest\x1a:.google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1alpha/{parent=properties/*}/googleAdsLinks\x12\xcb\x01\n\x16GetDataSharingSettings\x12=.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest\x1a\x33.google.analytics.admin.v1alpha.DataSharingSettings\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{name=accounts/*/dataSharingSettings}\x12\xf6\x01\n\x1cGetMeasurementProtocolSecret\x12\x43.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest\x1a\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecret\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}\x12\x89\x02\n\x1eListMeasurementProtocolSecrets\x12\x45.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest\x1a\x46.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets\x12\xb8\x02\n\x1f\x43reateMeasurementProtocolSecret\x12\x46.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest\x1a\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecret\"\x91\x01\xda\x41\"parent,measurement_protocol_secret\x82\xd3\xe4\x93\x02\x66\"G/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets:\x1bmeasurement_protocol_secret\x12\xd9\x01\n\x1f\x44\x65leteMeasurementProtocolSecret\x12\x46.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I*G/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}\x12\xda\x02\n\x1fUpdateMeasurementProtocolSecret\x12\x46.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest\x1a\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecret\"\xb3\x01\xda\x41\'measurement_protocol_secret,update_mask\x82\xd3\xe4\x93\x02\x82\x01\x32\x63/v1alpha/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}:\x1bmeasurement_protocol_secret\x12\xf7\x01\n\x1d\x41\x63knowledgeUserDataCollection\x12\x44.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest\x1a\x45.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse\"I\x82\xd3\xe4\x93\x02\x43\">/v1alpha/{property=properties/*}:acknowledgeUserDataCollection:\x01*\x12\x91\x02\n#GetSKAdNetworkConversionValueSchema\x12J.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest\x1a@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\x12M/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}\x12\xe3\x02\n&CreateSKAdNetworkConversionValueSchema\x12M.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest\x1a@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema\"\xa7\x01\xda\x41*parent,skadnetwork_conversion_value_schema\x82\xd3\xe4\x93\x02t\"M/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema:#skadnetwork_conversion_value_schema\x12\xed\x01\n&DeleteSKAdNetworkConversionValueSchema\x12M.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest\x1a\x16.google.protobuf.Empty\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O*M/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}\x12\x8d\x03\n&UpdateSKAdNetworkConversionValueSchema\x12M.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest\x1a@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema\"\xd1\x01\xda\x41/skadnetwork_conversion_value_schema,update_mask\x82\xd3\xe4\x93\x02\x98\x01\x32q/v1alpha/{skadnetwork_conversion_value_schema.name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}:#skadnetwork_conversion_value_schema\x12\xa4\x02\n%ListSKAdNetworkConversionValueSchemas\x12L.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest\x1aM.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasResponse\"^\xda\x41\x06parent\x82\xd3\xe4\x93\x02O\x12M/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema\x12\xe4\x01\n\x19SearchChangeHistoryEvents\x12@.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest\x1a\x41.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1alpha/{account=accounts/*}:searchChangeHistoryEvents:\x01*\x12\xd5\x01\n\x18GetGoogleSignalsSettings\x12?.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.GoogleSignalsSettings\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1alpha/{name=properties/*/googleSignalsSettings}\x12\xac\x02\n\x1bUpdateGoogleSignalsSettings\x12\x42.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.GoogleSignalsSettings\"\x91\x01\xda\x41#google_signals_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1alpha/{google_signals_settings.name=properties/*/googleSignalsSettings}:\x17google_signals_settings\x12\xee\x01\n\x15\x43reateConversionEvent\x12<.google.analytics.admin.v1alpha.CreateConversionEventRequest\x1a/.google.analytics.admin.v1alpha.ConversionEvent\"f\x88\x02\x01\xda\x41\x17parent,conversion_event\x82\xd3\xe4\x93\x02\x43\"//v1alpha/{parent=properties/*}/conversionEvents:\x10\x63onversion_event\x12\x84\x02\n\x15UpdateConversionEvent\x12<.google.analytics.admin.v1alpha.UpdateConversionEventRequest\x1a/.google.analytics.admin.v1alpha.ConversionEvent\"|\x88\x02\x01\xda\x41\x1c\x63onversion_event,update_mask\x82\xd3\xe4\x93\x02T2@/v1alpha/{conversion_event.name=properties/*/conversionEvents/*}:\x10\x63onversion_event\x12\xc3\x01\n\x12GetConversionEvent\x12\x39.google.analytics.admin.v1alpha.GetConversionEventRequest\x1a/.google.analytics.admin.v1alpha.ConversionEvent\"A\x88\x02\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{name=properties/*/conversionEvents/*}\x12\xb0\x01\n\x15\x44\x65leteConversionEvent\x12<.google.analytics.admin.v1alpha.DeleteConversionEventRequest\x1a\x16.google.protobuf.Empty\"A\x88\x02\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1alpha/{name=properties/*/conversionEvents/*}\x12\xd6\x01\n\x14ListConversionEvents\x12;.google.analytics.admin.v1alpha.ListConversionEventsRequest\x1a<.google.analytics.admin.v1alpha.ListConversionEventsResponse\"C\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{parent=properties/*}/conversionEvents\x12\xc1\x01\n\x0e\x43reateKeyEvent\x12\x35.google.analytics.admin.v1alpha.CreateKeyEventRequest\x1a(.google.analytics.admin.v1alpha.KeyEvent\"N\xda\x41\x10parent,key_event\x82\xd3\xe4\x93\x02\x35\"(/v1alpha/{parent=properties/*}/keyEvents:\tkey_event\x12\xd0\x01\n\x0eUpdateKeyEvent\x12\x35.google.analytics.admin.v1alpha.UpdateKeyEventRequest\x1a(.google.analytics.admin.v1alpha.KeyEvent\"]\xda\x41\x15key_event,update_mask\x82\xd3\xe4\x93\x02?22/v1alpha/{key_event.name=properties/*/keyEvents/*}:\tkey_event\x12\xa4\x01\n\x0bGetKeyEvent\x12\x32.google.analytics.admin.v1alpha.GetKeyEventRequest\x1a(.google.analytics.admin.v1alpha.KeyEvent\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1alpha/{name=properties/*/keyEvents/*}\x12\x98\x01\n\x0e\x44\x65leteKeyEvent\x12\x35.google.analytics.admin.v1alpha.DeleteKeyEventRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1alpha/{name=properties/*/keyEvents/*}\x12\xb7\x01\n\rListKeyEvents\x12\x34.google.analytics.admin.v1alpha.ListKeyEventsRequest\x1a\x35.google.analytics.admin.v1alpha.ListKeyEventsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1alpha/{parent=properties/*}/keyEvents\x12\xf8\x01\n GetDisplayVideo360AdvertiserLink\x12G.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest\x1a=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}\x12\x8b\x02\n\"ListDisplayVideo360AdvertiserLinks\x12I.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest\x1aJ.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks\x12\xc6\x02\n#CreateDisplayVideo360AdvertiserLink\x12J.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest\x1a=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\"\x93\x01\xda\x41(parent,display_video_360_advertiser_link\x82\xd3\xe4\x93\x02\x62\"=/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks:!display_video_360_advertiser_link\x12\xd7\x01\n#DeleteDisplayVideo360AdvertiserLink\x12J.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest\x1a\x16.google.protobuf.Empty\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}\x12\xee\x02\n#UpdateDisplayVideo360AdvertiserLink\x12J.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest\x1a=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink\"\xbb\x01\xda\x41-display_video_360_advertiser_link,update_mask\x82\xd3\xe4\x93\x02\x84\x01\x32_/v1alpha/{display_video_360_advertiser_link.name=properties/*/displayVideo360AdvertiserLinks/*}:!display_video_360_advertiser_link\x12\x98\x02\n(GetDisplayVideo360AdvertiserLinkProposal\x12O.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest\x1a\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}\x12\xab\x02\n*ListDisplayVideo360AdvertiserLinkProposals\x12Q.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest\x1aR.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals\x12\xf8\x02\n+CreateDisplayVideo360AdvertiserLinkProposal\x12R.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest\x1a\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal\"\xad\x01\xda\x41\x31parent,display_video_360_advertiser_link_proposal\x82\xd3\xe4\x93\x02s\"E/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals:*display_video_360_advertiser_link_proposal\x12\xef\x01\n+DeleteDisplayVideo360AdvertiserLinkProposal\x12R.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest\x1a\x16.google.protobuf.Empty\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}\x12\xb3\x02\n,ApproveDisplayVideo360AdvertiserLinkProposal\x12S.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest\x1aT.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse\"X\x82\xd3\xe4\x93\x02R\"M/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:approve:\x01*\x12\xa1\x02\n+CancelDisplayVideo360AdvertiserLinkProposal\x12R.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest\x1a\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal\"W\x82\xd3\xe4\x93\x02Q\"L/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:cancel:\x01*\x12\xeb\x01\n\x15\x43reateCustomDimension\x12<.google.analytics.admin.v1alpha.CreateCustomDimensionRequest\x1a/.google.analytics.admin.v1alpha.CustomDimension\"c\xda\x41\x17parent,custom_dimension\x82\xd3\xe4\x93\x02\x43\"//v1alpha/{parent=properties/*}/customDimensions:\x10\x63ustom_dimension\x12\x81\x02\n\x15UpdateCustomDimension\x12<.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest\x1a/.google.analytics.admin.v1alpha.CustomDimension\"y\xda\x41\x1c\x63ustom_dimension,update_mask\x82\xd3\xe4\x93\x02T2@/v1alpha/{custom_dimension.name=properties/*/customDimensions/*}:\x10\x63ustom_dimension\x12\xd3\x01\n\x14ListCustomDimensions\x12;.google.analytics.admin.v1alpha.ListCustomDimensionsRequest\x1a<.google.analytics.admin.v1alpha.ListCustomDimensionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{parent=properties/*}/customDimensions\x12\xba\x01\n\x16\x41rchiveCustomDimension\x12=.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1alpha/{name=properties/*/customDimensions/*}:archive:\x01*\x12\xc0\x01\n\x12GetCustomDimension\x12\x39.google.analytics.admin.v1alpha.GetCustomDimensionRequest\x1a/.google.analytics.admin.v1alpha.CustomDimension\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{name=properties/*/customDimensions/*}\x12\xd9\x01\n\x12\x43reateCustomMetric\x12\x39.google.analytics.admin.v1alpha.CreateCustomMetricRequest\x1a,.google.analytics.admin.v1alpha.CustomMetric\"Z\xda\x41\x14parent,custom_metric\x82\xd3\xe4\x93\x02=\",/v1alpha/{parent=properties/*}/customMetrics:\rcustom_metric\x12\xec\x01\n\x12UpdateCustomMetric\x12\x39.google.analytics.admin.v1alpha.UpdateCustomMetricRequest\x1a,.google.analytics.admin.v1alpha.CustomMetric\"m\xda\x41\x19\x63ustom_metric,update_mask\x82\xd3\xe4\x93\x02K2:/v1alpha/{custom_metric.name=properties/*/customMetrics/*}:\rcustom_metric\x12\xc7\x01\n\x11ListCustomMetrics\x12\x38.google.analytics.admin.v1alpha.ListCustomMetricsRequest\x1a\x39.google.analytics.admin.v1alpha.ListCustomMetricsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{parent=properties/*}/customMetrics\x12\xb1\x01\n\x13\x41rchiveCustomMetric\x12:.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1alpha/{name=properties/*/customMetrics/*}:archive:\x01*\x12\xb4\x01\n\x0fGetCustomMetric\x12\x36.google.analytics.admin.v1alpha.GetCustomMetricRequest\x1a,.google.analytics.admin.v1alpha.CustomMetric\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{name=properties/*/customMetrics/*}\x12\xd5\x01\n\x18GetDataRetentionSettings\x12?.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.DataRetentionSettings\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1alpha/{name=properties/*/dataRetentionSettings}\x12\xac\x02\n\x1bUpdateDataRetentionSettings\x12\x42.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.DataRetentionSettings\"\x91\x01\xda\x41#data_retention_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1alpha/{data_retention_settings.name=properties/*/dataRetentionSettings}:\x17\x64\x61ta_retention_settings\x12\xcd\x01\n\x10\x43reateDataStream\x12\x37.google.analytics.admin.v1alpha.CreateDataStreamRequest\x1a*.google.analytics.admin.v1alpha.DataStream\"T\xda\x41\x12parent,data_stream\x82\xd3\xe4\x93\x02\x39\"*/v1alpha/{parent=properties/*}/dataStreams:\x0b\x64\x61ta_stream\x12\x9e\x01\n\x10\x44\x65leteDataStream\x12\x37.google.analytics.admin.v1alpha.DeleteDataStreamRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1alpha/{name=properties/*/dataStreams/*}\x12\xde\x01\n\x10UpdateDataStream\x12\x37.google.analytics.admin.v1alpha.UpdateDataStreamRequest\x1a*.google.analytics.admin.v1alpha.DataStream\"e\xda\x41\x17\x64\x61ta_stream,update_mask\x82\xd3\xe4\x93\x02\x45\x32\x36/v1alpha/{data_stream.name=properties/*/dataStreams/*}:\x0b\x64\x61ta_stream\x12\xbf\x01\n\x0fListDataStreams\x12\x36.google.analytics.admin.v1alpha.ListDataStreamsRequest\x1a\x37.google.analytics.admin.v1alpha.ListDataStreamsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1alpha/{parent=properties/*}/dataStreams\x12\xac\x01\n\rGetDataStream\x12\x34.google.analytics.admin.v1alpha.GetDataStreamRequest\x1a*.google.analytics.admin.v1alpha.DataStream\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1alpha/{name=properties/*/dataStreams/*}\x12\xa4\x01\n\x0bGetAudience\x12\x32.google.analytics.admin.v1alpha.GetAudienceRequest\x1a(.google.analytics.admin.v1alpha.Audience\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1alpha/{name=properties/*/audiences/*}\x12\xb7\x01\n\rListAudiences\x12\x34.google.analytics.admin.v1alpha.ListAudiencesRequest\x1a\x35.google.analytics.admin.v1alpha.ListAudiencesResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1alpha/{parent=properties/*}/audiences\x12\xbf\x01\n\x0e\x43reateAudience\x12\x35.google.analytics.admin.v1alpha.CreateAudienceRequest\x1a(.google.analytics.admin.v1alpha.Audience\"L\xda\x41\x0fparent,audience\x82\xd3\xe4\x93\x02\x34\"(/v1alpha/{parent=properties/*}/audiences:\x08\x61udience\x12\xcd\x01\n\x0eUpdateAudience\x12\x35.google.analytics.admin.v1alpha.UpdateAudienceRequest\x1a(.google.analytics.admin.v1alpha.Audience\"Z\xda\x41\x14\x61udience,update_mask\x82\xd3\xe4\x93\x02=21/v1alpha/{audience.name=properties/*/audiences/*}:\x08\x61udience\x12\x9e\x01\n\x0f\x41rchiveAudience\x12\x36.google.analytics.admin.v1alpha.ArchiveAudienceRequest\x1a\x16.google.protobuf.Empty\";\x82\xd3\xe4\x93\x02\x35\"0/v1alpha/{name=properties/*/audiences/*}:archive:\x01*\x12\xc4\x01\n\x13GetSearchAds360Link\x12:.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest\x1a\x30.google.analytics.admin.v1alpha.SearchAds360Link\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{name=properties/*/searchAds360Links/*}\x12\xd7\x01\n\x15ListSearchAds360Links\x12<.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest\x1a=.google.analytics.admin.v1alpha.ListSearchAds360LinksResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{parent=properties/*}/searchAds360Links\x12\xf5\x01\n\x16\x43reateSearchAds360Link\x12=.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest\x1a\x30.google.analytics.admin.v1alpha.SearchAds360Link\"j\xda\x41\x1aparent,search_ads_360_link\x82\xd3\xe4\x93\x02G\"0/v1alpha/{parent=properties/*}/searchAds360Links:\x13search_ads_360_link\x12\xb0\x01\n\x16\x44\x65leteSearchAds360Link\x12=.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1alpha/{name=properties/*/searchAds360Links/*}\x12\x8f\x02\n\x16UpdateSearchAds360Link\x12=.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest\x1a\x30.google.analytics.admin.v1alpha.SearchAds360Link\"\x83\x01\xda\x41\x1fsearch_ads_360_link,update_mask\x82\xd3\xe4\x93\x02[2D/v1alpha/{search_ads_360_link.name=properties/*/searchAds360Links/*}:\x13search_ads_360_link\x12\xcd\x01\n\x16GetAttributionSettings\x12=.google.analytics.admin.v1alpha.GetAttributionSettingsRequest\x1a\x33.google.analytics.admin.v1alpha.AttributionSettings\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{name=properties/*/attributionSettings}\x12\x9b\x02\n\x19UpdateAttributionSettings\x12@.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest\x1a\x33.google.analytics.admin.v1alpha.AttributionSettings\"\x86\x01\xda\x41 attribution_settings,update_mask\x82\xd3\xe4\x93\x02]2E/v1alpha/{attribution_settings.name=properties/*/attributionSettings}:\x14\x61ttribution_settings\x12\xf0\x01\n\x0fRunAccessReport\x12\x36.google.analytics.admin.v1alpha.RunAccessReportRequest\x1a\x37.google.analytics.admin.v1alpha.RunAccessReportResponse\"l\x82\xd3\xe4\x93\x02\x66\"./v1alpha/{entity=properties/*}:runAccessReport:\x01*Z1\",/v1alpha/{entity=accounts/*}:runAccessReport:\x01*\x12\x9f\x02\n\x13\x43reateAccessBinding\x12:.google.analytics.admin.v1alpha.CreateAccessBindingRequest\x1a-.google.analytics.admin.v1alpha.AccessBinding\"\x9c\x01\xda\x41\x15parent,access_binding\x82\xd3\xe4\x93\x02~\"+/v1alpha/{parent=accounts/*}/accessBindings:\x0e\x61\x63\x63\x65ss_bindingZ?\"-/v1alpha/{parent=properties/*}/accessBindings:\x0e\x61\x63\x63\x65ss_binding\x12\xe7\x01\n\x10GetAccessBinding\x12\x37.google.analytics.admin.v1alpha.GetAccessBindingRequest\x1a-.google.analytics.admin.v1alpha.AccessBinding\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^\x12+/v1alpha/{name=accounts/*/accessBindings/*}Z/\x12-/v1alpha/{name=properties/*/accessBindings/*}\x12\xb7\x02\n\x13UpdateAccessBinding\x12:.google.analytics.admin.v1alpha.UpdateAccessBindingRequest\x1a-.google.analytics.admin.v1alpha.AccessBinding\"\xb4\x01\xda\x41\x0e\x61\x63\x63\x65ss_binding\x82\xd3\xe4\x93\x02\x9c\x01\x32:/v1alpha/{access_binding.name=accounts/*/accessBindings/*}:\x0e\x61\x63\x63\x65ss_bindingZN2\"9/v1alpha/{parent=properties/*}/accessBindings:batchCreate:\x01*\x12\x8f\x02\n\x16\x42\x61tchGetAccessBindings\x12=.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest\x1a>.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse\"v\x82\xd3\xe4\x93\x02p\x12\x34/v1alpha/{parent=accounts/*}/accessBindings:batchGetZ8\x12\x36/v1alpha/{parent=properties/*}/accessBindings:batchGet\x12\xa5\x02\n\x19\x42\x61tchUpdateAccessBindings\x12@.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest\x1a\x41.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse\"\x82\x01\x82\xd3\xe4\x93\x02|\"7/v1alpha/{parent=accounts/*}/accessBindings:batchUpdate:\x01*Z>\"9/v1alpha/{parent=properties/*}/accessBindings:batchUpdate:\x01*\x12\xfa\x01\n\x19\x42\x61tchDeleteAccessBindings\x12@.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\x82\xd3\xe4\x93\x02|\"7/v1alpha/{parent=accounts/*}/accessBindings:batchDelete:\x01*Z>\"9/v1alpha/{parent=properties/*}/accessBindings:batchDelete:\x01*\x12\xc0\x01\n\x12GetExpandedDataSet\x12\x39.google.analytics.admin.v1alpha.GetExpandedDataSetRequest\x1a/.google.analytics.admin.v1alpha.ExpandedDataSet\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{name=properties/*/expandedDataSets/*}\x12\xd3\x01\n\x14ListExpandedDataSets\x12;.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest\x1a<.google.analytics.admin.v1alpha.ListExpandedDataSetsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{parent=properties/*}/expandedDataSets\x12\xed\x01\n\x15\x43reateExpandedDataSet\x12<.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest\x1a/.google.analytics.admin.v1alpha.ExpandedDataSet\"e\xda\x41\x18parent,expanded_data_set\x82\xd3\xe4\x93\x02\x44\"//v1alpha/{parent=properties/*}/expandedDataSets:\x11\x65xpanded_data_set\x12\x84\x02\n\x15UpdateExpandedDataSet\x12<.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest\x1a/.google.analytics.admin.v1alpha.ExpandedDataSet\"|\xda\x41\x1d\x65xpanded_data_set,update_mask\x82\xd3\xe4\x93\x02V2A/v1alpha/{expanded_data_set.name=properties/*/expandedDataSets/*}:\x11\x65xpanded_data_set\x12\xad\x01\n\x15\x44\x65leteExpandedDataSet\x12<.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1alpha/{name=properties/*/expandedDataSets/*}\x12\xb4\x01\n\x0fGetChannelGroup\x12\x36.google.analytics.admin.v1alpha.GetChannelGroupRequest\x1a,.google.analytics.admin.v1alpha.ChannelGroup\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{name=properties/*/channelGroups/*}\x12\xc7\x01\n\x11ListChannelGroups\x12\x38.google.analytics.admin.v1alpha.ListChannelGroupsRequest\x1a\x39.google.analytics.admin.v1alpha.ListChannelGroupsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{parent=properties/*}/channelGroups\x12\xd9\x01\n\x12\x43reateChannelGroup\x12\x39.google.analytics.admin.v1alpha.CreateChannelGroupRequest\x1a,.google.analytics.admin.v1alpha.ChannelGroup\"Z\xda\x41\x14parent,channel_group\x82\xd3\xe4\x93\x02=\",/v1alpha/{parent=properties/*}/channelGroups:\rchannel_group\x12\xec\x01\n\x12UpdateChannelGroup\x12\x39.google.analytics.admin.v1alpha.UpdateChannelGroupRequest\x1a,.google.analytics.admin.v1alpha.ChannelGroup\"m\xda\x41\x19\x63hannel_group,update_mask\x82\xd3\xe4\x93\x02K2:/v1alpha/{channel_group.name=properties/*/channelGroups/*}:\rchannel_group\x12\xa4\x01\n\x12\x44\x65leteChannelGroup\x12\x39.google.analytics.admin.v1alpha.DeleteChannelGroupRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1alpha/{name=properties/*/channelGroups/*}\x12\xfe\x01\n\"SetAutomatedGa4ConfigurationOptOut\x12I.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest\x1aJ.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse\"A\x82\xd3\xe4\x93\x02;\"6/v1alpha/properties:setAutomatedGa4ConfigurationOptOut:\x01*\x12\x86\x02\n$FetchAutomatedGa4ConfigurationOptOut\x12K.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest\x1aL.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse\"C\x82\xd3\xe4\x93\x02=\"8/v1alpha/properties:fetchAutomatedGa4ConfigurationOptOut:\x01*\x12\xd9\x01\n\x12\x43reateBigQueryLink\x12\x39.google.analytics.admin.v1alpha.CreateBigQueryLinkRequest\x1a,.google.analytics.admin.v1alpha.BigQueryLink\"Z\xda\x41\x14parent,bigquery_link\x82\xd3\xe4\x93\x02=\",/v1alpha/{parent=properties/*}/bigQueryLinks:\rbigquery_link\x12\xb4\x01\n\x0fGetBigQueryLink\x12\x36.google.analytics.admin.v1alpha.GetBigQueryLinkRequest\x1a,.google.analytics.admin.v1alpha.BigQueryLink\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{name=properties/*/bigQueryLinks/*}\x12\xc7\x01\n\x11ListBigQueryLinks\x12\x38.google.analytics.admin.v1alpha.ListBigQueryLinksRequest\x1a\x39.google.analytics.admin.v1alpha.ListBigQueryLinksResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1alpha/{parent=properties/*}/bigQueryLinks\x12\xa4\x01\n\x12\x44\x65leteBigQueryLink\x12\x39.google.analytics.admin.v1alpha.DeleteBigQueryLinkRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1alpha/{name=properties/*/bigQueryLinks/*}\x12\xec\x01\n\x12UpdateBigQueryLink\x12\x39.google.analytics.admin.v1alpha.UpdateBigQueryLinkRequest\x1a,.google.analytics.admin.v1alpha.BigQueryLink\"m\xda\x41\x19\x62igquery_link,update_mask\x82\xd3\xe4\x93\x02K2:/v1alpha/{bigquery_link.name=properties/*/bigQueryLinks/*}:\rbigquery_link\x12\xfb\x01\n\x1eGetEnhancedMeasurementSettings\x12\x45.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest\x1a;.google.analytics.admin.v1alpha.EnhancedMeasurementSettings\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1alpha/{name=properties/*/dataStreams/*/enhancedMeasurementSettings}\x12\xe5\x02\n!UpdateEnhancedMeasurementSettings\x12H.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest\x1a;.google.analytics.admin.v1alpha.EnhancedMeasurementSettings\"\xb8\x01\xda\x41)enhanced_measurement_settings,update_mask\x82\xd3\xe4\x93\x02\x85\x01\x32\x64/v1alpha/{enhanced_measurement_settings.name=properties/*/dataStreams/*/enhancedMeasurementSettings}:\x1d\x65nhanced_measurement_settings\x12\xce\x01\n\x16\x43reateConnectedSiteTag\x12=.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest\x1a>.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse\"5\x82\xd3\xe4\x93\x02/\"*/v1alpha/properties:createConnectedSiteTag:\x01*\x12\xa6\x01\n\x16\x44\x65leteConnectedSiteTag\x12=.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest\x1a\x16.google.protobuf.Empty\"5\x82\xd3\xe4\x93\x02/\"*/v1alpha/properties:deleteConnectedSiteTag:\x01*\x12\xca\x01\n\x15ListConnectedSiteTags\x12<.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest\x1a=.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse\"4\x82\xd3\xe4\x93\x02.\")/v1alpha/properties:listConnectedSiteTags:\x01*\x12\xd7\x01\n\x19\x46\x65tchConnectedGa4Property\x12@.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest\x1a\x41.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1alpha/properties:fetchConnectedGa4Property\x12\xb0\x01\n\x0eGetAdSenseLink\x12\x35.google.analytics.admin.v1alpha.GetAdSenseLinkRequest\x1a+.google.analytics.admin.v1alpha.AdSenseLink\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1alpha/{name=properties/*/adSenseLinks/*}\x12\xd3\x01\n\x11\x43reateAdSenseLink\x12\x38.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest\x1a+.google.analytics.admin.v1alpha.AdSenseLink\"W\xda\x41\x13parent,adsense_link\x82\xd3\xe4\x93\x02;\"+/v1alpha/{parent=properties/*}/adSenseLinks:\x0c\x61\x64sense_link\x12\xa1\x01\n\x11\x44\x65leteAdSenseLink\x12\x38.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1alpha/{name=properties/*/adSenseLinks/*}\x12\xc3\x01\n\x10ListAdSenseLinks\x12\x37.google.analytics.admin.v1alpha.ListAdSenseLinksRequest\x1a\x38.google.analytics.admin.v1alpha.ListAdSenseLinksResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1alpha/{parent=properties/*}/adSenseLinks\x12\xce\x01\n\x12GetEventCreateRule\x12\x39.google.analytics.admin.v1alpha.GetEventCreateRuleRequest\x1a/.google.analytics.admin.v1alpha.EventCreateRule\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}\x12\xe1\x01\n\x14ListEventCreateRules\x12;.google.analytics.admin.v1alpha.ListEventCreateRulesRequest\x1a<.google.analytics.admin.v1alpha.ListEventCreateRulesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules\x12\xfb\x01\n\x15\x43reateEventCreateRule\x12<.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest\x1a/.google.analytics.admin.v1alpha.EventCreateRule\"s\xda\x41\x18parent,event_create_rule\x82\xd3\xe4\x93\x02R\"=/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules:\x11\x65vent_create_rule\x12\x93\x02\n\x15UpdateEventCreateRule\x12<.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest\x1a/.google.analytics.admin.v1alpha.EventCreateRule\"\x8a\x01\xda\x41\x1d\x65vent_create_rule,update_mask\x82\xd3\xe4\x93\x02\x64\x32O/v1alpha/{event_create_rule.name=properties/*/dataStreams/*/eventCreateRules/*}:\x11\x65vent_create_rule\x12\xbb\x01\n\x15\x44\x65leteEventCreateRule\x12<.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest\x1a\x16.google.protobuf.Empty\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}\x12\xc6\x01\n\x10GetEventEditRule\x12\x37.google.analytics.admin.v1alpha.GetEventEditRuleRequest\x1a-.google.analytics.admin.v1alpha.EventEditRule\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1alpha/{name=properties/*/dataStreams/*/eventEditRules/*}\x12\xd9\x01\n\x12ListEventEditRules\x12\x39.google.analytics.admin.v1alpha.ListEventEditRulesRequest\x1a:.google.analytics.admin.v1alpha.ListEventEditRulesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1alpha/{parent=properties/*/dataStreams/*}/eventEditRules\x12\xef\x01\n\x13\x43reateEventEditRule\x12:.google.analytics.admin.v1alpha.CreateEventEditRuleRequest\x1a-.google.analytics.admin.v1alpha.EventEditRule\"m\xda\x41\x16parent,event_edit_rule\x82\xd3\xe4\x93\x02N\";/v1alpha/{parent=properties/*/dataStreams/*}/eventEditRules:\x0f\x65vent_edit_rule\x12\x85\x02\n\x13UpdateEventEditRule\x12:.google.analytics.admin.v1alpha.UpdateEventEditRuleRequest\x1a-.google.analytics.admin.v1alpha.EventEditRule\"\x82\x01\xda\x41\x1b\x65vent_edit_rule,update_mask\x82\xd3\xe4\x93\x02^2K/v1alpha/{event_edit_rule.name=properties/*/dataStreams/*/eventEditRules/*}:\x0f\x65vent_edit_rule\x12\xb5\x01\n\x13\x44\x65leteEventEditRule\x12:.google.analytics.admin.v1alpha.DeleteEventEditRuleRequest\x1a\x16.google.protobuf.Empty\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1alpha/{name=properties/*/dataStreams/*/eventEditRules/*}\x12\xbd\x01\n\x15ReorderEventEditRules\x12<.google.analytics.admin.v1alpha.ReorderEventEditRulesRequest\x1a\x16.google.protobuf.Empty\"N\x82\xd3\xe4\x93\x02H\"C/v1alpha/{parent=properties/*/dataStreams/*}/eventEditRules:reorder:\x01*\x12\xba\x02\n\x1bUpdateDataRedactionSettings\x12\x42.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.DataRedactionSettings\"\x9f\x01\xda\x41#data_redaction_settings,update_mask\x82\xd3\xe4\x93\x02s2X/v1alpha/{data_redaction_settings.name=properties/*/dataStreams/*/dataRedactionSettings}:\x17\x64\x61ta_redaction_settings\x12\xe3\x01\n\x18GetDataRedactionSettings\x12?.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest\x1a\x35.google.analytics.admin.v1alpha.DataRedactionSettings\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1alpha/{name=properties/*/dataStreams/*/dataRedactionSettings}\x12\xc4\x01\n\x13GetCalculatedMetric\x12:.google.analytics.admin.v1alpha.GetCalculatedMetricRequest\x1a\x30.google.analytics.admin.v1alpha.CalculatedMetric\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{name=properties/*/calculatedMetrics/*}\x12\x86\x02\n\x16\x43reateCalculatedMetric\x12=.google.analytics.admin.v1alpha.CreateCalculatedMetricRequest\x1a\x30.google.analytics.admin.v1alpha.CalculatedMetric\"{\xda\x41-parent,calculated_metric,calculated_metric_id\x82\xd3\xe4\x93\x02\x45\"0/v1alpha/{parent=properties/*}/calculatedMetrics:\x11\x63\x61lculated_metric\x12\xd7\x01\n\x15ListCalculatedMetrics\x12<.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest\x1a=.google.analytics.admin.v1alpha.ListCalculatedMetricsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1alpha/{parent=properties/*}/calculatedMetrics\x12\x88\x02\n\x16UpdateCalculatedMetric\x12=.google.analytics.admin.v1alpha.UpdateCalculatedMetricRequest\x1a\x30.google.analytics.admin.v1alpha.CalculatedMetric\"}\xda\x41\x1d\x63\x61lculated_metric,update_mask\x82\xd3\xe4\x93\x02W2B/v1alpha/{calculated_metric.name=properties/*/calculatedMetrics/*}:\x11\x63\x61lculated_metric\x12\xb0\x01\n\x16\x44\x65leteCalculatedMetric\x12=.google.analytics.admin.v1alpha.DeleteCalculatedMetricRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1alpha/{name=properties/*/calculatedMetrics/*}\x12\xc6\x01\n\x14\x43reateRollupProperty\x12;.google.analytics.admin.v1alpha.CreateRollupPropertyRequest\x1a<.google.analytics.admin.v1alpha.CreateRollupPropertyResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1alpha/properties:createRollupProperty:\x01*\x12\xe4\x01\n\x1bGetRollupPropertySourceLink\x12\x42.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest\x1a\x38.google.analytics.admin.v1alpha.RollupPropertySourceLink\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1alpha/{name=properties/*/rollupPropertySourceLinks/*}\x12\xf7\x01\n\x1dListRollupPropertySourceLinks\x12\x44.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest\x1a\x45.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1alpha/{parent=properties/*}/rollupPropertySourceLinks\x12\xa6\x02\n\x1e\x43reateRollupPropertySourceLink\x12\x45.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest\x1a\x38.google.analytics.admin.v1alpha.RollupPropertySourceLink\"\x82\x01\xda\x41\"parent,rollup_property_source_link\x82\xd3\xe4\x93\x02W\"8/v1alpha/{parent=properties/*}/rollupPropertySourceLinks:\x1brollup_property_source_link\x12\xc8\x01\n\x1e\x44\x65leteRollupPropertySourceLink\x12\x45.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1alpha/{name=properties/*/rollupPropertySourceLinks/*}\x12\xc6\x01\n\x14ProvisionSubproperty\x12;.google.analytics.admin.v1alpha.ProvisionSubpropertyRequest\x1a<.google.analytics.admin.v1alpha.ProvisionSubpropertyResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1alpha/properties:provisionSubproperty:\x01*\x12\x97\x02\n\x1c\x43reateSubpropertyEventFilter\x12\x43.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest\x1a\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\"z\xda\x41\x1fparent,subproperty_event_filter\x82\xd3\xe4\x93\x02R\"6/v1alpha/{parent=properties/*}/subpropertyEventFilters:\x18subproperty_event_filter\x12\xdc\x01\n\x19GetSubpropertyEventFilter\x12@.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest\x1a\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1alpha/{name=properties/*/subpropertyEventFilters/*}\x12\xef\x01\n\x1bListSubpropertyEventFilters\x12\x42.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest\x1a\x43.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1alpha/{parent=properties/*}/subpropertyEventFilters\x12\xb6\x02\n\x1cUpdateSubpropertyEventFilter\x12\x43.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest\x1a\x36.google.analytics.admin.v1alpha.SubpropertyEventFilter\"\x98\x01\xda\x41$subproperty_event_filter,update_mask\x82\xd3\xe4\x93\x02k2O/v1alpha/{subproperty_event_filter.name=properties/*/subpropertyEventFilters/*}:\x18subproperty_event_filter\x12\xc2\x01\n\x1c\x44\x65leteSubpropertyEventFilter\x12\x43.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1alpha/{name=properties/*/subpropertyEventFilters/*}\x12\x9d\x02\n\x1d\x43reateReportingDataAnnotation\x12\x44.google.analytics.admin.v1alpha.CreateReportingDataAnnotationRequest\x1a\x37.google.analytics.admin.v1alpha.ReportingDataAnnotation\"}\xda\x41 parent,reporting_data_annotation\x82\xd3\xe4\x93\x02T\"7/v1alpha/{parent=properties/*}/reportingDataAnnotations:\x19reporting_data_annotation\x12\xe0\x01\n\x1aGetReportingDataAnnotation\x12\x41.google.analytics.admin.v1alpha.GetReportingDataAnnotationRequest\x1a\x37.google.analytics.admin.v1alpha.ReportingDataAnnotation\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1alpha/{name=properties/*/reportingDataAnnotations/*}\x12\xf3\x01\n\x1cListReportingDataAnnotations\x12\x43.google.analytics.admin.v1alpha.ListReportingDataAnnotationsRequest\x1a\x44.google.analytics.admin.v1alpha.ListReportingDataAnnotationsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1alpha/{parent=properties/*}/reportingDataAnnotations\x12\xbd\x02\n\x1dUpdateReportingDataAnnotation\x12\x44.google.analytics.admin.v1alpha.UpdateReportingDataAnnotationRequest\x1a\x37.google.analytics.admin.v1alpha.ReportingDataAnnotation\"\x9c\x01\xda\x41%reporting_data_annotation,update_mask\x82\xd3\xe4\x93\x02n2Q/v1alpha/{reporting_data_annotation.name=properties/*/reportingDataAnnotations/*}:\x19reporting_data_annotation\x12\xc5\x01\n\x1d\x44\x65leteReportingDataAnnotation\x12\x44.google.analytics.admin.v1alpha.DeleteReportingDataAnnotationRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1alpha/{name=properties/*/reportingDataAnnotations/*}\x12\xce\x01\n\x12SubmitUserDeletion\x12\x39.google.analytics.admin.v1alpha.SubmitUserDeletionRequest\x1a:.google.analytics.admin.v1alpha.SubmitUserDeletionResponse\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\"//v1alpha/{name=properties/*}:submitUserDeletion:\x01*\x12\xeb\x01\n\x1aListSubpropertySyncConfigs\x12\x41.google.analytics.admin.v1alpha.ListSubpropertySyncConfigsRequest\x1a\x42.google.analytics.admin.v1alpha.ListSubpropertySyncConfigsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1alpha/{parent=properties/*}/subpropertySyncConfigs\x12\xaf\x02\n\x1bUpdateSubpropertySyncConfig\x12\x42.google.analytics.admin.v1alpha.UpdateSubpropertySyncConfigRequest\x1a\x35.google.analytics.admin.v1alpha.SubpropertySyncConfig\"\x94\x01\xda\x41#subproperty_sync_config,update_mask\x82\xd3\xe4\x93\x02h2M/v1alpha/{subproperty_sync_config.name=properties/*/subpropertySyncConfigs/*}:\x17subproperty_sync_config\x12\xd8\x01\n\x18GetSubpropertySyncConfig\x12?.google.analytics.admin.v1alpha.GetSubpropertySyncConfigRequest\x1a\x35.google.analytics.admin.v1alpha.SubpropertySyncConfig\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1alpha/{name=properties/*/subpropertySyncConfigs/*}\x1a\xfc\x01\xca\x41\x1d\x61nalyticsadmin.googleapis.com\xd2\x41\xd8\x01https://www.googleapis.com/auth/analytics.edit,https://www.googleapis.com/auth/analytics.manage.users,https://www.googleapis.com/auth/analytics.manage.users.readonly,https://www.googleapis.com/auth/analytics.readonlyB{\n\"com.google.analytics.admin.v1alphaB\x13\x41nalyticsAdminProtoP\x01Z>cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -258,6 +258,10 @@ module V1alpha DeleteReportingDataAnnotationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.DeleteReportingDataAnnotationRequest").msgclass SubmitUserDeletionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.SubmitUserDeletionRequest").msgclass SubmitUserDeletionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.SubmitUserDeletionResponse").msgclass + GetSubpropertySyncConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.GetSubpropertySyncConfigRequest").msgclass + ListSubpropertySyncConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ListSubpropertySyncConfigsRequest").msgclass + ListSubpropertySyncConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ListSubpropertySyncConfigsResponse").msgclass + UpdateSubpropertySyncConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.UpdateSubpropertySyncConfigRequest").msgclass end end end diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb index a5914bdfc5f4..3770d70933b4 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb @@ -13427,7 +13427,7 @@ def delete_rollup_property_source_link request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload provision_subproperty(subproperty: nil, subproperty_event_filter: nil) + # @overload provision_subproperty(subproperty: nil, subproperty_event_filter: nil, custom_dimension_and_metric_synchronization_mode: nil) # Pass arguments to `provision_subproperty` 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). @@ -13436,6 +13436,9 @@ def delete_rollup_property_source_link request, options = nil # Required. The subproperty to create. # @param subproperty_event_filter [::Google::Analytics::Admin::V1alpha::SubpropertyEventFilter, ::Hash] # Optional. The subproperty event filter to create on an ordinary property. + # @param custom_dimension_and_metric_synchronization_mode [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig::SynchronizationMode] + # Optional. The subproperty feature synchronization mode for Custom + # Dimensions and Metrics # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyResponse] @@ -14560,6 +14563,288 @@ def submit_user_deletion request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # List all Subproperty Sync Configs on a property. + # + # @overload list_subproperty_sync_configs(request, options = nil) + # Pass arguments to `list_subproperty_sync_configs` via a request object, either of type + # {::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest, ::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_subproperty_sync_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_subproperty_sync_configs` 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. Resource name of the property. + # Format: properties/property_id + # Example: properties/123 + # @param page_size [::Integer] + # Optional. The maximum number of resources to return. The service may return + # fewer than this value, even if there are additional pages. If unspecified, + # at most 50 resources will be returned. The maximum value is 200; (higher + # values will be coerced to the maximum) + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListSubpropertySyncConfig` call. Provide this to retrieve the subsequent + # page. When paginating, all other parameters provided to + # `ListSubpropertySyncConfig` 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::Analytics::Admin::V1alpha::SubpropertySyncConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/analytics/admin/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest.new + # + # # Call the list_subproperty_sync_configs method. + # result = client.list_subproperty_sync_configs 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::Analytics::Admin::V1alpha::SubpropertySyncConfig. + # p item + # end + # + def list_subproperty_sync_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest + + # 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_subproperty_sync_configs.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::Analytics::Admin::V1alpha::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_subproperty_sync_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_subproperty_sync_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_admin_service_stub.call_rpc :list_subproperty_sync_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_subproperty_sync_configs, 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 + + ## + # Updates a Subproperty Sync Config. + # + # @overload update_subproperty_sync_config(request, options = nil) + # Pass arguments to `update_subproperty_sync_config` via a request object, either of type + # {::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest, ::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 update_subproperty_sync_config(subproperty_sync_config: nil, update_mask: nil) + # Pass arguments to `update_subproperty_sync_config` 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 subproperty_sync_config [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig, ::Hash] + # Required. The SubpropertySyncConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. Field names must be in snake case + # (for example, "field_to_update"). Omitted fields will not be updated. To + # replace the entire entity, use one path with the string "*" to match all + # fields. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/analytics/admin/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest.new + # + # # Call the update_subproperty_sync_config method. + # result = client.update_subproperty_sync_config request + # + # # The returned object is of type Google::Analytics::Admin::V1alpha::SubpropertySyncConfig. + # p result + # + def update_subproperty_sync_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest + + # 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.update_subproperty_sync_config.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::Analytics::Admin::V1alpha::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.subproperty_sync_config&.name + header_params["subproperty_sync_config.name"] = request.subproperty_sync_config.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.update_subproperty_sync_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_subproperty_sync_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_admin_service_stub.call_rpc :update_subproperty_sync_config, 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 + + ## + # Lookup for a single Subproperty Sync Config. + # + # @overload get_subproperty_sync_config(request, options = nil) + # Pass arguments to `get_subproperty_sync_config` via a request object, either of type + # {::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest, ::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_subproperty_sync_config(name: nil) + # Pass arguments to `get_subproperty_sync_config` 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. Resource name of the SubpropertySyncConfig to lookup. + # Format: + # properties/\\{ordinary_property_id}/subpropertySyncConfigs/\\{subproperty_id} + # Example: properties/1234/subpropertySyncConfigs/5678 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/analytics/admin/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest.new + # + # # Call the get_subproperty_sync_config method. + # result = client.get_subproperty_sync_config request + # + # # The returned object is of type Google::Analytics::Admin::V1alpha::SubpropertySyncConfig. + # p result + # + def get_subproperty_sync_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest + + # 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_subproperty_sync_config.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::Analytics::Admin::V1alpha::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_subproperty_sync_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_subproperty_sync_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_admin_service_stub.call_rpc :get_subproperty_sync_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the AnalyticsAdminService API. # @@ -15506,6 +15791,21 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :submit_user_deletion + ## + # RPC-specific configuration for `list_subproperty_sync_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subproperty_sync_configs + ## + # RPC-specific configuration for `update_subproperty_sync_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_subproperty_sync_config + ## + # RPC-specific configuration for `get_subproperty_sync_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_subproperty_sync_config # @private def initialize parent_rpcs = nil @@ -15821,6 +16121,12 @@ def initialize parent_rpcs = nil @delete_reporting_data_annotation = ::Gapic::Config::Method.new delete_reporting_data_annotation_config submit_user_deletion_config = parent_rpcs.submit_user_deletion if parent_rpcs.respond_to? :submit_user_deletion @submit_user_deletion = ::Gapic::Config::Method.new submit_user_deletion_config + list_subproperty_sync_configs_config = parent_rpcs.list_subproperty_sync_configs if parent_rpcs.respond_to? :list_subproperty_sync_configs + @list_subproperty_sync_configs = ::Gapic::Config::Method.new list_subproperty_sync_configs_config + update_subproperty_sync_config_config = parent_rpcs.update_subproperty_sync_config if parent_rpcs.respond_to? :update_subproperty_sync_config + @update_subproperty_sync_config = ::Gapic::Config::Method.new update_subproperty_sync_config_config + get_subproperty_sync_config_config = parent_rpcs.get_subproperty_sync_config if parent_rpcs.respond_to? :get_subproperty_sync_config + @get_subproperty_sync_config = ::Gapic::Config::Method.new get_subproperty_sync_config_config yield self if block_given? end diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb index a68b31227248..c5fa70222bce 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb @@ -611,6 +611,23 @@ def subproperty_event_filter_path property:, sub_property_event_filter: "properties/#{property}/subpropertyEventFilters/#{sub_property_event_filter}" end + ## + # Create a fully-qualified SubpropertySyncConfig resource string. + # + # The resource will be in the following format: + # + # `properties/{property}/subpropertySyncConfigs/{subproperty_sync_config}` + # + # @param property [String] + # @param subproperty_sync_config [String] + # + # @return [::String] + def subproperty_sync_config_path property:, subproperty_sync_config: + raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/" + + "properties/#{property}/subpropertySyncConfigs/#{subproperty_sync_config}" + end + extend self end end diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb index 460f9f75721f..a623dfeff35f 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb @@ -12498,7 +12498,7 @@ def delete_rollup_property_source_link request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload provision_subproperty(subproperty: nil, subproperty_event_filter: nil) + # @overload provision_subproperty(subproperty: nil, subproperty_event_filter: nil, custom_dimension_and_metric_synchronization_mode: nil) # Pass arguments to `provision_subproperty` 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). @@ -12507,6 +12507,9 @@ def delete_rollup_property_source_link request, options = nil # Required. The subproperty to create. # @param subproperty_event_filter [::Google::Analytics::Admin::V1alpha::SubpropertyEventFilter, ::Hash] # Optional. The subproperty event filter to create on an ordinary property. + # @param custom_dimension_and_metric_synchronization_mode [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig::SynchronizationMode] + # Optional. The subproperty feature synchronization mode for Custom + # Dimensions and Metrics # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -13555,6 +13558,267 @@ def submit_user_deletion request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # List all Subproperty Sync Configs on a property. + # + # @overload list_subproperty_sync_configs(request, options = nil) + # Pass arguments to `list_subproperty_sync_configs` via a request object, either of type + # {::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest, ::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_subproperty_sync_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_subproperty_sync_configs` 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. Resource name of the property. + # Format: properties/property_id + # Example: properties/123 + # @param page_size [::Integer] + # Optional. The maximum number of resources to return. The service may return + # fewer than this value, even if there are additional pages. If unspecified, + # at most 50 resources will be returned. The maximum value is 200; (higher + # values will be coerced to the maximum) + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListSubpropertySyncConfig` call. Provide this to retrieve the subsequent + # page. When paginating, all other parameters provided to + # `ListSubpropertySyncConfig` 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::Analytics::Admin::V1alpha::SubpropertySyncConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/analytics/admin/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest.new + # + # # Call the list_subproperty_sync_configs method. + # result = client.list_subproperty_sync_configs 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::Analytics::Admin::V1alpha::SubpropertySyncConfig. + # p item + # end + # + def list_subproperty_sync_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest + + # 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_subproperty_sync_configs.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::Analytics::Admin::V1alpha::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_subproperty_sync_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_subproperty_sync_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_admin_service_stub.list_subproperty_sync_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_admin_service_stub, :list_subproperty_sync_configs, "subproperty_sync_configs", 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 + + ## + # Updates a Subproperty Sync Config. + # + # @overload update_subproperty_sync_config(request, options = nil) + # Pass arguments to `update_subproperty_sync_config` via a request object, either of type + # {::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest, ::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 update_subproperty_sync_config(subproperty_sync_config: nil, update_mask: nil) + # Pass arguments to `update_subproperty_sync_config` 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 subproperty_sync_config [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig, ::Hash] + # Required. The SubpropertySyncConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. Field names must be in snake case + # (for example, "field_to_update"). Omitted fields will not be updated. To + # replace the entire entity, use one path with the string "*" to match all + # fields. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/analytics/admin/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest.new + # + # # Call the update_subproperty_sync_config method. + # result = client.update_subproperty_sync_config request + # + # # The returned object is of type Google::Analytics::Admin::V1alpha::SubpropertySyncConfig. + # p result + # + def update_subproperty_sync_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest + + # 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.update_subproperty_sync_config.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::Analytics::Admin::V1alpha::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.update_subproperty_sync_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_subproperty_sync_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_admin_service_stub.update_subproperty_sync_config 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 + + ## + # Lookup for a single Subproperty Sync Config. + # + # @overload get_subproperty_sync_config(request, options = nil) + # Pass arguments to `get_subproperty_sync_config` via a request object, either of type + # {::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest, ::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_subproperty_sync_config(name: nil) + # Pass arguments to `get_subproperty_sync_config` 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. Resource name of the SubpropertySyncConfig to lookup. + # Format: + # properties/\\{ordinary_property_id}/subpropertySyncConfigs/\\{subproperty_id} + # Example: properties/1234/subpropertySyncConfigs/5678 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/analytics/admin/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest.new + # + # # Call the get_subproperty_sync_config method. + # result = client.get_subproperty_sync_config request + # + # # The returned object is of type Google::Analytics::Admin::V1alpha::SubpropertySyncConfig. + # p result + # + def get_subproperty_sync_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest + + # 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_subproperty_sync_config.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::Analytics::Admin::V1alpha::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_subproperty_sync_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_subproperty_sync_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_admin_service_stub.get_subproperty_sync_config 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 + ## # Configuration class for the AnalyticsAdminService REST API. # @@ -14481,6 +14745,21 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :submit_user_deletion + ## + # RPC-specific configuration for `list_subproperty_sync_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subproperty_sync_configs + ## + # RPC-specific configuration for `update_subproperty_sync_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_subproperty_sync_config + ## + # RPC-specific configuration for `get_subproperty_sync_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_subproperty_sync_config # @private def initialize parent_rpcs = nil @@ -14796,6 +15075,12 @@ def initialize parent_rpcs = nil @delete_reporting_data_annotation = ::Gapic::Config::Method.new delete_reporting_data_annotation_config submit_user_deletion_config = parent_rpcs.submit_user_deletion if parent_rpcs.respond_to? :submit_user_deletion @submit_user_deletion = ::Gapic::Config::Method.new submit_user_deletion_config + list_subproperty_sync_configs_config = parent_rpcs.list_subproperty_sync_configs if parent_rpcs.respond_to? :list_subproperty_sync_configs + @list_subproperty_sync_configs = ::Gapic::Config::Method.new list_subproperty_sync_configs_config + update_subproperty_sync_config_config = parent_rpcs.update_subproperty_sync_config if parent_rpcs.respond_to? :update_subproperty_sync_config + @update_subproperty_sync_config = ::Gapic::Config::Method.new update_subproperty_sync_config_config + get_subproperty_sync_config_config = parent_rpcs.get_subproperty_sync_config if parent_rpcs.respond_to? :get_subproperty_sync_config + @get_subproperty_sync_config = ::Gapic::Config::Method.new get_subproperty_sync_config_config yield self if block_given? end diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/service_stub.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/service_stub.rb index 151795e5daef..0ad9ef629397 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/service_stub.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/service_stub.rb @@ -6313,6 +6313,126 @@ def submit_user_deletion request_pb, options = nil end end + ## + # Baseline implementation for the list_subproperty_sync_configs REST call + # + # @param request_pb [::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest] + # 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::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsResponse] + # A result object deserialized from the server's reply + def list_subproperty_sync_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_subproperty_sync_configs_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_subproperty_sync_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_subproperty_sync_config REST call + # + # @param request_pb [::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest] + # 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::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # A result object deserialized from the server's reply + def update_subproperty_sync_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_subproperty_sync_config_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: "update_subproperty_sync_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.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_subproperty_sync_config REST call + # + # @param request_pb [::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest] + # 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::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # A result object deserialized from the server's reply + def get_subproperty_sync_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_subproperty_sync_config_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_subproperty_sync_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -9711,6 +9831,70 @@ def self.transcode_submit_user_deletion_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the list_subproperty_sync_configs REST call + # + # @param request_pb [::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest] + # 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_subproperty_sync_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{parent}/subpropertySyncConfigs", + matches: [ + ["parent", %r{^properties/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_subproperty_sync_config REST call + # + # @param request_pb [::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_subproperty_sync_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1alpha/{subproperty_sync_config.name}", + body: "subproperty_sync_config", + matches: [ + ["subproperty_sync_config.name", %r{^properties/[^/]+/subpropertySyncConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_subproperty_sync_config REST call + # + # @param request_pb [::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest] + # 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_subproperty_sync_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^properties/[^/]+/subpropertySyncConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_services_pb.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_services_pb.rb index 5c5d5ffbf054..65695e3c6c26 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_services_pb.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_services_pb.rb @@ -459,6 +459,12 @@ class Service rpc :DeleteReportingDataAnnotation, ::Google::Analytics::Admin::V1alpha::DeleteReportingDataAnnotationRequest, ::Google::Protobuf::Empty # Submits a request for user deletion for a property. rpc :SubmitUserDeletion, ::Google::Analytics::Admin::V1alpha::SubmitUserDeletionRequest, ::Google::Analytics::Admin::V1alpha::SubmitUserDeletionResponse + # List all Subproperty Sync Configs on a property. + rpc :ListSubpropertySyncConfigs, ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest, ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsResponse + # Updates a Subproperty Sync Config. + rpc :UpdateSubpropertySyncConfig, ::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest, ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig + # Lookup for a single Subproperty Sync Config. + rpc :GetSubpropertySyncConfig, ::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest, ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig end Stub = Service.rpc_stub_class diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/resources_pb.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/resources_pb.rb index db0bbb3881ef..e2eb5c2db483 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/resources_pb.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/resources_pb.rb @@ -15,7 +15,7 @@ require 'google/type/date_pb' -descriptor_data = "\n.google/analytics/admin/v1alpha/resources.proto\x12\x1egoogle.analytics.admin.v1alpha\x1a-google/analytics/admin/v1alpha/audience.proto\x1a\x32google/analytics/admin/v1alpha/channel_group.proto\x1a:google/analytics/admin/v1alpha/event_create_and_edit.proto\x1a\x36google/analytics/admin/v1alpha/expanded_data_set.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x16google/type/date.proto\"\xe4\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x05 \x01(\t\x12\x14\n\x07\x64\x65leted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12T\n\x10gmp_organization\x18\x07 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2marketingplatformadmin.googleapis.com/Organization:>\xea\x41;\n%analyticsadmin.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\"\xb9\x05\n\x08Property\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12H\n\rproperty_type\x18\x0e \x01(\x0e\x32,.google.analytics.admin.v1alpha.PropertyTypeB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06parent\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12K\n\x11industry_category\x18\x06 \x01(\x0e\x32\x30.google.analytics.admin.v1alpha.IndustryCategory\x12\x16\n\ttime_zone\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rcurrency_code\x18\x08 \x01(\t\x12H\n\rservice_level\x18\n \x01(\x0e\x32,.google.analytics.admin.v1alpha.ServiceLevelB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x07\x61\x63\x63ount\x18\r \x01(\tB-\xe0\x41\x05\xfa\x41\'\n%analyticsadmin.googleapis.com/Account:B\xea\x41?\n&analyticsadmin.googleapis.com/Property\x12\x15properties/{property}\"\xf4\x07\n\nDataStream\x12S\n\x0fweb_stream_data\x18\x06 \x01(\x0b\x32\x38.google.analytics.admin.v1alpha.DataStream.WebStreamDataH\x00\x12\x62\n\x17\x61ndroid_app_stream_data\x18\x07 \x01(\x0b\x32?.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamDataH\x00\x12Z\n\x13ios_app_stream_data\x18\x08 \x01(\x0b\x32;.google.analytics.admin.v1alpha.DataStream.IosAppStreamDataH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12O\n\x04type\x18\x02 \x01(\x0e\x32\x39.google.analytics.admin.v1alpha.DataStream.DataStreamTypeB\x06\xe0\x41\x05\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a_\n\rWebStreamData\x12\x1b\n\x0emeasurement_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0f\x66irebase_app_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65\x66\x61ult_uri\x18\x03 \x01(\t\x1aO\n\x14\x41ndroidAppStreamData\x12\x1c\n\x0f\x66irebase_app_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x1aK\n\x10IosAppStreamData\x12\x1c\n\x0f\x66irebase_app_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\tbundle_id\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\"}\n\x0e\x44\x61taStreamType\x12 \n\x1c\x44\x41TA_STREAM_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fWEB_DATA_STREAM\x10\x01\x12\x1b\n\x17\x41NDROID_APP_DATA_STREAM\x10\x02\x12\x17\n\x13IOS_APP_DATA_STREAM\x10\x03:^\xea\x41[\n(analyticsadmin.googleapis.com/DataStream\x12/properties/{property}/dataStreams/{data_stream}B\r\n\x0bstream_data\"\xd3\x01\n\x0c\x46irebaseLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07project\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:d\xea\x41\x61\n*analyticsadmin.googleapis.com/FirebaseLink\x12\x33properties/{property}/firebaseLinks/{firebase_link}\"\xa9\x01\n\rGlobalSiteTag\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07snippet\x18\x02 \x01(\tB\x03\xe0\x41\x05:o\xea\x41l\n+analyticsadmin.googleapis.com/GlobalSiteTag\x12=properties/{property}/dataStreams/{data_stream}/globalSiteTag\"\x98\x03\n\rGoogleAdsLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x63ustomer_id\x18\x03 \x01(\tB\x03\xe0\x41\x05\x12\x1f\n\x12\x63\x61n_manage_clients\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x1b\x61\x64s_personalization_enabled\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\"\n\x15\x63reator_email_address\x18\t \x01(\tB\x03\xe0\x41\x03:h\xea\x41\x65\n+analyticsadmin.googleapis.com/GoogleAdsLink\x12\x36properties/{property}/googleAdsLinks/{google_ads_link}\"\xef\x02\n\x13\x44\x61taSharingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12+\n#sharing_with_google_support_enabled\x18\x02 \x01(\x08\x12\x32\n*sharing_with_google_assigned_sales_enabled\x18\x03 \x01(\x08\x12\x31\n%sharing_with_google_any_sales_enabled\x18\x04 \x01(\x08\x42\x02\x18\x01\x12,\n$sharing_with_google_products_enabled\x18\x05 \x01(\x08\x12#\n\x1bsharing_with_others_enabled\x18\x06 \x01(\x08:^\xea\x41[\n1analyticsadmin.googleapis.com/DataSharingSettings\x12&accounts/{account}/dataSharingSettings\"\x95\x02\n\x0e\x41\x63\x63ountSummary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xfa\x41\'\n%analyticsadmin.googleapis.com/Account\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12K\n\x12property_summaries\x18\x04 \x03(\x0b\x32/.google.analytics.admin.v1alpha.PropertySummary:U\xea\x41R\n,analyticsadmin.googleapis.com/AccountSummary\x12\"accountSummaries/{account_summary}\"\xbb\x01\n\x0fPropertySummary\x12=\n\x08property\x18\x01 \x01(\tB+\xfa\x41(\n&analyticsadmin.googleapis.com/Property\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x43\n\rproperty_type\x18\x03 \x01(\x0e\x32,.google.analytics.admin.v1alpha.PropertyType\x12\x0e\n\x06parent\x18\x04 \x01(\t\"\x8e\x02\n\x19MeasurementProtocolSecret\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0csecret_value\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xa7\x01\xea\x41\xa3\x01\n7analyticsadmin.googleapis.com/MeasurementProtocolSecret\x12hproperties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}\"\x83\x04\n SKAdNetworkConversionValueSchema\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12P\n\x13postback_window_one\x18\x02 \x01(\x0b\x32..google.analytics.admin.v1alpha.PostbackWindowB\x03\xe0\x41\x02\x12K\n\x13postback_window_two\x18\x03 \x01(\x0b\x32..google.analytics.admin.v1alpha.PostbackWindow\x12M\n\x15postback_window_three\x18\x04 \x01(\x0b\x32..google.analytics.admin.v1alpha.PostbackWindow\x12\x1f\n\x17\x61pply_conversion_values\x18\x05 \x01(\x08:\xbc\x01\xea\x41\xb8\x01\n>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\x12vproperties/{property}/dataStreams/{data_stream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}\"\x87\x01\n\x0ePostbackWindow\x12K\n\x11\x63onversion_values\x18\x01 \x03(\x0b\x32\x30.google.analytics.admin.v1alpha.ConversionValues\x12(\n postback_window_settings_enabled\x18\x02 \x01(\x08\"\xf4\x01\n\x10\x43onversionValues\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x17\n\nfine_value\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x46\n\x0c\x63oarse_value\x18\x03 \x01(\x0e\x32+.google.analytics.admin.v1alpha.CoarseValueB\x03\xe0\x41\x02\x12\x44\n\x0e\x65vent_mappings\x18\x04 \x03(\x0b\x32,.google.analytics.admin.v1alpha.EventMapping\x12\x14\n\x0clock_enabled\x18\x05 \x01(\x08\x42\r\n\x0b_fine_value\"\xef\x01\n\x0c\x45ventMapping\x12\x17\n\nevent_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0fmin_event_count\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1c\n\x0fmax_event_count\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x1c\n\x0fmin_event_value\x18\x04 \x01(\x01H\x02\x88\x01\x01\x12\x1c\n\x0fmax_event_value\x18\x05 \x01(\x01H\x03\x88\x01\x01\x42\x12\n\x10_min_event_countB\x12\n\x10_max_event_countB\x12\n\x10_min_event_valueB\x12\n\x10_max_event_value\"\x8a\x02\n\x12\x43hangeHistoryEvent\x12\n\n\x02id\x18\x01 \x01(\t\x12/\n\x0b\x63hange_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12=\n\nactor_type\x18\x03 \x01(\x0e\x32).google.analytics.admin.v1alpha.ActorType\x12\x18\n\x10user_actor_email\x18\x04 \x01(\t\x12\x18\n\x10\x63hanges_filtered\x18\x05 \x01(\x08\x12\x44\n\x07\x63hanges\x18\x06 \x03(\x0b\x32\x33.google.analytics.admin.v1alpha.ChangeHistoryChange\"\xfc\x13\n\x13\x43hangeHistoryChange\x12\x10\n\x08resource\x18\x01 \x01(\t\x12:\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32*.google.analytics.admin.v1alpha.ActionType\x12i\n\x16resource_before_change\x18\x03 \x01(\x0b\x32I.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource\x12h\n\x15resource_after_change\x18\x04 \x01(\x0b\x32I.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource\x1a\xc1\x11\n\x15\x43hangeHistoryResource\x12:\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\'.google.analytics.admin.v1alpha.AccountH\x00\x12<\n\x08property\x18\x02 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyH\x00\x12\x45\n\rfirebase_link\x18\x06 \x01(\x0b\x32,.google.analytics.admin.v1alpha.FirebaseLinkH\x00\x12H\n\x0fgoogle_ads_link\x18\x07 \x01(\x0b\x32-.google.analytics.admin.v1alpha.GoogleAdsLinkH\x00\x12X\n\x17google_signals_settings\x18\x08 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.GoogleSignalsSettingsH\x00\x12j\n!display_video_360_advertiser_link\x18\t \x01(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkH\x00\x12{\n*display_video_360_advertiser_link_proposal\x18\n \x01(\x0b\x32\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposalH\x00\x12K\n\x10\x63onversion_event\x18\x0b \x01(\x0b\x32/.google.analytics.admin.v1alpha.ConversionEventH\x00\x12`\n\x1bmeasurement_protocol_secret\x18\x0c \x01(\x0b\x32\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecretH\x00\x12K\n\x10\x63ustom_dimension\x18\r \x01(\x0b\x32/.google.analytics.admin.v1alpha.CustomDimensionH\x00\x12\x45\n\rcustom_metric\x18\x0e \x01(\x0b\x32,.google.analytics.admin.v1alpha.CustomMetricH\x00\x12X\n\x17\x64\x61ta_retention_settings\x18\x0f \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.DataRetentionSettingsH\x00\x12O\n\x13search_ads_360_link\x18\x10 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.SearchAds360LinkH\x00\x12\x41\n\x0b\x64\x61ta_stream\x18\x12 \x01(\x0b\x32*.google.analytics.admin.v1alpha.DataStreamH\x00\x12S\n\x14\x61ttribution_settings\x18\x14 \x01(\x0b\x32\x33.google.analytics.admin.v1alpha.AttributionSettingsH\x00\x12L\n\x11\x65xpanded_data_set\x18\x15 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ExpandedDataSetH\x00\x12\x45\n\rchannel_group\x18\x16 \x01(\x0b\x32,.google.analytics.admin.v1alpha.ChannelGroupH\x00\x12\x45\n\rbigquery_link\x18\x17 \x01(\x0b\x32,.google.analytics.admin.v1alpha.BigQueryLinkH\x00\x12\x64\n\x1d\x65nhanced_measurement_settings\x18\x18 \x01(\x0b\x32;.google.analytics.admin.v1alpha.EnhancedMeasurementSettingsH\x00\x12X\n\x17\x64\x61ta_redaction_settings\x18\x19 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.DataRedactionSettingsH\x00\x12o\n#skadnetwork_conversion_value_schema\x18\x1a \x01(\x0b\x32@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchemaH\x00\x12\x43\n\x0c\x61\x64sense_link\x18\x1b \x01(\x0b\x32+.google.analytics.admin.v1alpha.AdSenseLinkH\x00\x12<\n\x08\x61udience\x18\x1c \x01(\x0b\x32(.google.analytics.admin.v1alpha.AudienceH\x00\x12L\n\x11\x65vent_create_rule\x18\x1d \x01(\x0b\x32/.google.analytics.admin.v1alpha.EventCreateRuleH\x00\x12=\n\tkey_event\x18\x1e \x01(\x0b\x32(.google.analytics.admin.v1alpha.KeyEventH\x00\x12M\n\x11\x63\x61lculated_metric\x18\x1f \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.CalculatedMetricH\x00\x12\\\n\x19reporting_data_annotation\x18 \x01(\x0b\x32\x37.google.analytics.admin.v1alpha.ReportingDataAnnotationH\x00\x42\n\n\x08resource\"\xdf\x03\n\x1d\x44isplayVideo360AdvertiserLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\radvertiser_id\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12$\n\x17\x61\x64vertiser_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x1b\x61\x64s_personalization_enabled\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x46\n\x1d\x63\x61mpaign_data_sharing_enabled\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12\x42\n\x19\x63ost_data_sharing_enabled\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05:\x9b\x01\xea\x41\x97\x01\n;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\x12Xproperties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}\"\x8a\x05\n%DisplayVideo360AdvertiserLinkProposal\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\radvertiser_id\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x64\n\x1clink_proposal_status_details\x18\x03 \x01(\x0b\x32\x39.google.analytics.admin.v1alpha.LinkProposalStatusDetailsB\x03\xe0\x41\x03\x12$\n\x17\x61\x64vertiser_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10validation_email\x18\x05 \x01(\tB\x03\xe0\x41\x04\x12\x44\n\x1b\x61\x64s_personalization_enabled\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12\x46\n\x1d\x63\x61mpaign_data_sharing_enabled\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12\x42\n\x19\x63ost_data_sharing_enabled\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05:\xb4\x01\xea\x41\xb0\x01\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\x12iproperties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}\"\xe8\x03\n\x10SearchAds360Link\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\radvertiser_id\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x46\n\x1d\x63\x61mpaign_data_sharing_enabled\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12\x42\n\x19\x63ost_data_sharing_enabled\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12$\n\x17\x61\x64vertiser_display_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12?\n\x1b\x61\x64s_personalization_enabled\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x1asite_stats_sharing_enabled\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.BoolValue:r\xea\x41o\n.analyticsadmin.googleapis.com/SearchAds360Link\x12=properties/{property}/searchAds360Links/{search_ads_360_link}\"\xfc\x01\n\x19LinkProposalStatusDetails\x12l\n link_proposal_initiating_product\x18\x01 \x01(\x0e\x32=.google.analytics.admin.v1alpha.LinkProposalInitiatingProductB\x03\xe0\x41\x03\x12\x1c\n\x0frequestor_email\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\x13link_proposal_state\x18\x03 \x01(\x0e\x32\x31.google.analytics.admin.v1alpha.LinkProposalStateB\x03\xe0\x41\x03\"\xe0\x05\n\x0f\x43onversionEvent\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nevent_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tdeletable\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06\x63ustom\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x66\n\x0f\x63ounting_method\x18\x06 \x01(\x0e\x32H.google.analytics.admin.v1alpha.ConversionEvent.ConversionCountingMethodB\x03\xe0\x41\x01\x12r\n\x18\x64\x65\x66\x61ult_conversion_value\x18\x07 \x01(\x0b\x32\x46.google.analytics.admin.v1alpha.ConversionEvent.DefaultConversionValueB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x64\n\x16\x44\x65\x66\x61ultConversionValue\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x1a\n\rcurrency_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_valueB\x10\n\x0e_currency_code\"p\n\x18\x43onversionCountingMethod\x12*\n&CONVERSION_COUNTING_METHOD_UNSPECIFIED\x10\x00\x12\x12\n\x0eONCE_PER_EVENT\x10\x01\x12\x14\n\x10ONCE_PER_SESSION\x10\x02:m\xea\x41j\n-analyticsadmin.googleapis.com/ConversionEvent\x12\x39properties/{property}/conversionEvents/{conversion_event}B\x1b\n\x19_default_conversion_value\"\xd7\x04\n\x08KeyEvent\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nevent_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tdeletable\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06\x63ustom\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12U\n\x0f\x63ounting_method\x18\x06 \x01(\x0e\x32\x37.google.analytics.admin.v1alpha.KeyEvent.CountingMethodB\x03\xe0\x41\x02\x12Q\n\rdefault_value\x18\x07 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.KeyEvent.DefaultValueB\x03\xe0\x41\x01\x1a\x46\n\x0c\x44\x65\x66\x61ultValue\x12\x1a\n\rnumeric_value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"[\n\x0e\x43ountingMethod\x12\x1f\n\x1b\x43OUNTING_METHOD_UNSPECIFIED\x10\x00\x12\x12\n\x0eONCE_PER_EVENT\x10\x01\x12\x14\n\x10ONCE_PER_SESSION\x10\x02:m\xea\x41j\n&analyticsadmin.googleapis.com/KeyEvent\x12+properties/{property}/keyEvents/{key_event}*\tkeyEvents2\x08keyEvent\"\xa0\x02\n\x15GoogleSignalsSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.analytics.admin.v1alpha.GoogleSignalsState\x12J\n\x07\x63onsent\x18\x04 \x01(\x0e\x32\x34.google.analytics.admin.v1alpha.GoogleSignalsConsentB\x03\xe0\x41\x03:e\xea\x41\x62\n3analyticsadmin.googleapis.com/GoogleSignalsSettings\x12+properties/{property}/googleSignalsSettings\"\xbc\x03\n\x0f\x43ustomDimension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x0eparameter_name\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12U\n\x05scope\x18\x05 \x01(\x0e\x32>.google.analytics.admin.v1alpha.CustomDimension.DimensionScopeB\x06\xe0\x41\x02\xe0\x41\x05\x12)\n\x1c\x64isallow_ads_personalization\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"P\n\x0e\x44imensionScope\x12\x1f\n\x1b\x44IMENSION_SCOPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45VENT\x10\x01\x12\x08\n\x04USER\x10\x02\x12\x08\n\x04ITEM\x10\x03:m\xea\x41j\n-analyticsadmin.googleapis.com/CustomDimension\x12\x39properties/{property}/customDimensions/{custom_dimension}\"\xc5\x06\n\x0c\x43ustomMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x0eparameter_name\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x10measurement_unit\x18\x05 \x01(\x0e\x32<.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnitB\x03\xe0\x41\x02\x12O\n\x05scope\x18\x06 \x01(\x0e\x32\x38.google.analytics.admin.v1alpha.CustomMetric.MetricScopeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x66\n\x16restricted_metric_type\x18\x08 \x03(\x0e\x32\x41.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricTypeB\x03\xe0\x41\x01\"\xb7\x01\n\x0fMeasurementUnit\x12 \n\x1cMEASUREMENT_UNIT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x43URRENCY\x10\x02\x12\x08\n\x04\x46\x45\x45T\x10\x03\x12\n\n\x06METERS\x10\x04\x12\x0e\n\nKILOMETERS\x10\x05\x12\t\n\x05MILES\x10\x06\x12\x10\n\x0cMILLISECONDS\x10\x07\x12\x0b\n\x07SECONDS\x10\x08\x12\x0b\n\x07MINUTES\x10\t\x12\t\n\x05HOURS\x10\n\"6\n\x0bMetricScope\x12\x1c\n\x18METRIC_SCOPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45VENT\x10\x01\"_\n\x14RestrictedMetricType\x12&\n\"RESTRICTED_METRIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCOST_DATA\x10\x01\x12\x10\n\x0cREVENUE_DATA\x10\x02:d\xea\x41\x61\n*analyticsadmin.googleapis.com/CustomMetric\x12\x33properties/{property}/customMetrics/{custom_metric}\"\xa7\x06\n\x10\x43\x61lculatedMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14\x63\x61lculated_metric_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12U\n\x0bmetric_unit\x18\x05 \x01(\x0e\x32;.google.analytics.admin.v1alpha.CalculatedMetric.MetricUnitB\x03\xe0\x41\x02\x12j\n\x16restricted_metric_type\x18\x06 \x03(\x0e\x32\x45.google.analytics.admin.v1alpha.CalculatedMetric.RestrictedMetricTypeB\x03\xe0\x41\x03\x12\x14\n\x07\x66ormula\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12%\n\x18invalid_metric_reference\x18\t \x01(\x08\x42\x03\xe0\x41\x03\"\xad\x01\n\nMetricUnit\x12\x1b\n\x17METRIC_UNIT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x43URRENCY\x10\x02\x12\x08\n\x04\x46\x45\x45T\x10\x03\x12\t\n\x05MILES\x10\x04\x12\n\n\x06METERS\x10\x05\x12\x0e\n\nKILOMETERS\x10\x06\x12\x10\n\x0cMILLISECONDS\x10\x07\x12\x0b\n\x07SECONDS\x10\x08\x12\x0b\n\x07MINUTES\x10\t\x12\t\n\x05HOURS\x10\n\"_\n\x14RestrictedMetricType\x12&\n\"RESTRICTED_METRIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCOST_DATA\x10\x01\x12\x10\n\x0cREVENUE_DATA\x10\x02:\x96\x01\xea\x41\x92\x01\n.analyticsadmin.googleapis.com/CalculatedMetric\x12;properties/{property}/calculatedMetrics/{calculated_metric}*\x11\x63\x61lculatedMetrics2\x10\x63\x61lculatedMetric\"\xb2\x04\n\x15\x44\x61taRetentionSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12j\n\x14\x65vent_data_retention\x18\x02 \x01(\x0e\x32G.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDurationB\x03\xe0\x41\x02\x12i\n\x13user_data_retention\x18\x04 \x01(\x0e\x32G.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDurationB\x03\xe0\x41\x02\x12\'\n\x1freset_user_data_on_new_activity\x18\x03 \x01(\x08\"\x9e\x01\n\x11RetentionDuration\x12\"\n\x1eRETENTION_DURATION_UNSPECIFIED\x10\x00\x12\x0e\n\nTWO_MONTHS\x10\x01\x12\x13\n\x0f\x46OURTEEN_MONTHS\x10\x03\x12\x15\n\x11TWENTY_SIX_MONTHS\x10\x04\x12\x17\n\x13THIRTY_EIGHT_MONTHS\x10\x05\x12\x10\n\x0c\x46IFTY_MONTHS\x10\x06:e\xea\x41\x62\n3analyticsadmin.googleapis.com/DataRetentionSettings\x12+properties/{property}/dataRetentionSettings\"\xfc\x0b\n\x13\x41ttributionSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x97\x01\n,acquisition_conversion_event_lookback_window\x18\x02 \x01(\x0e\x32\\.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindowB\x03\xe0\x41\x02\x12\x8b\x01\n&other_conversion_event_lookback_window\x18\x03 \x01(\x0e\x32V.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindowB\x03\xe0\x41\x02\x12w\n\x1breporting_attribution_model\x18\x04 \x01(\x0e\x32M.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModelB\x03\xe0\x41\x02\x12\x86\x01\n$ads_web_conversion_data_export_scope\x18\x05 \x01(\x0e\x32S.google.analytics.admin.v1alpha.AttributionSettings.AdsWebConversionDataExportScopeB\x03\xe0\x41\x02\"\xdb\x01\n(AcquisitionConversionEventLookbackWindow\x12<\n8ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED\x10\x00\x12\x37\n3ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS\x10\x01\x12\x38\n4ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS\x10\x02\"\xf8\x01\n\"OtherConversionEventLookbackWindow\x12\x36\n2OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED\x10\x00\x12\x32\n.OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS\x10\x01\x12\x32\n.OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS\x10\x02\x12\x32\n.OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS\x10\x03\"\xc2\x01\n\x19ReportingAttributionModel\x12+\n\'REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12)\n%PAID_AND_ORGANIC_CHANNELS_DATA_DRIVEN\x10\x01\x12(\n$PAID_AND_ORGANIC_CHANNELS_LAST_CLICK\x10\x02\x12#\n\x1fGOOGLE_PAID_CHANNELS_LAST_CLICK\x10\x07\"\xa6\x01\n\x1f\x41\x64sWebConversionDataExportScope\x12\x34\n0ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED\x10\x00\x12\x14\n\x10NOT_SELECTED_YET\x10\x01\x12\x1d\n\x19PAID_AND_ORGANIC_CHANNELS\x10\x02\x12\x18\n\x14GOOGLE_PAID_CHANNELS\x10\x03:a\xea\x41^\n1analyticsadmin.googleapis.com/AttributionSettings\x12)properties/{property}/attributionSettings\"\xf1\x01\n\rAccessBinding\x12\x0e\n\x04user\x18\x02 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\r\n\x05roles\x18\x03 \x03(\t:\x9c\x01\xea\x41\x98\x01\n+analyticsadmin.googleapis.com/AccessBinding\x12\x32\x61\x63\x63ounts/{account}/accessBindings/{access_binding}\x12\x35properties/{property}/accessBindings/{access_binding}B\x0f\n\raccess_target\"\xaa\x03\n\x0c\x42igQueryLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07project\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x14\x64\x61ily_export_enabled\x18\x04 \x01(\x08\x12 \n\x18streaming_export_enabled\x18\x05 \x01(\x08\x12\"\n\x1a\x66resh_daily_export_enabled\x18\t \x01(\x08\x12\x1e\n\x16include_advertising_id\x18\x06 \x01(\x08\x12\x16\n\x0e\x65xport_streams\x18\x07 \x03(\t\x12\x17\n\x0f\x65xcluded_events\x18\x08 \x03(\t\x12 \n\x10\x64\x61taset_location\x18\n \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02:d\xea\x41\x61\n*analyticsadmin.googleapis.com/BigQueryLink\x12\x33properties/{property}/bigQueryLinks/{bigquery_link}\"\xf3\x03\n\x1b\x45nhancedMeasurementSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0estream_enabled\x18\x02 \x01(\x08\x12\x17\n\x0fscrolls_enabled\x18\x03 \x01(\x08\x12\x1f\n\x17outbound_clicks_enabled\x18\x04 \x01(\x08\x12\x1b\n\x13site_search_enabled\x18\x05 \x01(\x08\x12 \n\x18video_engagement_enabled\x18\x06 \x01(\x08\x12\x1e\n\x16\x66ile_downloads_enabled\x18\x07 \x01(\x08\x12\x1c\n\x14page_changes_enabled\x18\x08 \x01(\x08\x12!\n\x19\x66orm_interactions_enabled\x18\t \x01(\x08\x12#\n\x16search_query_parameter\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x13uri_query_parameter\x18\x0b \x01(\t:\x8c\x01\xea\x41\x88\x01\n9analyticsadmin.googleapis.com/EnhancedMeasurementSettings\x12Kproperties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings\"B\n\x10\x43onnectedSiteTag\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06tag_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x95\x02\n\x15\x44\x61taRedactionSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17\x65mail_redaction_enabled\x18\x02 \x01(\x08\x12)\n!query_parameter_redaction_enabled\x18\x03 \x01(\x08\x12\x1c\n\x14query_parameter_keys\x18\x04 \x03(\t:\x7f\xea\x41|\n3analyticsadmin.googleapis.com/DataRedactionSettings\x12\x45properties/{property}/dataStreams/{data_stream}/dataRedactionSettings\"\xa0\x01\n\x0b\x41\x64SenseLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0e\x61\x64_client_code\x18\x02 \x01(\tB\x03\xe0\x41\x05:a\xea\x41^\n)analyticsadmin.googleapis.com/AdSenseLink\x12\x31properties/{property}/adSenseLinks/{adsense_link}\"\x8e\x02\n\x18RollupPropertySourceLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fsource_property\x18\x02 \x01(\tB\x03\xe0\x41\x05:\xc0\x01\xea\x41\xbc\x01\n6analyticsadmin.googleapis.com/RollupPropertySourceLink\x12Mproperties/{property}/rollupPropertySourceLinks/{rollup_property_source_link}*\x19rollupPropertySourceLinks2\x18rollupPropertySourceLink\"\xf6\x05\n\x17ReportingDataAnnotation\x12,\n\x0f\x61nnotation_date\x18\x04 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x62\n\x15\x61nnotation_date_range\x18\x05 \x01(\x0b\x32\x41.google.analytics.admin.v1alpha.ReportingDataAnnotation.DateRangeH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x05\x63olor\x18\x06 \x01(\x0e\x32=.google.analytics.admin.v1alpha.ReportingDataAnnotation.ColorB\x03\xe0\x41\x02\x12\x1d\n\x10system_generated\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x61\n\tDateRange\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\"i\n\x05\x43olor\x12\x15\n\x11\x43OLOR_UNSPECIFIED\x10\x00\x12\n\n\x06PURPLE\x10\x01\x12\t\n\x05\x42ROWN\x10\x02\x12\x08\n\x04\x42LUE\x10\x03\x12\t\n\x05GREEN\x10\x04\x12\x07\n\x03RED\x10\x05\x12\x08\n\x04\x43YAN\x10\x06\x12\n\n\x06ORANGE\x10\x07:\xba\x01\xea\x41\xb6\x01\n5analyticsadmin.googleapis.com/ReportingDataAnnotation\x12Jproperties/{property}/reportingDataAnnotations/{reporting_data_annotation}*\x18reportingDataAnnotations2\x17reportingDataAnnotationB\x08\n\x06target*\xaa\x04\n\x10IndustryCategory\x12!\n\x1dINDUSTRY_CATEGORY_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTOMOTIVE\x10\x01\x12#\n\x1f\x42USINESS_AND_INDUSTRIAL_MARKETS\x10\x02\x12\x0b\n\x07\x46INANCE\x10\x03\x12\x0e\n\nHEALTHCARE\x10\x04\x12\x0e\n\nTECHNOLOGY\x10\x05\x12\n\n\x06TRAVEL\x10\x06\x12\t\n\x05OTHER\x10\x07\x12\x1a\n\x16\x41RTS_AND_ENTERTAINMENT\x10\x08\x12\x16\n\x12\x42\x45\x41UTY_AND_FITNESS\x10\t\x12\x18\n\x14\x42OOKS_AND_LITERATURE\x10\n\x12\x12\n\x0e\x46OOD_AND_DRINK\x10\x0b\x12\t\n\x05GAMES\x10\x0c\x12\x17\n\x13HOBBIES_AND_LEISURE\x10\r\x12\x13\n\x0fHOME_AND_GARDEN\x10\x0e\x12\x18\n\x14INTERNET_AND_TELECOM\x10\x0f\x12\x16\n\x12LAW_AND_GOVERNMENT\x10\x10\x12\x08\n\x04NEWS\x10\x11\x12\x16\n\x12ONLINE_COMMUNITIES\x10\x12\x12\x16\n\x12PEOPLE_AND_SOCIETY\x10\x13\x12\x14\n\x10PETS_AND_ANIMALS\x10\x14\x12\x0f\n\x0bREAL_ESTATE\x10\x15\x12\r\n\tREFERENCE\x10\x16\x12\x0b\n\x07SCIENCE\x10\x17\x12\n\n\x06SPORTS\x10\x18\x12\x16\n\x12JOBS_AND_EDUCATION\x10\x19\x12\x0c\n\x08SHOPPING\x10\x1a*f\n\x0cServiceLevel\x12\x1d\n\x19SERVICE_LEVEL_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_ANALYTICS_STANDARD\x10\x01\x12\x18\n\x14GOOGLE_ANALYTICS_360\x10\x02*J\n\tActorType\x12\x1a\n\x16\x41\x43TOR_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\x0b\n\x07SUPPORT\x10\x03*P\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x0b\n\x07UPDATED\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03*\xe3\x05\n\x19\x43hangeHistoryResourceType\x12,\n(CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x43\x43OUNT\x10\x01\x12\x0c\n\x08PROPERTY\x10\x02\x12\x11\n\rFIREBASE_LINK\x10\x06\x12\x13\n\x0fGOOGLE_ADS_LINK\x10\x07\x12\x1b\n\x17GOOGLE_SIGNALS_SETTINGS\x10\x08\x12\x14\n\x10\x43ONVERSION_EVENT\x10\t\x12\x1f\n\x1bMEASUREMENT_PROTOCOL_SECRET\x10\n\x12\x14\n\x10\x43USTOM_DIMENSION\x10\x0b\x12\x11\n\rCUSTOM_METRIC\x10\x0c\x12\x1b\n\x17\x44\x41TA_RETENTION_SETTINGS\x10\r\x12%\n!DISPLAY_VIDEO_360_ADVERTISER_LINK\x10\x0e\x12.\n*DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL\x10\x0f\x12\x17\n\x13SEARCH_ADS_360_LINK\x10\x10\x12\x0f\n\x0b\x44\x41TA_STREAM\x10\x12\x12\x18\n\x14\x41TTRIBUTION_SETTINGS\x10\x14\x12\x15\n\x11\x45XPANDED_DATA_SET\x10\x15\x12\x11\n\rCHANNEL_GROUP\x10\x16\x12\x11\n\rBIGQUERY_LINK\x10\x17\x12!\n\x1d\x45NHANCED_MEASUREMENT_SETTINGS\x10\x18\x12\x1b\n\x17\x44\x41TA_REDACTION_SETTINGS\x10\x19\x12\'\n#SKADNETWORK_CONVERSION_VALUE_SCHEMA\x10\x1a\x12\x10\n\x0c\x41\x44SENSE_LINK\x10\x1b\x12\x0c\n\x08\x41UDIENCE\x10\x1c\x12\x15\n\x11\x45VENT_CREATE_RULE\x10\x1d\x12\r\n\tKEY_EVENT\x10\x1e\x12\x15\n\x11\x43\x41LCULATED_METRIC\x10\x1f\x12\x1d\n\x19REPORTING_DATA_ANNOTATION\x10 *s\n\x12GoogleSignalsState\x12$\n GOOGLE_SIGNALS_STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16GOOGLE_SIGNALS_ENABLED\x10\x01\x12\x1b\n\x17GOOGLE_SIGNALS_DISABLED\x10\x02*\x8e\x01\n\x14GoogleSignalsConsent\x12&\n\"GOOGLE_SIGNALS_CONSENT_UNSPECIFIED\x10\x00\x12$\n GOOGLE_SIGNALS_CONSENT_CONSENTED\x10\x02\x12(\n$GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED\x10\x01*{\n\x1dLinkProposalInitiatingProduct\x12\x30\n,LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED\x10\x00\x12\x14\n\x10GOOGLE_ANALYTICS\x10\x01\x12\x12\n\x0eLINKED_PRODUCT\x10\x02*\xc4\x01\n\x11LinkProposalState\x12#\n\x1fLINK_PROPOSAL_STATE_UNSPECIFIED\x10\x00\x12)\n%AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS\x10\x01\x12\'\n#AWAITING_REVIEW_FROM_LINKED_PRODUCT\x10\x02\x12\r\n\tWITHDRAWN\x10\x03\x12\x0c\n\x08\x44\x45\x43LINED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x12\x0c\n\x08OBSOLETE\x10\x06*\x82\x01\n\x0cPropertyType\x12\x1d\n\x19PROPERTY_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROPERTY_TYPE_ORDINARY\x10\x01\x12\x1d\n\x19PROPERTY_TYPE_SUBPROPERTY\x10\x02\x12\x18\n\x14PROPERTY_TYPE_ROLLUP\x10\x03*q\n\x0b\x43oarseValue\x12\x1c\n\x18\x43OARSE_VALUE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OARSE_VALUE_LOW\x10\x01\x12\x17\n\x13\x43OARSE_VALUE_MEDIUM\x10\x02\x12\x15\n\x11\x43OARSE_VALUE_HIGH\x10\x03\x42\xcb\x01\n\"com.google.analytics.admin.v1alphaB\x0eResourcesProtoP\x01Z>cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpb\xea\x41R\n2marketingplatformadmin.googleapis.com/Organization\x12\x1corganizations/{organization}b\x06proto3" +descriptor_data = "\n.google/analytics/admin/v1alpha/resources.proto\x12\x1egoogle.analytics.admin.v1alpha\x1a-google/analytics/admin/v1alpha/audience.proto\x1a\x32google/analytics/admin/v1alpha/channel_group.proto\x1a:google/analytics/admin/v1alpha/event_create_and_edit.proto\x1a\x36google/analytics/admin/v1alpha/expanded_data_set.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x16google/type/date.proto\"\xe4\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x05 \x01(\t\x12\x14\n\x07\x64\x65leted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12T\n\x10gmp_organization\x18\x07 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2marketingplatformadmin.googleapis.com/Organization:>\xea\x41;\n%analyticsadmin.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\"\xb9\x05\n\x08Property\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12H\n\rproperty_type\x18\x0e \x01(\x0e\x32,.google.analytics.admin.v1alpha.PropertyTypeB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06parent\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12K\n\x11industry_category\x18\x06 \x01(\x0e\x32\x30.google.analytics.admin.v1alpha.IndustryCategory\x12\x16\n\ttime_zone\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rcurrency_code\x18\x08 \x01(\t\x12H\n\rservice_level\x18\n \x01(\x0e\x32,.google.analytics.admin.v1alpha.ServiceLevelB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x07\x61\x63\x63ount\x18\r \x01(\tB-\xe0\x41\x05\xfa\x41\'\n%analyticsadmin.googleapis.com/Account:B\xea\x41?\n&analyticsadmin.googleapis.com/Property\x12\x15properties/{property}\"\xf4\x07\n\nDataStream\x12S\n\x0fweb_stream_data\x18\x06 \x01(\x0b\x32\x38.google.analytics.admin.v1alpha.DataStream.WebStreamDataH\x00\x12\x62\n\x17\x61ndroid_app_stream_data\x18\x07 \x01(\x0b\x32?.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamDataH\x00\x12Z\n\x13ios_app_stream_data\x18\x08 \x01(\x0b\x32;.google.analytics.admin.v1alpha.DataStream.IosAppStreamDataH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12O\n\x04type\x18\x02 \x01(\x0e\x32\x39.google.analytics.admin.v1alpha.DataStream.DataStreamTypeB\x06\xe0\x41\x05\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a_\n\rWebStreamData\x12\x1b\n\x0emeasurement_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0f\x66irebase_app_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65\x66\x61ult_uri\x18\x03 \x01(\t\x1aO\n\x14\x41ndroidAppStreamData\x12\x1c\n\x0f\x66irebase_app_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x1aK\n\x10IosAppStreamData\x12\x1c\n\x0f\x66irebase_app_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\tbundle_id\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\"}\n\x0e\x44\x61taStreamType\x12 \n\x1c\x44\x41TA_STREAM_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fWEB_DATA_STREAM\x10\x01\x12\x1b\n\x17\x41NDROID_APP_DATA_STREAM\x10\x02\x12\x17\n\x13IOS_APP_DATA_STREAM\x10\x03:^\xea\x41[\n(analyticsadmin.googleapis.com/DataStream\x12/properties/{property}/dataStreams/{data_stream}B\r\n\x0bstream_data\"\xd3\x01\n\x0c\x46irebaseLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07project\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:d\xea\x41\x61\n*analyticsadmin.googleapis.com/FirebaseLink\x12\x33properties/{property}/firebaseLinks/{firebase_link}\"\xa9\x01\n\rGlobalSiteTag\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07snippet\x18\x02 \x01(\tB\x03\xe0\x41\x05:o\xea\x41l\n+analyticsadmin.googleapis.com/GlobalSiteTag\x12=properties/{property}/dataStreams/{data_stream}/globalSiteTag\"\x98\x03\n\rGoogleAdsLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x63ustomer_id\x18\x03 \x01(\tB\x03\xe0\x41\x05\x12\x1f\n\x12\x63\x61n_manage_clients\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x1b\x61\x64s_personalization_enabled\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\"\n\x15\x63reator_email_address\x18\t \x01(\tB\x03\xe0\x41\x03:h\xea\x41\x65\n+analyticsadmin.googleapis.com/GoogleAdsLink\x12\x36properties/{property}/googleAdsLinks/{google_ads_link}\"\xef\x02\n\x13\x44\x61taSharingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12+\n#sharing_with_google_support_enabled\x18\x02 \x01(\x08\x12\x32\n*sharing_with_google_assigned_sales_enabled\x18\x03 \x01(\x08\x12\x31\n%sharing_with_google_any_sales_enabled\x18\x04 \x01(\x08\x42\x02\x18\x01\x12,\n$sharing_with_google_products_enabled\x18\x05 \x01(\x08\x12#\n\x1bsharing_with_others_enabled\x18\x06 \x01(\x08:^\xea\x41[\n1analyticsadmin.googleapis.com/DataSharingSettings\x12&accounts/{account}/dataSharingSettings\"\x95\x02\n\x0e\x41\x63\x63ountSummary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xfa\x41\'\n%analyticsadmin.googleapis.com/Account\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12K\n\x12property_summaries\x18\x04 \x03(\x0b\x32/.google.analytics.admin.v1alpha.PropertySummary:U\xea\x41R\n,analyticsadmin.googleapis.com/AccountSummary\x12\"accountSummaries/{account_summary}\"\xbb\x01\n\x0fPropertySummary\x12=\n\x08property\x18\x01 \x01(\tB+\xfa\x41(\n&analyticsadmin.googleapis.com/Property\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x43\n\rproperty_type\x18\x03 \x01(\x0e\x32,.google.analytics.admin.v1alpha.PropertyType\x12\x0e\n\x06parent\x18\x04 \x01(\t\"\x8e\x02\n\x19MeasurementProtocolSecret\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0csecret_value\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xa7\x01\xea\x41\xa3\x01\n7analyticsadmin.googleapis.com/MeasurementProtocolSecret\x12hproperties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}\"\x83\x04\n SKAdNetworkConversionValueSchema\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12P\n\x13postback_window_one\x18\x02 \x01(\x0b\x32..google.analytics.admin.v1alpha.PostbackWindowB\x03\xe0\x41\x02\x12K\n\x13postback_window_two\x18\x03 \x01(\x0b\x32..google.analytics.admin.v1alpha.PostbackWindow\x12M\n\x15postback_window_three\x18\x04 \x01(\x0b\x32..google.analytics.admin.v1alpha.PostbackWindow\x12\x1f\n\x17\x61pply_conversion_values\x18\x05 \x01(\x08:\xbc\x01\xea\x41\xb8\x01\n>analyticsadmin.googleapis.com/SKAdNetworkConversionValueSchema\x12vproperties/{property}/dataStreams/{data_stream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}\"\x87\x01\n\x0ePostbackWindow\x12K\n\x11\x63onversion_values\x18\x01 \x03(\x0b\x32\x30.google.analytics.admin.v1alpha.ConversionValues\x12(\n postback_window_settings_enabled\x18\x02 \x01(\x08\"\xf4\x01\n\x10\x43onversionValues\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x17\n\nfine_value\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x46\n\x0c\x63oarse_value\x18\x03 \x01(\x0e\x32+.google.analytics.admin.v1alpha.CoarseValueB\x03\xe0\x41\x02\x12\x44\n\x0e\x65vent_mappings\x18\x04 \x03(\x0b\x32,.google.analytics.admin.v1alpha.EventMapping\x12\x14\n\x0clock_enabled\x18\x05 \x01(\x08\x42\r\n\x0b_fine_value\"\xef\x01\n\x0c\x45ventMapping\x12\x17\n\nevent_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0fmin_event_count\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1c\n\x0fmax_event_count\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x1c\n\x0fmin_event_value\x18\x04 \x01(\x01H\x02\x88\x01\x01\x12\x1c\n\x0fmax_event_value\x18\x05 \x01(\x01H\x03\x88\x01\x01\x42\x12\n\x10_min_event_countB\x12\n\x10_max_event_countB\x12\n\x10_min_event_valueB\x12\n\x10_max_event_value\"\x8a\x02\n\x12\x43hangeHistoryEvent\x12\n\n\x02id\x18\x01 \x01(\t\x12/\n\x0b\x63hange_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12=\n\nactor_type\x18\x03 \x01(\x0e\x32).google.analytics.admin.v1alpha.ActorType\x12\x18\n\x10user_actor_email\x18\x04 \x01(\t\x12\x18\n\x10\x63hanges_filtered\x18\x05 \x01(\x08\x12\x44\n\x07\x63hanges\x18\x06 \x03(\x0b\x32\x33.google.analytics.admin.v1alpha.ChangeHistoryChange\"\xd6\x14\n\x13\x43hangeHistoryChange\x12\x10\n\x08resource\x18\x01 \x01(\t\x12:\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32*.google.analytics.admin.v1alpha.ActionType\x12i\n\x16resource_before_change\x18\x03 \x01(\x0b\x32I.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource\x12h\n\x15resource_after_change\x18\x04 \x01(\x0b\x32I.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource\x1a\x9b\x12\n\x15\x43hangeHistoryResource\x12:\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\'.google.analytics.admin.v1alpha.AccountH\x00\x12<\n\x08property\x18\x02 \x01(\x0b\x32(.google.analytics.admin.v1alpha.PropertyH\x00\x12\x45\n\rfirebase_link\x18\x06 \x01(\x0b\x32,.google.analytics.admin.v1alpha.FirebaseLinkH\x00\x12H\n\x0fgoogle_ads_link\x18\x07 \x01(\x0b\x32-.google.analytics.admin.v1alpha.GoogleAdsLinkH\x00\x12X\n\x17google_signals_settings\x18\x08 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.GoogleSignalsSettingsH\x00\x12j\n!display_video_360_advertiser_link\x18\t \x01(\x0b\x32=.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkH\x00\x12{\n*display_video_360_advertiser_link_proposal\x18\n \x01(\x0b\x32\x45.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposalH\x00\x12K\n\x10\x63onversion_event\x18\x0b \x01(\x0b\x32/.google.analytics.admin.v1alpha.ConversionEventH\x00\x12`\n\x1bmeasurement_protocol_secret\x18\x0c \x01(\x0b\x32\x39.google.analytics.admin.v1alpha.MeasurementProtocolSecretH\x00\x12K\n\x10\x63ustom_dimension\x18\r \x01(\x0b\x32/.google.analytics.admin.v1alpha.CustomDimensionH\x00\x12\x45\n\rcustom_metric\x18\x0e \x01(\x0b\x32,.google.analytics.admin.v1alpha.CustomMetricH\x00\x12X\n\x17\x64\x61ta_retention_settings\x18\x0f \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.DataRetentionSettingsH\x00\x12O\n\x13search_ads_360_link\x18\x10 \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.SearchAds360LinkH\x00\x12\x41\n\x0b\x64\x61ta_stream\x18\x12 \x01(\x0b\x32*.google.analytics.admin.v1alpha.DataStreamH\x00\x12S\n\x14\x61ttribution_settings\x18\x14 \x01(\x0b\x32\x33.google.analytics.admin.v1alpha.AttributionSettingsH\x00\x12L\n\x11\x65xpanded_data_set\x18\x15 \x01(\x0b\x32/.google.analytics.admin.v1alpha.ExpandedDataSetH\x00\x12\x45\n\rchannel_group\x18\x16 \x01(\x0b\x32,.google.analytics.admin.v1alpha.ChannelGroupH\x00\x12\x45\n\rbigquery_link\x18\x17 \x01(\x0b\x32,.google.analytics.admin.v1alpha.BigQueryLinkH\x00\x12\x64\n\x1d\x65nhanced_measurement_settings\x18\x18 \x01(\x0b\x32;.google.analytics.admin.v1alpha.EnhancedMeasurementSettingsH\x00\x12X\n\x17\x64\x61ta_redaction_settings\x18\x19 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.DataRedactionSettingsH\x00\x12o\n#skadnetwork_conversion_value_schema\x18\x1a \x01(\x0b\x32@.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchemaH\x00\x12\x43\n\x0c\x61\x64sense_link\x18\x1b \x01(\x0b\x32+.google.analytics.admin.v1alpha.AdSenseLinkH\x00\x12<\n\x08\x61udience\x18\x1c \x01(\x0b\x32(.google.analytics.admin.v1alpha.AudienceH\x00\x12L\n\x11\x65vent_create_rule\x18\x1d \x01(\x0b\x32/.google.analytics.admin.v1alpha.EventCreateRuleH\x00\x12=\n\tkey_event\x18\x1e \x01(\x0b\x32(.google.analytics.admin.v1alpha.KeyEventH\x00\x12M\n\x11\x63\x61lculated_metric\x18\x1f \x01(\x0b\x32\x30.google.analytics.admin.v1alpha.CalculatedMetricH\x00\x12\\\n\x19reporting_data_annotation\x18 \x01(\x0b\x32\x37.google.analytics.admin.v1alpha.ReportingDataAnnotationH\x00\x12X\n\x17subproperty_sync_config\x18! \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.SubpropertySyncConfigH\x00\x42\n\n\x08resource\"\xdf\x03\n\x1d\x44isplayVideo360AdvertiserLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\radvertiser_id\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12$\n\x17\x61\x64vertiser_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x1b\x61\x64s_personalization_enabled\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x46\n\x1d\x63\x61mpaign_data_sharing_enabled\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12\x42\n\x19\x63ost_data_sharing_enabled\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05:\x9b\x01\xea\x41\x97\x01\n;analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink\x12Xproperties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}\"\x8a\x05\n%DisplayVideo360AdvertiserLinkProposal\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\radvertiser_id\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x64\n\x1clink_proposal_status_details\x18\x03 \x01(\x0b\x32\x39.google.analytics.admin.v1alpha.LinkProposalStatusDetailsB\x03\xe0\x41\x03\x12$\n\x17\x61\x64vertiser_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10validation_email\x18\x05 \x01(\tB\x03\xe0\x41\x04\x12\x44\n\x1b\x61\x64s_personalization_enabled\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12\x46\n\x1d\x63\x61mpaign_data_sharing_enabled\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12\x42\n\x19\x63ost_data_sharing_enabled\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05:\xb4\x01\xea\x41\xb0\x01\nCanalyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal\x12iproperties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}\"\xe8\x03\n\x10SearchAds360Link\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\radvertiser_id\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x46\n\x1d\x63\x61mpaign_data_sharing_enabled\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12\x42\n\x19\x63ost_data_sharing_enabled\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x05\x12$\n\x17\x61\x64vertiser_display_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12?\n\x1b\x61\x64s_personalization_enabled\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x1asite_stats_sharing_enabled\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.BoolValue:r\xea\x41o\n.analyticsadmin.googleapis.com/SearchAds360Link\x12=properties/{property}/searchAds360Links/{search_ads_360_link}\"\xfc\x01\n\x19LinkProposalStatusDetails\x12l\n link_proposal_initiating_product\x18\x01 \x01(\x0e\x32=.google.analytics.admin.v1alpha.LinkProposalInitiatingProductB\x03\xe0\x41\x03\x12\x1c\n\x0frequestor_email\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\x13link_proposal_state\x18\x03 \x01(\x0e\x32\x31.google.analytics.admin.v1alpha.LinkProposalStateB\x03\xe0\x41\x03\"\xe0\x05\n\x0f\x43onversionEvent\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nevent_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tdeletable\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06\x63ustom\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x66\n\x0f\x63ounting_method\x18\x06 \x01(\x0e\x32H.google.analytics.admin.v1alpha.ConversionEvent.ConversionCountingMethodB\x03\xe0\x41\x01\x12r\n\x18\x64\x65\x66\x61ult_conversion_value\x18\x07 \x01(\x0b\x32\x46.google.analytics.admin.v1alpha.ConversionEvent.DefaultConversionValueB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x64\n\x16\x44\x65\x66\x61ultConversionValue\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x1a\n\rcurrency_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_valueB\x10\n\x0e_currency_code\"p\n\x18\x43onversionCountingMethod\x12*\n&CONVERSION_COUNTING_METHOD_UNSPECIFIED\x10\x00\x12\x12\n\x0eONCE_PER_EVENT\x10\x01\x12\x14\n\x10ONCE_PER_SESSION\x10\x02:m\xea\x41j\n-analyticsadmin.googleapis.com/ConversionEvent\x12\x39properties/{property}/conversionEvents/{conversion_event}B\x1b\n\x19_default_conversion_value\"\xd7\x04\n\x08KeyEvent\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nevent_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tdeletable\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06\x63ustom\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12U\n\x0f\x63ounting_method\x18\x06 \x01(\x0e\x32\x37.google.analytics.admin.v1alpha.KeyEvent.CountingMethodB\x03\xe0\x41\x02\x12Q\n\rdefault_value\x18\x07 \x01(\x0b\x32\x35.google.analytics.admin.v1alpha.KeyEvent.DefaultValueB\x03\xe0\x41\x01\x1a\x46\n\x0c\x44\x65\x66\x61ultValue\x12\x1a\n\rnumeric_value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"[\n\x0e\x43ountingMethod\x12\x1f\n\x1b\x43OUNTING_METHOD_UNSPECIFIED\x10\x00\x12\x12\n\x0eONCE_PER_EVENT\x10\x01\x12\x14\n\x10ONCE_PER_SESSION\x10\x02:m\xea\x41j\n&analyticsadmin.googleapis.com/KeyEvent\x12+properties/{property}/keyEvents/{key_event}*\tkeyEvents2\x08keyEvent\"\xa0\x02\n\x15GoogleSignalsSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.analytics.admin.v1alpha.GoogleSignalsState\x12J\n\x07\x63onsent\x18\x04 \x01(\x0e\x32\x34.google.analytics.admin.v1alpha.GoogleSignalsConsentB\x03\xe0\x41\x03:e\xea\x41\x62\n3analyticsadmin.googleapis.com/GoogleSignalsSettings\x12+properties/{property}/googleSignalsSettings\"\xbc\x03\n\x0f\x43ustomDimension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x0eparameter_name\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12U\n\x05scope\x18\x05 \x01(\x0e\x32>.google.analytics.admin.v1alpha.CustomDimension.DimensionScopeB\x06\xe0\x41\x02\xe0\x41\x05\x12)\n\x1c\x64isallow_ads_personalization\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"P\n\x0e\x44imensionScope\x12\x1f\n\x1b\x44IMENSION_SCOPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45VENT\x10\x01\x12\x08\n\x04USER\x10\x02\x12\x08\n\x04ITEM\x10\x03:m\xea\x41j\n-analyticsadmin.googleapis.com/CustomDimension\x12\x39properties/{property}/customDimensions/{custom_dimension}\"\xc5\x06\n\x0c\x43ustomMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x0eparameter_name\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x10measurement_unit\x18\x05 \x01(\x0e\x32<.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnitB\x03\xe0\x41\x02\x12O\n\x05scope\x18\x06 \x01(\x0e\x32\x38.google.analytics.admin.v1alpha.CustomMetric.MetricScopeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x66\n\x16restricted_metric_type\x18\x08 \x03(\x0e\x32\x41.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricTypeB\x03\xe0\x41\x01\"\xb7\x01\n\x0fMeasurementUnit\x12 \n\x1cMEASUREMENT_UNIT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x43URRENCY\x10\x02\x12\x08\n\x04\x46\x45\x45T\x10\x03\x12\n\n\x06METERS\x10\x04\x12\x0e\n\nKILOMETERS\x10\x05\x12\t\n\x05MILES\x10\x06\x12\x10\n\x0cMILLISECONDS\x10\x07\x12\x0b\n\x07SECONDS\x10\x08\x12\x0b\n\x07MINUTES\x10\t\x12\t\n\x05HOURS\x10\n\"6\n\x0bMetricScope\x12\x1c\n\x18METRIC_SCOPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45VENT\x10\x01\"_\n\x14RestrictedMetricType\x12&\n\"RESTRICTED_METRIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCOST_DATA\x10\x01\x12\x10\n\x0cREVENUE_DATA\x10\x02:d\xea\x41\x61\n*analyticsadmin.googleapis.com/CustomMetric\x12\x33properties/{property}/customMetrics/{custom_metric}\"\xa7\x06\n\x10\x43\x61lculatedMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14\x63\x61lculated_metric_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12U\n\x0bmetric_unit\x18\x05 \x01(\x0e\x32;.google.analytics.admin.v1alpha.CalculatedMetric.MetricUnitB\x03\xe0\x41\x02\x12j\n\x16restricted_metric_type\x18\x06 \x03(\x0e\x32\x45.google.analytics.admin.v1alpha.CalculatedMetric.RestrictedMetricTypeB\x03\xe0\x41\x03\x12\x14\n\x07\x66ormula\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12%\n\x18invalid_metric_reference\x18\t \x01(\x08\x42\x03\xe0\x41\x03\"\xad\x01\n\nMetricUnit\x12\x1b\n\x17METRIC_UNIT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0c\n\x08\x43URRENCY\x10\x02\x12\x08\n\x04\x46\x45\x45T\x10\x03\x12\t\n\x05MILES\x10\x04\x12\n\n\x06METERS\x10\x05\x12\x0e\n\nKILOMETERS\x10\x06\x12\x10\n\x0cMILLISECONDS\x10\x07\x12\x0b\n\x07SECONDS\x10\x08\x12\x0b\n\x07MINUTES\x10\t\x12\t\n\x05HOURS\x10\n\"_\n\x14RestrictedMetricType\x12&\n\"RESTRICTED_METRIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCOST_DATA\x10\x01\x12\x10\n\x0cREVENUE_DATA\x10\x02:\x96\x01\xea\x41\x92\x01\n.analyticsadmin.googleapis.com/CalculatedMetric\x12;properties/{property}/calculatedMetrics/{calculated_metric}*\x11\x63\x61lculatedMetrics2\x10\x63\x61lculatedMetric\"\xb2\x04\n\x15\x44\x61taRetentionSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12j\n\x14\x65vent_data_retention\x18\x02 \x01(\x0e\x32G.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDurationB\x03\xe0\x41\x02\x12i\n\x13user_data_retention\x18\x04 \x01(\x0e\x32G.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDurationB\x03\xe0\x41\x02\x12\'\n\x1freset_user_data_on_new_activity\x18\x03 \x01(\x08\"\x9e\x01\n\x11RetentionDuration\x12\"\n\x1eRETENTION_DURATION_UNSPECIFIED\x10\x00\x12\x0e\n\nTWO_MONTHS\x10\x01\x12\x13\n\x0f\x46OURTEEN_MONTHS\x10\x03\x12\x15\n\x11TWENTY_SIX_MONTHS\x10\x04\x12\x17\n\x13THIRTY_EIGHT_MONTHS\x10\x05\x12\x10\n\x0c\x46IFTY_MONTHS\x10\x06:e\xea\x41\x62\n3analyticsadmin.googleapis.com/DataRetentionSettings\x12+properties/{property}/dataRetentionSettings\"\xfc\x0b\n\x13\x41ttributionSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x97\x01\n,acquisition_conversion_event_lookback_window\x18\x02 \x01(\x0e\x32\\.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindowB\x03\xe0\x41\x02\x12\x8b\x01\n&other_conversion_event_lookback_window\x18\x03 \x01(\x0e\x32V.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindowB\x03\xe0\x41\x02\x12w\n\x1breporting_attribution_model\x18\x04 \x01(\x0e\x32M.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModelB\x03\xe0\x41\x02\x12\x86\x01\n$ads_web_conversion_data_export_scope\x18\x05 \x01(\x0e\x32S.google.analytics.admin.v1alpha.AttributionSettings.AdsWebConversionDataExportScopeB\x03\xe0\x41\x02\"\xdb\x01\n(AcquisitionConversionEventLookbackWindow\x12<\n8ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED\x10\x00\x12\x37\n3ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS\x10\x01\x12\x38\n4ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS\x10\x02\"\xf8\x01\n\"OtherConversionEventLookbackWindow\x12\x36\n2OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED\x10\x00\x12\x32\n.OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS\x10\x01\x12\x32\n.OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS\x10\x02\x12\x32\n.OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS\x10\x03\"\xc2\x01\n\x19ReportingAttributionModel\x12+\n\'REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12)\n%PAID_AND_ORGANIC_CHANNELS_DATA_DRIVEN\x10\x01\x12(\n$PAID_AND_ORGANIC_CHANNELS_LAST_CLICK\x10\x02\x12#\n\x1fGOOGLE_PAID_CHANNELS_LAST_CLICK\x10\x07\"\xa6\x01\n\x1f\x41\x64sWebConversionDataExportScope\x12\x34\n0ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED\x10\x00\x12\x14\n\x10NOT_SELECTED_YET\x10\x01\x12\x1d\n\x19PAID_AND_ORGANIC_CHANNELS\x10\x02\x12\x18\n\x14GOOGLE_PAID_CHANNELS\x10\x03:a\xea\x41^\n1analyticsadmin.googleapis.com/AttributionSettings\x12)properties/{property}/attributionSettings\"\xf1\x01\n\rAccessBinding\x12\x0e\n\x04user\x18\x02 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\r\n\x05roles\x18\x03 \x03(\t:\x9c\x01\xea\x41\x98\x01\n+analyticsadmin.googleapis.com/AccessBinding\x12\x32\x61\x63\x63ounts/{account}/accessBindings/{access_binding}\x12\x35properties/{property}/accessBindings/{access_binding}B\x0f\n\raccess_target\"\xaa\x03\n\x0c\x42igQueryLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07project\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x14\x64\x61ily_export_enabled\x18\x04 \x01(\x08\x12 \n\x18streaming_export_enabled\x18\x05 \x01(\x08\x12\"\n\x1a\x66resh_daily_export_enabled\x18\t \x01(\x08\x12\x1e\n\x16include_advertising_id\x18\x06 \x01(\x08\x12\x16\n\x0e\x65xport_streams\x18\x07 \x03(\t\x12\x17\n\x0f\x65xcluded_events\x18\x08 \x03(\t\x12 \n\x10\x64\x61taset_location\x18\n \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02:d\xea\x41\x61\n*analyticsadmin.googleapis.com/BigQueryLink\x12\x33properties/{property}/bigQueryLinks/{bigquery_link}\"\xf3\x03\n\x1b\x45nhancedMeasurementSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0estream_enabled\x18\x02 \x01(\x08\x12\x17\n\x0fscrolls_enabled\x18\x03 \x01(\x08\x12\x1f\n\x17outbound_clicks_enabled\x18\x04 \x01(\x08\x12\x1b\n\x13site_search_enabled\x18\x05 \x01(\x08\x12 \n\x18video_engagement_enabled\x18\x06 \x01(\x08\x12\x1e\n\x16\x66ile_downloads_enabled\x18\x07 \x01(\x08\x12\x1c\n\x14page_changes_enabled\x18\x08 \x01(\x08\x12!\n\x19\x66orm_interactions_enabled\x18\t \x01(\x08\x12#\n\x16search_query_parameter\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x13uri_query_parameter\x18\x0b \x01(\t:\x8c\x01\xea\x41\x88\x01\n9analyticsadmin.googleapis.com/EnhancedMeasurementSettings\x12Kproperties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings\"B\n\x10\x43onnectedSiteTag\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06tag_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x95\x02\n\x15\x44\x61taRedactionSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17\x65mail_redaction_enabled\x18\x02 \x01(\x08\x12)\n!query_parameter_redaction_enabled\x18\x03 \x01(\x08\x12\x1c\n\x14query_parameter_keys\x18\x04 \x03(\t:\x7f\xea\x41|\n3analyticsadmin.googleapis.com/DataRedactionSettings\x12\x45properties/{property}/dataStreams/{data_stream}/dataRedactionSettings\"\xa0\x01\n\x0b\x41\x64SenseLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0e\x61\x64_client_code\x18\x02 \x01(\tB\x03\xe0\x41\x05:a\xea\x41^\n)analyticsadmin.googleapis.com/AdSenseLink\x12\x31properties/{property}/adSenseLinks/{adsense_link}\"\x8e\x02\n\x18RollupPropertySourceLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fsource_property\x18\x02 \x01(\tB\x03\xe0\x41\x05:\xc0\x01\xea\x41\xbc\x01\n6analyticsadmin.googleapis.com/RollupPropertySourceLink\x12Mproperties/{property}/rollupPropertySourceLinks/{rollup_property_source_link}*\x19rollupPropertySourceLinks2\x18rollupPropertySourceLink\"\xf6\x05\n\x17ReportingDataAnnotation\x12,\n\x0f\x61nnotation_date\x18\x04 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x62\n\x15\x61nnotation_date_range\x18\x05 \x01(\x0b\x32\x41.google.analytics.admin.v1alpha.ReportingDataAnnotation.DateRangeH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x05\x63olor\x18\x06 \x01(\x0e\x32=.google.analytics.admin.v1alpha.ReportingDataAnnotation.ColorB\x03\xe0\x41\x02\x12\x1d\n\x10system_generated\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x61\n\tDateRange\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\"i\n\x05\x43olor\x12\x15\n\x11\x43OLOR_UNSPECIFIED\x10\x00\x12\n\n\x06PURPLE\x10\x01\x12\t\n\x05\x42ROWN\x10\x02\x12\x08\n\x04\x42LUE\x10\x03\x12\t\n\x05GREEN\x10\x04\x12\x07\n\x03RED\x10\x05\x12\x08\n\x04\x43YAN\x10\x06\x12\n\n\x06ORANGE\x10\x07:\xba\x01\xea\x41\xb6\x01\n5analyticsadmin.googleapis.com/ReportingDataAnnotation\x12Jproperties/{property}/reportingDataAnnotations/{reporting_data_annotation}*\x18reportingDataAnnotations2\x17reportingDataAnnotationB\x08\n\x06target\"\xd2\x03\n\x15SubpropertySyncConfig\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12!\n\x11\x61pply_to_property\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12}\n%custom_dimension_and_metric_sync_mode\x18\x03 \x01(\x0e\x32I.google.analytics.admin.v1alpha.SubpropertySyncConfig.SynchronizationModeB\x03\xe0\x41\x02\"N\n\x13SynchronizationMode\x12$\n SYNCHRONIZATION_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x07\n\x03\x41LL\x10\x02:\xb0\x01\xea\x41\xac\x01\n3analyticsadmin.googleapis.com/SubpropertySyncConfig\x12\x46properties/{property}/subpropertySyncConfigs/{subproperty_sync_config}*\x16subpropertySyncConfigs2\x15subpropertySyncConfig*\xaa\x04\n\x10IndustryCategory\x12!\n\x1dINDUSTRY_CATEGORY_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTOMOTIVE\x10\x01\x12#\n\x1f\x42USINESS_AND_INDUSTRIAL_MARKETS\x10\x02\x12\x0b\n\x07\x46INANCE\x10\x03\x12\x0e\n\nHEALTHCARE\x10\x04\x12\x0e\n\nTECHNOLOGY\x10\x05\x12\n\n\x06TRAVEL\x10\x06\x12\t\n\x05OTHER\x10\x07\x12\x1a\n\x16\x41RTS_AND_ENTERTAINMENT\x10\x08\x12\x16\n\x12\x42\x45\x41UTY_AND_FITNESS\x10\t\x12\x18\n\x14\x42OOKS_AND_LITERATURE\x10\n\x12\x12\n\x0e\x46OOD_AND_DRINK\x10\x0b\x12\t\n\x05GAMES\x10\x0c\x12\x17\n\x13HOBBIES_AND_LEISURE\x10\r\x12\x13\n\x0fHOME_AND_GARDEN\x10\x0e\x12\x18\n\x14INTERNET_AND_TELECOM\x10\x0f\x12\x16\n\x12LAW_AND_GOVERNMENT\x10\x10\x12\x08\n\x04NEWS\x10\x11\x12\x16\n\x12ONLINE_COMMUNITIES\x10\x12\x12\x16\n\x12PEOPLE_AND_SOCIETY\x10\x13\x12\x14\n\x10PETS_AND_ANIMALS\x10\x14\x12\x0f\n\x0bREAL_ESTATE\x10\x15\x12\r\n\tREFERENCE\x10\x16\x12\x0b\n\x07SCIENCE\x10\x17\x12\n\n\x06SPORTS\x10\x18\x12\x16\n\x12JOBS_AND_EDUCATION\x10\x19\x12\x0c\n\x08SHOPPING\x10\x1a*f\n\x0cServiceLevel\x12\x1d\n\x19SERVICE_LEVEL_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_ANALYTICS_STANDARD\x10\x01\x12\x18\n\x14GOOGLE_ANALYTICS_360\x10\x02*J\n\tActorType\x12\x1a\n\x16\x41\x43TOR_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\x0b\n\x07SUPPORT\x10\x03*P\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x0b\n\x07UPDATED\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03*\x80\x06\n\x19\x43hangeHistoryResourceType\x12,\n(CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x43\x43OUNT\x10\x01\x12\x0c\n\x08PROPERTY\x10\x02\x12\x11\n\rFIREBASE_LINK\x10\x06\x12\x13\n\x0fGOOGLE_ADS_LINK\x10\x07\x12\x1b\n\x17GOOGLE_SIGNALS_SETTINGS\x10\x08\x12\x14\n\x10\x43ONVERSION_EVENT\x10\t\x12\x1f\n\x1bMEASUREMENT_PROTOCOL_SECRET\x10\n\x12\x14\n\x10\x43USTOM_DIMENSION\x10\x0b\x12\x11\n\rCUSTOM_METRIC\x10\x0c\x12\x1b\n\x17\x44\x41TA_RETENTION_SETTINGS\x10\r\x12%\n!DISPLAY_VIDEO_360_ADVERTISER_LINK\x10\x0e\x12.\n*DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL\x10\x0f\x12\x17\n\x13SEARCH_ADS_360_LINK\x10\x10\x12\x0f\n\x0b\x44\x41TA_STREAM\x10\x12\x12\x18\n\x14\x41TTRIBUTION_SETTINGS\x10\x14\x12\x15\n\x11\x45XPANDED_DATA_SET\x10\x15\x12\x11\n\rCHANNEL_GROUP\x10\x16\x12\x11\n\rBIGQUERY_LINK\x10\x17\x12!\n\x1d\x45NHANCED_MEASUREMENT_SETTINGS\x10\x18\x12\x1b\n\x17\x44\x41TA_REDACTION_SETTINGS\x10\x19\x12\'\n#SKADNETWORK_CONVERSION_VALUE_SCHEMA\x10\x1a\x12\x10\n\x0c\x41\x44SENSE_LINK\x10\x1b\x12\x0c\n\x08\x41UDIENCE\x10\x1c\x12\x15\n\x11\x45VENT_CREATE_RULE\x10\x1d\x12\r\n\tKEY_EVENT\x10\x1e\x12\x15\n\x11\x43\x41LCULATED_METRIC\x10\x1f\x12\x1d\n\x19REPORTING_DATA_ANNOTATION\x10 \x12\x1b\n\x17SUBPROPERTY_SYNC_CONFIG\x10!*s\n\x12GoogleSignalsState\x12$\n GOOGLE_SIGNALS_STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16GOOGLE_SIGNALS_ENABLED\x10\x01\x12\x1b\n\x17GOOGLE_SIGNALS_DISABLED\x10\x02*\x8e\x01\n\x14GoogleSignalsConsent\x12&\n\"GOOGLE_SIGNALS_CONSENT_UNSPECIFIED\x10\x00\x12$\n GOOGLE_SIGNALS_CONSENT_CONSENTED\x10\x02\x12(\n$GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED\x10\x01*{\n\x1dLinkProposalInitiatingProduct\x12\x30\n,LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED\x10\x00\x12\x14\n\x10GOOGLE_ANALYTICS\x10\x01\x12\x12\n\x0eLINKED_PRODUCT\x10\x02*\xc4\x01\n\x11LinkProposalState\x12#\n\x1fLINK_PROPOSAL_STATE_UNSPECIFIED\x10\x00\x12)\n%AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS\x10\x01\x12\'\n#AWAITING_REVIEW_FROM_LINKED_PRODUCT\x10\x02\x12\r\n\tWITHDRAWN\x10\x03\x12\x0c\n\x08\x44\x45\x43LINED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x12\x0c\n\x08OBSOLETE\x10\x06*\x82\x01\n\x0cPropertyType\x12\x1d\n\x19PROPERTY_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROPERTY_TYPE_ORDINARY\x10\x01\x12\x1d\n\x19PROPERTY_TYPE_SUBPROPERTY\x10\x02\x12\x18\n\x14PROPERTY_TYPE_ROLLUP\x10\x03*q\n\x0b\x43oarseValue\x12\x1c\n\x18\x43OARSE_VALUE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43OARSE_VALUE_LOW\x10\x01\x12\x17\n\x13\x43OARSE_VALUE_MEDIUM\x10\x02\x12\x15\n\x11\x43OARSE_VALUE_HIGH\x10\x03\x42\xcb\x01\n\"com.google.analytics.admin.v1alphaB\x0eResourcesProtoP\x01Z>cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpb\xea\x41R\n2marketingplatformadmin.googleapis.com/Organization\x12\x1corganizations/{organization}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -110,6 +110,8 @@ module V1alpha ReportingDataAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ReportingDataAnnotation").msgclass ReportingDataAnnotation::DateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ReportingDataAnnotation.DateRange").msgclass ReportingDataAnnotation::Color = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ReportingDataAnnotation.Color").enummodule + SubpropertySyncConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.SubpropertySyncConfig").msgclass + SubpropertySyncConfig::SynchronizationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.SubpropertySyncConfig.SynchronizationMode").enummodule IndustryCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.IndustryCategory").enummodule ServiceLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ServiceLevel").enummodule ActorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ActorType").enummodule diff --git a/google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/analytics_admin.rb b/google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/analytics_admin.rb index f6a5e9b340e1..734fd7d08e35 100644 --- a/google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/analytics_admin.rb +++ b/google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/analytics_admin.rb @@ -2705,6 +2705,10 @@ class DeleteRollupPropertySourceLinkRequest # @!attribute [rw] subproperty_event_filter # @return [::Google::Analytics::Admin::V1alpha::SubpropertyEventFilter] # Optional. The subproperty event filter to create on an ordinary property. + # @!attribute [rw] custom_dimension_and_metric_synchronization_mode + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig::SynchronizationMode] + # Optional. The subproperty feature synchronization mode for Custom + # Dimensions and Metrics class ProvisionSubpropertyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2990,6 +2994,70 @@ class SubmitUserDeletionResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Request message for GetSubpropertySyncConfig RPC. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the SubpropertySyncConfig to lookup. + # Format: + # properties/\\{ordinary_property_id}/subpropertySyncConfigs/\\{subproperty_id} + # Example: properties/1234/subpropertySyncConfigs/5678 + class GetSubpropertySyncConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListSubpropertySyncConfigs RPC. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the property. + # Format: properties/property_id + # Example: properties/123 + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of resources to return. The service may return + # fewer than this value, even if there are additional pages. If unspecified, + # at most 50 resources will be returned. The maximum value is 200; (higher + # values will be coerced to the maximum) + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListSubpropertySyncConfig` call. Provide this to retrieve the subsequent + # page. When paginating, all other parameters provided to + # `ListSubpropertySyncConfig` must match the call that provided the page + # token. + class ListSubpropertySyncConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListSubpropertySyncConfigs RPC. + # @!attribute [rw] subproperty_sync_configs + # @return [::Array<::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig>] + # List of Subproperty Sync Configs. + # @!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 ListSubpropertySyncConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateSubpropertySyncConfig RPC. + # @!attribute [rw] subproperty_sync_config + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # Required. The SubpropertySyncConfig to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. Field names must be in snake case + # (for example, "field_to_update"). Omitted fields will not be updated. To + # replace the entire entity, use one path with the string "*" to match all + # fields. + class UpdateSubpropertySyncConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/resources.rb b/google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/resources.rb index 4b2109e11ee4..dc5c79d977cc 100644 --- a/google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/resources.rb +++ b/google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/resources.rb @@ -607,140 +607,145 @@ class ChangeHistoryChange # @return [::Google::Analytics::Admin::V1alpha::Account] # A snapshot of an Account resource in change history. # - # Note: The following fields are mutually exclusive: `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] property # @return [::Google::Analytics::Admin::V1alpha::Property] # A snapshot of a Property resource in change history. # - # Note: The following fields are mutually exclusive: `property`, `account`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `property`, `account`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] firebase_link # @return [::Google::Analytics::Admin::V1alpha::FirebaseLink] # A snapshot of a FirebaseLink resource in change history. # - # Note: The following fields are mutually exclusive: `firebase_link`, `account`, `property`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `firebase_link`, `account`, `property`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] google_ads_link # @return [::Google::Analytics::Admin::V1alpha::GoogleAdsLink] # A snapshot of a GoogleAdsLink resource in change history. # - # Note: The following fields are mutually exclusive: `google_ads_link`, `account`, `property`, `firebase_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `google_ads_link`, `account`, `property`, `firebase_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] google_signals_settings # @return [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings] # A snapshot of a GoogleSignalsSettings resource in change history. # - # Note: The following fields are mutually exclusive: `google_signals_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `google_signals_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] display_video_360_advertiser_link # @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink] # A snapshot of a DisplayVideo360AdvertiserLink resource in change # history. # - # Note: The following fields are mutually exclusive: `display_video_360_advertiser_link`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `display_video_360_advertiser_link`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] display_video_360_advertiser_link_proposal # @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal] # A snapshot of a DisplayVideo360AdvertiserLinkProposal resource in # change history. # - # Note: The following fields are mutually exclusive: `display_video_360_advertiser_link_proposal`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `display_video_360_advertiser_link_proposal`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] conversion_event # @return [::Google::Analytics::Admin::V1alpha::ConversionEvent] # A snapshot of a ConversionEvent resource in change history. # - # Note: The following fields are mutually exclusive: `conversion_event`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `conversion_event`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] measurement_protocol_secret # @return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] # A snapshot of a MeasurementProtocolSecret resource in change history. # - # Note: The following fields are mutually exclusive: `measurement_protocol_secret`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `measurement_protocol_secret`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] custom_dimension # @return [::Google::Analytics::Admin::V1alpha::CustomDimension] # A snapshot of a CustomDimension resource in change history. # - # Note: The following fields are mutually exclusive: `custom_dimension`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `custom_dimension`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] custom_metric # @return [::Google::Analytics::Admin::V1alpha::CustomMetric] # A snapshot of a CustomMetric resource in change history. # - # Note: The following fields are mutually exclusive: `custom_metric`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `custom_metric`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] data_retention_settings # @return [::Google::Analytics::Admin::V1alpha::DataRetentionSettings] # A snapshot of a data retention settings resource in change history. # - # Note: The following fields are mutually exclusive: `data_retention_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `data_retention_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_ads_360_link # @return [::Google::Analytics::Admin::V1alpha::SearchAds360Link] # A snapshot of a SearchAds360Link resource in change history. # - # Note: The following fields are mutually exclusive: `search_ads_360_link`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `search_ads_360_link`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] data_stream # @return [::Google::Analytics::Admin::V1alpha::DataStream] # A snapshot of a DataStream resource in change history. # - # Note: The following fields are mutually exclusive: `data_stream`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `data_stream`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] attribution_settings # @return [::Google::Analytics::Admin::V1alpha::AttributionSettings] # A snapshot of AttributionSettings resource in change history. # - # Note: The following fields are mutually exclusive: `attribution_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `attribution_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] expanded_data_set # @return [::Google::Analytics::Admin::V1alpha::ExpandedDataSet] # A snapshot of an ExpandedDataSet resource in change history. # - # Note: The following fields are mutually exclusive: `expanded_data_set`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `expanded_data_set`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] channel_group # @return [::Google::Analytics::Admin::V1alpha::ChannelGroup] # A snapshot of a ChannelGroup resource in change history. # - # Note: The following fields are mutually exclusive: `channel_group`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `channel_group`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bigquery_link # @return [::Google::Analytics::Admin::V1alpha::BigQueryLink] # A snapshot of a BigQuery link resource in change history. # - # Note: The following fields are mutually exclusive: `bigquery_link`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `bigquery_link`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] enhanced_measurement_settings # @return [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings] # A snapshot of EnhancedMeasurementSettings resource in change history. # - # Note: The following fields are mutually exclusive: `enhanced_measurement_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `enhanced_measurement_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] data_redaction_settings # @return [::Google::Analytics::Admin::V1alpha::DataRedactionSettings] # A snapshot of DataRedactionSettings resource in change history. # - # Note: The following fields are mutually exclusive: `data_redaction_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `data_redaction_settings`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] skadnetwork_conversion_value_schema # @return [::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema] # A snapshot of SKAdNetworkConversionValueSchema resource in change # history. # - # Note: The following fields are mutually exclusive: `skadnetwork_conversion_value_schema`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `skadnetwork_conversion_value_schema`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] adsense_link # @return [::Google::Analytics::Admin::V1alpha::AdSenseLink] # A snapshot of an AdSenseLink resource in change history. # - # Note: The following fields are mutually exclusive: `adsense_link`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `adsense_link`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] audience # @return [::Google::Analytics::Admin::V1alpha::Audience] # A snapshot of an Audience resource in change history. # - # Note: The following fields are mutually exclusive: `audience`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `audience`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] event_create_rule # @return [::Google::Analytics::Admin::V1alpha::EventCreateRule] # A snapshot of an EventCreateRule resource in change history. # - # Note: The following fields are mutually exclusive: `event_create_rule`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `key_event`, `calculated_metric`, `reporting_data_annotation`. 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: `event_create_rule`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `key_event`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] key_event # @return [::Google::Analytics::Admin::V1alpha::KeyEvent] # A snapshot of a KeyEvent resource in change history. # - # Note: The following fields are mutually exclusive: `key_event`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `calculated_metric`, `reporting_data_annotation`. 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: `key_event`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `calculated_metric`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] calculated_metric # @return [::Google::Analytics::Admin::V1alpha::CalculatedMetric] # A snapshot of a CalculatedMetric resource in change history. # - # Note: The following fields are mutually exclusive: `calculated_metric`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `reporting_data_annotation`. 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: `calculated_metric`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `reporting_data_annotation`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] reporting_data_annotation # @return [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation] # A snapshot of a ReportingDataAnnotation resource in change history. # - # Note: The following fields are mutually exclusive: `reporting_data_annotation`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`. 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: `reporting_data_annotation`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `subproperty_sync_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] subproperty_sync_config + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig] + # A snapshot of a SubpropertySyncConfig resource in change history. + # + # Note: The following fields are mutually exclusive: `subproperty_sync_config`, `account`, `property`, `firebase_link`, `google_ads_link`, `google_signals_settings`, `display_video_360_advertiser_link`, `display_video_360_advertiser_link_proposal`, `conversion_event`, `measurement_protocol_secret`, `custom_dimension`, `custom_metric`, `data_retention_settings`, `search_ads_360_link`, `data_stream`, `attribution_settings`, `expanded_data_set`, `channel_group`, `bigquery_link`, `enhanced_measurement_settings`, `data_redaction_settings`, `skadnetwork_conversion_value_schema`, `adsense_link`, `audience`, `event_create_rule`, `key_event`, `calculated_metric`, `reporting_data_annotation`. If a field in that set is populated, all other fields in the set will automatically be cleared. class ChangeHistoryResource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1748,6 +1753,51 @@ module Color end end + # Subproperty synchronization configuration controls how ordinary property + # configurations are synchronized to subproperties. This resource is + # provisioned automatically for each subproperty. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Format: + # properties/\\{ordinary_property_id}/subpropertySyncConfigs/\\{subproperty_id} + # Example: properties/1234/subpropertySyncConfigs/5678 + # @!attribute [r] apply_to_property + # @return [::String] + # Output only. Immutable. Resource name of the Subproperty that these + # settings apply to. + # @!attribute [rw] custom_dimension_and_metric_sync_mode + # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig::SynchronizationMode] + # Required. Specifies the Custom Dimension / Metric synchronization mode for + # the Subproperty. + # + # If set to ALL, Custom Dimension / Metric synchronization will be + # immediately enabled. Local configuration of Custom Dimensions / Metrics + # will not be allowed on the Subproperty so long as the synchronization mode + # is set to ALL. + # + # If set to NONE, Custom Dimensions / Metric synchronization is disabled. + # Custom Dimensions / Metrics must be configured explicitly on the + # Subproperty. + class SubpropertySyncConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Synchronization modes for a Subproperty + module SynchronizationMode + # Synchronization mode unknown or not specified. + SYNCHRONIZATION_MODE_UNSPECIFIED = 0 + + # Entities are not synchronized. + # Local edits are allowed on the Subproperty. + NONE = 1 + + # Entities are synchronized from Parent Property. + # Local mutations are not allowed on the Subproperty (Create / Update / + # Delete) + ALL = 2 + end + end + # The category selected for this property, used for industry benchmarking. module IndustryCategory # Industry category unspecified @@ -1960,6 +2010,9 @@ module ChangeHistoryResourceType # ReportingDataAnnotation resource REPORTING_DATA_ANNOTATION = 32 + + # SubpropertySyncConfig resource + SUBPROPERTY_SYNC_CONFIG = 33 end # Status of the Google Signals settings. diff --git a/google-analytics-admin-v1alpha/snippets/analytics_admin_service/get_subproperty_sync_config.rb b/google-analytics-admin-v1alpha/snippets/analytics_admin_service/get_subproperty_sync_config.rb new file mode 100644 index 000000000000..d7177a14912d --- /dev/null +++ b/google-analytics-admin-v1alpha/snippets/analytics_admin_service/get_subproperty_sync_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetSubpropertySyncConfig_sync] +require "google/analytics/admin/v1alpha" + +## +# Snippet for the get_subproperty_sync_config call in the AnalyticsAdminService 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::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#get_subproperty_sync_config. +# +def get_subproperty_sync_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest.new + + # Call the get_subproperty_sync_config method. + result = client.get_subproperty_sync_config request + + # The returned object is of type Google::Analytics::Admin::V1alpha::SubpropertySyncConfig. + p result +end +# [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetSubpropertySyncConfig_sync] diff --git a/google-analytics-admin-v1alpha/snippets/analytics_admin_service/list_subproperty_sync_configs.rb b/google-analytics-admin-v1alpha/snippets/analytics_admin_service/list_subproperty_sync_configs.rb new file mode 100644 index 000000000000..ce5d7d4745c0 --- /dev/null +++ b/google-analytics-admin-v1alpha/snippets/analytics_admin_service/list_subproperty_sync_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListSubpropertySyncConfigs_sync] +require "google/analytics/admin/v1alpha" + +## +# Snippet for the list_subproperty_sync_configs call in the AnalyticsAdminService 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::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#list_subproperty_sync_configs. +# +def list_subproperty_sync_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest.new + + # Call the list_subproperty_sync_configs method. + result = client.list_subproperty_sync_configs 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::Analytics::Admin::V1alpha::SubpropertySyncConfig. + p item + end +end +# [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListSubpropertySyncConfigs_sync] diff --git a/google-analytics-admin-v1alpha/snippets/analytics_admin_service/update_subproperty_sync_config.rb b/google-analytics-admin-v1alpha/snippets/analytics_admin_service/update_subproperty_sync_config.rb new file mode 100644 index 000000000000..feec5f8de842 --- /dev/null +++ b/google-analytics-admin-v1alpha/snippets/analytics_admin_service/update_subproperty_sync_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateSubpropertySyncConfig_sync] +require "google/analytics/admin/v1alpha" + +## +# Snippet for the update_subproperty_sync_config call in the AnalyticsAdminService 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::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#update_subproperty_sync_config. +# +def update_subproperty_sync_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest.new + + # Call the update_subproperty_sync_config method. + result = client.update_subproperty_sync_config request + + # The returned object is of type Google::Analytics::Admin::V1alpha::SubpropertySyncConfig. + p result +end +# [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateSubpropertySyncConfig_sync] diff --git a/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json b/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json index 7026edc3065c..a3bf479d7999 100644 --- a/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json +++ b/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json @@ -6250,6 +6250,126 @@ "type": "FULL" } ] + }, + { + "region_tag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListSubpropertySyncConfigs_sync", + "title": "Snippet for the list_subproperty_sync_configs call in the AnalyticsAdminService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#list_subproperty_sync_configs.", + "file": "analytics_admin_service/list_subproperty_sync_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_subproperty_sync_configs", + "full_name": "::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#list_subproperty_sync_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsResponse", + "client": { + "short_name": "AnalyticsAdminService::Client", + "full_name": "::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client" + }, + "method": { + "short_name": "ListSubpropertySyncConfigs", + "full_name": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListSubpropertySyncConfigs", + "service": { + "short_name": "AnalyticsAdminService", + "full_name": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateSubpropertySyncConfig_sync", + "title": "Snippet for the update_subproperty_sync_config call in the AnalyticsAdminService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#update_subproperty_sync_config.", + "file": "analytics_admin_service/update_subproperty_sync_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_subproperty_sync_config", + "full_name": "::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#update_subproperty_sync_config", + "async": false, + "parameters": [ + { + "type": "::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig", + "client": { + "short_name": "AnalyticsAdminService::Client", + "full_name": "::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client" + }, + "method": { + "short_name": "UpdateSubpropertySyncConfig", + "full_name": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateSubpropertySyncConfig", + "service": { + "short_name": "AnalyticsAdminService", + "full_name": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetSubpropertySyncConfig_sync", + "title": "Snippet for the get_subproperty_sync_config call in the AnalyticsAdminService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#get_subproperty_sync_config.", + "file": "analytics_admin_service/get_subproperty_sync_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_subproperty_sync_config", + "full_name": "::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client#get_subproperty_sync_config", + "async": false, + "parameters": [ + { + "type": "::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig", + "client": { + "short_name": "AnalyticsAdminService::Client", + "full_name": "::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client" + }, + "method": { + "short_name": "GetSubpropertySyncConfig", + "full_name": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetSubpropertySyncConfig", + "service": { + "short_name": "AnalyticsAdminService", + "full_name": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_paths_test.rb b/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_paths_test.rb index b0de0231967c..72bb5c4b1e75 100644 --- a/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_paths_test.rb +++ b/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_paths_test.rb @@ -451,4 +451,16 @@ def test_subproperty_event_filter_path assert_equal "properties/value0/subpropertyEventFilters/value1", path end end + + def test_subproperty_sync_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.subproperty_sync_config_path property: "value0", subproperty_sync_config: "value1" + assert_equal "properties/value0/subpropertySyncConfigs/value1", path + end + end end diff --git a/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_rest_test.rb b/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_rest_test.rb index f17cff83048b..3e5ef333f054 100644 --- a/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_rest_test.rb +++ b/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_rest_test.rb @@ -7992,6 +7992,7 @@ def test_provision_subproperty # Create request parameters for a unary method. subproperty = {} subproperty_event_filter = {} + custom_dimension_and_metric_synchronization_mode = :SYNCHRONIZATION_MODE_UNSPECIFIED provision_subproperty_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -8007,27 +8008,27 @@ def test_provision_subproperty end # Use hash object - client.provision_subproperty({ subproperty: subproperty, subproperty_event_filter: subproperty_event_filter }) do |_result, response| + client.provision_subproperty({ subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.provision_subproperty subproperty: subproperty, subproperty_event_filter: subproperty_event_filter do |_result, response| + client.provision_subproperty subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.provision_subproperty ::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest.new(subproperty: subproperty, subproperty_event_filter: subproperty_event_filter) do |_result, response| + client.provision_subproperty ::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest.new(subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.provision_subproperty({ subproperty: subproperty, subproperty_event_filter: subproperty_event_filter }, call_options) do |_result, response| + client.provision_subproperty({ subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.provision_subproperty(::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest.new(subproperty: subproperty, subproperty_event_filter: subproperty_event_filter), call_options) do |_result, response| + client.provision_subproperty(::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest.new(subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -8641,6 +8642,171 @@ def test_submit_user_deletion end end + def test_list_subproperty_sync_configs + # Create test objects. + client_result = ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_subproperty_sync_configs_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::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::ServiceStub.stub :transcode_list_subproperty_sync_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_subproperty_sync_configs_client_stub do + # Create client + client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_subproperty_sync_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_subproperty_sync_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_subproperty_sync_configs ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest.new(parent: parent, 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_subproperty_sync_configs({ parent: parent, 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_subproperty_sync_configs(::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest.new(parent: parent, 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_subproperty_sync_configs_client_stub.call_count + end + end + end + + def test_update_subproperty_sync_config + # Create test objects. + client_result = ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + subproperty_sync_config = {} + update_mask = {} + + update_subproperty_sync_config_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::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::ServiceStub.stub :transcode_update_subproperty_sync_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_subproperty_sync_config_client_stub do + # Create client + client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_subproperty_sync_config({ subproperty_sync_config: subproperty_sync_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_subproperty_sync_config subproperty_sync_config: subproperty_sync_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_subproperty_sync_config ::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest.new(subproperty_sync_config: subproperty_sync_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_subproperty_sync_config({ subproperty_sync_config: subproperty_sync_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_subproperty_sync_config(::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest.new(subproperty_sync_config: subproperty_sync_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_subproperty_sync_config_client_stub.call_count + end + end + end + + def test_get_subproperty_sync_config + # Create test objects. + client_result = ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_subproperty_sync_config_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::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::ServiceStub.stub :transcode_get_subproperty_sync_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_subproperty_sync_config_client_stub do + # Create client + client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_subproperty_sync_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_subproperty_sync_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_subproperty_sync_config ::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_subproperty_sync_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_subproperty_sync_config(::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_subproperty_sync_config_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_test.rb b/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_test.rb index e2a5785eb625..f1f2ca950f38 100644 --- a/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_test.rb +++ b/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_test.rb @@ -8812,12 +8812,14 @@ def test_provision_subproperty # Create request parameters for a unary method. subproperty = {} subproperty_event_filter = {} + custom_dimension_and_metric_synchronization_mode = :SYNCHRONIZATION_MODE_UNSPECIFIED provision_subproperty_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :provision_subproperty, name assert_kind_of ::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest, request assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Analytics::Admin::V1alpha::Property), request["subproperty"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Analytics::Admin::V1alpha::SubpropertyEventFilter), request["subproperty_event_filter"] + assert_equal :SYNCHRONIZATION_MODE_UNSPECIFIED, request["custom_dimension_and_metric_synchronization_mode"] refute_nil options end @@ -8828,31 +8830,31 @@ def test_provision_subproperty end # Use hash object - client.provision_subproperty({ subproperty: subproperty, subproperty_event_filter: subproperty_event_filter }) do |response, operation| + client.provision_subproperty({ subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.provision_subproperty subproperty: subproperty, subproperty_event_filter: subproperty_event_filter do |response, operation| + client.provision_subproperty subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.provision_subproperty ::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest.new(subproperty: subproperty, subproperty_event_filter: subproperty_event_filter) do |response, operation| + client.provision_subproperty ::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest.new(subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.provision_subproperty({ subproperty: subproperty, subproperty_event_filter: subproperty_event_filter }, grpc_options) do |response, operation| + client.provision_subproperty({ subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.provision_subproperty(::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest.new(subproperty: subproperty, subproperty_event_filter: subproperty_event_filter), grpc_options) do |response, operation| + client.provision_subproperty(::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyRequest.new(subproperty: subproperty, subproperty_event_filter: subproperty_event_filter, custom_dimension_and_metric_synchronization_mode: custom_dimension_and_metric_synchronization_mode), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end @@ -9531,6 +9533,191 @@ def test_submit_user_deletion end end + def test_list_subproperty_sync_configs + # Create GRPC objects. + grpc_response = ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsResponse.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" + page_size = 42 + page_token = "hello world" + + list_subproperty_sync_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_subproperty_sync_configs, name + assert_kind_of ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_subproperty_sync_configs_client_stub do + # Create client + client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_subproperty_sync_configs({ parent: parent, 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_subproperty_sync_configs parent: parent, 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_subproperty_sync_configs ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest.new(parent: parent, 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_subproperty_sync_configs({ parent: parent, 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_subproperty_sync_configs(::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest.new(parent: parent, 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_subproperty_sync_configs_client_stub.call_rpc_count + end + end + + def test_update_subproperty_sync_config + # Create GRPC objects. + grpc_response = ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.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. + subproperty_sync_config = {} + update_mask = {} + + update_subproperty_sync_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_subproperty_sync_config, name + assert_kind_of ::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig), request["subproperty_sync_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_subproperty_sync_config_client_stub do + # Create client + client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_subproperty_sync_config({ subproperty_sync_config: subproperty_sync_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_subproperty_sync_config subproperty_sync_config: subproperty_sync_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_subproperty_sync_config ::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest.new(subproperty_sync_config: subproperty_sync_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_subproperty_sync_config({ subproperty_sync_config: subproperty_sync_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_subproperty_sync_config(::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest.new(subproperty_sync_config: subproperty_sync_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_subproperty_sync_config_client_stub.call_rpc_count + end + end + + def test_get_subproperty_sync_config + # Create GRPC objects. + grpc_response = ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.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" + + get_subproperty_sync_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_subproperty_sync_config, name + assert_kind_of ::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_subproperty_sync_config_client_stub do + # Create client + client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_subproperty_sync_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_subproperty_sync_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_subproperty_sync_config ::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_subproperty_sync_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_subproperty_sync_config(::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest.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, get_subproperty_sync_config_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From 6c2400763f943ec04b90d381f7564bb1ecf97e3b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:18:54 -0700 Subject: [PATCH 093/457] chore(main): release google-cloud-spanner-v1 1.9.0 (#30505) --- .release-please-manifest.json | 2 +- google-cloud-spanner-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/spanner/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.spanner.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a8df2d2ecdf8..a51c88d6527a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -719,7 +719,7 @@ "google-cloud-spanner-admin-database-v1+FILLER": "0.0.0", "google-cloud-spanner-admin-instance-v1": "2.1.0", "google-cloud-spanner-admin-instance-v1+FILLER": "0.0.0", - "google-cloud-spanner-v1": "1.8.0", + "google-cloud-spanner-v1": "1.9.0", "google-cloud-spanner-v1+FILLER": "0.0.0", "google-cloud-speech": "2.0.2", "google-cloud-speech+FILLER": "0.0.0", diff --git a/google-cloud-spanner-v1/CHANGELOG.md b/google-cloud-spanner-v1/CHANGELOG.md index fe89feaeabc6..5e1977749ccd 100644 --- a/google-cloud-spanner-v1/CHANGELOG.md +++ b/google-cloud-spanner-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.9.0 (2025-06-13) + +#### Features + +* add new change_stream.proto ([#30493](https://github.com/googleapis/google-cloud-ruby/issues/30493)) + ### 1.8.0 (2025-05-12) #### Features diff --git a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb index 62ae001c2bfb..9b1cd35fca30 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Spanner module V1 - VERSION = "1.8.0" + VERSION = "1.9.0" end end end diff --git a/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json b/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json index e6d4786ba638..7faa1878ff23 100644 --- a/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json +++ b/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-spanner-v1", - "version": "1.8.0", + "version": "1.9.0", "language": "RUBY", "apis": [ { From 74f3d0feee5480b51e49c80d71a7c00feaa7ca8b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:19:23 -0700 Subject: [PATCH 094/457] feat: Added support for hierarchical enrollment in Quota Adjuster consumer API (#30506) docs: Added 2 new fields in `.google.api.cloudquotas.v1beta.QuotaAdjusterSettings` docs: Added inherited and inherited_from in `.google.api.cloudquotas.v1beta.QuotaAdjusterSettings` docs: Added support for folder and organization level enrollment --- .../v1beta/quota_adjuster_settings_pb.rb | 2 +- .../quota_adjuster_settings_manager/paths.rb | 49 ++++++++++++++--- .../rest/service_stub.rb | 30 +++++++++++ .../v1beta/quota_adjuster_settings.rb | 21 ++++++-- .../api/cloudquotas/v1beta/resources.rb | 52 ++++++++++--------- ...ta_adjuster_settings_manager_paths_test.rb | 6 +++ 6 files changed, 123 insertions(+), 37 deletions(-) diff --git a/google-cloud-cloud_quotas-v1beta/lib/google/api/cloudquotas/v1beta/quota_adjuster_settings_pb.rb b/google-cloud-cloud_quotas-v1beta/lib/google/api/cloudquotas/v1beta/quota_adjuster_settings_pb.rb index 32ac1f4bc6fb..7d9b865eea4d 100644 --- a/google-cloud-cloud_quotas-v1beta/lib/google/api/cloudquotas/v1beta/quota_adjuster_settings_pb.rb +++ b/google-cloud-cloud_quotas-v1beta/lib/google/api/cloudquotas/v1beta/quota_adjuster_settings_pb.rb @@ -12,7 +12,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n;google/api/cloudquotas/v1beta/quota_adjuster_settings.proto\x12\x1dgoogle.api.cloudquotas.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x1fGetQuotaAdjusterSettingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudquotas.googleapis.com/QuotaAdjusterSettings\"\xd2\x01\n\"UpdateQuotaAdjusterSettingsRequest\x12Z\n\x17quota_adjuster_settings\x18\x01 \x01(\x0b\x32\x34.google.api.cloudquotas.v1beta.QuotaAdjusterSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xbb\x03\n\x15QuotaAdjusterSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12X\n\nenablement\x18\x02 \x01(\x0e\x32?.google.api.cloudquotas.v1beta.QuotaAdjusterSettings.EnablementB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x01\"C\n\nEnablement\x12\x1a\n\x16\x45NABLEMENT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\xa6\x01\xea\x41\xa2\x01\n0cloudquotas.googleapis.com/QuotaAdjusterSettings\x12=projects/{project}/locations/{location}/quotaAdjusterSettings*\x15quotaAdjusterSettings2\x15quotaAdjusterSettingsR\x01\x01\x32\x83\x05\n\x1cQuotaAdjusterSettingsManager\x12\xb3\x02\n\x1bUpdateQuotaAdjusterSettings\x12\x41.google.api.cloudquotas.v1beta.UpdateQuotaAdjusterSettingsRequest\x1a\x34.google.api.cloudquotas.v1beta.QuotaAdjusterSettings\"\x9a\x01\xda\x41#quota_adjuster_settings,update_mask\x82\xd3\xe4\x93\x02n2S/v1beta/{quota_adjuster_settings.name=projects/*/locations/*/quotaAdjusterSettings}:\x17quota_adjuster_settings\x12\xdc\x01\n\x18GetQuotaAdjusterSettings\x12>.google.api.cloudquotas.v1beta.GetQuotaAdjusterSettingsRequest\x1a\x34.google.api.cloudquotas.v1beta.QuotaAdjusterSettings\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1beta/{name=projects/*/locations/*/quotaAdjusterSettings}\x1aN\xca\x41\x1a\x63loudquotas.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf1\x01\n!com.google.api.cloudquotas.v1betaB\x1aQuotaAdjusterSettingsProtoP\x01ZEcloud.google.com/go/cloudquotas/apiv1beta/cloudquotaspb;cloudquotaspb\xaa\x02\x1fGoogle.Cloud.CloudQuotas.V1Beta\xca\x02\x1fGoogle\\Cloud\\CloudQuotas\\V1beta\xea\x02\"Google::Cloud::CloudQuotas::V1betab\x06proto3" +descriptor_data = "\n;google/api/cloudquotas/v1beta/quota_adjuster_settings.proto\x12\x1dgoogle.api.cloudquotas.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x1fGetQuotaAdjusterSettingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudquotas.googleapis.com/QuotaAdjusterSettings\"\xd2\x01\n\"UpdateQuotaAdjusterSettingsRequest\x12Z\n\x17quota_adjuster_settings\x18\x01 \x01(\x0b\x32\x34.google.api.cloudquotas.v1beta.QuotaAdjusterSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xf6\x04\n\x15QuotaAdjusterSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12X\n\nenablement\x18\x02 \x01(\x0e\x32?.google.api.cloudquotas.v1beta.QuotaAdjusterSettings.EnablementB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tinherited\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0einherited_from\x18\x08 \x01(\tB\x03\xe0\x41\x03\"C\n\nEnablement\x12\x1a\n\x16\x45NABLEMENT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\xac\x02\xea\x41\xa8\x02\n0cloudquotas.googleapis.com/QuotaAdjusterSettings\x12=projects/{project}/locations/{location}/quotaAdjusterSettings\x12Gorganizations/{organization}/locations/{location}/quotaAdjusterSettings\x12;folders/{folder}/locations/{location}/quotaAdjusterSettings*\x15quotaAdjusterSettings2\x15quotaAdjusterSettingsR\x01\x01\x32\xec\x07\n\x1cQuotaAdjusterSettingsManager\x12\x98\x04\n\x1bUpdateQuotaAdjusterSettings\x12\x41.google.api.cloudquotas.v1beta.UpdateQuotaAdjusterSettingsRequest\x1a\x34.google.api.cloudquotas.v1beta.QuotaAdjusterSettings\"\xff\x02\xda\x41#quota_adjuster_settings,update_mask\x82\xd3\xe4\x93\x02\xd2\x02\x32S/v1beta/{quota_adjuster_settings.name=projects/*/locations/*/quotaAdjusterSettings}:\x17quota_adjuster_settingsZm2R/v1beta/{quota_adjuster_settings.name=folders/*/locations/*/quotaAdjusterSettings}:\x17quota_adjuster_settingsZs2X/v1beta/{quota_adjuster_settings.name=organizations/*/locations/*/quotaAdjusterSettings}:\x17quota_adjuster_settings\x12\xe0\x02\n\x18GetQuotaAdjusterSettings\x12>.google.api.cloudquotas.v1beta.GetQuotaAdjusterSettingsRequest\x1a\x34.google.api.cloudquotas.v1beta.QuotaAdjusterSettings\"\xcd\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbf\x01\x12;/v1beta/{name=projects/*/locations/*/quotaAdjusterSettings}Z<\x12:/v1beta/{name=folders/*/locations/*/quotaAdjusterSettings}ZB\x12@/v1beta/{name=organizations/*/locations/*/quotaAdjusterSettings}\x1aN\xca\x41\x1a\x63loudquotas.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf1\x01\n!com.google.api.cloudquotas.v1betaB\x1aQuotaAdjusterSettingsProtoP\x01ZEcloud.google.com/go/cloudquotas/apiv1beta/cloudquotaspb;cloudquotaspb\xaa\x02\x1fGoogle.Cloud.CloudQuotas.V1Beta\xca\x02\x1fGoogle\\Cloud\\CloudQuotas\\V1beta\xea\x02\"Google::Cloud::CloudQuotas::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/paths.rb b/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/paths.rb index b0e6099236ab..183836950535 100644 --- a/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/paths.rb +++ b/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/paths.rb @@ -27,18 +27,53 @@ module Paths ## # Create a fully-qualified QuotaAdjusterSettings resource string. # - # The resource will be in the following format: + # @overload quota_adjuster_settings_path(project:, location:) + # The resource will be in the following format: # - # `projects/{project}/locations/{location}/quotaAdjusterSettings` + # `projects/{project}/locations/{location}/quotaAdjusterSettings` # - # @param project [String] - # @param location [String] + # @param project [String] + # @param location [String] + # + # @overload quota_adjuster_settings_path(organization:, location:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/quotaAdjusterSettings` + # + # @param organization [String] + # @param location [String] + # + # @overload quota_adjuster_settings_path(folder:, location:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/quotaAdjusterSettings` + # + # @param folder [String] + # @param location [String] # # @return [::String] - def quota_adjuster_settings_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + def quota_adjuster_settings_path **args + resources = { + "location:project" => (proc do |project:, location:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/quotaAdjusterSettings" + end), + "location:organization" => (proc do |organization:, location:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/quotaAdjusterSettings" + end), + "folder:location" => (proc do |folder:, location:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/quotaAdjusterSettings" + end) + } - "projects/#{project}/locations/#{location}/quotaAdjusterSettings" + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) end extend self diff --git a/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/service_stub.rb b/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/service_stub.rb index 5034757a2e2a..3f6f6f43b90d 100644 --- a/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/service_stub.rb +++ b/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/service_stub.rb @@ -172,6 +172,22 @@ def self.transcode_update_quota_adjuster_settings_request request_pb ["quota_adjuster_settings.name", %r{^projects/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false] ] ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{quota_adjuster_settings.name}", + body: "quota_adjuster_settings", + matches: [ + ["quota_adjuster_settings.name", %r{^folders/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{quota_adjuster_settings.name}", + body: "quota_adjuster_settings", + matches: [ + ["quota_adjuster_settings.name", %r{^organizations/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -193,6 +209,20 @@ def self.transcode_get_quota_adjuster_settings_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/quotaAdjusterSettings/?$}, false] + ] + ) transcoder.transcode request_pb end end diff --git a/google-cloud-cloud_quotas-v1beta/proto_docs/google/api/cloudquotas/v1beta/quota_adjuster_settings.rb b/google-cloud-cloud_quotas-v1beta/proto_docs/google/api/cloudquotas/v1beta/quota_adjuster_settings.rb index 4fd10b3cce0f..fbcd614fa938 100644 --- a/google-cloud-cloud_quotas-v1beta/proto_docs/google/api/cloudquotas/v1beta/quota_adjuster_settings.rb +++ b/google-cloud-cloud_quotas-v1beta/proto_docs/google/api/cloudquotas/v1beta/quota_adjuster_settings.rb @@ -52,12 +52,13 @@ class UpdateQuotaAdjusterSettingsRequest # Adjuster. # @!attribute [rw] name # @return [::String] - # Identifier. Name of the configuration, in the following format: - # `projects/PROJECT_NUMBER/locations/global/quotaAdjusterSettings`. - # Replace PROJECT_NUMBER with the project number for your project. + # Identifier. Name of the config would be of the format: + # projects/PROJECT_NUMBER/locations/global/quotaAdjusterSettings + # folders/FOLDER_NUMBER/locations/global/quotaAdjusterSettings + # organizations/ORGANIZATION_NUMBER/locations/global/quotaAdjusterSettings # @!attribute [rw] enablement # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings::Enablement] - # Required. The configured value of the enablement at the given resource. + # Optional. The configured value of the enablement at the given resource. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The timestamp when the QuotaAdjusterSettings resource was last @@ -68,6 +69,18 @@ class UpdateQuotaAdjusterSettingsRequest # provided on update and does not match the current server's ETag in the # QuotaAdjusterSettings, the request is blocked and returns an ABORTED error. # See https://google.aip.dev/134#etags for more details on ETags. + # @!attribute [rw] inherited + # @return [::Boolean] + # Optional. Indicates whether the setting is inherited or explicitly + # specified. + # @!attribute [r] inherited_from + # @return [::String] + # Output only. The resource container from which the setting is inherited. + # This refers to the nearest ancestor with enablement set (either ENABLED or + # DISABLED). The value can be an organizations/\\{organization_id}, + # folders/\\{folder_id}, or can be 'default' if no ancestor exists with + # enablement set. The value will be empty when enablement is directly set on + # this container. class QuotaAdjusterSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-cloud_quotas-v1beta/proto_docs/google/api/cloudquotas/v1beta/resources.rb b/google-cloud-cloud_quotas-v1beta/proto_docs/google/api/cloudquotas/v1beta/resources.rb index c629320a5416..a009746ee645 100644 --- a/google-cloud-cloud_quotas-v1beta/proto_docs/google/api/cloudquotas/v1beta/resources.rb +++ b/google-cloud-cloud_quotas-v1beta/proto_docs/google/api/cloudquotas/v1beta/resources.rb @@ -27,21 +27,21 @@ module V1beta # @return [::String] # Resource name of this QuotaInfo. # The ID component following "locations/" must be "global". - # Example: + # For example, # `projects/123/locations/global/services/compute.googleapis.com/quotaInfos/CpusPerProjectPerRegion` # @!attribute [rw] quota_id # @return [::String] # The id of the quota, which is unquie within the service. - # Example: `CpusPerProjectPerRegion` + # For example, `CpusPerProjectPerRegion` # @!attribute [rw] metric # @return [::String] # The metric of the quota. It specifies the resources consumption the quota # is defined for. - # Example: `compute.googleapis.com/cpus` + # For example, `compute.googleapis.com/cpus` # @!attribute [rw] service # @return [::String] # The name of the service in which the quota is defined. - # Example: `compute.googleapis.com` + # For example, `compute.googleapis.com` # @!attribute [rw] is_precise # @return [::Boolean] # Whether this is a precise quota. A precise quota is tracked with absolute @@ -50,8 +50,8 @@ module V1beta # @return [::String] # The reset time interval for the quota. Refresh interval applies to rate # quota only. - # Example: "minute" for per minute, "day" for per day, or "10 seconds" for - # every 10 seconds. + # For example, "minute" for per minute, "day" for per day, or "10 seconds" + # for every 10 seconds. # @!attribute [rw] container_type # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaInfo::ContainerType] # The container type of the QuotaInfo. @@ -146,25 +146,26 @@ module IneligibilityReason # @return [::String] # Required except in the CREATE requests. # The resource name of the quota preference. - # The ID component following "locations/" must be "global". - # Example: + # The path that follows `/locations` must be `/global`. + # For example: # `projects/123/locations/global/quotaPreferences/my-config-for-us-east1` # @!attribute [rw] dimensions # @return [::Google::Protobuf::Map{::String => ::String}] # Immutable. The dimensions that this quota preference applies to. The key of - # the map entry is the name of a dimension, such as "region", "zone", - # "network_id", and the value of the map entry is the dimension value. + # the map entry is the name of a dimension, such as `region`, `zone`, + # `network_id`, and the value of the map entry is the dimension value. # # If a dimension is missing from the map of dimensions, the quota preference # applies to all the dimension values except for those that have other quota # preferences configured for the specific value. # - # NOTE: QuotaPreferences can only be applied across all values of "user" and - # "resource" dimension. Do not set values for "user" or "resource" in the + # Note: QuotaPreferences can only be applied across all values of `user` and + # `resource` dimension. Do not set values for `user` or `resource` in the # dimension map. # - # Example: \\{"provider", "Foo Inc"} where "provider" is a service specific - # dimension. + # For example: `{"provider" : "Example Organization"}` where `provider` is a + # service-specific quota dimension and `Example Organization` is the provider + # name. # @!attribute [rw] quota_config # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaConfig] # Required. Preferred quota configuration. @@ -186,7 +187,7 @@ module IneligibilityReason # @!attribute [rw] quota_id # @return [::String] # Required. The id of the quota to which the quota preference is applied. A - # quota name is unique in the service. Example: `CpusPerProjectPerRegion` + # quota name is unique in the service. For example, `CpusPerProjectPerRegion` # @!attribute [r] reconciling # @return [::Boolean] # Output only. Is the quota preference pending Google Cloud approval and @@ -196,9 +197,9 @@ module IneligibilityReason # The reason / justification for this quota preference. # @!attribute [rw] contact_email # @return [::String] - # Input only. An email address that can be used to contact the the user, in - # case Google Cloud needs more information to make a decision before - # additional quota can be granted. + # Input only. An email address that can be used to contact the user, in case + # Google Cloud needs more information to make a decision before additional + # quota can be granted. # # When requesting a quota increase, the email address is required. # When requesting a quota decrease, the email address is optional. @@ -275,20 +276,21 @@ module Origin # combination of dimensions. # @!attribute [rw] dimensions # @return [::Google::Protobuf::Map{::String => ::String}] - # The map of dimensions for this dimensions info. The key of a map entry - # is "region", "zone" or the name of a service specific dimension, and the - # value of a map entry is the value of the dimension. If a dimension does + # The map of dimensions in key-value pairs. The key of a map entry + # is "region", "zone", or the name of a service-specific dimension, and the + # value of a map entry is the value of the dimension. If a dimension does # not appear in the map of dimensions, the dimensions info applies to all - # the dimension values except for those that have another DimenisonInfo + # the dimension values except for those that have another DimensionInfo # instance configured for the specific value. - # Example: \\{"provider" : "Foo Inc"} where "provider" is a service specific - # dimension of a quota. + # For example: `{"provider" : "Example Organization"}` where `provider` is a + # service-specific quota dimension and `Example Organization` is the provider + # name. # @!attribute [rw] details # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaDetails] # Quota details for the specified dimensions. # @!attribute [rw] applicable_locations # @return [::Array<::String>] - # The applicable regions or zones of this dimensions info. The field will be + # The applicable regions or zones of this dimension. The field is # set to ['global'] for quotas that are not per region or per zone. # Otherwise, it will be set to the list of locations this dimension info is # applicable to. diff --git a/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager_paths_test.rb b/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager_paths_test.rb index 93039c8551c7..4365c2e2ef87 100644 --- a/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager_paths_test.rb +++ b/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager_paths_test.rb @@ -50,6 +50,12 @@ def test_quota_adjuster_settings_path path = client.quota_adjuster_settings_path project: "value0", location: "value1" assert_equal "projects/value0/locations/value1/quotaAdjusterSettings", path + + path = client.quota_adjuster_settings_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1/quotaAdjusterSettings", path + + path = client.quota_adjuster_settings_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1/quotaAdjusterSettings", path end end end From 95b871c519cd69f7e2e0ba30401ad3803c5b2a49 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:20:22 -0700 Subject: [PATCH 095/457] docs: updated description of sample_rate_hertz (#30509) feat: add denoiser related configuration --- .../google/cloud/speech/v2/cloud_speech_pb.rb | 3 +- .../google/cloud/speech/v2/cloud_speech.rb | 28 +++++++++++++++++-- .../cloud/speech/v2/locations_metadata.rb | 2 +- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/google-cloud-speech-v2/lib/google/cloud/speech/v2/cloud_speech_pb.rb b/google-cloud-speech-v2/lib/google/cloud/speech/v2/cloud_speech_pb.rb index 31ce15b67cdf..fee22dca4445 100644 --- a/google-cloud-speech-v2/lib/google/cloud/speech/v2/cloud_speech_pb.rb +++ b/google-cloud-speech-v2/lib/google/cloud/speech/v2/cloud_speech_pb.rb @@ -16,7 +16,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n)google/cloud/speech/v2/cloud_speech.proto\x12\x16google.cloud.speech.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xbe\x01\n\x17\x43reateRecognizerRequest\x12;\n\nrecognizer\x18\x01 \x01(\x0b\x32\".google.cloud.speech.v2.RecognizerB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rrecognizer_id\x18\x03 \x01(\t\x12\x38\n\x06parent\x18\x04 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 speech.googleapis.com/Recognizer\"\xe7\x0c\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08resource\x18\x03 \x01(\t\x12\x0e\n\x06method\x18\x04 \x01(\t\x12<\n\x0ckms_key_name\x18\x06 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12K\n\x14kms_key_version_name\x18\x07 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12P\n\x17\x62\x61tch_recognize_request\x18\x08 \x01(\x0b\x32-.google.cloud.speech.v2.BatchRecognizeRequestH\x00\x12T\n\x19\x63reate_recognizer_request\x18\t \x01(\x0b\x32/.google.cloud.speech.v2.CreateRecognizerRequestH\x00\x12T\n\x19update_recognizer_request\x18\n \x01(\x0b\x32/.google.cloud.speech.v2.UpdateRecognizerRequestH\x00\x12T\n\x19\x64\x65lete_recognizer_request\x18\x0b \x01(\x0b\x32/.google.cloud.speech.v2.DeleteRecognizerRequestH\x00\x12X\n\x1bundelete_recognizer_request\x18\x0c \x01(\x0b\x32\x31.google.cloud.speech.v2.UndeleteRecognizerRequestH\x00\x12W\n\x1b\x63reate_custom_class_request\x18\r \x01(\x0b\x32\x30.google.cloud.speech.v2.CreateCustomClassRequestH\x00\x12W\n\x1bupdate_custom_class_request\x18\x0e \x01(\x0b\x32\x30.google.cloud.speech.v2.UpdateCustomClassRequestH\x00\x12W\n\x1b\x64\x65lete_custom_class_request\x18\x0f \x01(\x0b\x32\x30.google.cloud.speech.v2.DeleteCustomClassRequestH\x00\x12[\n\x1dundelete_custom_class_request\x18\x10 \x01(\x0b\x32\x32.google.cloud.speech.v2.UndeleteCustomClassRequestH\x00\x12S\n\x19\x63reate_phrase_set_request\x18\x11 \x01(\x0b\x32..google.cloud.speech.v2.CreatePhraseSetRequestH\x00\x12S\n\x19update_phrase_set_request\x18\x12 \x01(\x0b\x32..google.cloud.speech.v2.UpdatePhraseSetRequestH\x00\x12S\n\x19\x64\x65lete_phrase_set_request\x18\x13 \x01(\x0b\x32..google.cloud.speech.v2.DeletePhraseSetRequestH\x00\x12W\n\x1bundelete_phrase_set_request\x18\x14 \x01(\x0b\x32\x30.google.cloud.speech.v2.UndeletePhraseSetRequestH\x00\x12P\n\x15update_config_request\x18\x15 \x01(\x0b\x32+.google.cloud.speech.v2.UpdateConfigRequestB\x02\x18\x01H\x00\x12\x18\n\x10progress_percent\x18\x16 \x01(\x05\x12R\n\x18\x62\x61tch_recognize_metadata\x18\x17 \x01(\x0b\x32..google.cloud.speech.v2.BatchRecognizeMetadataH\x01\x42\t\n\x07requestB\n\n\x08metadata\"\x90\x01\n\x16ListRecognizersRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"k\n\x17ListRecognizersResponse\x12\x37\n\x0brecognizers\x18\x01 \x03(\x0b\x32\".google.cloud.speech.v2.Recognizer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x14GetRecognizerRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\"\x9e\x01\n\x17UpdateRecognizerRequest\x12;\n\nrecognizer\x18\x01 \x01(\x0b\x32\".google.cloud.speech.v2.RecognizerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x8d\x01\n\x17\x44\x65leteRecognizerRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"x\n\x19UndeleteRecognizerRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"\xc5\x07\n\nRecognizer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x14\n\x05model\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x1d\n\x0elanguage_codes\x18\x11 \x03(\tB\x05\x18\x01\xe0\x41\x01\x12M\n\x1a\x64\x65\x66\x61ult_recognition_config\x18\x06 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfig\x12H\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32\x33.google.cloud.speech.v2.Recognizer.AnnotationsEntry\x12<\n\x05state\x18\x08 \x01(\x0e\x32(.google.cloud.speech.v2.Recognizer.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0ckms_key_name\x18\x0f \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x10 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:j\xea\x41g\n speech.googleapis.com/Recognizer\x12@projects/{project}/locations/{location}/recognizers/{recognizer}R\x01\x01\"\x1a\n\x18\x41utoDetectDecodingConfig\"\xf0\x02\n\x16\x45xplicitDecodingConfig\x12S\n\x08\x65ncoding\x18\x01 \x01(\x0e\x32<.google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13\x61udio_channel_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"\xbe\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\t\n\x05MULAW\x10\x02\x12\x08\n\x04\x41LAW\x10\x03\x12\x07\n\x03\x41MR\x10\x04\x12\n\n\x06\x41MR_WB\x10\x05\x12\x08\n\x04\x46LAC\x10\x06\x12\x07\n\x03MP3\x10\x07\x12\x0c\n\x08OGG_OPUS\x10\x08\x12\r\n\tWEBM_OPUS\x10\t\x12\x0b\n\x07MP4_AAC\x10\n\x12\x0b\n\x07M4A_AAC\x10\x0b\x12\x0b\n\x07MOV_AAC\x10\x0c\"Z\n\x18SpeakerDiarizationConfig\x12\x1e\n\x11min_speaker_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1e\n\x11max_speaker_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"\xf8\x03\n\x13RecognitionFeatures\x12\x18\n\x10profanity_filter\x18\x01 \x01(\x08\x12 \n\x18\x65nable_word_time_offsets\x18\x02 \x01(\x08\x12\x1e\n\x16\x65nable_word_confidence\x18\x03 \x01(\x08\x12$\n\x1c\x65nable_automatic_punctuation\x18\x04 \x01(\x08\x12!\n\x19\x65nable_spoken_punctuation\x18\x0e \x01(\x08\x12\x1c\n\x14\x65nable_spoken_emojis\x18\x0f \x01(\x08\x12X\n\x12multi_channel_mode\x18\x11 \x01(\x0e\x32<.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode\x12L\n\x12\x64iarization_config\x18\t \x01(\x0b\x32\x30.google.cloud.speech.v2.SpeakerDiarizationConfig\x12\x18\n\x10max_alternatives\x18\x10 \x01(\x05\"\\\n\x10MultiChannelMode\x12\"\n\x1eMULTI_CHANNEL_MODE_UNSPECIFIED\x10\x00\x12$\n SEPARATE_RECOGNITION_PER_CHANNEL\x10\x01\"\xa3\x01\n\x17TranscriptNormalization\x12\x46\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x35.google.cloud.speech.v2.TranscriptNormalization.Entry\x1a@\n\x05\x45ntry\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\x0f\n\x07replace\x18\x02 \x01(\t\x12\x16\n\x0e\x63\x61se_sensitive\x18\x03 \x01(\x08\"1\n\x11TranslationConfig\x12\x1c\n\x0ftarget_language\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xbf\x02\n\x10SpeechAdaptation\x12Q\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32<.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet\x12;\n\x0e\x63ustom_classes\x18\x02 \x03(\x0b\x32#.google.cloud.speech.v2.CustomClass\x1a\x9a\x01\n\x13\x41\x64\x61ptationPhraseSet\x12:\n\nphrase_set\x18\x01 \x01(\tB$\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSetH\x00\x12>\n\x11inline_phrase_set\x18\x02 \x01(\x0b\x32!.google.cloud.speech.v2.PhraseSetH\x00\x42\x07\n\x05value\"\x9e\x04\n\x11RecognitionConfig\x12P\n\x14\x61uto_decoding_config\x18\x07 \x01(\x0b\x32\x30.google.cloud.speech.v2.AutoDetectDecodingConfigH\x00\x12R\n\x18\x65xplicit_decoding_config\x18\x08 \x01(\x0b\x32..google.cloud.speech.v2.ExplicitDecodingConfigH\x00\x12\x12\n\x05model\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0elanguage_codes\x18\n \x03(\tB\x03\xe0\x41\x01\x12=\n\x08\x66\x65\x61tures\x18\x02 \x01(\x0b\x32+.google.cloud.speech.v2.RecognitionFeatures\x12<\n\nadaptation\x18\x06 \x01(\x0b\x32(.google.cloud.speech.v2.SpeechAdaptation\x12V\n\x18transcript_normalization\x18\x0b \x01(\x0b\x32/.google.cloud.speech.v2.TranscriptNormalizationB\x03\xe0\x41\x01\x12J\n\x12translation_config\x18\x0f \x01(\x0b\x32).google.cloud.speech.v2.TranslationConfigB\x03\xe0\x41\x01\x42\x11\n\x0f\x64\x65\x63oding_config\"\xee\x01\n\x10RecognizeRequest\x12<\n\nrecognizer\x18\x03 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12\x39\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfig\x12/\n\x0b\x63onfig_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\x07\x63ontent\x18\x05 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x06 \x01(\tH\x00\x42\x0e\n\x0c\x61udio_source\"u\n\x1bRecognitionResponseMetadata\x12\x1c\n\nrequest_id\x18\t \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x38\n\x15total_billed_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"w\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12/\n\x05words\x18\x03 \x03(\x0b\x32 .google.cloud.speech.v2.WordInfo\"\xa3\x01\n\x08WordInfo\x12/\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x15\n\rspeaker_label\x18\x06 \x01(\t\"\xcc\x01\n\x17SpeechRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v2.SpeechRecognitionAlternative\x12\x13\n\x0b\x63hannel_tag\x18\x02 \x01(\x05\x12\x34\n\x11result_end_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\x9c\x01\n\x11RecognizeResponse\x12@\n\x07results\x18\x03 \x03(\x0b\x32/.google.cloud.speech.v2.SpeechRecognitionResult\x12\x45\n\x08metadata\x18\x02 \x01(\x0b\x32\x33.google.cloud.speech.v2.RecognitionResponseMetadata\"\xd1\x02\n\x1cStreamingRecognitionFeatures\x12$\n\x1c\x65nable_voice_activity_events\x18\x01 \x01(\x08\x12\x17\n\x0finterim_results\x18\x02 \x01(\x08\x12i\n\x16voice_activity_timeout\x18\x03 \x01(\x0b\x32I.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout\x1a\x86\x01\n\x14VoiceActivityTimeout\x12\x37\n\x14speech_start_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12speech_end_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xdf\x01\n\x1aStreamingRecognitionConfig\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfigB\x03\xe0\x41\x02\x12/\n\x0b\x63onfig_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12P\n\x12streaming_features\x18\x02 \x01(\x0b\x32\x34.google.cloud.speech.v2.StreamingRecognitionFeatures\"\xcf\x01\n\x19StreamingRecognizeRequest\x12<\n\nrecognizer\x18\x03 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12N\n\x10streaming_config\x18\x06 \x01(\x0b\x32\x32.google.cloud.speech.v2.StreamingRecognitionConfigH\x00\x12\x0f\n\x05\x61udio\x18\x05 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\x88\x04\n\x15\x42\x61tchRecognizeRequest\x12<\n\nrecognizer\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12\x39\n\x06\x63onfig\x18\x04 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfig\x12/\n\x0b\x63onfig_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x41\n\x05\x66iles\x18\x03 \x03(\x0b\x32\x32.google.cloud.speech.v2.BatchRecognizeFileMetadata\x12R\n\x19recognition_output_config\x18\x06 \x01(\x0b\x32/.google.cloud.speech.v2.RecognitionOutputConfig\x12]\n\x13processing_strategy\x18\x07 \x01(\x0e\x32@.google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy\"O\n\x12ProcessingStrategy\x12#\n\x1fPROCESSING_STRATEGY_UNSPECIFIED\x10\x00\x12\x14\n\x10\x44YNAMIC_BATCHING\x10\x01\"\x1e\n\x0fGcsOutputConfig\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x14\n\x12InlineOutputConfig\"\x1e\n\x1cNativeOutputFileFormatConfig\"\x1b\n\x19VttOutputFileFormatConfig\"\x1b\n\x19SrtOutputFileFormatConfig\"\xda\x01\n\x12OutputFormatConfig\x12\x44\n\x06native\x18\x01 \x01(\x0b\x32\x34.google.cloud.speech.v2.NativeOutputFileFormatConfig\x12>\n\x03vtt\x18\x02 \x01(\x0b\x32\x31.google.cloud.speech.v2.VttOutputFileFormatConfig\x12>\n\x03srt\x18\x03 \x01(\x0b\x32\x31.google.cloud.speech.v2.SrtOutputFileFormatConfig\"\x86\x02\n\x17RecognitionOutputConfig\x12\x44\n\x11gcs_output_config\x18\x01 \x01(\x0b\x32\'.google.cloud.speech.v2.GcsOutputConfigH\x00\x12L\n\x16inline_response_config\x18\x02 \x01(\x0b\x32*.google.cloud.speech.v2.InlineOutputConfigH\x00\x12M\n\x14output_format_config\x18\x03 \x01(\x0b\x32*.google.cloud.speech.v2.OutputFormatConfigB\x03\xe0\x41\x01\x42\x08\n\x06output\"\x82\x02\n\x16\x42\x61tchRecognizeResponse\x12L\n\x07results\x18\x01 \x03(\x0b\x32;.google.cloud.speech.v2.BatchRecognizeResponse.ResultsEntry\x12\x38\n\x15total_billed_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a`\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.speech.v2.BatchRecognizeFileResult:\x02\x38\x01\"\xa0\x01\n\x15\x42\x61tchRecognizeResults\x12@\n\x07results\x18\x01 \x03(\x0b\x32/.google.cloud.speech.v2.SpeechRecognitionResult\x12\x45\n\x08metadata\x18\x02 \x01(\x0b\x32\x33.google.cloud.speech.v2.RecognitionResponseMetadata\"Q\n\x12\x43loudStorageResult\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x16\n\x0evtt_format_uri\x18\x02 \x01(\t\x12\x16\n\x0esrt_format_uri\x18\x03 \x01(\t\"}\n\x0cInlineResult\x12\x41\n\ntranscript\x18\x01 \x01(\x0b\x32-.google.cloud.speech.v2.BatchRecognizeResults\x12\x14\n\x0cvtt_captions\x18\x02 \x01(\t\x12\x14\n\x0csrt_captions\x18\x03 \x01(\t\"\xf1\x02\n\x18\x42\x61tchRecognizeFileResult\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x45\n\x08metadata\x18\x03 \x01(\x0b\x32\x33.google.cloud.speech.v2.RecognitionResponseMetadata\x12J\n\x14\x63loud_storage_result\x18\x05 \x01(\x0b\x32*.google.cloud.speech.v2.CloudStorageResultH\x00\x12=\n\rinline_result\x18\x06 \x01(\x0b\x32$.google.cloud.speech.v2.InlineResultH\x00\x12\x0f\n\x03uri\x18\x01 \x01(\tB\x02\x18\x01\x12\x45\n\ntranscript\x18\x04 \x01(\x0b\x32-.google.cloud.speech.v2.BatchRecognizeResultsB\x02\x18\x01\x42\x08\n\x06result\"o\n#BatchRecognizeTranscriptionMetadata\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0b\n\x03uri\x18\x03 \x01(\t\"\xfe\x01\n\x16\x42\x61tchRecognizeMetadata\x12i\n\x16transcription_metadata\x18\x01 \x03(\x0b\x32I.google.cloud.speech.v2.BatchRecognizeMetadata.TranscriptionMetadataEntry\x1ay\n\x1aTranscriptionMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata:\x02\x38\x01\"\xa7\x01\n\x1a\x42\x61tchRecognizeFileMetadata\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x12\x39\n\x06\x63onfig\x18\x04 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfig\x12/\n\x0b\x63onfig_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x0e\n\x0c\x61udio_source\"\xf4\x01\n\x1aStreamingRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v2.SpeechRecognitionAlternative\x12\x10\n\x08is_final\x18\x02 \x01(\x08\x12\x11\n\tstability\x18\x03 \x01(\x02\x12\x34\n\x11result_end_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63hannel_tag\x18\x05 \x01(\x05\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xc7\x03\n\x1aStreamingRecognizeResponse\x12\x43\n\x07results\x18\x06 \x03(\x0b\x32\x32.google.cloud.speech.v2.StreamingRecognitionResult\x12]\n\x11speech_event_type\x18\x03 \x01(\x0e\x32\x42.google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType\x12\x36\n\x13speech_event_offset\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x08metadata\x18\x05 \x01(\x0b\x32\x33.google.cloud.speech.v2.RecognitionResponseMetadata\"\x85\x01\n\x0fSpeechEventType\x12!\n\x1dSPEECH_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x01\x12\x19\n\x15SPEECH_ACTIVITY_BEGIN\x10\x02\x12\x17\n\x13SPEECH_ACTIVITY_END\x10\x03\"\xe8\x01\n\x06\x43onfig\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12?\n\x0ckms_key_name\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:Q\xea\x41N\n\x1cspeech.googleapis.com/Config\x12.projects/{project}/locations/{location}/config\"F\n\x10GetConfigRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cspeech.googleapis.com/Config\"{\n\x13UpdateConfigRequest\x12\x33\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1e.google.cloud.speech.v2.ConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xad\x07\n\x0b\x43ustomClass\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12<\n\x05items\x18\x05 \x03(\x0b\x32-.google.cloud.speech.v2.CustomClass.ClassItem\x12=\n\x05state\x18\x0f \x01(\x0e\x32).google.cloud.speech.v2.CustomClass.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\x0b\x61nnotations\x18\n \x03(\x0b\x32\x34.google.cloud.speech.v2.CustomClass.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0ckms_key_name\x18\r \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x0e \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\x1a\n\tClassItem\x12\r\n\x05value\x18\x01 \x01(\t\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:o\xea\x41l\n!speech.googleapis.com/CustomClass\x12\x44projects/{project}/locations/{location}/customClasses/{custom_class}R\x01\x01\"\xae\x07\n\tPhraseSet\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x39\n\x07phrases\x18\x03 \x03(\x0b\x32(.google.cloud.speech.v2.PhraseSet.Phrase\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12;\n\x05state\x18\x0f \x01(\x0e\x32\'.google.cloud.speech.v2.PhraseSet.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x0b\x61nnotations\x18\n \x03(\x0b\x32\x32.google.cloud.speech.v2.PhraseSet.AnnotationsEntry\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0ckms_key_name\x18\r \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x0e \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a&\n\x06Phrase\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:h\xea\x41\x65\n\x1fspeech.googleapis.com/PhraseSet\x12?projects/{project}/locations/{location}/phraseSets/{phrase_set}R\x01\x01\"\xc5\x01\n\x18\x43reateCustomClassRequest\x12>\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32#.google.cloud.speech.v2.CustomClassB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x17\n\x0f\x63ustom_class_id\x18\x03 \x01(\t\x12\x39\n\x06parent\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\"\x92\x01\n\x18ListCustomClassesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"q\n\x19ListCustomClassesResponse\x12;\n\x0e\x63ustom_classes\x18\x01 \x03(\x0b\x32#.google.cloud.speech.v2.CustomClass\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x15GetCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\"\xa2\x01\n\x18UpdateCustomClassRequest\x12>\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32#.google.cloud.speech.v2.CustomClassB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x8f\x01\n\x18\x44\x65leteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"z\n\x1aUndeleteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"\xbb\x01\n\x16\x43reatePhraseSetRequest\x12:\n\nphrase_set\x18\x01 \x01(\x0b\x32!.google.cloud.speech.v2.PhraseSetB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rphrase_set_id\x18\x03 \x01(\t\x12\x37\n\x06parent\x18\x04 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\"\x8f\x01\n\x15ListPhraseSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"i\n\x16ListPhraseSetsResponse\x12\x36\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32!.google.cloud.speech.v2.PhraseSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x13GetPhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"\x9c\x01\n\x16UpdatePhraseSetRequest\x12:\n\nphrase_set\x18\x01 \x01(\x0b\x32!.google.cloud.speech.v2.PhraseSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x8b\x01\n\x16\x44\x65letePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"v\n\x18UndeletePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t2\xbf%\n\x06Speech\x12\xec\x01\n\x10\x43reateRecognizer\x12/.google.cloud.speech.v2.CreateRecognizerRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nRecognizer\x12\x11OperationMetadata\xda\x41\x1fparent,recognizer,recognizer_id\x82\xd3\xe4\x93\x02=\"//v2/{parent=projects/*/locations/*}/recognizers:\nrecognizer\x12\xb4\x01\n\x0fListRecognizers\x12..google.cloud.speech.v2.ListRecognizersRequest\x1a/.google.cloud.speech.v2.ListRecognizersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2/{parent=projects/*/locations/*}/recognizers\x12\xa1\x01\n\rGetRecognizer\x12,.google.cloud.speech.v2.GetRecognizerRequest\x1a\".google.cloud.speech.v2.Recognizer\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2/{name=projects/*/locations/*/recognizers/*}\x12\xee\x01\n\x10UpdateRecognizer\x12/.google.cloud.speech.v2.UpdateRecognizerRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nRecognizer\x12\x11OperationMetadata\xda\x41\x16recognizer,update_mask\x82\xd3\xe4\x93\x02H2:/v2/{recognizer.name=projects/*/locations/*/recognizers/*}:\nrecognizer\x12\xc4\x01\n\x10\x44\x65leteRecognizer\x12/.google.cloud.speech.v2.DeleteRecognizerRequest\x1a\x1d.google.longrunning.Operation\"`\xca\x41\x1f\n\nRecognizer\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2/{name=projects/*/locations/*/recognizers/*}\x12\xd4\x01\n\x12UndeleteRecognizer\x12\x31.google.cloud.speech.v2.UndeleteRecognizerRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41\x1f\n\nRecognizer\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v2/{name=projects/*/locations/*/recognizers/*}:undelete:\x01*\x12\xf9\x01\n\tRecognize\x12(.google.cloud.speech.v2.RecognizeRequest\x1a).google.cloud.speech.v2.RecognizeResponse\"\x96\x01\xda\x41%recognizer,config,config_mask,content\xda\x41!recognizer,config,config_mask,uri\x82\xd3\xe4\x93\x02\x44\"?/v2/{recognizer=projects/*/locations/*/recognizers/*}:recognize:\x01*\x12\x81\x01\n\x12StreamingRecognize\x12\x31.google.cloud.speech.v2.StreamingRecognizeRequest\x1a\x32.google.cloud.speech.v2.StreamingRecognizeResponse\"\x00(\x01\x30\x01\x12\x84\x02\n\x0e\x42\x61tchRecognize\x12-.google.cloud.speech.v2.BatchRecognizeRequest\x1a\x1d.google.longrunning.Operation\"\xa3\x01\xca\x41+\n\x16\x42\x61tchRecognizeResponse\x12\x11OperationMetadata\xda\x41#recognizer,config,config_mask,files\x82\xd3\xe4\x93\x02I\"D/v2/{recognizer=projects/*/locations/*/recognizers/*}:batchRecognize:\x01*\x12\x8e\x01\n\tGetConfig\x12(.google.cloud.speech.v2.GetConfigRequest\x1a\x1e.google.cloud.speech.v2.Config\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v2/{name=projects/*/locations/*/config}\x12\xb1\x01\n\x0cUpdateConfig\x12+.google.cloud.speech.v2.UpdateConfigRequest\x1a\x1e.google.cloud.speech.v2.Config\"T\xda\x41\x12\x63onfig,update_mask\x82\xd3\xe4\x93\x02\x39\x32//v2/{config.name=projects/*/locations/*/config}:\x06\x63onfig\x12\xf7\x01\n\x11\x43reateCustomClass\x12\x30.google.cloud.speech.v2.CreateCustomClassRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41 \n\x0b\x43ustomClass\x12\x11OperationMetadata\xda\x41#parent,custom_class,custom_class_id\x82\xd3\xe4\x93\x02\x41\"1/v2/{parent=projects/*/locations/*}/customClasses:\x0c\x63ustom_class\x12\xbc\x01\n\x11ListCustomClasses\x12\x30.google.cloud.speech.v2.ListCustomClassesRequest\x1a\x31.google.cloud.speech.v2.ListCustomClassesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v2/{parent=projects/*/locations/*}/customClasses\x12\xa6\x01\n\x0eGetCustomClass\x12-.google.cloud.speech.v2.GetCustomClassRequest\x1a#.google.cloud.speech.v2.CustomClass\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v2/{name=projects/*/locations/*/customClasses/*}\x12\xf9\x01\n\x11UpdateCustomClass\x12\x30.google.cloud.speech.v2.UpdateCustomClassRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41 \n\x0b\x43ustomClass\x12\x11OperationMetadata\xda\x41\x18\x63ustom_class,update_mask\x82\xd3\xe4\x93\x02N2>/v2/{custom_class.name=projects/*/locations/*/customClasses/*}:\x0c\x63ustom_class\x12\xc9\x01\n\x11\x44\x65leteCustomClass\x12\x30.google.cloud.speech.v2.DeleteCustomClassRequest\x1a\x1d.google.longrunning.Operation\"c\xca\x41 \n\x0b\x43ustomClass\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v2/{name=projects/*/locations/*/customClasses/*}\x12\xd9\x01\n\x13UndeleteCustomClass\x12\x32.google.cloud.speech.v2.UndeleteCustomClassRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41 \n\x0b\x43ustomClass\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?\":/v2/{name=projects/*/locations/*/customClasses/*}:undelete:\x01*\x12\xe8\x01\n\x0f\x43reatePhraseSet\x12..google.cloud.speech.v2.CreatePhraseSetRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tPhraseSet\x12\x11OperationMetadata\xda\x41\x1fparent,phrase_set,phrase_set_id\x82\xd3\xe4\x93\x02<\"./v2/{parent=projects/*/locations/*}/phraseSets:\nphrase_set\x12\xb0\x01\n\x0eListPhraseSets\x12-.google.cloud.speech.v2.ListPhraseSetsRequest\x1a..google.cloud.speech.v2.ListPhraseSetsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v2/{parent=projects/*/locations/*}/phraseSets\x12\x9d\x01\n\x0cGetPhraseSet\x12+.google.cloud.speech.v2.GetPhraseSetRequest\x1a!.google.cloud.speech.v2.PhraseSet\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v2/{name=projects/*/locations/*/phraseSets/*}\x12\xea\x01\n\x0fUpdatePhraseSet\x12..google.cloud.speech.v2.UpdatePhraseSetRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tPhraseSet\x12\x11OperationMetadata\xda\x41\x16phrase_set,update_mask\x82\xd3\xe4\x93\x02G29/v2/{phrase_set.name=projects/*/locations/*/phraseSets/*}:\nphrase_set\x12\xc0\x01\n\x0f\x44\x65letePhraseSet\x12..google.cloud.speech.v2.DeletePhraseSetRequest\x1a\x1d.google.longrunning.Operation\"^\xca\x41\x1e\n\tPhraseSet\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v2/{name=projects/*/locations/*/phraseSets/*}\x12\xd0\x01\n\x11UndeletePhraseSet\x12\x30.google.cloud.speech.v2.UndeletePhraseSetRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41\x1e\n\tPhraseSet\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v2/{name=projects/*/locations/*/phraseSets/*}:undelete:\x01*\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x03\n\x1a\x63om.google.cloud.speech.v2B\x10\x43loudSpeechProtoP\x01Z2cloud.google.com/go/speech/apiv2/speechpb;speechpb\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" +descriptor_data = "\n)google/cloud/speech/v2/cloud_speech.proto\x12\x16google.cloud.speech.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xbe\x01\n\x17\x43reateRecognizerRequest\x12;\n\nrecognizer\x18\x01 \x01(\x0b\x32\".google.cloud.speech.v2.RecognizerB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rrecognizer_id\x18\x03 \x01(\t\x12\x38\n\x06parent\x18\x04 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 speech.googleapis.com/Recognizer\"\xe7\x0c\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08resource\x18\x03 \x01(\t\x12\x0e\n\x06method\x18\x04 \x01(\t\x12<\n\x0ckms_key_name\x18\x06 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12K\n\x14kms_key_version_name\x18\x07 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12P\n\x17\x62\x61tch_recognize_request\x18\x08 \x01(\x0b\x32-.google.cloud.speech.v2.BatchRecognizeRequestH\x00\x12T\n\x19\x63reate_recognizer_request\x18\t \x01(\x0b\x32/.google.cloud.speech.v2.CreateRecognizerRequestH\x00\x12T\n\x19update_recognizer_request\x18\n \x01(\x0b\x32/.google.cloud.speech.v2.UpdateRecognizerRequestH\x00\x12T\n\x19\x64\x65lete_recognizer_request\x18\x0b \x01(\x0b\x32/.google.cloud.speech.v2.DeleteRecognizerRequestH\x00\x12X\n\x1bundelete_recognizer_request\x18\x0c \x01(\x0b\x32\x31.google.cloud.speech.v2.UndeleteRecognizerRequestH\x00\x12W\n\x1b\x63reate_custom_class_request\x18\r \x01(\x0b\x32\x30.google.cloud.speech.v2.CreateCustomClassRequestH\x00\x12W\n\x1bupdate_custom_class_request\x18\x0e \x01(\x0b\x32\x30.google.cloud.speech.v2.UpdateCustomClassRequestH\x00\x12W\n\x1b\x64\x65lete_custom_class_request\x18\x0f \x01(\x0b\x32\x30.google.cloud.speech.v2.DeleteCustomClassRequestH\x00\x12[\n\x1dundelete_custom_class_request\x18\x10 \x01(\x0b\x32\x32.google.cloud.speech.v2.UndeleteCustomClassRequestH\x00\x12S\n\x19\x63reate_phrase_set_request\x18\x11 \x01(\x0b\x32..google.cloud.speech.v2.CreatePhraseSetRequestH\x00\x12S\n\x19update_phrase_set_request\x18\x12 \x01(\x0b\x32..google.cloud.speech.v2.UpdatePhraseSetRequestH\x00\x12S\n\x19\x64\x65lete_phrase_set_request\x18\x13 \x01(\x0b\x32..google.cloud.speech.v2.DeletePhraseSetRequestH\x00\x12W\n\x1bundelete_phrase_set_request\x18\x14 \x01(\x0b\x32\x30.google.cloud.speech.v2.UndeletePhraseSetRequestH\x00\x12P\n\x15update_config_request\x18\x15 \x01(\x0b\x32+.google.cloud.speech.v2.UpdateConfigRequestB\x02\x18\x01H\x00\x12\x18\n\x10progress_percent\x18\x16 \x01(\x05\x12R\n\x18\x62\x61tch_recognize_metadata\x18\x17 \x01(\x0b\x32..google.cloud.speech.v2.BatchRecognizeMetadataH\x01\x42\t\n\x07requestB\n\n\x08metadata\"\x90\x01\n\x16ListRecognizersRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"k\n\x17ListRecognizersResponse\x12\x37\n\x0brecognizers\x18\x01 \x03(\x0b\x32\".google.cloud.speech.v2.Recognizer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x14GetRecognizerRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\"\x9e\x01\n\x17UpdateRecognizerRequest\x12;\n\nrecognizer\x18\x01 \x01(\x0b\x32\".google.cloud.speech.v2.RecognizerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x8d\x01\n\x17\x44\x65leteRecognizerRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"x\n\x19UndeleteRecognizerRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"\xc5\x07\n\nRecognizer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x14\n\x05model\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x1d\n\x0elanguage_codes\x18\x11 \x03(\tB\x05\x18\x01\xe0\x41\x01\x12M\n\x1a\x64\x65\x66\x61ult_recognition_config\x18\x06 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfig\x12H\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32\x33.google.cloud.speech.v2.Recognizer.AnnotationsEntry\x12<\n\x05state\x18\x08 \x01(\x0e\x32(.google.cloud.speech.v2.Recognizer.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0ckms_key_name\x18\x0f \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x10 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:j\xea\x41g\n speech.googleapis.com/Recognizer\x12@projects/{project}/locations/{location}/recognizers/{recognizer}R\x01\x01\"\x1a\n\x18\x41utoDetectDecodingConfig\"\xf0\x02\n\x16\x45xplicitDecodingConfig\x12S\n\x08\x65ncoding\x18\x01 \x01(\x0e\x32<.google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13\x61udio_channel_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"\xbe\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\t\n\x05MULAW\x10\x02\x12\x08\n\x04\x41LAW\x10\x03\x12\x07\n\x03\x41MR\x10\x04\x12\n\n\x06\x41MR_WB\x10\x05\x12\x08\n\x04\x46LAC\x10\x06\x12\x07\n\x03MP3\x10\x07\x12\x0c\n\x08OGG_OPUS\x10\x08\x12\r\n\tWEBM_OPUS\x10\t\x12\x0b\n\x07MP4_AAC\x10\n\x12\x0b\n\x07M4A_AAC\x10\x0b\x12\x0b\n\x07MOV_AAC\x10\x0c\"Z\n\x18SpeakerDiarizationConfig\x12\x1e\n\x11min_speaker_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1e\n\x11max_speaker_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"\xf8\x03\n\x13RecognitionFeatures\x12\x18\n\x10profanity_filter\x18\x01 \x01(\x08\x12 \n\x18\x65nable_word_time_offsets\x18\x02 \x01(\x08\x12\x1e\n\x16\x65nable_word_confidence\x18\x03 \x01(\x08\x12$\n\x1c\x65nable_automatic_punctuation\x18\x04 \x01(\x08\x12!\n\x19\x65nable_spoken_punctuation\x18\x0e \x01(\x08\x12\x1c\n\x14\x65nable_spoken_emojis\x18\x0f \x01(\x08\x12X\n\x12multi_channel_mode\x18\x11 \x01(\x0e\x32<.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode\x12L\n\x12\x64iarization_config\x18\t \x01(\x0b\x32\x30.google.cloud.speech.v2.SpeakerDiarizationConfig\x12\x18\n\x10max_alternatives\x18\x10 \x01(\x05\"\\\n\x10MultiChannelMode\x12\"\n\x1eMULTI_CHANNEL_MODE_UNSPECIFIED\x10\x00\x12$\n SEPARATE_RECOGNITION_PER_CHANNEL\x10\x01\"\xa3\x01\n\x17TranscriptNormalization\x12\x46\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x35.google.cloud.speech.v2.TranscriptNormalization.Entry\x1a@\n\x05\x45ntry\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\x0f\n\x07replace\x18\x02 \x01(\t\x12\x16\n\x0e\x63\x61se_sensitive\x18\x03 \x01(\x08\"1\n\x11TranslationConfig\x12\x1c\n\x0ftarget_language\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xbf\x02\n\x10SpeechAdaptation\x12Q\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32<.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet\x12;\n\x0e\x63ustom_classes\x18\x02 \x03(\x0b\x32#.google.cloud.speech.v2.CustomClass\x1a\x9a\x01\n\x13\x41\x64\x61ptationPhraseSet\x12:\n\nphrase_set\x18\x01 \x01(\tB$\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSetH\x00\x12>\n\x11inline_phrase_set\x18\x02 \x01(\x0b\x32!.google.cloud.speech.v2.PhraseSetH\x00\x42\x07\n\x05value\">\n\x0e\x44\x65noiserConfig\x12\x15\n\rdenoise_audio\x18\x01 \x01(\x08\x12\x15\n\rsnr_threshold\x18\x02 \x01(\x02\"\xe4\x04\n\x11RecognitionConfig\x12P\n\x14\x61uto_decoding_config\x18\x07 \x01(\x0b\x32\x30.google.cloud.speech.v2.AutoDetectDecodingConfigH\x00\x12R\n\x18\x65xplicit_decoding_config\x18\x08 \x01(\x0b\x32..google.cloud.speech.v2.ExplicitDecodingConfigH\x00\x12\x12\n\x05model\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0elanguage_codes\x18\n \x03(\tB\x03\xe0\x41\x01\x12=\n\x08\x66\x65\x61tures\x18\x02 \x01(\x0b\x32+.google.cloud.speech.v2.RecognitionFeatures\x12<\n\nadaptation\x18\x06 \x01(\x0b\x32(.google.cloud.speech.v2.SpeechAdaptation\x12V\n\x18transcript_normalization\x18\x0b \x01(\x0b\x32/.google.cloud.speech.v2.TranscriptNormalizationB\x03\xe0\x41\x01\x12J\n\x12translation_config\x18\x0f \x01(\x0b\x32).google.cloud.speech.v2.TranslationConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x64\x65noiser_config\x18\x10 \x01(\x0b\x32&.google.cloud.speech.v2.DenoiserConfigB\x03\xe0\x41\x01\x42\x11\n\x0f\x64\x65\x63oding_config\"\xee\x01\n\x10RecognizeRequest\x12<\n\nrecognizer\x18\x03 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12\x39\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfig\x12/\n\x0b\x63onfig_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\x07\x63ontent\x18\x05 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x06 \x01(\tH\x00\x42\x0e\n\x0c\x61udio_source\"u\n\x1bRecognitionResponseMetadata\x12\x1c\n\nrequest_id\x18\t \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x38\n\x15total_billed_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"w\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12/\n\x05words\x18\x03 \x03(\x0b\x32 .google.cloud.speech.v2.WordInfo\"\xa3\x01\n\x08WordInfo\x12/\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x15\n\rspeaker_label\x18\x06 \x01(\t\"\xcc\x01\n\x17SpeechRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v2.SpeechRecognitionAlternative\x12\x13\n\x0b\x63hannel_tag\x18\x02 \x01(\x05\x12\x34\n\x11result_end_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\x9c\x01\n\x11RecognizeResponse\x12@\n\x07results\x18\x03 \x03(\x0b\x32/.google.cloud.speech.v2.SpeechRecognitionResult\x12\x45\n\x08metadata\x18\x02 \x01(\x0b\x32\x33.google.cloud.speech.v2.RecognitionResponseMetadata\"\xd1\x02\n\x1cStreamingRecognitionFeatures\x12$\n\x1c\x65nable_voice_activity_events\x18\x01 \x01(\x08\x12\x17\n\x0finterim_results\x18\x02 \x01(\x08\x12i\n\x16voice_activity_timeout\x18\x03 \x01(\x0b\x32I.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout\x1a\x86\x01\n\x14VoiceActivityTimeout\x12\x37\n\x14speech_start_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12speech_end_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xdf\x01\n\x1aStreamingRecognitionConfig\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfigB\x03\xe0\x41\x02\x12/\n\x0b\x63onfig_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12P\n\x12streaming_features\x18\x02 \x01(\x0b\x32\x34.google.cloud.speech.v2.StreamingRecognitionFeatures\"\xcf\x01\n\x19StreamingRecognizeRequest\x12<\n\nrecognizer\x18\x03 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12N\n\x10streaming_config\x18\x06 \x01(\x0b\x32\x32.google.cloud.speech.v2.StreamingRecognitionConfigH\x00\x12\x0f\n\x05\x61udio\x18\x05 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\x88\x04\n\x15\x42\x61tchRecognizeRequest\x12<\n\nrecognizer\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n speech.googleapis.com/Recognizer\x12\x39\n\x06\x63onfig\x18\x04 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfig\x12/\n\x0b\x63onfig_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x41\n\x05\x66iles\x18\x03 \x03(\x0b\x32\x32.google.cloud.speech.v2.BatchRecognizeFileMetadata\x12R\n\x19recognition_output_config\x18\x06 \x01(\x0b\x32/.google.cloud.speech.v2.RecognitionOutputConfig\x12]\n\x13processing_strategy\x18\x07 \x01(\x0e\x32@.google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy\"O\n\x12ProcessingStrategy\x12#\n\x1fPROCESSING_STRATEGY_UNSPECIFIED\x10\x00\x12\x14\n\x10\x44YNAMIC_BATCHING\x10\x01\"\x1e\n\x0fGcsOutputConfig\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x14\n\x12InlineOutputConfig\"\x1e\n\x1cNativeOutputFileFormatConfig\"\x1b\n\x19VttOutputFileFormatConfig\"\x1b\n\x19SrtOutputFileFormatConfig\"\xda\x01\n\x12OutputFormatConfig\x12\x44\n\x06native\x18\x01 \x01(\x0b\x32\x34.google.cloud.speech.v2.NativeOutputFileFormatConfig\x12>\n\x03vtt\x18\x02 \x01(\x0b\x32\x31.google.cloud.speech.v2.VttOutputFileFormatConfig\x12>\n\x03srt\x18\x03 \x01(\x0b\x32\x31.google.cloud.speech.v2.SrtOutputFileFormatConfig\"\x86\x02\n\x17RecognitionOutputConfig\x12\x44\n\x11gcs_output_config\x18\x01 \x01(\x0b\x32\'.google.cloud.speech.v2.GcsOutputConfigH\x00\x12L\n\x16inline_response_config\x18\x02 \x01(\x0b\x32*.google.cloud.speech.v2.InlineOutputConfigH\x00\x12M\n\x14output_format_config\x18\x03 \x01(\x0b\x32*.google.cloud.speech.v2.OutputFormatConfigB\x03\xe0\x41\x01\x42\x08\n\x06output\"\x82\x02\n\x16\x42\x61tchRecognizeResponse\x12L\n\x07results\x18\x01 \x03(\x0b\x32;.google.cloud.speech.v2.BatchRecognizeResponse.ResultsEntry\x12\x38\n\x15total_billed_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a`\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.speech.v2.BatchRecognizeFileResult:\x02\x38\x01\"\xa0\x01\n\x15\x42\x61tchRecognizeResults\x12@\n\x07results\x18\x01 \x03(\x0b\x32/.google.cloud.speech.v2.SpeechRecognitionResult\x12\x45\n\x08metadata\x18\x02 \x01(\x0b\x32\x33.google.cloud.speech.v2.RecognitionResponseMetadata\"Q\n\x12\x43loudStorageResult\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x16\n\x0evtt_format_uri\x18\x02 \x01(\t\x12\x16\n\x0esrt_format_uri\x18\x03 \x01(\t\"}\n\x0cInlineResult\x12\x41\n\ntranscript\x18\x01 \x01(\x0b\x32-.google.cloud.speech.v2.BatchRecognizeResults\x12\x14\n\x0cvtt_captions\x18\x02 \x01(\t\x12\x14\n\x0csrt_captions\x18\x03 \x01(\t\"\xf1\x02\n\x18\x42\x61tchRecognizeFileResult\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x45\n\x08metadata\x18\x03 \x01(\x0b\x32\x33.google.cloud.speech.v2.RecognitionResponseMetadata\x12J\n\x14\x63loud_storage_result\x18\x05 \x01(\x0b\x32*.google.cloud.speech.v2.CloudStorageResultH\x00\x12=\n\rinline_result\x18\x06 \x01(\x0b\x32$.google.cloud.speech.v2.InlineResultH\x00\x12\x0f\n\x03uri\x18\x01 \x01(\tB\x02\x18\x01\x12\x45\n\ntranscript\x18\x04 \x01(\x0b\x32-.google.cloud.speech.v2.BatchRecognizeResultsB\x02\x18\x01\x42\x08\n\x06result\"o\n#BatchRecognizeTranscriptionMetadata\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0b\n\x03uri\x18\x03 \x01(\t\"\xfe\x01\n\x16\x42\x61tchRecognizeMetadata\x12i\n\x16transcription_metadata\x18\x01 \x03(\x0b\x32I.google.cloud.speech.v2.BatchRecognizeMetadata.TranscriptionMetadataEntry\x1ay\n\x1aTranscriptionMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata:\x02\x38\x01\"\xa7\x01\n\x1a\x42\x61tchRecognizeFileMetadata\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x12\x39\n\x06\x63onfig\x18\x04 \x01(\x0b\x32).google.cloud.speech.v2.RecognitionConfig\x12/\n\x0b\x63onfig_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x0e\n\x0c\x61udio_source\"\xf4\x01\n\x1aStreamingRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v2.SpeechRecognitionAlternative\x12\x10\n\x08is_final\x18\x02 \x01(\x08\x12\x11\n\tstability\x18\x03 \x01(\x02\x12\x34\n\x11result_end_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63hannel_tag\x18\x05 \x01(\x05\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xc7\x03\n\x1aStreamingRecognizeResponse\x12\x43\n\x07results\x18\x06 \x03(\x0b\x32\x32.google.cloud.speech.v2.StreamingRecognitionResult\x12]\n\x11speech_event_type\x18\x03 \x01(\x0e\x32\x42.google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType\x12\x36\n\x13speech_event_offset\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x08metadata\x18\x05 \x01(\x0b\x32\x33.google.cloud.speech.v2.RecognitionResponseMetadata\"\x85\x01\n\x0fSpeechEventType\x12!\n\x1dSPEECH_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x01\x12\x19\n\x15SPEECH_ACTIVITY_BEGIN\x10\x02\x12\x17\n\x13SPEECH_ACTIVITY_END\x10\x03\"\xe8\x01\n\x06\x43onfig\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12?\n\x0ckms_key_name\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:Q\xea\x41N\n\x1cspeech.googleapis.com/Config\x12.projects/{project}/locations/{location}/config\"F\n\x10GetConfigRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cspeech.googleapis.com/Config\"{\n\x13UpdateConfigRequest\x12\x33\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1e.google.cloud.speech.v2.ConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xad\x07\n\x0b\x43ustomClass\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12<\n\x05items\x18\x05 \x03(\x0b\x32-.google.cloud.speech.v2.CustomClass.ClassItem\x12=\n\x05state\x18\x0f \x01(\x0e\x32).google.cloud.speech.v2.CustomClass.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\x0b\x61nnotations\x18\n \x03(\x0b\x32\x34.google.cloud.speech.v2.CustomClass.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0ckms_key_name\x18\r \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x0e \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\x1a\n\tClassItem\x12\r\n\x05value\x18\x01 \x01(\t\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:o\xea\x41l\n!speech.googleapis.com/CustomClass\x12\x44projects/{project}/locations/{location}/customClasses/{custom_class}R\x01\x01\"\xae\x07\n\tPhraseSet\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x39\n\x07phrases\x18\x03 \x03(\x0b\x32(.google.cloud.speech.v2.PhraseSet.Phrase\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12;\n\x05state\x18\x0f \x01(\x0e\x32\'.google.cloud.speech.v2.PhraseSet.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x0b\x61nnotations\x18\n \x03(\x0b\x32\x32.google.cloud.speech.v2.PhraseSet.AnnotationsEntry\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0ckms_key_name\x18\r \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x0e \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a&\n\x06Phrase\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:h\xea\x41\x65\n\x1fspeech.googleapis.com/PhraseSet\x12?projects/{project}/locations/{location}/phraseSets/{phrase_set}R\x01\x01\"\xc5\x01\n\x18\x43reateCustomClassRequest\x12>\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32#.google.cloud.speech.v2.CustomClassB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x17\n\x0f\x63ustom_class_id\x18\x03 \x01(\t\x12\x39\n\x06parent\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\"\x92\x01\n\x18ListCustomClassesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"q\n\x19ListCustomClassesResponse\x12;\n\x0e\x63ustom_classes\x18\x01 \x03(\x0b\x32#.google.cloud.speech.v2.CustomClass\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x15GetCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\"\xa2\x01\n\x18UpdateCustomClassRequest\x12>\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32#.google.cloud.speech.v2.CustomClassB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x8f\x01\n\x18\x44\x65leteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"z\n\x1aUndeleteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"\xbb\x01\n\x16\x43reatePhraseSetRequest\x12:\n\nphrase_set\x18\x01 \x01(\x0b\x32!.google.cloud.speech.v2.PhraseSetB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rphrase_set_id\x18\x03 \x01(\t\x12\x37\n\x06parent\x18\x04 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\"\x8f\x01\n\x15ListPhraseSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"i\n\x16ListPhraseSetsResponse\x12\x36\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32!.google.cloud.speech.v2.PhraseSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x13GetPhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"\x9c\x01\n\x16UpdatePhraseSetRequest\x12:\n\nphrase_set\x18\x01 \x01(\x0b\x32!.google.cloud.speech.v2.PhraseSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x8b\x01\n\x16\x44\x65letePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"v\n\x18UndeletePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t2\xbf%\n\x06Speech\x12\xec\x01\n\x10\x43reateRecognizer\x12/.google.cloud.speech.v2.CreateRecognizerRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nRecognizer\x12\x11OperationMetadata\xda\x41\x1fparent,recognizer,recognizer_id\x82\xd3\xe4\x93\x02=\"//v2/{parent=projects/*/locations/*}/recognizers:\nrecognizer\x12\xb4\x01\n\x0fListRecognizers\x12..google.cloud.speech.v2.ListRecognizersRequest\x1a/.google.cloud.speech.v2.ListRecognizersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2/{parent=projects/*/locations/*}/recognizers\x12\xa1\x01\n\rGetRecognizer\x12,.google.cloud.speech.v2.GetRecognizerRequest\x1a\".google.cloud.speech.v2.Recognizer\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2/{name=projects/*/locations/*/recognizers/*}\x12\xee\x01\n\x10UpdateRecognizer\x12/.google.cloud.speech.v2.UpdateRecognizerRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nRecognizer\x12\x11OperationMetadata\xda\x41\x16recognizer,update_mask\x82\xd3\xe4\x93\x02H2:/v2/{recognizer.name=projects/*/locations/*/recognizers/*}:\nrecognizer\x12\xc4\x01\n\x10\x44\x65leteRecognizer\x12/.google.cloud.speech.v2.DeleteRecognizerRequest\x1a\x1d.google.longrunning.Operation\"`\xca\x41\x1f\n\nRecognizer\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2/{name=projects/*/locations/*/recognizers/*}\x12\xd4\x01\n\x12UndeleteRecognizer\x12\x31.google.cloud.speech.v2.UndeleteRecognizerRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41\x1f\n\nRecognizer\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v2/{name=projects/*/locations/*/recognizers/*}:undelete:\x01*\x12\xf9\x01\n\tRecognize\x12(.google.cloud.speech.v2.RecognizeRequest\x1a).google.cloud.speech.v2.RecognizeResponse\"\x96\x01\xda\x41%recognizer,config,config_mask,content\xda\x41!recognizer,config,config_mask,uri\x82\xd3\xe4\x93\x02\x44\"?/v2/{recognizer=projects/*/locations/*/recognizers/*}:recognize:\x01*\x12\x81\x01\n\x12StreamingRecognize\x12\x31.google.cloud.speech.v2.StreamingRecognizeRequest\x1a\x32.google.cloud.speech.v2.StreamingRecognizeResponse\"\x00(\x01\x30\x01\x12\x84\x02\n\x0e\x42\x61tchRecognize\x12-.google.cloud.speech.v2.BatchRecognizeRequest\x1a\x1d.google.longrunning.Operation\"\xa3\x01\xca\x41+\n\x16\x42\x61tchRecognizeResponse\x12\x11OperationMetadata\xda\x41#recognizer,config,config_mask,files\x82\xd3\xe4\x93\x02I\"D/v2/{recognizer=projects/*/locations/*/recognizers/*}:batchRecognize:\x01*\x12\x8e\x01\n\tGetConfig\x12(.google.cloud.speech.v2.GetConfigRequest\x1a\x1e.google.cloud.speech.v2.Config\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v2/{name=projects/*/locations/*/config}\x12\xb1\x01\n\x0cUpdateConfig\x12+.google.cloud.speech.v2.UpdateConfigRequest\x1a\x1e.google.cloud.speech.v2.Config\"T\xda\x41\x12\x63onfig,update_mask\x82\xd3\xe4\x93\x02\x39\x32//v2/{config.name=projects/*/locations/*/config}:\x06\x63onfig\x12\xf7\x01\n\x11\x43reateCustomClass\x12\x30.google.cloud.speech.v2.CreateCustomClassRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41 \n\x0b\x43ustomClass\x12\x11OperationMetadata\xda\x41#parent,custom_class,custom_class_id\x82\xd3\xe4\x93\x02\x41\"1/v2/{parent=projects/*/locations/*}/customClasses:\x0c\x63ustom_class\x12\xbc\x01\n\x11ListCustomClasses\x12\x30.google.cloud.speech.v2.ListCustomClassesRequest\x1a\x31.google.cloud.speech.v2.ListCustomClassesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v2/{parent=projects/*/locations/*}/customClasses\x12\xa6\x01\n\x0eGetCustomClass\x12-.google.cloud.speech.v2.GetCustomClassRequest\x1a#.google.cloud.speech.v2.CustomClass\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v2/{name=projects/*/locations/*/customClasses/*}\x12\xf9\x01\n\x11UpdateCustomClass\x12\x30.google.cloud.speech.v2.UpdateCustomClassRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41 \n\x0b\x43ustomClass\x12\x11OperationMetadata\xda\x41\x18\x63ustom_class,update_mask\x82\xd3\xe4\x93\x02N2>/v2/{custom_class.name=projects/*/locations/*/customClasses/*}:\x0c\x63ustom_class\x12\xc9\x01\n\x11\x44\x65leteCustomClass\x12\x30.google.cloud.speech.v2.DeleteCustomClassRequest\x1a\x1d.google.longrunning.Operation\"c\xca\x41 \n\x0b\x43ustomClass\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v2/{name=projects/*/locations/*/customClasses/*}\x12\xd9\x01\n\x13UndeleteCustomClass\x12\x32.google.cloud.speech.v2.UndeleteCustomClassRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41 \n\x0b\x43ustomClass\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?\":/v2/{name=projects/*/locations/*/customClasses/*}:undelete:\x01*\x12\xe8\x01\n\x0f\x43reatePhraseSet\x12..google.cloud.speech.v2.CreatePhraseSetRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tPhraseSet\x12\x11OperationMetadata\xda\x41\x1fparent,phrase_set,phrase_set_id\x82\xd3\xe4\x93\x02<\"./v2/{parent=projects/*/locations/*}/phraseSets:\nphrase_set\x12\xb0\x01\n\x0eListPhraseSets\x12-.google.cloud.speech.v2.ListPhraseSetsRequest\x1a..google.cloud.speech.v2.ListPhraseSetsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v2/{parent=projects/*/locations/*}/phraseSets\x12\x9d\x01\n\x0cGetPhraseSet\x12+.google.cloud.speech.v2.GetPhraseSetRequest\x1a!.google.cloud.speech.v2.PhraseSet\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v2/{name=projects/*/locations/*/phraseSets/*}\x12\xea\x01\n\x0fUpdatePhraseSet\x12..google.cloud.speech.v2.UpdatePhraseSetRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tPhraseSet\x12\x11OperationMetadata\xda\x41\x16phrase_set,update_mask\x82\xd3\xe4\x93\x02G29/v2/{phrase_set.name=projects/*/locations/*/phraseSets/*}:\nphrase_set\x12\xc0\x01\n\x0f\x44\x65letePhraseSet\x12..google.cloud.speech.v2.DeletePhraseSetRequest\x1a\x1d.google.longrunning.Operation\"^\xca\x41\x1e\n\tPhraseSet\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v2/{name=projects/*/locations/*/phraseSets/*}\x12\xd0\x01\n\x11UndeletePhraseSet\x12\x30.google.cloud.speech.v2.UndeletePhraseSetRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41\x1e\n\tPhraseSet\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v2/{name=projects/*/locations/*/phraseSets/*}:undelete:\x01*\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x03\n\x1a\x63om.google.cloud.speech.v2B\x10\x43loudSpeechProtoP\x01Z2cloud.google.com/go/speech/apiv2/speechpb;speechpb\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -71,6 +71,7 @@ module V2 TranslationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.TranslationConfig").msgclass SpeechAdaptation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.SpeechAdaptation").msgclass SpeechAdaptation::AdaptationPhraseSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet").msgclass + DenoiserConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.DenoiserConfig").msgclass RecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.RecognitionConfig").msgclass RecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.RecognizeRequest").msgclass RecognitionResponseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.RecognitionResponseMetadata").msgclass diff --git a/google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/cloud_speech.rb b/google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/cloud_speech.rb index 58fbf1873c38..83c053940675 100644 --- a/google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/cloud_speech.rb +++ b/google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/cloud_speech.rb @@ -434,9 +434,9 @@ class AutoDetectDecodingConfig # @!attribute [rw] sample_rate_hertz # @return [::Integer] # Optional. Sample rate in Hertz of the audio data sent for recognition. - # Valid values are: 8000-48000. 16000 is optimal. For best results, set the - # sampling rate of the audio source to 16000 Hz. If that's not possible, use - # the native sample rate of the audio source (instead of re-sampling). + # Valid values are: 8000-48000, and 16000 is optimal. For best results, set + # the sampling rate of the audio source to 16000 Hz. If that's not possible, + # use the native sample rate of the audio source (instead of resampling). # Note that this field is marked as OPTIONAL for backward compatibility # reasons. It is (and has always been) effectively REQUIRED. # @!attribute [rw] audio_channel_count @@ -658,6 +658,24 @@ class AdaptationPhraseSet end end + # Denoiser config. May not be supported for all models and may + # have no effect. + # @!attribute [rw] denoise_audio + # @return [::Boolean] + # Denoise audio before sending to the transcription model. + # @!attribute [rw] snr_threshold + # @return [::Float] + # Signal-to-Noise Ratio (SNR) threshold for the denoiser. Here SNR means the + # loudness of the speech signal. Audio with an SNR below this threshold, + # meaning the speech is too quiet, will be prevented from being sent to the + # transcription model. + # + # If snr_threshold=0, no filtering will be applied. + class DenoiserConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Provides information to the Recognizer that specifies how to process the # recognition request. # @!attribute [rw] auto_decoding_config @@ -713,6 +731,10 @@ class AdaptationPhraseSet # @return [::Google::Cloud::Speech::V2::TranslationConfig] # Optional. Optional configuration used to automatically run translation on # the given audio to the desired language for supported models. + # @!attribute [rw] denoiser_config + # @return [::Google::Cloud::Speech::V2::DenoiserConfig] + # Optional. Optional denoiser config. May not be supported for all models + # and may have no effect. class RecognitionConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/locations_metadata.rb b/google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/locations_metadata.rb index 8db4b0b32592..5c6362469379 100644 --- a/google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/locations_metadata.rb +++ b/google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/locations_metadata.rb @@ -21,7 +21,7 @@ module Google module Cloud module Speech module V2 - # Representes a singular feature of a model. If the feature is `recognizer`, + # Represents a singular feature of a model. If the feature is `recognizer`, # the release_state of the feature represents the release_state of the model # @!attribute [rw] feature # @return [::String] From a71a198c18cb79ac8b654142456d60b9981c0a76 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:22:21 -0700 Subject: [PATCH 096/457] feat: update NetworkServices protos (#30508) docs: Various updates --- .../.owlbot-manifest.json | 14 + .../gapic_metadata.json | 50 + .../v1/network_services/client.rb | 1328 +++++++++++++++-- .../v1/network_services/paths.rb | 175 +++ .../v1/network_services/rest/client.rb | 1252 ++++++++++++++-- .../v1/network_services/rest/service_stub.rb | 613 ++++++++ .../cloud/networkservices/v1/common_pb.rb | 3 +- .../networkservices/v1/endpoint_policy_pb.rb | 2 +- .../cloud/networkservices/v1/gateway_pb.rb | 5 +- .../cloud/networkservices/v1/grpc_route_pb.rb | 3 +- .../cloud/networkservices/v1/http_route_pb.rb | 4 +- .../cloud/networkservices/v1/mesh_pb.rb | 3 +- .../networkservices/v1/network_services_pb.rb | 5 +- .../v1/network_services_services_pb.rb | 20 + .../cloud/networkservices/v1/route_view_pb.rb | 52 + .../networkservices/v1/service_binding_pb.rb | 5 +- .../v1/service_lb_policy_pb.rb | 58 + .../cloud/networkservices/v1/tcp_route_pb.rb | 4 +- .../cloud/networkservices/v1/tls_route_pb.rb | 4 +- .../google/cloud/networkservices/v1/common.rb | 19 +- .../networkservices/v1/endpoint_policy.rb | 13 +- .../cloud/networkservices/v1/gateway.rb | 104 +- .../cloud/networkservices/v1/grpc_route.rb | 58 +- .../cloud/networkservices/v1/http_route.rb | 87 +- .../google/cloud/networkservices/v1/mesh.rb | 17 +- .../cloud/networkservices/v1/route_view.rb | 168 +++ .../networkservices/v1/service_binding.rb | 57 +- .../networkservices/v1/service_lb_policy.rb | 217 +++ .../cloud/networkservices/v1/tcp_route.rb | 30 +- .../cloud/networkservices/v1/tls_route.rb | 41 +- .../create_service_lb_policy.rb | 54 + .../delete_service_lb_policy.rb | 54 + .../get_gateway_route_view.rb | 47 + .../network_services/get_mesh_route_view.rb | 47 + .../network_services/get_service_lb_policy.rb | 47 + .../list_gateway_route_views.rb | 51 + .../network_services/list_mesh_route_views.rb | 51 + .../list_service_lb_policies.rb | 51 + .../update_service_binding.rb | 54 + .../update_service_lb_policy.rb | 54 + ...adata_google.cloud.networkservices.v1.json | 400 +++++ .../v1/network_services_paths_test.rb | 108 ++ .../v1/network_services_rest_test.rb | 616 +++++++- .../v1/network_services_test.rb | 707 ++++++++- 44 files changed, 6363 insertions(+), 389 deletions(-) create mode 100644 google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb create mode 100644 google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb create mode 100644 google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb create mode 100644 google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb diff --git a/google-cloud-network_services-v1/.owlbot-manifest.json b/google-cloud-network_services-v1/.owlbot-manifest.json index 31237897961d..d63b91d43329 100644 --- a/google-cloud-network_services-v1/.owlbot-manifest.json +++ b/google-cloud-network_services-v1/.owlbot-manifest.json @@ -46,7 +46,9 @@ "lib/google/cloud/networkservices/v1/mesh_pb.rb", "lib/google/cloud/networkservices/v1/network_services_pb.rb", "lib/google/cloud/networkservices/v1/network_services_services_pb.rb", + "lib/google/cloud/networkservices/v1/route_view_pb.rb", "lib/google/cloud/networkservices/v1/service_binding_pb.rb", + "lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb", "lib/google/cloud/networkservices/v1/tcp_route_pb.rb", "lib/google/cloud/networkservices/v1/tls_route_pb.rb", "proto_docs/README.md", @@ -62,7 +64,9 @@ "proto_docs/google/cloud/networkservices/v1/grpc_route.rb", "proto_docs/google/cloud/networkservices/v1/http_route.rb", "proto_docs/google/cloud/networkservices/v1/mesh.rb", + "proto_docs/google/cloud/networkservices/v1/route_view.rb", "proto_docs/google/cloud/networkservices/v1/service_binding.rb", + "proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb", "proto_docs/google/cloud/networkservices/v1/tcp_route.rb", "proto_docs/google/cloud/networkservices/v1/tls_route.rb", "proto_docs/google/longrunning/operations.rb", @@ -91,6 +95,7 @@ "snippets/network_services/create_http_route.rb", "snippets/network_services/create_mesh.rb", "snippets/network_services/create_service_binding.rb", + "snippets/network_services/create_service_lb_policy.rb", "snippets/network_services/create_tcp_route.rb", "snippets/network_services/create_tls_route.rb", "snippets/network_services/delete_endpoint_policy.rb", @@ -99,22 +104,29 @@ "snippets/network_services/delete_http_route.rb", "snippets/network_services/delete_mesh.rb", "snippets/network_services/delete_service_binding.rb", + "snippets/network_services/delete_service_lb_policy.rb", "snippets/network_services/delete_tcp_route.rb", "snippets/network_services/delete_tls_route.rb", "snippets/network_services/get_endpoint_policy.rb", "snippets/network_services/get_gateway.rb", + "snippets/network_services/get_gateway_route_view.rb", "snippets/network_services/get_grpc_route.rb", "snippets/network_services/get_http_route.rb", "snippets/network_services/get_mesh.rb", + "snippets/network_services/get_mesh_route_view.rb", "snippets/network_services/get_service_binding.rb", + "snippets/network_services/get_service_lb_policy.rb", "snippets/network_services/get_tcp_route.rb", "snippets/network_services/get_tls_route.rb", "snippets/network_services/list_endpoint_policies.rb", + "snippets/network_services/list_gateway_route_views.rb", "snippets/network_services/list_gateways.rb", "snippets/network_services/list_grpc_routes.rb", "snippets/network_services/list_http_routes.rb", + "snippets/network_services/list_mesh_route_views.rb", "snippets/network_services/list_meshes.rb", "snippets/network_services/list_service_bindings.rb", + "snippets/network_services/list_service_lb_policies.rb", "snippets/network_services/list_tcp_routes.rb", "snippets/network_services/list_tls_routes.rb", "snippets/network_services/update_endpoint_policy.rb", @@ -122,6 +134,8 @@ "snippets/network_services/update_grpc_route.rb", "snippets/network_services/update_http_route.rb", "snippets/network_services/update_mesh.rb", + "snippets/network_services/update_service_binding.rb", + "snippets/network_services/update_service_lb_policy.rb", "snippets/network_services/update_tcp_route.rb", "snippets/network_services/update_tls_route.rb", "snippets/snippet_metadata_google.cloud.networkservices.v1.json", diff --git a/google-cloud-network_services-v1/gapic_metadata.json b/google-cloud-network_services-v1/gapic_metadata.json index 97370faf619f..880f7362b1d3 100644 --- a/google-cloud-network_services-v1/gapic_metadata.json +++ b/google-cloud-network_services-v1/gapic_metadata.json @@ -234,6 +234,11 @@ "create_service_binding" ] }, + "UpdateServiceBinding": { + "methods": [ + "update_service_binding" + ] + }, "DeleteServiceBinding": { "methods": [ "delete_service_binding" @@ -263,6 +268,51 @@ "methods": [ "delete_mesh" ] + }, + "ListServiceLbPolicies": { + "methods": [ + "list_service_lb_policies" + ] + }, + "GetServiceLbPolicy": { + "methods": [ + "get_service_lb_policy" + ] + }, + "CreateServiceLbPolicy": { + "methods": [ + "create_service_lb_policy" + ] + }, + "UpdateServiceLbPolicy": { + "methods": [ + "update_service_lb_policy" + ] + }, + "DeleteServiceLbPolicy": { + "methods": [ + "delete_service_lb_policy" + ] + }, + "GetGatewayRouteView": { + "methods": [ + "get_gateway_route_view" + ] + }, + "GetMeshRouteView": { + "methods": [ + "get_mesh_route_view" + ] + }, + "ListGatewayRouteViews": { + "methods": [ + "list_gateway_route_views" + ] + }, + "ListMeshRouteViews": { + "methods": [ + "list_mesh_route_views" + ] } } } diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb index 88610b280b33..c062450d2c05 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb @@ -244,7 +244,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_endpoint_policies(parent: nil, page_size: nil, page_token: nil) + # @overload list_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_endpoint_policies` 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). @@ -259,6 +259,10 @@ def logger # Indicates that this is a continuation of a prior # `ListEndpointPolicies` call, and that the system should return the # next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] @@ -1202,7 +1206,7 @@ def delete_gateway request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_grpc_routes(parent: nil, page_size: nil, page_token: nil) + # @overload list_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_grpc_routes` 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). @@ -1216,6 +1220,10 @@ def delete_gateway request, options = nil # The value returned by the last `ListGrpcRoutesResponse` # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] @@ -1680,7 +1688,7 @@ def delete_grpc_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil) + # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_http_routes` 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). @@ -1694,6 +1702,10 @@ def delete_grpc_route request, options = nil # The value returned by the last `ListHttpRoutesResponse` # Indicates that this is a continuation of a prior `ListHttpRoutes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] @@ -2158,7 +2170,7 @@ def delete_http_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_tcp_routes(parent: nil, page_size: nil, page_token: nil) + # @overload list_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_tcp_routes` 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). @@ -2172,6 +2184,10 @@ def delete_http_route request, options = nil # The value returned by the last `ListTcpRoutesResponse` # Indicates that this is a continuation of a prior `ListTcpRoutes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] @@ -2636,7 +2652,7 @@ def delete_tcp_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_tls_routes(parent: nil, page_size: nil, page_token: nil) + # @overload list_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_tls_routes` 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). @@ -2650,6 +2666,10 @@ def delete_tcp_route request, options = nil # The value returned by the last `ListTlsRoutesResponse` # Indicates that this is a continuation of a prior `ListTlsRoutes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] @@ -3121,7 +3141,7 @@ def delete_tls_route request, options = nil # # @param parent [::String] # Required. The project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of ServiceBindings to return per call. # @param page_token [::String] @@ -3219,7 +3239,7 @@ def list_service_bindings request, options = nil # # @param name [::String] # Required. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/global/serviceBindings/*`. + # `projects/*/locations/*/serviceBindings/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::ServiceBinding] @@ -3305,7 +3325,7 @@ def get_service_binding request, options = nil # # @param parent [::String] # Required. The parent resource of the ServiceBinding. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param service_binding_id [::String] # Required. Short name of the ServiceBinding resource to be created. # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] @@ -3384,6 +3404,106 @@ def create_service_binding request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Updates the parameters of a single ServiceBinding. + # + # @overload update_service_binding(request, options = nil) + # Pass arguments to `update_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::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 update_service_binding(update_mask: nil, service_binding: nil) + # Pass arguments to `update_service_binding` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceBinding resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] + # Required. Updated ServiceBinding resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new + # + # # Call the update_service_binding method. + # result = client.update_service_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest + + # 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.update_service_binding.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_binding&.name + header_params["service_binding.name"] = request.service_binding.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.update_service_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_service_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 single ServiceBinding. # @@ -3404,7 +3524,7 @@ def create_service_binding request, options = nil # # @param name [::String] # Required. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/global/serviceBindings/*`. + # `projects/*/locations/*/serviceBindings/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -3492,7 +3612,7 @@ def delete_service_binding request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_meshes(parent: nil, page_size: nil, page_token: nil) + # @overload list_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_meshes` 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). @@ -3506,6 +3626,10 @@ def delete_service_binding request, options = nil # The value returned by the last `ListMeshesResponse` # Indicates that this is a continuation of a prior `ListMeshes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] @@ -3958,151 +4082,1005 @@ def delete_mesh request, options = nil end ## - # Configuration class for the NetworkServices API. + # Lists ServiceLbPolicies in a given project and location. # - # This class represents the configuration for NetworkServices, - # 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::NetworkServices::V1::NetworkServices::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. + # @overload list_service_lb_policies(request, options = nil) + # Pass arguments to `list_service_lb_policies` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash. # - # Configuration can be applied globally to all clients, or to a single client - # on construction. + # @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::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. # - # @example + # @overload list_service_lb_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_lb_policies` 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). # - # # Modify the global config, setting the timeout for - # # list_endpoint_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.timeout = 20.0 - # end + # @param parent [::String] + # Required. The project and location from which the ServiceLbPolicies should + # be listed, specified in the format + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Maximum number of ServiceLbPolicies to return per call. + # @param page_token [::String] + # The value returned by the last `ListServiceLbPoliciesResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.timeout = 20.0 - # end + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @!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)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] # - # 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] + # @raise [::Google::Cloud::Error] if the RPC is aborted. # - class Configuration - extend ::Gapic::Config + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new + # + # # Call the list_service_lb_policies method. + # result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. + # p item + # end + # + def list_service_lb_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "networkservices.googleapis.com" + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest - 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 + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? + # Customize the options with defaults + metadata = @config.rpcs.list_service_lb_policies.metadata.to_h - yield self if block_given? - end + # 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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - ## - # 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 + header_params = {} + if request.parent + header_params["parent"] = request.parent end - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + 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_service_lb_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_lb_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_service_lb_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, 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 + + ## + # Gets details of a single ServiceLbPolicy. + # + # @overload get_service_lb_policy(request, options = nil) + # Pass arguments to `get_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::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_service_lb_policy(name: nil) + # Pass arguments to `get_service_lb_policy` 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. A name of the ServiceLbPolicy to get. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new + # + # # Call the get_service_lb_policy method. + # result = client.get_service_lb_policy request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. + # p result + # + def get_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest + + # 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_service_lb_policy.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service_lb_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_service_lb_policy, 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 + + ## + # Creates a new ServiceLbPolicy in a given project and location. + # + # @overload create_service_lb_policy(request, options = nil) + # Pass arguments to `create_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) + # Pass arguments to `create_service_lb_policy` 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 parent resource of the ServiceLbPolicy. Must be in the + # format `projects/{project}/locations/{location}`. + # @param service_lb_policy_id [::String] + # Required. Short name of the ServiceLbPolicy resource to be created. + # E.g. for resource name + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. + # the id is value of \\{service_lb_policy_name} + # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] + # Required. ServiceLbPolicy resource to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new + # + # # Call the create_service_lb_policy method. + # result = client.create_service_lb_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest + + # 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_service_lb_policy.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_service_lb_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_service_lb_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single ServiceLbPolicy. + # + # @overload update_service_lb_policy(request, options = nil) + # Pass arguments to `update_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::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 update_service_lb_policy(update_mask: nil, service_lb_policy: nil) + # Pass arguments to `update_service_lb_policy` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceLbPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] + # Required. Updated ServiceLbPolicy resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new + # + # # Call the update_service_lb_policy method. + # result = client.update_service_lb_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest + + # 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.update_service_lb_policy.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_lb_policy&.name + header_params["service_lb_policy.name"] = request.service_lb_policy.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.update_service_lb_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_service_lb_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 single ServiceLbPolicy. + # + # @overload delete_service_lb_policy(request, options = nil) + # Pass arguments to `delete_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::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_service_lb_policy(name: nil) + # Pass arguments to `delete_service_lb_policy` 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. A name of the ServiceLbPolicy to delete. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new + # + # # Call the delete_service_lb_policy method. + # result = client.delete_service_lb_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest + + # 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_service_lb_policy.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_service_lb_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_service_lb_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a single RouteView of a Gateway. + # + # @overload get_gateway_route_view(request, options = nil) + # Pass arguments to `get_gateway_route_view` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::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_gateway_route_view(name: nil) + # Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the GatewayRouteView resource. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new + # + # # Call the get_gateway_route_view method. + # result = client.get_gateway_route_view request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. + # p result + # + def get_gateway_route_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest + + # 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_gateway_route_view.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_gateway_route_view.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_gateway_route_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_gateway_route_view, 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 + + ## + # Get a single RouteView of a Mesh. + # + # @overload get_mesh_route_view(request, options = nil) + # Pass arguments to `get_mesh_route_view` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::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_mesh_route_view(name: nil) + # Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the MeshRouteView resource. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new + # + # # Call the get_mesh_route_view method. + # result = client.get_mesh_route_view request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. + # p result + # + def get_mesh_route_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest + + # 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_mesh_route_view.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_mesh_route_view.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_mesh_route_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_mesh_route_view, 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 RouteViews + # + # @overload list_gateway_route_views(request, options = nil) + # Pass arguments to `list_gateway_route_views` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gateway_route_views` 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 Gateway to which a Route is associated. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} + # @param page_size [::Integer] + # Maximum number of GatewayRouteViews to return per call. + # @param page_token [::String] + # The value returned by the last `ListGatewayRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListGatewayRouteViews` + # call, and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new + # + # # Call the list_gateway_route_views method. + # result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. + # p item + # end + # + def list_gateway_route_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest + + # 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_gateway_route_views.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_gateway_route_views.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gateway_route_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_gateway_route_views, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, 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 + + ## + # Lists RouteViews + # + # @overload list_mesh_route_views(request, options = nil) + # Pass arguments to `list_mesh_route_views` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mesh_route_views` 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 Mesh to which a Route is associated. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} + # @param page_size [::Integer] + # Maximum number of MeshRouteViews to return per call. + # @param page_token [::String] + # The value returned by the last `ListMeshRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, + # and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new + # + # # Call the list_mesh_route_views method. + # result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. + # p item + # end + # + def list_mesh_route_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest + + # 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_mesh_route_views.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_mesh_route_views.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_mesh_route_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_mesh_route_views, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, 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 NetworkServices API. + # + # This class represents the configuration for NetworkServices, + # 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::NetworkServices::V1::NetworkServices::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 + # # list_endpoint_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_endpoint_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_endpoint_policies.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "networkservices.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 ## @@ -4289,6 +5267,11 @@ class Rpcs # attr_reader :create_service_binding ## + # RPC-specific configuration for `update_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_binding + ## # RPC-specific configuration for `delete_service_binding` # @return [::Gapic::Config::Method] # @@ -4318,6 +5301,51 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_mesh + ## + # RPC-specific configuration for `list_service_lb_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_lb_policies + ## + # RPC-specific configuration for `get_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_lb_policy + ## + # RPC-specific configuration for `create_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_lb_policy + ## + # RPC-specific configuration for `update_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_lb_policy + ## + # RPC-specific configuration for `delete_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_lb_policy + ## + # RPC-specific configuration for `get_gateway_route_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gateway_route_view + ## + # RPC-specific configuration for `get_mesh_route_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mesh_route_view + ## + # RPC-specific configuration for `list_gateway_route_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gateway_route_views + ## + # RPC-specific configuration for `list_mesh_route_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mesh_route_views # @private def initialize parent_rpcs = nil @@ -4387,6 +5415,8 @@ def initialize parent_rpcs = nil @get_service_binding = ::Gapic::Config::Method.new get_service_binding_config create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding @create_service_binding = ::Gapic::Config::Method.new create_service_binding_config + update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding + @update_service_binding = ::Gapic::Config::Method.new update_service_binding_config delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding @delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes @@ -4399,6 +5429,24 @@ def initialize parent_rpcs = nil @update_mesh = ::Gapic::Config::Method.new update_mesh_config delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh @delete_mesh = ::Gapic::Config::Method.new delete_mesh_config + list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies + @list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config + get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy + @get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config + create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy + @create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config + update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy + @update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config + delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy + @delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config + get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view + @get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config + get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view + @get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config + list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views + @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config + list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views + @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config yield self if block_given? end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb index 61566bf56e79..689cd891d9e7 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb @@ -24,6 +24,25 @@ module V1 module NetworkServices # Path helper methods for the NetworkServices API. module Paths + ## + # Create a fully-qualified Address resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/addresses/{address}` + # + # @param project [String] + # @param region [String] + # @param address [String] + # + # @return [::String] + def address_path project:, region:, address: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/addresses/#{address}" + end + ## # Create a fully-qualified AuthorizationPolicy resource string. # @@ -62,6 +81,25 @@ def backend_service_path project:, location:, backend_service: "projects/#{project}/locations/#{location}/backendServices/#{backend_service}" end + ## + # Create a fully-qualified Certificate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificates/{certificate}` + # + # @param project [String] + # @param location [String] + # @param certificate [String] + # + # @return [::String] + def certificate_path project:, location:, certificate: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificates/#{certificate}" + end + ## # Create a fully-qualified ClientTlsPolicy resource string. # @@ -119,6 +157,46 @@ def gateway_path project:, location:, gateway: "projects/#{project}/locations/#{location}/gateways/#{gateway}" end + ## + # Create a fully-qualified GatewayRouteView resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}` + # + # @param project [String] + # @param location [String] + # @param gateway [String] + # @param route_view [String] + # + # @return [::String] + def gateway_route_view_path project:, location:, gateway:, route_view: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "gateway cannot contain /" if gateway.to_s.include? "/" + + "projects/#{project}/locations/#{location}/gateways/#{gateway}/routeViews/#{route_view}" + end + + ## + # Create a fully-qualified GatewaySecurityPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}` + # + # @param project [String] + # @param location [String] + # @param gateway_security_policy [String] + # + # @return [::String] + def gateway_security_policy_path project:, location:, gateway_security_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/gatewaySecurityPolicies/#{gateway_security_policy}" + end + ## # Create a fully-qualified GrpcRoute resource string. # @@ -193,6 +271,44 @@ def mesh_path project:, location:, mesh: "projects/#{project}/locations/#{location}/meshes/#{mesh}" end + ## + # Create a fully-qualified MeshRouteView resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}` + # + # @param project [String] + # @param location [String] + # @param mesh [String] + # @param route_view [String] + # + # @return [::String] + def mesh_route_view_path project:, location:, mesh:, route_view: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "mesh cannot contain /" if mesh.to_s.include? "/" + + "projects/#{project}/locations/#{location}/meshes/#{mesh}/routeViews/#{route_view}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/global/networks/{network}` + # + # @param project [String] + # @param network [String] + # + # @return [::String] + def network_path project:, network: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/global/networks/#{network}" + end + ## # Create a fully-qualified ServerTlsPolicy resource string. # @@ -212,6 +328,27 @@ def server_tls_policy_path project:, location:, server_tls_policy: "projects/#{project}/locations/#{location}/serverTlsPolicies/#{server_tls_policy}" end + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, namespace:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" + end + ## # Create a fully-qualified ServiceBinding resource string. # @@ -231,6 +368,44 @@ def service_binding_path project:, location:, service_binding: "projects/#{project}/locations/#{location}/serviceBindings/#{service_binding}" end + ## + # Create a fully-qualified ServiceLbPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}` + # + # @param project [String] + # @param location [String] + # @param service_lb_policy [String] + # + # @return [::String] + def service_lb_policy_path project:, location:, service_lb_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/serviceLbPolicies/#{service_lb_policy}" + end + + ## + # Create a fully-qualified Subnetwork resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/subnetworks/{subnetwork}` + # + # @param project [String] + # @param region [String] + # @param subnetwork [String] + # + # @return [::String] + def subnetwork_path project:, region:, subnetwork: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}" + end + ## # Create a fully-qualified TcpRoute resource string. # diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb index d618487dc246..44a51665ebd4 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb @@ -239,7 +239,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_endpoint_policies(parent: nil, page_size: nil, page_token: nil) + # @overload list_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_endpoint_policies` 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). @@ -254,6 +254,10 @@ def logger # Indicates that this is a continuation of a prior # `ListEndpointPolicies` call, and that the system should return the # next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1127,7 +1131,7 @@ def delete_gateway request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_grpc_routes(parent: nil, page_size: nil, page_token: nil) + # @overload list_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_grpc_routes` 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). @@ -1141,6 +1145,10 @@ def delete_gateway request, options = nil # The value returned by the last `ListGrpcRoutesResponse` # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1570,7 +1578,7 @@ def delete_grpc_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil) + # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_http_routes` 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). @@ -1584,6 +1592,10 @@ def delete_grpc_route request, options = nil # The value returned by the last `ListHttpRoutesResponse` # Indicates that this is a continuation of a prior `ListHttpRoutes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2013,7 +2025,7 @@ def delete_http_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_tcp_routes(parent: nil, page_size: nil, page_token: nil) + # @overload list_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_tcp_routes` 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). @@ -2027,6 +2039,10 @@ def delete_http_route request, options = nil # The value returned by the last `ListTcpRoutesResponse` # Indicates that this is a continuation of a prior `ListTcpRoutes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2456,7 +2472,7 @@ def delete_tcp_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_tls_routes(parent: nil, page_size: nil, page_token: nil) + # @overload list_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_tls_routes` 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). @@ -2470,6 +2486,10 @@ def delete_tcp_route request, options = nil # The value returned by the last `ListTlsRoutesResponse` # Indicates that this is a continuation of a prior `ListTlsRoutes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2906,7 +2926,7 @@ def delete_tls_route request, options = nil # # @param parent [::String] # Required. The project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of ServiceBindings to return per call. # @param page_token [::String] @@ -2997,7 +3017,7 @@ def list_service_bindings request, options = nil # # @param name [::String] # Required. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/global/serviceBindings/*`. + # `projects/*/locations/*/serviceBindings/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceBinding] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3076,7 +3096,7 @@ def get_service_binding request, options = nil # # @param parent [::String] # Required. The parent resource of the ServiceBinding. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param service_binding_id [::String] # Required. Short name of the ServiceBinding resource to be created. # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] @@ -3148,6 +3168,99 @@ def create_service_binding request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Updates the parameters of a single ServiceBinding. + # + # @overload update_service_binding(request, options = nil) + # Pass arguments to `update_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::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 update_service_binding(update_mask: nil, service_binding: nil) + # Pass arguments to `update_service_binding` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceBinding resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] + # Required. Updated ServiceBinding resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new + # + # # Call the update_service_binding method. + # result = client.update_service_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest + + # 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.update_service_binding.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::NetworkServices::V1::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.update_service_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_service_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single ServiceBinding. # @@ -3168,7 +3281,7 @@ def create_service_binding request, options = nil # # @param name [::String] # Required. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/global/serviceBindings/*`. + # `projects/*/locations/*/serviceBindings/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3249,7 +3362,7 @@ def delete_service_binding request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_meshes(parent: nil, page_size: nil, page_token: nil) + # @overload list_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) # Pass arguments to `list_meshes` 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). @@ -3263,6 +3376,10 @@ def delete_service_binding request, options = nil # The value returned by the last `ListMeshesResponse` # Indicates that this is a continuation of a prior `ListMeshes` call, # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3680,149 +3797,940 @@ def delete_mesh request, options = nil end ## - # Configuration class for the NetworkServices REST API. + # Lists ServiceLbPolicies in a given project and location. # - # This class represents the configuration for NetworkServices 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::NetworkServices::V1::NetworkServices::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. + # @overload list_service_lb_policies(request, options = nil) + # Pass arguments to `list_service_lb_policies` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash. # - # Configuration can be applied globally to all clients, or to a single client - # on construction. + # @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::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. # - # @example + # @overload list_service_lb_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_lb_policies` 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). # - # # Modify the global config, setting the timeout for - # # list_endpoint_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.timeout = 20.0 - # end + # @param parent [::String] + # Required. The project and location from which the ServiceLbPolicies should + # be listed, specified in the format + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Maximum number of ServiceLbPolicies to return per call. + # @param page_token [::String] + # The value returned by the last `ListServiceLbPoliciesResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.timeout = 20.0 - # end + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] # - # @!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 + # @raise [::Google::Cloud::Error] if the REST call is aborted. # - # 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] + # @example Basic example + # require "google/cloud/network_services/v1" # - class Configuration - extend ::Gapic::Config + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new + # + # # Call the list_service_lb_policies method. + # result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. + # p item + # end + # + def list_service_lb_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "networkservices.googleapis.com" + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest - 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 + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default + # Customize the options with defaults + call_metadata = @config.rpcs.list_service_lb_policies.metadata.to_h - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? + # 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::NetworkServices::V1::VERSION, + transports_version_send: [:rest] - yield self if block_given? - end + 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 - ## - # 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 + options.apply_defaults timeout: @config.rpcs.list_service_lb_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_lb_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_service_lb_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, "service_lb_policies", 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 RPC class for the NetworkServices 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 + ## + # Gets details of a single ServiceLbPolicy. + # + # @overload get_service_lb_policy(request, options = nil) + # Pass arguments to `get_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::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_service_lb_policy(name: nil) + # Pass arguments to `get_service_lb_policy` 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. A name of the ServiceLbPolicy to get. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new + # + # # Call the get_service_lb_policy method. + # result = client.get_service_lb_policy request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. + # p result + # + def get_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest + + # 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_service_lb_policy.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::NetworkServices::V1::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_service_lb_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_service_lb_policy 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 + + ## + # Creates a new ServiceLbPolicy in a given project and location. + # + # @overload create_service_lb_policy(request, options = nil) + # Pass arguments to `create_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) + # Pass arguments to `create_service_lb_policy` 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 parent resource of the ServiceLbPolicy. Must be in the + # format `projects/{project}/locations/{location}`. + # @param service_lb_policy_id [::String] + # Required. Short name of the ServiceLbPolicy resource to be created. + # E.g. for resource name + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. + # the id is value of \\{service_lb_policy_name} + # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] + # Required. ServiceLbPolicy resource to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new + # + # # Call the create_service_lb_policy method. + # result = client.create_service_lb_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest + + # 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_service_lb_policy.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::NetworkServices::V1::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_service_lb_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_service_lb_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single ServiceLbPolicy. + # + # @overload update_service_lb_policy(request, options = nil) + # Pass arguments to `update_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::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 update_service_lb_policy(update_mask: nil, service_lb_policy: nil) + # Pass arguments to `update_service_lb_policy` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceLbPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] + # Required. Updated ServiceLbPolicy resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new + # + # # Call the update_service_lb_policy method. + # result = client.update_service_lb_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest + + # 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.update_service_lb_policy.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::NetworkServices::V1::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.update_service_lb_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_service_lb_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single ServiceLbPolicy. + # + # @overload delete_service_lb_policy(request, options = nil) + # Pass arguments to `delete_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::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_service_lb_policy(name: nil) + # Pass arguments to `delete_service_lb_policy` 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. A name of the ServiceLbPolicy to delete. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new + # + # # Call the delete_service_lb_policy method. + # result = client.delete_service_lb_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest + + # 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_service_lb_policy.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::NetworkServices::V1::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_service_lb_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_service_lb_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a single RouteView of a Gateway. + # + # @overload get_gateway_route_view(request, options = nil) + # Pass arguments to `get_gateway_route_view` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::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_gateway_route_view(name: nil) + # Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the GatewayRouteView resource. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new + # + # # Call the get_gateway_route_view method. + # result = client.get_gateway_route_view request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. + # p result + # + def get_gateway_route_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest + + # 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_gateway_route_view.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::NetworkServices::V1::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_gateway_route_view.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_gateway_route_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_gateway_route_view 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 + + ## + # Get a single RouteView of a Mesh. + # + # @overload get_mesh_route_view(request, options = nil) + # Pass arguments to `get_mesh_route_view` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::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_mesh_route_view(name: nil) + # Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the MeshRouteView resource. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new + # + # # Call the get_mesh_route_view method. + # result = client.get_mesh_route_view request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. + # p result + # + def get_mesh_route_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest + + # 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_mesh_route_view.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::NetworkServices::V1::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_mesh_route_view.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_mesh_route_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_mesh_route_view 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 RouteViews + # + # @overload list_gateway_route_views(request, options = nil) + # Pass arguments to `list_gateway_route_views` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gateway_route_views` 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 Gateway to which a Route is associated. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} + # @param page_size [::Integer] + # Maximum number of GatewayRouteViews to return per call. + # @param page_token [::String] + # The value returned by the last `ListGatewayRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListGatewayRouteViews` + # call, and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new + # + # # Call the list_gateway_route_views method. + # result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. + # p item + # end + # + def list_gateway_route_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest + + # 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_gateway_route_views.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::NetworkServices::V1::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_gateway_route_views.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gateway_route_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_gateway_route_views request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, "gateway_route_views", 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 + + ## + # Lists RouteViews + # + # @overload list_mesh_route_views(request, options = nil) + # Pass arguments to `list_mesh_route_views` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mesh_route_views` 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 Mesh to which a Route is associated. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} + # @param page_size [::Integer] + # Maximum number of MeshRouteViews to return per call. + # @param page_token [::String] + # The value returned by the last `ListMeshRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, + # and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new + # + # # Call the list_mesh_route_views method. + # result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. + # p item + # end + # + def list_mesh_route_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest + + # 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_mesh_route_views.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::NetworkServices::V1::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_mesh_route_views.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_mesh_route_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_mesh_route_views request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, "mesh_route_views", 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 NetworkServices REST API. + # + # This class represents the configuration for NetworkServices 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::NetworkServices::V1::NetworkServices::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 + # # list_endpoint_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_endpoint_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_endpoint_policies.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 = "networkservices.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, 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 NetworkServices 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. @@ -3998,6 +4906,11 @@ class Rpcs # attr_reader :create_service_binding ## + # RPC-specific configuration for `update_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_binding + ## # RPC-specific configuration for `delete_service_binding` # @return [::Gapic::Config::Method] # @@ -4027,6 +4940,51 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_mesh + ## + # RPC-specific configuration for `list_service_lb_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_lb_policies + ## + # RPC-specific configuration for `get_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_lb_policy + ## + # RPC-specific configuration for `create_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_lb_policy + ## + # RPC-specific configuration for `update_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_lb_policy + ## + # RPC-specific configuration for `delete_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_lb_policy + ## + # RPC-specific configuration for `get_gateway_route_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gateway_route_view + ## + # RPC-specific configuration for `get_mesh_route_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mesh_route_view + ## + # RPC-specific configuration for `list_gateway_route_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gateway_route_views + ## + # RPC-specific configuration for `list_mesh_route_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mesh_route_views # @private def initialize parent_rpcs = nil @@ -4096,6 +5054,8 @@ def initialize parent_rpcs = nil @get_service_binding = ::Gapic::Config::Method.new get_service_binding_config create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding @create_service_binding = ::Gapic::Config::Method.new create_service_binding_config + update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding + @update_service_binding = ::Gapic::Config::Method.new update_service_binding_config delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding @delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes @@ -4108,6 +5068,24 @@ def initialize parent_rpcs = nil @update_mesh = ::Gapic::Config::Method.new update_mesh_config delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh @delete_mesh = ::Gapic::Config::Method.new delete_mesh_config + list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies + @list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config + get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy + @get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config + create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy + @create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config + update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy + @update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config + delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy + @delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config + get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view + @get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config + get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view + @get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config + list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views + @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config + list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views + @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config yield self if block_given? end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb index 0ec9481d6f84..3f7b86fea53c 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb @@ -1393,6 +1393,46 @@ def create_service_binding request_pb, options = nil end end + ## + # Baseline implementation for the update_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_service_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_binding_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: "update_service_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_service_binding REST call # @@ -1633,6 +1673,366 @@ def delete_mesh request_pb, options = nil end end + ## + # Baseline implementation for the list_service_lb_policies REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest] + # 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::NetworkServices::V1::ListServiceLbPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse] + # A result object deserialized from the server's reply + def list_service_lb_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_lb_policies_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_service_lb_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest] + # 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::NetworkServices::V1::ServiceLbPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # A result object deserialized from the server's reply + def get_service_lb_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_lb_policy_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_service_lb_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_service_lb_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_lb_policy_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_service_lb_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_service_lb_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_lb_policy_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: "update_service_lb_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_service_lb_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_lb_policy_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_service_lb_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_gateway_route_view REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest] + # 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::NetworkServices::V1::GatewayRouteView] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # A result object deserialized from the server's reply + def get_gateway_route_view request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_gateway_route_view_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_gateway_route_view", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.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_mesh_route_view REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest] + # 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::NetworkServices::V1::MeshRouteView] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # A result object deserialized from the server's reply + def get_mesh_route_view request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_mesh_route_view_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_mesh_route_view", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::MeshRouteView.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_gateway_route_views REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest] + # 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::NetworkServices::V1::ListGatewayRouteViewsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse] + # A result object deserialized from the server's reply + def list_gateway_route_views request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gateway_route_views_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_gateway_route_views", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.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_mesh_route_views REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest] + # 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::NetworkServices::V1::ListMeshRouteViewsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse] + # A result object deserialized from the server's reply + def list_mesh_route_views request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_mesh_route_views_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_mesh_route_views", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -2339,6 +2739,28 @@ def self.transcode_create_service_binding_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the update_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_service_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{service_binding.name}", + body: "service_binding", + matches: [ + ["service_binding.name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -2466,6 +2888,197 @@ def self.transcode_delete_mesh_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_lb_policies REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest] + # 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_service_lb_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/serviceLbPolicies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest] + # 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_service_lb_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest] + # 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_service_lb_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/serviceLbPolicies", + body: "service_lb_policy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_service_lb_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{service_lb_policy.name}", + body: "service_lb_policy", + matches: [ + ["service_lb_policy.name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest] + # 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_service_lb_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_gateway_route_view REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest] + # 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_gateway_route_view_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/routeViews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_mesh_route_view REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest] + # 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_mesh_route_view_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/routeViews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_gateway_route_views REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest] + # 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_gateway_route_views_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/routeViews", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_mesh_route_views REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest] + # 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_mesh_route_views_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/routeViews", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb index ed134a8b7ac2..6cd60a5024c4 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb @@ -8,7 +8,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/networkservices/v1/common.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\")\n\x13TrafficPortSelector\x12\x12\n\x05ports\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xcc\x04\n\x0f\x45ndpointMatcher\x12g\n\x16metadata_label_matcher\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcherH\x00\x1a\xbf\x03\n\x14MetadataLabelMatcher\x12\x87\x01\n\x1dmetadata_label_match_criteria\x18\x01 \x01(\x0e\x32`.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria\x12m\n\x0fmetadata_labels\x18\x02 \x03(\x0b\x32T.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels\x1a\x43\n\x0eMetadataLabels\x12\x17\n\nlabel_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0blabel_value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x1aMetadataLabelMatchCriteria\x12-\n)METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED\x10\x00\x12\r\n\tMATCH_ANY\x10\x01\x12\r\n\tMATCH_ALL\x10\x02\x42\x0e\n\x0cmatcher_typeB\xec\x01\n#com.google.cloud.networkservices.v1B\x0b\x43ommonProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n,google/cloud/networkservices/v1/common.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\")\n\x13TrafficPortSelector\x12\x12\n\x05ports\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xcc\x04\n\x0f\x45ndpointMatcher\x12g\n\x16metadata_label_matcher\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcherH\x00\x1a\xbf\x03\n\x14MetadataLabelMatcher\x12\x87\x01\n\x1dmetadata_label_match_criteria\x18\x01 \x01(\x0e\x32`.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria\x12m\n\x0fmetadata_labels\x18\x02 \x03(\x0b\x32T.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels\x1a\x43\n\x0eMetadataLabels\x12\x17\n\nlabel_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0blabel_value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x1aMetadataLabelMatchCriteria\x12-\n)METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED\x10\x00\x12\r\n\tMATCH_ANY\x10\x01\x12\r\n\tMATCH_ALL\x10\x02\x42\x0e\n\x0cmatcher_type*J\n\x0c\x45nvoyHeaders\x12\x1d\n\x19\x45NVOY_HEADERS_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x11\n\rDEBUG_HEADERS\x10\x02\x42\xec\x01\n#com.google.cloud.networkservices.v1B\x0b\x43ommonProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -45,6 +45,7 @@ module V1 EndpointMatcher::MetadataLabelMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher").msgclass EndpointMatcher::MetadataLabelMatcher::MetadataLabels = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels").msgclass EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria").enummodule + EnvoyHeaders = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EnvoyHeaders").enummodule end end end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb index 36b4fb79ce8e..5fe787b79a62 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n5google/cloud/networkservices/v1/endpoint_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x08\n\x0e\x45ndpointPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x04 \x03(\x0b\x32;.google.cloud.networkservices.v1.EndpointPolicy.LabelsEntryB\x03\xe0\x41\x01\x12U\n\x04type\x18\x05 \x01(\x0e\x32\x42.google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyTypeB\x03\xe0\x41\x02\x12X\n\x14\x61uthorization_policy\x18\x07 \x01(\tB:\xe0\x41\x01\xfa\x41\x34\n2networksecurity.googleapis.com/AuthorizationPolicy\x12O\n\x10\x65ndpoint_matcher\x18\t \x01(\x0b\x32\x30.google.cloud.networkservices.v1.EndpointMatcherB\x03\xe0\x41\x02\x12X\n\x15traffic_port_selector\x18\n \x01(\x0b\x32\x34.google.cloud.networkservices.v1.TrafficPortSelectorB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\x0c \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Q\n\x11\x63lient_tls_policy\x18\r \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ClientTlsPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x12\x45ndpointPolicyType\x12$\n ENDPOINT_POLICY_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSIDECAR_PROXY\x10\x01\x12\x0f\n\x0bGRPC_SERVER\x10\x02:~\xea\x41{\n-networkservices.googleapis.com/EndpointPolicy\x12Jprojects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}\"\x8b\x01\n\x1bListEndpointPoliciesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x83\x01\n\x1cListEndpointPoliciesResponse\x12J\n\x11\x65ndpoint_policies\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x18GetEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicy\"\xd4\x01\n\x1b\x43reateEndpointPolicyRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x1f\n\x12\x65ndpoint_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x65ndpoint_policy\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateEndpointPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0f\x65ndpoint_policy\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicyB\x86\x05\n#com.google.cloud.networkservices.v1B\x13\x45ndpointPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x8a\x01\n2networksecurity.googleapis.com/AuthorizationPolicy\x12Tprojects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ClientTlsPolicy\x12Mprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}b\x06proto3" +descriptor_data = "\n5google/cloud/networkservices/v1/endpoint_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x08\n\x0e\x45ndpointPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x04 \x03(\x0b\x32;.google.cloud.networkservices.v1.EndpointPolicy.LabelsEntryB\x03\xe0\x41\x01\x12U\n\x04type\x18\x05 \x01(\x0e\x32\x42.google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyTypeB\x03\xe0\x41\x02\x12X\n\x14\x61uthorization_policy\x18\x07 \x01(\tB:\xe0\x41\x01\xfa\x41\x34\n2networksecurity.googleapis.com/AuthorizationPolicy\x12O\n\x10\x65ndpoint_matcher\x18\t \x01(\x0b\x32\x30.google.cloud.networkservices.v1.EndpointMatcherB\x03\xe0\x41\x02\x12X\n\x15traffic_port_selector\x18\n \x01(\x0b\x32\x34.google.cloud.networkservices.v1.TrafficPortSelectorB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\x0c \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Q\n\x11\x63lient_tls_policy\x18\r \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ClientTlsPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x12\x45ndpointPolicyType\x12$\n ENDPOINT_POLICY_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSIDECAR_PROXY\x10\x01\x12\x0f\n\x0bGRPC_SERVER\x10\x02:~\xea\x41{\n-networkservices.googleapis.com/EndpointPolicy\x12Jprojects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}\"\xb0\x01\n\x1bListEndpointPoliciesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x1cListEndpointPoliciesResponse\x12J\n\x11\x65ndpoint_policies\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicy\"\xd4\x01\n\x1b\x43reateEndpointPolicyRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x1f\n\x12\x65ndpoint_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x65ndpoint_policy\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateEndpointPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0f\x65ndpoint_policy\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicyB\x86\x05\n#com.google.cloud.networkservices.v1B\x13\x45ndpointPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x8a\x01\n2networksecurity.googleapis.com/AuthorizationPolicy\x12Tprojects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ClientTlsPolicy\x12Mprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb index 797a6a61a666..ded2356f7c0d 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb @@ -6,11 +6,12 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/cloud/networkservices/v1/common_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n-google/cloud/networkservices/v1/gateway.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xef\x04\n\x07Gateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tself_link\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.Gateway.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12@\n\x04type\x18\x06 \x01(\x0e\x32-.google.cloud.networkservices.v1.Gateway.TypeB\x03\xe0\x41\x05\x12\x12\n\x05ports\x18\x0b \x03(\x05\x42\x03\xe0\x41\x02\x12\x15\n\x05scope\x18\x08 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11server_tls_policy\x18\t \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tOPEN_MESH\x10\x01\x12\x16\n\x12SECURE_WEB_GATEWAY\x10\x02:g\xea\x41\x64\n&networkservices.googleapis.com/Gateway\x12:projects/{project}/locations/{location}/gateways/{gateway}\"|\n\x13ListGatewaysRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\xed\x01\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n-google/cloud/networkservices/v1/gateway.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x84\x0b\n\x07Gateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.Gateway.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12@\n\x04type\x18\x06 \x01(\x0e\x32-.google.cloud.networkservices.v1.Gateway.TypeB\x03\xe0\x41\x05\x12\x39\n\taddresses\x18\x07 \x03(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Address\x12\x12\n\x05ports\x18\x0b \x03(\x05\x42\x03\xe0\x41\x02\x12\x12\n\x05scope\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\t \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12O\n\x10\x63\x65rtificate_urls\x18\x0e \x03(\tB5\xe0\x41\x01\xfa\x41/\n-certificatemanager.googleapis.com/Certificate\x12]\n\x17gateway_security_policy\x18\x12 \x01(\tB<\xe0\x41\x01\xfa\x41\x36\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12\x37\n\x07network\x18\x10 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12=\n\nsubnetwork\x18\x11 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!compute.googleapis.com/Subnetwork\x12K\n\nip_version\x18\x15 \x01(\x0e\x32\x32.google.cloud.networkservices.v1.Gateway.IpVersionB\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x1c \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x0crouting_mode\x18 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.Gateway.RoutingModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tOPEN_MESH\x10\x01\x12\x16\n\x12SECURE_WEB_GATEWAY\x10\x02\";\n\tIpVersion\x12\x1a\n\x16IP_VERSION_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\x08\n\x04IPV6\x10\x02\"C\n\x0bRoutingMode\x12\x19\n\x15\x45XPLICIT_ROUTING_MODE\x10\x00\x12\x19\n\x15NEXT_HOP_ROUTING_MODE\x10\x01:g\xea\x41\x64\n&networkservices.googleapis.com/Gateway\x12:projects/{project}/locations/{location}/gateways/{gateway}B\x10\n\x0e_envoy_headers\"|\n\x13ListGatewaysRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x80\x01\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\x89\x06\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x91\x01\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\xea\x41\x61\n!compute.googleapis.com/Subnetwork\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRoute\"\xbb\x01\n\x16\x43reateGrpcRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/GrpcRoute\x12\x1a\n\rgrpc_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\ngrpc_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateGrpcRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\ngrpc_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteGrpcRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eGrpcRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n0google/cloud/networkservices/v1/grpc_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x89\x15\n\tGrpcRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.GrpcRoute.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\thostnames\x18\x06 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\t \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\n \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12H\n\x05rules\x18\x07 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.GrpcRoute.RouteRuleB\x03\xe0\x41\x02\x1a\x88\x02\n\x0bMethodMatch\x12N\n\x04type\x18\x01 \x01(\x0e\x32;.google.cloud.networkservices.v1.GrpcRoute.MethodMatch.TypeB\x03\xe0\x41\x01\x12\x19\n\x0cgrpc_service\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bgrpc_method\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12 \n\x0e\x63\x61se_sensitive\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\"?\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45XACT\x10\x01\x12\x16\n\x12REGULAR_EXPRESSION\x10\x02\x42\x11\n\x0f_case_sensitive\x1a\xc4\x01\n\x0bHeaderMatch\x12N\n\x04type\x18\x01 \x01(\x0e\x32;.google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.TypeB\x03\xe0\x41\x01\x12\x10\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x03 \x01(\tB\x03\xe0\x41\x02\"?\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45XACT\x10\x01\x12\x16\n\x12REGULAR_EXPRESSION\x10\x02\x1a\xb7\x01\n\nRouteMatch\x12P\n\x06method\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.GrpcRoute.MethodMatchB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12L\n\x07headers\x18\x02 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.GrpcRoute.HeaderMatchB\x03\xe0\x41\x01\x42\t\n\x07_method\x1a\x8d\x01\n\x0b\x44\x65stination\x12\x45\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendServiceH\x00\x12\x18\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x12\n\x10\x64\x65stination_typeB\t\n\x07_weight\x1a\xb1\x03\n\x14\x46\x61ultInjectionPolicy\x12Y\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.DelayH\x00\x88\x01\x01\x12Y\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.AbortH\x01\x88\x01\x01\x1at\n\x05\x44\x65lay\x12\x33\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12\x17\n\npercentage\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x0e\n\x0c_fixed_delayB\r\n\x0b_percentage\x1aY\n\x05\x41\x62ort\x12\x18\n\x0bhttp_status\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\npercentage\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x0e\n\x0c_http_statusB\r\n\x0b_percentageB\x08\n\x06_delayB\x08\n\x06_abort\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a<\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\r\x1a\xf2\x03\n\x0bRouteAction\x12Q\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.GrpcRoute.DestinationB\x03\xe0\x41\x01\x12\x64\n\x16\x66\x61ult_injection_policy\x18\x03 \x01(\x0b\x32?.google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicyB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12Q\n\x0cretry_policy\x18\x08 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyB\x03\xe0\x41\x01\x12p\n\x19stateful_session_affinity\x18\x0b \x01(\x0b\x32H.google.cloud.networkservices.v1.GrpcRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\xa5\x01\n\tRouteRule\x12K\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.GrpcRoute.RouteMatchB\x03\xe0\x41\x01\x12K\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.GrpcRoute.RouteActionB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/GrpcRoute\x12?projects/{project}/locations/{location}/grpcRoutes/{grpc_route}\"\xa5\x01\n\x15ListGrpcRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/GrpcRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x87\x01\n\x16ListGrpcRoutesResponse\x12?\n\x0bgrpc_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.GrpcRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetGrpcRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRoute\"\xbb\x01\n\x16\x43reateGrpcRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/GrpcRoute\x12\x1a\n\rgrpc_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\ngrpc_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateGrpcRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\ngrpc_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteGrpcRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRouteB\xe4\x02\n#com.google.cloud.networkservices.v1B\x0eGrpcRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41r\n%compute.googleapis.com/BackendService\x12Iprojects/{project}/locations/{location}/backendServices/{backend_service}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -54,6 +54,7 @@ module V1 GrpcRoute::FaultInjectionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy").msgclass GrpcRoute::FaultInjectionPolicy::Delay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay").msgclass GrpcRoute::FaultInjectionPolicy::Abort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort").msgclass + GrpcRoute::StatefulSessionAffinityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.StatefulSessionAffinityPolicy").msgclass GrpcRoute::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RetryPolicy").msgclass GrpcRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteAction").msgclass GrpcRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteRule").msgclass diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb index 8375f6a8491b..fe37b625326e 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n0google/cloud/networkservices/v1/http_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe6\x1e\n\tHttpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\thostnames\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.LabelsEntryB\x03\xe0\x41\x01\x12H\n\x05rules\x18\x06 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.HttpRoute.RouteRuleB\x03\xe0\x41\x02\x1a\xbf\x02\n\x0bHeaderMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x04 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x05 \x01(\x08H\x00\x12\x16\n\x0csuffix_match\x18\x06 \x01(\tH\x00\x12Z\n\x0brange_match\x18\x07 \x01(\x0b\x32\x43.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeH\x00\x12\x0e\n\x06header\x18\x01 \x01(\t\x12\x14\n\x0cinvert_match\x18\x08 \x01(\x08\x1a*\n\x0cIntegerRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x42\x0b\n\tMatchType\x1a\x82\x01\n\x13QueryParameterMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x04 \x01(\x08H\x00\x12\x17\n\x0fquery_parameter\x18\x01 \x01(\tB\x0b\n\tMatchType\x1a\x9b\x02\n\nRouteMatch\x12\x19\n\x0f\x66ull_path_match\x18\x01 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x13\n\x0bignore_case\x18\x04 \x01(\x08\x12G\n\x07headers\x18\x05 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.HeaderMatch\x12X\n\x10query_parameters\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a_\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x62\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1a\xad\x06\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\x80\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xbb\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n0google/cloud/networkservices/v1/http_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f$\n\tHttpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\thostnames\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.LabelsEntryB\x03\xe0\x41\x01\x12H\n\x05rules\x18\x06 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.HttpRoute.RouteRuleB\x03\xe0\x41\x02\x1a\xbf\x02\n\x0bHeaderMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x04 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x05 \x01(\x08H\x00\x12\x16\n\x0csuffix_match\x18\x06 \x01(\tH\x00\x12Z\n\x0brange_match\x18\x07 \x01(\x0b\x32\x43.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeH\x00\x12\x0e\n\x06header\x18\x01 \x01(\t\x12\x14\n\x0cinvert_match\x18\x08 \x01(\x08\x1a*\n\x0cIntegerRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x42\x0b\n\tMatchType\x1a\x82\x01\n\x13QueryParameterMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x04 \x01(\x08H\x00\x12\x17\n\x0fquery_parameter\x18\x01 \x01(\tB\x0b\n\tMatchType\x1a\x9b\x02\n\nRouteMatch\x12\x19\n\x0f\x66ull_path_match\x18\x01 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x13\n\x0bignore_case\x18\x04 \x01(\x08\x12G\n\x07headers\x18\x05 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.HeaderMatch\x12X\n\x10query_parameters\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a\xa2\x02\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x12_\n\x17request_header_modifier\x18\x03 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x12`\n\x18response_header_modifier\x18\x04 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x7f\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x1b\n\x0emirror_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1al\n\x12HttpDirectResponse\x12\x1a\n\x0bstring_body\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbytes_body\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x13\n\x06status\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\n\n\x08HttpBody\x1a\xb2\x08\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x12p\n\x19stateful_session_affinity\x18\x0c \x01(\x0b\x32H.google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12[\n\x0f\x64irect_response\x18\r \x01(\x0b\x32=.google.cloud.networkservices.v1.HttpRoute.HttpDirectResponseB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\xa5\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x87\x01\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xbb\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -55,11 +55,13 @@ module V1 HttpRoute::FaultInjectionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy").msgclass HttpRoute::FaultInjectionPolicy::Delay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay").msgclass HttpRoute::FaultInjectionPolicy::Abort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort").msgclass + HttpRoute::StatefulSessionAffinityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicy").msgclass HttpRoute::HeaderModifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderModifier").msgclass HttpRoute::URLRewrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.URLRewrite").msgclass HttpRoute::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RetryPolicy").msgclass HttpRoute::RequestMirrorPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy").msgclass HttpRoute::CorsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.CorsPolicy").msgclass + HttpRoute::HttpDirectResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HttpDirectResponse").msgclass HttpRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteAction").msgclass HttpRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteRule").msgclass ListHttpRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListHttpRoutesRequest").msgclass diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb index 1932296834c7..5b736c0eac4c 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb @@ -6,11 +6,12 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/cloud/networkservices/v1/common_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x03\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:_\xea\x41\\\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}\"w\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"d\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xea\x01\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x91\x04\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x10 \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:_\xea\x41\\\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}B\x10\n\x0e_envoy_headers\"\x9c\x01\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"y\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xe4\x02\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb index 177bd1854e12..78e8feadc7ce 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb @@ -6,18 +6,21 @@ require 'google/api/annotations_pb' require 'google/api/client_pb' +require 'google/cloud/networkservices/v1/common_pb' require 'google/cloud/networkservices/v1/endpoint_policy_pb' require 'google/cloud/networkservices/v1/gateway_pb' require 'google/cloud/networkservices/v1/grpc_route_pb' require 'google/cloud/networkservices/v1/http_route_pb' require 'google/cloud/networkservices/v1/mesh_pb' +require 'google/cloud/networkservices/v1/route_view_pb' require 'google/cloud/networkservices/v1/service_binding_pb' +require 'google/cloud/networkservices/v1/service_lb_policy_pb' require 'google/cloud/networkservices/v1/tcp_route_pb' require 'google/cloud/networkservices/v1/tls_route_pb' require 'google/longrunning/operations_pb' -descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto2\x99H\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto2\xe8[\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb index 005a345ff1b1..937f52d82bbe 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb @@ -99,6 +99,8 @@ class Service rpc :GetServiceBinding, ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Google::Cloud::NetworkServices::V1::ServiceBinding # Creates a new ServiceBinding in a given project and location. rpc :CreateServiceBinding, ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single ServiceBinding. + rpc :UpdateServiceBinding, ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Google::Longrunning::Operation # Deletes a single ServiceBinding. rpc :DeleteServiceBinding, ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Google::Longrunning::Operation # Lists Meshes in a given project and location. @@ -111,6 +113,24 @@ class Service rpc :UpdateMesh, ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Google::Longrunning::Operation # Deletes a single Mesh. rpc :DeleteMesh, ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Google::Longrunning::Operation + # Lists ServiceLbPolicies in a given project and location. + rpc :ListServiceLbPolicies, ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse + # Gets details of a single ServiceLbPolicy. + rpc :GetServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy + # Creates a new ServiceLbPolicy in a given project and location. + rpc :CreateServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single ServiceLbPolicy. + rpc :UpdateServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Google::Longrunning::Operation + # Deletes a single ServiceLbPolicy. + rpc :DeleteServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Google::Longrunning::Operation + # Get a single RouteView of a Gateway. + rpc :GetGatewayRouteView, ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Google::Cloud::NetworkServices::V1::GatewayRouteView + # Get a single RouteView of a Mesh. + rpc :GetMeshRouteView, ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Google::Cloud::NetworkServices::V1::MeshRouteView + # Lists RouteViews + rpc :ListGatewayRouteViews, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse + # Lists RouteViews + rpc :ListMeshRouteViews, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse end Stub = Service.rpc_stub_class diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb new file mode 100644 index 000000000000..db2811ed63e7 --- /dev/null +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/route_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n0google/cloud/networkservices/v1/route_view.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x02\n\x10GatewayRouteView\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12!\n\x14route_project_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eroute_location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nroute_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08route_id\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xae\x01\xea\x41\xaa\x01\n/networkservices.googleapis.com/GatewayRouteView\x12Rprojects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}*\x11gatewayRouteViews2\x10gatewayRouteView\"\xb8\x02\n\rMeshRouteView\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12!\n\x14route_project_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eroute_location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nroute_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08route_id\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xa0\x01\xea\x41\x9c\x01\n,networkservices.googleapis.com/MeshRouteView\x12Mprojects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}*\x0emeshRouteViews2\rmeshRouteView\"c\n\x1aGetGatewayRouteViewRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/GatewayRouteView\"]\n\x17GetMeshRouteViewRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,networkservices.googleapis.com/MeshRouteView\"\x8e\x01\n\x1cListGatewayRouteViewsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/GatewayRouteView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x88\x01\n\x19ListMeshRouteViewsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,networkservices.googleapis.com/MeshRouteView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9d\x01\n\x1dListGatewayRouteViewsResponse\x12N\n\x13gateway_route_views\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.GatewayRouteView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x94\x01\n\x1aListMeshRouteViewsResponse\x12H\n\x10mesh_route_views\x18\x01 \x03(\x0b\x32..google.cloud.networkservices.v1.MeshRouteView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eRouteViewProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module NetworkServices + module V1 + GatewayRouteView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GatewayRouteView").msgclass + MeshRouteView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.MeshRouteView").msgclass + GetGatewayRouteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetGatewayRouteViewRequest").msgclass + GetMeshRouteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetMeshRouteViewRequest").msgclass + ListGatewayRouteViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGatewayRouteViewsRequest").msgclass + ListMeshRouteViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshRouteViewsRequest").msgclass + ListGatewayRouteViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGatewayRouteViewsResponse").msgclass + ListMeshRouteViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshRouteViewsResponse").msgclass + end + end + end +end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb index bb87f10ff305..299724a2d2c4 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb @@ -6,10 +6,11 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x03\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x07service\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf4\x01\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x04\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07service\x18\x05 \x01(\tB1\x18\x01\xe0\x41\x01\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x19\n\nservice_id\x18\x08 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x96\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateServiceBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0fservice_binding\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf3\x02\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -25,6 +26,7 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -45,6 +47,7 @@ module V1 ListServiceBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceBindingsResponse").msgclass GetServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceBindingRequest").msgclass CreateServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateServiceBindingRequest").msgclass + UpdateServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateServiceBindingRequest").msgclass DeleteServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteServiceBindingRequest").msgclass end end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb new file mode 100644 index 000000000000..61e67ec6a42b --- /dev/null +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/service_lb_policy.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n7google/cloud/networkservices/v1/service_lb_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe8\x07\n\x0fServiceLbPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.ServiceLbPolicy.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12n\n\x18load_balancing_algorithm\x18\x06 \x01(\x0e\x32G.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithmB\x03\xe0\x41\x01\x12\x64\n\x13\x61uto_capacity_drain\x18\x08 \x01(\x0b\x32\x42.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrainB\x03\xe0\x41\x01\x12]\n\x0f\x66\x61ilover_config\x18\n \x01(\x0b\x32?.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfigB\x03\xe0\x41\x01\x1a(\n\x11\x41utoCapacityDrain\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x38\n\x0e\x46\x61iloverConfig\x12&\n\x19\x66\x61ilover_health_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x01\n\x16LoadBalancingAlgorithm\x12(\n$LOAD_BALANCING_ALGORITHM_UNSPECIFIED\x10\x00\x12\x12\n\x0eSPRAY_TO_WORLD\x10\x03\x12\x13\n\x0fSPRAY_TO_REGION\x10\x04\x12\x17\n\x13WATERFALL_BY_REGION\x10\x05\x12\x15\n\x11WATERFALL_BY_ZONE\x10\x06:\x82\x01\xea\x41\x7f\n.networkservices.googleapis.com/ServiceLbPolicy\x12Mprojects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}\"\x8d\x01\n\x1cListServiceLbPoliciesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9c\x01\n\x1dListServiceLbPoliciesResponse\x12M\n\x13service_lb_policies\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicy\"\xdb\x01\n\x1c\x43reateServiceLbPolicyRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12!\n\x14service_lb_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11service_lb_policy\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"\xa6\x01\n\x1cUpdateServiceLbPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11service_lb_policy\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"d\n\x1c\x44\x65leteServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicyB\xf5\x01\n#com.google.cloud.networkservices.v1B\x14ServiceLbPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module NetworkServices + module V1 + ServiceLbPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy").msgclass + ServiceLbPolicy::AutoCapacityDrain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain").msgclass + ServiceLbPolicy::FailoverConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig").msgclass + ServiceLbPolicy::LoadBalancingAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithm").enummodule + ListServiceLbPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesRequest").msgclass + ListServiceLbPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesResponse").msgclass + GetServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceLbPolicyRequest").msgclass + CreateServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateServiceLbPolicyRequest").msgclass + UpdateServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest").msgclass + DeleteServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest").msgclass + end + end + end +end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb index 55066fce4f06..8e952a920aea 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb @@ -6,11 +6,12 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n/google/cloud/networkservices/v1/tcp_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc0\x08\n\x08TcpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TcpRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12J\n\x06labels\x18\n \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TcpRoute.RouteMatchB\x03\xe0\x41\x01\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.RouteActionB\x03\xe0\x41\x02\x1a\x35\n\nRouteMatch\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x87\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TcpRoute.RouteDestinationB\x03\xe0\x41\x01\x12!\n\x14original_destination\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TcpRoute\x12=projects/{project}/locations/{location}/tcpRoutes/{tcp_route}\"~\n\x14ListTcpRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"o\n\x15ListTcpRoutesResponse\x12=\n\ntcp_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TcpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x12GetTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRoute\"\xb6\x01\n\x15\x43reateTcpRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x19\n\x0ctcp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttcp_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTcpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttcp_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRouteB\xe3\x02\n#com.google.cloud.networkservices.v1B\rTcpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41r\n%compute.googleapis.com/BackendService\x12Iprojects/{project}/locations/{location}/backendServices/{backend_service}b\x06proto3" +descriptor_data = "\n/google/cloud/networkservices/v1/tcp_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf6\x08\n\x08TcpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TcpRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12J\n\x06labels\x18\n \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TcpRoute.RouteMatchB\x03\xe0\x41\x01\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.RouteActionB\x03\xe0\x41\x02\x1a\x35\n\nRouteMatch\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xbd\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TcpRoute.RouteDestinationB\x03\xe0\x41\x01\x12!\n\x14original_destination\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TcpRoute\x12=projects/{project}/locations/{location}/tcpRoutes/{tcp_route}\"\xa3\x01\n\x14ListTcpRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTcpRoutesResponse\x12=\n\ntcp_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TcpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRoute\"\xb6\x01\n\x15\x43reateTcpRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x19\n\x0ctcp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttcp_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTcpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttcp_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRouteB\xee\x01\n#com.google.cloud.networkservices.v1B\rTcpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -26,6 +27,7 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ] imports.each do |type_name, expected_filename| diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb index 701509fcbaf6..f851d1369bb6 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb @@ -6,11 +6,12 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\x07\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x64\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"~\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"o\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xee\x01\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x08\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12J\n\x06labels\x18\x0b \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x9a\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x12\x34\n\x0cidle_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\xa3\x01\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xee\x01\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -26,6 +27,7 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ] imports.each do |type_name, expected_filename| diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb index 0e38dd3e08c7..7ba9c40c394c 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb @@ -101,7 +101,7 @@ class EndpointMatcher # # If there is more than one best match, (for example, if a # config P4 with selector exists and if a client with - # label connects), an error will be thrown. + # label connects), pick up the one with older creation time. # @!attribute [rw] metadata_labels # @return [::Array<::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels>] # The list of label value pairs that must match labels in the @@ -141,6 +141,23 @@ module MetadataLabelMatchCriteria end end end + + # EnvoyHeader configuration for Mesh and Gateway + module EnvoyHeaders + # Defaults to NONE. + ENVOY_HEADERS_UNSPECIFIED = 0 + + # Suppress envoy debug headers. + NONE = 1 + + # Envoy will insert default internal debug headers into upstream requests: + # x-envoy-attempt-count + # x-envoy-is-timeout-retry + # x-envoy-expected-rq-timeout-ms + # x-envoy-original-path + # x-envoy-upstream-stream-duration-ms + DEBUG_HEADERS = 2 + end end end end diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb index 1098cc8efbd8..b1c4d5222c24 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb @@ -27,7 +27,7 @@ module V1 # an all endpoints that serve on port 8080. # @!attribute [rw] name # @return [::String] - # Required. Name of the EndpointPolicy resource. It matches pattern + # Identifier. Name of the EndpointPolicy resource. It matches pattern # `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] @@ -117,6 +117,11 @@ module EndpointPolicyType # Indicates that this is a continuation of a prior # `ListEndpointPolicies` call, and that the system should return the # next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. class ListEndpointPoliciesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -131,6 +136,12 @@ class ListEndpointPoliciesRequest # If there might be more results than those appearing in this response, then # `next_page_token` is included. To get the next set of results, call this # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when + # attempting to list all resources across all supported locations. class ListEndpointPoliciesResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb index 852948118a96..9313bb453909 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb @@ -27,7 +27,7 @@ module V1 # dictate how requests should be routed by this Gateway. # @!attribute [rw] name # @return [::String] - # Required. Name of the Gateway resource. It matches pattern + # Identifier. Name of the Gateway resource. It matches pattern # `projects/*/locations/*/gateways/`. # @!attribute [r] self_link # @return [::String] @@ -49,17 +49,27 @@ module V1 # @return [::Google::Cloud::NetworkServices::V1::Gateway::Type] # Immutable. The type of the customer managed gateway. # This field is required. If unspecified, an error is returned. + # @!attribute [rw] addresses + # @return [::Array<::String>] + # Optional. Zero or one IPv4 or IPv6 address on which the Gateway will + # receive the traffic. When no address is provided, an IP from the subnetwork + # is allocated + # + # This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. + # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6. # @!attribute [rw] ports # @return [::Array<::Integer>] - # Required. One or more ports that the Gateway must receive traffic on. The - # proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports - # specified below. + # Required. One or more port numbers (1-65535), on which the Gateway will + # receive traffic. The proxy binds to the specified ports. + # Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. + # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and + # support multiple ports. # @!attribute [rw] scope # @return [::String] - # Required. Immutable. Scope determines how configuration across multiple - # Gateway instances are merged. The configuration for multiple Gateway - # instances with the same scope will be merged as presented as a single - # coniguration to the proxy/load balancer. + # Optional. Scope determines how configuration across multiple Gateway + # instances are merged. The configuration for multiple Gateway instances with + # the same scope will be merged as presented as a single configuration to the + # proxy/load balancer. # # Max length 64 characters. # Scope should start with a letter and can only have letters, numbers, @@ -68,6 +78,49 @@ module V1 # @return [::String] # Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how # TLS traffic is terminated. If empty, TLS termination is disabled. + # @!attribute [rw] certificate_urls + # @return [::Array<::String>] + # Optional. A fully-qualified Certificates URL reference. The proxy presents + # a Certificate (selected based on SNI) when establishing a TLS connection. + # This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'. + # @!attribute [rw] gateway_security_policy + # @return [::String] + # Optional. A fully-qualified GatewaySecurityPolicy URL reference. + # Defines how a server should apply security policy to inbound + # (VM to Proxy) initiated connections. + # + # For example: + # `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. + # + # This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'. + # @!attribute [rw] network + # @return [::String] + # Optional. The relative resource name identifying the VPC network that is + # using this configuration. For example: + # `projects/*/global/networks/network-1`. + # + # Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'. + # @!attribute [rw] subnetwork + # @return [::String] + # Optional. The relative resource name identifying the subnetwork in which + # this SWG is allocated. For example: + # `projects/*/regions/us-central1/subnetworks/network-1` + # + # Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY". + # @!attribute [rw] ip_version + # @return [::Google::Cloud::NetworkServices::V1::Gateway::IpVersion] + # Optional. The IP Version that will be used by this gateway. Valid options + # are IPV4 or IPV6. Default is IPV4. + # @!attribute [rw] envoy_headers + # @return [::Google::Cloud::NetworkServices::V1::EnvoyHeaders] + # Optional. Determines if envoy will insert internal debug headers into + # upstream requests. Other Envoy headers may still be injected. By default, + # envoy will not insert any debug headers. + # @!attribute [rw] routing_mode + # @return [::Google::Cloud::NetworkServices::V1::Gateway::RoutingMode] + # Optional. The routing mode of the Gateway. + # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. + # This field is required for gateways of type SECURE_WEB_GATEWAY. class Gateway include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -96,6 +149,38 @@ module Type # The type of the customer managed gateway is SecureWebGateway (SWG). SECURE_WEB_GATEWAY = 2 end + + # The types of IP version for the gateway. + # Possible values are: + # * IPV4 + # * IPV6 + module IpVersion + # The type when IP version is not specified. Defaults to IPV4. + IP_VERSION_UNSPECIFIED = 0 + + # The type for IP version 4. + IPV4 = 1 + + # The type for IP version 6. + IPV6 = 2 + end + + # The routing mode of the Gateway, to determine how the Gateway routes + # traffic. Today, this field only applies to Gateways of type + # SECURE_WEB_GATEWAY. Possible values are: + # * EXPLICIT_ROUTING_MODE + # * NEXT_HOP_ROUTING_MODE + module RoutingMode + # The routing mode is explicit; clients are configured to send + # traffic through the gateway. This is the default routing mode. + EXPLICIT_ROUTING_MODE = 0 + + # The routing mode is next-hop. Clients are unaware of the gateway, + # and a route (advanced route or other route type) + # can be configured to direct traffic from client to gateway. + # The gateway then acts as a next-hop to the destination. + NEXT_HOP_ROUTING_MODE = 1 + end end # Request used with the ListGateways method. @@ -125,6 +210,9 @@ class ListGatewaysRequest # If there might be more results than those appearing in this response, then # `next_page_token` is included. To get the next set of results, call this # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. class ListGatewaysResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb index 6ba191f6083d..141b96f6920e 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb @@ -25,7 +25,7 @@ module V1 # or Gateway resource is routed. # @!attribute [rw] name # @return [::String] - # Required. Name of the GrpcRoute resource. It matches pattern + # Identifier. Name of the GrpcRoute resource. It matches pattern # `projects/*/locations/global/grpcRoutes/` # @!attribute [r] self_link # @return [::String] @@ -256,7 +256,30 @@ class Abort end end + # The specification for cookie-based stateful session affinity where the + # date plane supplies a “session cookie” with the name "GSSA" which encodes + # a specific destination host and each request containing that cookie will + # be directed to that host as long as the destination host remains up and + # healthy. + # + # The gRPC proxyless mesh library or sidecar proxy will manage the session + # cookie but the client application code is responsible for copying the + # cookie from each RPC in the session to the next. + # @!attribute [rw] cookie_ttl + # @return [::Google::Protobuf::Duration] + # Required. The cookie TTL value for the Set-Cookie header generated by the + # data plane. The lifetime of the cookie may be set to a value from 0 to + # 86400 seconds (24 hours) inclusive. + # + # Set this to 0s to use a session cookie and disable cookie expiration. + class StatefulSessionAffinityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The specifications for retries. + # Specifies one or more conditions for which this retry rule applies. Valid + # values are: # @!attribute [rw] retry_conditions # @return [::Array<::String>] # - connect-failure: Router will retry on failures connecting to Backend @@ -292,12 +315,12 @@ class RetryPolicy # Backend Service(s) according to the weight field of these destinations. # @!attribute [rw] fault_injection_policy # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy] - # Optional. The specification for fault injection introduced into traffic to test the - # resiliency of clients to destination service failure. As part of fault - # injection, when clients send requests to a destination, delays can be - # introduced on a percentage of requests before sending those requests to - # the destination service. Similarly requests from clients can be aborted - # by for a percentage of requests. + # Optional. The specification for fault injection introduced into traffic + # to test the resiliency of clients to destination service failure. As part + # of fault injection, when clients send requests to a destination, delays + # can be introduced on a percentage of requests before sending those + # requests to the destination service. Similarly requests from clients can + # be aborted by for a percentage of requests. # # timeout and retry_policy will be ignored by clients that are configured # with a fault_injection_policy @@ -310,6 +333,16 @@ class RetryPolicy # @!attribute [rw] retry_policy # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::RetryPolicy] # Optional. Specifies the retry policy associated with this route. + # @!attribute [rw] stateful_session_affinity + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::StatefulSessionAffinityPolicy] + # Optional. Specifies cookie-based stateful session affinity. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the idle timeout for the selected route. The idle + # timeout is defined as the period in which there are no bytes sent or + # received on either the upstream or downstream connection. If not set, the + # default idle timeout is 1 hour. If set to 0s, the timeout will be + # disabled. class RouteAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -354,6 +387,11 @@ class LabelsEntry # The value returned by the last `ListGrpcRoutesResponse` # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. class ListGrpcRoutesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -368,6 +406,12 @@ class ListGrpcRoutesRequest # If there might be more results than those appearing in this response, then # `next_page_token` is included. To get the next set of results, call this # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when attempting to list all resources + # across all supported locations. class ListGrpcRoutesResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb index c5667aced688..6993bb98088a 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb @@ -25,7 +25,7 @@ module V1 # Mesh or Gateway resource. # @!attribute [rw] name # @return [::String] - # Required. Name of the HttpRoute resource. It matches pattern + # Identifier. Name of the HttpRoute resource. It matches pattern # `projects/*/locations/global/httpRoutes/http_route_name>`. # @!attribute [r] self_link # @return [::String] @@ -258,6 +258,19 @@ class RouteMatch # # If weights are unspecified for all services, then, traffic is distributed # in equal proportions to all of them. + # @!attribute [rw] request_header_modifier + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] + # Optional. The specification for modifying the headers of a matching + # request prior to delivery of the request to the destination. If + # HeaderModifiers are set on both the Destination and the RouteAction, they + # will be merged. Conflicts between the two will not be resolved on the + # configuration. + # @!attribute [rw] response_header_modifier + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] + # Optional. The specification for modifying the headers of a response prior + # to sending the response back to the client. If HeaderModifiers are set on + # both the Destination and the RouteAction, they will be merged. Conflicts + # between the two will not be resolved on the configuration. class Destination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -376,6 +389,27 @@ class Abort end end + # The specification for cookie-based stateful session affinity where the + # date plane supplies a “session cookie” with the name "GSSA" which encodes + # a specific destination host and each request containing that cookie will + # be directed to that host as long as the destination host remains up and + # healthy. + # + # The gRPC proxyless mesh library or sidecar proxy will manage the session + # cookie but the client application code is responsible for copying the + # cookie from each RPC in the session to the next. + # @!attribute [rw] cookie_ttl + # @return [::Google::Protobuf::Duration] + # Required. The cookie TTL value for the Set-Cookie header generated by + # the data plane. The lifetime of the cookie may be set to a value from 0 + # to 86400 seconds (24 hours) inclusive. + # + # Set this to 0s to use a session cookie and disable cookie expiration. + class StatefulSessionAffinityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The specification for modifying HTTP header in HTTP request and HTTP # response. # @!attribute [rw] set @@ -468,10 +502,15 @@ class RetryPolicy # destination service. The proxy does not wait for responses from the # shadow service. Prior to sending traffic to the shadow service, the # host/authority header is suffixed with -shadow. + # Mirroring is currently not supported for Cloud Run destinations. # @!attribute [rw] destination # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Destination] # The destination the requests will be mirrored to. The weight of the # destination will be ignored. + # @!attribute [rw] mirror_percent + # @return [::Float] + # Optional. The percentage of requests to get mirrored to the desired + # destination. class RequestMirrorPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -517,6 +556,27 @@ class CorsPolicy extend ::Google::Protobuf::MessageExts::ClassMethods end + # Static HTTP response object to be returned. + # @!attribute [rw] string_body + # @return [::String] + # Optional. Response body as a string. Maximum body length is 1024 + # characters. + # + # Note: The following fields are mutually exclusive: `string_body`, `bytes_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bytes_body + # @return [::String] + # Optional. Response body as bytes. Maximum body size is 4096B. + # + # Note: The following fields are mutually exclusive: `bytes_body`, `string_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] status + # @return [::Integer] + # Required. Status to return as part of HTTP Response. Must be a positive + # integer. + class HttpDirectResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The specifications for routing traffic and applying associated policies. # @!attribute [rw] destinations # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::Destination>] @@ -569,6 +629,20 @@ class CorsPolicy # @!attribute [rw] cors_policy # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::CorsPolicy] # The specification for allowing client side cross-origin requests. + # @!attribute [rw] stateful_session_affinity + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::StatefulSessionAffinityPolicy] + # Optional. Specifies cookie-based stateful session affinity. + # @!attribute [rw] direct_response + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HttpDirectResponse] + # Optional. Static HTTP Response object to be returned regardless of the + # request. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the idle timeout for the selected route. The idle + # timeout is defined as the period in which there are no bytes sent or + # received on either the upstream or downstream connection. If not set, the + # default idle timeout is 1 hour. If set to 0s, the timeout will be + # disabled. class RouteAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -618,6 +692,11 @@ class LabelsEntry # The value returned by the last `ListHttpRoutesResponse` # Indicates that this is a continuation of a prior `ListHttpRoutes` call, # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. class ListHttpRoutesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -632,6 +711,12 @@ class ListHttpRoutesRequest # If there might be more results than those appearing in this response, then # `next_page_token` is included. To get the next set of results, call this # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when attempting to list all resources + # across all supported locations. class ListHttpRoutesResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb index 0b17d112a722..68dda0e6ad07 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb @@ -26,7 +26,7 @@ module V1 # requests are routed within this logical mesh boundary. # @!attribute [rw] name # @return [::String] - # Required. Name of the Mesh resource. It matches pattern + # Identifier. Name of the Mesh resource. It matches pattern # `projects/*/locations/global/meshes/`. # @!attribute [r] self_link # @return [::String] @@ -52,6 +52,11 @@ module V1 # regardless of its actual ip:port destination. If unset, a port '15001' is # used as the interception port. This is applicable only for sidecar proxy # deployments. + # @!attribute [rw] envoy_headers + # @return [::Google::Cloud::NetworkServices::V1::EnvoyHeaders] + # Optional. Determines if envoy will insert internal debug headers into + # upstream requests. Other Envoy headers may still be injected. By default, + # envoy will not insert any debug headers. class Mesh include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -79,6 +84,11 @@ class LabelsEntry # The value returned by the last `ListMeshesResponse` # Indicates that this is a continuation of a prior `ListMeshes` call, # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. class ListMeshesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -93,6 +103,11 @@ class ListMeshesRequest # If there might be more results than those appearing in this response, then # `next_page_token` is included. To get the next set of results, call this # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # `return_partial_success` and reading across collections e.g. when + # attempting to list all resources across all supported locations. class ListMeshesResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb new file mode 100644 index 000000000000..bfd76cf78a6d --- /dev/null +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 NetworkServices + module V1 + # GatewayRouteView defines view-only resource for Routes to a Gateway + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Full path name of the GatewayRouteView resource. + # Format: + # projects/\\{project_number}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} + # @!attribute [r] route_project_number + # @return [::Integer] + # Output only. Project number where the route exists. + # @!attribute [r] route_location + # @return [::String] + # Output only. Location where the route exists. + # @!attribute [r] route_type + # @return [::String] + # Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute + # @!attribute [r] route_id + # @return [::String] + # Output only. The resource id for the route. + class GatewayRouteView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MeshRouteView defines view-only resource for Routes to a Mesh + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Full path name of the MeshRouteView resource. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} + # @!attribute [r] route_project_number + # @return [::Integer] + # Output only. Project number where the route exists. + # @!attribute [r] route_location + # @return [::String] + # Output only. Location where the route exists. + # @!attribute [r] route_type + # @return [::String] + # Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute + # @!attribute [r] route_id + # @return [::String] + # Output only. The resource id for the route. + class MeshRouteView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the GetGatewayRouteView method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the GatewayRouteView resource. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} + class GetGatewayRouteViewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the GetMeshRouteView method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the MeshRouteView resource. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} + class GetMeshRouteViewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the ListGatewayRouteViews method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Gateway to which a Route is associated. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of GatewayRouteViews to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListGatewayRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListGatewayRouteViews` + # call, and that the system should return the next page of data. + class ListGatewayRouteViewsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the ListMeshRouteViews method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Mesh to which a Route is associated. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of MeshRouteViews to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListMeshRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, + # and that the system should return the next page of data. + class ListMeshRouteViewsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListGatewayRouteViews method. + # @!attribute [rw] gateway_route_views + # @return [::Array<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # List of GatewayRouteView resources. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListGatewayRouteViewsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListMeshRouteViews method. + # @!attribute [rw] mesh_route_views + # @return [::Array<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # List of MeshRouteView resources. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListMeshRouteViewsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb index 124c3184e4de..db95c3ee6e9e 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb @@ -21,12 +21,17 @@ module Google module Cloud module NetworkServices module V1 - # ServiceBinding is the resource that defines a Service Directory Service to - # be used in a BackendService resource. + # ServiceBinding can be used to: + # - Bind a Service Directory Service to be used in a BackendService resource. + # This feature will be deprecated soon. + # - Bind a Private Service Connect producer service to be used in consumer + # Cloud Service Mesh or Application Load Balancers. + # - Bind a Cloud Run service to be used in consumer Cloud Service Mesh or + # Application Load Balancers. # @!attribute [rw] name # @return [::String] - # Required. Name of the ServiceBinding resource. It matches pattern - # `projects/*/locations/global/serviceBindings/service_binding_name`. + # Identifier. Name of the ServiceBinding resource. It matches pattern + # `projects/*/locations/*/serviceBindings/`. # @!attribute [rw] description # @return [::String] # Optional. A free-text description of the resource. Max length 1024 @@ -38,9 +43,20 @@ module V1 # @return [::Google::Protobuf::Timestamp] # Output only. The timestamp when the resource was updated. # @!attribute [rw] service + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # Required. The full service directory service name of the format - # /projects/*/locations/*/namespaces/*/services/* + # Optional. The full Service Directory Service name of the format + # `projects/*/locations/*/namespaces/*/services/*`. + # This field is for Service Directory integration which will be deprecated + # soon. + # @!attribute [r] service_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Output only. The unique identifier of the Service Directory Service against + # which the ServiceBinding resource is validated. This is populated when the + # Service Binding resource is used in another resource (like Backend + # Service). This is of the UUID4 format. This field is for Service Directory + # integration which will be deprecated soon. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Set of label tags associated with the ServiceBinding resource. @@ -62,7 +78,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of ServiceBindings to return per call. @@ -85,6 +101,11 @@ class ListServiceBindingsRequest # If there might be more results than those appearing in this response, then # `next_page_token` is included. To get the next set of results, call this # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. class ListServiceBindingsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -94,7 +115,7 @@ class ListServiceBindingsResponse # @!attribute [rw] name # @return [::String] # Required. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/global/serviceBindings/*`. + # `projects/*/locations/*/serviceBindings/*`. class GetServiceBindingRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -104,7 +125,7 @@ class GetServiceBindingRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the ServiceBinding. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] service_binding_id # @return [::String] # Required. Short name of the ServiceBinding resource to be created. @@ -116,11 +137,27 @@ class CreateServiceBindingRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request used by the UpdateServiceBinding method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceBinding resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] service_binding + # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] + # Required. Updated ServiceBinding resource. + class UpdateServiceBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request used by the DeleteServiceBinding method. # @!attribute [rw] name # @return [::String] # Required. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/global/serviceBindings/*`. + # `projects/*/locations/*/serviceBindings/*`. class DeleteServiceBindingRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb new file mode 100644 index 000000000000..e3abd6a70d68 --- /dev/null +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb @@ -0,0 +1,217 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 NetworkServices + module V1 + # ServiceLbPolicy holds global load balancing and traffic distribution + # configuration that can be applied to a BackendService. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the ServiceLbPolicy resource. It matches pattern + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this resource was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the ServiceLbPolicy resource. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] load_balancing_algorithm + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm] + # Optional. The type of load balancing algorithm to be used. The default + # behavior is WATERFALL_BY_REGION. + # @!attribute [rw] auto_capacity_drain + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain] + # Optional. Configuration to automatically move traffic away for unhealthy + # IG/NEG for the associated Backend Service. + # @!attribute [rw] failover_config + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig] + # Optional. Configuration related to health based failover. + class ServiceLbPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Option to specify if an unhealthy IG/NEG should be considered for global + # load balancing and traffic routing. + # @!attribute [rw] enable + # @return [::Boolean] + # Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. + # - An IG/NEG is considered unhealthy if less than 25% of the + # instances/endpoints in the IG/NEG are healthy. + # - This option will never result in draining more than 50% of the + # configured IGs/NEGs for the Backend Service. + class AutoCapacityDrain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Option to specify health based failover behavior. + # This is not related to Network load balancer FailoverPolicy. + # @!attribute [rw] failover_health_threshold + # @return [::Integer] + # Optional. The percentage threshold that a load balancer will begin to + # send traffic to failover backends. If the percentage of endpoints in a + # MIG/NEG is smaller than this value, traffic would be sent to failover + # backends if possible. This field should be set to a value between 1 + # and 99. The default value is 50 for Global external HTTP(S) load balancer + # (classic) and Proxyless service mesh, and 70 for others. + class FailoverConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The global load balancing algorithm to be used. + module LoadBalancingAlgorithm + # The type of the loadbalancing algorithm is unspecified. + LOAD_BALANCING_ALGORITHM_UNSPECIFIED = 0 + + # Balance traffic across all backends across the world proportionally based + # on capacity. + SPRAY_TO_WORLD = 3 + + # Direct traffic to the nearest region with endpoints and capacity before + # spilling over to other regions and spread the traffic from each client to + # all the MIGs/NEGs in a region. + SPRAY_TO_REGION = 4 + + # Direct traffic to the nearest region with endpoints and capacity before + # spilling over to other regions. All MIGs/NEGs within a region are evenly + # loaded but each client might not spread the traffic to all the MIGs/NEGs + # in the region. + WATERFALL_BY_REGION = 5 + + # Attempt to keep traffic in a single zone closest to the client, before + # spilling over to other zones. + WATERFALL_BY_ZONE = 6 + end + end + + # Request used with the ListServiceLbPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the ServiceLbPolicies should + # be listed, specified in the format + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of ServiceLbPolicies to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListServiceLbPoliciesResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. + class ListServiceLbPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListServiceLbPolicies method. + # @!attribute [rw] service_lb_policies + # @return [::Array<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] + # List of ServiceLbPolicy resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListServiceLbPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetServiceLbPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the ServiceLbPolicy to get. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + class GetServiceLbPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the ServiceLbPolicy method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the ServiceLbPolicy. Must be in the + # format `projects/{project}/locations/{location}`. + # @!attribute [rw] service_lb_policy_id + # @return [::String] + # Required. Short name of the ServiceLbPolicy resource to be created. + # E.g. for resource name + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. + # the id is value of \\{service_lb_policy_name} + # @!attribute [rw] service_lb_policy + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # Required. ServiceLbPolicy resource to be created. + class CreateServiceLbPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateServiceLbPolicy method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceLbPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] service_lb_policy + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # Required. Updated ServiceLbPolicy resource. + class UpdateServiceLbPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteServiceLbPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the ServiceLbPolicy to delete. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + class DeleteServiceLbPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb index 2223bd4da091..93e7b5209820 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb @@ -25,7 +25,7 @@ module V1 # Mesh/Gateway resource. # @!attribute [rw] name # @return [::String] - # Required. Name of the TcpRoute resource. It matches pattern + # Identifier. Name of the TcpRoute resource. It matches pattern # `projects/*/locations/global/tcpRoutes/tcp_route_name>`. # @!attribute [r] self_link # @return [::String] @@ -93,12 +93,10 @@ class RouteRule # Required. Must be specified in the CIDR range format. A CIDR range # consists of an IP Address and a prefix length to construct the subnet # mask. By default, the prefix length is 32 (i.e. matches a single IP - # address). Only IPV4 addresses are supported. - # Examples: - # "10.0.0.1" - matches against this exact IP address. - # "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet - # and 255.255.255.0 mask. - # "0.0.0.0/0" - matches against any IP address'. + # address). Only IPV4 addresses are supported. Examples: "10.0.0.1" - + # matches against this exact IP address. "10.0.0.0/8" - matches against any + # IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" + # - matches against any IP address'. # @!attribute [rw] port # @return [::String] # Required. Specifies the destination port to match against. @@ -118,6 +116,13 @@ class RouteMatch # Optional. If true, Router will use the destination IP and port of the # original connection as the destination of the request. Default is false. # Only one of route destinations or original destination can be set. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the idle timeout for the selected route. The idle + # timeout is defined as the period in which there are no bytes sent or + # received on either the upstream or downstream connection. If not set, the + # default idle timeout is 30 seconds. If set to 0s, the timeout will be + # disabled. class RouteAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -171,6 +176,11 @@ class LabelsEntry # The value returned by the last `ListTcpRoutesResponse` # Indicates that this is a continuation of a prior `ListTcpRoutes` call, # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. class ListTcpRoutesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -185,6 +195,12 @@ class ListTcpRoutesRequest # If there might be more results than those appearing in this response, then # `next_page_token` is included. To get the next set of results, call this # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when attempting to list all resources + # across all supported locations. class ListTcpRoutesResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb index 6fa1058fa86a..420c2011c430 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb @@ -25,7 +25,7 @@ module V1 # L3 attributes. # @!attribute [rw] name # @return [::String] - # Required. Name of the TlsRoute resource. It matches pattern + # Identifier. Name of the TlsRoute resource. It matches pattern # `projects/*/locations/global/tlsRoutes/tls_route_name>`. # @!attribute [r] self_link # @return [::String] @@ -61,6 +61,9 @@ module V1 # # Each gateway reference should match the pattern: # `projects/*/locations/global/gateways/` + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the TlsRoute resource. class TlsRoute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -70,7 +73,8 @@ class TlsRoute # @!attribute [rw] matches # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteMatch>] # Required. RouteMatch defines the predicate used to match requests to a - # given action. Multiple match types are "OR"ed for evaluation. + # given action. Multiple match types are "OR"ed for evaluation. Atleast one + # RouteMatch must be supplied. # @!attribute [rw] action # @return [::Google::Cloud::NetworkServices::V1::TlsRoute::RouteAction] # Required. The detailed rule defining how to route matched traffic. @@ -81,8 +85,6 @@ class RouteRule # RouteMatch defines the predicate used to match requests to a given action. # Multiple match types are "AND"ed for evaluation. - # If no routeMatch field is specified, this rule will unconditionally match - # traffic. # @!attribute [rw] sni_host # @return [::Array<::String>] # Optional. SNI (server name indicator) to match against. @@ -92,7 +94,7 @@ class RouteRule # Partial wildcards are not supported, and values like *w.example.com are # invalid. # At least one of sni_host and alpn is required. - # Up to 5 sni hosts across all matches can be set. + # Up to 100 sni hosts across all matches can be set. # @!attribute [rw] alpn # @return [::Array<::String>] # Optional. ALPN (Application-Layer Protocol Negotiation) to match against. @@ -109,6 +111,13 @@ class RouteMatch # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteDestination>] # Required. The destination services to which traffic should be forwarded. # At least one destination service is required. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the idle timeout for the selected route. The idle + # timeout is defined as the period in which there are no bytes sent or + # received on either the upstream or downstream connection. If not set, the + # default idle timeout is 1 hour. If set to 0s, the timeout will be + # disabled. class RouteAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -120,7 +129,7 @@ class RouteAction # Required. The URL of a BackendService to route traffic to. # @!attribute [rw] weight # @return [::Integer] - # Optional. Specifies the proportion of requests forwareded to the backend + # Optional. Specifies the proportion of requests forwarded to the backend # referenced by the service_name field. This is computed as: # - weight/Sum(weights in destinations) # Weights in all destinations does not need to sum up to 100. @@ -128,6 +137,15 @@ class RouteDestination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # Request used with the ListTlsRoutes method. @@ -143,6 +161,11 @@ class RouteDestination # The value returned by the last `ListTlsRoutesResponse` # Indicates that this is a continuation of a prior `ListTlsRoutes` call, # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. class ListTlsRoutesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -157,6 +180,12 @@ class ListTlsRoutesRequest # If there might be more results than those appearing in this response, then # `next_page_token` is included. To get the next set of results, call this # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when attempting to list all resources + # across all supported locations. class ListTlsRoutesResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb b/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb new file mode 100644 index 000000000000..7461b1dd4680 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy. +# +def create_service_lb_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new + + # Call the create_service_lb_policy method. + result = client.create_service_lb_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb b/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb new file mode 100644 index 000000000000..4e082682b995 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy. +# +def delete_service_lb_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new + + # Call the delete_service_lb_policy method. + result = client.delete_service_lb_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb b/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb new file mode 100644 index 000000000000..6b57dfd94420 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_gateway_route_view call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view. +# +def get_gateway_route_view + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new + + # Call the get_gateway_route_view method. + result = client.get_gateway_route_view request + + # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb b/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb new file mode 100644 index 000000000000..4b7e030d447a --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_mesh_route_view call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view. +# +def get_mesh_route_view + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new + + # Call the get_mesh_route_view method. + result = client.get_mesh_route_view request + + # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb b/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb new file mode 100644 index 000000000000..b00799aab29a --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy. +# +def get_service_lb_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new + + # Call the get_service_lb_policy method. + result = client.get_service_lb_policy request + + # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb b/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb new file mode 100644 index 000000000000..b8e15d57b905 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_gateway_route_views call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views. +# +def list_gateway_route_views + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new + + # Call the list_gateway_route_views method. + result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb b/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb new file mode 100644 index 000000000000..6bde5a9b7dbf --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_mesh_route_views call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views. +# +def list_mesh_route_views + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new + + # Call the list_mesh_route_views method. + result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb b/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb new file mode 100644 index 000000000000..45ce4706384d --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_service_lb_policies call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies. +# +def list_service_lb_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new + + # Call the list_service_lb_policies method. + result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb b/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb new file mode 100644 index 000000000000..d4c26291c623 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_service_binding. +# +def update_service_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new + + # Call the update_service_binding method. + result = client.update_service_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb b/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb new file mode 100644 index 000000000000..a99827cb1371 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy. +# +def update_service_lb_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new + + # Call the update_service_lb_policy method. + result = client.update_service_lb_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync] diff --git a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json index 7dd173b43ab3..b46e7fba709a 100644 --- a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json @@ -1731,6 +1731,46 @@ } ] }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync", + "title": "Snippet for the update_service_binding call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_binding.", + "file": "network_services/update_service_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service_binding", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateServiceBinding", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateServiceBinding", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync", "title": "Snippet for the delete_service_binding call in the NetworkServices service", @@ -1970,6 +2010,366 @@ "type": "FULL" } ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync", + "title": "Snippet for the list_service_lb_policies call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies.", + "file": "network_services/list_service_lb_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_lb_policies", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListServiceLbPolicies", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListServiceLbPolicies", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync", + "title": "Snippet for the get_service_lb_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy.", + "file": "network_services/get_service_lb_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_lb_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ServiceLbPolicy", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetServiceLbPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetServiceLbPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync", + "title": "Snippet for the create_service_lb_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy.", + "file": "network_services/create_service_lb_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_lb_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateServiceLbPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateServiceLbPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync", + "title": "Snippet for the update_service_lb_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy.", + "file": "network_services/update_service_lb_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service_lb_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateServiceLbPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateServiceLbPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync", + "title": "Snippet for the delete_service_lb_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy.", + "file": "network_services/delete_service_lb_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service_lb_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteServiceLbPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteServiceLbPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync", + "title": "Snippet for the get_gateway_route_view call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view.", + "file": "network_services/get_gateway_route_view.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_gateway_route_view", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::GatewayRouteView", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetGatewayRouteView", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGatewayRouteView", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync", + "title": "Snippet for the get_mesh_route_view call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view.", + "file": "network_services/get_mesh_route_view.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_mesh_route_view", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::MeshRouteView", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetMeshRouteView", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetMeshRouteView", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync", + "title": "Snippet for the list_gateway_route_views call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views.", + "file": "network_services/list_gateway_route_views.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gateway_route_views", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListGatewayRouteViews", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGatewayRouteViews", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync", + "title": "Snippet for the list_mesh_route_views call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views.", + "file": "network_services/list_mesh_route_views.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_mesh_route_views", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListMeshRouteViews", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListMeshRouteViews", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb index 3c7b1179a436..28ea3d3f77f4 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb @@ -41,6 +41,18 @@ def logger end end + def test_address_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.address_path project: "value0", region: "value1", address: "value2" + assert_equal "projects/value0/regions/value1/addresses/value2", path + end + end + def test_authorization_policy_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -65,6 +77,18 @@ def test_backend_service_path end end + def test_certificate_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_path project: "value0", location: "value1", certificate: "value2" + assert_equal "projects/value0/locations/value1/certificates/value2", path + end + end + def test_client_tls_policy_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -101,6 +125,30 @@ def test_gateway_path end end + def test_gateway_route_view_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.gateway_route_view_path project: "value0", location: "value1", gateway: "value2", route_view: "value3" + assert_equal "projects/value0/locations/value1/gateways/value2/routeViews/value3", path + end + end + + def test_gateway_security_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.gateway_security_policy_path project: "value0", location: "value1", gateway_security_policy: "value2" + assert_equal "projects/value0/locations/value1/gatewaySecurityPolicies/value2", path + end + end + def test_grpc_route_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -149,6 +197,30 @@ def test_mesh_path end end + def test_mesh_route_view_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.mesh_route_view_path project: "value0", location: "value1", mesh: "value2", route_view: "value3" + assert_equal "projects/value0/locations/value1/meshes/value2/routeViews/value3", path + end + end + + def test_network_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_path project: "value0", network: "value1" + assert_equal "projects/value0/global/networks/value1", path + end + end + def test_server_tls_policy_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -161,6 +233,18 @@ def test_server_tls_policy_path end end + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path + end + end + def test_service_binding_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -173,6 +257,30 @@ def test_service_binding_path end end + def test_service_lb_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_lb_policy_path project: "value0", location: "value1", service_lb_policy: "value2" + assert_equal "projects/value0/locations/value1/serviceLbPolicies/value2", path + end + end + + def test_subnetwork_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.subnetwork_path project: "value0", region: "value1", subnetwork: "value2" + assert_equal "projects/value0/regions/value1/subnetworks/value2", path + end + end + def test_tcp_route_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb index 999b1a9c8070..5d759a5ce674 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb @@ -89,6 +89,7 @@ def test_list_endpoint_policies parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_endpoint_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -104,27 +105,27 @@ def test_list_endpoint_policies end # Use hash object - client.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + client.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_endpoint_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + client.list_endpoint_policies parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + client.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -639,6 +640,7 @@ def test_list_grpc_routes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_grpc_routes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -654,27 +656,27 @@ def test_list_grpc_routes end # Use hash object - client.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + client.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_grpc_routes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + client.list_grpc_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + client.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -914,6 +916,7 @@ def test_list_http_routes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_http_routes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -929,27 +932,27 @@ def test_list_http_routes end # Use hash object - client.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + client.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_http_routes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + client.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + client.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -1189,6 +1192,7 @@ def test_list_tcp_routes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_tcp_routes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1204,27 +1208,27 @@ def test_list_tcp_routes end # Use hash object - client.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + client.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_tcp_routes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + client.list_tcp_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + client.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -1464,6 +1468,7 @@ def test_list_tls_routes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_tls_routes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1479,27 +1484,27 @@ def test_list_tls_routes end # Use hash object - client.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + client.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_tls_routes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + client.list_tls_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + client.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -1894,6 +1899,61 @@ def test_create_service_binding end end + def test_update_service_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + service_binding = {} + + update_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_service_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_binding_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_service_binding({ update_mask: update_mask, service_binding: service_binding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_service_binding update_mask: update_mask, service_binding: service_binding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_service_binding ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_service_binding({ update_mask: update_mask, service_binding: service_binding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_service_binding(::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_binding_client_stub.call_count + end + end + end + def test_delete_service_binding # Create test objects. client_result = ::Google::Longrunning::Operation.new @@ -1959,6 +2019,7 @@ def test_list_meshes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_meshes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1974,27 +2035,27 @@ def test_list_meshes end # Use hash object - client.list_meshes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + client.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_meshes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + client.list_meshes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + client.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_meshes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -2223,6 +2284,501 @@ def test_delete_mesh end end + def test_list_service_lb_policies + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_service_lb_policies_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_service_lb_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_lb_policies_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_service_lb_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_service_lb_policies ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, 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_service_lb_policies({ parent: parent, 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_service_lb_policies(::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, 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_service_lb_policies_client_stub.call_count + end + end + end + + def test_get_service_lb_policy + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_service_lb_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_lb_policy_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_service_lb_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_service_lb_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_service_lb_policy ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_service_lb_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_service_lb_policy(::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_lb_policy_client_stub.call_count + end + end + end + + def test_create_service_lb_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_lb_policy_id = "hello world" + service_lb_policy = {} + + create_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_service_lb_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_lb_policy_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_service_lb_policy parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_service_lb_policy ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_service_lb_policy(::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_lb_policy_client_stub.call_count + end + end + end + + def test_update_service_lb_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + service_lb_policy = {} + + update_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_service_lb_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_lb_policy_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_service_lb_policy update_mask: update_mask, service_lb_policy: service_lb_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_service_lb_policy ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_service_lb_policy(::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_lb_policy_client_stub.call_count + end + end + end + + def test_delete_service_lb_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_service_lb_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_lb_policy_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_service_lb_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_service_lb_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_service_lb_policy ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_service_lb_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_service_lb_policy(::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_lb_policy_client_stub.call_count + end + end + end + + def test_get_gateway_route_view + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_gateway_route_view_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_gateway_route_view_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_gateway_route_view_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_gateway_route_view({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_gateway_route_view name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_gateway_route_view ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_gateway_route_view({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_gateway_route_view(::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_gateway_route_view_client_stub.call_count + end + end + end + + def test_get_mesh_route_view + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::MeshRouteView.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mesh_route_view_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_mesh_route_view_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_mesh_route_view_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_mesh_route_view({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_mesh_route_view name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_mesh_route_view ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_mesh_route_view({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_mesh_route_view(::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_mesh_route_view_client_stub.call_count + end + end + end + + def test_list_gateway_route_views + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_gateway_route_views_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_gateway_route_views_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gateway_route_views_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_gateway_route_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_gateway_route_views ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, 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_gateway_route_views({ parent: parent, 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_gateway_route_views(::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, 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_gateway_route_views_client_stub.call_count + end + end + end + + def test_list_mesh_route_views + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_mesh_route_views_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_mesh_route_views_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_mesh_route_views_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_mesh_route_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_mesh_route_views ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, 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_mesh_route_views({ parent: parent, 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_mesh_route_views(::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, 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_mesh_route_views_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb index c477e6059de7..76e5b49aff14 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb @@ -75,6 +75,7 @@ def test_list_endpoint_policies parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_endpoint_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_endpoint_policies, name @@ -82,6 +83,7 @@ def test_list_endpoint_policies assert_equal "hello world", request["parent"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] refute_nil options end @@ -92,35 +94,35 @@ def test_list_endpoint_policies end # Use hash object - client.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + client.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) 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_endpoint_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + client.list_endpoint_policies parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success 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_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + client.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) 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_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + client.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, 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_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + client.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -715,6 +717,7 @@ def test_list_grpc_routes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_grpc_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_grpc_routes, name @@ -722,6 +725,7 @@ def test_list_grpc_routes assert_equal "hello world", request["parent"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] refute_nil options end @@ -732,35 +736,35 @@ def test_list_grpc_routes end # Use hash object - client.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + client.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) 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_grpc_routes parent: parent, page_size: page_size, page_token: page_token do |response, operation| + client.list_grpc_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success 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_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + client.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) 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_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + client.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, 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_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + client.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -1035,6 +1039,7 @@ def test_list_http_routes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_http_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_http_routes, name @@ -1042,6 +1047,7 @@ def test_list_http_routes assert_equal "hello world", request["parent"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] refute_nil options end @@ -1052,35 +1058,35 @@ def test_list_http_routes end # Use hash object - client.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + client.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) 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_http_routes parent: parent, page_size: page_size, page_token: page_token do |response, operation| + client.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success 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_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + client.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) 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_http_routes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + client.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, 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_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + client.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -1355,6 +1361,7 @@ def test_list_tcp_routes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_tcp_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_tcp_routes, name @@ -1362,6 +1369,7 @@ def test_list_tcp_routes assert_equal "hello world", request["parent"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] refute_nil options end @@ -1372,35 +1380,35 @@ def test_list_tcp_routes end # Use hash object - client.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + client.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) 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_tcp_routes parent: parent, page_size: page_size, page_token: page_token do |response, operation| + client.list_tcp_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success 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_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + client.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) 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_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + client.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, 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_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + client.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -1675,6 +1683,7 @@ def test_list_tls_routes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_tls_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_tls_routes, name @@ -1682,6 +1691,7 @@ def test_list_tls_routes assert_equal "hello world", request["parent"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] refute_nil options end @@ -1692,35 +1702,35 @@ def test_list_tls_routes end # Use hash object - client.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + client.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) 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_tls_routes parent: parent, page_size: page_size, page_token: page_token do |response, operation| + client.list_tls_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success 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_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + client.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) 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_tls_routes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + client.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, 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_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + client.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -2176,6 +2186,71 @@ def test_create_service_binding end end + def test_update_service_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + service_binding = {} + + update_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service_binding, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceBinding), request["service_binding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_binding_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_service_binding({ update_mask: update_mask, service_binding: service_binding }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_service_binding update_mask: update_mask, service_binding: service_binding do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_service_binding ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_service_binding({ update_mask: update_mask, service_binding: service_binding }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_service_binding(::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_service_binding_client_stub.call_rpc_count + end + end + def test_delete_service_binding # Create GRPC objects. grpc_response = ::Google::Longrunning::Operation.new @@ -2250,6 +2325,7 @@ def test_list_meshes parent = "hello world" page_size = 42 page_token = "hello world" + return_partial_success = true list_meshes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_meshes, name @@ -2257,6 +2333,7 @@ def test_list_meshes assert_equal "hello world", request["parent"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] refute_nil options end @@ -2267,35 +2344,35 @@ def test_list_meshes end # Use hash object - client.list_meshes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + client.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) 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_meshes parent: parent, page_size: page_size, page_token: page_token do |response, operation| + client.list_meshes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success 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_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + client.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) 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_meshes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + client.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, 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_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + client.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -2559,6 +2636,576 @@ def test_delete_mesh end end + def test_list_service_lb_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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" + page_size = 42 + page_token = "hello world" + + list_service_lb_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_lb_policies, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_service_lb_policies_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_service_lb_policies({ parent: parent, 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_service_lb_policies parent: parent, 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_service_lb_policies ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, 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_service_lb_policies({ parent: parent, 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_service_lb_policies(::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, 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_service_lb_policies_client_stub.call_rpc_count + end + end + + def test_get_service_lb_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.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" + + get_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_lb_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_lb_policy_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_service_lb_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_service_lb_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_service_lb_policy ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_service_lb_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_service_lb_policy(::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.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, get_service_lb_policy_client_stub.call_rpc_count + end + end + + def test_create_service_lb_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + service_lb_policy_id = "hello world" + service_lb_policy = {} + + create_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_lb_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["service_lb_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy), request["service_lb_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_lb_policy_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_service_lb_policy parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_service_lb_policy ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_service_lb_policy(::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_service_lb_policy_client_stub.call_rpc_count + end + end + + def test_update_service_lb_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + service_lb_policy = {} + + update_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service_lb_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy), request["service_lb_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_lb_policy_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_service_lb_policy update_mask: update_mask, service_lb_policy: service_lb_policy do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_service_lb_policy ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_service_lb_policy(::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_service_lb_policy_client_stub.call_rpc_count + end + end + + def test_delete_service_lb_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service_lb_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_lb_policy_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_service_lb_policy({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_service_lb_policy name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_service_lb_policy ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_service_lb_policy({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_service_lb_policy(::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_service_lb_policy_client_stub.call_rpc_count + end + end + + def test_get_gateway_route_view + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.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" + + get_gateway_route_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_gateway_route_view, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_gateway_route_view_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_gateway_route_view({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_gateway_route_view name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_gateway_route_view ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_gateway_route_view({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_gateway_route_view(::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.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, get_gateway_route_view_client_stub.call_rpc_count + end + end + + def test_get_mesh_route_view + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::MeshRouteView.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" + + get_mesh_route_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_mesh_route_view, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_mesh_route_view_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_mesh_route_view({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_mesh_route_view name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_mesh_route_view ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_mesh_route_view({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_mesh_route_view(::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.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, get_mesh_route_view_client_stub.call_rpc_count + end + end + + def test_list_gateway_route_views + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.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" + page_size = 42 + page_token = "hello world" + + list_gateway_route_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gateway_route_views, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_gateway_route_views_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_gateway_route_views({ parent: parent, 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_gateway_route_views parent: parent, 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_gateway_route_views ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, 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_gateway_route_views({ parent: parent, 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_gateway_route_views(::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, 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_gateway_route_views_client_stub.call_rpc_count + end + end + + def test_list_mesh_route_views + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.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" + page_size = 42 + page_token = "hello world" + + list_mesh_route_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_mesh_route_views, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_mesh_route_views_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_mesh_route_views({ parent: parent, 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_mesh_route_views parent: parent, 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_mesh_route_views ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, 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_mesh_route_views({ parent: parent, 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_mesh_route_views(::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, 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_mesh_route_views_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From 3bf29eae86fa8115d60646266eba12f0bddcd47e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:23:44 -0700 Subject: [PATCH 097/457] feat: Added support for DELTA, ICEBERG, PIG components (#30496) feat: add scenarios AUTO/NONE to autotuning config --- .../lib/google/cloud/dataproc/v1/shared_pb.rb | 2 +- .../proto_docs/google/cloud/dataproc/v1/shared.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/shared_pb.rb b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/shared_pb.rb index fa2c1abe56a7..6f5dc4c7da36 100644 --- a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/shared_pb.rb +++ b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/shared_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n%google/cloud/dataproc/v1/shared.proto\x12\x18google.cloud.dataproc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf5\x02\n\rRuntimeConfig\x12\x14\n\x07version\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63ontainer_image\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12P\n\nproperties\x18\x03 \x03(\x0b\x32\x37.google.cloud.dataproc.v1.RuntimeConfig.PropertiesEntryB\x03\xe0\x41\x01\x12J\n\x11repository_config\x18\x05 \x01(\x0b\x32*.google.cloud.dataproc.v1.RepositoryConfigB\x03\xe0\x41\x01\x12J\n\x11\x61utotuning_config\x18\x06 \x01(\x0b\x32*.google.cloud.dataproc.v1.AutotuningConfigB\x03\xe0\x41\x01\x12\x13\n\x06\x63ohort\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xab\x01\n\x11\x45nvironmentConfig\x12H\n\x10\x65xecution_config\x18\x01 \x01(\x0b\x32).google.cloud.dataproc.v1.ExecutionConfigB\x03\xe0\x41\x01\x12L\n\x12peripherals_config\x18\x02 \x01(\x0b\x32+.google.cloud.dataproc.v1.PeripheralsConfigB\x03\xe0\x41\x01\"\xf6\x02\n\x0f\x45xecutionConfig\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\x0bnetwork_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1d\n\x0esubnetwork_uri\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\x0cnetwork_tags\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x08idle_ttl\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12+\n\x03ttl\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x1b\n\x0estaging_bucket\x18\n \x01(\tB\x03\xe0\x41\x01\x12R\n\x15\x61uthentication_config\x18\x0b \x01(\x0b\x32..google.cloud.dataproc.v1.AuthenticationConfigB\x03\xe0\x41\x01\x42\t\n\x07network\"9\n\x18SparkHistoryServerConfig\x12\x1d\n\x10\x64\x61taproc_cluster\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xb6\x01\n\x11PeripheralsConfig\x12\x43\n\x11metastore_service\x18\x01 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n metastore.googleapis.com/Service\x12\\\n\x1bspark_history_server_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.dataproc.v1.SparkHistoryServerConfigB\x03\xe0\x41\x01\"\xd7\x02\n\x0bRuntimeInfo\x12L\n\tendpoints\x18\x01 \x03(\x0b\x32\x34.google.cloud.dataproc.v1.RuntimeInfo.EndpointsEntryB\x03\xe0\x41\x03\x12\x17\n\noutput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x64iagnostic_output_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x11\x61pproximate_usage\x18\x06 \x01(\x0b\x32&.google.cloud.dataproc.v1.UsageMetricsB\x03\xe0\x41\x03\x12\x43\n\rcurrent_usage\x18\x07 \x01(\x0b\x32\'.google.cloud.dataproc.v1.UsageSnapshotB\x03\xe0\x41\x03\x1a\x30\n\x0e\x45ndpointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x01\n\x0cUsageMetrics\x12\x1e\n\x11milli_dcu_seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\'\n\x1ashuffle_storage_gb_seconds\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12&\n\x19milli_accelerator_seconds\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x61\x63\x63\x65lerator_type\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x88\x02\n\rUsageSnapshot\x12\x16\n\tmilli_dcu\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1f\n\x12shuffle_storage_gb\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11milli_dcu_premium\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12\'\n\x1ashuffle_storage_gb_premium\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11milli_accelerator\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x61\x63\x63\x65lerator_type\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\rsnapshot_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xa4\x01\n\x10GkeClusterConfig\x12\x44\n\x12gke_cluster_target\x18\x02 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n container.googleapis.com/Cluster\x12J\n\x10node_pool_target\x18\x03 \x03(\x0b\x32+.google.cloud.dataproc.v1.GkeNodePoolTargetB\x03\xe0\x41\x01\"\xf2\x01\n\x17KubernetesClusterConfig\x12!\n\x14kubernetes_namespace\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12M\n\x12gke_cluster_config\x18\x02 \x01(\x0b\x32*.google.cloud.dataproc.v1.GkeClusterConfigB\x03\xe0\x41\x02H\x00\x12[\n\x1akubernetes_software_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.dataproc.v1.KubernetesSoftwareConfigB\x03\xe0\x41\x01\x42\x08\n\x06\x63onfig\"\xc3\x02\n\x18KubernetesSoftwareConfig\x12\x63\n\x11\x63omponent_version\x18\x01 \x03(\x0b\x32H.google.cloud.dataproc.v1.KubernetesSoftwareConfig.ComponentVersionEntry\x12V\n\nproperties\x18\x02 \x03(\x0b\x32\x42.google.cloud.dataproc.v1.KubernetesSoftwareConfig.PropertiesEntry\x1a\x37\n\x15\x43omponentVersionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x02\n\x11GkeNodePoolTarget\x12\x16\n\tnode_pool\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x05roles\x18\x02 \x03(\x0e\x32\x30.google.cloud.dataproc.v1.GkeNodePoolTarget.RoleB\x03\xe0\x41\x02\x12J\n\x10node_pool_config\x18\x03 \x01(\x0b\x32+.google.cloud.dataproc.v1.GkeNodePoolConfigB\x03\xe0\x41\x04\"_\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0e\n\nCONTROLLER\x10\x02\x12\x10\n\x0cSPARK_DRIVER\x10\x03\x12\x12\n\x0eSPARK_EXECUTOR\x10\x04\"\xbc\x05\n\x11GkeNodePoolConfig\x12N\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x39.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigB\x03\xe0\x41\x01\x12\x16\n\tlocations\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x62\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32H.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfigB\x03\xe0\x41\x01\x1a\x99\x02\n\rGkeNodeConfig\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0flocal_ssd_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bpreemptible\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12\x63\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32H.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfigB\x03\xe0\x41\x01\x12\x1d\n\x10min_cpu_platform\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_kms_key\x18\x17 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04spot\x18 \x01(\x08\x42\x03\xe0\x41\x01\x1ao\n\x1cGkeNodePoolAcceleratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x1aN\n\x1cGkeNodePoolAutoscalingConfig\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\"\xf3\x01\n\x14\x41uthenticationConfig\x12q\n!user_workload_authentication_type\x18\x01 \x01(\x0e\x32\x41.google.cloud.dataproc.v1.AuthenticationConfig.AuthenticationTypeB\x03\xe0\x41\x01\"h\n\x12\x41uthenticationType\x12#\n\x1f\x41UTHENTICATION_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSERVICE_ACCOUNT\x10\x01\x12\x18\n\x14\x45ND_USER_CREDENTIALS\x10\x02\"\xb7\x01\n\x10\x41utotuningConfig\x12K\n\tscenarios\x18\x02 \x03(\x0e\x32\x33.google.cloud.dataproc.v1.AutotuningConfig.ScenarioB\x03\xe0\x41\x01\"V\n\x08Scenario\x12\x18\n\x14SCENARIO_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCALING\x10\x02\x12\x17\n\x13\x42ROADCAST_HASH_JOIN\x10\x03\x12\n\n\x06MEMORY\x10\x04\"g\n\x10RepositoryConfig\x12S\n\x16pypi_repository_config\x18\x01 \x01(\x0b\x32..google.cloud.dataproc.v1.PyPiRepositoryConfigB\x03\xe0\x41\x01\"4\n\x14PyPiRepositoryConfig\x12\x1c\n\x0fpypi_repository\x18\x01 \x01(\tB\x03\xe0\x41\x01*\xd4\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41NACONDA\x10\x05\x12\n\n\x06\x44OCKER\x10\r\x12\t\n\x05\x44RUID\x10\t\x12\t\n\x05\x46LINK\x10\x0e\x12\t\n\x05HBASE\x10\x0b\x12\x10\n\x0cHIVE_WEBHCAT\x10\x03\x12\x08\n\x04HUDI\x10\x12\x12\x0b\n\x07JUPYTER\x10\x01\x12\n\n\x06PRESTO\x10\x06\x12\t\n\x05TRINO\x10\x11\x12\n\n\x06RANGER\x10\x0c\x12\x08\n\x04SOLR\x10\n\x12\x0c\n\x08ZEPPELIN\x10\x04\x12\r\n\tZOOKEEPER\x10\x08*J\n\rFailureAction\x12\x1e\n\x1a\x46\x41ILURE_ACTION_UNSPECIFIED\x10\x00\x12\r\n\tNO_ACTION\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x42\xa7\x03\n\x1c\x63om.google.cloud.dataproc.v1B\x0bSharedProtoP\x01Z;cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb\xea\x41^\n container.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}\xea\x41^\n metastore.googleapis.com/Service\x12:projects/{project}/locations/{location}/services/{service}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\x06proto3" +descriptor_data = "\n%google/cloud/dataproc/v1/shared.proto\x12\x18google.cloud.dataproc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf5\x02\n\rRuntimeConfig\x12\x14\n\x07version\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63ontainer_image\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12P\n\nproperties\x18\x03 \x03(\x0b\x32\x37.google.cloud.dataproc.v1.RuntimeConfig.PropertiesEntryB\x03\xe0\x41\x01\x12J\n\x11repository_config\x18\x05 \x01(\x0b\x32*.google.cloud.dataproc.v1.RepositoryConfigB\x03\xe0\x41\x01\x12J\n\x11\x61utotuning_config\x18\x06 \x01(\x0b\x32*.google.cloud.dataproc.v1.AutotuningConfigB\x03\xe0\x41\x01\x12\x13\n\x06\x63ohort\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xab\x01\n\x11\x45nvironmentConfig\x12H\n\x10\x65xecution_config\x18\x01 \x01(\x0b\x32).google.cloud.dataproc.v1.ExecutionConfigB\x03\xe0\x41\x01\x12L\n\x12peripherals_config\x18\x02 \x01(\x0b\x32+.google.cloud.dataproc.v1.PeripheralsConfigB\x03\xe0\x41\x01\"\xf6\x02\n\x0f\x45xecutionConfig\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\x0bnetwork_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1d\n\x0esubnetwork_uri\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\x0cnetwork_tags\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x08idle_ttl\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12+\n\x03ttl\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x1b\n\x0estaging_bucket\x18\n \x01(\tB\x03\xe0\x41\x01\x12R\n\x15\x61uthentication_config\x18\x0b \x01(\x0b\x32..google.cloud.dataproc.v1.AuthenticationConfigB\x03\xe0\x41\x01\x42\t\n\x07network\"9\n\x18SparkHistoryServerConfig\x12\x1d\n\x10\x64\x61taproc_cluster\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xb6\x01\n\x11PeripheralsConfig\x12\x43\n\x11metastore_service\x18\x01 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n metastore.googleapis.com/Service\x12\\\n\x1bspark_history_server_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.dataproc.v1.SparkHistoryServerConfigB\x03\xe0\x41\x01\"\xd7\x02\n\x0bRuntimeInfo\x12L\n\tendpoints\x18\x01 \x03(\x0b\x32\x34.google.cloud.dataproc.v1.RuntimeInfo.EndpointsEntryB\x03\xe0\x41\x03\x12\x17\n\noutput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x64iagnostic_output_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x11\x61pproximate_usage\x18\x06 \x01(\x0b\x32&.google.cloud.dataproc.v1.UsageMetricsB\x03\xe0\x41\x03\x12\x43\n\rcurrent_usage\x18\x07 \x01(\x0b\x32\'.google.cloud.dataproc.v1.UsageSnapshotB\x03\xe0\x41\x03\x1a\x30\n\x0e\x45ndpointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x01\n\x0cUsageMetrics\x12\x1e\n\x11milli_dcu_seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\'\n\x1ashuffle_storage_gb_seconds\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12&\n\x19milli_accelerator_seconds\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x61\x63\x63\x65lerator_type\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x88\x02\n\rUsageSnapshot\x12\x16\n\tmilli_dcu\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1f\n\x12shuffle_storage_gb\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11milli_dcu_premium\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12\'\n\x1ashuffle_storage_gb_premium\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11milli_accelerator\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x61\x63\x63\x65lerator_type\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\rsnapshot_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xa4\x01\n\x10GkeClusterConfig\x12\x44\n\x12gke_cluster_target\x18\x02 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n container.googleapis.com/Cluster\x12J\n\x10node_pool_target\x18\x03 \x03(\x0b\x32+.google.cloud.dataproc.v1.GkeNodePoolTargetB\x03\xe0\x41\x01\"\xf2\x01\n\x17KubernetesClusterConfig\x12!\n\x14kubernetes_namespace\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12M\n\x12gke_cluster_config\x18\x02 \x01(\x0b\x32*.google.cloud.dataproc.v1.GkeClusterConfigB\x03\xe0\x41\x02H\x00\x12[\n\x1akubernetes_software_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.dataproc.v1.KubernetesSoftwareConfigB\x03\xe0\x41\x01\x42\x08\n\x06\x63onfig\"\xc3\x02\n\x18KubernetesSoftwareConfig\x12\x63\n\x11\x63omponent_version\x18\x01 \x03(\x0b\x32H.google.cloud.dataproc.v1.KubernetesSoftwareConfig.ComponentVersionEntry\x12V\n\nproperties\x18\x02 \x03(\x0b\x32\x42.google.cloud.dataproc.v1.KubernetesSoftwareConfig.PropertiesEntry\x1a\x37\n\x15\x43omponentVersionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x02\n\x11GkeNodePoolTarget\x12\x16\n\tnode_pool\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x05roles\x18\x02 \x03(\x0e\x32\x30.google.cloud.dataproc.v1.GkeNodePoolTarget.RoleB\x03\xe0\x41\x02\x12J\n\x10node_pool_config\x18\x03 \x01(\x0b\x32+.google.cloud.dataproc.v1.GkeNodePoolConfigB\x03\xe0\x41\x04\"_\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0e\n\nCONTROLLER\x10\x02\x12\x10\n\x0cSPARK_DRIVER\x10\x03\x12\x12\n\x0eSPARK_EXECUTOR\x10\x04\"\xbc\x05\n\x11GkeNodePoolConfig\x12N\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x39.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigB\x03\xe0\x41\x01\x12\x16\n\tlocations\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x62\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32H.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfigB\x03\xe0\x41\x01\x1a\x99\x02\n\rGkeNodeConfig\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0flocal_ssd_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bpreemptible\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12\x63\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32H.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfigB\x03\xe0\x41\x01\x12\x1d\n\x10min_cpu_platform\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_kms_key\x18\x17 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04spot\x18 \x01(\x08\x42\x03\xe0\x41\x01\x1ao\n\x1cGkeNodePoolAcceleratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x1aN\n\x1cGkeNodePoolAutoscalingConfig\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\"\xf3\x01\n\x14\x41uthenticationConfig\x12q\n!user_workload_authentication_type\x18\x01 \x01(\x0e\x32\x41.google.cloud.dataproc.v1.AuthenticationConfig.AuthenticationTypeB\x03\xe0\x41\x01\"h\n\x12\x41uthenticationType\x12#\n\x1f\x41UTHENTICATION_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSERVICE_ACCOUNT\x10\x01\x12\x18\n\x14\x45ND_USER_CREDENTIALS\x10\x02\"\xcb\x01\n\x10\x41utotuningConfig\x12K\n\tscenarios\x18\x02 \x03(\x0e\x32\x33.google.cloud.dataproc.v1.AutotuningConfig.ScenarioB\x03\xe0\x41\x01\"j\n\x08Scenario\x12\x18\n\x14SCENARIO_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCALING\x10\x02\x12\x17\n\x13\x42ROADCAST_HASH_JOIN\x10\x03\x12\n\n\x06MEMORY\x10\x04\x12\x08\n\x04NONE\x10\x05\x12\x08\n\x04\x41UTO\x10\x06\"g\n\x10RepositoryConfig\x12S\n\x16pypi_repository_config\x18\x01 \x01(\x0b\x32..google.cloud.dataproc.v1.PyPiRepositoryConfigB\x03\xe0\x41\x01\"4\n\x14PyPiRepositoryConfig\x12\x1c\n\x0fpypi_repository\x18\x01 \x01(\tB\x03\xe0\x41\x01*\xf5\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41NACONDA\x10\x05\x12\t\n\x05\x44\x45LTA\x10\x14\x12\n\n\x06\x44OCKER\x10\r\x12\t\n\x05\x44RUID\x10\t\x12\t\n\x05\x46LINK\x10\x0e\x12\t\n\x05HBASE\x10\x0b\x12\x10\n\x0cHIVE_WEBHCAT\x10\x03\x12\x08\n\x04HUDI\x10\x12\x12\x0b\n\x07ICEBERG\x10\x13\x12\x0b\n\x07JUPYTER\x10\x01\x12\x07\n\x03PIG\x10\x15\x12\n\n\x06PRESTO\x10\x06\x12\t\n\x05TRINO\x10\x11\x12\n\n\x06RANGER\x10\x0c\x12\x08\n\x04SOLR\x10\n\x12\x0c\n\x08ZEPPELIN\x10\x04\x12\r\n\tZOOKEEPER\x10\x08*J\n\rFailureAction\x12\x1e\n\x1a\x46\x41ILURE_ACTION_UNSPECIFIED\x10\x00\x12\r\n\tNO_ACTION\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x42\xa7\x03\n\x1c\x63om.google.cloud.dataproc.v1B\x0bSharedProtoP\x01Z;cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb\xea\x41^\n container.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}\xea\x41^\n metastore.googleapis.com/Service\x12:projects/{project}/locations/{location}/services/{service}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-dataproc-v1/proto_docs/google/cloud/dataproc/v1/shared.rb b/google-cloud-dataproc-v1/proto_docs/google/cloud/dataproc/v1/shared.rb index 12836f7edcac..d37763e5e4cf 100644 --- a/google-cloud-dataproc-v1/proto_docs/google/cloud/dataproc/v1/shared.rb +++ b/google-cloud-dataproc-v1/proto_docs/google/cloud/dataproc/v1/shared.rb @@ -574,6 +574,12 @@ module Scenario # Memory management for workloads. MEMORY = 4 + + # No autotuning. + NONE = 5 + + # Automatic selection of scenarios. + AUTO = 6 end end @@ -607,6 +613,9 @@ module Component # Compute Engine image versions. ANACONDA = 5 + # Delta Lake. + DELTA = 20 + # Docker DOCKER = 13 @@ -625,9 +634,15 @@ module Component # Hudi. HUDI = 18 + # Iceberg. + ICEBERG = 19 + # The Jupyter Notebook. JUPYTER = 1 + # The Pig component. + PIG = 21 + # The Presto query engine. PRESTO = 6 From 429b9bbb2cb6909f32515dd09127094d7d067779 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:26:05 -0700 Subject: [PATCH 098/457] feat: add EncryptionSpec field for RagCorpus CMEK feature to v1 (#30485) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: A new field `include_thoughts` is added to message `.google.cloud.aiplatform.v1.Part` feat: A new field `thought` is added to message `.google.cloud.aiplatform.v1.Part` feat: A new field `thought_signature` is added to message `.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig` PiperOrigin-RevId: 764447916 Source-Link: https://github.com/googleapis/googleapis/commit/ea40277431fb821fd5a9b1eb8227535846388770 Source-Link: https://github.com/googleapis/googleapis-gen/commit/37f4666af67ef313ed1dc74316a628810597b582 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIzN2Y0NjY2YWY2N2VmMzEzZWQxZGM3NDMxNmE2Mjg4MTA1OTdiNTgyIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Expose URL Context API to v1 PiperOrigin-RevId: 764946762 Source-Link: https://github.com/googleapis/googleapis/commit/8e81724ff76cfef44d194683eb3051900e9f9e99 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d6dee1cd827105bd7f00dc62fdab87c139f9d708 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkNmRlZTFjZDgyNzEwNWJkN2YwMGRjNjJmZGFiODdjMTM5ZjlkNzA4In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add network_attachment to PscInterfaceConfig feat: add psc_interface_config to CustomJobSpec feat: add psc_interface_config to PersistentResource feat: add psc_interface_config to PipelineJob PiperOrigin-RevId: 765264778 Source-Link: https://github.com/googleapis/googleapis/commit/89d75d55e24f3529c6e99e57e9037cede20a3659 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6ad81ec545ed638de6945732ac076d6243f45d96 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI2YWQ4MWVjNTQ1ZWQ2MzhkZTY5NDU3MzJhYzA3NmQ2MjQzZjQ1ZDk2In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add json schema support to structured output and function declaration PiperOrigin-RevId: 765394859 Source-Link: https://github.com/googleapis/googleapis/commit/50febc78945b43192d20b6826ee8be2dc27f831e Source-Link: https://github.com/googleapis/googleapis-gen/commit/44798b7f7c7d83ee878efb02ffa7d14f0c85372c Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI0NDc5OGI3ZjdjN2Q4M2VlODc4ZWZiMDJmZmE3ZDE0ZjBjODUzNzJjIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Expose UrlContextMetadata API to v1 PiperOrigin-RevId: 767327091 Source-Link: https://github.com/googleapis/googleapis/commit/5e989a7b16fc67bdedf2c1ad538c532a061d3a72 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2cdc136d177d73c7abad4bef4113cb26a4493e82 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIyY2RjMTM2ZDE3N2Q3M2M3YWJhZDRiZWY0MTEzY2IyNmE0NDkzZTgyIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add EncryptionSpec field for RagCorpus CMEK feature to v1 PiperOrigin-RevId: 770837205 Source-Link: https://github.com/googleapis/googleapis/commit/3a45aa38968f4fe537cd3837c0e95af8c189b11b Source-Link: https://github.com/googleapis/googleapis-gen/commit/6d6b54fc3e11bd79c520a4df8cb1561a2c6aa149 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI2ZDZiNTRmYzNlMTFiZDc5YzUyMGE0ZGY4Y2IxNTYxYTJjNmFhMTQ5In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../cloud/ai_platform/v1/job_service/paths.rb | 19 ++++ .../v1/persistent_resource_service/paths.rb | 19 ++++ .../ai_platform/v1/pipeline_service/paths.rb | 19 ++++ .../ai_platform/v1/schedule_service/paths.rb | 19 ++++ .../google/cloud/aiplatform/v1/content_pb.rb | 7 +- .../cloud/aiplatform/v1/custom_job_pb.rb | 4 +- .../aiplatform/v1/persistent_resource_pb.rb | 4 +- .../cloud/aiplatform/v1/pipeline_job_pb.rb | 4 +- .../aiplatform/v1/service_networking_pb.rb | 3 +- .../lib/google/cloud/aiplatform/v1/tool_pb.rb | 5 +- .../cloud/aiplatform/v1/vertex_rag_data_pb.rb | 4 +- .../google/cloud/aiplatform/v1/content.rb | 103 ++++++++++++++++-- .../google/cloud/aiplatform/v1/custom_job.rb | 3 + .../aiplatform/v1/persistent_resource.rb | 3 + .../cloud/aiplatform/v1/pipeline_job.rb | 3 + .../cloud/aiplatform/v1/service_networking.rb | 15 +++ .../google/cloud/aiplatform/v1/tool.rb | 35 ++++++ .../cloud/aiplatform/v1/vertex_rag_data.rb | 6 + .../ai_platform/v1/job_service_paths_test.rb | 12 ++ .../persistent_resource_service_paths_test.rb | 12 ++ .../v1/pipeline_service_paths_test.rb | 12 ++ .../v1/schedule_service_paths_test.rb | 12 ++ 22 files changed, 308 insertions(+), 15 deletions(-) diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/job_service/paths.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/job_service/paths.rb index 43fbf12e0a03..55fa03ddad3e 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/job_service/paths.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/job_service/paths.rb @@ -297,6 +297,25 @@ def network_path project:, network: "projects/#{project}/global/networks/#{network}" end + ## + # Create a fully-qualified NetworkAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` + # + # @param project [String] + # @param region [String] + # @param networkattachment [String] + # + # @return [::String] + def network_attachment_path project:, region:, networkattachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" + end + ## # Create a fully-qualified NotificationChannel resource string. # diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/persistent_resource_service/paths.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/persistent_resource_service/paths.rb index b295b86fd851..826f7648e185 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/persistent_resource_service/paths.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/persistent_resource_service/paths.rb @@ -58,6 +58,25 @@ def network_path project:, network: "projects/#{project}/global/networks/#{network}" end + ## + # Create a fully-qualified NetworkAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` + # + # @param project [String] + # @param region [String] + # @param networkattachment [String] + # + # @return [::String] + def network_attachment_path project:, region:, networkattachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" + end + ## # Create a fully-qualified PersistentResource resource string. # diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb index e898856d26ad..ba37abd8b858 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb @@ -204,6 +204,25 @@ def network_path project:, network: "projects/#{project}/global/networks/#{network}" end + ## + # Create a fully-qualified NetworkAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` + # + # @param project [String] + # @param region [String] + # @param networkattachment [String] + # + # @return [::String] + def network_attachment_path project:, region:, networkattachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" + end + ## # Create a fully-qualified PipelineJob resource string. # diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/schedule_service/paths.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/schedule_service/paths.rb index 1ec02b9d4ca2..8a1f18f3a2f4 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/schedule_service/paths.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/schedule_service/paths.rb @@ -140,6 +140,25 @@ def network_path project:, network: "projects/#{project}/global/networks/#{network}" end + ## + # Create a fully-qualified NetworkAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` + # + # @param project [String] + # @param region [String] + # @param networkattachment [String] + # + # @return [::String] + def network_attachment_path project:, region:, networkattachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" + end + ## # Create a fully-qualified NotebookExecutionJob resource string. # diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb index 5e9db8d3b89a..baa8a32d3253 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb @@ -9,10 +9,11 @@ require 'google/cloud/aiplatform/v1/tool_pb' require 'google/cloud/aiplatform/v1/vertex_rag_data_pb' require 'google/protobuf/duration_pb' +require 'google/protobuf/struct_pb' require 'google/type/date_pb' -descriptor_data = "\n(google/cloud/aiplatform/v1/content.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a\x30google/cloud/aiplatform/v1/vertex_rag_data.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/date.proto\"R\n\x07\x43ontent\x12\x11\n\x04role\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x05parts\x18\x02 \x03(\x0b\x32 .google.cloud.aiplatform.v1.PartB\x03\xe0\x41\x02\"\xb2\x04\n\x04Part\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12<\n\x0binline_data\x18\x02 \x01(\x0b\x32 .google.cloud.aiplatform.v1.BlobB\x03\xe0\x41\x01H\x00\x12>\n\tfile_data\x18\x03 \x01(\x0b\x32$.google.cloud.aiplatform.v1.FileDataB\x03\xe0\x41\x01H\x00\x12\x46\n\rfunction_call\x18\x05 \x01(\x0b\x32(.google.cloud.aiplatform.v1.FunctionCallB\x03\xe0\x41\x01H\x00\x12N\n\x11\x66unction_response\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.FunctionResponseB\x03\xe0\x41\x01H\x00\x12J\n\x0f\x65xecutable_code\x18\x08 \x01(\x0b\x32*.google.cloud.aiplatform.v1.ExecutableCodeB\x03\xe0\x41\x01H\x00\x12U\n\x15\x63ode_execution_result\x18\t \x01(\x0b\x32/.google.cloud.aiplatform.v1.CodeExecutionResultB\x03\xe0\x41\x01H\x00\x12H\n\x0evideo_metadata\x18\x04 \x01(\x0b\x32).google.cloud.aiplatform.v1.VideoMetadataB\x03\xe0\x41\x01H\x01\x42\x06\n\x04\x64\x61taB\n\n\x08metadata\"1\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"9\n\x08\x46ileData\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x66ile_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"y\n\rVideoMetadata\x12\x34\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x32\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xe5\x0b\n\x10GenerationConfig\x12\x1d\n\x0btemperature\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05top_p\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x17\n\x05top_k\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12!\n\x0f\x63\x61ndidate_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12#\n\x11max_output_tokens\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\x0estop_sequences\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12#\n\x11response_logprobs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x1a\n\x08logprobs\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\"\n\x10presence_penalty\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12#\n\x11\x66requency_penalty\x18\t \x01(\x02\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x16\n\x04seed\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\t\x88\x01\x01\x12\x1f\n\x12response_mime_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fresponse_schema\x18\x10 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\\\n\x0erouting_config\x18\x11 \x01(\x0b\x32:.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfigB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12Y\n\x0fthinking_config\x18\x19 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfigB\x03\xe0\x41\x01\x1a\xc2\x04\n\rRoutingConfig\x12_\n\tauto_mode\x18\x01 \x01(\x0b\x32J.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingModeH\x00\x12\x63\n\x0bmanual_mode\x18\x02 \x01(\x0b\x32L.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingModeH\x00\x1a\x9b\x02\n\x0f\x41utoRoutingMode\x12\x88\x01\n\x18model_routing_preference\x18\x01 \x01(\x0e\x32\x61.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreferenceH\x00\x88\x01\x01\"`\n\x16ModelRoutingPreference\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x16\n\x12PRIORITIZE_QUALITY\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\x12\x13\n\x0fPRIORITIZE_COST\x10\x03\x42\x1b\n\x19_model_routing_preference\x1a;\n\x11ManualRoutingMode\x12\x17\n\nmodel_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0erouting_config\x1aG\n\x0eThinkingConfig\x12!\n\x0fthinking_budget\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x12\n\x10_thinking_budgetB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x12\n\x10_candidate_countB\x14\n\x12_max_output_tokensB\x14\n\x12_response_logprobsB\x0b\n\t_logprobsB\x13\n\x11_presence_penaltyB\x14\n\x12_frequency_penaltyB\x07\n\x05_seedB\x12\n\x10_response_schemaB\x11\n\x0f_routing_config\"\xeb\x03\n\rSafetySetting\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x02\x12T\n\tthreshold\x18\x02 \x01(\x0e\x32<.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThresholdB\x03\xe0\x41\x02\x12N\n\x06method\x18\x04 \x01(\x0e\x32\x39.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethodB\x03\xe0\x41\x01\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\"S\n\x0fHarmBlockMethod\x12!\n\x1dHARM_BLOCK_METHOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08SEVERITY\x10\x01\x12\x0f\n\x0bPROBABILITY\x10\x02\"\xbf\x04\n\x0cSafetyRating\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x03\x12R\n\x0bprobability\x18\x02 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.SafetyRating.HarmProbabilityB\x03\xe0\x41\x03\x12\x1e\n\x11probability_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\x12L\n\x08severity\x18\x06 \x01(\x0e\x32\x35.google.cloud.aiplatform.v1.SafetyRating.HarmSeverityB\x03\xe0\x41\x03\x12\x1b\n\x0eseverity_score\x18\x07 \x01(\x02\x42\x03\xe0\x41\x03\x12\x14\n\x07\x62locked\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"b\n\x0fHarmProbability\x12 \n\x1cHARM_PROBABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nNEGLIGIBLE\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\x94\x01\n\x0cHarmSeverity\x12\x1d\n\x19HARM_SEVERITY_UNSPECIFIED\x10\x00\x12\x1c\n\x18HARM_SEVERITY_NEGLIGIBLE\x10\x01\x12\x15\n\x11HARM_SEVERITY_LOW\x10\x02\x12\x18\n\x14HARM_SEVERITY_MEDIUM\x10\x03\x12\x16\n\x12HARM_SEVERITY_HIGH\x10\x04\"P\n\x10\x43itationMetadata\x12<\n\tcitations\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.CitationB\x03\xe0\x41\x03\"\xaa\x01\n\x08\x43itation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07license\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x30\n\x10publication_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\"\xfc\x05\n\tCandidate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x39\n\x07\x63ontent\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x03\x12\x12\n\x05score\x18\x08 \x01(\x01\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61vg_logprobs\x18\t \x01(\x01\x42\x03\xe0\x41\x03\x12H\n\x0flogprobs_result\x18\n \x01(\x0b\x32*.google.cloud.aiplatform.v1.LogprobsResultB\x03\xe0\x41\x03\x12N\n\rfinish_reason\x18\x03 \x01(\x0e\x32\x32.google.cloud.aiplatform.v1.Candidate.FinishReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x04 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12 \n\x0e\x66inish_message\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12L\n\x11\x63itation_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.CitationMetadataB\x03\xe0\x41\x03\x12N\n\x12grounding_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GroundingMetadataB\x03\xe0\x41\x03\"\xbc\x01\n\x0c\x46inishReason\x12\x1d\n\x19\x46INISH_REASON_UNSPECIFIED\x10\x00\x12\x08\n\x04STOP\x10\x01\x12\x0e\n\nMAX_TOKENS\x10\x02\x12\n\n\x06SAFETY\x10\x03\x12\x0e\n\nRECITATION\x10\x04\x12\t\n\x05OTHER\x10\x05\x12\r\n\tBLOCKLIST\x10\x06\x12\x16\n\x12PROHIBITED_CONTENT\x10\x07\x12\x08\n\x04SPII\x10\x08\x12\x1b\n\x17MALFORMED_FUNCTION_CALL\x10\tB\x11\n\x0f_finish_message\"\x8f\x03\n\x0eLogprobsResult\x12P\n\x0etop_candidates\x18\x01 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.LogprobsResult.TopCandidates\x12O\n\x11\x63hosen_candidates\x18\x02 \x03(\x0b\x32\x34.google.cloud.aiplatform.v1.LogprobsResult.Candidate\x1a\x7f\n\tCandidate\x12\x12\n\x05token\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08token_id\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0flog_probability\x18\x02 \x01(\x02H\x02\x88\x01\x01\x42\x08\n\x06_tokenB\x0b\n\t_token_idB\x12\n\x10_log_probability\x1aY\n\rTopCandidates\x12H\n\ncandidates\x18\x01 \x03(\x0b\x32\x34.google.cloud.aiplatform.v1.LogprobsResult.Candidate\"g\n\x07Segment\x12\x17\n\npart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xad\x03\n\x0eGroundingChunk\x12=\n\x03web\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.GroundingChunk.WebH\x00\x12X\n\x11retrieved_context\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GroundingChunk.RetrievedContextH\x00\x1a=\n\x03Web\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_title\x1a\xb4\x01\n\x10RetrievedContext\x12\x39\n\trag_chunk\x18\x04 \x01(\x0b\x32$.google.cloud.aiplatform.v1.RagChunkH\x00\x12\x10\n\x03uri\x18\x01 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04text\x18\x03 \x01(\tH\x03\x88\x01\x01\x42\x11\n\x0f\x63ontext_detailsB\x06\n\x04_uriB\x08\n\x06_titleB\x07\n\x05_textB\x0c\n\nchunk_type\"\x95\x01\n\x10GroundingSupport\x12\x39\n\x07segment\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.SegmentH\x00\x88\x01\x01\x12\x1f\n\x17grounding_chunk_indices\x18\x02 \x03(\x05\x12\x19\n\x11\x63onfidence_scores\x18\x03 \x03(\x02\x42\n\n\x08_segment\"\xa3\x03\n\x11GroundingMetadata\x12\x1f\n\x12web_search_queries\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12R\n\x12search_entry_point\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.SearchEntryPointB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x10grounding_chunks\x18\x05 \x03(\x0b\x32*.google.cloud.aiplatform.v1.GroundingChunk\x12M\n\x12grounding_supports\x18\x06 \x03(\x0b\x32,.google.cloud.aiplatform.v1.GroundingSupportB\x03\xe0\x41\x01\x12V\n\x12retrieval_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.RetrievalMetadataB\x06\xe0\x41\x01\xe0\x41\x03H\x01\x88\x01\x01\x42\x15\n\x13_search_entry_pointB\x15\n\x13_retrieval_metadata\"H\n\x10SearchEntryPoint\x12\x1d\n\x10rendered_content\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08sdk_blob\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\"G\n\x11RetrievalMetadata\x12\x32\n%google_search_dynamic_retrieval_score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\"a\n\x12ModalityTokenCount\x12\x36\n\x08modality\x18\x01 \x01(\x0e\x32$.google.cloud.aiplatform.v1.Modality\x12\x13\n\x0btoken_count\x18\x02 \x01(\x05*\xdb\x01\n\x0cHarmCategory\x12\x1d\n\x19HARM_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19HARM_CATEGORY_HATE_SPEECH\x10\x01\x12#\n\x1fHARM_CATEGORY_DANGEROUS_CONTENT\x10\x02\x12\x1c\n\x18HARM_CATEGORY_HARASSMENT\x10\x03\x12#\n\x1fHARM_CATEGORY_SEXUALLY_EXPLICIT\x10\x04\x12%\n\x1dHARM_CATEGORY_CIVIC_INTEGRITY\x10\x05\x1a\x02\x08\x01*]\n\x08Modality\x12\x18\n\x14MODALITY_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05IMAGE\x10\x02\x12\t\n\x05VIDEO\x10\x03\x12\t\n\x05\x41UDIO\x10\x04\x12\x0c\n\x08\x44OCUMENT\x10\x05\x42\xca\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0c\x43ontentProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n(google/cloud/aiplatform/v1/content.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a\x30google/cloud/aiplatform/v1/vertex_rag_data.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16google/type/date.proto\"R\n\x07\x43ontent\x12\x11\n\x04role\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x05parts\x18\x02 \x03(\x0b\x32 .google.cloud.aiplatform.v1.PartB\x03\xe0\x41\x02\"\xec\x04\n\x04Part\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12<\n\x0binline_data\x18\x02 \x01(\x0b\x32 .google.cloud.aiplatform.v1.BlobB\x03\xe0\x41\x01H\x00\x12>\n\tfile_data\x18\x03 \x01(\x0b\x32$.google.cloud.aiplatform.v1.FileDataB\x03\xe0\x41\x01H\x00\x12\x46\n\rfunction_call\x18\x05 \x01(\x0b\x32(.google.cloud.aiplatform.v1.FunctionCallB\x03\xe0\x41\x01H\x00\x12N\n\x11\x66unction_response\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.FunctionResponseB\x03\xe0\x41\x01H\x00\x12J\n\x0f\x65xecutable_code\x18\x08 \x01(\x0b\x32*.google.cloud.aiplatform.v1.ExecutableCodeB\x03\xe0\x41\x01H\x00\x12U\n\x15\x63ode_execution_result\x18\t \x01(\x0b\x32/.google.cloud.aiplatform.v1.CodeExecutionResultB\x03\xe0\x41\x01H\x00\x12\x16\n\x07thought\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12 \n\x11thought_signature\x18\x0b \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12H\n\x0evideo_metadata\x18\x04 \x01(\x0b\x32).google.cloud.aiplatform.v1.VideoMetadataB\x03\xe0\x41\x01H\x01\x42\x06\n\x04\x64\x61taB\n\n\x08metadata\"1\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"9\n\x08\x46ileData\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x66ile_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"y\n\rVideoMetadata\x12\x34\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x32\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xf8\x0c\n\x10GenerationConfig\x12\x1d\n\x0btemperature\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05top_p\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x17\n\x05top_k\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12!\n\x0f\x63\x61ndidate_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12#\n\x11max_output_tokens\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\x0estop_sequences\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12#\n\x11response_logprobs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x1a\n\x08logprobs\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\"\n\x10presence_penalty\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12#\n\x11\x66requency_penalty\x18\t \x01(\x02\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x16\n\x04seed\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\t\x88\x01\x01\x12\x1f\n\x12response_mime_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fresponse_schema\x18\x10 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x14response_json_schema\x18\x1c \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\\\n\x0erouting_config\x18\x11 \x01(\x0b\x32:.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfigB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12Y\n\x0fthinking_config\x18\x19 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfigB\x03\xe0\x41\x01\x1a\xc2\x04\n\rRoutingConfig\x12_\n\tauto_mode\x18\x01 \x01(\x0b\x32J.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingModeH\x00\x12\x63\n\x0bmanual_mode\x18\x02 \x01(\x0b\x32L.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingModeH\x00\x1a\x9b\x02\n\x0f\x41utoRoutingMode\x12\x88\x01\n\x18model_routing_preference\x18\x01 \x01(\x0e\x32\x61.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreferenceH\x00\x88\x01\x01\"`\n\x16ModelRoutingPreference\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x16\n\x12PRIORITIZE_QUALITY\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\x12\x13\n\x0fPRIORITIZE_COST\x10\x03\x42\x1b\n\x19_model_routing_preference\x1a;\n\x11ManualRoutingMode\x12\x17\n\nmodel_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0erouting_config\x1a\x80\x01\n\x0eThinkingConfig\x12\"\n\x10include_thoughts\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0fthinking_budget\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_include_thoughtsB\x12\n\x10_thinking_budgetB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x12\n\x10_candidate_countB\x14\n\x12_max_output_tokensB\x14\n\x12_response_logprobsB\x0b\n\t_logprobsB\x13\n\x11_presence_penaltyB\x14\n\x12_frequency_penaltyB\x07\n\x05_seedB\x12\n\x10_response_schemaB\x17\n\x15_response_json_schemaB\x11\n\x0f_routing_config\"\xeb\x03\n\rSafetySetting\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x02\x12T\n\tthreshold\x18\x02 \x01(\x0e\x32<.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThresholdB\x03\xe0\x41\x02\x12N\n\x06method\x18\x04 \x01(\x0e\x32\x39.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethodB\x03\xe0\x41\x01\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\"S\n\x0fHarmBlockMethod\x12!\n\x1dHARM_BLOCK_METHOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08SEVERITY\x10\x01\x12\x0f\n\x0bPROBABILITY\x10\x02\"\xbf\x04\n\x0cSafetyRating\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x03\x12R\n\x0bprobability\x18\x02 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.SafetyRating.HarmProbabilityB\x03\xe0\x41\x03\x12\x1e\n\x11probability_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\x12L\n\x08severity\x18\x06 \x01(\x0e\x32\x35.google.cloud.aiplatform.v1.SafetyRating.HarmSeverityB\x03\xe0\x41\x03\x12\x1b\n\x0eseverity_score\x18\x07 \x01(\x02\x42\x03\xe0\x41\x03\x12\x14\n\x07\x62locked\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"b\n\x0fHarmProbability\x12 \n\x1cHARM_PROBABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nNEGLIGIBLE\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\x94\x01\n\x0cHarmSeverity\x12\x1d\n\x19HARM_SEVERITY_UNSPECIFIED\x10\x00\x12\x1c\n\x18HARM_SEVERITY_NEGLIGIBLE\x10\x01\x12\x15\n\x11HARM_SEVERITY_LOW\x10\x02\x12\x18\n\x14HARM_SEVERITY_MEDIUM\x10\x03\x12\x16\n\x12HARM_SEVERITY_HIGH\x10\x04\"P\n\x10\x43itationMetadata\x12<\n\tcitations\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.CitationB\x03\xe0\x41\x03\"\xaa\x01\n\x08\x43itation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07license\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x30\n\x10publication_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\"\xcf\x06\n\tCandidate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x39\n\x07\x63ontent\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x03\x12\x12\n\x05score\x18\x08 \x01(\x01\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61vg_logprobs\x18\t \x01(\x01\x42\x03\xe0\x41\x03\x12H\n\x0flogprobs_result\x18\n \x01(\x0b\x32*.google.cloud.aiplatform.v1.LogprobsResultB\x03\xe0\x41\x03\x12N\n\rfinish_reason\x18\x03 \x01(\x0e\x32\x32.google.cloud.aiplatform.v1.Candidate.FinishReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x04 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12 \n\x0e\x66inish_message\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12L\n\x11\x63itation_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.CitationMetadataB\x03\xe0\x41\x03\x12N\n\x12grounding_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GroundingMetadataB\x03\xe0\x41\x03\x12Q\n\x14url_context_metadata\x18\x0b \x01(\x0b\x32..google.cloud.aiplatform.v1.UrlContextMetadataB\x03\xe0\x41\x03\"\xbc\x01\n\x0c\x46inishReason\x12\x1d\n\x19\x46INISH_REASON_UNSPECIFIED\x10\x00\x12\x08\n\x04STOP\x10\x01\x12\x0e\n\nMAX_TOKENS\x10\x02\x12\n\n\x06SAFETY\x10\x03\x12\x0e\n\nRECITATION\x10\x04\x12\t\n\x05OTHER\x10\x05\x12\r\n\tBLOCKLIST\x10\x06\x12\x16\n\x12PROHIBITED_CONTENT\x10\x07\x12\x08\n\x04SPII\x10\x08\x12\x1b\n\x17MALFORMED_FUNCTION_CALL\x10\tB\x11\n\x0f_finish_message\"X\n\x12UrlContextMetadata\x12\x42\n\x0curl_metadata\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.UrlMetadataB\x03\xe0\x41\x03\"\xfc\x01\n\x0bUrlMetadata\x12\x15\n\rretrieved_url\x18\x01 \x01(\t\x12X\n\x14url_retrieval_status\x18\x02 \x01(\x0e\x32:.google.cloud.aiplatform.v1.UrlMetadata.UrlRetrievalStatus\"|\n\x12UrlRetrievalStatus\x12$\n URL_RETRIEVAL_STATUS_UNSPECIFIED\x10\x00\x12 \n\x1cURL_RETRIEVAL_STATUS_SUCCESS\x10\x01\x12\x1e\n\x1aURL_RETRIEVAL_STATUS_ERROR\x10\x02\"\x8f\x03\n\x0eLogprobsResult\x12P\n\x0etop_candidates\x18\x01 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.LogprobsResult.TopCandidates\x12O\n\x11\x63hosen_candidates\x18\x02 \x03(\x0b\x32\x34.google.cloud.aiplatform.v1.LogprobsResult.Candidate\x1a\x7f\n\tCandidate\x12\x12\n\x05token\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08token_id\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0flog_probability\x18\x02 \x01(\x02H\x02\x88\x01\x01\x42\x08\n\x06_tokenB\x0b\n\t_token_idB\x12\n\x10_log_probability\x1aY\n\rTopCandidates\x12H\n\ncandidates\x18\x01 \x03(\x0b\x32\x34.google.cloud.aiplatform.v1.LogprobsResult.Candidate\"g\n\x07Segment\x12\x17\n\npart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xad\x03\n\x0eGroundingChunk\x12=\n\x03web\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.GroundingChunk.WebH\x00\x12X\n\x11retrieved_context\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GroundingChunk.RetrievedContextH\x00\x1a=\n\x03Web\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_title\x1a\xb4\x01\n\x10RetrievedContext\x12\x39\n\trag_chunk\x18\x04 \x01(\x0b\x32$.google.cloud.aiplatform.v1.RagChunkH\x00\x12\x10\n\x03uri\x18\x01 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04text\x18\x03 \x01(\tH\x03\x88\x01\x01\x42\x11\n\x0f\x63ontext_detailsB\x06\n\x04_uriB\x08\n\x06_titleB\x07\n\x05_textB\x0c\n\nchunk_type\"\x95\x01\n\x10GroundingSupport\x12\x39\n\x07segment\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.SegmentH\x00\x88\x01\x01\x12\x1f\n\x17grounding_chunk_indices\x18\x02 \x03(\x05\x12\x19\n\x11\x63onfidence_scores\x18\x03 \x03(\x02\x42\n\n\x08_segment\"\xa3\x03\n\x11GroundingMetadata\x12\x1f\n\x12web_search_queries\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12R\n\x12search_entry_point\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.SearchEntryPointB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x10grounding_chunks\x18\x05 \x03(\x0b\x32*.google.cloud.aiplatform.v1.GroundingChunk\x12M\n\x12grounding_supports\x18\x06 \x03(\x0b\x32,.google.cloud.aiplatform.v1.GroundingSupportB\x03\xe0\x41\x01\x12V\n\x12retrieval_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.RetrievalMetadataB\x06\xe0\x41\x01\xe0\x41\x03H\x01\x88\x01\x01\x42\x15\n\x13_search_entry_pointB\x15\n\x13_retrieval_metadata\"H\n\x10SearchEntryPoint\x12\x1d\n\x10rendered_content\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08sdk_blob\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\"G\n\x11RetrievalMetadata\x12\x32\n%google_search_dynamic_retrieval_score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\"a\n\x12ModalityTokenCount\x12\x36\n\x08modality\x18\x01 \x01(\x0e\x32$.google.cloud.aiplatform.v1.Modality\x12\x13\n\x0btoken_count\x18\x02 \x01(\x05*\xdb\x01\n\x0cHarmCategory\x12\x1d\n\x19HARM_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19HARM_CATEGORY_HATE_SPEECH\x10\x01\x12#\n\x1fHARM_CATEGORY_DANGEROUS_CONTENT\x10\x02\x12\x1c\n\x18HARM_CATEGORY_HARASSMENT\x10\x03\x12#\n\x1fHARM_CATEGORY_SEXUALLY_EXPLICIT\x10\x04\x12%\n\x1dHARM_CATEGORY_CIVIC_INTEGRITY\x10\x05\x1a\x02\x08\x01*]\n\x08Modality\x12\x18\n\x14MODALITY_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05IMAGE\x10\x02\x12\t\n\x05VIDEO\x10\x03\x12\t\n\x05\x41UDIO\x10\x04\x12\x0c\n\x08\x44OCUMENT\x10\x05\x42\xca\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0c\x43ontentProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -30,6 +31,7 @@ ["google.cloud.aiplatform.v1.FunctionCall", "google/cloud/aiplatform/v1/tool.proto"], ["google.protobuf.Duration", "google/protobuf/duration.proto"], ["google.cloud.aiplatform.v1.Schema", "google/cloud/aiplatform/v1/openapi.proto"], + ["google.protobuf.Value", "google/protobuf/struct.proto"], ["google.type.Date", "google/type/date.proto"], ["google.cloud.aiplatform.v1.RagChunk", "google/cloud/aiplatform/v1/vertex_rag_data.proto"], ] @@ -68,6 +70,9 @@ module V1 Citation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Citation").msgclass Candidate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Candidate").msgclass Candidate::FinishReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Candidate.FinishReason").enummodule + UrlContextMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UrlContextMetadata").msgclass + UrlMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UrlMetadata").msgclass + UrlMetadata::UrlRetrievalStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UrlMetadata.UrlRetrievalStatus").enummodule LogprobsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.LogprobsResult").msgclass LogprobsResult::Candidate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.LogprobsResult.Candidate").msgclass LogprobsResult::TopCandidates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.LogprobsResult.TopCandidates").msgclass diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/custom_job_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/custom_job_pb.rb index 3ef6c4acd6ac..f81342644a4f 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/custom_job_pb.rb @@ -11,12 +11,13 @@ require 'google/cloud/aiplatform/v1/io_pb' require 'google/cloud/aiplatform/v1/job_state_pb' require 'google/cloud/aiplatform/v1/machine_resources_pb' +require 'google/cloud/aiplatform/v1/service_networking_pb' require 'google/protobuf/duration_pb' require 'google/protobuf/timestamp_pb' require 'google/rpc/status_pb' -descriptor_data = "\n+google/cloud/aiplatform/v1/custom_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a*google/cloud/aiplatform/v1/job_state.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x99\x07\n\tCustomJob\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08job_spec\x18\x04 \x01(\x0b\x32).google.cloud.aiplatform.v1.CustomJobSpecB\x03\xe0\x41\x02\x12\x38\n\x05state\x18\x05 \x01(\x0e\x32$.google.cloud.aiplatform.v1.JobStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\n \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x41\n\x06labels\x18\x0b \x03(\x0b\x32\x31.google.cloud.aiplatform.v1.CustomJob.LabelsEntry\x12\x43\n\x0f\x65ncryption_spec\x18\x0c \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12V\n\x0fweb_access_uris\x18\x10 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.CustomJob.WebAccessUrisEntryB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12WebAccessUrisEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:i\xea\x41\x66\n#aiplatform.googleapis.com/CustomJob\x12?projects/{project}/locations/{location}/customJobs/{custom_job}\"\x98\x06\n\rCustomJobSpec\x12T\n\x16persistent_resource_id\x18\x0e \x01(\tB4\xe0\x41\x01\xfa\x41.\n,aiplatform.googleapis.com/PersistentResource\x12J\n\x11worker_pool_specs\x18\x01 \x03(\x0b\x32*.google.cloud.aiplatform.v1.WorkerPoolSpecB\x03\xe0\x41\x02\x12:\n\nscheduling\x18\x03 \x01(\x0b\x32&.google.cloud.aiplatform.v1.Scheduling\x12\x17\n\x0fservice_account\x18\x04 \x01(\t\x12\x37\n\x07network\x18\x05 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1f\n\x12reserved_ip_ranges\x18\r \x03(\tB\x03\xe0\x41\x01\x12I\n\x15\x62\x61se_output_directory\x18\x06 \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestination\x12&\n\x1eprotected_artifact_location_id\x18\x13 \x01(\t\x12\x42\n\x0btensorboard\x18\x07 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%aiplatform.googleapis.com/Tensorboard\x12\x1e\n\x11\x65nable_web_access\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17\x65nable_dashboard_access\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12=\n\nexperiment\x18\x11 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!aiplatform.googleapis.com/Context\x12\x41\n\x0e\x65xperiment_run\x18\x12 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!aiplatform.googleapis.com/Context\x12\x37\n\x06models\x18\x14 \x03(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"\x86\x03\n\x0eWorkerPoolSpec\x12\x43\n\x0e\x63ontainer_spec\x18\x06 \x01(\x0b\x32).google.cloud.aiplatform.v1.ContainerSpecH\x00\x12L\n\x13python_package_spec\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.PythonPackageSpecH\x00\x12\x45\n\x0cmachine_spec\x18\x01 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.MachineSpecB\x06\xe0\x41\x01\xe0\x41\x05\x12\x1a\n\rreplica_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12=\n\nnfs_mounts\x18\x04 \x03(\x0b\x32$.google.cloud.aiplatform.v1.NfsMountB\x03\xe0\x41\x01\x12\x37\n\tdisk_spec\x18\x05 \x01(\x0b\x32$.google.cloud.aiplatform.v1.DiskSpecB\x06\n\x04task\"w\n\rContainerSpec\x12\x16\n\timage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x63ommand\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12/\n\x03\x65nv\x18\x04 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVar\"\xaa\x01\n\x11PythonPackageSpec\x12\x1f\n\x12\x65xecutor_image_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cpackage_uris\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rpython_module\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04\x61rgs\x18\x04 \x03(\t\x12/\n\x03\x65nv\x18\x05 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVar\"\xf3\x02\n\nScheduling\x12*\n\x07timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12%\n\x1drestart_job_on_worker_restart\x18\x03 \x01(\x08\x12\x46\n\x08strategy\x18\x04 \x01(\x0e\x32/.google.cloud.aiplatform.v1.Scheduling.StrategyB\x03\xe0\x41\x01\x12\x1c\n\x0f\x64isable_retries\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x39\n\x11max_wait_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"q\n\x08Strategy\x12\x18\n\x14STRATEGY_UNSPECIFIED\x10\x00\x12\x11\n\tON_DEMAND\x10\x01\x1a\x02\x08\x01\x12\x10\n\x08LOW_COST\x10\x02\x1a\x02\x08\x01\x12\x0c\n\x08STANDARD\x10\x03\x12\x08\n\x04SPOT\x10\x04\x12\x0e\n\nFLEX_START\x10\x06\x42\xcc\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0e\x43ustomJobProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n+google/cloud/aiplatform/v1/custom_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a*google/cloud/aiplatform/v1/job_state.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x99\x07\n\tCustomJob\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08job_spec\x18\x04 \x01(\x0b\x32).google.cloud.aiplatform.v1.CustomJobSpecB\x03\xe0\x41\x02\x12\x38\n\x05state\x18\x05 \x01(\x0e\x32$.google.cloud.aiplatform.v1.JobStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\n \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x41\n\x06labels\x18\x0b \x03(\x0b\x32\x31.google.cloud.aiplatform.v1.CustomJob.LabelsEntry\x12\x43\n\x0f\x65ncryption_spec\x18\x0c \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12V\n\x0fweb_access_uris\x18\x10 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.CustomJob.WebAccessUrisEntryB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12WebAccessUrisEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:i\xea\x41\x66\n#aiplatform.googleapis.com/CustomJob\x12?projects/{project}/locations/{location}/customJobs/{custom_job}\"\xeb\x06\n\rCustomJobSpec\x12T\n\x16persistent_resource_id\x18\x0e \x01(\tB4\xe0\x41\x01\xfa\x41.\n,aiplatform.googleapis.com/PersistentResource\x12J\n\x11worker_pool_specs\x18\x01 \x03(\x0b\x32*.google.cloud.aiplatform.v1.WorkerPoolSpecB\x03\xe0\x41\x02\x12:\n\nscheduling\x18\x03 \x01(\x0b\x32&.google.cloud.aiplatform.v1.Scheduling\x12\x17\n\x0fservice_account\x18\x04 \x01(\t\x12\x37\n\x07network\x18\x05 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1f\n\x12reserved_ip_ranges\x18\r \x03(\tB\x03\xe0\x41\x01\x12Q\n\x14psc_interface_config\x18\x15 \x01(\x0b\x32..google.cloud.aiplatform.v1.PscInterfaceConfigB\x03\xe0\x41\x01\x12I\n\x15\x62\x61se_output_directory\x18\x06 \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestination\x12&\n\x1eprotected_artifact_location_id\x18\x13 \x01(\t\x12\x42\n\x0btensorboard\x18\x07 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%aiplatform.googleapis.com/Tensorboard\x12\x1e\n\x11\x65nable_web_access\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17\x65nable_dashboard_access\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12=\n\nexperiment\x18\x11 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!aiplatform.googleapis.com/Context\x12\x41\n\x0e\x65xperiment_run\x18\x12 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!aiplatform.googleapis.com/Context\x12\x37\n\x06models\x18\x14 \x03(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"\x86\x03\n\x0eWorkerPoolSpec\x12\x43\n\x0e\x63ontainer_spec\x18\x06 \x01(\x0b\x32).google.cloud.aiplatform.v1.ContainerSpecH\x00\x12L\n\x13python_package_spec\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.PythonPackageSpecH\x00\x12\x45\n\x0cmachine_spec\x18\x01 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.MachineSpecB\x06\xe0\x41\x01\xe0\x41\x05\x12\x1a\n\rreplica_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12=\n\nnfs_mounts\x18\x04 \x03(\x0b\x32$.google.cloud.aiplatform.v1.NfsMountB\x03\xe0\x41\x01\x12\x37\n\tdisk_spec\x18\x05 \x01(\x0b\x32$.google.cloud.aiplatform.v1.DiskSpecB\x06\n\x04task\"w\n\rContainerSpec\x12\x16\n\timage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x63ommand\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12/\n\x03\x65nv\x18\x04 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVar\"\xaa\x01\n\x11PythonPackageSpec\x12\x1f\n\x12\x65xecutor_image_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cpackage_uris\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rpython_module\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04\x61rgs\x18\x04 \x03(\t\x12/\n\x03\x65nv\x18\x05 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVar\"\xf3\x02\n\nScheduling\x12*\n\x07timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12%\n\x1drestart_job_on_worker_restart\x18\x03 \x01(\x08\x12\x46\n\x08strategy\x18\x04 \x01(\x0e\x32/.google.cloud.aiplatform.v1.Scheduling.StrategyB\x03\xe0\x41\x01\x12\x1c\n\x0f\x64isable_retries\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x39\n\x11max_wait_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"q\n\x08Strategy\x12\x18\n\x14STRATEGY_UNSPECIFIED\x10\x00\x12\x11\n\tON_DEMAND\x10\x01\x1a\x02\x08\x01\x12\x10\n\x08LOW_COST\x10\x02\x1a\x02\x08\x01\x12\x0c\n\x08STANDARD\x10\x03\x12\x08\n\x04SPOT\x10\x04\x12\x0e\n\nFLEX_START\x10\x06\x42\xcc\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0e\x43ustomJobProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -34,6 +35,7 @@ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.rpc.Status", "google/rpc/status.proto"], ["google.cloud.aiplatform.v1.EncryptionSpec", "google/cloud/aiplatform/v1/encryption_spec.proto"], + ["google.cloud.aiplatform.v1.PscInterfaceConfig", "google/cloud/aiplatform/v1/service_networking.proto"], ["google.cloud.aiplatform.v1.GcsDestination", "google/cloud/aiplatform/v1/io.proto"], ["google.cloud.aiplatform.v1.MachineSpec", "google/cloud/aiplatform/v1/machine_resources.proto"], ["google.cloud.aiplatform.v1.EnvVar", "google/cloud/aiplatform/v1/env_var.proto"], diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb index 74c95693bf24..4bfa52ee32ea 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb @@ -8,11 +8,12 @@ require 'google/api/resource_pb' require 'google/cloud/aiplatform/v1/encryption_spec_pb' require 'google/cloud/aiplatform/v1/machine_resources_pb' +require 'google/cloud/aiplatform/v1/service_networking_pb' require 'google/protobuf/timestamp_pb' require 'google/rpc/status_pb' -descriptor_data = "\n4google/cloud/aiplatform/v1/persistent_resource.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xde\x08\n\x12PersistentResource\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0eresource_pools\x18\x04 \x03(\x0b\x32(.google.cloud.aiplatform.v1.ResourcePoolB\x03\xe0\x41\x02\x12H\n\x05state\x18\x05 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PersistentResource.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x06labels\x18\n \x03(\x0b\x32:.google.cloud.aiplatform.v1.PersistentResource.LabelsEntryB\x03\xe0\x41\x01\x12\x37\n\x07network\x18\x0b \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12H\n\x0f\x65ncryption_spec\x18\x0c \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x03\xe0\x41\x01\x12S\n\x15resource_runtime_spec\x18\r \x01(\x0b\x32/.google.cloud.aiplatform.v1.ResourceRuntimeSpecB\x03\xe0\x41\x01\x12J\n\x10resource_runtime\x18\x0e \x01(\x0b\x32+.google.cloud.aiplatform.v1.ResourceRuntimeB\x03\xe0\x41\x03\x12\x1f\n\x12reserved_ip_ranges\x18\x0f \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"s\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\r\n\tREBOOTING\x10\x06\x12\x0c\n\x08UPDATING\x10\x07:\x85\x01\xea\x41\x81\x01\n,aiplatform.googleapis.com/PersistentResource\x12Qprojects/{project}/locations/{location}/persistentResources/{persistent_resource}\"\xdb\x03\n\x0cResourcePool\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x45\n\x0cmachine_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.MachineSpecB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1f\n\rreplica_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12<\n\tdisk_spec\x18\x04 \x01(\x0b\x32$.google.cloud.aiplatform.v1.DiskSpecB\x03\xe0\x41\x01\x12\x1f\n\x12used_replica_count\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12W\n\x10\x61utoscaling_spec\x18\x07 \x01(\x0b\x32\x38.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecB\x03\xe0\x41\x01\x1a\x87\x01\n\x0f\x41utoscalingSpec\x12#\n\x11min_replica_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11max_replica_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x14\n\x12_min_replica_countB\x14\n\x12_max_replica_countB\x10\n\x0e_replica_count\"\xa4\x01\n\x13ResourceRuntimeSpec\x12Q\n\x14service_account_spec\x18\x02 \x01(\x0b\x32..google.cloud.aiplatform.v1.ServiceAccountSpecB\x03\xe0\x41\x01\x12:\n\x08ray_spec\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.RaySpecB\x03\xe0\x41\x01\"\xf3\x02\n\x07RaySpec\x12\x16\n\timage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12^\n\x14resource_pool_images\x18\x06 \x03(\x0b\x32;.google.cloud.aiplatform.v1.RaySpec.ResourcePoolImagesEntryB\x03\xe0\x41\x01\x12\'\n\x1ahead_node_resource_pool_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12G\n\x0fray_metric_spec\x18\x08 \x01(\x0b\x32).google.cloud.aiplatform.v1.RayMetricSpecB\x03\xe0\x41\x01\x12\x43\n\rray_logs_spec\x18\n \x01(\x0b\x32\'.google.cloud.aiplatform.v1.RayLogsSpecB\x03\xe0\x41\x01\x1a\x39\n\x17ResourcePoolImagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x01\n\x0fResourceRuntime\x12U\n\x0b\x61\x63\x63\x65ss_uris\x18\x01 \x03(\x0b\x32;.google.cloud.aiplatform.v1.ResourceRuntime.AccessUrisEntryB\x03\xe0\x41\x03\x1a\x31\n\x0f\x41\x63\x63\x65ssUrisEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x12ServiceAccountSpec\x12*\n\x1d\x65nable_custom_service_account\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\"&\n\rRayMetricSpec\x12\x15\n\x08\x64isabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"$\n\x0bRayLogsSpec\x12\x15\n\x08\x64isabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\xd5\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x17PersistentResourceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n4google/cloud/aiplatform/v1/persistent_resource.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xb1\t\n\x12PersistentResource\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0eresource_pools\x18\x04 \x03(\x0b\x32(.google.cloud.aiplatform.v1.ResourcePoolB\x03\xe0\x41\x02\x12H\n\x05state\x18\x05 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PersistentResource.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x06labels\x18\n \x03(\x0b\x32:.google.cloud.aiplatform.v1.PersistentResource.LabelsEntryB\x03\xe0\x41\x01\x12\x37\n\x07network\x18\x0b \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12Q\n\x14psc_interface_config\x18\x11 \x01(\x0b\x32..google.cloud.aiplatform.v1.PscInterfaceConfigB\x03\xe0\x41\x01\x12H\n\x0f\x65ncryption_spec\x18\x0c \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x03\xe0\x41\x01\x12S\n\x15resource_runtime_spec\x18\r \x01(\x0b\x32/.google.cloud.aiplatform.v1.ResourceRuntimeSpecB\x03\xe0\x41\x01\x12J\n\x10resource_runtime\x18\x0e \x01(\x0b\x32+.google.cloud.aiplatform.v1.ResourceRuntimeB\x03\xe0\x41\x03\x12\x1f\n\x12reserved_ip_ranges\x18\x0f \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"s\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\r\n\tREBOOTING\x10\x06\x12\x0c\n\x08UPDATING\x10\x07:\x85\x01\xea\x41\x81\x01\n,aiplatform.googleapis.com/PersistentResource\x12Qprojects/{project}/locations/{location}/persistentResources/{persistent_resource}\"\xdb\x03\n\x0cResourcePool\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x45\n\x0cmachine_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.MachineSpecB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1f\n\rreplica_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12<\n\tdisk_spec\x18\x04 \x01(\x0b\x32$.google.cloud.aiplatform.v1.DiskSpecB\x03\xe0\x41\x01\x12\x1f\n\x12used_replica_count\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12W\n\x10\x61utoscaling_spec\x18\x07 \x01(\x0b\x32\x38.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecB\x03\xe0\x41\x01\x1a\x87\x01\n\x0f\x41utoscalingSpec\x12#\n\x11min_replica_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11max_replica_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x14\n\x12_min_replica_countB\x14\n\x12_max_replica_countB\x10\n\x0e_replica_count\"\xa4\x01\n\x13ResourceRuntimeSpec\x12Q\n\x14service_account_spec\x18\x02 \x01(\x0b\x32..google.cloud.aiplatform.v1.ServiceAccountSpecB\x03\xe0\x41\x01\x12:\n\x08ray_spec\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.RaySpecB\x03\xe0\x41\x01\"\xf3\x02\n\x07RaySpec\x12\x16\n\timage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12^\n\x14resource_pool_images\x18\x06 \x03(\x0b\x32;.google.cloud.aiplatform.v1.RaySpec.ResourcePoolImagesEntryB\x03\xe0\x41\x01\x12\'\n\x1ahead_node_resource_pool_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12G\n\x0fray_metric_spec\x18\x08 \x01(\x0b\x32).google.cloud.aiplatform.v1.RayMetricSpecB\x03\xe0\x41\x01\x12\x43\n\rray_logs_spec\x18\n \x01(\x0b\x32\'.google.cloud.aiplatform.v1.RayLogsSpecB\x03\xe0\x41\x01\x1a\x39\n\x17ResourcePoolImagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x01\n\x0fResourceRuntime\x12U\n\x0b\x61\x63\x63\x65ss_uris\x18\x01 \x03(\x0b\x32;.google.cloud.aiplatform.v1.ResourceRuntime.AccessUrisEntryB\x03\xe0\x41\x03\x1a\x31\n\x0f\x41\x63\x63\x65ssUrisEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x12ServiceAccountSpec\x12*\n\x1d\x65nable_custom_service_account\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\"&\n\rRayMetricSpec\x12\x15\n\x08\x64isabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"$\n\x0bRayLogsSpec\x12\x15\n\x08\x64isabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\xd5\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x17PersistentResourceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -29,6 +30,7 @@ imports = [ ["google.rpc.Status", "google/rpc/status.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.aiplatform.v1.PscInterfaceConfig", "google/cloud/aiplatform/v1/service_networking.proto"], ["google.cloud.aiplatform.v1.EncryptionSpec", "google/cloud/aiplatform/v1/encryption_spec.proto"], ["google.cloud.aiplatform.v1.MachineSpec", "google/cloud/aiplatform/v1/machine_resources.proto"], ] diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb index 1b51d480f18e..df760dcdbe1e 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb @@ -12,13 +12,14 @@ require 'google/cloud/aiplatform/v1/execution_pb' require 'google/cloud/aiplatform/v1/pipeline_failure_policy_pb' require 'google/cloud/aiplatform/v1/pipeline_state_pb' +require 'google/cloud/aiplatform/v1/service_networking_pb' require 'google/cloud/aiplatform/v1/value_pb' require 'google/protobuf/struct_pb' require 'google/protobuf/timestamp_pb' require 'google/rpc/status_pb' -descriptor_data = "\n-google/cloud/aiplatform/v1/pipeline_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/aiplatform/v1/artifact.proto\x1a(google/cloud/aiplatform/v1/context.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a*google/cloud/aiplatform/v1/execution.proto\x1a\x38google/cloud/aiplatform/v1/pipeline_failure_policy.proto\x1a/google/cloud/aiplatform/v1/pipeline_state.proto\x1a&google/cloud/aiplatform/v1/value.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xf4\x0e\n\x0bPipelineJob\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12.\n\rpipeline_spec\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\x12=\n\x05state\x18\x08 \x01(\x0e\x32).google.cloud.aiplatform.v1.PipelineStateB\x03\xe0\x41\x03\x12\x46\n\njob_detail\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.PipelineJobDetailB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\n \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x0b \x03(\x0b\x32\x33.google.cloud.aiplatform.v1.PipelineJob.LabelsEntry\x12M\n\x0eruntime_config\x18\x0c \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig\x12\x43\n\x0f\x65ncryption_spec\x18\x10 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12\x17\n\x0fservice_account\x18\x11 \x01(\t\x12\x34\n\x07network\x18\x12 \x01(\tB#\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1a\n\x12reserved_ip_ranges\x18\x19 \x03(\t\x12\x14\n\x0ctemplate_uri\x18\x13 \x01(\t\x12T\n\x11template_metadata\x18\x14 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.PipelineTemplateMetadataB\x03\xe0\x41\x03\x12\x1a\n\rschedule_name\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15preflight_validations\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01\x1a\xf8\x05\n\rRuntimeConfig\x12]\n\nparameters\x18\x01 \x03(\x0b\x32\x45.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.ParametersEntryB\x02\x18\x01\x12!\n\x14gcs_output_directory\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\x10parameter_values\x18\x03 \x03(\x0b\x32J.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.ParameterValuesEntry\x12I\n\x0e\x66\x61ilure_policy\x18\x04 \x01(\x0e\x32\x31.google.cloud.aiplatform.v1.PipelineFailurePolicy\x12\x62\n\x0finput_artifacts\x18\x05 \x03(\x0b\x32I.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifactsEntry\x1a.\n\rInputArtifact\x12\x15\n\x0b\x61rtifact_id\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\x1aT\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32!.google.cloud.aiplatform.v1.Value:\x02\x38\x01\x1aN\n\x14ParameterValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1az\n\x13InputArtifactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12R\n\x05value\x18\x02 \x01(\x0b\x32\x43.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifact:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n%aiplatform.googleapis.com/PipelineJob\x12\x43projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}\"+\n\x18PipelineTemplateMetadata\x12\x0f\n\x07version\x18\x03 \x01(\t\"\xea\x01\n\x11PipelineJobDetail\x12\x42\n\x10pipeline_context\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContextB\x03\xe0\x41\x03\x12\x46\n\x14pipeline_run_context\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContextB\x03\xe0\x41\x03\x12I\n\x0ctask_details\x18\x03 \x03(\x0b\x32..google.cloud.aiplatform.v1.PipelineTaskDetailB\x03\xe0\x41\x03\"\x9d\x0b\n\x12PipelineTaskDetail\x12\x14\n\x07task_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eparent_task_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\ttask_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0f\x65xecutor_detail\x18\x06 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.PipelineTaskExecutorDetailB\x03\xe0\x41\x03\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PipelineTaskDetail.StateB\x03\xe0\x41\x03\x12=\n\texecution\x18\x08 \x01(\x0b\x32%.google.cloud.aiplatform.v1.ExecutionB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x64\n\x14pipeline_task_status\x18\r \x03(\x0b\x32\x41.google.cloud.aiplatform.v1.PipelineTaskDetail.PipelineTaskStatusB\x03\xe0\x41\x03\x12O\n\x06inputs\x18\n \x03(\x0b\x32:.google.cloud.aiplatform.v1.PipelineTaskDetail.InputsEntryB\x03\xe0\x41\x03\x12Q\n\x07outputs\x18\x0b \x03(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.OutputsEntryB\x03\xe0\x41\x03\x1a\xbc\x01\n\x12PipelineTaskStatus\x12\x34\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PipelineTaskDetail.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1aL\n\x0c\x41rtifactList\x12<\n\tartifacts\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.ArtifactB\x03\xe0\x41\x03\x1aj\n\x0bInputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList:\x02\x38\x01\x1ak\n\x0cOutputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList:\x02\x38\x01\"\xa6\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x12\n\x0e\x43\x41NCEL_PENDING\x10\x04\x12\x0e\n\nCANCELLING\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07\x12\x0b\n\x07SKIPPED\x10\x08\x12\x11\n\rNOT_TRIGGERED\x10\t\"\xcb\x04\n\x1aPipelineTaskExecutorDetail\x12g\n\x10\x63ontainer_detail\x18\x01 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.ContainerDetailB\x03\xe0\x41\x03H\x00\x12h\n\x11\x63ustom_job_detail\x18\x02 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetailB\x03\xe0\x41\x03H\x00\x1a\xe7\x01\n\x0f\x43ontainerDetail\x12=\n\x08main_job\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12J\n\x15pre_caching_check_job\x18\x02 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12\x1d\n\x10\x66\x61iled_main_jobs\x18\x03 \x03(\tB\x03\xe0\x41\x03\x12*\n\x1d\x66\x61iled_pre_caching_check_jobs\x18\x04 \x03(\tB\x03\xe0\x41\x03\x1a\x65\n\x0f\x43ustomJobDetail\x12\x38\n\x03job\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12\x18\n\x0b\x66\x61iled_jobs\x18\x03 \x03(\tB\x03\xe0\x41\x03\x42\t\n\x07\x64\x65tailsB\x97\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x08PipelineP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" +descriptor_data = "\n-google/cloud/aiplatform/v1/pipeline_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/aiplatform/v1/artifact.proto\x1a(google/cloud/aiplatform/v1/context.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a*google/cloud/aiplatform/v1/execution.proto\x1a\x38google/cloud/aiplatform/v1/pipeline_failure_policy.proto\x1a/google/cloud/aiplatform/v1/pipeline_state.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a&google/cloud/aiplatform/v1/value.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xc7\x0f\n\x0bPipelineJob\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12.\n\rpipeline_spec\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\x12=\n\x05state\x18\x08 \x01(\x0e\x32).google.cloud.aiplatform.v1.PipelineStateB\x03\xe0\x41\x03\x12\x46\n\njob_detail\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.PipelineJobDetailB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\n \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x0b \x03(\x0b\x32\x33.google.cloud.aiplatform.v1.PipelineJob.LabelsEntry\x12M\n\x0eruntime_config\x18\x0c \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig\x12\x43\n\x0f\x65ncryption_spec\x18\x10 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12\x17\n\x0fservice_account\x18\x11 \x01(\t\x12\x34\n\x07network\x18\x12 \x01(\tB#\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1a\n\x12reserved_ip_ranges\x18\x19 \x03(\t\x12Q\n\x14psc_interface_config\x18\x1f \x01(\x0b\x32..google.cloud.aiplatform.v1.PscInterfaceConfigB\x03\xe0\x41\x01\x12\x14\n\x0ctemplate_uri\x18\x13 \x01(\t\x12T\n\x11template_metadata\x18\x14 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.PipelineTemplateMetadataB\x03\xe0\x41\x03\x12\x1a\n\rschedule_name\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15preflight_validations\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01\x1a\xf8\x05\n\rRuntimeConfig\x12]\n\nparameters\x18\x01 \x03(\x0b\x32\x45.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.ParametersEntryB\x02\x18\x01\x12!\n\x14gcs_output_directory\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\x10parameter_values\x18\x03 \x03(\x0b\x32J.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.ParameterValuesEntry\x12I\n\x0e\x66\x61ilure_policy\x18\x04 \x01(\x0e\x32\x31.google.cloud.aiplatform.v1.PipelineFailurePolicy\x12\x62\n\x0finput_artifacts\x18\x05 \x03(\x0b\x32I.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifactsEntry\x1a.\n\rInputArtifact\x12\x15\n\x0b\x61rtifact_id\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\x1aT\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32!.google.cloud.aiplatform.v1.Value:\x02\x38\x01\x1aN\n\x14ParameterValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1az\n\x13InputArtifactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12R\n\x05value\x18\x02 \x01(\x0b\x32\x43.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifact:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n%aiplatform.googleapis.com/PipelineJob\x12\x43projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}\"+\n\x18PipelineTemplateMetadata\x12\x0f\n\x07version\x18\x03 \x01(\t\"\xea\x01\n\x11PipelineJobDetail\x12\x42\n\x10pipeline_context\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContextB\x03\xe0\x41\x03\x12\x46\n\x14pipeline_run_context\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContextB\x03\xe0\x41\x03\x12I\n\x0ctask_details\x18\x03 \x03(\x0b\x32..google.cloud.aiplatform.v1.PipelineTaskDetailB\x03\xe0\x41\x03\"\x9d\x0b\n\x12PipelineTaskDetail\x12\x14\n\x07task_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eparent_task_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\ttask_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0f\x65xecutor_detail\x18\x06 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.PipelineTaskExecutorDetailB\x03\xe0\x41\x03\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PipelineTaskDetail.StateB\x03\xe0\x41\x03\x12=\n\texecution\x18\x08 \x01(\x0b\x32%.google.cloud.aiplatform.v1.ExecutionB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x64\n\x14pipeline_task_status\x18\r \x03(\x0b\x32\x41.google.cloud.aiplatform.v1.PipelineTaskDetail.PipelineTaskStatusB\x03\xe0\x41\x03\x12O\n\x06inputs\x18\n \x03(\x0b\x32:.google.cloud.aiplatform.v1.PipelineTaskDetail.InputsEntryB\x03\xe0\x41\x03\x12Q\n\x07outputs\x18\x0b \x03(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.OutputsEntryB\x03\xe0\x41\x03\x1a\xbc\x01\n\x12PipelineTaskStatus\x12\x34\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PipelineTaskDetail.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1aL\n\x0c\x41rtifactList\x12<\n\tartifacts\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.ArtifactB\x03\xe0\x41\x03\x1aj\n\x0bInputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList:\x02\x38\x01\x1ak\n\x0cOutputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList:\x02\x38\x01\"\xa6\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x12\n\x0e\x43\x41NCEL_PENDING\x10\x04\x12\x0e\n\nCANCELLING\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07\x12\x0b\n\x07SKIPPED\x10\x08\x12\x11\n\rNOT_TRIGGERED\x10\t\"\xcb\x04\n\x1aPipelineTaskExecutorDetail\x12g\n\x10\x63ontainer_detail\x18\x01 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.ContainerDetailB\x03\xe0\x41\x03H\x00\x12h\n\x11\x63ustom_job_detail\x18\x02 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetailB\x03\xe0\x41\x03H\x00\x1a\xe7\x01\n\x0f\x43ontainerDetail\x12=\n\x08main_job\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12J\n\x15pre_caching_check_job\x18\x02 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12\x1d\n\x10\x66\x61iled_main_jobs\x18\x03 \x03(\tB\x03\xe0\x41\x03\x12*\n\x1d\x66\x61iled_pre_caching_check_jobs\x18\x04 \x03(\tB\x03\xe0\x41\x03\x1a\x65\n\x0f\x43ustomJobDetail\x12\x38\n\x03job\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12\x18\n\x0b\x66\x61iled_jobs\x18\x03 \x03(\tB\x03\xe0\x41\x03\x42\t\n\x07\x64\x65tailsB\x97\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x08PipelineP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -37,6 +38,7 @@ ["google.protobuf.Struct", "google/protobuf/struct.proto"], ["google.rpc.Status", "google/rpc/status.proto"], ["google.cloud.aiplatform.v1.EncryptionSpec", "google/cloud/aiplatform/v1/encryption_spec.proto"], + ["google.cloud.aiplatform.v1.PscInterfaceConfig", "google/cloud/aiplatform/v1/service_networking.proto"], ["google.cloud.aiplatform.v1.Value", "google/cloud/aiplatform/v1/value.proto"], ["google.cloud.aiplatform.v1.Context", "google/cloud/aiplatform/v1/context.proto"], ["google.cloud.aiplatform.v1.Execution", "google/cloud/aiplatform/v1/execution.proto"], diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/service_networking_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/service_networking_pb.rb index af6abc50654a..aa7a0d79745c 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/service_networking_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/service_networking_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n3google/cloud/aiplatform/v1/service_networking.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"D\n\x13PSCAutomationConfig\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07network\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x86\x01\n\x1bPrivateServiceConnectConfig\x12+\n\x1e\x65nable_private_service_connect\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x19\n\x11project_allowlist\x18\x02 \x03(\t\x12\x1f\n\x12service_attachment\x18\x05 \x01(\tB\x03\xe0\x41\x03\"S\n\x15PscAutomatedEndpoints\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rmatch_address\x18\x03 \x01(\tB\xcd\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x16ServiceNetworkingProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41v\n(compute.googleapis.com/NetworkAttachment\x12Jprojects/{project}/regions/{region}/networkAttachments/{networkattachment}b\x06proto3" +descriptor_data = "\n3google/cloud/aiplatform/v1/service_networking.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"D\n\x13PSCAutomationConfig\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07network\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x86\x01\n\x1bPrivateServiceConnectConfig\x12+\n\x1e\x65nable_private_service_connect\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x19\n\x11project_allowlist\x18\x02 \x03(\t\x12\x1f\n\x12service_attachment\x18\x05 \x01(\tB\x03\xe0\x41\x03\"S\n\x15PscAutomatedEndpoints\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rmatch_address\x18\x03 \x01(\t\"b\n\x12PscInterfaceConfig\x12L\n\x12network_attachment\x18\x01 \x01(\tB0\xe0\x41\x01\xfa\x41*\n(compute.googleapis.com/NetworkAttachmentB\xcd\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x16ServiceNetworkingProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41v\n(compute.googleapis.com/NetworkAttachment\x12Jprojects/{project}/regions/{region}/networkAttachments/{networkattachment}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -41,6 +41,7 @@ module V1 PSCAutomationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PSCAutomationConfig").msgclass PrivateServiceConnectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PrivateServiceConnectConfig").msgclass PscAutomatedEndpoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PscAutomatedEndpoints").msgclass + PscInterfaceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PscInterfaceConfig").msgclass end end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb index 5e9eb0b5398d..212ced89c81e 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb @@ -11,7 +11,7 @@ require 'google/type/latlng_pb' -descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\x81\x04\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x1a\x0e\n\x0cGoogleSearch\x1a\x0f\n\rCodeExecution\"\xba\x01\n\x13\x46unctionDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"U\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"\xfa\x01\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmax_results\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12R\n\x10\x64\x61ta_store_specs\x18\x05 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec\x1a\x38\n\rDataStoreSpec\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"\x15\n\x13\x45nterpriseWebSearch\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\xc3\x04\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x12@\n\x0burl_context\x18\x08 \x01(\x0b\x32&.google.cloud.aiplatform.v1.UrlContextB\x03\xe0\x41\x01\x1a\x0e\n\x0cGoogleSearch\x1a\x0f\n\rCodeExecution\"\x0c\n\nUrlContext\"\xb2\x02\n\x13\x46unctionDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12;\n\x16parameters_json_schema\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x14response_json_schema\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"U\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"\xfa\x01\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmax_results\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12R\n\x10\x64\x61ta_store_specs\x18\x05 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec\x1a\x38\n\rDataStoreSpec\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"\x15\n\x13\x45nterpriseWebSearch\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -27,7 +27,7 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.cloud.aiplatform.v1.Schema", "google/cloud/aiplatform/v1/openapi.proto"], - ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["google.protobuf.Value", "google/protobuf/struct.proto"], ["google.type.LatLng", "google/type/latlng.proto"], ] imports.each do |type_name, expected_filename| @@ -47,6 +47,7 @@ module V1 Tool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tool").msgclass Tool::GoogleSearch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tool.GoogleSearch").msgclass Tool::CodeExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tool.CodeExecution").msgclass + UrlContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UrlContext").msgclass FunctionDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionDeclaration").msgclass FunctionCall = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionCall").msgclass FunctionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionResponse").msgclass diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb index 44a87022bfac..4f2e04c1762b 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb @@ -7,11 +7,12 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/cloud/aiplatform/v1/api_auth_pb' +require 'google/cloud/aiplatform/v1/encryption_spec_pb' require 'google/cloud/aiplatform/v1/io_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n0google/cloud/aiplatform/v1/vertex_rag_data.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/aiplatform/v1/api_auth.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x02\n\x17RagEmbeddingModelConfig\x12r\n\x1avertex_prediction_endpoint\x18\x01 \x01(\x0b\x32L.google.cloud.aiplatform.v1.RagEmbeddingModelConfig.VertexPredictionEndpointH\x00\x1a\xaf\x01\n\x18VertexPredictionEndpoint\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x36\n\x05model\x18\x02 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x0e\n\x0cmodel_config\"\x94\x06\n\x11RagVectorDbConfig\x12T\n\x0erag_managed_db\x18\x01 \x01(\x0b\x32:.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDbH\x00\x12J\n\x08pinecone\x18\x03 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagVectorDbConfig.PineconeH\x00\x12`\n\x14vertex_vector_search\x18\x06 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearchH\x00\x12\x35\n\x08\x61pi_auth\x18\x05 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ApiAuth\x12_\n\x1arag_embedding_model_config\x18\x07 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.RagEmbeddingModelConfigB\x06\xe0\x41\x01\xe0\x41\x05\x1a\xf8\x01\n\x0cRagManagedDb\x12M\n\x03knn\x18\x01 \x01(\x0b\x32>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.KNNH\x00\x12M\n\x03\x61nn\x18\x02 \x01(\x0b\x32>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.ANNH\x00\x1a\x05\n\x03KNN\x1a-\n\x03\x41NN\x12\x12\n\ntree_depth\x18\x01 \x01(\x05\x12\x12\n\nleaf_count\x18\x02 \x01(\x05\x42\x14\n\x12retrieval_strategy\x1a\x1e\n\x08Pinecone\x12\x12\n\nindex_name\x18\x01 \x01(\t\x1a;\n\x12VertexVectorSearch\x12\x16\n\x0eindex_endpoint\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\tB\x0b\n\tvector_db\"\xa0\x01\n\nFileStatus\x12@\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.aiplatform.v1.FileStatus.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x65rror_status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\t\n\x05\x45RROR\x10\x02\".\n\x14VertexAiSearchConfig\x12\x16\n\x0eserving_config\x18\x01 \x01(\t\"\xab\x01\n\x0c\x43orpusStatus\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.cloud.aiplatform.v1.CorpusStatus.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x65rror_status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"<\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0f\n\x0bINITIALIZED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"\xca\x04\n\tRagCorpus\x12Q\n\x10vector_db_config\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.RagVectorDbConfigB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12[\n\x17vertex_ai_search_config\x18\n \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.VertexAiSearchConfigB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\rcorpus_status\x18\x08 \x01(\x0b\x32(.google.cloud.aiplatform.v1.CorpusStatusB\x03\xe0\x41\x03:\x80\x01\xea\x41}\n#aiplatform.googleapis.com/RagCorpus\x12?projects/{project}/locations/{location}/ragCorpora/{rag_corpus}*\nragCorpora2\tragCorpusB\x10\n\x0e\x62\x61\x63kend_config\"\xdc\x06\n\x07RagFile\x12@\n\ngcs_source\x18\x08 \x01(\x0b\x32%.google.cloud.aiplatform.v1.GcsSourceB\x03\xe0\x41\x03H\x00\x12Q\n\x13google_drive_source\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.GoogleDriveSourceB\x03\xe0\x41\x03H\x00\x12S\n\x14\x64irect_upload_source\x18\n \x01(\x0b\x32..google.cloud.aiplatform.v1.DirectUploadSourceB\x03\xe0\x41\x03H\x00\x12?\n\x0cslack_source\x18\x0b \x01(\x0b\x32\'.google.cloud.aiplatform.v1.SlackSourceH\x00\x12=\n\x0bjira_source\x18\x0c \x01(\x0b\x32&.google.cloud.aiplatform.v1.JiraSourceH\x00\x12L\n\x13share_point_sources\x18\x0e \x01(\x0b\x32-.google.cloud.aiplatform.v1.SharePointSourcesH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x0b\x66ile_status\x18\r \x01(\x0b\x32&.google.cloud.aiplatform.v1.FileStatusB\x03\xe0\x41\x03:\x8f\x01\xea\x41\x8b\x01\n!aiplatform.googleapis.com/RagFile\x12Sprojects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}*\x08ragFiles2\x07ragFileB\x11\n\x0frag_file_source\"\xa0\x01\n\x08RagChunk\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x45\n\tpage_span\x18\x02 \x01(\x0b\x32-.google.cloud.aiplatform.v1.RagChunk.PageSpanH\x00\x88\x01\x01\x1a\x31\n\x08PageSpan\x12\x12\n\nfirst_page\x18\x01 \x01(\x05\x12\x11\n\tlast_page\x18\x02 \x01(\x05\x42\x0c\n\n_page_span\"\xd4\x01\n\x15RagFileChunkingConfig\x12\x66\n\x15\x66ixed_length_chunking\x18\x03 \x01(\x0b\x32\x45.google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunkingH\x00\x1a@\n\x13\x46ixedLengthChunking\x12\x12\n\nchunk_size\x18\x01 \x01(\x05\x12\x15\n\rchunk_overlap\x18\x02 \x01(\x05\x42\x11\n\x0f\x63hunking_config\"r\n\x1bRagFileTransformationConfig\x12S\n\x18rag_file_chunking_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.RagFileChunkingConfig\"\xfe\x02\n\x14RagFileParsingConfig\x12V\n\rlayout_parser\x18\x04 \x01(\x0b\x32=.google.cloud.aiplatform.v1.RagFileParsingConfig.LayoutParserH\x00\x12P\n\nllm_parser\x18\x05 \x01(\x0b\x32:.google.cloud.aiplatform.v1.RagFileParsingConfig.LlmParserH\x00\x1aL\n\x0cLayoutParser\x12\x16\n\x0eprocessor_name\x18\x01 \x01(\t\x12$\n\x1cmax_parsing_requests_per_min\x18\x02 \x01(\x05\x1a\x64\n\tLlmParser\x12\x12\n\nmodel_name\x18\x01 \x01(\t\x12$\n\x1cmax_parsing_requests_per_min\x18\x02 \x01(\x05\x12\x1d\n\x15\x63ustom_parsing_prompt\x18\x03 \x01(\tB\x08\n\x06parser\"v\n\x13UploadRagFileConfig\x12_\n\x1erag_file_transformation_config\x18\x03 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.RagFileTransformationConfig\"\x87\x08\n\x14ImportRagFilesConfig\x12;\n\ngcs_source\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.GcsSourceH\x00\x12L\n\x13google_drive_source\x18\x03 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GoogleDriveSourceH\x00\x12?\n\x0cslack_source\x18\x06 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.SlackSourceH\x00\x12=\n\x0bjira_source\x18\x07 \x01(\x0b\x32&.google.cloud.aiplatform.v1.JiraSourceH\x00\x12L\n\x13share_point_sources\x18\r \x01(\x0b\x32-.google.cloud.aiplatform.v1.SharePointSourcesH\x00\x12R\n\x18partial_failure_gcs_sink\x18\x0b \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestinationB\x02\x18\x01H\x01\x12\\\n\x1dpartial_failure_bigquery_sink\x18\x0c \x01(\x0b\x32/.google.cloud.aiplatform.v1.BigQueryDestinationB\x02\x18\x01H\x01\x12L\n\x16import_result_gcs_sink\x18\x0e \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestinationH\x02\x12V\n\x1bimport_result_bigquery_sink\x18\x0f \x01(\x0b\x32/.google.cloud.aiplatform.v1.BigQueryDestinationH\x02\x12_\n\x1erag_file_transformation_config\x18\x10 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.RagFileTransformationConfig\x12V\n\x17rag_file_parsing_config\x18\x08 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.RagFileParsingConfigB\x03\xe0\x41\x01\x12+\n\x1emax_embedding_requests_per_min\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x11rebuild_ann_index\x18\x13 \x01(\x08\x42\x0f\n\rimport_sourceB\x16\n\x14partial_failure_sinkB\x14\n\x12import_result_sinkB\xd0\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x12VertexRagDataProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n0google/cloud/aiplatform/v1/vertex_rag_data.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/aiplatform/v1/api_auth.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x02\n\x17RagEmbeddingModelConfig\x12r\n\x1avertex_prediction_endpoint\x18\x01 \x01(\x0b\x32L.google.cloud.aiplatform.v1.RagEmbeddingModelConfig.VertexPredictionEndpointH\x00\x1a\xaf\x01\n\x18VertexPredictionEndpoint\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x36\n\x05model\x18\x02 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x0e\n\x0cmodel_config\"\x94\x06\n\x11RagVectorDbConfig\x12T\n\x0erag_managed_db\x18\x01 \x01(\x0b\x32:.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDbH\x00\x12J\n\x08pinecone\x18\x03 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagVectorDbConfig.PineconeH\x00\x12`\n\x14vertex_vector_search\x18\x06 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearchH\x00\x12\x35\n\x08\x61pi_auth\x18\x05 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ApiAuth\x12_\n\x1arag_embedding_model_config\x18\x07 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.RagEmbeddingModelConfigB\x06\xe0\x41\x01\xe0\x41\x05\x1a\xf8\x01\n\x0cRagManagedDb\x12M\n\x03knn\x18\x01 \x01(\x0b\x32>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.KNNH\x00\x12M\n\x03\x61nn\x18\x02 \x01(\x0b\x32>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.ANNH\x00\x1a\x05\n\x03KNN\x1a-\n\x03\x41NN\x12\x12\n\ntree_depth\x18\x01 \x01(\x05\x12\x12\n\nleaf_count\x18\x02 \x01(\x05\x42\x14\n\x12retrieval_strategy\x1a\x1e\n\x08Pinecone\x12\x12\n\nindex_name\x18\x01 \x01(\t\x1a;\n\x12VertexVectorSearch\x12\x16\n\x0eindex_endpoint\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\tB\x0b\n\tvector_db\"\xa0\x01\n\nFileStatus\x12@\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.aiplatform.v1.FileStatus.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x65rror_status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\t\n\x05\x45RROR\x10\x02\".\n\x14VertexAiSearchConfig\x12\x16\n\x0eserving_config\x18\x01 \x01(\t\"\xab\x01\n\x0c\x43orpusStatus\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.cloud.aiplatform.v1.CorpusStatus.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x65rror_status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"<\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0f\n\x0bINITIALIZED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"\x97\x05\n\tRagCorpus\x12Q\n\x10vector_db_config\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.RagVectorDbConfigB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12[\n\x17vertex_ai_search_config\x18\n \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.VertexAiSearchConfigB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\rcorpus_status\x18\x08 \x01(\x0b\x32(.google.cloud.aiplatform.v1.CorpusStatusB\x03\xe0\x41\x03\x12K\n\x0f\x65ncryption_spec\x18\x0c \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x06\xe0\x41\x05\xe0\x41\x01:\x80\x01\xea\x41}\n#aiplatform.googleapis.com/RagCorpus\x12?projects/{project}/locations/{location}/ragCorpora/{rag_corpus}*\nragCorpora2\tragCorpusB\x10\n\x0e\x62\x61\x63kend_config\"\xdc\x06\n\x07RagFile\x12@\n\ngcs_source\x18\x08 \x01(\x0b\x32%.google.cloud.aiplatform.v1.GcsSourceB\x03\xe0\x41\x03H\x00\x12Q\n\x13google_drive_source\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.GoogleDriveSourceB\x03\xe0\x41\x03H\x00\x12S\n\x14\x64irect_upload_source\x18\n \x01(\x0b\x32..google.cloud.aiplatform.v1.DirectUploadSourceB\x03\xe0\x41\x03H\x00\x12?\n\x0cslack_source\x18\x0b \x01(\x0b\x32\'.google.cloud.aiplatform.v1.SlackSourceH\x00\x12=\n\x0bjira_source\x18\x0c \x01(\x0b\x32&.google.cloud.aiplatform.v1.JiraSourceH\x00\x12L\n\x13share_point_sources\x18\x0e \x01(\x0b\x32-.google.cloud.aiplatform.v1.SharePointSourcesH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x0b\x66ile_status\x18\r \x01(\x0b\x32&.google.cloud.aiplatform.v1.FileStatusB\x03\xe0\x41\x03:\x8f\x01\xea\x41\x8b\x01\n!aiplatform.googleapis.com/RagFile\x12Sprojects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}*\x08ragFiles2\x07ragFileB\x11\n\x0frag_file_source\"\xa0\x01\n\x08RagChunk\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x45\n\tpage_span\x18\x02 \x01(\x0b\x32-.google.cloud.aiplatform.v1.RagChunk.PageSpanH\x00\x88\x01\x01\x1a\x31\n\x08PageSpan\x12\x12\n\nfirst_page\x18\x01 \x01(\x05\x12\x11\n\tlast_page\x18\x02 \x01(\x05\x42\x0c\n\n_page_span\"\xd4\x01\n\x15RagFileChunkingConfig\x12\x66\n\x15\x66ixed_length_chunking\x18\x03 \x01(\x0b\x32\x45.google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunkingH\x00\x1a@\n\x13\x46ixedLengthChunking\x12\x12\n\nchunk_size\x18\x01 \x01(\x05\x12\x15\n\rchunk_overlap\x18\x02 \x01(\x05\x42\x11\n\x0f\x63hunking_config\"r\n\x1bRagFileTransformationConfig\x12S\n\x18rag_file_chunking_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.RagFileChunkingConfig\"\xfe\x02\n\x14RagFileParsingConfig\x12V\n\rlayout_parser\x18\x04 \x01(\x0b\x32=.google.cloud.aiplatform.v1.RagFileParsingConfig.LayoutParserH\x00\x12P\n\nllm_parser\x18\x05 \x01(\x0b\x32:.google.cloud.aiplatform.v1.RagFileParsingConfig.LlmParserH\x00\x1aL\n\x0cLayoutParser\x12\x16\n\x0eprocessor_name\x18\x01 \x01(\t\x12$\n\x1cmax_parsing_requests_per_min\x18\x02 \x01(\x05\x1a\x64\n\tLlmParser\x12\x12\n\nmodel_name\x18\x01 \x01(\t\x12$\n\x1cmax_parsing_requests_per_min\x18\x02 \x01(\x05\x12\x1d\n\x15\x63ustom_parsing_prompt\x18\x03 \x01(\tB\x08\n\x06parser\"v\n\x13UploadRagFileConfig\x12_\n\x1erag_file_transformation_config\x18\x03 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.RagFileTransformationConfig\"\x87\x08\n\x14ImportRagFilesConfig\x12;\n\ngcs_source\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.GcsSourceH\x00\x12L\n\x13google_drive_source\x18\x03 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GoogleDriveSourceH\x00\x12?\n\x0cslack_source\x18\x06 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.SlackSourceH\x00\x12=\n\x0bjira_source\x18\x07 \x01(\x0b\x32&.google.cloud.aiplatform.v1.JiraSourceH\x00\x12L\n\x13share_point_sources\x18\r \x01(\x0b\x32-.google.cloud.aiplatform.v1.SharePointSourcesH\x00\x12R\n\x18partial_failure_gcs_sink\x18\x0b \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestinationB\x02\x18\x01H\x01\x12\\\n\x1dpartial_failure_bigquery_sink\x18\x0c \x01(\x0b\x32/.google.cloud.aiplatform.v1.BigQueryDestinationB\x02\x18\x01H\x01\x12L\n\x16import_result_gcs_sink\x18\x0e \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestinationH\x02\x12V\n\x1bimport_result_bigquery_sink\x18\x0f \x01(\x0b\x32/.google.cloud.aiplatform.v1.BigQueryDestinationH\x02\x12_\n\x1erag_file_transformation_config\x18\x10 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.RagFileTransformationConfig\x12V\n\x17rag_file_parsing_config\x18\x08 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.RagFileParsingConfigB\x03\xe0\x41\x01\x12+\n\x1emax_embedding_requests_per_min\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x11rebuild_ann_index\x18\x13 \x01(\x08\x42\x0f\n\rimport_sourceB\x16\n\x14partial_failure_sinkB\x14\n\x12import_result_sinkB\xd0\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x12VertexRagDataProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -28,6 +29,7 @@ imports = [ ["google.cloud.aiplatform.v1.ApiAuth", "google/cloud/aiplatform/v1/api_auth.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.aiplatform.v1.EncryptionSpec", "google/cloud/aiplatform/v1/encryption_spec.proto"], ["google.cloud.aiplatform.v1.GcsSource", "google/cloud/aiplatform/v1/io.proto"], ] imports.each do |type_name, expected_filename| diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb index 1a6386f57da0..00b5ae4b3a43 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb @@ -52,24 +52,24 @@ class Content # @return [::String] # Optional. Text part (can be code). # - # Note: The following fields are mutually exclusive: `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`. 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: `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] inline_data # @return [::Google::Cloud::AIPlatform::V1::Blob] # Optional. Inlined bytes data. # - # Note: The following fields are mutually exclusive: `inline_data`, `text`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`. 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: `inline_data`, `text`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] file_data # @return [::Google::Cloud::AIPlatform::V1::FileData] # Optional. URI based data. # - # Note: The following fields are mutually exclusive: `file_data`, `text`, `inline_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`. 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: `file_data`, `text`, `inline_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] function_call # @return [::Google::Cloud::AIPlatform::V1::FunctionCall] # Optional. A predicted [FunctionCall] returned from the model that # contains a string representing the [FunctionDeclaration.name] with the # parameters and their values. # - # Note: The following fields are mutually exclusive: `function_call`, `text`, `inline_data`, `file_data`, `function_response`, `executable_code`, `code_execution_result`. 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: `function_call`, `text`, `inline_data`, `file_data`, `function_response`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] function_response # @return [::Google::Cloud::AIPlatform::V1::FunctionResponse] # Optional. The result output of a [FunctionCall] that contains a string @@ -77,17 +77,28 @@ class Content # containing any output from the function call. It is used as context to # the model. # - # Note: The following fields are mutually exclusive: `function_response`, `text`, `inline_data`, `file_data`, `function_call`, `executable_code`, `code_execution_result`. 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: `function_response`, `text`, `inline_data`, `file_data`, `function_call`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] executable_code # @return [::Google::Cloud::AIPlatform::V1::ExecutableCode] # Optional. Code generated by the model that is meant to be executed. # - # Note: The following fields are mutually exclusive: `executable_code`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `code_execution_result`. 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: `executable_code`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `code_execution_result`, `thought`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] code_execution_result # @return [::Google::Cloud::AIPlatform::V1::CodeExecutionResult] # Optional. Result of executing the [ExecutableCode]. # - # Note: The following fields are mutually exclusive: `code_execution_result`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`. 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: `code_execution_result`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `thought`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] thought + # @return [::Boolean] + # Indicates if the part is thought from the model. + # + # Note: The following fields are mutually exclusive: `thought`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] thought_signature + # @return [::String] + # An opaque signature for the thought so it can be reused in subsequent + # requests. + # + # Note: The following fields are mutually exclusive: `thought_signature`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] video_metadata # @return [::Google::Cloud::AIPlatform::V1::VideoMetadata] # Optional. Video metadata. The metadata should only be specified while the @@ -188,6 +199,44 @@ class VideoMetadata # If set, a compatible response_mime_type must also be set. # Compatible mimetypes: # `application/json`: Schema for JSON response. + # @!attribute [rw] response_json_schema + # @return [::Google::Protobuf::Value] + # Optional. Output schema of the generated response. This is an alternative + # to `response_schema` that accepts [JSON Schema](https://json-schema.org/). + # + # If set, `response_schema` must be omitted, but `response_mime_type` is + # required. + # + # While the full JSON Schema may be sent, not all features are supported. + # Specifically, only the following properties are supported: + # + # - `$id` + # - `$defs` + # - `$ref` + # - `$anchor` + # - `type` + # - `format` + # - `title` + # - `description` + # - `enum` (for strings and numbers) + # - `items` + # - `prefixItems` + # - `minItems` + # - `maxItems` + # - `minimum` + # - `maximum` + # - `anyOf` + # - `oneOf` (interpreted the same as `anyOf`) + # - `properties` + # - `additionalProperties` + # - `required` + # + # The non-standard `propertyOrdering` property may also be set. + # + # Cyclic references are unrolled to a limited degree and, as such, may only + # be used within non-required properties. (Nullable properties are not + # sufficient.) If `$ref` is set on a sub-schema, no other properties, except + # for than those starting as a `$`, may be set. # @!attribute [rw] routing_config # @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig] # Optional. Routing configuration. @@ -253,6 +302,10 @@ class ManualRoutingMode end # Config for thinking features. + # @!attribute [rw] include_thoughts + # @return [::Boolean] + # Indicates whether to include thoughts in the response. + # If true, thoughts are returned only when available. # @!attribute [rw] thinking_budget # @return [::Integer] # Optional. Indicates the thinking budget in tokens. @@ -441,6 +494,9 @@ class Citation # @!attribute [r] grounding_metadata # @return [::Google::Cloud::AIPlatform::V1::GroundingMetadata] # Output only. Metadata specifies sources used to ground generated content. + # @!attribute [r] url_context_metadata + # @return [::Google::Cloud::AIPlatform::V1::UrlContextMetadata] + # Output only. Metadata related to url context retrieval tool. class Candidate include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -486,6 +542,39 @@ module FinishReason end end + # Metadata related to url context retrieval tool. + # @!attribute [r] url_metadata + # @return [::Array<::Google::Cloud::AIPlatform::V1::UrlMetadata>] + # Output only. List of url context. + class UrlContextMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Context of the a single url retrieval. + # @!attribute [rw] retrieved_url + # @return [::String] + # Retrieved url by the tool. + # @!attribute [rw] url_retrieval_status + # @return [::Google::Cloud::AIPlatform::V1::UrlMetadata::UrlRetrievalStatus] + # Status of the url retrieval. + class UrlMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Status of the url retrieval. + module UrlRetrievalStatus + # Default value. This value is unused. + URL_RETRIEVAL_STATUS_UNSPECIFIED = 0 + + # Url retrieval is successful. + URL_RETRIEVAL_STATUS_SUCCESS = 1 + + # Url retrieval is failed due to error. + URL_RETRIEVAL_STATUS_ERROR = 2 + end + end + # Logprobs Result # @!attribute [rw] top_candidates # @return [::Array<::Google::Cloud::AIPlatform::V1::LogprobsResult::TopCandidates>] diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/custom_job.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/custom_job.rb index 6b536b9b75a3..0efa08a58e41 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/custom_job.rb @@ -164,6 +164,9 @@ class WebAccessUrisEntry # network. # # Example: ['vertex-ai-ip-range']. + # @!attribute [rw] psc_interface_config + # @return [::Google::Cloud::AIPlatform::V1::PscInterfaceConfig] + # Optional. Configuration for PSC-I for CustomJob. # @!attribute [rw] base_output_directory # @return [::Google::Cloud::AIPlatform::V1::GcsDestination] # The Cloud Storage location to store the output of this CustomJob or diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb index 892a336bc6e5..2c46bbf356f4 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb @@ -80,6 +80,9 @@ module V1 # # If this field is left unspecified, the resources aren't peered with any # network. + # @!attribute [rw] psc_interface_config + # @return [::Google::Cloud::AIPlatform::V1::PscInterfaceConfig] + # Optional. Configuration for PSC-I for PersistentResource. # @!attribute [rw] encryption_spec # @return [::Google::Cloud::AIPlatform::V1::EncryptionSpec] # Optional. Customer-managed encryption key spec for a PersistentResource. diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb index a0746fb1c86a..9d02594dce95 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb @@ -110,6 +110,9 @@ module V1 # provided VPC network. # # Example: ['vertex-ai-ip-range']. + # @!attribute [rw] psc_interface_config + # @return [::Google::Cloud::AIPlatform::V1::PscInterfaceConfig] + # Optional. Configuration for PSC-I for PipelineJob. # @!attribute [rw] template_uri # @return [::String] # A template uri from where the diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/service_networking.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/service_networking.rb index f2e6972e6351..7940c7584f0c 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/service_networking.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/service_networking.rb @@ -72,6 +72,21 @@ class PscAutomatedEndpoints include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Configuration for PSC-I. + # @!attribute [rw] network_attachment + # @return [::String] + # Optional. The name of the Compute Engine + # [network + # attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to + # attach to the resource within the region and user project. + # To specify this field, you must have already [created a network attachment] + # (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). + # This field is only used for resources using PSC-I. + class PscInterfaceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb index a68438368db1..bdaabd2fa987 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb @@ -61,6 +61,9 @@ module V1 # @return [::Google::Cloud::AIPlatform::V1::Tool::CodeExecution] # Optional. CodeExecution tool type. # Enables the model to execute code as part of generation. + # @!attribute [rw] url_context + # @return [::Google::Cloud::AIPlatform::V1::UrlContext] + # Optional. Tool to support URL context retrieval. class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -83,6 +86,12 @@ class CodeExecution end end + # Tool to support URL context. + class UrlContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Structured representation of a function declaration as defined by the # [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included # in this declaration are the function name, description, parameters and @@ -114,11 +123,37 @@ class CodeExecution # type: INTEGER # required: # - param1 + # @!attribute [rw] parameters_json_schema + # @return [::Google::Protobuf::Value] + # Optional. Describes the parameters to the function in JSON Schema format. + # The schema must describe an object where the properties are the parameters + # to the function. For example: + # + # ``` + # { + # "type": "object", + # "properties": { + # "name": { "type": "string" }, + # "age": { "type": "integer" } + # }, + # "additionalProperties": false, + # "required": ["name", "age"], + # "propertyOrdering": ["name", "age"] + # } + # ``` + # + # This field is mutually exclusive with `parameters`. # @!attribute [rw] response # @return [::Google::Cloud::AIPlatform::V1::Schema] # Optional. Describes the output from this function in JSON Schema format. # Reflects the Open API 3.03 Response Object. The Schema defines the type # used for the response value of the function. + # @!attribute [rw] response_json_schema + # @return [::Google::Protobuf::Value] + # Optional. Describes the output from this function in JSON Schema format. + # The value specified by the schema is the response value of the function. + # + # This field is mutually exclusive with `response`. class FunctionDeclaration include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb index 3d504c98d25d..a1ef63b64622 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb @@ -260,6 +260,12 @@ module State # @!attribute [r] corpus_status # @return [::Google::Cloud::AIPlatform::V1::CorpusStatus] # Output only. RagCorpus state. + # @!attribute [rw] encryption_spec + # @return [::Google::Cloud::AIPlatform::V1::EncryptionSpec] + # Optional. Immutable. The CMEK key name used to encrypt at-rest data related + # to this Corpus. Only applicable to RagManagedDb option for Vector DB. This + # field can only be set at corpus creation time, and cannot be updated or + # deleted. class RagCorpus include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/job_service_paths_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/job_service_paths_test.rb index 07fb00aec14b..543a6943bc46 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/job_service_paths_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/job_service_paths_test.rb @@ -200,6 +200,18 @@ def test_network_path end end + def test_network_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AIPlatform::V1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" + assert_equal "projects/value0/regions/value1/networkAttachments/value2", path + end + end + def test_notification_channel_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/persistent_resource_service_paths_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/persistent_resource_service_paths_test.rb index 212cadbb2ab1..a2548663cdde 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/persistent_resource_service_paths_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/persistent_resource_service_paths_test.rb @@ -65,6 +65,18 @@ def test_network_path end end + def test_network_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" + assert_equal "projects/value0/regions/value1/networkAttachments/value2", path + end + end + def test_persistent_resource_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/pipeline_service_paths_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/pipeline_service_paths_test.rb index 5ece5f8cdd24..701897bcfbd4 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/pipeline_service_paths_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/pipeline_service_paths_test.rb @@ -140,6 +140,18 @@ def test_network_path end end + def test_network_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AIPlatform::V1::PipelineService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" + assert_equal "projects/value0/regions/value1/networkAttachments/value2", path + end + end + def test_pipeline_job_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/schedule_service_paths_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/schedule_service_paths_test.rb index cc89b08e18ba..061e48bcb661 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/schedule_service_paths_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/schedule_service_paths_test.rb @@ -113,6 +113,18 @@ def test_network_path end end + def test_network_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AIPlatform::V1::ScheduleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" + assert_equal "projects/value0/regions/value1/networkAttachments/value2", path + end + end + def test_notebook_execution_job_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do From 177eef14665913bca1024c91da0ba61412b1a8ee Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:26:39 -0700 Subject: [PATCH 099/457] chore(main): release google-cloud-discovery_engine 2.2.0 (#30503) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-cloud-discovery_engine/CHANGELOG.md | 20 +++++++++++++++++++ .../google/cloud/discovery_engine/version.rb | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a51c88d6527a..c9c967161074 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -327,7 +327,7 @@ "google-cloud-dialogflow-cx-v3+FILLER": "0.0.0", "google-cloud-dialogflow-v2": "1.10.0", "google-cloud-dialogflow-v2+FILLER": "0.0.0", - "google-cloud-discovery_engine": "2.1.1", + "google-cloud-discovery_engine": "2.2.0", "google-cloud-discovery_engine+FILLER": "0.0.0", "google-cloud-discovery_engine-v1": "2.2.0", "google-cloud-discovery_engine-v1+FILLER": "0.0.0", diff --git a/google-cloud-discovery_engine/CHANGELOG.md b/google-cloud-discovery_engine/CHANGELOG.md index 16dcd9e1630f..c2553c2a5b80 100644 --- a/google-cloud-discovery_engine/CHANGELOG.md +++ b/google-cloud-discovery_engine/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +### 2.2.0 (2025-06-13) + +#### Features + +* add CMEK config service ([#30497](https://github.com/googleapis/google-cloud-ruby/issues/30497)) +* add ConnectorRunErrorContext to error log +* add custom search operators for Workspace search +* add HealthcareFhirConfig to FHIR data store +* add identity mapping service +* add more indexing state for site search engine +* add more options for layout parser config +* add user license config service +* enable claim level score for grounding +* support ACL data store and document +* support media recommendation engine +* support structured content for chunk +#### Documentation + +* keep the API doc up-to-date with recent changes + ### 2.1.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-discovery_engine/lib/google/cloud/discovery_engine/version.rb b/google-cloud-discovery_engine/lib/google/cloud/discovery_engine/version.rb index 0ea9489f0a16..683205d1acf1 100644 --- a/google-cloud-discovery_engine/lib/google/cloud/discovery_engine/version.rb +++ b/google-cloud-discovery_engine/lib/google/cloud/discovery_engine/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module DiscoveryEngine - VERSION = "2.1.1" + VERSION = "2.2.0" end end end From f77288e5a04cf3038e57486c3e5d7b7bb1e84bd7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:27:13 -0700 Subject: [PATCH 100/457] chore(main): release google-cloud-discovery_engine-v1 2.3.0 (#30504) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-discovery_engine-v1 2.3.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-discovery_engine-v1/CHANGELOG.md | 20 +++++++++++++++++++ .../cloud/discovery_engine/v1/version.rb | 2 +- ...adata_google.cloud.discoveryengine.v1.json | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c9c967161074..f5cf6cf035fe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -329,7 +329,7 @@ "google-cloud-dialogflow-v2+FILLER": "0.0.0", "google-cloud-discovery_engine": "2.2.0", "google-cloud-discovery_engine+FILLER": "0.0.0", - "google-cloud-discovery_engine-v1": "2.2.0", + "google-cloud-discovery_engine-v1": "2.3.0", "google-cloud-discovery_engine-v1+FILLER": "0.0.0", "google-cloud-discovery_engine-v1beta": "0.20.0", "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", diff --git a/google-cloud-discovery_engine-v1/CHANGELOG.md b/google-cloud-discovery_engine-v1/CHANGELOG.md index 9fc0677a8280..3f7f342e1043 100644 --- a/google-cloud-discovery_engine-v1/CHANGELOG.md +++ b/google-cloud-discovery_engine-v1/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +### 2.3.0 (2025-06-13) + +#### Features + +* add CMEK config service ([#30498](https://github.com/googleapis/google-cloud-ruby/issues/30498)) +* add ConnectorRunErrorContext to error log +* add custom search operators for Workspace search +* add HealthcareFhirConfig to FHIR data store +* add identity mapping service +* add more indexing state for site search engine +* add more options for layout parser config +* add user license config service +* enable claim level score for grounding +* support ACL data store and document +* support media recommendation engine +* support structured content for chunk +#### Documentation + +* keep the API doc up-to-date with recent changes + ### 2.2.0 (2025-05-12) #### Features diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb index a7031dcd5859..da002d3cf253 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DiscoveryEngine module V1 - VERSION = "2.2.0" + VERSION = "2.3.0" end end end diff --git a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json index bdf5f7ac894b..60732d4c70aa 100644 --- a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-discovery_engine-v1", - "version": "2.2.0", + "version": "2.3.0", "language": "RUBY", "apis": [ { From c51b481980c0bf92b4e991647a64b4c4e7111f23 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:28:06 -0700 Subject: [PATCH 101/457] feat: update secret manager protos for tags (#30502) --- .../cloud/secretmanager/v1/resources_pb.rb | 2 +- .../cloud/secretmanager/v1/resources.rb | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/google-cloud-secret_manager-v1/lib/google/cloud/secretmanager/v1/resources_pb.rb b/google-cloud-secret_manager-v1/lib/google/cloud/secretmanager/v1/resources_pb.rb index fdc10f7e46e3..09df9c991633 100644 --- a/google-cloud-secret_manager-v1/lib/google/cloud/secretmanager/v1/resources_pb.rb +++ b/google-cloud-secret_manager-v1/lib/google/cloud/secretmanager/v1/resources_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n-google/cloud/secretmanager/v1/resources.proto\x12\x1dgoogle.cloud.secretmanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x08\n\x06Secret\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x0breplication\x18\x02 \x01(\x0b\x32*.google.cloud.secretmanager.v1.ReplicationB\x06\xe0\x41\x05\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.secretmanager.v1.Secret.LabelsEntry\x12\x39\n\x06topics\x18\x05 \x03(\x0b\x32$.google.cloud.secretmanager.v1.TopicB\x03\xe0\x41\x01\x12\x36\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12-\n\x03ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04H\x00\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12>\n\x08rotation\x18\t \x01(\x0b\x32\'.google.cloud.secretmanager.v1.RotationB\x03\xe0\x41\x01\x12W\n\x0fversion_aliases\x18\x0b \x03(\x0b\x32\x39.google.cloud.secretmanager.v1.Secret.VersionAliasesEntryB\x03\xe0\x41\x01\x12P\n\x0b\x61nnotations\x18\r \x03(\x0b\x32\x36.google.cloud.secretmanager.v1.Secret.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x13version_destroy_ttl\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x62\n\x1b\x63ustomer_managed_encryption\x18\x0f \x01(\x0b\x32\x38.google.cloud.secretmanager.v1.CustomerManagedEncryptionB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13VersionAliasesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x99\x01\xea\x41\x95\x01\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\x12\x38projects/{project}/locations/{location}/secrets/{secret}*\x07secrets2\x06secretB\x0c\n\nexpiration\"\xc2\x06\n\rSecretVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0c\x64\x65stroy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.cloud.secretmanager.v1.SecretVersion.StateB\x03\xe0\x41\x03\x12L\n\x12replication_status\x18\x05 \x01(\x0b\x32\x30.google.cloud.secretmanager.v1.ReplicationStatus\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12.\n!client_specified_payload_checksum\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x16scheduled_destroy_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12h\n\x1b\x63ustomer_managed_encryption\x18\t \x01(\x0b\x32>.google.cloud.secretmanager.v1.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tDESTROYED\x10\x03:\xe2\x01\xea\x41\xde\x01\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\x12Rprojects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}*\x0esecretVersions2\rsecretVersion\"\x90\x04\n\x0bReplication\x12I\n\tautomatic\x18\x01 \x01(\x0b\x32\x34.google.cloud.secretmanager.v1.Replication.AutomaticH\x00\x12N\n\x0cuser_managed\x18\x02 \x01(\x0b\x32\x36.google.cloud.secretmanager.v1.Replication.UserManagedH\x00\x1ao\n\tAutomatic\x12\x62\n\x1b\x63ustomer_managed_encryption\x18\x01 \x01(\x0b\x32\x38.google.cloud.secretmanager.v1.CustomerManagedEncryptionB\x03\xe0\x41\x01\x1a\xe5\x01\n\x0bUserManaged\x12U\n\x08replicas\x18\x01 \x03(\x0b\x32>.google.cloud.secretmanager.v1.Replication.UserManaged.ReplicaB\x03\xe0\x41\x02\x1a\x7f\n\x07Replica\x12\x10\n\x08location\x18\x01 \x01(\t\x12\x62\n\x1b\x63ustomer_managed_encryption\x18\x02 \x01(\x0b\x32\x38.google.cloud.secretmanager.v1.CustomerManagedEncryptionB\x03\xe0\x41\x01\x42\r\n\x0breplication\"6\n\x19\x43ustomerManagedEncryption\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xeb\x04\n\x11ReplicationStatus\x12U\n\tautomatic\x18\x01 \x01(\x0b\x32@.google.cloud.secretmanager.v1.ReplicationStatus.AutomaticStatusH\x00\x12Z\n\x0cuser_managed\x18\x02 \x01(\x0b\x32\x42.google.cloud.secretmanager.v1.ReplicationStatus.UserManagedStatusH\x00\x1a{\n\x0f\x41utomaticStatus\x12h\n\x1b\x63ustomer_managed_encryption\x18\x01 \x01(\x0b\x32>.google.cloud.secretmanager.v1.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\x1a\x8f\x02\n\x11UserManagedStatus\x12g\n\x08replicas\x18\x01 \x03(\x0b\x32P.google.cloud.secretmanager.v1.ReplicationStatus.UserManagedStatus.ReplicaStatusB\x03\xe0\x41\x03\x1a\x90\x01\n\rReplicaStatus\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12h\n\x1b\x63ustomer_managed_encryption\x18\x02 \x01(\x0b\x32>.google.cloud.secretmanager.v1.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\x42\x14\n\x12replication_status\"D\n\x1f\x43ustomerManagedEncryptionStatus\x12!\n\x14kms_key_version_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"_\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:C\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\"\x80\x01\n\x08Rotation\x12;\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x37\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04\"L\n\rSecretPayload\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x1d\n\x0b\x64\x61ta_crc32c\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_data_crc32cB\xe7\x01\n!com.google.cloud.secretmanager.v1B\x0eResourcesProtoP\x01ZGcloud.google.com/go/secretmanager/apiv1/secretmanagerpb;secretmanagerpb\xa2\x02\x03GSM\xaa\x02\x1dGoogle.Cloud.SecretManager.V1\xca\x02\x1dGoogle\\Cloud\\SecretManager\\V1\xea\x02 Google::Cloud::SecretManager::V1b\x06proto3" +descriptor_data = "\n-google/cloud/secretmanager/v1/resources.proto\x12\x1dgoogle.cloud.secretmanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd9\t\n\x06Secret\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x0breplication\x18\x02 \x01(\x0b\x32*.google.cloud.secretmanager.v1.ReplicationB\x06\xe0\x41\x05\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.secretmanager.v1.Secret.LabelsEntry\x12\x39\n\x06topics\x18\x05 \x03(\x0b\x32$.google.cloud.secretmanager.v1.TopicB\x03\xe0\x41\x01\x12\x36\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12-\n\x03ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04H\x00\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12>\n\x08rotation\x18\t \x01(\x0b\x32\'.google.cloud.secretmanager.v1.RotationB\x03\xe0\x41\x01\x12W\n\x0fversion_aliases\x18\x0b \x03(\x0b\x32\x39.google.cloud.secretmanager.v1.Secret.VersionAliasesEntryB\x03\xe0\x41\x01\x12P\n\x0b\x61nnotations\x18\r \x03(\x0b\x32\x36.google.cloud.secretmanager.v1.Secret.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x13version_destroy_ttl\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x62\n\x1b\x63ustomer_managed_encryption\x18\x0f \x01(\x0b\x32\x38.google.cloud.secretmanager.v1.CustomerManagedEncryptionB\x03\xe0\x41\x01\x12H\n\x04tags\x18\x10 \x03(\x0b\x32/.google.cloud.secretmanager.v1.Secret.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13VersionAliasesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x99\x01\xea\x41\x95\x01\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\x12\x38projects/{project}/locations/{location}/secrets/{secret}*\x07secrets2\x06secretB\x0c\n\nexpiration\"\xc2\x06\n\rSecretVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0c\x64\x65stroy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.cloud.secretmanager.v1.SecretVersion.StateB\x03\xe0\x41\x03\x12L\n\x12replication_status\x18\x05 \x01(\x0b\x32\x30.google.cloud.secretmanager.v1.ReplicationStatus\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12.\n!client_specified_payload_checksum\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x16scheduled_destroy_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12h\n\x1b\x63ustomer_managed_encryption\x18\t \x01(\x0b\x32>.google.cloud.secretmanager.v1.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tDESTROYED\x10\x03:\xe2\x01\xea\x41\xde\x01\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\x12Rprojects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}*\x0esecretVersions2\rsecretVersion\"\x90\x04\n\x0bReplication\x12I\n\tautomatic\x18\x01 \x01(\x0b\x32\x34.google.cloud.secretmanager.v1.Replication.AutomaticH\x00\x12N\n\x0cuser_managed\x18\x02 \x01(\x0b\x32\x36.google.cloud.secretmanager.v1.Replication.UserManagedH\x00\x1ao\n\tAutomatic\x12\x62\n\x1b\x63ustomer_managed_encryption\x18\x01 \x01(\x0b\x32\x38.google.cloud.secretmanager.v1.CustomerManagedEncryptionB\x03\xe0\x41\x01\x1a\xe5\x01\n\x0bUserManaged\x12U\n\x08replicas\x18\x01 \x03(\x0b\x32>.google.cloud.secretmanager.v1.Replication.UserManaged.ReplicaB\x03\xe0\x41\x02\x1a\x7f\n\x07Replica\x12\x10\n\x08location\x18\x01 \x01(\t\x12\x62\n\x1b\x63ustomer_managed_encryption\x18\x02 \x01(\x0b\x32\x38.google.cloud.secretmanager.v1.CustomerManagedEncryptionB\x03\xe0\x41\x01\x42\r\n\x0breplication\"6\n\x19\x43ustomerManagedEncryption\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xeb\x04\n\x11ReplicationStatus\x12U\n\tautomatic\x18\x01 \x01(\x0b\x32@.google.cloud.secretmanager.v1.ReplicationStatus.AutomaticStatusH\x00\x12Z\n\x0cuser_managed\x18\x02 \x01(\x0b\x32\x42.google.cloud.secretmanager.v1.ReplicationStatus.UserManagedStatusH\x00\x1a{\n\x0f\x41utomaticStatus\x12h\n\x1b\x63ustomer_managed_encryption\x18\x01 \x01(\x0b\x32>.google.cloud.secretmanager.v1.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\x1a\x8f\x02\n\x11UserManagedStatus\x12g\n\x08replicas\x18\x01 \x03(\x0b\x32P.google.cloud.secretmanager.v1.ReplicationStatus.UserManagedStatus.ReplicaStatusB\x03\xe0\x41\x03\x1a\x90\x01\n\rReplicaStatus\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12h\n\x1b\x63ustomer_managed_encryption\x18\x02 \x01(\x0b\x32>.google.cloud.secretmanager.v1.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\x42\x14\n\x12replication_status\"D\n\x1f\x43ustomerManagedEncryptionStatus\x12!\n\x14kms_key_version_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"_\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:C\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\"\x80\x01\n\x08Rotation\x12;\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x37\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04\"L\n\rSecretPayload\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x1d\n\x0b\x64\x61ta_crc32c\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_data_crc32cB\xe7\x01\n!com.google.cloud.secretmanager.v1B\x0eResourcesProtoP\x01ZGcloud.google.com/go/secretmanager/apiv1/secretmanagerpb;secretmanagerpb\xa2\x02\x03GSM\xaa\x02\x1dGoogle.Cloud.SecretManager.V1\xca\x02\x1dGoogle\\Cloud\\SecretManager\\V1\xea\x02 Google::Cloud::SecretManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-secret_manager-v1/proto_docs/google/cloud/secretmanager/v1/resources.rb b/google-cloud-secret_manager-v1/proto_docs/google/cloud/secretmanager/v1/resources.rb index e23391622016..8d55cea0e35a 100644 --- a/google-cloud-secret_manager-v1/proto_docs/google/cloud/secretmanager/v1/resources.rb +++ b/google-cloud-secret_manager-v1/proto_docs/google/cloud/secretmanager/v1/resources.rb @@ -127,6 +127,16 @@ module V1 # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} added # afterwards. They do not apply retroactively to existing # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Mapping of Tag keys/values directly bound + # to this resource. For example: + # "123/environment": "production", + # "123/costCenter": "marketing" + # + # Tags are used to organize and group resources. + # + # Tags can be used to control policy evaluation for the resource. class Secret include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -157,6 +167,15 @@ class AnnotationsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # A secret version resource in the Secret Manager API. From bf80e3c84005ece96ce4605810339c848dacb9e8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:20:38 -0700 Subject: [PATCH 102/457] chore(main): release google-analytics-admin-v1alpha 0.36.0 (#30515) --- .release-please-manifest.json | 2 +- google-analytics-admin-v1alpha/CHANGELOG.md | 8 ++++++++ .../lib/google/analytics/admin/v1alpha/version.rb | 2 +- .../snippet_metadata_google.analytics.admin.v1alpha.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f5cf6cf035fe..2e13f2798ff1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -9,7 +9,7 @@ "google-ads-marketing_platform-admin-v1alpha+FILLER": "0.0.0", "google-analytics-admin": "0.6.2", "google-analytics-admin+FILLER": "0.0.0", - "google-analytics-admin-v1alpha": "0.35.0", + "google-analytics-admin-v1alpha": "0.36.0", "google-analytics-admin-v1alpha+FILLER": "0.0.0", "google-analytics-data": "0.7.1", "google-analytics-data+FILLER": "0.0.0", diff --git a/google-analytics-admin-v1alpha/CHANGELOG.md b/google-analytics-admin-v1alpha/CHANGELOG.md index e5caa5fdd031..075d7c2b8fc9 100644 --- a/google-analytics-admin-v1alpha/CHANGELOG.md +++ b/google-analytics-admin-v1alpha/CHANGELOG.md @@ -1,5 +1,13 @@ # Release History +### 0.36.0 (2025-06-16) + +#### Features + +* add the `GetSubpropertySyncConfigRequest` method ([#30512](https://github.com/googleapis/google-cloud-ruby/issues/30512)) +* add the `ListSubpropertySyncConfigsRequest` method +* add the `UpdateSubpropertySyncConfigRequest` method + ### 0.35.0 (2025-05-12) #### Features diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/version.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/version.rb index 728fc6f5c2f8..a307bc7e2690 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/version.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/version.rb @@ -21,7 +21,7 @@ module Google module Analytics module Admin module V1alpha - VERSION = "0.35.0" + VERSION = "0.36.0" end end end diff --git a/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json b/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json index a3bf479d7999..22e15aefd417 100644 --- a/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json +++ b/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-analytics-admin-v1alpha", - "version": "0.35.0", + "version": "0.36.0", "language": "RUBY", "apis": [ { From 6869a6baaaf4f0ac105e7597ab9df546749c1898 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:20:54 -0700 Subject: [PATCH 103/457] chore(main): release google-cloud-ai_platform-v1 1.15.0 (#30516) --- .release-please-manifest.json | 2 +- google-cloud-ai_platform-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/ai_platform/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2e13f2798ff1..56c8d0bdd7a3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -43,7 +43,7 @@ "google-cloud-advisory_notifications-v1+FILLER": "0.0.0", "google-cloud-ai_platform": "2.0.1", "google-cloud-ai_platform+FILLER": "0.0.0", - "google-cloud-ai_platform-v1": "1.14.0", + "google-cloud-ai_platform-v1": "1.15.0", "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", diff --git a/google-cloud-ai_platform-v1/CHANGELOG.md b/google-cloud-ai_platform-v1/CHANGELOG.md index 2a8a521d315c..0a22a28b0879 100644 --- a/google-cloud-ai_platform-v1/CHANGELOG.md +++ b/google-cloud-ai_platform-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.15.0 (2025-06-16) + +#### Features + +* add EncryptionSpec field for RagCorpus CMEK feature to v1 ([#30485](https://github.com/googleapis/google-cloud-ruby/issues/30485)) + ### 1.14.0 (2025-05-27) #### Features diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb index 1f7b5cca10ff..7c41dd1adf83 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AIPlatform module V1 - VERSION = "1.14.0" + VERSION = "1.15.0" end end end diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index ce97c6ee2e60..6b145d518fc5 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-ai_platform-v1", - "version": "1.14.0", + "version": "1.15.0", "language": "RUBY", "apis": [ { From 72c6b8f3187db87800066dd85aa7c29b983d0b7a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:21:10 -0700 Subject: [PATCH 104/457] chore(main): release google-cloud-channel-v1 2.2.0 (#30517) --- .release-please-manifest.json | 2 +- google-cloud-channel-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/channel/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.channel.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 56c8d0bdd7a3..b75dc0a7d9e4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -195,7 +195,7 @@ "google-cloud-certificate_manager-v1+FILLER": "0.0.0", "google-cloud-channel": "2.0.1", "google-cloud-channel+FILLER": "0.0.0", - "google-cloud-channel-v1": "2.1.0", + "google-cloud-channel-v1": "2.2.0", "google-cloud-channel-v1+FILLER": "0.0.0", "google-cloud-chronicle": "0.1.0", "google-cloud-chronicle+FILLER": "0.0.0", diff --git a/google-cloud-channel-v1/CHANGELOG.md b/google-cloud-channel-v1/CHANGELOG.md index 37822ded0e08..8a393918bcfe 100644 --- a/google-cloud-channel-v1/CHANGELOG.md +++ b/google-cloud-channel-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +### 2.2.0 (2025-06-16) + +#### Features + +* A new enum `CustomerAttestationState` is added ([#30513](https://github.com/googleapis/google-cloud-ruby/issues/30513)) +* A new field `customer_attestation_state` is added to message `.google.cloud.channel.v1.Customer` + ### 2.1.0 (2025-05-12) #### Features diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb index c2f4acda34ea..5ea6f015f79a 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Channel module V1 - VERSION = "2.1.0" + VERSION = "2.2.0" end end end diff --git a/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json b/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json index 2e87841707b4..504456b88e57 100644 --- a/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json +++ b/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-channel-v1", - "version": "2.1.0", + "version": "2.2.0", "language": "RUBY", "apis": [ { From 85b2c6c1401c2563fb4e2e05ad515f82b0518c98 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:21:49 -0700 Subject: [PATCH 105/457] chore(main): release google-cloud-cloud_quotas-v1beta 0.5.0 (#30518) --- .release-please-manifest.json | 2 +- google-cloud-cloud_quotas-v1beta/CHANGELOG.md | 11 +++++++++++ .../lib/google/cloud/cloud_quotas/v1beta/version.rb | 2 +- ...nippet_metadata_google.api.cloudquotas.v1beta.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b75dc0a7d9e4..490df22e1b2d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -215,7 +215,7 @@ "google-cloud-cloud_quotas+FILLER": "0.0.0", "google-cloud-cloud_quotas-v1": "2.1.0", "google-cloud-cloud_quotas-v1+FILLER": "0.0.0", - "google-cloud-cloud_quotas-v1beta": "0.4.0", + "google-cloud-cloud_quotas-v1beta": "0.5.0", "google-cloud-cloud_quotas-v1beta+FILLER": "0.0.0", "google-cloud-commerce-consumer-procurement": "1.2.1", "google-cloud-commerce-consumer-procurement+FILLER": "0.0.0", diff --git a/google-cloud-cloud_quotas-v1beta/CHANGELOG.md b/google-cloud-cloud_quotas-v1beta/CHANGELOG.md index b25fdb405c87..bcb3af4d545b 100644 --- a/google-cloud-cloud_quotas-v1beta/CHANGELOG.md +++ b/google-cloud-cloud_quotas-v1beta/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +### 0.5.0 (2025-06-16) + +#### Features + +* Added support for hierarchical enrollment in Quota Adjuster consumer API ([#30506](https://github.com/googleapis/google-cloud-ruby/issues/30506)) +#### Documentation + +* Added 2 new fields in `.google.api.cloudquotas.v1beta.QuotaAdjusterSettings` +* Added inherited and inherited_from in `.google.api.cloudquotas.v1beta.QuotaAdjusterSettings` +* Added support for folder and organization level enrollment + ### 0.4.0 (2025-05-12) #### Features diff --git a/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/version.rb b/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/version.rb index af81d63a4db5..d09a24d911de 100644 --- a/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/version.rb +++ b/google-cloud-cloud_quotas-v1beta/lib/google/cloud/cloud_quotas/v1beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module CloudQuotas module V1beta - VERSION = "0.4.0" + VERSION = "0.5.0" end end end diff --git a/google-cloud-cloud_quotas-v1beta/snippets/snippet_metadata_google.api.cloudquotas.v1beta.json b/google-cloud-cloud_quotas-v1beta/snippets/snippet_metadata_google.api.cloudquotas.v1beta.json index 129e6a7e3a3c..d2d5dba1cc1b 100644 --- a/google-cloud-cloud_quotas-v1beta/snippets/snippet_metadata_google.api.cloudquotas.v1beta.json +++ b/google-cloud-cloud_quotas-v1beta/snippets/snippet_metadata_google.api.cloudquotas.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-cloud_quotas-v1beta", - "version": "0.4.0", + "version": "0.5.0", "language": "RUBY", "apis": [ { From fb3366585836287dffa6b691ecd8c332de85ac9b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:22:11 -0700 Subject: [PATCH 106/457] chore(main): release google-cloud-dataproc-v1 1.5.0 (#30519) --- .release-please-manifest.json | 2 +- google-cloud-dataproc-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/dataproc/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.dataproc.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 490df22e1b2d..33337fca86e1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -287,7 +287,7 @@ "google-cloud-dataplex-v1+FILLER": "0.0.0", "google-cloud-dataproc": "2.7.2", "google-cloud-dataproc+FILLER": "0.0.0", - "google-cloud-dataproc-v1": "1.4.0", + "google-cloud-dataproc-v1": "1.5.0", "google-cloud-dataproc-v1+FILLER": "0.0.0", "google-cloud-dataqna": "0.6.1", "google-cloud-dataqna+FILLER": "0.0.0", diff --git a/google-cloud-dataproc-v1/CHANGELOG.md b/google-cloud-dataproc-v1/CHANGELOG.md index a4e5f2b52841..2ce278ec8960 100644 --- a/google-cloud-dataproc-v1/CHANGELOG.md +++ b/google-cloud-dataproc-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +### 1.5.0 (2025-06-16) + +#### Features + +* add scenarios AUTO/NONE to autotuning config +* Added support for DELTA, ICEBERG, PIG components ([#30496](https://github.com/googleapis/google-cloud-ruby/issues/30496)) + ### 1.4.0 (2025-05-12) #### Features diff --git a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/version.rb b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/version.rb index e7538413665c..16d2b11625d9 100644 --- a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/version.rb +++ b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Dataproc module V1 - VERSION = "1.4.0" + VERSION = "1.5.0" end end end diff --git a/google-cloud-dataproc-v1/snippets/snippet_metadata_google.cloud.dataproc.v1.json b/google-cloud-dataproc-v1/snippets/snippet_metadata_google.cloud.dataproc.v1.json index e1246e6e2eee..453f213b8b89 100644 --- a/google-cloud-dataproc-v1/snippets/snippet_metadata_google.cloud.dataproc.v1.json +++ b/google-cloud-dataproc-v1/snippets/snippet_metadata_google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dataproc-v1", - "version": "1.4.0", + "version": "1.5.0", "language": "RUBY", "apis": [ { From 56eb15763921e3351377c3ba09c82b37ea7723a6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:22:17 -0700 Subject: [PATCH 107/457] chore(main): release google-cloud-network_services-v1 2.2.0 (#30520) --- .release-please-manifest.json | 2 +- google-cloud-network_services-v1/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/network_services/v1/version.rb | 2 +- ...snippet_metadata_google.cloud.networkservices.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 33337fca86e1..c409a0a27561 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -527,7 +527,7 @@ "google-cloud-network_security-v1beta1+FILLER": "0.0.0", "google-cloud-network_services": "2.0.1", "google-cloud-network_services+FILLER": "0.0.0", - "google-cloud-network_services-v1": "2.1.0", + "google-cloud-network_services-v1": "2.2.0", "google-cloud-network_services-v1+FILLER": "0.0.0", "google-cloud-notebooks": "3.0.1", "google-cloud-notebooks+FILLER": "0.0.0", diff --git a/google-cloud-network_services-v1/CHANGELOG.md b/google-cloud-network_services-v1/CHANGELOG.md index cfa016e49028..d053e689ee2b 100644 --- a/google-cloud-network_services-v1/CHANGELOG.md +++ b/google-cloud-network_services-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 2.2.0 (2025-06-16) + +#### Features + +* update NetworkServices protos ([#30508](https://github.com/googleapis/google-cloud-ruby/issues/30508)) +#### Documentation + +* Various updates + ### 2.1.0 (2025-05-12) #### Features diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb index cbfb98ff1110..a37508284f03 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module NetworkServices module V1 - VERSION = "2.1.0" + VERSION = "2.2.0" end end end diff --git a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json index b46e7fba709a..b0aa242e0525 100644 --- a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-network_services-v1", - "version": "2.1.0", + "version": "2.2.0", "language": "RUBY", "apis": [ { From 525a466de661b00a42933c973c7bb86ba674f5be Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:22:32 -0700 Subject: [PATCH 108/457] chore(main): release google-cloud-secret_manager-v1 1.4.0 (#30521) --- .release-please-manifest.json | 2 +- google-cloud-secret_manager-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/secret_manager/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.secretmanager.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c409a0a27561..5d11f0d50175 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -655,7 +655,7 @@ "google-cloud-scheduler-v1beta1+FILLER": "0.0.0", "google-cloud-secret_manager": "2.0.1", "google-cloud-secret_manager+FILLER": "0.0.0", - "google-cloud-secret_manager-v1": "1.3.0", + "google-cloud-secret_manager-v1": "1.4.0", "google-cloud-secret_manager-v1+FILLER": "0.0.0", "google-cloud-secret_manager-v1beta1": "0.18.0", "google-cloud-secret_manager-v1beta1+FILLER": "0.0.0", diff --git a/google-cloud-secret_manager-v1/CHANGELOG.md b/google-cloud-secret_manager-v1/CHANGELOG.md index 61765d63f690..91d372f7ba04 100644 --- a/google-cloud-secret_manager-v1/CHANGELOG.md +++ b/google-cloud-secret_manager-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.4.0 (2025-06-16) + +#### Features + +* update secret manager protos for tags ([#30502](https://github.com/googleapis/google-cloud-ruby/issues/30502)) + ### 1.3.0 (2025-05-12) #### Features diff --git a/google-cloud-secret_manager-v1/lib/google/cloud/secret_manager/v1/version.rb b/google-cloud-secret_manager-v1/lib/google/cloud/secret_manager/v1/version.rb index 4e5280de15f6..a73ca28703ca 100644 --- a/google-cloud-secret_manager-v1/lib/google/cloud/secret_manager/v1/version.rb +++ b/google-cloud-secret_manager-v1/lib/google/cloud/secret_manager/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module SecretManager module V1 - VERSION = "1.3.0" + VERSION = "1.4.0" end end end diff --git a/google-cloud-secret_manager-v1/snippets/snippet_metadata_google.cloud.secretmanager.v1.json b/google-cloud-secret_manager-v1/snippets/snippet_metadata_google.cloud.secretmanager.v1.json index 9cc909f5dac3..ec8b7f43885e 100644 --- a/google-cloud-secret_manager-v1/snippets/snippet_metadata_google.cloud.secretmanager.v1.json +++ b/google-cloud-secret_manager-v1/snippets/snippet_metadata_google.cloud.secretmanager.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-secret_manager-v1", - "version": "1.3.0", + "version": "1.4.0", "language": "RUBY", "apis": [ { From a4c388c35b3608b7c8d826a985aae7ae439e86f4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:24:36 -0700 Subject: [PATCH 109/457] chore(main): release google-cloud-speech-v2 1.2.0 (#30522) --- .release-please-manifest.json | 2 +- google-cloud-speech-v2/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/speech/v2/version.rb | 2 +- .../snippet_metadata_google.cloud.speech.v2.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5d11f0d50175..36a84eb3cdec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -727,7 +727,7 @@ "google-cloud-speech-v1+FILLER": "0.0.0", "google-cloud-speech-v1p1beta1": "0.25.0", "google-cloud-speech-v1p1beta1+FILLER": "0.0.0", - "google-cloud-speech-v2": "1.1.0", + "google-cloud-speech-v2": "1.2.0", "google-cloud-speech-v2+FILLER": "0.0.0", "google-cloud-storage": "1.56.0", "google-cloud-storage+FILLER": "0.0.0", diff --git a/google-cloud-speech-v2/CHANGELOG.md b/google-cloud-speech-v2/CHANGELOG.md index c6e2c1d15577..41b7373f2b86 100644 --- a/google-cloud-speech-v2/CHANGELOG.md +++ b/google-cloud-speech-v2/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 1.2.0 (2025-06-16) + +#### Features + +* add denoiser related configuration +#### Documentation + +* updated description of sample_rate_hertz ([#30509](https://github.com/googleapis/google-cloud-ruby/issues/30509)) + ### 1.1.0 (2025-05-12) #### Features diff --git a/google-cloud-speech-v2/lib/google/cloud/speech/v2/version.rb b/google-cloud-speech-v2/lib/google/cloud/speech/v2/version.rb index 3b48a5fb4c49..bf26ace59fd8 100644 --- a/google-cloud-speech-v2/lib/google/cloud/speech/v2/version.rb +++ b/google-cloud-speech-v2/lib/google/cloud/speech/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Speech module V2 - VERSION = "1.1.0" + VERSION = "1.2.0" end end end diff --git a/google-cloud-speech-v2/snippets/snippet_metadata_google.cloud.speech.v2.json b/google-cloud-speech-v2/snippets/snippet_metadata_google.cloud.speech.v2.json index b41276ef7bd0..39ec20b22baf 100644 --- a/google-cloud-speech-v2/snippets/snippet_metadata_google.cloud.speech.v2.json +++ b/google-cloud-speech-v2/snippets/snippet_metadata_google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-speech-v2", - "version": "1.1.0", + "version": "1.2.0", "language": "RUBY", "apis": [ { From d314d18d96c5c48cbccfeeaa86a9af89ff5123f2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:25:51 -0700 Subject: [PATCH 110/457] feat: Instance.ActivationPolicy field (#30507) feat: Cluster.DenyMaintenancePeriod field feat: InstanceNetworkConfig.network output field feat: InstanceNetworkConfig.allocated_ip_range_override field feat: Backup.create_completion_time output field docs: A comment for field `earliest_restorable_time` docs: A comment for field `status` in message `PscAutoConnectionConfig` --- .../.owlbot-manifest.json | 1 + .../google/cloud/alloydb/v1alpha/gemini_pb.rb | 2 +- .../cloud/alloydb/v1alpha/resources_pb.rb | 8 +- .../google/cloud/alloydb/v1alpha/gemini.rb | 20 +-- .../google/cloud/alloydb/v1alpha/resources.rb | 154 +++++++++++++++++- .../google/cloud/alloydb/v1alpha/service.rb | 3 +- .../proto_docs/google/type/date.rb | 53 ++++++ .../proto_docs/google/type/timeofday.rb | 2 +- 8 files changed, 219 insertions(+), 24 deletions(-) create mode 100644 google-cloud-alloy_db-v1alpha/proto_docs/google/type/date.rb diff --git a/google-cloud-alloy_db-v1alpha/.owlbot-manifest.json b/google-cloud-alloy_db-v1alpha/.owlbot-manifest.json index 5622920d10d0..860d40cd0d38 100644 --- a/google-cloud-alloy_db-v1alpha/.owlbot-manifest.json +++ b/google-cloud-alloy_db-v1alpha/.owlbot-manifest.json @@ -64,6 +64,7 @@ "proto_docs/google/protobuf/timestamp.rb", "proto_docs/google/protobuf/wrappers.rb", "proto_docs/google/rpc/status.rb", + "proto_docs/google/type/date.rb", "proto_docs/google/type/dayofweek.rb", "proto_docs/google/type/expr.rb", "proto_docs/google/type/timeofday.rb", diff --git a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloydb/v1alpha/gemini_pb.rb b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloydb/v1alpha/gemini_pb.rb index d0374d4f4d38..486bd25df5fe 100644 --- a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloydb/v1alpha/gemini_pb.rb +++ b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloydb/v1alpha/gemini_pb.rb @@ -7,7 +7,7 @@ require 'google/api/field_behavior_pb' -descriptor_data = "\n)google/cloud/alloydb/v1alpha/gemini.proto\x12\x1cgoogle.cloud.alloydb.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\",\n\x13GeminiClusterConfig\x12\x15\n\x08\x65ntitled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\"-\n\x14GeminiInstanceConfig\x12\x15\n\x08\x65ntitled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\"c\n\x11GCAInstanceConfig\x12N\n\x0fgca_entitlement\x18\x01 \x01(\x0e\x32\x30.google.cloud.alloydb.v1alpha.GCAEntitlementTypeB\x03\xe0\x41\x03*L\n\x12GCAEntitlementType\x12$\n GCA_ENTITLEMENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCA_STANDARD\x10\x01\x42\xcd\x01\n com.google.cloud.alloydb.v1alphaB\x0bGeminiProtoP\x01Z:cloud.google.com/go/alloydb/apiv1alpha/alloydbpb;alloydbpb\xaa\x02\x1cGoogle.Cloud.AlloyDb.V1Alpha\xca\x02\x1cGoogle\\Cloud\\AlloyDb\\V1alpha\xea\x02\x1fGoogle::Cloud::AlloyDB::V1alphab\x06proto3" +descriptor_data = "\n)google/cloud/alloydb/v1alpha/gemini.proto\x12\x1cgoogle.cloud.alloydb.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\".\n\x13GeminiClusterConfig\x12\x17\n\x08\x65ntitled\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\"/\n\x14GeminiInstanceConfig\x12\x17\n\x08\x65ntitled\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\"c\n\x11GCAInstanceConfig\x12N\n\x0fgca_entitlement\x18\x01 \x01(\x0e\x32\x30.google.cloud.alloydb.v1alpha.GCAEntitlementTypeB\x03\xe0\x41\x03*L\n\x12GCAEntitlementType\x12$\n GCA_ENTITLEMENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCA_STANDARD\x10\x01\x42\xcd\x01\n com.google.cloud.alloydb.v1alphaB\x0bGeminiProtoP\x01Z:cloud.google.com/go/alloydb/apiv1alpha/alloydbpb;alloydbpb\xaa\x02\x1cGoogle.Cloud.AlloyDb.V1Alpha\xca\x02\x1cGoogle\\Cloud\\AlloyDb\\V1alpha\xea\x02\x1fGoogle::Cloud::AlloyDB::V1alphab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloydb/v1alpha/resources_pb.rb b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloydb/v1alpha/resources_pb.rb index 0c19d2c58542..533117bb0017 100644 --- a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloydb/v1alpha/resources_pb.rb +++ b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloydb/v1alpha/resources_pb.rb @@ -12,11 +12,12 @@ require 'google/protobuf/duration_pb' require 'google/protobuf/timestamp_pb' require 'google/protobuf/wrappers_pb' +require 'google/type/date_pb' require 'google/type/dayofweek_pb' require 'google/type/timeofday_pb' -descriptor_data = "\n,google/cloud/alloydb/v1alpha/resources.proto\x12\x1cgoogle.cloud.alloydb.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/alloydb/v1alpha/csql_resources.proto\x1a)google/cloud/alloydb/v1alpha/gemini.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\".\n\x0cUserPassword\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xe8\x01\n\x0fMigrationSource\x12\x16\n\thost_port\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0creference_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12[\n\x0bsource_type\x18\x03 \x01(\x0e\x32\x41.google.cloud.alloydb.v1alpha.MigrationSource.MigrationSourceTypeB\x03\xe0\x41\x03\"E\n\x13MigrationSourceType\x12%\n!MIGRATION_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44MS\x10\x01\"(\n\x10\x45ncryptionConfig\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\"\x8b\x02\n\x0e\x45ncryptionInfo\x12O\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.alloydb.v1alpha.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\x88\x03\n\tSslConfig\x12\x46\n\x08ssl_mode\x18\x01 \x01(\x0e\x32/.google.cloud.alloydb.v1alpha.SslConfig.SslModeB\x03\xe0\x41\x01\x12H\n\tca_source\x18\x02 \x01(\x0e\x32\x30.google.cloud.alloydb.v1alpha.SslConfig.CaSourceB\x03\xe0\x41\x01\"\xaa\x01\n\x07SslMode\x12\x18\n\x14SSL_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x0eSSL_MODE_ALLOW\x10\x01\x1a\x02\x08\x01\x12\x18\n\x10SSL_MODE_REQUIRE\x10\x02\x1a\x02\x08\x01\x12\x1a\n\x12SSL_MODE_VERIFY_CA\x10\x03\x1a\x02\x08\x01\x12#\n\x1f\x41LLOW_UNENCRYPTED_AND_ENCRYPTED\x10\x04\x12\x12\n\x0e\x45NCRYPTED_ONLY\x10\x05\"<\n\x08\x43\x61Source\x12\x19\n\x15\x43\x41_SOURCE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43\x41_SOURCE_MANAGED\x10\x01\"\xfe\x06\n\x15\x41utomatedBackupPolicy\x12]\n\x0fweekly_schedule\x18\x02 \x01(\x0b\x32\x42.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.WeeklyScheduleH\x00\x12\x66\n\x14time_based_retention\x18\x04 \x01(\x0b\x32\x46.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.TimeBasedRetentionH\x01\x12n\n\x18quantity_based_retention\x18\x05 \x01(\x0b\x32J.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.QuantityBasedRetentionH\x01\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x02\x88\x01\x01\x12\x30\n\rbackup_window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12N\n\x11\x65ncryption_config\x18\x08 \x01(\x0b\x32..google.cloud.alloydb.v1alpha.EncryptionConfigB\x03\xe0\x41\x01\x12\x10\n\x08location\x18\x06 \x01(\t\x12O\n\x06labels\x18\x07 \x03(\x0b\x32?.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.LabelsEntry\x1ak\n\x0eWeeklySchedule\x12+\n\x0bstart_times\x18\x01 \x03(\x0b\x32\x16.google.type.TimeOfDay\x12,\n\x0c\x64\x61ys_of_week\x18\x02 \x03(\x0e\x32\x16.google.type.DayOfWeek\x1aI\n\x12TimeBasedRetention\x12\x33\n\x10retention_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\'\n\x16QuantityBasedRetention\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08scheduleB\x0b\n\tretentionB\n\n\x08_enabled\"\xa3\x01\n\x16\x43ontinuousBackupConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x14recovery_window_days\x18\x04 \x01(\x05\x12I\n\x11\x65ncryption_config\x18\x03 \x01(\x0b\x32..google.cloud.alloydb.v1alpha.EncryptionConfigB\n\n\x08_enabled\"\x8b\x02\n\x14\x43ontinuousBackupInfo\x12J\n\x0f\x65ncryption_info\x18\x01 \x01(\x0b\x32,.google.cloud.alloydb.v1alpha.EncryptionInfoB\x03\xe0\x41\x03\x12\x35\n\x0c\x65nabled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x08schedule\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x03\x12\x41\n\x18\x65\x61rliest_restorable_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"c\n\x0c\x42\x61\x63kupSource\x12\x17\n\nbackup_uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x62\x61\x63kup_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61lloydb.googleapis.com/Backup\"f\n\x16\x43ontinuousBackupSource\x12\x14\n\x07\x63luster\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\rpoint_in_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xe5\x01\n\x17MaintenanceUpdatePolicy\x12\x64\n\x13maintenance_windows\x18\x01 \x03(\x0b\x32G.google.cloud.alloydb.v1alpha.MaintenanceUpdatePolicy.MaintenanceWindow\x1a\x64\n\x11MaintenanceWindow\x12#\n\x03\x64\x61y\x18\x01 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12*\n\nstart_time\x18\x02 \x01(\x0b\x32\x16.google.type.TimeOfDay\"J\n\x13MaintenanceSchedule\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xbd\x1a\n\x07\x43luster\x12H\n\rbackup_source\x18\x0f \x01(\x0b\x32*.google.cloud.alloydb.v1alpha.BackupSourceB\x03\xe0\x41\x03H\x00\x12N\n\x10migration_source\x18\x10 \x01(\x0b\x32-.google.cloud.alloydb.v1alpha.MigrationSourceB\x03\xe0\x41\x03H\x00\x12`\n\x1a\x63loudsql_backup_run_source\x18* \x01(\x0b\x32\x35.google.cloud.alloydb.v1alpha.CloudSQLBackupRunSourceB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.alloydb.v1alpha.Cluster.LabelsEntry\x12?\n\x05state\x18\x08 \x01(\x0e\x32+.google.cloud.alloydb.v1alpha.Cluster.StateB\x03\xe0\x41\x03\x12L\n\x0c\x63luster_type\x18\x18 \x01(\x0e\x32\x31.google.cloud.alloydb.v1alpha.Cluster.ClusterTypeB\x03\xe0\x41\x03\x12L\n\x10\x64\x61tabase_version\x18\t \x01(\x0e\x32-.google.cloud.alloydb.v1alpha.DatabaseVersionB\x03\xe0\x41\x01\x12P\n\x0enetwork_config\x18\x1d \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.Cluster.NetworkConfigB\x03\xe0\x41\x01\x12\x39\n\x07network\x18\n \x01(\tB(\x18\x01\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x0c\n\x04\x65tag\x18\x0b \x01(\t\x12K\n\x0b\x61nnotations\x18\x0c \x03(\x0b\x32\x36.google.cloud.alloydb.v1alpha.Cluster.AnnotationsEntry\x12\x18\n\x0breconciling\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12\x45\n\x0cinitial_user\x18\x0e \x01(\x0b\x32*.google.cloud.alloydb.v1alpha.UserPasswordB\x03\xe0\x41\x04\x12T\n\x17\x61utomated_backup_policy\x18\x11 \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy\x12?\n\nssl_config\x18\x12 \x01(\x0b\x32\'.google.cloud.alloydb.v1alpha.SslConfigB\x02\x18\x01\x12N\n\x11\x65ncryption_config\x18\x13 \x01(\x0b\x32..google.cloud.alloydb.v1alpha.EncryptionConfigB\x03\xe0\x41\x01\x12J\n\x0f\x65ncryption_info\x18\x14 \x01(\x0b\x32,.google.cloud.alloydb.v1alpha.EncryptionInfoB\x03\xe0\x41\x03\x12[\n\x18\x63ontinuous_backup_config\x18\x1b \x01(\x0b\x32\x34.google.cloud.alloydb.v1alpha.ContinuousBackupConfigB\x03\xe0\x41\x01\x12W\n\x16\x63ontinuous_backup_info\x18\x1c \x01(\x0b\x32\x32.google.cloud.alloydb.v1alpha.ContinuousBackupInfoB\x03\xe0\x41\x03\x12O\n\x10secondary_config\x18\x16 \x01(\x0b\x32\x35.google.cloud.alloydb.v1alpha.Cluster.SecondaryConfig\x12P\n\x0eprimary_config\x18\x17 \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.Cluster.PrimaryConfigB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18! \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12H\n\npsc_config\x18\x1f \x01(\x0b\x32/.google.cloud.alloydb.v1alpha.Cluster.PscConfigB\x03\xe0\x41\x01\x12]\n\x19maintenance_update_policy\x18 \x01(\x0b\x32\x35.google.cloud.alloydb.v1alpha.MaintenanceUpdatePolicyB\x03\xe0\x41\x01\x12T\n\x14maintenance_schedule\x18% \x01(\x0b\x32\x31.google.cloud.alloydb.v1alpha.MaintenanceScheduleB\x03\xe0\x41\x03\x12M\n\rgemini_config\x18$ \x01(\x0b\x32\x31.google.cloud.alloydb.v1alpha.GeminiClusterConfigB\x03\xe0\x41\x01\x12N\n\x11subscription_type\x18& \x01(\x0e\x32..google.cloud.alloydb.v1alpha.SubscriptionTypeB\x03\xe0\x41\x01\x12P\n\x0etrial_metadata\x18\' \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.Cluster.TrialMetadataB\x03\xe0\x41\x03\x12H\n\x04tags\x18) \x03(\x0b\x32/.google.cloud.alloydb.v1alpha.Cluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1ai\n\rNetworkConfig\x12\x37\n\x07network\x18\x01 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1f\n\x12\x61llocated_ip_range\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a/\n\x0fSecondaryConfig\x12\x1c\n\x14primary_cluster_name\x18\x01 \x01(\t\x1a\x35\n\rPrimaryConfig\x12$\n\x17secondary_cluster_names\x18\x01 \x03(\tB\x03\xe0\x41\x03\x1aP\n\tPscConfig\x12\x18\n\x0bpsc_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1cservice_owned_project_number\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a\xd3\x01\n\rTrialMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cupgrade_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0egrace_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\t\n\x05\x45MPTY\x10\x03\x12\x0c\n\x08\x43REATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x07\x12\x0f\n\x0bMAINTENANCE\x10\x08\x12\r\n\tPROMOTING\x10\t\"G\n\x0b\x43lusterType\x12\x1c\n\x18\x43LUSTER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02:u\xea\x41r\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterR\x01\x01\x42\x08\n\x06source\"\x9b$\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x07 \x03(\x0b\x32\x32.google.cloud.alloydb.v1alpha.Instance.LabelsEntry\x12@\n\x05state\x18\x08 \x01(\x0e\x32,.google.cloud.alloydb.v1alpha.Instance.StateB\x03\xe0\x41\x03\x12O\n\rinstance_type\x18\t \x01(\x0e\x32\x33.google.cloud.alloydb.v1alpha.Instance.InstanceTypeB\x03\xe0\x41\x02\x12L\n\x0emachine_config\x18\n \x01(\x0b\x32\x34.google.cloud.alloydb.v1alpha.Instance.MachineConfig\x12R\n\x11\x61vailability_type\x18\x0b \x01(\x0e\x32\x37.google.cloud.alloydb.v1alpha.Instance.AvailabilityType\x12\x10\n\x08gce_zone\x18\x0c \x01(\t\x12Q\n\x0e\x64\x61tabase_flags\x18\r \x03(\x0b\x32\x39.google.cloud.alloydb.v1alpha.Instance.DatabaseFlagsEntry\x12G\n\rwritable_node\x18\x13 \x01(\x0b\x32+.google.cloud.alloydb.v1alpha.Instance.NodeB\x03\xe0\x41\x03\x12?\n\x05nodes\x18\x14 \x03(\x0b\x32+.google.cloud.alloydb.v1alpha.Instance.NodeB\x03\xe0\x41\x03\x12\x61\n\x15query_insights_config\x18\x15 \x01(\x0b\x32\x42.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig\x12`\n\x14observability_config\x18\x1a \x01(\x0b\x32\x42.google.cloud.alloydb.v1alpha.Instance.ObservabilityInstanceConfig\x12O\n\x10read_pool_config\x18\x0e \x01(\x0b\x32\x35.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig\x12\x17\n\nip_address\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x1b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12L\n\x0b\x61nnotations\x18\x12 \x03(\x0b\x32\x37.google.cloud.alloydb.v1alpha.Instance.AnnotationsEntry\x12J\n\rupdate_policy\x18\x16 \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy\x12\x64\n\x18\x63lient_connection_config\x18\x17 \x01(\x0b\x32=.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzi\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x03\xe0\x41\x03\x12Z\n\x13psc_instance_config\x18\x1c \x01(\x0b\x32\x38.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfigB\x03\xe0\x41\x01\x12Y\n\x0enetwork_config\x18\x1d \x01(\x0b\x32<.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigB\x03\xe0\x41\x01\x12N\n\rgemini_config\x18! \x01(\x0b\x32\x32.google.cloud.alloydb.v1alpha.GeminiInstanceConfigB\x03\xe0\x41\x01\x12\x31\n\x1coutbound_public_ip_addresses\x18\" \x03(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12H\n\ngca_config\x18& \x01(\x0b\x32/.google.cloud.alloydb.v1alpha.GCAInstanceConfigB\x03\xe0\x41\x03\x1a\x38\n\rMachineConfig\x12\x11\n\tcpu_count\x18\x01 \x01(\x05\x12\x14\n\x0cmachine_type\x18\x04 \x01(\t\x1aR\n\x04Node\x12\x14\n\x07zone_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02ip\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05state\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\xfa\x01\n\x1bQueryInsightsInstanceConfig\x12$\n\x17record_application_tags\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15record_client_address\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x13query_string_length\x18\x04 \x01(\r\x12#\n\x16query_plans_per_minute\x18\x05 \x01(\rH\x02\x88\x01\x01\x42\x1a\n\x18_record_application_tagsB\x18\n\x16_record_client_addressB\x19\n\x17_query_plans_per_minute\x1a\xac\x04\n\x1bObservabilityInstanceConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1e\n\x11preserve_comments\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11track_wait_events\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x16track_wait_event_types\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12$\n\x17max_query_string_length\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12$\n\x17record_application_tags\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12#\n\x16query_plans_per_minute\x18\x07 \x01(\x05H\x06\x88\x01\x01\x12!\n\x14track_active_queries\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12!\n\x14track_client_address\x18\t \x01(\x08H\x08\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_preserve_commentsB\x14\n\x12_track_wait_eventsB\x19\n\x17_track_wait_event_typesB\x1a\n\x18_max_query_string_lengthB\x1a\n\x18_record_application_tagsB\x19\n\x17_query_plans_per_minuteB\x17\n\x15_track_active_queriesB\x17\n\x15_track_client_address\x1a$\n\x0eReadPoolConfig\x12\x12\n\nnode_count\x18\x01 \x01(\x05\x1a\x92\x01\n\x0cUpdatePolicy\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Mode\":\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0f\n\x0b\x46ORCE_APPLY\x10\x02\x1a{\n\x16\x43lientConnectionConfig\x12\x1f\n\x12require_connectors\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12@\n\nssl_config\x18\x02 \x01(\x0b\x32\'.google.cloud.alloydb.v1alpha.SslConfigB\x03\xe0\x41\x01\x1a\x39\n\x12PscInterfaceConfig\x12#\n\x1bnetwork_attachment_resource\x18\x01 \x01(\t\x1a\xa9\x01\n\x17PscAutoConnectionConfig\x12\x18\n\x10\x63onsumer_project\x18\x01 \x01(\t\x12\x18\n\x10\x63onsumer_network\x18\x02 \x01(\t\x12\x1f\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x13\n\x06status\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x63onsumer_network_status\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a\xbe\x02\n\x11PscInstanceConfig\x12$\n\x17service_attachment_link\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x61llowed_consumer_projects\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpsc_dns_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12]\n\x15psc_interface_configs\x18\x08 \x03(\x0b\x32\x39.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfigB\x03\xe0\x41\x01\x12\x61\n\x14psc_auto_connections\x18\t \x03(\x0b\x32>.google.cloud.alloydb.v1alpha.Instance.PscAutoConnectionConfigB\x03\xe0\x41\x01\x1a\x8c\x02\n\x15InstanceNetworkConfig\x12y\n\x1c\x61uthorized_external_networks\x18\x01 \x03(\x0b\x32N.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetworkB\x03\xe0\x41\x01\x12\x1d\n\x10\x65nable_public_ip\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x65nable_outbound_public_ip\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x11\x41uthorizedNetwork\x12\x1c\n\ncidr_range\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x44\x61tabaseFlagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\x0c\n\x08\x43REATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0f\n\x0bMAINTENANCE\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x08\x12\r\n\tPROMOTING\x10\t\"X\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tREAD_POOL\x10\x02\x12\r\n\tSECONDARY\x10\x03\"N\n\x10\x41vailabilityType\x12!\n\x1d\x41VAILABILITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Instance\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}*\tinstances2\x08instanceR\x01\x01\"\xea\x02\n\x0e\x43onnectionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\nip_address\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x05 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12$\n\x15pem_certificate_chain\x18\x03 \x03(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cinstance_uid\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpsc_dns_name\x18\x06 \x01(\tB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n%alloydb.googleapis.com/ConnectionInfo\x12^projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}/connectionInfo*\x0f\x63onnectionInfos2\x0e\x63onnectionInfo\"\x8d\r\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x06 \x03(\x0b\x32\x30.google.cloud.alloydb.v1alpha.Backup.LabelsEntry\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.alloydb.v1alpha.Backup.StateB\x03\xe0\x41\x03\x12\x37\n\x04type\x18\x08 \x01(\x0e\x32).google.cloud.alloydb.v1alpha.Backup.Type\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x18\n\x0b\x63luster_uid\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12<\n\x0c\x63luster_name\x18\n \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\x12\x18\n\x0breconciling\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12N\n\x11\x65ncryption_config\x18\x0c \x01(\x0b\x32..google.cloud.alloydb.v1alpha.EncryptionConfigB\x03\xe0\x41\x01\x12J\n\x0f\x65ncryption_info\x18\r \x01(\x0b\x32,.google.cloud.alloydb.v1alpha.EncryptionInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12J\n\x0b\x61nnotations\x18\x10 \x03(\x0b\x32\x35.google.cloud.alloydb.v1alpha.Backup.AnnotationsEntry\x12\x17\n\nsize_bytes\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpiry_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x0f\x65xpiry_quantity\x18\x14 \x01(\x0b\x32\x38.google.cloud.alloydb.v1alpha.Backup.QuantityBasedExpiryB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12L\n\x10\x64\x61tabase_version\x18\x16 \x01(\x0e\x32-.google.cloud.alloydb.v1alpha.DatabaseVersionB\x03\xe0\x41\x03\x12G\n\x04tags\x18\x19 \x03(\x0b\x32..google.cloud.alloydb.v1alpha.Backup.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1aW\n\x13QuantityBasedExpiry\x12\x1c\n\x0fretention_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\"\n\x15total_retention_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tAUTOMATED\x10\x02\x12\x0e\n\nCONTINUOUS\x10\x03:p\xea\x41m\n\x1d\x61lloydb.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupR\x01\x01\"\x95\t\n\x15SupportedDatabaseFlag\x12\x65\n\x13string_restrictions\x18\x07 \x01(\x0b\x32\x46.google.cloud.alloydb.v1alpha.SupportedDatabaseFlag.StringRestrictionsH\x00\x12g\n\x14integer_restrictions\x18\x08 \x01(\x0b\x32G.google.cloud.alloydb.v1alpha.SupportedDatabaseFlag.IntegerRestrictionsH\x00\x12\"\n\x18recommended_string_value\x18\n \x01(\tH\x01\x12@\n\x19recommended_integer_value\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tflag_name\x18\x02 \x01(\t\x12Q\n\nvalue_type\x18\x03 \x01(\x0e\x32=.google.cloud.alloydb.v1alpha.SupportedDatabaseFlag.ValueType\x12\x1f\n\x17\x61\x63\x63\x65pts_multiple_values\x18\x04 \x01(\x08\x12L\n\x15supported_db_versions\x18\x05 \x03(\x0e\x32-.google.cloud.alloydb.v1alpha.DatabaseVersion\x12\x1b\n\x13requires_db_restart\x18\x06 \x01(\x08\x12H\n\x05scope\x18\t \x01(\x0e\x32\x39.google.cloud.alloydb.v1alpha.SupportedDatabaseFlag.Scope\x1a,\n\x12StringRestrictions\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x1au\n\x13IntegerRestrictions\x12.\n\tmin_value\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12.\n\tmax_value\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"U\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\t\n\x05\x46LOAT\x10\x03\x12\x08\n\x04NONE\x10\x04\"A\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\x13\n\x0f\x43ONNECTION_POOL\x10\x02:\x97\x01\xea\x41\x93\x01\n,alloydb.googleapis.com/SupportedDatabaseFlag\x12\x34projects/{project}/locations/{location}/flags/{flag}*\x16supportedDatabaseFlags2\x15supportedDatabaseFlagB\x0e\n\x0crestrictionsB\x13\n\x11recommended_value\"\xff\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08password\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x1b\n\x0e\x64\x61tabase_roles\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x43\n\tuser_type\x18\x05 \x01(\x0e\x32+.google.cloud.alloydb.v1alpha.User.UserTypeB\x03\xe0\x41\x01\x12\x1d\n\x10keep_extra_roles\x18\x06 \x01(\x08\x42\x03\xe0\x41\x04\"Q\n\x08UserType\x12\x19\n\x15USER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41LLOYDB_BUILT_IN\x10\x01\x12\x14\n\x10\x41LLOYDB_IAM_USER\x10\x02:y\xea\x41v\n\x1b\x61lloydb.googleapis.com/User\x12Gprojects/{project}/locations/{location}/clusters/{cluster}/users/{user}*\x05users2\x04userR\x01\x01\"\xdc\x01\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x63harset\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcollation\x18\x03 \x01(\tB\x03\xe0\x41\x01:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Database\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/databases/{database}*\tdatabases2\x08\x64\x61tabaseR\x01\x01*^\n\x0cInstanceView\x12\x1d\n\x19INSTANCE_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13INSTANCE_VIEW_BASIC\x10\x01\x12\x16\n\x12INSTANCE_VIEW_FULL\x10\x02*g\n\x0b\x43lusterView\x12\x1c\n\x18\x43LUSTER_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LUSTER_VIEW_BASIC\x10\x01\x12\"\n\x1e\x43LUSTER_VIEW_CONTINUOUS_BACKUP\x10\x02*{\n\x0f\x44\x61tabaseVersion\x12 \n\x1c\x44\x41TABASE_VERSION_UNSPECIFIED\x10\x00\x12\x13\n\x0bPOSTGRES_13\x10\x01\x1a\x02\x08\x01\x12\x0f\n\x0bPOSTGRES_14\x10\x02\x12\x0f\n\x0bPOSTGRES_15\x10\x03\x12\x0f\n\x0bPOSTGRES_16\x10\x04*N\n\x10SubscriptionType\x12!\n\x1dSUBSCRIPTION_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05TRIAL\x10\x02\x42\xcb\x03\n com.google.cloud.alloydb.v1alphaB\x0eResourcesProtoP\x01Z:cloud.google.com/go/alloydb/apiv1alpha/alloydbpb;alloydbpb\xaa\x02\x1cGoogle.Cloud.AlloyDb.V1Alpha\xca\x02\x1cGoogle\\Cloud\\AlloyDb\\V1alpha\xea\x02\x1fGoogle::Cloud::AlloyDB::V1alpha\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" +descriptor_data = "\n,google/cloud/alloydb/v1alpha/resources.proto\x12\x1cgoogle.cloud.alloydb.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/alloydb/v1alpha/csql_resources.proto\x1a)google/cloud/alloydb/v1alpha/gemini.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\".\n\x0cUserPassword\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xe8\x01\n\x0fMigrationSource\x12\x16\n\thost_port\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0creference_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12[\n\x0bsource_type\x18\x03 \x01(\x0e\x32\x41.google.cloud.alloydb.v1alpha.MigrationSource.MigrationSourceTypeB\x03\xe0\x41\x03\"E\n\x13MigrationSourceType\x12%\n!MIGRATION_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44MS\x10\x01\"(\n\x10\x45ncryptionConfig\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\"\x8b\x02\n\x0e\x45ncryptionInfo\x12O\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.alloydb.v1alpha.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\x88\x03\n\tSslConfig\x12\x46\n\x08ssl_mode\x18\x01 \x01(\x0e\x32/.google.cloud.alloydb.v1alpha.SslConfig.SslModeB\x03\xe0\x41\x01\x12H\n\tca_source\x18\x02 \x01(\x0e\x32\x30.google.cloud.alloydb.v1alpha.SslConfig.CaSourceB\x03\xe0\x41\x01\"\xaa\x01\n\x07SslMode\x12\x18\n\x14SSL_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x0eSSL_MODE_ALLOW\x10\x01\x1a\x02\x08\x01\x12\x18\n\x10SSL_MODE_REQUIRE\x10\x02\x1a\x02\x08\x01\x12\x1a\n\x12SSL_MODE_VERIFY_CA\x10\x03\x1a\x02\x08\x01\x12#\n\x1f\x41LLOW_UNENCRYPTED_AND_ENCRYPTED\x10\x04\x12\x12\n\x0e\x45NCRYPTED_ONLY\x10\x05\"<\n\x08\x43\x61Source\x12\x19\n\x15\x43\x41_SOURCE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43\x41_SOURCE_MANAGED\x10\x01\"\xfe\x06\n\x15\x41utomatedBackupPolicy\x12]\n\x0fweekly_schedule\x18\x02 \x01(\x0b\x32\x42.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.WeeklyScheduleH\x00\x12\x66\n\x14time_based_retention\x18\x04 \x01(\x0b\x32\x46.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.TimeBasedRetentionH\x01\x12n\n\x18quantity_based_retention\x18\x05 \x01(\x0b\x32J.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.QuantityBasedRetentionH\x01\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x02\x88\x01\x01\x12\x30\n\rbackup_window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12N\n\x11\x65ncryption_config\x18\x08 \x01(\x0b\x32..google.cloud.alloydb.v1alpha.EncryptionConfigB\x03\xe0\x41\x01\x12\x10\n\x08location\x18\x06 \x01(\t\x12O\n\x06labels\x18\x07 \x03(\x0b\x32?.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.LabelsEntry\x1ak\n\x0eWeeklySchedule\x12+\n\x0bstart_times\x18\x01 \x03(\x0b\x32\x16.google.type.TimeOfDay\x12,\n\x0c\x64\x61ys_of_week\x18\x02 \x03(\x0e\x32\x16.google.type.DayOfWeek\x1aI\n\x12TimeBasedRetention\x12\x33\n\x10retention_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\'\n\x16QuantityBasedRetention\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08scheduleB\x0b\n\tretentionB\n\n\x08_enabled\"\xa3\x01\n\x16\x43ontinuousBackupConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x14recovery_window_days\x18\x04 \x01(\x05\x12I\n\x11\x65ncryption_config\x18\x03 \x01(\x0b\x32..google.cloud.alloydb.v1alpha.EncryptionConfigB\n\n\x08_enabled\"\x8b\x02\n\x14\x43ontinuousBackupInfo\x12J\n\x0f\x65ncryption_info\x18\x01 \x01(\x0b\x32,.google.cloud.alloydb.v1alpha.EncryptionInfoB\x03\xe0\x41\x03\x12\x35\n\x0c\x65nabled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x08schedule\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x03\x12\x41\n\x18\x65\x61rliest_restorable_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"c\n\x0c\x42\x61\x63kupSource\x12\x17\n\nbackup_uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x62\x61\x63kup_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61lloydb.googleapis.com/Backup\"f\n\x16\x43ontinuousBackupSource\x12\x14\n\x07\x63luster\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\rpoint_in_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xe0\x03\n\x17MaintenanceUpdatePolicy\x12\x64\n\x13maintenance_windows\x18\x01 \x03(\x0b\x32G.google.cloud.alloydb.v1alpha.MaintenanceUpdatePolicy.MaintenanceWindow\x12m\n\x18\x64\x65ny_maintenance_periods\x18\x02 \x03(\x0b\x32K.google.cloud.alloydb.v1alpha.MaintenanceUpdatePolicy.DenyMaintenancePeriod\x1a\x64\n\x11MaintenanceWindow\x12#\n\x03\x64\x61y\x18\x01 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12*\n\nstart_time\x18\x02 \x01(\x0b\x32\x16.google.type.TimeOfDay\x1a\x89\x01\n\x15\x44\x65nyMaintenancePeriod\x12%\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12#\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\"J\n\x13MaintenanceSchedule\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xe3\x1a\n\x07\x43luster\x12H\n\rbackup_source\x18\x0f \x01(\x0b\x32*.google.cloud.alloydb.v1alpha.BackupSourceB\x03\xe0\x41\x03H\x00\x12N\n\x10migration_source\x18\x10 \x01(\x0b\x32-.google.cloud.alloydb.v1alpha.MigrationSourceB\x03\xe0\x41\x03H\x00\x12`\n\x1a\x63loudsql_backup_run_source\x18* \x01(\x0b\x32\x35.google.cloud.alloydb.v1alpha.CloudSQLBackupRunSourceB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.alloydb.v1alpha.Cluster.LabelsEntry\x12?\n\x05state\x18\x08 \x01(\x0e\x32+.google.cloud.alloydb.v1alpha.Cluster.StateB\x03\xe0\x41\x03\x12L\n\x0c\x63luster_type\x18\x18 \x01(\x0e\x32\x31.google.cloud.alloydb.v1alpha.Cluster.ClusterTypeB\x03\xe0\x41\x03\x12L\n\x10\x64\x61tabase_version\x18\t \x01(\x0e\x32-.google.cloud.alloydb.v1alpha.DatabaseVersionB\x03\xe0\x41\x01\x12P\n\x0enetwork_config\x18\x1d \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.Cluster.NetworkConfigB\x03\xe0\x41\x01\x12\x39\n\x07network\x18\n \x01(\tB(\x18\x01\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x0c\n\x04\x65tag\x18\x0b \x01(\t\x12K\n\x0b\x61nnotations\x18\x0c \x03(\x0b\x32\x36.google.cloud.alloydb.v1alpha.Cluster.AnnotationsEntry\x12\x18\n\x0breconciling\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12\x45\n\x0cinitial_user\x18\x0e \x01(\x0b\x32*.google.cloud.alloydb.v1alpha.UserPasswordB\x03\xe0\x41\x04\x12T\n\x17\x61utomated_backup_policy\x18\x11 \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy\x12?\n\nssl_config\x18\x12 \x01(\x0b\x32\'.google.cloud.alloydb.v1alpha.SslConfigB\x02\x18\x01\x12N\n\x11\x65ncryption_config\x18\x13 \x01(\x0b\x32..google.cloud.alloydb.v1alpha.EncryptionConfigB\x03\xe0\x41\x01\x12J\n\x0f\x65ncryption_info\x18\x14 \x01(\x0b\x32,.google.cloud.alloydb.v1alpha.EncryptionInfoB\x03\xe0\x41\x03\x12[\n\x18\x63ontinuous_backup_config\x18\x1b \x01(\x0b\x32\x34.google.cloud.alloydb.v1alpha.ContinuousBackupConfigB\x03\xe0\x41\x01\x12W\n\x16\x63ontinuous_backup_info\x18\x1c \x01(\x0b\x32\x32.google.cloud.alloydb.v1alpha.ContinuousBackupInfoB\x03\xe0\x41\x03\x12O\n\x10secondary_config\x18\x16 \x01(\x0b\x32\x35.google.cloud.alloydb.v1alpha.Cluster.SecondaryConfig\x12P\n\x0eprimary_config\x18\x17 \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.Cluster.PrimaryConfigB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18! \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12H\n\npsc_config\x18\x1f \x01(\x0b\x32/.google.cloud.alloydb.v1alpha.Cluster.PscConfigB\x03\xe0\x41\x01\x12]\n\x19maintenance_update_policy\x18 \x01(\x0b\x32\x35.google.cloud.alloydb.v1alpha.MaintenanceUpdatePolicyB\x03\xe0\x41\x01\x12T\n\x14maintenance_schedule\x18% \x01(\x0b\x32\x31.google.cloud.alloydb.v1alpha.MaintenanceScheduleB\x03\xe0\x41\x03\x12O\n\rgemini_config\x18$ \x01(\x0b\x32\x31.google.cloud.alloydb.v1alpha.GeminiClusterConfigB\x05\x18\x01\xe0\x41\x01\x12N\n\x11subscription_type\x18& \x01(\x0e\x32..google.cloud.alloydb.v1alpha.SubscriptionTypeB\x03\xe0\x41\x01\x12P\n\x0etrial_metadata\x18\' \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.Cluster.TrialMetadataB\x03\xe0\x41\x03\x12H\n\x04tags\x18) \x03(\x0b\x32/.google.cloud.alloydb.v1alpha.Cluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12\"\n\x15service_account_email\x18. \x01(\tB\x03\xe0\x41\x03\x1ai\n\rNetworkConfig\x12\x37\n\x07network\x18\x01 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1f\n\x12\x61llocated_ip_range\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a/\n\x0fSecondaryConfig\x12\x1c\n\x14primary_cluster_name\x18\x01 \x01(\t\x1a\x35\n\rPrimaryConfig\x12$\n\x17secondary_cluster_names\x18\x01 \x03(\tB\x03\xe0\x41\x03\x1aP\n\tPscConfig\x12\x18\n\x0bpsc_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1cservice_owned_project_number\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a\xd3\x01\n\rTrialMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cupgrade_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0egrace_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\t\n\x05\x45MPTY\x10\x03\x12\x0c\n\x08\x43REATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x07\x12\x0f\n\x0bMAINTENANCE\x10\x08\x12\r\n\tPROMOTING\x10\t\"G\n\x0b\x43lusterType\x12\x1c\n\x18\x43LUSTER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02:u\xea\x41r\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterR\x01\x01\x42\x08\n\x06source\"\xdf(\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x07 \x03(\x0b\x32\x32.google.cloud.alloydb.v1alpha.Instance.LabelsEntry\x12@\n\x05state\x18\x08 \x01(\x0e\x32,.google.cloud.alloydb.v1alpha.Instance.StateB\x03\xe0\x41\x03\x12O\n\rinstance_type\x18\t \x01(\x0e\x32\x33.google.cloud.alloydb.v1alpha.Instance.InstanceTypeB\x03\xe0\x41\x02\x12L\n\x0emachine_config\x18\n \x01(\x0b\x32\x34.google.cloud.alloydb.v1alpha.Instance.MachineConfig\x12R\n\x11\x61vailability_type\x18\x0b \x01(\x0e\x32\x37.google.cloud.alloydb.v1alpha.Instance.AvailabilityType\x12\x10\n\x08gce_zone\x18\x0c \x01(\t\x12Q\n\x0e\x64\x61tabase_flags\x18\r \x03(\x0b\x32\x39.google.cloud.alloydb.v1alpha.Instance.DatabaseFlagsEntry\x12G\n\rwritable_node\x18\x13 \x01(\x0b\x32+.google.cloud.alloydb.v1alpha.Instance.NodeB\x03\xe0\x41\x03\x12?\n\x05nodes\x18\x14 \x03(\x0b\x32+.google.cloud.alloydb.v1alpha.Instance.NodeB\x03\xe0\x41\x03\x12\x61\n\x15query_insights_config\x18\x15 \x01(\x0b\x32\x42.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig\x12`\n\x14observability_config\x18\x1a \x01(\x0b\x32\x42.google.cloud.alloydb.v1alpha.Instance.ObservabilityInstanceConfig\x12O\n\x10read_pool_config\x18\x0e \x01(\x0b\x32\x35.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig\x12\x17\n\nip_address\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x1b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12L\n\x0b\x61nnotations\x18\x12 \x03(\x0b\x32\x37.google.cloud.alloydb.v1alpha.Instance.AnnotationsEntry\x12J\n\rupdate_policy\x18\x16 \x01(\x0b\x32\x33.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy\x12\x64\n\x18\x63lient_connection_config\x18\x17 \x01(\x0b\x32=.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzi\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x03\xe0\x41\x03\x12Z\n\x13psc_instance_config\x18\x1c \x01(\x0b\x32\x38.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfigB\x03\xe0\x41\x01\x12Y\n\x0enetwork_config\x18\x1d \x01(\x0b\x32<.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigB\x03\xe0\x41\x01\x12P\n\rgemini_config\x18! \x01(\x0b\x32\x32.google.cloud.alloydb.v1alpha.GeminiInstanceConfigB\x05\x18\x01\xe0\x41\x01\x12\x31\n\x1coutbound_public_ip_addresses\x18\" \x03(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12W\n\x11\x61\x63tivation_policy\x18# \x01(\x0e\x32\x37.google.cloud.alloydb.v1alpha.Instance.ActivationPolicyB\x03\xe0\x41\x01\x12`\n\x16\x63onnection_pool_config\x18% \x01(\x0b\x32;.google.cloud.alloydb.v1alpha.Instance.ConnectionPoolConfigB\x03\xe0\x41\x01\x12H\n\ngca_config\x18& \x01(\x0b\x32/.google.cloud.alloydb.v1alpha.GCAInstanceConfigB\x03\xe0\x41\x03\x1a\x38\n\rMachineConfig\x12\x11\n\tcpu_count\x18\x01 \x01(\x05\x12\x14\n\x0cmachine_type\x18\x04 \x01(\t\x1aR\n\x04Node\x12\x14\n\x07zone_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02ip\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05state\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\xfa\x01\n\x1bQueryInsightsInstanceConfig\x12$\n\x17record_application_tags\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15record_client_address\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x13query_string_length\x18\x04 \x01(\r\x12#\n\x16query_plans_per_minute\x18\x05 \x01(\rH\x02\x88\x01\x01\x42\x1a\n\x18_record_application_tagsB\x18\n\x16_record_client_addressB\x19\n\x17_query_plans_per_minute\x1a\xfa\x04\n\x1bObservabilityInstanceConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1e\n\x11preserve_comments\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11track_wait_events\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x16track_wait_event_types\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12$\n\x17max_query_string_length\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12$\n\x17record_application_tags\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12#\n\x16query_plans_per_minute\x18\x07 \x01(\x05H\x06\x88\x01\x01\x12!\n\x14track_active_queries\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12!\n\x14track_client_address\x18\t \x01(\x08H\x08\x88\x01\x01\x12*\n\x1d\x61ssistive_experiences_enabled\x18\n \x01(\x08H\t\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_preserve_commentsB\x14\n\x12_track_wait_eventsB\x19\n\x17_track_wait_event_typesB\x1a\n\x18_max_query_string_lengthB\x1a\n\x18_record_application_tagsB\x19\n\x17_query_plans_per_minuteB\x17\n\x15_track_active_queriesB\x17\n\x15_track_client_addressB \n\x1e_assistive_experiences_enabled\x1a$\n\x0eReadPoolConfig\x12\x12\n\nnode_count\x18\x01 \x01(\x05\x1a\x92\x01\n\x0cUpdatePolicy\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Mode\":\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0f\n\x0b\x46ORCE_APPLY\x10\x02\x1a{\n\x16\x43lientConnectionConfig\x12\x1f\n\x12require_connectors\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12@\n\nssl_config\x18\x02 \x01(\x0b\x32\'.google.cloud.alloydb.v1alpha.SslConfigB\x03\xe0\x41\x01\x1a\x39\n\x12PscInterfaceConfig\x12#\n\x1bnetwork_attachment_resource\x18\x01 \x01(\t\x1a\xa9\x01\n\x17PscAutoConnectionConfig\x12\x18\n\x10\x63onsumer_project\x18\x01 \x01(\t\x12\x18\n\x10\x63onsumer_network\x18\x02 \x01(\t\x12\x1f\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x13\n\x06status\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x63onsumer_network_status\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a\xbe\x02\n\x11PscInstanceConfig\x12$\n\x17service_attachment_link\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x61llowed_consumer_projects\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpsc_dns_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12]\n\x15psc_interface_configs\x18\x08 \x03(\x0b\x32\x39.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfigB\x03\xe0\x41\x01\x12\x61\n\x14psc_auto_connections\x18\t \x03(\x0b\x32>.google.cloud.alloydb.v1alpha.Instance.PscAutoConnectionConfigB\x03\xe0\x41\x01\x1a\xef\x02\n\x15InstanceNetworkConfig\x12y\n\x1c\x61uthorized_external_networks\x18\x01 \x03(\x0b\x32N.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetworkB\x03\xe0\x41\x01\x12\x1d\n\x10\x65nable_public_ip\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x65nable_outbound_public_ip\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n\x07network\x18\x04 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12(\n\x1b\x61llocated_ip_range_override\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x11\x41uthorizedNetwork\x12\x1c\n\ncidr_range\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x1a\x85\x01\n\x14\x43onnectionPoolConfig\x12\x14\n\x07\x65nabled\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\"W\n\x08PoolMode\x12\x19\n\x15POOL_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11POOL_MODE_SESSION\x10\x01\x12\x19\n\x15POOL_MODE_TRANSACTION\x10\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x44\x61tabaseFlagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\x0c\n\x08\x43REATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0f\n\x0bMAINTENANCE\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x08\x12\r\n\tPROMOTING\x10\t\"X\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tREAD_POOL\x10\x02\x12\r\n\tSECONDARY\x10\x03\"N\n\x10\x41vailabilityType\x12!\n\x1d\x41VAILABILITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\"L\n\x10\x41\x63tivationPolicy\x12!\n\x1d\x41\x43TIVATION_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x41LWAYS\x10\x01\x12\t\n\x05NEVER\x10\x02:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Instance\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}*\tinstances2\x08instanceR\x01\x01\"\xea\x02\n\x0e\x43onnectionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\nip_address\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x05 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12$\n\x15pem_certificate_chain\x18\x03 \x03(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cinstance_uid\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpsc_dns_name\x18\x06 \x01(\tB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n%alloydb.googleapis.com/ConnectionInfo\x12^projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}/connectionInfo*\x0f\x63onnectionInfos2\x0e\x63onnectionInfo\"\xce\r\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16\x63reate_completion_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x06 \x03(\x0b\x32\x30.google.cloud.alloydb.v1alpha.Backup.LabelsEntry\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.alloydb.v1alpha.Backup.StateB\x03\xe0\x41\x03\x12\x37\n\x04type\x18\x08 \x01(\x0e\x32).google.cloud.alloydb.v1alpha.Backup.Type\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x18\n\x0b\x63luster_uid\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12<\n\x0c\x63luster_name\x18\n \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\x12\x18\n\x0breconciling\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12N\n\x11\x65ncryption_config\x18\x0c \x01(\x0b\x32..google.cloud.alloydb.v1alpha.EncryptionConfigB\x03\xe0\x41\x01\x12J\n\x0f\x65ncryption_info\x18\r \x01(\x0b\x32,.google.cloud.alloydb.v1alpha.EncryptionInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12J\n\x0b\x61nnotations\x18\x10 \x03(\x0b\x32\x35.google.cloud.alloydb.v1alpha.Backup.AnnotationsEntry\x12\x17\n\nsize_bytes\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpiry_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x0f\x65xpiry_quantity\x18\x14 \x01(\x0b\x32\x38.google.cloud.alloydb.v1alpha.Backup.QuantityBasedExpiryB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12L\n\x10\x64\x61tabase_version\x18\x16 \x01(\x0e\x32-.google.cloud.alloydb.v1alpha.DatabaseVersionB\x03\xe0\x41\x03\x12G\n\x04tags\x18\x19 \x03(\x0b\x32..google.cloud.alloydb.v1alpha.Backup.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1aW\n\x13QuantityBasedExpiry\x12\x1c\n\x0fretention_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\"\n\x15total_retention_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tAUTOMATED\x10\x02\x12\x0e\n\nCONTINUOUS\x10\x03:p\xea\x41m\n\x1d\x61lloydb.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupR\x01\x01\"\x95\t\n\x15SupportedDatabaseFlag\x12\x65\n\x13string_restrictions\x18\x07 \x01(\x0b\x32\x46.google.cloud.alloydb.v1alpha.SupportedDatabaseFlag.StringRestrictionsH\x00\x12g\n\x14integer_restrictions\x18\x08 \x01(\x0b\x32G.google.cloud.alloydb.v1alpha.SupportedDatabaseFlag.IntegerRestrictionsH\x00\x12\"\n\x18recommended_string_value\x18\n \x01(\tH\x01\x12@\n\x19recommended_integer_value\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tflag_name\x18\x02 \x01(\t\x12Q\n\nvalue_type\x18\x03 \x01(\x0e\x32=.google.cloud.alloydb.v1alpha.SupportedDatabaseFlag.ValueType\x12\x1f\n\x17\x61\x63\x63\x65pts_multiple_values\x18\x04 \x01(\x08\x12L\n\x15supported_db_versions\x18\x05 \x03(\x0e\x32-.google.cloud.alloydb.v1alpha.DatabaseVersion\x12\x1b\n\x13requires_db_restart\x18\x06 \x01(\x08\x12H\n\x05scope\x18\t \x01(\x0e\x32\x39.google.cloud.alloydb.v1alpha.SupportedDatabaseFlag.Scope\x1a,\n\x12StringRestrictions\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x1au\n\x13IntegerRestrictions\x12.\n\tmin_value\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12.\n\tmax_value\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"U\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\t\n\x05\x46LOAT\x10\x03\x12\x08\n\x04NONE\x10\x04\"A\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\x13\n\x0f\x43ONNECTION_POOL\x10\x02:\x97\x01\xea\x41\x93\x01\n,alloydb.googleapis.com/SupportedDatabaseFlag\x12\x34projects/{project}/locations/{location}/flags/{flag}*\x16supportedDatabaseFlags2\x15supportedDatabaseFlagB\x0e\n\x0crestrictionsB\x13\n\x11recommended_value\"\xff\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08password\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x1b\n\x0e\x64\x61tabase_roles\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x43\n\tuser_type\x18\x05 \x01(\x0e\x32+.google.cloud.alloydb.v1alpha.User.UserTypeB\x03\xe0\x41\x01\x12\x1d\n\x10keep_extra_roles\x18\x06 \x01(\x08\x42\x03\xe0\x41\x04\"Q\n\x08UserType\x12\x19\n\x15USER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41LLOYDB_BUILT_IN\x10\x01\x12\x14\n\x10\x41LLOYDB_IAM_USER\x10\x02:y\xea\x41v\n\x1b\x61lloydb.googleapis.com/User\x12Gprojects/{project}/locations/{location}/clusters/{cluster}/users/{user}*\x05users2\x04userR\x01\x01\"\xdc\x01\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x63harset\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcollation\x18\x03 \x01(\tB\x03\xe0\x41\x01:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Database\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/databases/{database}*\tdatabases2\x08\x64\x61tabaseR\x01\x01*^\n\x0cInstanceView\x12\x1d\n\x19INSTANCE_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13INSTANCE_VIEW_BASIC\x10\x01\x12\x16\n\x12INSTANCE_VIEW_FULL\x10\x02*g\n\x0b\x43lusterView\x12\x1c\n\x18\x43LUSTER_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LUSTER_VIEW_BASIC\x10\x01\x12\"\n\x1e\x43LUSTER_VIEW_CONTINUOUS_BACKUP\x10\x02*{\n\x0f\x44\x61tabaseVersion\x12 \n\x1c\x44\x41TABASE_VERSION_UNSPECIFIED\x10\x00\x12\x13\n\x0bPOSTGRES_13\x10\x01\x1a\x02\x08\x01\x12\x0f\n\x0bPOSTGRES_14\x10\x02\x12\x0f\n\x0bPOSTGRES_15\x10\x03\x12\x0f\n\x0bPOSTGRES_16\x10\x04*N\n\x10SubscriptionType\x12!\n\x1dSUBSCRIPTION_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05TRIAL\x10\x02\x42\xcb\x03\n com.google.cloud.alloydb.v1alphaB\x0eResourcesProtoP\x01Z:cloud.google.com/go/alloydb/apiv1alpha/alloydbpb;alloydbpb\xaa\x02\x1cGoogle.Cloud.AlloyDb.V1Alpha\xca\x02\x1cGoogle\\Cloud\\AlloyDb\\V1alpha\xea\x02\x1fGoogle::Cloud::AlloyDB::V1alpha\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -34,6 +35,7 @@ ["google.protobuf.Duration", "google/protobuf/duration.proto"], ["google.type.TimeOfDay", "google/type/timeofday.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.Date", "google/type/date.proto"], ["google.cloud.alloydb.v1alpha.CloudSQLBackupRunSource", "google/cloud/alloydb/v1alpha/csql_resources.proto"], ["google.cloud.alloydb.v1alpha.GeminiClusterConfig", "google/cloud/alloydb/v1alpha/gemini.proto"], ["google.protobuf.Int64Value", "google/protobuf/wrappers.proto"], @@ -71,6 +73,7 @@ module V1alpha ContinuousBackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.ContinuousBackupSource").msgclass MaintenanceUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.MaintenanceUpdatePolicy").msgclass MaintenanceUpdatePolicy::MaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.MaintenanceUpdatePolicy.MaintenanceWindow").msgclass + MaintenanceUpdatePolicy::DenyMaintenancePeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.MaintenanceUpdatePolicy.DenyMaintenancePeriod").msgclass MaintenanceSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.MaintenanceSchedule").msgclass Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Cluster").msgclass Cluster::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Cluster.NetworkConfig").msgclass @@ -94,9 +97,12 @@ module V1alpha Instance::PscInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig").msgclass Instance::InstanceNetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig").msgclass Instance::InstanceNetworkConfig::AuthorizedNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork").msgclass + Instance::ConnectionPoolConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.ConnectionPoolConfig").msgclass + Instance::ConnectionPoolConfig::PoolMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.ConnectionPoolConfig.PoolMode").enummodule Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.State").enummodule Instance::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.InstanceType").enummodule Instance::AvailabilityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.AvailabilityType").enummodule + Instance::ActivationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Instance.ActivationPolicy").enummodule ConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.ConnectionInfo").msgclass Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Backup").msgclass Backup::QuantityBasedExpiry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1alpha.Backup.QuantityBasedExpiry").msgclass diff --git a/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/gemini.rb b/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/gemini.rb index c1275952ba9c..e066849b8797 100644 --- a/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/gemini.rb +++ b/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/gemini.rb @@ -21,27 +21,23 @@ module Google module Cloud module AlloyDB module V1alpha - # Cluster level configuration parameters related to the Gemini in Databases - # add-on. + # Deprecated and unused. This message will be removed in the near future. # @!attribute [r] entitled + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] - # Output only. Whether the Gemini in Databases add-on is enabled for the - # cluster. It will be true only if the add-on has been enabled for the - # billing account corresponding to the cluster. Its status is toggled from - # the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs. + # Output only. Deprecated and unused. This field will be removed in the near + # future. class GeminiClusterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # Instance level configuration parameters related to the Gemini in Databases - # add-on. + # Deprecated and unused. This message will be removed in the near future. # @!attribute [r] entitled + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] - # Output only. Whether the Gemini in Databases add-on is enabled for the - # instance. It will be true only if the add-on has been enabled for the - # billing account corresponding to the instance. Its status is toggled from - # the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs. + # Output only. Deprecated and unused. This field will be removed in the near + # future. class GeminiInstanceConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/resources.rb b/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/resources.rb index 7b9bf37d8ec8..4161993e952c 100644 --- a/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/resources.rb +++ b/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/resources.rb @@ -282,12 +282,19 @@ class ContinuousBackupConfig # if ContinuousBackup is not enabled. # @!attribute [r] schedule # @return [::Array<::Google::Type::DayOfWeek>] - # Output only. Days of the week on which a continuous backup is taken. Output - # only field. Ignored if passed into the request. + # Output only. Days of the week on which a continuous backup is taken. # @!attribute [r] earliest_restorable_time # @return [::Google::Protobuf::Timestamp] - # Output only. The earliest restorable time that can be restored to. Output - # only field. + # Output only. The earliest restorable time that can be restored to. If + # continuous backups and recovery was recently enabled, the earliest + # restorable time is the creation time of the earliest eligible backup within + # this cluster's continuous backup recovery window. After a cluster has had + # continuous backups enabled for the duration of its recovery window, the + # earliest restorable time becomes "now minus the recovery window". For + # example, assuming a point in time recovery is attempted at 04/16/2025 + # 3:23:00PM with a 14d recovery window, the earliest restorable time would be + # 04/02/2025 3:23:00PM. This field is only visible if the + # CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided. class ContinuousBackupInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -326,6 +333,9 @@ class ContinuousBackupSource # @!attribute [rw] maintenance_windows # @return [::Array<::Google::Cloud::AlloyDB::V1alpha::MaintenanceUpdatePolicy::MaintenanceWindow>] # Preferred windows to perform maintenance. Currently limited to 1. + # @!attribute [rw] deny_maintenance_periods + # @return [::Array<::Google::Cloud::AlloyDB::V1alpha::MaintenanceUpdatePolicy::DenyMaintenancePeriod>] + # Periods to deny maintenance. Currently limited to 1. class MaintenanceUpdatePolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -342,6 +352,32 @@ class MaintenanceWindow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # DenyMaintenancePeriod definition. Excepting emergencies, maintenance + # will not be scheduled to start within this deny period. The start_date must + # be less than the end_date. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Deny period start date. + # This can be: + # * A full date, with non-zero year, month and day values OR + # * A month and day value, with a zero year for recurring + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Deny period end date. + # This can be: + # * A full date, with non-zero year, month and day values OR + # * A month and day value, with a zero year for recurring + # @!attribute [rw] time + # @return [::Google::Type::TimeOfDay] + # Time in UTC when the deny period starts on start_date and ends on + # end_date. This can be: + # * Full time OR + # * All zeros for 00:00:00 UTC + class DenyMaintenancePeriod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # MaintenanceSchedule stores the maintenance schedule generated from @@ -500,9 +536,10 @@ class MaintenanceSchedule # Output only. The maintenance schedule for the cluster, generated for a # specific rollout if a maintenance window is set. # @!attribute [rw] gemini_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::AlloyDB::V1alpha::GeminiClusterConfig] - # Optional. Configuration parameters related to the Gemini in Databases - # add-on. + # Optional. Deprecated and unused. This field will be removed in the near + # future. # @!attribute [rw] subscription_type # @return [::Google::Cloud::AlloyDB::V1alpha::SubscriptionType] # Optional. Subscription type of the cluster. @@ -517,6 +554,12 @@ class MaintenanceSchedule # "123/environment": "production", # "123/costCenter": "marketing" # ``` + # @!attribute [r] service_account_email + # @return [::String] + # Output only. AlloyDB per-cluster service agent email. This service account + # is created per-cluster per-project, and is different from that of the + # primary service agent which is created per-project. The service account + # naming format is subject to change. class Cluster include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -822,12 +865,25 @@ module ClusterType # @return [::Google::Cloud::AlloyDB::V1alpha::Instance::InstanceNetworkConfig] # Optional. Instance-level network configuration. # @!attribute [rw] gemini_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::AlloyDB::V1alpha::GeminiInstanceConfig] - # Optional. Configuration parameters related to the Gemini in Databases - # add-on. + # Optional. Deprecated and unused. This field will be removed in the near + # future. # @!attribute [r] outbound_public_ip_addresses # @return [::Array<::String>] # Output only. All outbound public IP addresses configured for the instance. + # @!attribute [rw] activation_policy + # @return [::Google::Cloud::AlloyDB::V1alpha::Instance::ActivationPolicy] + # Optional. Specifies whether an instance needs to spin up. Once the instance + # is active, the activation policy can be updated to the `NEVER` to stop the + # instance. Likewise, the activation policy can be updated to `ALWAYS` to + # start the instance. + # There are restrictions around when an instance can/cannot be activated (for + # example, a read pool instance should be stopped before stopping primary + # etc.). Please refer to the API documentation for more details. + # @!attribute [rw] connection_pool_config + # @return [::Google::Cloud::AlloyDB::V1alpha::Instance::ConnectionPoolConfig] + # Optional. The configuration for Managed Connection Pool (MCP). # @!attribute [r] gca_config # @return [::Google::Cloud::AlloyDB::V1alpha::GCAInstanceConfig] # Output only. Configuration parameters related to Gemini Cloud Assist. @@ -936,6 +992,9 @@ class QueryInsightsInstanceConfig # @return [::Boolean] # Track client address for an instance. # If not set, default value is "off". + # @!attribute [rw] assistive_experiences_enabled + # @return [::Boolean] + # Whether assistive experiences are enabled for this AlloyDB instance. class ObservabilityInstanceConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1016,9 +1075,33 @@ class PscInterfaceConfig # @!attribute [r] status # @return [::String] # Output only. The status of the PSC service automation connection. + # Possible values: + # "STATE_UNSPECIFIED" - An invalid state as the default case. + # "ACTIVE" - The connection has been created successfully. + # "FAILED" - The connection is not functional since some resources on the + # connection fail to be created. + # "CREATING" - The connection is being created. + # "DELETING" - The connection is being deleted. + # "CREATE_REPAIRING" - The connection is being repaired to complete + # creation. + # "DELETE_REPAIRING" - The connection is being repaired to complete + # deletion. # @!attribute [r] consumer_network_status # @return [::String] # Output only. The status of the service connection policy. + # Possible values: + # "STATE_UNSPECIFIED" - Default state, when Connection Map is created + # initially. + # "VALID" - Set when policy and map configuration is valid, and their + # matching can lead to allowing creation of PSC Connections subject to + # other constraints like connections limit. + # "CONNECTION_POLICY_MISSING" - No Service Connection Policy found for + # this network and Service Class + # "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for + # this network and Service Class + # "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer instance + # project is not in AllowedGoogleProducersResourceHierarchyLevels of the + # matching ServiceConnectionPolicy. class PscAutoConnectionConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1065,6 +1148,22 @@ class PscInstanceConfig # @return [::Boolean] # Optional. Enabling an outbound public IP address to support a database # server sending requests out into the internet. + # @!attribute [r] network + # @return [::String] + # Output only. The resource link for the VPC network in which instance + # resources are created and from which they are accessible via Private IP. + # This will be the same value as the parent cluster's network. It is + # specified in the form: // + # `projects/{project_number}/global/networks/{network_id}`. + # @!attribute [rw] allocated_ip_range_override + # @return [::String] + # Optional. Name of the allocated IP range for the private IP AlloyDB + # instance, for example: "google-managed-services-default". If set, the + # instance IPs will be created from this allocated range and will override + # the IP range used by the parent cluster. The range name must comply with + # [RFC 1035](http://datatracker.ietf.org/doc/html/rfc1035). Specifically, + # the name must be 1-63 characters long and match the regular expression + # [a-z]([-a-z0-9]*[a-z0-9])?. class InstanceNetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1079,6 +1178,27 @@ class AuthorizedNetwork end end + # Configuration for Managed Connection Pool (MCP). + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Whether to enable Managed Connection Pool (MCP). + class ConnectionPoolConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The pool mode. Defaults to `POOL_MODE_TRANSACTION`. + module PoolMode + # The pool mode is not specified. Defaults to `POOL_MODE_TRANSACTION`. + POOL_MODE_UNSPECIFIED = 0 + + # Server is released back to pool after a client disconnects. + POOL_MODE_SESSION = 1 + + # Server is released back to pool after a transaction finishes. + POOL_MODE_TRANSACTION = 2 + end + end + # @!attribute [rw] key # @return [::String] # @!attribute [rw] value @@ -1178,6 +1298,18 @@ module AvailabilityType # Regional (or Highly) available instance. REGIONAL = 2 end + + # Specifies whether an instance needs to spin up. + module ActivationPolicy + # The policy is not specified. + ACTIVATION_POLICY_UNSPECIFIED = 0 + + # The instance is running. + ALWAYS = 1 + + # The instance is not running. + NEVER = 2 + end end # ConnectionInfo singleton resource. @@ -1238,9 +1370,15 @@ class ConnectionInfo # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. Update time stamp + # + # Users should not infer any meaning from this field. Its value is generally + # unrelated to the timing of the backup creation operation. # @!attribute [r] delete_time # @return [::Google::Protobuf::Timestamp] # Output only. Delete time stamp + # @!attribute [r] create_completion_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource finished being created. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Labels as key value pairs diff --git a/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/service.rb b/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/service.rb index cc4d7ba717cf..523111e87678 100644 --- a/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/service.rb +++ b/google-cloud-alloy_db-v1alpha/proto_docs/google/cloud/alloydb/v1alpha/service.rb @@ -429,7 +429,7 @@ class StageInfo extend ::Google::Protobuf::MessageExts::ClassMethods end - # Details regarding the upgrade of instaces associated with a cluster. + # Details regarding the upgrade of instances associated with a cluster. # @!attribute [rw] name # @return [::String] # Normalized name of the instance. @@ -630,6 +630,7 @@ class PromoteClusterRequest # Message for restoring a Cluster from a backup or another cluster at a given # point in time. + # NEXT_ID: 11 # @!attribute [rw] backup_source # @return [::Google::Cloud::AlloyDB::V1alpha::BackupSource] # Backup source. diff --git a/google-cloud-alloy_db-v1alpha/proto_docs/google/type/date.rb b/google-cloud-alloy_db-v1alpha/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..2f4a77319e09 --- /dev/null +++ b/google-cloud-alloy_db-v1alpha/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are {::Google::Type::TimeOfDay google.type.TimeOfDay} and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-alloy_db-v1alpha/proto_docs/google/type/timeofday.rb b/google-cloud-alloy_db-v1alpha/proto_docs/google/type/timeofday.rb index 048a1ecaf8f0..b288b1b61f57 100644 --- a/google-cloud-alloy_db-v1alpha/proto_docs/google/type/timeofday.rb +++ b/google-cloud-alloy_db-v1alpha/proto_docs/google/type/timeofday.rb @@ -21,7 +21,7 @@ module Google module Type # Represents a time of day. The date and time zone are either not significant # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are [google.type.Date][google.type.Date] and + # types are {::Google::Type::Date google.type.Date} and # `google.protobuf.Timestamp`. # @!attribute [rw] hours # @return [::Integer] From 3bd72936f92a75d29cb650501b3a1b30d620d594 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:28:18 -0700 Subject: [PATCH 111/457] fix: Changed field behavior for an existing field per_unit_storage_throughput. It is now required (#30499) docs: expand on and update various comments --- .../lib/google/cloud/lustre/v1/instance_pb.rb | 2 +- .../google/cloud/lustre/v1/lustre/client.rb | 18 +++++++--- .../cloud/lustre/v1/lustre/rest/client.rb | 18 +++++++--- .../google/cloud/lustre/v1/instance.rb | 7 ++-- .../google/cloud/lustre/v1/transfer.rb | 36 ++++++++++++------- 5 files changed, 54 insertions(+), 27 deletions(-) diff --git a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/instance_pb.rb b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/instance_pb.rb index bb16d67028ef..a26608206bf8 100644 --- a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/instance_pb.rb +++ b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/instance_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n%google/cloud/lustre/v1/instance.proto\x12\x16google.cloud.lustre.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x06\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nfilesystem\x18\n \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x19\n\x0c\x63\x61pacity_gib\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12:\n\x07network\x18\x03 \x01(\tB)\xe0\x41\x05\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12:\n\x05state\x18\x04 \x01(\x0e\x32&.google.cloud.lustre.v1.Instance.StateB\x03\xe0\x41\x03\x12\x18\n\x0bmount_point\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x06labels\x18\t \x03(\x0b\x32,.google.cloud.lustre.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12(\n\x1bper_unit_storage_throughput\x18\x0b \x01(\x03\x42\x03\xe0\x41\x01\x12 \n\x13gke_support_enabled\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\r\n\tUPGRADING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0b\n\x07STOPPED\x10\x06:v\xea\x41s\n\x1elustre.googleapis.com/Instance\x12//`. If a + # path inside the bucket is specified, it must end with a forward slash + # (`/`). # @param name [::String] - # Required. Name of the resource. + # Required. The name of the Managed Lustre instance in the format + # `projects/{project}/locations/{location}/instances/{instance}`. # @param request_id [::String] # Optional. UUID to identify requests. # @param service_account [::String] diff --git a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/lustre/rest/client.rb b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/lustre/rest/client.rb index 05f3eaeb654b..082444d2b6cb 100644 --- a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/lustre/rest/client.rb +++ b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/lustre/rest/client.rb @@ -727,15 +727,18 @@ def delete_instance request, options = nil # # @param gcs_path [::Google::Cloud::Lustre::V1::GcsPath, ::Hash] # The Cloud Storage source bucket and, optionally, path inside the bucket. + # If a path inside the bucket is specified, it must end with a forward + # slash (`/`). # @param lustre_path [::Google::Cloud::Lustre::V1::LustrePath, ::Hash] # Lustre path destination. # @param name [::String] - # Required. Name of the resource. + # Required. The name of the Managed Lustre instance in the format + # `projects/{project}/locations/{location}/instances/{instance}`. # @param request_id [::String] # Optional. UUID to identify requests. # @param service_account [::String] # Optional. User-specified service account used to perform the transfer. - # If unspecified, the default Lustre P4 service account will be used. + # If unspecified, the default Managed Lustre service agent will be used. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -822,11 +825,16 @@ def import_data request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param lustre_path [::Google::Cloud::Lustre::V1::LustrePath, ::Hash] - # Lustre path source. + # The root directory path to the Managed Lustre file system. Must start + # with `/`. Default is `/`. # @param gcs_path [::Google::Cloud::Lustre::V1::GcsPath, ::Hash] - # Cloud Storage destination. + # The URI to a Cloud Storage bucket, or a path within a bucket, using + # the format `gs:////`. If a + # path inside the bucket is specified, it must end with a forward slash + # (`/`). # @param name [::String] - # Required. Name of the resource. + # Required. The name of the Managed Lustre instance in the format + # `projects/{project}/locations/{location}/instances/{instance}`. # @param request_id [::String] # Optional. UUID to identify requests. # @param service_account [::String] diff --git a/google-cloud-lustre-v1/proto_docs/google/cloud/lustre/v1/instance.rb b/google-cloud-lustre-v1/proto_docs/google/cloud/lustre/v1/instance.rb index 4b1f8f00313c..f72c6feb7356 100644 --- a/google-cloud-lustre-v1/proto_docs/google/cloud/lustre/v1/instance.rb +++ b/google-cloud-lustre-v1/proto_docs/google/cloud/lustre/v1/instance.rb @@ -33,7 +33,7 @@ module V1 # @!attribute [rw] capacity_gib # @return [::Integer] # Required. The storage capacity of the instance in gibibytes (GiB). Allowed - # values are from `18000` to `936000`, in increments of 9000. + # values are from `18000` to `954000`, in increments of 9000. # @!attribute [rw] network # @return [::String] # Required. Immutable. The full name of the VPC network to which the instance @@ -60,9 +60,8 @@ module V1 # Optional. Labels as key value pairs. # @!attribute [rw] per_unit_storage_throughput # @return [::Integer] - # Optional. The throughput of the instance in MB/s/TiB. - # Valid values are 250, 500, 1000. - # Default value is 1000. + # Required. The throughput of the instance in MB/s/TiB. + # Valid values are 125, 250, 500, 1000. # @!attribute [rw] gke_support_enabled # @return [::Boolean] # Optional. Indicates whether you want to enable support for GKE clients. By diff --git a/google-cloud-lustre-v1/proto_docs/google/cloud/lustre/v1/transfer.rb b/google-cloud-lustre-v1/proto_docs/google/cloud/lustre/v1/transfer.rb index 8f848f5910d5..9b4cef9db0c4 100644 --- a/google-cloud-lustre-v1/proto_docs/google/cloud/lustre/v1/transfer.rb +++ b/google-cloud-lustre-v1/proto_docs/google/cloud/lustre/v1/transfer.rb @@ -25,34 +25,42 @@ module V1 # @!attribute [rw] gcs_path # @return [::Google::Cloud::Lustre::V1::GcsPath] # The Cloud Storage source bucket and, optionally, path inside the bucket. + # If a path inside the bucket is specified, it must end with a forward + # slash (`/`). # @!attribute [rw] lustre_path # @return [::Google::Cloud::Lustre::V1::LustrePath] # Lustre path destination. # @!attribute [rw] name # @return [::String] - # Required. Name of the resource. + # Required. The name of the Managed Lustre instance in the format + # `projects/{project}/locations/{location}/instances/{instance}`. # @!attribute [rw] request_id # @return [::String] # Optional. UUID to identify requests. # @!attribute [rw] service_account # @return [::String] # Optional. User-specified service account used to perform the transfer. - # If unspecified, the default Lustre P4 service account will be used. + # If unspecified, the default Managed Lustre service agent will be used. class ImportDataRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # Message for exporting data from Lustre. + # Export data from Managed Lustre to a Cloud Storage bucket. # @!attribute [rw] lustre_path # @return [::Google::Cloud::Lustre::V1::LustrePath] - # Lustre path source. + # The root directory path to the Managed Lustre file system. Must start + # with `/`. Default is `/`. # @!attribute [rw] gcs_path # @return [::Google::Cloud::Lustre::V1::GcsPath] - # Cloud Storage destination. + # The URI to a Cloud Storage bucket, or a path within a bucket, using + # the format `gs:////`. If a + # path inside the bucket is specified, it must end with a forward slash + # (`/`). # @!attribute [rw] name # @return [::String] - # Required. Name of the resource. + # Required. The name of the Managed Lustre instance in the format + # `projects/{project}/locations/{location}/instances/{instance}`. # @!attribute [rw] request_id # @return [::String] # Optional. UUID to identify requests. @@ -144,21 +152,25 @@ class ImportDataMetadata extend ::Google::Protobuf::MessageExts::ClassMethods end - # Cloud Storage as the source of a data transfer. + # Specifies a Cloud Storage bucket and, optionally, a path inside the bucket. # @!attribute [rw] uri # @return [::String] - # Required. URI to a Cloud Storage path in the format: - # `gs://`. + # Required. The URI to a Cloud Storage bucket, or a path within a bucket, + # using the format `gs:////`. If a + # path inside the bucket is specified, it must end with a forward slash + # (`/`). class GcsPath include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # LustrePath represents a path in the Lustre file system. + # The root directory path to the Lustre file system. # @!attribute [rw] path # @return [::String] - # Optional. Root directory path to the Managed Lustre file system, starting - # with `/`. Defaults to `/` if unset. + # Optional. The root directory path to the Managed Lustre file system. Must + # start with + # `/`. Default is `/`. If you're importing data into Managed Lustre, any + # path other than the default must already exist on the file system. class LustrePath include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From f50f604c6c8ad8558a36a1f21cf1655da1203139 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 14:08:48 -0700 Subject: [PATCH 112/457] feat: support Azure federated identity (#30478) feat: support BYOSA docs: A comment for message `ObjectConditions` is changed docs: A comment for field `list_url` in message `.google.storagetransfer.v1.HttpData` is changed docs: A comment for field `overwrite_objects_already_existing_in_sink` in message `.google.storagetransfer.v1.TransferOptions` is changed docs: A comment for field `end_time_of_day` in message `.google.storagetransfer.v1.Schedule` is changed docs: A comment for enum value `COPY` in enum `LoggableAction` is changed --- .../storagetransfer/v1/transfer_types_pb.rb | 3 +- .../storagetransfer/v1/transfer_types.rb | 71 +++++++++++++++++-- 2 files changed, 68 insertions(+), 6 deletions(-) diff --git a/google-cloud-storage_transfer-v1/lib/google/storagetransfer/v1/transfer_types_pb.rb b/google-cloud-storage_transfer-v1/lib/google/storagetransfer/v1/transfer_types_pb.rb index 219dacca3245..a5ceb2974016 100644 --- a/google-cloud-storage_transfer-v1/lib/google/storagetransfer/v1/transfer_types_pb.rb +++ b/google-cloud-storage_transfer-v1/lib/google/storagetransfer/v1/transfer_types_pb.rb @@ -13,7 +13,7 @@ require 'google/type/timeofday_pb' -descriptor_data = "\n.google/storagetransfer/v1/transfer_types.proto\x12\x19google.storagetransfer.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15google/rpc/code.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/timeofday.proto\"A\n\x14GoogleServiceAccount\x12\x15\n\raccount_email\x18\x01 \x01(\t\x12\x12\n\nsubject_id\x18\x02 \x01(\t\"J\n\x0c\x41wsAccessKey\x12\x1a\n\raccess_key_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11secret_access_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\"*\n\x10\x41zureCredentials\x12\x16\n\tsas_token\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xd3\x02\n\x10ObjectConditions\x12K\n(min_time_elapsed_since_last_modification\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12K\n(max_time_elapsed_since_last_modification\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10include_prefixes\x18\x03 \x03(\t\x12\x18\n\x10\x65xclude_prefixes\x18\x04 \x03(\t\x12\x37\n\x13last_modified_since\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14last_modified_before\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Z\n\x07GcsData\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\'\n\x1fmanaged_folder_transfer_enabled\x18\x04 \x01(\x08\"\x82\x02\n\tAwsS3Data\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0e\x61ws_access_key\x18\x02 \x01(\x0b\x32\'.google.storagetransfer.v1.AwsAccessKeyB\x03\xe0\x41\x04\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\x10\n\x08role_arn\x18\x04 \x01(\t\x12\x1e\n\x11\x63loudfront_domain\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x63redentials_secret\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12!\n\x17managed_private_network\x18\x08 \x01(\x08H\x00\x42\x11\n\x0fprivate_network\"\xcb\x01\n\x14\x41zureBlobStorageData\x12\x1c\n\x0fstorage_account\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x11\x61zure_credentials\x18\x02 \x01(\x0b\x32+.google.storagetransfer.v1.AzureCredentialsB\x06\xe0\x41\x02\xe0\x41\x04\x12\x16\n\tcontainer\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04path\x18\x05 \x01(\t\x12\x1f\n\x12\x63redentials_secret\x18\x07 \x01(\tB\x03\xe0\x41\x01\"!\n\x08HttpData\x12\x15\n\x08list_url\x18\x01 \x01(\tB\x03\xe0\x41\x02\")\n\x0fPosixFilesystem\x12\x16\n\x0eroot_directory\x18\x01 \x01(\t\"\x18\n\x08HdfsData\x12\x0c\n\x04path\x18\x01 \x01(\t\"\xbd\x01\n\x13\x41wsS3CompatibleData\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\x08\x65ndpoint\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06region\x18\x05 \x01(\t\x12\x46\n\x0bs3_metadata\x18\x04 \x01(\x0b\x32/.google.storagetransfer.v1.S3CompatibleMetadataH\x00\x42\x0f\n\rdata_provider\"\xf6\x05\n\x14S3CompatibleMetadata\x12O\n\x0b\x61uth_method\x18\x01 \x01(\x0e\x32:.google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod\x12S\n\rrequest_model\x18\x02 \x01(\x0e\x32<.google.storagetransfer.v1.S3CompatibleMetadata.RequestModel\x12Q\n\x08protocol\x18\x03 \x01(\x0e\x32?.google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol\x12I\n\x08list_api\x18\x04 \x01(\x0e\x32\x37.google.storagetransfer.v1.S3CompatibleMetadata.ListApi\"m\n\nAuthMethod\x12\x1b\n\x17\x41UTH_METHOD_UNSPECIFIED\x10\x00\x12 \n\x1c\x41UTH_METHOD_AWS_SIGNATURE_V4\x10\x01\x12 \n\x1c\x41UTH_METHOD_AWS_SIGNATURE_V2\x10\x02\"s\n\x0cRequestModel\x12\x1d\n\x19REQUEST_MODEL_UNSPECIFIED\x10\x00\x12&\n\"REQUEST_MODEL_VIRTUAL_HOSTED_STYLE\x10\x01\x12\x1c\n\x18REQUEST_MODEL_PATH_STYLE\x10\x02\"j\n\x0fNetworkProtocol\x12 \n\x1cNETWORK_PROTOCOL_UNSPECIFIED\x10\x00\x12\x1a\n\x16NETWORK_PROTOCOL_HTTPS\x10\x01\x12\x19\n\x15NETWORK_PROTOCOL_HTTP\x10\x02\"J\n\x07ListApi\x12\x18\n\x14LIST_API_UNSPECIFIED\x10\x00\x12\x13\n\x0fLIST_OBJECTS_V2\x10\x01\x12\x10\n\x0cLIST_OBJECTS\x10\x02\"\x93\x03\n\tAgentPool\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.storagetransfer.v1.AgentPool.StateB\x03\xe0\x41\x03\x12L\n\x0f\x62\x61ndwidth_limit\x18\x05 \x01(\x0b\x32\x33.google.storagetransfer.v1.AgentPool.BandwidthLimit\x1a$\n\x0e\x42\x61ndwidthLimit\x12\x12\n\nlimit_mbps\x18\x01 \x01(\x03\"G\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:`\xea\x41]\n)storagetransfer.googleapis.com/agentPools\x12\x30projects/{project_id}/agentPools/{agent_pool_id}\"\x8e\x03\n\x0fTransferOptions\x12\x32\n*overwrite_objects_already_existing_in_sink\x18\x01 \x01(\x08\x12%\n\x1d\x64\x65lete_objects_unique_in_sink\x18\x02 \x01(\x08\x12\x31\n)delete_objects_from_source_after_transfer\x18\x03 \x01(\x08\x12P\n\x0eoverwrite_when\x18\x04 \x01(\x0e\x32\x38.google.storagetransfer.v1.TransferOptions.OverwriteWhen\x12\x44\n\x10metadata_options\x18\x05 \x01(\x0b\x32*.google.storagetransfer.v1.MetadataOptions\"U\n\rOverwriteWhen\x12\x1e\n\x1aOVERWRITE_WHEN_UNSPECIFIED\x10\x00\x12\r\n\tDIFFERENT\x10\x01\x12\t\n\x05NEVER\x10\x02\x12\n\n\x06\x41LWAYS\x10\x03\"\xb0\x08\n\x0cTransferSpec\x12;\n\rgcs_data_sink\x18\x04 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x00\x12\x45\n\x0fposix_data_sink\x18\r \x01(\x0b\x32*.google.storagetransfer.v1.PosixFilesystemH\x00\x12=\n\x0fgcs_data_source\x18\x01 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x01\x12\x42\n\x12\x61ws_s3_data_source\x18\x02 \x01(\x0b\x32$.google.storagetransfer.v1.AwsS3DataH\x01\x12?\n\x10http_data_source\x18\x03 \x01(\x0b\x32#.google.storagetransfer.v1.HttpDataH\x01\x12G\n\x11posix_data_source\x18\x0e \x01(\x0b\x32*.google.storagetransfer.v1.PosixFilesystemH\x01\x12Y\n\x1e\x61zure_blob_storage_data_source\x18\x08 \x01(\x0b\x32/.google.storagetransfer.v1.AzureBlobStorageDataH\x01\x12W\n\x1d\x61ws_s3_compatible_data_source\x18\x13 \x01(\x0b\x32..google.storagetransfer.v1.AwsS3CompatibleDataH\x01\x12?\n\x10hdfs_data_source\x18\x14 \x01(\x0b\x32#.google.storagetransfer.v1.HdfsDataH\x01\x12L\n\x1egcs_intermediate_data_location\x18\x10 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x02\x12\x46\n\x11object_conditions\x18\x05 \x01(\x0b\x32+.google.storagetransfer.v1.ObjectConditions\x12\x44\n\x10transfer_options\x18\x06 \x01(\x0b\x32*.google.storagetransfer.v1.TransferOptions\x12\x46\n\x11transfer_manifest\x18\x0f \x01(\x0b\x32+.google.storagetransfer.v1.TransferManifest\x12\x1e\n\x16source_agent_pool_name\x18\x11 \x01(\t\x12\x1c\n\x14sink_agent_pool_name\x18\x12 \x01(\tB\x0b\n\tdata_sinkB\r\n\x0b\x64\x61ta_sourceB\x1c\n\x1aintermediate_data_location\"\xb7\x02\n\x0fReplicationSpec\x12=\n\x0fgcs_data_source\x18\x01 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x00\x12;\n\rgcs_data_sink\x18\x02 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x01\x12\x46\n\x11object_conditions\x18\x03 \x01(\x0b\x32+.google.storagetransfer.v1.ObjectConditions\x12\x44\n\x10transfer_options\x18\x04 \x01(\x0b\x32*.google.storagetransfer.v1.TransferOptionsB\r\n\x0b\x64\x61ta_sourceB\x0b\n\tdata_sink\"\xf1\x0b\n\x0fMetadataOptions\x12\x43\n\x07symlink\x18\x01 \x01(\x0e\x32\x32.google.storagetransfer.v1.MetadataOptions.Symlink\x12=\n\x04mode\x18\x02 \x01(\x0e\x32/.google.storagetransfer.v1.MetadataOptions.Mode\x12;\n\x03gid\x18\x03 \x01(\x0e\x32..google.storagetransfer.v1.MetadataOptions.GID\x12;\n\x03uid\x18\x04 \x01(\x0e\x32..google.storagetransfer.v1.MetadataOptions.UID\x12;\n\x03\x61\x63l\x18\x05 \x01(\x0e\x32..google.storagetransfer.v1.MetadataOptions.Acl\x12N\n\rstorage_class\x18\x06 \x01(\x0e\x32\x37.google.storagetransfer.v1.MetadataOptions.StorageClass\x12P\n\x0etemporary_hold\x18\x07 \x01(\x0e\x32\x38.google.storagetransfer.v1.MetadataOptions.TemporaryHold\x12\x42\n\x07kms_key\x18\x08 \x01(\x0e\x32\x31.google.storagetransfer.v1.MetadataOptions.KmsKey\x12L\n\x0ctime_created\x18\t \x01(\x0e\x32\x36.google.storagetransfer.v1.MetadataOptions.TimeCreated\"J\n\x07Symlink\x12\x17\n\x13SYMLINK_UNSPECIFIED\x10\x00\x12\x10\n\x0cSYMLINK_SKIP\x10\x01\x12\x14\n\x10SYMLINK_PRESERVE\x10\x02\">\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\r\n\tMODE_SKIP\x10\x01\x12\x11\n\rMODE_PRESERVE\x10\x02\"8\n\x03GID\x12\x13\n\x0fGID_UNSPECIFIED\x10\x00\x12\x0c\n\x08GID_SKIP\x10\x01\x12\x0e\n\nGID_NUMBER\x10\x02\"8\n\x03UID\x12\x13\n\x0fUID_UNSPECIFIED\x10\x00\x12\x0c\n\x08UID_SKIP\x10\x01\x12\x0e\n\nUID_NUMBER\x10\x02\"P\n\x03\x41\x63l\x12\x13\n\x0f\x41\x43L_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41\x43L_DESTINATION_BUCKET_DEFAULT\x10\x01\x12\x10\n\x0c\x41\x43L_PRESERVE\x10\x02\"\xe6\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12,\n(STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT\x10\x01\x12\x1a\n\x16STORAGE_CLASS_PRESERVE\x10\x02\x12\x1a\n\x16STORAGE_CLASS_STANDARD\x10\x03\x12\x1a\n\x16STORAGE_CLASS_NEARLINE\x10\x04\x12\x1a\n\x16STORAGE_CLASS_COLDLINE\x10\x05\x12\x19\n\x15STORAGE_CLASS_ARCHIVE\x10\x06\"e\n\rTemporaryHold\x12\x1e\n\x1aTEMPORARY_HOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13TEMPORARY_HOLD_SKIP\x10\x01\x12\x1b\n\x17TEMPORARY_HOLD_PRESERVE\x10\x02\"_\n\x06KmsKey\x12\x17\n\x13KMS_KEY_UNSPECIFIED\x10\x00\x12&\n\"KMS_KEY_DESTINATION_BUCKET_DEFAULT\x10\x01\x12\x14\n\x10KMS_KEY_PRESERVE\x10\x02\"l\n\x0bTimeCreated\x12\x1c\n\x18TIME_CREATED_UNSPECIFIED\x10\x00\x12\x15\n\x11TIME_CREATED_SKIP\x10\x01\x12(\n$TIME_CREATED_PRESERVE_AS_CUSTOM_TIME\x10\x02\"$\n\x10TransferManifest\x12\x10\n\x08location\x18\x01 \x01(\t\"\x85\x02\n\x08Schedule\x12\x33\n\x13schedule_start_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12,\n\x11schedule_end_date\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x31\n\x11start_time_of_day\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12/\n\x0f\x65nd_time_of_day\x18\x04 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12\x32\n\x0frepeat_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9f\x01\n\x0b\x45ventStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x17\x65vent_stream_start_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1c\x65vent_stream_expiration_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa6\x06\n\x0bTransferJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x03 \x01(\t\x12>\n\rtransfer_spec\x18\x04 \x01(\x0b\x32\'.google.storagetransfer.v1.TransferSpec\x12\x44\n\x10replication_spec\x18\x11 \x01(\x0b\x32*.google.storagetransfer.v1.ReplicationSpec\x12J\n\x13notification_config\x18\x0b \x01(\x0b\x32-.google.storagetransfer.v1.NotificationConfig\x12@\n\x0elogging_config\x18\x0e \x01(\x0b\x32(.google.storagetransfer.v1.LoggingConfig\x12\x35\n\x08schedule\x18\x05 \x01(\x0b\x32#.google.storagetransfer.v1.Schedule\x12<\n\x0c\x65vent_stream\x18\x0f \x01(\x0b\x32&.google.storagetransfer.v1.EventStream\x12=\n\x06status\x18\x06 \x01(\x0e\x32-.google.storagetransfer.v1.TransferJob.Status\x12\x36\n\rcreation_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16last_modification_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rdeletion_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x15latest_operation_name\x18\x0c \x01(\t\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\"8\n\rErrorLogEntry\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rerror_details\x18\x03 \x03(\t\"\x98\x01\n\x0c\x45rrorSummary\x12)\n\nerror_code\x18\x01 \x01(\x0e\x32\x10.google.rpc.CodeB\x03\xe0\x41\x02\x12\x18\n\x0b\x65rror_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x43\n\x11\x65rror_log_entries\x18\x03 \x03(\x0b\x32(.google.storagetransfer.v1.ErrorLogEntry\"\xc3\x06\n\x10TransferCounters\x12!\n\x19objects_found_from_source\x18\x01 \x01(\x03\x12\x1f\n\x17\x62ytes_found_from_source\x18\x02 \x01(\x03\x12$\n\x1cobjects_found_only_from_sink\x18\x03 \x01(\x03\x12\"\n\x1a\x62ytes_found_only_from_sink\x18\x04 \x01(\x03\x12+\n#objects_from_source_skipped_by_sync\x18\x05 \x01(\x03\x12)\n!bytes_from_source_skipped_by_sync\x18\x06 \x01(\x03\x12\x1e\n\x16objects_copied_to_sink\x18\x07 \x01(\x03\x12\x1c\n\x14\x62ytes_copied_to_sink\x18\x08 \x01(\x03\x12#\n\x1bobjects_deleted_from_source\x18\t \x01(\x03\x12!\n\x19\x62ytes_deleted_from_source\x18\n \x01(\x03\x12!\n\x19objects_deleted_from_sink\x18\x0b \x01(\x03\x12\x1f\n\x17\x62ytes_deleted_from_sink\x18\x0c \x01(\x03\x12\"\n\x1aobjects_from_source_failed\x18\r \x01(\x03\x12 \n\x18\x62ytes_from_source_failed\x18\x0e \x01(\x03\x12*\n\"objects_failed_to_delete_from_sink\x18\x0f \x01(\x03\x12(\n bytes_failed_to_delete_from_sink\x18\x10 \x01(\x03\x12%\n\x1d\x64irectories_found_from_source\x18\x11 \x01(\x03\x12.\n&directories_failed_to_list_from_source\x18\x12 \x01(\x03\x12\x33\n+directories_successfully_listed_from_source\x18\x13 \x01(\x03\x12\'\n\x1fintermediate_objects_cleaned_up\x18\x16 \x01(\x03\x12.\n&intermediate_objects_failed_cleaned_up\x18\x17 \x01(\x03\"\xa5\x03\n\x12NotificationConfig\x12\x19\n\x0cpubsub_topic\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\x0b\x65vent_types\x18\x02 \x03(\x0e\x32\x37.google.storagetransfer.v1.NotificationConfig.EventType\x12X\n\x0epayload_format\x18\x03 \x01(\x0e\x32;.google.storagetransfer.v1.NotificationConfig.PayloadFormatB\x03\xe0\x41\x02\"\x86\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTRANSFER_OPERATION_SUCCESS\x10\x01\x12\x1d\n\x19TRANSFER_OPERATION_FAILED\x10\x02\x12\x1e\n\x1aTRANSFER_OPERATION_ABORTED\x10\x03\"C\n\rPayloadFormat\x12\x1e\n\x1aPAYLOAD_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04JSON\x10\x02\"\x8b\x03\n\rLoggingConfig\x12L\n\x0blog_actions\x18\x01 \x03(\x0e\x32\x37.google.storagetransfer.v1.LoggingConfig.LoggableAction\x12W\n\x11log_action_states\x18\x02 \x03(\x0e\x32<.google.storagetransfer.v1.LoggingConfig.LoggableActionState\x12\'\n\x1f\x65nable_onprem_gcs_transfer_logs\x18\x03 \x01(\x08\"Q\n\x0eLoggableAction\x12\x1f\n\x1bLOGGABLE_ACTION_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46IND\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\"W\n\x13LoggableActionState\x12%\n!LOGGABLE_ACTION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\"\xc4\x05\n\x11TransferOperation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12>\n\rtransfer_spec\x18\x03 \x01(\x0b\x32\'.google.storagetransfer.v1.TransferSpec\x12J\n\x13notification_config\x18\n \x01(\x0b\x32-.google.storagetransfer.v1.NotificationConfig\x12@\n\x0elogging_config\x18\x0c \x01(\x0b\x32(.google.storagetransfer.v1.LoggingConfig\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x06status\x18\x06 \x01(\x0e\x32\x33.google.storagetransfer.v1.TransferOperation.Status\x12=\n\x08\x63ounters\x18\x07 \x01(\x0b\x32+.google.storagetransfer.v1.TransferCounters\x12\x41\n\x10\x65rror_breakdowns\x18\x08 \x03(\x0b\x32\'.google.storagetransfer.v1.ErrorSummary\x12\x19\n\x11transfer_job_name\x18\t \x01(\t\"\x7f\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07\x41\x42ORTED\x10\x05\x12\n\n\x06QUEUED\x10\x06\x12\x0e\n\nSUSPENDING\x10\x07\x42\xec\x01\n#com.google.storagetransfer.v1.protoB\rTransferTypesZMcloud.google.com/go/storagetransfer/apiv1/storagetransferpb;storagetransferpb\xaa\x02\x1fGoogle.Cloud.StorageTransfer.V1\xca\x02\x1fGoogle\\Cloud\\StorageTransfer\\V1\xea\x02\"Google::Cloud::StorageTransfer::V1b\x06proto3" +descriptor_data = "\n.google/storagetransfer/v1/transfer_types.proto\x12\x19google.storagetransfer.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15google/rpc/code.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/timeofday.proto\"A\n\x14GoogleServiceAccount\x12\x15\n\raccount_email\x18\x01 \x01(\t\x12\x12\n\nsubject_id\x18\x02 \x01(\t\"J\n\x0c\x41wsAccessKey\x12\x1a\n\raccess_key_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11secret_access_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\"*\n\x10\x41zureCredentials\x12\x16\n\tsas_token\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xd3\x02\n\x10ObjectConditions\x12K\n(min_time_elapsed_since_last_modification\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12K\n(max_time_elapsed_since_last_modification\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10include_prefixes\x18\x03 \x03(\t\x12\x18\n\x10\x65xclude_prefixes\x18\x04 \x03(\t\x12\x37\n\x13last_modified_since\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14last_modified_before\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Z\n\x07GcsData\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\'\n\x1fmanaged_folder_transfer_enabled\x18\x04 \x01(\x08\"\x82\x02\n\tAwsS3Data\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0e\x61ws_access_key\x18\x02 \x01(\x0b\x32\'.google.storagetransfer.v1.AwsAccessKeyB\x03\xe0\x41\x04\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\x10\n\x08role_arn\x18\x04 \x01(\t\x12\x1e\n\x11\x63loudfront_domain\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x63redentials_secret\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12!\n\x17managed_private_network\x18\x08 \x01(\x08H\x00\x42\x11\n\x0fprivate_network\"\x87\x03\n\x14\x41zureBlobStorageData\x12\x1c\n\x0fstorage_account\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x11\x61zure_credentials\x18\x02 \x01(\x0b\x32+.google.storagetransfer.v1.AzureCredentialsB\x06\xe0\x41\x02\xe0\x41\x04\x12\x16\n\tcontainer\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04path\x18\x05 \x01(\t\x12\x1f\n\x12\x63redentials_secret\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12o\n\x19\x66\x65\x64\x65rated_identity_config\x18\x08 \x01(\x0b\x32G.google.storagetransfer.v1.AzureBlobStorageData.FederatedIdentityConfigB\x03\xe0\x41\x01\x1aI\n\x17\x46\x65\x64\x65ratedIdentityConfig\x12\x16\n\tclient_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttenant_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"!\n\x08HttpData\x12\x15\n\x08list_url\x18\x01 \x01(\tB\x03\xe0\x41\x02\")\n\x0fPosixFilesystem\x12\x16\n\x0eroot_directory\x18\x01 \x01(\t\"\x18\n\x08HdfsData\x12\x0c\n\x04path\x18\x01 \x01(\t\"\xbd\x01\n\x13\x41wsS3CompatibleData\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x15\n\x08\x65ndpoint\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06region\x18\x05 \x01(\t\x12\x46\n\x0bs3_metadata\x18\x04 \x01(\x0b\x32/.google.storagetransfer.v1.S3CompatibleMetadataH\x00\x42\x0f\n\rdata_provider\"\xf6\x05\n\x14S3CompatibleMetadata\x12O\n\x0b\x61uth_method\x18\x01 \x01(\x0e\x32:.google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod\x12S\n\rrequest_model\x18\x02 \x01(\x0e\x32<.google.storagetransfer.v1.S3CompatibleMetadata.RequestModel\x12Q\n\x08protocol\x18\x03 \x01(\x0e\x32?.google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol\x12I\n\x08list_api\x18\x04 \x01(\x0e\x32\x37.google.storagetransfer.v1.S3CompatibleMetadata.ListApi\"m\n\nAuthMethod\x12\x1b\n\x17\x41UTH_METHOD_UNSPECIFIED\x10\x00\x12 \n\x1c\x41UTH_METHOD_AWS_SIGNATURE_V4\x10\x01\x12 \n\x1c\x41UTH_METHOD_AWS_SIGNATURE_V2\x10\x02\"s\n\x0cRequestModel\x12\x1d\n\x19REQUEST_MODEL_UNSPECIFIED\x10\x00\x12&\n\"REQUEST_MODEL_VIRTUAL_HOSTED_STYLE\x10\x01\x12\x1c\n\x18REQUEST_MODEL_PATH_STYLE\x10\x02\"j\n\x0fNetworkProtocol\x12 \n\x1cNETWORK_PROTOCOL_UNSPECIFIED\x10\x00\x12\x1a\n\x16NETWORK_PROTOCOL_HTTPS\x10\x01\x12\x19\n\x15NETWORK_PROTOCOL_HTTP\x10\x02\"J\n\x07ListApi\x12\x18\n\x14LIST_API_UNSPECIFIED\x10\x00\x12\x13\n\x0fLIST_OBJECTS_V2\x10\x01\x12\x10\n\x0cLIST_OBJECTS\x10\x02\"\x93\x03\n\tAgentPool\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.storagetransfer.v1.AgentPool.StateB\x03\xe0\x41\x03\x12L\n\x0f\x62\x61ndwidth_limit\x18\x05 \x01(\x0b\x32\x33.google.storagetransfer.v1.AgentPool.BandwidthLimit\x1a$\n\x0e\x42\x61ndwidthLimit\x12\x12\n\nlimit_mbps\x18\x01 \x01(\x03\"G\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:`\xea\x41]\n)storagetransfer.googleapis.com/agentPools\x12\x30projects/{project_id}/agentPools/{agent_pool_id}\"\x8e\x03\n\x0fTransferOptions\x12\x32\n*overwrite_objects_already_existing_in_sink\x18\x01 \x01(\x08\x12%\n\x1d\x64\x65lete_objects_unique_in_sink\x18\x02 \x01(\x08\x12\x31\n)delete_objects_from_source_after_transfer\x18\x03 \x01(\x08\x12P\n\x0eoverwrite_when\x18\x04 \x01(\x0e\x32\x38.google.storagetransfer.v1.TransferOptions.OverwriteWhen\x12\x44\n\x10metadata_options\x18\x05 \x01(\x0b\x32*.google.storagetransfer.v1.MetadataOptions\"U\n\rOverwriteWhen\x12\x1e\n\x1aOVERWRITE_WHEN_UNSPECIFIED\x10\x00\x12\r\n\tDIFFERENT\x10\x01\x12\t\n\x05NEVER\x10\x02\x12\n\n\x06\x41LWAYS\x10\x03\"\xb0\x08\n\x0cTransferSpec\x12;\n\rgcs_data_sink\x18\x04 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x00\x12\x45\n\x0fposix_data_sink\x18\r \x01(\x0b\x32*.google.storagetransfer.v1.PosixFilesystemH\x00\x12=\n\x0fgcs_data_source\x18\x01 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x01\x12\x42\n\x12\x61ws_s3_data_source\x18\x02 \x01(\x0b\x32$.google.storagetransfer.v1.AwsS3DataH\x01\x12?\n\x10http_data_source\x18\x03 \x01(\x0b\x32#.google.storagetransfer.v1.HttpDataH\x01\x12G\n\x11posix_data_source\x18\x0e \x01(\x0b\x32*.google.storagetransfer.v1.PosixFilesystemH\x01\x12Y\n\x1e\x61zure_blob_storage_data_source\x18\x08 \x01(\x0b\x32/.google.storagetransfer.v1.AzureBlobStorageDataH\x01\x12W\n\x1d\x61ws_s3_compatible_data_source\x18\x13 \x01(\x0b\x32..google.storagetransfer.v1.AwsS3CompatibleDataH\x01\x12?\n\x10hdfs_data_source\x18\x14 \x01(\x0b\x32#.google.storagetransfer.v1.HdfsDataH\x01\x12L\n\x1egcs_intermediate_data_location\x18\x10 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x02\x12\x46\n\x11object_conditions\x18\x05 \x01(\x0b\x32+.google.storagetransfer.v1.ObjectConditions\x12\x44\n\x10transfer_options\x18\x06 \x01(\x0b\x32*.google.storagetransfer.v1.TransferOptions\x12\x46\n\x11transfer_manifest\x18\x0f \x01(\x0b\x32+.google.storagetransfer.v1.TransferManifest\x12\x1e\n\x16source_agent_pool_name\x18\x11 \x01(\t\x12\x1c\n\x14sink_agent_pool_name\x18\x12 \x01(\tB\x0b\n\tdata_sinkB\r\n\x0b\x64\x61ta_sourceB\x1c\n\x1aintermediate_data_location\"\xb7\x02\n\x0fReplicationSpec\x12=\n\x0fgcs_data_source\x18\x01 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x00\x12;\n\rgcs_data_sink\x18\x02 \x01(\x0b\x32\".google.storagetransfer.v1.GcsDataH\x01\x12\x46\n\x11object_conditions\x18\x03 \x01(\x0b\x32+.google.storagetransfer.v1.ObjectConditions\x12\x44\n\x10transfer_options\x18\x04 \x01(\x0b\x32*.google.storagetransfer.v1.TransferOptionsB\r\n\x0b\x64\x61ta_sourceB\x0b\n\tdata_sink\"\xf1\x0b\n\x0fMetadataOptions\x12\x43\n\x07symlink\x18\x01 \x01(\x0e\x32\x32.google.storagetransfer.v1.MetadataOptions.Symlink\x12=\n\x04mode\x18\x02 \x01(\x0e\x32/.google.storagetransfer.v1.MetadataOptions.Mode\x12;\n\x03gid\x18\x03 \x01(\x0e\x32..google.storagetransfer.v1.MetadataOptions.GID\x12;\n\x03uid\x18\x04 \x01(\x0e\x32..google.storagetransfer.v1.MetadataOptions.UID\x12;\n\x03\x61\x63l\x18\x05 \x01(\x0e\x32..google.storagetransfer.v1.MetadataOptions.Acl\x12N\n\rstorage_class\x18\x06 \x01(\x0e\x32\x37.google.storagetransfer.v1.MetadataOptions.StorageClass\x12P\n\x0etemporary_hold\x18\x07 \x01(\x0e\x32\x38.google.storagetransfer.v1.MetadataOptions.TemporaryHold\x12\x42\n\x07kms_key\x18\x08 \x01(\x0e\x32\x31.google.storagetransfer.v1.MetadataOptions.KmsKey\x12L\n\x0ctime_created\x18\t \x01(\x0e\x32\x36.google.storagetransfer.v1.MetadataOptions.TimeCreated\"J\n\x07Symlink\x12\x17\n\x13SYMLINK_UNSPECIFIED\x10\x00\x12\x10\n\x0cSYMLINK_SKIP\x10\x01\x12\x14\n\x10SYMLINK_PRESERVE\x10\x02\">\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\r\n\tMODE_SKIP\x10\x01\x12\x11\n\rMODE_PRESERVE\x10\x02\"8\n\x03GID\x12\x13\n\x0fGID_UNSPECIFIED\x10\x00\x12\x0c\n\x08GID_SKIP\x10\x01\x12\x0e\n\nGID_NUMBER\x10\x02\"8\n\x03UID\x12\x13\n\x0fUID_UNSPECIFIED\x10\x00\x12\x0c\n\x08UID_SKIP\x10\x01\x12\x0e\n\nUID_NUMBER\x10\x02\"P\n\x03\x41\x63l\x12\x13\n\x0f\x41\x43L_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41\x43L_DESTINATION_BUCKET_DEFAULT\x10\x01\x12\x10\n\x0c\x41\x43L_PRESERVE\x10\x02\"\xe6\x01\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12,\n(STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT\x10\x01\x12\x1a\n\x16STORAGE_CLASS_PRESERVE\x10\x02\x12\x1a\n\x16STORAGE_CLASS_STANDARD\x10\x03\x12\x1a\n\x16STORAGE_CLASS_NEARLINE\x10\x04\x12\x1a\n\x16STORAGE_CLASS_COLDLINE\x10\x05\x12\x19\n\x15STORAGE_CLASS_ARCHIVE\x10\x06\"e\n\rTemporaryHold\x12\x1e\n\x1aTEMPORARY_HOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13TEMPORARY_HOLD_SKIP\x10\x01\x12\x1b\n\x17TEMPORARY_HOLD_PRESERVE\x10\x02\"_\n\x06KmsKey\x12\x17\n\x13KMS_KEY_UNSPECIFIED\x10\x00\x12&\n\"KMS_KEY_DESTINATION_BUCKET_DEFAULT\x10\x01\x12\x14\n\x10KMS_KEY_PRESERVE\x10\x02\"l\n\x0bTimeCreated\x12\x1c\n\x18TIME_CREATED_UNSPECIFIED\x10\x00\x12\x15\n\x11TIME_CREATED_SKIP\x10\x01\x12(\n$TIME_CREATED_PRESERVE_AS_CUSTOM_TIME\x10\x02\"$\n\x10TransferManifest\x12\x10\n\x08location\x18\x01 \x01(\t\"\x85\x02\n\x08Schedule\x12\x33\n\x13schedule_start_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12,\n\x11schedule_end_date\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x31\n\x11start_time_of_day\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12/\n\x0f\x65nd_time_of_day\x18\x04 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12\x32\n\x0frepeat_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x9f\x01\n\x0b\x45ventStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x17\x65vent_stream_start_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1c\x65vent_stream_expiration_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc4\x06\n\x0bTransferJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x03 \x01(\t\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12>\n\rtransfer_spec\x18\x04 \x01(\x0b\x32\'.google.storagetransfer.v1.TransferSpec\x12\x44\n\x10replication_spec\x18\x11 \x01(\x0b\x32*.google.storagetransfer.v1.ReplicationSpec\x12J\n\x13notification_config\x18\x0b \x01(\x0b\x32-.google.storagetransfer.v1.NotificationConfig\x12@\n\x0elogging_config\x18\x0e \x01(\x0b\x32(.google.storagetransfer.v1.LoggingConfig\x12\x35\n\x08schedule\x18\x05 \x01(\x0b\x32#.google.storagetransfer.v1.Schedule\x12<\n\x0c\x65vent_stream\x18\x0f \x01(\x0b\x32&.google.storagetransfer.v1.EventStream\x12=\n\x06status\x18\x06 \x01(\x0e\x32-.google.storagetransfer.v1.TransferJob.Status\x12\x36\n\rcreation_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16last_modification_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rdeletion_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x15latest_operation_name\x18\x0c \x01(\t\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\"8\n\rErrorLogEntry\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rerror_details\x18\x03 \x03(\t\"\x98\x01\n\x0c\x45rrorSummary\x12)\n\nerror_code\x18\x01 \x01(\x0e\x32\x10.google.rpc.CodeB\x03\xe0\x41\x02\x12\x18\n\x0b\x65rror_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x43\n\x11\x65rror_log_entries\x18\x03 \x03(\x0b\x32(.google.storagetransfer.v1.ErrorLogEntry\"\xc3\x06\n\x10TransferCounters\x12!\n\x19objects_found_from_source\x18\x01 \x01(\x03\x12\x1f\n\x17\x62ytes_found_from_source\x18\x02 \x01(\x03\x12$\n\x1cobjects_found_only_from_sink\x18\x03 \x01(\x03\x12\"\n\x1a\x62ytes_found_only_from_sink\x18\x04 \x01(\x03\x12+\n#objects_from_source_skipped_by_sync\x18\x05 \x01(\x03\x12)\n!bytes_from_source_skipped_by_sync\x18\x06 \x01(\x03\x12\x1e\n\x16objects_copied_to_sink\x18\x07 \x01(\x03\x12\x1c\n\x14\x62ytes_copied_to_sink\x18\x08 \x01(\x03\x12#\n\x1bobjects_deleted_from_source\x18\t \x01(\x03\x12!\n\x19\x62ytes_deleted_from_source\x18\n \x01(\x03\x12!\n\x19objects_deleted_from_sink\x18\x0b \x01(\x03\x12\x1f\n\x17\x62ytes_deleted_from_sink\x18\x0c \x01(\x03\x12\"\n\x1aobjects_from_source_failed\x18\r \x01(\x03\x12 \n\x18\x62ytes_from_source_failed\x18\x0e \x01(\x03\x12*\n\"objects_failed_to_delete_from_sink\x18\x0f \x01(\x03\x12(\n bytes_failed_to_delete_from_sink\x18\x10 \x01(\x03\x12%\n\x1d\x64irectories_found_from_source\x18\x11 \x01(\x03\x12.\n&directories_failed_to_list_from_source\x18\x12 \x01(\x03\x12\x33\n+directories_successfully_listed_from_source\x18\x13 \x01(\x03\x12\'\n\x1fintermediate_objects_cleaned_up\x18\x16 \x01(\x03\x12.\n&intermediate_objects_failed_cleaned_up\x18\x17 \x01(\x03\"\xa5\x03\n\x12NotificationConfig\x12\x19\n\x0cpubsub_topic\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\x0b\x65vent_types\x18\x02 \x03(\x0e\x32\x37.google.storagetransfer.v1.NotificationConfig.EventType\x12X\n\x0epayload_format\x18\x03 \x01(\x0e\x32;.google.storagetransfer.v1.NotificationConfig.PayloadFormatB\x03\xe0\x41\x02\"\x86\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTRANSFER_OPERATION_SUCCESS\x10\x01\x12\x1d\n\x19TRANSFER_OPERATION_FAILED\x10\x02\x12\x1e\n\x1aTRANSFER_OPERATION_ABORTED\x10\x03\"C\n\rPayloadFormat\x12\x1e\n\x1aPAYLOAD_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04JSON\x10\x02\"\x98\x03\n\rLoggingConfig\x12L\n\x0blog_actions\x18\x01 \x03(\x0e\x32\x37.google.storagetransfer.v1.LoggingConfig.LoggableAction\x12W\n\x11log_action_states\x18\x02 \x03(\x0e\x32<.google.storagetransfer.v1.LoggingConfig.LoggableActionState\x12\'\n\x1f\x65nable_onprem_gcs_transfer_logs\x18\x03 \x01(\x08\"Q\n\x0eLoggableAction\x12\x1f\n\x1bLOGGABLE_ACTION_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46IND\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\"d\n\x13LoggableActionState\x12%\n!LOGGABLE_ACTION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"\xc4\x05\n\x11TransferOperation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12>\n\rtransfer_spec\x18\x03 \x01(\x0b\x32\'.google.storagetransfer.v1.TransferSpec\x12J\n\x13notification_config\x18\n \x01(\x0b\x32-.google.storagetransfer.v1.NotificationConfig\x12@\n\x0elogging_config\x18\x0c \x01(\x0b\x32(.google.storagetransfer.v1.LoggingConfig\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x06status\x18\x06 \x01(\x0e\x32\x33.google.storagetransfer.v1.TransferOperation.Status\x12=\n\x08\x63ounters\x18\x07 \x01(\x0b\x32+.google.storagetransfer.v1.TransferCounters\x12\x41\n\x10\x65rror_breakdowns\x18\x08 \x03(\x0b\x32\'.google.storagetransfer.v1.ErrorSummary\x12\x19\n\x11transfer_job_name\x18\t \x01(\t\"\x7f\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07\x41\x42ORTED\x10\x05\x12\n\n\x06QUEUED\x10\x06\x12\x0e\n\nSUSPENDING\x10\x07\x42\xec\x01\n#com.google.storagetransfer.v1.protoB\rTransferTypesZMcloud.google.com/go/storagetransfer/apiv1/storagetransferpb;storagetransferpb\xaa\x02\x1fGoogle.Cloud.StorageTransfer.V1\xca\x02\x1fGoogle\\Cloud\\StorageTransfer\\V1\xea\x02\"Google::Cloud::StorageTransfer::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -54,6 +54,7 @@ module V1 GcsData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.storagetransfer.v1.GcsData").msgclass AwsS3Data = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.storagetransfer.v1.AwsS3Data").msgclass AzureBlobStorageData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.storagetransfer.v1.AzureBlobStorageData").msgclass + AzureBlobStorageData::FederatedIdentityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.storagetransfer.v1.AzureBlobStorageData.FederatedIdentityConfig").msgclass HttpData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.storagetransfer.v1.HttpData").msgclass PosixFilesystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.storagetransfer.v1.PosixFilesystem").msgclass HdfsData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.storagetransfer.v1.HdfsData").msgclass diff --git a/google-cloud-storage_transfer-v1/proto_docs/google/storagetransfer/v1/transfer_types.rb b/google-cloud-storage_transfer-v1/proto_docs/google/storagetransfer/v1/transfer_types.rb index 0088457d966c..b4171170e1ee 100644 --- a/google-cloud-storage_transfer-v1/proto_docs/google/storagetransfer/v1/transfer_types.rb +++ b/google-cloud-storage_transfer-v1/proto_docs/google/storagetransfer/v1/transfer_types.rb @@ -76,6 +76,13 @@ class AzureCredentials # the `updated` property of Cloud Storage objects, the `LastModified` field # of S3 objects, and the `Last-Modified` header of Azure blobs. # + # For S3 objects, the `LastModified` value is the time the object begins + # uploading. If the object meets your "last modification time" criteria, + # but has not finished uploading, the object is not transferred. See + # [Transfer from Amazon S3 to Cloud + # Storage](https://cloud.google.com/storage-transfer/docs/create-transfers/agentless/s3#transfer_options) + # for more information. + # # Transfers with a {::Google::Cloud::StorageTransfer::V1::PosixFilesystem PosixFilesystem} # source or destination don't support `ObjectConditions`. # @!attribute [rw] min_time_elapsed_since_last_modification @@ -352,9 +359,40 @@ class AwsS3Data # {::Google::Cloud::StorageTransfer::V1::AzureBlobStorageData#azure_credentials azure_credentials}. # # Format: `projects/{project_number}/secrets/{secret_name}` + # @!attribute [rw] federated_identity_config + # @return [::Google::Cloud::StorageTransfer::V1::AzureBlobStorageData::FederatedIdentityConfig] + # Optional. Federated identity config of a user registered Azure application. + # + # If `federated_identity_config` is specified, do not specify + # {::Google::Cloud::StorageTransfer::V1::AzureBlobStorageData#azure_credentials azure_credentials} + # or + # {::Google::Cloud::StorageTransfer::V1::AzureBlobStorageData#credentials_secret credentials_secret}. class AzureBlobStorageData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # The identity of an Azure application through which Storage Transfer Service + # can authenticate requests using Azure workload identity federation. + # + # Storage Transfer Service can issue requests to Azure Storage through + # registered Azure applications, eliminating the need to pass credentials to + # Storage Transfer Service directly. + # + # To configure federated identity, see + # [Configure access to Microsoft Azure + # Storage](https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#option_3_authenticate_using_federated_identity). + # @!attribute [rw] client_id + # @return [::String] + # Required. The client (application) ID of the application with federated + # credentials. + # @!attribute [rw] tenant_id + # @return [::String] + # Required. The tenant (directory) ID of the application with federated + # credentials. + class FederatedIdentityConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # An HttpData resource specifies a list of objects on the web to be @@ -400,8 +438,9 @@ class AzureBlobStorageData # @!attribute [rw] list_url # @return [::String] # Required. The URL that points to the file that stores the object list - # entries. This file must allow public access. Currently, only URLs with - # HTTP and HTTPS schemes are supported. + # entries. This file must allow public access. The URL is either an + # HTTP/HTTPS address (e.g. `https://example.com/urllist.tsv`) or a Cloud + # Storage path (e.g. `gs://my-bucket/urllist.tsv`). class HttpData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -584,7 +623,7 @@ module State # @!attribute [rw] overwrite_objects_already_existing_in_sink # @return [::Boolean] # When to overwrite objects that already exist in the sink. The default is - # that only objects that are different from the source are ovewritten. If + # that only objects that are different from the source are overwritten. If # true, all objects in the sink whose name matches an object in the source # are overwritten with the source object. # @!attribute [rw] delete_objects_unique_in_sink @@ -999,7 +1038,7 @@ class TransferManifest # {::Google::Cloud::StorageTransfer::V1::Schedule#schedule_end_date schedule_end_date}, # `end_time_of_day` specifies the end date and time for starting new transfer # operations. This field must be greater than or equal to the timestamp - # corresponding to the combintation of + # corresponding to the combination of # {::Google::Cloud::StorageTransfer::V1::Schedule#schedule_start_date schedule_start_date} # and # {::Google::Cloud::StorageTransfer::V1::Schedule#start_time_of_day start_time_of_day}, @@ -1080,6 +1119,23 @@ class EventStream # @!attribute [rw] project_id # @return [::String] # The ID of the Google Cloud project that owns the job. + # @!attribute [rw] service_account + # @return [::String] + # Optional. The user-managed service account to which to delegate service + # agent permissions. You can grant Cloud Storage bucket permissions to this + # service account instead of to the Transfer Service service agent. + # + # Format is + # `projects/-/serviceAccounts/ACCOUNT_EMAIL_OR_UNIQUEID` + # + # Either the service account email + # (`SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com`) or the unique + # ID (`123456789012345678901`) are accepted in the string. The `-` + # wildcard character is required; replacing it with a project ID is invalid. + # + # See + # https://cloud.google.com//storage-transfer/docs/delegate-service-agent-permissions + # for required permissions. # @!attribute [rw] transfer_spec # @return [::Google::Cloud::StorageTransfer::V1::TransferSpec] # Transfer specification. @@ -1383,7 +1439,7 @@ module LoggableAction # Deleting objects at the source or the destination. DELETE = 2 - # Copying objects to Google Cloud Storage. + # Copying objects to the destination. COPY = 3 end @@ -1399,6 +1455,11 @@ module LoggableActionState # `LoggableAction` terminated in an error state. `FAILED` actions are # logged as [ERROR][google.logging.type.LogSeverity.ERROR]. FAILED = 2 + + # The `COPY` action was skipped for this file. Only supported for + # agent-based transfers. `SKIPPED` actions are + # logged as [INFO][google.logging.type.LogSeverity.INFO]. + SKIPPED = 3 end end From 87f91d1a55a504dc06aec5efd109937f13651e0f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 15:28:37 -0700 Subject: [PATCH 113/457] feat: Add SchemaViolationReason to IngestionFailureEvent (#30433) docs: Standardize spelling of "acknowledgment" in Pub/Sub protos --- .../cloud/pubsub/v1/subscriber/client.rb | 8 +- .../lib/google/pubsub/v1/pubsub_pb.rb | 4 +- .../google/pubsub/v1/pubsub_services_pb.rb | 2 +- .../proto_docs/google/pubsub/v1/pubsub.rb | 113 +++++++++++++----- 4 files changed, 92 insertions(+), 35 deletions(-) diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/client.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/client.rb index 91bcd79aaf8e..07843cd9de40 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/client.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/client.rb @@ -400,8 +400,8 @@ def logger # # If not set, the default retry policy is applied. This generally implies # that messages will be retried as soon as possible for healthy subscribers. - # RetryPolicy will be triggered on NACKs or acknowledgement deadline - # exceeded events for a given message. + # RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + # events for a given message. # @param detached [::Boolean] # Optional. Indicates whether the subscription is detached from its topic. # Detached subscriptions don't receive messages from their topic and don't @@ -414,7 +414,7 @@ def logger # subscription: # # * The message sent to a subscriber is guaranteed not to be resent - # before the message's acknowledgement deadline expires. + # before the message's acknowledgment deadline expires. # * An acknowledged message will not be resent to a subscriber. # # Note that subscribers may still receive multiple copies of a message @@ -1151,7 +1151,7 @@ def pull request, options = nil ## # Establishes a stream with the server, which sends messages down to the - # client. The client streams acknowledgements and ack deadline modifications + # client. The client streams acknowledgments and ack deadline modifications # back to the server. The server will close the stream and return the status # on any error. The server may close the stream with status `UNAVAILABLE` to # reassign server-side resources, in which case, the client should diff --git a/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_pb.rb b/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_pb.rb index d5def2a41fa9..531699226546 100644 --- a/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_pb.rb +++ b/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_pb.rb @@ -15,7 +15,7 @@ require 'google/pubsub/v1/schema_pb' -descriptor_data = "\n\x1dgoogle/pubsub/v1/pubsub.proto\x12\x10google.pubsub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1dgoogle/pubsub/v1/schema.proto\"a\n\x14MessageStoragePolicy\x12(\n\x1b\x61llowed_persistence_regions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x65nforce_in_transit\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x01\n\x0eSchemaSettings\x12\x34\n\x06schema\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12\x31\n\x08\x65ncoding\x18\x02 \x01(\x0e\x32\x1a.google.pubsub.v1.EncodingB\x03\xe0\x41\x01\x12\x1e\n\x11\x66irst_revision_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10last_revision_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc8\x17\n\x1bIngestionDataSourceSettings\x12T\n\x0b\x61ws_kinesis\x18\x01 \x01(\x0b\x32\x38.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisB\x03\xe0\x41\x01H\x00\x12X\n\rcloud_storage\x18\x02 \x01(\x0b\x32:.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageB\x03\xe0\x41\x01H\x00\x12]\n\x10\x61zure_event_hubs\x18\x03 \x01(\x0b\x32<.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsB\x03\xe0\x41\x01H\x00\x12L\n\x07\x61ws_msk\x18\x05 \x01(\x0b\x32\x34.google.pubsub.v1.IngestionDataSourceSettings.AwsMskB\x03\xe0\x41\x01H\x00\x12\\\n\x0f\x63onfluent_cloud\x18\x06 \x01(\x0b\x32<.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudB\x03\xe0\x41\x01H\x00\x12K\n\x16platform_logs_settings\x18\x04 \x01(\x0b\x32&.google.pubsub.v1.PlatformLogsSettingsB\x03\xe0\x41\x01\x1a\xea\x02\n\nAwsKinesis\x12R\n\x05state\x18\x01 \x01(\x0e\x32>.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.StateB\x03\xe0\x41\x03\x12\x17\n\nstream_arn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63onsumer_arn\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61ws_role_arn\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\"\x96\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x1d\n\x19KINESIS_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x14\n\x10STREAM_NOT_FOUND\x10\x04\x12\x16\n\x12\x43ONSUMER_NOT_FOUND\x10\x05\x1a\x95\x06\n\x0c\x43loudStorage\x12T\n\x05state\x18\x01 \x01(\x0e\x32@.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.StateB\x03\xe0\x41\x03\x12\x13\n\x06\x62ucket\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x0btext_format\x18\x03 \x01(\x0b\x32\x45.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatB\x03\xe0\x41\x01H\x00\x12\x61\n\x0b\x61vro_format\x18\x04 \x01(\x0b\x32\x45.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatB\x03\xe0\x41\x01H\x00\x12n\n\x12pubsub_avro_format\x18\x05 \x01(\x0b\x32K.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormatB\x03\xe0\x41\x01H\x00\x12\x43\n\x1aminimum_object_create_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x17\n\nmatch_glob\x18\t \x01(\tB\x03\xe0\x41\x01\x1a\x37\n\nTextFormat\x12\x1b\n\tdelimiter\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_delimiter\x1a\x0c\n\nAvroFormat\x1a\x12\n\x10PubSubAvroFormat\"\x9a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12#\n\x1f\x43LOUD_STORAGE_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x14\n\x10\x42UCKET_NOT_FOUND\x10\x04\x12\x14\n\x10TOO_MANY_OBJECTS\x10\x05\x42\x0e\n\x0cinput_format\x1a\xff\x03\n\x0e\x41zureEventHubs\x12V\n\x05state\x18\x01 \x01(\x0e\x32\x42.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.StateB\x03\xe0\x41\x03\x12\x1b\n\x0eresource_group\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tnamespace\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tevent_hub\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tclient_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttenant_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsubscription_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13gcp_service_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\"\xd7\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12 \n\x1c\x45VENT_HUBS_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x17\n\x13NAMESPACE_NOT_FOUND\x10\x04\x12\x17\n\x13\x45VENT_HUB_NOT_FOUND\x10\x05\x12\x1a\n\x16SUBSCRIPTION_NOT_FOUND\x10\x06\x12\x1c\n\x18RESOURCE_GROUP_NOT_FOUND\x10\x07\x1a\xd6\x02\n\x06\x41wsMsk\x12N\n\x05state\x18\x01 \x01(\x0e\x32:.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.StateB\x03\xe0\x41\x03\x12\x18\n\x0b\x63luster_arn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05topic\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61ws_role_arn\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\"\x90\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x19\n\x15MSK_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x15\n\x11\x43LUSTER_NOT_FOUND\x10\x04\x12\x13\n\x0fTOPIC_NOT_FOUND\x10\x05\x1a\xb6\x03\n\x0e\x43onfluentCloud\x12V\n\x05state\x18\x01 \x01(\x0e\x32\x42.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.StateB\x03\xe0\x41\x03\x12\x1d\n\x10\x62ootstrap_server\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05topic\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10identity_pool_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x06 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12%\n!CONFLUENT_CLOUD_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12 \n\x1cUNREACHABLE_BOOTSTRAP_SERVER\x10\x04\x12\x15\n\x11\x43LUSTER_NOT_FOUND\x10\x05\x12\x13\n\x0fTOPIC_NOT_FOUND\x10\x06\x42\x08\n\x06source\"\xbf\x01\n\x14PlatformLogsSettings\x12\x46\n\x08severity\x18\x01 \x01(\x0e\x32/.google.pubsub.v1.PlatformLogsSettings.SeverityB\x03\xe0\x41\x01\"_\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x0b\n\x07WARNING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\"\x89\x0c\n\x15IngestionFailureEvent\x12\x12\n\x05topic\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x15\x63loud_storage_failure\x18\x03 \x01(\x0b\x32;.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureB\x03\xe0\x41\x01H\x00\x12[\n\x0f\x61ws_msk_failure\x18\x04 \x01(\x0b\x32;.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonB\x03\xe0\x41\x01H\x00\x12l\n\x18\x61zure_event_hubs_failure\x18\x05 \x01(\x0b\x32\x43.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonB\x03\xe0\x41\x01H\x00\x12k\n\x17\x63onfluent_cloud_failure\x18\x06 \x01(\x0b\x32\x43.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonB\x03\xe0\x41\x01H\x00\x1a\x14\n\x12\x41piViolationReason\x1a\x13\n\x11\x41vroFailureReason\x1a\xae\x02\n\x13\x43loudStorageFailure\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bobject_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11object_generation\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12]\n\x13\x61vro_failure_reason\x18\x05 \x01(\x0b\x32\x39.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonB\x03\xe0\x41\x01H\x00\x12_\n\x14\x61pi_violation_reason\x18\x06 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xe4\x01\n\x13\x41wsMskFailureReason\x12\x18\n\x0b\x63luster_arn\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkafka_topic\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xe8\x01\n\x1b\x41zureEventHubsFailureReason\x12\x16\n\tnamespace\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tevent_hub\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xeb\x01\n\x1b\x43onfluentCloudFailureReason\x12\x17\n\ncluster_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkafka_topic\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reasonB\t\n\x07\x66\x61ilure\">\n\rJavaScriptUDF\x12\x1a\n\rfunction_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x8e\x01\n\x10MessageTransform\x12>\n\x0ejavascript_udf\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.JavaScriptUDFB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0b\n\ttransform\"\x8e\x06\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x06labels\x18\x02 \x03(\x0b\x32#.google.pubsub.v1.Topic.LabelsEntryB\x03\xe0\x41\x01\x12K\n\x16message_storage_policy\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.MessageStoragePolicyB\x03\xe0\x41\x01\x12\x19\n\x0ckms_key_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12>\n\x0fschema_settings\x18\x06 \x01(\x0b\x32 .google.pubsub.v1.SchemaSettingsB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x31\n\x05state\x18\t \x01(\x0e\x32\x1d.google.pubsub.v1.Topic.StateB\x03\xe0\x41\x03\x12Z\n\x1eingestion_data_source_settings\x18\n \x01(\x0b\x32-.google.pubsub.v1.IngestionDataSourceSettingsB\x03\xe0\x41\x01\x12\x43\n\x12message_transforms\x18\r \x03(\x0b\x32\".google.pubsub.v1.MessageTransformB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x1c\n\x18INGESTION_RESOURCE_ERROR\x10\x02:c\xea\x41`\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\x12\x0f_deleted-topic_*\x06topics2\x05topic\"\x80\x02\n\rPubsubMessage\x12\x11\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\nattributes\x18\x02 \x03(\x0b\x32/.google.pubsub.v1.PubsubMessage.AttributesEntryB\x03\xe0\x41\x01\x12\x12\n\nmessage_id\x18\x03 \x01(\t\x12\x30\n\x0cpublish_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x0cordering_key\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\x0fGetTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\"w\n\x12UpdateTopicRequest\x12+\n\x05topic\x18\x01 \x01(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"|\n\x0ePublishRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x02\"+\n\x0fPublishResponse\x12\x18\n\x0bmessage_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x11ListTopicsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"`\n\x12ListTopicsResponse\x12,\n\x06topics\x18\x01 \x03(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x1dListTopicSubscriptionsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x1eListTopicSubscriptionsResponse\x12\x41\n\rsubscriptions\x18\x01 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListTopicSnapshotsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"R\n\x1aListTopicSnapshotsResponse\x12\x16\n\tsnapshots\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"H\n\x12\x44\x65leteTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\"]\n\x19\x44\x65tachSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x1c\n\x1a\x44\x65tachSubscriptionResponse\"\x8d\x0b\n\x0cSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x01\x12>\n\x0f\x62igquery_config\x18\x12 \x01(\x0b\x32 .google.pubsub.v1.BigQueryConfigB\x03\xe0\x41\x01\x12G\n\x14\x63loud_storage_config\x18\x16 \x01(\x0b\x32$.google.pubsub.v1.CloudStorageConfigB\x03\xe0\x41\x01\x12!\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x15retain_acked_messages\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12?\n\x06labels\x18\t \x03(\x0b\x32*.google.pubsub.v1.Subscription.LabelsEntryB\x03\xe0\x41\x01\x12$\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\".google.pubsub.v1.ExpirationPolicyB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32\".google.pubsub.v1.DeadLetterPolicyB\x03\xe0\x41\x01\x12\x38\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x1d.google.pubsub.v1.RetryPolicyB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65tached\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_exactly_once_delivery\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12H\n topic_message_retention_duration\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x38\n\x05state\x18\x13 \x01(\x0e\x32$.google.pubsub.v1.Subscription.StateB\x03\xe0\x41\x03\x12i\n\x1f\x61nalytics_hub_subscription_info\x18\x17 \x01(\x0b\x32;.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoB\x03\xe0\x41\x03\x12\x43\n\x12message_transforms\x18\x19 \x03(\x0b\x32\".google.pubsub.v1.MessageTransformB\x03\xe0\x41\x01\x1aO\n\x1c\x41nalyticsHubSubscriptionInfo\x12\x14\n\x07listing\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0csubscription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x12\n\x0eRESOURCE_ERROR\x10\x02:u\xea\x41r\n\"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}*\rsubscriptions2\x0csubscription\"\x7f\n\x0bRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"V\n\x10\x44\x65\x61\x64LetterPolicy\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15max_delivery_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"?\n\x10\x45xpirationPolicy\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\x9a\x04\n\nPushConfig\x12\x1a\n\rpush_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\nattributes\x18\x02 \x03(\x0b\x32,.google.pubsub.v1.PushConfig.AttributesEntryB\x03\xe0\x41\x01\x12\x41\n\noidc_token\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12I\n\x0epubsub_wrapper\x18\x04 \x01(\x0b\x32*.google.pubsub.v1.PushConfig.PubsubWrapperB\x03\xe0\x41\x01H\x01\x12\x41\n\nno_wrapper\x18\x05 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.NoWrapperB\x03\xe0\x41\x01H\x01\x1a\x46\n\tOidcToken\x12\"\n\x15service_account_email\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x0f\n\rPubsubWrapper\x1a(\n\tNoWrapper\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_methodB\t\n\x07wrapper\"\x8e\x03\n\x0e\x42igQueryConfig\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0ewrite_metadata\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x64rop_unknown_fields\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12:\n\x05state\x18\x05 \x01(\x0e\x32&.google.pubsub.v1.BigQueryConfig.StateB\x03\xe0\x41\x03\x12\x1d\n\x10use_table_schema\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12\x13\n\x0fSCHEMA_MISMATCH\x10\x04\x12#\n\x1fIN_TRANSIT_LOCATION_RESTRICTION\x10\x05\"\xe9\x05\n\x12\x43loudStorageConfig\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x66ilename_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66ilename_suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66ilename_datetime_format\x18\n \x01(\tB\x03\xe0\x41\x01\x12K\n\x0btext_config\x18\x04 \x01(\x0b\x32/.google.pubsub.v1.CloudStorageConfig.TextConfigB\x03\xe0\x41\x01H\x00\x12K\n\x0b\x61vro_config\x18\x05 \x01(\x0b\x32/.google.pubsub.v1.CloudStorageConfig.AvroConfigB\x03\xe0\x41\x01H\x00\x12\x34\n\x0cmax_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tmax_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12>\n\x05state\x18\t \x01(\x0e\x32*.google.pubsub.v1.CloudStorageConfig.StateB\x03\xe0\x41\x03\x12\"\n\x15service_account_email\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1a\x0c\n\nTextConfig\x1aH\n\nAvroConfig\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12#\n\x1fIN_TRANSIT_LOCATION_RESTRICTION\x10\x04\x12\x13\n\x0fSCHEMA_MISMATCH\x10\x05\x42\x0f\n\routput_format\"|\n\x0fReceivedMessage\x12\x13\n\x06\x61\x63k_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\x07message\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65livery_attempt\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"Z\n\x16GetSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x8c\x01\n\x19UpdateSubscriptionRequest\x12\x39\n\x0csubscription\x18\x01 \x01(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x91\x01\n\x18ListSubscriptionsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"u\n\x19ListSubscriptionsResponse\x12:\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"]\n\x19\x44\x65leteSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x93\x01\n\x17ModifyPushConfigRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x36\n\x0bpush_config\x18\x02 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x02\"\x8d\x01\n\x0bPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12!\n\x12return_immediately\x18\x02 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"Q\n\x0cPullResponse\x12\x41\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessageB\x03\xe0\x41\x01\"\x95\x01\n\x18ModifyAckDeadlineRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14\x61\x63k_deadline_seconds\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"l\n\x12\x41\x63knowledgeRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\xc7\x02\n\x14StreamingPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17modify_deadline_seconds\x18\x03 \x03(\x05\x42\x03\xe0\x41\x01\x12$\n\x17modify_deadline_ack_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12(\n\x1bstream_ack_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x16\n\tclient_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18max_outstanding_messages\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\"\n\x15max_outstanding_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\"\x9e\x06\n\x15StreamingPullResponse\x12\x41\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessageB\x03\xe0\x41\x01\x12\x66\n\x18\x61\x63knowledge_confirmation\x18\x05 \x01(\x0b\x32?.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationB\x03\xe0\x41\x01\x12t\n modify_ack_deadline_confirmation\x18\x03 \x01(\x0b\x32\x45.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationB\x03\xe0\x41\x01\x12\x64\n\x17subscription_properties\x18\x04 \x01(\x0b\x32>.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesB\x03\xe0\x41\x01\x1a\x94\x01\n\x17\x41\x63knowledgeConfirmation\x12\x14\n\x07\x61\x63k_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0finvalid_ack_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11unordered_ack_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12%\n\x18temporary_failed_ack_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01\x1az\n\x1dModifyAckDeadlineConfirmation\x12\x14\n\x07\x61\x63k_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0finvalid_ack_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12%\n\x18temporary_failed_ack_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1ak\n\x16SubscriptionProperties\x12*\n\x1d\x65xactly_once_delivery_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12%\n\x18message_ordering_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x02\n\x15\x43reateSnapshotRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\x12@\n\x0csubscription\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12H\n\x06labels\x18\x03 \x03(\x0b\x32\x33.google.pubsub.v1.CreateSnapshotRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\x15UpdateSnapshotRequest\x12\x31\n\x08snapshot\x18\x01 \x01(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xd6\x02\n\x08Snapshot\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x34\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12;\n\x06labels\x18\x04 \x03(\x0b\x32&.google.pubsub.v1.Snapshot.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:a\xea\x41^\n\x1epubsub.googleapis.com/Snapshot\x12\'projects/{project}/snapshots/{snapshot}*\tsnapshots2\x08snapshot\"N\n\x12GetSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\"\x8d\x01\n\x14ListSnapshotsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"i\n\x15ListSnapshotsResponse\x12\x32\n\tsnapshots\x18\x01 \x03(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Q\n\x15\x44\x65leteSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\"\xc6\x01\n\x0bSeekRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12/\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12:\n\x08snapshot\x18\x03 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1epubsub.googleapis.com/SnapshotH\x00\x42\x08\n\x06target\"\x0e\n\x0cSeekResponse2\xb8\x0b\n\tPublisher\x12q\n\x0b\x43reateTopic\x12\x17.google.pubsub.v1.Topic\x1a\x17.google.pubsub.v1.Topic\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x1a\x1e/v1/{name=projects/*/topics/*}:\x01*\x12\x91\x01\n\x0bUpdateTopic\x12$.google.pubsub.v1.UpdateTopicRequest\x1a\x17.google.pubsub.v1.Topic\"C\xda\x41\x11topic,update_mask\x82\xd3\xe4\x93\x02)2$/v1/{topic.name=projects/*/topics/*}:\x01*\x12\x93\x01\n\x07Publish\x12 .google.pubsub.v1.PublishRequest\x1a!.google.pubsub.v1.PublishResponse\"C\xda\x41\x0etopic,messages\x82\xd3\xe4\x93\x02,\"\'/v1/{topic=projects/*/topics/*}:publish:\x01*\x12w\n\x08GetTopic\x12!.google.pubsub.v1.GetTopicRequest\x1a\x17.google.pubsub.v1.Topic\"/\xda\x41\x05topic\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{topic=projects/*/topics/*}\x12\x8a\x01\n\nListTopics\x12#.google.pubsub.v1.ListTopicsRequest\x1a$.google.pubsub.v1.ListTopicsResponse\"1\xda\x41\x07project\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{project=projects/*}/topics\x12\xba\x01\n\x16ListTopicSubscriptions\x12/.google.pubsub.v1.ListTopicSubscriptionsRequest\x1a\x30.google.pubsub.v1.ListTopicSubscriptionsResponse\"=\xda\x41\x05topic\x82\xd3\xe4\x93\x02/\x12-/v1/{topic=projects/*/topics/*}/subscriptions\x12\xaa\x01\n\x12ListTopicSnapshots\x12+.google.pubsub.v1.ListTopicSnapshotsRequest\x1a,.google.pubsub.v1.ListTopicSnapshotsResponse\"9\xda\x41\x05topic\x82\xd3\xe4\x93\x02+\x12)/v1/{topic=projects/*/topics/*}/snapshots\x12|\n\x0b\x44\x65leteTopic\x12$.google.pubsub.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty\"/\xda\x41\x05topic\x82\xd3\xe4\x93\x02!*\x1f/v1/{topic=projects/*/topics/*}\x12\xad\x01\n\x12\x44\x65tachSubscription\x12+.google.pubsub.v1.DetachSubscriptionRequest\x1a,.google.pubsub.v1.DetachSubscriptionResponse\"<\x82\xd3\xe4\x93\x02\x36\"4/v1/{subscription=projects/*/subscriptions/*}:detach\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsub2\xd2\x15\n\nSubscriber\x12\xb4\x01\n\x12\x43reateSubscription\x12\x1e.google.pubsub.v1.Subscription\x1a\x1e.google.pubsub.v1.Subscription\"^\xda\x41+name,topic,push_config,ack_deadline_seconds\x82\xd3\xe4\x93\x02*\x1a%/v1/{name=projects/*/subscriptions/*}:\x01*\x12\xa1\x01\n\x0fGetSubscription\x12(.google.pubsub.v1.GetSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"D\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02/\x12-/v1/{subscription=projects/*/subscriptions/*}\x12\xbb\x01\n\x12UpdateSubscription\x12+.google.pubsub.v1.UpdateSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"X\xda\x41\x18subscription,update_mask\x82\xd3\xe4\x93\x02\x37\x32\x32/v1/{subscription.name=projects/*/subscriptions/*}:\x01*\x12\xa6\x01\n\x11ListSubscriptions\x12*.google.pubsub.v1.ListSubscriptionsRequest\x1a+.google.pubsub.v1.ListSubscriptionsResponse\"8\xda\x41\x07project\x82\xd3\xe4\x93\x02(\x12&/v1/{project=projects/*}/subscriptions\x12\x9f\x01\n\x12\x44\x65leteSubscription\x12+.google.pubsub.v1.DeleteSubscriptionRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02/*-/v1/{subscription=projects/*/subscriptions/*}\x12\xcf\x01\n\x11ModifyAckDeadline\x12*.google.pubsub.v1.ModifyAckDeadlineRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41)subscription,ack_ids,ack_deadline_seconds\x82\xd3\xe4\x93\x02\x44\"?/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline:\x01*\x12\xa8\x01\n\x0b\x41\x63knowledge\x12$.google.pubsub.v1.AcknowledgeRequest\x1a\x16.google.protobuf.Empty\"[\xda\x41\x14subscription,ack_ids\x82\xd3\xe4\x93\x02>\"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\x01*\x12\xd0\x01\n\x04Pull\x12\x1d.google.pubsub.v1.PullRequest\x1a\x1e.google.pubsub.v1.PullResponse\"\x88\x01\xda\x41,subscription,return_immediately,max_messages\xda\x41\x19subscription,max_messages\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:pull:\x01*\x12\x66\n\rStreamingPull\x12&.google.pubsub.v1.StreamingPullRequest\x1a\'.google.pubsub.v1.StreamingPullResponse\"\x00(\x01\x30\x01\x12\xbb\x01\n\x10ModifyPushConfig\x12).google.pubsub.v1.ModifyPushConfigRequest\x1a\x16.google.protobuf.Empty\"d\xda\x41\x18subscription,push_config\x82\xd3\xe4\x93\x02\x43\">/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig:\x01*\x12\x89\x01\n\x0bGetSnapshot\x12$.google.pubsub.v1.GetSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"8\xda\x41\x08snapshot\x82\xd3\xe4\x93\x02\'\x12%/v1/{snapshot=projects/*/snapshots/*}\x12\x96\x01\n\rListSnapshots\x12&.google.pubsub.v1.ListSnapshotsRequest\x1a\'.google.pubsub.v1.ListSnapshotsResponse\"4\xda\x41\x07project\x82\xd3\xe4\x93\x02$\x12\"/v1/{project=projects/*}/snapshots\x12\x97\x01\n\x0e\x43reateSnapshot\x12\'.google.pubsub.v1.CreateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"@\xda\x41\x11name,subscription\x82\xd3\xe4\x93\x02&\x1a!/v1/{name=projects/*/snapshots/*}:\x01*\x12\xa3\x01\n\x0eUpdateSnapshot\x12\'.google.pubsub.v1.UpdateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"L\xda\x41\x14snapshot,update_mask\x82\xd3\xe4\x93\x02/2*/v1/{snapshot.name=projects/*/snapshots/*}:\x01*\x12\x8b\x01\n\x0e\x44\x65leteSnapshot\x12\'.google.pubsub.v1.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x08snapshot\x82\xd3\xe4\x93\x02\'*%/v1/{snapshot=projects/*/snapshots/*}\x12\x84\x01\n\x04Seek\x12\x1d.google.pubsub.v1.SeekRequest\x1a\x1e.google.pubsub.v1.SeekResponse\"=\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:seek:\x01*\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsubB\xaa\x01\n\x14\x63om.google.pubsub.v1B\x0bPubsubProtoP\x01Z5cloud.google.com/go/pubsub/v2/apiv1/pubsubpb;pubsubpb\xaa\x02\x16Google.Cloud.PubSub.V1\xca\x02\x16Google\\Cloud\\PubSub\\V1\xea\x02\x19Google::Cloud::PubSub::V1b\x06proto3" +descriptor_data = "\n\x1dgoogle/pubsub/v1/pubsub.proto\x12\x10google.pubsub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1dgoogle/pubsub/v1/schema.proto\"a\n\x14MessageStoragePolicy\x12(\n\x1b\x61llowed_persistence_regions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x65nforce_in_transit\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x01\n\x0eSchemaSettings\x12\x34\n\x06schema\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12\x31\n\x08\x65ncoding\x18\x02 \x01(\x0e\x32\x1a.google.pubsub.v1.EncodingB\x03\xe0\x41\x01\x12\x1e\n\x11\x66irst_revision_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10last_revision_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc8\x17\n\x1bIngestionDataSourceSettings\x12T\n\x0b\x61ws_kinesis\x18\x01 \x01(\x0b\x32\x38.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisB\x03\xe0\x41\x01H\x00\x12X\n\rcloud_storage\x18\x02 \x01(\x0b\x32:.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageB\x03\xe0\x41\x01H\x00\x12]\n\x10\x61zure_event_hubs\x18\x03 \x01(\x0b\x32<.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsB\x03\xe0\x41\x01H\x00\x12L\n\x07\x61ws_msk\x18\x05 \x01(\x0b\x32\x34.google.pubsub.v1.IngestionDataSourceSettings.AwsMskB\x03\xe0\x41\x01H\x00\x12\\\n\x0f\x63onfluent_cloud\x18\x06 \x01(\x0b\x32<.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudB\x03\xe0\x41\x01H\x00\x12K\n\x16platform_logs_settings\x18\x04 \x01(\x0b\x32&.google.pubsub.v1.PlatformLogsSettingsB\x03\xe0\x41\x01\x1a\xea\x02\n\nAwsKinesis\x12R\n\x05state\x18\x01 \x01(\x0e\x32>.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.StateB\x03\xe0\x41\x03\x12\x17\n\nstream_arn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63onsumer_arn\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61ws_role_arn\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\"\x96\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x1d\n\x19KINESIS_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x14\n\x10STREAM_NOT_FOUND\x10\x04\x12\x16\n\x12\x43ONSUMER_NOT_FOUND\x10\x05\x1a\x95\x06\n\x0c\x43loudStorage\x12T\n\x05state\x18\x01 \x01(\x0e\x32@.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.StateB\x03\xe0\x41\x03\x12\x13\n\x06\x62ucket\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x0btext_format\x18\x03 \x01(\x0b\x32\x45.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatB\x03\xe0\x41\x01H\x00\x12\x61\n\x0b\x61vro_format\x18\x04 \x01(\x0b\x32\x45.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatB\x03\xe0\x41\x01H\x00\x12n\n\x12pubsub_avro_format\x18\x05 \x01(\x0b\x32K.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormatB\x03\xe0\x41\x01H\x00\x12\x43\n\x1aminimum_object_create_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x17\n\nmatch_glob\x18\t \x01(\tB\x03\xe0\x41\x01\x1a\x37\n\nTextFormat\x12\x1b\n\tdelimiter\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_delimiter\x1a\x0c\n\nAvroFormat\x1a\x12\n\x10PubSubAvroFormat\"\x9a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12#\n\x1f\x43LOUD_STORAGE_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x14\n\x10\x42UCKET_NOT_FOUND\x10\x04\x12\x14\n\x10TOO_MANY_OBJECTS\x10\x05\x42\x0e\n\x0cinput_format\x1a\xff\x03\n\x0e\x41zureEventHubs\x12V\n\x05state\x18\x01 \x01(\x0e\x32\x42.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.StateB\x03\xe0\x41\x03\x12\x1b\n\x0eresource_group\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tnamespace\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tevent_hub\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tclient_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttenant_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsubscription_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13gcp_service_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\"\xd7\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12 \n\x1c\x45VENT_HUBS_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x17\n\x13NAMESPACE_NOT_FOUND\x10\x04\x12\x17\n\x13\x45VENT_HUB_NOT_FOUND\x10\x05\x12\x1a\n\x16SUBSCRIPTION_NOT_FOUND\x10\x06\x12\x1c\n\x18RESOURCE_GROUP_NOT_FOUND\x10\x07\x1a\xd6\x02\n\x06\x41wsMsk\x12N\n\x05state\x18\x01 \x01(\x0e\x32:.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.StateB\x03\xe0\x41\x03\x12\x18\n\x0b\x63luster_arn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05topic\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61ws_role_arn\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\"\x90\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x19\n\x15MSK_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x15\n\x11\x43LUSTER_NOT_FOUND\x10\x04\x12\x13\n\x0fTOPIC_NOT_FOUND\x10\x05\x1a\xb6\x03\n\x0e\x43onfluentCloud\x12V\n\x05state\x18\x01 \x01(\x0e\x32\x42.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.StateB\x03\xe0\x41\x03\x12\x1d\n\x10\x62ootstrap_server\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05topic\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10identity_pool_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x06 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12%\n!CONFLUENT_CLOUD_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12 \n\x1cUNREACHABLE_BOOTSTRAP_SERVER\x10\x04\x12\x15\n\x11\x43LUSTER_NOT_FOUND\x10\x05\x12\x13\n\x0fTOPIC_NOT_FOUND\x10\x06\x42\x08\n\x06source\"\xbf\x01\n\x14PlatformLogsSettings\x12\x46\n\x08severity\x18\x01 \x01(\x0e\x32/.google.pubsub.v1.PlatformLogsSettings.SeverityB\x03\xe0\x41\x01\"_\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x0b\n\x07WARNING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\"\x83\x12\n\x15IngestionFailureEvent\x12\x12\n\x05topic\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x15\x63loud_storage_failure\x18\x03 \x01(\x0b\x32;.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureB\x03\xe0\x41\x01H\x00\x12[\n\x0f\x61ws_msk_failure\x18\x04 \x01(\x0b\x32;.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonB\x03\xe0\x41\x01H\x00\x12l\n\x18\x61zure_event_hubs_failure\x18\x05 \x01(\x0b\x32\x43.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonB\x03\xe0\x41\x01H\x00\x12k\n\x17\x63onfluent_cloud_failure\x18\x06 \x01(\x0b\x32\x43.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonB\x03\xe0\x41\x01H\x00\x12\x63\n\x13\x61ws_kinesis_failure\x18\x07 \x01(\x0b\x32?.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonB\x03\xe0\x41\x01H\x00\x1a\x14\n\x12\x41piViolationReason\x1a\x13\n\x11\x41vroFailureReason\x1a\x17\n\x15SchemaViolationReason\x1a\x95\x03\n\x13\x43loudStorageFailure\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bobject_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11object_generation\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12]\n\x13\x61vro_failure_reason\x18\x05 \x01(\x0b\x32\x39.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonB\x03\xe0\x41\x01H\x00\x12_\n\x14\x61pi_violation_reason\x18\x06 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x07 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xcb\x02\n\x13\x41wsMskFailureReason\x12\x18\n\x0b\x63luster_arn\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkafka_topic\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xcf\x02\n\x1b\x41zureEventHubsFailureReason\x12\x16\n\tnamespace\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tevent_hub\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xd2\x02\n\x1b\x43onfluentCloudFailureReason\x12\x17\n\ncluster_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkafka_topic\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xdd\x01\n\x17\x41wsKinesisFailureReason\x12\x17\n\nstream_arn\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rpartition_key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsequence_number\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x65\n\x17schema_violation_reason\x18\x04 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reasonB\t\n\x07\x66\x61ilure\">\n\rJavaScriptUDF\x12\x1a\n\rfunction_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x8e\x01\n\x10MessageTransform\x12>\n\x0ejavascript_udf\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.JavaScriptUDFB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0b\n\ttransform\"\x8e\x06\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x06labels\x18\x02 \x03(\x0b\x32#.google.pubsub.v1.Topic.LabelsEntryB\x03\xe0\x41\x01\x12K\n\x16message_storage_policy\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.MessageStoragePolicyB\x03\xe0\x41\x01\x12\x19\n\x0ckms_key_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12>\n\x0fschema_settings\x18\x06 \x01(\x0b\x32 .google.pubsub.v1.SchemaSettingsB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x31\n\x05state\x18\t \x01(\x0e\x32\x1d.google.pubsub.v1.Topic.StateB\x03\xe0\x41\x03\x12Z\n\x1eingestion_data_source_settings\x18\n \x01(\x0b\x32-.google.pubsub.v1.IngestionDataSourceSettingsB\x03\xe0\x41\x01\x12\x43\n\x12message_transforms\x18\r \x03(\x0b\x32\".google.pubsub.v1.MessageTransformB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x1c\n\x18INGESTION_RESOURCE_ERROR\x10\x02:c\xea\x41`\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\x12\x0f_deleted-topic_*\x06topics2\x05topic\"\x80\x02\n\rPubsubMessage\x12\x11\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\nattributes\x18\x02 \x03(\x0b\x32/.google.pubsub.v1.PubsubMessage.AttributesEntryB\x03\xe0\x41\x01\x12\x12\n\nmessage_id\x18\x03 \x01(\t\x12\x30\n\x0cpublish_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x0cordering_key\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\x0fGetTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\"w\n\x12UpdateTopicRequest\x12+\n\x05topic\x18\x01 \x01(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"|\n\x0ePublishRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x02\"+\n\x0fPublishResponse\x12\x18\n\x0bmessage_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x11ListTopicsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"`\n\x12ListTopicsResponse\x12,\n\x06topics\x18\x01 \x03(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x1dListTopicSubscriptionsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x1eListTopicSubscriptionsResponse\x12\x41\n\rsubscriptions\x18\x01 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListTopicSnapshotsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"R\n\x1aListTopicSnapshotsResponse\x12\x16\n\tsnapshots\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"H\n\x12\x44\x65leteTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\"]\n\x19\x44\x65tachSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x1c\n\x1a\x44\x65tachSubscriptionResponse\"\x8d\x0b\n\x0cSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x01\x12>\n\x0f\x62igquery_config\x18\x12 \x01(\x0b\x32 .google.pubsub.v1.BigQueryConfigB\x03\xe0\x41\x01\x12G\n\x14\x63loud_storage_config\x18\x16 \x01(\x0b\x32$.google.pubsub.v1.CloudStorageConfigB\x03\xe0\x41\x01\x12!\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x15retain_acked_messages\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12?\n\x06labels\x18\t \x03(\x0b\x32*.google.pubsub.v1.Subscription.LabelsEntryB\x03\xe0\x41\x01\x12$\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\".google.pubsub.v1.ExpirationPolicyB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32\".google.pubsub.v1.DeadLetterPolicyB\x03\xe0\x41\x01\x12\x38\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x1d.google.pubsub.v1.RetryPolicyB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65tached\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_exactly_once_delivery\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12H\n topic_message_retention_duration\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x38\n\x05state\x18\x13 \x01(\x0e\x32$.google.pubsub.v1.Subscription.StateB\x03\xe0\x41\x03\x12i\n\x1f\x61nalytics_hub_subscription_info\x18\x17 \x01(\x0b\x32;.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoB\x03\xe0\x41\x03\x12\x43\n\x12message_transforms\x18\x19 \x03(\x0b\x32\".google.pubsub.v1.MessageTransformB\x03\xe0\x41\x01\x1aO\n\x1c\x41nalyticsHubSubscriptionInfo\x12\x14\n\x07listing\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0csubscription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x12\n\x0eRESOURCE_ERROR\x10\x02:u\xea\x41r\n\"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}*\rsubscriptions2\x0csubscription\"\x7f\n\x0bRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"V\n\x10\x44\x65\x61\x64LetterPolicy\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15max_delivery_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"?\n\x10\x45xpirationPolicy\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\x9a\x04\n\nPushConfig\x12\x1a\n\rpush_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\nattributes\x18\x02 \x03(\x0b\x32,.google.pubsub.v1.PushConfig.AttributesEntryB\x03\xe0\x41\x01\x12\x41\n\noidc_token\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12I\n\x0epubsub_wrapper\x18\x04 \x01(\x0b\x32*.google.pubsub.v1.PushConfig.PubsubWrapperB\x03\xe0\x41\x01H\x01\x12\x41\n\nno_wrapper\x18\x05 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.NoWrapperB\x03\xe0\x41\x01H\x01\x1a\x46\n\tOidcToken\x12\"\n\x15service_account_email\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x0f\n\rPubsubWrapper\x1a(\n\tNoWrapper\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_methodB\t\n\x07wrapper\"\x8e\x03\n\x0e\x42igQueryConfig\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0ewrite_metadata\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x64rop_unknown_fields\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12:\n\x05state\x18\x05 \x01(\x0e\x32&.google.pubsub.v1.BigQueryConfig.StateB\x03\xe0\x41\x03\x12\x1d\n\x10use_table_schema\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12\x13\n\x0fSCHEMA_MISMATCH\x10\x04\x12#\n\x1fIN_TRANSIT_LOCATION_RESTRICTION\x10\x05\"\xe9\x05\n\x12\x43loudStorageConfig\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x66ilename_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66ilename_suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66ilename_datetime_format\x18\n \x01(\tB\x03\xe0\x41\x01\x12K\n\x0btext_config\x18\x04 \x01(\x0b\x32/.google.pubsub.v1.CloudStorageConfig.TextConfigB\x03\xe0\x41\x01H\x00\x12K\n\x0b\x61vro_config\x18\x05 \x01(\x0b\x32/.google.pubsub.v1.CloudStorageConfig.AvroConfigB\x03\xe0\x41\x01H\x00\x12\x34\n\x0cmax_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tmax_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12>\n\x05state\x18\t \x01(\x0e\x32*.google.pubsub.v1.CloudStorageConfig.StateB\x03\xe0\x41\x03\x12\"\n\x15service_account_email\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1a\x0c\n\nTextConfig\x1aH\n\nAvroConfig\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12#\n\x1fIN_TRANSIT_LOCATION_RESTRICTION\x10\x04\x12\x13\n\x0fSCHEMA_MISMATCH\x10\x05\x42\x0f\n\routput_format\"|\n\x0fReceivedMessage\x12\x13\n\x06\x61\x63k_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\x07message\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65livery_attempt\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"Z\n\x16GetSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x8c\x01\n\x19UpdateSubscriptionRequest\x12\x39\n\x0csubscription\x18\x01 \x01(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x91\x01\n\x18ListSubscriptionsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"u\n\x19ListSubscriptionsResponse\x12:\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"]\n\x19\x44\x65leteSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x93\x01\n\x17ModifyPushConfigRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x36\n\x0bpush_config\x18\x02 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x02\"\x8d\x01\n\x0bPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12!\n\x12return_immediately\x18\x02 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"Q\n\x0cPullResponse\x12\x41\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessageB\x03\xe0\x41\x01\"\x95\x01\n\x18ModifyAckDeadlineRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14\x61\x63k_deadline_seconds\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"l\n\x12\x41\x63knowledgeRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\xc7\x02\n\x14StreamingPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17modify_deadline_seconds\x18\x03 \x03(\x05\x42\x03\xe0\x41\x01\x12$\n\x17modify_deadline_ack_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12(\n\x1bstream_ack_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x16\n\tclient_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18max_outstanding_messages\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\"\n\x15max_outstanding_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\"\x9e\x06\n\x15StreamingPullResponse\x12\x41\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessageB\x03\xe0\x41\x01\x12\x66\n\x18\x61\x63knowledge_confirmation\x18\x05 \x01(\x0b\x32?.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationB\x03\xe0\x41\x01\x12t\n modify_ack_deadline_confirmation\x18\x03 \x01(\x0b\x32\x45.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationB\x03\xe0\x41\x01\x12\x64\n\x17subscription_properties\x18\x04 \x01(\x0b\x32>.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesB\x03\xe0\x41\x01\x1a\x94\x01\n\x17\x41\x63knowledgeConfirmation\x12\x14\n\x07\x61\x63k_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0finvalid_ack_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11unordered_ack_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12%\n\x18temporary_failed_ack_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01\x1az\n\x1dModifyAckDeadlineConfirmation\x12\x14\n\x07\x61\x63k_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0finvalid_ack_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12%\n\x18temporary_failed_ack_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1ak\n\x16SubscriptionProperties\x12*\n\x1d\x65xactly_once_delivery_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12%\n\x18message_ordering_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x02\n\x15\x43reateSnapshotRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\x12@\n\x0csubscription\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12H\n\x06labels\x18\x03 \x03(\x0b\x32\x33.google.pubsub.v1.CreateSnapshotRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\x15UpdateSnapshotRequest\x12\x31\n\x08snapshot\x18\x01 \x01(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xd6\x02\n\x08Snapshot\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x34\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12;\n\x06labels\x18\x04 \x03(\x0b\x32&.google.pubsub.v1.Snapshot.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:a\xea\x41^\n\x1epubsub.googleapis.com/Snapshot\x12\'projects/{project}/snapshots/{snapshot}*\tsnapshots2\x08snapshot\"N\n\x12GetSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\"\x8d\x01\n\x14ListSnapshotsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"i\n\x15ListSnapshotsResponse\x12\x32\n\tsnapshots\x18\x01 \x03(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Q\n\x15\x44\x65leteSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\"\xc6\x01\n\x0bSeekRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12/\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12:\n\x08snapshot\x18\x03 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1epubsub.googleapis.com/SnapshotH\x00\x42\x08\n\x06target\"\x0e\n\x0cSeekResponse2\xb8\x0b\n\tPublisher\x12q\n\x0b\x43reateTopic\x12\x17.google.pubsub.v1.Topic\x1a\x17.google.pubsub.v1.Topic\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x1a\x1e/v1/{name=projects/*/topics/*}:\x01*\x12\x91\x01\n\x0bUpdateTopic\x12$.google.pubsub.v1.UpdateTopicRequest\x1a\x17.google.pubsub.v1.Topic\"C\xda\x41\x11topic,update_mask\x82\xd3\xe4\x93\x02)2$/v1/{topic.name=projects/*/topics/*}:\x01*\x12\x93\x01\n\x07Publish\x12 .google.pubsub.v1.PublishRequest\x1a!.google.pubsub.v1.PublishResponse\"C\xda\x41\x0etopic,messages\x82\xd3\xe4\x93\x02,\"\'/v1/{topic=projects/*/topics/*}:publish:\x01*\x12w\n\x08GetTopic\x12!.google.pubsub.v1.GetTopicRequest\x1a\x17.google.pubsub.v1.Topic\"/\xda\x41\x05topic\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{topic=projects/*/topics/*}\x12\x8a\x01\n\nListTopics\x12#.google.pubsub.v1.ListTopicsRequest\x1a$.google.pubsub.v1.ListTopicsResponse\"1\xda\x41\x07project\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{project=projects/*}/topics\x12\xba\x01\n\x16ListTopicSubscriptions\x12/.google.pubsub.v1.ListTopicSubscriptionsRequest\x1a\x30.google.pubsub.v1.ListTopicSubscriptionsResponse\"=\xda\x41\x05topic\x82\xd3\xe4\x93\x02/\x12-/v1/{topic=projects/*/topics/*}/subscriptions\x12\xaa\x01\n\x12ListTopicSnapshots\x12+.google.pubsub.v1.ListTopicSnapshotsRequest\x1a,.google.pubsub.v1.ListTopicSnapshotsResponse\"9\xda\x41\x05topic\x82\xd3\xe4\x93\x02+\x12)/v1/{topic=projects/*/topics/*}/snapshots\x12|\n\x0b\x44\x65leteTopic\x12$.google.pubsub.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty\"/\xda\x41\x05topic\x82\xd3\xe4\x93\x02!*\x1f/v1/{topic=projects/*/topics/*}\x12\xad\x01\n\x12\x44\x65tachSubscription\x12+.google.pubsub.v1.DetachSubscriptionRequest\x1a,.google.pubsub.v1.DetachSubscriptionResponse\"<\x82\xd3\xe4\x93\x02\x36\"4/v1/{subscription=projects/*/subscriptions/*}:detach\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsub2\xd2\x15\n\nSubscriber\x12\xb4\x01\n\x12\x43reateSubscription\x12\x1e.google.pubsub.v1.Subscription\x1a\x1e.google.pubsub.v1.Subscription\"^\xda\x41+name,topic,push_config,ack_deadline_seconds\x82\xd3\xe4\x93\x02*\x1a%/v1/{name=projects/*/subscriptions/*}:\x01*\x12\xa1\x01\n\x0fGetSubscription\x12(.google.pubsub.v1.GetSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"D\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02/\x12-/v1/{subscription=projects/*/subscriptions/*}\x12\xbb\x01\n\x12UpdateSubscription\x12+.google.pubsub.v1.UpdateSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"X\xda\x41\x18subscription,update_mask\x82\xd3\xe4\x93\x02\x37\x32\x32/v1/{subscription.name=projects/*/subscriptions/*}:\x01*\x12\xa6\x01\n\x11ListSubscriptions\x12*.google.pubsub.v1.ListSubscriptionsRequest\x1a+.google.pubsub.v1.ListSubscriptionsResponse\"8\xda\x41\x07project\x82\xd3\xe4\x93\x02(\x12&/v1/{project=projects/*}/subscriptions\x12\x9f\x01\n\x12\x44\x65leteSubscription\x12+.google.pubsub.v1.DeleteSubscriptionRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02/*-/v1/{subscription=projects/*/subscriptions/*}\x12\xcf\x01\n\x11ModifyAckDeadline\x12*.google.pubsub.v1.ModifyAckDeadlineRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41)subscription,ack_ids,ack_deadline_seconds\x82\xd3\xe4\x93\x02\x44\"?/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline:\x01*\x12\xa8\x01\n\x0b\x41\x63knowledge\x12$.google.pubsub.v1.AcknowledgeRequest\x1a\x16.google.protobuf.Empty\"[\xda\x41\x14subscription,ack_ids\x82\xd3\xe4\x93\x02>\"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\x01*\x12\xd0\x01\n\x04Pull\x12\x1d.google.pubsub.v1.PullRequest\x1a\x1e.google.pubsub.v1.PullResponse\"\x88\x01\xda\x41,subscription,return_immediately,max_messages\xda\x41\x19subscription,max_messages\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:pull:\x01*\x12\x66\n\rStreamingPull\x12&.google.pubsub.v1.StreamingPullRequest\x1a\'.google.pubsub.v1.StreamingPullResponse\"\x00(\x01\x30\x01\x12\xbb\x01\n\x10ModifyPushConfig\x12).google.pubsub.v1.ModifyPushConfigRequest\x1a\x16.google.protobuf.Empty\"d\xda\x41\x18subscription,push_config\x82\xd3\xe4\x93\x02\x43\">/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig:\x01*\x12\x89\x01\n\x0bGetSnapshot\x12$.google.pubsub.v1.GetSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"8\xda\x41\x08snapshot\x82\xd3\xe4\x93\x02\'\x12%/v1/{snapshot=projects/*/snapshots/*}\x12\x96\x01\n\rListSnapshots\x12&.google.pubsub.v1.ListSnapshotsRequest\x1a\'.google.pubsub.v1.ListSnapshotsResponse\"4\xda\x41\x07project\x82\xd3\xe4\x93\x02$\x12\"/v1/{project=projects/*}/snapshots\x12\x97\x01\n\x0e\x43reateSnapshot\x12\'.google.pubsub.v1.CreateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"@\xda\x41\x11name,subscription\x82\xd3\xe4\x93\x02&\x1a!/v1/{name=projects/*/snapshots/*}:\x01*\x12\xa3\x01\n\x0eUpdateSnapshot\x12\'.google.pubsub.v1.UpdateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"L\xda\x41\x14snapshot,update_mask\x82\xd3\xe4\x93\x02/2*/v1/{snapshot.name=projects/*/snapshots/*}:\x01*\x12\x8b\x01\n\x0e\x44\x65leteSnapshot\x12\'.google.pubsub.v1.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x08snapshot\x82\xd3\xe4\x93\x02\'*%/v1/{snapshot=projects/*/snapshots/*}\x12\x84\x01\n\x04Seek\x12\x1d.google.pubsub.v1.SeekRequest\x1a\x1e.google.pubsub.v1.SeekResponse\"=\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:seek:\x01*\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsubB\xaa\x01\n\x14\x63om.google.pubsub.v1B\x0bPubsubProtoP\x01Z5cloud.google.com/go/pubsub/v2/apiv1/pubsubpb;pubsubpb\xaa\x02\x16Google.Cloud.PubSub.V1\xca\x02\x16Google\\Cloud\\PubSub\\V1\xea\x02\x19Google::Cloud::PubSub::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -69,10 +69,12 @@ module V1 IngestionFailureEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent").msgclass IngestionFailureEvent::ApiViolationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.ApiViolationReason").msgclass IngestionFailureEvent::AvroFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.AvroFailureReason").msgclass + IngestionFailureEvent::SchemaViolationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason").msgclass IngestionFailureEvent::CloudStorageFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure").msgclass IngestionFailureEvent::AwsMskFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason").msgclass IngestionFailureEvent::AzureEventHubsFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason").msgclass IngestionFailureEvent::ConfluentCloudFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason").msgclass + IngestionFailureEvent::AwsKinesisFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason").msgclass JavaScriptUDF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.JavaScriptUDF").msgclass MessageTransform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.MessageTransform").msgclass Topic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Topic").msgclass diff --git a/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_services_pb.rb b/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_services_pb.rb index 48e7dbfc2426..f7426050e2bf 100644 --- a/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_services_pb.rb +++ b/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_services_pb.rb @@ -125,7 +125,7 @@ class Service # Pulls messages from the server. rpc :Pull, ::Google::Cloud::PubSub::V1::PullRequest, ::Google::Cloud::PubSub::V1::PullResponse # Establishes a stream with the server, which sends messages down to the - # client. The client streams acknowledgements and ack deadline modifications + # client. The client streams acknowledgments and ack deadline modifications # back to the server. The server will close the stream and return the status # on any error. The server may close the stream with status `UNAVAILABLE` to # reassign server-side resources, in which case, the client should diff --git a/google-cloud-pubsub-v1/proto_docs/google/pubsub/v1/pubsub.rb b/google-cloud-pubsub-v1/proto_docs/google/pubsub/v1/pubsub.rb index 467977f74651..eafa6309b67c 100644 --- a/google-cloud-pubsub-v1/proto_docs/google/pubsub/v1/pubsub.rb +++ b/google-cloud-pubsub-v1/proto_docs/google/pubsub/v1/pubsub.rb @@ -470,22 +470,27 @@ module Severity # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::CloudStorageFailure] # Optional. Failure when ingesting from Cloud Storage. # - # Note: The following fields are mutually exclusive: `cloud_storage_failure`, `aws_msk_failure`, `azure_event_hubs_failure`, `confluent_cloud_failure`. 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: `cloud_storage_failure`, `aws_msk_failure`, `azure_event_hubs_failure`, `confluent_cloud_failure`, `aws_kinesis_failure`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] aws_msk_failure # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::AwsMskFailureReason] # Optional. Failure when ingesting from Amazon MSK. # - # Note: The following fields are mutually exclusive: `aws_msk_failure`, `cloud_storage_failure`, `azure_event_hubs_failure`, `confluent_cloud_failure`. 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: `aws_msk_failure`, `cloud_storage_failure`, `azure_event_hubs_failure`, `confluent_cloud_failure`, `aws_kinesis_failure`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] azure_event_hubs_failure # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::AzureEventHubsFailureReason] # Optional. Failure when ingesting from Azure Event Hubs. # - # Note: The following fields are mutually exclusive: `azure_event_hubs_failure`, `cloud_storage_failure`, `aws_msk_failure`, `confluent_cloud_failure`. 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: `azure_event_hubs_failure`, `cloud_storage_failure`, `aws_msk_failure`, `confluent_cloud_failure`, `aws_kinesis_failure`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] confluent_cloud_failure # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::ConfluentCloudFailureReason] # Optional. Failure when ingesting from Confluent Cloud. # - # Note: The following fields are mutually exclusive: `confluent_cloud_failure`, `cloud_storage_failure`, `aws_msk_failure`, `azure_event_hubs_failure`. 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: `confluent_cloud_failure`, `cloud_storage_failure`, `aws_msk_failure`, `azure_event_hubs_failure`, `aws_kinesis_failure`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] aws_kinesis_failure + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::AwsKinesisFailureReason] + # Optional. Failure when ingesting from AWS Kinesis. + # + # Note: The following fields are mutually exclusive: `aws_kinesis_failure`, `cloud_storage_failure`, `aws_msk_failure`, `azure_event_hubs_failure`, `confluent_cloud_failure`. If a field in that set is populated, all other fields in the set will automatically be cleared. class IngestionFailureEvent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -510,6 +515,13 @@ class AvroFailureReason extend ::Google::Protobuf::MessageExts::ClassMethods end + # Set when a Pub/Sub message fails to get published due to a schema + # validation violation. + class SchemaViolationReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Failure when ingesting from a Cloud Storage source. # @!attribute [rw] bucket # @return [::String] @@ -526,13 +538,18 @@ class AvroFailureReason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::AvroFailureReason] # Optional. Failure encountered when parsing an Avro file. # - # Note: The following fields are mutually exclusive: `avro_failure_reason`, `api_violation_reason`. 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: `avro_failure_reason`, `api_violation_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] api_violation_reason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::ApiViolationReason] # Optional. The Pub/Sub API limits prevented the desired message from # being published. # - # Note: The following fields are mutually exclusive: `api_violation_reason`, `avro_failure_reason`. 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: `api_violation_reason`, `avro_failure_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schema_violation_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] + # Optional. The Pub/Sub message failed schema validation. + # + # Note: The following fields are mutually exclusive: `schema_violation_reason`, `avro_failure_reason`, `api_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class CloudStorageFailure include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -556,6 +573,13 @@ class CloudStorageFailure # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::ApiViolationReason] # Optional. The Pub/Sub API limits prevented the desired message from # being published. + # + # Note: The following fields are mutually exclusive: `api_violation_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schema_violation_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] + # Optional. The Pub/Sub message failed schema validation. + # + # Note: The following fields are mutually exclusive: `schema_violation_reason`, `api_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class AwsMskFailureReason include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -579,6 +603,13 @@ class AwsMskFailureReason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::ApiViolationReason] # Optional. The Pub/Sub API limits prevented the desired message from # being published. + # + # Note: The following fields are mutually exclusive: `api_violation_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schema_violation_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] + # Optional. The Pub/Sub message failed schema validation. + # + # Note: The following fields are mutually exclusive: `schema_violation_reason`, `api_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class AzureEventHubsFailureReason include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -602,10 +633,35 @@ class AzureEventHubsFailureReason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::ApiViolationReason] # Optional. The Pub/Sub API limits prevented the desired message from # being published. + # + # Note: The following fields are mutually exclusive: `api_violation_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schema_violation_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] + # Optional. The Pub/Sub message failed schema validation. + # + # Note: The following fields are mutually exclusive: `schema_violation_reason`, `api_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class ConfluentCloudFailureReason include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Failure when ingesting from an AWS Kinesis source. + # @!attribute [rw] stream_arn + # @return [::String] + # Optional. The stream ARN of the Kinesis stream being ingested from. + # @!attribute [rw] partition_key + # @return [::String] + # Optional. The partition key of the message that failed to be ingested. + # @!attribute [rw] sequence_number + # @return [::String] + # Optional. The sequence number of the message that failed to be ingested. + # @!attribute [rw] schema_violation_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] + # Optional. The Pub/Sub message failed schema validation. + class AwsKinesisFailureReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # User-defined JavaScript function that can transform or filter a Pub/Sub @@ -1083,8 +1139,8 @@ class DetachSubscriptionResponse # # If not set, the default retry policy is applied. This generally implies # that messages will be retried as soon as possible for healthy subscribers. - # RetryPolicy will be triggered on NACKs or acknowledgement deadline - # exceeded events for a given message. + # RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + # events for a given message. # @!attribute [rw] detached # @return [::Boolean] # Optional. Indicates whether the subscription is detached from its topic. @@ -1099,7 +1155,7 @@ class DetachSubscriptionResponse # subscription: # # * The message sent to a subscriber is guaranteed not to be resent - # before the message's acknowledgement deadline expires. + # before the message's acknowledgment deadline expires. # * An acknowledged message will not be resent to a subscriber. # # Note that subscribers may still receive multiple copies of a message @@ -1176,7 +1232,7 @@ module State # Retry delay will be exponential based on provided minimum and maximum # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. # - # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded + # RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded # events for a given message. # # Retry Policy is implemented on a best effort basis. At times, the delay @@ -1218,7 +1274,7 @@ class RetryPolicy # value must be between 5 and 100. # # The number of delivery attempts is defined as 1 + (the sum of number of - # NACKs and number of times the acknowledgement deadline has been exceeded + # NACKs and number of times the acknowledgment deadline has been exceeded # for the message). # # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that @@ -1459,7 +1515,7 @@ module State # @return [::Google::Protobuf::Duration] # Optional. The maximum duration that can elapse before a new Cloud Storage # file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not - # exceed the subscription's acknowledgement deadline. + # exceed the subscription's acknowledgment deadline. # @!attribute [rw] max_bytes # @return [::Integer] # Optional. The maximum bytes that can be written to a Cloud Storage file @@ -1728,7 +1784,7 @@ class AcknowledgeRequest end # Request for the `StreamingPull` streaming RPC method. This request is used to - # establish the initial stream as well as to stream acknowledgements and ack + # establish the initial stream as well as to stream acknowledgments and ack # deadline modifications from the client to the server. # @!attribute [rw] subscription # @return [::String] @@ -1738,12 +1794,11 @@ class AcknowledgeRequest # Format is `projects/{project}/subscriptions/{sub}`. # @!attribute [rw] ack_ids # @return [::Array<::String>] - # Optional. List of acknowledgement IDs for acknowledging previously received + # Optional. List of acknowledgment IDs for acknowledging previously received # messages (received on this stream or a different stream). If an ack ID has # expired, the corresponding message may be redelivered later. Acknowledging - # a message more than once will not result in an error. If the - # acknowledgement ID is malformed, the stream will be aborted with status - # `INVALID_ARGUMENT`. + # a message more than once will not result in an error. If the acknowledgment + # ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`. # @!attribute [rw] modify_deadline_seconds # @return [::Array<::Integer>] # Optional. The list of new ack deadlines for the IDs listed in @@ -1759,7 +1814,7 @@ class AcknowledgeRequest # be aborted with status `INVALID_ARGUMENT`. # @!attribute [rw] modify_deadline_ack_ids # @return [::Array<::String>] - # Optional. List of acknowledgement IDs whose deadline will be modified based + # Optional. List of acknowledgment IDs whose deadline will be modified based # on the corresponding element in `modify_deadline_seconds`. This field can # be used to indicate that more time is needed to process a message by the # subscriber, or to make the message available for redelivery if the @@ -1825,39 +1880,39 @@ class StreamingPullResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # Acknowledgement IDs sent in one or more previous requests to acknowledge a + # Acknowledgment IDs sent in one or more previous requests to acknowledge a # previously received message. # @!attribute [rw] ack_ids # @return [::Array<::String>] - # Optional. Successfully processed acknowledgement IDs. + # Optional. Successfully processed acknowledgment IDs. # @!attribute [rw] invalid_ack_ids # @return [::Array<::String>] - # Optional. List of acknowledgement IDs that were malformed or whose - # acknowledgement deadline has expired. + # Optional. List of acknowledgment IDs that were malformed or whose + # acknowledgment deadline has expired. # @!attribute [rw] unordered_ack_ids # @return [::Array<::String>] - # Optional. List of acknowledgement IDs that were out of order. + # Optional. List of acknowledgment IDs that were out of order. # @!attribute [rw] temporary_failed_ack_ids # @return [::Array<::String>] - # Optional. List of acknowledgement IDs that failed processing with + # Optional. List of acknowledgment IDs that failed processing with # temporary issues. class AcknowledgeConfirmation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # Acknowledgement IDs sent in one or more previous requests to modify the + # Acknowledgment IDs sent in one or more previous requests to modify the # deadline for a specific message. # @!attribute [rw] ack_ids # @return [::Array<::String>] - # Optional. Successfully processed acknowledgement IDs. + # Optional. Successfully processed acknowledgment IDs. # @!attribute [rw] invalid_ack_ids # @return [::Array<::String>] - # Optional. List of acknowledgement IDs that were malformed or whose - # acknowledgement deadline has expired. + # Optional. List of acknowledgment IDs that were malformed or whose + # acknowledgment deadline has expired. # @!attribute [rw] temporary_failed_ack_ids # @return [::Array<::String>] - # Optional. List of acknowledgement IDs that failed processing with + # Optional. List of acknowledgment IDs that failed processing with # temporary issues. class ModifyAckDeadlineConfirmation include ::Google::Protobuf::MessageExts From 47dfa28e2b431c37b303701a4f462bb4cce9b42c Mon Sep 17 00:00:00 2001 From: Yash Saraf <45588765+YashSaraf11@users.noreply.github.com> Date: Thu, 19 Jun 2025 03:15:10 +0530 Subject: [PATCH 114/457] chore(secretmanager): Add regional samples for delayed destroy (#29466) --- ...gional_secret_with_delayed_destroy_test.rb | 29 ++++++++++ ...le_regional_secret_delayed_destroy_test.rb | 33 +++++++++++ .../samples/acceptance/regional_helper.rb | 2 + ...gional_secret_with_delayed_destroy_test.rb | 34 ++++++++++++ ...te_regional_secret_with_delayed_destroy.rb | 52 ++++++++++++++++++ ...disable_regional_secret_delayed_destroy.rb | 50 +++++++++++++++++ ...te_regional_secret_with_delayed_destroy.rb | 55 +++++++++++++++++++ 7 files changed, 255 insertions(+) create mode 100644 google-cloud-secret_manager/samples/acceptance/create_regional_secret_with_delayed_destroy_test.rb create mode 100644 google-cloud-secret_manager/samples/acceptance/disable_regional_secret_delayed_destroy_test.rb create mode 100644 google-cloud-secret_manager/samples/acceptance/update_regional_secret_with_delayed_destroy_test.rb create mode 100644 google-cloud-secret_manager/samples/create_regional_secret_with_delayed_destroy.rb create mode 100644 google-cloud-secret_manager/samples/disable_regional_secret_delayed_destroy.rb create mode 100644 google-cloud-secret_manager/samples/update_regional_secret_with_delayed_destroy.rb diff --git a/google-cloud-secret_manager/samples/acceptance/create_regional_secret_with_delayed_destroy_test.rb b/google-cloud-secret_manager/samples/acceptance/create_regional_secret_with_delayed_destroy_test.rb new file mode 100644 index 000000000000..6c95390071f4 --- /dev/null +++ b/google-cloud-secret_manager/samples/acceptance/create_regional_secret_with_delayed_destroy_test.rb @@ -0,0 +1,29 @@ +# Copyright 2025 Google, Inc +# +# 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 "uri" + +require_relative "regional_helper" + +describe "#create_regional_secret_with_delayed_destroy", :regional_secret_manager_snippet do + it "creates a regional secret with delayed destroy enabled" do + sample = SampleLoader.load "create_regional_secret_with_delayed_destroy.rb" + + out, _err = capture_io do + sample.run project_id: project_id, location_id: location_id, secret_id: secret_id, time_to_live: time_to_live + end + secret_id_regex = Regexp.escape secret_id + assert_match %r{Created regional secret: projects/\S+locations/\S+/secrets/#{secret_id_regex}}, out + end +end diff --git a/google-cloud-secret_manager/samples/acceptance/disable_regional_secret_delayed_destroy_test.rb b/google-cloud-secret_manager/samples/acceptance/disable_regional_secret_delayed_destroy_test.rb new file mode 100644 index 000000000000..943aa5eae962 --- /dev/null +++ b/google-cloud-secret_manager/samples/acceptance/disable_regional_secret_delayed_destroy_test.rb @@ -0,0 +1,33 @@ +# Copyright 2025 Google, Inc +# +# 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 "uri" + +require_relative "regional_helper" + +describe "#disable_regional_secret_delayed_destroy", :regional_secret_manager_snippet do + it "disables the regional secret delayed destroy" do + sample = SampleLoader.load "disable_regional_secret_delayed_destroy.rb" + + refute_nil secret_version + + assert_output(/Disabled secret delayed destroy/) do + sample.run project_id: project_id, location_id: location_id, secret_id: secret_id + end + + n_version = client.get_secret name: secret_name + refute_nil n_version + assert_nil n_version.version_destroy_ttl, "Expected versionDestroyTtl to be nil" + end +end diff --git a/google-cloud-secret_manager/samples/acceptance/regional_helper.rb b/google-cloud-secret_manager/samples/acceptance/regional_helper.rb index eb23b40ce069..45c254531de7 100644 --- a/google-cloud-secret_manager/samples/acceptance/regional_helper.rb +++ b/google-cloud-secret_manager/samples/acceptance/regional_helper.rb @@ -36,6 +36,8 @@ class RegionalSecretManagerSnippetSpec < Minitest::Spec let(:label_key) { "label-key" } let(:label_value) { "label-value" } + let(:time_to_live) { 86_400 } + let :client do Google::Cloud::SecretManager.secret_manager_service do |config| config.endpoint = api_endpoint diff --git a/google-cloud-secret_manager/samples/acceptance/update_regional_secret_with_delayed_destroy_test.rb b/google-cloud-secret_manager/samples/acceptance/update_regional_secret_with_delayed_destroy_test.rb new file mode 100644 index 000000000000..0be9b002a09b --- /dev/null +++ b/google-cloud-secret_manager/samples/acceptance/update_regional_secret_with_delayed_destroy_test.rb @@ -0,0 +1,34 @@ +# Copyright 2025 Google, Inc +# +# 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 "uri" + +require_relative "regional_helper" + +describe "#update_regional_secret_with_delayed_destroy", :regional_secret_manager_snippet do + it "updates the secret's delayed destroy ttl value" do + sample = SampleLoader.load "update_regional_secret_with_delayed_destroy.rb" + + refute_nil secret + + updated_time_to_live = 172_800 + + out, _err = capture_io do + sample.run project_id: project_id, location_id: location_id, secret_id: secret_id, updated_time_to_live: updated_time_to_live + end + + assert_match(/Updated regional secret/, out) + assert_match(/New updated regional secret ttl/, out) + end +end diff --git a/google-cloud-secret_manager/samples/create_regional_secret_with_delayed_destroy.rb b/google-cloud-secret_manager/samples/create_regional_secret_with_delayed_destroy.rb new file mode 100644 index 000000000000..f6c12f27597e --- /dev/null +++ b/google-cloud-secret_manager/samples/create_regional_secret_with_delayed_destroy.rb @@ -0,0 +1,52 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START secretmanager_create_regional_secret_with_delayed_destroy] +require "google/cloud/secret_manager" + +## +# Create a regional secret with delayed destroy +# +# @param project_id [String] Your Google Cloud project (e.g. "my-project") +# @param location_id [String] Your Google Cloud location (e.g. "us-west1") +# @param secret_id [String] Your secret name (e.g. "my-secret") +# @param time_to_live [Integer] Your delayed destroy ttl in seconds for secret versions (e.g. 86400) +# +def create_regional_secret_with_delayed_destroy project_id:, location_id:, secret_id:, time_to_live: + # Endpoint for the regional secret manager service. + api_endpoint = "secretmanager.#{location_id}.rep.googleapis.com" + + # Create the Secret Manager client. + client = Google::Cloud::SecretManager.secret_manager_service do |config| + config.endpoint = api_endpoint + end + + # Build the resource name of the parent project. + parent = client.location_path project: project_id, location: location_id + + # Create the secret. + secret = client.create_secret( + parent: parent, + secret_id: secret_id, + secret: { + version_destroy_ttl: { + seconds: time_to_live + } + } + ) + + # Print the new secret name. + puts "Created regional secret: #{secret.name}" +end +# [END secretmanager_create_regional_secret_with_delayed_destroy] diff --git a/google-cloud-secret_manager/samples/disable_regional_secret_delayed_destroy.rb b/google-cloud-secret_manager/samples/disable_regional_secret_delayed_destroy.rb new file mode 100644 index 000000000000..badbe54f92d6 --- /dev/null +++ b/google-cloud-secret_manager/samples/disable_regional_secret_delayed_destroy.rb @@ -0,0 +1,50 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START secretmanager_disable_regional_secret_delayed_destroy] +require "google/cloud/secret_manager" + +## +# Disables a regional secret delayed destroy +# +# @param project_id [String] Your Google Cloud project (e.g. "my-project") +# @param location_id [String] Your Google Cloud location (e.g. "us-west1") +# @param secret_id [String] Your secret name (e.g. "my-secret") +# +def disable_regional_secret_delayed_destroy project_id:, location_id:, secret_id: + # Endpoint for the regional secret manager service. + api_endpoint = "secretmanager.#{location_id}.rep.googleapis.com" + + # Create the Secret Manager client. + client = Google::Cloud::SecretManager.secret_manager_service do |config| + config.endpoint = api_endpoint + end + + # Build the resource name of the secret. + name = client.secret_path project: project_id, location: location_id, secret: secret_id + + # Create the secret. + secret = client.update_secret( + secret: { + name: name + }, + update_mask: { + paths: ["version_destroy_ttl"] + } + ) + + # Print a success message. + puts "Disabled secret delayed destroy: #{secret.name}" +end +# [END secretmanager_disable_regional_secret_delayed_destroy] diff --git a/google-cloud-secret_manager/samples/update_regional_secret_with_delayed_destroy.rb b/google-cloud-secret_manager/samples/update_regional_secret_with_delayed_destroy.rb new file mode 100644 index 000000000000..624b5557b5f8 --- /dev/null +++ b/google-cloud-secret_manager/samples/update_regional_secret_with_delayed_destroy.rb @@ -0,0 +1,55 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START secretmanager_update_regional_secret_with_delayed_destroy] +require "google/cloud/secret_manager" + +## +# Update a regional secret's delayed destroy +# +# @param project_id [String] Your Google Cloud project (e.g. "my-project") +# @param location_id [String] Your Google Cloud location (e.g. "us-west1") +# @param secret_id [String] Your secret name (e.g. "my-secret") +# @param updated_time_to_live [Integer] Your ttl in seconds for new secret versions (e.g., 86400) +# +def update_regional_secret_with_delayed_destroy project_id:, location_id:, secret_id:, updated_time_to_live: + # Endpoint for the regional secret manager service. + api_endpoint = "secretmanager.#{location_id}.rep.googleapis.com" + + # Create the Secret Manager client. + client = Google::Cloud::SecretManager.secret_manager_service do |config| + config.endpoint = api_endpoint + end + + # Build the resource name of the secret. + name = client.secret_path project: project_id, location: location_id, secret: secret_id + + # Create the secret. + secret = client.update_secret( + secret: { + name: name, + version_destroy_ttl: { + seconds: updated_time_to_live + } + }, + update_mask: { + paths: ["version_destroy_ttl"] + } + ) + + # Print the updated secret name and the new ttl value. + puts "Updated regional secret: #{secret.name}" + puts "New updated regional secret ttl: #{secret.version_destroy_ttl}" +end +# [END secretmanager_update_regional_secret_with_delayed_destroy] From bf8c8b1d04a8333011ca666763776d8c1bf09b7d Mon Sep 17 00:00:00 2001 From: Yash Saraf <45588765+YashSaraf11@users.noreply.github.com> Date: Thu, 19 Jun 2025 03:15:25 +0530 Subject: [PATCH 115/457] chore(secretmanager): Add global samples for delayed destroy (#29453) --- google-cloud-secret_manager/samples/README.md | 37 ++++++++------ ...create_secret_with_delayed_destroy_test.rb | 29 +++++++++++ .../disable_secret_delayed_destroy_test.rb | 33 +++++++++++++ .../samples/acceptance/helper.rb | 2 + ...update_secret_with_delayed_destroy_test.rb | 34 +++++++++++++ .../create_secret_with_delayed_destroy.rb | 49 +++++++++++++++++++ .../samples/disable_secret_delayed_destroy.rb | 44 +++++++++++++++++ .../update_secret_with_delayed_destroy.rb | 49 +++++++++++++++++++ 8 files changed, 263 insertions(+), 14 deletions(-) create mode 100644 google-cloud-secret_manager/samples/acceptance/create_secret_with_delayed_destroy_test.rb create mode 100644 google-cloud-secret_manager/samples/acceptance/disable_secret_delayed_destroy_test.rb create mode 100644 google-cloud-secret_manager/samples/acceptance/update_secret_with_delayed_destroy_test.rb create mode 100644 google-cloud-secret_manager/samples/create_secret_with_delayed_destroy.rb create mode 100644 google-cloud-secret_manager/samples/disable_secret_delayed_destroy.rb create mode 100644 google-cloud-secret_manager/samples/update_secret_with_delayed_destroy.rb diff --git a/google-cloud-secret_manager/samples/README.md b/google-cloud-secret_manager/samples/README.md index bb83fe2a6544..5301e92a5fd8 100644 --- a/google-cloud-secret_manager/samples/README.md +++ b/google-cloud-secret_manager/samples/README.md @@ -51,20 +51,29 @@ These samples show how to use the [Google Secret Manager API] Usage: bundle exec ruby snippets.rb [command] [arguments] Commands: - access_secret_version Access a secret version - add_secret_version Add a new secret version - create_secret Create a new secret - delete_secret Delete an existing secret - destroy_secret_version Destroy a secret version - disable_secret_version Disable a secret version - enable_secret_version Enable a secret version - get_secret Get a secret - get_secret_version Get a secret version - iam_grant_access Grant the member access to the secret - iam_revoke_access Revoke the member access to the secret - list_secret_versions List all versions for a secret - list_secrets List all secrets - update_secret Update a secret + access_secret_version Access a secret version + add_secret_version Add a new secret version + create_secret Create a new secret + create_secret_with_annotations Create a new secret with annotations + create_secret_with_delayed_destroy Create a new secret with delayed destroy + create_secret_with_labels Create a new secret with labels + create_ummr_secret Create a new secret with user managed replication + delete_secret Delete an existing secret + destroy_secret_version Destroy a secret version + disable_secret_version Disable a secret version + disable_secret_delayed_destroy Disable a secret delayed destroy + edit_secret_annotations Edit existing secret annotations + enable_secret_version Enable a secret version + get_secret Get a secret + get_secret_version Get a secret version + iam_grant_access Grant the member access to the secret + iam_revoke_access Revoke the member access to the secret + list_secret_versions List all versions for a secret + list_secrets List all secrets + update_secret Update a secret + updated_secret_with_delayed_destroy Update a secret delayed destroy value. + view_secret_annotations View a secret annotations + view_secret_labels View a secret labels Environment variables: GOOGLE_CLOUD_PROJECT ID of the Google Cloud project to run snippets diff --git a/google-cloud-secret_manager/samples/acceptance/create_secret_with_delayed_destroy_test.rb b/google-cloud-secret_manager/samples/acceptance/create_secret_with_delayed_destroy_test.rb new file mode 100644 index 000000000000..f2f4c8a55d3f --- /dev/null +++ b/google-cloud-secret_manager/samples/acceptance/create_secret_with_delayed_destroy_test.rb @@ -0,0 +1,29 @@ +# Copyright 2025 Google, Inc +# +# 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 "uri" + +require_relative "helper" + +describe "#create_secret_with_delayed_destroy", :secret_manager_snippet do + it "creates a secret with delayed destroy enabled" do + sample = SampleLoader.load "create_secret_with_delayed_destroy.rb" + + out, _err = capture_io do + sample.run project_id: project_id, secret_id: secret_id, time_to_live: time_to_live + end + secret_id_regex = Regexp.escape secret_id + assert_match %r{Created secret: projects/\S+/secrets/#{secret_id_regex}}, out + end +end diff --git a/google-cloud-secret_manager/samples/acceptance/disable_secret_delayed_destroy_test.rb b/google-cloud-secret_manager/samples/acceptance/disable_secret_delayed_destroy_test.rb new file mode 100644 index 000000000000..ff3bd1ee743f --- /dev/null +++ b/google-cloud-secret_manager/samples/acceptance/disable_secret_delayed_destroy_test.rb @@ -0,0 +1,33 @@ +# Copyright 2025 Google, Inc +# +# 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 "uri" + +require_relative "helper" + +describe "#disable_secret_delayed_destroy", :secret_manager_snippet do + it "disables the secret delayed destroy" do + sample = SampleLoader.load "disable_secret_delayed_destroy.rb" + + refute_nil secret_version + + assert_output(/Disabled secret delayed destroy/) do + sample.run project_id: project_id, secret_id: secret_id + end + + n_version = client.get_secret name: secret_name + refute_nil n_version + assert_nil n_version.version_destroy_ttl, "Expected versionDestroyTtl to be nil" + end +end diff --git a/google-cloud-secret_manager/samples/acceptance/helper.rb b/google-cloud-secret_manager/samples/acceptance/helper.rb index c793067682e7..c5c774644797 100644 --- a/google-cloud-secret_manager/samples/acceptance/helper.rb +++ b/google-cloud-secret_manager/samples/acceptance/helper.rb @@ -38,6 +38,8 @@ class SecretManagerSnippetSpec < Minitest::Spec let(:label_key) { "label-key" } let(:label_value) { "label-value" } + let(:time_to_live) { 86_400 } + let :secret do client.create_secret( parent: "projects/#{project_id}", diff --git a/google-cloud-secret_manager/samples/acceptance/update_secret_with_delayed_destroy_test.rb b/google-cloud-secret_manager/samples/acceptance/update_secret_with_delayed_destroy_test.rb new file mode 100644 index 000000000000..b84f0d757678 --- /dev/null +++ b/google-cloud-secret_manager/samples/acceptance/update_secret_with_delayed_destroy_test.rb @@ -0,0 +1,34 @@ +# Copyright 2025 Google, Inc +# +# 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 "uri" + +require_relative "helper" + +describe "#update_secret_with_delayed_destroy", :secret_manager_snippet do + it "updates the secret delayed destroy ttl" do + sample = SampleLoader.load "update_secret_with_delayed_destroy.rb" + + refute_nil secret + + updated_time_to_live = 172_800 + + out, _err = capture_io do + sample.run project_id: project_id, secret_id: secret_id, updated_time_to_live: updated_time_to_live + end + + assert_match(/Updated secret/, out) + assert_match(/New updated secret version ttl/, out) + end +end diff --git a/google-cloud-secret_manager/samples/create_secret_with_delayed_destroy.rb b/google-cloud-secret_manager/samples/create_secret_with_delayed_destroy.rb new file mode 100644 index 000000000000..4ade4bf415e0 --- /dev/null +++ b/google-cloud-secret_manager/samples/create_secret_with_delayed_destroy.rb @@ -0,0 +1,49 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START secretmanager_create_secret_with_delayed_destroy] +require "google/cloud/secret_manager" + +## +# Create a secret with delayed destroy. +# +# @param project_id [String] Your Google Cloud project (e.g. "my-project") +# @param secret_id [String] Your secret name (e.g. "my-secret") +# @param time_to_live [Integer] Your delayed destroy ttl in seconds for secret versions (e.g. 86400) +# +def create_secret_with_delayed_destroy project_id:, secret_id:, time_to_live: + # Create a Secret Manager client. + client = Google::Cloud::SecretManager.secret_manager_service + + # Build the resource name of the parent project. + parent = client.project_path project: project_id + + # Create the secret. + secret = client.create_secret( + parent: parent, + secret_id: secret_id, + secret: { + replication: { + automatic: {} + }, + version_destroy_ttl: { + seconds: time_to_live + } + } + ) + + # Print the new secret name. + puts "Created secret: #{secret.name}" +end +# [END secretmanager_create_secret_with_delayed_destroy] diff --git a/google-cloud-secret_manager/samples/disable_secret_delayed_destroy.rb b/google-cloud-secret_manager/samples/disable_secret_delayed_destroy.rb new file mode 100644 index 000000000000..45b7f0496408 --- /dev/null +++ b/google-cloud-secret_manager/samples/disable_secret_delayed_destroy.rb @@ -0,0 +1,44 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START secretmanager_disable_secret_delayed_destroy] +require "google/cloud/secret_manager" + +## +# Disables a secret delayed destroy +# +# @param project_id [String] Your Google Cloud project (e.g. "my-project") +# @param secret_id [String] Your secret name (e.g. "my-secret") +# +def disable_secret_delayed_destroy project_id:, secret_id: + # Create a Secret Manager client. + client = Google::Cloud::SecretManager.secret_manager_service + + # Build the resource name of the secret. + name = client.secret_path project: project_id, secret: secret_id + + # Disable the secret's delayed destroy. + secret = client.update_secret( + secret: { + name: name + }, + update_mask: { + paths: ["version_destroy_ttl"] + } + ) + + # Print a success message. + puts "Disabled secret delayed destroy: #{secret.name}" +end +# [END secretmanager_disable_secret_delayed_destroy] diff --git a/google-cloud-secret_manager/samples/update_secret_with_delayed_destroy.rb b/google-cloud-secret_manager/samples/update_secret_with_delayed_destroy.rb new file mode 100644 index 000000000000..fb33b04452f2 --- /dev/null +++ b/google-cloud-secret_manager/samples/update_secret_with_delayed_destroy.rb @@ -0,0 +1,49 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START secretmanager_update_secret_with_delayed_destroy] +require "google/cloud/secret_manager" + +## +# Update secret with delayed destroy. +# +# @param project_id [String] Your Google Cloud project (e.g. "my-project") +# @param secret_id [String] Your secret name (e.g. "my-secret") +# @param updated_time_to_live [Integer] Your ttl in seconds for new secret versions (e.g., 86400) +# +def update_secret_with_delayed_destroy project_id:, secret_id:, updated_time_to_live: + # Create a Secret Manager client. + client = Google::Cloud::SecretManager.secret_manager_service + + # Build the resource name of the secret. + name = client.secret_path project: project_id, secret: secret_id + + # Updates the secret. + secret = client.update_secret( + secret: { + name: name, + version_destroy_ttl: { + seconds: updated_time_to_live + } + }, + update_mask: { + paths: ["version_destroy_ttl"] + } + ) + + # Print the updated secret name and annotations. + puts "Updated secret: #{secret.name}" + puts "New updated secret version ttl: #{secret.version_destroy_ttl}" +end +# [END secretmanager_update_secret_with_delayed_destroy] From 8b460357483d691493599a1e0986cfd8a2adf0f7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:00:47 -0700 Subject: [PATCH 116/457] chore(main): release google-cloud-pubsub-v1 1.10.0 (#30527) --- .release-please-manifest.json | 2 +- google-cloud-pubsub-v1/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/pubsub/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.pubsub.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 36a84eb3cdec..59dff18a473c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -603,7 +603,7 @@ "google-cloud-profiler-v2+FILLER": "0.0.0", "google-cloud-pubsub": "2.22.0", "google-cloud-pubsub+FILLER": "0.0.0", - "google-cloud-pubsub-v1": "1.9.0", + "google-cloud-pubsub-v1": "1.10.0", "google-cloud-pubsub-v1+FILLER": "0.0.0", "google-cloud-rapid_migration_assessment": "2.0.1", "google-cloud-rapid_migration_assessment+FILLER": "0.0.0", diff --git a/google-cloud-pubsub-v1/CHANGELOG.md b/google-cloud-pubsub-v1/CHANGELOG.md index 374992b3dc3b..4193ac02e94f 100644 --- a/google-cloud-pubsub-v1/CHANGELOG.md +++ b/google-cloud-pubsub-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +### 1.10.0 (2025-06-23) + +#### Features + +* Add SchemaViolationReason to IngestionFailureEvent ([#30433](https://github.com/googleapis/google-cloud-ruby/issues/30433)) +#### Documentation + +* Standardize spelling of "acknowledgment" in Pub/Sub protos + ### 1.9.0 (2025-05-12) #### Features diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb index d30e1af303c4..a03fc54935fa 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module PubSub module V1 - VERSION = "1.9.0" + VERSION = "1.10.0" end end end diff --git a/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json b/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json index 1cc762ea3618..e4810961176c 100644 --- a/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json +++ b/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-pubsub-v1", - "version": "1.9.0", + "version": "1.10.0", "language": "RUBY", "apis": [ { From 7e71e85e53894bd240852818c3234c3c79aac906 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:50:50 -0700 Subject: [PATCH 117/457] fix(commerce-consumer-procurement-v1): Fixed transcoding for update_license_pool RPC (#30441) --- .../v1/license_management_service/rest/service_stub.rb | 2 +- .../consumer/procurement/v1/license_management_service_pb.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/service_stub.rb b/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/service_stub.rb index f8a5eeb5a62f..521b885f61bc 100644 --- a/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/service_stub.rb +++ b/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/service_stub.rb @@ -312,7 +312,7 @@ def self.transcode_update_license_pool_request request_pb uri_template: "/v1/{license_pool.name}", body: "license_pool", matches: [ - ["license_pool.name", %r{^billingAccounts/[^/]+/orders/[^/]+/licensePool/[^/]+/?$}, false] + ["license_pool.name", %r{^billingAccounts/[^/]+/orders/[^/]+/licensePool/?$}, false] ] ) transcoder.transcode request_pb diff --git a/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service_pb.rb b/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service_pb.rb index f4f700dc121a..d597caed33f9 100644 --- a/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service_pb.rb +++ b/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service_pb.rb @@ -13,7 +13,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\nNgoogle/cloud/commerce/consumer/procurement/v1/license_management_service.proto\x12-google.cloud.commerce.consumer.procurement.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x03\n\x12\x41ssignmentProtocol\x12x\n\x16manual_assignment_type\x18\x02 \x01(\x0b\x32V.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentTypeH\x00\x12t\n\x14\x61uto_assignment_type\x18\x03 \x01(\x0b\x32T.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentTypeH\x00\x1a\x16\n\x14ManualAssignmentType\x1aR\n\x12\x41utoAssignmentType\x12<\n\x14inactive_license_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x42\x11\n\x0f\x61ssignment_type\"\xf2\x02\n\x0bLicensePool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12k\n\x1blicense_assignment_protocol\x18\x02 \x01(\x0b\x32\x41.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocolB\x03\xe0\x41\x02\x12$\n\x17\x61vailable_license_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13total_license_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03:\x9a\x01\xea\x41\x96\x01\n;cloudcommerceconsumerprocurement.googleapis.com/LicensePool\x12\n\x0fUnassignRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tusernames\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x12\n\x10UnassignResponse\"e\n\x1d\x45numerateLicensedUsersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x92\x01\n\x0cLicensedUser\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x34\n\x0b\x61ssign_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x11recent_usage_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x8e\x01\n\x1e\x45numerateLicensedUsersResponse\x12S\n\x0elicensed_users\x18\x01 \x03(\x0b\x32;.google.cloud.commerce.consumer.procurement.v1.LicensedUser\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xc5\n\n\x18LicenseManagementService\x12\xd4\x01\n\x0eGetLicensePool\x12\x44.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest\x1a:.google.cloud.commerce.consumer.procurement.v1.LicensePool\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=billingAccounts/*/orders/*/licensePool}\x12\x8b\x02\n\x11UpdateLicensePool\x12G.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest\x1a:.google.cloud.commerce.consumer.procurement.v1.LicensePool\"q\xda\x41\x18license_pool,update_mask\x82\xd3\xe4\x93\x02P2@/v1/{license_pool.name=billingAccounts/*/orders/*/licensePool/*}:\x0clicense_pool\x12\xdf\x01\n\x06\x41ssign\x12<.google.cloud.commerce.consumer.procurement.v1.AssignRequest\x1a=.google.cloud.commerce.consumer.procurement.v1.AssignResponse\"X\xda\x41\x10parent,usernames\x82\xd3\xe4\x93\x02?\":/v1/{parent=billingAccounts/*/orders/*/licensePool}:assign:\x01*\x12\xe7\x01\n\x08Unassign\x12>.google.cloud.commerce.consumer.procurement.v1.UnassignRequest\x1a?.google.cloud.commerce.consumer.procurement.v1.UnassignResponse\"Z\xda\x41\x10parent,usernames\x82\xd3\xe4\x93\x02\x41\"\n\x0fUnassignRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tusernames\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x12\n\x10UnassignResponse\"e\n\x1d\x45numerateLicensedUsersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x92\x01\n\x0cLicensedUser\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x34\n\x0b\x61ssign_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x11recent_usage_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x8e\x01\n\x1e\x45numerateLicensedUsersResponse\x12S\n\x0elicensed_users\x18\x01 \x03(\x0b\x32;.google.cloud.commerce.consumer.procurement.v1.LicensedUser\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xc3\n\n\x18LicenseManagementService\x12\xd4\x01\n\x0eGetLicensePool\x12\x44.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest\x1a:.google.cloud.commerce.consumer.procurement.v1.LicensePool\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=billingAccounts/*/orders/*/licensePool}\x12\x89\x02\n\x11UpdateLicensePool\x12G.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest\x1a:.google.cloud.commerce.consumer.procurement.v1.LicensePool\"o\xda\x41\x18license_pool,update_mask\x82\xd3\xe4\x93\x02N2>/v1/{license_pool.name=billingAccounts/*/orders/*/licensePool}:\x0clicense_pool\x12\xdf\x01\n\x06\x41ssign\x12<.google.cloud.commerce.consumer.procurement.v1.AssignRequest\x1a=.google.cloud.commerce.consumer.procurement.v1.AssignResponse\"X\xda\x41\x10parent,usernames\x82\xd3\xe4\x93\x02?\":/v1/{parent=billingAccounts/*/orders/*/licensePool}:assign:\x01*\x12\xe7\x01\n\x08Unassign\x12>.google.cloud.commerce.consumer.procurement.v1.UnassignRequest\x1a?.google.cloud.commerce.consumer.procurement.v1.UnassignResponse\"Z\xda\x41\x10parent,usernames\x82\xd3\xe4\x93\x02\x41\" Date: Mon, 23 Jun 2025 14:52:28 -0700 Subject: [PATCH 118/457] chore(main): release google-cloud-recaptcha_enterprise 2.0.2 (#30458) --- .release-please-manifest.json | 2 +- google-cloud-recaptcha_enterprise/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/recaptcha_enterprise/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 59dff18a473c..a27208e45265 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -609,7 +609,7 @@ "google-cloud-rapid_migration_assessment+FILLER": "0.0.0", "google-cloud-rapid_migration_assessment-v1": "2.1.0", "google-cloud-rapid_migration_assessment-v1+FILLER": "0.0.0", - "google-cloud-recaptcha_enterprise": "2.0.1", + "google-cloud-recaptcha_enterprise": "2.0.2", "google-cloud-recaptcha_enterprise+FILLER": "0.0.0", "google-cloud-recaptcha_enterprise-v1": "1.8.0", "google-cloud-recaptcha_enterprise-v1+FILLER": "0.0.0", diff --git a/google-cloud-recaptcha_enterprise/CHANGELOG.md b/google-cloud-recaptcha_enterprise/CHANGELOG.md index faf31cab4bcb..06b53a9f952b 100644 --- a/google-cloud-recaptcha_enterprise/CHANGELOG.md +++ b/google-cloud-recaptcha_enterprise/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.0.2 (2025-06-23) + +#### Documentation + +* Add h1 heading to migration docs ([#30436](https://github.com/googleapis/google-cloud-ruby/issues/30436)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb b/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb index 42ddc7574415..9a772f800250 100644 --- a/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb +++ b/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module RecaptchaEnterprise - VERSION = "2.0.1" + VERSION = "2.0.2" end end end From 270c2ed84c6504af60a77261f0611ff715381e01 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:56:36 -0700 Subject: [PATCH 119/457] feat(ai_platform-v1): Support for ModelGarden deploy RPC feat(ai_platform-v1): Support for update_rag_engine_config and get_rag_engine_config RPCs feat(ai_platform-v1): Support for GenAiAdvancedFeaturesConfig feat(ai_platform-v1): Updates to PSCAutomationConfig and PscInterfaceConfig --- .../.owlbot-manifest.json | 6 + .../gapic_metadata.json | 15 + .../ai_platform/v1/model_garden_service.rb | 1 + .../v1/model_garden_service/client.rb | 137 + .../v1/model_garden_service/operations.rb | 821 +++ .../v1/model_garden_service/paths.rb | 36 + .../v1/model_garden_service/rest.rb | 1 + .../v1/model_garden_service/rest/client.rb | 130 + .../model_garden_service/rest/operations.rb | 4398 +++++++++++++++++ .../model_garden_service/rest/service_stub.rb | 62 + .../v1/vertex_rag_data_service/client.rb | 198 + .../v1/vertex_rag_data_service/paths.rb | 17 + .../v1/vertex_rag_data_service/rest/client.rb | 184 + .../rest/service_stub.rb | 123 + .../google/cloud/aiplatform/v1/endpoint_pb.rb | 4 +- .../aiplatform/v1/model_garden_service_pb.rb | 15 +- .../v1/model_garden_service_services_pb.rb | 2 + .../aiplatform/v1/service_networking_pb.rb | 4 +- .../cloud/aiplatform/v1/vertex_rag_data_pb.rb | 7 +- .../v1/vertex_rag_data_service_pb.rb | 5 +- .../v1/vertex_rag_data_service_services_pb.rb | 4 + .../google/cloud/aiplatform/v1/endpoint.rb | 37 +- .../aiplatform/v1/model_garden_service.rb | 153 + .../cloud/aiplatform/v1/service_networking.rb | 66 +- .../cloud/aiplatform/v1/vertex_rag_data.rb | 67 + .../aiplatform/v1/vertex_rag_data_service.rb | 35 + .../snippets/model_garden_service/deploy.rb | 54 + ...t_metadata_google.cloud.aiplatform.v1.json | 120 + .../get_rag_engine_config.rb | 47 + .../update_rag_engine_config.rb | 54 + .../model_garden_service_operations_test.rb | 398 ++ .../v1/model_garden_service_paths_test.rb | 24 + .../v1/model_garden_service_rest_test.rb | 58 + .../v1/model_garden_service_test.rb | 86 + .../v1/vertex_rag_data_service_paths_test.rb | 12 + .../v1/vertex_rag_data_service_rest_test.rb | 108 + .../v1/vertex_rag_data_service_test.rb | 121 + 37 files changed, 7594 insertions(+), 16 deletions(-) create mode 100644 google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/operations.rb create mode 100644 google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/operations.rb create mode 100644 google-cloud-ai_platform-v1/snippets/model_garden_service/deploy.rb create mode 100644 google-cloud-ai_platform-v1/snippets/vertex_rag_data_service/get_rag_engine_config.rb create mode 100644 google-cloud-ai_platform-v1/snippets/vertex_rag_data_service/update_rag_engine_config.rb create mode 100644 google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_operations_test.rb diff --git a/google-cloud-ai_platform-v1/.owlbot-manifest.json b/google-cloud-ai_platform-v1/.owlbot-manifest.json index a938d42a106f..ffe3ca7e99b2 100644 --- a/google-cloud-ai_platform-v1/.owlbot-manifest.json +++ b/google-cloud-ai_platform-v1/.owlbot-manifest.json @@ -169,9 +169,11 @@ "lib/google/cloud/ai_platform/v1/model_garden_service.rb", "lib/google/cloud/ai_platform/v1/model_garden_service/client.rb", "lib/google/cloud/ai_platform/v1/model_garden_service/credentials.rb", + "lib/google/cloud/ai_platform/v1/model_garden_service/operations.rb", "lib/google/cloud/ai_platform/v1/model_garden_service/paths.rb", "lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb", "lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb", + "lib/google/cloud/ai_platform/v1/model_garden_service/rest/operations.rb", "lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb", "lib/google/cloud/ai_platform/v1/model_service.rb", "lib/google/cloud/ai_platform/v1/model_service/client.rb", @@ -796,6 +798,7 @@ "snippets/metadata_service/update_execution.rb", "snippets/migration_service/batch_migrate_resources.rb", "snippets/migration_service/search_migratable_resources.rb", + "snippets/model_garden_service/deploy.rb", "snippets/model_garden_service/get_publisher_model.rb", "snippets/model_service/batch_import_evaluated_annotations.rb", "snippets/model_service/batch_import_model_evaluation_slices.rb", @@ -917,11 +920,13 @@ "snippets/vertex_rag_data_service/delete_rag_corpus.rb", "snippets/vertex_rag_data_service/delete_rag_file.rb", "snippets/vertex_rag_data_service/get_rag_corpus.rb", + "snippets/vertex_rag_data_service/get_rag_engine_config.rb", "snippets/vertex_rag_data_service/get_rag_file.rb", "snippets/vertex_rag_data_service/import_rag_files.rb", "snippets/vertex_rag_data_service/list_rag_corpora.rb", "snippets/vertex_rag_data_service/list_rag_files.rb", "snippets/vertex_rag_data_service/update_rag_corpus.rb", + "snippets/vertex_rag_data_service/update_rag_engine_config.rb", "snippets/vertex_rag_data_service/upload_rag_file.rb", "snippets/vertex_rag_service/augment_prompt.rb", "snippets/vertex_rag_service/corroborate_content.rb", @@ -1007,6 +1012,7 @@ "test/google/cloud/ai_platform/v1/migration_service_paths_test.rb", "test/google/cloud/ai_platform/v1/migration_service_rest_test.rb", "test/google/cloud/ai_platform/v1/migration_service_test.rb", + "test/google/cloud/ai_platform/v1/model_garden_service_operations_test.rb", "test/google/cloud/ai_platform/v1/model_garden_service_paths_test.rb", "test/google/cloud/ai_platform/v1/model_garden_service_rest_test.rb", "test/google/cloud/ai_platform/v1/model_garden_service_test.rb", diff --git a/google-cloud-ai_platform-v1/gapic_metadata.json b/google-cloud-ai_platform-v1/gapic_metadata.json index e3851eb43bf7..fa3e4857248f 100644 --- a/google-cloud-ai_platform-v1/gapic_metadata.json +++ b/google-cloud-ai_platform-v1/gapic_metadata.json @@ -1165,6 +1165,11 @@ "methods": [ "get_publisher_model" ] + }, + "Deploy": { + "methods": [ + "deploy" + ] } } } @@ -1815,6 +1820,16 @@ "methods": [ "delete_rag_file" ] + }, + "UpdateRagEngineConfig": { + "methods": [ + "update_rag_engine_config" + ] + }, + "GetRagEngineConfig": { + "methods": [ + "get_rag_engine_config" + ] } } } diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service.rb index 7dd6a6f6cbb9..79c3ce17195e 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service.rb @@ -24,6 +24,7 @@ require "google/cloud/ai_platform/v1/model_garden_service/credentials" require "google/cloud/ai_platform/v1/model_garden_service/paths" +require "google/cloud/ai_platform/v1/model_garden_service/operations" require "google/cloud/ai_platform/v1/model_garden_service/client" require "google/cloud/ai_platform/v1/model_garden_service/rest" diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb index ca141dd9fbbf..eeeb3ba1e422 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb @@ -151,6 +151,13 @@ def initialize @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + @model_garden_service_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::AIPlatform::V1::ModelGardenService::Stub, credentials: credentials, @@ -190,6 +197,13 @@ def initialize end end + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AIPlatform::V1::ModelGardenService::Operations] + # + attr_reader :operations_client + ## # Get the associated client for mix-in of the Locations. # @@ -312,6 +326,122 @@ def get_publisher_model request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Deploys a model to a new endpoint. + # + # @overload deploy(request, options = nil) + # Pass arguments to `deploy` via a request object, either of type + # {::Google::Cloud::AIPlatform::V1::DeployRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AIPlatform::V1::DeployRequest, ::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 deploy(publisher_model_name: nil, hugging_face_model_id: nil, destination: nil, model_config: nil, endpoint_config: nil, deploy_config: nil) + # Pass arguments to `deploy` 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 publisher_model_name [::String] + # The Model Garden model to deploy. + # Format: + # `publishers/{publisher}/models/{publisher_model}@{version_id}`, or + # `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`. + # + # Note: The following fields are mutually exclusive: `publisher_model_name`, `hugging_face_model_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param hugging_face_model_id [::String] + # The Hugging Face model to deploy. + # Format: Hugging Face model ID like `google/gemma-2-2b-it`. + # + # Note: The following fields are mutually exclusive: `hugging_face_model_id`, `publisher_model_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param destination [::String] + # Required. The resource name of the Location to deploy the model in. + # Format: `projects/{project}/locations/{location}` + # @param model_config [::Google::Cloud::AIPlatform::V1::DeployRequest::ModelConfig, ::Hash] + # Optional. The model config to use for the deployment. + # If not specified, the default model config will be used. + # @param endpoint_config [::Google::Cloud::AIPlatform::V1::DeployRequest::EndpointConfig, ::Hash] + # Optional. The endpoint config to use for the deployment. + # If not specified, the default endpoint config will be used. + # @param deploy_config [::Google::Cloud::AIPlatform::V1::DeployRequest::DeployConfig, ::Hash] + # Optional. The deploy config to use for the deployment. + # If not specified, the default deploy config will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ai_platform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AIPlatform::V1::ModelGardenService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AIPlatform::V1::DeployRequest.new + # + # # Call the deploy method. + # result = client.deploy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeployRequest + + # 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.deploy.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.destination + header_params["destination"] = request.destination + 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.deploy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.deploy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @model_garden_service_stub.call_rpc :deploy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 ModelGardenService API. # @@ -483,11 +613,18 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :get_publisher_model + ## + # RPC-specific configuration for `deploy` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy # @private def initialize parent_rpcs = nil get_publisher_model_config = parent_rpcs.get_publisher_model if parent_rpcs.respond_to? :get_publisher_model @get_publisher_model = ::Gapic::Config::Method.new get_publisher_model_config + deploy_config = parent_rpcs.deploy if parent_rpcs.respond_to? :deploy + @deploy = ::Gapic::Config::Method.new deploy_config yield self if block_given? end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/operations.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/operations.rb new file mode 100644 index 000000000000..afcd5adb9ef6 --- /dev/null +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/operations.rb @@ -0,0 +1,821 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AIPlatform + module V1 + module ModelGardenService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ModelGardenService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ModelGardenService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "aiplatform.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/paths.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/paths.rb index 4d1d406cf3f8..b62699a37565 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/paths.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/paths.rb @@ -24,6 +24,23 @@ module V1 module ModelGardenService # Path helper methods for the ModelGardenService 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 PublisherModel resource string. # @@ -41,6 +58,25 @@ def publisher_model_path publisher:, model: "publishers/#{publisher}/models/#{model}" end + ## + # Create a fully-qualified Reservation resource string. + # + # The resource will be in the following format: + # + # `projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}` + # + # @param project_id_or_number [String] + # @param zone [String] + # @param reservation_name [String] + # + # @return [::String] + def reservation_path project_id_or_number:, zone:, reservation_name: + raise ::ArgumentError, "project_id_or_number cannot contain /" if project_id_or_number.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project_id_or_number}/zones/#{zone}/reservations/#{reservation_name}" + end + extend self end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb index f9f65add1d1b..ef39796ea480 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb @@ -25,6 +25,7 @@ require "google/cloud/ai_platform/v1/model_garden_service/credentials" require "google/cloud/ai_platform/v1/model_garden_service/paths" +require "google/cloud/ai_platform/v1/model_garden_service/rest/operations" require "google/cloud/ai_platform/v1/model_garden_service/rest/client" module Google diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb index 0bc351f7be2a..eced1b0cc0f2 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb @@ -148,6 +148,13 @@ def initialize @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + @operations_client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + @model_garden_service_stub = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, @@ -185,6 +192,13 @@ def initialize end end + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AIPlatform::V1::ModelGardenService::Rest::Operations] + # + attr_reader :operations_client + ## # Get the associated client for mix-in of the Locations. # @@ -300,6 +314,115 @@ def get_publisher_model request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Deploys a model to a new endpoint. + # + # @overload deploy(request, options = nil) + # Pass arguments to `deploy` via a request object, either of type + # {::Google::Cloud::AIPlatform::V1::DeployRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AIPlatform::V1::DeployRequest, ::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 deploy(publisher_model_name: nil, hugging_face_model_id: nil, destination: nil, model_config: nil, endpoint_config: nil, deploy_config: nil) + # Pass arguments to `deploy` 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 publisher_model_name [::String] + # The Model Garden model to deploy. + # Format: + # `publishers/{publisher}/models/{publisher_model}@{version_id}`, or + # `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`. + # + # Note: The following fields are mutually exclusive: `publisher_model_name`, `hugging_face_model_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param hugging_face_model_id [::String] + # The Hugging Face model to deploy. + # Format: Hugging Face model ID like `google/gemma-2-2b-it`. + # + # Note: The following fields are mutually exclusive: `hugging_face_model_id`, `publisher_model_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @param destination [::String] + # Required. The resource name of the Location to deploy the model in. + # Format: `projects/{project}/locations/{location}` + # @param model_config [::Google::Cloud::AIPlatform::V1::DeployRequest::ModelConfig, ::Hash] + # Optional. The model config to use for the deployment. + # If not specified, the default model config will be used. + # @param endpoint_config [::Google::Cloud::AIPlatform::V1::DeployRequest::EndpointConfig, ::Hash] + # Optional. The endpoint config to use for the deployment. + # If not specified, the default endpoint config will be used. + # @param deploy_config [::Google::Cloud::AIPlatform::V1::DeployRequest::DeployConfig, ::Hash] + # Optional. The deploy config to use for the deployment. + # If not specified, the default deploy config will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ai_platform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AIPlatform::V1::ModelGardenService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AIPlatform::V1::DeployRequest.new + # + # # Call the deploy method. + # result = client.deploy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeployRequest + + # 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.deploy.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::AIPlatform::V1::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.deploy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.deploy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @model_garden_service_stub.deploy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 ModelGardenService REST API. # @@ -458,11 +581,18 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :get_publisher_model + ## + # RPC-specific configuration for `deploy` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy # @private def initialize parent_rpcs = nil get_publisher_model_config = parent_rpcs.get_publisher_model if parent_rpcs.respond_to? :get_publisher_model @get_publisher_model = ::Gapic::Config::Method.new get_publisher_model_config + deploy_config = parent_rpcs.deploy if parent_rpcs.respond_to? :deploy + @deploy = ::Gapic::Config::Method.new deploy_config yield self if block_given? end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/operations.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/operations.rb new file mode 100644 index 000000000000..66c52eb4f7aa --- /dev/null +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/operations.rb @@ -0,0 +1,4398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Cloud + module AIPlatform + module V1 + module ModelGardenService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ModelGardenService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ModelGardenService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::AIPlatform::V1::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::AIPlatform::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::AIPlatform::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::AIPlatform::V1::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::AIPlatform::V1::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.wait_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.wait_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "aiplatform.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_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: "wait_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/edgeDevices/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelMonitors/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/featureMonitors/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/edgeDeploymentJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/edgeDevices/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelMonitors/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/featureMonitors/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/edgeDevices/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelMonitors/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/featureMonitors/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/ui/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/edgeDevices/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelMonitors/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/edgeDevices/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelMonitors/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/ui/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/featureMonitors/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/savedQueries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dataItems/[^/]+/annotations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featurestores/[^/]+/entityTypes/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataLabelingJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hyperparameterTuningJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/artifacts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/contexts/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataStores/[^/]+/executions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/modelDeploymentMonitoringJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/migratableResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/evaluations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trainingPipelines/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/persistentResources/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelineJobs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schedules/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/specialistPools/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tensorboards/[^/]+/experiments/[^/]+/runs/[^/]+/timeSeries/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/features/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb index 0c96e939ab68..5165960d6940 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb @@ -113,6 +113,46 @@ def get_publisher_model request_pb, options = nil end end + ## + # Baseline implementation for the deploy REST call + # + # @param request_pb [::Google::Cloud::AIPlatform::V1::DeployRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def deploy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_deploy_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: "deploy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -133,6 +173,28 @@ def self.transcode_get_publisher_model_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the deploy REST call + # + # @param request_pb [::Google::Cloud::AIPlatform::V1::DeployRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_deploy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{destination}:deploy", + body: "*", + matches: [ + ["destination", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb index 90b1dbdf25e7..13817741b939 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb @@ -1185,6 +1185,190 @@ def delete_rag_file request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Updates a RagEngineConfig. + # + # @overload update_rag_engine_config(request, options = nil) + # Pass arguments to `update_rag_engine_config` via a request object, either of type + # {::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest, ::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 update_rag_engine_config(rag_engine_config: nil) + # Pass arguments to `update_rag_engine_config` 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 rag_engine_config [::Google::Cloud::AIPlatform::V1::RagEngineConfig, ::Hash] + # Required. The updated RagEngineConfig. + # + # NOTE: Downgrading your RagManagedDb's ComputeTier could temporarily + # increase request latencies until the operation is fully complete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ai_platform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new + # + # # Call the update_rag_engine_config method. + # result = client.update_rag_engine_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_rag_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest + + # 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.update_rag_engine_config.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.rag_engine_config&.name + header_params["rag_engine_config.name"] = request.rag_engine_config.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.update_rag_engine_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rag_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vertex_rag_data_service_stub.call_rpc :update_rag_engine_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a RagEngineConfig. + # + # @overload get_rag_engine_config(request, options = nil) + # Pass arguments to `get_rag_engine_config` via a request object, either of type + # {::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest, ::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_rag_engine_config(name: nil) + # Pass arguments to `get_rag_engine_config` 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 name of the RagEngineConfig resource. + # Format: + # `projects/{project}/locations/{location}/ragEngineConfig` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AIPlatform::V1::RagEngineConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AIPlatform::V1::RagEngineConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ai_platform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.new + # + # # Call the get_rag_engine_config method. + # result = client.get_rag_engine_config request + # + # # The returned object is of type Google::Cloud::AIPlatform::V1::RagEngineConfig. + # p result + # + def get_rag_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest + + # 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_rag_engine_config.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_rag_engine_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rag_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vertex_rag_data_service_stub.call_rpc :get_rag_engine_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the VertexRagDataService API. # @@ -1401,6 +1585,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_rag_file + ## + # RPC-specific configuration for `update_rag_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rag_engine_config + ## + # RPC-specific configuration for `get_rag_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rag_engine_config # @private def initialize parent_rpcs = nil @@ -1424,6 +1618,10 @@ def initialize parent_rpcs = nil @list_rag_files = ::Gapic::Config::Method.new list_rag_files_config delete_rag_file_config = parent_rpcs.delete_rag_file if parent_rpcs.respond_to? :delete_rag_file @delete_rag_file = ::Gapic::Config::Method.new delete_rag_file_config + update_rag_engine_config_config = parent_rpcs.update_rag_engine_config if parent_rpcs.respond_to? :update_rag_engine_config + @update_rag_engine_config = ::Gapic::Config::Method.new update_rag_engine_config_config + get_rag_engine_config_config = parent_rpcs.get_rag_engine_config if parent_rpcs.respond_to? :get_rag_engine_config + @get_rag_engine_config = ::Gapic::Config::Method.new get_rag_engine_config_config yield self if block_given? end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/paths.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/paths.rb index 404a13e837f7..5d42f66bf200 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/paths.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/paths.rb @@ -124,6 +124,23 @@ def rag_corpus_path project:, location:, rag_corpus: "projects/#{project}/locations/#{location}/ragCorpora/#{rag_corpus}" end + ## + # Create a fully-qualified RagEngineConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/ragEngineConfig` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def rag_engine_config_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/ragEngineConfig" + end + ## # Create a fully-qualified RagFile resource string. # diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb index 443609e098f8..fb4e8142a712 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb @@ -1110,6 +1110,176 @@ def delete_rag_file request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Updates a RagEngineConfig. + # + # @overload update_rag_engine_config(request, options = nil) + # Pass arguments to `update_rag_engine_config` via a request object, either of type + # {::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest, ::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 update_rag_engine_config(rag_engine_config: nil) + # Pass arguments to `update_rag_engine_config` 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 rag_engine_config [::Google::Cloud::AIPlatform::V1::RagEngineConfig, ::Hash] + # Required. The updated RagEngineConfig. + # + # NOTE: Downgrading your RagManagedDb's ComputeTier could temporarily + # increase request latencies until the operation is fully complete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ai_platform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new + # + # # Call the update_rag_engine_config method. + # result = client.update_rag_engine_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_rag_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest + + # 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.update_rag_engine_config.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::AIPlatform::V1::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.update_rag_engine_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rag_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vertex_rag_data_service_stub.update_rag_engine_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a RagEngineConfig. + # + # @overload get_rag_engine_config(request, options = nil) + # Pass arguments to `get_rag_engine_config` via a request object, either of type + # {::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest, ::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_rag_engine_config(name: nil) + # Pass arguments to `get_rag_engine_config` 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 name of the RagEngineConfig resource. + # Format: + # `projects/{project}/locations/{location}/ragEngineConfig` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AIPlatform::V1::RagEngineConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AIPlatform::V1::RagEngineConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ai_platform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.new + # + # # Call the get_rag_engine_config method. + # result = client.get_rag_engine_config request + # + # # The returned object is of type Google::Cloud::AIPlatform::V1::RagEngineConfig. + # p result + # + def get_rag_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest + + # 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_rag_engine_config.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::AIPlatform::V1::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_rag_engine_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rag_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vertex_rag_data_service_stub.get_rag_engine_config 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 + ## # Configuration class for the VertexRagDataService REST API. # @@ -1313,6 +1483,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_rag_file + ## + # RPC-specific configuration for `update_rag_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rag_engine_config + ## + # RPC-specific configuration for `get_rag_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rag_engine_config # @private def initialize parent_rpcs = nil @@ -1336,6 +1516,10 @@ def initialize parent_rpcs = nil @list_rag_files = ::Gapic::Config::Method.new list_rag_files_config delete_rag_file_config = parent_rpcs.delete_rag_file if parent_rpcs.respond_to? :delete_rag_file @delete_rag_file = ::Gapic::Config::Method.new delete_rag_file_config + update_rag_engine_config_config = parent_rpcs.update_rag_engine_config if parent_rpcs.respond_to? :update_rag_engine_config + @update_rag_engine_config = ::Gapic::Config::Method.new update_rag_engine_config_config + get_rag_engine_config_config = parent_rpcs.get_rag_engine_config if parent_rpcs.respond_to? :get_rag_engine_config + @get_rag_engine_config = ::Gapic::Config::Method.new get_rag_engine_config_config yield self if block_given? end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb index 32978f91afa1..d33e8f2b206e 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb @@ -473,6 +473,86 @@ def delete_rag_file request_pb, options = nil end end + ## + # Baseline implementation for the update_rag_engine_config REST call + # + # @param request_pb [::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_rag_engine_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rag_engine_config_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: "update_rag_engine_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_rag_engine_config REST call + # + # @param request_pb [::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest] + # 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::AIPlatform::V1::RagEngineConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AIPlatform::V1::RagEngineConfig] + # A result object deserialized from the server's reply + def get_rag_engine_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rag_engine_config_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_rag_engine_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AIPlatform::V1::RagEngineConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -686,6 +766,49 @@ def self.transcode_delete_rag_file_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the update_rag_engine_config REST call + # + # @param request_pb [::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_rag_engine_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rag_engine_config.name}", + body: "rag_engine_config", + matches: [ + ["rag_engine_config.name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rag_engine_config REST call + # + # @param request_pb [::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest] + # 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_rag_engine_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/ragEngineConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/endpoint_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/endpoint_pb.rb index db96f406999e..3702e1df38fc 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/endpoint_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n)google/cloud/aiplatform/v1/endpoint.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xff\n\n\x08\x45ndpoint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12G\n\x0f\x64\x65ployed_models\x18\x04 \x03(\x0b\x32).google.cloud.aiplatform.v1.DeployedModelB\x03\xe0\x41\x03\x12M\n\rtraffic_split\x18\x05 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.Endpoint.TrafficSplitEntry\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x12@\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.aiplatform.v1.Endpoint.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x0f\x65ncryption_spec\x18\n \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12\x37\n\x07network\x18\r \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12*\n\x1e\x65nable_private_service_connect\x18\x11 \x01(\x08\x42\x02\x18\x01\x12\x64\n\x1eprivate_service_connect_config\x18\x15 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.PrivateServiceConnectConfigB\x03\xe0\x41\x01\x12g\n\x1fmodel_deployment_monitoring_job\x18\x0e \x01(\tB>\xe0\x41\x03\xfa\x41\x38\n6aiplatform.googleapis.com/ModelDeploymentMonitoringJob\x12p\n\'predict_request_response_logging_config\x18\x12 \x01(\x0b\x32?.google.cloud.aiplatform.v1.PredictRequestResponseLoggingConfig\x12\"\n\x1a\x64\x65\x64icated_endpoint_enabled\x18\x18 \x01(\x08\x12#\n\x16\x64\x65\x64icated_endpoint_dns\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12T\n\x18\x63lient_connection_config\x18\x17 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.ClientConnectionConfig\x12\x1a\n\rsatisfies_pzs\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x1a\x33\n\x11TrafficSplitEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb5\x01\xea\x41\xb1\x01\n\"aiplatform.googleapis.com/Endpoint\x12cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n)google/cloud/aiplatform/v1/endpoint.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe6\x0b\n\x08\x45ndpoint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12G\n\x0f\x64\x65ployed_models\x18\x04 \x03(\x0b\x32).google.cloud.aiplatform.v1.DeployedModelB\x03\xe0\x41\x03\x12M\n\rtraffic_split\x18\x05 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.Endpoint.TrafficSplitEntry\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x12@\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.aiplatform.v1.Endpoint.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x0f\x65ncryption_spec\x18\n \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12\x37\n\x07network\x18\r \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12*\n\x1e\x65nable_private_service_connect\x18\x11 \x01(\x08\x42\x02\x18\x01\x12\x64\n\x1eprivate_service_connect_config\x18\x15 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.PrivateServiceConnectConfigB\x03\xe0\x41\x01\x12g\n\x1fmodel_deployment_monitoring_job\x18\x0e \x01(\tB>\xe0\x41\x03\xfa\x41\x38\n6aiplatform.googleapis.com/ModelDeploymentMonitoringJob\x12p\n\'predict_request_response_logging_config\x18\x12 \x01(\x0b\x32?.google.cloud.aiplatform.v1.PredictRequestResponseLoggingConfig\x12\"\n\x1a\x64\x65\x64icated_endpoint_enabled\x18\x18 \x01(\x08\x12#\n\x16\x64\x65\x64icated_endpoint_dns\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12T\n\x18\x63lient_connection_config\x18\x17 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.ClientConnectionConfig\x12\x1a\n\rsatisfies_pzs\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x12\x65\n\x1fgen_ai_advanced_features_config\x18\x1d \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfigB\x03\xe0\x41\x01\x1a\x33\n\x11TrafficSplitEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb5\x01\xea\x41\xb1\x01\n\"aiplatform.googleapis.com/Endpoint\x12cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -59,6 +59,8 @@ module V1 PredictRequestResponseLoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PredictRequestResponseLoggingConfig").msgclass ClientConnectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ClientConnectionConfig").msgclass FasterDeploymentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FasterDeploymentConfig").msgclass + GenAiAdvancedFeaturesConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfig").msgclass + GenAiAdvancedFeaturesConfig::RagConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfig.RagConfig").msgclass SpeculativeDecodingSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.SpeculativeDecodingSpec").msgclass SpeculativeDecodingSpec::DraftModelSpeculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.SpeculativeDecodingSpec.DraftModelSpeculation").msgclass SpeculativeDecodingSpec::NgramSpeculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.SpeculativeDecodingSpec.NgramSpeculation").msgclass diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb index 91832996216e..d96c99f57cd7 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb @@ -8,10 +8,14 @@ require 'google/api/client_pb' require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/cloud/aiplatform/v1/machine_resources_pb' +require 'google/cloud/aiplatform/v1/model_pb' +require 'google/cloud/aiplatform/v1/operation_pb' require 'google/cloud/aiplatform/v1/publisher_model_pb' +require 'google/longrunning/operations_pb' -descriptor_data = "\n5google/cloud/aiplatform/v1/model_garden_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/publisher_model.proto\"\xfe\x01\n\x18GetPublisherModelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x04view\x18\x03 \x01(\x0e\x32..google.cloud.aiplatform.v1.PublisherModelViewB\x03\xe0\x41\x01\x12\"\n\x15is_hugging_face_model\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12hugging_face_token\x18\x06 \x01(\tB\x03\xe0\x41\x01*\xa1\x01\n\x12PublisherModelView\x12$\n PUBLISHER_MODEL_VIEW_UNSPECIFIED\x10\x00\x12\x1e\n\x1aPUBLISHER_MODEL_VIEW_BASIC\x10\x01\x12\x1d\n\x19PUBLISHER_MODEL_VIEW_FULL\x10\x02\x12&\n\"PUBLISHER_MODEL_VERSION_VIEW_BASIC\x10\x03\x32\x8c\x02\n\x12ModelGardenService\x12\xa6\x01\n\x11GetPublisherModel\x12\x34.google.cloud.aiplatform.v1.GetPublisherModelRequest\x1a*.google.cloud.aiplatform.v1.PublisherModel\"/\xda\x41\x04name\x82\xd3\xe4\x93\x02\"\x12 /v1/{name=publishers/*/models/*}\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x17ModelGardenServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n5google/cloud/aiplatform/v1/model_garden_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a&google/cloud/aiplatform/v1/model.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a\x30google/cloud/aiplatform/v1/publisher_model.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x18GetPublisherModelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x04view\x18\x03 \x01(\x0e\x32..google.cloud.aiplatform.v1.PublisherModelViewB\x03\xe0\x41\x01\x12\"\n\x15is_hugging_face_model\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12hugging_face_token\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xb2\x08\n\rDeployRequest\x12M\n\x14publisher_model_name\x18\x01 \x01(\tB-\xfa\x41*\n(aiplatform.googleapis.com/PublisherModelH\x00\x12\x1f\n\x15hugging_face_model_id\x18\x02 \x01(\tH\x00\x12>\n\x0b\x64\x65stination\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12P\n\x0cmodel_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.DeployRequest.ModelConfigB\x03\xe0\x41\x01\x12V\n\x0f\x65ndpoint_config\x18\x06 \x01(\x0b\x32\x38.google.cloud.aiplatform.v1.DeployRequest.EndpointConfigB\x03\xe0\x41\x01\x12R\n\rdeploy_config\x18\x07 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.DeployRequest.DeployConfigB\x03\xe0\x41\x01\x1a\xe6\x01\n\x0bModelConfig\x12\x18\n\x0b\x61\x63\x63\x65pt_eula\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19hugging_face_access_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\'\n\x1ahugging_face_cache_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0e\x63ontainer_spec\x18\x05 \x01(\x0b\x32..google.cloud.aiplatform.v1.ModelContainerSpecB\x03\xe0\x41\x01\x1a]\n\x0e\x45ndpointConfig\x12\"\n\x15\x65ndpoint_display_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\'\n\x1a\x64\x65\x64icated_endpoint_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x9d\x02\n\x0c\x44\x65ployConfig\x12P\n\x13\x64\x65\x64icated_resources\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.DedicatedResourcesB\x03\xe0\x41\x01\x12 \n\x13\x66\x61st_tryout_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x64\n\rsystem_labels\x18\x03 \x03(\x0b\x32H.google.cloud.aiplatform.v1.DeployRequest.DeployConfig.SystemLabelsEntryB\x03\xe0\x41\x01\x1a\x33\n\x11SystemLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tartifacts\"\xd1\x01\n\x0e\x44\x65ployResponse\x12I\n\x0fpublisher_model\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12<\n\x08\x65ndpoint\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"\xa8\x02\n\x17\x44\x65ployOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12I\n\x0fpublisher_model\x18\x02 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12>\n\x0b\x64\x65stination\x18\x03 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0eproject_number\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08model_id\x18\x05 \x01(\tB\x03\xe0\x41\x03*\xa1\x01\n\x12PublisherModelView\x12$\n PUBLISHER_MODEL_VIEW_UNSPECIFIED\x10\x00\x12\x1e\n\x1aPUBLISHER_MODEL_VIEW_BASIC\x10\x01\x12\x1d\n\x19PUBLISHER_MODEL_VIEW_FULL\x10\x02\x12&\n\"PUBLISHER_MODEL_VERSION_VIEW_BASIC\x10\x03\x32\xc9\x03\n\x12ModelGardenService\x12\xa6\x01\n\x11GetPublisherModel\x12\x34.google.cloud.aiplatform.v1.GetPublisherModelRequest\x1a*.google.cloud.aiplatform.v1.PublisherModel\"/\xda\x41\x04name\x82\xd3\xe4\x93\x02\"\x12 /v1/{name=publishers/*/models/*}\x12\xba\x01\n\x06\x44\x65ploy\x12).google.cloud.aiplatform.v1.DeployRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41)\n\x0e\x44\x65ployResponse\x12\x17\x44\x65ployOperationMetadata\x82\xd3\xe4\x93\x02\x34\"//v1/{destination=projects/*/locations/*}:deploy:\x01*\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x17ModelGardenServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -26,6 +30,9 @@ file = pool.add_serialized_file(serialized) warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ + ["google.cloud.aiplatform.v1.ModelContainerSpec", "google/cloud/aiplatform/v1/model.proto"], + ["google.cloud.aiplatform.v1.DedicatedResources", "google/cloud/aiplatform/v1/machine_resources.proto"], + ["google.cloud.aiplatform.v1.GenericOperationMetadata", "google/cloud/aiplatform/v1/operation.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -42,6 +49,12 @@ module Cloud module AIPlatform module V1 GetPublisherModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GetPublisherModelRequest").msgclass + DeployRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DeployRequest").msgclass + DeployRequest::ModelConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DeployRequest.ModelConfig").msgclass + DeployRequest::EndpointConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DeployRequest.EndpointConfig").msgclass + DeployRequest::DeployConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DeployRequest.DeployConfig").msgclass + DeployResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DeployResponse").msgclass + DeployOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DeployOperationMetadata").msgclass PublisherModelView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PublisherModelView").enummodule end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_services_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_services_pb.rb index 0135464b4047..3ef41bd5634c 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_services_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_services_pb.rb @@ -35,6 +35,8 @@ class Service # Gets a Model Garden publisher model. rpc :GetPublisherModel, ::Google::Cloud::AIPlatform::V1::GetPublisherModelRequest, ::Google::Cloud::AIPlatform::V1::PublisherModel + # Deploys a model to a new endpoint. + rpc :Deploy, ::Google::Cloud::AIPlatform::V1::DeployRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/service_networking_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/service_networking_pb.rb index aa7a0d79745c..a960d0b73dc9 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/service_networking_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/service_networking_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n3google/cloud/aiplatform/v1/service_networking.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"D\n\x13PSCAutomationConfig\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07network\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x86\x01\n\x1bPrivateServiceConnectConfig\x12+\n\x1e\x65nable_private_service_connect\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x19\n\x11project_allowlist\x18\x02 \x03(\t\x12\x1f\n\x12service_attachment\x18\x05 \x01(\tB\x03\xe0\x41\x03\"S\n\x15PscAutomatedEndpoints\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rmatch_address\x18\x03 \x01(\t\"b\n\x12PscInterfaceConfig\x12L\n\x12network_attachment\x18\x01 \x01(\tB0\xe0\x41\x01\xfa\x41*\n(compute.googleapis.com/NetworkAttachmentB\xcd\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x16ServiceNetworkingProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41v\n(compute.googleapis.com/NetworkAttachment\x12Jprojects/{project}/regions/{region}/networkAttachments/{networkattachment}b\x06proto3" +descriptor_data = "\n3google/cloud/aiplatform/v1/service_networking.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdb\x01\n\x13PSCAutomationConfig\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07network\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nip_address\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0f\x66orwarding_rule\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x05 \x01(\x0e\x32..google.cloud.aiplatform.v1.PSCAutomationStateB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xdc\x01\n\x1bPrivateServiceConnectConfig\x12+\n\x1e\x65nable_private_service_connect\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x19\n\x11project_allowlist\x18\x02 \x03(\t\x12T\n\x16psc_automation_configs\x18\x03 \x03(\x0b\x32/.google.cloud.aiplatform.v1.PSCAutomationConfigB\x03\xe0\x41\x01\x12\x1f\n\x12service_attachment\x18\x05 \x01(\tB\x03\xe0\x41\x03\"S\n\x15PscAutomatedEndpoints\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rmatch_address\x18\x03 \x01(\t\"\xb2\x01\n\x12PscInterfaceConfig\x12L\n\x12network_attachment\x18\x01 \x01(\tB0\xe0\x41\x01\xfa\x41*\n(compute.googleapis.com/NetworkAttachment\x12N\n\x13\x64ns_peering_configs\x18\x02 \x03(\x0b\x32,.google.cloud.aiplatform.v1.DnsPeeringConfigB\x03\xe0\x41\x01\"a\n\x10\x44nsPeeringConfig\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0etarget_project\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0etarget_network\x18\x03 \x01(\tB\x03\xe0\x41\x02*\x80\x01\n\x12PSCAutomationState\x12$\n PSC_AUTOMATION_STATE_UNSPECIFIED\x10\x00\x12#\n\x1fPSC_AUTOMATION_STATE_SUCCESSFUL\x10\x01\x12\x1f\n\x1bPSC_AUTOMATION_STATE_FAILED\x10\x02\x42\xcd\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x16ServiceNetworkingProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41v\n(compute.googleapis.com/NetworkAttachment\x12Jprojects/{project}/regions/{region}/networkAttachments/{networkattachment}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -42,6 +42,8 @@ module V1 PrivateServiceConnectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PrivateServiceConnectConfig").msgclass PscAutomatedEndpoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PscAutomatedEndpoints").msgclass PscInterfaceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PscInterfaceConfig").msgclass + DnsPeeringConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DnsPeeringConfig").msgclass + PSCAutomationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PSCAutomationState").enummodule end end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb index 4f2e04c1762b..595e54a6a989 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb @@ -12,7 +12,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n0google/cloud/aiplatform/v1/vertex_rag_data.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/aiplatform/v1/api_auth.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x02\n\x17RagEmbeddingModelConfig\x12r\n\x1avertex_prediction_endpoint\x18\x01 \x01(\x0b\x32L.google.cloud.aiplatform.v1.RagEmbeddingModelConfig.VertexPredictionEndpointH\x00\x1a\xaf\x01\n\x18VertexPredictionEndpoint\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x36\n\x05model\x18\x02 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x0e\n\x0cmodel_config\"\x94\x06\n\x11RagVectorDbConfig\x12T\n\x0erag_managed_db\x18\x01 \x01(\x0b\x32:.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDbH\x00\x12J\n\x08pinecone\x18\x03 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagVectorDbConfig.PineconeH\x00\x12`\n\x14vertex_vector_search\x18\x06 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearchH\x00\x12\x35\n\x08\x61pi_auth\x18\x05 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ApiAuth\x12_\n\x1arag_embedding_model_config\x18\x07 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.RagEmbeddingModelConfigB\x06\xe0\x41\x01\xe0\x41\x05\x1a\xf8\x01\n\x0cRagManagedDb\x12M\n\x03knn\x18\x01 \x01(\x0b\x32>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.KNNH\x00\x12M\n\x03\x61nn\x18\x02 \x01(\x0b\x32>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.ANNH\x00\x1a\x05\n\x03KNN\x1a-\n\x03\x41NN\x12\x12\n\ntree_depth\x18\x01 \x01(\x05\x12\x12\n\nleaf_count\x18\x02 \x01(\x05\x42\x14\n\x12retrieval_strategy\x1a\x1e\n\x08Pinecone\x12\x12\n\nindex_name\x18\x01 \x01(\t\x1a;\n\x12VertexVectorSearch\x12\x16\n\x0eindex_endpoint\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\tB\x0b\n\tvector_db\"\xa0\x01\n\nFileStatus\x12@\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.aiplatform.v1.FileStatus.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x65rror_status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\t\n\x05\x45RROR\x10\x02\".\n\x14VertexAiSearchConfig\x12\x16\n\x0eserving_config\x18\x01 \x01(\t\"\xab\x01\n\x0c\x43orpusStatus\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.cloud.aiplatform.v1.CorpusStatus.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x65rror_status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"<\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0f\n\x0bINITIALIZED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"\x97\x05\n\tRagCorpus\x12Q\n\x10vector_db_config\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.RagVectorDbConfigB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12[\n\x17vertex_ai_search_config\x18\n \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.VertexAiSearchConfigB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\rcorpus_status\x18\x08 \x01(\x0b\x32(.google.cloud.aiplatform.v1.CorpusStatusB\x03\xe0\x41\x03\x12K\n\x0f\x65ncryption_spec\x18\x0c \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x06\xe0\x41\x05\xe0\x41\x01:\x80\x01\xea\x41}\n#aiplatform.googleapis.com/RagCorpus\x12?projects/{project}/locations/{location}/ragCorpora/{rag_corpus}*\nragCorpora2\tragCorpusB\x10\n\x0e\x62\x61\x63kend_config\"\xdc\x06\n\x07RagFile\x12@\n\ngcs_source\x18\x08 \x01(\x0b\x32%.google.cloud.aiplatform.v1.GcsSourceB\x03\xe0\x41\x03H\x00\x12Q\n\x13google_drive_source\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.GoogleDriveSourceB\x03\xe0\x41\x03H\x00\x12S\n\x14\x64irect_upload_source\x18\n \x01(\x0b\x32..google.cloud.aiplatform.v1.DirectUploadSourceB\x03\xe0\x41\x03H\x00\x12?\n\x0cslack_source\x18\x0b \x01(\x0b\x32\'.google.cloud.aiplatform.v1.SlackSourceH\x00\x12=\n\x0bjira_source\x18\x0c \x01(\x0b\x32&.google.cloud.aiplatform.v1.JiraSourceH\x00\x12L\n\x13share_point_sources\x18\x0e \x01(\x0b\x32-.google.cloud.aiplatform.v1.SharePointSourcesH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x0b\x66ile_status\x18\r \x01(\x0b\x32&.google.cloud.aiplatform.v1.FileStatusB\x03\xe0\x41\x03:\x8f\x01\xea\x41\x8b\x01\n!aiplatform.googleapis.com/RagFile\x12Sprojects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}*\x08ragFiles2\x07ragFileB\x11\n\x0frag_file_source\"\xa0\x01\n\x08RagChunk\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x45\n\tpage_span\x18\x02 \x01(\x0b\x32-.google.cloud.aiplatform.v1.RagChunk.PageSpanH\x00\x88\x01\x01\x1a\x31\n\x08PageSpan\x12\x12\n\nfirst_page\x18\x01 \x01(\x05\x12\x11\n\tlast_page\x18\x02 \x01(\x05\x42\x0c\n\n_page_span\"\xd4\x01\n\x15RagFileChunkingConfig\x12\x66\n\x15\x66ixed_length_chunking\x18\x03 \x01(\x0b\x32\x45.google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunkingH\x00\x1a@\n\x13\x46ixedLengthChunking\x12\x12\n\nchunk_size\x18\x01 \x01(\x05\x12\x15\n\rchunk_overlap\x18\x02 \x01(\x05\x42\x11\n\x0f\x63hunking_config\"r\n\x1bRagFileTransformationConfig\x12S\n\x18rag_file_chunking_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.RagFileChunkingConfig\"\xfe\x02\n\x14RagFileParsingConfig\x12V\n\rlayout_parser\x18\x04 \x01(\x0b\x32=.google.cloud.aiplatform.v1.RagFileParsingConfig.LayoutParserH\x00\x12P\n\nllm_parser\x18\x05 \x01(\x0b\x32:.google.cloud.aiplatform.v1.RagFileParsingConfig.LlmParserH\x00\x1aL\n\x0cLayoutParser\x12\x16\n\x0eprocessor_name\x18\x01 \x01(\t\x12$\n\x1cmax_parsing_requests_per_min\x18\x02 \x01(\x05\x1a\x64\n\tLlmParser\x12\x12\n\nmodel_name\x18\x01 \x01(\t\x12$\n\x1cmax_parsing_requests_per_min\x18\x02 \x01(\x05\x12\x1d\n\x15\x63ustom_parsing_prompt\x18\x03 \x01(\tB\x08\n\x06parser\"v\n\x13UploadRagFileConfig\x12_\n\x1erag_file_transformation_config\x18\x03 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.RagFileTransformationConfig\"\x87\x08\n\x14ImportRagFilesConfig\x12;\n\ngcs_source\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.GcsSourceH\x00\x12L\n\x13google_drive_source\x18\x03 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GoogleDriveSourceH\x00\x12?\n\x0cslack_source\x18\x06 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.SlackSourceH\x00\x12=\n\x0bjira_source\x18\x07 \x01(\x0b\x32&.google.cloud.aiplatform.v1.JiraSourceH\x00\x12L\n\x13share_point_sources\x18\r \x01(\x0b\x32-.google.cloud.aiplatform.v1.SharePointSourcesH\x00\x12R\n\x18partial_failure_gcs_sink\x18\x0b \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestinationB\x02\x18\x01H\x01\x12\\\n\x1dpartial_failure_bigquery_sink\x18\x0c \x01(\x0b\x32/.google.cloud.aiplatform.v1.BigQueryDestinationB\x02\x18\x01H\x01\x12L\n\x16import_result_gcs_sink\x18\x0e \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestinationH\x02\x12V\n\x1bimport_result_bigquery_sink\x18\x0f \x01(\x0b\x32/.google.cloud.aiplatform.v1.BigQueryDestinationH\x02\x12_\n\x1erag_file_transformation_config\x18\x10 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.RagFileTransformationConfig\x12V\n\x17rag_file_parsing_config\x18\x08 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.RagFileParsingConfigB\x03\xe0\x41\x01\x12+\n\x1emax_embedding_requests_per_min\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x11rebuild_ann_index\x18\x13 \x01(\x08\x42\x0f\n\rimport_sourceB\x16\n\x14partial_failure_sinkB\x14\n\x12import_result_sinkB\xd0\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x12VertexRagDataProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n0google/cloud/aiplatform/v1/vertex_rag_data.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/aiplatform/v1/api_auth.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x02\n\x17RagEmbeddingModelConfig\x12r\n\x1avertex_prediction_endpoint\x18\x01 \x01(\x0b\x32L.google.cloud.aiplatform.v1.RagEmbeddingModelConfig.VertexPredictionEndpointH\x00\x1a\xaf\x01\n\x18VertexPredictionEndpoint\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x36\n\x05model\x18\x02 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x0e\n\x0cmodel_config\"\x94\x06\n\x11RagVectorDbConfig\x12T\n\x0erag_managed_db\x18\x01 \x01(\x0b\x32:.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDbH\x00\x12J\n\x08pinecone\x18\x03 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagVectorDbConfig.PineconeH\x00\x12`\n\x14vertex_vector_search\x18\x06 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearchH\x00\x12\x35\n\x08\x61pi_auth\x18\x05 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ApiAuth\x12_\n\x1arag_embedding_model_config\x18\x07 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.RagEmbeddingModelConfigB\x06\xe0\x41\x01\xe0\x41\x05\x1a\xf8\x01\n\x0cRagManagedDb\x12M\n\x03knn\x18\x01 \x01(\x0b\x32>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.KNNH\x00\x12M\n\x03\x61nn\x18\x02 \x01(\x0b\x32>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.ANNH\x00\x1a\x05\n\x03KNN\x1a-\n\x03\x41NN\x12\x12\n\ntree_depth\x18\x01 \x01(\x05\x12\x12\n\nleaf_count\x18\x02 \x01(\x05\x42\x14\n\x12retrieval_strategy\x1a\x1e\n\x08Pinecone\x12\x12\n\nindex_name\x18\x01 \x01(\t\x1a;\n\x12VertexVectorSearch\x12\x16\n\x0eindex_endpoint\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\tB\x0b\n\tvector_db\"\xa0\x01\n\nFileStatus\x12@\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.aiplatform.v1.FileStatus.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x65rror_status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\t\n\x05\x45RROR\x10\x02\".\n\x14VertexAiSearchConfig\x12\x16\n\x0eserving_config\x18\x01 \x01(\t\"\xab\x01\n\x0c\x43orpusStatus\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.cloud.aiplatform.v1.CorpusStatus.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x65rror_status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"<\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0f\n\x0bINITIALIZED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"\x97\x05\n\tRagCorpus\x12Q\n\x10vector_db_config\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.RagVectorDbConfigB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12[\n\x17vertex_ai_search_config\x18\n \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.VertexAiSearchConfigB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\rcorpus_status\x18\x08 \x01(\x0b\x32(.google.cloud.aiplatform.v1.CorpusStatusB\x03\xe0\x41\x03\x12K\n\x0f\x65ncryption_spec\x18\x0c \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x06\xe0\x41\x05\xe0\x41\x01:\x80\x01\xea\x41}\n#aiplatform.googleapis.com/RagCorpus\x12?projects/{project}/locations/{location}/ragCorpora/{rag_corpus}*\nragCorpora2\tragCorpusB\x10\n\x0e\x62\x61\x63kend_config\"\xdc\x06\n\x07RagFile\x12@\n\ngcs_source\x18\x08 \x01(\x0b\x32%.google.cloud.aiplatform.v1.GcsSourceB\x03\xe0\x41\x03H\x00\x12Q\n\x13google_drive_source\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.GoogleDriveSourceB\x03\xe0\x41\x03H\x00\x12S\n\x14\x64irect_upload_source\x18\n \x01(\x0b\x32..google.cloud.aiplatform.v1.DirectUploadSourceB\x03\xe0\x41\x03H\x00\x12?\n\x0cslack_source\x18\x0b \x01(\x0b\x32\'.google.cloud.aiplatform.v1.SlackSourceH\x00\x12=\n\x0bjira_source\x18\x0c \x01(\x0b\x32&.google.cloud.aiplatform.v1.JiraSourceH\x00\x12L\n\x13share_point_sources\x18\x0e \x01(\x0b\x32-.google.cloud.aiplatform.v1.SharePointSourcesH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x0b\x66ile_status\x18\r \x01(\x0b\x32&.google.cloud.aiplatform.v1.FileStatusB\x03\xe0\x41\x03:\x8f\x01\xea\x41\x8b\x01\n!aiplatform.googleapis.com/RagFile\x12Sprojects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}*\x08ragFiles2\x07ragFileB\x11\n\x0frag_file_source\"\xa0\x01\n\x08RagChunk\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x45\n\tpage_span\x18\x02 \x01(\x0b\x32-.google.cloud.aiplatform.v1.RagChunk.PageSpanH\x00\x88\x01\x01\x1a\x31\n\x08PageSpan\x12\x12\n\nfirst_page\x18\x01 \x01(\x05\x12\x11\n\tlast_page\x18\x02 \x01(\x05\x42\x0c\n\n_page_span\"\xd4\x01\n\x15RagFileChunkingConfig\x12\x66\n\x15\x66ixed_length_chunking\x18\x03 \x01(\x0b\x32\x45.google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunkingH\x00\x1a@\n\x13\x46ixedLengthChunking\x12\x12\n\nchunk_size\x18\x01 \x01(\x05\x12\x15\n\rchunk_overlap\x18\x02 \x01(\x05\x42\x11\n\x0f\x63hunking_config\"r\n\x1bRagFileTransformationConfig\x12S\n\x18rag_file_chunking_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.RagFileChunkingConfig\"\xfe\x02\n\x14RagFileParsingConfig\x12V\n\rlayout_parser\x18\x04 \x01(\x0b\x32=.google.cloud.aiplatform.v1.RagFileParsingConfig.LayoutParserH\x00\x12P\n\nllm_parser\x18\x05 \x01(\x0b\x32:.google.cloud.aiplatform.v1.RagFileParsingConfig.LlmParserH\x00\x1aL\n\x0cLayoutParser\x12\x16\n\x0eprocessor_name\x18\x01 \x01(\t\x12$\n\x1cmax_parsing_requests_per_min\x18\x02 \x01(\x05\x1a\x64\n\tLlmParser\x12\x12\n\nmodel_name\x18\x01 \x01(\t\x12$\n\x1cmax_parsing_requests_per_min\x18\x02 \x01(\x05\x12\x1d\n\x15\x63ustom_parsing_prompt\x18\x03 \x01(\tB\x08\n\x06parser\"v\n\x13UploadRagFileConfig\x12_\n\x1erag_file_transformation_config\x18\x03 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.RagFileTransformationConfig\"\x87\x08\n\x14ImportRagFilesConfig\x12;\n\ngcs_source\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.GcsSourceH\x00\x12L\n\x13google_drive_source\x18\x03 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GoogleDriveSourceH\x00\x12?\n\x0cslack_source\x18\x06 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.SlackSourceH\x00\x12=\n\x0bjira_source\x18\x07 \x01(\x0b\x32&.google.cloud.aiplatform.v1.JiraSourceH\x00\x12L\n\x13share_point_sources\x18\r \x01(\x0b\x32-.google.cloud.aiplatform.v1.SharePointSourcesH\x00\x12R\n\x18partial_failure_gcs_sink\x18\x0b \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestinationB\x02\x18\x01H\x01\x12\\\n\x1dpartial_failure_bigquery_sink\x18\x0c \x01(\x0b\x32/.google.cloud.aiplatform.v1.BigQueryDestinationB\x02\x18\x01H\x01\x12L\n\x16import_result_gcs_sink\x18\x0e \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestinationH\x02\x12V\n\x1bimport_result_bigquery_sink\x18\x0f \x01(\x0b\x32/.google.cloud.aiplatform.v1.BigQueryDestinationH\x02\x12_\n\x1erag_file_transformation_config\x18\x10 \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.RagFileTransformationConfig\x12V\n\x17rag_file_parsing_config\x18\x08 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.RagFileParsingConfigB\x03\xe0\x41\x01\x12+\n\x1emax_embedding_requests_per_min\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x11rebuild_ann_index\x18\x13 \x01(\x08\x42\x0f\n\rimport_sourceB\x16\n\x14partial_failure_sinkB\x14\n\x12import_result_sink\"\xa7\x02\n\x12RagManagedDbConfig\x12G\n\x06scaled\x18\x04 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagManagedDbConfig.ScaledH\x00\x12\x45\n\x05\x62\x61sic\x18\x02 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.RagManagedDbConfig.BasicH\x00\x12U\n\runprovisioned\x18\x03 \x01(\x0b\x32<.google.cloud.aiplatform.v1.RagManagedDbConfig.UnprovisionedH\x00\x1a\x08\n\x06Scaled\x1a\x07\n\x05\x42\x61sic\x1a\x0f\n\rUnprovisionedB\x06\n\x04tier\"\x81\x02\n\x0fRagEngineConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12M\n\x15rag_managed_db_config\x18\x02 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagManagedDbConfig:\x8b\x01\xea\x41\x87\x01\n)aiplatform.googleapis.com/RagEngineConfig\x12\x37projects/{project}/locations/{location}/ragEngineConfig*\x10ragEngineConfigs2\x0fragEngineConfigB\xd0\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x12VertexRagDataProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -71,6 +71,11 @@ module V1 RagFileParsingConfig::LlmParser = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.RagFileParsingConfig.LlmParser").msgclass UploadRagFileConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UploadRagFileConfig").msgclass ImportRagFilesConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ImportRagFilesConfig").msgclass + RagManagedDbConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.RagManagedDbConfig").msgclass + RagManagedDbConfig::Scaled = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.RagManagedDbConfig.Scaled").msgclass + RagManagedDbConfig::Basic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.RagManagedDbConfig.Basic").msgclass + RagManagedDbConfig::Unprovisioned = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.RagManagedDbConfig.Unprovisioned").msgclass + RagEngineConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.RagEngineConfig").msgclass end end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_pb.rb index be56506a6f59..1286f7003629 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_pb.rb @@ -15,7 +15,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n8google/cloud/aiplatform/v1/vertex_rag_data_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a\x30google/cloud/aiplatform/v1/vertex_rag_data.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\"\x93\x01\n\x16\x43reateRagCorpusRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12>\n\nrag_corpus\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RagCorpusB\x03\xe0\x41\x02\"P\n\x13GetRagCorpusRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\"\x83\x01\n\x15ListRagCorporaRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x16ListRagCorporaResponse\x12:\n\x0brag_corpora\x18\x01 \x03(\x0b\x32%.google.cloud.aiplatform.v1.RagCorpus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"g\n\x16\x44\x65leteRagCorpusRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x01\n\x14UploadRagFileRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12:\n\x08rag_file\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.RagFileB\x03\xe0\x41\x02\x12T\n\x16upload_rag_file_config\x18\x05 \x01(\x0b\x32/.google.cloud.aiplatform.v1.UploadRagFileConfigB\x03\xe0\x41\x02\"\x7f\n\x15UploadRagFileResponse\x12\x37\n\x08rag_file\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.RagFileH\x00\x12#\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"\xac\x01\n\x15ImportRagFilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12V\n\x17import_rag_files_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.ImportRagFilesConfigB\x03\xe0\x41\x02\"\xe3\x01\n\x16ImportRagFilesResponse\x12#\n\x19partial_failures_gcs_path\x18\x04 \x01(\tH\x00\x12)\n\x1fpartial_failures_bigquery_table\x18\x05 \x01(\tH\x00\x12 \n\x18imported_rag_files_count\x18\x01 \x01(\x03\x12\x1e\n\x16\x66\x61iled_rag_files_count\x18\x02 \x01(\x03\x12\x1f\n\x17skipped_rag_files_count\x18\x03 \x01(\x03\x42\x16\n\x14partial_failure_sink\"L\n\x11GetRagFileRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!aiplatform.googleapis.com/RagFile\"\x83\x01\n\x13ListRagFilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x14ListRagFilesResponse\x12\x36\n\trag_files\x18\x01 \x03(\x0b\x32#.google.cloud.aiplatform.v1.RagFile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x14\x44\x65leteRagFileRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!aiplatform.googleapis.com/RagFile\"r\n CreateRagCorpusOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"X\n\x16UpdateRagCorpusRequest\x12>\n\nrag_corpus\x18\x01 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RagCorpusB\x03\xe0\x41\x02\"r\n UpdateRagCorpusOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"\xfd\x01\n\x1fImportRagFilesOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12\x15\n\rrag_corpus_id\x18\x02 \x01(\x03\x12V\n\x17import_rag_files_config\x18\x03 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.ImportRagFilesConfigB\x03\xe0\x41\x03\x12\x1b\n\x13progress_percentage\x18\x04 \x01(\x05\x32\xcf\x11\n\x14VertexRagDataService\x12\xed\x01\n\x0f\x43reateRagCorpus\x12\x32.google.cloud.aiplatform.v1.CreateRagCorpusRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41-\n\tRagCorpus\x12 CreateRagCorpusOperationMetadata\xda\x41\x11parent,rag_corpus\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/ragCorpora:\nrag_corpus\x12\xf1\x01\n\x0fUpdateRagCorpus\x12\x32.google.cloud.aiplatform.v1.UpdateRagCorpusRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41-\n\tRagCorpus\x12 UpdateRagCorpusOperationMetadata\xda\x41\nrag_corpus\x82\xd3\xe4\x93\x02G29/v1/{rag_corpus.name=projects/*/locations/*/ragCorpora/*}:\nrag_corpus\x12\xa5\x01\n\x0cGetRagCorpus\x12/.google.cloud.aiplatform.v1.GetRagCorpusRequest\x1a%.google.cloud.aiplatform.v1.RagCorpus\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/ragCorpora/*}\x12\xb8\x01\n\x0eListRagCorpora\x12\x31.google.cloud.aiplatform.v1.ListRagCorporaRequest\x1a\x32.google.cloud.aiplatform.v1.ListRagCorporaResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/ragCorpora\x12\xd6\x01\n\x0f\x44\x65leteRagCorpus\x12\x32.google.cloud.aiplatform.v1.DeleteRagCorpusRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/ragCorpora/*}\x12\xea\x01\n\rUploadRagFile\x12\x30.google.cloud.aiplatform.v1.UploadRagFileRequest\x1a\x31.google.cloud.aiplatform.v1.UploadRagFileResponse\"t\xda\x41&parent,rag_file,upload_rag_file_config\x82\xd3\xe4\x93\x02\x45\"@/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles:upload:\x01*\x12\x8d\x02\n\x0eImportRagFiles\x12\x31.google.cloud.aiplatform.v1.ImportRagFilesRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41\x39\n\x16ImportRagFilesResponse\x12\x1fImportRagFilesOperationMetadata\xda\x41\x1eparent,import_rag_files_config\x82\xd3\xe4\x93\x02\x45\"@/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles:import:\x01*\x12\xaa\x01\n\nGetRagFile\x12-.google.cloud.aiplatform.v1.GetRagFileRequest\x1a#.google.cloud.aiplatform.v1.RagFile\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}\x12\xbd\x01\n\x0cListRagFiles\x12/.google.cloud.aiplatform.v1.ListRagFilesRequest\x1a\x30.google.cloud.aiplatform.v1.ListRagFilesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles\x12\xdd\x01\n\rDeleteRagFile\x12\x30.google.cloud.aiplatform.v1.DeleteRagFileRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x19VertexRagDataServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n8google/cloud/aiplatform/v1/vertex_rag_data_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a\x30google/cloud/aiplatform/v1/vertex_rag_data.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\"\x93\x01\n\x16\x43reateRagCorpusRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12>\n\nrag_corpus\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RagCorpusB\x03\xe0\x41\x02\"P\n\x13GetRagCorpusRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\"\x83\x01\n\x15ListRagCorporaRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x16ListRagCorporaResponse\x12:\n\x0brag_corpora\x18\x01 \x03(\x0b\x32%.google.cloud.aiplatform.v1.RagCorpus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"g\n\x16\x44\x65leteRagCorpusRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x01\n\x14UploadRagFileRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12:\n\x08rag_file\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.RagFileB\x03\xe0\x41\x02\x12T\n\x16upload_rag_file_config\x18\x05 \x01(\x0b\x32/.google.cloud.aiplatform.v1.UploadRagFileConfigB\x03\xe0\x41\x02\"\x7f\n\x15UploadRagFileResponse\x12\x37\n\x08rag_file\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.RagFileH\x00\x12#\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"\xac\x01\n\x15ImportRagFilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12V\n\x17import_rag_files_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.ImportRagFilesConfigB\x03\xe0\x41\x02\"\xe3\x01\n\x16ImportRagFilesResponse\x12#\n\x19partial_failures_gcs_path\x18\x04 \x01(\tH\x00\x12)\n\x1fpartial_failures_bigquery_table\x18\x05 \x01(\tH\x00\x12 \n\x18imported_rag_files_count\x18\x01 \x01(\x03\x12\x1e\n\x16\x66\x61iled_rag_files_count\x18\x02 \x01(\x03\x12\x1f\n\x17skipped_rag_files_count\x18\x03 \x01(\x03\x42\x16\n\x14partial_failure_sink\"L\n\x11GetRagFileRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!aiplatform.googleapis.com/RagFile\"\x83\x01\n\x13ListRagFilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x14ListRagFilesResponse\x12\x36\n\trag_files\x18\x01 \x03(\x0b\x32#.google.cloud.aiplatform.v1.RagFile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x14\x44\x65leteRagFileRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!aiplatform.googleapis.com/RagFile\"r\n CreateRagCorpusOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"\\\n\x19GetRagEngineConfigRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)aiplatform.googleapis.com/RagEngineConfig\"X\n\x16UpdateRagCorpusRequest\x12>\n\nrag_corpus\x18\x01 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RagCorpusB\x03\xe0\x41\x02\"r\n UpdateRagCorpusOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"\xfd\x01\n\x1fImportRagFilesOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12\x15\n\rrag_corpus_id\x18\x02 \x01(\x03\x12V\n\x17import_rag_files_config\x18\x03 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.ImportRagFilesConfigB\x03\xe0\x41\x03\x12\x1b\n\x13progress_percentage\x18\x04 \x01(\x05\"k\n\x1cUpdateRagEngineConfigRequest\x12K\n\x11rag_engine_config\x18\x01 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RagEngineConfigB\x03\xe0\x41\x02\"x\n&UpdateRagEngineConfigOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata2\xb0\x15\n\x14VertexRagDataService\x12\xed\x01\n\x0f\x43reateRagCorpus\x12\x32.google.cloud.aiplatform.v1.CreateRagCorpusRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41-\n\tRagCorpus\x12 CreateRagCorpusOperationMetadata\xda\x41\x11parent,rag_corpus\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/ragCorpora:\nrag_corpus\x12\xf1\x01\n\x0fUpdateRagCorpus\x12\x32.google.cloud.aiplatform.v1.UpdateRagCorpusRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41-\n\tRagCorpus\x12 UpdateRagCorpusOperationMetadata\xda\x41\nrag_corpus\x82\xd3\xe4\x93\x02G29/v1/{rag_corpus.name=projects/*/locations/*/ragCorpora/*}:\nrag_corpus\x12\xa5\x01\n\x0cGetRagCorpus\x12/.google.cloud.aiplatform.v1.GetRagCorpusRequest\x1a%.google.cloud.aiplatform.v1.RagCorpus\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/ragCorpora/*}\x12\xb8\x01\n\x0eListRagCorpora\x12\x31.google.cloud.aiplatform.v1.ListRagCorporaRequest\x1a\x32.google.cloud.aiplatform.v1.ListRagCorporaResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/ragCorpora\x12\xd6\x01\n\x0f\x44\x65leteRagCorpus\x12\x32.google.cloud.aiplatform.v1.DeleteRagCorpusRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/ragCorpora/*}\x12\xea\x01\n\rUploadRagFile\x12\x30.google.cloud.aiplatform.v1.UploadRagFileRequest\x1a\x31.google.cloud.aiplatform.v1.UploadRagFileResponse\"t\xda\x41&parent,rag_file,upload_rag_file_config\x82\xd3\xe4\x93\x02\x45\"@/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles:upload:\x01*\x12\x8d\x02\n\x0eImportRagFiles\x12\x31.google.cloud.aiplatform.v1.ImportRagFilesRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41\x39\n\x16ImportRagFilesResponse\x12\x1fImportRagFilesOperationMetadata\xda\x41\x1eparent,import_rag_files_config\x82\xd3\xe4\x93\x02\x45\"@/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles:import:\x01*\x12\xaa\x01\n\nGetRagFile\x12-.google.cloud.aiplatform.v1.GetRagFileRequest\x1a#.google.cloud.aiplatform.v1.RagFile\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}\x12\xbd\x01\n\x0cListRagFiles\x12/.google.cloud.aiplatform.v1.ListRagFilesRequest\x1a\x30.google.cloud.aiplatform.v1.ListRagFilesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles\x12\xdd\x01\n\rDeleteRagFile\x12\x30.google.cloud.aiplatform.v1.DeleteRagFileRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}\x12\xa1\x02\n\x15UpdateRagEngineConfig\x12\x38.google.cloud.aiplatform.v1.UpdateRagEngineConfigRequest\x1a\x1d.google.longrunning.Operation\"\xae\x01\xca\x41\x39\n\x0fRagEngineConfig\x12&UpdateRagEngineConfigOperationMetadata\xda\x41\x11rag_engine_config\x82\xd3\xe4\x93\x02X2C/v1/{rag_engine_config.name=projects/*/locations/*/ragEngineConfig}:\x11rag_engine_config\x12\xba\x01\n\x12GetRagEngineConfig\x12\x35.google.cloud.aiplatform.v1.GetRagEngineConfigRequest\x1a+.google.cloud.aiplatform.v1.RagEngineConfig\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/ragEngineConfig}\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x19VertexRagDataServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -62,9 +62,12 @@ module V1 ListRagFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ListRagFilesResponse").msgclass DeleteRagFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DeleteRagFileRequest").msgclass CreateRagCorpusOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.CreateRagCorpusOperationMetadata").msgclass + GetRagEngineConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GetRagEngineConfigRequest").msgclass UpdateRagCorpusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UpdateRagCorpusRequest").msgclass UpdateRagCorpusOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UpdateRagCorpusOperationMetadata").msgclass ImportRagFilesOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ImportRagFilesOperationMetadata").msgclass + UpdateRagEngineConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UpdateRagEngineConfigRequest").msgclass + UpdateRagEngineConfigOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UpdateRagEngineConfigOperationMetadata").msgclass end end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_services_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_services_pb.rb index 9ca1275932c0..dfc609f592da 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_services_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_services_pb.rb @@ -53,6 +53,10 @@ class Service rpc :ListRagFiles, ::Google::Cloud::AIPlatform::V1::ListRagFilesRequest, ::Google::Cloud::AIPlatform::V1::ListRagFilesResponse # Deletes a RagFile. rpc :DeleteRagFile, ::Google::Cloud::AIPlatform::V1::DeleteRagFileRequest, ::Google::Longrunning::Operation + # Updates a RagEngineConfig. + rpc :UpdateRagEngineConfig, ::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest, ::Google::Longrunning::Operation + # Gets a RagEngineConfig. + rpc :GetRagEngineConfig, ::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest, ::Google::Cloud::AIPlatform::V1::RagEngineConfig end Stub = Service.rpc_stub_class diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/endpoint.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/endpoint.rb index 20f3ef34cab2..2cadd61b12f9 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/endpoint.rb @@ -132,9 +132,10 @@ module V1 # @!attribute [r] dedicated_endpoint_dns # @return [::String] # Output only. DNS of the dedicated endpoint. Will only be populated if - # dedicated_endpoint_enabled is true. - # Format: - # `https://{endpoint_id}.{region}-{project_number}.prediction.vertexai.goog`. + # dedicated_endpoint_enabled is true. Depending on the features enabled, uid + # might be a random number or a string. For example, if fast_tryout is + # enabled, uid will be fasttryout. Format: + # `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`. # @!attribute [rw] client_connection_config # @return [::Google::Cloud::AIPlatform::V1::ClientConnectionConfig] # Configurations that are applied to the endpoint for online prediction. @@ -144,6 +145,11 @@ module V1 # @!attribute [r] satisfies_pzi # @return [::Boolean] # Output only. Reserved for future use. + # @!attribute [rw] gen_ai_advanced_features_config + # @return [::Google::Cloud::AIPlatform::V1::GenAiAdvancedFeaturesConfig] + # Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is + # serving GenAI models, advanced features like native RAG integration can be + # configured. Currently, only Model Garden models are supported. class Endpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -195,9 +201,8 @@ class LabelsEntry # This value should be 1-10 characters, and valid characters are `/[0-9]/`. # @!attribute [rw] model # @return [::String] - # Required. The resource name of the Model that this is the deployment of. - # Note that the Model may be in a different location than the DeployedModel's - # Endpoint. + # The resource name of the Model that this is the deployment of. Note that + # the Model may be in a different location than the DeployedModel's Endpoint. # # The resource name may contain version id or version alias to specify the # version. @@ -382,6 +387,26 @@ class FasterDeploymentConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for GenAiAdvancedFeatures. + # @!attribute [rw] rag_config + # @return [::Google::Cloud::AIPlatform::V1::GenAiAdvancedFeaturesConfig::RagConfig] + # Configuration for Retrieval Augmented Generation feature. + class GenAiAdvancedFeaturesConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for Retrieval Augmented Generation feature. + # @!attribute [rw] enable_rag + # @return [::Boolean] + # If true, enable Retrieval Augmented Generation in ChatCompletion request. + # Once enabled, the endpoint will be identified as GenAI endpoint and + # Arthedain router will be used. + class RagConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # Configuration for Speculative Decoding. # @!attribute [rw] draft_model_speculation # @return [::Google::Cloud::AIPlatform::V1::SpeculativeDecodingSpec::DraftModelSpeculation] diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb index 102006a25980..27a18d19aace 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb @@ -47,6 +47,159 @@ class GetPublisherModelRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for + # {::Google::Cloud::AIPlatform::V1::ModelGardenService::Client#deploy ModelGardenService.Deploy}. + # @!attribute [rw] publisher_model_name + # @return [::String] + # The Model Garden model to deploy. + # Format: + # `publishers/{publisher}/models/{publisher_model}@{version_id}`, or + # `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`. + # + # Note: The following fields are mutually exclusive: `publisher_model_name`, `hugging_face_model_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hugging_face_model_id + # @return [::String] + # The Hugging Face model to deploy. + # Format: Hugging Face model ID like `google/gemma-2-2b-it`. + # + # Note: The following fields are mutually exclusive: `hugging_face_model_id`, `publisher_model_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] destination + # @return [::String] + # Required. The resource name of the Location to deploy the model in. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] model_config + # @return [::Google::Cloud::AIPlatform::V1::DeployRequest::ModelConfig] + # Optional. The model config to use for the deployment. + # If not specified, the default model config will be used. + # @!attribute [rw] endpoint_config + # @return [::Google::Cloud::AIPlatform::V1::DeployRequest::EndpointConfig] + # Optional. The endpoint config to use for the deployment. + # If not specified, the default endpoint config will be used. + # @!attribute [rw] deploy_config + # @return [::Google::Cloud::AIPlatform::V1::DeployRequest::DeployConfig] + # Optional. The deploy config to use for the deployment. + # If not specified, the default deploy config will be used. + class DeployRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The model config to use for the deployment. + # @!attribute [rw] accept_eula + # @return [::Boolean] + # Optional. Whether the user accepts the End User License Agreement (EULA) + # for the model. + # @!attribute [rw] hugging_face_access_token + # @return [::String] + # Optional. The Hugging Face read access token used to access the model + # artifacts of gated models. + # @!attribute [rw] hugging_face_cache_enabled + # @return [::Boolean] + # Optional. If true, the model will deploy with a cached version instead of + # directly downloading the model artifacts from Hugging Face. This is + # suitable for VPC-SC users with limited internet access. + # @!attribute [rw] model_display_name + # @return [::String] + # Optional. The user-specified display name of the uploaded model. If not + # set, a default name will be used. + # @!attribute [rw] container_spec + # @return [::Google::Cloud::AIPlatform::V1::ModelContainerSpec] + # Optional. The specification of the container that is to be used when + # deploying. If not set, the default container spec will be used. + class ModelConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The endpoint config to use for the deployment. + # @!attribute [rw] endpoint_display_name + # @return [::String] + # Optional. The user-specified display name of the endpoint. If not set, a + # default name will be used. + # @!attribute [rw] dedicated_endpoint_enabled + # @return [::Boolean] + # Optional. If true, the endpoint will be exposed through a dedicated + # DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS + # will be isolated from other users' traffic and will have better + # performance and reliability. Note: Once you enabled dedicated endpoint, + # you won't be able to send request to the shared DNS + # \\{region}-aiplatform.googleapis.com. The limitations will be removed soon. + class EndpointConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The deploy config to use for the deployment. + # @!attribute [rw] dedicated_resources + # @return [::Google::Cloud::AIPlatform::V1::DedicatedResources] + # Optional. The dedicated resources to use for the endpoint. If not set, + # the default resources will be used. + # @!attribute [rw] fast_tryout_enabled + # @return [::Boolean] + # Optional. If true, enable the QMT fast tryout feature for this model if + # possible. + # @!attribute [rw] system_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. System labels for Model Garden deployments. + # These labels are managed by Google and for tracking purposes only. + class DeployConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SystemLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Response message for + # {::Google::Cloud::AIPlatform::V1::ModelGardenService::Client#deploy ModelGardenService.Deploy}. + # @!attribute [r] publisher_model + # @return [::String] + # Output only. The name of the PublisherModel resource. + # Format: + # `publishers/{publisher}/models/{publisher_model}@{version_id}`, or + # `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001` + # @!attribute [r] endpoint + # @return [::String] + # Output only. The name of the Endpoint created. + # Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` + # @!attribute [r] model + # @return [::String] + # Output only. The name of the Model created. + # Format: `projects/{project}/locations/{location}/models/{model}` + class DeployResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Runtime operation information for + # {::Google::Cloud::AIPlatform::V1::ModelGardenService::Client#deploy ModelGardenService.Deploy}. + # @!attribute [rw] generic_metadata + # @return [::Google::Cloud::AIPlatform::V1::GenericOperationMetadata] + # The operation generic information. + # @!attribute [r] publisher_model + # @return [::String] + # Output only. The name of the model resource. + # @!attribute [r] destination + # @return [::String] + # Output only. The resource name of the Location to deploy the model in. + # Format: `projects/{project}/locations/{location}` + # @!attribute [r] project_number + # @return [::Integer] + # Output only. The project number where the deploy model request is sent. + # @!attribute [r] model_id + # @return [::String] + # Output only. The model id to be used at query time. + class DeployOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # View enumeration of PublisherModel. module PublisherModelView # The default / unset value. The API will default to the BASIC view. diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/service_networking.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/service_networking.rb index 7940c7584f0c..715a84f4bd26 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/service_networking.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/service_networking.rb @@ -21,8 +21,8 @@ module Google module Cloud module AIPlatform module V1 - # PSC config that is used to automatically create forwarding rule via - # ServiceConnectionMap. + # PSC config that is used to automatically create PSC endpoints in the user + # projects. # @!attribute [rw] project_id # @return [::String] # Required. Project id used to create forwarding rule. @@ -30,10 +30,20 @@ module V1 # @return [::String] # Required. The full name of the Google Compute Engine # [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). - # [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): + # [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): # `projects/{project}/global/networks/{network}`. - # Where \\{project} is a project number, as in '12345', and \\{network} is - # network name. + # @!attribute [r] ip_address + # @return [::String] + # Output only. IP address rule created by the PSC service automation. + # @!attribute [r] forwarding_rule + # @return [::String] + # Output only. Forwarding rule created by the PSC service automation. + # @!attribute [r] state + # @return [::Google::Cloud::AIPlatform::V1::PSCAutomationState] + # Output only. The state of the PSC service automation. + # @!attribute [r] error_message + # @return [::String] + # Output only. Error message if the PSC service automation failed. class PSCAutomationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -47,6 +57,10 @@ class PSCAutomationConfig # @return [::Array<::String>] # A list of Projects from which the forwarding rule will target the service # attachment. + # @!attribute [rw] psc_automation_configs + # @return [::Array<::Google::Cloud::AIPlatform::V1::PSCAutomationConfig>] + # Optional. List of projects and networks where the PSC endpoints will be + # created. This field is used by Online Inference(Prediction) only. # @!attribute [r] service_attachment # @return [::String] # Output only. The name of the generated service attachment resource. @@ -83,10 +97,52 @@ class PscAutomatedEndpoints # To specify this field, you must have already [created a network attachment] # (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). # This field is only used for resources using PSC-I. + # @!attribute [rw] dns_peering_configs + # @return [::Array<::Google::Cloud::AIPlatform::V1::DnsPeeringConfig>] + # Optional. DNS peering configurations. When specified, Vertex AI will + # attempt to configure DNS peering zones in the tenant project VPC + # to resolve the specified domains using the target network's Cloud DNS. + # The user must grant the dns.peer role to the Vertex AI Service Agent + # on the target project. class PscInterfaceConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # DNS peering configuration. These configurations are used to create + # DNS peering zones in the Vertex tenant project VPC, enabling resolution + # of records within the specified domain hosted in the target network's + # Cloud DNS. + # @!attribute [rw] domain + # @return [::String] + # Required. The DNS name suffix of the zone being peered to, e.g., + # "my-internal-domain.corp.". Must end with a dot. + # @!attribute [rw] target_project + # @return [::String] + # Required. The project ID hosting the Cloud DNS managed zone that + # contains the 'domain'. The Vertex AI Service Agent requires the + # dns.peer role on this project. + # @!attribute [rw] target_network + # @return [::String] + # Required. The VPC network name + # in the target_project where the DNS zone specified by 'domain' is + # visible. + class DnsPeeringConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the PSC service automation. + module PSCAutomationState + # Should not be used. + PSC_AUTOMATION_STATE_UNSPECIFIED = 0 + + # The PSC service automation is successful. + PSC_AUTOMATION_STATE_SUCCESSFUL = 1 + + # The PSC service automation has failed. + PSC_AUTOMATION_STATE_FAILED = 2 + end end end end diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb index a1ef63b64622..e980bc41cc2c 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb @@ -544,6 +544,73 @@ class ImportRagFilesConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Configuration message for RagManagedDb used by RagEngine. + # @!attribute [rw] scaled + # @return [::Google::Cloud::AIPlatform::V1::RagManagedDbConfig::Scaled] + # Sets the RagManagedDb to the Scaled tier. + # + # Note: The following fields are mutually exclusive: `scaled`, `basic`, `unprovisioned`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] basic + # @return [::Google::Cloud::AIPlatform::V1::RagManagedDbConfig::Basic] + # Sets the RagManagedDb to the Basic tier. + # + # Note: The following fields are mutually exclusive: `basic`, `scaled`, `unprovisioned`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] unprovisioned + # @return [::Google::Cloud::AIPlatform::V1::RagManagedDbConfig::Unprovisioned] + # Sets the RagManagedDb to the Unprovisioned tier. + # + # Note: The following fields are mutually exclusive: `unprovisioned`, `scaled`, `basic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RagManagedDbConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Scaled tier offers production grade performance along with + # autoscaling functionality. It is suitable for customers with large + # amounts of data or performance sensitive workloads. + class Scaled + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Basic tier is a cost-effective and low compute tier suitable for + # the following cases: + # * Experimenting with RagManagedDb. + # * Small data size. + # * Latency insensitive workload. + # * Only using RAG Engine with external vector DBs. + # + # NOTE: This is the default tier if not explicitly chosen. + class Basic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Disables the RAG Engine service and deletes all your data held + # within this service. This will halt the billing of the service. + # + # NOTE: Once deleted the data cannot be recovered. To start using + # RAG Engine again, you will need to update the tier by calling the + # UpdateRagEngineConfig API. + class Unprovisioned + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Config for RagEngine. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the RagEngineConfig. + # Format: + # `projects/{project}/locations/{location}/ragEngineConfig` + # @!attribute [rw] rag_managed_db_config + # @return [::Google::Cloud::AIPlatform::V1::RagManagedDbConfig] + # The config of the RagManagedDb used by RagEngine. + class RagEngineConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data_service.rb index 4ebfad1ac356..d9be6dff9dd8 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data_service.rb @@ -255,6 +255,18 @@ class CreateRagCorpusOperationMetadata extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for + # {::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client#get_rag_engine_config VertexRagDataService.GetRagEngineConfig} + # @!attribute [rw] name + # @return [::String] + # Required. The name of the RagEngineConfig resource. + # Format: + # `projects/{project}/locations/{location}/ragEngineConfig` + class GetRagEngineConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request message for # {::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client#update_rag_corpus VertexRagDataService.UpdateRagCorpus}. # @!attribute [rw] rag_corpus @@ -295,6 +307,29 @@ class ImportRagFilesOperationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Request message for + # {::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client#update_rag_engine_config VertexRagDataService.UpdateRagEngineConfig}. + # @!attribute [rw] rag_engine_config + # @return [::Google::Cloud::AIPlatform::V1::RagEngineConfig] + # Required. The updated RagEngineConfig. + # + # NOTE: Downgrading your RagManagedDb's ComputeTier could temporarily + # increase request latencies until the operation is fully complete. + class UpdateRagEngineConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Runtime operation information for + # {::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client#update_rag_engine_config VertexRagDataService.UpdateRagEngineConfig}. + # @!attribute [rw] generic_metadata + # @return [::Google::Cloud::AIPlatform::V1::GenericOperationMetadata] + # The operation generic information. + class UpdateRagEngineConfigOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-ai_platform-v1/snippets/model_garden_service/deploy.rb b/google-cloud-ai_platform-v1/snippets/model_garden_service/deploy.rb new file mode 100644 index 000000000000..fa3e8246e91f --- /dev/null +++ b/google-cloud-ai_platform-v1/snippets/model_garden_service/deploy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 aiplatform_v1_generated_ModelGardenService_Deploy_sync] +require "google/cloud/ai_platform/v1" + +## +# Snippet for the deploy call in the ModelGardenService 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::AIPlatform::V1::ModelGardenService::Client#deploy. +# +def deploy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AIPlatform::V1::ModelGardenService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AIPlatform::V1::DeployRequest.new + + # Call the deploy method. + result = client.deploy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END aiplatform_v1_generated_ModelGardenService_Deploy_sync] diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index 6b145d518fc5..d9dfce95fcd0 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -7891,6 +7891,46 @@ } ] }, + { + "region_tag": "aiplatform_v1_generated_ModelGardenService_Deploy_sync", + "title": "Snippet for the deploy call in the ModelGardenService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AIPlatform::V1::ModelGardenService::Client#deploy.", + "file": "model_garden_service/deploy.rb", + "language": "RUBY", + "client_method": { + "short_name": "deploy", + "full_name": "::Google::Cloud::AIPlatform::V1::ModelGardenService::Client#deploy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AIPlatform::V1::DeployRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ModelGardenService::Client", + "full_name": "::Google::Cloud::AIPlatform::V1::ModelGardenService::Client" + }, + "method": { + "short_name": "Deploy", + "full_name": "google.cloud.aiplatform.v1.ModelGardenService.Deploy", + "service": { + "short_name": "ModelGardenService", + "full_name": "google.cloud.aiplatform.v1.ModelGardenService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "aiplatform_v1_generated_ModelService_UploadModel_sync", "title": "Snippet for the upload_model call in the ModelService service", @@ -12371,6 +12411,86 @@ } ] }, + { + "region_tag": "aiplatform_v1_generated_VertexRagDataService_UpdateRagEngineConfig_sync", + "title": "Snippet for the update_rag_engine_config call in the VertexRagDataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AIPlatform::V1::VertexRagDataService::Client#update_rag_engine_config.", + "file": "vertex_rag_data_service/update_rag_engine_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rag_engine_config", + "full_name": "::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client#update_rag_engine_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VertexRagDataService::Client", + "full_name": "::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client" + }, + "method": { + "short_name": "UpdateRagEngineConfig", + "full_name": "google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig", + "service": { + "short_name": "VertexRagDataService", + "full_name": "google.cloud.aiplatform.v1.VertexRagDataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "aiplatform_v1_generated_VertexRagDataService_GetRagEngineConfig_sync", + "title": "Snippet for the get_rag_engine_config call in the VertexRagDataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AIPlatform::V1::VertexRagDataService::Client#get_rag_engine_config.", + "file": "vertex_rag_data_service/get_rag_engine_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rag_engine_config", + "full_name": "::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client#get_rag_engine_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AIPlatform::V1::RagEngineConfig", + "client": { + "short_name": "VertexRagDataService::Client", + "full_name": "::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client" + }, + "method": { + "short_name": "GetRagEngineConfig", + "full_name": "google.cloud.aiplatform.v1.VertexRagDataService.GetRagEngineConfig", + "service": { + "short_name": "VertexRagDataService", + "full_name": "google.cloud.aiplatform.v1.VertexRagDataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "aiplatform_v1_generated_VertexRagService_RetrieveContexts_sync", "title": "Snippet for the retrieve_contexts call in the VertexRagService service", diff --git a/google-cloud-ai_platform-v1/snippets/vertex_rag_data_service/get_rag_engine_config.rb b/google-cloud-ai_platform-v1/snippets/vertex_rag_data_service/get_rag_engine_config.rb new file mode 100644 index 000000000000..c37728fc21eb --- /dev/null +++ b/google-cloud-ai_platform-v1/snippets/vertex_rag_data_service/get_rag_engine_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 aiplatform_v1_generated_VertexRagDataService_GetRagEngineConfig_sync] +require "google/cloud/ai_platform/v1" + +## +# Snippet for the get_rag_engine_config call in the VertexRagDataService 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::AIPlatform::V1::VertexRagDataService::Client#get_rag_engine_config. +# +def get_rag_engine_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.new + + # Call the get_rag_engine_config method. + result = client.get_rag_engine_config request + + # The returned object is of type Google::Cloud::AIPlatform::V1::RagEngineConfig. + p result +end +# [END aiplatform_v1_generated_VertexRagDataService_GetRagEngineConfig_sync] diff --git a/google-cloud-ai_platform-v1/snippets/vertex_rag_data_service/update_rag_engine_config.rb b/google-cloud-ai_platform-v1/snippets/vertex_rag_data_service/update_rag_engine_config.rb new file mode 100644 index 000000000000..0edbdc14ffe6 --- /dev/null +++ b/google-cloud-ai_platform-v1/snippets/vertex_rag_data_service/update_rag_engine_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 aiplatform_v1_generated_VertexRagDataService_UpdateRagEngineConfig_sync] +require "google/cloud/ai_platform/v1" + +## +# Snippet for the update_rag_engine_config call in the VertexRagDataService 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::AIPlatform::V1::VertexRagDataService::Client#update_rag_engine_config. +# +def update_rag_engine_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new + + # Call the update_rag_engine_config method. + result = client.update_rag_engine_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END aiplatform_v1_generated_VertexRagDataService_UpdateRagEngineConfig_sync] diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_operations_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_operations_test.rb new file mode 100644 index 000000000000..5b245f937d85 --- /dev/null +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/aiplatform/v1/model_garden_service_pb" +require "google/cloud/aiplatform/v1/model_garden_service_services_pb" +require "google/cloud/ai_platform/v1/model_garden_service" + +class ::Google::Cloud::AIPlatform::V1::ModelGardenService::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::AIPlatform::V1::ModelGardenService::Operations.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::AIPlatform::V1::ModelGardenService::Operations::Configuration, config + end +end diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_paths_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_paths_test.rb index 5b1a0defd452..df39012eca4f 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_paths_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_paths_test.rb @@ -41,6 +41,18 @@ def logger 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::AIPlatform::V1::ModelGardenService::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_publisher_model_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -52,4 +64,16 @@ def test_publisher_model_path assert_equal "publishers/value0/models/value1", path end end + + def test_reservation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reservation_path project_id_or_number: "value0", zone: "value1", reservation_name: "value2" + assert_equal "projects/value0/zones/value1/reservations/value2", path + end + end end diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_rest_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_rest_test.rb index 8dae61ccc11d..6102c725194c 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_rest_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_rest_test.rb @@ -136,6 +136,64 @@ def test_get_publisher_model end end + def test_deploy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + publisher_model_name = "hello world" + destination = "hello world" + model_config = {} + endpoint_config = {} + deploy_config = {} + + deploy_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::AIPlatform::V1::ModelGardenService::Rest::ServiceStub.stub :transcode_deploy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, deploy_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.deploy({ publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.deploy publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.deploy ::Google::Cloud::AIPlatform::V1::DeployRequest.new(publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.deploy({ publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.deploy(::Google::Cloud::AIPlatform::V1::DeployRequest.new(publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, deploy_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_test.rb index 472d3a0f4d71..cd2bfac66f64 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_test.rb @@ -130,6 +130,78 @@ def test_get_publisher_model end end + def test_deploy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + publisher_model_name = "hello world" + destination = "hello world" + model_config = {} + endpoint_config = {} + deploy_config = {} + + deploy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :deploy, name + assert_kind_of ::Google::Cloud::AIPlatform::V1::DeployRequest, request + assert_equal "hello world", request["publisher_model_name"] + assert_equal :publisher_model_name, request.artifacts + assert_equal "hello world", request["destination"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::DeployRequest::ModelConfig), request["model_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::DeployRequest::EndpointConfig), request["endpoint_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::DeployRequest::DeployConfig), request["deploy_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, deploy_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.deploy({ publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.deploy publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.deploy ::Google::Cloud::AIPlatform::V1::DeployRequest.new(publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.deploy({ publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.deploy(::Google::Cloud::AIPlatform::V1::DeployRequest.new(publisher_model_name: publisher_model_name, destination: destination, model_config: model_config, endpoint_config: endpoint_config, deploy_config: deploy_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, deploy_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure @@ -148,4 +220,18 @@ def test_configure assert_same block_config, config assert_kind_of ::Google::Cloud::AIPlatform::V1::ModelGardenService::Client::Configuration, config end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AIPlatform::V1::ModelGardenService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AIPlatform::V1::ModelGardenService::Operations, client.operations_client + end end diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_paths_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_paths_test.rb index b547690753bd..8fc161be187e 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_paths_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_paths_test.rb @@ -92,6 +92,18 @@ def test_rag_corpus_path end end + def test_rag_engine_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rag_engine_config_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/ragEngineConfig", path + end + end + def test_rag_file_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_rest_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_rest_test.rb index a14182672802..e233a4cc9eb4 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_rest_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_rest_test.rb @@ -627,6 +627,114 @@ def test_delete_rag_file end end + def test_update_rag_engine_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rag_engine_config = {} + + update_rag_engine_config_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::AIPlatform::V1::VertexRagDataService::Rest::ServiceStub.stub :transcode_update_rag_engine_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rag_engine_config_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::VertexRagDataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_rag_engine_config({ rag_engine_config: rag_engine_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_rag_engine_config rag_engine_config: rag_engine_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_rag_engine_config ::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new(rag_engine_config: rag_engine_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_rag_engine_config({ rag_engine_config: rag_engine_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_rag_engine_config(::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new(rag_engine_config: rag_engine_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rag_engine_config_client_stub.call_count + end + end + end + + def test_get_rag_engine_config + # Create test objects. + client_result = ::Google::Cloud::AIPlatform::V1::RagEngineConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rag_engine_config_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::AIPlatform::V1::VertexRagDataService::Rest::ServiceStub.stub :transcode_get_rag_engine_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rag_engine_config_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::VertexRagDataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rag_engine_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rag_engine_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rag_engine_config ::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rag_engine_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rag_engine_config(::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rag_engine_config_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_test.rb index a1a5b179c219..bad229607d22 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_test.rb @@ -697,6 +697,127 @@ def test_delete_rag_file end end + def test_update_rag_engine_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + rag_engine_config = {} + + update_rag_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rag_engine_config, name + assert_kind_of ::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::RagEngineConfig), request["rag_engine_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rag_engine_config_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_rag_engine_config({ rag_engine_config: rag_engine_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_rag_engine_config rag_engine_config: rag_engine_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_rag_engine_config ::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new(rag_engine_config: rag_engine_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_rag_engine_config({ rag_engine_config: rag_engine_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_rag_engine_config(::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new(rag_engine_config: rag_engine_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_rag_engine_config_client_stub.call_rpc_count + end + end + + def test_get_rag_engine_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::AIPlatform::V1::RagEngineConfig.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" + + get_rag_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rag_engine_config, name + assert_kind_of ::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rag_engine_config_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rag_engine_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rag_engine_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rag_engine_config ::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rag_engine_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_rag_engine_config(::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.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, get_rag_engine_config_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From b447c96c1ed9f53b350210630a071fd09b8b0612 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:04:27 -0700 Subject: [PATCH 120/457] feat(alloydb-v1beta): Support for assisted experiences feat(alloydb-v1beta): Support deny maintenance periods feat(alloydb-v1beta): Support per-cluster service agents feat(alloydb-v1beta): Support cluster activation policy feat(alloydb-v1beta): Support managed connection pool config feat(alloydb-v1beta): Additional instance network configs docs(alloydb-v1beta): Deprecated GeminiClusterConfig and GeminiInstanceConfig --- .../.owlbot-manifest.json | 1 + .../google/cloud/alloydb/v1beta/gemini_pb.rb | 2 +- .../cloud/alloydb/v1beta/resources_pb.rb | 8 +- .../google/cloud/alloydb/v1beta/gemini.rb | 20 +-- .../google/cloud/alloydb/v1beta/resources.rb | 166 +++++++++++++++++- .../google/cloud/alloydb/v1beta/service.rb | 3 +- .../proto_docs/google/type/date.rb | 53 ++++++ .../proto_docs/google/type/timeofday.rb | 2 +- 8 files changed, 231 insertions(+), 24 deletions(-) create mode 100644 google-cloud-alloy_db-v1beta/proto_docs/google/type/date.rb diff --git a/google-cloud-alloy_db-v1beta/.owlbot-manifest.json b/google-cloud-alloy_db-v1beta/.owlbot-manifest.json index d4ad43e884f0..4075af4e7636 100644 --- a/google-cloud-alloy_db-v1beta/.owlbot-manifest.json +++ b/google-cloud-alloy_db-v1beta/.owlbot-manifest.json @@ -64,6 +64,7 @@ "proto_docs/google/protobuf/timestamp.rb", "proto_docs/google/protobuf/wrappers.rb", "proto_docs/google/rpc/status.rb", + "proto_docs/google/type/date.rb", "proto_docs/google/type/dayofweek.rb", "proto_docs/google/type/expr.rb", "proto_docs/google/type/timeofday.rb", diff --git a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloydb/v1beta/gemini_pb.rb b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloydb/v1beta/gemini_pb.rb index 5fa0d45f12fe..66efa930c5a0 100644 --- a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloydb/v1beta/gemini_pb.rb +++ b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloydb/v1beta/gemini_pb.rb @@ -7,7 +7,7 @@ require 'google/api/field_behavior_pb' -descriptor_data = "\n(google/cloud/alloydb/v1beta/gemini.proto\x12\x1bgoogle.cloud.alloydb.v1beta\x1a\x1fgoogle/api/field_behavior.proto\",\n\x13GeminiClusterConfig\x12\x15\n\x08\x65ntitled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\"-\n\x14GeminiInstanceConfig\x12\x15\n\x08\x65ntitled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\"b\n\x11GCAInstanceConfig\x12M\n\x0fgca_entitlement\x18\x01 \x01(\x0e\x32/.google.cloud.alloydb.v1beta.GCAEntitlementTypeB\x03\xe0\x41\x03*L\n\x12GCAEntitlementType\x12$\n GCA_ENTITLEMENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCA_STANDARD\x10\x01\x42\xc8\x01\n\x1f\x63om.google.cloud.alloydb.v1betaB\x0bGeminiProtoP\x01Z9cloud.google.com/go/alloydb/apiv1beta/alloydbpb;alloydbpb\xaa\x02\x1bGoogle.Cloud.AlloyDb.V1Beta\xca\x02\x1bGoogle\\Cloud\\AlloyDb\\V1beta\xea\x02\x1eGoogle::Cloud::AlloyDB::V1betab\x06proto3" +descriptor_data = "\n(google/cloud/alloydb/v1beta/gemini.proto\x12\x1bgoogle.cloud.alloydb.v1beta\x1a\x1fgoogle/api/field_behavior.proto\".\n\x13GeminiClusterConfig\x12\x17\n\x08\x65ntitled\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\"/\n\x14GeminiInstanceConfig\x12\x17\n\x08\x65ntitled\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\"b\n\x11GCAInstanceConfig\x12M\n\x0fgca_entitlement\x18\x01 \x01(\x0e\x32/.google.cloud.alloydb.v1beta.GCAEntitlementTypeB\x03\xe0\x41\x03*L\n\x12GCAEntitlementType\x12$\n GCA_ENTITLEMENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCA_STANDARD\x10\x01\x42\xc8\x01\n\x1f\x63om.google.cloud.alloydb.v1betaB\x0bGeminiProtoP\x01Z9cloud.google.com/go/alloydb/apiv1beta/alloydbpb;alloydbpb\xaa\x02\x1bGoogle.Cloud.AlloyDb.V1Beta\xca\x02\x1bGoogle\\Cloud\\AlloyDb\\V1beta\xea\x02\x1eGoogle::Cloud::AlloyDB::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloydb/v1beta/resources_pb.rb b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloydb/v1beta/resources_pb.rb index 20ea37e38a52..deb08fdaa483 100644 --- a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloydb/v1beta/resources_pb.rb +++ b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloydb/v1beta/resources_pb.rb @@ -12,11 +12,12 @@ require 'google/protobuf/duration_pb' require 'google/protobuf/timestamp_pb' require 'google/protobuf/wrappers_pb' +require 'google/type/date_pb' require 'google/type/dayofweek_pb' require 'google/type/timeofday_pb' -descriptor_data = "\n+google/cloud/alloydb/v1beta/resources.proto\x12\x1bgoogle.cloud.alloydb.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/alloydb/v1beta/csql_resources.proto\x1a(google/cloud/alloydb/v1beta/gemini.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\".\n\x0cUserPassword\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xe7\x01\n\x0fMigrationSource\x12\x16\n\thost_port\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0creference_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x0bsource_type\x18\x03 \x01(\x0e\x32@.google.cloud.alloydb.v1beta.MigrationSource.MigrationSourceTypeB\x03\xe0\x41\x03\"E\n\x13MigrationSourceType\x12%\n!MIGRATION_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44MS\x10\x01\"(\n\x10\x45ncryptionConfig\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\"\x8a\x02\n\x0e\x45ncryptionInfo\x12N\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x30.google.cloud.alloydb.v1beta.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\x86\x03\n\tSslConfig\x12\x45\n\x08ssl_mode\x18\x01 \x01(\x0e\x32..google.cloud.alloydb.v1beta.SslConfig.SslModeB\x03\xe0\x41\x01\x12G\n\tca_source\x18\x02 \x01(\x0e\x32/.google.cloud.alloydb.v1beta.SslConfig.CaSourceB\x03\xe0\x41\x01\"\xaa\x01\n\x07SslMode\x12\x18\n\x14SSL_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x0eSSL_MODE_ALLOW\x10\x01\x1a\x02\x08\x01\x12\x18\n\x10SSL_MODE_REQUIRE\x10\x02\x1a\x02\x08\x01\x12\x1a\n\x12SSL_MODE_VERIFY_CA\x10\x03\x1a\x02\x08\x01\x12#\n\x1f\x41LLOW_UNENCRYPTED_AND_ENCRYPTED\x10\x04\x12\x12\n\x0e\x45NCRYPTED_ONLY\x10\x05\"<\n\x08\x43\x61Source\x12\x19\n\x15\x43\x41_SOURCE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43\x41_SOURCE_MANAGED\x10\x01\"\xf9\x06\n\x15\x41utomatedBackupPolicy\x12\\\n\x0fweekly_schedule\x18\x02 \x01(\x0b\x32\x41.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.WeeklyScheduleH\x00\x12\x65\n\x14time_based_retention\x18\x04 \x01(\x0b\x32\x45.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.TimeBasedRetentionH\x01\x12m\n\x18quantity_based_retention\x18\x05 \x01(\x0b\x32I.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.QuantityBasedRetentionH\x01\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x02\x88\x01\x01\x12\x30\n\rbackup_window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12M\n\x11\x65ncryption_config\x18\x08 \x01(\x0b\x32-.google.cloud.alloydb.v1beta.EncryptionConfigB\x03\xe0\x41\x01\x12\x10\n\x08location\x18\x06 \x01(\t\x12N\n\x06labels\x18\x07 \x03(\x0b\x32>.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.LabelsEntry\x1ak\n\x0eWeeklySchedule\x12+\n\x0bstart_times\x18\x01 \x03(\x0b\x32\x16.google.type.TimeOfDay\x12,\n\x0c\x64\x61ys_of_week\x18\x02 \x03(\x0e\x32\x16.google.type.DayOfWeek\x1aI\n\x12TimeBasedRetention\x12\x33\n\x10retention_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\'\n\x16QuantityBasedRetention\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08scheduleB\x0b\n\tretentionB\n\n\x08_enabled\"\xa2\x01\n\x16\x43ontinuousBackupConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x14recovery_window_days\x18\x04 \x01(\x05\x12H\n\x11\x65ncryption_config\x18\x03 \x01(\x0b\x32-.google.cloud.alloydb.v1beta.EncryptionConfigB\n\n\x08_enabled\"\x8a\x02\n\x14\x43ontinuousBackupInfo\x12I\n\x0f\x65ncryption_info\x18\x01 \x01(\x0b\x32+.google.cloud.alloydb.v1beta.EncryptionInfoB\x03\xe0\x41\x03\x12\x35\n\x0c\x65nabled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x08schedule\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x03\x12\x41\n\x18\x65\x61rliest_restorable_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"c\n\x0c\x42\x61\x63kupSource\x12\x17\n\nbackup_uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x62\x61\x63kup_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61lloydb.googleapis.com/Backup\"f\n\x16\x43ontinuousBackupSource\x12\x14\n\x07\x63luster\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\rpoint_in_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xe4\x01\n\x17MaintenanceUpdatePolicy\x12\x63\n\x13maintenance_windows\x18\x01 \x03(\x0b\x32\x46.google.cloud.alloydb.v1beta.MaintenanceUpdatePolicy.MaintenanceWindow\x1a\x64\n\x11MaintenanceWindow\x12#\n\x03\x64\x61y\x18\x01 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12*\n\nstart_time\x18\x02 \x01(\x0b\x32\x16.google.type.TimeOfDay\"J\n\x13MaintenanceSchedule\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x88\x1a\n\x07\x43luster\x12G\n\rbackup_source\x18\x0f \x01(\x0b\x32).google.cloud.alloydb.v1beta.BackupSourceB\x03\xe0\x41\x03H\x00\x12M\n\x10migration_source\x18\x10 \x01(\x0b\x32,.google.cloud.alloydb.v1beta.MigrationSourceB\x03\xe0\x41\x03H\x00\x12_\n\x1a\x63loudsql_backup_run_source\x18* \x01(\x0b\x32\x34.google.cloud.alloydb.v1beta.CloudSQLBackupRunSourceB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.alloydb.v1beta.Cluster.LabelsEntry\x12>\n\x05state\x18\x08 \x01(\x0e\x32*.google.cloud.alloydb.v1beta.Cluster.StateB\x03\xe0\x41\x03\x12K\n\x0c\x63luster_type\x18\x18 \x01(\x0e\x32\x30.google.cloud.alloydb.v1beta.Cluster.ClusterTypeB\x03\xe0\x41\x03\x12K\n\x10\x64\x61tabase_version\x18\t \x01(\x0e\x32,.google.cloud.alloydb.v1beta.DatabaseVersionB\x03\xe0\x41\x01\x12O\n\x0enetwork_config\x18\x1d \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.Cluster.NetworkConfigB\x03\xe0\x41\x01\x12\x39\n\x07network\x18\n \x01(\tB(\x18\x01\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x0c\n\x04\x65tag\x18\x0b \x01(\t\x12J\n\x0b\x61nnotations\x18\x0c \x03(\x0b\x32\x35.google.cloud.alloydb.v1beta.Cluster.AnnotationsEntry\x12\x18\n\x0breconciling\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12\x44\n\x0cinitial_user\x18\x0e \x01(\x0b\x32).google.cloud.alloydb.v1beta.UserPasswordB\x03\xe0\x41\x04\x12S\n\x17\x61utomated_backup_policy\x18\x11 \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.AutomatedBackupPolicy\x12>\n\nssl_config\x18\x12 \x01(\x0b\x32&.google.cloud.alloydb.v1beta.SslConfigB\x02\x18\x01\x12M\n\x11\x65ncryption_config\x18\x13 \x01(\x0b\x32-.google.cloud.alloydb.v1beta.EncryptionConfigB\x03\xe0\x41\x01\x12I\n\x0f\x65ncryption_info\x18\x14 \x01(\x0b\x32+.google.cloud.alloydb.v1beta.EncryptionInfoB\x03\xe0\x41\x03\x12Z\n\x18\x63ontinuous_backup_config\x18\x1b \x01(\x0b\x32\x33.google.cloud.alloydb.v1beta.ContinuousBackupConfigB\x03\xe0\x41\x01\x12V\n\x16\x63ontinuous_backup_info\x18\x1c \x01(\x0b\x32\x31.google.cloud.alloydb.v1beta.ContinuousBackupInfoB\x03\xe0\x41\x03\x12N\n\x10secondary_config\x18\x16 \x01(\x0b\x32\x34.google.cloud.alloydb.v1beta.Cluster.SecondaryConfig\x12O\n\x0eprimary_config\x18\x17 \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.Cluster.PrimaryConfigB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12G\n\npsc_config\x18\x1f \x01(\x0b\x32..google.cloud.alloydb.v1beta.Cluster.PscConfigB\x03\xe0\x41\x01\x12\\\n\x19maintenance_update_policy\x18 \x01(\x0b\x32\x34.google.cloud.alloydb.v1beta.MaintenanceUpdatePolicyB\x03\xe0\x41\x01\x12S\n\x14maintenance_schedule\x18% \x01(\x0b\x32\x30.google.cloud.alloydb.v1beta.MaintenanceScheduleB\x03\xe0\x41\x03\x12L\n\rgemini_config\x18$ \x01(\x0b\x32\x30.google.cloud.alloydb.v1beta.GeminiClusterConfigB\x03\xe0\x41\x01\x12M\n\x11subscription_type\x18& \x01(\x0e\x32-.google.cloud.alloydb.v1beta.SubscriptionTypeB\x03\xe0\x41\x01\x12O\n\x0etrial_metadata\x18\' \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.Cluster.TrialMetadataB\x03\xe0\x41\x03\x12G\n\x04tags\x18) \x03(\x0b\x32..google.cloud.alloydb.v1beta.Cluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1ai\n\rNetworkConfig\x12\x37\n\x07network\x18\x01 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1f\n\x12\x61llocated_ip_range\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a/\n\x0fSecondaryConfig\x12\x1c\n\x14primary_cluster_name\x18\x01 \x01(\t\x1a\x35\n\rPrimaryConfig\x12$\n\x17secondary_cluster_names\x18\x01 \x03(\tB\x03\xe0\x41\x03\x1aP\n\tPscConfig\x12\x18\n\x0bpsc_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1cservice_owned_project_number\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a\xd3\x01\n\rTrialMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cupgrade_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0egrace_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\t\n\x05\x45MPTY\x10\x03\x12\x0c\n\x08\x43REATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x07\x12\x0f\n\x0bMAINTENANCE\x10\x08\x12\r\n\tPROMOTING\x10\t\"G\n\x0b\x43lusterType\x12\x1c\n\x18\x43LUSTER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02:u\xea\x41r\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterR\x01\x01\x42\x08\n\x06source\"\xe8#\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.alloydb.v1beta.Instance.LabelsEntry\x12?\n\x05state\x18\x08 \x01(\x0e\x32+.google.cloud.alloydb.v1beta.Instance.StateB\x03\xe0\x41\x03\x12N\n\rinstance_type\x18\t \x01(\x0e\x32\x32.google.cloud.alloydb.v1beta.Instance.InstanceTypeB\x03\xe0\x41\x02\x12K\n\x0emachine_config\x18\n \x01(\x0b\x32\x33.google.cloud.alloydb.v1beta.Instance.MachineConfig\x12Q\n\x11\x61vailability_type\x18\x0b \x01(\x0e\x32\x36.google.cloud.alloydb.v1beta.Instance.AvailabilityType\x12\x10\n\x08gce_zone\x18\x0c \x01(\t\x12P\n\x0e\x64\x61tabase_flags\x18\r \x03(\x0b\x32\x38.google.cloud.alloydb.v1beta.Instance.DatabaseFlagsEntry\x12\x46\n\rwritable_node\x18\x13 \x01(\x0b\x32*.google.cloud.alloydb.v1beta.Instance.NodeB\x03\xe0\x41\x03\x12>\n\x05nodes\x18\x14 \x03(\x0b\x32*.google.cloud.alloydb.v1beta.Instance.NodeB\x03\xe0\x41\x03\x12`\n\x15query_insights_config\x18\x15 \x01(\x0b\x32\x41.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig\x12_\n\x14observability_config\x18\x1a \x01(\x0b\x32\x41.google.cloud.alloydb.v1beta.Instance.ObservabilityInstanceConfig\x12N\n\x10read_pool_config\x18\x0e \x01(\x0b\x32\x34.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig\x12\x17\n\nip_address\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x1b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12K\n\x0b\x61nnotations\x18\x12 \x03(\x0b\x32\x36.google.cloud.alloydb.v1beta.Instance.AnnotationsEntry\x12I\n\rupdate_policy\x18\x16 \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.Instance.UpdatePolicy\x12\x63\n\x18\x63lient_connection_config\x18\x17 \x01(\x0b\x32<.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x03\xe0\x41\x03\x12Y\n\x13psc_instance_config\x18\x1c \x01(\x0b\x32\x37.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigB\x03\xe0\x41\x01\x12X\n\x0enetwork_config\x18\x1d \x01(\x0b\x32;.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigB\x03\xe0\x41\x01\x12M\n\rgemini_config\x18! \x01(\x0b\x32\x31.google.cloud.alloydb.v1beta.GeminiInstanceConfigB\x03\xe0\x41\x01\x12\x31\n\x1coutbound_public_ip_addresses\x18\" \x03(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12G\n\ngca_config\x18& \x01(\x0b\x32..google.cloud.alloydb.v1beta.GCAInstanceConfigB\x03\xe0\x41\x03\x1a\x38\n\rMachineConfig\x12\x11\n\tcpu_count\x18\x01 \x01(\x05\x12\x14\n\x0cmachine_type\x18\x04 \x01(\t\x1aR\n\x04Node\x12\x14\n\x07zone_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02ip\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05state\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\xfa\x01\n\x1bQueryInsightsInstanceConfig\x12$\n\x17record_application_tags\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15record_client_address\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x13query_string_length\x18\x04 \x01(\r\x12#\n\x16query_plans_per_minute\x18\x05 \x01(\rH\x02\x88\x01\x01\x42\x1a\n\x18_record_application_tagsB\x18\n\x16_record_client_addressB\x19\n\x17_query_plans_per_minute\x1a\xac\x04\n\x1bObservabilityInstanceConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1e\n\x11preserve_comments\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11track_wait_events\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x16track_wait_event_types\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12$\n\x17max_query_string_length\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12$\n\x17record_application_tags\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12#\n\x16query_plans_per_minute\x18\x07 \x01(\x05H\x06\x88\x01\x01\x12!\n\x14track_active_queries\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12!\n\x14track_client_address\x18\t \x01(\x08H\x08\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_preserve_commentsB\x14\n\x12_track_wait_eventsB\x19\n\x17_track_wait_event_typesB\x1a\n\x18_max_query_string_lengthB\x1a\n\x18_record_application_tagsB\x19\n\x17_query_plans_per_minuteB\x17\n\x15_track_active_queriesB\x17\n\x15_track_client_address\x1a$\n\x0eReadPoolConfig\x12\x12\n\nnode_count\x18\x01 \x01(\x05\x1a\x91\x01\n\x0cUpdatePolicy\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Mode\":\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0f\n\x0b\x46ORCE_APPLY\x10\x02\x1az\n\x16\x43lientConnectionConfig\x12\x1f\n\x12require_connectors\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12?\n\nssl_config\x18\x02 \x01(\x0b\x32&.google.cloud.alloydb.v1beta.SslConfigB\x03\xe0\x41\x01\x1a\x39\n\x12PscInterfaceConfig\x12#\n\x1bnetwork_attachment_resource\x18\x01 \x01(\t\x1a\xa9\x01\n\x17PscAutoConnectionConfig\x12\x18\n\x10\x63onsumer_project\x18\x01 \x01(\t\x12\x18\n\x10\x63onsumer_network\x18\x02 \x01(\t\x12\x1f\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x13\n\x06status\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x63onsumer_network_status\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a\xbc\x02\n\x11PscInstanceConfig\x12$\n\x17service_attachment_link\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x61llowed_consumer_projects\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpsc_dns_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x15psc_interface_configs\x18\x08 \x03(\x0b\x32\x38.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigB\x03\xe0\x41\x01\x12`\n\x14psc_auto_connections\x18\t \x03(\x0b\x32=.google.cloud.alloydb.v1beta.Instance.PscAutoConnectionConfigB\x03\xe0\x41\x01\x1a\x8b\x02\n\x15InstanceNetworkConfig\x12x\n\x1c\x61uthorized_external_networks\x18\x01 \x03(\x0b\x32M.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetworkB\x03\xe0\x41\x01\x12\x1d\n\x10\x65nable_public_ip\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x65nable_outbound_public_ip\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x11\x41uthorizedNetwork\x12\x1c\n\ncidr_range\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x44\x61tabaseFlagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\x0c\n\x08\x43REATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0f\n\x0bMAINTENANCE\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x08\x12\r\n\tPROMOTING\x10\t\"X\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tREAD_POOL\x10\x02\x12\r\n\tSECONDARY\x10\x03\"N\n\x10\x41vailabilityType\x12!\n\x1d\x41VAILABILITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Instance\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}*\tinstances2\x08instanceR\x01\x01\"\xea\x02\n\x0e\x43onnectionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\nip_address\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x05 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12$\n\x15pem_certificate_chain\x18\x03 \x03(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cinstance_uid\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpsc_dns_name\x18\x06 \x01(\tB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n%alloydb.googleapis.com/ConnectionInfo\x12^projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}/connectionInfo*\x0f\x63onnectionInfos2\x0e\x63onnectionInfo\"\xe8\x0c\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32/.google.cloud.alloydb.v1beta.Backup.LabelsEntry\x12=\n\x05state\x18\x07 \x01(\x0e\x32).google.cloud.alloydb.v1beta.Backup.StateB\x03\xe0\x41\x03\x12\x36\n\x04type\x18\x08 \x01(\x0e\x32(.google.cloud.alloydb.v1beta.Backup.Type\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x18\n\x0b\x63luster_uid\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12<\n\x0c\x63luster_name\x18\n \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\x12\x18\n\x0breconciling\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12M\n\x11\x65ncryption_config\x18\x0c \x01(\x0b\x32-.google.cloud.alloydb.v1beta.EncryptionConfigB\x03\xe0\x41\x01\x12I\n\x0f\x65ncryption_info\x18\r \x01(\x0b\x32+.google.cloud.alloydb.v1beta.EncryptionInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12I\n\x0b\x61nnotations\x18\x10 \x03(\x0b\x32\x34.google.cloud.alloydb.v1beta.Backup.AnnotationsEntry\x12\x17\n\nsize_bytes\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpiry_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12U\n\x0f\x65xpiry_quantity\x18\x14 \x01(\x0b\x32\x37.google.cloud.alloydb.v1beta.Backup.QuantityBasedExpiryB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12K\n\x10\x64\x61tabase_version\x18\x16 \x01(\x0e\x32,.google.cloud.alloydb.v1beta.DatabaseVersionB\x03\xe0\x41\x03\x12\x46\n\x04tags\x18\x19 \x03(\x0b\x32-.google.cloud.alloydb.v1beta.Backup.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1aW\n\x13QuantityBasedExpiry\x12\x1c\n\x0fretention_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\"\n\x15total_retention_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tAUTOMATED\x10\x02\x12\x0e\n\nCONTINUOUS\x10\x03:p\xea\x41m\n\x1d\x61lloydb.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupR\x01\x01\"\x90\t\n\x15SupportedDatabaseFlag\x12\x64\n\x13string_restrictions\x18\x07 \x01(\x0b\x32\x45.google.cloud.alloydb.v1beta.SupportedDatabaseFlag.StringRestrictionsH\x00\x12\x66\n\x14integer_restrictions\x18\x08 \x01(\x0b\x32\x46.google.cloud.alloydb.v1beta.SupportedDatabaseFlag.IntegerRestrictionsH\x00\x12\"\n\x18recommended_string_value\x18\n \x01(\tH\x01\x12@\n\x19recommended_integer_value\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tflag_name\x18\x02 \x01(\t\x12P\n\nvalue_type\x18\x03 \x01(\x0e\x32<.google.cloud.alloydb.v1beta.SupportedDatabaseFlag.ValueType\x12\x1f\n\x17\x61\x63\x63\x65pts_multiple_values\x18\x04 \x01(\x08\x12K\n\x15supported_db_versions\x18\x05 \x03(\x0e\x32,.google.cloud.alloydb.v1beta.DatabaseVersion\x12\x1b\n\x13requires_db_restart\x18\x06 \x01(\x08\x12G\n\x05scope\x18\t \x01(\x0e\x32\x38.google.cloud.alloydb.v1beta.SupportedDatabaseFlag.Scope\x1a,\n\x12StringRestrictions\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x1au\n\x13IntegerRestrictions\x12.\n\tmin_value\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12.\n\tmax_value\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"U\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\t\n\x05\x46LOAT\x10\x03\x12\x08\n\x04NONE\x10\x04\"A\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\x13\n\x0f\x43ONNECTION_POOL\x10\x02:\x97\x01\xea\x41\x93\x01\n,alloydb.googleapis.com/SupportedDatabaseFlag\x12\x34projects/{project}/locations/{location}/flags/{flag}*\x16supportedDatabaseFlags2\x15supportedDatabaseFlagB\x0e\n\x0crestrictionsB\x13\n\x11recommended_value\"\xfe\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08password\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x1b\n\x0e\x64\x61tabase_roles\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\tuser_type\x18\x05 \x01(\x0e\x32*.google.cloud.alloydb.v1beta.User.UserTypeB\x03\xe0\x41\x01\x12\x1d\n\x10keep_extra_roles\x18\x06 \x01(\x08\x42\x03\xe0\x41\x04\"Q\n\x08UserType\x12\x19\n\x15USER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41LLOYDB_BUILT_IN\x10\x01\x12\x14\n\x10\x41LLOYDB_IAM_USER\x10\x02:y\xea\x41v\n\x1b\x61lloydb.googleapis.com/User\x12Gprojects/{project}/locations/{location}/clusters/{cluster}/users/{user}*\x05users2\x04userR\x01\x01\"\xdc\x01\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x63harset\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcollation\x18\x03 \x01(\tB\x03\xe0\x41\x01:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Database\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/databases/{database}*\tdatabases2\x08\x64\x61tabaseR\x01\x01*^\n\x0cInstanceView\x12\x1d\n\x19INSTANCE_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13INSTANCE_VIEW_BASIC\x10\x01\x12\x16\n\x12INSTANCE_VIEW_FULL\x10\x02*g\n\x0b\x43lusterView\x12\x1c\n\x18\x43LUSTER_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LUSTER_VIEW_BASIC\x10\x01\x12\"\n\x1e\x43LUSTER_VIEW_CONTINUOUS_BACKUP\x10\x02*{\n\x0f\x44\x61tabaseVersion\x12 \n\x1c\x44\x41TABASE_VERSION_UNSPECIFIED\x10\x00\x12\x13\n\x0bPOSTGRES_13\x10\x01\x1a\x02\x08\x01\x12\x0f\n\x0bPOSTGRES_14\x10\x02\x12\x0f\n\x0bPOSTGRES_15\x10\x03\x12\x0f\n\x0bPOSTGRES_16\x10\x04*N\n\x10SubscriptionType\x12!\n\x1dSUBSCRIPTION_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05TRIAL\x10\x02\x42\xc6\x03\n\x1f\x63om.google.cloud.alloydb.v1betaB\x0eResourcesProtoP\x01Z9cloud.google.com/go/alloydb/apiv1beta/alloydbpb;alloydbpb\xaa\x02\x1bGoogle.Cloud.AlloyDb.V1Beta\xca\x02\x1bGoogle\\Cloud\\AlloyDb\\V1beta\xea\x02\x1eGoogle::Cloud::AlloyDB::V1beta\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" +descriptor_data = "\n+google/cloud/alloydb/v1beta/resources.proto\x12\x1bgoogle.cloud.alloydb.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/alloydb/v1beta/csql_resources.proto\x1a(google/cloud/alloydb/v1beta/gemini.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\".\n\x0cUserPassword\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xe7\x01\n\x0fMigrationSource\x12\x16\n\thost_port\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0creference_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x0bsource_type\x18\x03 \x01(\x0e\x32@.google.cloud.alloydb.v1beta.MigrationSource.MigrationSourceTypeB\x03\xe0\x41\x03\"E\n\x13MigrationSourceType\x12%\n!MIGRATION_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44MS\x10\x01\"(\n\x10\x45ncryptionConfig\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\"\x8a\x02\n\x0e\x45ncryptionInfo\x12N\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x30.google.cloud.alloydb.v1beta.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\x86\x03\n\tSslConfig\x12\x45\n\x08ssl_mode\x18\x01 \x01(\x0e\x32..google.cloud.alloydb.v1beta.SslConfig.SslModeB\x03\xe0\x41\x01\x12G\n\tca_source\x18\x02 \x01(\x0e\x32/.google.cloud.alloydb.v1beta.SslConfig.CaSourceB\x03\xe0\x41\x01\"\xaa\x01\n\x07SslMode\x12\x18\n\x14SSL_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x0eSSL_MODE_ALLOW\x10\x01\x1a\x02\x08\x01\x12\x18\n\x10SSL_MODE_REQUIRE\x10\x02\x1a\x02\x08\x01\x12\x1a\n\x12SSL_MODE_VERIFY_CA\x10\x03\x1a\x02\x08\x01\x12#\n\x1f\x41LLOW_UNENCRYPTED_AND_ENCRYPTED\x10\x04\x12\x12\n\x0e\x45NCRYPTED_ONLY\x10\x05\"<\n\x08\x43\x61Source\x12\x19\n\x15\x43\x41_SOURCE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43\x41_SOURCE_MANAGED\x10\x01\"\xf9\x06\n\x15\x41utomatedBackupPolicy\x12\\\n\x0fweekly_schedule\x18\x02 \x01(\x0b\x32\x41.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.WeeklyScheduleH\x00\x12\x65\n\x14time_based_retention\x18\x04 \x01(\x0b\x32\x45.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.TimeBasedRetentionH\x01\x12m\n\x18quantity_based_retention\x18\x05 \x01(\x0b\x32I.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.QuantityBasedRetentionH\x01\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x02\x88\x01\x01\x12\x30\n\rbackup_window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12M\n\x11\x65ncryption_config\x18\x08 \x01(\x0b\x32-.google.cloud.alloydb.v1beta.EncryptionConfigB\x03\xe0\x41\x01\x12\x10\n\x08location\x18\x06 \x01(\t\x12N\n\x06labels\x18\x07 \x03(\x0b\x32>.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.LabelsEntry\x1ak\n\x0eWeeklySchedule\x12+\n\x0bstart_times\x18\x01 \x03(\x0b\x32\x16.google.type.TimeOfDay\x12,\n\x0c\x64\x61ys_of_week\x18\x02 \x03(\x0e\x32\x16.google.type.DayOfWeek\x1aI\n\x12TimeBasedRetention\x12\x33\n\x10retention_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\'\n\x16QuantityBasedRetention\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08scheduleB\x0b\n\tretentionB\n\n\x08_enabled\"\xa2\x01\n\x16\x43ontinuousBackupConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x14recovery_window_days\x18\x04 \x01(\x05\x12H\n\x11\x65ncryption_config\x18\x03 \x01(\x0b\x32-.google.cloud.alloydb.v1beta.EncryptionConfigB\n\n\x08_enabled\"\x8a\x02\n\x14\x43ontinuousBackupInfo\x12I\n\x0f\x65ncryption_info\x18\x01 \x01(\x0b\x32+.google.cloud.alloydb.v1beta.EncryptionInfoB\x03\xe0\x41\x03\x12\x35\n\x0c\x65nabled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x08schedule\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x03\x12\x41\n\x18\x65\x61rliest_restorable_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"c\n\x0c\x42\x61\x63kupSource\x12\x17\n\nbackup_uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x62\x61\x63kup_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61lloydb.googleapis.com/Backup\"f\n\x16\x43ontinuousBackupSource\x12\x14\n\x07\x63luster\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\rpoint_in_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xde\x03\n\x17MaintenanceUpdatePolicy\x12\x63\n\x13maintenance_windows\x18\x01 \x03(\x0b\x32\x46.google.cloud.alloydb.v1beta.MaintenanceUpdatePolicy.MaintenanceWindow\x12l\n\x18\x64\x65ny_maintenance_periods\x18\x02 \x03(\x0b\x32J.google.cloud.alloydb.v1beta.MaintenanceUpdatePolicy.DenyMaintenancePeriod\x1a\x64\n\x11MaintenanceWindow\x12#\n\x03\x64\x61y\x18\x01 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12*\n\nstart_time\x18\x02 \x01(\x0b\x32\x16.google.type.TimeOfDay\x1a\x89\x01\n\x15\x44\x65nyMaintenancePeriod\x12%\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12#\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\"J\n\x13MaintenanceSchedule\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xae\x1a\n\x07\x43luster\x12G\n\rbackup_source\x18\x0f \x01(\x0b\x32).google.cloud.alloydb.v1beta.BackupSourceB\x03\xe0\x41\x03H\x00\x12M\n\x10migration_source\x18\x10 \x01(\x0b\x32,.google.cloud.alloydb.v1beta.MigrationSourceB\x03\xe0\x41\x03H\x00\x12_\n\x1a\x63loudsql_backup_run_source\x18* \x01(\x0b\x32\x34.google.cloud.alloydb.v1beta.CloudSQLBackupRunSourceB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.alloydb.v1beta.Cluster.LabelsEntry\x12>\n\x05state\x18\x08 \x01(\x0e\x32*.google.cloud.alloydb.v1beta.Cluster.StateB\x03\xe0\x41\x03\x12K\n\x0c\x63luster_type\x18\x18 \x01(\x0e\x32\x30.google.cloud.alloydb.v1beta.Cluster.ClusterTypeB\x03\xe0\x41\x03\x12K\n\x10\x64\x61tabase_version\x18\t \x01(\x0e\x32,.google.cloud.alloydb.v1beta.DatabaseVersionB\x03\xe0\x41\x01\x12O\n\x0enetwork_config\x18\x1d \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.Cluster.NetworkConfigB\x03\xe0\x41\x01\x12\x39\n\x07network\x18\n \x01(\tB(\x18\x01\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x0c\n\x04\x65tag\x18\x0b \x01(\t\x12J\n\x0b\x61nnotations\x18\x0c \x03(\x0b\x32\x35.google.cloud.alloydb.v1beta.Cluster.AnnotationsEntry\x12\x18\n\x0breconciling\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12\x44\n\x0cinitial_user\x18\x0e \x01(\x0b\x32).google.cloud.alloydb.v1beta.UserPasswordB\x03\xe0\x41\x04\x12S\n\x17\x61utomated_backup_policy\x18\x11 \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.AutomatedBackupPolicy\x12>\n\nssl_config\x18\x12 \x01(\x0b\x32&.google.cloud.alloydb.v1beta.SslConfigB\x02\x18\x01\x12M\n\x11\x65ncryption_config\x18\x13 \x01(\x0b\x32-.google.cloud.alloydb.v1beta.EncryptionConfigB\x03\xe0\x41\x01\x12I\n\x0f\x65ncryption_info\x18\x14 \x01(\x0b\x32+.google.cloud.alloydb.v1beta.EncryptionInfoB\x03\xe0\x41\x03\x12Z\n\x18\x63ontinuous_backup_config\x18\x1b \x01(\x0b\x32\x33.google.cloud.alloydb.v1beta.ContinuousBackupConfigB\x03\xe0\x41\x01\x12V\n\x16\x63ontinuous_backup_info\x18\x1c \x01(\x0b\x32\x31.google.cloud.alloydb.v1beta.ContinuousBackupInfoB\x03\xe0\x41\x03\x12N\n\x10secondary_config\x18\x16 \x01(\x0b\x32\x34.google.cloud.alloydb.v1beta.Cluster.SecondaryConfig\x12O\n\x0eprimary_config\x18\x17 \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.Cluster.PrimaryConfigB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12G\n\npsc_config\x18\x1f \x01(\x0b\x32..google.cloud.alloydb.v1beta.Cluster.PscConfigB\x03\xe0\x41\x01\x12\\\n\x19maintenance_update_policy\x18 \x01(\x0b\x32\x34.google.cloud.alloydb.v1beta.MaintenanceUpdatePolicyB\x03\xe0\x41\x01\x12S\n\x14maintenance_schedule\x18% \x01(\x0b\x32\x30.google.cloud.alloydb.v1beta.MaintenanceScheduleB\x03\xe0\x41\x03\x12N\n\rgemini_config\x18$ \x01(\x0b\x32\x30.google.cloud.alloydb.v1beta.GeminiClusterConfigB\x05\x18\x01\xe0\x41\x01\x12M\n\x11subscription_type\x18& \x01(\x0e\x32-.google.cloud.alloydb.v1beta.SubscriptionTypeB\x03\xe0\x41\x01\x12O\n\x0etrial_metadata\x18\' \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.Cluster.TrialMetadataB\x03\xe0\x41\x03\x12G\n\x04tags\x18) \x03(\x0b\x32..google.cloud.alloydb.v1beta.Cluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12\"\n\x15service_account_email\x18. \x01(\tB\x03\xe0\x41\x03\x1ai\n\rNetworkConfig\x12\x37\n\x07network\x18\x01 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1f\n\x12\x61llocated_ip_range\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a/\n\x0fSecondaryConfig\x12\x1c\n\x14primary_cluster_name\x18\x01 \x01(\t\x1a\x35\n\rPrimaryConfig\x12$\n\x17secondary_cluster_names\x18\x01 \x03(\tB\x03\xe0\x41\x03\x1aP\n\tPscConfig\x12\x18\n\x0bpsc_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1cservice_owned_project_number\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a\xd3\x01\n\rTrialMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cupgrade_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0egrace_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\t\n\x05\x45MPTY\x10\x03\x12\x0c\n\x08\x43REATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x07\x12\x0f\n\x0bMAINTENANCE\x10\x08\x12\r\n\tPROMOTING\x10\t\"G\n\x0b\x43lusterType\x12\x1c\n\x18\x43LUSTER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02:u\xea\x41r\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterR\x01\x01\x42\x08\n\x06source\"\xb3)\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.alloydb.v1beta.Instance.LabelsEntry\x12?\n\x05state\x18\x08 \x01(\x0e\x32+.google.cloud.alloydb.v1beta.Instance.StateB\x03\xe0\x41\x03\x12N\n\rinstance_type\x18\t \x01(\x0e\x32\x32.google.cloud.alloydb.v1beta.Instance.InstanceTypeB\x03\xe0\x41\x02\x12K\n\x0emachine_config\x18\n \x01(\x0b\x32\x33.google.cloud.alloydb.v1beta.Instance.MachineConfig\x12Q\n\x11\x61vailability_type\x18\x0b \x01(\x0e\x32\x36.google.cloud.alloydb.v1beta.Instance.AvailabilityType\x12\x10\n\x08gce_zone\x18\x0c \x01(\t\x12P\n\x0e\x64\x61tabase_flags\x18\r \x03(\x0b\x32\x38.google.cloud.alloydb.v1beta.Instance.DatabaseFlagsEntry\x12\x46\n\rwritable_node\x18\x13 \x01(\x0b\x32*.google.cloud.alloydb.v1beta.Instance.NodeB\x03\xe0\x41\x03\x12>\n\x05nodes\x18\x14 \x03(\x0b\x32*.google.cloud.alloydb.v1beta.Instance.NodeB\x03\xe0\x41\x03\x12`\n\x15query_insights_config\x18\x15 \x01(\x0b\x32\x41.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig\x12_\n\x14observability_config\x18\x1a \x01(\x0b\x32\x41.google.cloud.alloydb.v1beta.Instance.ObservabilityInstanceConfig\x12N\n\x10read_pool_config\x18\x0e \x01(\x0b\x32\x34.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig\x12\x17\n\nip_address\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x1b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12K\n\x0b\x61nnotations\x18\x12 \x03(\x0b\x32\x36.google.cloud.alloydb.v1beta.Instance.AnnotationsEntry\x12I\n\rupdate_policy\x18\x16 \x01(\x0b\x32\x32.google.cloud.alloydb.v1beta.Instance.UpdatePolicy\x12\x63\n\x18\x63lient_connection_config\x18\x17 \x01(\x0b\x32<.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x03\xe0\x41\x03\x12Y\n\x13psc_instance_config\x18\x1c \x01(\x0b\x32\x37.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigB\x03\xe0\x41\x01\x12X\n\x0enetwork_config\x18\x1d \x01(\x0b\x32;.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigB\x03\xe0\x41\x01\x12O\n\rgemini_config\x18! \x01(\x0b\x32\x31.google.cloud.alloydb.v1beta.GeminiInstanceConfigB\x05\x18\x01\xe0\x41\x01\x12\x31\n\x1coutbound_public_ip_addresses\x18\" \x03(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12V\n\x11\x61\x63tivation_policy\x18# \x01(\x0e\x32\x36.google.cloud.alloydb.v1beta.Instance.ActivationPolicyB\x03\xe0\x41\x01\x12_\n\x16\x63onnection_pool_config\x18% \x01(\x0b\x32:.google.cloud.alloydb.v1beta.Instance.ConnectionPoolConfigB\x03\xe0\x41\x01\x12G\n\ngca_config\x18& \x01(\x0b\x32..google.cloud.alloydb.v1beta.GCAInstanceConfigB\x03\xe0\x41\x03\x1a\x38\n\rMachineConfig\x12\x11\n\tcpu_count\x18\x01 \x01(\x05\x12\x14\n\x0cmachine_type\x18\x04 \x01(\t\x1aR\n\x04Node\x12\x14\n\x07zone_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02ip\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05state\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\xfa\x01\n\x1bQueryInsightsInstanceConfig\x12$\n\x17record_application_tags\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15record_client_address\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x13query_string_length\x18\x04 \x01(\r\x12#\n\x16query_plans_per_minute\x18\x05 \x01(\rH\x02\x88\x01\x01\x42\x1a\n\x18_record_application_tagsB\x18\n\x16_record_client_addressB\x19\n\x17_query_plans_per_minute\x1a\xfa\x04\n\x1bObservabilityInstanceConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1e\n\x11preserve_comments\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11track_wait_events\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x16track_wait_event_types\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12$\n\x17max_query_string_length\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12$\n\x17record_application_tags\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12#\n\x16query_plans_per_minute\x18\x07 \x01(\x05H\x06\x88\x01\x01\x12!\n\x14track_active_queries\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12!\n\x14track_client_address\x18\t \x01(\x08H\x08\x88\x01\x01\x12*\n\x1d\x61ssistive_experiences_enabled\x18\n \x01(\x08H\t\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_preserve_commentsB\x14\n\x12_track_wait_eventsB\x19\n\x17_track_wait_event_typesB\x1a\n\x18_max_query_string_lengthB\x1a\n\x18_record_application_tagsB\x19\n\x17_query_plans_per_minuteB\x17\n\x15_track_active_queriesB\x17\n\x15_track_client_addressB \n\x1e_assistive_experiences_enabled\x1a$\n\x0eReadPoolConfig\x12\x12\n\nnode_count\x18\x01 \x01(\x05\x1a\x91\x01\n\x0cUpdatePolicy\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Mode\":\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0f\n\x0b\x46ORCE_APPLY\x10\x02\x1az\n\x16\x43lientConnectionConfig\x12\x1f\n\x12require_connectors\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12?\n\nssl_config\x18\x02 \x01(\x0b\x32&.google.cloud.alloydb.v1beta.SslConfigB\x03\xe0\x41\x01\x1a\x39\n\x12PscInterfaceConfig\x12#\n\x1bnetwork_attachment_resource\x18\x01 \x01(\t\x1a\xa9\x01\n\x17PscAutoConnectionConfig\x12\x18\n\x10\x63onsumer_project\x18\x01 \x01(\t\x12\x18\n\x10\x63onsumer_network\x18\x02 \x01(\t\x12\x1f\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x13\n\x06status\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x63onsumer_network_status\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a\xbc\x02\n\x11PscInstanceConfig\x12$\n\x17service_attachment_link\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x61llowed_consumer_projects\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpsc_dns_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x15psc_interface_configs\x18\x08 \x03(\x0b\x32\x38.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigB\x03\xe0\x41\x01\x12`\n\x14psc_auto_connections\x18\t \x03(\x0b\x32=.google.cloud.alloydb.v1beta.Instance.PscAutoConnectionConfigB\x03\xe0\x41\x01\x1a\xee\x02\n\x15InstanceNetworkConfig\x12x\n\x1c\x61uthorized_external_networks\x18\x01 \x03(\x0b\x32M.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetworkB\x03\xe0\x41\x01\x12\x1d\n\x10\x65nable_public_ip\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x65nable_outbound_public_ip\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n\x07network\x18\x04 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12(\n\x1b\x61llocated_ip_range_override\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x11\x41uthorizedNetwork\x12\x1c\n\ncidr_range\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x1a\x8e\x02\n\x14\x43onnectionPoolConfig\x12\x14\n\x07\x65nabled\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12Y\n\x05\x66lags\x18\r \x03(\x0b\x32\x45.google.cloud.alloydb.v1beta.Instance.ConnectionPoolConfig.FlagsEntryB\x03\xe0\x41\x01\x1a,\n\nFlagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\x08PoolMode\x12\x19\n\x15POOL_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11POOL_MODE_SESSION\x10\x01\x12\x19\n\x15POOL_MODE_TRANSACTION\x10\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x44\x61tabaseFlagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\x0c\n\x08\x43REATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0f\n\x0bMAINTENANCE\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x08\x12\r\n\tPROMOTING\x10\t\"X\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tREAD_POOL\x10\x02\x12\r\n\tSECONDARY\x10\x03\"N\n\x10\x41vailabilityType\x12!\n\x1d\x41VAILABILITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\"L\n\x10\x41\x63tivationPolicy\x12!\n\x1d\x41\x43TIVATION_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x41LWAYS\x10\x01\x12\t\n\x05NEVER\x10\x02:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Instance\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}*\tinstances2\x08instanceR\x01\x01\"\xea\x02\n\x0e\x43onnectionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\nip_address\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x05 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12$\n\x15pem_certificate_chain\x18\x03 \x03(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cinstance_uid\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpsc_dns_name\x18\x06 \x01(\tB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n%alloydb.googleapis.com/ConnectionInfo\x12^projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}/connectionInfo*\x0f\x63onnectionInfos2\x0e\x63onnectionInfo\"\xa9\r\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16\x63reate_completion_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32/.google.cloud.alloydb.v1beta.Backup.LabelsEntry\x12=\n\x05state\x18\x07 \x01(\x0e\x32).google.cloud.alloydb.v1beta.Backup.StateB\x03\xe0\x41\x03\x12\x36\n\x04type\x18\x08 \x01(\x0e\x32(.google.cloud.alloydb.v1beta.Backup.Type\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x18\n\x0b\x63luster_uid\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12<\n\x0c\x63luster_name\x18\n \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\x12\x18\n\x0breconciling\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12M\n\x11\x65ncryption_config\x18\x0c \x01(\x0b\x32-.google.cloud.alloydb.v1beta.EncryptionConfigB\x03\xe0\x41\x01\x12I\n\x0f\x65ncryption_info\x18\r \x01(\x0b\x32+.google.cloud.alloydb.v1beta.EncryptionInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12I\n\x0b\x61nnotations\x18\x10 \x03(\x0b\x32\x34.google.cloud.alloydb.v1beta.Backup.AnnotationsEntry\x12\x17\n\nsize_bytes\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpiry_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12U\n\x0f\x65xpiry_quantity\x18\x14 \x01(\x0b\x32\x37.google.cloud.alloydb.v1beta.Backup.QuantityBasedExpiryB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12K\n\x10\x64\x61tabase_version\x18\x16 \x01(\x0e\x32,.google.cloud.alloydb.v1beta.DatabaseVersionB\x03\xe0\x41\x03\x12\x46\n\x04tags\x18\x19 \x03(\x0b\x32-.google.cloud.alloydb.v1beta.Backup.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1aW\n\x13QuantityBasedExpiry\x12\x1c\n\x0fretention_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\"\n\x15total_retention_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tAUTOMATED\x10\x02\x12\x0e\n\nCONTINUOUS\x10\x03:p\xea\x41m\n\x1d\x61lloydb.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupR\x01\x01\"\x90\t\n\x15SupportedDatabaseFlag\x12\x64\n\x13string_restrictions\x18\x07 \x01(\x0b\x32\x45.google.cloud.alloydb.v1beta.SupportedDatabaseFlag.StringRestrictionsH\x00\x12\x66\n\x14integer_restrictions\x18\x08 \x01(\x0b\x32\x46.google.cloud.alloydb.v1beta.SupportedDatabaseFlag.IntegerRestrictionsH\x00\x12\"\n\x18recommended_string_value\x18\n \x01(\tH\x01\x12@\n\x19recommended_integer_value\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tflag_name\x18\x02 \x01(\t\x12P\n\nvalue_type\x18\x03 \x01(\x0e\x32<.google.cloud.alloydb.v1beta.SupportedDatabaseFlag.ValueType\x12\x1f\n\x17\x61\x63\x63\x65pts_multiple_values\x18\x04 \x01(\x08\x12K\n\x15supported_db_versions\x18\x05 \x03(\x0e\x32,.google.cloud.alloydb.v1beta.DatabaseVersion\x12\x1b\n\x13requires_db_restart\x18\x06 \x01(\x08\x12G\n\x05scope\x18\t \x01(\x0e\x32\x38.google.cloud.alloydb.v1beta.SupportedDatabaseFlag.Scope\x1a,\n\x12StringRestrictions\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x1au\n\x13IntegerRestrictions\x12.\n\tmin_value\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12.\n\tmax_value\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"U\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\t\n\x05\x46LOAT\x10\x03\x12\x08\n\x04NONE\x10\x04\"A\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\x13\n\x0f\x43ONNECTION_POOL\x10\x02:\x97\x01\xea\x41\x93\x01\n,alloydb.googleapis.com/SupportedDatabaseFlag\x12\x34projects/{project}/locations/{location}/flags/{flag}*\x16supportedDatabaseFlags2\x15supportedDatabaseFlagB\x0e\n\x0crestrictionsB\x13\n\x11recommended_value\"\xfe\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08password\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x1b\n\x0e\x64\x61tabase_roles\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\tuser_type\x18\x05 \x01(\x0e\x32*.google.cloud.alloydb.v1beta.User.UserTypeB\x03\xe0\x41\x01\x12\x1d\n\x10keep_extra_roles\x18\x06 \x01(\x08\x42\x03\xe0\x41\x04\"Q\n\x08UserType\x12\x19\n\x15USER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41LLOYDB_BUILT_IN\x10\x01\x12\x14\n\x10\x41LLOYDB_IAM_USER\x10\x02:y\xea\x41v\n\x1b\x61lloydb.googleapis.com/User\x12Gprojects/{project}/locations/{location}/clusters/{cluster}/users/{user}*\x05users2\x04userR\x01\x01\"\xdc\x01\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x63harset\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcollation\x18\x03 \x01(\tB\x03\xe0\x41\x01:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Database\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/databases/{database}*\tdatabases2\x08\x64\x61tabaseR\x01\x01*^\n\x0cInstanceView\x12\x1d\n\x19INSTANCE_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13INSTANCE_VIEW_BASIC\x10\x01\x12\x16\n\x12INSTANCE_VIEW_FULL\x10\x02*g\n\x0b\x43lusterView\x12\x1c\n\x18\x43LUSTER_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LUSTER_VIEW_BASIC\x10\x01\x12\"\n\x1e\x43LUSTER_VIEW_CONTINUOUS_BACKUP\x10\x02*{\n\x0f\x44\x61tabaseVersion\x12 \n\x1c\x44\x41TABASE_VERSION_UNSPECIFIED\x10\x00\x12\x13\n\x0bPOSTGRES_13\x10\x01\x1a\x02\x08\x01\x12\x0f\n\x0bPOSTGRES_14\x10\x02\x12\x0f\n\x0bPOSTGRES_15\x10\x03\x12\x0f\n\x0bPOSTGRES_16\x10\x04*N\n\x10SubscriptionType\x12!\n\x1dSUBSCRIPTION_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05TRIAL\x10\x02\x42\xc6\x03\n\x1f\x63om.google.cloud.alloydb.v1betaB\x0eResourcesProtoP\x01Z9cloud.google.com/go/alloydb/apiv1beta/alloydbpb;alloydbpb\xaa\x02\x1bGoogle.Cloud.AlloyDb.V1Beta\xca\x02\x1bGoogle\\Cloud\\AlloyDb\\V1beta\xea\x02\x1eGoogle::Cloud::AlloyDB::V1beta\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -34,6 +35,7 @@ ["google.protobuf.Duration", "google/protobuf/duration.proto"], ["google.type.TimeOfDay", "google/type/timeofday.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.Date", "google/type/date.proto"], ["google.cloud.alloydb.v1beta.CloudSQLBackupRunSource", "google/cloud/alloydb/v1beta/csql_resources.proto"], ["google.cloud.alloydb.v1beta.GeminiClusterConfig", "google/cloud/alloydb/v1beta/gemini.proto"], ["google.protobuf.Int64Value", "google/protobuf/wrappers.proto"], @@ -71,6 +73,7 @@ module V1beta ContinuousBackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.ContinuousBackupSource").msgclass MaintenanceUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.MaintenanceUpdatePolicy").msgclass MaintenanceUpdatePolicy::MaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.MaintenanceUpdatePolicy.MaintenanceWindow").msgclass + MaintenanceUpdatePolicy::DenyMaintenancePeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.MaintenanceUpdatePolicy.DenyMaintenancePeriod").msgclass MaintenanceSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.MaintenanceSchedule").msgclass Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Cluster").msgclass Cluster::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Cluster.NetworkConfig").msgclass @@ -94,9 +97,12 @@ module V1beta Instance::PscInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.PscInstanceConfig").msgclass Instance::InstanceNetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig").msgclass Instance::InstanceNetworkConfig::AuthorizedNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork").msgclass + Instance::ConnectionPoolConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.ConnectionPoolConfig").msgclass + Instance::ConnectionPoolConfig::PoolMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.ConnectionPoolConfig.PoolMode").enummodule Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.State").enummodule Instance::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.InstanceType").enummodule Instance::AvailabilityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.AvailabilityType").enummodule + Instance::ActivationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Instance.ActivationPolicy").enummodule ConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.ConnectionInfo").msgclass Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Backup").msgclass Backup::QuantityBasedExpiry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1beta.Backup.QuantityBasedExpiry").msgclass diff --git a/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/gemini.rb b/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/gemini.rb index 27cd34cfa041..45d8bd0161c0 100644 --- a/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/gemini.rb +++ b/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/gemini.rb @@ -21,27 +21,23 @@ module Google module Cloud module AlloyDB module V1beta - # Cluster level configuration parameters related to the Gemini in Databases - # add-on. + # Deprecated and unused. This message will be removed in the near future. # @!attribute [r] entitled + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] - # Output only. Whether the Gemini in Databases add-on is enabled for the - # cluster. It will be true only if the add-on has been enabled for the - # billing account corresponding to the cluster. Its status is toggled from - # the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs. + # Output only. Deprecated and unused. This field will be removed in the near + # future. class GeminiClusterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # Instance level configuration parameters related to the Gemini in Databases - # add-on. + # Deprecated and unused. This message will be removed in the near future. # @!attribute [r] entitled + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] - # Output only. Whether the Gemini in Databases add-on is enabled for the - # instance. It will be true only if the add-on has been enabled for the - # billing account corresponding to the instance. Its status is toggled from - # the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs. + # Output only. Deprecated and unused. This field will be removed in the near + # future. class GeminiInstanceConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/resources.rb b/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/resources.rb index befa715628e1..f29e2ad8d69e 100644 --- a/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/resources.rb +++ b/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/resources.rb @@ -282,12 +282,19 @@ class ContinuousBackupConfig # if ContinuousBackup is not enabled. # @!attribute [r] schedule # @return [::Array<::Google::Type::DayOfWeek>] - # Output only. Days of the week on which a continuous backup is taken. Output - # only field. Ignored if passed into the request. + # Output only. Days of the week on which a continuous backup is taken. # @!attribute [r] earliest_restorable_time # @return [::Google::Protobuf::Timestamp] - # Output only. The earliest restorable time that can be restored to. Output - # only field. + # Output only. The earliest restorable time that can be restored to. If + # continuous backups and recovery was recently enabled, the earliest + # restorable time is the creation time of the earliest eligible backup within + # this cluster's continuous backup recovery window. After a cluster has had + # continuous backups enabled for the duration of its recovery window, the + # earliest restorable time becomes "now minus the recovery window". For + # example, assuming a point in time recovery is attempted at 04/16/2025 + # 3:23:00PM with a 14d recovery window, the earliest restorable time would be + # 04/02/2025 3:23:00PM. This field is only visible if the + # CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided. class ContinuousBackupInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -326,6 +333,9 @@ class ContinuousBackupSource # @!attribute [rw] maintenance_windows # @return [::Array<::Google::Cloud::AlloyDB::V1beta::MaintenanceUpdatePolicy::MaintenanceWindow>] # Preferred windows to perform maintenance. Currently limited to 1. + # @!attribute [rw] deny_maintenance_periods + # @return [::Array<::Google::Cloud::AlloyDB::V1beta::MaintenanceUpdatePolicy::DenyMaintenancePeriod>] + # Periods to deny maintenance. Currently limited to 1. class MaintenanceUpdatePolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -342,6 +352,32 @@ class MaintenanceWindow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # DenyMaintenancePeriod definition. Excepting emergencies, maintenance + # will not be scheduled to start within this deny period. The start_date must + # be less than the end_date. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Deny period start date. + # This can be: + # * A full date, with non-zero year, month and day values OR + # * A month and day value, with a zero year for recurring + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Deny period end date. + # This can be: + # * A full date, with non-zero year, month and day values OR + # * A month and day value, with a zero year for recurring + # @!attribute [rw] time + # @return [::Google::Type::TimeOfDay] + # Time in UTC when the deny period starts on start_date and ends on + # end_date. This can be: + # * Full time OR + # * All zeros for 00:00:00 UTC + class DenyMaintenancePeriod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # MaintenanceSchedule stores the maintenance schedule generated from @@ -497,9 +533,10 @@ class MaintenanceSchedule # Output only. The maintenance schedule for the cluster, generated for a # specific rollout if a maintenance window is set. # @!attribute [rw] gemini_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::AlloyDB::V1beta::GeminiClusterConfig] - # Optional. Configuration parameters related to the Gemini in Databases - # add-on. + # Optional. Deprecated and unused. This field will be removed in the near + # future. # @!attribute [rw] subscription_type # @return [::Google::Cloud::AlloyDB::V1beta::SubscriptionType] # Optional. Subscription type of the cluster. @@ -514,6 +551,12 @@ class MaintenanceSchedule # "123/environment": "production", # "123/costCenter": "marketing" # ``` + # @!attribute [r] service_account_email + # @return [::String] + # Output only. AlloyDB per-cluster service agent email. This service account + # is created per-cluster per-project, and is different from that of the + # primary service agent which is created per-project. The service account + # naming format is subject to change. class Cluster include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -816,12 +859,25 @@ module ClusterType # @return [::Google::Cloud::AlloyDB::V1beta::Instance::InstanceNetworkConfig] # Optional. Instance-level network configuration. # @!attribute [rw] gemini_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::AlloyDB::V1beta::GeminiInstanceConfig] - # Optional. Configuration parameters related to the Gemini in Databases - # add-on. + # Optional. Deprecated and unused. This field will be removed in the near + # future. # @!attribute [r] outbound_public_ip_addresses # @return [::Array<::String>] # Output only. All outbound public IP addresses configured for the instance. + # @!attribute [rw] activation_policy + # @return [::Google::Cloud::AlloyDB::V1beta::Instance::ActivationPolicy] + # Optional. Specifies whether an instance needs to spin up. Once the instance + # is active, the activation policy can be updated to the `NEVER` to stop the + # instance. Likewise, the activation policy can be updated to `ALWAYS` to + # start the instance. + # There are restrictions around when an instance can/cannot be activated (for + # example, a read pool instance should be stopped before stopping primary + # etc.). Please refer to the API documentation for more details. + # @!attribute [rw] connection_pool_config + # @return [::Google::Cloud::AlloyDB::V1beta::Instance::ConnectionPoolConfig] + # Optional. The configuration for Managed Connection Pool (MCP). # @!attribute [r] gca_config # @return [::Google::Cloud::AlloyDB::V1beta::GCAInstanceConfig] # Output only. Configuration parameters related to Gemini Cloud Assist. @@ -930,6 +986,9 @@ class QueryInsightsInstanceConfig # @return [::Boolean] # Track client address for an instance. # If not set, default value is "off". + # @!attribute [rw] assistive_experiences_enabled + # @return [::Boolean] + # Whether assistive experiences are enabled for this AlloyDB instance. class ObservabilityInstanceConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1010,9 +1069,33 @@ class PscInterfaceConfig # @!attribute [r] status # @return [::String] # Output only. The status of the PSC service automation connection. + # Possible values: + # "STATE_UNSPECIFIED" - An invalid state as the default case. + # "ACTIVE" - The connection has been created successfully. + # "FAILED" - The connection is not functional since some resources on the + # connection fail to be created. + # "CREATING" - The connection is being created. + # "DELETING" - The connection is being deleted. + # "CREATE_REPAIRING" - The connection is being repaired to complete + # creation. + # "DELETE_REPAIRING" - The connection is being repaired to complete + # deletion. # @!attribute [r] consumer_network_status # @return [::String] # Output only. The status of the service connection policy. + # Possible values: + # "STATE_UNSPECIFIED" - Default state, when Connection Map is created + # initially. + # "VALID" - Set when policy and map configuration is valid, and their + # matching can lead to allowing creation of PSC Connections subject to + # other constraints like connections limit. + # "CONNECTION_POLICY_MISSING" - No Service Connection Policy found for + # this network and Service Class + # "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for + # this network and Service Class + # "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer instance + # project is not in AllowedGoogleProducersResourceHierarchyLevels of the + # matching ServiceConnectionPolicy. class PscAutoConnectionConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1059,6 +1142,22 @@ class PscInstanceConfig # @return [::Boolean] # Optional. Enabling an outbound public IP address to support a database # server sending requests out into the internet. + # @!attribute [r] network + # @return [::String] + # Output only. The resource link for the VPC network in which instance + # resources are created and from which they are accessible via Private IP. + # This will be the same value as the parent cluster's network. It is + # specified in the form: // + # `projects/{project_number}/global/networks/{network_id}`. + # @!attribute [rw] allocated_ip_range_override + # @return [::String] + # Optional. Name of the allocated IP range for the private IP AlloyDB + # instance, for example: "google-managed-services-default". If set, the + # instance IPs will be created from this allocated range and will override + # the IP range used by the parent cluster. The range name must comply with + # [RFC 1035](http://datatracker.ietf.org/doc/html/rfc1035). Specifically, + # the name must be 1-63 characters long and match the regular expression + # [a-z]([-a-z0-9]*[a-z0-9])?. class InstanceNetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1073,6 +1172,39 @@ class AuthorizedNetwork end end + # Configuration for Managed Connection Pool (MCP). + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Whether to enable Managed Connection Pool (MCP). + # @!attribute [rw] flags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Connection Pool flags, as a list of "key": "value" pairs. + class ConnectionPoolConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class FlagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The pool mode. Defaults to `POOL_MODE_TRANSACTION`. + module PoolMode + # The pool mode is not specified. Defaults to `POOL_MODE_TRANSACTION`. + POOL_MODE_UNSPECIFIED = 0 + + # Server is released back to pool after a client disconnects. + POOL_MODE_SESSION = 1 + + # Server is released back to pool after a transaction finishes. + POOL_MODE_TRANSACTION = 2 + end + end + # @!attribute [rw] key # @return [::String] # @!attribute [rw] value @@ -1172,6 +1304,18 @@ module AvailabilityType # Regional (or Highly) available instance. REGIONAL = 2 end + + # Specifies whether an instance needs to spin up. + module ActivationPolicy + # The policy is not specified. + ACTIVATION_POLICY_UNSPECIFIED = 0 + + # The instance is running. + ALWAYS = 1 + + # The instance is not running. + NEVER = 2 + end end # ConnectionInfo singleton resource. @@ -1232,9 +1376,15 @@ class ConnectionInfo # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. Update time stamp + # + # Users should not infer any meaning from this field. Its value is generally + # unrelated to the timing of the backup creation operation. # @!attribute [r] delete_time # @return [::Google::Protobuf::Timestamp] # Output only. Delete time stamp + # @!attribute [r] create_completion_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource finished being created. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Labels as key value pairs diff --git a/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/service.rb b/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/service.rb index 5d66698790a1..0ec91511eb5f 100644 --- a/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/service.rb +++ b/google-cloud-alloy_db-v1beta/proto_docs/google/cloud/alloydb/v1beta/service.rb @@ -429,7 +429,7 @@ class StageInfo extend ::Google::Protobuf::MessageExts::ClassMethods end - # Details regarding the upgrade of instaces associated with a cluster. + # Details regarding the upgrade of instances associated with a cluster. # @!attribute [rw] name # @return [::String] # Normalized name of the instance. @@ -630,6 +630,7 @@ class PromoteClusterRequest # Message for restoring a Cluster from a backup or another cluster at a given # point in time. + # NEXT_ID: 11 # @!attribute [rw] backup_source # @return [::Google::Cloud::AlloyDB::V1beta::BackupSource] # Backup source. diff --git a/google-cloud-alloy_db-v1beta/proto_docs/google/type/date.rb b/google-cloud-alloy_db-v1beta/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..2f4a77319e09 --- /dev/null +++ b/google-cloud-alloy_db-v1beta/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are {::Google::Type::TimeOfDay google.type.TimeOfDay} and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-alloy_db-v1beta/proto_docs/google/type/timeofday.rb b/google-cloud-alloy_db-v1beta/proto_docs/google/type/timeofday.rb index 048a1ecaf8f0..b288b1b61f57 100644 --- a/google-cloud-alloy_db-v1beta/proto_docs/google/type/timeofday.rb +++ b/google-cloud-alloy_db-v1beta/proto_docs/google/type/timeofday.rb @@ -21,7 +21,7 @@ module Google module Type # Represents a time of day. The date and time zone are either not significant # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are [google.type.Date][google.type.Date] and + # types are {::Google::Type::Date google.type.Date} and # `google.protobuf.Timestamp`. # @!attribute [rw] hours # @return [::Integer] From dfc1effc7772fe1a850c746e4a34f6bb878699ee Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:05:48 -0700 Subject: [PATCH 121/457] feat(alloydb-v1): Support instance activation policy feat(alloydb-v1): Support deny maintenance periods feat(alloydb-v1): Additional instance network configs --- .../.owlbot-manifest.json | 1 + .../google/cloud/alloydb/v1/resources_pb.rb | 6 +- .../google/cloud/alloydb/v1/resources.rb | 111 +++++++++++++++++- .../google/cloud/alloydb/v1/service.rb | 3 +- .../proto_docs/google/type/date.rb | 53 +++++++++ .../proto_docs/google/type/timeofday.rb | 2 +- 6 files changed, 169 insertions(+), 7 deletions(-) create mode 100644 google-cloud-alloy_db-v1/proto_docs/google/type/date.rb diff --git a/google-cloud-alloy_db-v1/.owlbot-manifest.json b/google-cloud-alloy_db-v1/.owlbot-manifest.json index c0d41793d801..7d9672d859e3 100644 --- a/google-cloud-alloy_db-v1/.owlbot-manifest.json +++ b/google-cloud-alloy_db-v1/.owlbot-manifest.json @@ -62,6 +62,7 @@ "proto_docs/google/protobuf/timestamp.rb", "proto_docs/google/protobuf/wrappers.rb", "proto_docs/google/rpc/status.rb", + "proto_docs/google/type/date.rb", "proto_docs/google/type/dayofweek.rb", "proto_docs/google/type/expr.rb", "proto_docs/google/type/timeofday.rb", diff --git a/google-cloud-alloy_db-v1/lib/google/cloud/alloydb/v1/resources_pb.rb b/google-cloud-alloy_db-v1/lib/google/cloud/alloydb/v1/resources_pb.rb index f1a055c89478..4ef612228720 100644 --- a/google-cloud-alloy_db-v1/lib/google/cloud/alloydb/v1/resources_pb.rb +++ b/google-cloud-alloy_db-v1/lib/google/cloud/alloydb/v1/resources_pb.rb @@ -11,11 +11,12 @@ require 'google/protobuf/duration_pb' require 'google/protobuf/timestamp_pb' require 'google/protobuf/wrappers_pb' +require 'google/type/date_pb' require 'google/type/dayofweek_pb' require 'google/type/timeofday_pb' -descriptor_data = "\n\'google/cloud/alloydb/v1/resources.proto\x12\x17google.cloud.alloydb.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/alloydb/v1/csql_resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\".\n\x0cUserPassword\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xe3\x01\n\x0fMigrationSource\x12\x16\n\thost_port\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0creference_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12V\n\x0bsource_type\x18\x03 \x01(\x0e\x32<.google.cloud.alloydb.v1.MigrationSource.MigrationSourceTypeB\x03\xe0\x41\x03\"E\n\x13MigrationSourceType\x12%\n!MIGRATION_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44MS\x10\x01\"(\n\x10\x45ncryptionConfig\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\"\x86\x02\n\x0e\x45ncryptionInfo\x12J\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32,.google.cloud.alloydb.v1.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\xfe\x02\n\tSslConfig\x12\x41\n\x08ssl_mode\x18\x01 \x01(\x0e\x32*.google.cloud.alloydb.v1.SslConfig.SslModeB\x03\xe0\x41\x01\x12\x43\n\tca_source\x18\x02 \x01(\x0e\x32+.google.cloud.alloydb.v1.SslConfig.CaSourceB\x03\xe0\x41\x01\"\xaa\x01\n\x07SslMode\x12\x18\n\x14SSL_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x0eSSL_MODE_ALLOW\x10\x01\x1a\x02\x08\x01\x12\x18\n\x10SSL_MODE_REQUIRE\x10\x02\x1a\x02\x08\x01\x12\x1a\n\x12SSL_MODE_VERIFY_CA\x10\x03\x1a\x02\x08\x01\x12#\n\x1f\x41LLOW_UNENCRYPTED_AND_ENCRYPTED\x10\x04\x12\x12\n\x0e\x45NCRYPTED_ONLY\x10\x05\"<\n\x08\x43\x61Source\x12\x19\n\x15\x43\x41_SOURCE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43\x41_SOURCE_MANAGED\x10\x01\"\xe5\x06\n\x15\x41utomatedBackupPolicy\x12X\n\x0fweekly_schedule\x18\x02 \x01(\x0b\x32=.google.cloud.alloydb.v1.AutomatedBackupPolicy.WeeklyScheduleH\x00\x12\x61\n\x14time_based_retention\x18\x04 \x01(\x0b\x32\x41.google.cloud.alloydb.v1.AutomatedBackupPolicy.TimeBasedRetentionH\x01\x12i\n\x18quantity_based_retention\x18\x05 \x01(\x0b\x32\x45.google.cloud.alloydb.v1.AutomatedBackupPolicy.QuantityBasedRetentionH\x01\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x02\x88\x01\x01\x12\x30\n\rbackup_window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12I\n\x11\x65ncryption_config\x18\x08 \x01(\x0b\x32).google.cloud.alloydb.v1.EncryptionConfigB\x03\xe0\x41\x01\x12\x10\n\x08location\x18\x06 \x01(\t\x12J\n\x06labels\x18\x07 \x03(\x0b\x32:.google.cloud.alloydb.v1.AutomatedBackupPolicy.LabelsEntry\x1ak\n\x0eWeeklySchedule\x12+\n\x0bstart_times\x18\x01 \x03(\x0b\x32\x16.google.type.TimeOfDay\x12,\n\x0c\x64\x61ys_of_week\x18\x02 \x03(\x0e\x32\x16.google.type.DayOfWeek\x1aI\n\x12TimeBasedRetention\x12\x33\n\x10retention_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\'\n\x16QuantityBasedRetention\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08scheduleB\x0b\n\tretentionB\n\n\x08_enabled\"\x9e\x01\n\x16\x43ontinuousBackupConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x14recovery_window_days\x18\x04 \x01(\x05\x12\x44\n\x11\x65ncryption_config\x18\x03 \x01(\x0b\x32).google.cloud.alloydb.v1.EncryptionConfigB\n\n\x08_enabled\"\x86\x02\n\x14\x43ontinuousBackupInfo\x12\x45\n\x0f\x65ncryption_info\x18\x01 \x01(\x0b\x32\'.google.cloud.alloydb.v1.EncryptionInfoB\x03\xe0\x41\x03\x12\x35\n\x0c\x65nabled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x08schedule\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x03\x12\x41\n\x18\x65\x61rliest_restorable_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"c\n\x0c\x42\x61\x63kupSource\x12\x17\n\nbackup_uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x62\x61\x63kup_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61lloydb.googleapis.com/Backup\"f\n\x16\x43ontinuousBackupSource\x12\x14\n\x07\x63luster\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\rpoint_in_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xe0\x01\n\x17MaintenanceUpdatePolicy\x12_\n\x13maintenance_windows\x18\x01 \x03(\x0b\x32\x42.google.cloud.alloydb.v1.MaintenanceUpdatePolicy.MaintenanceWindow\x1a\x64\n\x11MaintenanceWindow\x12#\n\x03\x64\x61y\x18\x01 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12*\n\nstart_time\x18\x02 \x01(\x0b\x32\x16.google.type.TimeOfDay\"J\n\x13MaintenanceSchedule\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xda\x18\n\x07\x43luster\x12\x43\n\rbackup_source\x18\x0f \x01(\x0b\x32%.google.cloud.alloydb.v1.BackupSourceB\x03\xe0\x41\x03H\x00\x12I\n\x10migration_source\x18\x10 \x01(\x0b\x32(.google.cloud.alloydb.v1.MigrationSourceB\x03\xe0\x41\x03H\x00\x12[\n\x1a\x63loudsql_backup_run_source\x18* \x01(\x0b\x32\x30.google.cloud.alloydb.v1.CloudSQLBackupRunSourceB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x06labels\x18\x07 \x03(\x0b\x32,.google.cloud.alloydb.v1.Cluster.LabelsEntry\x12:\n\x05state\x18\x08 \x01(\x0e\x32&.google.cloud.alloydb.v1.Cluster.StateB\x03\xe0\x41\x03\x12G\n\x0c\x63luster_type\x18\x18 \x01(\x0e\x32,.google.cloud.alloydb.v1.Cluster.ClusterTypeB\x03\xe0\x41\x03\x12G\n\x10\x64\x61tabase_version\x18\t \x01(\x0e\x32(.google.cloud.alloydb.v1.DatabaseVersionB\x03\xe0\x41\x01\x12K\n\x0enetwork_config\x18\x1d \x01(\x0b\x32..google.cloud.alloydb.v1.Cluster.NetworkConfigB\x03\xe0\x41\x01\x12\x39\n\x07network\x18\n \x01(\tB(\x18\x01\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x0c\n\x04\x65tag\x18\x0b \x01(\t\x12\x46\n\x0b\x61nnotations\x18\x0c \x03(\x0b\x32\x31.google.cloud.alloydb.v1.Cluster.AnnotationsEntry\x12\x18\n\x0breconciling\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12@\n\x0cinitial_user\x18\x0e \x01(\x0b\x32%.google.cloud.alloydb.v1.UserPasswordB\x03\xe0\x41\x04\x12O\n\x17\x61utomated_backup_policy\x18\x11 \x01(\x0b\x32..google.cloud.alloydb.v1.AutomatedBackupPolicy\x12:\n\nssl_config\x18\x12 \x01(\x0b\x32\".google.cloud.alloydb.v1.SslConfigB\x02\x18\x01\x12I\n\x11\x65ncryption_config\x18\x13 \x01(\x0b\x32).google.cloud.alloydb.v1.EncryptionConfigB\x03\xe0\x41\x01\x12\x45\n\x0f\x65ncryption_info\x18\x14 \x01(\x0b\x32\'.google.cloud.alloydb.v1.EncryptionInfoB\x03\xe0\x41\x03\x12V\n\x18\x63ontinuous_backup_config\x18\x1b \x01(\x0b\x32/.google.cloud.alloydb.v1.ContinuousBackupConfigB\x03\xe0\x41\x01\x12R\n\x16\x63ontinuous_backup_info\x18\x1c \x01(\x0b\x32-.google.cloud.alloydb.v1.ContinuousBackupInfoB\x03\xe0\x41\x03\x12J\n\x10secondary_config\x18\x16 \x01(\x0b\x32\x30.google.cloud.alloydb.v1.Cluster.SecondaryConfig\x12K\n\x0eprimary_config\x18\x17 \x01(\x0b\x32..google.cloud.alloydb.v1.Cluster.PrimaryConfigB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12\x43\n\npsc_config\x18\x1f \x01(\x0b\x32*.google.cloud.alloydb.v1.Cluster.PscConfigB\x03\xe0\x41\x01\x12X\n\x19maintenance_update_policy\x18 \x01(\x0b\x32\x30.google.cloud.alloydb.v1.MaintenanceUpdatePolicyB\x03\xe0\x41\x01\x12O\n\x14maintenance_schedule\x18% \x01(\x0b\x32,.google.cloud.alloydb.v1.MaintenanceScheduleB\x03\xe0\x41\x03\x12I\n\x11subscription_type\x18& \x01(\x0e\x32).google.cloud.alloydb.v1.SubscriptionTypeB\x03\xe0\x41\x01\x12K\n\x0etrial_metadata\x18\' \x01(\x0b\x32..google.cloud.alloydb.v1.Cluster.TrialMetadataB\x03\xe0\x41\x03\x12\x43\n\x04tags\x18) \x03(\x0b\x32*.google.cloud.alloydb.v1.Cluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1ai\n\rNetworkConfig\x12\x37\n\x07network\x18\x01 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1f\n\x12\x61llocated_ip_range\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a/\n\x0fSecondaryConfig\x12\x1c\n\x14primary_cluster_name\x18\x01 \x01(\t\x1a\x35\n\rPrimaryConfig\x12$\n\x17secondary_cluster_names\x18\x01 \x03(\tB\x03\xe0\x41\x03\x1aP\n\tPscConfig\x12\x18\n\x0bpsc_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1cservice_owned_project_number\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a\xd3\x01\n\rTrialMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cupgrade_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0egrace_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\t\n\x05\x45MPTY\x10\x03\x12\x0c\n\x08\x43REATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x07\x12\x0f\n\x0bMAINTENANCE\x10\x08\x12\r\n\tPROMOTING\x10\t\"G\n\x0b\x43lusterType\x12\x1c\n\x18\x43LUSTER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02:u\xea\x41r\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterR\x01\x01\x42\x08\n\x06source\"\xe9\x1f\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06labels\x18\x07 \x03(\x0b\x32-.google.cloud.alloydb.v1.Instance.LabelsEntry\x12;\n\x05state\x18\x08 \x01(\x0e\x32\'.google.cloud.alloydb.v1.Instance.StateB\x03\xe0\x41\x03\x12J\n\rinstance_type\x18\t \x01(\x0e\x32..google.cloud.alloydb.v1.Instance.InstanceTypeB\x03\xe0\x41\x02\x12G\n\x0emachine_config\x18\n \x01(\x0b\x32/.google.cloud.alloydb.v1.Instance.MachineConfig\x12M\n\x11\x61vailability_type\x18\x0b \x01(\x0e\x32\x32.google.cloud.alloydb.v1.Instance.AvailabilityType\x12\x10\n\x08gce_zone\x18\x0c \x01(\t\x12L\n\x0e\x64\x61tabase_flags\x18\r \x03(\x0b\x32\x34.google.cloud.alloydb.v1.Instance.DatabaseFlagsEntry\x12\x42\n\rwritable_node\x18\x13 \x01(\x0b\x32&.google.cloud.alloydb.v1.Instance.NodeB\x03\xe0\x41\x03\x12:\n\x05nodes\x18\x14 \x03(\x0b\x32&.google.cloud.alloydb.v1.Instance.NodeB\x03\xe0\x41\x03\x12\\\n\x15query_insights_config\x18\x15 \x01(\x0b\x32=.google.cloud.alloydb.v1.Instance.QueryInsightsInstanceConfig\x12[\n\x14observability_config\x18\x1a \x01(\x0b\x32=.google.cloud.alloydb.v1.Instance.ObservabilityInstanceConfig\x12J\n\x10read_pool_config\x18\x0e \x01(\x0b\x32\x30.google.cloud.alloydb.v1.Instance.ReadPoolConfig\x12\x17\n\nip_address\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x1b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12G\n\x0b\x61nnotations\x18\x12 \x03(\x0b\x32\x32.google.cloud.alloydb.v1.Instance.AnnotationsEntry\x12_\n\x18\x63lient_connection_config\x18\x17 \x01(\x0b\x32\x38.google.cloud.alloydb.v1.Instance.ClientConnectionConfigB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x03\xe0\x41\x03\x12U\n\x13psc_instance_config\x18\x1c \x01(\x0b\x32\x33.google.cloud.alloydb.v1.Instance.PscInstanceConfigB\x03\xe0\x41\x01\x12T\n\x0enetwork_config\x18\x1d \x01(\x0b\x32\x37.google.cloud.alloydb.v1.Instance.InstanceNetworkConfigB\x03\xe0\x41\x01\x12\x31\n\x1coutbound_public_ip_addresses\x18\" \x03(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x1a\x38\n\rMachineConfig\x12\x11\n\tcpu_count\x18\x01 \x01(\x05\x12\x14\n\x0cmachine_type\x18\x04 \x01(\t\x1aR\n\x04Node\x12\x14\n\x07zone_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02ip\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05state\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\xfa\x01\n\x1bQueryInsightsInstanceConfig\x12$\n\x17record_application_tags\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15record_client_address\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x13query_string_length\x18\x04 \x01(\r\x12#\n\x16query_plans_per_minute\x18\x05 \x01(\rH\x02\x88\x01\x01\x42\x1a\n\x18_record_application_tagsB\x18\n\x16_record_client_addressB\x19\n\x17_query_plans_per_minute\x1a\xf0\x03\n\x1bObservabilityInstanceConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1e\n\x11preserve_comments\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11track_wait_events\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x16track_wait_event_types\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12$\n\x17max_query_string_length\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12$\n\x17record_application_tags\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12#\n\x16query_plans_per_minute\x18\x07 \x01(\x05H\x06\x88\x01\x01\x12!\n\x14track_active_queries\x18\x08 \x01(\x08H\x07\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_preserve_commentsB\x14\n\x12_track_wait_eventsB\x19\n\x17_track_wait_event_typesB\x1a\n\x18_max_query_string_lengthB\x1a\n\x18_record_application_tagsB\x19\n\x17_query_plans_per_minuteB\x17\n\x15_track_active_queries\x1a$\n\x0eReadPoolConfig\x12\x12\n\nnode_count\x18\x01 \x01(\x05\x1av\n\x16\x43lientConnectionConfig\x12\x1f\n\x12require_connectors\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12;\n\nssl_config\x18\x02 \x01(\x0b\x32\".google.cloud.alloydb.v1.SslConfigB\x03\xe0\x41\x01\x1a\x39\n\x12PscInterfaceConfig\x12#\n\x1bnetwork_attachment_resource\x18\x01 \x01(\t\x1a\xa9\x01\n\x17PscAutoConnectionConfig\x12\x18\n\x10\x63onsumer_project\x18\x01 \x01(\t\x12\x18\n\x10\x63onsumer_network\x18\x02 \x01(\t\x12\x1f\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x13\n\x06status\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x63onsumer_network_status\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a\xb4\x02\n\x11PscInstanceConfig\x12$\n\x17service_attachment_link\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x61llowed_consumer_projects\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpsc_dns_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12X\n\x15psc_interface_configs\x18\x08 \x03(\x0b\x32\x34.google.cloud.alloydb.v1.Instance.PscInterfaceConfigB\x03\xe0\x41\x01\x12\\\n\x14psc_auto_connections\x18\t \x03(\x0b\x32\x39.google.cloud.alloydb.v1.Instance.PscAutoConnectionConfigB\x03\xe0\x41\x01\x1a\x87\x02\n\x15InstanceNetworkConfig\x12t\n\x1c\x61uthorized_external_networks\x18\x01 \x03(\x0b\x32I.google.cloud.alloydb.v1.Instance.InstanceNetworkConfig.AuthorizedNetworkB\x03\xe0\x41\x01\x12\x1d\n\x10\x65nable_public_ip\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x65nable_outbound_public_ip\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x11\x41uthorizedNetwork\x12\x1c\n\ncidr_range\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x44\x61tabaseFlagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\x0c\n\x08\x43REATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0f\n\x0bMAINTENANCE\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x08\x12\r\n\tPROMOTING\x10\t\"X\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tREAD_POOL\x10\x02\x12\r\n\tSECONDARY\x10\x03\"N\n\x10\x41vailabilityType\x12!\n\x1d\x41VAILABILITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Instance\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}*\tinstances2\x08instanceR\x01\x01\"\xa9\x02\n\x0e\x43onnectionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\nip_address\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x05 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x19\n\x0cinstance_uid\x18\x04 \x01(\tB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n%alloydb.googleapis.com/ConnectionInfo\x12^projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}/connectionInfo*\x0f\x63onnectionInfos2\x0e\x63onnectionInfo\"\xc4\x0c\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x06labels\x18\x06 \x03(\x0b\x32+.google.cloud.alloydb.v1.Backup.LabelsEntry\x12\x39\n\x05state\x18\x07 \x01(\x0e\x32%.google.cloud.alloydb.v1.Backup.StateB\x03\xe0\x41\x03\x12\x32\n\x04type\x18\x08 \x01(\x0e\x32$.google.cloud.alloydb.v1.Backup.Type\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x18\n\x0b\x63luster_uid\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12<\n\x0c\x63luster_name\x18\n \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\x12\x18\n\x0breconciling\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12I\n\x11\x65ncryption_config\x18\x0c \x01(\x0b\x32).google.cloud.alloydb.v1.EncryptionConfigB\x03\xe0\x41\x01\x12\x45\n\x0f\x65ncryption_info\x18\r \x01(\x0b\x32\'.google.cloud.alloydb.v1.EncryptionInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12\x45\n\x0b\x61nnotations\x18\x10 \x03(\x0b\x32\x30.google.cloud.alloydb.v1.Backup.AnnotationsEntry\x12\x17\n\nsize_bytes\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpiry_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x0f\x65xpiry_quantity\x18\x14 \x01(\x0b\x32\x33.google.cloud.alloydb.v1.Backup.QuantityBasedExpiryB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12G\n\x10\x64\x61tabase_version\x18\x16 \x01(\x0e\x32(.google.cloud.alloydb.v1.DatabaseVersionB\x03\xe0\x41\x03\x12\x42\n\x04tags\x18\x19 \x03(\x0b\x32).google.cloud.alloydb.v1.Backup.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1aW\n\x13QuantityBasedExpiry\x12\x1c\n\x0fretention_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\"\n\x15total_retention_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tAUTOMATED\x10\x02\x12\x0e\n\nCONTINUOUS\x10\x03:p\xea\x41m\n\x1d\x61lloydb.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupR\x01\x01\"\xfc\x08\n\x15SupportedDatabaseFlag\x12`\n\x13string_restrictions\x18\x07 \x01(\x0b\x32\x41.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictionsH\x00\x12\x62\n\x14integer_restrictions\x18\x08 \x01(\x0b\x32\x42.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictionsH\x00\x12\"\n\x18recommended_string_value\x18\n \x01(\tH\x01\x12@\n\x19recommended_integer_value\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tflag_name\x18\x02 \x01(\t\x12L\n\nvalue_type\x18\x03 \x01(\x0e\x32\x38.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType\x12\x1f\n\x17\x61\x63\x63\x65pts_multiple_values\x18\x04 \x01(\x08\x12G\n\x15supported_db_versions\x18\x05 \x03(\x0e\x32(.google.cloud.alloydb.v1.DatabaseVersion\x12\x1b\n\x13requires_db_restart\x18\x06 \x01(\x08\x12\x43\n\x05scope\x18\t \x01(\x0e\x32\x34.google.cloud.alloydb.v1.SupportedDatabaseFlag.Scope\x1a,\n\x12StringRestrictions\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x1au\n\x13IntegerRestrictions\x12.\n\tmin_value\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12.\n\tmax_value\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"U\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\t\n\x05\x46LOAT\x10\x03\x12\x08\n\x04NONE\x10\x04\"A\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\x13\n\x0f\x43ONNECTION_POOL\x10\x02:\x97\x01\xea\x41\x93\x01\n,alloydb.googleapis.com/SupportedDatabaseFlag\x12\x34projects/{project}/locations/{location}/flags/{flag}*\x16supportedDatabaseFlags2\x15supportedDatabaseFlagB\x0e\n\x0crestrictionsB\x13\n\x11recommended_value\"\xfa\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08password\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x1b\n\x0e\x64\x61tabase_roles\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12>\n\tuser_type\x18\x05 \x01(\x0e\x32&.google.cloud.alloydb.v1.User.UserTypeB\x03\xe0\x41\x01\x12\x1d\n\x10keep_extra_roles\x18\x06 \x01(\x08\x42\x03\xe0\x41\x04\"Q\n\x08UserType\x12\x19\n\x15USER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41LLOYDB_BUILT_IN\x10\x01\x12\x14\n\x10\x41LLOYDB_IAM_USER\x10\x02:y\xea\x41v\n\x1b\x61lloydb.googleapis.com/User\x12Gprojects/{project}/locations/{location}/clusters/{cluster}/users/{user}*\x05users2\x04userR\x01\x01\"\xdc\x01\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x63harset\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcollation\x18\x03 \x01(\tB\x03\xe0\x41\x01:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Database\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/databases/{database}*\tdatabases2\x08\x64\x61tabaseR\x01\x01*^\n\x0cInstanceView\x12\x1d\n\x19INSTANCE_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13INSTANCE_VIEW_BASIC\x10\x01\x12\x16\n\x12INSTANCE_VIEW_FULL\x10\x02*g\n\x0b\x43lusterView\x12\x1c\n\x18\x43LUSTER_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LUSTER_VIEW_BASIC\x10\x01\x12\"\n\x1e\x43LUSTER_VIEW_CONTINUOUS_BACKUP\x10\x02*{\n\x0f\x44\x61tabaseVersion\x12 \n\x1c\x44\x41TABASE_VERSION_UNSPECIFIED\x10\x00\x12\x13\n\x0bPOSTGRES_13\x10\x01\x1a\x02\x08\x01\x12\x0f\n\x0bPOSTGRES_14\x10\x02\x12\x0f\n\x0bPOSTGRES_15\x10\x03\x12\x0f\n\x0bPOSTGRES_16\x10\x04*N\n\x10SubscriptionType\x12!\n\x1dSUBSCRIPTION_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05TRIAL\x10\x02\x42\xb2\x03\n\x1b\x63om.google.cloud.alloydb.v1B\x0eResourcesProtoP\x01Z5cloud.google.com/go/alloydb/apiv1/alloydbpb;alloydbpb\xaa\x02\x17Google.Cloud.AlloyDb.V1\xca\x02\x17Google\\Cloud\\AlloyDb\\V1\xea\x02\x1aGoogle::Cloud::AlloyDB::V1\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" +descriptor_data = "\n\'google/cloud/alloydb/v1/resources.proto\x12\x17google.cloud.alloydb.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/alloydb/v1/csql_resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\".\n\x0cUserPassword\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xe3\x01\n\x0fMigrationSource\x12\x16\n\thost_port\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0creference_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12V\n\x0bsource_type\x18\x03 \x01(\x0e\x32<.google.cloud.alloydb.v1.MigrationSource.MigrationSourceTypeB\x03\xe0\x41\x03\"E\n\x13MigrationSourceType\x12%\n!MIGRATION_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44MS\x10\x01\"(\n\x10\x45ncryptionConfig\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\"\x86\x02\n\x0e\x45ncryptionInfo\x12J\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32,.google.cloud.alloydb.v1.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\xfe\x02\n\tSslConfig\x12\x41\n\x08ssl_mode\x18\x01 \x01(\x0e\x32*.google.cloud.alloydb.v1.SslConfig.SslModeB\x03\xe0\x41\x01\x12\x43\n\tca_source\x18\x02 \x01(\x0e\x32+.google.cloud.alloydb.v1.SslConfig.CaSourceB\x03\xe0\x41\x01\"\xaa\x01\n\x07SslMode\x12\x18\n\x14SSL_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x0eSSL_MODE_ALLOW\x10\x01\x1a\x02\x08\x01\x12\x18\n\x10SSL_MODE_REQUIRE\x10\x02\x1a\x02\x08\x01\x12\x1a\n\x12SSL_MODE_VERIFY_CA\x10\x03\x1a\x02\x08\x01\x12#\n\x1f\x41LLOW_UNENCRYPTED_AND_ENCRYPTED\x10\x04\x12\x12\n\x0e\x45NCRYPTED_ONLY\x10\x05\"<\n\x08\x43\x61Source\x12\x19\n\x15\x43\x41_SOURCE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43\x41_SOURCE_MANAGED\x10\x01\"\xe5\x06\n\x15\x41utomatedBackupPolicy\x12X\n\x0fweekly_schedule\x18\x02 \x01(\x0b\x32=.google.cloud.alloydb.v1.AutomatedBackupPolicy.WeeklyScheduleH\x00\x12\x61\n\x14time_based_retention\x18\x04 \x01(\x0b\x32\x41.google.cloud.alloydb.v1.AutomatedBackupPolicy.TimeBasedRetentionH\x01\x12i\n\x18quantity_based_retention\x18\x05 \x01(\x0b\x32\x45.google.cloud.alloydb.v1.AutomatedBackupPolicy.QuantityBasedRetentionH\x01\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x02\x88\x01\x01\x12\x30\n\rbackup_window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12I\n\x11\x65ncryption_config\x18\x08 \x01(\x0b\x32).google.cloud.alloydb.v1.EncryptionConfigB\x03\xe0\x41\x01\x12\x10\n\x08location\x18\x06 \x01(\t\x12J\n\x06labels\x18\x07 \x03(\x0b\x32:.google.cloud.alloydb.v1.AutomatedBackupPolicy.LabelsEntry\x1ak\n\x0eWeeklySchedule\x12+\n\x0bstart_times\x18\x01 \x03(\x0b\x32\x16.google.type.TimeOfDay\x12,\n\x0c\x64\x61ys_of_week\x18\x02 \x03(\x0e\x32\x16.google.type.DayOfWeek\x1aI\n\x12TimeBasedRetention\x12\x33\n\x10retention_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\'\n\x16QuantityBasedRetention\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08scheduleB\x0b\n\tretentionB\n\n\x08_enabled\"\x9e\x01\n\x16\x43ontinuousBackupConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x14recovery_window_days\x18\x04 \x01(\x05\x12\x44\n\x11\x65ncryption_config\x18\x03 \x01(\x0b\x32).google.cloud.alloydb.v1.EncryptionConfigB\n\n\x08_enabled\"\x86\x02\n\x14\x43ontinuousBackupInfo\x12\x45\n\x0f\x65ncryption_info\x18\x01 \x01(\x0b\x32\'.google.cloud.alloydb.v1.EncryptionInfoB\x03\xe0\x41\x03\x12\x35\n\x0c\x65nabled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x08schedule\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x03\x12\x41\n\x18\x65\x61rliest_restorable_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"c\n\x0c\x42\x61\x63kupSource\x12\x17\n\nbackup_uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x62\x61\x63kup_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61lloydb.googleapis.com/Backup\"f\n\x16\x43ontinuousBackupSource\x12\x14\n\x07\x63luster\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\rpoint_in_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xd6\x03\n\x17MaintenanceUpdatePolicy\x12_\n\x13maintenance_windows\x18\x01 \x03(\x0b\x32\x42.google.cloud.alloydb.v1.MaintenanceUpdatePolicy.MaintenanceWindow\x12h\n\x18\x64\x65ny_maintenance_periods\x18\x02 \x03(\x0b\x32\x46.google.cloud.alloydb.v1.MaintenanceUpdatePolicy.DenyMaintenancePeriod\x1a\x64\n\x11MaintenanceWindow\x12#\n\x03\x64\x61y\x18\x01 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12*\n\nstart_time\x18\x02 \x01(\x0b\x32\x16.google.type.TimeOfDay\x1a\x89\x01\n\x15\x44\x65nyMaintenancePeriod\x12%\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12#\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\"J\n\x13MaintenanceSchedule\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xda\x18\n\x07\x43luster\x12\x43\n\rbackup_source\x18\x0f \x01(\x0b\x32%.google.cloud.alloydb.v1.BackupSourceB\x03\xe0\x41\x03H\x00\x12I\n\x10migration_source\x18\x10 \x01(\x0b\x32(.google.cloud.alloydb.v1.MigrationSourceB\x03\xe0\x41\x03H\x00\x12[\n\x1a\x63loudsql_backup_run_source\x18* \x01(\x0b\x32\x30.google.cloud.alloydb.v1.CloudSQLBackupRunSourceB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x06labels\x18\x07 \x03(\x0b\x32,.google.cloud.alloydb.v1.Cluster.LabelsEntry\x12:\n\x05state\x18\x08 \x01(\x0e\x32&.google.cloud.alloydb.v1.Cluster.StateB\x03\xe0\x41\x03\x12G\n\x0c\x63luster_type\x18\x18 \x01(\x0e\x32,.google.cloud.alloydb.v1.Cluster.ClusterTypeB\x03\xe0\x41\x03\x12G\n\x10\x64\x61tabase_version\x18\t \x01(\x0e\x32(.google.cloud.alloydb.v1.DatabaseVersionB\x03\xe0\x41\x01\x12K\n\x0enetwork_config\x18\x1d \x01(\x0b\x32..google.cloud.alloydb.v1.Cluster.NetworkConfigB\x03\xe0\x41\x01\x12\x39\n\x07network\x18\n \x01(\tB(\x18\x01\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x0c\n\x04\x65tag\x18\x0b \x01(\t\x12\x46\n\x0b\x61nnotations\x18\x0c \x03(\x0b\x32\x31.google.cloud.alloydb.v1.Cluster.AnnotationsEntry\x12\x18\n\x0breconciling\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12@\n\x0cinitial_user\x18\x0e \x01(\x0b\x32%.google.cloud.alloydb.v1.UserPasswordB\x03\xe0\x41\x04\x12O\n\x17\x61utomated_backup_policy\x18\x11 \x01(\x0b\x32..google.cloud.alloydb.v1.AutomatedBackupPolicy\x12:\n\nssl_config\x18\x12 \x01(\x0b\x32\".google.cloud.alloydb.v1.SslConfigB\x02\x18\x01\x12I\n\x11\x65ncryption_config\x18\x13 \x01(\x0b\x32).google.cloud.alloydb.v1.EncryptionConfigB\x03\xe0\x41\x01\x12\x45\n\x0f\x65ncryption_info\x18\x14 \x01(\x0b\x32\'.google.cloud.alloydb.v1.EncryptionInfoB\x03\xe0\x41\x03\x12V\n\x18\x63ontinuous_backup_config\x18\x1b \x01(\x0b\x32/.google.cloud.alloydb.v1.ContinuousBackupConfigB\x03\xe0\x41\x01\x12R\n\x16\x63ontinuous_backup_info\x18\x1c \x01(\x0b\x32-.google.cloud.alloydb.v1.ContinuousBackupInfoB\x03\xe0\x41\x03\x12J\n\x10secondary_config\x18\x16 \x01(\x0b\x32\x30.google.cloud.alloydb.v1.Cluster.SecondaryConfig\x12K\n\x0eprimary_config\x18\x17 \x01(\x0b\x32..google.cloud.alloydb.v1.Cluster.PrimaryConfigB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12\x43\n\npsc_config\x18\x1f \x01(\x0b\x32*.google.cloud.alloydb.v1.Cluster.PscConfigB\x03\xe0\x41\x01\x12X\n\x19maintenance_update_policy\x18 \x01(\x0b\x32\x30.google.cloud.alloydb.v1.MaintenanceUpdatePolicyB\x03\xe0\x41\x01\x12O\n\x14maintenance_schedule\x18% \x01(\x0b\x32,.google.cloud.alloydb.v1.MaintenanceScheduleB\x03\xe0\x41\x03\x12I\n\x11subscription_type\x18& \x01(\x0e\x32).google.cloud.alloydb.v1.SubscriptionTypeB\x03\xe0\x41\x01\x12K\n\x0etrial_metadata\x18\' \x01(\x0b\x32..google.cloud.alloydb.v1.Cluster.TrialMetadataB\x03\xe0\x41\x03\x12\x43\n\x04tags\x18) \x03(\x0b\x32*.google.cloud.alloydb.v1.Cluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1ai\n\rNetworkConfig\x12\x37\n\x07network\x18\x01 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1f\n\x12\x61llocated_ip_range\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a/\n\x0fSecondaryConfig\x12\x1c\n\x14primary_cluster_name\x18\x01 \x01(\t\x1a\x35\n\rPrimaryConfig\x12$\n\x17secondary_cluster_names\x18\x01 \x03(\tB\x03\xe0\x41\x03\x1aP\n\tPscConfig\x12\x18\n\x0bpsc_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1cservice_owned_project_number\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a\xd3\x01\n\rTrialMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cupgrade_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0egrace_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\t\n\x05\x45MPTY\x10\x03\x12\x0c\n\x08\x43REATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x07\x12\x0f\n\x0bMAINTENANCE\x10\x08\x12\r\n\tPROMOTING\x10\t\"G\n\x0b\x43lusterType\x12\x1c\n\x18\x43LUSTER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02:u\xea\x41r\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterR\x01\x01\x42\x08\n\x06source\"\xee!\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06labels\x18\x07 \x03(\x0b\x32-.google.cloud.alloydb.v1.Instance.LabelsEntry\x12;\n\x05state\x18\x08 \x01(\x0e\x32\'.google.cloud.alloydb.v1.Instance.StateB\x03\xe0\x41\x03\x12J\n\rinstance_type\x18\t \x01(\x0e\x32..google.cloud.alloydb.v1.Instance.InstanceTypeB\x03\xe0\x41\x02\x12G\n\x0emachine_config\x18\n \x01(\x0b\x32/.google.cloud.alloydb.v1.Instance.MachineConfig\x12M\n\x11\x61vailability_type\x18\x0b \x01(\x0e\x32\x32.google.cloud.alloydb.v1.Instance.AvailabilityType\x12\x10\n\x08gce_zone\x18\x0c \x01(\t\x12L\n\x0e\x64\x61tabase_flags\x18\r \x03(\x0b\x32\x34.google.cloud.alloydb.v1.Instance.DatabaseFlagsEntry\x12\x42\n\rwritable_node\x18\x13 \x01(\x0b\x32&.google.cloud.alloydb.v1.Instance.NodeB\x03\xe0\x41\x03\x12:\n\x05nodes\x18\x14 \x03(\x0b\x32&.google.cloud.alloydb.v1.Instance.NodeB\x03\xe0\x41\x03\x12\\\n\x15query_insights_config\x18\x15 \x01(\x0b\x32=.google.cloud.alloydb.v1.Instance.QueryInsightsInstanceConfig\x12[\n\x14observability_config\x18\x1a \x01(\x0b\x32=.google.cloud.alloydb.v1.Instance.ObservabilityInstanceConfig\x12J\n\x10read_pool_config\x18\x0e \x01(\x0b\x32\x30.google.cloud.alloydb.v1.Instance.ReadPoolConfig\x12\x17\n\nip_address\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x1b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12G\n\x0b\x61nnotations\x18\x12 \x03(\x0b\x32\x32.google.cloud.alloydb.v1.Instance.AnnotationsEntry\x12_\n\x18\x63lient_connection_config\x18\x17 \x01(\x0b\x32\x38.google.cloud.alloydb.v1.Instance.ClientConnectionConfigB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x03\xe0\x41\x03\x12U\n\x13psc_instance_config\x18\x1c \x01(\x0b\x32\x33.google.cloud.alloydb.v1.Instance.PscInstanceConfigB\x03\xe0\x41\x01\x12T\n\x0enetwork_config\x18\x1d \x01(\x0b\x32\x37.google.cloud.alloydb.v1.Instance.InstanceNetworkConfigB\x03\xe0\x41\x01\x12\x31\n\x1coutbound_public_ip_addresses\x18\" \x03(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12R\n\x11\x61\x63tivation_policy\x18# \x01(\x0e\x32\x32.google.cloud.alloydb.v1.Instance.ActivationPolicyB\x03\xe0\x41\x01\x1a\x38\n\rMachineConfig\x12\x11\n\tcpu_count\x18\x01 \x01(\x05\x12\x14\n\x0cmachine_type\x18\x04 \x01(\t\x1aR\n\x04Node\x12\x14\n\x07zone_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02ip\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05state\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\xfa\x01\n\x1bQueryInsightsInstanceConfig\x12$\n\x17record_application_tags\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15record_client_address\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x13query_string_length\x18\x04 \x01(\r\x12#\n\x16query_plans_per_minute\x18\x05 \x01(\rH\x02\x88\x01\x01\x42\x1a\n\x18_record_application_tagsB\x18\n\x16_record_client_addressB\x19\n\x17_query_plans_per_minute\x1a\xf0\x03\n\x1bObservabilityInstanceConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1e\n\x11preserve_comments\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11track_wait_events\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x16track_wait_event_types\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12$\n\x17max_query_string_length\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12$\n\x17record_application_tags\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12#\n\x16query_plans_per_minute\x18\x07 \x01(\x05H\x06\x88\x01\x01\x12!\n\x14track_active_queries\x18\x08 \x01(\x08H\x07\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_preserve_commentsB\x14\n\x12_track_wait_eventsB\x19\n\x17_track_wait_event_typesB\x1a\n\x18_max_query_string_lengthB\x1a\n\x18_record_application_tagsB\x19\n\x17_query_plans_per_minuteB\x17\n\x15_track_active_queries\x1a$\n\x0eReadPoolConfig\x12\x12\n\nnode_count\x18\x01 \x01(\x05\x1av\n\x16\x43lientConnectionConfig\x12\x1f\n\x12require_connectors\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12;\n\nssl_config\x18\x02 \x01(\x0b\x32\".google.cloud.alloydb.v1.SslConfigB\x03\xe0\x41\x01\x1a\x39\n\x12PscInterfaceConfig\x12#\n\x1bnetwork_attachment_resource\x18\x01 \x01(\t\x1a\xa9\x01\n\x17PscAutoConnectionConfig\x12\x18\n\x10\x63onsumer_project\x18\x01 \x01(\t\x12\x18\n\x10\x63onsumer_network\x18\x02 \x01(\t\x12\x1f\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x13\n\x06status\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x63onsumer_network_status\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a\xb4\x02\n\x11PscInstanceConfig\x12$\n\x17service_attachment_link\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x61llowed_consumer_projects\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpsc_dns_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12X\n\x15psc_interface_configs\x18\x08 \x03(\x0b\x32\x34.google.cloud.alloydb.v1.Instance.PscInterfaceConfigB\x03\xe0\x41\x01\x12\\\n\x14psc_auto_connections\x18\t \x03(\x0b\x32\x39.google.cloud.alloydb.v1.Instance.PscAutoConnectionConfigB\x03\xe0\x41\x01\x1a\xea\x02\n\x15InstanceNetworkConfig\x12t\n\x1c\x61uthorized_external_networks\x18\x01 \x03(\x0b\x32I.google.cloud.alloydb.v1.Instance.InstanceNetworkConfig.AuthorizedNetworkB\x03\xe0\x41\x01\x12\x1d\n\x10\x65nable_public_ip\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x65nable_outbound_public_ip\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n\x07network\x18\x04 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12(\n\x1b\x61llocated_ip_range_override\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x11\x41uthorizedNetwork\x12\x1c\n\ncidr_range\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x44\x61tabaseFlagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\x0c\n\x08\x43REATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0f\n\x0bMAINTENANCE\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x11\n\rBOOTSTRAPPING\x10\x08\x12\r\n\tPROMOTING\x10\t\"X\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tREAD_POOL\x10\x02\x12\r\n\tSECONDARY\x10\x03\"N\n\x10\x41vailabilityType\x12!\n\x1d\x41VAILABILITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\"L\n\x10\x41\x63tivationPolicy\x12!\n\x1d\x41\x43TIVATION_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x41LWAYS\x10\x01\x12\t\n\x05NEVER\x10\x02:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Instance\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}*\tinstances2\x08instanceR\x01\x01\"\xa9\x02\n\x0e\x43onnectionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\nip_address\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12&\n\x11public_ip_address\x18\x05 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x19\n\x0cinstance_uid\x18\x04 \x01(\tB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n%alloydb.googleapis.com/ConnectionInfo\x12^projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}/connectionInfo*\x0f\x63onnectionInfos2\x0e\x63onnectionInfo\"\x85\r\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16\x63reate_completion_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x06labels\x18\x06 \x03(\x0b\x32+.google.cloud.alloydb.v1.Backup.LabelsEntry\x12\x39\n\x05state\x18\x07 \x01(\x0e\x32%.google.cloud.alloydb.v1.Backup.StateB\x03\xe0\x41\x03\x12\x32\n\x04type\x18\x08 \x01(\x0e\x32$.google.cloud.alloydb.v1.Backup.Type\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x18\n\x0b\x63luster_uid\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12<\n\x0c\x63luster_name\x18\n \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\x12\x18\n\x0breconciling\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12I\n\x11\x65ncryption_config\x18\x0c \x01(\x0b\x32).google.cloud.alloydb.v1.EncryptionConfigB\x03\xe0\x41\x01\x12\x45\n\x0f\x65ncryption_info\x18\r \x01(\x0b\x32\'.google.cloud.alloydb.v1.EncryptionInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12\x45\n\x0b\x61nnotations\x18\x10 \x03(\x0b\x32\x30.google.cloud.alloydb.v1.Backup.AnnotationsEntry\x12\x17\n\nsize_bytes\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpiry_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x0f\x65xpiry_quantity\x18\x14 \x01(\x0b\x32\x33.google.cloud.alloydb.v1.Backup.QuantityBasedExpiryB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12G\n\x10\x64\x61tabase_version\x18\x16 \x01(\x0e\x32(.google.cloud.alloydb.v1.DatabaseVersionB\x03\xe0\x41\x03\x12\x42\n\x04tags\x18\x19 \x03(\x0b\x32).google.cloud.alloydb.v1.Backup.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1aW\n\x13QuantityBasedExpiry\x12\x1c\n\x0fretention_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\"\n\x15total_retention_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tAUTOMATED\x10\x02\x12\x0e\n\nCONTINUOUS\x10\x03:p\xea\x41m\n\x1d\x61lloydb.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupR\x01\x01\"\xfc\x08\n\x15SupportedDatabaseFlag\x12`\n\x13string_restrictions\x18\x07 \x01(\x0b\x32\x41.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictionsH\x00\x12\x62\n\x14integer_restrictions\x18\x08 \x01(\x0b\x32\x42.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictionsH\x00\x12\"\n\x18recommended_string_value\x18\n \x01(\tH\x01\x12@\n\x19recommended_integer_value\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tflag_name\x18\x02 \x01(\t\x12L\n\nvalue_type\x18\x03 \x01(\x0e\x32\x38.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType\x12\x1f\n\x17\x61\x63\x63\x65pts_multiple_values\x18\x04 \x01(\x08\x12G\n\x15supported_db_versions\x18\x05 \x03(\x0e\x32(.google.cloud.alloydb.v1.DatabaseVersion\x12\x1b\n\x13requires_db_restart\x18\x06 \x01(\x08\x12\x43\n\x05scope\x18\t \x01(\x0e\x32\x34.google.cloud.alloydb.v1.SupportedDatabaseFlag.Scope\x1a,\n\x12StringRestrictions\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x1au\n\x13IntegerRestrictions\x12.\n\tmin_value\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12.\n\tmax_value\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"U\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\t\n\x05\x46LOAT\x10\x03\x12\x08\n\x04NONE\x10\x04\"A\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\x13\n\x0f\x43ONNECTION_POOL\x10\x02:\x97\x01\xea\x41\x93\x01\n,alloydb.googleapis.com/SupportedDatabaseFlag\x12\x34projects/{project}/locations/{location}/flags/{flag}*\x16supportedDatabaseFlags2\x15supportedDatabaseFlagB\x0e\n\x0crestrictionsB\x13\n\x11recommended_value\"\xfa\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08password\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x1b\n\x0e\x64\x61tabase_roles\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12>\n\tuser_type\x18\x05 \x01(\x0e\x32&.google.cloud.alloydb.v1.User.UserTypeB\x03\xe0\x41\x01\x12\x1d\n\x10keep_extra_roles\x18\x06 \x01(\x08\x42\x03\xe0\x41\x04\"Q\n\x08UserType\x12\x19\n\x15USER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41LLOYDB_BUILT_IN\x10\x01\x12\x14\n\x10\x41LLOYDB_IAM_USER\x10\x02:y\xea\x41v\n\x1b\x61lloydb.googleapis.com/User\x12Gprojects/{project}/locations/{location}/clusters/{cluster}/users/{user}*\x05users2\x04userR\x01\x01\"\xdc\x01\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x63harset\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcollation\x18\x03 \x01(\tB\x03\xe0\x41\x01:\x8e\x01\xea\x41\x8a\x01\n\x1f\x61lloydb.googleapis.com/Database\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/databases/{database}*\tdatabases2\x08\x64\x61tabaseR\x01\x01*^\n\x0cInstanceView\x12\x1d\n\x19INSTANCE_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13INSTANCE_VIEW_BASIC\x10\x01\x12\x16\n\x12INSTANCE_VIEW_FULL\x10\x02*g\n\x0b\x43lusterView\x12\x1c\n\x18\x43LUSTER_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LUSTER_VIEW_BASIC\x10\x01\x12\"\n\x1e\x43LUSTER_VIEW_CONTINUOUS_BACKUP\x10\x02*{\n\x0f\x44\x61tabaseVersion\x12 \n\x1c\x44\x41TABASE_VERSION_UNSPECIFIED\x10\x00\x12\x13\n\x0bPOSTGRES_13\x10\x01\x1a\x02\x08\x01\x12\x0f\n\x0bPOSTGRES_14\x10\x02\x12\x0f\n\x0bPOSTGRES_15\x10\x03\x12\x0f\n\x0bPOSTGRES_16\x10\x04*N\n\x10SubscriptionType\x12!\n\x1dSUBSCRIPTION_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05TRIAL\x10\x02\x42\xb2\x03\n\x1b\x63om.google.cloud.alloydb.v1B\x0eResourcesProtoP\x01Z5cloud.google.com/go/alloydb/apiv1/alloydbpb;alloydbpb\xaa\x02\x17Google.Cloud.AlloyDb.V1\xca\x02\x17Google\\Cloud\\AlloyDb\\V1\xea\x02\x1aGoogle::Cloud::AlloyDB::V1\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -33,6 +34,7 @@ ["google.protobuf.Duration", "google/protobuf/duration.proto"], ["google.type.TimeOfDay", "google/type/timeofday.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.Date", "google/type/date.proto"], ["google.cloud.alloydb.v1.CloudSQLBackupRunSource", "google/cloud/alloydb/v1/csql_resources.proto"], ["google.protobuf.Int64Value", "google/protobuf/wrappers.proto"], ] @@ -69,6 +71,7 @@ module V1 ContinuousBackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.ContinuousBackupSource").msgclass MaintenanceUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.MaintenanceUpdatePolicy").msgclass MaintenanceUpdatePolicy::MaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.MaintenanceUpdatePolicy.MaintenanceWindow").msgclass + MaintenanceUpdatePolicy::DenyMaintenancePeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.MaintenanceUpdatePolicy.DenyMaintenancePeriod").msgclass MaintenanceSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.MaintenanceSchedule").msgclass Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.Cluster").msgclass Cluster::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.Cluster.NetworkConfig").msgclass @@ -93,6 +96,7 @@ module V1 Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.Instance.State").enummodule Instance::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.Instance.InstanceType").enummodule Instance::AvailabilityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.Instance.AvailabilityType").enummodule + Instance::ActivationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.Instance.ActivationPolicy").enummodule ConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.ConnectionInfo").msgclass Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.Backup").msgclass Backup::QuantityBasedExpiry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.alloydb.v1.Backup.QuantityBasedExpiry").msgclass diff --git a/google-cloud-alloy_db-v1/proto_docs/google/cloud/alloydb/v1/resources.rb b/google-cloud-alloy_db-v1/proto_docs/google/cloud/alloydb/v1/resources.rb index e2357bd18d39..04584384f41b 100644 --- a/google-cloud-alloy_db-v1/proto_docs/google/cloud/alloydb/v1/resources.rb +++ b/google-cloud-alloy_db-v1/proto_docs/google/cloud/alloydb/v1/resources.rb @@ -282,12 +282,19 @@ class ContinuousBackupConfig # if ContinuousBackup is not enabled. # @!attribute [r] schedule # @return [::Array<::Google::Type::DayOfWeek>] - # Output only. Days of the week on which a continuous backup is taken. Output - # only field. Ignored if passed into the request. + # Output only. Days of the week on which a continuous backup is taken. # @!attribute [r] earliest_restorable_time # @return [::Google::Protobuf::Timestamp] - # Output only. The earliest restorable time that can be restored to. Output - # only field. + # Output only. The earliest restorable time that can be restored to. If + # continuous backups and recovery was recently enabled, the earliest + # restorable time is the creation time of the earliest eligible backup within + # this cluster's continuous backup recovery window. After a cluster has had + # continuous backups enabled for the duration of its recovery window, the + # earliest restorable time becomes "now minus the recovery window". For + # example, assuming a point in time recovery is attempted at 04/16/2025 + # 3:23:00PM with a 14d recovery window, the earliest restorable time would be + # 04/02/2025 3:23:00PM. This field is only visible if the + # CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided. class ContinuousBackupInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -326,6 +333,9 @@ class ContinuousBackupSource # @!attribute [rw] maintenance_windows # @return [::Array<::Google::Cloud::AlloyDB::V1::MaintenanceUpdatePolicy::MaintenanceWindow>] # Preferred windows to perform maintenance. Currently limited to 1. + # @!attribute [rw] deny_maintenance_periods + # @return [::Array<::Google::Cloud::AlloyDB::V1::MaintenanceUpdatePolicy::DenyMaintenancePeriod>] + # Periods to deny maintenance. Currently limited to 1. class MaintenanceUpdatePolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -342,6 +352,32 @@ class MaintenanceWindow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # DenyMaintenancePeriod definition. Excepting emergencies, maintenance + # will not be scheduled to start within this deny period. The start_date must + # be less than the end_date. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Deny period start date. + # This can be: + # * A full date, with non-zero year, month and day values OR + # * A month and day value, with a zero year for recurring + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Deny period end date. + # This can be: + # * A full date, with non-zero year, month and day values OR + # * A month and day value, with a zero year for recurring + # @!attribute [rw] time + # @return [::Google::Type::TimeOfDay] + # Time in UTC when the deny period starts on start_date and ends on + # end_date. This can be: + # * Full time OR + # * All zeros for 00:00:00 UTC + class DenyMaintenancePeriod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # MaintenanceSchedule stores the maintenance schedule generated from @@ -808,6 +844,15 @@ module ClusterType # @!attribute [r] outbound_public_ip_addresses # @return [::Array<::String>] # Output only. All outbound public IP addresses configured for the instance. + # @!attribute [rw] activation_policy + # @return [::Google::Cloud::AlloyDB::V1::Instance::ActivationPolicy] + # Optional. Specifies whether an instance needs to spin up. Once the instance + # is active, the activation policy can be updated to the `NEVER` to stop the + # instance. Likewise, the activation policy can be updated to `ALWAYS` to + # start the instance. + # There are restrictions around when an instance can/cannot be activated (for + # example, a read pool instance should be stopped before stopping primary + # etc.). Please refer to the API documentation for more details. class Instance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -967,9 +1012,33 @@ class PscInterfaceConfig # @!attribute [r] status # @return [::String] # Output only. The status of the PSC service automation connection. + # Possible values: + # "STATE_UNSPECIFIED" - An invalid state as the default case. + # "ACTIVE" - The connection has been created successfully. + # "FAILED" - The connection is not functional since some resources on the + # connection fail to be created. + # "CREATING" - The connection is being created. + # "DELETING" - The connection is being deleted. + # "CREATE_REPAIRING" - The connection is being repaired to complete + # creation. + # "DELETE_REPAIRING" - The connection is being repaired to complete + # deletion. # @!attribute [r] consumer_network_status # @return [::String] # Output only. The status of the service connection policy. + # Possible values: + # "STATE_UNSPECIFIED" - Default state, when Connection Map is created + # initially. + # "VALID" - Set when policy and map configuration is valid, and their + # matching can lead to allowing creation of PSC Connections subject to + # other constraints like connections limit. + # "CONNECTION_POLICY_MISSING" - No Service Connection Policy found for + # this network and Service Class + # "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for + # this network and Service Class + # "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer instance + # project is not in AllowedGoogleProducersResourceHierarchyLevels of the + # matching ServiceConnectionPolicy. class PscAutoConnectionConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1016,6 +1085,22 @@ class PscInstanceConfig # @return [::Boolean] # Optional. Enabling an outbound public IP address to support a database # server sending requests out into the internet. + # @!attribute [r] network + # @return [::String] + # Output only. The resource link for the VPC network in which instance + # resources are created and from which they are accessible via Private IP. + # This will be the same value as the parent cluster's network. It is + # specified in the form: // + # `projects/{project_number}/global/networks/{network_id}`. + # @!attribute [rw] allocated_ip_range_override + # @return [::String] + # Optional. Name of the allocated IP range for the private IP AlloyDB + # instance, for example: "google-managed-services-default". If set, the + # instance IPs will be created from this allocated range and will override + # the IP range used by the parent cluster. The range name must comply with + # [RFC 1035](http://datatracker.ietf.org/doc/html/rfc1035). Specifically, + # the name must be 1-63 characters long and match the regular expression + # [a-z]([-a-z0-9]*[a-z0-9])?. class InstanceNetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1129,6 +1214,18 @@ module AvailabilityType # Regional (or Highly) available instance. REGIONAL = 2 end + + # Specifies whether an instance needs to spin up. + module ActivationPolicy + # The policy is not specified. + ACTIVATION_POLICY_UNSPECIFIED = 0 + + # The instance is running. + ALWAYS = 1 + + # The instance is not running. + NEVER = 2 + end end # ConnectionInfo singleton resource. @@ -1181,9 +1278,15 @@ class ConnectionInfo # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. Update time stamp + # + # Users should not infer any meaning from this field. Its value is generally + # unrelated to the timing of the backup creation operation. # @!attribute [r] delete_time # @return [::Google::Protobuf::Timestamp] # Output only. Delete time stamp + # @!attribute [r] create_completion_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource finished being created. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Labels as key value pairs diff --git a/google-cloud-alloy_db-v1/proto_docs/google/cloud/alloydb/v1/service.rb b/google-cloud-alloy_db-v1/proto_docs/google/cloud/alloydb/v1/service.rb index 0b05a73487ef..e583b486b88f 100644 --- a/google-cloud-alloy_db-v1/proto_docs/google/cloud/alloydb/v1/service.rb +++ b/google-cloud-alloy_db-v1/proto_docs/google/cloud/alloydb/v1/service.rb @@ -429,7 +429,7 @@ class StageInfo extend ::Google::Protobuf::MessageExts::ClassMethods end - # Details regarding the upgrade of instaces associated with a cluster. + # Details regarding the upgrade of instances associated with a cluster. # @!attribute [rw] name # @return [::String] # Normalized name of the instance. @@ -630,6 +630,7 @@ class PromoteClusterRequest # Message for restoring a Cluster from a backup or another cluster at a given # point in time. + # NEXT_ID: 11 # @!attribute [rw] backup_source # @return [::Google::Cloud::AlloyDB::V1::BackupSource] # Backup source. diff --git a/google-cloud-alloy_db-v1/proto_docs/google/type/date.rb b/google-cloud-alloy_db-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..2f4a77319e09 --- /dev/null +++ b/google-cloud-alloy_db-v1/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are {::Google::Type::TimeOfDay google.type.TimeOfDay} and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-alloy_db-v1/proto_docs/google/type/timeofday.rb b/google-cloud-alloy_db-v1/proto_docs/google/type/timeofday.rb index 048a1ecaf8f0..b288b1b61f57 100644 --- a/google-cloud-alloy_db-v1/proto_docs/google/type/timeofday.rb +++ b/google-cloud-alloy_db-v1/proto_docs/google/type/timeofday.rb @@ -21,7 +21,7 @@ module Google module Type # Represents a time of day. The date and time zone are either not significant # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are [google.type.Date][google.type.Date] and + # types are {::Google::Type::Date google.type.Date} and # `google.protobuf.Timestamp`. # @!attribute [rw] hours # @return [::Integer] From b4287a1f1456179e8472b1301df6e7c205319077 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:09:22 -0700 Subject: [PATCH 122/457] feat(dlp-v2): Provide a type for findings saved to Cloud Storage (#30532) --- .../lib/google/privacy/dlp/v2/dlp_pb.rb | 3 ++- .../proto_docs/google/privacy/dlp/v2/dlp.rb | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb b/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb index fd37aa1f918a..89deb5da33eb 100644 --- a/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb +++ b/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb @@ -19,7 +19,7 @@ require 'google/type/timeofday_pb' -descriptor_data = "\n\x1fgoogle/privacy/dlp/v2/dlp.proto\x12\x15google.privacy.dlp.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/privacy/dlp/v2/storage.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"G\n\x10\x45xcludeInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xa8\x01\n\x10\x45xcludeByHotword\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\"\xe7\x02\n\rExclusionRule\x12\x46\n\ndictionary\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12\x45\n\x12\x65xclude_info_types\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeInfoTypesH\x00\x12\x45\n\x12\x65xclude_by_hotword\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeByHotwordH\x00\x12:\n\rmatching_type\x18\x04 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingTypeB\x06\n\x04type\"\xb1\x01\n\x0eInspectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x12>\n\x0e\x65xclusion_rule\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.ExclusionRuleH\x00\x42\x06\n\x04type\"~\n\x11InspectionRuleSet\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\x05rules\x18\x02 \x03(\x0b\x32%.google.privacy.dlp.v2.InspectionRule\"\xac\x07\n\rInspectConfig\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12]\n\x1cmin_likelihood_per_info_type\x18\x0b \x03(\x0b\x32\x37.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood\x12\x42\n\x06limits\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.InspectConfig.FindingLimits\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x1a\n\x12\x65xclude_info_types\x18\x05 \x01(\x08\x12@\n\x11\x63ustom_info_types\x18\x06 \x03(\x0b\x32%.google.privacy.dlp.v2.CustomInfoType\x12=\n\x0f\x63ontent_options\x18\x08 \x03(\x0e\x32$.google.privacy.dlp.v2.ContentOption\x12:\n\x08rule_set\x18\n \x03(\x0b\x32(.google.privacy.dlp.v2.InspectionRuleSet\x1a\x83\x01\n\x12InfoTypeLikelihood\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x1a\x91\x02\n\rFindingLimits\x12\x1d\n\x15max_findings_per_item\x18\x01 \x01(\x05\x12 \n\x18max_findings_per_request\x18\x02 \x01(\x05\x12\x64\n\x1amax_findings_per_info_type\x18\x03 \x03(\x0b\x32@.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit\x1aY\n\rInfoTypeLimit\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x14\n\x0cmax_findings\x18\x02 \x01(\x05\"\xf9\x02\n\x0f\x42yteContentItem\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.privacy.dlp.v2.ByteContentItem.BytesType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x97\x02\n\tBytesType\x12\x1a\n\x16\x42YTES_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05IMAGE\x10\x06\x12\x0e\n\nIMAGE_JPEG\x10\x01\x12\r\n\tIMAGE_BMP\x10\x02\x12\r\n\tIMAGE_PNG\x10\x03\x12\r\n\tIMAGE_SVG\x10\x04\x12\r\n\tTEXT_UTF8\x10\x05\x12\x11\n\rWORD_DOCUMENT\x10\x07\x12\x07\n\x03PDF\x10\x08\x12\x17\n\x13POWERPOINT_DOCUMENT\x10\t\x12\x12\n\x0e\x45XCEL_DOCUMENT\x10\n\x12\x08\n\x04\x41VRO\x10\x0b\x12\x07\n\x03\x43SV\x10\x0c\x12\x07\n\x03TSV\x10\r\x12\t\n\x05\x41UDIO\x10\x0f\x12\t\n\x05VIDEO\x10\x10\x12\x0e\n\nEXECUTABLE\x10\x11\x12\x0c\n\x08\x41I_MODEL\x10\x12\"\x97\x01\n\x0b\x43ontentItem\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12-\n\x05table\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.TableH\x00\x12;\n\tbyte_item\x18\x05 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItemH\x00\x42\x0b\n\tdata_item\"\x9d\x01\n\x05Table\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12.\n\x04rows\x18\x02 \x03(\x0b\x32 .google.privacy.dlp.v2.Table.Row\x1a\x33\n\x03Row\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"]\n\rInspectResult\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xdf\x05\n\x07\x46inding\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x32\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x03 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nquote_info\x18\x07 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\x35\n\rresource_name\x18\x08 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x38\n\x0ctrigger_name\x18\t \x01(\tB\"\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12:\n\x06labels\x18\n \x03(\x0b\x32*.google.privacy.dlp.v2.Finding.LabelsEntry\x12\x33\n\x0fjob_create_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x08job_name\x18\r \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x12\n\nfinding_id\x18\x0f \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:[\xea\x41X\n\x1a\x64lp.googleapis.com/Finding\x12:projects/{project}/locations/{location}/findings/{finding}\"\xeb\x01\n\x08Location\x12\x30\n\nbyte_range\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x35\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x41\n\x11\x63ontent_locations\x18\x07 \x03(\x0b\x32&.google.privacy.dlp.v2.ContentLocation\x12\x33\n\tcontainer\x18\x08 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\"\x97\x03\n\x0f\x43ontentLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12@\n\x0frecord_location\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.RecordLocationH\x00\x12>\n\x0eimage_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.ImageLocationH\x00\x12\x44\n\x11\x64ocument_location\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.DocumentLocationH\x00\x12\x44\n\x11metadata_location\x18\x08 \x01(\x0b\x32\'.google.privacy.dlp.v2.MetadataLocationH\x00\x12\x37\n\x13\x63ontainer_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x07 \x01(\tB\n\n\x08location\"\x94\x01\n\x10MetadataLocation\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.google.privacy.dlp.v2.MetadataType\x12\x44\n\rstorage_label\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.StorageMetadataLabelH\x00\x42\x07\n\x05label\"#\n\x14StorageMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"\'\n\x10\x44ocumentLocation\x12\x13\n\x0b\x66ile_offset\x18\x01 \x01(\x03\"\xb6\x01\n\x0eRecordLocation\x12\x34\n\nrecord_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.RecordKey\x12\x30\n\x08\x66ield_id\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12<\n\x0etable_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.TableLocation\"\"\n\rTableLocation\x12\x11\n\trow_index\x18\x01 \x01(\x03\"\xac\x01\n\tContainer\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tfull_path\x18\x03 \x01(\t\x12\x11\n\troot_path\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"K\n\rImageLocation\x12:\n\x0e\x62ounding_boxes\x18\x01 \x03(\x0b\x32\".google.privacy.dlp.v2.BoundingBox\"G\n\x0b\x42oundingBox\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xfc\x03\n\x12RedactImageRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x13\n\x0blocation_id\x18\x08 \x01(\t\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12_\n\x17image_redaction_configs\x18\x05 \x03(\x0b\x32>.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig\x12\x18\n\x10include_findings\x18\x06 \x01(\x08\x12\x39\n\tbyte_item\x18\x07 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItem\x1a\xa8\x01\n\x14ImageRedactionConfig\x12\x34\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x19\n\x0fredact_all_text\x18\x02 \x01(\x08H\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ColorB\x08\n\x06target\"1\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\"\x83\x01\n\x13RedactImageResponse\x12\x16\n\x0eredacted_image\x18\x01 \x01(\x0c\x12\x16\n\x0e\x65xtracted_text\x18\x02 \x01(\t\x12<\n\x0einspect_result\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xd8\x02\n\x18\x44\x65identifyContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11\x64\x65identify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18\x64\x65identify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19\x44\x65identifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xdb\x02\n\x18ReidentifyContentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11reidentify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18reidentify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19ReidentifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xef\x01\n\x15InspectContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"N\n\x16InspectContentResponse\x12\x34\n\x06result\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xb7\x02\n\x13OutputStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x12N\n\routput_schema\x18\x03 \x01(\x0e\x32\x37.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema\"\x90\x01\n\x0cOutputSchema\x12\x1d\n\x19OUTPUT_SCHEMA_UNSPECIFIED\x10\x00\x12\x11\n\rBASIC_COLUMNS\x10\x01\x12\x0f\n\x0bGCS_COLUMNS\x10\x02\x12\x15\n\x11\x44\x41TASTORE_COLUMNS\x10\x03\x12\x15\n\x11\x42IG_QUERY_COLUMNS\x10\x04\x12\x0f\n\x0b\x41LL_COLUMNS\x10\x05\x42\x06\n\x04type\"R\n\rInfoTypeStats\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc0\x04\n\x18InspectDataSourceDetails\x12[\n\x11requested_options\x18\x02 \x01(\x0b\x32@.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions\x12\x46\n\x06result\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.InspectDataSourceDetails.Result\x1a\x9a\x01\n\x10RequestedOptions\x12I\n\x19snapshot_inspect_template\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12;\n\njob_config\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfig\x1a\xe1\x01\n\x06Result\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x02 \x01(\x03\x12=\n\x0finfo_type_stats\x18\x03 \x03(\x0b\x32$.google.privacy.dlp.v2.InfoTypeStats\x12\x1a\n\x12num_rows_processed\x18\x05 \x01(\x03\x12\x44\n\x0chybrid_stats\x18\x07 \x01(\x0b\x32..google.privacy.dlp.v2.HybridInspectStatistics\"\xff\x01\n\x1c\x44\x61taProfileBigQueryRowSchema\x12@\n\rtable_profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfileH\x00\x12\x42\n\x0e\x63olumn_profile\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfileH\x00\x12I\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfileH\x00\x42\x0e\n\x0c\x64\x61ta_profile\"`\n\x17HybridInspectStatistics\x12\x17\n\x0fprocessed_count\x18\x01 \x01(\x03\x12\x15\n\raborted_count\x18\x02 \x01(\x03\x12\x15\n\rpending_count\x18\x03 \x01(\x03\"l\n\rActionDetails\x12P\n\x12\x64\x65identify_details\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DeidentifyDataSourceDetailsH\x00\x42\t\n\x07\x64\x65tails\"x\n\x19\x44\x65identifyDataSourceStats\x12\x19\n\x11transformed_bytes\x18\x01 \x01(\x03\x12\x1c\n\x14transformation_count\x18\x02 \x01(\x03\x12\"\n\x1atransformation_error_count\x18\x03 \x01(\x03\"\xf2\x03\n\x1b\x44\x65identifyDataSourceDetails\x12h\n\x11requested_options\x18\x01 \x01(\x0b\x32M.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions\x12J\n\x10\x64\x65identify_stats\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DeidentifyDataSourceStats\x1a\x9c\x02\n\x1aRequestedDeidentifyOptions\x12O\n\x1csnapshot_deidentify_template\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Z\n\'snapshot_structured_deidentify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Q\n\x1esnapshot_image_redact_template\x18\x03 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\"\xfc\x02\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x0csupported_by\x18\x03 \x03(\x0e\x32*.google.privacy.dlp.v2.InfoTypeSupportedBy\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0f\n\x07\x65xample\x18\x08 \x01(\t\x12;\n\x08versions\x18\t \x03(\x0b\x32).google.privacy.dlp.v2.VersionDescription\x12;\n\ncategories\x18\n \x03(\x0b\x32\'.google.privacy.dlp.v2.InfoTypeCategory\x12\x42\n\x11sensitivity_score\x18\x0b \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12\x1b\n\x13specific_info_types\x18\x0c \x03(\t\"\x83\n\n\x10InfoTypeCategory\x12U\n\x11location_category\x18\x01 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.LocationCategoryH\x00\x12U\n\x11industry_category\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategoryH\x00\x12M\n\rtype_category\x18\x03 \x01(\x0e\x32\x34.google.privacy.dlp.v2.InfoTypeCategory.TypeCategoryH\x00\"\xe2\x05\n\x10LocationCategory\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\r\n\tARGENTINA\x10\x02\x12\x0b\n\x07\x41RMENIA\x10\x33\x12\r\n\tAUSTRALIA\x10\x03\x12\x0e\n\nAZERBAIJAN\x10\x30\x12\x0b\n\x07\x42\x45LARUS\x10\x32\x12\x0b\n\x07\x42\x45LGIUM\x10\x04\x12\n\n\x06\x42RAZIL\x10\x05\x12\n\n\x06\x43\x41NADA\x10\x06\x12\t\n\x05\x43HILE\x10\x07\x12\t\n\x05\x43HINA\x10\x08\x12\x0c\n\x08\x43OLOMBIA\x10\t\x12\x0b\n\x07\x43ROATIA\x10*\x12\x0b\n\x07\x43ZECHIA\x10\x34\x12\x0b\n\x07\x44\x45NMARK\x10\n\x12\n\n\x06\x46RANCE\x10\x0b\x12\x0b\n\x07\x46INLAND\x10\x0c\x12\x0b\n\x07GERMANY\x10\r\x12\r\n\tHONG_KONG\x10\x0e\x12\t\n\x05INDIA\x10\x0f\x12\r\n\tINDONESIA\x10\x10\x12\x0b\n\x07IRELAND\x10\x11\x12\n\n\x06ISRAEL\x10\x12\x12\t\n\x05ITALY\x10\x13\x12\t\n\x05JAPAN\x10\x14\x12\x0e\n\nKAZAKHSTAN\x10/\x12\t\n\x05KOREA\x10\x15\x12\n\n\x06MEXICO\x10\x16\x12\x13\n\x0fTHE_NETHERLANDS\x10\x17\x12\x0f\n\x0bNEW_ZEALAND\x10)\x12\n\n\x06NORWAY\x10\x18\x12\x0c\n\x08PARAGUAY\x10\x19\x12\x08\n\x04PERU\x10\x1a\x12\n\n\x06POLAND\x10\x1b\x12\x0c\n\x08PORTUGAL\x10\x1c\x12\n\n\x06RUSSIA\x10,\x12\r\n\tSINGAPORE\x10\x1d\x12\x10\n\x0cSOUTH_AFRICA\x10\x1e\x12\t\n\x05SPAIN\x10\x1f\x12\n\n\x06SWEDEN\x10 \x12\x0f\n\x0bSWITZERLAND\x10+\x12\n\n\x06TAIWAN\x10!\x12\x0c\n\x08THAILAND\x10\"\x12\n\n\x06TURKEY\x10#\x12\x0b\n\x07UKRAINE\x10-\x12\x12\n\x0eUNITED_KINGDOM\x10$\x12\x11\n\rUNITED_STATES\x10%\x12\x0b\n\x07URUGUAY\x10&\x12\x0e\n\nUZBEKISTAN\x10.\x12\r\n\tVENEZUELA\x10\'\x12\x0c\n\x08INTERNAL\x10(\"]\n\x10IndustryCategory\x12\x18\n\x14INDUSTRY_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\n\n\x06HEALTH\x10\x02\x12\x16\n\x12TELECOMMUNICATIONS\x10\x03\"\xa1\x01\n\x0cTypeCategory\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03PII\x10\x01\x12\x08\n\x04SPII\x10\x02\x12\x0f\n\x0b\x44\x45MOGRAPHIC\x10\x03\x12\x0e\n\nCREDENTIAL\x10\x04\x12\x11\n\rGOVERNMENT_ID\x10\x05\x12\x0c\n\x08\x44OCUMENT\x10\x06\x12\x1a\n\x16\x43ONTEXTUAL_INFORMATION\x10\x07\x12\n\n\x06\x43USTOM\x10\x08\x42\n\n\x08\x63\x61tegory\":\n\x12VersionDescription\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"b\n\x14ListInfoTypesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x13\n\x0blocation_id\x18\x03 \x01(\t\"W\n\x15ListInfoTypesResponse\x12>\n\ninfo_types\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.InfoTypeDescription\"\xc1\x01\n\x15RiskAnalysisJobConfig\x12<\n\x0eprivacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12:\n\x0csource_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xbc\x01\n\x07QuasiId\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\"\xbe\x02\n\x10StatisticalTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12T\n\tquasi_ids\x18\x01 \x03(\x0b\x32<.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aY\n\x14QuasiIdentifierField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\"\x93\x0f\n\rPrivacyMetric\x12[\n\x16numerical_stats_config\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigH\x00\x12_\n\x18\x63\x61tegorical_stats_config\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigH\x00\x12S\n\x12k_anonymity_config\x18\x03 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigH\x00\x12S\n\x12l_diversity_config\x18\x04 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigH\x00\x12\\\n\x17k_map_estimation_config\x18\x05 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigH\x00\x12n\n delta_presence_estimation_config\x18\x06 \x01(\x0b\x32\x42.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigH\x00\x1a\x45\n\x14NumericalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1aG\n\x16\x43\x61tegoricalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1ay\n\x10KAnonymityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x32\n\tentity_id\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EntityId\x1a\x82\x01\n\x10LDiversityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12;\n\x13sensitive_attribute\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1a\x81\x06\n\x14KMapEstimationConfig\x12]\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x62\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32H.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable\x1a\xc0\x01\n\x0bTaggedField\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\x1a\xcd\x02\n\x0e\x41uxiliaryTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12m\n\tquasi_ids\x18\x01 \x03(\x0b\x32U.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aQ\n\x0cQuasiIdField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\x1a\xaf\x01\n\x1d\x44\x65ltaPresenceEstimationConfig\x12\x36\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.QuasiIdB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x41\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32\'.google.privacy.dlp.v2.StatisticalTableB\x06\n\x04type\"\xc1\x1f\n\x1c\x41nalyzeDataSourceRiskDetails\x12\x46\n\x18requested_privacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12\x44\n\x16requested_source_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12j\n\x16numerical_stats_result\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultH\x00\x12n\n\x18\x63\x61tegorical_stats_result\x18\x04 \x01(\x0b\x32J.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultH\x00\x12\x62\n\x12k_anonymity_result\x18\x05 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultH\x00\x12\x62\n\x12l_diversity_result\x18\x06 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultH\x00\x12k\n\x17k_map_estimation_result\x18\x07 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultH\x00\x12}\n delta_presence_estimation_result\x18\t \x01(\x0b\x32Q.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultH\x00\x12k\n\x11requested_options\x18\n \x01(\x0b\x32P.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions\x1a\xaf\x01\n\x14NumericalStatsResult\x12/\n\tmin_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12/\n\tmax_value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x35\n\x0fquantile_values\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1a\x8d\x03\n\x16\x43\x61tegoricalStatsResult\x12\x95\x01\n!value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32j.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket\x1a\xda\x01\n\x1f\x43\x61tegoricalStatsHistogramBucket\x12#\n\x1bvalue_frequency_lower_bound\x18\x01 \x01(\x03\x12#\n\x1bvalue_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12<\n\rbucket_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb5\x04\n\x10KAnonymityResult\x12\x8b\x01\n#equivalence_class_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket\x1at\n\x1aKAnonymityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x1a\x9c\x02\n\x19KAnonymityHistogramBucket\x12*\n\"equivalence_class_size_lower_bound\x18\x01 \x01(\x03\x12*\n\"equivalence_class_size_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb0\x05\n\x10LDiversityResult\x12\x93\x01\n+sensitive_value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket\x1a\xe0\x01\n\x1aLDiversityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x12%\n\x1dnum_distinct_sensitive_values\x18\x03 \x01(\x03\x12\x43\n\x14top_sensitive_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x1a\xa2\x02\n\x19LDiversityHistogramBucket\x12-\n%sensitive_value_frequency_lower_bound\x18\x01 \x01(\x03\x12-\n%sensitive_value_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\x95\x04\n\x14KMapEstimationResult\x12\x8a\x01\n\x1ak_map_estimation_histogram\x18\x01 \x03(\x0b\x32\x66.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket\x1ar\n\x1bKMapEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1b\n\x13\x65stimated_anonymity\x18\x02 \x01(\x03\x1a\xfb\x01\n\x1dKMapEstimationHistogramBucket\x12\x15\n\rmin_anonymity\x18\x01 \x01(\x03\x12\x15\n\rmax_anonymity\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12{\n\rbucket_values\x18\x06 \x03(\x0b\x32\x64.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a\xe4\x04\n\x1d\x44\x65ltaPresenceEstimationResult\x12\xa5\x01\n#delta_presence_estimation_histogram\x18\x01 \x03(\x0b\x32x.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket\x1a}\n$DeltaPresenceEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1d\n\x15\x65stimated_probability\x18\x02 \x01(\x01\x1a\x9b\x02\n&DeltaPresenceEstimationHistogramBucket\x12\x17\n\x0fmin_probability\x18\x01 \x01(\x01\x12\x17\n\x0fmax_probability\x18\x02 \x01(\x01\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12\x8d\x01\n\rbucket_values\x18\x06 \x03(\x0b\x32v.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a`\n\x1cRequestedRiskAnalysisOptions\x12@\n\njob_config\x18\x01 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigB\x08\n\x06result\"L\n\x0eValueFrequency\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb3\x02\n\x05Value\x12\x17\n\rinteger_value\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x17\n\rboolean_value\x18\x04 \x01(\x08H\x00\x12\x35\n\x0ftimestamp_value\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12,\n\ntime_value\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\x12\'\n\ndate_value\x18\x07 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x33\n\x11\x64\x61y_of_week_value\x18\x08 \x01(\x0e\x32\x16.google.type.DayOfWeekH\x00\x42\x06\n\x04type\"Q\n\tQuoteInfo\x12\x34\n\tdate_time\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DateTimeH\x00\x42\x0e\n\x0cparsed_quote\"\xdf\x01\n\x08\x44\x61teTime\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12;\n\ttime_zone\x18\x04 \x01(\x0b\x32(.google.privacy.dlp.v2.DateTime.TimeZone\x1a\"\n\x08TimeZone\x12\x16\n\x0eoffset_minutes\x18\x01 \x01(\x05\"\xf2\x02\n\x10\x44\x65identifyConfig\x12S\n\x19info_type_transformations\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x12N\n\x16record_transformations\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.RecordTransformationsH\x00\x12L\n\x15image_transformations\x18\x04 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageTransformationsH\x00\x12Y\n\x1dtransformation_error_handling\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.TransformationErrorHandlingB\x10\n\x0etransformation\"\xe5\x04\n\x14ImageTransformations\x12S\n\ntransforms\x18\x02 \x03(\x0b\x32?.google.privacy.dlp.v2.ImageTransformations.ImageTransformation\x1a\xf7\x03\n\x13ImageTransformation\x12p\n\x13selected_info_types\x18\x04 \x01(\x0b\x32Q.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesH\x00\x12\x66\n\x0e\x61ll_info_types\x18\x05 \x01(\x0b\x32L.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesH\x00\x12[\n\x08\x61ll_text\x18\x06 \x01(\x0b\x32G.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextH\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Color\x1aM\n\x11SelectedInfoTypes\x12\x38\n\ninfo_types\x18\x05 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeB\x03\xe0\x41\x02\x1a\x0e\n\x0c\x41llInfoTypes\x1a\t\n\x07\x41llTextB\x08\n\x06target\"\x85\x02\n\x1bTransformationErrorHandling\x12T\n\x0bthrow_error\x18\x01 \x01(\x0b\x32=.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorH\x00\x12\x64\n\x13leave_untransformed\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedH\x00\x1a\x0c\n\nThrowError\x1a\x14\n\x12LeaveUntransformedB\x06\n\x04mode\"\xca\x07\n\x17PrimitiveTransformation\x12\x43\n\x0ereplace_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.ReplaceValueConfigH\x00\x12<\n\rredact_config\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.RedactConfigH\x00\x12K\n\x15\x63haracter_mask_config\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CharacterMaskConfigH\x00\x12Y\n\x1d\x63rypto_replace_ffx_fpe_config\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigH\x00\x12V\n\x1b\x66ixed_size_bucketing_config\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.FixedSizeBucketingConfigH\x00\x12\x42\n\x10\x62ucketing_config\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.BucketingConfigH\x00\x12Y\n\x1dreplace_with_info_type_config\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigH\x00\x12\x41\n\x10time_part_config\x18\x08 \x01(\x0b\x32%.google.privacy.dlp.v2.TimePartConfigH\x00\x12\x45\n\x12\x63rypto_hash_config\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.CryptoHashConfigH\x00\x12\x43\n\x11\x64\x61te_shift_config\x18\x0b \x01(\x0b\x32&.google.privacy.dlp.v2.DateShiftConfigH\x00\x12W\n\x1b\x63rypto_deterministic_config\x18\x0c \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoDeterministicConfigH\x00\x12S\n\x19replace_dictionary_config\x18\r \x01(\x0b\x32..google.privacy.dlp.v2.ReplaceDictionaryConfigH\x00\x42\x10\n\x0etransformation\"\xdc\x01\n\x0eTimePartConfig\x12G\n\x0fpart_to_extract\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.TimePartConfig.TimePart\"\x80\x01\n\x08TimePart\x12\x19\n\x15TIME_PART_UNSPECIFIED\x10\x00\x12\x08\n\x04YEAR\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x10\n\x0c\x44\x41Y_OF_MONTH\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x10\n\x0cWEEK_OF_YEAR\x10\x05\x12\x0f\n\x0bHOUR_OF_DAY\x10\x06\"H\n\x10\x43ryptoHashConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\"\xc0\x01\n\x19\x43ryptoDeterministicConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\x12<\n\x13surrogate_info_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"E\n\x12ReplaceValueConfig\x12/\n\tnew_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"q\n\x17ReplaceDictionaryConfig\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x42\x06\n\x04type\"\x1b\n\x19ReplaceWithInfoTypeConfig\"\x0e\n\x0cRedactConfig\"\xb6\x02\n\rCharsToIgnore\x12\x1c\n\x12\x63haracters_to_skip\x18\x01 \x01(\tH\x00\x12_\n\x1b\x63ommon_characters_to_ignore\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnoreH\x00\"\x97\x01\n\x13\x43ommonCharsToIgnore\x12&\n\"COMMON_CHARS_TO_IGNORE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x14\n\x10\x41LPHA_UPPER_CASE\x10\x02\x12\x14\n\x10\x41LPHA_LOWER_CASE\x10\x03\x12\x0f\n\x0bPUNCTUATION\x10\x04\x12\x0e\n\nWHITESPACE\x10\x05\x42\x0c\n\ncharacters\"\xa3\x01\n\x13\x43haracterMaskConfig\x12\x19\n\x11masking_character\x18\x01 \x01(\t\x12\x16\n\x0enumber_to_mask\x18\x02 \x01(\x05\x12\x15\n\rreverse_order\x18\x03 \x01(\x08\x12\x42\n\x14\x63haracters_to_ignore\x18\x04 \x03(\x0b\x32$.google.privacy.dlp.v2.CharsToIgnore\"\xa4\x01\n\x18\x46ixedSizeBucketingConfig\x12\x36\n\x0blower_bound\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x36\n\x0bupper_bound\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_size\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\"\xf0\x01\n\x0f\x42ucketingConfig\x12>\n\x07\x62uckets\x18\x01 \x03(\x0b\x32-.google.privacy.dlp.v2.BucketingConfig.Bucket\x1a\x9c\x01\n\x06\x42ucket\x12)\n\x03min\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12)\n\x03max\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12<\n\x11replacement_value\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\"\xf9\x03\n\x19\x43ryptoReplaceFfxFpeConfig\x12\x39\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyB\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x63\n\x0f\x63ommon_alphabet\x18\x04 \x01(\x0e\x32H.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabetH\x00\x12\x19\n\x0f\x63ustom_alphabet\x18\x05 \x01(\tH\x00\x12\x0f\n\x05radix\x18\x06 \x01(\x05H\x00\x12<\n\x13surrogate_info_type\x18\x08 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\x94\x01\n\x17\x46\x66xCommonNativeAlphabet\x12*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x0f\n\x0bHEXADECIMAL\x10\x02\x12\x1c\n\x18UPPER_CASE_ALPHA_NUMERIC\x10\x03\x12\x11\n\rALPHA_NUMERIC\x10\x04\x42\n\n\x08\x61lphabet\"\xd8\x01\n\tCryptoKey\x12>\n\ttransient\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.TransientCryptoKeyH\x00\x12>\n\tunwrapped\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.UnwrappedCryptoKeyH\x00\x12\x41\n\x0bkms_wrapped\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.KmsWrappedCryptoKeyH\x00\x42\x08\n\x06source\"\'\n\x12TransientCryptoKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"&\n\x12UnwrappedCryptoKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"M\n\x13KmsWrappedCryptoKey\x12\x18\n\x0bwrapped_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x63rypto_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc2\x01\n\x0f\x44\x61teShiftConfig\x12\x1d\n\x10upper_bound_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10lower_bound_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x36\n\ncrypto_key\x18\x04 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyH\x00\x42\x08\n\x06method\"\xa5\x02\n\x17InfoTypeTransformations\x12\x63\n\x0ftransformations\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationB\x03\xe0\x41\x02\x1a\xa4\x01\n\x16InfoTypeTransformation\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12U\n\x18primitive_transformation\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationB\x03\xe0\x41\x02\"\xc0\x02\n\x13\x46ieldTransformation\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x39\n\tcondition\x18\x03 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\x12R\n\x18primitive_transformation\x18\x04 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationH\x00\x12S\n\x19info_type_transformations\x18\x05 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x42\x10\n\x0etransformation\"\xa9\x01\n\x15RecordTransformations\x12I\n\x15\x66ield_transformations\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x45\n\x13record_suppressions\x18\x02 \x03(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\"N\n\x11RecordSuppression\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\"\xdc\x04\n\x0fRecordCondition\x12G\n\x0b\x65xpressions\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.RecordCondition.Expressions\x1a\xae\x01\n\tCondition\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12@\n\x08operator\x18\x03 \x01(\x0e\x32).google.privacy.dlp.v2.RelationalOperatorB\x03\xe0\x41\x02\x12+\n\x05value\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1aR\n\nConditions\x12\x44\n\nconditions\x18\x01 \x03(\x0b\x32\x30.google.privacy.dlp.v2.RecordCondition.Condition\x1a\xfa\x01\n\x0b\x45xpressions\x12\\\n\x10logical_operator\x18\x01 \x01(\x0e\x32\x42.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator\x12G\n\nconditions\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.RecordCondition.ConditionsH\x00\"<\n\x0fLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x42\x06\n\x04type\"\x83\x01\n\x16TransformationOverview\x12\x19\n\x11transformed_bytes\x18\x02 \x01(\x03\x12N\n\x18transformation_summaries\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.TransformationSummary\"\x9f\x05\n\x15TransformationSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x46\n\x0etransformation\x18\x03 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformation\x12I\n\x15\x66ield_transformations\x18\x05 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x41\n\x0frecord_suppress\x18\x06 \x01(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\x12K\n\x07results\x18\x04 \x03(\x0b\x32:.google.privacy.dlp.v2.TransformationSummary.SummaryResult\x12\x19\n\x11transformed_bytes\x18\x07 \x01(\x03\x1a\x84\x01\n\rSummaryResult\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12S\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x45.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"^\n\x18TransformationResultCode\x12*\n&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xb0\x01\n\x19TransformationDescription\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.privacy.dlp.v2.TransformationType\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x11\n\tcondition\x18\x03 \x01(\t\x12\x32\n\tinfo_type\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xc6\x02\n\x15TransformationDetails\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x02 \x01(\t\x12H\n\x0etransformation\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.TransformationDescription\x12I\n\x0estatus_details\x18\x04 \x01(\x0b\x32\x31.google.privacy.dlp.v2.TransformationResultStatus\x12\x19\n\x11transformed_bytes\x18\x05 \x01(\x03\x12N\n\x17transformation_location\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationLocation\"\xd9\x01\n\x16TransformationLocation\x12\x14\n\nfinding_id\x18\x01 \x01(\tH\x00\x12L\n\x15record_transformation\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.RecordTransformationH\x00\x12J\n\x0e\x63ontainer_type\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.TransformationContainerTypeB\x0f\n\rlocation_type\"\x9c\x01\n\x14RecordTransformation\x12\x30\n\x08\x66ield_id\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x13\x63ontainer_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x03 \x01(\t\"\x94\x01\n\x1aTransformationResultStatus\x12Q\n\x12result_status_type\x18\x01 \x01(\x0e\x32\x35.google.privacy.dlp.v2.TransformationResultStatusType\x12#\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\"TransformationDetailsStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x42\x06\n\x04type\"U\n\x08Schedule\x12?\n\x1arecurrence_period_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x42\x08\n\x06option\"\x08\n\x06Manual\"\xc2\x04\n\x0fInspectTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0einspect_config\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig:\xc6\x02\xea\x41\xc2\x02\n\"dlp.googleapis.com/InspectTemplate\x12@organizations/{organization}/inspectTemplates/{inspect_template}\x12\x36projects/{project}/inspectTemplates/{inspect_template}\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\"\xe6\x04\n\x12\x44\x65identifyTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x11\x64\x65identify_config\x18\x06 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig:\xe1\x02\xea\x41\xdd\x02\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46organizations/{organization}/deidentifyTemplates/{deidentify_template}\x12\n\x0binspect_job\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12;\n\x08triggers\x18\x05 \x03(\x0b\x32).google.privacy.dlp.v2.JobTrigger.Trigger\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06status\x18\n \x01(\x0e\x32(.google.privacy.dlp.v2.JobTrigger.StatusB\x03\xe0\x41\x02\x1az\n\x07Trigger\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.ScheduleH\x00\x12/\n\x06manual\x18\x02 \x01(\x0b\x32\x1d.google.privacy.dlp.v2.ManualH\x00\x42\t\n\x07trigger\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCANCELLED\x10\x03:\x94\x01\xea\x41\x90\x01\n\x1d\x64lp.googleapis.com/JobTrigger\x12,projects/{project}/jobTriggers/{job_trigger}\x12\x41projects/{project}/locations/{location}/jobTriggers/{job_trigger}B\x05\n\x03job\"\xea\x08\n\x06\x41\x63tion\x12\x43\n\rsave_findings\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.Action.SaveFindingsH\x00\x12@\n\x07pub_sub\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.Action.PublishToPubSubH\x00\x12U\n\x17publish_summary_to_cscc\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishSummaryToCsccH\x00\x12q\n&publish_findings_to_cloud_data_catalog\x18\x05 \x01(\x0b\x32?.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogH\x00\x12>\n\ndeidentify\x18\x07 \x01(\x0b\x32(.google.privacy.dlp.v2.Action.DeidentifyH\x00\x12V\n\x17job_notification_emails\x18\x08 \x01(\x0b\x32\x33.google.privacy.dlp.v2.Action.JobNotificationEmailsH\x00\x12T\n\x16publish_to_stackdriver\x18\t \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishToStackdriverH\x00\x1aQ\n\x0cSaveFindings\x12\x41\n\routput_config\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.OutputStorageConfig\x1a \n\x0fPublishToPubSub\x12\r\n\x05topic\x18\x01 \x01(\t\x1a\x16\n\x14PublishSummaryToCscc\x1a#\n!PublishFindingsToCloudDataCatalog\x1a\xb3\x02\n\nDeidentify\x12J\n\x15transformation_config\x18\x07 \x01(\x0b\x32+.google.privacy.dlp.v2.TransformationConfig\x12h\n%transformation_details_storage_config\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.TransformationDetailsStorageConfig\x12#\n\x14\x63loud_storage_output\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12@\n\x17\x66ile_types_to_transform\x18\x08 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileTypeB\x08\n\x06output\x1a\x17\n\x15JobNotificationEmails\x1a\x16\n\x14PublishToStackdriverB\x08\n\x06\x61\x63tion\"z\n\x14TransformationConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12&\n\x1estructured_deidentify_template\x18\x02 \x01(\t\x12\x1d\n\x15image_redact_template\x18\x04 \x01(\t\"\xcb\x01\n\x1c\x43reateInspectTemplateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x45\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xcb\x01\n\x1cUpdateInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12@\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xa7\x01\n\x1bListInspectTemplatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"z\n\x1cListInspectTemplatesResponse\x12\x41\n\x11inspect_templates\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xb6\x01\n\x17\x43reateJobTriggerRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12;\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTriggerB\x03\xe0\x41\x02\x12\x12\n\ntrigger_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"P\n\x19\x41\x63tivateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb7\x01\n\x17UpdateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12\x36\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14GetJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb4\x01\n\x1c\x43reateDiscoveryConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12\x11\n\tconfig_id\x18\x03 \x01(\t\"\xd0\x01\n\x1cUpdateDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\x92\x01\n\x1bListDiscoveryConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\"z\n\x1cListDiscoveryConfigsResponse\x12\x41\n\x11\x64iscovery_configs\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\xf6\x01\n\x13\x43reateDlpJobRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12>\n\x0binspect_job\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12@\n\x08risk_job\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigH\x00\x12\x0e\n\x06job_id\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\tB\x05\n\x03job\"\xde\x01\n\x16ListJobTriggersRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12/\n\x04type\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"k\n\x17ListJobTriggersResponse\x12\x37\n\x0cjob_triggers\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x17\x44\x65leteJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xdd\x01\n\x10InspectJobConfig\x12<\n\x0estorage_config\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.StorageConfig\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x1d\n\x15inspect_template_name\x18\x03 \x01(\t\x12.\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xf2\r\n\x11\x44\x61taProfileAction\x12\x46\n\x0b\x65xport_data\x18\x01 \x01(\x0b\x32/.google.privacy.dlp.v2.DataProfileAction.ExportH\x00\x12[\n\x14pub_sub_notification\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationH\x00\x12[\n\x14publish_to_chronicle\x18\x03 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PublishToChronicleH\x00\x12\x61\n\x0epublish_to_scc\x18\x04 \x01(\x0b\x32G.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenterH\x00\x12N\n\rtag_resources\x18\x08 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DataProfileAction.TagResourcesH\x00\x12h\n\x1bpublish_to_dataplex_catalog\x18\t \x01(\x0b\x32\x41.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalogH\x00\x1a\x8a\x01\n\x06\x45xport\x12;\n\rprofile_table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x43\n\x15sample_findings_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x1a\x82\x03\n\x12PubSubNotification\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\x12K\n\x10pubsub_condition\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfilePubSubCondition\x12\x62\n\x11\x64\x65tail_of_message\x18\x04 \x01(\x0e\x32G.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel\"i\n\x0b\x44\x65tailLevel\x12\x1c\n\x18\x44\x45TAIL_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rTABLE_PROFILE\x10\x01\x12\x11\n\rRESOURCE_NAME\x10\x02\x12\x16\n\x12\x46ILE_STORE_PROFILE\x10\x03\x1a\x14\n\x12PublishToChronicle\x1a \n\x1ePublishToSecurityCommandCenter\x1a:\n\x18PublishToDataplexCatalog\x12\x1e\n\x16lower_data_risk_to_low\x18\x01 \x01(\x08\x1a\xb6\x03\n\x0cTagResources\x12Z\n\x0etag_conditions\x18\x01 \x03(\x0b\x32\x42.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition\x12L\n\x1aprofile_generations_to_tag\x18\x02 \x03(\x0e\x32(.google.privacy.dlp.v2.ProfileGeneration\x12\x1e\n\x16lower_data_risk_to_low\x18\x03 \x01(\x08\x1a\xa9\x01\n\x0cTagCondition\x12K\n\x03tag\x18\x01 \x01(\x0b\x32>.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue\x12\x44\n\x11sensitivity_score\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScoreH\x00\x42\x06\n\x04type\x1a\x30\n\x08TagValue\x12\x1a\n\x10namespaced_value\x18\x01 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"u\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_PROFILE\x10\x01\x12\x13\n\x0f\x43HANGED_PROFILE\x10\x02\x12\x13\n\x0fSCORE_INCREASED\x10\x03\x12\x11\n\rERROR_CHANGED\x10\x04\x42\x08\n\x06\x61\x63tion\"\xdd\x03\n\x12\x44\x61taProfileFinding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x31\n\x08infotype\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\nquote_info\x18\x03 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\"\n\x1a\x64\x61ta_profile_resource_name\x18\x04 \x01(\t\x12\x12\n\nfinding_id\x18\x05 \x01(\t\x12-\n\ttimestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x08location\x18\x07 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfileFindingLocation\x12\x46\n\x13resource_visibility\x18\x08 \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x1a\n\x12\x66ull_resource_name\x18\t \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\n \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\"\xb7\x01\n\x1a\x44\x61taProfileFindingLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12g\n$data_profile_finding_record_location\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DataProfileFindingRecordLocationH\x00\x42\x18\n\x16location_extra_details\"Q\n DataProfileFindingRecordLocation\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"\xae\x02\n\x14\x44\x61taProfileJobConfig\x12<\n\x08location\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.DataProfileLocation\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x61\n\x1dother_cloud_starting_location\x18\x08 \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x07 \x03(\t\x12\x46\n\x14\x64\x61ta_profile_actions\x18\x06 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\"[\n\rBigQueryRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x18\n\x10\x64\x61taset_id_regex\x18\x02 \x01(\t\x12\x16\n\x0etable_id_regex\x18\x03 \x01(\t\"I\n\x0f\x42igQueryRegexes\x12\x36\n\x08patterns\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2.BigQueryRegex\"M\n\x12\x42igQueryTableTypes\x12\x37\n\x05types\x18\x01 \x03(\x0e\x32(.google.privacy.dlp.v2.BigQueryTableType\"\n\n\x08\x44isabled\"Q\n\x13\x44\x61taProfileLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\xeb\x07\n\x0f\x44iscoveryConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x44\n\norg_config\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig\x12\x61\n\x1dother_cloud_starting_location\x18\x0c \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x03 \x03(\t\x12\x39\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\x12\x37\n\x07targets\x18\x05 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryTarget\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06status\x18\n \x01(\x0e\x32-.google.privacy.dlp.v2.DiscoveryConfig.StatusB\x03\xe0\x41\x02\x12K\n\x13processing_location\x18\r \x01(\x0b\x32).google.privacy.dlp.v2.ProcessingLocationB\x03\xe0\x41\x01\x1a\x63\n\tOrgConfig\x12\x42\n\x08location\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryStartingLocation\x12\x12\n\nproject_id\x18\x02 \x01(\t\"9\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02:t\xea\x41q\n\"dlp.googleapis.com/DiscoveryConfig\x12Kprojects/{project}/locations/{location}/discoveryConfigs/{discovery_config}\"\xf6\x03\n\x0f\x44iscoveryTarget\x12J\n\x10\x62ig_query_target\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryDiscoveryTargetH\x00\x12J\n\x10\x63loud_sql_target\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.CloudSqlDiscoveryTargetH\x00\x12G\n\x0esecrets_target\x18\x03 \x01(\x0b\x32-.google.privacy.dlp.v2.SecretsDiscoveryTargetH\x00\x12R\n\x14\x63loud_storage_target\x18\x04 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageDiscoveryTargetH\x00\x12N\n\x12other_cloud_target\x18\x05 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudDiscoveryTargetH\x00\x12T\n\x15vertex_dataset_target\x18\x07 \x01(\x0b\x32\x33.google.privacy.dlp.v2.VertexDatasetDiscoveryTargetH\x00\x42\x08\n\x06target\"\xae\x02\n\x17\x42igQueryDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryBigQueryFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryBigQueryConditions\x12\x44\n\x07\x63\x61\x64\x65nce\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DiscoveryGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\x0b\n\tfrequency\"\xa0\x02\n\x17\x44iscoveryBigQueryFilter\x12@\n\x06tables\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryTableCollectionH\x00\x12]\n\x0cother_tables\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTablesH\x00\x12@\n\x0ftable_reference\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.TableReferenceH\x00\x1a\x18\n\x16\x41llOtherBigQueryTablesB\x08\n\x06\x66ilter\"g\n\x17\x42igQueryTableCollection\x12\x41\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryRegexesH\x00\x42\t\n\x07pattern\"\x98\x03\n\x1b\x44iscoveryBigQueryConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x05types\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.BigQueryTableTypesH\x00\x12M\n\x0ftype_collection\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.BigQueryTableTypeCollectionH\x00\x12V\n\ror_conditions\x18\x04 \x01(\x0b\x32?.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions\x1aQ\n\x0cOrConditions\x12\x15\n\rmin_row_count\x18\x01 \x01(\x05\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\n\x0eincluded_types\"\x83\x03\n\x1a\x44iscoveryGenerationCadence\x12V\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence\x12T\n\x16table_modified_cadence\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryTableModifiedCadence\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x12L\n\x11refresh_frequency\x18\x04 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa6\x01\n\x1d\x44iscoveryTableModifiedCadence\x12?\n\x05types\x18\x01 \x03(\x0e\x32\x30.google.privacy.dlp.v2.BigQueryTableModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa8\x01\n\x1e\x44iscoverySchemaModifiedCadence\x12@\n\x05types\x18\x01 \x03(\x0e\x32\x31.google.privacy.dlp.v2.BigQuerySchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"o\n\'DiscoveryInspectTemplateModifiedCadence\x12\x44\n\tfrequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xbf\x02\n\x17\x43loudSqlDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryCloudSqlFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudSqlConditions\x12W\n\x12generation_cadence\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x89\x02\n\x17\x44iscoveryCloudSqlFilter\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DatabaseResourceCollectionH\x00\x12\x42\n\x06others\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AllOtherDatabaseResourcesH\x00\x12W\n\x1b\x64\x61tabase_resource_reference\x18\x03 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DatabaseResourceReferenceH\x00\x42\x08\n\x06\x66ilter\"r\n\x1a\x44\x61tabaseResourceCollection\x12I\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DatabaseResourceRegexesH\x00\x42\t\n\x07pattern\"Y\n\x17\x44\x61tabaseResourceRegexes\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32,.google.privacy.dlp.v2.DatabaseResourceRegex\"\x87\x01\n\x15\x44\x61tabaseResourceRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x16\n\x0einstance_regex\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x61tabase_regex\x18\x03 \x01(\t\x12$\n\x1c\x64\x61tabase_resource_name_regex\x18\x04 \x01(\t\"\x1b\n\x19\x41llOtherDatabaseResources\"\x82\x01\n\x19\x44\x61tabaseResourceReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64\x61tabase\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x64\x61tabase_resource\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xda\x03\n\x1b\x44iscoveryCloudSqlConditions\x12`\n\x10\x64\x61tabase_engines\x18\x01 \x03(\x0e\x32\x41.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngineB\x03\xe0\x41\x01\x12V\n\x05types\x18\x03 \x03(\x0e\x32G.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType\"n\n\x0e\x44\x61tabaseEngine\x12\x1f\n\x1b\x44\x41TABASE_ENGINE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41LL_SUPPORTED_DATABASE_ENGINES\x10\x01\x12\t\n\x05MYSQL\x10\x02\x12\x0c\n\x08POSTGRES\x10\x03\"\x90\x01\n\x14\x44\x61tabaseResourceType\x12&\n\"DATABASE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12.\n*DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES\x10\x01\x12 \n\x1c\x44\x41TABASE_RESOURCE_TYPE_TABLE\x10\x02\"\x97\x05\n\"DiscoveryCloudSqlGenerationCadence\x12p\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32O.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence\x12L\n\x11refresh_frequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x1a\xc5\x02\n\x15SchemaModifiedCadence\x12y\n\x05types\x18\x01 \x03(\x0e\x32j.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"k\n\x1a\x43loudSqlSchemaModification\x12\'\n#SQL_SCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_COLUMNS\x10\x01\x12\x13\n\x0fREMOVED_COLUMNS\x10\x02\"\x18\n\x16SecretsDiscoveryTarget\"\xdb\x02\n\x1b\x43loudStorageDiscoveryTarget\x12G\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudStorageFilterB\x03\xe0\x41\x02\x12L\n\nconditions\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryFileStoreConditionsB\x03\xe0\x41\x01\x12`\n\x12generation_cadence\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadenceB\x03\xe0\x41\x01H\x00\x12\x38\n\x08\x64isabled\x18\x03 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x96\x02\n\x1b\x44iscoveryCloudStorageFilter\x12\x45\n\ncollection\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.FileStoreCollectionB\x03\xe0\x41\x01H\x00\x12\x65\n cloud_storage_resource_reference\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.CloudStorageResourceReferenceB\x03\xe0\x41\x01H\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"i\n\x13\x46ileStoreCollection\x12G\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.FileStoreRegexesB\x03\xe0\x41\x01H\x00\x42\t\n\x07pattern\"P\n\x10\x46ileStoreRegexes\x12<\n\x08patterns\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.FileStoreRegexB\x03\xe0\x41\x02\"p\n\x0e\x46ileStoreRegex\x12L\n\x13\x63loud_storage_regex\x18\x01 \x01(\x0b\x32(.google.privacy.dlp.v2.CloudStorageRegexB\x03\xe0\x41\x01H\x00\x42\x10\n\x0eresource_regex\"R\n\x11\x43loudStorageRegex\x12\x1d\n\x10project_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"R\n\x1d\x43loudStorageResourceReference\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x01\n&DiscoveryCloudStorageGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"\x9b\x05\n\x1f\x44iscoveryCloudStorageConditions\x12{\n\x1aincluded_object_attributes\x18\x01 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttributeB\x03\xe0\x41\x02\x12{\n\x1aincluded_bucket_attributes\x18\x02 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttributeB\x03\xe0\x41\x02\"\xe3\x01\n\x1b\x43loudStorageObjectAttribute\x12.\n*CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_OBJECTS\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08NEARLINE\x10\x03\x12\x0c\n\x08\x43OLDLINE\x10\x04\x12\x0b\n\x07\x41RCHIVE\x10\x05\x12\x0c\n\x08REGIONAL\x10\x06\x12\x12\n\x0eMULTI_REGIONAL\x10\x07\x12 \n\x1c\x44URABLE_REDUCED_AVAILABILITY\x10\x08\"\x97\x01\n\x1b\x43loudStorageBucketAttribute\x12.\n*CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_BUCKETS\x10\x01\x12\x16\n\x12\x41UTOCLASS_DISABLED\x10\x02\x12\x15\n\x11\x41UTOCLASS_ENABLED\x10\x03\"\xf6\x01\n\x1c\x44iscoveryFileStoreConditions\x12\x36\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12/\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12_\n\x18\x63loud_storage_conditions\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.DiscoveryCloudStorageConditionsB\x03\xe0\x41\x01H\x00\x42\x0c\n\nconditions\"\x92\x03\n\x19OtherCloudDiscoveryTarget\x12\x44\n\x10\x64\x61ta_source_type\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceTypeB\x03\xe0\x41\x02\x12\x45\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryOtherCloudFilterB\x03\xe0\x41\x02\x12M\n\nconditions\x18\x03 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryOtherCloudConditionsB\x03\xe0\x41\x01\x12Y\n\x12generation_cadence\x18\x04 \x01(\x0b\x32;.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x05 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x86\x02\n\x19\x44iscoveryOtherCloudFilter\x12I\n\ncollection\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.OtherCloudResourceCollectionH\x00\x12S\n\x0fsingle_resource\x18\x02 \x01(\x0b\x32\x38.google.privacy.dlp.v2.OtherCloudSingleResourceReferenceH\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"v\n\x1cOtherCloudResourceCollection\x12K\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudResourceRegexesH\x00\x42\t\n\x07pattern\"]\n\x19OtherCloudResourceRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32..google.privacy.dlp.v2.OtherCloudResourceRegex\"y\n\x17OtherCloudResourceRegex\x12L\n\x16\x61mazon_s3_bucket_regex\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.AmazonS3BucketRegexH\x00\x42\x10\n\x0eresource_regex\"0\n\x0f\x41wsAccountRegex\x12\x1d\n\x10\x61\x63\x63ount_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\"x\n\x13\x41mazonS3BucketRegex\x12\x41\n\x11\x61ws_account_regex\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.AwsAccountRegex\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n!OtherCloudSingleResourceReference\x12\x41\n\x10\x61mazon_s3_bucket\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.AmazonS3BucketH\x00\x42\n\n\x08resource\"%\n\nAwsAccount\x12\x17\n\naccount_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x0e\x41mazonS3Bucket\x12\x36\n\x0b\x61ws_account\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2.AwsAccount\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x1d\x44iscoveryOtherCloudConditions\x12*\n\x07min_age\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12V\n\x1b\x61mazon_s3_bucket_conditions\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.AmazonS3BucketConditionsH\x00\x42\x0c\n\nconditions\"\xd9\x03\n\x18\x41mazonS3BucketConditions\x12U\n\x0c\x62ucket_types\x18\x01 \x03(\x0e\x32:.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketTypeB\x03\xe0\x41\x01\x12g\n\x16object_storage_classes\x18\x02 \x03(\x0e\x32\x42.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClassB\x03\xe0\x41\x01\"T\n\nBucketType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12TYPE_ALL_SUPPORTED\x10\x01\x12\x18\n\x14TYPE_GENERAL_PURPOSE\x10\x02\"\xa6\x01\n\x12ObjectStorageClass\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_CLASSES\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x1e\n\x1aSTANDARD_INFREQUENT_ACCESS\x10\x04\x12\x1d\n\x19GLACIER_INSTANT_RETRIEVAL\x10\x06\x12\x17\n\x13INTELLIGENT_TIERING\x10\x07\"\xe9\x01\n$DiscoveryOtherCloudGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"W\n\x19\x44iscoveryStartingLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\x87\x02\n#OtherCloudDiscoveryStartingLocation\x12o\n\x0c\x61ws_location\x18\x01 \x01(\x0b\x32W.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocationH\x00\x1a\x63\n\x1c\x41wsDiscoveryStartingLocation\x12\x14\n\naccount_id\x18\x02 \x01(\tH\x00\x12$\n\x1a\x61ll_asset_inventory_assets\x18\x03 \x01(\x08H\x00\x42\x07\n\x05scopeB\n\n\x08location\"\x13\n\x11\x41llOtherResources\"\xd3\x02\n\x1cVertexDatasetDiscoveryTarget\x12H\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryVertexDatasetFilterB\x03\xe0\x41\x02\x12K\n\nconditions\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions\x12\\\n\x12generation_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x8e\x02\n\x1c\x44iscoveryVertexDatasetFilter\x12\x44\n\ncollection\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.VertexDatasetCollectionH\x00\x12\x62\n!vertex_dataset_resource_reference\x18\x02 \x01(\x0b\x32\x35.google.privacy.dlp.v2.VertexDatasetResourceReferenceH\x00\x12:\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesH\x00\x42\x08\n\x06\x66ilter\"s\n\x17VertexDatasetCollection\x12M\n\x16vertex_dataset_regexes\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.VertexDatasetRegexesH\x00\x42\t\n\x07pattern\"X\n\x14VertexDatasetRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.VertexDatasetRegexB\x03\xe0\x41\x02\".\n\x12VertexDatasetRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\"D\n\x1eVertexDatasetResourceReference\x12\"\n\x15\x64\x61taset_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n DiscoveryVertexDatasetConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe2\x01\n\'DiscoveryVertexDatasetGenerationCadence\x12L\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\"\xdc\x06\n\x06\x44lpJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2.DlpJob.JobState\x12K\n\x0crisk_details\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsH\x00\x12J\n\x0finspect_details\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.InspectDataSourceDetailsH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_modified\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10job_trigger_name\x18\n \x01(\t\x12,\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12<\n\x0e\x61\x63tion_details\x18\x0c \x03(\x0b\x32$.google.privacy.dlp.v2.ActionDetails\"o\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06:\x7f\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}B\t\n\x07\x64\x65tails\"C\n\x10GetDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd6\x01\n\x12ListDlpJobsRequest\x12\x31\n\x06parent\x18\x04 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\x04type\x18\x05 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"[\n\x13ListDlpJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.DlpJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x13\x43\x61ncelDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x46inishDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x44\x65leteDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd7\x01\n\x1f\x43reateDeidentifyTemplateRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12K\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xd7\x01\n\x1fUpdateDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x1cGetDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xad\x01\n\x1eListDeidentifyTemplatesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"\x83\x01\n\x1fListDeidentifyTemplatesResponse\x12G\n\x14\x64\x65identify_templates\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1f\x44\x65leteDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xf4\x01\n\x1bLargeCustomDictionaryConfig\x12<\n\x0boutput_path\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePath\x12L\n\x16\x63loud_storage_file_set\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageFileSetH\x00\x12?\n\x0f\x62ig_query_field\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryFieldH\x00\x42\x08\n\x06source\"8\n\x1aLargeCustomDictionaryStats\x12\x1a\n\x12\x61pprox_num_phrases\x18\x01 \x01(\x03\"\xa6\x02\n\x14StoredInfoTypeConfig\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\x17large_custom_dictionary\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.LargeCustomDictionaryConfigH\x00\x12\x46\n\ndictionary\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x05 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x42\x06\n\x04type\"s\n\x13StoredInfoTypeStats\x12T\n\x17large_custom_dictionary\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.LargeCustomDictionaryStatsH\x00\x42\x06\n\x04type\"\xa9\x02\n\x15StoredInfoTypeVersion\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.google.privacy.dlp.v2.StoredInfoTypeState\x12,\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12\x39\n\x05stats\x18\x05 \x01(\x0b\x32*.google.privacy.dlp.v2.StoredInfoTypeStats\"\xf1\x03\n\x0eStoredInfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0f\x63urrent_version\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion\x12\x46\n\x10pending_versions\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion:\xc1\x02\xea\x41\xbd\x02\n!dlp.googleapis.com/StoredInfoType\x12?organizations/{organization}/storedInfoTypes/{stored_info_type}\x12\x35projects/{project}/storedInfoTypes/{stored_info_type}\x12Torganizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}\x12Jprojects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}\"\xcc\x01\n\x1b\x43reateStoredInfoTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfigB\x03\xe0\x41\x02\x12\x1b\n\x13stored_info_type_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xc4\x01\n\x1bUpdateStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x18GetStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\xa5\x01\n\x1aListStoredInfoTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"x\n\x1bListStoredInfoTypesResponse\x12@\n\x11stored_info_types\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.StoredInfoType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x1b\x44\x65leteStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\x94\x01\n\x1eHybridInspectJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8c\x01\n\x1aHybridInspectDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8b\x01\n\x11HybridContentItem\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x44\n\x0f\x66inding_details\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.HybridFindingDetails\"\xb0\x02\n\x14HybridFindingDetails\x12;\n\x11\x63ontainer_details\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\x12\x13\n\x0b\x66ile_offset\x18\x02 \x01(\x03\x12\x12\n\nrow_offset\x18\x03 \x01(\x03\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x12G\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.privacy.dlp.v2.HybridFindingDetails.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x17\n\x15HybridInspectResponse\"\xa8\x01\n\x1eListProjectDataProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/ProjectDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x84\x01\n\x1fListProjectDataProfilesResponse\x12H\n\x15project_data_profiles\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.ProjectDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n\x1cListTableDataProfilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#dlp.googleapis.com/TableDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"~\n\x1dListTableDataProfilesResponse\x12\x44\n\x13table_data_profiles\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa6\x01\n\x1dListColumnDataProfilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dlp.googleapis.com/ColumnDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x81\x01\n\x1eListColumnDataProfilesResponse\x12\x46\n\x14\x63olumn_data_profiles\x18\x01 \x03(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n\rDataRiskLevel\x12\x46\n\x05score\x18\x01 \x01(\x0e\x32\x37.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore\"r\n\x12\x44\x61taRiskLevelScore\x12\x1a\n\x16RISK_SCORE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RISK_LOW\x10\n\x12\x10\n\x0cRISK_UNKNOWN\x10\x0c\x12\x11\n\rRISK_MODERATE\x10\x14\x12\r\n\tRISK_HIGH\x10\x1e\"\xdc\x04\n\x12ProjectDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11sensitivity_score\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x05 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12<\n\x0eprofile_status\x18\x07 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12 \n\x18table_data_profile_count\x18\t \x01(\x03\x12%\n\x1d\x66ile_store_data_profile_count\x18\n \x01(\x03:\xdd\x01\xea\x41\xd9\x01\n%dlp.googleapis.com/ProjectDataProfile\x12\\organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}\x12Rprojects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}\"\xc9\x02\n\x19\x44\x61taProfileConfigSnapshot\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12I\n\x10\x64\x61ta_profile_job\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.DataProfileJobConfigB\x02\x18\x01\x12@\n\x10\x64iscovery_config\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12\x42\n\x1einspect_template_modified_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe3\r\n\x10TableDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18$ \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x02 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x18 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x1d \x01(\t\x12\x12\n\ndataset_id\x18\x19 \x01(\t\x12\x10\n\x08table_id\x18\x1a \x01(\t\x12\x15\n\rfull_resource\x18\x03 \x01(\t\x12<\n\x0eprofile_status\x18\x15 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12<\n\x05state\x18\x16 \x01(\x0e\x32-.google.privacy.dlp.v2.TableDataProfile.State\x12\x42\n\x11sensitivity_score\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12\x44\n\x14predicted_info_types\x18\x1b \x03(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x45\n\x10other_info_types\x18\x1c \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14scanned_column_count\x18\n \x01(\x03\x12\x1b\n\x13\x66\x61iled_column_count\x18\x0b \x01(\x03\x12\x18\n\x10table_size_bytes\x18\x0c \x01(\x03\x12\x11\n\trow_count\x18\r \x01(\x03\x12\x42\n\x11\x65ncryption_status\x18\x0e \x01(\x0e\x32\'.google.privacy.dlp.v2.EncryptionStatus\x12\x46\n\x13resource_visibility\x18\x0f \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12:\n\x16profile_last_generated\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fresource_labels\x18\x11 \x03(\x0b\x32;.google.privacy.dlp.v2.TableDataProfile.ResourceLabelsEntry\x12/\n\x0b\x63reate_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x15sample_findings_table\x18% \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12(\n\x04tags\x18\' \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18) \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xd3\x01\xea\x41\xcf\x01\n#dlp.googleapis.com/TableDataProfile\x12Xorganizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}\x12Nprojects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}\"b\n\rProfileStatus\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"g\n\x0fInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12 \n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x42\x02\x18\x01\"\x88\x01\n\x14OtherInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x1c\n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x12\x1e\n\x16\x65xcluded_from_analysis\x18\x03 \x01(\x08\"\xc9\r\n\x11\x43olumnDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x0eprofile_status\x18\x11 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12=\n\x05state\x18\x12 \x01(\x0e\x32..google.privacy.dlp.v2.ColumnDataProfile.State\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12table_data_profile\x18\x04 \x01(\t\x12\x1b\n\x13table_full_resource\x18\x05 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x13 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x14 \x01(\t\x12\x12\n\ndataset_id\x18\x15 \x01(\t\x12\x10\n\x08table_id\x18\x16 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x06 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x07 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12@\n\x10\x63olumn_info_type\x18\t \x01(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x42\n\rother_matches\x18\n \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12M\n\x19\x65stimated_null_percentage\x18\x17 \x01(\x0e\x32*.google.privacy.dlp.v2.NullPercentageLevel\x12O\n\x1a\x65stimated_uniqueness_score\x18\x18 \x01(\x0e\x32+.google.privacy.dlp.v2.UniquenessScoreLevel\x12\x17\n\x0f\x66ree_text_score\x18\r \x01(\x01\x12L\n\x0b\x63olumn_type\x18\x0e \x01(\x0e\x32\x37.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType\x12P\n\x0cpolicy_state\x18\x0f \x01(\x0e\x32:.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\"\xff\x02\n\x0e\x43olumnDataType\x12 \n\x1c\x43OLUMN_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTYPE_INT64\x10\x01\x12\r\n\tTYPE_BOOL\x10\x02\x12\x10\n\x0cTYPE_FLOAT64\x10\x03\x12\x0f\n\x0bTYPE_STRING\x10\x04\x12\x0e\n\nTYPE_BYTES\x10\x05\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x06\x12\r\n\tTYPE_DATE\x10\x07\x12\r\n\tTYPE_TIME\x10\x08\x12\x11\n\rTYPE_DATETIME\x10\t\x12\x12\n\x0eTYPE_GEOGRAPHY\x10\n\x12\x10\n\x0cTYPE_NUMERIC\x10\x0b\x12\x0f\n\x0bTYPE_RECORD\x10\x0c\x12\x13\n\x0fTYPE_BIGNUMERIC\x10\r\x12\r\n\tTYPE_JSON\x10\x0e\x12\x11\n\rTYPE_INTERVAL\x10\x0f\x12\x13\n\x0fTYPE_RANGE_DATE\x10\x10\x12\x17\n\x13TYPE_RANGE_DATETIME\x10\x11\x12\x18\n\x14TYPE_RANGE_TIMESTAMP\x10\x12\"R\n\x11\x43olumnPolicyState\x12#\n\x1f\x43OLUMN_POLICY_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x43OLUMN_POLICY_TAGGED\x10\x01:\xd8\x01\xea\x41\xd4\x01\n$dlp.googleapis.com/ColumnDataProfile\x12Zorganizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}\x12Pprojects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}\"\xb8\x0e\n\x14\x46ileStoreDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x03 \x01(\t\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x1b\n\x13\x66ile_store_location\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_storage_locations\x18\x13 \x03(\t\x12\x15\n\rlocation_type\x18\x14 \x01(\t\x12\x17\n\x0f\x66ile_store_path\x18\x06 \x01(\t\x12\x15\n\rfull_resource\x18\x18 \x01(\t\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12<\n\x0eprofile_status\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12@\n\x05state\x18\t \x01(\x0e\x32\x31.google.privacy.dlp.v2.FileStoreDataProfile.State\x12:\n\x16profile_last_generated\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x13resource_visibility\x18\x0b \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x42\n\x11sensitivity_score\x18\x0c \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\r \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16\x66ile_cluster_summaries\x18\x10 \x03(\x0b\x32).google.privacy.dlp.v2.FileClusterSummary\x12`\n\x13resource_attributes\x18\x11 \x03(\x0b\x32\x43.google.privacy.dlp.v2.FileStoreDataProfile.ResourceAttributesEntry\x12X\n\x0fresource_labels\x18\x12 \x03(\x0b\x32?.google.privacy.dlp.v2.FileStoreDataProfile.ResourceLabelsEntry\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x15 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x43\n\x15sample_findings_table\x18\x16 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x1b\n\x13\x66ile_store_is_empty\x18\x17 \x01(\x08\x12(\n\x04tags\x18\x19 \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18\x1a \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x1aW\n\x17ResourceAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xe9\x01\xea\x41\xe5\x01\n\'dlp.googleapis.com/FileStoreDataProfile\x12\x61organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\x12Wprojects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\"?\n\x03Tag\x12\x1c\n\x14namespaced_tag_value\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"(\n\x0fRelatedResource\x12\x15\n\rfull_resource\x18\x01 \x01(\t\"N\n\x18\x46ileStoreInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"+\n\x11\x46ileExtensionInfo\x12\x16\n\x0e\x66ile_extension\x18\x01 \x01(\t\"\x8c\x04\n\x12\x46ileClusterSummary\x12\x41\n\x11\x66ile_cluster_type\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.FileClusterType\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12,\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12I\n\x17\x66ile_extensions_scanned\x18\x07 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x46\n\x14\x66ile_extensions_seen\x18\x08 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x16\n\x0eno_files_exist\x18\t \x01(\x08\"[\n\x1cGetProjectDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"]\n\x1eGetFileStoreDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"\xc0\x01\n ListFileStoreDataProfilesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dlp.googleapis.com/FileStoreDataProfile\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!ListFileStoreDataProfilesResponse\x12M\n\x18\x66ile_store_data_profiles\x18\x01 \x03(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n!DeleteFileStoreDataProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dlp.googleapis.com/FileStoreDataProfile\"W\n\x1aGetTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"Y\n\x1bGetColumnDataProfileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dlp.googleapis.com/ColumnDataProfile\"\xea\x05\n\x1a\x44\x61taProfilePubSubCondition\x12X\n\x0b\x65xpressions\x18\x01 \x01(\x0b\x32\x43.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions\x1a\xe9\x01\n\x0fPubSubCondition\x12\x62\n\x12minimum_risk_score\x18\x01 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x12i\n\x19minimum_sensitivity_score\x18\x02 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x42\x07\n\x05value\x1a\xab\x02\n\x11PubSubExpressions\x12s\n\x10logical_operator\x18\x01 \x01(\x0e\x32Y.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator\x12U\n\nconditions\x18\x02 \x03(\x0b\x32\x41.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition\"J\n\x15PubSubLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02OR\x10\x01\x12\x07\n\x03\x41ND\x10\x02\"X\n\x12ProfileScoreBucket\x12$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x12\n\x0eMEDIUM_OR_HIGH\x10\x02\"\xe0\x01\n\x18\x44\x61taProfilePubSubMessage\x12\x38\n\x07profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12G\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\"\x8c\x01\n\x17\x43reateConnectionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\"K\n\x14GetConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x95\x01\n\x16ListConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x18SearchConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x17ListConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x19SearchConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x01\n\x17UpdateConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x17\x44\x65leteConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x90\x03\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2.ConnectionStateB\x03\xe0\x41\x02\x12\x31\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12>\n\tcloud_sql\x18\x04 \x01(\x0b\x32).google.privacy.dlp.v2.CloudSqlPropertiesH\x00:\xb1\x01\xea\x41\xad\x01\n\x1d\x64lp.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}\x12Jorganizations/{organization}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"[\n\x17SecretManagerCredential\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x1cpassword_secret_version_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x43loudSqlIamCredential\"\xb5\x03\n\x12\x43loudSqlProperties\x12\x1f\n\x0f\x63onnection_name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12K\n\x11username_password\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.SecretManagerCredentialH\x00\x12\x45\n\rcloud_sql_iam\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.CloudSqlIamCredentialH\x00\x12\x1c\n\x0fmax_connections\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12V\n\x0f\x64\x61tabase_engine\x18\x07 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngineB\x03\xe0\x41\x02\"f\n\x0e\x44\x61tabaseEngine\x12\x1b\n\x17\x44\x41TABASE_ENGINE_UNKNOWN\x10\x00\x12\x19\n\x15\x44\x41TABASE_ENGINE_MYSQL\x10\x01\x12\x1c\n\x18\x44\x41TABASE_ENGINE_POSTGRES\x10\x02\x42\x0c\n\ncredential\"Z\n\x1d\x44\x65leteTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"*\n\x0e\x44\x61taSourceType\x12\x18\n\x0b\x64\x61ta_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xf4\x02\n\x0f\x46ileClusterType\x12\x41\n\x07\x63luster\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.FileClusterType.ClusterH\x00\"\x88\x02\n\x07\x43luster\x12\x17\n\x13\x43LUSTER_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_UNKNOWN\x10\x01\x12\x10\n\x0c\x43LUSTER_TEXT\x10\x02\x12\x1b\n\x17\x43LUSTER_STRUCTURED_DATA\x10\x03\x12\x17\n\x13\x43LUSTER_SOURCE_CODE\x10\x04\x12\x19\n\x15\x43LUSTER_RICH_DOCUMENT\x10\x05\x12\x11\n\rCLUSTER_IMAGE\x10\x06\x12\x13\n\x0f\x43LUSTER_ARCHIVE\x10\x07\x12\x16\n\x12\x43LUSTER_MULTIMEDIA\x10\x08\x12\x16\n\x12\x43LUSTER_EXECUTABLE\x10\t\x12\x14\n\x10\x43LUSTER_AI_MODEL\x10\nB\x13\n\x11\x66ile_cluster_type\"\xf7\x02\n\x12ProcessingLocation\x12`\n\x17image_fallback_location\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation\x1a\x17\n\x15MultiRegionProcessing\x1a\x12\n\x10GlobalProcessing\x1a\xd1\x01\n\x15ImageFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing*\xa0\x01\n\x1eTransformationResultStatusType\x12\x1a\n\x16STATE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11INVALID_TRANSFORM\x10\x01\x12\"\n\x1e\x42IGQUERY_MAX_ROW_SIZE_EXCEEDED\x10\x02\x12\x1a\n\x16METADATA_UNRETRIEVABLE\x10\x03\x12\x0b\n\x07SUCCESS\x10\x04*\x7f\n\x1bTransformationContainerType\x12\x1f\n\x1bTRANSFORM_UNKNOWN_CONTAINER\x10\x00\x12\x12\n\x0eTRANSFORM_BODY\x10\x01\x12\x16\n\x12TRANSFORM_METADATA\x10\x02\x12\x13\n\x0fTRANSFORM_TABLE\x10\x03*\xe0\x02\n\x12TransformationType\x12#\n\x1fTRANSFORMATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_SUPPRESSION\x10\x01\x12\x11\n\rREPLACE_VALUE\x10\x02\x12\x16\n\x12REPLACE_DICTIONARY\x10\x0f\x12\n\n\x06REDACT\x10\x03\x12\x12\n\x0e\x43HARACTER_MASK\x10\x04\x12\x1a\n\x16\x43RYPTO_REPLACE_FFX_FPE\x10\x05\x12\x18\n\x14\x46IXED_SIZE_BUCKETING\x10\x06\x12\r\n\tBUCKETING\x10\x07\x12\x1a\n\x16REPLACE_WITH_INFO_TYPE\x10\x08\x12\r\n\tTIME_PART\x10\t\x12\x0f\n\x0b\x43RYPTO_HASH\x10\n\x12\x0e\n\nDATE_SHIFT\x10\x0c\x12\x1f\n\x1b\x43RYPTO_DETERMINISTIC_CONFIG\x10\r\x12\x10\n\x0cREDACT_IMAGE\x10\x0e*r\n\x11ProfileGeneration\x12\"\n\x1ePROFILE_GENERATION_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROFILE_GENERATION_NEW\x10\x01\x12\x1d\n\x19PROFILE_GENERATION_UPDATE\x10\x02*\x96\x01\n\x1b\x42igQueryTableTypeCollection\x12$\n BIG_QUERY_COLLECTION_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_COLLECTION_ALL_TYPES\x10\x01\x12-\n)BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES\x10\x02*\xa8\x01\n\x11\x42igQueryTableType\x12$\n BIG_QUERY_TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x42IG_QUERY_TABLE_TYPE_TABLE\x10\x01\x12*\n&BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE\x10\x02\x12!\n\x1d\x42IG_QUERY_TABLE_TYPE_SNAPSHOT\x10\x03*\x94\x01\n\x1a\x44\x61taProfileUpdateFrequency\x12 \n\x1cUPDATE_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPDATE_FREQUENCY_NEVER\x10\x01\x12\x1a\n\x16UPDATE_FREQUENCY_DAILY\x10\x02\x12\x1c\n\x18UPDATE_FREQUENCY_MONTHLY\x10\x04*]\n\x19\x42igQueryTableModification\x12\"\n\x1eTABLE_MODIFICATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18TABLE_MODIFIED_TIMESTAMP\x10\x01*u\n\x1a\x42igQuerySchemaModification\x12#\n\x1fSCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SCHEMA_NEW_COLUMNS\x10\x01\x12\x1a\n\x16SCHEMA_REMOVED_COLUMNS\x10\x02*\xbb\x01\n\x12RelationalOperator\x12#\n\x1fRELATIONAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45QUAL_TO\x10\x01\x12\x10\n\x0cNOT_EQUAL_TO\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x05\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x06\x12\n\n\x06\x45XISTS\x10\x07*\x8d\x01\n\x0cMatchingType\x12\x1d\n\x19MATCHING_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18MATCHING_TYPE_FULL_MATCH\x10\x01\x12\x1f\n\x1bMATCHING_TYPE_PARTIAL_MATCH\x10\x02\x12\x1f\n\x1bMATCHING_TYPE_INVERSE_MATCH\x10\x03*M\n\rContentOption\x12\x17\n\x13\x43ONTENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONTENT_TEXT\x10\x01\x12\x11\n\rCONTENT_IMAGE\x10\x02*B\n\x0cMetadataType\x12\x1c\n\x18METADATATYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STORAGE_METADATA\x10\x02*P\n\x13InfoTypeSupportedBy\x12\x19\n\x15\x45NUM_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INSPECT\x10\x01\x12\x11\n\rRISK_ANALYSIS\x10\x02*R\n\nDlpJobType\x12\x1c\n\x18\x44LP_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINSPECT_JOB\x10\x01\x12\x15\n\x11RISK_ANALYSIS_JOB\x10\x02*n\n\x13StoredInfoTypeState\x12&\n\"STORED_INFO_TYPE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07INVALID\x10\x04*\xa3\x01\n\x12ResourceVisibility\x12#\n\x1fRESOURCE_VISIBILITY_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_VISIBILITY_PUBLIC\x10\n\x12$\n RESOURCE_VISIBILITY_INCONCLUSIVE\x10\x0f\x12\"\n\x1eRESOURCE_VISIBILITY_RESTRICTED\x10\x14*u\n\x10\x45ncryptionStatus\x12!\n\x1d\x45NCRYPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NCRYPTION_GOOGLE_MANAGED\x10\x01\x12\x1f\n\x1b\x45NCRYPTION_CUSTOMER_MANAGED\x10\x02*\xa9\x01\n\x13NullPercentageLevel\x12%\n!NULL_PERCENTAGE_LEVEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18NULL_PERCENTAGE_VERY_LOW\x10\x01\x12\x17\n\x13NULL_PERCENTAGE_LOW\x10\x02\x12\x1a\n\x16NULL_PERCENTAGE_MEDIUM\x10\x03\x12\x18\n\x14NULL_PERCENTAGE_HIGH\x10\x04*\x90\x01\n\x14UniquenessScoreLevel\x12&\n\"UNIQUENESS_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x18\n\x14UNIQUENESS_SCORE_LOW\x10\x01\x12\x1b\n\x17UNIQUENESS_SCORE_MEDIUM\x10\x02\x12\x19\n\x15UNIQUENESS_SCORE_HIGH\x10\x03*f\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13MISSING_CREDENTIALS\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xddv\n\nDlpService\x12\xdb\x01\n\x0eInspectContent\x12,.google.privacy.dlp.v2.InspectContentRequest\x1a-.google.privacy.dlp.v2.InspectContentResponse\"l\x82\xd3\xe4\x93\x02\x66\"\'/v2/{parent=projects/*}/content:inspect:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/content:inspect:\x01*\x12\xcc\x01\n\x0bRedactImage\x12).google.privacy.dlp.v2.RedactImageRequest\x1a*.google.privacy.dlp.v2.RedactImageResponse\"f\x82\xd3\xe4\x93\x02`\"$/v2/{parent=projects/*}/image:redact:\x01*Z5\"0/v2/{parent=projects/*/locations/*}/image:redact:\x01*\x12\xea\x01\n\x11\x44\x65identifyContent\x12/.google.privacy.dlp.v2.DeidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.DeidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:deidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:deidentify:\x01*\x12\xea\x01\n\x11ReidentifyContent\x12/.google.privacy.dlp.v2.ReidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.ReidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:reidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:reidentify:\x01*\x12\x99\x02\n\rListInfoTypes\x12+.google.privacy.dlp.v2.ListInfoTypesRequest\x1a,.google.privacy.dlp.v2.ListInfoTypesResponse\"\xac\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9c\x01\x12\r/v2/infoTypesZ$\x12\"/v2/{parent=locations/*}/infoTypesZ/\x12-/v2/{parent=projects/*/locations/*}/infoTypesZ4\x12\x32/v2/{parent=organizations/*/locations/*}/infoTypes\x12\xf4\x02\n\x15\x43reateInspectTemplate\x12\x33.google.privacy.dlp.v2.CreateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xfd\x01\xda\x41\x17parent,inspect_template\x82\xd3\xe4\x93\x02\xdc\x01\"4/v2/{parent=projects/*/locations/*}/inspectTemplates:\x01*Z>\"9/v2/{parent=organizations/*/locations/*}/inspectTemplates:\x01*Z-\"(/v2/{parent=projects/*}/inspectTemplates:\x01*Z2\"-/v2/{parent=organizations/*}/inspectTemplates:\x01*\x12\xfe\x02\n\x15UpdateInspectTemplate\x12\x33.google.privacy.dlp.v2.UpdateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\x87\x02\xda\x41!name,inspect_template,update_mask\x82\xd3\xe4\x93\x02\xdc\x01\x32\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/inspectTemplates/*}:\x01*Z-2(/v2/{name=projects/*/inspectTemplates/*}:\x01*Z22-/v2/{name=organizations/*/inspectTemplates/*}:\x01*\x12\xcf\x02\n\x12GetInspectTemplate\x12\x30.google.privacy.dlp.v2.GetInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z*\x12(/v2/{name=projects/*/inspectTemplates/*}Z/\x12-/v2/{name=organizations/*/inspectTemplates/*}\x12\xe2\x02\n\x14ListInspectTemplates\x12\x32.google.privacy.dlp.v2.ListInspectTemplatesRequest\x1a\x33.google.privacy.dlp.v2.ListInspectTemplatesResponse\"\xe0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{parent=projects/*/locations/*}/inspectTemplatesZ;\x12\x39/v2/{parent=organizations/*/locations/*}/inspectTemplatesZ*\x12(/v2/{parent=projects/*}/inspectTemplatesZ/\x12-/v2/{parent=organizations/*}/inspectTemplates\x12\xc5\x02\n\x15\x44\x65leteInspectTemplate\x12\x33.google.privacy.dlp.v2.DeleteInspectTemplateRequest\x1a\x16.google.protobuf.Empty\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01*4/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;*9/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z**(/v2/{name=projects/*/inspectTemplates/*}Z/*-/v2/{name=organizations/*/inspectTemplates/*}\x12\x8c\x03\n\x18\x43reateDeidentifyTemplate\x12\x36.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest\x1a).google.privacy.dlp.v2.DeidentifyTemplate\"\x8c\x02\xda\x41\x1aparent,deidentify_template\x82\xd3\xe4\x93\x02\xe8\x01\"0/v2/{parent=organizations/*}/deidentifyTemplates:\x01*ZA\"\x12\x12*\"9/v2/{parent=organizations/*/locations/*}/discoveryConfigs:\x01*\x12\x9a\x02\n\x15UpdateDiscoveryConfig\x12\x33.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\xa3\x01\xda\x41!name,discovery_config,update_mask\x82\xd3\xe4\x93\x02y24/v2/{name=projects/*/locations/*/discoveryConfigs/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/discoveryConfigs/*}:\x01*\x12\xf1\x01\n\x12GetDiscoveryConfig\x12\x30.google.privacy.dlp.v2.GetDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s\x12\x34/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\x84\x02\n\x14ListDiscoveryConfigs\x12\x32.google.privacy.dlp.v2.ListDiscoveryConfigsRequest\x1a\x33.google.privacy.dlp.v2.ListDiscoveryConfigsResponse\"\x82\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x34/v2/{parent=projects/*/locations/*}/discoveryConfigsZ;\x12\x39/v2/{parent=organizations/*/locations/*}/discoveryConfigs\x12\xe7\x01\n\x15\x44\x65leteDiscoveryConfig\x12\x33.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest\x1a\x16.google.protobuf.Empty\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s*4/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;*9/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\xdf\x01\n\x0c\x43reateDlpJob\x12*.google.privacy.dlp.v2.CreateDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"\x83\x01\xda\x41\x12parent,inspect_job\xda\x41\x0fparent,risk_job\x82\xd3\xe4\x93\x02V\"\x1f/v2/{parent=projects/*}/dlpJobs:\x01*Z0\"+/v2/{parent=projects/*/locations/*}/dlpJobs:\x01*\x12\xfb\x01\n\x0bListDlpJobs\x12).google.privacy.dlp.v2.ListDlpJobsRequest\x1a*.google.privacy.dlp.v2.ListDlpJobsResponse\"\x94\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x84\x01\x12\x1f/v2/{parent=projects/*}/dlpJobsZ-\x12+/v2/{parent=projects/*/locations/*}/dlpJobsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/dlpJobs\x12\xb2\x01\n\tGetDlpJob\x12\'.google.privacy.dlp.v2.GetDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12\x1f/v2/{name=projects/*/dlpJobs/*}Z-\x12+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xb1\x01\n\x0c\x44\x65leteDlpJob\x12*.google.privacy.dlp.v2.DeleteDlpJobRequest\x1a\x16.google.protobuf.Empty\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P*\x1f/v2/{name=projects/*/dlpJobs/*}Z-*+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xbe\x01\n\x0c\x43\x61ncelDlpJob\x12*.google.privacy.dlp.v2.CancelDlpJobRequest\x1a\x16.google.protobuf.Empty\"j\x82\xd3\xe4\x93\x02\x64\"&/v2/{name=projects/*/dlpJobs/*}:cancel:\x01*Z7\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel:\x01*\x12\xe3\x02\n\x14\x43reateStoredInfoType\x12\x32.google.privacy.dlp.v2.CreateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xef\x01\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\xd8\x01\",/v2/{parent=organizations/*}/storedInfoTypes:\x01*Z=\"8/v2/{parent=organizations/*/locations/*}/storedInfoTypes:\x01*Z,\"\'/v2/{parent=projects/*}/storedInfoTypes:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/storedInfoTypes:\x01*\x12\xed\x02\n\x14UpdateStoredInfoType\x12\x32.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xf9\x01\xda\x41\x17name,config,update_mask\x82\xd3\xe4\x93\x02\xd8\x01\x32,/v2/{name=organizations/*/storedInfoTypes/*}:\x01*Z=28/v2/{name=organizations/*/locations/*/storedInfoTypes/*}:\x01*Z,2\'/v2/{name=projects/*/storedInfoTypes/*}:\x01*Z823/v2/{name=projects/*/locations/*/storedInfoTypes/*}:\x01*\x12\xc8\x02\n\x11GetStoredInfoType\x12/.google.privacy.dlp.v2.GetStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{name=organizations/*/storedInfoTypes/*}Z:\x12\x38/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)\x12\'/v2/{name=projects/*/storedInfoTypes/*}Z5\x12\x33/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\xdb\x02\n\x13ListStoredInfoTypes\x12\x31.google.privacy.dlp.v2.ListStoredInfoTypesRequest\x1a\x32.google.privacy.dlp.v2.ListStoredInfoTypesResponse\"\xdc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{parent=organizations/*}/storedInfoTypesZ:\x12\x38/v2/{parent=organizations/*/locations/*}/storedInfoTypesZ)\x12\'/v2/{parent=projects/*}/storedInfoTypesZ5\x12\x33/v2/{parent=projects/*/locations/*}/storedInfoTypes\x12\xbf\x02\n\x14\x44\x65leteStoredInfoType\x12\x32.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest\x1a\x16.google.protobuf.Empty\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01*,/v2/{name=organizations/*/storedInfoTypes/*}Z:*8/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)*\'/v2/{name=projects/*/storedInfoTypes/*}Z5*3/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\x93\x02\n\x17ListProjectDataProfiles\x12\x35.google.privacy.dlp.v2.ListProjectDataProfilesRequest\x1a\x36.google.privacy.dlp.v2.ListProjectDataProfilesResponse\"\x88\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12/v2/{parent=organizations/*/locations/*}/fileStoreDataProfilesZ;\x12\x39/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles\x12\x8a\x02\n\x17GetFileStoreDataProfile\x12\x35.google.privacy.dlp.v2.GetFileStoreDataProfileRequest\x1a+.google.privacy.dlp.v2.FileStoreDataProfile\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}\x12>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;\x12\x39/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xfb\x01\n\x1a\x44\x65leteFileStoreDataProfile\x12\x38.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}*>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;*9/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xf6\x01\n\x13GetTableDataProfile\x12\x31.google.privacy.dlp.v2.GetTableDataProfileRequest\x1a\'.google.privacy.dlp.v2.TableDataProfile\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u\x12:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7\x12\x35/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xfb\x01\n\x14GetColumnDataProfile\x12\x32.google.privacy.dlp.v2.GetColumnDataProfileRequest\x1a(.google.privacy.dlp.v2.ColumnDataProfile\"\x84\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02w\x12;/v2/{name=organizations/*/locations/*/columnDataProfiles/*}Z8\x12\x36/v2/{name=projects/*/locations/*/columnDataProfiles/*}\x12\xeb\x01\n\x16\x44\x65leteTableDataProfile\x12\x34.google.privacy.dlp.v2.DeleteTableDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u*:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7*5/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xc3\x01\n\x13HybridInspectDlpJob\x12\x31.google.privacy.dlp.v2.HybridInspectDlpJobRequest\x1a,.google.privacy.dlp.v2.HybridInspectResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect:\x01*\x12\x91\x01\n\x0c\x46inishDlpJob\x12*.google.privacy.dlp.v2.FinishDlpJobRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:finish:\x01*\x12\xf2\x01\n\x10\x43reateConnection\x12..google.privacy.dlp.v2.CreateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"\x8a\x01\xda\x41\x12parent, connection\x82\xd3\xe4\x93\x02o\"//v2/{parent=projects/*/locations/*}/connections:\x01*Z9\"4/v2/{parent=organizations/*/locations/*}/connections:\x01*\x12\xd7\x01\n\rGetConnection\x12+.google.privacy.dlp.v2.GetConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i\x12//v2/{name=projects/*/locations/*/connections/*}Z6\x12\x34/v2/{name=organizations/*/locations/*/connections/*}\x12\xea\x01\n\x0fListConnections\x12-.google.privacy.dlp.v2.ListConnectionsRequest\x1a..google.privacy.dlp.v2.ListConnectionsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2/{parent=projects/*/locations/*}/connectionsZ6\x12\x34/v2/{parent=organizations/*/locations/*}/connections\x12\xff\x01\n\x11SearchConnections\x12/.google.privacy.dlp.v2.SearchConnectionsRequest\x1a\x30.google.privacy.dlp.v2.SearchConnectionsResponse\"\x86\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02w\x12\x36/v2/{parent=projects/*/locations/*}/connections:searchZ=\x12;/v2/{parent=organizations/*/locations/*}/connections:search\x12\xd2\x01\n\x10\x44\x65leteConnection\x12..google.privacy.dlp.v2.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i*//v2/{name=projects/*/locations/*/connections/*}Z6*4/v2/{name=organizations/*/locations/*/connections/*}\x12\xe3\x01\n\x10UpdateConnection\x12..google.privacy.dlp.v2.UpdateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"|\xda\x41\x04name\x82\xd3\xe4\x93\x02o2//v2/{name=projects/*/locations/*/connections/*}:\x01*Z924/v2/{name=organizations/*/locations/*/connections/*}:\x01*\x1a\x46\xca\x41\x12\x64lp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x02\n\x19\x63om.google.privacy.dlp.v2B\x08\x44lpProtoP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2\xea\x41r\n\x1d\x64lp.googleapis.com/DlpContent\x12\x1dprojects/{project}/dlpContent\x12\x32projects/{project}/locations/{location}/dlpContent\xea\x41\\\n\'dlp.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" +descriptor_data = "\n\x1fgoogle/privacy/dlp/v2/dlp.proto\x12\x15google.privacy.dlp.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/privacy/dlp/v2/storage.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"G\n\x10\x45xcludeInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xa8\x01\n\x10\x45xcludeByHotword\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\"\xe7\x02\n\rExclusionRule\x12\x46\n\ndictionary\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12\x45\n\x12\x65xclude_info_types\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeInfoTypesH\x00\x12\x45\n\x12\x65xclude_by_hotword\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeByHotwordH\x00\x12:\n\rmatching_type\x18\x04 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingTypeB\x06\n\x04type\"\xb1\x01\n\x0eInspectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x12>\n\x0e\x65xclusion_rule\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.ExclusionRuleH\x00\x42\x06\n\x04type\"~\n\x11InspectionRuleSet\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\x05rules\x18\x02 \x03(\x0b\x32%.google.privacy.dlp.v2.InspectionRule\"\xac\x07\n\rInspectConfig\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12]\n\x1cmin_likelihood_per_info_type\x18\x0b \x03(\x0b\x32\x37.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood\x12\x42\n\x06limits\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.InspectConfig.FindingLimits\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x1a\n\x12\x65xclude_info_types\x18\x05 \x01(\x08\x12@\n\x11\x63ustom_info_types\x18\x06 \x03(\x0b\x32%.google.privacy.dlp.v2.CustomInfoType\x12=\n\x0f\x63ontent_options\x18\x08 \x03(\x0e\x32$.google.privacy.dlp.v2.ContentOption\x12:\n\x08rule_set\x18\n \x03(\x0b\x32(.google.privacy.dlp.v2.InspectionRuleSet\x1a\x83\x01\n\x12InfoTypeLikelihood\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x1a\x91\x02\n\rFindingLimits\x12\x1d\n\x15max_findings_per_item\x18\x01 \x01(\x05\x12 \n\x18max_findings_per_request\x18\x02 \x01(\x05\x12\x64\n\x1amax_findings_per_info_type\x18\x03 \x03(\x0b\x32@.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit\x1aY\n\rInfoTypeLimit\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x14\n\x0cmax_findings\x18\x02 \x01(\x05\"\xf9\x02\n\x0f\x42yteContentItem\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.privacy.dlp.v2.ByteContentItem.BytesType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x97\x02\n\tBytesType\x12\x1a\n\x16\x42YTES_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05IMAGE\x10\x06\x12\x0e\n\nIMAGE_JPEG\x10\x01\x12\r\n\tIMAGE_BMP\x10\x02\x12\r\n\tIMAGE_PNG\x10\x03\x12\r\n\tIMAGE_SVG\x10\x04\x12\r\n\tTEXT_UTF8\x10\x05\x12\x11\n\rWORD_DOCUMENT\x10\x07\x12\x07\n\x03PDF\x10\x08\x12\x17\n\x13POWERPOINT_DOCUMENT\x10\t\x12\x12\n\x0e\x45XCEL_DOCUMENT\x10\n\x12\x08\n\x04\x41VRO\x10\x0b\x12\x07\n\x03\x43SV\x10\x0c\x12\x07\n\x03TSV\x10\r\x12\t\n\x05\x41UDIO\x10\x0f\x12\t\n\x05VIDEO\x10\x10\x12\x0e\n\nEXECUTABLE\x10\x11\x12\x0c\n\x08\x41I_MODEL\x10\x12\"\x97\x01\n\x0b\x43ontentItem\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12-\n\x05table\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.TableH\x00\x12;\n\tbyte_item\x18\x05 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItemH\x00\x42\x0b\n\tdata_item\"\x9d\x01\n\x05Table\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12.\n\x04rows\x18\x02 \x03(\x0b\x32 .google.privacy.dlp.v2.Table.Row\x1a\x33\n\x03Row\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"]\n\rInspectResult\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xdf\x05\n\x07\x46inding\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x32\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x03 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nquote_info\x18\x07 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\x35\n\rresource_name\x18\x08 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x38\n\x0ctrigger_name\x18\t \x01(\tB\"\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12:\n\x06labels\x18\n \x03(\x0b\x32*.google.privacy.dlp.v2.Finding.LabelsEntry\x12\x33\n\x0fjob_create_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x08job_name\x18\r \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x12\n\nfinding_id\x18\x0f \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:[\xea\x41X\n\x1a\x64lp.googleapis.com/Finding\x12:projects/{project}/locations/{location}/findings/{finding}\"\xeb\x01\n\x08Location\x12\x30\n\nbyte_range\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x35\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x41\n\x11\x63ontent_locations\x18\x07 \x03(\x0b\x32&.google.privacy.dlp.v2.ContentLocation\x12\x33\n\tcontainer\x18\x08 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\"\x97\x03\n\x0f\x43ontentLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12@\n\x0frecord_location\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.RecordLocationH\x00\x12>\n\x0eimage_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.ImageLocationH\x00\x12\x44\n\x11\x64ocument_location\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.DocumentLocationH\x00\x12\x44\n\x11metadata_location\x18\x08 \x01(\x0b\x32\'.google.privacy.dlp.v2.MetadataLocationH\x00\x12\x37\n\x13\x63ontainer_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x07 \x01(\tB\n\n\x08location\"\x94\x01\n\x10MetadataLocation\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.google.privacy.dlp.v2.MetadataType\x12\x44\n\rstorage_label\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.StorageMetadataLabelH\x00\x42\x07\n\x05label\"#\n\x14StorageMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"\'\n\x10\x44ocumentLocation\x12\x13\n\x0b\x66ile_offset\x18\x01 \x01(\x03\"\xb6\x01\n\x0eRecordLocation\x12\x34\n\nrecord_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.RecordKey\x12\x30\n\x08\x66ield_id\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12<\n\x0etable_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.TableLocation\"\"\n\rTableLocation\x12\x11\n\trow_index\x18\x01 \x01(\x03\"\xac\x01\n\tContainer\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tfull_path\x18\x03 \x01(\t\x12\x11\n\troot_path\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"K\n\rImageLocation\x12:\n\x0e\x62ounding_boxes\x18\x01 \x03(\x0b\x32\".google.privacy.dlp.v2.BoundingBox\"G\n\x0b\x42oundingBox\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xfc\x03\n\x12RedactImageRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x13\n\x0blocation_id\x18\x08 \x01(\t\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12_\n\x17image_redaction_configs\x18\x05 \x03(\x0b\x32>.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig\x12\x18\n\x10include_findings\x18\x06 \x01(\x08\x12\x39\n\tbyte_item\x18\x07 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItem\x1a\xa8\x01\n\x14ImageRedactionConfig\x12\x34\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x19\n\x0fredact_all_text\x18\x02 \x01(\x08H\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ColorB\x08\n\x06target\"1\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\"\x83\x01\n\x13RedactImageResponse\x12\x16\n\x0eredacted_image\x18\x01 \x01(\x0c\x12\x16\n\x0e\x65xtracted_text\x18\x02 \x01(\t\x12<\n\x0einspect_result\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xd8\x02\n\x18\x44\x65identifyContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11\x64\x65identify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18\x64\x65identify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19\x44\x65identifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xdb\x02\n\x18ReidentifyContentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11reidentify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18reidentify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19ReidentifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xef\x01\n\x15InspectContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"N\n\x16InspectContentResponse\x12\x34\n\x06result\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xb7\x02\n\x13OutputStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x12N\n\routput_schema\x18\x03 \x01(\x0e\x32\x37.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema\"\x90\x01\n\x0cOutputSchema\x12\x1d\n\x19OUTPUT_SCHEMA_UNSPECIFIED\x10\x00\x12\x11\n\rBASIC_COLUMNS\x10\x01\x12\x0f\n\x0bGCS_COLUMNS\x10\x02\x12\x15\n\x11\x44\x41TASTORE_COLUMNS\x10\x03\x12\x15\n\x11\x42IG_QUERY_COLUMNS\x10\x04\x12\x0f\n\x0b\x41LL_COLUMNS\x10\x05\x42\x06\n\x04type\"R\n\rInfoTypeStats\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc0\x04\n\x18InspectDataSourceDetails\x12[\n\x11requested_options\x18\x02 \x01(\x0b\x32@.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions\x12\x46\n\x06result\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.InspectDataSourceDetails.Result\x1a\x9a\x01\n\x10RequestedOptions\x12I\n\x19snapshot_inspect_template\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12;\n\njob_config\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfig\x1a\xe1\x01\n\x06Result\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x02 \x01(\x03\x12=\n\x0finfo_type_stats\x18\x03 \x03(\x0b\x32$.google.privacy.dlp.v2.InfoTypeStats\x12\x1a\n\x12num_rows_processed\x18\x05 \x01(\x03\x12\x44\n\x0chybrid_stats\x18\x07 \x01(\x0b\x32..google.privacy.dlp.v2.HybridInspectStatistics\"\xff\x01\n\x1c\x44\x61taProfileBigQueryRowSchema\x12@\n\rtable_profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfileH\x00\x12\x42\n\x0e\x63olumn_profile\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfileH\x00\x12I\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfileH\x00\x42\x0e\n\x0c\x64\x61ta_profile\"`\n\x17HybridInspectStatistics\x12\x17\n\x0fprocessed_count\x18\x01 \x01(\x03\x12\x15\n\raborted_count\x18\x02 \x01(\x03\x12\x15\n\rpending_count\x18\x03 \x01(\x03\"l\n\rActionDetails\x12P\n\x12\x64\x65identify_details\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DeidentifyDataSourceDetailsH\x00\x42\t\n\x07\x64\x65tails\"x\n\x19\x44\x65identifyDataSourceStats\x12\x19\n\x11transformed_bytes\x18\x01 \x01(\x03\x12\x1c\n\x14transformation_count\x18\x02 \x01(\x03\x12\"\n\x1atransformation_error_count\x18\x03 \x01(\x03\"\xf2\x03\n\x1b\x44\x65identifyDataSourceDetails\x12h\n\x11requested_options\x18\x01 \x01(\x0b\x32M.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions\x12J\n\x10\x64\x65identify_stats\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DeidentifyDataSourceStats\x1a\x9c\x02\n\x1aRequestedDeidentifyOptions\x12O\n\x1csnapshot_deidentify_template\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Z\n\'snapshot_structured_deidentify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Q\n\x1esnapshot_image_redact_template\x18\x03 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\"\xfc\x02\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x0csupported_by\x18\x03 \x03(\x0e\x32*.google.privacy.dlp.v2.InfoTypeSupportedBy\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0f\n\x07\x65xample\x18\x08 \x01(\t\x12;\n\x08versions\x18\t \x03(\x0b\x32).google.privacy.dlp.v2.VersionDescription\x12;\n\ncategories\x18\n \x03(\x0b\x32\'.google.privacy.dlp.v2.InfoTypeCategory\x12\x42\n\x11sensitivity_score\x18\x0b \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12\x1b\n\x13specific_info_types\x18\x0c \x03(\t\"\x83\n\n\x10InfoTypeCategory\x12U\n\x11location_category\x18\x01 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.LocationCategoryH\x00\x12U\n\x11industry_category\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategoryH\x00\x12M\n\rtype_category\x18\x03 \x01(\x0e\x32\x34.google.privacy.dlp.v2.InfoTypeCategory.TypeCategoryH\x00\"\xe2\x05\n\x10LocationCategory\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\r\n\tARGENTINA\x10\x02\x12\x0b\n\x07\x41RMENIA\x10\x33\x12\r\n\tAUSTRALIA\x10\x03\x12\x0e\n\nAZERBAIJAN\x10\x30\x12\x0b\n\x07\x42\x45LARUS\x10\x32\x12\x0b\n\x07\x42\x45LGIUM\x10\x04\x12\n\n\x06\x42RAZIL\x10\x05\x12\n\n\x06\x43\x41NADA\x10\x06\x12\t\n\x05\x43HILE\x10\x07\x12\t\n\x05\x43HINA\x10\x08\x12\x0c\n\x08\x43OLOMBIA\x10\t\x12\x0b\n\x07\x43ROATIA\x10*\x12\x0b\n\x07\x43ZECHIA\x10\x34\x12\x0b\n\x07\x44\x45NMARK\x10\n\x12\n\n\x06\x46RANCE\x10\x0b\x12\x0b\n\x07\x46INLAND\x10\x0c\x12\x0b\n\x07GERMANY\x10\r\x12\r\n\tHONG_KONG\x10\x0e\x12\t\n\x05INDIA\x10\x0f\x12\r\n\tINDONESIA\x10\x10\x12\x0b\n\x07IRELAND\x10\x11\x12\n\n\x06ISRAEL\x10\x12\x12\t\n\x05ITALY\x10\x13\x12\t\n\x05JAPAN\x10\x14\x12\x0e\n\nKAZAKHSTAN\x10/\x12\t\n\x05KOREA\x10\x15\x12\n\n\x06MEXICO\x10\x16\x12\x13\n\x0fTHE_NETHERLANDS\x10\x17\x12\x0f\n\x0bNEW_ZEALAND\x10)\x12\n\n\x06NORWAY\x10\x18\x12\x0c\n\x08PARAGUAY\x10\x19\x12\x08\n\x04PERU\x10\x1a\x12\n\n\x06POLAND\x10\x1b\x12\x0c\n\x08PORTUGAL\x10\x1c\x12\n\n\x06RUSSIA\x10,\x12\r\n\tSINGAPORE\x10\x1d\x12\x10\n\x0cSOUTH_AFRICA\x10\x1e\x12\t\n\x05SPAIN\x10\x1f\x12\n\n\x06SWEDEN\x10 \x12\x0f\n\x0bSWITZERLAND\x10+\x12\n\n\x06TAIWAN\x10!\x12\x0c\n\x08THAILAND\x10\"\x12\n\n\x06TURKEY\x10#\x12\x0b\n\x07UKRAINE\x10-\x12\x12\n\x0eUNITED_KINGDOM\x10$\x12\x11\n\rUNITED_STATES\x10%\x12\x0b\n\x07URUGUAY\x10&\x12\x0e\n\nUZBEKISTAN\x10.\x12\r\n\tVENEZUELA\x10\'\x12\x0c\n\x08INTERNAL\x10(\"]\n\x10IndustryCategory\x12\x18\n\x14INDUSTRY_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\n\n\x06HEALTH\x10\x02\x12\x16\n\x12TELECOMMUNICATIONS\x10\x03\"\xa1\x01\n\x0cTypeCategory\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03PII\x10\x01\x12\x08\n\x04SPII\x10\x02\x12\x0f\n\x0b\x44\x45MOGRAPHIC\x10\x03\x12\x0e\n\nCREDENTIAL\x10\x04\x12\x11\n\rGOVERNMENT_ID\x10\x05\x12\x0c\n\x08\x44OCUMENT\x10\x06\x12\x1a\n\x16\x43ONTEXTUAL_INFORMATION\x10\x07\x12\n\n\x06\x43USTOM\x10\x08\x42\n\n\x08\x63\x61tegory\":\n\x12VersionDescription\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"b\n\x14ListInfoTypesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x13\n\x0blocation_id\x18\x03 \x01(\t\"W\n\x15ListInfoTypesResponse\x12>\n\ninfo_types\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.InfoTypeDescription\"\xc1\x01\n\x15RiskAnalysisJobConfig\x12<\n\x0eprivacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12:\n\x0csource_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xbc\x01\n\x07QuasiId\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\"\xbe\x02\n\x10StatisticalTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12T\n\tquasi_ids\x18\x01 \x03(\x0b\x32<.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aY\n\x14QuasiIdentifierField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\"\x93\x0f\n\rPrivacyMetric\x12[\n\x16numerical_stats_config\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigH\x00\x12_\n\x18\x63\x61tegorical_stats_config\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigH\x00\x12S\n\x12k_anonymity_config\x18\x03 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigH\x00\x12S\n\x12l_diversity_config\x18\x04 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigH\x00\x12\\\n\x17k_map_estimation_config\x18\x05 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigH\x00\x12n\n delta_presence_estimation_config\x18\x06 \x01(\x0b\x32\x42.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigH\x00\x1a\x45\n\x14NumericalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1aG\n\x16\x43\x61tegoricalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1ay\n\x10KAnonymityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x32\n\tentity_id\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EntityId\x1a\x82\x01\n\x10LDiversityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12;\n\x13sensitive_attribute\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1a\x81\x06\n\x14KMapEstimationConfig\x12]\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x62\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32H.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable\x1a\xc0\x01\n\x0bTaggedField\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\x1a\xcd\x02\n\x0e\x41uxiliaryTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12m\n\tquasi_ids\x18\x01 \x03(\x0b\x32U.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aQ\n\x0cQuasiIdField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\x1a\xaf\x01\n\x1d\x44\x65ltaPresenceEstimationConfig\x12\x36\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.QuasiIdB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x41\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32\'.google.privacy.dlp.v2.StatisticalTableB\x06\n\x04type\"\xc1\x1f\n\x1c\x41nalyzeDataSourceRiskDetails\x12\x46\n\x18requested_privacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12\x44\n\x16requested_source_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12j\n\x16numerical_stats_result\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultH\x00\x12n\n\x18\x63\x61tegorical_stats_result\x18\x04 \x01(\x0b\x32J.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultH\x00\x12\x62\n\x12k_anonymity_result\x18\x05 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultH\x00\x12\x62\n\x12l_diversity_result\x18\x06 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultH\x00\x12k\n\x17k_map_estimation_result\x18\x07 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultH\x00\x12}\n delta_presence_estimation_result\x18\t \x01(\x0b\x32Q.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultH\x00\x12k\n\x11requested_options\x18\n \x01(\x0b\x32P.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions\x1a\xaf\x01\n\x14NumericalStatsResult\x12/\n\tmin_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12/\n\tmax_value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x35\n\x0fquantile_values\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1a\x8d\x03\n\x16\x43\x61tegoricalStatsResult\x12\x95\x01\n!value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32j.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket\x1a\xda\x01\n\x1f\x43\x61tegoricalStatsHistogramBucket\x12#\n\x1bvalue_frequency_lower_bound\x18\x01 \x01(\x03\x12#\n\x1bvalue_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12<\n\rbucket_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb5\x04\n\x10KAnonymityResult\x12\x8b\x01\n#equivalence_class_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket\x1at\n\x1aKAnonymityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x1a\x9c\x02\n\x19KAnonymityHistogramBucket\x12*\n\"equivalence_class_size_lower_bound\x18\x01 \x01(\x03\x12*\n\"equivalence_class_size_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb0\x05\n\x10LDiversityResult\x12\x93\x01\n+sensitive_value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket\x1a\xe0\x01\n\x1aLDiversityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x12%\n\x1dnum_distinct_sensitive_values\x18\x03 \x01(\x03\x12\x43\n\x14top_sensitive_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x1a\xa2\x02\n\x19LDiversityHistogramBucket\x12-\n%sensitive_value_frequency_lower_bound\x18\x01 \x01(\x03\x12-\n%sensitive_value_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\x95\x04\n\x14KMapEstimationResult\x12\x8a\x01\n\x1ak_map_estimation_histogram\x18\x01 \x03(\x0b\x32\x66.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket\x1ar\n\x1bKMapEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1b\n\x13\x65stimated_anonymity\x18\x02 \x01(\x03\x1a\xfb\x01\n\x1dKMapEstimationHistogramBucket\x12\x15\n\rmin_anonymity\x18\x01 \x01(\x03\x12\x15\n\rmax_anonymity\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12{\n\rbucket_values\x18\x06 \x03(\x0b\x32\x64.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a\xe4\x04\n\x1d\x44\x65ltaPresenceEstimationResult\x12\xa5\x01\n#delta_presence_estimation_histogram\x18\x01 \x03(\x0b\x32x.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket\x1a}\n$DeltaPresenceEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1d\n\x15\x65stimated_probability\x18\x02 \x01(\x01\x1a\x9b\x02\n&DeltaPresenceEstimationHistogramBucket\x12\x17\n\x0fmin_probability\x18\x01 \x01(\x01\x12\x17\n\x0fmax_probability\x18\x02 \x01(\x01\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12\x8d\x01\n\rbucket_values\x18\x06 \x03(\x0b\x32v.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a`\n\x1cRequestedRiskAnalysisOptions\x12@\n\njob_config\x18\x01 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigB\x08\n\x06result\"L\n\x0eValueFrequency\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb3\x02\n\x05Value\x12\x17\n\rinteger_value\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x17\n\rboolean_value\x18\x04 \x01(\x08H\x00\x12\x35\n\x0ftimestamp_value\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12,\n\ntime_value\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\x12\'\n\ndate_value\x18\x07 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x33\n\x11\x64\x61y_of_week_value\x18\x08 \x01(\x0e\x32\x16.google.type.DayOfWeekH\x00\x42\x06\n\x04type\"Q\n\tQuoteInfo\x12\x34\n\tdate_time\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DateTimeH\x00\x42\x0e\n\x0cparsed_quote\"\xdf\x01\n\x08\x44\x61teTime\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12;\n\ttime_zone\x18\x04 \x01(\x0b\x32(.google.privacy.dlp.v2.DateTime.TimeZone\x1a\"\n\x08TimeZone\x12\x16\n\x0eoffset_minutes\x18\x01 \x01(\x05\"\xf2\x02\n\x10\x44\x65identifyConfig\x12S\n\x19info_type_transformations\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x12N\n\x16record_transformations\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.RecordTransformationsH\x00\x12L\n\x15image_transformations\x18\x04 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageTransformationsH\x00\x12Y\n\x1dtransformation_error_handling\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.TransformationErrorHandlingB\x10\n\x0etransformation\"\xe5\x04\n\x14ImageTransformations\x12S\n\ntransforms\x18\x02 \x03(\x0b\x32?.google.privacy.dlp.v2.ImageTransformations.ImageTransformation\x1a\xf7\x03\n\x13ImageTransformation\x12p\n\x13selected_info_types\x18\x04 \x01(\x0b\x32Q.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesH\x00\x12\x66\n\x0e\x61ll_info_types\x18\x05 \x01(\x0b\x32L.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesH\x00\x12[\n\x08\x61ll_text\x18\x06 \x01(\x0b\x32G.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextH\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Color\x1aM\n\x11SelectedInfoTypes\x12\x38\n\ninfo_types\x18\x05 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeB\x03\xe0\x41\x02\x1a\x0e\n\x0c\x41llInfoTypes\x1a\t\n\x07\x41llTextB\x08\n\x06target\"\x85\x02\n\x1bTransformationErrorHandling\x12T\n\x0bthrow_error\x18\x01 \x01(\x0b\x32=.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorH\x00\x12\x64\n\x13leave_untransformed\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedH\x00\x1a\x0c\n\nThrowError\x1a\x14\n\x12LeaveUntransformedB\x06\n\x04mode\"\xca\x07\n\x17PrimitiveTransformation\x12\x43\n\x0ereplace_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.ReplaceValueConfigH\x00\x12<\n\rredact_config\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.RedactConfigH\x00\x12K\n\x15\x63haracter_mask_config\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CharacterMaskConfigH\x00\x12Y\n\x1d\x63rypto_replace_ffx_fpe_config\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigH\x00\x12V\n\x1b\x66ixed_size_bucketing_config\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.FixedSizeBucketingConfigH\x00\x12\x42\n\x10\x62ucketing_config\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.BucketingConfigH\x00\x12Y\n\x1dreplace_with_info_type_config\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigH\x00\x12\x41\n\x10time_part_config\x18\x08 \x01(\x0b\x32%.google.privacy.dlp.v2.TimePartConfigH\x00\x12\x45\n\x12\x63rypto_hash_config\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.CryptoHashConfigH\x00\x12\x43\n\x11\x64\x61te_shift_config\x18\x0b \x01(\x0b\x32&.google.privacy.dlp.v2.DateShiftConfigH\x00\x12W\n\x1b\x63rypto_deterministic_config\x18\x0c \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoDeterministicConfigH\x00\x12S\n\x19replace_dictionary_config\x18\r \x01(\x0b\x32..google.privacy.dlp.v2.ReplaceDictionaryConfigH\x00\x42\x10\n\x0etransformation\"\xdc\x01\n\x0eTimePartConfig\x12G\n\x0fpart_to_extract\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.TimePartConfig.TimePart\"\x80\x01\n\x08TimePart\x12\x19\n\x15TIME_PART_UNSPECIFIED\x10\x00\x12\x08\n\x04YEAR\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x10\n\x0c\x44\x41Y_OF_MONTH\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x10\n\x0cWEEK_OF_YEAR\x10\x05\x12\x0f\n\x0bHOUR_OF_DAY\x10\x06\"H\n\x10\x43ryptoHashConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\"\xc0\x01\n\x19\x43ryptoDeterministicConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\x12<\n\x13surrogate_info_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"E\n\x12ReplaceValueConfig\x12/\n\tnew_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"q\n\x17ReplaceDictionaryConfig\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x42\x06\n\x04type\"\x1b\n\x19ReplaceWithInfoTypeConfig\"\x0e\n\x0cRedactConfig\"\xb6\x02\n\rCharsToIgnore\x12\x1c\n\x12\x63haracters_to_skip\x18\x01 \x01(\tH\x00\x12_\n\x1b\x63ommon_characters_to_ignore\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnoreH\x00\"\x97\x01\n\x13\x43ommonCharsToIgnore\x12&\n\"COMMON_CHARS_TO_IGNORE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x14\n\x10\x41LPHA_UPPER_CASE\x10\x02\x12\x14\n\x10\x41LPHA_LOWER_CASE\x10\x03\x12\x0f\n\x0bPUNCTUATION\x10\x04\x12\x0e\n\nWHITESPACE\x10\x05\x42\x0c\n\ncharacters\"\xa3\x01\n\x13\x43haracterMaskConfig\x12\x19\n\x11masking_character\x18\x01 \x01(\t\x12\x16\n\x0enumber_to_mask\x18\x02 \x01(\x05\x12\x15\n\rreverse_order\x18\x03 \x01(\x08\x12\x42\n\x14\x63haracters_to_ignore\x18\x04 \x03(\x0b\x32$.google.privacy.dlp.v2.CharsToIgnore\"\xa4\x01\n\x18\x46ixedSizeBucketingConfig\x12\x36\n\x0blower_bound\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x36\n\x0bupper_bound\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_size\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\"\xf0\x01\n\x0f\x42ucketingConfig\x12>\n\x07\x62uckets\x18\x01 \x03(\x0b\x32-.google.privacy.dlp.v2.BucketingConfig.Bucket\x1a\x9c\x01\n\x06\x42ucket\x12)\n\x03min\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12)\n\x03max\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12<\n\x11replacement_value\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\"\xf9\x03\n\x19\x43ryptoReplaceFfxFpeConfig\x12\x39\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyB\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x63\n\x0f\x63ommon_alphabet\x18\x04 \x01(\x0e\x32H.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabetH\x00\x12\x19\n\x0f\x63ustom_alphabet\x18\x05 \x01(\tH\x00\x12\x0f\n\x05radix\x18\x06 \x01(\x05H\x00\x12<\n\x13surrogate_info_type\x18\x08 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\x94\x01\n\x17\x46\x66xCommonNativeAlphabet\x12*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x0f\n\x0bHEXADECIMAL\x10\x02\x12\x1c\n\x18UPPER_CASE_ALPHA_NUMERIC\x10\x03\x12\x11\n\rALPHA_NUMERIC\x10\x04\x42\n\n\x08\x61lphabet\"\xd8\x01\n\tCryptoKey\x12>\n\ttransient\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.TransientCryptoKeyH\x00\x12>\n\tunwrapped\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.UnwrappedCryptoKeyH\x00\x12\x41\n\x0bkms_wrapped\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.KmsWrappedCryptoKeyH\x00\x42\x08\n\x06source\"\'\n\x12TransientCryptoKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"&\n\x12UnwrappedCryptoKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"M\n\x13KmsWrappedCryptoKey\x12\x18\n\x0bwrapped_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x63rypto_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc2\x01\n\x0f\x44\x61teShiftConfig\x12\x1d\n\x10upper_bound_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10lower_bound_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x36\n\ncrypto_key\x18\x04 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyH\x00\x42\x08\n\x06method\"\xa5\x02\n\x17InfoTypeTransformations\x12\x63\n\x0ftransformations\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationB\x03\xe0\x41\x02\x1a\xa4\x01\n\x16InfoTypeTransformation\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12U\n\x18primitive_transformation\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationB\x03\xe0\x41\x02\"\xc0\x02\n\x13\x46ieldTransformation\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x39\n\tcondition\x18\x03 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\x12R\n\x18primitive_transformation\x18\x04 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationH\x00\x12S\n\x19info_type_transformations\x18\x05 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x42\x10\n\x0etransformation\"\xa9\x01\n\x15RecordTransformations\x12I\n\x15\x66ield_transformations\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x45\n\x13record_suppressions\x18\x02 \x03(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\"N\n\x11RecordSuppression\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\"\xdc\x04\n\x0fRecordCondition\x12G\n\x0b\x65xpressions\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.RecordCondition.Expressions\x1a\xae\x01\n\tCondition\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12@\n\x08operator\x18\x03 \x01(\x0e\x32).google.privacy.dlp.v2.RelationalOperatorB\x03\xe0\x41\x02\x12+\n\x05value\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1aR\n\nConditions\x12\x44\n\nconditions\x18\x01 \x03(\x0b\x32\x30.google.privacy.dlp.v2.RecordCondition.Condition\x1a\xfa\x01\n\x0b\x45xpressions\x12\\\n\x10logical_operator\x18\x01 \x01(\x0e\x32\x42.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator\x12G\n\nconditions\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.RecordCondition.ConditionsH\x00\"<\n\x0fLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x42\x06\n\x04type\"\x83\x01\n\x16TransformationOverview\x12\x19\n\x11transformed_bytes\x18\x02 \x01(\x03\x12N\n\x18transformation_summaries\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.TransformationSummary\"\x9f\x05\n\x15TransformationSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x46\n\x0etransformation\x18\x03 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformation\x12I\n\x15\x66ield_transformations\x18\x05 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x41\n\x0frecord_suppress\x18\x06 \x01(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\x12K\n\x07results\x18\x04 \x03(\x0b\x32:.google.privacy.dlp.v2.TransformationSummary.SummaryResult\x12\x19\n\x11transformed_bytes\x18\x07 \x01(\x03\x1a\x84\x01\n\rSummaryResult\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12S\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x45.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"^\n\x18TransformationResultCode\x12*\n&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xb0\x01\n\x19TransformationDescription\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.privacy.dlp.v2.TransformationType\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x11\n\tcondition\x18\x03 \x01(\t\x12\x32\n\tinfo_type\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xc6\x02\n\x15TransformationDetails\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x02 \x01(\t\x12H\n\x0etransformation\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.TransformationDescription\x12I\n\x0estatus_details\x18\x04 \x01(\x0b\x32\x31.google.privacy.dlp.v2.TransformationResultStatus\x12\x19\n\x11transformed_bytes\x18\x05 \x01(\x03\x12N\n\x17transformation_location\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationLocation\"\xd9\x01\n\x16TransformationLocation\x12\x14\n\nfinding_id\x18\x01 \x01(\tH\x00\x12L\n\x15record_transformation\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.RecordTransformationH\x00\x12J\n\x0e\x63ontainer_type\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.TransformationContainerTypeB\x0f\n\rlocation_type\"\x9c\x01\n\x14RecordTransformation\x12\x30\n\x08\x66ield_id\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x13\x63ontainer_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x03 \x01(\t\"\x94\x01\n\x1aTransformationResultStatus\x12Q\n\x12result_status_type\x18\x01 \x01(\x0e\x32\x35.google.privacy.dlp.v2.TransformationResultStatusType\x12#\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\"TransformationDetailsStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x42\x06\n\x04type\"U\n\x08Schedule\x12?\n\x1arecurrence_period_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x42\x08\n\x06option\"\x08\n\x06Manual\"\xc2\x04\n\x0fInspectTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0einspect_config\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig:\xc6\x02\xea\x41\xc2\x02\n\"dlp.googleapis.com/InspectTemplate\x12@organizations/{organization}/inspectTemplates/{inspect_template}\x12\x36projects/{project}/inspectTemplates/{inspect_template}\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\"\xe6\x04\n\x12\x44\x65identifyTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x11\x64\x65identify_config\x18\x06 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig:\xe1\x02\xea\x41\xdd\x02\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46organizations/{organization}/deidentifyTemplates/{deidentify_template}\x12\n\x0binspect_job\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12;\n\x08triggers\x18\x05 \x03(\x0b\x32).google.privacy.dlp.v2.JobTrigger.Trigger\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06status\x18\n \x01(\x0e\x32(.google.privacy.dlp.v2.JobTrigger.StatusB\x03\xe0\x41\x02\x1az\n\x07Trigger\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.ScheduleH\x00\x12/\n\x06manual\x18\x02 \x01(\x0b\x32\x1d.google.privacy.dlp.v2.ManualH\x00\x42\t\n\x07trigger\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCANCELLED\x10\x03:\x94\x01\xea\x41\x90\x01\n\x1d\x64lp.googleapis.com/JobTrigger\x12,projects/{project}/jobTriggers/{job_trigger}\x12\x41projects/{project}/locations/{location}/jobTriggers/{job_trigger}B\x05\n\x03job\"\xea\x08\n\x06\x41\x63tion\x12\x43\n\rsave_findings\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.Action.SaveFindingsH\x00\x12@\n\x07pub_sub\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.Action.PublishToPubSubH\x00\x12U\n\x17publish_summary_to_cscc\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishSummaryToCsccH\x00\x12q\n&publish_findings_to_cloud_data_catalog\x18\x05 \x01(\x0b\x32?.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogH\x00\x12>\n\ndeidentify\x18\x07 \x01(\x0b\x32(.google.privacy.dlp.v2.Action.DeidentifyH\x00\x12V\n\x17job_notification_emails\x18\x08 \x01(\x0b\x32\x33.google.privacy.dlp.v2.Action.JobNotificationEmailsH\x00\x12T\n\x16publish_to_stackdriver\x18\t \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishToStackdriverH\x00\x1aQ\n\x0cSaveFindings\x12\x41\n\routput_config\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.OutputStorageConfig\x1a \n\x0fPublishToPubSub\x12\r\n\x05topic\x18\x01 \x01(\t\x1a\x16\n\x14PublishSummaryToCscc\x1a#\n!PublishFindingsToCloudDataCatalog\x1a\xb3\x02\n\nDeidentify\x12J\n\x15transformation_config\x18\x07 \x01(\x0b\x32+.google.privacy.dlp.v2.TransformationConfig\x12h\n%transformation_details_storage_config\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.TransformationDetailsStorageConfig\x12#\n\x14\x63loud_storage_output\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12@\n\x17\x66ile_types_to_transform\x18\x08 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileTypeB\x08\n\x06output\x1a\x17\n\x15JobNotificationEmails\x1a\x16\n\x14PublishToStackdriverB\x08\n\x06\x61\x63tion\"z\n\x14TransformationConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12&\n\x1estructured_deidentify_template\x18\x02 \x01(\t\x12\x1d\n\x15image_redact_template\x18\x04 \x01(\t\"\xcb\x01\n\x1c\x43reateInspectTemplateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x45\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xcb\x01\n\x1cUpdateInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12@\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xa7\x01\n\x1bListInspectTemplatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"z\n\x1cListInspectTemplatesResponse\x12\x41\n\x11inspect_templates\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xb6\x01\n\x17\x43reateJobTriggerRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12;\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTriggerB\x03\xe0\x41\x02\x12\x12\n\ntrigger_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"P\n\x19\x41\x63tivateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb7\x01\n\x17UpdateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12\x36\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14GetJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb4\x01\n\x1c\x43reateDiscoveryConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12\x11\n\tconfig_id\x18\x03 \x01(\t\"\xd0\x01\n\x1cUpdateDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\x92\x01\n\x1bListDiscoveryConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\"z\n\x1cListDiscoveryConfigsResponse\x12\x41\n\x11\x64iscovery_configs\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\xf6\x01\n\x13\x43reateDlpJobRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12>\n\x0binspect_job\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12@\n\x08risk_job\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigH\x00\x12\x0e\n\x06job_id\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\tB\x05\n\x03job\"\xde\x01\n\x16ListJobTriggersRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12/\n\x04type\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"k\n\x17ListJobTriggersResponse\x12\x37\n\x0cjob_triggers\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x17\x44\x65leteJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xdd\x01\n\x10InspectJobConfig\x12<\n\x0estorage_config\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.StorageConfig\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x1d\n\x15inspect_template_name\x18\x03 \x01(\t\x12.\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xf2\r\n\x11\x44\x61taProfileAction\x12\x46\n\x0b\x65xport_data\x18\x01 \x01(\x0b\x32/.google.privacy.dlp.v2.DataProfileAction.ExportH\x00\x12[\n\x14pub_sub_notification\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationH\x00\x12[\n\x14publish_to_chronicle\x18\x03 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PublishToChronicleH\x00\x12\x61\n\x0epublish_to_scc\x18\x04 \x01(\x0b\x32G.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenterH\x00\x12N\n\rtag_resources\x18\x08 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DataProfileAction.TagResourcesH\x00\x12h\n\x1bpublish_to_dataplex_catalog\x18\t \x01(\x0b\x32\x41.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalogH\x00\x1a\x8a\x01\n\x06\x45xport\x12;\n\rprofile_table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x43\n\x15sample_findings_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x1a\x82\x03\n\x12PubSubNotification\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\x12K\n\x10pubsub_condition\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfilePubSubCondition\x12\x62\n\x11\x64\x65tail_of_message\x18\x04 \x01(\x0e\x32G.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel\"i\n\x0b\x44\x65tailLevel\x12\x1c\n\x18\x44\x45TAIL_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rTABLE_PROFILE\x10\x01\x12\x11\n\rRESOURCE_NAME\x10\x02\x12\x16\n\x12\x46ILE_STORE_PROFILE\x10\x03\x1a\x14\n\x12PublishToChronicle\x1a \n\x1ePublishToSecurityCommandCenter\x1a:\n\x18PublishToDataplexCatalog\x12\x1e\n\x16lower_data_risk_to_low\x18\x01 \x01(\x08\x1a\xb6\x03\n\x0cTagResources\x12Z\n\x0etag_conditions\x18\x01 \x03(\x0b\x32\x42.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition\x12L\n\x1aprofile_generations_to_tag\x18\x02 \x03(\x0e\x32(.google.privacy.dlp.v2.ProfileGeneration\x12\x1e\n\x16lower_data_risk_to_low\x18\x03 \x01(\x08\x1a\xa9\x01\n\x0cTagCondition\x12K\n\x03tag\x18\x01 \x01(\x0b\x32>.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue\x12\x44\n\x11sensitivity_score\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScoreH\x00\x42\x06\n\x04type\x1a\x30\n\x08TagValue\x12\x1a\n\x10namespaced_value\x18\x01 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"u\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_PROFILE\x10\x01\x12\x13\n\x0f\x43HANGED_PROFILE\x10\x02\x12\x13\n\x0fSCORE_INCREASED\x10\x03\x12\x11\n\rERROR_CHANGED\x10\x04\x42\x08\n\x06\x61\x63tion\"\xdd\x03\n\x12\x44\x61taProfileFinding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x31\n\x08infotype\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\nquote_info\x18\x03 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\"\n\x1a\x64\x61ta_profile_resource_name\x18\x04 \x01(\t\x12\x12\n\nfinding_id\x18\x05 \x01(\t\x12-\n\ttimestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x08location\x18\x07 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfileFindingLocation\x12\x46\n\x13resource_visibility\x18\x08 \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x1a\n\x12\x66ull_resource_name\x18\t \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\n \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\"\xb7\x01\n\x1a\x44\x61taProfileFindingLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12g\n$data_profile_finding_record_location\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DataProfileFindingRecordLocationH\x00\x42\x18\n\x16location_extra_details\"Q\n DataProfileFindingRecordLocation\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"\xae\x02\n\x14\x44\x61taProfileJobConfig\x12<\n\x08location\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.DataProfileLocation\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x61\n\x1dother_cloud_starting_location\x18\x08 \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x07 \x03(\t\x12\x46\n\x14\x64\x61ta_profile_actions\x18\x06 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\"[\n\rBigQueryRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x18\n\x10\x64\x61taset_id_regex\x18\x02 \x01(\t\x12\x16\n\x0etable_id_regex\x18\x03 \x01(\t\"I\n\x0f\x42igQueryRegexes\x12\x36\n\x08patterns\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2.BigQueryRegex\"M\n\x12\x42igQueryTableTypes\x12\x37\n\x05types\x18\x01 \x03(\x0e\x32(.google.privacy.dlp.v2.BigQueryTableType\"\n\n\x08\x44isabled\"Q\n\x13\x44\x61taProfileLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\xeb\x07\n\x0f\x44iscoveryConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x44\n\norg_config\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig\x12\x61\n\x1dother_cloud_starting_location\x18\x0c \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x03 \x03(\t\x12\x39\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\x12\x37\n\x07targets\x18\x05 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryTarget\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06status\x18\n \x01(\x0e\x32-.google.privacy.dlp.v2.DiscoveryConfig.StatusB\x03\xe0\x41\x02\x12K\n\x13processing_location\x18\r \x01(\x0b\x32).google.privacy.dlp.v2.ProcessingLocationB\x03\xe0\x41\x01\x1a\x63\n\tOrgConfig\x12\x42\n\x08location\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryStartingLocation\x12\x12\n\nproject_id\x18\x02 \x01(\t\"9\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02:t\xea\x41q\n\"dlp.googleapis.com/DiscoveryConfig\x12Kprojects/{project}/locations/{location}/discoveryConfigs/{discovery_config}\"\xf6\x03\n\x0f\x44iscoveryTarget\x12J\n\x10\x62ig_query_target\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryDiscoveryTargetH\x00\x12J\n\x10\x63loud_sql_target\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.CloudSqlDiscoveryTargetH\x00\x12G\n\x0esecrets_target\x18\x03 \x01(\x0b\x32-.google.privacy.dlp.v2.SecretsDiscoveryTargetH\x00\x12R\n\x14\x63loud_storage_target\x18\x04 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageDiscoveryTargetH\x00\x12N\n\x12other_cloud_target\x18\x05 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudDiscoveryTargetH\x00\x12T\n\x15vertex_dataset_target\x18\x07 \x01(\x0b\x32\x33.google.privacy.dlp.v2.VertexDatasetDiscoveryTargetH\x00\x42\x08\n\x06target\"\xae\x02\n\x17\x42igQueryDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryBigQueryFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryBigQueryConditions\x12\x44\n\x07\x63\x61\x64\x65nce\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DiscoveryGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\x0b\n\tfrequency\"\xa0\x02\n\x17\x44iscoveryBigQueryFilter\x12@\n\x06tables\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryTableCollectionH\x00\x12]\n\x0cother_tables\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTablesH\x00\x12@\n\x0ftable_reference\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.TableReferenceH\x00\x1a\x18\n\x16\x41llOtherBigQueryTablesB\x08\n\x06\x66ilter\"g\n\x17\x42igQueryTableCollection\x12\x41\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryRegexesH\x00\x42\t\n\x07pattern\"\x98\x03\n\x1b\x44iscoveryBigQueryConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x05types\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.BigQueryTableTypesH\x00\x12M\n\x0ftype_collection\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.BigQueryTableTypeCollectionH\x00\x12V\n\ror_conditions\x18\x04 \x01(\x0b\x32?.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions\x1aQ\n\x0cOrConditions\x12\x15\n\rmin_row_count\x18\x01 \x01(\x05\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\n\x0eincluded_types\"\x83\x03\n\x1a\x44iscoveryGenerationCadence\x12V\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence\x12T\n\x16table_modified_cadence\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryTableModifiedCadence\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x12L\n\x11refresh_frequency\x18\x04 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa6\x01\n\x1d\x44iscoveryTableModifiedCadence\x12?\n\x05types\x18\x01 \x03(\x0e\x32\x30.google.privacy.dlp.v2.BigQueryTableModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa8\x01\n\x1e\x44iscoverySchemaModifiedCadence\x12@\n\x05types\x18\x01 \x03(\x0e\x32\x31.google.privacy.dlp.v2.BigQuerySchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"o\n\'DiscoveryInspectTemplateModifiedCadence\x12\x44\n\tfrequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xbf\x02\n\x17\x43loudSqlDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryCloudSqlFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudSqlConditions\x12W\n\x12generation_cadence\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x89\x02\n\x17\x44iscoveryCloudSqlFilter\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DatabaseResourceCollectionH\x00\x12\x42\n\x06others\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AllOtherDatabaseResourcesH\x00\x12W\n\x1b\x64\x61tabase_resource_reference\x18\x03 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DatabaseResourceReferenceH\x00\x42\x08\n\x06\x66ilter\"r\n\x1a\x44\x61tabaseResourceCollection\x12I\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DatabaseResourceRegexesH\x00\x42\t\n\x07pattern\"Y\n\x17\x44\x61tabaseResourceRegexes\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32,.google.privacy.dlp.v2.DatabaseResourceRegex\"\x87\x01\n\x15\x44\x61tabaseResourceRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x16\n\x0einstance_regex\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x61tabase_regex\x18\x03 \x01(\t\x12$\n\x1c\x64\x61tabase_resource_name_regex\x18\x04 \x01(\t\"\x1b\n\x19\x41llOtherDatabaseResources\"\x82\x01\n\x19\x44\x61tabaseResourceReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64\x61tabase\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x64\x61tabase_resource\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xda\x03\n\x1b\x44iscoveryCloudSqlConditions\x12`\n\x10\x64\x61tabase_engines\x18\x01 \x03(\x0e\x32\x41.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngineB\x03\xe0\x41\x01\x12V\n\x05types\x18\x03 \x03(\x0e\x32G.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType\"n\n\x0e\x44\x61tabaseEngine\x12\x1f\n\x1b\x44\x41TABASE_ENGINE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41LL_SUPPORTED_DATABASE_ENGINES\x10\x01\x12\t\n\x05MYSQL\x10\x02\x12\x0c\n\x08POSTGRES\x10\x03\"\x90\x01\n\x14\x44\x61tabaseResourceType\x12&\n\"DATABASE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12.\n*DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES\x10\x01\x12 \n\x1c\x44\x41TABASE_RESOURCE_TYPE_TABLE\x10\x02\"\x97\x05\n\"DiscoveryCloudSqlGenerationCadence\x12p\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32O.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence\x12L\n\x11refresh_frequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x1a\xc5\x02\n\x15SchemaModifiedCadence\x12y\n\x05types\x18\x01 \x03(\x0e\x32j.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"k\n\x1a\x43loudSqlSchemaModification\x12\'\n#SQL_SCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_COLUMNS\x10\x01\x12\x13\n\x0fREMOVED_COLUMNS\x10\x02\"\x18\n\x16SecretsDiscoveryTarget\"\xdb\x02\n\x1b\x43loudStorageDiscoveryTarget\x12G\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudStorageFilterB\x03\xe0\x41\x02\x12L\n\nconditions\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryFileStoreConditionsB\x03\xe0\x41\x01\x12`\n\x12generation_cadence\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadenceB\x03\xe0\x41\x01H\x00\x12\x38\n\x08\x64isabled\x18\x03 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x96\x02\n\x1b\x44iscoveryCloudStorageFilter\x12\x45\n\ncollection\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.FileStoreCollectionB\x03\xe0\x41\x01H\x00\x12\x65\n cloud_storage_resource_reference\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.CloudStorageResourceReferenceB\x03\xe0\x41\x01H\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"i\n\x13\x46ileStoreCollection\x12G\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.FileStoreRegexesB\x03\xe0\x41\x01H\x00\x42\t\n\x07pattern\"P\n\x10\x46ileStoreRegexes\x12<\n\x08patterns\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.FileStoreRegexB\x03\xe0\x41\x02\"p\n\x0e\x46ileStoreRegex\x12L\n\x13\x63loud_storage_regex\x18\x01 \x01(\x0b\x32(.google.privacy.dlp.v2.CloudStorageRegexB\x03\xe0\x41\x01H\x00\x42\x10\n\x0eresource_regex\"R\n\x11\x43loudStorageRegex\x12\x1d\n\x10project_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"R\n\x1d\x43loudStorageResourceReference\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x01\n&DiscoveryCloudStorageGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"\x9b\x05\n\x1f\x44iscoveryCloudStorageConditions\x12{\n\x1aincluded_object_attributes\x18\x01 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttributeB\x03\xe0\x41\x02\x12{\n\x1aincluded_bucket_attributes\x18\x02 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttributeB\x03\xe0\x41\x02\"\xe3\x01\n\x1b\x43loudStorageObjectAttribute\x12.\n*CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_OBJECTS\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08NEARLINE\x10\x03\x12\x0c\n\x08\x43OLDLINE\x10\x04\x12\x0b\n\x07\x41RCHIVE\x10\x05\x12\x0c\n\x08REGIONAL\x10\x06\x12\x12\n\x0eMULTI_REGIONAL\x10\x07\x12 \n\x1c\x44URABLE_REDUCED_AVAILABILITY\x10\x08\"\x97\x01\n\x1b\x43loudStorageBucketAttribute\x12.\n*CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_BUCKETS\x10\x01\x12\x16\n\x12\x41UTOCLASS_DISABLED\x10\x02\x12\x15\n\x11\x41UTOCLASS_ENABLED\x10\x03\"\xf6\x01\n\x1c\x44iscoveryFileStoreConditions\x12\x36\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12/\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12_\n\x18\x63loud_storage_conditions\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.DiscoveryCloudStorageConditionsB\x03\xe0\x41\x01H\x00\x42\x0c\n\nconditions\"\x92\x03\n\x19OtherCloudDiscoveryTarget\x12\x44\n\x10\x64\x61ta_source_type\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceTypeB\x03\xe0\x41\x02\x12\x45\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryOtherCloudFilterB\x03\xe0\x41\x02\x12M\n\nconditions\x18\x03 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryOtherCloudConditionsB\x03\xe0\x41\x01\x12Y\n\x12generation_cadence\x18\x04 \x01(\x0b\x32;.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x05 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x86\x02\n\x19\x44iscoveryOtherCloudFilter\x12I\n\ncollection\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.OtherCloudResourceCollectionH\x00\x12S\n\x0fsingle_resource\x18\x02 \x01(\x0b\x32\x38.google.privacy.dlp.v2.OtherCloudSingleResourceReferenceH\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"v\n\x1cOtherCloudResourceCollection\x12K\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudResourceRegexesH\x00\x42\t\n\x07pattern\"]\n\x19OtherCloudResourceRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32..google.privacy.dlp.v2.OtherCloudResourceRegex\"y\n\x17OtherCloudResourceRegex\x12L\n\x16\x61mazon_s3_bucket_regex\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.AmazonS3BucketRegexH\x00\x42\x10\n\x0eresource_regex\"0\n\x0f\x41wsAccountRegex\x12\x1d\n\x10\x61\x63\x63ount_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\"x\n\x13\x41mazonS3BucketRegex\x12\x41\n\x11\x61ws_account_regex\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.AwsAccountRegex\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n!OtherCloudSingleResourceReference\x12\x41\n\x10\x61mazon_s3_bucket\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.AmazonS3BucketH\x00\x42\n\n\x08resource\"%\n\nAwsAccount\x12\x17\n\naccount_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x0e\x41mazonS3Bucket\x12\x36\n\x0b\x61ws_account\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2.AwsAccount\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x1d\x44iscoveryOtherCloudConditions\x12*\n\x07min_age\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12V\n\x1b\x61mazon_s3_bucket_conditions\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.AmazonS3BucketConditionsH\x00\x42\x0c\n\nconditions\"\xd9\x03\n\x18\x41mazonS3BucketConditions\x12U\n\x0c\x62ucket_types\x18\x01 \x03(\x0e\x32:.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketTypeB\x03\xe0\x41\x01\x12g\n\x16object_storage_classes\x18\x02 \x03(\x0e\x32\x42.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClassB\x03\xe0\x41\x01\"T\n\nBucketType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12TYPE_ALL_SUPPORTED\x10\x01\x12\x18\n\x14TYPE_GENERAL_PURPOSE\x10\x02\"\xa6\x01\n\x12ObjectStorageClass\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_CLASSES\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x1e\n\x1aSTANDARD_INFREQUENT_ACCESS\x10\x04\x12\x1d\n\x19GLACIER_INSTANT_RETRIEVAL\x10\x06\x12\x17\n\x13INTELLIGENT_TIERING\x10\x07\"\xe9\x01\n$DiscoveryOtherCloudGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"W\n\x19\x44iscoveryStartingLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\x87\x02\n#OtherCloudDiscoveryStartingLocation\x12o\n\x0c\x61ws_location\x18\x01 \x01(\x0b\x32W.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocationH\x00\x1a\x63\n\x1c\x41wsDiscoveryStartingLocation\x12\x14\n\naccount_id\x18\x02 \x01(\tH\x00\x12$\n\x1a\x61ll_asset_inventory_assets\x18\x03 \x01(\x08H\x00\x42\x07\n\x05scopeB\n\n\x08location\"\x13\n\x11\x41llOtherResources\"\xd3\x02\n\x1cVertexDatasetDiscoveryTarget\x12H\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryVertexDatasetFilterB\x03\xe0\x41\x02\x12K\n\nconditions\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions\x12\\\n\x12generation_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x8e\x02\n\x1c\x44iscoveryVertexDatasetFilter\x12\x44\n\ncollection\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.VertexDatasetCollectionH\x00\x12\x62\n!vertex_dataset_resource_reference\x18\x02 \x01(\x0b\x32\x35.google.privacy.dlp.v2.VertexDatasetResourceReferenceH\x00\x12:\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesH\x00\x42\x08\n\x06\x66ilter\"s\n\x17VertexDatasetCollection\x12M\n\x16vertex_dataset_regexes\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.VertexDatasetRegexesH\x00\x42\t\n\x07pattern\"X\n\x14VertexDatasetRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.VertexDatasetRegexB\x03\xe0\x41\x02\".\n\x12VertexDatasetRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\"D\n\x1eVertexDatasetResourceReference\x12\"\n\x15\x64\x61taset_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n DiscoveryVertexDatasetConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe2\x01\n\'DiscoveryVertexDatasetGenerationCadence\x12L\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\"\xdc\x06\n\x06\x44lpJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2.DlpJob.JobState\x12K\n\x0crisk_details\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsH\x00\x12J\n\x0finspect_details\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.InspectDataSourceDetailsH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_modified\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10job_trigger_name\x18\n \x01(\t\x12,\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12<\n\x0e\x61\x63tion_details\x18\x0c \x03(\x0b\x32$.google.privacy.dlp.v2.ActionDetails\"o\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06:\x7f\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}B\t\n\x07\x64\x65tails\"C\n\x10GetDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd6\x01\n\x12ListDlpJobsRequest\x12\x31\n\x06parent\x18\x04 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\x04type\x18\x05 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"[\n\x13ListDlpJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.DlpJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x13\x43\x61ncelDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x46inishDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x44\x65leteDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd7\x01\n\x1f\x43reateDeidentifyTemplateRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12K\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xd7\x01\n\x1fUpdateDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x1cGetDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xad\x01\n\x1eListDeidentifyTemplatesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"\x83\x01\n\x1fListDeidentifyTemplatesResponse\x12G\n\x14\x64\x65identify_templates\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1f\x44\x65leteDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xf4\x01\n\x1bLargeCustomDictionaryConfig\x12<\n\x0boutput_path\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePath\x12L\n\x16\x63loud_storage_file_set\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageFileSetH\x00\x12?\n\x0f\x62ig_query_field\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryFieldH\x00\x42\x08\n\x06source\"8\n\x1aLargeCustomDictionaryStats\x12\x1a\n\x12\x61pprox_num_phrases\x18\x01 \x01(\x03\"\xa6\x02\n\x14StoredInfoTypeConfig\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\x17large_custom_dictionary\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.LargeCustomDictionaryConfigH\x00\x12\x46\n\ndictionary\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x05 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x42\x06\n\x04type\"s\n\x13StoredInfoTypeStats\x12T\n\x17large_custom_dictionary\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.LargeCustomDictionaryStatsH\x00\x42\x06\n\x04type\"\xa9\x02\n\x15StoredInfoTypeVersion\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.google.privacy.dlp.v2.StoredInfoTypeState\x12,\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12\x39\n\x05stats\x18\x05 \x01(\x0b\x32*.google.privacy.dlp.v2.StoredInfoTypeStats\"\xf1\x03\n\x0eStoredInfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0f\x63urrent_version\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion\x12\x46\n\x10pending_versions\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion:\xc1\x02\xea\x41\xbd\x02\n!dlp.googleapis.com/StoredInfoType\x12?organizations/{organization}/storedInfoTypes/{stored_info_type}\x12\x35projects/{project}/storedInfoTypes/{stored_info_type}\x12Torganizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}\x12Jprojects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}\"\xcc\x01\n\x1b\x43reateStoredInfoTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfigB\x03\xe0\x41\x02\x12\x1b\n\x13stored_info_type_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xc4\x01\n\x1bUpdateStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x18GetStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\xa5\x01\n\x1aListStoredInfoTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"x\n\x1bListStoredInfoTypesResponse\x12@\n\x11stored_info_types\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.StoredInfoType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x1b\x44\x65leteStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\x94\x01\n\x1eHybridInspectJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8c\x01\n\x1aHybridInspectDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8b\x01\n\x11HybridContentItem\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x44\n\x0f\x66inding_details\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.HybridFindingDetails\"\xb0\x02\n\x14HybridFindingDetails\x12;\n\x11\x63ontainer_details\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\x12\x13\n\x0b\x66ile_offset\x18\x02 \x01(\x03\x12\x12\n\nrow_offset\x18\x03 \x01(\x03\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x12G\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.privacy.dlp.v2.HybridFindingDetails.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x17\n\x15HybridInspectResponse\"\xa8\x01\n\x1eListProjectDataProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/ProjectDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x84\x01\n\x1fListProjectDataProfilesResponse\x12H\n\x15project_data_profiles\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.ProjectDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n\x1cListTableDataProfilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#dlp.googleapis.com/TableDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"~\n\x1dListTableDataProfilesResponse\x12\x44\n\x13table_data_profiles\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa6\x01\n\x1dListColumnDataProfilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dlp.googleapis.com/ColumnDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x81\x01\n\x1eListColumnDataProfilesResponse\x12\x46\n\x14\x63olumn_data_profiles\x18\x01 \x03(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n\rDataRiskLevel\x12\x46\n\x05score\x18\x01 \x01(\x0e\x32\x37.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore\"r\n\x12\x44\x61taRiskLevelScore\x12\x1a\n\x16RISK_SCORE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RISK_LOW\x10\n\x12\x10\n\x0cRISK_UNKNOWN\x10\x0c\x12\x11\n\rRISK_MODERATE\x10\x14\x12\r\n\tRISK_HIGH\x10\x1e\"\xdc\x04\n\x12ProjectDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11sensitivity_score\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x05 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12<\n\x0eprofile_status\x18\x07 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12 \n\x18table_data_profile_count\x18\t \x01(\x03\x12%\n\x1d\x66ile_store_data_profile_count\x18\n \x01(\x03:\xdd\x01\xea\x41\xd9\x01\n%dlp.googleapis.com/ProjectDataProfile\x12\\organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}\x12Rprojects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}\"\xc9\x02\n\x19\x44\x61taProfileConfigSnapshot\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12I\n\x10\x64\x61ta_profile_job\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.DataProfileJobConfigB\x02\x18\x01\x12@\n\x10\x64iscovery_config\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12\x42\n\x1einspect_template_modified_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe3\r\n\x10TableDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18$ \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x02 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x18 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x1d \x01(\t\x12\x12\n\ndataset_id\x18\x19 \x01(\t\x12\x10\n\x08table_id\x18\x1a \x01(\t\x12\x15\n\rfull_resource\x18\x03 \x01(\t\x12<\n\x0eprofile_status\x18\x15 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12<\n\x05state\x18\x16 \x01(\x0e\x32-.google.privacy.dlp.v2.TableDataProfile.State\x12\x42\n\x11sensitivity_score\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12\x44\n\x14predicted_info_types\x18\x1b \x03(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x45\n\x10other_info_types\x18\x1c \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14scanned_column_count\x18\n \x01(\x03\x12\x1b\n\x13\x66\x61iled_column_count\x18\x0b \x01(\x03\x12\x18\n\x10table_size_bytes\x18\x0c \x01(\x03\x12\x11\n\trow_count\x18\r \x01(\x03\x12\x42\n\x11\x65ncryption_status\x18\x0e \x01(\x0e\x32\'.google.privacy.dlp.v2.EncryptionStatus\x12\x46\n\x13resource_visibility\x18\x0f \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12:\n\x16profile_last_generated\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fresource_labels\x18\x11 \x03(\x0b\x32;.google.privacy.dlp.v2.TableDataProfile.ResourceLabelsEntry\x12/\n\x0b\x63reate_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x15sample_findings_table\x18% \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12(\n\x04tags\x18\' \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18) \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xd3\x01\xea\x41\xcf\x01\n#dlp.googleapis.com/TableDataProfile\x12Xorganizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}\x12Nprojects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}\"b\n\rProfileStatus\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"g\n\x0fInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12 \n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x42\x02\x18\x01\"\x88\x01\n\x14OtherInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x1c\n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x12\x1e\n\x16\x65xcluded_from_analysis\x18\x03 \x01(\x08\"\xc9\r\n\x11\x43olumnDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x0eprofile_status\x18\x11 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12=\n\x05state\x18\x12 \x01(\x0e\x32..google.privacy.dlp.v2.ColumnDataProfile.State\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12table_data_profile\x18\x04 \x01(\t\x12\x1b\n\x13table_full_resource\x18\x05 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x13 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x14 \x01(\t\x12\x12\n\ndataset_id\x18\x15 \x01(\t\x12\x10\n\x08table_id\x18\x16 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x06 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x07 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12@\n\x10\x63olumn_info_type\x18\t \x01(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x42\n\rother_matches\x18\n \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12M\n\x19\x65stimated_null_percentage\x18\x17 \x01(\x0e\x32*.google.privacy.dlp.v2.NullPercentageLevel\x12O\n\x1a\x65stimated_uniqueness_score\x18\x18 \x01(\x0e\x32+.google.privacy.dlp.v2.UniquenessScoreLevel\x12\x17\n\x0f\x66ree_text_score\x18\r \x01(\x01\x12L\n\x0b\x63olumn_type\x18\x0e \x01(\x0e\x32\x37.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType\x12P\n\x0cpolicy_state\x18\x0f \x01(\x0e\x32:.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\"\xff\x02\n\x0e\x43olumnDataType\x12 \n\x1c\x43OLUMN_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTYPE_INT64\x10\x01\x12\r\n\tTYPE_BOOL\x10\x02\x12\x10\n\x0cTYPE_FLOAT64\x10\x03\x12\x0f\n\x0bTYPE_STRING\x10\x04\x12\x0e\n\nTYPE_BYTES\x10\x05\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x06\x12\r\n\tTYPE_DATE\x10\x07\x12\r\n\tTYPE_TIME\x10\x08\x12\x11\n\rTYPE_DATETIME\x10\t\x12\x12\n\x0eTYPE_GEOGRAPHY\x10\n\x12\x10\n\x0cTYPE_NUMERIC\x10\x0b\x12\x0f\n\x0bTYPE_RECORD\x10\x0c\x12\x13\n\x0fTYPE_BIGNUMERIC\x10\r\x12\r\n\tTYPE_JSON\x10\x0e\x12\x11\n\rTYPE_INTERVAL\x10\x0f\x12\x13\n\x0fTYPE_RANGE_DATE\x10\x10\x12\x17\n\x13TYPE_RANGE_DATETIME\x10\x11\x12\x18\n\x14TYPE_RANGE_TIMESTAMP\x10\x12\"R\n\x11\x43olumnPolicyState\x12#\n\x1f\x43OLUMN_POLICY_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x43OLUMN_POLICY_TAGGED\x10\x01:\xd8\x01\xea\x41\xd4\x01\n$dlp.googleapis.com/ColumnDataProfile\x12Zorganizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}\x12Pprojects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}\"\xb8\x0e\n\x14\x46ileStoreDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x03 \x01(\t\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x1b\n\x13\x66ile_store_location\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_storage_locations\x18\x13 \x03(\t\x12\x15\n\rlocation_type\x18\x14 \x01(\t\x12\x17\n\x0f\x66ile_store_path\x18\x06 \x01(\t\x12\x15\n\rfull_resource\x18\x18 \x01(\t\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12<\n\x0eprofile_status\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12@\n\x05state\x18\t \x01(\x0e\x32\x31.google.privacy.dlp.v2.FileStoreDataProfile.State\x12:\n\x16profile_last_generated\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x13resource_visibility\x18\x0b \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x42\n\x11sensitivity_score\x18\x0c \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\r \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16\x66ile_cluster_summaries\x18\x10 \x03(\x0b\x32).google.privacy.dlp.v2.FileClusterSummary\x12`\n\x13resource_attributes\x18\x11 \x03(\x0b\x32\x43.google.privacy.dlp.v2.FileStoreDataProfile.ResourceAttributesEntry\x12X\n\x0fresource_labels\x18\x12 \x03(\x0b\x32?.google.privacy.dlp.v2.FileStoreDataProfile.ResourceLabelsEntry\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x15 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x43\n\x15sample_findings_table\x18\x16 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x1b\n\x13\x66ile_store_is_empty\x18\x17 \x01(\x08\x12(\n\x04tags\x18\x19 \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18\x1a \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x1aW\n\x17ResourceAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xe9\x01\xea\x41\xe5\x01\n\'dlp.googleapis.com/FileStoreDataProfile\x12\x61organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\x12Wprojects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\"?\n\x03Tag\x12\x1c\n\x14namespaced_tag_value\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"(\n\x0fRelatedResource\x12\x15\n\rfull_resource\x18\x01 \x01(\t\"N\n\x18\x46ileStoreInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"+\n\x11\x46ileExtensionInfo\x12\x16\n\x0e\x66ile_extension\x18\x01 \x01(\t\"\x8c\x04\n\x12\x46ileClusterSummary\x12\x41\n\x11\x66ile_cluster_type\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.FileClusterType\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12,\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12I\n\x17\x66ile_extensions_scanned\x18\x07 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x46\n\x14\x66ile_extensions_seen\x18\x08 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x16\n\x0eno_files_exist\x18\t \x01(\x08\"[\n\x1cGetProjectDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"]\n\x1eGetFileStoreDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"\xc0\x01\n ListFileStoreDataProfilesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dlp.googleapis.com/FileStoreDataProfile\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!ListFileStoreDataProfilesResponse\x12M\n\x18\x66ile_store_data_profiles\x18\x01 \x03(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n!DeleteFileStoreDataProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dlp.googleapis.com/FileStoreDataProfile\"W\n\x1aGetTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"Y\n\x1bGetColumnDataProfileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dlp.googleapis.com/ColumnDataProfile\"\xea\x05\n\x1a\x44\x61taProfilePubSubCondition\x12X\n\x0b\x65xpressions\x18\x01 \x01(\x0b\x32\x43.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions\x1a\xe9\x01\n\x0fPubSubCondition\x12\x62\n\x12minimum_risk_score\x18\x01 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x12i\n\x19minimum_sensitivity_score\x18\x02 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x42\x07\n\x05value\x1a\xab\x02\n\x11PubSubExpressions\x12s\n\x10logical_operator\x18\x01 \x01(\x0e\x32Y.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator\x12U\n\nconditions\x18\x02 \x03(\x0b\x32\x41.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition\"J\n\x15PubSubLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02OR\x10\x01\x12\x07\n\x03\x41ND\x10\x02\"X\n\x12ProfileScoreBucket\x12$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x12\n\x0eMEDIUM_OR_HIGH\x10\x02\"\xe0\x01\n\x18\x44\x61taProfilePubSubMessage\x12\x38\n\x07profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12G\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\"\x8c\x01\n\x17\x43reateConnectionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\"K\n\x14GetConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x95\x01\n\x16ListConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x18SearchConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x17ListConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x19SearchConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x01\n\x17UpdateConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x17\x44\x65leteConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x90\x03\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2.ConnectionStateB\x03\xe0\x41\x02\x12\x31\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12>\n\tcloud_sql\x18\x04 \x01(\x0b\x32).google.privacy.dlp.v2.CloudSqlPropertiesH\x00:\xb1\x01\xea\x41\xad\x01\n\x1d\x64lp.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}\x12Jorganizations/{organization}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"[\n\x17SecretManagerCredential\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x1cpassword_secret_version_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x43loudSqlIamCredential\"\xb5\x03\n\x12\x43loudSqlProperties\x12\x1f\n\x0f\x63onnection_name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12K\n\x11username_password\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.SecretManagerCredentialH\x00\x12\x45\n\rcloud_sql_iam\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.CloudSqlIamCredentialH\x00\x12\x1c\n\x0fmax_connections\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12V\n\x0f\x64\x61tabase_engine\x18\x07 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngineB\x03\xe0\x41\x02\"f\n\x0e\x44\x61tabaseEngine\x12\x1b\n\x17\x44\x41TABASE_ENGINE_UNKNOWN\x10\x00\x12\x19\n\x15\x44\x41TABASE_ENGINE_MYSQL\x10\x01\x12\x1c\n\x18\x44\x41TABASE_ENGINE_POSTGRES\x10\x02\x42\x0c\n\ncredential\"Z\n\x1d\x44\x65leteTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"*\n\x0e\x44\x61taSourceType\x12\x18\n\x0b\x64\x61ta_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xf4\x02\n\x0f\x46ileClusterType\x12\x41\n\x07\x63luster\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.FileClusterType.ClusterH\x00\"\x88\x02\n\x07\x43luster\x12\x17\n\x13\x43LUSTER_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_UNKNOWN\x10\x01\x12\x10\n\x0c\x43LUSTER_TEXT\x10\x02\x12\x1b\n\x17\x43LUSTER_STRUCTURED_DATA\x10\x03\x12\x17\n\x13\x43LUSTER_SOURCE_CODE\x10\x04\x12\x19\n\x15\x43LUSTER_RICH_DOCUMENT\x10\x05\x12\x11\n\rCLUSTER_IMAGE\x10\x06\x12\x13\n\x0f\x43LUSTER_ARCHIVE\x10\x07\x12\x16\n\x12\x43LUSTER_MULTIMEDIA\x10\x08\x12\x16\n\x12\x43LUSTER_EXECUTABLE\x10\t\x12\x14\n\x10\x43LUSTER_AI_MODEL\x10\nB\x13\n\x11\x66ile_cluster_type\"\xf7\x02\n\x12ProcessingLocation\x12`\n\x17image_fallback_location\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation\x1a\x17\n\x15MultiRegionProcessing\x1a\x12\n\x10GlobalProcessing\x1a\xd1\x01\n\x15ImageFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\"K\n\x17SaveToGcsFindingsOutput\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding*\xa0\x01\n\x1eTransformationResultStatusType\x12\x1a\n\x16STATE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11INVALID_TRANSFORM\x10\x01\x12\"\n\x1e\x42IGQUERY_MAX_ROW_SIZE_EXCEEDED\x10\x02\x12\x1a\n\x16METADATA_UNRETRIEVABLE\x10\x03\x12\x0b\n\x07SUCCESS\x10\x04*\x7f\n\x1bTransformationContainerType\x12\x1f\n\x1bTRANSFORM_UNKNOWN_CONTAINER\x10\x00\x12\x12\n\x0eTRANSFORM_BODY\x10\x01\x12\x16\n\x12TRANSFORM_METADATA\x10\x02\x12\x13\n\x0fTRANSFORM_TABLE\x10\x03*\xe0\x02\n\x12TransformationType\x12#\n\x1fTRANSFORMATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_SUPPRESSION\x10\x01\x12\x11\n\rREPLACE_VALUE\x10\x02\x12\x16\n\x12REPLACE_DICTIONARY\x10\x0f\x12\n\n\x06REDACT\x10\x03\x12\x12\n\x0e\x43HARACTER_MASK\x10\x04\x12\x1a\n\x16\x43RYPTO_REPLACE_FFX_FPE\x10\x05\x12\x18\n\x14\x46IXED_SIZE_BUCKETING\x10\x06\x12\r\n\tBUCKETING\x10\x07\x12\x1a\n\x16REPLACE_WITH_INFO_TYPE\x10\x08\x12\r\n\tTIME_PART\x10\t\x12\x0f\n\x0b\x43RYPTO_HASH\x10\n\x12\x0e\n\nDATE_SHIFT\x10\x0c\x12\x1f\n\x1b\x43RYPTO_DETERMINISTIC_CONFIG\x10\r\x12\x10\n\x0cREDACT_IMAGE\x10\x0e*r\n\x11ProfileGeneration\x12\"\n\x1ePROFILE_GENERATION_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROFILE_GENERATION_NEW\x10\x01\x12\x1d\n\x19PROFILE_GENERATION_UPDATE\x10\x02*\x96\x01\n\x1b\x42igQueryTableTypeCollection\x12$\n BIG_QUERY_COLLECTION_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_COLLECTION_ALL_TYPES\x10\x01\x12-\n)BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES\x10\x02*\xa8\x01\n\x11\x42igQueryTableType\x12$\n BIG_QUERY_TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x42IG_QUERY_TABLE_TYPE_TABLE\x10\x01\x12*\n&BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE\x10\x02\x12!\n\x1d\x42IG_QUERY_TABLE_TYPE_SNAPSHOT\x10\x03*\x94\x01\n\x1a\x44\x61taProfileUpdateFrequency\x12 \n\x1cUPDATE_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPDATE_FREQUENCY_NEVER\x10\x01\x12\x1a\n\x16UPDATE_FREQUENCY_DAILY\x10\x02\x12\x1c\n\x18UPDATE_FREQUENCY_MONTHLY\x10\x04*]\n\x19\x42igQueryTableModification\x12\"\n\x1eTABLE_MODIFICATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18TABLE_MODIFIED_TIMESTAMP\x10\x01*u\n\x1a\x42igQuerySchemaModification\x12#\n\x1fSCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SCHEMA_NEW_COLUMNS\x10\x01\x12\x1a\n\x16SCHEMA_REMOVED_COLUMNS\x10\x02*\xbb\x01\n\x12RelationalOperator\x12#\n\x1fRELATIONAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45QUAL_TO\x10\x01\x12\x10\n\x0cNOT_EQUAL_TO\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x05\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x06\x12\n\n\x06\x45XISTS\x10\x07*\x8d\x01\n\x0cMatchingType\x12\x1d\n\x19MATCHING_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18MATCHING_TYPE_FULL_MATCH\x10\x01\x12\x1f\n\x1bMATCHING_TYPE_PARTIAL_MATCH\x10\x02\x12\x1f\n\x1bMATCHING_TYPE_INVERSE_MATCH\x10\x03*M\n\rContentOption\x12\x17\n\x13\x43ONTENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONTENT_TEXT\x10\x01\x12\x11\n\rCONTENT_IMAGE\x10\x02*B\n\x0cMetadataType\x12\x1c\n\x18METADATATYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STORAGE_METADATA\x10\x02*P\n\x13InfoTypeSupportedBy\x12\x19\n\x15\x45NUM_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INSPECT\x10\x01\x12\x11\n\rRISK_ANALYSIS\x10\x02*R\n\nDlpJobType\x12\x1c\n\x18\x44LP_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINSPECT_JOB\x10\x01\x12\x15\n\x11RISK_ANALYSIS_JOB\x10\x02*n\n\x13StoredInfoTypeState\x12&\n\"STORED_INFO_TYPE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07INVALID\x10\x04*\xa3\x01\n\x12ResourceVisibility\x12#\n\x1fRESOURCE_VISIBILITY_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_VISIBILITY_PUBLIC\x10\n\x12$\n RESOURCE_VISIBILITY_INCONCLUSIVE\x10\x0f\x12\"\n\x1eRESOURCE_VISIBILITY_RESTRICTED\x10\x14*u\n\x10\x45ncryptionStatus\x12!\n\x1d\x45NCRYPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NCRYPTION_GOOGLE_MANAGED\x10\x01\x12\x1f\n\x1b\x45NCRYPTION_CUSTOMER_MANAGED\x10\x02*\xa9\x01\n\x13NullPercentageLevel\x12%\n!NULL_PERCENTAGE_LEVEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18NULL_PERCENTAGE_VERY_LOW\x10\x01\x12\x17\n\x13NULL_PERCENTAGE_LOW\x10\x02\x12\x1a\n\x16NULL_PERCENTAGE_MEDIUM\x10\x03\x12\x18\n\x14NULL_PERCENTAGE_HIGH\x10\x04*\x90\x01\n\x14UniquenessScoreLevel\x12&\n\"UNIQUENESS_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x18\n\x14UNIQUENESS_SCORE_LOW\x10\x01\x12\x1b\n\x17UNIQUENESS_SCORE_MEDIUM\x10\x02\x12\x19\n\x15UNIQUENESS_SCORE_HIGH\x10\x03*f\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13MISSING_CREDENTIALS\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xddv\n\nDlpService\x12\xdb\x01\n\x0eInspectContent\x12,.google.privacy.dlp.v2.InspectContentRequest\x1a-.google.privacy.dlp.v2.InspectContentResponse\"l\x82\xd3\xe4\x93\x02\x66\"\'/v2/{parent=projects/*}/content:inspect:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/content:inspect:\x01*\x12\xcc\x01\n\x0bRedactImage\x12).google.privacy.dlp.v2.RedactImageRequest\x1a*.google.privacy.dlp.v2.RedactImageResponse\"f\x82\xd3\xe4\x93\x02`\"$/v2/{parent=projects/*}/image:redact:\x01*Z5\"0/v2/{parent=projects/*/locations/*}/image:redact:\x01*\x12\xea\x01\n\x11\x44\x65identifyContent\x12/.google.privacy.dlp.v2.DeidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.DeidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:deidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:deidentify:\x01*\x12\xea\x01\n\x11ReidentifyContent\x12/.google.privacy.dlp.v2.ReidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.ReidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:reidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:reidentify:\x01*\x12\x99\x02\n\rListInfoTypes\x12+.google.privacy.dlp.v2.ListInfoTypesRequest\x1a,.google.privacy.dlp.v2.ListInfoTypesResponse\"\xac\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9c\x01\x12\r/v2/infoTypesZ$\x12\"/v2/{parent=locations/*}/infoTypesZ/\x12-/v2/{parent=projects/*/locations/*}/infoTypesZ4\x12\x32/v2/{parent=organizations/*/locations/*}/infoTypes\x12\xf4\x02\n\x15\x43reateInspectTemplate\x12\x33.google.privacy.dlp.v2.CreateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xfd\x01\xda\x41\x17parent,inspect_template\x82\xd3\xe4\x93\x02\xdc\x01\"4/v2/{parent=projects/*/locations/*}/inspectTemplates:\x01*Z>\"9/v2/{parent=organizations/*/locations/*}/inspectTemplates:\x01*Z-\"(/v2/{parent=projects/*}/inspectTemplates:\x01*Z2\"-/v2/{parent=organizations/*}/inspectTemplates:\x01*\x12\xfe\x02\n\x15UpdateInspectTemplate\x12\x33.google.privacy.dlp.v2.UpdateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\x87\x02\xda\x41!name,inspect_template,update_mask\x82\xd3\xe4\x93\x02\xdc\x01\x32\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/inspectTemplates/*}:\x01*Z-2(/v2/{name=projects/*/inspectTemplates/*}:\x01*Z22-/v2/{name=organizations/*/inspectTemplates/*}:\x01*\x12\xcf\x02\n\x12GetInspectTemplate\x12\x30.google.privacy.dlp.v2.GetInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z*\x12(/v2/{name=projects/*/inspectTemplates/*}Z/\x12-/v2/{name=organizations/*/inspectTemplates/*}\x12\xe2\x02\n\x14ListInspectTemplates\x12\x32.google.privacy.dlp.v2.ListInspectTemplatesRequest\x1a\x33.google.privacy.dlp.v2.ListInspectTemplatesResponse\"\xe0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{parent=projects/*/locations/*}/inspectTemplatesZ;\x12\x39/v2/{parent=organizations/*/locations/*}/inspectTemplatesZ*\x12(/v2/{parent=projects/*}/inspectTemplatesZ/\x12-/v2/{parent=organizations/*}/inspectTemplates\x12\xc5\x02\n\x15\x44\x65leteInspectTemplate\x12\x33.google.privacy.dlp.v2.DeleteInspectTemplateRequest\x1a\x16.google.protobuf.Empty\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01*4/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;*9/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z**(/v2/{name=projects/*/inspectTemplates/*}Z/*-/v2/{name=organizations/*/inspectTemplates/*}\x12\x8c\x03\n\x18\x43reateDeidentifyTemplate\x12\x36.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest\x1a).google.privacy.dlp.v2.DeidentifyTemplate\"\x8c\x02\xda\x41\x1aparent,deidentify_template\x82\xd3\xe4\x93\x02\xe8\x01\"0/v2/{parent=organizations/*}/deidentifyTemplates:\x01*ZA\"\x12\x12*\"9/v2/{parent=organizations/*/locations/*}/discoveryConfigs:\x01*\x12\x9a\x02\n\x15UpdateDiscoveryConfig\x12\x33.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\xa3\x01\xda\x41!name,discovery_config,update_mask\x82\xd3\xe4\x93\x02y24/v2/{name=projects/*/locations/*/discoveryConfigs/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/discoveryConfigs/*}:\x01*\x12\xf1\x01\n\x12GetDiscoveryConfig\x12\x30.google.privacy.dlp.v2.GetDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s\x12\x34/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\x84\x02\n\x14ListDiscoveryConfigs\x12\x32.google.privacy.dlp.v2.ListDiscoveryConfigsRequest\x1a\x33.google.privacy.dlp.v2.ListDiscoveryConfigsResponse\"\x82\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x34/v2/{parent=projects/*/locations/*}/discoveryConfigsZ;\x12\x39/v2/{parent=organizations/*/locations/*}/discoveryConfigs\x12\xe7\x01\n\x15\x44\x65leteDiscoveryConfig\x12\x33.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest\x1a\x16.google.protobuf.Empty\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s*4/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;*9/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\xdf\x01\n\x0c\x43reateDlpJob\x12*.google.privacy.dlp.v2.CreateDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"\x83\x01\xda\x41\x12parent,inspect_job\xda\x41\x0fparent,risk_job\x82\xd3\xe4\x93\x02V\"\x1f/v2/{parent=projects/*}/dlpJobs:\x01*Z0\"+/v2/{parent=projects/*/locations/*}/dlpJobs:\x01*\x12\xfb\x01\n\x0bListDlpJobs\x12).google.privacy.dlp.v2.ListDlpJobsRequest\x1a*.google.privacy.dlp.v2.ListDlpJobsResponse\"\x94\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x84\x01\x12\x1f/v2/{parent=projects/*}/dlpJobsZ-\x12+/v2/{parent=projects/*/locations/*}/dlpJobsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/dlpJobs\x12\xb2\x01\n\tGetDlpJob\x12\'.google.privacy.dlp.v2.GetDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12\x1f/v2/{name=projects/*/dlpJobs/*}Z-\x12+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xb1\x01\n\x0c\x44\x65leteDlpJob\x12*.google.privacy.dlp.v2.DeleteDlpJobRequest\x1a\x16.google.protobuf.Empty\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P*\x1f/v2/{name=projects/*/dlpJobs/*}Z-*+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xbe\x01\n\x0c\x43\x61ncelDlpJob\x12*.google.privacy.dlp.v2.CancelDlpJobRequest\x1a\x16.google.protobuf.Empty\"j\x82\xd3\xe4\x93\x02\x64\"&/v2/{name=projects/*/dlpJobs/*}:cancel:\x01*Z7\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel:\x01*\x12\xe3\x02\n\x14\x43reateStoredInfoType\x12\x32.google.privacy.dlp.v2.CreateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xef\x01\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\xd8\x01\",/v2/{parent=organizations/*}/storedInfoTypes:\x01*Z=\"8/v2/{parent=organizations/*/locations/*}/storedInfoTypes:\x01*Z,\"\'/v2/{parent=projects/*}/storedInfoTypes:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/storedInfoTypes:\x01*\x12\xed\x02\n\x14UpdateStoredInfoType\x12\x32.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xf9\x01\xda\x41\x17name,config,update_mask\x82\xd3\xe4\x93\x02\xd8\x01\x32,/v2/{name=organizations/*/storedInfoTypes/*}:\x01*Z=28/v2/{name=organizations/*/locations/*/storedInfoTypes/*}:\x01*Z,2\'/v2/{name=projects/*/storedInfoTypes/*}:\x01*Z823/v2/{name=projects/*/locations/*/storedInfoTypes/*}:\x01*\x12\xc8\x02\n\x11GetStoredInfoType\x12/.google.privacy.dlp.v2.GetStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{name=organizations/*/storedInfoTypes/*}Z:\x12\x38/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)\x12\'/v2/{name=projects/*/storedInfoTypes/*}Z5\x12\x33/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\xdb\x02\n\x13ListStoredInfoTypes\x12\x31.google.privacy.dlp.v2.ListStoredInfoTypesRequest\x1a\x32.google.privacy.dlp.v2.ListStoredInfoTypesResponse\"\xdc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{parent=organizations/*}/storedInfoTypesZ:\x12\x38/v2/{parent=organizations/*/locations/*}/storedInfoTypesZ)\x12\'/v2/{parent=projects/*}/storedInfoTypesZ5\x12\x33/v2/{parent=projects/*/locations/*}/storedInfoTypes\x12\xbf\x02\n\x14\x44\x65leteStoredInfoType\x12\x32.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest\x1a\x16.google.protobuf.Empty\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01*,/v2/{name=organizations/*/storedInfoTypes/*}Z:*8/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)*\'/v2/{name=projects/*/storedInfoTypes/*}Z5*3/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\x93\x02\n\x17ListProjectDataProfiles\x12\x35.google.privacy.dlp.v2.ListProjectDataProfilesRequest\x1a\x36.google.privacy.dlp.v2.ListProjectDataProfilesResponse\"\x88\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12/v2/{parent=organizations/*/locations/*}/fileStoreDataProfilesZ;\x12\x39/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles\x12\x8a\x02\n\x17GetFileStoreDataProfile\x12\x35.google.privacy.dlp.v2.GetFileStoreDataProfileRequest\x1a+.google.privacy.dlp.v2.FileStoreDataProfile\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}\x12>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;\x12\x39/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xfb\x01\n\x1a\x44\x65leteFileStoreDataProfile\x12\x38.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}*>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;*9/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xf6\x01\n\x13GetTableDataProfile\x12\x31.google.privacy.dlp.v2.GetTableDataProfileRequest\x1a\'.google.privacy.dlp.v2.TableDataProfile\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u\x12:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7\x12\x35/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xfb\x01\n\x14GetColumnDataProfile\x12\x32.google.privacy.dlp.v2.GetColumnDataProfileRequest\x1a(.google.privacy.dlp.v2.ColumnDataProfile\"\x84\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02w\x12;/v2/{name=organizations/*/locations/*/columnDataProfiles/*}Z8\x12\x36/v2/{name=projects/*/locations/*/columnDataProfiles/*}\x12\xeb\x01\n\x16\x44\x65leteTableDataProfile\x12\x34.google.privacy.dlp.v2.DeleteTableDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u*:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7*5/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xc3\x01\n\x13HybridInspectDlpJob\x12\x31.google.privacy.dlp.v2.HybridInspectDlpJobRequest\x1a,.google.privacy.dlp.v2.HybridInspectResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect:\x01*\x12\x91\x01\n\x0c\x46inishDlpJob\x12*.google.privacy.dlp.v2.FinishDlpJobRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:finish:\x01*\x12\xf2\x01\n\x10\x43reateConnection\x12..google.privacy.dlp.v2.CreateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"\x8a\x01\xda\x41\x12parent, connection\x82\xd3\xe4\x93\x02o\"//v2/{parent=projects/*/locations/*}/connections:\x01*Z9\"4/v2/{parent=organizations/*/locations/*}/connections:\x01*\x12\xd7\x01\n\rGetConnection\x12+.google.privacy.dlp.v2.GetConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i\x12//v2/{name=projects/*/locations/*/connections/*}Z6\x12\x34/v2/{name=organizations/*/locations/*/connections/*}\x12\xea\x01\n\x0fListConnections\x12-.google.privacy.dlp.v2.ListConnectionsRequest\x1a..google.privacy.dlp.v2.ListConnectionsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2/{parent=projects/*/locations/*}/connectionsZ6\x12\x34/v2/{parent=organizations/*/locations/*}/connections\x12\xff\x01\n\x11SearchConnections\x12/.google.privacy.dlp.v2.SearchConnectionsRequest\x1a\x30.google.privacy.dlp.v2.SearchConnectionsResponse\"\x86\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02w\x12\x36/v2/{parent=projects/*/locations/*}/connections:searchZ=\x12;/v2/{parent=organizations/*/locations/*}/connections:search\x12\xd2\x01\n\x10\x44\x65leteConnection\x12..google.privacy.dlp.v2.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i*//v2/{name=projects/*/locations/*/connections/*}Z6*4/v2/{name=organizations/*/locations/*/connections/*}\x12\xe3\x01\n\x10UpdateConnection\x12..google.privacy.dlp.v2.UpdateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"|\xda\x41\x04name\x82\xd3\xe4\x93\x02o2//v2/{name=projects/*/locations/*/connections/*}:\x01*Z924/v2/{name=organizations/*/locations/*/connections/*}:\x01*\x1a\x46\xca\x41\x12\x64lp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x02\n\x19\x63om.google.privacy.dlp.v2B\x08\x44lpProtoP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2\xea\x41r\n\x1d\x64lp.googleapis.com/DlpContent\x12\x1dprojects/{project}/dlpContent\x12\x32projects/{project}/locations/{location}/dlpContent\xea\x41\\\n\'dlp.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -418,6 +418,7 @@ module V2 ProcessingLocation::MultiRegionProcessing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing").msgclass ProcessingLocation::GlobalProcessing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing").msgclass ProcessingLocation::ImageFallbackLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation").msgclass + SaveToGcsFindingsOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SaveToGcsFindingsOutput").msgclass TransformationResultStatusType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationResultStatusType").enummodule TransformationContainerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationContainerType").enummodule TransformationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationType").enummodule diff --git a/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb b/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb index 6f69d65cdda4..f65cdeedbc14 100644 --- a/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb +++ b/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb @@ -5326,7 +5326,7 @@ class DiscoveryCloudStorageFilter extend ::Google::Protobuf::MessageExts::ClassMethods end - # Match file stores (e.g. buckets) using regex filters. + # Match file stores (e.g. buckets) using filters. # @!attribute [rw] include_regexes # @return [::Google::Cloud::Dlp::V2::FileStoreRegexes] # Optional. A collection of regular expressions to match a file store @@ -8073,6 +8073,17 @@ class ImageFallbackLocation end end + # Collection of findings saved to a Cloud Storage bucket. This is used as the + # proto schema for textproto files created when specifying a cloud storage + # path to save inspection findings. + # @!attribute [rw] findings + # @return [::Array<::Google::Cloud::Dlp::V2::Finding>] + # List of findings. + class SaveToGcsFindingsOutput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Enum of possible outcomes of transformations. SUCCESS if transformation and # storing of transformation was successful, otherwise, reason for not # transforming. From a6ace31793ebd638776bc3ca5cf2c9197a07a82f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:14:23 -0700 Subject: [PATCH 123/457] feat(parameter_manager-v1): Provide a path helper for crypto key resources (#30533) --- .../v1/parameter_manager/paths.rb | 21 +++++++++++++++++++ .../cloud/parametermanager/v1/service_pb.rb | 2 +- .../v1/parameter_manager_paths_test.rb | 12 +++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/parameter_manager/paths.rb b/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/parameter_manager/paths.rb index 267bf60ec4c2..6577f3576be5 100644 --- a/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/parameter_manager/paths.rb +++ b/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/parameter_manager/paths.rb @@ -24,6 +24,27 @@ module V1 module ParameterManager # Path helper methods for the ParameterManager API. module Paths + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + ## # Create a fully-qualified Location resource string. # diff --git a/google-cloud-parameter_manager-v1/lib/google/cloud/parametermanager/v1/service_pb.rb b/google-cloud-parameter_manager-v1/lib/google/cloud/parametermanager/v1/service_pb.rb index 40b7f93777d4..099c0b94bdb8 100644 --- a/google-cloud-parameter_manager-v1/lib/google/cloud/parametermanager/v1/service_pb.rb +++ b/google-cloud-parameter_manager-v1/lib/google/cloud/parametermanager/v1/service_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n.google/cloud/parametermanager/v1/service.proto\x12 google.cloud.parametermanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v1/resource_policy_member.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc0\x04\n\tParameter\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12L\n\x06labels\x18\x04 \x03(\x0b\x32\x37.google.cloud.parametermanager.v1.Parameter.LabelsEntryB\x03\xe0\x41\x01\x12\x46\n\x06\x66ormat\x18\x05 \x01(\x0e\x32\x31.google.cloud.parametermanager.v1.ParameterFormatB\x03\xe0\x41\x01\x12?\n\rpolicy_member\x18\x06 \x01(\x0b\x32#.google.iam.v1.ResourcePolicyMemberB\x03\xe0\x41\x03\x12\x19\n\x07kms_key\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n)parametermanager.googleapis.com/Parameter\x12>projects/{project}/locations/{location}/parameters/{parameter}*\nparameters2\tparameterB\n\n\x08_kms_key\"\xb7\x01\n\x15ListParametersRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)parametermanager.googleapis.com/Parameter\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8c\x01\n\x16ListParametersResponse\x12?\n\nparameters\x18\x01 \x03(\x0b\x32+.google.cloud.parametermanager.v1.Parameter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"V\n\x13GetParameterRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)parametermanager.googleapis.com/Parameter\"\xdc\x01\n\x16\x43reateParameterRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)parametermanager.googleapis.com/Parameter\x12\x19\n\x0cparameter_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\tparameter\x18\x03 \x01(\x0b\x32+.google.cloud.parametermanager.v1.ParameterB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb4\x01\n\x16UpdateParameterRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\tparameter\x18\x02 \x01(\x0b\x32+.google.cloud.parametermanager.v1.ParameterB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"z\n\x16\x44\x65leteParameterRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)parametermanager.googleapis.com/Parameter\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xf1\x03\n\x10ParameterVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12R\n\x07payload\x18\x05 \x01(\x0b\x32\x39.google.cloud.parametermanager.v1.ParameterVersionPayloadB\x06\xe0\x41\x02\xe0\x41\x05\x12$\n\x0fkms_key_version\x18\x06 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x01H\x00\x88\x01\x01:\xb8\x01\xea\x41\xb4\x01\n0parametermanager.googleapis.com/ParameterVersion\x12[projects/{project}/locations/{location}/parameters/{parameter}/versions/{parameter_version}*\x11parameterVersions2\x10parameterVersionB\x12\n\x10_kms_key_version\",\n\x17ParameterVersionPayload\x12\x11\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"\xc5\x01\n\x1cListParameterVersionsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30parametermanager.googleapis.com/ParameterVersion\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n\x1dListParameterVersionsResponse\x12N\n\x12parameter_versions\x18\x01 \x03(\x0b\x32\x32.google.cloud.parametermanager.v1.ParameterVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\x9f\x01\n\x1aGetParameterVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0parametermanager.googleapis.com/ParameterVersion\x12\x39\n\x04view\x18\x06 \x01(\x0e\x32&.google.cloud.parametermanager.v1.ViewB\x03\xe0\x41\x01\"g\n\x1dRenderParameterVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0parametermanager.googleapis.com/ParameterVersion\"\xe0\x01\n\x1eRenderParameterVersionResponse\x12S\n\x11parameter_version\x18\x01 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0parametermanager.googleapis.com/ParameterVersion\x12J\n\x07payload\x18\x02 \x01(\x0b\x32\x39.google.cloud.parametermanager.v1.ParameterVersionPayload\x12\x1d\n\x10rendered_payload\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x03\"\x81\x02\n\x1d\x43reateParameterVersionRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30parametermanager.googleapis.com/ParameterVersion\x12!\n\x14parameter_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x11parameter_version\x18\x03 \x01(\x0b\x32\x32.google.cloud.parametermanager.v1.ParameterVersionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateParameterVersionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x11parameter_version\x18\x02 \x01(\x0b\x32\x32.google.cloud.parametermanager.v1.ParameterVersionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x88\x01\n\x1d\x44\x65leteParameterVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0parametermanager.googleapis.com/ParameterVersion\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*X\n\x0fParameterFormat\x12 \n\x1cPARAMETER_FORMAT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bUNFORMATTED\x10\x01\x12\x08\n\x04YAML\x10\x02\x12\x08\n\x04JSON\x10\x03*1\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xdd\x13\n\x10ParameterManager\x12\xc4\x01\n\x0eListParameters\x12\x37.google.cloud.parametermanager.v1.ListParametersRequest\x1a\x38.google.cloud.parametermanager.v1.ListParametersResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/parameters\x12\xb1\x01\n\x0cGetParameter\x12\x35.google.cloud.parametermanager.v1.GetParameterRequest\x1a+.google.cloud.parametermanager.v1.Parameter\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/parameters/*}\x12\xdb\x01\n\x0f\x43reateParameter\x12\x38.google.cloud.parametermanager.v1.CreateParameterRequest\x1a+.google.cloud.parametermanager.v1.Parameter\"a\xda\x41\x1dparent,parameter,parameter_id\x82\xd3\xe4\x93\x02;\"./v1/{parent=projects/*/locations/*}/parameters:\tparameter\x12\xdd\x01\n\x0fUpdateParameter\x12\x38.google.cloud.parametermanager.v1.UpdateParameterRequest\x1a+.google.cloud.parametermanager.v1.Parameter\"c\xda\x41\x15parameter,update_mask\x82\xd3\xe4\x93\x02\x45\x32\x38/v1/{parameter.name=projects/*/locations/*/parameters/*}:\tparameter\x12\xa2\x01\n\x0f\x44\x65leteParameter\x12\x38.google.cloud.parametermanager.v1.DeleteParameterRequest\x1a\x16.google.protobuf.Empty\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/parameters/*}\x12\xe4\x01\n\x15ListParameterVersions\x12>.google.cloud.parametermanager.v1.ListParameterVersionsRequest\x1a?.google.cloud.parametermanager.v1.ListParameterVersionsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/parameters/*}/versions\x12\xd1\x01\n\x13GetParameterVersion\x12<.google.cloud.parametermanager.v1.GetParameterVersionRequest\x1a\x32.google.cloud.parametermanager.v1.ParameterVersion\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/parameters/*/versions/*}\x12\xec\x01\n\x16RenderParameterVersion\x12?.google.cloud.parametermanager.v1.RenderParameterVersionRequest\x1a@.google.cloud.parametermanager.v1.RenderParameterVersionResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/parameters/*/versions/*}:render\x12\x94\x02\n\x16\x43reateParameterVersion\x12?.google.cloud.parametermanager.v1.CreateParameterVersionRequest\x1a\x32.google.cloud.parametermanager.v1.ParameterVersion\"\x84\x01\xda\x41-parent,parameter_version,parameter_version_id\x82\xd3\xe4\x93\x02N\"9/v1/{parent=projects/*/locations/*/parameters/*}/versions:\x11parameter_version\x12\x96\x02\n\x16UpdateParameterVersion\x12?.google.cloud.parametermanager.v1.UpdateParameterVersionRequest\x1a\x32.google.cloud.parametermanager.v1.ParameterVersion\"\x86\x01\xda\x41\x1dparameter_version,update_mask\x82\xd3\xe4\x93\x02`2K/v1/{parameter_version.name=projects/*/locations/*/parameters/*/versions/*}:\x11parameter_version\x12\xbb\x01\n\x16\x44\x65leteParameterVersion\x12?.google.cloud.parametermanager.v1.DeleteParameterVersionRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/parameters/*/versions/*}\x1aS\xca\x41\x1fparametermanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf3\x01\n$com.google.cloud.parametermanager.v1B\x0bV1mainProtoP\x01ZPcloud.google.com/go/parametermanager/apiv1/parametermanagerpb;parametermanagerpb\xaa\x02 Google.Cloud.ParameterManager.V1\xca\x02 Google\\Cloud\\ParameterManager\\V1\xea\x02#Google::Cloud::ParameterManager::V1b\x06proto3" +descriptor_data = "\n.google/cloud/parametermanager/v1/service.proto\x12 google.cloud.parametermanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v1/resource_policy_member.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe6\x04\n\tParameter\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12L\n\x06labels\x18\x04 \x03(\x0b\x32\x37.google.cloud.parametermanager.v1.Parameter.LabelsEntryB\x03\xe0\x41\x01\x12\x46\n\x06\x66ormat\x18\x05 \x01(\x0e\x32\x31.google.cloud.parametermanager.v1.ParameterFormatB\x03\xe0\x41\x01\x12?\n\rpolicy_member\x18\x06 \x01(\x0b\x32#.google.iam.v1.ResourcePolicyMemberB\x03\xe0\x41\x03\x12?\n\x07kms_key\x18\x07 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n)parametermanager.googleapis.com/Parameter\x12>projects/{project}/locations/{location}/parameters/{parameter}*\nparameters2\tparameterB\n\n\x08_kms_key\"\xb7\x01\n\x15ListParametersRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)parametermanager.googleapis.com/Parameter\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8c\x01\n\x16ListParametersResponse\x12?\n\nparameters\x18\x01 \x03(\x0b\x32+.google.cloud.parametermanager.v1.Parameter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"V\n\x13GetParameterRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)parametermanager.googleapis.com/Parameter\"\xdc\x01\n\x16\x43reateParameterRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)parametermanager.googleapis.com/Parameter\x12\x19\n\x0cparameter_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\tparameter\x18\x03 \x01(\x0b\x32+.google.cloud.parametermanager.v1.ParameterB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb4\x01\n\x16UpdateParameterRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\tparameter\x18\x02 \x01(\x0b\x32+.google.cloud.parametermanager.v1.ParameterB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"z\n\x16\x44\x65leteParameterRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)parametermanager.googleapis.com/Parameter\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xf1\x03\n\x10ParameterVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12R\n\x07payload\x18\x05 \x01(\x0b\x32\x39.google.cloud.parametermanager.v1.ParameterVersionPayloadB\x06\xe0\x41\x02\xe0\x41\x05\x12$\n\x0fkms_key_version\x18\x06 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x01H\x00\x88\x01\x01:\xb8\x01\xea\x41\xb4\x01\n0parametermanager.googleapis.com/ParameterVersion\x12[projects/{project}/locations/{location}/parameters/{parameter}/versions/{parameter_version}*\x11parameterVersions2\x10parameterVersionB\x12\n\x10_kms_key_version\",\n\x17ParameterVersionPayload\x12\x11\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"\xc5\x01\n\x1cListParameterVersionsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30parametermanager.googleapis.com/ParameterVersion\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n\x1dListParameterVersionsResponse\x12N\n\x12parameter_versions\x18\x01 \x03(\x0b\x32\x32.google.cloud.parametermanager.v1.ParameterVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\x9f\x01\n\x1aGetParameterVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0parametermanager.googleapis.com/ParameterVersion\x12\x39\n\x04view\x18\x06 \x01(\x0e\x32&.google.cloud.parametermanager.v1.ViewB\x03\xe0\x41\x01\"g\n\x1dRenderParameterVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0parametermanager.googleapis.com/ParameterVersion\"\xe0\x01\n\x1eRenderParameterVersionResponse\x12S\n\x11parameter_version\x18\x01 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0parametermanager.googleapis.com/ParameterVersion\x12J\n\x07payload\x18\x02 \x01(\x0b\x32\x39.google.cloud.parametermanager.v1.ParameterVersionPayload\x12\x1d\n\x10rendered_payload\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x03\"\x81\x02\n\x1d\x43reateParameterVersionRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30parametermanager.googleapis.com/ParameterVersion\x12!\n\x14parameter_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x11parameter_version\x18\x03 \x01(\x0b\x32\x32.google.cloud.parametermanager.v1.ParameterVersionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateParameterVersionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x11parameter_version\x18\x02 \x01(\x0b\x32\x32.google.cloud.parametermanager.v1.ParameterVersionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x88\x01\n\x1d\x44\x65leteParameterVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0parametermanager.googleapis.com/ParameterVersion\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*X\n\x0fParameterFormat\x12 \n\x1cPARAMETER_FORMAT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bUNFORMATTED\x10\x01\x12\x08\n\x04YAML\x10\x02\x12\x08\n\x04JSON\x10\x03*1\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xdd\x13\n\x10ParameterManager\x12\xc4\x01\n\x0eListParameters\x12\x37.google.cloud.parametermanager.v1.ListParametersRequest\x1a\x38.google.cloud.parametermanager.v1.ListParametersResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/parameters\x12\xb1\x01\n\x0cGetParameter\x12\x35.google.cloud.parametermanager.v1.GetParameterRequest\x1a+.google.cloud.parametermanager.v1.Parameter\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/parameters/*}\x12\xdb\x01\n\x0f\x43reateParameter\x12\x38.google.cloud.parametermanager.v1.CreateParameterRequest\x1a+.google.cloud.parametermanager.v1.Parameter\"a\xda\x41\x1dparent,parameter,parameter_id\x82\xd3\xe4\x93\x02;\"./v1/{parent=projects/*/locations/*}/parameters:\tparameter\x12\xdd\x01\n\x0fUpdateParameter\x12\x38.google.cloud.parametermanager.v1.UpdateParameterRequest\x1a+.google.cloud.parametermanager.v1.Parameter\"c\xda\x41\x15parameter,update_mask\x82\xd3\xe4\x93\x02\x45\x32\x38/v1/{parameter.name=projects/*/locations/*/parameters/*}:\tparameter\x12\xa2\x01\n\x0f\x44\x65leteParameter\x12\x38.google.cloud.parametermanager.v1.DeleteParameterRequest\x1a\x16.google.protobuf.Empty\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/parameters/*}\x12\xe4\x01\n\x15ListParameterVersions\x12>.google.cloud.parametermanager.v1.ListParameterVersionsRequest\x1a?.google.cloud.parametermanager.v1.ListParameterVersionsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/parameters/*}/versions\x12\xd1\x01\n\x13GetParameterVersion\x12<.google.cloud.parametermanager.v1.GetParameterVersionRequest\x1a\x32.google.cloud.parametermanager.v1.ParameterVersion\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/parameters/*/versions/*}\x12\xec\x01\n\x16RenderParameterVersion\x12?.google.cloud.parametermanager.v1.RenderParameterVersionRequest\x1a@.google.cloud.parametermanager.v1.RenderParameterVersionResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/parameters/*/versions/*}:render\x12\x94\x02\n\x16\x43reateParameterVersion\x12?.google.cloud.parametermanager.v1.CreateParameterVersionRequest\x1a\x32.google.cloud.parametermanager.v1.ParameterVersion\"\x84\x01\xda\x41-parent,parameter_version,parameter_version_id\x82\xd3\xe4\x93\x02N\"9/v1/{parent=projects/*/locations/*/parameters/*}/versions:\x11parameter_version\x12\x96\x02\n\x16UpdateParameterVersion\x12?.google.cloud.parametermanager.v1.UpdateParameterVersionRequest\x1a\x32.google.cloud.parametermanager.v1.ParameterVersion\"\x86\x01\xda\x41\x1dparameter_version,update_mask\x82\xd3\xe4\x93\x02`2K/v1/{parameter_version.name=projects/*/locations/*/parameters/*/versions/*}:\x11parameter_version\x12\xbb\x01\n\x16\x44\x65leteParameterVersion\x12?.google.cloud.parametermanager.v1.DeleteParameterVersionRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/parameters/*/versions/*}\x1aS\xca\x41\x1fparametermanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xee\x02\n$com.google.cloud.parametermanager.v1B\x0bV1mainProtoP\x01ZPcloud.google.com/go/parametermanager/apiv1/parametermanagerpb;parametermanagerpb\xaa\x02 Google.Cloud.ParameterManager.V1\xca\x02 Google\\Cloud\\ParameterManager\\V1\xea\x02#Google::Cloud::ParameterManager::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-parameter_manager-v1/test/google/cloud/parameter_manager/v1/parameter_manager_paths_test.rb b/google-cloud-parameter_manager-v1/test/google/cloud/parameter_manager/v1/parameter_manager_paths_test.rb index c979cb2a66ea..ee28b86505f1 100644 --- a/google-cloud-parameter_manager-v1/test/google/cloud/parameter_manager/v1/parameter_manager_paths_test.rb +++ b/google-cloud-parameter_manager-v1/test/google/cloud/parameter_manager/v1/parameter_manager_paths_test.rb @@ -41,6 +41,18 @@ def logger end end + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ParameterManager::V1::ParameterManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + 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 From 46d440ecc0954c771ca2d65162e527b6b8563545 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:15:32 -0700 Subject: [PATCH 124/457] docs(translate-v3): Provide links to the language support page from the reference docs (#30534) --- .../cloud/translate/v3/adaptive_mt_pb.rb | 2 +- .../translate/v3/automl_translation_pb.rb | 2 +- .../google/cloud/translate/v3/common_pb.rb | 2 +- .../v3/translation_service/client.rb | 43 ++++++++++++------- .../v3/translation_service/rest/client.rb | 43 ++++++++++++------- .../translate/v3/translation_service_pb.rb | 2 +- .../cloud/translate/v3/translation_service.rb | 43 ++++++++++++------- 7 files changed, 88 insertions(+), 49 deletions(-) diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb index 8ab714e34a89..d4d827c8bde8 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n+google/cloud/translate/v3/adaptive_mt.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x03\n\x11\x41\x64\x61ptiveMtDataset\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1c\n\x14source_language_code\x18\x03 \x01(\t\x12\x1c\n\x14target_language_code\x18\x04 \x01(\t\x12\x15\n\rexample_count\x18\x05 \x01(\x05\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:u\xea\x41r\n*translate.googleapis.com/AdaptiveMtDataset\x12\x44projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}\"\xad\x01\n\x1e\x43reateAdaptiveMtDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12P\n\x13\x61\x64\x61ptive_mt_dataset\x18\x02 \x01(\x0b\x32..google.cloud.translation.v3.AdaptiveMtDatasetB\x03\xe0\x41\x02\"b\n\x1e\x44\x65leteAdaptiveMtDatasetRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\"_\n\x1bGetAdaptiveMtDatasetRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\"\xa0\x01\n\x1dListAdaptiveMtDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x91\x01\n\x1eListAdaptiveMtDatasetsResponse\x12Q\n\x14\x61\x64\x61ptive_mt_datasets\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.AdaptiveMtDatasetB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x08\n\x1a\x41\x64\x61ptiveMtTranslateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x07\x64\x61taset\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x14\n\x07\x63ontent\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12w\n\x19reference_sentence_config\x18\x06 \x01(\x0b\x32O.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfigH\x00\x88\x01\x01\x12i\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x46.google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfigB\x03\xe0\x41\x01H\x01\x88\x01\x01\x1aI\n\x15ReferenceSentencePair\x12\x17\n\x0fsource_sentence\x18\x01 \x01(\t\x12\x17\n\x0ftarget_sentence\x18\x02 \x01(\t\x1a\x8c\x01\n\x19ReferenceSentencePairList\x12o\n\x18reference_sentence_pairs\x18\x01 \x03(\x0b\x32M.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair\x1a\xcf\x01\n\x17ReferenceSentenceConfig\x12x\n\x1dreference_sentence_pair_lists\x18\x01 \x03(\x0b\x32Q.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\x1a\x94\x01\n\x0eGlossaryConfig\x12;\n\x08glossary\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1e\x63ontextual_translation_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x1c\n\x1a_reference_sentence_configB\x12\n\x10_glossary_config\"5\n\x15\x41\x64\x61ptiveMtTranslation\x12\x1c\n\x0ftranslated_text\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xdb\x01\n\x1b\x41\x64\x61ptiveMtTranslateResponse\x12M\n\x0ctranslations\x18\x01 \x03(\x0b\x32\x32.google.cloud.translation.v3.AdaptiveMtTranslationB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x15glossary_translations\x18\x04 \x03(\x0b\x32\x32.google.cloud.translation.v3.AdaptiveMtTranslation\"\x94\x03\n\x0e\x41\x64\x61ptiveMtFile\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xab\x01\xea\x41\xa7\x01\n\'translate.googleapis.com/AdaptiveMtFile\x12[projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}*\x0f\x61\x64\x61ptiveMtFiles2\x0e\x61\x64\x61ptiveMtFile\"Y\n\x18GetAdaptiveMtFileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\"\\\n\x1b\x44\x65leteAdaptiveMtFileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\"\xff\x01\n\x1bImportAdaptiveMtFileRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12I\n\x11\x66ile_input_source\x18\x02 \x01(\x0b\x32,.google.cloud.translation.v3.FileInputSourceH\x00\x12G\n\x10gcs_input_source\x18\x03 \x01(\x0b\x32+.google.cloud.translation.v3.GcsInputSourceH\x00\x42\x08\n\x06source\"j\n\x1cImportAdaptiveMtFileResponse\x12J\n\x10\x61\x64\x61ptive_mt_file\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.AdaptiveMtFileB\x03\xe0\x41\x03\"\x91\x01\n\x1aListAdaptiveMtFilesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x1bListAdaptiveMtFilesResponse\x12K\n\x11\x61\x64\x61ptive_mt_files\x18\x01 \x03(\x0b\x32+.google.cloud.translation.v3.AdaptiveMtFileB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xd8\x03\n\x12\x41\x64\x61ptiveMtSentence\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+translate.googleapis.com/AdaptiveMtSentence\x12\x1c\n\x0fsource_sentence\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0ftarget_sentence\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xd6\x01\xea\x41\xd2\x01\n+translate.googleapis.com/AdaptiveMtSentence\x12zprojects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}*\x13\x61\x64\x61ptiveMtSentences2\x12\x61\x64\x61ptiveMtSentence\"\x88\x01\n\x1eListAdaptiveMtSentencesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x94\x01\n\x1fListAdaptiveMtSentencesResponse\x12S\n\x15\x61\x64\x61ptive_mt_sentences\x18\x01 \x03(\x0b\x32/.google.cloud.translation.v3.AdaptiveMtSentenceB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\xc9\x01\n\x1d\x63om.google.cloud.translate.v3B\x0f\x41\x64\x61ptiveMtProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xf8\x01\x01\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" +descriptor_data = "\n+google/cloud/translate/v3/adaptive_mt.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x03\n\x11\x41\x64\x61ptiveMtDataset\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1c\n\x14source_language_code\x18\x03 \x01(\t\x12\x1c\n\x14target_language_code\x18\x04 \x01(\t\x12\x15\n\rexample_count\x18\x05 \x01(\x05\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:u\xea\x41r\n*translate.googleapis.com/AdaptiveMtDataset\x12\x44projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}\"\xad\x01\n\x1e\x43reateAdaptiveMtDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12P\n\x13\x61\x64\x61ptive_mt_dataset\x18\x02 \x01(\x0b\x32..google.cloud.translation.v3.AdaptiveMtDatasetB\x03\xe0\x41\x02\"b\n\x1e\x44\x65leteAdaptiveMtDatasetRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\"_\n\x1bGetAdaptiveMtDatasetRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\"\xa0\x01\n\x1dListAdaptiveMtDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x91\x01\n\x1eListAdaptiveMtDatasetsResponse\x12Q\n\x14\x61\x64\x61ptive_mt_datasets\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.AdaptiveMtDatasetB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x08\n\x1a\x41\x64\x61ptiveMtTranslateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x07\x64\x61taset\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x14\n\x07\x63ontent\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12w\n\x19reference_sentence_config\x18\x06 \x01(\x0b\x32O.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfigH\x00\x88\x01\x01\x12i\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x46.google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfigB\x03\xe0\x41\x01H\x01\x88\x01\x01\x1aI\n\x15ReferenceSentencePair\x12\x17\n\x0fsource_sentence\x18\x01 \x01(\t\x12\x17\n\x0ftarget_sentence\x18\x02 \x01(\t\x1a\x8c\x01\n\x19ReferenceSentencePairList\x12o\n\x18reference_sentence_pairs\x18\x01 \x03(\x0b\x32M.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair\x1a\xcf\x01\n\x17ReferenceSentenceConfig\x12x\n\x1dreference_sentence_pair_lists\x18\x01 \x03(\x0b\x32Q.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\x1a\x94\x01\n\x0eGlossaryConfig\x12;\n\x08glossary\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1e\x63ontextual_translation_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x1c\n\x1a_reference_sentence_configB\x12\n\x10_glossary_config\"5\n\x15\x41\x64\x61ptiveMtTranslation\x12\x1c\n\x0ftranslated_text\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xdb\x01\n\x1b\x41\x64\x61ptiveMtTranslateResponse\x12M\n\x0ctranslations\x18\x01 \x03(\x0b\x32\x32.google.cloud.translation.v3.AdaptiveMtTranslationB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x15glossary_translations\x18\x04 \x03(\x0b\x32\x32.google.cloud.translation.v3.AdaptiveMtTranslation\"\x94\x03\n\x0e\x41\x64\x61ptiveMtFile\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xab\x01\xea\x41\xa7\x01\n\'translate.googleapis.com/AdaptiveMtFile\x12[projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}*\x0f\x61\x64\x61ptiveMtFiles2\x0e\x61\x64\x61ptiveMtFile\"Y\n\x18GetAdaptiveMtFileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\"\\\n\x1b\x44\x65leteAdaptiveMtFileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\"\xff\x01\n\x1bImportAdaptiveMtFileRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12I\n\x11\x66ile_input_source\x18\x02 \x01(\x0b\x32,.google.cloud.translation.v3.FileInputSourceH\x00\x12G\n\x10gcs_input_source\x18\x03 \x01(\x0b\x32+.google.cloud.translation.v3.GcsInputSourceH\x00\x42\x08\n\x06source\"j\n\x1cImportAdaptiveMtFileResponse\x12J\n\x10\x61\x64\x61ptive_mt_file\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.AdaptiveMtFileB\x03\xe0\x41\x03\"\x91\x01\n\x1aListAdaptiveMtFilesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x1bListAdaptiveMtFilesResponse\x12K\n\x11\x61\x64\x61ptive_mt_files\x18\x01 \x03(\x0b\x32+.google.cloud.translation.v3.AdaptiveMtFileB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xd8\x03\n\x12\x41\x64\x61ptiveMtSentence\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+translate.googleapis.com/AdaptiveMtSentence\x12\x1c\n\x0fsource_sentence\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0ftarget_sentence\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xd6\x01\xea\x41\xd2\x01\n+translate.googleapis.com/AdaptiveMtSentence\x12zprojects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}*\x13\x61\x64\x61ptiveMtSentences2\x12\x61\x64\x61ptiveMtSentence\"\x88\x01\n\x1eListAdaptiveMtSentencesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x94\x01\n\x1fListAdaptiveMtSentencesResponse\x12S\n\x15\x61\x64\x61ptive_mt_sentences\x18\x01 \x03(\x0b\x32/.google.cloud.translation.v3.AdaptiveMtSentenceB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\xc6\x01\n\x1d\x63om.google.cloud.translate.v3B\x0f\x41\x64\x61ptiveMtProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb index 88ac5a44b502..e0f412d2d493 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb @@ -11,7 +11,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n2google/cloud/translate/v3/automl_translation.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"u\n\x11ImportDataRequest\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x0cinput_config\x18\x02 \x01(\x0b\x32/.google.cloud.translation.v3.DatasetInputConfigB\x03\xe0\x41\x02\"\xd2\x01\n\x12\x44\x61tasetInputConfig\x12N\n\x0binput_files\x18\x01 \x03(\x0b\x32\x39.google.cloud.translation.v3.DatasetInputConfig.InputFile\x1al\n\tInputFile\x12\x12\n\x05usage\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\ngcs_source\x18\x03 \x01(\x0b\x32+.google.cloud.translation.v3.GcsInputSourceH\x00\x42\x08\n\x06source\"\xd5\x01\n\x12ImportDataMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"w\n\x11\x45xportDataRequest\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.translation.v3.DatasetOutputConfigB\x03\xe0\x41\x02\"r\n\x13\x44\x61tasetOutputConfig\x12L\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x31.google.cloud.translation.v3.GcsOutputDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xd5\x01\n\x12\x45xportDataMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"N\n\x14\x44\x65leteDatasetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\"\xd8\x01\n\x15\x44\x65leteDatasetMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"K\n\x11GetDatasetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\"\x81\x01\n\x13ListDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x14ListDatasetsResponse\x12\x36\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32$.google.cloud.translation.v3.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8d\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32$.google.cloud.translation.v3.DatasetB\x03\xe0\x41\x02\"\xd8\x01\n\x15\x43reateDatasetMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x95\x01\n\x13ListExamplesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\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\"g\n\x14ListExamplesResponse\x12\x36\n\x08\x65xamples\x18\x01 \x03(\x0b\x32$.google.cloud.translation.v3.Example\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd0\x01\n\x07\x45xample\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0bsource_text\x18\x02 \x01(\t\x12\x13\n\x0btarget_text\x18\x03 \x01(\t\x12\x12\n\x05usage\x18\x04 \x01(\tB\x03\xe0\x41\x03:t\xea\x41q\n translate.googleapis.com/Example\x12Mprojects/{project}/locations/{location}/datasets/{dataset}/examples/{example}\"\xe8\x01\n\x1e\x42\x61tchTransferResourcesResponse\x12g\n\tresponses\x18\x01 \x03(\x0b\x32T.google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse\x1a]\n\x18TransferResourceResponse\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0e\n\x06target\x18\x02 \x01(\t\x12!\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\xbc\x03\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1c\n\x14source_language_code\x18\x03 \x01(\t\x12\x1c\n\x14target_language_code\x18\x04 \x01(\t\x12\x1a\n\rexample_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13train_example_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16validate_example_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12test_example_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:a\xea\x41^\n translate.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}\"\x87\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x36\n\x05model\x18\x02 \x01(\x0b\x32\".google.cloud.translation.v3.ModelB\x03\xe0\x41\x02\"\xd6\x01\n\x13\x43reateModelMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x94\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"a\n\x12ListModelsResponse\x12\x32\n\x06models\x18\x01 \x03(\x0b\x32\".google.cloud.translation.v3.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetModelRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1etranslate.googleapis.com/Model\"J\n\x12\x44\x65leteModelRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1etranslate.googleapis.com/Model\"\xd6\x01\n\x13\x44\x65leteModelMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\xb3\x03\n\x05Model\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x03 \x01(\t\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13train_example_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16validate_example_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12test_example_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:[\xea\x41X\n\x1etranslate.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\xd0\x01\n\x1d\x63om.google.cloud.translate.v3B\x16\x41utoMLTranslationProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xf8\x01\x01\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" +descriptor_data = "\n2google/cloud/translate/v3/automl_translation.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"u\n\x11ImportDataRequest\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x0cinput_config\x18\x02 \x01(\x0b\x32/.google.cloud.translation.v3.DatasetInputConfigB\x03\xe0\x41\x02\"\xd2\x01\n\x12\x44\x61tasetInputConfig\x12N\n\x0binput_files\x18\x01 \x03(\x0b\x32\x39.google.cloud.translation.v3.DatasetInputConfig.InputFile\x1al\n\tInputFile\x12\x12\n\x05usage\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\ngcs_source\x18\x03 \x01(\x0b\x32+.google.cloud.translation.v3.GcsInputSourceH\x00\x42\x08\n\x06source\"\xd5\x01\n\x12ImportDataMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"w\n\x11\x45xportDataRequest\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.translation.v3.DatasetOutputConfigB\x03\xe0\x41\x02\"r\n\x13\x44\x61tasetOutputConfig\x12L\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x31.google.cloud.translation.v3.GcsOutputDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xd5\x01\n\x12\x45xportDataMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"N\n\x14\x44\x65leteDatasetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\"\xd8\x01\n\x15\x44\x65leteDatasetMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"K\n\x11GetDatasetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\"\x81\x01\n\x13ListDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x14ListDatasetsResponse\x12\x36\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32$.google.cloud.translation.v3.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8d\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32$.google.cloud.translation.v3.DatasetB\x03\xe0\x41\x02\"\xd8\x01\n\x15\x43reateDatasetMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x95\x01\n\x13ListExamplesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\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\"g\n\x14ListExamplesResponse\x12\x36\n\x08\x65xamples\x18\x01 \x03(\x0b\x32$.google.cloud.translation.v3.Example\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd0\x01\n\x07\x45xample\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0bsource_text\x18\x02 \x01(\t\x12\x13\n\x0btarget_text\x18\x03 \x01(\t\x12\x12\n\x05usage\x18\x04 \x01(\tB\x03\xe0\x41\x03:t\xea\x41q\n translate.googleapis.com/Example\x12Mprojects/{project}/locations/{location}/datasets/{dataset}/examples/{example}\"\xe8\x01\n\x1e\x42\x61tchTransferResourcesResponse\x12g\n\tresponses\x18\x01 \x03(\x0b\x32T.google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse\x1a]\n\x18TransferResourceResponse\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0e\n\x06target\x18\x02 \x01(\t\x12!\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\xbc\x03\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1c\n\x14source_language_code\x18\x03 \x01(\t\x12\x1c\n\x14target_language_code\x18\x04 \x01(\t\x12\x1a\n\rexample_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13train_example_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16validate_example_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12test_example_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:a\xea\x41^\n translate.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}\"\x87\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x36\n\x05model\x18\x02 \x01(\x0b\x32\".google.cloud.translation.v3.ModelB\x03\xe0\x41\x02\"\xd6\x01\n\x13\x43reateModelMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x94\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"a\n\x12ListModelsResponse\x12\x32\n\x06models\x18\x01 \x03(\x0b\x32\".google.cloud.translation.v3.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetModelRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1etranslate.googleapis.com/Model\"J\n\x12\x44\x65leteModelRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1etranslate.googleapis.com/Model\"\xd6\x01\n\x13\x44\x65leteModelMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\xb3\x03\n\x05Model\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x03 \x01(\t\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13train_example_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16validate_example_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12test_example_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:[\xea\x41X\n\x1etranslate.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\xcd\x01\n\x1d\x63om.google.cloud.translate.v3B\x16\x41utoMLTranslationProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb index 9cb4d44de912..d648a11bc7bc 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n&google/cloud/translate/v3/common.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"(\n\x0eGcsInputSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"Z\n\x0f\x46ileInputSource\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\"6\n\x14GcsOutputDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xf8\x04\n\rGlossaryEntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12R\n\nterms_pair\x18\x02 \x01(\x0b\x32<.google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPairH\x00\x12P\n\tterms_set\x18\x03 \x01(\x0b\x32;.google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSetH\x00\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x1a\x93\x01\n\x11GlossaryTermsPair\x12>\n\x0bsource_term\x18\x01 \x01(\x0b\x32).google.cloud.translation.v3.GlossaryTerm\x12>\n\x0btarget_term\x18\x02 \x01(\x0b\x32).google.cloud.translation.v3.GlossaryTerm\x1aL\n\x10GlossaryTermsSet\x12\x38\n\x05terms\x18\x01 \x03(\x0b\x32).google.cloud.translation.v3.GlossaryTerm:\xac\x01\xea\x41\xa8\x01\n&translate.googleapis.com/GlossaryEntry\x12^projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}*\x0fglossaryEntries2\rglossaryEntryB\x06\n\x04\x64\x61ta\"3\n\x0cGlossaryTerm\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t*\xc8\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17OPERATION_STATE_RUNNING\x10\x01\x12\x1d\n\x19OPERATION_STATE_SUCCEEDED\x10\x02\x12\x1a\n\x16OPERATION_STATE_FAILED\x10\x03\x12\x1e\n\x1aOPERATION_STATE_CANCELLING\x10\x04\x12\x1d\n\x19OPERATION_STATE_CANCELLED\x10\x05\x42\xc5\x01\n\x1d\x63om.google.cloud.translate.v3B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xf8\x01\x01\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" +descriptor_data = "\n&google/cloud/translate/v3/common.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"(\n\x0eGcsInputSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"Z\n\x0f\x46ileInputSource\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\"6\n\x14GcsOutputDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xf8\x04\n\rGlossaryEntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12R\n\nterms_pair\x18\x02 \x01(\x0b\x32<.google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPairH\x00\x12P\n\tterms_set\x18\x03 \x01(\x0b\x32;.google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSetH\x00\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x1a\x93\x01\n\x11GlossaryTermsPair\x12>\n\x0bsource_term\x18\x01 \x01(\x0b\x32).google.cloud.translation.v3.GlossaryTerm\x12>\n\x0btarget_term\x18\x02 \x01(\x0b\x32).google.cloud.translation.v3.GlossaryTerm\x1aL\n\x10GlossaryTermsSet\x12\x38\n\x05terms\x18\x01 \x03(\x0b\x32).google.cloud.translation.v3.GlossaryTerm:\xac\x01\xea\x41\xa8\x01\n&translate.googleapis.com/GlossaryEntry\x12^projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}*\x0fglossaryEntries2\rglossaryEntryB\x06\n\x04\x64\x61ta\"3\n\x0cGlossaryTerm\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t*\xc8\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17OPERATION_STATE_RUNNING\x10\x01\x12\x1d\n\x19OPERATION_STATE_SUCCEEDED\x10\x02\x12\x1a\n\x16OPERATION_STATE_FAILED\x10\x03\x12\x1e\n\x1aOPERATION_STATE_CANCELLING\x10\x04\x12\x1d\n\x19OPERATION_STATE_CANCELLED\x10\x05\x42\xc2\x01\n\x1d\x63om.google.cloud.translate.v3B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb index 86d3168787a2..d704b88d139e 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb @@ -289,12 +289,14 @@ def logger # @param source_language_code [::String] # Optional. The ISO-639 language code of the input text if # known, for example, "en-US" or "sr-Latn". Supported language codes are - # listed in Language Support. If the source language isn't specified, the API - # attempts to identify the source language automatically and returns the - # source language within the response. + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). If the source + # language isn't specified, the API attempts to identify the source language + # automatically and returns the source language within the response. # @param target_language_code [::String] # Required. The ISO-639 language code to use for translation of the input - # text, set to one of the language codes listed in Language Support. + # text, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param parent [::String] # Required. Project or location to make a call. Must refer to a caller's # project. @@ -441,9 +443,12 @@ def translate_text request, options = nil # Required. The content of the input in string format. # @param source_language_code [::String] # Optional. The ISO-639 language code of the input text if - # known, for example, "hi" or "zh". If the source language isn't specified, - # the API attempts to identify the source language automatically and returns - # the source language for each content in the response. + # known, for example, "hi" or "zh". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages#roman). If the + # source language isn't specified, the API attempts to identify the source + # language automatically and returns the source language for each content in + # the response. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Translate::V3::RomanizeTextResponse] @@ -778,13 +783,15 @@ def get_supported_languages request, options = nil # @param source_language_code [::String] # Optional. The ISO-639 language code of the input document if known, for # example, "en-US" or "sr-Latn". Supported language codes are listed in - # Language Support. If the source language isn't specified, the API attempts - # to identify the source language automatically and returns the source - # language within the response. Source language must be specified if the - # request contains a glossary or a custom model. + # [Language Support] (https://cloud.google.com/translate/docs/languages). If + # the source language isn't specified, the API attempts to identify the + # source language automatically and returns the source language within the + # response. Source language must be specified if the request contains a + # glossary or a custom model. # @param target_language_code [::String] # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in Language Support. + # document, set to one of the language codes listed in [Language Support] + # (https://cloud.google.com/translate/docs/languages). # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash] # Required. Input configurations. # @param document_output_config [::Google::Cloud::Translate::V3::DocumentOutputConfig, ::Hash] @@ -937,9 +944,13 @@ def translate_document request, options = nil # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) # error is returned. # @param source_language_code [::String] - # Required. Source language code. + # Required. Source language code. Supported language codes are listed in + # [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param target_language_codes [::Array<::String>] - # Required. Specify up to 10 language codes here. + # Required. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param models [::Hash{::String => ::String}] # Optional. The models to use for translation. Map's key is target language # code. Map's value is model name. Value can be a built-in general model, @@ -1092,7 +1103,9 @@ def batch_translate_text request, options = nil # [Language Support](https://cloud.google.com/translate/docs/languages). # @param target_language_codes [::Array<::String>] # Required. The ISO-639 language code to use for translation of the input - # document. Specify up to 10 language codes here. + # document. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param input_configs [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig, ::Hash>] # Required. Input configurations. # The total number of files matched should be <= 100. diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb index 9f99ec95b610..b61e20ff6aba 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb @@ -283,12 +283,14 @@ def logger # @param source_language_code [::String] # Optional. The ISO-639 language code of the input text if # known, for example, "en-US" or "sr-Latn". Supported language codes are - # listed in Language Support. If the source language isn't specified, the API - # attempts to identify the source language automatically and returns the - # source language within the response. + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). If the source + # language isn't specified, the API attempts to identify the source language + # automatically and returns the source language within the response. # @param target_language_code [::String] # Required. The ISO-639 language code to use for translation of the input - # text, set to one of the language codes listed in Language Support. + # text, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param parent [::String] # Required. Project or location to make a call. Must refer to a caller's # project. @@ -428,9 +430,12 @@ def translate_text request, options = nil # Required. The content of the input in string format. # @param source_language_code [::String] # Optional. The ISO-639 language code of the input text if - # known, for example, "hi" or "zh". If the source language isn't specified, - # the API attempts to identify the source language automatically and returns - # the source language for each content in the response. + # known, for example, "hi" or "zh". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages#roman). If the + # source language isn't specified, the API attempts to identify the source + # language automatically and returns the source language for each content in + # the response. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Translate::V3::RomanizeTextResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -744,13 +749,15 @@ def get_supported_languages request, options = nil # @param source_language_code [::String] # Optional. The ISO-639 language code of the input document if known, for # example, "en-US" or "sr-Latn". Supported language codes are listed in - # Language Support. If the source language isn't specified, the API attempts - # to identify the source language automatically and returns the source - # language within the response. Source language must be specified if the - # request contains a glossary or a custom model. + # [Language Support] (https://cloud.google.com/translate/docs/languages). If + # the source language isn't specified, the API attempts to identify the + # source language automatically and returns the source language within the + # response. Source language must be specified if the request contains a + # glossary or a custom model. # @param target_language_code [::String] # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in Language Support. + # document, set to one of the language codes listed in [Language Support] + # (https://cloud.google.com/translate/docs/languages). # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash] # Required. Input configurations. # @param document_output_config [::Google::Cloud::Translate::V3::DocumentOutputConfig, ::Hash] @@ -896,9 +903,13 @@ def translate_document request, options = nil # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) # error is returned. # @param source_language_code [::String] - # Required. Source language code. + # Required. Source language code. Supported language codes are listed in + # [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param target_language_codes [::Array<::String>] - # Required. Specify up to 10 language codes here. + # Required. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param models [::Hash{::String => ::String}] # Optional. The models to use for translation. Map's key is target language # code. Map's value is model name. Value can be a built-in general model, @@ -1044,7 +1055,9 @@ def batch_translate_text request, options = nil # [Language Support](https://cloud.google.com/translate/docs/languages). # @param target_language_codes [::Array<::String>] # Required. The ISO-639 language code to use for translation of the input - # document. Specify up to 10 language codes here. + # document. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param input_configs [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig, ::Hash>] # Required. Input configurations. # The total number of files matched should be <= 100. diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb index f5c2c19303c1..06eda86109d1 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb @@ -17,7 +17,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n3google/cloud/translate/v3/translation_service.proto\x12\x1bgoogle.cloud.translation.v3\x1a+google/cloud/translate/v3/adaptive_mt.proto\x1a\x32google/cloud/translate/v3/automl_translation.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x15TransliterationConfig\x12\x1e\n\x16\x65nable_transliteration\x18\x01 \x01(\x08\"\x8e\x04\n\x14TranslateTextRequest\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12W\n\x16transliteration_config\x18\r \x01(\x0b\x32\x32.google.cloud.translation.v3.TransliterationConfigB\x03\xe0\x41\x01\x12R\n\x06labels\x18\n \x03(\x0b\x32=.google.cloud.translation.v3.TranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa0\x01\n\x15TranslateTextResponse\x12>\n\x0ctranslations\x18\x01 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\x12G\n\x15glossary_translations\x18\x03 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\"\xa8\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x04 \x01(\t\x12Q\n\x0fglossary_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig\"\x8a\x01\n\x13RomanizeTextRequest\x12\x39\n\x06parent\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x0cRomanization\x12\x16\n\x0eromanized_text\x18\x01 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x02 \x01(\t\"X\n\x14RomanizeTextResponse\x12@\n\rromanizations\x18\x01 \x03(\x0b\x32).google.cloud.translation.v3.Romanization\"\x9f\x02\n\x15\x44\x65tectLanguageRequest\x12\x39\n\x06parent\x18\x05 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.translation.v3.DetectLanguageRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"Z\n\x16\x44\x65tectLanguageResponse\x12@\n\tlanguages\x18\x01 \x03(\x0b\x32-.google.cloud.translation.v3.DetectedLanguage\"\x91\x01\n\x1cGetSupportedLanguagesRequest\x12\x39\n\x06parent\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\"\n\x15\x64isplay_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x02 \x01(\tB\x03\xe0\x41\x01\"W\n\x12SupportedLanguages\x12\x41\n\tlanguages\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.SupportedLanguage\"p\n\x11SupportedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x16\n\x0esupport_source\x18\x03 \x01(\x08\x12\x16\n\x0esupport_target\x18\x04 \x01(\x08\"#\n\tGcsSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"m\n\x0bInputConfig\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x83\x01\n\x13\x44ocumentInputConfig\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x12\x11\n\tmime_type\x18\x04 \x01(\tB\x08\n\x06source\"\x8a\x01\n\x14\x44ocumentOutputConfig\x12K\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationB\x03\xe0\x41\x01H\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\r\n\x0b\x64\x65stination\"\xbe\x05\n\x18TranslateDocumentRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12T\n\x15\x64ocument_input_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentInputConfigB\x03\xe0\x41\x02\x12V\n\x16\x64ocument_output_config\x18\x05 \x01(\x0b\x32\x31.google.cloud.translation.v3.DocumentOutputConfigB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12V\n\x06labels\x18\x08 \x03(\x0b\x32\x41.google.cloud.translation.v3.TranslateDocumentRequest.LabelsEntryB\x03\xe0\x41\x01\x12#\n\x16\x63ustomized_attribution\x18\n \x01(\tB\x03\xe0\x41\x01\x12)\n\x1cis_translate_native_pdf_only\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12-\n enable_shadow_removal_native_pdf\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_rotation_correction\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"e\n\x13\x44ocumentTranslation\x12\x1b\n\x13\x62yte_stream_outputs\x18\x01 \x03(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x03 \x01(\t\"\xa6\x02\n\x19TranslateDocumentResponse\x12N\n\x14\x64ocument_translation\x18\x01 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentTranslation\x12W\n\x1dglossary_document_translation\x18\x02 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentTranslation\x12\r\n\x05model\x18\x03 \x01(\t\x12Q\n\x0fglossary_config\x18\x04 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig\"\x88\x06\n\x19\x42\x61tchTranslateTextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12W\n\x06models\x18\x04 \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.translation.v3.InputConfigB\x03\xe0\x41\x02\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32).google.cloud.translation.v3.OutputConfigB\x03\xe0\x41\x02\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateTextRequest.GlossariesEntryB\x03\xe0\x41\x01\x12W\n\x06labels\x18\t \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xce\x02\n\x16\x42\x61tchTranslateMetadata\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.google.cloud.translation.v3.BatchTranslateMetadata.State\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12\x18\n\x10total_characters\x18\x04 \x01(\x03\x12/\n\x0bsubmit_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xcb\x01\n\x16\x42\x61tchTranslateResponse\x12\x18\n\x10total_characters\x18\x01 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12/\n\x0bsubmit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"]\n\x13GlossaryInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"\x9a\x05\n\x08Glossary\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\rlanguage_pair\x18\x03 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodePairH\x00\x12T\n\x12language_codes_set\x18\x04 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodesSetH\x00\x12\x46\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.translation.v3.GlossaryInputConfig\x12\x18\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x01\x1aN\n\x10LanguageCodePair\x12\x1c\n\x14source_language_code\x18\x01 \x01(\t\x12\x1c\n\x14target_language_code\x18\x02 \x01(\t\x1a*\n\x10LanguageCodesSet\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t:e\xea\x41\x62\n!translate.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}B\x0b\n\tlanguages\"\x90\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02\"\x86\x01\n\x15UpdateGlossaryRequest\x12<\n\x08glossary\x18\x01 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"M\n\x12GetGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\"P\n\x15\x44\x65leteGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\"\x98\x01\n\x15ListGlossariesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"l\n\x16ListGlossariesResponse\x12\x39\n\nglossaries\x18\x01 \x03(\x0b\x32%.google.cloud.translation.v3.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"W\n\x17GetGlossaryEntryRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&translate.googleapis.com/GlossaryEntry\"Z\n\x1a\x44\x65leteGlossaryEntryRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&translate.googleapis.com/GlossaryEntry\"\x88\x01\n\x1aListGlossaryEntriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x1bListGlossaryEntriesResponse\x12I\n\x10glossary_entries\x18\x01 \x03(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1a\x43reateGlossaryEntryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12G\n\x0eglossary_entry\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x02\"e\n\x1aUpdateGlossaryEntryRequest\x12G\n\x0eglossary_entry\x18\x01 \x01(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x02\"\x88\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xb3\x02\n\x16UpdateGlossaryMetadata\x12\x37\n\x08glossary\x18\x01 \x01(\x0b\x32%.google.cloud.translation.v3.Glossary\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.UpdateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x88\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x85\x01\n\x16\x44\x65leteGlossaryResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x07\n\x1d\x42\x61tchTranslateDocumentRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12Q\n\rinput_configs\x18\x04 \x03(\x0b\x32\x35.google.cloud.translation.v3.BatchDocumentInputConfigB\x03\xe0\x41\x02\x12R\n\routput_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.translation.v3.BatchDocumentOutputConfigB\x03\xe0\x41\x02\x12[\n\x06models\x18\x06 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateDocumentRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x63\n\nglossaries\x18\x07 \x03(\x0b\x32J.google.cloud.translation.v3.BatchTranslateDocumentRequest.GlossariesEntryB\x03\xe0\x41\x01\x12r\n\x12\x66ormat_conversions\x18\x08 \x03(\x0b\x32Q.google.cloud.translation.v3.BatchTranslateDocumentRequest.FormatConversionsEntryB\x03\xe0\x41\x01\x12#\n\x16\x63ustomized_attribution\x18\n \x01(\tB\x03\xe0\x41\x01\x12-\n enable_shadow_removal_native_pdf\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_rotation_correction\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a\x38\n\x16\x46ormatConversionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x18\x42\x61tchDocumentInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"r\n\x19\x42\x61tchDocumentOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xd9\x02\n\x1e\x42\x61tchTranslateDocumentResponse\x12\x13\n\x0btotal_pages\x18\x01 \x01(\x03\x12\x18\n\x10translated_pages\x18\x02 \x01(\x03\x12\x14\n\x0c\x66\x61iled_pages\x18\x03 \x01(\x03\x12\x1c\n\x14total_billable_pages\x18\x04 \x01(\x03\x12\x18\n\x10total_characters\x18\x05 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x06 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x07 \x01(\x03\x12!\n\x19total_billable_characters\x18\x08 \x01(\x03\x12/\n\x0bsubmit_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe4\x03\n\x1e\x42\x61tchTranslateDocumentMetadata\x12P\n\x05state\x18\x01 \x01(\x0e\x32\x41.google.cloud.translation.v3.BatchTranslateDocumentMetadata.State\x12\x13\n\x0btotal_pages\x18\x02 \x01(\x03\x12\x18\n\x10translated_pages\x18\x03 \x01(\x03\x12\x14\n\x0c\x66\x61iled_pages\x18\x04 \x01(\x03\x12\x1c\n\x14total_billable_pages\x18\x05 \x01(\x03\x12\x18\n\x10total_characters\x18\x06 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x07 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x08 \x01(\x03\x12!\n\x19total_billable_characters\x18\t \x01(\x03\x12/\n\x0bsubmit_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xa1\x01\n\x1bTranslateTextGlossaryConfig\x12;\n\x08glossary\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1e\x63ontextual_translation_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbd\x43\n\x12TranslationService\x12\xd4\x02\n\rTranslateText\x12\x31.google.cloud.translation.v3.TranslateTextRequest\x1a\x32.google.cloud.translation.v3.TranslateTextResponse\"\xdb\x01\xda\x41$parent,target_language_code,contents\xda\x41Iparent,model,mime_type,source_language_code,target_language_code,contents\x82\xd3\xe4\x93\x02\x62\"1/v3/{parent=projects/*/locations/*}:translateText:\x01*Z*\"%/v3/{parent=projects/*}:translateText:\x01*\x12\xed\x01\n\x0cRomanizeText\x12\x30.google.cloud.translation.v3.RomanizeTextRequest\x1a\x31.google.cloud.translation.v3.RomanizeTextResponse\"x\xda\x41\x0fparent,contents\x82\xd3\xe4\x93\x02`\"0/v3/{parent=projects/*/locations/*}:romanizeText:\x01*Z)\"$/v3/{parent=projects/*}:romanizeText:\x01*\x12\x87\x02\n\x0e\x44\x65tectLanguage\x12\x32.google.cloud.translation.v3.DetectLanguageRequest\x1a\x33.google.cloud.translation.v3.DetectLanguageResponse\"\x8b\x01\xda\x41\x1eparent,model,mime_type,content\x82\xd3\xe4\x93\x02\x64\"2/v3/{parent=projects/*/locations/*}:detectLanguage:\x01*Z+\"&/v3/{parent=projects/*}:detectLanguage:\x01*\x12\x97\x02\n\x15GetSupportedLanguages\x12\x39.google.cloud.translation.v3.GetSupportedLanguagesRequest\x1a/.google.cloud.translation.v3.SupportedLanguages\"\x91\x01\xda\x41\"parent,model,display_language_code\x82\xd3\xe4\x93\x02\x66\x12\x36/v3/{parent=projects/*/locations/*}/supportedLanguagesZ,\x12*/v3/{parent=projects/*}/supportedLanguages\x12\xc4\x01\n\x11TranslateDocument\x12\x35.google.cloud.translation.v3.TranslateDocumentRequest\x1a\x36.google.cloud.translation.v3.TranslateDocumentResponse\"@\x82\xd3\xe4\x93\x02:\"5/v3/{parent=projects/*/locations/*}:translateDocument:\x01*\x12\xe1\x01\n\x12\x42\x61tchTranslateText\x12\x36.google.cloud.translation.v3.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\x30\n\x16\x42\x61tchTranslateResponse\x12\x16\x42\x61tchTranslateMetadata\x82\xd3\xe4\x93\x02;\"6/v3/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xce\x02\n\x16\x42\x61tchTranslateDocument\x12:.google.cloud.translation.v3.BatchTranslateDocumentRequest\x1a\x1d.google.longrunning.Operation\"\xd8\x01\xca\x41@\n\x1e\x42\x61tchTranslateDocumentResponse\x12\x1e\x42\x61tchTranslateDocumentMetadata\xda\x41Mparent,source_language_code,target_language_codes,input_configs,output_config\x82\xd3\xe4\x93\x02?\":/v3/{parent=projects/*/locations/*}:batchTranslateDocument:\x01*\x12\xdc\x01\n\x0e\x43reateGlossary\x12\x32.google.cloud.translation.v3.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\"\n\x08Glossary\x12\x16\x43reateGlossaryMetadata\xda\x41\x0fparent,glossary\x82\xd3\xe4\x93\x02:\"./v3/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xeb\x01\n\x0eUpdateGlossary\x12\x32.google.cloud.translation.v3.UpdateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\"\n\x08Glossary\x12\x16UpdateGlossaryMetadata\xda\x41\x14glossary,update_mask\x82\xd3\xe4\x93\x02\x43\x32\x37/v3/{glossary.name=projects/*/locations/*/glossaries/*}:\x08glossary\x12\xba\x01\n\x0eListGlossaries\x12\x32.google.cloud.translation.v3.ListGlossariesRequest\x1a\x33.google.cloud.translation.v3.ListGlossariesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v3/{parent=projects/*/locations/*}/glossaries\x12\xa4\x01\n\x0bGetGlossary\x12/.google.cloud.translation.v3.GetGlossaryRequest\x1a%.google.cloud.translation.v3.Glossary\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v3/{name=projects/*/locations/*/glossaries/*}\x12\xd5\x01\n\x0e\x44\x65leteGlossary\x12\x32.google.cloud.translation.v3.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x30\n\x16\x44\x65leteGlossaryResponse\x12\x16\x44\x65leteGlossaryMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v3/{name=projects/*/locations/*/glossaries/*}\x12\xc5\x01\n\x10GetGlossaryEntry\x12\x34.google.cloud.translation.v3.GetGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}\x12\xdb\x01\n\x13ListGlossaryEntries\x12\x37.google.cloud.translation.v3.ListGlossaryEntriesRequest\x1a\x38.google.cloud.translation.v3.ListGlossaryEntriesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries\x12\xec\x01\n\x13\x43reateGlossaryEntry\x12\x37.google.cloud.translation.v3.CreateGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"p\xda\x41\x15parent,glossary_entry\x82\xd3\xe4\x93\x02R\"@/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries:\x0eglossary_entry\x12\xf4\x01\n\x13UpdateGlossaryEntry\x12\x37.google.cloud.translation.v3.UpdateGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"x\xda\x41\x0eglossary_entry\x82\xd3\xe4\x93\x02\x61\x32O/v3/{glossary_entry.name=projects/*/locations/*/glossaries/*/glossaryEntries/*}:\x0eglossary_entry\x12\xb7\x01\n\x13\x44\x65leteGlossaryEntry\x12\x37.google.cloud.translation.v3.DeleteGlossaryEntryRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}\x12\xd4\x01\n\rCreateDataset\x12\x31.google.cloud.translation.v3.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41 \n\x07\x44\x61taset\x12\x15\x43reateDatasetMetadata\xda\x41\x0eparent,dataset\x82\xd3\xe4\x93\x02\x37\",/v3/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\x12\x9f\x01\n\nGetDataset\x12..google.cloud.translation.v3.GetDatasetRequest\x1a$.google.cloud.translation.v3.Dataset\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v3/{name=projects/*/locations/*/datasets/*}\x12\xb2\x01\n\x0cListDatasets\x12\x30.google.cloud.translation.v3.ListDatasetsRequest\x1a\x31.google.cloud.translation.v3.ListDatasetsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v3/{parent=projects/*/locations/*}/datasets\x12\xcf\x01\n\rDeleteDataset\x12\x31.google.cloud.translation.v3.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41.\n\x15google.protobuf.Empty\x12\x15\x44\x65leteDatasetMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v3/{name=projects/*/locations/*/datasets/*}\x12\xf8\x01\n\x17\x43reateAdaptiveMtDataset\x12;.google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest\x1a..google.cloud.translation.v3.AdaptiveMtDataset\"p\xda\x41\x1aparent,adaptive_mt_dataset\x82\xd3\xe4\x93\x02M\"6/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets:\x13\x61\x64\x61ptive_mt_dataset\x12\xb5\x01\n\x17\x44\x65leteAdaptiveMtDataset\x12;.google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}\x12\xc7\x01\n\x14GetAdaptiveMtDataset\x12\x38.google.cloud.translation.v3.GetAdaptiveMtDatasetRequest\x1a..google.cloud.translation.v3.AdaptiveMtDataset\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}\x12\xda\x01\n\x16ListAdaptiveMtDatasets\x12:.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest\x1a;.google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets\x12\xdd\x01\n\x13\x41\x64\x61ptiveMtTranslate\x12\x37.google.cloud.translation.v3.AdaptiveMtTranslateRequest\x1a\x38.google.cloud.translation.v3.AdaptiveMtTranslateResponse\"S\xda\x41\x0eparent,content\x82\xd3\xe4\x93\x02<\"7/v3/{parent=projects/*/locations/*}:adaptiveMtTranslate:\x01*\x12\xd0\x01\n\x11GetAdaptiveMtFile\x12\x35.google.cloud.translation.v3.GetAdaptiveMtFileRequest\x1a+.google.cloud.translation.v3.AdaptiveMtFile\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}\x12\xc1\x01\n\x14\x44\x65leteAdaptiveMtFile\x12\x38.google.cloud.translation.v3.DeleteAdaptiveMtFileRequest\x1a\x16.google.protobuf.Empty\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}\x12\xee\x01\n\x14ImportAdaptiveMtFile\x12\x38.google.cloud.translation.v3.ImportAdaptiveMtFileRequest\x1a\x39.google.cloud.translation.v3.ImportAdaptiveMtFileResponse\"a\xda\x41\x06parent\x82\xd3\xe4\x93\x02R\"M/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}:importAdaptiveMtFile:\x01*\x12\xe3\x01\n\x13ListAdaptiveMtFiles\x12\x37.google.cloud.translation.v3.ListAdaptiveMtFilesRequest\x1a\x38.google.cloud.translation.v3.ListAdaptiveMtFilesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtFiles\x12\xd7\x02\n\x17ListAdaptiveMtSentences\x12;.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest\x1a<.google.cloud.translation.v3.ListAdaptiveMtSentencesResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12^/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}/adaptiveMtSentencesZN\x12L/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtSentences\x12\xe8\x01\n\nImportData\x12..google.cloud.translation.v3.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12ImportDataMetadata\xda\x41\x14\x64\x61taset,input_config\x82\xd3\xe4\x93\x02?\":/v3/{dataset=projects/*/locations/*/datasets/*}:importData:\x01*\x12\xe9\x01\n\nExportData\x12..google.cloud.translation.v3.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12\x45xportDataMetadata\xda\x41\x15\x64\x61taset,output_config\x82\xd3\xe4\x93\x02?\":/v3/{dataset=projects/*/locations/*/datasets/*}:exportData:\x01*\x12\xbd\x01\n\x0cListExamples\x12\x30.google.cloud.translation.v3.ListExamplesRequest\x1a\x31.google.cloud.translation.v3.ListExamplesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v3/{parent=projects/*/locations/*/datasets/*}/examples\x12\xc6\x01\n\x0b\x43reateModel\x12/.google.cloud.translation.v3.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41\x1c\n\x05Model\x12\x13\x43reateModelMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x33\"*/v3/{parent=projects/*/locations/*}/models:\x05model\x12\xaa\x01\n\nListModels\x12..google.cloud.translation.v3.ListModelsRequest\x1a/.google.cloud.translation.v3.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v3/{parent=projects/*/locations/*}/models\x12\x97\x01\n\x08GetModel\x12,.google.cloud.translation.v3.GetModelRequest\x1a\".google.cloud.translation.v3.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*/locations/*/models/*}\x12\xc7\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.translation.v3.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41,\n\x15google.protobuf.Empty\x12\x13\x44\x65leteModelMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v3/{name=projects/*/locations/*/models/*}\x1a~\xca\x41\x18translate.googleapis.com\xd2\x41`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translationB\xd9\x01\n\x1d\x63om.google.cloud.translate.v3B\x17TranslationServiceProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xf8\x01\x01\xa2\x02\x05\x43TRL3\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3P\x00P\x01P\x02\x62\x06proto3" +descriptor_data = "\n3google/cloud/translate/v3/translation_service.proto\x12\x1bgoogle.cloud.translation.v3\x1a+google/cloud/translate/v3/adaptive_mt.proto\x1a\x32google/cloud/translate/v3/automl_translation.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x15TransliterationConfig\x12\x1e\n\x16\x65nable_transliteration\x18\x01 \x01(\x08\"\x8e\x04\n\x14TranslateTextRequest\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12W\n\x16transliteration_config\x18\r \x01(\x0b\x32\x32.google.cloud.translation.v3.TransliterationConfigB\x03\xe0\x41\x01\x12R\n\x06labels\x18\n \x03(\x0b\x32=.google.cloud.translation.v3.TranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa0\x01\n\x15TranslateTextResponse\x12>\n\x0ctranslations\x18\x01 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\x12G\n\x15glossary_translations\x18\x03 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\"\xa8\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x04 \x01(\t\x12Q\n\x0fglossary_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig\"\x8a\x01\n\x13RomanizeTextRequest\x12\x39\n\x06parent\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x0cRomanization\x12\x16\n\x0eromanized_text\x18\x01 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x02 \x01(\t\"X\n\x14RomanizeTextResponse\x12@\n\rromanizations\x18\x01 \x03(\x0b\x32).google.cloud.translation.v3.Romanization\"\x9f\x02\n\x15\x44\x65tectLanguageRequest\x12\x39\n\x06parent\x18\x05 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.translation.v3.DetectLanguageRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"Z\n\x16\x44\x65tectLanguageResponse\x12@\n\tlanguages\x18\x01 \x03(\x0b\x32-.google.cloud.translation.v3.DetectedLanguage\"\x91\x01\n\x1cGetSupportedLanguagesRequest\x12\x39\n\x06parent\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\"\n\x15\x64isplay_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x02 \x01(\tB\x03\xe0\x41\x01\"W\n\x12SupportedLanguages\x12\x41\n\tlanguages\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.SupportedLanguage\"p\n\x11SupportedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x16\n\x0esupport_source\x18\x03 \x01(\x08\x12\x16\n\x0esupport_target\x18\x04 \x01(\x08\"#\n\tGcsSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"m\n\x0bInputConfig\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x83\x01\n\x13\x44ocumentInputConfig\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x12\x11\n\tmime_type\x18\x04 \x01(\tB\x08\n\x06source\"\x8a\x01\n\x14\x44ocumentOutputConfig\x12K\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationB\x03\xe0\x41\x01H\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\r\n\x0b\x64\x65stination\"\xbe\x05\n\x18TranslateDocumentRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12T\n\x15\x64ocument_input_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentInputConfigB\x03\xe0\x41\x02\x12V\n\x16\x64ocument_output_config\x18\x05 \x01(\x0b\x32\x31.google.cloud.translation.v3.DocumentOutputConfigB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12V\n\x06labels\x18\x08 \x03(\x0b\x32\x41.google.cloud.translation.v3.TranslateDocumentRequest.LabelsEntryB\x03\xe0\x41\x01\x12#\n\x16\x63ustomized_attribution\x18\n \x01(\tB\x03\xe0\x41\x01\x12)\n\x1cis_translate_native_pdf_only\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12-\n enable_shadow_removal_native_pdf\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_rotation_correction\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"e\n\x13\x44ocumentTranslation\x12\x1b\n\x13\x62yte_stream_outputs\x18\x01 \x03(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x03 \x01(\t\"\xa6\x02\n\x19TranslateDocumentResponse\x12N\n\x14\x64ocument_translation\x18\x01 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentTranslation\x12W\n\x1dglossary_document_translation\x18\x02 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentTranslation\x12\r\n\x05model\x18\x03 \x01(\t\x12Q\n\x0fglossary_config\x18\x04 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig\"\x88\x06\n\x19\x42\x61tchTranslateTextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12W\n\x06models\x18\x04 \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.translation.v3.InputConfigB\x03\xe0\x41\x02\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32).google.cloud.translation.v3.OutputConfigB\x03\xe0\x41\x02\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateTextRequest.GlossariesEntryB\x03\xe0\x41\x01\x12W\n\x06labels\x18\t \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xce\x02\n\x16\x42\x61tchTranslateMetadata\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.google.cloud.translation.v3.BatchTranslateMetadata.State\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12\x18\n\x10total_characters\x18\x04 \x01(\x03\x12/\n\x0bsubmit_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xcb\x01\n\x16\x42\x61tchTranslateResponse\x12\x18\n\x10total_characters\x18\x01 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12/\n\x0bsubmit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"]\n\x13GlossaryInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"\x9a\x05\n\x08Glossary\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\rlanguage_pair\x18\x03 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodePairH\x00\x12T\n\x12language_codes_set\x18\x04 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodesSetH\x00\x12\x46\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.translation.v3.GlossaryInputConfig\x12\x18\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x01\x1aN\n\x10LanguageCodePair\x12\x1c\n\x14source_language_code\x18\x01 \x01(\t\x12\x1c\n\x14target_language_code\x18\x02 \x01(\t\x1a*\n\x10LanguageCodesSet\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t:e\xea\x41\x62\n!translate.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}B\x0b\n\tlanguages\"\x90\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02\"\x86\x01\n\x15UpdateGlossaryRequest\x12<\n\x08glossary\x18\x01 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"M\n\x12GetGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\"P\n\x15\x44\x65leteGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\"\x98\x01\n\x15ListGlossariesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"l\n\x16ListGlossariesResponse\x12\x39\n\nglossaries\x18\x01 \x03(\x0b\x32%.google.cloud.translation.v3.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"W\n\x17GetGlossaryEntryRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&translate.googleapis.com/GlossaryEntry\"Z\n\x1a\x44\x65leteGlossaryEntryRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&translate.googleapis.com/GlossaryEntry\"\x88\x01\n\x1aListGlossaryEntriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x1bListGlossaryEntriesResponse\x12I\n\x10glossary_entries\x18\x01 \x03(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1a\x43reateGlossaryEntryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12G\n\x0eglossary_entry\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x02\"e\n\x1aUpdateGlossaryEntryRequest\x12G\n\x0eglossary_entry\x18\x01 \x01(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x02\"\x88\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xb3\x02\n\x16UpdateGlossaryMetadata\x12\x37\n\x08glossary\x18\x01 \x01(\x0b\x32%.google.cloud.translation.v3.Glossary\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.UpdateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x88\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x85\x01\n\x16\x44\x65leteGlossaryResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x07\n\x1d\x42\x61tchTranslateDocumentRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12Q\n\rinput_configs\x18\x04 \x03(\x0b\x32\x35.google.cloud.translation.v3.BatchDocumentInputConfigB\x03\xe0\x41\x02\x12R\n\routput_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.translation.v3.BatchDocumentOutputConfigB\x03\xe0\x41\x02\x12[\n\x06models\x18\x06 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateDocumentRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x63\n\nglossaries\x18\x07 \x03(\x0b\x32J.google.cloud.translation.v3.BatchTranslateDocumentRequest.GlossariesEntryB\x03\xe0\x41\x01\x12r\n\x12\x66ormat_conversions\x18\x08 \x03(\x0b\x32Q.google.cloud.translation.v3.BatchTranslateDocumentRequest.FormatConversionsEntryB\x03\xe0\x41\x01\x12#\n\x16\x63ustomized_attribution\x18\n \x01(\tB\x03\xe0\x41\x01\x12-\n enable_shadow_removal_native_pdf\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_rotation_correction\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a\x38\n\x16\x46ormatConversionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x18\x42\x61tchDocumentInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"r\n\x19\x42\x61tchDocumentOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xd9\x02\n\x1e\x42\x61tchTranslateDocumentResponse\x12\x13\n\x0btotal_pages\x18\x01 \x01(\x03\x12\x18\n\x10translated_pages\x18\x02 \x01(\x03\x12\x14\n\x0c\x66\x61iled_pages\x18\x03 \x01(\x03\x12\x1c\n\x14total_billable_pages\x18\x04 \x01(\x03\x12\x18\n\x10total_characters\x18\x05 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x06 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x07 \x01(\x03\x12!\n\x19total_billable_characters\x18\x08 \x01(\x03\x12/\n\x0bsubmit_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe4\x03\n\x1e\x42\x61tchTranslateDocumentMetadata\x12P\n\x05state\x18\x01 \x01(\x0e\x32\x41.google.cloud.translation.v3.BatchTranslateDocumentMetadata.State\x12\x13\n\x0btotal_pages\x18\x02 \x01(\x03\x12\x18\n\x10translated_pages\x18\x03 \x01(\x03\x12\x14\n\x0c\x66\x61iled_pages\x18\x04 \x01(\x03\x12\x1c\n\x14total_billable_pages\x18\x05 \x01(\x03\x12\x18\n\x10total_characters\x18\x06 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x07 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x08 \x01(\x03\x12!\n\x19total_billable_characters\x18\t \x01(\x03\x12/\n\x0bsubmit_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xa1\x01\n\x1bTranslateTextGlossaryConfig\x12;\n\x08glossary\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1e\x63ontextual_translation_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbd\x43\n\x12TranslationService\x12\xd4\x02\n\rTranslateText\x12\x31.google.cloud.translation.v3.TranslateTextRequest\x1a\x32.google.cloud.translation.v3.TranslateTextResponse\"\xdb\x01\xda\x41$parent,target_language_code,contents\xda\x41Iparent,model,mime_type,source_language_code,target_language_code,contents\x82\xd3\xe4\x93\x02\x62\"1/v3/{parent=projects/*/locations/*}:translateText:\x01*Z*\"%/v3/{parent=projects/*}:translateText:\x01*\x12\xed\x01\n\x0cRomanizeText\x12\x30.google.cloud.translation.v3.RomanizeTextRequest\x1a\x31.google.cloud.translation.v3.RomanizeTextResponse\"x\xda\x41\x0fparent,contents\x82\xd3\xe4\x93\x02`\"0/v3/{parent=projects/*/locations/*}:romanizeText:\x01*Z)\"$/v3/{parent=projects/*}:romanizeText:\x01*\x12\x87\x02\n\x0e\x44\x65tectLanguage\x12\x32.google.cloud.translation.v3.DetectLanguageRequest\x1a\x33.google.cloud.translation.v3.DetectLanguageResponse\"\x8b\x01\xda\x41\x1eparent,model,mime_type,content\x82\xd3\xe4\x93\x02\x64\"2/v3/{parent=projects/*/locations/*}:detectLanguage:\x01*Z+\"&/v3/{parent=projects/*}:detectLanguage:\x01*\x12\x97\x02\n\x15GetSupportedLanguages\x12\x39.google.cloud.translation.v3.GetSupportedLanguagesRequest\x1a/.google.cloud.translation.v3.SupportedLanguages\"\x91\x01\xda\x41\"parent,model,display_language_code\x82\xd3\xe4\x93\x02\x66\x12\x36/v3/{parent=projects/*/locations/*}/supportedLanguagesZ,\x12*/v3/{parent=projects/*}/supportedLanguages\x12\xc4\x01\n\x11TranslateDocument\x12\x35.google.cloud.translation.v3.TranslateDocumentRequest\x1a\x36.google.cloud.translation.v3.TranslateDocumentResponse\"@\x82\xd3\xe4\x93\x02:\"5/v3/{parent=projects/*/locations/*}:translateDocument:\x01*\x12\xe1\x01\n\x12\x42\x61tchTranslateText\x12\x36.google.cloud.translation.v3.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\x30\n\x16\x42\x61tchTranslateResponse\x12\x16\x42\x61tchTranslateMetadata\x82\xd3\xe4\x93\x02;\"6/v3/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xce\x02\n\x16\x42\x61tchTranslateDocument\x12:.google.cloud.translation.v3.BatchTranslateDocumentRequest\x1a\x1d.google.longrunning.Operation\"\xd8\x01\xca\x41@\n\x1e\x42\x61tchTranslateDocumentResponse\x12\x1e\x42\x61tchTranslateDocumentMetadata\xda\x41Mparent,source_language_code,target_language_codes,input_configs,output_config\x82\xd3\xe4\x93\x02?\":/v3/{parent=projects/*/locations/*}:batchTranslateDocument:\x01*\x12\xdc\x01\n\x0e\x43reateGlossary\x12\x32.google.cloud.translation.v3.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\"\n\x08Glossary\x12\x16\x43reateGlossaryMetadata\xda\x41\x0fparent,glossary\x82\xd3\xe4\x93\x02:\"./v3/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xeb\x01\n\x0eUpdateGlossary\x12\x32.google.cloud.translation.v3.UpdateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\"\n\x08Glossary\x12\x16UpdateGlossaryMetadata\xda\x41\x14glossary,update_mask\x82\xd3\xe4\x93\x02\x43\x32\x37/v3/{glossary.name=projects/*/locations/*/glossaries/*}:\x08glossary\x12\xba\x01\n\x0eListGlossaries\x12\x32.google.cloud.translation.v3.ListGlossariesRequest\x1a\x33.google.cloud.translation.v3.ListGlossariesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v3/{parent=projects/*/locations/*}/glossaries\x12\xa4\x01\n\x0bGetGlossary\x12/.google.cloud.translation.v3.GetGlossaryRequest\x1a%.google.cloud.translation.v3.Glossary\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v3/{name=projects/*/locations/*/glossaries/*}\x12\xd5\x01\n\x0e\x44\x65leteGlossary\x12\x32.google.cloud.translation.v3.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x30\n\x16\x44\x65leteGlossaryResponse\x12\x16\x44\x65leteGlossaryMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v3/{name=projects/*/locations/*/glossaries/*}\x12\xc5\x01\n\x10GetGlossaryEntry\x12\x34.google.cloud.translation.v3.GetGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}\x12\xdb\x01\n\x13ListGlossaryEntries\x12\x37.google.cloud.translation.v3.ListGlossaryEntriesRequest\x1a\x38.google.cloud.translation.v3.ListGlossaryEntriesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries\x12\xec\x01\n\x13\x43reateGlossaryEntry\x12\x37.google.cloud.translation.v3.CreateGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"p\xda\x41\x15parent,glossary_entry\x82\xd3\xe4\x93\x02R\"@/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries:\x0eglossary_entry\x12\xf4\x01\n\x13UpdateGlossaryEntry\x12\x37.google.cloud.translation.v3.UpdateGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"x\xda\x41\x0eglossary_entry\x82\xd3\xe4\x93\x02\x61\x32O/v3/{glossary_entry.name=projects/*/locations/*/glossaries/*/glossaryEntries/*}:\x0eglossary_entry\x12\xb7\x01\n\x13\x44\x65leteGlossaryEntry\x12\x37.google.cloud.translation.v3.DeleteGlossaryEntryRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}\x12\xd4\x01\n\rCreateDataset\x12\x31.google.cloud.translation.v3.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41 \n\x07\x44\x61taset\x12\x15\x43reateDatasetMetadata\xda\x41\x0eparent,dataset\x82\xd3\xe4\x93\x02\x37\",/v3/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\x12\x9f\x01\n\nGetDataset\x12..google.cloud.translation.v3.GetDatasetRequest\x1a$.google.cloud.translation.v3.Dataset\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v3/{name=projects/*/locations/*/datasets/*}\x12\xb2\x01\n\x0cListDatasets\x12\x30.google.cloud.translation.v3.ListDatasetsRequest\x1a\x31.google.cloud.translation.v3.ListDatasetsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v3/{parent=projects/*/locations/*}/datasets\x12\xcf\x01\n\rDeleteDataset\x12\x31.google.cloud.translation.v3.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41.\n\x15google.protobuf.Empty\x12\x15\x44\x65leteDatasetMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v3/{name=projects/*/locations/*/datasets/*}\x12\xf8\x01\n\x17\x43reateAdaptiveMtDataset\x12;.google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest\x1a..google.cloud.translation.v3.AdaptiveMtDataset\"p\xda\x41\x1aparent,adaptive_mt_dataset\x82\xd3\xe4\x93\x02M\"6/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets:\x13\x61\x64\x61ptive_mt_dataset\x12\xb5\x01\n\x17\x44\x65leteAdaptiveMtDataset\x12;.google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}\x12\xc7\x01\n\x14GetAdaptiveMtDataset\x12\x38.google.cloud.translation.v3.GetAdaptiveMtDatasetRequest\x1a..google.cloud.translation.v3.AdaptiveMtDataset\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}\x12\xda\x01\n\x16ListAdaptiveMtDatasets\x12:.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest\x1a;.google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets\x12\xdd\x01\n\x13\x41\x64\x61ptiveMtTranslate\x12\x37.google.cloud.translation.v3.AdaptiveMtTranslateRequest\x1a\x38.google.cloud.translation.v3.AdaptiveMtTranslateResponse\"S\xda\x41\x0eparent,content\x82\xd3\xe4\x93\x02<\"7/v3/{parent=projects/*/locations/*}:adaptiveMtTranslate:\x01*\x12\xd0\x01\n\x11GetAdaptiveMtFile\x12\x35.google.cloud.translation.v3.GetAdaptiveMtFileRequest\x1a+.google.cloud.translation.v3.AdaptiveMtFile\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}\x12\xc1\x01\n\x14\x44\x65leteAdaptiveMtFile\x12\x38.google.cloud.translation.v3.DeleteAdaptiveMtFileRequest\x1a\x16.google.protobuf.Empty\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}\x12\xee\x01\n\x14ImportAdaptiveMtFile\x12\x38.google.cloud.translation.v3.ImportAdaptiveMtFileRequest\x1a\x39.google.cloud.translation.v3.ImportAdaptiveMtFileResponse\"a\xda\x41\x06parent\x82\xd3\xe4\x93\x02R\"M/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}:importAdaptiveMtFile:\x01*\x12\xe3\x01\n\x13ListAdaptiveMtFiles\x12\x37.google.cloud.translation.v3.ListAdaptiveMtFilesRequest\x1a\x38.google.cloud.translation.v3.ListAdaptiveMtFilesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtFiles\x12\xd7\x02\n\x17ListAdaptiveMtSentences\x12;.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest\x1a<.google.cloud.translation.v3.ListAdaptiveMtSentencesResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12^/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}/adaptiveMtSentencesZN\x12L/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtSentences\x12\xe8\x01\n\nImportData\x12..google.cloud.translation.v3.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12ImportDataMetadata\xda\x41\x14\x64\x61taset,input_config\x82\xd3\xe4\x93\x02?\":/v3/{dataset=projects/*/locations/*/datasets/*}:importData:\x01*\x12\xe9\x01\n\nExportData\x12..google.cloud.translation.v3.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12\x45xportDataMetadata\xda\x41\x15\x64\x61taset,output_config\x82\xd3\xe4\x93\x02?\":/v3/{dataset=projects/*/locations/*/datasets/*}:exportData:\x01*\x12\xbd\x01\n\x0cListExamples\x12\x30.google.cloud.translation.v3.ListExamplesRequest\x1a\x31.google.cloud.translation.v3.ListExamplesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v3/{parent=projects/*/locations/*/datasets/*}/examples\x12\xc6\x01\n\x0b\x43reateModel\x12/.google.cloud.translation.v3.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41\x1c\n\x05Model\x12\x13\x43reateModelMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x33\"*/v3/{parent=projects/*/locations/*}/models:\x05model\x12\xaa\x01\n\nListModels\x12..google.cloud.translation.v3.ListModelsRequest\x1a/.google.cloud.translation.v3.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v3/{parent=projects/*/locations/*}/models\x12\x97\x01\n\x08GetModel\x12,.google.cloud.translation.v3.GetModelRequest\x1a\".google.cloud.translation.v3.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*/locations/*/models/*}\x12\xc7\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.translation.v3.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41,\n\x15google.protobuf.Empty\x12\x13\x44\x65leteModelMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v3/{name=projects/*/locations/*/models/*}\x1a~\xca\x41\x18translate.googleapis.com\xd2\x41`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translationB\xd6\x01\n\x1d\x63om.google.cloud.translate.v3B\x17TranslationServiceProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xa2\x02\x05\x43TRL3\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3P\x00P\x01P\x02\x62\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb b/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb index f06c05c2d7ae..22cf4626d204 100644 --- a/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb +++ b/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb @@ -45,13 +45,15 @@ class TransliterationConfig # @return [::String] # Optional. The ISO-639 language code of the input text if # known, for example, "en-US" or "sr-Latn". Supported language codes are - # listed in Language Support. If the source language isn't specified, the API - # attempts to identify the source language automatically and returns the - # source language within the response. + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). If the source + # language isn't specified, the API attempts to identify the source language + # automatically and returns the source language within the response. # @!attribute [rw] target_language_code # @return [::String] # Required. The ISO-639 language code to use for translation of the input - # text, set to one of the language codes listed in Language Support. + # text, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @!attribute [rw] parent # @return [::String] # Required. Project or location to make a call. Must refer to a caller's @@ -185,9 +187,12 @@ class Translation # @!attribute [rw] source_language_code # @return [::String] # Optional. The ISO-639 language code of the input text if - # known, for example, "hi" or "zh". If the source language isn't specified, - # the API attempts to identify the source language automatically and returns - # the source language for each content in the response. + # known, for example, "hi" or "zh". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages#roman). If the + # source language isn't specified, the API attempts to identify the source + # language automatically and returns the source language for each content in + # the response. class RomanizeTextRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -618,14 +623,16 @@ class DocumentOutputConfig # @return [::String] # Optional. The ISO-639 language code of the input document if known, for # example, "en-US" or "sr-Latn". Supported language codes are listed in - # Language Support. If the source language isn't specified, the API attempts - # to identify the source language automatically and returns the source - # language within the response. Source language must be specified if the - # request contains a glossary or a custom model. + # [Language Support] (https://cloud.google.com/translate/docs/languages). If + # the source language isn't specified, the API attempts to identify the + # source language automatically and returns the source language within the + # response. Source language must be specified if the request contains a + # glossary or a custom model. # @!attribute [rw] target_language_code # @return [::String] # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in Language Support. + # document, set to one of the language codes listed in [Language Support] + # (https://cloud.google.com/translate/docs/languages). # @!attribute [rw] document_input_config # @return [::Google::Cloud::Translate::V3::DocumentInputConfig] # Required. Input configurations. @@ -763,10 +770,14 @@ class TranslateDocumentResponse # error is returned. # @!attribute [rw] source_language_code # @return [::String] - # Required. Source language code. + # Required. Source language code. Supported language codes are listed in + # [Language + # Support](https://cloud.google.com/translate/docs/languages). # @!attribute [rw] target_language_codes # @return [::Array<::String>] - # Required. Specify up to 10 language codes here. + # Required. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @!attribute [rw] models # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. The models to use for translation. Map's key is target language @@ -1330,7 +1341,9 @@ class DeleteGlossaryResponse # @!attribute [rw] target_language_codes # @return [::Array<::String>] # Required. The ISO-639 language code to use for translation of the input - # document. Specify up to 10 language codes here. + # document. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @!attribute [rw] input_configs # @return [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig>] # Required. Input configurations. From 66433a6501fc4a91dfc8a28b5328ed58370da98a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:24:42 -0700 Subject: [PATCH 125/457] feat(bigtable-admin-v2): Support for RPCs for managing SchemaBundle resources (#30536) --- .../.owlbot-manifest.json | 5 + .../gapic_metadata.json | 25 + .../admin/v2/bigtable_table_admin_pb.rb | 10 +- .../v2/bigtable_table_admin_services_pb.rb | 16 +- .../lib/google/bigtable/admin/v2/table_pb.rb | 4 +- .../admin/v2/bigtable_table_admin/client.rb | 536 +++++++++++++++++- .../admin/v2/bigtable_table_admin/paths.rb | 21 + .../bigtable/admin/v2/bigtable_table_admin.rb | 156 ++++- .../google/bigtable/admin/v2/table.rb | 43 ++ .../create_schema_bundle.rb | 54 ++ .../delete_schema_bundle.rb | 47 ++ .../bigtable_table_admin/get_schema_bundle.rb | 47 ++ .../list_schema_bundles.rb | 51 ++ .../update_schema_bundle.rb | 54 ++ ...pet_metadata_google.bigtable.admin.v2.json | 200 +++++++ .../v2/bigtable_table_admin_paths_test.rb | 12 + .../admin/v2/bigtable_table_admin_test.rb | 319 +++++++++++ 17 files changed, 1583 insertions(+), 17 deletions(-) create mode 100644 google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/create_schema_bundle.rb create mode 100644 google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/delete_schema_bundle.rb create mode 100644 google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/get_schema_bundle.rb create mode 100644 google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/list_schema_bundles.rb create mode 100644 google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/update_schema_bundle.rb diff --git a/google-cloud-bigtable-admin-v2/.owlbot-manifest.json b/google-cloud-bigtable-admin-v2/.owlbot-manifest.json index f9121ce8317d..9d4a61cbbae9 100644 --- a/google-cloud-bigtable-admin-v2/.owlbot-manifest.json +++ b/google-cloud-bigtable-admin-v2/.owlbot-manifest.json @@ -92,10 +92,12 @@ "snippets/bigtable_table_admin/copy_backup.rb", "snippets/bigtable_table_admin/create_authorized_view.rb", "snippets/bigtable_table_admin/create_backup.rb", + "snippets/bigtable_table_admin/create_schema_bundle.rb", "snippets/bigtable_table_admin/create_table.rb", "snippets/bigtable_table_admin/create_table_from_snapshot.rb", "snippets/bigtable_table_admin/delete_authorized_view.rb", "snippets/bigtable_table_admin/delete_backup.rb", + "snippets/bigtable_table_admin/delete_schema_bundle.rb", "snippets/bigtable_table_admin/delete_snapshot.rb", "snippets/bigtable_table_admin/delete_table.rb", "snippets/bigtable_table_admin/drop_row_range.rb", @@ -103,10 +105,12 @@ "snippets/bigtable_table_admin/get_authorized_view.rb", "snippets/bigtable_table_admin/get_backup.rb", "snippets/bigtable_table_admin/get_iam_policy.rb", + "snippets/bigtable_table_admin/get_schema_bundle.rb", "snippets/bigtable_table_admin/get_snapshot.rb", "snippets/bigtable_table_admin/get_table.rb", "snippets/bigtable_table_admin/list_authorized_views.rb", "snippets/bigtable_table_admin/list_backups.rb", + "snippets/bigtable_table_admin/list_schema_bundles.rb", "snippets/bigtable_table_admin/list_snapshots.rb", "snippets/bigtable_table_admin/list_tables.rb", "snippets/bigtable_table_admin/modify_column_families.rb", @@ -117,6 +121,7 @@ "snippets/bigtable_table_admin/undelete_table.rb", "snippets/bigtable_table_admin/update_authorized_view.rb", "snippets/bigtable_table_admin/update_backup.rb", + "snippets/bigtable_table_admin/update_schema_bundle.rb", "snippets/bigtable_table_admin/update_table.rb", "snippets/snippet_metadata_google.bigtable.admin.v2.json", "test/google/cloud/bigtable/admin/v2/bigtable_instance_admin_operations_test.rb", diff --git a/google-cloud-bigtable-admin-v2/gapic_metadata.json b/google-cloud-bigtable-admin-v2/gapic_metadata.json index 516b05c33bb4..2370ce3ced54 100644 --- a/google-cloud-bigtable-admin-v2/gapic_metadata.json +++ b/google-cloud-bigtable-admin-v2/gapic_metadata.json @@ -323,6 +323,31 @@ "methods": [ "test_iam_permissions" ] + }, + "CreateSchemaBundle": { + "methods": [ + "create_schema_bundle" + ] + }, + "UpdateSchemaBundle": { + "methods": [ + "update_schema_bundle" + ] + }, + "GetSchemaBundle": { + "methods": [ + "get_schema_bundle" + ] + }, + "ListSchemaBundles": { + "methods": [ + "list_schema_bundles" + ] + }, + "DeleteSchemaBundle": { + "methods": [ + "delete_schema_bundle" + ] } } } diff --git a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb index 73f4bcc4c9fc..54aa4b2a9a70 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb @@ -19,7 +19,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n3google/bigtable/admin/v2/bigtable_table_admin.proto\x12\x18google.bigtable.admin.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/bigtable/admin/v2/common.proto\x1a$google/bigtable/admin/v2/table.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x13RestoreTableRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x15\n\x08table_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\x06\x62\x61\x63kup\x18\x03 \x01(\tB(\xfa\x41%\n#bigtableadmin.googleapis.com/BackupH\x00\x42\x08\n\x06source\"\x98\x02\n\x14RestoreTableMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x0bsource_type\x18\x02 \x01(\x0e\x32+.google.bigtable.admin.v2.RestoreSourceType\x12;\n\x0b\x62\x61\x63kup_info\x18\x03 \x01(\x0b\x32$.google.bigtable.admin.v2.BackupInfoH\x00\x12%\n\x1doptimize_table_operation_name\x18\x04 \x01(\t\x12=\n\x08progress\x18\x05 \x01(\x0b\x32+.google.bigtable.admin.v2.OperationProgressB\r\n\x0bsource_info\"l\n\x1dOptimizeRestoredTableMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12=\n\x08progress\x18\x02 \x01(\x0b\x32+.google.bigtable.admin.v2.OperationProgress\"\x81\x02\n\x12\x43reateTableRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x15\n\x08table_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05table\x18\x03 \x01(\x0b\x32\x1f.google.bigtable.admin.v2.TableB\x03\xe0\x41\x02\x12J\n\x0einitial_splits\x18\x04 \x03(\x0b\x32\x32.google.bigtable.admin.v2.CreateTableRequest.Split\x1a\x14\n\x05Split\x12\x0b\n\x03key\x18\x01 \x01(\x0c\"\xbe\x01\n\x1e\x43reateTableFromSnapshotRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x15\n\x08table_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0fsource_snapshot\x18\x03 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Snapshot\"\x99\x01\n\x13\x44ropRowRangeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x18\n\x0erow_key_prefix\x18\x02 \x01(\x0cH\x00\x12$\n\x1a\x64\x65lete_all_data_from_table\x18\x03 \x01(\x08H\x00\x42\x08\n\x06target\"\xad\x01\n\x11ListTablesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x32\n\x04view\x18\x02 \x01(\x0e\x32$.google.bigtable.admin.v2.Table.View\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"^\n\x12ListTablesResponse\x12/\n\x06tables\x18\x01 \x03(\x0b\x32\x1f.google.bigtable.admin.v2.Table\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x0fGetTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x32\n\x04view\x18\x02 \x01(\x0e\x32$.google.bigtable.admin.v2.Table.View\"\x9d\x01\n\x12UpdateTableRequest\x12\x33\n\x05table\x18\x01 \x01(\x0b\x32\x1f.google.bigtable.admin.v2.TableB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1c\n\x0fignore_warnings\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x81\x01\n\x13UpdateTableMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"N\n\x12\x44\x65leteTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\"P\n\x14UndeleteTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\"\x83\x01\n\x15UndeleteTableMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xb3\x03\n\x1bModifyColumnFamiliesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12^\n\rmodifications\x18\x02 \x03(\x0b\x32\x42.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.ModificationB\x03\xe0\x41\x02\x12\x1c\n\x0fignore_warnings\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xdb\x01\n\x0cModification\x12\n\n\x02id\x18\x01 \x01(\t\x12\x38\n\x06\x63reate\x18\x02 \x01(\x0b\x32&.google.bigtable.admin.v2.ColumnFamilyH\x00\x12\x38\n\x06update\x18\x03 \x01(\x0b\x32&.google.bigtable.admin.v2.ColumnFamilyH\x00\x12\x0e\n\x04\x64rop\x18\x04 \x01(\x08H\x00\x12\x34\n\x0bupdate_mask\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x42\x05\n\x03mod\"[\n\x1fGenerateConsistencyTokenRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\"=\n GenerateConsistencyTokenResponse\x12\x19\n\x11\x63onsistency_token\x18\x01 \x01(\t\"\xb2\x02\n\x17\x43heckConsistencyRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x1e\n\x11\x63onsistency_token\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x1bstandard_read_remote_writes\x18\x03 \x01(\x0b\x32\x32.google.bigtable.admin.v2.StandardReadRemoteWritesH\x00\x12Z\n\x1c\x64\x61ta_boost_read_local_writes\x18\x04 \x01(\x0b\x32\x32.google.bigtable.admin.v2.DataBoostReadLocalWritesH\x00\x42\x06\n\x04mode\"\x1a\n\x18StandardReadRemoteWrites\"\x1a\n\x18\x44\x61taBoostReadLocalWrites\".\n\x18\x43heckConsistencyResponse\x12\x12\n\nconsistent\x18\x01 \x01(\x08\"\xe6\x01\n\x14SnapshotTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12=\n\x07\x63luster\x18\x02 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x18\n\x0bsnapshot_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12&\n\x03ttl\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\"Q\n\x12GetSnapshotRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Snapshot\"{\n\x14ListSnapshotsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"g\n\x15ListSnapshotsResponse\x12\x35\n\tsnapshots\x18\x01 \x03(\x0b\x32\".google.bigtable.admin.v2.Snapshot\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x15\x44\x65leteSnapshotRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Snapshot\"\xc4\x01\n\x15SnapshotTableMetadata\x12H\n\x10original_request\x18\x01 \x01(\x0b\x32..google.bigtable.admin.v2.SnapshotTableRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd8\x01\n\x1f\x43reateTableFromSnapshotMetadata\x12R\n\x10original_request\x18\x01 \x01(\x0b\x32\x38.google.bigtable.admin.v2.CreateTableFromSnapshotRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa2\x01\n\x13\x43reateBackupRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x03 \x01(\x0b\x32 .google.bigtable.admin.v2.BackupB\x03\xe0\x41\x02\"\x98\x01\n\x14\x43reateBackupMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0csource_table\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x82\x01\n\x13UpdateBackupRequest\x12\x35\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32 .google.bigtable.admin.v2.BackupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"M\n\x10GetBackupRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#bigtableadmin.googleapis.com/Backup\"P\n\x13\x44\x65leteBackupRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#bigtableadmin.googleapis.com/Backup\"\x9b\x01\n\x12ListBackupsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\"a\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.bigtable.admin.v2.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe3\x01\n\x11\x43opyBackupRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\rsource_backup\x18\x03 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#bigtableadmin.googleapis.com/Backup\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xcd\x01\n\x12\x43opyBackupMetadata\x12\x36\n\x04name\x18\x01 \x01(\tB(\xfa\x41%\n#bigtableadmin.googleapis.com/Backup\x12@\n\x12source_backup_info\x18\x02 \x01(\x0b\x32$.google.bigtable.admin.v2.BackupInfo\x12=\n\x08progress\x18\x03 \x01(\x0b\x32+.google.bigtable.admin.v2.OperationProgress\"\xcb\x01\n\x1b\x43reateAuthorizedViewRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+bigtableadmin.googleapis.com/AuthorizedView\x12\x1f\n\x12\x61uthorized_view_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0f\x61uthorized_view\x18\x03 \x01(\x0b\x32(.google.bigtable.admin.v2.AuthorizedViewB\x03\xe0\x41\x02\"\xd2\x01\n\x1c\x43reateAuthorizedViewMetadata\x12O\n\x10original_request\x18\x01 \x01(\x0b\x32\x35.google.bigtable.admin.v2.CreateAuthorizedViewRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdc\x01\n\x1aListAuthorizedViewsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12H\n\x04view\x18\x04 \x01(\x0e\x32\x35.google.bigtable.admin.v2.AuthorizedView.ResponseViewB\x03\xe0\x41\x01\"z\n\x1bListAuthorizedViewsResponse\x12\x42\n\x10\x61uthorized_views\x18\x01 \x03(\x0b\x32(.google.bigtable.admin.v2.AuthorizedView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x18GetAuthorizedViewRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12H\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.bigtable.admin.v2.AuthorizedView.ResponseViewB\x03\xe0\x41\x01\"\xb9\x01\n\x1bUpdateAuthorizedViewRequest\x12\x46\n\x0f\x61uthorized_view\x18\x01 \x01(\x0b\x32(.google.bigtable.admin.v2.AuthorizedViewB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1c\n\x0fignore_warnings\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xd2\x01\n\x1cUpdateAuthorizedViewMetadata\x12O\n\x10original_request\x18\x01 \x01(\x0b\x32\x35.google.bigtable.admin.v2.UpdateAuthorizedViewRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"s\n\x1b\x44\x65leteAuthorizedViewRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xb6\x33\n\x12\x42igtableTableAdmin\x12\xab\x01\n\x0b\x43reateTable\x12,.google.bigtable.admin.v2.CreateTableRequest\x1a\x1f.google.bigtable.admin.v2.Table\"M\xda\x41\x15parent,table_id,table\x82\xd3\xe4\x93\x02/\"*/v2/{parent=projects/*/instances/*}/tables:\x01*\x12\x8a\x02\n\x17\x43reateTableFromSnapshot\x12\x38.google.bigtable.admin.v2.CreateTableFromSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41(\n\x05Table\x12\x1f\x43reateTableFromSnapshotMetadata\xda\x41\x1fparent,table_id,source_snapshot\x82\xd3\xe4\x93\x02\x42\"=/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot:\x01*\x12\xa4\x01\n\nListTables\x12+.google.bigtable.admin.v2.ListTablesRequest\x1a,.google.bigtable.admin.v2.ListTablesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v2/{parent=projects/*/instances/*}/tables\x12\x91\x01\n\x08GetTable\x12).google.bigtable.admin.v2.GetTableRequest\x1a\x1f.google.bigtable.admin.v2.Table\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v2/{name=projects/*/instances/*/tables/*}\x12\xce\x01\n\x0bUpdateTable\x12,.google.bigtable.admin.v2.UpdateTableRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41\x1c\n\x05Table\x12\x13UpdateTableMetadata\xda\x41\x11table,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v2/{table.name=projects/*/instances/*/tables/*}:\x05table\x12\x8e\x01\n\x0b\x44\x65leteTable\x12,.google.bigtable.admin.v2.DeleteTableRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v2/{name=projects/*/instances/*/tables/*}\x12\xc6\x01\n\rUndeleteTable\x12..google.bigtable.admin.v2.UndeleteTableRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41\x1e\n\x05Table\x12\x15UndeleteTableMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/instances/*/tables/*}:undelete:\x01*\x12\xa1\x02\n\x14\x43reateAuthorizedView\x12\x35.google.bigtable.admin.v2.CreateAuthorizedViewRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41.\n\x0e\x41uthorizedView\x12\x1c\x43reateAuthorizedViewMetadata\xda\x41)parent,authorized_view,authorized_view_id\x82\xd3\xe4\x93\x02O\"\x12\x12*\n\x0eschema_bundles\x18\x01 \x03(\x0b\x32&.google.bigtable.admin.v2.SchemaBundle\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x19\x44\x65leteSchemaBundleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigtableadmin.googleapis.com/SchemaBundle\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\x92@\n\x12\x42igtableTableAdmin\x12\xab\x01\n\x0b\x43reateTable\x12,.google.bigtable.admin.v2.CreateTableRequest\x1a\x1f.google.bigtable.admin.v2.Table\"M\xda\x41\x15parent,table_id,table\x82\xd3\xe4\x93\x02/\"*/v2/{parent=projects/*/instances/*}/tables:\x01*\x12\x8a\x02\n\x17\x43reateTableFromSnapshot\x12\x38.google.bigtable.admin.v2.CreateTableFromSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41(\n\x05Table\x12\x1f\x43reateTableFromSnapshotMetadata\xda\x41\x1fparent,table_id,source_snapshot\x82\xd3\xe4\x93\x02\x42\"=/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot:\x01*\x12\xa4\x01\n\nListTables\x12+.google.bigtable.admin.v2.ListTablesRequest\x1a,.google.bigtable.admin.v2.ListTablesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v2/{parent=projects/*/instances/*}/tables\x12\x91\x01\n\x08GetTable\x12).google.bigtable.admin.v2.GetTableRequest\x1a\x1f.google.bigtable.admin.v2.Table\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v2/{name=projects/*/instances/*/tables/*}\x12\xce\x01\n\x0bUpdateTable\x12,.google.bigtable.admin.v2.UpdateTableRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41\x1c\n\x05Table\x12\x13UpdateTableMetadata\xda\x41\x11table,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v2/{table.name=projects/*/instances/*/tables/*}:\x05table\x12\x8e\x01\n\x0b\x44\x65leteTable\x12,.google.bigtable.admin.v2.DeleteTableRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v2/{name=projects/*/instances/*/tables/*}\x12\xc6\x01\n\rUndeleteTable\x12..google.bigtable.admin.v2.UndeleteTableRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41\x1e\n\x05Table\x12\x15UndeleteTableMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/instances/*/tables/*}:undelete:\x01*\x12\xa1\x02\n\x14\x43reateAuthorizedView\x12\x35.google.bigtable.admin.v2.CreateAuthorizedViewRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41.\n\x0e\x41uthorizedView\x12\x1c\x43reateAuthorizedViewMetadata\xda\x41)parent,authorized_view,authorized_view_id\x82\xd3\xe4\x93\x02O\"\x12\x12*] @@ -1306,8 +1306,8 @@ def get_authorized_view request, options = nil # @param authorized_view [::Google::Cloud::Bigtable::Admin::V2::AuthorizedView, ::Hash] # Required. The AuthorizedView to update. The `name` in `authorized_view` is # used to identify the AuthorizedView. AuthorizedView name must in this - # format - # projects//instances//tables//authorizedViews/ + # format: + # `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Optional. The list of fields to update. # A mask specifying which fields in the AuthorizedView resource should be @@ -3054,7 +3054,7 @@ def copy_backup request, options = nil end ## - # Gets the access control policy for a Table or Backup resource. + # Gets the access control policy for a Bigtable resource. # Returns an empty policy if the resource exists but does not have a policy # set. # @@ -3145,7 +3145,7 @@ def get_iam_policy request, options = nil end ## - # Sets the access control policy on a Table or Backup resource. + # Sets the access control policy on a Bigtable resource. # Replaces any existing policy. # # @overload set_iam_policy(request, options = nil) @@ -3243,7 +3243,7 @@ def set_iam_policy request, options = nil end ## - # Returns permissions that the caller has on the specified Table or Backup + # Returns permissions that the caller has on the specified Bigtable # resource. # # @overload test_iam_permissions(request, options = nil) @@ -3334,6 +3334,493 @@ def test_iam_permissions request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Creates a new schema bundle in the specified table. + # + # @overload create_schema_bundle(request, options = nil) + # Pass arguments to `create_schema_bundle` via a request object, either of type + # {::Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest, ::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_schema_bundle(parent: nil, schema_bundle_id: nil, schema_bundle: nil) + # Pass arguments to `create_schema_bundle` 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 parent resource where this schema bundle will be created. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}`. + # @param schema_bundle_id [::String] + # Required. The unique ID to use for the schema bundle, which will become the + # final component of the schema bundle's resource name. + # @param schema_bundle [::Google::Cloud::Bigtable::Admin::V2::SchemaBundle, ::Hash] + # Required. The schema bundle to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/admin/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest.new + # + # # Call the create_schema_bundle method. + # result = client.create_schema_bundle request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_schema_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest + + # 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_schema_bundle.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::Bigtable::Admin::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_schema_bundle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_schema_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_table_admin_stub.call_rpc :create_schema_bundle, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a schema bundle in the specified table. + # + # @overload update_schema_bundle(request, options = nil) + # Pass arguments to `update_schema_bundle` via a request object, either of type + # {::Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest, ::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 update_schema_bundle(schema_bundle: nil, update_mask: nil, ignore_warnings: nil) + # Pass arguments to `update_schema_bundle` 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 schema_bundle [::Google::Cloud::Bigtable::Admin::V2::SchemaBundle, ::Hash] + # Required. The schema bundle to update. + # + # The schema bundle's `name` field is used to identify the schema bundle to + # update. Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # @param ignore_warnings [::Boolean] + # Optional. If set, ignore the safety checks when updating the Schema Bundle. + # The safety checks are: + # - The new Schema Bundle is backwards compatible with the existing Schema + # Bundle. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/admin/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest.new + # + # # Call the update_schema_bundle method. + # result = client.update_schema_bundle request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_schema_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest + + # 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.update_schema_bundle.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::Bigtable::Admin::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.schema_bundle&.name + header_params["schema_bundle.name"] = request.schema_bundle.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.update_schema_bundle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_schema_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_table_admin_stub.call_rpc :update_schema_bundle, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata information about the specified schema bundle. + # + # @overload get_schema_bundle(request, options = nil) + # Pass arguments to `get_schema_bundle` via a request object, either of type + # {::Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest, ::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_schema_bundle(name: nil) + # Pass arguments to `get_schema_bundle` 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 name of the schema bundle to retrieve. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::SchemaBundle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigtable::Admin::V2::SchemaBundle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/admin/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest.new + # + # # Call the get_schema_bundle method. + # result = client.get_schema_bundle request + # + # # The returned object is of type Google::Cloud::Bigtable::Admin::V2::SchemaBundle. + # p result + # + def get_schema_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest + + # 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_schema_bundle.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::Bigtable::Admin::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_schema_bundle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_schema_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_table_admin_stub.call_rpc :get_schema_bundle, 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 all schema bundles associated with the specified table. + # + # @overload list_schema_bundles(request, options = nil) + # Pass arguments to `list_schema_bundles` via a request object, either of type + # {::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest, ::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_schema_bundles(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_schema_bundles` 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 parent, which owns this collection of schema bundles. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}`. + # @param page_size [::Integer] + # The maximum number of schema bundles to return. If the value is positive, + # the server may return at most this value. If unspecified, the server will + # return the maximum allowed page size. + # @param page_token [::String] + # A page token, received from a previous `ListSchemaBundles` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListSchemaBundles` 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::Bigtable::Admin::V2::SchemaBundle>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::SchemaBundle>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/admin/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest.new + # + # # Call the list_schema_bundles method. + # result = client.list_schema_bundles 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::Bigtable::Admin::V2::SchemaBundle. + # p item + # end + # + def list_schema_bundles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest + + # 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_schema_bundles.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::Bigtable::Admin::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_schema_bundles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_schema_bundles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_table_admin_stub.call_rpc :list_schema_bundles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bigtable_table_admin_stub, :list_schema_bundles, 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 schema bundle in the specified table. + # + # @overload delete_schema_bundle(request, options = nil) + # Pass arguments to `delete_schema_bundle` via a request object, either of type + # {::Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest, ::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_schema_bundle(name: nil, etag: nil) + # Pass arguments to `delete_schema_bundle` 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 name of the schema bundle to delete. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # @param etag [::String] + # Optional. The etag of the schema bundle. + # If this is provided, it must match the server's etag. The server + # returns an ABORTED error on a mismatched etag. + # + # @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/bigtable/admin/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest.new + # + # # Call the delete_schema_bundle method. + # result = client.delete_schema_bundle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_schema_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest + + # 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_schema_bundle.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::Bigtable::Admin::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_schema_bundle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_schema_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_table_admin_stub.call_rpc :delete_schema_bundle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the BigtableTableAdmin API. # @@ -3650,6 +4137,31 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_schema_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_schema_bundle + ## + # RPC-specific configuration for `update_schema_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_schema_bundle + ## + # RPC-specific configuration for `get_schema_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema_bundle + ## + # RPC-specific configuration for `list_schema_bundles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_schema_bundles + ## + # RPC-specific configuration for `delete_schema_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_schema_bundle # @private def initialize parent_rpcs = nil @@ -3713,6 +4225,16 @@ def initialize parent_rpcs = nil @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_schema_bundle_config = parent_rpcs.create_schema_bundle if parent_rpcs.respond_to? :create_schema_bundle + @create_schema_bundle = ::Gapic::Config::Method.new create_schema_bundle_config + update_schema_bundle_config = parent_rpcs.update_schema_bundle if parent_rpcs.respond_to? :update_schema_bundle + @update_schema_bundle = ::Gapic::Config::Method.new update_schema_bundle_config + get_schema_bundle_config = parent_rpcs.get_schema_bundle if parent_rpcs.respond_to? :get_schema_bundle + @get_schema_bundle = ::Gapic::Config::Method.new get_schema_bundle_config + list_schema_bundles_config = parent_rpcs.list_schema_bundles if parent_rpcs.respond_to? :list_schema_bundles + @list_schema_bundles = ::Gapic::Config::Method.new list_schema_bundles_config + delete_schema_bundle_config = parent_rpcs.delete_schema_bundle if parent_rpcs.respond_to? :delete_schema_bundle + @delete_schema_bundle = ::Gapic::Config::Method.new delete_schema_bundle_config yield self if block_given? end diff --git a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb index 795de33bc602..c0b16ac08efd 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb @@ -126,6 +126,27 @@ def instance_path project:, instance: "projects/#{project}/instances/#{instance}" end + ## + # Create a fully-qualified SchemaBundle resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # + # @param project [String] + # @param instance [String] + # @param table [String] + # @param schema_bundle [String] + # + # @return [::String] + def schema_bundle_path project:, instance:, table:, schema_bundle: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/tables/#{table}/schemaBundles/#{schema_bundle}" + end + ## # Create a fully-qualified Snapshot resource string. # diff --git a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb index 4004e788b75f..4dd3129a3738 100644 --- a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb +++ b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb @@ -881,7 +881,8 @@ class CreateAuthorizedViewRequest # The metadata for the Operation returned by CreateAuthorizedView. # @!attribute [rw] original_request # @return [::Google::Cloud::Bigtable::Admin::V2::CreateAuthorizedViewRequest] - # The request that prompted the initiation of this CreateInstance operation. + # The request that prompted the initiation of this CreateAuthorizedView + # operation. # @!attribute [rw] request_time # @return [::Google::Protobuf::Timestamp] # The time at which the original request was received. @@ -916,8 +917,8 @@ class CreateAuthorizedViewMetadata # Optional. The value of `next_page_token` returned by a previous call. # @!attribute [rw] view # @return [::Google::Cloud::Bigtable::Admin::V2::AuthorizedView::ResponseView] - # Optional. The resource_view to be applied to the returned views' fields. - # Default to NAME_ONLY. + # Optional. The resource_view to be applied to the returned AuthorizedViews' + # fields. Default to NAME_ONLY. class ListAuthorizedViewsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -960,8 +961,8 @@ class GetAuthorizedViewRequest # @return [::Google::Cloud::Bigtable::Admin::V2::AuthorizedView] # Required. The AuthorizedView to update. The `name` in `authorized_view` is # used to identify the AuthorizedView. AuthorizedView name must in this - # format - # projects//instances//tables/
/authorizedViews/ + # format: + # `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. # @!attribute [rw] update_mask # @return [::Google::Protobuf::FieldMask] # Optional. The list of fields to update. @@ -1014,6 +1015,151 @@ class DeleteAuthorizedViewRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # The request for + # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#create_schema_bundle CreateSchemaBundle}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this schema bundle will be created. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}`. + # @!attribute [rw] schema_bundle_id + # @return [::String] + # Required. The unique ID to use for the schema bundle, which will become the + # final component of the schema bundle's resource name. + # @!attribute [rw] schema_bundle + # @return [::Google::Cloud::Bigtable::Admin::V2::SchemaBundle] + # Required. The schema bundle to create. + class CreateSchemaBundleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata for the Operation returned by + # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#create_schema_bundle CreateSchemaBundle}. + # @!attribute [rw] name + # @return [::String] + # The unique name identifying this schema bundle. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # If set, the time at which this operation finished or was canceled. + class CreateSchemaBundleMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#update_schema_bundle UpdateSchemaBundle}. + # @!attribute [rw] schema_bundle + # @return [::Google::Cloud::Bigtable::Admin::V2::SchemaBundle] + # Required. The schema bundle to update. + # + # The schema bundle's `name` field is used to identify the schema bundle to + # update. Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + # @!attribute [rw] ignore_warnings + # @return [::Boolean] + # Optional. If set, ignore the safety checks when updating the Schema Bundle. + # The safety checks are: + # - The new Schema Bundle is backwards compatible with the existing Schema + # Bundle. + class UpdateSchemaBundleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata for the Operation returned by + # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#update_schema_bundle UpdateSchemaBundle}. + # @!attribute [rw] name + # @return [::String] + # The unique name identifying this schema bundle. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # If set, the time at which this operation finished or was canceled. + class UpdateSchemaBundleMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#get_schema_bundle GetSchemaBundle}. + # @!attribute [rw] name + # @return [::String] + # Required. The unique name of the schema bundle to retrieve. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + class GetSchemaBundleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#list_schema_bundles ListSchemaBundles}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of schema bundles. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of schema bundles to return. If the value is positive, + # the server may return at most this value. If unspecified, the server will + # return the maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListSchemaBundles` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListSchemaBundles` must + # match the call that provided the page token. + class ListSchemaBundlesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#list_schema_bundles ListSchemaBundles}. + # @!attribute [rw] schema_bundles + # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::SchemaBundle>] + # The schema bundles from the specified table. + # @!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 ListSchemaBundlesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#delete_schema_bundle DeleteSchemaBundle}. + # @!attribute [rw] name + # @return [::String] + # Required. The unique name of the schema bundle to delete. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the schema bundle. + # If this is provided, it must match the server's etag. The server + # returns an ABORTED error on a mismatched etag. + class DeleteSchemaBundleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/table.rb b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/table.rb index b73b7527ab5f..160759187b1f 100644 --- a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/table.rb +++ b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/table.rb @@ -643,6 +643,49 @@ class BackupInfo extend ::Google::Protobuf::MessageExts::ClassMethods end + # Represents a protobuf schema. + # @!attribute [rw] proto_descriptors + # @return [::String] + # Required. Contains a protobuf-serialized + # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto), + # which could include multiple proto files. + # To generate it, [install](https://grpc.io/docs/protoc-installation/) and + # run `protoc` with + # `--include_imports` and `--descriptor_set_out`. For example, to generate + # for moon/shot/app.proto, run + # ``` + # $protoc --proto_path=/app_path --proto_path=/lib_path \ + # --include_imports \ + # --descriptor_set_out=descriptors.pb \ + # moon/shot/app.proto + # ``` + # For more details, see protobuffer [self + # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + class ProtoSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A named collection of related schemas. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique name identifying this schema bundle. + # Values are of the form + # `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + # @!attribute [rw] proto_schema + # @return [::Google::Cloud::Bigtable::Admin::V2::ProtoSchema] + # Schema for Protobufs. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for this schema bundle. + # This may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. The server + # returns an ABORTED error on a mismatched etag. + class SchemaBundle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Indicates the type of the restore source. module RestoreSourceType # No restore associated. diff --git a/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/create_schema_bundle.rb b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/create_schema_bundle.rb new file mode 100644 index 000000000000..42fdb9babe60 --- /dev/null +++ b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/create_schema_bundle.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_sync] +require "google/cloud/bigtable/admin/v2" + +## +# Snippet for the create_schema_bundle call in the BigtableTableAdmin 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::Bigtable::Admin::V2::BigtableTableAdmin::Client#create_schema_bundle. +# +def create_schema_bundle + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest.new + + # Call the create_schema_bundle method. + result = client.create_schema_bundle request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_sync] diff --git a/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/delete_schema_bundle.rb b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/delete_schema_bundle.rb new file mode 100644 index 000000000000..c56d82e5e9df --- /dev/null +++ b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/delete_schema_bundle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_sync] +require "google/cloud/bigtable/admin/v2" + +## +# Snippet for the delete_schema_bundle call in the BigtableTableAdmin 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::Bigtable::Admin::V2::BigtableTableAdmin::Client#delete_schema_bundle. +# +def delete_schema_bundle + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest.new + + # Call the delete_schema_bundle method. + result = client.delete_schema_bundle request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_sync] diff --git a/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/get_schema_bundle.rb b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/get_schema_bundle.rb new file mode 100644 index 000000000000..ad4890918086 --- /dev/null +++ b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/get_schema_bundle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_sync] +require "google/cloud/bigtable/admin/v2" + +## +# Snippet for the get_schema_bundle call in the BigtableTableAdmin 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::Bigtable::Admin::V2::BigtableTableAdmin::Client#get_schema_bundle. +# +def get_schema_bundle + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest.new + + # Call the get_schema_bundle method. + result = client.get_schema_bundle request + + # The returned object is of type Google::Cloud::Bigtable::Admin::V2::SchemaBundle. + p result +end +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_sync] diff --git a/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/list_schema_bundles.rb b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/list_schema_bundles.rb new file mode 100644 index 000000000000..aa3cf47de929 --- /dev/null +++ b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/list_schema_bundles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_sync] +require "google/cloud/bigtable/admin/v2" + +## +# Snippet for the list_schema_bundles call in the BigtableTableAdmin 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::Bigtable::Admin::V2::BigtableTableAdmin::Client#list_schema_bundles. +# +def list_schema_bundles + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest.new + + # Call the list_schema_bundles method. + result = client.list_schema_bundles 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::Bigtable::Admin::V2::SchemaBundle. + p item + end +end +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_sync] diff --git a/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/update_schema_bundle.rb b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/update_schema_bundle.rb new file mode 100644 index 000000000000..33fb8c845d0f --- /dev/null +++ b/google-cloud-bigtable-admin-v2/snippets/bigtable_table_admin/update_schema_bundle.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_sync] +require "google/cloud/bigtable/admin/v2" + +## +# Snippet for the update_schema_bundle call in the BigtableTableAdmin 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::Bigtable::Admin::V2::BigtableTableAdmin::Client#update_schema_bundle. +# +def update_schema_bundle + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest.new + + # Call the update_schema_bundle method. + result = client.update_schema_bundle request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_sync] diff --git a/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json b/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json index 59179eb4e858..7f684b119eb0 100644 --- a/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json +++ b/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json @@ -2450,6 +2450,206 @@ "type": "FULL" } ] + }, + { + "region_tag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_sync", + "title": "Snippet for the create_schema_bundle call in the BigtableTableAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#create_schema_bundle.", + "file": "bigtable_table_admin/create_schema_bundle.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_schema_bundle", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#create_schema_bundle", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BigtableTableAdmin::Client", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client" + }, + "method": { + "short_name": "CreateSchemaBundle", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle", + "service": { + "short_name": "BigtableTableAdmin", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_sync", + "title": "Snippet for the update_schema_bundle call in the BigtableTableAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#update_schema_bundle.", + "file": "bigtable_table_admin/update_schema_bundle.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_schema_bundle", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#update_schema_bundle", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BigtableTableAdmin::Client", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client" + }, + "method": { + "short_name": "UpdateSchemaBundle", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle", + "service": { + "short_name": "BigtableTableAdmin", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_sync", + "title": "Snippet for the get_schema_bundle call in the BigtableTableAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#get_schema_bundle.", + "file": "bigtable_table_admin/get_schema_bundle.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_schema_bundle", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#get_schema_bundle", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::Admin::V2::SchemaBundle", + "client": { + "short_name": "BigtableTableAdmin::Client", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client" + }, + "method": { + "short_name": "GetSchemaBundle", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle", + "service": { + "short_name": "BigtableTableAdmin", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_sync", + "title": "Snippet for the list_schema_bundles call in the BigtableTableAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#list_schema_bundles.", + "file": "bigtable_table_admin/list_schema_bundles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_schema_bundles", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#list_schema_bundles", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesResponse", + "client": { + "short_name": "BigtableTableAdmin::Client", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client" + }, + "method": { + "short_name": "ListSchemaBundles", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles", + "service": { + "short_name": "BigtableTableAdmin", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_sync", + "title": "Snippet for the delete_schema_bundle call in the BigtableTableAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#delete_schema_bundle.", + "file": "bigtable_table_admin/delete_schema_bundle.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_schema_bundle", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#delete_schema_bundle", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BigtableTableAdmin::Client", + "full_name": "::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client" + }, + "method": { + "short_name": "DeleteSchemaBundle", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle", + "service": { + "short_name": "BigtableTableAdmin", + "full_name": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-bigtable-admin-v2/test/google/cloud/bigtable/admin/v2/bigtable_table_admin_paths_test.rb b/google-cloud-bigtable-admin-v2/test/google/cloud/bigtable/admin/v2/bigtable_table_admin_paths_test.rb index b58908479300..879ec510fde8 100644 --- a/google-cloud-bigtable-admin-v2/test/google/cloud/bigtable/admin/v2/bigtable_table_admin_paths_test.rb +++ b/google-cloud-bigtable-admin-v2/test/google/cloud/bigtable/admin/v2/bigtable_table_admin_paths_test.rb @@ -101,6 +101,18 @@ def test_instance_path end end + def test_schema_bundle_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.schema_bundle_path project: "value0", instance: "value1", table: "value2", schema_bundle: "value3" + assert_equal "projects/value0/instances/value1/tables/value2/schemaBundles/value3", path + end + end + def test_snapshot_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-bigtable-admin-v2/test/google/cloud/bigtable/admin/v2/bigtable_table_admin_test.rb b/google-cloud-bigtable-admin-v2/test/google/cloud/bigtable/admin/v2/bigtable_table_admin_test.rb index da2547be9b3e..20f37009582d 100644 --- a/google-cloud-bigtable-admin-v2/test/google/cloud/bigtable/admin/v2/bigtable_table_admin_test.rb +++ b/google-cloud-bigtable-admin-v2/test/google/cloud/bigtable/admin/v2/bigtable_table_admin_test.rb @@ -1966,6 +1966,325 @@ def test_test_iam_permissions end end + def test_create_schema_bundle + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + schema_bundle_id = "hello world" + schema_bundle = {} + + create_schema_bundle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_schema_bundle, name + assert_kind_of ::Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["schema_bundle_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::Admin::V2::SchemaBundle), request["schema_bundle"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_schema_bundle_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_schema_bundle({ parent: parent, schema_bundle_id: schema_bundle_id, schema_bundle: schema_bundle }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_schema_bundle parent: parent, schema_bundle_id: schema_bundle_id, schema_bundle: schema_bundle do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_schema_bundle ::Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest.new(parent: parent, schema_bundle_id: schema_bundle_id, schema_bundle: schema_bundle) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_schema_bundle({ parent: parent, schema_bundle_id: schema_bundle_id, schema_bundle: schema_bundle }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_schema_bundle(::Google::Cloud::Bigtable::Admin::V2::CreateSchemaBundleRequest.new(parent: parent, schema_bundle_id: schema_bundle_id, schema_bundle: schema_bundle), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_schema_bundle_client_stub.call_rpc_count + end + end + + def test_update_schema_bundle + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + schema_bundle = {} + update_mask = {} + ignore_warnings = true + + update_schema_bundle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_schema_bundle, name + assert_kind_of ::Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::Admin::V2::SchemaBundle), request["schema_bundle"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["ignore_warnings"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_schema_bundle_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_schema_bundle({ schema_bundle: schema_bundle, update_mask: update_mask, ignore_warnings: ignore_warnings }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_schema_bundle schema_bundle: schema_bundle, update_mask: update_mask, ignore_warnings: ignore_warnings do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_schema_bundle ::Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest.new(schema_bundle: schema_bundle, update_mask: update_mask, ignore_warnings: ignore_warnings) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_schema_bundle({ schema_bundle: schema_bundle, update_mask: update_mask, ignore_warnings: ignore_warnings }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_schema_bundle(::Google::Cloud::Bigtable::Admin::V2::UpdateSchemaBundleRequest.new(schema_bundle: schema_bundle, update_mask: update_mask, ignore_warnings: ignore_warnings), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_schema_bundle_client_stub.call_rpc_count + end + end + + def test_get_schema_bundle + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::Admin::V2::SchemaBundle.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" + + get_schema_bundle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_schema_bundle, name + assert_kind_of ::Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_schema_bundle_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_schema_bundle({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_schema_bundle name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_schema_bundle ::Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_schema_bundle({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_schema_bundle(::Google::Cloud::Bigtable::Admin::V2::GetSchemaBundleRequest.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, get_schema_bundle_client_stub.call_rpc_count + end + end + + def test_list_schema_bundles + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesResponse.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" + page_size = 42 + page_token = "hello world" + + list_schema_bundles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_schema_bundles, name + assert_kind_of ::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_schema_bundles_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_schema_bundles({ parent: parent, 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_schema_bundles parent: parent, 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_schema_bundles ::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest.new(parent: parent, 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_schema_bundles({ parent: parent, 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_schema_bundles(::Google::Cloud::Bigtable::Admin::V2::ListSchemaBundlesRequest.new(parent: parent, 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_schema_bundles_client_stub.call_rpc_count + end + end + + def test_delete_schema_bundle + # 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" + etag = "hello world" + + delete_schema_bundle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_schema_bundle, name + assert_kind_of ::Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_schema_bundle_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_schema_bundle({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_schema_bundle name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_schema_bundle ::Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_schema_bundle({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_schema_bundle(::Google::Cloud::Bigtable::Admin::V2::DeleteSchemaBundleRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_schema_bundle_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From 230c26ade50cd5133d0370820732724fd5538139 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 16:00:40 -0700 Subject: [PATCH 126/457] chore(main): release google-cloud-alloy_db-v1alpha 0.14.0 (#30525) --- .release-please-manifest.json | 2 +- google-cloud-alloy_db-v1alpha/CHANGELOG.md | 14 ++++++++++++++ .../lib/google/cloud/alloy_db/v1alpha/version.rb | 2 +- ...ppet_metadata_google.cloud.alloydb.v1alpha.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a27208e45265..ccadc6e2f8a8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -49,7 +49,7 @@ "google-cloud-alloy_db+FILLER": "0.0.0", "google-cloud-alloy_db-v1": "1.2.0", "google-cloud-alloy_db-v1+FILLER": "0.0.0", - "google-cloud-alloy_db-v1alpha": "0.13.0", + "google-cloud-alloy_db-v1alpha": "0.14.0", "google-cloud-alloy_db-v1alpha+FILLER": "0.0.0", "google-cloud-alloy_db-v1beta": "0.16.0", "google-cloud-alloy_db-v1beta+FILLER": "0.0.0", diff --git a/google-cloud-alloy_db-v1alpha/CHANGELOG.md b/google-cloud-alloy_db-v1alpha/CHANGELOG.md index 6f4532d89b2b..087a1f444993 100644 --- a/google-cloud-alloy_db-v1alpha/CHANGELOG.md +++ b/google-cloud-alloy_db-v1alpha/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +### 0.14.0 (2025-06-23) + +#### Features + +* Backup.create_completion_time output field +* Cluster.DenyMaintenancePeriod field +* Instance.ActivationPolicy field ([#30507](https://github.com/googleapis/google-cloud-ruby/issues/30507)) +* InstanceNetworkConfig.allocated_ip_range_override field +* InstanceNetworkConfig.network output field +#### Documentation + +* A comment for field `earliest_restorable_time` +* A comment for field `status` in message `PscAutoConnectionConfig` + ### 0.13.0 (2025-05-16) #### Features diff --git a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/version.rb b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/version.rb index ed37bbfa84c6..9288557388e1 100644 --- a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/version.rb +++ b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AlloyDB module V1alpha - VERSION = "0.13.0" + VERSION = "0.14.0" end end end diff --git a/google-cloud-alloy_db-v1alpha/snippets/snippet_metadata_google.cloud.alloydb.v1alpha.json b/google-cloud-alloy_db-v1alpha/snippets/snippet_metadata_google.cloud.alloydb.v1alpha.json index 7c19bac26fea..92d221983d73 100644 --- a/google-cloud-alloy_db-v1alpha/snippets/snippet_metadata_google.cloud.alloydb.v1alpha.json +++ b/google-cloud-alloy_db-v1alpha/snippets/snippet_metadata_google.cloud.alloydb.v1alpha.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-alloy_db-v1alpha", - "version": "0.13.0", + "version": "0.14.0", "language": "RUBY", "apis": [ { From 8a783ac91cf285f8d6ddef4aa8b299b46d23df47 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 16:00:58 -0700 Subject: [PATCH 127/457] chore(main): release google-cloud-lustre-v1 0.1.1 (#30526) --- .release-please-manifest.json | 2 +- google-cloud-lustre-v1/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/lustre/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.lustre.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ccadc6e2f8a8..ee806e4d5d62 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -463,7 +463,7 @@ "google-cloud-logging-v2+FILLER": "0.0.0", "google-cloud-lustre": "0.1.0", "google-cloud-lustre+FILLER": "0.0.0", - "google-cloud-lustre-v1": "0.1.0", + "google-cloud-lustre-v1": "0.1.1", "google-cloud-lustre-v1+FILLER": "0.0.0", "google-cloud-managed_identities": "1.4.1", "google-cloud-managed_identities+FILLER": "0.0.0", diff --git a/google-cloud-lustre-v1/CHANGELOG.md b/google-cloud-lustre-v1/CHANGELOG.md index 74b188d78f7f..6208129139f9 100644 --- a/google-cloud-lustre-v1/CHANGELOG.md +++ b/google-cloud-lustre-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 0.1.1 (2025-06-23) + +#### Bug Fixes + +* Changed field behavior for an existing field per_unit_storage_throughput. It is now required ([#30499](https://github.com/googleapis/google-cloud-ruby/issues/30499)) +#### Documentation + +* expand on and update various comments + ### 0.1.0 (2025-05-06) #### Features diff --git a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/version.rb b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/version.rb index 42f62dc9cbe7..fd7b786b398c 100644 --- a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/version.rb +++ b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Lustre module V1 - VERSION = "0.1.0" + VERSION = "0.1.1" end end end diff --git a/google-cloud-lustre-v1/snippets/snippet_metadata_google.cloud.lustre.v1.json b/google-cloud-lustre-v1/snippets/snippet_metadata_google.cloud.lustre.v1.json index 6c450d132559..2d2af8bedee3 100644 --- a/google-cloud-lustre-v1/snippets/snippet_metadata_google.cloud.lustre.v1.json +++ b/google-cloud-lustre-v1/snippets/snippet_metadata_google.cloud.lustre.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-lustre-v1", - "version": "0.1.0", + "version": "0.1.1", "language": "RUBY", "apis": [ { From a678188bc2295a098397997faae31a87bf68896f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:35:51 -0700 Subject: [PATCH 128/457] feat(developer_connect-v1): Support for RPCs for managing AccountConnector resources (#30538) feat(developer_connect-v1): Support for RPCs for managing InsightsConfig resources feat(developer_connect-v1): Support for fetch_access_token RPC feat(developer_connect-v1): Support for list_users and delete_user RPCs feat(developer_connect-v1): Support for fetch_self and delete_self RPCs feat(developer_connect-v1): Support for BitBucket feat(developer_connect-v1): Support for git proxies --- .../.owlbot-manifest.json | 31 + .../gapic_metadata.json | 84 ++ .../lib/google/cloud/developer_connect/v1.rb | 1 + .../v1/developer_connect/client.rb | 1087 +++++++++++++++++ .../v1/developer_connect/paths.rb | 40 + .../v1/developer_connect/rest/client.rb | 1017 +++++++++++++++ .../v1/developer_connect/rest/service_stub.rb | 613 ++++++++++ .../google/cloud/developer_connect/v1/rest.rb | 1 + .../v1/developer_connect_pb.rb | 23 +- .../v1/developer_connect_services_pb.rb | 20 + .../developerconnect/v1/insights_config_pb.rb | 69 ++ .../v1/insights_config_service.rb | 64 + .../v1/insights_config_service/client.rb | 956 +++++++++++++++ .../v1/insights_config_service/credentials.rb | 47 + .../v1/insights_config_service/operations.rb | 813 ++++++++++++ .../v1/insights_config_service/paths.rb | 69 ++ .../v1/insights_config_service/rest.rb | 62 + .../v1/insights_config_service/rest/client.rb | 903 ++++++++++++++ .../rest/operations.rb | 914 ++++++++++++++ .../rest/service_stub.rb | 388 ++++++ .../v1/insights_config_services_pb.rb | 61 + .../developerconnect/v1/developer_connect.rb | 523 +++++++- .../developerconnect/v1/insights_config.rb | 353 ++++++ .../create_account_connector.rb | 54 + .../delete_account_connector.rb | 54 + .../snippets/developer_connect/delete_self.rb | 54 + .../snippets/developer_connect/delete_user.rb | 54 + .../developer_connect/fetch_access_token.rb | 47 + .../snippets/developer_connect/fetch_self.rb | 47 + .../get_account_connector.rb | 47 + .../list_account_connectors.rb | 51 + .../snippets/developer_connect/list_users.rb | 51 + .../update_account_connector.rb | 54 + .../create_insights_config.rb | 54 + .../delete_insights_config.rb | 54 + .../get_insights_config.rb | 47 + .../list_insights_configs.rb | 51 + .../update_insights_config.rb | 54 + ...data_google.cloud.developerconnect.v1.json | 600 +++++++++ .../v1/developer_connect_paths_test.rb | 24 + .../v1/developer_connect_rest_test.rb | 563 +++++++++ .../v1/developer_connect_test.rb | 661 ++++++++++ ...insights_config_service_operations_test.rb | 398 ++++++ .../v1/insights_config_service_paths_test.rb | 67 + .../v1/insights_config_service_rest_test.rb | 382 ++++++ .../v1/insights_config_service_test.rb | 435 +++++++ 46 files changed, 12033 insertions(+), 9 deletions(-) create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_pb.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb create mode 100644 google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb create mode 100644 google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb create mode 100644 google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb create mode 100644 google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb create mode 100644 google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb create mode 100644 google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb create mode 100644 google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb create mode 100644 google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb create mode 100644 google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb create mode 100644 google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb create mode 100644 google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb create mode 100644 google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb diff --git a/google-cloud-developer_connect-v1/.owlbot-manifest.json b/google-cloud-developer_connect-v1/.owlbot-manifest.json index dc463ee2bca7..7e6f16b594f7 100644 --- a/google-cloud-developer_connect-v1/.owlbot-manifest.json +++ b/google-cloud-developer_connect-v1/.owlbot-manifest.json @@ -29,6 +29,17 @@ "lib/google/cloud/developer_connect/v1/version.rb", "lib/google/cloud/developerconnect/v1/developer_connect_pb.rb", "lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb", + "lib/google/cloud/developerconnect/v1/insights_config_pb.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service/client.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb", + "lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb", + "lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb", "proto_docs/README.md", "proto_docs/google/api/client.rb", "proto_docs/google/api/field_behavior.rb", @@ -36,6 +47,7 @@ "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", "proto_docs/google/cloud/developerconnect/v1/developer_connect.rb", + "proto_docs/google/cloud/developerconnect/v1/insights_config.rb", "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", "proto_docs/google/protobuf/duration.rb", @@ -44,25 +56,44 @@ "proto_docs/google/protobuf/timestamp.rb", "proto_docs/google/rpc/status.rb", "snippets/Gemfile", + "snippets/developer_connect/create_account_connector.rb", "snippets/developer_connect/create_connection.rb", "snippets/developer_connect/create_git_repository_link.rb", + "snippets/developer_connect/delete_account_connector.rb", "snippets/developer_connect/delete_connection.rb", "snippets/developer_connect/delete_git_repository_link.rb", + "snippets/developer_connect/delete_self.rb", + "snippets/developer_connect/delete_user.rb", + "snippets/developer_connect/fetch_access_token.rb", "snippets/developer_connect/fetch_git_hub_installations.rb", "snippets/developer_connect/fetch_git_refs.rb", "snippets/developer_connect/fetch_linkable_git_repositories.rb", "snippets/developer_connect/fetch_read_token.rb", "snippets/developer_connect/fetch_read_write_token.rb", + "snippets/developer_connect/fetch_self.rb", + "snippets/developer_connect/get_account_connector.rb", "snippets/developer_connect/get_connection.rb", "snippets/developer_connect/get_git_repository_link.rb", + "snippets/developer_connect/list_account_connectors.rb", "snippets/developer_connect/list_connections.rb", "snippets/developer_connect/list_git_repository_links.rb", + "snippets/developer_connect/list_users.rb", + "snippets/developer_connect/update_account_connector.rb", "snippets/developer_connect/update_connection.rb", + "snippets/insights_config_service/create_insights_config.rb", + "snippets/insights_config_service/delete_insights_config.rb", + "snippets/insights_config_service/get_insights_config.rb", + "snippets/insights_config_service/list_insights_configs.rb", + "snippets/insights_config_service/update_insights_config.rb", "snippets/snippet_metadata_google.cloud.developerconnect.v1.json", "test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb", "test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb", "test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb", "test/google/cloud/developer_connect/v1/developer_connect_test.rb", + "test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb", + "test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb", + "test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb", + "test/google/cloud/developerconnect/v1/insights_config_service_test.rb", "test/helper.rb" ], "static": [ diff --git a/google-cloud-developer_connect-v1/gapic_metadata.json b/google-cloud-developer_connect-v1/gapic_metadata.json index 01a25f44af95..5d05627c8b48 100644 --- a/google-cloud-developer_connect-v1/gapic_metadata.json +++ b/google-cloud-developer_connect-v1/gapic_metadata.json @@ -79,6 +79,90 @@ "methods": [ "fetch_git_refs" ] + }, + "ListAccountConnectors": { + "methods": [ + "list_account_connectors" + ] + }, + "GetAccountConnector": { + "methods": [ + "get_account_connector" + ] + }, + "CreateAccountConnector": { + "methods": [ + "create_account_connector" + ] + }, + "UpdateAccountConnector": { + "methods": [ + "update_account_connector" + ] + }, + "DeleteAccountConnector": { + "methods": [ + "delete_account_connector" + ] + }, + "FetchAccessToken": { + "methods": [ + "fetch_access_token" + ] + }, + "ListUsers": { + "methods": [ + "list_users" + ] + }, + "DeleteUser": { + "methods": [ + "delete_user" + ] + }, + "FetchSelf": { + "methods": [ + "fetch_self" + ] + }, + "DeleteSelf": { + "methods": [ + "delete_self" + ] + } + } + } + } + }, + "InsightsConfigService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client", + "rpcs": { + "ListInsightsConfigs": { + "methods": [ + "list_insights_configs" + ] + }, + "CreateInsightsConfig": { + "methods": [ + "create_insights_config" + ] + }, + "GetInsightsConfig": { + "methods": [ + "get_insights_config" + ] + }, + "UpdateInsightsConfig": { + "methods": [ + "update_insights_config" + ] + }, + "DeleteInsightsConfig": { + "methods": [ + "delete_insights_config" + ] } } } diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb index 8f2eab2ab849..0893302dc820 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb @@ -17,6 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/developer_connect/v1/developer_connect" +require "google/cloud/developerconnect/v1/insights_config_service" require "google/cloud/developer_connect/v1/version" module Google diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb index de2a3abae9bc..d82c19b27914 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb @@ -1680,6 +1680,1023 @@ def fetch_git_refs request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists AccountConnectors in a given project and location. + # + # @overload list_account_connectors(request, options = nil) + # Pass arguments to `list_account_connectors` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::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_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_account_connectors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListAccountConnectorsRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new + # + # # Call the list_account_connectors method. + # result = client.list_account_connectors 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::DeveloperConnect::V1::AccountConnector. + # p item + # end + # + def list_account_connectors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest + + # 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_account_connectors.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_connectors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_connectors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :list_account_connectors, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_account_connectors, 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 + + ## + # Gets details of a single AccountConnector. + # + # @overload get_account_connector(request, options = nil) + # Pass arguments to `get_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::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_account_connector(name: nil) + # Pass arguments to `get_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new + # + # # Call the get_account_connector method. + # result = client.get_account_connector request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. + # p result + # + def get_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest + + # 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_account_connector.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :get_account_connector, 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 + + ## + # Creates a new AccountConnector in a given project and location. + # + # @overload create_account_connector(request, options = nil) + # Pass arguments to `create_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::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_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_account_connector` 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. Location resource name as the account_connector’s parent. + # @param account_connector_id [::String] + # Required. The ID to use for the AccountConnector, which will become the + # final component of the AccountConnector's resource name. Its format should + # adhere to https://google.aip.dev/122#resource-id-segments Names must be + # unique per-project per-location. + # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] + # Required. The AccountConnector to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new + # + # # Call the create_account_connector method. + # result = client.create_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest + + # 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_account_connector.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_account_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :create_account_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AccountConnector. + # + # @overload update_account_connector(request, options = nil) + # Pass arguments to `update_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::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 update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_account_connector` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be updated. + # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] + # Required. The AccountConnector to update. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the accountConnector is not found a new + # accountConnector will be created. In this situation `update_mask` is + # ignored. The creation will succeed only if the input accountConnector has + # all the necessary + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new + # + # # Call the update_account_connector method. + # result = client.update_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest + + # 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.update_account_connector.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_connector&.name + header_params["account_connector.name"] = request.account_connector.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.update_account_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :update_account_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 single AccountConnector. + # + # @overload delete_account_connector(request, options = nil) + # Pass arguments to `delete_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::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_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. The current etag of the AccountConnectorn. + # If an etag is provided and does not match the current etag of the + # AccountConnector, deletion will be blocked and an ABORTED error will be + # returned. + # @param force [::Boolean] + # Optional. If set to true, any Users from this AccountConnector will also + # be deleted. (Otherwise, the request will only work if the AccountConnector + # has no Users.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new + # + # # Call the delete_account_connector method. + # result = client.delete_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest + + # 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_account_connector.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_account_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :delete_account_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches OAuth access token based on end user credentials. + # + # @overload fetch_access_token(request, options = nil) + # Pass arguments to `fetch_access_token` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::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 fetch_access_token(account_connector: nil) + # Pass arguments to `fetch_access_token` 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 account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new + # + # # Call the fetch_access_token method. + # result = client.fetch_access_token request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. + # p result + # + def fetch_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest + + # 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.fetch_access_token.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_connector + header_params["account_connector"] = request.account_connector + 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.fetch_access_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_access_token, 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 Users in a given project, location, and account_connector. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::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_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListUsersRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users 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::DeveloperConnect::V1::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest + + # 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_users.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_users.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :list_users, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_users, 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 single User. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::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_user(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest + + # 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_user.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :delete_user, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch the User based on the user credentials. + # + # @overload fetch_self(request, options = nil) + # Pass arguments to `fetch_self` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::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 fetch_self(name: nil) + # Pass arguments to `fetch_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the AccountConnector resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new + # + # # Call the fetch_self method. + # result = client.fetch_self request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. + # p result + # + def fetch_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest + + # 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.fetch_self.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_self.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_self, 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 + + ## + # Delete the User based on the user credentials. + # + # @overload delete_self(request, options = nil) + # Pass arguments to `delete_self` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::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_self(name: nil) + # Pass arguments to `delete_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the AccountConnector resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new + # + # # Call the delete_self method. + # result = client.delete_self request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest + + # 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_self.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_self.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :delete_self, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 DeveloperConnect API. # @@ -1916,6 +2933,56 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :fetch_git_refs + ## + # RPC-specific configuration for `list_account_connectors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_connectors + ## + # RPC-specific configuration for `get_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_connector + ## + # RPC-specific configuration for `create_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_connector + ## + # RPC-specific configuration for `update_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_connector + ## + # RPC-specific configuration for `delete_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account_connector + ## + # RPC-specific configuration for `fetch_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_access_token + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `fetch_self` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_self + ## + # RPC-specific configuration for `delete_self` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_self # @private def initialize parent_rpcs = nil @@ -1947,6 +3014,26 @@ def initialize parent_rpcs = nil @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config + list_account_connectors_config = parent_rpcs.list_account_connectors if parent_rpcs.respond_to? :list_account_connectors + @list_account_connectors = ::Gapic::Config::Method.new list_account_connectors_config + get_account_connector_config = parent_rpcs.get_account_connector if parent_rpcs.respond_to? :get_account_connector + @get_account_connector = ::Gapic::Config::Method.new get_account_connector_config + create_account_connector_config = parent_rpcs.create_account_connector if parent_rpcs.respond_to? :create_account_connector + @create_account_connector = ::Gapic::Config::Method.new create_account_connector_config + update_account_connector_config = parent_rpcs.update_account_connector if parent_rpcs.respond_to? :update_account_connector + @update_account_connector = ::Gapic::Config::Method.new update_account_connector_config + delete_account_connector_config = parent_rpcs.delete_account_connector if parent_rpcs.respond_to? :delete_account_connector + @delete_account_connector = ::Gapic::Config::Method.new delete_account_connector_config + fetch_access_token_config = parent_rpcs.fetch_access_token if parent_rpcs.respond_to? :fetch_access_token + @fetch_access_token = ::Gapic::Config::Method.new fetch_access_token_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + fetch_self_config = parent_rpcs.fetch_self if parent_rpcs.respond_to? :fetch_self + @fetch_self = ::Gapic::Config::Method.new fetch_self_config + delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self + @delete_self = ::Gapic::Config::Method.new delete_self_config yield self if block_given? end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb index 288984bbec5d..b36358f00311 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb @@ -24,6 +24,25 @@ module V1 module DeveloperConnect # Path helper methods for the DeveloperConnect API. module Paths + ## + # Create a fully-qualified AccountConnector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/accountConnectors/{account_connector}` + # + # @param project [String] + # @param location [String] + # @param account_connector [String] + # + # @return [::String] + def account_connector_path project:, location:, account_connector: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/accountConnectors/#{account_connector}" + end + ## # Create a fully-qualified Connection resource string. # @@ -142,6 +161,27 @@ def service_path project:, location:, namespace:, service: "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" end + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}` + # + # @param project [String] + # @param location [String] + # @param account_connector [String] + # @param user [String] + # + # @return [::String] + def user_path project:, location:, account_connector:, user: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "account_connector cannot contain /" if account_connector.to_s.include? "/" + + "projects/#{project}/locations/#{location}/accountConnectors/#{account_connector}/users/#{user}" + end + extend self end end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb index 4ea4c06be9df..1e6a67595680 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb @@ -1576,6 +1576,953 @@ def fetch_git_refs request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists AccountConnectors in a given project and location. + # + # @overload list_account_connectors(request, options = nil) + # Pass arguments to `list_account_connectors` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::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_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_account_connectors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListAccountConnectorsRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new + # + # # Call the list_account_connectors method. + # result = client.list_account_connectors 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::DeveloperConnect::V1::AccountConnector. + # p item + # end + # + def list_account_connectors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest + + # 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_account_connectors.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::DeveloperConnect::V1::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_account_connectors.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_connectors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.list_account_connectors request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_account_connectors, "account_connectors", 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 + + ## + # Gets details of a single AccountConnector. + # + # @overload get_account_connector(request, options = nil) + # Pass arguments to `get_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::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_account_connector(name: nil) + # Pass arguments to `get_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new + # + # # Call the get_account_connector method. + # result = client.get_account_connector request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. + # p result + # + def get_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest + + # 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_account_connector.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::DeveloperConnect::V1::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_account_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.get_account_connector 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 + + ## + # Creates a new AccountConnector in a given project and location. + # + # @overload create_account_connector(request, options = nil) + # Pass arguments to `create_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::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_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_account_connector` 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. Location resource name as the account_connector’s parent. + # @param account_connector_id [::String] + # Required. The ID to use for the AccountConnector, which will become the + # final component of the AccountConnector's resource name. Its format should + # adhere to https://google.aip.dev/122#resource-id-segments Names must be + # unique per-project per-location. + # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] + # Required. The AccountConnector to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new + # + # # Call the create_account_connector method. + # result = client.create_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest + + # 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_account_connector.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::DeveloperConnect::V1::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_account_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.create_account_connector request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AccountConnector. + # + # @overload update_account_connector(request, options = nil) + # Pass arguments to `update_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::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 update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_account_connector` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be updated. + # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] + # Required. The AccountConnector to update. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the accountConnector is not found a new + # accountConnector will be created. In this situation `update_mask` is + # ignored. The creation will succeed only if the input accountConnector has + # all the necessary + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new + # + # # Call the update_account_connector method. + # result = client.update_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest + + # 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.update_account_connector.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::DeveloperConnect::V1::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.update_account_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.update_account_connector request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single AccountConnector. + # + # @overload delete_account_connector(request, options = nil) + # Pass arguments to `delete_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::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_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. The current etag of the AccountConnectorn. + # If an etag is provided and does not match the current etag of the + # AccountConnector, deletion will be blocked and an ABORTED error will be + # returned. + # @param force [::Boolean] + # Optional. If set to true, any Users from this AccountConnector will also + # be deleted. (Otherwise, the request will only work if the AccountConnector + # has no Users.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new + # + # # Call the delete_account_connector method. + # result = client.delete_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest + + # 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_account_connector.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::DeveloperConnect::V1::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_account_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.delete_account_connector request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches OAuth access token based on end user credentials. + # + # @overload fetch_access_token(request, options = nil) + # Pass arguments to `fetch_access_token` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::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 fetch_access_token(account_connector: nil) + # Pass arguments to `fetch_access_token` 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 account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new + # + # # Call the fetch_access_token method. + # result = client.fetch_access_token request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. + # p result + # + def fetch_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest + + # 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.fetch_access_token.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::DeveloperConnect::V1::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.fetch_access_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_access_token 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 Users in a given project, location, and account_connector. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::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_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListUsersRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users 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::DeveloperConnect::V1::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest + + # 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_users.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::DeveloperConnect::V1::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_users.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.list_users request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_users, "users", 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 single User. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::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_user(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest + + # 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_user.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::DeveloperConnect::V1::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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.delete_user request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch the User based on the user credentials. + # + # @overload fetch_self(request, options = nil) + # Pass arguments to `fetch_self` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::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 fetch_self(name: nil) + # Pass arguments to `fetch_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the AccountConnector resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new + # + # # Call the fetch_self method. + # result = client.fetch_self request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. + # p result + # + def fetch_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest + + # 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.fetch_self.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::DeveloperConnect::V1::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.fetch_self.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_self 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 + + ## + # Delete the User based on the user credentials. + # + # @overload delete_self(request, options = nil) + # Pass arguments to `delete_self` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::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_self(name: nil) + # Pass arguments to `delete_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the AccountConnector resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new + # + # # Call the delete_self method. + # result = client.delete_self request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest + + # 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_self.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::DeveloperConnect::V1::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_self.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.delete_self request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 DeveloperConnect REST API. # @@ -1799,6 +2746,56 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :fetch_git_refs + ## + # RPC-specific configuration for `list_account_connectors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_connectors + ## + # RPC-specific configuration for `get_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_connector + ## + # RPC-specific configuration for `create_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_connector + ## + # RPC-specific configuration for `update_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_connector + ## + # RPC-specific configuration for `delete_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account_connector + ## + # RPC-specific configuration for `fetch_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_access_token + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `fetch_self` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_self + ## + # RPC-specific configuration for `delete_self` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_self # @private def initialize parent_rpcs = nil @@ -1830,6 +2827,26 @@ def initialize parent_rpcs = nil @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config + list_account_connectors_config = parent_rpcs.list_account_connectors if parent_rpcs.respond_to? :list_account_connectors + @list_account_connectors = ::Gapic::Config::Method.new list_account_connectors_config + get_account_connector_config = parent_rpcs.get_account_connector if parent_rpcs.respond_to? :get_account_connector + @get_account_connector = ::Gapic::Config::Method.new get_account_connector_config + create_account_connector_config = parent_rpcs.create_account_connector if parent_rpcs.respond_to? :create_account_connector + @create_account_connector = ::Gapic::Config::Method.new create_account_connector_config + update_account_connector_config = parent_rpcs.update_account_connector if parent_rpcs.respond_to? :update_account_connector + @update_account_connector = ::Gapic::Config::Method.new update_account_connector_config + delete_account_connector_config = parent_rpcs.delete_account_connector if parent_rpcs.respond_to? :delete_account_connector + @delete_account_connector = ::Gapic::Config::Method.new delete_account_connector_config + fetch_access_token_config = parent_rpcs.fetch_access_token if parent_rpcs.respond_to? :fetch_access_token + @fetch_access_token = ::Gapic::Config::Method.new fetch_access_token_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + fetch_self_config = parent_rpcs.fetch_self if parent_rpcs.respond_to? :fetch_self + @fetch_self = ::Gapic::Config::Method.new fetch_self_config + delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self + @delete_self = ::Gapic::Config::Method.new delete_self_config yield self if block_given? end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb index a0de1aa0714a..48181d92aba3 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb @@ -633,6 +633,406 @@ def fetch_git_refs request_pb, options = nil end end + ## + # Baseline implementation for the list_account_connectors REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest] + # 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::DeveloperConnect::V1::ListAccountConnectorsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse] + # A result object deserialized from the server's reply + def list_account_connectors request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_connectors_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_account_connectors", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.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_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest] + # 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::DeveloperConnect::V1::AccountConnector] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # A result object deserialized from the server's reply + def get_account_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_connector_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_account_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_account_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_account_connector_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_account_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_account_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_connector_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: "update_account_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_account_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_connector_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_account_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_access_token REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest] + # 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::DeveloperConnect::V1::FetchAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # A result object deserialized from the server's reply + def fetch_access_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_access_token_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: "fetch_access_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.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_users REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest] + # 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::DeveloperConnect::V1::ListUsersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::ListUsersResponse] + # A result object deserialized from the server's reply + def list_users request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_users_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_users", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.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_user REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_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_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_self REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest] + # 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::DeveloperConnect::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::User] + # A result object deserialized from the server's reply + def fetch_self request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_self_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: "fetch_self", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::User.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_self REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_self request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_self_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_self", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -931,6 +1331,219 @@ def self.transcode_fetch_git_refs_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_connectors REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest] + # 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_account_connectors_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/accountConnectors", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest] + # 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_account_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest] + # 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_account_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/accountConnectors", + body: "account_connector", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_account_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{account_connector.name}", + body: "account_connector", + matches: [ + ["account_connector.name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest] + # 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_account_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_access_token REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_access_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{account_connector}/users:fetchAccessToken", + body: "*", + matches: [ + ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_users REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest] + # 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_users_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/users", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_user REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest] + # 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_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_self REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_self_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/users:fetchSelf", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_self REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest] + # 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_self_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}/users:deleteSelf", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb index 9828be956310..2bf66a72618a 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb @@ -17,6 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/developer_connect/v1/developer_connect/rest" +require "google/cloud/developerconnect/v1/insights_config_service/rest" require "google/cloud/developer_connect/v1/bindings_override" require "google/cloud/developer_connect/v1/version" diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb index 5142dcbcf670..b59eb7b4f21d 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n8google/cloud/developerconnect/v1/developer_connect.proto\x12 google.cloud.developerconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc7\t\n\nConnection\x12G\n\rgithub_config\x18\x05 \x01(\x0b\x32..google.cloud.developerconnect.v1.GitHubConfigH\x00\x12\\\n\x18github_enterprise_config\x18\r \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitHubEnterpriseConfigH\x00\x12G\n\rgitlab_config\x18\x0e \x01(\x0b\x32..google.cloud.developerconnect.v1.GitLabConfigH\x00\x12\\\n\x18gitlab_enterprise_config\x18\x10 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitLabEnterpriseConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.developerconnect.v1.Connection.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x12installation_state\x18\x06 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.InstallationStateB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.cloud.developerconnect.v1.Connection.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x0c \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12Q\n\x11\x63rypto_key_config\x18\x0f \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.CryptoKeyConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8e\x01\xea\x41\x8a\x01\n*developerconnect.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}*\x0b\x63onnections2\nconnectionR\x01\x01\x42\x13\n\x11\x63onnection_config\"S\n\x0f\x43ryptoKeyConfig\x12@\n\rkey_reference\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\x88\x02\n\x11InstallationState\x12M\n\x05stage\x18\x01 \x01(\x0e\x32\x39.google.cloud.developerconnect.v1.InstallationState.StageB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naction_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"u\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x16\n\x12PENDING_CREATE_APP\x10\x01\x12\x16\n\x12PENDING_USER_OAUTH\x10\x02\x12\x17\n\x13PENDING_INSTALL_APP\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\n\"\xcb\x02\n\x0cGitHubConfig\x12T\n\ngithub_app\x18\x01 \x01(\x0e\x32\x38.google.cloud.developerconnect.v1.GitHubConfig.GitHubAppB\x06\xe0\x41\x02\xe0\x41\x05\x12U\n\x15\x61uthorizer_credential\x18\x02 \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.OAuthCredentialB\x03\xe0\x41\x01\x12 \n\x13\x61pp_installation_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"M\n\tGitHubApp\x12\x1b\n\x17GIT_HUB_APP_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x45VELOPER_CONNECT\x10\x01\x12\x0c\n\x08\x46IREBASE\x10\x02\"\xee\x03\n\x16GitHubEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x61pp_slug\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12V\n\x1aprivate_key_secret_version\x18\x04 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1dwebhook_secret_secret_version\x18\x05 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12 \n\x13\x61pp_installation_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12_\n\x18service_directory_config\x18\n \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12ssl_ca_certificate\x18\x0e \x01(\tB\x03\xe0\x41\x01\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\x80\x01\n\x0fOAuthCredential\x12V\n\x1aoauth_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x9d\x02\n\x0cGitLabConfig\x12\\\n\x1dwebhook_secret_secret_version\x18\x01 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x02 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"~\n\x0eUserCredential\x12U\n\x19user_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xdd\x03\n\x16GitLabEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xb9\x01\n\x16ListConnectionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x17ListConnectionsResponse\x12\x41\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32,.google.cloud.developerconnect.v1.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x14GetConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xfd\x01\n\x17\x43reateConnectionRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x1a\n\rconnection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x03 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xef\x01\n\x17UpdateConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x02 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17\x44\x65leteConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xa8\x06\n\x11GitRepositoryLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tclone_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x06labels\x18\x06 \x03(\x0b\x32?.google.cloud.developerconnect.v1.GitRepositoryLink.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12^\n\x0b\x61nnotations\x18\t \x03(\x0b\x32\x44.google.cloud.developerconnect.v1.GitRepositoryLink.AnnotationsEntryB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\n \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x17\n\nwebhook_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xcc\x01\xea\x41\xc8\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}*\x12gitRepositoryLinks2\x11gitRepositoryLinkR\x01\x01\"\xa4\x02\n\x1e\x43reateGitRepositoryLinkRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12U\n\x13git_repository_link\x18\x02 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLinkB\x03\xe0\x41\x02\x12#\n\x16git_repository_link_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xb9\x01\n\x1e\x44\x65leteGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc7\x01\n\x1dListGitRepositoryLinksRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa1\x01\n\x1eListGitRepositoryLinksResponse\x12Q\n\x14git_repository_links\x18\x01 \x03(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"f\n\x1bGetGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"t\n\x1a\x46\x65tchReadWriteTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"o\n\x15\x46\x65tchReadTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"r\n\x16\x46\x65tchReadTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"w\n\x1b\x46\x65tchReadWriteTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"\x9e\x01\n#FetchLinkableGitRepositoriesRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n$FetchLinkableGitRepositoriesResponse\x12Z\n\x19linkable_git_repositories\x18\x01 \x03(\x0b\x32\x37.google.cloud.developerconnect.v1.LinkableGitRepository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"*\n\x15LinkableGitRepository\x12\x11\n\tclone_uri\x18\x01 \x01(\t\"i\n\x1f\x46\x65tchGitHubInstallationsRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xc2\x01\n FetchGitHubInstallationsResponse\x12\x66\n\rinstallations\x18\x01 \x03(\x0b\x32O.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation\x1a\x36\n\x0cInstallation\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"\xae\x02\n\x13\x46\x65tchGitRefsRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12T\n\x08ref_type\x18\x02 \x01(\x0e\x32=.google.cloud.developerconnect.v1.FetchGitRefsRequest.RefTypeB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"8\n\x07RefType\x12\x18\n\x14REF_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03TAG\x10\x01\x12\n\n\x06\x42RANCH\x10\x02\"B\n\x14\x46\x65tchGitRefsResponse\x12\x11\n\tref_names\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xa7\x1c\n\x10\x44\x65veloperConnect\x12\xc8\x01\n\x0fListConnections\x12\x38.google.cloud.developerconnect.v1.ListConnectionsRequest\x1a\x39.google.cloud.developerconnect.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/connections\x12\xb5\x01\n\rGetConnection\x12\x36.google.cloud.developerconnect.v1.GetConnectionRequest\x1a,.google.cloud.developerconnect.v1.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/connections/*}\x12\xf6\x01\n\x10\x43reateConnection\x12\x39.google.cloud.developerconnect.v1.CreateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/connections:\nconnection\x12\xf8\x01\n\x10UpdateConnection\x12\x39.google.cloud.developerconnect.v1.UpdateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x16\x63onnection,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{connection.name=projects/*/locations/*/connections/*}:\nconnection\x12\xd9\x01\n\x10\x44\x65leteConnection\x12\x39.google.cloud.developerconnect.v1.DeleteConnectionRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/connections/*}\x12\xbb\x02\n\x17\x43reateGitRepositoryLink\x12@.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41&\n\x11GitRepositoryLink\x12\x11OperationMetadata\xda\x41\x31parent,git_repository_link,git_repository_link_id\x82\xd3\xe4\x93\x02[\"D/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks:\x13git_repository_link\x12\xfd\x01\n\x17\x44\x65leteGitRepositoryLink\x12@.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\xf2\x01\n\x16ListGitRepositoryLinks\x12?.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest\x1a@.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks\x12\xdf\x01\n\x14GetGitRepositoryLink\x12=.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest\x1a\x33.google.cloud.developerconnect.v1.GitRepositoryLink\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\x9d\x02\n\x13\x46\x65tchReadWriteToken\x12<.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest\x1a=.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse\"\x88\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02l\"g/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadWriteToken:\x01*\x12\x89\x02\n\x0e\x46\x65tchReadToken\x12\x37.google.cloud.developerconnect.v1.FetchReadTokenRequest\x1a\x38.google.cloud.developerconnect.v1.FetchReadTokenResponse\"\x83\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02g\"b/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadToken:\x01*\x12\x96\x02\n\x1c\x46\x65tchLinkableGitRepositories\x12\x45.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest\x1a\x46.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse\"g\xda\x41\nconnection\x82\xd3\xe4\x93\x02T\x12R/v1/{connection=projects/*/locations/*/connections/*}:fetchLinkableGitRepositories\x12\x86\x02\n\x18\x46\x65tchGitHubInstallations\x12\x41.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest\x1a\x42.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse\"c\xda\x41\nconnection\x82\xd3\xe4\x93\x02P\x12N/v1/{connection=projects/*/locations/*/connections/*}:fetchGitHubInstallations\x12\x87\x02\n\x0c\x46\x65tchGitRefs\x12\x35.google.cloud.developerconnect.v1.FetchGitRefsRequest\x1a\x36.google.cloud.developerconnect.v1.FetchGitRefsResponse\"\x87\x01\xda\x41\x1cgit_repository_link,ref_type\x82\xd3\xe4\x93\x02\x62\x12`/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchGitRefs\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf8\x04\n$com.google.cloud.developerconnect.v1B\x15\x44\x65veloperConnectProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xa2\x02\x10\x44\x65veloperConnect\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1\xea\x02#Google::Cloud::DeveloperConnect::V1\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" +descriptor_data = "\n8google/cloud/developerconnect/v1/developer_connect.proto\x12 google.cloud.developerconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x10ListUsersRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$developerconnect.googleapis.com/User\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"x\n\x11ListUsersResponse\x12\x35\n\x05users\x18\x01 \x03(\x0b\x32&.google.cloud.developerconnect.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd7\x0b\n\nConnection\x12G\n\rgithub_config\x18\x05 \x01(\x0b\x32..google.cloud.developerconnect.v1.GitHubConfigH\x00\x12\\\n\x18github_enterprise_config\x18\r \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitHubEnterpriseConfigH\x00\x12G\n\rgitlab_config\x18\x0e \x01(\x0b\x32..google.cloud.developerconnect.v1.GitLabConfigH\x00\x12\\\n\x18gitlab_enterprise_config\x18\x10 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitLabEnterpriseConfigH\x00\x12\x63\n\x1c\x62itbucket_data_center_config\x18\x11 \x01(\x0b\x32;.google.cloud.developerconnect.v1.BitbucketDataCenterConfigH\x00\x12X\n\x16\x62itbucket_cloud_config\x18\x12 \x01(\x0b\x32\x36.google.cloud.developerconnect.v1.BitbucketCloudConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.developerconnect.v1.Connection.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x12installation_state\x18\x06 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.InstallationStateB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.cloud.developerconnect.v1.Connection.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x0c \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12Q\n\x11\x63rypto_key_config\x18\x0f \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.CryptoKeyConfigB\x03\xe0\x41\x01\x12O\n\x10git_proxy_config\x18\x13 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.GitProxyConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8e\x01\xea\x41\x8a\x01\n*developerconnect.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}*\x0b\x63onnections2\nconnectionR\x01\x01\x42\x13\n\x11\x63onnection_config\"S\n\x0f\x43ryptoKeyConfig\x12@\n\rkey_reference\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"&\n\x0eGitProxyConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x02\n\x11InstallationState\x12M\n\x05stage\x18\x01 \x01(\x0e\x32\x39.google.cloud.developerconnect.v1.InstallationState.StageB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naction_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"u\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x16\n\x12PENDING_CREATE_APP\x10\x01\x12\x16\n\x12PENDING_USER_OAUTH\x10\x02\x12\x17\n\x13PENDING_INSTALL_APP\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\n\"\xcb\x02\n\x0cGitHubConfig\x12T\n\ngithub_app\x18\x01 \x01(\x0e\x32\x38.google.cloud.developerconnect.v1.GitHubConfig.GitHubAppB\x06\xe0\x41\x02\xe0\x41\x05\x12U\n\x15\x61uthorizer_credential\x18\x02 \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.OAuthCredentialB\x03\xe0\x41\x01\x12 \n\x13\x61pp_installation_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"M\n\tGitHubApp\x12\x1b\n\x17GIT_HUB_APP_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x45VELOPER_CONNECT\x10\x01\x12\x0c\n\x08\x46IREBASE\x10\x02\"\xee\x03\n\x16GitHubEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x61pp_slug\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12V\n\x1aprivate_key_secret_version\x18\x04 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1dwebhook_secret_secret_version\x18\x05 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12 \n\x13\x61pp_installation_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12_\n\x18service_directory_config\x18\n \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12ssl_ca_certificate\x18\x0e \x01(\tB\x03\xe0\x41\x01\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\x80\x01\n\x0fOAuthCredential\x12V\n\x1aoauth_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x9d\x02\n\x0cGitLabConfig\x12\\\n\x1dwebhook_secret_secret_version\x18\x01 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x02 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"~\n\x0eUserCredential\x12U\n\x19user_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xdd\x03\n\x16GitLabEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xe0\x03\n\x19\x42itbucketDataCenterConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xbd\x02\n\x14\x42itbucketCloudConfig\x12\x16\n\tworkspace\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"\xb9\x01\n\x16ListConnectionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x17ListConnectionsResponse\x12\x41\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32,.google.cloud.developerconnect.v1.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x14GetConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xfd\x01\n\x17\x43reateConnectionRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x1a\n\rconnection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x03 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xef\x01\n\x17UpdateConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x02 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17\x44\x65leteConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc5\x01\n\x1cListAccountConnectorsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListAccountConnectorsResponse\x12N\n\x12\x61\x63\x63ount_connectors\x18\x01 \x03(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1aGetAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\x9d\x02\n\x1d\x43reateAccountConnectorRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12!\n\x14\x61\x63\x63ount_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x11\x61\x63\x63ount_connector\x18\x03 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x82\x02\n\x1dUpdateAccountConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x11\x61\x63\x63ount_connector\x18\x02 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x01\n\x1d\x44\x65leteAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x9f\x01\n\x11\x44\x65leteUserRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$developerconnect.googleapis.com/User\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"Z\n\x10\x46\x65tchSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"[\n\x11\x44\x65leteSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"n\n\x17\x46\x65tchAccessTokenRequest\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\xb7\x01\n\x18\x46\x65tchAccessTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06scopes\x18\x03 \x03(\t\x12G\n\x0e\x65xchange_error\x18\x04 \x01(\x0b\x32/.google.cloud.developerconnect.v1.ExchangeError\"2\n\rExchangeError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\xc4\x06\n\x11GitRepositoryLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tclone_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x06labels\x18\x06 \x03(\x0b\x32?.google.cloud.developerconnect.v1.GitRepositoryLink.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12^\n\x0b\x61nnotations\x18\t \x03(\x0b\x32\x44.google.cloud.developerconnect.v1.GitRepositoryLink.AnnotationsEntryB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\n \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x17\n\nwebhook_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rgit_proxy_uri\x18\x0c \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xcc\x01\xea\x41\xc8\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}*\x12gitRepositoryLinks2\x11gitRepositoryLinkR\x01\x01\"\xa4\x02\n\x1e\x43reateGitRepositoryLinkRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12U\n\x13git_repository_link\x18\x02 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLinkB\x03\xe0\x41\x02\x12#\n\x16git_repository_link_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xb9\x01\n\x1e\x44\x65leteGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc7\x01\n\x1dListGitRepositoryLinksRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa1\x01\n\x1eListGitRepositoryLinksResponse\x12Q\n\x14git_repository_links\x18\x01 \x03(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"f\n\x1bGetGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"t\n\x1a\x46\x65tchReadWriteTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"o\n\x15\x46\x65tchReadTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"r\n\x16\x46\x65tchReadTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"w\n\x1b\x46\x65tchReadWriteTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"\x9e\x01\n#FetchLinkableGitRepositoriesRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n$FetchLinkableGitRepositoriesResponse\x12Z\n\x19linkable_git_repositories\x18\x01 \x03(\x0b\x32\x37.google.cloud.developerconnect.v1.LinkableGitRepository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"*\n\x15LinkableGitRepository\x12\x11\n\tclone_uri\x18\x01 \x01(\t\"i\n\x1f\x46\x65tchGitHubInstallationsRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xc2\x01\n FetchGitHubInstallationsResponse\x12\x66\n\rinstallations\x18\x01 \x03(\x0b\x32O.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation\x1a\x36\n\x0cInstallation\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"\xae\x02\n\x13\x46\x65tchGitRefsRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12T\n\x08ref_type\x18\x02 \x01(\x0e\x32=.google.cloud.developerconnect.v1.FetchGitRefsRequest.RefTypeB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"8\n\x07RefType\x12\x18\n\x14REF_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03TAG\x10\x01\x12\n\n\x06\x42RANCH\x10\x02\"B\n\x14\x46\x65tchGitRefsResponse\x12\x11\n\tref_names\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xfd\x05\n\x10\x41\x63\x63ountConnector\x12V\n\x15provider_oauth_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.developerconnect.v1.ProviderOAuthConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32\x43.google.cloud.developerconnect.v1.AccountConnector.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x08 \x03(\x0b\x32>.google.cloud.developerconnect.v1.AccountConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0foauth_start_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xad\x01\xea\x41\xa9\x01\n0developerconnect.googleapis.com/AccountConnector\x12Mprojects/{project}/locations/{location}/accountConnectors/{account_connector}*\x11\x61\x63\x63ountConnectors2\x10\x61\x63\x63ountConnectorR\x01\x01\x42\x1a\n\x18\x61\x63\x63ount_connector_config\"\xc2\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x17last_token_request_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x93\x01\xea\x41\x8f\x01\n$developerconnect.googleapis.com/User\x12Zprojects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}*\x05users2\x04user\"\x94\x01\n\x13ProviderOAuthConfig\x12S\n\x12system_provider_id\x18\x01 \x01(\x0e\x32\x30.google.cloud.developerconnect.v1.SystemProviderB\x03\xe0\x41\x05H\x00\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x02\x42\x13\n\x11oauth_provider_id*\x97\x01\n\x0eSystemProvider\x12\x1f\n\x1bSYSTEM_PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\n\n\x06GITLAB\x10\x02\x12\n\n\x06GOOGLE\x10\x03\x12\n\n\x06SENTRY\x10\x04\x12\x08\n\x04ROVO\x10\x05\x12\r\n\tNEW_RELIC\x10\x06\x12\x0c\n\x08\x44\x41TASTAX\x10\x07\x12\r\n\tDYNATRACE\x10\x08\x32\xe9.\n\x10\x44\x65veloperConnect\x12\xc8\x01\n\x0fListConnections\x12\x38.google.cloud.developerconnect.v1.ListConnectionsRequest\x1a\x39.google.cloud.developerconnect.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/connections\x12\xb5\x01\n\rGetConnection\x12\x36.google.cloud.developerconnect.v1.GetConnectionRequest\x1a,.google.cloud.developerconnect.v1.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/connections/*}\x12\xf6\x01\n\x10\x43reateConnection\x12\x39.google.cloud.developerconnect.v1.CreateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/connections:\nconnection\x12\xf8\x01\n\x10UpdateConnection\x12\x39.google.cloud.developerconnect.v1.UpdateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x16\x63onnection,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{connection.name=projects/*/locations/*/connections/*}:\nconnection\x12\xd9\x01\n\x10\x44\x65leteConnection\x12\x39.google.cloud.developerconnect.v1.DeleteConnectionRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/connections/*}\x12\xbb\x02\n\x17\x43reateGitRepositoryLink\x12@.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41&\n\x11GitRepositoryLink\x12\x11OperationMetadata\xda\x41\x31parent,git_repository_link,git_repository_link_id\x82\xd3\xe4\x93\x02[\"D/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks:\x13git_repository_link\x12\xfd\x01\n\x17\x44\x65leteGitRepositoryLink\x12@.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\xf2\x01\n\x16ListGitRepositoryLinks\x12?.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest\x1a@.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks\x12\xdf\x01\n\x14GetGitRepositoryLink\x12=.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest\x1a\x33.google.cloud.developerconnect.v1.GitRepositoryLink\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\x9d\x02\n\x13\x46\x65tchReadWriteToken\x12<.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest\x1a=.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse\"\x88\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02l\"g/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadWriteToken:\x01*\x12\x89\x02\n\x0e\x46\x65tchReadToken\x12\x37.google.cloud.developerconnect.v1.FetchReadTokenRequest\x1a\x38.google.cloud.developerconnect.v1.FetchReadTokenResponse\"\x83\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02g\"b/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadToken:\x01*\x12\x96\x02\n\x1c\x46\x65tchLinkableGitRepositories\x12\x45.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest\x1a\x46.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse\"g\xda\x41\nconnection\x82\xd3\xe4\x93\x02T\x12R/v1/{connection=projects/*/locations/*/connections/*}:fetchLinkableGitRepositories\x12\x86\x02\n\x18\x46\x65tchGitHubInstallations\x12\x41.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest\x1a\x42.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse\"c\xda\x41\nconnection\x82\xd3\xe4\x93\x02P\x12N/v1/{connection=projects/*/locations/*/connections/*}:fetchGitHubInstallations\x12\x87\x02\n\x0c\x46\x65tchGitRefs\x12\x35.google.cloud.developerconnect.v1.FetchGitRefsRequest\x1a\x36.google.cloud.developerconnect.v1.FetchGitRefsResponse\"\x87\x01\xda\x41\x1cgit_repository_link,ref_type\x82\xd3\xe4\x93\x02\x62\x12`/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchGitRefs\x12\xe0\x01\n\x15ListAccountConnectors\x12>.google.cloud.developerconnect.v1.ListAccountConnectorsRequest\x1a?.google.cloud.developerconnect.v1.ListAccountConnectorsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/accountConnectors\x12\xcd\x01\n\x13GetAccountConnector\x12<.google.cloud.developerconnect.v1.GetAccountConnectorRequest\x1a\x32.google.cloud.developerconnect.v1.AccountConnector\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\xa3\x02\n\x16\x43reateAccountConnector\x12?.google.cloud.developerconnect.v1.CreateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41-parent,account_connector,account_connector_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/accountConnectors:\x11\x61\x63\x63ount_connector\x12\xa5\x02\n\x16UpdateAccountConnector\x12?.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41\x1d\x61\x63\x63ount_connector,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{account_connector.name=projects/*/locations/*/accountConnectors/*}:\x11\x61\x63\x63ount_connector\x12\xeb\x01\n\x16\x44\x65leteAccountConnector\x12?.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\x83\x02\n\x10\x46\x65tchAccessToken\x12\x39.google.cloud.developerconnect.v1.FetchAccessTokenRequest\x1a:.google.cloud.developerconnect.v1.FetchAccessTokenResponse\"x\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02^\"Y/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:fetchAccessToken:\x01*\x12\xc4\x01\n\tListUsers\x12\x32.google.cloud.developerconnect.v1.ListUsersRequest\x1a\x33.google.cloud.developerconnect.v1.ListUsersResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/accountConnectors/*}/users\x12\xdb\x01\n\nDeleteUser\x12\x33.google.cloud.developerconnect.v1.DeleteUserRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/accountConnectors/*/users/*}\x12\xbd\x01\n\tFetchSelf\x12\x32.google.cloud.developerconnect.v1.FetchSelfRequest\x1a&.google.cloud.developerconnect.v1.User\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/accountConnectors/*}/users:fetchSelf\x12\xe5\x01\n\nDeleteSelf\x12\x33.google.cloud.developerconnect.v1.DeleteSelfRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/accountConnectors/*}/users:deleteSelf\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf8\x04\n$com.google.cloud.developerconnect.v1B\x15\x44\x65veloperConnectProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xa2\x02\x10\x44\x65veloperConnect\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1\xea\x02#Google::Cloud::DeveloperConnect::V1\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -47,8 +47,11 @@ module Google module Cloud module DeveloperConnect module V1 + ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListUsersRequest").msgclass + ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListUsersResponse").msgclass Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.Connection").msgclass CryptoKeyConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.CryptoKeyConfig").msgclass + GitProxyConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GitProxyConfig").msgclass InstallationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InstallationState").msgclass InstallationState::Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InstallationState.Stage").enummodule GitHubConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GitHubConfig").msgclass @@ -59,13 +62,27 @@ module V1 GitLabConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GitLabConfig").msgclass UserCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.UserCredential").msgclass GitLabEnterpriseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GitLabEnterpriseConfig").msgclass + BitbucketDataCenterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.BitbucketDataCenterConfig").msgclass + BitbucketCloudConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.BitbucketCloudConfig").msgclass ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListConnectionsRequest").msgclass ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListConnectionsResponse").msgclass GetConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetConnectionRequest").msgclass CreateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.CreateConnectionRequest").msgclass UpdateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.UpdateConnectionRequest").msgclass DeleteConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeleteConnectionRequest").msgclass + ListAccountConnectorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListAccountConnectorsRequest").msgclass + ListAccountConnectorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListAccountConnectorsResponse").msgclass + GetAccountConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetAccountConnectorRequest").msgclass + CreateAccountConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.CreateAccountConnectorRequest").msgclass + UpdateAccountConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.UpdateAccountConnectorRequest").msgclass + DeleteAccountConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeleteAccountConnectorRequest").msgclass + DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeleteUserRequest").msgclass OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.OperationMetadata").msgclass + FetchSelfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.FetchSelfRequest").msgclass + DeleteSelfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeleteSelfRequest").msgclass + FetchAccessTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.FetchAccessTokenRequest").msgclass + FetchAccessTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.FetchAccessTokenResponse").msgclass + ExchangeError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ExchangeError").msgclass GitRepositoryLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GitRepositoryLink").msgclass CreateGitRepositoryLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest").msgclass DeleteGitRepositoryLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest").msgclass @@ -85,6 +102,10 @@ module V1 FetchGitRefsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.FetchGitRefsRequest").msgclass FetchGitRefsRequest::RefType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.FetchGitRefsRequest.RefType").enummodule FetchGitRefsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.FetchGitRefsResponse").msgclass + AccountConnector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.AccountConnector").msgclass + User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.User").msgclass + ProviderOAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ProviderOAuthConfig").msgclass + SystemProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.SystemProvider").enummodule end end end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb index 787b333a44be..b2edec914956 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb @@ -69,6 +69,26 @@ class Service rpc :FetchGitHubInstallations, ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse # Fetch the list of branches or tags for a given repository. rpc :FetchGitRefs, ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse + # Lists AccountConnectors in a given project and location. + rpc :ListAccountConnectors, ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse + # Gets details of a single AccountConnector. + rpc :GetAccountConnector, ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::Google::Cloud::DeveloperConnect::V1::AccountConnector + # Creates a new AccountConnector in a given project and location. + rpc :CreateAccountConnector, ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single AccountConnector. + rpc :UpdateAccountConnector, ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::Google::Longrunning::Operation + # Deletes a single AccountConnector. + rpc :DeleteAccountConnector, ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::Google::Longrunning::Operation + # Fetches OAuth access token based on end user credentials. + rpc :FetchAccessToken, ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse + # Lists Users in a given project, location, and account_connector. + rpc :ListUsers, ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse + # Deletes a single User. + rpc :DeleteUser, ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::Google::Longrunning::Operation + # Fetch the User based on the user credentials. + rpc :FetchSelf, ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::Google::Cloud::DeveloperConnect::V1::User + # Delete the User based on the user credentials. + rpc :DeleteSelf, ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_pb.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_pb.rb new file mode 100644 index 000000000000..f7519694f62c --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_pb.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/developerconnect/v1/insights_config.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/developerconnect/v1/developer_connect_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n6google/cloud/developerconnect/v1/insights_config.proto\x12 google.cloud.developerconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/developerconnect/v1/developer_connect.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xfc\x07\n\x0eInsightsConfig\x12\"\n\x13\x61pp_hub_application\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x0fruntime_configs\x18\x05 \x03(\x0b\x32/.google.cloud.developerconnect.v1.RuntimeConfigB\x03\xe0\x41\x03\x12O\n\x10\x61rtifact_configs\x18\x06 \x03(\x0b\x32\x30.google.cloud.developerconnect.v1.ArtifactConfigB\x03\xe0\x41\x01\x12J\n\x05state\x18\x07 \x01(\x0e\x32\x36.google.cloud.developerconnect.v1.InsightsConfig.StateB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x08 \x03(\x0b\x32\x41.google.cloud.developerconnect.v1.InsightsConfig.AnnotationsEntryB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\t \x03(\x0b\x32<.google.cloud.developerconnect.v1.InsightsConfig.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12\'\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"D\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x05\x12\x0c\n\x08\x43OMPLETE\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\xa3\x01\xea\x41\x9f\x01\n.developerconnect.googleapis.com/InsightsConfig\x12Iprojects/{project}/locations/{location}/insightsConfigs/{insights_config}*\x0finsightsConfigs2\x0einsightsConfigR\x01\x01\x42\x19\n\x17insights_config_context\"\xe3\x02\n\rRuntimeConfig\x12J\n\x0cgke_workload\x18\x03 \x01(\x0b\x32-.google.cloud.developerconnect.v1.GKEWorkloadB\x03\xe0\x41\x03H\x00\x12Q\n\x10\x61pp_hub_workload\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.AppHubWorkloadB\x03\xe0\x41\x03H\x01\x12\x13\n\x03uri\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12I\n\x05state\x18\x02 \x01(\x0e\x32\x35.google.cloud.developerconnect.v1.RuntimeConfig.StateB\x03\xe0\x41\x03\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06LINKED\x10\x01\x12\x0c\n\x08UNLINKED\x10\x02\x42\t\n\x07runtimeB\x0e\n\x0c\x64\x65rived_from\"?\n\x0bGKEWorkload\x12\x17\n\x07\x63luster\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x17\n\ndeployment\x18\x02 \x01(\tB\x03\xe0\x41\x03\"a\n\x0e\x41ppHubWorkload\x12\x1b\n\x08workload\x18\x01 \x01(\tB\t\xe0\x41\x02\xe0\x41\x05\xe0\x41\x03\x12\x18\n\x0b\x63riticality\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65nvironment\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\x9c\x02\n\x0e\x41rtifactConfig\x12\x61\n\x18google_artifact_registry\x18\x02 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GoogleArtifactRegistryB\x03\xe0\x41\x01H\x00\x12\x61\n\x18google_artifact_analysis\x18\x03 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GoogleArtifactAnalysisB\x03\xe0\x41\x01H\x01\x12\x13\n\x03uri\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x42\x12\n\x10\x61rtifact_storageB\x1b\n\x19\x61rtifact_metadata_storage\"1\n\x16GoogleArtifactAnalysis\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\\\n\x16GoogleArtifactRegistry\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x19\x61rtifact_registry_package\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"\xf2\x01\n\x1b\x43reateInsightsConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.developerconnect.googleapis.com/InsightsConfig\x12\x1f\n\x12insights_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x0finsights_config\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.InsightsConfigB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"`\n\x18GetInsightsConfigRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.developerconnect.googleapis.com/InsightsConfig\"\xc1\x01\n\x1aListInsightsConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.developerconnect.googleapis.com/InsightsConfig\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x1bListInsightsConfigsResponse\x12J\n\x10insights_configs\x18\x01 \x03(\x0b\x32\x30.google.cloud.developerconnect.v1.InsightsConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xb3\x01\n\x1b\x44\x65leteInsightsConfigRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.developerconnect.googleapis.com/InsightsConfig\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc6\x01\n\x1bUpdateInsightsConfigRequest\x12N\n\x0finsights_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.InsightsConfigB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x32\xef\n\n\x15InsightsConfigService\x12\xd8\x01\n\x13ListInsightsConfigs\x12<.google.cloud.developerconnect.v1.ListInsightsConfigsRequest\x1a=.google.cloud.developerconnect.v1.ListInsightsConfigsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/insightsConfigs\x12\xb6\x02\n\x14\x43reateInsightsConfig\x12=.google.cloud.developerconnect.v1.CreateInsightsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x44\n\x0eInsightsConfig\x12\x32google.cloud.developerconnect.v1.OperationMetadata\xda\x41)parent,insights_config,insights_config_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/insightsConfigs:\x0finsights_config\x12\xc5\x01\n\x11GetInsightsConfig\x12:.google.cloud.developerconnect.v1.GetInsightsConfigRequest\x1a\x30.google.cloud.developerconnect.v1.InsightsConfig\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/insightsConfigs/*}\x12\x9a\x02\n\x14UpdateInsightsConfig\x12=.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xa3\x01\xca\x41\x44\n\x0eInsightsConfig\x12\x32google.cloud.developerconnect.v1.OperationMetadata\x82\xd3\xe4\x93\x02V2C/v1/{insights_config.name=projects/*/locations/*/insightsConfigs/*}:\x0finsights_config\x12\x87\x02\n\x14\x44\x65leteInsightsConfig\x12=.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41K\n\x15google.protobuf.Empty\x12\x32google.cloud.developerconnect.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/insightsConfigs/*}\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x01\n$com.google.cloud.developerconnect.v1B\x13InsightsConfigProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Developerconnect + module V1 + InsightsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InsightsConfig").msgclass + InsightsConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InsightsConfig.State").enummodule + RuntimeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.RuntimeConfig").msgclass + RuntimeConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.RuntimeConfig.State").enummodule + GKEWorkload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GKEWorkload").msgclass + AppHubWorkload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.AppHubWorkload").msgclass + ArtifactConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ArtifactConfig").msgclass + GoogleArtifactAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleArtifactAnalysis").msgclass + GoogleArtifactRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleArtifactRegistry").msgclass + CreateInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.CreateInsightsConfigRequest").msgclass + GetInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetInsightsConfigRequest").msgclass + ListInsightsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListInsightsConfigsRequest").msgclass + ListInsightsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListInsightsConfigsResponse").msgclass + DeleteInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeleteInsightsConfigRequest").msgclass + UpdateInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.UpdateInsightsConfigRequest").msgclass + end + end + end +end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb new file mode 100644 index 000000000000..54b6cac20165 --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developer_connect/v1/version" + +require "google/cloud/developerconnect/v1/insights_config_service/credentials" +require "google/cloud/developerconnect/v1/insights_config_service/paths" +require "google/cloud/developerconnect/v1/insights_config_service/operations" +require "google/cloud/developerconnect/v1/insights_config_service/client" +require "google/cloud/developerconnect/v1/insights_config_service/rest" + +module Google + module Cloud + module Developerconnect + module V1 + ## + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/developerconnect/v1/insights_config_service" + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/developerconnect/v1/insights_config_service/rest" + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + module InsightsConfigService + end + end + end + end +end + +helper_path = ::File.join __dir__, "insights_config_service", "helpers.rb" +require "google/cloud/developerconnect/v1/insights_config_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb new file mode 100644 index 000000000000..849e2431640b --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb @@ -0,0 +1,956 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developerconnect/v1/insights_config_pb" +require "google/cloud/location" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + ## + # Client for the InsightsConfigService service. + # + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :insights_config_service_stub + + ## + # Configure the InsightsConfigService Client class. + # + # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InsightsConfigService clients + # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::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", "Developerconnect", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InsightsConfigService 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::Developerconnect::V1::InsightsConfigService::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 + @insights_config_service_stub.universe_domain + end + + ## + # Create a new InsightsConfigService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InsightsConfigService 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/developerconnect/v1/insights_config_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @insights_config_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::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 + ) + + @insights_config_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @insights_config_service_stub.endpoint + config.universe_domain = @insights_config_service_stub.universe_domain + config.logger = @insights_config_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @insights_config_service_stub.logger + end + + # Service calls + + ## + # Lists InsightsConfigs in a given project and location. + # + # @overload list_insights_configs(request, options = nil) + # Pass arguments to `list_insights_configs` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::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_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_insights_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListInsightsConfigsRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. See https://google.aip.dev/160 for more + # details. Filter string, adhering to the rules in + # https://google.aip.dev/160. List only InsightsConfigs matching the filter. + # If filter is empty, all InsightsConfigs are listed. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new + # + # # Call the list_insights_configs method. + # result = client.list_insights_configs 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::Developerconnect::V1::InsightsConfig. + # p item + # end + # + def list_insights_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest + + # 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_insights_configs.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_insights_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_insights_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :list_insights_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @insights_config_service_stub, :list_insights_configs, 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 + + ## + # Creates a new InsightsConfig in a given project and location. + # + # @overload create_insights_config(request, options = nil) + # Pass arguments to `create_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::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_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil) + # Pass arguments to `create_insights_config` 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. Value for parent. + # @param insights_config_id [::String] + # Required. ID of the requesting InsightsConfig. + # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] + # Required. The resource being created. + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new + # + # # Call the create_insights_config method. + # result = client.create_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest + + # 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_insights_config.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_insights_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :create_insights_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Insight. + # + # @overload get_insights_config(request, options = nil) + # Pass arguments to `get_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::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_insights_config(name: nil) + # Pass arguments to `get_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new + # + # # Call the get_insights_config method. + # result = client.get_insights_config request + # + # # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. + # p result + # + def get_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest + + # 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_insights_config.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_insights_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :get_insights_config, 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 + + ## + # Updates the parameters of a single InsightsConfig. + # + # @overload update_insights_config(request, options = nil) + # Pass arguments to `update_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::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 update_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_insights_config` 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 insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the insightsConfig is not found a new + # insightsConfig will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input insightsConfig has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new + # + # # Call the update_insights_config method. + # result = client.update_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest + + # 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.update_insights_config.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.insights_config&.name + header_params["insights_config.name"] = request.insights_config.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.update_insights_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :update_insights_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single Insight. + # + # @overload delete_insights_config(request, options = nil) + # Pass arguments to `delete_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::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_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_insights_config` 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. Value for parent. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new + # + # # Call the delete_insights_config method. + # result = client.delete_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest + + # 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_insights_config.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_insights_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :delete_insights_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 InsightsConfigService API. + # + # This class represents the configuration for InsightsConfigService, + # 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::Developerconnect::V1::InsightsConfigService::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 + # # list_insights_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_insights_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_insights_configs.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "developerconnect.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 InsightsConfigService 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 `list_insights_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_insights_configs + ## + # RPC-specific configuration for `create_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_insights_config + ## + # RPC-specific configuration for `get_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_insights_config + ## + # RPC-specific configuration for `update_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_insights_config + ## + # RPC-specific configuration for `delete_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_insights_config + + # @private + def initialize parent_rpcs = nil + list_insights_configs_config = parent_rpcs.list_insights_configs if parent_rpcs.respond_to? :list_insights_configs + @list_insights_configs = ::Gapic::Config::Method.new list_insights_configs_config + create_insights_config_config = parent_rpcs.create_insights_config if parent_rpcs.respond_to? :create_insights_config + @create_insights_config = ::Gapic::Config::Method.new create_insights_config_config + get_insights_config_config = parent_rpcs.get_insights_config if parent_rpcs.respond_to? :get_insights_config + @get_insights_config = ::Gapic::Config::Method.new get_insights_config_config + update_insights_config_config = parent_rpcs.update_insights_config if parent_rpcs.respond_to? :update_insights_config + @update_insights_config = ::Gapic::Config::Method.new update_insights_config_config + delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config + @delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb new file mode 100644 index 000000000000..aa5943ef8136 --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Developerconnect + module V1 + module InsightsConfigService + # Credentials for the InsightsConfigService 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 diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb new file mode 100644 index 000000000000..0fb2a6ee2358 --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb @@ -0,0 +1,813 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the InsightsConfigService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the InsightsConfigService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "developerconnect.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb new file mode 100644 index 000000000000..81463ad592ee --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Developerconnect + module V1 + module InsightsConfigService + # Path helper methods for the InsightsConfigService API. + module Paths + ## + # Create a fully-qualified InsightsConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/insightsConfigs/{insights_config}` + # + # @param project [String] + # @param location [String] + # @param insights_config [String] + # + # @return [::String] + def insights_config_path project:, location:, insights_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/insightsConfigs/#{insights_config}" + end + + ## + # 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 + + extend self + end + end + end + end + end +end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb new file mode 100644 index 000000000000..fc6f250374d0 --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developer_connect/v1/version" +require "google/cloud/developer_connect/v1/bindings_override" + +require "google/cloud/developerconnect/v1/insights_config_service/credentials" +require "google/cloud/developerconnect/v1/insights_config_service/paths" +require "google/cloud/developerconnect/v1/insights_config_service/rest/operations" +require "google/cloud/developerconnect/v1/insights_config_service/rest/client" + +module Google + module Cloud + module Developerconnect + module V1 + ## + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/developerconnect/v1/insights_config_service/rest" + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + module InsightsConfigService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/developerconnect/v1/insights_config_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb new file mode 100644 index 000000000000..3278319a8bc4 --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb @@ -0,0 +1,903 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developerconnect/v1/insights_config_pb" +require "google/cloud/developerconnect/v1/insights_config_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + module Rest + ## + # REST client for the InsightsConfigService service. + # + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :insights_config_service_stub + + ## + # Configure the InsightsConfigService Client class. + # + # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InsightsConfigService clients + # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::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", "Developerconnect", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InsightsConfigService 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::Developerconnect::V1::InsightsConfigService::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 + @insights_config_service_stub.universe_domain + end + + ## + # Create a new InsightsConfigService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InsightsConfigService 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 + + @operations_client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @insights_config_service_stub = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @insights_config_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @insights_config_service_stub.endpoint + config.universe_domain = @insights_config_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @insights_config_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @insights_config_service_stub.logger + end + + # Service calls + + ## + # Lists InsightsConfigs in a given project and location. + # + # @overload list_insights_configs(request, options = nil) + # Pass arguments to `list_insights_configs` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::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_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_insights_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListInsightsConfigsRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. See https://google.aip.dev/160 for more + # details. Filter string, adhering to the rules in + # https://google.aip.dev/160. List only InsightsConfigs matching the filter. + # If filter is empty, all InsightsConfigs are listed. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new + # + # # Call the list_insights_configs method. + # result = client.list_insights_configs 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::Developerconnect::V1::InsightsConfig. + # p item + # end + # + def list_insights_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest + + # 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_insights_configs.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::DeveloperConnect::V1::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_insights_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_insights_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.list_insights_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @insights_config_service_stub, :list_insights_configs, "insights_configs", 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 + + ## + # Creates a new InsightsConfig in a given project and location. + # + # @overload create_insights_config(request, options = nil) + # Pass arguments to `create_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::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_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil) + # Pass arguments to `create_insights_config` 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. Value for parent. + # @param insights_config_id [::String] + # Required. ID of the requesting InsightsConfig. + # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] + # Required. The resource being created. + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new + # + # # Call the create_insights_config method. + # result = client.create_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest + + # 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_insights_config.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::DeveloperConnect::V1::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_insights_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.create_insights_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Insight. + # + # @overload get_insights_config(request, options = nil) + # Pass arguments to `get_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::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_insights_config(name: nil) + # Pass arguments to `get_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new + # + # # Call the get_insights_config method. + # result = client.get_insights_config request + # + # # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. + # p result + # + def get_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest + + # 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_insights_config.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::DeveloperConnect::V1::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_insights_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.get_insights_config 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 + + ## + # Updates the parameters of a single InsightsConfig. + # + # @overload update_insights_config(request, options = nil) + # Pass arguments to `update_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::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 update_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_insights_config` 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 insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the insightsConfig is not found a new + # insightsConfig will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input insightsConfig has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new + # + # # Call the update_insights_config method. + # result = client.update_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest + + # 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.update_insights_config.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::DeveloperConnect::V1::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.update_insights_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.update_insights_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single Insight. + # + # @overload delete_insights_config(request, options = nil) + # Pass arguments to `delete_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::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_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_insights_config` 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. Value for parent. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new + # + # # Call the delete_insights_config method. + # result = client.delete_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest + + # 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_insights_config.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::DeveloperConnect::V1::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_insights_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.delete_insights_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 InsightsConfigService REST API. + # + # This class represents the configuration for InsightsConfigService 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::Developerconnect::V1::InsightsConfigService::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 + # # list_insights_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_insights_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_insights_configs.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 = "developerconnect.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, 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 InsightsConfigService 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 `list_insights_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_insights_configs + ## + # RPC-specific configuration for `create_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_insights_config + ## + # RPC-specific configuration for `get_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_insights_config + ## + # RPC-specific configuration for `update_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_insights_config + ## + # RPC-specific configuration for `delete_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_insights_config + + # @private + def initialize parent_rpcs = nil + list_insights_configs_config = parent_rpcs.list_insights_configs if parent_rpcs.respond_to? :list_insights_configs + @list_insights_configs = ::Gapic::Config::Method.new list_insights_configs_config + create_insights_config_config = parent_rpcs.create_insights_config if parent_rpcs.respond_to? :create_insights_config + @create_insights_config = ::Gapic::Config::Method.new create_insights_config_config + get_insights_config_config = parent_rpcs.get_insights_config if parent_rpcs.respond_to? :get_insights_config + @get_insights_config = ::Gapic::Config::Method.new get_insights_config_config + update_insights_config_config = parent_rpcs.update_insights_config if parent_rpcs.respond_to? :update_insights_config + @update_insights_config = ::Gapic::Config::Method.new update_insights_config_config + delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config + @delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb new file mode 100644 index 000000000000..958230826251 --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb @@ -0,0 +1,914 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the InsightsConfigService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the InsightsConfigService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::DeveloperConnect::V1::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::DeveloperConnect::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::DeveloperConnect::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::DeveloperConnect::V1::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "developerconnect.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb new file mode 100644 index 000000000000..e51c2ace0801 --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb @@ -0,0 +1,388 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developerconnect/v1/insights_config_pb" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + module Rest + ## + # REST service stub for the InsightsConfigService 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: true, + 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 list_insights_configs REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest] + # 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::Developerconnect::V1::ListInsightsConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse] + # A result object deserialized from the server's reply + def list_insights_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_insights_configs_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_insights_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_insights_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_insights_config_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_insights_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest] + # 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::Developerconnect::V1::InsightsConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # A result object deserialized from the server's reply + def get_insights_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_insights_config_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_insights_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Developerconnect::V1::InsightsConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_insights_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_insights_config_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: "update_insights_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_insights_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_insights_config_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_insights_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 list_insights_configs REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest] + # 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_insights_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/insightsConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest] + # 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_insights_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/insightsConfigs", + body: "insights_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest] + # 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_insights_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_insights_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{insights_config.name}", + body: "insights_config", + matches: [ + ["insights_config.name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest] + # 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_insights_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb new file mode 100644 index 000000000000..bdba72420b8f --- /dev/null +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/developerconnect/v1/insights_config.proto for package 'google.cloud.developerconnect.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developerconnect/v1/insights_config_pb' + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.developerconnect.v1.InsightsConfigService' + + # Lists InsightsConfigs in a given project and location. + rpc :ListInsightsConfigs, ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse + # Creates a new InsightsConfig in a given project and location. + rpc :CreateInsightsConfig, ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::Google::Longrunning::Operation + # Gets details of a single Insight. + rpc :GetInsightsConfig, ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Google::Cloud::Developerconnect::V1::InsightsConfig + # Updates the parameters of a single InsightsConfig. + rpc :UpdateInsightsConfig, ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Google::Longrunning::Operation + # Delete a single Insight. + rpc :DeleteInsightsConfig, ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb b/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb index 36477aafbfa5..7b74b09c71e6 100644 --- a/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb +++ b/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb @@ -21,27 +21,74 @@ module Google module Cloud module DeveloperConnect module V1 + # Message for requesting a list of Users + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListUsersRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListUsersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Users + # @!attribute [rw] users + # @return [::Array<::Google::Cloud::DeveloperConnect::V1::User>] + # The list of Users + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListUsersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Message describing Connection object # @!attribute [rw] github_config # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig] # Configuration for connections to github.com. # - # Note: The following fields are mutually exclusive: `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`. 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: `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] github_enterprise_config # @return [::Google::Cloud::DeveloperConnect::V1::GitHubEnterpriseConfig] # Configuration for connections to an instance of GitHub Enterprise. # - # Note: The following fields are mutually exclusive: `github_enterprise_config`, `github_config`, `gitlab_config`, `gitlab_enterprise_config`. 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: `github_enterprise_config`, `github_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] gitlab_config # @return [::Google::Cloud::DeveloperConnect::V1::GitLabConfig] # Configuration for connections to gitlab.com. # - # Note: The following fields are mutually exclusive: `gitlab_config`, `github_config`, `github_enterprise_config`, `gitlab_enterprise_config`. 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: `gitlab_config`, `github_config`, `github_enterprise_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] gitlab_enterprise_config # @return [::Google::Cloud::DeveloperConnect::V1::GitLabEnterpriseConfig] # Configuration for connections to an instance of GitLab Enterprise. # - # Note: The following fields are mutually exclusive: `gitlab_enterprise_config`, `github_config`, `github_enterprise_config`, `gitlab_config`. 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: `gitlab_enterprise_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bitbucket_data_center_config + # @return [::Google::Cloud::DeveloperConnect::V1::BitbucketDataCenterConfig] + # Configuration for connections to an instance of Bitbucket Data Center. + # + # Note: The following fields are mutually exclusive: `bitbucket_data_center_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bitbucket_cloud_config + # @return [::Google::Cloud::DeveloperConnect::V1::BitbucketCloudConfig] + # Configuration for connections to an instance of Bitbucket Clouds. + # + # Note: The following fields are mutually exclusive: `bitbucket_cloud_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] name # @return [::String] # Identifier. The resource name of the connection, in the format @@ -80,12 +127,16 @@ module V1 # client has an up-to-date value before proceeding. # @!attribute [r] uid # @return [::String] - # Output only. A system-assigned unique identifier for a the - # GitRepositoryLink. + # Output only. A system-assigned unique identifier for the Connection. # @!attribute [rw] crypto_key_config # @return [::Google::Cloud::DeveloperConnect::V1::CryptoKeyConfig] # Optional. The crypto key configuration. This field is used by the # Customer-Managed Encryption Keys (CMEK) feature. + # @!attribute [rw] git_proxy_config + # @return [::Google::Cloud::DeveloperConnect::V1::GitProxyConfig] + # Optional. Configuration for the git proxy feature. Enabling the git proxy + # allows clients to perform git operations on the repositories linked in the + # connection. class Connection include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -121,6 +172,16 @@ class CryptoKeyConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # The git proxy configuration. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Setting this to true allows the git proxy to be used for + # performing git operations on the repositories linked in the connection. + class GitProxyConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Describes stage and necessary actions to be taken by the # user to complete the installation. Used for GitHub and GitHub Enterprise # based connections. @@ -342,6 +403,71 @@ class GitLabEnterpriseConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for connections to an instance of Bitbucket Data Center. + # @!attribute [rw] host_uri + # @return [::String] + # Required. The URI of the Bitbucket Data Center host this connection is for. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. Immutable. SecretManager resource containing the webhook secret + # used to verify webhook events, formatted as + # `projects/*/secrets/*/versions/*`. This is used to validate webhooks. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. An http access token with the minimum `Repository read` access. + # It's recommended to use a system account to generate the credentials. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. An http access token with the minimum `Repository admin` scope + # access. This is needed to create webhooks. It's recommended to use a system + # account to generate these credentials. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] + # Optional. Configuration for using Service Directory to privately connect to + # a Bitbucket Data Center instance. This should only be set if the Bitbucket + # Data Center is hosted on-premises and not reachable by public internet. If + # this field is left empty, calls to the Bitbucket Data Center will be made + # over the public internet. + # @!attribute [rw] ssl_ca_certificate + # @return [::String] + # Optional. SSL certificate authority to trust when making requests to + # Bitbucket Data Center. + # @!attribute [r] server_version + # @return [::String] + # Output only. Version of the Bitbucket Data Center server running on the + # `host_uri`. + class BitbucketDataCenterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to an instance of Bitbucket Cloud. + # @!attribute [rw] workspace + # @return [::String] + # Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud + # Platform. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. Immutable. SecretManager resource containing the webhook secret + # used to verify webhook events, formatted as + # `projects/*/secrets/*/versions/*`. This is used to validate and create + # webhooks. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. An access token with the minimum `repository` access. + # It can either be a workspace, project or repository access token. + # It's recommended to use a system account to generate the credentials. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. An access token with the minimum `repository`, `pullrequest` and + # `webhook` scope access. It can either be a workspace, project or repository + # access token. This is needed to create webhooks. It's recommended to use a + # system account to generate these credentials. + class BitbucketCloudConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Message for requesting list of Connections # @!attribute [rw] parent # @return [::String] @@ -496,6 +622,193 @@ class DeleteConnectionRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Message for requesting list of AccountConnectors + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListAccountConnectorsRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListAccountConnectorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing AccountConnectors + # @!attribute [rw] account_connectors + # @return [::Array<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # The list of AccountConnectors + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAccountConnectorsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a AccountConnector + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetAccountConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] parent + # @return [::String] + # Required. Location resource name as the account_connector’s parent. + # @!attribute [rw] account_connector_id + # @return [::String] + # Required. The ID to use for the AccountConnector, which will become the + # final component of the AccountConnector's resource name. Its format should + # adhere to https://google.aip.dev/122#resource-id-segments Names must be + # unique per-project per-location. + # @!attribute [rw] account_connector + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # Required. The AccountConnector to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class CreateAccountConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a AccountConnector + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be updated. + # @!attribute [rw] account_connector + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # Required. The AccountConnector to update. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the accountConnector is not found a new + # accountConnector will be created. In this situation `update_mask` is + # ignored. The creation will succeed only if the input accountConnector has + # all the necessary + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class UpdateAccountConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a AccountConnector + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the AccountConnectorn. + # If an etag is provided and does not match the current etag of the + # AccountConnector, deletion will be blocked and an ABORTED error will be + # returned. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any Users from this AccountConnector will also + # be deleted. (Otherwise, the request will only work if the AccountConnector + # has no Users.) + class DeleteAccountConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a User + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class DeleteUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Represents the metadata of the long-running operation. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] @@ -528,6 +841,65 @@ class OperationMetadata extend ::Google::Protobuf::MessageExts::ClassMethods end + # Message for fetching a User of the user themselves. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the AccountConnector resource + class FetchSelfRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a User of the user themselves. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the AccountConnector resource + class DeleteSelfRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for fetching an OAuth access token. + # @!attribute [rw] account_connector + # @return [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + class FetchAccessTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for responding to getting an OAuth access token. + # @!attribute [rw] token + # @return [::String] + # The token content. + # @!attribute [rw] expiration_time + # @return [::Google::Protobuf::Timestamp] + # Expiration timestamp. Can be empty if unknown or non-expiring. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # The scopes of the access token. + # @!attribute [rw] exchange_error + # @return [::Google::Cloud::DeveloperConnect::V1::ExchangeError] + # The error resulted from exchanging OAuth tokens from the service provider. + class FetchAccessTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for representing an error from exchanging OAuth tokens. + # @!attribute [rw] code + # @return [::String] + # https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error + # @!attribute [rw] description + # @return [::String] + # https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - + # error_description + class ExchangeError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Message describing the GitRepositoryLink object # @!attribute [rw] name # @return [::String] @@ -562,11 +934,15 @@ class OperationMetadata # Optional. Allows clients to store small amounts of arbitrary data. # @!attribute [r] uid # @return [::String] - # Output only. A system-assigned unique identifier for a the - # GitRepositoryLink. + # Output only. A system-assigned unique identifier for the GitRepositoryLink. # @!attribute [r] webhook_id # @return [::String] # Output only. External ID of the webhook created for the repository. + # @!attribute [r] git_proxy_uri + # @return [::String] + # Output only. URI to access the linked repository through the Git Proxy. + # This field is only populated if the git proxy is enabled for the + # connection. class GitRepositoryLink include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -873,6 +1249,137 @@ class FetchGitRefsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # AccountConnector encapsulates what a platform administrator needs to + # configure for users to connect to the service providers, which includes, + # among other fields, the OAuth client ID, client secret, and authorization and + # token endpoints. + # @!attribute [rw] provider_oauth_config + # @return [::Google::Cloud::DeveloperConnect::V1::ProviderOAuthConfig] + # Provider OAuth config. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the accountConnector, in the format + # `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the accountConnector was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the accountConnector was updated. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Allows users to store small amounts of arbitrary data. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels as key value pairs + # @!attribute [r] oauth_start_uri + # @return [::String] + # Output only. Start OAuth flow by clicking on this URL. + class AccountConnector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # User represents a user connected to the service providers through + # a AccountConnector. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the user, in the format + # `projects/*/locations/*/accountConnectors/*/users/*`. + # @!attribute [r] display_name + # @return [::String] + # Output only. Developer Connect automatically converts user identity + # to some human readable description, e.g., email address. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the user was created. + # @!attribute [r] last_token_request_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the token was last requested. + class User + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ProviderOAuthConfig is the OAuth config for a provider. + # @!attribute [rw] system_provider_id + # @return [::Google::Cloud::DeveloperConnect::V1::SystemProvider] + # Immutable. Developer Connect provided OAuth. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Required. User selected scopes to apply to the Oauth config + # In the event of changing scopes, user records under AccountConnector will + # be deleted and users will re-auth again. + class ProviderOAuthConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SystemProvider is a list of providers that are owned by Developer Connect. + module SystemProvider + # No system provider specified. + SYSTEM_PROVIDER_UNSPECIFIED = 0 + + # GitHub provider. + # Scopes can be found at + # https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes + GITHUB = 1 + + # GitLab provider. + # Scopes can be found at + # https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes + GITLAB = 2 + + # Google provider. + # Recommended scopes: + # "https://www.googleapis.com/auth/drive.readonly", + # "https://www.googleapis.com/auth/documents.readonly" + GOOGLE = 3 + + # Sentry provider. + # Scopes can be found at + # https://docs.sentry.io/api/permissions/ + SENTRY = 4 + + # Rovo provider. + # Must select the "rovo" scope. + ROVO = 5 + + # New Relic provider. + # No scopes are allowed. + NEW_RELIC = 6 + + # Datastax provider. + # No scopes are allowed. + DATASTAX = 7 + + # Dynatrace provider. + DYNATRACE = 8 + end end end end diff --git a/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb b/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb new file mode 100644 index 000000000000..cf43b8b20420 --- /dev/null +++ b/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb @@ -0,0 +1,353 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Developerconnect + module V1 + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # @!attribute [rw] app_hub_application + # @return [::String] + # Optional. The name of the App Hub Application. + # Format: + # projects/\\{project}/locations/\\{location}/applications/\\{application} + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the InsightsConfig. + # Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insightsConfig} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create timestamp + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update timestamp + # @!attribute [r] runtime_configs + # @return [::Array<::Google::Cloud::Developerconnect::V1::RuntimeConfig>] + # Output only. The runtime configurations where the application is deployed. + # @!attribute [rw] artifact_configs + # @return [::Array<::Google::Cloud::Developerconnect::V1::ArtifactConfig>] + # Optional. The artifact configurations of the artifacts that are deployed. + # @!attribute [rw] state + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig::State] + # Optional. Output only. The state of the InsightsConfig. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User specified annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with an InsightsConfig. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Reconciling (https://google.aip.dev/128#reconciliation). + # Set to true if the current state of InsightsConfig does not match the + # user's intended state, and the service is actively updating the resource to + # reconcile them. This can happen due to user-triggered updates or + # system actions like failover or maintenance. + # @!attribute [r] errors + # @return [::Array<::Google::Rpc::Status>] + # Output only. Any errors that occurred while setting up the InsightsConfig. + # Each error will be in the format: `field_name: error_message`, e.g. + # GetAppHubApplication: Permission denied while getting App Hub + # application. Please grant permissions to the P4SA. + class InsightsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the InsightsConfig. + module State + # No state specified. + STATE_UNSPECIFIED = 0 + + # The InsightsConfig is pending application discovery/runtime discovery. + PENDING = 5 + + # The initial discovery process is complete. + COMPLETE = 3 + + # The InsightsConfig is in an error state. + ERROR = 4 + end + end + + # RuntimeConfig represents the runtimes where the application is + # deployed. + # @!attribute [r] gke_workload + # @return [::Google::Cloud::Developerconnect::V1::GKEWorkload] + # Output only. Google Kubernetes Engine runtime. + # @!attribute [r] app_hub_workload + # @return [::Google::Cloud::Developerconnect::V1::AppHubWorkload] + # Output only. App Hub Workload. + # @!attribute [rw] uri + # @return [::String] + # Required. Immutable. The URI of the runtime configuration. + # For GKE, this is the cluster name. + # For Cloud Run, this is the service name. + # @!attribute [r] state + # @return [::Google::Cloud::Developerconnect::V1::RuntimeConfig::State] + # Output only. The state of the Runtime. + class RuntimeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the runtime in the InsightsConfig. + # Whether the runtime is linked to the InsightsConfig. + module State + # No state specified. + STATE_UNSPECIFIED = 0 + + # The runtime configuration has been linked to the InsightsConfig. + LINKED = 1 + + # The runtime configuration has been unlinked to the InsightsConfig. + UNLINKED = 2 + end + end + + # GKEWorkload represents the Google Kubernetes Engine runtime. + # @!attribute [rw] cluster + # @return [::String] + # Required. Immutable. The name of the GKE cluster. + # Format: + # `projects/{project}/locations/{location}/clusters/{cluster}`. + # @!attribute [r] deployment + # @return [::String] + # Output only. The name of the GKE deployment. + # Format: + # `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`. + class GKEWorkload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AppHubWorkload represents the App Hub Workload. + # @!attribute [r] workload + # @return [::String] + # Required. Output only. Immutable. The name of the App Hub Workload. + # Format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @!attribute [r] criticality + # @return [::String] + # Output only. The criticality of the App Hub Workload. + # @!attribute [r] environment + # @return [::String] + # Output only. The environment of the App Hub Workload. + class AppHubWorkload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The artifact config of the artifact that is deployed. + # @!attribute [rw] google_artifact_registry + # @return [::Google::Cloud::Developerconnect::V1::GoogleArtifactRegistry] + # Optional. Set if the artifact is stored in Artifact regsitry. + # @!attribute [rw] google_artifact_analysis + # @return [::Google::Cloud::Developerconnect::V1::GoogleArtifactAnalysis] + # Optional. Set if the artifact metadata is stored in Artifact analysis. + # @!attribute [rw] uri + # @return [::String] + # Required. Immutable. The URI of the artifact that is deployed. + # e.g. `us-docker.pkg.dev/my-project/my-repo/image`. + # The URI does not include the tag / digest because it captures a lineage of + # artifacts. + class ArtifactConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Google Artifact Analysis configurations. + # @!attribute [rw] project_id + # @return [::String] + # Required. The project id of the project where the provenance is stored. + class GoogleArtifactAnalysis + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Google Artifact Registry configurations. + # @!attribute [rw] project_id + # @return [::String] + # Required. The host project of Artifact Registry. + # @!attribute [rw] artifact_registry_package + # @return [::String] + # Required. Immutable. The name of the artifact registry package. + class GoogleArtifactRegistry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for creating an InsightsConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] insights_config_id + # @return [::String] + # Required. ID of the requesting InsightsConfig. + # @!attribute [rw] insights_config + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # Required. The resource being created. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class CreateInsightsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting an InsightsConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetInsightsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for requesting list of InsightsConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListInsightsConfigsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. See https://google.aip.dev/160 for more + # details. Filter string, adhering to the rules in + # https://google.aip.dev/160. List only InsightsConfigs matching the filter. + # If filter is empty, all InsightsConfigs are listed. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListInsightsConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for response to listing InsightsConfigs. + # @!attribute [rw] insights_configs + # @return [::Array<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # The list of InsightsConfigs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInsightsConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting an InsightsConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class DeleteInsightsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating an InsightsConfig. + # @!attribute [rw] insights_config + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # Required. The resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the insightsConfig is not found a new + # insightsConfig will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input insightsConfig has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class UpdateInsightsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb new file mode 100644 index 000000000000..21ab9f8512dc --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the create_account_connector call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector. +# +def create_account_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new + + # Call the create_account_connector method. + result = client.create_account_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb new file mode 100644 index 000000000000..1d41fae063c4 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_account_connector call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector. +# +def delete_account_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new + + # Call the delete_account_connector method. + result = client.delete_account_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb new file mode 100644 index 000000000000..7be1eb122949 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_self call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#delete_self. +# +def delete_self + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new + + # Call the delete_self method. + result = client.delete_self request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb new file mode 100644 index 000000000000..8ab6c47ddcb1 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_user call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#delete_user. +# +def delete_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new + + # Call the delete_user method. + result = client.delete_user request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb new file mode 100644 index 000000000000..35c79b731259 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_access_token call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token. +# +def fetch_access_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new + + # Call the fetch_access_token method. + result = client.fetch_access_token request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb new file mode 100644 index 000000000000..df8515f2cbb5 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_self call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self. +# +def fetch_self + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new + + # Call the fetch_self method. + result = client.fetch_self request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb new file mode 100644 index 000000000000..b09e8ed04984 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the get_account_connector call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector. +# +def get_account_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new + + # Call the get_account_connector method. + result = client.get_account_connector request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb new file mode 100644 index 000000000000..300f4b8b66db --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_account_connectors call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors. +# +def list_account_connectors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new + + # Call the list_account_connectors method. + result = client.list_account_connectors 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::DeveloperConnect::V1::AccountConnector. + p item + end +end +# [END developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb new file mode 100644 index 000000000000..77091ea79af3 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_ListUsers_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_users call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#list_users. +# +def list_users + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new + + # Call the list_users method. + result = client.list_users 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::DeveloperConnect::V1::User. + p item + end +end +# [END developerconnect_v1_generated_DeveloperConnect_ListUsers_sync] diff --git a/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb new file mode 100644 index 000000000000..1aabc01e49b4 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the update_account_connector call in the DeveloperConnect 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::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector. +# +def update_account_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new + + # Call the update_account_connector method. + result = client.update_account_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync] diff --git a/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb b/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb new file mode 100644 index 000000000000..19855f450d3a --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the create_insights_config call in the InsightsConfigService 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::Developerconnect::V1::InsightsConfigService::Client#create_insights_config. +# +def create_insights_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new + + # Call the create_insights_config method. + result = client.create_insights_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync] diff --git a/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb b/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb new file mode 100644 index 000000000000..df8caf385c4d --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_insights_config call in the InsightsConfigService 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::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config. +# +def delete_insights_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new + + # Call the delete_insights_config method. + result = client.delete_insights_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync] diff --git a/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb b/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb new file mode 100644 index 000000000000..363f2545e76a --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the get_insights_config call in the InsightsConfigService 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::Developerconnect::V1::InsightsConfigService::Client#get_insights_config. +# +def get_insights_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new + + # Call the get_insights_config method. + result = client.get_insights_config request + + # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. + p result +end +# [END developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync] diff --git a/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb b/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb new file mode 100644 index 000000000000..b3efe7ea6355 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_insights_configs call in the InsightsConfigService 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::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs. +# +def list_insights_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new + + # Call the list_insights_configs method. + result = client.list_insights_configs 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::Developerconnect::V1::InsightsConfig. + p item + end +end +# [END developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync] diff --git a/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb b/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb new file mode 100644 index 000000000000..1b2cc6d01e08 --- /dev/null +++ b/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the update_insights_config call in the InsightsConfigService 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::Developerconnect::V1::InsightsConfigService::Client#update_insights_config. +# +def update_insights_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new + + # Call the update_insights_config method. + result = client.update_insights_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync] diff --git a/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json b/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json index accd6edecbc9..4959d807c54b 100644 --- a/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json +++ b/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json @@ -570,6 +570,606 @@ "type": "FULL" } ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync", + "title": "Snippet for the list_account_connectors call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors.", + "file": "developer_connect/list_account_connectors.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_connectors", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "ListAccountConnectors", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListAccountConnectors", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync", + "title": "Snippet for the get_account_connector call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector.", + "file": "developer_connect/get_account_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_connector", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::AccountConnector", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "GetAccountConnector", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.GetAccountConnector", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync", + "title": "Snippet for the create_account_connector call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector.", + "file": "developer_connect/create_account_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_account_connector", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "CreateAccountConnector", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.CreateAccountConnector", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync", + "title": "Snippet for the update_account_connector call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector.", + "file": "developer_connect/update_account_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account_connector", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "UpdateAccountConnector", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.UpdateAccountConnector", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync", + "title": "Snippet for the delete_account_connector call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector.", + "file": "developer_connect/delete_account_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_account_connector", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "DeleteAccountConnector", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteAccountConnector", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync", + "title": "Snippet for the fetch_access_token call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token.", + "file": "developer_connect/fetch_access_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_access_token", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchAccessToken", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchAccessToken", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListUsers_sync", + "title": "Snippet for the list_users call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_users.", + "file": "developer_connect/list_users.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_users", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_users", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::ListUsersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::ListUsersResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "ListUsers", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListUsers", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync", + "title": "Snippet for the delete_user call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_user.", + "file": "developer_connect/delete_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_user", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_user", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "DeleteUser", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteUser", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync", + "title": "Snippet for the fetch_self call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self.", + "file": "developer_connect/fetch_self.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_self", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::User", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchSelf", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchSelf", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync", + "title": "Snippet for the delete_self call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_self.", + "file": "developer_connect/delete_self.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_self", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_self", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "DeleteSelf", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteSelf", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync", + "title": "Snippet for the list_insights_configs call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs.", + "file": "insights_config_service/list_insights_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_insights_configs", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "ListInsightsConfigs", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.ListInsightsConfigs", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync", + "title": "Snippet for the create_insights_config call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#create_insights_config.", + "file": "insights_config_service/create_insights_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_insights_config", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#create_insights_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "CreateInsightsConfig", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.CreateInsightsConfig", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync", + "title": "Snippet for the get_insights_config call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_insights_config.", + "file": "insights_config_service/get_insights_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_insights_config", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_insights_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Developerconnect::V1::InsightsConfig", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "GetInsightsConfig", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.GetInsightsConfig", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync", + "title": "Snippet for the update_insights_config call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#update_insights_config.", + "file": "insights_config_service/update_insights_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_insights_config", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#update_insights_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "UpdateInsightsConfig", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.UpdateInsightsConfig", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync", + "title": "Snippet for the delete_insights_config call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config.", + "file": "insights_config_service/delete_insights_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_insights_config", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "DeleteInsightsConfig", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.DeleteInsightsConfig", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb index a0b93fe3dba7..956117691ccb 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb @@ -41,6 +41,18 @@ def logger end end + def test_account_connector_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_connector_path project: "value0", location: "value1", account_connector: "value2" + assert_equal "projects/value0/locations/value1/accountConnectors/value2", path + end + end + def test_connection_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -112,4 +124,16 @@ def test_service_path assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path end end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path project: "value0", location: "value1", account_connector: "value2", user: "value3" + assert_equal "projects/value0/locations/value1/accountConnectors/value2/users/value3", path + end + end end diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb index 5f45a03f6bd3..a27e42d603a5 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb @@ -865,6 +865,569 @@ def test_fetch_git_refs end end + def test_list_account_connectors + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_account_connectors_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_account_connectors_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_connectors_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_account_connectors parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_account_connectors ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_account_connectors(::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_connectors_client_stub.call_count + end + end + end + + def test_get_account_connector + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_connector_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_get_account_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_connector({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account_connector name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_connector ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_connector({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_connector(::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_connector_client_stub.call_count + end + end + end + + def test_create_account_connector + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account_connector_id = "hello world" + account_connector = {} + request_id = "hello world" + validate_only = true + + create_account_connector_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_create_account_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_account_connector parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_account_connector ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_account_connector(::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_account_connector_client_stub.call_count + end + end + end + + def test_update_account_connector + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + account_connector = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_account_connector_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_update_account_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account_connector update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account_connector ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account_connector(::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_connector_client_stub.call_count + end + end + end + + def test_delete_account_connector + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_account_connector_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_account_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_account_connector name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_account_connector ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_account_connector(::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_account_connector_client_stub.call_count + end + end + end + + def test_fetch_access_token + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_connector = "hello world" + + fetch_access_token_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_access_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_access_token_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_access_token({ account_connector: account_connector }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_access_token account_connector: account_connector do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_access_token ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_access_token({ account_connector: account_connector }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_access_token(::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_access_token_client_stub.call_count + end + end + end + + def test_list_users + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_users_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_users_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_users parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_users ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_users(::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_users_client_stub.call_count + end + end + end + + def test_delete_user + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_user_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_user name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_user ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_user(::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_count + end + end + end + + def test_fetch_self + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + fetch_self_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_self_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_self_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_self({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_self name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_self ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_self({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_self(::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_self_client_stub.call_count + end + end + end + + def test_delete_self + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_self_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::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_self_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_self_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_self({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_self name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_self ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_self({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_self(::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_self_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb index c7efffd49f24..7539a8e8bf15 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb @@ -978,6 +978,667 @@ def test_fetch_git_refs end end + def test_list_account_connectors + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_account_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_connectors, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_connectors_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_account_connectors parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_account_connectors ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_account_connectors(::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_account_connectors_client_stub.call_rpc_count + end + end + + def test_get_account_connector + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.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" + + get_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_connector, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_connector({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account_connector name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_connector ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_connector({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_connector(::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.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, get_account_connector_client_stub.call_rpc_count + end + end + + def test_create_account_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + account_connector_id = "hello world" + account_connector = {} + request_id = "hello world" + validate_only = true + + create_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_account_connector, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["account_connector_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::AccountConnector), request["account_connector"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_account_connector parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_account_connector ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_account_connector(::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_account_connector_client_stub.call_rpc_count + end + end + + def test_update_account_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + account_connector = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account_connector, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::AccountConnector), request["account_connector"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account_connector update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account_connector ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_account_connector(::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_account_connector_client_stub.call_rpc_count + end + end + + def test_delete_account_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_account_connector, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_account_connector name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_account_connector ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_account_connector(::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_account_connector_client_stub.call_rpc_count + end + end + + def test_fetch_access_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.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. + account_connector = "hello world" + + fetch_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_access_token, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, request + assert_equal "hello world", request["account_connector"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_access_token_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_access_token({ account_connector: account_connector }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_access_token account_connector: account_connector do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_access_token ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_access_token({ account_connector: account_connector }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_access_token(::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_access_token_client_stub.call_rpc_count + end + end + + def test_list_users + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_users, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_users_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_users parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_users ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_users(::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_users_client_stub.call_rpc_count + end + end + + def test_delete_user + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_user, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_user name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_user ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_user(::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_rpc_count + end + end + + def test_fetch_self + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::User.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" + + fetch_self_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_self, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_self_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_self({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_self name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_self ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_self({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_self(::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.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, fetch_self_client_stub.call_rpc_count + end + end + + def test_delete_self + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_self_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_self, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_self_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_self({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_self name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_self ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_self({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_self(::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_self_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb new file mode 100644 index 000000000000..5a599248750e --- /dev/null +++ b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developerconnect/v1/insights_config_pb" +require "google/cloud/developerconnect/v1/insights_config_services_pb" +require "google/cloud/developerconnect/v1/insights_config_service" + +class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::Developerconnect::V1::InsightsConfigService::Operations.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::Developerconnect::V1::InsightsConfigService::Operations::Configuration, config + end +end diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb new file mode 100644 index 000000000000..74c5831d3177 --- /dev/null +++ b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developerconnect/v1/insights_config_service" + +class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::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_insights_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.insights_config_path project: "value0", location: "value1", insights_config: "value2" + assert_equal "projects/value0/locations/value1/insightsConfigs/value2", path + 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::Developerconnect::V1::InsightsConfigService::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 +end diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb new file mode 100644 index 000000000000..92b7cc84be1f --- /dev/null +++ b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb @@ -0,0 +1,382 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developerconnect/v1/insights_config_pb" +require "google/cloud/developerconnect/v1/insights_config_service/rest" + + +class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::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_list_insights_configs + # Create test objects. + client_result = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_insights_configs_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::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_list_insights_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_insights_configs_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_insights_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_insights_configs ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_insights_configs(::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_insights_configs_client_stub.call_count + end + end + end + + def test_create_insights_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + insights_config_id = "hello world" + insights_config = {} + validate_only = true + + create_insights_config_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::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_create_insights_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_insights_config parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_insights_config ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_insights_config(::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_insights_config_client_stub.call_count + end + end + end + + def test_get_insights_config + # Create test objects. + client_result = ::Google::Cloud::Developerconnect::V1::InsightsConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_insights_config_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::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_get_insights_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_insights_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_insights_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_insights_config ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_insights_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_insights_config(::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_insights_config_client_stub.call_count + end + end + end + + def test_update_insights_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + insights_config = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_insights_config_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::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_update_insights_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_insights_config insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_insights_config ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_insights_config(::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_insights_config_client_stub.call_count + end + end + end + + def test_delete_insights_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_insights_config_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::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_delete_insights_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_insights_config name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_insights_config ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_insights_config(::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_insights_config_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::Developerconnect::V1::InsightsConfigService::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::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb new file mode 100644 index 000000000000..8f323dfa601f --- /dev/null +++ b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb @@ -0,0 +1,435 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/developerconnect/v1/insights_config_pb" +require "google/cloud/developerconnect/v1/insights_config_services_pb" +require "google/cloud/developerconnect/v1/insights_config_service" + +class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::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_list_insights_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_insights_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_insights_configs, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_insights_configs_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_insights_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_insights_configs ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_insights_configs(::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_insights_configs_client_stub.call_rpc_count + end + end + + def test_create_insights_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + insights_config_id = "hello world" + insights_config = {} + validate_only = true + + create_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_insights_config, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["insights_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Developerconnect::V1::InsightsConfig), request["insights_config"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_insights_config parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_insights_config ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_insights_config(::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_insights_config_client_stub.call_rpc_count + end + end + + def test_get_insights_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Developerconnect::V1::InsightsConfig.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" + + get_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_insights_config, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_insights_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_insights_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_insights_config ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_insights_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_insights_config(::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.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, get_insights_config_client_stub.call_rpc_count + end + end + + def test_update_insights_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + insights_config = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_insights_config, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Developerconnect::V1::InsightsConfig), request["insights_config"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_insights_config insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_insights_config ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_insights_config(::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_insights_config_client_stub.call_rpc_count + end + end + + def test_delete_insights_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_insights_config, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_insights_config name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_insights_config ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_insights_config(::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_insights_config_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::Developerconnect::V1::InsightsConfigService::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::Developerconnect::V1::InsightsConfigService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations, client.operations_client + end +end From 90b0641f3c6e666c8bfc9d6e00147dbd8bff7c9a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:36:31 -0700 Subject: [PATCH 129/457] feat(developer_connect): Support for the InsightsConfigService (#30537) --- .../lib/google/cloud/developer_connect.rb | 78 +++++++++++++++++++ .../cloud/developer_connect/client_test.rb | 21 +++++ 2 files changed, 99 insertions(+) diff --git a/google-cloud-developer_connect/lib/google/cloud/developer_connect.rb b/google-cloud-developer_connect/lib/google/cloud/developer_connect.rb index f76ffafb0270..3d39a0a672f3 100644 --- a/google-cloud-developer_connect/lib/google/cloud/developer_connect.rb +++ b/google-cloud-developer_connect/lib/google/cloud/developer_connect.rb @@ -115,6 +115,84 @@ def self.developer_connect_available? version: :v1, transport: :grpc false end + ## + # Create a new client object for InsightsConfigService. + # + # By default, this returns an instance of + # [Google::Cloud::DeveloperConnect::V1::InsightsConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-developer_connect-v1/latest/Google-Cloud-DeveloperConnect-V1-InsightsConfigService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the InsightsConfigService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the InsightsConfigService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::DeveloperConnect.insights_config_service_available?}. + # + # ## About InsightsConfigService + # + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.insights_config_service version: :v1, transport: :grpc, &block + require "google/cloud/developer_connect/#{version.to_s.downcase}" + + package_name = Google::Cloud::DeveloperConnect + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::DeveloperConnect.const_get(package_name).const_get(:InsightsConfigService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the InsightsConfigService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DeveloperConnect.insights_config_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the InsightsConfigService service, + # or if the versioned client gem needs an update to support the InsightsConfigService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.insights_config_service_available? version: :v1, transport: :grpc + require "google/cloud/developer_connect/#{version.to_s.downcase}" + package_name = Google::Cloud::DeveloperConnect + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::DeveloperConnect.const_get package_name + return false unless service_module.const_defined? :InsightsConfigService + service_module = service_module.const_get :InsightsConfigService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Configure the google-cloud-developer_connect library. # diff --git a/google-cloud-developer_connect/test/google/cloud/developer_connect/client_test.rb b/google-cloud-developer_connect/test/google/cloud/developer_connect/client_test.rb index 76b6943804d0..dd841b802407 100644 --- a/google-cloud-developer_connect/test/google/cloud/developer_connect/client_test.rb +++ b/google-cloud-developer_connect/test/google/cloud/developer_connect/client_test.rb @@ -61,4 +61,25 @@ def test_developer_connect_rest assert_kind_of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client, client end end + + def test_insights_config_service_grpc + skip unless Google::Cloud::DeveloperConnect.insights_config_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::DeveloperConnect.insights_config_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::DeveloperConnect::V1::InsightsConfigService::Client, client + end + end + + def test_insights_config_service_rest + skip unless Google::Cloud::DeveloperConnect.insights_config_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::DeveloperConnect.insights_config_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::DeveloperConnect::V1::InsightsConfigService::Rest::Client, client + end + end end From 4d5f5cbe40b49a9a94f576768b192b53d79fc677 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 09:58:44 -0700 Subject: [PATCH 130/457] test(multi): Update google-style requirement (#30553) --- google-shopping-merchant-accounts-v1beta/Gemfile | 2 +- google-shopping-merchant-conversions-v1beta/Gemfile | 2 +- google-shopping-merchant-data_sources-v1beta/Gemfile | 2 +- google-shopping-merchant-inventories-v1beta/Gemfile | 2 +- google-shopping-merchant-lfp-v1beta/Gemfile | 2 +- google-shopping-merchant-notifications-v1beta/Gemfile | 2 +- google-shopping-merchant-order_tracking-v1beta/Gemfile | 2 +- google-shopping-merchant-products-v1beta/Gemfile | 2 +- google-shopping-merchant-promotions-v1beta/Gemfile | 2 +- google-shopping-merchant-quota-v1beta/Gemfile | 2 +- google-shopping-merchant-reports-v1beta/Gemfile | 2 +- google-shopping-merchant-reviews-v1beta/Gemfile | 2 +- grafeas-v1/Gemfile | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/google-shopping-merchant-accounts-v1beta/Gemfile b/google-shopping-merchant-accounts-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-accounts-v1beta/Gemfile +++ b/google-shopping-merchant-accounts-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-conversions-v1beta/Gemfile b/google-shopping-merchant-conversions-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-conversions-v1beta/Gemfile +++ b/google-shopping-merchant-conversions-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-data_sources-v1beta/Gemfile b/google-shopping-merchant-data_sources-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-data_sources-v1beta/Gemfile +++ b/google-shopping-merchant-data_sources-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-inventories-v1beta/Gemfile b/google-shopping-merchant-inventories-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-inventories-v1beta/Gemfile +++ b/google-shopping-merchant-inventories-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-lfp-v1beta/Gemfile b/google-shopping-merchant-lfp-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-lfp-v1beta/Gemfile +++ b/google-shopping-merchant-lfp-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-notifications-v1beta/Gemfile b/google-shopping-merchant-notifications-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-notifications-v1beta/Gemfile +++ b/google-shopping-merchant-notifications-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-order_tracking-v1beta/Gemfile b/google-shopping-merchant-order_tracking-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-order_tracking-v1beta/Gemfile +++ b/google-shopping-merchant-order_tracking-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-products-v1beta/Gemfile b/google-shopping-merchant-products-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-products-v1beta/Gemfile +++ b/google-shopping-merchant-products-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-promotions-v1beta/Gemfile b/google-shopping-merchant-promotions-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-promotions-v1beta/Gemfile +++ b/google-shopping-merchant-promotions-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-quota-v1beta/Gemfile b/google-shopping-merchant-quota-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-quota-v1beta/Gemfile +++ b/google-shopping-merchant-quota-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-reports-v1beta/Gemfile b/google-shopping-merchant-reports-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-reports-v1beta/Gemfile +++ b/google-shopping-merchant-reports-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-reviews-v1beta/Gemfile b/google-shopping-merchant-reviews-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-reviews-v1beta/Gemfile +++ b/google-shopping-merchant-reviews-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/grafeas-v1/Gemfile b/grafeas-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/grafeas-v1/Gemfile +++ b/grafeas-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From a48f6cc1f15174c315c3f27715e896d574683dea Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 09:59:15 -0700 Subject: [PATCH 131/457] test(multi): Update google-style requirement (#30552) --- google-cloud-web_risk-v1/Gemfile | 2 +- google-cloud-web_risk-v1beta1/Gemfile | 2 +- google-cloud-web_security_scanner-v1/Gemfile | 2 +- google-cloud-web_security_scanner-v1beta/Gemfile | 2 +- google-cloud-workflows-executions-v1/Gemfile | 2 +- google-cloud-workflows-executions-v1beta/Gemfile | 2 +- google-cloud-workflows-v1/Gemfile | 2 +- google-cloud-workflows-v1beta/Gemfile | 2 +- google-cloud-workstations-v1/Gemfile | 2 +- google-cloud-workstations-v1beta/Gemfile | 2 +- google-iam-credentials-v1/Gemfile | 2 +- google-iam-v1/Gemfile | 2 +- google-iam-v1beta/Gemfile | 2 +- google-iam-v2/Gemfile | 2 +- google-iam-v3/Gemfile | 2 +- google-iam-v3beta/Gemfile | 2 +- google-identity-access_context_manager-v1/Gemfile | 2 +- google-maps-fleet_engine-delivery-v1/Gemfile | 2 +- google-maps-fleet_engine-v1/Gemfile | 2 +- google-shopping-css-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-web_risk-v1/Gemfile b/google-cloud-web_risk-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-web_risk-v1/Gemfile +++ b/google-cloud-web_risk-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-web_risk-v1beta1/Gemfile b/google-cloud-web_risk-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-web_risk-v1beta1/Gemfile +++ b/google-cloud-web_risk-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-web_security_scanner-v1/Gemfile b/google-cloud-web_security_scanner-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-web_security_scanner-v1/Gemfile +++ b/google-cloud-web_security_scanner-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-web_security_scanner-v1beta/Gemfile b/google-cloud-web_security_scanner-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-web_security_scanner-v1beta/Gemfile +++ b/google-cloud-web_security_scanner-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-workflows-executions-v1/Gemfile b/google-cloud-workflows-executions-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-workflows-executions-v1/Gemfile +++ b/google-cloud-workflows-executions-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-workflows-executions-v1beta/Gemfile b/google-cloud-workflows-executions-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-workflows-executions-v1beta/Gemfile +++ b/google-cloud-workflows-executions-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-workflows-v1/Gemfile b/google-cloud-workflows-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-workflows-v1/Gemfile +++ b/google-cloud-workflows-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-workflows-v1beta/Gemfile b/google-cloud-workflows-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-workflows-v1beta/Gemfile +++ b/google-cloud-workflows-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-workstations-v1/Gemfile b/google-cloud-workstations-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-workstations-v1/Gemfile +++ b/google-cloud-workstations-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-workstations-v1beta/Gemfile b/google-cloud-workstations-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-workstations-v1beta/Gemfile +++ b/google-cloud-workstations-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-iam-credentials-v1/Gemfile b/google-iam-credentials-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-iam-credentials-v1/Gemfile +++ b/google-iam-credentials-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-iam-v1/Gemfile b/google-iam-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-iam-v1/Gemfile +++ b/google-iam-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-iam-v1beta/Gemfile b/google-iam-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-iam-v1beta/Gemfile +++ b/google-iam-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-iam-v2/Gemfile b/google-iam-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-iam-v2/Gemfile +++ b/google-iam-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-iam-v3/Gemfile b/google-iam-v3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-iam-v3/Gemfile +++ b/google-iam-v3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-iam-v3beta/Gemfile b/google-iam-v3beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-iam-v3beta/Gemfile +++ b/google-iam-v3beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-identity-access_context_manager-v1/Gemfile b/google-identity-access_context_manager-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-identity-access_context_manager-v1/Gemfile +++ b/google-identity-access_context_manager-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-maps-fleet_engine-delivery-v1/Gemfile b/google-maps-fleet_engine-delivery-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-maps-fleet_engine-delivery-v1/Gemfile +++ b/google-maps-fleet_engine-delivery-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-maps-fleet_engine-v1/Gemfile b/google-maps-fleet_engine-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-maps-fleet_engine-v1/Gemfile +++ b/google-maps-fleet_engine-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-css-v1/Gemfile b/google-shopping-css-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-css-v1/Gemfile +++ b/google-shopping-css-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From 2e26c06779967722314d5af30243bffe37f356c6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 09:59:47 -0700 Subject: [PATCH 132/457] chore(multi): Update google-style requirement (#30551) --- google-cloud-text_to_speech-v1beta1/Gemfile | 2 +- google-cloud-tpu-v1/Gemfile | 2 +- google-cloud-trace-v1/Gemfile | 2 +- google-cloud-trace-v2/Gemfile | 2 +- google-cloud-translate-v3/Gemfile | 2 +- google-cloud-video-live_stream-v1/Gemfile | 2 +- google-cloud-video-stitcher-v1/Gemfile | 2 +- google-cloud-video-transcoder-v1/Gemfile | 2 +- google-cloud-video_intelligence-v1/Gemfile | 2 +- google-cloud-video_intelligence-v1beta2/Gemfile | 2 +- google-cloud-video_intelligence-v1p1beta1/Gemfile | 2 +- google-cloud-video_intelligence-v1p2beta1/Gemfile | 2 +- google-cloud-video_intelligence-v1p3beta1/Gemfile | 2 +- google-cloud-vision-v1/Gemfile | 2 +- google-cloud-vision-v1p3beta1/Gemfile | 2 +- google-cloud-vision-v1p4beta1/Gemfile | 2 +- google-cloud-vision_ai-v1/Gemfile | 2 +- google-cloud-vm_migration-v1/Gemfile | 2 +- google-cloud-vmware_engine-v1/Gemfile | 2 +- google-cloud-vpc_access-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-text_to_speech-v1beta1/Gemfile b/google-cloud-text_to_speech-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-text_to_speech-v1beta1/Gemfile +++ b/google-cloud-text_to_speech-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-tpu-v1/Gemfile b/google-cloud-tpu-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-tpu-v1/Gemfile +++ b/google-cloud-tpu-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-trace-v1/Gemfile b/google-cloud-trace-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-trace-v1/Gemfile +++ b/google-cloud-trace-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-trace-v2/Gemfile b/google-cloud-trace-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-trace-v2/Gemfile +++ b/google-cloud-trace-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-translate-v3/Gemfile b/google-cloud-translate-v3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-translate-v3/Gemfile +++ b/google-cloud-translate-v3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-video-live_stream-v1/Gemfile b/google-cloud-video-live_stream-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-video-live_stream-v1/Gemfile +++ b/google-cloud-video-live_stream-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-video-stitcher-v1/Gemfile b/google-cloud-video-stitcher-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-video-stitcher-v1/Gemfile +++ b/google-cloud-video-stitcher-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-video-transcoder-v1/Gemfile b/google-cloud-video-transcoder-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-video-transcoder-v1/Gemfile +++ b/google-cloud-video-transcoder-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-video_intelligence-v1/Gemfile b/google-cloud-video_intelligence-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-video_intelligence-v1/Gemfile +++ b/google-cloud-video_intelligence-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-video_intelligence-v1beta2/Gemfile b/google-cloud-video_intelligence-v1beta2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-video_intelligence-v1beta2/Gemfile +++ b/google-cloud-video_intelligence-v1beta2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-video_intelligence-v1p1beta1/Gemfile b/google-cloud-video_intelligence-v1p1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-video_intelligence-v1p1beta1/Gemfile +++ b/google-cloud-video_intelligence-v1p1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-video_intelligence-v1p2beta1/Gemfile b/google-cloud-video_intelligence-v1p2beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-video_intelligence-v1p2beta1/Gemfile +++ b/google-cloud-video_intelligence-v1p2beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-video_intelligence-v1p3beta1/Gemfile b/google-cloud-video_intelligence-v1p3beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-video_intelligence-v1p3beta1/Gemfile +++ b/google-cloud-video_intelligence-v1p3beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-vision-v1/Gemfile b/google-cloud-vision-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-vision-v1/Gemfile +++ b/google-cloud-vision-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-vision-v1p3beta1/Gemfile b/google-cloud-vision-v1p3beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-vision-v1p3beta1/Gemfile +++ b/google-cloud-vision-v1p3beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-vision-v1p4beta1/Gemfile b/google-cloud-vision-v1p4beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-vision-v1p4beta1/Gemfile +++ b/google-cloud-vision-v1p4beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-vision_ai-v1/Gemfile b/google-cloud-vision_ai-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-vision_ai-v1/Gemfile +++ b/google-cloud-vision_ai-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-vm_migration-v1/Gemfile b/google-cloud-vm_migration-v1/Gemfile index d1825e41a44f..6442df18fa2f 100755 --- a/google-cloud-vm_migration-v1/Gemfile +++ b/google-cloud-vm_migration-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-vmware_engine-v1/Gemfile b/google-cloud-vmware_engine-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-vmware_engine-v1/Gemfile +++ b/google-cloud-vmware_engine-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-vpc_access-v1/Gemfile b/google-cloud-vpc_access-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-vpc_access-v1/Gemfile +++ b/google-cloud-vpc_access-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From 0b65b4c359340e7fb1bfeb1e9db7484be9cbb1d2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:00:14 -0700 Subject: [PATCH 133/457] chore(multi): Update google-style requirement (#30549) --- google-cloud-run-v2/Gemfile | 2 +- google-cloud-scheduler-v1/Gemfile | 2 +- google-cloud-scheduler-v1beta1/Gemfile | 2 +- google-cloud-secret_manager-v1/Gemfile | 2 +- google-cloud-secret_manager-v1beta1/Gemfile | 2 +- google-cloud-secret_manager-v1beta2/Gemfile | 2 +- google-cloud-secure_source_manager-v1/Gemfile | 2 +- google-cloud-security-private_ca-v1/Gemfile | 2 +- google-cloud-security-private_ca-v1beta1/Gemfile | 2 +- google-cloud-security-public_ca-v1/Gemfile | 2 +- google-cloud-security-public_ca-v1beta1/Gemfile | 2 +- google-cloud-security_center-v1/Gemfile | 2 +- google-cloud-security_center-v1p1beta1/Gemfile | 2 +- google-cloud-security_center-v2/Gemfile | 2 +- google-cloud-security_center_management-v1/Gemfile | 2 +- google-cloud-service_control-v1/Gemfile | 2 +- google-cloud-service_directory-v1/Gemfile | 2 +- google-cloud-service_directory-v1beta1/Gemfile | 2 +- google-cloud-service_health-v1/Gemfile | 2 +- google-cloud-service_management-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-run-v2/Gemfile b/google-cloud-run-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-run-v2/Gemfile +++ b/google-cloud-run-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-scheduler-v1/Gemfile b/google-cloud-scheduler-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-scheduler-v1/Gemfile +++ b/google-cloud-scheduler-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-scheduler-v1beta1/Gemfile b/google-cloud-scheduler-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-scheduler-v1beta1/Gemfile +++ b/google-cloud-scheduler-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-secret_manager-v1/Gemfile b/google-cloud-secret_manager-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-secret_manager-v1/Gemfile +++ b/google-cloud-secret_manager-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-secret_manager-v1beta1/Gemfile b/google-cloud-secret_manager-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-secret_manager-v1beta1/Gemfile +++ b/google-cloud-secret_manager-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-secret_manager-v1beta2/Gemfile b/google-cloud-secret_manager-v1beta2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-secret_manager-v1beta2/Gemfile +++ b/google-cloud-secret_manager-v1beta2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-secure_source_manager-v1/Gemfile b/google-cloud-secure_source_manager-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-secure_source_manager-v1/Gemfile +++ b/google-cloud-secure_source_manager-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-security-private_ca-v1/Gemfile b/google-cloud-security-private_ca-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-security-private_ca-v1/Gemfile +++ b/google-cloud-security-private_ca-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-security-private_ca-v1beta1/Gemfile b/google-cloud-security-private_ca-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-security-private_ca-v1beta1/Gemfile +++ b/google-cloud-security-private_ca-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-security-public_ca-v1/Gemfile b/google-cloud-security-public_ca-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-security-public_ca-v1/Gemfile +++ b/google-cloud-security-public_ca-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-security-public_ca-v1beta1/Gemfile b/google-cloud-security-public_ca-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-security-public_ca-v1beta1/Gemfile +++ b/google-cloud-security-public_ca-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-security_center-v1/Gemfile b/google-cloud-security_center-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-security_center-v1/Gemfile +++ b/google-cloud-security_center-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-security_center-v1p1beta1/Gemfile b/google-cloud-security_center-v1p1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-security_center-v1p1beta1/Gemfile +++ b/google-cloud-security_center-v1p1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-security_center-v2/Gemfile b/google-cloud-security_center-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-security_center-v2/Gemfile +++ b/google-cloud-security_center-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-security_center_management-v1/Gemfile b/google-cloud-security_center_management-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-security_center_management-v1/Gemfile +++ b/google-cloud-security_center_management-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-service_control-v1/Gemfile b/google-cloud-service_control-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-service_control-v1/Gemfile +++ b/google-cloud-service_control-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-service_directory-v1/Gemfile b/google-cloud-service_directory-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-service_directory-v1/Gemfile +++ b/google-cloud-service_directory-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-service_directory-v1beta1/Gemfile b/google-cloud-service_directory-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-service_directory-v1beta1/Gemfile +++ b/google-cloud-service_directory-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-service_health-v1/Gemfile b/google-cloud-service_health-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-service_health-v1/Gemfile +++ b/google-cloud-service_health-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-service_management-v1/Gemfile b/google-cloud-service_management-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-service_management-v1/Gemfile +++ b/google-cloud-service_management-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From f1a0a77f6ee8887c736d29e5696de66347f4a838 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:01:20 -0700 Subject: [PATCH 134/457] chore(multi): Update google-style requirement (#30550) --- google-cloud-service_usage-v1/Gemfile | 2 +- google-cloud-shell-v1/Gemfile | 2 +- google-cloud-spanner-admin-database-v1/Gemfile | 2 +- google-cloud-spanner-admin-instance-v1/Gemfile | 2 +- google-cloud-spanner-v1/Gemfile | 2 +- google-cloud-speech-v1/Gemfile | 2 +- google-cloud-speech-v1p1beta1/Gemfile | 2 +- google-cloud-speech-v2/Gemfile | 2 +- google-cloud-storage_batch_operations-v1/Gemfile | 2 +- google-cloud-storage_insights-v1/Gemfile | 2 +- google-cloud-storage_transfer-v1/Gemfile | 2 +- google-cloud-support-v2/Gemfile | 2 +- google-cloud-support-v2beta/Gemfile | 2 +- google-cloud-talent-v4/Gemfile | 2 +- google-cloud-talent-v4beta1/Gemfile | 2 +- google-cloud-tasks-v2/Gemfile | 2 +- google-cloud-tasks-v2beta2/Gemfile | 2 +- google-cloud-tasks-v2beta3/Gemfile | 2 +- google-cloud-telco_automation-v1/Gemfile | 2 +- google-cloud-text_to_speech-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-service_usage-v1/Gemfile b/google-cloud-service_usage-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-service_usage-v1/Gemfile +++ b/google-cloud-service_usage-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-shell-v1/Gemfile b/google-cloud-shell-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-shell-v1/Gemfile +++ b/google-cloud-shell-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-spanner-admin-database-v1/Gemfile b/google-cloud-spanner-admin-database-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-spanner-admin-database-v1/Gemfile +++ b/google-cloud-spanner-admin-database-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-spanner-admin-instance-v1/Gemfile b/google-cloud-spanner-admin-instance-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-spanner-admin-instance-v1/Gemfile +++ b/google-cloud-spanner-admin-instance-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-spanner-v1/Gemfile b/google-cloud-spanner-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-spanner-v1/Gemfile +++ b/google-cloud-spanner-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-speech-v1/Gemfile b/google-cloud-speech-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-speech-v1/Gemfile +++ b/google-cloud-speech-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-speech-v1p1beta1/Gemfile b/google-cloud-speech-v1p1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-speech-v1p1beta1/Gemfile +++ b/google-cloud-speech-v1p1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-speech-v2/Gemfile b/google-cloud-speech-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-speech-v2/Gemfile +++ b/google-cloud-speech-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-storage_batch_operations-v1/Gemfile b/google-cloud-storage_batch_operations-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-storage_batch_operations-v1/Gemfile +++ b/google-cloud-storage_batch_operations-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-storage_insights-v1/Gemfile b/google-cloud-storage_insights-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-storage_insights-v1/Gemfile +++ b/google-cloud-storage_insights-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-storage_transfer-v1/Gemfile b/google-cloud-storage_transfer-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-storage_transfer-v1/Gemfile +++ b/google-cloud-storage_transfer-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-support-v2/Gemfile b/google-cloud-support-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-support-v2/Gemfile +++ b/google-cloud-support-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-support-v2beta/Gemfile b/google-cloud-support-v2beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-support-v2beta/Gemfile +++ b/google-cloud-support-v2beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-talent-v4/Gemfile b/google-cloud-talent-v4/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-talent-v4/Gemfile +++ b/google-cloud-talent-v4/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-talent-v4beta1/Gemfile b/google-cloud-talent-v4beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-talent-v4beta1/Gemfile +++ b/google-cloud-talent-v4beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-tasks-v2/Gemfile b/google-cloud-tasks-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-tasks-v2/Gemfile +++ b/google-cloud-tasks-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-tasks-v2beta2/Gemfile b/google-cloud-tasks-v2beta2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-tasks-v2beta2/Gemfile +++ b/google-cloud-tasks-v2beta2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-tasks-v2beta3/Gemfile b/google-cloud-tasks-v2beta3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-tasks-v2beta3/Gemfile +++ b/google-cloud-tasks-v2beta3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-telco_automation-v1/Gemfile b/google-cloud-telco_automation-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-telco_automation-v1/Gemfile +++ b/google-cloud-telco_automation-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-text_to_speech-v1/Gemfile b/google-cloud-text_to_speech-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-text_to_speech-v1/Gemfile +++ b/google-cloud-text_to_speech-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From f1b8b6b255d812108733a7043831ae773de6f9d4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:01:53 -0700 Subject: [PATCH 135/457] chore(multi): Update google-style requirement (#30547) --- google-cloud-monitoring-v3/Gemfile | 2 +- google-cloud-netapp-v1/Gemfile | 2 +- google-cloud-network_connectivity-v1/Gemfile | 2 +- google-cloud-network_connectivity-v1alpha1/Gemfile | 2 +- google-cloud-network_management-v1/Gemfile | 2 +- google-cloud-network_security-v1beta1/Gemfile | 2 +- google-cloud-network_services-v1/Gemfile | 2 +- google-cloud-notebooks-v1/Gemfile | 2 +- google-cloud-notebooks-v1beta1/Gemfile | 2 +- google-cloud-notebooks-v2/Gemfile | 2 +- google-cloud-optimization-v1/Gemfile | 2 +- google-cloud-oracle_database-v1/Gemfile | 2 +- google-cloud-orchestration-airflow-service-v1/Gemfile | 2 +- google-cloud-org_policy-v2/Gemfile | 2 +- google-cloud-os_config-v1/Gemfile | 2 +- google-cloud-os_config-v1alpha/Gemfile | 2 +- google-cloud-os_login-v1/Gemfile | 2 +- google-cloud-os_login-v1beta/Gemfile | 2 +- google-cloud-parallelstore-v1/Gemfile | 2 +- google-cloud-parallelstore-v1beta/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-monitoring-v3/Gemfile b/google-cloud-monitoring-v3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-monitoring-v3/Gemfile +++ b/google-cloud-monitoring-v3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-netapp-v1/Gemfile b/google-cloud-netapp-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-netapp-v1/Gemfile +++ b/google-cloud-netapp-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-network_connectivity-v1/Gemfile b/google-cloud-network_connectivity-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-network_connectivity-v1/Gemfile +++ b/google-cloud-network_connectivity-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-network_connectivity-v1alpha1/Gemfile b/google-cloud-network_connectivity-v1alpha1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-network_connectivity-v1alpha1/Gemfile +++ b/google-cloud-network_connectivity-v1alpha1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-network_management-v1/Gemfile b/google-cloud-network_management-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-network_management-v1/Gemfile +++ b/google-cloud-network_management-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-network_security-v1beta1/Gemfile b/google-cloud-network_security-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-network_security-v1beta1/Gemfile +++ b/google-cloud-network_security-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-network_services-v1/Gemfile b/google-cloud-network_services-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-network_services-v1/Gemfile +++ b/google-cloud-network_services-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-notebooks-v1/Gemfile b/google-cloud-notebooks-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-notebooks-v1/Gemfile +++ b/google-cloud-notebooks-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-notebooks-v1beta1/Gemfile b/google-cloud-notebooks-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-notebooks-v1beta1/Gemfile +++ b/google-cloud-notebooks-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-notebooks-v2/Gemfile b/google-cloud-notebooks-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-notebooks-v2/Gemfile +++ b/google-cloud-notebooks-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-optimization-v1/Gemfile b/google-cloud-optimization-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-optimization-v1/Gemfile +++ b/google-cloud-optimization-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-oracle_database-v1/Gemfile b/google-cloud-oracle_database-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-oracle_database-v1/Gemfile +++ b/google-cloud-oracle_database-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-orchestration-airflow-service-v1/Gemfile b/google-cloud-orchestration-airflow-service-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-orchestration-airflow-service-v1/Gemfile +++ b/google-cloud-orchestration-airflow-service-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-org_policy-v2/Gemfile b/google-cloud-org_policy-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-org_policy-v2/Gemfile +++ b/google-cloud-org_policy-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-os_config-v1/Gemfile b/google-cloud-os_config-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-os_config-v1/Gemfile +++ b/google-cloud-os_config-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-os_config-v1alpha/Gemfile b/google-cloud-os_config-v1alpha/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-os_config-v1alpha/Gemfile +++ b/google-cloud-os_config-v1alpha/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-os_login-v1/Gemfile b/google-cloud-os_login-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-os_login-v1/Gemfile +++ b/google-cloud-os_login-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-os_login-v1beta/Gemfile b/google-cloud-os_login-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-os_login-v1beta/Gemfile +++ b/google-cloud-os_login-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-parallelstore-v1/Gemfile b/google-cloud-parallelstore-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-parallelstore-v1/Gemfile +++ b/google-cloud-parallelstore-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-parallelstore-v1beta/Gemfile b/google-cloud-parallelstore-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-parallelstore-v1beta/Gemfile +++ b/google-cloud-parallelstore-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From 73326e3f78a8aa4c4efd610742d7444a8b8f9002 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:02:31 -0700 Subject: [PATCH 136/457] chore(multi): Update google-style requirement (#30548) --- google-cloud-parameter_manager-v1/Gemfile | 2 +- google-cloud-phishing_protection-v1beta1/Gemfile | 2 +- google-cloud-policy_simulator-v1/Gemfile | 2 +- google-cloud-policy_troubleshooter-iam-v3/Gemfile | 2 +- google-cloud-policy_troubleshooter-v1/Gemfile | 2 +- google-cloud-private_catalog-v1beta1/Gemfile | 2 +- google-cloud-privileged_access_manager-v1/Gemfile | 2 +- google-cloud-profiler-v2/Gemfile | 2 +- google-cloud-pubsub-v1/Gemfile | 2 +- google-cloud-rapid_migration_assessment-v1/Gemfile | 2 +- google-cloud-recaptcha_enterprise-v1/Gemfile | 2 +- google-cloud-recaptcha_enterprise-v1beta1/Gemfile | 2 +- google-cloud-recommendation_engine-v1beta1/Gemfile | 2 +- google-cloud-recommender-v1/Gemfile | 2 +- google-cloud-redis-cluster-v1/Gemfile | 2 +- google-cloud-redis-cluster-v1beta1/Gemfile | 2 +- google-cloud-redis-v1/Gemfile | 2 +- google-cloud-redis-v1beta1/Gemfile | 2 +- google-cloud-resource_manager-v3/Gemfile | 2 +- google-cloud-retail-v2/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-parameter_manager-v1/Gemfile b/google-cloud-parameter_manager-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-parameter_manager-v1/Gemfile +++ b/google-cloud-parameter_manager-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-phishing_protection-v1beta1/Gemfile b/google-cloud-phishing_protection-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-phishing_protection-v1beta1/Gemfile +++ b/google-cloud-phishing_protection-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-policy_simulator-v1/Gemfile b/google-cloud-policy_simulator-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-policy_simulator-v1/Gemfile +++ b/google-cloud-policy_simulator-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-policy_troubleshooter-iam-v3/Gemfile b/google-cloud-policy_troubleshooter-iam-v3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-policy_troubleshooter-iam-v3/Gemfile +++ b/google-cloud-policy_troubleshooter-iam-v3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-policy_troubleshooter-v1/Gemfile b/google-cloud-policy_troubleshooter-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-policy_troubleshooter-v1/Gemfile +++ b/google-cloud-policy_troubleshooter-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-private_catalog-v1beta1/Gemfile b/google-cloud-private_catalog-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-private_catalog-v1beta1/Gemfile +++ b/google-cloud-private_catalog-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-privileged_access_manager-v1/Gemfile b/google-cloud-privileged_access_manager-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-privileged_access_manager-v1/Gemfile +++ b/google-cloud-privileged_access_manager-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-profiler-v2/Gemfile b/google-cloud-profiler-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-profiler-v2/Gemfile +++ b/google-cloud-profiler-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-pubsub-v1/Gemfile b/google-cloud-pubsub-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-pubsub-v1/Gemfile +++ b/google-cloud-pubsub-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-rapid_migration_assessment-v1/Gemfile b/google-cloud-rapid_migration_assessment-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-rapid_migration_assessment-v1/Gemfile +++ b/google-cloud-rapid_migration_assessment-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-recaptcha_enterprise-v1/Gemfile b/google-cloud-recaptcha_enterprise-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-recaptcha_enterprise-v1/Gemfile +++ b/google-cloud-recaptcha_enterprise-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-recaptcha_enterprise-v1beta1/Gemfile b/google-cloud-recaptcha_enterprise-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-recaptcha_enterprise-v1beta1/Gemfile +++ b/google-cloud-recaptcha_enterprise-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-recommendation_engine-v1beta1/Gemfile b/google-cloud-recommendation_engine-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-recommendation_engine-v1beta1/Gemfile +++ b/google-cloud-recommendation_engine-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-recommender-v1/Gemfile b/google-cloud-recommender-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-recommender-v1/Gemfile +++ b/google-cloud-recommender-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-redis-cluster-v1/Gemfile b/google-cloud-redis-cluster-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-redis-cluster-v1/Gemfile +++ b/google-cloud-redis-cluster-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-redis-cluster-v1beta1/Gemfile b/google-cloud-redis-cluster-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-redis-cluster-v1beta1/Gemfile +++ b/google-cloud-redis-cluster-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-redis-v1/Gemfile b/google-cloud-redis-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-redis-v1/Gemfile +++ b/google-cloud-redis-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-redis-v1beta1/Gemfile b/google-cloud-redis-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-redis-v1beta1/Gemfile +++ b/google-cloud-redis-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-resource_manager-v3/Gemfile b/google-cloud-resource_manager-v3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-resource_manager-v3/Gemfile +++ b/google-cloud-resource_manager-v3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-retail-v2/Gemfile b/google-cloud-retail-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-retail-v2/Gemfile +++ b/google-cloud-retail-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From bd5ca8968bb9e76a84e88e5b9d7df302f5090538 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:02:58 -0700 Subject: [PATCH 137/457] chore(multi): Update google-style requirement (#30546) --- google-cloud-kms-v1/Gemfile | 2 +- google-cloud-language-v1/Gemfile | 2 +- google-cloud-language-v1beta2/Gemfile | 2 +- google-cloud-language-v2/Gemfile | 2 +- google-cloud-life_sciences-v2beta/Gemfile | 2 +- google-cloud-location/Gemfile | 2 +- google-cloud-logging-v2/Gemfile | 2 +- google-cloud-lustre-v1/Gemfile | 2 +- google-cloud-managed_identities-v1/Gemfile | 2 +- google-cloud-managed_kafka-v1/Gemfile | 2 +- google-cloud-media_translation-v1beta1/Gemfile | 2 +- google-cloud-memcache-v1/Gemfile | 2 +- google-cloud-memcache-v1beta2/Gemfile | 2 +- google-cloud-memorystore-v1/Gemfile | 2 +- google-cloud-memorystore-v1beta/Gemfile | 2 +- google-cloud-metastore-v1/Gemfile | 2 +- google-cloud-metastore-v1beta/Gemfile | 2 +- google-cloud-migration_center-v1/Gemfile | 2 +- google-cloud-monitoring-dashboard-v1/Gemfile | 2 +- google-cloud-monitoring-metrics_scope-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-kms-v1/Gemfile b/google-cloud-kms-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-kms-v1/Gemfile +++ b/google-cloud-kms-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-language-v1/Gemfile b/google-cloud-language-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-language-v1/Gemfile +++ b/google-cloud-language-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-language-v1beta2/Gemfile b/google-cloud-language-v1beta2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-language-v1beta2/Gemfile +++ b/google-cloud-language-v1beta2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-language-v2/Gemfile b/google-cloud-language-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-language-v2/Gemfile +++ b/google-cloud-language-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-life_sciences-v2beta/Gemfile b/google-cloud-life_sciences-v2beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-life_sciences-v2beta/Gemfile +++ b/google-cloud-life_sciences-v2beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-location/Gemfile b/google-cloud-location/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-location/Gemfile +++ b/google-cloud-location/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-logging-v2/Gemfile b/google-cloud-logging-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-logging-v2/Gemfile +++ b/google-cloud-logging-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-lustre-v1/Gemfile b/google-cloud-lustre-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-lustre-v1/Gemfile +++ b/google-cloud-lustre-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-managed_identities-v1/Gemfile b/google-cloud-managed_identities-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-managed_identities-v1/Gemfile +++ b/google-cloud-managed_identities-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-managed_kafka-v1/Gemfile b/google-cloud-managed_kafka-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-managed_kafka-v1/Gemfile +++ b/google-cloud-managed_kafka-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-media_translation-v1beta1/Gemfile b/google-cloud-media_translation-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-media_translation-v1beta1/Gemfile +++ b/google-cloud-media_translation-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-memcache-v1/Gemfile b/google-cloud-memcache-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-memcache-v1/Gemfile +++ b/google-cloud-memcache-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-memcache-v1beta2/Gemfile b/google-cloud-memcache-v1beta2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-memcache-v1beta2/Gemfile +++ b/google-cloud-memcache-v1beta2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-memorystore-v1/Gemfile b/google-cloud-memorystore-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-memorystore-v1/Gemfile +++ b/google-cloud-memorystore-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-memorystore-v1beta/Gemfile b/google-cloud-memorystore-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-memorystore-v1beta/Gemfile +++ b/google-cloud-memorystore-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-metastore-v1/Gemfile b/google-cloud-metastore-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-metastore-v1/Gemfile +++ b/google-cloud-metastore-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-metastore-v1beta/Gemfile b/google-cloud-metastore-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-metastore-v1beta/Gemfile +++ b/google-cloud-metastore-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-migration_center-v1/Gemfile b/google-cloud-migration_center-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-migration_center-v1/Gemfile +++ b/google-cloud-migration_center-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-monitoring-dashboard-v1/Gemfile b/google-cloud-monitoring-dashboard-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-monitoring-dashboard-v1/Gemfile +++ b/google-cloud-monitoring-dashboard-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-monitoring-metrics_scope-v1/Gemfile b/google-cloud-monitoring-metrics_scope-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-monitoring-metrics_scope-v1/Gemfile +++ b/google-cloud-monitoring-metrics_scope-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From 6567ff6e87eab23a5ba3aa6a84f6bdb9b134cd29 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:03:42 -0700 Subject: [PATCH 138/457] chore(multi): Update google-style requirement (#30540) --- google-ads-ad_manager-v1/Gemfile | 2 +- google-ads-marketing_platform-admin-v1alpha/Gemfile | 2 +- google-analytics-admin-v1alpha/Gemfile | 2 +- google-analytics-data-v1beta/Gemfile | 2 +- google-apps-chat-v1/Gemfile | 2 +- google-apps-events-subscriptions-v1/Gemfile | 2 +- google-apps-meet-v2/Gemfile | 2 +- google-apps-meet-v2beta/Gemfile | 2 +- google-area120-tables-v1alpha1/Gemfile | 2 +- google-cloud-access_approval-v1/Gemfile | 2 +- google-cloud-advisory_notifications-v1/Gemfile | 2 +- google-cloud-ai_platform-v1/Gemfile | 2 +- google-cloud-alloy_db-v1/Gemfile | 2 +- google-cloud-alloy_db-v1alpha/Gemfile | 2 +- google-cloud-alloy_db-v1beta/Gemfile | 2 +- google-cloud-api_gateway-v1/Gemfile | 2 +- google-cloud-api_hub-v1/Gemfile | 2 +- google-cloud-api_keys-v2/Gemfile | 2 +- google-cloud-apigee_connect-v1/Gemfile | 2 +- google-cloud-apigee_registry-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-ads-ad_manager-v1/Gemfile b/google-ads-ad_manager-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-ads-ad_manager-v1/Gemfile +++ b/google-ads-ad_manager-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-ads-marketing_platform-admin-v1alpha/Gemfile b/google-ads-marketing_platform-admin-v1alpha/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-ads-marketing_platform-admin-v1alpha/Gemfile +++ b/google-ads-marketing_platform-admin-v1alpha/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-analytics-admin-v1alpha/Gemfile b/google-analytics-admin-v1alpha/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-analytics-admin-v1alpha/Gemfile +++ b/google-analytics-admin-v1alpha/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-analytics-data-v1beta/Gemfile b/google-analytics-data-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-analytics-data-v1beta/Gemfile +++ b/google-analytics-data-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-apps-chat-v1/Gemfile b/google-apps-chat-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-apps-chat-v1/Gemfile +++ b/google-apps-chat-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-apps-events-subscriptions-v1/Gemfile b/google-apps-events-subscriptions-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-apps-events-subscriptions-v1/Gemfile +++ b/google-apps-events-subscriptions-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-apps-meet-v2/Gemfile b/google-apps-meet-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-apps-meet-v2/Gemfile +++ b/google-apps-meet-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-apps-meet-v2beta/Gemfile b/google-apps-meet-v2beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-apps-meet-v2beta/Gemfile +++ b/google-apps-meet-v2beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-area120-tables-v1alpha1/Gemfile b/google-area120-tables-v1alpha1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-area120-tables-v1alpha1/Gemfile +++ b/google-area120-tables-v1alpha1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-access_approval-v1/Gemfile b/google-cloud-access_approval-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-access_approval-v1/Gemfile +++ b/google-cloud-access_approval-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-advisory_notifications-v1/Gemfile b/google-cloud-advisory_notifications-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-advisory_notifications-v1/Gemfile +++ b/google-cloud-advisory_notifications-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-ai_platform-v1/Gemfile b/google-cloud-ai_platform-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-ai_platform-v1/Gemfile +++ b/google-cloud-ai_platform-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-alloy_db-v1/Gemfile b/google-cloud-alloy_db-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-alloy_db-v1/Gemfile +++ b/google-cloud-alloy_db-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-alloy_db-v1alpha/Gemfile b/google-cloud-alloy_db-v1alpha/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-alloy_db-v1alpha/Gemfile +++ b/google-cloud-alloy_db-v1alpha/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-alloy_db-v1beta/Gemfile b/google-cloud-alloy_db-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-alloy_db-v1beta/Gemfile +++ b/google-cloud-alloy_db-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-api_gateway-v1/Gemfile b/google-cloud-api_gateway-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-api_gateway-v1/Gemfile +++ b/google-cloud-api_gateway-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-api_hub-v1/Gemfile b/google-cloud-api_hub-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-api_hub-v1/Gemfile +++ b/google-cloud-api_hub-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-api_keys-v2/Gemfile b/google-cloud-api_keys-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-api_keys-v2/Gemfile +++ b/google-cloud-api_keys-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-apigee_connect-v1/Gemfile b/google-cloud-apigee_connect-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-apigee_connect-v1/Gemfile +++ b/google-cloud-apigee_connect-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-apigee_registry-v1/Gemfile b/google-cloud-apigee_registry-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-apigee_registry-v1/Gemfile +++ b/google-cloud-apigee_registry-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From 14465ee2cab5502c18fa50e1ce1ab140cfd091bb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:07:56 -0700 Subject: [PATCH 139/457] chore(multi): Update google-style requirement (#30545) --- google-cloud-essential_contacts-v1/Gemfile | 2 +- google-cloud-eventarc-publishing-v1/Gemfile | 2 +- google-cloud-eventarc-v1/Gemfile | 2 +- google-cloud-filestore-v1/Gemfile | 2 +- google-cloud-financial_services-v1/Gemfile | 2 +- google-cloud-firestore-admin-v1/Gemfile | 2 +- google-cloud-firestore-v1/Gemfile | 2 +- google-cloud-functions-v1/Gemfile | 2 +- google-cloud-functions-v2/Gemfile | 2 +- google-cloud-gdc_hardware_management-v1alpha/Gemfile | 2 +- google-cloud-gke_backup-v1/Gemfile | 2 +- google-cloud-gke_connect-gateway-v1/Gemfile | 2 +- google-cloud-gke_connect-gateway-v1beta1/Gemfile | 2 +- google-cloud-gke_hub-v1/Gemfile | 2 +- google-cloud-gke_hub-v1beta1/Gemfile | 2 +- google-cloud-gke_multi_cloud-v1/Gemfile | 2 +- google-cloud-gsuite_add_ons-v1/Gemfile | 2 +- google-cloud-iap-v1/Gemfile | 2 +- google-cloud-ids-v1/Gemfile | 2 +- google-cloud-kms-inventory-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-essential_contacts-v1/Gemfile b/google-cloud-essential_contacts-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-essential_contacts-v1/Gemfile +++ b/google-cloud-essential_contacts-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-eventarc-publishing-v1/Gemfile b/google-cloud-eventarc-publishing-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-eventarc-publishing-v1/Gemfile +++ b/google-cloud-eventarc-publishing-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-eventarc-v1/Gemfile b/google-cloud-eventarc-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-eventarc-v1/Gemfile +++ b/google-cloud-eventarc-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-filestore-v1/Gemfile b/google-cloud-filestore-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-filestore-v1/Gemfile +++ b/google-cloud-filestore-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-financial_services-v1/Gemfile b/google-cloud-financial_services-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-financial_services-v1/Gemfile +++ b/google-cloud-financial_services-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-firestore-admin-v1/Gemfile b/google-cloud-firestore-admin-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-firestore-admin-v1/Gemfile +++ b/google-cloud-firestore-admin-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-firestore-v1/Gemfile b/google-cloud-firestore-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-firestore-v1/Gemfile +++ b/google-cloud-firestore-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-functions-v1/Gemfile b/google-cloud-functions-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-functions-v1/Gemfile +++ b/google-cloud-functions-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-functions-v2/Gemfile b/google-cloud-functions-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-functions-v2/Gemfile +++ b/google-cloud-functions-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-gdc_hardware_management-v1alpha/Gemfile b/google-cloud-gdc_hardware_management-v1alpha/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-gdc_hardware_management-v1alpha/Gemfile +++ b/google-cloud-gdc_hardware_management-v1alpha/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-gke_backup-v1/Gemfile b/google-cloud-gke_backup-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-gke_backup-v1/Gemfile +++ b/google-cloud-gke_backup-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-gke_connect-gateway-v1/Gemfile b/google-cloud-gke_connect-gateway-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-gke_connect-gateway-v1/Gemfile +++ b/google-cloud-gke_connect-gateway-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-gke_connect-gateway-v1beta1/Gemfile b/google-cloud-gke_connect-gateway-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-gke_connect-gateway-v1beta1/Gemfile +++ b/google-cloud-gke_connect-gateway-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-gke_hub-v1/Gemfile b/google-cloud-gke_hub-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-gke_hub-v1/Gemfile +++ b/google-cloud-gke_hub-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-gke_hub-v1beta1/Gemfile b/google-cloud-gke_hub-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-gke_hub-v1beta1/Gemfile +++ b/google-cloud-gke_hub-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-gke_multi_cloud-v1/Gemfile b/google-cloud-gke_multi_cloud-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-gke_multi_cloud-v1/Gemfile +++ b/google-cloud-gke_multi_cloud-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-gsuite_add_ons-v1/Gemfile b/google-cloud-gsuite_add_ons-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-gsuite_add_ons-v1/Gemfile +++ b/google-cloud-gsuite_add_ons-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-iap-v1/Gemfile b/google-cloud-iap-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-iap-v1/Gemfile +++ b/google-cloud-iap-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-ids-v1/Gemfile b/google-cloud-ids-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-ids-v1/Gemfile +++ b/google-cloud-ids-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-kms-inventory-v1/Gemfile b/google-cloud-kms-inventory-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-kms-inventory-v1/Gemfile +++ b/google-cloud-kms-inventory-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From c52c7caca7aaf14e6615682139b5c23e73e53a1d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:08:21 -0700 Subject: [PATCH 140/457] chore(multi): Update google-style requirement (#30544) --- google-cloud-dataqna-v1alpha/Gemfile | 2 +- google-cloud-datastore-admin-v1/Gemfile | 2 +- google-cloud-datastore-v1/Gemfile | 2 +- google-cloud-datastream-v1/Gemfile | 2 +- google-cloud-datastream-v1alpha1/Gemfile | 2 +- google-cloud-deploy-v1/Gemfile | 2 +- google-cloud-developer_connect-v1/Gemfile | 2 +- google-cloud-device_streaming-v1/Gemfile | 2 +- google-cloud-dialogflow-cx-v3/Gemfile | 2 +- google-cloud-dialogflow-v2/Gemfile | 2 +- google-cloud-discovery_engine-v1/Gemfile | 2 +- google-cloud-discovery_engine-v1beta/Gemfile | 2 +- google-cloud-dlp-v2/Gemfile | 2 +- google-cloud-document_ai-v1/Gemfile | 2 +- google-cloud-document_ai-v1beta3/Gemfile | 2 +- google-cloud-domains-v1/Gemfile | 2 +- google-cloud-domains-v1beta1/Gemfile | 2 +- google-cloud-edge_container-v1/Gemfile | 2 +- google-cloud-edge_network-v1/Gemfile | 2 +- google-cloud-error_reporting-v1beta1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-dataqna-v1alpha/Gemfile b/google-cloud-dataqna-v1alpha/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dataqna-v1alpha/Gemfile +++ b/google-cloud-dataqna-v1alpha/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-datastore-admin-v1/Gemfile b/google-cloud-datastore-admin-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-datastore-admin-v1/Gemfile +++ b/google-cloud-datastore-admin-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-datastore-v1/Gemfile b/google-cloud-datastore-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-datastore-v1/Gemfile +++ b/google-cloud-datastore-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-datastream-v1/Gemfile b/google-cloud-datastream-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-datastream-v1/Gemfile +++ b/google-cloud-datastream-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-datastream-v1alpha1/Gemfile b/google-cloud-datastream-v1alpha1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-datastream-v1alpha1/Gemfile +++ b/google-cloud-datastream-v1alpha1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-deploy-v1/Gemfile b/google-cloud-deploy-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-deploy-v1/Gemfile +++ b/google-cloud-deploy-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-developer_connect-v1/Gemfile b/google-cloud-developer_connect-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-developer_connect-v1/Gemfile +++ b/google-cloud-developer_connect-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-device_streaming-v1/Gemfile b/google-cloud-device_streaming-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-device_streaming-v1/Gemfile +++ b/google-cloud-device_streaming-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-dialogflow-cx-v3/Gemfile b/google-cloud-dialogflow-cx-v3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dialogflow-cx-v3/Gemfile +++ b/google-cloud-dialogflow-cx-v3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-dialogflow-v2/Gemfile b/google-cloud-dialogflow-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dialogflow-v2/Gemfile +++ b/google-cloud-dialogflow-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-discovery_engine-v1/Gemfile b/google-cloud-discovery_engine-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-discovery_engine-v1/Gemfile +++ b/google-cloud-discovery_engine-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-discovery_engine-v1beta/Gemfile b/google-cloud-discovery_engine-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-discovery_engine-v1beta/Gemfile +++ b/google-cloud-discovery_engine-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-dlp-v2/Gemfile b/google-cloud-dlp-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dlp-v2/Gemfile +++ b/google-cloud-dlp-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-document_ai-v1/Gemfile b/google-cloud-document_ai-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-document_ai-v1/Gemfile +++ b/google-cloud-document_ai-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-document_ai-v1beta3/Gemfile b/google-cloud-document_ai-v1beta3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-document_ai-v1beta3/Gemfile +++ b/google-cloud-document_ai-v1beta3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-domains-v1/Gemfile b/google-cloud-domains-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-domains-v1/Gemfile +++ b/google-cloud-domains-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-domains-v1beta1/Gemfile b/google-cloud-domains-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-domains-v1beta1/Gemfile +++ b/google-cloud-domains-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-edge_container-v1/Gemfile b/google-cloud-edge_container-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-edge_container-v1/Gemfile +++ b/google-cloud-edge_container-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-edge_network-v1/Gemfile b/google-cloud-edge_network-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-edge_network-v1/Gemfile +++ b/google-cloud-edge_network-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-error_reporting-v1beta1/Gemfile b/google-cloud-error_reporting-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-error_reporting-v1beta1/Gemfile +++ b/google-cloud-error_reporting-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From d3d71e03ff5f2ec06970ec244a5f50bd5ec66b8d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:08:59 -0700 Subject: [PATCH 141/457] chore(multi): Update google-style requirement (#30543) --- google-cloud-cloud_quotas-v1/Gemfile | 2 +- google-cloud-cloud_quotas-v1beta/Gemfile | 2 +- google-cloud-commerce-consumer-procurement-v1/Gemfile | 2 +- google-cloud-confidential_computing-v1/Gemfile | 2 +- google-cloud-config_service-v1/Gemfile | 2 +- google-cloud-connectors-v1/Gemfile | 2 +- google-cloud-contact_center_insights-v1/Gemfile | 2 +- google-cloud-container-v1/Gemfile | 2 +- google-cloud-container-v1beta1/Gemfile | 2 +- google-cloud-container_analysis-v1/Gemfile | 2 +- google-cloud-data_catalog-lineage-v1/Gemfile | 2 +- google-cloud-data_catalog-v1/Gemfile | 2 +- google-cloud-data_catalog-v1beta1/Gemfile | 2 +- google-cloud-data_fusion-v1/Gemfile | 2 +- google-cloud-data_labeling-v1beta1/Gemfile | 2 +- google-cloud-dataflow-v1beta3/Gemfile | 2 +- google-cloud-dataform-v1/Gemfile | 2 +- google-cloud-dataform-v1beta1/Gemfile | 2 +- google-cloud-dataplex-v1/Gemfile | 2 +- google-cloud-dataproc-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-cloud_quotas-v1/Gemfile b/google-cloud-cloud_quotas-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-cloud_quotas-v1/Gemfile +++ b/google-cloud-cloud_quotas-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-cloud_quotas-v1beta/Gemfile b/google-cloud-cloud_quotas-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-cloud_quotas-v1beta/Gemfile +++ b/google-cloud-cloud_quotas-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-commerce-consumer-procurement-v1/Gemfile b/google-cloud-commerce-consumer-procurement-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-commerce-consumer-procurement-v1/Gemfile +++ b/google-cloud-commerce-consumer-procurement-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-confidential_computing-v1/Gemfile b/google-cloud-confidential_computing-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-confidential_computing-v1/Gemfile +++ b/google-cloud-confidential_computing-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-config_service-v1/Gemfile b/google-cloud-config_service-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-config_service-v1/Gemfile +++ b/google-cloud-config_service-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-connectors-v1/Gemfile b/google-cloud-connectors-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-connectors-v1/Gemfile +++ b/google-cloud-connectors-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-contact_center_insights-v1/Gemfile b/google-cloud-contact_center_insights-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-contact_center_insights-v1/Gemfile +++ b/google-cloud-contact_center_insights-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-container-v1/Gemfile b/google-cloud-container-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-container-v1/Gemfile +++ b/google-cloud-container-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-container-v1beta1/Gemfile b/google-cloud-container-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-container-v1beta1/Gemfile +++ b/google-cloud-container-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-container_analysis-v1/Gemfile b/google-cloud-container_analysis-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-container_analysis-v1/Gemfile +++ b/google-cloud-container_analysis-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-data_catalog-lineage-v1/Gemfile b/google-cloud-data_catalog-lineage-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-data_catalog-lineage-v1/Gemfile +++ b/google-cloud-data_catalog-lineage-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-data_catalog-v1/Gemfile b/google-cloud-data_catalog-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-data_catalog-v1/Gemfile +++ b/google-cloud-data_catalog-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-data_catalog-v1beta1/Gemfile b/google-cloud-data_catalog-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-data_catalog-v1beta1/Gemfile +++ b/google-cloud-data_catalog-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-data_fusion-v1/Gemfile b/google-cloud-data_fusion-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-data_fusion-v1/Gemfile +++ b/google-cloud-data_fusion-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-data_labeling-v1beta1/Gemfile b/google-cloud-data_labeling-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-data_labeling-v1beta1/Gemfile +++ b/google-cloud-data_labeling-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-dataflow-v1beta3/Gemfile b/google-cloud-dataflow-v1beta3/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dataflow-v1beta3/Gemfile +++ b/google-cloud-dataflow-v1beta3/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-dataform-v1/Gemfile b/google-cloud-dataform-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dataform-v1/Gemfile +++ b/google-cloud-dataform-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-dataform-v1beta1/Gemfile b/google-cloud-dataform-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dataform-v1beta1/Gemfile +++ b/google-cloud-dataform-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-dataplex-v1/Gemfile b/google-cloud-dataplex-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dataplex-v1/Gemfile +++ b/google-cloud-dataplex-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-dataproc-v1/Gemfile b/google-cloud-dataproc-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-dataproc-v1/Gemfile +++ b/google-cloud-dataproc-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From f19a9ba385088790d72fda4fdf914afa6cfdc9ca Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:09:23 -0700 Subject: [PATCH 142/457] chore(multi): Update google-style requirement (#30542) --- google-cloud-bigquery-data_policies-v1beta1/Gemfile | 2 +- google-cloud-bigquery-data_transfer-v1/Gemfile | 2 +- google-cloud-bigquery-migration-v2/Gemfile | 2 +- google-cloud-bigquery-reservation-v1/Gemfile | 2 +- google-cloud-bigquery-storage-v1/Gemfile | 2 +- google-cloud-bigtable-admin-v2/Gemfile | 2 +- google-cloud-bigtable-v2/Gemfile | 2 +- google-cloud-billing-budgets-v1/Gemfile | 2 +- google-cloud-billing-budgets-v1beta1/Gemfile | 2 +- google-cloud-billing-v1/Gemfile | 2 +- google-cloud-binary_authorization-v1/Gemfile | 2 +- google-cloud-binary_authorization-v1beta1/Gemfile | 2 +- google-cloud-build-v1/Gemfile | 2 +- google-cloud-build-v2/Gemfile | 2 +- google-cloud-certificate_manager-v1/Gemfile | 2 +- google-cloud-channel-v1/Gemfile | 2 +- google-cloud-chronicle-v1/Gemfile | 2 +- google-cloud-cloud_controls_partner-v1/Gemfile | 2 +- google-cloud-cloud_controls_partner-v1beta/Gemfile | 2 +- google-cloud-cloud_dms-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-bigquery-data_policies-v1beta1/Gemfile b/google-cloud-bigquery-data_policies-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-data_policies-v1beta1/Gemfile +++ b/google-cloud-bigquery-data_policies-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigquery-data_transfer-v1/Gemfile b/google-cloud-bigquery-data_transfer-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-data_transfer-v1/Gemfile +++ b/google-cloud-bigquery-data_transfer-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigquery-migration-v2/Gemfile b/google-cloud-bigquery-migration-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-migration-v2/Gemfile +++ b/google-cloud-bigquery-migration-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigquery-reservation-v1/Gemfile b/google-cloud-bigquery-reservation-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-reservation-v1/Gemfile +++ b/google-cloud-bigquery-reservation-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigquery-storage-v1/Gemfile b/google-cloud-bigquery-storage-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-storage-v1/Gemfile +++ b/google-cloud-bigquery-storage-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigtable-admin-v2/Gemfile b/google-cloud-bigtable-admin-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigtable-admin-v2/Gemfile +++ b/google-cloud-bigtable-admin-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigtable-v2/Gemfile b/google-cloud-bigtable-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigtable-v2/Gemfile +++ b/google-cloud-bigtable-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-billing-budgets-v1/Gemfile b/google-cloud-billing-budgets-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-billing-budgets-v1/Gemfile +++ b/google-cloud-billing-budgets-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-billing-budgets-v1beta1/Gemfile b/google-cloud-billing-budgets-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-billing-budgets-v1beta1/Gemfile +++ b/google-cloud-billing-budgets-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-billing-v1/Gemfile b/google-cloud-billing-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-billing-v1/Gemfile +++ b/google-cloud-billing-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-binary_authorization-v1/Gemfile b/google-cloud-binary_authorization-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-binary_authorization-v1/Gemfile +++ b/google-cloud-binary_authorization-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-binary_authorization-v1beta1/Gemfile b/google-cloud-binary_authorization-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-binary_authorization-v1beta1/Gemfile +++ b/google-cloud-binary_authorization-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-build-v1/Gemfile b/google-cloud-build-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-build-v1/Gemfile +++ b/google-cloud-build-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-build-v2/Gemfile b/google-cloud-build-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-build-v2/Gemfile +++ b/google-cloud-build-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-certificate_manager-v1/Gemfile b/google-cloud-certificate_manager-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-certificate_manager-v1/Gemfile +++ b/google-cloud-certificate_manager-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-channel-v1/Gemfile b/google-cloud-channel-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-channel-v1/Gemfile +++ b/google-cloud-channel-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-chronicle-v1/Gemfile b/google-cloud-chronicle-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-chronicle-v1/Gemfile +++ b/google-cloud-chronicle-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-cloud_controls_partner-v1/Gemfile b/google-cloud-cloud_controls_partner-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-cloud_controls_partner-v1/Gemfile +++ b/google-cloud-cloud_controls_partner-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-cloud_controls_partner-v1beta/Gemfile b/google-cloud-cloud_controls_partner-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-cloud_controls_partner-v1beta/Gemfile +++ b/google-cloud-cloud_controls_partner-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-cloud_dms-v1/Gemfile b/google-cloud-cloud_dms-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-cloud_dms-v1/Gemfile +++ b/google-cloud-cloud_dms-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From fc697ecd8ebf4154141e3125635d70f7cbbfc8e2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:09:49 -0700 Subject: [PATCH 143/457] chore(multi): Update google-style requirement (#30541) --- google-cloud-app_engine-v1/Gemfile | 2 +- google-cloud-app_hub-v1/Gemfile | 2 +- google-cloud-artifact_registry-v1/Gemfile | 2 +- google-cloud-artifact_registry-v1beta2/Gemfile | 2 +- google-cloud-asset-v1/Gemfile | 2 +- google-cloud-assured_workloads-v1/Gemfile | 2 +- google-cloud-assured_workloads-v1beta1/Gemfile | 2 +- google-cloud-automl-v1/Gemfile | 2 +- google-cloud-automl-v1beta1/Gemfile | 2 +- google-cloud-backupdr-v1/Gemfile | 2 +- google-cloud-bare_metal_solution-v2/Gemfile | 2 +- google-cloud-batch-v1/Gemfile | 2 +- google-cloud-beyond_corp-app_connections-v1/Gemfile | 2 +- google-cloud-beyond_corp-app_connectors-v1/Gemfile | 2 +- google-cloud-beyond_corp-app_gateways-v1/Gemfile | 2 +- google-cloud-beyond_corp-client_gateways-v1/Gemfile | 2 +- google-cloud-bigquery-analytics_hub-v1/Gemfile | 2 +- google-cloud-bigquery-connection-v1/Gemfile | 2 +- google-cloud-bigquery-data_exchange-v1beta1/Gemfile | 2 +- google-cloud-bigquery-data_policies-v1/Gemfile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-app_engine-v1/Gemfile b/google-cloud-app_engine-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-app_engine-v1/Gemfile +++ b/google-cloud-app_engine-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-app_hub-v1/Gemfile b/google-cloud-app_hub-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-app_hub-v1/Gemfile +++ b/google-cloud-app_hub-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-artifact_registry-v1/Gemfile b/google-cloud-artifact_registry-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-artifact_registry-v1/Gemfile +++ b/google-cloud-artifact_registry-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-artifact_registry-v1beta2/Gemfile b/google-cloud-artifact_registry-v1beta2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-artifact_registry-v1beta2/Gemfile +++ b/google-cloud-artifact_registry-v1beta2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-asset-v1/Gemfile b/google-cloud-asset-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-asset-v1/Gemfile +++ b/google-cloud-asset-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-assured_workloads-v1/Gemfile b/google-cloud-assured_workloads-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-assured_workloads-v1/Gemfile +++ b/google-cloud-assured_workloads-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-assured_workloads-v1beta1/Gemfile b/google-cloud-assured_workloads-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-assured_workloads-v1beta1/Gemfile +++ b/google-cloud-assured_workloads-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-automl-v1/Gemfile b/google-cloud-automl-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-automl-v1/Gemfile +++ b/google-cloud-automl-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-automl-v1beta1/Gemfile b/google-cloud-automl-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-automl-v1beta1/Gemfile +++ b/google-cloud-automl-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-backupdr-v1/Gemfile b/google-cloud-backupdr-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-backupdr-v1/Gemfile +++ b/google-cloud-backupdr-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bare_metal_solution-v2/Gemfile b/google-cloud-bare_metal_solution-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bare_metal_solution-v2/Gemfile +++ b/google-cloud-bare_metal_solution-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-batch-v1/Gemfile b/google-cloud-batch-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-batch-v1/Gemfile +++ b/google-cloud-batch-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-beyond_corp-app_connections-v1/Gemfile b/google-cloud-beyond_corp-app_connections-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-beyond_corp-app_connections-v1/Gemfile +++ b/google-cloud-beyond_corp-app_connections-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-beyond_corp-app_connectors-v1/Gemfile b/google-cloud-beyond_corp-app_connectors-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/Gemfile +++ b/google-cloud-beyond_corp-app_connectors-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-beyond_corp-app_gateways-v1/Gemfile b/google-cloud-beyond_corp-app_gateways-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/Gemfile +++ b/google-cloud-beyond_corp-app_gateways-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-beyond_corp-client_gateways-v1/Gemfile b/google-cloud-beyond_corp-client_gateways-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/Gemfile +++ b/google-cloud-beyond_corp-client_gateways-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigquery-analytics_hub-v1/Gemfile b/google-cloud-bigquery-analytics_hub-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-analytics_hub-v1/Gemfile +++ b/google-cloud-bigquery-analytics_hub-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigquery-connection-v1/Gemfile b/google-cloud-bigquery-connection-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-connection-v1/Gemfile +++ b/google-cloud-bigquery-connection-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigquery-data_exchange-v1beta1/Gemfile b/google-cloud-bigquery-data_exchange-v1beta1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-data_exchange-v1beta1/Gemfile +++ b/google-cloud-bigquery-data_exchange-v1beta1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-bigquery-data_policies-v1/Gemfile b/google-cloud-bigquery-data_policies-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-bigquery-data_policies-v1/Gemfile +++ b/google-cloud-bigquery-data_policies-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" From a6b960e83f3c5218c0966988f64405ad298fbbc2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:12:03 -0700 Subject: [PATCH 144/457] feat(shopping-merchant-issue_resolution-v1beta): Support for the list_aggregate_product_statuses RPC (#30501) --- .../.owlbot-manifest.json | 15 + .../AUTHENTICATION.md | 8 +- .../Gemfile | 2 +- .../README.md | 8 +- .../Rakefile | 4 +- .../gapic_metadata.json | 14 + ...g-merchant-issue_resolution-v1beta.gemspec | 1 + .../merchant/issue_resolution/v1beta.rb | 5 +- .../aggregate_product_statuses_service.rb | 57 ++ .../client.rb | 491 ++++++++++++++++++ .../credentials.rb | 49 ++ .../paths.rb | 49 ++ .../rest.rb | 54 ++ .../rest/client.rb | 458 ++++++++++++++++ .../rest/service_stub.rb | 144 +++++ .../merchant/issue_resolution/v1beta/rest.rb | 3 +- .../v1beta/aggregateproductstatuses_pb.rb | 56 ++ .../aggregateproductstatuses_services_pb.rb | 50 ++ .../v1beta/aggregateproductstatuses.rb | 173 ++++++ .../proto_docs/google/shopping/type/types.rb | 210 ++++++++ .../list_aggregate_product_statuses.rb | 51 ++ ...pping.merchant.issueresolution.v1beta.json | 40 ++ ...ate_product_statuses_service_paths_test.rb | 55 ++ ...gate_product_statuses_service_rest_test.rb | 156 ++++++ ...aggregate_product_statuses_service_test.rb | 154 ++++++ 25 files changed, 2293 insertions(+), 14 deletions(-) create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb diff --git a/google-shopping-merchant-issue_resolution-v1beta/.owlbot-manifest.json b/google-shopping-merchant-issue_resolution-v1beta/.owlbot-manifest.json index 942a478f67ea..a0a7dbdd0a4c 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-issue_resolution-v1beta/.owlbot-manifest.json @@ -15,6 +15,13 @@ "google-shopping-merchant-issue_resolution-v1beta.gemspec", "lib/google-shopping-merchant-issue_resolution-v1beta.rb", "lib/google/shopping/merchant/issue_resolution/v1beta.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb", + "lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb", "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service.rb", "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/client.rb", "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials.rb", @@ -24,6 +31,8 @@ "lib/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest/service_stub.rb", "lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb", "lib/google/shopping/merchant/issue_resolution/v1beta/version.rb", + "lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb", + "lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb", "lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_pb.rb", "lib/google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb.rb", "proto_docs/README.md", @@ -32,12 +41,18 @@ "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb", "proto_docs/google/shopping/merchant/issueresolution/v1beta/issueresolution.rb", + "proto_docs/google/shopping/type/types.rb", "snippets/Gemfile", + "snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb", "snippets/issue_resolution_service/render_account_issues.rb", "snippets/issue_resolution_service/render_product_issues.rb", "snippets/issue_resolution_service/trigger_action.rb", "snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json", + "test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb", + "test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb", + "test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb", "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_paths_test.rb", "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_rest_test.rb", "test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb", diff --git a/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md b/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md index 2ff7b95b7a25..76c2794553f5 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md +++ b/google-shopping-merchant-issue_resolution-v1beta/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/shopping/merchant/issue_resolution/v1beta" -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients: ```ruby require "google/shopping/merchant/issue_resolution/v1beta" -::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.configure do |config| +::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/shopping/merchant/issue_resolution/v1beta" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new ``` ### Local ADC file diff --git a/google-shopping-merchant-issue_resolution-v1beta/Gemfile b/google-shopping-merchant-issue_resolution-v1beta/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/Gemfile +++ b/google-shopping-merchant-issue_resolution-v1beta/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-shopping-merchant-issue_resolution-v1beta/README.md b/google-shopping-merchant-issue_resolution-v1beta/README.md index a03aab45ec0b..433fb3188a1d 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/README.md +++ b/google-shopping-merchant-issue_resolution-v1beta/README.md @@ -32,9 +32,9 @@ In order to use this library, you first need to go through the following steps: ```ruby require "google/shopping/merchant/issue_resolution/v1beta" -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new -request = ::Google::Shopping::Merchant::IssueResolution::V1beta::RenderAccountIssuesRequest.new # (request fields as keyword arguments...) -response = client.render_account_issues request +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new +request = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new # (request fields as keyword arguments...) +response = client.list_aggregate_product_statuses request ``` View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta) @@ -75,7 +75,7 @@ constructing a client object. For example: require "google/shopping/merchant/issue_resolution/v1beta" require "logger" -client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new do |config| +client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| config.logger = Logger.new "my-app.log" end ``` diff --git a/google-shopping-merchant-issue_resolution-v1beta/Rakefile b/google-shopping-merchant-issue_resolution-v1beta/Rakefile index 185a5d4e080f..68869064b3ac 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/Rakefile +++ b/google-shopping-merchant-issue_resolution-v1beta/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" - ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Credentials.env_vars.each do |path| + require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" + ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json b/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json index 70b76dcc73d1..1ffcf21af1a9 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json +++ b/google-shopping-merchant-issue_resolution-v1beta/gapic_metadata.json @@ -5,6 +5,20 @@ "protoPackage": "google.shopping.merchant.issueresolution.v1beta", "libraryPackage": "::Google::Shopping::Merchant::IssueResolution::V1beta", "services": { + "AggregateProductStatusesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client", + "rpcs": { + "ListAggregateProductStatuses": { + "methods": [ + "list_aggregate_product_statuses" + ] + } + } + } + } + }, "IssueResolutionService": { "clients": { "grpc": { diff --git a/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec b/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec index a9a2a4e5c4a8..39424e7da8d4 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec +++ b/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec @@ -25,4 +25,5 @@ Gem::Specification.new do |gem| gem.add_dependency "gapic-common", "~> 1.0" gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb index 913f65543ff3..08b890f59896 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta.rb @@ -16,6 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" require "google/shopping/merchant/issue_resolution/v1beta/version" @@ -29,12 +30,12 @@ module IssueResolution # @example Load this package, including all its services, and instantiate a gRPC client # # require "google/shopping/merchant/issue_resolution/v1beta" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Client.new + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new # # @example Load this package, including all its services, and instantiate a REST client # # require "google/shopping/merchant/issue_resolution/v1beta" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new # module V1beta end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb new file mode 100644 index 000000000000..bf1f40694ebe --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta/version" + +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ## + # Service to manage aggregate product statuses. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + module AggregateProductStatusesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "aggregate_product_statuses_service", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb new file mode 100644 index 000000000000..995599857fe9 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/client.rb @@ -0,0 +1,491 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + ## + # Client for the AggregateProductStatusesService service. + # + # Service to manage aggregate product statuses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aggregate_product_statuses_service_stub + + ## + # Configure the AggregateProductStatusesService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AggregateProductStatusesService clients + # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] + 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.timeout = 60.0 + default_config.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 AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 + @aggregate_product_statuses_service_stub.universe_domain + end + + ## + # Create a new AggregateProductStatusesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AggregateProductStatusesService 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_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 + + @aggregate_product_statuses_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 + ) + + @aggregate_product_statuses_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 + @aggregate_product_statuses_service_stub.logger + end + + # Service calls + + ## + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + # + # @overload list_aggregate_product_statuses(request, options = nil) + # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::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_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_aggregate_product_statuses` 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 account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new + # + # # Call the list_aggregate_product_statuses method. + # result = client.list_aggregate_product_statuses 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. + # p item + # end + # + def list_aggregate_product_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest + + # 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_aggregate_product_statuses.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::Shopping::Merchant::IssueResolution::V1beta::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_aggregate_product_statuses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aggregate_product_statuses_service_stub.call_rpc :list_aggregate_product_statuses, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, 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 AggregateProductStatusesService API. + # + # This class represents the configuration for AggregateProductStatusesService, + # 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 + # # list_aggregate_product_statuses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 AggregateProductStatusesService 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 `list_aggregate_product_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aggregate_product_statuses + + # @private + def initialize parent_rpcs = nil + list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses + @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb new file mode 100644 index 000000000000..d183d5c0dc77 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + # Credentials for the AggregateProductStatusesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb new file mode 100644 index 000000000000..15590a197ccc --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + # Path helper methods for the AggregateProductStatusesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb new file mode 100644 index 000000000000..c41e2ea07434 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta/version" + +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/paths" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ## + # Service to manage aggregate product statuses. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + module AggregateProductStatusesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb new file mode 100644 index 000000000000..f0fd42030a32 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/client.rb @@ -0,0 +1,458 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + module Rest + ## + # REST client for the AggregateProductStatusesService service. + # + # Service to manage aggregate product statuses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aggregate_product_statuses_service_stub + + ## + # Configure the AggregateProductStatusesService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AggregateProductStatusesService clients + # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "V1beta"] + 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.timeout = 60.0 + default_config.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 AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 + @aggregate_product_statuses_service_stub.universe_domain + end + + ## + # Create a new AggregateProductStatusesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AggregateProductStatusesService 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 + + @aggregate_product_statuses_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @aggregate_product_statuses_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 + @aggregate_product_statuses_service_stub.logger + end + + # Service calls + + ## + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + # + # @overload list_aggregate_product_statuses(request, options = nil) + # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::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_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_aggregate_product_statuses` 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 account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new + # + # # Call the list_aggregate_product_statuses method. + # result = client.list_aggregate_product_statuses 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. + # p item + # end + # + def list_aggregate_product_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest + + # 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_aggregate_product_statuses.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::Shopping::Merchant::IssueResolution::V1beta::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_aggregate_product_statuses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aggregate_product_statuses_service_stub.list_aggregate_product_statuses request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, "aggregate_product_statuses", 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 AggregateProductStatusesService REST API. + # + # This class represents the configuration for AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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 + # # list_aggregate_product_statuses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.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 = "merchantapi.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 AggregateProductStatusesService 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 `list_aggregate_product_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aggregate_product_statuses + + # @private + def initialize parent_rpcs = nil + list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses + @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb new file mode 100644 index 000000000000..61c83913f37b --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest/service_stub.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + module Rest + ## + # REST service stub for the AggregateProductStatusesService 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: true, + 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 list_aggregate_product_statuses REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest] + # 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::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse] + # A result object deserialized from the server's reply + def list_aggregate_product_statuses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_aggregate_product_statuses_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_aggregate_product_statuses", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.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 list_aggregate_product_statuses REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest] + # 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_aggregate_product_statuses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/issueresolution/v1beta/{parent}/aggregateProductStatuses", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb index 3149144d6c11..75078b90233d 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/rest.rb @@ -16,6 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/rest" require "google/shopping/merchant/issue_resolution/v1beta/version" @@ -29,7 +30,7 @@ module IssueResolution # @example # # require "google/shopping/merchant/issue_resolution/v1beta/rest" - # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Rest::Client.new + # client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new # module V1beta end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb new file mode 100644 index 000000000000..c7c13e180668 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.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/shopping/type/types_pb' + + +descriptor_data = "\nNgoogle/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.proto\x12/google.shopping.merchant.issueresolution.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb6\x01\n#ListAggregateProductStatusesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31merchantapi.googleapis.com/AggregateProductStatus\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n$ListAggregateProductStatusesResponse\x12k\n\x1a\x61ggregate_product_statuses\x18\x01 \x03(\x0b\x32G.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\t\n\x16\x41ggregateProductStatus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12V\n\x11reporting_context\x18\x03 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12\\\n\x05stats\x18\x05 \x01(\x0b\x32M.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.Stats\x12q\n\x11item_level_issues\x18\x06 \x03(\x0b\x32V.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue\x1ag\n\x05Stats\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\x03\x12\x15\n\rpending_count\x18\x02 \x01(\x03\x12\x19\n\x11\x64isapproved_count\x18\x03 \x01(\x03\x12\x16\n\x0e\x65xpiring_count\x18\x04 \x01(\x03\x1a\x9f\x04\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12q\n\x08severity\x18\x02 \x01(\x0e\x32_.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Severity\x12u\n\nresolution\x18\x03 \x01(\x0e\x32\x61.google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Resolution\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x08 \x01(\t\x12\x15\n\rproduct_count\x18\t \x01(\x03\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"U\n\nResolution\x12\x1a\n\x16RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02:\xb1\x01\xea\x41\xad\x01\n1merchantapi.googleapis.com/AggregateProductStatus\x12\x46\x61\x63\x63ounts/{account}/aggregateProductStatuses/{aggregate_product_status}*\x18\x61ggregateProductStatuses2\x16\x61ggregateProductStatus2\x8f\x03\n\x1f\x41ggregateProductStatusesService\x12\xa2\x02\n\x1cListAggregateProductStatuses\x12T.google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesRequest\x1aU.google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/issueresolution/v1beta/{parent=accounts/*}/aggregateProductStatuses\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd5\x02\n3com.google.shopping.merchant.issueresolution.v1betaB\x1d\x41ggregateProductStatusesProtoP\x01Zccloud.google.com/go/shopping/merchant/issueresolution/apiv1beta/issueresolutionpb;issueresolutionpb\xaa\x02/Google.Shopping.Merchant.IssueResolution.V1Beta\xca\x02/Google\\Shopping\\Merchant\\IssueResolution\\V1beta\xea\x02\x33Google::Shopping::Merchant::IssueResolution::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + ListAggregateProductStatusesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesRequest").msgclass + ListAggregateProductStatusesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.ListAggregateProductStatusesResponse").msgclass + AggregateProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus").msgclass + AggregateProductStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.Stats").msgclass + AggregateProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue").msgclass + AggregateProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Severity").enummodule + AggregateProductStatus::ItemLevelIssue::Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1beta.AggregateProductStatus.ItemLevelIssue.Resolution").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb new file mode 100644 index 000000000000..1b071933d7bf --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.proto for package 'Google.Shopping.Merchant.IssueResolution.V1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb' + +module Google + module Shopping + module Merchant + module IssueResolution + module V1beta + module AggregateProductStatusesService + # Service to manage aggregate product statuses. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService' + + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + rpc :ListAggregateProductStatuses, ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb new file mode 100644 index 000000000000..60a81a9d1055 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses.rb @@ -0,0 +1,173 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1beta + # Request message for the `ListAggregateProductStatuses` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + class ListAggregateProductStatusesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAggregateProductStatuses` method. + # @!attribute [rw] aggregate_product_statuses + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus>] + # The `AggregateProductStatuses` resources for the given account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAggregateProductStatusesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregate product statuses for a given reporting context and country. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `AggregateProductStatuses` resource. + # Format: + # `accounts/{account}/aggregateProductStatuses/{aggregateProductStatuses}` + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The reporting context of the aggregate product statuses. + # @!attribute [rw] country + # @return [::String] + # The country of the aggregate product statuses. Represented as a + # [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # @!attribute [rw] stats + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::Stats] + # Products statistics for the given reporting context and country. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue>] + # The product issues that affect the given reporting context and country. + class AggregateProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Products statistics. + # @!attribute [rw] active_count + # @return [::Integer] + # The number of products that are active. + # @!attribute [rw] pending_count + # @return [::Integer] + # The number of products that are pending. + # @!attribute [rw] disapproved_count + # @return [::Integer] + # The number of products that are disapproved. + # @!attribute [rw] expiring_count + # @return [::Integer] + # The number of products that are expiring. + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the product status. + # @!attribute [rw] code + # @return [::String] + # The error code of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue::Severity] + # How this issue affects serving of the offer. + # @!attribute [rw] resolution + # @return [::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus::ItemLevelIssue::Resolution] + # Whether the issue can be resolved by the merchant. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] description + # @return [::String] + # A short issue description in English. + # @!attribute [rw] detail + # @return [::String] + # A detailed issue description in English. + # @!attribute [rw] documentation_uri + # @return [::String] + # The URL of a web page to help with resolving this issue. + # @!attribute [rw] product_count + # @return [::Integer] + # The number of products affected by this issue. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How the issue affects the serving of the product. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the product. + NOT_IMPACTED = 1 + + # The product is demoted and most likely have limited performance + # in search results + DEMOTED = 2 + + # Issue disapproves the product. + DISAPPROVED = 3 + end + + # How the issue can be resolved. + module Resolution + # Not specified. + RESOLUTION_UNSPECIFIED = 0 + + # The issue can be resolved by the merchant. + MERCHANT_ACTION = 1 + + # The issue will be resolved auomatically. + PENDING_PROCESSING = 2 + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb b/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb new file mode 100644 index 000000000000..958b358c7939 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] +require "google/shopping/merchant/issue_resolution/v1beta" + +## +# Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses. +# +def list_aggregate_product_statuses + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new + + # Call the list_aggregate_product_statuses method. + result = client.list_aggregate_product_statuses 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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatus. + p item + end +end +# [END merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] diff --git a/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json b/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json index 08e429c4b265..69b3e4a2dca2 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json @@ -11,6 +11,46 @@ ] }, "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync", + "title": "Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses.", + "file": "aggregate_product_statuses_service/list_aggregate_product_statuses.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_aggregate_product_statuses", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client#list_aggregate_product_statuses", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse", + "client": { + "short_name": "AggregateProductStatusesService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client" + }, + "method": { + "short_name": "ListAggregateProductStatuses", + "full_name": "google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService.ListAggregateProductStatuses", + "service": { + "short_name": "AggregateProductStatusesService", + "full_name": "google.shopping.merchant.issueresolution.v1beta.AggregateProductStatusesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "merchantapi_v1beta_generated_IssueResolutionService_RenderAccountIssues_sync", "title": "Snippet for the render_account_issues call in the IssueResolutionService service", diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb new file mode 100644 index 000000000000..7cbe614c1e5b --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb new file mode 100644 index 000000000000..3811b12a7e60 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_rest_test.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/rest" + + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_list_aggregate_product_statuses + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::ServiceStub.stub :transcode_list_aggregate_product_statuses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_aggregate_product_statuses_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_aggregate_product_statuses({ parent: parent, 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_aggregate_product_statuses parent: parent, 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new(parent: parent, 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_aggregate_product_statuses({ parent: parent, 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new(parent: parent, 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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb new file mode 100644 index 000000000000..da9316e2100d --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" +require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb" +require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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_list_aggregate_product_statuses + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_aggregate_product_statuses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_aggregate_product_statuses, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest, request + assert_equal "hello world", request["parent"] + 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_aggregate_product_statuses_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_aggregate_product_statuses({ parent: parent, 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_aggregate_product_statuses parent: parent, 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new(parent: parent, 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_aggregate_product_statuses({ parent: parent, 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1beta::ListAggregateProductStatusesRequest.new(parent: parent, 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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client::Configuration, config + end +end From 5bf0f85130e95e4d6d4cef07a93876e9b02b4884 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:13:47 -0700 Subject: [PATCH 145/457] chore(translate-v3): Minor docs formatting (#30564) --- .../google/cloud/translate/v3/translation_service/client.rb | 6 +++--- .../cloud/translate/v3/translation_service/rest/client.rb | 6 +++--- .../google/cloud/translate/v3/translation_service.rb | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb index d704b88d139e..e5dbcbce791f 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb @@ -783,15 +783,15 @@ def get_supported_languages request, options = nil # @param source_language_code [::String] # Optional. The ISO-639 language code of the input document if known, for # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support] (https://cloud.google.com/translate/docs/languages). If + # [Language Support](https://cloud.google.com/translate/docs/languages). If # the source language isn't specified, the API attempts to identify the # source language automatically and returns the source language within the # response. Source language must be specified if the request contains a # glossary or a custom model. # @param target_language_code [::String] # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in [Language Support] - # (https://cloud.google.com/translate/docs/languages). + # document, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash] # Required. Input configurations. # @param document_output_config [::Google::Cloud::Translate::V3::DocumentOutputConfig, ::Hash] diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb index b61e20ff6aba..f63b924d2c88 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb @@ -749,15 +749,15 @@ def get_supported_languages request, options = nil # @param source_language_code [::String] # Optional. The ISO-639 language code of the input document if known, for # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support] (https://cloud.google.com/translate/docs/languages). If + # [Language Support](https://cloud.google.com/translate/docs/languages). If # the source language isn't specified, the API attempts to identify the # source language automatically and returns the source language within the # response. Source language must be specified if the request contains a # glossary or a custom model. # @param target_language_code [::String] # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in [Language Support] - # (https://cloud.google.com/translate/docs/languages). + # document, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash] # Required. Input configurations. # @param document_output_config [::Google::Cloud::Translate::V3::DocumentOutputConfig, ::Hash] diff --git a/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb b/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb index 22cf4626d204..22c335f1a8c4 100644 --- a/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb +++ b/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb @@ -623,7 +623,7 @@ class DocumentOutputConfig # @return [::String] # Optional. The ISO-639 language code of the input document if known, for # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support] (https://cloud.google.com/translate/docs/languages). If + # [Language Support](https://cloud.google.com/translate/docs/languages). If # the source language isn't specified, the API attempts to identify the # source language automatically and returns the source language within the # response. Source language must be specified if the request contains a @@ -631,8 +631,8 @@ class DocumentOutputConfig # @!attribute [rw] target_language_code # @return [::String] # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in [Language Support] - # (https://cloud.google.com/translate/docs/languages). + # document, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). # @!attribute [rw] document_input_config # @return [::Google::Cloud::Translate::V3::DocumentInputConfig] # Required. Input configurations. From ee5222aa311852f2e23ce87527b2454b85b065d1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:28:24 -0700 Subject: [PATCH 146/457] feat(network-services-v1): Support for RPCs for managing AuthzExtensions feat(network-services-v1): Support for RPCs for managing WasmPlugins feat(network-services-v1): Support for RPCs for managing WasmPluginVersions feat(network-services-v1): Support for extension metadata --- .../.owlbot-manifest.json | 16 + .../gapic_metadata.json | 70 ++ .../network_services/v1/dep_service/client.rb | 603 ++++++++++- .../network_services/v1/dep_service/paths.rb | 19 + .../v1/dep_service/rest/client.rb | 568 ++++++++++- .../v1/dep_service/rest/service_stub.rb | 307 ++++++ .../v1/network_services/client.rb | 944 ++++++++++++++++++ .../v1/network_services/paths.rb | 40 + .../v1/network_services/rest/client.rb | 881 ++++++++++++++++ .../v1/network_services/rest/service_stub.rb | 552 ++++++++++ .../google/cloud/networkservices/v1/dep_pb.rb | 12 +- .../networkservices/v1/dep_services_pb.rb | 12 + .../networkservices/v1/extensibility_pb.rb | 66 ++ .../networkservices/v1/network_services_pb.rb | 4 +- .../v1/network_services_services_pb.rb | 22 + .../google/cloud/networkservices/v1/dep.rb | 428 +++++++- .../cloud/networkservices/v1/extensibility.rb | 518 ++++++++++ .../dep_service/create_authz_extension.rb | 54 + .../dep_service/delete_authz_extension.rb | 54 + .../dep_service/get_authz_extension.rb | 47 + .../dep_service/list_authz_extensions.rb | 51 + .../dep_service/update_authz_extension.rb | 54 + .../network_services/create_wasm_plugin.rb | 54 + .../create_wasm_plugin_version.rb | 54 + .../network_services/delete_wasm_plugin.rb | 54 + .../delete_wasm_plugin_version.rb | 54 + .../network_services/get_wasm_plugin.rb | 47 + .../get_wasm_plugin_version.rb | 47 + .../list_wasm_plugin_versions.rb | 51 + .../network_services/list_wasm_plugins.rb | 51 + .../network_services/update_wasm_plugin.rb | 54 + ...adata_google.cloud.networkservices.v1.json | 560 +++++++++++ .../v1/dep_service_paths_test.rb | 12 + .../v1/dep_service_rest_test.rb | 280 ++++++ .../network_services/v1/dep_service_test.rb | 330 ++++++ .../v1/network_services_paths_test.rb | 24 + .../v1/network_services_rest_test.rb | 496 +++++++++ .../v1/network_services_test.rb | 577 +++++++++++ 38 files changed, 7964 insertions(+), 103 deletions(-) create mode 100644 google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb create mode 100644 google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb create mode 100644 google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb create mode 100644 google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb create mode 100644 google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb create mode 100644 google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb create mode 100644 google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb create mode 100644 google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb diff --git a/google-cloud-network_services-v1/.owlbot-manifest.json b/google-cloud-network_services-v1/.owlbot-manifest.json index d63b91d43329..330a927baa1f 100644 --- a/google-cloud-network_services-v1/.owlbot-manifest.json +++ b/google-cloud-network_services-v1/.owlbot-manifest.json @@ -40,6 +40,7 @@ "lib/google/cloud/networkservices/v1/dep_pb.rb", "lib/google/cloud/networkservices/v1/dep_services_pb.rb", "lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb", + "lib/google/cloud/networkservices/v1/extensibility_pb.rb", "lib/google/cloud/networkservices/v1/gateway_pb.rb", "lib/google/cloud/networkservices/v1/grpc_route_pb.rb", "lib/google/cloud/networkservices/v1/http_route_pb.rb", @@ -60,6 +61,7 @@ "proto_docs/google/cloud/networkservices/v1/common.rb", "proto_docs/google/cloud/networkservices/v1/dep.rb", "proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb", + "proto_docs/google/cloud/networkservices/v1/extensibility.rb", "proto_docs/google/cloud/networkservices/v1/gateway.rb", "proto_docs/google/cloud/networkservices/v1/grpc_route.rb", "proto_docs/google/cloud/networkservices/v1/http_route.rb", @@ -79,14 +81,19 @@ "proto_docs/google/rpc/status.rb", "proto_docs/google/type/expr.rb", "snippets/Gemfile", + "snippets/dep_service/create_authz_extension.rb", "snippets/dep_service/create_lb_route_extension.rb", "snippets/dep_service/create_lb_traffic_extension.rb", + "snippets/dep_service/delete_authz_extension.rb", "snippets/dep_service/delete_lb_route_extension.rb", "snippets/dep_service/delete_lb_traffic_extension.rb", + "snippets/dep_service/get_authz_extension.rb", "snippets/dep_service/get_lb_route_extension.rb", "snippets/dep_service/get_lb_traffic_extension.rb", + "snippets/dep_service/list_authz_extensions.rb", "snippets/dep_service/list_lb_route_extensions.rb", "snippets/dep_service/list_lb_traffic_extensions.rb", + "snippets/dep_service/update_authz_extension.rb", "snippets/dep_service/update_lb_route_extension.rb", "snippets/dep_service/update_lb_traffic_extension.rb", "snippets/network_services/create_endpoint_policy.rb", @@ -98,6 +105,8 @@ "snippets/network_services/create_service_lb_policy.rb", "snippets/network_services/create_tcp_route.rb", "snippets/network_services/create_tls_route.rb", + "snippets/network_services/create_wasm_plugin.rb", + "snippets/network_services/create_wasm_plugin_version.rb", "snippets/network_services/delete_endpoint_policy.rb", "snippets/network_services/delete_gateway.rb", "snippets/network_services/delete_grpc_route.rb", @@ -107,6 +116,8 @@ "snippets/network_services/delete_service_lb_policy.rb", "snippets/network_services/delete_tcp_route.rb", "snippets/network_services/delete_tls_route.rb", + "snippets/network_services/delete_wasm_plugin.rb", + "snippets/network_services/delete_wasm_plugin_version.rb", "snippets/network_services/get_endpoint_policy.rb", "snippets/network_services/get_gateway.rb", "snippets/network_services/get_gateway_route_view.rb", @@ -118,6 +129,8 @@ "snippets/network_services/get_service_lb_policy.rb", "snippets/network_services/get_tcp_route.rb", "snippets/network_services/get_tls_route.rb", + "snippets/network_services/get_wasm_plugin.rb", + "snippets/network_services/get_wasm_plugin_version.rb", "snippets/network_services/list_endpoint_policies.rb", "snippets/network_services/list_gateway_route_views.rb", "snippets/network_services/list_gateways.rb", @@ -129,6 +142,8 @@ "snippets/network_services/list_service_lb_policies.rb", "snippets/network_services/list_tcp_routes.rb", "snippets/network_services/list_tls_routes.rb", + "snippets/network_services/list_wasm_plugin_versions.rb", + "snippets/network_services/list_wasm_plugins.rb", "snippets/network_services/update_endpoint_policy.rb", "snippets/network_services/update_gateway.rb", "snippets/network_services/update_grpc_route.rb", @@ -138,6 +153,7 @@ "snippets/network_services/update_service_lb_policy.rb", "snippets/network_services/update_tcp_route.rb", "snippets/network_services/update_tls_route.rb", + "snippets/network_services/update_wasm_plugin.rb", "snippets/snippet_metadata_google.cloud.networkservices.v1.json", "test/google/cloud/network_services/v1/dep_service_operations_test.rb", "test/google/cloud/network_services/v1/dep_service_paths_test.rb", diff --git a/google-cloud-network_services-v1/gapic_metadata.json b/google-cloud-network_services-v1/gapic_metadata.json index 880f7362b1d3..a28ebd8382dd 100644 --- a/google-cloud-network_services-v1/gapic_metadata.json +++ b/google-cloud-network_services-v1/gapic_metadata.json @@ -59,6 +59,31 @@ "methods": [ "delete_lb_route_extension" ] + }, + "ListAuthzExtensions": { + "methods": [ + "list_authz_extensions" + ] + }, + "GetAuthzExtension": { + "methods": [ + "get_authz_extension" + ] + }, + "CreateAuthzExtension": { + "methods": [ + "create_authz_extension" + ] + }, + "UpdateAuthzExtension": { + "methods": [ + "update_authz_extension" + ] + }, + "DeleteAuthzExtension": { + "methods": [ + "delete_authz_extension" + ] } } } @@ -94,6 +119,51 @@ "delete_endpoint_policy" ] }, + "ListWasmPluginVersions": { + "methods": [ + "list_wasm_plugin_versions" + ] + }, + "GetWasmPluginVersion": { + "methods": [ + "get_wasm_plugin_version" + ] + }, + "CreateWasmPluginVersion": { + "methods": [ + "create_wasm_plugin_version" + ] + }, + "DeleteWasmPluginVersion": { + "methods": [ + "delete_wasm_plugin_version" + ] + }, + "ListWasmPlugins": { + "methods": [ + "list_wasm_plugins" + ] + }, + "GetWasmPlugin": { + "methods": [ + "get_wasm_plugin" + ] + }, + "CreateWasmPlugin": { + "methods": [ + "create_wasm_plugin" + ] + }, + "UpdateWasmPlugin": { + "methods": [ + "update_wasm_plugin" + ] + }, + "DeleteWasmPlugin": { + "methods": [ + "delete_wasm_plugin" + ] + }, "ListGateways": { "methods": [ "list_gateways" diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb index e82ed59591fc..32594eebd639 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb @@ -251,7 +251,7 @@ def logger # # @param parent [::String] # Required. The project and location from which the `LbTrafficExtension` - # resources are listed, specified in the following format: + # resources are listed. These values are specified in the following format: # `projects/{project}/locations/{location}`. # @param page_size [::Integer] # Optional. Requested page size. The server might return fewer items than @@ -261,7 +261,7 @@ def logger # @param filter [::String] # Optional. Filtering results. # @param order_by [::String] - # Optional. Hint for how to order the results. + # Optional. Hint about how to order the results. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] @@ -451,12 +451,11 @@ def get_lb_traffic_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -556,7 +555,7 @@ def create_lb_traffic_extension request, options = nil # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Optional. Used to specify the fields to be overwritten in the # `LbTrafficExtension` resource by the update. - # The fields specified in the update_mask are relative to the resource, not + # The fields specified in the `update_mask` are relative to the resource, not # the full request. A field is overwritten if it is in the mask. If the # user does not specify a mask, then all fields are overwritten. # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] @@ -565,12 +564,11 @@ def create_lb_traffic_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -675,12 +673,11 @@ def update_lb_traffic_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes after the first request. + # that for 60 minutes after the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -779,7 +776,7 @@ def delete_lb_traffic_extension request, options = nil # # @param parent [::String] # Required. The project and location from which the `LbRouteExtension` - # resources are listed, specified in the following format: + # resources are listed. These values are specified in the following format: # `projects/{project}/locations/{location}`. # @param page_size [::Integer] # Optional. Requested page size. The server might return fewer items than @@ -789,7 +786,7 @@ def delete_lb_traffic_extension request, options = nil # @param filter [::String] # Optional. Filtering results. # @param order_by [::String] - # Optional. Hint for how to order the results. + # Optional. Hint about how to order the results. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] @@ -978,12 +975,11 @@ def get_lb_route_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -1083,7 +1079,7 @@ def create_lb_route_extension request, options = nil # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Optional. Used to specify the fields to be overwritten in the # `LbRouteExtension` resource by the update. - # The fields specified in the update_mask are relative to the resource, not + # The fields specified in the `update_mask` are relative to the resource, not # the full request. A field is overwritten if it is in the mask. If the # user does not specify a mask, then all fields are overwritten. # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] @@ -1092,12 +1088,11 @@ def create_lb_route_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -1202,12 +1197,11 @@ def update_lb_route_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes after the first request. + # that for 60 minutes after the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -1286,6 +1280,532 @@ def delete_lb_route_extension request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists `AuthzExtension` resources in a given project and location. + # + # @overload list_authz_extensions(request, options = nil) + # Pass arguments to `list_authz_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::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_authz_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_authz_extensions` 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 from which the `AuthzExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new + # + # # Call the list_authz_extensions method. + # result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. + # p item + # end + # + def list_authz_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest + + # 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_authz_extensions.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_authz_extensions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_authz_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :list_authz_extensions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_authz_extensions, 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 + + ## + # Gets details of the specified `AuthzExtension` resource. + # + # @overload get_authz_extension(request, options = nil) + # Pass arguments to `get_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::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_authz_extension(name: nil) + # Pass arguments to `get_authz_extension` 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. A name of the `AuthzExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new + # + # # Call the get_authz_extension method. + # result = client.get_authz_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. + # p result + # + def get_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest + + # 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_authz_extension.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_authz_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :get_authz_extension, 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 + + ## + # Creates a new `AuthzExtension` resource in a given project + # and location. + # + # @overload create_authz_extension(request, options = nil) + # Pass arguments to `create_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::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_authz_extension(parent: nil, authz_extension_id: nil, authz_extension: nil, request_id: nil) + # Pass arguments to `create_authz_extension` 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 parent resource of the `AuthzExtension` resource. Must + # be in the format `projects/{project}/locations/{location}`. + # @param authz_extension_id [::String] + # Required. User-provided ID of the `AuthzExtension` resource to be + # created. + # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] + # Required. `AuthzExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new + # + # # Call the create_authz_extension method. + # result = client.create_authz_extension request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest + + # 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_authz_extension.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_authz_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :create_authz_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `AuthzExtension` + # resource. + # + # @overload update_authz_extension(request, options = nil) + # Pass arguments to `update_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::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 update_authz_extension(update_mask: nil, authz_extension: nil, request_id: nil) + # Pass arguments to `update_authz_extension` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Used to specify the fields to be overwritten in the + # `AuthzExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] + # Required. `AuthzExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new + # + # # Call the update_authz_extension method. + # result = client.update_authz_extension request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest + + # 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.update_authz_extension.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.authz_extension&.name + header_params["authz_extension.name"] = request.authz_extension.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.update_authz_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :update_authz_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified `AuthzExtension` resource. + # + # @overload delete_authz_extension(request, options = nil) + # Pass arguments to `delete_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::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_authz_extension(name: nil, request_id: nil) + # Pass arguments to `delete_authz_extension` 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 name of the `AuthzExtension` resource to delete. Must + # be in the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new + # + # # Call the delete_authz_extension method. + # result = client.delete_authz_extension request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest + + # 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_authz_extension.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_authz_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :delete_authz_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 DepService API. # @@ -1502,6 +2022,31 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_lb_route_extension + ## + # RPC-specific configuration for `list_authz_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_authz_extensions + ## + # RPC-specific configuration for `get_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_authz_extension + ## + # RPC-specific configuration for `create_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_authz_extension + ## + # RPC-specific configuration for `update_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_authz_extension + ## + # RPC-specific configuration for `delete_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_authz_extension # @private def initialize parent_rpcs = nil @@ -1525,6 +2070,16 @@ def initialize parent_rpcs = nil @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config + list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions + @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config + get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension + @get_authz_extension = ::Gapic::Config::Method.new get_authz_extension_config + create_authz_extension_config = parent_rpcs.create_authz_extension if parent_rpcs.respond_to? :create_authz_extension + @create_authz_extension = ::Gapic::Config::Method.new create_authz_extension_config + update_authz_extension_config = parent_rpcs.update_authz_extension if parent_rpcs.respond_to? :update_authz_extension + @update_authz_extension = ::Gapic::Config::Method.new update_authz_extension_config + delete_authz_extension_config = parent_rpcs.delete_authz_extension if parent_rpcs.respond_to? :delete_authz_extension + @delete_authz_extension = ::Gapic::Config::Method.new delete_authz_extension_config yield self if block_given? end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb index 3d93c381623b..4087ff42a9ec 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb @@ -24,6 +24,25 @@ module V1 module DepService # Path helper methods for the DepService API. module Paths + ## + # Create a fully-qualified AuthzExtension resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` + # + # @param project [String] + # @param location [String] + # @param authz_extension [String] + # + # @return [::String] + def authz_extension_path project:, location:, authz_extension: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/authzExtensions/#{authz_extension}" + end + ## # Create a fully-qualified LbRouteExtension resource string. # diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb index b40f04bb38cd..d7cb6b768f0f 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb @@ -246,7 +246,7 @@ def logger # # @param parent [::String] # Required. The project and location from which the `LbTrafficExtension` - # resources are listed, specified in the following format: + # resources are listed. These values are specified in the following format: # `projects/{project}/locations/{location}`. # @param page_size [::Integer] # Optional. Requested page size. The server might return fewer items than @@ -256,7 +256,7 @@ def logger # @param filter [::String] # Optional. Filtering results. # @param order_by [::String] - # Optional. Hint for how to order the results. + # Optional. Hint about how to order the results. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -432,12 +432,11 @@ def get_lb_traffic_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -530,7 +529,7 @@ def create_lb_traffic_extension request, options = nil # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Optional. Used to specify the fields to be overwritten in the # `LbTrafficExtension` resource by the update. - # The fields specified in the update_mask are relative to the resource, not + # The fields specified in the `update_mask` are relative to the resource, not # the full request. A field is overwritten if it is in the mask. If the # user does not specify a mask, then all fields are overwritten. # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] @@ -539,12 +538,11 @@ def create_lb_traffic_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -642,12 +640,11 @@ def update_lb_traffic_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes after the first request. + # that for 60 minutes after the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -739,7 +736,7 @@ def delete_lb_traffic_extension request, options = nil # # @param parent [::String] # Required. The project and location from which the `LbRouteExtension` - # resources are listed, specified in the following format: + # resources are listed. These values are specified in the following format: # `projects/{project}/locations/{location}`. # @param page_size [::Integer] # Optional. Requested page size. The server might return fewer items than @@ -749,7 +746,7 @@ def delete_lb_traffic_extension request, options = nil # @param filter [::String] # Optional. Filtering results. # @param order_by [::String] - # Optional. Hint for how to order the results. + # Optional. Hint about how to order the results. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -924,12 +921,11 @@ def get_lb_route_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -1022,7 +1018,7 @@ def create_lb_route_extension request, options = nil # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Optional. Used to specify the fields to be overwritten in the # `LbRouteExtension` resource by the update. - # The fields specified in the update_mask are relative to the resource, not + # The fields specified in the `update_mask` are relative to the resource, not # the full request. A field is overwritten if it is in the mask. If the # user does not specify a mask, then all fields are overwritten. # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] @@ -1031,12 +1027,11 @@ def create_lb_route_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -1134,12 +1129,11 @@ def update_lb_route_extension request, options = nil # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes after the first request. + # that for 60 minutes after the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -1211,6 +1205,497 @@ def delete_lb_route_extension request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists `AuthzExtension` resources in a given project and location. + # + # @overload list_authz_extensions(request, options = nil) + # Pass arguments to `list_authz_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::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_authz_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_authz_extensions` 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 from which the `AuthzExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new + # + # # Call the list_authz_extensions method. + # result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. + # p item + # end + # + def list_authz_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest + + # 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_authz_extensions.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::NetworkServices::V1::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_authz_extensions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_authz_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.list_authz_extensions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_authz_extensions, "authz_extensions", 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 + + ## + # Gets details of the specified `AuthzExtension` resource. + # + # @overload get_authz_extension(request, options = nil) + # Pass arguments to `get_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::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_authz_extension(name: nil) + # Pass arguments to `get_authz_extension` 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. A name of the `AuthzExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new + # + # # Call the get_authz_extension method. + # result = client.get_authz_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. + # p result + # + def get_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest + + # 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_authz_extension.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::NetworkServices::V1::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_authz_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.get_authz_extension 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 + + ## + # Creates a new `AuthzExtension` resource in a given project + # and location. + # + # @overload create_authz_extension(request, options = nil) + # Pass arguments to `create_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::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_authz_extension(parent: nil, authz_extension_id: nil, authz_extension: nil, request_id: nil) + # Pass arguments to `create_authz_extension` 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 parent resource of the `AuthzExtension` resource. Must + # be in the format `projects/{project}/locations/{location}`. + # @param authz_extension_id [::String] + # Required. User-provided ID of the `AuthzExtension` resource to be + # created. + # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] + # Required. `AuthzExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new + # + # # Call the create_authz_extension method. + # result = client.create_authz_extension request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest + + # 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_authz_extension.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::NetworkServices::V1::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_authz_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.create_authz_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `AuthzExtension` + # resource. + # + # @overload update_authz_extension(request, options = nil) + # Pass arguments to `update_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::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 update_authz_extension(update_mask: nil, authz_extension: nil, request_id: nil) + # Pass arguments to `update_authz_extension` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Used to specify the fields to be overwritten in the + # `AuthzExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] + # Required. `AuthzExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new + # + # # Call the update_authz_extension method. + # result = client.update_authz_extension request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest + + # 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.update_authz_extension.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::NetworkServices::V1::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.update_authz_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.update_authz_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 the specified `AuthzExtension` resource. + # + # @overload delete_authz_extension(request, options = nil) + # Pass arguments to `delete_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::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_authz_extension(name: nil, request_id: nil) + # Pass arguments to `delete_authz_extension` 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 name of the `AuthzExtension` resource to delete. Must + # be in the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new + # + # # Call the delete_authz_extension method. + # result = client.delete_authz_extension request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest + + # 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_authz_extension.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::NetworkServices::V1::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_authz_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.delete_authz_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 DepService REST API. # @@ -1414,6 +1899,31 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_lb_route_extension + ## + # RPC-specific configuration for `list_authz_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_authz_extensions + ## + # RPC-specific configuration for `get_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_authz_extension + ## + # RPC-specific configuration for `create_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_authz_extension + ## + # RPC-specific configuration for `update_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_authz_extension + ## + # RPC-specific configuration for `delete_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_authz_extension # @private def initialize parent_rpcs = nil @@ -1437,6 +1947,16 @@ def initialize parent_rpcs = nil @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config + list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions + @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config + get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension + @get_authz_extension = ::Gapic::Config::Method.new get_authz_extension_config + create_authz_extension_config = parent_rpcs.create_authz_extension if parent_rpcs.respond_to? :create_authz_extension + @create_authz_extension = ::Gapic::Config::Method.new create_authz_extension_config + update_authz_extension_config = parent_rpcs.update_authz_extension if parent_rpcs.respond_to? :update_authz_extension + @update_authz_extension = ::Gapic::Config::Method.new update_authz_extension_config + delete_authz_extension_config = parent_rpcs.delete_authz_extension if parent_rpcs.respond_to? :delete_authz_extension + @delete_authz_extension = ::Gapic::Config::Method.new delete_authz_extension_config yield self if block_given? end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb index 30a227e70930..105298763fa4 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb @@ -473,6 +473,206 @@ def delete_lb_route_extension request_pb, options = nil end end + ## + # Baseline implementation for the list_authz_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest] + # 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::NetworkServices::V1::ListAuthzExtensionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse] + # A result object deserialized from the server's reply + def list_authz_extensions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_authz_extensions_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_authz_extensions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest] + # 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::NetworkServices::V1::AuthzExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # A result object deserialized from the server's reply + def get_authz_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_authz_extension_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_authz_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::AuthzExtension.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_authz_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_authz_extension_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_authz_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_authz_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_authz_extension_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: "update_authz_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_authz_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_authz_extension_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_authz_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -686,6 +886,113 @@ def self.transcode_delete_lb_route_extension_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the list_authz_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest] + # 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_authz_extensions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/authzExtensions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest] + # 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_authz_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest] + # 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_authz_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/authzExtensions", + body: "authz_extension", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_authz_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{authz_extension.name}", + body: "authz_extension", + matches: [ + ["authz_extension.name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest] + # 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_authz_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb index c062450d2c05..6467af7d607a 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb @@ -715,6 +715,887 @@ def delete_endpoint_policy request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists `WasmPluginVersion` resources in a given project and + # location. + # + # @overload list_wasm_plugin_versions(request, options = nil) + # Pass arguments to `list_wasm_plugin_versions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_wasm_plugin_versions` 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 `WasmPlugin` resource whose `WasmPluginVersion`s + # are listed, specified in the following format: + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param page_size [::Integer] + # Maximum number of `WasmPluginVersion` resources to return per + # call. If not specified, at most 50 `WasmPluginVersion` resources are + # returned. The maximum value is 1000; values above 1000 are coerced to + # 1000. + # @param page_token [::String] + # The value returned by the last `ListWasmPluginVersionsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPluginVersions` call, and that the + # next page of data is to be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new + # + # # Call the list_wasm_plugin_versions method. + # result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. + # p item + # end + # + def list_wasm_plugin_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest + + # 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_wasm_plugin_versions.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_wasm_plugin_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_wasm_plugin_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, 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 + + ## + # Gets details of the specified `WasmPluginVersion` resource. + # + # @overload get_wasm_plugin_version(request, options = nil) + # Pass arguments to `get_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::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_wasm_plugin_version(name: nil) + # Pass arguments to `get_wasm_plugin_version` 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. A name of the `WasmPluginVersion` resource to get. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new + # + # # Call the get_wasm_plugin_version method. + # result = client.get_wasm_plugin_version request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. + # p result + # + def get_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest + + # 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_wasm_plugin_version.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_wasm_plugin_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_wasm_plugin_version, 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 + + ## + # Creates a new `WasmPluginVersion` resource in a given project + # and location. + # + # @overload create_wasm_plugin_version(request, options = nil) + # Pass arguments to `create_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) + # Pass arguments to `create_wasm_plugin_version` 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 parent resource of the `WasmPluginVersion` resource. Must be + # in the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param wasm_plugin_version_id [::String] + # Required. User-provided ID of the `WasmPluginVersion` resource to be + # created. + # @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash] + # Required. `WasmPluginVersion` resource to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new + # + # # Call the create_wasm_plugin_version method. + # result = client.create_wasm_plugin_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest + + # 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_wasm_plugin_version.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_wasm_plugin_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_wasm_plugin_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified `WasmPluginVersion` resource. + # + # @overload delete_wasm_plugin_version(request, options = nil) + # Pass arguments to `delete_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::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_wasm_plugin_version(name: nil) + # Pass arguments to `delete_wasm_plugin_version` 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. A name of the `WasmPluginVersion` resource to delete. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new + # + # # Call the delete_wasm_plugin_version method. + # result = client.delete_wasm_plugin_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest + + # 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_wasm_plugin_version.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_wasm_plugin_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_wasm_plugin_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `WasmPlugin` resources in a given project and + # location. + # + # @overload list_wasm_plugins(request, options = nil) + # Pass arguments to `list_wasm_plugins` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_wasm_plugins` 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 from which the `WasmPlugin` resources + # are listed, specified in the following format: + # `projects/{project}/locations/global`. + # @param page_size [::Integer] + # Maximum number of `WasmPlugin` resources to return per call. + # If not specified, at most 50 `WasmPlugin` resources are returned. + # The maximum value is 1000; values above 1000 are coerced to 1000. + # @param page_token [::String] + # The value returned by the last `ListWasmPluginsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPlugins` call, and that the + # next page of data is to be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new + # + # # Call the list_wasm_plugins method. + # result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. + # p item + # end + # + def list_wasm_plugins request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest + + # 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_wasm_plugins.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_wasm_plugins.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_wasm_plugins.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_wasm_plugins, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, 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 + + ## + # Gets details of the specified `WasmPlugin` resource. + # + # @overload get_wasm_plugin(request, options = nil) + # Pass arguments to `get_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::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_wasm_plugin(name: nil, view: nil) + # Pass arguments to `get_wasm_plugin` 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. A name of the `WasmPlugin` resource to get. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView] + # Determines how much data must be returned in the response. See + # [AIP-157](https://google.aip.dev/157). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new + # + # # Call the get_wasm_plugin method. + # result = client.get_wasm_plugin request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. + # p result + # + def get_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest + + # 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_wasm_plugin.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_wasm_plugin.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_wasm_plugin, 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 + + ## + # Creates a new `WasmPlugin` resource in a given project + # and location. + # + # @overload create_wasm_plugin(request, options = nil) + # Pass arguments to `create_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) + # Pass arguments to `create_wasm_plugin` 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 parent resource of the `WasmPlugin` resource. Must be in the + # format `projects/{project}/locations/global`. + # @param wasm_plugin_id [::String] + # Required. User-provided ID of the `WasmPlugin` resource to be created. + # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] + # Required. `WasmPlugin` resource to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new + # + # # Call the create_wasm_plugin method. + # result = client.create_wasm_plugin request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest + + # 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_wasm_plugin.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_wasm_plugin.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_wasm_plugin, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `WasmPlugin` resource. + # + # @overload update_wasm_plugin(request, options = nil) + # Pass arguments to `update_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::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 update_wasm_plugin(update_mask: nil, wasm_plugin: nil) + # Pass arguments to `update_wasm_plugin` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `WasmPlugin` resource by the update. + # The fields specified in the `update_mask` field are relative to the + # resource, not the full request. + # An omitted `update_mask` field is treated as an implied `update_mask` + # field equivalent to all fields that are populated (that have a non-empty + # value). + # The `update_mask` field supports a special value `*`, which means that + # each field in the given `WasmPlugin` resource (including the empty ones) + # replaces the current value. + # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] + # Required. Updated `WasmPlugin` resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new + # + # # Call the update_wasm_plugin method. + # result = client.update_wasm_plugin request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest + + # 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.update_wasm_plugin.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.wasm_plugin&.name + header_params["wasm_plugin.name"] = request.wasm_plugin.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.update_wasm_plugin.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_wasm_plugin, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified `WasmPlugin` resource. + # + # @overload delete_wasm_plugin(request, options = nil) + # Pass arguments to `delete_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::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_wasm_plugin(name: nil) + # Pass arguments to `delete_wasm_plugin` 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. A name of the `WasmPlugin` resource to delete. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new + # + # # Call the delete_wasm_plugin method. + # result = client.delete_wasm_plugin request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest + + # 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_wasm_plugin.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::NetworkServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_wasm_plugin.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_wasm_plugin, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Lists Gateways in a given project and location. # @@ -5127,6 +6008,51 @@ class Rpcs # attr_reader :delete_endpoint_policy ## + # RPC-specific configuration for `list_wasm_plugin_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_wasm_plugin_versions + ## + # RPC-specific configuration for `get_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_wasm_plugin_version + ## + # RPC-specific configuration for `create_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_wasm_plugin_version + ## + # RPC-specific configuration for `delete_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_wasm_plugin_version + ## + # RPC-specific configuration for `list_wasm_plugins` + # @return [::Gapic::Config::Method] + # + attr_reader :list_wasm_plugins + ## + # RPC-specific configuration for `get_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :get_wasm_plugin + ## + # RPC-specific configuration for `create_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :create_wasm_plugin + ## + # RPC-specific configuration for `update_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :update_wasm_plugin + ## + # RPC-specific configuration for `delete_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_wasm_plugin + ## # RPC-specific configuration for `list_gateways` # @return [::Gapic::Config::Method] # @@ -5359,6 +6285,24 @@ def initialize parent_rpcs = nil @update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy @delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config + list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions + @list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config + get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version + @get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config + create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version + @create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config + delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version + @delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config + list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins + @list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config + get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin + @get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config + create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin + @create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config + update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin + @update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config + delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin + @delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways @list_gateways = ::Gapic::Config::Method.new list_gateways_config get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb index 689cd891d9e7..95061bacebe6 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb @@ -444,6 +444,46 @@ def tls_route_path project:, location:, tls_route: "projects/#{project}/locations/#{location}/tlsRoutes/#{tls_route}" end + ## + # Create a fully-qualified WasmPlugin resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}` + # + # @param project [String] + # @param location [String] + # @param wasm_plugin [String] + # + # @return [::String] + def wasm_plugin_path project:, location:, wasm_plugin: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/wasmPlugins/#{wasm_plugin}" + end + + ## + # Create a fully-qualified WasmPluginVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}` + # + # @param project [String] + # @param location [String] + # @param wasm_plugin [String] + # @param wasm_plugin_version [String] + # + # @return [::String] + def wasm_plugin_version_path project:, location:, wasm_plugin:, wasm_plugin_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "wasm_plugin cannot contain /" if wasm_plugin.to_s.include? "/" + + "projects/#{project}/locations/#{location}/wasmPlugins/#{wasm_plugin}/versions/#{wasm_plugin_version}" + end + extend self end end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb index 44a51665ebd4..8d351a69e77c 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb @@ -675,6 +675,824 @@ def delete_endpoint_policy request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists `WasmPluginVersion` resources in a given project and + # location. + # + # @overload list_wasm_plugin_versions(request, options = nil) + # Pass arguments to `list_wasm_plugin_versions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_wasm_plugin_versions` 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 `WasmPlugin` resource whose `WasmPluginVersion`s + # are listed, specified in the following format: + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param page_size [::Integer] + # Maximum number of `WasmPluginVersion` resources to return per + # call. If not specified, at most 50 `WasmPluginVersion` resources are + # returned. The maximum value is 1000; values above 1000 are coerced to + # 1000. + # @param page_token [::String] + # The value returned by the last `ListWasmPluginVersionsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPluginVersions` call, and that the + # next page of data is to be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new + # + # # Call the list_wasm_plugin_versions method. + # result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. + # p item + # end + # + def list_wasm_plugin_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest + + # 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_wasm_plugin_versions.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::NetworkServices::V1::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_wasm_plugin_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_wasm_plugin_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, "wasm_plugin_versions", 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 + + ## + # Gets details of the specified `WasmPluginVersion` resource. + # + # @overload get_wasm_plugin_version(request, options = nil) + # Pass arguments to `get_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::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_wasm_plugin_version(name: nil) + # Pass arguments to `get_wasm_plugin_version` 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. A name of the `WasmPluginVersion` resource to get. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new + # + # # Call the get_wasm_plugin_version method. + # result = client.get_wasm_plugin_version request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. + # p result + # + def get_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest + + # 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_wasm_plugin_version.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::NetworkServices::V1::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_wasm_plugin_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_wasm_plugin_version 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 + + ## + # Creates a new `WasmPluginVersion` resource in a given project + # and location. + # + # @overload create_wasm_plugin_version(request, options = nil) + # Pass arguments to `create_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) + # Pass arguments to `create_wasm_plugin_version` 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 parent resource of the `WasmPluginVersion` resource. Must be + # in the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param wasm_plugin_version_id [::String] + # Required. User-provided ID of the `WasmPluginVersion` resource to be + # created. + # @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash] + # Required. `WasmPluginVersion` resource to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new + # + # # Call the create_wasm_plugin_version method. + # result = client.create_wasm_plugin_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest + + # 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_wasm_plugin_version.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::NetworkServices::V1::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_wasm_plugin_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_wasm_plugin_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 the specified `WasmPluginVersion` resource. + # + # @overload delete_wasm_plugin_version(request, options = nil) + # Pass arguments to `delete_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::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_wasm_plugin_version(name: nil) + # Pass arguments to `delete_wasm_plugin_version` 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. A name of the `WasmPluginVersion` resource to delete. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new + # + # # Call the delete_wasm_plugin_version method. + # result = client.delete_wasm_plugin_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest + + # 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_wasm_plugin_version.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::NetworkServices::V1::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_wasm_plugin_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_wasm_plugin_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `WasmPlugin` resources in a given project and + # location. + # + # @overload list_wasm_plugins(request, options = nil) + # Pass arguments to `list_wasm_plugins` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_wasm_plugins` 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 from which the `WasmPlugin` resources + # are listed, specified in the following format: + # `projects/{project}/locations/global`. + # @param page_size [::Integer] + # Maximum number of `WasmPlugin` resources to return per call. + # If not specified, at most 50 `WasmPlugin` resources are returned. + # The maximum value is 1000; values above 1000 are coerced to 1000. + # @param page_token [::String] + # The value returned by the last `ListWasmPluginsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPlugins` call, and that the + # next page of data is to be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new + # + # # Call the list_wasm_plugins method. + # result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. + # p item + # end + # + def list_wasm_plugins request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest + + # 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_wasm_plugins.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::NetworkServices::V1::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_wasm_plugins.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_wasm_plugins.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_wasm_plugins request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, "wasm_plugins", 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 + + ## + # Gets details of the specified `WasmPlugin` resource. + # + # @overload get_wasm_plugin(request, options = nil) + # Pass arguments to `get_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::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_wasm_plugin(name: nil, view: nil) + # Pass arguments to `get_wasm_plugin` 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. A name of the `WasmPlugin` resource to get. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView] + # Determines how much data must be returned in the response. See + # [AIP-157](https://google.aip.dev/157). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new + # + # # Call the get_wasm_plugin method. + # result = client.get_wasm_plugin request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. + # p result + # + def get_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest + + # 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_wasm_plugin.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::NetworkServices::V1::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_wasm_plugin.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_wasm_plugin 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 + + ## + # Creates a new `WasmPlugin` resource in a given project + # and location. + # + # @overload create_wasm_plugin(request, options = nil) + # Pass arguments to `create_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) + # Pass arguments to `create_wasm_plugin` 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 parent resource of the `WasmPlugin` resource. Must be in the + # format `projects/{project}/locations/global`. + # @param wasm_plugin_id [::String] + # Required. User-provided ID of the `WasmPlugin` resource to be created. + # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] + # Required. `WasmPlugin` resource to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new + # + # # Call the create_wasm_plugin method. + # result = client.create_wasm_plugin request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest + + # 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_wasm_plugin.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::NetworkServices::V1::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_wasm_plugin.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_wasm_plugin request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `WasmPlugin` resource. + # + # @overload update_wasm_plugin(request, options = nil) + # Pass arguments to `update_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::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 update_wasm_plugin(update_mask: nil, wasm_plugin: nil) + # Pass arguments to `update_wasm_plugin` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `WasmPlugin` resource by the update. + # The fields specified in the `update_mask` field are relative to the + # resource, not the full request. + # An omitted `update_mask` field is treated as an implied `update_mask` + # field equivalent to all fields that are populated (that have a non-empty + # value). + # The `update_mask` field supports a special value `*`, which means that + # each field in the given `WasmPlugin` resource (including the empty ones) + # replaces the current value. + # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] + # Required. Updated `WasmPlugin` resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new + # + # # Call the update_wasm_plugin method. + # result = client.update_wasm_plugin request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest + + # 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.update_wasm_plugin.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::NetworkServices::V1::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.update_wasm_plugin.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_wasm_plugin request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 the specified `WasmPlugin` resource. + # + # @overload delete_wasm_plugin(request, options = nil) + # Pass arguments to `delete_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::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_wasm_plugin(name: nil) + # Pass arguments to `delete_wasm_plugin` 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. A name of the `WasmPlugin` resource to delete. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new + # + # # Call the delete_wasm_plugin method. + # result = client.delete_wasm_plugin request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest + + # 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_wasm_plugin.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::NetworkServices::V1::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_wasm_plugin.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_wasm_plugin request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Lists Gateways in a given project and location. # @@ -4766,6 +5584,51 @@ class Rpcs # attr_reader :delete_endpoint_policy ## + # RPC-specific configuration for `list_wasm_plugin_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_wasm_plugin_versions + ## + # RPC-specific configuration for `get_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_wasm_plugin_version + ## + # RPC-specific configuration for `create_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_wasm_plugin_version + ## + # RPC-specific configuration for `delete_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_wasm_plugin_version + ## + # RPC-specific configuration for `list_wasm_plugins` + # @return [::Gapic::Config::Method] + # + attr_reader :list_wasm_plugins + ## + # RPC-specific configuration for `get_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :get_wasm_plugin + ## + # RPC-specific configuration for `create_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :create_wasm_plugin + ## + # RPC-specific configuration for `update_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :update_wasm_plugin + ## + # RPC-specific configuration for `delete_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_wasm_plugin + ## # RPC-specific configuration for `list_gateways` # @return [::Gapic::Config::Method] # @@ -4998,6 +5861,24 @@ def initialize parent_rpcs = nil @update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy @delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config + list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions + @list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config + get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version + @get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config + create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version + @create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config + delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version + @delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config + list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins + @list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config + get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin + @get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config + create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin + @create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config + update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin + @update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config + delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin + @delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways @list_gateways = ::Gapic::Config::Method.new list_gateways_config get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb index 3f7b86fea53c..ebeca45c1c1e 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb @@ -273,6 +273,366 @@ def delete_endpoint_policy request_pb, options = nil end end + ## + # Baseline implementation for the list_wasm_plugin_versions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest] + # 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::NetworkServices::V1::ListWasmPluginVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse] + # A result object deserialized from the server's reply + def list_wasm_plugin_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_wasm_plugin_versions_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_wasm_plugin_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest] + # 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::NetworkServices::V1::WasmPluginVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # A result object deserialized from the server's reply + def get_wasm_plugin_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_wasm_plugin_version_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_wasm_plugin_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_wasm_plugin_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_wasm_plugin_version_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_wasm_plugin_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_wasm_plugin_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_wasm_plugin_version_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_wasm_plugin_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_wasm_plugins REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest] + # 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::NetworkServices::V1::ListWasmPluginsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse] + # A result object deserialized from the server's reply + def list_wasm_plugins request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_wasm_plugins_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_wasm_plugins", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest] + # 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::NetworkServices::V1::WasmPlugin] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # A result object deserialized from the server's reply + def get_wasm_plugin request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_wasm_plugin_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_wasm_plugin", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::WasmPlugin.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_wasm_plugin request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_wasm_plugin_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_wasm_plugin", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_wasm_plugin request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_wasm_plugin_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: "update_wasm_plugin", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_wasm_plugin request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_wasm_plugin_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_wasm_plugin", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_gateways REST call # @@ -2140,6 +2500,198 @@ def self.transcode_delete_endpoint_policy_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the list_wasm_plugin_versions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest] + # 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_wasm_plugin_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest] + # 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_wasm_plugin_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest] + # 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_wasm_plugin_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/versions", + body: "wasm_plugin_version", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest] + # 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_wasm_plugin_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_wasm_plugins REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest] + # 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_wasm_plugins_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/wasmPlugins", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest] + # 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_wasm_plugin_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest] + # 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_wasm_plugin_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/wasmPlugins", + body: "wasm_plugin", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_wasm_plugin_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{wasm_plugin.name}", + body: "wasm_plugin", + matches: [ + ["wasm_plugin.name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest] + # 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_wasm_plugin_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb index 4b1caf9aa901..1025d92674dd 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb @@ -18,7 +18,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x04\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xfe\x01\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02\x32\xee\x14\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x04\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xae\x02\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12.\n\x08metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb5\x06\n\x0e\x41uthzExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x05 \x03(\x0b\x32;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x15load_balancing_scheme\x18\x06 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12\x16\n\tauthority\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07service\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x16\n\tfail_open\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12.\n\x08metadata\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x45\n\x0bwire_format\x18\x0e \x01(\x0e\x32+.google.cloud.networkservices.v1.WireFormatB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9f\x01\xea\x41\x9b\x01\n-networkservices.googleapis.com/AuthzExtension\x12Iprojects/{project}/locations/{location}/authzExtensions/{authz_extension}*\x0f\x61uthzExtensions2\x0e\x61uthzExtension\"\xc0\x01\n\x1aListAuthzExtensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1bListAuthzExtensionsResponse\x12I\n\x10\x61uthz_extensions\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\"\xf5\x01\n\x1b\x43reateAuthzExtensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\x12\x61uthz_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc3\x01\n\x1bUpdateAuthzExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x83\x01\n\x1b\x44\x65leteAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02*<\n\nWireFormat\x12\x1b\n\x17WIRE_FORMAT_UNSPECIFIED\x10\x00\x12\x11\n\rEXT_PROC_GRPC\x10\x01\x32\xa4\x1e\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xd6\x01\n\x13ListAuthzExtensions\x12;.google.cloud.networkservices.v1.ListAuthzExtensionsRequest\x1a<.google.cloud.networkservices.v1.ListAuthzExtensionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/authzExtensions\x12\xc3\x01\n\x11GetAuthzExtension\x12\x39.google.cloud.networkservices.v1.GetAuthzExtensionRequest\x1a/.google.cloud.networkservices.v1.AuthzExtension\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/authzExtensions/*}\x12\x94\x02\n\x14\x43reateAuthzExtension\x12<.google.cloud.networkservices.v1.CreateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41)parent,authz_extension,authz_extension_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/authzExtensions:\x0f\x61uthz_extension\x12\x96\x02\n\x14UpdateAuthzExtension\x12<.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41\x1b\x61uthz_extension,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}:\x0f\x61uthz_extension\x12\xe4\x01\n\x14\x44\x65leteAuthzExtension\x12<.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/authzExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -34,8 +34,8 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ] imports.each do |type_name, expected_filename| @@ -69,8 +69,16 @@ module V1 CreateLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbRouteExtensionRequest").msgclass UpdateLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest").msgclass DeleteLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest").msgclass + AuthzExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AuthzExtension").msgclass + ListAuthzExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAuthzExtensionsRequest").msgclass + ListAuthzExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAuthzExtensionsResponse").msgclass + GetAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetAuthzExtensionRequest").msgclass + CreateAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateAuthzExtensionRequest").msgclass + UpdateAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateAuthzExtensionRequest").msgclass + DeleteAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteAuthzExtensionRequest").msgclass EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EventType").enummodule LoadBalancingScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LoadBalancingScheme").enummodule + WireFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WireFormat").enummodule end end end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb index aadaf90beb54..b15160aba2cc 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb @@ -54,6 +54,18 @@ class Service rpc :UpdateLbRouteExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Google::Longrunning::Operation # Deletes the specified `LbRouteExtension` resource. rpc :DeleteLbRouteExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Google::Longrunning::Operation + # Lists `AuthzExtension` resources in a given project and location. + rpc :ListAuthzExtensions, ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse + # Gets details of the specified `AuthzExtension` resource. + rpc :GetAuthzExtension, ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Google::Cloud::NetworkServices::V1::AuthzExtension + # Creates a new `AuthzExtension` resource in a given project + # and location. + rpc :CreateAuthzExtension, ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Google::Longrunning::Operation + # Updates the parameters of the specified `AuthzExtension` + # resource. + rpc :UpdateAuthzExtension, ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Google::Longrunning::Operation + # Deletes the specified `AuthzExtension` resource. + rpc :DeleteAuthzExtension, ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb new file mode 100644 index 000000000000..69d658a7cc23 --- /dev/null +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/extensibility.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/networkservices/v1/extensibility.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x0b\n\nWasmPlugin\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12L\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.cloud.networkservices.v1.WasmPlugin.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fmain_version_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12N\n\nlog_config\x18\t \x01(\x0b\x32\x35.google.cloud.networkservices.v1.WasmPlugin.LogConfigB\x03\xe0\x41\x01\x12P\n\x08versions\x18\n \x03(\x0b\x32\x39.google.cloud.networkservices.v1.WasmPlugin.VersionsEntryB\x03\xe0\x41\x01\x12H\n\x07used_by\x18\x0b \x03(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPlugin.UsedByB\x03\xe0\x41\x03\x1a\xcb\x03\n\x0eVersionDetails\x12\x1c\n\x12plugin_config_data\x18\t \x01(\x0cH\x00\x12\x1b\n\x11plugin_config_uri\x18\n \x01(\tH\x00\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12[\n\x06labels\x18\x04 \x03(\x0b\x32\x46.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.LabelsEntryB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cimage_digest\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14plugin_config_digest\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14plugin_config_source\x1a\x80\x02\n\tLogConfig\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bsample_rate\x18\x02 \x01(\x02\x42\x03\xe0\x41\x07\x12Z\n\rmin_log_level\x18\x03 \x01(\x0e\x32>.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevelB\x03\xe0\x41\x07\"h\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x08\n\x04WARN\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x43RITICAL\x10\x06\x1a\x1b\n\x06UsedBy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\rVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12I\n\x05value\x18\x02 \x01(\x0b\x32:.google.cloud.networkservices.v1.WasmPlugin.VersionDetails:\x02\x38\x01:q\xea\x41n\n)networkservices.googleapis.com/WasmPlugin\x12\x41projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}\"\xf4\x04\n\x11WasmPluginVersion\x12\x1c\n\x12plugin_config_data\x18\x0c \x01(\x0cH\x00\x12\x1b\n\x11plugin_config_uri\x18\r \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.WasmPluginVersion.LabelsEntryB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cimage_digest\x18\t \x01(\tB\x03\xe0\x41\x03\x12!\n\x14plugin_config_digest\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x98\x01\xea\x41\x94\x01\n0networkservices.googleapis.com/WasmPluginVersion\x12`projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}B\x16\n\x14plugin_config_source\"\x82\x01\n\x16ListWasmPluginsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)networkservices.googleapis.com/WasmPlugin\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8a\x01\n\x17ListWasmPluginsResponse\x12\x41\n\x0cwasm_plugins\x18\x01 \x03(\x0b\x32+.google.cloud.networkservices.v1.WasmPlugin\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x96\x01\n\x14GetWasmPluginRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)networkservices.googleapis.com/WasmPlugin\x12=\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.networkservices.v1.WasmPluginView\"\xc0\x01\n\x17\x43reateWasmPluginRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)networkservices.googleapis.com/WasmPlugin\x12\x1b\n\x0ewasm_plugin_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0bwasm_plugin\x18\x03 \x01(\x0b\x32+.google.cloud.networkservices.v1.WasmPluginB\x03\xe0\x41\x02\"\x96\x01\n\x17UpdateWasmPluginRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x45\n\x0bwasm_plugin\x18\x02 \x01(\x0b\x32+.google.cloud.networkservices.v1.WasmPluginB\x03\xe0\x41\x02\"Z\n\x17\x44\x65leteWasmPluginRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)networkservices.googleapis.com/WasmPlugin\"\x90\x01\n\x1dListWasmPluginVersionsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkservices.googleapis.com/WasmPluginVersion\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa0\x01\n\x1eListWasmPluginVersionsResponse\x12P\n\x14wasm_plugin_versions\x18\x01 \x03(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPluginVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"e\n\x1bGetWasmPluginVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkservices.googleapis.com/WasmPluginVersion\"\xe5\x01\n\x1e\x43reateWasmPluginVersionRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkservices.googleapis.com/WasmPluginVersion\x12#\n\x16wasm_plugin_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13wasm_plugin_version\x18\x03 \x01(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPluginVersionB\x03\xe0\x41\x02\"h\n\x1e\x44\x65leteWasmPluginVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkservices.googleapis.com/WasmPluginVersion*i\n\x0eWasmPluginView\x12 \n\x1cWASM_PLUGIN_VIEW_UNSPECIFIED\x10\x00\x12\x1a\n\x16WASM_PLUGIN_VIEW_BASIC\x10\x01\x12\x19\n\x15WASM_PLUGIN_VIEW_FULL\x10\x02\x42\xf3\x01\n#com.google.cloud.networkservices.v1B\x12\x45xtensibilityProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module NetworkServices + module V1 + WasmPlugin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin").msgclass + WasmPlugin::VersionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.VersionDetails").msgclass + WasmPlugin::LogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.LogConfig").msgclass + WasmPlugin::LogConfig::LogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel").enummodule + WasmPlugin::UsedBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.UsedBy").msgclass + WasmPluginVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPluginVersion").msgclass + ListWasmPluginsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginsRequest").msgclass + ListWasmPluginsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginsResponse").msgclass + GetWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetWasmPluginRequest").msgclass + CreateWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateWasmPluginRequest").msgclass + UpdateWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateWasmPluginRequest").msgclass + DeleteWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteWasmPluginRequest").msgclass + ListWasmPluginVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginVersionsRequest").msgclass + ListWasmPluginVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginVersionsResponse").msgclass + GetWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetWasmPluginVersionRequest").msgclass + CreateWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateWasmPluginVersionRequest").msgclass + DeleteWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest").msgclass + WasmPluginView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPluginView").enummodule + end + end + end +end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb index 78e8feadc7ce..e0ad316f78d3 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb @@ -8,6 +8,7 @@ require 'google/api/client_pb' require 'google/cloud/networkservices/v1/common_pb' require 'google/cloud/networkservices/v1/endpoint_policy_pb' +require 'google/cloud/networkservices/v1/extensibility_pb' require 'google/cloud/networkservices/v1/gateway_pb' require 'google/cloud/networkservices/v1/grpc_route_pb' require 'google/cloud/networkservices/v1/http_route_pb' @@ -18,9 +19,10 @@ require 'google/cloud/networkservices/v1/tcp_route_pb' require 'google/cloud/networkservices/v1/tls_route_pb' require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' -descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto2\xe8[\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a\x33google/cloud/networkservices/v1/extensibility.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto2\xc2m\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xe6\x01\n\x16ListWasmPluginVersions\x12>.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest\x1a?.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions\x12\xd3\x01\n\x14GetWasmPluginVersion\x12<.google.cloud.networkservices.v1.GetWasmPluginVersionRequest\x1a\x32.google.cloud.networkservices.v1.WasmPluginVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xd0\x02\n\x17\x43reateWasmPluginVersion\x12?.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\xd4\x01\xca\x41\x46\n\x11WasmPluginVersion\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x31parent,wasm_plugin_version,wasm_plugin_version_id\x82\xd3\xe4\x93\x02Q\":/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions:\x13wasm_plugin_version\x12\x92\x02\n\x17\x44\x65leteWasmPluginVersion\x12?.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xc6\x01\n\x0fListWasmPlugins\x12\x37.google.cloud.networkservices.v1.ListWasmPluginsRequest\x1a\x38.google.cloud.networkservices.v1.ListWasmPluginsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/wasmPlugins\x12\xb3\x01\n\rGetWasmPlugin\x12\x35.google.cloud.networkservices.v1.GetWasmPluginRequest\x1a+.google.cloud.networkservices.v1.WasmPlugin\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\x98\x02\n\x10\x43reateWasmPlugin\x12\x38.google.cloud.networkservices.v1.CreateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41!parent,wasm_plugin,wasm_plugin_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/wasmPlugins:\x0bwasm_plugin\x12\x9a\x02\n\x10UpdateWasmPlugin\x12\x38.google.cloud.networkservices.v1.UpdateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x17wasm_plugin,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}:\x0bwasm_plugin\x12\xf9\x01\n\x10\x44\x65leteWasmPlugin\x12\x38.google.cloud.networkservices.v1.DeleteWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb index 937f52d82bbe..00e52df44ca1 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb @@ -43,6 +43,28 @@ class Service rpc :UpdateEndpointPolicy, ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Google::Longrunning::Operation # Deletes a single EndpointPolicy. rpc :DeleteEndpointPolicy, ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Google::Longrunning::Operation + # Lists `WasmPluginVersion` resources in a given project and + # location. + rpc :ListWasmPluginVersions, ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse + # Gets details of the specified `WasmPluginVersion` resource. + rpc :GetWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Google::Cloud::NetworkServices::V1::WasmPluginVersion + # Creates a new `WasmPluginVersion` resource in a given project + # and location. + rpc :CreateWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Google::Longrunning::Operation + # Deletes the specified `WasmPluginVersion` resource. + rpc :DeleteWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Google::Longrunning::Operation + # Lists `WasmPlugin` resources in a given project and + # location. + rpc :ListWasmPlugins, ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse + # Gets details of the specified `WasmPlugin` resource. + rpc :GetWasmPlugin, ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Google::Cloud::NetworkServices::V1::WasmPlugin + # Creates a new `WasmPlugin` resource in a given project + # and location. + rpc :CreateWasmPlugin, ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Google::Longrunning::Operation + # Updates the parameters of the specified `WasmPlugin` resource. + rpc :UpdateWasmPlugin, ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Google::Longrunning::Operation + # Deletes the specified `WasmPlugin` resource. + rpc :DeleteWasmPlugin, ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Google::Longrunning::Operation # Lists Gateways in a given project and location. rpc :ListGateways, ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse # Gets details of a single Gateway. diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb index 733757c45316..56665e646d5b 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb @@ -40,7 +40,8 @@ module V1 # At least one extension is required. # Up to 3 extensions can be defined for each extension chain # for `LbTrafficExtension` resource. - # `LbRouteExtension` chains are limited to 1 extension per extension chain. + # `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + # per extension chain. class ExtensionChain include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -72,12 +73,13 @@ class MatchCondition # Optional. The `:authority` header in the gRPC request sent from Envoy # to the extension service. # Required for Callout extensions. + # + # This field is not supported for plugin extensions. Setting it results in + # a validation error. # @!attribute [rw] service # @return [::String] # Required. The reference to the service that runs the extension. # - # Currently only callout extensions are supported here. - # # To configure a callout extension, `service` must be a fully-qualified # reference # to a [backend @@ -86,17 +88,38 @@ class MatchCondition # `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` # or # `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + # + # To configure a plugin extension, `service` must be a reference + # to a [`WasmPlugin` + # resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) + # in the format: + # `projects/{project}/locations/{location}/wasmPlugins/{plugin}` + # or + # `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`. + # + # Plugin extensions are currently supported for the + # `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` + # resources. # @!attribute [rw] supported_events # @return [::Array<::Google::Cloud::NetworkServices::V1::EventType>] # Optional. A set of events during request or response processing for which - # this extension is called. This field is required for the - # `LbTrafficExtension` resource. It must not be set for the - # `LbRouteExtension` resource. + # this extension is called. + # + # For the `LbTrafficExtension` resource, this field is required. + # + # For the `LbRouteExtension` resource, this field is optional. If + # unspecified, `REQUEST_HEADERS` event is assumed as supported. + # + # For the `LbEdgeExtension` resource, this field is required and must only + # contain `REQUEST_HEADERS` event. # @!attribute [rw] timeout # @return [::Google::Protobuf::Duration] # Optional. Specifies the timeout for each individual message on the - # stream. The timeout must be between 10-1000 milliseconds. Required for - # Callout extensions. + # stream. The timeout must be between `10`-`10000` milliseconds. Required + # for callout extensions. + # + # This field is not supported for plugin extensions. Setting it results in + # a validation error. # @!attribute [rw] fail_open # @return [::Boolean] # Optional. Determines how the proxy behaves if the call to the extension @@ -118,6 +141,36 @@ class MatchCondition # Optional. List of the HTTP headers to forward to the extension # (from the client or backend). If omitted, all headers are sent. # Each element is a string indicating the header name. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Struct] + # Optional. The metadata provided here is included as part of the + # `metadata_context` (of type `google.protobuf.Struct`) in the + # `ProcessingRequest` message sent to the extension server. + # + # The metadata is available under the namespace + # `com.google....`. + # For example: + # `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. + # + # The following variables are supported in the metadata: + # + # `{forwarding_rule_id}` - substituted with the forwarding rule's fully + # qualified resource name. + # + # This field must not be set for plugin extensions. Setting it results in + # a validation error. + # + # You can set metadata at either the resource level or the extension level. + # The extension level metadata is recommended because you can pass a + # different set of metadata through each extension to the backend. + # + # This field is subject to following limitations: + # + # * The total size of the metadata must be less than 1KiB. + # * The total number of keys in the metadata must be less than 16. + # * The length of each key must be less than 64 characters. + # * The length of each value must be less than 1024 characters. + # * All values must be strings. class Extension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -151,9 +204,10 @@ class Extension # for Google Cloud resources. # @!attribute [rw] forwarding_rules # @return [::Array<::String>] - # Required. A list of references to the forwarding rules to which this - # service extension is attached to. At least one forwarding rule is required. - # There can be only one `LBTrafficExtension` resource per forwarding rule. + # Optional. A list of references to the forwarding rules to which this + # service extension is attached. At least one forwarding rule is required. + # Only one `LbTrafficExtension` resource can be associated with a forwarding + # rule. # @!attribute [rw] extension_chains # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] # Required. A set of ordered extension chains that contain the match @@ -166,19 +220,32 @@ class Extension # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] # Required. All backend services and forwarding rules referenced by this # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - # [Choosing a load - # balancer](https://cloud.google.com/load-balancing/docs/backend-service). + # `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to + # [Backend services + # overview](https://cloud.google.com/load-balancing/docs/backend-service). # @!attribute [rw] metadata # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included in the - # `ProcessingRequest.metadata_context.filter_metadata` map field. The - # metadata is available under the key + # Optional. The metadata provided here is included as part of the + # `metadata_context` (of type `google.protobuf.Struct`) in the + # `ProcessingRequest` message sent to the extension server. + # + # The metadata applies to all extensions in all extensions chains in this + # resource. + # + # The metadata is available under the key # `com.google.lb_traffic_extension.`. + # # The following variables are supported in the metadata: # # `{forwarding_rule_id}` - substituted with the forwarding rule's fully # qualified resource name. + # + # This field must not be set if at least one of the extension chains + # contains plugin extensions. Setting it results in a validation error. + # + # You can set metadata at either the resource level or the extension level. + # The extension level metadata is recommended because you can pass a + # different set of metadata through each extension to the backend. class LbTrafficExtension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -197,7 +264,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the `LbTrafficExtension` - # resources are listed, specified in the following format: + # resources are listed. These values are specified in the following format: # `projects/{project}/locations/{location}`. # @!attribute [rw] page_size # @return [::Integer] @@ -211,7 +278,7 @@ class LabelsEntry # Optional. Filtering results. # @!attribute [rw] order_by # @return [::String] - # Optional. Hint for how to order the results. + # Optional. Hint about how to order the results. class ListLbTrafficExtensionsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -260,12 +327,11 @@ class GetLbTrafficExtensionRequest # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -280,7 +346,7 @@ class CreateLbTrafficExtensionRequest # @return [::Google::Protobuf::FieldMask] # Optional. Used to specify the fields to be overwritten in the # `LbTrafficExtension` resource by the update. - # The fields specified in the update_mask are relative to the resource, not + # The fields specified in the `update_mask` are relative to the resource, not # the full request. A field is overwritten if it is in the mask. If the # user does not specify a mask, then all fields are overwritten. # @!attribute [rw] lb_traffic_extension @@ -291,12 +357,11 @@ class CreateLbTrafficExtensionRequest # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -317,12 +382,11 @@ class UpdateLbTrafficExtensionRequest # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes after the first request. + # that for 60 minutes after the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -358,8 +422,9 @@ class DeleteLbTrafficExtensionRequest # @!attribute [rw] forwarding_rules # @return [::Array<::String>] # Required. A list of references to the forwarding rules to which this - # service extension is attached to. At least one forwarding rule is required. - # There can be only one `LbRouteExtension` resource per forwarding rule. + # service extension is attached. At least one forwarding rule is required. + # Only one `LbRouteExtension` resource can be associated with a forwarding + # rule. # @!attribute [rw] extension_chains # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] # Required. A set of ordered extension chains that contain the match @@ -373,19 +438,31 @@ class DeleteLbTrafficExtensionRequest # Required. All backend services and forwarding rules referenced by this # extension must share the same load balancing scheme. Supported values: # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - # [Choosing a load - # balancer](https://cloud.google.com/load-balancing/docs/backend-service). + # [Backend services + # overview](https://cloud.google.com/load-balancing/docs/backend-service). # @!attribute [rw] metadata # @return [::Google::Protobuf::Struct] # Optional. The metadata provided here is included as part of the # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension - # server. The metadata is available under the namespace + # `ProcessingRequest` message sent to the extension server. + # + # The metadata applies to all extensions in all extensions chains in this + # resource. + # + # The metadata is available under the key # `com.google.lb_route_extension.`. - # The following variables are supported in the metadata Struct: + # + # The following variables are supported in the metadata: # # `{forwarding_rule_id}` - substituted with the forwarding rule's fully # qualified resource name. + # + # This field must not be set if at least one of the extension chains + # contains plugin extensions. Setting it results in a validation error. + # + # You can set metadata at either the resource level or the extension level. + # The extension level metadata is recommended because you can pass a + # different set of metadata through each extension to the backend. class LbRouteExtension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -404,7 +481,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the `LbRouteExtension` - # resources are listed, specified in the following format: + # resources are listed. These values are specified in the following format: # `projects/{project}/locations/{location}`. # @!attribute [rw] page_size # @return [::Integer] @@ -418,7 +495,7 @@ class LabelsEntry # Optional. Filtering results. # @!attribute [rw] order_by # @return [::String] - # Optional. Hint for how to order the results. + # Optional. Hint about how to order the results. class ListLbRouteExtensionsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -467,12 +544,11 @@ class GetLbRouteExtensionRequest # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -487,7 +563,7 @@ class CreateLbRouteExtensionRequest # @return [::Google::Protobuf::FieldMask] # Optional. Used to specify the fields to be overwritten in the # `LbRouteExtension` resource by the update. - # The fields specified in the update_mask are relative to the resource, not + # The fields specified in the `update_mask` are relative to the resource, not # the full request. A field is overwritten if it is in the mask. If the # user does not specify a mask, then all fields are overwritten. # @!attribute [rw] lb_route_extension @@ -498,12 +574,11 @@ class CreateLbRouteExtensionRequest # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes since the first request. + # that for 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -524,12 +599,11 @@ class UpdateLbRouteExtensionRequest # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server can ignore # the request if it has already been completed. The server guarantees - # that for at least 60 minutes after the first request. + # that for 60 minutes after the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, ignores the second request. This prevents + # ID, the server ignores the second request This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is @@ -539,6 +613,243 @@ class DeleteLbRouteExtensionRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # `AuthzExtension` is a resource that allows traffic forwarding + # to a callout backend service to make an authorization decision. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. Name of the `AuthzExtension` resource in the + # following format: + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `AuthzExtension` + # resource. + # + # The format must comply with [the requirements for + # labels](/compute/docs/labeling-resources#requirements) for Google Cloud + # resources. + # @!attribute [rw] load_balancing_scheme + # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] + # Required. All backend services and forwarding rules referenced by this + # extension must share the same load balancing scheme. Supported values: + # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + # [Backend services + # overview](https://cloud.google.com/load-balancing/docs/backend-service). + # @!attribute [rw] authority + # @return [::String] + # Required. The `:authority` header in the gRPC request sent from Envoy + # to the extension service. + # @!attribute [rw] service + # @return [::String] + # Required. The reference to the service that runs the extension. + # + # To configure a callout extension, `service` must be a fully-qualified + # reference + # to a [backend + # service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + # in the format: + # `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` + # or + # `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Required. Specifies the timeout for each individual message on the stream. + # The timeout must be between 10-10000 milliseconds. + # @!attribute [rw] fail_open + # @return [::Boolean] + # Optional. Determines how the proxy behaves if the call to the extension + # fails or times out. + # + # When set to `TRUE`, request or response processing continues without + # error. Any subsequent extensions in the extension chain are also + # executed. When set to `FALSE` or the default setting of `FALSE` is used, + # one of the following happens: + # + # * If response headers have not been delivered to the downstream client, + # a generic 500 error is returned to the client. The error response can be + # tailored by configuring a custom error response in the load balancer. + # + # * If response headers have been delivered, then the HTTP stream to the + # downstream client is reset. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Struct] + # Optional. The metadata provided here is included as part of the + # `metadata_context` (of type `google.protobuf.Struct`) in the + # `ProcessingRequest` message sent to the extension + # server. The metadata is available under the namespace + # `com.google.authz_extension.`. + # The following variables are supported in the metadata Struct: + # + # `{forwarding_rule_id}` - substituted with the forwarding rule's fully + # qualified resource name. + # @!attribute [rw] forward_headers + # @return [::Array<::String>] + # Optional. List of the HTTP headers to forward to the extension + # (from the client). If omitted, all headers are sent. + # Each element is a string indicating the header name. + # @!attribute [rw] wire_format + # @return [::Google::Cloud::NetworkServices::V1::WireFormat] + # Optional. The format of communication supported by the callout extension. + # If not specified, the default value `EXT_PROC_GRPC` is used. + class AuthzExtension + 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 + + # Message for requesting list of `AuthzExtension` resources. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the `AuthzExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results that the server returns. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint about how to order the results. + class ListAuthzExtensionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing `AuthzExtension` resources. + # @!attribute [rw] authz_extensions + # @return [::Array<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # The list of `AuthzExtension` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results that the server returns. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAuthzExtensionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a `AuthzExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `AuthzExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + class GetAuthzExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a `AuthzExtension` resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `AuthzExtension` resource. Must + # be in the format `projects/{project}/locations/{location}`. + # @!attribute [rw] authz_extension_id + # @return [::String] + # Required. User-provided ID of the `AuthzExtension` resource to be + # created. + # @!attribute [rw] authz_extension + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # Required. `AuthzExtension` resource to be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateAuthzExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a `AuthzExtension` resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Used to specify the fields to be overwritten in the + # `AuthzExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @!attribute [rw] authz_extension + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # Required. `AuthzExtension` resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateAuthzExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a `AuthzExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `AuthzExtension` resource to delete. Must + # be in the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteAuthzExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The part of the request or response for which the extension is called. module EventType # Unspecified value. Do not use. @@ -569,10 +880,10 @@ module EventType RESPONSE_TRAILERS = 6 end - # Load balancing schemes supported by the `LbTrafficExtension` resource and - # `LbRouteExtension` resource. - # For more information, refer to [Choosing a load - # balancer](https://cloud.google.com/load-balancing/docs/backend-service). + # Load balancing schemes supported by the `LbTrafficExtension`, + # `LbRouteExtension`, and `LbEdgeExtension` resources. + # For more information, refer to [Backend services + # overview](https://cloud.google.com/load-balancing/docs/backend-service). module LoadBalancingScheme # Default value. Do not use. LOAD_BALANCING_SCHEME_UNSPECIFIED = 0 @@ -584,6 +895,19 @@ module LoadBalancingScheme # Balancing. EXTERNAL_MANAGED = 2 end + + # The format of communication supported by the extension. + module WireFormat + # Not specified. + WIRE_FORMAT_UNSPECIFIED = 0 + + # The extension service uses ext_proc gRPC API over a gRPC stream. This is + # the default value if the wire format is not specified. The backend service + # for the extension must use HTTP2 or H2C as the protocol. All + # `supported_events` for a client request are sent as part of the same + # gRPC stream. + EXT_PROC_GRPC = 1 + end end end end diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb new file mode 100644 index 000000000000..dcd31f1c461a --- /dev/null +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb @@ -0,0 +1,518 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 NetworkServices + module V1 + # `WasmPlugin` is a resource representing a service executing + # a customer-provided Wasm module. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the `WasmPlugin` resource in the following format: + # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `WasmPlugin` resource. + # + # The format must comply with [the following + # requirements](/compute/docs/labeling-resources#requirements). + # @!attribute [rw] main_version_id + # @return [::String] + # Optional. The ID of the `WasmPluginVersion` resource that is the + # currently serving one. The version referred to must be a child of this + # `WasmPlugin` resource. + # @!attribute [rw] log_config + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig] + # Optional. Specifies the logging options for the activity performed by this + # plugin. If logging is enabled, plugin logs are exported to + # Cloud Logging. + # Note that the settings relate to the logs generated by using + # logging statements in your Wasm code. + # @!attribute [rw] versions + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::NetworkServices::V1::WasmPlugin::VersionDetails}] + # Optional. All versions of this `WasmPlugin` resource in the key-value + # format. The key is the resource ID, and the value is the `VersionDetails` + # object. + # + # Lets you create or update a `WasmPlugin` resource and its versions in a + # single request. When the `main_version_id` field is not empty, it must + # point to one of the `VersionDetails` objects in the map. + # + # If provided in a `PATCH` request, the new versions replace the + # previous set. Any version omitted from the `versions` field is removed. + # Because the `WasmPluginVersion` resource is immutable, if a + # `WasmPluginVersion` resource with the same name already exists and differs, + # the request fails. + # + # Note: In a `GET` request, this field is populated only if the field + # `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`. + # @!attribute [r] used_by + # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPlugin::UsedBy>] + # Output only. List of all + # [extensions](https://cloud.google.com/service-extensions/docs/overview) + # that use this `WasmPlugin` resource. + class WasmPlugin + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details of a `WasmPluginVersion` resource to be inlined in the + # `WasmPlugin` resource. + # @!attribute [rw] plugin_config_data + # @return [::String] + # Configuration for the plugin. + # The configuration is provided to the plugin at runtime through + # the `ON_CONFIGURE` callback. When a new + # `WasmPluginVersion` version is created, the digest of the + # contents is saved in the `plugin_config_digest` field. + # + # Note: The following fields are mutually exclusive: `plugin_config_data`, `plugin_config_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] plugin_config_uri + # @return [::String] + # URI of the plugin configuration stored in the Artifact Registry. + # The configuration is provided to the plugin at runtime through + # the `ON_CONFIGURE` callback. The container image must + # contain only a single file with the name + # `plugin.config`. When a new `WasmPluginVersion` + # resource is created, the digest of the container image is saved in the + # `plugin_config_digest` field. + # + # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `WasmPluginVersion` + # resource. + # @!attribute [rw] image_uri + # @return [::String] + # Optional. URI of the container image containing the Wasm module, stored + # in the Artifact Registry. The container image must contain only a single + # file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource + # is created, the URI gets resolved to an image digest and saved in the + # `image_digest` field. + # @!attribute [r] image_digest + # @return [::String] + # Output only. The resolved digest for the image specified in `image`. + # The digest is resolved during the creation of a + # `WasmPluginVersion` resource. + # This field holds the digest value regardless of whether a tag or + # digest was originally specified in the `image` field. + # @!attribute [r] plugin_config_digest + # @return [::String] + # Output only. This field holds the digest (usually checksum) value for the + # plugin configuration. The value is calculated based on the contents of + # the `plugin_config_data` field or the container image defined by the + # `plugin_config_uri` field. + class VersionDetails + 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 + + # Specifies the logging options for the activity performed by this + # plugin. If logging is enabled, plugin logs are exported to + # Cloud Logging. + # @!attribute [rw] enable + # @return [::Boolean] + # Optional. Specifies whether to enable logging for activity by this + # plugin. + # + # Defaults to `false`. + # @!attribute [rw] sample_rate + # @return [::Float] + # Non-empty default. Configures the sampling rate of activity logs, where + # `1.0` means all logged activity is reported and `0.0` means no activity + # is reported. A floating point value between `0.0` and `1.0` indicates + # that a percentage of log messages is stored. + # + # The default value when logging is enabled is `1.0`. The value of the + # field must be between `0` and `1` (inclusive). + # + # This field can be specified only if logging is enabled for this plugin. + # @!attribute [rw] min_log_level + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel] + # Non-empty default. Specificies the lowest level of the plugin logs that + # are exported to Cloud Logging. This setting relates to the logs generated + # by using logging statements in your Wasm code. + # + # This field is can be set only if logging is enabled for the plugin. + # + # If the field is not provided when logging is enabled, it is set to + # `INFO` by default. + class LogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible values to specify the lowest level of logs to be exported to + # Cloud Logging. + module LogLevel + # Unspecified value. Defaults to `LogLevel.INFO`. + LOG_LEVEL_UNSPECIFIED = 0 + + # Report logs with TRACE level and above. + TRACE = 1 + + # Report logs with DEBUG level and above. + DEBUG = 2 + + # Report logs with INFO level and above. + INFO = 3 + + # Report logs with WARN level and above. + WARN = 4 + + # Report logs with ERROR level and above. + ERROR = 5 + + # Report logs with CRITICAL level only. + CRITICAL = 6 + end + end + + # Defines a resource that uses the `WasmPlugin` resource. + # @!attribute [r] name + # @return [::String] + # Output only. Full name of the resource + # https://google.aip.dev/122#full-resource-names, for example + # `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}` + class UsedBy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::VersionDetails] + class VersionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A single immutable version of a `WasmPlugin` resource. + # Defines the Wasm module used and optionally its runtime config. + # @!attribute [rw] plugin_config_data + # @return [::String] + # Configuration for the plugin. + # The configuration is provided to the plugin at runtime through + # the `ON_CONFIGURE` callback. When a new + # `WasmPluginVersion` resource is created, the digest of the + # contents is saved in the `plugin_config_digest` field. + # + # Note: The following fields are mutually exclusive: `plugin_config_data`, `plugin_config_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] plugin_config_uri + # @return [::String] + # URI of the plugin configuration stored in the Artifact Registry. + # The configuration is provided to the plugin at runtime through + # the `ON_CONFIGURE` callback. The container image must contain + # only a single file with the name `plugin.config`. When a + # new `WasmPluginVersion` resource is created, the digest of the + # container image is saved in the `plugin_config_digest` field. + # + # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the `WasmPluginVersion` resource in the following + # format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ + # versions/\\{wasm_plugin_version}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `WasmPluginVersion` + # resource. + # @!attribute [rw] image_uri + # @return [::String] + # Optional. URI of the container image containing the plugin, stored in the + # Artifact Registry. + # When a new `WasmPluginVersion` resource is created, the digest + # of the container image is saved in the `image_digest` field. + # When downloading an image, the digest value is used instead of an + # image tag. + # @!attribute [r] image_digest + # @return [::String] + # Output only. The resolved digest for the image specified in the `image` + # field. The digest is resolved during the creation of `WasmPluginVersion` + # resource. This field holds the digest value, regardless of whether a tag or + # digest was originally specified in the `image` field. + # @!attribute [r] plugin_config_digest + # @return [::String] + # Output only. This field holds the digest (usually checksum) value for the + # plugin configuration. The value is calculated based on the contents of + # `plugin_config_data` or the container image defined by + # the `plugin_config_uri` field. + class WasmPluginVersion + 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 + + # Request used with the `ListWasmPlugins` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the `WasmPlugin` resources + # are listed, specified in the following format: + # `projects/{project}/locations/global`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of `WasmPlugin` resources to return per call. + # If not specified, at most 50 `WasmPlugin` resources are returned. + # The maximum value is 1000; values above 1000 are coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListWasmPluginsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPlugins` call, and that the + # next page of data is to be returned. + class ListWasmPluginsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the `ListWasmPlugins` method. + # @!attribute [rw] wasm_plugins + # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # List of `WasmPlugin` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, + # call this method again using the value of `next_page_token` as + # `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListWasmPluginsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `GetWasmPlugin` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `WasmPlugin` resource to get. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @!attribute [rw] view + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginView] + # Determines how much data must be returned in the response. See + # [AIP-157](https://google.aip.dev/157). + class GetWasmPluginRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `CreateWasmPlugin` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `WasmPlugin` resource. Must be in the + # format `projects/{project}/locations/global`. + # @!attribute [rw] wasm_plugin_id + # @return [::String] + # Required. User-provided ID of the `WasmPlugin` resource to be created. + # @!attribute [rw] wasm_plugin + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # Required. `WasmPlugin` resource to be created. + class CreateWasmPluginRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `UpdateWasmPlugin` method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Used to specify the fields to be overwritten in the + # `WasmPlugin` resource by the update. + # The fields specified in the `update_mask` field are relative to the + # resource, not the full request. + # An omitted `update_mask` field is treated as an implied `update_mask` + # field equivalent to all fields that are populated (that have a non-empty + # value). + # The `update_mask` field supports a special value `*`, which means that + # each field in the given `WasmPlugin` resource (including the empty ones) + # replaces the current value. + # @!attribute [rw] wasm_plugin + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # Required. Updated `WasmPlugin` resource. + class UpdateWasmPluginRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `DeleteWasmPlugin` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `WasmPlugin` resource to delete. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + class DeleteWasmPluginRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the `ListWasmPluginVersions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `WasmPlugin` resource whose `WasmPluginVersion`s + # are listed, specified in the following format: + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of `WasmPluginVersion` resources to return per + # call. If not specified, at most 50 `WasmPluginVersion` resources are + # returned. The maximum value is 1000; values above 1000 are coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListWasmPluginVersionsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPluginVersions` call, and that the + # next page of data is to be returned. + class ListWasmPluginVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the `ListWasmPluginVersions` method. + # @!attribute [rw] wasm_plugin_versions + # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # List of `WasmPluginVersion` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, + # call this method again using the value of `next_page_token` as + # `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListWasmPluginVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `GetWasmPluginVersion` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `WasmPluginVersion` resource to get. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + class GetWasmPluginVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `CreateWasmPluginVersion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `WasmPluginVersion` resource. Must be + # in the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @!attribute [rw] wasm_plugin_version_id + # @return [::String] + # Required. User-provided ID of the `WasmPluginVersion` resource to be + # created. + # @!attribute [rw] wasm_plugin_version + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # Required. `WasmPluginVersion` resource to be created. + class CreateWasmPluginVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `DeleteWasmPluginVersion` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `WasmPluginVersion` resource to delete. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + class DeleteWasmPluginVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Determines the information that should be returned by the server. + module WasmPluginView + # Unspecified value. Do not use. + WASM_PLUGIN_VIEW_UNSPECIFIED = 0 + + # If specified in the `GET` request for a `WasmPlugin` resource, the server's + # response includes just the `WasmPlugin` resource. + WASM_PLUGIN_VIEW_BASIC = 1 + + # If specified in the `GET` request for a `WasmPlugin` resource, the server's + # response includes the `WasmPlugin` resource with all its versions. + WASM_PLUGIN_VIEW_FULL = 2 + end + end + end + end +end diff --git a/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb b/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb new file mode 100644 index 000000000000..904076aaa757 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_DepService_CreateAuthzExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_authz_extension. +# +def create_authz_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new + + # Call the create_authz_extension method. + result = client.create_authz_extension request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_DepService_CreateAuthzExtension_sync] diff --git a/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb b/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb new file mode 100644 index 000000000000..04e941722c29 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_authz_extension. +# +def delete_authz_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new + + # Call the delete_authz_extension method. + result = client.delete_authz_extension request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] diff --git a/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb b/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb new file mode 100644 index 000000000000..0fa8f2735c3a --- /dev/null +++ b/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_DepService_GetAuthzExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_authz_extension. +# +def get_authz_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new + + # Call the get_authz_extension method. + result = client.get_authz_extension request + + # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. + p result +end +# [END networkservices_v1_generated_DepService_GetAuthzExtension_sync] diff --git a/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb b/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb new file mode 100644 index 000000000000..df6d4f8ae4a1 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_DepService_ListAuthzExtensions_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_authz_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_authz_extensions. +# +def list_authz_extensions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new + + # Call the list_authz_extensions method. + result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. + p item + end +end +# [END networkservices_v1_generated_DepService_ListAuthzExtensions_sync] diff --git a/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb b/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb new file mode 100644 index 000000000000..b0adeafabecc --- /dev/null +++ b/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_authz_extension. +# +def update_authz_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new + + # Call the update_authz_extension method. + result = client.update_authz_extension request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb b/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb new file mode 100644 index 000000000000..310f7f64ea40 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin. +# +def create_wasm_plugin + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new + + # Call the create_wasm_plugin method. + result = client.create_wasm_plugin request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb b/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb new file mode 100644 index 000000000000..592c95b69d94 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version. +# +def create_wasm_plugin_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new + + # Call the create_wasm_plugin_version method. + result = client.create_wasm_plugin_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb b/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb new file mode 100644 index 000000000000..d9b1e63fda31 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin. +# +def delete_wasm_plugin + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new + + # Call the delete_wasm_plugin method. + result = client.delete_wasm_plugin request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb b/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb new file mode 100644 index 000000000000..355305f94c62 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version. +# +def delete_wasm_plugin_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new + + # Call the delete_wasm_plugin_version method. + result = client.delete_wasm_plugin_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb b/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb new file mode 100644 index 000000000000..7be8096a1488 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin. +# +def get_wasm_plugin + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new + + # Call the get_wasm_plugin method. + result = client.get_wasm_plugin request + + # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb b/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb new file mode 100644 index 000000000000..97c742f14a3b --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version. +# +def get_wasm_plugin_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new + + # Call the get_wasm_plugin_version method. + result = client.get_wasm_plugin_version request + + # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb b/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb new file mode 100644 index 000000000000..f1586b3b9a84 --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_wasm_plugin_versions call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions. +# +def list_wasm_plugin_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new + + # Call the list_wasm_plugin_versions method. + result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb b/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb new file mode 100644 index 000000000000..c20c5bd9a60a --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_wasm_plugins call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins. +# +def list_wasm_plugins + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new + + # Call the list_wasm_plugins method. + result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] diff --git a/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb b/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb new file mode 100644 index 000000000000..db561477426a --- /dev/null +++ b/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin. +# +def update_wasm_plugin + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new + + # Call the update_wasm_plugin method. + result = client.update_wasm_plugin request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] diff --git a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json index b0aa242e0525..09f8f0c740f3 100644 --- a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json @@ -411,6 +411,206 @@ } ] }, + { + "region_tag": "networkservices_v1_generated_DepService_ListAuthzExtensions_sync", + "title": "Snippet for the list_authz_extensions call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_authz_extensions.", + "file": "dep_service/list_authz_extensions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_authz_extensions", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_authz_extensions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "ListAuthzExtensions", + "full_name": "google.cloud.networkservices.v1.DepService.ListAuthzExtensions", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_GetAuthzExtension_sync", + "title": "Snippet for the get_authz_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_authz_extension.", + "file": "dep_service/get_authz_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_authz_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_authz_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::AuthzExtension", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "GetAuthzExtension", + "full_name": "google.cloud.networkservices.v1.DepService.GetAuthzExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_CreateAuthzExtension_sync", + "title": "Snippet for the create_authz_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_authz_extension.", + "file": "dep_service/create_authz_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_authz_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_authz_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "CreateAuthzExtension", + "full_name": "google.cloud.networkservices.v1.DepService.CreateAuthzExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_UpdateAuthzExtension_sync", + "title": "Snippet for the update_authz_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_authz_extension.", + "file": "dep_service/update_authz_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_authz_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_authz_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "UpdateAuthzExtension", + "full_name": "google.cloud.networkservices.v1.DepService.UpdateAuthzExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_DeleteAuthzExtension_sync", + "title": "Snippet for the delete_authz_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_authz_extension.", + "file": "dep_service/delete_authz_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_authz_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_authz_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "DeleteAuthzExtension", + "full_name": "google.cloud.networkservices.v1.DepService.DeleteAuthzExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync", "title": "Snippet for the list_endpoint_policies call in the NetworkServices service", @@ -611,6 +811,366 @@ } ] }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync", + "title": "Snippet for the list_wasm_plugin_versions call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions.", + "file": "network_services/list_wasm_plugin_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_wasm_plugin_versions", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListWasmPluginVersions", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListWasmPluginVersions", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync", + "title": "Snippet for the get_wasm_plugin_version call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version.", + "file": "network_services/get_wasm_plugin_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_wasm_plugin_version", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::WasmPluginVersion", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetWasmPluginVersion", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetWasmPluginVersion", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync", + "title": "Snippet for the create_wasm_plugin_version call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version.", + "file": "network_services/create_wasm_plugin_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_wasm_plugin_version", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateWasmPluginVersion", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateWasmPluginVersion", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync", + "title": "Snippet for the delete_wasm_plugin_version call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version.", + "file": "network_services/delete_wasm_plugin_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_wasm_plugin_version", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteWasmPluginVersion", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteWasmPluginVersion", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync", + "title": "Snippet for the list_wasm_plugins call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins.", + "file": "network_services/list_wasm_plugins.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_wasm_plugins", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListWasmPlugins", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListWasmPlugins", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync", + "title": "Snippet for the get_wasm_plugin call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin.", + "file": "network_services/get_wasm_plugin.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_wasm_plugin", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::WasmPlugin", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetWasmPlugin", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetWasmPlugin", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync", + "title": "Snippet for the create_wasm_plugin call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin.", + "file": "network_services/create_wasm_plugin.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_wasm_plugin", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateWasmPlugin", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateWasmPlugin", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync", + "title": "Snippet for the update_wasm_plugin call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin.", + "file": "network_services/update_wasm_plugin.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_wasm_plugin", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateWasmPlugin", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateWasmPlugin", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync", + "title": "Snippet for the delete_wasm_plugin call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin.", + "file": "network_services/delete_wasm_plugin.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_wasm_plugin", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteWasmPlugin", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteWasmPlugin", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "networkservices_v1_generated_NetworkServices_ListGateways_sync", "title": "Snippet for the list_gateways call in the NetworkServices service", diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb index d0c0a84056ee..b3fe39e94a1d 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb @@ -41,6 +41,18 @@ def logger end end + def test_authz_extension_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.authz_extension_path project: "value0", location: "value1", authz_extension: "value2" + assert_equal "projects/value0/locations/value1/authzExtensions/value2", path + end + end + def test_lb_route_extension_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb index b4346bf79df4..3b76ad0055f9 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb @@ -638,6 +638,286 @@ def test_delete_lb_route_extension end end + def test_list_authz_extensions + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_authz_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_authz_extensions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_authz_extensions_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_authz_extensions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_authz_extensions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_authz_extensions ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_authz_extensions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_authz_extensions(::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_authz_extensions_client_stub.call_count + end + end + end + + def test_get_authz_extension + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::AuthzExtension.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_authz_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_authz_extension_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_authz_extension({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_authz_extension name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_authz_extension ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_authz_extension({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_authz_extension(::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_authz_extension_client_stub.call_count + end + end + end + + def test_create_authz_extension + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + authz_extension_id = "hello world" + authz_extension = {} + request_id = "hello world" + + create_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_authz_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_authz_extension_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_authz_extension parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_authz_extension ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_authz_extension(::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_authz_extension_client_stub.call_count + end + end + end + + def test_update_authz_extension + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + authz_extension = {} + request_id = "hello world" + + update_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_authz_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_authz_extension_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_authz_extension update_mask: update_mask, authz_extension: authz_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_authz_extension ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_authz_extension(::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_authz_extension_client_stub.call_count + end + end + end + + def test_delete_authz_extension + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_authz_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_authz_extension_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_authz_extension({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_authz_extension name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_authz_extension ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_authz_extension({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_authz_extension(::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_authz_extension_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb index 6fecf5abc606..c25dc6015ac9 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb @@ -724,6 +724,336 @@ def test_delete_lb_route_extension end end + def test_list_authz_extensions + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_authz_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_authz_extensions, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_authz_extensions_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_authz_extensions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_authz_extensions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_authz_extensions ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_authz_extensions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_authz_extensions(::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_authz_extensions_client_stub.call_rpc_count + end + end + + def test_get_authz_extension + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::AuthzExtension.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" + + get_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_authz_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_authz_extension_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_authz_extension({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_authz_extension name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_authz_extension ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_authz_extension({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_authz_extension(::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.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, get_authz_extension_client_stub.call_rpc_count + end + end + + def test_create_authz_extension + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + authz_extension_id = "hello world" + authz_extension = {} + request_id = "hello world" + + create_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_authz_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["authz_extension_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AuthzExtension), request["authz_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_authz_extension_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_authz_extension parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_authz_extension ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_authz_extension(::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_authz_extension_client_stub.call_rpc_count + end + end + + def test_update_authz_extension + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + authz_extension = {} + request_id = "hello world" + + update_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_authz_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AuthzExtension), request["authz_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_authz_extension_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_authz_extension update_mask: update_mask, authz_extension: authz_extension, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_authz_extension ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_authz_extension(::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_authz_extension_client_stub.call_rpc_count + end + end + + def test_delete_authz_extension + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + + delete_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_authz_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_authz_extension_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_authz_extension({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_authz_extension name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_authz_extension ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_authz_extension({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_authz_extension(::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_authz_extension_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb index 28ea3d3f77f4..c0746ffe810e 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb @@ -304,4 +304,28 @@ def test_tls_route_path assert_equal "projects/value0/locations/value1/tlsRoutes/value2", path end end + + def test_wasm_plugin_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.wasm_plugin_path project: "value0", location: "value1", wasm_plugin: "value2" + assert_equal "projects/value0/locations/value1/wasmPlugins/value2", path + end + end + + def test_wasm_plugin_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.wasm_plugin_version_path project: "value0", location: "value1", wasm_plugin: "value2", wasm_plugin_version: "value3" + assert_equal "projects/value0/locations/value1/wasmPlugins/value2/versions/value3", path + end + end end diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb index 5d759a5ce674..1d680701f4c8 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb @@ -354,6 +354,502 @@ def test_delete_endpoint_policy end end + def test_list_wasm_plugin_versions + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_wasm_plugin_versions_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_wasm_plugin_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_wasm_plugin_versions_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_wasm_plugin_versions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_wasm_plugin_versions ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, 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_wasm_plugin_versions({ parent: parent, 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_wasm_plugin_versions(::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, 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_wasm_plugin_versions_client_stub.call_count + end + end + end + + def test_get_wasm_plugin_version + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_wasm_plugin_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_wasm_plugin_version_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_wasm_plugin_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_wasm_plugin_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_wasm_plugin_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_wasm_plugin_version_client_stub.call_count + end + end + end + + def test_create_wasm_plugin_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + wasm_plugin_version_id = "hello world" + wasm_plugin_version = {} + + create_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_wasm_plugin_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_wasm_plugin_version_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_wasm_plugin_version parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_wasm_plugin_version_client_stub.call_count + end + end + end + + def test_delete_wasm_plugin_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_wasm_plugin_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_wasm_plugin_version_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_wasm_plugin_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_wasm_plugin_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_wasm_plugin_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_wasm_plugin_version_client_stub.call_count + end + end + end + + def test_list_wasm_plugins + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_wasm_plugins_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_wasm_plugins_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_wasm_plugins_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_wasm_plugins parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_wasm_plugins ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, 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_wasm_plugins({ parent: parent, 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_wasm_plugins(::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, 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_wasm_plugins_client_stub.call_count + end + end + end + + def test_get_wasm_plugin + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::WasmPlugin.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :WASM_PLUGIN_VIEW_UNSPECIFIED + + get_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_wasm_plugin_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_wasm_plugin_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_wasm_plugin({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_wasm_plugin name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_wasm_plugin ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_wasm_plugin({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_wasm_plugin(::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_wasm_plugin_client_stub.call_count + end + end + end + + def test_create_wasm_plugin + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + wasm_plugin_id = "hello world" + wasm_plugin = {} + + create_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_wasm_plugin_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_wasm_plugin_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_wasm_plugin parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_wasm_plugin ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_wasm_plugin(::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_wasm_plugin_client_stub.call_count + end + end + end + + def test_update_wasm_plugin + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + wasm_plugin = {} + + update_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_wasm_plugin_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_wasm_plugin_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_wasm_plugin update_mask: update_mask, wasm_plugin: wasm_plugin do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_wasm_plugin ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_wasm_plugin(::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_wasm_plugin_client_stub.call_count + end + end + end + + def test_delete_wasm_plugin + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_wasm_plugin_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_wasm_plugin_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_wasm_plugin({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_wasm_plugin name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_wasm_plugin ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_wasm_plugin({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_wasm_plugin(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_wasm_plugin_client_stub.call_count + end + end + end + def test_list_gateways # Create test objects. client_result = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.new diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb index 76e5b49aff14..e83eabb359d0 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb @@ -386,6 +386,583 @@ def test_delete_endpoint_policy end end + def test_list_wasm_plugin_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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" + page_size = 42 + page_token = "hello world" + + list_wasm_plugin_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_wasm_plugin_versions, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_wasm_plugin_versions_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_wasm_plugin_versions({ parent: parent, 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_wasm_plugin_versions parent: parent, 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_wasm_plugin_versions ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, 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_wasm_plugin_versions({ parent: parent, 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_wasm_plugin_versions(::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, 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_wasm_plugin_versions_client_stub.call_rpc_count + end + end + + def test_get_wasm_plugin_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.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" + + get_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_wasm_plugin_version, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_wasm_plugin_version_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_wasm_plugin_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_wasm_plugin_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_wasm_plugin_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.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, get_wasm_plugin_version_client_stub.call_rpc_count + end + end + + def test_create_wasm_plugin_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + wasm_plugin_version_id = "hello world" + wasm_plugin_version = {} + + create_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_wasm_plugin_version, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["wasm_plugin_version_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPluginVersion), request["wasm_plugin_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_wasm_plugin_version_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_wasm_plugin_version parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_wasm_plugin_version_client_stub.call_rpc_count + end + end + + def test_delete_wasm_plugin_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_wasm_plugin_version, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_wasm_plugin_version_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_wasm_plugin_version({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_wasm_plugin_version name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_wasm_plugin_version({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_wasm_plugin_version_client_stub.call_rpc_count + end + end + + def test_list_wasm_plugins + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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" + page_size = 42 + page_token = "hello world" + + list_wasm_plugins_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_wasm_plugins, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_wasm_plugins_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_wasm_plugins({ parent: parent, 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_wasm_plugins parent: parent, 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_wasm_plugins ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, 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_wasm_plugins({ parent: parent, 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_wasm_plugins(::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, 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_wasm_plugins_client_stub.call_rpc_count + end + end + + def test_get_wasm_plugin + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::WasmPlugin.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :WASM_PLUGIN_VIEW_UNSPECIFIED + + get_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_wasm_plugin, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, request + assert_equal "hello world", request["name"] + assert_equal :WASM_PLUGIN_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_wasm_plugin_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_wasm_plugin({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_wasm_plugin name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_wasm_plugin ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_wasm_plugin({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_wasm_plugin(::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_wasm_plugin_client_stub.call_rpc_count + end + end + + def test_create_wasm_plugin + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + wasm_plugin_id = "hello world" + wasm_plugin = {} + + create_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_wasm_plugin, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["wasm_plugin_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPlugin), request["wasm_plugin"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_wasm_plugin_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_wasm_plugin parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_wasm_plugin ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_wasm_plugin(::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_wasm_plugin_client_stub.call_rpc_count + end + end + + def test_update_wasm_plugin + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + wasm_plugin = {} + + update_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_wasm_plugin, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPlugin), request["wasm_plugin"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_wasm_plugin_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_wasm_plugin update_mask: update_mask, wasm_plugin: wasm_plugin do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_wasm_plugin ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_wasm_plugin(::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_wasm_plugin_client_stub.call_rpc_count + end + end + + def test_delete_wasm_plugin + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_wasm_plugin, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_wasm_plugin_client_stub do + # Create client + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_wasm_plugin({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_wasm_plugin name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_wasm_plugin ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_wasm_plugin({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_wasm_plugin(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_wasm_plugin_client_stub.call_rpc_count + end + end + def test_list_gateways # Create GRPC objects. grpc_response = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.new From 091d0a820c0566c0708b959fcd7035b9f8ffb202 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Tue, 24 Jun 2025 13:29:49 -0700 Subject: [PATCH 147/457] test: Add csv gem explicitly to storage-transfer samples bundle (#30539) --- google-cloud-storage_transfer/samples/Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/google-cloud-storage_transfer/samples/Gemfile b/google-cloud-storage_transfer/samples/Gemfile index be1394a962af..4006733857c8 100644 --- a/google-cloud-storage_transfer/samples/Gemfile +++ b/google-cloud-storage_transfer/samples/Gemfile @@ -19,6 +19,7 @@ use_head = ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" gem "google-cloud-storage_transfer", path: use_head ? "../../google-cloud-storage_transfer" : nil group :test do + gem "csv" gem "google-cloud-storage" gem "google-cloud-pubsub" gem "google-style", "~> 1.25.1" From 2f0e64ad82528d59864dc0621a72d081968a850e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:32:25 -0700 Subject: [PATCH 148/457] chore(main): release google-cloud-ai_platform-v1 1.16.0 (#30554) --- .release-please-manifest.json | 2 +- google-cloud-ai_platform-v1/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/ai_platform/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ee806e4d5d62..432b1144ac43 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -43,7 +43,7 @@ "google-cloud-advisory_notifications-v1+FILLER": "0.0.0", "google-cloud-ai_platform": "2.0.1", "google-cloud-ai_platform+FILLER": "0.0.0", - "google-cloud-ai_platform-v1": "1.15.0", + "google-cloud-ai_platform-v1": "1.16.0", "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", diff --git a/google-cloud-ai_platform-v1/CHANGELOG.md b/google-cloud-ai_platform-v1/CHANGELOG.md index 0a22a28b0879..414c1627b2e2 100644 --- a/google-cloud-ai_platform-v1/CHANGELOG.md +++ b/google-cloud-ai_platform-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 1.16.0 (2025-06-24) + +#### Features + +* Support for GenAiAdvancedFeaturesConfig +* Support for ModelGarden deploy RPC +* Support for update_rag_engine_config and get_rag_engine_config RPCs +* Updates to PSCAutomationConfig and PscInterfaceConfig + ### 1.15.0 (2025-06-16) #### Features diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb index 7c41dd1adf83..48b64ad79fc9 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AIPlatform module V1 - VERSION = "1.15.0" + VERSION = "1.16.0" end end end diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index d9dfce95fcd0..606080de99ab 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-ai_platform-v1", - "version": "1.15.0", + "version": "1.16.0", "language": "RUBY", "apis": [ { From 066e95c5ec18f4e997bba934dec739cdce2898e9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:32:44 -0700 Subject: [PATCH 149/457] chore(main): release google-cloud-alloy_db-v1 1.3.0 (#30555) --- .release-please-manifest.json | 2 +- google-cloud-alloy_db-v1/CHANGELOG.md | 8 ++++++++ .../lib/google/cloud/alloy_db/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.alloydb.v1.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 432b1144ac43..1631debd22ac 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -47,7 +47,7 @@ "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", - "google-cloud-alloy_db-v1": "1.2.0", + "google-cloud-alloy_db-v1": "1.3.0", "google-cloud-alloy_db-v1+FILLER": "0.0.0", "google-cloud-alloy_db-v1alpha": "0.14.0", "google-cloud-alloy_db-v1alpha+FILLER": "0.0.0", diff --git a/google-cloud-alloy_db-v1/CHANGELOG.md b/google-cloud-alloy_db-v1/CHANGELOG.md index 86d7bafecf42..448ebc8dc055 100644 --- a/google-cloud-alloy_db-v1/CHANGELOG.md +++ b/google-cloud-alloy_db-v1/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### 1.3.0 (2025-06-24) + +#### Features + +* Additional instance network configs +* Support deny maintenance periods +* Support instance activation policy + ### 1.2.0 (2025-05-16) #### Features diff --git a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/version.rb b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/version.rb index c850f89efca5..edaeb72b882a 100644 --- a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/version.rb +++ b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AlloyDB module V1 - VERSION = "1.2.0" + VERSION = "1.3.0" end end end diff --git a/google-cloud-alloy_db-v1/snippets/snippet_metadata_google.cloud.alloydb.v1.json b/google-cloud-alloy_db-v1/snippets/snippet_metadata_google.cloud.alloydb.v1.json index f49c87eb79c3..998e2ef90fcc 100644 --- a/google-cloud-alloy_db-v1/snippets/snippet_metadata_google.cloud.alloydb.v1.json +++ b/google-cloud-alloy_db-v1/snippets/snippet_metadata_google.cloud.alloydb.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-alloy_db-v1", - "version": "1.2.0", + "version": "1.3.0", "language": "RUBY", "apis": [ { From 4b4825c99d6364961f6007b31b6efa9d4c4e4f1d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:33:02 -0700 Subject: [PATCH 150/457] chore(main): release google-cloud-alloy_db-v1beta 0.17.0 (#30556) --- .release-please-manifest.json | 2 +- google-cloud-alloy_db-v1beta/CHANGELOG.md | 14 ++++++++++++++ .../lib/google/cloud/alloy_db/v1beta/version.rb | 2 +- ...ippet_metadata_google.cloud.alloydb.v1beta.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1631debd22ac..aac6a5cbb133 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -51,7 +51,7 @@ "google-cloud-alloy_db-v1+FILLER": "0.0.0", "google-cloud-alloy_db-v1alpha": "0.14.0", "google-cloud-alloy_db-v1alpha+FILLER": "0.0.0", - "google-cloud-alloy_db-v1beta": "0.16.0", + "google-cloud-alloy_db-v1beta": "0.17.0", "google-cloud-alloy_db-v1beta+FILLER": "0.0.0", "google-cloud-api_gateway": "2.0.1", "google-cloud-api_gateway+FILLER": "0.0.0", diff --git a/google-cloud-alloy_db-v1beta/CHANGELOG.md b/google-cloud-alloy_db-v1beta/CHANGELOG.md index 83f210361616..89c1463aec74 100644 --- a/google-cloud-alloy_db-v1beta/CHANGELOG.md +++ b/google-cloud-alloy_db-v1beta/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +### 0.17.0 (2025-06-24) + +#### Features + +* Additional instance network configs +* Support cluster activation policy +* Support deny maintenance periods +* Support for assisted experiences +* Support managed connection pool config +* Support per-cluster service agents +#### Documentation + +* Deprecated GeminiClusterConfig and GeminiInstanceConfig + ### 0.16.0 (2025-05-16) #### Features diff --git a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/version.rb b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/version.rb index 73d4184a3ae5..1c70d3dae7b3 100644 --- a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/version.rb +++ b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AlloyDB module V1beta - VERSION = "0.16.0" + VERSION = "0.17.0" end end end diff --git a/google-cloud-alloy_db-v1beta/snippets/snippet_metadata_google.cloud.alloydb.v1beta.json b/google-cloud-alloy_db-v1beta/snippets/snippet_metadata_google.cloud.alloydb.v1beta.json index 5b3f0f00e237..3e5d7b6e3c81 100644 --- a/google-cloud-alloy_db-v1beta/snippets/snippet_metadata_google.cloud.alloydb.v1beta.json +++ b/google-cloud-alloy_db-v1beta/snippets/snippet_metadata_google.cloud.alloydb.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-alloy_db-v1beta", - "version": "0.16.0", + "version": "0.17.0", "language": "RUBY", "apis": [ { From 192837d9625b1bd567037d7ab1162719cbed8ac3 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 24 Jun 2025 22:34:09 +0200 Subject: [PATCH 151/457] chore(deps): update bazel-contrib/setup-bazel action to v0.15.0 (#28148) --- .github/workflows/new-library.yml | 2 +- .github/workflows/owlbot.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-library.yml b/.github/workflows/new-library.yml index 34a5b986880c..c62235419282 100644 --- a/.github/workflows/new-library.yml +++ b/.github/workflows/new-library.yml @@ -21,7 +21,7 @@ jobs: with: ruby-version: "3.3" - name: Install Bazel - uses: bazel-contrib/setup-bazel@0.9.1 + uses: bazel-contrib/setup-bazel@0.15.0 - name: Install tools run: | gem install --no-document toys diff --git a/.github/workflows/owlbot.yml b/.github/workflows/owlbot.yml index 59e78e69d7d9..ec6a36deb4ec 100644 --- a/.github/workflows/owlbot.yml +++ b/.github/workflows/owlbot.yml @@ -24,7 +24,7 @@ jobs: with: ruby-version: "3.3" - name: Install Bazel - uses: bazel-contrib/setup-bazel@0.9.1 + uses: bazel-contrib/setup-bazel@0.15.0 - name: Install tools run: | gem install --no-document toys From 0565e1d5c43ec51f276cf6db93b0748b268d01ba Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:32:09 -0700 Subject: [PATCH 152/457] chore(main): release google-cloud-bigtable-admin-v2 1.11.0 (#30557) --- .release-please-manifest.json | 2 +- google-cloud-bigtable-admin-v2/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/bigtable/admin/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.bigtable.admin.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aac6a5cbb133..99d7ca1bb0f2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -163,7 +163,7 @@ "google-cloud-bigquery-storage-v1+FILLER": "0.0.0", "google-cloud-bigtable": "2.12.0", "google-cloud-bigtable+FILLER": "0.0.0", - "google-cloud-bigtable-admin-v2": "1.10.0", + "google-cloud-bigtable-admin-v2": "1.11.0", "google-cloud-bigtable-admin-v2+FILLER": "0.0.0", "google-cloud-bigtable-v2": "1.7.0", "google-cloud-bigtable-v2+FILLER": "0.0.0", diff --git a/google-cloud-bigtable-admin-v2/CHANGELOG.md b/google-cloud-bigtable-admin-v2/CHANGELOG.md index 0ffee9949725..746e41125d87 100644 --- a/google-cloud-bigtable-admin-v2/CHANGELOG.md +++ b/google-cloud-bigtable-admin-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.11.0 (2025-06-24) + +#### Features + +* Support for RPCs for managing SchemaBundle resources ([#30536](https://github.com/googleapis/google-cloud-ruby/issues/30536)) + ### 1.10.0 (2025-05-12) #### Features diff --git a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb index c87fb0075bd1..d6fa14579fa8 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb @@ -22,7 +22,7 @@ module Cloud module Bigtable module Admin module V2 - VERSION = "1.10.0" + VERSION = "1.11.0" end end end diff --git a/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json b/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json index 7f684b119eb0..1c5fb1d2837d 100644 --- a/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json +++ b/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-bigtable-admin-v2", - "version": "1.10.0", + "version": "1.11.0", "language": "RUBY", "apis": [ { From aab551fd7937d0b4aee3d3c6f750ebcce5e27853 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:32:35 -0700 Subject: [PATCH 153/457] chore(main): release google-cloud-commerce-consumer-procurement-v1 1.4.1 (#30558) --- .release-please-manifest.json | 2 +- google-cloud-commerce-consumer-procurement-v1/CHANGELOG.md | 6 ++++++ .../cloud/commerce/consumer/procurement/v1/version.rb | 2 +- ...adata_google.cloud.commerce.consumer.procurement.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 99d7ca1bb0f2..0f45991e4cc5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -219,7 +219,7 @@ "google-cloud-cloud_quotas-v1beta+FILLER": "0.0.0", "google-cloud-commerce-consumer-procurement": "1.2.1", "google-cloud-commerce-consumer-procurement+FILLER": "0.0.0", - "google-cloud-commerce-consumer-procurement-v1": "1.4.0", + "google-cloud-commerce-consumer-procurement-v1": "1.4.1", "google-cloud-commerce-consumer-procurement-v1+FILLER": "0.0.0", "google-cloud-compute": "1.11.1", "google-cloud-compute+FILLER": "0.0.0", diff --git a/google-cloud-commerce-consumer-procurement-v1/CHANGELOG.md b/google-cloud-commerce-consumer-procurement-v1/CHANGELOG.md index 22c1eeeae1a6..67515d54af35 100644 --- a/google-cloud-commerce-consumer-procurement-v1/CHANGELOG.md +++ b/google-cloud-commerce-consumer-procurement-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.4.1 (2025-06-24) + +#### Bug Fixes + +* Fixed transcoding for update_license_pool RPC ([#30441](https://github.com/googleapis/google-cloud-ruby/issues/30441)) + ### 1.4.0 (2025-05-12) #### Features diff --git a/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/version.rb b/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/version.rb index 3ca7d1b496df..d291e612700d 100644 --- a/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/version.rb +++ b/google-cloud-commerce-consumer-procurement-v1/lib/google/cloud/commerce/consumer/procurement/v1/version.rb @@ -23,7 +23,7 @@ module Commerce module Consumer module Procurement module V1 - VERSION = "1.4.0" + VERSION = "1.4.1" end end end diff --git a/google-cloud-commerce-consumer-procurement-v1/snippets/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json b/google-cloud-commerce-consumer-procurement-v1/snippets/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json index f28dd043d494..9ef180a9a584 100644 --- a/google-cloud-commerce-consumer-procurement-v1/snippets/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json +++ b/google-cloud-commerce-consumer-procurement-v1/snippets/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-commerce-consumer-procurement-v1", - "version": "1.4.0", + "version": "1.4.1", "language": "RUBY", "apis": [ { From 596e9b8b20f58fe634de898be4e7dd6e2848981b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:32:51 -0700 Subject: [PATCH 154/457] chore(main): release google-cloud-developer_connect 2.1.0 (#30559) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-cloud-developer_connect/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/developer_connect/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0f45991e4cc5..699177a889cf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -311,7 +311,7 @@ "google-cloud-deploy+FILLER": "0.0.0", "google-cloud-deploy-v1": "2.2.0", "google-cloud-deploy-v1+FILLER": "0.0.0", - "google-cloud-developer_connect": "2.0.1", + "google-cloud-developer_connect": "2.1.0", "google-cloud-developer_connect+FILLER": "0.0.0", "google-cloud-developer_connect-v1": "1.1.0", "google-cloud-developer_connect-v1+FILLER": "0.0.0", diff --git a/google-cloud-developer_connect/CHANGELOG.md b/google-cloud-developer_connect/CHANGELOG.md index 139db7ad5b2e..89b1e98bdd11 100644 --- a/google-cloud-developer_connect/CHANGELOG.md +++ b/google-cloud-developer_connect/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.1.0 (2025-06-24) + +#### Features + +* Support for the InsightsConfigService ([#30537](https://github.com/googleapis/google-cloud-ruby/issues/30537)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-developer_connect/lib/google/cloud/developer_connect/version.rb b/google-cloud-developer_connect/lib/google/cloud/developer_connect/version.rb index e064a6a7cc96..7e0fcc6c00d1 100644 --- a/google-cloud-developer_connect/lib/google/cloud/developer_connect/version.rb +++ b/google-cloud-developer_connect/lib/google/cloud/developer_connect/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module DeveloperConnect - VERSION = "2.0.1" + VERSION = "2.1.0" end end end From a03eec788c61aa0fe38ce84b1281ce0812d24f06 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:33:14 -0700 Subject: [PATCH 155/457] chore(main): release google-cloud-developer_connect-v1 1.2.0 (#30560) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-developer_connect-v1 1.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-developer_connect-v1/CHANGELOG.md | 12 ++++++++++++ .../lib/google/cloud/developer_connect/v1/version.rb | 2 +- ...et_metadata_google.cloud.developerconnect.v1.json | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 699177a889cf..2766aebd8451 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -313,7 +313,7 @@ "google-cloud-deploy-v1+FILLER": "0.0.0", "google-cloud-developer_connect": "2.1.0", "google-cloud-developer_connect+FILLER": "0.0.0", - "google-cloud-developer_connect-v1": "1.1.0", + "google-cloud-developer_connect-v1": "1.2.0", "google-cloud-developer_connect-v1+FILLER": "0.0.0", "google-cloud-device_streaming": "0.1.0", "google-cloud-device_streaming+FILLER": "0.0.0", diff --git a/google-cloud-developer_connect-v1/CHANGELOG.md b/google-cloud-developer_connect-v1/CHANGELOG.md index b2e3e6afe41b..ef50a5ddfa2f 100644 --- a/google-cloud-developer_connect-v1/CHANGELOG.md +++ b/google-cloud-developer_connect-v1/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +### 1.2.0 (2025-06-24) + +#### Features + +* Support for BitBucket +* Support for fetch_access_token RPC +* Support for fetch_self and delete_self RPCs +* Support for git proxies +* Support for list_users and delete_user RPCs +* Support for RPCs for managing AccountConnector resources ([#30538](https://github.com/googleapis/google-cloud-ruby/issues/30538)) +* Support for RPCs for managing InsightsConfig resources + ### 1.1.0 (2025-05-12) #### Features diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb index 70dcfb08f746..f05d3d606f58 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DeveloperConnect module V1 - VERSION = "1.1.0" + VERSION = "1.2.0" end end end diff --git a/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json b/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json index 4959d807c54b..e1fd2f0e6625 100644 --- a/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json +++ b/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-developer_connect-v1", - "version": "1.1.0", + "version": "1.2.0", "language": "RUBY", "apis": [ { From fa675cedb800407fca8a938d1e4c823597b798f6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:34:00 -0700 Subject: [PATCH 156/457] chore(main): release google-cloud-dlp-v2 1.12.0 (#30561) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-dlp-v2 1.12.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-dlp-v2/CHANGELOG.md | 6 ++++++ google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.privacy.dlp.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2766aebd8451..ec0480467a44 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -335,7 +335,7 @@ "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", "google-cloud-dlp": "1.8.2", "google-cloud-dlp+FILLER": "0.0.0", - "google-cloud-dlp-v2": "1.11.0", + "google-cloud-dlp-v2": "1.12.0", "google-cloud-dlp-v2+FILLER": "0.0.0", "google-cloud-dns": "1.1.0", "google-cloud-dns+FILLER": "0.0.0", diff --git a/google-cloud-dlp-v2/CHANGELOG.md b/google-cloud-dlp-v2/CHANGELOG.md index a0e4a085f198..0e977d012616 100644 --- a/google-cloud-dlp-v2/CHANGELOG.md +++ b/google-cloud-dlp-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.12.0 (2025-06-24) + +#### Features + +* Provide a type for findings saved to Cloud Storage ([#30532](https://github.com/googleapis/google-cloud-ruby/issues/30532)) + ### 1.11.0 (2025-06-05) #### Features diff --git a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb index 8fbaeb7d62ad..5945bd3ec387 100644 --- a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb +++ b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Dlp module V2 - VERSION = "1.11.0" + VERSION = "1.12.0" end end end diff --git a/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json b/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json index d3b7319a88d5..5a9dd841d4f6 100644 --- a/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json +++ b/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dlp-v2", - "version": "1.11.0", + "version": "1.12.0", "language": "RUBY", "apis": [ { From 3b9937ba54b0404b1904bf232dd2e63caa272d3b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:34:19 -0700 Subject: [PATCH 157/457] chore(main): release google-cloud-translate-v3 1.5.1 (#30563) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-translate-v3 1.5.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-translate-v3/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/translate/v3/version.rb | 2 +- .../snippet_metadata_google.cloud.translation.v3.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ec0480467a44..769e2483c856 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -791,7 +791,7 @@ "google-cloud-translate+FILLER": "0.0.0", "google-cloud-translate-v2": "1.1.0", "google-cloud-translate-v2+FILLER": "0.0.0", - "google-cloud-translate-v3": "1.5.0", + "google-cloud-translate-v3": "1.5.1", "google-cloud-translate-v3+FILLER": "0.0.0", "google-cloud-video-live_stream": "2.0.1", "google-cloud-video-live_stream+FILLER": "0.0.0", diff --git a/google-cloud-translate-v3/CHANGELOG.md b/google-cloud-translate-v3/CHANGELOG.md index 20173cae43b4..fffa22666aea 100644 --- a/google-cloud-translate-v3/CHANGELOG.md +++ b/google-cloud-translate-v3/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.5.1 (2025-06-24) + +#### Documentation + +* Provide links to the language support page from the reference docs ([#30534](https://github.com/googleapis/google-cloud-ruby/issues/30534)) + ### 1.5.0 (2025-05-12) #### Features diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb index e8bb3707e907..ddeb1a9df61c 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Translate module V3 - VERSION = "1.5.0" + VERSION = "1.5.1" end end end diff --git a/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json b/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json index 5526aa92c040..978397cc6a92 100644 --- a/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json +++ b/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-translate-v3", - "version": "1.5.0", + "version": "1.5.1", "language": "RUBY", "apis": [ { From 34aac85d78da351d8becf4503ae432309d0de1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Tue, 24 Jun 2025 15:34:39 -0700 Subject: [PATCH 158/457] feat: Rename Publisher to TopicAdmin and Subscriber to SubscriptionAdmin with aliases for backwards compatibility (#29519) --- google-cloud-pubsub-v1/.owlbot-manifest.json | 85 ++-- google-cloud-pubsub-v1/.owlbot.rb | 23 + google-cloud-pubsub-v1/.repo-metadata.json | 1 + google-cloud-pubsub-v1/gapic_metadata.json | 4 +- .../lib/google/cloud/pubsub/v1.rb | 4 +- .../lib/google/cloud/pubsub/v1/publisher.rb | 37 +- .../cloud/pubsub/v1/publisher/credentials.rb | 39 +- .../lib/google/cloud/pubsub/v1/subscriber.rb | 38 +- .../cloud/pubsub/v1/subscriber/credentials.rb | 39 +- .../cloud/pubsub/v1/subscription_admin.rb | 51 +++ .../client.rb | 122 +++--- .../v1/subscription_admin/credentials.rb | 52 +++ .../helpers.rb | 5 +- .../paths.rb | 6 +- .../lib/google/cloud/pubsub/v1/topic_admin.rb | 50 +++ .../v1/{publisher => topic_admin}/client.rb | 92 ++-- .../pubsub/v1/topic_admin/credentials.rb | 52 +++ .../v1/{subscriber => topic_admin}/helpers.rb | 5 +- .../v1/{publisher => topic_admin}/paths.rb | 6 +- .../snippet_metadata_google.pubsub.v1.json | 400 +++++++++--------- .../acknowledge.rb | 12 +- .../create_snapshot.rb | 12 +- .../create_subscription.rb | 12 +- .../delete_snapshot.rb | 12 +- .../delete_subscription.rb | 12 +- .../get_snapshot.rb | 12 +- .../get_subscription.rb | 12 +- .../list_snapshots.rb | 12 +- .../list_subscriptions.rb | 12 +- .../modify_ack_deadline.rb | 12 +- .../modify_push_config.rb | 12 +- .../pull.rb | 12 +- .../seek.rb | 12 +- .../streaming_pull.rb | 12 +- .../update_snapshot.rb | 12 +- .../update_subscription.rb | 12 +- .../create_topic.rb | 12 +- .../delete_topic.rb | 12 +- .../detach_subscription.rb | 12 +- .../{publisher => topic_admin}/get_topic.rb | 12 +- .../list_topic_snapshots.rb | 12 +- .../list_topic_subscriptions.rb | 12 +- .../{publisher => topic_admin}/list_topics.rb | 12 +- .../{publisher => topic_admin}/publish.rb | 12 +- .../update_topic.rb | 12 +- .../helpers_test.rb | 6 +- ...st.rb => subscription_admin_paths_test.rb} | 14 +- ...ber_test.rb => subscription_admin_test.rb} | 44 +- .../helpers_test.rb | 6 +- ...aths_test.rb => topic_admin_paths_test.rb} | 14 +- ...{publisher_test.rb => topic_admin_test.rb} | 30 +- 51 files changed, 813 insertions(+), 712 deletions(-) create mode 100644 google-cloud-pubsub-v1/.owlbot.rb create mode 100644 google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin.rb rename google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/{subscriber => subscription_admin}/client.rb (95%) create mode 100644 google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/credentials.rb rename google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/{publisher => subscription_admin}/helpers.rb (88%) rename google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/{subscriber => subscription_admin}/paths.rb (96%) create mode 100644 google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin.rb rename google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/{publisher => topic_admin}/client.rb (95%) create mode 100644 google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/credentials.rb rename google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/{subscriber => topic_admin}/helpers.rb (89%) rename google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/{publisher => topic_admin}/paths.rb (97%) rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/acknowledge.rb (80%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/create_snapshot.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/create_subscription.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/delete_snapshot.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/delete_subscription.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/get_snapshot.rb (80%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/get_subscription.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/list_snapshots.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/list_subscriptions.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/modify_ack_deadline.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/modify_push_config.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/pull.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/seek.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/streaming_pull.rb (83%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/update_snapshot.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{subscriber => subscription_admin}/update_subscription.rb (79%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/create_topic.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/delete_topic.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/detach_subscription.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/get_topic.rb (82%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/list_topic_snapshots.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/list_topic_subscriptions.rb (80%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/list_topics.rb (83%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/publish.rb (82%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/snippets/{publisher => topic_admin}/update_topic.rb (81%) mode change 100755 => 100644 rename google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/{publisher => subscription_admin}/helpers_test.rb (87%) rename google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/{subscriber_paths_test.rb => subscription_admin_paths_test.rb} (82%) rename google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/{subscriber_test.rb => subscription_admin_test.rb} (96%) rename google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/{subscriber => topic_admin}/helpers_test.rb (90%) rename google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/{publisher_paths_test.rb => topic_admin_paths_test.rb} (83%) rename google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/{publisher_test.rb => topic_admin_test.rb} (95%) diff --git a/google-cloud-pubsub-v1/.owlbot-manifest.json b/google-cloud-pubsub-v1/.owlbot-manifest.json index 8c4b5c856463..ca67fd97c6ba 100644 --- a/google-cloud-pubsub-v1/.owlbot-manifest.json +++ b/google-cloud-pubsub-v1/.owlbot-manifest.json @@ -15,18 +15,18 @@ "google-cloud-pubsub-v1.gemspec", "lib/google-cloud-pubsub-v1.rb", "lib/google/cloud/pubsub/v1.rb", - "lib/google/cloud/pubsub/v1/publisher.rb", - "lib/google/cloud/pubsub/v1/publisher/client.rb", - "lib/google/cloud/pubsub/v1/publisher/credentials.rb", - "lib/google/cloud/pubsub/v1/publisher/paths.rb", "lib/google/cloud/pubsub/v1/schema_service.rb", "lib/google/cloud/pubsub/v1/schema_service/client.rb", "lib/google/cloud/pubsub/v1/schema_service/credentials.rb", "lib/google/cloud/pubsub/v1/schema_service/paths.rb", - "lib/google/cloud/pubsub/v1/subscriber.rb", - "lib/google/cloud/pubsub/v1/subscriber/client.rb", - "lib/google/cloud/pubsub/v1/subscriber/credentials.rb", - "lib/google/cloud/pubsub/v1/subscriber/paths.rb", + "lib/google/cloud/pubsub/v1/subscription_admin.rb", + "lib/google/cloud/pubsub/v1/subscription_admin/client.rb", + "lib/google/cloud/pubsub/v1/subscription_admin/credentials.rb", + "lib/google/cloud/pubsub/v1/subscription_admin/paths.rb", + "lib/google/cloud/pubsub/v1/topic_admin.rb", + "lib/google/cloud/pubsub/v1/topic_admin/client.rb", + "lib/google/cloud/pubsub/v1/topic_admin/credentials.rb", + "lib/google/cloud/pubsub/v1/topic_admin/paths.rb", "lib/google/cloud/pubsub/v1/version.rb", "lib/google/pubsub/v1/pubsub_pb.rb", "lib/google/pubsub/v1/pubsub_services_pb.rb", @@ -45,15 +45,6 @@ "proto_docs/google/pubsub/v1/schema.rb", "proto_docs/google/type/expr.rb", "snippets/Gemfile", - "snippets/publisher/create_topic.rb", - "snippets/publisher/delete_topic.rb", - "snippets/publisher/detach_subscription.rb", - "snippets/publisher/get_topic.rb", - "snippets/publisher/list_topic_snapshots.rb", - "snippets/publisher/list_topic_subscriptions.rb", - "snippets/publisher/list_topics.rb", - "snippets/publisher/publish.rb", - "snippets/publisher/update_topic.rb", "snippets/schema_service/commit_schema.rb", "snippets/schema_service/create_schema.rb", "snippets/schema_service/delete_schema.rb", @@ -65,40 +56,52 @@ "snippets/schema_service/validate_message.rb", "snippets/schema_service/validate_schema.rb", "snippets/snippet_metadata_google.pubsub.v1.json", - "snippets/subscriber/acknowledge.rb", - "snippets/subscriber/create_snapshot.rb", - "snippets/subscriber/create_subscription.rb", - "snippets/subscriber/delete_snapshot.rb", - "snippets/subscriber/delete_subscription.rb", - "snippets/subscriber/get_snapshot.rb", - "snippets/subscriber/get_subscription.rb", - "snippets/subscriber/list_snapshots.rb", - "snippets/subscriber/list_subscriptions.rb", - "snippets/subscriber/modify_ack_deadline.rb", - "snippets/subscriber/modify_push_config.rb", - "snippets/subscriber/pull.rb", - "snippets/subscriber/seek.rb", - "snippets/subscriber/streaming_pull.rb", - "snippets/subscriber/update_snapshot.rb", - "snippets/subscriber/update_subscription.rb", - "test/google/cloud/pubsub/v1/publisher_paths_test.rb", - "test/google/cloud/pubsub/v1/publisher_test.rb", + "snippets/subscription_admin/acknowledge.rb", + "snippets/subscription_admin/create_snapshot.rb", + "snippets/subscription_admin/create_subscription.rb", + "snippets/subscription_admin/delete_snapshot.rb", + "snippets/subscription_admin/delete_subscription.rb", + "snippets/subscription_admin/get_snapshot.rb", + "snippets/subscription_admin/get_subscription.rb", + "snippets/subscription_admin/list_snapshots.rb", + "snippets/subscription_admin/list_subscriptions.rb", + "snippets/subscription_admin/modify_ack_deadline.rb", + "snippets/subscription_admin/modify_push_config.rb", + "snippets/subscription_admin/pull.rb", + "snippets/subscription_admin/seek.rb", + "snippets/subscription_admin/streaming_pull.rb", + "snippets/subscription_admin/update_snapshot.rb", + "snippets/subscription_admin/update_subscription.rb", + "snippets/topic_admin/create_topic.rb", + "snippets/topic_admin/delete_topic.rb", + "snippets/topic_admin/detach_subscription.rb", + "snippets/topic_admin/get_topic.rb", + "snippets/topic_admin/list_topic_snapshots.rb", + "snippets/topic_admin/list_topic_subscriptions.rb", + "snippets/topic_admin/list_topics.rb", + "snippets/topic_admin/publish.rb", + "snippets/topic_admin/update_topic.rb", "test/google/cloud/pubsub/v1/schema_service_paths_test.rb", "test/google/cloud/pubsub/v1/schema_service_test.rb", - "test/google/cloud/pubsub/v1/subscriber_paths_test.rb", - "test/google/cloud/pubsub/v1/subscriber_test.rb", + "test/google/cloud/pubsub/v1/subscription_admin_paths_test.rb", + "test/google/cloud/pubsub/v1/subscription_admin_test.rb", + "test/google/cloud/pubsub/v1/topic_admin_paths_test.rb", + "test/google/cloud/pubsub/v1/topic_admin_test.rb", "test/helper.rb" ], "static": [ ".OwlBot.yaml", + ".owlbot.rb", "lib/google/cloud/pubsub/v1/_helpers.rb", "lib/google/cloud/pubsub/v1/iam_policy.rb", "lib/google/cloud/pubsub/v1/iam_policy/client.rb", "lib/google/cloud/pubsub/v1/iam_policy/credentials.rb", - "lib/google/cloud/pubsub/v1/publisher/helpers.rb", - "lib/google/cloud/pubsub/v1/subscriber/helpers.rb", + "lib/google/cloud/pubsub/v1/publisher/credentials.rb", + "lib/google/cloud/pubsub/v1/subscriber/credentials.rb", + "lib/google/cloud/pubsub/v1/subscription_admin/helpers.rb", + "lib/google/cloud/pubsub/v1/topic_admin/helpers.rb", "test/google/cloud/pubsub/v1/iam_policy_test.rb", - "test/google/cloud/pubsub/v1/publisher/helpers_test.rb", - "test/google/cloud/pubsub/v1/subscriber/helpers_test.rb" + "test/google/cloud/pubsub/v1/subscription_admin/helpers_test.rb", + "test/google/cloud/pubsub/v1/topic_admin/helpers_test.rb" ] } diff --git a/google-cloud-pubsub-v1/.owlbot.rb b/google-cloud-pubsub-v1/.owlbot.rb new file mode 100644 index 000000000000..91592fecb95f --- /dev/null +++ b/google-cloud-pubsub-v1/.owlbot.rb @@ -0,0 +1,23 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + + +OwlBot.modifier path: "test/google/cloud/pubsub/v1/subscription_admin_test.rb", name: "Remove pubsub_services from tests" do |content| + content&.sub 'require "google/pubsub/v1/pubsub_services_pb"', "" +end +OwlBot.modifier path: "test/google/cloud/pubsub/v1/topic_admin_test.rb", name: "Remove pubsub_services from tests" do |content| + content&.sub 'require "google/pubsub/v1/pubsub_services_pb"', "" +end + +OwlBot.move_files diff --git a/google-cloud-pubsub-v1/.repo-metadata.json b/google-cloud-pubsub-v1/.repo-metadata.json index 2c6133016156..53fcbfb70618 100644 --- a/google-cloud-pubsub-v1/.repo-metadata.json +++ b/google-cloud-pubsub-v1/.repo-metadata.json @@ -16,5 +16,6 @@ "ruby-cloud-product-url": "https://cloud.google.com/pubsub", "ruby-cloud-path-override": "pub_sub=pubsub", "ruby-cloud-namespace-override": "Pubsub=PubSub", + "ruby-cloud-service-override": "Publisher=TopicAdmin;Subscriber=SubscriptionAdmin", "library_type": "GAPIC_COMBO" } diff --git a/google-cloud-pubsub-v1/gapic_metadata.json b/google-cloud-pubsub-v1/gapic_metadata.json index c83bd1885f2c..04174b8f12c9 100644 --- a/google-cloud-pubsub-v1/gapic_metadata.json +++ b/google-cloud-pubsub-v1/gapic_metadata.json @@ -67,7 +67,7 @@ "Publisher": { "clients": { "grpc": { - "libraryClient": "::Google::Cloud::PubSub::V1::Publisher::Client", + "libraryClient": "::Google::Cloud::PubSub::V1::TopicAdmin::Client", "rpcs": { "CreateTopic": { "methods": [ @@ -121,7 +121,7 @@ "Subscriber": { "clients": { "grpc": { - "libraryClient": "::Google::Cloud::PubSub::V1::Subscriber::Client", + "libraryClient": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client", "rpcs": { "CreateSubscription": { "methods": [ diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1.rb index c93d1d68de1e..6dab100eae07 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1.rb @@ -17,8 +17,8 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/pubsub/v1/schema_service" -require "google/cloud/pubsub/v1/publisher" -require "google/cloud/pubsub/v1/subscriber" +require "google/cloud/pubsub/v1/topic_admin" +require "google/cloud/pubsub/v1/subscription_admin" require "google/cloud/pubsub/v1/version" module Google diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher.rb index 5a87c909cfe0..f92fa7e9c675 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,37 +14,4 @@ # 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/pubsub/v1/version" - -require "google/cloud/pubsub/v1/publisher/credentials" -require "google/cloud/pubsub/v1/publisher/paths" -require "google/cloud/pubsub/v1/publisher/client" - -module Google - module Cloud - module PubSub - module V1 - ## - # The service that an application uses to manipulate topics, and to send - # messages to a topic. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/pubsub/v1/publisher" - # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new - # - module Publisher - end - end - end - end -end - -helper_path = ::File.join __dir__, "publisher", "helpers.rb" -require "google/cloud/pubsub/v1/publisher/helpers" if ::File.file? helper_path +require "google/cloud/pubsub/v1/topic_admin" diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/credentials.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/credentials.rb index b4c629e3f4a1..f92fa7e9c675 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/credentials.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,39 +14,4 @@ # 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 PubSub - module V1 - module Publisher - # Credentials for the Publisher API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - self.env_vars = [ - "PUBSUB_CREDENTIALS", - "PUBSUB_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "PUBSUB_CREDENTIALS_JSON", - "PUBSUB_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end +require "google/cloud/pubsub/v1/topic_admin" diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber.rb index 5a11aae3e9f0..8a3f2d067a8d 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,38 +14,4 @@ # 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/pubsub/v1/version" - -require "google/cloud/pubsub/v1/subscriber/credentials" -require "google/cloud/pubsub/v1/subscriber/paths" -require "google/cloud/pubsub/v1/subscriber/client" - -module Google - module Cloud - module PubSub - module V1 - ## - # The service that an application uses to manipulate subscriptions and to - # consume messages from a subscription via the `Pull` method or by - # establishing a bi-directional stream using the `StreamingPull` method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/pubsub/v1/subscriber" - # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new - # - module Subscriber - end - end - end - end -end - -helper_path = ::File.join __dir__, "subscriber", "helpers.rb" -require "google/cloud/pubsub/v1/subscriber/helpers" if ::File.file? helper_path +require "google/cloud/pubsub/v1/subscription_admin" diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/credentials.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/credentials.rb index 97d9e3f87ea3..8a3f2d067a8d 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/credentials.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,39 +14,4 @@ # 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 PubSub - module V1 - module Subscriber - # Credentials for the Subscriber API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - self.env_vars = [ - "PUBSUB_CREDENTIALS", - "PUBSUB_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "PUBSUB_CREDENTIALS_JSON", - "PUBSUB_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end +require "google/cloud/pubsub/v1/subscription_admin" diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin.rb new file mode 100644 index 000000000000..eb84ddbc66d0 --- /dev/null +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/pubsub/v1/version" + +require "google/cloud/pubsub/v1/subscription_admin/credentials" +require "google/cloud/pubsub/v1/subscription_admin/paths" +require "google/cloud/pubsub/v1/subscription_admin/client" + +module Google + module Cloud + module PubSub + module V1 + ## + # The service that an application uses to manipulate subscriptions and to + # consume messages from a subscription via the `Pull` method or by + # establishing a bi-directional stream using the `StreamingPull` method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/pubsub/v1/subscription_admin" + # client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new + # + module SubscriptionAdmin + end + end + end + end +end + +helper_path = ::File.join __dir__, "subscription_admin", "helpers.rb" +require "google/cloud/pubsub/v1/subscription_admin/helpers" if ::File.file? helper_path diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/client.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/client.rb similarity index 95% rename from google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/client.rb rename to google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/client.rb index 07843cd9de40..fece30685a48 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/client.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,9 +24,9 @@ module Google module Cloud module PubSub module V1 - module Subscriber + module SubscriptionAdmin ## - # Client for the Subscriber service. + # Client for the SubscriptionAdmin service. # # The service that an application uses to manipulate subscriptions and to # consume messages from a subscription via the `Pull` method or by @@ -42,18 +42,18 @@ class Client include Paths # @private - attr_reader :subscriber_stub + attr_reader :subscription_admin_stub ## - # Configure the Subscriber Client class. + # Configure the SubscriptionAdmin Client class. # - # See {::Google::Cloud::PubSub::V1::Subscriber::Client::Configuration} + # See {::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration} # for a description of the configuration fields. # # @example # - # # Modify the configuration for all Subscriber clients - # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config| + # # Modify the configuration for all SubscriptionAdmin clients + # ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.configure do |config| # config.timeout = 10.0 # end # @@ -160,13 +160,13 @@ def self.configure end ## - # Configure the Subscriber Client instance. + # Configure the SubscriptionAdmin 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::PubSub::V1::Subscriber::Client::Configuration} + # See {::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration} # for a description of the configuration fields. # # @yield [config] Configure the Client client. @@ -185,23 +185,23 @@ def configure # @return [String] # def universe_domain - @subscriber_stub.universe_domain + @subscription_admin_stub.universe_domain end ## - # Create a new Subscriber client object. + # Create a new SubscriptionAdmin client object. # # @example # # # Create a client using the default configuration - # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a client using a custom configuration - # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + # client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| # config.timeout = 10.0 # end # - # @yield [config] Configure the Subscriber client. + # @yield [config] Configure the SubscriptionAdmin client. # @yieldparam config [Client::Configuration] # def initialize @@ -232,7 +232,7 @@ def initialize @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - @subscriber_stub = ::Gapic::ServiceStub.new( + @subscription_admin_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::PubSub::V1::Subscriber::Stub, credentials: credentials, endpoint: @config.endpoint, @@ -244,7 +244,7 @@ def initialize logger: @config.logger ) - @subscriber_stub.stub_logger&.info do |entry| + @subscription_admin_stub.stub_logger&.info do |entry| entry.set_system_name entry.set_service entry.message = "Created client for #{entry.service}" @@ -257,9 +257,9 @@ def initialize @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id - config.endpoint = @subscriber_stub.endpoint - config.universe_domain = @subscriber_stub.universe_domain - config.logger = @subscriber_stub.logger if config.respond_to? :logger= + config.endpoint = @subscription_admin_stub.endpoint + config.universe_domain = @subscription_admin_stub.universe_domain + config.logger = @subscription_admin_stub.logger if config.respond_to? :logger= end end @@ -276,7 +276,7 @@ def initialize # @return [Logger] # def logger - @subscriber_stub.logger + @subscription_admin_stub.logger end # Service calls @@ -437,7 +437,7 @@ def logger # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::Subscription.new @@ -482,7 +482,7 @@ def create_subscription request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :create_subscription, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :create_subscription, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -523,7 +523,7 @@ def create_subscription request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::GetSubscriptionRequest.new @@ -568,7 +568,7 @@ def get_subscription request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :get_subscription, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :get_subscription, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -613,7 +613,7 @@ def get_subscription request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::UpdateSubscriptionRequest.new @@ -658,7 +658,7 @@ def update_subscription request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :update_subscription, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :update_subscription, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -705,7 +705,7 @@ def update_subscription request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::ListSubscriptionsRequest.new @@ -754,8 +754,8 @@ def list_subscriptions request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :list_subscriptions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @subscriber_stub, :list_subscriptions, request, response, operation, options + @subscription_admin_stub.call_rpc :list_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @subscription_admin_stub, :list_subscriptions, request, response, operation, options yield response, operation if block_given? throw :response, response end @@ -801,7 +801,7 @@ def list_subscriptions request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::DeleteSubscriptionRequest.new @@ -846,7 +846,7 @@ def delete_subscription request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :delete_subscription, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :delete_subscription, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -903,7 +903,7 @@ def delete_subscription request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::ModifyAckDeadlineRequest.new @@ -948,7 +948,7 @@ def modify_ack_deadline request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :modify_ack_deadline, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :modify_ack_deadline, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -999,7 +999,7 @@ def modify_ack_deadline request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::AcknowledgeRequest.new @@ -1044,7 +1044,7 @@ def acknowledge request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :acknowledge, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :acknowledge, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1097,7 +1097,7 @@ def acknowledge request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::PullRequest.new @@ -1142,7 +1142,7 @@ def pull request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :pull, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :pull, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1175,7 +1175,7 @@ def pull request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create an input stream. # input = Gapic::StreamInput.new @@ -1226,7 +1226,7 @@ def streaming_pull request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :streaming_pull, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :streaming_pull, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1279,7 +1279,7 @@ def streaming_pull request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::ModifyPushConfigRequest.new @@ -1324,7 +1324,7 @@ def modify_push_config request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :modify_push_config, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :modify_push_config, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1369,7 +1369,7 @@ def modify_push_config request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::GetSnapshotRequest.new @@ -1414,7 +1414,7 @@ def get_snapshot request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :get_snapshot, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :get_snapshot, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1465,7 +1465,7 @@ def get_snapshot request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::ListSnapshotsRequest.new @@ -1514,8 +1514,8 @@ def list_snapshots request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :list_snapshots, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @subscriber_stub, :list_snapshots, request, response, operation, options + @subscription_admin_stub.call_rpc :list_snapshots, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @subscription_admin_stub, :list_snapshots, request, response, operation, options yield response, operation if block_given? throw :response, response end @@ -1589,7 +1589,7 @@ def list_snapshots request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::CreateSnapshotRequest.new @@ -1634,7 +1634,7 @@ def create_snapshot request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :create_snapshot, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :create_snapshot, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1682,7 +1682,7 @@ def create_snapshot request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::UpdateSnapshotRequest.new @@ -1727,7 +1727,7 @@ def update_snapshot request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :update_snapshot, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :update_snapshot, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1776,7 +1776,7 @@ def update_snapshot request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::DeleteSnapshotRequest.new @@ -1821,7 +1821,7 @@ def delete_snapshot request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :delete_snapshot, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :delete_snapshot, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1887,7 +1887,7 @@ def delete_snapshot request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Subscriber::Client.new + # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::SeekRequest.new @@ -1932,7 +1932,7 @@ def seek request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @subscriber_stub.call_rpc :seek, request, options: options do |response, operation| + @subscription_admin_stub.call_rpc :seek, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1940,13 +1940,13 @@ def seek request, options = nil end ## - # Configuration class for the Subscriber API. + # Configuration class for the SubscriptionAdmin API. # - # This class represents the configuration for Subscriber, + # This class represents the configuration for SubscriptionAdmin, # 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::PubSub::V1::Subscriber::Client::Configuration::Rpcs} + # {::Google::Cloud::PubSub::V1::SubscriptionAdmin::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 @@ -1957,13 +1957,13 @@ def seek request, options = nil # # Modify the global config, setting the timeout for # # create_subscription to 20 seconds, # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config| + # ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.configure do |config| # config.timeout = 10.0 # config.rpcs.create_subscription.timeout = 20.0 # end # # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + # client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| # config.timeout = 10.0 # config.rpcs.create_subscription.timeout = 20.0 # end @@ -2088,7 +2088,7 @@ def channel_pool end ## - # Configuration RPC class for the Subscriber API. + # Configuration RPC class for the SubscriptionAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/credentials.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/credentials.rb new file mode 100644 index 000000000000..ae25a1d541d9 --- /dev/null +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 PubSub + module V1 + module SubscriptionAdmin + # Credentials for the SubscriptionAdmin API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + self.env_vars = [ + "PUBSUB_CREDENTIALS", + "PUBSUB_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "PUBSUB_CREDENTIALS_JSON", + "PUBSUB_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/helpers.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/helpers.rb similarity index 88% rename from google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/helpers.rb rename to google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/helpers.rb index d936249c194c..e62867ed953d 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/helpers.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/helpers.rb @@ -19,7 +19,7 @@ module Google module Cloud module PubSub module V1 - module Publisher + module SubscriptionAdmin class Client # rubocop:disable Style/Documentation class << self alias configure_internal configure @@ -41,6 +41,9 @@ def configure end end end + # Alias for SubscriptionAdmin. Subscriber is a legacy name for this service, + # maintained for backwards compatibility. + Subscriber = SubscriptionAdmin end end end diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/paths.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/paths.rb similarity index 96% rename from google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/paths.rb rename to google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/paths.rb index c567bf57cb51..19469ca0da4a 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/paths.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ module Google module Cloud module PubSub module V1 - module Subscriber - # Path helper methods for the Subscriber API. + module SubscriptionAdmin + # Path helper methods for the SubscriptionAdmin API. module Paths ## # Create a fully-qualified Project resource string. diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin.rb new file mode 100644 index 000000000000..cefa74d1bcc2 --- /dev/null +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/pubsub/v1/version" + +require "google/cloud/pubsub/v1/topic_admin/credentials" +require "google/cloud/pubsub/v1/topic_admin/paths" +require "google/cloud/pubsub/v1/topic_admin/client" + +module Google + module Cloud + module PubSub + module V1 + ## + # The service that an application uses to manipulate topics, and to send + # messages to a topic. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/pubsub/v1/topic_admin" + # client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new + # + module TopicAdmin + end + end + end + end +end + +helper_path = ::File.join __dir__, "topic_admin", "helpers.rb" +require "google/cloud/pubsub/v1/topic_admin/helpers" if ::File.file? helper_path diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/client.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/client.rb similarity index 95% rename from google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/client.rb rename to google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/client.rb index 41794890e126..c38eb7a419fe 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/client.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,9 +24,9 @@ module Google module Cloud module PubSub module V1 - module Publisher + module TopicAdmin ## - # Client for the Publisher service. + # Client for the TopicAdmin service. # # The service that an application uses to manipulate topics, and to send # messages to a topic. @@ -41,18 +41,18 @@ class Client include Paths # @private - attr_reader :publisher_stub + attr_reader :topic_admin_stub ## - # Configure the Publisher Client class. + # Configure the TopicAdmin Client class. # - # See {::Google::Cloud::PubSub::V1::Publisher::Client::Configuration} + # See {::Google::Cloud::PubSub::V1::TopicAdmin::Client::Configuration} # for a description of the configuration fields. # # @example # - # # Modify the configuration for all Publisher clients - # ::Google::Cloud::PubSub::V1::Publisher::Client.configure do |config| + # # Modify the configuration for all TopicAdmin clients + # ::Google::Cloud::PubSub::V1::TopicAdmin::Client.configure do |config| # config.timeout = 10.0 # end # @@ -124,13 +124,13 @@ def self.configure end ## - # Configure the Publisher Client instance. + # Configure the TopicAdmin 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::PubSub::V1::Publisher::Client::Configuration} + # See {::Google::Cloud::PubSub::V1::TopicAdmin::Client::Configuration} # for a description of the configuration fields. # # @yield [config] Configure the Client client. @@ -149,23 +149,23 @@ def configure # @return [String] # def universe_domain - @publisher_stub.universe_domain + @topic_admin_stub.universe_domain end ## - # Create a new Publisher client object. + # Create a new TopicAdmin client object. # # @example # # # Create a client using the default configuration - # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new + # client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a client using a custom configuration - # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + # client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| # config.timeout = 10.0 # end # - # @yield [config] Configure the Publisher client. + # @yield [config] Configure the TopicAdmin client. # @yieldparam config [Client::Configuration] # def initialize @@ -196,7 +196,7 @@ def initialize @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - @publisher_stub = ::Gapic::ServiceStub.new( + @topic_admin_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::PubSub::V1::Publisher::Stub, credentials: credentials, endpoint: @config.endpoint, @@ -208,7 +208,7 @@ def initialize logger: @config.logger ) - @publisher_stub.stub_logger&.info do |entry| + @topic_admin_stub.stub_logger&.info do |entry| entry.set_system_name entry.set_service entry.message = "Created client for #{entry.service}" @@ -221,9 +221,9 @@ def initialize @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id - config.endpoint = @publisher_stub.endpoint - config.universe_domain = @publisher_stub.universe_domain - config.logger = @publisher_stub.logger if config.respond_to? :logger= + config.endpoint = @topic_admin_stub.endpoint + config.universe_domain = @topic_admin_stub.universe_domain + config.logger = @topic_admin_stub.logger if config.respond_to? :logger= end end @@ -240,7 +240,7 @@ def initialize # @return [Logger] # def logger - @publisher_stub.logger + @topic_admin_stub.logger end # Service calls @@ -316,7 +316,7 @@ def logger # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::Topic.new @@ -361,7 +361,7 @@ def create_topic request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :create_topic, request, options: options do |response, operation| + @topic_admin_stub.call_rpc :create_topic, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -408,7 +408,7 @@ def create_topic request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::UpdateTopicRequest.new @@ -453,7 +453,7 @@ def update_topic request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :update_topic, request, options: options do |response, operation| + @topic_admin_stub.call_rpc :update_topic, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -497,7 +497,7 @@ def update_topic request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::PublishRequest.new @@ -542,7 +542,7 @@ def publish request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :publish, request, options: options do |response, operation| + @topic_admin_stub.call_rpc :publish, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -583,7 +583,7 @@ def publish request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::GetTopicRequest.new @@ -628,7 +628,7 @@ def get_topic request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :get_topic, request, options: options do |response, operation| + @topic_admin_stub.call_rpc :get_topic, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -675,7 +675,7 @@ def get_topic request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::ListTopicsRequest.new @@ -724,8 +724,8 @@ def list_topics request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :list_topics, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @publisher_stub, :list_topics, request, response, operation, options + @topic_admin_stub.call_rpc :list_topics, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @topic_admin_stub, :list_topics, request, response, operation, options yield response, operation if block_given? throw :response, response end @@ -773,7 +773,7 @@ def list_topics request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::ListTopicSubscriptionsRequest.new @@ -818,7 +818,7 @@ def list_topic_subscriptions request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :list_topic_subscriptions, request, options: options do |response, operation| + @topic_admin_stub.call_rpc :list_topic_subscriptions, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -869,7 +869,7 @@ def list_topic_subscriptions request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::ListTopicSnapshotsRequest.new @@ -914,7 +914,7 @@ def list_topic_snapshots request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :list_topic_snapshots, request, options: options do |response, operation| + @topic_admin_stub.call_rpc :list_topic_snapshots, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -959,7 +959,7 @@ def list_topic_snapshots request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::DeleteTopicRequest.new @@ -1004,7 +1004,7 @@ def delete_topic request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :delete_topic, request, options: options do |response, operation| + @topic_admin_stub.call_rpc :delete_topic, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1048,7 +1048,7 @@ def delete_topic request, options = nil # require "google/cloud/pubsub/v1" # # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::PubSub::V1::Publisher::Client.new + # client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::PubSub::V1::DetachSubscriptionRequest.new @@ -1093,7 +1093,7 @@ def detach_subscription request, options = nil metadata: @config.metadata, retry_policy: @config.retry_policy - @publisher_stub.call_rpc :detach_subscription, request, options: options do |response, operation| + @topic_admin_stub.call_rpc :detach_subscription, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1101,13 +1101,13 @@ def detach_subscription request, options = nil end ## - # Configuration class for the Publisher API. + # Configuration class for the TopicAdmin API. # - # This class represents the configuration for Publisher, + # This class represents the configuration for TopicAdmin, # 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::PubSub::V1::Publisher::Client::Configuration::Rpcs} + # {::Google::Cloud::PubSub::V1::TopicAdmin::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 @@ -1118,13 +1118,13 @@ def detach_subscription request, options = nil # # Modify the global config, setting the timeout for # # create_topic to 20 seconds, # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::PubSub::V1::Publisher::Client.configure do |config| + # ::Google::Cloud::PubSub::V1::TopicAdmin::Client.configure do |config| # config.timeout = 10.0 # config.rpcs.create_topic.timeout = 20.0 # end # # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + # client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| # config.timeout = 10.0 # config.rpcs.create_topic.timeout = 20.0 # end @@ -1249,7 +1249,7 @@ def channel_pool end ## - # Configuration RPC class for the Publisher API. + # Configuration RPC class for the TopicAdmin API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/credentials.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/credentials.rb new file mode 100644 index 000000000000..e7d9f65583e8 --- /dev/null +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 PubSub + module V1 + module TopicAdmin + # Credentials for the TopicAdmin API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + self.env_vars = [ + "PUBSUB_CREDENTIALS", + "PUBSUB_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "PUBSUB_CREDENTIALS_JSON", + "PUBSUB_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/helpers.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/helpers.rb similarity index 89% rename from google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/helpers.rb rename to google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/helpers.rb index 34d84b8a0956..c937cb28e996 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscriber/helpers.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/helpers.rb @@ -19,7 +19,7 @@ module Google module Cloud module PubSub module V1 - module Subscriber + module TopicAdmin class Client # rubocop:disable Style/Documentation class << self alias configure_internal configure @@ -41,6 +41,9 @@ def configure end end end + # Alias for TopicAdmin. Publisher is a legacy name for this service, + # maintained for backwards compatibility. + Publisher = TopicAdmin end end end diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/paths.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/paths.rb similarity index 97% rename from google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/paths.rb rename to google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/paths.rb index 506c9f013d00..82eba477aff0 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/publisher/paths.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/topic_admin/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ module Google module Cloud module PubSub module V1 - module Publisher - # Path helper methods for the Publisher API. + module TopicAdmin + # Path helper methods for the TopicAdmin API. module Paths ## # Create a fully-qualified Project resource string. diff --git a/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json b/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json index e4810961176c..8884a12c3ba3 100644 --- a/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json +++ b/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json @@ -412,14 +412,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_CreateTopic_sync", - "title": "Snippet for the create_topic call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#create_topic.", - "file": "publisher/create_topic.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_CreateTopic_sync", + "title": "Snippet for the create_topic call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#create_topic.", + "file": "topic_admin/create_topic.rb", "language": "RUBY", "client_method": { "short_name": "create_topic", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#create_topic", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#create_topic", "async": false, "parameters": [ { @@ -429,14 +429,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Topic", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "CreateTopic", "full_name": "google.pubsub.v1.Publisher.CreateTopic", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -452,14 +452,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_UpdateTopic_sync", - "title": "Snippet for the update_topic call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#update_topic.", - "file": "publisher/update_topic.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_UpdateTopic_sync", + "title": "Snippet for the update_topic call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#update_topic.", + "file": "topic_admin/update_topic.rb", "language": "RUBY", "client_method": { "short_name": "update_topic", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#update_topic", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#update_topic", "async": false, "parameters": [ { @@ -469,14 +469,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Topic", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "UpdateTopic", "full_name": "google.pubsub.v1.Publisher.UpdateTopic", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -492,14 +492,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_Publish_sync", - "title": "Snippet for the publish call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#publish.", - "file": "publisher/publish.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_Publish_sync", + "title": "Snippet for the publish call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#publish.", + "file": "topic_admin/publish.rb", "language": "RUBY", "client_method": { "short_name": "publish", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#publish", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#publish", "async": false, "parameters": [ { @@ -509,14 +509,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::PublishResponse", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "Publish", "full_name": "google.pubsub.v1.Publisher.Publish", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -532,14 +532,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_GetTopic_sync", - "title": "Snippet for the get_topic call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#get_topic.", - "file": "publisher/get_topic.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_GetTopic_sync", + "title": "Snippet for the get_topic call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#get_topic.", + "file": "topic_admin/get_topic.rb", "language": "RUBY", "client_method": { "short_name": "get_topic", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#get_topic", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#get_topic", "async": false, "parameters": [ { @@ -549,14 +549,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Topic", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "GetTopic", "full_name": "google.pubsub.v1.Publisher.GetTopic", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -572,14 +572,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_ListTopics_sync", - "title": "Snippet for the list_topics call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#list_topics.", - "file": "publisher/list_topics.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_ListTopics_sync", + "title": "Snippet for the list_topics call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topics.", + "file": "topic_admin/list_topics.rb", "language": "RUBY", "client_method": { "short_name": "list_topics", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#list_topics", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topics", "async": false, "parameters": [ { @@ -589,14 +589,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::ListTopicsResponse", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "ListTopics", "full_name": "google.pubsub.v1.Publisher.ListTopics", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -612,14 +612,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_ListTopicSubscriptions_sync", - "title": "Snippet for the list_topic_subscriptions call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#list_topic_subscriptions.", - "file": "publisher/list_topic_subscriptions.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_ListTopicSubscriptions_sync", + "title": "Snippet for the list_topic_subscriptions call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topic_subscriptions.", + "file": "topic_admin/list_topic_subscriptions.rb", "language": "RUBY", "client_method": { "short_name": "list_topic_subscriptions", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#list_topic_subscriptions", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topic_subscriptions", "async": false, "parameters": [ { @@ -629,14 +629,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "ListTopicSubscriptions", "full_name": "google.pubsub.v1.Publisher.ListTopicSubscriptions", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -652,14 +652,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_ListTopicSnapshots_sync", - "title": "Snippet for the list_topic_snapshots call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#list_topic_snapshots.", - "file": "publisher/list_topic_snapshots.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_ListTopicSnapshots_sync", + "title": "Snippet for the list_topic_snapshots call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topic_snapshots.", + "file": "topic_admin/list_topic_snapshots.rb", "language": "RUBY", "client_method": { "short_name": "list_topic_snapshots", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#list_topic_snapshots", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topic_snapshots", "async": false, "parameters": [ { @@ -669,14 +669,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::ListTopicSnapshotsResponse", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "ListTopicSnapshots", "full_name": "google.pubsub.v1.Publisher.ListTopicSnapshots", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -692,14 +692,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_DeleteTopic_sync", - "title": "Snippet for the delete_topic call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#delete_topic.", - "file": "publisher/delete_topic.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_DeleteTopic_sync", + "title": "Snippet for the delete_topic call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#delete_topic.", + "file": "topic_admin/delete_topic.rb", "language": "RUBY", "client_method": { "short_name": "delete_topic", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#delete_topic", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#delete_topic", "async": false, "parameters": [ { @@ -709,14 +709,14 @@ ], "result_type": "::Google::Protobuf::Empty", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "DeleteTopic", "full_name": "google.pubsub.v1.Publisher.DeleteTopic", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -732,14 +732,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Publisher_DetachSubscription_sync", - "title": "Snippet for the detach_subscription call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Publisher::Client#detach_subscription.", - "file": "publisher/detach_subscription.rb", + "region_tag": "pubsub_v1_generated_TopicAdmin_DetachSubscription_sync", + "title": "Snippet for the detach_subscription call in the TopicAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::TopicAdmin::Client#detach_subscription.", + "file": "topic_admin/detach_subscription.rb", "language": "RUBY", "client_method": { "short_name": "detach_subscription", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client#detach_subscription", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client#detach_subscription", "async": false, "parameters": [ { @@ -749,14 +749,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::DetachSubscriptionResponse", "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::PubSub::V1::Publisher::Client" + "short_name": "TopicAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::TopicAdmin::Client" }, "method": { "short_name": "DetachSubscription", "full_name": "google.pubsub.v1.Publisher.DetachSubscription", "service": { - "short_name": "Publisher", + "short_name": "TopicAdmin", "full_name": "google.pubsub.v1.Publisher" } } @@ -772,14 +772,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_CreateSubscription_sync", - "title": "Snippet for the create_subscription call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#create_subscription.", - "file": "subscriber/create_subscription.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_CreateSubscription_sync", + "title": "Snippet for the create_subscription call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#create_subscription.", + "file": "subscription_admin/create_subscription.rb", "language": "RUBY", "client_method": { "short_name": "create_subscription", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#create_subscription", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#create_subscription", "async": false, "parameters": [ { @@ -789,14 +789,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Subscription", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "CreateSubscription", "full_name": "google.pubsub.v1.Subscriber.CreateSubscription", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -812,14 +812,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_GetSubscription_sync", - "title": "Snippet for the get_subscription call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#get_subscription.", - "file": "subscriber/get_subscription.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_GetSubscription_sync", + "title": "Snippet for the get_subscription call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#get_subscription.", + "file": "subscription_admin/get_subscription.rb", "language": "RUBY", "client_method": { "short_name": "get_subscription", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#get_subscription", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#get_subscription", "async": false, "parameters": [ { @@ -829,14 +829,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Subscription", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "GetSubscription", "full_name": "google.pubsub.v1.Subscriber.GetSubscription", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -852,14 +852,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_UpdateSubscription_sync", - "title": "Snippet for the update_subscription call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#update_subscription.", - "file": "subscriber/update_subscription.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_UpdateSubscription_sync", + "title": "Snippet for the update_subscription call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#update_subscription.", + "file": "subscription_admin/update_subscription.rb", "language": "RUBY", "client_method": { "short_name": "update_subscription", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#update_subscription", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#update_subscription", "async": false, "parameters": [ { @@ -869,14 +869,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Subscription", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "UpdateSubscription", "full_name": "google.pubsub.v1.Subscriber.UpdateSubscription", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -892,14 +892,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_ListSubscriptions_sync", - "title": "Snippet for the list_subscriptions call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#list_subscriptions.", - "file": "subscriber/list_subscriptions.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_ListSubscriptions_sync", + "title": "Snippet for the list_subscriptions call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#list_subscriptions.", + "file": "subscription_admin/list_subscriptions.rb", "language": "RUBY", "client_method": { "short_name": "list_subscriptions", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#list_subscriptions", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#list_subscriptions", "async": false, "parameters": [ { @@ -909,14 +909,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::ListSubscriptionsResponse", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "ListSubscriptions", "full_name": "google.pubsub.v1.Subscriber.ListSubscriptions", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -932,14 +932,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_DeleteSubscription_sync", - "title": "Snippet for the delete_subscription call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#delete_subscription.", - "file": "subscriber/delete_subscription.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_DeleteSubscription_sync", + "title": "Snippet for the delete_subscription call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#delete_subscription.", + "file": "subscription_admin/delete_subscription.rb", "language": "RUBY", "client_method": { "short_name": "delete_subscription", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#delete_subscription", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#delete_subscription", "async": false, "parameters": [ { @@ -949,14 +949,14 @@ ], "result_type": "::Google::Protobuf::Empty", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "DeleteSubscription", "full_name": "google.pubsub.v1.Subscriber.DeleteSubscription", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -972,14 +972,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_ModifyAckDeadline_sync", - "title": "Snippet for the modify_ack_deadline call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#modify_ack_deadline.", - "file": "subscriber/modify_ack_deadline.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_ModifyAckDeadline_sync", + "title": "Snippet for the modify_ack_deadline call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#modify_ack_deadline.", + "file": "subscription_admin/modify_ack_deadline.rb", "language": "RUBY", "client_method": { "short_name": "modify_ack_deadline", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#modify_ack_deadline", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#modify_ack_deadline", "async": false, "parameters": [ { @@ -989,14 +989,14 @@ ], "result_type": "::Google::Protobuf::Empty", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "ModifyAckDeadline", "full_name": "google.pubsub.v1.Subscriber.ModifyAckDeadline", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1012,14 +1012,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_Acknowledge_sync", - "title": "Snippet for the acknowledge call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#acknowledge.", - "file": "subscriber/acknowledge.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_Acknowledge_sync", + "title": "Snippet for the acknowledge call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#acknowledge.", + "file": "subscription_admin/acknowledge.rb", "language": "RUBY", "client_method": { "short_name": "acknowledge", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#acknowledge", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#acknowledge", "async": false, "parameters": [ { @@ -1029,14 +1029,14 @@ ], "result_type": "::Google::Protobuf::Empty", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "Acknowledge", "full_name": "google.pubsub.v1.Subscriber.Acknowledge", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1052,14 +1052,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_Pull_sync", - "title": "Snippet for the pull call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#pull.", - "file": "subscriber/pull.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_Pull_sync", + "title": "Snippet for the pull call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#pull.", + "file": "subscription_admin/pull.rb", "language": "RUBY", "client_method": { "short_name": "pull", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#pull", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#pull", "async": false, "parameters": [ { @@ -1069,14 +1069,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::PullResponse", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "Pull", "full_name": "google.pubsub.v1.Subscriber.Pull", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1092,14 +1092,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_StreamingPull_sync", - "title": "Snippet for the streaming_pull call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#streaming_pull.", - "file": "subscriber/streaming_pull.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_StreamingPull_sync", + "title": "Snippet for the streaming_pull call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#streaming_pull.", + "file": "subscription_admin/streaming_pull.rb", "language": "RUBY", "client_method": { "short_name": "streaming_pull", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#streaming_pull", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#streaming_pull", "async": false, "parameters": [ { @@ -1109,14 +1109,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::StreamingPullResponse", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "StreamingPull", "full_name": "google.pubsub.v1.Subscriber.StreamingPull", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1132,14 +1132,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_ModifyPushConfig_sync", - "title": "Snippet for the modify_push_config call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#modify_push_config.", - "file": "subscriber/modify_push_config.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_ModifyPushConfig_sync", + "title": "Snippet for the modify_push_config call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#modify_push_config.", + "file": "subscription_admin/modify_push_config.rb", "language": "RUBY", "client_method": { "short_name": "modify_push_config", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#modify_push_config", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#modify_push_config", "async": false, "parameters": [ { @@ -1149,14 +1149,14 @@ ], "result_type": "::Google::Protobuf::Empty", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "ModifyPushConfig", "full_name": "google.pubsub.v1.Subscriber.ModifyPushConfig", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1172,14 +1172,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_GetSnapshot_sync", - "title": "Snippet for the get_snapshot call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#get_snapshot.", - "file": "subscriber/get_snapshot.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_GetSnapshot_sync", + "title": "Snippet for the get_snapshot call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#get_snapshot.", + "file": "subscription_admin/get_snapshot.rb", "language": "RUBY", "client_method": { "short_name": "get_snapshot", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#get_snapshot", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#get_snapshot", "async": false, "parameters": [ { @@ -1189,14 +1189,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Snapshot", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "GetSnapshot", "full_name": "google.pubsub.v1.Subscriber.GetSnapshot", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1212,14 +1212,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_ListSnapshots_sync", - "title": "Snippet for the list_snapshots call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#list_snapshots.", - "file": "subscriber/list_snapshots.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_ListSnapshots_sync", + "title": "Snippet for the list_snapshots call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#list_snapshots.", + "file": "subscription_admin/list_snapshots.rb", "language": "RUBY", "client_method": { "short_name": "list_snapshots", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#list_snapshots", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#list_snapshots", "async": false, "parameters": [ { @@ -1229,14 +1229,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::ListSnapshotsResponse", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "ListSnapshots", "full_name": "google.pubsub.v1.Subscriber.ListSnapshots", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1252,14 +1252,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_CreateSnapshot_sync", - "title": "Snippet for the create_snapshot call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#create_snapshot.", - "file": "subscriber/create_snapshot.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_CreateSnapshot_sync", + "title": "Snippet for the create_snapshot call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#create_snapshot.", + "file": "subscription_admin/create_snapshot.rb", "language": "RUBY", "client_method": { "short_name": "create_snapshot", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#create_snapshot", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#create_snapshot", "async": false, "parameters": [ { @@ -1269,14 +1269,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Snapshot", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "CreateSnapshot", "full_name": "google.pubsub.v1.Subscriber.CreateSnapshot", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1292,14 +1292,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_UpdateSnapshot_sync", - "title": "Snippet for the update_snapshot call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#update_snapshot.", - "file": "subscriber/update_snapshot.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_UpdateSnapshot_sync", + "title": "Snippet for the update_snapshot call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#update_snapshot.", + "file": "subscription_admin/update_snapshot.rb", "language": "RUBY", "client_method": { "short_name": "update_snapshot", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#update_snapshot", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#update_snapshot", "async": false, "parameters": [ { @@ -1309,14 +1309,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::Snapshot", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "UpdateSnapshot", "full_name": "google.pubsub.v1.Subscriber.UpdateSnapshot", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1332,14 +1332,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_DeleteSnapshot_sync", - "title": "Snippet for the delete_snapshot call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#delete_snapshot.", - "file": "subscriber/delete_snapshot.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_DeleteSnapshot_sync", + "title": "Snippet for the delete_snapshot call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#delete_snapshot.", + "file": "subscription_admin/delete_snapshot.rb", "language": "RUBY", "client_method": { "short_name": "delete_snapshot", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#delete_snapshot", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#delete_snapshot", "async": false, "parameters": [ { @@ -1349,14 +1349,14 @@ ], "result_type": "::Google::Protobuf::Empty", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "DeleteSnapshot", "full_name": "google.pubsub.v1.Subscriber.DeleteSnapshot", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } @@ -1372,14 +1372,14 @@ ] }, { - "region_tag": "pubsub_v1_generated_Subscriber_Seek_sync", - "title": "Snippet for the seek call in the Subscriber service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::Subscriber::Client#seek.", - "file": "subscriber/seek.rb", + "region_tag": "pubsub_v1_generated_SubscriptionAdmin_Seek_sync", + "title": "Snippet for the seek call in the SubscriptionAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#seek.", + "file": "subscription_admin/seek.rb", "language": "RUBY", "client_method": { "short_name": "seek", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client#seek", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#seek", "async": false, "parameters": [ { @@ -1389,14 +1389,14 @@ ], "result_type": "::Google::Cloud::PubSub::V1::SeekResponse", "client": { - "short_name": "Subscriber::Client", - "full_name": "::Google::Cloud::PubSub::V1::Subscriber::Client" + "short_name": "SubscriptionAdmin::Client", + "full_name": "::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client" }, "method": { "short_name": "Seek", "full_name": "google.pubsub.v1.Subscriber.Seek", "service": { - "short_name": "Subscriber", + "short_name": "SubscriptionAdmin", "full_name": "google.pubsub.v1.Subscriber" } } diff --git a/google-cloud-pubsub-v1/snippets/subscriber/acknowledge.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/acknowledge.rb old mode 100755 new mode 100644 similarity index 80% rename from google-cloud-pubsub-v1/snippets/subscriber/acknowledge.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/acknowledge.rb index 8d167e2d6568..6e1322c559ab --- a/google-cloud-pubsub-v1/snippets/subscriber/acknowledge.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/acknowledge.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_Acknowledge_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_Acknowledge_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the acknowledge call in the Subscriber service +# Snippet for the acknowledge call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#acknowledge. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#acknowledge. # def acknowledge # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::AcknowledgeRequest.new @@ -44,4 +44,4 @@ def acknowledge # The returned object is of type Google::Protobuf::Empty. p result end -# [END pubsub_v1_generated_Subscriber_Acknowledge_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_Acknowledge_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/create_snapshot.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/create_snapshot.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/create_snapshot.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/create_snapshot.rb index 2de4e542146c..3a84c78ecd2e --- a/google-cloud-pubsub-v1/snippets/subscriber/create_snapshot.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/create_snapshot.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_CreateSnapshot_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_CreateSnapshot_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the create_snapshot call in the Subscriber service +# Snippet for the create_snapshot call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#create_snapshot. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#create_snapshot. # def create_snapshot # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::CreateSnapshotRequest.new @@ -44,4 +44,4 @@ def create_snapshot # The returned object is of type Google::Cloud::PubSub::V1::Snapshot. p result end -# [END pubsub_v1_generated_Subscriber_CreateSnapshot_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_CreateSnapshot_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/create_subscription.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/create_subscription.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/create_subscription.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/create_subscription.rb index 9b15845c2850..7fb0b1d1fda8 --- a/google-cloud-pubsub-v1/snippets/subscriber/create_subscription.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/create_subscription.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_CreateSubscription_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_CreateSubscription_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the create_subscription call in the Subscriber service +# Snippet for the create_subscription call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#create_subscription. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#create_subscription. # def create_subscription # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::Subscription.new @@ -44,4 +44,4 @@ def create_subscription # The returned object is of type Google::Cloud::PubSub::V1::Subscription. p result end -# [END pubsub_v1_generated_Subscriber_CreateSubscription_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_CreateSubscription_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/delete_snapshot.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/delete_snapshot.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/delete_snapshot.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/delete_snapshot.rb index e84c6e01a138..2afb40e06864 --- a/google-cloud-pubsub-v1/snippets/subscriber/delete_snapshot.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/delete_snapshot.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_DeleteSnapshot_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_DeleteSnapshot_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the delete_snapshot call in the Subscriber service +# Snippet for the delete_snapshot call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#delete_snapshot. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#delete_snapshot. # def delete_snapshot # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::DeleteSnapshotRequest.new @@ -44,4 +44,4 @@ def delete_snapshot # The returned object is of type Google::Protobuf::Empty. p result end -# [END pubsub_v1_generated_Subscriber_DeleteSnapshot_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_DeleteSnapshot_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/delete_subscription.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/delete_subscription.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/delete_subscription.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/delete_subscription.rb index 855f233d578e..6c9a8a3a811b --- a/google-cloud-pubsub-v1/snippets/subscriber/delete_subscription.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/delete_subscription.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_DeleteSubscription_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_DeleteSubscription_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the delete_subscription call in the Subscriber service +# Snippet for the delete_subscription call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#delete_subscription. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#delete_subscription. # def delete_subscription # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::DeleteSubscriptionRequest.new @@ -44,4 +44,4 @@ def delete_subscription # The returned object is of type Google::Protobuf::Empty. p result end -# [END pubsub_v1_generated_Subscriber_DeleteSubscription_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_DeleteSubscription_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/get_snapshot.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/get_snapshot.rb old mode 100755 new mode 100644 similarity index 80% rename from google-cloud-pubsub-v1/snippets/subscriber/get_snapshot.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/get_snapshot.rb index ab9894e547d0..ae5603df9690 --- a/google-cloud-pubsub-v1/snippets/subscriber/get_snapshot.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/get_snapshot.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_GetSnapshot_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_GetSnapshot_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the get_snapshot call in the Subscriber service +# Snippet for the get_snapshot call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#get_snapshot. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#get_snapshot. # def get_snapshot # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::GetSnapshotRequest.new @@ -44,4 +44,4 @@ def get_snapshot # The returned object is of type Google::Cloud::PubSub::V1::Snapshot. p result end -# [END pubsub_v1_generated_Subscriber_GetSnapshot_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_GetSnapshot_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/get_subscription.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/get_subscription.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/get_subscription.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/get_subscription.rb index afd1ec32b168..c268c810d43a --- a/google-cloud-pubsub-v1/snippets/subscriber/get_subscription.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/get_subscription.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_GetSubscription_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_GetSubscription_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the get_subscription call in the Subscriber service +# Snippet for the get_subscription call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#get_subscription. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#get_subscription. # def get_subscription # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::GetSubscriptionRequest.new @@ -44,4 +44,4 @@ def get_subscription # The returned object is of type Google::Cloud::PubSub::V1::Subscription. p result end -# [END pubsub_v1_generated_Subscriber_GetSubscription_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_GetSubscription_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/list_snapshots.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/list_snapshots.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/subscriber/list_snapshots.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/list_snapshots.rb index d1f98c0b769e..70f6318ad35c --- a/google-cloud-pubsub-v1/snippets/subscriber/list_snapshots.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/list_snapshots.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_ListSnapshots_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_ListSnapshots_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the list_snapshots call in the Subscriber service +# Snippet for the list_snapshots call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#list_snapshots. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#list_snapshots. # def list_snapshots # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::ListSnapshotsRequest.new @@ -48,4 +48,4 @@ def list_snapshots p item end end -# [END pubsub_v1_generated_Subscriber_ListSnapshots_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_ListSnapshots_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/list_subscriptions.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/list_subscriptions.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/subscriber/list_subscriptions.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/list_subscriptions.rb index 1dd7a05ecc1e..a6ace1062b52 --- a/google-cloud-pubsub-v1/snippets/subscriber/list_subscriptions.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/list_subscriptions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_ListSubscriptions_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_ListSubscriptions_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the list_subscriptions call in the Subscriber service +# Snippet for the list_subscriptions call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#list_subscriptions. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#list_subscriptions. # def list_subscriptions # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::ListSubscriptionsRequest.new @@ -48,4 +48,4 @@ def list_subscriptions p item end end -# [END pubsub_v1_generated_Subscriber_ListSubscriptions_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_ListSubscriptions_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/modify_ack_deadline.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/modify_ack_deadline.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/modify_ack_deadline.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/modify_ack_deadline.rb index 1da23e60dd71..ef4345c0a96e --- a/google-cloud-pubsub-v1/snippets/subscriber/modify_ack_deadline.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/modify_ack_deadline.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_ModifyAckDeadline_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_ModifyAckDeadline_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the modify_ack_deadline call in the Subscriber service +# Snippet for the modify_ack_deadline call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#modify_ack_deadline. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#modify_ack_deadline. # def modify_ack_deadline # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::ModifyAckDeadlineRequest.new @@ -44,4 +44,4 @@ def modify_ack_deadline # The returned object is of type Google::Protobuf::Empty. p result end -# [END pubsub_v1_generated_Subscriber_ModifyAckDeadline_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_ModifyAckDeadline_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/modify_push_config.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/modify_push_config.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/modify_push_config.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/modify_push_config.rb index 44ec71857d75..9a2f7c7a523b --- a/google-cloud-pubsub-v1/snippets/subscriber/modify_push_config.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/modify_push_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_ModifyPushConfig_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_ModifyPushConfig_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the modify_push_config call in the Subscriber service +# Snippet for the modify_push_config call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#modify_push_config. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#modify_push_config. # def modify_push_config # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::ModifyPushConfigRequest.new @@ -44,4 +44,4 @@ def modify_push_config # The returned object is of type Google::Protobuf::Empty. p result end -# [END pubsub_v1_generated_Subscriber_ModifyPushConfig_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_ModifyPushConfig_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/pull.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/pull.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/subscriber/pull.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/pull.rb index 867e86a37aaa..ff21f331df9c --- a/google-cloud-pubsub-v1/snippets/subscriber/pull.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/pull.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_Pull_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_Pull_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the pull call in the Subscriber service +# Snippet for the pull call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#pull. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#pull. # def pull # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::PullRequest.new @@ -44,4 +44,4 @@ def pull # The returned object is of type Google::Cloud::PubSub::V1::PullResponse. p result end -# [END pubsub_v1_generated_Subscriber_Pull_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_Pull_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/seek.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/seek.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/subscriber/seek.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/seek.rb index 8f35fd7109ac..0554d90782c1 --- a/google-cloud-pubsub-v1/snippets/subscriber/seek.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/seek.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_Seek_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_Seek_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the seek call in the Subscriber service +# Snippet for the seek call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#seek. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#seek. # def seek # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::SeekRequest.new @@ -44,4 +44,4 @@ def seek # The returned object is of type Google::Cloud::PubSub::V1::SeekResponse. p result end -# [END pubsub_v1_generated_Subscriber_Seek_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_Seek_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/streaming_pull.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/streaming_pull.rb old mode 100755 new mode 100644 similarity index 83% rename from google-cloud-pubsub-v1/snippets/subscriber/streaming_pull.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/streaming_pull.rb index d9611f47c183..4518b53a3f27 --- a/google-cloud-pubsub-v1/snippets/subscriber/streaming_pull.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/streaming_pull.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_StreamingPull_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_StreamingPull_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the streaming_pull call in the Subscriber service +# Snippet for the streaming_pull call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#streaming_pull. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#streaming_pull. # def streaming_pull # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create an input stream. input = Gapic::StreamInput.new @@ -53,4 +53,4 @@ def streaming_pull p current_response end end -# [END pubsub_v1_generated_Subscriber_StreamingPull_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_StreamingPull_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/update_snapshot.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/update_snapshot.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/update_snapshot.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/update_snapshot.rb index 174108a7592d..def7517e6163 --- a/google-cloud-pubsub-v1/snippets/subscriber/update_snapshot.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/update_snapshot.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_UpdateSnapshot_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_UpdateSnapshot_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the update_snapshot call in the Subscriber service +# Snippet for the update_snapshot call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#update_snapshot. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#update_snapshot. # def update_snapshot # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::UpdateSnapshotRequest.new @@ -44,4 +44,4 @@ def update_snapshot # The returned object is of type Google::Cloud::PubSub::V1::Snapshot. p result end -# [END pubsub_v1_generated_Subscriber_UpdateSnapshot_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_UpdateSnapshot_sync] diff --git a/google-cloud-pubsub-v1/snippets/subscriber/update_subscription.rb b/google-cloud-pubsub-v1/snippets/subscription_admin/update_subscription.rb old mode 100755 new mode 100644 similarity index 79% rename from google-cloud-pubsub-v1/snippets/subscriber/update_subscription.rb rename to google-cloud-pubsub-v1/snippets/subscription_admin/update_subscription.rb index f2e340190c9c..0d75562621ac --- a/google-cloud-pubsub-v1/snippets/subscriber/update_subscription.rb +++ b/google-cloud-pubsub-v1/snippets/subscription_admin/update_subscription.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Subscriber_UpdateSubscription_sync] +# [START pubsub_v1_generated_SubscriptionAdmin_UpdateSubscription_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the update_subscription call in the Subscriber service +# Snippet for the update_subscription call in the SubscriptionAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Subscriber::Client#update_subscription. +# Google::Cloud::PubSub::V1::SubscriptionAdmin::Client#update_subscription. # def update_subscription # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Subscriber::Client.new + client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::UpdateSubscriptionRequest.new @@ -44,4 +44,4 @@ def update_subscription # The returned object is of type Google::Cloud::PubSub::V1::Subscription. p result end -# [END pubsub_v1_generated_Subscriber_UpdateSubscription_sync] +# [END pubsub_v1_generated_SubscriptionAdmin_UpdateSubscription_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/create_topic.rb b/google-cloud-pubsub-v1/snippets/topic_admin/create_topic.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/publisher/create_topic.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/create_topic.rb index 43231e747d7b..62632bcc433d --- a/google-cloud-pubsub-v1/snippets/publisher/create_topic.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/create_topic.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_CreateTopic_sync] +# [START pubsub_v1_generated_TopicAdmin_CreateTopic_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the create_topic call in the Publisher service +# Snippet for the create_topic call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#create_topic. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#create_topic. # def create_topic # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::Topic.new @@ -44,4 +44,4 @@ def create_topic # The returned object is of type Google::Cloud::PubSub::V1::Topic. p result end -# [END pubsub_v1_generated_Publisher_CreateTopic_sync] +# [END pubsub_v1_generated_TopicAdmin_CreateTopic_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/delete_topic.rb b/google-cloud-pubsub-v1/snippets/topic_admin/delete_topic.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/publisher/delete_topic.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/delete_topic.rb index de78a45ddabf..822160cc3f98 --- a/google-cloud-pubsub-v1/snippets/publisher/delete_topic.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/delete_topic.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_DeleteTopic_sync] +# [START pubsub_v1_generated_TopicAdmin_DeleteTopic_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the delete_topic call in the Publisher service +# Snippet for the delete_topic call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#delete_topic. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#delete_topic. # def delete_topic # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::DeleteTopicRequest.new @@ -44,4 +44,4 @@ def delete_topic # The returned object is of type Google::Protobuf::Empty. p result end -# [END pubsub_v1_generated_Publisher_DeleteTopic_sync] +# [END pubsub_v1_generated_TopicAdmin_DeleteTopic_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/detach_subscription.rb b/google-cloud-pubsub-v1/snippets/topic_admin/detach_subscription.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/publisher/detach_subscription.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/detach_subscription.rb index 9e2c80bc9088..fd8fc2ccdebc --- a/google-cloud-pubsub-v1/snippets/publisher/detach_subscription.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/detach_subscription.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_DetachSubscription_sync] +# [START pubsub_v1_generated_TopicAdmin_DetachSubscription_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the detach_subscription call in the Publisher service +# Snippet for the detach_subscription call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#detach_subscription. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#detach_subscription. # def detach_subscription # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::DetachSubscriptionRequest.new @@ -44,4 +44,4 @@ def detach_subscription # The returned object is of type Google::Cloud::PubSub::V1::DetachSubscriptionResponse. p result end -# [END pubsub_v1_generated_Publisher_DetachSubscription_sync] +# [END pubsub_v1_generated_TopicAdmin_DetachSubscription_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/get_topic.rb b/google-cloud-pubsub-v1/snippets/topic_admin/get_topic.rb old mode 100755 new mode 100644 similarity index 82% rename from google-cloud-pubsub-v1/snippets/publisher/get_topic.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/get_topic.rb index 085c626e5f7b..49322cf4821c --- a/google-cloud-pubsub-v1/snippets/publisher/get_topic.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/get_topic.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_GetTopic_sync] +# [START pubsub_v1_generated_TopicAdmin_GetTopic_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the get_topic call in the Publisher service +# Snippet for the get_topic call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#get_topic. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#get_topic. # def get_topic # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::GetTopicRequest.new @@ -44,4 +44,4 @@ def get_topic # The returned object is of type Google::Cloud::PubSub::V1::Topic. p result end -# [END pubsub_v1_generated_Publisher_GetTopic_sync] +# [END pubsub_v1_generated_TopicAdmin_GetTopic_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/list_topic_snapshots.rb b/google-cloud-pubsub-v1/snippets/topic_admin/list_topic_snapshots.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/publisher/list_topic_snapshots.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/list_topic_snapshots.rb index 080a6fe486cf..fbdc033d4b5a --- a/google-cloud-pubsub-v1/snippets/publisher/list_topic_snapshots.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/list_topic_snapshots.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_ListTopicSnapshots_sync] +# [START pubsub_v1_generated_TopicAdmin_ListTopicSnapshots_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the list_topic_snapshots call in the Publisher service +# Snippet for the list_topic_snapshots call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#list_topic_snapshots. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topic_snapshots. # def list_topic_snapshots # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::ListTopicSnapshotsRequest.new @@ -44,4 +44,4 @@ def list_topic_snapshots # The returned object is of type Google::Cloud::PubSub::V1::ListTopicSnapshotsResponse. p result end -# [END pubsub_v1_generated_Publisher_ListTopicSnapshots_sync] +# [END pubsub_v1_generated_TopicAdmin_ListTopicSnapshots_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/list_topic_subscriptions.rb b/google-cloud-pubsub-v1/snippets/topic_admin/list_topic_subscriptions.rb old mode 100755 new mode 100644 similarity index 80% rename from google-cloud-pubsub-v1/snippets/publisher/list_topic_subscriptions.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/list_topic_subscriptions.rb index 854f5393a2b3..2d957af85626 --- a/google-cloud-pubsub-v1/snippets/publisher/list_topic_subscriptions.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/list_topic_subscriptions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_ListTopicSubscriptions_sync] +# [START pubsub_v1_generated_TopicAdmin_ListTopicSubscriptions_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the list_topic_subscriptions call in the Publisher service +# Snippet for the list_topic_subscriptions call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#list_topic_subscriptions. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topic_subscriptions. # def list_topic_subscriptions # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::ListTopicSubscriptionsRequest.new @@ -44,4 +44,4 @@ def list_topic_subscriptions # The returned object is of type Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse. p result end -# [END pubsub_v1_generated_Publisher_ListTopicSubscriptions_sync] +# [END pubsub_v1_generated_TopicAdmin_ListTopicSubscriptions_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/list_topics.rb b/google-cloud-pubsub-v1/snippets/topic_admin/list_topics.rb old mode 100755 new mode 100644 similarity index 83% rename from google-cloud-pubsub-v1/snippets/publisher/list_topics.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/list_topics.rb index 37adc4ec3541..0d199fbf9781 --- a/google-cloud-pubsub-v1/snippets/publisher/list_topics.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/list_topics.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_ListTopics_sync] +# [START pubsub_v1_generated_TopicAdmin_ListTopics_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the list_topics call in the Publisher service +# Snippet for the list_topics call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#list_topics. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#list_topics. # def list_topics # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::ListTopicsRequest.new @@ -48,4 +48,4 @@ def list_topics p item end end -# [END pubsub_v1_generated_Publisher_ListTopics_sync] +# [END pubsub_v1_generated_TopicAdmin_ListTopics_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/publish.rb b/google-cloud-pubsub-v1/snippets/topic_admin/publish.rb old mode 100755 new mode 100644 similarity index 82% rename from google-cloud-pubsub-v1/snippets/publisher/publish.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/publish.rb index d9ffd99b37c9..668af75cab50 --- a/google-cloud-pubsub-v1/snippets/publisher/publish.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/publish.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_Publish_sync] +# [START pubsub_v1_generated_TopicAdmin_Publish_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the publish call in the Publisher service +# Snippet for the publish call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#publish. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#publish. # def publish # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::PublishRequest.new @@ -44,4 +44,4 @@ def publish # The returned object is of type Google::Cloud::PubSub::V1::PublishResponse. p result end -# [END pubsub_v1_generated_Publisher_Publish_sync] +# [END pubsub_v1_generated_TopicAdmin_Publish_sync] diff --git a/google-cloud-pubsub-v1/snippets/publisher/update_topic.rb b/google-cloud-pubsub-v1/snippets/topic_admin/update_topic.rb old mode 100755 new mode 100644 similarity index 81% rename from google-cloud-pubsub-v1/snippets/publisher/update_topic.rb rename to google-cloud-pubsub-v1/snippets/topic_admin/update_topic.rb index 257bfabdf81d..26a8066e59ae --- a/google-cloud-pubsub-v1/snippets/publisher/update_topic.rb +++ b/google-cloud-pubsub-v1/snippets/topic_admin/update_topic.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START pubsub_v1_generated_Publisher_UpdateTopic_sync] +# [START pubsub_v1_generated_TopicAdmin_UpdateTopic_sync] require "google/cloud/pubsub/v1" ## -# Snippet for the update_topic call in the Publisher service +# Snippet for the update_topic call in the TopicAdmin service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,11 +29,11 @@ # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of -# Google::Cloud::PubSub::V1::Publisher::Client#update_topic. +# Google::Cloud::PubSub::V1::TopicAdmin::Client#update_topic. # def update_topic # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::PubSub::V1::Publisher::Client.new + client = Google::Cloud::PubSub::V1::TopicAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PubSub::V1::UpdateTopicRequest.new @@ -44,4 +44,4 @@ def update_topic # The returned object is of type Google::Cloud::PubSub::V1::Topic. p result end -# [END pubsub_v1_generated_Publisher_UpdateTopic_sync] +# [END pubsub_v1_generated_TopicAdmin_UpdateTopic_sync] diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher/helpers_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin/helpers_test.rb similarity index 87% rename from google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher/helpers_test.rb rename to google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin/helpers_test.rb index eec9b4048c60..4b687b76d94e 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher/helpers_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin/helpers_test.rb @@ -20,9 +20,9 @@ require "gapic/grpc/service_stub" -require "google/cloud/pubsub/v1/publisher" +require "google/cloud/pubsub/v1/subscription_admin" -class ::Google::Cloud::PubSub::V1::Publisher::HelpersTest < Minitest::Test +class ::Google::Cloud::PubSub::V1::SubscriptionAdmin::HelpersTest < Minitest::Test class DummyStub def endpoint "endpoint.example.com" @@ -44,7 +44,7 @@ def logger def test_config_channel_args ::Gapic::ServiceStub.stub :new, DummyStub.new do ::Google::Auth::Credentials.stub :default, :my_creds do - ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| channel_args = config.channel_args assert channel_args assert_equal -1, channel_args["grpc.max_send_message_length"] diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber_paths_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_paths_test.rb similarity index 82% rename from google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber_paths_test.rb rename to google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_paths_test.rb index dc139e321d2f..9513e75a7f57 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber_paths_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,9 +20,9 @@ require "gapic/grpc/service_stub" -require "google/cloud/pubsub/v1/subscriber" +require "google/cloud/pubsub/v1/subscription_admin" -class ::Google::Cloud::PubSub::V1::Subscriber::ClientPathsTest < Minitest::Test +class ::Google::Cloud::PubSub::V1::SubscriptionAdmin::ClientPathsTest < Minitest::Test class DummyStub def endpoint "endpoint.example.com" @@ -44,7 +44,7 @@ def logger def test_project_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -56,7 +56,7 @@ def test_project_path def test_snapshot_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -68,7 +68,7 @@ def test_snapshot_path def test_subscription_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -80,7 +80,7 @@ def test_subscription_path def test_topic_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_test.rb similarity index 96% rename from google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber_test.rb rename to google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_test.rb index aedb66a89b5c..72f7af5acd61 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ require "gapic/grpc/service_stub" require "google/pubsub/v1/pubsub_pb" -require "google/pubsub/v1/pubsub_services_pb" -require "google/cloud/pubsub/v1/subscriber" -class ::Google::Cloud::PubSub::V1::Subscriber::ClientTest < Minitest::Test +require "google/cloud/pubsub/v1/subscription_admin" + +class ::Google::Cloud::PubSub::V1::SubscriptionAdmin::ClientTest < Minitest::Test class ClientStub attr_accessor :call_rpc_count, :requests @@ -121,7 +121,7 @@ def test_create_subscription Gapic::ServiceStub.stub :new, create_subscription_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -179,7 +179,7 @@ def test_get_subscription Gapic::ServiceStub.stub :new, get_subscription_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -239,7 +239,7 @@ def test_update_subscription Gapic::ServiceStub.stub :new, update_subscription_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -301,7 +301,7 @@ def test_list_subscriptions Gapic::ServiceStub.stub :new, list_subscriptions_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -364,7 +364,7 @@ def test_delete_subscription Gapic::ServiceStub.stub :new, delete_subscription_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -426,7 +426,7 @@ def test_modify_ack_deadline Gapic::ServiceStub.stub :new, modify_ack_deadline_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -486,7 +486,7 @@ def test_acknowledge Gapic::ServiceStub.stub :new, acknowledge_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -548,7 +548,7 @@ def test_pull Gapic::ServiceStub.stub :new, pull_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -613,7 +613,7 @@ def test_streaming_pull Gapic::ServiceStub.stub :new, streaming_pull_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -710,7 +710,7 @@ def test_modify_push_config Gapic::ServiceStub.stub :new, modify_push_config_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -768,7 +768,7 @@ def test_get_snapshot Gapic::ServiceStub.stub :new, get_snapshot_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -830,7 +830,7 @@ def test_list_snapshots Gapic::ServiceStub.stub :new, list_snapshots_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -897,7 +897,7 @@ def test_create_snapshot Gapic::ServiceStub.stub :new, create_snapshot_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -957,7 +957,7 @@ def test_update_snapshot Gapic::ServiceStub.stub :new, update_snapshot_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -1015,7 +1015,7 @@ def test_delete_snapshot Gapic::ServiceStub.stub :new, delete_snapshot_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -1076,7 +1076,7 @@ def test_seek Gapic::ServiceStub.stub :new, seek_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -1121,7 +1121,7 @@ def test_configure client = block_config = config = nil dummy_stub = ClientStub.new nil, nil Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = grpc_channel end end @@ -1131,6 +1131,6 @@ def test_configure end assert_same block_config, config - assert_kind_of ::Google::Cloud::PubSub::V1::Subscriber::Client::Configuration, config + assert_kind_of ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration, config end end diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber/helpers_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin/helpers_test.rb similarity index 90% rename from google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber/helpers_test.rb rename to google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin/helpers_test.rb index 3b7007164dde..aa6378ede756 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscriber/helpers_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin/helpers_test.rb @@ -20,9 +20,9 @@ require "gapic/grpc/service_stub" -require "google/cloud/pubsub/v1/subscriber" +require "google/cloud/pubsub/v1/topic_admin" -class ::Google::Cloud::PubSub::V1::Subscriber::HelpersTest < Minitest::Test +class ::Google::Cloud::PubSub::V1::TopicAdmin::HelpersTest < Minitest::Test class DummyStub def endpoint "endpoint.example.com" @@ -44,7 +44,7 @@ def logger def test_config_channel_args ::Gapic::ServiceStub.stub :new, DummyStub.new do ::Google::Auth::Credentials.stub :default, :my_creds do - ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| channel_args = config.channel_args assert channel_args assert_equal -1, channel_args["grpc.max_send_message_length"] diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher_paths_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_paths_test.rb similarity index 83% rename from google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher_paths_test.rb rename to google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_paths_test.rb index 2fad65276316..479ce2abe970 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher_paths_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,9 +20,9 @@ require "gapic/grpc/service_stub" -require "google/cloud/pubsub/v1/publisher" +require "google/cloud/pubsub/v1/topic_admin" -class ::Google::Cloud::PubSub::V1::Publisher::ClientPathsTest < Minitest::Test +class ::Google::Cloud::PubSub::V1::TopicAdmin::ClientPathsTest < Minitest::Test class DummyStub def endpoint "endpoint.example.com" @@ -44,7 +44,7 @@ def logger def test_project_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -56,7 +56,7 @@ def test_project_path def test_schema_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -68,7 +68,7 @@ def test_schema_path def test_subscription_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -80,7 +80,7 @@ def test_subscription_path def test_topic_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_test.rb similarity index 95% rename from google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher_test.rb rename to google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_test.rb index f36c31aeca56..f7531255eb88 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/publisher_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ require "gapic/grpc/service_stub" require "google/pubsub/v1/pubsub_pb" -require "google/pubsub/v1/pubsub_services_pb" -require "google/cloud/pubsub/v1/publisher" -class ::Google::Cloud::PubSub::V1::Publisher::ClientTest < Minitest::Test +require "google/cloud/pubsub/v1/topic_admin" + +class ::Google::Cloud::PubSub::V1::TopicAdmin::ClientTest < Minitest::Test class ClientStub attr_accessor :call_rpc_count, :requests @@ -101,7 +101,7 @@ def test_create_topic Gapic::ServiceStub.stub :new, create_topic_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -161,7 +161,7 @@ def test_update_topic Gapic::ServiceStub.stub :new, update_topic_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -221,7 +221,7 @@ def test_publish Gapic::ServiceStub.stub :new, publish_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -279,7 +279,7 @@ def test_get_topic Gapic::ServiceStub.stub :new, get_topic_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -341,7 +341,7 @@ def test_list_topics Gapic::ServiceStub.stub :new, list_topics_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -408,7 +408,7 @@ def test_list_topic_subscriptions Gapic::ServiceStub.stub :new, list_topic_subscriptions_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -470,7 +470,7 @@ def test_list_topic_snapshots Gapic::ServiceStub.stub :new, list_topic_snapshots_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -528,7 +528,7 @@ def test_delete_topic Gapic::ServiceStub.stub :new, delete_topic_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -586,7 +586,7 @@ def test_detach_subscription Gapic::ServiceStub.stub :new, detach_subscription_client_stub do # Create client - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end @@ -631,7 +631,7 @@ def test_configure client = block_config = config = nil dummy_stub = ClientStub.new nil, nil Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + client = ::Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = grpc_channel end end @@ -641,6 +641,6 @@ def test_configure end assert_same block_config, config - assert_kind_of ::Google::Cloud::PubSub::V1::Publisher::Client::Configuration, config + assert_kind_of ::Google::Cloud::PubSub::V1::TopicAdmin::Client::Configuration, config end end From e9b8ca65e84af64cd846a6c1aa15e95bc406f832 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:34:53 -0700 Subject: [PATCH 159/457] chore(main): release google-cloud-parameter_manager-v1 0.4.0 (#30562) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-parameter_manager-v1 0.4.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-parameter_manager-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/parameter_manager/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.parametermanager.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 769e2483c856..6c38e73e0c79 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -573,7 +573,7 @@ "google-cloud-parallelstore-v1beta+FILLER": "0.0.0", "google-cloud-parameter_manager": "0.1.2", "google-cloud-parameter_manager+FILLER": "0.0.0", - "google-cloud-parameter_manager-v1": "0.3.0", + "google-cloud-parameter_manager-v1": "0.4.0", "google-cloud-parameter_manager-v1+FILLER": "0.0.0", "google-cloud-phishing_protection": "0.16.2", "google-cloud-phishing_protection+FILLER": "0.0.0", diff --git a/google-cloud-parameter_manager-v1/CHANGELOG.md b/google-cloud-parameter_manager-v1/CHANGELOG.md index 9580ca6e6acb..becb634e3c7e 100644 --- a/google-cloud-parameter_manager-v1/CHANGELOG.md +++ b/google-cloud-parameter_manager-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.4.0 (2025-06-24) + +#### Features + +* Provide a path helper for crypto key resources ([#30533](https://github.com/googleapis/google-cloud-ruby/issues/30533)) + ### 0.3.0 (2025-05-12) #### Features diff --git a/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/version.rb b/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/version.rb index 81821ad30b7c..c6074cc3e52b 100644 --- a/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/version.rb +++ b/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module ParameterManager module V1 - VERSION = "0.3.0" + VERSION = "0.4.0" end end end diff --git a/google-cloud-parameter_manager-v1/snippets/snippet_metadata_google.cloud.parametermanager.v1.json b/google-cloud-parameter_manager-v1/snippets/snippet_metadata_google.cloud.parametermanager.v1.json index 2ad9476fd7da..14ab2ff3eef5 100644 --- a/google-cloud-parameter_manager-v1/snippets/snippet_metadata_google.cloud.parametermanager.v1.json +++ b/google-cloud-parameter_manager-v1/snippets/snippet_metadata_google.cloud.parametermanager.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-parameter_manager-v1", - "version": "0.3.0", + "version": "0.4.0", "language": "RUBY", "apis": [ { From d8d25e5a41e08a63f1300afda25d4ffd3f0df8b3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:35:10 -0700 Subject: [PATCH 160/457] chore(main): release google-cloud-network_services-v1 2.3.0 (#30566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-network_services-v1 2.3.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-network_services-v1/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/network_services/v1/version.rb | 2 +- ...snippet_metadata_google.cloud.networkservices.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6c38e73e0c79..e1327812c1fc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -527,7 +527,7 @@ "google-cloud-network_security-v1beta1+FILLER": "0.0.0", "google-cloud-network_services": "2.0.1", "google-cloud-network_services+FILLER": "0.0.0", - "google-cloud-network_services-v1": "2.2.0", + "google-cloud-network_services-v1": "2.3.0", "google-cloud-network_services-v1+FILLER": "0.0.0", "google-cloud-notebooks": "3.0.1", "google-cloud-notebooks+FILLER": "0.0.0", diff --git a/google-cloud-network_services-v1/CHANGELOG.md b/google-cloud-network_services-v1/CHANGELOG.md index d053e689ee2b..4073760aa9ae 100644 --- a/google-cloud-network_services-v1/CHANGELOG.md +++ b/google-cloud-network_services-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 2.3.0 (2025-06-24) + +#### Features + +* Support for extension metadata +* Support for RPCs for managing AuthzExtensions +* Support for RPCs for managing WasmPlugins +* Support for RPCs for managing WasmPluginVersions + ### 2.2.0 (2025-06-16) #### Features diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb index a37508284f03..017a2f1b7ea7 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module NetworkServices module V1 - VERSION = "2.2.0" + VERSION = "2.3.0" end end end diff --git a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json index 09f8f0c740f3..71891c5e0a32 100644 --- a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-network_services-v1", - "version": "2.2.0", + "version": "2.3.0", "language": "RUBY", "apis": [ { From dce4f3e561525b841d433b8c35e690a31f51e1e5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:35:28 -0700 Subject: [PATCH 161/457] chore(main): release google-shopping-merchant-issue_resolution-v1beta 0.2.0 (#30567) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-issue_resolution-v1beta 0.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../CHANGELOG.md | 6 ++++++ .../shopping/merchant/issue_resolution/v1beta/version.rb | 2 +- ...ata_google.shopping.merchant.issueresolution.v1beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e1327812c1fc..cfa6bb158334 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -919,7 +919,7 @@ "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution": "0.1.0", "google-shopping-merchant-issue_resolution+FILLER": "0.0.0", - "google-shopping-merchant-issue_resolution-v1beta": "0.1.0", + "google-shopping-merchant-issue_resolution-v1beta": "0.2.0", "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", "google-shopping-merchant-lfp": "0.3.1", "google-shopping-merchant-lfp+FILLER": "0.0.0", diff --git a/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md b/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md index 9123b34fa919..152be271b84d 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md +++ b/google-shopping-merchant-issue_resolution-v1beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.2.0 (2025-06-24) + +#### Features + +* Support for the list_aggregate_product_statuses RPC ([#30501](https://github.com/googleapis/google-cloud-ruby/issues/30501)) + ### 0.1.0 (2025-05-27) #### Features diff --git a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb index 8d3b4ff9213e..23ea74ed7dd5 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb +++ b/google-shopping-merchant-issue_resolution-v1beta/lib/google/shopping/merchant/issue_resolution/v1beta/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module IssueResolution module V1beta - VERSION = "0.1.0" + VERSION = "0.2.0" end end end diff --git a/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json b/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json index 69b3e4a2dca2..f6d6387d4216 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json +++ b/google-shopping-merchant-issue_resolution-v1beta/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-issue_resolution-v1beta", - "version": "0.1.0", + "version": "0.2.0", "language": "RUBY", "apis": [ { From 9a17543d59bcf9bdc6c030cd0d79433d1637205f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:36:21 -0700 Subject: [PATCH 162/457] feat(merchant-issue_resolution): Support for AggregateProductStatusesService (#30500) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add AggregateProductStatuses PiperOrigin-RevId: 767093664 Source-Link: https://github.com/googleapis/googleapis/commit/d4b3a8f0a9080724a2fe0866effc8478ce3efec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6c82f28985ad6f6fb2b13d5c4d7f655868d1c9f8 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWlzc3VlX3Jlc29sdXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjZjODJmMjg5ODVhZDZmNmZiMmIxM2Q1YzRkN2Y2NTU4NjhkMWM5ZjgifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../AUTHENTICATION.md | 6 +- .../Rakefile | 4 +- .../shopping/merchant/issue_resolution.rb | 70 +++++++++++++++++++ .../merchant/issue_resolution/client_test.rb | 21 ++++++ 4 files changed, 96 insertions(+), 5 deletions(-) diff --git a/google-shopping-merchant-issue_resolution/AUTHENTICATION.md b/google-shopping-merchant-issue_resolution/AUTHENTICATION.md index df96eec6c32e..3a67b9f7fa99 100644 --- a/google-shopping-merchant-issue_resolution/AUTHENTICATION.md +++ b/google-shopping-merchant-issue_resolution/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/shopping/merchant/issue_resolution" -client = Google::Shopping::Merchant::IssueResolution.issue_resolution_service do |config| +client = Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -70,7 +70,7 @@ Google::Shopping::Merchant::IssueResolution.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = Google::Shopping::Merchant::IssueResolution.issue_resolution_service +client = Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/shopping/merchant/issue_resolution" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = Google::Shopping::Merchant::IssueResolution.issue_resolution_service +client = Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service ``` ### Local ADC file diff --git a/google-shopping-merchant-issue_resolution/Rakefile b/google-shopping-merchant-issue_resolution/Rakefile index 4191a5a1cfb1..5e94a70b57f2 100644 --- a/google-shopping-merchant-issue_resolution/Rakefile +++ b/google-shopping-merchant-issue_resolution/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/shopping/merchant/issue_resolution/v1beta/issue_resolution_service/credentials" - ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::Credentials.env_vars.each do |path| + require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service/credentials" + ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution.rb b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution.rb index cad3c31c7d64..ad21e4b25163 100644 --- a/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution.rb +++ b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution.rb @@ -28,6 +28,76 @@ module Google module Shopping module Merchant module IssueResolution + ## + # Create a new client object for AggregateProductStatusesService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1beta/Google/Shopping/Merchant/IssueResolution/V1beta/AggregateProductStatusesService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AggregateProductStatusesService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the AggregateProductStatusesService service. + # You can determine whether the method will succeed by calling + # {Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service_available?}. + # + # ## About AggregateProductStatusesService + # + # Service to manage aggregate product statuses. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.aggregate_product_statuses_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/issue_resolution/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::IssueResolution + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::IssueResolution.const_get(package_name).const_get(:AggregateProductStatusesService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the AggregateProductStatusesService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the AggregateProductStatusesService service, + # or if the versioned client gem needs an update to support the AggregateProductStatusesService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.aggregate_product_statuses_service_available? version: :v1beta, transport: :grpc + require "google/shopping/merchant/issue_resolution/#{version.to_s.downcase}" + package_name = Google::Shopping::Merchant::IssueResolution + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Shopping::Merchant::IssueResolution.const_get package_name + return false unless service_module.const_defined? :AggregateProductStatusesService + service_module = service_module.const_get :AggregateProductStatusesService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for IssueResolutionService. # diff --git a/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/client_test.rb b/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/client_test.rb index 98a56fcbb1d7..5ce178ad138a 100644 --- a/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/client_test.rb +++ b/google-shopping-merchant-issue_resolution/test/google/shopping/merchant/issue_resolution/client_test.rb @@ -41,6 +41,27 @@ def logger end end + def test_aggregate_product_statuses_service_grpc + skip unless Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Client, client + end + end + + def test_aggregate_product_statuses_service_rest + skip unless Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::IssueResolution.aggregate_product_statuses_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::Rest::Client, client + end + end + def test_issue_resolution_service_grpc skip unless Google::Shopping::Merchant::IssueResolution.issue_resolution_service_available? transport: :grpc Gapic::ServiceStub.stub :new, DummyStub.new do From 8a1f0c8616d23c2870fcaf43c994fd5d6b8e9f5a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:36:41 -0700 Subject: [PATCH 163/457] chore(main): release google-cloud-storage_transfer-v1 1.6.0 (#30528) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-storage_transfer-v1 1.6.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-storage_transfer-v1/CHANGELOG.md | 14 ++++++++++++++ .../google/cloud/storage_transfer/v1/version.rb | 2 +- ...snippet_metadata_google.storagetransfer.v1.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cfa6bb158334..436bc75c2c68 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -745,7 +745,7 @@ "google-cloud-storage_insights-v1+FILLER": "0.0.0", "google-cloud-storage_transfer": "1.5.1", "google-cloud-storage_transfer+FILLER": "0.0.0", - "google-cloud-storage_transfer-v1": "1.5.0", + "google-cloud-storage_transfer-v1": "1.6.0", "google-cloud-storage_transfer-v1+FILLER": "0.0.0", "google-cloud-support": "1.1.2", "google-cloud-support+FILLER": "0.0.0", diff --git a/google-cloud-storage_transfer-v1/CHANGELOG.md b/google-cloud-storage_transfer-v1/CHANGELOG.md index 84ffca82095f..2fa69e1f6130 100644 --- a/google-cloud-storage_transfer-v1/CHANGELOG.md +++ b/google-cloud-storage_transfer-v1/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +### 1.6.0 (2025-06-24) + +#### Features + +* support Azure federated identity ([#30478](https://github.com/googleapis/google-cloud-ruby/issues/30478)) +* support BYOSA +#### Documentation + +* A comment for enum value `COPY` in enum `LoggableAction` is changed +* A comment for field `end_time_of_day` in message `.google.storagetransfer.v1.Schedule` is changed +* A comment for field `list_url` in message `.google.storagetransfer.v1.HttpData` is changed +* A comment for field `overwrite_objects_already_existing_in_sink` in message `.google.storagetransfer.v1.TransferOptions` is changed +* A comment for message `ObjectConditions` is changed + ### 1.5.0 (2025-05-12) #### Features diff --git a/google-cloud-storage_transfer-v1/lib/google/cloud/storage_transfer/v1/version.rb b/google-cloud-storage_transfer-v1/lib/google/cloud/storage_transfer/v1/version.rb index 3bd7020ffe3b..f9f585d32b89 100644 --- a/google-cloud-storage_transfer-v1/lib/google/cloud/storage_transfer/v1/version.rb +++ b/google-cloud-storage_transfer-v1/lib/google/cloud/storage_transfer/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module StorageTransfer module V1 - VERSION = "1.5.0" + VERSION = "1.6.0" end end end diff --git a/google-cloud-storage_transfer-v1/snippets/snippet_metadata_google.storagetransfer.v1.json b/google-cloud-storage_transfer-v1/snippets/snippet_metadata_google.storagetransfer.v1.json index 735eb4caf582..2169a412dfe9 100644 --- a/google-cloud-storage_transfer-v1/snippets/snippet_metadata_google.storagetransfer.v1.json +++ b/google-cloud-storage_transfer-v1/snippets/snippet_metadata_google.storagetransfer.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-storage_transfer-v1", - "version": "1.5.0", + "version": "1.6.0", "language": "RUBY", "apis": [ { From 538aa382b9e471d50270ce90bd618d86958dec24 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 08:37:48 -0700 Subject: [PATCH 164/457] chore(pubsub): Update owlbot manifest (#30569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Introduce new services names for PubSub PiperOrigin-RevId: 775409281 Source-Link: https://github.com/googleapis/googleapis/commit/8a883235bc76e941ef745a5b5465878dadc9c440 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2999cb635d69c99e0deb2cbef973daf7330badb9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXB1YnN1Yi12MS8uT3dsQm90LnlhbWwiLCJoIjoiMjk5OWNiNjM1ZDY5Yzk5ZTBkZWIyY2JlZjk3M2RhZjczMzBiYWRiOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- google-cloud-pubsub-v1/.owlbot-manifest.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/google-cloud-pubsub-v1/.owlbot-manifest.json b/google-cloud-pubsub-v1/.owlbot-manifest.json index ca67fd97c6ba..e7cf854fb5f9 100644 --- a/google-cloud-pubsub-v1/.owlbot-manifest.json +++ b/google-cloud-pubsub-v1/.owlbot-manifest.json @@ -96,7 +96,9 @@ "lib/google/cloud/pubsub/v1/iam_policy.rb", "lib/google/cloud/pubsub/v1/iam_policy/client.rb", "lib/google/cloud/pubsub/v1/iam_policy/credentials.rb", + "lib/google/cloud/pubsub/v1/publisher.rb", "lib/google/cloud/pubsub/v1/publisher/credentials.rb", + "lib/google/cloud/pubsub/v1/subscriber.rb", "lib/google/cloud/pubsub/v1/subscriber/credentials.rb", "lib/google/cloud/pubsub/v1/subscription_admin/helpers.rb", "lib/google/cloud/pubsub/v1/topic_admin/helpers.rb", From e73e26730b3d1d61c40efad1f29b078d8d016fe1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 14:25:02 -0700 Subject: [PATCH 165/457] feat(retail-v2): Support user attributes for personalizing search results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(retail-v2): Support model quality scores in search results PiperOrigin-RevId: 775377248 Source-Link: https://github.com/googleapis/googleapis/commit/d2835e84647d7477511f7ae48e36d4cfe7b04a10 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e2be1360a4ca8dd17d1a24e39a4e95abfef52b46 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJldGFpbC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiZTJiZTEzNjBhNGNhOGRkMTdkMWEyNGUzOWE0ZTk1YWJmZWY1MmI0NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../cloud/retail/v2/catalog_service/client.rb | 70 +++++++++---------- .../retail/v2/catalog_service/rest/client.rb | 70 +++++++++---------- .../retail/v2/catalog_service_services_pb.rb | 60 ++++++++-------- .../lib/google/cloud/retail/v2/common_pb.rb | 4 +- .../cloud/retail/v2/search_service/client.rb | 23 +++++- .../retail/v2/search_service/rest/client.rb | 23 +++++- .../cloud/retail/v2/search_service_pb.rb | 2 +- .../google/cloud/retail/v2/common.rb | 18 +++++ .../google/cloud/retail/v2/search_service.rb | 46 +++++++++++- .../google/cloud/retail/v2/user_event.rb | 2 +- .../retail/v2/search_service_rest_test.rb | 11 +-- .../cloud/retail/v2/search_service_test.rb | 12 ++-- 12 files changed, 225 insertions(+), 116 deletions(-) diff --git a/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service/client.rb b/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service/client.rb index 69f776a38fb3..17793f8e2a9e 100644 --- a/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service/client.rb +++ b/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service/client.rb @@ -418,39 +418,39 @@ def update_catalog request, options = nil ## # Set a specified branch id as default branch. API methods such as - # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}, - # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}, - # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts} - # will treat requests using "default_branch" to the actual branch id set as - # default. - # - # For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as - # default, setting - # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to - # `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent - # to setting - # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to - # `projects/*/locations/*/catalogs/*/branches/1`. - # - # Using multiple branches can be useful when developers would like - # to have a staging branch to test and verify for future usage. When it - # becomes ready, developers switch on the staging branch using this API - # while keeping using - # `projects/*/locations/*/catalogs/*/branches/default_branch` as - # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to - # route the traffic to this staging branch. - # - # CAUTION: If you have live predict/search traffic, switching the default - # branch could potentially cause outages if the ID space of the new branch - # is very different from the old one. - # - # More specifically: - # - # * PredictionService will only return product IDs from branch \\{newBranch}. - # * SearchService will only return product IDs from branch \\{newBranch} - # (if branch is not explicitly set). - # * UserEventService will only join events with products from branch - # \\{newBranch}. + # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}, + # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}, + # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts} + # will treat requests using "default_branch" to the actual branch id set as + # default. + # + # For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as + # default, setting + # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to + # `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent + # to setting + # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to + # `projects/*/locations/*/catalogs/*/branches/1`. + # + # Using multiple branches can be useful when developers would like + # to have a staging branch to test and verify for future usage. When it + # becomes ready, developers switch on the staging branch using this API + # while keeping using + # `projects/*/locations/*/catalogs/*/branches/default_branch` as + # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to + # route the traffic to this staging branch. + # + # CAUTION: If you have live predict/search traffic, switching the default + # branch could potentially cause outages if the ID space of the new branch + # is very different from the old one. + # + # More specifically: + # + # * PredictionService will only return product IDs from branch \\{newBranch}. + # * SearchService will only return product IDs from branch \\{newBranch} + # (if branch is not explicitly set). + # * UserEventService will only join events with products from branch + # \\{newBranch}. # # @overload set_default_branch(request, options = nil) # Pass arguments to `set_default_branch` via a request object, either of type @@ -557,8 +557,8 @@ def set_default_branch request, options = nil ## # Get which branch is currently default branch set by - # {::Google::Cloud::Retail::V2::CatalogService::Client#set_default_branch CatalogService.SetDefaultBranch} - # method under a specified parent catalog. + # {::Google::Cloud::Retail::V2::CatalogService::Client#set_default_branch CatalogService.SetDefaultBranch} + # method under a specified parent catalog. # # @overload get_default_branch(request, options = nil) # Pass arguments to `get_default_branch` via a request object, either of type diff --git a/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service/rest/client.rb b/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service/rest/client.rb index bacbd98afcf4..5b5f1bfa4255 100644 --- a/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +++ b/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service/rest/client.rb @@ -397,39 +397,39 @@ def update_catalog request, options = nil ## # Set a specified branch id as default branch. API methods such as - # {::Google::Cloud::Retail::V2::SearchService::Rest::Client#search SearchService.Search}, - # {::Google::Cloud::Retail::V2::ProductService::Rest::Client#get_product ProductService.GetProduct}, - # {::Google::Cloud::Retail::V2::ProductService::Rest::Client#list_products ProductService.ListProducts} - # will treat requests using "default_branch" to the actual branch id set as - # default. - # - # For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as - # default, setting - # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to - # `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent - # to setting - # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to - # `projects/*/locations/*/catalogs/*/branches/1`. - # - # Using multiple branches can be useful when developers would like - # to have a staging branch to test and verify for future usage. When it - # becomes ready, developers switch on the staging branch using this API - # while keeping using - # `projects/*/locations/*/catalogs/*/branches/default_branch` as - # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to - # route the traffic to this staging branch. - # - # CAUTION: If you have live predict/search traffic, switching the default - # branch could potentially cause outages if the ID space of the new branch - # is very different from the old one. - # - # More specifically: - # - # * PredictionService will only return product IDs from branch \\{newBranch}. - # * SearchService will only return product IDs from branch \\{newBranch} - # (if branch is not explicitly set). - # * UserEventService will only join events with products from branch - # \\{newBranch}. + # {::Google::Cloud::Retail::V2::SearchService::Rest::Client#search SearchService.Search}, + # {::Google::Cloud::Retail::V2::ProductService::Rest::Client#get_product ProductService.GetProduct}, + # {::Google::Cloud::Retail::V2::ProductService::Rest::Client#list_products ProductService.ListProducts} + # will treat requests using "default_branch" to the actual branch id set as + # default. + # + # For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as + # default, setting + # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to + # `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent + # to setting + # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to + # `projects/*/locations/*/catalogs/*/branches/1`. + # + # Using multiple branches can be useful when developers would like + # to have a staging branch to test and verify for future usage. When it + # becomes ready, developers switch on the staging branch using this API + # while keeping using + # `projects/*/locations/*/catalogs/*/branches/default_branch` as + # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to + # route the traffic to this staging branch. + # + # CAUTION: If you have live predict/search traffic, switching the default + # branch could potentially cause outages if the ID space of the new branch + # is very different from the old one. + # + # More specifically: + # + # * PredictionService will only return product IDs from branch \\{newBranch}. + # * SearchService will only return product IDs from branch \\{newBranch} + # (if branch is not explicitly set). + # * UserEventService will only join events with products from branch + # \\{newBranch}. # # @overload set_default_branch(request, options = nil) # Pass arguments to `set_default_branch` via a request object, either of type @@ -529,8 +529,8 @@ def set_default_branch request, options = nil ## # Get which branch is currently default branch set by - # {::Google::Cloud::Retail::V2::CatalogService::Rest::Client#set_default_branch CatalogService.SetDefaultBranch} - # method under a specified parent catalog. + # {::Google::Cloud::Retail::V2::CatalogService::Rest::Client#set_default_branch CatalogService.SetDefaultBranch} + # method under a specified parent catalog. # # @overload get_default_branch(request, options = nil) # Pass arguments to `get_default_branch` via a request object, either of type diff --git a/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service_services_pb.rb b/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service_services_pb.rb index 49d59a0c1a01..438318e3f7ab 100644 --- a/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +++ b/google-cloud-retail-v2/lib/google/cloud/retail/v2/catalog_service_services_pb.rb @@ -39,43 +39,43 @@ class Service # Updates the [Catalog][google.cloud.retail.v2.Catalog]s. rpc :UpdateCatalog, ::Google::Cloud::Retail::V2::UpdateCatalogRequest, ::Google::Cloud::Retail::V2::Catalog # Set a specified branch id as default branch. API methods such as - # [SearchService.Search][google.cloud.retail.v2.SearchService.Search], - # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], - # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts] - # will treat requests using "default_branch" to the actual branch id set as - # default. + # [SearchService.Search][google.cloud.retail.v2.SearchService.Search], + # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], + # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts] + # will treat requests using "default_branch" to the actual branch id set as + # default. # - # For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as - # default, setting - # [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to - # `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent - # to setting - # [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to - # `projects/*/locations/*/catalogs/*/branches/1`. + # For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as + # default, setting + # [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to + # `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent + # to setting + # [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to + # `projects/*/locations/*/catalogs/*/branches/1`. # - # Using multiple branches can be useful when developers would like - # to have a staging branch to test and verify for future usage. When it - # becomes ready, developers switch on the staging branch using this API - # while keeping using - # `projects/*/locations/*/catalogs/*/branches/default_branch` as - # [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to - # route the traffic to this staging branch. + # Using multiple branches can be useful when developers would like + # to have a staging branch to test and verify for future usage. When it + # becomes ready, developers switch on the staging branch using this API + # while keeping using + # `projects/*/locations/*/catalogs/*/branches/default_branch` as + # [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to + # route the traffic to this staging branch. # - # CAUTION: If you have live predict/search traffic, switching the default - # branch could potentially cause outages if the ID space of the new branch - # is very different from the old one. + # CAUTION: If you have live predict/search traffic, switching the default + # branch could potentially cause outages if the ID space of the new branch + # is very different from the old one. # - # More specifically: + # More specifically: # - # * PredictionService will only return product IDs from branch {newBranch}. - # * SearchService will only return product IDs from branch {newBranch} - # (if branch is not explicitly set). - # * UserEventService will only join events with products from branch - # {newBranch}. + # * PredictionService will only return product IDs from branch {newBranch}. + # * SearchService will only return product IDs from branch {newBranch} + # (if branch is not explicitly set). + # * UserEventService will only join events with products from branch + # {newBranch}. rpc :SetDefaultBranch, ::Google::Cloud::Retail::V2::SetDefaultBranchRequest, ::Google::Protobuf::Empty # Get which branch is currently default branch set by - # [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] - # method under a specified parent catalog. + # [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] + # method under a specified parent catalog. rpc :GetDefaultBranch, ::Google::Cloud::Retail::V2::GetDefaultBranchRequest, ::Google::Cloud::Retail::V2::GetDefaultBranchResponse # Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig]. rpc :GetCompletionConfig, ::Google::Cloud::Retail::V2::GetCompletionConfigRequest, ::Google::Cloud::Retail::V2::CompletionConfig diff --git a/google-cloud-retail-v2/lib/google/cloud/retail/v2/common_pb.rb b/google-cloud-retail-v2/lib/google/cloud/retail/v2/common_pb.rb index 7ec3ef20e9e7..abb3ef319229 100644 --- a/google-cloud-retail-v2/lib/google/cloud/retail/v2/common_pb.rb +++ b/google-cloud-retail-v2/lib/google/cloud/retail/v2/common_pb.rb @@ -8,7 +8,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n#google/cloud/retail/v2/common.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\x02\n\tCondition\x12@\n\x0bquery_terms\x18\x01 \x03(\x0b\x32+.google.cloud.retail.v2.Condition.QueryTerm\x12\x46\n\x11\x61\x63tive_time_range\x18\x03 \x03(\x0b\x32+.google.cloud.retail.v2.Condition.TimeRange\x12\x17\n\x0fpage_categories\x18\x04 \x03(\t\x1a.\n\tQueryTerm\x12\r\n\x05value\x18\x01 \x01(\t\x12\x12\n\nfull_match\x18\x02 \x01(\x08\x1ai\n\tTimeRange\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xea\r\n\x04Rule\x12@\n\x0c\x62oost_action\x18\x02 \x01(\x0b\x32(.google.cloud.retail.v2.Rule.BoostActionH\x00\x12\x46\n\x0fredirect_action\x18\x03 \x01(\x0b\x32+.google.cloud.retail.v2.Rule.RedirectActionH\x00\x12S\n\x16oneway_synonyms_action\x18\x06 \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.OnewaySynonymsActionH\x00\x12T\n\x17\x64o_not_associate_action\x18\x07 \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.DoNotAssociateActionH\x00\x12L\n\x12replacement_action\x18\x08 \x01(\x0b\x32..google.cloud.retail.v2.Rule.ReplacementActionH\x00\x12\x42\n\rignore_action\x18\t \x01(\x0b\x32).google.cloud.retail.v2.Rule.IgnoreActionH\x00\x12\x42\n\rfilter_action\x18\n \x01(\x0b\x32).google.cloud.retail.v2.Rule.FilterActionH\x00\x12S\n\x16twoway_synonyms_action\x18\x0b \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.TwowaySynonymsActionH\x00\x12X\n\x19\x66orce_return_facet_action\x18\x0c \x01(\x0b\x32\x33.google.cloud.retail.v2.Rule.ForceReturnFacetActionH\x00\x12M\n\x13remove_facet_action\x18\r \x01(\x0b\x32..google.cloud.retail.v2.Rule.RemoveFacetActionH\x00\x12<\n\npin_action\x18\x0e \x01(\x0b\x32&.google.cloud.retail.v2.Rule.PinActionH\x00\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32!.google.cloud.retail.v2.ConditionB\x03\xe0\x41\x02\x1a\x35\n\x0b\x42oostAction\x12\r\n\x05\x62oost\x18\x01 \x01(\x02\x12\x17\n\x0fproducts_filter\x18\x02 \x01(\t\x1a\x1e\n\x0c\x46ilterAction\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x1a&\n\x0eRedirectAction\x12\x14\n\x0credirect_uri\x18\x01 \x01(\t\x1a(\n\x14TwowaySynonymsAction\x12\x10\n\x08synonyms\x18\x01 \x03(\t\x1aS\n\x14OnewaySynonymsAction\x12\x13\n\x0bquery_terms\x18\x03 \x03(\t\x12\x10\n\x08synonyms\x18\x04 \x03(\t\x12\x14\n\x0coneway_terms\x18\x02 \x03(\t\x1aZ\n\x14\x44oNotAssociateAction\x12\x13\n\x0bquery_terms\x18\x02 \x03(\t\x12\x1e\n\x16\x64o_not_associate_terms\x18\x03 \x03(\t\x12\r\n\x05terms\x18\x01 \x03(\t\x1aP\n\x11ReplacementAction\x12\x13\n\x0bquery_terms\x18\x02 \x03(\t\x12\x18\n\x10replacement_term\x18\x03 \x01(\t\x12\x0c\n\x04term\x18\x01 \x01(\t\x1a$\n\x0cIgnoreAction\x12\x14\n\x0cignore_terms\x18\x01 \x03(\t\x1a\xce\x01\n\x16\x46orceReturnFacetAction\x12o\n\x1a\x66\x61\x63\x65t_position_adjustments\x18\x01 \x03(\x0b\x32K.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment\x1a\x43\n\x17\x46\x61\x63\x65tPositionAdjustment\x12\x16\n\x0e\x61ttribute_name\x18\x01 \x01(\t\x12\x10\n\x08position\x18\x02 \x01(\x05\x1a,\n\x11RemoveFacetAction\x12\x17\n\x0f\x61ttribute_names\x18\x01 \x03(\t\x1a\x84\x01\n\tPinAction\x12H\n\x07pin_map\x18\x01 \x03(\x0b\x32\x32.google.cloud.retail.v2.Rule.PinAction.PinMapEntryB\x03\xe0\x41\x02\x1a-\n\x0bPinMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x61\x63tion\"/\n\x08\x41udience\x12\x0f\n\x07genders\x18\x01 \x03(\t\x12\x12\n\nage_groups\x18\x02 \x03(\t\"3\n\tColorInfo\x12\x16\n\x0e\x63olor_families\x18\x01 \x03(\t\x12\x0e\n\x06\x63olors\x18\x02 \x03(\t\"\x86\x01\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\x12\x1b\n\nsearchable\x18\x03 \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x1a\n\tindexable\x18\x04 \x01(\x08\x42\x02\x18\x01H\x01\x88\x01\x01\x42\r\n\x0b_searchableB\x0c\n\n_indexable\"2\n\x0f\x46ulfillmentInfo\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x11\n\tplace_ids\x18\x02 \x03(\t\"8\n\x05Image\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"\x89\x03\n\tPriceInfo\x12\x15\n\rcurrency_code\x18\x01 \x01(\t\x12\r\n\x05price\x18\x02 \x01(\x02\x12\x16\n\x0eoriginal_price\x18\x03 \x01(\x02\x12\x0c\n\x04\x63ost\x18\x04 \x01(\x02\x12\x38\n\x14price_effective_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11price_expire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x0bprice_range\x18\x07 \x01(\x0b\x32,.google.cloud.retail.v2.PriceInfo.PriceRangeB\x03\xe0\x41\x03\x1aw\n\nPriceRange\x12/\n\x05price\x18\x01 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x38\n\x0eoriginal_price\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\"P\n\x06Rating\x12\x14\n\x0crating_count\x18\x01 \x01(\x05\x12\x16\n\x0e\x61verage_rating\x18\x02 \x01(\x02\x12\x18\n\x10rating_histogram\x18\x03 \x03(\x05\"`\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nip_address\x18\x02 \x01(\t\x12\x12\n\nuser_agent\x18\x03 \x01(\t\x12\x1b\n\x13\x64irect_user_request\x18\x04 \x01(\x08\"\xb0\x02\n\x0eLocalInventory\x12\x15\n\x08place_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12:\n\nprice_info\x18\x02 \x01(\x0b\x32!.google.cloud.retail.v2.PriceInfoB\x03\xe0\x41\x01\x12O\n\nattributes\x18\x03 \x03(\x0b\x32\x36.google.cloud.retail.v2.LocalInventory.AttributesEntryB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ulfillment_types\x18\x04 \x03(\tB\x03\xe0\x41\x01\x1aZ\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.retail.v2.CustomAttribute:\x02\x38\x01\"\xbf\x03\n\x12PinControlMetadata\x12X\n\x10\x61ll_matched_pins\x18\x01 \x03(\x0b\x32>.google.cloud.retail.v2.PinControlMetadata.AllMatchedPinsEntry\x12Q\n\x0c\x64ropped_pins\x18\x02 \x03(\x0b\x32;.google.cloud.retail.v2.PinControlMetadata.DroppedPinsEntry\x1a!\n\x0bProductPins\x12\x12\n\nproduct_id\x18\x01 \x03(\t\x1am\n\x13\x41llMatchedPinsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.retail.v2.PinControlMetadata.ProductPins:\x02\x38\x01\x1aj\n\x10\x44roppedPinsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.retail.v2.PinControlMetadata.ProductPins:\x02\x38\x01*\x86\x01\n\x14\x41ttributeConfigLevel\x12&\n\"ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED\x10\x00\x12\"\n\x1ePRODUCT_LEVEL_ATTRIBUTE_CONFIG\x10\x01\x12\"\n\x1e\x43\x41TALOG_LEVEL_ATTRIBUTE_CONFIG\x10\x02*i\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cSOLUTION_TYPE_RECOMMENDATION\x10\x01\x12\x18\n\x14SOLUTION_TYPE_SEARCH\x10\x02*\xa1\x01\n\x1eRecommendationsFilteringOption\x12\x30\n,RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED\x10\x00\x12&\n\"RECOMMENDATIONS_FILTERING_DISABLED\x10\x01\x12%\n!RECOMMENDATIONS_FILTERING_ENABLED\x10\x03*\x8b\x01\n\x15SearchSolutionUseCase\x12(\n$SEARCH_SOLUTION_USE_CASE_UNSPECIFIED\x10\x00\x12#\n\x1fSEARCH_SOLUTION_USE_CASE_SEARCH\x10\x01\x12#\n\x1fSEARCH_SOLUTION_USE_CASE_BROWSE\x10\x02\x42\xb6\x01\n\x1a\x63om.google.cloud.retail.v2B\x0b\x43ommonProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3" +descriptor_data = "\n#google/cloud/retail/v2/common.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\x02\n\tCondition\x12@\n\x0bquery_terms\x18\x01 \x03(\x0b\x32+.google.cloud.retail.v2.Condition.QueryTerm\x12\x46\n\x11\x61\x63tive_time_range\x18\x03 \x03(\x0b\x32+.google.cloud.retail.v2.Condition.TimeRange\x12\x17\n\x0fpage_categories\x18\x04 \x03(\t\x1a.\n\tQueryTerm\x12\r\n\x05value\x18\x01 \x01(\t\x12\x12\n\nfull_match\x18\x02 \x01(\x08\x1ai\n\tTimeRange\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xea\r\n\x04Rule\x12@\n\x0c\x62oost_action\x18\x02 \x01(\x0b\x32(.google.cloud.retail.v2.Rule.BoostActionH\x00\x12\x46\n\x0fredirect_action\x18\x03 \x01(\x0b\x32+.google.cloud.retail.v2.Rule.RedirectActionH\x00\x12S\n\x16oneway_synonyms_action\x18\x06 \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.OnewaySynonymsActionH\x00\x12T\n\x17\x64o_not_associate_action\x18\x07 \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.DoNotAssociateActionH\x00\x12L\n\x12replacement_action\x18\x08 \x01(\x0b\x32..google.cloud.retail.v2.Rule.ReplacementActionH\x00\x12\x42\n\rignore_action\x18\t \x01(\x0b\x32).google.cloud.retail.v2.Rule.IgnoreActionH\x00\x12\x42\n\rfilter_action\x18\n \x01(\x0b\x32).google.cloud.retail.v2.Rule.FilterActionH\x00\x12S\n\x16twoway_synonyms_action\x18\x0b \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.TwowaySynonymsActionH\x00\x12X\n\x19\x66orce_return_facet_action\x18\x0c \x01(\x0b\x32\x33.google.cloud.retail.v2.Rule.ForceReturnFacetActionH\x00\x12M\n\x13remove_facet_action\x18\r \x01(\x0b\x32..google.cloud.retail.v2.Rule.RemoveFacetActionH\x00\x12<\n\npin_action\x18\x0e \x01(\x0b\x32&.google.cloud.retail.v2.Rule.PinActionH\x00\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32!.google.cloud.retail.v2.ConditionB\x03\xe0\x41\x02\x1a\x35\n\x0b\x42oostAction\x12\r\n\x05\x62oost\x18\x01 \x01(\x02\x12\x17\n\x0fproducts_filter\x18\x02 \x01(\t\x1a\x1e\n\x0c\x46ilterAction\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x1a&\n\x0eRedirectAction\x12\x14\n\x0credirect_uri\x18\x01 \x01(\t\x1a(\n\x14TwowaySynonymsAction\x12\x10\n\x08synonyms\x18\x01 \x03(\t\x1aS\n\x14OnewaySynonymsAction\x12\x13\n\x0bquery_terms\x18\x03 \x03(\t\x12\x10\n\x08synonyms\x18\x04 \x03(\t\x12\x14\n\x0coneway_terms\x18\x02 \x03(\t\x1aZ\n\x14\x44oNotAssociateAction\x12\x13\n\x0bquery_terms\x18\x02 \x03(\t\x12\x1e\n\x16\x64o_not_associate_terms\x18\x03 \x03(\t\x12\r\n\x05terms\x18\x01 \x03(\t\x1aP\n\x11ReplacementAction\x12\x13\n\x0bquery_terms\x18\x02 \x03(\t\x12\x18\n\x10replacement_term\x18\x03 \x01(\t\x12\x0c\n\x04term\x18\x01 \x01(\t\x1a$\n\x0cIgnoreAction\x12\x14\n\x0cignore_terms\x18\x01 \x03(\t\x1a\xce\x01\n\x16\x46orceReturnFacetAction\x12o\n\x1a\x66\x61\x63\x65t_position_adjustments\x18\x01 \x03(\x0b\x32K.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment\x1a\x43\n\x17\x46\x61\x63\x65tPositionAdjustment\x12\x16\n\x0e\x61ttribute_name\x18\x01 \x01(\t\x12\x10\n\x08position\x18\x02 \x01(\x05\x1a,\n\x11RemoveFacetAction\x12\x17\n\x0f\x61ttribute_names\x18\x01 \x03(\t\x1a\x84\x01\n\tPinAction\x12H\n\x07pin_map\x18\x01 \x03(\x0b\x32\x32.google.cloud.retail.v2.Rule.PinAction.PinMapEntryB\x03\xe0\x41\x02\x1a-\n\x0bPinMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x61\x63tion\"/\n\x08\x41udience\x12\x0f\n\x07genders\x18\x01 \x03(\t\x12\x12\n\nage_groups\x18\x02 \x03(\t\"3\n\tColorInfo\x12\x16\n\x0e\x63olor_families\x18\x01 \x03(\t\x12\x0e\n\x06\x63olors\x18\x02 \x03(\t\"\x86\x01\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\x12\x1b\n\nsearchable\x18\x03 \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x1a\n\tindexable\x18\x04 \x01(\x08\x42\x02\x18\x01H\x01\x88\x01\x01\x42\r\n\x0b_searchableB\x0c\n\n_indexable\"2\n\x0f\x46ulfillmentInfo\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x11\n\tplace_ids\x18\x02 \x03(\t\"8\n\x05Image\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"\x89\x03\n\tPriceInfo\x12\x15\n\rcurrency_code\x18\x01 \x01(\t\x12\r\n\x05price\x18\x02 \x01(\x02\x12\x16\n\x0eoriginal_price\x18\x03 \x01(\x02\x12\x0c\n\x04\x63ost\x18\x04 \x01(\x02\x12\x38\n\x14price_effective_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11price_expire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x0bprice_range\x18\x07 \x01(\x0b\x32,.google.cloud.retail.v2.PriceInfo.PriceRangeB\x03\xe0\x41\x03\x1aw\n\nPriceRange\x12/\n\x05price\x18\x01 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x38\n\x0eoriginal_price\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\"P\n\x06Rating\x12\x14\n\x0crating_count\x18\x01 \x01(\x05\x12\x16\n\x0e\x61verage_rating\x18\x02 \x01(\x02\x12\x18\n\x10rating_histogram\x18\x03 \x03(\x05\"`\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nip_address\x18\x02 \x01(\t\x12\x12\n\nuser_agent\x18\x03 \x01(\t\x12\x1b\n\x13\x64irect_user_request\x18\x04 \x01(\x08\"\xb0\x02\n\x0eLocalInventory\x12\x15\n\x08place_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12:\n\nprice_info\x18\x02 \x01(\x0b\x32!.google.cloud.retail.v2.PriceInfoB\x03\xe0\x41\x01\x12O\n\nattributes\x18\x03 \x03(\x0b\x32\x36.google.cloud.retail.v2.LocalInventory.AttributesEntryB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ulfillment_types\x18\x04 \x03(\tB\x03\xe0\x41\x01\x1aZ\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.retail.v2.CustomAttribute:\x02\x38\x01\"\xbf\x03\n\x12PinControlMetadata\x12X\n\x10\x61ll_matched_pins\x18\x01 \x03(\x0b\x32>.google.cloud.retail.v2.PinControlMetadata.AllMatchedPinsEntry\x12Q\n\x0c\x64ropped_pins\x18\x02 \x03(\x0b\x32;.google.cloud.retail.v2.PinControlMetadata.DroppedPinsEntry\x1a!\n\x0bProductPins\x12\x12\n\nproduct_id\x18\x01 \x03(\t\x1am\n\x13\x41llMatchedPinsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.retail.v2.PinControlMetadata.ProductPins:\x02\x38\x01\x1aj\n\x10\x44roppedPinsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.retail.v2.PinControlMetadata.ProductPins:\x02\x38\x01\"\x1c\n\nStringList\x12\x0e\n\x06values\x18\x01 \x03(\t\"\x1c\n\nDoubleList\x12\x0e\n\x06values\x18\x01 \x03(\x01*\x86\x01\n\x14\x41ttributeConfigLevel\x12&\n\"ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED\x10\x00\x12\"\n\x1ePRODUCT_LEVEL_ATTRIBUTE_CONFIG\x10\x01\x12\"\n\x1e\x43\x41TALOG_LEVEL_ATTRIBUTE_CONFIG\x10\x02*i\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cSOLUTION_TYPE_RECOMMENDATION\x10\x01\x12\x18\n\x14SOLUTION_TYPE_SEARCH\x10\x02*\xa1\x01\n\x1eRecommendationsFilteringOption\x12\x30\n,RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED\x10\x00\x12&\n\"RECOMMENDATIONS_FILTERING_DISABLED\x10\x01\x12%\n!RECOMMENDATIONS_FILTERING_ENABLED\x10\x03*\x8b\x01\n\x15SearchSolutionUseCase\x12(\n$SEARCH_SOLUTION_USE_CASE_UNSPECIFIED\x10\x00\x12#\n\x1fSEARCH_SOLUTION_USE_CASE_SEARCH\x10\x01\x12#\n\x1fSEARCH_SOLUTION_USE_CASE_BROWSE\x10\x02\x42\xb6\x01\n\x1a\x63om.google.cloud.retail.v2B\x0b\x43ommonProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -68,6 +68,8 @@ module V2 LocalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.LocalInventory").msgclass PinControlMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PinControlMetadata").msgclass PinControlMetadata::ProductPins = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PinControlMetadata.ProductPins").msgclass + StringList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.StringList").msgclass + DoubleList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.DoubleList").msgclass AttributeConfigLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.AttributeConfigLevel").enummodule SolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SolutionType").enummodule RecommendationsFilteringOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.RecommendationsFilteringOption").enummodule diff --git a/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service/client.rb b/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service/client.rb index 0244c258b4c0..5e8d9811b8f4 100644 --- a/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service/client.rb +++ b/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service/client.rb @@ -223,7 +223,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil, entity: nil, conversational_search_spec: nil, tile_navigation_spec: nil, language_code: nil, region_code: nil, place_id: nil) + # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil, entity: nil, conversational_search_spec: nil, tile_navigation_spec: nil, language_code: nil, region_code: nil, place_id: nil, user_attributes: nil) # Pass arguments to `search` 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). @@ -489,6 +489,27 @@ def logger # product's # {::Google::Cloud::Retail::V2::LocalInventory#place_id LocalInventory.place_id} # for revenue optimization. + # @param user_attributes [::Hash{::String => ::Google::Cloud::Retail::V2::StringList, ::Hash}] + # Optional. The user attributes that could be used for personalization of + # search results. + # * Populate at most 100 key-value pairs per query. + # * Only supports string keys and repeated string values. + # * Duplcate keys are not allowed within a single query. + # + # Example: + # user_attributes: [ + # { key: "pets" + # value { + # values: "dog" + # values: "cat" + # } + # }, + # { key: "state" + # value { + # values: "CA" + # } + # } + # ] # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>] diff --git a/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service/rest/client.rb b/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service/rest/client.rb index 7b0e4bf77559..376fcecbc7e4 100644 --- a/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service/rest/client.rb +++ b/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service/rest/client.rb @@ -216,7 +216,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil, entity: nil, conversational_search_spec: nil, tile_navigation_spec: nil, language_code: nil, region_code: nil, place_id: nil) + # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil, entity: nil, conversational_search_spec: nil, tile_navigation_spec: nil, language_code: nil, region_code: nil, place_id: nil, user_attributes: nil) # Pass arguments to `search` 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). @@ -482,6 +482,27 @@ def logger # product's # {::Google::Cloud::Retail::V2::LocalInventory#place_id LocalInventory.place_id} # for revenue optimization. + # @param user_attributes [::Hash{::String => ::Google::Cloud::Retail::V2::StringList, ::Hash}] + # Optional. The user attributes that could be used for personalization of + # search results. + # * Populate at most 100 key-value pairs per query. + # * Only supports string keys and repeated string values. + # * Duplcate keys are not allowed within a single query. + # + # Example: + # user_attributes: [ + # { key: "pets" + # value { + # values: "dog" + # values: "cat" + # } + # }, + # { key: "state" + # value { + # values: "CA" + # } + # } + # ] # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service_pb.rb b/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service_pb.rb index 47f4de37a947..4ff8ca5ba66d 100644 --- a/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service_pb.rb +++ b/google-cloud-retail-v2/lib/google/cloud/retail/v2/search_service_pb.rb @@ -14,7 +14,7 @@ require 'google/protobuf/struct_pb' -descriptor_data = "\n+google/cloud/retail/v2/search_service.proto\x12\x16google.cloud.retail.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/retail/v2/common.proto\x1a$google/cloud/retail/v2/product.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"4\n\x15ProductAttributeValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\\\n\x18ProductAttributeInterval\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\"\xe8\x01\n\x04Tile\x12P\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueH\x00\x12V\n\x1aproduct_attribute_interval\x18\x02 \x01(\x0b\x32\x30.google.cloud.retail.v2.ProductAttributeIntervalH\x00\x12!\n\x19representative_product_id\x18\x03 \x01(\tB\x13\n\x11product_attribute\"\xd9\x1a\n\rSearchRequest\x12\x16\n\tplacement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x06\x62ranch\x18\x02 \x01(\tB!\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12\x17\n\nvisitor_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tuser_info\x18\x05 \x01(\x0b\x32 .google.cloud.retail.v2.UserInfo\x12\x11\n\tpage_size\x18\x07 \x01(\x05\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x0e\n\x06offset\x18\t \x01(\x05\x12\x0e\n\x06\x66ilter\x18\n \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1c \x01(\t\x12\x10\n\x08order_by\x18\x0b \x01(\t\x12\x44\n\x0b\x66\x61\x63\x65t_specs\x18\x0c \x03(\x0b\x32/.google.cloud.retail.v2.SearchRequest.FacetSpec\x12V\n\x12\x64ynamic_facet_spec\x18\x15 \x01(\x0b\x32\x36.google.cloud.retail.v2.SearchRequest.DynamicFacetSpecB\x02\x18\x01\x12\x43\n\nboost_spec\x18\r \x01(\x0b\x32/.google.cloud.retail.v2.SearchRequest.BoostSpec\x12V\n\x14query_expansion_spec\x18\x0e \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec\x12\x1b\n\x13variant_rollup_keys\x18\x11 \x03(\t\x12\x17\n\x0fpage_categories\x18\x17 \x03(\t\x12\x45\n\x0bsearch_mode\x18\x1f \x01(\x0e\x32\x30.google.cloud.retail.v2.SearchRequest.SearchMode\x12W\n\x14personalization_spec\x18 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.PersonalizationSpec\x12\x41\n\x06labels\x18\" \x03(\x0b\x32\x31.google.cloud.retail.v2.SearchRequest.LabelsEntry\x12]\n\x15spell_correction_spec\x18# \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpecH\x00\x88\x01\x01\x12\x0e\n\x06\x65ntity\x18& \x01(\t\x12g\n\x1a\x63onversational_search_spec\x18( \x01(\x0b\x32>.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpecB\x03\xe0\x41\x01\x12[\n\x14tile_navigation_spec\x18) \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.TileNavigationSpecB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18+ \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18, \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08place_id\x18. \x01(\tB\x03\xe0\x41\x01\x1a\x91\x03\n\tFacetSpec\x12P\n\tfacet_key\x18\x01 \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xe3\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tintervals\x18\x02 \x03(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x08 \x03(\t\x12\x10\n\x08\x63ontains\x18\t \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\n \x01(\x08\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\r\n\x05query\x18\x05 \x01(\t\x12\x16\n\x0ereturn_min_max\x18\x0b \x01(\x08\x1a\x96\x01\n\x10\x44ynamicFacetSpec\x12I\n\x04mode\x18\x01 \x01(\x0e\x32;.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1a\xee\x01\n\tBoostSpec\x12\x61\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12\'\n\x1askip_boost_spec_validation\x18\x02 \x01(\x08H\x00\x88\x01\x01\x1a\x36\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x42\x1d\n\x1b_skip_boost_spec_validation\x1a\xcb\x01\n\x12QueryExpansionSpec\x12U\n\tcondition\x18\x01 \x01(\x0e\x32\x42.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x03\x1a\x99\x01\n\x13PersonalizationSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode\"4\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x1a\xa0\x01\n\x13SpellCorrectionSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\x97\x04\n\x18\x43onversationalSearchSpec\x12\'\n\x1f\x66ollowup_conversation_requested\x18\x01 \x01(\x08\x12\x17\n\x0f\x63onversation_id\x18\x02 \x01(\t\x12^\n\x0buser_answer\x18\x03 \x01(\x0b\x32I.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer\x1a\xd8\x02\n\nUserAnswer\x12\x15\n\x0btext_answer\x18\x01 \x01(\tH\x00\x12s\n\x0fselected_answer\x18\x02 \x01(\x0b\x32X.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer.SelectedAnswerH\x00\x1a\xb5\x01\n\x0eSelectedAnswer\x12S\n\x18product_attribute_values\x18\x01 \x03(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x02\x18\x01\x12N\n\x17product_attribute_value\x18\x02 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x06\n\x04type\x1al\n\x12TileNavigationSpec\x12!\n\x19tile_navigation_requested\x18\x01 \x01(\x08\x12\x33\n\rapplied_tiles\x18\x02 \x03(\x0b\x32\x1c.google.cloud.retail.v2.Tile\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"[\n\nSearchMode\x12\x1b\n\x17SEARCH_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13PRODUCT_SEARCH_ONLY\x10\x01\x12\x17\n\x13\x46\x41\x43\x45TED_SEARCH_ONLY\x10\x02\x42\x18\n\x16_spell_correction_spec\"\xf1\x12\n\x0eSearchResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.retail.v2.SearchResponse.SearchResult\x12<\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32,.google.cloud.retail.v2.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x17\n\x0f\x63orrected_query\x18\x04 \x01(\t\x12\x19\n\x11\x61ttribution_token\x18\x05 \x01(\t\x12\x17\n\x0fnext_page_token\x18\x06 \x01(\t\x12W\n\x14query_expansion_info\x18\x07 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo\x12\x14\n\x0credirect_uri\x18\n \x01(\t\x12\x18\n\x10\x61pplied_controls\x18\x0c \x03(\t\x12H\n\x14pin_control_metadata\x18\x16 \x01(\x0b\x32*.google.cloud.retail.v2.PinControlMetadata\x12i\n\x1dinvalid_condition_boost_specs\x18\x0e \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12?\n\x0f\x65xperiment_info\x18\x11 \x03(\x0b\x32&.google.cloud.retail.v2.ExperimentInfo\x12g\n\x1c\x63onversational_search_result\x18\x12 \x01(\x0b\x32\x41.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult\x12[\n\x16tile_navigation_result\x18\x13 \x01(\x0b\x32;.google.cloud.retail.v2.SearchResponse.TileNavigationResult\x1a\x91\x04\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12\x30\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.Product\x12\x1e\n\x16matching_variant_count\x18\x03 \x01(\x05\x12o\n\x17matching_variant_fields\x18\x04 \x03(\x0b\x32N.google.cloud.retail.v2.SearchResponse.SearchResult.MatchingVariantFieldsEntry\x12k\n\x15variant_rollup_values\x18\x05 \x03(\x0b\x32L.google.cloud.retail.v2.SearchResponse.SearchResult.VariantRollupValuesEntry\x12\x17\n\x0fpersonal_labels\x18\x07 \x03(\t\x1aX\n\x1aMatchingVariantFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask:\x02\x38\x01\x1aR\n\x18VariantRollupValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x8e\x02\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x06values\x18\x02 \x03(\x0b\x32\x37.google.cloud.retail.v2.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1a\x97\x01\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12\x34\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x12\x11\n\tmin_value\x18\x05 \x01(\x01\x12\x11\n\tmax_value\x18\x06 \x01(\x01\x42\r\n\x0b\x66\x61\x63\x65t_value\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a\xff\x04\n\x1a\x43onversationalSearchResult\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x15\n\rrefined_query\x18\x02 \x01(\t\x12r\n\x12\x61\x64\x64itional_filters\x18\x03 \x03(\x0b\x32R.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.AdditionalFilterB\x02\x18\x01\x12\x19\n\x11\x66ollowup_question\x18\x04 \x01(\t\x12l\n\x11suggested_answers\x18\x05 \x03(\x0b\x32Q.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.SuggestedAnswer\x12m\n\x11\x61\x64\x64itional_filter\x18\x06 \x01(\x0b\x32R.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.AdditionalFilter\x1a\x61\n\x0fSuggestedAnswer\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x62\n\x10\x41\x64\x64itionalFilter\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x43\n\x14TileNavigationResult\x12+\n\x05tiles\x18\x01 \x03(\x0b\x32\x1c.google.cloud.retail.v2.Tile\"\xfb\x02\n\x0e\x45xperimentInfo\x12\x63\n\x19serving_config_experiment\x18\x02 \x01(\x0b\x32>.google.cloud.retail.v2.ExperimentInfo.ServingConfigExperimentH\x00\x12\x39\n\nexperiment\x18\x01 \x01(\tB%\xfa\x41\"\n retail.googleapis.com/Experiment\x1a\xb1\x01\n\x17ServingConfigExperiment\x12I\n\x17original_serving_config\x18\x01 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfig\x12K\n\x19\x65xperiment_serving_config\x18\x02 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfigB\x15\n\x13\x65xperiment_metadata2\xd8\x02\n\rSearchService\x12\xfb\x01\n\x06Search\x12%.google.cloud.retail.v2.SearchRequest\x1a&.google.cloud.retail.v2.SearchResponse\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"E/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search:\x01*ZN\"I/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb7\x02\n\x1a\x63om.google.cloud.retail.v2B\x12SearchServiceProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2\xea\x41w\n retail.googleapis.com/Experiment\x12Sprojects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}b\x06proto3" +descriptor_data = "\n+google/cloud/retail/v2/search_service.proto\x12\x16google.cloud.retail.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/retail/v2/common.proto\x1a$google/cloud/retail/v2/product.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"4\n\x15ProductAttributeValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\\\n\x18ProductAttributeInterval\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\"\xe8\x01\n\x04Tile\x12P\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueH\x00\x12V\n\x1aproduct_attribute_interval\x18\x02 \x01(\x0b\x32\x30.google.cloud.retail.v2.ProductAttributeIntervalH\x00\x12!\n\x19representative_product_id\x18\x03 \x01(\tB\x13\n\x11product_attribute\"\x8d\x1c\n\rSearchRequest\x12\x16\n\tplacement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x06\x62ranch\x18\x02 \x01(\tB!\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12\x17\n\nvisitor_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tuser_info\x18\x05 \x01(\x0b\x32 .google.cloud.retail.v2.UserInfo\x12\x11\n\tpage_size\x18\x07 \x01(\x05\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x0e\n\x06offset\x18\t \x01(\x05\x12\x0e\n\x06\x66ilter\x18\n \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1c \x01(\t\x12\x10\n\x08order_by\x18\x0b \x01(\t\x12\x44\n\x0b\x66\x61\x63\x65t_specs\x18\x0c \x03(\x0b\x32/.google.cloud.retail.v2.SearchRequest.FacetSpec\x12V\n\x12\x64ynamic_facet_spec\x18\x15 \x01(\x0b\x32\x36.google.cloud.retail.v2.SearchRequest.DynamicFacetSpecB\x02\x18\x01\x12\x43\n\nboost_spec\x18\r \x01(\x0b\x32/.google.cloud.retail.v2.SearchRequest.BoostSpec\x12V\n\x14query_expansion_spec\x18\x0e \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec\x12\x1b\n\x13variant_rollup_keys\x18\x11 \x03(\t\x12\x17\n\x0fpage_categories\x18\x17 \x03(\t\x12\x45\n\x0bsearch_mode\x18\x1f \x01(\x0e\x32\x30.google.cloud.retail.v2.SearchRequest.SearchMode\x12W\n\x14personalization_spec\x18 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.PersonalizationSpec\x12\x41\n\x06labels\x18\" \x03(\x0b\x32\x31.google.cloud.retail.v2.SearchRequest.LabelsEntry\x12]\n\x15spell_correction_spec\x18# \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpecH\x00\x88\x01\x01\x12\x0e\n\x06\x65ntity\x18& \x01(\t\x12g\n\x1a\x63onversational_search_spec\x18( \x01(\x0b\x32>.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpecB\x03\xe0\x41\x01\x12[\n\x14tile_navigation_spec\x18) \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.TileNavigationSpecB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18+ \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18, \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08place_id\x18. \x01(\tB\x03\xe0\x41\x01\x12W\n\x0fuser_attributes\x18/ \x03(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.UserAttributesEntryB\x03\xe0\x41\x01\x1a\x91\x03\n\tFacetSpec\x12P\n\tfacet_key\x18\x01 \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xe3\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tintervals\x18\x02 \x03(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x08 \x03(\t\x12\x10\n\x08\x63ontains\x18\t \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\n \x01(\x08\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\r\n\x05query\x18\x05 \x01(\t\x12\x16\n\x0ereturn_min_max\x18\x0b \x01(\x08\x1a\x96\x01\n\x10\x44ynamicFacetSpec\x12I\n\x04mode\x18\x01 \x01(\x0e\x32;.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1a\xee\x01\n\tBoostSpec\x12\x61\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12\'\n\x1askip_boost_spec_validation\x18\x02 \x01(\x08H\x00\x88\x01\x01\x1a\x36\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x42\x1d\n\x1b_skip_boost_spec_validation\x1a\xcb\x01\n\x12QueryExpansionSpec\x12U\n\tcondition\x18\x01 \x01(\x0e\x32\x42.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x03\x1a\x99\x01\n\x13PersonalizationSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode\"4\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x1a\xa0\x01\n\x13SpellCorrectionSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\x97\x04\n\x18\x43onversationalSearchSpec\x12\'\n\x1f\x66ollowup_conversation_requested\x18\x01 \x01(\x08\x12\x17\n\x0f\x63onversation_id\x18\x02 \x01(\t\x12^\n\x0buser_answer\x18\x03 \x01(\x0b\x32I.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer\x1a\xd8\x02\n\nUserAnswer\x12\x15\n\x0btext_answer\x18\x01 \x01(\tH\x00\x12s\n\x0fselected_answer\x18\x02 \x01(\x0b\x32X.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer.SelectedAnswerH\x00\x1a\xb5\x01\n\x0eSelectedAnswer\x12S\n\x18product_attribute_values\x18\x01 \x03(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x02\x18\x01\x12N\n\x17product_attribute_value\x18\x02 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x06\n\x04type\x1al\n\x12TileNavigationSpec\x12!\n\x19tile_navigation_requested\x18\x01 \x01(\x08\x12\x33\n\rapplied_tiles\x18\x02 \x03(\x0b\x32\x1c.google.cloud.retail.v2.Tile\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aY\n\x13UserAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".google.cloud.retail.v2.StringList:\x02\x38\x01\"[\n\nSearchMode\x12\x1b\n\x17SEARCH_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13PRODUCT_SEARCH_ONLY\x10\x01\x12\x17\n\x13\x46\x41\x43\x45TED_SEARCH_ONLY\x10\x02\x42\x18\n\x16_spell_correction_spec\"\xa5\x14\n\x0eSearchResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.retail.v2.SearchResponse.SearchResult\x12<\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32,.google.cloud.retail.v2.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x17\n\x0f\x63orrected_query\x18\x04 \x01(\t\x12\x19\n\x11\x61ttribution_token\x18\x05 \x01(\t\x12\x17\n\x0fnext_page_token\x18\x06 \x01(\t\x12W\n\x14query_expansion_info\x18\x07 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo\x12\x14\n\x0credirect_uri\x18\n \x01(\t\x12\x18\n\x10\x61pplied_controls\x18\x0c \x03(\t\x12H\n\x14pin_control_metadata\x18\x16 \x01(\x0b\x32*.google.cloud.retail.v2.PinControlMetadata\x12i\n\x1dinvalid_condition_boost_specs\x18\x0e \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12?\n\x0f\x65xperiment_info\x18\x11 \x03(\x0b\x32&.google.cloud.retail.v2.ExperimentInfo\x12g\n\x1c\x63onversational_search_result\x18\x12 \x01(\x0b\x32\x41.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult\x12[\n\x16tile_navigation_result\x18\x13 \x01(\x0b\x32;.google.cloud.retail.v2.SearchResponse.TileNavigationResult\x1a\xc5\x05\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12\x30\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.Product\x12\x1e\n\x16matching_variant_count\x18\x03 \x01(\x05\x12o\n\x17matching_variant_fields\x18\x04 \x03(\x0b\x32N.google.cloud.retail.v2.SearchResponse.SearchResult.MatchingVariantFieldsEntry\x12k\n\x15variant_rollup_values\x18\x05 \x03(\x0b\x32L.google.cloud.retail.v2.SearchResponse.SearchResult.VariantRollupValuesEntry\x12\x17\n\x0fpersonal_labels\x18\x07 \x03(\t\x12Z\n\x0cmodel_scores\x18\x08 \x03(\x0b\x32\x44.google.cloud.retail.v2.SearchResponse.SearchResult.ModelScoresEntry\x1aX\n\x1aMatchingVariantFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask:\x02\x38\x01\x1aR\n\x18VariantRollupValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1aV\n\x10ModelScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".google.cloud.retail.v2.DoubleList:\x02\x38\x01\x1a\x8e\x02\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x06values\x18\x02 \x03(\x0b\x32\x37.google.cloud.retail.v2.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1a\x97\x01\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12\x34\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x12\x11\n\tmin_value\x18\x05 \x01(\x01\x12\x11\n\tmax_value\x18\x06 \x01(\x01\x42\r\n\x0b\x66\x61\x63\x65t_value\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a\xff\x04\n\x1a\x43onversationalSearchResult\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x15\n\rrefined_query\x18\x02 \x01(\t\x12r\n\x12\x61\x64\x64itional_filters\x18\x03 \x03(\x0b\x32R.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.AdditionalFilterB\x02\x18\x01\x12\x19\n\x11\x66ollowup_question\x18\x04 \x01(\t\x12l\n\x11suggested_answers\x18\x05 \x03(\x0b\x32Q.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.SuggestedAnswer\x12m\n\x11\x61\x64\x64itional_filter\x18\x06 \x01(\x0b\x32R.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.AdditionalFilter\x1a\x61\n\x0fSuggestedAnswer\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x62\n\x10\x41\x64\x64itionalFilter\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x43\n\x14TileNavigationResult\x12+\n\x05tiles\x18\x01 \x03(\x0b\x32\x1c.google.cloud.retail.v2.Tile\"\xfb\x02\n\x0e\x45xperimentInfo\x12\x63\n\x19serving_config_experiment\x18\x02 \x01(\x0b\x32>.google.cloud.retail.v2.ExperimentInfo.ServingConfigExperimentH\x00\x12\x39\n\nexperiment\x18\x01 \x01(\tB%\xfa\x41\"\n retail.googleapis.com/Experiment\x1a\xb1\x01\n\x17ServingConfigExperiment\x12I\n\x17original_serving_config\x18\x01 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfig\x12K\n\x19\x65xperiment_serving_config\x18\x02 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfigB\x15\n\x13\x65xperiment_metadata2\xd8\x02\n\rSearchService\x12\xfb\x01\n\x06Search\x12%.google.cloud.retail.v2.SearchRequest\x1a&.google.cloud.retail.v2.SearchResponse\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"E/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search:\x01*ZN\"I/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb7\x02\n\x1a\x63om.google.cloud.retail.v2B\x12SearchServiceProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2\xea\x41w\n retail.googleapis.com/Experiment\x12Sprojects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/common.rb b/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/common.rb index 821f9b6ae440..5eb7fd7575ee 100644 --- a/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/common.rb +++ b/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/common.rb @@ -1006,6 +1006,24 @@ class DroppedPinsEntry end end + # A list of string values. + # @!attribute [rw] values + # @return [::Array<::String>] + # String values. + class StringList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message with a list of double values. + # @!attribute [rw] values + # @return [::Array<::Float>] + # The list of double values. + class DoubleList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # At which level we offer configuration for attributes. module AttributeConfigLevel # Value used when unset. In this case, server behavior defaults to diff --git a/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/search_service.rb b/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/search_service.rb index 0a391314df76..2c88abf9b9c7 100644 --- a/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/search_service.rb +++ b/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/search_service.rb @@ -359,6 +359,28 @@ class Tile # product's # {::Google::Cloud::Retail::V2::LocalInventory#place_id LocalInventory.place_id} # for revenue optimization. + # @!attribute [rw] user_attributes + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::StringList}] + # Optional. The user attributes that could be used for personalization of + # search results. + # * Populate at most 100 key-value pairs per query. + # * Only supports string keys and repeated string values. + # * Duplcate keys are not allowed within a single query. + # + # Example: + # user_attributes: [ + # { key: "pets" + # value { + # values: "dog" + # values: "cat" + # } + # }, + # { key: "state" + # value { + # values: "CA" + # } + # } + # ] class SearchRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -689,7 +711,8 @@ class ConditionBoostSpec # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}. # @!attribute [rw] pin_unexpanded_results # @return [::Boolean] - # Whether to pin unexpanded results. If this field is set to true, + # Whether to pin unexpanded results. The default value is false. If this + # field is set to true, # unexpanded products are always at the top of the search results, followed # by the expanded results. class QueryExpansionSpec @@ -856,6 +879,15 @@ class LabelsEntry extend ::Google::Protobuf::MessageExts::ClassMethods end + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Retail::V2::StringList] + class UserAttributesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The search mode of each search request. module SearchMode # Default value. In this case both product search and faceted search will @@ -1056,6 +1088,9 @@ class SearchResponse # Possible values: # # * `purchased`: Indicates that this product has been purchased before. + # @!attribute [rw] model_scores + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}] + # Google provided available scores. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1077,6 +1112,15 @@ class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Retail::V2::DoubleList] + class ModelScoresEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # A facet result. diff --git a/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/user_event.rb b/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/user_event.rb index 4a95d2fbbaa1..630fab1c882c 100644 --- a/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/user_event.rb +++ b/google-cloud-retail-v2/proto_docs/google/cloud/retail/v2/user_event.rb @@ -61,7 +61,7 @@ module V2 # 128 bytes. A session is an aggregation of an end user behavior in a time # span. # - # A general guideline to populate the sesion_id: + # A general guideline to populate the session_id: # 1. If user has no activity for 30 min, a new session_id should be assigned. # 2. The session_id should be unique across users, suggest use uuid or add # visitor_id as prefix. diff --git a/google-cloud-retail-v2/test/google/cloud/retail/v2/search_service_rest_test.rb b/google-cloud-retail-v2/test/google/cloud/retail/v2/search_service_rest_test.rb index 671c8114c198..19f0903f41e6 100644 --- a/google-cloud-retail-v2/test/google/cloud/retail/v2/search_service_rest_test.rb +++ b/google-cloud-retail-v2/test/google/cloud/retail/v2/search_service_rest_test.rb @@ -113,6 +113,7 @@ def test_search language_code = "hello world" region_code = "hello world" place_id = "hello world" + user_attributes = {} search_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -128,27 +129,27 @@ def test_search end # Use hash object - client.search({ placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id }) do |_result, response| + client.search({ placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.search placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id do |_result, response| + client.search placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.search ::Google::Cloud::Retail::V2::SearchRequest.new(placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id) do |_result, response| + client.search ::Google::Cloud::Retail::V2::SearchRequest.new(placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.search({ placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id }, call_options) do |_result, response| + client.search({ placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.search(::Google::Cloud::Retail::V2::SearchRequest.new(placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id), call_options) do |_result, response| + client.search(::Google::Cloud::Retail::V2::SearchRequest.new(placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-retail-v2/test/google/cloud/retail/v2/search_service_test.rb b/google-cloud-retail-v2/test/google/cloud/retail/v2/search_service_test.rb index e3b1ca8f47a8..5b0fb6256b2e 100644 --- a/google-cloud-retail-v2/test/google/cloud/retail/v2/search_service_test.rb +++ b/google-cloud-retail-v2/test/google/cloud/retail/v2/search_service_test.rb @@ -99,6 +99,7 @@ def test_search language_code = "hello world" region_code = "hello world" place_id = "hello world" + user_attributes = {} search_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :search, name @@ -131,6 +132,7 @@ def test_search assert_equal "hello world", request["language_code"] assert_equal "hello world", request["region_code"] assert_equal "hello world", request["place_id"] + assert_equal({}, request["user_attributes"].to_h) refute_nil options end @@ -141,35 +143,35 @@ def test_search end # Use hash object - client.search({ placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id }) do |response, operation| + client.search({ placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes }) 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.search placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id do |response, operation| + client.search placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes 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.search ::Google::Cloud::Retail::V2::SearchRequest.new(placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id) do |response, operation| + client.search ::Google::Cloud::Retail::V2::SearchRequest.new(placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes) 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.search({ placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id }, grpc_options) do |response, operation| + client.search({ placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes }, 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.search(::Google::Cloud::Retail::V2::SearchRequest.new(placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id), grpc_options) do |response, operation| + client.search(::Google::Cloud::Retail::V2::SearchRequest.new(placement: placement, branch: branch, query: query, visitor_id: visitor_id, user_info: user_info, page_size: page_size, page_token: page_token, offset: offset, filter: filter, canonical_filter: canonical_filter, order_by: order_by, facet_specs: facet_specs, dynamic_facet_spec: dynamic_facet_spec, boost_spec: boost_spec, query_expansion_spec: query_expansion_spec, variant_rollup_keys: variant_rollup_keys, page_categories: page_categories, search_mode: search_mode, personalization_spec: personalization_spec, labels: labels, spell_correction_spec: spell_correction_spec, entity: entity, conversational_search_spec: conversational_search_spec, tile_navigation_spec: tile_navigation_spec, language_code: language_code, region_code: region_code, place_id: place_id, user_attributes: user_attributes), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation From f3e49ed6abd8a766d8040d1b227a4114dc5715a3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 10:04:49 -0700 Subject: [PATCH 166/457] feat(ai_platform-v1): Support for invoke_route_prefix (#30572) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add invoke_route_prefix to ModelContainerSpec in aiplatform v1 models.proto PiperOrigin-RevId: 775862178 Source-Link: https://github.com/googleapis/googleapis/commit/4667a434d330d4adc942b67304bec5db29bc295c Source-Link: https://github.com/googleapis/googleapis-gen/commit/503481852b0afea4bb6e2ed2fee225ab0a3c1d06 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI1MDM0ODE4NTJiMGFmZWE0YmI2ZTJlZDJmZWUyMjVhYjBhM2MxZDA2In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/aiplatform/v1/model_pb.rb | 2 +- .../proto_docs/google/cloud/aiplatform/v1/model.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_pb.rb index 0c6dbf95857b..d659e2541a22 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n&google/cloud/aiplatform/v1/model.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/aiplatform/v1/deployed_model_ref.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\x16\n\x05Model\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\nversion_id\x18\x1c \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12\x17\n\x0fversion_aliases\x18\x1d \x03(\t\x12<\n\x13version_create_time\x18\x1f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13version_update_time\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1b\n\x13version_description\x18\x1e \x01(\t\x12\x1d\n\x15\x64\x65\x66\x61ult_checkpoint_id\x18\x35 \x01(\t\x12\x45\n\x10predict_schemata\x18\x04 \x01(\x0b\x32+.google.cloud.aiplatform.v1.PredictSchemata\x12 \n\x13metadata_schema_uri\x18\x05 \x01(\tB\x03\xe0\x41\x05\x12-\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x05\x12U\n\x18supported_export_formats\x18\x14 \x03(\x0b\x32..google.cloud.aiplatform.v1.Model.ExportFormatB\x03\xe0\x41\x03\x12M\n\x11training_pipeline\x18\x07 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*aiplatform.googleapis.com/TrainingPipeline\x12\x43\n\x0cpipeline_job\x18/ \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%aiplatform.googleapis.com/PipelineJob\x12K\n\x0e\x63ontainer_spec\x18\t \x01(\x0b\x32..google.cloud.aiplatform.v1.ModelContainerSpecB\x03\xe0\x41\x04\x12\x19\n\x0c\x61rtifact_uri\x18\x1a \x01(\tB\x03\xe0\x41\x05\x12l\n$supported_deployment_resources_types\x18\n \x03(\x0e\x32\x39.google.cloud.aiplatform.v1.Model.DeploymentResourcesTypeB\x03\xe0\x41\x03\x12,\n\x1fsupported_input_storage_formats\x18\x0b \x03(\tB\x03\xe0\x41\x03\x12-\n supported_output_storage_formats\x18\x0c \x03(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x0f\x64\x65ployed_models\x18\x0f \x03(\x0b\x32,.google.cloud.aiplatform.v1.DeployedModelRefB\x03\xe0\x41\x03\x12\x45\n\x10\x65xplanation_spec\x18\x17 \x01(\x0b\x32+.google.cloud.aiplatform.v1.ExplanationSpec\x12\x0c\n\x04\x65tag\x18\x10 \x01(\t\x12=\n\x06labels\x18\x11 \x03(\x0b\x32-.google.cloud.aiplatform.v1.Model.LabelsEntry\x12?\n\ndata_stats\x18\x15 \x01(\x0b\x32+.google.cloud.aiplatform.v1.Model.DataStats\x12\x43\n\x0f\x65ncryption_spec\x18\x18 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12K\n\x11model_source_info\x18& \x01(\x0b\x32+.google.cloud.aiplatform.v1.ModelSourceInfoB\x03\xe0\x41\x03\x12U\n\x13original_model_info\x18\" \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.Model.OriginalModelInfoB\x03\xe0\x41\x03\x12\x1e\n\x11metadata_artifact\x18, \x01(\tB\x03\xe0\x41\x03\x12Q\n\x11\x62\x61se_model_source\x18\x32 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.Model.BaseModelSourceB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x33 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x34 \x01(\x08\x42\x03\xe0\x41\x03\x12\x43\n\x0b\x63heckpoints\x18\x39 \x03(\x0b\x32&.google.cloud.aiplatform.v1.CheckpointB\x06\xe0\x41\x03\xe0\x41\x01\x1a\xd5\x01\n\x0c\x45xportFormat\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x13\x65xportable_contents\x18\x02 \x03(\x0e\x32@.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContentB\x03\xe0\x41\x03\"P\n\x11\x45xportableContent\x12\"\n\x1e\x45XPORTABLE_CONTENT_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41RTIFACT\x10\x01\x12\t\n\x05IMAGE\x10\x02\x1a\xdc\x01\n\tDataStats\x12!\n\x19training_data_items_count\x18\x01 \x01(\x03\x12#\n\x1bvalidation_data_items_count\x18\x02 \x01(\x03\x12\x1d\n\x15test_data_items_count\x18\x03 \x01(\x03\x12\"\n\x1atraining_annotations_count\x18\x04 \x01(\x03\x12$\n\x1cvalidation_annotations_count\x18\x05 \x01(\x03\x12\x1e\n\x16test_annotations_count\x18\x06 \x01(\x03\x1aK\n\x11OriginalModelInfo\x12\x36\n\x05model\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x1a\xaa\x01\n\x0f\x42\x61seModelSource\x12L\n\x13model_garden_source\x18\x01 \x01(\x0b\x32-.google.cloud.aiplatform.v1.ModelGardenSourceH\x00\x12?\n\x0cgenie_source\x18\x02 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.GenieSourceH\x00\x42\x08\n\x06source\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8c\x01\n\x17\x44\x65ploymentResourcesType\x12)\n%DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44\x45\x44ICATED_RESOURCES\x10\x01\x12\x17\n\x13\x41UTOMATIC_RESOURCES\x10\x02\x12\x14\n\x10SHARED_RESOURCES\x10\x03:\\\xea\x41Y\n\x1f\x61iplatform.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}\"(\n\x13LargeModelReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"n\n\x11ModelGardenSource\x12\x1e\n\x11public_model_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nversion_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13skip_hf_model_cache\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"*\n\x0bGenieSource\x12\x1b\n\x0e\x62\x61se_model_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"{\n\x0fPredictSchemata\x12 \n\x13instance_schema_uri\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\"\n\x15parameters_schema_uri\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\"\n\x15prediction_schema_uri\x18\x03 \x01(\tB\x03\xe0\x41\x05\"\xd3\x04\n\x12ModelContainerSpec\x12\x19\n\timage_uri\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x14\n\x07\x63ommand\x18\x02 \x03(\tB\x03\xe0\x41\x05\x12\x11\n\x04\x61rgs\x18\x03 \x03(\tB\x03\xe0\x41\x05\x12\x34\n\x03\x65nv\x18\x04 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVarB\x03\xe0\x41\x05\x12\x34\n\x05ports\x18\x05 \x03(\x0b\x32 .google.cloud.aiplatform.v1.PortB\x03\xe0\x41\x05\x12\x1a\n\rpredict_route\x18\x06 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0chealth_route\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x39\n\ngrpc_ports\x18\t \x03(\x0b\x32 .google.cloud.aiplatform.v1.PortB\x03\xe0\x41\x05\x12:\n\x12\x64\x65ployment_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x05\x12\"\n\x15shared_memory_size_mb\x18\x0b \x01(\x03\x42\x03\xe0\x41\x05\x12=\n\rstartup_probe\x18\x0c \x01(\x0b\x32!.google.cloud.aiplatform.v1.ProbeB\x03\xe0\x41\x05\x12<\n\x0chealth_probe\x18\r \x01(\x0b\x32!.google.cloud.aiplatform.v1.ProbeB\x03\xe0\x41\x05\x12>\n\x0eliveness_probe\x18\x0e \x01(\x0b\x32!.google.cloud.aiplatform.v1.ProbeB\x03\xe0\x41\x05\"\x1e\n\x04Port\x12\x16\n\x0e\x63ontainer_port\x18\x03 \x01(\x05\"\x93\x02\n\x0fModelSourceInfo\x12P\n\x0bsource_type\x18\x01 \x01(\x0e\x32;.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType\x12\x0c\n\x04\x63opy\x18\x02 \x01(\x08\"\x9f\x01\n\x0fModelSourceType\x12!\n\x1dMODEL_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41UTOML\x10\x01\x12\n\n\x06\x43USTOM\x10\x02\x12\x08\n\x04\x42QML\x10\x03\x12\x10\n\x0cMODEL_GARDEN\x10\x04\x12\t\n\x05GENIE\x10\x05\x12\x19\n\x15\x43USTOM_TEXT_EMBEDDING\x10\x06\x12\x0f\n\x0bMARKETPLACE\x10\x07\"\xdb\x05\n\x05Probe\x12<\n\x04\x65xec\x18\x01 \x01(\x0b\x32,.google.cloud.aiplatform.v1.Probe.ExecActionH\x00\x12\x43\n\x08http_get\x18\x04 \x01(\x0b\x32/.google.cloud.aiplatform.v1.Probe.HttpGetActionH\x00\x12<\n\x04grpc\x18\x05 \x01(\x0b\x32,.google.cloud.aiplatform.v1.Probe.GrpcActionH\x00\x12G\n\ntcp_socket\x18\x06 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.Probe.TcpSocketActionH\x00\x12\x16\n\x0eperiod_seconds\x18\x02 \x01(\x05\x12\x17\n\x0ftimeout_seconds\x18\x03 \x01(\x05\x12\x19\n\x11\x66\x61ilure_threshold\x18\x07 \x01(\x05\x12\x19\n\x11success_threshold\x18\x08 \x01(\x05\x12\x1d\n\x15initial_delay_seconds\x18\t \x01(\x05\x1a\x1d\n\nExecAction\x12\x0f\n\x07\x63ommand\x18\x01 \x03(\t\x1a\x8d\x01\n\rHttpGetAction\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x0e\n\x06scheme\x18\x04 \x01(\t\x12\x42\n\x0chttp_headers\x18\x05 \x03(\x0b\x32,.google.cloud.aiplatform.v1.Probe.HttpHeader\x1a+\n\nGrpcAction\x12\x0c\n\x04port\x18\x01 \x01(\x05\x12\x0f\n\x07service\x18\x02 \x01(\t\x1a-\n\x0fTcpSocketAction\x12\x0c\n\x04port\x18\x01 \x01(\x05\x12\x0c\n\x04host\x18\x02 \x01(\t\x1a)\n\nHttpHeader\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\x0c\n\nprobe_type\"@\n\nCheckpoint\x12\x15\n\rcheckpoint_id\x18\x01 \x01(\t\x12\r\n\x05\x65poch\x18\x02 \x01(\x03\x12\x0c\n\x04step\x18\x03 \x01(\x03\x42\xc8\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\nModelProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n&google/cloud/aiplatform/v1/model.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/aiplatform/v1/deployed_model_ref.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\x16\n\x05Model\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\nversion_id\x18\x1c \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12\x17\n\x0fversion_aliases\x18\x1d \x03(\t\x12<\n\x13version_create_time\x18\x1f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13version_update_time\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1b\n\x13version_description\x18\x1e \x01(\t\x12\x1d\n\x15\x64\x65\x66\x61ult_checkpoint_id\x18\x35 \x01(\t\x12\x45\n\x10predict_schemata\x18\x04 \x01(\x0b\x32+.google.cloud.aiplatform.v1.PredictSchemata\x12 \n\x13metadata_schema_uri\x18\x05 \x01(\tB\x03\xe0\x41\x05\x12-\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x05\x12U\n\x18supported_export_formats\x18\x14 \x03(\x0b\x32..google.cloud.aiplatform.v1.Model.ExportFormatB\x03\xe0\x41\x03\x12M\n\x11training_pipeline\x18\x07 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*aiplatform.googleapis.com/TrainingPipeline\x12\x43\n\x0cpipeline_job\x18/ \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%aiplatform.googleapis.com/PipelineJob\x12K\n\x0e\x63ontainer_spec\x18\t \x01(\x0b\x32..google.cloud.aiplatform.v1.ModelContainerSpecB\x03\xe0\x41\x04\x12\x19\n\x0c\x61rtifact_uri\x18\x1a \x01(\tB\x03\xe0\x41\x05\x12l\n$supported_deployment_resources_types\x18\n \x03(\x0e\x32\x39.google.cloud.aiplatform.v1.Model.DeploymentResourcesTypeB\x03\xe0\x41\x03\x12,\n\x1fsupported_input_storage_formats\x18\x0b \x03(\tB\x03\xe0\x41\x03\x12-\n supported_output_storage_formats\x18\x0c \x03(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x0f\x64\x65ployed_models\x18\x0f \x03(\x0b\x32,.google.cloud.aiplatform.v1.DeployedModelRefB\x03\xe0\x41\x03\x12\x45\n\x10\x65xplanation_spec\x18\x17 \x01(\x0b\x32+.google.cloud.aiplatform.v1.ExplanationSpec\x12\x0c\n\x04\x65tag\x18\x10 \x01(\t\x12=\n\x06labels\x18\x11 \x03(\x0b\x32-.google.cloud.aiplatform.v1.Model.LabelsEntry\x12?\n\ndata_stats\x18\x15 \x01(\x0b\x32+.google.cloud.aiplatform.v1.Model.DataStats\x12\x43\n\x0f\x65ncryption_spec\x18\x18 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12K\n\x11model_source_info\x18& \x01(\x0b\x32+.google.cloud.aiplatform.v1.ModelSourceInfoB\x03\xe0\x41\x03\x12U\n\x13original_model_info\x18\" \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.Model.OriginalModelInfoB\x03\xe0\x41\x03\x12\x1e\n\x11metadata_artifact\x18, \x01(\tB\x03\xe0\x41\x03\x12Q\n\x11\x62\x61se_model_source\x18\x32 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.Model.BaseModelSourceB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x33 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x34 \x01(\x08\x42\x03\xe0\x41\x03\x12\x43\n\x0b\x63heckpoints\x18\x39 \x03(\x0b\x32&.google.cloud.aiplatform.v1.CheckpointB\x06\xe0\x41\x03\xe0\x41\x01\x1a\xd5\x01\n\x0c\x45xportFormat\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x13\x65xportable_contents\x18\x02 \x03(\x0e\x32@.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContentB\x03\xe0\x41\x03\"P\n\x11\x45xportableContent\x12\"\n\x1e\x45XPORTABLE_CONTENT_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41RTIFACT\x10\x01\x12\t\n\x05IMAGE\x10\x02\x1a\xdc\x01\n\tDataStats\x12!\n\x19training_data_items_count\x18\x01 \x01(\x03\x12#\n\x1bvalidation_data_items_count\x18\x02 \x01(\x03\x12\x1d\n\x15test_data_items_count\x18\x03 \x01(\x03\x12\"\n\x1atraining_annotations_count\x18\x04 \x01(\x03\x12$\n\x1cvalidation_annotations_count\x18\x05 \x01(\x03\x12\x1e\n\x16test_annotations_count\x18\x06 \x01(\x03\x1aK\n\x11OriginalModelInfo\x12\x36\n\x05model\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x1a\xaa\x01\n\x0f\x42\x61seModelSource\x12L\n\x13model_garden_source\x18\x01 \x01(\x0b\x32-.google.cloud.aiplatform.v1.ModelGardenSourceH\x00\x12?\n\x0cgenie_source\x18\x02 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.GenieSourceH\x00\x42\x08\n\x06source\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8c\x01\n\x17\x44\x65ploymentResourcesType\x12)\n%DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44\x45\x44ICATED_RESOURCES\x10\x01\x12\x17\n\x13\x41UTOMATIC_RESOURCES\x10\x02\x12\x14\n\x10SHARED_RESOURCES\x10\x03:\\\xea\x41Y\n\x1f\x61iplatform.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}\"(\n\x13LargeModelReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"n\n\x11ModelGardenSource\x12\x1e\n\x11public_model_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nversion_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13skip_hf_model_cache\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"*\n\x0bGenieSource\x12\x1b\n\x0e\x62\x61se_model_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"{\n\x0fPredictSchemata\x12 \n\x13instance_schema_uri\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\"\n\x15parameters_schema_uri\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\"\n\x15prediction_schema_uri\x18\x03 \x01(\tB\x03\xe0\x41\x05\"\xf5\x04\n\x12ModelContainerSpec\x12\x19\n\timage_uri\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x14\n\x07\x63ommand\x18\x02 \x03(\tB\x03\xe0\x41\x05\x12\x11\n\x04\x61rgs\x18\x03 \x03(\tB\x03\xe0\x41\x05\x12\x34\n\x03\x65nv\x18\x04 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVarB\x03\xe0\x41\x05\x12\x34\n\x05ports\x18\x05 \x03(\x0b\x32 .google.cloud.aiplatform.v1.PortB\x03\xe0\x41\x05\x12\x1a\n\rpredict_route\x18\x06 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0chealth_route\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12 \n\x13invoke_route_prefix\x18\x0f \x01(\tB\x03\xe0\x41\x05\x12\x39\n\ngrpc_ports\x18\t \x03(\x0b\x32 .google.cloud.aiplatform.v1.PortB\x03\xe0\x41\x05\x12:\n\x12\x64\x65ployment_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x05\x12\"\n\x15shared_memory_size_mb\x18\x0b \x01(\x03\x42\x03\xe0\x41\x05\x12=\n\rstartup_probe\x18\x0c \x01(\x0b\x32!.google.cloud.aiplatform.v1.ProbeB\x03\xe0\x41\x05\x12<\n\x0chealth_probe\x18\r \x01(\x0b\x32!.google.cloud.aiplatform.v1.ProbeB\x03\xe0\x41\x05\x12>\n\x0eliveness_probe\x18\x0e \x01(\x0b\x32!.google.cloud.aiplatform.v1.ProbeB\x03\xe0\x41\x05\"\x1e\n\x04Port\x12\x16\n\x0e\x63ontainer_port\x18\x03 \x01(\x05\"\x93\x02\n\x0fModelSourceInfo\x12P\n\x0bsource_type\x18\x01 \x01(\x0e\x32;.google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType\x12\x0c\n\x04\x63opy\x18\x02 \x01(\x08\"\x9f\x01\n\x0fModelSourceType\x12!\n\x1dMODEL_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41UTOML\x10\x01\x12\n\n\x06\x43USTOM\x10\x02\x12\x08\n\x04\x42QML\x10\x03\x12\x10\n\x0cMODEL_GARDEN\x10\x04\x12\t\n\x05GENIE\x10\x05\x12\x19\n\x15\x43USTOM_TEXT_EMBEDDING\x10\x06\x12\x0f\n\x0bMARKETPLACE\x10\x07\"\xdb\x05\n\x05Probe\x12<\n\x04\x65xec\x18\x01 \x01(\x0b\x32,.google.cloud.aiplatform.v1.Probe.ExecActionH\x00\x12\x43\n\x08http_get\x18\x04 \x01(\x0b\x32/.google.cloud.aiplatform.v1.Probe.HttpGetActionH\x00\x12<\n\x04grpc\x18\x05 \x01(\x0b\x32,.google.cloud.aiplatform.v1.Probe.GrpcActionH\x00\x12G\n\ntcp_socket\x18\x06 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.Probe.TcpSocketActionH\x00\x12\x16\n\x0eperiod_seconds\x18\x02 \x01(\x05\x12\x17\n\x0ftimeout_seconds\x18\x03 \x01(\x05\x12\x19\n\x11\x66\x61ilure_threshold\x18\x07 \x01(\x05\x12\x19\n\x11success_threshold\x18\x08 \x01(\x05\x12\x1d\n\x15initial_delay_seconds\x18\t \x01(\x05\x1a\x1d\n\nExecAction\x12\x0f\n\x07\x63ommand\x18\x01 \x03(\t\x1a\x8d\x01\n\rHttpGetAction\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x0e\n\x06scheme\x18\x04 \x01(\t\x12\x42\n\x0chttp_headers\x18\x05 \x03(\x0b\x32,.google.cloud.aiplatform.v1.Probe.HttpHeader\x1a+\n\nGrpcAction\x12\x0c\n\x04port\x18\x01 \x01(\x05\x12\x0f\n\x07service\x18\x02 \x01(\t\x1a-\n\x0fTcpSocketAction\x12\x0c\n\x04port\x18\x01 \x01(\x05\x12\x0c\n\x04host\x18\x02 \x01(\t\x1a)\n\nHttpHeader\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\x0c\n\nprobe_type\"@\n\nCheckpoint\x12\x15\n\rcheckpoint_id\x18\x01 \x01(\t\x12\r\n\x05\x65poch\x18\x02 \x01(\x03\x12\x0c\n\x04step\x18\x03 \x01(\x03\x42\xc8\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\nModelProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model.rb index 5d2196000dcb..da58ed2e5d31 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model.rb @@ -763,6 +763,16 @@ class PredictSchemata # (Vertex AI makes this value available to your container code as the # [`AIP_DEPLOYED_MODEL_ID` environment # variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + # @!attribute [rw] invoke_route_prefix + # @return [::String] + # Immutable. Invoke route prefix for the custom container. "/*" is the only + # supported value right now. By setting this field, any non-root route on + # this model will be accessible with invoke http call eg: "/invoke/foo/bar", + # however the [PredictionService.Invoke] RPC is not supported yet. + # + # Only one of `predict_route` or `invoke_route_prefix` can be set, and we + # default to using `predict_route` if this field is not set. If this field + # is set, the Model can only be deployed to dedicated endpoint. # @!attribute [rw] grpc_ports # @return [::Array<::Google::Cloud::AIPlatform::V1::Port>] # Immutable. List of ports to expose from the container. Vertex AI sends gRPC From 939adfbee9101ec57eac8f804ef0bcd810735e58 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 11:59:35 -0700 Subject: [PATCH 167/457] chore(main): release google-cloud-retail-v2 2.3.0 (#30573) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-retail-v2 2.3.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-retail-v2/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/retail/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.retail.v2.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 436bc75c2c68..7c8a1074e1f8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -641,7 +641,7 @@ "google-cloud-resource_manager-v3+FILLER": "0.0.0", "google-cloud-retail": "2.0.1", "google-cloud-retail+FILLER": "0.0.0", - "google-cloud-retail-v2": "2.2.0", + "google-cloud-retail-v2": "2.3.0", "google-cloud-retail-v2+FILLER": "0.0.0", "google-cloud-run-client": "1.4.1", "google-cloud-run-client+FILLER": "0.0.0", diff --git a/google-cloud-retail-v2/CHANGELOG.md b/google-cloud-retail-v2/CHANGELOG.md index 913466c42501..922ca1b5fecf 100644 --- a/google-cloud-retail-v2/CHANGELOG.md +++ b/google-cloud-retail-v2/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +### 2.3.0 (2025-06-26) + +#### Features + +* Support model quality scores in search results +* Support user attributes for personalizing search results + ### 2.2.0 (2025-05-12) #### Features diff --git a/google-cloud-retail-v2/lib/google/cloud/retail/v2/version.rb b/google-cloud-retail-v2/lib/google/cloud/retail/v2/version.rb index d8a147dea8cd..a3cdda740088 100644 --- a/google-cloud-retail-v2/lib/google/cloud/retail/v2/version.rb +++ b/google-cloud-retail-v2/lib/google/cloud/retail/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Retail module V2 - VERSION = "2.2.0" + VERSION = "2.3.0" end end end diff --git a/google-cloud-retail-v2/snippets/snippet_metadata_google.cloud.retail.v2.json b/google-cloud-retail-v2/snippets/snippet_metadata_google.cloud.retail.v2.json index 2651f6322541..0ec1c882e3c2 100644 --- a/google-cloud-retail-v2/snippets/snippet_metadata_google.cloud.retail.v2.json +++ b/google-cloud-retail-v2/snippets/snippet_metadata_google.cloud.retail.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-retail-v2", - "version": "2.2.0", + "version": "2.3.0", "language": "RUBY", "apis": [ { From 2d6ab53c34dacabf0e6fd2afc94531122be61af6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 11:59:55 -0700 Subject: [PATCH 168/457] chore(main): release google-shopping-merchant-issue_resolution 0.2.0 (#30571) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-shopping-merchant-issue_resolution/CHANGELOG.md | 6 ++++++ .../google/shopping/merchant/issue_resolution/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7c8a1074e1f8..abc68f59cb88 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -917,7 +917,7 @@ "google-shopping-merchant-inventories+FILLER": "0.0.0", "google-shopping-merchant-inventories-v1beta": "0.7.0", "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", - "google-shopping-merchant-issue_resolution": "0.1.0", + "google-shopping-merchant-issue_resolution": "0.2.0", "google-shopping-merchant-issue_resolution+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution-v1beta": "0.2.0", "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-issue_resolution/CHANGELOG.md b/google-shopping-merchant-issue_resolution/CHANGELOG.md index 46e151964f5c..02da33394f6f 100644 --- a/google-shopping-merchant-issue_resolution/CHANGELOG.md +++ b/google-shopping-merchant-issue_resolution/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.2.0 (2025-06-26) + +#### Features + +* Support for AggregateProductStatusesService ([#30500](https://github.com/googleapis/google-cloud-ruby/issues/30500)) + ### 0.1.0 (2025-05-27) #### Features diff --git a/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb index 508a3660bbb6..8a6c36120f26 100644 --- a/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb +++ b/google-shopping-merchant-issue_resolution/lib/google/shopping/merchant/issue_resolution/version.rb @@ -21,7 +21,7 @@ module Google module Shopping module Merchant module IssueResolution - VERSION = "0.1.0" + VERSION = "0.2.0" end end end From a69764287a6d75018027505ae38ec97069c973f1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:56:28 -0700 Subject: [PATCH 169/457] feat(pubsub-v1): Support for message_transformation_failure_reason (#30574) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 776198381 Source-Link: https://github.com/googleapis/googleapis/commit/ade5fe46aa5b7296887cd5aedbe8d35a243f6579 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2e304e499d0b4996a35bdc65d876e4b21b265937 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXB1YnN1Yi12MS8uT3dsQm90LnlhbWwiLCJoIjoiMmUzMDRlNDk5ZDBiNDk5NmEzNWJkYzY1ZDg3NmU0YjIxYjI2NTkzNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/pubsub/v1/pubsub_pb.rb | 3 +- .../proto_docs/google/pubsub/v1/pubsub.rb | 61 +++++++++++++++---- 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_pb.rb b/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_pb.rb index 531699226546..ca2d4b3101b5 100644 --- a/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_pb.rb +++ b/google-cloud-pubsub-v1/lib/google/pubsub/v1/pubsub_pb.rb @@ -15,7 +15,7 @@ require 'google/pubsub/v1/schema_pb' -descriptor_data = "\n\x1dgoogle/pubsub/v1/pubsub.proto\x12\x10google.pubsub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1dgoogle/pubsub/v1/schema.proto\"a\n\x14MessageStoragePolicy\x12(\n\x1b\x61llowed_persistence_regions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x65nforce_in_transit\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x01\n\x0eSchemaSettings\x12\x34\n\x06schema\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12\x31\n\x08\x65ncoding\x18\x02 \x01(\x0e\x32\x1a.google.pubsub.v1.EncodingB\x03\xe0\x41\x01\x12\x1e\n\x11\x66irst_revision_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10last_revision_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc8\x17\n\x1bIngestionDataSourceSettings\x12T\n\x0b\x61ws_kinesis\x18\x01 \x01(\x0b\x32\x38.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisB\x03\xe0\x41\x01H\x00\x12X\n\rcloud_storage\x18\x02 \x01(\x0b\x32:.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageB\x03\xe0\x41\x01H\x00\x12]\n\x10\x61zure_event_hubs\x18\x03 \x01(\x0b\x32<.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsB\x03\xe0\x41\x01H\x00\x12L\n\x07\x61ws_msk\x18\x05 \x01(\x0b\x32\x34.google.pubsub.v1.IngestionDataSourceSettings.AwsMskB\x03\xe0\x41\x01H\x00\x12\\\n\x0f\x63onfluent_cloud\x18\x06 \x01(\x0b\x32<.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudB\x03\xe0\x41\x01H\x00\x12K\n\x16platform_logs_settings\x18\x04 \x01(\x0b\x32&.google.pubsub.v1.PlatformLogsSettingsB\x03\xe0\x41\x01\x1a\xea\x02\n\nAwsKinesis\x12R\n\x05state\x18\x01 \x01(\x0e\x32>.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.StateB\x03\xe0\x41\x03\x12\x17\n\nstream_arn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63onsumer_arn\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61ws_role_arn\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\"\x96\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x1d\n\x19KINESIS_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x14\n\x10STREAM_NOT_FOUND\x10\x04\x12\x16\n\x12\x43ONSUMER_NOT_FOUND\x10\x05\x1a\x95\x06\n\x0c\x43loudStorage\x12T\n\x05state\x18\x01 \x01(\x0e\x32@.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.StateB\x03\xe0\x41\x03\x12\x13\n\x06\x62ucket\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x0btext_format\x18\x03 \x01(\x0b\x32\x45.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatB\x03\xe0\x41\x01H\x00\x12\x61\n\x0b\x61vro_format\x18\x04 \x01(\x0b\x32\x45.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatB\x03\xe0\x41\x01H\x00\x12n\n\x12pubsub_avro_format\x18\x05 \x01(\x0b\x32K.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormatB\x03\xe0\x41\x01H\x00\x12\x43\n\x1aminimum_object_create_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x17\n\nmatch_glob\x18\t \x01(\tB\x03\xe0\x41\x01\x1a\x37\n\nTextFormat\x12\x1b\n\tdelimiter\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_delimiter\x1a\x0c\n\nAvroFormat\x1a\x12\n\x10PubSubAvroFormat\"\x9a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12#\n\x1f\x43LOUD_STORAGE_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x14\n\x10\x42UCKET_NOT_FOUND\x10\x04\x12\x14\n\x10TOO_MANY_OBJECTS\x10\x05\x42\x0e\n\x0cinput_format\x1a\xff\x03\n\x0e\x41zureEventHubs\x12V\n\x05state\x18\x01 \x01(\x0e\x32\x42.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.StateB\x03\xe0\x41\x03\x12\x1b\n\x0eresource_group\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tnamespace\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tevent_hub\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tclient_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttenant_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsubscription_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13gcp_service_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\"\xd7\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12 \n\x1c\x45VENT_HUBS_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x17\n\x13NAMESPACE_NOT_FOUND\x10\x04\x12\x17\n\x13\x45VENT_HUB_NOT_FOUND\x10\x05\x12\x1a\n\x16SUBSCRIPTION_NOT_FOUND\x10\x06\x12\x1c\n\x18RESOURCE_GROUP_NOT_FOUND\x10\x07\x1a\xd6\x02\n\x06\x41wsMsk\x12N\n\x05state\x18\x01 \x01(\x0e\x32:.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.StateB\x03\xe0\x41\x03\x12\x18\n\x0b\x63luster_arn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05topic\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61ws_role_arn\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\"\x90\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x19\n\x15MSK_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x15\n\x11\x43LUSTER_NOT_FOUND\x10\x04\x12\x13\n\x0fTOPIC_NOT_FOUND\x10\x05\x1a\xb6\x03\n\x0e\x43onfluentCloud\x12V\n\x05state\x18\x01 \x01(\x0e\x32\x42.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.StateB\x03\xe0\x41\x03\x12\x1d\n\x10\x62ootstrap_server\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05topic\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10identity_pool_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x06 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12%\n!CONFLUENT_CLOUD_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12 \n\x1cUNREACHABLE_BOOTSTRAP_SERVER\x10\x04\x12\x15\n\x11\x43LUSTER_NOT_FOUND\x10\x05\x12\x13\n\x0fTOPIC_NOT_FOUND\x10\x06\x42\x08\n\x06source\"\xbf\x01\n\x14PlatformLogsSettings\x12\x46\n\x08severity\x18\x01 \x01(\x0e\x32/.google.pubsub.v1.PlatformLogsSettings.SeverityB\x03\xe0\x41\x01\"_\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x0b\n\x07WARNING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\"\x83\x12\n\x15IngestionFailureEvent\x12\x12\n\x05topic\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x15\x63loud_storage_failure\x18\x03 \x01(\x0b\x32;.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureB\x03\xe0\x41\x01H\x00\x12[\n\x0f\x61ws_msk_failure\x18\x04 \x01(\x0b\x32;.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonB\x03\xe0\x41\x01H\x00\x12l\n\x18\x61zure_event_hubs_failure\x18\x05 \x01(\x0b\x32\x43.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonB\x03\xe0\x41\x01H\x00\x12k\n\x17\x63onfluent_cloud_failure\x18\x06 \x01(\x0b\x32\x43.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonB\x03\xe0\x41\x01H\x00\x12\x63\n\x13\x61ws_kinesis_failure\x18\x07 \x01(\x0b\x32?.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonB\x03\xe0\x41\x01H\x00\x1a\x14\n\x12\x41piViolationReason\x1a\x13\n\x11\x41vroFailureReason\x1a\x17\n\x15SchemaViolationReason\x1a\x95\x03\n\x13\x43loudStorageFailure\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bobject_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11object_generation\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12]\n\x13\x61vro_failure_reason\x18\x05 \x01(\x0b\x32\x39.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonB\x03\xe0\x41\x01H\x00\x12_\n\x14\x61pi_violation_reason\x18\x06 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x07 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xcb\x02\n\x13\x41wsMskFailureReason\x12\x18\n\x0b\x63luster_arn\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkafka_topic\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xcf\x02\n\x1b\x41zureEventHubsFailureReason\x12\x16\n\tnamespace\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tevent_hub\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xd2\x02\n\x1b\x43onfluentCloudFailureReason\x12\x17\n\ncluster_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkafka_topic\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xdd\x01\n\x17\x41wsKinesisFailureReason\x12\x17\n\nstream_arn\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rpartition_key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsequence_number\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x65\n\x17schema_violation_reason\x18\x04 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reasonB\t\n\x07\x66\x61ilure\">\n\rJavaScriptUDF\x12\x1a\n\rfunction_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x8e\x01\n\x10MessageTransform\x12>\n\x0ejavascript_udf\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.JavaScriptUDFB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0b\n\ttransform\"\x8e\x06\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x06labels\x18\x02 \x03(\x0b\x32#.google.pubsub.v1.Topic.LabelsEntryB\x03\xe0\x41\x01\x12K\n\x16message_storage_policy\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.MessageStoragePolicyB\x03\xe0\x41\x01\x12\x19\n\x0ckms_key_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12>\n\x0fschema_settings\x18\x06 \x01(\x0b\x32 .google.pubsub.v1.SchemaSettingsB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x31\n\x05state\x18\t \x01(\x0e\x32\x1d.google.pubsub.v1.Topic.StateB\x03\xe0\x41\x03\x12Z\n\x1eingestion_data_source_settings\x18\n \x01(\x0b\x32-.google.pubsub.v1.IngestionDataSourceSettingsB\x03\xe0\x41\x01\x12\x43\n\x12message_transforms\x18\r \x03(\x0b\x32\".google.pubsub.v1.MessageTransformB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x1c\n\x18INGESTION_RESOURCE_ERROR\x10\x02:c\xea\x41`\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\x12\x0f_deleted-topic_*\x06topics2\x05topic\"\x80\x02\n\rPubsubMessage\x12\x11\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\nattributes\x18\x02 \x03(\x0b\x32/.google.pubsub.v1.PubsubMessage.AttributesEntryB\x03\xe0\x41\x01\x12\x12\n\nmessage_id\x18\x03 \x01(\t\x12\x30\n\x0cpublish_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x0cordering_key\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\x0fGetTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\"w\n\x12UpdateTopicRequest\x12+\n\x05topic\x18\x01 \x01(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"|\n\x0ePublishRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x02\"+\n\x0fPublishResponse\x12\x18\n\x0bmessage_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x11ListTopicsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"`\n\x12ListTopicsResponse\x12,\n\x06topics\x18\x01 \x03(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x1dListTopicSubscriptionsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x1eListTopicSubscriptionsResponse\x12\x41\n\rsubscriptions\x18\x01 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListTopicSnapshotsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"R\n\x1aListTopicSnapshotsResponse\x12\x16\n\tsnapshots\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"H\n\x12\x44\x65leteTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\"]\n\x19\x44\x65tachSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x1c\n\x1a\x44\x65tachSubscriptionResponse\"\x8d\x0b\n\x0cSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x01\x12>\n\x0f\x62igquery_config\x18\x12 \x01(\x0b\x32 .google.pubsub.v1.BigQueryConfigB\x03\xe0\x41\x01\x12G\n\x14\x63loud_storage_config\x18\x16 \x01(\x0b\x32$.google.pubsub.v1.CloudStorageConfigB\x03\xe0\x41\x01\x12!\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x15retain_acked_messages\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12?\n\x06labels\x18\t \x03(\x0b\x32*.google.pubsub.v1.Subscription.LabelsEntryB\x03\xe0\x41\x01\x12$\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\".google.pubsub.v1.ExpirationPolicyB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32\".google.pubsub.v1.DeadLetterPolicyB\x03\xe0\x41\x01\x12\x38\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x1d.google.pubsub.v1.RetryPolicyB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65tached\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_exactly_once_delivery\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12H\n topic_message_retention_duration\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x38\n\x05state\x18\x13 \x01(\x0e\x32$.google.pubsub.v1.Subscription.StateB\x03\xe0\x41\x03\x12i\n\x1f\x61nalytics_hub_subscription_info\x18\x17 \x01(\x0b\x32;.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoB\x03\xe0\x41\x03\x12\x43\n\x12message_transforms\x18\x19 \x03(\x0b\x32\".google.pubsub.v1.MessageTransformB\x03\xe0\x41\x01\x1aO\n\x1c\x41nalyticsHubSubscriptionInfo\x12\x14\n\x07listing\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0csubscription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x12\n\x0eRESOURCE_ERROR\x10\x02:u\xea\x41r\n\"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}*\rsubscriptions2\x0csubscription\"\x7f\n\x0bRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"V\n\x10\x44\x65\x61\x64LetterPolicy\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15max_delivery_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"?\n\x10\x45xpirationPolicy\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\x9a\x04\n\nPushConfig\x12\x1a\n\rpush_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\nattributes\x18\x02 \x03(\x0b\x32,.google.pubsub.v1.PushConfig.AttributesEntryB\x03\xe0\x41\x01\x12\x41\n\noidc_token\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12I\n\x0epubsub_wrapper\x18\x04 \x01(\x0b\x32*.google.pubsub.v1.PushConfig.PubsubWrapperB\x03\xe0\x41\x01H\x01\x12\x41\n\nno_wrapper\x18\x05 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.NoWrapperB\x03\xe0\x41\x01H\x01\x1a\x46\n\tOidcToken\x12\"\n\x15service_account_email\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x0f\n\rPubsubWrapper\x1a(\n\tNoWrapper\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_methodB\t\n\x07wrapper\"\x8e\x03\n\x0e\x42igQueryConfig\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0ewrite_metadata\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x64rop_unknown_fields\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12:\n\x05state\x18\x05 \x01(\x0e\x32&.google.pubsub.v1.BigQueryConfig.StateB\x03\xe0\x41\x03\x12\x1d\n\x10use_table_schema\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12\x13\n\x0fSCHEMA_MISMATCH\x10\x04\x12#\n\x1fIN_TRANSIT_LOCATION_RESTRICTION\x10\x05\"\xe9\x05\n\x12\x43loudStorageConfig\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x66ilename_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66ilename_suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66ilename_datetime_format\x18\n \x01(\tB\x03\xe0\x41\x01\x12K\n\x0btext_config\x18\x04 \x01(\x0b\x32/.google.pubsub.v1.CloudStorageConfig.TextConfigB\x03\xe0\x41\x01H\x00\x12K\n\x0b\x61vro_config\x18\x05 \x01(\x0b\x32/.google.pubsub.v1.CloudStorageConfig.AvroConfigB\x03\xe0\x41\x01H\x00\x12\x34\n\x0cmax_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tmax_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12>\n\x05state\x18\t \x01(\x0e\x32*.google.pubsub.v1.CloudStorageConfig.StateB\x03\xe0\x41\x03\x12\"\n\x15service_account_email\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1a\x0c\n\nTextConfig\x1aH\n\nAvroConfig\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12#\n\x1fIN_TRANSIT_LOCATION_RESTRICTION\x10\x04\x12\x13\n\x0fSCHEMA_MISMATCH\x10\x05\x42\x0f\n\routput_format\"|\n\x0fReceivedMessage\x12\x13\n\x06\x61\x63k_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\x07message\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65livery_attempt\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"Z\n\x16GetSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x8c\x01\n\x19UpdateSubscriptionRequest\x12\x39\n\x0csubscription\x18\x01 \x01(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x91\x01\n\x18ListSubscriptionsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"u\n\x19ListSubscriptionsResponse\x12:\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"]\n\x19\x44\x65leteSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x93\x01\n\x17ModifyPushConfigRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x36\n\x0bpush_config\x18\x02 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x02\"\x8d\x01\n\x0bPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12!\n\x12return_immediately\x18\x02 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"Q\n\x0cPullResponse\x12\x41\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessageB\x03\xe0\x41\x01\"\x95\x01\n\x18ModifyAckDeadlineRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14\x61\x63k_deadline_seconds\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"l\n\x12\x41\x63knowledgeRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\xc7\x02\n\x14StreamingPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17modify_deadline_seconds\x18\x03 \x03(\x05\x42\x03\xe0\x41\x01\x12$\n\x17modify_deadline_ack_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12(\n\x1bstream_ack_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x16\n\tclient_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18max_outstanding_messages\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\"\n\x15max_outstanding_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\"\x9e\x06\n\x15StreamingPullResponse\x12\x41\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessageB\x03\xe0\x41\x01\x12\x66\n\x18\x61\x63knowledge_confirmation\x18\x05 \x01(\x0b\x32?.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationB\x03\xe0\x41\x01\x12t\n modify_ack_deadline_confirmation\x18\x03 \x01(\x0b\x32\x45.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationB\x03\xe0\x41\x01\x12\x64\n\x17subscription_properties\x18\x04 \x01(\x0b\x32>.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesB\x03\xe0\x41\x01\x1a\x94\x01\n\x17\x41\x63knowledgeConfirmation\x12\x14\n\x07\x61\x63k_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0finvalid_ack_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11unordered_ack_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12%\n\x18temporary_failed_ack_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01\x1az\n\x1dModifyAckDeadlineConfirmation\x12\x14\n\x07\x61\x63k_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0finvalid_ack_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12%\n\x18temporary_failed_ack_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1ak\n\x16SubscriptionProperties\x12*\n\x1d\x65xactly_once_delivery_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12%\n\x18message_ordering_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x02\n\x15\x43reateSnapshotRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\x12@\n\x0csubscription\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12H\n\x06labels\x18\x03 \x03(\x0b\x32\x33.google.pubsub.v1.CreateSnapshotRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\x15UpdateSnapshotRequest\x12\x31\n\x08snapshot\x18\x01 \x01(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xd6\x02\n\x08Snapshot\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x34\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12;\n\x06labels\x18\x04 \x03(\x0b\x32&.google.pubsub.v1.Snapshot.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:a\xea\x41^\n\x1epubsub.googleapis.com/Snapshot\x12\'projects/{project}/snapshots/{snapshot}*\tsnapshots2\x08snapshot\"N\n\x12GetSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\"\x8d\x01\n\x14ListSnapshotsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"i\n\x15ListSnapshotsResponse\x12\x32\n\tsnapshots\x18\x01 \x03(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Q\n\x15\x44\x65leteSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\"\xc6\x01\n\x0bSeekRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12/\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12:\n\x08snapshot\x18\x03 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1epubsub.googleapis.com/SnapshotH\x00\x42\x08\n\x06target\"\x0e\n\x0cSeekResponse2\xb8\x0b\n\tPublisher\x12q\n\x0b\x43reateTopic\x12\x17.google.pubsub.v1.Topic\x1a\x17.google.pubsub.v1.Topic\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x1a\x1e/v1/{name=projects/*/topics/*}:\x01*\x12\x91\x01\n\x0bUpdateTopic\x12$.google.pubsub.v1.UpdateTopicRequest\x1a\x17.google.pubsub.v1.Topic\"C\xda\x41\x11topic,update_mask\x82\xd3\xe4\x93\x02)2$/v1/{topic.name=projects/*/topics/*}:\x01*\x12\x93\x01\n\x07Publish\x12 .google.pubsub.v1.PublishRequest\x1a!.google.pubsub.v1.PublishResponse\"C\xda\x41\x0etopic,messages\x82\xd3\xe4\x93\x02,\"\'/v1/{topic=projects/*/topics/*}:publish:\x01*\x12w\n\x08GetTopic\x12!.google.pubsub.v1.GetTopicRequest\x1a\x17.google.pubsub.v1.Topic\"/\xda\x41\x05topic\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{topic=projects/*/topics/*}\x12\x8a\x01\n\nListTopics\x12#.google.pubsub.v1.ListTopicsRequest\x1a$.google.pubsub.v1.ListTopicsResponse\"1\xda\x41\x07project\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{project=projects/*}/topics\x12\xba\x01\n\x16ListTopicSubscriptions\x12/.google.pubsub.v1.ListTopicSubscriptionsRequest\x1a\x30.google.pubsub.v1.ListTopicSubscriptionsResponse\"=\xda\x41\x05topic\x82\xd3\xe4\x93\x02/\x12-/v1/{topic=projects/*/topics/*}/subscriptions\x12\xaa\x01\n\x12ListTopicSnapshots\x12+.google.pubsub.v1.ListTopicSnapshotsRequest\x1a,.google.pubsub.v1.ListTopicSnapshotsResponse\"9\xda\x41\x05topic\x82\xd3\xe4\x93\x02+\x12)/v1/{topic=projects/*/topics/*}/snapshots\x12|\n\x0b\x44\x65leteTopic\x12$.google.pubsub.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty\"/\xda\x41\x05topic\x82\xd3\xe4\x93\x02!*\x1f/v1/{topic=projects/*/topics/*}\x12\xad\x01\n\x12\x44\x65tachSubscription\x12+.google.pubsub.v1.DetachSubscriptionRequest\x1a,.google.pubsub.v1.DetachSubscriptionResponse\"<\x82\xd3\xe4\x93\x02\x36\"4/v1/{subscription=projects/*/subscriptions/*}:detach\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsub2\xd2\x15\n\nSubscriber\x12\xb4\x01\n\x12\x43reateSubscription\x12\x1e.google.pubsub.v1.Subscription\x1a\x1e.google.pubsub.v1.Subscription\"^\xda\x41+name,topic,push_config,ack_deadline_seconds\x82\xd3\xe4\x93\x02*\x1a%/v1/{name=projects/*/subscriptions/*}:\x01*\x12\xa1\x01\n\x0fGetSubscription\x12(.google.pubsub.v1.GetSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"D\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02/\x12-/v1/{subscription=projects/*/subscriptions/*}\x12\xbb\x01\n\x12UpdateSubscription\x12+.google.pubsub.v1.UpdateSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"X\xda\x41\x18subscription,update_mask\x82\xd3\xe4\x93\x02\x37\x32\x32/v1/{subscription.name=projects/*/subscriptions/*}:\x01*\x12\xa6\x01\n\x11ListSubscriptions\x12*.google.pubsub.v1.ListSubscriptionsRequest\x1a+.google.pubsub.v1.ListSubscriptionsResponse\"8\xda\x41\x07project\x82\xd3\xe4\x93\x02(\x12&/v1/{project=projects/*}/subscriptions\x12\x9f\x01\n\x12\x44\x65leteSubscription\x12+.google.pubsub.v1.DeleteSubscriptionRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02/*-/v1/{subscription=projects/*/subscriptions/*}\x12\xcf\x01\n\x11ModifyAckDeadline\x12*.google.pubsub.v1.ModifyAckDeadlineRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41)subscription,ack_ids,ack_deadline_seconds\x82\xd3\xe4\x93\x02\x44\"?/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline:\x01*\x12\xa8\x01\n\x0b\x41\x63knowledge\x12$.google.pubsub.v1.AcknowledgeRequest\x1a\x16.google.protobuf.Empty\"[\xda\x41\x14subscription,ack_ids\x82\xd3\xe4\x93\x02>\"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\x01*\x12\xd0\x01\n\x04Pull\x12\x1d.google.pubsub.v1.PullRequest\x1a\x1e.google.pubsub.v1.PullResponse\"\x88\x01\xda\x41,subscription,return_immediately,max_messages\xda\x41\x19subscription,max_messages\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:pull:\x01*\x12\x66\n\rStreamingPull\x12&.google.pubsub.v1.StreamingPullRequest\x1a\'.google.pubsub.v1.StreamingPullResponse\"\x00(\x01\x30\x01\x12\xbb\x01\n\x10ModifyPushConfig\x12).google.pubsub.v1.ModifyPushConfigRequest\x1a\x16.google.protobuf.Empty\"d\xda\x41\x18subscription,push_config\x82\xd3\xe4\x93\x02\x43\">/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig:\x01*\x12\x89\x01\n\x0bGetSnapshot\x12$.google.pubsub.v1.GetSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"8\xda\x41\x08snapshot\x82\xd3\xe4\x93\x02\'\x12%/v1/{snapshot=projects/*/snapshots/*}\x12\x96\x01\n\rListSnapshots\x12&.google.pubsub.v1.ListSnapshotsRequest\x1a\'.google.pubsub.v1.ListSnapshotsResponse\"4\xda\x41\x07project\x82\xd3\xe4\x93\x02$\x12\"/v1/{project=projects/*}/snapshots\x12\x97\x01\n\x0e\x43reateSnapshot\x12\'.google.pubsub.v1.CreateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"@\xda\x41\x11name,subscription\x82\xd3\xe4\x93\x02&\x1a!/v1/{name=projects/*/snapshots/*}:\x01*\x12\xa3\x01\n\x0eUpdateSnapshot\x12\'.google.pubsub.v1.UpdateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"L\xda\x41\x14snapshot,update_mask\x82\xd3\xe4\x93\x02/2*/v1/{snapshot.name=projects/*/snapshots/*}:\x01*\x12\x8b\x01\n\x0e\x44\x65leteSnapshot\x12\'.google.pubsub.v1.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x08snapshot\x82\xd3\xe4\x93\x02\'*%/v1/{snapshot=projects/*/snapshots/*}\x12\x84\x01\n\x04Seek\x12\x1d.google.pubsub.v1.SeekRequest\x1a\x1e.google.pubsub.v1.SeekResponse\"=\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:seek:\x01*\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsubB\xaa\x01\n\x14\x63om.google.pubsub.v1B\x0bPubsubProtoP\x01Z5cloud.google.com/go/pubsub/v2/apiv1/pubsubpb;pubsubpb\xaa\x02\x16Google.Cloud.PubSub.V1\xca\x02\x16Google\\Cloud\\PubSub\\V1\xea\x02\x19Google::Cloud::PubSub::V1b\x06proto3" +descriptor_data = "\n\x1dgoogle/pubsub/v1/pubsub.proto\x12\x10google.pubsub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1dgoogle/pubsub/v1/schema.proto\"a\n\x14MessageStoragePolicy\x12(\n\x1b\x61llowed_persistence_regions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x65nforce_in_transit\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x01\n\x0eSchemaSettings\x12\x34\n\x06schema\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12\x31\n\x08\x65ncoding\x18\x02 \x01(\x0e\x32\x1a.google.pubsub.v1.EncodingB\x03\xe0\x41\x01\x12\x1e\n\x11\x66irst_revision_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10last_revision_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc8\x17\n\x1bIngestionDataSourceSettings\x12T\n\x0b\x61ws_kinesis\x18\x01 \x01(\x0b\x32\x38.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisB\x03\xe0\x41\x01H\x00\x12X\n\rcloud_storage\x18\x02 \x01(\x0b\x32:.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageB\x03\xe0\x41\x01H\x00\x12]\n\x10\x61zure_event_hubs\x18\x03 \x01(\x0b\x32<.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsB\x03\xe0\x41\x01H\x00\x12L\n\x07\x61ws_msk\x18\x05 \x01(\x0b\x32\x34.google.pubsub.v1.IngestionDataSourceSettings.AwsMskB\x03\xe0\x41\x01H\x00\x12\\\n\x0f\x63onfluent_cloud\x18\x06 \x01(\x0b\x32<.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudB\x03\xe0\x41\x01H\x00\x12K\n\x16platform_logs_settings\x18\x04 \x01(\x0b\x32&.google.pubsub.v1.PlatformLogsSettingsB\x03\xe0\x41\x01\x1a\xea\x02\n\nAwsKinesis\x12R\n\x05state\x18\x01 \x01(\x0e\x32>.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.StateB\x03\xe0\x41\x03\x12\x17\n\nstream_arn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63onsumer_arn\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61ws_role_arn\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\"\x96\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x1d\n\x19KINESIS_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x14\n\x10STREAM_NOT_FOUND\x10\x04\x12\x16\n\x12\x43ONSUMER_NOT_FOUND\x10\x05\x1a\x95\x06\n\x0c\x43loudStorage\x12T\n\x05state\x18\x01 \x01(\x0e\x32@.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.StateB\x03\xe0\x41\x03\x12\x13\n\x06\x62ucket\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x0btext_format\x18\x03 \x01(\x0b\x32\x45.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatB\x03\xe0\x41\x01H\x00\x12\x61\n\x0b\x61vro_format\x18\x04 \x01(\x0b\x32\x45.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatB\x03\xe0\x41\x01H\x00\x12n\n\x12pubsub_avro_format\x18\x05 \x01(\x0b\x32K.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormatB\x03\xe0\x41\x01H\x00\x12\x43\n\x1aminimum_object_create_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x17\n\nmatch_glob\x18\t \x01(\tB\x03\xe0\x41\x01\x1a\x37\n\nTextFormat\x12\x1b\n\tdelimiter\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_delimiter\x1a\x0c\n\nAvroFormat\x1a\x12\n\x10PubSubAvroFormat\"\x9a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12#\n\x1f\x43LOUD_STORAGE_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x14\n\x10\x42UCKET_NOT_FOUND\x10\x04\x12\x14\n\x10TOO_MANY_OBJECTS\x10\x05\x42\x0e\n\x0cinput_format\x1a\xff\x03\n\x0e\x41zureEventHubs\x12V\n\x05state\x18\x01 \x01(\x0e\x32\x42.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.StateB\x03\xe0\x41\x03\x12\x1b\n\x0eresource_group\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tnamespace\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tevent_hub\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tclient_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttenant_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsubscription_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13gcp_service_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\"\xd7\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12 \n\x1c\x45VENT_HUBS_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x17\n\x13NAMESPACE_NOT_FOUND\x10\x04\x12\x17\n\x13\x45VENT_HUB_NOT_FOUND\x10\x05\x12\x1a\n\x16SUBSCRIPTION_NOT_FOUND\x10\x06\x12\x1c\n\x18RESOURCE_GROUP_NOT_FOUND\x10\x07\x1a\xd6\x02\n\x06\x41wsMsk\x12N\n\x05state\x18\x01 \x01(\x0e\x32:.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.StateB\x03\xe0\x41\x03\x12\x18\n\x0b\x63luster_arn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05topic\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61ws_role_arn\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\"\x90\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x19\n\x15MSK_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12\x15\n\x11\x43LUSTER_NOT_FOUND\x10\x04\x12\x13\n\x0fTOPIC_NOT_FOUND\x10\x05\x1a\xb6\x03\n\x0e\x43onfluentCloud\x12V\n\x05state\x18\x01 \x01(\x0e\x32\x42.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.StateB\x03\xe0\x41\x03\x12\x1d\n\x10\x62ootstrap_server\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05topic\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10identity_pool_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13gcp_service_account\x18\x06 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12%\n!CONFLUENT_CLOUD_PERMISSION_DENIED\x10\x02\x12\x1d\n\x19PUBLISH_PERMISSION_DENIED\x10\x03\x12 \n\x1cUNREACHABLE_BOOTSTRAP_SERVER\x10\x04\x12\x15\n\x11\x43LUSTER_NOT_FOUND\x10\x05\x12\x13\n\x0fTOPIC_NOT_FOUND\x10\x06\x42\x08\n\x06source\"\xbf\x01\n\x14PlatformLogsSettings\x12\x46\n\x08severity\x18\x01 \x01(\x0e\x32/.google.pubsub.v1.PlatformLogsSettings.SeverityB\x03\xe0\x41\x01\"_\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x0b\n\x07WARNING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\"\xb8\x17\n\x15IngestionFailureEvent\x12\x12\n\x05topic\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x15\x63loud_storage_failure\x18\x03 \x01(\x0b\x32;.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureB\x03\xe0\x41\x01H\x00\x12[\n\x0f\x61ws_msk_failure\x18\x04 \x01(\x0b\x32;.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonB\x03\xe0\x41\x01H\x00\x12l\n\x18\x61zure_event_hubs_failure\x18\x05 \x01(\x0b\x32\x43.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonB\x03\xe0\x41\x01H\x00\x12k\n\x17\x63onfluent_cloud_failure\x18\x06 \x01(\x0b\x32\x43.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonB\x03\xe0\x41\x01H\x00\x12\x63\n\x13\x61ws_kinesis_failure\x18\x07 \x01(\x0b\x32?.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonB\x03\xe0\x41\x01H\x00\x1a\x14\n\x12\x41piViolationReason\x1a\x13\n\x11\x41vroFailureReason\x1a\x17\n\x15SchemaViolationReason\x1a$\n\"MessageTransformationFailureReason\x1a\x98\x04\n\x13\x43loudStorageFailure\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bobject_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11object_generation\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12]\n\x13\x61vro_failure_reason\x18\x05 \x01(\x0b\x32\x39.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonB\x03\xe0\x41\x01H\x00\x12_\n\x14\x61pi_violation_reason\x18\x06 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x07 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x12\x80\x01\n%message_transformation_failure_reason\x18\x08 \x01(\x0b\x32J.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xce\x03\n\x13\x41wsMskFailureReason\x12\x18\n\x0b\x63luster_arn\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkafka_topic\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x12\x80\x01\n%message_transformation_failure_reason\x18\x07 \x01(\x0b\x32J.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xd2\x03\n\x1b\x41zureEventHubsFailureReason\x12\x16\n\tnamespace\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tevent_hub\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x12\x80\x01\n%message_transformation_failure_reason\x18\x07 \x01(\x0b\x32J.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xd5\x03\n\x1b\x43onfluentCloudFailureReason\x12\x17\n\ncluster_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkafka_topic\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cpartition_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x13\n\x06offset\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12_\n\x14\x61pi_violation_reason\x18\x05 \x01(\x0b\x32:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\x03\xe0\x41\x01H\x00\x12\x65\n\x17schema_violation_reason\x18\x06 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x12\x80\x01\n%message_transformation_failure_reason\x18\x07 \x01(\x0b\x32J.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reason\x1a\xe0\x02\n\x17\x41wsKinesisFailureReason\x12\x17\n\nstream_arn\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rpartition_key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsequence_number\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x65\n\x17schema_violation_reason\x18\x04 \x01(\x0b\x32=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\x03\xe0\x41\x01H\x00\x12\x80\x01\n%message_transformation_failure_reason\x18\x05 \x01(\x0b\x32J.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\x03\xe0\x41\x01H\x00\x42\x08\n\x06reasonB\t\n\x07\x66\x61ilure\">\n\rJavaScriptUDF\x12\x1a\n\rfunction_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x8e\x01\n\x10MessageTransform\x12>\n\x0ejavascript_udf\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.JavaScriptUDFB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0b\n\ttransform\"\x8e\x06\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x06labels\x18\x02 \x03(\x0b\x32#.google.pubsub.v1.Topic.LabelsEntryB\x03\xe0\x41\x01\x12K\n\x16message_storage_policy\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.MessageStoragePolicyB\x03\xe0\x41\x01\x12\x19\n\x0ckms_key_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12>\n\x0fschema_settings\x18\x06 \x01(\x0b\x32 .google.pubsub.v1.SchemaSettingsB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x31\n\x05state\x18\t \x01(\x0e\x32\x1d.google.pubsub.v1.Topic.StateB\x03\xe0\x41\x03\x12Z\n\x1eingestion_data_source_settings\x18\n \x01(\x0b\x32-.google.pubsub.v1.IngestionDataSourceSettingsB\x03\xe0\x41\x01\x12\x43\n\x12message_transforms\x18\r \x03(\x0b\x32\".google.pubsub.v1.MessageTransformB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x1c\n\x18INGESTION_RESOURCE_ERROR\x10\x02:c\xea\x41`\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\x12\x0f_deleted-topic_*\x06topics2\x05topic\"\x80\x02\n\rPubsubMessage\x12\x11\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\nattributes\x18\x02 \x03(\x0b\x32/.google.pubsub.v1.PubsubMessage.AttributesEntryB\x03\xe0\x41\x01\x12\x12\n\nmessage_id\x18\x03 \x01(\t\x12\x30\n\x0cpublish_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x0cordering_key\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\x0fGetTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\"w\n\x12UpdateTopicRequest\x12+\n\x05topic\x18\x01 \x01(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"|\n\x0ePublishRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x02\"+\n\x0fPublishResponse\x12\x18\n\x0bmessage_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x11ListTopicsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"`\n\x12ListTopicsResponse\x12,\n\x06topics\x18\x01 \x03(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x1dListTopicSubscriptionsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x1eListTopicSubscriptionsResponse\x12\x41\n\rsubscriptions\x18\x01 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListTopicSnapshotsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"R\n\x1aListTopicSnapshotsResponse\x12\x16\n\tsnapshots\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"H\n\x12\x44\x65leteTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\"]\n\x19\x44\x65tachSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x1c\n\x1a\x44\x65tachSubscriptionResponse\"\x8d\x0b\n\x0cSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x01\x12>\n\x0f\x62igquery_config\x18\x12 \x01(\x0b\x32 .google.pubsub.v1.BigQueryConfigB\x03\xe0\x41\x01\x12G\n\x14\x63loud_storage_config\x18\x16 \x01(\x0b\x32$.google.pubsub.v1.CloudStorageConfigB\x03\xe0\x41\x01\x12!\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x15retain_acked_messages\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12?\n\x06labels\x18\t \x03(\x0b\x32*.google.pubsub.v1.Subscription.LabelsEntryB\x03\xe0\x41\x01\x12$\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\".google.pubsub.v1.ExpirationPolicyB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32\".google.pubsub.v1.DeadLetterPolicyB\x03\xe0\x41\x01\x12\x38\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x1d.google.pubsub.v1.RetryPolicyB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65tached\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_exactly_once_delivery\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12H\n topic_message_retention_duration\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x38\n\x05state\x18\x13 \x01(\x0e\x32$.google.pubsub.v1.Subscription.StateB\x03\xe0\x41\x03\x12i\n\x1f\x61nalytics_hub_subscription_info\x18\x17 \x01(\x0b\x32;.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoB\x03\xe0\x41\x03\x12\x43\n\x12message_transforms\x18\x19 \x03(\x0b\x32\".google.pubsub.v1.MessageTransformB\x03\xe0\x41\x01\x1aO\n\x1c\x41nalyticsHubSubscriptionInfo\x12\x14\n\x07listing\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0csubscription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x12\n\x0eRESOURCE_ERROR\x10\x02:u\xea\x41r\n\"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}*\rsubscriptions2\x0csubscription\"\x7f\n\x0bRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"V\n\x10\x44\x65\x61\x64LetterPolicy\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15max_delivery_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"?\n\x10\x45xpirationPolicy\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\x9a\x04\n\nPushConfig\x12\x1a\n\rpush_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\nattributes\x18\x02 \x03(\x0b\x32,.google.pubsub.v1.PushConfig.AttributesEntryB\x03\xe0\x41\x01\x12\x41\n\noidc_token\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12I\n\x0epubsub_wrapper\x18\x04 \x01(\x0b\x32*.google.pubsub.v1.PushConfig.PubsubWrapperB\x03\xe0\x41\x01H\x01\x12\x41\n\nno_wrapper\x18\x05 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.NoWrapperB\x03\xe0\x41\x01H\x01\x1a\x46\n\tOidcToken\x12\"\n\x15service_account_email\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x0f\n\rPubsubWrapper\x1a(\n\tNoWrapper\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_methodB\t\n\x07wrapper\"\x8e\x03\n\x0e\x42igQueryConfig\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0ewrite_metadata\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x64rop_unknown_fields\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12:\n\x05state\x18\x05 \x01(\x0e\x32&.google.pubsub.v1.BigQueryConfig.StateB\x03\xe0\x41\x03\x12\x1d\n\x10use_table_schema\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12\x13\n\x0fSCHEMA_MISMATCH\x10\x04\x12#\n\x1fIN_TRANSIT_LOCATION_RESTRICTION\x10\x05\"\xe9\x05\n\x12\x43loudStorageConfig\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x66ilename_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66ilename_suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66ilename_datetime_format\x18\n \x01(\tB\x03\xe0\x41\x01\x12K\n\x0btext_config\x18\x04 \x01(\x0b\x32/.google.pubsub.v1.CloudStorageConfig.TextConfigB\x03\xe0\x41\x01H\x00\x12K\n\x0b\x61vro_config\x18\x05 \x01(\x0b\x32/.google.pubsub.v1.CloudStorageConfig.AvroConfigB\x03\xe0\x41\x01H\x00\x12\x34\n\x0cmax_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tmax_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12>\n\x05state\x18\t \x01(\x0e\x32*.google.pubsub.v1.CloudStorageConfig.StateB\x03\xe0\x41\x03\x12\"\n\x15service_account_email\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1a\x0c\n\nTextConfig\x1aH\n\nAvroConfig\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12#\n\x1fIN_TRANSIT_LOCATION_RESTRICTION\x10\x04\x12\x13\n\x0fSCHEMA_MISMATCH\x10\x05\x42\x0f\n\routput_format\"|\n\x0fReceivedMessage\x12\x13\n\x06\x61\x63k_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\x07message\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65livery_attempt\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"Z\n\x16GetSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x8c\x01\n\x19UpdateSubscriptionRequest\x12\x39\n\x0csubscription\x18\x01 \x01(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x91\x01\n\x18ListSubscriptionsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"u\n\x19ListSubscriptionsResponse\x12:\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"]\n\x19\x44\x65leteSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\"\x93\x01\n\x17ModifyPushConfigRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x36\n\x0bpush_config\x18\x02 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x02\"\x8d\x01\n\x0bPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12!\n\x12return_immediately\x18\x02 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"Q\n\x0cPullResponse\x12\x41\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessageB\x03\xe0\x41\x01\"\x95\x01\n\x18ModifyAckDeadlineRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14\x61\x63k_deadline_seconds\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"l\n\x12\x41\x63knowledgeRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\xc7\x02\n\x14StreamingPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17modify_deadline_seconds\x18\x03 \x03(\x05\x42\x03\xe0\x41\x01\x12$\n\x17modify_deadline_ack_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12(\n\x1bstream_ack_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x16\n\tclient_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18max_outstanding_messages\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\"\n\x15max_outstanding_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\"\x9e\x06\n\x15StreamingPullResponse\x12\x41\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessageB\x03\xe0\x41\x01\x12\x66\n\x18\x61\x63knowledge_confirmation\x18\x05 \x01(\x0b\x32?.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationB\x03\xe0\x41\x01\x12t\n modify_ack_deadline_confirmation\x18\x03 \x01(\x0b\x32\x45.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationB\x03\xe0\x41\x01\x12\x64\n\x17subscription_properties\x18\x04 \x01(\x0b\x32>.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesB\x03\xe0\x41\x01\x1a\x94\x01\n\x17\x41\x63knowledgeConfirmation\x12\x14\n\x07\x61\x63k_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0finvalid_ack_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11unordered_ack_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12%\n\x18temporary_failed_ack_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01\x1az\n\x1dModifyAckDeadlineConfirmation\x12\x14\n\x07\x61\x63k_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0finvalid_ack_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12%\n\x18temporary_failed_ack_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1ak\n\x16SubscriptionProperties\x12*\n\x1d\x65xactly_once_delivery_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12%\n\x18message_ordering_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x02\n\x15\x43reateSnapshotRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\x12@\n\x0csubscription\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12H\n\x06labels\x18\x03 \x03(\x0b\x32\x33.google.pubsub.v1.CreateSnapshotRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\x15UpdateSnapshotRequest\x12\x31\n\x08snapshot\x18\x01 \x01(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xd6\x02\n\x08Snapshot\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x34\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12;\n\x06labels\x18\x04 \x03(\x0b\x32&.google.pubsub.v1.Snapshot.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:a\xea\x41^\n\x1epubsub.googleapis.com/Snapshot\x12\'projects/{project}/snapshots/{snapshot}*\tsnapshots2\x08snapshot\"N\n\x12GetSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\"\x8d\x01\n\x14ListSnapshotsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"i\n\x15ListSnapshotsResponse\x12\x32\n\tsnapshots\x18\x01 \x03(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Q\n\x15\x44\x65leteSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\"\xc6\x01\n\x0bSeekRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12/\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12:\n\x08snapshot\x18\x03 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1epubsub.googleapis.com/SnapshotH\x00\x42\x08\n\x06target\"\x0e\n\x0cSeekResponse2\xb8\x0b\n\tPublisher\x12q\n\x0b\x43reateTopic\x12\x17.google.pubsub.v1.Topic\x1a\x17.google.pubsub.v1.Topic\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x1a\x1e/v1/{name=projects/*/topics/*}:\x01*\x12\x91\x01\n\x0bUpdateTopic\x12$.google.pubsub.v1.UpdateTopicRequest\x1a\x17.google.pubsub.v1.Topic\"C\xda\x41\x11topic,update_mask\x82\xd3\xe4\x93\x02)2$/v1/{topic.name=projects/*/topics/*}:\x01*\x12\x93\x01\n\x07Publish\x12 .google.pubsub.v1.PublishRequest\x1a!.google.pubsub.v1.PublishResponse\"C\xda\x41\x0etopic,messages\x82\xd3\xe4\x93\x02,\"\'/v1/{topic=projects/*/topics/*}:publish:\x01*\x12w\n\x08GetTopic\x12!.google.pubsub.v1.GetTopicRequest\x1a\x17.google.pubsub.v1.Topic\"/\xda\x41\x05topic\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{topic=projects/*/topics/*}\x12\x8a\x01\n\nListTopics\x12#.google.pubsub.v1.ListTopicsRequest\x1a$.google.pubsub.v1.ListTopicsResponse\"1\xda\x41\x07project\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{project=projects/*}/topics\x12\xba\x01\n\x16ListTopicSubscriptions\x12/.google.pubsub.v1.ListTopicSubscriptionsRequest\x1a\x30.google.pubsub.v1.ListTopicSubscriptionsResponse\"=\xda\x41\x05topic\x82\xd3\xe4\x93\x02/\x12-/v1/{topic=projects/*/topics/*}/subscriptions\x12\xaa\x01\n\x12ListTopicSnapshots\x12+.google.pubsub.v1.ListTopicSnapshotsRequest\x1a,.google.pubsub.v1.ListTopicSnapshotsResponse\"9\xda\x41\x05topic\x82\xd3\xe4\x93\x02+\x12)/v1/{topic=projects/*/topics/*}/snapshots\x12|\n\x0b\x44\x65leteTopic\x12$.google.pubsub.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty\"/\xda\x41\x05topic\x82\xd3\xe4\x93\x02!*\x1f/v1/{topic=projects/*/topics/*}\x12\xad\x01\n\x12\x44\x65tachSubscription\x12+.google.pubsub.v1.DetachSubscriptionRequest\x1a,.google.pubsub.v1.DetachSubscriptionResponse\"<\x82\xd3\xe4\x93\x02\x36\"4/v1/{subscription=projects/*/subscriptions/*}:detach\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsub2\xd2\x15\n\nSubscriber\x12\xb4\x01\n\x12\x43reateSubscription\x12\x1e.google.pubsub.v1.Subscription\x1a\x1e.google.pubsub.v1.Subscription\"^\xda\x41+name,topic,push_config,ack_deadline_seconds\x82\xd3\xe4\x93\x02*\x1a%/v1/{name=projects/*/subscriptions/*}:\x01*\x12\xa1\x01\n\x0fGetSubscription\x12(.google.pubsub.v1.GetSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"D\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02/\x12-/v1/{subscription=projects/*/subscriptions/*}\x12\xbb\x01\n\x12UpdateSubscription\x12+.google.pubsub.v1.UpdateSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"X\xda\x41\x18subscription,update_mask\x82\xd3\xe4\x93\x02\x37\x32\x32/v1/{subscription.name=projects/*/subscriptions/*}:\x01*\x12\xa6\x01\n\x11ListSubscriptions\x12*.google.pubsub.v1.ListSubscriptionsRequest\x1a+.google.pubsub.v1.ListSubscriptionsResponse\"8\xda\x41\x07project\x82\xd3\xe4\x93\x02(\x12&/v1/{project=projects/*}/subscriptions\x12\x9f\x01\n\x12\x44\x65leteSubscription\x12+.google.pubsub.v1.DeleteSubscriptionRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02/*-/v1/{subscription=projects/*/subscriptions/*}\x12\xcf\x01\n\x11ModifyAckDeadline\x12*.google.pubsub.v1.ModifyAckDeadlineRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41)subscription,ack_ids,ack_deadline_seconds\x82\xd3\xe4\x93\x02\x44\"?/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline:\x01*\x12\xa8\x01\n\x0b\x41\x63knowledge\x12$.google.pubsub.v1.AcknowledgeRequest\x1a\x16.google.protobuf.Empty\"[\xda\x41\x14subscription,ack_ids\x82\xd3\xe4\x93\x02>\"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\x01*\x12\xd0\x01\n\x04Pull\x12\x1d.google.pubsub.v1.PullRequest\x1a\x1e.google.pubsub.v1.PullResponse\"\x88\x01\xda\x41,subscription,return_immediately,max_messages\xda\x41\x19subscription,max_messages\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:pull:\x01*\x12\x66\n\rStreamingPull\x12&.google.pubsub.v1.StreamingPullRequest\x1a\'.google.pubsub.v1.StreamingPullResponse\"\x00(\x01\x30\x01\x12\xbb\x01\n\x10ModifyPushConfig\x12).google.pubsub.v1.ModifyPushConfigRequest\x1a\x16.google.protobuf.Empty\"d\xda\x41\x18subscription,push_config\x82\xd3\xe4\x93\x02\x43\">/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig:\x01*\x12\x89\x01\n\x0bGetSnapshot\x12$.google.pubsub.v1.GetSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"8\xda\x41\x08snapshot\x82\xd3\xe4\x93\x02\'\x12%/v1/{snapshot=projects/*/snapshots/*}\x12\x96\x01\n\rListSnapshots\x12&.google.pubsub.v1.ListSnapshotsRequest\x1a\'.google.pubsub.v1.ListSnapshotsResponse\"4\xda\x41\x07project\x82\xd3\xe4\x93\x02$\x12\"/v1/{project=projects/*}/snapshots\x12\x97\x01\n\x0e\x43reateSnapshot\x12\'.google.pubsub.v1.CreateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"@\xda\x41\x11name,subscription\x82\xd3\xe4\x93\x02&\x1a!/v1/{name=projects/*/snapshots/*}:\x01*\x12\xa3\x01\n\x0eUpdateSnapshot\x12\'.google.pubsub.v1.UpdateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot\"L\xda\x41\x14snapshot,update_mask\x82\xd3\xe4\x93\x02/2*/v1/{snapshot.name=projects/*/snapshots/*}:\x01*\x12\x8b\x01\n\x0e\x44\x65leteSnapshot\x12\'.google.pubsub.v1.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x08snapshot\x82\xd3\xe4\x93\x02\'*%/v1/{snapshot=projects/*/snapshots/*}\x12\x84\x01\n\x04Seek\x12\x1d.google.pubsub.v1.SeekRequest\x1a\x1e.google.pubsub.v1.SeekResponse\"=\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:seek:\x01*\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsubB\xaa\x01\n\x14\x63om.google.pubsub.v1B\x0bPubsubProtoP\x01Z5cloud.google.com/go/pubsub/v2/apiv1/pubsubpb;pubsubpb\xaa\x02\x16Google.Cloud.PubSub.V1\xca\x02\x16Google\\Cloud\\PubSub\\V1\xea\x02\x19Google::Cloud::PubSub::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -70,6 +70,7 @@ module V1 IngestionFailureEvent::ApiViolationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.ApiViolationReason").msgclass IngestionFailureEvent::AvroFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.AvroFailureReason").msgclass IngestionFailureEvent::SchemaViolationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason").msgclass + IngestionFailureEvent::MessageTransformationFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason").msgclass IngestionFailureEvent::CloudStorageFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure").msgclass IngestionFailureEvent::AwsMskFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason").msgclass IngestionFailureEvent::AzureEventHubsFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason").msgclass diff --git a/google-cloud-pubsub-v1/proto_docs/google/pubsub/v1/pubsub.rb b/google-cloud-pubsub-v1/proto_docs/google/pubsub/v1/pubsub.rb index eafa6309b67c..fe3d27d47e77 100644 --- a/google-cloud-pubsub-v1/proto_docs/google/pubsub/v1/pubsub.rb +++ b/google-cloud-pubsub-v1/proto_docs/google/pubsub/v1/pubsub.rb @@ -522,6 +522,13 @@ class SchemaViolationReason extend ::Google::Protobuf::MessageExts::ClassMethods end + # Set when a Pub/Sub message fails to get published due to a message + # transformation error. + class MessageTransformationFailureReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Failure when ingesting from a Cloud Storage source. # @!attribute [rw] bucket # @return [::String] @@ -538,18 +545,24 @@ class SchemaViolationReason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::AvroFailureReason] # Optional. Failure encountered when parsing an Avro file. # - # Note: The following fields are mutually exclusive: `avro_failure_reason`, `api_violation_reason`, `schema_violation_reason`. 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: `avro_failure_reason`, `api_violation_reason`, `schema_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] api_violation_reason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::ApiViolationReason] # Optional. The Pub/Sub API limits prevented the desired message from # being published. # - # Note: The following fields are mutually exclusive: `api_violation_reason`, `avro_failure_reason`, `schema_violation_reason`. 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: `api_violation_reason`, `avro_failure_reason`, `schema_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] schema_violation_reason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] # Optional. The Pub/Sub message failed schema validation. # - # Note: The following fields are mutually exclusive: `schema_violation_reason`, `avro_failure_reason`, `api_violation_reason`. 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: `schema_violation_reason`, `avro_failure_reason`, `api_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] message_transformation_failure_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::MessageTransformationFailureReason] + # Optional. Failure encountered when applying a message transformation to + # the Pub/Sub message. + # + # Note: The following fields are mutually exclusive: `message_transformation_failure_reason`, `avro_failure_reason`, `api_violation_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class CloudStorageFailure include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -574,12 +587,18 @@ class CloudStorageFailure # Optional. The Pub/Sub API limits prevented the desired message from # being published. # - # Note: The following fields are mutually exclusive: `api_violation_reason`, `schema_violation_reason`. 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: `api_violation_reason`, `schema_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] schema_violation_reason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] # Optional. The Pub/Sub message failed schema validation. # - # Note: The following fields are mutually exclusive: `schema_violation_reason`, `api_violation_reason`. 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: `schema_violation_reason`, `api_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] message_transformation_failure_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::MessageTransformationFailureReason] + # Optional. Failure encountered when applying a message transformation to + # the Pub/Sub message. + # + # Note: The following fields are mutually exclusive: `message_transformation_failure_reason`, `api_violation_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class AwsMskFailureReason include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -604,12 +623,18 @@ class AwsMskFailureReason # Optional. The Pub/Sub API limits prevented the desired message from # being published. # - # Note: The following fields are mutually exclusive: `api_violation_reason`, `schema_violation_reason`. 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: `api_violation_reason`, `schema_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] schema_violation_reason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] # Optional. The Pub/Sub message failed schema validation. # - # Note: The following fields are mutually exclusive: `schema_violation_reason`, `api_violation_reason`. 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: `schema_violation_reason`, `api_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] message_transformation_failure_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::MessageTransformationFailureReason] + # Optional. Failure encountered when applying a message transformation to + # the Pub/Sub message. + # + # Note: The following fields are mutually exclusive: `message_transformation_failure_reason`, `api_violation_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class AzureEventHubsFailureReason include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -634,12 +659,18 @@ class AzureEventHubsFailureReason # Optional. The Pub/Sub API limits prevented the desired message from # being published. # - # Note: The following fields are mutually exclusive: `api_violation_reason`, `schema_violation_reason`. 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: `api_violation_reason`, `schema_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] schema_violation_reason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] # Optional. The Pub/Sub message failed schema validation. # - # Note: The following fields are mutually exclusive: `schema_violation_reason`, `api_violation_reason`. 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: `schema_violation_reason`, `api_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] message_transformation_failure_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::MessageTransformationFailureReason] + # Optional. Failure encountered when applying a message transformation to + # the Pub/Sub message. + # + # Note: The following fields are mutually exclusive: `message_transformation_failure_reason`, `api_violation_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class ConfluentCloudFailureReason include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -658,6 +689,14 @@ class ConfluentCloudFailureReason # @!attribute [rw] schema_violation_reason # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::SchemaViolationReason] # Optional. The Pub/Sub message failed schema validation. + # + # Note: The following fields are mutually exclusive: `schema_violation_reason`, `message_transformation_failure_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] message_transformation_failure_reason + # @return [::Google::Cloud::PubSub::V1::IngestionFailureEvent::MessageTransformationFailureReason] + # Optional. Failure encountered when applying a message transformation to + # the Pub/Sub message. + # + # Note: The following fields are mutually exclusive: `message_transformation_failure_reason`, `schema_violation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. class AwsKinesisFailureReason include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1868,11 +1907,11 @@ class StreamingPullRequest # @!attribute [rw] acknowledge_confirmation # @return [::Google::Cloud::PubSub::V1::StreamingPullResponse::AcknowledgeConfirmation] # Optional. This field will only be set if `enable_exactly_once_delivery` is - # set to `true`. + # set to `true` and is not guaranteed to be populated. # @!attribute [rw] modify_ack_deadline_confirmation # @return [::Google::Cloud::PubSub::V1::StreamingPullResponse::ModifyAckDeadlineConfirmation] # Optional. This field will only be set if `enable_exactly_once_delivery` is - # set to `true`. + # set to `true` and is not guaranteed to be populated. # @!attribute [rw] subscription_properties # @return [::Google::Cloud::PubSub::V1::StreamingPullResponse::SubscriptionProperties] # Optional. Properties associated with this subscription. From ff3f4d92cd5ea39249d97a2c6de1721c46c02a2c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:57:33 -0700 Subject: [PATCH 170/457] feat(shopping-merchant-accounts-v1beta): Support for CheckoutSettings (#30576) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 776251023 Source-Link: https://github.com/googleapis/googleapis/commit/66c3e331b98c9f673b648ef427c496b7615464c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9bf65b026b1ea217e101192df7dc9fbb2bad8f79 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiOWJmNjViMDI2YjFlYTIxN2UxMDExOTJkZjdkYzlmYmIyYmFkOGY3OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 17 + .../gapic_metadata.json | 29 + .../shopping/merchant/accounts/v1beta.rb | 1 + .../v1beta/checkout_settings_service.rb | 58 ++ .../checkout_settings_service/client.rb | 757 ++++++++++++++++++ .../checkout_settings_service/credentials.rb | 49 ++ .../v1beta/checkout_settings_service/paths.rb | 69 ++ .../v1beta/checkout_settings_service/rest.rb | 55 ++ .../checkout_settings_service/rest/client.rb | 703 ++++++++++++++++ .../rest/service_stub.rb | 329 ++++++++ .../accounts/v1beta/checkoutsettings_pb.rb | 60 ++ .../v1beta/checkoutsettings_services_pb.rb | 56 ++ .../shopping/merchant/accounts/v1beta/rest.rb | 1 + .../accounts/v1beta/checkoutsettings.rb | 185 +++++ .../create_checkout_settings.rb | 47 ++ .../delete_checkout_settings.rb | 47 ++ .../get_checkout_settings.rb | 47 ++ .../update_checkout_settings.rb | 47 ++ ...gle.shopping.merchant.accounts.v1beta.json | 160 ++++ .../checkout_settings_service_paths_test.rb | 67 ++ .../checkout_settings_service_rest_test.rb | 317 ++++++++ .../v1beta/checkout_settings_service_test.rb | 321 ++++++++ 22 files changed, 3422 insertions(+) create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb create mode 100644 google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb create mode 100644 google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb create mode 100644 google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb create mode 100644 google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb create mode 100644 google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb create mode 100644 google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb diff --git a/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json b/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json index 16dd949445e1..b5d836054390 100644 --- a/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json @@ -80,6 +80,15 @@ "lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb", "lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb", "lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb", + "lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb", "lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb", "lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb", "lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb", @@ -213,6 +222,7 @@ "proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb", "proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb", "proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb", + "proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb", "proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb", "proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb", "proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb", @@ -254,6 +264,10 @@ "snippets/business_identity_service/update_business_identity.rb", "snippets/business_info_service/get_business_info.rb", "snippets/business_info_service/update_business_info.rb", + "snippets/checkout_settings_service/create_checkout_settings.rb", + "snippets/checkout_settings_service/delete_checkout_settings.rb", + "snippets/checkout_settings_service/get_checkout_settings.rb", + "snippets/checkout_settings_service/update_checkout_settings.rb", "snippets/email_preferences_service/get_email_preferences.rb", "snippets/email_preferences_service/update_email_preferences.rb", "snippets/gbp_accounts_service/link_gbp_account.rb", @@ -317,6 +331,9 @@ "test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb", "test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb", "test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb", + "test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb", "test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb", "test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb", "test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb", diff --git a/google-shopping-merchant-accounts-v1beta/gapic_metadata.json b/google-shopping-merchant-accounts-v1beta/gapic_metadata.json index 86b18d2b01de..c3348ff56d9c 100644 --- a/google-shopping-merchant-accounts-v1beta/gapic_metadata.json +++ b/google-shopping-merchant-accounts-v1beta/gapic_metadata.json @@ -192,6 +192,35 @@ } } }, + "CheckoutSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client", + "rpcs": { + "GetCheckoutSettings": { + "methods": [ + "get_checkout_settings" + ] + }, + "CreateCheckoutSettings": { + "methods": [ + "create_checkout_settings" + ] + }, + "UpdateCheckoutSettings": { + "methods": [ + "update_checkout_settings" + ] + }, + "DeleteCheckoutSettings": { + "methods": [ + "delete_checkout_settings" + ] + } + } + } + } + }, "EmailPreferencesService": { "clients": { "grpc": { diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb index 7c31f6d2d7cb..8e6d4b997cba 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb @@ -24,6 +24,7 @@ require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" require "google/shopping/merchant/accounts/v1beta/business_identity_service" require "google/shopping/merchant/accounts/v1beta/business_info_service" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" require "google/shopping/merchant/accounts/v1beta/email_preferences_service" require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" require "google/shopping/merchant/accounts/v1beta/homepage_service" diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb new file mode 100644 index 000000000000..c8bd47bdedad --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb new file mode 100644 index 000000000000..003ba866581c --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb @@ -0,0 +1,757 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + ## + # Client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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.timeout = 60.0 + default_config.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 CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1beta/checkoutsettings_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 + + @checkout_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::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_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` 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 name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1beta::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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :get_checkout_settings, 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 + + ## + # Creates `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::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_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` 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 merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1beta::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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :create_checkout_settings, 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 + + ## + # Updates `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::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 update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` 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 checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest + + # 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.update_checkout_settings.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::Shopping::Merchant::Accounts::V1beta::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.checkout_settings&.name + header_params["checkout_settings.name"] = request.checkout_settings.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.update_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :update_checkout_settings, 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 + + ## + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::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_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` 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 name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1beta::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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CheckoutSettingsService API. + # + # This class represents the configuration for CheckoutSettingsService, + # 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + # # get_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 CheckoutSettingsService 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 `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb new file mode 100644 index 000000000000..de0fe6106bd1 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Credentials for the CheckoutSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb new file mode 100644 index 000000000000..f0c859768654 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Path helper methods for the CheckoutSettingsService API. + module Paths + ## + # Create a fully-qualified CheckoutSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}/checkoutSettings` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def checkout_settings_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}/checkoutSettings" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb new file mode 100644 index 000000000000..eeb5c23f267a --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb new file mode 100644 index 000000000000..490d60343e67 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb @@ -0,0 +1,703 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + module Rest + ## + # REST client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + 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.timeout = 60.0 + default_config.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 CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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 + + @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::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_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` 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 name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1beta::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.get_checkout_settings 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 + + ## + # Creates `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::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_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` 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 merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1beta::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.create_checkout_settings 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 + + ## + # Updates `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::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 update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` 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 checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest + + # 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.update_checkout_settings.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::Shopping::Merchant::Accounts::V1beta::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.update_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.update_checkout_settings 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 + + ## + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::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_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` 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 name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @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/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1beta::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.delete_checkout_settings 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 + + ## + # Configuration class for the CheckoutSettingsService REST API. + # + # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + # # get_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.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 = "merchantapi.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 CheckoutSettingsService 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 `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..5520f5dd55b2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + module Rest + ## + # REST service stub for the CheckoutSettingsService 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: true, + 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 get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def get_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_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_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def create_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_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_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def update_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_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: "update_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] + # 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_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_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_checkout_settings", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/checkoutSettings", + body: "checkout_settings", + matches: [ + ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{checkout_settings.name}", + body: "checkout_settings", + matches: [ + ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb new file mode 100644 index 000000000000..6a800169a13d --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/checkoutsettings.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/checkoutsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xc0\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12Z\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\"\xb1\x01\n\x1dUpdateCheckoutSettingsRequest\x12Z\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xe5\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12v\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12n\n\x0creview_state\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Z\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsB\x03\xe0\x41\x03\x12\x80\x01\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12x\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xdc\x08\n\x17\x43heckoutSettingsService\x12\xe6\x01\n\x13GetCheckoutSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x12\x95\x02\n\x16\x43reateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"v\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02U\"@/accounts/v1beta/{parent=accounts/*/programs/*}/checkoutSettings:\x11\x63heckout_settings\x12\xab\x02\n\x16UpdateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"\x8b\x01\xda\x41\x1d\x63heckout_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32P/accounts/v1beta/{checkout_settings.name=accounts/*/programs/*/checkoutSettings}:\x11\x63heckout_settings\x12\xc8\x01\n\x16\x44\x65leteCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x43heckoutsettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + GetCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest").msgclass + CreateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest").msgclass + UpdateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest").msgclass + DeleteCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest").msgclass + CheckoutSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings").msgclass + CheckoutSettings::CheckoutEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentState").enummodule + CheckoutSettings::CheckoutReviewState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewState").enummodule + UriSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UriSettings").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb new file mode 100644 index 000000000000..bd81b765e3d8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto for package 'google.shopping.merchant.accounts.v1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.CheckoutSettingsService' + + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + rpc :GetCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Creates `CheckoutSettings` for the given merchant. + rpc :CreateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Updates `CheckoutSettings` for the given merchant. + rpc :UpdateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + rpc :DeleteCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb index 5b948a08b257..7502aa52e7bc 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb @@ -24,6 +24,7 @@ require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb new file mode 100644 index 000000000000..5c3ea7d5c47a --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1beta + # Request message for `GetCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class GetCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateCheckoutSettings` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # Required. The `CheckoutSettings` object to create. + class CreateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateCheckoutSettings` method. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + class UpdateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class DeleteCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for + # a specific merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program configuration settings. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] + # URI settings for cart or checkout URL. + # @!attribute [rw] eligible_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # Optional. The destinations to which the checkout program applies, valid + # destination values are `SHOPPING_ADS`, `FREE_LISTINGS` + # @!attribute [r] enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] + # Output only. Reflects the merchant enrollment state in `Checkout` program. + # @!attribute [r] review_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] + # Output only. Reflects the merchant review state in `Checkout` program. + # This is set based on the data quality reviews of the URL provided by + # the merchant. + # A merchant with enrollment state + # as `ENROLLED` can be in the following review states: `IN_REVIEW`, + # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of + # `ENROLLED` before a review can begin for the merchant.For more details, + # check the help center doc. + # @!attribute [r] effective_uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] + # Output only. The effective value of `uri_settings` for a given merchant. If + # account level settings are present then this value will be a copy of url + # settings. Otherwise, it will have the value of the parent account (for only + # marketplace sellers). + # @!attribute [r] effective_enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] + # Output only. The effective value of enrollment_state for a given merchant + # ID. If account level settings are present then this value will be a copy of + # the account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + # @!attribute [r] effective_review_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] + # Output only. The effective value of `review_state` for a given merchant ID. + # If account level settings are present then this value will be a copy of the + # account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + class CheckoutSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum indicating the enrollment state of merchant in `Checkout` + # program. + module CheckoutEnrollmentState + # Default enrollment state when enrollment state is not specified. + CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Merchant has not enrolled into the program. + INACTIVE = 1 + + # Merchant has enrolled into the program by providing either an + # account level URL or checkout URLs as part of their feed. + ENROLLED = 2 + + # Merchant has previously enrolled but opted out of the program. + OPTED_OUT = 3 + end + + # Enum indicating the review state of merchant in `Checkout` + # program. + module CheckoutReviewState + # Default review state when review state is not specified. + CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 + + # Merchant provided URLs are being reviewed for data quality issues. + IN_REVIEW = 1 + + # Merchant account has been approved. Indicates the data quality checks + # have passed. + APPROVED = 2 + + # Merchant account has been disapproved due to data quality issues. + DISAPPROVED = 3 + end + end + + # URL settings for cart or checkout URL. + # @!attribute [rw] checkout_uri_template + # @return [::String] + # Checkout URL template. When the placeholders are expanded will redirect + # the buyer to the merchant checkout page with the item in the cart. For + # more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cart_uri_template + # @return [::String] + # Cart URL template. When the placeholders are expanded will redirect the + # buyer to the cart page on the merchant website with the selected + # item in cart. For more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class UriSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb new file mode 100644 index 000000000000..432da470f1b7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_checkout_settings call in the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings. +# +def create_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + + # Call the create_checkout_settings method. + result = client.create_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb new file mode 100644 index 000000000000..7a43e09e5a15 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_checkout_settings call in the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings. +# +def delete_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + + # Call the delete_checkout_settings method. + result = client.delete_checkout_settings request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb new file mode 100644 index 000000000000..eee50a9ad25d --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_checkout_settings call in the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings. +# +def get_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + + # Call the get_checkout_settings method. + result = client.get_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb new file mode 100644 index 000000000000..81b2d1a31617 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_checkout_settings call in the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings. +# +def update_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + + # Call the update_checkout_settings method. + result = client.update_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json index d29720756629..20e9cf02a328 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ b/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -931,6 +931,166 @@ } ] }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync", + "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings.", + "file": "checkout_settings_service/get_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "GetCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.GetCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", + "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings.", + "file": "checkout_settings_service/create_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "CreateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.CreateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", + "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings.", + "file": "checkout_settings_service/update_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "UpdateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.UpdateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", + "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings.", + "file": "checkout_settings_service/delete_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "DeleteCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.DeleteCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync", "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb new file mode 100644 index 000000000000..31f67948a63b --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.checkout_settings_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1/checkoutSettings", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb new file mode 100644 index 000000000000..e0c8c3127d22 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_get_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_checkout_settings_client_stub.call_count + end + end + end + + def test_create_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + checkout_settings = {} + + create_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_count + end + end + end + + def test_update_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_checkout_settings_client_stub.call_count + end + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb new file mode 100644 index 000000000000..64bc4ed0f210 --- /dev/null +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_get_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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" + + get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_checkout_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.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, get_checkout_settings_client_stub.call_rpc_count + end + end + + def test_create_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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" + checkout_settings = {} + + create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_rpc_count + end + end + + def test_update_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_checkout_settings_client_stub.call_rpc_count + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_checkout_settings({ 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.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_checkout_settings_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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration, config + end +end From aafb31fc9a2f230beeaed201b5c48c37ca5b7f0f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:58:01 -0700 Subject: [PATCH 171/457] feat(shopping-merchant-accounts): Support for CheckoutSettingsService (#30575) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 776251023 Source-Link: https://github.com/googleapis/googleapis/commit/66c3e331b98c9f673b648ef427c496b7615464c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9bf65b026b1ea217e101192df7dc9fbb2bad8f79 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLy5Pd2xCb3QueWFtbCIsImgiOiI5YmY2NWIwMjZiMWVhMjE3ZTEwMTE5MmRmN2RjOWZiYjJiYWQ4Zjc5In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/shopping/merchant/accounts.rb | 71 +++++++++++++++++++ .../shopping/merchant/accounts/client_test.rb | 21 ++++++ 2 files changed, 92 insertions(+) diff --git a/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb b/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb index 662a85c1f2d0..c598873114bd 100644 --- a/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb +++ b/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb @@ -596,6 +596,77 @@ def self.business_info_service_available? version: :v1beta, transport: :grpc false end + ## + # Create a new client object for CheckoutSettingsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/CheckoutSettingsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CheckoutSettingsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CheckoutSettingsService service. + # You can determine whether the method will succeed by calling + # {Google::Shopping::Merchant::Accounts.checkout_settings_service_available?}. + # + # ## About CheckoutSettingsService + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.checkout_settings_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:CheckoutSettingsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CheckoutSettingsService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.checkout_settings_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CheckoutSettingsService service, + # or if the versioned client gem needs an update to support the CheckoutSettingsService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.checkout_settings_service_available? version: :v1beta, transport: :grpc + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Shopping::Merchant::Accounts.const_get package_name + return false unless service_module.const_defined? :CheckoutSettingsService + service_module = service_module.const_get :CheckoutSettingsService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for EmailPreferencesService. # diff --git a/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb b/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb index f41809690c8f..ee8a627b5f2e 100644 --- a/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb +++ b/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb @@ -209,6 +209,27 @@ def test_business_info_service_rest end end + def test_checkout_settings_service_grpc + skip unless Google::Shopping::Merchant::Accounts.checkout_settings_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.checkout_settings_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client, client + end + end + + def test_checkout_settings_service_rest + skip unless Google::Shopping::Merchant::Accounts.checkout_settings_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.checkout_settings_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client, client + end + end + def test_email_preferences_service_grpc skip unless Google::Shopping::Merchant::Accounts.email_preferences_service_available? transport: :grpc Gapic::ServiceStub.stub :new, DummyStub.new do From 91a54c4f523af3eaa38da0ce7d363330791f69b3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:54:09 -0700 Subject: [PATCH 172/457] chore(main): release google-shopping-merchant-accounts-v1beta 0.11.0 (#30585) --- .release-please-manifest.json | 2 +- google-shopping-merchant-accounts-v1beta/CHANGELOG.md | 6 ++++++ .../lib/google/shopping/merchant/accounts/v1beta/version.rb | 2 +- ...t_metadata_google.shopping.merchant.accounts.v1beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index abc68f59cb88..b5be0baf2931 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -903,7 +903,7 @@ "google-shopping-css-v1+FILLER": "0.0.0", "google-shopping-merchant-accounts": "0.5.0", "google-shopping-merchant-accounts+FILLER": "0.0.0", - "google-shopping-merchant-accounts-v1beta": "0.10.0", + "google-shopping-merchant-accounts-v1beta": "0.11.0", "google-shopping-merchant-accounts-v1beta+FILLER": "0.0.0", "google-shopping-merchant-conversions": "0.2.1", "google-shopping-merchant-conversions+FILLER": "0.0.0", diff --git a/google-shopping-merchant-accounts-v1beta/CHANGELOG.md b/google-shopping-merchant-accounts-v1beta/CHANGELOG.md index f084635b8267..54d66c605138 100644 --- a/google-shopping-merchant-accounts-v1beta/CHANGELOG.md +++ b/google-shopping-merchant-accounts-v1beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.11.0 (2025-06-30) + +#### Features + +* Support for CheckoutSettings ([#30576](https://github.com/googleapis/google-cloud-ruby/issues/30576)) + ### 0.10.0 (2025-05-27) #### Features diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb index 1720dd6860e9..dddbc77071ef 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Accounts module V1beta - VERSION = "0.10.0" + VERSION = "0.11.0" end end end diff --git a/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json index 20e9cf02a328..960055a676fa 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ b/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-accounts-v1beta", - "version": "0.10.0", + "version": "0.11.0", "language": "RUBY", "apis": [ { From cbda9c70bce54748b80cc1804adcdc223ec1b81b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:54:28 -0700 Subject: [PATCH 173/457] chore(main): release google-shopping-merchant-accounts 0.6.0 (#30584) --- .release-please-manifest.json | 2 +- google-shopping-merchant-accounts/CHANGELOG.md | 6 ++++++ .../lib/google/shopping/merchant/accounts/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b5be0baf2931..ffcbc3426430 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -901,7 +901,7 @@ "google-shopping-css+FILLER": "0.0.0", "google-shopping-css-v1": "0.7.0", "google-shopping-css-v1+FILLER": "0.0.0", - "google-shopping-merchant-accounts": "0.5.0", + "google-shopping-merchant-accounts": "0.6.0", "google-shopping-merchant-accounts+FILLER": "0.0.0", "google-shopping-merchant-accounts-v1beta": "0.11.0", "google-shopping-merchant-accounts-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-accounts/CHANGELOG.md b/google-shopping-merchant-accounts/CHANGELOG.md index 0d014001a535..d8da92f8d258 100644 --- a/google-shopping-merchant-accounts/CHANGELOG.md +++ b/google-shopping-merchant-accounts/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.6.0 (2025-06-30) + +#### Features + +* Support for CheckoutSettingsService ([#30575](https://github.com/googleapis/google-cloud-ruby/issues/30575)) + ### 0.5.0 (2025-05-16) #### Features diff --git a/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb b/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb index bdfef2167515..c236430b3030 100644 --- a/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb +++ b/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb @@ -21,7 +21,7 @@ module Google module Shopping module Merchant module Accounts - VERSION = "0.5.0" + VERSION = "0.6.0" end end end From 44c2c13ba5b0cbf9d44fa30b244caa24a148294c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:55:45 -0700 Subject: [PATCH 174/457] chore(main): release google-cloud-ai_platform-v1 1.17.0 (#30577) --- .release-please-manifest.json | 2 +- google-cloud-ai_platform-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/ai_platform/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ffcbc3426430..edae7f89b17c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -43,7 +43,7 @@ "google-cloud-advisory_notifications-v1+FILLER": "0.0.0", "google-cloud-ai_platform": "2.0.1", "google-cloud-ai_platform+FILLER": "0.0.0", - "google-cloud-ai_platform-v1": "1.16.0", + "google-cloud-ai_platform-v1": "1.17.0", "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", diff --git a/google-cloud-ai_platform-v1/CHANGELOG.md b/google-cloud-ai_platform-v1/CHANGELOG.md index 414c1627b2e2..591c8b292ee3 100644 --- a/google-cloud-ai_platform-v1/CHANGELOG.md +++ b/google-cloud-ai_platform-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.17.0 (2025-06-30) + +#### Features + +* Support for invoke_route_prefix ([#30572](https://github.com/googleapis/google-cloud-ruby/issues/30572)) + ### 1.16.0 (2025-06-24) #### Features diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb index 48b64ad79fc9..f36ed93fa4ef 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AIPlatform module V1 - VERSION = "1.16.0" + VERSION = "1.17.0" end end end diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index 606080de99ab..bf0fa10b73dc 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-ai_platform-v1", - "version": "1.16.0", + "version": "1.17.0", "language": "RUBY", "apis": [ { From d0bc13c62bd6df0468720e2dc750ee41798d0b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Tue, 1 Jul 2025 11:35:03 -0700 Subject: [PATCH 175/457] feat: Update minimum Ruby version to 3.1 (#30587) --- google-cloud-pubsub/Gemfile | 16 ++++++++-------- google-cloud-pubsub/README.md | 2 +- google-cloud-pubsub/google-cloud-pubsub.gemspec | 8 ++++---- .../lib/google/cloud/pubsub/received_message.rb | 12 ++++++------ 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/google-cloud-pubsub/Gemfile b/google-cloud-pubsub/Gemfile index d133055e4ddd..59a6e624d8f9 100644 --- a/google-cloud-pubsub/Gemfile +++ b/google-cloud-pubsub/Gemfile @@ -20,18 +20,18 @@ local_dependencies.each do |name| end gem "autotest-suffix", "~> 1.1" -gem "avro", "~> 1.10" -gem "bigdecimal", "~> 3.0" -gem "google-style", "~> 1.30.1" +gem "avro", "~> 1.12" +gem "bigdecimal", "~> 3.2" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.25" -gem "minitest-autotest", "~> 1.0" +gem "minitest-autotest", "~> 1.1" gem "minitest-focus", "~> 1.4" gem "minitest-reporters", "~> 1.7.0", require: false gem "minitest-rg", "~> 5.3" gem "pry", "~> 0.15.2" gem "rake" -gem "redcarpet", "~> 3.0" -gem "retriable", "~> 3.1" -gem "simplecov", "~> 0.9" -gem "yard", "~> 0.9" +gem "redcarpet", "~> 3.6.1" +gem "retriable", "~> 3.1.2" +gem "simplecov", "~> 0.22" +gem "yard", "~> 0.9.37" gem "yard-doctest", "~> 0.1.17" diff --git a/google-cloud-pubsub/README.md b/google-cloud-pubsub/README.md index 0569668d5ffc..c56303cfaa5e 100644 --- a/google-cloud-pubsub/README.md +++ b/google-cloud-pubsub/README.md @@ -89,7 +89,7 @@ end ## Supported Ruby Versions -This library is supported on Ruby 3.0+. +This library is supported on Ruby 3.1+. 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 diff --git a/google-cloud-pubsub/google-cloud-pubsub.gemspec b/google-cloud-pubsub/google-cloud-pubsub.gemspec index 4479cd69eb46..2aad1cf19e98 100644 --- a/google-cloud-pubsub/google-cloud-pubsub.gemspec +++ b/google-cloud-pubsub/google-cloud-pubsub.gemspec @@ -16,10 +16,10 @@ Gem::Specification.new do |gem| "TROUBLESHOOTING.md", "CHANGELOG.md", "CODE_OF_CONDUCT.md", "LICENSE", ".yardopts"] gem.require_paths = ["lib"] - gem.required_ruby_version = ">= 3.0" + gem.required_ruby_version = ">= 3.1" - gem.add_dependency "concurrent-ruby", "~> 1.1" - gem.add_dependency "google-cloud-core", "~> 1.5" - gem.add_dependency "google-cloud-pubsub-v1", "~> 1.7" + gem.add_dependency "concurrent-ruby", "~> 1.3" + gem.add_dependency "google-cloud-core", "~> 1.8" + gem.add_dependency "google-cloud-pubsub-v1", "~> 1.10" gem.add_dependency "retriable", "~> 3.1" end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb index 031a1954e79e..539dce76f79c 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb @@ -202,10 +202,10 @@ def published_at # # Shut down the subscriber when ready to stop receiving messages. # subscriber.stop! # - def acknowledge! &block + def acknowledge!(&) ensure_subscription! if subscription.respond_to?(:exactly_once_delivery_enabled) && subscription.exactly_once_delivery_enabled - subscription.acknowledge ack_id, &block + subscription.acknowledge ack_id, & else subscription.acknowledge ack_id yield AcknowledgeResult.new(AcknowledgeResult::SUCCESS) if block_given? @@ -268,10 +268,10 @@ def acknowledge! &block # # Shut down the subscriber when ready to stop receiving messages. # subscriber.stop! # - def modify_ack_deadline! new_deadline, &block + def modify_ack_deadline!(new_deadline, &) ensure_subscription! if subscription.respond_to?(:exactly_once_delivery_enabled) && subscription.exactly_once_delivery_enabled - subscription.modify_ack_deadline new_deadline, ack_id, &block + subscription.modify_ack_deadline new_deadline, ack_id, & else subscription.modify_ack_deadline new_deadline, ack_id yield AcknowledgeResult.new(AcknowledgeResult::SUCCESS) if block_given? @@ -327,8 +327,8 @@ def modify_ack_deadline! new_deadline, &block # # Shut down the subscriber when ready to stop receiving messages. # subscriber.stop! # - def reject! &block - modify_ack_deadline! 0, &block + def reject!(&) + modify_ack_deadline! 0, & end alias nack! reject! alias ignore! reject! From 8e25ef49f30821872d579431f2b7ce1b6ea097b6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 12:08:00 -0700 Subject: [PATCH 176/457] chore(main): release google-cloud-pubsub-v1 1.11.0 (#30570) --- .release-please-manifest.json | 2 +- google-cloud-pubsub-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/pubsub/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.pubsub.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index edae7f89b17c..68479da0df72 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -603,7 +603,7 @@ "google-cloud-profiler-v2+FILLER": "0.0.0", "google-cloud-pubsub": "2.22.0", "google-cloud-pubsub+FILLER": "0.0.0", - "google-cloud-pubsub-v1": "1.10.0", + "google-cloud-pubsub-v1": "1.11.0", "google-cloud-pubsub-v1+FILLER": "0.0.0", "google-cloud-rapid_migration_assessment": "2.0.1", "google-cloud-rapid_migration_assessment+FILLER": "0.0.0", diff --git a/google-cloud-pubsub-v1/CHANGELOG.md b/google-cloud-pubsub-v1/CHANGELOG.md index 4193ac02e94f..cccd8eed6513 100644 --- a/google-cloud-pubsub-v1/CHANGELOG.md +++ b/google-cloud-pubsub-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +### 1.11.0 (2025-07-01) + +#### Features + +* Support for message_transformation_failure_reason ([#30574](https://github.com/googleapis/google-cloud-ruby/issues/30574)) +* Rename Publisher to TopicAdmin and Subscriber to SubscriptionAdmin with aliases for backwards compatibility ([#29519](https://github.com/googleapis/google-cloud-ruby/issues/29519)) + ### 1.10.0 (2025-06-23) #### Features diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb index a03fc54935fa..3e0b9d06d940 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module PubSub module V1 - VERSION = "1.10.0" + VERSION = "1.11.0" end end end diff --git a/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json b/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json index 8884a12c3ba3..0925b1a018df 100644 --- a/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json +++ b/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-pubsub-v1", - "version": "1.10.0", + "version": "1.11.0", "language": "RUBY", "apis": [ { From d52cb67d5bcd342acea923b6f0db2de1633fedc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Tue, 1 Jul 2025 13:41:14 -0700 Subject: [PATCH 177/457] fix: Update google-cloud-pubsub-v1 dependency (#30591) --- google-cloud-pubsub/google-cloud-pubsub.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-pubsub/google-cloud-pubsub.gemspec b/google-cloud-pubsub/google-cloud-pubsub.gemspec index 2aad1cf19e98..0800ecbbf110 100644 --- a/google-cloud-pubsub/google-cloud-pubsub.gemspec +++ b/google-cloud-pubsub/google-cloud-pubsub.gemspec @@ -20,6 +20,6 @@ Gem::Specification.new do |gem| gem.add_dependency "concurrent-ruby", "~> 1.3" gem.add_dependency "google-cloud-core", "~> 1.8" - gem.add_dependency "google-cloud-pubsub-v1", "~> 1.10" + gem.add_dependency "google-cloud-pubsub-v1", "~> 1.11" gem.add_dependency "retriable", "~> 3.1" end From 94d315976549dd27ea73e4802a20bdf24805841d Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Mon, 7 Jul 2025 17:51:34 -0700 Subject: [PATCH 178/457] test: Several test fixes (#30592) --- google-cloud-bigquery/Gemfile | 1 + .../acceptance/bigquery/dataset_test.rb | 2 +- .../acceptance/bigquery/table_test.rb | 2 +- .../acceptance/bigquery/view_test.rb | 2 +- ...bucket_uniform_bucket_level_access_test.rb | 6 +- .../storage/universe_domain_test.rb | 95 ++++++++++--------- .../acceptance/storage_helper.rb | 1 + 7 files changed, 58 insertions(+), 51 deletions(-) diff --git a/google-cloud-bigquery/Gemfile b/google-cloud-bigquery/Gemfile index bfebbb73682b..4df2b78e70de 100644 --- a/google-cloud-bigquery/Gemfile +++ b/google-cloud-bigquery/Gemfile @@ -20,6 +20,7 @@ local_dependencies.each do |name| end gem "autotest-suffix", "~> 1.1" +gem "csv" gem "google-cloud-data_catalog", path: "../google-cloud-data_catalog" gem "google-cloud-storage", path: "../google-cloud-storage" gem "google-style", "~> 1.30.1" diff --git a/google-cloud-bigquery/acceptance/bigquery/dataset_test.rb b/google-cloud-bigquery/acceptance/bigquery/dataset_test.rb index 2fc49deb1729..18b67c468759 100644 --- a/google-cloud-bigquery/acceptance/bigquery/dataset_test.rb +++ b/google-cloud-bigquery/acceptance/bigquery/dataset_test.rb @@ -185,7 +185,7 @@ fresh.description = "Description 1" _(stale.etag).wont_equal fresh.etag err = expect { stale.description = "Description 2" }.must_raise Google::Cloud::FailedPreconditionError - _(err.message).must_equal "failedPrecondition: Precondition check failed." + _(err.message).must_match(/^(failedPrecondition|FAILED_PRECONDITION): Precondition check failed\.$/) end it "create dataset returns valid etag equal to get dataset" do diff --git a/google-cloud-bigquery/acceptance/bigquery/table_test.rb b/google-cloud-bigquery/acceptance/bigquery/table_test.rb index 671024f2f047..66df1da69b87 100644 --- a/google-cloud-bigquery/acceptance/bigquery/table_test.rb +++ b/google-cloud-bigquery/acceptance/bigquery/table_test.rb @@ -215,7 +215,7 @@ fresh.description = "Description 1" _(stale.etag).wont_equal fresh.etag err = expect { stale.description = "Description 2" }.must_raise Google::Cloud::FailedPreconditionError - _(err.message).must_equal "failedPrecondition: Precondition check failed." + _(err.message).must_match(/^(failedPrecondition|FAILED_PRECONDITION): Precondition check failed\.$/) end it "create table returns valid etag equal to get table" do diff --git a/google-cloud-bigquery/acceptance/bigquery/view_test.rb b/google-cloud-bigquery/acceptance/bigquery/view_test.rb index e9b0d52c7b56..107e1abc58b5 100644 --- a/google-cloud-bigquery/acceptance/bigquery/view_test.rb +++ b/google-cloud-bigquery/acceptance/bigquery/view_test.rb @@ -82,6 +82,6 @@ fresh.description = "Description 1" _(stale.etag).wont_equal fresh.etag err = expect { stale.description = "Description 2" }.must_raise Google::Cloud::FailedPreconditionError - _(err.message).must_equal "failedPrecondition: Precondition check failed." + _(err.message).must_match(/^(failedPrecondition|FAILED_PRECONDITION): Precondition check failed\.$/) end end diff --git a/google-cloud-storage/acceptance/storage/bucket_uniform_bucket_level_access_test.rb b/google-cloud-storage/acceptance/storage/bucket_uniform_bucket_level_access_test.rb index 7550b512d670..3eba30272324 100644 --- a/google-cloud-storage/acceptance/storage/bucket_uniform_bucket_level_access_test.rb +++ b/google-cloud-storage/acceptance/storage/bucket_uniform_bucket_level_access_test.rb @@ -30,7 +30,7 @@ let(:user_val) { "user-test@example.com" } before do - sleep 1 + sleep 2 end after do @@ -69,6 +69,8 @@ _(err.message).must_match /does not have storage.objects.get access to/ bucket.uniform_bucket_level_access = false + refute bucket.uniform_bucket_level_access? + sleep 1 file.reload! end @@ -150,6 +152,7 @@ _(err.message).must_match /does not have storage.objects.get access to/ bucket.policy_only = false + sleep 1 file.reload! end @@ -200,6 +203,7 @@ refute bucket.policy_only? _(bucket.policy_only_locked_at).must_be :nil? + sleep 1 file_default_acl.reload! _(file_default_acl.acl.readers).must_equal ["allUsers"] end diff --git a/google-cloud-storage/acceptance/storage/universe_domain_test.rb b/google-cloud-storage/acceptance/storage/universe_domain_test.rb index c457969c391d..fc7b93a5bd66 100644 --- a/google-cloud-storage/acceptance/storage/universe_domain_test.rb +++ b/google-cloud-storage/acceptance/storage/universe_domain_test.rb @@ -15,61 +15,62 @@ require "storage_helper" describe Google::Cloud::Storage, :universe_domain do - - # Fetch secret values from the secret_manager path - TEST_UNIVERSE_PROJECT_ID = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-project-id"))) - TEST_UNIVERSE_LOCATION = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-storage-location"))) - TEST_UNIVERSE_DOMAIN = File.read(File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain"))) - TEST_UNIVERSE_DOMAIN_CREDENTIAL = File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain-credential")) + if ENV["KOKORO_GFILE_DIR"] + # Fetch secret values from the secret_manager path + TEST_UNIVERSE_PROJECT_ID = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-project-id"))) + TEST_UNIVERSE_LOCATION = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-storage-location"))) + TEST_UNIVERSE_DOMAIN = File.read(File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain"))) + TEST_UNIVERSE_DOMAIN_CREDENTIAL = File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain-credential")) - let :ud_storage do - Google::Cloud::Storage.new( - project_id: TEST_UNIVERSE_PROJECT_ID, - credentials: TEST_UNIVERSE_DOMAIN_CREDENTIAL, - universe_domain: TEST_UNIVERSE_DOMAIN - ) - end - let(:t) { Time.now.utc.iso8601.gsub ":", "-" } - let(:ud_bucket_name) { "ud-test-ruby-bucket-#{t}-#{SecureRandom.hex(4)}".downcase } + let :ud_storage do + Google::Cloud::Storage.new( + project_id: TEST_UNIVERSE_PROJECT_ID, + credentials: TEST_UNIVERSE_DOMAIN_CREDENTIAL, + universe_domain: TEST_UNIVERSE_DOMAIN + ) + end + let(:t) { Time.now.utc.iso8601.gsub ":", "-" } + let(:ud_bucket_name) { "ud-test-ruby-bucket-#{t}-#{SecureRandom.hex(4)}".downcase } - after do - ud_bucket = ud_storage.bucket ud_bucket_name - if ud_bucket - ud_bucket.files.all &:delete - safe_gcs_execute { ud_bucket.delete } + after do + ud_bucket = ud_storage.bucket ud_bucket_name + if ud_bucket + ud_bucket.files.all &:delete + safe_gcs_execute { ud_bucket.delete } + end end - end - it "validates presense of test project secret values" do - refute_nil TEST_UNIVERSE_PROJECT_ID, "TEST_UNIVERSE_PROJECT_ID should not be nil" - refute_nil TEST_UNIVERSE_LOCATION, "TEST_UNIVERSE_LOCATION should not be nil" - refute_nil TEST_UNIVERSE_DOMAIN, "TEST_UNIVERSE_DOMAIN should not be nil" - refute_nil TEST_UNIVERSE_DOMAIN_CREDENTIAL, "TEST_UNIVERSE_DOMAIN_CREDENTIAL should not be nil" - end + it "validates presense of test project secret values" do + refute_nil TEST_UNIVERSE_PROJECT_ID, "TEST_UNIVERSE_PROJECT_ID should not be nil" + refute_nil TEST_UNIVERSE_LOCATION, "TEST_UNIVERSE_LOCATION should not be nil" + refute_nil TEST_UNIVERSE_DOMAIN, "TEST_UNIVERSE_DOMAIN should not be nil" + refute_nil TEST_UNIVERSE_DOMAIN_CREDENTIAL, "TEST_UNIVERSE_DOMAIN_CREDENTIAL should not be nil" + end - it "creates a new bucket and uploads an object with universe_domain" do - # Create a bucket - ud_bucket = ud_storage.create_bucket ud_bucket_name, location: TEST_UNIVERSE_LOCATION - _(ud_bucket).wont_be_nil - _(ud_bucket.name).must_equal ud_bucket_name - # Upload an object - ud_file_name = "ud-test-file" - ud_payload = StringIO.new "Hello world!" - ud_file = ud_bucket.create_file ud_payload, ud_file_name - _(ud_file.name).must_equal ud_file_name + it "creates a new bucket and uploads an object with universe_domain" do + # Create a bucket + ud_bucket = ud_storage.create_bucket ud_bucket_name, location: TEST_UNIVERSE_LOCATION + _(ud_bucket).wont_be_nil + _(ud_bucket.name).must_equal ud_bucket_name + # Upload an object + ud_file_name = "ud-test-file" + ud_payload = StringIO.new "Hello world!" + ud_file = ud_bucket.create_file ud_payload, ud_file_name + _(ud_file.name).must_equal ud_file_name - # Read the file uploaded - uploaded_ud_file = ud_bucket.file ud_file_name - _(uploaded_ud_file.name).must_equal ud_file_name + # Read the file uploaded + uploaded_ud_file = ud_bucket.file ud_file_name + _(uploaded_ud_file.name).must_equal ud_file_name - # Delete the object - uploaded_ud_file.delete - _(ud_bucket.file uploaded_ud_file.name).must_be_nil + # Delete the object + uploaded_ud_file.delete + _(ud_bucket.file uploaded_ud_file.name).must_be_nil - # Delete the bucket - ud_bucket.delete - bucket= ud_storage.bucket ud_bucket_name - assert_nil bucket, "Bucket #{ud_bucket_name} should not exist" + # Delete the bucket + ud_bucket.delete + bucket= ud_storage.bucket ud_bucket_name + assert_nil bucket, "Bucket #{ud_bucket_name} should not exist" + end end end diff --git a/google-cloud-storage/acceptance/storage_helper.rb b/google-cloud-storage/acceptance/storage_helper.rb index ab1ee4071634..2523282dafe1 100644 --- a/google-cloud-storage/acceptance/storage_helper.rb +++ b/google-cloud-storage/acceptance/storage_helper.rb @@ -33,6 +33,7 @@ $storage = Google::Cloud.new.storage retries: 10, scope: scopes # Create second storage object for tests requiring one, such as requester pays and user project. +$storage_2 = nil if (proj = ENV["GCLOUD_TEST_STORAGE_REQUESTER_PAYS_PROJECT"]) && (keyfile = ENV["GCLOUD_TEST_STORAGE_REQUESTER_PAYS_KEYFILE"] || (ENV["GCLOUD_TEST_STORAGE_REQUESTER_PAYS_KEYFILE_JSON"] && From 6b350255f082c0a24f603d0bd45563c3165e4737 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:24:06 -0700 Subject: [PATCH 179/457] feat: Added support for AdBreak resource (#30579) feat(ad_manager-v1): Support for the AdBreakService feat(ad_manager-v1): Support for the BandwidthGroupService feat(ad_manager-v1): Support for the DeviceCategoryService feat(ad_manager-v1): Support for the GeoTargetService feat(ad_manager-v1): Support for the OperatingSystemService and OperatingSystemVersionService feat(ad_manager-v1): Support for the PrivateAuctionService and PrivateAuctionDealService feat(ad_manager-v1): Support for the ProgrammaticBuyerService feat(ad_manager-v1): Support for Contact company display name feat(ad_manager-v1): Support for custom targeting key fix(ad_manager-v1)!: Removed Contact ID and Team ID fields --- .../.owlbot-manifest.json | 158 +- google-ads-ad_manager-v1/AUTHENTICATION.md | 8 +- google-ads-ad_manager-v1/README.md | 8 +- google-ads-ad_manager-v1/Rakefile | 4 +- google-ads-ad_manager-v1/gapic_metadata.json | 206 + .../lib/google/ads/ad_manager/v1.rb | 11 +- .../ads/ad_manager/v1/ad_break_service.rb | 48 + .../v1/ad_break_service/credentials.rb | 47 + .../ad_manager/v1/ad_break_service/paths.rb | 69 + .../ad_manager/v1/ad_break_service/rest.rb | 52 + .../v1/ad_break_service/rest/client.rb | 854 ++++ .../v1/ad_break_service/rest/service_stub.rb | 432 ++ .../v1/ad_unit_service/credentials.rb | 3 + .../ad_manager/v1/bandwidth_group_service.rb | 48 + .../v1/bandwidth_group_service/credentials.rb | 47 + .../v1/bandwidth_group_service/paths.rb | 64 + .../v1/bandwidth_group_service/rest.rb | 52 + .../v1/bandwidth_group_service/rest/client.rb | 538 +++ .../rest/service_stub.rb | 203 + .../v1/company_service/credentials.rb | 3 + .../v1/custom_field_service/credentials.rb | 3 + .../credentials.rb | 3 + .../credentials.rb | 3 + .../custom_targeting_value_service/paths.rb | 23 +- .../rest/client.rb | 4 +- .../rest/service_stub.rb | 14 + .../ad_manager/v1/device_category_service.rb | 48 + .../v1/device_category_service/credentials.rb | 47 + .../v1/device_category_service/paths.rb | 64 + .../v1/device_category_service/rest.rb | 52 + .../v1/device_category_service/rest/client.rb | 538 +++ .../rest/service_stub.rb | 203 + .../credentials.rb | 3 + .../ads/ad_manager/v1/geo_target_service.rb | 48 + .../v1/geo_target_service/credentials.rb | 47 + .../ad_manager/v1/geo_target_service/paths.rb | 64 + .../ad_manager/v1/geo_target_service/rest.rb | 52 + .../v1/geo_target_service/rest/client.rb | 538 +++ .../geo_target_service/rest/service_stub.rb | 203 + .../ads/ad_manager/v1/network_service.rb | 2 +- .../v1/network_service/credentials.rb | 3 + .../ads/ad_manager/v1/network_service/rest.rb | 2 +- .../v1/network_service/rest/client.rb | 2 +- .../ad_manager/v1/operating_system_service.rb | 48 + .../operating_system_service/credentials.rb | 47 + .../v1/operating_system_service/paths.rb | 64 + .../v1/operating_system_service/rest.rb | 52 + .../operating_system_service/rest/client.rb | 538 +++ .../rest/service_stub.rb | 203 + .../v1/operating_system_version_service.rb | 48 + .../credentials.rb | 47 + .../operating_system_version_service/paths.rb | 64 + .../operating_system_version_service/rest.rb | 52 + .../rest/client.rb | 541 +++ .../rest/service_stub.rb | 203 + .../v1/order_service/credentials.rb | 3 + .../v1/placement_service/credentials.rb | 3 + .../v1/private_auction_deal_service.rb | 48 + .../credentials.rb | 47 + .../v1/private_auction_deal_service/paths.rb | 217 + .../v1/private_auction_deal_service/rest.rb | 52 + .../rest/client.rb | 719 ++++ .../rest/service_stub.rb | 327 ++ .../ad_manager/v1/private_auction_service.rb | 48 + .../v1/private_auction_service/credentials.rb | 47 + .../v1/private_auction_service/paths.rb | 81 + .../v1/private_auction_service/rest.rb | 52 + .../v1/private_auction_service/rest/client.rb | 718 ++++ .../rest/service_stub.rb | 327 ++ .../v1/programmatic_buyer_service.rb | 48 + .../programmatic_buyer_service/credentials.rb | 47 + .../v1/programmatic_buyer_service/paths.rb | 64 + .../v1/programmatic_buyer_service/rest.rb | 52 + .../programmatic_buyer_service/rest/client.rb | 539 +++ .../rest/service_stub.rb | 203 + .../v1/report_service/credentials.rb | 3 + .../v1/report_service/rest/operations.rb | 7 - .../lib/google/ads/ad_manager/v1/rest.rb | 11 +- .../ad_manager/v1/role_service/credentials.rb | 3 + .../taxonomy_category_service/credentials.rb | 3 + .../ad_manager/v1/user_service/credentials.rb | 3 + .../ads/admanager/v1/ad_break_messages_pb.rb | 50 + .../ads/admanager/v1/ad_break_service_pb.rb | 57 + .../v1/ad_break_service_services_pb.rb | 93 + .../ads/admanager/v1/ad_unit_messages_pb.rb | 2 +- .../ads/admanager/v1/ad_unit_service_pb.rb | 2 +- .../v1/bandwidth_group_messages_pb.rb | 45 + .../v1/bandwidth_group_service_pb.rb | 51 + .../v1/bandwidth_group_service_services_pb.rb | 47 + ..._status_enum_pb.rb => company_enums_pb.rb} | 6 +- .../ads/admanager/v1/company_messages_pb.rb | 5 +- .../ads/admanager/v1/company_service_pb.rb | 2 +- .../ads/admanager/v1/contact_messages_pb.rb | 2 +- .../admanager/v1/custom_field_messages_pb.rb | 2 +- .../admanager/v1/custom_field_service_pb.rb | 2 +- .../v1/custom_targeting_key_service_pb.rb | 2 +- .../v1/custom_targeting_value_messages_pb.rb | 2 +- .../v1/custom_targeting_value_service_pb.rb | 2 +- .../v1/deal_buyer_permission_type_enum_pb.rb | 43 + .../v1/device_category_messages_pb.rb | 45 + .../v1/device_category_service_pb.rb | 51 + .../v1/device_category_service_services_pb.rb | 47 + .../early_ad_break_notification_enums_pb.rb | 43 + .../v1/entity_signals_mapping_messages_pb.rb | 2 +- .../v1/entity_signals_mapping_service_pb.rb | 2 +- .../admanager/v1/geo_target_messages_pb.rb | 45 + .../ads/admanager/v1/geo_target_service_pb.rb | 51 + .../v1/geo_target_service_services_pb.rb | 47 + ...pb.rb => live_stream_event_messages_pb.rb} | 10 +- .../ads/admanager/v1/network_service_pb.rb | 2 +- .../v1/network_service_services_pb.rb | 2 +- .../v1/operating_system_messages_pb.rb | 45 + .../v1/operating_system_service_pb.rb | 51 + .../operating_system_service_services_pb.rb | 47 + .../operating_system_version_messages_pb.rb | 45 + .../v1/operating_system_version_service_pb.rb | 51 + ...ting_system_version_service_services_pb.rb | 47 + .../ads/admanager/v1/order_messages_pb.rb | 2 +- .../ads/admanager/v1/order_service_pb.rb | 2 +- .../ads/admanager/v1/placement_messages_pb.rb | 2 +- .../ads/admanager/v1/placement_service_pb.rb | 2 +- .../v1/private_auction_deal_messages_pb.rb | 56 + .../v1/private_auction_deal_service_pb.rb | 55 + ...rivate_auction_deal_service_services_pb.rb | 51 + .../v1/private_auction_messages_pb.rb | 47 + .../v1/private_auction_service_pb.rb | 55 + .../v1/private_auction_service_services_pb.rb | 51 + .../v1/private_marketplace_enums_pb.rb | 43 + .../v1/programmatic_buyer_messages_pb.rb | 45 + .../v1/programmatic_buyer_service_pb.rb | 51 + .../programmatic_buyer_service_services_pb.rb | 47 + .../ads/admanager/v1/report_messages_pb.rb | 83 + .../ads/admanager/v1/report_service_pb.rb | 42 +- .../admanager/v1/request_platform_enum_pb.rb | 43 + .../ads/admanager/v1/role_messages_pb.rb | 2 +- .../ads/admanager/v1/role_service_pb.rb | 2 +- .../v1/targeted_video_bumper_type_enum_pb.rb | 43 + .../google/ads/admanager/v1/targeting_pb.rb | 63 + .../v1/taxonomy_category_messages_pb.rb | 2 +- .../v1/taxonomy_category_service_pb.rb | 2 +- .../ads/admanager/v1/team_messages_pb.rb | 2 +- .../ads/admanager/v1/user_messages_pb.rb | 2 +- .../ads/admanager/v1/user_service_pb.rb | 2 +- .../admanager/v1/video_position_enum_pb.rb | 43 + .../ads/admanager/v1/ad_break_messages.rb | 112 + .../ads/admanager/v1/ad_break_service.rb | 150 + .../ads/admanager/v1/ad_unit_messages.rb | 19 +- .../admanager/v1/bandwidth_group_messages.rb | 40 + .../admanager/v1/bandwidth_group_service.rb | 99 + ...credit_status_enum.rb => company_enums.rb} | 31 +- .../ads/admanager/v1/company_messages.rb | 6 +- .../ads/admanager/v1/contact_messages.rb | 7 +- .../ads/admanager/v1/custom_field_messages.rb | 6 +- .../ads/admanager/v1/custom_field_value.rb | 1 - .../v1/custom_targeting_value_messages.rb | 7 +- .../v1/custom_targeting_value_service.rb | 4 +- .../v1/deal_buyer_permission_type_enum.rb | 45 + .../admanager/v1/device_category_messages.rb | 39 + .../admanager/v1/device_category_service.rb | 99 + .../v1/early_ad_break_notification_enums.rb | 51 + .../v1/entity_signals_mapping_messages.rb | 2 +- .../ads/admanager/v1/geo_target_messages.rb | 59 + .../ads/admanager/v1/geo_target_service.rb | 99 + .../v1/live_stream_event_messages.rb | 41 + .../ads/admanager/v1/network_messages.rb | 2 +- .../admanager/v1/operating_system_messages.rb | 39 + .../admanager/v1/operating_system_service.rb | 99 + .../v1/operating_system_version_messages.rb | 46 + .../v1/operating_system_version_service.rb | 102 + .../ads/admanager/v1/placement_messages.rb | 15 +- .../v1/private_auction_deal_messages.rb | 98 + .../v1/private_auction_deal_service.rb | 130 + .../admanager/v1/private_auction_messages.rb | 61 + .../admanager/v1/private_auction_service.rb | 129 + ...e_enum.rb => private_marketplace_enums.rb} | 35 +- .../v1/programmatic_buyer_messages.rb | 61 + .../v1/programmatic_buyer_service.rb | 100 + .../ads/admanager/v1/report_messages.rb | 3587 +++++++++++++++++ .../google/ads/admanager/v1/report_service.rb | 3300 --------------- .../ads/admanager/v1/request_platform_enum.rb | 53 + .../google/ads/admanager/v1/size.rb | 16 +- .../v1/targeted_video_bumper_type_enum.rb | 48 + .../google/ads/admanager/v1/targeting.rb | 279 ++ .../google/ads/admanager/v1/team_messages.rb | 4 - .../ads/admanager/v1/video_position_enum.rb | 51 + .../proto_docs/google/type/money.rb | 43 + .../ad_break_service/create_ad_break.rb | 47 + .../ad_break_service/delete_ad_break.rb | 47 + .../snippets/ad_break_service/get_ad_break.rb | 47 + .../ad_break_service/list_ad_breaks.rb | 51 + .../ad_break_service/update_ad_break.rb | 47 + .../get_bandwidth_group.rb | 47 + .../list_bandwidth_groups.rb | 51 + .../get_device_category.rb | 47 + .../list_device_categories.rb | 51 + .../geo_target_service/get_geo_target.rb | 47 + .../geo_target_service/list_geo_targets.rb | 51 + .../get_operating_system.rb | 47 + .../list_operating_systems.rb | 51 + .../get_operating_system_version.rb | 47 + .../list_operating_system_versions.rb | 51 + .../create_private_auction_deal.rb | 47 + .../get_private_auction_deal.rb | 47 + .../list_private_auction_deals.rb | 51 + .../update_private_auction_deal.rb | 47 + .../create_private_auction.rb | 47 + .../get_private_auction.rb | 47 + .../list_private_auctions.rb | 51 + .../update_private_auction.rb | 47 + .../get_programmatic_buyer.rb | 47 + .../list_programmatic_buyers.rb | 51 + ...ppet_metadata_google.ads.admanager.v1.json | 1044 ++++- .../v1/ad_break_service_rest_test.rb | 376 ++ .../v1/bandwidth_group_service_rest_test.rb | 212 + .../v1/device_category_service_rest_test.rb | 212 + .../v1/geo_target_service_rest_test.rb | 212 + .../v1/operating_system_service_rest_test.rb | 212 + ...rating_system_version_service_rest_test.rb | 212 + .../private_auction_deal_service_rest_test.rb | 322 ++ .../v1/private_auction_service_rest_test.rb | 322 ++ .../programmatic_buyer_service_rest_test.rb | 212 + 221 files changed, 22549 insertions(+), 3501 deletions(-) create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/credentials.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/paths.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/client.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/service_stub.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_service_services_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_service_services_pb.rb rename google-ads-ad_manager-v1/lib/google/ads/admanager/v1/{company_credit_status_enum_pb.rb => company_enums_pb.rb} (54%) create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/deal_buyer_permission_type_enum_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/device_category_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/device_category_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/device_category_service_services_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/early_ad_break_notification_enums_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_service_services_pb.rb rename google-ads-ad_manager-v1/lib/google/ads/admanager/v1/{company_type_enum_pb.rb => live_stream_event_messages_pb.rb} (54%) create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_service_services_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_service_services_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_service_services_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_service_services_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_marketplace_enums_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_service_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_service_services_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/report_messages_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/request_platform_enum_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/targeted_video_bumper_type_enum_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/targeting_pb.rb create mode 100644 google-ads-ad_manager-v1/lib/google/ads/admanager/v1/video_position_enum_pb.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_break_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_break_service.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/bandwidth_group_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/bandwidth_group_service.rb rename google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/{company_credit_status_enum.rb => company_enums.rb} (79%) create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/deal_buyer_permission_type_enum.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/device_category_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/device_category_service.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/early_ad_break_notification_enums.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/geo_target_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/geo_target_service.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/live_stream_event_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_service.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_version_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_version_service.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_deal_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_deal_service.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_service.rb rename google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/{company_type_enum.rb => private_marketplace_enums.rb} (51%) create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/programmatic_buyer_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/programmatic_buyer_service.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/report_messages.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/request_platform_enum.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/targeted_video_bumper_type_enum.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/targeting.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/video_position_enum.rb create mode 100644 google-ads-ad_manager-v1/proto_docs/google/type/money.rb create mode 100644 google-ads-ad_manager-v1/snippets/ad_break_service/create_ad_break.rb create mode 100644 google-ads-ad_manager-v1/snippets/ad_break_service/delete_ad_break.rb create mode 100644 google-ads-ad_manager-v1/snippets/ad_break_service/get_ad_break.rb create mode 100644 google-ads-ad_manager-v1/snippets/ad_break_service/list_ad_breaks.rb create mode 100644 google-ads-ad_manager-v1/snippets/ad_break_service/update_ad_break.rb create mode 100644 google-ads-ad_manager-v1/snippets/bandwidth_group_service/get_bandwidth_group.rb create mode 100644 google-ads-ad_manager-v1/snippets/bandwidth_group_service/list_bandwidth_groups.rb create mode 100644 google-ads-ad_manager-v1/snippets/device_category_service/get_device_category.rb create mode 100644 google-ads-ad_manager-v1/snippets/device_category_service/list_device_categories.rb create mode 100644 google-ads-ad_manager-v1/snippets/geo_target_service/get_geo_target.rb create mode 100644 google-ads-ad_manager-v1/snippets/geo_target_service/list_geo_targets.rb create mode 100644 google-ads-ad_manager-v1/snippets/operating_system_service/get_operating_system.rb create mode 100644 google-ads-ad_manager-v1/snippets/operating_system_service/list_operating_systems.rb create mode 100644 google-ads-ad_manager-v1/snippets/operating_system_version_service/get_operating_system_version.rb create mode 100644 google-ads-ad_manager-v1/snippets/operating_system_version_service/list_operating_system_versions.rb create mode 100644 google-ads-ad_manager-v1/snippets/private_auction_deal_service/create_private_auction_deal.rb create mode 100644 google-ads-ad_manager-v1/snippets/private_auction_deal_service/get_private_auction_deal.rb create mode 100644 google-ads-ad_manager-v1/snippets/private_auction_deal_service/list_private_auction_deals.rb create mode 100644 google-ads-ad_manager-v1/snippets/private_auction_deal_service/update_private_auction_deal.rb create mode 100644 google-ads-ad_manager-v1/snippets/private_auction_service/create_private_auction.rb create mode 100644 google-ads-ad_manager-v1/snippets/private_auction_service/get_private_auction.rb create mode 100644 google-ads-ad_manager-v1/snippets/private_auction_service/list_private_auctions.rb create mode 100644 google-ads-ad_manager-v1/snippets/private_auction_service/update_private_auction.rb create mode 100644 google-ads-ad_manager-v1/snippets/programmatic_buyer_service/get_programmatic_buyer.rb create mode 100644 google-ads-ad_manager-v1/snippets/programmatic_buyer_service/list_programmatic_buyers.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/ad_break_service_rest_test.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/bandwidth_group_service_rest_test.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/device_category_service_rest_test.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/geo_target_service_rest_test.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/operating_system_service_rest_test.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/operating_system_version_service_rest_test.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/private_auction_deal_service_rest_test.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/private_auction_service_rest_test.rb create mode 100644 google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/programmatic_buyer_service_rest_test.rb diff --git a/google-ads-ad_manager-v1/.owlbot-manifest.json b/google-ads-ad_manager-v1/.owlbot-manifest.json index 59c4bbb2a4fd..233474841ea2 100644 --- a/google-ads-ad_manager-v1/.owlbot-manifest.json +++ b/google-ads-ad_manager-v1/.owlbot-manifest.json @@ -15,12 +15,24 @@ "google-ads-ad_manager-v1.gemspec", "lib/google-ads-ad_manager-v1.rb", "lib/google/ads/ad_manager/v1.rb", + "lib/google/ads/ad_manager/v1/ad_break_service.rb", + "lib/google/ads/ad_manager/v1/ad_break_service/credentials.rb", + "lib/google/ads/ad_manager/v1/ad_break_service/paths.rb", + "lib/google/ads/ad_manager/v1/ad_break_service/rest.rb", + "lib/google/ads/ad_manager/v1/ad_break_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/ad_break_service/rest/service_stub.rb", "lib/google/ads/ad_manager/v1/ad_unit_service.rb", "lib/google/ads/ad_manager/v1/ad_unit_service/credentials.rb", "lib/google/ads/ad_manager/v1/ad_unit_service/paths.rb", "lib/google/ads/ad_manager/v1/ad_unit_service/rest.rb", "lib/google/ads/ad_manager/v1/ad_unit_service/rest/client.rb", "lib/google/ads/ad_manager/v1/ad_unit_service/rest/service_stub.rb", + "lib/google/ads/ad_manager/v1/bandwidth_group_service.rb", + "lib/google/ads/ad_manager/v1/bandwidth_group_service/credentials.rb", + "lib/google/ads/ad_manager/v1/bandwidth_group_service/paths.rb", + "lib/google/ads/ad_manager/v1/bandwidth_group_service/rest.rb", + "lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/service_stub.rb", "lib/google/ads/ad_manager/v1/company_service.rb", "lib/google/ads/ad_manager/v1/company_service/credentials.rb", "lib/google/ads/ad_manager/v1/company_service/paths.rb", @@ -45,18 +57,42 @@ "lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest.rb", "lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/client.rb", "lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/service_stub.rb", + "lib/google/ads/ad_manager/v1/device_category_service.rb", + "lib/google/ads/ad_manager/v1/device_category_service/credentials.rb", + "lib/google/ads/ad_manager/v1/device_category_service/paths.rb", + "lib/google/ads/ad_manager/v1/device_category_service/rest.rb", + "lib/google/ads/ad_manager/v1/device_category_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/device_category_service/rest/service_stub.rb", "lib/google/ads/ad_manager/v1/entity_signals_mapping_service.rb", "lib/google/ads/ad_manager/v1/entity_signals_mapping_service/credentials.rb", "lib/google/ads/ad_manager/v1/entity_signals_mapping_service/paths.rb", "lib/google/ads/ad_manager/v1/entity_signals_mapping_service/rest.rb", "lib/google/ads/ad_manager/v1/entity_signals_mapping_service/rest/client.rb", "lib/google/ads/ad_manager/v1/entity_signals_mapping_service/rest/service_stub.rb", + "lib/google/ads/ad_manager/v1/geo_target_service.rb", + "lib/google/ads/ad_manager/v1/geo_target_service/credentials.rb", + "lib/google/ads/ad_manager/v1/geo_target_service/paths.rb", + "lib/google/ads/ad_manager/v1/geo_target_service/rest.rb", + "lib/google/ads/ad_manager/v1/geo_target_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/geo_target_service/rest/service_stub.rb", "lib/google/ads/ad_manager/v1/network_service.rb", "lib/google/ads/ad_manager/v1/network_service/credentials.rb", "lib/google/ads/ad_manager/v1/network_service/paths.rb", "lib/google/ads/ad_manager/v1/network_service/rest.rb", "lib/google/ads/ad_manager/v1/network_service/rest/client.rb", "lib/google/ads/ad_manager/v1/network_service/rest/service_stub.rb", + "lib/google/ads/ad_manager/v1/operating_system_service.rb", + "lib/google/ads/ad_manager/v1/operating_system_service/credentials.rb", + "lib/google/ads/ad_manager/v1/operating_system_service/paths.rb", + "lib/google/ads/ad_manager/v1/operating_system_service/rest.rb", + "lib/google/ads/ad_manager/v1/operating_system_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/operating_system_service/rest/service_stub.rb", + "lib/google/ads/ad_manager/v1/operating_system_version_service.rb", + "lib/google/ads/ad_manager/v1/operating_system_version_service/credentials.rb", + "lib/google/ads/ad_manager/v1/operating_system_version_service/paths.rb", + "lib/google/ads/ad_manager/v1/operating_system_version_service/rest.rb", + "lib/google/ads/ad_manager/v1/operating_system_version_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/operating_system_version_service/rest/service_stub.rb", "lib/google/ads/ad_manager/v1/order_service.rb", "lib/google/ads/ad_manager/v1/order_service/credentials.rb", "lib/google/ads/ad_manager/v1/order_service/paths.rb", @@ -69,6 +105,24 @@ "lib/google/ads/ad_manager/v1/placement_service/rest.rb", "lib/google/ads/ad_manager/v1/placement_service/rest/client.rb", "lib/google/ads/ad_manager/v1/placement_service/rest/service_stub.rb", + "lib/google/ads/ad_manager/v1/private_auction_deal_service.rb", + "lib/google/ads/ad_manager/v1/private_auction_deal_service/credentials.rb", + "lib/google/ads/ad_manager/v1/private_auction_deal_service/paths.rb", + "lib/google/ads/ad_manager/v1/private_auction_deal_service/rest.rb", + "lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/service_stub.rb", + "lib/google/ads/ad_manager/v1/private_auction_service.rb", + "lib/google/ads/ad_manager/v1/private_auction_service/credentials.rb", + "lib/google/ads/ad_manager/v1/private_auction_service/paths.rb", + "lib/google/ads/ad_manager/v1/private_auction_service/rest.rb", + "lib/google/ads/ad_manager/v1/private_auction_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/private_auction_service/rest/service_stub.rb", + "lib/google/ads/ad_manager/v1/programmatic_buyer_service.rb", + "lib/google/ads/ad_manager/v1/programmatic_buyer_service/credentials.rb", + "lib/google/ads/ad_manager/v1/programmatic_buyer_service/paths.rb", + "lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest.rb", + "lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/client.rb", + "lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/service_stub.rb", "lib/google/ads/ad_manager/v1/report_service.rb", "lib/google/ads/ad_manager/v1/report_service/credentials.rb", "lib/google/ads/ad_manager/v1/report_service/paths.rb", @@ -96,17 +150,22 @@ "lib/google/ads/ad_manager/v1/user_service/rest/client.rb", "lib/google/ads/ad_manager/v1/user_service/rest/service_stub.rb", "lib/google/ads/ad_manager/v1/version.rb", + "lib/google/ads/admanager/v1/ad_break_messages_pb.rb", + "lib/google/ads/admanager/v1/ad_break_service_pb.rb", + "lib/google/ads/admanager/v1/ad_break_service_services_pb.rb", "lib/google/ads/admanager/v1/ad_unit_enums_pb.rb", "lib/google/ads/admanager/v1/ad_unit_messages_pb.rb", "lib/google/ads/admanager/v1/ad_unit_service_pb.rb", "lib/google/ads/admanager/v1/ad_unit_service_services_pb.rb", "lib/google/ads/admanager/v1/admanager_error_pb.rb", "lib/google/ads/admanager/v1/applied_label_pb.rb", - "lib/google/ads/admanager/v1/company_credit_status_enum_pb.rb", + "lib/google/ads/admanager/v1/bandwidth_group_messages_pb.rb", + "lib/google/ads/admanager/v1/bandwidth_group_service_pb.rb", + "lib/google/ads/admanager/v1/bandwidth_group_service_services_pb.rb", + "lib/google/ads/admanager/v1/company_enums_pb.rb", "lib/google/ads/admanager/v1/company_messages_pb.rb", "lib/google/ads/admanager/v1/company_service_pb.rb", "lib/google/ads/admanager/v1/company_service_services_pb.rb", - "lib/google/ads/admanager/v1/company_type_enum_pb.rb", "lib/google/ads/admanager/v1/contact_messages_pb.rb", "lib/google/ads/admanager/v1/custom_field_enums_pb.rb", "lib/google/ads/admanager/v1/custom_field_messages_pb.rb", @@ -121,15 +180,30 @@ "lib/google/ads/admanager/v1/custom_targeting_value_messages_pb.rb", "lib/google/ads/admanager/v1/custom_targeting_value_service_pb.rb", "lib/google/ads/admanager/v1/custom_targeting_value_service_services_pb.rb", + "lib/google/ads/admanager/v1/deal_buyer_permission_type_enum_pb.rb", + "lib/google/ads/admanager/v1/device_category_messages_pb.rb", + "lib/google/ads/admanager/v1/device_category_service_pb.rb", + "lib/google/ads/admanager/v1/device_category_service_services_pb.rb", + "lib/google/ads/admanager/v1/early_ad_break_notification_enums_pb.rb", "lib/google/ads/admanager/v1/entity_signals_mapping_messages_pb.rb", "lib/google/ads/admanager/v1/entity_signals_mapping_service_pb.rb", "lib/google/ads/admanager/v1/entity_signals_mapping_service_services_pb.rb", "lib/google/ads/admanager/v1/environment_type_enum_pb.rb", "lib/google/ads/admanager/v1/frequency_cap_pb.rb", + "lib/google/ads/admanager/v1/geo_target_messages_pb.rb", + "lib/google/ads/admanager/v1/geo_target_service_pb.rb", + "lib/google/ads/admanager/v1/geo_target_service_services_pb.rb", "lib/google/ads/admanager/v1/label_messages_pb.rb", + "lib/google/ads/admanager/v1/live_stream_event_messages_pb.rb", "lib/google/ads/admanager/v1/network_messages_pb.rb", "lib/google/ads/admanager/v1/network_service_pb.rb", "lib/google/ads/admanager/v1/network_service_services_pb.rb", + "lib/google/ads/admanager/v1/operating_system_messages_pb.rb", + "lib/google/ads/admanager/v1/operating_system_service_pb.rb", + "lib/google/ads/admanager/v1/operating_system_service_services_pb.rb", + "lib/google/ads/admanager/v1/operating_system_version_messages_pb.rb", + "lib/google/ads/admanager/v1/operating_system_version_service_pb.rb", + "lib/google/ads/admanager/v1/operating_system_version_service_services_pb.rb", "lib/google/ads/admanager/v1/order_enums_pb.rb", "lib/google/ads/admanager/v1/order_messages_pb.rb", "lib/google/ads/admanager/v1/order_service_pb.rb", @@ -138,14 +212,28 @@ "lib/google/ads/admanager/v1/placement_messages_pb.rb", "lib/google/ads/admanager/v1/placement_service_pb.rb", "lib/google/ads/admanager/v1/placement_service_services_pb.rb", + "lib/google/ads/admanager/v1/private_auction_deal_messages_pb.rb", + "lib/google/ads/admanager/v1/private_auction_deal_service_pb.rb", + "lib/google/ads/admanager/v1/private_auction_deal_service_services_pb.rb", + "lib/google/ads/admanager/v1/private_auction_messages_pb.rb", + "lib/google/ads/admanager/v1/private_auction_service_pb.rb", + "lib/google/ads/admanager/v1/private_auction_service_services_pb.rb", + "lib/google/ads/admanager/v1/private_marketplace_enums_pb.rb", + "lib/google/ads/admanager/v1/programmatic_buyer_messages_pb.rb", + "lib/google/ads/admanager/v1/programmatic_buyer_service_pb.rb", + "lib/google/ads/admanager/v1/programmatic_buyer_service_services_pb.rb", + "lib/google/ads/admanager/v1/report_messages_pb.rb", "lib/google/ads/admanager/v1/report_service_pb.rb", "lib/google/ads/admanager/v1/report_service_services_pb.rb", + "lib/google/ads/admanager/v1/request_platform_enum_pb.rb", "lib/google/ads/admanager/v1/role_enums_pb.rb", "lib/google/ads/admanager/v1/role_messages_pb.rb", "lib/google/ads/admanager/v1/role_service_pb.rb", "lib/google/ads/admanager/v1/role_service_services_pb.rb", "lib/google/ads/admanager/v1/size_pb.rb", "lib/google/ads/admanager/v1/size_type_enum_pb.rb", + "lib/google/ads/admanager/v1/targeted_video_bumper_type_enum_pb.rb", + "lib/google/ads/admanager/v1/targeting_pb.rb", "lib/google/ads/admanager/v1/taxonomy_category_messages_pb.rb", "lib/google/ads/admanager/v1/taxonomy_category_service_pb.rb", "lib/google/ads/admanager/v1/taxonomy_category_service_services_pb.rb", @@ -155,16 +243,20 @@ "lib/google/ads/admanager/v1/user_messages_pb.rb", "lib/google/ads/admanager/v1/user_service_pb.rb", "lib/google/ads/admanager/v1/user_service_services_pb.rb", + "lib/google/ads/admanager/v1/video_position_enum_pb.rb", "proto_docs/README.md", + "proto_docs/google/ads/admanager/v1/ad_break_messages.rb", + "proto_docs/google/ads/admanager/v1/ad_break_service.rb", "proto_docs/google/ads/admanager/v1/ad_unit_enums.rb", "proto_docs/google/ads/admanager/v1/ad_unit_messages.rb", "proto_docs/google/ads/admanager/v1/ad_unit_service.rb", "proto_docs/google/ads/admanager/v1/admanager_error.rb", "proto_docs/google/ads/admanager/v1/applied_label.rb", - "proto_docs/google/ads/admanager/v1/company_credit_status_enum.rb", + "proto_docs/google/ads/admanager/v1/bandwidth_group_messages.rb", + "proto_docs/google/ads/admanager/v1/bandwidth_group_service.rb", + "proto_docs/google/ads/admanager/v1/company_enums.rb", "proto_docs/google/ads/admanager/v1/company_messages.rb", "proto_docs/google/ads/admanager/v1/company_service.rb", - "proto_docs/google/ads/admanager/v1/company_type_enum.rb", "proto_docs/google/ads/admanager/v1/contact_messages.rb", "proto_docs/google/ads/admanager/v1/custom_field_enums.rb", "proto_docs/google/ads/admanager/v1/custom_field_messages.rb", @@ -176,25 +268,47 @@ "proto_docs/google/ads/admanager/v1/custom_targeting_value_enums.rb", "proto_docs/google/ads/admanager/v1/custom_targeting_value_messages.rb", "proto_docs/google/ads/admanager/v1/custom_targeting_value_service.rb", + "proto_docs/google/ads/admanager/v1/deal_buyer_permission_type_enum.rb", + "proto_docs/google/ads/admanager/v1/device_category_messages.rb", + "proto_docs/google/ads/admanager/v1/device_category_service.rb", + "proto_docs/google/ads/admanager/v1/early_ad_break_notification_enums.rb", "proto_docs/google/ads/admanager/v1/entity_signals_mapping_messages.rb", "proto_docs/google/ads/admanager/v1/entity_signals_mapping_service.rb", "proto_docs/google/ads/admanager/v1/environment_type_enum.rb", "proto_docs/google/ads/admanager/v1/frequency_cap.rb", + "proto_docs/google/ads/admanager/v1/geo_target_messages.rb", + "proto_docs/google/ads/admanager/v1/geo_target_service.rb", "proto_docs/google/ads/admanager/v1/label_messages.rb", + "proto_docs/google/ads/admanager/v1/live_stream_event_messages.rb", "proto_docs/google/ads/admanager/v1/network_messages.rb", "proto_docs/google/ads/admanager/v1/network_service.rb", + "proto_docs/google/ads/admanager/v1/operating_system_messages.rb", + "proto_docs/google/ads/admanager/v1/operating_system_service.rb", + "proto_docs/google/ads/admanager/v1/operating_system_version_messages.rb", + "proto_docs/google/ads/admanager/v1/operating_system_version_service.rb", "proto_docs/google/ads/admanager/v1/order_enums.rb", "proto_docs/google/ads/admanager/v1/order_messages.rb", "proto_docs/google/ads/admanager/v1/order_service.rb", "proto_docs/google/ads/admanager/v1/placement_enums.rb", "proto_docs/google/ads/admanager/v1/placement_messages.rb", "proto_docs/google/ads/admanager/v1/placement_service.rb", + "proto_docs/google/ads/admanager/v1/private_auction_deal_messages.rb", + "proto_docs/google/ads/admanager/v1/private_auction_deal_service.rb", + "proto_docs/google/ads/admanager/v1/private_auction_messages.rb", + "proto_docs/google/ads/admanager/v1/private_auction_service.rb", + "proto_docs/google/ads/admanager/v1/private_marketplace_enums.rb", + "proto_docs/google/ads/admanager/v1/programmatic_buyer_messages.rb", + "proto_docs/google/ads/admanager/v1/programmatic_buyer_service.rb", + "proto_docs/google/ads/admanager/v1/report_messages.rb", "proto_docs/google/ads/admanager/v1/report_service.rb", + "proto_docs/google/ads/admanager/v1/request_platform_enum.rb", "proto_docs/google/ads/admanager/v1/role_enums.rb", "proto_docs/google/ads/admanager/v1/role_messages.rb", "proto_docs/google/ads/admanager/v1/role_service.rb", "proto_docs/google/ads/admanager/v1/size.rb", "proto_docs/google/ads/admanager/v1/size_type_enum.rb", + "proto_docs/google/ads/admanager/v1/targeted_video_bumper_type_enum.rb", + "proto_docs/google/ads/admanager/v1/targeting.rb", "proto_docs/google/ads/admanager/v1/taxonomy_category_messages.rb", "proto_docs/google/ads/admanager/v1/taxonomy_category_service.rb", "proto_docs/google/ads/admanager/v1/taxonomy_type_enum.rb", @@ -202,6 +316,7 @@ "proto_docs/google/ads/admanager/v1/time_unit_enum.rb", "proto_docs/google/ads/admanager/v1/user_messages.rb", "proto_docs/google/ads/admanager/v1/user_service.rb", + "proto_docs/google/ads/admanager/v1/video_position_enum.rb", "proto_docs/google/api/client.rb", "proto_docs/google/api/field_behavior.rb", "proto_docs/google/api/launch_stage.rb", @@ -215,11 +330,19 @@ "proto_docs/google/rpc/status.rb", "proto_docs/google/type/date.rb", "proto_docs/google/type/dayofweek.rb", + "proto_docs/google/type/money.rb", "proto_docs/google/type/timeofday.rb", "snippets/Gemfile", + "snippets/ad_break_service/create_ad_break.rb", + "snippets/ad_break_service/delete_ad_break.rb", + "snippets/ad_break_service/get_ad_break.rb", + "snippets/ad_break_service/list_ad_breaks.rb", + "snippets/ad_break_service/update_ad_break.rb", "snippets/ad_unit_service/get_ad_unit.rb", "snippets/ad_unit_service/list_ad_unit_sizes.rb", "snippets/ad_unit_service/list_ad_units.rb", + "snippets/bandwidth_group_service/get_bandwidth_group.rb", + "snippets/bandwidth_group_service/list_bandwidth_groups.rb", "snippets/company_service/get_company.rb", "snippets/company_service/list_companies.rb", "snippets/custom_field_service/get_custom_field.rb", @@ -228,18 +351,36 @@ "snippets/custom_targeting_key_service/list_custom_targeting_keys.rb", "snippets/custom_targeting_value_service/get_custom_targeting_value.rb", "snippets/custom_targeting_value_service/list_custom_targeting_values.rb", + "snippets/device_category_service/get_device_category.rb", + "snippets/device_category_service/list_device_categories.rb", "snippets/entity_signals_mapping_service/batch_create_entity_signals_mappings.rb", "snippets/entity_signals_mapping_service/batch_update_entity_signals_mappings.rb", "snippets/entity_signals_mapping_service/create_entity_signals_mapping.rb", "snippets/entity_signals_mapping_service/get_entity_signals_mapping.rb", "snippets/entity_signals_mapping_service/list_entity_signals_mappings.rb", "snippets/entity_signals_mapping_service/update_entity_signals_mapping.rb", + "snippets/geo_target_service/get_geo_target.rb", + "snippets/geo_target_service/list_geo_targets.rb", "snippets/network_service/get_network.rb", "snippets/network_service/list_networks.rb", + "snippets/operating_system_service/get_operating_system.rb", + "snippets/operating_system_service/list_operating_systems.rb", + "snippets/operating_system_version_service/get_operating_system_version.rb", + "snippets/operating_system_version_service/list_operating_system_versions.rb", "snippets/order_service/get_order.rb", "snippets/order_service/list_orders.rb", "snippets/placement_service/get_placement.rb", "snippets/placement_service/list_placements.rb", + "snippets/private_auction_deal_service/create_private_auction_deal.rb", + "snippets/private_auction_deal_service/get_private_auction_deal.rb", + "snippets/private_auction_deal_service/list_private_auction_deals.rb", + "snippets/private_auction_deal_service/update_private_auction_deal.rb", + "snippets/private_auction_service/create_private_auction.rb", + "snippets/private_auction_service/get_private_auction.rb", + "snippets/private_auction_service/list_private_auctions.rb", + "snippets/private_auction_service/update_private_auction.rb", + "snippets/programmatic_buyer_service/get_programmatic_buyer.rb", + "snippets/programmatic_buyer_service/list_programmatic_buyers.rb", "snippets/report_service/create_report.rb", "snippets/report_service/fetch_report_result_rows.rb", "snippets/report_service/get_report.rb", @@ -252,15 +393,24 @@ "snippets/taxonomy_category_service/get_taxonomy_category.rb", "snippets/taxonomy_category_service/list_taxonomy_categories.rb", "snippets/user_service/get_user.rb", + "test/google/ads/ad_manager/v1/ad_break_service_rest_test.rb", "test/google/ads/ad_manager/v1/ad_unit_service_rest_test.rb", + "test/google/ads/ad_manager/v1/bandwidth_group_service_rest_test.rb", "test/google/ads/ad_manager/v1/company_service_rest_test.rb", "test/google/ads/ad_manager/v1/custom_field_service_rest_test.rb", "test/google/ads/ad_manager/v1/custom_targeting_key_service_rest_test.rb", "test/google/ads/ad_manager/v1/custom_targeting_value_service_rest_test.rb", + "test/google/ads/ad_manager/v1/device_category_service_rest_test.rb", "test/google/ads/ad_manager/v1/entity_signals_mapping_service_rest_test.rb", + "test/google/ads/ad_manager/v1/geo_target_service_rest_test.rb", "test/google/ads/ad_manager/v1/network_service_rest_test.rb", + "test/google/ads/ad_manager/v1/operating_system_service_rest_test.rb", + "test/google/ads/ad_manager/v1/operating_system_version_service_rest_test.rb", "test/google/ads/ad_manager/v1/order_service_rest_test.rb", "test/google/ads/ad_manager/v1/placement_service_rest_test.rb", + "test/google/ads/ad_manager/v1/private_auction_deal_service_rest_test.rb", + "test/google/ads/ad_manager/v1/private_auction_service_rest_test.rb", + "test/google/ads/ad_manager/v1/programmatic_buyer_service_rest_test.rb", "test/google/ads/ad_manager/v1/report_service_rest_test.rb", "test/google/ads/ad_manager/v1/role_service_rest_test.rb", "test/google/ads/ad_manager/v1/taxonomy_category_service_rest_test.rb", diff --git a/google-ads-ad_manager-v1/AUTHENTICATION.md b/google-ads-ad_manager-v1/AUTHENTICATION.md index def48902054a..c4d0a96f4511 100644 --- a/google-ads-ad_manager-v1/AUTHENTICATION.md +++ b/google-ads-ad_manager-v1/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/ads/ad_manager/v1" -client = ::Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new do |config| +client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients: ```ruby require "google/ads/ad_manager/v1" -::Google::Ads::AdManager::V1::AdUnitService::Rest::Client.configure do |config| +::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new +client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/ads/ad_manager/v1" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new +client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new ``` ### Local ADC file diff --git a/google-ads-ad_manager-v1/README.md b/google-ads-ad_manager-v1/README.md index 6f4e17d508cc..b70c897782fc 100644 --- a/google-ads-ad_manager-v1/README.md +++ b/google-ads-ad_manager-v1/README.md @@ -32,9 +32,9 @@ In order to use this library, you first need to go through the following steps: ```ruby require "google/ads/ad_manager/v1" -client = ::Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new -request = ::Google::Ads::AdManager::V1::GetAdUnitRequest.new # (request fields as keyword arguments...) -response = client.get_ad_unit request +client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new +request = ::Google::Ads::AdManager::V1::GetAdBreakRequest.new # (request fields as keyword arguments...) +response = client.get_ad_break request ``` View the [Client Library Documentation](https://rubydoc.info/gems/google-ads-ad_manager-v1) @@ -75,7 +75,7 @@ constructing a client object. For example: require "google/ads/ad_manager/v1" require "logger" -client = ::Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new do |config| +client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| config.logger = Logger.new "my-app.log" end ``` diff --git a/google-ads-ad_manager-v1/Rakefile b/google-ads-ad_manager-v1/Rakefile index 9c6513cd3782..bd982469a980 100644 --- a/google-ads-ad_manager-v1/Rakefile +++ b/google-ads-ad_manager-v1/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/ads/ad_manager/v1/ad_unit_service/credentials" - ::Google::Ads::AdManager::V1::AdUnitService::Credentials.env_vars.each do |path| + require "google/ads/ad_manager/v1/ad_break_service/credentials" + ::Google::Ads::AdManager::V1::AdBreakService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-ads-ad_manager-v1/gapic_metadata.json b/google-ads-ad_manager-v1/gapic_metadata.json index 61be8c39f5e4..30fbc11840af 100644 --- a/google-ads-ad_manager-v1/gapic_metadata.json +++ b/google-ads-ad_manager-v1/gapic_metadata.json @@ -5,6 +5,40 @@ "protoPackage": "google.ads.admanager.v1", "libraryPackage": "::Google::Ads::AdManager::V1", "services": { + "AdBreakService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::AdBreakService::Client", + "rpcs": { + "GetAdBreak": { + "methods": [ + "get_ad_break" + ] + }, + "ListAdBreaks": { + "methods": [ + "list_ad_breaks" + ] + }, + "CreateAdBreak": { + "methods": [ + "create_ad_break" + ] + }, + "UpdateAdBreak": { + "methods": [ + "update_ad_break" + ] + }, + "DeleteAdBreak": { + "methods": [ + "delete_ad_break" + ] + } + } + } + } + }, "AdUnitService": { "clients": { "grpc": { @@ -29,6 +63,25 @@ } } }, + "BandwidthGroupService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::BandwidthGroupService::Client", + "rpcs": { + "GetBandwidthGroup": { + "methods": [ + "get_bandwidth_group" + ] + }, + "ListBandwidthGroups": { + "methods": [ + "list_bandwidth_groups" + ] + } + } + } + } + }, "CompanyService": { "clients": { "grpc": { @@ -105,6 +158,25 @@ } } }, + "DeviceCategoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::DeviceCategoryService::Client", + "rpcs": { + "GetDeviceCategory": { + "methods": [ + "get_device_category" + ] + }, + "ListDeviceCategories": { + "methods": [ + "list_device_categories" + ] + } + } + } + } + }, "EntitySignalsMappingService": { "clients": { "grpc": { @@ -144,6 +216,25 @@ } } }, + "GeoTargetService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::GeoTargetService::Client", + "rpcs": { + "GetGeoTarget": { + "methods": [ + "get_geo_target" + ] + }, + "ListGeoTargets": { + "methods": [ + "list_geo_targets" + ] + } + } + } + } + }, "NetworkService": { "clients": { "grpc": { @@ -163,6 +254,44 @@ } } }, + "OperatingSystemService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::OperatingSystemService::Client", + "rpcs": { + "GetOperatingSystem": { + "methods": [ + "get_operating_system" + ] + }, + "ListOperatingSystems": { + "methods": [ + "list_operating_systems" + ] + } + } + } + } + }, + "OperatingSystemVersionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::OperatingSystemVersionService::Client", + "rpcs": { + "GetOperatingSystemVersion": { + "methods": [ + "get_operating_system_version" + ] + }, + "ListOperatingSystemVersions": { + "methods": [ + "list_operating_system_versions" + ] + } + } + } + } + }, "OrderService": { "clients": { "grpc": { @@ -201,6 +330,83 @@ } } }, + "PrivateAuctionDealService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Client", + "rpcs": { + "GetPrivateAuctionDeal": { + "methods": [ + "get_private_auction_deal" + ] + }, + "ListPrivateAuctionDeals": { + "methods": [ + "list_private_auction_deals" + ] + }, + "CreatePrivateAuctionDeal": { + "methods": [ + "create_private_auction_deal" + ] + }, + "UpdatePrivateAuctionDeal": { + "methods": [ + "update_private_auction_deal" + ] + } + } + } + } + }, + "PrivateAuctionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::PrivateAuctionService::Client", + "rpcs": { + "GetPrivateAuction": { + "methods": [ + "get_private_auction" + ] + }, + "ListPrivateAuctions": { + "methods": [ + "list_private_auctions" + ] + }, + "CreatePrivateAuction": { + "methods": [ + "create_private_auction" + ] + }, + "UpdatePrivateAuction": { + "methods": [ + "update_private_auction" + ] + } + } + } + } + }, + "ProgrammaticBuyerService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Client", + "rpcs": { + "GetProgrammaticBuyer": { + "methods": [ + "get_programmatic_buyer" + ] + }, + "ListProgrammaticBuyers": { + "methods": [ + "list_programmatic_buyers" + ] + } + } + } + } + }, "ReportService": { "clients": { "grpc": { diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1.rb index 7ba2983953c6..469be96fea05 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1.rb @@ -16,15 +16,24 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/ads/ad_manager/v1/ad_break_service" require "google/ads/ad_manager/v1/ad_unit_service" +require "google/ads/ad_manager/v1/bandwidth_group_service" require "google/ads/ad_manager/v1/company_service" require "google/ads/ad_manager/v1/custom_field_service" require "google/ads/ad_manager/v1/custom_targeting_key_service" require "google/ads/ad_manager/v1/custom_targeting_value_service" +require "google/ads/ad_manager/v1/device_category_service" require "google/ads/ad_manager/v1/entity_signals_mapping_service" +require "google/ads/ad_manager/v1/geo_target_service" require "google/ads/ad_manager/v1/network_service" +require "google/ads/ad_manager/v1/operating_system_service" +require "google/ads/ad_manager/v1/operating_system_version_service" require "google/ads/ad_manager/v1/order_service" require "google/ads/ad_manager/v1/placement_service" +require "google/ads/ad_manager/v1/private_auction_deal_service" +require "google/ads/ad_manager/v1/private_auction_service" +require "google/ads/ad_manager/v1/programmatic_buyer_service" require "google/ads/ad_manager/v1/report_service" require "google/ads/ad_manager/v1/role_service" require "google/ads/ad_manager/v1/taxonomy_category_service" @@ -40,7 +49,7 @@ module AdManager # @example Load this package, including all its services, and instantiate a REST client # # require "google/ads/ad_manager/v1" - # client = ::Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new + # client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new # module V1 end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service.rb new file mode 100644 index 000000000000..da5237f51252 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/ad_break_service/credentials" +require "google/ads/ad_manager/v1/ad_break_service/paths" +require "google/ads/ad_manager/v1/ad_break_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `AdBreak` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/ad_break_service/rest" + # client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + # + module AdBreakService + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_break_service", "helpers.rb" +require "google/ads/ad_manager/v1/ad_break_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/credentials.rb new file mode 100644 index 000000000000..5a34c0a11134 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module AdBreakService + # Credentials for the AdBreakService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/paths.rb new file mode 100644 index 000000000000..6ee16b6124df --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module AdBreakService + # Path helper methods for the AdBreakService API. + module Paths + ## + # Create a fully-qualified AdBreak resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}` + # + # @param network_code [String] + # @param asset_key [String] + # @param ad_break [String] + # + # @return [::String] + def ad_break_path network_code:, asset_key:, ad_break: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + raise ::ArgumentError, "asset_key cannot contain /" if asset_key.to_s.include? "/" + + "networks/#{network_code}/liveStreamEventsByAssetKey/#{asset_key}/adBreaks/#{ad_break}" + end + + ## + # Create a fully-qualified LiveStreamEvent resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/liveStreamEvents/{live_stream_event}` + # + # @param network_code [String] + # @param live_stream_event [String] + # + # @return [::String] + def live_stream_event_path network_code:, live_stream_event: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/liveStreamEvents/#{live_stream_event}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest.rb new file mode 100644 index 000000000000..17dc83584e80 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/ad_break_service/credentials" +require "google/ads/ad_manager/v1/ad_break_service/paths" +require "google/ads/ad_manager/v1/ad_break_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `AdBreak` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/ad_break_service/rest" + # client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + # + module AdBreakService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/ad_break_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest/client.rb new file mode 100644 index 000000000000..129189ca7b9b --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest/client.rb @@ -0,0 +1,854 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/ad_break_service_pb" +require "google/ads/ad_manager/v1/ad_break_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module AdBreakService + module Rest + ## + # REST client for the AdBreakService service. + # + # Provides methods for handling `AdBreak` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_break_service_stub + + ## + # Configure the AdBreakService Client class. + # + # See {::Google::Ads::AdManager::V1::AdBreakService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdBreakService clients + # ::Google::Ads::AdManager::V1::AdBreakService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdBreakService 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::Ads::AdManager::V1::AdBreakService::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 + @ad_break_service_stub.universe_domain + end + + ## + # Create a new AdBreakService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdBreakService 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 + + @ad_break_service_stub = ::Google::Ads::AdManager::V1::AdBreakService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @ad_break_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 + @ad_break_service_stub.logger + end + + # Service calls + + ## + # API to retrieve an `AdBreak` object. + # + # Query an ad break by its resource name or custom asset key. Check the + # resource's `breakState` field to determine its state. + # + # @overload get_ad_break(request, options = nil) + # Pass arguments to `get_ad_break` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetAdBreakRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetAdBreakRequest, ::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_ad_break(name: nil) + # Pass arguments to `get_ad_break` 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 resource name of the AdBreak using the asset key or custom + # asset key. + # + # Format: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break_id}` + # `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}/adBreaks/{ad_break_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::AdBreak] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::AdBreak] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetAdBreakRequest.new + # + # # Call the get_ad_break method. + # result = client.get_ad_break request + # + # # The returned object is of type Google::Ads::AdManager::V1::AdBreak. + # p result + # + def get_ad_break request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetAdBreakRequest + + # 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_ad_break.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::Ads::AdManager::V1::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_ad_break.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_ad_break.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_break_service_stub.get_ad_break 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 + + ## + # API to retrieve a list of `AdBreak` objects. + # + # By default, when no `orderBy` query parameter is specified, ad breaks are + # ordered reverse chronologically. However, ad breaks with a 'breakState' of + # 'SCHEDULED' or 'DECISIONED' are prioritized and appear first. + # + # @overload list_ad_breaks(request, options = nil) + # Pass arguments to `list_ad_breaks` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListAdBreaksRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListAdBreaksRequest, ::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_ad_breaks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_ad_breaks` 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 parent, which owns this collection of AdBreaks. + # + # Formats: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}` + # `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}` + # @param page_size [::Integer] + # Optional. The maximum number of `AdBreaks` to return. The service might + # return fewer than this value. If unspecified, at most 10 ad breaks are + # returned. The maximum value is `100`. Values above `100` are coerced to + # `100`. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAdBreaks` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAdBreaks` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::AdBreak>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::AdBreak>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListAdBreaksRequest.new + # + # # Call the list_ad_breaks method. + # result = client.list_ad_breaks 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::Ads::AdManager::V1::AdBreak. + # p item + # end + # + def list_ad_breaks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListAdBreaksRequest + + # 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_ad_breaks.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::Ads::AdManager::V1::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_ad_breaks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_ad_breaks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_break_service_stub.list_ad_breaks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @ad_break_service_stub, :list_ad_breaks, "ad_breaks", 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 + + ## + # API to create an `AdBreak` object. + # + # Informs DAI of an upcoming ad break for a live stream event, with an + # optional expected start time. DAI will begin decisioning ads for the break + # shortly before the expected start time, if provided. Each live stream + # event can only have one incomplete ad break at any given time. The next ad + # break can be scheduled after the previous ad break has started serving, + # indicated by its state being + # {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::COMPLETE `COMPLETE`}, + # or it has been deleted. + # + # This method cannot be used if the `LiveStreamEvent` has + # [prefetching ad breaks + # enabled](https://developers.google.com/ad-manager/api/reference/latest/LiveStreamEventService.LiveStreamEvent#prefetchenabled) + # or the event is not active. If a `LiveStreamEvent` is deactivated after + # creating an ad break and before the ad break is complete, the ad break + # is discarded. + # + # An ad break's state is complete when the following occurs: + # - Full service DAI: after a matching ad break shows in the + # `LiveStreamEvent` manifest only when the ad break has started decisioning. + # - Pod Serving: after the ad break is requested using the ad break ID or + # break sequence. + # + # @overload create_ad_break(request, options = nil) + # Pass arguments to `create_ad_break` via a request object, either of type + # {::Google::Ads::AdManager::V1::CreateAdBreakRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::CreateAdBreakRequest, ::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_ad_break(parent: nil, ad_break: nil) + # Pass arguments to `create_ad_break` 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 parent resource where this `AdBreak` will be created + # identified by an asset key or custom asset key. + # + # Formats: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}` + # `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}` + # @param ad_break [::Google::Ads::AdManager::V1::AdBreak, ::Hash] + # Required. The `AdBreak` to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::AdBreak] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::AdBreak] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::CreateAdBreakRequest.new + # + # # Call the create_ad_break method. + # result = client.create_ad_break request + # + # # The returned object is of type Google::Ads::AdManager::V1::AdBreak. + # p result + # + def create_ad_break request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::CreateAdBreakRequest + + # 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_ad_break.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::Ads::AdManager::V1::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_ad_break.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_ad_break.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_break_service_stub.create_ad_break 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 + + ## + # API to update an `AdBreak` object. + # + # Modify an ad break when its state is + # {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::SCHEDULED `SCHEDULED`}. + # + # @overload update_ad_break(request, options = nil) + # Pass arguments to `update_ad_break` via a request object, either of type + # {::Google::Ads::AdManager::V1::UpdateAdBreakRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::UpdateAdBreakRequest, ::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 update_ad_break(ad_break: nil, update_mask: nil) + # Pass arguments to `update_ad_break` 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 ad_break [::Google::Ads::AdManager::V1::AdBreak, ::Hash] + # Required. The `AdBreak` to update. + # + # The `AdBreak`'s `name` is used to identify the `AdBreak` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::AdBreak] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::AdBreak] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::UpdateAdBreakRequest.new + # + # # Call the update_ad_break method. + # result = client.update_ad_break request + # + # # The returned object is of type Google::Ads::AdManager::V1::AdBreak. + # p result + # + def update_ad_break request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::UpdateAdBreakRequest + + # 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.update_ad_break.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::Ads::AdManager::V1::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.update_ad_break.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_ad_break.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_break_service_stub.update_ad_break 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 + + ## + # API to delete an `AdBreak` object. + # + # Deletes and cancels an incomplete ad break, mitigating the need to wait + # for the current break to serve before recreating an ad break. You can + # delete an ad break that has not started serving or seen in manifests, + # indicated by its state being + # {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::SCHEDULED `SCHEDULED`} + # or + # {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::DECISIONED `DECISIONED`}. + # + # @overload delete_ad_break(request, options = nil) + # Pass arguments to `delete_ad_break` via a request object, either of type + # {::Google::Ads::AdManager::V1::DeleteAdBreakRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::DeleteAdBreakRequest, ::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_ad_break(name: nil) + # Pass arguments to `delete_ad_break` 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 name of the ad break to delete. + # + # Format: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}` + # @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/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::DeleteAdBreakRequest.new + # + # # Call the delete_ad_break method. + # result = client.delete_ad_break request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_ad_break request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::DeleteAdBreakRequest + + # 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_ad_break.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::Ads::AdManager::V1::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_ad_break.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_ad_break.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_break_service_stub.delete_ad_break 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 + + ## + # Configuration class for the AdBreakService REST API. + # + # This class represents the configuration for AdBreakService 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::Ads::AdManager::V1::AdBreakService::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 + # # get_ad_break to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_ad_break.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_ad_break.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 = "admanager.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 AdBreakService 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 `get_ad_break` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ad_break + ## + # RPC-specific configuration for `list_ad_breaks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ad_breaks + ## + # RPC-specific configuration for `create_ad_break` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ad_break + ## + # RPC-specific configuration for `update_ad_break` + # @return [::Gapic::Config::Method] + # + attr_reader :update_ad_break + ## + # RPC-specific configuration for `delete_ad_break` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ad_break + + # @private + def initialize parent_rpcs = nil + get_ad_break_config = parent_rpcs.get_ad_break if parent_rpcs.respond_to? :get_ad_break + @get_ad_break = ::Gapic::Config::Method.new get_ad_break_config + list_ad_breaks_config = parent_rpcs.list_ad_breaks if parent_rpcs.respond_to? :list_ad_breaks + @list_ad_breaks = ::Gapic::Config::Method.new list_ad_breaks_config + create_ad_break_config = parent_rpcs.create_ad_break if parent_rpcs.respond_to? :create_ad_break + @create_ad_break = ::Gapic::Config::Method.new create_ad_break_config + update_ad_break_config = parent_rpcs.update_ad_break if parent_rpcs.respond_to? :update_ad_break + @update_ad_break = ::Gapic::Config::Method.new update_ad_break_config + delete_ad_break_config = parent_rpcs.delete_ad_break if parent_rpcs.respond_to? :delete_ad_break + @delete_ad_break = ::Gapic::Config::Method.new delete_ad_break_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest/service_stub.rb new file mode 100644 index 000000000000..cbe3fb7f8545 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_break_service/rest/service_stub.rb @@ -0,0 +1,432 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/ad_break_service_pb" + +module Google + module Ads + module AdManager + module V1 + module AdBreakService + module Rest + ## + # REST service stub for the AdBreakService 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: true, + 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 get_ad_break REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetAdBreakRequest] + # 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::Ads::AdManager::V1::AdBreak] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::AdBreak] + # A result object deserialized from the server's reply + def get_ad_break request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_ad_break_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_ad_break", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::AdBreak.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_ad_breaks REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListAdBreaksRequest] + # 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::Ads::AdManager::V1::ListAdBreaksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListAdBreaksResponse] + # A result object deserialized from the server's reply + def list_ad_breaks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_ad_breaks_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_ad_breaks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListAdBreaksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_ad_break REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::CreateAdBreakRequest] + # 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::Ads::AdManager::V1::AdBreak] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::AdBreak] + # A result object deserialized from the server's reply + def create_ad_break request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_ad_break_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_ad_break", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::AdBreak.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_ad_break REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::UpdateAdBreakRequest] + # 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::Ads::AdManager::V1::AdBreak] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::AdBreak] + # A result object deserialized from the server's reply + def update_ad_break request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_ad_break_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: "update_ad_break", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::AdBreak.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_ad_break REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::DeleteAdBreakRequest] + # 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_ad_break request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_ad_break_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_ad_break", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the get_ad_break REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetAdBreakRequest] + # 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_ad_break_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/liveStreamEventsByAssetKey/[^/]+/adBreaks/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/liveStreamEventsByCustomAssetKey/[^/]+/adBreaks/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/liveStreamEvents/[^/]+/adBreaks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_ad_breaks REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListAdBreaksRequest] + # 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_ad_breaks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/adBreaks", + matches: [ + ["parent", %r{^networks/[^/]+/liveStreamEventsByAssetKey/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/adBreaks", + matches: [ + ["parent", %r{^networks/[^/]+/liveStreamEventsByCustomAssetKey/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/adBreaks", + matches: [ + ["parent", %r{^networks/[^/]+/liveStreamEvents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_ad_break REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::CreateAdBreakRequest] + # 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_ad_break_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/adBreaks", + body: "ad_break", + matches: [ + ["parent", %r{^networks/[^/]+/liveStreamEventsByAssetKey/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/adBreaks", + body: "ad_break", + matches: [ + ["parent", %r{^networks/[^/]+/liveStreamEventsByCustomAssetKey/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/adBreaks", + body: "ad_break", + matches: [ + ["parent", %r{^networks/[^/]+/liveStreamEvents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_ad_break REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::UpdateAdBreakRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_ad_break_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{ad_break.name}", + body: "ad_break", + matches: [ + ["ad_break.name", %r{^networks/[^/]+/liveStreamEventsByAssetKey/[^/]+/adBreaks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_ad_break REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::DeleteAdBreakRequest] + # 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_ad_break_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/liveStreamEventsByAssetKey/[^/]+/adBreaks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_unit_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_unit_service/credentials.rb index a12d7b0b0596..a100e44889fe 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_unit_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/ad_unit_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module AdUnitService # Credentials for the AdUnitService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service.rb new file mode 100644 index 000000000000..571c419410e7 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/bandwidth_group_service/credentials" +require "google/ads/ad_manager/v1/bandwidth_group_service/paths" +require "google/ads/ad_manager/v1/bandwidth_group_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `BandwidthGroup` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/bandwidth_group_service/rest" + # client = ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new + # + module BandwidthGroupService + end + end + end + end +end + +helper_path = ::File.join __dir__, "bandwidth_group_service", "helpers.rb" +require "google/ads/ad_manager/v1/bandwidth_group_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/credentials.rb new file mode 100644 index 000000000000..aab99c154542 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module BandwidthGroupService + # Credentials for the BandwidthGroupService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/paths.rb new file mode 100644 index 000000000000..92e833adc04e --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module BandwidthGroupService + # Path helper methods for the BandwidthGroupService API. + module Paths + ## + # Create a fully-qualified BandwidthGroup resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/bandwidthGroups/{bandwidth_group}` + # + # @param network_code [String] + # @param bandwidth_group [String] + # + # @return [::String] + def bandwidth_group_path network_code:, bandwidth_group: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/bandwidthGroups/#{bandwidth_group}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}` + # + # @param network_code [String] + # + # @return [::String] + def network_path network_code: + "networks/#{network_code}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest.rb new file mode 100644 index 000000000000..6f5d975278e0 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/bandwidth_group_service/credentials" +require "google/ads/ad_manager/v1/bandwidth_group_service/paths" +require "google/ads/ad_manager/v1/bandwidth_group_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `BandwidthGroup` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/bandwidth_group_service/rest" + # client = ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new + # + module BandwidthGroupService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/bandwidth_group_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/client.rb new file mode 100644 index 000000000000..08db287f7b70 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/client.rb @@ -0,0 +1,538 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/bandwidth_group_service_pb" +require "google/ads/ad_manager/v1/bandwidth_group_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module BandwidthGroupService + module Rest + ## + # REST client for the BandwidthGroupService service. + # + # Provides methods for handling `BandwidthGroup` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bandwidth_group_service_stub + + ## + # Configure the BandwidthGroupService Client class. + # + # See {::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BandwidthGroupService clients + # ::Google::Ads::AdManager::V1::BandwidthGroupService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BandwidthGroupService 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::Ads::AdManager::V1::BandwidthGroupService::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 + @bandwidth_group_service_stub.universe_domain + end + + ## + # Create a new BandwidthGroupService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BandwidthGroupService 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 + + @bandwidth_group_service_stub = ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @bandwidth_group_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 + @bandwidth_group_service_stub.logger + end + + # Service calls + + ## + # API to retrieve a `BandwidthGroup` object. + # + # @overload get_bandwidth_group(request, options = nil) + # Pass arguments to `get_bandwidth_group` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetBandwidthGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetBandwidthGroupRequest, ::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_bandwidth_group(name: nil) + # Pass arguments to `get_bandwidth_group` 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 resource name of the BandwidthGroup. + # Format: `networks/{network_code}/bandwidthGroups/{bandwidth_group_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::BandwidthGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::BandwidthGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetBandwidthGroupRequest.new + # + # # Call the get_bandwidth_group method. + # result = client.get_bandwidth_group request + # + # # The returned object is of type Google::Ads::AdManager::V1::BandwidthGroup. + # p result + # + def get_bandwidth_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetBandwidthGroupRequest + + # 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_bandwidth_group.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::Ads::AdManager::V1::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_bandwidth_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_bandwidth_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bandwidth_group_service_stub.get_bandwidth_group 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 + + ## + # API to retrieve a list of `BandwidthGroup` objects. + # + # @overload list_bandwidth_groups(request, options = nil) + # Pass arguments to `list_bandwidth_groups` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest, ::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_bandwidth_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_bandwidth_groups` 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 parent, which owns this collection of BandwidthGroups. + # Format: `networks/{network_code}` + # @param page_size [::Integer] + # Optional. The maximum number of `BandwidthGroups` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `BandwidthGroups` will be returned. The maximum value is 1000; values above + # 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListBandwidthGroups` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListBandwidthGroups` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::BandwidthGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::BandwidthGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListBandwidthGroupsRequest.new + # + # # Call the list_bandwidth_groups method. + # result = client.list_bandwidth_groups 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::Ads::AdManager::V1::BandwidthGroup. + # p item + # end + # + def list_bandwidth_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest + + # 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_bandwidth_groups.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::Ads::AdManager::V1::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_bandwidth_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_bandwidth_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bandwidth_group_service_stub.list_bandwidth_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bandwidth_group_service_stub, :list_bandwidth_groups, "bandwidth_groups", 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 BandwidthGroupService REST API. + # + # This class represents the configuration for BandwidthGroupService 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::Ads::AdManager::V1::BandwidthGroupService::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 + # # get_bandwidth_group to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_bandwidth_group.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_bandwidth_group.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 = "admanager.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 BandwidthGroupService 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 `get_bandwidth_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_bandwidth_group + ## + # RPC-specific configuration for `list_bandwidth_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_bandwidth_groups + + # @private + def initialize parent_rpcs = nil + get_bandwidth_group_config = parent_rpcs.get_bandwidth_group if parent_rpcs.respond_to? :get_bandwidth_group + @get_bandwidth_group = ::Gapic::Config::Method.new get_bandwidth_group_config + list_bandwidth_groups_config = parent_rpcs.list_bandwidth_groups if parent_rpcs.respond_to? :list_bandwidth_groups + @list_bandwidth_groups = ::Gapic::Config::Method.new list_bandwidth_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/service_stub.rb new file mode 100644 index 000000000000..f6c338525626 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/bandwidth_group_service_pb" + +module Google + module Ads + module AdManager + module V1 + module BandwidthGroupService + module Rest + ## + # REST service stub for the BandwidthGroupService 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: true, + 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 get_bandwidth_group REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetBandwidthGroupRequest] + # 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::Ads::AdManager::V1::BandwidthGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::BandwidthGroup] + # A result object deserialized from the server's reply + def get_bandwidth_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_bandwidth_group_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_bandwidth_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::BandwidthGroup.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_bandwidth_groups REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest] + # 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::Ads::AdManager::V1::ListBandwidthGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListBandwidthGroupsResponse] + # A result object deserialized from the server's reply + def list_bandwidth_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_bandwidth_groups_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_bandwidth_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListBandwidthGroupsResponse.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 get_bandwidth_group REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetBandwidthGroupRequest] + # 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_bandwidth_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/bandwidthGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_bandwidth_groups REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest] + # 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_bandwidth_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bandwidthGroups", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/company_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/company_service/credentials.rb index 25af73b7bb44..608d1222e853 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/company_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/company_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module CompanyService # Credentials for the CompanyService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_field_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_field_service/credentials.rb index ae0c8f9c7f71..b46cf4ba5ac4 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_field_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_field_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module CustomFieldService # Credentials for the CustomFieldService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_key_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_key_service/credentials.rb index 79635258d62c..3b2ebb69708c 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_key_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_key_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module CustomTargetingKeyService # Credentials for the CustomTargetingKeyService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/credentials.rb index c70846fd1ce8..1b62bd152a96 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module CustomTargetingValueService # Credentials for the CustomTargetingValueService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/paths.rb index 3b7db642bcdd..d812f2c858a2 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/paths.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/paths.rb @@ -25,39 +25,34 @@ module CustomTargetingValueService # Path helper methods for the CustomTargetingValueService API. module Paths ## - # Create a fully-qualified CustomTargetingKey resource string. + # Create a fully-qualified CustomTargetingValue resource string. # # The resource will be in the following format: # - # `networks/{network_code}/customTargetingKeys/{custom_targeting_key}` + # `networks/{network_code}/customTargetingValues/{custom_targeting_value}` # # @param network_code [String] - # @param custom_targeting_key [String] + # @param custom_targeting_value [String] # # @return [::String] - def custom_targeting_key_path network_code:, custom_targeting_key: + def custom_targeting_value_path network_code:, custom_targeting_value: raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" - "networks/#{network_code}/customTargetingKeys/#{custom_targeting_key}" + "networks/#{network_code}/customTargetingValues/#{custom_targeting_value}" end ## - # Create a fully-qualified CustomTargetingValue resource string. + # Create a fully-qualified Network resource string. # # The resource will be in the following format: # - # `networks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}` + # `networks/{network_code}` # # @param network_code [String] - # @param custom_targeting_key [String] - # @param custom_targeting_value [String] # # @return [::String] - def custom_targeting_value_path network_code:, custom_targeting_key:, custom_targeting_value: - raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" - raise ::ArgumentError, "custom_targeting_key cannot contain /" if custom_targeting_key.to_s.include? "/" - - "networks/#{network_code}/customTargetingKeys/#{custom_targeting_key}/customTargetingValues/#{custom_targeting_value}" + def network_path network_code: + "networks/#{network_code}" end extend self diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/client.rb index 4d47677373fb..b16361861f98 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/client.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/client.rb @@ -197,7 +197,7 @@ def logger # @param name [::String] # Required. The resource name of the CustomTargetingValue. # Format: - # `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + # `networks/{network_code}/customTargetingValues/{custom_targeting_value_id}` # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Ads::AdManager::V1::CustomTargetingValue] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -277,7 +277,7 @@ def get_custom_targeting_value request, options = nil # @param parent [::String] # Required. The parent, which owns this collection of CustomTargetingValues. # Format: - # `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + # `networks/{network_code}` # @param page_size [::Integer] # Optional. The maximum number of `CustomTargetingValues` to return. The # service may return fewer than this value. If unspecified, at most 50 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/service_stub.rb index f1c52546f68b..92f513856a6d 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/service_stub.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/service_stub.rb @@ -164,6 +164,13 @@ def list_custom_targeting_values request_pb, options = nil # Uri, Body, Query string parameters def self.transcode_get_custom_targeting_value_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/customTargetingValues/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", @@ -185,6 +192,13 @@ def self.transcode_get_custom_targeting_value_request request_pb # Uri, Body, Query string parameters def self.transcode_list_custom_targeting_values_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customTargetingValues", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/customTargetingValues", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service.rb new file mode 100644 index 000000000000..1e4ef3f5d68a --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/device_category_service/credentials" +require "google/ads/ad_manager/v1/device_category_service/paths" +require "google/ads/ad_manager/v1/device_category_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `DeviceCategory` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/device_category_service/rest" + # client = ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new + # + module DeviceCategoryService + end + end + end + end +end + +helper_path = ::File.join __dir__, "device_category_service", "helpers.rb" +require "google/ads/ad_manager/v1/device_category_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/credentials.rb new file mode 100644 index 000000000000..0d9f1acf6c9a --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module DeviceCategoryService + # Credentials for the DeviceCategoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/paths.rb new file mode 100644 index 000000000000..de7731aee7cb --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module DeviceCategoryService + # Path helper methods for the DeviceCategoryService API. + module Paths + ## + # Create a fully-qualified DeviceCategory resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/deviceCategories/{device_category}` + # + # @param network_code [String] + # @param device_category [String] + # + # @return [::String] + def device_category_path network_code:, device_category: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/deviceCategories/#{device_category}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}` + # + # @param network_code [String] + # + # @return [::String] + def network_path network_code: + "networks/#{network_code}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest.rb new file mode 100644 index 000000000000..d67959347f30 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/device_category_service/credentials" +require "google/ads/ad_manager/v1/device_category_service/paths" +require "google/ads/ad_manager/v1/device_category_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `DeviceCategory` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/device_category_service/rest" + # client = ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new + # + module DeviceCategoryService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/device_category_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest/client.rb new file mode 100644 index 000000000000..20ed8aabe931 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest/client.rb @@ -0,0 +1,538 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/device_category_service_pb" +require "google/ads/ad_manager/v1/device_category_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module DeviceCategoryService + module Rest + ## + # REST client for the DeviceCategoryService service. + # + # Provides methods for handling `DeviceCategory` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :device_category_service_stub + + ## + # Configure the DeviceCategoryService Client class. + # + # See {::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeviceCategoryService clients + # ::Google::Ads::AdManager::V1::DeviceCategoryService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DeviceCategoryService 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::Ads::AdManager::V1::DeviceCategoryService::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 + @device_category_service_stub.universe_domain + end + + ## + # Create a new DeviceCategoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeviceCategoryService 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 + + @device_category_service_stub = ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @device_category_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 + @device_category_service_stub.logger + end + + # Service calls + + ## + # API to retrieve a `DeviceCategory` object. + # + # @overload get_device_category(request, options = nil) + # Pass arguments to `get_device_category` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetDeviceCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetDeviceCategoryRequest, ::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_device_category(name: nil) + # Pass arguments to `get_device_category` 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 resource name of the DeviceCategory. + # Format: `networks/{network_code}/deviceCategories/{device_category_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::DeviceCategory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::DeviceCategory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetDeviceCategoryRequest.new + # + # # Call the get_device_category method. + # result = client.get_device_category request + # + # # The returned object is of type Google::Ads::AdManager::V1::DeviceCategory. + # p result + # + def get_device_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetDeviceCategoryRequest + + # 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_device_category.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::Ads::AdManager::V1::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_device_category.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_device_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @device_category_service_stub.get_device_category 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 + + ## + # API to retrieve a list of `DeviceCategory` objects. + # + # @overload list_device_categories(request, options = nil) + # Pass arguments to `list_device_categories` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListDeviceCategoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListDeviceCategoriesRequest, ::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_device_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_device_categories` 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 parent, which owns this collection of DeviceCategories. + # Format: `networks/{network_code}` + # @param page_size [::Integer] + # Optional. The maximum number of `DeviceCategories` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `DeviceCategories` will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeviceCategories` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeviceCategories` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::DeviceCategory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::DeviceCategory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListDeviceCategoriesRequest.new + # + # # Call the list_device_categories method. + # result = client.list_device_categories 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::Ads::AdManager::V1::DeviceCategory. + # p item + # end + # + def list_device_categories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListDeviceCategoriesRequest + + # 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_device_categories.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::Ads::AdManager::V1::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_device_categories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_device_categories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @device_category_service_stub.list_device_categories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @device_category_service_stub, :list_device_categories, "device_categories", 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 DeviceCategoryService REST API. + # + # This class represents the configuration for DeviceCategoryService 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::Ads::AdManager::V1::DeviceCategoryService::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 + # # get_device_category to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_device_category.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_device_category.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 = "admanager.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 DeviceCategoryService 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 `get_device_category` + # @return [::Gapic::Config::Method] + # + attr_reader :get_device_category + ## + # RPC-specific configuration for `list_device_categories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_device_categories + + # @private + def initialize parent_rpcs = nil + get_device_category_config = parent_rpcs.get_device_category if parent_rpcs.respond_to? :get_device_category + @get_device_category = ::Gapic::Config::Method.new get_device_category_config + list_device_categories_config = parent_rpcs.list_device_categories if parent_rpcs.respond_to? :list_device_categories + @list_device_categories = ::Gapic::Config::Method.new list_device_categories_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest/service_stub.rb new file mode 100644 index 000000000000..0da08596b411 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/device_category_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/device_category_service_pb" + +module Google + module Ads + module AdManager + module V1 + module DeviceCategoryService + module Rest + ## + # REST service stub for the DeviceCategoryService 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: true, + 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 get_device_category REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetDeviceCategoryRequest] + # 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::Ads::AdManager::V1::DeviceCategory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::DeviceCategory] + # A result object deserialized from the server's reply + def get_device_category request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_device_category_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_device_category", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::DeviceCategory.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_device_categories REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListDeviceCategoriesRequest] + # 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::Ads::AdManager::V1::ListDeviceCategoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListDeviceCategoriesResponse] + # A result object deserialized from the server's reply + def list_device_categories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_device_categories_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_device_categories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListDeviceCategoriesResponse.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 get_device_category REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetDeviceCategoryRequest] + # 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_device_category_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/deviceCategories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_device_categories REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListDeviceCategoriesRequest] + # 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_device_categories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deviceCategories", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/credentials.rb index 041a1d66a9f3..383cdbd8ea3b 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module EntitySignalsMappingService # Credentials for the EntitySignalsMappingService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service.rb new file mode 100644 index 000000000000..1fe0da398cbc --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/geo_target_service/credentials" +require "google/ads/ad_manager/v1/geo_target_service/paths" +require "google/ads/ad_manager/v1/geo_target_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `GeoTarget` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/geo_target_service/rest" + # client = ::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new + # + module GeoTargetService + end + end + end + end +end + +helper_path = ::File.join __dir__, "geo_target_service", "helpers.rb" +require "google/ads/ad_manager/v1/geo_target_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/credentials.rb new file mode 100644 index 000000000000..9ffa28c33cfe --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module GeoTargetService + # Credentials for the GeoTargetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/paths.rb new file mode 100644 index 000000000000..74f8acc310d9 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module GeoTargetService + # Path helper methods for the GeoTargetService API. + module Paths + ## + # Create a fully-qualified GeoTarget resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/geoTargets/{geo_target}` + # + # @param network_code [String] + # @param geo_target [String] + # + # @return [::String] + def geo_target_path network_code:, geo_target: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/geoTargets/#{geo_target}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}` + # + # @param network_code [String] + # + # @return [::String] + def network_path network_code: + "networks/#{network_code}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest.rb new file mode 100644 index 000000000000..43e4a7819495 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/geo_target_service/credentials" +require "google/ads/ad_manager/v1/geo_target_service/paths" +require "google/ads/ad_manager/v1/geo_target_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `GeoTarget` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/geo_target_service/rest" + # client = ::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new + # + module GeoTargetService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/geo_target_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest/client.rb new file mode 100644 index 000000000000..94110e92c249 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest/client.rb @@ -0,0 +1,538 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/geo_target_service_pb" +require "google/ads/ad_manager/v1/geo_target_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module GeoTargetService + module Rest + ## + # REST client for the GeoTargetService service. + # + # Provides methods for handling `GeoTarget` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :geo_target_service_stub + + ## + # Configure the GeoTargetService Client class. + # + # See {::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GeoTargetService clients + # ::Google::Ads::AdManager::V1::GeoTargetService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GeoTargetService 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::Ads::AdManager::V1::GeoTargetService::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 + @geo_target_service_stub.universe_domain + end + + ## + # Create a new GeoTargetService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GeoTargetService 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 + + @geo_target_service_stub = ::Google::Ads::AdManager::V1::GeoTargetService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @geo_target_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 + @geo_target_service_stub.logger + end + + # Service calls + + ## + # API to retrieve a `GeoTarget` object. + # + # @overload get_geo_target(request, options = nil) + # Pass arguments to `get_geo_target` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetGeoTargetRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetGeoTargetRequest, ::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_geo_target(name: nil) + # Pass arguments to `get_geo_target` 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 resource name of the GeoTarget. + # Format: `networks/{network_code}/geoTargets/{geo_target_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::GeoTarget] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::GeoTarget] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetGeoTargetRequest.new + # + # # Call the get_geo_target method. + # result = client.get_geo_target request + # + # # The returned object is of type Google::Ads::AdManager::V1::GeoTarget. + # p result + # + def get_geo_target request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetGeoTargetRequest + + # 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_geo_target.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::Ads::AdManager::V1::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_geo_target.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_geo_target.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @geo_target_service_stub.get_geo_target 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 + + ## + # API to retrieve a list of `GeoTarget` objects. + # + # @overload list_geo_targets(request, options = nil) + # Pass arguments to `list_geo_targets` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListGeoTargetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListGeoTargetsRequest, ::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_geo_targets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_geo_targets` 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 parent, which owns this collection of GeoTargets. + # Format: `networks/{network_code}` + # @param page_size [::Integer] + # Optional. The maximum number of `GeoTargets` to return. The service may + # return fewer than this value. If unspecified, at most 50 `GeoTargets` will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGeoTargets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGeoTargets` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::GeoTarget>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::GeoTarget>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListGeoTargetsRequest.new + # + # # Call the list_geo_targets method. + # result = client.list_geo_targets 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::Ads::AdManager::V1::GeoTarget. + # p item + # end + # + def list_geo_targets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListGeoTargetsRequest + + # 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_geo_targets.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::Ads::AdManager::V1::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_geo_targets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_geo_targets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @geo_target_service_stub.list_geo_targets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @geo_target_service_stub, :list_geo_targets, "geo_targets", 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 GeoTargetService REST API. + # + # This class represents the configuration for GeoTargetService 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::Ads::AdManager::V1::GeoTargetService::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 + # # get_geo_target to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_geo_target.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_geo_target.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 = "admanager.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 GeoTargetService 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 `get_geo_target` + # @return [::Gapic::Config::Method] + # + attr_reader :get_geo_target + ## + # RPC-specific configuration for `list_geo_targets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_geo_targets + + # @private + def initialize parent_rpcs = nil + get_geo_target_config = parent_rpcs.get_geo_target if parent_rpcs.respond_to? :get_geo_target + @get_geo_target = ::Gapic::Config::Method.new get_geo_target_config + list_geo_targets_config = parent_rpcs.list_geo_targets if parent_rpcs.respond_to? :list_geo_targets + @list_geo_targets = ::Gapic::Config::Method.new list_geo_targets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest/service_stub.rb new file mode 100644 index 000000000000..b7fa8ed56565 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/geo_target_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/geo_target_service_pb" + +module Google + module Ads + module AdManager + module V1 + module GeoTargetService + module Rest + ## + # REST service stub for the GeoTargetService 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: true, + 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 get_geo_target REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetGeoTargetRequest] + # 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::Ads::AdManager::V1::GeoTarget] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::GeoTarget] + # A result object deserialized from the server's reply + def get_geo_target request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_geo_target_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_geo_target", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::GeoTarget.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_geo_targets REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListGeoTargetsRequest] + # 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::Ads::AdManager::V1::ListGeoTargetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListGeoTargetsResponse] + # A result object deserialized from the server's reply + def list_geo_targets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_geo_targets_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_geo_targets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListGeoTargetsResponse.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 get_geo_target REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetGeoTargetRequest] + # 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_geo_target_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/geoTargets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_geo_targets REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListGeoTargetsRequest] + # 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_geo_targets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/geoTargets", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service.rb index 06d7dee61474..ef71d4402d07 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service.rb @@ -30,7 +30,7 @@ module Ads module AdManager module V1 ## - # Provides methods for handling Network objects. + # Provides methods for handling `Network` objects. # # @example Load this service and instantiate a REST client # diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/credentials.rb index ceca6ae27448..0c83d99fad36 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module NetworkService # Credentials for the NetworkService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/rest.rb index b571d9514d56..15b72046ba3a 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/rest.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/rest.rb @@ -31,7 +31,7 @@ module Ads module AdManager module V1 ## - # Provides methods for handling Network objects. + # Provides methods for handling `Network` objects. # # To load this service and instantiate a REST client: # diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/rest/client.rb index 5bc7aba4104e..92cdc6f5948c 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/rest/client.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/network_service/rest/client.rb @@ -29,7 +29,7 @@ module Rest ## # REST client for the NetworkService service. # - # Provides methods for handling Network objects. + # Provides methods for handling `Network` objects. # class Client # @private diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service.rb new file mode 100644 index 000000000000..b719d56b1fe4 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/operating_system_service/credentials" +require "google/ads/ad_manager/v1/operating_system_service/paths" +require "google/ads/ad_manager/v1/operating_system_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `OperatingSystem` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/operating_system_service/rest" + # client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new + # + module OperatingSystemService + end + end + end + end +end + +helper_path = ::File.join __dir__, "operating_system_service", "helpers.rb" +require "google/ads/ad_manager/v1/operating_system_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/credentials.rb new file mode 100644 index 000000000000..8a7e91c239b9 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module OperatingSystemService + # Credentials for the OperatingSystemService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/paths.rb new file mode 100644 index 000000000000..83a280ecac57 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module OperatingSystemService + # Path helper methods for the OperatingSystemService API. + module Paths + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}` + # + # @param network_code [String] + # + # @return [::String] + def network_path network_code: + "networks/#{network_code}" + end + + ## + # Create a fully-qualified OperatingSystem resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/operatingSystems/{operating_system}` + # + # @param network_code [String] + # @param operating_system [String] + # + # @return [::String] + def operating_system_path network_code:, operating_system: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/operatingSystems/#{operating_system}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest.rb new file mode 100644 index 000000000000..b99506a45334 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/operating_system_service/credentials" +require "google/ads/ad_manager/v1/operating_system_service/paths" +require "google/ads/ad_manager/v1/operating_system_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `OperatingSystem` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/operating_system_service/rest" + # client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new + # + module OperatingSystemService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/operating_system_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest/client.rb new file mode 100644 index 000000000000..758ac4fa7ca2 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest/client.rb @@ -0,0 +1,538 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/operating_system_service_pb" +require "google/ads/ad_manager/v1/operating_system_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module OperatingSystemService + module Rest + ## + # REST client for the OperatingSystemService service. + # + # Provides methods for handling `OperatingSystem` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :operating_system_service_stub + + ## + # Configure the OperatingSystemService Client class. + # + # See {::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OperatingSystemService clients + # ::Google::Ads::AdManager::V1::OperatingSystemService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OperatingSystemService 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::Ads::AdManager::V1::OperatingSystemService::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 + @operating_system_service_stub.universe_domain + end + + ## + # Create a new OperatingSystemService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OperatingSystemService 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 + + @operating_system_service_stub = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @operating_system_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 + @operating_system_service_stub.logger + end + + # Service calls + + ## + # API to retrieve a `OperatingSystem` object. + # + # @overload get_operating_system(request, options = nil) + # Pass arguments to `get_operating_system` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetOperatingSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetOperatingSystemRequest, ::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_operating_system(name: nil) + # Pass arguments to `get_operating_system` 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 resource name of the OperatingSystem. + # Format: `networks/{network_code}/operatingSystems/{operating_system_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::OperatingSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::OperatingSystem] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetOperatingSystemRequest.new + # + # # Call the get_operating_system method. + # result = client.get_operating_system request + # + # # The returned object is of type Google::Ads::AdManager::V1::OperatingSystem. + # p result + # + def get_operating_system request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetOperatingSystemRequest + + # 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_operating_system.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::Ads::AdManager::V1::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_operating_system.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operating_system.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operating_system_service_stub.get_operating_system 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 + + ## + # API to retrieve a list of `OperatingSystem` objects. + # + # @overload list_operating_systems(request, options = nil) + # Pass arguments to `list_operating_systems` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListOperatingSystemsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListOperatingSystemsRequest, ::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_operating_systems(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_operating_systems` 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 parent, which owns this collection of OperatingSystems. + # Format: `networks/{network_code}` + # @param page_size [::Integer] + # Optional. The maximum number of `OperatingSystems` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `OperatingSystems` will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOperatingSystems` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOperatingSystems` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::OperatingSystem>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::OperatingSystem>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListOperatingSystemsRequest.new + # + # # Call the list_operating_systems method. + # result = client.list_operating_systems 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::Ads::AdManager::V1::OperatingSystem. + # p item + # end + # + def list_operating_systems request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListOperatingSystemsRequest + + # 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_operating_systems.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::Ads::AdManager::V1::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_operating_systems.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operating_systems.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operating_system_service_stub.list_operating_systems request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operating_system_service_stub, :list_operating_systems, "operating_systems", 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 OperatingSystemService REST API. + # + # This class represents the configuration for OperatingSystemService 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::Ads::AdManager::V1::OperatingSystemService::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 + # # get_operating_system to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_operating_system.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_operating_system.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 = "admanager.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 OperatingSystemService 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 `get_operating_system` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operating_system + ## + # RPC-specific configuration for `list_operating_systems` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operating_systems + + # @private + def initialize parent_rpcs = nil + get_operating_system_config = parent_rpcs.get_operating_system if parent_rpcs.respond_to? :get_operating_system + @get_operating_system = ::Gapic::Config::Method.new get_operating_system_config + list_operating_systems_config = parent_rpcs.list_operating_systems if parent_rpcs.respond_to? :list_operating_systems + @list_operating_systems = ::Gapic::Config::Method.new list_operating_systems_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest/service_stub.rb new file mode 100644 index 000000000000..77809ef26cd6 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/operating_system_service_pb" + +module Google + module Ads + module AdManager + module V1 + module OperatingSystemService + module Rest + ## + # REST service stub for the OperatingSystemService 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: true, + 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 get_operating_system REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetOperatingSystemRequest] + # 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::Ads::AdManager::V1::OperatingSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::OperatingSystem] + # A result object deserialized from the server's reply + def get_operating_system request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_operating_system_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_operating_system", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::OperatingSystem.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_operating_systems REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListOperatingSystemsRequest] + # 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::Ads::AdManager::V1::ListOperatingSystemsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListOperatingSystemsResponse] + # A result object deserialized from the server's reply + def list_operating_systems request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_operating_systems_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_operating_systems", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListOperatingSystemsResponse.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 get_operating_system REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetOperatingSystemRequest] + # 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_operating_system_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/operatingSystems/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operating_systems REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListOperatingSystemsRequest] + # 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_operating_systems_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/operatingSystems", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service.rb new file mode 100644 index 000000000000..e62411bf864f --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/operating_system_version_service/credentials" +require "google/ads/ad_manager/v1/operating_system_version_service/paths" +require "google/ads/ad_manager/v1/operating_system_version_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `OperatingSystemVersion` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/operating_system_version_service/rest" + # client = ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new + # + module OperatingSystemVersionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "operating_system_version_service", "helpers.rb" +require "google/ads/ad_manager/v1/operating_system_version_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/credentials.rb new file mode 100644 index 000000000000..0ce5585478fb --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module OperatingSystemVersionService + # Credentials for the OperatingSystemVersionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/paths.rb new file mode 100644 index 000000000000..c9f8d37623d4 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module OperatingSystemVersionService + # Path helper methods for the OperatingSystemVersionService API. + module Paths + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}` + # + # @param network_code [String] + # + # @return [::String] + def network_path network_code: + "networks/#{network_code}" + end + + ## + # Create a fully-qualified OperatingSystemVersion resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/operatingSystemVersions/{operating_system_version}` + # + # @param network_code [String] + # @param operating_system_version [String] + # + # @return [::String] + def operating_system_version_path network_code:, operating_system_version: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/operatingSystemVersions/#{operating_system_version}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest.rb new file mode 100644 index 000000000000..558ecb1ac97c --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/operating_system_version_service/credentials" +require "google/ads/ad_manager/v1/operating_system_version_service/paths" +require "google/ads/ad_manager/v1/operating_system_version_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `OperatingSystemVersion` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/operating_system_version_service/rest" + # client = ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new + # + module OperatingSystemVersionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/operating_system_version_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/client.rb new file mode 100644 index 000000000000..9dfdba924f79 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/client.rb @@ -0,0 +1,541 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/operating_system_version_service_pb" +require "google/ads/ad_manager/v1/operating_system_version_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module OperatingSystemVersionService + module Rest + ## + # REST client for the OperatingSystemVersionService service. + # + # Provides methods for handling `OperatingSystemVersion` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :operating_system_version_service_stub + + ## + # Configure the OperatingSystemVersionService Client class. + # + # See {::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OperatingSystemVersionService clients + # ::Google::Ads::AdManager::V1::OperatingSystemVersionService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OperatingSystemVersionService 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::Ads::AdManager::V1::OperatingSystemVersionService::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 + @operating_system_version_service_stub.universe_domain + end + + ## + # Create a new OperatingSystemVersionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OperatingSystemVersionService 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 + + @operating_system_version_service_stub = ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @operating_system_version_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 + @operating_system_version_service_stub.logger + end + + # Service calls + + ## + # API to retrieve a `OperatingSystemVersion` object. + # + # @overload get_operating_system_version(request, options = nil) + # Pass arguments to `get_operating_system_version` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest, ::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_operating_system_version(name: nil) + # Pass arguments to `get_operating_system_version` 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 resource name of the OperatingSystemVersion. + # Format: + # `networks/{network_code}/operatingSystemVersions/{operating_system_version_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::OperatingSystemVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::OperatingSystemVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest.new + # + # # Call the get_operating_system_version method. + # result = client.get_operating_system_version request + # + # # The returned object is of type Google::Ads::AdManager::V1::OperatingSystemVersion. + # p result + # + def get_operating_system_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest + + # 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_operating_system_version.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::Ads::AdManager::V1::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_operating_system_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operating_system_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operating_system_version_service_stub.get_operating_system_version 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 + + ## + # API to retrieve a list of `OperatingSystemVersion` objects. + # + # @overload list_operating_system_versions(request, options = nil) + # Pass arguments to `list_operating_system_versions` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest, ::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_operating_system_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_operating_system_versions` 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 parent, which owns this collection of + # OperatingSystemVersions. Format: `networks/{network_code}` + # @param page_size [::Integer] + # Optional. The maximum number of `OperatingSystemVersions` to return. The + # service may return fewer than this value. If unspecified, at most 50 + # `OperatingSystemVersions` will be returned. The maximum value is 1000; + # values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListOperatingSystemVersions` call. Provide this to retrieve the subsequent + # page. + # + # When paginating, all other parameters provided to + # `ListOperatingSystemVersions` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::OperatingSystemVersion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::OperatingSystemVersion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest.new + # + # # Call the list_operating_system_versions method. + # result = client.list_operating_system_versions 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::Ads::AdManager::V1::OperatingSystemVersion. + # p item + # end + # + def list_operating_system_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest + + # 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_operating_system_versions.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::Ads::AdManager::V1::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_operating_system_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operating_system_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operating_system_version_service_stub.list_operating_system_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operating_system_version_service_stub, :list_operating_system_versions, "operating_system_versions", 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 OperatingSystemVersionService REST API. + # + # This class represents the configuration for OperatingSystemVersionService 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::Ads::AdManager::V1::OperatingSystemVersionService::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 + # # get_operating_system_version to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_operating_system_version.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_operating_system_version.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 = "admanager.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 OperatingSystemVersionService 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 `get_operating_system_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operating_system_version + ## + # RPC-specific configuration for `list_operating_system_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operating_system_versions + + # @private + def initialize parent_rpcs = nil + get_operating_system_version_config = parent_rpcs.get_operating_system_version if parent_rpcs.respond_to? :get_operating_system_version + @get_operating_system_version = ::Gapic::Config::Method.new get_operating_system_version_config + list_operating_system_versions_config = parent_rpcs.list_operating_system_versions if parent_rpcs.respond_to? :list_operating_system_versions + @list_operating_system_versions = ::Gapic::Config::Method.new list_operating_system_versions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/service_stub.rb new file mode 100644 index 000000000000..e5ad219b1488 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/operating_system_version_service_pb" + +module Google + module Ads + module AdManager + module V1 + module OperatingSystemVersionService + module Rest + ## + # REST service stub for the OperatingSystemVersionService 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: true, + 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 get_operating_system_version REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest] + # 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::Ads::AdManager::V1::OperatingSystemVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::OperatingSystemVersion] + # A result object deserialized from the server's reply + def get_operating_system_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_operating_system_version_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_operating_system_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::OperatingSystemVersion.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_operating_system_versions REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest] + # 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::Ads::AdManager::V1::ListOperatingSystemVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListOperatingSystemVersionsResponse] + # A result object deserialized from the server's reply + def list_operating_system_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_operating_system_versions_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_operating_system_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListOperatingSystemVersionsResponse.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 get_operating_system_version REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest] + # 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_operating_system_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/operatingSystemVersions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operating_system_versions REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest] + # 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_operating_system_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/operatingSystemVersions", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/order_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/order_service/credentials.rb index ae81800cf137..35108f4bfd1b 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/order_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/order_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module OrderService # Credentials for the OrderService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/placement_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/placement_service/credentials.rb index 021a4bfcdb6f..1e60575972c9 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/placement_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/placement_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module PlacementService # Credentials for the PlacementService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service.rb new file mode 100644 index 000000000000..9586c3e6ed91 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/private_auction_deal_service/credentials" +require "google/ads/ad_manager/v1/private_auction_deal_service/paths" +require "google/ads/ad_manager/v1/private_auction_deal_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `PrivateAuctionDeal` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/private_auction_deal_service/rest" + # client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + # + module PrivateAuctionDealService + end + end + end + end +end + +helper_path = ::File.join __dir__, "private_auction_deal_service", "helpers.rb" +require "google/ads/ad_manager/v1/private_auction_deal_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/credentials.rb new file mode 100644 index 000000000000..a9b1a33fb1fe --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module PrivateAuctionDealService + # Credentials for the PrivateAuctionDealService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/paths.rb new file mode 100644 index 000000000000..dfcc8c80c0a1 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/paths.rb @@ -0,0 +1,217 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module PrivateAuctionDealService + # Path helper methods for the PrivateAuctionDealService API. + module Paths + ## + # Create a fully-qualified AdUnit resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/adUnits/{ad_unit}` + # + # @param network_code [String] + # @param ad_unit [String] + # + # @return [::String] + def ad_unit_path network_code:, ad_unit: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/adUnits/#{ad_unit}" + end + + ## + # Create a fully-qualified BandwidthGroup resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/bandwidthGroups/{bandwidth_group}` + # + # @param network_code [String] + # @param bandwidth_group [String] + # + # @return [::String] + def bandwidth_group_path network_code:, bandwidth_group: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/bandwidthGroups/#{bandwidth_group}" + end + + ## + # Create a fully-qualified CustomTargetingKey resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/customTargetingKeys/{custom_targeting_key}` + # + # @param network_code [String] + # @param custom_targeting_key [String] + # + # @return [::String] + def custom_targeting_key_path network_code:, custom_targeting_key: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/customTargetingKeys/#{custom_targeting_key}" + end + + ## + # Create a fully-qualified CustomTargetingValue resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/customTargetingValues/{custom_targeting_value}` + # + # @param network_code [String] + # @param custom_targeting_value [String] + # + # @return [::String] + def custom_targeting_value_path network_code:, custom_targeting_value: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/customTargetingValues/#{custom_targeting_value}" + end + + ## + # Create a fully-qualified DeviceCategory resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/deviceCategories/{device_category}` + # + # @param network_code [String] + # @param device_category [String] + # + # @return [::String] + def device_category_path network_code:, device_category: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/deviceCategories/#{device_category}" + end + + ## + # Create a fully-qualified GeoTarget resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/geoTargets/{geo_target}` + # + # @param network_code [String] + # @param geo_target [String] + # + # @return [::String] + def geo_target_path network_code:, geo_target: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/geoTargets/#{geo_target}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}` + # + # @param network_code [String] + # + # @return [::String] + def network_path network_code: + "networks/#{network_code}" + end + + ## + # Create a fully-qualified OperatingSystem resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/operatingSystems/{operating_system}` + # + # @param network_code [String] + # @param operating_system [String] + # + # @return [::String] + def operating_system_path network_code:, operating_system: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/operatingSystems/#{operating_system}" + end + + ## + # Create a fully-qualified OperatingSystemVersion resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/operatingSystemVersions/{operating_system_version}` + # + # @param network_code [String] + # @param operating_system_version [String] + # + # @return [::String] + def operating_system_version_path network_code:, operating_system_version: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/operatingSystemVersions/#{operating_system_version}" + end + + ## + # Create a fully-qualified Placement resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/placements/{placement}` + # + # @param network_code [String] + # @param placement [String] + # + # @return [::String] + def placement_path network_code:, placement: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/placements/#{placement}" + end + + ## + # Create a fully-qualified PrivateAuctionDeal resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/privateAuctionDeals/{private_auction_deal}` + # + # @param network_code [String] + # @param private_auction_deal [String] + # + # @return [::String] + def private_auction_deal_path network_code:, private_auction_deal: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/privateAuctionDeals/#{private_auction_deal}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest.rb new file mode 100644 index 000000000000..7beded4851e0 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/private_auction_deal_service/credentials" +require "google/ads/ad_manager/v1/private_auction_deal_service/paths" +require "google/ads/ad_manager/v1/private_auction_deal_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `PrivateAuctionDeal` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/private_auction_deal_service/rest" + # client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + # + module PrivateAuctionDealService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/private_auction_deal_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/client.rb new file mode 100644 index 000000000000..216d5c7d17fa --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/client.rb @@ -0,0 +1,719 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/private_auction_deal_service_pb" +require "google/ads/ad_manager/v1/private_auction_deal_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module PrivateAuctionDealService + module Rest + ## + # REST client for the PrivateAuctionDealService service. + # + # Provides methods for handling `PrivateAuctionDeal` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :private_auction_deal_service_stub + + ## + # Configure the PrivateAuctionDealService Client class. + # + # See {::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrivateAuctionDealService clients + # ::Google::Ads::AdManager::V1::PrivateAuctionDealService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PrivateAuctionDealService 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::Ads::AdManager::V1::PrivateAuctionDealService::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 + @private_auction_deal_service_stub.universe_domain + end + + ## + # Create a new PrivateAuctionDealService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrivateAuctionDealService 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 + + @private_auction_deal_service_stub = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @private_auction_deal_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 + @private_auction_deal_service_stub.logger + end + + # Service calls + + ## + # API to retrieve a `PrivateAuctionDeal` object. + # + # @overload get_private_auction_deal(request, options = nil) + # Pass arguments to `get_private_auction_deal` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest, ::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_private_auction_deal(name: nil) + # Pass arguments to `get_private_auction_deal` 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 resource name of the PrivateAuctionDeal. + # Format: + # `networks/{network_code}/privateAuctionDeals/{private_auction_deal_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest.new + # + # # Call the get_private_auction_deal method. + # result = client.get_private_auction_deal request + # + # # The returned object is of type Google::Ads::AdManager::V1::PrivateAuctionDeal. + # p result + # + def get_private_auction_deal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest + + # 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_private_auction_deal.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::Ads::AdManager::V1::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_private_auction_deal.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_private_auction_deal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @private_auction_deal_service_stub.get_private_auction_deal 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 + + ## + # API to retrieve a list of `PrivateAuctionDeal` objects. + # + # @overload list_private_auction_deals(request, options = nil) + # Pass arguments to `list_private_auction_deals` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest, ::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_private_auction_deals(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_private_auction_deals` 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 parent, which owns this collection of PrivateAuctionDeals. + # Format: + # `networks/{network_code}` + # @param page_size [::Integer] + # Optional. The maximum number of `PrivateAuctionDeals` to return. The + # service may return fewer than this value. If unspecified, at most 50 + # `PrivateAuctionDeals` will be returned. The maximum value is 1000; + # values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPrivateAuctionDeals` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrivateAuctionDeals` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::PrivateAuctionDeal>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::PrivateAuctionDeal>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest.new + # + # # Call the list_private_auction_deals method. + # result = client.list_private_auction_deals 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::Ads::AdManager::V1::PrivateAuctionDeal. + # p item + # end + # + def list_private_auction_deals request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest + + # 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_private_auction_deals.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::Ads::AdManager::V1::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_private_auction_deals.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_private_auction_deals.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @private_auction_deal_service_stub.list_private_auction_deals request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @private_auction_deal_service_stub, :list_private_auction_deals, "private_auction_deals", 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 + + ## + # API to create a `PrivateAuctionDeal` object. + # + # @overload create_private_auction_deal(request, options = nil) + # Pass arguments to `create_private_auction_deal` via a request object, either of type + # {::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest, ::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_private_auction_deal(parent: nil, private_auction_deal: nil) + # Pass arguments to `create_private_auction_deal` 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 parent resource where this `PrivateAuctionDeal` will be + # created. Format: `networks/{network_code}` + # @param private_auction_deal [::Google::Ads::AdManager::V1::PrivateAuctionDeal, ::Hash] + # Required. The `PrivateAuctionDeal` to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest.new + # + # # Call the create_private_auction_deal method. + # result = client.create_private_auction_deal request + # + # # The returned object is of type Google::Ads::AdManager::V1::PrivateAuctionDeal. + # p result + # + def create_private_auction_deal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest + + # 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_private_auction_deal.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::Ads::AdManager::V1::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_private_auction_deal.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_private_auction_deal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @private_auction_deal_service_stub.create_private_auction_deal 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 + + ## + # API to update a `PrivateAuctionDeal` object. + # + # @overload update_private_auction_deal(request, options = nil) + # Pass arguments to `update_private_auction_deal` via a request object, either of type + # {::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest, ::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 update_private_auction_deal(private_auction_deal: nil, update_mask: nil) + # Pass arguments to `update_private_auction_deal` 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 private_auction_deal [::Google::Ads::AdManager::V1::PrivateAuctionDeal, ::Hash] + # Required. The `PrivateAuctionDeal` to update. + # + # The `PrivateAuctionDeal`'s `name` is used to identify the + # `PrivateAuctionDeal` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest.new + # + # # Call the update_private_auction_deal method. + # result = client.update_private_auction_deal request + # + # # The returned object is of type Google::Ads::AdManager::V1::PrivateAuctionDeal. + # p result + # + def update_private_auction_deal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest + + # 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.update_private_auction_deal.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::Ads::AdManager::V1::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.update_private_auction_deal.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_private_auction_deal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @private_auction_deal_service_stub.update_private_auction_deal 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 + + ## + # Configuration class for the PrivateAuctionDealService REST API. + # + # This class represents the configuration for PrivateAuctionDealService 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::Ads::AdManager::V1::PrivateAuctionDealService::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 + # # get_private_auction_deal to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_private_auction_deal.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_private_auction_deal.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 = "admanager.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 PrivateAuctionDealService 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 `get_private_auction_deal` + # @return [::Gapic::Config::Method] + # + attr_reader :get_private_auction_deal + ## + # RPC-specific configuration for `list_private_auction_deals` + # @return [::Gapic::Config::Method] + # + attr_reader :list_private_auction_deals + ## + # RPC-specific configuration for `create_private_auction_deal` + # @return [::Gapic::Config::Method] + # + attr_reader :create_private_auction_deal + ## + # RPC-specific configuration for `update_private_auction_deal` + # @return [::Gapic::Config::Method] + # + attr_reader :update_private_auction_deal + + # @private + def initialize parent_rpcs = nil + get_private_auction_deal_config = parent_rpcs.get_private_auction_deal if parent_rpcs.respond_to? :get_private_auction_deal + @get_private_auction_deal = ::Gapic::Config::Method.new get_private_auction_deal_config + list_private_auction_deals_config = parent_rpcs.list_private_auction_deals if parent_rpcs.respond_to? :list_private_auction_deals + @list_private_auction_deals = ::Gapic::Config::Method.new list_private_auction_deals_config + create_private_auction_deal_config = parent_rpcs.create_private_auction_deal if parent_rpcs.respond_to? :create_private_auction_deal + @create_private_auction_deal = ::Gapic::Config::Method.new create_private_auction_deal_config + update_private_auction_deal_config = parent_rpcs.update_private_auction_deal if parent_rpcs.respond_to? :update_private_auction_deal + @update_private_auction_deal = ::Gapic::Config::Method.new update_private_auction_deal_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/service_stub.rb new file mode 100644 index 000000000000..29db1517ef0e --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/service_stub.rb @@ -0,0 +1,327 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/private_auction_deal_service_pb" + +module Google + module Ads + module AdManager + module V1 + module PrivateAuctionDealService + module Rest + ## + # REST service stub for the PrivateAuctionDealService 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: true, + 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 get_private_auction_deal REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest] + # 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::Ads::AdManager::V1::PrivateAuctionDeal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # A result object deserialized from the server's reply + def get_private_auction_deal request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_private_auction_deal_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_private_auction_deal", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::PrivateAuctionDeal.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_private_auction_deals REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest] + # 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::Ads::AdManager::V1::ListPrivateAuctionDealsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListPrivateAuctionDealsResponse] + # A result object deserialized from the server's reply + def list_private_auction_deals request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_private_auction_deals_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_private_auction_deals", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListPrivateAuctionDealsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_private_auction_deal REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest] + # 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::Ads::AdManager::V1::PrivateAuctionDeal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # A result object deserialized from the server's reply + def create_private_auction_deal request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_private_auction_deal_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_private_auction_deal", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::PrivateAuctionDeal.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_private_auction_deal REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest] + # 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::Ads::AdManager::V1::PrivateAuctionDeal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # A result object deserialized from the server's reply + def update_private_auction_deal request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_private_auction_deal_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: "update_private_auction_deal", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::PrivateAuctionDeal.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 get_private_auction_deal REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest] + # 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_private_auction_deal_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/privateAuctionDeals/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_private_auction_deals REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest] + # 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_private_auction_deals_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/privateAuctionDeals", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_private_auction_deal REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest] + # 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_private_auction_deal_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/privateAuctionDeals", + body: "private_auction_deal", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_private_auction_deal REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_private_auction_deal_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{private_auction_deal.name}", + body: "private_auction_deal", + matches: [ + ["private_auction_deal.name", %r{^networks/[^/]+/privateAuctionDeals/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service.rb new file mode 100644 index 000000000000..513d60f57323 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/private_auction_service/credentials" +require "google/ads/ad_manager/v1/private_auction_service/paths" +require "google/ads/ad_manager/v1/private_auction_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `PrivateAuction` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/private_auction_service/rest" + # client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + # + module PrivateAuctionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "private_auction_service", "helpers.rb" +require "google/ads/ad_manager/v1/private_auction_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/credentials.rb new file mode 100644 index 000000000000..103241c896ab --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module PrivateAuctionService + # Credentials for the PrivateAuctionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/paths.rb new file mode 100644 index 000000000000..3b5ab119caf4 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/paths.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module PrivateAuctionService + # Path helper methods for the PrivateAuctionService API. + module Paths + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}` + # + # @param network_code [String] + # + # @return [::String] + def network_path network_code: + "networks/#{network_code}" + end + + ## + # Create a fully-qualified PrivateAuction resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/privateAuctions/{private_auction}` + # + # @param network_code [String] + # @param private_auction [String] + # + # @return [::String] + def private_auction_path network_code:, private_auction: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/privateAuctions/#{private_auction}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/users/{user}` + # + # @param network_code [String] + # @param user [String] + # + # @return [::String] + def user_path network_code:, user: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/users/#{user}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest.rb new file mode 100644 index 000000000000..b8fd5f515a60 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/private_auction_service/credentials" +require "google/ads/ad_manager/v1/private_auction_service/paths" +require "google/ads/ad_manager/v1/private_auction_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `PrivateAuction` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/private_auction_service/rest" + # client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + # + module PrivateAuctionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/private_auction_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest/client.rb new file mode 100644 index 000000000000..9927f7a08d20 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest/client.rb @@ -0,0 +1,718 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/private_auction_service_pb" +require "google/ads/ad_manager/v1/private_auction_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module PrivateAuctionService + module Rest + ## + # REST client for the PrivateAuctionService service. + # + # Provides methods for handling `PrivateAuction` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :private_auction_service_stub + + ## + # Configure the PrivateAuctionService Client class. + # + # See {::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrivateAuctionService clients + # ::Google::Ads::AdManager::V1::PrivateAuctionService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PrivateAuctionService 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::Ads::AdManager::V1::PrivateAuctionService::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 + @private_auction_service_stub.universe_domain + end + + ## + # Create a new PrivateAuctionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrivateAuctionService 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 + + @private_auction_service_stub = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @private_auction_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 + @private_auction_service_stub.logger + end + + # Service calls + + ## + # API to retrieve a `PrivateAuction` object. + # + # @overload get_private_auction(request, options = nil) + # Pass arguments to `get_private_auction` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetPrivateAuctionRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetPrivateAuctionRequest, ::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_private_auction(name: nil) + # Pass arguments to `get_private_auction` 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 resource name of the PrivateAuction. + # Format: + # `networks/{network_code}/privateAuctions/{private_auction_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::PrivateAuction] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuction] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetPrivateAuctionRequest.new + # + # # Call the get_private_auction method. + # result = client.get_private_auction request + # + # # The returned object is of type Google::Ads::AdManager::V1::PrivateAuction. + # p result + # + def get_private_auction request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetPrivateAuctionRequest + + # 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_private_auction.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::Ads::AdManager::V1::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_private_auction.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_private_auction.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @private_auction_service_stub.get_private_auction 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 + + ## + # API to retrieve a list of `PrivateAuction` objects. + # + # @overload list_private_auctions(request, options = nil) + # Pass arguments to `list_private_auctions` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest, ::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_private_auctions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_private_auctions` 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 parent, which owns this collection of PrivateAuctions. + # Format: `networks/{network_code}` + # @param page_size [::Integer] + # Optional. The maximum number of `PrivateAuctions` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `PrivateAuctions` will be returned. The maximum value is 1000; + # values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPrivateAuctions` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrivateAuctions` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::PrivateAuction>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::PrivateAuction>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListPrivateAuctionsRequest.new + # + # # Call the list_private_auctions method. + # result = client.list_private_auctions 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::Ads::AdManager::V1::PrivateAuction. + # p item + # end + # + def list_private_auctions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest + + # 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_private_auctions.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::Ads::AdManager::V1::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_private_auctions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_private_auctions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @private_auction_service_stub.list_private_auctions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @private_auction_service_stub, :list_private_auctions, "private_auctions", 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 + + ## + # API to create a `PrivateAuction` object. + # + # @overload create_private_auction(request, options = nil) + # Pass arguments to `create_private_auction` via a request object, either of type + # {::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest, ::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_private_auction(parent: nil, private_auction: nil) + # Pass arguments to `create_private_auction` 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 parent resource where this `PrivateAuction` will be + # created. Format: `networks/{network_code}` + # @param private_auction [::Google::Ads::AdManager::V1::PrivateAuction, ::Hash] + # Required. The `PrivateAuction` to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::PrivateAuction] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuction] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::CreatePrivateAuctionRequest.new + # + # # Call the create_private_auction method. + # result = client.create_private_auction request + # + # # The returned object is of type Google::Ads::AdManager::V1::PrivateAuction. + # p result + # + def create_private_auction request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest + + # 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_private_auction.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::Ads::AdManager::V1::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_private_auction.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_private_auction.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @private_auction_service_stub.create_private_auction 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 + + ## + # API to update a `PrivateAuction` object. + # + # @overload update_private_auction(request, options = nil) + # Pass arguments to `update_private_auction` via a request object, either of type + # {::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest, ::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 update_private_auction(private_auction: nil, update_mask: nil) + # Pass arguments to `update_private_auction` 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 private_auction [::Google::Ads::AdManager::V1::PrivateAuction, ::Hash] + # Required. The `PrivateAuction` to update. + # + # The `PrivateAuction`'s `name` is used to identify the + # `PrivateAuction` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::PrivateAuction] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuction] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest.new + # + # # Call the update_private_auction method. + # result = client.update_private_auction request + # + # # The returned object is of type Google::Ads::AdManager::V1::PrivateAuction. + # p result + # + def update_private_auction request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest + + # 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.update_private_auction.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::Ads::AdManager::V1::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.update_private_auction.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_private_auction.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @private_auction_service_stub.update_private_auction 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 + + ## + # Configuration class for the PrivateAuctionService REST API. + # + # This class represents the configuration for PrivateAuctionService 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::Ads::AdManager::V1::PrivateAuctionService::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 + # # get_private_auction to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_private_auction.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_private_auction.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 = "admanager.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 PrivateAuctionService 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 `get_private_auction` + # @return [::Gapic::Config::Method] + # + attr_reader :get_private_auction + ## + # RPC-specific configuration for `list_private_auctions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_private_auctions + ## + # RPC-specific configuration for `create_private_auction` + # @return [::Gapic::Config::Method] + # + attr_reader :create_private_auction + ## + # RPC-specific configuration for `update_private_auction` + # @return [::Gapic::Config::Method] + # + attr_reader :update_private_auction + + # @private + def initialize parent_rpcs = nil + get_private_auction_config = parent_rpcs.get_private_auction if parent_rpcs.respond_to? :get_private_auction + @get_private_auction = ::Gapic::Config::Method.new get_private_auction_config + list_private_auctions_config = parent_rpcs.list_private_auctions if parent_rpcs.respond_to? :list_private_auctions + @list_private_auctions = ::Gapic::Config::Method.new list_private_auctions_config + create_private_auction_config = parent_rpcs.create_private_auction if parent_rpcs.respond_to? :create_private_auction + @create_private_auction = ::Gapic::Config::Method.new create_private_auction_config + update_private_auction_config = parent_rpcs.update_private_auction if parent_rpcs.respond_to? :update_private_auction + @update_private_auction = ::Gapic::Config::Method.new update_private_auction_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest/service_stub.rb new file mode 100644 index 000000000000..8bbb18de0c9f --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/private_auction_service/rest/service_stub.rb @@ -0,0 +1,327 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/private_auction_service_pb" + +module Google + module Ads + module AdManager + module V1 + module PrivateAuctionService + module Rest + ## + # REST service stub for the PrivateAuctionService 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: true, + 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 get_private_auction REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetPrivateAuctionRequest] + # 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::Ads::AdManager::V1::PrivateAuction] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuction] + # A result object deserialized from the server's reply + def get_private_auction request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_private_auction_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_private_auction", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::PrivateAuction.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_private_auctions REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest] + # 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::Ads::AdManager::V1::ListPrivateAuctionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListPrivateAuctionsResponse] + # A result object deserialized from the server's reply + def list_private_auctions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_private_auctions_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_private_auctions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListPrivateAuctionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_private_auction REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest] + # 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::Ads::AdManager::V1::PrivateAuction] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuction] + # A result object deserialized from the server's reply + def create_private_auction request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_private_auction_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_private_auction", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::PrivateAuction.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_private_auction REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest] + # 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::Ads::AdManager::V1::PrivateAuction] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::PrivateAuction] + # A result object deserialized from the server's reply + def update_private_auction request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_private_auction_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: "update_private_auction", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::PrivateAuction.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 get_private_auction REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetPrivateAuctionRequest] + # 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_private_auction_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/privateAuctions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_private_auctions REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest] + # 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_private_auctions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/privateAuctions", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_private_auction REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest] + # 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_private_auction_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/privateAuctions", + body: "private_auction", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_private_auction REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_private_auction_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{private_auction.name}", + body: "private_auction", + matches: [ + ["private_auction.name", %r{^networks/[^/]+/privateAuctions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service.rb new file mode 100644 index 000000000000..08feeb5b2e29 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/programmatic_buyer_service/credentials" +require "google/ads/ad_manager/v1/programmatic_buyer_service/paths" +require "google/ads/ad_manager/v1/programmatic_buyer_service/rest" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `ProgrammaticBuyer` objects. + # + # @example Load this service and instantiate a REST client + # + # require "google/ads/ad_manager/v1/programmatic_buyer_service/rest" + # client = ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new + # + module ProgrammaticBuyerService + end + end + end + end +end + +helper_path = ::File.join __dir__, "programmatic_buyer_service", "helpers.rb" +require "google/ads/ad_manager/v1/programmatic_buyer_service/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/credentials.rb new file mode 100644 index 000000000000..ede7139f0bbf --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module ProgrammaticBuyerService + # Credentials for the ProgrammaticBuyerService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] + 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 diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/paths.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/paths.rb new file mode 100644 index 000000000000..3ef8d7edd4cf --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + module ProgrammaticBuyerService + # Path helper methods for the ProgrammaticBuyerService API. + module Paths + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}` + # + # @param network_code [String] + # + # @return [::String] + def network_path network_code: + "networks/#{network_code}" + end + + ## + # Create a fully-qualified ProgrammaticBuyer resource string. + # + # The resource will be in the following format: + # + # `networks/{network_code}/programmaticBuyers/{programmatic_buyer}` + # + # @param network_code [String] + # @param programmatic_buyer [String] + # + # @return [::String] + def programmatic_buyer_path network_code:, programmatic_buyer: + raise ::ArgumentError, "network_code cannot contain /" if network_code.to_s.include? "/" + + "networks/#{network_code}/programmaticBuyers/#{programmatic_buyer}" + end + + extend self + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest.rb new file mode 100644 index 000000000000..784283d5e544 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/ad_manager/v1/version" + +require "google/ads/ad_manager/v1/programmatic_buyer_service/credentials" +require "google/ads/ad_manager/v1/programmatic_buyer_service/paths" +require "google/ads/ad_manager/v1/programmatic_buyer_service/rest/client" + +module Google + module Ads + module AdManager + module V1 + ## + # Provides methods for handling `ProgrammaticBuyer` objects. + # + # To load this service and instantiate a REST client: + # + # require "google/ads/ad_manager/v1/programmatic_buyer_service/rest" + # client = ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new + # + module ProgrammaticBuyerService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/ads/ad_manager/v1/programmatic_buyer_service/rest/helpers" if ::File.file? helper_path diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/client.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/client.rb new file mode 100644 index 000000000000..beafc4d22350 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/client.rb @@ -0,0 +1,539 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/programmatic_buyer_service_pb" +require "google/ads/ad_manager/v1/programmatic_buyer_service/rest/service_stub" + +module Google + module Ads + module AdManager + module V1 + module ProgrammaticBuyerService + module Rest + ## + # REST client for the ProgrammaticBuyerService service. + # + # Provides methods for handling `ProgrammaticBuyer` objects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programmatic_buyer_service_stub + + ## + # Configure the ProgrammaticBuyerService Client class. + # + # See {::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgrammaticBuyerService clients + # ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::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", "Ads", "AdManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProgrammaticBuyerService 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::Ads::AdManager::V1::ProgrammaticBuyerService::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 + @programmatic_buyer_service_stub.universe_domain + end + + ## + # Create a new ProgrammaticBuyerService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgrammaticBuyerService 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 + + @programmatic_buyer_service_stub = ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @programmatic_buyer_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 + @programmatic_buyer_service_stub.logger + end + + # Service calls + + ## + # API to retrieve a `ProgrammaticBuyer` object. + # + # @overload get_programmatic_buyer(request, options = nil) + # Pass arguments to `get_programmatic_buyer` via a request object, either of type + # {::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest, ::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_programmatic_buyer(name: nil) + # Pass arguments to `get_programmatic_buyer` 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 resource name of the ProgrammaticBuyer. + # Format: + # `networks/{network_code}/programmaticBuyers/{buyer_account_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Ads::AdManager::V1::ProgrammaticBuyer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ProgrammaticBuyer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest.new + # + # # Call the get_programmatic_buyer method. + # result = client.get_programmatic_buyer request + # + # # The returned object is of type Google::Ads::AdManager::V1::ProgrammaticBuyer. + # p result + # + def get_programmatic_buyer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest + + # 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_programmatic_buyer.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::Ads::AdManager::V1::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_programmatic_buyer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_programmatic_buyer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programmatic_buyer_service_stub.get_programmatic_buyer 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 + + ## + # API to retrieve a list of `ProgrammaticBuyer` objects. + # + # @overload list_programmatic_buyers(request, options = nil) + # Pass arguments to `list_programmatic_buyers` via a request object, either of type + # {::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest, ::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_programmatic_buyers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) + # Pass arguments to `list_programmatic_buyers` 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 parent, which owns this collection of ProgrammaticBuyers. + # Format: `networks/{network_code}` + # @param page_size [::Integer] + # Optional. The maximum number of `ProgrammaticBuyers` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `ProgrammaticBuyers` will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListProgrammaticBuyers` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProgrammaticBuyers` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @param order_by [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @param skip [::Integer] + # Optional. Number of individual resources to skip while paginating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::ProgrammaticBuyer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::ProgrammaticBuyer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/ads/ad_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest.new + # + # # Call the list_programmatic_buyers method. + # result = client.list_programmatic_buyers 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::Ads::AdManager::V1::ProgrammaticBuyer. + # p item + # end + # + def list_programmatic_buyers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest + + # 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_programmatic_buyers.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::Ads::AdManager::V1::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_programmatic_buyers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_programmatic_buyers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programmatic_buyer_service_stub.list_programmatic_buyers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @programmatic_buyer_service_stub, :list_programmatic_buyers, "programmatic_buyers", 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 ProgrammaticBuyerService REST API. + # + # This class represents the configuration for ProgrammaticBuyerService 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::Ads::AdManager::V1::ProgrammaticBuyerService::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 + # # get_programmatic_buyer to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_programmatic_buyer.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_programmatic_buyer.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 = "admanager.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 ProgrammaticBuyerService 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 `get_programmatic_buyer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_programmatic_buyer + ## + # RPC-specific configuration for `list_programmatic_buyers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programmatic_buyers + + # @private + def initialize parent_rpcs = nil + get_programmatic_buyer_config = parent_rpcs.get_programmatic_buyer if parent_rpcs.respond_to? :get_programmatic_buyer + @get_programmatic_buyer = ::Gapic::Config::Method.new get_programmatic_buyer_config + list_programmatic_buyers_config = parent_rpcs.list_programmatic_buyers if parent_rpcs.respond_to? :list_programmatic_buyers + @list_programmatic_buyers = ::Gapic::Config::Method.new list_programmatic_buyers_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/service_stub.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/service_stub.rb new file mode 100644 index 000000000000..ed0925ec4365 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/programmatic_buyer_service_pb" + +module Google + module Ads + module AdManager + module V1 + module ProgrammaticBuyerService + module Rest + ## + # REST service stub for the ProgrammaticBuyerService 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: true, + 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 get_programmatic_buyer REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest] + # 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::Ads::AdManager::V1::ProgrammaticBuyer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ProgrammaticBuyer] + # A result object deserialized from the server's reply + def get_programmatic_buyer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_programmatic_buyer_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_programmatic_buyer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ProgrammaticBuyer.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_programmatic_buyers REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest] + # 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::Ads::AdManager::V1::ListProgrammaticBuyersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Ads::AdManager::V1::ListProgrammaticBuyersResponse] + # A result object deserialized from the server's reply + def list_programmatic_buyers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_programmatic_buyers_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_programmatic_buyers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Ads::AdManager::V1::ListProgrammaticBuyersResponse.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 get_programmatic_buyer REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest] + # 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_programmatic_buyer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^networks/[^/]+/programmaticBuyers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_programmatic_buyers REST call + # + # @param request_pb [::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest] + # 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_programmatic_buyers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/programmaticBuyers", + matches: [ + ["parent", %r{^networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/report_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/report_service/credentials.rb index 316dc7f13785..1fdabea65204 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/report_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/report_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module ReportService # Credentials for the ReportService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/report_service/rest/operations.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/report_service/rest/operations.rb index 91925e5020b5..13b992cb8701 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/report_service/rest/operations.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/report_service/rest/operations.rb @@ -860,13 +860,6 @@ def self.transcode_get_operation_request request_pb ["name", %r{^networks/[^/]+/operations/reports/runs/[^/]+/?$}, false] ] ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^networks/[^/]+/operations/reports/exports/[^/]+/?$}, false] - ] - ) transcoder.transcode request_pb end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/rest.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/rest.rb index 7213fae2e77c..c9ce811b7d2a 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/rest.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/rest.rb @@ -16,15 +16,24 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/ads/ad_manager/v1/ad_break_service/rest" require "google/ads/ad_manager/v1/ad_unit_service/rest" +require "google/ads/ad_manager/v1/bandwidth_group_service/rest" require "google/ads/ad_manager/v1/company_service/rest" require "google/ads/ad_manager/v1/custom_field_service/rest" require "google/ads/ad_manager/v1/custom_targeting_key_service/rest" require "google/ads/ad_manager/v1/custom_targeting_value_service/rest" +require "google/ads/ad_manager/v1/device_category_service/rest" require "google/ads/ad_manager/v1/entity_signals_mapping_service/rest" +require "google/ads/ad_manager/v1/geo_target_service/rest" require "google/ads/ad_manager/v1/network_service/rest" +require "google/ads/ad_manager/v1/operating_system_service/rest" +require "google/ads/ad_manager/v1/operating_system_version_service/rest" require "google/ads/ad_manager/v1/order_service/rest" require "google/ads/ad_manager/v1/placement_service/rest" +require "google/ads/ad_manager/v1/private_auction_deal_service/rest" +require "google/ads/ad_manager/v1/private_auction_service/rest" +require "google/ads/ad_manager/v1/programmatic_buyer_service/rest" require "google/ads/ad_manager/v1/report_service/rest" require "google/ads/ad_manager/v1/role_service/rest" require "google/ads/ad_manager/v1/taxonomy_category_service/rest" @@ -40,7 +49,7 @@ module AdManager # @example # # require "google/ads/ad_manager/v1/rest" - # client = ::Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new + # client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new # module V1 end diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/role_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/role_service/credentials.rb index 31a2d2e0f4a6..0d55dcbcdbb2 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/role_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/role_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module RoleService # Credentials for the RoleService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/taxonomy_category_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/taxonomy_category_service/credentials.rb index bf9c81f8dd5c..bb1f0c818e04 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/taxonomy_category_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/taxonomy_category_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module TaxonomyCategoryService # Credentials for the TaxonomyCategoryService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/user_service/credentials.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/user_service/credentials.rb index 618ec5120934..971957d8cf1f 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/user_service/credentials.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/user_service/credentials.rb @@ -25,6 +25,9 @@ module V1 module UserService # Credentials for the UserService API. class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/admanager" + ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_messages_pb.rb new file mode 100644 index 000000000000..34958a53b46c --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_messages_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/ad_break_messages.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/early_ad_break_notification_enums_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/ads/admanager/v1/ad_break_messages.proto\x12\x17google.ads.admanager.v1\x1a?google/ads/admanager/v1/early_ad_break_notification_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa8\x06\n\x07\x41\x64\x42reak\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12 \n\x0b\x61\x64_break_id\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12\x1e\n\tasset_key\x18\x03 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12%\n\x10\x63ustom_asset_key\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x02\x88\x01\x01\x12\x41\n\x13\x65xpected_start_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x04\x88\x01\x01\x12U\n\x0b\x62reak_state\x18\x07 \x01(\x0e\x32\x36.google.ads.admanager.v1.AdBreakStateEnum.AdBreakStateB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12 \n\x0e\x62reak_sequence\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x06\x88\x01\x01\x12#\n\x11pod_template_name\x18\t \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1f\n\rcustom_params\x18\n \x01(\tB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12!\n\x0fscte_35_cue_out\x18\x0b \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01:\x8d\x01\xea\x41\x89\x01\n admanager.googleapis.com/AdBreak\x12Rnetworks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}*\x08\x61\x64\x42reaks2\x07\x61\x64\x42reakB\x0e\n\x0c_ad_break_idB\x0c\n\n_asset_keyB\x13\n\x11_custom_asset_keyB\x16\n\x14_expected_start_timeB\x0b\n\t_durationB\x0e\n\x0c_break_stateB\x11\n\x0f_break_sequenceB\x14\n\x12_pod_template_nameB\x10\n\x0e_custom_paramsB\x12\n\x10_scte_35_cue_outB\xc8\x01\n\x1b\x63om.google.ads.admanager.v1B\x14\x41\x64\x42reakMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + AdBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.AdBreak").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_service_pb.rb new file mode 100644 index 000000000000..a7e40632a796 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_service_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/ad_break_service.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/ad_break_messages_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n.google/ads/admanager/v1/ad_break_service.proto\x12\x17google.ads.admanager.v1\x1a/google/ads/admanager/v1/ad_break_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"K\n\x11GetAdBreakRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/AdBreak\"\xc7\x01\n\x13ListAdBreaksRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(admanager.googleapis.com/LiveStreamEvent\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"x\n\x14ListAdBreaksResponse\x12\x33\n\tad_breaks\x18\x01 \x03(\x0b\x32 .google.ads.admanager.v1.AdBreak\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x91\x01\n\x14\x43reateAdBreakRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(admanager.googleapis.com/LiveStreamEvent\x12\x37\n\x08\x61\x64_break\x18\x02 \x01(\x0b\x32 .google.ads.admanager.v1.AdBreakB\x03\xe0\x41\x02\"\x85\x01\n\x14UpdateAdBreakRequest\x12\x37\n\x08\x61\x64_break\x18\x01 \x01(\x0b\x32 .google.ads.admanager.v1.AdBreakB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"N\n\x14\x44\x65leteAdBreakRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/AdBreak2\x97\x0b\n\x0e\x41\x64\x42reakService\x12\xa8\x02\n\nGetAdBreak\x12*.google.ads.admanager.v1.GetAdBreakRequest\x1a .google.ads.admanager.v1.AdBreak\"\xcb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbd\x01\x12=/v1/{name=networks/*/liveStreamEventsByAssetKey/*/adBreaks/*}ZE\x12\x43/v1/{name=networks/*/liveStreamEventsByCustomAssetKey/*/adBreaks/*}Z5\x12\x33/v1/{name=networks/*/liveStreamEvents/*/adBreaks/*}\x12\xbb\x02\n\x0cListAdBreaks\x12,.google.ads.admanager.v1.ListAdBreaksRequest\x1a-.google.ads.admanager.v1.ListAdBreaksResponse\"\xcd\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xbd\x01\x12=/v1/{parent=networks/*/liveStreamEventsByAssetKey/*}/adBreaksZE\x12\x43/v1/{parent=networks/*/liveStreamEventsByCustomAssetKey/*}/adBreaksZ5\x12\x33/v1/{parent=networks/*/liveStreamEvents/*}/adBreaks\x12\xd7\x02\n\rCreateAdBreak\x12-.google.ads.admanager.v1.CreateAdBreakRequest\x1a .google.ads.admanager.v1.AdBreak\"\xf4\x01\xda\x41\x0fparent,ad_break\x82\xd3\xe4\x93\x02\xdb\x01\"=/v1/{parent=networks/*/liveStreamEventsByAssetKey/*}/adBreaks:\x08\x61\x64_breakZO\"C/v1/{parent=networks/*/liveStreamEventsByCustomAssetKey/*}/adBreaks:\x08\x61\x64_breakZ?\"3/v1/{parent=networks/*/liveStreamEvents/*}/adBreaks:\x08\x61\x64_break\x12\xd1\x01\n\rUpdateAdBreak\x12-.google.ads.admanager.v1.UpdateAdBreakRequest\x1a .google.ads.admanager.v1.AdBreak\"o\xda\x41\x14\x61\x64_break,update_mask\x82\xd3\xe4\x93\x02R2F/v1/{ad_break.name=networks/*/liveStreamEventsByAssetKey/*/adBreaks/*}:\x08\x61\x64_break\x12\xa4\x01\n\rDeleteAdBreak\x12-.google.ads.admanager.v1.DeleteAdBreakRequest\x1a\x16.google.protobuf.Empty\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=networks/*/liveStreamEventsByAssetKey/*/adBreaks/*}\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc7\x01\n\x1b\x63om.google.ads.admanager.v1B\x13\x41\x64\x42reakServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.AdBreak", "google/ads/admanager/v1/ad_break_messages.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GetAdBreakRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GetAdBreakRequest").msgclass + ListAdBreaksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListAdBreaksRequest").msgclass + ListAdBreaksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListAdBreaksResponse").msgclass + CreateAdBreakRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CreateAdBreakRequest").msgclass + UpdateAdBreakRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.UpdateAdBreakRequest").msgclass + DeleteAdBreakRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.DeleteAdBreakRequest").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_service_services_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_service_services_pb.rb new file mode 100644 index 000000000000..a1b9b5b50c8f --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_break_service_services_pb.rb @@ -0,0 +1,93 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/admanager/v1/ad_break_service.proto for package 'Google.Ads.AdManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/ad_break_service_pb' + +module Google + module Ads + module AdManager + module V1 + module AdBreakService + # Provides methods for handling `AdBreak` objects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.admanager.v1.AdBreakService' + + # API to retrieve an `AdBreak` object. + # + # Query an ad break by its resource name or custom asset key. Check the + # resource's `breakState` field to determine its state. + rpc :GetAdBreak, ::Google::Ads::AdManager::V1::GetAdBreakRequest, ::Google::Ads::AdManager::V1::AdBreak + # API to retrieve a list of `AdBreak` objects. + # + # By default, when no `orderBy` query parameter is specified, ad breaks are + # ordered reverse chronologically. However, ad breaks with a 'breakState' of + # 'SCHEDULED' or 'DECISIONED' are prioritized and appear first. + rpc :ListAdBreaks, ::Google::Ads::AdManager::V1::ListAdBreaksRequest, ::Google::Ads::AdManager::V1::ListAdBreaksResponse + # API to create an `AdBreak` object. + # + # Informs DAI of an upcoming ad break for a live stream event, with an + # optional expected start time. DAI will begin decisioning ads for the break + # shortly before the expected start time, if provided. Each live stream + # event can only have one incomplete ad break at any given time. The next ad + # break can be scheduled after the previous ad break has started serving, + # indicated by its state being + # [`COMPLETE`][google.ads.admanager.v1.AdBreakStateEnum.AdBreakState.COMPLETE], + # or it has been deleted. + # + # This method cannot be used if the `LiveStreamEvent` has + # [prefetching ad breaks + # enabled](https://developers.google.com/ad-manager/api/reference/latest/LiveStreamEventService.LiveStreamEvent#prefetchenabled) + # or the event is not active. If a `LiveStreamEvent` is deactivated after + # creating an ad break and before the ad break is complete, the ad break + # is discarded. + # + # An ad break's state is complete when the following occurs: + # - Full service DAI: after a matching ad break shows in the + # `LiveStreamEvent` manifest only when the ad break has started decisioning. + # - Pod Serving: after the ad break is requested using the ad break ID or + # break sequence. + rpc :CreateAdBreak, ::Google::Ads::AdManager::V1::CreateAdBreakRequest, ::Google::Ads::AdManager::V1::AdBreak + # API to update an `AdBreak` object. + # + # Modify an ad break when its state is + # [`SCHEDULED`][google.ads.admanager.v1.AdBreakStateEnum.AdBreakState.SCHEDULED]. + rpc :UpdateAdBreak, ::Google::Ads::AdManager::V1::UpdateAdBreakRequest, ::Google::Ads::AdManager::V1::AdBreak + # API to delete an `AdBreak` object. + # + # Deletes and cancels an incomplete ad break, mitigating the need to wait + # for the current break to serve before recreating an ad break. You can + # delete an ad break that has not started serving or seen in manifests, + # indicated by its state being + # [`SCHEDULED`][google.ads.admanager.v1.AdBreakStateEnum.AdBreakState.SCHEDULED] + # or + # [`DECISIONED`][google.ads.admanager.v1.AdBreakStateEnum.AdBreakState.DECISIONED]. + rpc :DeleteAdBreak, ::Google::Ads::AdManager::V1::DeleteAdBreakRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_unit_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_unit_messages_pb.rb index 9406334a4ed1..2e35d0b2f5c0 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_unit_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_unit_messages_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n.google/ads/admanager/v1/ad_unit_messages.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/ad_unit_enums.proto\x1a+google/ads/admanager/v1/applied_label.proto\x1a\x33google/ads/admanager/v1/environment_type_enum.proto\x1a+google/ads/admanager/v1/frequency_cap.proto\x1a\"google/ads/admanager/v1/size.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8b\x0c\n\x06\x41\x64Unit\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nad_unit_id\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x0eparent_ad_unit\x18\n \x01(\tB*\xe0\x41\x02\xe0\x41\x05\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnit\x12?\n\x0bparent_path\x18\x0b \x03(\x0b\x32%.google.ads.admanager.v1.AdUnitParentB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61\x64_unit_code\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12K\n\x06status\x18\r \x01(\x0e\x32\x36.google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatusB\x03\xe0\x41\x03\x12Z\n\x15\x61pplied_target_window\x18, \x01(\x0e\x32\x36.google.ads.admanager.v1.TargetWindowEnum.TargetWindowB\x03\xe0\x41\x01\x12_\n\x17\x65\x66\x66\x65\x63tive_target_window\x18- \x01(\x0e\x32\x36.google.ads.admanager.v1.TargetWindowEnum.TargetWindowB\x06\xe0\x41\x07\xe0\x41\x03\x12<\n\rapplied_teams\x18\x03 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12\x34\n\x05teams\x18\x04 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x65xplicitly_targeted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0chas_children\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\rad_unit_sizes\x18\x0e \x03(\x0b\x32#.google.ads.admanager.v1.AdUnitSizeB\x03\xe0\x41\x01\x12,\n\x1f\x65xternal_set_top_box_channel_id\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\rrefresh_delay\x18\x13 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x42\n\x0e\x61pplied_labels\x18\x15 \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x01\x12L\n\x18\x65\x66\x66\x65\x63tive_applied_labels\x18\x16 \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x03\x12U\n\x1c\x61pplied_label_frequency_caps\x18\x17 \x03(\x0b\x32*.google.ads.admanager.v1.LabelFrequencyCapB\x03\xe0\x41\x01\x12W\n\x1e\x65\x66\x66\x65\x63tive_label_frequency_caps\x18\x18 \x03(\x0b\x32*.google.ads.admanager.v1.LabelFrequencyCapB\x03\xe0\x41\x03\x12V\n\x0fsmart_size_mode\x18\x19 \x01(\x0e\x32\x38.google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeModeB\x03\xe0\x41\x01\x12)\n\x17\x61pplied_adsense_enabled\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12&\n\x19\x65\x66\x66\x65\x63tive_adsense_enabled\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03:`\xea\x41]\n\x1f\x61\x64manager.googleapis.com/AdUnit\x12)networks/{network_code}/adUnits/{ad_unit}*\x07\x61\x64Units2\x06\x61\x64UnitB\x1a\n\x18_applied_adsense_enabled\"\xce\x01\n\nAdUnitSize\x12\x30\n\x04size\x18\x01 \x01(\x0b\x32\x1d.google.ads.admanager.v1.SizeB\x03\xe0\x41\x02\x12[\n\x10\x65nvironment_type\x18\x02 \x01(\x0e\x32<.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentTypeB\x03\xe0\x41\x02\x12\x31\n\ncompanions\x18\x03 \x03(\x0b\x32\x1d.google.ads.admanager.v1.Size\"\x85\x01\n\x0c\x41\x64UnitParent\x12?\n\x0eparent_ad_unit\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnit\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x64_unit_code\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\x88\x01\n\x11LabelFrequencyCap\x12\x35\n\x05label\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61\x64manager.googleapis.com/Label\x12<\n\rfrequency_cap\x18\x02 \x01(\x0b\x32%.google.ads.admanager.v1.FrequencyCapB\xc7\x01\n\x1b\x63om.google.ads.admanager.v1B\x13\x41\x64UnitMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n.google/ads/admanager/v1/ad_unit_messages.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/ad_unit_enums.proto\x1a+google/ads/admanager/v1/applied_label.proto\x1a\x33google/ads/admanager/v1/environment_type_enum.proto\x1a+google/ads/admanager/v1/frequency_cap.proto\x1a\"google/ads/admanager/v1/size.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x0f\n\x06\x41\x64Unit\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nad_unit_id\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03\x12G\n\x0eparent_ad_unit\x18\n \x01(\tB*\xe0\x41\x02\xe0\x41\x05\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnitH\x00\x88\x01\x01\x12?\n\x0bparent_path\x18\x0b \x03(\x0b\x32%.google.ads.admanager.v1.AdUnitParentB\x03\xe0\x41\x03\x12\x1e\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0c\x61\x64_unit_code\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x02\x88\x01\x01\x12P\n\x06status\x18\r \x01(\x0e\x32\x36.google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatusB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12_\n\x15\x61pplied_target_window\x18, \x01(\x0e\x32\x36.google.ads.admanager.v1.TargetWindowEnum.TargetWindowB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x64\n\x17\x65\x66\x66\x65\x63tive_target_window\x18- \x01(\x0e\x32\x36.google.ads.admanager.v1.TargetWindowEnum.TargetWindowB\x06\xe0\x41\x07\xe0\x41\x03H\x05\x88\x01\x01\x12<\n\rapplied_teams\x18\x03 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12\x34\n\x05teams\x18\x04 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12\x1d\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12%\n\x13\x65xplicitly_targeted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1e\n\x0chas_children\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03H\x08\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\t\x88\x01\x01\x12?\n\rad_unit_sizes\x18\x0e \x03(\x0b\x32#.google.ads.admanager.v1.AdUnitSizeB\x03\xe0\x41\x01\x12\x33\n\x1f\x65xternal_set_top_box_channel_id\x18\x11 \x01(\tB\x05\x18\x01\xe0\x41\x01H\n\x88\x01\x01\x12:\n\rrefresh_delay\x18\x13 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\x42\n\x0e\x61pplied_labels\x18\x15 \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x01\x12L\n\x18\x65\x66\x66\x65\x63tive_applied_labels\x18\x16 \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x03\x12U\n\x1c\x61pplied_label_frequency_caps\x18\x17 \x03(\x0b\x32*.google.ads.admanager.v1.LabelFrequencyCapB\x03\xe0\x41\x01\x12W\n\x1e\x65\x66\x66\x65\x63tive_label_frequency_caps\x18\x18 \x03(\x0b\x32*.google.ads.admanager.v1.LabelFrequencyCapB\x03\xe0\x41\x03\x12^\n\x0fsmart_size_mode\x18\x19 \x01(\x0e\x32\x38.google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeModeB\x06\xe0\x41\x01\xe0\x41\x07H\x0c\x88\x01\x01\x12)\n\x17\x61pplied_adsense_enabled\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01H\r\x88\x01\x01\x12+\n\x19\x65\x66\x66\x65\x63tive_adsense_enabled\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03H\x0e\x88\x01\x01:`\xea\x41]\n\x1f\x61\x64manager.googleapis.com/AdUnit\x12)networks/{network_code}/adUnits/{ad_unit}*\x07\x61\x64Units2\x06\x61\x64UnitB\x11\n\x0f_parent_ad_unitB\x0f\n\r_display_nameB\x0f\n\r_ad_unit_codeB\t\n\x07_statusB\x18\n\x16_applied_target_windowB\x1a\n\x18_effective_target_windowB\x0e\n\x0c_descriptionB\x16\n\x14_explicitly_targetedB\x0f\n\r_has_childrenB\x0e\n\x0c_update_timeB\"\n _external_set_top_box_channel_idB\x10\n\x0e_refresh_delayB\x12\n\x10_smart_size_modeB\x1a\n\x18_applied_adsense_enabledB\x1c\n\x1a_effective_adsense_enabled\"\xce\x01\n\nAdUnitSize\x12\x30\n\x04size\x18\x01 \x01(\x0b\x32\x1d.google.ads.admanager.v1.SizeB\x03\xe0\x41\x02\x12[\n\x10\x65nvironment_type\x18\x02 \x01(\x0e\x32<.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentTypeB\x03\xe0\x41\x02\x12\x31\n\ncompanions\x18\x03 \x03(\x0b\x32\x1d.google.ads.admanager.v1.Size\"\x85\x01\n\x0c\x41\x64UnitParent\x12?\n\x0eparent_ad_unit\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnit\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x64_unit_code\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\x88\x01\n\x11LabelFrequencyCap\x12\x35\n\x05label\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61\x64manager.googleapis.com/Label\x12<\n\rfrequency_cap\x18\x02 \x01(\x0b\x32%.google.ads.admanager.v1.FrequencyCapB\xc7\x01\n\x1b\x63om.google.ads.admanager.v1B\x13\x41\x64UnitMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_unit_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_unit_service_pb.rb index 374c2ee6206d..1af7e4e8d5ff 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_unit_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/ad_unit_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n-google/ads/admanager/v1/ad_unit_service.proto\x12\x17google.ads.admanager.v1\x1a.google/ads/admanager/v1/ad_unit_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"I\n\x10GetAdUnitRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnit\"\xbe\x01\n\x12ListAdUnitsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"u\n\x13ListAdUnitsResponse\x12\x31\n\x08\x61\x64_units\x18\x01 \x03(\x0b\x32\x1f.google.ads.admanager.v1.AdUnit\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\xc2\x01\n\x16ListAdUnitSizesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x82\x01\n\x17ListAdUnitSizesResponse\x12:\n\rad_unit_sizes\x18\x01 \x03(\x0b\x32#.google.ads.admanager.v1.AdUnitSize\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\x80\x04\n\rAdUnitService\x12\x87\x01\n\tGetAdUnit\x12).google.ads.admanager.v1.GetAdUnitRequest\x1a\x1f.google.ads.admanager.v1.AdUnit\".\xda\x41\x04name\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{name=networks/*/adUnits/*}\x12\x9a\x01\n\x0bListAdUnits\x12+.google.ads.admanager.v1.ListAdUnitsRequest\x1a,.google.ads.admanager.v1.ListAdUnitsResponse\"0\xda\x41\x06parent\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{parent=networks/*}/adUnits\x12\xaa\x01\n\x0fListAdUnitSizes\x12/.google.ads.admanager.v1.ListAdUnitSizesRequest\x1a\x30.google.ads.admanager.v1.ListAdUnitSizesResponse\"4\xda\x41\x06parent\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=networks/*}/adUnitSizes\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xc6\x01\n\x1b\x63om.google.ads.admanager.v1B\x12\x41\x64UnitServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n-google/ads/admanager/v1/ad_unit_service.proto\x12\x17google.ads.admanager.v1\x1a.google/ads/admanager/v1/ad_unit_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"I\n\x10GetAdUnitRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnit\"\xbe\x01\n\x12ListAdUnitsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"u\n\x13ListAdUnitsResponse\x12\x31\n\x08\x61\x64_units\x18\x01 \x03(\x0b\x32\x1f.google.ads.admanager.v1.AdUnit\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\xc2\x01\n\x16ListAdUnitSizesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x82\x01\n\x17ListAdUnitSizesResponse\x12:\n\rad_unit_sizes\x18\x01 \x03(\x0b\x32#.google.ads.admanager.v1.AdUnitSize\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xac\x04\n\rAdUnitService\x12\x87\x01\n\tGetAdUnit\x12).google.ads.admanager.v1.GetAdUnitRequest\x1a\x1f.google.ads.admanager.v1.AdUnit\".\xda\x41\x04name\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{name=networks/*/adUnits/*}\x12\x9a\x01\n\x0bListAdUnits\x12+.google.ads.admanager.v1.ListAdUnitsRequest\x1a,.google.ads.admanager.v1.ListAdUnitsResponse\"0\xda\x41\x06parent\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{parent=networks/*}/adUnits\x12\xaa\x01\n\x0fListAdUnitSizes\x12/.google.ads.admanager.v1.ListAdUnitSizesRequest\x1a\x30.google.ads.admanager.v1.ListAdUnitSizesResponse\"4\xda\x41\x06parent\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=networks/*}/adUnitSizes\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc6\x01\n\x1b\x63om.google.ads.admanager.v1B\x12\x41\x64UnitServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_messages_pb.rb new file mode 100644 index 000000000000..9c6bdad9ba76 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_messages_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/bandwidth_group_messages.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n6google/ads/admanager/v1/bandwidth_group_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xee\x01\n\x0e\x42\x61ndwidthGroup\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01:\x89\x01\xea\x41\x85\x01\n\'admanager.googleapis.com/BandwidthGroup\x12\x39networks/{network_code}/bandwidthGroups/{bandwidth_group}*\x0f\x62\x61ndwidthGroups2\x0e\x62\x61ndwidthGroupB\x07\n\x05_nameB\x0f\n\r_display_nameB\xcf\x01\n\x1b\x63om.google.ads.admanager.v1B\x1b\x42\x61ndwidthGroupMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + BandwidthGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.BandwidthGroup").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_service_pb.rb new file mode 100644 index 000000000000..59c047646542 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_service_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/bandwidth_group_service.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/bandwidth_group_messages_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n5google/ads/admanager/v1/bandwidth_group_service.proto\x12\x17google.ads.admanager.v1\x1a\x36google/ads/admanager/v1/bandwidth_group_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"Y\n\x18GetBandwidthGroupRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'admanager.googleapis.com/BandwidthGroup\"\xc6\x01\n\x1aListBandwidthGroupsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x8d\x01\n\x1bListBandwidthGroupsResponse\x12\x41\n\x10\x62\x61ndwidth_groups\x18\x01 \x03(\x0b\x32\'.google.ads.admanager.v1.BandwidthGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xc7\x03\n\x15\x42\x61ndwidthGroupService\x12\xa7\x01\n\x11GetBandwidthGroup\x12\x31.google.ads.admanager.v1.GetBandwidthGroupRequest\x1a\'.google.ads.admanager.v1.BandwidthGroup\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/v1/{name=networks/*/bandwidthGroups/*}\x12\xba\x01\n\x13ListBandwidthGroups\x12\x33.google.ads.admanager.v1.ListBandwidthGroupsRequest\x1a\x34.google.ads.admanager.v1.ListBandwidthGroupsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/v1/{parent=networks/*}/bandwidthGroups\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xce\x01\n\x1b\x63om.google.ads.admanager.v1B\x1a\x42\x61ndwidthGroupServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.BandwidthGroup", "google/ads/admanager/v1/bandwidth_group_messages.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GetBandwidthGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GetBandwidthGroupRequest").msgclass + ListBandwidthGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListBandwidthGroupsRequest").msgclass + ListBandwidthGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListBandwidthGroupsResponse").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_service_services_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_service_services_pb.rb new file mode 100644 index 000000000000..9a2aacd51e4b --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/bandwidth_group_service_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/admanager/v1/bandwidth_group_service.proto for package 'Google.Ads.AdManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/bandwidth_group_service_pb' + +module Google + module Ads + module AdManager + module V1 + module BandwidthGroupService + # Provides methods for handling `BandwidthGroup` objects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.admanager.v1.BandwidthGroupService' + + # API to retrieve a `BandwidthGroup` object. + rpc :GetBandwidthGroup, ::Google::Ads::AdManager::V1::GetBandwidthGroupRequest, ::Google::Ads::AdManager::V1::BandwidthGroup + # API to retrieve a list of `BandwidthGroup` objects. + rpc :ListBandwidthGroups, ::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest, ::Google::Ads::AdManager::V1::ListBandwidthGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_credit_status_enum_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_enums_pb.rb similarity index 54% rename from google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_credit_status_enum_pb.rb rename to google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_enums_pb.rb index 272319d52bf7..e060d57c60b9 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_credit_status_enum_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_enums_pb.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/ads/admanager/v1/company_credit_status_enum.proto +# source: google/ads/admanager/v1/company_enums.proto require 'google/protobuf' -descriptor_data = "\n8google/ads/admanager/v1/company_credit_status_enum.proto\x12\x17google.ads.admanager.v1\"\x95\x01\n\x17\x43ompanyCreditStatusEnum\"z\n\x13\x43ompanyCreditStatus\x12%\n!COMPANY_CREDIT_STATUS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\x0b\n\x07ON_HOLD\x10\x03\x12\x08\n\x04STOP\x10\x04\x12\x0b\n\x07\x42LOCKED\x10\x05\x42\xd0\x01\n\x1b\x63om.google.ads.admanager.v1B\x1c\x43ompanyCreditStatusEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n+google/ads/admanager/v1/company_enums.proto\x12\x17google.ads.admanager.v1\"\x92\x01\n\x0f\x43ompanyTypeEnum\"\x7f\n\x0b\x43ompanyType\x12\x1c\n\x18\x43OMPANY_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nADVERTISER\x10\x01\x12\x14\n\x10HOUSE_ADVERTISER\x10\x02\x12\n\n\x06\x41GENCY\x10\x03\x12\x10\n\x0cHOUSE_AGENCY\x10\x04\x12\x0e\n\nAD_NETWORK\x10\x05\"\x95\x01\n\x17\x43ompanyCreditStatusEnum\"z\n\x13\x43ompanyCreditStatus\x12%\n!COMPANY_CREDIT_STATUS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\x0b\n\x07ON_HOLD\x10\x03\x12\x08\n\x04STOP\x10\x04\x12\x0b\n\x07\x42LOCKED\x10\x05\x42\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11\x43ompanyEnumsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -35,6 +35,8 @@ module Google module Ads module AdManager module V1 + CompanyTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CompanyTypeEnum").msgclass + CompanyTypeEnum::CompanyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CompanyTypeEnum.CompanyType").enummodule CompanyCreditStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CompanyCreditStatusEnum").msgclass CompanyCreditStatusEnum::CompanyCreditStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus").enummodule end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_messages_pb.rb index 4cb00bb6ee10..9f8c9e30798f 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_messages_pb.rb @@ -5,14 +5,13 @@ require 'google/protobuf' require 'google/ads/admanager/v1/applied_label_pb' -require 'google/ads/admanager/v1/company_credit_status_enum_pb' -require 'google/ads/admanager/v1/company_type_enum_pb' +require 'google/ads/admanager/v1/company_enums_pb' require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n.google/ads/admanager/v1/company_messages.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/applied_label.proto\x1a\x38google/ads/admanager/v1/company_credit_status_enum.proto\x1a/google/ads/admanager/v1/company_type_enum.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x06\n\x07\x43ompany\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\ncompany_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x04type\x18\x04 \x01(\x0e\x32\x34.google.ads.admanager.v1.CompanyTypeEnum.CompanyTypeB\x03\xe0\x41\x02\x12\x14\n\x07\x61\x64\x64ress\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x65mail\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03\x66\x61x\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05phone\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x65xternal_id\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63omment\x18\n \x01(\tB\x03\xe0\x41\x01\x12`\n\rcredit_status\x18\x0b \x01(\x0e\x32\x44.google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatusB\x03\xe0\x41\x01\x12\x42\n\x0e\x61pplied_labels\x18\x0c \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x01\x12\x46\n\x0fprimary_contact\x18\r \x01(\tB(\xe0\x41\x01\xfa\x41\"\n admanager.googleapis.com/ContactH\x00\x88\x01\x01\x12<\n\rapplied_teams\x18\x0e \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12\x34\n\x0bupdate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12#\n\x16third_party_company_id\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01:f\xea\x41\x63\n admanager.googleapis.com/Company\x12+networks/{network_code}/companies/{company}*\tcompanies2\x07\x63ompanyB\x12\n\x10_primary_contactB\xc8\x01\n\x1b\x63om.google.ads.admanager.v1B\x14\x43ompanyMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n.google/ads/admanager/v1/company_messages.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/applied_label.proto\x1a+google/ads/admanager/v1/company_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x06\n\x07\x43ompany\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\ncompany_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x04type\x18\x04 \x01(\x0e\x32\x34.google.ads.admanager.v1.CompanyTypeEnum.CompanyTypeB\x03\xe0\x41\x02\x12\x14\n\x07\x61\x64\x64ress\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x65mail\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03\x66\x61x\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05phone\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x65xternal_id\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63omment\x18\n \x01(\tB\x03\xe0\x41\x01\x12`\n\rcredit_status\x18\x0b \x01(\x0e\x32\x44.google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatusB\x03\xe0\x41\x01\x12\x42\n\x0e\x61pplied_labels\x18\x0c \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x01\x12\x46\n\x0fprimary_contact\x18\r \x01(\tB(\xe0\x41\x01\xfa\x41\"\n admanager.googleapis.com/ContactH\x00\x88\x01\x01\x12<\n\rapplied_teams\x18\x0e \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12#\n\x16third_party_company_id\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:f\xea\x41\x63\n admanager.googleapis.com/Company\x12+networks/{network_code}/companies/{company}*\tcompanies2\x07\x63ompanyB\x12\n\x10_primary_contactB\xc8\x01\n\x1b\x63om.google.ads.admanager.v1B\x14\x43ompanyMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_service_pb.rb index 20dba9db1e65..d9aa4f0987f1 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n-google/ads/admanager/v1/company_service.proto\x12\x17google.ads.admanager.v1\x1a.google/ads/admanager/v1/company_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"K\n\x11GetCompanyRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Company\"\xc0\x01\n\x14ListCompaniesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"y\n\x15ListCompaniesResponse\x12\x33\n\tcompanies\x18\x01 \x03(\x0b\x32 .google.ads.admanager.v1.Company\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xe1\x02\n\x0e\x43ompanyService\x12\x8c\x01\n\nGetCompany\x12*.google.ads.admanager.v1.GetCompanyRequest\x1a .google.ads.admanager.v1.Company\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=networks/*/companies/*}\x12\xa2\x01\n\rListCompanies\x12-.google.ads.admanager.v1.ListCompaniesRequest\x1a..google.ads.admanager.v1.ListCompaniesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=networks/*}/companies\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xc7\x01\n\x1b\x63om.google.ads.admanager.v1B\x13\x43ompanyServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n-google/ads/admanager/v1/company_service.proto\x12\x17google.ads.admanager.v1\x1a.google/ads/admanager/v1/company_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"K\n\x11GetCompanyRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Company\"\xc0\x01\n\x14ListCompaniesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"y\n\x15ListCompaniesResponse\x12\x33\n\tcompanies\x18\x01 \x03(\x0b\x32 .google.ads.admanager.v1.Company\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\x8d\x03\n\x0e\x43ompanyService\x12\x8c\x01\n\nGetCompany\x12*.google.ads.admanager.v1.GetCompanyRequest\x1a .google.ads.admanager.v1.Company\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=networks/*/companies/*}\x12\xa2\x01\n\rListCompanies\x12-.google.ads.admanager.v1.ListCompaniesRequest\x1a..google.ads.admanager.v1.ListCompaniesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=networks/*}/companies\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc7\x01\n\x1b\x63om.google.ads.admanager.v1B\x13\x43ompanyServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/contact_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/contact_messages_pb.rb index b5e610b976d9..e41599743d08 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/contact_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/contact_messages_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n.google/ads/admanager/v1/contact_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9b\x01\n\x07\x43ontact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\ncontact_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03:d\xea\x41\x61\n admanager.googleapis.com/Contact\x12*networks/{network_code}/contacts/{contact}*\x08\x63ontacts2\x07\x63ontactB\xc8\x01\n\x1b\x63om.google.ads.admanager.v1B\x14\x43ontactMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n.google/ads/admanager/v1/contact_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc3\x01\n\x07\x43ontact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12&\n\x14\x63ompany_display_name\x18\x13 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01:d\xea\x41\x61\n admanager.googleapis.com/Contact\x12*networks/{network_code}/contacts/{contact}*\x08\x63ontacts2\x07\x63ontactB\x17\n\x15_company_display_nameB\xc8\x01\n\x1b\x63om.google.ads.admanager.v1B\x14\x43ontactMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_field_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_field_messages_pb.rb index 15c0853bb612..0b7f223d4126 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_field_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_field_messages_pb.rb @@ -9,7 +9,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n3google/ads/admanager/v1/custom_field_messages.proto\x12\x17google.ads.admanager.v1\x1a\x30google/ads/admanager/v1/custom_field_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xac\x05\n\x0b\x43ustomField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x63ustom_field_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12U\n\x06status\x18\x05 \x01(\x0e\x32@.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatusB\x03\xe0\x41\x03\x12\x62\n\x0b\x65ntity_type\x18\x07 \x01(\x0e\x32H.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityTypeB\x03\xe0\x41\x02\x12\\\n\tdata_type\x18\x08 \x01(\x0e\x32\x44.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataTypeB\x03\xe0\x41\x02\x12\x61\n\nvisibility\x18\t \x01(\x0e\x32H.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibilityB\x03\xe0\x41\x02\x12@\n\x07options\x18\n \x03(\x0b\x32*.google.ads.admanager.v1.CustomFieldOptionB\x03\xe0\x41\x01:y\xea\x41v\n$admanager.googleapis.com/CustomField\x12\x33networks/{network_code}/customFields/{custom_field}*\x0c\x63ustomFields2\x0b\x63ustomField\"S\n\x11\x43ustomFieldOption\x12#\n\x16\x63ustom_field_option_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\xcc\x01\n\x1b\x63om.google.ads.admanager.v1B\x18\x43ustomFieldMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n3google/ads/admanager/v1/custom_field_messages.proto\x12\x17google.ads.admanager.v1\x1a\x30google/ads/admanager/v1/custom_field_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbc\x06\n\x0b\x43ustomField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12!\n\x0f\x63ustom_field_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12Z\n\x06status\x18\x05 \x01(\x0e\x32@.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatusB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12g\n\x0b\x65ntity_type\x18\x07 \x01(\x0e\x32H.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityTypeB\x03\xe0\x41\x02H\x04\x88\x01\x01\x12\x61\n\tdata_type\x18\x08 \x01(\x0e\x32\x44.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataTypeB\x03\xe0\x41\x02H\x05\x88\x01\x01\x12\x66\n\nvisibility\x18\t \x01(\x0e\x32H.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibilityB\x03\xe0\x41\x02H\x06\x88\x01\x01\x12@\n\x07options\x18\n \x03(\x0b\x32*.google.ads.admanager.v1.CustomFieldOptionB\x03\xe0\x41\x01:y\xea\x41v\n$admanager.googleapis.com/CustomField\x12\x33networks/{network_code}/customFields/{custom_field}*\x0c\x63ustomFields2\x0b\x63ustomFieldB\x12\n\x10_custom_field_idB\x0f\n\r_display_nameB\x0e\n\x0c_descriptionB\t\n\x07_statusB\x0e\n\x0c_entity_typeB\x0c\n\n_data_typeB\r\n\x0b_visibility\"S\n\x11\x43ustomFieldOption\x12#\n\x16\x63ustom_field_option_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\xcc\x01\n\x1b\x63om.google.ads.admanager.v1B\x18\x43ustomFieldMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_field_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_field_service_pb.rb index 027dc9f7aa4e..49588f9aa213 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_field_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_field_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n2google/ads/admanager/v1/custom_field_service.proto\x12\x17google.ads.admanager.v1\x1a\x33google/ads/admanager/v1/custom_field_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"S\n\x15GetCustomFieldRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$admanager.googleapis.com/CustomField\"\xc3\x01\n\x17ListCustomFieldsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x84\x01\n\x18ListCustomFieldsResponse\x12;\n\rcustom_fields\x18\x01 \x03(\x0b\x32$.google.ads.admanager.v1.CustomField\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\x80\x03\n\x12\x43ustomFieldService\x12\x9b\x01\n\x0eGetCustomField\x12..google.ads.admanager.v1.GetCustomFieldRequest\x1a$.google.ads.admanager.v1.CustomField\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=networks/*/customFields/*}\x12\xae\x01\n\x10ListCustomFields\x12\x30.google.ads.admanager.v1.ListCustomFieldsRequest\x1a\x31.google.ads.admanager.v1.ListCustomFieldsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/v1/{parent=networks/*}/customFields\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xcb\x01\n\x1b\x63om.google.ads.admanager.v1B\x17\x43ustomFieldServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n2google/ads/admanager/v1/custom_field_service.proto\x12\x17google.ads.admanager.v1\x1a\x33google/ads/admanager/v1/custom_field_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"S\n\x15GetCustomFieldRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$admanager.googleapis.com/CustomField\"\xc3\x01\n\x17ListCustomFieldsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x84\x01\n\x18ListCustomFieldsResponse\x12;\n\rcustom_fields\x18\x01 \x03(\x0b\x32$.google.ads.admanager.v1.CustomField\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xac\x03\n\x12\x43ustomFieldService\x12\x9b\x01\n\x0eGetCustomField\x12..google.ads.admanager.v1.GetCustomFieldRequest\x1a$.google.ads.admanager.v1.CustomField\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=networks/*/customFields/*}\x12\xae\x01\n\x10ListCustomFields\x12\x30.google.ads.admanager.v1.ListCustomFieldsRequest\x1a\x31.google.ads.admanager.v1.ListCustomFieldsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/v1/{parent=networks/*}/customFields\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xcb\x01\n\x1b\x63om.google.ads.admanager.v1B\x17\x43ustomFieldServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_key_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_key_service_pb.rb index 6ef5cd60f4d9..9aa3eb2d76e5 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_key_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_key_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n:google/ads/admanager/v1/custom_targeting_key_service.proto\x12\x17google.ads.admanager.v1\x1a;google/ads/admanager/v1/custom_targeting_key_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"a\n\x1cGetCustomTargetingKeyRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+admanager.googleapis.com/CustomTargetingKey\"\xca\x01\n\x1eListCustomTargetingKeysRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x9a\x01\n\x1fListCustomTargetingKeysResponse\x12J\n\x15\x63ustom_targeting_keys\x18\x01 \x03(\x0b\x32+.google.ads.admanager.v1.CustomTargetingKey\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xbf\x03\n\x19\x43ustomTargetingKeyService\x12\xb7\x01\n\x15GetCustomTargetingKey\x12\x35.google.ads.admanager.v1.GetCustomTargetingKeyRequest\x1a+.google.ads.admanager.v1.CustomTargetingKey\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=networks/*/customTargetingKeys/*}\x12\xca\x01\n\x17ListCustomTargetingKeys\x12\x37.google.ads.admanager.v1.ListCustomTargetingKeysRequest\x1a\x38.google.ads.admanager.v1.ListCustomTargetingKeysResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=networks/*}/customTargetingKeys\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xd2\x01\n\x1b\x63om.google.ads.admanager.v1B\x1e\x43ustomTargetingKeyServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n:google/ads/admanager/v1/custom_targeting_key_service.proto\x12\x17google.ads.admanager.v1\x1a;google/ads/admanager/v1/custom_targeting_key_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"a\n\x1cGetCustomTargetingKeyRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+admanager.googleapis.com/CustomTargetingKey\"\xca\x01\n\x1eListCustomTargetingKeysRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x9a\x01\n\x1fListCustomTargetingKeysResponse\x12J\n\x15\x63ustom_targeting_keys\x18\x01 \x03(\x0b\x32+.google.ads.admanager.v1.CustomTargetingKey\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xeb\x03\n\x19\x43ustomTargetingKeyService\x12\xb7\x01\n\x15GetCustomTargetingKey\x12\x35.google.ads.admanager.v1.GetCustomTargetingKeyRequest\x1a+.google.ads.admanager.v1.CustomTargetingKey\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=networks/*/customTargetingKeys/*}\x12\xca\x01\n\x17ListCustomTargetingKeys\x12\x37.google.ads.admanager.v1.ListCustomTargetingKeysRequest\x1a\x38.google.ads.admanager.v1.ListCustomTargetingKeysResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=networks/*}/customTargetingKeys\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xd2\x01\n\x1b\x63om.google.ads.admanager.v1B\x1e\x43ustomTargetingKeyServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_value_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_value_messages_pb.rb index 24516343aba1..de4f7b3681a4 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_value_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_value_messages_pb.rb @@ -9,7 +9,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n=google/ads/admanager/v1/custom_targeting_value_messages.proto\x12\x17google.ads.admanager.v1\x1a:google/ads/admanager/v1/custom_targeting_value_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x93\x04\n\x14\x43ustomTargetingValue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x61\x64_tag_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12t\n\nmatch_type\x18\x06 \x01(\x0e\x32X.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchTypeB\x06\xe0\x41\x05\xe0\x41\x02\x12g\n\x06status\x18\x07 \x01(\x0e\x32R.google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatusB\x03\xe0\x41\x03:\xd3\x01\xea\x41\xcf\x01\n-admanager.googleapis.com/CustomTargetingValue\x12qnetworks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}*\x15\x63ustomTargetingValues2\x14\x63ustomTargetingValueB\xd5\x01\n\x1b\x63om.google.ads.admanager.v1B!CustomTargetingValueMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n=google/ads/admanager/v1/custom_targeting_value_messages.proto\x12\x17google.ads.admanager.v1\x1a:google/ads/admanager/v1/custom_targeting_value_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbe\x04\n\x14\x43ustomTargetingValue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12T\n\x14\x63ustom_targeting_key\x18\x08 \x01(\tB6\xe0\x41\x02\xe0\x41\x05\xfa\x41-\n+admanager.googleapis.com/CustomTargetingKey\x12\x18\n\x0b\x61\x64_tag_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12t\n\nmatch_type\x18\x06 \x01(\x0e\x32X.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchTypeB\x06\xe0\x41\x05\xe0\x41\x02\x12g\n\x06status\x18\x07 \x01(\x0e\x32R.google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatusB\x03\xe0\x41\x03:\xa8\x01\xea\x41\xa4\x01\n-admanager.googleapis.com/CustomTargetingValue\x12\x46networks/{network_code}/customTargetingValues/{custom_targeting_value}*\x15\x63ustomTargetingValues2\x14\x63ustomTargetingValueB\xd5\x01\n\x1b\x63om.google.ads.admanager.v1B!CustomTargetingValueMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_value_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_value_service_pb.rb index cca6d3f8f18d..4ee96535ee9a 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_value_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/custom_targeting_value_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=networks/*}/entitySignalsMappings\x12\xf6\x01\n\x1a\x43reateEntitySignalsMapping\x12:.google.ads.admanager.v1.CreateEntitySignalsMappingRequest\x1a-.google.ads.admanager.v1.EntitySignalsMapping\"m\xda\x41\x1dparent,entity_signals_mapping\x82\xd3\xe4\x93\x02G\"-/v1/{parent=networks/*}/entitySignalsMappings:\x16\x65ntity_signals_mapping\x12\x93\x02\n\x1aUpdateEntitySignalsMapping\x12:.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest\x1a-.google.ads.admanager.v1.EntitySignalsMapping\"\x89\x01\xda\x41\"entity_signals_mapping,update_mask\x82\xd3\xe4\x93\x02^2D/v1/{entity_signals_mapping.name=networks/*/entitySignalsMappings/*}:\x16\x65ntity_signals_mapping\x12\xff\x01\n BatchCreateEntitySignalsMappings\x12@.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest\x1a\x41.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse\"V\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02>\"9/v1/{parent=networks/*}/entitySignalsMappings:batchCreate:\x01*\x12\xff\x01\n BatchUpdateEntitySignalsMappings\x12@.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest\x1a\x41.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse\"V\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02>\"9/v1/{parent=networks/*}/entitySignalsMappings:batchUpdate:\x01*\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xd4\x01\n\x1b\x63om.google.ads.admanager.v1B EntitySignalsMappingServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=networks/*}/entitySignalsMappings\x12\xf6\x01\n\x1a\x43reateEntitySignalsMapping\x12:.google.ads.admanager.v1.CreateEntitySignalsMappingRequest\x1a-.google.ads.admanager.v1.EntitySignalsMapping\"m\xda\x41\x1dparent,entity_signals_mapping\x82\xd3\xe4\x93\x02G\"-/v1/{parent=networks/*}/entitySignalsMappings:\x16\x65ntity_signals_mapping\x12\x93\x02\n\x1aUpdateEntitySignalsMapping\x12:.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest\x1a-.google.ads.admanager.v1.EntitySignalsMapping\"\x89\x01\xda\x41\"entity_signals_mapping,update_mask\x82\xd3\xe4\x93\x02^2D/v1/{entity_signals_mapping.name=networks/*/entitySignalsMappings/*}:\x16\x65ntity_signals_mapping\x12\xff\x01\n BatchCreateEntitySignalsMappings\x12@.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest\x1a\x41.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse\"V\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02>\"9/v1/{parent=networks/*}/entitySignalsMappings:batchCreate:\x01*\x12\xff\x01\n BatchUpdateEntitySignalsMappings\x12@.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest\x1a\x41.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse\"V\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02>\"9/v1/{parent=networks/*}/entitySignalsMappings:batchUpdate:\x01*\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xd4\x01\n\x1b\x63om.google.ads.admanager.v1B EntitySignalsMappingServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_messages_pb.rb new file mode 100644 index 000000000000..a5a3675701ce --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_messages_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/geo_target_messages.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n1google/ads/admanager/v1/geo_target_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb8\x03\n\tGeoTarget\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12I\n\x10\x63\x61nonical_parent\x18\x03 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"admanager.googleapis.com/GeoTargetH\x01\x88\x01\x01\x12\x19\n\x0cparent_names\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x16\n\x04type\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x1c\n\ntargetable\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03H\x04\x88\x01\x01:o\xea\x41l\n\"admanager.googleapis.com/GeoTarget\x12/networks/{network_code}/geoTargets/{geo_target}*\ngeoTargets2\tgeoTargetB\x0f\n\r_display_nameB\x13\n\x11_canonical_parentB\x0e\n\x0c_region_codeB\x07\n\x05_typeB\r\n\x0b_targetableB\xca\x01\n\x1b\x63om.google.ads.admanager.v1B\x16GeoTargetMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GeoTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GeoTarget").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_service_pb.rb new file mode 100644 index 000000000000..e25506b1e564 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_service_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/geo_target_service.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/geo_target_messages_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n0google/ads/admanager/v1/geo_target_service.proto\x12\x17google.ads.admanager.v1\x1a\x31google/ads/admanager/v1/geo_target_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"O\n\x13GetGeoTargetRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"admanager.googleapis.com/GeoTarget\"\xc1\x01\n\x15ListGeoTargetsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"~\n\x16ListGeoTargetsResponse\x12\x37\n\x0bgeo_targets\x18\x01 \x03(\x0b\x32\".google.ads.admanager.v1.GeoTarget\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\x9a\x03\n\x10GeoTargetService\x12\x93\x01\n\x0cGetGeoTarget\x12,.google.ads.admanager.v1.GetGeoTargetRequest\x1a\".google.ads.admanager.v1.GeoTarget\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=networks/*/geoTargets/*}\x12\xa6\x01\n\x0eListGeoTargets\x12..google.ads.admanager.v1.ListGeoTargetsRequest\x1a/.google.ads.admanager.v1.ListGeoTargetsResponse\"3\xda\x41\x06parent\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=networks/*}/geoTargets\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc9\x01\n\x1b\x63om.google.ads.admanager.v1B\x15GeoTargetServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.GeoTarget", "google/ads/admanager/v1/geo_target_messages.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GetGeoTargetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GetGeoTargetRequest").msgclass + ListGeoTargetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListGeoTargetsRequest").msgclass + ListGeoTargetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListGeoTargetsResponse").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_service_services_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_service_services_pb.rb new file mode 100644 index 000000000000..ad107dd91f40 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/geo_target_service_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/admanager/v1/geo_target_service.proto for package 'Google.Ads.AdManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/geo_target_service_pb' + +module Google + module Ads + module AdManager + module V1 + module GeoTargetService + # Provides methods for handling `GeoTarget` objects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.admanager.v1.GeoTargetService' + + # API to retrieve a `GeoTarget` object. + rpc :GetGeoTarget, ::Google::Ads::AdManager::V1::GetGeoTargetRequest, ::Google::Ads::AdManager::V1::GeoTarget + # API to retrieve a list of `GeoTarget` objects. + rpc :ListGeoTargets, ::Google::Ads::AdManager::V1::ListGeoTargetsRequest, ::Google::Ads::AdManager::V1::ListGeoTargetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_type_enum_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/live_stream_event_messages_pb.rb similarity index 54% rename from google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_type_enum_pb.rb rename to google-ads-ad_manager-v1/lib/google/ads/admanager/v1/live_stream_event_messages_pb.rb index 1f4a2daf2e47..33a6790daf95 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/company_type_enum_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/live_stream_event_messages_pb.rb @@ -1,11 +1,14 @@ # frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/ads/admanager/v1/company_type_enum.proto +# source: google/ads/admanager/v1/live_stream_event_messages.proto require 'google/protobuf' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' -descriptor_data = "\n/google/ads/admanager/v1/company_type_enum.proto\x12\x17google.ads.admanager.v1\"\x92\x01\n\x0f\x43ompanyTypeEnum\"\x7f\n\x0b\x43ompanyType\x12\x1c\n\x18\x43OMPANY_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nADVERTISER\x10\x01\x12\x14\n\x10HOUSE_ADVERTISER\x10\x02\x12\n\n\x06\x41GENCY\x10\x03\x12\x10\n\x0cHOUSE_AGENCY\x10\x04\x12\x0e\n\nAD_NETWORK\x10\x05\x42\xc8\x01\n\x1b\x63om.google.ads.admanager.v1B\x14\x43ompanyTypeEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +descriptor_data = "\n8google/ads/admanager/v1/live_stream_event_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb6\x01\n\x0fLiveStreamEvent\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\x8f\x01\xea\x41\x8b\x01\n(admanager.googleapis.com/LiveStreamEvent\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(admanager.googleapis.com/OperatingSystem\"\xc7\x01\n\x1bListOperatingSystemsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x90\x01\n\x1cListOperatingSystemsResponse\x12\x43\n\x11operating_systems\x18\x01 \x03(\x0b\x32(.google.ads.admanager.v1.OperatingSystem\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xd0\x03\n\x16OperatingSystemService\x12\xab\x01\n\x12GetOperatingSystem\x12\x32.google.ads.admanager.v1.GetOperatingSystemRequest\x1a(.google.ads.admanager.v1.OperatingSystem\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=networks/*/operatingSystems/*}\x12\xbe\x01\n\x14ListOperatingSystems\x12\x34.google.ads.admanager.v1.ListOperatingSystemsRequest\x1a\x35.google.ads.admanager.v1.ListOperatingSystemsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=networks/*}/operatingSystems\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xcf\x01\n\x1b\x63om.google.ads.admanager.v1B\x1bOperatingSystemServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.OperatingSystem", "google/ads/admanager/v1/operating_system_messages.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GetOperatingSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GetOperatingSystemRequest").msgclass + ListOperatingSystemsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListOperatingSystemsRequest").msgclass + ListOperatingSystemsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListOperatingSystemsResponse").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_service_services_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_service_services_pb.rb new file mode 100644 index 000000000000..6bb2b56b491c --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_service_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/admanager/v1/operating_system_service.proto for package 'Google.Ads.AdManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/operating_system_service_pb' + +module Google + module Ads + module AdManager + module V1 + module OperatingSystemService + # Provides methods for handling `OperatingSystem` objects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.admanager.v1.OperatingSystemService' + + # API to retrieve a `OperatingSystem` object. + rpc :GetOperatingSystem, ::Google::Ads::AdManager::V1::GetOperatingSystemRequest, ::Google::Ads::AdManager::V1::OperatingSystem + # API to retrieve a list of `OperatingSystem` objects. + rpc :ListOperatingSystems, ::Google::Ads::AdManager::V1::ListOperatingSystemsRequest, ::Google::Ads::AdManager::V1::ListOperatingSystemsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_messages_pb.rb new file mode 100644 index 000000000000..d3ee58b09eff --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_messages_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/operating_system_version_messages.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/admanager/v1/operating_system_version_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf9\x02\n\x16OperatingSystemVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1f\n\rmajor_version\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1f\n\rminor_version\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rmicro_version\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03H\x02\x88\x01\x01:\xb2\x01\xea\x41\xae\x01\n/admanager.googleapis.com/OperatingSystemVersion\x12Jnetworks/{network_code}/operatingSystemVersions/{operating_system_version}*\x17operatingSystemVersions2\x16operatingSystemVersionB\x10\n\x0e_major_versionB\x10\n\x0e_minor_versionB\x10\n\x0e_micro_versionB\xd7\x01\n\x1b\x63om.google.ads.admanager.v1B#OperatingSystemVersionMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + OperatingSystemVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.OperatingSystemVersion").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_service_pb.rb new file mode 100644 index 000000000000..cb919c46f93c --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_service_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/operating_system_version_service.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/operating_system_version_messages_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/admanager/v1/operating_system_version_service.proto\x12\x17google.ads.admanager.v1\x1a?google/ads/admanager/v1/operating_system_version_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"i\n GetOperatingSystemVersionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/admanager.googleapis.com/OperatingSystemVersion\"\xce\x01\n\"ListOperatingSystemVersionsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\xa6\x01\n#ListOperatingSystemVersionsResponse\x12R\n\x19operating_system_versions\x18\x01 \x03(\x0b\x32/.google.ads.admanager.v1.OperatingSystemVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\x8f\x04\n\x1dOperatingSystemVersionService\x12\xc7\x01\n\x19GetOperatingSystemVersion\x12\x39.google.ads.admanager.v1.GetOperatingSystemVersionRequest\x1a/.google.ads.admanager.v1.OperatingSystemVersion\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=networks/*/operatingSystemVersions/*}\x12\xda\x01\n\x1bListOperatingSystemVersions\x12;.google.ads.admanager.v1.ListOperatingSystemVersionsRequest\x1a<.google.ads.admanager.v1.ListOperatingSystemVersionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=networks/*}/operatingSystemVersions\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xd6\x01\n\x1b\x63om.google.ads.admanager.v1B\"OperatingSystemVersionServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.OperatingSystemVersion", "google/ads/admanager/v1/operating_system_version_messages.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GetOperatingSystemVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GetOperatingSystemVersionRequest").msgclass + ListOperatingSystemVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListOperatingSystemVersionsRequest").msgclass + ListOperatingSystemVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListOperatingSystemVersionsResponse").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_service_services_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_service_services_pb.rb new file mode 100644 index 000000000000..4dfba1d0e486 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/operating_system_version_service_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/admanager/v1/operating_system_version_service.proto for package 'Google.Ads.AdManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/operating_system_version_service_pb' + +module Google + module Ads + module AdManager + module V1 + module OperatingSystemVersionService + # Provides methods for handling `OperatingSystemVersion` objects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.admanager.v1.OperatingSystemVersionService' + + # API to retrieve a `OperatingSystemVersion` object. + rpc :GetOperatingSystemVersion, ::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest, ::Google::Ads::AdManager::V1::OperatingSystemVersion + # API to retrieve a list of `OperatingSystemVersion` objects. + rpc :ListOperatingSystemVersions, ::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest, ::Google::Ads::AdManager::V1::ListOperatingSystemVersionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/order_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/order_messages_pb.rb index b1670af6ee36..613f2ae0578b 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/order_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/order_messages_pb.rb @@ -12,7 +12,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/ads/admanager/v1/order_messages.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/applied_label.proto\x1a\x30google/ads/admanager/v1/custom_field_value.proto\x1a)google/ads/admanager/v1/order_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x0c\n\x05Order\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x08order_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cprogrammatic\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x39\n\ntrafficker\x18\x17 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User\x12\x45\n\x13\x61\x64vertiser_contacts\x18\x05 \x03(\tB(\xe0\x41\x01\xfa\x41\"\n admanager.googleapis.com/Contact\x12<\n\nadvertiser\x18\x06 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Company\x12\x41\n\x0f\x61gency_contacts\x18\x07 \x03(\tB(\xe0\x41\x01\xfa\x41\"\n admanager.googleapis.com/Contact\x12\x38\n\x06\x61gency\x18\x08 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n admanager.googleapis.com/Company\x12<\n\rapplied_teams\x18\t \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12>\n\x0f\x65\x66\x66\x65\x63tive_teams\x18\x1c \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12\x36\n\x07\x63reator\x18\n \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User\x12\x1a\n\rcurrency_code\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12unlimited_end_time\x18- \x01(\x08\x42\x03\xe0\x41\x03\x12\x1e\n\x11\x65xternal_order_id\x18\r \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x61rchived\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12!\n\x14last_modified_by_app\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x12\n\x05notes\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpo_number\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12I\n\x06status\x18\x14 \x01(\x0e\x32\x34.google.ads.admanager.v1.OrderStatusEnum.OrderStatusB\x03\xe0\x41\x03\x12:\n\x0bsalesperson\x18\x15 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User\x12G\n\x15secondary_salespeople\x18\x16 \x03(\tB(\xe0\x41\x01\xe0\x41\x06\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User\x12G\n\x15secondary_traffickers\x18\x18 \x03(\tB(\xe0\x41\x01\xe0\x41\x06\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User\x12\x42\n\x0e\x61pplied_labels\x18\x19 \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x01\x12L\n\x18\x65\x66\x66\x65\x63tive_applied_labels\x18\x1a \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x03\x12K\n\x13\x63ustom_field_values\x18& \x03(\x0b\x32).google.ads.admanager.v1.CustomFieldValueB\x03\xe0\x41\x01:Z\xea\x41W\n\x1e\x61\x64manager.googleapis.com/Order\x12&networks/{network_code}/orders/{order}*\x06orders2\x05orderB\xc6\x01\n\x1b\x63om.google.ads.admanager.v1B\x12OrderMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n,google/ads/admanager/v1/order_messages.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/applied_label.proto\x1a\x30google/ads/admanager/v1/custom_field_value.proto\x1a)google/ads/admanager/v1/order_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x96\x0f\n\x05Order\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\x08order_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1e\n\x0cprogrammatic\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12>\n\ntrafficker\x18\x17 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/UserH\x03\x88\x01\x01\x12\x45\n\x13\x61\x64vertiser_contacts\x18\x05 \x03(\tB(\xe0\x41\x01\xfa\x41\"\n admanager.googleapis.com/Contact\x12\x41\n\nadvertiser\x18\x06 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/CompanyH\x04\x88\x01\x01\x12\x41\n\x0f\x61gency_contacts\x18\x07 \x03(\tB(\xe0\x41\x01\xfa\x41\"\n admanager.googleapis.com/Contact\x12=\n\x06\x61gency\x18\x08 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n admanager.googleapis.com/CompanyH\x05\x88\x01\x01\x12<\n\rapplied_teams\x18\t \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12>\n\x0f\x65\x66\x66\x65\x63tive_teams\x18\x1c \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Team\x12;\n\x07\x63reator\x18\n \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/UserH\x06\x88\x01\x01\x12\x1f\n\rcurrency_code\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x38\n\nstart_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x08\x88\x01\x01\x12\x36\n\x08\x65nd_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\t\x88\x01\x01\x12$\n\x12unlimited_end_time\x18- \x01(\x08\x42\x03\xe0\x41\x03H\n\x88\x01\x01\x12#\n\x11\x65xternal_order_id\x18\r \x01(\x05\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\x1a\n\x08\x61rchived\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03H\x0c\x88\x01\x01\x12&\n\x14last_modified_by_app\x18\x0f \x01(\tB\x03\xe0\x41\x03H\r\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x0e\x88\x01\x01\x12\x17\n\x05notes\x18\x11 \x01(\tB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12\x1b\n\tpo_number\x18\x12 \x01(\tB\x03\xe0\x41\x01H\x10\x88\x01\x01\x12N\n\x06status\x18\x14 \x01(\x0e\x32\x34.google.ads.admanager.v1.OrderStatusEnum.OrderStatusB\x03\xe0\x41\x03H\x11\x88\x01\x01\x12?\n\x0bsalesperson\x18\x15 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/UserH\x12\x88\x01\x01\x12G\n\x15secondary_salespeople\x18\x16 \x03(\tB(\xe0\x41\x01\xe0\x41\x06\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User\x12G\n\x15secondary_traffickers\x18\x18 \x03(\tB(\xe0\x41\x01\xe0\x41\x06\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User\x12\x42\n\x0e\x61pplied_labels\x18\x19 \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x01\x12L\n\x18\x65\x66\x66\x65\x63tive_applied_labels\x18\x1a \x03(\x0b\x32%.google.ads.admanager.v1.AppliedLabelB\x03\xe0\x41\x03\x12K\n\x13\x63ustom_field_values\x18& \x03(\x0b\x32).google.ads.admanager.v1.CustomFieldValueB\x03\xe0\x41\x01:Z\xea\x41W\n\x1e\x61\x64manager.googleapis.com/Order\x12&networks/{network_code}/orders/{order}*\x06orders2\x05orderB\x0b\n\t_order_idB\x0f\n\r_display_nameB\x0f\n\r_programmaticB\r\n\x0b_traffickerB\r\n\x0b_advertiserB\t\n\x07_agencyB\n\n\x08_creatorB\x10\n\x0e_currency_codeB\r\n\x0b_start_timeB\x0b\n\t_end_timeB\x15\n\x13_unlimited_end_timeB\x14\n\x12_external_order_idB\x0b\n\t_archivedB\x17\n\x15_last_modified_by_appB\x0e\n\x0c_update_timeB\x08\n\x06_notesB\x0c\n\n_po_numberB\t\n\x07_statusB\x0e\n\x0c_salespersonB\xc6\x01\n\x1b\x63om.google.ads.admanager.v1B\x12OrderMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/order_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/order_service_pb.rb index 9dd5e094ea4b..d97ea9c260a4 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/order_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/order_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n+google/ads/admanager/v1/order_service.proto\x12\x17google.ads.admanager.v1\x1a,google/ads/admanager/v1/order_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"G\n\x0fGetOrderRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61\x64manager.googleapis.com/Order\"\xbd\x01\n\x11ListOrdersRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"q\n\x12ListOrdersResponse\x12.\n\x06orders\x18\x01 \x03(\x0b\x32\x1e.google.ads.admanager.v1.Order\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xca\x02\n\x0cOrderService\x12\x83\x01\n\x08GetOrder\x12(.google.ads.admanager.v1.GetOrderRequest\x1a\x1e.google.ads.admanager.v1.Order\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=networks/*/orders/*}\x12\x96\x01\n\nListOrders\x12*.google.ads.admanager.v1.ListOrdersRequest\x1a+.google.ads.admanager.v1.ListOrdersResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=networks/*}/orders\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11OrderServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n+google/ads/admanager/v1/order_service.proto\x12\x17google.ads.admanager.v1\x1a,google/ads/admanager/v1/order_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"G\n\x0fGetOrderRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61\x64manager.googleapis.com/Order\"\xbd\x01\n\x11ListOrdersRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"q\n\x12ListOrdersResponse\x12.\n\x06orders\x18\x01 \x03(\x0b\x32\x1e.google.ads.admanager.v1.Order\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xf6\x02\n\x0cOrderService\x12\x83\x01\n\x08GetOrder\x12(.google.ads.admanager.v1.GetOrderRequest\x1a\x1e.google.ads.admanager.v1.Order\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=networks/*/orders/*}\x12\x96\x01\n\nListOrders\x12*.google.ads.admanager.v1.ListOrdersRequest\x1a+.google.ads.admanager.v1.ListOrdersResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=networks/*}/orders\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11OrderServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/placement_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/placement_messages_pb.rb index f8576b2cc392..2ea7bf79bd9c 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/placement_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/placement_messages_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n0google/ads/admanager/v1/placement_messages.proto\x12\x17google.ads.admanager.v1\x1a-google/ads/admanager/v1/placement_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x03\n\tPlacement\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0cplacement_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eplacement_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x06status\x18\x06 \x01(\x0e\x32<.google.ads.admanager.v1.PlacementStatusEnum.PlacementStatusB\x03\xe0\x41\x03\x12\x42\n\x11targeted_ad_units\x18\x07 \x03(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnit\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:n\xea\x41k\n\"admanager.googleapis.com/Placement\x12.networks/{network_code}/placements/{placement}*\nplacements2\tplacementB\xca\x01\n\x1b\x63om.google.ads.admanager.v1B\x16PlacementMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n0google/ads/admanager/v1/placement_messages.proto\x12\x17google.ads.admanager.v1\x1a-google/ads/admanager/v1/placement_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x04\n\tPlacement\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0cplacement_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0eplacement_code\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12V\n\x06status\x18\x06 \x01(\x0e\x32<.google.ads.admanager.v1.PlacementStatusEnum.PlacementStatusB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x42\n\x11targeted_ad_units\x18\x07 \x03(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnit\x12\x39\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01:n\xea\x41k\n\"admanager.googleapis.com/Placement\x12.networks/{network_code}/placements/{placement}*\nplacements2\tplacementB\x0f\n\r_display_nameB\x0e\n\x0c_descriptionB\x11\n\x0f_placement_codeB\t\n\x07_statusB\x0e\n\x0c_update_timeB\xca\x01\n\x1b\x63om.google.ads.admanager.v1B\x16PlacementMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/placement_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/placement_service_pb.rb index d4e5fd3c9d88..f18e3a92dad6 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/placement_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/placement_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n/google/ads/admanager/v1/placement_service.proto\x12\x17google.ads.admanager.v1\x1a\x30google/ads/admanager/v1/placement_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"O\n\x13GetPlacementRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"admanager.googleapis.com/Placement\"\xc1\x01\n\x15ListPlacementsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"}\n\x16ListPlacementsResponse\x12\x36\n\nplacements\x18\x01 \x03(\x0b\x32\".google.ads.admanager.v1.Placement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xee\x02\n\x10PlacementService\x12\x93\x01\n\x0cGetPlacement\x12,.google.ads.admanager.v1.GetPlacementRequest\x1a\".google.ads.admanager.v1.Placement\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=networks/*/placements/*}\x12\xa6\x01\n\x0eListPlacements\x12..google.ads.admanager.v1.ListPlacementsRequest\x1a/.google.ads.admanager.v1.ListPlacementsResponse\"3\xda\x41\x06parent\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=networks/*}/placements\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xc9\x01\n\x1b\x63om.google.ads.admanager.v1B\x15PlacementServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n/google/ads/admanager/v1/placement_service.proto\x12\x17google.ads.admanager.v1\x1a\x30google/ads/admanager/v1/placement_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"O\n\x13GetPlacementRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"admanager.googleapis.com/Placement\"\xc1\x01\n\x15ListPlacementsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"}\n\x16ListPlacementsResponse\x12\x36\n\nplacements\x18\x01 \x03(\x0b\x32\".google.ads.admanager.v1.Placement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\x9a\x03\n\x10PlacementService\x12\x93\x01\n\x0cGetPlacement\x12,.google.ads.admanager.v1.GetPlacementRequest\x1a\".google.ads.admanager.v1.Placement\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=networks/*/placements/*}\x12\xa6\x01\n\x0eListPlacements\x12..google.ads.admanager.v1.ListPlacementsRequest\x1a/.google.ads.admanager.v1.ListPlacementsResponse\"3\xda\x41\x06parent\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=networks/*}/placements\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc9\x01\n\x1b\x63om.google.ads.admanager.v1B\x15PlacementServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_messages_pb.rb new file mode 100644 index 000000000000..ad2ff5ef4c46 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_messages_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/private_auction_deal_messages.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/deal_buyer_permission_type_enum_pb' +require 'google/ads/admanager/v1/private_marketplace_enums_pb' +require 'google/ads/admanager/v1/size_pb' +require 'google/ads/admanager/v1/targeting_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/money_pb' + + +descriptor_data = "\n;google/ads/admanager/v1/private_auction_deal_messages.proto\x12\x17google.ads.admanager.v1\x1a=google/ads/admanager/v1/deal_buyer_permission_type_enum.proto\x1a\x37google/ads/admanager/v1/private_marketplace_enums.proto\x1a\"google/ads/admanager/v1/size.proto\x1a\'google/ads/admanager/v1/targeting.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/type/money.proto\"\xe0\x0b\n\x12PrivateAuctionDeal\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12)\n\x17private_auction_deal_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12$\n\x12private_auction_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x05H\x01\x88\x01\x01\x12.\n\x1cprivate_auction_display_name\x18\x14 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\"\n\x10\x62uyer_account_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x05H\x03\x88\x01\x01\x12\"\n\x10\x65xternal_deal_id\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12?\n\ttargeting\x18\x06 \x01(\x0b\x32\".google.ads.admanager.v1.TargetingB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x36\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x31\n\x0b\x66loor_price\x18\t \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x02H\x07\x88\x01\x01\x12:\n\x0e\x63reative_sizes\x18\x12 \x03(\x0b\x32\x1d.google.ads.admanager.v1.SizeB\x03\xe0\x41\x01\x12p\n\x06status\x18\n \x01(\x0e\x32V.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatusB\x03\xe0\x41\x03H\x08\x88\x01\x01\x12*\n\x18\x61uction_priority_enabled\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\t\x88\x01\x01\x12(\n\x16\x62lock_override_enabled\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01H\n\x88\x01\x01\x12u\n\x15\x62uyer_permission_type\x18\r \x01(\x0e\x32L.google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionTypeB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12S\n\nbuyer_data\x18\x0e \x01(\x0b\x32\x35.google.ads.admanager.v1.PrivateAuctionDeal.BuyerDataB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\r\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x0e\x88\x01\x01\x1a&\n\tBuyerData\x12\x19\n\x0c\x62uyer_emails\x18\x01 \x03(\tB\x03\xe0\x41\x01:\x9e\x01\xea\x41\x9a\x01\n+admanager.googleapis.com/PrivateAuctionDeal\x12\x42networks/{network_code}/privateAuctionDeals/{private_auction_deal}*\x13privateAuctionDeals2\x12privateAuctionDealB\x1a\n\x18_private_auction_deal_idB\x15\n\x13_private_auction_idB\x1f\n\x1d_private_auction_display_nameB\x13\n\x11_buyer_account_idB\x13\n\x11_external_deal_idB\x0c\n\n_targetingB\x0b\n\t_end_timeB\x0e\n\x0c_floor_priceB\t\n\x07_statusB\x1b\n\x19_auction_priority_enabledB\x19\n\x17_block_override_enabledB\x18\n\x16_buyer_permission_typeB\r\n\x0b_buyer_dataB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\xd3\x01\n\x1b\x63om.google.ads.admanager.v1B\x1fPrivateAuctionDealMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.Targeting", "google/ads/admanager/v1/targeting.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.Money", "google/type/money.proto"], + ["google.ads.admanager.v1.Size", "google/ads/admanager/v1/size.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + PrivateAuctionDeal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.PrivateAuctionDeal").msgclass + PrivateAuctionDeal::BuyerData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.PrivateAuctionDeal.BuyerData").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_service_pb.rb new file mode 100644 index 000000000000..f4c386cea9ab --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_service_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/private_auction_deal_service.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/private_auction_deal_messages_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n:google/ads/admanager/v1/private_auction_deal_service.proto\x12\x17google.ads.admanager.v1\x1a;google/ads/admanager/v1/private_auction_deal_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"a\n\x1cGetPrivateAuctionDealRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+admanager.googleapis.com/PrivateAuctionDeal\"\xca\x01\n\x1eListPrivateAuctionDealsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x9a\x01\n\x1fListPrivateAuctionDealsResponse\x12J\n\x15private_auction_deals\x18\x01 \x03(\x0b\x32+.google.ads.admanager.v1.PrivateAuctionDeal\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\xab\x01\n\x1f\x43reatePrivateAuctionDealRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12N\n\x14private_auction_deal\x18\x02 \x01(\x0b\x32+.google.ads.admanager.v1.PrivateAuctionDealB\x03\xe0\x41\x02\"\xa7\x01\n\x1fUpdatePrivateAuctionDealRequest\x12N\n\x14private_auction_deal\x18\x01 \x01(\x0b\x32+.google.ads.admanager.v1.PrivateAuctionDealB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe0\x07\n\x19PrivateAuctionDealService\x12\xb7\x01\n\x15GetPrivateAuctionDeal\x12\x35.google.ads.admanager.v1.GetPrivateAuctionDealRequest\x1a+.google.ads.admanager.v1.PrivateAuctionDeal\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=networks/*/privateAuctionDeals/*}\x12\xca\x01\n\x17ListPrivateAuctionDeals\x12\x37.google.ads.admanager.v1.ListPrivateAuctionDealsRequest\x1a\x38.google.ads.admanager.v1.ListPrivateAuctionDealsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=networks/*}/privateAuctionDeals\x12\xea\x01\n\x18\x43reatePrivateAuctionDeal\x12\x38.google.ads.admanager.v1.CreatePrivateAuctionDealRequest\x1a+.google.ads.admanager.v1.PrivateAuctionDeal\"g\xda\x41\x1bparent,private_auction_deal\x82\xd3\xe4\x93\x02\x43\"+/v1/{parent=networks/*}/privateAuctionDeals:\x14private_auction_deal\x12\x85\x02\n\x18UpdatePrivateAuctionDeal\x12\x38.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest\x1a+.google.ads.admanager.v1.PrivateAuctionDeal\"\x81\x01\xda\x41 private_auction_deal,update_mask\x82\xd3\xe4\x93\x02X2@/v1/{private_auction_deal.name=networks/*/privateAuctionDeals/*}:\x14private_auction_deal\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xd2\x01\n\x1b\x63om.google.ads.admanager.v1B\x1ePrivateAuctionDealServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.PrivateAuctionDeal", "google/ads/admanager/v1/private_auction_deal_messages.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GetPrivateAuctionDealRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GetPrivateAuctionDealRequest").msgclass + ListPrivateAuctionDealsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListPrivateAuctionDealsRequest").msgclass + ListPrivateAuctionDealsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListPrivateAuctionDealsResponse").msgclass + CreatePrivateAuctionDealRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CreatePrivateAuctionDealRequest").msgclass + UpdatePrivateAuctionDealRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.UpdatePrivateAuctionDealRequest").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_service_services_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_service_services_pb.rb new file mode 100644 index 000000000000..355aaa6c5557 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_deal_service_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/admanager/v1/private_auction_deal_service.proto for package 'Google.Ads.AdManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/private_auction_deal_service_pb' + +module Google + module Ads + module AdManager + module V1 + module PrivateAuctionDealService + # Provides methods for handling `PrivateAuctionDeal` objects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.admanager.v1.PrivateAuctionDealService' + + # API to retrieve a `PrivateAuctionDeal` object. + rpc :GetPrivateAuctionDeal, ::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest, ::Google::Ads::AdManager::V1::PrivateAuctionDeal + # API to retrieve a list of `PrivateAuctionDeal` objects. + rpc :ListPrivateAuctionDeals, ::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest, ::Google::Ads::AdManager::V1::ListPrivateAuctionDealsResponse + # API to create a `PrivateAuctionDeal` object. + rpc :CreatePrivateAuctionDeal, ::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest, ::Google::Ads::AdManager::V1::PrivateAuctionDeal + # API to update a `PrivateAuctionDeal` object. + rpc :UpdatePrivateAuctionDeal, ::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest, ::Google::Ads::AdManager::V1::PrivateAuctionDeal + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_messages_pb.rb new file mode 100644 index 000000000000..cd92d378af5d --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_messages_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/private_auction_messages.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n6google/ads/admanager/v1/private_auction_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd0\x04\n\x0ePrivateAuction\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12$\n\x12private_auction_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x43\n\x14seller_contact_users\x18\t \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User\x12\x1a\n\x08\x61rchived\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x05\x88\x01\x01:\x89\x01\xea\x41\x85\x01\n\'admanager.googleapis.com/PrivateAuction\x12\x39networks/{network_code}/privateAuctions/{private_auction}*\x0fprivateAuctions2\x0eprivateAuctionB\x15\n\x13_private_auction_idB\x0f\n\r_display_nameB\x0e\n\x0c_descriptionB\x0b\n\t_archivedB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\xcf\x01\n\x1b\x63om.google.ads.admanager.v1B\x1bPrivateAuctionMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + PrivateAuction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.PrivateAuction").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_service_pb.rb new file mode 100644 index 000000000000..e4d07bb5e2eb --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_service_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/private_auction_service.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/private_auction_messages_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n5google/ads/admanager/v1/private_auction_service.proto\x12\x17google.ads.admanager.v1\x1a\x36google/ads/admanager/v1/private_auction_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"Y\n\x18GetPrivateAuctionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'admanager.googleapis.com/PrivateAuction\"\xc6\x01\n\x1aListPrivateAuctionsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x8d\x01\n\x1bListPrivateAuctionsResponse\x12\x41\n\x10private_auctions\x18\x01 \x03(\x0b\x32\'.google.ads.admanager.v1.PrivateAuction\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x9e\x01\n\x1b\x43reatePrivateAuctionRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x45\n\x0fprivate_auction\x18\x02 \x01(\x0b\x32\'.google.ads.admanager.v1.PrivateAuctionB\x03\xe0\x41\x02\"\x9a\x01\n\x1bUpdatePrivateAuctionRequest\x12\x45\n\x0fprivate_auction\x18\x01 \x01(\x0b\x32\'.google.ads.admanager.v1.PrivateAuctionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x82\x07\n\x15PrivateAuctionService\x12\xa7\x01\n\x11GetPrivateAuction\x12\x31.google.ads.admanager.v1.GetPrivateAuctionRequest\x1a\'.google.ads.admanager.v1.PrivateAuction\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/v1/{name=networks/*/privateAuctions/*}\x12\xba\x01\n\x13ListPrivateAuctions\x12\x33.google.ads.admanager.v1.ListPrivateAuctionsRequest\x1a\x34.google.ads.admanager.v1.ListPrivateAuctionsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/v1/{parent=networks/*}/privateAuctions\x12\xd0\x01\n\x14\x43reatePrivateAuction\x12\x34.google.ads.admanager.v1.CreatePrivateAuctionRequest\x1a\'.google.ads.admanager.v1.PrivateAuction\"Y\xda\x41\x16parent,private_auction\x82\xd3\xe4\x93\x02:\"\'/v1/{parent=networks/*}/privateAuctions:\x0fprivate_auction\x12\xe5\x01\n\x14UpdatePrivateAuction\x12\x34.google.ads.admanager.v1.UpdatePrivateAuctionRequest\x1a\'.google.ads.admanager.v1.PrivateAuction\"n\xda\x41\x1bprivate_auction,update_mask\x82\xd3\xe4\x93\x02J27/v1/{private_auction.name=networks/*/privateAuctions/*}:\x0fprivate_auction\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xce\x01\n\x1b\x63om.google.ads.admanager.v1B\x1aPrivateAuctionServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.PrivateAuction", "google/ads/admanager/v1/private_auction_messages.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GetPrivateAuctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GetPrivateAuctionRequest").msgclass + ListPrivateAuctionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListPrivateAuctionsRequest").msgclass + ListPrivateAuctionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListPrivateAuctionsResponse").msgclass + CreatePrivateAuctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CreatePrivateAuctionRequest").msgclass + UpdatePrivateAuctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.UpdatePrivateAuctionRequest").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_service_services_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_service_services_pb.rb new file mode 100644 index 000000000000..f7c9ee8d03ad --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_auction_service_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/admanager/v1/private_auction_service.proto for package 'Google.Ads.AdManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/private_auction_service_pb' + +module Google + module Ads + module AdManager + module V1 + module PrivateAuctionService + # Provides methods for handling `PrivateAuction` objects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.admanager.v1.PrivateAuctionService' + + # API to retrieve a `PrivateAuction` object. + rpc :GetPrivateAuction, ::Google::Ads::AdManager::V1::GetPrivateAuctionRequest, ::Google::Ads::AdManager::V1::PrivateAuction + # API to retrieve a list of `PrivateAuction` objects. + rpc :ListPrivateAuctions, ::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest, ::Google::Ads::AdManager::V1::ListPrivateAuctionsResponse + # API to create a `PrivateAuction` object. + rpc :CreatePrivateAuction, ::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest, ::Google::Ads::AdManager::V1::PrivateAuction + # API to update a `PrivateAuction` object. + rpc :UpdatePrivateAuction, ::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest, ::Google::Ads::AdManager::V1::PrivateAuction + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_marketplace_enums_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_marketplace_enums_pb.rb new file mode 100644 index 000000000000..b931706737fc --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/private_marketplace_enums_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/private_marketplace_enums.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/ads/admanager/v1/private_marketplace_enums.proto\x12\x17google.ads.admanager.v1\"\xc0\x01\n PrivateMarketplaceDealStatusEnum\"\x9b\x01\n\x1cPrivateMarketplaceDealStatus\x12/\n+PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\x11\n\rSELLER_PAUSED\x10\x04\x12\x10\n\x0c\x42UYER_PAUSED\x10\x05\x42\xd0\x01\n\x1b\x63om.google.ads.admanager.v1B\x1cPrivateMarketplaceEnumsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + PrivateMarketplaceDealStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum").msgclass + PrivateMarketplaceDealStatusEnum::PrivateMarketplaceDealStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus").enummodule + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_messages_pb.rb new file mode 100644 index 000000000000..dab818196df8 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_messages_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/programmatic_buyer_messages.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/admanager/v1/programmatic_buyer_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe4\x04\n\x11ProgrammaticBuyer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\"\n\x10\x62uyer_account_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12#\n\x11parent_account_id\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12#\n\x11partner_client_id\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x18\n\x06\x61gency\x18\t \x01(\x08\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12)\n\x17preferred_deals_enabled\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x31\n\x1fprogrammatic_guaranteed_enabled\x18\r \x01(\x08\x42\x03\xe0\x41\x03H\x06\x88\x01\x01:\x98\x01\xea\x41\x94\x01\n*admanager.googleapis.com/ProgrammaticBuyer\x12?networks/{network_code}/programmaticBuyers/{programmatic_buyer}*\x12programmaticBuyers2\x11programmaticBuyerB\x13\n\x11_buyer_account_idB\x0f\n\r_display_nameB\x14\n\x12_parent_account_idB\x14\n\x12_partner_client_idB\t\n\x07_agencyB\x1a\n\x18_preferred_deals_enabledB\"\n _programmatic_guaranteed_enabledB\xd2\x01\n\x1b\x63om.google.ads.admanager.v1B\x1eProgrammaticBuyerMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + ProgrammaticBuyer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ProgrammaticBuyer").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_service_pb.rb new file mode 100644 index 000000000000..5af5e9108053 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_service_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/programmatic_buyer_service.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/programmatic_buyer_messages_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n8google/ads/admanager/v1/programmatic_buyer_service.proto\x12\x17google.ads.admanager.v1\x1a\x39google/ads/admanager/v1/programmatic_buyer_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"_\n\x1bGetProgrammaticBuyerRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*admanager.googleapis.com/ProgrammaticBuyer\"\xc9\x01\n\x1dListProgrammaticBuyersRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x96\x01\n\x1eListProgrammaticBuyersResponse\x12G\n\x13programmatic_buyers\x18\x01 \x03(\x0b\x32*.google.ads.admanager.v1.ProgrammaticBuyer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xe2\x03\n\x18ProgrammaticBuyerService\x12\xb3\x01\n\x14GetProgrammaticBuyer\x12\x34.google.ads.admanager.v1.GetProgrammaticBuyerRequest\x1a*.google.ads.admanager.v1.ProgrammaticBuyer\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=networks/*/programmaticBuyers/*}\x12\xc6\x01\n\x16ListProgrammaticBuyers\x12\x36.google.ads.admanager.v1.ListProgrammaticBuyersRequest\x1a\x37.google.ads.admanager.v1.ListProgrammaticBuyersResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=networks/*}/programmaticBuyers\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xd1\x01\n\x1b\x63om.google.ads.admanager.v1B\x1dProgrammaticBuyerServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.ads.admanager.v1.ProgrammaticBuyer", "google/ads/admanager/v1/programmatic_buyer_messages.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + GetProgrammaticBuyerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GetProgrammaticBuyerRequest").msgclass + ListProgrammaticBuyersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListProgrammaticBuyersRequest").msgclass + ListProgrammaticBuyersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ListProgrammaticBuyersResponse").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_service_services_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_service_services_pb.rb new file mode 100644 index 000000000000..edc00805216e --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/programmatic_buyer_service_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/admanager/v1/programmatic_buyer_service.proto for package 'Google.Ads.AdManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/programmatic_buyer_service_pb' + +module Google + module Ads + module AdManager + module V1 + module ProgrammaticBuyerService + # Provides methods for handling `ProgrammaticBuyer` objects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.admanager.v1.ProgrammaticBuyerService' + + # API to retrieve a `ProgrammaticBuyer` object. + rpc :GetProgrammaticBuyer, ::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest, ::Google::Ads::AdManager::V1::ProgrammaticBuyer + # API to retrieve a list of `ProgrammaticBuyer` objects. + rpc :ListProgrammaticBuyers, ::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest, ::Google::Ads::AdManager::V1::ListProgrammaticBuyersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/report_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/report_messages_pb.rb new file mode 100644 index 000000000000..1187db2fe028 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/report_messages_pb.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/report_messages.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' +require 'google/type/dayofweek_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n-google/ads/admanager/v1/report_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xb5\xe9\x01\n\x06Report\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\treport_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x43\n\nvisibility\x18\x02 \x01(\x0e\x32*.google.ads.admanager.v1.Report.VisibilityB\x03\xe0\x41\x01\x12I\n\x11report_definition\x18\x04 \x01(\x0b\x32).google.ads.admanager.v1.ReportDefinitionB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06locale\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10schedule_options\x18\t \x01(\x0b\x32(.google.ads.admanager.v1.ScheduleOptionsB\x03\xe0\x41\x01\x1a\xd3\x02\n\x05Value\x12\x13\n\tint_value\x18\x01 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12G\n\x0eint_list_value\x18\x06 \x01(\x0b\x32-.google.ads.admanager.v1.Report.Value.IntListH\x00\x12M\n\x11string_list_value\x18\x07 \x01(\x0b\x32\x30.google.ads.admanager.v1.Report.Value.StringListH\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x1a\x19\n\x07IntList\x12\x0e\n\x06values\x18\x01 \x03(\x03\x1a\x1c\n\nStringList\x12\x0e\n\x06values\x18\x01 \x03(\tB\x07\n\x05value\x1a\xcb\x02\n\x04Sort\x12\x39\n\x05\x66ield\x18\x01 \x01(\x0b\x32%.google.ads.admanager.v1.Report.FieldB\x03\xe0\x41\x02\x12\x17\n\ndescending\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12>\n\x05slice\x18\x03 \x01(\x0b\x32%.google.ads.admanager.v1.Report.SliceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11time_period_index\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12T\n\x11metric_value_type\x18\x05 \x01(\x0e\x32/.google.ads.admanager.v1.Report.MetricValueTypeB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x08\n\x06_sliceB\x14\n\x12_time_period_indexB\x14\n\x12_metric_value_type\x1a\x89\x05\n\tDataTable\x1a\x9f\x01\n\x03Row\x12?\n\x10\x64imension_values\x18\x01 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12W\n\x13metric_value_groups\x18\x02 \x03(\x0b\x32:.google.ads.admanager.v1.Report.DataTable.MetricValueGroup\x1a\xd9\x03\n\x10MetricValueGroup\x12=\n\x0eprimary_values\x18\x01 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12N\n\x1fprimary_percent_of_total_values\x18\x02 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12@\n\x11\x63omparison_values\x18\x03 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12Q\n\"comparison_percent_of_total_values\x18\x04 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12\x45\n\x16\x61\x62solute_change_values\x18\x05 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12\x45\n\x16relative_change_values\x18\x06 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12\x13\n\x0b\x66lag_values\x18\x07 \x03(\x08\x1a\x8a\x01\n\x05\x46ield\x12>\n\tdimension\x18\x01 \x01(\x0e\x32).google.ads.admanager.v1.Report.DimensionH\x00\x12\x38\n\x06metric\x18\x02 \x01(\x0e\x32&.google.ads.admanager.v1.Report.MetricH\x00\x42\x07\n\x05\x66ield\x1a\x85\x01\n\x05Slice\x12\x41\n\tdimension\x18\x01 \x01(\x0e\x32).google.ads.admanager.v1.Report.DimensionB\x03\xe0\x41\x02\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32%.google.ads.admanager.v1.Report.ValueB\x03\xe0\x41\x02\x1a\xf6\x07\n\x06\x46ilter\x12J\n\x0c\x66ield_filter\x18\x01 \x01(\x0b\x32\x32.google.ads.admanager.v1.Report.Filter.FieldFilterH\x00\x12<\n\nnot_filter\x18\x02 \x01(\x0b\x32&.google.ads.admanager.v1.Report.FilterH\x00\x12G\n\nand_filter\x18\x03 \x01(\x0b\x32\x31.google.ads.admanager.v1.Report.Filter.FilterListH\x00\x12\x46\n\tor_filter\x18\x04 \x01(\x0b\x32\x31.google.ads.admanager.v1.Report.Filter.FilterListH\x00\x1a\xbf\x03\n\x0b\x46ieldFilter\x12\x39\n\x05\x66ield\x18\x01 \x01(\x0b\x32%.google.ads.admanager.v1.Report.FieldB\x03\xe0\x41\x02\x12H\n\toperation\x18\x02 \x01(\x0e\x32\x30.google.ads.admanager.v1.Report.Filter.OperationB\x03\xe0\x41\x02\x12:\n\x06values\x18\x03 \x03(\x0b\x32%.google.ads.admanager.v1.Report.ValueB\x03\xe0\x41\x02\x12>\n\x05slice\x18\x04 \x01(\x0b\x32%.google.ads.admanager.v1.Report.SliceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11time_period_index\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12T\n\x11metric_value_type\x18\x06 \x01(\x0e\x32/.google.ads.admanager.v1.Report.MetricValueTypeB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x08\n\x06_sliceB\x14\n\x12_time_period_indexB\x14\n\x12_metric_value_type\x1aJ\n\nFilterList\x12<\n\x07\x66ilters\x18\x01 \x03(\x0b\x32&.google.ads.admanager.v1.Report.FilterB\x03\xe0\x41\x02\"\xba\x01\n\tOperation\x12\x06\n\x02IN\x10\x00\x12\n\n\x06NOT_IN\x10\x01\x12\x0c\n\x08\x43ONTAINS\x10\x02\x12\x10\n\x0cNOT_CONTAINS\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x14\n\x10LESS_THAN_EQUALS\x10\x05\x12\x10\n\x0cGREATER_THAN\x10\x06\x12\x17\n\x13GREATER_THAN_EQUALS\x10\x07\x12\x0b\n\x07\x42\x45TWEEN\x10\x08\x12\x0b\n\x07MATCHES\x10\t\x12\x0f\n\x0bNOT_MATCHES\x10\nB\x06\n\x04type\x1aW\n\x04\x46lag\x12<\n\x07\x66ilters\x18\x01 \x03(\x0b\x32&.google.ads.admanager.v1.Report.FilterB\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xd8\x06\n\tDateRange\x12I\n\x05\x66ixed\x18\x01 \x01(\x0b\x32\x38.google.ads.admanager.v1.Report.DateRange.FixedDateRangeH\x00\x12O\n\x08relative\x18\x02 \x01(\x0e\x32;.google.ads.admanager.v1.Report.DateRange.RelativeDateRangeH\x00\x1a\x66\n\x0e\x46ixedDateRange\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\"\xb3\x04\n\x11RelativeDateRange\x12#\n\x1fRELATIVE_DATE_RANGE_UNSPECIFIED\x10\x00\x12\t\n\x05TODAY\x10\x01\x12\r\n\tYESTERDAY\x10\x02\x12\r\n\tTHIS_WEEK\x10\x03\x12\x15\n\x11THIS_WEEK_TO_DATE\x10\x1d\x12\x0e\n\nTHIS_MONTH\x10\x04\x12\x16\n\x12THIS_MONTH_TO_DATE\x10\x1a\x12\x10\n\x0cTHIS_QUARTER\x10\x05\x12\x18\n\x14THIS_QUARTER_TO_DATE\x10\x1b\x12\r\n\tTHIS_YEAR\x10\x06\x12\x15\n\x11THIS_YEAR_TO_DATE\x10\x1c\x12\r\n\tLAST_WEEK\x10\x07\x12\x0e\n\nLAST_MONTH\x10\x08\x12\x10\n\x0cLAST_QUARTER\x10\t\x12\r\n\tLAST_YEAR\x10\n\x12\x0f\n\x0bLAST_7_DAYS\x10\x0b\x12\x10\n\x0cLAST_30_DAYS\x10\x0c\x12\x10\n\x0cLAST_60_DAYS\x10\r\x12\x10\n\x0cLAST_90_DAYS\x10\x0e\x12\x11\n\rLAST_180_DAYS\x10\x0f\x12\x11\n\rLAST_360_DAYS\x10\x10\x12\x11\n\rLAST_365_DAYS\x10\x11\x12\x11\n\rLAST_3_MONTHS\x10\x12\x12\x11\n\rLAST_6_MONTHS\x10\x13\x12\x12\n\x0eLAST_12_MONTHS\x10\x14\x12\x11\n\rALL_AVAILABLE\x10\x15\x12\x13\n\x0fPREVIOUS_PERIOD\x10\x16\x12\x1d\n\x19SAME_PERIOD_PREVIOUS_YEAR\x10\x18\x42\x11\n\x0f\x64\x61te_range_type\"\xae\x01\n\x10TimePeriodColumn\x12\"\n\x1eTIME_PERIOD_COLUMN_UNSPECIFIED\x10\x00\x12\x1b\n\x17TIME_PERIOD_COLUMN_DATE\x10\x01\x12\x1b\n\x17TIME_PERIOD_COLUMN_WEEK\x10\x02\x12\x1c\n\x18TIME_PERIOD_COLUMN_MONTH\x10\x03\x12\x1e\n\x1aTIME_PERIOD_COLUMN_QUARTER\x10\x04\"\xf4\x92\x01\n\tDimension\x12\x19\n\x15\x44IMENSION_UNSPECIFIED\x10\x00\x12\x1b\n\x16\x41\x44VERTISER_DOMAIN_NAME\x10\xf2\x01\x12\x1b\n\x16\x41\x44VERTISER_EXTERNAL_ID\x10\xe4\x01\x12\x12\n\rADVERTISER_ID\x10\x83\x01\x12\x16\n\x11\x41\x44VERTISER_LABELS\x10\xe6\x01\x12\x19\n\x14\x41\x44VERTISER_LABEL_IDS\x10\xe5\x01\x12\x14\n\x0f\x41\x44VERTISER_NAME\x10\x84\x01\x12\x1f\n\x1a\x41\x44VERTISER_PRIMARY_CONTACT\x10\xe3\x01\x12\x10\n\x0b\x41\x44_LOCATION\x10\x86\x03\x12\x15\n\x10\x41\x44_LOCATION_NAME\x10\x87\x03\x12\x10\n\x0c\x41\x44_UNIT_CODE\x10@\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_1\x10\x41\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_10\x10J\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_11\x10K\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_12\x10L\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_13\x10M\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_14\x10N\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_15\x10O\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_16\x10P\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_2\x10\x42\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_3\x10\x43\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_4\x10\x44\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_5\x10\x45\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_6\x10\x46\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_7\x10G\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_8\x10H\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_9\x10I\x12\x11\n\rAD_UNIT_DEPTH\x10\x65\x12\x0e\n\nAD_UNIT_ID\x10\x19\x12\x18\n\x14\x41\x44_UNIT_ID_ALL_LEVEL\x10\x1b\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_1\x10\x1e\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_10\x10\x30\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_11\x10\x32\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_12\x10\x34\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_13\x10\x36\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_14\x10\x38\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_15\x10:\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_16\x10<\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_2\x10 \x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_3\x10\"\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_4\x10$\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_5\x10&\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_6\x10(\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_7\x10*\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_8\x10,\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_9\x10.\x12\x19\n\x14\x41\x44_UNIT_ID_TOP_LEVEL\x10\x8e\x01\x12\x10\n\x0c\x41\x44_UNIT_NAME\x10\x1a\x12\x1a\n\x16\x41\x44_UNIT_NAME_ALL_LEVEL\x10\x1d\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_1\x10\x1f\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_10\x10\x31\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_11\x10\x33\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_12\x10\x35\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_13\x10\x37\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_14\x10\x39\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_15\x10;\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_16\x10=\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_2\x10!\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_3\x10#\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_4\x10%\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_5\x10\'\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_6\x10)\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_7\x10+\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_8\x10-\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_9\x10/\x12\x1b\n\x16\x41\x44_UNIT_NAME_TOP_LEVEL\x10\x8f\x01\x12\x19\n\x15\x41\x44_UNIT_REWARD_AMOUNT\x10?\x12\x17\n\x13\x41\x44_UNIT_REWARD_TYPE\x10>\x12\x13\n\x0e\x41\x44_UNIT_STATUS\x10\xce\x01\x12\x18\n\x13\x41\x44_UNIT_STATUS_NAME\x10\xcf\x01\x12\x10\n\x0b\x41PP_VERSION\x10\x88\x03\x12$\n\x1f\x42\x41\x43KFILL_ADVERTISER_EXTERNAL_ID\x10\xdd\x02\x12\x1b\n\x16\x42\x41\x43KFILL_ADVERTISER_ID\x10\xda\x02\x12\x1f\n\x1a\x42\x41\x43KFILL_ADVERTISER_LABELS\x10\xdf\x02\x12\"\n\x1d\x42\x41\x43KFILL_ADVERTISER_LABEL_IDS\x10\xde\x02\x12\x1d\n\x18\x42\x41\x43KFILL_ADVERTISER_NAME\x10\xdb\x02\x12(\n#BACKFILL_ADVERTISER_PRIMARY_CONTACT\x10\xdc\x02\x12#\n\x1e\x42\x41\x43KFILL_CREATIVE_BILLING_TYPE\x10\xfa\x02\x12(\n#BACKFILL_CREATIVE_BILLING_TYPE_NAME\x10\xfb\x02\x12(\n#BACKFILL_CREATIVE_CLICK_THROUGH_URL\x10\xf8\x02\x12\x19\n\x14\x42\x41\x43KFILL_CREATIVE_ID\x10\xf2\x02\x12\x1b\n\x16\x42\x41\x43KFILL_CREATIVE_NAME\x10\xf3\x02\x12)\n$BACKFILL_CREATIVE_THIRD_PARTY_VENDOR\x10\xf9\x02\x12\x1b\n\x16\x42\x41\x43KFILL_CREATIVE_TYPE\x10\xf6\x02\x12 \n\x1b\x42\x41\x43KFILL_CREATIVE_TYPE_NAME\x10\xf7\x02\x12 \n\x1b\x42\x41\x43KFILL_LINE_ITEM_ARCHIVED\x10\x96\x02\x12\x31\n,BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION\x10\x82\x02\x12\x36\n1BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME\x10\x83\x02\x12\'\n\"BACKFILL_LINE_ITEM_COMPUTED_STATUS\x10\xa8\x02\x12,\n\'BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME\x10\xa9\x02\x12+\n&BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY\x10\x98\x02\x12%\n BACKFILL_LINE_ITEM_COST_PER_UNIT\x10\x90\x02\x12!\n\x1c\x42\x41\x43KFILL_LINE_ITEM_COST_TYPE\x10\x88\x02\x12&\n!BACKFILL_LINE_ITEM_COST_TYPE_NAME\x10\x89\x02\x12)\n$BACKFILL_LINE_ITEM_CREATIVE_END_DATE\x10\xfd\x02\x12.\n)BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE\x10\xa2\x02\x12\x33\n.BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME\x10\xa3\x02\x12+\n&BACKFILL_LINE_ITEM_CREATIVE_START_DATE\x10\xfc\x02\x12%\n BACKFILL_LINE_ITEM_CURRENCY_CODE\x10\xa0\x02\x12*\n%BACKFILL_LINE_ITEM_DELIVERY_INDICATOR\x10\x92\x02\x12*\n%BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE\x10\xa4\x02\x12/\n*BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME\x10\xa5\x02\x12)\n$BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE\x10\xa6\x02\x12+\n&BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE\x10\xa7\x02\x12 \n\x1b\x42\x41\x43KFILL_LINE_ITEM_END_DATE\x10\x8b\x02\x12%\n BACKFILL_LINE_ITEM_END_DATE_TIME\x10\x8d\x02\x12(\n#BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE\x10\xae\x02\x12-\n(BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME\x10\x81\x02\x12(\n#BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID\x10\x9d\x02\x12#\n\x1e\x42\x41\x43KFILL_LINE_ITEM_EXTERNAL_ID\x10\x91\x02\x12%\n BACKFILL_LINE_ITEM_FREQUENCY_CAP\x10\xaf\x02\x12\x1a\n\x15\x42\x41\x43KFILL_LINE_ITEM_ID\x10\xaa\x02\x12,\n\'BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP\x10\xa1\x02\x12\'\n\"BACKFILL_LINE_ITEM_LIFETIME_CLICKS\x10\x9b\x02\x12,\n\'BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS\x10\x9a\x02\x12\x35\n0BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS\x10\x9c\x02\x12 \n\x1b\x42\x41\x43KFILL_LINE_ITEM_MAKEGOOD\x10\x94\x02\x12\x1c\n\x17\x42\x41\x43KFILL_LINE_ITEM_NAME\x10\xab\x02\x12.\n)BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE\x10\x9e\x02\x12#\n\x1e\x42\x41\x43KFILL_LINE_ITEM_OPTIMIZABLE\x10\x95\x02\x12)\n$BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE\x10\x86\x02\x12.\n)BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME\x10\x87\x02\x12.\n)BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE\x10\x84\x02\x12\x33\n.BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME\x10\x85\x02\x12 \n\x1b\x42\x41\x43KFILL_LINE_ITEM_PRIORITY\x10\x8a\x02\x12*\n%BACKFILL_LINE_ITEM_RESERVATION_STATUS\x10\xb2\x02\x12/\n*BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME\x10\xb3\x02\x12\"\n\x1d\x42\x41\x43KFILL_LINE_ITEM_START_DATE\x10\x8c\x02\x12\'\n\"BACKFILL_LINE_ITEM_START_DATE_TIME\x10\x8e\x02\x12\x1c\n\x17\x42\x41\x43KFILL_LINE_ITEM_TYPE\x10\xac\x02\x12!\n\x1c\x42\x41\x43KFILL_LINE_ITEM_TYPE_NAME\x10\xad\x02\x12%\n BACKFILL_LINE_ITEM_UNLIMITED_END\x10\x8f\x02\x12+\n&BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT\x10\x93\x02\x12)\n$BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE\x10\x9f\x02\x12*\n%BACKFILL_MASTER_COMPANION_CREATIVE_ID\x10\xf4\x02\x12,\n\'BACKFILL_MASTER_COMPANION_CREATIVE_NAME\x10\xf5\x02\x12\x1a\n\x15\x42\x41\x43KFILL_ORDER_AGENCY\x10\xb9\x02\x12\x1d\n\x18\x42\x41\x43KFILL_ORDER_AGENCY_ID\x10\xba\x02\x12\x1e\n\x19\x42\x41\x43KFILL_ORDER_BOOKED_CPC\x10\xbb\x02\x12\x1e\n\x19\x42\x41\x43KFILL_ORDER_BOOKED_CPM\x10\xbc\x02\x12#\n\x1e\x42\x41\x43KFILL_ORDER_DELIVERY_STATUS\x10\xd4\x02\x12(\n#BACKFILL_ORDER_DELIVERY_STATUS_NAME\x10\xd5\x02\x12\x1c\n\x17\x42\x41\x43KFILL_ORDER_END_DATE\x10\xbd\x02\x12!\n\x1c\x42\x41\x43KFILL_ORDER_END_DATE_TIME\x10\xbf\x02\x12\x1f\n\x1a\x42\x41\x43KFILL_ORDER_EXTERNAL_ID\x10\xc0\x02\x12\x16\n\x11\x42\x41\x43KFILL_ORDER_ID\x10\xd2\x02\x12\x1a\n\x15\x42\x41\x43KFILL_ORDER_LABELS\x10\xce\x02\x12\x1d\n\x18\x42\x41\x43KFILL_ORDER_LABEL_IDS\x10\xcf\x02\x12#\n\x1e\x42\x41\x43KFILL_ORDER_LIFETIME_CLICKS\x10\xc2\x02\x12(\n#BACKFILL_ORDER_LIFETIME_IMPRESSIONS\x10\xc3\x02\x12\x18\n\x13\x42\x41\x43KFILL_ORDER_NAME\x10\xd3\x02\x12\x1d\n\x18\x42\x41\x43KFILL_ORDER_PO_NUMBER\x10\xc4\x02\x12 \n\x1b\x42\x41\x43KFILL_ORDER_PROGRAMMATIC\x10\xc1\x02\x12\x1f\n\x1a\x42\x41\x43KFILL_ORDER_SALESPERSON\x10\xc5\x02\x12)\n$BACKFILL_ORDER_SECONDARY_SALESPEOPLE\x10\xc9\x02\x12,\n\'BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID\x10\xc8\x02\x12)\n$BACKFILL_ORDER_SECONDARY_TRAFFICKERS\x10\xcb\x02\x12,\n\'BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID\x10\xca\x02\x12\x1e\n\x19\x42\x41\x43KFILL_ORDER_START_DATE\x10\xcc\x02\x12#\n\x1e\x42\x41\x43KFILL_ORDER_START_DATE_TIME\x10\xcd\x02\x12\x1e\n\x19\x42\x41\x43KFILL_ORDER_TRAFFICKER\x10\xc6\x02\x12!\n\x1c\x42\x41\x43KFILL_ORDER_TRAFFICKER_ID\x10\xc7\x02\x12!\n\x1c\x42\x41\x43KFILL_ORDER_UNLIMITED_END\x10\xbe\x02\x12#\n\x1e\x42\x41\x43KFILL_PROGRAMMATIC_BUYER_ID\x10\xd0\x02\x12%\n BACKFILL_PROGRAMMATIC_BUYER_NAME\x10\xd1\x02\x12\x12\n\rBRANDING_TYPE\x10\xff\x02\x12\x17\n\x12\x42RANDING_TYPE_NAME\x10\x80\x03\x12\x14\n\x10\x42ROWSER_CATEGORY\x10w\x12\x19\n\x15\x42ROWSER_CATEGORY_NAME\x10x\x12\x0f\n\nBROWSER_ID\x10\xeb\x01\x12\x11\n\x0c\x42ROWSER_NAME\x10\xec\x01\x12\x0f\n\nCARRIER_ID\x10\xf1\x02\x12\x11\n\x0c\x43\x41RRIER_NAME\x10\xf0\x02\x12\x1d\n\x18\x43LASSIFIED_ADVERTISER_ID\x10\x85\x01\x12\x1f\n\x1a\x43LASSIFIED_ADVERTISER_NAME\x10\x86\x01\x12\x18\n\x13\x43LASSIFIED_BRAND_ID\x10\xf3\x01\x12\x1a\n\x15\x43LASSIFIED_BRAND_NAME\x10\xf4\x01\x12\x0f\n\nCONTENT_ID\x10\xf6\x01\x12\x11\n\x0c\x43ONTENT_NAME\x10\xf7\x01\x12\x0e\n\nCOUNTRY_ID\x10\x0b\x12\x10\n\x0c\x43OUNTRY_NAME\x10\x0c\x12\x1a\n\x15\x43REATIVE_BILLING_TYPE\x10\xee\x02\x12\x1f\n\x1a\x43REATIVE_BILLING_TYPE_NAME\x10\xef\x02\x12\x1f\n\x1a\x43REATIVE_CLICK_THROUGH_URL\x10\xae\x01\x12\x10\n\x0b\x43REATIVE_ID\x10\x8a\x01\x12\x12\n\rCREATIVE_NAME\x10\x8b\x01\x12\x18\n\x13\x43REATIVE_TECHNOLOGY\x10\x94\x01\x12\x1d\n\x18\x43REATIVE_TECHNOLOGY_NAME\x10\x95\x01\x12 \n\x1b\x43REATIVE_THIRD_PARTY_VENDOR\x10\xe9\x02\x12\x12\n\rCREATIVE_TYPE\x10\xd8\x02\x12\x17\n\x12\x43REATIVE_TYPE_NAME\x10\xd9\x02\x12\x08\n\x04\x44\x41TE\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x12\n\x0e\x44\x45MAND_CHANNEL\x10\t\x12\x17\n\x13\x44\x45MAND_CHANNEL_NAME\x10\n\x12\x15\n\x11\x44\x45MAND_SUBCHANNEL\x10\x16\x12\x1a\n\x16\x44\x45MAND_SUBCHANNEL_NAME\x10\x17\x12\x0b\n\x06\x44\x45VICE\x10\xe2\x01\x12\x13\n\x0f\x44\x45VICE_CATEGORY\x10\x0f\x12\x18\n\x14\x44\x45VICE_CATEGORY_NAME\x10\x10\x12\x10\n\x0b\x44\x45VICE_NAME\x10\xe1\x01\x12$\n\x1f\x45XCHANGE_THIRD_PARTY_COMPANY_ID\x10\xb9\x01\x12&\n!EXCHANGE_THIRD_PARTY_COMPANY_NAME\x10\xba\x01\x12\x1f\n\x1a\x46IRST_LOOK_PRICING_RULE_ID\x10\xf8\x01\x12!\n\x1c\x46IRST_LOOK_PRICING_RULE_NAME\x10\xf9\x01\x12\x08\n\x04HOUR\x10\x64\x12\x15\n\x10INTERACTION_TYPE\x10\xdf\x01\x12\x1a\n\x15INTERACTION_TYPE_NAME\x10\xe0\x01\x12\x14\n\x10INVENTORY_FORMAT\x10\x11\x12\x19\n\x15INVENTORY_FORMAT_NAME\x10\x12\x12\x12\n\x0eINVENTORY_TYPE\x10\x13\x12\x17\n\x13INVENTORY_TYPE_NAME\x10\x14\x12\x12\n\rIS_ADX_DIRECT\x10\xfe\x02\x12\x17\n\x12IS_FIRST_LOOK_DEAL\x10\x91\x03\x12\x12\n\rKEY_VALUES_ID\x10\xd6\x01\x12\x14\n\x0fKEY_VALUES_NAME\x10\xd7\x01\x12\x17\n\x12LINE_ITEM_ARCHIVED\x10\xbc\x01\x12(\n#LINE_ITEM_COMPANION_DELIVERY_OPTION\x10\xcc\x01\x12-\n(LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME\x10\xcd\x01\x12\x1e\n\x19LINE_ITEM_COMPUTED_STATUS\x10\xfa\x01\x12#\n\x1eLINE_ITEM_COMPUTED_STATUS_NAME\x10\xfb\x01\x12!\n\x1dLINE_ITEM_CONTRACTED_QUANTITY\x10\\\x12\x1b\n\x17LINE_ITEM_COST_PER_UNIT\x10U\x12\x18\n\x13LINE_ITEM_COST_TYPE\x10\xd4\x01\x12\x1d\n\x18LINE_ITEM_COST_TYPE_NAME\x10\xd5\x01\x12 \n\x1bLINE_ITEM_CREATIVE_END_DATE\x10\xb0\x01\x12%\n LINE_ITEM_CREATIVE_ROTATION_TYPE\x10\xbd\x01\x12*\n%LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME\x10\xbe\x01\x12\"\n\x1dLINE_ITEM_CREATIVE_START_DATE\x10\xaf\x01\x12\x1c\n\x17LINE_ITEM_CURRENCY_CODE\x10\xb4\x01\x12 \n\x1cLINE_ITEM_DELIVERY_INDICATOR\x10W\x12!\n\x1cLINE_ITEM_DELIVERY_RATE_TYPE\x10\xbf\x01\x12&\n!LINE_ITEM_DELIVERY_RATE_TYPE_NAME\x10\xc0\x01\x12 \n\x1bLINE_ITEM_DISCOUNT_ABSOLUTE\x10\xc3\x01\x12\"\n\x1dLINE_ITEM_DISCOUNT_PERCENTAGE\x10\xc4\x01\x12\x16\n\x12LINE_ITEM_END_DATE\x10Q\x12\x1b\n\x17LINE_ITEM_END_DATE_TIME\x10S\x12\x1f\n\x1aLINE_ITEM_ENVIRONMENT_TYPE\x10\xc9\x01\x12$\n\x1fLINE_ITEM_ENVIRONMENT_TYPE_NAME\x10\xca\x01\x12\x1e\n\x1aLINE_ITEM_EXTERNAL_DEAL_ID\x10\x61\x12\x19\n\x15LINE_ITEM_EXTERNAL_ID\x10V\x12\x1c\n\x17LINE_ITEM_FREQUENCY_CAP\x10\x80\x02\x12\x10\n\x0cLINE_ITEM_ID\x10\x01\x12#\n\x1eLINE_ITEM_LAST_MODIFIED_BY_APP\x10\xb5\x01\x12\x1d\n\x19LINE_ITEM_LIFETIME_CLICKS\x10_\x12\"\n\x1eLINE_ITEM_LIFETIME_IMPRESSIONS\x10^\x12+\n\'LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS\x10`\x12\x16\n\x12LINE_ITEM_MAKEGOOD\x10Y\x12\x12\n\x0eLINE_ITEM_NAME\x10\x02\x12$\n LINE_ITEM_NON_CPD_BOOKED_REVENUE\x10\x62\x12\x19\n\x15LINE_ITEM_OPTIMIZABLE\x10Z\x12 \n\x1bLINE_ITEM_PRIMARY_GOAL_TYPE\x10\xd2\x01\x12%\n LINE_ITEM_PRIMARY_GOAL_TYPE_NAME\x10\xd3\x01\x12)\n%LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE\x10]\x12,\n\'LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE\x10\x8c\x03\x12%\n LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE\x10\xd0\x01\x12*\n%LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME\x10\xd1\x01\x12\x16\n\x12LINE_ITEM_PRIORITY\x10\x18\x12!\n\x1cLINE_ITEM_RESERVATION_STATUS\x10\xb0\x02\x12&\n!LINE_ITEM_RESERVATION_STATUS_NAME\x10\xb1\x02\x12\x18\n\x14LINE_ITEM_START_DATE\x10R\x12\x1d\n\x19LINE_ITEM_START_DATE_TIME\x10T\x12\x13\n\x0eLINE_ITEM_TYPE\x10\xc1\x01\x12\x18\n\x13LINE_ITEM_TYPE_NAME\x10\xc2\x01\x12\x1c\n\x17LINE_ITEM_UNLIMITED_END\x10\xbb\x01\x12!\n\x1dLINE_ITEM_VALUE_COST_PER_UNIT\x10X\x12 \n\x1bLINE_ITEM_WEB_PROPERTY_CODE\x10\xb3\x01\x12!\n\x1cMASTER_COMPANION_CREATIVE_ID\x10\x8c\x01\x12#\n\x1eMASTER_COMPANION_CREATIVE_NAME\x10\x8d\x01\x12\x14\n\x0fMOBILE_APP_FREE\x10\x80\x01\x12\x18\n\x13MOBILE_APP_ICON_URL\x10\x81\x01\x12\x11\n\rMOBILE_APP_ID\x10{\x12\x13\n\x0fMOBILE_APP_NAME\x10\x7f\x12 \n\x1bMOBILE_APP_OWNERSHIP_STATUS\x10\xb7\x02\x12%\n MOBILE_APP_OWNERSHIP_STATUS_NAME\x10\xb8\x02\x12\x14\n\x10MOBILE_APP_STORE\x10}\x12\x1a\n\x15MOBILE_APP_STORE_NAME\x10\xf5\x01\x12\x19\n\x15MOBILE_INVENTORY_TYPE\x10\x63\x12\x1e\n\x1aMOBILE_INVENTORY_TYPE_NAME\x10\x15\x12\x1c\n\x17MOBILE_SDK_VERSION_NAME\x10\x82\x01\x12\x0e\n\nMONTH_YEAR\x10\x06\x12\x18\n\x13NATIVE_AD_FORMAT_ID\x10\xff\x01\x12\x1a\n\x15NATIVE_AD_FORMAT_NAME\x10\xfe\x01\x12\x14\n\x0fNATIVE_STYLE_ID\x10\xfd\x01\x12\x16\n\x11NATIVE_STYLE_NAME\x10\xfc\x01\x12\x1d\n\x19OPERATING_SYSTEM_CATEGORY\x10u\x12\"\n\x1eOPERATING_SYSTEM_CATEGORY_NAME\x10v\x12 \n\x1bOPERATING_SYSTEM_VERSION_ID\x10\xee\x01\x12\"\n\x1dOPERATING_SYSTEM_VERSION_NAME\x10\xed\x01\x12\x11\n\x0cORDER_AGENCY\x10\x96\x01\x12\x14\n\x0fORDER_AGENCY_ID\x10\x97\x01\x12\x15\n\x10ORDER_BOOKED_CPC\x10\x98\x01\x12\x15\n\x10ORDER_BOOKED_CPM\x10\x99\x01\x12\x1a\n\x15ORDER_DELIVERY_STATUS\x10\xe7\x01\x12\x1f\n\x1aORDER_DELIVERY_STATUS_NAME\x10\xef\x01\x12\x13\n\x0eORDER_END_DATE\x10\x9a\x01\x12\x18\n\x13ORDER_END_DATE_TIME\x10\x9b\x01\x12\x16\n\x11ORDER_EXTERNAL_ID\x10\x9c\x01\x12\x0c\n\x08ORDER_ID\x10\x07\x12\x11\n\x0cORDER_LABELS\x10\xaa\x01\x12\x14\n\x0fORDER_LABEL_IDS\x10\xab\x01\x12\x1a\n\x15ORDER_LIFETIME_CLICKS\x10\x9e\x01\x12\x1f\n\x1aORDER_LIFETIME_IMPRESSIONS\x10\x9f\x01\x12\x0e\n\nORDER_NAME\x10\x08\x12\x14\n\x0fORDER_PO_NUMBER\x10\xa0\x01\x12\x17\n\x12ORDER_PROGRAMMATIC\x10\x9d\x01\x12\x16\n\x11ORDER_SALESPERSON\x10\xa1\x01\x12 \n\x1bORDER_SECONDARY_SALESPEOPLE\x10\xa4\x01\x12#\n\x1eORDER_SECONDARY_SALESPEOPLE_ID\x10\xa5\x01\x12 \n\x1bORDER_SECONDARY_TRAFFICKERS\x10\xa6\x01\x12#\n\x1eORDER_SECONDARY_TRAFFICKERS_ID\x10\xa7\x01\x12\x15\n\x10ORDER_START_DATE\x10\xa8\x01\x12\x1a\n\x15ORDER_START_DATE_TIME\x10\xa9\x01\x12\x15\n\x10ORDER_TRAFFICKER\x10\xa2\x01\x12\x18\n\x13ORDER_TRAFFICKER_ID\x10\xa3\x01\x12\x18\n\x13ORDER_UNLIMITED_END\x10\xcb\x01\x12\x10\n\x0cPLACEMENT_ID\x10q\x12\x15\n\x10PLACEMENT_ID_ALL\x10\x90\x01\x12\x12\n\x0ePLACEMENT_NAME\x10r\x12\x17\n\x12PLACEMENT_NAME_ALL\x10\x91\x01\x12\x15\n\x10PLACEMENT_STATUS\x10\xea\x02\x12\x19\n\x14PLACEMENT_STATUS_ALL\x10\xeb\x02\x12\x1a\n\x15PLACEMENT_STATUS_NAME\x10\xec\x02\x12\x1e\n\x19PLACEMENT_STATUS_NAME_ALL\x10\xed\x02\x12\x1a\n\x15PROGRAMMATIC_BUYER_ID\x10\xf0\x01\x12\x1c\n\x17PROGRAMMATIC_BUYER_NAME\x10\xf1\x01\x12\x18\n\x14PROGRAMMATIC_CHANNEL\x10\r\x12\x1d\n\x19PROGRAMMATIC_CHANNEL_NAME\x10\x0e\x12\x1b\n\x16RENDERED_CREATIVE_SIZE\x10\xd7\x02\x12\x17\n\x12REQUESTED_AD_SIZES\x10\xe0\x02\x12\x11\n\x0cREQUEST_TYPE\x10\x92\x01\x12\x16\n\x11REQUEST_TYPE_NAME\x10\x93\x01\x12$\n\x1fSERVER_SIDE_UNWRAPPING_ELIGIBLE\x10\xd5\x04\x12\t\n\x04SITE\x10\x83\x03\x12\x11\n\x0cTARGETING_ID\x10\xe8\x01\x12\x13\n\x0eTARGETING_NAME\x10\xe9\x01\x12\x13\n\x0eTARGETING_TYPE\x10\x81\x03\x12\x18\n\x13TARGETING_TYPE_NAME\x10\x82\x03\x12\x13\n\x0eTRAFFIC_SOURCE\x10\x84\x03\x12\x18\n\x13TRAFFIC_SOURCE_NAME\x10\x85\x03\x12\x1c\n\x17UNIFIED_PRICING_RULE_ID\x10\x89\x03\x12\x1e\n\x19UNIFIED_PRICING_RULE_NAME\x10\x8a\x03\x12\x10\n\x0bVIDEO_PLCMT\x10\xac\x01\x12\x15\n\x10VIDEO_PLCMT_NAME\x10\xad\x01\x12\x08\n\x04WEEK\x10\x05\x12\x1b\n\x16YIELD_GROUP_BUYER_NAME\x10\xb8\x01\x12\x13\n\x0eYIELD_GROUP_ID\x10\xb6\x01\x12\x15\n\x10YIELD_GROUP_NAME\x10\xb7\x01\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID\x10\x90N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID\x10\x91N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID\x10\x92N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID\x10\x93N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID\x10\x94N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID\x10\x95N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID\x10\x96N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID\x10\x97N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID\x10\x98N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID\x10\x99N\x12(\n#LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID\x10\x9aN\x12(\n#LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID\x10\x9bN\x12(\n#LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID\x10\x9cN\x12(\n#LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID\x10\x9dN\x12(\n#LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID\x10\x9eN\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_0_VALUE\x10\xf8U\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_1_VALUE\x10\xf9U\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_2_VALUE\x10\xfaU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_3_VALUE\x10\xfbU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_4_VALUE\x10\xfcU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_5_VALUE\x10\xfdU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_6_VALUE\x10\xfeU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_7_VALUE\x10\xffU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_8_VALUE\x10\x80V\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_9_VALUE\x10\x81V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_10_VALUE\x10\x82V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_11_VALUE\x10\x83V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_12_VALUE\x10\x84V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_13_VALUE\x10\x85V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_14_VALUE\x10\x86V\x12#\n\x1eORDER_CUSTOM_FIELD_0_OPTION_ID\x10\xe0]\x12#\n\x1eORDER_CUSTOM_FIELD_1_OPTION_ID\x10\xe1]\x12#\n\x1eORDER_CUSTOM_FIELD_2_OPTION_ID\x10\xe2]\x12#\n\x1eORDER_CUSTOM_FIELD_3_OPTION_ID\x10\xe3]\x12#\n\x1eORDER_CUSTOM_FIELD_4_OPTION_ID\x10\xe4]\x12#\n\x1eORDER_CUSTOM_FIELD_5_OPTION_ID\x10\xe5]\x12#\n\x1eORDER_CUSTOM_FIELD_6_OPTION_ID\x10\xe6]\x12#\n\x1eORDER_CUSTOM_FIELD_7_OPTION_ID\x10\xe7]\x12#\n\x1eORDER_CUSTOM_FIELD_8_OPTION_ID\x10\xe8]\x12#\n\x1eORDER_CUSTOM_FIELD_9_OPTION_ID\x10\xe9]\x12$\n\x1fORDER_CUSTOM_FIELD_10_OPTION_ID\x10\xea]\x12$\n\x1fORDER_CUSTOM_FIELD_11_OPTION_ID\x10\xeb]\x12$\n\x1fORDER_CUSTOM_FIELD_12_OPTION_ID\x10\xec]\x12$\n\x1fORDER_CUSTOM_FIELD_13_OPTION_ID\x10\xed]\x12$\n\x1fORDER_CUSTOM_FIELD_14_OPTION_ID\x10\xee]\x12\x1f\n\x1aORDER_CUSTOM_FIELD_0_VALUE\x10\xc8\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_1_VALUE\x10\xc9\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_2_VALUE\x10\xca\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_3_VALUE\x10\xcb\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_4_VALUE\x10\xcc\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_5_VALUE\x10\xcd\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_6_VALUE\x10\xce\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_7_VALUE\x10\xcf\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_8_VALUE\x10\xd0\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_9_VALUE\x10\xd1\x65\x12 \n\x1bORDER_CUSTOM_FIELD_10_VALUE\x10\xd2\x65\x12 \n\x1bORDER_CUSTOM_FIELD_11_VALUE\x10\xd3\x65\x12 \n\x1bORDER_CUSTOM_FIELD_12_VALUE\x10\xd4\x65\x12 \n\x1bORDER_CUSTOM_FIELD_13_VALUE\x10\xd5\x65\x12 \n\x1bORDER_CUSTOM_FIELD_14_VALUE\x10\xd6\x65\x12&\n!CREATIVE_CUSTOM_FIELD_0_OPTION_ID\x10\xb0m\x12&\n!CREATIVE_CUSTOM_FIELD_1_OPTION_ID\x10\xb1m\x12&\n!CREATIVE_CUSTOM_FIELD_2_OPTION_ID\x10\xb2m\x12&\n!CREATIVE_CUSTOM_FIELD_3_OPTION_ID\x10\xb3m\x12&\n!CREATIVE_CUSTOM_FIELD_4_OPTION_ID\x10\xb4m\x12&\n!CREATIVE_CUSTOM_FIELD_5_OPTION_ID\x10\xb5m\x12&\n!CREATIVE_CUSTOM_FIELD_6_OPTION_ID\x10\xb6m\x12&\n!CREATIVE_CUSTOM_FIELD_7_OPTION_ID\x10\xb7m\x12&\n!CREATIVE_CUSTOM_FIELD_8_OPTION_ID\x10\xb8m\x12&\n!CREATIVE_CUSTOM_FIELD_9_OPTION_ID\x10\xb9m\x12\'\n\"CREATIVE_CUSTOM_FIELD_10_OPTION_ID\x10\xbam\x12\'\n\"CREATIVE_CUSTOM_FIELD_11_OPTION_ID\x10\xbbm\x12\'\n\"CREATIVE_CUSTOM_FIELD_12_OPTION_ID\x10\xbcm\x12\'\n\"CREATIVE_CUSTOM_FIELD_13_OPTION_ID\x10\xbdm\x12\'\n\"CREATIVE_CUSTOM_FIELD_14_OPTION_ID\x10\xbem\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_0_VALUE\x10\x98u\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_1_VALUE\x10\x99u\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_2_VALUE\x10\x9au\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_3_VALUE\x10\x9bu\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_4_VALUE\x10\x9cu\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_5_VALUE\x10\x9du\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_6_VALUE\x10\x9eu\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_7_VALUE\x10\x9fu\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_8_VALUE\x10\xa0u\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_9_VALUE\x10\xa1u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_10_VALUE\x10\xa2u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_11_VALUE\x10\xa3u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_12_VALUE\x10\xa4u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_13_VALUE\x10\xa5u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_14_VALUE\x10\xa6u\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID\x10\x80}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID\x10\x81}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID\x10\x82}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID\x10\x83}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID\x10\x84}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID\x10\x85}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID\x10\x86}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID\x10\x87}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID\x10\x88}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID\x10\x89}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID\x10\x8a}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID\x10\x8b}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID\x10\x8c}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID\x10\x8d}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID\x10\x8e}\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE\x10\xe8\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE\x10\xe9\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE\x10\xea\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE\x10\xeb\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE\x10\xec\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE\x10\xed\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE\x10\xee\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE\x10\xef\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE\x10\xf0\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE\x10\xf1\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE\x10\xf2\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE\x10\xf3\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE\x10\xf4\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE\x10\xf5\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE\x10\xf6\x84\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID\x10\xd0\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID\x10\xd1\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID\x10\xd2\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID\x10\xd3\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID\x10\xd4\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID\x10\xd5\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID\x10\xd6\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID\x10\xd7\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID\x10\xd8\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID\x10\xd9\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID\x10\xda\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID\x10\xdb\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID\x10\xdc\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID\x10\xdd\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID\x10\xde\x8c\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE\x10\xb8\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE\x10\xb9\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE\x10\xba\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE\x10\xbb\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE\x10\xbc\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE\x10\xbd\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE\x10\xbe\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE\x10\xbf\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE\x10\xc0\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE\x10\xc1\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE\x10\xc2\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE\x10\xc3\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE\x10\xc4\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE\x10\xc5\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE\x10\xc6\x94\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID\x10\xa0\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID\x10\xa1\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID\x10\xa2\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID\x10\xa3\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID\x10\xa4\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID\x10\xa5\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID\x10\xa6\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID\x10\xa7\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID\x10\xa8\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID\x10\xa9\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID\x10\xaa\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID\x10\xab\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID\x10\xac\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID\x10\xad\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID\x10\xae\x9c\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE\x10\x88\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE\x10\x89\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE\x10\x8a\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE\x10\x8b\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE\x10\x8c\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE\x10\x8d\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE\x10\x8e\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE\x10\x8f\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE\x10\x90\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE\x10\x91\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE\x10\x92\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE\x10\x93\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE\x10\x94\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE\x10\x95\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE\x10\x96\xa4\x01\x12!\n\x1b\x43USTOM_DIMENSION_0_VALUE_ID\x10\xa0\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_1_VALUE_ID\x10\xa1\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_2_VALUE_ID\x10\xa2\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_3_VALUE_ID\x10\xa3\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_4_VALUE_ID\x10\xa4\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_5_VALUE_ID\x10\xa5\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_6_VALUE_ID\x10\xa6\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_7_VALUE_ID\x10\xa7\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_8_VALUE_ID\x10\xa8\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_9_VALUE_ID\x10\xa9\x8d\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_0_VALUE\x10\x88\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_1_VALUE\x10\x89\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_2_VALUE\x10\x8a\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_3_VALUE\x10\x8b\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_4_VALUE\x10\x8c\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_5_VALUE\x10\x8d\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_6_VALUE\x10\x8e\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_7_VALUE\x10\x8f\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_8_VALUE\x10\x90\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_9_VALUE\x10\x91\x95\x06\"\x9e\x32\n\x06Metric\x12\x16\n\x12METRIC_UNSPECIFIED\x10\x00\x12%\n!ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME\x10=\x12$\n ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS\x10:\x12&\n\"ACTIVE_VIEW_MEASURABLE_IMPRESSIONS\x10\x39\x12+\n\'ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE\x10<\x12$\n ACTIVE_VIEW_VIEWABLE_IMPRESSIONS\x10\x38\x12)\n%ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE\x10;\x12-\n)ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME\x10I\x12,\n(ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS\x10\x46\x12.\n*ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS\x10\x45\x12\x33\n/ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE\x10H\x12,\n(ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS\x10\x44\x12\x31\n-ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE\x10G\x12\x18\n\x14\x41\x44SENSE_AVERAGE_ECPM\x10\x1a\x12\x12\n\x0e\x41\x44SENSE_CLICKS\x10\x17\x12\x0f\n\x0b\x41\x44SENSE_CTR\x10\x18\x12\x17\n\x13\x41\x44SENSE_IMPRESSIONS\x10\x16\x12\x1a\n\x16\x41\x44SENSE_PERCENT_CLICKS\x10\x1c\x12\x1f\n\x1b\x41\x44SENSE_PERCENT_IMPRESSIONS\x10\x1b\x12\x1b\n\x17\x41\x44SENSE_PERCENT_REVENUE\x10\x1d\x12\'\n#ADSENSE_PERCENT_REVENUE_WITHOUT_CPD\x10\x1e\x12\x1c\n\x18\x41\x44SENSE_RESPONSES_SERVED\x10)\x12\x13\n\x0f\x41\x44SENSE_REVENUE\x10\x19\x12\x31\n-AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME\x10O\x12\x30\n,AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS\x10L\x12\x32\n.AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS\x10K\x12\x37\n3AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE\x10N\x12\x30\n,AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS\x10J\x12\x35\n1AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE\x10M\x12\x1c\n\x18\x41\x44_EXCHANGE_AVERAGE_ECPM\x10\x12\x12\x16\n\x12\x41\x44_EXCHANGE_CLICKS\x10\x0f\x12\x13\n\x0f\x41\x44_EXCHANGE_CTR\x10\x10\x12\x1b\n\x17\x41\x44_EXCHANGE_IMPRESSIONS\x10\x0e\x12\x1e\n\x1a\x41\x44_EXCHANGE_PERCENT_CLICKS\x10\x14\x12#\n\x1f\x41\x44_EXCHANGE_PERCENT_IMPRESSIONS\x10\x13\x12\x1f\n\x1b\x41\x44_EXCHANGE_PERCENT_REVENUE\x10\x15\x12+\n\'AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD\x10\x1f\x12 \n\x1c\x41\x44_EXCHANGE_RESPONSES_SERVED\x10*\x12\x17\n\x13\x41\x44_EXCHANGE_REVENUE\x10\x11\x12\x0f\n\x0b\x41\x44_REQUESTS\x10&\x12/\n+AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME\x10\x43\x12.\n*AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS\x10@\x12\x30\n,AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS\x10?\x12\x35\n1AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE\x10\x42\x12.\n*AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS\x10>\x12\x33\n/AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE\x10\x41\x12\x1a\n\x16\x41\x44_SERVER_AVERAGE_ECPM\x10\"\x12&\n\"AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD\x10\n\x12*\n%AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS\x10\x86\x02\x12\x14\n\x10\x41\x44_SERVER_CLICKS\x10\x07\x12\x19\n\x15\x41\x44_SERVER_CPD_REVENUE\x10 \x12\x11\n\rAD_SERVER_CTR\x10\x08\x12\x19\n\x15\x41\x44_SERVER_IMPRESSIONS\x10\x06\x12\x1c\n\x18\x41\x44_SERVER_PERCENT_CLICKS\x10\x0c\x12!\n\x1d\x41\x44_SERVER_PERCENT_IMPRESSIONS\x10\x0b\x12\x1d\n\x19\x41\x44_SERVER_PERCENT_REVENUE\x10#\x12)\n%AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD\x10\r\x12\x1e\n\x1a\x41\x44_SERVER_RESPONSES_SERVED\x10(\x12\x15\n\x11\x41\x44_SERVER_REVENUE\x10!\x12!\n\x1d\x41\x44_SERVER_REVENUE_WITHOUT_CPD\x10\t\x12\x1a\n\x15\x41\x44_SERVER_TRACKED_ADS\x10\x88\x02\x12\x35\n0AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS\x10\x85\x02\x12 \n\x1b\x41\x44_SERVER_UNFILTERED_CLICKS\x10\x83\x02\x12%\n AD_SERVER_UNFILTERED_IMPRESSIONS\x10\x84\x02\x12%\n AD_SERVER_UNFILTERED_TRACKED_ADS\x10\x87\x02\x12\x10\n\x0c\x41VERAGE_ECPM\x10%\x12\x1c\n\x18\x41VERAGE_ECPM_WITHOUT_CPD\x10\x05\x12\n\n\x06\x43LICKS\x10\x02\x12\x15\n\x11\x43ODE_SERVED_COUNT\x10,\x12\x07\n\x03\x43TR\x10\x03\x12-\n(GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS\x10\x81\x01\x12$\n\x1fGOOGLE_SOLD_AUCTION_IMPRESSIONS\x10\x80\x01\x12%\n GOOGLE_SOLD_COVIEWED_IMPRESSIONS\x10\x83\x01\x12\x1c\n\x17GOOGLE_SOLD_IMPRESSIONS\x10\x82\x01\x12\x30\n,GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS\x10\x7f\x12\'\n#GOOGLE_SOLD_RESERVATION_IMPRESSIONS\x10~\x12\x0f\n\x0bIMPRESSIONS\x10\x01\x12&\n!PARTNER_SALES_FILLED_POD_REQUESTS\x10\x87\x01\x12\x1c\n\x17PARTNER_SALES_FILL_RATE\x10\x88\x01\x12%\n PARTNER_SALES_PARTNER_MATCH_RATE\x10\x89\x01\x12\x1a\n\x15PARTNER_SALES_QUERIES\x10\x84\x01\x12\'\n\"PARTNER_SALES_UNFILLED_IMPRESSIONS\x10\x85\x01\x12$\n\x1fPARTNER_SALES_UNMATCHED_QUERIES\x10\x86\x01\x12\x1c\n\x18PARTNER_SOLD_CODE_SERVED\x10}\x12%\n!PARTNER_SOLD_COVIEWED_IMPRESSIONS\x10|\x12\x1c\n\x18PARTNER_SOLD_IMPRESSIONS\x10{\x12&\n!PROGRAMMATIC_ELIGIBLE_AD_REQUESTS\x10\xb1\x01\x12\x1c\n\x17PROGRAMMATIC_MATCH_RATE\x10\xb2\x01\x12\"\n\x1dPROGRAMMATIC_RESPONSES_SERVED\x10\xb0\x01\x12\x14\n\x10RESPONSES_SERVED\x10\'\x12\x0b\n\x07REVENUE\x10$\x12\x17\n\x13REVENUE_WITHOUT_CPD\x10\x04\x12.\n)SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS\x10\xb2\x03\x12$\n\x1fSERVER_SIDE_UNWRAPPING_CALLOUTS\x10\xb3\x03\x12+\n&SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES\x10\xb4\x03\x12+\n&SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES\x10\xb5\x03\x12\x30\n+SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES\x10\xb6\x03\x12$\n\x1fSERVER_SIDE_UNWRAPPING_TIMEOUTS\x10\xb7\x03\x12\x18\n\x14UNFILLED_IMPRESSIONS\x10-\x12\x19\n\x15UNMATCHED_AD_REQUESTS\x10+\x12*\n&USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN\x10y\x12\x32\n.USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS\x10z\x12.\n*VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE\x10\\\x12\x1f\n\x1bVIDEO_INTERACTION_COLLAPSES\x10]\x12\x1d\n\x19VIDEO_INTERACTION_EXPANDS\x10_\x12\"\n\x1eVIDEO_INTERACTION_FULL_SCREENS\x10`\x12\x1b\n\x17VIDEO_INTERACTION_MUTES\x10\x61\x12\x1c\n\x18VIDEO_INTERACTION_PAUSES\x10\x62\x12\x1d\n\x19VIDEO_INTERACTION_RESUMES\x10\x63\x12\x1d\n\x19VIDEO_INTERACTION_REWINDS\x10\x64\x12\x1d\n\x19VIDEO_INTERACTION_UNMUTES\x10\x65\x12!\n\x1dVIDEO_INTERACTION_VIDEO_SKIPS\x10\x66\x12$\n\x1fVIDEO_REAL_TIME_CREATIVE_SERVES\x10\x8b\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_100_COUNT\x10\x8f\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_101_COUNT\x10\x90\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_102_COUNT\x10\x91\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_200_COUNT\x10\x92\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_201_COUNT\x10\x93\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_202_COUNT\x10\x94\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_203_COUNT\x10\x95\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_300_COUNT\x10\x96\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_301_COUNT\x10\x97\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_302_COUNT\x10\x98\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_303_COUNT\x10\x99\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_400_COUNT\x10\x9a\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_401_COUNT\x10\x9b\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_402_COUNT\x10\x9c\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_403_COUNT\x10\x9d\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_405_COUNT\x10\x9e\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_406_COUNT\x10\x9f\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_407_COUNT\x10\xa0\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_408_COUNT\x10\xa1\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_409_COUNT\x10\xa2\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_410_COUNT\x10\xa3\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_500_COUNT\x10\xa4\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_501_COUNT\x10\xa5\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_502_COUNT\x10\xa6\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_503_COUNT\x10\xa7\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_600_COUNT\x10\xa8\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_601_COUNT\x10\xa9\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_602_COUNT\x10\xaa\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_603_COUNT\x10\xab\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_604_COUNT\x10\xac\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_900_COUNT\x10\xad\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_901_COUNT\x10\xae\x01\x12 \n\x1bVIDEO_REAL_TIME_IMPRESSIONS\x10\x8a\x01\x12$\n\x1fVIDEO_REAL_TIME_MATCHED_QUERIES\x10\x8c\x01\x12&\n!VIDEO_REAL_TIME_TOTAL_ERROR_COUNT\x10\xaf\x01\x12\"\n\x1dVIDEO_REAL_TIME_TOTAL_QUERIES\x10\x8e\x01\x12&\n!VIDEO_REAL_TIME_UNMATCHED_QUERIES\x10\x8d\x01\x12\x1f\n\x1bVIDEO_VIEWERSHIP_AUTO_PLAYS\x10g\x12&\n\"VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE\x10h\x12&\n\"VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME\x10i\x12#\n\x1fVIDEO_VIEWERSHIP_CLICK_TO_PLAYS\x10j\x12\x1e\n\x1aVIDEO_VIEWERSHIP_COMPLETES\x10k\x12$\n VIDEO_VIEWERSHIP_COMPLETION_RATE\x10l\x12\"\n\x1eVIDEO_VIEWERSHIP_ENGAGED_VIEWS\x10m\x12$\n VIDEO_VIEWERSHIP_FIRST_QUARTILES\x10n\x12\x1e\n\x1aVIDEO_VIEWERSHIP_MIDPOINTS\x10o\x12\'\n#VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN\x10p\x12\x1b\n\x17VIDEO_VIEWERSHIP_STARTS\x10q\x12$\n VIDEO_VIEWERSHIP_THIRD_QUARTILES\x10r\x12&\n\"VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT\x10s\x12%\n!VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE\x10^\x12!\n\x1dVIDEO_VIEWERSHIP_VIDEO_LENGTH\x10t\x12&\n\"VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE\x10u\x12\x1c\n\x18YIELD_GROUP_AUCTIONS_WON\x10P\x12\x14\n\x10YIELD_GROUP_BIDS\x10Q\x12\x1f\n\x1bYIELD_GROUP_BIDS_IN_AUCTION\x10R\x12\x18\n\x14YIELD_GROUP_CALLOUTS\x10S\x12\x1d\n\x19YIELD_GROUP_ESTIMATED_CPM\x10X\x12!\n\x1dYIELD_GROUP_ESTIMATED_REVENUE\x10W\x12\x1b\n\x17YIELD_GROUP_IMPRESSIONS\x10U\x12#\n\x1fYIELD_GROUP_MEDIATION_FILL_RATE\x10Y\x12)\n%YIELD_GROUP_MEDIATION_MATCHED_QUERIES\x10V\x12#\n\x1fYIELD_GROUP_MEDIATION_PASSBACKS\x10v\x12*\n&YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM\x10Z\x12$\n YIELD_GROUP_SUCCESSFUL_RESPONSES\x10T\"\x97\x01\n\x0fMetricValueType\x12\x0b\n\x07PRIMARY\x10\x00\x12\x1c\n\x18PRIMARY_PERCENT_OF_TOTAL\x10\x01\x12\x0e\n\nCOMPARISON\x10\x02\x12\x1f\n\x1b\x43OMPARISON_PERCENT_OF_TOTAL\x10\x03\x12\x13\n\x0f\x41\x42SOLUTE_CHANGE\x10\x04\x12\x13\n\x0fRELATIVE_CHANGE\x10\x05\"9\n\nReportType\x12\x1b\n\x17REPORT_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nHISTORICAL\x10\x01\".\n\nVisibility\x12\n\n\x06HIDDEN\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\t\n\x05SAVED\x10\x02\"i\n\x0eTimeZoneSource\x12 \n\x1cTIME_ZONE_SOURCE_UNSPECIFIED\x10\x00\x12\r\n\tPUBLISHER\x10\x01\x12\x0f\n\x0b\x41\x44_EXCHANGE\x10\x02\x12\x07\n\x03UTC\x10\x03\x12\x0c\n\x08PROVIDED\x10\x04:_\xea\x41\\\n\x1f\x61\x64manager.googleapis.com/Report\x12(networks/{network_code}/reports/{report}*\x07reports2\x06report\"\xb1\x07\n\x10ReportDefinition\x12\x42\n\ndimensions\x18\x01 \x03(\x0e\x32).google.ads.admanager.v1.Report.DimensionB\x03\xe0\x41\x02\x12<\n\x07metrics\x18\x02 \x03(\x0e\x32&.google.ads.admanager.v1.Report.MetricB\x03\xe0\x41\x02\x12<\n\x07\x66ilters\x18\x03 \x03(\x0b\x32&.google.ads.admanager.v1.Report.FilterB\x03\xe0\x41\x01\x12M\n\x10time_zone_source\x18\x14 \x01(\x0e\x32..google.ads.admanager.v1.Report.TimeZoneSourceB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcurrency_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\ndate_range\x18\x06 \x01(\x0b\x32).google.ads.admanager.v1.Report.DateRangeB\x03\xe0\x41\x02\x12R\n\x15\x63omparison_date_range\x18\t \x01(\x0b\x32).google.ads.admanager.v1.Report.DateRangeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12%\n\x18\x63ustom_dimension_key_ids\x18\x07 \x03(\x03\x42\x03\xe0\x41\x01\x12\'\n\x1aline_item_custom_field_ids\x18\x0b \x03(\x03\x42\x03\xe0\x41\x01\x12#\n\x16order_custom_field_ids\x18\x0c \x03(\x03\x42\x03\xe0\x41\x01\x12&\n\x19\x63reative_custom_field_ids\x18\r \x03(\x03\x42\x03\xe0\x41\x01\x12\x44\n\x0breport_type\x18\x08 \x01(\x0e\x32*.google.ads.admanager.v1.Report.ReportTypeB\x03\xe0\x41\x02\x12Q\n\x12time_period_column\x18\n \x01(\x0e\x32\x30.google.ads.admanager.v1.Report.TimePeriodColumnB\x03\xe0\x41\x01\x12\x38\n\x05\x66lags\x18\x0e \x03(\x0b\x32$.google.ads.admanager.v1.Report.FlagB\x03\xe0\x41\x01\x12\x38\n\x05sorts\x18\x0f \x03(\x0b\x32$.google.ads.admanager.v1.Report.SortB\x03\xe0\x41\x01\x42\x18\n\x16_comparison_date_range\"\xa2\x02\n\x0fScheduleOptions\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32!.google.ads.admanager.v1.Schedule\x12V\n\x12\x64\x65livery_condition\x18\x02 \x01(\x0e\x32:.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition\x12\x38\n\x05\x66lags\x18\x03 \x03(\x0b\x32$.google.ads.admanager.v1.Report.FlagB\x03\xe0\x41\x01\"H\n\x11\x44\x65liveryCondition\x12\t\n\x05NEVER\x10\x00\x12\n\n\x06\x41LWAYS\x10\x01\x12\x1c\n\x18WHEN_FLAG_CONDITIONS_MET\x10\x02\"\x8b\x05\n\x08Schedule\x12K\n\x0fweekly_schedule\x18\x06 \x01(\x0b\x32\x30.google.ads.admanager.v1.Schedule.WeeklyScheduleH\x00\x12M\n\x10monthly_schedule\x18\x07 \x01(\x0b\x32\x31.google.ads.admanager.v1.Schedule.MonthlyScheduleH\x00\x12%\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12#\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12>\n\tfrequency\x18\x03 \x01(\x0e\x32+.google.ads.admanager.v1.Schedule.Frequency\x12*\n\nstart_time\x18\x04 \x01(\x0b\x32\x16.google.type.TimeOfDay\x1aG\n\x0eWeeklySchedule\x12\x35\n\x15weekly_scheduled_days\x18\x01 \x03(\x0e\x32\x16.google.type.DayOfWeek\x1a\x31\n\x0fMonthlySchedule\x12\x1e\n\x16monthly_scheduled_days\x18\x01 \x03(\x05\"\x98\x01\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\x13\n\x0fTWO_TIMES_DAILY\x10\x02\x12\x15\n\x11THREE_TIMES_DAILY\x10\x03\x12\x14\n\x10\x46OUR_TIMES_DAILY\x10\x04\x12\t\n\x05\x44\x41ILY\x10\x05\x12\n\n\x06WEEKLY\x10\x06\x12\x0b\n\x07MONTHLY\x10\x07\x42\x14\n\x12\x66requency_scheduleB\xc7\x01\n\x1b\x63om.google.ads.admanager.v1B\x13ReportMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.Date", "google/type/date.proto"], + ["google.type.TimeOfDay", "google/type/timeofday.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + Report = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report").msgclass + Report::Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Value").msgclass + Report::Value::IntList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Value.IntList").msgclass + Report::Value::StringList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Value.StringList").msgclass + Report::Sort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Sort").msgclass + Report::DataTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DataTable").msgclass + Report::DataTable::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DataTable.Row").msgclass + Report::DataTable::MetricValueGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DataTable.MetricValueGroup").msgclass + Report::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Field").msgclass + Report::Slice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Slice").msgclass + Report::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Filter").msgclass + Report::Filter::FieldFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Filter.FieldFilter").msgclass + Report::Filter::FilterList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Filter.FilterList").msgclass + Report::Filter::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Filter.Operation").enummodule + Report::Flag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Flag").msgclass + Report::DateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DateRange").msgclass + Report::DateRange::FixedDateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DateRange.FixedDateRange").msgclass + Report::DateRange::RelativeDateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DateRange.RelativeDateRange").enummodule + Report::TimePeriodColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.TimePeriodColumn").enummodule + Report::Dimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Dimension").enummodule + Report::Metric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Metric").enummodule + Report::MetricValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.MetricValueType").enummodule + Report::ReportType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.ReportType").enummodule + Report::Visibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Visibility").enummodule + Report::TimeZoneSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.TimeZoneSource").enummodule + ReportDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ReportDefinition").msgclass + ScheduleOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ScheduleOptions").msgclass + ScheduleOptions::DeliveryCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ScheduleOptions.DeliveryCondition").enummodule + Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Schedule").msgclass + Schedule::WeeklySchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Schedule.WeeklySchedule").msgclass + Schedule::MonthlySchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Schedule.MonthlySchedule").msgclass + Schedule::Frequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Schedule.Frequency").enummodule + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/report_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/report_service_pb.rb index 7ed06a0dc1de..fbf0656c58c8 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/report_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/report_service_pb.rb @@ -4,6 +4,7 @@ require 'google/protobuf' +require 'google/ads/admanager/v1/report_messages_pb' require 'google/api/annotations_pb' require 'google/api/client_pb' require 'google/api/field_behavior_pb' @@ -11,12 +12,9 @@ require 'google/longrunning/operations_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' -require 'google/type/dayofweek_pb' -require 'google/type/timeofday_pb' -descriptor_data = "\n,google/ads/admanager/v1/report_service.proto\x12\x17google.ads.admanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xf1\xe3\x01\n\x06Report\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\treport_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x43\n\nvisibility\x18\x02 \x01(\x0e\x32*.google.ads.admanager.v1.Report.VisibilityB\x03\xe0\x41\x01\x12I\n\x11report_definition\x18\x04 \x01(\x0b\x32).google.ads.admanager.v1.ReportDefinitionB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06locale\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10schedule_options\x18\t \x01(\x0b\x32(.google.ads.admanager.v1.ScheduleOptionsB\x03\xe0\x41\x01\x1a\xd3\x02\n\x05Value\x12\x13\n\tint_value\x18\x01 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12G\n\x0eint_list_value\x18\x06 \x01(\x0b\x32-.google.ads.admanager.v1.Report.Value.IntListH\x00\x12M\n\x11string_list_value\x18\x07 \x01(\x0b\x32\x30.google.ads.admanager.v1.Report.Value.StringListH\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x1a\x19\n\x07IntList\x12\x0e\n\x06values\x18\x01 \x03(\x03\x1a\x1c\n\nStringList\x12\x0e\n\x06values\x18\x01 \x03(\tB\x07\n\x05value\x1a\xcb\x02\n\x04Sort\x12\x39\n\x05\x66ield\x18\x01 \x01(\x0b\x32%.google.ads.admanager.v1.Report.FieldB\x03\xe0\x41\x02\x12\x17\n\ndescending\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12>\n\x05slice\x18\x03 \x01(\x0b\x32%.google.ads.admanager.v1.Report.SliceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11time_period_index\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12T\n\x11metric_value_type\x18\x05 \x01(\x0e\x32/.google.ads.admanager.v1.Report.MetricValueTypeB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x08\n\x06_sliceB\x14\n\x12_time_period_indexB\x14\n\x12_metric_value_type\x1a\x89\x05\n\tDataTable\x1a\x9f\x01\n\x03Row\x12?\n\x10\x64imension_values\x18\x01 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12W\n\x13metric_value_groups\x18\x02 \x03(\x0b\x32:.google.ads.admanager.v1.Report.DataTable.MetricValueGroup\x1a\xd9\x03\n\x10MetricValueGroup\x12=\n\x0eprimary_values\x18\x01 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12N\n\x1fprimary_percent_of_total_values\x18\x02 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12@\n\x11\x63omparison_values\x18\x03 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12Q\n\"comparison_percent_of_total_values\x18\x04 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12\x45\n\x16\x61\x62solute_change_values\x18\x05 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12\x45\n\x16relative_change_values\x18\x06 \x03(\x0b\x32%.google.ads.admanager.v1.Report.Value\x12\x13\n\x0b\x66lag_values\x18\x07 \x03(\x08\x1a\x8a\x01\n\x05\x46ield\x12>\n\tdimension\x18\x01 \x01(\x0e\x32).google.ads.admanager.v1.Report.DimensionH\x00\x12\x38\n\x06metric\x18\x02 \x01(\x0e\x32&.google.ads.admanager.v1.Report.MetricH\x00\x42\x07\n\x05\x66ield\x1a\x85\x01\n\x05Slice\x12\x41\n\tdimension\x18\x01 \x01(\x0e\x32).google.ads.admanager.v1.Report.DimensionB\x03\xe0\x41\x02\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32%.google.ads.admanager.v1.Report.ValueB\x03\xe0\x41\x02\x1a\xf6\x07\n\x06\x46ilter\x12J\n\x0c\x66ield_filter\x18\x01 \x01(\x0b\x32\x32.google.ads.admanager.v1.Report.Filter.FieldFilterH\x00\x12<\n\nnot_filter\x18\x02 \x01(\x0b\x32&.google.ads.admanager.v1.Report.FilterH\x00\x12G\n\nand_filter\x18\x03 \x01(\x0b\x32\x31.google.ads.admanager.v1.Report.Filter.FilterListH\x00\x12\x46\n\tor_filter\x18\x04 \x01(\x0b\x32\x31.google.ads.admanager.v1.Report.Filter.FilterListH\x00\x1a\xbf\x03\n\x0b\x46ieldFilter\x12\x39\n\x05\x66ield\x18\x01 \x01(\x0b\x32%.google.ads.admanager.v1.Report.FieldB\x03\xe0\x41\x02\x12H\n\toperation\x18\x02 \x01(\x0e\x32\x30.google.ads.admanager.v1.Report.Filter.OperationB\x03\xe0\x41\x02\x12:\n\x06values\x18\x03 \x03(\x0b\x32%.google.ads.admanager.v1.Report.ValueB\x03\xe0\x41\x02\x12>\n\x05slice\x18\x04 \x01(\x0b\x32%.google.ads.admanager.v1.Report.SliceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11time_period_index\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12T\n\x11metric_value_type\x18\x06 \x01(\x0e\x32/.google.ads.admanager.v1.Report.MetricValueTypeB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x08\n\x06_sliceB\x14\n\x12_time_period_indexB\x14\n\x12_metric_value_type\x1aJ\n\nFilterList\x12<\n\x07\x66ilters\x18\x01 \x03(\x0b\x32&.google.ads.admanager.v1.Report.FilterB\x03\xe0\x41\x02\"\xba\x01\n\tOperation\x12\x06\n\x02IN\x10\x00\x12\n\n\x06NOT_IN\x10\x01\x12\x0c\n\x08\x43ONTAINS\x10\x02\x12\x10\n\x0cNOT_CONTAINS\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x14\n\x10LESS_THAN_EQUALS\x10\x05\x12\x10\n\x0cGREATER_THAN\x10\x06\x12\x17\n\x13GREATER_THAN_EQUALS\x10\x07\x12\x0b\n\x07\x42\x45TWEEN\x10\x08\x12\x0b\n\x07MATCHES\x10\t\x12\x0f\n\x0bNOT_MATCHES\x10\nB\x06\n\x04type\x1aW\n\x04\x46lag\x12<\n\x07\x66ilters\x18\x01 \x03(\x0b\x32&.google.ads.admanager.v1.Report.FilterB\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xd8\x06\n\tDateRange\x12I\n\x05\x66ixed\x18\x01 \x01(\x0b\x32\x38.google.ads.admanager.v1.Report.DateRange.FixedDateRangeH\x00\x12O\n\x08relative\x18\x02 \x01(\x0e\x32;.google.ads.admanager.v1.Report.DateRange.RelativeDateRangeH\x00\x1a\x66\n\x0e\x46ixedDateRange\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\"\xb3\x04\n\x11RelativeDateRange\x12#\n\x1fRELATIVE_DATE_RANGE_UNSPECIFIED\x10\x00\x12\t\n\x05TODAY\x10\x01\x12\r\n\tYESTERDAY\x10\x02\x12\r\n\tTHIS_WEEK\x10\x03\x12\x15\n\x11THIS_WEEK_TO_DATE\x10\x1d\x12\x0e\n\nTHIS_MONTH\x10\x04\x12\x16\n\x12THIS_MONTH_TO_DATE\x10\x1a\x12\x10\n\x0cTHIS_QUARTER\x10\x05\x12\x18\n\x14THIS_QUARTER_TO_DATE\x10\x1b\x12\r\n\tTHIS_YEAR\x10\x06\x12\x15\n\x11THIS_YEAR_TO_DATE\x10\x1c\x12\r\n\tLAST_WEEK\x10\x07\x12\x0e\n\nLAST_MONTH\x10\x08\x12\x10\n\x0cLAST_QUARTER\x10\t\x12\r\n\tLAST_YEAR\x10\n\x12\x0f\n\x0bLAST_7_DAYS\x10\x0b\x12\x10\n\x0cLAST_30_DAYS\x10\x0c\x12\x10\n\x0cLAST_60_DAYS\x10\r\x12\x10\n\x0cLAST_90_DAYS\x10\x0e\x12\x11\n\rLAST_180_DAYS\x10\x0f\x12\x11\n\rLAST_360_DAYS\x10\x10\x12\x11\n\rLAST_365_DAYS\x10\x11\x12\x11\n\rLAST_3_MONTHS\x10\x12\x12\x11\n\rLAST_6_MONTHS\x10\x13\x12\x12\n\x0eLAST_12_MONTHS\x10\x14\x12\x11\n\rALL_AVAILABLE\x10\x15\x12\x13\n\x0fPREVIOUS_PERIOD\x10\x16\x12\x1d\n\x19SAME_PERIOD_PREVIOUS_YEAR\x10\x18\x42\x11\n\x0f\x64\x61te_range_type\"\xae\x01\n\x10TimePeriodColumn\x12\"\n\x1eTIME_PERIOD_COLUMN_UNSPECIFIED\x10\x00\x12\x1b\n\x17TIME_PERIOD_COLUMN_DATE\x10\x01\x12\x1b\n\x17TIME_PERIOD_COLUMN_WEEK\x10\x02\x12\x1c\n\x18TIME_PERIOD_COLUMN_MONTH\x10\x03\x12\x1e\n\x1aTIME_PERIOD_COLUMN_QUARTER\x10\x04\"\xce\x92\x01\n\tDimension\x12\x19\n\x15\x44IMENSION_UNSPECIFIED\x10\x00\x12\x1b\n\x16\x41\x44VERTISER_DOMAIN_NAME\x10\xf2\x01\x12\x1b\n\x16\x41\x44VERTISER_EXTERNAL_ID\x10\xe4\x01\x12\x12\n\rADVERTISER_ID\x10\x83\x01\x12\x16\n\x11\x41\x44VERTISER_LABELS\x10\xe6\x01\x12\x19\n\x14\x41\x44VERTISER_LABEL_IDS\x10\xe5\x01\x12\x14\n\x0f\x41\x44VERTISER_NAME\x10\x84\x01\x12\x1f\n\x1a\x41\x44VERTISER_PRIMARY_CONTACT\x10\xe3\x01\x12\x10\n\x0b\x41\x44_LOCATION\x10\x86\x03\x12\x15\n\x10\x41\x44_LOCATION_NAME\x10\x87\x03\x12\x10\n\x0c\x41\x44_UNIT_CODE\x10@\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_1\x10\x41\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_10\x10J\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_11\x10K\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_12\x10L\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_13\x10M\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_14\x10N\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_15\x10O\x12\x19\n\x15\x41\x44_UNIT_CODE_LEVEL_16\x10P\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_2\x10\x42\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_3\x10\x43\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_4\x10\x44\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_5\x10\x45\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_6\x10\x46\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_7\x10G\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_8\x10H\x12\x18\n\x14\x41\x44_UNIT_CODE_LEVEL_9\x10I\x12\x11\n\rAD_UNIT_DEPTH\x10\x65\x12\x0e\n\nAD_UNIT_ID\x10\x19\x12\x18\n\x14\x41\x44_UNIT_ID_ALL_LEVEL\x10\x1b\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_1\x10\x1e\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_10\x10\x30\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_11\x10\x32\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_12\x10\x34\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_13\x10\x36\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_14\x10\x38\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_15\x10:\x12\x17\n\x13\x41\x44_UNIT_ID_LEVEL_16\x10<\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_2\x10 \x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_3\x10\"\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_4\x10$\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_5\x10&\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_6\x10(\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_7\x10*\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_8\x10,\x12\x16\n\x12\x41\x44_UNIT_ID_LEVEL_9\x10.\x12\x19\n\x14\x41\x44_UNIT_ID_TOP_LEVEL\x10\x8e\x01\x12\x10\n\x0c\x41\x44_UNIT_NAME\x10\x1a\x12\x1a\n\x16\x41\x44_UNIT_NAME_ALL_LEVEL\x10\x1d\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_1\x10\x1f\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_10\x10\x31\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_11\x10\x33\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_12\x10\x35\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_13\x10\x37\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_14\x10\x39\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_15\x10;\x12\x19\n\x15\x41\x44_UNIT_NAME_LEVEL_16\x10=\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_2\x10!\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_3\x10#\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_4\x10%\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_5\x10\'\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_6\x10)\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_7\x10+\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_8\x10-\x12\x18\n\x14\x41\x44_UNIT_NAME_LEVEL_9\x10/\x12\x1b\n\x16\x41\x44_UNIT_NAME_TOP_LEVEL\x10\x8f\x01\x12\x19\n\x15\x41\x44_UNIT_REWARD_AMOUNT\x10?\x12\x17\n\x13\x41\x44_UNIT_REWARD_TYPE\x10>\x12\x13\n\x0e\x41\x44_UNIT_STATUS\x10\xce\x01\x12\x18\n\x13\x41\x44_UNIT_STATUS_NAME\x10\xcf\x01\x12\x10\n\x0b\x41PP_VERSION\x10\x88\x03\x12$\n\x1f\x42\x41\x43KFILL_ADVERTISER_EXTERNAL_ID\x10\xdd\x02\x12\x1b\n\x16\x42\x41\x43KFILL_ADVERTISER_ID\x10\xda\x02\x12\x1f\n\x1a\x42\x41\x43KFILL_ADVERTISER_LABELS\x10\xdf\x02\x12\"\n\x1d\x42\x41\x43KFILL_ADVERTISER_LABEL_IDS\x10\xde\x02\x12\x1d\n\x18\x42\x41\x43KFILL_ADVERTISER_NAME\x10\xdb\x02\x12(\n#BACKFILL_ADVERTISER_PRIMARY_CONTACT\x10\xdc\x02\x12#\n\x1e\x42\x41\x43KFILL_CREATIVE_BILLING_TYPE\x10\xfa\x02\x12(\n#BACKFILL_CREATIVE_BILLING_TYPE_NAME\x10\xfb\x02\x12(\n#BACKFILL_CREATIVE_CLICK_THROUGH_URL\x10\xf8\x02\x12\x19\n\x14\x42\x41\x43KFILL_CREATIVE_ID\x10\xf2\x02\x12\x1b\n\x16\x42\x41\x43KFILL_CREATIVE_NAME\x10\xf3\x02\x12)\n$BACKFILL_CREATIVE_THIRD_PARTY_VENDOR\x10\xf9\x02\x12\x1b\n\x16\x42\x41\x43KFILL_CREATIVE_TYPE\x10\xf6\x02\x12 \n\x1b\x42\x41\x43KFILL_CREATIVE_TYPE_NAME\x10\xf7\x02\x12 \n\x1b\x42\x41\x43KFILL_LINE_ITEM_ARCHIVED\x10\x96\x02\x12\x31\n,BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION\x10\x82\x02\x12\x36\n1BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME\x10\x83\x02\x12\'\n\"BACKFILL_LINE_ITEM_COMPUTED_STATUS\x10\xa8\x02\x12,\n\'BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME\x10\xa9\x02\x12+\n&BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY\x10\x98\x02\x12%\n BACKFILL_LINE_ITEM_COST_PER_UNIT\x10\x90\x02\x12!\n\x1c\x42\x41\x43KFILL_LINE_ITEM_COST_TYPE\x10\x88\x02\x12&\n!BACKFILL_LINE_ITEM_COST_TYPE_NAME\x10\x89\x02\x12)\n$BACKFILL_LINE_ITEM_CREATIVE_END_DATE\x10\xfd\x02\x12.\n)BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE\x10\xa2\x02\x12\x33\n.BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME\x10\xa3\x02\x12+\n&BACKFILL_LINE_ITEM_CREATIVE_START_DATE\x10\xfc\x02\x12%\n BACKFILL_LINE_ITEM_CURRENCY_CODE\x10\xa0\x02\x12*\n%BACKFILL_LINE_ITEM_DELIVERY_INDICATOR\x10\x92\x02\x12*\n%BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE\x10\xa4\x02\x12/\n*BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME\x10\xa5\x02\x12)\n$BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE\x10\xa6\x02\x12+\n&BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE\x10\xa7\x02\x12 \n\x1b\x42\x41\x43KFILL_LINE_ITEM_END_DATE\x10\x8b\x02\x12%\n BACKFILL_LINE_ITEM_END_DATE_TIME\x10\x8d\x02\x12(\n#BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE\x10\xae\x02\x12-\n(BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME\x10\x81\x02\x12(\n#BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID\x10\x9d\x02\x12#\n\x1e\x42\x41\x43KFILL_LINE_ITEM_EXTERNAL_ID\x10\x91\x02\x12%\n BACKFILL_LINE_ITEM_FREQUENCY_CAP\x10\xaf\x02\x12\x1a\n\x15\x42\x41\x43KFILL_LINE_ITEM_ID\x10\xaa\x02\x12,\n\'BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP\x10\xa1\x02\x12\'\n\"BACKFILL_LINE_ITEM_LIFETIME_CLICKS\x10\x9b\x02\x12,\n\'BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS\x10\x9a\x02\x12\x35\n0BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS\x10\x9c\x02\x12 \n\x1b\x42\x41\x43KFILL_LINE_ITEM_MAKEGOOD\x10\x94\x02\x12\x1c\n\x17\x42\x41\x43KFILL_LINE_ITEM_NAME\x10\xab\x02\x12.\n)BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE\x10\x9e\x02\x12#\n\x1e\x42\x41\x43KFILL_LINE_ITEM_OPTIMIZABLE\x10\x95\x02\x12)\n$BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE\x10\x86\x02\x12.\n)BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME\x10\x87\x02\x12.\n)BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE\x10\x84\x02\x12\x33\n.BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME\x10\x85\x02\x12 \n\x1b\x42\x41\x43KFILL_LINE_ITEM_PRIORITY\x10\x8a\x02\x12*\n%BACKFILL_LINE_ITEM_RESERVATION_STATUS\x10\xb2\x02\x12/\n*BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME\x10\xb3\x02\x12\"\n\x1d\x42\x41\x43KFILL_LINE_ITEM_START_DATE\x10\x8c\x02\x12\'\n\"BACKFILL_LINE_ITEM_START_DATE_TIME\x10\x8e\x02\x12\x1c\n\x17\x42\x41\x43KFILL_LINE_ITEM_TYPE\x10\xac\x02\x12!\n\x1c\x42\x41\x43KFILL_LINE_ITEM_TYPE_NAME\x10\xad\x02\x12%\n BACKFILL_LINE_ITEM_UNLIMITED_END\x10\x8f\x02\x12+\n&BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT\x10\x93\x02\x12)\n$BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE\x10\x9f\x02\x12*\n%BACKFILL_MASTER_COMPANION_CREATIVE_ID\x10\xf4\x02\x12,\n\'BACKFILL_MASTER_COMPANION_CREATIVE_NAME\x10\xf5\x02\x12\x1a\n\x15\x42\x41\x43KFILL_ORDER_AGENCY\x10\xb9\x02\x12\x1d\n\x18\x42\x41\x43KFILL_ORDER_AGENCY_ID\x10\xba\x02\x12\x1e\n\x19\x42\x41\x43KFILL_ORDER_BOOKED_CPC\x10\xbb\x02\x12\x1e\n\x19\x42\x41\x43KFILL_ORDER_BOOKED_CPM\x10\xbc\x02\x12#\n\x1e\x42\x41\x43KFILL_ORDER_DELIVERY_STATUS\x10\xd4\x02\x12(\n#BACKFILL_ORDER_DELIVERY_STATUS_NAME\x10\xd5\x02\x12\x1c\n\x17\x42\x41\x43KFILL_ORDER_END_DATE\x10\xbd\x02\x12!\n\x1c\x42\x41\x43KFILL_ORDER_END_DATE_TIME\x10\xbf\x02\x12\x1f\n\x1a\x42\x41\x43KFILL_ORDER_EXTERNAL_ID\x10\xc0\x02\x12\x16\n\x11\x42\x41\x43KFILL_ORDER_ID\x10\xd2\x02\x12\x1a\n\x15\x42\x41\x43KFILL_ORDER_LABELS\x10\xce\x02\x12\x1d\n\x18\x42\x41\x43KFILL_ORDER_LABEL_IDS\x10\xcf\x02\x12#\n\x1e\x42\x41\x43KFILL_ORDER_LIFETIME_CLICKS\x10\xc2\x02\x12(\n#BACKFILL_ORDER_LIFETIME_IMPRESSIONS\x10\xc3\x02\x12\x18\n\x13\x42\x41\x43KFILL_ORDER_NAME\x10\xd3\x02\x12\x1d\n\x18\x42\x41\x43KFILL_ORDER_PO_NUMBER\x10\xc4\x02\x12 \n\x1b\x42\x41\x43KFILL_ORDER_PROGRAMMATIC\x10\xc1\x02\x12\x1f\n\x1a\x42\x41\x43KFILL_ORDER_SALESPERSON\x10\xc5\x02\x12)\n$BACKFILL_ORDER_SECONDARY_SALESPEOPLE\x10\xc9\x02\x12,\n\'BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID\x10\xc8\x02\x12)\n$BACKFILL_ORDER_SECONDARY_TRAFFICKERS\x10\xcb\x02\x12,\n\'BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID\x10\xca\x02\x12\x1e\n\x19\x42\x41\x43KFILL_ORDER_START_DATE\x10\xcc\x02\x12#\n\x1e\x42\x41\x43KFILL_ORDER_START_DATE_TIME\x10\xcd\x02\x12\x1e\n\x19\x42\x41\x43KFILL_ORDER_TRAFFICKER\x10\xc6\x02\x12!\n\x1c\x42\x41\x43KFILL_ORDER_TRAFFICKER_ID\x10\xc7\x02\x12!\n\x1c\x42\x41\x43KFILL_ORDER_UNLIMITED_END\x10\xbe\x02\x12#\n\x1e\x42\x41\x43KFILL_PROGRAMMATIC_BUYER_ID\x10\xd0\x02\x12%\n BACKFILL_PROGRAMMATIC_BUYER_NAME\x10\xd1\x02\x12\x12\n\rBRANDING_TYPE\x10\xff\x02\x12\x17\n\x12\x42RANDING_TYPE_NAME\x10\x80\x03\x12\x14\n\x10\x42ROWSER_CATEGORY\x10w\x12\x19\n\x15\x42ROWSER_CATEGORY_NAME\x10x\x12\x0f\n\nBROWSER_ID\x10\xeb\x01\x12\x11\n\x0c\x42ROWSER_NAME\x10\xec\x01\x12\x0f\n\nCARRIER_ID\x10\xf1\x02\x12\x11\n\x0c\x43\x41RRIER_NAME\x10\xf0\x02\x12\x1d\n\x18\x43LASSIFIED_ADVERTISER_ID\x10\x85\x01\x12\x1f\n\x1a\x43LASSIFIED_ADVERTISER_NAME\x10\x86\x01\x12\x18\n\x13\x43LASSIFIED_BRAND_ID\x10\xf3\x01\x12\x1a\n\x15\x43LASSIFIED_BRAND_NAME\x10\xf4\x01\x12\x0f\n\nCONTENT_ID\x10\xf6\x01\x12\x11\n\x0c\x43ONTENT_NAME\x10\xf7\x01\x12\x0e\n\nCOUNTRY_ID\x10\x0b\x12\x10\n\x0c\x43OUNTRY_NAME\x10\x0c\x12\x1a\n\x15\x43REATIVE_BILLING_TYPE\x10\xee\x02\x12\x1f\n\x1a\x43REATIVE_BILLING_TYPE_NAME\x10\xef\x02\x12\x1f\n\x1a\x43REATIVE_CLICK_THROUGH_URL\x10\xae\x01\x12\x10\n\x0b\x43REATIVE_ID\x10\x8a\x01\x12\x12\n\rCREATIVE_NAME\x10\x8b\x01\x12\x18\n\x13\x43REATIVE_TECHNOLOGY\x10\x94\x01\x12\x1d\n\x18\x43REATIVE_TECHNOLOGY_NAME\x10\x95\x01\x12 \n\x1b\x43REATIVE_THIRD_PARTY_VENDOR\x10\xe9\x02\x12\x12\n\rCREATIVE_TYPE\x10\xd8\x02\x12\x17\n\x12\x43REATIVE_TYPE_NAME\x10\xd9\x02\x12\x08\n\x04\x44\x41TE\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x12\n\x0e\x44\x45MAND_CHANNEL\x10\t\x12\x17\n\x13\x44\x45MAND_CHANNEL_NAME\x10\n\x12\x15\n\x11\x44\x45MAND_SUBCHANNEL\x10\x16\x12\x1a\n\x16\x44\x45MAND_SUBCHANNEL_NAME\x10\x17\x12\x0b\n\x06\x44\x45VICE\x10\xe2\x01\x12\x13\n\x0f\x44\x45VICE_CATEGORY\x10\x0f\x12\x18\n\x14\x44\x45VICE_CATEGORY_NAME\x10\x10\x12\x10\n\x0b\x44\x45VICE_NAME\x10\xe1\x01\x12$\n\x1f\x45XCHANGE_THIRD_PARTY_COMPANY_ID\x10\xb9\x01\x12&\n!EXCHANGE_THIRD_PARTY_COMPANY_NAME\x10\xba\x01\x12\x1f\n\x1a\x46IRST_LOOK_PRICING_RULE_ID\x10\xf8\x01\x12!\n\x1c\x46IRST_LOOK_PRICING_RULE_NAME\x10\xf9\x01\x12\x08\n\x04HOUR\x10\x64\x12\x15\n\x10INTERACTION_TYPE\x10\xdf\x01\x12\x1a\n\x15INTERACTION_TYPE_NAME\x10\xe0\x01\x12\x14\n\x10INVENTORY_FORMAT\x10\x11\x12\x19\n\x15INVENTORY_FORMAT_NAME\x10\x12\x12\x12\n\x0eINVENTORY_TYPE\x10\x13\x12\x17\n\x13INVENTORY_TYPE_NAME\x10\x14\x12\x12\n\rIS_ADX_DIRECT\x10\xfe\x02\x12\x17\n\x12IS_FIRST_LOOK_DEAL\x10\x91\x03\x12\x12\n\rKEY_VALUES_ID\x10\xd6\x01\x12\x14\n\x0fKEY_VALUES_NAME\x10\xd7\x01\x12\x17\n\x12LINE_ITEM_ARCHIVED\x10\xbc\x01\x12(\n#LINE_ITEM_COMPANION_DELIVERY_OPTION\x10\xcc\x01\x12-\n(LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME\x10\xcd\x01\x12\x1e\n\x19LINE_ITEM_COMPUTED_STATUS\x10\xfa\x01\x12#\n\x1eLINE_ITEM_COMPUTED_STATUS_NAME\x10\xfb\x01\x12!\n\x1dLINE_ITEM_CONTRACTED_QUANTITY\x10\\\x12\x1b\n\x17LINE_ITEM_COST_PER_UNIT\x10U\x12\x18\n\x13LINE_ITEM_COST_TYPE\x10\xd4\x01\x12\x1d\n\x18LINE_ITEM_COST_TYPE_NAME\x10\xd5\x01\x12 \n\x1bLINE_ITEM_CREATIVE_END_DATE\x10\xb0\x01\x12%\n LINE_ITEM_CREATIVE_ROTATION_TYPE\x10\xbd\x01\x12*\n%LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME\x10\xbe\x01\x12\"\n\x1dLINE_ITEM_CREATIVE_START_DATE\x10\xaf\x01\x12\x1c\n\x17LINE_ITEM_CURRENCY_CODE\x10\xb4\x01\x12 \n\x1cLINE_ITEM_DELIVERY_INDICATOR\x10W\x12!\n\x1cLINE_ITEM_DELIVERY_RATE_TYPE\x10\xbf\x01\x12&\n!LINE_ITEM_DELIVERY_RATE_TYPE_NAME\x10\xc0\x01\x12 \n\x1bLINE_ITEM_DISCOUNT_ABSOLUTE\x10\xc3\x01\x12\"\n\x1dLINE_ITEM_DISCOUNT_PERCENTAGE\x10\xc4\x01\x12\x16\n\x12LINE_ITEM_END_DATE\x10Q\x12\x1b\n\x17LINE_ITEM_END_DATE_TIME\x10S\x12\x1f\n\x1aLINE_ITEM_ENVIRONMENT_TYPE\x10\xc9\x01\x12$\n\x1fLINE_ITEM_ENVIRONMENT_TYPE_NAME\x10\xca\x01\x12\x1e\n\x1aLINE_ITEM_EXTERNAL_DEAL_ID\x10\x61\x12\x19\n\x15LINE_ITEM_EXTERNAL_ID\x10V\x12\x1c\n\x17LINE_ITEM_FREQUENCY_CAP\x10\x80\x02\x12\x10\n\x0cLINE_ITEM_ID\x10\x01\x12#\n\x1eLINE_ITEM_LAST_MODIFIED_BY_APP\x10\xb5\x01\x12\x1d\n\x19LINE_ITEM_LIFETIME_CLICKS\x10_\x12\"\n\x1eLINE_ITEM_LIFETIME_IMPRESSIONS\x10^\x12+\n\'LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS\x10`\x12\x16\n\x12LINE_ITEM_MAKEGOOD\x10Y\x12\x12\n\x0eLINE_ITEM_NAME\x10\x02\x12$\n LINE_ITEM_NON_CPD_BOOKED_REVENUE\x10\x62\x12\x19\n\x15LINE_ITEM_OPTIMIZABLE\x10Z\x12 \n\x1bLINE_ITEM_PRIMARY_GOAL_TYPE\x10\xd2\x01\x12%\n LINE_ITEM_PRIMARY_GOAL_TYPE_NAME\x10\xd3\x01\x12)\n%LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE\x10]\x12,\n\'LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE\x10\x8c\x03\x12%\n LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE\x10\xd0\x01\x12*\n%LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME\x10\xd1\x01\x12\x16\n\x12LINE_ITEM_PRIORITY\x10\x18\x12!\n\x1cLINE_ITEM_RESERVATION_STATUS\x10\xb0\x02\x12&\n!LINE_ITEM_RESERVATION_STATUS_NAME\x10\xb1\x02\x12\x18\n\x14LINE_ITEM_START_DATE\x10R\x12\x1d\n\x19LINE_ITEM_START_DATE_TIME\x10T\x12\x13\n\x0eLINE_ITEM_TYPE\x10\xc1\x01\x12\x18\n\x13LINE_ITEM_TYPE_NAME\x10\xc2\x01\x12\x1c\n\x17LINE_ITEM_UNLIMITED_END\x10\xbb\x01\x12!\n\x1dLINE_ITEM_VALUE_COST_PER_UNIT\x10X\x12 \n\x1bLINE_ITEM_WEB_PROPERTY_CODE\x10\xb3\x01\x12!\n\x1cMASTER_COMPANION_CREATIVE_ID\x10\x8c\x01\x12#\n\x1eMASTER_COMPANION_CREATIVE_NAME\x10\x8d\x01\x12\x14\n\x0fMOBILE_APP_FREE\x10\x80\x01\x12\x18\n\x13MOBILE_APP_ICON_URL\x10\x81\x01\x12\x11\n\rMOBILE_APP_ID\x10{\x12\x13\n\x0fMOBILE_APP_NAME\x10\x7f\x12 \n\x1bMOBILE_APP_OWNERSHIP_STATUS\x10\xb7\x02\x12%\n MOBILE_APP_OWNERSHIP_STATUS_NAME\x10\xb8\x02\x12\x14\n\x10MOBILE_APP_STORE\x10}\x12\x1a\n\x15MOBILE_APP_STORE_NAME\x10\xf5\x01\x12\x19\n\x15MOBILE_INVENTORY_TYPE\x10\x63\x12\x1e\n\x1aMOBILE_INVENTORY_TYPE_NAME\x10\x15\x12\x1c\n\x17MOBILE_SDK_VERSION_NAME\x10\x82\x01\x12\x0e\n\nMONTH_YEAR\x10\x06\x12\x18\n\x13NATIVE_AD_FORMAT_ID\x10\xff\x01\x12\x1a\n\x15NATIVE_AD_FORMAT_NAME\x10\xfe\x01\x12\x14\n\x0fNATIVE_STYLE_ID\x10\xfd\x01\x12\x16\n\x11NATIVE_STYLE_NAME\x10\xfc\x01\x12\x1d\n\x19OPERATING_SYSTEM_CATEGORY\x10u\x12\"\n\x1eOPERATING_SYSTEM_CATEGORY_NAME\x10v\x12 \n\x1bOPERATING_SYSTEM_VERSION_ID\x10\xee\x01\x12\"\n\x1dOPERATING_SYSTEM_VERSION_NAME\x10\xed\x01\x12\x11\n\x0cORDER_AGENCY\x10\x96\x01\x12\x14\n\x0fORDER_AGENCY_ID\x10\x97\x01\x12\x15\n\x10ORDER_BOOKED_CPC\x10\x98\x01\x12\x15\n\x10ORDER_BOOKED_CPM\x10\x99\x01\x12\x1a\n\x15ORDER_DELIVERY_STATUS\x10\xe7\x01\x12\x1f\n\x1aORDER_DELIVERY_STATUS_NAME\x10\xef\x01\x12\x13\n\x0eORDER_END_DATE\x10\x9a\x01\x12\x18\n\x13ORDER_END_DATE_TIME\x10\x9b\x01\x12\x16\n\x11ORDER_EXTERNAL_ID\x10\x9c\x01\x12\x0c\n\x08ORDER_ID\x10\x07\x12\x11\n\x0cORDER_LABELS\x10\xaa\x01\x12\x14\n\x0fORDER_LABEL_IDS\x10\xab\x01\x12\x1a\n\x15ORDER_LIFETIME_CLICKS\x10\x9e\x01\x12\x1f\n\x1aORDER_LIFETIME_IMPRESSIONS\x10\x9f\x01\x12\x0e\n\nORDER_NAME\x10\x08\x12\x14\n\x0fORDER_PO_NUMBER\x10\xa0\x01\x12\x17\n\x12ORDER_PROGRAMMATIC\x10\x9d\x01\x12\x16\n\x11ORDER_SALESPERSON\x10\xa1\x01\x12 \n\x1bORDER_SECONDARY_SALESPEOPLE\x10\xa4\x01\x12#\n\x1eORDER_SECONDARY_SALESPEOPLE_ID\x10\xa5\x01\x12 \n\x1bORDER_SECONDARY_TRAFFICKERS\x10\xa6\x01\x12#\n\x1eORDER_SECONDARY_TRAFFICKERS_ID\x10\xa7\x01\x12\x15\n\x10ORDER_START_DATE\x10\xa8\x01\x12\x1a\n\x15ORDER_START_DATE_TIME\x10\xa9\x01\x12\x15\n\x10ORDER_TRAFFICKER\x10\xa2\x01\x12\x18\n\x13ORDER_TRAFFICKER_ID\x10\xa3\x01\x12\x18\n\x13ORDER_UNLIMITED_END\x10\xcb\x01\x12\x10\n\x0cPLACEMENT_ID\x10q\x12\x15\n\x10PLACEMENT_ID_ALL\x10\x90\x01\x12\x12\n\x0ePLACEMENT_NAME\x10r\x12\x17\n\x12PLACEMENT_NAME_ALL\x10\x91\x01\x12\x15\n\x10PLACEMENT_STATUS\x10\xea\x02\x12\x19\n\x14PLACEMENT_STATUS_ALL\x10\xeb\x02\x12\x1a\n\x15PLACEMENT_STATUS_NAME\x10\xec\x02\x12\x1e\n\x19PLACEMENT_STATUS_NAME_ALL\x10\xed\x02\x12\x1a\n\x15PROGRAMMATIC_BUYER_ID\x10\xf0\x01\x12\x1c\n\x17PROGRAMMATIC_BUYER_NAME\x10\xf1\x01\x12\x18\n\x14PROGRAMMATIC_CHANNEL\x10\r\x12\x1d\n\x19PROGRAMMATIC_CHANNEL_NAME\x10\x0e\x12\x1b\n\x16RENDERED_CREATIVE_SIZE\x10\xd7\x02\x12\x17\n\x12REQUESTED_AD_SIZES\x10\xe0\x02\x12\x11\n\x0cREQUEST_TYPE\x10\x92\x01\x12\x16\n\x11REQUEST_TYPE_NAME\x10\x93\x01\x12\t\n\x04SITE\x10\x83\x03\x12\x11\n\x0cTARGETING_ID\x10\xe8\x01\x12\x13\n\x0eTARGETING_NAME\x10\xe9\x01\x12\x13\n\x0eTARGETING_TYPE\x10\x81\x03\x12\x18\n\x13TARGETING_TYPE_NAME\x10\x82\x03\x12\x13\n\x0eTRAFFIC_SOURCE\x10\x84\x03\x12\x18\n\x13TRAFFIC_SOURCE_NAME\x10\x85\x03\x12\x1c\n\x17UNIFIED_PRICING_RULE_ID\x10\x89\x03\x12\x1e\n\x19UNIFIED_PRICING_RULE_NAME\x10\x8a\x03\x12\x10\n\x0bVIDEO_PLCMT\x10\xac\x01\x12\x15\n\x10VIDEO_PLCMT_NAME\x10\xad\x01\x12\x08\n\x04WEEK\x10\x05\x12\x1b\n\x16YIELD_GROUP_BUYER_NAME\x10\xb8\x01\x12\x13\n\x0eYIELD_GROUP_ID\x10\xb6\x01\x12\x15\n\x10YIELD_GROUP_NAME\x10\xb7\x01\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID\x10\x90N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID\x10\x91N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID\x10\x92N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID\x10\x93N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID\x10\x94N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID\x10\x95N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID\x10\x96N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID\x10\x97N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID\x10\x98N\x12\'\n\"LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID\x10\x99N\x12(\n#LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID\x10\x9aN\x12(\n#LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID\x10\x9bN\x12(\n#LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID\x10\x9cN\x12(\n#LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID\x10\x9dN\x12(\n#LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID\x10\x9eN\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_0_VALUE\x10\xf8U\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_1_VALUE\x10\xf9U\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_2_VALUE\x10\xfaU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_3_VALUE\x10\xfbU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_4_VALUE\x10\xfcU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_5_VALUE\x10\xfdU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_6_VALUE\x10\xfeU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_7_VALUE\x10\xffU\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_8_VALUE\x10\x80V\x12#\n\x1eLINE_ITEM_CUSTOM_FIELD_9_VALUE\x10\x81V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_10_VALUE\x10\x82V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_11_VALUE\x10\x83V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_12_VALUE\x10\x84V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_13_VALUE\x10\x85V\x12$\n\x1fLINE_ITEM_CUSTOM_FIELD_14_VALUE\x10\x86V\x12#\n\x1eORDER_CUSTOM_FIELD_0_OPTION_ID\x10\xe0]\x12#\n\x1eORDER_CUSTOM_FIELD_1_OPTION_ID\x10\xe1]\x12#\n\x1eORDER_CUSTOM_FIELD_2_OPTION_ID\x10\xe2]\x12#\n\x1eORDER_CUSTOM_FIELD_3_OPTION_ID\x10\xe3]\x12#\n\x1eORDER_CUSTOM_FIELD_4_OPTION_ID\x10\xe4]\x12#\n\x1eORDER_CUSTOM_FIELD_5_OPTION_ID\x10\xe5]\x12#\n\x1eORDER_CUSTOM_FIELD_6_OPTION_ID\x10\xe6]\x12#\n\x1eORDER_CUSTOM_FIELD_7_OPTION_ID\x10\xe7]\x12#\n\x1eORDER_CUSTOM_FIELD_8_OPTION_ID\x10\xe8]\x12#\n\x1eORDER_CUSTOM_FIELD_9_OPTION_ID\x10\xe9]\x12$\n\x1fORDER_CUSTOM_FIELD_10_OPTION_ID\x10\xea]\x12$\n\x1fORDER_CUSTOM_FIELD_11_OPTION_ID\x10\xeb]\x12$\n\x1fORDER_CUSTOM_FIELD_12_OPTION_ID\x10\xec]\x12$\n\x1fORDER_CUSTOM_FIELD_13_OPTION_ID\x10\xed]\x12$\n\x1fORDER_CUSTOM_FIELD_14_OPTION_ID\x10\xee]\x12\x1f\n\x1aORDER_CUSTOM_FIELD_0_VALUE\x10\xc8\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_1_VALUE\x10\xc9\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_2_VALUE\x10\xca\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_3_VALUE\x10\xcb\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_4_VALUE\x10\xcc\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_5_VALUE\x10\xcd\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_6_VALUE\x10\xce\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_7_VALUE\x10\xcf\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_8_VALUE\x10\xd0\x65\x12\x1f\n\x1aORDER_CUSTOM_FIELD_9_VALUE\x10\xd1\x65\x12 \n\x1bORDER_CUSTOM_FIELD_10_VALUE\x10\xd2\x65\x12 \n\x1bORDER_CUSTOM_FIELD_11_VALUE\x10\xd3\x65\x12 \n\x1bORDER_CUSTOM_FIELD_12_VALUE\x10\xd4\x65\x12 \n\x1bORDER_CUSTOM_FIELD_13_VALUE\x10\xd5\x65\x12 \n\x1bORDER_CUSTOM_FIELD_14_VALUE\x10\xd6\x65\x12&\n!CREATIVE_CUSTOM_FIELD_0_OPTION_ID\x10\xb0m\x12&\n!CREATIVE_CUSTOM_FIELD_1_OPTION_ID\x10\xb1m\x12&\n!CREATIVE_CUSTOM_FIELD_2_OPTION_ID\x10\xb2m\x12&\n!CREATIVE_CUSTOM_FIELD_3_OPTION_ID\x10\xb3m\x12&\n!CREATIVE_CUSTOM_FIELD_4_OPTION_ID\x10\xb4m\x12&\n!CREATIVE_CUSTOM_FIELD_5_OPTION_ID\x10\xb5m\x12&\n!CREATIVE_CUSTOM_FIELD_6_OPTION_ID\x10\xb6m\x12&\n!CREATIVE_CUSTOM_FIELD_7_OPTION_ID\x10\xb7m\x12&\n!CREATIVE_CUSTOM_FIELD_8_OPTION_ID\x10\xb8m\x12&\n!CREATIVE_CUSTOM_FIELD_9_OPTION_ID\x10\xb9m\x12\'\n\"CREATIVE_CUSTOM_FIELD_10_OPTION_ID\x10\xbam\x12\'\n\"CREATIVE_CUSTOM_FIELD_11_OPTION_ID\x10\xbbm\x12\'\n\"CREATIVE_CUSTOM_FIELD_12_OPTION_ID\x10\xbcm\x12\'\n\"CREATIVE_CUSTOM_FIELD_13_OPTION_ID\x10\xbdm\x12\'\n\"CREATIVE_CUSTOM_FIELD_14_OPTION_ID\x10\xbem\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_0_VALUE\x10\x98u\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_1_VALUE\x10\x99u\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_2_VALUE\x10\x9au\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_3_VALUE\x10\x9bu\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_4_VALUE\x10\x9cu\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_5_VALUE\x10\x9du\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_6_VALUE\x10\x9eu\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_7_VALUE\x10\x9fu\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_8_VALUE\x10\xa0u\x12\"\n\x1d\x43REATIVE_CUSTOM_FIELD_9_VALUE\x10\xa1u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_10_VALUE\x10\xa2u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_11_VALUE\x10\xa3u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_12_VALUE\x10\xa4u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_13_VALUE\x10\xa5u\x12#\n\x1e\x43REATIVE_CUSTOM_FIELD_14_VALUE\x10\xa6u\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID\x10\x80}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID\x10\x81}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID\x10\x82}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID\x10\x83}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID\x10\x84}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID\x10\x85}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID\x10\x86}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID\x10\x87}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID\x10\x88}\x12\x30\n+BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID\x10\x89}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID\x10\x8a}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID\x10\x8b}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID\x10\x8c}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID\x10\x8d}\x12\x31\n,BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID\x10\x8e}\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE\x10\xe8\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE\x10\xe9\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE\x10\xea\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE\x10\xeb\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE\x10\xec\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE\x10\xed\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE\x10\xee\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE\x10\xef\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE\x10\xf0\x84\x01\x12-\n\'BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE\x10\xf1\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE\x10\xf2\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE\x10\xf3\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE\x10\xf4\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE\x10\xf5\x84\x01\x12.\n(BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE\x10\xf6\x84\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID\x10\xd0\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID\x10\xd1\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID\x10\xd2\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID\x10\xd3\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID\x10\xd4\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID\x10\xd5\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID\x10\xd6\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID\x10\xd7\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID\x10\xd8\x8c\x01\x12-\n\'BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID\x10\xd9\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID\x10\xda\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID\x10\xdb\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID\x10\xdc\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID\x10\xdd\x8c\x01\x12.\n(BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID\x10\xde\x8c\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE\x10\xb8\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE\x10\xb9\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE\x10\xba\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE\x10\xbb\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE\x10\xbc\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE\x10\xbd\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE\x10\xbe\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE\x10\xbf\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE\x10\xc0\x94\x01\x12)\n#BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE\x10\xc1\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE\x10\xc2\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE\x10\xc3\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE\x10\xc4\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE\x10\xc5\x94\x01\x12*\n$BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE\x10\xc6\x94\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID\x10\xa0\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID\x10\xa1\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID\x10\xa2\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID\x10\xa3\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID\x10\xa4\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID\x10\xa5\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID\x10\xa6\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID\x10\xa7\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID\x10\xa8\x9c\x01\x12\x30\n*BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID\x10\xa9\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID\x10\xaa\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID\x10\xab\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID\x10\xac\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID\x10\xad\x9c\x01\x12\x31\n+BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID\x10\xae\x9c\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE\x10\x88\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE\x10\x89\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE\x10\x8a\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE\x10\x8b\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE\x10\x8c\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE\x10\x8d\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE\x10\x8e\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE\x10\x8f\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE\x10\x90\xa4\x01\x12,\n&BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE\x10\x91\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE\x10\x92\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE\x10\x93\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE\x10\x94\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE\x10\x95\xa4\x01\x12-\n\'BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE\x10\x96\xa4\x01\x12!\n\x1b\x43USTOM_DIMENSION_0_VALUE_ID\x10\xa0\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_1_VALUE_ID\x10\xa1\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_2_VALUE_ID\x10\xa2\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_3_VALUE_ID\x10\xa3\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_4_VALUE_ID\x10\xa4\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_5_VALUE_ID\x10\xa5\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_6_VALUE_ID\x10\xa6\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_7_VALUE_ID\x10\xa7\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_8_VALUE_ID\x10\xa8\x8d\x06\x12!\n\x1b\x43USTOM_DIMENSION_9_VALUE_ID\x10\xa9\x8d\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_0_VALUE\x10\x88\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_1_VALUE\x10\x89\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_2_VALUE\x10\x8a\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_3_VALUE\x10\x8b\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_4_VALUE\x10\x8c\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_5_VALUE\x10\x8d\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_6_VALUE\x10\x8e\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_7_VALUE\x10\x8f\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_8_VALUE\x10\x90\x95\x06\x12\x1e\n\x18\x43USTOM_DIMENSION_9_VALUE\x10\x91\x95\x06\"\xeb-\n\x06Metric\x12\x16\n\x12METRIC_UNSPECIFIED\x10\x00\x12%\n!ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME\x10=\x12$\n ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS\x10:\x12&\n\"ACTIVE_VIEW_MEASURABLE_IMPRESSIONS\x10\x39\x12+\n\'ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE\x10<\x12$\n ACTIVE_VIEW_VIEWABLE_IMPRESSIONS\x10\x38\x12)\n%ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE\x10;\x12-\n)ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME\x10I\x12,\n(ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS\x10\x46\x12.\n*ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS\x10\x45\x12\x33\n/ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE\x10H\x12,\n(ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS\x10\x44\x12\x31\n-ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE\x10G\x12\x18\n\x14\x41\x44SENSE_AVERAGE_ECPM\x10\x1a\x12\x12\n\x0e\x41\x44SENSE_CLICKS\x10\x17\x12\x0f\n\x0b\x41\x44SENSE_CTR\x10\x18\x12\x17\n\x13\x41\x44SENSE_IMPRESSIONS\x10\x16\x12\x1a\n\x16\x41\x44SENSE_PERCENT_CLICKS\x10\x1c\x12\x1f\n\x1b\x41\x44SENSE_PERCENT_IMPRESSIONS\x10\x1b\x12\x1b\n\x17\x41\x44SENSE_PERCENT_REVENUE\x10\x1d\x12\'\n#ADSENSE_PERCENT_REVENUE_WITHOUT_CPD\x10\x1e\x12\x1c\n\x18\x41\x44SENSE_RESPONSES_SERVED\x10)\x12\x13\n\x0f\x41\x44SENSE_REVENUE\x10\x19\x12\x31\n-AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME\x10O\x12\x30\n,AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS\x10L\x12\x32\n.AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS\x10K\x12\x37\n3AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE\x10N\x12\x30\n,AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS\x10J\x12\x35\n1AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE\x10M\x12\x1c\n\x18\x41\x44_EXCHANGE_AVERAGE_ECPM\x10\x12\x12\x16\n\x12\x41\x44_EXCHANGE_CLICKS\x10\x0f\x12\x13\n\x0f\x41\x44_EXCHANGE_CTR\x10\x10\x12\x1b\n\x17\x41\x44_EXCHANGE_IMPRESSIONS\x10\x0e\x12\x1e\n\x1a\x41\x44_EXCHANGE_PERCENT_CLICKS\x10\x14\x12#\n\x1f\x41\x44_EXCHANGE_PERCENT_IMPRESSIONS\x10\x13\x12\x1f\n\x1b\x41\x44_EXCHANGE_PERCENT_REVENUE\x10\x15\x12+\n\'AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD\x10\x1f\x12 \n\x1c\x41\x44_EXCHANGE_RESPONSES_SERVED\x10*\x12\x17\n\x13\x41\x44_EXCHANGE_REVENUE\x10\x11\x12\x0f\n\x0b\x41\x44_REQUESTS\x10&\x12/\n+AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME\x10\x43\x12.\n*AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS\x10@\x12\x30\n,AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS\x10?\x12\x35\n1AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE\x10\x42\x12.\n*AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS\x10>\x12\x33\n/AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE\x10\x41\x12\x1a\n\x16\x41\x44_SERVER_AVERAGE_ECPM\x10\"\x12&\n\"AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD\x10\n\x12\x14\n\x10\x41\x44_SERVER_CLICKS\x10\x07\x12\x19\n\x15\x41\x44_SERVER_CPD_REVENUE\x10 \x12\x11\n\rAD_SERVER_CTR\x10\x08\x12\x19\n\x15\x41\x44_SERVER_IMPRESSIONS\x10\x06\x12\x1c\n\x18\x41\x44_SERVER_PERCENT_CLICKS\x10\x0c\x12!\n\x1d\x41\x44_SERVER_PERCENT_IMPRESSIONS\x10\x0b\x12\x1d\n\x19\x41\x44_SERVER_PERCENT_REVENUE\x10#\x12)\n%AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD\x10\r\x12\x1e\n\x1a\x41\x44_SERVER_RESPONSES_SERVED\x10(\x12\x15\n\x11\x41\x44_SERVER_REVENUE\x10!\x12!\n\x1d\x41\x44_SERVER_REVENUE_WITHOUT_CPD\x10\t\x12\x10\n\x0c\x41UCTIONS_WON\x10P\x12\x10\n\x0c\x41VERAGE_ECPM\x10%\x12\x1c\n\x18\x41VERAGE_ECPM_WITHOUT_CPD\x10\x05\x12\x08\n\x04\x42IDS\x10Q\x12\x13\n\x0f\x42IDS_IN_AUCTION\x10R\x12\x0c\n\x08\x43\x41LLOUTS\x10S\x12\n\n\x06\x43LICKS\x10\x02\x12\x15\n\x11\x43ODE_SERVED_COUNT\x10,\x12\x07\n\x03\x43TR\x10\x03\x12-\n(GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS\x10\x81\x01\x12$\n\x1fGOOGLE_SOLD_AUCTION_IMPRESSIONS\x10\x80\x01\x12%\n GOOGLE_SOLD_COVIEWED_IMPRESSIONS\x10\x83\x01\x12\x1c\n\x17GOOGLE_SOLD_IMPRESSIONS\x10\x82\x01\x12\x30\n,GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS\x10\x7f\x12\'\n#GOOGLE_SOLD_RESERVATION_IMPRESSIONS\x10~\x12\x0f\n\x0bIMPRESSIONS\x10\x01\x12&\n!PARTNER_SALES_FILLED_POD_REQUESTS\x10\x87\x01\x12\x1c\n\x17PARTNER_SALES_FILL_RATE\x10\x88\x01\x12%\n PARTNER_SALES_PARTNER_MATCH_RATE\x10\x89\x01\x12\x1a\n\x15PARTNER_SALES_QUERIES\x10\x84\x01\x12\'\n\"PARTNER_SALES_UNFILLED_IMPRESSIONS\x10\x85\x01\x12$\n\x1fPARTNER_SALES_UNMATCHED_QUERIES\x10\x86\x01\x12\x1c\n\x18PARTNER_SOLD_CODE_SERVED\x10}\x12%\n!PARTNER_SOLD_COVIEWED_IMPRESSIONS\x10|\x12\x1c\n\x18PARTNER_SOLD_IMPRESSIONS\x10{\x12&\n!PROGRAMMATIC_ELIGIBLE_AD_REQUESTS\x10\xb1\x01\x12\x1c\n\x17PROGRAMMATIC_MATCH_RATE\x10\xb2\x01\x12\"\n\x1dPROGRAMMATIC_RESPONSES_SERVED\x10\xb0\x01\x12\x14\n\x10RESPONSES_SERVED\x10\'\x12\x0b\n\x07REVENUE\x10$\x12\x17\n\x13REVENUE_WITHOUT_CPD\x10\x04\x12\x18\n\x14SUCCESSFUL_RESPONSES\x10T\x12\x18\n\x14UNFILLED_IMPRESSIONS\x10-\x12\x19\n\x15UNMATCHED_AD_REQUESTS\x10+\x12*\n&USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN\x10y\x12\x32\n.USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS\x10z\x12.\n*VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE\x10\\\x12\x1f\n\x1bVIDEO_INTERACTION_COLLAPSES\x10]\x12\x1d\n\x19VIDEO_INTERACTION_EXPANDS\x10_\x12\"\n\x1eVIDEO_INTERACTION_FULL_SCREENS\x10`\x12\x1b\n\x17VIDEO_INTERACTION_MUTES\x10\x61\x12\x1c\n\x18VIDEO_INTERACTION_PAUSES\x10\x62\x12\x1d\n\x19VIDEO_INTERACTION_RESUMES\x10\x63\x12\x1d\n\x19VIDEO_INTERACTION_REWINDS\x10\x64\x12\x1d\n\x19VIDEO_INTERACTION_UNMUTES\x10\x65\x12!\n\x1dVIDEO_INTERACTION_VIDEO_SKIPS\x10\x66\x12$\n\x1fVIDEO_REAL_TIME_CREATIVE_SERVES\x10\x8b\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_100_COUNT\x10\x8f\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_101_COUNT\x10\x90\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_102_COUNT\x10\x91\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_200_COUNT\x10\x92\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_201_COUNT\x10\x93\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_202_COUNT\x10\x94\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_203_COUNT\x10\x95\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_300_COUNT\x10\x96\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_301_COUNT\x10\x97\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_302_COUNT\x10\x98\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_303_COUNT\x10\x99\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_400_COUNT\x10\x9a\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_401_COUNT\x10\x9b\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_402_COUNT\x10\x9c\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_403_COUNT\x10\x9d\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_405_COUNT\x10\x9e\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_406_COUNT\x10\x9f\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_407_COUNT\x10\xa0\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_408_COUNT\x10\xa1\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_409_COUNT\x10\xa2\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_410_COUNT\x10\xa3\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_500_COUNT\x10\xa4\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_501_COUNT\x10\xa5\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_502_COUNT\x10\xa6\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_503_COUNT\x10\xa7\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_600_COUNT\x10\xa8\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_601_COUNT\x10\xa9\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_602_COUNT\x10\xaa\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_603_COUNT\x10\xab\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_604_COUNT\x10\xac\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_900_COUNT\x10\xad\x01\x12$\n\x1fVIDEO_REAL_TIME_ERROR_901_COUNT\x10\xae\x01\x12 \n\x1bVIDEO_REAL_TIME_IMPRESSIONS\x10\x8a\x01\x12$\n\x1fVIDEO_REAL_TIME_MATCHED_QUERIES\x10\x8c\x01\x12&\n!VIDEO_REAL_TIME_TOTAL_ERROR_COUNT\x10\xaf\x01\x12\"\n\x1dVIDEO_REAL_TIME_TOTAL_QUERIES\x10\x8e\x01\x12&\n!VIDEO_REAL_TIME_UNMATCHED_QUERIES\x10\x8d\x01\x12\x1f\n\x1bVIDEO_VIEWERSHIP_AUTO_PLAYS\x10g\x12&\n\"VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE\x10h\x12&\n\"VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME\x10i\x12#\n\x1fVIDEO_VIEWERSHIP_CLICK_TO_PLAYS\x10j\x12\x1e\n\x1aVIDEO_VIEWERSHIP_COMPLETES\x10k\x12$\n VIDEO_VIEWERSHIP_COMPLETION_RATE\x10l\x12\"\n\x1eVIDEO_VIEWERSHIP_ENGAGED_VIEWS\x10m\x12$\n VIDEO_VIEWERSHIP_FIRST_QUARTILES\x10n\x12\x1e\n\x1aVIDEO_VIEWERSHIP_MIDPOINTS\x10o\x12\'\n#VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN\x10p\x12\x1b\n\x17VIDEO_VIEWERSHIP_STARTS\x10q\x12$\n VIDEO_VIEWERSHIP_THIRD_QUARTILES\x10r\x12&\n\"VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT\x10s\x12%\n!VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE\x10^\x12!\n\x1dVIDEO_VIEWERSHIP_VIDEO_LENGTH\x10t\x12&\n\"VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE\x10u\x12\x1d\n\x19YIELD_GROUP_ESTIMATED_CPM\x10X\x12!\n\x1dYIELD_GROUP_ESTIMATED_REVENUE\x10W\x12\x1b\n\x17YIELD_GROUP_IMPRESSIONS\x10U\x12#\n\x1fYIELD_GROUP_MEDIATION_FILL_RATE\x10Y\x12)\n%YIELD_GROUP_MEDIATION_MATCHED_QUERIES\x10V\x12#\n\x1fYIELD_GROUP_MEDIATION_PASSBACKS\x10v\x12*\n&YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM\x10Z\"\x97\x01\n\x0fMetricValueType\x12\x0b\n\x07PRIMARY\x10\x00\x12\x1c\n\x18PRIMARY_PERCENT_OF_TOTAL\x10\x01\x12\x0e\n\nCOMPARISON\x10\x02\x12\x1f\n\x1b\x43OMPARISON_PERCENT_OF_TOTAL\x10\x03\x12\x13\n\x0f\x41\x42SOLUTE_CHANGE\x10\x04\x12\x13\n\x0fRELATIVE_CHANGE\x10\x05\"9\n\nReportType\x12\x1b\n\x17REPORT_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nHISTORICAL\x10\x01\".\n\nVisibility\x12\n\n\x06HIDDEN\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\t\n\x05SAVED\x10\x02:_\xea\x41\\\n\x1f\x61\x64manager.googleapis.com/Report\x12(networks/{network_code}/reports/{report}*\x07reports2\x06report\"I\n\x10RunReportRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/Report\"c\n\x11RunReportMetadata\x12\x18\n\x10percent_complete\x18\x02 \x01(\x05\x12\x34\n\x06report\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/Report\"*\n\x11RunReportResponse\x12\x15\n\rreport_result\x18\x01 \x01(\t\"I\n\x10GetReportRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/Report\"\xbe\x01\n\x12ListReportsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"t\n\x13ListReportsResponse\x12\x30\n\x07reports\x18\x01 \x03(\x0b\x32\x1f.google.ads.admanager.v1.Report\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x84\x01\n\x13\x43reateReportRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x61\x64manager.googleapis.com/Report\x12\x34\n\x06report\x18\x02 \x01(\x0b\x32\x1f.google.ads.admanager.v1.ReportB\x03\xe0\x41\x02\"\x81\x01\n\x13UpdateReportRequest\x12\x34\n\x06report\x18\x01 \x01(\x0b\x32\x1f.google.ads.admanager.v1.ReportB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"]\n\x1c\x46\x65tchReportResultRowsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe5\x02\n\x1d\x46\x65tchReportResultRowsResponse\x12;\n\x04rows\x18\x01 \x03(\x0b\x32-.google.ads.admanager.v1.Report.DataTable.Row\x12,\n\x08run_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12M\n\x0b\x64\x61te_ranges\x18\x03 \x03(\x0b\x32\x38.google.ads.admanager.v1.Report.DateRange.FixedDateRange\x12X\n\x16\x63omparison_date_ranges\x18\x04 \x03(\x0b\x32\x38.google.ads.admanager.v1.Report.DateRange.FixedDateRange\x12\x17\n\x0ftotal_row_count\x18\x05 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x06 \x01(\t\"\xe2\x06\n\x10ReportDefinition\x12\x42\n\ndimensions\x18\x01 \x03(\x0e\x32).google.ads.admanager.v1.Report.DimensionB\x03\xe0\x41\x02\x12<\n\x07metrics\x18\x02 \x03(\x0e\x32&.google.ads.admanager.v1.Report.MetricB\x03\xe0\x41\x02\x12<\n\x07\x66ilters\x18\x03 \x03(\x0b\x32&.google.ads.admanager.v1.Report.FilterB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcurrency_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\ndate_range\x18\x06 \x01(\x0b\x32).google.ads.admanager.v1.Report.DateRangeB\x03\xe0\x41\x02\x12R\n\x15\x63omparison_date_range\x18\t \x01(\x0b\x32).google.ads.admanager.v1.Report.DateRangeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12%\n\x18\x63ustom_dimension_key_ids\x18\x07 \x03(\x03\x42\x03\xe0\x41\x01\x12\'\n\x1aline_item_custom_field_ids\x18\x0b \x03(\x03\x42\x03\xe0\x41\x01\x12#\n\x16order_custom_field_ids\x18\x0c \x03(\x03\x42\x03\xe0\x41\x01\x12&\n\x19\x63reative_custom_field_ids\x18\r \x03(\x03\x42\x03\xe0\x41\x01\x12\x44\n\x0breport_type\x18\x08 \x01(\x0e\x32*.google.ads.admanager.v1.Report.ReportTypeB\x03\xe0\x41\x02\x12Q\n\x12time_period_column\x18\n \x01(\x0e\x32\x30.google.ads.admanager.v1.Report.TimePeriodColumnB\x03\xe0\x41\x01\x12\x38\n\x05\x66lags\x18\x0e \x03(\x0b\x32$.google.ads.admanager.v1.Report.FlagB\x03\xe0\x41\x01\x12\x38\n\x05sorts\x18\x0f \x03(\x0b\x32$.google.ads.admanager.v1.Report.SortB\x03\xe0\x41\x01\x42\x18\n\x16_comparison_date_range\"\xa2\x02\n\x0fScheduleOptions\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32!.google.ads.admanager.v1.Schedule\x12V\n\x12\x64\x65livery_condition\x18\x02 \x01(\x0e\x32:.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition\x12\x38\n\x05\x66lags\x18\x03 \x03(\x0b\x32$.google.ads.admanager.v1.Report.FlagB\x03\xe0\x41\x01\"H\n\x11\x44\x65liveryCondition\x12\t\n\x05NEVER\x10\x00\x12\n\n\x06\x41LWAYS\x10\x01\x12\x1c\n\x18WHEN_FLAG_CONDITIONS_MET\x10\x02\"\x8b\x05\n\x08Schedule\x12K\n\x0fweekly_schedule\x18\x06 \x01(\x0b\x32\x30.google.ads.admanager.v1.Schedule.WeeklyScheduleH\x00\x12M\n\x10monthly_schedule\x18\x07 \x01(\x0b\x32\x31.google.ads.admanager.v1.Schedule.MonthlyScheduleH\x00\x12%\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12#\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12>\n\tfrequency\x18\x03 \x01(\x0e\x32+.google.ads.admanager.v1.Schedule.Frequency\x12*\n\nstart_time\x18\x04 \x01(\x0b\x32\x16.google.type.TimeOfDay\x1aG\n\x0eWeeklySchedule\x12\x35\n\x15weekly_scheduled_days\x18\x01 \x03(\x0e\x32\x16.google.type.DayOfWeek\x1a\x31\n\x0fMonthlySchedule\x12\x1e\n\x16monthly_scheduled_days\x18\x01 \x03(\x05\"\x98\x01\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\x13\n\x0fTWO_TIMES_DAILY\x10\x02\x12\x15\n\x11THREE_TIMES_DAILY\x10\x03\x12\x14\n\x10\x46OUR_TIMES_DAILY\x10\x04\x12\t\n\x05\x44\x41ILY\x10\x05\x12\n\n\x06WEEKLY\x10\x06\x12\x0b\n\x07MONTHLY\x10\x07\x42\x14\n\x12\x66requency_schedule2\xa6\x08\n\rReportService\x12\x87\x01\n\tGetReport\x12).google.ads.admanager.v1.GetReportRequest\x1a\x1f.google.ads.admanager.v1.Report\".\xda\x41\x04name\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{name=networks/*/reports/*}\x12\x9a\x01\n\x0bListReports\x12+.google.ads.admanager.v1.ListReportsRequest\x1a,.google.ads.admanager.v1.ListReportsResponse\"0\xda\x41\x06parent\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{parent=networks/*}/reports\x12\x9e\x01\n\x0c\x43reateReport\x12,.google.ads.admanager.v1.CreateReportRequest\x1a\x1f.google.ads.admanager.v1.Report\"?\xda\x41\rparent,report\x82\xd3\xe4\x93\x02)\"\x1f/v1/{parent=networks/*}/reports:\x06report\x12\xaa\x01\n\x0cUpdateReport\x12,.google.ads.admanager.v1.UpdateReportRequest\x1a\x1f.google.ads.admanager.v1.Report\"K\xda\x41\x12report,update_mask\x82\xd3\xe4\x93\x02\x30\x32&/v1/{report.name=networks/*/reports/*}:\x06report\x12\xb5\x01\n\tRunReport\x12).google.ads.admanager.v1.RunReportRequest\x1a\x1d.google.longrunning.Operation\"^\xca\x41&\n\x11RunReportResponse\x12\x11RunReportMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02(\"#/v1/{name=networks/*/reports/*}:run:\x01*\x12\xca\x01\n\x15\x46\x65tchReportResultRows\x12\x35.google.ads.admanager.v1.FetchReportResultRowsRequest\x1a\x36.google.ads.admanager.v1.FetchReportResultRowsResponse\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=networks/*/reports/*/results/*}:fetchRows\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xc6\x01\n\x1b\x63om.google.ads.admanager.v1B\x12ReportServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n,google/ads/admanager/v1/report_service.proto\x12\x17google.ads.admanager.v1\x1a-google/ads/admanager/v1/report_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"I\n\x10RunReportRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/Report\"c\n\x11RunReportMetadata\x12\x18\n\x10percent_complete\x18\x02 \x01(\x05\x12\x34\n\x06report\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/Report\"*\n\x11RunReportResponse\x12\x15\n\rreport_result\x18\x01 \x01(\t\"I\n\x10GetReportRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/Report\"\xbe\x01\n\x12ListReportsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"t\n\x13ListReportsResponse\x12\x30\n\x07reports\x18\x01 \x03(\x0b\x32\x1f.google.ads.admanager.v1.Report\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x85\x01\n\x13\x43reateReportRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x34\n\x06report\x18\x02 \x01(\x0b\x32\x1f.google.ads.admanager.v1.ReportB\x03\xe0\x41\x02\"\x81\x01\n\x13UpdateReportRequest\x12\x34\n\x06report\x18\x01 \x01(\x0b\x32\x1f.google.ads.admanager.v1.ReportB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"]\n\x1c\x46\x65tchReportResultRowsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe5\x02\n\x1d\x46\x65tchReportResultRowsResponse\x12;\n\x04rows\x18\x01 \x03(\x0b\x32-.google.ads.admanager.v1.Report.DataTable.Row\x12,\n\x08run_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12M\n\x0b\x64\x61te_ranges\x18\x03 \x03(\x0b\x32\x38.google.ads.admanager.v1.Report.DateRange.FixedDateRange\x12X\n\x16\x63omparison_date_ranges\x18\x04 \x03(\x0b\x32\x38.google.ads.admanager.v1.Report.DateRange.FixedDateRange\x12\x17\n\x0ftotal_row_count\x18\x05 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x06 \x01(\t2\xd2\x08\n\rReportService\x12\x87\x01\n\tGetReport\x12).google.ads.admanager.v1.GetReportRequest\x1a\x1f.google.ads.admanager.v1.Report\".\xda\x41\x04name\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{name=networks/*/reports/*}\x12\x9a\x01\n\x0bListReports\x12+.google.ads.admanager.v1.ListReportsRequest\x1a,.google.ads.admanager.v1.ListReportsResponse\"0\xda\x41\x06parent\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{parent=networks/*}/reports\x12\x9e\x01\n\x0c\x43reateReport\x12,.google.ads.admanager.v1.CreateReportRequest\x1a\x1f.google.ads.admanager.v1.Report\"?\xda\x41\rparent,report\x82\xd3\xe4\x93\x02)\"\x1f/v1/{parent=networks/*}/reports:\x06report\x12\xaa\x01\n\x0cUpdateReport\x12,.google.ads.admanager.v1.UpdateReportRequest\x1a\x1f.google.ads.admanager.v1.Report\"K\xda\x41\x12report,update_mask\x82\xd3\xe4\x93\x02\x30\x32&/v1/{report.name=networks/*/reports/*}:\x06report\x12\xb5\x01\n\tRunReport\x12).google.ads.admanager.v1.RunReportRequest\x1a\x1d.google.longrunning.Operation\"^\xca\x41&\n\x11RunReportResponse\x12\x11RunReportMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02(\"#/v1/{name=networks/*/reports/*}:run:\x01*\x12\xca\x01\n\x15\x46\x65tchReportResultRows\x12\x35.google.ads.admanager.v1.FetchReportResultRowsRequest\x1a\x36.google.ads.admanager.v1.FetchReportResultRowsResponse\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=networks/*/reports/*/results/*}:fetchRows\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc6\x01\n\x1b\x63om.google.ads.admanager.v1B\x12ReportServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -31,10 +29,9 @@ file = pool.add_serialized_file(serialized) warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.type.Date", "google/type/date.proto"], + ["google.ads.admanager.v1.Report", "google/ads/admanager/v1/report_messages.proto"], ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.type.TimeOfDay", "google/type/timeofday.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -50,30 +47,6 @@ module Google module Ads module AdManager module V1 - Report = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report").msgclass - Report::Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Value").msgclass - Report::Value::IntList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Value.IntList").msgclass - Report::Value::StringList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Value.StringList").msgclass - Report::Sort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Sort").msgclass - Report::DataTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DataTable").msgclass - Report::DataTable::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DataTable.Row").msgclass - Report::DataTable::MetricValueGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DataTable.MetricValueGroup").msgclass - Report::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Field").msgclass - Report::Slice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Slice").msgclass - Report::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Filter").msgclass - Report::Filter::FieldFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Filter.FieldFilter").msgclass - Report::Filter::FilterList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Filter.FilterList").msgclass - Report::Filter::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Filter.Operation").enummodule - Report::Flag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Flag").msgclass - Report::DateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DateRange").msgclass - Report::DateRange::FixedDateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DateRange.FixedDateRange").msgclass - Report::DateRange::RelativeDateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.DateRange.RelativeDateRange").enummodule - Report::TimePeriodColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.TimePeriodColumn").enummodule - Report::Dimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Dimension").enummodule - Report::Metric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Metric").enummodule - Report::MetricValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.MetricValueType").enummodule - Report::ReportType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.ReportType").enummodule - Report::Visibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Report.Visibility").enummodule RunReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.RunReportRequest").msgclass RunReportMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.RunReportMetadata").msgclass RunReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.RunReportResponse").msgclass @@ -84,13 +57,6 @@ module V1 UpdateReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.UpdateReportRequest").msgclass FetchReportResultRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.FetchReportResultRowsRequest").msgclass FetchReportResultRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.FetchReportResultRowsResponse").msgclass - ReportDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ReportDefinition").msgclass - ScheduleOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ScheduleOptions").msgclass - ScheduleOptions::DeliveryCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.ScheduleOptions.DeliveryCondition").enummodule - Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Schedule").msgclass - Schedule::WeeklySchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Schedule.WeeklySchedule").msgclass - Schedule::MonthlySchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Schedule.MonthlySchedule").msgclass - Schedule::Frequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Schedule.Frequency").enummodule end end end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/request_platform_enum_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/request_platform_enum_pb.rb new file mode 100644 index 000000000000..c91914ce0e10 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/request_platform_enum_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/request_platform_enum.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/ads/admanager/v1/request_platform_enum.proto\x12\x17google.ads.admanager.v1\"y\n\x13RequestPlatformEnum\"b\n\x0fRequestPlatform\x12 \n\x1cREQUEST_PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42ROWSER\x10\x01\x12\x0e\n\nMOBILE_APP\x10\x02\x12\x10\n\x0cVIDEO_PLAYER\x10\x03\x42\xcc\x01\n\x1b\x63om.google.ads.admanager.v1B\x18RequestPlatformEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + RequestPlatformEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.RequestPlatformEnum").msgclass + RequestPlatformEnum::RequestPlatform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform").enummodule + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/role_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/role_messages_pb.rb index aaceb7cabb08..6a711bf6e938 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/role_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/role_messages_pb.rb @@ -9,7 +9,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n+google/ads/admanager/v1/role_messages.proto\x12\x17google.ads.admanager.v1\x1a(google/ads/admanager/v1/role_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9b\x02\n\x04Role\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07role_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x62uilt_in\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12G\n\x06status\x18\x06 \x01(\x0e\x32\x32.google.ads.admanager.v1.RoleStatusEnum.RoleStatusB\x03\xe0\x41\x03:U\xea\x41R\n\x1d\x61\x64manager.googleapis.com/Role\x12$networks/{network_code}/roles/{role}*\x05roles2\x04roleB\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11RoleMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n+google/ads/admanager/v1/role_messages.proto\x12\x17google.ads.admanager.v1\x1a(google/ads/admanager/v1/role_enums.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf9\x02\n\x04Role\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x07role_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1a\n\x08\x62uilt_in\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12L\n\x06status\x18\x06 \x01(\x0e\x32\x32.google.ads.admanager.v1.RoleStatusEnum.RoleStatusB\x03\xe0\x41\x03H\x04\x88\x01\x01:U\xea\x41R\n\x1d\x61\x64manager.googleapis.com/Role\x12$networks/{network_code}/roles/{role}*\x05roles2\x04roleB\n\n\x08_role_idB\x0f\n\r_display_nameB\x0e\n\x0c_descriptionB\x0b\n\t_built_inB\t\n\x07_statusB\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11RoleMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/role_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/role_service_pb.rb index 258308010d73..ee62ad7b8476 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/role_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/role_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n*google/ads/admanager/v1/role_service.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/role_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"E\n\x0eGetRoleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Role\"\xbc\x01\n\x10ListRolesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"n\n\x11ListRolesResponse\x12,\n\x05roles\x18\x01 \x03(\x0b\x32\x1d.google.ads.admanager.v1.Role\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xc0\x02\n\x0bRoleService\x12\x7f\n\x07GetRole\x12\'.google.ads.admanager.v1.GetRoleRequest\x1a\x1d.google.ads.admanager.v1.Role\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=networks/*/roles/*}\x12\x92\x01\n\tListRoles\x12).google.ads.admanager.v1.ListRolesRequest\x1a*.google.ads.admanager.v1.ListRolesResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=networks/*}/roles\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xc4\x01\n\x1b\x63om.google.ads.admanager.v1B\x10RoleServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n*google/ads/admanager/v1/role_service.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/role_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"E\n\x0eGetRoleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Role\"\xbc\x01\n\x10ListRolesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"n\n\x11ListRolesResponse\x12,\n\x05roles\x18\x01 \x03(\x0b\x32\x1d.google.ads.admanager.v1.Role\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xec\x02\n\x0bRoleService\x12\x7f\n\x07GetRole\x12\'.google.ads.admanager.v1.GetRoleRequest\x1a\x1d.google.ads.admanager.v1.Role\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=networks/*/roles/*}\x12\x92\x01\n\tListRoles\x12).google.ads.admanager.v1.ListRolesRequest\x1a*.google.ads.admanager.v1.ListRolesResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=networks/*}/roles\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc4\x01\n\x1b\x63om.google.ads.admanager.v1B\x10RoleServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/targeted_video_bumper_type_enum_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/targeted_video_bumper_type_enum_pb.rb new file mode 100644 index 000000000000..118c815553f0 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/targeted_video_bumper_type_enum_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/targeted_video_bumper_type_enum.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/admanager/v1/targeted_video_bumper_type_enum.proto\x12\x17google.ads.admanager.v1\"{\n\x1bTargetedVideoBumperTypeEnum\"\\\n\x17TargetedVideoBumperType\x12*\n&TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x46TER\x10\x01\x12\n\n\x06\x42\x45\x46ORE\x10\x02\x42\xd4\x01\n\x1b\x63om.google.ads.admanager.v1B TargetedVideoBumperTypeEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + TargetedVideoBumperTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.TargetedVideoBumperTypeEnum").msgclass + TargetedVideoBumperTypeEnum::TargetedVideoBumperType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType").enummodule + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/targeting_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/targeting_pb.rb new file mode 100644 index 000000000000..0117a66e8e58 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/targeting_pb.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/targeting.proto + +require 'google/protobuf' + +require 'google/ads/admanager/v1/request_platform_enum_pb' +require 'google/ads/admanager/v1/targeted_video_bumper_type_enum_pb' +require 'google/ads/admanager/v1/video_position_enum_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n\'google/ads/admanager/v1/targeting.proto\x12\x17google.ads.admanager.v1\x1a\x33google/ads/admanager/v1/request_platform_enum.proto\x1a=google/ads/admanager/v1/targeted_video_bumper_type_enum.proto\x1a\x31google/ads/admanager/v1/video_position_enum.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x91\x05\n\tTargeting\x12\x41\n\rgeo_targeting\x18\x02 \x01(\x0b\x32%.google.ads.admanager.v1.GeoTargetingB\x03\xe0\x41\x01\x12O\n\x14technology_targeting\x18\x03 \x01(\x0b\x32,.google.ads.admanager.v1.TechnologyTargetingB\x03\xe0\x41\x01\x12M\n\x13inventory_targeting\x18\x05 \x01(\x0b\x32+.google.ads.admanager.v1.InventoryTargetingB\x03\xe0\x41\x01\x12Z\n\x1arequest_platform_targeting\x18\x06 \x01(\x0b\x32\x31.google.ads.admanager.v1.RequestPlatformTargetingB\x03\xe0\x41\x01\x12G\n\x10\x63ustom_targeting\x18\x07 \x01(\x0b\x32(.google.ads.admanager.v1.CustomTargetingB\x03\xe0\x41\x01\x12P\n\x15user_domain_targeting\x18\n \x01(\x0b\x32,.google.ads.admanager.v1.UserDomainTargetingB\x03\xe0\x41\x01\x12V\n\x18video_position_targeting\x18\x0c \x01(\x0b\x32/.google.ads.admanager.v1.VideoPositionTargetingB\x03\xe0\x41\x01\x12R\n\x16\x64\x61ta_segment_targeting\x18\r \x01(\x0b\x32-.google.ads.admanager.v1.DataSegmentTargetingB\x03\xe0\x41\x01\"\x94\x01\n\x0cGeoTargeting\x12\x41\n\rtargeted_geos\x18\x03 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"admanager.googleapis.com/GeoTarget\x12\x41\n\rexcluded_geos\x18\x04 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"admanager.googleapis.com/GeoTarget\"\x9a\x02\n\x13TechnologyTargeting\x12M\n\x13\x62\x61ndwidth_targeting\x18\x03 \x01(\x0b\x32+.google.ads.admanager.v1.BandwidthTargetingB\x03\xe0\x41\x01\x12X\n\x19\x64\x65vice_category_targeting\x18\x01 \x01(\x0b\x32\x30.google.ads.admanager.v1.DeviceCategoryTargetingB\x03\xe0\x41\x01\x12Z\n\x1aoperating_system_targeting\x18\x02 \x01(\x0b\x32\x31.google.ads.admanager.v1.OperatingSystemTargetingB\x03\xe0\x41\x01\"\xbc\x01\n\x12\x42\x61ndwidthTargeting\x12R\n\x19targeted_bandwidth_groups\x18\x03 \x03(\tB/\xe0\x41\x01\xfa\x41)\n\'admanager.googleapis.com/BandwidthGroup\x12R\n\x19\x65xcluded_bandwidth_groups\x18\x04 \x03(\tB/\xe0\x41\x01\xfa\x41)\n\'admanager.googleapis.com/BandwidthGroup\"\xb5\x01\n\x17\x44\x65viceCategoryTargeting\x12L\n\x13targeted_categories\x18\x03 \x03(\tB/\xe0\x41\x01\xfa\x41)\n\'admanager.googleapis.com/DeviceCategory\x12L\n\x13\x65xcluded_categories\x18\x04 \x03(\tB/\xe0\x41\x01\xfa\x41)\n\'admanager.googleapis.com/DeviceCategory\"\x90\x03\n\x18OperatingSystemTargeting\x12T\n\x1atargeted_operating_systems\x18\x05 \x03(\tB0\xe0\x41\x01\xfa\x41*\n(admanager.googleapis.com/OperatingSystem\x12T\n\x1a\x65xcluded_operating_systems\x18\x06 \x03(\tB0\xe0\x41\x01\xfa\x41*\n(admanager.googleapis.com/OperatingSystem\x12\x63\n\"targeted_operating_system_versions\x18\x07 \x03(\tB7\xe0\x41\x01\xfa\x41\x31\n/admanager.googleapis.com/OperatingSystemVersion\x12\x63\n\"excluded_operating_system_versions\x18\x08 \x03(\tB7\xe0\x41\x01\xfa\x41\x31\n/admanager.googleapis.com/OperatingSystemVersion\"\xf1\x01\n\x12InventoryTargeting\x12H\n\x11targeted_ad_units\x18\x01 \x03(\x0b\x32(.google.ads.admanager.v1.AdUnitTargetingB\x03\xe0\x41\x01\x12H\n\x11\x65xcluded_ad_units\x18\x02 \x03(\x0b\x32(.google.ads.admanager.v1.AdUnitTargetingB\x03\xe0\x41\x01\x12G\n\x13targeted_placements\x18\x05 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"admanager.googleapis.com/Placement\"\x96\x01\n\x0f\x41\x64UnitTargeting\x12 \n\x13include_descendants\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12=\n\x07\x61\x64_unit\x18\x03 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x61\x64manager.googleapis.com/AdUnitH\x01\x88\x01\x01\x42\x16\n\x14_include_descendantsB\n\n\x08_ad_unit\"x\n\x18RequestPlatformTargeting\x12\\\n\x11request_platforms\x18\x01 \x03(\x0e\x32<.google.ads.admanager.v1.RequestPlatformEnum.RequestPlatformB\x03\xe0\x41\x01\"h\n\x0f\x43ustomTargeting\x12U\n\x18\x63ustom_targeting_clauses\x18\x01 \x03(\x0b\x32..google.ads.admanager.v1.CustomTargetingClauseB\x03\xe0\x41\x01\"p\n\x15\x43ustomTargetingClause\x12W\n\x19\x63ustom_targeting_literals\x18\x01 \x03(\x0b\x32/.google.ads.admanager.v1.CustomTargetingLiteralB\x03\xe0\x41\x01\"\x85\x02\n\x16\x43ustomTargetingLiteral\x12\x15\n\x08negative\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12V\n\x14\x63ustom_targeting_key\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+admanager.googleapis.com/CustomTargetingKeyH\x01\x88\x01\x01\x12V\n\x17\x63ustom_targeting_values\x18\x05 \x03(\tB5\xe0\x41\x01\xfa\x41/\n-admanager.googleapis.com/CustomTargetingValueB\x0b\n\t_negativeB\x17\n\x15_custom_targeting_key\"]\n\x13UserDomainTargeting\x12\"\n\x15targeted_user_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\"\n\x15\x65xcluded_user_domains\x18\x02 \x03(\tB\x03\xe0\x41\x01\"^\n\x16VideoPositionTargeting\x12\x44\n\x0fvideo_positions\x18\x01 \x03(\x0b\x32&.google.ads.admanager.v1.VideoPositionB\x03\xe0\x41\x01\"\xa0\x03\n\rVideoPosition\x12\x1f\n\rmidroll_index\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15reverse_midroll_index\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1e\n\x0cpod_position\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12Y\n\rposition_type\x18\x05 \x01(\x0e\x32\x38.google.ads.admanager.v1.VideoPositionEnum.VideoPositionB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12k\n\x0b\x62umper_type\x18\x06 \x01(\x0e\x32L.google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperTypeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x42\x10\n\x0e_midroll_indexB\x18\n\x16_reverse_midroll_indexB\x0f\n\r_pod_positionB\x10\n\x0e_position_typeB\x0e\n\x0c_bumper_type\"?\n\x14\x44\x61taSegmentTargeting\x12\'\n\x1ahas_data_segment_targeting\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x42\xc2\x01\n\x1b\x63om.google.ads.admanager.v1B\x0eTargetingProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + Targeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.Targeting").msgclass + GeoTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.GeoTargeting").msgclass + TechnologyTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.TechnologyTargeting").msgclass + BandwidthTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.BandwidthTargeting").msgclass + DeviceCategoryTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.DeviceCategoryTargeting").msgclass + OperatingSystemTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.OperatingSystemTargeting").msgclass + InventoryTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.InventoryTargeting").msgclass + AdUnitTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.AdUnitTargeting").msgclass + RequestPlatformTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.RequestPlatformTargeting").msgclass + CustomTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CustomTargeting").msgclass + CustomTargetingClause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CustomTargetingClause").msgclass + CustomTargetingLiteral = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.CustomTargetingLiteral").msgclass + UserDomainTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.UserDomainTargeting").msgclass + VideoPositionTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.VideoPositionTargeting").msgclass + VideoPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.VideoPosition").msgclass + DataSegmentTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.DataSegmentTargeting").msgclass + end + end + end +end diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/taxonomy_category_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/taxonomy_category_messages_pb.rb index 0db4b9f436d2..51b558cfe95f 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/taxonomy_category_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/taxonomy_category_messages_pb.rb @@ -9,7 +9,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n8google/ads/admanager/v1/taxonomy_category_messages.proto\x12\x17google.ads.admanager.v1\x1a\x30google/ads/admanager/v1/taxonomy_type_enum.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdf\x03\n\x10TaxonomyCategory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12!\n\x14taxonomy_category_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rgrouping_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12(\n\x1bparent_taxonomy_category_id\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12R\n\rtaxonomy_type\x18\t \x01(\x0e\x32\x36.google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyTypeB\x03\xe0\x41\x03\x12\x1b\n\x0e\x61ncestor_names\x18\x07 \x03(\tB\x03\xe0\x41\x03\x12+\n\x1e\x61ncestor_taxonomy_category_ids\x18\x08 \x03(\x03\x42\x03\xe0\x41\x03:\x95\x01\xea\x41\x91\x01\n)admanager.googleapis.com/TaxonomyCategory\x12>networks/{network_code}/taxonomyCategories/{taxonomy_category}*\x12taxonomyCategories2\x10taxonomyCategoryB\xd1\x01\n\x1b\x63om.google.ads.admanager.v1B\x1dTaxonomyCategoryMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n8google/ads/admanager/v1/taxonomy_category_messages.proto\x12\x17google.ads.admanager.v1\x1a\x30google/ads/admanager/v1/taxonomy_type_enum.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe6\x04\n\x10TaxonomyCategory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12&\n\x14taxonomy_category_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rgrouping_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12-\n\x1bparent_taxonomy_category_id\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12W\n\rtaxonomy_type\x18\t \x01(\x0e\x32\x36.google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyTypeB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1b\n\x0e\x61ncestor_names\x18\x07 \x03(\tB\x03\xe0\x41\x03\x12+\n\x1e\x61ncestor_taxonomy_category_ids\x18\x08 \x03(\x03\x42\x03\xe0\x41\x03:\x95\x01\xea\x41\x91\x01\n)admanager.googleapis.com/TaxonomyCategory\x12>networks/{network_code}/taxonomyCategories/{taxonomy_category}*\x12taxonomyCategories2\x10taxonomyCategoryB\x17\n\x15_taxonomy_category_idB\x0f\n\r_display_nameB\x10\n\x0e_grouping_onlyB\x1e\n\x1c_parent_taxonomy_category_idB\x10\n\x0e_taxonomy_typeB\xd1\x01\n\x1b\x63om.google.ads.admanager.v1B\x1dTaxonomyCategoryMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/taxonomy_category_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/taxonomy_category_service_pb.rb index 0e51a8213525..eb3e7cf64011 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/taxonomy_category_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/taxonomy_category_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n7google/ads/admanager/v1/taxonomy_category_service.proto\x12\x17google.ads.admanager.v1\x1a\x38google/ads/admanager/v1/taxonomy_category_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"]\n\x1aGetTaxonomyCategoryRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)admanager.googleapis.com/TaxonomyCategory\"\xc9\x01\n\x1dListTaxonomyCategoriesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x95\x01\n\x1eListTaxonomyCategoriesResponse\x12\x46\n\x13taxonomy_categories\x18\x01 \x03(\x0b\x32).google.ads.admanager.v1.TaxonomyCategory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xb2\x03\n\x17TaxonomyCategoryService\x12\xb0\x01\n\x13GetTaxonomyCategory\x12\x33.google.ads.admanager.v1.GetTaxonomyCategoryRequest\x1a).google.ads.admanager.v1.TaxonomyCategory\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=networks/*/taxonomyCategories/*}\x12\xc6\x01\n\x16ListTaxonomyCategories\x12\x36.google.ads.admanager.v1.ListTaxonomyCategoriesRequest\x1a\x37.google.ads.admanager.v1.ListTaxonomyCategoriesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=networks/*}/taxonomyCategories\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xd0\x01\n\x1b\x63om.google.ads.admanager.v1B\x1cTaxonomyCategoryServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n7google/ads/admanager/v1/taxonomy_category_service.proto\x12\x17google.ads.admanager.v1\x1a\x38google/ads/admanager/v1/taxonomy_category_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"]\n\x1aGetTaxonomyCategoryRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)admanager.googleapis.com/TaxonomyCategory\"\xc9\x01\n\x1dListTaxonomyCategoriesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n admanager.googleapis.com/Network\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04skip\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\"\x95\x01\n\x1eListTaxonomyCategoriesResponse\x12\x46\n\x13taxonomy_categories\x18\x01 \x03(\x0b\x32).google.ads.admanager.v1.TaxonomyCategory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x32\xde\x03\n\x17TaxonomyCategoryService\x12\xb0\x01\n\x13GetTaxonomyCategory\x12\x33.google.ads.admanager.v1.GetTaxonomyCategoryRequest\x1a).google.ads.admanager.v1.TaxonomyCategory\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=networks/*/taxonomyCategories/*}\x12\xc6\x01\n\x16ListTaxonomyCategories\x12\x36.google.ads.admanager.v1.ListTaxonomyCategoriesRequest\x1a\x37.google.ads.admanager.v1.ListTaxonomyCategoriesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=networks/*}/taxonomyCategories\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xd0\x01\n\x1b\x63om.google.ads.admanager.v1B\x1cTaxonomyCategoryServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/team_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/team_messages_pb.rb index 12bdbe32c9a9..0664be2012cc 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/team_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/team_messages_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n+google/ads/admanager/v1/team_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x86\x01\n\x04Team\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07team_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03:U\xea\x41R\n\x1d\x61\x64manager.googleapis.com/Team\x12$networks/{network_code}/teams/{team}*\x05teams2\x04teamB\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11TeamMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n+google/ads/admanager/v1/team_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"p\n\x04Team\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:U\xea\x41R\n\x1d\x61\x64manager.googleapis.com/Team\x12$networks/{network_code}/teams/{team}*\x05teams2\x04teamB\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11TeamMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/user_messages_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/user_messages_pb.rb index a91228f8d0ca..e2fc0d9a6c01 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/user_messages_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/user_messages_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n+google/ads/admanager/v1/user_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdf\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07user_id\x18\n \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x04role\x18\x04 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/Role\x12\x13\n\x06\x61\x63tive\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65xternal_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12&\n\x19orders_ui_local_time_zone\x18\t \x01(\tB\x03\xe0\x41\x01:U\xea\x41R\n\x1d\x61\x64manager.googleapis.com/User\x12$networks/{network_code}/users/{user}*\x05users2\x04userB\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11UserMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n+google/ads/admanager/v1/user_messages.proto\x12\x17google.ads.admanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x84\x04\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x07user_id\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x17\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x38\n\x04role\x18\x04 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/RoleH\x03\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1d\n\x0b\x65xternal_id\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12!\n\x0fservice_account\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x06\x88\x01\x01\x12+\n\x19orders_ui_local_time_zone\x18\t \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01:U\xea\x41R\n\x1d\x61\x64manager.googleapis.com/User\x12$networks/{network_code}/users/{user}*\x05users2\x04userB\n\n\x08_user_idB\x0f\n\r_display_nameB\x08\n\x06_emailB\x07\n\x05_roleB\t\n\x07_activeB\x0e\n\x0c_external_idB\x12\n\x10_service_accountB\x1c\n\x1a_orders_ui_local_time_zoneB\xc5\x01\n\x1b\x63om.google.ads.admanager.v1B\x11UserMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/user_service_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/user_service_pb.rb index 87d97e5e04b5..210acfa31f1f 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/user_service_pb.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/user_service_pb.rb @@ -11,7 +11,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n*google/ads/admanager/v1/user_service.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/user_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"E\n\x0eGetUserRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User2\xab\x01\n\x0bUserService\x12\x7f\n\x07GetUser\x12\'.google.ads.admanager.v1.GetUserRequest\x1a\x1d.google.ads.admanager.v1.User\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=networks/*/users/*}\x1a\x1b\xca\x41\x18\x61\x64manager.googleapis.comB\xc4\x01\n\x1b\x63om.google.ads.admanager.v1B\x10UserServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" +descriptor_data = "\n*google/ads/admanager/v1/user_service.proto\x12\x17google.ads.admanager.v1\x1a+google/ads/admanager/v1/user_messages.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"E\n\x0eGetUserRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61\x64manager.googleapis.com/User2\xd7\x01\n\x0bUserService\x12\x7f\n\x07GetUser\x12\'.google.ads.admanager.v1.GetUserRequest\x1a\x1d.google.ads.admanager.v1.User\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=networks/*/users/*}\x1aG\xca\x41\x18\x61\x64manager.googleapis.com\xd2\x41)https://www.googleapis.com/auth/admanagerB\xc4\x01\n\x1b\x63om.google.ads.admanager.v1B\x10UserServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/video_position_enum_pb.rb b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/video_position_enum_pb.rb new file mode 100644 index 000000000000..fc4ba8ab5c50 --- /dev/null +++ b/google-ads-ad_manager-v1/lib/google/ads/admanager/v1/video_position_enum_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/admanager/v1/video_position_enum.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/admanager/v1/video_position_enum.proto\x12\x17google.ads.admanager.v1\"u\n\x11VideoPositionEnum\"`\n\rVideoPosition\x12\x1e\n\x1aVIDEO_POSITION_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x0b\n\x07MIDROLL\x10\x02\x12\x0c\n\x08POSTROLL\x10\x03\x12\x0b\n\x07PREROLL\x10\x04\x42\xca\x01\n\x1b\x63om.google.ads.admanager.v1B\x16VideoPositionEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xaa\x02\x17Google.Ads.AdManager.V1\xca\x02\x17Google\\Ads\\AdManager\\V1\xea\x02\x1aGoogle::Ads::AdManager::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Ads + module AdManager + module V1 + VideoPositionEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.VideoPositionEnum").msgclass + VideoPositionEnum::VideoPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.admanager.v1.VideoPositionEnum.VideoPosition").enummodule + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_break_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_break_messages.rb new file mode 100644 index 000000000000..72ffb4f07fdc --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_break_messages.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # The `AdBreak` resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `AdBreak`. + # This field uses the `LiveStreamEvent` resource's asset key in the + # URI, even if the ad break was created, updated, or queried using the custom + # asset key. + # + # Format: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break_id}` + # @!attribute [rw] ad_break_id + # @return [::String] + # Optional. Immutable. `AdBreak` ID. + # Must consist only of lowercase letters, digits, and hyphens. Ad break IDs + # have a maximum length of 63 characters. + # If not set, an ad break ID is generated as a UUID string. + # @!attribute [rw] asset_key + # @return [::String] + # Optional. Immutable. The asset key of the `LiveStreamEvent` that the ad + # break belongs to. Either an asset key or a custom asset key must be + # provided for creation. + # @!attribute [rw] custom_asset_key + # @return [::String] + # Optional. Immutable. The custom asset key of the `LiveStreamEvent` that the + # ad break belongs to. Either an asset key or a custom asset key must be + # provided for creation. + # @!attribute [rw] expected_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The expected start time of the ad break. + # When set, the scheduled ad break will be decisioned shortly before the + # expected start time. + # If this field is not set, ad decisioning begins immediately. + # An ad break can be created up to six hours before the expected start time. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Required. The duration of the `AdBreak`. + # An expected duration in seconds with up to nine fractional digits, ending + # with `s`, for example, `3.5s`. This value will be updated to match the + # actual duration from the manifest or pod request after the ad break's state + # is + # {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::COMPLETE `COMPLETE`}. + # @!attribute [r] break_state + # @return [::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState] + # Output only. The state of the `AdBreak`. + # @!attribute [r] break_sequence + # @return [::Integer] + # Output only. The sequence id of the `AdBreak`. + # The unique sequence number of the created ad break. This value is only set + # after the `AdBreak` starts decisioning indicated by the ad break state's + # being + # {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::DECISIONED `DECISIONED`} + # . + # @!attribute [rw] pod_template_name + # @return [::String] + # Optional. The pod template name of the `AdBreak`. + # This field is the required unique name across all pod templates in the + # network, not the display name. + # @!attribute [rw] custom_params + # @return [::String] + # Optional. The key-value pairs to be included on the ad requests for this + # `AdBreak`. Key-value pairs to include on ad requests for this break for + # custom criteria targeting in Google Ad Manager, separated by `=` and joined + # by + # `&`. + # + # Format:"key1=value&key2=value" + # @!attribute [rw] scte_35_cue_out + # @return [::String] + # Optional. The Base64-encoded SCTE-35 command associated with the `AdBreak`. + # This field can include the `splice_insert()` or `time_signal()` command. + # + # **Examples** + # + # * `time_signal()` + # ``` + # /DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg== + # ``` + # * `splice_insert()` + # ``` + # /DAvAAAAAAAA///wFAVIAACPf+/+c2nALv4AUsz1AAAAAAAKAAhDVUVJAAABNWLbowo= + # ``` + class AdBreak + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_break_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_break_service.rb new file mode 100644 index 000000000000..9c17bdea78f8 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_break_service.rb @@ -0,0 +1,150 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetAdBreak` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the AdBreak using the asset key or custom + # asset key. + # + # Format: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break_id}` + # `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}/adBreaks/{ad_break_id}` + class GetAdBreakRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListAdBreaks` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of AdBreaks. + # + # Formats: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}` + # `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `AdBreaks` to return. The service might + # return fewer than this value. If unspecified, at most 10 ad breaks are + # returned. The maximum value is `100`. Values above `100` are coerced to + # `100`. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAdBreaks` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAdBreaks` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListAdBreaksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListAdBreaksRequest` containing matching `AdBreak` + # objects. + # @!attribute [rw] ad_breaks + # @return [::Array<::Google::Ads::AdManager::V1::AdBreak>] + # The `AdBreak` objects from the specified network. + # @!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. This field expires + # after five minutes. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `AdBreak` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListAdBreaksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `CreateAdBreak` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this `AdBreak` will be created + # identified by an asset key or custom asset key. + # + # Formats: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}` + # `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}` + # @!attribute [rw] ad_break + # @return [::Google::Ads::AdManager::V1::AdBreak] + # Required. The `AdBreak` to create. + class CreateAdBreakRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `UpdateAdBreak` method. + # @!attribute [rw] ad_break + # @return [::Google::Ads::AdManager::V1::AdBreak] + # Required. The `AdBreak` to update. + # + # The `AdBreak`'s `name` is used to identify the `AdBreak` to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdateAdBreakRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `DeleteAdBreak` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the ad break to delete. + # + # Format: + # `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}` + class DeleteAdBreakRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_unit_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_unit_messages.rb index fb52239f076a..c046ce1f5aed 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_unit_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/ad_unit_messages.rb @@ -45,8 +45,8 @@ module V1 # characters. # @!attribute [rw] ad_unit_code # @return [::String] - # Immutable. A string used to uniquely identify the ad unit for the purposes - # of serving the ad. This attribute is optional and can be set during ad unit + # Optional. Immutable. A string used to uniquely identify the ad unit for the + # purposes of serving the ad. This attribute can be set during ad unit # creation. If it is not provided, it will be assigned by Google based on the # ad unit ID. # @!attribute [r] status @@ -91,6 +91,7 @@ module V1 # @return [::Array<::Google::Ads::AdManager::V1::AdUnitSize>] # Optional. The sizes that can be served inside this ad unit. # @!attribute [rw] external_set_top_box_channel_id + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Determines what set top box video on demand channel this ad unit # corresponds to in an external set top box ad campaign system. @@ -106,8 +107,8 @@ module V1 # @return [::Array<::Google::Ads::AdManager::V1::AppliedLabel>] # Output only. Contains the set of labels applied directly to the ad unit as # well as those inherited from the parent ad units. If a label has been - # negated, only the negated label is returned. This field is readonly and is - # assigned by Google. + # negated, only the negated label is returned. This attribute is assigned by + # Google. # @!attribute [rw] applied_label_frequency_caps # @return [::Array<::Google::Ads::AdManager::V1::LabelFrequencyCap>] # Optional. The set of label frequency caps applied directly to this ad unit. @@ -118,13 +119,13 @@ module V1 # well as those inherited from parent ad units. # @!attribute [rw] smart_size_mode # @return [::Google::Ads::AdManager::V1::SmartSizeModeEnum::SmartSizeMode] - # Optional. The smart size mode for this ad unit. This attribute is optional - # and defaults to SmartSizeMode.NONE for fixed sizes. + # Optional. Non-empty default. The smart size mode for this ad unit. This + # attribute defaults to SmartSizeMode.NONE for fixed sizes. # @!attribute [rw] applied_adsense_enabled # @return [::Boolean] - # Optional. The value of AdSense enabled directly applied to this ad unit. - # This attribute is optional and if not specified this ad unit will inherit - # the value of effectiveAdsenseEnabled from its ancestors. + # Optional. The value of AdSense enabled directly applied to this ad unit. If + # not specified this ad unit will inherit the value of + # effectiveAdsenseEnabled from its ancestors. # @!attribute [r] effective_adsense_enabled # @return [::Boolean] # Output only. Specifies whether or not the AdUnit is enabled for serving ads diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/bandwidth_group_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/bandwidth_group_messages.rb new file mode 100644 index 000000000000..a9b933f624ff --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/bandwidth_group_messages.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Represents a group of bandwidths that are logically organized by some well + # known generic name such as 'Cable' or 'DSL'. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `BandwidthGroup`. + # Format: `networks/{network_code}/bandwidthGroups/{bandwidth_group_id}` + # @!attribute [r] display_name + # @return [::String] + # Output only. The localized name of the bandwidth group. + class BandwidthGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/bandwidth_group_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/bandwidth_group_service.rb new file mode 100644 index 000000000000..e7da0db69a53 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/bandwidth_group_service.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetBandwidthGroup` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the BandwidthGroup. + # Format: `networks/{network_code}/bandwidthGroups/{bandwidth_group_id}` + class GetBandwidthGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListBandwidthGroups` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of BandwidthGroups. + # Format: `networks/{network_code}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `BandwidthGroups` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `BandwidthGroups` will be returned. The maximum value is 1000; values above + # 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListBandwidthGroups` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListBandwidthGroups` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListBandwidthGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListBandwidthGroupsRequest` containing matching + # `BandwidthGroup` objects. + # @!attribute [rw] bandwidth_groups + # @return [::Array<::Google::Ads::AdManager::V1::BandwidthGroup>] + # The `BandwidthGroup` objects from the specified network. + # @!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. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `BandwidthGroup` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListBandwidthGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_credit_status_enum.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_enums.rb similarity index 79% rename from google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_credit_status_enum.rb rename to google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_enums.rb index 9b6a359e62af..822bbe7f3560 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_credit_status_enum.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_enums.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,6 +21,35 @@ module Google module Ads module AdManager module V1 + # Wrapper message for + # {::Google::Ads::AdManager::V1::CompanyTypeEnum::CompanyType CompanyType} + class CompanyTypeEnum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of a company. + module CompanyType + # No value specified + COMPANY_TYPE_UNSPECIFIED = 0 + + # A business entity that purchases ad inventory. + ADVERTISER = 1 + + # A company representing the publisher's own advertiser for house ads. + HOUSE_ADVERTISER = 2 + + # An organization that manages ad accounts and offers services, such as ad + # creation, placement, and management to advertisers. + AGENCY = 3 + + # A company representing the publisher's own agency. + HOUSE_AGENCY = 4 + + # A company representing multiple advertisers and agencies. + AD_NETWORK = 5 + end + end + # Wrapper message for # {::Google::Ads::AdManager::V1::CompanyCreditStatusEnum::CompanyCreditStatus CompanyCreditStatus} class CompanyCreditStatusEnum diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_messages.rb index 9efddc967d02..b7bd30d4c9af 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_messages.rb @@ -84,13 +84,13 @@ module V1 # @return [::Array<::String>] # Optional. The resource names of Teams that are directly associated with the # `Company`. Format: "networks/\\{network_code}/teams/\\{team_id}" - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the `Company` was last modified. # @!attribute [rw] third_party_company_id # @return [::Integer] # Optional. The ID of the Google-recognized canonicalized form of the # `Company`. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the `Company` was last modified. class Company include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/contact_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/contact_messages.rb index c1413f6b81c2..70d1ce2fdf0f 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/contact_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/contact_messages.rb @@ -29,10 +29,9 @@ module V1 # @return [::String] # Identifier. The resource name of the `Contact`. # Format: `networks/{network_code}/contacts/{contact_id}` - # @!attribute [r] contact_id - # @return [::Integer] - # Output only. The unique ID of the contact. This value is readonly and is - # assigned by Google. + # @!attribute [r] company_display_name + # @return [::String] + # Output only. The display name of the Company. class Contact include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_field_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_field_messages.rb index 9e0e8a4be754..4c9221590209 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_field_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_field_messages.rb @@ -25,11 +25,11 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. The resource name of the `CustomField`. - # Format: `networks/{network_code}/customFields/{custom_field_id}` + # Format: `networks/{network_code}/customFields/{custom_field}` # @!attribute [r] custom_field_id # @return [::Integer] - # Output only. Unique ID of the CustomField. This value is readonly and is - # assigned by Google. + # Output only. Unique ID of the CustomField. This attribute is assigned by + # Google. # @!attribute [rw] display_name # @return [::String] # Required. Name of the CustomField. The max length is 127 characters. diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_field_value.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_field_value.rb index cb241df187e1..5a6d122a3602 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_field_value.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_field_value.rb @@ -34,7 +34,6 @@ class CustomFieldValue extend ::Google::Protobuf::MessageExts::ClassMethods # Represent custom field value type. - # Next Id: 5 # @!attribute [rw] dropdown_value # @return [::Integer] # The custom_field_option_id, if the CustomFieldDataType is DROPDOWN. diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_targeting_value_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_targeting_value_messages.rb index eea78254e7f7..cb09f84b0cc7 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_targeting_value_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_targeting_value_messages.rb @@ -26,7 +26,12 @@ module V1 # @return [::String] # Identifier. The resource name of the `CustomTargetingValue`. # Format: - # `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + # `networks/{network_code}/customTargetingValues/{custom_targeting_value_id}` + # @!attribute [rw] custom_targeting_key + # @return [::String] + # Required. Immutable. The resource name of the `CustomTargetingKey`. + # Format: + # `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` # @!attribute [rw] ad_tag_name # @return [::String] # Immutable. Name of the `CustomTargetingValue`. Values can contain up to 40 diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_targeting_value_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_targeting_value_service.rb index 9946446186cc..025edaf763ad 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_targeting_value_service.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/custom_targeting_value_service.rb @@ -26,7 +26,7 @@ module V1 # @return [::String] # Required. The resource name of the CustomTargetingValue. # Format: - # `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + # `networks/{network_code}/customTargetingValues/{custom_targeting_value_id}` class GetCustomTargetingValueRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -37,7 +37,7 @@ class GetCustomTargetingValueRequest # @return [::String] # Required. The parent, which owns this collection of CustomTargetingValues. # Format: - # `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + # `networks/{network_code}` # @!attribute [rw] page_size # @return [::Integer] # Optional. The maximum number of `CustomTargetingValues` to return. The diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/deal_buyer_permission_type_enum.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/deal_buyer_permission_type_enum.rb new file mode 100644 index 000000000000..35e5a1c52169 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/deal_buyer_permission_type_enum.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Wrapper message for + # {::Google::Ads::AdManager::V1::DealBuyerPermissionTypeEnum::DealBuyerPermissionType DealBuyerPermissionType}. + class DealBuyerPermissionTypeEnum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines how a deal would transact among all buyers under the same bidder. + module DealBuyerPermissionType + # No value specified. + DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED = 0 + + # The deal only transacts with the buyer specified. + NEGOTIATOR_ONLY = 1 + + # The deal transacts with all buyers under the same bidder. + BIDDER = 2 + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/device_category_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/device_category_messages.rb new file mode 100644 index 000000000000..32210733b602 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/device_category_messages.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Represents the category of a device. For example, "smartphone" or "desktop". + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `DeviceCategory`. + # Format: `networks/{network_code}/deviceCategories/{device_category}` + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the device category. + class DeviceCategory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/device_category_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/device_category_service.rb new file mode 100644 index 000000000000..c1a0fbb3582e --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/device_category_service.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetDeviceCategory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DeviceCategory. + # Format: `networks/{network_code}/deviceCategories/{device_category_id}` + class GetDeviceCategoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListDeviceCategories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of DeviceCategories. + # Format: `networks/{network_code}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `DeviceCategories` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `DeviceCategories` will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDeviceCategories` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeviceCategories` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListDeviceCategoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListDeviceCategoriesRequest` containing matching + # `DeviceCategory` objects. + # @!attribute [rw] device_categories + # @return [::Array<::Google::Ads::AdManager::V1::DeviceCategory>] + # The `DeviceCategory` objects from the specified network. + # @!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. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `DeviceCategory` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListDeviceCategoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/early_ad_break_notification_enums.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/early_ad_break_notification_enums.rb new file mode 100644 index 000000000000..a02103a5e2c3 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/early_ad_break_notification_enums.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Wrapper message for + # {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState AdBreakState} + class AdBreakStateEnum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the state of an ad break + module AdBreakState + # Default value. This value is unused. + AD_BREAK_STATE_UNSPECIFIED = 0 + + # The ad break's decisioning has finished. You can delete, but not update + # the ad break. + DECISIONED = 1 + + # The ad break has started serving to users. You cannot delete or update + # the ad break. + COMPLETE = 2 + + # The ad break is scheduled and decisioning will start later. You can + # delete or update the ad break. + SCHEDULED = 3 + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/entity_signals_mapping_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/entity_signals_mapping_messages.rb index 1ce0e5e12150..0d29517eaa62 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/entity_signals_mapping_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/entity_signals_mapping_messages.rb @@ -47,7 +47,7 @@ module V1 # Output only. `EntitySignalsMapping` ID. # @!attribute [rw] taxonomy_category_ids # @return [::Array<::Integer>] - # Required. The IDs of the categories that are associated with the + # Optional. The IDs of the categories that are associated with the # referencing entity. class EntitySignalsMapping include ::Google::Protobuf::MessageExts diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/geo_target_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/geo_target_messages.rb new file mode 100644 index 000000000000..f3096a6af8ca --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/geo_target_messages.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Represents a location in the world, for targeting. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `GeoTarget`. + # Format: `networks/{network_code}/geoTargets/{geo_target_id}` + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the GeoTarget. + # @!attribute [r] canonical_parent + # @return [::String] + # Output only. The name of the direct parent that defines the canonical name + # of the geo target. For example, if the current geo target is "San + # Francisco", its canonical name would be "San Francisco, California, United + # States" thus the canonical_parent would be the name of California and the + # canonical_parent of California would be the name of United states Format: + # `networks/{network_code}/geoTargets/{geo_target}` + # @!attribute [r] parent_names + # @return [::Array<::String>] + # Output only. All parents of the geo target ordered by ascending size. + # @!attribute [r] region_code + # @return [::String] + # Output only. The Unicode CLDR region code of the geo target. + # @!attribute [r] type + # @return [::String] + # Output only. The location type (unlocalized) for this geographical entity. + # @!attribute [r] targetable + # @return [::Boolean] + # Output only. Whether the geo target is targetable. + class GeoTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/geo_target_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/geo_target_service.rb new file mode 100644 index 000000000000..f6a706b8b287 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/geo_target_service.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetGeoTarget` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the GeoTarget. + # Format: `networks/{network_code}/geoTargets/{geo_target_id}` + class GetGeoTargetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListGeoTargets` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of GeoTargets. + # Format: `networks/{network_code}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `GeoTargets` to return. The service may + # return fewer than this value. If unspecified, at most 50 `GeoTargets` will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListGeoTargets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGeoTargets` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListGeoTargetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListGeoTargetsRequest` containing matching `GeoTarget` + # objects. + # @!attribute [rw] geo_targets + # @return [::Array<::Google::Ads::AdManager::V1::GeoTarget>] + # The `GeoTarget` objects from the specified network. + # @!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. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `GeoTarget` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListGeoTargetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/live_stream_event_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/live_stream_event_messages.rb new file mode 100644 index 000000000000..9d8d50ba0027 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/live_stream_event_messages.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # A `LiveStreamEvent` encapsulates all the information necessary to enable DAI + # (Dynamic Ad Insertion) into a live video stream. + # This includes information such as the start and expected end time of the + # `LiveStreamEvent`, the URL of the actual content for Ad Manager to pull and + # insert ads into, as well as the metadata necessary to generate ad requests + # during the live stream. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `LiveStreamEvent`. + # Format: `networks/{network_code}/liveStreamEvents/{live_stream_event_id}` + class LiveStreamEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/network_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/network_messages.rb index 7d8200d6f7e9..d52fed1c9970 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/network_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/network_messages.rb @@ -50,7 +50,7 @@ module V1 # @return [::String] # Output only. Top most [Ad Unit](google.ads.admanager.v1.AdUnit) to which # descendant Ad Units can be added. - # Format: networks/\\{network_code}/adUnit/\\{ad_unit_id} + # Format: networks/\\{network_code}/adUnits/\\{ad_unit} # @!attribute [r] test_network # @return [::Boolean] # Output only. Whether this is a test network. diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_messages.rb new file mode 100644 index 000000000000..7af5ed526493 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_messages.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Represents a device's operating system. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `OperatingSystem`. + # Format: `networks/{network_code}/operatingSystems/{operating_system_id}` + # @!attribute [r] display_name + # @return [::String] + # Output only. The name of the operating system. + class OperatingSystem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_service.rb new file mode 100644 index 000000000000..b40f9fde9208 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_service.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetOperatingSystem` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the OperatingSystem. + # Format: `networks/{network_code}/operatingSystems/{operating_system_id}` + class GetOperatingSystemRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListOperatingSystems` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of OperatingSystems. + # Format: `networks/{network_code}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `OperatingSystems` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `OperatingSystems` will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOperatingSystems` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOperatingSystems` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListOperatingSystemsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListOperatingSystemsRequest` containing matching + # `OperatingSystem` objects. + # @!attribute [rw] operating_systems + # @return [::Array<::Google::Ads::AdManager::V1::OperatingSystem>] + # The `OperatingSystem` objects from the specified network. + # @!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. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `OperatingSystem` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListOperatingSystemsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_version_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_version_messages.rb new file mode 100644 index 000000000000..39218a9569bb --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_version_messages.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Represents a specific version of an operating system. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `OperatingSystemVersion`. + # Format: + # `networks/{network_code}/operatingSystemVersions/{operating_system_version_id}` + # @!attribute [r] major_version + # @return [::Integer] + # Output only. The major version of the operating system. + # @!attribute [r] minor_version + # @return [::Integer] + # Output only. The minor version of the operating system. + # @!attribute [r] micro_version + # @return [::Integer] + # Output only. The micro version of the operating system. + class OperatingSystemVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_version_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_version_service.rb new file mode 100644 index 000000000000..91d47bd7c75c --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/operating_system_version_service.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetOperatingSystemVersion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the OperatingSystemVersion. + # Format: + # `networks/{network_code}/operatingSystemVersions/{operating_system_version_id}` + class GetOperatingSystemVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListOperatingSystemVersions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of + # OperatingSystemVersions. Format: `networks/{network_code}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `OperatingSystemVersions` to return. The + # service may return fewer than this value. If unspecified, at most 50 + # `OperatingSystemVersions` will be returned. The maximum value is 1000; + # values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListOperatingSystemVersions` call. Provide this to retrieve the subsequent + # page. + # + # When paginating, all other parameters provided to + # `ListOperatingSystemVersions` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListOperatingSystemVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListOperatingSystemVersionsRequest` containing matching + # `OperatingSystemVersion` objects. + # @!attribute [rw] operating_system_versions + # @return [::Array<::Google::Ads::AdManager::V1::OperatingSystemVersion>] + # The `OperatingSystemVersion` objects from the specified network. + # @!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. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `OperatingSystemVersion` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListOperatingSystemVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/placement_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/placement_messages.rb index 4cef4d826d6f..551d6a7d6767 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/placement_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/placement_messages.rb @@ -31,24 +31,23 @@ module V1 # Output only. `Placement` ID. # @!attribute [rw] display_name # @return [::String] - # Required. The display name of the placement. Its maximum length is 255 - # characters. + # Required. The display name of the placement. This attribute has a maximum + # length of 255 characters. # @!attribute [rw] description # @return [::String] - # Optional. A description of the Placement. This value is optional and its - # maximum length is 65,535 characters. + # Optional. A description of the Placement. This attribute has a maximum + # length of 65,535 characters. # @!attribute [r] placement_code # @return [::String] # Output only. A string used to uniquely identify the Placement for purposes - # of serving the ad. This attribute is read-only and is assigned by Google - # when a placement is created. + # of serving the ad. This attribute is assigned by Google. # @!attribute [r] status # @return [::Google::Ads::AdManager::V1::PlacementStatusEnum::PlacementStatus] - # Output only. The status of the Placement. This attribute is read-only. + # Output only. The status of the Placement. # @!attribute [rw] targeted_ad_units # @return [::Array<::String>] # Optional. The resource names of AdUnits that constitute the Placement. - # Format: "networks/\\{network_code}/adUnits/\\{ad_unit_id}" + # Format: "networks/\\{network_code}/adUnits/\\{ad_unit}" # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The instant this Placement was last modified. diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_deal_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_deal_messages.rb new file mode 100644 index 000000000000..566fdd167947 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_deal_messages.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # The `PrivateAuctionDeal` resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `PrivateAuctionDeal`. + # Format: + # `networks/{network_code}/privateAuctionDeals/{private_auction_deal_id}` + # @!attribute [r] private_auction_deal_id + # @return [::Integer] + # Output only. `PrivateAuctionDeal` ID. + # @!attribute [rw] private_auction_id + # @return [::Integer] + # Immutable. The ID of the + # [PrivateAuction](google.ads.admanager.v1.PrivateAuction). + # @!attribute [r] private_auction_display_name + # @return [::String] + # Output only. The display name of the + # [PrivateAuction](google.ads.admanager.v1.PrivateAuction). + # @!attribute [rw] buyer_account_id + # @return [::Integer] + # Immutable. The account ID of the buyer of the `PrivateAuctionDeal`. + # @!attribute [r] external_deal_id + # @return [::Integer] + # Output only. The external ID of the `PrivateAuctionDeal`. + # @!attribute [rw] targeting + # @return [::Google::Ads::AdManager::V1::Targeting] + # Optional. The targeting of the `PrivateAuctionDeal`. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The end time of the `PrivateAuctionDeal`. + # @!attribute [rw] floor_price + # @return [::Google::Type::Money] + # Required. The floor price of the `PrivateAuctionDeal`. + # @!attribute [rw] creative_sizes + # @return [::Array<::Google::Ads::AdManager::V1::Size>] + # Optional. The expected creative sizes of the `PrivateAuctionDeal`. + # @!attribute [r] status + # @return [::Google::Ads::AdManager::V1::PrivateMarketplaceDealStatusEnum::PrivateMarketplaceDealStatus] + # Output only. The status of the `PrivateAuctionDeal`. + # @!attribute [rw] auction_priority_enabled + # @return [::Boolean] + # Optional. Whether the deal is enabled with priority over open auction. + # @!attribute [rw] block_override_enabled + # @return [::Boolean] + # Optional. Whether the deal has block override enabled. + # @!attribute [rw] buyer_permission_type + # @return [::Google::Ads::AdManager::V1::DealBuyerPermissionTypeEnum::DealBuyerPermissionType] + # Optional. The buyer permission model defining how the deal would transact + # among all buyers under the same bidder. + # @!attribute [rw] buyer_data + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal::BuyerData] + # Optional. The buyer data required by the Marketplace API. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instant at which the `PrivateAuctionDeal` was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instant at which the `PrivateAuctionDeal` was last + # updated. + class PrivateAuctionDeal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains buyer data. This data is required by the Marketplace API. + # @!attribute [rw] buyer_emails + # @return [::Array<::String>] + # Optional. The email contacts of the buyer of the `PrivateAuctionDeal`. + class BuyerData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_deal_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_deal_service.rb new file mode 100644 index 000000000000..a60b82894b61 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_deal_service.rb @@ -0,0 +1,130 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetPrivateAuctionDeal` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the PrivateAuctionDeal. + # Format: + # `networks/{network_code}/privateAuctionDeals/{private_auction_deal_id}` + class GetPrivateAuctionDealRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListPrivateAuctionDeals` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of PrivateAuctionDeals. + # Format: + # `networks/{network_code}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `PrivateAuctionDeals` to return. The + # service may return fewer than this value. If unspecified, at most 50 + # `PrivateAuctionDeals` will be returned. The maximum value is 1000; + # values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListPrivateAuctionDeals` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrivateAuctionDeals` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListPrivateAuctionDealsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListPrivateAuctionDealsRequest` containing matching + # `PrivateAuctionDeal` objects. + # @!attribute [rw] private_auction_deals + # @return [::Array<::Google::Ads::AdManager::V1::PrivateAuctionDeal>] + # The `PrivateAuctionDeal` objects from the specified network. + # @!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. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `PrivateAuctionDeal` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListPrivateAuctionDealsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `CreatePrivateAuctionDeal` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this `PrivateAuctionDeal` will be + # created. Format: `networks/{network_code}` + # @!attribute [rw] private_auction_deal + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # Required. The `PrivateAuctionDeal` to create. + class CreatePrivateAuctionDealRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `UpdatePrivateAuctionDeal` method. + # @!attribute [rw] private_auction_deal + # @return [::Google::Ads::AdManager::V1::PrivateAuctionDeal] + # Required. The `PrivateAuctionDeal` to update. + # + # The `PrivateAuctionDeal`'s `name` is used to identify the + # `PrivateAuctionDeal` to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdatePrivateAuctionDealRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_messages.rb new file mode 100644 index 000000000000..28e86e6d26ec --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_messages.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # The `PrivateAuction` resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `PrivateAuction`. + # Format: + # `networks/{network_code}/privateAuctions/{private_auction_id}` + # @!attribute [r] private_auction_id + # @return [::Integer] + # Output only. `PrivateAuction` ID. + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the `PrivateAuction`. This attribute has a + # maximum length of 255 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the `PrivateAuction`. This attribute has a + # maximum length of 4096 bytes. + # @!attribute [rw] seller_contact_users + # @return [::Array<::String>] + # Optional. The resource names of the seller contact users associated with + # this `PrivateAuction`. Format: `networks/{network_code}/users/{user_id}` + # @!attribute [r] archived + # @return [::Boolean] + # Output only. Whether the `PrivateAuction` is archived. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instant at which the PrivateAuction was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instant at which the PrivateAuction was last updated. + class PrivateAuction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_service.rb new file mode 100644 index 000000000000..4178cf446989 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_auction_service.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetPrivateAuction` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the PrivateAuction. + # Format: + # `networks/{network_code}/privateAuctions/{private_auction_id}` + class GetPrivateAuctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListPrivateAuctions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of PrivateAuctions. + # Format: `networks/{network_code}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `PrivateAuctions` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `PrivateAuctions` will be returned. The maximum value is 1000; + # values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListPrivateAuctions` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrivateAuctions` must match the call that provided the + # page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListPrivateAuctionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListPrivateAuctionsRequest` containing + # matching `PrivateAuction` objects. + # @!attribute [rw] private_auctions + # @return [::Array<::Google::Ads::AdManager::V1::PrivateAuction>] + # The `PrivateAuction` objects from the specified network. + # @!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. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `PrivateAuction` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListPrivateAuctionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `CreatePrivateAuction` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this `PrivateAuction` will be + # created. Format: `networks/{network_code}` + # @!attribute [rw] private_auction + # @return [::Google::Ads::AdManager::V1::PrivateAuction] + # Required. The `PrivateAuction` to create. + class CreatePrivateAuctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `UpdatePrivateAuction` method. + # @!attribute [rw] private_auction + # @return [::Google::Ads::AdManager::V1::PrivateAuction] + # Required. The `PrivateAuction` to update. + # + # The `PrivateAuction`'s `name` is used to identify the + # `PrivateAuction` to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdatePrivateAuctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_type_enum.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_marketplace_enums.rb similarity index 51% rename from google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_type_enum.rb rename to google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_marketplace_enums.rb index 2a3d4399738c..15b3955324ca 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/company_type_enum.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/private_marketplace_enums.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,31 +22,30 @@ module Ads module AdManager module V1 # Wrapper message for - # {::Google::Ads::AdManager::V1::CompanyTypeEnum::CompanyType CompanyType} - class CompanyTypeEnum + # {::Google::Ads::AdManager::V1::PrivateMarketplaceDealStatusEnum::PrivateMarketplaceDealStatus PrivateMarketplaceDealStatus}. + class PrivateMarketplaceDealStatusEnum include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # The type of a company. - module CompanyType - # No value specified - COMPANY_TYPE_UNSPECIFIED = 0 + # Describes the status of a private marketplace deal. + module PrivateMarketplaceDealStatus + # No value specified. + PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED = 0 - # A business entity that purchases ad inventory. - ADVERTISER = 1 + # The deal is pending. + PENDING = 1 - # A company representing the publisher's own advertiser for house ads. - HOUSE_ADVERTISER = 2 + # The deal is active. + ACTIVE = 2 - # An organization that manages ad accounts and offers services, such as ad - # creation, placement, and management to advertisers. - AGENCY = 3 + # The deal is canceled. + CANCELED = 3 - # A company representing the publisher's own agency. - HOUSE_AGENCY = 4 + # The deal is paused by the seller. + SELLER_PAUSED = 4 - # A company representing multiple advertisers and agencies. - AD_NETWORK = 5 + # The deal is paused by the buyer. + BUYER_PAUSED = 5 end end end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/programmatic_buyer_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/programmatic_buyer_messages.rb new file mode 100644 index 000000000000..f49d430a794b --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/programmatic_buyer_messages.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Represents a programmatic buyer. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the `ProgrammaticBuyer`. + # Format: + # `networks/{network_code}/programmaticBuyers/{buyer_account_id}` + # @!attribute [r] buyer_account_id + # @return [::Integer] + # Output only. The buyer account ID of the buyer. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the buyer. + # @!attribute [r] parent_account_id + # @return [::Integer] + # Output only. The ID of the programmatic buyer's sponsor. If the buyer has + # no sponsor, this field will be -1. + # @!attribute [r] partner_client_id + # @return [::String] + # Output only. ID of the Display & Video 360 client buyer partner ID (if + # Display & Video 360) or Authorized Buyers client buyer account ID. + # @!attribute [r] agency + # @return [::Boolean] + # Output only. Whether the buyer is an advertising agency. + # @!attribute [r] preferred_deals_enabled + # @return [::Boolean] + # Output only. Whether the buyer is enabled for preferred deals. + # @!attribute [r] programmatic_guaranteed_enabled + # @return [::Boolean] + # Output only. Whether the buyer is enabled for programmatic guaranteed + # deals. + class ProgrammaticBuyer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/programmatic_buyer_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/programmatic_buyer_service.rb new file mode 100644 index 000000000000..35263025ec4c --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/programmatic_buyer_service.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Request object for `GetProgrammaticBuyer` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ProgrammaticBuyer. + # Format: + # `networks/{network_code}/programmaticBuyers/{buyer_account_id}` + class GetProgrammaticBuyerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListProgrammaticBuyers` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of ProgrammaticBuyers. + # Format: `networks/{network_code}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `ProgrammaticBuyers` to return. The service + # may return fewer than this value. If unspecified, at most 50 + # `ProgrammaticBuyers` will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListProgrammaticBuyers` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProgrammaticBuyers` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression to filter the response. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters + # @!attribute [rw] order_by + # @return [::String] + # Optional. Expression to specify sorting order. + # See syntax details at + # https://developers.google.com/ad-manager/api/beta/filters#order + # @!attribute [rw] skip + # @return [::Integer] + # Optional. Number of individual resources to skip while paginating. + class ListProgrammaticBuyersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListProgrammaticBuyersRequest` containing matching + # `ProgrammaticBuyer` objects. + # @!attribute [rw] programmatic_buyers + # @return [::Array<::Google::Ads::AdManager::V1::ProgrammaticBuyer>] + # The `ProgrammaticBuyer` objects from the specified network. + # @!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. + # @!attribute [rw] total_size + # @return [::Integer] + # Total number of `ProgrammaticBuyer` objects. + # If a filter was included in the request, this reflects the total number + # after the filtering is applied. + # + # `total_size` will not be calculated in the response unless it has been + # included in a response field mask. The response field mask can be provided + # to the method by using the URL parameter `$fields` or `fields`, or by using + # the HTTP/gRPC header `X-Goog-FieldMask`. + # + # For more information, see + # https://developers.google.com/ad-manager/api/beta/field-masks + class ListProgrammaticBuyersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/report_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/report_messages.rb new file mode 100644 index 000000000000..2a4bd35c13b2 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/report_messages.rb @@ -0,0 +1,3587 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # The `Report` resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the report. + # Report resource name have the form: + # `networks/{network_code}/reports/{report_id}` + # @!attribute [r] report_id + # @return [::Integer] + # Output only. Report ID. + # @!attribute [rw] visibility + # @return [::Google::Ads::AdManager::V1::Report::Visibility] + # Optional. The visibility of a report. + # @!attribute [rw] report_definition + # @return [::Google::Ads::AdManager::V1::ReportDefinition] + # Required. The report definition of the report. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name for the report. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instant this report was last modified. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instant this report was created. + # @!attribute [r] locale + # @return [::String] + # Output only. The locale of this report. Locale is set from the user's + # locale at the time of the request. Locale can not be modified. + # @!attribute [rw] schedule_options + # @return [::Google::Ads::AdManager::V1::ScheduleOptions] + # Optional. The schedule options of this report. + class Report + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a single value in a report. + # @!attribute [rw] int_value + # @return [::Integer] + # For integer values. + # + # Note: The following fields are mutually exclusive: `int_value`, `double_value`, `string_value`, `bool_value`, `int_list_value`, `string_list_value`, `bytes_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] + # For double values. + # + # Note: The following fields are mutually exclusive: `double_value`, `int_value`, `string_value`, `bool_value`, `int_list_value`, `string_list_value`, `bytes_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] + # For string values. + # + # Note: The following fields are mutually exclusive: `string_value`, `int_value`, `double_value`, `bool_value`, `int_list_value`, `string_list_value`, `bytes_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # For boolean values. + # + # Note: The following fields are mutually exclusive: `bool_value`, `int_value`, `double_value`, `string_value`, `int_list_value`, `string_list_value`, `bytes_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int_list_value + # @return [::Google::Ads::AdManager::V1::Report::Value::IntList] + # For lists of integer values. + # + # Note: The following fields are mutually exclusive: `int_list_value`, `int_value`, `double_value`, `string_value`, `bool_value`, `string_list_value`, `bytes_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_list_value + # @return [::Google::Ads::AdManager::V1::Report::Value::StringList] + # For lists of string values. + # + # Note: The following fields are mutually exclusive: `string_list_value`, `int_value`, `double_value`, `string_value`, `bool_value`, `int_list_value`, `bytes_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bytes_value + # @return [::String] + # For bytes values. + # + # Note: The following fields are mutually exclusive: `bytes_value`, `int_value`, `double_value`, `string_value`, `bool_value`, `int_list_value`, `string_list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of integer values. + # @!attribute [rw] values + # @return [::Array<::Integer>] + # The values + class IntList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of string values. + # @!attribute [rw] values + # @return [::Array<::String>] + # The values + class StringList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents a sorting in a report. + # @!attribute [rw] field + # @return [::Google::Ads::AdManager::V1::Report::Field] + # Required. A field (dimension or metric) to sort by. + # @!attribute [rw] descending + # @return [::Boolean] + # Optional. The sort order. If true the sort will be descending. + # @!attribute [rw] slice + # @return [::Google::Ads::AdManager::V1::Report::Slice] + # Optional. Use to sort on a specific slice of data. + # @!attribute [rw] time_period_index + # @return [::Integer] + # Optional. When using time period columns, use this to sort on a specific + # column. + # @!attribute [rw] metric_value_type + # @return [::Google::Ads::AdManager::V1::Report::MetricValueType] + # Optional. Use to specify which metric value type to sort on. Defaults to + # PRIMARY. + class Sort + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A table containing report data including dimension and metric values. + class DataTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A row of report data. + # @!attribute [rw] dimension_values + # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] + # The order of the dimension values is the same as the order of the + # dimensions specified in the request. + # @!attribute [rw] metric_value_groups + # @return [::Array<::Google::Ads::AdManager::V1::Report::DataTable::MetricValueGroup>] + # The length of the metric_value_groups + # field will be equal to the length of the date_ranges field in the + # fetch response. The metric_value_groups field is + # ordered such that each index corresponds to the date_range at the same + # index. For example, given date_ranges [x, y], metric_value_groups will + # have a length of two. The first entry in metric_value_groups represents + # the metrics for date x and the second entry in metric_value_groups + # represents the metrics for date y. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains all metric values requested for a single date range and set of + # column dimension values (returned in the columns field of the response). + # The order of the metrics in each field corresponds to the order of the + # metrics specified in the request. + # @!attribute [rw] primary_values + # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] + # Data for the PRIMARY MetricValueType. + # @!attribute [rw] primary_percent_of_total_values + # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] + # Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + # @!attribute [rw] comparison_values + # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] + # Data for the COMPARISON MetricValueType. + # @!attribute [rw] comparison_percent_of_total_values + # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] + # Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + # @!attribute [rw] absolute_change_values + # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] + # Data for the ABSOLUTE_CHANGE MetricValueType. + # @!attribute [rw] relative_change_values + # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] + # Data for the RELATIVE_CHANGE MetricValueType. + # @!attribute [rw] flag_values + # @return [::Array<::Boolean>] + # If true, the flag's conditions are met. If false, the flag's + # conditions are not met. flag_values has the same length as + # flags and index i of flag_values represents the flag at index i + # of flags. + class MetricValueGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A dimension or a metric in a report. + # @!attribute [rw] dimension + # @return [::Google::Ads::AdManager::V1::Report::Dimension] + # The dimension this field represents. + # + # Note: The following fields are mutually exclusive: `dimension`, `metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] metric + # @return [::Google::Ads::AdManager::V1::Report::Metric] + # The metric this field represents. + # + # Note: The following fields are mutually exclusive: `metric`, `dimension`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Use to specify a slice of data. + # + # For example, in a report, to focus on just data from the US, specify + # `COUNTRY_NAME` for dimension and value: `"United States"`. + # @!attribute [rw] dimension + # @return [::Google::Ads::AdManager::V1::Report::Dimension] + # Required. The dimension to slice on. + # @!attribute [rw] value + # @return [::Google::Ads::AdManager::V1::Report::Value] + # Required. The value of the dimension. + class Slice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A filter over one or more fields. + # @!attribute [rw] field_filter + # @return [::Google::Ads::AdManager::V1::Report::Filter::FieldFilter] + # A filter on a single field. + # + # Note: The following fields are mutually exclusive: `field_filter`, `not_filter`, `and_filter`, `or_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] not_filter + # @return [::Google::Ads::AdManager::V1::Report::Filter] + # A filter whose result is negated. + # + # Note: The following fields are mutually exclusive: `not_filter`, `field_filter`, `and_filter`, `or_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] and_filter + # @return [::Google::Ads::AdManager::V1::Report::Filter::FilterList] + # A list of filters whose results are AND-ed. + # + # Note: The following fields are mutually exclusive: `and_filter`, `field_filter`, `not_filter`, `or_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] or_filter + # @return [::Google::Ads::AdManager::V1::Report::Filter::FilterList] + # A list of filters whose results are OR-ed. + # + # Note: The following fields are mutually exclusive: `or_filter`, `field_filter`, `not_filter`, `and_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Filter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A filter on a specific field. + # @!attribute [rw] field + # @return [::Google::Ads::AdManager::V1::Report::Field] + # Required. The field to filter on. + # @!attribute [rw] operation + # @return [::Google::Ads::AdManager::V1::Report::Filter::Operation] + # Required. The operation of this filter. + # @!attribute [rw] values + # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] + # Required. Values to filter to. + # @!attribute [rw] slice + # @return [::Google::Ads::AdManager::V1::Report::Slice] + # Optional. Use to filter on a specific slice of data. + # @!attribute [rw] time_period_index + # @return [::Integer] + # Optional. When using time period columns, use this to filter on a + # specific column. + # @!attribute [rw] metric_value_type + # @return [::Google::Ads::AdManager::V1::Report::MetricValueType] + # Optional. Use to specify which metric value type to filter on. Defaults + # to PRIMARY. + class FieldFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of filters. + # @!attribute [rw] filters + # @return [::Array<::Google::Ads::AdManager::V1::Report::Filter>] + # Required. A list of filters. + class FilterList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Supported filter operations. + module Operation + # For scalar operands, checks if the operand is in the set of provided + # filter values. + # + # For list operands, checks if any element in the operand is in the set + # of provided filter values. + # + # Default value. + IN = 0 + + # For scalar operands, checks that the operand is not in the set of + # provided filter values. + # + # For list operands, checks that none of the elements in the operand + # is in the set of provided filter values. + NOT_IN = 1 + + # For scalar string operands, checks if the operand contains any of the + # provided filter substrings. + # + # For string list operands, checks if any string in the operand contains + # any of the provided filter substrings. + CONTAINS = 2 + + # For scalar string operands, checks that the operand contains none of + # the provided filter substrings. + # + # For string list operands, checks that none of the strings in the + # operand contain none of the provided filter substrings. + NOT_CONTAINS = 3 + + # Operand is less than the provided filter value. + LESS_THAN = 4 + + # Operand is less than or equal to provided filter value. + LESS_THAN_EQUALS = 5 + + # Operand is greater than provided filter value. + GREATER_THAN = 6 + + # Operand is greater than or equal to provided filter value. + GREATER_THAN_EQUALS = 7 + + # Operand is between provided filter values. + BETWEEN = 8 + + # Operand matches against a regex or set of regexes (one must match) + MATCHES = 9 + + # Operand negative matches against a regex or set of regexes (none must + # match) + NOT_MATCHES = 10 + end + end + + # A flag for a report. Flags are used show if certain thresholds are met. + # Result rows that match the filter will have the corresponding + # [MetricValueGroup.flagValues][MetricValueGroup] index set to true. + # For more information about flags see: + # https://support.google.com/admanager/answer/15079975 + # @!attribute [rw] filters + # @return [::Array<::Google::Ads::AdManager::V1::Report::Filter>] + # Required. Filters to apply for the flag. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the flag. + # The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + # the colored flags that appear in the UI. The UI will not display flags + # with other names, but they are available for use by API clients. + class Flag + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A date range for a report. + # @!attribute [rw] fixed + # @return [::Google::Ads::AdManager::V1::Report::DateRange::FixedDateRange] + # A fixed date range. + # + # Note: The following fields are mutually exclusive: `fixed`, `relative`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] relative + # @return [::Google::Ads::AdManager::V1::Report::DateRange::RelativeDateRange] + # A relative date range. + # + # Note: The following fields are mutually exclusive: `relative`, `fixed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A date range between two fixed dates (inclusive of end date). + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Required. The start date of this date range. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Required. The end date (inclusive) of this date range. + class FixedDateRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for relative date ranges. + module RelativeDateRange + # Default value. This value is unused. + RELATIVE_DATE_RANGE_UNSPECIFIED = 0 + + # The date the report is run. + TODAY = 1 + + # The date a day before the date that the report is run. + YESTERDAY = 2 + + # The full week in which this report is run. Could include dates in + # the future. + THIS_WEEK = 3 + + # From the beginning of the calendar week (Monday to Sunday) in which the + # up to and including the day the report is run. + THIS_WEEK_TO_DATE = 29 + + # The full month in which this report is run. Could include dates in + # the future. + THIS_MONTH = 4 + + # From the beginning of the calendar month in which the report is run, to + # up to and including the day the report is run. + THIS_MONTH_TO_DATE = 26 + + # The full quarter in which this report is run. Could include dates + # in the future. + THIS_QUARTER = 5 + + # From the beginning of the calendar quarter in which the report is run, + # up to and including the day the report is run. + THIS_QUARTER_TO_DATE = 27 + + # The full year in which this report is run. Could include dates in + # the future. + THIS_YEAR = 6 + + # From the beginning of the calendar year in which the report is run, to + # up to and including the day the report is run. + THIS_YEAR_TO_DATE = 28 + + # The entire previous calendar week, Monday to Sunday (inclusive), + # preceding the calendar week the report is run. + LAST_WEEK = 7 + + # The entire previous calendar month preceding the calendar month the + # report is run. + LAST_MONTH = 8 + + # The entire previous calendar quarter preceding the calendar quarter the + # report is run. + LAST_QUARTER = 9 + + # The entire previous calendar year preceding the calendar year the + # report is run. + LAST_YEAR = 10 + + # The 7 days preceding the day the report is run. + LAST_7_DAYS = 11 + + # The 30 days preceding the day the report is run. + LAST_30_DAYS = 12 + + # The 60 days preceding the day the report is run. + LAST_60_DAYS = 13 + + # The 90 days preceding the day the report is run. + LAST_90_DAYS = 14 + + # The 180 days preceding the day the report is run. + LAST_180_DAYS = 15 + + # The 360 days preceding the day the report is run. + LAST_360_DAYS = 16 + + # The 365 days preceding the day the report is run. + LAST_365_DAYS = 17 + + # The entire previous 3 calendar months preceding the calendar month the + # report is run. + LAST_3_MONTHS = 18 + + # The entire previous 6 calendar months preceding the calendar month the + # report is run. + LAST_6_MONTHS = 19 + + # The entire previous 6 calendar months preceding the calendar month the + # report is run. + LAST_12_MONTHS = 20 + + # From 3 years before the report is run, to the day before the report is + # run, inclusive. + ALL_AVAILABLE = 21 + + # Only valid when used in the comparison_date_range field. The complete + # period preceding the date period provided in date_range. + # + # In the case where date_range is a FixedDateRange of N days, this will + # be a period of N days where the end date is the date preceding the + # start date of the date_range. + # + # In the case where date_range is a RelativeDateRange, this will be a + # period of the same time frame preceding the date_range. In the case + # where the date_range does not capture the full period because a report + # is run in the middle of that period, this will still be the full + # preceding period. For example, if date_range is THIS_WEEK, but the + # report is run on a Wednesday, THIS_WEEK will be Monday - Wednesday, but + # PREVIOUS_PERIOD will be Monday - Sunday. + PREVIOUS_PERIOD = 22 + + # Only valid when used in the comparison_date_range field. The period + # starting 1 year prior to the date period provided in date_range. + # + # In the case where date_range is a FixedDateRange, this will be a date + # range starting 1 year prior to the date_range start date and ending 1 + # year prior to the date_range end date. + # + # In the case where date_range is a RelativeDateRange, this will be a + # period of the same time frame exactly 1 year prior to the date_range. + # In the case where the date_range does not capture the full period + # because a report is run in the middle of that period, this will still + # be the full period 1 year prior. For example, if date range is + # THIS_WEEK, but the report is run on a Wednesday, THIS_WEEK will be + # Monday - Wednesday, but SAME_PERIOD_PREVIOUS_YEAR will be Monday - + # Sunday. + SAME_PERIOD_PREVIOUS_YEAR = 24 + end + end + + # Valid time period columns. + module TimePeriodColumn + # Default value. Report will have no time period column. + TIME_PERIOD_COLUMN_UNSPECIFIED = 0 + + # A column for each date in the report. + TIME_PERIOD_COLUMN_DATE = 1 + + # A column for each week in the report. + TIME_PERIOD_COLUMN_WEEK = 2 + + # A column for each month in the report. + TIME_PERIOD_COLUMN_MONTH = 3 + + # A column for each quarter in the report. + TIME_PERIOD_COLUMN_QUARTER = 4 + end + + # Reporting dimensions. + module Dimension + # Default value. This value is unused. + DIMENSION_UNSPECIFIED = 0 + + # The domain name of the advertiser. + ADVERTISER_DOMAIN_NAME = 242 + + # The ID used in an external system for advertiser identification + ADVERTISER_EXTERNAL_ID = 228 + + # The ID of an advertiser company assigned to an order + ADVERTISER_ID = 131 + + # Labels applied to the advertiser + # can be used for either competitive exclusion or ad exclusion + ADVERTISER_LABELS = 230 + + # Label ids applied to the advertiser + # can be used for either competitive exclusion or ad exclusion + ADVERTISER_LABEL_IDS = 229 + + # The name of an advertiser company assigned to an order + ADVERTISER_NAME = 132 + + # The name of the contact associated with an advertiser company + ADVERTISER_PRIMARY_CONTACT = 227 + + # Shows an ENUM value describing whether a given piece of publisher + # inventory was above (ATF) or below the fold (BTF) of a page. + AD_LOCATION = 390 + + # Shows a localized string describing whether a given piece of publisher + # inventory was above (ATF) or below the fold (BTF) of a page. + AD_LOCATION_NAME = 391 + + # The code of the ad unit where the ad was requested. + AD_UNIT_CODE = 64 + + # The code of the first level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_1 = 65 + + # The code of the tenth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_10 = 74 + + # The code of the eleventh level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_11 = 75 + + # The code of the twelfth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_12 = 76 + + # The code of the thirteenth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_13 = 77 + + # The code of the fourteenth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_14 = 78 + + # The code of the fifteenth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_15 = 79 + + # The code of the sixteenth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_16 = 80 + + # The code of the second level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_2 = 66 + + # The code of the third level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_3 = 67 + + # The code of the fourth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_4 = 68 + + # The code of the fifth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_5 = 69 + + # The code of the sixth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_6 = 70 + + # The code of the seventh level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_7 = 71 + + # The code of the eighth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_8 = 72 + + # The code of the ninth level ad unit of the ad unit where the ad was + # requested. + AD_UNIT_CODE_LEVEL_9 = 73 + + # The depth of the ad unit's hierarchy + AD_UNIT_DEPTH = 101 + + # The ID of the ad unit where the ad was requested. + AD_UNIT_ID = 25 + + # The full hierarchy of ad unit IDs where the ad was requested, from + # root to leaf, excluding the root ad unit ID. + AD_UNIT_ID_ALL_LEVEL = 27 + + # The first level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_1 = 30 + + # The tenth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_10 = 48 + + # The eleventh level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_11 = 50 + + # The twelfth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_12 = 52 + + # The thirteenth level ad unit ID of the ad unit where the ad was + # requested. + AD_UNIT_ID_LEVEL_13 = 54 + + # The fourteenth level ad unit ID of the ad unit where the ad was + # requested. + AD_UNIT_ID_LEVEL_14 = 56 + + # The fifteenth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_15 = 58 + + # The sixteenth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_16 = 60 + + # The second level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_2 = 32 + + # The third level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_3 = 34 + + # The fourth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_4 = 36 + + # The fifth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_5 = 38 + + # The sixth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_6 = 40 + + # The seventh level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_7 = 42 + + # The eighth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_8 = 44 + + # The ninth level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_LEVEL_9 = 46 + + # The top-level ad unit ID of the ad unit where the ad was requested. + AD_UNIT_ID_TOP_LEVEL = 142 + + # The name of the ad unit where the ad was requested. + AD_UNIT_NAME = 26 + + # The full hierarchy of ad unit names where the ad was requested, from + # root to leaf, excluding the root ad unit name. + AD_UNIT_NAME_ALL_LEVEL = 29 + + # The first level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_1 = 31 + + # The tenth level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_10 = 49 + + # The eleventh level ad unit name of the ad unit where the ad was + # requested. + AD_UNIT_NAME_LEVEL_11 = 51 + + # The twelfth level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_12 = 53 + + # The thirteenth level ad unit name of the ad unit where the ad was + # requested. + AD_UNIT_NAME_LEVEL_13 = 55 + + # The fourteenth level ad unit name of the ad unit where the ad was + # requested. + AD_UNIT_NAME_LEVEL_14 = 57 + + # The fifteenth level ad unit name of the ad unit where the ad was + # requested. + AD_UNIT_NAME_LEVEL_15 = 59 + + # The sixteenth level ad unit name of the ad unit where the ad was + # requested. + AD_UNIT_NAME_LEVEL_16 = 61 + + # The second level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_2 = 33 + + # The third level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_3 = 35 + + # The fourth level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_4 = 37 + + # The fifth level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_5 = 39 + + # The sixth level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_6 = 41 + + # The seventh level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_7 = 43 + + # The eighth level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_8 = 45 + + # The ninth level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_LEVEL_9 = 47 + + # The top-level ad unit name of the ad unit where the ad was requested. + AD_UNIT_NAME_TOP_LEVEL = 143 + + # The reward amount of the ad unit where the ad was requested. + AD_UNIT_REWARD_AMOUNT = 63 + + # The reward type of the ad unit where the ad was requested. + AD_UNIT_REWARD_TYPE = 62 + + # The status of the ad unit + AD_UNIT_STATUS = 206 + + # The name of the status of the ad unit + AD_UNIT_STATUS_NAME = 207 + + # The app version. + APP_VERSION = 392 + + # The ID used in an external system for advertiser identification + BACKFILL_ADVERTISER_EXTERNAL_ID = 349 + + # The ID of an advertiser company assigned to a backfill order + BACKFILL_ADVERTISER_ID = 346 + + # Labels applied to the advertiser + # can be used for either competitive exclusion or ad exclusion + BACKFILL_ADVERTISER_LABELS = 351 + + # Label ids applied to the advertiser + # can be used for either competitive exclusion or ad exclusion + BACKFILL_ADVERTISER_LABEL_IDS = 350 + + # The name of an advertiser company assigned to a backfill order + BACKFILL_ADVERTISER_NAME = 347 + + # The name of the contact associated with an advertiser company + BACKFILL_ADVERTISER_PRIMARY_CONTACT = 348 + + # Enum value of Backfill creative billing type + BACKFILL_CREATIVE_BILLING_TYPE = 378 + + # Localized string value of Backfill creative billing type + BACKFILL_CREATIVE_BILLING_TYPE_NAME = 379 + + # Represents the click-through URL of a Backfill creative + BACKFILL_CREATIVE_CLICK_THROUGH_URL = 376 + + # The ID of a Backfill creative + BACKFILL_CREATIVE_ID = 370 + + # Backfill creative name + BACKFILL_CREATIVE_NAME = 371 + + # Third party vendor name of a Backfill creative + BACKFILL_CREATIVE_THIRD_PARTY_VENDOR = 377 + + # Enum value of Backfill creative type + BACKFILL_CREATIVE_TYPE = 374 + + # Localized string name of Backfill creative type + BACKFILL_CREATIVE_TYPE_NAME = 375 + + # Whether a Backfill line item is archived. + BACKFILL_LINE_ITEM_ARCHIVED = 278 + + # Backfill line item comanion delivery option ENUM value. + BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION = 258 + + # Localized Backfill line item comanion delivery option name. + BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 259 + + # The computed status of the BackfillLineItem. + BACKFILL_LINE_ITEM_COMPUTED_STATUS = 296 + + # The localized name of the computed status of the BackfillLineItem. + BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME = 297 + + # The contracted units bought for the Backfill line item. + BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY = 280 + + # The cost per unit of the Backfill line item. + BACKFILL_LINE_ITEM_COST_PER_UNIT = 272 + + # Backfill line item cost type ENUM value. + BACKFILL_LINE_ITEM_COST_TYPE = 264 + + # Localized Backfill line item cost type name. + BACKFILL_LINE_ITEM_COST_TYPE_NAME = 265 + + # Represent the end date of a Backfill creative associated with a Backfill + # line item + BACKFILL_LINE_ITEM_CREATIVE_END_DATE = 381 + + # The creative rotation type of the BackfillLineItem. + BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE = 290 + + # The localized name of the creative rotation type of the BackfillLineItem. + BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 291 + + # Represent the start date of a Backfill creative associated with a + # Backfill line item + BACKFILL_LINE_ITEM_CREATIVE_START_DATE = 380 + + # The 3 letter currency code of the Backfill line item + BACKFILL_LINE_ITEM_CURRENCY_CODE = 288 + + # The progress made for the delivery of the Backfill line item. + BACKFILL_LINE_ITEM_DELIVERY_INDICATOR = 274 + + # The delivery rate type of the BackfillLineItem. + BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE = 292 + + # The localized name of the delivery rate type of the BackfillLineItem. + BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 293 + + # The discount of the BackfillLineItem in whole units in the + # BackfillLineItem's currency code, or if unspecified the Network's + # currency code. + BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE = 294 + + # The discount of the BackfillLineItem in percentage. + BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE = 295 + + # The end date of the Backfill line item. + BACKFILL_LINE_ITEM_END_DATE = 267 + + # The end date and time of the Backfill line item. + BACKFILL_LINE_ITEM_END_DATE_TIME = 269 + + # The ENUM value of the environment a Backfill line item is targeting. + BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE = 302 + + # The localized name of the environment a Backfill line item is targeting. + BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME = 257 + + # The deal ID of the Backfill line item. Set for Programmatic Direct + # campaigns. + BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID = 285 + + # The external ID of the Backfill line item. + BACKFILL_LINE_ITEM_EXTERNAL_ID = 273 + + # The frequency cap of the Backfill line item (descriptive string). + BACKFILL_LINE_ITEM_FREQUENCY_CAP = 303 + + # Backfill line item ID. + BACKFILL_LINE_ITEM_ID = 298 + + # The application that last modified the Backfill line item. + BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP = 289 + + # The total number of clicks delivered of the lifetime of the Backfill line + # item. + BACKFILL_LINE_ITEM_LIFETIME_CLICKS = 283 + + # The total number of impressions delivered over the lifetime of the + # Backfill line item. + BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS = 282 + + # The total number of viewable impressions delivered over the lifetime of + # the Backfill line item. + BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 284 + + # Whether or not the Backfill line item is Makegood. Makegood refers to + # free inventory offered to buyers to compensate for mistakes or + # under-delivery in the original campaigns. + BACKFILL_LINE_ITEM_MAKEGOOD = 276 + + # Backfill line item name. + BACKFILL_LINE_ITEM_NAME = 299 + + # The cost of booking for the Backfill line item (non-CPD). + BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE = 286 + + # Whether a Backfill line item is eligible for opitimization. + BACKFILL_LINE_ITEM_OPTIMIZABLE = 277 + + # Goal type ENUM value of the primary goal of the Backfill line item. + BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE = 262 + + # Localized goal type name of the primary goal of the Backfill line item. + BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 263 + + # Unit type ENUM value of the primary goal of the Backfill line item. + BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 260 + + # Localized unit type name of the primary goal of the Backfill line item. + BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 261 + + # The priority of this Backfill line item as a value between 1 and 16. + # In general, a lower priority means more serving priority for the + # Backfill line item. + BACKFILL_LINE_ITEM_PRIORITY = 266 + + # ENUM value describing the state of inventory reservation for the + # BackfillLineItem. + BACKFILL_LINE_ITEM_RESERVATION_STATUS = 306 + + # Localized string describing the state of inventory reservation for the + # BackfillLineItem. + BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME = 307 + + # The start date of the Backfill line item. + BACKFILL_LINE_ITEM_START_DATE = 268 + + # The start date and time of the Backfill line item. + BACKFILL_LINE_ITEM_START_DATE_TIME = 270 + + # Backfill line item type ENUM value. + BACKFILL_LINE_ITEM_TYPE = 300 + + # Localized Backfill line item type name. + BACKFILL_LINE_ITEM_TYPE_NAME = 301 + + # Whether the Backfill line item end time and end date is set to + # effectively never end. + BACKFILL_LINE_ITEM_UNLIMITED_END = 271 + + # The artificial cost per unit used by the Ad server to help rank + # inventory. + BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT = 275 + + # The web property code used for dynamic allocation Backfill line items. + BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE = 287 + + # The ID of Backfill creative, includes regular creatives, and master and + # companions in case of creative sets + BACKFILL_MASTER_COMPANION_CREATIVE_ID = 372 + + # Name of Backfill creative, includes regular creatives, and master and + # companions in case of creative sets + BACKFILL_MASTER_COMPANION_CREATIVE_NAME = 373 + + # Backfill order agency. + BACKFILL_ORDER_AGENCY = 313 + + # Backfill order agency ID. + BACKFILL_ORDER_AGENCY_ID = 314 + + # Backfill order booked CPC. + BACKFILL_ORDER_BOOKED_CPC = 315 + + # Backfill order booked CPM. + BACKFILL_ORDER_BOOKED_CPM = 316 + + # Backfill order delivery status ENUM value. + BACKFILL_ORDER_DELIVERY_STATUS = 340 + + # Backfill order delivery status localized name. + BACKFILL_ORDER_DELIVERY_STATUS_NAME = 341 + + # Backfill order end date. + BACKFILL_ORDER_END_DATE = 317 + + # Backfill order end date and time. + BACKFILL_ORDER_END_DATE_TIME = 319 + + # Backfill order external ID. + BACKFILL_ORDER_EXTERNAL_ID = 320 + + # Backfill order id. + BACKFILL_ORDER_ID = 338 + + # Backfill order labels. + BACKFILL_ORDER_LABELS = 334 + + # Backfill order labels IDs. + BACKFILL_ORDER_LABEL_IDS = 335 + + # Backfill order lifetime clicks. + BACKFILL_ORDER_LIFETIME_CLICKS = 322 + + # Backfill order lifetime impressions. + BACKFILL_ORDER_LIFETIME_IMPRESSIONS = 323 + + # Backfill order name. + BACKFILL_ORDER_NAME = 339 + + # Backfill order PO number. + BACKFILL_ORDER_PO_NUMBER = 324 + + # Whether the Backfill order is programmatic. + BACKFILL_ORDER_PROGRAMMATIC = 321 + + # Backfill order sales person. + BACKFILL_ORDER_SALESPERSON = 325 + + # Backfill order secondary sales people. + BACKFILL_ORDER_SECONDARY_SALESPEOPLE = 329 + + # Backfill order secondary sales people ID. + BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID = 328 + + # Backfill order secondary traffickers. + BACKFILL_ORDER_SECONDARY_TRAFFICKERS = 331 + + # Backfill order secondary traffickers ID. + BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID = 330 + + # Backfill order start date. + BACKFILL_ORDER_START_DATE = 332 + + # Backfill order start date and time. + BACKFILL_ORDER_START_DATE_TIME = 333 + + # Backfill order trafficker. + BACKFILL_ORDER_TRAFFICKER = 326 + + # Backfill order trafficker ID. + BACKFILL_ORDER_TRAFFICKER_ID = 327 + + # Whether the Backfill order end time and end date is set to effectively + # never end. + BACKFILL_ORDER_UNLIMITED_END = 318 + + # The ID of the buyer on a backfill programmatic proposal. + BACKFILL_PROGRAMMATIC_BUYER_ID = 336 + + # The name of the buyer on a backfill programmatic proposal. + BACKFILL_PROGRAMMATIC_BUYER_NAME = 337 + + # The amount of information about the Publisher's page sent to the buyer + # who purchased the impressions. + BRANDING_TYPE = 383 + + # The localized version of branding type, the amount of information about + # the Publisher's page sent to the buyer who purchased the impressions. + BRANDING_TYPE_NAME = 384 + + # Browser category. + BROWSER_CATEGORY = 119 + + # Browser category name. + BROWSER_CATEGORY_NAME = 120 + + # The ID of the browser. + BROWSER_ID = 235 + + # The name of the browser. + BROWSER_NAME = 236 + + # Mobile carrier ID. + CARRIER_ID = 369 + + # Name of the mobile carrier. + CARRIER_NAME = 368 + + # The ID of an advertiser, classified by Google, associated with a creative + # transacted + CLASSIFIED_ADVERTISER_ID = 133 + + # The name of an advertiser, classified by Google, associated with a + # creative transacted + CLASSIFIED_ADVERTISER_NAME = 134 + + # ID of the brand, as classified by Google, + CLASSIFIED_BRAND_ID = 243 + + # Name of the brand, as classified by Google, + CLASSIFIED_BRAND_NAME = 244 + + # ID of the video content served. + CONTENT_ID = 246 + + # Name of the video content served. + CONTENT_NAME = 247 + + # The criteria ID of the country in which the ad served. + COUNTRY_ID = 11 + + # The name of the country in which the ad served. + COUNTRY_NAME = 12 + + # Enum value of creative billing type + CREATIVE_BILLING_TYPE = 366 + + # Localized string value of creative billing type + CREATIVE_BILLING_TYPE_NAME = 367 + + # Represents the click-through URL of a creative + CREATIVE_CLICK_THROUGH_URL = 174 + + # The ID of a creative + CREATIVE_ID = 138 + + # Creative name + CREATIVE_NAME = 139 + + # Creative technology ENUM + CREATIVE_TECHNOLOGY = 148 + + # Creative technology locallized name + CREATIVE_TECHNOLOGY_NAME = 149 + + # Third party vendor name of a creative + CREATIVE_THIRD_PARTY_VENDOR = 361 + + # Enum value of creative type + CREATIVE_TYPE = 344 + + # Localized string name of creative type + CREATIVE_TYPE_NAME = 345 + + # Breaks down reporting data by date. + DATE = 3 + + # Breaks down reporting data by day of the week. Monday is 1 and 7 is + # Sunday. + DAY_OF_WEEK = 4 + + # Demand channel. + DEMAND_CHANNEL = 9 + + # Demand channel name. + DEMAND_CHANNEL_NAME = 10 + + # Demand subchannel. + DEMAND_SUBCHANNEL = 22 + + # Demand subchannel name. + DEMAND_SUBCHANNEL_NAME = 23 + + # The device on which an ad was served. + DEVICE = 226 + + # The device category to which an ad is being targeted. + DEVICE_CATEGORY = 15 + + # The name of the category of device (smartphone, feature phone, tablet, or + # desktop) to which an ad is being targeted. + DEVICE_CATEGORY_NAME = 16 + + # The localized name of the device on which an ad was served. + DEVICE_NAME = 225 + + # ID of the yield partner as classified by Google + EXCHANGE_THIRD_PARTY_COMPANY_ID = 185 + + # Name of the yield partner as classified by Google + EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186 + + # The ID of the first look pricing rule. + FIRST_LOOK_PRICING_RULE_ID = 248 + + # The name of the first look pricing rule. + FIRST_LOOK_PRICING_RULE_NAME = 249 + + # Breaks down reporting data by hour in one day. + HOUR = 100 + + # The interaction type of an ad. + INTERACTION_TYPE = 223 + + # The localized name of the interaction type of an ad. + INTERACTION_TYPE_NAME = 224 + + # Inventory format. + # The format of the ad unit (e.g, banner) where the ad was requested. + INVENTORY_FORMAT = 17 + + # Inventory format name. + # The format of the ad unit (e.g, banner) where the ad was requested. + INVENTORY_FORMAT_NAME = 18 + + # Inventory type. + # The kind of web page or device where the ad was requested. + INVENTORY_TYPE = 19 + + # Inventory type name. + # The kind of web page or device where the ad was requested. + INVENTORY_TYPE_NAME = 20 + + # Whether traffic is Adx Direct. + IS_ADX_DIRECT = 382 + + # Whether traffic is First Look. + IS_FIRST_LOOK_DEAL = 401 + + # The Custom Targeting Value ID + KEY_VALUES_ID = 214 + + # The Custom Targeting Value formatted like = + KEY_VALUES_NAME = 215 + + # Whether a Line item is archived. + LINE_ITEM_ARCHIVED = 188 + + # Line item comanion delivery option ENUM value. + LINE_ITEM_COMPANION_DELIVERY_OPTION = 204 + + # Localized line item comanion delivery option name. + LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205 + + # The computed status of the LineItem. + LINE_ITEM_COMPUTED_STATUS = 250 + + # The localized name of the computed status of the LineItem. + LINE_ITEM_COMPUTED_STATUS_NAME = 251 + + # The contracted units bought for the Line item. + LINE_ITEM_CONTRACTED_QUANTITY = 92 + + # The cost per unit of the Line item. + LINE_ITEM_COST_PER_UNIT = 85 + + # Line item cost type ENUM value. + LINE_ITEM_COST_TYPE = 212 + + # Localized line item cost type name. + LINE_ITEM_COST_TYPE_NAME = 213 + + # Represent the end date of a creative associated with line item + LINE_ITEM_CREATIVE_END_DATE = 176 + + # The creative rotation type of the LineItem. + LINE_ITEM_CREATIVE_ROTATION_TYPE = 189 + + # The localized name of the creative rotation type of the LineItem. + LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190 + + # Represent the start date of a creative associated with line item + LINE_ITEM_CREATIVE_START_DATE = 175 + + # The 3 letter currency code of the Line Item + LINE_ITEM_CURRENCY_CODE = 180 + + # The progress made for the delivery of the Line item. + LINE_ITEM_DELIVERY_INDICATOR = 87 + + # The delivery rate type of the LineItem. + LINE_ITEM_DELIVERY_RATE_TYPE = 191 + + # The localized name of the delivery rate type of the LineItem. + LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192 + + # The discount of the LineItem in whole units in the LineItem's currency + # code, or if unspecified the Network's currency code. + LINE_ITEM_DISCOUNT_ABSOLUTE = 195 + + # The discount of the LineItem in percentage. + LINE_ITEM_DISCOUNT_PERCENTAGE = 196 + + # The end date of the Line item. + LINE_ITEM_END_DATE = 81 + + # The end date and time of the Line item. + LINE_ITEM_END_DATE_TIME = 83 + + # The ENUM value of the environment a LineItem is targeting. + LINE_ITEM_ENVIRONMENT_TYPE = 201 + + # The localized name of the environment a LineItem is targeting. + LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202 + + # The deal ID of the Line item. Set for Programmatic Direct campaigns. + LINE_ITEM_EXTERNAL_DEAL_ID = 97 + + # The external ID of the Line item. + LINE_ITEM_EXTERNAL_ID = 86 + + # The frequency cap of the Line item (descriptive string). + LINE_ITEM_FREQUENCY_CAP = 256 + + # Line item ID. + LINE_ITEM_ID = 1 + + # The application that last modified the Line Item. + LINE_ITEM_LAST_MODIFIED_BY_APP = 181 + + # The total number of clicks delivered of the lifetime of the Line item. + LINE_ITEM_LIFETIME_CLICKS = 95 + + # The total number of impressions delivered over the lifetime of the + # Line item. + LINE_ITEM_LIFETIME_IMPRESSIONS = 94 + + # The total number of viewable impressions delivered over the lifetime of + # the Line item. + LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96 + + # Whether or not the Line item is Makegood. Makegood refers to free + # inventory offered to buyers to compensate for mistakes or under-delivery + # in the original campaigns. + LINE_ITEM_MAKEGOOD = 89 + + # Line item Name. + LINE_ITEM_NAME = 2 + + # The cost of booking for the Line item (non-CPD). + LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98 + + # Whether a Line item is eligible for opitimization. + LINE_ITEM_OPTIMIZABLE = 90 + + # Goal type ENUM value of the primary goal of the line item. + LINE_ITEM_PRIMARY_GOAL_TYPE = 210 + + # Localized goal type name of the primary goal of the line item. + LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211 + + # The total number of impressions or clicks that are reserved for a + # line item. For line items of type BULK or PRICE_PRIORITY, this represents + # the number of remaining impressions reserved. If the line item has an + # impression cap goal, this represents the number of impressions or + # conversions that the line item will stop serving at if reached. + LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93 + + # The percentage of impressions or clicks that are reserved for a + # line item. For line items of type SPONSORSHIP, this represents the + # percentage of available impressions reserved. For line items of type + # NETWORK or HOUSE, this represents the percentage of remaining impressions + # reserved. + LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396 + + # Unit type ENUM value of the primary goal of the line item. + LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208 + + # Localized unit type name of the primary goal of the line item. + LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209 + + # The priority of this Line item as a value between 1 and 16. + # In general, a lower priority means more serving priority for the + # Line item. + LINE_ITEM_PRIORITY = 24 + + # ENUM value describing the state of inventory reservation for the + # LineItem. + LINE_ITEM_RESERVATION_STATUS = 304 + + # Localized string describing the state of inventory reservation for the + # LineItem. + LINE_ITEM_RESERVATION_STATUS_NAME = 305 + + # The start date of the Line item. + LINE_ITEM_START_DATE = 82 + + # The start date and time of the Line item. + LINE_ITEM_START_DATE_TIME = 84 + + # Line item type ENUM value. + LINE_ITEM_TYPE = 193 + + # Localized line item type name. + LINE_ITEM_TYPE_NAME = 194 + + # Whether the Line item end time and end date is set to effectively never + # end. + LINE_ITEM_UNLIMITED_END = 187 + + # The artificial cost per unit used by the Ad server to help rank + # inventory. + LINE_ITEM_VALUE_COST_PER_UNIT = 88 + + # The web property code used for dynamic allocation Line Items. + LINE_ITEM_WEB_PROPERTY_CODE = 179 + + # The ID of creative, includes regular creatives, and master and companions + # in case of creative sets + MASTER_COMPANION_CREATIVE_ID = 140 + + # Name of creative, includes regular creatives, and master and companions + # in case of creative sets + MASTER_COMPANION_CREATIVE_NAME = 141 + + # Whether the mobile app is free. + MOBILE_APP_FREE = 128 + + # URL of app icon for the mobile app. + MOBILE_APP_ICON_URL = 129 + + # The ID of the Mobile App. + MOBILE_APP_ID = 123 + + # The name of the mobile app. + MOBILE_APP_NAME = 127 + + # Ownership status of the mobile app. + MOBILE_APP_OWNERSHIP_STATUS = 311 + + # Ownership status of the mobile app. + MOBILE_APP_OWNERSHIP_STATUS_NAME = 312 + + # The App Store of the mobile app. + MOBILE_APP_STORE = 125 + + # The localized name of the mobile app store. + MOBILE_APP_STORE_NAME = 245 + + # Mobile inventory type. + # Identifies whether a mobile ad came from a regular web page, an AMP web + # page, or a mobile app. + # Values match the Inventory type dimension available in the Overview Home + # dashboard. Note: Video takes precedence over any other value, for + # example, if there is an in-stream video impression on a desktop device, + # it will be attributed to in-stream video and not desktop web. + MOBILE_INVENTORY_TYPE = 99 + + # Mobile inventory type name. + # Identifies whether a mobile ad came from a regular web page, an AMP web + # page, or a mobile app. + MOBILE_INVENTORY_TYPE_NAME = 21 + + # SDK version of the mobile device. + MOBILE_SDK_VERSION_NAME = 130 + + # Breaks down reporting data by month and year. + MONTH_YEAR = 6 + + # Native ad format ID. + NATIVE_AD_FORMAT_ID = 255 + + # Native ad format name. + NATIVE_AD_FORMAT_NAME = 254 + + # Native style ID. + NATIVE_STYLE_ID = 253 + + # Native style name. + NATIVE_STYLE_NAME = 252 + + # Operating system category. + OPERATING_SYSTEM_CATEGORY = 117 + + # Operating system category name. + OPERATING_SYSTEM_CATEGORY_NAME = 118 + + # ID of the operating system version. + OPERATING_SYSTEM_VERSION_ID = 238 + + # Details of the operating system, including version. + OPERATING_SYSTEM_VERSION_NAME = 237 + + # Order agency. + ORDER_AGENCY = 150 + + # Order agency ID. + ORDER_AGENCY_ID = 151 + + # Order booked CPC. + ORDER_BOOKED_CPC = 152 + + # Order booked CPM. + ORDER_BOOKED_CPM = 153 + + # Order delivery status ENUM value. + ORDER_DELIVERY_STATUS = 231 + + # Order delivery status localized name. + ORDER_DELIVERY_STATUS_NAME = 239 + + # Order end date. + ORDER_END_DATE = 154 + + # Order end date and time. + ORDER_END_DATE_TIME = 155 + + # Order external ID. + ORDER_EXTERNAL_ID = 156 + + # Order id. + ORDER_ID = 7 + + # Order labels. + ORDER_LABELS = 170 + + # Order labels IDs. + ORDER_LABEL_IDS = 171 + + # Order lifetime clicks. + ORDER_LIFETIME_CLICKS = 158 + + # Order lifetime impressions. + ORDER_LIFETIME_IMPRESSIONS = 159 + + # Order name. + ORDER_NAME = 8 + + # Order PO number. + ORDER_PO_NUMBER = 160 + + # Whether the Order is programmatic. + ORDER_PROGRAMMATIC = 157 + + # Order sales person. + ORDER_SALESPERSON = 161 + + # Order secondary sales people. + ORDER_SECONDARY_SALESPEOPLE = 164 + + # Order secondary sales people ID. + ORDER_SECONDARY_SALESPEOPLE_ID = 165 + + # Order secondary traffickers. + ORDER_SECONDARY_TRAFFICKERS = 166 + + # Order secondary traffickers ID. + ORDER_SECONDARY_TRAFFICKERS_ID = 167 + + # Order start date. + ORDER_START_DATE = 168 + + # Order start date and time. + ORDER_START_DATE_TIME = 169 + + # Order trafficker. + ORDER_TRAFFICKER = 162 + + # Order trafficker ID. + ORDER_TRAFFICKER_ID = 163 + + # Whether the Order end time and end date is set to effectively never + # end. + ORDER_UNLIMITED_END = 203 + + # Placement ID + PLACEMENT_ID = 113 + + # The full list of placement IDs associated with the ad unit. + PLACEMENT_ID_ALL = 144 + + # Placement name + PLACEMENT_NAME = 114 + + # The full list of placement names associated with the ad unit. + PLACEMENT_NAME_ALL = 145 + + # Placement status ENUM value + PLACEMENT_STATUS = 362 + + # The full list of placement status ENUM values associated with the ad + # unit. + PLACEMENT_STATUS_ALL = 363 + + # Localized placement status name. + PLACEMENT_STATUS_NAME = 364 + + # The full list of localized placement status names associated with the ad + # unit. + PLACEMENT_STATUS_NAME_ALL = 365 + + # The ID of the buyer on a programmatic proposal. + PROGRAMMATIC_BUYER_ID = 240 + + # The name of the buyer on a programmatic proposal. + PROGRAMMATIC_BUYER_NAME = 241 + + # Programmatic channel. + # The type of transaction that occurred in Ad Exchange. + PROGRAMMATIC_CHANNEL = 13 + + # Programmatic channel name. + # The type of transaction that occurred in Ad Exchange. + PROGRAMMATIC_CHANNEL_NAME = 14 + + # The size of a rendered creative, It can differ with the creative's size + # if a creative is shown in an ad slot of a different size. + RENDERED_CREATIVE_SIZE = 343 + + # Inventory Requested Ad Sizes dimension + REQUESTED_AD_SIZES = 352 + + # Request type ENUM + REQUEST_TYPE = 146 + + # Request type locallized name + REQUEST_TYPE_NAME = 147 + + # Indicates if a request was eligible for server-side unwrapping. + SERVER_SIDE_UNWRAPPING_ELIGIBLE = 597 + + # Information about domain or subdomains. + SITE = 387 + + # The ID of the browser, device or other environment into which a line item + # or creative was served. + TARGETING_ID = 232 + + # Information about the browser, device and other environments into which + # a line item or creative was served. + TARGETING_NAME = 233 + + # The way in which advertisers targeted their ads. + TARGETING_TYPE = 385 + + # The localized name of the way in which advertisers targeted their ads. + TARGETING_TYPE_NAME = 386 + + # Inventory Traffic source dimension + TRAFFIC_SOURCE = 388 + + # Inventory Traffic source dimension name + TRAFFIC_SOURCE_NAME = 389 + + # Unified pricing rule ID dimension + UNIFIED_PRICING_RULE_ID = 393 + + # Unified pricing rule name dimension + UNIFIED_PRICING_RULE_NAME = 394 + + # The video placement enum as defined by ADCOM 1.0-202303. + VIDEO_PLCMT = 172 + + # The localized name of the video placement as defined by ADCOM 1.0-202303. + VIDEO_PLCMT_NAME = 173 + + # Breaks down reporting data by week of the year. + WEEK = 5 + + # Name of the company within a yield group + YIELD_GROUP_BUYER_NAME = 184 + + # ID of the group of ad networks or exchanges used for Mediation and Open + # Bidding + YIELD_GROUP_ID = 182 + + # Name of the group of ad networks or exchanges used for Mediation and Open + # Bidding + YIELD_GROUP_NAME = 183 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 0 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10_000 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 1 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10_001 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 2 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10_002 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 3 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10_003 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 4 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10_004 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 5 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10_005 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 6 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10_006 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 7 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10_007 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 8 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10_008 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 9 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10_009 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 10 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10_010 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 11 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10_011 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 12 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10_012 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 13 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10_013 + + # Custom field option ID for Line Item with custom field ID equal to the ID + # in index 14 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10_014 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 0 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 0 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11_000 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 1 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 1 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11_001 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 2 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 2 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11_002 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 3 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 3 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11_003 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 4 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 4 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11_004 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 5 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 5 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11_005 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 6 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 6 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11_006 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 7 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 7 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11_007 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 8 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 8 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11_008 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 9 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 9 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11_009 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 10 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 10 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11_010 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 11 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 11 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11_011 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 12 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 12 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11_012 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 13 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 13 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11_013 + + # Custom field value for Line Item with custom field ID equal to the ID + # in index 14 of `ReportDefinition.line_item_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 14 is of + # type STRING or DROPDOWN. + LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11_014 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 0 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_0_OPTION_ID = 12_000 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 1 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_1_OPTION_ID = 12_001 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 2 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_2_OPTION_ID = 12_002 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 3 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_3_OPTION_ID = 12_003 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 4 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_4_OPTION_ID = 12_004 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 5 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_5_OPTION_ID = 12_005 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 6 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_6_OPTION_ID = 12_006 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 7 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_7_OPTION_ID = 12_007 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 8 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_8_OPTION_ID = 12_008 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 9 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_9_OPTION_ID = 12_009 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 10 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_10_OPTION_ID = 12_010 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 11 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_11_OPTION_ID = 12_011 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 12 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_12_OPTION_ID = 12_012 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 13 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_13_OPTION_ID = 12_013 + + # Custom field option ID for Order with custom field ID equal to the ID + # in index 14 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_14_OPTION_ID = 12_014 + + # Custom field value for Order with custom field ID equal to the ID + # in index 0 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 0 is of type + # STRING. + ORDER_CUSTOM_FIELD_0_VALUE = 13_000 + + # Custom field value for Order with custom field ID equal to the ID + # in index 1 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 1 is of type + # STRING. + ORDER_CUSTOM_FIELD_1_VALUE = 13_001 + + # Custom field value for Order with custom field ID equal to the ID + # in index 2 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 2 is of type + # STRING. + ORDER_CUSTOM_FIELD_2_VALUE = 13_002 + + # Custom field value for Order with custom field ID equal to the ID + # in index 3 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 3 is of type + # STRING. + ORDER_CUSTOM_FIELD_3_VALUE = 13_003 + + # Custom field value for Order with custom field ID equal to the ID + # in index 4 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 4 is of type + # STRING. + ORDER_CUSTOM_FIELD_4_VALUE = 13_004 + + # Custom field value for Order with custom field ID equal to the ID + # in index 5 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 5 is of type + # STRING. + ORDER_CUSTOM_FIELD_5_VALUE = 13_005 + + # Custom field value for Order with custom field ID equal to the ID + # in index 6 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 6 is of type + # STRING. + ORDER_CUSTOM_FIELD_6_VALUE = 13_006 + + # Custom field value for Order with custom field ID equal to the ID + # in index 7 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 7 is of type + # STRING. + ORDER_CUSTOM_FIELD_7_VALUE = 13_007 + + # Custom field value for Order with custom field ID equal to the ID + # in index 8 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 8 is of type + # STRING. + ORDER_CUSTOM_FIELD_8_VALUE = 13_008 + + # Custom field value for Order with custom field ID equal to the ID + # in index 9 of `ReportDefinition.order_custom_field_ids`. Treats the value + # as a string. Can only be used if the custom field at index 9 is of type + # STRING. + ORDER_CUSTOM_FIELD_9_VALUE = 13_009 + + # Custom field value for Order with custom field ID equal to the ID + # in index 10 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 10 is of + # type STRING. + ORDER_CUSTOM_FIELD_10_VALUE = 13_010 + + # Custom field value for Order with custom field ID equal to the ID + # in index 11 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 11 is of + # type STRING. + ORDER_CUSTOM_FIELD_11_VALUE = 13_011 + + # Custom field value for Order with custom field ID equal to the ID + # in index 12 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 12 is of + # type STRING. + ORDER_CUSTOM_FIELD_12_VALUE = 13_012 + + # Custom field value for Order with custom field ID equal to the ID + # in index 13 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 13 is of + # type STRING. + ORDER_CUSTOM_FIELD_13_VALUE = 13_013 + + # Custom field value for Order with custom field ID equal to the ID + # in index 14 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 14 is of + # type STRING. + ORDER_CUSTOM_FIELD_14_VALUE = 13_014 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 0 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14_000 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 1 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14_001 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 2 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14_002 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 3 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14_003 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 4 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14_004 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 5 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14_005 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 6 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14_006 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 7 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14_007 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 8 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14_008 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 9 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14_009 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 10 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14_010 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 11 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14_011 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 12 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14_012 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 13 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14_013 + + # Custom field option ID for Creative with custom field ID equal to the ID + # in index 14 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14_014 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 0 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 0 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_0_VALUE = 15_000 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 1 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 1 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_1_VALUE = 15_001 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 2 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 2 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_2_VALUE = 15_002 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 3 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 3 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_3_VALUE = 15_003 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 4 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 4 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_4_VALUE = 15_004 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 5 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 5 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_5_VALUE = 15_005 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 6 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 6 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_6_VALUE = 15_006 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 7 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 7 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_7_VALUE = 15_007 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 8 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 8 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_8_VALUE = 15_008 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 9 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 9 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_9_VALUE = 15_009 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 10 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 10 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_10_VALUE = 15_010 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 11 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 11 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_11_VALUE = 15_011 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 12 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 12 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_12_VALUE = 15_012 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 13 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 13 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_13_VALUE = 15_013 + + # Custom field value for Creative with custom field ID equal to the ID + # in index 14 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 14 is of + # type STRING. + CREATIVE_CUSTOM_FIELD_14_VALUE = 15_014 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16_000 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16_001 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16_002 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16_003 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16_004 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16_005 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16_006 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16_007 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16_008 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16_009 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16_010 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16_011 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16_012 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16_013 + + # Custom field option ID for Backfill line item with custom field ID equal + # to the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16_014 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 0 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17_000 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 1 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17_001 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 2 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17_002 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 3 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17_003 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 4 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17_004 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 5 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17_005 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 6 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17_006 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 7 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17_007 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 8 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17_008 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 9 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17_009 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 10 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17_010 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 11 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17_011 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 12 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17_012 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 13 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17_013 + + # Custom field value for Backfill line item with custom field ID equal to + # the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 14 is of type STRING or DROPDOWN. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17_014 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 0 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18_000 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 1 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18_001 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 2 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18_002 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 3 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18_003 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 4 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18_004 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 5 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18_005 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 6 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18_006 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 7 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18_007 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 8 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18_008 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 9 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18_009 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 10 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18_010 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 11 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18_011 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 12 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18_012 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 13 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18_013 + + # Custom field option ID for Backfill order with custom field ID equal to + # the ID in index 14 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18_014 + + # Custom field value for Backfill order with custom field ID equal to the + # ID + # in index 0 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 0 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19_000 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 1 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 1 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19_001 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 2 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 2 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19_002 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 3 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 3 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19_003 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 4 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 4 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19_004 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 5 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 5 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19_005 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 6 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 6 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19_006 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 7 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 7 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19_007 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 8 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 8 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19_008 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 9 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 9 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19_009 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 10 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 10 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19_010 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 11 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 11 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19_011 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 12 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 12 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19_012 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 13 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 13 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19_013 + + # Custom field value for Backfill order with custom field ID equal to the + # ID in index 14 of `ReportDefinition.order_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 14 is of + # type STRING or DROPDOWN. + BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19_014 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 0 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20_000 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20_001 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20_002 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20_003 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20_004 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20_005 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20_006 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20_007 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20_008 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20_009 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20_010 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20_011 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20_012 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20_013 + + # Custom field option ID for Backfill creative with custom field ID equal + # to the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20_014 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID + # in index 0 of `ReportDefinition.creative_custom_field_ids`. Treats the + # value as a string. Can only be used if the custom field at index 0 is of + # type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21_000 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 1 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21_001 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 2 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21_002 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 3 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21_003 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 4 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21_004 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 5 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21_005 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 6 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21_006 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 7 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21_007 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 8 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21_008 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. Treats + # the value as a string. Can only be used if the custom field at index 9 is + # of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21_009 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 10 is of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21_010 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 11 is of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21_011 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 12 is of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21_012 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 13 is of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21_013 + + # Custom field value for Backfill creative with custom field ID equal to + # the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. + # Treats the value as a string. Can only be used if the custom field at + # index 14 is of type STRING or DROPDOWN. + BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21_014 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 0 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_0_VALUE_ID = 100_000 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 1 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_1_VALUE_ID = 100_001 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 2 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_2_VALUE_ID = 100_002 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 3 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_3_VALUE_ID = 100_003 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 4 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_4_VALUE_ID = 100_004 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 5 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_5_VALUE_ID = 100_005 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 6 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_6_VALUE_ID = 100_006 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 9 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_7_VALUE_ID = 100_007 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 8 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_8_VALUE_ID = 100_008 + + # Custom Dimension Value ID for Custom Dimension with key equal to the key + # in index 9 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_9_VALUE_ID = 100_009 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 0 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_0_VALUE = 101_000 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 1 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_1_VALUE = 101_001 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 2 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_2_VALUE = 101_002 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 3 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_3_VALUE = 101_003 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 4 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_4_VALUE = 101_004 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 5 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_5_VALUE = 101_005 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 6 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_6_VALUE = 101_006 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 7 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_7_VALUE = 101_007 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 8 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_8_VALUE = 101_008 + + # Custom Dimension Value name for Custom Dimension with key equal to the + # id in index 9 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_9_VALUE = 101_009 + end + + # Reporting metrics. + module Metric + # Default value. This value is unused. + METRIC_UNSPECIFIED = 0 + + # Active View total average time in seconds that specific impressions are + # reported as being viewable. + ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61 + + # Total number of impressions that were eligible to measure viewability. + ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58 + + # The total number of impressions that were sampled and measured by active + # view. + ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57 + + # The percentage of total impressions that were measurable by active view + # (out of all the total impressions sampled for active view). + ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60 + + # The total number of impressions viewed on the user's screen. + ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56 + + # The percentage of total impressions viewed on the user's screen (out of + # the total impressions measurable by active view). + ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59 + + # Active View AdSense average time in seconds that specific impressions are + # reported as being viewable. + ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73 + + # Total number of impressions delivered by AdSense that were eligible to + # measure viewability. + ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70 + + # The number of impressions delivered by AdSense that were sampled, and + # measurable by active view. + ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69 + + # The percentage of impressions delivered by AdSense that were measurable + # by active view (out of all AdSense impressions sampled for active view). + ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72 + + # The number of impressions delivered by AdSense viewed on the user's + # screen. + ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68 + + # The percentage of impressions delivered by AdSense viewed on the user's + # screen (out of AdSense impressions measurable by active view). + ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71 + + # The average effective cost-per-thousand-impressions earned from the ads + # delivered by AdSense through line item dynamic allocation. + ADSENSE_AVERAGE_ECPM = 26 + + # Number of clicks delivered by AdSense demand channel. + ADSENSE_CLICKS = 23 + + # The ratio of impressions served by AdSense that resulted in users + # clicking on an ad. The clickthrough rate (CTR) is updated nightly. The + # AdSense CTR is calculated as: (AdSense clicks / AdSense impressions). + ADSENSE_CTR = 24 + + # Total impressions delivered by AdSense. + ADSENSE_IMPRESSIONS = 22 + + # Ratio of clicks delivered by AdSense through line item dynamic allocation + # in relation to the total clicks delivered. + ADSENSE_PERCENT_CLICKS = 28 + + # Ratio of impressions delivered by AdSense through line item dynamic + # allocation in relation to the total impressions delivered. + ADSENSE_PERCENT_IMPRESSIONS = 27 + + # Ratio of revenue generated by AdSense through line item dynamic + # allocation in relation to the total revenue. + ADSENSE_PERCENT_REVENUE = 29 + + # Ratio of revenue generated by AdSense through line item dynamic + # allocation in relation to the total revenue (excluding CPD). + ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30 + + # The total number of times that an AdSense ad is delivered. + ADSENSE_RESPONSES_SERVED = 41 + + # Revenue generated from AdSense through line item dynamic allocation, + # calculated in the network's currency and time zone. + ADSENSE_REVENUE = 25 + + # Active View AdExchange average time in seconds that specific impressions + # are reported as being viewable. + AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79 + + # Total number of impressions delivered by Ad Exchange that were eligible + # to measure viewability. + AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76 + + # The number of impressions delivered by Ad Exchange that were sampled, and + # measurable by active view. + AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75 + + # The percentage of impressions delivered by Ad Exchange that were + # measurable by active view (out of all Ad Exchange impressions sampled for + # active view). + AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78 + + # The number of impressions delivered by Ad Exchange viewed on the user's + # screen. + AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74 + + # The percentage of impressions delivered by Ad Exchange viewed on the + # user's screen (out of Ad Exchange impressions measurable by active view). + AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77 + + # The average effective cost-per-thousand-impressions earned from the ads + # delivered by Ad Exchange through line item dynamic allocation. + AD_EXCHANGE_AVERAGE_ECPM = 18 + + # Number of clicks delivered by the Ad Exchange. + AD_EXCHANGE_CLICKS = 15 + + # The ratio of impressions served by the Ad Exchange that resulted in users + # clicking on an ad. The clickthrough rate (CTR) is updated nightly. Ad + # Exchange CTR is calculated as: (Ad Exchange clicks / Ad Exchange + # impressions). + AD_EXCHANGE_CTR = 16 + + # Total impressions delivered by the Ad Exchange. + AD_EXCHANGE_IMPRESSIONS = 14 + + # Ratio of clicks delivered by Ad Exchange through line item dynamic + # allocation in relation to the total clicks delivered. + AD_EXCHANGE_PERCENT_CLICKS = 20 + + # Ratio of impressions delivered by Ad Exchange through line item dynamic + # allocation in relation to the total impressions delivered. + AD_EXCHANGE_PERCENT_IMPRESSIONS = 19 + + # Ratio of revenue generated by Ad Exchange through line item dynamic + # allocation in relation to the total revenue. + AD_EXCHANGE_PERCENT_REVENUE = 21 + + # Ratio of revenue generated by Ad Exchange through line item dynamic + # allocation in relation to the total revenue (excluding CPD). + AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31 + + # The total number of times that an Ad Exchange ad is delivered. + AD_EXCHANGE_RESPONSES_SERVED = 42 + + # Revenue generated from the Ad Exchange through line item dynamic + # allocation, calculated in your network's currency and time zone. + AD_EXCHANGE_REVENUE = 17 + + # The total number of times that an ad request is sent to the ad server + # including dynamic allocation. + AD_REQUESTS = 38 + + # Active View ad server average time in seconds that specific impressions + # are reported as being viewable. + AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67 + + # Total number of impressions delivered by the ad server that were eligible + # to measure viewability. + AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64 + + # The number of impressions delivered by the ad server that were sampled, + # and measurable by active view. + AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63 + + # The percentage of impressions delivered by the ad server that were + # measurable by active view (out of all the ad server impressions sampled + # for active view). + AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66 + + # The number of impressions delivered by the ad server viewed on the user's + # screen. + AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62 + + # The percentage of impressions delivered by the ad server viewed on the + # user's screen (out of the ad server impressions measurable by active + # view). + AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65 + + # Average effective cost-per-thousand-impressions earned from the ads + # delivered by the Google Ad Manager server. + AD_SERVER_AVERAGE_ECPM = 34 + + # Average effective cost-per-thousand-impressions earned from the ads + # delivered by the Google Ad Manager server, excluding CPD value. + AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10 + + # Total raw impressions counted when creative begins to render or the + # first frame of a video is shown. + AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS = 262 + + # Total clicks served by the Google Ad Manager server. It usually takes + # about 30 minutes for new clicks to be recorded and added to the total + # displayed in reporting. + AD_SERVER_CLICKS = 7 + + # CPD revenue earned, calculated in your network's currency, for + # the ads delivered by the Google Ad Manager server. Sum of all booked + # revenue. + AD_SERVER_CPD_REVENUE = 32 + + # Ratio of impressions served by the Google Ad Manager server that resulted + # in users clicking on an ad. The clickthrough rate (CTR) is updated + # nightly. The ad server CTR is calculated as: (Ad server clicks / Ad + # server impressions). + AD_SERVER_CTR = 8 + + # Total impressions delivered by the Ad Server. + AD_SERVER_IMPRESSIONS = 6 + + # Ratio of clicks delivered by the Google Ad Manager server in relation to + # the total clicks delivered. + AD_SERVER_PERCENT_CLICKS = 12 + + # Ratio of impressions delivered by the Google Ad Manager server in + # relation to the total impressions delivered. + AD_SERVER_PERCENT_IMPRESSIONS = 11 + + # Ratio of revenue generated by the Google Ad Manager server in relation + # to the total revenue. + AD_SERVER_PERCENT_REVENUE = 35 + + # Ratio of revenue generated by the Google Ad Manager server (excluding + # CPD) in relation to the total revenue. + AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13 + + # The total number of times that an ad is served by the ad server. + AD_SERVER_RESPONSES_SERVED = 40 + + # All CPM, CPC, and CPD revenue earned, calculated in your network's + # currency, for the ads delivered by the Google Ad Manager server. + # Sum of all booked revenue. + AD_SERVER_REVENUE = 33 + + # Revenue (excluding CPD) earned, calculated in your network's currency, + # for the ads delivered by the Google Ad Manager server. Sum of all booked + # revenue. + AD_SERVER_REVENUE_WITHOUT_CPD = 9 + + # The number of tracked ads delivered by the ad server. + AD_SERVER_TRACKED_ADS = 264 + + # Total raw impressions counted when creative begins to render or the + # first frame of a video is shown, before invalid traffic filtrations by + # Ad Server. + AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS = 261 + + # Total clicks delivered by the Ad Server before spam filtering. + AD_SERVER_UNFILTERED_CLICKS = 259 + + # Total impressions delivered by the Ad Server before spam filtering. + AD_SERVER_UNFILTERED_IMPRESSIONS = 260 + + # The number of tracked ads delivered by the ad server before invalid + # traffic filtrations. + AD_SERVER_UNFILTERED_TRACKED_ADS = 263 + + # eCPM averaged across the Google Ad Manager server, AdSense, + # and Ad Exchange. + AVERAGE_ECPM = 37 + + # eCPM averaged across the Google Ad Manager server (excluding CPD), + # AdSense, and Ad Exchange. + AVERAGE_ECPM_WITHOUT_CPD = 5 + + # The number of times a user clicked on an ad. + CLICKS = 2 + + # The total number of times that the code for an ad is served by the ad + # server including dynamic allocation. + CODE_SERVED_COUNT = 44 + + # For standard ads, your ad clickthrough rate (CTR) is the number of ad + # clicks divided by the number of individual ad impressions expressed as a + # fraction. Ad CTR = Clicks / Ad impressions. + CTR = 3 + + # The number of coviewed impressions sold by Google in partner sales. + GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129 + + # The number of auction impressions sold by Google in partner sales. + GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128 + + # The number of coviewed impressions sold by Google in partner sales. + GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131 + + # The number of impressions sold by Google in partner sales. + GOOGLE_SOLD_IMPRESSIONS = 130 + + # The number of coviewed impressions sold by Google in partner sales. + GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127 + + # The number of reservation impressions sold by Google in partner sales. + GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126 + + # Total impressions from the Google Ad Manager server, AdSense, + # Ad Exchange, and yield group partners. + IMPRESSIONS = 1 + + # The number of filled pod requests (filled by partner or Google) in + # partner sales. + PARTNER_SALES_FILLED_POD_REQUESTS = 135 + + # The percent of filled requests to total ad requests in + # partner sales. + PARTNER_SALES_FILL_RATE = 136 + + # The percent of partner filled requests to total ad requests + # in partner sales. + PARTNER_SALES_PARTNER_MATCH_RATE = 137 + + # The number of queries eligible for partner sales. + PARTNER_SALES_QUERIES = 132 + + # The number of partner unfilled impressions in partner sales. + # If a pod request is not filled by partner but filled by Google, this + # metric will still count 1. + PARTNER_SALES_UNFILLED_IMPRESSIONS = 133 + + # The number of partner unmatched queries in partner sales. + # If an ad request is not filled by partner but filled by Google, this + # metric will still count 1. + PARTNER_SALES_UNMATCHED_QUERIES = 134 + + # The number of code served sold by partner in partner sales. + PARTNER_SOLD_CODE_SERVED = 125 + + # The number of coviewed impressions sold by partner in partner sales. + PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124 + + # The number of impressions sold by partner in partner sales. + PARTNER_SOLD_IMPRESSIONS = 123 + + # The total number of ad requests eligible for programmatic inventory, + # including Programmatic Guaranteed, Preferred Deals, backfill, and open + # auction. + PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177 + + # The number of programmatic responses served divided by the number of + # programmatic eligible ad requests. Includes Ad Exchange, Open Bidding, + # and Preferred Deals. + PROGRAMMATIC_MATCH_RATE = 178 + + # Total number of ad responses served from programmatic demand sources. + # Includes Ad Exchange, Open Bidding, and Preferred Deals. + # + # Differs from AD_EXCHANGE_RESPONSES_SERVED, which doesn't include Open + # Bidding ad requests. + PROGRAMMATIC_RESPONSES_SERVED = 176 + + # The total number of times that an ad is served by the ad server including + # dynamic allocation. + RESPONSES_SERVED = 39 + + # Total amount of CPM, CPC, and CPD revenue based on the number of units + # served by the Google Ad Manager server, AdSense, Ad Exchange, and + # third-party Mediation networks. + REVENUE = 36 + + # Total amount of revenue (excluding CPD) based on the number of units + # served by the Google Ad Manager server, AdSense, Ad Exchange, and + # third-party Mediation networks. + REVENUE_WITHOUT_CPD = 4 + + # The average latency in milliseconds across all server-side unwrapping + # callout requests. There is no special handling for error or timeout + # responses. This reflects the entire chain of a parent callout request, + # which may result in multiple child callouts. This metric is not sliced by + # child callout dimensions. + SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS = 434 + + # The total number of server-side unwrapping callout requests. + SERVER_SIDE_UNWRAPPING_CALLOUTS = 435 + + # The total number of server-side unwrapping callouts that returned an + # empty response. Timeouts are not considered empty responses. + SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES = 436 + + # The total number of server-side unwrapping callouts that returned an + # error response. Timeouts and empty responses are not considered errors. + SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES = 437 + + # The total number of successfully unwrapped, non-empty server-side + # wrapping callouts. Successful unwrapping does not indicate that the + # resulting creative was served. + SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES = 438 + + # The total number of server-side unwrapping callouts that timed out before + # returning a response. + SERVER_SIDE_UNWRAPPING_TIMEOUTS = 439 + + # The total number of missed impressions due to the ad servers' inability + # to find ads to serve including dynamic allocation. + UNFILLED_IMPRESSIONS = 45 + + # The total number of times that an ad is not returned by the ad server. + UNMATCHED_AD_REQUESTS = 43 + + # Number of times an Offerwall message was shown to users. + USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121 + + # The number of messages where the user gained an entitlement. + USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122 + + # The number of user interactions with a video, on average, such as pause, + # full screen, mute, etc. + VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92 + + # The number of times a user collapses a video, either to its original size + # or to a different size. + VIDEO_INTERACTION_COLLAPSES = 93 + + # The number of times a user expands a video. + VIDEO_INTERACTION_EXPANDS = 95 + + # The number of times ad clip played in full screen mode. + VIDEO_INTERACTION_FULL_SCREENS = 96 + + # The number of times video player was in mute state during play of ad + # clip. + VIDEO_INTERACTION_MUTES = 97 + + # The number of times user paused ad clip. + VIDEO_INTERACTION_PAUSES = 98 + + # The number of times the user unpaused the video. + VIDEO_INTERACTION_RESUMES = 99 + + # The number of times a user rewinds the video. + VIDEO_INTERACTION_REWINDS = 100 + + # The number of times a user unmutes the video. + VIDEO_INTERACTION_UNMUTES = 101 + + # The number of times a skippable video is skipped. + VIDEO_INTERACTION_VIDEO_SKIPS = 102 + + # The number of total creative serves in video realtime reporting. + VIDEO_REAL_TIME_CREATIVE_SERVES = 139 + + # The number of errors of type 100 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_100_COUNT = 143 + + # The number of errors of type 101 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_101_COUNT = 144 + + # The number of errors of type 102 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_102_COUNT = 145 + + # The number of errors of type 200 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_200_COUNT = 146 + + # The number of errors of type 201 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_201_COUNT = 147 + + # The number of errors of type 202 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_202_COUNT = 148 + + # The number of errors of type 203 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_203_COUNT = 149 + + # The number of errors of type 300 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_300_COUNT = 150 + + # The number of errors of type 301 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_301_COUNT = 151 + + # The number of errors of type 302 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_302_COUNT = 152 + + # The number of errors of type 303 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_303_COUNT = 153 + + # The number of errors of type 400 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_400_COUNT = 154 + + # The number of errors of type 401 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_401_COUNT = 155 + + # The number of errors of type 402 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_402_COUNT = 156 + + # The number of errors of type 403 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_403_COUNT = 157 + + # The number of errors of type 405 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_405_COUNT = 158 + + # The number of errors of type 406 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_406_COUNT = 159 + + # The number of errors of type 407 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_407_COUNT = 160 + + # The number of errors of type 408 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_408_COUNT = 161 + + # The number of errors of type 409 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_409_COUNT = 162 + + # The number of errors of type 410 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_410_COUNT = 163 + + # The number of errors of type 500 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_500_COUNT = 164 + + # The number of errors of type 501 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_501_COUNT = 165 + + # The number of errors of type 502 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_502_COUNT = 166 + + # The number of errors of type 503 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_503_COUNT = 167 + + # The number of errors of type 600 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_600_COUNT = 168 + + # The number of errors of type 601 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_601_COUNT = 169 + + # The number of errors of type 602 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_602_COUNT = 170 + + # The number of errors of type 603 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_603_COUNT = 171 + + # The number of errors of type 604 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_604_COUNT = 172 + + # The number of errors of type 900 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_900_COUNT = 173 + + # The number of errors of type 901 in video realtime reporting. + VIDEO_REAL_TIME_ERROR_901_COUNT = 174 + + # The number of total impressions in video realtime reporting. + VIDEO_REAL_TIME_IMPRESSIONS = 138 + + # The number of matched queries in video realtime reporting. + VIDEO_REAL_TIME_MATCHED_QUERIES = 140 + + # The number of all errors in video realtime reporting. + VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175 + + # The number of total queries in video realtime reporting. + VIDEO_REAL_TIME_TOTAL_QUERIES = 142 + + # The number of unmatched queries in video realtime reporting. + VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141 + + # Number of times that the publisher specified a video ad played + # automatically. + VIDEO_VIEWERSHIP_AUTO_PLAYS = 103 + + # Average percentage of the video watched by users. + VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104 + + # Average time(seconds) users watched the video. + VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105 + + # Number of times that the publisher specified a video ad was clicked to + # play. + VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106 + + # The number of times the video played to completion. + VIDEO_VIEWERSHIP_COMPLETES = 107 + + # Percentage of times the video played to the end. + VIDEO_VIEWERSHIP_COMPLETION_RATE = 108 + + # The number of engaged views: ad is viewed to completion or for 30s, + # whichever comes first. + VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109 + + # The number of times the video played to 25% of its length. + VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110 + + # The number of times the video reached its midpoint during play. + VIDEO_VIEWERSHIP_MIDPOINTS = 111 + + # The number of times a skip button is shown in video. + VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112 + + # The number of impressions where the video was played. + VIDEO_VIEWERSHIP_STARTS = 113 + + # The number of times the video played to 75% of its length. + VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114 + + # The number of times an error occurred, such as a VAST redirect error, a + # video playback error, or an invalid response error. + VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115 + + # The percentage of video error count. + VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94 + + # Duration of the video creative. + VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116 + + # View-through rate represented as a percentage. + VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117 + + # Number of winning bids received from Open Bidding buyers, even when the + # winning bid is placed at the end of a mediation for mobile apps chain. + YIELD_GROUP_AUCTIONS_WON = 80 + + # Number of bids received from Open Bidding buyers, regardless of whether + # the returned bid competes in an auction. + YIELD_GROUP_BIDS = 81 + + # Number of bids received from Open Bidding buyers that competed in + # the auction. + YIELD_GROUP_BIDS_IN_AUCTION = 82 + + # Number of times a yield partner is asked to return bid to fill + # a yield group request. + YIELD_GROUP_CALLOUTS = 83 + + # The estimated net rate for yield groups or individual + # yield group partners. + YIELD_GROUP_ESTIMATED_CPM = 88 + + # Total net revenue earned by a yield group, based upon the yield group + # estimated CPM and yield group impressions recorded. + YIELD_GROUP_ESTIMATED_REVENUE = 87 + + # Number of matched yield group requests where a yield partner delivered + # their ad to publisher inventory. + YIELD_GROUP_IMPRESSIONS = 85 + + # Yield group Mediation fill rate indicating how often a network + # fills an ad request. + YIELD_GROUP_MEDIATION_FILL_RATE = 89 + + # Total requests where a Mediation chain was served. + YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86 + + # The number of mediation chain passback across all channels. + YIELD_GROUP_MEDIATION_PASSBACKS = 118 + + # Revenue per thousand impressions based on data collected by Ad Manager + # from third-party ad network reports. + YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90 + + # Number of times a yield group buyer successfully returned a bid in + # response to a yield group callout. + YIELD_GROUP_SUCCESSFUL_RESPONSES = 84 + end + + # Possible metric value types to add. + module MetricValueType + # The values for the primary date_range. + PRIMARY = 0 + + # Each metrics' percent of the total for the primary date_range. + PRIMARY_PERCENT_OF_TOTAL = 1 + + # The values for the comparison_date_range. + COMPARISON = 2 + + # Each metrics' percent of the total for the comparison_date_range. + COMPARISON_PERCENT_OF_TOTAL = 3 + + # The absolute change between the primary and comparison date ranges. + ABSOLUTE_CHANGE = 4 + + # The relative change between the primary and comparison date ranges. + RELATIVE_CHANGE = 5 + end + + # Supported report types. + module ReportType + # Default value. This value is unused. + REPORT_TYPE_UNSPECIFIED = 0 + + # Historical. + HISTORICAL = 1 + end + + # The visibility of a report. + module Visibility + # Default value. Reports with hidden visibility will not appear in the Ad + # Manager UI. + HIDDEN = 0 + + # Reports with draft visibility will appear in the Ad Manager UI only if + # the user has configured the UI to show them. + DRAFT = 1 + + # Reports with saved visibility will appear in the Ad Manager UI by + # default. + SAVED = 2 + end + + # The source to determine the time zone for the report. + module TimeZoneSource + # Unspecified default value. + TIME_ZONE_SOURCE_UNSPECIFIED = 0 + + # Use the publisher's time zone in network settings. + PUBLISHER = 1 + + # Use the time zone of the ad exchange. + # Only compatible with Ad Exchange dimensions and metrics. + AD_EXCHANGE = 2 + + # Use UTC time zone. + # Only compatible with Revenue Verification reports. + UTC = 3 + + # Use the time zone provided in the ReportDefinition.time_zone field. + # Has limited dimension and metric compatibility compared with PUBLISHER, + # and reports may take longer to run since the dates are dynamically + # calculated at request time. + PROVIDED = 4 + end + end + + # The definition of how a report should be run. + # @!attribute [rw] dimensions + # @return [::Array<::Google::Ads::AdManager::V1::Report::Dimension>] + # Required. The list of dimensions to report on. If empty, the report will + # have no dimensions, and any metrics will be totals. + # @!attribute [rw] metrics + # @return [::Array<::Google::Ads::AdManager::V1::Report::Metric>] + # Required. The list of metrics to report on. If empty, the report will have + # no metrics. + # @!attribute [rw] filters + # @return [::Array<::Google::Ads::AdManager::V1::Report::Filter>] + # Optional. The filters for this report. + # @!attribute [rw] time_zone_source + # @return [::Google::Ads::AdManager::V1::Report::TimeZoneSource] + # Optional. Where to get the time zone for this report. Defaults to using the + # network time zone setting (PUBLISHER). If source is PROVIDED, the time_zone + # field in the report definition must also be provided with the desired time + # zone. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. If time_zone_source is PROVIDED, this is the time zone to use for + # this report. Leave empty for any other time zone source. Time zone in IANA + # format (e.g. "America/New_York"). + # @!attribute [rw] currency_code + # @return [::String] + # Optional. The ISO 4217 currency code for this report. Defaults to publisher + # currency code if not specified. + # @!attribute [rw] date_range + # @return [::Google::Ads::AdManager::V1::Report::DateRange] + # Required. The primary date range of this report. + # @!attribute [rw] comparison_date_range + # @return [::Google::Ads::AdManager::V1::Report::DateRange] + # Optional. The comparison date range of this report. If unspecified, the + # report will not have any comparison metrics. + # @!attribute [rw] custom_dimension_key_ids + # @return [::Array<::Integer>] + # Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* + # dimensions. The index of this repeated field corresponds to the index on + # each dimension. For example, custom_dimension_key_ids[0] describes + # CUSTOM_DIMENSION_0_VALUE_ID and CUSTOM_DIMENSION_0_VALUE. + # @!attribute [rw] line_item_custom_field_ids + # @return [::Array<::Integer>] + # Optional. Custom field IDs that represent LINE_ITEM_CUSTOM_FIELD_* + # dimensions. The index of this repeated field corresponds to the index on + # each dimension. For example, line_item_custom_field_ids[0] describes + # LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID and LINE_ITEM_CUSTOM_FIELD_0_VALUE. + # @!attribute [rw] order_custom_field_ids + # @return [::Array<::Integer>] + # Optional. Custom field IDs that represent ORDER_CUSTOM_FIELD_* + # dimensions. The index of this repeated field corresponds to the index on + # each dimension. For example, order_custom_field_ids[0] describes + # ORDER_CUSTOM_FIELD_0_OPTION_ID and ORDER_CUSTOM_FIELD_0_VALUE. + # @!attribute [rw] creative_custom_field_ids + # @return [::Array<::Integer>] + # Optional. Custom field IDs that represent CREATIVE_CUSTOM_FIELD_* + # dimensions. The index of this repeated field corresponds to the index on + # each dimension. For example, creative_custom_field_ids[0] describes + # CREATIVE_CUSTOM_FIELD_0_OPTION_ID and CREATIVE_CUSTOM_FIELD_0_VALUE. + # @!attribute [rw] report_type + # @return [::Google::Ads::AdManager::V1::Report::ReportType] + # Required. The type of this report. + # @!attribute [rw] time_period_column + # @return [::Google::Ads::AdManager::V1::Report::TimePeriodColumn] + # Optional. Include a time period column to introduce comparison columns in + # the report for each generated period. For example, set to "QUARTERS" here + # to have a column for each quarter present in the primary date range. If + # "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter + # column will also include comparison values for its relative previous + # quarter. + # @!attribute [rw] flags + # @return [::Array<::Google::Ads::AdManager::V1::Report::Flag>] + # Optional. List of flags for this report. Used to flag rows in a result set + # based on a set of defined filters. + # @!attribute [rw] sorts + # @return [::Array<::Google::Ads::AdManager::V1::Report::Sort>] + # Optional. Default sorts to apply to this report. + class ReportDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The options for a scheduled report. + # @!attribute [rw] schedule + # @return [::Google::Ads::AdManager::V1::Schedule] + # Information pertaining to schedule itself. + # @!attribute [rw] delivery_condition + # @return [::Google::Ads::AdManager::V1::ScheduleOptions::DeliveryCondition] + # Option for when to deliver the scheduled report. + # @!attribute [rw] flags + # @return [::Array<::Google::Ads::AdManager::V1::Report::Flag>] + # Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT + # is specified. + class ScheduleOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Condition for when to email the scheduled report. + module DeliveryCondition + # Never deliver report. + NEVER = 0 + + # Always deliver report. + ALWAYS = 1 + + # Deliver report when flag's conditions are met. + WHEN_FLAG_CONDITIONS_MET = 2 + end + end + + # The schedule for the report + # @!attribute [rw] weekly_schedule + # @return [::Google::Ads::AdManager::V1::Schedule::WeeklySchedule] + # Days of week to schedule report run. + # + # Note: The following fields are mutually exclusive: `weekly_schedule`, `monthly_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] monthly_schedule + # @return [::Google::Ads::AdManager::V1::Schedule::MonthlySchedule] + # Days of month to schedule report run. + # + # Note: The following fields are mutually exclusive: `monthly_schedule`, `weekly_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Date for the first run of the report. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Date for the final run of the report. + # @!attribute [rw] frequency + # @return [::Google::Ads::AdManager::V1::Schedule::Frequency] + # Frequency to run report. + # @!attribute [rw] start_time + # @return [::Google::Type::TimeOfDay] + # Indicates start time for schedule to run + # Will use the time_zone from `ReportDefinition`. Defaults + # to the publisher's time zone if not specified. + # + # For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + # will be the time of day that the first report will run on the first day. + # For example, if the start time is 2:00 PM, and the frequency is + # THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + # 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + # 2:00 PM, 10:00 PM. + class Schedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Days of week to schedule report run. + # @!attribute [rw] weekly_scheduled_days + # @return [::Array<::Google::Type::DayOfWeek>] + # Specifies days of the week on which to run report. + class WeeklySchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Days of Month to schedule report run. + # @!attribute [rw] monthly_scheduled_days + # @return [::Array<::Integer>] + # Specifies days of the month to run report. Range is from 1-31. + # Will ignore days that are not valid for the given month. + class MonthlySchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Frequency to run report. + module Frequency + # No Frequency specified. + FREQUENCY_UNSPECIFIED = 0 + + # Schedule report to run every hour. + HOURLY = 1 + + # Schedule report to run twice a day (every 12 hours). + TWO_TIMES_DAILY = 2 + + # Schedule report to run three times a day (every 8 hours). + THREE_TIMES_DAILY = 3 + + # Schedule report to run four times a day (every 6 hours). + FOUR_TIMES_DAILY = 4 + + # Schedule report to run on a daily basis. + DAILY = 5 + + # Schedule report to run on a weekly basis. + WEEKLY = 6 + + # Schedule report to run on a monthly basis. + MONTHLY = 7 + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/report_service.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/report_service.rb index 626afa6b5921..634b8df4d135 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/report_service.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/report_service.rb @@ -21,3118 +21,6 @@ module Google module Ads module AdManager module V1 - # The `Report` resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the report. - # Report resource name have the form: - # `networks/{network_code}/reports/{report_id}` - # @!attribute [r] report_id - # @return [::Integer] - # Output only. Report ID. - # @!attribute [rw] visibility - # @return [::Google::Ads::AdManager::V1::Report::Visibility] - # Optional. The visibility of a report. - # @!attribute [rw] report_definition - # @return [::Google::Ads::AdManager::V1::ReportDefinition] - # Required. The report definition of the report. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name for the report. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instant this report was last modified. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instant this report was created. - # @!attribute [r] locale - # @return [::String] - # Output only. The locale of this report. Locale is set from the user's - # locale at the time of the request. Locale can not be modified. - # @!attribute [rw] schedule_options - # @return [::Google::Ads::AdManager::V1::ScheduleOptions] - # Optional. The schedule options of this report. - class Report - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a single value in a report. - # @!attribute [rw] int_value - # @return [::Integer] - # For integer values. - # - # Note: The following fields are mutually exclusive: `int_value`, `double_value`, `string_value`, `bool_value`, `int_list_value`, `string_list_value`, `bytes_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] - # For double values. - # - # Note: The following fields are mutually exclusive: `double_value`, `int_value`, `string_value`, `bool_value`, `int_list_value`, `string_list_value`, `bytes_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] - # For string values. - # - # Note: The following fields are mutually exclusive: `string_value`, `int_value`, `double_value`, `bool_value`, `int_list_value`, `string_list_value`, `bytes_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # For boolean values. - # - # Note: The following fields are mutually exclusive: `bool_value`, `int_value`, `double_value`, `string_value`, `int_list_value`, `string_list_value`, `bytes_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int_list_value - # @return [::Google::Ads::AdManager::V1::Report::Value::IntList] - # For lists of integer values. - # - # Note: The following fields are mutually exclusive: `int_list_value`, `int_value`, `double_value`, `string_value`, `bool_value`, `string_list_value`, `bytes_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_list_value - # @return [::Google::Ads::AdManager::V1::Report::Value::StringList] - # For lists of string values. - # - # Note: The following fields are mutually exclusive: `string_list_value`, `int_value`, `double_value`, `string_value`, `bool_value`, `int_list_value`, `bytes_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bytes_value - # @return [::String] - # For bytes values. - # - # Note: The following fields are mutually exclusive: `bytes_value`, `int_value`, `double_value`, `string_value`, `bool_value`, `int_list_value`, `string_list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of integer values. - # @!attribute [rw] values - # @return [::Array<::Integer>] - # The values - class IntList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of string values. - # @!attribute [rw] values - # @return [::Array<::String>] - # The values - class StringList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents a sorting in a report. - # @!attribute [rw] field - # @return [::Google::Ads::AdManager::V1::Report::Field] - # Required. A field (dimension or metric) to sort by. - # @!attribute [rw] descending - # @return [::Boolean] - # Optional. The sort order. If true the sort will be descending. - # @!attribute [rw] slice - # @return [::Google::Ads::AdManager::V1::Report::Slice] - # Optional. Use to sort on a specific slice of data. - # @!attribute [rw] time_period_index - # @return [::Integer] - # Optional. When using time period columns, use this to sort on a specific - # column. - # @!attribute [rw] metric_value_type - # @return [::Google::Ads::AdManager::V1::Report::MetricValueType] - # Optional. Use to specify which metric value type to sort on. Defaults to - # PRIMARY. - class Sort - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A table containing report data including dimension and metric values. - class DataTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A row of report data. - # @!attribute [rw] dimension_values - # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] - # The order of the dimension values is the same as the order of the - # dimensions specified in the request. - # @!attribute [rw] metric_value_groups - # @return [::Array<::Google::Ads::AdManager::V1::Report::DataTable::MetricValueGroup>] - # The length of the metric_value_groups - # field will be equal to the length of the date_ranges field in the - # fetch response. The metric_value_groups field is - # ordered such that each index corresponds to the date_range at the same - # index. For example, given date_ranges [x, y], metric_value_groups will - # have a length of two. The first entry in metric_value_groups represents - # the metrics for date x and the second entry in metric_value_groups - # represents the metrics for date y. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains all metric values requested for a single date range and set of - # column dimension values (returned in the columns field of the response). - # The order of the metrics in each field corresponds to the order of the - # metrics specified in the request. - # @!attribute [rw] primary_values - # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] - # Data for the PRIMARY MetricValueType. - # @!attribute [rw] primary_percent_of_total_values - # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] - # Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. - # @!attribute [rw] comparison_values - # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] - # Data for the COMPARISON MetricValueType. - # @!attribute [rw] comparison_percent_of_total_values - # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] - # Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. - # @!attribute [rw] absolute_change_values - # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] - # Data for the ABSOLUTE_CHANGE MetricValueType. - # @!attribute [rw] relative_change_values - # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] - # Data for the RELATIVE_CHANGE MetricValueType. - # @!attribute [rw] flag_values - # @return [::Array<::Boolean>] - # If true, the flag's conditions are met. If false, the flag's - # conditions are not met. flag_values has the same length as - # flags and index i of flag_values represents the flag at index i - # of flags. - class MetricValueGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A dimension or a metric in a report. - # @!attribute [rw] dimension - # @return [::Google::Ads::AdManager::V1::Report::Dimension] - # The dimension this field represents. - # - # Note: The following fields are mutually exclusive: `dimension`, `metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] metric - # @return [::Google::Ads::AdManager::V1::Report::Metric] - # The metric this field represents. - # - # Note: The following fields are mutually exclusive: `metric`, `dimension`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Use to specify a slice of data. - # - # For example, in a report, to focus on just data from the US, specify - # `COUNTRY_NAME` for dimension and value: `"United States"`. - # @!attribute [rw] dimension - # @return [::Google::Ads::AdManager::V1::Report::Dimension] - # Required. The dimension to slice on. - # @!attribute [rw] value - # @return [::Google::Ads::AdManager::V1::Report::Value] - # Required. The value of the dimension. - class Slice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A filter over one or more fields. - # @!attribute [rw] field_filter - # @return [::Google::Ads::AdManager::V1::Report::Filter::FieldFilter] - # A filter on a single field. - # - # Note: The following fields are mutually exclusive: `field_filter`, `not_filter`, `and_filter`, `or_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] not_filter - # @return [::Google::Ads::AdManager::V1::Report::Filter] - # A filter whose result is negated. - # - # Note: The following fields are mutually exclusive: `not_filter`, `field_filter`, `and_filter`, `or_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] and_filter - # @return [::Google::Ads::AdManager::V1::Report::Filter::FilterList] - # A list of filters whose results are AND-ed. - # - # Note: The following fields are mutually exclusive: `and_filter`, `field_filter`, `not_filter`, `or_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] or_filter - # @return [::Google::Ads::AdManager::V1::Report::Filter::FilterList] - # A list of filters whose results are OR-ed. - # - # Note: The following fields are mutually exclusive: `or_filter`, `field_filter`, `not_filter`, `and_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Filter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A filter on a specific field. - # @!attribute [rw] field - # @return [::Google::Ads::AdManager::V1::Report::Field] - # Required. The field to filter on. - # @!attribute [rw] operation - # @return [::Google::Ads::AdManager::V1::Report::Filter::Operation] - # Required. The operation of this filter. - # @!attribute [rw] values - # @return [::Array<::Google::Ads::AdManager::V1::Report::Value>] - # Required. Values to filter to. - # @!attribute [rw] slice - # @return [::Google::Ads::AdManager::V1::Report::Slice] - # Optional. Use to filter on a specific slice of data. - # @!attribute [rw] time_period_index - # @return [::Integer] - # Optional. When using time period columns, use this to filter on a - # specific column. - # @!attribute [rw] metric_value_type - # @return [::Google::Ads::AdManager::V1::Report::MetricValueType] - # Optional. Use to specify which metric value type to filter on. Defaults - # to PRIMARY. - class FieldFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of filters. - # @!attribute [rw] filters - # @return [::Array<::Google::Ads::AdManager::V1::Report::Filter>] - # Required. A list of filters. - class FilterList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Supported filter operations. - module Operation - # For scalar operands, checks if the operand is in the set of provided - # filter values. - # - # For list operands, checks if any element in the operand is in the set - # of provided filter values. - # - # Default value. - IN = 0 - - # For scalar operands, checks that the operand is not in the set of - # provided filter values. - # - # For list operands, checks that none of the elements in the operand - # is in the set of provided filter values. - NOT_IN = 1 - - # For scalar string operands, checks if the operand contains any of the - # provided filter substrings. - # - # For string list operands, checks if any string in the operand contains - # any of the provided filter substrings. - CONTAINS = 2 - - # For scalar string operands, checks that the operand contains none of - # the provided filter substrings. - # - # For string list operands, checks that none of the strings in the - # operand contain none of the provided filter substrings. - NOT_CONTAINS = 3 - - # Operand is less than the provided filter value. - LESS_THAN = 4 - - # Operand is less than or equal to provided filter value. - LESS_THAN_EQUALS = 5 - - # Operand is greater than provided filter value. - GREATER_THAN = 6 - - # Operand is greater than or equal to provided filter value. - GREATER_THAN_EQUALS = 7 - - # Operand is between provided filter values. - BETWEEN = 8 - - # Operand matches against a regex or set of regexes (one must match) - MATCHES = 9 - - # Operand negative matches against a regex or set of regexes (none must - # match) - NOT_MATCHES = 10 - end - end - - # A flag for a report. Flags are used show if certain thresholds are met. - # Result rows that match the filter will have the corresponding - # [MetricValueGroup.flagValues][MetricValueGroup] index set to true. - # For more information about flags see: - # https://support.google.com/admanager/answer/15079975 - # @!attribute [rw] filters - # @return [::Array<::Google::Ads::AdManager::V1::Report::Filter>] - # Required. Filters to apply for the flag. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the flag. - # The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to - # the colored flags that appear in the UI. The UI will not display flags - # with other names, but they are available for use by API clients. - class Flag - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A date range for a report. - # @!attribute [rw] fixed - # @return [::Google::Ads::AdManager::V1::Report::DateRange::FixedDateRange] - # A fixed date range. - # - # Note: The following fields are mutually exclusive: `fixed`, `relative`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] relative - # @return [::Google::Ads::AdManager::V1::Report::DateRange::RelativeDateRange] - # A relative date range. - # - # Note: The following fields are mutually exclusive: `relative`, `fixed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A date range between two fixed dates (inclusive of end date). - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Required. The start date of this date range. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Required. The end date (inclusive) of this date range. - class FixedDateRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for relative date ranges. - module RelativeDateRange - # Default value. This value is unused. - RELATIVE_DATE_RANGE_UNSPECIFIED = 0 - - # The date the report is run. - TODAY = 1 - - # The date a day before the date that the report is run. - YESTERDAY = 2 - - # The full week in which this report is run. Could include dates in - # the future. - THIS_WEEK = 3 - - # From the beginning of the calendar week (Monday to Sunday) in which the - # up to and including the day the report is run. - THIS_WEEK_TO_DATE = 29 - - # The full month in which this report is run. Could include dates in - # the future. - THIS_MONTH = 4 - - # From the beginning of the calendar month in which the report is run, to - # up to and including the day the report is run. - THIS_MONTH_TO_DATE = 26 - - # The full quarter in which this report is run. Could include dates - # in the future. - THIS_QUARTER = 5 - - # From the beginning of the calendar quarter in which the report is run, - # up to and including the day the report is run. - THIS_QUARTER_TO_DATE = 27 - - # The full year in which this report is run. Could include dates in - # the future. - THIS_YEAR = 6 - - # From the beginning of the calendar year in which the report is run, to - # up to and including the day the report is run. - THIS_YEAR_TO_DATE = 28 - - # The entire previous calendar week, Monday to Sunday (inclusive), - # preceding the calendar week the report is run. - LAST_WEEK = 7 - - # The entire previous calendar month preceding the calendar month the - # report is run. - LAST_MONTH = 8 - - # The entire previous calendar quarter preceding the calendar quarter the - # report is run. - LAST_QUARTER = 9 - - # The entire previous calendar year preceding the calendar year the - # report is run. - LAST_YEAR = 10 - - # The 7 days preceding the day the report is run. - LAST_7_DAYS = 11 - - # The 30 days preceding the day the report is run. - LAST_30_DAYS = 12 - - # The 60 days preceding the day the report is run. - LAST_60_DAYS = 13 - - # The 90 days preceding the day the report is run. - LAST_90_DAYS = 14 - - # The 180 days preceding the day the report is run. - LAST_180_DAYS = 15 - - # The 360 days preceding the day the report is run. - LAST_360_DAYS = 16 - - # The 365 days preceding the day the report is run. - LAST_365_DAYS = 17 - - # The entire previous 3 calendar months preceding the calendar month the - # report is run. - LAST_3_MONTHS = 18 - - # The entire previous 6 calendar months preceding the calendar month the - # report is run. - LAST_6_MONTHS = 19 - - # The entire previous 6 calendar months preceding the calendar month the - # report is run. - LAST_12_MONTHS = 20 - - # From 3 years before the report is run, to the day before the report is - # run, inclusive. - ALL_AVAILABLE = 21 - - # Only valid when used in the comparison_date_range field. The complete - # period preceding the date period provided in date_range. - # - # In the case where date_range is a FixedDateRange of N days, this will - # be a period of N days where the end date is the date preceding the - # start date of the date_range. - # - # In the case where date_range is a RelativeDateRange, this will be a - # period of the same time frame preceding the date_range. In the case - # where the date_range does not capture the full period because a report - # is run in the middle of that period, this will still be the full - # preceding period. For example, if date_range is THIS_WEEK, but the - # report is run on a Wednesday, THIS_WEEK will be Monday - Wednesday, but - # PREVIOUS_PERIOD will be Monday - Sunday. - PREVIOUS_PERIOD = 22 - - # Only valid when used in the comparison_date_range field. The period - # starting 1 year prior to the date period provided in date_range. - # - # In the case where date_range is a FixedDateRange, this will be a date - # range starting 1 year prior to the date_range start date and ending 1 - # year prior to the date_range end date. - # - # In the case where date_range is a RelativeDateRange, this will be a - # period of the same time frame exactly 1 year prior to the date_range. - # In the case where the date_range does not capture the full period - # because a report is run in the middle of that period, this will still - # be the full period 1 year prior. For example, if date range is - # THIS_WEEK, but the report is run on a Wednesday, THIS_WEEK will be - # Monday - Wednesday, but SAME_PERIOD_PREVIOUS_YEAR will be Monday - - # Sunday. - SAME_PERIOD_PREVIOUS_YEAR = 24 - end - end - - # Valid time period columns. - module TimePeriodColumn - # Default value. Report will have no time period column. - TIME_PERIOD_COLUMN_UNSPECIFIED = 0 - - # A column for each date in the report. - TIME_PERIOD_COLUMN_DATE = 1 - - # A column for each week in the report. - TIME_PERIOD_COLUMN_WEEK = 2 - - # A column for each month in the report. - TIME_PERIOD_COLUMN_MONTH = 3 - - # A column for each quarter in the report. - TIME_PERIOD_COLUMN_QUARTER = 4 - end - - # Reporting dimensions. - module Dimension - # Default value. This value is unused. - DIMENSION_UNSPECIFIED = 0 - - # The domain name of the advertiser. - ADVERTISER_DOMAIN_NAME = 242 - - # The ID used in an external system for advertiser identification - ADVERTISER_EXTERNAL_ID = 228 - - # The ID of an advertiser company assigned to an order - ADVERTISER_ID = 131 - - # Labels applied to the advertiser - # can be used for either competitive exclusion or ad exclusion - ADVERTISER_LABELS = 230 - - # Label ids applied to the advertiser - # can be used for either competitive exclusion or ad exclusion - ADVERTISER_LABEL_IDS = 229 - - # The name of an advertiser company assigned to an order - ADVERTISER_NAME = 132 - - # The name of the contact associated with an advertiser company - ADVERTISER_PRIMARY_CONTACT = 227 - - # Shows an ENUM value describing whether a given piece of publisher - # inventory was above (ATF) or below the fold (BTF) of a page. - AD_LOCATION = 390 - - # Shows a localized string describing whether a given piece of publisher - # inventory was above (ATF) or below the fold (BTF) of a page. - AD_LOCATION_NAME = 391 - - # The code of the ad unit where the ad was requested. - AD_UNIT_CODE = 64 - - # The code of the first level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_1 = 65 - - # The code of the tenth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_10 = 74 - - # The code of the eleventh level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_11 = 75 - - # The code of the twelfth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_12 = 76 - - # The code of the thirteenth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_13 = 77 - - # The code of the fourteenth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_14 = 78 - - # The code of the fifteenth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_15 = 79 - - # The code of the sixteenth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_16 = 80 - - # The code of the second level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_2 = 66 - - # The code of the third level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_3 = 67 - - # The code of the fourth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_4 = 68 - - # The code of the fifth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_5 = 69 - - # The code of the sixth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_6 = 70 - - # The code of the seventh level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_7 = 71 - - # The code of the eighth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_8 = 72 - - # The code of the ninth level ad unit of the ad unit where the ad was - # requested. - AD_UNIT_CODE_LEVEL_9 = 73 - - # The depth of the ad unit's hierarchy - AD_UNIT_DEPTH = 101 - - # The ID of the ad unit where the ad was requested. - AD_UNIT_ID = 25 - - # The full hierarchy of ad unit IDs where the ad was requested, from - # root to leaf, excluding the root ad unit ID. - AD_UNIT_ID_ALL_LEVEL = 27 - - # The first level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_1 = 30 - - # The tenth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_10 = 48 - - # The eleventh level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_11 = 50 - - # The twelfth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_12 = 52 - - # The thirteenth level ad unit ID of the ad unit where the ad was - # requested. - AD_UNIT_ID_LEVEL_13 = 54 - - # The fourteenth level ad unit ID of the ad unit where the ad was - # requested. - AD_UNIT_ID_LEVEL_14 = 56 - - # The fifteenth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_15 = 58 - - # The sixteenth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_16 = 60 - - # The second level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_2 = 32 - - # The third level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_3 = 34 - - # The fourth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_4 = 36 - - # The fifth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_5 = 38 - - # The sixth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_6 = 40 - - # The seventh level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_7 = 42 - - # The eighth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_8 = 44 - - # The ninth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_9 = 46 - - # The top-level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_TOP_LEVEL = 142 - - # The name of the ad unit where the ad was requested. - AD_UNIT_NAME = 26 - - # The full hierarchy of ad unit names where the ad was requested, from - # root to leaf, excluding the root ad unit name. - AD_UNIT_NAME_ALL_LEVEL = 29 - - # The first level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_1 = 31 - - # The tenth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_10 = 49 - - # The eleventh level ad unit name of the ad unit where the ad was - # requested. - AD_UNIT_NAME_LEVEL_11 = 51 - - # The twelfth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_12 = 53 - - # The thirteenth level ad unit name of the ad unit where the ad was - # requested. - AD_UNIT_NAME_LEVEL_13 = 55 - - # The fourteenth level ad unit name of the ad unit where the ad was - # requested. - AD_UNIT_NAME_LEVEL_14 = 57 - - # The fifteenth level ad unit name of the ad unit where the ad was - # requested. - AD_UNIT_NAME_LEVEL_15 = 59 - - # The sixteenth level ad unit name of the ad unit where the ad was - # requested. - AD_UNIT_NAME_LEVEL_16 = 61 - - # The second level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_2 = 33 - - # The third level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_3 = 35 - - # The fourth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_4 = 37 - - # The fifth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_5 = 39 - - # The sixth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_6 = 41 - - # The seventh level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_7 = 43 - - # The eighth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_8 = 45 - - # The ninth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_9 = 47 - - # The top-level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_TOP_LEVEL = 143 - - # The reward amount of the ad unit where the ad was requested. - AD_UNIT_REWARD_AMOUNT = 63 - - # The reward type of the ad unit where the ad was requested. - AD_UNIT_REWARD_TYPE = 62 - - # The status of the ad unit - AD_UNIT_STATUS = 206 - - # The name of the status of the ad unit - AD_UNIT_STATUS_NAME = 207 - - # The app version. - APP_VERSION = 392 - - # The ID used in an external system for advertiser identification - BACKFILL_ADVERTISER_EXTERNAL_ID = 349 - - # The ID of an advertiser company assigned to a backfill order - BACKFILL_ADVERTISER_ID = 346 - - # Labels applied to the advertiser - # can be used for either competitive exclusion or ad exclusion - BACKFILL_ADVERTISER_LABELS = 351 - - # Label ids applied to the advertiser - # can be used for either competitive exclusion or ad exclusion - BACKFILL_ADVERTISER_LABEL_IDS = 350 - - # The name of an advertiser company assigned to a backfill order - BACKFILL_ADVERTISER_NAME = 347 - - # The name of the contact associated with an advertiser company - BACKFILL_ADVERTISER_PRIMARY_CONTACT = 348 - - # Enum value of Backfill creative billing type - BACKFILL_CREATIVE_BILLING_TYPE = 378 - - # Localized string value of Backfill creative billing type - BACKFILL_CREATIVE_BILLING_TYPE_NAME = 379 - - # Represents the click-through URL of a Backfill creative - BACKFILL_CREATIVE_CLICK_THROUGH_URL = 376 - - # The ID of a Backfill creative - BACKFILL_CREATIVE_ID = 370 - - # Backfill creative name - BACKFILL_CREATIVE_NAME = 371 - - # Third party vendor name of a Backfill creative - BACKFILL_CREATIVE_THIRD_PARTY_VENDOR = 377 - - # Enum value of Backfill creative type - BACKFILL_CREATIVE_TYPE = 374 - - # Localized string name of Backfill creative type - BACKFILL_CREATIVE_TYPE_NAME = 375 - - # Whether a Backfill line item is archived. - BACKFILL_LINE_ITEM_ARCHIVED = 278 - - # Backfill line item comanion delivery option ENUM value. - BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION = 258 - - # Localized Backfill line item comanion delivery option name. - BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 259 - - # The computed status of the BackfillLineItem. - BACKFILL_LINE_ITEM_COMPUTED_STATUS = 296 - - # The localized name of the computed status of the BackfillLineItem. - BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME = 297 - - # The contracted units bought for the Backfill line item. - BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY = 280 - - # The cost per unit of the Backfill line item. - BACKFILL_LINE_ITEM_COST_PER_UNIT = 272 - - # Backfill line item cost type ENUM value. - BACKFILL_LINE_ITEM_COST_TYPE = 264 - - # Localized Backfill line item cost type name. - BACKFILL_LINE_ITEM_COST_TYPE_NAME = 265 - - # Represent the end date of a Backfill creative associated with a Backfill - # line item - BACKFILL_LINE_ITEM_CREATIVE_END_DATE = 381 - - # The creative rotation type of the BackfillLineItem. - BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE = 290 - - # The localized name of the creative rotation type of the BackfillLineItem. - BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 291 - - # Represent the start date of a Backfill creative associated with a - # Backfill line item - BACKFILL_LINE_ITEM_CREATIVE_START_DATE = 380 - - # The 3 letter currency code of the Backfill line item - BACKFILL_LINE_ITEM_CURRENCY_CODE = 288 - - # The progress made for the delivery of the Backfill line item. - BACKFILL_LINE_ITEM_DELIVERY_INDICATOR = 274 - - # The delivery rate type of the BackfillLineItem. - BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE = 292 - - # The localized name of the delivery rate type of the BackfillLineItem. - BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 293 - - # The discount of the BackfillLineItem in whole units in the - # BackfillLineItem's currency code, or if unspecified the Network's - # currency code. - BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE = 294 - - # The discount of the BackfillLineItem in percentage. - BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE = 295 - - # The end date of the Backfill line item. - BACKFILL_LINE_ITEM_END_DATE = 267 - - # The end date and time of the Backfill line item. - BACKFILL_LINE_ITEM_END_DATE_TIME = 269 - - # The ENUM value of the environment a Backfill line item is targeting. - BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE = 302 - - # The localized name of the environment a Backfill line item is targeting. - BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME = 257 - - # The deal ID of the Backfill line item. Set for Programmatic Direct - # campaigns. - BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID = 285 - - # The external ID of the Backfill line item. - BACKFILL_LINE_ITEM_EXTERNAL_ID = 273 - - # The frequency cap of the Backfill line item (descriptive string). - BACKFILL_LINE_ITEM_FREQUENCY_CAP = 303 - - # Backfill line item ID. - BACKFILL_LINE_ITEM_ID = 298 - - # The application that last modified the Backfill line item. - BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP = 289 - - # The total number of clicks delivered of the lifetime of the Backfill line - # item. - BACKFILL_LINE_ITEM_LIFETIME_CLICKS = 283 - - # The total number of impressions delivered over the lifetime of the - # Backfill line item. - BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS = 282 - - # The total number of viewable impressions delivered over the lifetime of - # the Backfill line item. - BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 284 - - # Whether or not the Backfill line item is Makegood. Makegood refers to - # free inventory offered to buyers to compensate for mistakes or - # under-delivery in the original campaigns. - BACKFILL_LINE_ITEM_MAKEGOOD = 276 - - # Backfill line item name. - BACKFILL_LINE_ITEM_NAME = 299 - - # The cost of booking for the Backfill line item (non-CPD). - BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE = 286 - - # Whether a Backfill line item is eligible for opitimization. - BACKFILL_LINE_ITEM_OPTIMIZABLE = 277 - - # Goal type ENUM value of the primary goal of the Backfill line item. - BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE = 262 - - # Localized goal type name of the primary goal of the Backfill line item. - BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 263 - - # Unit type ENUM value of the primary goal of the Backfill line item. - BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 260 - - # Localized unit type name of the primary goal of the Backfill line item. - BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 261 - - # The priority of this Backfill line item as a value between 1 and 16. - # In general, a lower priority means more serving priority for the - # Backfill line item. - BACKFILL_LINE_ITEM_PRIORITY = 266 - - # ENUM value describing the state of inventory reservation for the - # BackfillLineItem. - BACKFILL_LINE_ITEM_RESERVATION_STATUS = 306 - - # Localized string describing the state of inventory reservation for the - # BackfillLineItem. - BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME = 307 - - # The start date of the Backfill line item. - BACKFILL_LINE_ITEM_START_DATE = 268 - - # The start date and time of the Backfill line item. - BACKFILL_LINE_ITEM_START_DATE_TIME = 270 - - # Backfill line item type ENUM value. - BACKFILL_LINE_ITEM_TYPE = 300 - - # Localized Backfill line item type name. - BACKFILL_LINE_ITEM_TYPE_NAME = 301 - - # Whether the Backfill line item end time and end date is set to - # effectively never end. - BACKFILL_LINE_ITEM_UNLIMITED_END = 271 - - # The artificial cost per unit used by the Ad server to help rank - # inventory. - BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT = 275 - - # The web property code used for dynamic allocation Backfill line items. - BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE = 287 - - # The ID of Backfill creative, includes regular creatives, and master and - # companions in case of creative sets - BACKFILL_MASTER_COMPANION_CREATIVE_ID = 372 - - # Name of Backfill creative, includes regular creatives, and master and - # companions in case of creative sets - BACKFILL_MASTER_COMPANION_CREATIVE_NAME = 373 - - # Backfill order agency. - BACKFILL_ORDER_AGENCY = 313 - - # Backfill order agency ID. - BACKFILL_ORDER_AGENCY_ID = 314 - - # Backfill order booked CPC. - BACKFILL_ORDER_BOOKED_CPC = 315 - - # Backfill order booked CPM. - BACKFILL_ORDER_BOOKED_CPM = 316 - - # Backfill order delivery status ENUM value. - BACKFILL_ORDER_DELIVERY_STATUS = 340 - - # Backfill order delivery status localized name. - BACKFILL_ORDER_DELIVERY_STATUS_NAME = 341 - - # Backfill order end date. - BACKFILL_ORDER_END_DATE = 317 - - # Backfill order end date and time. - BACKFILL_ORDER_END_DATE_TIME = 319 - - # Backfill order external ID. - BACKFILL_ORDER_EXTERNAL_ID = 320 - - # Backfill order id. - BACKFILL_ORDER_ID = 338 - - # Backfill order labels. - BACKFILL_ORDER_LABELS = 334 - - # Backfill order labels IDs. - BACKFILL_ORDER_LABEL_IDS = 335 - - # Backfill order lifetime clicks. - BACKFILL_ORDER_LIFETIME_CLICKS = 322 - - # Backfill order lifetime impressions. - BACKFILL_ORDER_LIFETIME_IMPRESSIONS = 323 - - # Backfill order name. - BACKFILL_ORDER_NAME = 339 - - # Backfill order PO number. - BACKFILL_ORDER_PO_NUMBER = 324 - - # Whether the Backfill order is programmatic. - BACKFILL_ORDER_PROGRAMMATIC = 321 - - # Backfill order sales person. - BACKFILL_ORDER_SALESPERSON = 325 - - # Backfill order secondary sales people. - BACKFILL_ORDER_SECONDARY_SALESPEOPLE = 329 - - # Backfill order secondary sales people ID. - BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID = 328 - - # Backfill order secondary traffickers. - BACKFILL_ORDER_SECONDARY_TRAFFICKERS = 331 - - # Backfill order secondary traffickers ID. - BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID = 330 - - # Backfill order start date. - BACKFILL_ORDER_START_DATE = 332 - - # Backfill order start date and time. - BACKFILL_ORDER_START_DATE_TIME = 333 - - # Backfill order trafficker. - BACKFILL_ORDER_TRAFFICKER = 326 - - # Backfill order trafficker ID. - BACKFILL_ORDER_TRAFFICKER_ID = 327 - - # Whether the Backfill order end time and end date is set to effectively - # never end. - BACKFILL_ORDER_UNLIMITED_END = 318 - - # The ID of the buyer on a backfill programmatic proposal. - BACKFILL_PROGRAMMATIC_BUYER_ID = 336 - - # The name of the buyer on a backfill programmatic proposal. - BACKFILL_PROGRAMMATIC_BUYER_NAME = 337 - - # The amount of information about the Publisher's page sent to the buyer - # who purchased the impressions. - BRANDING_TYPE = 383 - - # The localized version of branding type, the amount of information about - # the Publisher's page sent to the buyer who purchased the impressions. - BRANDING_TYPE_NAME = 384 - - # Browser category. - BROWSER_CATEGORY = 119 - - # Browser category name. - BROWSER_CATEGORY_NAME = 120 - - # The ID of the browser. - BROWSER_ID = 235 - - # The name of the browser. - BROWSER_NAME = 236 - - # Mobile carrier ID. - CARRIER_ID = 369 - - # Name of the mobile carrier. - CARRIER_NAME = 368 - - # The ID of an advertiser, classified by Google, associated with a creative - # transacted - CLASSIFIED_ADVERTISER_ID = 133 - - # The name of an advertiser, classified by Google, associated with a - # creative transacted - CLASSIFIED_ADVERTISER_NAME = 134 - - # ID of the brand, as classified by Google, - CLASSIFIED_BRAND_ID = 243 - - # Name of the brand, as classified by Google, - CLASSIFIED_BRAND_NAME = 244 - - # ID of the video content served. - CONTENT_ID = 246 - - # Name of the video content served. - CONTENT_NAME = 247 - - # The criteria ID of the country in which the ad served. - COUNTRY_ID = 11 - - # The name of the country in which the ad served. - COUNTRY_NAME = 12 - - # Enum value of creative billing type - CREATIVE_BILLING_TYPE = 366 - - # Localized string value of creative billing type - CREATIVE_BILLING_TYPE_NAME = 367 - - # Represents the click-through URL of a creative - CREATIVE_CLICK_THROUGH_URL = 174 - - # The ID of a creative - CREATIVE_ID = 138 - - # Creative name - CREATIVE_NAME = 139 - - # Creative technology ENUM - CREATIVE_TECHNOLOGY = 148 - - # Creative technology locallized name - CREATIVE_TECHNOLOGY_NAME = 149 - - # Third party vendor name of a creative - CREATIVE_THIRD_PARTY_VENDOR = 361 - - # Enum value of creative type - CREATIVE_TYPE = 344 - - # Localized string name of creative type - CREATIVE_TYPE_NAME = 345 - - # Breaks down reporting data by date. - DATE = 3 - - # Breaks down reporting data by day of the week. Monday is 1 and 7 is - # Sunday. - DAY_OF_WEEK = 4 - - # Demand channel. - DEMAND_CHANNEL = 9 - - # Demand channel name. - DEMAND_CHANNEL_NAME = 10 - - # Demand subchannel. - DEMAND_SUBCHANNEL = 22 - - # Demand subchannel name. - DEMAND_SUBCHANNEL_NAME = 23 - - # The device on which an ad was served. - DEVICE = 226 - - # The device category to which an ad is being targeted. - DEVICE_CATEGORY = 15 - - # The name of the category of device (smartphone, feature phone, tablet, or - # desktop) to which an ad is being targeted. - DEVICE_CATEGORY_NAME = 16 - - # The localized name of the device on which an ad was served. - DEVICE_NAME = 225 - - # ID of the yield partner as classified by Google - EXCHANGE_THIRD_PARTY_COMPANY_ID = 185 - - # Name of the yield partner as classified by Google - EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186 - - # The ID of the first look pricing rule. - FIRST_LOOK_PRICING_RULE_ID = 248 - - # The name of the first look pricing rule. - FIRST_LOOK_PRICING_RULE_NAME = 249 - - # Breaks down reporting data by hour in one day. - HOUR = 100 - - # The interaction type of an ad. - INTERACTION_TYPE = 223 - - # The localized name of the interaction type of an ad. - INTERACTION_TYPE_NAME = 224 - - # Inventory format. - # The format of the ad unit (e.g, banner) where the ad was requested. - INVENTORY_FORMAT = 17 - - # Inventory format name. - # The format of the ad unit (e.g, banner) where the ad was requested. - INVENTORY_FORMAT_NAME = 18 - - # Inventory type. - # The kind of web page or device where the ad was requested. - INVENTORY_TYPE = 19 - - # Inventory type name. - # The kind of web page or device where the ad was requested. - INVENTORY_TYPE_NAME = 20 - - # Whether traffic is Adx Direct. - IS_ADX_DIRECT = 382 - - # Whether traffic is First Look. - IS_FIRST_LOOK_DEAL = 401 - - # The Custom Targeting Value ID - KEY_VALUES_ID = 214 - - # The Custom Targeting Value formatted like = - KEY_VALUES_NAME = 215 - - # Whether a Line item is archived. - LINE_ITEM_ARCHIVED = 188 - - # Line item comanion delivery option ENUM value. - LINE_ITEM_COMPANION_DELIVERY_OPTION = 204 - - # Localized line item comanion delivery option name. - LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205 - - # The computed status of the LineItem. - LINE_ITEM_COMPUTED_STATUS = 250 - - # The localized name of the computed status of the LineItem. - LINE_ITEM_COMPUTED_STATUS_NAME = 251 - - # The contracted units bought for the Line item. - LINE_ITEM_CONTRACTED_QUANTITY = 92 - - # The cost per unit of the Line item. - LINE_ITEM_COST_PER_UNIT = 85 - - # Line item cost type ENUM value. - LINE_ITEM_COST_TYPE = 212 - - # Localized line item cost type name. - LINE_ITEM_COST_TYPE_NAME = 213 - - # Represent the end date of a creative associated with line item - LINE_ITEM_CREATIVE_END_DATE = 176 - - # The creative rotation type of the LineItem. - LINE_ITEM_CREATIVE_ROTATION_TYPE = 189 - - # The localized name of the creative rotation type of the LineItem. - LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190 - - # Represent the start date of a creative associated with line item - LINE_ITEM_CREATIVE_START_DATE = 175 - - # The 3 letter currency code of the Line Item - LINE_ITEM_CURRENCY_CODE = 180 - - # The progress made for the delivery of the Line item. - LINE_ITEM_DELIVERY_INDICATOR = 87 - - # The delivery rate type of the LineItem. - LINE_ITEM_DELIVERY_RATE_TYPE = 191 - - # The localized name of the delivery rate type of the LineItem. - LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192 - - # The discount of the LineItem in whole units in the LineItem's currency - # code, or if unspecified the Network's currency code. - LINE_ITEM_DISCOUNT_ABSOLUTE = 195 - - # The discount of the LineItem in percentage. - LINE_ITEM_DISCOUNT_PERCENTAGE = 196 - - # The end date of the Line item. - LINE_ITEM_END_DATE = 81 - - # The end date and time of the Line item. - LINE_ITEM_END_DATE_TIME = 83 - - # The ENUM value of the environment a LineItem is targeting. - LINE_ITEM_ENVIRONMENT_TYPE = 201 - - # The localized name of the environment a LineItem is targeting. - LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202 - - # The deal ID of the Line item. Set for Programmatic Direct campaigns. - LINE_ITEM_EXTERNAL_DEAL_ID = 97 - - # The external ID of the Line item. - LINE_ITEM_EXTERNAL_ID = 86 - - # The frequency cap of the Line item (descriptive string). - LINE_ITEM_FREQUENCY_CAP = 256 - - # Line item ID. - LINE_ITEM_ID = 1 - - # The application that last modified the Line Item. - LINE_ITEM_LAST_MODIFIED_BY_APP = 181 - - # The total number of clicks delivered of the lifetime of the Line item. - LINE_ITEM_LIFETIME_CLICKS = 95 - - # The total number of impressions delivered over the lifetime of the - # Line item. - LINE_ITEM_LIFETIME_IMPRESSIONS = 94 - - # The total number of viewable impressions delivered over the lifetime of - # the Line item. - LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96 - - # Whether or not the Line item is Makegood. Makegood refers to free - # inventory offered to buyers to compensate for mistakes or under-delivery - # in the original campaigns. - LINE_ITEM_MAKEGOOD = 89 - - # Line item Name. - LINE_ITEM_NAME = 2 - - # The cost of booking for the Line item (non-CPD). - LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98 - - # Whether a Line item is eligible for opitimization. - LINE_ITEM_OPTIMIZABLE = 90 - - # Goal type ENUM value of the primary goal of the line item. - LINE_ITEM_PRIMARY_GOAL_TYPE = 210 - - # Localized goal type name of the primary goal of the line item. - LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211 - - # The total number of impressions or clicks that are reserved for a - # line item. For line items of type BULK or PRICE_PRIORITY, this represents - # the number of remaining impressions reserved. If the line item has an - # impression cap goal, this represents the number of impressions or - # conversions that the line item will stop serving at if reached. - LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93 - - # The percentage of impressions or clicks that are reserved for a - # line item. For line items of type SPONSORSHIP, this represents the - # percentage of available impressions reserved. For line items of type - # NETWORK or HOUSE, this represents the percentage of remaining impressions - # reserved. - LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396 - - # Unit type ENUM value of the primary goal of the line item. - LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208 - - # Localized unit type name of the primary goal of the line item. - LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209 - - # The priority of this Line item as a value between 1 and 16. - # In general, a lower priority means more serving priority for the - # Line item. - LINE_ITEM_PRIORITY = 24 - - # ENUM value describing the state of inventory reservation for the - # LineItem. - LINE_ITEM_RESERVATION_STATUS = 304 - - # Localized string describing the state of inventory reservation for the - # LineItem. - LINE_ITEM_RESERVATION_STATUS_NAME = 305 - - # The start date of the Line item. - LINE_ITEM_START_DATE = 82 - - # The start date and time of the Line item. - LINE_ITEM_START_DATE_TIME = 84 - - # Line item type ENUM value. - LINE_ITEM_TYPE = 193 - - # Localized line item type name. - LINE_ITEM_TYPE_NAME = 194 - - # Whether the Line item end time and end date is set to effectively never - # end. - LINE_ITEM_UNLIMITED_END = 187 - - # The artificial cost per unit used by the Ad server to help rank - # inventory. - LINE_ITEM_VALUE_COST_PER_UNIT = 88 - - # The web property code used for dynamic allocation Line Items. - LINE_ITEM_WEB_PROPERTY_CODE = 179 - - # The ID of creative, includes regular creatives, and master and companions - # in case of creative sets - MASTER_COMPANION_CREATIVE_ID = 140 - - # Name of creative, includes regular creatives, and master and companions - # in case of creative sets - MASTER_COMPANION_CREATIVE_NAME = 141 - - # Whether the mobile app is free. - MOBILE_APP_FREE = 128 - - # URL of app icon for the mobile app. - MOBILE_APP_ICON_URL = 129 - - # The ID of the Mobile App. - MOBILE_APP_ID = 123 - - # The name of the mobile app. - MOBILE_APP_NAME = 127 - - # Ownership status of the mobile app. - MOBILE_APP_OWNERSHIP_STATUS = 311 - - # Ownership status of the mobile app. - MOBILE_APP_OWNERSHIP_STATUS_NAME = 312 - - # The App Store of the mobile app. - MOBILE_APP_STORE = 125 - - # The localized name of the mobile app store. - MOBILE_APP_STORE_NAME = 245 - - # Mobile inventory type. - # Identifies whether a mobile ad came from a regular web page, an AMP web - # page, or a mobile app. - # Values match the Inventory type dimension available in the Overview Home - # dashboard. Note: Video takes precedence over any other value, for - # example, if there is an in-stream video impression on a desktop device, - # it will be attributed to in-stream video and not desktop web. - MOBILE_INVENTORY_TYPE = 99 - - # Mobile inventory type name. - # Identifies whether a mobile ad came from a regular web page, an AMP web - # page, or a mobile app. - MOBILE_INVENTORY_TYPE_NAME = 21 - - # SDK version of the mobile device. - MOBILE_SDK_VERSION_NAME = 130 - - # Breaks down reporting data by month and year. - MONTH_YEAR = 6 - - # Native ad format ID. - NATIVE_AD_FORMAT_ID = 255 - - # Native ad format name. - NATIVE_AD_FORMAT_NAME = 254 - - # Native style ID. - NATIVE_STYLE_ID = 253 - - # Native style name. - NATIVE_STYLE_NAME = 252 - - # Operating system category. - OPERATING_SYSTEM_CATEGORY = 117 - - # Operating system category name. - OPERATING_SYSTEM_CATEGORY_NAME = 118 - - # ID of the operating system version. - OPERATING_SYSTEM_VERSION_ID = 238 - - # Details of the operating system, including version. - OPERATING_SYSTEM_VERSION_NAME = 237 - - # Order agency. - ORDER_AGENCY = 150 - - # Order agency ID. - ORDER_AGENCY_ID = 151 - - # Order booked CPC. - ORDER_BOOKED_CPC = 152 - - # Order booked CPM. - ORDER_BOOKED_CPM = 153 - - # Order delivery status ENUM value. - ORDER_DELIVERY_STATUS = 231 - - # Order delivery status localized name. - ORDER_DELIVERY_STATUS_NAME = 239 - - # Order end date. - ORDER_END_DATE = 154 - - # Order end date and time. - ORDER_END_DATE_TIME = 155 - - # Order external ID. - ORDER_EXTERNAL_ID = 156 - - # Order id. - ORDER_ID = 7 - - # Order labels. - ORDER_LABELS = 170 - - # Order labels IDs. - ORDER_LABEL_IDS = 171 - - # Order lifetime clicks. - ORDER_LIFETIME_CLICKS = 158 - - # Order lifetime impressions. - ORDER_LIFETIME_IMPRESSIONS = 159 - - # Order name. - ORDER_NAME = 8 - - # Order PO number. - ORDER_PO_NUMBER = 160 - - # Whether the Order is programmatic. - ORDER_PROGRAMMATIC = 157 - - # Order sales person. - ORDER_SALESPERSON = 161 - - # Order secondary sales people. - ORDER_SECONDARY_SALESPEOPLE = 164 - - # Order secondary sales people ID. - ORDER_SECONDARY_SALESPEOPLE_ID = 165 - - # Order secondary traffickers. - ORDER_SECONDARY_TRAFFICKERS = 166 - - # Order secondary traffickers ID. - ORDER_SECONDARY_TRAFFICKERS_ID = 167 - - # Order start date. - ORDER_START_DATE = 168 - - # Order start date and time. - ORDER_START_DATE_TIME = 169 - - # Order trafficker. - ORDER_TRAFFICKER = 162 - - # Order trafficker ID. - ORDER_TRAFFICKER_ID = 163 - - # Whether the Order end time and end date is set to effectively never - # end. - ORDER_UNLIMITED_END = 203 - - # Placement ID - PLACEMENT_ID = 113 - - # The full list of placement IDs associated with the ad unit. - PLACEMENT_ID_ALL = 144 - - # Placement name - PLACEMENT_NAME = 114 - - # The full list of placement names associated with the ad unit. - PLACEMENT_NAME_ALL = 145 - - # Placement status ENUM value - PLACEMENT_STATUS = 362 - - # The full list of placement status ENUM values associated with the ad - # unit. - PLACEMENT_STATUS_ALL = 363 - - # Localized placement status name. - PLACEMENT_STATUS_NAME = 364 - - # The full list of localized placement status names associated with the ad - # unit. - PLACEMENT_STATUS_NAME_ALL = 365 - - # The ID of the buyer on a programmatic proposal. - PROGRAMMATIC_BUYER_ID = 240 - - # The name of the buyer on a programmatic proposal. - PROGRAMMATIC_BUYER_NAME = 241 - - # Programmatic channel. - # The type of transaction that occurred in Ad Exchange. - PROGRAMMATIC_CHANNEL = 13 - - # Programmatic channel name. - # The type of transaction that occurred in Ad Exchange. - PROGRAMMATIC_CHANNEL_NAME = 14 - - # The size of a rendered creative, It can differ with the creative's size - # if a creative is shown in an ad slot of a different size. - RENDERED_CREATIVE_SIZE = 343 - - # Inventory Requested Ad Sizes dimension - REQUESTED_AD_SIZES = 352 - - # Request type ENUM - REQUEST_TYPE = 146 - - # Request type locallized name - REQUEST_TYPE_NAME = 147 - - # Information about domain or subdomains. - SITE = 387 - - # The ID of the browser, device or other environment into which a line item - # or creative was served. - TARGETING_ID = 232 - - # Information about the browser, device and other environments into which - # a line item or creative was served. - TARGETING_NAME = 233 - - # The way in which advertisers targeted their ads. - TARGETING_TYPE = 385 - - # The localized name of the way in which advertisers targeted their ads. - TARGETING_TYPE_NAME = 386 - - # Inventory Traffic source dimension - TRAFFIC_SOURCE = 388 - - # Inventory Traffic source dimension name - TRAFFIC_SOURCE_NAME = 389 - - # Unified pricing rule ID dimension - UNIFIED_PRICING_RULE_ID = 393 - - # Unified pricing rule name dimension - UNIFIED_PRICING_RULE_NAME = 394 - - # The video placement enum as defined by ADCOM 1.0-202303. - VIDEO_PLCMT = 172 - - # The localized name of the video placement as defined by ADCOM 1.0-202303. - VIDEO_PLCMT_NAME = 173 - - # Breaks down reporting data by week of the year. - WEEK = 5 - - # Name of the company within a yield group - YIELD_GROUP_BUYER_NAME = 184 - - # ID of the group of ad networks or exchanges used for Mediation and Open - # Bidding - YIELD_GROUP_ID = 182 - - # Name of the group of ad networks or exchanges used for Mediation and Open - # Bidding - YIELD_GROUP_NAME = 183 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 0 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10_000 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 1 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10_001 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 2 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10_002 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 3 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10_003 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 4 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10_004 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 5 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10_005 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 6 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10_006 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 7 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10_007 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 8 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10_008 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 9 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10_009 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 10 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10_010 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 11 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10_011 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 12 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10_012 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 13 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10_013 - - # Custom field option ID for Line Item with custom field ID equal to the ID - # in index 14 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10_014 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 0 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11_000 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 1 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11_001 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 2 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11_002 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 3 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11_003 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 4 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11_004 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 5 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11_005 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 6 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11_006 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 7 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11_007 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 8 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11_008 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 9 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11_009 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 10 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11_010 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 11 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11_011 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 12 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11_012 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 13 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11_013 - - # Custom field value for Line Item with custom field ID equal to the ID - # in index 14 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11_014 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 0 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_0_OPTION_ID = 12_000 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 1 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_1_OPTION_ID = 12_001 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 2 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_2_OPTION_ID = 12_002 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 3 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_3_OPTION_ID = 12_003 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 4 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_4_OPTION_ID = 12_004 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 5 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_5_OPTION_ID = 12_005 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 6 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_6_OPTION_ID = 12_006 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 7 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_7_OPTION_ID = 12_007 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 8 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_8_OPTION_ID = 12_008 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 9 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_9_OPTION_ID = 12_009 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 10 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_10_OPTION_ID = 12_010 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 11 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_11_OPTION_ID = 12_011 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 12 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_12_OPTION_ID = 12_012 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 13 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_13_OPTION_ID = 12_013 - - # Custom field option ID for Order with custom field ID equal to the ID - # in index 14 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_14_OPTION_ID = 12_014 - - # Custom field value for Order with custom field ID equal to the ID - # in index 0 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_0_VALUE = 13_000 - - # Custom field value for Order with custom field ID equal to the ID - # in index 1 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_1_VALUE = 13_001 - - # Custom field value for Order with custom field ID equal to the ID - # in index 2 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_2_VALUE = 13_002 - - # Custom field value for Order with custom field ID equal to the ID - # in index 3 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_3_VALUE = 13_003 - - # Custom field value for Order with custom field ID equal to the ID - # in index 4 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_4_VALUE = 13_004 - - # Custom field value for Order with custom field ID equal to the ID - # in index 5 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_5_VALUE = 13_005 - - # Custom field value for Order with custom field ID equal to the ID - # in index 6 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_6_VALUE = 13_006 - - # Custom field value for Order with custom field ID equal to the ID - # in index 7 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_7_VALUE = 13_007 - - # Custom field value for Order with custom field ID equal to the ID - # in index 8 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_8_VALUE = 13_008 - - # Custom field value for Order with custom field ID equal to the ID - # in index 9 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_9_VALUE = 13_009 - - # Custom field value for Order with custom field ID equal to the ID - # in index 10 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_10_VALUE = 13_010 - - # Custom field value for Order with custom field ID equal to the ID - # in index 11 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_11_VALUE = 13_011 - - # Custom field value for Order with custom field ID equal to the ID - # in index 12 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_12_VALUE = 13_012 - - # Custom field value for Order with custom field ID equal to the ID - # in index 13 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_13_VALUE = 13_013 - - # Custom field value for Order with custom field ID equal to the ID - # in index 14 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_14_VALUE = 13_014 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 0 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14_000 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 1 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14_001 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 2 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14_002 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 3 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14_003 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 4 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14_004 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 5 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14_005 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 6 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14_006 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 7 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14_007 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 8 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14_008 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 9 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14_009 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 10 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14_010 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 11 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14_011 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 12 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14_012 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 13 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14_013 - - # Custom field option ID for Creative with custom field ID equal to the ID - # in index 14 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14_014 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 0 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_0_VALUE = 15_000 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 1 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_1_VALUE = 15_001 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 2 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_2_VALUE = 15_002 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 3 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_3_VALUE = 15_003 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 4 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_4_VALUE = 15_004 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 5 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_5_VALUE = 15_005 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 6 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_6_VALUE = 15_006 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 7 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_7_VALUE = 15_007 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 8 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_8_VALUE = 15_008 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 9 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_9_VALUE = 15_009 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 10 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_10_VALUE = 15_010 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 11 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_11_VALUE = 15_011 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 12 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_12_VALUE = 15_012 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 13 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_13_VALUE = 15_013 - - # Custom field value for Creative with custom field ID equal to the ID - # in index 14 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_14_VALUE = 15_014 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16_000 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16_001 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16_002 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16_003 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16_004 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16_005 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16_006 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16_007 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16_008 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16_009 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16_010 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16_011 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16_012 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16_013 - - # Custom field option ID for Backfill line item with custom field ID equal - # to the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16_014 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17_000 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17_001 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17_002 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17_003 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17_004 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17_005 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17_006 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17_007 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17_008 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17_009 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17_010 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17_011 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17_012 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17_013 - - # Custom field value for Backfill line item with custom field ID equal to - # the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17_014 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 0 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18_000 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 1 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18_001 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 2 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18_002 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 3 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18_003 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 4 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18_004 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 5 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18_005 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 6 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18_006 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 7 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18_007 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 8 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18_008 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 9 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18_009 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 10 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18_010 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 11 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18_011 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 12 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18_012 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 13 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18_013 - - # Custom field option ID for Backfill order with custom field ID equal to - # the ID in index 14 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18_014 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 0 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19_000 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 1 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19_001 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 2 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19_002 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 3 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19_003 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 4 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19_004 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 5 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19_005 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 6 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19_006 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 7 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19_007 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 8 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19_008 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 9 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19_009 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 10 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19_010 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 11 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19_011 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 12 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19_012 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 13 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19_013 - - # Custom field value for Backfill order with custom field ID equal to the - # ID in index 14 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19_014 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 0 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20_000 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20_001 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20_002 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20_003 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20_004 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20_005 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20_006 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20_007 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20_008 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20_009 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20_010 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20_011 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20_012 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20_013 - - # Custom field option ID for Backfill creative with custom field ID equal - # to the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20_014 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 0 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21_000 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21_001 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21_002 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21_003 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21_004 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21_005 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21_006 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21_007 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21_008 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21_009 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21_010 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21_011 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21_012 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21_013 - - # Custom field value for Backfill creative with custom field ID equal to - # the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21_014 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 0 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_0_VALUE_ID = 100_000 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 1 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_1_VALUE_ID = 100_001 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 2 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_2_VALUE_ID = 100_002 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 3 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_3_VALUE_ID = 100_003 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 4 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_4_VALUE_ID = 100_004 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 5 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_5_VALUE_ID = 100_005 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 6 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_6_VALUE_ID = 100_006 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 9 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_7_VALUE_ID = 100_007 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 8 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_8_VALUE_ID = 100_008 - - # Custom Dimension Value ID for Custom Dimension with key equal to the key - # in index 9 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_9_VALUE_ID = 100_009 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 0 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_0_VALUE = 101_000 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 1 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_1_VALUE = 101_001 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 2 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_2_VALUE = 101_002 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 3 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_3_VALUE = 101_003 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 4 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_4_VALUE = 101_004 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 5 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_5_VALUE = 101_005 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 6 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_6_VALUE = 101_006 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 7 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_7_VALUE = 101_007 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 8 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_8_VALUE = 101_008 - - # Custom Dimension Value name for Custom Dimension with key equal to the - # id in index 9 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_9_VALUE = 101_009 - end - - # Reporting metrics. - module Metric - # Default value. This value is unused. - METRIC_UNSPECIFIED = 0 - - # Active View total average time in seconds that specific impressions are - # reported as being viewable. - ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61 - - # Total number of impressions that were eligible to measure viewability. - ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58 - - # The total number of impressions that were sampled and measured by active - # view. - ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57 - - # The percentage of total impressions that were measurable by active view - # (out of all the total impressions sampled for active view). - ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60 - - # The total number of impressions viewed on the user's screen. - ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56 - - # The percentage of total impressions viewed on the user's screen (out of - # the total impressions measurable by active view). - ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59 - - # Active View AdSense average time in seconds that specific impressions are - # reported as being viewable. - ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73 - - # Total number of impressions delivered by AdSense that were eligible to - # measure viewability. - ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70 - - # The number of impressions delivered by AdSense that were sampled, and - # measurable by active view. - ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69 - - # The percentage of impressions delivered by AdSense that were measurable - # by active view (out of all AdSense impressions sampled for active view). - ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72 - - # The number of impressions delivered by AdSense viewed on the user's - # screen. - ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68 - - # The percentage of impressions delivered by AdSense viewed on the user's - # screen (out of AdSense impressions measurable by active view). - ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71 - - # The average effective cost-per-thousand-impressions earned from the ads - # delivered by AdSense through line item dynamic allocation. - ADSENSE_AVERAGE_ECPM = 26 - - # Number of clicks delivered by AdSense demand channel. - ADSENSE_CLICKS = 23 - - # The ratio of impressions served by AdSense that resulted in users - # clicking on an ad. The clickthrough rate (CTR) is updated nightly. The - # AdSense CTR is calculated as: (AdSense clicks / AdSense impressions). - ADSENSE_CTR = 24 - - # Total impressions delivered by AdSense. - ADSENSE_IMPRESSIONS = 22 - - # Ratio of clicks delivered by AdSense through line item dynamic allocation - # in relation to the total clicks delivered. - ADSENSE_PERCENT_CLICKS = 28 - - # Ratio of impressions delivered by AdSense through line item dynamic - # allocation in relation to the total impressions delivered. - ADSENSE_PERCENT_IMPRESSIONS = 27 - - # Ratio of revenue generated by AdSense through line item dynamic - # allocation in relation to the total revenue. - ADSENSE_PERCENT_REVENUE = 29 - - # Ratio of revenue generated by AdSense through line item dynamic - # allocation in relation to the total revenue (excluding CPD). - ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30 - - # The total number of times that an AdSense ad is delivered. - ADSENSE_RESPONSES_SERVED = 41 - - # Revenue generated from AdSense through line item dynamic allocation, - # calculated in the network's currency and time zone. - ADSENSE_REVENUE = 25 - - # Active View AdExchange average time in seconds that specific impressions - # are reported as being viewable. - AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79 - - # Total number of impressions delivered by Ad Exchange that were eligible - # to measure viewability. - AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76 - - # The number of impressions delivered by Ad Exchange that were sampled, and - # measurable by active view. - AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75 - - # The percentage of impressions delivered by Ad Exchange that were - # measurable by active view (out of all Ad Exchange impressions sampled for - # active view). - AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78 - - # The number of impressions delivered by Ad Exchange viewed on the user's - # screen. - AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74 - - # The percentage of impressions delivered by Ad Exchange viewed on the - # user's screen (out of Ad Exchange impressions measurable by active view). - AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77 - - # The average effective cost-per-thousand-impressions earned from the ads - # delivered by Ad Exchange through line item dynamic allocation. - AD_EXCHANGE_AVERAGE_ECPM = 18 - - # Number of clicks delivered by the Ad Exchange. - AD_EXCHANGE_CLICKS = 15 - - # The ratio of impressions served by the Ad Exchange that resulted in users - # clicking on an ad. The clickthrough rate (CTR) is updated nightly. Ad - # Exchange CTR is calculated as: (Ad Exchange clicks / Ad Exchange - # impressions). - AD_EXCHANGE_CTR = 16 - - # Total impressions delivered by the Ad Exchange. - AD_EXCHANGE_IMPRESSIONS = 14 - - # Ratio of clicks delivered by Ad Exchange through line item dynamic - # allocation in relation to the total clicks delivered. - AD_EXCHANGE_PERCENT_CLICKS = 20 - - # Ratio of impressions delivered by Ad Exchange through line item dynamic - # allocation in relation to the total impressions delivered. - AD_EXCHANGE_PERCENT_IMPRESSIONS = 19 - - # Ratio of revenue generated by Ad Exchange through line item dynamic - # allocation in relation to the total revenue. - AD_EXCHANGE_PERCENT_REVENUE = 21 - - # Ratio of revenue generated by Ad Exchange through line item dynamic - # allocation in relation to the total revenue (excluding CPD). - AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31 - - # The total number of times that an Ad Exchange ad is delivered. - AD_EXCHANGE_RESPONSES_SERVED = 42 - - # Revenue generated from the Ad Exchange through line item dynamic - # allocation, calculated in your network's currency and time zone. - AD_EXCHANGE_REVENUE = 17 - - # The total number of times that an ad request is sent to the ad server - # including dynamic allocation. - AD_REQUESTS = 38 - - # Active View ad server average time in seconds that specific impressions - # are reported as being viewable. - AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67 - - # Total number of impressions delivered by the ad server that were eligible - # to measure viewability. - AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64 - - # The number of impressions delivered by the ad server that were sampled, - # and measurable by active view. - AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63 - - # The percentage of impressions delivered by the ad server that were - # measurable by active view (out of all the ad server impressions sampled - # for active view). - AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66 - - # The number of impressions delivered by the ad server viewed on the user's - # screen. - AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62 - - # The percentage of impressions delivered by the ad server viewed on the - # user's screen (out of the ad server impressions measurable by active - # view). - AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65 - - # Average effective cost-per-thousand-impressions earned from the ads - # delivered by the Google Ad Manager server. - AD_SERVER_AVERAGE_ECPM = 34 - - # Average effective cost-per-thousand-impressions earned from the ads - # delivered by the Google Ad Manager server, excluding CPD value. - AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10 - - # Total clicks served by the Google Ad Manager server. It usually takes - # about 30 minutes for new clicks to be recorded and added to the total - # displayed in reporting. - AD_SERVER_CLICKS = 7 - - # CPD revenue earned, calculated in your network's currency, for - # the ads delivered by the Google Ad Manager server. Sum of all booked - # revenue. - AD_SERVER_CPD_REVENUE = 32 - - # Ratio of impressions served by the Google Ad Manager server that resulted - # in users clicking on an ad. The clickthrough rate (CTR) is updated - # nightly. The ad server CTR is calculated as: (Ad server clicks / Ad - # server impressions). - AD_SERVER_CTR = 8 - - # Total impressions delivered by the Ad Server. - AD_SERVER_IMPRESSIONS = 6 - - # Ratio of clicks delivered by the Google Ad Manager server in relation to - # the total clicks delivered. - AD_SERVER_PERCENT_CLICKS = 12 - - # Ratio of impressions delivered by the Google Ad Manager server in - # relation to the total impressions delivered. - AD_SERVER_PERCENT_IMPRESSIONS = 11 - - # Ratio of revenue generated by the Google Ad Manager server in relation - # to the total revenue. - AD_SERVER_PERCENT_REVENUE = 35 - - # Ratio of revenue generated by the Google Ad Manager server (excluding - # CPD) in relation to the total revenue. - AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13 - - # The total number of times that an ad is served by the ad server. - AD_SERVER_RESPONSES_SERVED = 40 - - # All CPM, CPC, and CPD revenue earned, calculated in your network's - # currency, for the ads delivered by the Google Ad Manager server. - # Sum of all booked revenue. - AD_SERVER_REVENUE = 33 - - # Revenue (excluding CPD) earned, calculated in your network's currency, - # for the ads delivered by the Google Ad Manager server. Sum of all booked - # revenue. - AD_SERVER_REVENUE_WITHOUT_CPD = 9 - - # Number of winning bids received from Open Bidding buyers, even when the - # winning bid is placed at the end of a mediation for mobile apps chain. - AUCTIONS_WON = 80 - - # eCPM averaged across the Google Ad Manager server, AdSense, - # and Ad Exchange. - AVERAGE_ECPM = 37 - - # eCPM averaged across the Google Ad Manager server (excluding CPD), - # AdSense, and Ad Exchange. - AVERAGE_ECPM_WITHOUT_CPD = 5 - - # Number of bids received from Open Bidding buyers, regardless of whether - # the returned bid competes in an auction. - BIDS = 81 - - # Number of bids received from Open Bidding buyers that competed in - # the auction. - BIDS_IN_AUCTION = 82 - - # Number of times a yield partner is asked to return bid to fill - # a yield group request. - CALLOUTS = 83 - - # The number of times a user clicked on an ad. - CLICKS = 2 - - # The total number of times that the code for an ad is served by the ad - # server including dynamic allocation. - CODE_SERVED_COUNT = 44 - - # For standard ads, your ad clickthrough rate (CTR) is the number of ad - # clicks divided by the number of individual ad impressions expressed as a - # fraction. Ad CTR = Clicks / Ad impressions. - CTR = 3 - - # The number of coviewed impressions sold by Google in partner sales. - GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129 - - # The number of auction impressions sold by Google in partner sales. - GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128 - - # The number of coviewed impressions sold by Google in partner sales. - GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131 - - # The number of impressions sold by Google in partner sales. - GOOGLE_SOLD_IMPRESSIONS = 130 - - # The number of coviewed impressions sold by Google in partner sales. - GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127 - - # The number of reservation impressions sold by Google in partner sales. - GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126 - - # Total impressions from the Google Ad Manager server, AdSense, - # Ad Exchange, and yield group partners. - IMPRESSIONS = 1 - - # The number of filled pod requests (filled by partner or Google) in - # partner sales. - PARTNER_SALES_FILLED_POD_REQUESTS = 135 - - # The percent of filled requests to total ad requests in - # partner sales. - PARTNER_SALES_FILL_RATE = 136 - - # The percent of partner filled requests to total ad requests - # in partner sales. - PARTNER_SALES_PARTNER_MATCH_RATE = 137 - - # The number of queries eligible for partner sales. - PARTNER_SALES_QUERIES = 132 - - # The number of partner unfilled impressions in partner sales. - # If a pod request is not filled by partner but filled by Google, this - # metric will still count 1. - PARTNER_SALES_UNFILLED_IMPRESSIONS = 133 - - # The number of partner unmatched queries in partner sales. - # If an ad request is not filled by partner but filled by Google, this - # metric will still count 1. - PARTNER_SALES_UNMATCHED_QUERIES = 134 - - # The number of code served sold by partner in partner sales. - PARTNER_SOLD_CODE_SERVED = 125 - - # The number of coviewed impressions sold by partner in partner sales. - PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124 - - # The number of impressions sold by partner in partner sales. - PARTNER_SOLD_IMPRESSIONS = 123 - - # The total number of ad requests eligible for programmatic inventory, - # including Programmatic Guaranteed, Preferred Deals, backfill, and open - # auction. - PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177 - - # The number of programmatic responses served divided by the number of - # programmatic eligible ad requests. Includes Ad Exchange, Open Bidding, - # and Preferred Deals. - PROGRAMMATIC_MATCH_RATE = 178 - - # Total number of ad responses served from programmatic demand sources. - # Includes Ad Exchange, Open Bidding, and Preferred Deals. - # - # Differs from AD_EXCHANGE_RESPONSES_SERVED, which doesn't include Open - # Bidding ad requests. - PROGRAMMATIC_RESPONSES_SERVED = 176 - - # The total number of times that an ad is served by the ad server including - # dynamic allocation. - RESPONSES_SERVED = 39 - - # Total amount of CPM, CPC, and CPD revenue based on the number of units - # served by the Google Ad Manager server, AdSense, Ad Exchange, and - # third-party Mediation networks. - REVENUE = 36 - - # Total amount of revenue (excluding CPD) based on the number of units - # served by the Google Ad Manager server, AdSense, Ad Exchange, and - # third-party Mediation networks. - REVENUE_WITHOUT_CPD = 4 - - # Number of times a yield group buyer successfully returned a bid in - # response to a yield group callout. - SUCCESSFUL_RESPONSES = 84 - - # The total number of missed impressions due to the ad servers' inability - # to find ads to serve including dynamic allocation. - UNFILLED_IMPRESSIONS = 45 - - # The total number of times that an ad is not returned by the ad server. - UNMATCHED_AD_REQUESTS = 43 - - # Number of times an Offerwall message was shown to users. - USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121 - - # The number of messages where the user gained an entitlement. - USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122 - - # The number of user interactions with a video, on average, such as pause, - # full screen, mute, etc. - VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92 - - # The number of times a user collapses a video, either to its original size - # or to a different size. - VIDEO_INTERACTION_COLLAPSES = 93 - - # The number of times a user expands a video. - VIDEO_INTERACTION_EXPANDS = 95 - - # The number of times ad clip played in full screen mode. - VIDEO_INTERACTION_FULL_SCREENS = 96 - - # The number of times video player was in mute state during play of ad - # clip. - VIDEO_INTERACTION_MUTES = 97 - - # The number of times user paused ad clip. - VIDEO_INTERACTION_PAUSES = 98 - - # The number of times the user unpaused the video. - VIDEO_INTERACTION_RESUMES = 99 - - # The number of times a user rewinds the video. - VIDEO_INTERACTION_REWINDS = 100 - - # The number of times a user unmutes the video. - VIDEO_INTERACTION_UNMUTES = 101 - - # The number of times a skippable video is skipped. - VIDEO_INTERACTION_VIDEO_SKIPS = 102 - - # The number of total creative serves in video realtime reporting. - VIDEO_REAL_TIME_CREATIVE_SERVES = 139 - - # The number of errors of type 100 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_100_COUNT = 143 - - # The number of errors of type 101 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_101_COUNT = 144 - - # The number of errors of type 102 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_102_COUNT = 145 - - # The number of errors of type 200 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_200_COUNT = 146 - - # The number of errors of type 201 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_201_COUNT = 147 - - # The number of errors of type 202 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_202_COUNT = 148 - - # The number of errors of type 203 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_203_COUNT = 149 - - # The number of errors of type 300 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_300_COUNT = 150 - - # The number of errors of type 301 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_301_COUNT = 151 - - # The number of errors of type 302 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_302_COUNT = 152 - - # The number of errors of type 303 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_303_COUNT = 153 - - # The number of errors of type 400 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_400_COUNT = 154 - - # The number of errors of type 401 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_401_COUNT = 155 - - # The number of errors of type 402 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_402_COUNT = 156 - - # The number of errors of type 403 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_403_COUNT = 157 - - # The number of errors of type 405 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_405_COUNT = 158 - - # The number of errors of type 406 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_406_COUNT = 159 - - # The number of errors of type 407 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_407_COUNT = 160 - - # The number of errors of type 408 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_408_COUNT = 161 - - # The number of errors of type 409 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_409_COUNT = 162 - - # The number of errors of type 410 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_410_COUNT = 163 - - # The number of errors of type 500 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_500_COUNT = 164 - - # The number of errors of type 501 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_501_COUNT = 165 - - # The number of errors of type 502 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_502_COUNT = 166 - - # The number of errors of type 503 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_503_COUNT = 167 - - # The number of errors of type 600 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_600_COUNT = 168 - - # The number of errors of type 601 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_601_COUNT = 169 - - # The number of errors of type 602 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_602_COUNT = 170 - - # The number of errors of type 603 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_603_COUNT = 171 - - # The number of errors of type 604 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_604_COUNT = 172 - - # The number of errors of type 900 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_900_COUNT = 173 - - # The number of errors of type 901 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_901_COUNT = 174 - - # The number of total impressions in video realtime reporting. - VIDEO_REAL_TIME_IMPRESSIONS = 138 - - # The number of matched queries in video realtime reporting. - VIDEO_REAL_TIME_MATCHED_QUERIES = 140 - - # The number of all errors in video realtime reporting. - VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175 - - # The number of total queries in video realtime reporting. - VIDEO_REAL_TIME_TOTAL_QUERIES = 142 - - # The number of unmatched queries in video realtime reporting. - VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141 - - # Number of times that the publisher specified a video ad played - # automatically. - VIDEO_VIEWERSHIP_AUTO_PLAYS = 103 - - # Average percentage of the video watched by users. - VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104 - - # Average time(seconds) users watched the video. - VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105 - - # Number of times that the publisher specified a video ad was clicked to - # play. - VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106 - - # The number of times the video played to completion. - VIDEO_VIEWERSHIP_COMPLETES = 107 - - # Percentage of times the video played to the end. - VIDEO_VIEWERSHIP_COMPLETION_RATE = 108 - - # The number of engaged views: ad is viewed to completion or for 30s, - # whichever comes first. - VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109 - - # The number of times the video played to 25% of its length. - VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110 - - # The number of times the video reached its midpoint during play. - VIDEO_VIEWERSHIP_MIDPOINTS = 111 - - # The number of times a skip button is shown in video. - VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112 - - # The number of impressions where the video was played. - VIDEO_VIEWERSHIP_STARTS = 113 - - # The number of times the video played to 75% of its length. - VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114 - - # The number of times an error occurred, such as a VAST redirect error, a - # video playback error, or an invalid response error. - VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115 - - # The percentage of video error count. - VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94 - - # Duration of the video creative. - VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116 - - # View-through rate represented as a percentage. - VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117 - - # The estimated net rate for yield groups or individual - # yield group partners. - YIELD_GROUP_ESTIMATED_CPM = 88 - - # Total net revenue earned by a yield group, based upon the yield group - # estimated CPM and yield group impressions recorded. - YIELD_GROUP_ESTIMATED_REVENUE = 87 - - # Number of matched yield group requests where a yield partner delivered - # their ad to publisher inventory. - YIELD_GROUP_IMPRESSIONS = 85 - - # Yield group Mediation fill rate indicating how often a network - # fills an ad request. - YIELD_GROUP_MEDIATION_FILL_RATE = 89 - - # Total requests where a Mediation chain was served. - YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86 - - # The number of mediation chain passback across all channels. - YIELD_GROUP_MEDIATION_PASSBACKS = 118 - - # Revenue per thousand impressions based on data collected by Ad Manager - # from third-party ad network reports. - YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90 - end - - # Possible metric value types to add. - module MetricValueType - # The values for the primary date_range. - PRIMARY = 0 - - # Each metrics' percent of the total for the primary date_range. - PRIMARY_PERCENT_OF_TOTAL = 1 - - # The values for the comparison_date_range. - COMPARISON = 2 - - # Each metrics' percent of the total for the comparison_date_range. - COMPARISON_PERCENT_OF_TOTAL = 3 - - # The absolute change between the primary and comparison date ranges. - ABSOLUTE_CHANGE = 4 - - # The relative change between the primary and comparison date ranges. - RELATIVE_CHANGE = 5 - end - - # Supported report types. - module ReportType - # Default value. This value is unused. - REPORT_TYPE_UNSPECIFIED = 0 - - # Historical. - HISTORICAL = 1 - end - - # The visibility of a report. - module Visibility - # Default value. Reports with hidden visibility will not appear in the Ad - # Manager UI. - HIDDEN = 0 - - # Reports with draft visibility will appear in the Ad Manager UI only if - # the user has configured the UI to show them. - DRAFT = 1 - - # Reports with saved visibility will appear in the Ad Manager UI by - # default. - SAVED = 2 - end - end - # Request message for a running a report. # @!attribute [rw] name # @return [::String] @@ -3316,194 +204,6 @@ class FetchReportResultRowsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - - # The definition of how a report should be run. - # @!attribute [rw] dimensions - # @return [::Array<::Google::Ads::AdManager::V1::Report::Dimension>] - # Required. The list of dimensions to report on. If empty, the report will - # have no dimensions, and any metrics will be totals. - # @!attribute [rw] metrics - # @return [::Array<::Google::Ads::AdManager::V1::Report::Metric>] - # Required. The list of metrics to report on. If empty, the report will have - # no metrics. - # @!attribute [rw] filters - # @return [::Array<::Google::Ads::AdManager::V1::Report::Filter>] - # Optional. The filters for this report. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The time zone the date range is defined in for this report. - # Defaults to publisher's time zone if not specified. Time zone in IANA - # format. Acceptable values depend on the report type. Publisher time zone is - # always accepted. Use "America/Los_Angeles" for pacific time, or "Etc/UTC" - # for UTC. - # @!attribute [rw] currency_code - # @return [::String] - # Optional. The ISO 4217 currency code for this report. Defaults to publisher - # currency code if not specified. - # @!attribute [rw] date_range - # @return [::Google::Ads::AdManager::V1::Report::DateRange] - # Required. The primary date range of this report. - # @!attribute [rw] comparison_date_range - # @return [::Google::Ads::AdManager::V1::Report::DateRange] - # Optional. The comparison date range of this report. If unspecified, the - # report will not have any comparison metrics. - # @!attribute [rw] custom_dimension_key_ids - # @return [::Array<::Integer>] - # Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* - # dimensions. The index of this repeated field corresponds to the index on - # each dimension. For example, custom_dimension_key_ids[0] describes - # CUSTOM_DIMENSION_0_VALUE_ID and CUSTOM_DIMENSION_0_VALUE. - # @!attribute [rw] line_item_custom_field_ids - # @return [::Array<::Integer>] - # Optional. Custom field IDs that represent LINE_ITEM_CUSTOM_FIELD_* - # dimensions. The index of this repeated field corresponds to the index on - # each dimension. For example, line_item_custom_field_ids[0] describes - # LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID and LINE_ITEM_CUSTOM_FIELD_0_VALUE. - # @!attribute [rw] order_custom_field_ids - # @return [::Array<::Integer>] - # Optional. Custom field IDs that represent ORDER_CUSTOM_FIELD_* - # dimensions. The index of this repeated field corresponds to the index on - # each dimension. For example, order_custom_field_ids[0] describes - # ORDER_CUSTOM_FIELD_0_OPTION_ID and ORDER_CUSTOM_FIELD_0_VALUE. - # @!attribute [rw] creative_custom_field_ids - # @return [::Array<::Integer>] - # Optional. Custom field IDs that represent CREATIVE_CUSTOM_FIELD_* - # dimensions. The index of this repeated field corresponds to the index on - # each dimension. For example, creative_custom_field_ids[0] describes - # CREATIVE_CUSTOM_FIELD_0_OPTION_ID and CREATIVE_CUSTOM_FIELD_0_VALUE. - # @!attribute [rw] report_type - # @return [::Google::Ads::AdManager::V1::Report::ReportType] - # Required. The type of this report. - # @!attribute [rw] time_period_column - # @return [::Google::Ads::AdManager::V1::Report::TimePeriodColumn] - # Optional. Include a time period column to introduce comparison columns in - # the report for each generated period. For example, set to "QUARTERS" here - # to have a column for each quarter present in the primary date range. If - # "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter - # column will also include comparison values for its relative previous - # quarter. - # @!attribute [rw] flags - # @return [::Array<::Google::Ads::AdManager::V1::Report::Flag>] - # Optional. List of flags for this report. Used to flag rows in a result set - # based on a set of defined filters. - # @!attribute [rw] sorts - # @return [::Array<::Google::Ads::AdManager::V1::Report::Sort>] - # Optional. Default sorts to apply to this report. - class ReportDefinition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The options for a scheduled report. - # @!attribute [rw] schedule - # @return [::Google::Ads::AdManager::V1::Schedule] - # Information pertaining to schedule itself. - # @!attribute [rw] delivery_condition - # @return [::Google::Ads::AdManager::V1::ScheduleOptions::DeliveryCondition] - # Option for when to deliver the scheduled report. - # @!attribute [rw] flags - # @return [::Array<::Google::Ads::AdManager::V1::Report::Flag>] - # Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT - # is specified. - class ScheduleOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Condition for when to email the scheduled report. - module DeliveryCondition - # Never deliver report. - NEVER = 0 - - # Always deliver report. - ALWAYS = 1 - - # Deliver report when flag's conditions are met. - WHEN_FLAG_CONDITIONS_MET = 2 - end - end - - # The schedule for the report - # @!attribute [rw] weekly_schedule - # @return [::Google::Ads::AdManager::V1::Schedule::WeeklySchedule] - # Days of week to schedule report run. - # - # Note: The following fields are mutually exclusive: `weekly_schedule`, `monthly_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] monthly_schedule - # @return [::Google::Ads::AdManager::V1::Schedule::MonthlySchedule] - # Days of month to schedule report run. - # - # Note: The following fields are mutually exclusive: `monthly_schedule`, `weekly_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Date for the first run of the report. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Date for the final run of the report. - # @!attribute [rw] frequency - # @return [::Google::Ads::AdManager::V1::Schedule::Frequency] - # Frequency to run report. - # @!attribute [rw] start_time - # @return [::Google::Type::TimeOfDay] - # Indicates start time for schedule to run - # Will use the time_zone from `ReportDefinition`. Defaults - # to the publisher's time zone if not specified. - # - # For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this - # will be the time of day that the first report will run on the first day. - # For example, if the start time is 2:00 PM, and the frequency is - # THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, - # 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, - # 2:00 PM, 10:00 PM. - class Schedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Days of week to schedule report run. - # @!attribute [rw] weekly_scheduled_days - # @return [::Array<::Google::Type::DayOfWeek>] - # Specifies days of the week on which to run report. - class WeeklySchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Days of Month to schedule report run. - # @!attribute [rw] monthly_scheduled_days - # @return [::Array<::Integer>] - # Specifies days of the month to run report. Range is from 1-31. - # Will ignore days that are not valid for the given month. - class MonthlySchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Frequency to run report. - module Frequency - # No Frequency specified. - FREQUENCY_UNSPECIFIED = 0 - - # Schedule report to run every hour. - HOURLY = 1 - - # Schedule report to run twice a day (every 12 hours). - TWO_TIMES_DAILY = 2 - - # Schedule report to run three times a day (every 8 hours). - THREE_TIMES_DAILY = 3 - - # Schedule report to run four times a day (every 6 hours). - FOUR_TIMES_DAILY = 4 - - # Schedule report to run on a daily basis. - DAILY = 5 - - # Schedule report to run on a weekly basis. - WEEKLY = 6 - - # Schedule report to run on a monthly basis. - MONTHLY = 7 - end - end end end end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/request_platform_enum.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/request_platform_enum.rb new file mode 100644 index 000000000000..88581d7dfe43 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/request_platform_enum.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Wrapper message for [RequestPlatform]. + # + # Describes the platform from which a request is made and on which the ad is + # rendered. In the event of multiple platforms, the platform that ultimately + # renders the ad is the targeted platform. For example, a video player on a + # website would have a request platform of `VIDEO_PLAYER`. + class RequestPlatformEnum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The different environments in which an ad can be shown. + module RequestPlatform + # No value specified + REQUEST_PLATFORM_UNSPECIFIED = 0 + + # Represents a request made from a web browser (incl. desktop browsers, + # mobile browsers, webviews, etc.). + BROWSER = 1 + + # Represents a request made from a Mobile Application. + MOBILE_APP = 2 + + # Represents a request made from a video player. + VIDEO_PLAYER = 3 + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/size.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/size.rb index 3916c09dddb4..3d60d7a5d090 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/size.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/size.rb @@ -24,20 +24,16 @@ module V1 # Represents the dimensions of an AdUnit, LineItem, or Creative. # @!attribute [rw] width # @return [::Integer] - # Required. The width of the [Creative](google.ads.admanager.v1.Creative), - # [AdUnit](google.ads.admanager.v1.AdUnit), or - # [LineItem](google.ads.admanager.v1.LineItem). + # Required. The width of the Creative, + # {::Google::Ads::AdManager::V1::AdUnit AdUnit}, or LineItem. # @!attribute [rw] height # @return [::Integer] - # Required. The height of the [Creative](google.ads.admanager.v1.Creative), - # [AdUnit](google.ads.admanager.v1.AdUnit), or - # [LineItem](google.ads.admanager.v1.LineItem). + # Required. The height of the Creative, + # {::Google::Ads::AdManager::V1::AdUnit AdUnit}, or LineItem. # @!attribute [rw] size_type # @return [::Google::Ads::AdManager::V1::SizeTypeEnum::SizeType] - # Required. The SizeType of the - # [Creative](google.ads.admanager.v1.Creative), - # [AdUnit](google.ads.admanager.v1.AdUnit), or - # [LineItem](google.ads.admanager.v1.LineItem). + # Required. The SizeType of the Creative, + # {::Google::Ads::AdManager::V1::AdUnit AdUnit}, or LineItem. class Size include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/targeted_video_bumper_type_enum.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/targeted_video_bumper_type_enum.rb new file mode 100644 index 000000000000..f45b9a59aad9 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/targeted_video_bumper_type_enum.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Wrapper message for + # {::Google::Ads::AdManager::V1::TargetedVideoBumperTypeEnum::TargetedVideoBumperType TargetedVideoBumperType} + class TargetedVideoBumperTypeEnum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the options for targetable bumper positions, surrounding an ad + # pod, within a video stream. This includes before and after the supported ad + # pod positions, `VideoPositionType.PREROLL`, `VideoPositionType.MIDROLL`, + # and `VideoPositionType.POSTROLL`. + module TargetedVideoBumperType + # Default value. This value is unused. + TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED = 0 + + # Represents the bumper position after the ad pod. + AFTER = 1 + + # Represents the bumper position before the ad pod. + BEFORE = 2 + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/targeting.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/targeting.rb new file mode 100644 index 000000000000..73d55c3dfda4 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/targeting.rb @@ -0,0 +1,279 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Targeting expression. + # @!attribute [rw] geo_targeting + # @return [::Google::Ads::AdManager::V1::GeoTargeting] + # Optional. Used to target/exclude various geo targets. + # @!attribute [rw] technology_targeting + # @return [::Google::Ads::AdManager::V1::TechnologyTargeting] + # Optional. Used to target various technology targeting dimensions. + # @!attribute [rw] inventory_targeting + # @return [::Google::Ads::AdManager::V1::InventoryTargeting] + # Optional. Used to target/exclude various ad units and/or placements. + # @!attribute [rw] request_platform_targeting + # @return [::Google::Ads::AdManager::V1::RequestPlatformTargeting] + # Optional. Used to target specific request platforms. + # @!attribute [rw] custom_targeting + # @return [::Google::Ads::AdManager::V1::CustomTargeting] + # Optional. Used to target key/values, audience segments, and/or CMS + # metadata. + # @!attribute [rw] user_domain_targeting + # @return [::Google::Ads::AdManager::V1::UserDomainTargeting] + # Optional. Used to target user domains. + # @!attribute [rw] video_position_targeting + # @return [::Google::Ads::AdManager::V1::VideoPositionTargeting] + # Optional. Used to target video positions. + # @!attribute [rw] data_segment_targeting + # @return [::Google::Ads::AdManager::V1::DataSegmentTargeting] + # Optional. Used to target data segments. + class Targeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a list of targeted and excluded geos. + # @!attribute [rw] targeted_geos + # @return [::Array<::String>] + # Optional. A list of geo resource names that should be targeted/included. + # @!attribute [rw] excluded_geos + # @return [::Array<::String>] + # Optional. A list of geo resource names that should be excluded. + class GeoTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Various types of technology targeting expressed by child messages are + # applied with logical AND. + # @!attribute [rw] bandwidth_targeting + # @return [::Google::Ads::AdManager::V1::BandwidthTargeting] + # Optional. Bandwidth targeting dimension. + # @!attribute [rw] device_category_targeting + # @return [::Google::Ads::AdManager::V1::DeviceCategoryTargeting] + # Optional. Device category targeting dimension. + # @!attribute [rw] operating_system_targeting + # @return [::Google::Ads::AdManager::V1::OperatingSystemTargeting] + # Optional. Operating system targeting dimension. + class TechnologyTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bandwidth Targeting. + # + # Reach users accessing the internet via various means of connection, such as + # cable, DSL, or dial-up. Can be useful to target campaigns using + # low-resolution creatives or text ads for users with low bandwidth. + # @!attribute [rw] targeted_bandwidth_groups + # @return [::Array<::String>] + # Optional. A list of resource names of the bandwidth groups that should be + # targeted/included. + # @!attribute [rw] excluded_bandwidth_groups + # @return [::Array<::String>] + # Optional. A list of resource names of the bandwidth groups that should be + # excluded. + class BandwidthTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a list of targeted and excluded device categories. + # @!attribute [rw] targeted_categories + # @return [::Array<::String>] + # Optional. A list of device category resource names that should be + # targeted/included. + # @!attribute [rw] excluded_categories + # @return [::Array<::String>] + # Optional. A list of device category resource names that should be excluded. + class DeviceCategoryTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operating System Targeting + # @!attribute [rw] targeted_operating_systems + # @return [::Array<::String>] + # Optional. A list of operating system resource names that should be + # targeted/included. + # @!attribute [rw] excluded_operating_systems + # @return [::Array<::String>] + # Optional. A list of operating system resource names that should be + # excluded. + # @!attribute [rw] targeted_operating_system_versions + # @return [::Array<::String>] + # Optional. A list of operating system version resource names that should be + # targeted/included. + # @!attribute [rw] excluded_operating_system_versions + # @return [::Array<::String>] + # Optional. A list of operating system version resource names that should be + # excluded. + class OperatingSystemTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Targeted ad units and AU placements are applied with + # logical OR. Example: + # + # (au:1 OR au:2 OR au_placement:5) AND (NOT (au:3)) + # @!attribute [rw] targeted_ad_units + # @return [::Array<::Google::Ads::AdManager::V1::AdUnitTargeting>] + # Optional. A list of ad units that should be targeted/included. + # @!attribute [rw] excluded_ad_units + # @return [::Array<::Google::Ads::AdManager::V1::AdUnitTargeting>] + # Optional. A list of ad units that should be excluded. + # + # Excluded AUs take precedence over targeted AUs. In fact an AU can be + # excluded only if one of its ancestors is targeted. Subsequently child + # AUs of an excluded AU can not be targeted (except via a placement). + # @!attribute [rw] targeted_placements + # @return [::Array<::String>] + # Optional. The resource names of the placements that should be + # targeted/included. + class InventoryTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies an ad unit and (optionally) its descendants. + # @!attribute [rw] include_descendants + # @return [::Boolean] + # Whether this ad unit's children should be targeted/excluded as well. + # @!attribute [rw] ad_unit + # @return [::String] + # Optional. The resource name of this ad unit. + class AdUnitTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a list of targeted request platforms. + # @!attribute [rw] request_platforms + # @return [::Array<::Google::Ads::AdManager::V1::RequestPlatformEnum::RequestPlatform>] + # Optional. The list of request platforms that should be targeted. + class RequestPlatformTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the top level targeting expression for custom key/values, + # audience segments, and/or CMS metadata. + # @!attribute [rw] custom_targeting_clauses + # @return [::Array<::Google::Ads::AdManager::V1::CustomTargetingClause>] + # Optional. These clauses are all ORed together. + class CustomTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a logical AND of individual custom targeting expressions. + # @!attribute [rw] custom_targeting_literals + # @return [::Array<::Google::Ads::AdManager::V1::CustomTargetingLiteral>] + # Optional. Leaf targeting expressions for custom key/values. + class CustomTargetingClause + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents targeting for custom key/values. The values are ORed together. + # @!attribute [rw] negative + # @return [::Boolean] + # Whether this expression is negatively targeted, meaning it matches + # ad requests that exclude the below values. + # @!attribute [rw] custom_targeting_key + # @return [::String] + # Optional. The resource name of the targeted CustomKey. + # @!attribute [rw] custom_targeting_values + # @return [::Array<::String>] + # Optional. The resource names of the targeted CustomValues. + class CustomTargetingLiteral + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User Domain Targeting + # @!attribute [rw] targeted_user_domains + # @return [::Array<::String>] + # Optional. A list of user domains that should be targeted/included. + # @!attribute [rw] excluded_user_domains + # @return [::Array<::String>] + # Optional. A list of user domains that should be excluded. + class UserDomainTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video Position Targeting + # @!attribute [rw] video_positions + # @return [::Array<::Google::Ads::AdManager::V1::VideoPosition>] + # Optional. A list of video position targeting criterion (applied with a + # logical AND). + class VideoPositionTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video Position Targeting Criterion + # @!attribute [rw] midroll_index + # @return [::Integer] + # Optional. The index of the mid-roll to target. This field is ignored when + # targeting any video position (e.g. position_type) other than MIDROLL. + # @!attribute [rw] reverse_midroll_index + # @return [::Integer] + # Optional. The index from the back of the pod of the mid-roll to target. + # This field is ignored when targeting any video position (e.g. + # position_type) other than MIDROLL or if targeting a specific midroll index + # (e.g. midroll_index != 0). + # @!attribute [rw] pod_position + # @return [::Integer] + # Optional. The video position within a pod to target. This field must be + # unset in order to target a specific video position (e.g. position_type), + # bumper type (e.g. bumper_type), or custom ad spot (e.g. custom_spot_id). + # @!attribute [rw] position_type + # @return [::Google::Ads::AdManager::V1::VideoPositionEnum::VideoPosition] + # Optional. The position within a video to target. A video ad can target a + # position (pre-roll, all mid-rolls, or post-roll) or a specific mid-roll + # index. + # @!attribute [rw] bumper_type + # @return [::Google::Ads::AdManager::V1::TargetedVideoBumperTypeEnum::TargetedVideoBumperType] + # Optional. The video bumper type to target. This field must be unset in + # order to target a specific video position (e.g. position_type), pod + # position (e.g. pod_position), or custom ad spot (e.g. custom_spot_id). + class VideoPosition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data Segment Targeting + # @!attribute [r] has_data_segment_targeting + # @return [::Boolean] + # Output only. Whether any data segments are currently targeted. + class DataSegmentTargeting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/team_messages.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/team_messages.rb index baeb06f74f02..065cabdb553c 100644 --- a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/team_messages.rb +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/team_messages.rb @@ -26,10 +26,6 @@ module V1 # @return [::String] # Identifier. The resource name of the `Team`. # Format: `networks/{network_code}/teams/{team_id}` - # @!attribute [r] team_id - # @return [::Integer] - # Output only. The unique ID of the Team. This value is assigned by Google. - # Teams that are created by Google will have negative IDs. class Team include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/video_position_enum.rb b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/video_position_enum.rb new file mode 100644 index 000000000000..d04553774a5d --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/ads/admanager/v1/video_position_enum.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Ads + module AdManager + module V1 + # Wrapper message for + # {::Google::Ads::AdManager::V1::VideoPositionEnum::VideoPosition VideoPosition} + class VideoPositionEnum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a targetable position within a video. + module VideoPosition + # Default value. This value is unused. + VIDEO_POSITION_UNSPECIFIED = 0 + + # Allow ad placement at any position within the video. + ALL = 1 + + # Target ad placement during the video. + MIDROLL = 2 + + # Target ad placement after the video ends. + POSTROLL = 3 + + # Target ad placement before the video starts. + PREROLL = 4 + end + end + end + end + end +end diff --git a/google-ads-ad_manager-v1/proto_docs/google/type/money.rb b/google-ads-ad_manager-v1/proto_docs/google/type/money.rb new file mode 100644 index 000000000000..be516f6e23c9 --- /dev/null +++ b/google-ads-ad_manager-v1/proto_docs/google/type/money.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents an amount of money with its currency type. + # @!attribute [rw] currency_code + # @return [::String] + # The three-letter currency code defined in ISO 4217. + # @!attribute [rw] units + # @return [::Integer] + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # @!attribute [rw] nanos + # @return [::Integer] + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + class Money + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-ads-ad_manager-v1/snippets/ad_break_service/create_ad_break.rb b/google-ads-ad_manager-v1/snippets/ad_break_service/create_ad_break.rb new file mode 100644 index 000000000000..37216a34d1bc --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/ad_break_service/create_ad_break.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_AdBreakService_CreateAdBreak_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the create_ad_break call in the AdBreakService 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::Ads::AdManager::V1::AdBreakService::Rest::Client#create_ad_break. +# +def create_ad_break + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::CreateAdBreakRequest.new + + # Call the create_ad_break method. + result = client.create_ad_break request + + # The returned object is of type Google::Ads::AdManager::V1::AdBreak. + p result +end +# [END admanager_v1_generated_AdBreakService_CreateAdBreak_sync] diff --git a/google-ads-ad_manager-v1/snippets/ad_break_service/delete_ad_break.rb b/google-ads-ad_manager-v1/snippets/ad_break_service/delete_ad_break.rb new file mode 100644 index 000000000000..a5ae33be9acf --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/ad_break_service/delete_ad_break.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_AdBreakService_DeleteAdBreak_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the delete_ad_break call in the AdBreakService 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::Ads::AdManager::V1::AdBreakService::Rest::Client#delete_ad_break. +# +def delete_ad_break + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::DeleteAdBreakRequest.new + + # Call the delete_ad_break method. + result = client.delete_ad_break request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END admanager_v1_generated_AdBreakService_DeleteAdBreak_sync] diff --git a/google-ads-ad_manager-v1/snippets/ad_break_service/get_ad_break.rb b/google-ads-ad_manager-v1/snippets/ad_break_service/get_ad_break.rb new file mode 100644 index 000000000000..24bb6ab0e268 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/ad_break_service/get_ad_break.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_AdBreakService_GetAdBreak_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_ad_break call in the AdBreakService 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::Ads::AdManager::V1::AdBreakService::Rest::Client#get_ad_break. +# +def get_ad_break + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetAdBreakRequest.new + + # Call the get_ad_break method. + result = client.get_ad_break request + + # The returned object is of type Google::Ads::AdManager::V1::AdBreak. + p result +end +# [END admanager_v1_generated_AdBreakService_GetAdBreak_sync] diff --git a/google-ads-ad_manager-v1/snippets/ad_break_service/list_ad_breaks.rb b/google-ads-ad_manager-v1/snippets/ad_break_service/list_ad_breaks.rb new file mode 100644 index 000000000000..2f5282fd7caa --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/ad_break_service/list_ad_breaks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_AdBreakService_ListAdBreaks_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_ad_breaks call in the AdBreakService 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::Ads::AdManager::V1::AdBreakService::Rest::Client#list_ad_breaks. +# +def list_ad_breaks + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListAdBreaksRequest.new + + # Call the list_ad_breaks method. + result = client.list_ad_breaks 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::Ads::AdManager::V1::AdBreak. + p item + end +end +# [END admanager_v1_generated_AdBreakService_ListAdBreaks_sync] diff --git a/google-ads-ad_manager-v1/snippets/ad_break_service/update_ad_break.rb b/google-ads-ad_manager-v1/snippets/ad_break_service/update_ad_break.rb new file mode 100644 index 000000000000..868c74798a97 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/ad_break_service/update_ad_break.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_AdBreakService_UpdateAdBreak_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the update_ad_break call in the AdBreakService 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::Ads::AdManager::V1::AdBreakService::Rest::Client#update_ad_break. +# +def update_ad_break + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::UpdateAdBreakRequest.new + + # Call the update_ad_break method. + result = client.update_ad_break request + + # The returned object is of type Google::Ads::AdManager::V1::AdBreak. + p result +end +# [END admanager_v1_generated_AdBreakService_UpdateAdBreak_sync] diff --git a/google-ads-ad_manager-v1/snippets/bandwidth_group_service/get_bandwidth_group.rb b/google-ads-ad_manager-v1/snippets/bandwidth_group_service/get_bandwidth_group.rb new file mode 100644 index 000000000000..cab220de60ca --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/bandwidth_group_service/get_bandwidth_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_BandwidthGroupService_GetBandwidthGroup_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_bandwidth_group call in the BandwidthGroupService 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::Ads::AdManager::V1::BandwidthGroupService::Rest::Client#get_bandwidth_group. +# +def get_bandwidth_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetBandwidthGroupRequest.new + + # Call the get_bandwidth_group method. + result = client.get_bandwidth_group request + + # The returned object is of type Google::Ads::AdManager::V1::BandwidthGroup. + p result +end +# [END admanager_v1_generated_BandwidthGroupService_GetBandwidthGroup_sync] diff --git a/google-ads-ad_manager-v1/snippets/bandwidth_group_service/list_bandwidth_groups.rb b/google-ads-ad_manager-v1/snippets/bandwidth_group_service/list_bandwidth_groups.rb new file mode 100644 index 000000000000..4db3941e0dea --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/bandwidth_group_service/list_bandwidth_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_BandwidthGroupService_ListBandwidthGroups_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_bandwidth_groups call in the BandwidthGroupService 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::Ads::AdManager::V1::BandwidthGroupService::Rest::Client#list_bandwidth_groups. +# +def list_bandwidth_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListBandwidthGroupsRequest.new + + # Call the list_bandwidth_groups method. + result = client.list_bandwidth_groups 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::Ads::AdManager::V1::BandwidthGroup. + p item + end +end +# [END admanager_v1_generated_BandwidthGroupService_ListBandwidthGroups_sync] diff --git a/google-ads-ad_manager-v1/snippets/device_category_service/get_device_category.rb b/google-ads-ad_manager-v1/snippets/device_category_service/get_device_category.rb new file mode 100644 index 000000000000..d70d710355f6 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/device_category_service/get_device_category.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_DeviceCategoryService_GetDeviceCategory_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_device_category call in the DeviceCategoryService 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::Ads::AdManager::V1::DeviceCategoryService::Rest::Client#get_device_category. +# +def get_device_category + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetDeviceCategoryRequest.new + + # Call the get_device_category method. + result = client.get_device_category request + + # The returned object is of type Google::Ads::AdManager::V1::DeviceCategory. + p result +end +# [END admanager_v1_generated_DeviceCategoryService_GetDeviceCategory_sync] diff --git a/google-ads-ad_manager-v1/snippets/device_category_service/list_device_categories.rb b/google-ads-ad_manager-v1/snippets/device_category_service/list_device_categories.rb new file mode 100644 index 000000000000..f3eee1646376 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/device_category_service/list_device_categories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_DeviceCategoryService_ListDeviceCategories_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_device_categories call in the DeviceCategoryService 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::Ads::AdManager::V1::DeviceCategoryService::Rest::Client#list_device_categories. +# +def list_device_categories + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListDeviceCategoriesRequest.new + + # Call the list_device_categories method. + result = client.list_device_categories 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::Ads::AdManager::V1::DeviceCategory. + p item + end +end +# [END admanager_v1_generated_DeviceCategoryService_ListDeviceCategories_sync] diff --git a/google-ads-ad_manager-v1/snippets/geo_target_service/get_geo_target.rb b/google-ads-ad_manager-v1/snippets/geo_target_service/get_geo_target.rb new file mode 100644 index 000000000000..46d67505b93f --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/geo_target_service/get_geo_target.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_GeoTargetService_GetGeoTarget_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_geo_target call in the GeoTargetService 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::Ads::AdManager::V1::GeoTargetService::Rest::Client#get_geo_target. +# +def get_geo_target + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetGeoTargetRequest.new + + # Call the get_geo_target method. + result = client.get_geo_target request + + # The returned object is of type Google::Ads::AdManager::V1::GeoTarget. + p result +end +# [END admanager_v1_generated_GeoTargetService_GetGeoTarget_sync] diff --git a/google-ads-ad_manager-v1/snippets/geo_target_service/list_geo_targets.rb b/google-ads-ad_manager-v1/snippets/geo_target_service/list_geo_targets.rb new file mode 100644 index 000000000000..a0e69c43b5fa --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/geo_target_service/list_geo_targets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_GeoTargetService_ListGeoTargets_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_geo_targets call in the GeoTargetService 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::Ads::AdManager::V1::GeoTargetService::Rest::Client#list_geo_targets. +# +def list_geo_targets + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListGeoTargetsRequest.new + + # Call the list_geo_targets method. + result = client.list_geo_targets 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::Ads::AdManager::V1::GeoTarget. + p item + end +end +# [END admanager_v1_generated_GeoTargetService_ListGeoTargets_sync] diff --git a/google-ads-ad_manager-v1/snippets/operating_system_service/get_operating_system.rb b/google-ads-ad_manager-v1/snippets/operating_system_service/get_operating_system.rb new file mode 100644 index 000000000000..da259fe0b180 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/operating_system_service/get_operating_system.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_OperatingSystemService_GetOperatingSystem_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_operating_system call in the OperatingSystemService 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::Ads::AdManager::V1::OperatingSystemService::Rest::Client#get_operating_system. +# +def get_operating_system + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetOperatingSystemRequest.new + + # Call the get_operating_system method. + result = client.get_operating_system request + + # The returned object is of type Google::Ads::AdManager::V1::OperatingSystem. + p result +end +# [END admanager_v1_generated_OperatingSystemService_GetOperatingSystem_sync] diff --git a/google-ads-ad_manager-v1/snippets/operating_system_service/list_operating_systems.rb b/google-ads-ad_manager-v1/snippets/operating_system_service/list_operating_systems.rb new file mode 100644 index 000000000000..74bba645b6aa --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/operating_system_service/list_operating_systems.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_OperatingSystemService_ListOperatingSystems_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_operating_systems call in the OperatingSystemService 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::Ads::AdManager::V1::OperatingSystemService::Rest::Client#list_operating_systems. +# +def list_operating_systems + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListOperatingSystemsRequest.new + + # Call the list_operating_systems method. + result = client.list_operating_systems 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::Ads::AdManager::V1::OperatingSystem. + p item + end +end +# [END admanager_v1_generated_OperatingSystemService_ListOperatingSystems_sync] diff --git a/google-ads-ad_manager-v1/snippets/operating_system_version_service/get_operating_system_version.rb b/google-ads-ad_manager-v1/snippets/operating_system_version_service/get_operating_system_version.rb new file mode 100644 index 000000000000..40ca32155b4d --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/operating_system_version_service/get_operating_system_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_OperatingSystemVersionService_GetOperatingSystemVersion_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_operating_system_version call in the OperatingSystemVersionService 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::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client#get_operating_system_version. +# +def get_operating_system_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest.new + + # Call the get_operating_system_version method. + result = client.get_operating_system_version request + + # The returned object is of type Google::Ads::AdManager::V1::OperatingSystemVersion. + p result +end +# [END admanager_v1_generated_OperatingSystemVersionService_GetOperatingSystemVersion_sync] diff --git a/google-ads-ad_manager-v1/snippets/operating_system_version_service/list_operating_system_versions.rb b/google-ads-ad_manager-v1/snippets/operating_system_version_service/list_operating_system_versions.rb new file mode 100644 index 000000000000..77378b3aac00 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/operating_system_version_service/list_operating_system_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_OperatingSystemVersionService_ListOperatingSystemVersions_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_operating_system_versions call in the OperatingSystemVersionService 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::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client#list_operating_system_versions. +# +def list_operating_system_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest.new + + # Call the list_operating_system_versions method. + result = client.list_operating_system_versions 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::Ads::AdManager::V1::OperatingSystemVersion. + p item + end +end +# [END admanager_v1_generated_OperatingSystemVersionService_ListOperatingSystemVersions_sync] diff --git a/google-ads-ad_manager-v1/snippets/private_auction_deal_service/create_private_auction_deal.rb b/google-ads-ad_manager-v1/snippets/private_auction_deal_service/create_private_auction_deal.rb new file mode 100644 index 000000000000..807b51e3b857 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/private_auction_deal_service/create_private_auction_deal.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_PrivateAuctionDealService_CreatePrivateAuctionDeal_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the create_private_auction_deal call in the PrivateAuctionDealService 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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#create_private_auction_deal. +# +def create_private_auction_deal + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest.new + + # Call the create_private_auction_deal method. + result = client.create_private_auction_deal request + + # The returned object is of type Google::Ads::AdManager::V1::PrivateAuctionDeal. + p result +end +# [END admanager_v1_generated_PrivateAuctionDealService_CreatePrivateAuctionDeal_sync] diff --git a/google-ads-ad_manager-v1/snippets/private_auction_deal_service/get_private_auction_deal.rb b/google-ads-ad_manager-v1/snippets/private_auction_deal_service/get_private_auction_deal.rb new file mode 100644 index 000000000000..921d9a58b901 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/private_auction_deal_service/get_private_auction_deal.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_PrivateAuctionDealService_GetPrivateAuctionDeal_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_private_auction_deal call in the PrivateAuctionDealService 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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#get_private_auction_deal. +# +def get_private_auction_deal + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest.new + + # Call the get_private_auction_deal method. + result = client.get_private_auction_deal request + + # The returned object is of type Google::Ads::AdManager::V1::PrivateAuctionDeal. + p result +end +# [END admanager_v1_generated_PrivateAuctionDealService_GetPrivateAuctionDeal_sync] diff --git a/google-ads-ad_manager-v1/snippets/private_auction_deal_service/list_private_auction_deals.rb b/google-ads-ad_manager-v1/snippets/private_auction_deal_service/list_private_auction_deals.rb new file mode 100644 index 000000000000..58b2b85aeb0f --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/private_auction_deal_service/list_private_auction_deals.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_PrivateAuctionDealService_ListPrivateAuctionDeals_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_private_auction_deals call in the PrivateAuctionDealService 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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#list_private_auction_deals. +# +def list_private_auction_deals + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest.new + + # Call the list_private_auction_deals method. + result = client.list_private_auction_deals 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::Ads::AdManager::V1::PrivateAuctionDeal. + p item + end +end +# [END admanager_v1_generated_PrivateAuctionDealService_ListPrivateAuctionDeals_sync] diff --git a/google-ads-ad_manager-v1/snippets/private_auction_deal_service/update_private_auction_deal.rb b/google-ads-ad_manager-v1/snippets/private_auction_deal_service/update_private_auction_deal.rb new file mode 100644 index 000000000000..03d31ebb31f9 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/private_auction_deal_service/update_private_auction_deal.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_PrivateAuctionDealService_UpdatePrivateAuctionDeal_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the update_private_auction_deal call in the PrivateAuctionDealService 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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#update_private_auction_deal. +# +def update_private_auction_deal + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest.new + + # Call the update_private_auction_deal method. + result = client.update_private_auction_deal request + + # The returned object is of type Google::Ads::AdManager::V1::PrivateAuctionDeal. + p result +end +# [END admanager_v1_generated_PrivateAuctionDealService_UpdatePrivateAuctionDeal_sync] diff --git a/google-ads-ad_manager-v1/snippets/private_auction_service/create_private_auction.rb b/google-ads-ad_manager-v1/snippets/private_auction_service/create_private_auction.rb new file mode 100644 index 000000000000..9eb4bb9bfac9 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/private_auction_service/create_private_auction.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_PrivateAuctionService_CreatePrivateAuction_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the create_private_auction call in the PrivateAuctionService 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::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#create_private_auction. +# +def create_private_auction + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::CreatePrivateAuctionRequest.new + + # Call the create_private_auction method. + result = client.create_private_auction request + + # The returned object is of type Google::Ads::AdManager::V1::PrivateAuction. + p result +end +# [END admanager_v1_generated_PrivateAuctionService_CreatePrivateAuction_sync] diff --git a/google-ads-ad_manager-v1/snippets/private_auction_service/get_private_auction.rb b/google-ads-ad_manager-v1/snippets/private_auction_service/get_private_auction.rb new file mode 100644 index 000000000000..f3c03959fac6 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/private_auction_service/get_private_auction.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_PrivateAuctionService_GetPrivateAuction_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_private_auction call in the PrivateAuctionService 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::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#get_private_auction. +# +def get_private_auction + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetPrivateAuctionRequest.new + + # Call the get_private_auction method. + result = client.get_private_auction request + + # The returned object is of type Google::Ads::AdManager::V1::PrivateAuction. + p result +end +# [END admanager_v1_generated_PrivateAuctionService_GetPrivateAuction_sync] diff --git a/google-ads-ad_manager-v1/snippets/private_auction_service/list_private_auctions.rb b/google-ads-ad_manager-v1/snippets/private_auction_service/list_private_auctions.rb new file mode 100644 index 000000000000..61e5e02ed532 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/private_auction_service/list_private_auctions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_PrivateAuctionService_ListPrivateAuctions_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_private_auctions call in the PrivateAuctionService 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::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#list_private_auctions. +# +def list_private_auctions + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListPrivateAuctionsRequest.new + + # Call the list_private_auctions method. + result = client.list_private_auctions 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::Ads::AdManager::V1::PrivateAuction. + p item + end +end +# [END admanager_v1_generated_PrivateAuctionService_ListPrivateAuctions_sync] diff --git a/google-ads-ad_manager-v1/snippets/private_auction_service/update_private_auction.rb b/google-ads-ad_manager-v1/snippets/private_auction_service/update_private_auction.rb new file mode 100644 index 000000000000..fa302c1677fb --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/private_auction_service/update_private_auction.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_PrivateAuctionService_UpdatePrivateAuction_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the update_private_auction call in the PrivateAuctionService 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::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#update_private_auction. +# +def update_private_auction + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest.new + + # Call the update_private_auction method. + result = client.update_private_auction request + + # The returned object is of type Google::Ads::AdManager::V1::PrivateAuction. + p result +end +# [END admanager_v1_generated_PrivateAuctionService_UpdatePrivateAuction_sync] diff --git a/google-ads-ad_manager-v1/snippets/programmatic_buyer_service/get_programmatic_buyer.rb b/google-ads-ad_manager-v1/snippets/programmatic_buyer_service/get_programmatic_buyer.rb new file mode 100644 index 000000000000..1c1fb7c5608d --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/programmatic_buyer_service/get_programmatic_buyer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_ProgrammaticBuyerService_GetProgrammaticBuyer_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the get_programmatic_buyer call in the ProgrammaticBuyerService 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::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client#get_programmatic_buyer. +# +def get_programmatic_buyer + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest.new + + # Call the get_programmatic_buyer method. + result = client.get_programmatic_buyer request + + # The returned object is of type Google::Ads::AdManager::V1::ProgrammaticBuyer. + p result +end +# [END admanager_v1_generated_ProgrammaticBuyerService_GetProgrammaticBuyer_sync] diff --git a/google-ads-ad_manager-v1/snippets/programmatic_buyer_service/list_programmatic_buyers.rb b/google-ads-ad_manager-v1/snippets/programmatic_buyer_service/list_programmatic_buyers.rb new file mode 100644 index 000000000000..928be91f0d42 --- /dev/null +++ b/google-ads-ad_manager-v1/snippets/programmatic_buyer_service/list_programmatic_buyers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 admanager_v1_generated_ProgrammaticBuyerService_ListProgrammaticBuyers_sync] +require "google/ads/ad_manager/v1" + +## +# Snippet for the list_programmatic_buyers call in the ProgrammaticBuyerService 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::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client#list_programmatic_buyers. +# +def list_programmatic_buyers + # Create a client object. The client can be reused for multiple calls. + client = Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest.new + + # Call the list_programmatic_buyers method. + result = client.list_programmatic_buyers 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::Ads::AdManager::V1::ProgrammaticBuyer. + p item + end +end +# [END admanager_v1_generated_ProgrammaticBuyerService_ListProgrammaticBuyers_sync] diff --git a/google-ads-ad_manager-v1/snippets/snippet_metadata_google.ads.admanager.v1.json b/google-ads-ad_manager-v1/snippets/snippet_metadata_google.ads.admanager.v1.json index 51759f518fb7..ef35857de990 100644 --- a/google-ads-ad_manager-v1/snippets/snippet_metadata_google.ads.admanager.v1.json +++ b/google-ads-ad_manager-v1/snippets/snippet_metadata_google.ads.admanager.v1.json @@ -11,6 +11,206 @@ ] }, "snippets": [ + { + "region_tag": "admanager_v1_generated_AdBreakService_GetAdBreak_sync", + "title": "Snippet for the get_ad_break call in the AdBreakService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::AdBreakService::Rest::Client#get_ad_break.", + "file": "ad_break_service/get_ad_break.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_ad_break", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client#get_ad_break", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetAdBreakRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::AdBreak", + "client": { + "short_name": "AdBreakService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client" + }, + "method": { + "short_name": "GetAdBreak", + "full_name": "google.ads.admanager.v1.AdBreakService.GetAdBreak", + "service": { + "short_name": "AdBreakService", + "full_name": "google.ads.admanager.v1.AdBreakService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_AdBreakService_ListAdBreaks_sync", + "title": "Snippet for the list_ad_breaks call in the AdBreakService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::AdBreakService::Rest::Client#list_ad_breaks.", + "file": "ad_break_service/list_ad_breaks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_ad_breaks", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client#list_ad_breaks", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListAdBreaksRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListAdBreaksResponse", + "client": { + "short_name": "AdBreakService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client" + }, + "method": { + "short_name": "ListAdBreaks", + "full_name": "google.ads.admanager.v1.AdBreakService.ListAdBreaks", + "service": { + "short_name": "AdBreakService", + "full_name": "google.ads.admanager.v1.AdBreakService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_AdBreakService_CreateAdBreak_sync", + "title": "Snippet for the create_ad_break call in the AdBreakService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::AdBreakService::Rest::Client#create_ad_break.", + "file": "ad_break_service/create_ad_break.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_ad_break", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client#create_ad_break", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::CreateAdBreakRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::AdBreak", + "client": { + "short_name": "AdBreakService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client" + }, + "method": { + "short_name": "CreateAdBreak", + "full_name": "google.ads.admanager.v1.AdBreakService.CreateAdBreak", + "service": { + "short_name": "AdBreakService", + "full_name": "google.ads.admanager.v1.AdBreakService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_AdBreakService_UpdateAdBreak_sync", + "title": "Snippet for the update_ad_break call in the AdBreakService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::AdBreakService::Rest::Client#update_ad_break.", + "file": "ad_break_service/update_ad_break.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_ad_break", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client#update_ad_break", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::UpdateAdBreakRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::AdBreak", + "client": { + "short_name": "AdBreakService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client" + }, + "method": { + "short_name": "UpdateAdBreak", + "full_name": "google.ads.admanager.v1.AdBreakService.UpdateAdBreak", + "service": { + "short_name": "AdBreakService", + "full_name": "google.ads.admanager.v1.AdBreakService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_AdBreakService_DeleteAdBreak_sync", + "title": "Snippet for the delete_ad_break call in the AdBreakService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::AdBreakService::Rest::Client#delete_ad_break.", + "file": "ad_break_service/delete_ad_break.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_ad_break", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client#delete_ad_break", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::DeleteAdBreakRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AdBreakService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::AdBreakService::Rest::Client" + }, + "method": { + "short_name": "DeleteAdBreak", + "full_name": "google.ads.admanager.v1.AdBreakService.DeleteAdBreak", + "service": { + "short_name": "AdBreakService", + "full_name": "google.ads.admanager.v1.AdBreakService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "admanager_v1_generated_AdUnitService_GetAdUnit_sync", "title": "Snippet for the get_ad_unit call in the AdUnitService service", @@ -131,6 +331,86 @@ } ] }, + { + "region_tag": "admanager_v1_generated_BandwidthGroupService_GetBandwidthGroup_sync", + "title": "Snippet for the get_bandwidth_group call in the BandwidthGroupService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client#get_bandwidth_group.", + "file": "bandwidth_group_service/get_bandwidth_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_bandwidth_group", + "full_name": "::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client#get_bandwidth_group", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetBandwidthGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::BandwidthGroup", + "client": { + "short_name": "BandwidthGroupService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client" + }, + "method": { + "short_name": "GetBandwidthGroup", + "full_name": "google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroup", + "service": { + "short_name": "BandwidthGroupService", + "full_name": "google.ads.admanager.v1.BandwidthGroupService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_BandwidthGroupService_ListBandwidthGroups_sync", + "title": "Snippet for the list_bandwidth_groups call in the BandwidthGroupService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client#list_bandwidth_groups.", + "file": "bandwidth_group_service/list_bandwidth_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_bandwidth_groups", + "full_name": "::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client#list_bandwidth_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListBandwidthGroupsResponse", + "client": { + "short_name": "BandwidthGroupService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client" + }, + "method": { + "short_name": "ListBandwidthGroups", + "full_name": "google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroups", + "service": { + "short_name": "BandwidthGroupService", + "full_name": "google.ads.admanager.v1.BandwidthGroupService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "admanager_v1_generated_CompanyService_GetCompany_sync", "title": "Snippet for the get_company call in the CompanyService service", @@ -451,6 +731,86 @@ } ] }, + { + "region_tag": "admanager_v1_generated_DeviceCategoryService_GetDeviceCategory_sync", + "title": "Snippet for the get_device_category call in the DeviceCategoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client#get_device_category.", + "file": "device_category_service/get_device_category.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_device_category", + "full_name": "::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client#get_device_category", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetDeviceCategoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::DeviceCategory", + "client": { + "short_name": "DeviceCategoryService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client" + }, + "method": { + "short_name": "GetDeviceCategory", + "full_name": "google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategory", + "service": { + "short_name": "DeviceCategoryService", + "full_name": "google.ads.admanager.v1.DeviceCategoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_DeviceCategoryService_ListDeviceCategories_sync", + "title": "Snippet for the list_device_categories call in the DeviceCategoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client#list_device_categories.", + "file": "device_category_service/list_device_categories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_device_categories", + "full_name": "::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client#list_device_categories", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListDeviceCategoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListDeviceCategoriesResponse", + "client": { + "short_name": "DeviceCategoryService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client" + }, + "method": { + "short_name": "ListDeviceCategories", + "full_name": "google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategories", + "service": { + "short_name": "DeviceCategoryService", + "full_name": "google.ads.admanager.v1.DeviceCategoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "admanager_v1_generated_EntitySignalsMappingService_GetEntitySignalsMapping_sync", "title": "Snippet for the get_entity_signals_mapping call in the EntitySignalsMappingService service", @@ -692,32 +1052,32 @@ ] }, { - "region_tag": "admanager_v1_generated_NetworkService_GetNetwork_sync", - "title": "Snippet for the get_network call in the NetworkService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::NetworkService::Rest::Client#get_network.", - "file": "network_service/get_network.rb", + "region_tag": "admanager_v1_generated_GeoTargetService_GetGeoTarget_sync", + "title": "Snippet for the get_geo_target call in the GeoTargetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::GeoTargetService::Rest::Client#get_geo_target.", + "file": "geo_target_service/get_geo_target.rb", "language": "RUBY", "client_method": { - "short_name": "get_network", - "full_name": "::Google::Ads::AdManager::V1::NetworkService::Rest::Client#get_network", + "short_name": "get_geo_target", + "full_name": "::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client#get_geo_target", "async": false, "parameters": [ { - "type": "::Google::Ads::AdManager::V1::GetNetworkRequest", + "type": "::Google::Ads::AdManager::V1::GetGeoTargetRequest", "name": "request" } ], - "result_type": "::Google::Ads::AdManager::V1::Network", + "result_type": "::Google::Ads::AdManager::V1::GeoTarget", "client": { - "short_name": "NetworkService::Rest::Client", - "full_name": "::Google::Ads::AdManager::V1::NetworkService::Rest::Client" + "short_name": "GeoTargetService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client" }, "method": { - "short_name": "GetNetwork", - "full_name": "google.ads.admanager.v1.NetworkService.GetNetwork", + "short_name": "GetGeoTarget", + "full_name": "google.ads.admanager.v1.GeoTargetService.GetGeoTarget", "service": { - "short_name": "NetworkService", - "full_name": "google.ads.admanager.v1.NetworkService" + "short_name": "GeoTargetService", + "full_name": "google.ads.admanager.v1.GeoTargetService" } } }, @@ -732,22 +1092,102 @@ ] }, { - "region_tag": "admanager_v1_generated_NetworkService_ListNetworks_sync", - "title": "Snippet for the list_networks call in the NetworkService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::NetworkService::Rest::Client#list_networks.", - "file": "network_service/list_networks.rb", + "region_tag": "admanager_v1_generated_GeoTargetService_ListGeoTargets_sync", + "title": "Snippet for the list_geo_targets call in the GeoTargetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::GeoTargetService::Rest::Client#list_geo_targets.", + "file": "geo_target_service/list_geo_targets.rb", "language": "RUBY", "client_method": { - "short_name": "list_networks", - "full_name": "::Google::Ads::AdManager::V1::NetworkService::Rest::Client#list_networks", + "short_name": "list_geo_targets", + "full_name": "::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client#list_geo_targets", "async": false, "parameters": [ { - "type": "::Google::Ads::AdManager::V1::ListNetworksRequest", + "type": "::Google::Ads::AdManager::V1::ListGeoTargetsRequest", "name": "request" } ], - "result_type": "::Google::Ads::AdManager::V1::ListNetworksResponse", + "result_type": "::Google::Ads::AdManager::V1::ListGeoTargetsResponse", + "client": { + "short_name": "GeoTargetService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client" + }, + "method": { + "short_name": "ListGeoTargets", + "full_name": "google.ads.admanager.v1.GeoTargetService.ListGeoTargets", + "service": { + "short_name": "GeoTargetService", + "full_name": "google.ads.admanager.v1.GeoTargetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_NetworkService_GetNetwork_sync", + "title": "Snippet for the get_network call in the NetworkService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::NetworkService::Rest::Client#get_network.", + "file": "network_service/get_network.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_network", + "full_name": "::Google::Ads::AdManager::V1::NetworkService::Rest::Client#get_network", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetNetworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::Network", + "client": { + "short_name": "NetworkService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::NetworkService::Rest::Client" + }, + "method": { + "short_name": "GetNetwork", + "full_name": "google.ads.admanager.v1.NetworkService.GetNetwork", + "service": { + "short_name": "NetworkService", + "full_name": "google.ads.admanager.v1.NetworkService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_NetworkService_ListNetworks_sync", + "title": "Snippet for the list_networks call in the NetworkService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::NetworkService::Rest::Client#list_networks.", + "file": "network_service/list_networks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_networks", + "full_name": "::Google::Ads::AdManager::V1::NetworkService::Rest::Client#list_networks", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListNetworksRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListNetworksResponse", "client": { "short_name": "NetworkService::Rest::Client", "full_name": "::Google::Ads::AdManager::V1::NetworkService::Rest::Client" @@ -771,6 +1211,166 @@ } ] }, + { + "region_tag": "admanager_v1_generated_OperatingSystemService_GetOperatingSystem_sync", + "title": "Snippet for the get_operating_system call in the OperatingSystemService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client#get_operating_system.", + "file": "operating_system_service/get_operating_system.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_operating_system", + "full_name": "::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client#get_operating_system", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetOperatingSystemRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::OperatingSystem", + "client": { + "short_name": "OperatingSystemService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client" + }, + "method": { + "short_name": "GetOperatingSystem", + "full_name": "google.ads.admanager.v1.OperatingSystemService.GetOperatingSystem", + "service": { + "short_name": "OperatingSystemService", + "full_name": "google.ads.admanager.v1.OperatingSystemService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_OperatingSystemService_ListOperatingSystems_sync", + "title": "Snippet for the list_operating_systems call in the OperatingSystemService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client#list_operating_systems.", + "file": "operating_system_service/list_operating_systems.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_operating_systems", + "full_name": "::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client#list_operating_systems", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListOperatingSystemsRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListOperatingSystemsResponse", + "client": { + "short_name": "OperatingSystemService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client" + }, + "method": { + "short_name": "ListOperatingSystems", + "full_name": "google.ads.admanager.v1.OperatingSystemService.ListOperatingSystems", + "service": { + "short_name": "OperatingSystemService", + "full_name": "google.ads.admanager.v1.OperatingSystemService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_OperatingSystemVersionService_GetOperatingSystemVersion_sync", + "title": "Snippet for the get_operating_system_version call in the OperatingSystemVersionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client#get_operating_system_version.", + "file": "operating_system_version_service/get_operating_system_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_operating_system_version", + "full_name": "::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client#get_operating_system_version", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::OperatingSystemVersion", + "client": { + "short_name": "OperatingSystemVersionService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client" + }, + "method": { + "short_name": "GetOperatingSystemVersion", + "full_name": "google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersion", + "service": { + "short_name": "OperatingSystemVersionService", + "full_name": "google.ads.admanager.v1.OperatingSystemVersionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_OperatingSystemVersionService_ListOperatingSystemVersions_sync", + "title": "Snippet for the list_operating_system_versions call in the OperatingSystemVersionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client#list_operating_system_versions.", + "file": "operating_system_version_service/list_operating_system_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_operating_system_versions", + "full_name": "::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client#list_operating_system_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListOperatingSystemVersionsResponse", + "client": { + "short_name": "OperatingSystemVersionService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client" + }, + "method": { + "short_name": "ListOperatingSystemVersions", + "full_name": "google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersions", + "service": { + "short_name": "OperatingSystemVersionService", + "full_name": "google.ads.admanager.v1.OperatingSystemVersionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "admanager_v1_generated_OrderService_GetOrder_sync", "title": "Snippet for the get_order call in the OrderService service", @@ -931,6 +1531,406 @@ } ] }, + { + "region_tag": "admanager_v1_generated_PrivateAuctionDealService_GetPrivateAuctionDeal_sync", + "title": "Snippet for the get_private_auction_deal call in the PrivateAuctionDealService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#get_private_auction_deal.", + "file": "private_auction_deal_service/get_private_auction_deal.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_private_auction_deal", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#get_private_auction_deal", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::PrivateAuctionDeal", + "client": { + "short_name": "PrivateAuctionDealService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client" + }, + "method": { + "short_name": "GetPrivateAuctionDeal", + "full_name": "google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDeal", + "service": { + "short_name": "PrivateAuctionDealService", + "full_name": "google.ads.admanager.v1.PrivateAuctionDealService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_PrivateAuctionDealService_ListPrivateAuctionDeals_sync", + "title": "Snippet for the list_private_auction_deals call in the PrivateAuctionDealService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#list_private_auction_deals.", + "file": "private_auction_deal_service/list_private_auction_deals.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_private_auction_deals", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#list_private_auction_deals", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListPrivateAuctionDealsResponse", + "client": { + "short_name": "PrivateAuctionDealService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client" + }, + "method": { + "short_name": "ListPrivateAuctionDeals", + "full_name": "google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDeals", + "service": { + "short_name": "PrivateAuctionDealService", + "full_name": "google.ads.admanager.v1.PrivateAuctionDealService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_PrivateAuctionDealService_CreatePrivateAuctionDeal_sync", + "title": "Snippet for the create_private_auction_deal call in the PrivateAuctionDealService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#create_private_auction_deal.", + "file": "private_auction_deal_service/create_private_auction_deal.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_private_auction_deal", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#create_private_auction_deal", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::PrivateAuctionDeal", + "client": { + "short_name": "PrivateAuctionDealService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client" + }, + "method": { + "short_name": "CreatePrivateAuctionDeal", + "full_name": "google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDeal", + "service": { + "short_name": "PrivateAuctionDealService", + "full_name": "google.ads.admanager.v1.PrivateAuctionDealService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_PrivateAuctionDealService_UpdatePrivateAuctionDeal_sync", + "title": "Snippet for the update_private_auction_deal call in the PrivateAuctionDealService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#update_private_auction_deal.", + "file": "private_auction_deal_service/update_private_auction_deal.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_private_auction_deal", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client#update_private_auction_deal", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::PrivateAuctionDeal", + "client": { + "short_name": "PrivateAuctionDealService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client" + }, + "method": { + "short_name": "UpdatePrivateAuctionDeal", + "full_name": "google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDeal", + "service": { + "short_name": "PrivateAuctionDealService", + "full_name": "google.ads.admanager.v1.PrivateAuctionDealService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_PrivateAuctionService_GetPrivateAuction_sync", + "title": "Snippet for the get_private_auction call in the PrivateAuctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#get_private_auction.", + "file": "private_auction_service/get_private_auction.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_private_auction", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#get_private_auction", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetPrivateAuctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::PrivateAuction", + "client": { + "short_name": "PrivateAuctionService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client" + }, + "method": { + "short_name": "GetPrivateAuction", + "full_name": "google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuction", + "service": { + "short_name": "PrivateAuctionService", + "full_name": "google.ads.admanager.v1.PrivateAuctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_PrivateAuctionService_ListPrivateAuctions_sync", + "title": "Snippet for the list_private_auctions call in the PrivateAuctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#list_private_auctions.", + "file": "private_auction_service/list_private_auctions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_private_auctions", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#list_private_auctions", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListPrivateAuctionsResponse", + "client": { + "short_name": "PrivateAuctionService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client" + }, + "method": { + "short_name": "ListPrivateAuctions", + "full_name": "google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctions", + "service": { + "short_name": "PrivateAuctionService", + "full_name": "google.ads.admanager.v1.PrivateAuctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_PrivateAuctionService_CreatePrivateAuction_sync", + "title": "Snippet for the create_private_auction call in the PrivateAuctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#create_private_auction.", + "file": "private_auction_service/create_private_auction.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_private_auction", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#create_private_auction", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::PrivateAuction", + "client": { + "short_name": "PrivateAuctionService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client" + }, + "method": { + "short_name": "CreatePrivateAuction", + "full_name": "google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuction", + "service": { + "short_name": "PrivateAuctionService", + "full_name": "google.ads.admanager.v1.PrivateAuctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_PrivateAuctionService_UpdatePrivateAuction_sync", + "title": "Snippet for the update_private_auction call in the PrivateAuctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#update_private_auction.", + "file": "private_auction_service/update_private_auction.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_private_auction", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client#update_private_auction", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::PrivateAuction", + "client": { + "short_name": "PrivateAuctionService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client" + }, + "method": { + "short_name": "UpdatePrivateAuction", + "full_name": "google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuction", + "service": { + "short_name": "PrivateAuctionService", + "full_name": "google.ads.admanager.v1.PrivateAuctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_ProgrammaticBuyerService_GetProgrammaticBuyer_sync", + "title": "Snippet for the get_programmatic_buyer call in the ProgrammaticBuyerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client#get_programmatic_buyer.", + "file": "programmatic_buyer_service/get_programmatic_buyer.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_programmatic_buyer", + "full_name": "::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client#get_programmatic_buyer", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ProgrammaticBuyer", + "client": { + "short_name": "ProgrammaticBuyerService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client" + }, + "method": { + "short_name": "GetProgrammaticBuyer", + "full_name": "google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyer", + "service": { + "short_name": "ProgrammaticBuyerService", + "full_name": "google.ads.admanager.v1.ProgrammaticBuyerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "admanager_v1_generated_ProgrammaticBuyerService_ListProgrammaticBuyers_sync", + "title": "Snippet for the list_programmatic_buyers call in the ProgrammaticBuyerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client#list_programmatic_buyers.", + "file": "programmatic_buyer_service/list_programmatic_buyers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_programmatic_buyers", + "full_name": "::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client#list_programmatic_buyers", + "async": false, + "parameters": [ + { + "type": "::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest", + "name": "request" + } + ], + "result_type": "::Google::Ads::AdManager::V1::ListProgrammaticBuyersResponse", + "client": { + "short_name": "ProgrammaticBuyerService::Rest::Client", + "full_name": "::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client" + }, + "method": { + "short_name": "ListProgrammaticBuyers", + "full_name": "google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyers", + "service": { + "short_name": "ProgrammaticBuyerService", + "full_name": "google.ads.admanager.v1.ProgrammaticBuyerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "admanager_v1_generated_ReportService_GetReport_sync", "title": "Snippet for the get_report call in the ReportService service", diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/ad_break_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/ad_break_service_rest_test.rb new file mode 100644 index 000000000000..fcc3f2890689 --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/ad_break_service_rest_test.rb @@ -0,0 +1,376 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/ad_break_service_pb" +require "google/ads/ad_manager/v1/ad_break_service/rest" + + +class ::Google::Ads::AdManager::V1::AdBreakService::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_get_ad_break + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::AdBreak.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_ad_break_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::Ads::AdManager::V1::AdBreakService::Rest::ServiceStub.stub :transcode_get_ad_break_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_ad_break_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_ad_break({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_ad_break name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_ad_break ::Google::Ads::AdManager::V1::GetAdBreakRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_ad_break({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_ad_break(::Google::Ads::AdManager::V1::GetAdBreakRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_ad_break_client_stub.call_count + end + end + end + + def test_list_ad_breaks + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListAdBreaksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_ad_breaks_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::Ads::AdManager::V1::AdBreakService::Rest::ServiceStub.stub :transcode_list_ad_breaks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_ad_breaks_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_ad_breaks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_ad_breaks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_ad_breaks ::Google::Ads::AdManager::V1::ListAdBreaksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_ad_breaks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_ad_breaks(::Google::Ads::AdManager::V1::ListAdBreaksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_ad_breaks_client_stub.call_count + end + end + end + + def test_create_ad_break + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::AdBreak.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + ad_break = {} + + create_ad_break_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::Ads::AdManager::V1::AdBreakService::Rest::ServiceStub.stub :transcode_create_ad_break_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_ad_break_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_ad_break({ parent: parent, ad_break: ad_break }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_ad_break parent: parent, ad_break: ad_break do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_ad_break ::Google::Ads::AdManager::V1::CreateAdBreakRequest.new(parent: parent, ad_break: ad_break) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_ad_break({ parent: parent, ad_break: ad_break }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_ad_break(::Google::Ads::AdManager::V1::CreateAdBreakRequest.new(parent: parent, ad_break: ad_break), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_ad_break_client_stub.call_count + end + end + end + + def test_update_ad_break + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::AdBreak.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + ad_break = {} + update_mask = {} + + update_ad_break_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::Ads::AdManager::V1::AdBreakService::Rest::ServiceStub.stub :transcode_update_ad_break_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_ad_break_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_ad_break({ ad_break: ad_break, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_ad_break ad_break: ad_break, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_ad_break ::Google::Ads::AdManager::V1::UpdateAdBreakRequest.new(ad_break: ad_break, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_ad_break({ ad_break: ad_break, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_ad_break(::Google::Ads::AdManager::V1::UpdateAdBreakRequest.new(ad_break: ad_break, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_ad_break_client_stub.call_count + end + end + end + + def test_delete_ad_break + # 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_ad_break_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::Ads::AdManager::V1::AdBreakService::Rest::ServiceStub.stub :transcode_delete_ad_break_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_ad_break_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_ad_break({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_ad_break name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_ad_break ::Google::Ads::AdManager::V1::DeleteAdBreakRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_ad_break({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_ad_break(::Google::Ads::AdManager::V1::DeleteAdBreakRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_ad_break_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::Ads::AdManager::V1::AdBreakService::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::Ads::AdManager::V1::AdBreakService::Rest::Client::Configuration, config + end +end diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/bandwidth_group_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/bandwidth_group_service_rest_test.rb new file mode 100644 index 000000000000..80e3dc5b08c7 --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/bandwidth_group_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/bandwidth_group_service_pb" +require "google/ads/ad_manager/v1/bandwidth_group_service/rest" + + +class ::Google::Ads::AdManager::V1::BandwidthGroupService::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_get_bandwidth_group + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::BandwidthGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_bandwidth_group_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::Ads::AdManager::V1::BandwidthGroupService::Rest::ServiceStub.stub :transcode_get_bandwidth_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_bandwidth_group_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_bandwidth_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_bandwidth_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_bandwidth_group ::Google::Ads::AdManager::V1::GetBandwidthGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_bandwidth_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_bandwidth_group(::Google::Ads::AdManager::V1::GetBandwidthGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_bandwidth_group_client_stub.call_count + end + end + end + + def test_list_bandwidth_groups + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListBandwidthGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_bandwidth_groups_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::Ads::AdManager::V1::BandwidthGroupService::Rest::ServiceStub.stub :transcode_list_bandwidth_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_bandwidth_groups_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_bandwidth_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_bandwidth_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_bandwidth_groups ::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_bandwidth_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_bandwidth_groups(::Google::Ads::AdManager::V1::ListBandwidthGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_bandwidth_groups_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::Ads::AdManager::V1::BandwidthGroupService::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::Ads::AdManager::V1::BandwidthGroupService::Rest::Client::Configuration, config + end +end diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/device_category_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/device_category_service_rest_test.rb new file mode 100644 index 000000000000..799537f64355 --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/device_category_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/device_category_service_pb" +require "google/ads/ad_manager/v1/device_category_service/rest" + + +class ::Google::Ads::AdManager::V1::DeviceCategoryService::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_get_device_category + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::DeviceCategory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_device_category_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::Ads::AdManager::V1::DeviceCategoryService::Rest::ServiceStub.stub :transcode_get_device_category_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_device_category_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_device_category({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_device_category name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_device_category ::Google::Ads::AdManager::V1::GetDeviceCategoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_device_category({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_device_category(::Google::Ads::AdManager::V1::GetDeviceCategoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_device_category_client_stub.call_count + end + end + end + + def test_list_device_categories + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListDeviceCategoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_device_categories_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::Ads::AdManager::V1::DeviceCategoryService::Rest::ServiceStub.stub :transcode_list_device_categories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_device_categories_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_device_categories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_device_categories parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_device_categories ::Google::Ads::AdManager::V1::ListDeviceCategoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_device_categories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_device_categories(::Google::Ads::AdManager::V1::ListDeviceCategoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_device_categories_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::Ads::AdManager::V1::DeviceCategoryService::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::Ads::AdManager::V1::DeviceCategoryService::Rest::Client::Configuration, config + end +end diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/geo_target_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/geo_target_service_rest_test.rb new file mode 100644 index 000000000000..c9c67ff2f33e --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/geo_target_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/geo_target_service_pb" +require "google/ads/ad_manager/v1/geo_target_service/rest" + + +class ::Google::Ads::AdManager::V1::GeoTargetService::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_get_geo_target + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::GeoTarget.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_geo_target_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::Ads::AdManager::V1::GeoTargetService::Rest::ServiceStub.stub :transcode_get_geo_target_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_geo_target_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_geo_target({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_geo_target name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_geo_target ::Google::Ads::AdManager::V1::GetGeoTargetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_geo_target({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_geo_target(::Google::Ads::AdManager::V1::GetGeoTargetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_geo_target_client_stub.call_count + end + end + end + + def test_list_geo_targets + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListGeoTargetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_geo_targets_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::Ads::AdManager::V1::GeoTargetService::Rest::ServiceStub.stub :transcode_list_geo_targets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_geo_targets_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::GeoTargetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_geo_targets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_geo_targets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_geo_targets ::Google::Ads::AdManager::V1::ListGeoTargetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_geo_targets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_geo_targets(::Google::Ads::AdManager::V1::ListGeoTargetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_geo_targets_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::Ads::AdManager::V1::GeoTargetService::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::Ads::AdManager::V1::GeoTargetService::Rest::Client::Configuration, config + end +end diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/operating_system_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/operating_system_service_rest_test.rb new file mode 100644 index 000000000000..a2df215c6452 --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/operating_system_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/operating_system_service_pb" +require "google/ads/ad_manager/v1/operating_system_service/rest" + + +class ::Google::Ads::AdManager::V1::OperatingSystemService::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_get_operating_system + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::OperatingSystem.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operating_system_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::Ads::AdManager::V1::OperatingSystemService::Rest::ServiceStub.stub :transcode_get_operating_system_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_operating_system_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_operating_system({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_operating_system name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_operating_system ::Google::Ads::AdManager::V1::GetOperatingSystemRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_operating_system({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_operating_system(::Google::Ads::AdManager::V1::GetOperatingSystemRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_operating_system_client_stub.call_count + end + end + end + + def test_list_operating_systems + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListOperatingSystemsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_operating_systems_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::Ads::AdManager::V1::OperatingSystemService::Rest::ServiceStub.stub :transcode_list_operating_systems_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_operating_systems_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_operating_systems({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_operating_systems parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_operating_systems ::Google::Ads::AdManager::V1::ListOperatingSystemsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_operating_systems({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_operating_systems(::Google::Ads::AdManager::V1::ListOperatingSystemsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_operating_systems_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::Ads::AdManager::V1::OperatingSystemService::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::Ads::AdManager::V1::OperatingSystemService::Rest::Client::Configuration, config + end +end diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/operating_system_version_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/operating_system_version_service_rest_test.rb new file mode 100644 index 000000000000..e3e42795630f --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/operating_system_version_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/operating_system_version_service_pb" +require "google/ads/ad_manager/v1/operating_system_version_service/rest" + + +class ::Google::Ads::AdManager::V1::OperatingSystemVersionService::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_get_operating_system_version + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::OperatingSystemVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operating_system_version_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::Ads::AdManager::V1::OperatingSystemVersionService::Rest::ServiceStub.stub :transcode_get_operating_system_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_operating_system_version_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_operating_system_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_operating_system_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_operating_system_version ::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_operating_system_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_operating_system_version(::Google::Ads::AdManager::V1::GetOperatingSystemVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_operating_system_version_client_stub.call_count + end + end + end + + def test_list_operating_system_versions + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListOperatingSystemVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_operating_system_versions_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::Ads::AdManager::V1::OperatingSystemVersionService::Rest::ServiceStub.stub :transcode_list_operating_system_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_operating_system_versions_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_operating_system_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_operating_system_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_operating_system_versions ::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_operating_system_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_operating_system_versions(::Google::Ads::AdManager::V1::ListOperatingSystemVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_operating_system_versions_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::Ads::AdManager::V1::OperatingSystemVersionService::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::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client::Configuration, config + end +end diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/private_auction_deal_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/private_auction_deal_service_rest_test.rb new file mode 100644 index 000000000000..6daf5fe97d15 --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/private_auction_deal_service_rest_test.rb @@ -0,0 +1,322 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/private_auction_deal_service_pb" +require "google/ads/ad_manager/v1/private_auction_deal_service/rest" + + +class ::Google::Ads::AdManager::V1::PrivateAuctionDealService::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_get_private_auction_deal + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::PrivateAuctionDeal.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_private_auction_deal_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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::ServiceStub.stub :transcode_get_private_auction_deal_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_private_auction_deal_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_private_auction_deal({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_private_auction_deal name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_private_auction_deal ::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_private_auction_deal({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_private_auction_deal(::Google::Ads::AdManager::V1::GetPrivateAuctionDealRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_private_auction_deal_client_stub.call_count + end + end + end + + def test_list_private_auction_deals + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListPrivateAuctionDealsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_private_auction_deals_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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::ServiceStub.stub :transcode_list_private_auction_deals_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_private_auction_deals_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_private_auction_deals({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_private_auction_deals parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_private_auction_deals ::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_private_auction_deals({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_private_auction_deals(::Google::Ads::AdManager::V1::ListPrivateAuctionDealsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_private_auction_deals_client_stub.call_count + end + end + end + + def test_create_private_auction_deal + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::PrivateAuctionDeal.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + private_auction_deal = {} + + create_private_auction_deal_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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::ServiceStub.stub :transcode_create_private_auction_deal_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_private_auction_deal_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_private_auction_deal({ parent: parent, private_auction_deal: private_auction_deal }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_private_auction_deal parent: parent, private_auction_deal: private_auction_deal do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_private_auction_deal ::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest.new(parent: parent, private_auction_deal: private_auction_deal) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_private_auction_deal({ parent: parent, private_auction_deal: private_auction_deal }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_private_auction_deal(::Google::Ads::AdManager::V1::CreatePrivateAuctionDealRequest.new(parent: parent, private_auction_deal: private_auction_deal), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_private_auction_deal_client_stub.call_count + end + end + end + + def test_update_private_auction_deal + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::PrivateAuctionDeal.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + private_auction_deal = {} + update_mask = {} + + update_private_auction_deal_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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::ServiceStub.stub :transcode_update_private_auction_deal_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_private_auction_deal_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_private_auction_deal({ private_auction_deal: private_auction_deal, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_private_auction_deal private_auction_deal: private_auction_deal, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_private_auction_deal ::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest.new(private_auction_deal: private_auction_deal, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_private_auction_deal({ private_auction_deal: private_auction_deal, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_private_auction_deal(::Google::Ads::AdManager::V1::UpdatePrivateAuctionDealRequest.new(private_auction_deal: private_auction_deal, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_private_auction_deal_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::Ads::AdManager::V1::PrivateAuctionDealService::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::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client::Configuration, config + end +end diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/private_auction_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/private_auction_service_rest_test.rb new file mode 100644 index 000000000000..f60b66151b10 --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/private_auction_service_rest_test.rb @@ -0,0 +1,322 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/private_auction_service_pb" +require "google/ads/ad_manager/v1/private_auction_service/rest" + + +class ::Google::Ads::AdManager::V1::PrivateAuctionService::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_get_private_auction + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::PrivateAuction.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_private_auction_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::Ads::AdManager::V1::PrivateAuctionService::Rest::ServiceStub.stub :transcode_get_private_auction_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_private_auction_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_private_auction({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_private_auction name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_private_auction ::Google::Ads::AdManager::V1::GetPrivateAuctionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_private_auction({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_private_auction(::Google::Ads::AdManager::V1::GetPrivateAuctionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_private_auction_client_stub.call_count + end + end + end + + def test_list_private_auctions + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListPrivateAuctionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_private_auctions_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::Ads::AdManager::V1::PrivateAuctionService::Rest::ServiceStub.stub :transcode_list_private_auctions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_private_auctions_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_private_auctions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_private_auctions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_private_auctions ::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_private_auctions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_private_auctions(::Google::Ads::AdManager::V1::ListPrivateAuctionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_private_auctions_client_stub.call_count + end + end + end + + def test_create_private_auction + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::PrivateAuction.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + private_auction = {} + + create_private_auction_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::Ads::AdManager::V1::PrivateAuctionService::Rest::ServiceStub.stub :transcode_create_private_auction_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_private_auction_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_private_auction({ parent: parent, private_auction: private_auction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_private_auction parent: parent, private_auction: private_auction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_private_auction ::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest.new(parent: parent, private_auction: private_auction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_private_auction({ parent: parent, private_auction: private_auction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_private_auction(::Google::Ads::AdManager::V1::CreatePrivateAuctionRequest.new(parent: parent, private_auction: private_auction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_private_auction_client_stub.call_count + end + end + end + + def test_update_private_auction + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::PrivateAuction.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + private_auction = {} + update_mask = {} + + update_private_auction_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::Ads::AdManager::V1::PrivateAuctionService::Rest::ServiceStub.stub :transcode_update_private_auction_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_private_auction_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_private_auction({ private_auction: private_auction, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_private_auction private_auction: private_auction, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_private_auction ::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest.new(private_auction: private_auction, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_private_auction({ private_auction: private_auction, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_private_auction(::Google::Ads::AdManager::V1::UpdatePrivateAuctionRequest.new(private_auction: private_auction, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_private_auction_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::Ads::AdManager::V1::PrivateAuctionService::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::Ads::AdManager::V1::PrivateAuctionService::Rest::Client::Configuration, config + end +end diff --git a/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/programmatic_buyer_service_rest_test.rb b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/programmatic_buyer_service_rest_test.rb new file mode 100644 index 000000000000..7e41436e66f6 --- /dev/null +++ b/google-ads-ad_manager-v1/test/google/ads/ad_manager/v1/programmatic_buyer_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/ads/admanager/v1/programmatic_buyer_service_pb" +require "google/ads/ad_manager/v1/programmatic_buyer_service/rest" + + +class ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::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_get_programmatic_buyer + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ProgrammaticBuyer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_programmatic_buyer_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::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::ServiceStub.stub :transcode_get_programmatic_buyer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_programmatic_buyer_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_programmatic_buyer({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_programmatic_buyer name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_programmatic_buyer ::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_programmatic_buyer({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_programmatic_buyer(::Google::Ads::AdManager::V1::GetProgrammaticBuyerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_programmatic_buyer_client_stub.call_count + end + end + end + + def test_list_programmatic_buyers + # Create test objects. + client_result = ::Google::Ads::AdManager::V1::ListProgrammaticBuyersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + skip = 42 + + list_programmatic_buyers_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::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::ServiceStub.stub :transcode_list_programmatic_buyers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_programmatic_buyers_client_stub do + # Create client + client = ::Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_programmatic_buyers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_programmatic_buyers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_programmatic_buyers ::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_programmatic_buyers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_programmatic_buyers(::Google::Ads::AdManager::V1::ListProgrammaticBuyersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, skip: skip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_programmatic_buyers_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::Ads::AdManager::V1::ProgrammaticBuyerService::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::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client::Configuration, config + end +end From c760adab475af6c1d3d8c38b600e1abf7d62a637 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:25:15 -0700 Subject: [PATCH 180/457] feat(ad_manager): Support for the AdBreakService feat(ad_manager): Support for the BandwidthGroupService feat(ad_manager): Support for the DeviceCategoryService feat(ad_manager): Support for the GeoTargetService feat(ad_manager): Support for the OperatingSystemService and OperatingSystemVersionService feat(ad_manager): Support for the PrivateAuctionService and PrivateAuctionDealService feat(ad_manager): Support for the ProgrammaticBuyerService feat(ad_manager): Support for Contact company display name feat(ad_manager): Support for custom targeting key --- google-ads-ad_manager/AUTHENTICATION.md | 6 +- google-ads-ad_manager/Rakefile | 4 +- .../lib/google/ads/ad_manager.rb | 569 +++++++++++++++++- .../test/google/ads/ad_manager/client_test.rb | 90 +++ 4 files changed, 663 insertions(+), 6 deletions(-) diff --git a/google-ads-ad_manager/AUTHENTICATION.md b/google-ads-ad_manager/AUTHENTICATION.md index 2047c474f284..e74275efd701 100644 --- a/google-ads-ad_manager/AUTHENTICATION.md +++ b/google-ads-ad_manager/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/ads/ad_manager" -client = Google::Ads::AdManager.ad_unit_service do |config| +client = Google::Ads::AdManager.ad_break_service do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -70,7 +70,7 @@ Google::Ads::AdManager.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = Google::Ads::AdManager.ad_unit_service +client = Google::Ads::AdManager.ad_break_service ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/ads/ad_manager" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = Google::Ads::AdManager.ad_unit_service +client = Google::Ads::AdManager.ad_break_service ``` ### Local ADC file diff --git a/google-ads-ad_manager/Rakefile b/google-ads-ad_manager/Rakefile index cbb21c57f11e..e912c7bd11c4 100644 --- a/google-ads-ad_manager/Rakefile +++ b/google-ads-ad_manager/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/ads/ad_manager/v1/ad_unit_service/credentials" - ::Google::Ads::AdManager::V1::AdUnitService::Credentials.env_vars.each do |path| + require "google/ads/ad_manager/v1/ad_break_service/credentials" + ::Google::Ads::AdManager::V1::AdBreakService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-ads-ad_manager/lib/google/ads/ad_manager.rb b/google-ads-ad_manager/lib/google/ads/ad_manager.rb index abaa5efac1a3..8a71cabd1228 100644 --- a/google-ads-ad_manager/lib/google/ads/ad_manager.rb +++ b/google-ads-ad_manager/lib/google/ads/ad_manager.rb @@ -27,6 +27,69 @@ module Google module Ads module AdManager + ## + # Create a new client object for AdBreakService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::AdBreakService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/AdBreakService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AdBreakService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the AdBreakService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.ad_break_service_available?}. + # + # ## About AdBreakService + # + # Provides methods for handling `AdBreak` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.ad_break_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:AdBreakService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the AdBreakService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.ad_break_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the AdBreakService service, + # or if the versioned client gem needs an update to support the AdBreakService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.ad_break_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :AdBreakService + service_module = service_module.const_get :AdBreakService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for AdUnitService. # @@ -90,6 +153,69 @@ def self.ad_unit_service_available? version: :v1 false end + ## + # Create a new client object for BandwidthGroupService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/BandwidthGroupService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the BandwidthGroupService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the BandwidthGroupService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.bandwidth_group_service_available?}. + # + # ## About BandwidthGroupService + # + # Provides methods for handling `BandwidthGroup` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.bandwidth_group_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:BandwidthGroupService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the BandwidthGroupService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.bandwidth_group_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the BandwidthGroupService service, + # or if the versioned client gem needs an update to support the BandwidthGroupService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.bandwidth_group_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :BandwidthGroupService + service_module = service_module.const_get :BandwidthGroupService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for CompanyService. # @@ -342,6 +468,69 @@ def self.custom_targeting_value_service_available? version: :v1 false end + ## + # Create a new client object for DeviceCategoryService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/DeviceCategoryService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the DeviceCategoryService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the DeviceCategoryService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.device_category_service_available?}. + # + # ## About DeviceCategoryService + # + # Provides methods for handling `DeviceCategory` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.device_category_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:DeviceCategoryService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the DeviceCategoryService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.device_category_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the DeviceCategoryService service, + # or if the versioned client gem needs an update to support the DeviceCategoryService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.device_category_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :DeviceCategoryService + service_module = service_module.const_get :DeviceCategoryService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for EntitySignalsMappingService. # @@ -405,6 +594,69 @@ def self.entity_signals_mapping_service_available? version: :v1 false end + ## + # Create a new client object for GeoTargetService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::GeoTargetService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/GeoTargetService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the GeoTargetService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the GeoTargetService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.geo_target_service_available?}. + # + # ## About GeoTargetService + # + # Provides methods for handling `GeoTarget` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.geo_target_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:GeoTargetService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the GeoTargetService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.geo_target_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the GeoTargetService service, + # or if the versioned client gem needs an update to support the GeoTargetService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.geo_target_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :GeoTargetService + service_module = service_module.const_get :GeoTargetService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for NetworkService. # @@ -423,7 +675,7 @@ def self.entity_signals_mapping_service_available? version: :v1 # # ## About NetworkService # - # Provides methods for handling Network objects. + # Provides methods for handling `Network` objects. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. @@ -468,6 +720,132 @@ def self.network_service_available? version: :v1 false end + ## + # Create a new client object for OperatingSystemService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/OperatingSystemService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the OperatingSystemService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the OperatingSystemService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.operating_system_service_available?}. + # + # ## About OperatingSystemService + # + # Provides methods for handling `OperatingSystem` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.operating_system_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:OperatingSystemService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the OperatingSystemService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.operating_system_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the OperatingSystemService service, + # or if the versioned client gem needs an update to support the OperatingSystemService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.operating_system_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :OperatingSystemService + service_module = service_module.const_get :OperatingSystemService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for OperatingSystemVersionService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/OperatingSystemVersionService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the OperatingSystemVersionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the OperatingSystemVersionService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.operating_system_version_service_available?}. + # + # ## About OperatingSystemVersionService + # + # Provides methods for handling `OperatingSystemVersion` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.operating_system_version_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:OperatingSystemVersionService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the OperatingSystemVersionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.operating_system_version_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the OperatingSystemVersionService service, + # or if the versioned client gem needs an update to support the OperatingSystemVersionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.operating_system_version_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :OperatingSystemVersionService + service_module = service_module.const_get :OperatingSystemVersionService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for OrderService. # @@ -594,6 +972,195 @@ def self.placement_service_available? version: :v1 false end + ## + # Create a new client object for PrivateAuctionDealService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/PrivateAuctionDealService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the PrivateAuctionDealService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the PrivateAuctionDealService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.private_auction_deal_service_available?}. + # + # ## About PrivateAuctionDealService + # + # Provides methods for handling `PrivateAuctionDeal` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.private_auction_deal_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:PrivateAuctionDealService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the PrivateAuctionDealService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.private_auction_deal_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the PrivateAuctionDealService service, + # or if the versioned client gem needs an update to support the PrivateAuctionDealService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.private_auction_deal_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :PrivateAuctionDealService + service_module = service_module.const_get :PrivateAuctionDealService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for PrivateAuctionService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/PrivateAuctionService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the PrivateAuctionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the PrivateAuctionService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.private_auction_service_available?}. + # + # ## About PrivateAuctionService + # + # Provides methods for handling `PrivateAuction` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.private_auction_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:PrivateAuctionService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the PrivateAuctionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.private_auction_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the PrivateAuctionService service, + # or if the versioned client gem needs an update to support the PrivateAuctionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.private_auction_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :PrivateAuctionService + service_module = service_module.const_get :PrivateAuctionService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ProgrammaticBuyerService. + # + # By default, this returns an instance of + # [Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/ProgrammaticBuyerService/Rest/Client) + # for a REST client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ProgrammaticBuyerService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the ProgrammaticBuyerService service. + # You can determine whether the method will succeed by calling + # {Google::Ads::AdManager.programmatic_buyer_service_available?}. + # + # ## About ProgrammaticBuyerService + # + # Provides methods for handling `ProgrammaticBuyer` objects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.programmatic_buyer_service version: :v1, &block + require "google/ads/ad_manager/#{version.to_s.downcase}" + + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Ads::AdManager.const_get(package_name).const_get(:ProgrammaticBuyerService) + service_module.const_get(:Rest).const_get(:Client).new(&block) + end + + ## + # Determines whether the ProgrammaticBuyerService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Ads::AdManager.programmatic_buyer_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ProgrammaticBuyerService service, + # or if the versioned client gem needs an update to support the ProgrammaticBuyerService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.programmatic_buyer_service_available? version: :v1 + require "google/ads/ad_manager/#{version.to_s.downcase}" + package_name = Google::Ads::AdManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Ads::AdManager.const_get package_name + return false unless service_module.const_defined? :ProgrammaticBuyerService + service_module = service_module.const_get :ProgrammaticBuyerService + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for ReportService. # diff --git a/google-ads-ad_manager/test/google/ads/ad_manager/client_test.rb b/google-ads-ad_manager/test/google/ads/ad_manager/client_test.rb index 732d51ad958b..8593fdbcb831 100644 --- a/google-ads-ad_manager/test/google/ads/ad_manager/client_test.rb +++ b/google-ads-ad_manager/test/google/ads/ad_manager/client_test.rb @@ -40,6 +40,16 @@ def logger end end + def test_ad_break_service_rest + skip unless Google::Ads::AdManager.ad_break_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.ad_break_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::AdBreakService::Rest::Client, client + end + end + def test_ad_unit_service_rest skip unless Google::Ads::AdManager.ad_unit_service_available? Gapic::Rest::ClientStub.stub :new, DummyStub.new do @@ -50,6 +60,16 @@ def test_ad_unit_service_rest end end + def test_bandwidth_group_service_rest + skip unless Google::Ads::AdManager.bandwidth_group_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.bandwidth_group_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client, client + end + end + def test_company_service_rest skip unless Google::Ads::AdManager.company_service_available? Gapic::Rest::ClientStub.stub :new, DummyStub.new do @@ -90,6 +110,16 @@ def test_custom_targeting_value_service_rest end end + def test_device_category_service_rest + skip unless Google::Ads::AdManager.device_category_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.device_category_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client, client + end + end + def test_entity_signals_mapping_service_rest skip unless Google::Ads::AdManager.entity_signals_mapping_service_available? Gapic::Rest::ClientStub.stub :new, DummyStub.new do @@ -100,6 +130,16 @@ def test_entity_signals_mapping_service_rest end end + def test_geo_target_service_rest + skip unless Google::Ads::AdManager.geo_target_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.geo_target_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::GeoTargetService::Rest::Client, client + end + end + def test_network_service_rest skip unless Google::Ads::AdManager.network_service_available? Gapic::Rest::ClientStub.stub :new, DummyStub.new do @@ -110,6 +150,26 @@ def test_network_service_rest end end + def test_operating_system_service_rest + skip unless Google::Ads::AdManager.operating_system_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.operating_system_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client, client + end + end + + def test_operating_system_version_service_rest + skip unless Google::Ads::AdManager.operating_system_version_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.operating_system_version_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client, client + end + end + def test_order_service_rest skip unless Google::Ads::AdManager.order_service_available? Gapic::Rest::ClientStub.stub :new, DummyStub.new do @@ -130,6 +190,36 @@ def test_placement_service_rest end end + def test_private_auction_deal_service_rest + skip unless Google::Ads::AdManager.private_auction_deal_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.private_auction_deal_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client, client + end + end + + def test_private_auction_service_rest + skip unless Google::Ads::AdManager.private_auction_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.private_auction_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client, client + end + end + + def test_programmatic_buyer_service_rest + skip unless Google::Ads::AdManager.programmatic_buyer_service_available? + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Ads::AdManager.programmatic_buyer_service do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client, client + end + end + def test_report_service_rest skip unless Google::Ads::AdManager.report_service_available? Gapic::Rest::ClientStub.stub :new, DummyStub.new do From e26aa69fbc16eb2931ab016414617b76a533e0e8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:26:22 -0700 Subject: [PATCH 181/457] feat(bigtable-v2): Support idempotency parameter to the mutate_row RPC (#30581) --- .../lib/google/bigtable/v2/bigtable_pb.rb | 2 +- .../lib/google/bigtable/v2/data_pb.rb | 3 ++- .../cloud/bigtable/v2/bigtable/client.rb | 5 ++++- .../proto_docs/google/bigtable/v2/bigtable.rb | 4 ++++ .../proto_docs/google/bigtable/v2/data.rb | 20 +++++++++++++++++++ .../google/cloud/bigtable/v2/bigtable_test.rb | 12 ++++++----- 6 files changed, 38 insertions(+), 8 deletions(-) diff --git a/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb b/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb index 134b513ac187..25a8afa99aa1 100644 --- a/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb +++ b/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb @@ -18,7 +18,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n!google/bigtable/v2/bigtable.proto\x12\x12google.bigtable.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1dgoogle/bigtable/v2/data.proto\x1a&google/bigtable/v2/request_stats.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xcc\x04\n\x0fReadRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x0b \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x05 \x01(\t\x12(\n\x04rows\x18\x02 \x01(\x0b\x32\x1a.google.bigtable.v2.RowSet\x12-\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x12\n\nrows_limit\x18\x04 \x01(\x03\x12P\n\x12request_stats_view\x18\x06 \x01(\x0e\x32\x34.google.bigtable.v2.ReadRowsRequest.RequestStatsView\x12\x10\n\x08reversed\x18\x07 \x01(\x08\"f\n\x10RequestStatsView\x12\"\n\x1eREQUEST_STATS_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12REQUEST_STATS_NONE\x10\x01\x12\x16\n\x12REQUEST_STATS_FULL\x10\x02\"\xb1\x03\n\x10ReadRowsResponse\x12>\n\x06\x63hunks\x18\x01 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12\x1c\n\x14last_scanned_row_key\x18\x02 \x01(\x0c\x12\x37\n\rrequest_stats\x18\x03 \x01(\x0b\x32 .google.bigtable.v2.RequestStats\x1a\x85\x02\n\tCellChunk\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x31\n\x0b\x66\x61mily_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12.\n\tqualifier\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\x0e\n\x06labels\x18\x05 \x03(\t\x12\r\n\x05value\x18\x06 \x01(\x0c\x12\x12\n\nvalue_size\x18\x07 \x01(\x05\x12\x13\n\treset_row\x18\x08 \x01(\x08H\x00\x12\x14\n\ncommit_row\x18\t \x01(\x08H\x00\x42\x0c\n\nrow_status\"\x98\x02\n\x14SampleRowKeysRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x05 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\">\n\x15SampleRowKeysResponse\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\"\x89\x02\n\x10MutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x34\n\tmutations\x18\x03 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\"\x13\n\x11MutateRowResponse\"\xd1\x02\n\x11MutateRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x03 \x01(\t\x12\x41\n\x07\x65ntries\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.MutateRowsRequest.EntryB\x03\xe0\x41\x02\x1aN\n\x05\x45ntry\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x34\n\tmutations\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\"\xe4\x01\n\x12MutateRowsResponse\x12=\n\x07\x65ntries\x18\x01 \x03(\x0b\x32,.google.bigtable.v2.MutateRowsResponse.Entry\x12?\n\x0frate_limit_info\x18\x03 \x01(\x0b\x32!.google.bigtable.v2.RateLimitInfoH\x00\x88\x01\x01\x1a:\n\x05\x45ntry\x12\r\n\x05index\x18\x01 \x01(\x03\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x12\n\x10_rate_limit_info\"J\n\rRateLimitInfo\x12)\n\x06period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\x01\"\x81\x03\n\x18\x43heckAndMutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x07 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x37\n\x10predicate_filter\x18\x06 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x34\n\x0etrue_mutations\x18\x04 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\x12\x35\n\x0f\x66\x61lse_mutations\x18\x05 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\"6\n\x19\x43heckAndMutateRowResponse\x12\x19\n\x11predicate_matched\x18\x01 \x01(\x08\"i\n\x12PingAndWarmRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"\x15\n\x13PingAndWarmResponse\"\x99\x02\n\x19ReadModifyWriteRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12;\n\x05rules\x18\x03 \x03(\x0b\x32\'.google.bigtable.v2.ReadModifyWriteRuleB\x03\xe0\x41\x02\"B\n\x1aReadModifyWriteRowResponse\x12$\n\x03row\x18\x01 \x01(\x0b\x32\x17.google.bigtable.v2.Row\"\x86\x01\n,GenerateInitialChangeStreamPartitionsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"g\n-GenerateInitialChangeStreamPartitionsResponse\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\"\x9b\x03\n\x17ReadChangeStreamRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\x12\x36\n\tpartition\x18\x03 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\x30\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12K\n\x13\x63ontinuation_tokens\x18\x06 \x01(\x0b\x32,.google.bigtable.v2.StreamContinuationTokensH\x00\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12heartbeat_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\n\nstart_from\"\xa9\n\n\x18ReadChangeStreamResponse\x12N\n\x0b\x64\x61ta_change\x18\x01 \x01(\x0b\x32\x37.google.bigtable.v2.ReadChangeStreamResponse.DataChangeH\x00\x12K\n\theartbeat\x18\x02 \x01(\x0b\x32\x36.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatH\x00\x12P\n\x0c\x63lose_stream\x18\x03 \x01(\x0b\x32\x38.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamH\x00\x1a\xf4\x01\n\rMutationChunk\x12X\n\nchunk_info\x18\x01 \x01(\x0b\x32\x44.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\x12.\n\x08mutation\x18\x02 \x01(\x0b\x32\x1c.google.bigtable.v2.Mutation\x1aY\n\tChunkInfo\x12\x1a\n\x12\x63hunked_value_size\x18\x01 \x01(\x05\x12\x1c\n\x14\x63hunked_value_offset\x18\x02 \x01(\x05\x12\x12\n\nlast_chunk\x18\x03 \x01(\x08\x1a\xc6\x03\n\nDataChange\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\x12\x19\n\x11source_cluster_id\x18\x02 \x01(\t\x12\x0f\n\x07row_key\x18\x03 \x01(\x0c\x12\x34\n\x10\x63ommit_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntiebreaker\x18\x05 \x01(\x05\x12J\n\x06\x63hunks\x18\x06 \x03(\x0b\x32:.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\r\n\x05token\x18\t \x01(\t\x12;\n\x17\x65stimated_low_watermark\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x16\n\x12GARBAGE_COLLECTION\x10\x02\x12\x10\n\x0c\x43ONTINUATION\x10\x03\x1a\x91\x01\n\tHeartbeat\x12G\n\x12\x63ontinuation_token\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x17\x65stimated_low_watermark\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb8\x01\n\x0b\x43loseStream\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x13\x63ontinuation_tokens\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x0enew_partitions\x18\x03 \x03(\x0b\x32#.google.bigtable.v2.StreamPartitionB\x0f\n\rstream_record\"\xa1\x03\n\x13\x45xecuteQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x05query\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\x0eprepared_query\x18\t \x01(\x0c\x12;\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatB\x02\x18\x01H\x00\x12\x19\n\x0cresume_token\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x06params\x18\x07 \x03(\x0b\x32\x33.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\x03\xe0\x41\x02\x1aH\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x96\x01\n\x14\x45xecuteQueryResponse\x12\x39\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadataH\x00\x12\x37\n\x07results\x18\x02 \x01(\x0b\x32$.google.bigtable.v2.PartialResultSetH\x00\x42\n\n\x08response\"\xf4\x02\n\x13PrepareQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatH\x00\x12Q\n\x0bparam_types\x18\x06 \x03(\x0b\x32\x37.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\x03\xe0\x41\x02\x1aK\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x98\x01\n\x14PrepareQueryResponse\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadata\x12\x16\n\x0eprepared_query\x18\x02 \x01(\x0c\x12/\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xc9&\n\x08\x42igtable\x12\xdb\x03\n\x08ReadRows\x12#.google.bigtable.v2.ReadRowsRequest\x1a$.google.bigtable.v2.ReadRowsResponse\"\x81\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9a\x01\"9/v2/{table_name=projects/*/instances/*/tables/*}:readRows:\x01*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xee\x03\n\rSampleRowKeys\x12(.google.bigtable.v2.SampleRowKeysRequest\x1a).google.bigtable.v2.SampleRowKeysResponse\"\x85\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\x12>/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\x12Z/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\x82\x04\n\tMutateRow\x12$.google.bigtable.v2.MutateRowRequest\x1a%.google.bigtable.v2.MutateRowResponse\"\xa7\x03\xda\x41\x1ctable_name,row_key,mutations\xda\x41+table_name,row_key,mutations,app_profile_id\x82\xd3\xe4\x93\x02\x9c\x01\":/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow:\x01*Z[\"V/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xf5\x03\n\nMutateRows\x12%.google.bigtable.v2.MutateRowsRequest\x1a&.google.bigtable.v2.MutateRowsResponse\"\x95\x03\xda\x41\x12table_name,entries\xda\x41!table_name,entries,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\";/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows:\x01*Z\\\"W/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xf6\x04\n\x11\x43heckAndMutateRow\x12,.google.bigtable.v2.CheckAndMutateRowRequest\x1a-.google.bigtable.v2.CheckAndMutateRowResponse\"\x83\x04\xda\x41\x42table_name,row_key,predicate_filter,true_mutations,false_mutations\xda\x41Qtable_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id\x82\xd3\xe4\x93\x02\xac\x01\"B/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\x01*Zc\"^/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xee\x01\n\x0bPingAndWarm\x12&.google.bigtable.v2.PingAndWarmRequest\x1a\'.google.bigtable.v2.PingAndWarmResponse\"\x8d\x01\xda\x41\x04name\xda\x41\x13name,app_profile_id\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/instances/*}:ping:\x01*\x8a\xd3\xe4\x93\x02\x39\x12%\n\x04name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xa7\x04\n\x12ReadModifyWriteRow\x12-.google.bigtable.v2.ReadModifyWriteRowRequest\x1a..google.bigtable.v2.ReadModifyWriteRowResponse\"\xb1\x03\xda\x41\x18table_name,row_key,rules\xda\x41\'table_name,row_key,rules,app_profile_id\x82\xd3\xe4\x93\x02\xae\x01\"C/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow:\x01*Zd\"_/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xbb\x02\n%GenerateInitialChangeStreamPartitions\x12@.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest\x1a\x41.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\x8a\x01\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02[\"V/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions:\x01*0\x01\x12\xe6\x01\n\x10ReadChangeStream\x12+.google.bigtable.v2.ReadChangeStreamRequest\x1a,.google.bigtable.v2.ReadChangeStreamResponse\"u\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x46\"A/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream:\x01*0\x01\x12\xa9\x02\n\x0cPrepareQuery\x12\'.google.bigtable.v2.PrepareQueryRequest\x1a(.google.bigtable.v2.PrepareQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:prepareQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xab\x02\n\x0c\x45xecuteQuery\x12\'.google.bigtable.v2.ExecuteQueryRequest\x1a(.google.bigtable.v2.ExecuteQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id0\x01\x1a\xdb\x02\xca\x41\x17\x62igtable.googleapis.com\xd2\x41\xbd\x02https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf5\x04\n\x16\x63om.google.bigtable.v2B\rBigtableProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\xea\x41\x87\x01\n+bigtableadmin.googleapis.com/AuthorizedView\x12Xprojects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}\xea\x41~\n-bigtableadmin.googleapis.com/MaterializedView\x12Mprojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\x06proto3" +descriptor_data = "\n!google/bigtable/v2/bigtable.proto\x12\x12google.bigtable.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1dgoogle/bigtable/v2/data.proto\x1a&google/bigtable/v2/request_stats.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xcc\x04\n\x0fReadRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x0b \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x05 \x01(\t\x12(\n\x04rows\x18\x02 \x01(\x0b\x32\x1a.google.bigtable.v2.RowSet\x12-\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x12\n\nrows_limit\x18\x04 \x01(\x03\x12P\n\x12request_stats_view\x18\x06 \x01(\x0e\x32\x34.google.bigtable.v2.ReadRowsRequest.RequestStatsView\x12\x10\n\x08reversed\x18\x07 \x01(\x08\"f\n\x10RequestStatsView\x12\"\n\x1eREQUEST_STATS_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12REQUEST_STATS_NONE\x10\x01\x12\x16\n\x12REQUEST_STATS_FULL\x10\x02\"\xb1\x03\n\x10ReadRowsResponse\x12>\n\x06\x63hunks\x18\x01 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12\x1c\n\x14last_scanned_row_key\x18\x02 \x01(\x0c\x12\x37\n\rrequest_stats\x18\x03 \x01(\x0b\x32 .google.bigtable.v2.RequestStats\x1a\x85\x02\n\tCellChunk\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x31\n\x0b\x66\x61mily_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12.\n\tqualifier\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\x0e\n\x06labels\x18\x05 \x03(\t\x12\r\n\x05value\x18\x06 \x01(\x0c\x12\x12\n\nvalue_size\x18\x07 \x01(\x05\x12\x13\n\treset_row\x18\x08 \x01(\x08H\x00\x12\x14\n\ncommit_row\x18\t \x01(\x08H\x00\x42\x0c\n\nrow_status\"\x98\x02\n\x14SampleRowKeysRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x05 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\">\n\x15SampleRowKeysResponse\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\"\xbf\x02\n\x10MutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x34\n\tmutations\x18\x03 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x08 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\x13\n\x11MutateRowResponse\"\xd1\x02\n\x11MutateRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x03 \x01(\t\x12\x41\n\x07\x65ntries\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.MutateRowsRequest.EntryB\x03\xe0\x41\x02\x1aN\n\x05\x45ntry\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x34\n\tmutations\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\"\xe4\x01\n\x12MutateRowsResponse\x12=\n\x07\x65ntries\x18\x01 \x03(\x0b\x32,.google.bigtable.v2.MutateRowsResponse.Entry\x12?\n\x0frate_limit_info\x18\x03 \x01(\x0b\x32!.google.bigtable.v2.RateLimitInfoH\x00\x88\x01\x01\x1a:\n\x05\x45ntry\x12\r\n\x05index\x18\x01 \x01(\x03\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x12\n\x10_rate_limit_info\"J\n\rRateLimitInfo\x12)\n\x06period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\x01\"\x81\x03\n\x18\x43heckAndMutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x07 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x37\n\x10predicate_filter\x18\x06 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x34\n\x0etrue_mutations\x18\x04 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\x12\x35\n\x0f\x66\x61lse_mutations\x18\x05 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\"6\n\x19\x43heckAndMutateRowResponse\x12\x19\n\x11predicate_matched\x18\x01 \x01(\x08\"i\n\x12PingAndWarmRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"\x15\n\x13PingAndWarmResponse\"\x99\x02\n\x19ReadModifyWriteRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12;\n\x05rules\x18\x03 \x03(\x0b\x32\'.google.bigtable.v2.ReadModifyWriteRuleB\x03\xe0\x41\x02\"B\n\x1aReadModifyWriteRowResponse\x12$\n\x03row\x18\x01 \x01(\x0b\x32\x17.google.bigtable.v2.Row\"\x86\x01\n,GenerateInitialChangeStreamPartitionsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"g\n-GenerateInitialChangeStreamPartitionsResponse\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\"\x9b\x03\n\x17ReadChangeStreamRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\x12\x36\n\tpartition\x18\x03 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\x30\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12K\n\x13\x63ontinuation_tokens\x18\x06 \x01(\x0b\x32,.google.bigtable.v2.StreamContinuationTokensH\x00\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12heartbeat_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\n\nstart_from\"\xa9\n\n\x18ReadChangeStreamResponse\x12N\n\x0b\x64\x61ta_change\x18\x01 \x01(\x0b\x32\x37.google.bigtable.v2.ReadChangeStreamResponse.DataChangeH\x00\x12K\n\theartbeat\x18\x02 \x01(\x0b\x32\x36.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatH\x00\x12P\n\x0c\x63lose_stream\x18\x03 \x01(\x0b\x32\x38.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamH\x00\x1a\xf4\x01\n\rMutationChunk\x12X\n\nchunk_info\x18\x01 \x01(\x0b\x32\x44.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\x12.\n\x08mutation\x18\x02 \x01(\x0b\x32\x1c.google.bigtable.v2.Mutation\x1aY\n\tChunkInfo\x12\x1a\n\x12\x63hunked_value_size\x18\x01 \x01(\x05\x12\x1c\n\x14\x63hunked_value_offset\x18\x02 \x01(\x05\x12\x12\n\nlast_chunk\x18\x03 \x01(\x08\x1a\xc6\x03\n\nDataChange\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\x12\x19\n\x11source_cluster_id\x18\x02 \x01(\t\x12\x0f\n\x07row_key\x18\x03 \x01(\x0c\x12\x34\n\x10\x63ommit_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntiebreaker\x18\x05 \x01(\x05\x12J\n\x06\x63hunks\x18\x06 \x03(\x0b\x32:.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\r\n\x05token\x18\t \x01(\t\x12;\n\x17\x65stimated_low_watermark\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x16\n\x12GARBAGE_COLLECTION\x10\x02\x12\x10\n\x0c\x43ONTINUATION\x10\x03\x1a\x91\x01\n\tHeartbeat\x12G\n\x12\x63ontinuation_token\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x17\x65stimated_low_watermark\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb8\x01\n\x0b\x43loseStream\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x13\x63ontinuation_tokens\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x0enew_partitions\x18\x03 \x03(\x0b\x32#.google.bigtable.v2.StreamPartitionB\x0f\n\rstream_record\"\xa1\x03\n\x13\x45xecuteQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x05query\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\x0eprepared_query\x18\t \x01(\x0c\x12;\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatB\x02\x18\x01H\x00\x12\x19\n\x0cresume_token\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x06params\x18\x07 \x03(\x0b\x32\x33.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\x03\xe0\x41\x02\x1aH\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x96\x01\n\x14\x45xecuteQueryResponse\x12\x39\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadataH\x00\x12\x37\n\x07results\x18\x02 \x01(\x0b\x32$.google.bigtable.v2.PartialResultSetH\x00\x42\n\n\x08response\"\xf4\x02\n\x13PrepareQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatH\x00\x12Q\n\x0bparam_types\x18\x06 \x03(\x0b\x32\x37.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\x03\xe0\x41\x02\x1aK\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x98\x01\n\x14PrepareQueryResponse\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadata\x12\x16\n\x0eprepared_query\x18\x02 \x01(\x0c\x12/\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xc9&\n\x08\x42igtable\x12\xdb\x03\n\x08ReadRows\x12#.google.bigtable.v2.ReadRowsRequest\x1a$.google.bigtable.v2.ReadRowsResponse\"\x81\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9a\x01\"9/v2/{table_name=projects/*/instances/*/tables/*}:readRows:\x01*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xee\x03\n\rSampleRowKeys\x12(.google.bigtable.v2.SampleRowKeysRequest\x1a).google.bigtable.v2.SampleRowKeysResponse\"\x85\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\x12>/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\x12Z/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\x82\x04\n\tMutateRow\x12$.google.bigtable.v2.MutateRowRequest\x1a%.google.bigtable.v2.MutateRowResponse\"\xa7\x03\xda\x41\x1ctable_name,row_key,mutations\xda\x41+table_name,row_key,mutations,app_profile_id\x82\xd3\xe4\x93\x02\x9c\x01\":/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow:\x01*Z[\"V/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xf5\x03\n\nMutateRows\x12%.google.bigtable.v2.MutateRowsRequest\x1a&.google.bigtable.v2.MutateRowsResponse\"\x95\x03\xda\x41\x12table_name,entries\xda\x41!table_name,entries,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\";/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows:\x01*Z\\\"W/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xf6\x04\n\x11\x43heckAndMutateRow\x12,.google.bigtable.v2.CheckAndMutateRowRequest\x1a-.google.bigtable.v2.CheckAndMutateRowResponse\"\x83\x04\xda\x41\x42table_name,row_key,predicate_filter,true_mutations,false_mutations\xda\x41Qtable_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id\x82\xd3\xe4\x93\x02\xac\x01\"B/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\x01*Zc\"^/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xee\x01\n\x0bPingAndWarm\x12&.google.bigtable.v2.PingAndWarmRequest\x1a\'.google.bigtable.v2.PingAndWarmResponse\"\x8d\x01\xda\x41\x04name\xda\x41\x13name,app_profile_id\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/instances/*}:ping:\x01*\x8a\xd3\xe4\x93\x02\x39\x12%\n\x04name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xa7\x04\n\x12ReadModifyWriteRow\x12-.google.bigtable.v2.ReadModifyWriteRowRequest\x1a..google.bigtable.v2.ReadModifyWriteRowResponse\"\xb1\x03\xda\x41\x18table_name,row_key,rules\xda\x41\'table_name,row_key,rules,app_profile_id\x82\xd3\xe4\x93\x02\xae\x01\"C/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow:\x01*Zd\"_/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xbb\x02\n%GenerateInitialChangeStreamPartitions\x12@.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest\x1a\x41.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\x8a\x01\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02[\"V/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions:\x01*0\x01\x12\xe6\x01\n\x10ReadChangeStream\x12+.google.bigtable.v2.ReadChangeStreamRequest\x1a,.google.bigtable.v2.ReadChangeStreamResponse\"u\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x46\"A/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream:\x01*0\x01\x12\xa9\x02\n\x0cPrepareQuery\x12\'.google.bigtable.v2.PrepareQueryRequest\x1a(.google.bigtable.v2.PrepareQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:prepareQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xab\x02\n\x0c\x45xecuteQuery\x12\'.google.bigtable.v2.ExecuteQueryRequest\x1a(.google.bigtable.v2.ExecuteQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id0\x01\x1a\xdb\x02\xca\x41\x17\x62igtable.googleapis.com\xd2\x41\xbd\x02https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf5\x04\n\x16\x63om.google.bigtable.v2B\rBigtableProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\xea\x41\x87\x01\n+bigtableadmin.googleapis.com/AuthorizedView\x12Xprojects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}\xea\x41~\n-bigtableadmin.googleapis.com/MaterializedView\x12Mprojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb b/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb index c440de80b01f..0bcb62539cb7 100644 --- a/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb +++ b/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb @@ -10,7 +10,7 @@ require 'google/type/date_pb' -descriptor_data = "\n\x1dgoogle/bigtable/v2/data.proto\x12\x12google.bigtable.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"@\n\x03Row\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12,\n\x08\x66\x61milies\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v2.Family\"C\n\x06\x46\x61mily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v2.Column\"D\n\x06\x43olumn\x12\x11\n\tqualifier\x18\x01 \x01(\x0c\x12\'\n\x05\x63\x65lls\x18\x02 \x03(\x0b\x32\x18.google.bigtable.v2.Cell\"?\n\x04\x43\x65ll\x12\x18\n\x10timestamp_micros\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x0e\n\x06labels\x18\x03 \x03(\t\"\xf4\x02\n\x05Value\x12&\n\x04type\x18\x07 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12\x13\n\traw_value\x18\x08 \x01(\x0cH\x00\x12\x1e\n\x14raw_timestamp_micros\x18\t \x01(\x03H\x00\x12\x15\n\x0b\x62ytes_value\x18\x02 \x01(\x0cH\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x13\n\tint_value\x18\x06 \x01(\x03H\x00\x12\x14\n\nbool_value\x18\n \x01(\x08H\x00\x12\x15\n\x0b\x66loat_value\x18\x0b \x01(\x01H\x00\x12\x35\n\x0ftimestamp_value\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\'\n\ndate_value\x18\r \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x35\n\x0b\x61rray_value\x18\x04 \x01(\x0b\x32\x1e.google.bigtable.v2.ArrayValueH\x00\x42\x06\n\x04kind\"7\n\nArrayValue\x12)\n\x06values\x18\x01 \x03(\x0b\x32\x19.google.bigtable.v2.Value\"\x8a\x01\n\x08RowRange\x12\x1a\n\x10start_key_closed\x18\x01 \x01(\x0cH\x00\x12\x18\n\x0estart_key_open\x18\x02 \x01(\x0cH\x00\x12\x16\n\x0c\x65nd_key_open\x18\x03 \x01(\x0cH\x01\x12\x18\n\x0e\x65nd_key_closed\x18\x04 \x01(\x0cH\x01\x42\x0b\n\tstart_keyB\t\n\x07\x65nd_key\"L\n\x06RowSet\x12\x10\n\x08row_keys\x18\x01 \x03(\x0c\x12\x30\n\nrow_ranges\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.RowRange\"\xc6\x01\n\x0b\x43olumnRange\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12 \n\x16start_qualifier_closed\x18\x02 \x01(\x0cH\x00\x12\x1e\n\x14start_qualifier_open\x18\x03 \x01(\x0cH\x00\x12\x1e\n\x14\x65nd_qualifier_closed\x18\x04 \x01(\x0cH\x01\x12\x1c\n\x12\x65nd_qualifier_open\x18\x05 \x01(\x0cH\x01\x42\x11\n\x0fstart_qualifierB\x0f\n\rend_qualifier\"N\n\x0eTimestampRange\x12\x1e\n\x16start_timestamp_micros\x18\x01 \x01(\x03\x12\x1c\n\x14\x65nd_timestamp_micros\x18\x02 \x01(\x03\"\x98\x01\n\nValueRange\x12\x1c\n\x12start_value_closed\x18\x01 \x01(\x0cH\x00\x12\x1a\n\x10start_value_open\x18\x02 \x01(\x0cH\x00\x12\x1a\n\x10\x65nd_value_closed\x18\x03 \x01(\x0cH\x01\x12\x18\n\x0e\x65nd_value_open\x18\x04 \x01(\x0cH\x01\x42\r\n\x0bstart_valueB\x0b\n\tend_value\"\xdf\x08\n\tRowFilter\x12\x34\n\x05\x63hain\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.RowFilter.ChainH\x00\x12>\n\ninterleave\x18\x02 \x01(\x0b\x32(.google.bigtable.v2.RowFilter.InterleaveH\x00\x12<\n\tcondition\x18\x03 \x01(\x0b\x32\'.google.bigtable.v2.RowFilter.ConditionH\x00\x12\x0e\n\x04sink\x18\x10 \x01(\x08H\x00\x12\x19\n\x0fpass_all_filter\x18\x11 \x01(\x08H\x00\x12\x1a\n\x10\x62lock_all_filter\x18\x12 \x01(\x08H\x00\x12\x1e\n\x14row_key_regex_filter\x18\x04 \x01(\x0cH\x00\x12\x1b\n\x11row_sample_filter\x18\x0e \x01(\x01H\x00\x12\"\n\x18\x66\x61mily_name_regex_filter\x18\x05 \x01(\tH\x00\x12\'\n\x1d\x63olumn_qualifier_regex_filter\x18\x06 \x01(\x0cH\x00\x12>\n\x13\x63olumn_range_filter\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v2.ColumnRangeH\x00\x12\x44\n\x16timestamp_range_filter\x18\x08 \x01(\x0b\x32\".google.bigtable.v2.TimestampRangeH\x00\x12\x1c\n\x12value_regex_filter\x18\t \x01(\x0cH\x00\x12<\n\x12value_range_filter\x18\x0f \x01(\x0b\x32\x1e.google.bigtable.v2.ValueRangeH\x00\x12%\n\x1b\x63\x65lls_per_row_offset_filter\x18\n \x01(\x05H\x00\x12$\n\x1a\x63\x65lls_per_row_limit_filter\x18\x0b \x01(\x05H\x00\x12\'\n\x1d\x63\x65lls_per_column_limit_filter\x18\x0c \x01(\x05H\x00\x12!\n\x17strip_value_transformer\x18\r \x01(\x08H\x00\x12!\n\x17\x61pply_label_transformer\x18\x13 \x01(\tH\x00\x1a\x37\n\x05\x43hain\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x1a<\n\nInterleave\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x1a\xad\x01\n\tCondition\x12\x37\n\x10predicate_filter\x18\x01 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x32\n\x0btrue_filter\x18\x02 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x33\n\x0c\x66\x61lse_filter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilterB\x08\n\x06\x66ilter\"\xad\x08\n\x08Mutation\x12\x38\n\x08set_cell\x18\x01 \x01(\x0b\x32$.google.bigtable.v2.Mutation.SetCellH\x00\x12=\n\x0b\x61\x64\x64_to_cell\x18\x05 \x01(\x0b\x32&.google.bigtable.v2.Mutation.AddToCellH\x00\x12\x41\n\rmerge_to_cell\x18\x06 \x01(\x0b\x32(.google.bigtable.v2.Mutation.MergeToCellH\x00\x12K\n\x12\x64\x65lete_from_column\x18\x02 \x01(\x0b\x32-.google.bigtable.v2.Mutation.DeleteFromColumnH\x00\x12K\n\x12\x64\x65lete_from_family\x18\x03 \x01(\x0b\x32-.google.bigtable.v2.Mutation.DeleteFromFamilyH\x00\x12\x45\n\x0f\x64\x65lete_from_row\x18\x04 \x01(\x0b\x32*.google.bigtable.v2.Mutation.DeleteFromRowH\x00\x1a\x61\n\x07SetCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x18\n\x10timestamp_micros\x18\x03 \x01(\x03\x12\r\n\x05value\x18\x04 \x01(\x0c\x1a\xad\x01\n\tAddToCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x33\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12,\n\ttimestamp\x18\x03 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12(\n\x05input\x18\x04 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x1a\xaf\x01\n\x0bMergeToCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x33\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12,\n\ttimestamp\x18\x03 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12(\n\x05input\x18\x04 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x1ay\n\x10\x44\x65leteFromColumn\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x36\n\ntime_range\x18\x03 \x01(\x0b\x32\".google.bigtable.v2.TimestampRange\x1a\'\n\x10\x44\x65leteFromFamily\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x1a\x0f\n\rDeleteFromRowB\n\n\x08mutation\"\x80\x01\n\x13ReadModifyWriteRule\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x16\n\x0c\x61ppend_value\x18\x03 \x01(\x0cH\x00\x12\x1a\n\x10increment_amount\x18\x04 \x01(\x03H\x00\x42\x06\n\x04rule\"B\n\x0fStreamPartition\x12/\n\trow_range\x18\x01 \x01(\x0b\x32\x1c.google.bigtable.v2.RowRange\"W\n\x18StreamContinuationTokens\x12;\n\x06tokens\x18\x01 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\"`\n\x17StreamContinuationToken\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\r\n\x05token\x18\x02 \x01(\t\"\r\n\x0bProtoFormat\"F\n\x0e\x43olumnMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x04type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\"B\n\x0bProtoSchema\x12\x33\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\".google.bigtable.v2.ColumnMetadata\"V\n\x11ResultSetMetadata\x12\x37\n\x0cproto_schema\x18\x01 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoSchemaH\x00\x42\x08\n\x06schema\"6\n\tProtoRows\x12)\n\x06values\x18\x02 \x03(\x0b\x32\x19.google.bigtable.v2.Value\"$\n\x0eProtoRowsBatch\x12\x12\n\nbatch_data\x18\x01 \x01(\x0c\"\xd5\x01\n\x10PartialResultSet\x12>\n\x10proto_rows_batch\x18\x03 \x01(\x0b\x32\".google.bigtable.v2.ProtoRowsBatchH\x00\x12\x1b\n\x0e\x62\x61tch_checksum\x18\x06 \x01(\rH\x01\x88\x01\x01\x12\x14\n\x0cresume_token\x18\x05 \x01(\x0c\x12\r\n\x05reset\x18\x07 \x01(\x08\x12\x1c\n\x14\x65stimated_batch_size\x18\x04 \x01(\x05\x42\x0e\n\x0cpartial_rowsB\x11\n\x0f_batch_checksumB\xb3\x01\n\x16\x63om.google.bigtable.v2B\tDataProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" +descriptor_data = "\n\x1dgoogle/bigtable/v2/data.proto\x12\x12google.bigtable.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"@\n\x03Row\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12,\n\x08\x66\x61milies\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v2.Family\"C\n\x06\x46\x61mily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v2.Column\"D\n\x06\x43olumn\x12\x11\n\tqualifier\x18\x01 \x01(\x0c\x12\'\n\x05\x63\x65lls\x18\x02 \x03(\x0b\x32\x18.google.bigtable.v2.Cell\"?\n\x04\x43\x65ll\x12\x18\n\x10timestamp_micros\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x0e\n\x06labels\x18\x03 \x03(\t\"\xf4\x02\n\x05Value\x12&\n\x04type\x18\x07 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12\x13\n\traw_value\x18\x08 \x01(\x0cH\x00\x12\x1e\n\x14raw_timestamp_micros\x18\t \x01(\x03H\x00\x12\x15\n\x0b\x62ytes_value\x18\x02 \x01(\x0cH\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x13\n\tint_value\x18\x06 \x01(\x03H\x00\x12\x14\n\nbool_value\x18\n \x01(\x08H\x00\x12\x15\n\x0b\x66loat_value\x18\x0b \x01(\x01H\x00\x12\x35\n\x0ftimestamp_value\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\'\n\ndate_value\x18\r \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x35\n\x0b\x61rray_value\x18\x04 \x01(\x0b\x32\x1e.google.bigtable.v2.ArrayValueH\x00\x42\x06\n\x04kind\"7\n\nArrayValue\x12)\n\x06values\x18\x01 \x03(\x0b\x32\x19.google.bigtable.v2.Value\"\x8a\x01\n\x08RowRange\x12\x1a\n\x10start_key_closed\x18\x01 \x01(\x0cH\x00\x12\x18\n\x0estart_key_open\x18\x02 \x01(\x0cH\x00\x12\x16\n\x0c\x65nd_key_open\x18\x03 \x01(\x0cH\x01\x12\x18\n\x0e\x65nd_key_closed\x18\x04 \x01(\x0cH\x01\x42\x0b\n\tstart_keyB\t\n\x07\x65nd_key\"L\n\x06RowSet\x12\x10\n\x08row_keys\x18\x01 \x03(\x0c\x12\x30\n\nrow_ranges\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.RowRange\"\xc6\x01\n\x0b\x43olumnRange\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12 \n\x16start_qualifier_closed\x18\x02 \x01(\x0cH\x00\x12\x1e\n\x14start_qualifier_open\x18\x03 \x01(\x0cH\x00\x12\x1e\n\x14\x65nd_qualifier_closed\x18\x04 \x01(\x0cH\x01\x12\x1c\n\x12\x65nd_qualifier_open\x18\x05 \x01(\x0cH\x01\x42\x11\n\x0fstart_qualifierB\x0f\n\rend_qualifier\"N\n\x0eTimestampRange\x12\x1e\n\x16start_timestamp_micros\x18\x01 \x01(\x03\x12\x1c\n\x14\x65nd_timestamp_micros\x18\x02 \x01(\x03\"\x98\x01\n\nValueRange\x12\x1c\n\x12start_value_closed\x18\x01 \x01(\x0cH\x00\x12\x1a\n\x10start_value_open\x18\x02 \x01(\x0cH\x00\x12\x1a\n\x10\x65nd_value_closed\x18\x03 \x01(\x0cH\x01\x12\x18\n\x0e\x65nd_value_open\x18\x04 \x01(\x0cH\x01\x42\r\n\x0bstart_valueB\x0b\n\tend_value\"\xdf\x08\n\tRowFilter\x12\x34\n\x05\x63hain\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.RowFilter.ChainH\x00\x12>\n\ninterleave\x18\x02 \x01(\x0b\x32(.google.bigtable.v2.RowFilter.InterleaveH\x00\x12<\n\tcondition\x18\x03 \x01(\x0b\x32\'.google.bigtable.v2.RowFilter.ConditionH\x00\x12\x0e\n\x04sink\x18\x10 \x01(\x08H\x00\x12\x19\n\x0fpass_all_filter\x18\x11 \x01(\x08H\x00\x12\x1a\n\x10\x62lock_all_filter\x18\x12 \x01(\x08H\x00\x12\x1e\n\x14row_key_regex_filter\x18\x04 \x01(\x0cH\x00\x12\x1b\n\x11row_sample_filter\x18\x0e \x01(\x01H\x00\x12\"\n\x18\x66\x61mily_name_regex_filter\x18\x05 \x01(\tH\x00\x12\'\n\x1d\x63olumn_qualifier_regex_filter\x18\x06 \x01(\x0cH\x00\x12>\n\x13\x63olumn_range_filter\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v2.ColumnRangeH\x00\x12\x44\n\x16timestamp_range_filter\x18\x08 \x01(\x0b\x32\".google.bigtable.v2.TimestampRangeH\x00\x12\x1c\n\x12value_regex_filter\x18\t \x01(\x0cH\x00\x12<\n\x12value_range_filter\x18\x0f \x01(\x0b\x32\x1e.google.bigtable.v2.ValueRangeH\x00\x12%\n\x1b\x63\x65lls_per_row_offset_filter\x18\n \x01(\x05H\x00\x12$\n\x1a\x63\x65lls_per_row_limit_filter\x18\x0b \x01(\x05H\x00\x12\'\n\x1d\x63\x65lls_per_column_limit_filter\x18\x0c \x01(\x05H\x00\x12!\n\x17strip_value_transformer\x18\r \x01(\x08H\x00\x12!\n\x17\x61pply_label_transformer\x18\x13 \x01(\tH\x00\x1a\x37\n\x05\x43hain\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x1a<\n\nInterleave\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x1a\xad\x01\n\tCondition\x12\x37\n\x10predicate_filter\x18\x01 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x32\n\x0btrue_filter\x18\x02 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x33\n\x0c\x66\x61lse_filter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilterB\x08\n\x06\x66ilter\"\xad\x08\n\x08Mutation\x12\x38\n\x08set_cell\x18\x01 \x01(\x0b\x32$.google.bigtable.v2.Mutation.SetCellH\x00\x12=\n\x0b\x61\x64\x64_to_cell\x18\x05 \x01(\x0b\x32&.google.bigtable.v2.Mutation.AddToCellH\x00\x12\x41\n\rmerge_to_cell\x18\x06 \x01(\x0b\x32(.google.bigtable.v2.Mutation.MergeToCellH\x00\x12K\n\x12\x64\x65lete_from_column\x18\x02 \x01(\x0b\x32-.google.bigtable.v2.Mutation.DeleteFromColumnH\x00\x12K\n\x12\x64\x65lete_from_family\x18\x03 \x01(\x0b\x32-.google.bigtable.v2.Mutation.DeleteFromFamilyH\x00\x12\x45\n\x0f\x64\x65lete_from_row\x18\x04 \x01(\x0b\x32*.google.bigtable.v2.Mutation.DeleteFromRowH\x00\x1a\x61\n\x07SetCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x18\n\x10timestamp_micros\x18\x03 \x01(\x03\x12\r\n\x05value\x18\x04 \x01(\x0c\x1a\xad\x01\n\tAddToCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x33\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12,\n\ttimestamp\x18\x03 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12(\n\x05input\x18\x04 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x1a\xaf\x01\n\x0bMergeToCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x33\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12,\n\ttimestamp\x18\x03 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12(\n\x05input\x18\x04 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x1ay\n\x10\x44\x65leteFromColumn\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x36\n\ntime_range\x18\x03 \x01(\x0b\x32\".google.bigtable.v2.TimestampRange\x1a\'\n\x10\x44\x65leteFromFamily\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x1a\x0f\n\rDeleteFromRowB\n\n\x08mutation\"\x80\x01\n\x13ReadModifyWriteRule\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x16\n\x0c\x61ppend_value\x18\x03 \x01(\x0cH\x00\x12\x1a\n\x10increment_amount\x18\x04 \x01(\x03H\x00\x42\x06\n\x04rule\"B\n\x0fStreamPartition\x12/\n\trow_range\x18\x01 \x01(\x0b\x32\x1c.google.bigtable.v2.RowRange\"W\n\x18StreamContinuationTokens\x12;\n\x06tokens\x18\x01 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\"`\n\x17StreamContinuationToken\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\r\n\x05token\x18\x02 \x01(\t\"\r\n\x0bProtoFormat\"F\n\x0e\x43olumnMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x04type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\"B\n\x0bProtoSchema\x12\x33\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\".google.bigtable.v2.ColumnMetadata\"V\n\x11ResultSetMetadata\x12\x37\n\x0cproto_schema\x18\x01 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoSchemaH\x00\x42\x08\n\x06schema\"6\n\tProtoRows\x12)\n\x06values\x18\x02 \x03(\x0b\x32\x19.google.bigtable.v2.Value\"$\n\x0eProtoRowsBatch\x12\x12\n\nbatch_data\x18\x01 \x01(\x0c\"\xd5\x01\n\x10PartialResultSet\x12>\n\x10proto_rows_batch\x18\x03 \x01(\x0b\x32\".google.bigtable.v2.ProtoRowsBatchH\x00\x12\x1b\n\x0e\x62\x61tch_checksum\x18\x06 \x01(\rH\x01\x88\x01\x01\x12\x14\n\x0cresume_token\x18\x05 \x01(\x0c\x12\r\n\x05reset\x18\x07 \x01(\x08\x12\x1c\n\x14\x65stimated_batch_size\x18\x04 \x01(\x05\x42\x0e\n\x0cpartial_rowsB\x11\n\x0f_batch_checksum\"L\n\x0bIdempotency\x12\r\n\x05token\x18\x01 \x01(\x0c\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xb3\x01\n\x16\x63om.google.bigtable.v2B\tDataProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -76,6 +76,7 @@ module V2 ProtoRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoRows").msgclass ProtoRowsBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoRowsBatch").msgclass PartialResultSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PartialResultSet").msgclass + Idempotency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Idempotency").msgclass end end end diff --git a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb index 27337923d0de..aac209538e13 100644 --- a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb +++ b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb @@ -477,7 +477,7 @@ def sample_row_keys request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload mutate_row(table_name: nil, authorized_view_name: nil, app_profile_id: nil, row_key: nil, mutations: nil) + # @overload mutate_row(table_name: nil, authorized_view_name: nil, app_profile_id: nil, row_key: nil, mutations: nil, idempotency: nil) # Pass arguments to `mutate_row` 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). @@ -503,6 +503,9 @@ def sample_row_keys request, options = nil # Required. Changes to be atomically applied to the specified row. Entries # are applied in order, meaning that earlier mutations can be masked by later # ones. Must contain at least one entry and at most 100000. + # @param idempotency [::Google::Cloud::Bigtable::V2::Idempotency, ::Hash] + # Optional parameter for ensuring a MutateRow request is only applied once. + # Currently applicable only for certain aggregate types. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Bigtable::V2::MutateRowResponse] diff --git a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb index e346836d7100..af9776b73d12 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb @@ -278,6 +278,10 @@ class SampleRowKeysResponse # Required. Changes to be atomically applied to the specified row. Entries # are applied in order, meaning that earlier mutations can be masked by later # ones. Must contain at least one entry and at most 100000. + # @!attribute [rw] idempotency + # @return [::Google::Cloud::Bigtable::V2::Idempotency] + # Optional parameter for ensuring a MutateRow request is only applied once. + # Currently applicable only for certain aggregate types. class MutateRowRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb index 77af2c95fe17..2beda16a4f2f 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb @@ -970,6 +970,26 @@ class PartialResultSet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Parameters on mutations where clients want to ensure idempotency (i.e. + # at-most-once semantics). This is currently only needed for certain aggregate + # types. + # @!attribute [rw] token + # @return [::String] + # Unique token used to identify replays of this mutation. + # Must be at least 8 bytes long. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Client-assigned timestamp when the mutation's first attempt was sent. + # Used to reject mutations that arrive after idempotency protection may + # have expired. May cause spurious rejections if clock skew is too high. + # + # Leave unset or zero to always accept the mutation, at the risk of + # double counting if the protection for previous attempts has expired. + class Idempotency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb b/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb index 8a7f29e8d8d3..4e06c26b0f97 100644 --- a/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb +++ b/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb @@ -245,6 +245,7 @@ def test_mutate_row app_profile_id = "hello world" row_key = "hello world" mutations = [{}] + idempotency = {} mutate_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :mutate_row, name @@ -254,6 +255,7 @@ def test_mutate_row assert_equal "hello world", request["app_profile_id"] assert_equal "hello world", request["row_key"] assert_kind_of ::Google::Cloud::Bigtable::V2::Mutation, request["mutations"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::Idempotency), request["idempotency"] refute_nil options end @@ -264,31 +266,31 @@ def test_mutate_row end # Use hash object - client.mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations }) do |response, operation| + client.mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.mutate_row table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations do |response, operation| + client.mutate_row table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.mutate_row ::Google::Cloud::Bigtable::V2::MutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations) do |response, operation| + client.mutate_row ::Google::Cloud::Bigtable::V2::MutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations }, grpc_options) do |response, operation| + client.mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.mutate_row(::Google::Cloud::Bigtable::V2::MutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations), grpc_options) do |response, operation| + client.mutate_row(::Google::Cloud::Bigtable::V2::MutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end From 5e2bca2f800b567420c092025c7fbd32551eeee5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:28:04 -0700 Subject: [PATCH 182/457] feat(ai_platform-v1): Support for ColabImage feat(ai_platform-v1): Support for Tool to support computer use --- .../v1/notebook_execution_job_pb.rb | 2 +- .../v1/notebook_software_config_pb.rb | 3 ++- .../lib/google/cloud/aiplatform/v1/tool_pb.rb | 4 +++- .../aiplatform/v1/notebook_execution_job.rb | 5 ++-- .../cloud/aiplatform/v1/notebook_runtime.rb | 8 ++++--- .../aiplatform/v1/notebook_software_config.rb | 23 +++++++++++++++++-- .../google/cloud/aiplatform/v1/tool.rb | 23 +++++++++++++++++++ 7 files changed, 57 insertions(+), 11 deletions(-) diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/notebook_execution_job_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/notebook_execution_job_pb.rb index dd867e3d4431..4e441f7cde58 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/notebook_execution_job_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/notebook_execution_job_pb.rb @@ -15,7 +15,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n7google/cloud/aiplatform/v1/notebook_execution_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a*google/cloud/aiplatform/v1/job_state.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a-google/cloud/aiplatform/v1/network_spec.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x83\x10\n\x14NotebookExecutionJob\x12o\n\x1a\x64\x61taform_repository_source\x18\x03 \x01(\x0b\x32I.google.cloud.aiplatform.v1.NotebookExecutionJob.DataformRepositorySourceH\x00\x12\x61\n\x13gcs_notebook_source\x18\x04 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.NotebookExecutionJob.GcsNotebookSourceH\x00\x12g\n\x16\x64irect_notebook_source\x18\x11 \x01(\x0b\x32\x45.google.cloud.aiplatform.v1.NotebookExecutionJob.DirectNotebookSourceH\x00\x12i\n\'notebook_runtime_template_resource_name\x18\x0e \x01(\tB6\xfa\x41\x33\n1aiplatform.googleapis.com/NotebookRuntimeTemplateH\x01\x12i\n\x17\x63ustom_environment_spec\x18\x10 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.NotebookExecutionJob.CustomEnvironmentSpecH\x01\x12\x18\n\x0egcs_output_uri\x18\x08 \x01(\tH\x02\x12\x18\n\x0e\x65xecution_user\x18\t \x01(\tH\x03\x12\x19\n\x0fservice_account\x18\x12 \x01(\tH\x03\x12^\n\x11workbench_runtime\x18\x17 \x01(\x0b\x32\x41.google.cloud.aiplatform.v1.NotebookExecutionJob.WorkbenchRuntimeH\x04\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x11\x65xecution_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12J\n\x16schedule_resource_name\x18\x06 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"aiplatform.googleapis.com/Schedule\x12<\n\tjob_state\x18\n \x01(\x0e\x32$.google.cloud.aiplatform.v1.JobStateB\x03\xe0\x41\x03\x12\'\n\x06status\x18\x0b \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12L\n\x06labels\x18\x13 \x03(\x0b\x32<.google.cloud.aiplatform.v1.NotebookExecutionJob.LabelsEntry\x12\x13\n\x0bkernel_name\x18\x14 \x01(\t\x12\x43\n\x0f\x65ncryption_spec\x18\x16 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x1aY\n\x18\x44\x61taformRepositorySource\x12)\n!dataform_repository_resource_name\x18\x01 \x01(\t\x12\x12\n\ncommit_sha\x18\x02 \x01(\t\x1a\x34\n\x11GcsNotebookSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x12\n\ngeneration\x18\x02 \x01(\t\x1a\'\n\x14\x44irectNotebookSource\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x1a\xe3\x01\n\x15\x43ustomEnvironmentSpec\x12=\n\x0cmachine_spec\x18\x01 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.MachineSpec\x12L\n\x14persistent_disk_spec\x18\x02 \x01(\x0b\x32..google.cloud.aiplatform.v1.PersistentDiskSpec\x12=\n\x0cnetwork_spec\x18\x03 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.NetworkSpec\x1a\x12\n\x10WorkbenchRuntime\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb9\x01\xea\x41\xb5\x01\n.aiplatform.googleapis.com/NotebookExecutionJob\x12Vprojects/{project}/locations/{location}/notebookExecutionJobs/{notebook_execution_job}*\x15notebookExecutionJobs2\x14notebookExecutionJobB\x11\n\x0fnotebook_sourceB\x12\n\x10\x65nvironment_specB\x10\n\x0e\x65xecution_sinkB\x14\n\x12\x65xecution_identityB\x15\n\x13runtime_environmentB\xd7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x19NotebookExecutionJobProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n7google/cloud/aiplatform/v1/notebook_execution_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a*google/cloud/aiplatform/v1/job_state.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a-google/cloud/aiplatform/v1/network_spec.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x80\x10\n\x14NotebookExecutionJob\x12o\n\x1a\x64\x61taform_repository_source\x18\x03 \x01(\x0b\x32I.google.cloud.aiplatform.v1.NotebookExecutionJob.DataformRepositorySourceH\x00\x12\x61\n\x13gcs_notebook_source\x18\x04 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.NotebookExecutionJob.GcsNotebookSourceH\x00\x12g\n\x16\x64irect_notebook_source\x18\x11 \x01(\x0b\x32\x45.google.cloud.aiplatform.v1.NotebookExecutionJob.DirectNotebookSourceH\x00\x12i\n\'notebook_runtime_template_resource_name\x18\x0e \x01(\tB6\xfa\x41\x33\n1aiplatform.googleapis.com/NotebookRuntimeTemplateH\x01\x12i\n\x17\x63ustom_environment_spec\x18\x10 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.NotebookExecutionJob.CustomEnvironmentSpecH\x01\x12\x18\n\x0egcs_output_uri\x18\x08 \x01(\tH\x02\x12\x18\n\x0e\x65xecution_user\x18\t \x01(\tH\x03\x12\x19\n\x0fservice_account\x18\x12 \x01(\tH\x03\x12^\n\x11workbench_runtime\x18\x17 \x01(\x0b\x32\x41.google.cloud.aiplatform.v1.NotebookExecutionJob.WorkbenchRuntimeH\x04\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x11\x65xecution_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12G\n\x16schedule_resource_name\x18\x06 \x01(\tB\'\xfa\x41$\n\"aiplatform.googleapis.com/Schedule\x12<\n\tjob_state\x18\n \x01(\x0e\x32$.google.cloud.aiplatform.v1.JobStateB\x03\xe0\x41\x03\x12\'\n\x06status\x18\x0b \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12L\n\x06labels\x18\x13 \x03(\x0b\x32<.google.cloud.aiplatform.v1.NotebookExecutionJob.LabelsEntry\x12\x13\n\x0bkernel_name\x18\x14 \x01(\t\x12\x43\n\x0f\x65ncryption_spec\x18\x16 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x1aY\n\x18\x44\x61taformRepositorySource\x12)\n!dataform_repository_resource_name\x18\x01 \x01(\t\x12\x12\n\ncommit_sha\x18\x02 \x01(\t\x1a\x34\n\x11GcsNotebookSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x12\n\ngeneration\x18\x02 \x01(\t\x1a\'\n\x14\x44irectNotebookSource\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x1a\xe3\x01\n\x15\x43ustomEnvironmentSpec\x12=\n\x0cmachine_spec\x18\x01 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.MachineSpec\x12L\n\x14persistent_disk_spec\x18\x02 \x01(\x0b\x32..google.cloud.aiplatform.v1.PersistentDiskSpec\x12=\n\x0cnetwork_spec\x18\x03 \x01(\x0b\x32\'.google.cloud.aiplatform.v1.NetworkSpec\x1a\x12\n\x10WorkbenchRuntime\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb9\x01\xea\x41\xb5\x01\n.aiplatform.googleapis.com/NotebookExecutionJob\x12Vprojects/{project}/locations/{location}/notebookExecutionJobs/{notebook_execution_job}*\x15notebookExecutionJobs2\x14notebookExecutionJobB\x11\n\x0fnotebook_sourceB\x12\n\x10\x65nvironment_specB\x10\n\x0e\x65xecution_sinkB\x14\n\x12\x65xecution_identityB\x15\n\x13runtime_environmentB\xd7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x19NotebookExecutionJobProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/notebook_software_config_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/notebook_software_config_pb.rb index f48d71f17fee..902e3d7f08eb 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/notebook_software_config_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/notebook_software_config_pb.rb @@ -8,7 +8,7 @@ require 'google/cloud/aiplatform/v1/env_var_pb' -descriptor_data = "\n9google/cloud/aiplatform/v1/notebook_software_config.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\"\xec\x02\n\x17PostStartupScriptConfig\x12 \n\x13post_startup_script\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17post_startup_script_url\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12x\n\x1cpost_startup_script_behavior\x18\x03 \x01(\x0e\x32M.google.cloud.aiplatform.v1.PostStartupScriptConfig.PostStartupScriptBehaviorB\x03\xe0\x41\x01\"\x8e\x01\n\x19PostStartupScriptBehavior\x12,\n(POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08RUN_ONCE\x10\x01\x12\x13\n\x0fRUN_EVERY_START\x10\x02\x12 \n\x1c\x44OWNLOAD_AND_RUN_EVERY_START\x10\x03\"\xac\x01\n\x16NotebookSoftwareConfig\x12\x34\n\x03\x65nv\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVarB\x03\xe0\x41\x01\x12\\\n\x1apost_startup_script_config\x18\x02 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.PostStartupScriptConfigB\x03\xe0\x41\x01\x42\xd9\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x1bNotebookSoftwareConfigProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n9google/cloud/aiplatform/v1/notebook_software_config.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\"\xec\x02\n\x17PostStartupScriptConfig\x12 \n\x13post_startup_script\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17post_startup_script_url\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12x\n\x1cpost_startup_script_behavior\x18\x03 \x01(\x0e\x32M.google.cloud.aiplatform.v1.PostStartupScriptConfig.PostStartupScriptBehaviorB\x03\xe0\x41\x01\"\x8e\x01\n\x19PostStartupScriptBehavior\x12,\n(POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08RUN_ONCE\x10\x01\x12\x13\n\x0fRUN_EVERY_START\x10\x02\x12 \n\x1c\x44OWNLOAD_AND_RUN_EVERY_START\x10\x03\"A\n\nColabImage\x12\x19\n\x0crelease_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x81\x02\n\x16NotebookSoftwareConfig\x12\x42\n\x0b\x63olab_image\x18\x05 \x01(\x0b\x32&.google.cloud.aiplatform.v1.ColabImageB\x03\xe0\x41\x01H\x00\x12\x34\n\x03\x65nv\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVarB\x03\xe0\x41\x01\x12\\\n\x1apost_startup_script_config\x18\x02 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.PostStartupScriptConfigB\x03\xe0\x41\x01\x42\x0f\n\rruntime_imageB\xd9\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x1bNotebookSoftwareConfigProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -41,6 +41,7 @@ module AIPlatform module V1 PostStartupScriptConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PostStartupScriptConfig").msgclass PostStartupScriptConfig::PostStartupScriptBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PostStartupScriptConfig.PostStartupScriptBehavior").enummodule + ColabImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ColabImage").msgclass NotebookSoftwareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.NotebookSoftwareConfig").msgclass end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb index 212ced89c81e..2694c4996b30 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb @@ -11,7 +11,7 @@ require 'google/type/latlng_pb' -descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\xc3\x04\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x12@\n\x0burl_context\x18\x08 \x01(\x0b\x32&.google.cloud.aiplatform.v1.UrlContextB\x03\xe0\x41\x01\x1a\x0e\n\x0cGoogleSearch\x1a\x0f\n\rCodeExecution\"\x0c\n\nUrlContext\"\xb2\x02\n\x13\x46unctionDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12;\n\x16parameters_json_schema\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x14response_json_schema\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"U\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"\xfa\x01\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmax_results\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12R\n\x10\x64\x61ta_store_specs\x18\x05 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec\x1a\x38\n\rDataStoreSpec\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"\x15\n\x13\x45nterpriseWebSearch\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\xb5\x06\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x12@\n\x0burl_context\x18\x08 \x01(\x0b\x32&.google.cloud.aiplatform.v1.UrlContextB\x03\xe0\x41\x01\x12G\n\x0c\x63omputer_use\x18\x0b \x01(\x0b\x32,.google.cloud.aiplatform.v1.Tool.ComputerUseB\x03\xe0\x41\x01\x1a\x0e\n\x0cGoogleSearch\x1a\x0f\n\rCodeExecution\x1a\xa6\x01\n\x0b\x43omputerUse\x12R\n\x0b\x65nvironment\x18\x01 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.Tool.ComputerUse.EnvironmentB\x03\xe0\x41\x02\"C\n\x0b\x45nvironment\x12\x1b\n\x17\x45NVIRONMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13\x45NVIRONMENT_BROWSER\x10\x01\"\x0c\n\nUrlContext\"\xb2\x02\n\x13\x46unctionDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12;\n\x16parameters_json_schema\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x14response_json_schema\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"U\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"\xfa\x01\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmax_results\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12R\n\x10\x64\x61ta_store_specs\x18\x05 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec\x1a\x38\n\rDataStoreSpec\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"\x15\n\x13\x45nterpriseWebSearch\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -47,6 +47,8 @@ module V1 Tool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tool").msgclass Tool::GoogleSearch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tool.GoogleSearch").msgclass Tool::CodeExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tool.CodeExecution").msgclass + Tool::ComputerUse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tool.ComputerUse").msgclass + Tool::ComputerUse::Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tool.ComputerUse.Environment").enummodule UrlContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UrlContext").msgclass FunctionDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionDeclaration").msgclass FunctionCall = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionCall").msgclass diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb index 5b082818bcaa..445d34ffd2d2 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb @@ -76,10 +76,9 @@ module V1 # @!attribute [rw] execution_timeout # @return [::Google::Protobuf::Duration] # Max running time of the execution job in seconds (default 86400s / 24 hrs). - # @!attribute [r] schedule_resource_name + # @!attribute [rw] schedule_resource_name # @return [::String] - # Output only. The Schedule resource name if this job is triggered by one. - # Format: + # The Schedule resource name if this job is triggered by one. Format: # `projects/{project_id}/locations/{location}/schedules/{schedule_id}` # @!attribute [r] job_state # @return [::Google::Cloud::AIPlatform::V1::JobState] diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb index aff3c08e8faa..d2dc32815e38 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb @@ -132,8 +132,9 @@ class LabelsEntry end # A runtime is a virtual machine allocated to a particular user for a - # particular Notebook file on temporary basis with lifetime limited to 24 - # hours. + # particular Notebook file on temporary basis with lifetime. Default runtimes + # have a lifetime of 18 hours, while custom runtimes last for 6 months from + # their creation or last upgrade. # @!attribute [r] name # @return [::String] # Output only. The resource name of the NotebookRuntime. @@ -285,7 +286,8 @@ module RuntimeState # NotebookRuntime is in running state. RUNNING = 1 - # NotebookRuntime is in starting state. + # NotebookRuntime is in starting state. This is when the runtime is being + # started from a stopped state. BEING_STARTED = 2 # NotebookRuntime is in stopping state. diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_software_config.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_software_config.rb index 5e118f348f02..9fd3a44ad7c8 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_software_config.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/notebook_software_config.rb @@ -28,7 +28,7 @@ module V1 # @!attribute [rw] post_startup_script_url # @return [::String] # Optional. Post startup script url to download. Example: - # https://bucket/script.sh + # `gs://bucket/script.sh` # @!attribute [rw] post_startup_script_behavior # @return [::Google::Cloud::AIPlatform::V1::PostStartupScriptConfig::PostStartupScriptBehavior] # Optional. Post startup script behavior that defines download and execution @@ -53,7 +53,26 @@ module PostStartupScriptBehavior end end - # Notebook Software Config. + # Colab image of the runtime. + # @!attribute [rw] release_name + # @return [::String] + # Optional. The release name of the NotebookRuntime Colab image, e.g. + # "py310". If not specified, detault to the latest release. + # @!attribute [r] description + # @return [::String] + # Output only. A human-readable description of the specified colab image + # release, populated by the system. Example: "Python 3.10", "Latest - current + # Python 3.11" + class ColabImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Notebook Software Config. This is passed to the backend when user + # makes software configurations in UI. + # @!attribute [rw] colab_image + # @return [::Google::Cloud::AIPlatform::V1::ColabImage] + # Optional. Google-managed NotebookRuntime colab image. # @!attribute [rw] env # @return [::Array<::Google::Cloud::AIPlatform::V1::EnvVar>] # Optional. Environment variables to be passed to the container. diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb index bdaabd2fa987..7d02063bd9ee 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb @@ -64,6 +64,11 @@ module V1 # @!attribute [rw] url_context # @return [::Google::Cloud::AIPlatform::V1::UrlContext] # Optional. Tool to support URL context retrieval. + # @!attribute [rw] computer_use + # @return [::Google::Cloud::AIPlatform::V1::Tool::ComputerUse] + # Optional. Tool to support the model interacting directly with the computer. + # If enabled, it automatically populates computer-use specific Function + # Declarations. class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -84,6 +89,24 @@ class CodeExecution include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Tool to support computer use. + # @!attribute [rw] environment + # @return [::Google::Cloud::AIPlatform::V1::Tool::ComputerUse::Environment] + # Required. The environment being operated. + class ComputerUse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the environment being operated, such as a web browser. + module Environment + # Defaults to browser. + ENVIRONMENT_UNSPECIFIED = 0 + + # Operates in a web browser. + ENVIRONMENT_BROWSER = 1 + end + end end # Tool to support URL context. From 642b3194f371d5ac2123193a55738ee2f9232cb4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:28:42 -0700 Subject: [PATCH 183/457] feat(dataproc-v1): Support for creating premium clusters (#30583) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add `cluster_tier` to support creating premium clusters PiperOrigin-RevId: 776861070 Source-Link: https://github.com/googleapis/googleapis/commit/ea37c68239166929165e5f038166ee633e110ad4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cbf711c0465224dc50a40e073de3ded25d4de802 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJjYmY3MTFjMDQ2NTIyNGRjNTBhNDBlMDczZGUzZGVkMjVkNGRlODAyIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/dataproc/v1/clusters_pb.rb | 3 ++- .../google/cloud/dataproc/v1/clusters.rb | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/clusters_pb.rb b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/clusters_pb.rb index 2014ef4f235c..e8325dcb9695 100644 --- a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/clusters_pb.rb +++ b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/clusters_pb.rb @@ -19,7 +19,7 @@ require 'google/type/interval_pb' -descriptor_data = "\n\'google/cloud/dataproc/v1/clusters.proto\x12\x18google.cloud.dataproc.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/dataproc/v1/operations.proto\x1a%google/cloud/dataproc/v1/shared.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1agoogle/type/interval.proto\"\xa2\x04\n\x07\x43luster\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\'.google.cloud.dataproc.v1.ClusterConfigB\x03\xe0\x41\x01\x12S\n\x16virtual_cluster_config\x18\n \x01(\x0b\x32..google.cloud.dataproc.v1.VirtualClusterConfigB\x03\xe0\x41\x01\x12\x42\n\x06labels\x18\x08 \x03(\x0b\x32-.google.cloud.dataproc.v1.Cluster.LabelsEntryB\x03\xe0\x41\x01\x12<\n\x06status\x18\x04 \x01(\x0b\x32\'.google.cloud.dataproc.v1.ClusterStatusB\x03\xe0\x41\x03\x12\x44\n\x0estatus_history\x18\x07 \x03(\x0b\x32\'.google.cloud.dataproc.v1.ClusterStatusB\x03\xe0\x41\x03\x12\x19\n\x0c\x63luster_uuid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12>\n\x07metrics\x18\t \x01(\x0b\x32(.google.cloud.dataproc.v1.ClusterMetricsB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\t\n\rClusterConfig\x12\x1a\n\rconfig_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0btemp_bucket\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x12gce_cluster_config\x18\x08 \x01(\x0b\x32*.google.cloud.dataproc.v1.GceClusterConfigB\x03\xe0\x41\x01\x12I\n\rmaster_config\x18\t \x01(\x0b\x32-.google.cloud.dataproc.v1.InstanceGroupConfigB\x03\xe0\x41\x01\x12I\n\rworker_config\x18\n \x01(\x0b\x32-.google.cloud.dataproc.v1.InstanceGroupConfigB\x03\xe0\x41\x01\x12S\n\x17secondary_worker_config\x18\x0c \x01(\x0b\x32-.google.cloud.dataproc.v1.InstanceGroupConfigB\x03\xe0\x41\x01\x12\x46\n\x0fsoftware_config\x18\r \x01(\x0b\x32(.google.cloud.dataproc.v1.SoftwareConfigB\x03\xe0\x41\x01\x12W\n\x16initialization_actions\x18\x0b \x03(\x0b\x32\x32.google.cloud.dataproc.v1.NodeInitializationActionB\x03\xe0\x41\x01\x12J\n\x11\x65ncryption_config\x18\x0f \x01(\x0b\x32*.google.cloud.dataproc.v1.EncryptionConfigB\x03\xe0\x41\x01\x12L\n\x12\x61utoscaling_config\x18\x12 \x01(\x0b\x32+.google.cloud.dataproc.v1.AutoscalingConfigB\x03\xe0\x41\x01\x12\x46\n\x0fsecurity_config\x18\x10 \x01(\x0b\x32(.google.cloud.dataproc.v1.SecurityConfigB\x03\xe0\x41\x01\x12H\n\x10lifecycle_config\x18\x11 \x01(\x0b\x32).google.cloud.dataproc.v1.LifecycleConfigB\x03\xe0\x41\x01\x12\x46\n\x0f\x65ndpoint_config\x18\x13 \x01(\x0b\x32(.google.cloud.dataproc.v1.EndpointConfigB\x03\xe0\x41\x01\x12H\n\x10metastore_config\x18\x14 \x01(\x0b\x32).google.cloud.dataproc.v1.MetastoreConfigB\x03\xe0\x41\x01\x12S\n\x16\x64\x61taproc_metric_config\x18\x17 \x01(\x0b\x32..google.cloud.dataproc.v1.DataprocMetricConfigB\x03\xe0\x41\x01\x12P\n\x15\x61uxiliary_node_groups\x18\x19 \x03(\x0b\x32,.google.cloud.dataproc.v1.AuxiliaryNodeGroupB\x03\xe0\x41\x01\"\x84\x02\n\x14VirtualClusterConfig\x12\x1b\n\x0estaging_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12[\n\x19kubernetes_cluster_config\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataproc.v1.KubernetesClusterConfigB\x03\xe0\x41\x02H\x00\x12Y\n\x19\x61uxiliary_services_config\x18\x07 \x01(\x0b\x32\x31.google.cloud.dataproc.v1.AuxiliaryServicesConfigB\x03\xe0\x41\x01\x42\x17\n\x15infrastructure_config\"\xc1\x01\n\x17\x41uxiliaryServicesConfig\x12H\n\x10metastore_config\x18\x01 \x01(\x0b\x32).google.cloud.dataproc.v1.MetastoreConfigB\x03\xe0\x41\x01\x12\\\n\x1bspark_history_server_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.dataproc.v1.SparkHistoryServerConfigB\x03\xe0\x41\x01\"\xba\x01\n\x0e\x45ndpointConfig\x12P\n\nhttp_ports\x18\x01 \x03(\x0b\x32\x37.google.cloud.dataproc.v1.EndpointConfig.HttpPortsEntryB\x03\xe0\x41\x03\x12$\n\x17\x65nable_http_port_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x30\n\x0eHttpPortsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\",\n\x11\x41utoscalingConfig\x12\x17\n\npolicy_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\"p\n\x10\x45ncryptionConfig\x12 \n\x13gce_pd_kms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12:\n\x07kms_key\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xba\x07\n\x10GceClusterConfig\x12\x15\n\x08zone_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bnetwork_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0esubnetwork_uri\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x10internal_ip_only\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12k\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32\x42.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccessB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16service_account_scopes\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x0c\n\x04tags\x18\x04 \x03(\t\x12O\n\x08metadata\x18\x05 \x03(\x0b\x32\x38.google.cloud.dataproc.v1.GceClusterConfig.MetadataEntryB\x03\xe0\x41\x01\x12P\n\x14reservation_affinity\x18\x0b \x01(\x0b\x32-.google.cloud.dataproc.v1.ReservationAffinityB\x03\xe0\x41\x01\x12M\n\x13node_group_affinity\x18\r \x01(\x0b\x32+.google.cloud.dataproc.v1.NodeGroupAffinityB\x03\xe0\x41\x01\x12W\n\x18shielded_instance_config\x18\x0e \x01(\x0b\x32\x30.google.cloud.dataproc.v1.ShieldedInstanceConfigB\x03\xe0\x41\x01\x12_\n\x1c\x63onfidential_instance_config\x18\x0f \x01(\x0b\x32\x34.google.cloud.dataproc.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x01\n\x17PrivateIpv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\x0c\n\x08OUTBOUND\x10\x02\x12\x11\n\rBIDIRECTIONAL\x10\x03\x42\x13\n\x11_internal_ip_only\"0\n\x11NodeGroupAffinity\x12\x1b\n\x0enode_group_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xd3\x01\n\x16ShieldedInstanceConfig\x12$\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x65nable_vtpm\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12-\n\x1b\x65nable_integrity_monitoring\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x15\n\x13_enable_secure_bootB\x0e\n\x0c_enable_vtpmB\x1e\n\x1c_enable_integrity_monitoring\"F\n\x1a\x43onfidentialInstanceConfig\x12(\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\xeb\x06\n\x13InstanceGroupConfig\x12\x1a\n\rnum_instances\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0einstance_names\x18\x02 \x03(\tB\x03\xe0\x41\x03\x12M\n\x13instance_references\x18\x0b \x03(\x0b\x32+.google.cloud.dataproc.v1.InstanceReferenceB\x03\xe0\x41\x03\x12\x16\n\timage_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10machine_type_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12>\n\x0b\x64isk_config\x18\x05 \x01(\x0b\x32$.google.cloud.dataproc.v1.DiskConfigB\x03\xe0\x41\x01\x12\x1b\n\x0eis_preemptible\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12Y\n\x0epreemptibility\x18\n \x01(\x0e\x32<.google.cloud.dataproc.v1.InstanceGroupConfig.PreemptibilityB\x03\xe0\x41\x01\x12O\n\x14managed_group_config\x18\x07 \x01(\x0b\x32,.google.cloud.dataproc.v1.ManagedGroupConfigB\x03\xe0\x41\x03\x12\x46\n\x0c\x61\x63\x63\x65lerators\x18\x08 \x03(\x0b\x32+.google.cloud.dataproc.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1d\n\x10min_cpu_platform\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11min_num_instances\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01\x12]\n\x1binstance_flexibility_policy\x18\r \x01(\x0b\x32\x33.google.cloud.dataproc.v1.InstanceFlexibilityPolicyB\x03\xe0\x41\x01\x12\x44\n\x0estartup_config\x18\x0e \x01(\x0b\x32\'.google.cloud.dataproc.v1.StartupConfigB\x03\xe0\x41\x01\"`\n\x0ePreemptibility\x12\x1e\n\x1aPREEMPTIBILITY_UNSPECIFIED\x10\x00\x12\x13\n\x0fNON_PREEMPTIBLE\x10\x01\x12\x0f\n\x0bPREEMPTIBLE\x10\x02\x12\x08\n\x04SPOT\x10\x03\"d\n\rStartupConfig\x12\x30\n\x1erequired_registration_fraction\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42!\n\x1f_required_registration_fraction\"m\n\x11InstanceReference\x12\x15\n\rinstance_name\x18\x01 \x01(\t\x12\x13\n\x0binstance_id\x18\x02 \x01(\t\x12\x12\n\npublic_key\x18\x03 \x01(\t\x12\x18\n\x10public_ecies_key\x18\x04 \x01(\t\"\x8c\x01\n\x12ManagedGroupConfig\x12#\n\x16instance_template_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12(\n\x1binstance_group_manager_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1ainstance_group_manager_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xe5\x05\n\x19InstanceFlexibilityPolicy\x12m\n\x16provisioning_model_mix\x18\x01 \x01(\x0b\x32H.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.ProvisioningModelMixB\x03\xe0\x41\x01\x12k\n\x17instance_selection_list\x18\x02 \x03(\x0b\x32\x45.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelectionB\x03\xe0\x41\x01\x12t\n\x1ainstance_selection_results\x18\x03 \x03(\x0b\x32K.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelectionResultB\x03\xe0\x41\x03\x1a\xbc\x01\n\x14ProvisioningModelMix\x12(\n\x16standard_capacity_base\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x36\n$standard_capacity_percent_above_base\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x19\n\x17_standard_capacity_baseB\'\n%_standard_capacity_percent_above_base\x1a\x42\n\x11InstanceSelection\x12\x1a\n\rmachine_types\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04rank\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1as\n\x17InstanceSelectionResult\x12\x1e\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1a\n\x08vm_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x0f\n\r_machine_typeB\x0b\n\t_vm_count\"L\n\x11\x41\x63\x63\x65leratorConfig\x12\x1c\n\x14\x61\x63\x63\x65lerator_type_uri\x18\x01 \x01(\t\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\"\xae\x02\n\nDiskConfig\x12\x1b\n\x0e\x62oot_disk_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0enum_local_ssds\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13local_ssd_interface\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12,\n\x1a\x62oot_disk_provisioned_iops\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x32\n boot_disk_provisioned_throughput\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x1d\n\x1b_boot_disk_provisioned_iopsB#\n!_boot_disk_provisioned_throughput\"n\n\x12\x41uxiliaryNodeGroup\x12<\n\nnode_group\x18\x01 \x01(\x0b\x32#.google.cloud.dataproc.v1.NodeGroupB\x03\xe0\x41\x02\x12\x1a\n\rnode_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xbd\x03\n\tNodeGroup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x05roles\x18\x02 \x03(\x0e\x32(.google.cloud.dataproc.v1.NodeGroup.RoleB\x03\xe0\x41\x02\x12M\n\x11node_group_config\x18\x03 \x01(\x0b\x32-.google.cloud.dataproc.v1.InstanceGroupConfigB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x04 \x03(\x0b\x32/.google.cloud.dataproc.v1.NodeGroup.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"(\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44RIVER\x10\x01:v\xea\x41s\n!dataproc.googleapis.com/NodeGroup\x12Nprojects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}\"s\n\x18NodeInitializationAction\x12\x1c\n\x0f\x65xecutable_file\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x11\x65xecution_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xd6\x03\n\rClusterStatus\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32-.google.cloud.dataproc.v1.ClusterStatus.StateB\x03\xe0\x41\x03\x12\x16\n\x06\x64\x65tail\x18\x02 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x01\x12\x39\n\x10state_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x08substate\x18\x04 \x01(\x0e\x32\x30.google.cloud.dataproc.v1.ClusterStatus.SubstateB\x03\xe0\x41\x03\"\xa7\x01\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x17\n\x13\x45RROR_DUE_TO_UPDATE\x10\t\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\x12\x0c\n\x08STOPPING\x10\x06\x12\x0b\n\x07STOPPED\x10\x07\x12\x0c\n\x08STARTING\x10\x08\x12\r\n\tREPAIRING\x10\n\"<\n\x08Substate\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\r\n\tUNHEALTHY\x10\x01\x12\x10\n\x0cSTALE_STATUS\x10\x02\"\xa0\x01\n\x0eSecurityConfig\x12\x46\n\x0fkerberos_config\x18\x01 \x01(\x0b\x32(.google.cloud.dataproc.v1.KerberosConfigB\x03\xe0\x41\x01\x12\x46\n\x0fidentity_config\x18\x02 \x01(\x0b\x32(.google.cloud.dataproc.v1.IdentityConfigB\x03\xe0\x41\x01\"\x90\x04\n\x0eKerberosConfig\x12\x1c\n\x0f\x65nable_kerberos\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1broot_principal_password_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkms_key_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ckeystore_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0etruststore_uri\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15keystore_password_uri\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10key_password_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17truststore_password_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17\x63ross_realm_trust_realm\x18\t \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x63ross_realm_trust_kdc\x18\n \x01(\tB\x03\xe0\x41\x01\x12+\n\x1e\x63ross_realm_trust_admin_server\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12\x32\n%cross_realm_trust_shared_password_uri\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0ekdc_db_key_uri\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12tgt_lifetime_hours\x18\x0e \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\x05realm\x18\x0f \x01(\tB\x03\xe0\x41\x01\"\xc6\x01\n\x0eIdentityConfig\x12r\n\x1cuser_service_account_mapping\x18\x01 \x03(\x0b\x32G.google.cloud.dataproc.v1.IdentityConfig.UserServiceAccountMappingEntryB\x03\xe0\x41\x02\x1a@\n\x1eUserServiceAccountMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf9\x01\n\x0eSoftwareConfig\x12\x1a\n\rimage_version\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12Q\n\nproperties\x18\x02 \x03(\x0b\x32\x38.google.cloud.dataproc.v1.SoftwareConfig.PropertiesEntryB\x03\xe0\x41\x01\x12\x45\n\x13optional_components\x18\x03 \x03(\x0e\x32#.google.cloud.dataproc.v1.ComponentB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x02\n\x0fLifecycleConfig\x12\x37\n\x0fidle_delete_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12;\n\x10\x61uto_delete_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12\x39\n\x0f\x61uto_delete_ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01H\x00\x12\x38\n\x0fidle_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x05\n\x03ttl\"_\n\x0fMetastoreConfig\x12L\n\x1a\x64\x61taproc_metastore_service\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n metastore.googleapis.com/Service\"\x9a\x02\n\x0e\x43lusterMetrics\x12O\n\x0chdfs_metrics\x18\x01 \x03(\x0b\x32\x39.google.cloud.dataproc.v1.ClusterMetrics.HdfsMetricsEntry\x12O\n\x0cyarn_metrics\x18\x02 \x03(\x0b\x32\x39.google.cloud.dataproc.v1.ClusterMetrics.YarnMetricsEntry\x1a\x32\n\x10HdfsMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x32\n\x10YarnMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\x9d\x03\n\x14\x44\x61taprocMetricConfig\x12K\n\x07metrics\x18\x01 \x03(\x0b\x32\x35.google.cloud.dataproc.v1.DataprocMetricConfig.MetricB\x03\xe0\x41\x02\x1a\x80\x01\n\x06Metric\x12W\n\rmetric_source\x18\x01 \x01(\x0e\x32;.google.cloud.dataproc.v1.DataprocMetricConfig.MetricSourceB\x03\xe0\x41\x02\x12\x1d\n\x10metric_overrides\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x0cMetricSource\x12\x1d\n\x19METRIC_SOURCE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MONITORING_AGENT_DEFAULTS\x10\x01\x12\x08\n\x04HDFS\x10\x02\x12\t\n\x05SPARK\x10\x03\x12\x08\n\x04YARN\x10\x04\x12\x18\n\x14SPARK_HISTORY_SERVER\x10\x05\x12\x0f\n\x0bHIVESERVER2\x10\x06\x12\x11\n\rHIVEMETASTORE\x10\x07\x12\t\n\x05\x46LINK\x10\x08\"\xee\x01\n\x14\x43reateClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x07\x63luster\x18\x02 \x01(\x0b\x32!.google.cloud.dataproc.v1.ClusterB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12V\n action_on_failed_primary_workers\x18\x05 \x01(\x0e\x32\'.google.cloud.dataproc.v1.FailureActionB\x03\xe0\x41\x01\"\xae\x02\n\x14UpdateClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x07\x63luster\x18\x03 \x01(\x0b\x32!.google.cloud.dataproc.v1.ClusterB\x03\xe0\x41\x02\x12\x45\n\x1dgraceful_decommission_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\x91\x01\n\x12StopClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_uuid\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x92\x01\n\x13StartClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_uuid\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x14\x44\x65leteClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_uuid\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\\\n\x11GetClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x13ListClustersRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"n\n\x14ListClustersResponse\x12\x38\n\x08\x63lusters\x18\x01 \x03(\x0b\x32!.google.cloud.dataproc.v1.ClusterB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xb3\x03\n\x16\x44iagnoseClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0ftarball_gcs_dir\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0etarball_access\x18\x05 \x01(\x0e\x32>.google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccessB\x03\xe0\x41\x01\x12\x36\n\x12\x64iagnosis_interval\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\x11\n\x04jobs\x18\n \x03(\tB\x03\xe0\x41\x01\x12!\n\x14yarn_application_ids\x18\x0b \x03(\tB\x03\xe0\x41\x01\"g\n\rTarballAccess\x12\x1e\n\x1aTARBALL_ACCESS_UNSPECIFIED\x10\x00\x12\x18\n\x14GOOGLE_CLOUD_SUPPORT\x10\x01\x12\x1c\n\x18GOOGLE_DATAPROC_DIAGNOSE\x10\x02\"1\n\x16\x44iagnoseClusterResults\x12\x17\n\noutput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xf8\x01\n\x13ReservationAffinity\x12Y\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.dataproc.v1.ReservationAffinity.TypeB\x03\xe0\x41\x01\x12\x10\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x32\xe4\x10\n\x11\x43lusterController\x12\x80\x02\n\rCreateCluster\x12..google.cloud.dataproc.v1.CreateClusterRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41<\n\x07\x43luster\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\xda\x41\x19project_id,region,cluster\x82\xd3\xe4\x93\x02>\"3/v1/projects/{project_id}/regions/{region}/clusters:\x07\x63luster\x12\xa8\x02\n\rUpdateCluster\x12..google.cloud.dataproc.v1.UpdateClusterRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41<\n\x07\x43luster\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\xda\x41\x32project_id,region,cluster_name,cluster,update_mask\x82\xd3\xe4\x93\x02M2B/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:\x07\x63luster\x12\xee\x01\n\x0bStopCluster\x12,.google.cloud.dataproc.v1.StopClusterRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41<\n\x07\x43luster\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\x82\xd3\xe4\x93\x02L\"G/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:stop:\x01*\x12\xf1\x01\n\x0cStartCluster\x12-.google.cloud.dataproc.v1.StartClusterRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41<\n\x07\x43luster\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\x82\xd3\xe4\x93\x02M\"H/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:start:\x01*\x12\x99\x02\n\rDeleteCluster\x12..google.cloud.dataproc.v1.DeleteClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\xda\x41\x1eproject_id,region,cluster_name\x82\xd3\xe4\x93\x02\x44*B/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}\x12\xc9\x01\n\nGetCluster\x12+.google.cloud.dataproc.v1.GetClusterRequest\x1a!.google.cloud.dataproc.v1.Cluster\"k\xda\x41\x1eproject_id,region,cluster_name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}\x12\xd9\x01\n\x0cListClusters\x12-.google.cloud.dataproc.v1.ListClustersRequest\x1a..google.cloud.dataproc.v1.ListClustersResponse\"j\xda\x41\x11project_id,region\xda\x41\x18project_id,region,filter\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/projects/{project_id}/regions/{region}/clusters\x12\xaa\x02\n\x0f\x44iagnoseCluster\x12\x30.google.cloud.dataproc.v1.DiagnoseClusterRequest\x1a\x1d.google.longrunning.Operation\"\xc5\x01\xca\x41K\n\x16\x44iagnoseClusterResults\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\xda\x41\x1eproject_id,region,cluster_name\x82\xd3\xe4\x93\x02P\"K/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose:\x01*\x1aK\xca\x41\x17\x64\x61taproc.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBl\n\x1c\x63om.google.cloud.dataproc.v1B\rClustersProtoP\x01Z;cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpbb\x06proto3" +descriptor_data = "\n\'google/cloud/dataproc/v1/clusters.proto\x12\x18google.cloud.dataproc.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/dataproc/v1/operations.proto\x1a%google/cloud/dataproc/v1/shared.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1agoogle/type/interval.proto\"\xa2\x04\n\x07\x43luster\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\'.google.cloud.dataproc.v1.ClusterConfigB\x03\xe0\x41\x01\x12S\n\x16virtual_cluster_config\x18\n \x01(\x0b\x32..google.cloud.dataproc.v1.VirtualClusterConfigB\x03\xe0\x41\x01\x12\x42\n\x06labels\x18\x08 \x03(\x0b\x32-.google.cloud.dataproc.v1.Cluster.LabelsEntryB\x03\xe0\x41\x01\x12<\n\x06status\x18\x04 \x01(\x0b\x32\'.google.cloud.dataproc.v1.ClusterStatusB\x03\xe0\x41\x03\x12\x44\n\x0estatus_history\x18\x07 \x03(\x0b\x32\'.google.cloud.dataproc.v1.ClusterStatusB\x03\xe0\x41\x03\x12\x19\n\x0c\x63luster_uuid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12>\n\x07metrics\x18\t \x01(\x0b\x32(.google.cloud.dataproc.v1.ClusterMetricsB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb5\n\n\rClusterConfig\x12N\n\x0c\x63luster_tier\x18\x1d \x01(\x0e\x32\x33.google.cloud.dataproc.v1.ClusterConfig.ClusterTierB\x03\xe0\x41\x01\x12\x1a\n\rconfig_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0btemp_bucket\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x12gce_cluster_config\x18\x08 \x01(\x0b\x32*.google.cloud.dataproc.v1.GceClusterConfigB\x03\xe0\x41\x01\x12I\n\rmaster_config\x18\t \x01(\x0b\x32-.google.cloud.dataproc.v1.InstanceGroupConfigB\x03\xe0\x41\x01\x12I\n\rworker_config\x18\n \x01(\x0b\x32-.google.cloud.dataproc.v1.InstanceGroupConfigB\x03\xe0\x41\x01\x12S\n\x17secondary_worker_config\x18\x0c \x01(\x0b\x32-.google.cloud.dataproc.v1.InstanceGroupConfigB\x03\xe0\x41\x01\x12\x46\n\x0fsoftware_config\x18\r \x01(\x0b\x32(.google.cloud.dataproc.v1.SoftwareConfigB\x03\xe0\x41\x01\x12W\n\x16initialization_actions\x18\x0b \x03(\x0b\x32\x32.google.cloud.dataproc.v1.NodeInitializationActionB\x03\xe0\x41\x01\x12J\n\x11\x65ncryption_config\x18\x0f \x01(\x0b\x32*.google.cloud.dataproc.v1.EncryptionConfigB\x03\xe0\x41\x01\x12L\n\x12\x61utoscaling_config\x18\x12 \x01(\x0b\x32+.google.cloud.dataproc.v1.AutoscalingConfigB\x03\xe0\x41\x01\x12\x46\n\x0fsecurity_config\x18\x10 \x01(\x0b\x32(.google.cloud.dataproc.v1.SecurityConfigB\x03\xe0\x41\x01\x12H\n\x10lifecycle_config\x18\x11 \x01(\x0b\x32).google.cloud.dataproc.v1.LifecycleConfigB\x03\xe0\x41\x01\x12\x46\n\x0f\x65ndpoint_config\x18\x13 \x01(\x0b\x32(.google.cloud.dataproc.v1.EndpointConfigB\x03\xe0\x41\x01\x12H\n\x10metastore_config\x18\x14 \x01(\x0b\x32).google.cloud.dataproc.v1.MetastoreConfigB\x03\xe0\x41\x01\x12S\n\x16\x64\x61taproc_metric_config\x18\x17 \x01(\x0b\x32..google.cloud.dataproc.v1.DataprocMetricConfigB\x03\xe0\x41\x01\x12P\n\x15\x61uxiliary_node_groups\x18\x19 \x03(\x0b\x32,.google.cloud.dataproc.v1.AuxiliaryNodeGroupB\x03\xe0\x41\x01\"`\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43LUSTER_TIER_STANDARD\x10\x01\x12\x18\n\x14\x43LUSTER_TIER_PREMIUM\x10\x02\"\x84\x02\n\x14VirtualClusterConfig\x12\x1b\n\x0estaging_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12[\n\x19kubernetes_cluster_config\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataproc.v1.KubernetesClusterConfigB\x03\xe0\x41\x02H\x00\x12Y\n\x19\x61uxiliary_services_config\x18\x07 \x01(\x0b\x32\x31.google.cloud.dataproc.v1.AuxiliaryServicesConfigB\x03\xe0\x41\x01\x42\x17\n\x15infrastructure_config\"\xc1\x01\n\x17\x41uxiliaryServicesConfig\x12H\n\x10metastore_config\x18\x01 \x01(\x0b\x32).google.cloud.dataproc.v1.MetastoreConfigB\x03\xe0\x41\x01\x12\\\n\x1bspark_history_server_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.dataproc.v1.SparkHistoryServerConfigB\x03\xe0\x41\x01\"\xba\x01\n\x0e\x45ndpointConfig\x12P\n\nhttp_ports\x18\x01 \x03(\x0b\x32\x37.google.cloud.dataproc.v1.EndpointConfig.HttpPortsEntryB\x03\xe0\x41\x03\x12$\n\x17\x65nable_http_port_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x30\n\x0eHttpPortsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\",\n\x11\x41utoscalingConfig\x12\x17\n\npolicy_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\"p\n\x10\x45ncryptionConfig\x12 \n\x13gce_pd_kms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12:\n\x07kms_key\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xba\x07\n\x10GceClusterConfig\x12\x15\n\x08zone_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bnetwork_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0esubnetwork_uri\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x10internal_ip_only\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12k\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32\x42.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccessB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16service_account_scopes\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x0c\n\x04tags\x18\x04 \x03(\t\x12O\n\x08metadata\x18\x05 \x03(\x0b\x32\x38.google.cloud.dataproc.v1.GceClusterConfig.MetadataEntryB\x03\xe0\x41\x01\x12P\n\x14reservation_affinity\x18\x0b \x01(\x0b\x32-.google.cloud.dataproc.v1.ReservationAffinityB\x03\xe0\x41\x01\x12M\n\x13node_group_affinity\x18\r \x01(\x0b\x32+.google.cloud.dataproc.v1.NodeGroupAffinityB\x03\xe0\x41\x01\x12W\n\x18shielded_instance_config\x18\x0e \x01(\x0b\x32\x30.google.cloud.dataproc.v1.ShieldedInstanceConfigB\x03\xe0\x41\x01\x12_\n\x1c\x63onfidential_instance_config\x18\x0f \x01(\x0b\x32\x34.google.cloud.dataproc.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x01\n\x17PrivateIpv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\x0c\n\x08OUTBOUND\x10\x02\x12\x11\n\rBIDIRECTIONAL\x10\x03\x42\x13\n\x11_internal_ip_only\"0\n\x11NodeGroupAffinity\x12\x1b\n\x0enode_group_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xd3\x01\n\x16ShieldedInstanceConfig\x12$\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x65nable_vtpm\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12-\n\x1b\x65nable_integrity_monitoring\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x15\n\x13_enable_secure_bootB\x0e\n\x0c_enable_vtpmB\x1e\n\x1c_enable_integrity_monitoring\"F\n\x1a\x43onfidentialInstanceConfig\x12(\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\xeb\x06\n\x13InstanceGroupConfig\x12\x1a\n\rnum_instances\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0einstance_names\x18\x02 \x03(\tB\x03\xe0\x41\x03\x12M\n\x13instance_references\x18\x0b \x03(\x0b\x32+.google.cloud.dataproc.v1.InstanceReferenceB\x03\xe0\x41\x03\x12\x16\n\timage_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10machine_type_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12>\n\x0b\x64isk_config\x18\x05 \x01(\x0b\x32$.google.cloud.dataproc.v1.DiskConfigB\x03\xe0\x41\x01\x12\x1b\n\x0eis_preemptible\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12Y\n\x0epreemptibility\x18\n \x01(\x0e\x32<.google.cloud.dataproc.v1.InstanceGroupConfig.PreemptibilityB\x03\xe0\x41\x01\x12O\n\x14managed_group_config\x18\x07 \x01(\x0b\x32,.google.cloud.dataproc.v1.ManagedGroupConfigB\x03\xe0\x41\x03\x12\x46\n\x0c\x61\x63\x63\x65lerators\x18\x08 \x03(\x0b\x32+.google.cloud.dataproc.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1d\n\x10min_cpu_platform\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11min_num_instances\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01\x12]\n\x1binstance_flexibility_policy\x18\r \x01(\x0b\x32\x33.google.cloud.dataproc.v1.InstanceFlexibilityPolicyB\x03\xe0\x41\x01\x12\x44\n\x0estartup_config\x18\x0e \x01(\x0b\x32\'.google.cloud.dataproc.v1.StartupConfigB\x03\xe0\x41\x01\"`\n\x0ePreemptibility\x12\x1e\n\x1aPREEMPTIBILITY_UNSPECIFIED\x10\x00\x12\x13\n\x0fNON_PREEMPTIBLE\x10\x01\x12\x0f\n\x0bPREEMPTIBLE\x10\x02\x12\x08\n\x04SPOT\x10\x03\"d\n\rStartupConfig\x12\x30\n\x1erequired_registration_fraction\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42!\n\x1f_required_registration_fraction\"m\n\x11InstanceReference\x12\x15\n\rinstance_name\x18\x01 \x01(\t\x12\x13\n\x0binstance_id\x18\x02 \x01(\t\x12\x12\n\npublic_key\x18\x03 \x01(\t\x12\x18\n\x10public_ecies_key\x18\x04 \x01(\t\"\x8c\x01\n\x12ManagedGroupConfig\x12#\n\x16instance_template_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12(\n\x1binstance_group_manager_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1ainstance_group_manager_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xe5\x05\n\x19InstanceFlexibilityPolicy\x12m\n\x16provisioning_model_mix\x18\x01 \x01(\x0b\x32H.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.ProvisioningModelMixB\x03\xe0\x41\x01\x12k\n\x17instance_selection_list\x18\x02 \x03(\x0b\x32\x45.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelectionB\x03\xe0\x41\x01\x12t\n\x1ainstance_selection_results\x18\x03 \x03(\x0b\x32K.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelectionResultB\x03\xe0\x41\x03\x1a\xbc\x01\n\x14ProvisioningModelMix\x12(\n\x16standard_capacity_base\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x36\n$standard_capacity_percent_above_base\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x19\n\x17_standard_capacity_baseB\'\n%_standard_capacity_percent_above_base\x1a\x42\n\x11InstanceSelection\x12\x1a\n\rmachine_types\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04rank\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1as\n\x17InstanceSelectionResult\x12\x1e\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1a\n\x08vm_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x0f\n\r_machine_typeB\x0b\n\t_vm_count\"L\n\x11\x41\x63\x63\x65leratorConfig\x12\x1c\n\x14\x61\x63\x63\x65lerator_type_uri\x18\x01 \x01(\t\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\"\xae\x02\n\nDiskConfig\x12\x1b\n\x0e\x62oot_disk_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0enum_local_ssds\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13local_ssd_interface\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12,\n\x1a\x62oot_disk_provisioned_iops\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x32\n boot_disk_provisioned_throughput\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x1d\n\x1b_boot_disk_provisioned_iopsB#\n!_boot_disk_provisioned_throughput\"n\n\x12\x41uxiliaryNodeGroup\x12<\n\nnode_group\x18\x01 \x01(\x0b\x32#.google.cloud.dataproc.v1.NodeGroupB\x03\xe0\x41\x02\x12\x1a\n\rnode_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xbd\x03\n\tNodeGroup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x05roles\x18\x02 \x03(\x0e\x32(.google.cloud.dataproc.v1.NodeGroup.RoleB\x03\xe0\x41\x02\x12M\n\x11node_group_config\x18\x03 \x01(\x0b\x32-.google.cloud.dataproc.v1.InstanceGroupConfigB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x04 \x03(\x0b\x32/.google.cloud.dataproc.v1.NodeGroup.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"(\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44RIVER\x10\x01:v\xea\x41s\n!dataproc.googleapis.com/NodeGroup\x12Nprojects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}\"s\n\x18NodeInitializationAction\x12\x1c\n\x0f\x65xecutable_file\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x11\x65xecution_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xd6\x03\n\rClusterStatus\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32-.google.cloud.dataproc.v1.ClusterStatus.StateB\x03\xe0\x41\x03\x12\x16\n\x06\x64\x65tail\x18\x02 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x01\x12\x39\n\x10state_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x08substate\x18\x04 \x01(\x0e\x32\x30.google.cloud.dataproc.v1.ClusterStatus.SubstateB\x03\xe0\x41\x03\"\xa7\x01\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x17\n\x13\x45RROR_DUE_TO_UPDATE\x10\t\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\x12\x0c\n\x08STOPPING\x10\x06\x12\x0b\n\x07STOPPED\x10\x07\x12\x0c\n\x08STARTING\x10\x08\x12\r\n\tREPAIRING\x10\n\"<\n\x08Substate\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\r\n\tUNHEALTHY\x10\x01\x12\x10\n\x0cSTALE_STATUS\x10\x02\"\xa0\x01\n\x0eSecurityConfig\x12\x46\n\x0fkerberos_config\x18\x01 \x01(\x0b\x32(.google.cloud.dataproc.v1.KerberosConfigB\x03\xe0\x41\x01\x12\x46\n\x0fidentity_config\x18\x02 \x01(\x0b\x32(.google.cloud.dataproc.v1.IdentityConfigB\x03\xe0\x41\x01\"\x90\x04\n\x0eKerberosConfig\x12\x1c\n\x0f\x65nable_kerberos\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1broot_principal_password_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bkms_key_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ckeystore_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0etruststore_uri\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15keystore_password_uri\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10key_password_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17truststore_password_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17\x63ross_realm_trust_realm\x18\t \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x63ross_realm_trust_kdc\x18\n \x01(\tB\x03\xe0\x41\x01\x12+\n\x1e\x63ross_realm_trust_admin_server\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12\x32\n%cross_realm_trust_shared_password_uri\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0ekdc_db_key_uri\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12tgt_lifetime_hours\x18\x0e \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\x05realm\x18\x0f \x01(\tB\x03\xe0\x41\x01\"\xc6\x01\n\x0eIdentityConfig\x12r\n\x1cuser_service_account_mapping\x18\x01 \x03(\x0b\x32G.google.cloud.dataproc.v1.IdentityConfig.UserServiceAccountMappingEntryB\x03\xe0\x41\x02\x1a@\n\x1eUserServiceAccountMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf9\x01\n\x0eSoftwareConfig\x12\x1a\n\rimage_version\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12Q\n\nproperties\x18\x02 \x03(\x0b\x32\x38.google.cloud.dataproc.v1.SoftwareConfig.PropertiesEntryB\x03\xe0\x41\x01\x12\x45\n\x13optional_components\x18\x03 \x03(\x0e\x32#.google.cloud.dataproc.v1.ComponentB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x02\n\x0fLifecycleConfig\x12\x37\n\x0fidle_delete_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12;\n\x10\x61uto_delete_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12\x39\n\x0f\x61uto_delete_ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01H\x00\x12\x38\n\x0fidle_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x05\n\x03ttl\"_\n\x0fMetastoreConfig\x12L\n\x1a\x64\x61taproc_metastore_service\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n metastore.googleapis.com/Service\"\x9a\x02\n\x0e\x43lusterMetrics\x12O\n\x0chdfs_metrics\x18\x01 \x03(\x0b\x32\x39.google.cloud.dataproc.v1.ClusterMetrics.HdfsMetricsEntry\x12O\n\x0cyarn_metrics\x18\x02 \x03(\x0b\x32\x39.google.cloud.dataproc.v1.ClusterMetrics.YarnMetricsEntry\x1a\x32\n\x10HdfsMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x32\n\x10YarnMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\x9d\x03\n\x14\x44\x61taprocMetricConfig\x12K\n\x07metrics\x18\x01 \x03(\x0b\x32\x35.google.cloud.dataproc.v1.DataprocMetricConfig.MetricB\x03\xe0\x41\x02\x1a\x80\x01\n\x06Metric\x12W\n\rmetric_source\x18\x01 \x01(\x0e\x32;.google.cloud.dataproc.v1.DataprocMetricConfig.MetricSourceB\x03\xe0\x41\x02\x12\x1d\n\x10metric_overrides\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x0cMetricSource\x12\x1d\n\x19METRIC_SOURCE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MONITORING_AGENT_DEFAULTS\x10\x01\x12\x08\n\x04HDFS\x10\x02\x12\t\n\x05SPARK\x10\x03\x12\x08\n\x04YARN\x10\x04\x12\x18\n\x14SPARK_HISTORY_SERVER\x10\x05\x12\x0f\n\x0bHIVESERVER2\x10\x06\x12\x11\n\rHIVEMETASTORE\x10\x07\x12\t\n\x05\x46LINK\x10\x08\"\xee\x01\n\x14\x43reateClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x07\x63luster\x18\x02 \x01(\x0b\x32!.google.cloud.dataproc.v1.ClusterB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12V\n action_on_failed_primary_workers\x18\x05 \x01(\x0e\x32\'.google.cloud.dataproc.v1.FailureActionB\x03\xe0\x41\x01\"\xae\x02\n\x14UpdateClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x07\x63luster\x18\x03 \x01(\x0b\x32!.google.cloud.dataproc.v1.ClusterB\x03\xe0\x41\x02\x12\x45\n\x1dgraceful_decommission_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\x91\x01\n\x12StopClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_uuid\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x92\x01\n\x13StartClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_uuid\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x14\x44\x65leteClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_uuid\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\\\n\x11GetClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x13ListClustersRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"n\n\x14ListClustersResponse\x12\x38\n\x08\x63lusters\x18\x01 \x03(\x0b\x32!.google.cloud.dataproc.v1.ClusterB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xb3\x03\n\x16\x44iagnoseClusterRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63luster_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0ftarball_gcs_dir\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0etarball_access\x18\x05 \x01(\x0e\x32>.google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccessB\x03\xe0\x41\x01\x12\x36\n\x12\x64iagnosis_interval\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\x11\n\x04jobs\x18\n \x03(\tB\x03\xe0\x41\x01\x12!\n\x14yarn_application_ids\x18\x0b \x03(\tB\x03\xe0\x41\x01\"g\n\rTarballAccess\x12\x1e\n\x1aTARBALL_ACCESS_UNSPECIFIED\x10\x00\x12\x18\n\x14GOOGLE_CLOUD_SUPPORT\x10\x01\x12\x1c\n\x18GOOGLE_DATAPROC_DIAGNOSE\x10\x02\"1\n\x16\x44iagnoseClusterResults\x12\x17\n\noutput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xf8\x01\n\x13ReservationAffinity\x12Y\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.dataproc.v1.ReservationAffinity.TypeB\x03\xe0\x41\x01\x12\x10\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x32\xe4\x10\n\x11\x43lusterController\x12\x80\x02\n\rCreateCluster\x12..google.cloud.dataproc.v1.CreateClusterRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41<\n\x07\x43luster\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\xda\x41\x19project_id,region,cluster\x82\xd3\xe4\x93\x02>\"3/v1/projects/{project_id}/regions/{region}/clusters:\x07\x63luster\x12\xa8\x02\n\rUpdateCluster\x12..google.cloud.dataproc.v1.UpdateClusterRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41<\n\x07\x43luster\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\xda\x41\x32project_id,region,cluster_name,cluster,update_mask\x82\xd3\xe4\x93\x02M2B/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:\x07\x63luster\x12\xee\x01\n\x0bStopCluster\x12,.google.cloud.dataproc.v1.StopClusterRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41<\n\x07\x43luster\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\x82\xd3\xe4\x93\x02L\"G/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:stop:\x01*\x12\xf1\x01\n\x0cStartCluster\x12-.google.cloud.dataproc.v1.StartClusterRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41<\n\x07\x43luster\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\x82\xd3\xe4\x93\x02M\"H/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:start:\x01*\x12\x99\x02\n\rDeleteCluster\x12..google.cloud.dataproc.v1.DeleteClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\xda\x41\x1eproject_id,region,cluster_name\x82\xd3\xe4\x93\x02\x44*B/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}\x12\xc9\x01\n\nGetCluster\x12+.google.cloud.dataproc.v1.GetClusterRequest\x1a!.google.cloud.dataproc.v1.Cluster\"k\xda\x41\x1eproject_id,region,cluster_name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}\x12\xd9\x01\n\x0cListClusters\x12-.google.cloud.dataproc.v1.ListClustersRequest\x1a..google.cloud.dataproc.v1.ListClustersResponse\"j\xda\x41\x11project_id,region\xda\x41\x18project_id,region,filter\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/projects/{project_id}/regions/{region}/clusters\x12\xaa\x02\n\x0f\x44iagnoseCluster\x12\x30.google.cloud.dataproc.v1.DiagnoseClusterRequest\x1a\x1d.google.longrunning.Operation\"\xc5\x01\xca\x41K\n\x16\x44iagnoseClusterResults\x12\x31google.cloud.dataproc.v1.ClusterOperationMetadata\xda\x41\x1eproject_id,region,cluster_name\x82\xd3\xe4\x93\x02P\"K/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose:\x01*\x1aK\xca\x41\x17\x64\x61taproc.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBl\n\x1c\x63om.google.cloud.dataproc.v1B\rClustersProtoP\x01Z;cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -56,6 +56,7 @@ module Dataproc module V1 Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.Cluster").msgclass ClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterConfig").msgclass + ClusterConfig::ClusterTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterConfig.ClusterTier").enummodule VirtualClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.VirtualClusterConfig").msgclass AuxiliaryServicesConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.AuxiliaryServicesConfig").msgclass EndpointConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.EndpointConfig").msgclass diff --git a/google-cloud-dataproc-v1/proto_docs/google/cloud/dataproc/v1/clusters.rb b/google-cloud-dataproc-v1/proto_docs/google/cloud/dataproc/v1/clusters.rb index 283d41205ef5..0c1a7707739b 100644 --- a/google-cloud-dataproc-v1/proto_docs/google/cloud/dataproc/v1/clusters.rb +++ b/google-cloud-dataproc-v1/proto_docs/google/cloud/dataproc/v1/clusters.rb @@ -90,6 +90,9 @@ class LabelsEntry end # The cluster config. + # @!attribute [rw] cluster_tier + # @return [::Google::Cloud::Dataproc::V1::ClusterConfig::ClusterTier] + # Optional. The cluster tier. # @!attribute [rw] config_bucket # @return [::String] # Optional. A Cloud Storage bucket used to stage job @@ -178,6 +181,18 @@ class LabelsEntry class ClusterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # The cluster tier. + module ClusterTier + # Not set. Works the same as CLUSTER_TIER_STANDARD. + CLUSTER_TIER_UNSPECIFIED = 0 + + # Standard Dataproc cluster. + CLUSTER_TIER_STANDARD = 1 + + # Premium Dataproc cluster. + CLUSTER_TIER_PREMIUM = 2 + end end # The Dataproc cluster config for a cluster that does not directly control the From fabcfa1e2ffe1631fee852689a97f70068ad5a3f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:32:25 -0700 Subject: [PATCH 184/457] feat(security_center-v2): Support for File operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(security_center-v2): Support for various additional Finding fields feat(security_center-v2): Support for chokepoints feat(security_center-v2): Support for additional mitre attack techniques feat(security_center-v2): Support for NotificationConfig#update_time feat(security_center-v2): Support for Process user ID feat(security_center-v2): Support for several additional Vulnerability fields PiperOrigin-RevId: 777661751 Source-Link: https://github.com/googleapis/googleapis/commit/6e014b5581675cd43f37918550f9145df0c703dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/0654d2af332746686bdc3c9433dfd305eddee706 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlci12Mi8uT3dsQm90LnlhbWwiLCJoIjoiMDY1NGQyYWYzMzI3NDY2ODZiZGMzYzk0MzNkZmQzMDVlZGRlZTcwNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 14 ++ .../v2/affected_resources_pb.rb | 42 ++++ .../cloud/securitycenter/v2/ai_model_pb.rb | 43 ++++ .../cloud/securitycenter/v2/chokepoint_pb.rb | 42 ++++ .../google/cloud/securitycenter/v2/file_pb.rb | 4 +- .../cloud/securitycenter/v2/finding_pb.rb | 16 +- .../securitycenter/v2/group_membership_pb.rb | 2 +- .../cloud/securitycenter/v2/ip_rules_pb.rb | 49 ++++ .../google/cloud/securitycenter/v2/job_pb.rb | 45 ++++ .../securitycenter/v2/mitre_attack_pb.rb | 2 +- .../cloud/securitycenter/v2/network_pb.rb | 42 ++++ .../v2/notification_config_pb.rb | 4 +- .../cloud/securitycenter/v2/process_pb.rb | 2 +- .../cloud/securitycenter/v2/resource_pb.rb | 3 +- .../v2/securitycenter_service_pb.rb | 7 +- .../cloud/securitycenter/v2/vertex_ai_pb.rb | 44 ++++ .../securitycenter/v2/vulnerability_pb.rb | 3 +- .../securitycenter/v2/affected_resources.rb | 35 +++ .../cloud/securitycenter/v2/ai_model.rb | 65 ++++++ .../cloud/securitycenter/v2/chokepoint.rb | 39 ++++ .../google/cloud/securitycenter/v2/disk.rb | 2 +- .../google/cloud/securitycenter/v2/file.rb | 33 +++ .../google/cloud/securitycenter/v2/finding.rb | 30 ++- .../securitycenter/v2/group_membership.rb | 3 + .../cloud/securitycenter/v2/ip_rules.rb | 122 ++++++++++ .../google/cloud/securitycenter/v2/job.rb | 65 ++++++ .../cloud/securitycenter/v2/mitre_attack.rb | 217 +++++++++++++++++- .../google/cloud/securitycenter/v2/network.rb | 36 +++ .../securitycenter/v2/notification_config.rb | 4 + .../google/cloud/securitycenter/v2/process.rb | 4 + .../cloud/securitycenter/v2/resource.rb | 6 +- .../v2/securitycenter_service.rb | 28 +++ .../cloud/securitycenter/v2/vertex_ai.rb | 68 ++++++ .../cloud/securitycenter/v2/vulnerability.rb | 26 +++ 34 files changed, 1131 insertions(+), 16 deletions(-) create mode 100644 google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb create mode 100644 google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb create mode 100644 google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb create mode 100644 google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb create mode 100644 google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb create mode 100644 google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb create mode 100644 google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb create mode 100644 google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb create mode 100644 google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb create mode 100644 google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb create mode 100644 google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb create mode 100644 google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb create mode 100644 google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb create mode 100644 google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb diff --git a/google-cloud-security_center-v2/.owlbot-manifest.json b/google-cloud-security_center-v2/.owlbot-manifest.json index 4a06a9e285e8..4cd89888ced3 100644 --- a/google-cloud-security_center-v2/.owlbot-manifest.json +++ b/google-cloud-security_center-v2/.owlbot-manifest.json @@ -27,11 +27,14 @@ "lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb", "lib/google/cloud/security_center/v2/version.rb", "lib/google/cloud/securitycenter/v2/access_pb.rb", + "lib/google/cloud/securitycenter/v2/affected_resources_pb.rb", + "lib/google/cloud/securitycenter/v2/ai_model_pb.rb", "lib/google/cloud/securitycenter/v2/application_pb.rb", "lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb", "lib/google/cloud/securitycenter/v2/attack_path_pb.rb", "lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb", "lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb", + "lib/google/cloud/securitycenter/v2/chokepoint_pb.rb", "lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb", "lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb", "lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb", @@ -52,6 +55,8 @@ "lib/google/cloud/securitycenter/v2/group_membership_pb.rb", "lib/google/cloud/securitycenter/v2/iam_binding_pb.rb", "lib/google/cloud/securitycenter/v2/indicator_pb.rb", + "lib/google/cloud/securitycenter/v2/ip_rules_pb.rb", + "lib/google/cloud/securitycenter/v2/job_pb.rb", "lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb", "lib/google/cloud/securitycenter/v2/kubernetes_pb.rb", "lib/google/cloud/securitycenter/v2/label_pb.rb", @@ -59,6 +64,7 @@ "lib/google/cloud/securitycenter/v2/log_entry_pb.rb", "lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb", "lib/google/cloud/securitycenter/v2/mute_config_pb.rb", + "lib/google/cloud/securitycenter/v2/network_pb.rb", "lib/google/cloud/securitycenter/v2/notebook_pb.rb", "lib/google/cloud/securitycenter/v2/notification_config_pb.rb", "lib/google/cloud/securitycenter/v2/notification_message_pb.rb", @@ -74,6 +80,7 @@ "lib/google/cloud/securitycenter/v2/source_pb.rb", "lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb", "lib/google/cloud/securitycenter/v2/valued_resource_pb.rb", + "lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb", "lib/google/cloud/securitycenter/v2/vulnerability_pb.rb", "proto_docs/README.md", "proto_docs/google/api/client.rb", @@ -82,11 +89,14 @@ "proto_docs/google/api/resource.rb", "proto_docs/google/api/routing.rb", "proto_docs/google/cloud/securitycenter/v2/access.rb", + "proto_docs/google/cloud/securitycenter/v2/affected_resources.rb", + "proto_docs/google/cloud/securitycenter/v2/ai_model.rb", "proto_docs/google/cloud/securitycenter/v2/application.rb", "proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb", "proto_docs/google/cloud/securitycenter/v2/attack_path.rb", "proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb", "proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb", + "proto_docs/google/cloud/securitycenter/v2/chokepoint.rb", "proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb", "proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb", "proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb", @@ -107,6 +117,8 @@ "proto_docs/google/cloud/securitycenter/v2/group_membership.rb", "proto_docs/google/cloud/securitycenter/v2/iam_binding.rb", "proto_docs/google/cloud/securitycenter/v2/indicator.rb", + "proto_docs/google/cloud/securitycenter/v2/ip_rules.rb", + "proto_docs/google/cloud/securitycenter/v2/job.rb", "proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb", "proto_docs/google/cloud/securitycenter/v2/kubernetes.rb", "proto_docs/google/cloud/securitycenter/v2/label.rb", @@ -114,6 +126,7 @@ "proto_docs/google/cloud/securitycenter/v2/log_entry.rb", "proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb", "proto_docs/google/cloud/securitycenter/v2/mute_config.rb", + "proto_docs/google/cloud/securitycenter/v2/network.rb", "proto_docs/google/cloud/securitycenter/v2/notebook.rb", "proto_docs/google/cloud/securitycenter/v2/notification_config.rb", "proto_docs/google/cloud/securitycenter/v2/notification_message.rb", @@ -128,6 +141,7 @@ "proto_docs/google/cloud/securitycenter/v2/source.rb", "proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb", "proto_docs/google/cloud/securitycenter/v2/valued_resource.rb", + "proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb", "proto_docs/google/cloud/securitycenter/v2/vulnerability.rb", "proto_docs/google/iam/v1/iam_policy.rb", "proto_docs/google/iam/v1/options.rb", diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb new file mode 100644 index 000000000000..d43fcd8420d3 --- /dev/null +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/affected_resources.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/cloud/securitycenter/v2/affected_resources.proto\x12\x1egoogle.cloud.securitycenter.v2\"\"\n\x11\x41\x66\x66\x65\x63tedResources\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x42\xf0\x01\n\"com.google.cloud.securitycenter.v2B\x16\x41\x66\x66\x65\x63tedResourcesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module SecurityCenter + module V2 + AffectedResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AffectedResources").msgclass + end + end + end +end diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb new file mode 100644 index 000000000000..54a0eff11416 --- /dev/null +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/ai_model.proto + +require 'google/protobuf' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/ai_model.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x9f\x02\n\x07\x41iModel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12\x0f\n\x07library\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x11\n\tpublisher\x18\x05 \x01(\t\x12W\n\x13\x64\x65ployment_platform\x18\x06 \x01(\x0e\x32:.google.cloud.securitycenter.v2.AiModel.DeploymentPlatform\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\"Q\n\x12\x44\x65ploymentPlatform\x12#\n\x1f\x44\x45PLOYMENT_PLATFORM_UNSPECIFIED\x10\x00\x12\r\n\tVERTEX_AI\x10\x01\x12\x07\n\x03GKE\x10\x02\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x41iModelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module SecurityCenter + module V2 + AiModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel").msgclass + AiModel::DeploymentPlatform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel.DeploymentPlatform").enummodule + end + end + end +end diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb new file mode 100644 index 000000000000..495023bfa2d8 --- /dev/null +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/chokepoint.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v2\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module SecurityCenter + module V2 + Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Chokepoint").msgclass + end + end + end +end diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb index 6af10fe107bb..6e9f7f1b59bb 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb @@ -5,7 +5,7 @@ require 'google/protobuf' -descriptor_data = "\n)google/cloud/securitycenter/v2/file.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xf0\x01\n\x04\x46ile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12\x0e\n\x06sha256\x18\x03 \x01(\t\x12\x13\n\x0bhashed_size\x18\x04 \x01(\x03\x12\x18\n\x10partially_hashed\x18\x05 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x06 \x01(\t\x12@\n\tdisk_path\x18\x07 \x01(\x0b\x32-.google.cloud.securitycenter.v2.File.DiskPath\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" +descriptor_data = "\n)google/cloud/securitycenter/v2/file.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x04\n\x04\x46ile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12\x0e\n\x06sha256\x18\x03 \x01(\t\x12\x13\n\x0bhashed_size\x18\x04 \x01(\x03\x12\x18\n\x10partially_hashed\x18\x05 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x06 \x01(\t\x12@\n\tdisk_path\x18\x07 \x01(\x0b\x32-.google.cloud.securitycenter.v2.File.DiskPath\x12\x46\n\noperations\x18\x08 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.File.FileOperation\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\t\x1a\xc8\x01\n\rFileOperation\x12N\n\x04type\x18\x01 \x01(\x0e\x32@.google.cloud.securitycenter.v2.File.FileOperation.OperationType\"g\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\x08\n\x04READ\x10\x02\x12\n\n\x06RENAME\x10\x03\x12\t\n\x05WRITE\x10\x04\x12\x0b\n\x07\x45XECUTE\x10\x05\x42\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -37,6 +37,8 @@ module SecurityCenter module V2 File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File").msgclass File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.DiskPath").msgclass + File::FileOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation").msgclass + File::FileOperation::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation.OperationType").enummodule end end end diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb index 8d4a91f96ddd..f2f84a0c20a3 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb @@ -7,9 +7,12 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/cloud/securitycenter/v2/access_pb' +require 'google/cloud/securitycenter/v2/affected_resources_pb' +require 'google/cloud/securitycenter/v2/ai_model_pb' require 'google/cloud/securitycenter/v2/application_pb' require 'google/cloud/securitycenter/v2/attack_exposure_pb' require 'google/cloud/securitycenter/v2/backup_disaster_recovery_pb' +require 'google/cloud/securitycenter/v2/chokepoint_pb' require 'google/cloud/securitycenter/v2/cloud_armor_pb' require 'google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb' require 'google/cloud/securitycenter/v2/cloud_dlp_inspection_pb' @@ -28,23 +31,27 @@ require 'google/cloud/securitycenter/v2/group_membership_pb' require 'google/cloud/securitycenter/v2/iam_binding_pb' require 'google/cloud/securitycenter/v2/indicator_pb' +require 'google/cloud/securitycenter/v2/ip_rules_pb' +require 'google/cloud/securitycenter/v2/job_pb' require 'google/cloud/securitycenter/v2/kernel_rootkit_pb' require 'google/cloud/securitycenter/v2/kubernetes_pb' require 'google/cloud/securitycenter/v2/load_balancer_pb' require 'google/cloud/securitycenter/v2/log_entry_pb' require 'google/cloud/securitycenter/v2/mitre_attack_pb' +require 'google/cloud/securitycenter/v2/network_pb' require 'google/cloud/securitycenter/v2/notebook_pb' require 'google/cloud/securitycenter/v2/org_policy_pb' require 'google/cloud/securitycenter/v2/process_pb' require 'google/cloud/securitycenter/v2/security_marks_pb' require 'google/cloud/securitycenter/v2/security_posture_pb' require 'google/cloud/securitycenter/v2/toxic_combination_pb' +require 'google/cloud/securitycenter/v2/vertex_ai_pb' require 'google/cloud/securitycenter/v2/vulnerability_pb' require 'google/protobuf/struct_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/securitycenter/v2/finding.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/access.proto\x1a\x30google/cloud/securitycenter/v2/application.proto\x1a\x34google/cloud/securitycenter/v2/attack_exposure.proto\x1a=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x1a\x30google/cloud/securitycenter/v2/cloud_armor.proto\x1a;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v2/compliance.proto\x1a/google/cloud/securitycenter/v2/connection.proto\x1a\x34google/cloud/securitycenter/v2/contact_details.proto\x1a.google/cloud/securitycenter/v2/container.proto\x1a\x36google/cloud/securitycenter/v2/data_access_event.proto\x1a\x34google/cloud/securitycenter/v2/data_flow_event.proto\x1a\x42google/cloud/securitycenter/v2/data_retention_deletion_event.proto\x1a-google/cloud/securitycenter/v2/database.proto\x1a)google/cloud/securitycenter/v2/disk.proto\x1a\x31google/cloud/securitycenter/v2/exfiltration.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a)google/cloud/securitycenter/v2/file.proto\x1a\x35google/cloud/securitycenter/v2/group_membership.proto\x1a\x30google/cloud/securitycenter/v2/iam_binding.proto\x1a.google/cloud/securitycenter/v2/indicator.proto\x1a\x33google/cloud/securitycenter/v2/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v2/kubernetes.proto\x1a\x32google/cloud/securitycenter/v2/load_balancer.proto\x1a.google/cloud/securitycenter/v2/log_entry.proto\x1a\x31google/cloud/securitycenter/v2/mitre_attack.proto\x1a-google/cloud/securitycenter/v2/notebook.proto\x1a/google/cloud/securitycenter/v2/org_policy.proto\x1a,google/cloud/securitycenter/v2/process.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a\x35google/cloud/securitycenter/v2/security_posture.proto\x1a\x36google/cloud/securitycenter/v2/toxic_combination.proto\x1a\x32google/cloud/securitycenter/v2/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xda%\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x0e\x63\x61nonical_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1a\n\rresource_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x65xternal_uri\x18\x08 \x01(\t\x12X\n\x11source_properties\x18\t \x03(\x0b\x32=.google.cloud.securitycenter.v2.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\n \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x08severity\x18\x0e \x01(\x0e\x32\x30.google.cloud.securitycenter.v2.Finding.Severity\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12H\n\tmute_info\x18\x35 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.Finding.MuteInfoB\x03\xe0\x41\x03\x12K\n\rfinding_class\x18\x10 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Finding.FindingClass\x12<\n\tindicator\x18\x11 \x01(\x0b\x32).google.cloud.securitycenter.v2.Indicator\x12\x44\n\rvulnerability\x18\x12 \x01(\x0b\x32-.google.cloud.securitycenter.v2.Vulnerability\x12\x39\n\x10mute_update_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x14 \x03(\x0b\x32<.google.cloud.securitycenter.v2.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x15 \x01(\x0b\x32+.google.cloud.securitycenter.v2.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x16 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Access\x12?\n\x0b\x63onnections\x18\x17 \x03(\x0b\x32*.google.cloud.securitycenter.v2.Connection\x12\x16\n\x0emute_initiator\x18\x18 \x01(\t\x12:\n\tprocesses\x18\x19 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Process\x12L\n\x08\x63ontacts\x18\x1a \x03(\x0b\x32\x35.google.cloud.securitycenter.v2.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\x1b \x03(\x0b\x32*.google.cloud.securitycenter.v2.Compliance\x12 \n\x13parent_display_name\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x1e \x01(\t\x12\x42\n\x0c\x65xfiltration\x18\x1f \x01(\x0b\x32,.google.cloud.securitycenter.v2.Exfiltration\x12@\n\x0ciam_bindings\x18 \x03(\x0b\x32*.google.cloud.securitycenter.v2.IamBinding\x12\x12\n\nnext_steps\x18! \x01(\t\x12\x13\n\x0bmodule_name\x18\" \x01(\t\x12=\n\ncontainers\x18# \x03(\x0b\x32).google.cloud.securitycenter.v2.Container\x12>\n\nkubernetes\x18$ \x01(\x0b\x32*.google.cloud.securitycenter.v2.Kubernetes\x12:\n\x08\x64\x61tabase\x18% \x01(\x0b\x32(.google.cloud.securitycenter.v2.Database\x12G\n\x0f\x61ttack_exposure\x18& \x01(\x0b\x32..google.cloud.securitycenter.v2.AttackExposure\x12\x33\n\x05\x66iles\x18\' \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12P\n\x14\x63loud_dlp_inspection\x18( \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18) \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18* \x01(\x0b\x32-.google.cloud.securitycenter.v2.KernelRootkit\x12?\n\x0corg_policies\x18+ \x03(\x0b\x32).google.cloud.securitycenter.v2.OrgPolicy\x12@\n\x0b\x61pplication\x18- \x01(\x0b\x32+.google.cloud.securitycenter.v2.Application\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18/ \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x30 \x01(\x0b\x32/.google.cloud.securitycenter.v2.SecurityPosture\x12=\n\x0blog_entries\x18\x31 \x03(\x0b\x32(.google.cloud.securitycenter.v2.LogEntry\x12\x44\n\x0eload_balancers\x18\x32 \x03(\x0b\x32,.google.cloud.securitycenter.v2.LoadBalancer\x12?\n\x0b\x63loud_armor\x18\x33 \x01(\x0b\x32*.google.cloud.securitycenter.v2.CloudArmor\x12:\n\x08notebook\x18\x37 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Notebook\x12K\n\x11toxic_combination\x18\x38 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.ToxicCombination\x12J\n\x11group_memberships\x18\x39 \x03(\x0b\x32/.google.cloud.securitycenter.v2.GroupMembership\x12\x32\n\x04\x64isk\x18: \x01(\x0b\x32$.google.cloud.securitycenter.v2.Disk\x12K\n\x12\x64\x61ta_access_events\x18= \x03(\x0b\x32/.google.cloud.securitycenter.v2.DataAccessEvent\x12G\n\x10\x64\x61ta_flow_events\x18> \x03(\x0b\x32-.google.cloud.securitycenter.v2.DataFlowEvent\x12\x62\n\x1e\x64\x61ta_retention_deletion_events\x18@ \x03(\x0b\x32:.google.cloud.securitycenter.v2.DataRetentionDeletionEvent\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x03\"\xc9\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08:\xdd\x03\xea\x41\xd9\x03\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12Uorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12Ifolders/{folder}/sources/{source}/locations/{location}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}\x12Kprojects/{project}/sources/{source}/locations/{location}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x46indingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" +descriptor_data = "\n,google/cloud/securitycenter/v2/finding.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/access.proto\x1a\x37google/cloud/securitycenter/v2/affected_resources.proto\x1a-google/cloud/securitycenter/v2/ai_model.proto\x1a\x30google/cloud/securitycenter/v2/application.proto\x1a\x34google/cloud/securitycenter/v2/attack_exposure.proto\x1a=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v2/chokepoint.proto\x1a\x30google/cloud/securitycenter/v2/cloud_armor.proto\x1a;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v2/compliance.proto\x1a/google/cloud/securitycenter/v2/connection.proto\x1a\x34google/cloud/securitycenter/v2/contact_details.proto\x1a.google/cloud/securitycenter/v2/container.proto\x1a\x36google/cloud/securitycenter/v2/data_access_event.proto\x1a\x34google/cloud/securitycenter/v2/data_flow_event.proto\x1a\x42google/cloud/securitycenter/v2/data_retention_deletion_event.proto\x1a-google/cloud/securitycenter/v2/database.proto\x1a)google/cloud/securitycenter/v2/disk.proto\x1a\x31google/cloud/securitycenter/v2/exfiltration.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a)google/cloud/securitycenter/v2/file.proto\x1a\x35google/cloud/securitycenter/v2/group_membership.proto\x1a\x30google/cloud/securitycenter/v2/iam_binding.proto\x1a.google/cloud/securitycenter/v2/indicator.proto\x1a-google/cloud/securitycenter/v2/ip_rules.proto\x1a(google/cloud/securitycenter/v2/job.proto\x1a\x33google/cloud/securitycenter/v2/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v2/kubernetes.proto\x1a\x32google/cloud/securitycenter/v2/load_balancer.proto\x1a.google/cloud/securitycenter/v2/log_entry.proto\x1a\x31google/cloud/securitycenter/v2/mitre_attack.proto\x1a,google/cloud/securitycenter/v2/network.proto\x1a-google/cloud/securitycenter/v2/notebook.proto\x1a/google/cloud/securitycenter/v2/org_policy.proto\x1a,google/cloud/securitycenter/v2/process.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a\x35google/cloud/securitycenter/v2/security_posture.proto\x1a\x36google/cloud/securitycenter/v2/toxic_combination.proto\x1a.google/cloud/securitycenter/v2/vertex_ai.proto\x1a\x32google/cloud/securitycenter/v2/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e)\n\x07\x46inding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x63\x61nonical_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1a\n\rresource_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x65xternal_uri\x18\x08 \x01(\t\x12X\n\x11source_properties\x18\t \x03(\x0b\x32=.google.cloud.securitycenter.v2.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\n \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x08severity\x18\x0e \x01(\x0e\x32\x30.google.cloud.securitycenter.v2.Finding.Severity\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12H\n\tmute_info\x18\x35 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.Finding.MuteInfoB\x03\xe0\x41\x03\x12K\n\rfinding_class\x18\x10 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Finding.FindingClass\x12<\n\tindicator\x18\x11 \x01(\x0b\x32).google.cloud.securitycenter.v2.Indicator\x12\x44\n\rvulnerability\x18\x12 \x01(\x0b\x32-.google.cloud.securitycenter.v2.Vulnerability\x12\x39\n\x10mute_update_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x14 \x03(\x0b\x32<.google.cloud.securitycenter.v2.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x15 \x01(\x0b\x32+.google.cloud.securitycenter.v2.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x16 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Access\x12?\n\x0b\x63onnections\x18\x17 \x03(\x0b\x32*.google.cloud.securitycenter.v2.Connection\x12\x16\n\x0emute_initiator\x18\x18 \x01(\t\x12:\n\tprocesses\x18\x19 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Process\x12L\n\x08\x63ontacts\x18\x1a \x03(\x0b\x32\x35.google.cloud.securitycenter.v2.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\x1b \x03(\x0b\x32*.google.cloud.securitycenter.v2.Compliance\x12 \n\x13parent_display_name\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x1e \x01(\t\x12\x42\n\x0c\x65xfiltration\x18\x1f \x01(\x0b\x32,.google.cloud.securitycenter.v2.Exfiltration\x12@\n\x0ciam_bindings\x18 \x03(\x0b\x32*.google.cloud.securitycenter.v2.IamBinding\x12\x12\n\nnext_steps\x18! \x01(\t\x12\x13\n\x0bmodule_name\x18\" \x01(\t\x12=\n\ncontainers\x18# \x03(\x0b\x32).google.cloud.securitycenter.v2.Container\x12>\n\nkubernetes\x18$ \x01(\x0b\x32*.google.cloud.securitycenter.v2.Kubernetes\x12:\n\x08\x64\x61tabase\x18% \x01(\x0b\x32(.google.cloud.securitycenter.v2.Database\x12G\n\x0f\x61ttack_exposure\x18& \x01(\x0b\x32..google.cloud.securitycenter.v2.AttackExposure\x12\x33\n\x05\x66iles\x18\' \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12P\n\x14\x63loud_dlp_inspection\x18( \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18) \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18* \x01(\x0b\x32-.google.cloud.securitycenter.v2.KernelRootkit\x12?\n\x0corg_policies\x18+ \x03(\x0b\x32).google.cloud.securitycenter.v2.OrgPolicy\x12\x30\n\x03job\x18, \x01(\x0b\x32#.google.cloud.securitycenter.v2.Job\x12@\n\x0b\x61pplication\x18- \x01(\x0b\x32+.google.cloud.securitycenter.v2.Application\x12\x39\n\x08ip_rules\x18. \x01(\x0b\x32\'.google.cloud.securitycenter.v2.IpRules\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18/ \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x30 \x01(\x0b\x32/.google.cloud.securitycenter.v2.SecurityPosture\x12=\n\x0blog_entries\x18\x31 \x03(\x0b\x32(.google.cloud.securitycenter.v2.LogEntry\x12\x44\n\x0eload_balancers\x18\x32 \x03(\x0b\x32,.google.cloud.securitycenter.v2.LoadBalancer\x12?\n\x0b\x63loud_armor\x18\x33 \x01(\x0b\x32*.google.cloud.securitycenter.v2.CloudArmor\x12:\n\x08notebook\x18\x37 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Notebook\x12K\n\x11toxic_combination\x18\x38 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.ToxicCombination\x12J\n\x11group_memberships\x18\x39 \x03(\x0b\x32/.google.cloud.securitycenter.v2.GroupMembership\x12\x32\n\x04\x64isk\x18: \x01(\x0b\x32$.google.cloud.securitycenter.v2.Disk\x12K\n\x12\x64\x61ta_access_events\x18= \x03(\x0b\x32/.google.cloud.securitycenter.v2.DataAccessEvent\x12G\n\x10\x64\x61ta_flow_events\x18> \x03(\x0b\x32-.google.cloud.securitycenter.v2.DataFlowEvent\x12\x39\n\x08networks\x18? \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Network\x12\x62\n\x1e\x64\x61ta_retention_deletion_events\x18@ \x03(\x0b\x32:.google.cloud.securitycenter.v2.DataRetentionDeletionEvent\x12M\n\x12\x61\x66\x66\x65\x63ted_resources\x18\x41 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.AffectedResources\x12\x39\n\x08\x61i_model\x18\x42 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AiModel\x12>\n\nchokepoint\x18\x45 \x01(\x0b\x32*.google.cloud.securitycenter.v2.Chokepoint\x12;\n\tvertex_ai\x18H \x01(\x0b\x32(.google.cloud.securitycenter.v2.VertexAi\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x03\"\xd9\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t:\xdd\x03\xea\x41\xd9\x03\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12Uorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12Ifolders/{folder}/sources/{source}/locations/{location}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}\x12Kprojects/{project}/sources/{source}/locations/{location}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x46indingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -79,7 +86,9 @@ ["google.cloud.securitycenter.v2.CloudDlpDataProfile", "google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto"], ["google.cloud.securitycenter.v2.KernelRootkit", "google/cloud/securitycenter/v2/kernel_rootkit.proto"], ["google.cloud.securitycenter.v2.OrgPolicy", "google/cloud/securitycenter/v2/org_policy.proto"], + ["google.cloud.securitycenter.v2.Job", "google/cloud/securitycenter/v2/job.proto"], ["google.cloud.securitycenter.v2.Application", "google/cloud/securitycenter/v2/application.proto"], + ["google.cloud.securitycenter.v2.IpRules", "google/cloud/securitycenter/v2/ip_rules.proto"], ["google.cloud.securitycenter.v2.BackupDisasterRecovery", "google/cloud/securitycenter/v2/backup_disaster_recovery.proto"], ["google.cloud.securitycenter.v2.SecurityPosture", "google/cloud/securitycenter/v2/security_posture.proto"], ["google.cloud.securitycenter.v2.LogEntry", "google/cloud/securitycenter/v2/log_entry.proto"], @@ -91,7 +100,12 @@ ["google.cloud.securitycenter.v2.Disk", "google/cloud/securitycenter/v2/disk.proto"], ["google.cloud.securitycenter.v2.DataAccessEvent", "google/cloud/securitycenter/v2/data_access_event.proto"], ["google.cloud.securitycenter.v2.DataFlowEvent", "google/cloud/securitycenter/v2/data_flow_event.proto"], + ["google.cloud.securitycenter.v2.Network", "google/cloud/securitycenter/v2/network.proto"], ["google.cloud.securitycenter.v2.DataRetentionDeletionEvent", "google/cloud/securitycenter/v2/data_retention_deletion_event.proto"], + ["google.cloud.securitycenter.v2.AffectedResources", "google/cloud/securitycenter/v2/affected_resources.proto"], + ["google.cloud.securitycenter.v2.AiModel", "google/cloud/securitycenter/v2/ai_model.proto"], + ["google.cloud.securitycenter.v2.Chokepoint", "google/cloud/securitycenter/v2/chokepoint.proto"], + ["google.cloud.securitycenter.v2.VertexAi", "google/cloud/securitycenter/v2/vertex_ai.proto"], ["google.protobuf.Value", "google/protobuf/struct.proto"], ["google.cloud.securitycenter.v2.ExternalSystem", "google/cloud/securitycenter/v2/external_system.proto"], ["google.cloud.securitycenter.v2.ContactDetails", "google/cloud/securitycenter/v2/contact_details.proto"], diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb index e6d1df0f389c..ecb306d50c06 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb @@ -5,7 +5,7 @@ require 'google/protobuf' -descriptor_data = "\n5google/cloud/securitycenter/v2/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xbd\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.GroupMembership.GroupType\x12\x10\n\x08group_id\x18\x02 \x01(\t\"I\n\tGroupType\x12\x1a\n\x16GROUP_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cGROUP_TYPE_TOXIC_COMBINATION\x10\x01\x42\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" +descriptor_data = "\n5google/cloud/securitycenter/v2/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.GroupMembership.GroupType\x12\x10\n\x08group_id\x18\x02 \x01(\t\"d\n\tGroupType\x12\x1a\n\x16GROUP_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cGROUP_TYPE_TOXIC_COMBINATION\x10\x01\x12\x19\n\x15GROUP_TYPE_CHOKEPOINT\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb new file mode 100644 index 000000000000..f60dba464119 --- /dev/null +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/ip_rules.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/ip_rules.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe2\x02\n\x07IpRules\x12\x44\n\tdirection\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.IpRules.Direction\x12:\n\x07\x61llowed\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AllowedH\x00\x12\x38\n\x06\x64\x65nied\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.DeniedH\x00\x12\x18\n\x10source_ip_ranges\x18\x04 \x03(\t\x12\x1d\n\x15\x64\x65stination_ip_ranges\x18\x05 \x03(\t\x12\x18\n\x10\x65xposed_services\x18\x06 \x03(\t\"?\n\tDirection\x12\x19\n\x15\x44IRECTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x42\x07\n\x05rules\"\x8d\x01\n\x06IpRule\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12J\n\x0bport_ranges\x18\x02 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.IpRule.PortRangeB\x03\xe0\x41\x01\x1a%\n\tPortRange\x12\x0b\n\x03min\x18\x01 \x01(\x03\x12\x0b\n\x03max\x18\x02 \x01(\x03\"H\n\x07\x41llowed\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\"G\n\x06\x44\x65nied\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cIpRulesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module SecurityCenter + module V2 + IpRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules").msgclass + IpRules::Direction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules.Direction").enummodule + IpRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule").msgclass + IpRule::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule.PortRange").msgclass + Allowed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Allowed").msgclass + Denied = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Denied").msgclass + end + end + end +end diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb new file mode 100644 index 000000000000..f060678c6365 --- /dev/null +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/job.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n(google/cloud/securitycenter/v2/job.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"w\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.google.cloud.securitycenter.v2.JobStateB\x03\xe0\x41\x03\x12\x12\n\nerror_code\x18\x03 \x01(\x05\x12\x10\n\x08location\x18\x04 \x01(\t*Z\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x42\xe2\x01\n\"com.google.cloud.securitycenter.v2B\x08JobProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module SecurityCenter + module V2 + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Job").msgclass + JobState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.JobState").enummodule + end + end + end +end diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb index f8e6921937b9..e5c9b181a39a 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb @@ -5,7 +5,7 @@ require 'google/protobuf' -descriptor_data = "\n1google/cloud/securitycenter/v2/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xf1\x13\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xb4\x02\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x12\n\x0eRECONNAISSANCE\x10\x01\x12\x18\n\x14RESOURCE_DEVELOPMENT\x10\x02\x12\x12\n\x0eINITIAL_ACCESS\x10\x05\x12\r\n\tEXECUTION\x10\x03\x12\x0f\n\x0bPERSISTENCE\x10\x06\x12\x18\n\x14PRIVILEGE_ESCALATION\x10\x08\x12\x13\n\x0f\x44\x45\x46\x45NSE_EVASION\x10\x07\x12\x15\n\x11\x43REDENTIAL_ACCESS\x10\t\x12\r\n\tDISCOVERY\x10\n\x12\x14\n\x10LATERAL_MOVEMENT\x10\x0b\x12\x0e\n\nCOLLECTION\x10\x0c\x12\x17\n\x13\x43OMMAND_AND_CONTROL\x10\x04\x12\x10\n\x0c\x45XFILTRATION\x10\r\x12\n\n\x06IMPACT\x10\x0e\"\xd4\x0e\n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMASQUERADING\x10\x31\x12%\n!MATCH_LEGITIMATE_NAME_OR_LOCATION\x10\x32\x12(\n$BOOT_OR_LOGON_INITIALIZATION_SCRIPTS\x10%\x12\x11\n\rSTARTUP_ITEMS\x10&\x12\x1d\n\x19NETWORK_SERVICE_DISCOVERY\x10 \x12\x15\n\x11PROCESS_DISCOVERY\x10\x38\x12%\n!COMMAND_AND_SCRIPTING_INTERPRETER\x10\x06\x12\x0e\n\nUNIX_SHELL\x10\x07\x12\n\n\x06PYTHON\x10;\x12)\n%EXPLOITATION_FOR_PRIVILEGE_ESCALATION\x10?\x12\x1f\n\x1bPERMISSION_GROUPS_DISCOVERY\x10\x12\x12\x10\n\x0c\x43LOUD_GROUPS\x10\x13\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12\x1e\n\x1a\x41PPLICATION_LAYER_PROTOCOL\x10-\x12\x07\n\x03\x44NS\x10.\x12\x1d\n\x19SOFTWARE_DEPLOYMENT_TOOLS\x10/\x12\x12\n\x0eVALID_ACCOUNTS\x10\x0e\x12\x14\n\x10\x44\x45\x46\x41ULT_ACCOUNTS\x10#\x12\x12\n\x0eLOCAL_ACCOUNTS\x10\x0f\x12\x12\n\x0e\x43LOUD_ACCOUNTS\x10\x10\x12\t\n\x05PROXY\x10\t\x12\x12\n\x0e\x45XTERNAL_PROXY\x10\n\x12\x13\n\x0fMULTI_HOP_PROXY\x10\x0b\x12\x18\n\x14\x41\x43\x43OUNT_MANIPULATION\x10\x16\x12 \n\x1c\x41\x44\x44ITIONAL_CLOUD_CREDENTIALS\x10(\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x16\n\x12RESOURCE_HIJACKING\x10\x08\x12\x1d\n\x19NETWORK_DENIAL_OF_SERVICE\x10\x11\x12\x1b\n\x17\x43LOUD_SERVICE_DISCOVERY\x10\x30\x12\"\n\x1eSTEAL_APPLICATION_ACCESS_TOKEN\x10*\x12\x1a\n\x16\x41\x43\x43OUNT_ACCESS_REMOVAL\x10\x33\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12\x1d\n\x19\x45VENT_TRIGGERED_EXECUTION\x10\x41\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12!\n\x1d\x45XFILTRATION_OVER_WEB_SERVICE\x10\x14\x12!\n\x1d\x45XFILTRATION_TO_CLOUD_STORAGE\x10\x15\x12\x16\n\x12\x44YNAMIC_RESOLUTION\x10\x0c\x12\x19\n\x15LATERAL_TOOL_TRANSFER\x10)\x12\'\n#MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE\x10\x1a\x12\x13\n\x0f\x43REATE_SNAPSHOT\x10\x36\x12\"\n\x1e\x43LOUD_INFRASTRUCTURE_DISCOVERY\x10\x35\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x14\n\x10\x44\x45PLOY_CONTAINER\x10\x42\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>B\xea\x01\n\"com.google.cloud.securitycenter.v2B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" +descriptor_data = "\n1google/cloud/securitycenter/v2/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xca%\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xb4\x02\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x12\n\x0eRECONNAISSANCE\x10\x01\x12\x18\n\x14RESOURCE_DEVELOPMENT\x10\x02\x12\x12\n\x0eINITIAL_ACCESS\x10\x05\x12\r\n\tEXECUTION\x10\x03\x12\x0f\n\x0bPERSISTENCE\x10\x06\x12\x18\n\x14PRIVILEGE_ESCALATION\x10\x08\x12\x13\n\x0f\x44\x45\x46\x45NSE_EVASION\x10\x07\x12\x15\n\x11\x43REDENTIAL_ACCESS\x10\t\x12\r\n\tDISCOVERY\x10\n\x12\x14\n\x10LATERAL_MOVEMENT\x10\x0b\x12\x0e\n\nCOLLECTION\x10\x0c\x12\x17\n\x13\x43OMMAND_AND_CONTROL\x10\x04\x12\x10\n\x0c\x45XFILTRATION\x10\r\x12\n\n\x06IMPACT\x10\x0e\"\xad \n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x44\x41TA_OBFUSCATION\x10\x46\x12\"\n\x1e\x44\x41TA_OBFUSCATION_STEGANOGRAPHY\x10G\x12\x19\n\x15OS_CREDENTIAL_DUMPING\x10r\x12)\n%OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM\x10s\x12\x35\n1OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW\x10z\x12\x1a\n\x16\x44\x41TA_FROM_LOCAL_SYSTEM\x10u\x12\x1a\n\x16\x41UTOMATED_EXFILTRATION\x10\x44\x12\x1c\n\x18OBFUSCATED_FILES_OR_INFO\x10H\x12\x11\n\rSTEGANOGRAPHY\x10I\x12\x1a\n\x16\x43OMPILE_AFTER_DELIVERY\x10J\x12\x17\n\x13\x43OMMAND_OBFUSCATION\x10K\x12\x16\n\x12SCHEDULED_TRANSFER\x10x\x12\x1f\n\x1bSYSTEM_OWNER_USER_DISCOVERY\x10v\x12\x10\n\x0cMASQUERADING\x10\x31\x12%\n!MATCH_LEGITIMATE_NAME_OR_LOCATION\x10\x32\x12(\n$BOOT_OR_LOGON_INITIALIZATION_SCRIPTS\x10%\x12\x11\n\rSTARTUP_ITEMS\x10&\x12\x1d\n\x19NETWORK_SERVICE_DISCOVERY\x10 \x12\x16\n\x12SCHEDULED_TASK_JOB\x10Y\x12\x1b\n\x17SCHEDULED_TASK_JOB_CRON\x10w\x12\x1f\n\x1b\x43ONTAINER_ORCHESTRATION_JOB\x10Z\x12\x15\n\x11PROCESS_INJECTION\x10]\x12\x11\n\rINPUT_CAPTURE\x10g\x12\x1c\n\x18INPUT_CAPTURE_KEYLOGGING\x10h\x12\x15\n\x11PROCESS_DISCOVERY\x10\x38\x12%\n!COMMAND_AND_SCRIPTING_INTERPRETER\x10\x06\x12\x0e\n\nUNIX_SHELL\x10\x07\x12\n\n\x06PYTHON\x10;\x12)\n%EXPLOITATION_FOR_PRIVILEGE_ESCALATION\x10?\x12\x1f\n\x1bPERMISSION_GROUPS_DISCOVERY\x10\x12\x12\x10\n\x0c\x43LOUD_GROUPS\x10\x13\x12\x15\n\x11INDICATOR_REMOVAL\x10{\x12\x34\n0INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS\x10|\x12+\n\'INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY\x10}\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12 \n\x1bINDICATOR_REMOVAL_TIMESTOMP\x10\x80\x01\x12(\n$INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA\x10~\x12\x1e\n\x1a\x41PPLICATION_LAYER_PROTOCOL\x10-\x12\x07\n\x03\x44NS\x10.\x12\x1d\n\x19SOFTWARE_DEPLOYMENT_TOOLS\x10/\x12\x12\n\x0eVALID_ACCOUNTS\x10\x0e\x12\x14\n\x10\x44\x45\x46\x41ULT_ACCOUNTS\x10#\x12\x12\n\x0eLOCAL_ACCOUNTS\x10\x0f\x12\x12\n\x0e\x43LOUD_ACCOUNTS\x10\x10\x12 \n\x1c\x46ILE_AND_DIRECTORY_DISCOVERY\x10y\x12#\n\x1f\x41\x43\x43OUNT_DISCOVERY_LOCAL_ACCOUNT\x10t\x12\t\n\x05PROXY\x10\t\x12\x12\n\x0e\x45XTERNAL_PROXY\x10\n\x12\x13\n\x0fMULTI_HOP_PROXY\x10\x0b\x12\x18\n\x14\x41\x43\x43OUNT_MANIPULATION\x10\x16\x12 \n\x1c\x41\x44\x44ITIONAL_CLOUD_CREDENTIALS\x10(\x12\x1a\n\x16\x41\x44\x44ITIONAL_CLOUD_ROLES\x10\x43\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x18\n\x14MULTI_STAGE_CHANNELS\x10L\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x18\n\x14\x41UTOMATED_COLLECTION\x10^\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x11\n\rDATA_ENCODING\x10M\x12\x15\n\x11STANDARD_ENCODING\x10N\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12\x12\n\x0e\x43REATE_ACCOUNT\x10O\x12\x11\n\rLOCAL_ACCOUNT\x10P\x12$\n DEOBFUSCATE_DECODE_FILES_OR_INFO\x10_\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1c\n\x17SUPPLY_CHAIN_COMPROMISE\x10\x81\x01\x12;\n6COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS\x10\x82\x01\x12&\n!EXPLOITATION_FOR_CLIENT_EXECUTION\x10\x86\x01\x12\x12\n\x0eUSER_EXECUTION\x10\x45\x12>\n9LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION\x10\x87\x01\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x1e\n\x19\x44\x41TA_ENCRYPTED_FOR_IMPACT\x10\x84\x01\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x17\n\x13\x46IRMWARE_CORRUPTION\x10Q\x12\x16\n\x12RESOURCE_HIJACKING\x10\x08\x12\x1d\n\x19NETWORK_DENIAL_OF_SERVICE\x10\x11\x12\x1b\n\x17\x43LOUD_SERVICE_DISCOVERY\x10\x30\x12\"\n\x1eSTEAL_APPLICATION_ACCESS_TOKEN\x10*\x12\x1a\n\x16\x41\x43\x43OUNT_ACCESS_REMOVAL\x10\x33\x12\"\n\x1eTRANSFER_DATA_TO_CLOUD_ACCOUNT\x10[\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12\x1d\n\x19\x45VENT_TRIGGERED_EXECUTION\x10\x41\x12%\n!BOOT_OR_LOGON_AUTOSTART_EXECUTION\x10R\x12!\n\x1dKERNEL_MODULES_AND_EXTENSIONS\x10S\x12\x19\n\x15SHORTCUT_MODIFICATION\x10\x7f\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x38\n3ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID\x10\x88\x01\x12;\n7ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING\x10m\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12\x18\n\x14\x43REDENTIALS_IN_FILES\x10i\x12\x10\n\x0c\x42\x41SH_HISTORY\x10`\x12\x10\n\x0cPRIVATE_KEYS\x10\x61\x12\x19\n\x15SUBVERT_TRUST_CONTROL\x10j\x12\x1c\n\x18INSTALL_ROOT_CERTIFICATE\x10k\x12#\n\x1f\x43OMPROMISE_HOST_SOFTWARE_BINARY\x10T\x12$\n CREDENTIALS_FROM_PASSWORD_STORES\x10\x62\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12$\n PLUGGABLE_AUTHENTICATION_MODULES\x10l\x12 \n\x1bMULTI_FACTOR_AUTHENTICATION\x10\x89\x01\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12\x16\n\x12INDICATOR_BLOCKING\x10n\x12(\n$DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM\x10o\x12\x12\n\x0eHIDE_ARTIFACTS\x10U\x12 \n\x1cHIDDEN_FILES_AND_DIRECTORIES\x10V\x12\x10\n\x0cHIDDEN_USERS\x10W\x12!\n\x1d\x45XFILTRATION_OVER_WEB_SERVICE\x10\x14\x12!\n\x1d\x45XFILTRATION_TO_CLOUD_STORAGE\x10\x15\x12\x16\n\x12\x44YNAMIC_RESOLUTION\x10\x0c\x12\x19\n\x15LATERAL_TOOL_TRANSFER\x10)\x12\x19\n\x15HIJACK_EXECUTION_FLOW\x10p\x12\x32\n.HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING\x10q\x12\'\n#MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE\x10\x1a\x12\x13\n\x0f\x43REATE_SNAPSHOT\x10\x36\x12\"\n\x1e\x43LOUD_INFRASTRUCTURE_DISCOVERY\x10\x35\x12\x18\n\x14\x44\x45VELOP_CAPABILITIES\x10\x63\x12 \n\x1c\x44\x45VELOP_CAPABILITIES_MALWARE\x10\x64\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x1f\n\x1bOBTAIN_CAPABILITIES_MALWARE\x10\x65\x12(\n#OBTAIN_CAPABILITIES_VULNERABILITIES\x10\x85\x01\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12\x16\n\x12STAGE_CAPABILITIES\x10X\x12\x12\n\x0eUPLOAD_MALWARE\x10\x66\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x14\n\x10\x44\x45PLOY_CONTAINER\x10\x42\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12\x1b\n\x17REFLECTIVE_CODE_LOADING\x10\\\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>\x12\x14\n\x0f\x46INANCIAL_THEFT\x10\x83\x01\x42\xea\x01\n\"com.google.cloud.securitycenter.v2B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb new file mode 100644 index 000000000000..6dc75ffe8446 --- /dev/null +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/network.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/securitycenter/v2/network.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x17\n\x07Network\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cNetworkProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module SecurityCenter + module V2 + Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Network").msgclass + end + end + end +end diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb index 1e9e214cf9b1..eeeefd12734a 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb @@ -6,9 +6,10 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' -descriptor_data = "\n8google/cloud/securitycenter/v2/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x89\x05\n\x12NotificationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x36\n\x0cpubsub_topic\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x10streaming_config\x18\x05 \x01(\x0b\x32\x42.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfigH\x00\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xe0\x02\xea\x41\xdc\x02\n0securitycenter.googleapis.com/NotificationConfig\x12[organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}\x12Ofolders/{folder}/locations/{location}/notificationConfigs/{notification_config}\x12Qprojects/{project}/locations/{location}/notificationConfigs/{notification_config}*\x13notificationConfigs2\x12notificationConfigB\x0f\n\rnotify_configB\xb4\x02\n\"com.google.cloud.securitycenter.v2B\x17NotificationConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" +descriptor_data = "\n8google/cloud/securitycenter/v2/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x05\n\x12NotificationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x36\n\x0cpubsub_topic\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x10streaming_config\x18\x05 \x01(\x0b\x32\x42.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfigH\x00\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xe0\x02\xea\x41\xdc\x02\n0securitycenter.googleapis.com/NotificationConfig\x12[organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}\x12Ofolders/{folder}/locations/{location}/notificationConfigs/{notification_config}\x12Qprojects/{project}/locations/{location}/notificationConfigs/{notification_config}*\x13notificationConfigs2\x12notificationConfigB\x0f\n\rnotify_configB\xb4\x02\n\"com.google.cloud.securitycenter.v2B\x17NotificationConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -23,6 +24,7 @@ file = pool.add_serialized_file(serialized) warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb index b9ae26330d07..5ad65fe8edb9 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb @@ -7,7 +7,7 @@ require 'google/cloud/securitycenter/v2/file_pb' -descriptor_data = "\n,google/cloud/securitycenter/v2/process.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a)google/cloud/securitycenter/v2/file.proto\"\xf5\x02\n\x07Process\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x62inary\x18\x02 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x37\n\tlibraries\x18\x03 \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x34\n\x06script\x18\x04 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x0c\n\x04\x61rgs\x18\x05 \x03(\t\x12\x1b\n\x13\x61rguments_truncated\x18\x06 \x01(\x08\x12J\n\renv_variables\x18\x07 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.EnvironmentVariable\x12\x1f\n\x17\x65nv_variables_truncated\x18\x08 \x01(\x08\x12\x0b\n\x03pid\x18\t \x01(\x03\x12\x12\n\nparent_pid\x18\n \x01(\x03\"0\n\x13\x45nvironmentVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03val\x18\x02 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cProcessProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" +descriptor_data = "\n,google/cloud/securitycenter/v2/process.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a)google/cloud/securitycenter/v2/file.proto\"\x86\x03\n\x07Process\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x62inary\x18\x02 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x37\n\tlibraries\x18\x03 \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x34\n\x06script\x18\x04 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x0c\n\x04\x61rgs\x18\x05 \x03(\t\x12\x1b\n\x13\x61rguments_truncated\x18\x06 \x01(\x08\x12J\n\renv_variables\x18\x07 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.EnvironmentVariable\x12\x1f\n\x17\x65nv_variables_truncated\x18\x08 \x01(\x08\x12\x0b\n\x03pid\x18\t \x01(\x03\x12\x12\n\nparent_pid\x18\n \x01(\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\"0\n\x13\x45nvironmentVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03val\x18\x02 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cProcessProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb index 94bd807c7102..fdf6c450f530 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb @@ -5,10 +5,11 @@ require 'google/protobuf' require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' require 'google/cloud/securitycenter/v2/folder_pb' -descriptor_data = "\n-google/cloud/securitycenter/v2/resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a+google/cloud/securitycenter/v2/folder.proto\"\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\xbd\x01\n\x0bGcpMetadata\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x1c\n\x14project_display_name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x04 \x01(\t\x12<\n\x07\x66olders\x18\x05 \x03(\x0b\x32&.google.cloud.securitycenter.v2.FolderB\x03\xe0\x41\x03\x12\x14\n\x0corganization\x18\x06 \x01(\t\"\x84\x03\n\x0b\x41wsMetadata\x12Q\n\x0corganization\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization\x12_\n\x14organizational_units\x18\x02 \x03(\x0b\x32\x41.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit\x12G\n\x07\x61\x63\x63ount\x18\x03 \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount\x1a\x1d\n\x0f\x41wsOrganization\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x31\n\x15\x41wsOrganizationalUnit\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a&\n\nAwsAccount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xbc\x04\n\rAzureMetadata\x12]\n\x11management_groups\x18\x01 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup\x12U\n\x0csubscription\x18\x02 \x01(\x0b\x32?.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription\x12X\n\x0eresource_group\x18\x03 \x01(\x0b\x32@.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup\x12I\n\x06tenant\x18\x07 \x01(\x0b\x32\x39.google.cloud.securitycenter.v2.AzureMetadata.AzureTenant\x1a\x38\n\x14\x41zureManagementGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a\x35\n\x11\x41zureSubscription\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a.\n\x12\x41zureResourceGroup\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a/\n\x0b\x41zureTenant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xf4\x03\n\x0cResourcePath\x12L\n\x05nodes\x18\x01 \x03(\x0b\x32=.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode\x1a\x8a\x01\n\x10ResourcePathNode\x12T\n\tnode_type\x18\x01 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType\x12\n\n\x02id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\"\x88\x02\n\x14ResourcePathNodeType\x12\'\n#RESOURCE_PATH_NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_ORGANIZATION\x10\x01\x12\x0e\n\nGCP_FOLDER\x10\x02\x12\x0f\n\x0bGCP_PROJECT\x10\x03\x12\x14\n\x10\x41WS_ORGANIZATION\x10\x04\x12\x1b\n\x17\x41WS_ORGANIZATIONAL_UNIT\x10\x05\x12\x0f\n\x0b\x41WS_ACCOUNT\x10\x06\x12\x1a\n\x16\x41ZURE_MANAGEMENT_GROUP\x10\x07\x12\x16\n\x12\x41ZURE_SUBSCRIPTION\x10\x08\x12\x18\n\x14\x41ZURE_RESOURCE_GROUP\x10\t*x\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x19\n\x15GOOGLE_CLOUD_PLATFORM\x10\x01\x12\x17\n\x13\x41MAZON_WEB_SERVICES\x10\x02\x12\x13\n\x0fMICROSOFT_AZURE\x10\x03\x42\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" +descriptor_data = "\n-google/cloud/securitycenter/v2/resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/folder.proto\"\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\xbd\x01\n\x0bGcpMetadata\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x1c\n\x14project_display_name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x04 \x01(\t\x12<\n\x07\x66olders\x18\x05 \x03(\x0b\x32&.google.cloud.securitycenter.v2.FolderB\x03\xe0\x41\x03\x12\x14\n\x0corganization\x18\x06 \x01(\t\"\x84\x03\n\x0b\x41wsMetadata\x12Q\n\x0corganization\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization\x12_\n\x14organizational_units\x18\x02 \x03(\x0b\x32\x41.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit\x12G\n\x07\x61\x63\x63ount\x18\x03 \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount\x1a\x1d\n\x0f\x41wsOrganization\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x31\n\x15\x41wsOrganizationalUnit\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a&\n\nAwsAccount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xbc\x04\n\rAzureMetadata\x12]\n\x11management_groups\x18\x01 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup\x12U\n\x0csubscription\x18\x02 \x01(\x0b\x32?.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription\x12X\n\x0eresource_group\x18\x03 \x01(\x0b\x32@.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup\x12I\n\x06tenant\x18\x07 \x01(\x0b\x32\x39.google.cloud.securitycenter.v2.AzureMetadata.AzureTenant\x1a\x38\n\x14\x41zureManagementGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a\x35\n\x11\x41zureSubscription\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a.\n\x12\x41zureResourceGroup\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a/\n\x0b\x41zureTenant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xf4\x03\n\x0cResourcePath\x12L\n\x05nodes\x18\x01 \x03(\x0b\x32=.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode\x1a\x8a\x01\n\x10ResourcePathNode\x12T\n\tnode_type\x18\x01 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType\x12\n\n\x02id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\"\x88\x02\n\x14ResourcePathNodeType\x12\'\n#RESOURCE_PATH_NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_ORGANIZATION\x10\x01\x12\x0e\n\nGCP_FOLDER\x10\x02\x12\x0f\n\x0bGCP_PROJECT\x10\x03\x12\x14\n\x10\x41WS_ORGANIZATION\x10\x04\x12\x1b\n\x17\x41WS_ORGANIZATIONAL_UNIT\x10\x05\x12\x0f\n\x0b\x41WS_ACCOUNT\x10\x06\x12\x1a\n\x16\x41ZURE_MANAGEMENT_GROUP\x10\x07\x12\x16\n\x12\x41ZURE_SUBSCRIPTION\x10\x08\x12\x18\n\x14\x41ZURE_RESOURCE_GROUP\x10\t*x\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x19\n\x15GOOGLE_CLOUD_PLATFORM\x10\x01\x12\x17\n\x13\x41MAZON_WEB_SERVICES\x10\x02\x12\x13\n\x0fMICROSOFT_AZURE\x10\x03\x42\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb index 0ed81bf0a3b0..febc8dc664f8 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb @@ -27,9 +27,10 @@ require 'google/protobuf/empty_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' -descriptor_data = "\n;google/cloud/securitycenter/v2/securitycenter_service.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x30google/cloud/securitycenter/v2/attack_path.proto\x1a\x34google/cloud/securitycenter/v2/bigquery_export.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a,google/cloud/securitycenter/v2/finding.proto\x1a\x30google/cloud/securitycenter/v2/mute_config.proto\x1a\x38google/cloud/securitycenter/v2/notification_config.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a:google/cloud/securitycenter/v2/resource_value_config.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a/google/cloud/securitycenter/v2/simulation.proto\x1a+google/cloud/securitycenter/v2/source.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xcc\x01\n&BatchCreateResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x08requests\x18\x02 \x03(\x0b\x32@.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestB\x03\xe0\x41\x02\"~\n\'BatchCreateResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xe3\x01\n\x17\x42ulkMuteFindingsRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12Z\n\nmute_state\x18\x03 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteStateB\x03\xe0\x41\x01\"A\n\tMuteState\x12\x1a\n\x16MUTE_STATE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\r\n\tUNDEFINED\x10\x02\"\x1a\n\x18\x42ulkMuteFindingsResponse\"\xd4\x01\n\x1b\x43reateBigQueryExportRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12M\n\x10\x62ig_query_export\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xac\x01\n\x14\x43reateFindingRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x17\n\nfinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x07\x66inding\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\"\xbe\x01\n\x17\x43reateMuteConfigRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x44\n\x0bmute_config\x18\x02 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12\x1b\n\x0emute_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd9\x01\n\x1f\x43reateNotificationConfigRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13notification_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\"\xc6\x01\n CreateResourceValueConfigRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x15resource_value_config\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\"\x9c\x01\n\x13\x43reateSourceRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12;\n\x06source\x18\x02 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"Y\n\x17\x44\x65leteMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"k\n DeleteResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"^\n\x18GetBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"V\n\x14GetMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"h\n\x1dGetResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\xa2\x01\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\x8b\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v2.GroupResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xb8\x01\n\x0bGroupResult\x12O\n\nproperties\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v2.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\x91\x01\n\x16ListAttackPathsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/AttackPath\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"t\n\x17ListAttackPathsResponse\x12@\n\x0c\x61ttack_paths\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v2.AttackPath\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetSimulationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/Simulation\"^\n\x18GetValuedResourceRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/ValuedResource\"\x89\x01\n\x1aListBigQueryExportsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListBigQueryExportsResponse\x12I\n\x11\x62ig_query_exports\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xdf\x06\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xb1\x05\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Finding\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\x81\x01\n\x16ListMuteConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListMuteConfigsResponse\x12@\n\x0cmute_configs\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8c\x01\n\x1fListNotificationConfigsResponse\x12P\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n\x1fListResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x90\x01\n ListResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"g\n\x13ListSourcesResponse\x12\x37\n\x07sources\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb0\x01\n\x1aListValuedResourcesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/ValuedResource\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x1bListValuedResourcesResponse\x12H\n\x10valued_resources\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x98\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x02\"\x8e\x01\n\x0eSetMuteRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12?\n\x04mute\x18\x02 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.MuteB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.ExternalSystemB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x86\x01\n\x14UpdateFindingRequest\x12=\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x90\x01\n\x17UpdateMuteConfigRequest\x12\x44\n\x0bmute_config\x18\x01 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa8\x01\n\x1fUpdateNotificationConfigRequest\x12T\n\x13notification_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xac\x01\n UpdateResourceValueConfigRequest\x12W\n\x15resource_value_config\x18\x01 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x99\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x83\x01\n\x13UpdateSourceRequest\x12;\n\x06source\x18\x01 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\xe2\x81\x01\n\x0eSecurityCenter\x12\xe0\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse\"\xab\x01\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x92\x01\"=/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*ZN\"I/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate:\x01*\x12\x9a\x04\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v2.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xad\x03\xca\x41P\n7google.cloud.securitycenter.v2.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xca\x02\"./v2/{parent=organizations/*}/findings:bulkMute:\x01*Z?\":/v2/{parent=organizations/*/locations/*}/findings:bulkMute:\x01*Z-\"(/v2/{parent=folders/*}/findings:bulkMute:\x01*Z9\"4/v2/{parent=folders/*/locations/*}/findings:bulkMute:\x01*Z.\")/v2/{parent=projects/*}/findings:bulkMute:\x01*Z:\"5/v2/{parent=projects/*/locations/*}/findings:bulkMute:\x01*\x12\x98\x03\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v2.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\x92\x02\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xdd\x01\"8/v2/{parent=organizations/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZF\"2/v2/{parent=folders/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZG\"3/v2/{parent=projects/*/locations/*}/bigQueryExports:\x10\x62ig_query_export\x12\x96\x02\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v2.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xa5\x01\xda\x41\x19parent,finding,finding_id\x82\xd3\xe4\x93\x02\x82\x01\";/v2/{parent=organizations/*/sources/*/locations/*}/findings:\x07\x66indingZ:\"//v2/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x99\x05\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v2.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\x9f\x04\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"4/v2/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ=\"./v2/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ>\"//v2/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_configZ7\"(/v2/{parent=organizations/*}/muteConfigs:\x0bmute_configZ1\"\"/v2/{parent=folders/*}/muteConfigs:\x0bmute_configZ2\"#/v2/{parent=projects/*}/muteConfigs:\x0bmute_config\x8a\xd3\xe4\x93\x02\x8b\x01\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x30\n\x06parent\x12&organizations/*/locations/{location=*}\x12*\n\x06parent\x12 folders/*/locations/{location=*}\x12\xb2\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v2.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xa0\x02\xda\x41$parent,notification_config,config_id\x82\xd3\xe4\x93\x02\xf2\x01\".google.cloud.securitycenter.v2.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v2.ListNotificationConfigsResponse\"\xc3\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb3\x01\x12/v2/{name=folders/*/sources/*/locations/*/findings/*}:setState:\x01*Z8\"3/v2/{name=projects/*/sources/*/findings/*}:setState:\x01*ZD\"?/v2/{name=projects/*/sources/*/locations/*/findings/*}:setState:\x01*\x12\x9d\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02:\"5/v2/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xf8\x03\n\x07SetMute\x12..google.cloud.securitycenter.v2.SetMuteRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\x93\x03\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\x80\x03\"7/v2/{name=organizations/*/sources/*/findings/*}:setMute:\x01*ZH\"C/v2/{name=organizations/*/sources/*/locations/*/findings/*}:setMute:\x01*Z6\"1/v2/{name=folders/*/sources/*/findings/*}:setMute:\x01*ZB\"=/v2/{name=folders/*/sources/*/locations/*/findings/*}:setMute:\x01*Z7\"2/v2/{name=projects/*/sources/*/findings/*}:setMute:\x01*ZC\">/v2/{name=projects/*/sources/*/locations/*/findings/*}:setMute:\x01*\x12\xc8\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02@\";/v2/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\xbc\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\xb6\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\x90\x02\x32I/v2/{big_query_export.name=organizations/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZW2C/v2/{big_query_export.name=folders/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZX2D/v2/{big_query_export.name=projects/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\x9b\x06\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v2.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v2.ExternalSystem\"\x95\x05\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xf0\x04\x32Q/v2/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZp2]/v2/{external_system.name=organizations/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v2/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZj2W/v2/{external_system.name=folders/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v2/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZk2X/v2/{external_system.name=projects/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xb2\x04\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v2.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xc1\x03\xda\x41\x13\x66inding,update_mask\x82\xd3\xe4\x93\x02\xa4\x03\x32\x37/v2/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZN2C/v2/{finding.name=organizations/*/sources/*/locations/*/findings/*}:\x07\x66indingZ<21/v2/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZH2=/v2/{finding.name=folders/*/sources/*/locations/*/findings/*}:\x07\x66indingZ=22/v2/{finding.name=projects/*/sources/*/findings/*}:\x07\x66indingZI2>/v2/{finding.name=projects/*/sources/*/locations/*/findings/*}:\x07\x66inding\x12\x9f\x06\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v2.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\xa5\x05\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v2/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZO2@/v2/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZ=2./v2/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZI2:/v2/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZ>2//v2/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZJ2;/v2/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x8a\xd3\xe4\x93\x02\xd3\x01\x12\x43\n\x10mute_config.name\x12/projects/*/locations/{location=*}/muteConfigs/*\x12H\n\x10mute_config.name\x12\x34organizations/*/locations/{location=*}/muteConfigs/*\x12\x42\n\x10mute_config.name\x12.folders/*/locations/{location=*}/muteConfigs/*\x12\xe9\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xd7\x02\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\xae\x02\x32P/v2/{notification_config.name=organizations/*/locations/*/notificationConfigs/*}:\x13notification_configZa2J/v2/{notification_config.name=folders/*/locations/*/notificationConfigs/*}:\x13notification_configZb2K/v2/{notification_config.name=projects/*/locations/*/notificationConfigs/*}:\x13notification_config\x12\x8e\x03\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xf9\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02\xce\x01\x32G/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_configZl2S/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xe4\x07\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v2.SecurityMarks\"\xe1\x06\xda\x41\x1asecurity_marks,update_mask\x82\xd3\xe4\x93\x02\xbd\x06\x32L/v2/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZR2@/v2/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZj2X/v2/{security_marks.name=organizations/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v2/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZL2:/v2/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZd2R/v2/{security_marks.name=folders/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v2/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZM2;/v2/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZe2S/v2/{security_marks.name=projects/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xbd\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v2.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v2.Source\"P\xda\x41\x12source,update_mask\x82\xd3\xe4\x93\x02\x35\x32+/v2/{source.name=organizations/*/sources/*}:\x06source\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe2\x04\n\"com.google.cloud.securitycenter.v2B\x1aSecuritycenterServiceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41\xa8\x01\n8securitycenter.googleapis.com/OrganizationValuedResource\x12lorganizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}b\x06proto3" +descriptor_data = "\n;google/cloud/securitycenter/v2/securitycenter_service.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x30google/cloud/securitycenter/v2/attack_path.proto\x1a\x34google/cloud/securitycenter/v2/bigquery_export.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a,google/cloud/securitycenter/v2/finding.proto\x1a\x30google/cloud/securitycenter/v2/mute_config.proto\x1a\x38google/cloud/securitycenter/v2/notification_config.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a:google/cloud/securitycenter/v2/resource_value_config.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a/google/cloud/securitycenter/v2/simulation.proto\x1a+google/cloud/securitycenter/v2/source.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n&BatchCreateResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x08requests\x18\x02 \x03(\x0b\x32@.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestB\x03\xe0\x41\x02\"~\n\'BatchCreateResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xe3\x01\n\x17\x42ulkMuteFindingsRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12Z\n\nmute_state\x18\x03 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteStateB\x03\xe0\x41\x01\"A\n\tMuteState\x12\x1a\n\x16MUTE_STATE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\r\n\tUNDEFINED\x10\x02\"\x1a\n\x18\x42ulkMuteFindingsResponse\"\xd4\x01\n\x1b\x43reateBigQueryExportRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12M\n\x10\x62ig_query_export\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xac\x01\n\x14\x43reateFindingRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x17\n\nfinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x07\x66inding\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\"\xbe\x01\n\x17\x43reateMuteConfigRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x44\n\x0bmute_config\x18\x02 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12\x1b\n\x0emute_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd9\x01\n\x1f\x43reateNotificationConfigRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13notification_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\"\xc6\x01\n CreateResourceValueConfigRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x15resource_value_config\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\"\x9c\x01\n\x13\x43reateSourceRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12;\n\x06source\x18\x02 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"Y\n\x17\x44\x65leteMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"k\n DeleteResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"+\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x16\x45xportFindingsMetadata\x12:\n\x11\x65xport_start_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12Y\n\x15\x62ig_query_destination\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.BigQueryDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x18\n\x16\x45xportFindingsResponse\"^\n\x18GetBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"V\n\x14GetMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"h\n\x1dGetResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\xa2\x01\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\x8b\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v2.GroupResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xb8\x01\n\x0bGroupResult\x12O\n\nproperties\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v2.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\x91\x01\n\x16ListAttackPathsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/AttackPath\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"t\n\x17ListAttackPathsResponse\x12@\n\x0c\x61ttack_paths\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v2.AttackPath\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetSimulationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/Simulation\"^\n\x18GetValuedResourceRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/ValuedResource\"\x89\x01\n\x1aListBigQueryExportsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListBigQueryExportsResponse\x12I\n\x11\x62ig_query_exports\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xdf\x06\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xb1\x05\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Finding\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\x81\x01\n\x16ListMuteConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListMuteConfigsResponse\x12@\n\x0cmute_configs\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8c\x01\n\x1fListNotificationConfigsResponse\x12P\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n\x1fListResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x90\x01\n ListResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"g\n\x13ListSourcesResponse\x12\x37\n\x07sources\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb0\x01\n\x1aListValuedResourcesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/ValuedResource\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x1bListValuedResourcesResponse\x12H\n\x10valued_resources\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x98\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x02\"\x8e\x01\n\x0eSetMuteRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12?\n\x04mute\x18\x02 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.MuteB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.ExternalSystemB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x86\x01\n\x14UpdateFindingRequest\x12=\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x90\x01\n\x17UpdateMuteConfigRequest\x12\x44\n\x0bmute_config\x18\x01 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa8\x01\n\x1fUpdateNotificationConfigRequest\x12T\n\x13notification_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xac\x01\n UpdateResourceValueConfigRequest\x12W\n\x15resource_value_config\x18\x01 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x99\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x83\x01\n\x13UpdateSourceRequest\x12;\n\x06source\x18\x01 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\xe2\x81\x01\n\x0eSecurityCenter\x12\xe0\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse\"\xab\x01\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x92\x01\"=/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*ZN\"I/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate:\x01*\x12\x9a\x04\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v2.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xad\x03\xca\x41P\n7google.cloud.securitycenter.v2.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xca\x02\"./v2/{parent=organizations/*}/findings:bulkMute:\x01*Z?\":/v2/{parent=organizations/*/locations/*}/findings:bulkMute:\x01*Z-\"(/v2/{parent=folders/*}/findings:bulkMute:\x01*Z9\"4/v2/{parent=folders/*/locations/*}/findings:bulkMute:\x01*Z.\")/v2/{parent=projects/*}/findings:bulkMute:\x01*Z:\"5/v2/{parent=projects/*/locations/*}/findings:bulkMute:\x01*\x12\x98\x03\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v2.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\x92\x02\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xdd\x01\"8/v2/{parent=organizations/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZF\"2/v2/{parent=folders/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZG\"3/v2/{parent=projects/*/locations/*}/bigQueryExports:\x10\x62ig_query_export\x12\x96\x02\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v2.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xa5\x01\xda\x41\x19parent,finding,finding_id\x82\xd3\xe4\x93\x02\x82\x01\";/v2/{parent=organizations/*/sources/*/locations/*}/findings:\x07\x66indingZ:\"//v2/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x99\x05\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v2.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\x9f\x04\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"4/v2/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ=\"./v2/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ>\"//v2/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_configZ7\"(/v2/{parent=organizations/*}/muteConfigs:\x0bmute_configZ1\"\"/v2/{parent=folders/*}/muteConfigs:\x0bmute_configZ2\"#/v2/{parent=projects/*}/muteConfigs:\x0bmute_config\x8a\xd3\xe4\x93\x02\x8b\x01\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x30\n\x06parent\x12&organizations/*/locations/{location=*}\x12*\n\x06parent\x12 folders/*/locations/{location=*}\x12\xb2\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v2.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xa0\x02\xda\x41$parent,notification_config,config_id\x82\xd3\xe4\x93\x02\xf2\x01\".google.cloud.securitycenter.v2.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v2.ListNotificationConfigsResponse\"\xc3\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb3\x01\x12/v2/{name=folders/*/sources/*/locations/*/findings/*}:setState:\x01*Z8\"3/v2/{name=projects/*/sources/*/findings/*}:setState:\x01*ZD\"?/v2/{name=projects/*/sources/*/locations/*/findings/*}:setState:\x01*\x12\x9d\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02:\"5/v2/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xf8\x03\n\x07SetMute\x12..google.cloud.securitycenter.v2.SetMuteRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\x93\x03\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\x80\x03\"7/v2/{name=organizations/*/sources/*/findings/*}:setMute:\x01*ZH\"C/v2/{name=organizations/*/sources/*/locations/*/findings/*}:setMute:\x01*Z6\"1/v2/{name=folders/*/sources/*/findings/*}:setMute:\x01*ZB\"=/v2/{name=folders/*/sources/*/locations/*/findings/*}:setMute:\x01*Z7\"2/v2/{name=projects/*/sources/*/findings/*}:setMute:\x01*ZC\">/v2/{name=projects/*/sources/*/locations/*/findings/*}:setMute:\x01*\x12\xc8\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02@\";/v2/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\xbc\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\xb6\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\x90\x02\x32I/v2/{big_query_export.name=organizations/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZW2C/v2/{big_query_export.name=folders/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZX2D/v2/{big_query_export.name=projects/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\x9b\x06\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v2.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v2.ExternalSystem\"\x95\x05\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xf0\x04\x32Q/v2/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZp2]/v2/{external_system.name=organizations/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v2/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZj2W/v2/{external_system.name=folders/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v2/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZk2X/v2/{external_system.name=projects/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xb2\x04\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v2.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xc1\x03\xda\x41\x13\x66inding,update_mask\x82\xd3\xe4\x93\x02\xa4\x03\x32\x37/v2/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZN2C/v2/{finding.name=organizations/*/sources/*/locations/*/findings/*}:\x07\x66indingZ<21/v2/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZH2=/v2/{finding.name=folders/*/sources/*/locations/*/findings/*}:\x07\x66indingZ=22/v2/{finding.name=projects/*/sources/*/findings/*}:\x07\x66indingZI2>/v2/{finding.name=projects/*/sources/*/locations/*/findings/*}:\x07\x66inding\x12\x9f\x06\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v2.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\xa5\x05\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v2/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZO2@/v2/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZ=2./v2/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZI2:/v2/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZ>2//v2/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZJ2;/v2/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x8a\xd3\xe4\x93\x02\xd3\x01\x12\x43\n\x10mute_config.name\x12/projects/*/locations/{location=*}/muteConfigs/*\x12H\n\x10mute_config.name\x12\x34organizations/*/locations/{location=*}/muteConfigs/*\x12\x42\n\x10mute_config.name\x12.folders/*/locations/{location=*}/muteConfigs/*\x12\xe9\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xd7\x02\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\xae\x02\x32P/v2/{notification_config.name=organizations/*/locations/*/notificationConfigs/*}:\x13notification_configZa2J/v2/{notification_config.name=folders/*/locations/*/notificationConfigs/*}:\x13notification_configZb2K/v2/{notification_config.name=projects/*/locations/*/notificationConfigs/*}:\x13notification_config\x12\x8e\x03\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xf9\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02\xce\x01\x32G/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_configZl2S/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xe4\x07\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v2.SecurityMarks\"\xe1\x06\xda\x41\x1asecurity_marks,update_mask\x82\xd3\xe4\x93\x02\xbd\x06\x32L/v2/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZR2@/v2/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZj2X/v2/{security_marks.name=organizations/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v2/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZL2:/v2/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZd2R/v2/{security_marks.name=folders/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v2/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZM2;/v2/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZe2S/v2/{security_marks.name=projects/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xbd\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v2.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v2.Source\"P\xda\x41\x12source,update_mask\x82\xd3\xe4\x93\x02\x35\x32+/v2/{source.name=organizations/*/sources/*}:\x06source\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe2\x04\n\"com.google.cloud.securitycenter.v2B\x1aSecuritycenterServiceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41\xa8\x01\n8securitycenter.googleapis.com/OrganizationValuedResource\x12lorganizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -50,6 +51,7 @@ ["google.cloud.securitycenter.v2.MuteConfig", "google/cloud/securitycenter/v2/mute_config.proto"], ["google.cloud.securitycenter.v2.NotificationConfig", "google/cloud/securitycenter/v2/notification_config.proto"], ["google.cloud.securitycenter.v2.Source", "google/cloud/securitycenter/v2/source.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.protobuf.Value", "google/protobuf/struct.proto"], ["google.cloud.securitycenter.v2.AttackPath", "google/cloud/securitycenter/v2/attack_path.proto"], ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], @@ -87,6 +89,9 @@ module V2 DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteMuteConfigRequest").msgclass DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteNotificationConfigRequest").msgclass DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest").msgclass + BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryDestination").msgclass + ExportFindingsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsMetadata").msgclass + ExportFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsResponse").msgclass GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetBigQueryExportRequest").msgclass GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetMuteConfigRequest").msgclass GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetNotificationConfigRequest").msgclass diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb new file mode 100644 index 000000000000..d4e24316ef03 --- /dev/null +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/vertex_ai.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/vertex_ai.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x02\n\x08VertexAi\x12\x42\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.VertexAi.Dataset\x12\x44\n\tpipelines\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.VertexAi.Pipeline\x1a=\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\x1a.\n\x08Pipeline\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rVertexAiProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module SecurityCenter + module V2 + VertexAi = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi").msgclass + VertexAi::Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Dataset").msgclass + VertexAi::Pipeline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Pipeline").msgclass + end + end + end +end diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb index 9c3730c66ec7..7652ad83a7d7 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb @@ -7,7 +7,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n2google/cloud/securitycenter/v2/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v2.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.SecurityBulletin\"\xc7\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v2.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v2.Cve.ExploitationActivity\x12\x1c\n\x14observed_in_the_wild\x18\x07 \x01(\x08\x12\x10\n\x08zero_day\x18\x08 \x01(\x08\x12\x38\n\x14\x65xploit_release_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x17\x66irst_exploitation_date\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nRiskRating\x12\x1b\n\x17RISK_RATING_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"\x84\x01\n\x14\x45xploitationActivity\x12%\n!EXPLOITATION_ACTIVITY_UNSPECIFIED\x10\x00\x12\x08\n\x04WIDE\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\x0f\n\x0b\x41NTICIPATED\x10\x04\x12\x0c\n\x08NO_KNOWN\x10\x05\"(\n\tReference\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xb1\n\n\x06\x43vssv3\x12\x12\n\nbase_score\x18\x01 \x01(\x01\x12J\n\rattack_vector\x18\x02 \x01(\x0e\x32\x33.google.cloud.securitycenter.v2.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x04 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x05 \x01(\x0e\x32\x36.google.cloud.securitycenter.v2.Cvssv3.UserInteraction\x12;\n\x05scope\x18\x06 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\x07 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x08 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"_\n\x07Package\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x17\n\x0fpackage_version\x18\x04 \x01(\t\"\x7f\n\x10SecurityBulletin\x12\x13\n\x0b\x62ulletin_id\x18\x01 \x01(\t\x12\x33\n\x0fsubmission_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19suggested_upgrade_version\x18\x03 \x01(\tB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" +descriptor_data = "\n2google/cloud/securitycenter/v2/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf5\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v2.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.SecurityBulletin\x12\x1b\n\x13provider_risk_score\x18\x05 \x01(\x03\x12\x11\n\treachable\x18\x06 \x01(\x08\x12\x31\n\x04\x63wes\x18\x07 \x03(\x0b\x32#.google.cloud.securitycenter.v2.Cwe\"\xc7\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v2.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v2.Cve.ExploitationActivity\x12\x1c\n\x14observed_in_the_wild\x18\x07 \x01(\x08\x12\x10\n\x08zero_day\x18\x08 \x01(\x08\x12\x38\n\x14\x65xploit_release_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x17\x66irst_exploitation_date\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nRiskRating\x12\x1b\n\x17RISK_RATING_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"\x84\x01\n\x14\x45xploitationActivity\x12%\n!EXPLOITATION_ACTIVITY_UNSPECIFIED\x10\x00\x12\x08\n\x04WIDE\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\x0f\n\x0b\x41NTICIPATED\x10\x04\x12\x0c\n\x08NO_KNOWN\x10\x05\"(\n\tReference\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xb1\n\n\x06\x43vssv3\x12\x12\n\nbase_score\x18\x01 \x01(\x01\x12J\n\rattack_vector\x18\x02 \x01(\x0e\x32\x33.google.cloud.securitycenter.v2.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x04 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x05 \x01(\x0e\x32\x36.google.cloud.securitycenter.v2.Cvssv3.UserInteraction\x12;\n\x05scope\x18\x06 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\x07 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x08 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"_\n\x07Package\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x17\n\x0fpackage_version\x18\x04 \x01(\t\"\x7f\n\x10SecurityBulletin\x12\x13\n\x0b\x62ulletin_id\x18\x01 \x01(\t\x12\x33\n\x0fsubmission_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19suggested_upgrade_version\x18\x03 \x01(\t\"P\n\x03\x43we\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.ReferenceB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -52,6 +52,7 @@ module V2 Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Impact").enummodule Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Package").msgclass SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityBulletin").msgclass + Cwe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cwe").msgclass end end end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb new file mode 100644 index 000000000000..6beceac83a6a --- /dev/null +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SecurityCenter + module V2 + # Details about resources affected by this finding. + # @!attribute [rw] count + # @return [::Integer] + # The count of resources affected by the finding. + class AffectedResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb new file mode 100644 index 000000000000..898de40e9731 --- /dev/null +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SecurityCenter + module V2 + # Contains information about the AI model associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the AI model, for example, "gemini:1.0.0". + # @!attribute [rw] domain + # @return [::String] + # The domain of the model, for example, “image-classification”. + # @!attribute [rw] library + # @return [::String] + # The name of the model library, for example, “transformers”. + # @!attribute [rw] location + # @return [::String] + # The region in which the model is used, for example, “us-central1”. + # @!attribute [rw] publisher + # @return [::String] + # The publisher of the model, for example, “google” or “nvidia”. + # @!attribute [rw] deployment_platform + # @return [::Google::Cloud::SecurityCenter::V2::AiModel::DeploymentPlatform] + # The platform on which the model is deployed. + # @!attribute [rw] display_name + # @return [::String] + # The user defined display name of model. Ex. baseline-classification-model + class AiModel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The platform on which the model is deployed. + module DeploymentPlatform + # Unspecified deployment platform. + DEPLOYMENT_PLATFORM_UNSPECIFIED = 0 + + # Vertex AI. + VERTEX_AI = 1 + + # Google Kubernetes Engine. + GKE = 2 + end + end + end + end + end +end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb new file mode 100644 index 000000000000..7742dde50d4e --- /dev/null +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SecurityCenter + module V2 + # Contains details about a chokepoint, which is a resource or resource group + # where high-risk attack paths converge, based on [attack path simulations] + # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). + # @!attribute [rw] related_findings + # @return [::Array<::String>] + # List of resource names of findings associated with this chokepoint. + # For example, organizations/123/sources/456/findings/789. + # This list will have at most 100 findings. + class Chokepoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb index b43c298d8151..47eace959645 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb @@ -25,7 +25,7 @@ module V2 # @!attribute [rw] name # @return [::String] # The name of the disk, for example, - # `https://www.googleapis.com/compute/v1/projects/{project-id}/zones/{zone-id}/disks/{disk-id}`. + # "https://www.googleapis.com/compute/v1/projects/\\{project-id}/zones/\\{zone-id}/disks/\\{disk-id}". class Disk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb index a0f9e041ce7c..95e09df36778 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb @@ -48,6 +48,9 @@ module V2 # @!attribute [rw] disk_path # @return [::Google::Cloud::SecurityCenter::V2::File::DiskPath] # Path of the file in terms of underlying disk/partition identifiers. + # @!attribute [rw] operations + # @return [::Array<::Google::Cloud::SecurityCenter::V2::File::FileOperation>] + # Operation(s) performed on a file. class File include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -65,6 +68,36 @@ class DiskPath include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Operation(s) performed on a file. + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V2::File::FileOperation::OperationType] + # The type of the operation + class FileOperation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the operation + module OperationType + # The operation is unspecified. + OPERATION_TYPE_UNSPECIFIED = 0 + + # Represents an open operation. + OPEN = 1 + + # Represents a read operation. + READ = 2 + + # Represents a rename operation. + RENAME = 3 + + # Represents a write operation. + WRITE = 4 + + # Represents an execute operation. + EXECUTE = 5 + end + end end end end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb index 609b9c3f97be..6aa3e15d8e7b 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb @@ -30,7 +30,7 @@ module V2 # finding. # @!attribute [rw] name # @return [::String] - # The [relative resource + # Identifier. The [relative resource # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) # of the finding. The following list shows some examples: # @@ -247,9 +247,15 @@ module V2 # @!attribute [rw] org_policies # @return [::Array<::Google::Cloud::SecurityCenter::V2::OrgPolicy>] # Contains information about the org policies associated with the finding. + # @!attribute [rw] job + # @return [::Google::Cloud::SecurityCenter::V2::Job] + # Job associated with the finding. # @!attribute [rw] application # @return [::Google::Cloud::SecurityCenter::V2::Application] # Represents an application associated with the finding. + # @!attribute [rw] ip_rules + # @return [::Google::Cloud::SecurityCenter::V2::IpRules] + # IP rules associated with the finding. # @!attribute [rw] backup_disaster_recovery # @return [::Google::Cloud::SecurityCenter::V2::BackupDisasterRecovery] # Fields related to Backup and DR findings. @@ -289,9 +295,27 @@ module V2 # @!attribute [rw] data_flow_events # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataFlowEvent>] # Data flow events associated with the finding. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Network>] + # Represents the VPC networks that the resource is attached to. # @!attribute [rw] data_retention_deletion_events # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent>] # Data retention deletion events associated with the finding. + # @!attribute [rw] affected_resources + # @return [::Google::Cloud::SecurityCenter::V2::AffectedResources] + # AffectedResources associated with the finding. + # @!attribute [rw] ai_model + # @return [::Google::Cloud::SecurityCenter::V2::AiModel] + # The AI model associated with the finding. + # @!attribute [rw] chokepoint + # @return [::Google::Cloud::SecurityCenter::V2::Chokepoint] + # Contains details about a chokepoint, which is a resource or resource group + # where high-risk attack paths converge, based on [attack path simulations] + # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] vertex_ai + # @return [::Google::Cloud::SecurityCenter::V2::VertexAi] + # VertexAi associated with the finding. class Finding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -488,6 +512,10 @@ module FindingClass # Describes a potential security risk to data assets that contain sensitive # data. SENSITIVE_DATA_RISK = 8 + + # Describes a resource or resource group where high risk attack paths + # converge, based on attack path simulations (APS). + CHOKEPOINT = 9 end end end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb index a72cdf682b87..e71cf434fd8d 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb @@ -40,6 +40,9 @@ module GroupType # Group represents a toxic combination. GROUP_TYPE_TOXIC_COMBINATION = 1 + + # Group represents a chokepoint. + GROUP_TYPE_CHOKEPOINT = 3 end end end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb new file mode 100644 index 000000000000..1ce736b29e64 --- /dev/null +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb @@ -0,0 +1,122 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SecurityCenter + module V2 + # IP rules associated with the finding. + # @!attribute [rw] direction + # @return [::Google::Cloud::SecurityCenter::V2::IpRules::Direction] + # The direction that the rule is applicable to, one of ingress or egress. + # @!attribute [rw] allowed + # @return [::Google::Cloud::SecurityCenter::V2::Allowed] + # Tuple with allowed rules. + # + # Note: The following fields are mutually exclusive: `allowed`, `denied`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] denied + # @return [::Google::Cloud::SecurityCenter::V2::Denied] + # Tuple with denied rules. + # + # Note: The following fields are mutually exclusive: `denied`, `allowed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] source_ip_ranges + # @return [::Array<::String>] + # If source IP ranges are specified, the firewall rule applies only to + # traffic that has a source IP address in these ranges. These ranges must be + # expressed in CIDR format. Only supports IPv4. + # @!attribute [rw] destination_ip_ranges + # @return [::Array<::String>] + # If destination IP ranges are specified, the firewall rule applies only to + # traffic that has a destination IP address in these ranges. These ranges + # must be expressed in CIDR format. Only supports IPv4. + # @!attribute [rw] exposed_services + # @return [::Array<::String>] + # Name of the network protocol service, such as FTP, that is exposed by the + # open port. Follows the naming convention available at: + # https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml. + class IpRules + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of direction that the rule is applicable to, one of ingress or + # egress. Not applicable to OPEN_X_PORT findings. + module Direction + # Unspecified direction value. + DIRECTION_UNSPECIFIED = 0 + + # Ingress direction value. + INGRESS = 1 + + # Egress direction value. + EGRESS = 2 + end + end + + # IP rule information. + # @!attribute [rw] protocol + # @return [::String] + # The IP protocol this rule applies to. This value can either be one of the + # following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, + # SCTP) or a string representation of the integer value. + # @!attribute [rw] port_ranges + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule::PortRange>] + # Optional. An optional list of ports to which this rule applies. This field + # is only applicable for the UDP or (S)TCP protocols. Each entry must be + # either an integer or a range including a min and max port number. + class IpRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A port range which is inclusive of the min and max values. + # Values are between 0 and 2^16-1. The max can be equal / must be not smaller + # than the min value. If min and max are equal this indicates that it is a + # single port. + # @!attribute [rw] min + # @return [::Integer] + # Minimum port value. + # @!attribute [rw] max + # @return [::Integer] + # Maximum port value. + class PortRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Allowed IP rule. + # @!attribute [rw] ip_rules + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] + # Optional. Optional list of allowed IP rules. + class Allowed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Denied IP rule. + # @!attribute [rw] ip_rules + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] + # Optional. Optional list of denied IP rules. + class Denied + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb new file mode 100644 index 000000000000..d8f214f491a2 --- /dev/null +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SecurityCenter + module V2 + # Describes a job + # @!attribute [rw] name + # @return [::String] + # The fully-qualified name for a job. + # e.g. `projects//jobs/` + # @!attribute [r] state + # @return [::Google::Cloud::SecurityCenter::V2::JobState] + # Output only. State of the job, such as `RUNNING` or `PENDING`. + # @!attribute [rw] error_code + # @return [::Integer] + # Optional. If the job did not complete successfully, this field describes + # why. + # @!attribute [rw] location + # @return [::String] + # Optional. Gives the location where the job ran, such as `US` or + # `europe-west1` + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # JobState represents the state of the job. + module JobState + # Unspecified represents an unknown state and should not be used. + JOB_STATE_UNSPECIFIED = 0 + + # Job is scheduled and pending for run + PENDING = 1 + + # Job in progress + RUNNING = 2 + + # Job has completed with success + SUCCEEDED = 3 + + # Job has completed but with failure + FAILED = 4 + end + end + end + end +end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb index bde10c5d93ea..ab02cb3782b0 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb @@ -97,12 +97,51 @@ module Tactic IMPACT = 14 end - # MITRE ATT&CK techniques that can be referenced by SCC findings. - # See: https://attack.mitre.org/techniques/enterprise/ + # MITRE ATT&CK techniques that can be referenced by Security Command Center + # findings. See: https://attack.mitre.org/techniques/enterprise/ module Technique # Unspecified value. TECHNIQUE_UNSPECIFIED = 0 + # T1001 + DATA_OBFUSCATION = 70 + + # T1001.002 + DATA_OBFUSCATION_STEGANOGRAPHY = 71 + + # T1003 + OS_CREDENTIAL_DUMPING = 114 + + # T1003.007 + OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM = 115 + + # T1003.008 + OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW = 122 + + # T1005 + DATA_FROM_LOCAL_SYSTEM = 117 + + # T1020 + AUTOMATED_EXFILTRATION = 68 + + # T1027 + OBFUSCATED_FILES_OR_INFO = 72 + + # T1027.003 + STEGANOGRAPHY = 73 + + # T1027.004 + COMPILE_AFTER_DELIVERY = 74 + + # T1027.010 + COMMAND_OBFUSCATION = 75 + + # T1029 + SCHEDULED_TRANSFER = 120 + + # T1033 + SYSTEM_OWNER_USER_DISCOVERY = 118 + # T1036 MASQUERADING = 49 @@ -118,6 +157,24 @@ module Technique # T1046 NETWORK_SERVICE_DISCOVERY = 32 + # T1053 + SCHEDULED_TASK_JOB = 89 + + # T1053.003 + SCHEDULED_TASK_JOB_CRON = 119 + + # T1053.007 + CONTAINER_ORCHESTRATION_JOB = 90 + + # T1055 + PROCESS_INJECTION = 93 + + # T1056 + INPUT_CAPTURE = 103 + + # T1056.001 + INPUT_CAPTURE_KEYLOGGING = 104 + # T1057 PROCESS_DISCOVERY = 56 @@ -139,9 +196,24 @@ module Technique # T1069.003 CLOUD_GROUPS = 19 + # T1070 + INDICATOR_REMOVAL = 123 + + # T1070.002 + INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS = 124 + + # T1070.003 + INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY = 125 + # T1070.004 INDICATOR_REMOVAL_FILE_DELETION = 64 + # T1070.006 + INDICATOR_REMOVAL_TIMESTOMP = 128 + + # T1070.008 + INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA = 126 + # T1071 APPLICATION_LAYER_PROTOCOL = 45 @@ -163,6 +235,12 @@ module Technique # T1078.004 CLOUD_ACCOUNTS = 16 + # T1083 + FILE_AND_DIRECTORY_DISCOVERY = 121 + + # T1087.001 + ACCOUNT_DISCOVERY_LOCAL_ACCOUNT = 116 + # T1090 PROXY = 9 @@ -178,12 +256,18 @@ module Technique # T1098.001 ADDITIONAL_CLOUD_CREDENTIALS = 40 + # T1098.003 + ADDITIONAL_CLOUD_ROLES = 67 + # T1098.004 SSH_AUTHORIZED_KEYS = 23 # T1098.006 ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 + # T1104 + MULTI_STAGE_CHANNELS = 76 + # T1105 INGRESS_TOOL_TRANSFER = 3 @@ -193,30 +277,69 @@ module Technique # T1110 BRUTE_FORCE = 44 + # T1119 + AUTOMATED_COLLECTION = 94 + # T1129 SHARED_MODULES = 5 + # T1132 + DATA_ENCODING = 77 + + # T1132.001 + STANDARD_ENCODING = 78 + # T1134 ACCESS_TOKEN_MANIPULATION = 33 # T1134.001 TOKEN_IMPERSONATION_OR_THEFT = 39 + # T1136 + CREATE_ACCOUNT = 79 + + # T1136.001 + LOCAL_ACCOUNT = 80 + + # T1140 + DEOBFUSCATE_DECODE_FILES_OR_INFO = 95 + # T1190 EXPLOIT_PUBLIC_FACING_APPLICATION = 27 + # T1195 + SUPPLY_CHAIN_COMPROMISE = 129 + + # T1195.001 + COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS = 130 + + # T1203 + EXPLOITATION_FOR_CLIENT_EXECUTION = 134 + + # T1204 + USER_EXECUTION = 69 + + # T1222.002 + LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION = 135 + # T1484 DOMAIN_POLICY_MODIFICATION = 30 # T1485 DATA_DESTRUCTION = 29 + # T1486 + DATA_ENCRYPTED_FOR_IMPACT = 132 + # T1489 SERVICE_STOP = 52 # T1490 INHIBIT_SYSTEM_RECOVERY = 36 + # T1495 + FIRMWARE_CORRUPTION = 81 + # T1496 RESOURCE_HIJACKING = 8 @@ -232,6 +355,9 @@ module Technique # T1531 ACCOUNT_ACCESS_REMOVAL = 51 + # T1537 + TRANSFER_DATA_TO_CLOUD_ACCOUNT = 91 + # T1539 STEAL_WEB_SESSION_COOKIE = 25 @@ -241,21 +367,78 @@ module Technique # T1546 EVENT_TRIGGERED_EXECUTION = 65 + # T1547 + BOOT_OR_LOGON_AUTOSTART_EXECUTION = 82 + + # T1547.006 + KERNEL_MODULES_AND_EXTENSIONS = 83 + + # T1547.009 + SHORTCUT_MODIFICATION = 127 + # T1548 ABUSE_ELEVATION_CONTROL_MECHANISM = 34 + # T1548.001 + ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID = 136 + + # T1548.003 + ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING = 109 + # T1552 UNSECURED_CREDENTIALS = 13 + # T1552.001 + CREDENTIALS_IN_FILES = 105 + + # T1552.003 + BASH_HISTORY = 96 + + # T1552.004 + PRIVATE_KEYS = 97 + + # T1553 + SUBVERT_TRUST_CONTROL = 106 + + # T1553.004 + INSTALL_ROOT_CERTIFICATE = 107 + + # T1554 + COMPROMISE_HOST_SOFTWARE_BINARY = 84 + + # T1555 + CREDENTIALS_FROM_PASSWORD_STORES = 98 + # T1556 MODIFY_AUTHENTICATION_PROCESS = 28 + # T1556.003 + PLUGGABLE_AUTHENTICATION_MODULES = 108 + + # T1556.006 + MULTI_FACTOR_AUTHENTICATION = 137 + # T1562 IMPAIR_DEFENSES = 31 # T1562.001 DISABLE_OR_MODIFY_TOOLS = 55 + # T1562.006 + INDICATOR_BLOCKING = 110 + + # T1562.012 + DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM = 111 + + # T1564 + HIDE_ARTIFACTS = 85 + + # T1564.001 + HIDDEN_FILES_AND_DIRECTORIES = 86 + + # T1564.002 + HIDDEN_USERS = 87 + # T1567 EXFILTRATION_OVER_WEB_SERVICE = 20 @@ -268,6 +451,12 @@ module Technique # T1570 LATERAL_TOOL_TRANSFER = 41 + # T1574 + HIJACK_EXECUTION_FLOW = 112 + + # T1574.006 + HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING = 113 + # T1578 MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 @@ -277,15 +466,33 @@ module Technique # T1580 CLOUD_INFRASTRUCTURE_DISCOVERY = 53 + # T1587 + DEVELOP_CAPABILITIES = 99 + + # T1587.001 + DEVELOP_CAPABILITIES_MALWARE = 100 + # T1588 OBTAIN_CAPABILITIES = 43 + # T1588.001 + OBTAIN_CAPABILITIES_MALWARE = 101 + + # T1588.006 + OBTAIN_CAPABILITIES_VULNERABILITIES = 133 + # T1595 ACTIVE_SCANNING = 1 # T1595.001 SCANNING_IP_BLOCKS = 2 + # T1608 + STAGE_CAPABILITIES = 88 + + # T1608.001 + UPLOAD_MALWARE = 102 + # T1609 CONTAINER_ADMINISTRATION_COMMAND = 60 @@ -298,8 +505,14 @@ module Technique # T1613 CONTAINER_AND_RESOURCE_DISCOVERY = 57 + # T1620 + REFLECTIVE_CODE_LOADING = 92 + # T1649 STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 + + # T1657 + FINANCIAL_THEFT = 131 end end end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb new file mode 100644 index 000000000000..e35be06d43a5 --- /dev/null +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SecurityCenter + module V2 + # Contains information about a VPC network associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the VPC network resource, for example, + # `//compute.googleapis.com/projects/my-project/global/networks/my-network`. + class Network + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb index a8654de7529e..f9f97acf94f0 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb @@ -50,6 +50,10 @@ module V2 # @!attribute [rw] streaming_config # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig::StreamingConfig] # The config for triggering streaming-based notifications. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the notification config was last + # updated. class NotificationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb index 151db6e1be11..4ccd1e9010c3 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb @@ -56,6 +56,10 @@ module V2 # @!attribute [rw] parent_pid # @return [::Integer] # The parent process ID. + # @!attribute [rw] user_id + # @return [::Integer] + # The ID of the user that executed the process. E.g. If this is the root user + # this will always be 0. class Process include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb index 08a544816646..ee0f501893b7 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb @@ -76,8 +76,8 @@ class Resource extend ::Google::Protobuf::MessageExts::ClassMethods end - # GCP metadata associated with the resource, only applicable if the finding's - # cloud provider is Google Cloud Platform. + # Google Cloud metadata associated with the resource. Only applicable if the + # finding's cloud provider is Google Cloud. # @!attribute [rw] project # @return [::String] # The full resource name of project that the resource belongs to. @@ -299,7 +299,7 @@ module CloudProvider # The cloud provider is unspecified. CLOUD_PROVIDER_UNSPECIFIED = 0 - # The cloud provider is Google Cloud Platform. + # The cloud provider is Google Cloud. GOOGLE_CLOUD_PLATFORM = 1 # The cloud provider is Amazon Web Services. diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb index e9280423d518..d0865f88d3a3 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb @@ -286,6 +286,34 @@ class DeleteResourceValueConfigRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # The destination big query dataset to export findings to. + # @!attribute [rw] dataset + # @return [::String] + # Required. The relative resource name of the destination dataset, in the + # form projects/\\{projectId}/datasets/\\{datasetId}. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The LRO metadata for a ExportFindings request. + # @!attribute [rw] export_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp at which export was started + # @!attribute [rw] big_query_destination + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryDestination] + # Required. The destination big query dataset to export findings to. + class ExportFindingsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to a ExportFindings request. Contains the LRO information. + class ExportFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request message for retrieving a BigQuery export. # @!attribute [rw] name # @return [::String] diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb new file mode 100644 index 000000000000..ade8ec246fd1 --- /dev/null +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 SecurityCenter + module V2 + # Vertex AI-related information associated with the finding. + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Dataset>] + # Datasets associated with the finding. + # @!attribute [rw] pipelines + # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Pipeline>] + # Pipelines associated with the finding. + class VertexAi + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Vertex AI dataset associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Resource name of the dataset, e.g. + # projects/\\{project}/locations/\\{location}/datasets/2094040236064505856 + # @!attribute [rw] display_name + # @return [::String] + # The user defined display name of dataset, e.g. plants-dataset + # @!attribute [rw] source + # @return [::String] + # Data source, such as a BigQuery source URI, e.g. + # bq://scc-nexus-test.AIPPtest.gsod + class Dataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Vertex AI training pipeline associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Resource name of the pipeline, e.g. + # projects/\\{project}/locations/\\{location}/trainingPipelines/5253428229225578496 + # @!attribute [rw] display_name + # @return [::String] + # The user-defined display name of pipeline, e.g. plants-classification + class Pipeline + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb index aa00bf68cb7e..ddba25ddc8b5 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb @@ -35,6 +35,18 @@ module V2 # @!attribute [rw] security_bulletin # @return [::Google::Cloud::SecurityCenter::V2::SecurityBulletin] # The security bulletin is relevant to this finding. + # @!attribute [rw] provider_risk_score + # @return [::Integer] + # Provider provided risk_score based on multiple factors. The higher the risk + # score, the more risky the vulnerability is. + # @!attribute [rw] reachable + # @return [::Boolean] + # Represents whether the vulnerability is reachable (detected via static + # analysis) + # @!attribute [rw] cwes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Cwe>] + # Represents one or more Common Weakness Enumeration (CWE) information on + # this vulnerability. class Vulnerability include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -333,6 +345,20 @@ class SecurityBulletin include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # CWE stands for Common Weakness Enumeration. Information about this weakness, + # as described by [CWE](https://cwe.mitre.org/). + # @!attribute [rw] id + # @return [::String] + # The CWE identifier, e.g. CWE-94 + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Reference>] + # Any reference to the details on the CWE, for example, + # https://cwe.mitre.org/data/definitions/94.html + class Cwe + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end From 43359d6bdee39d7fa74edf2a251bf64bbb88d918 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:33:56 -0700 Subject: [PATCH 185/457] feat(dialogflow-cx-v3): Add support for generator settings on fulfillment (#30596) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for generator settings on fulfillment PiperOrigin-RevId: 778681964 Source-Link: https://github.com/googleapis/googleapis/commit/24cab82a025bb11a7b8c437a20a6e7780b968707 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9723ee7edca416f26eccb42e4437d39a0d372f03 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gtdjMvLk93bEJvdC55YW1sIiwiaCI6Ijk3MjNlZTdlZGNhNDE2ZjI2ZWNjYjQyZTQ0MzdkMzlhMGQzNzJmMDMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../cloud/dialogflow/cx/v3/flows/paths.rb | 21 ++++++++++ .../cloud/dialogflow/cx/v3/fulfillment_pb.rb | 4 +- .../cloud/dialogflow/cx/v3/pages/paths.rb | 21 ++++++++++ .../dialogflow/cx/v3/test_cases/paths.rb | 21 ++++++++++ .../cx/v3/transition_route_groups/paths.rb | 21 ++++++++++ .../cloud/dialogflow/cx/v3/fulfillment.rb | 38 +++++++++++++++++++ .../dialogflow/cx/v3/flows_paths_test.rb | 12 ++++++ .../dialogflow/cx/v3/pages_paths_test.rb | 12 ++++++ .../dialogflow/cx/v3/test_cases_paths_test.rb | 12 ++++++ .../v3/transition_route_groups_paths_test.rb | 12 ++++++ 10 files changed, 173 insertions(+), 1 deletion(-) diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/paths.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/paths.rb index 61a922fb0957..2a622c94442a 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/paths.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/paths.rb @@ -86,6 +86,27 @@ def flow_validation_result_path project:, location:, agent:, flow: "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/validationResult" end + ## + # Create a fully-qualified Generator resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/agents/{agent}/generators/{generator}` + # + # @param project [String] + # @param location [String] + # @param agent [String] + # @param generator [String] + # + # @return [::String] + def generator_path project:, location:, agent:, generator: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" + + "projects/#{project}/locations/#{location}/agents/#{agent}/generators/#{generator}" + end + ## # Create a fully-qualified Intent resource string. # diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb index 673fdfc0702e..93aa68ce32a9 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb @@ -4,13 +4,14 @@ require 'google/protobuf' +require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/cloud/dialogflow/cx/v3/advanced_settings_pb' require 'google/cloud/dialogflow/cx/v3/response_message_pb' require 'google/protobuf/struct_pb' -descriptor_data = "\n/google/cloud/dialogflow/cx/v3/fulfillment.proto\x12\x1dgoogle.cloud.dialogflow.cx.v3\x1a\x19google/api/resource.proto\x1a\x35google/cloud/dialogflow/cx/v3/advanced_settings.proto\x1a\x34google/cloud/dialogflow/cx/v3/response_message.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xd3\x07\n\x0b\x46ulfillment\x12@\n\x08messages\x18\x01 \x03(\x0b\x32..google.cloud.dialogflow.cx.v3.ResponseMessage\x12\x37\n\x07webhook\x18\x02 \x01(\tB&\xfa\x41#\n!dialogflow.googleapis.com/Webhook\x12 \n\x18return_partial_responses\x18\x08 \x01(\x08\x12\x0b\n\x03tag\x18\x03 \x01(\t\x12\\\n\x15set_parameter_actions\x18\x04 \x03(\x0b\x32=.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction\x12V\n\x11\x63onditional_cases\x18\x05 \x03(\x0b\x32;.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases\x12J\n\x11\x61\x64vanced_settings\x18\x07 \x01(\x0b\x32/.google.cloud.dialogflow.cx.v3.AdvancedSettings\x12\"\n\x1a\x65nable_generative_fallback\x18\x0c \x01(\x08\x1aN\n\x12SetParameterAction\x12\x11\n\tparameter\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x1a\xa3\x03\n\x10\x43onditionalCases\x12O\n\x05\x63\x61ses\x18\x01 \x03(\x0b\x32@.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case\x1a\xbd\x02\n\x04\x43\x61se\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\x62\n\x0c\x63\x61se_content\x18\x02 \x03(\x0b\x32L.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent\x1a\xbd\x01\n\x0b\x43\x61seContent\x12\x41\n\x07message\x18\x01 \x01(\x0b\x32..google.cloud.dialogflow.cx.v3.ResponseMessageH\x00\x12W\n\x10\x61\x64\x64itional_cases\x18\x02 \x01(\x0b\x32;.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCasesH\x00\x42\x12\n\x10\x63\x61ses_or_messageB\xb3\x01\n!com.google.cloud.dialogflow.cx.v3B\x10\x46ulfillmentProtoP\x01Z1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb\xa2\x02\x02\x44\x46\xaa\x02\x1dGoogle.Cloud.Dialogflow.Cx.V3\xea\x02!Google::Cloud::Dialogflow::CX::V3b\x06proto3" +descriptor_data = "\n/google/cloud/dialogflow/cx/v3/fulfillment.proto\x12\x1dgoogle.cloud.dialogflow.cx.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/dialogflow/cx/v3/advanced_settings.proto\x1a\x34google/cloud/dialogflow/cx/v3/response_message.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xbf\n\n\x0b\x46ulfillment\x12@\n\x08messages\x18\x01 \x03(\x0b\x32..google.cloud.dialogflow.cx.v3.ResponseMessage\x12\x37\n\x07webhook\x18\x02 \x01(\tB&\xfa\x41#\n!dialogflow.googleapis.com/Webhook\x12 \n\x18return_partial_responses\x18\x08 \x01(\x08\x12\x0b\n\x03tag\x18\x03 \x01(\t\x12\\\n\x15set_parameter_actions\x18\x04 \x03(\x0b\x32=.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction\x12V\n\x11\x63onditional_cases\x18\x05 \x03(\x0b\x32;.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases\x12J\n\x11\x61\x64vanced_settings\x18\x07 \x01(\x0b\x32/.google.cloud.dialogflow.cx.v3.AdvancedSettings\x12\"\n\x1a\x65nable_generative_fallback\x18\x0c \x01(\x08\x12P\n\ngenerators\x18\r \x03(\x0b\x32<.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings\x1aN\n\x12SetParameterAction\x12\x11\n\tparameter\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x1a\xa3\x03\n\x10\x43onditionalCases\x12O\n\x05\x63\x61ses\x18\x01 \x03(\x0b\x32@.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case\x1a\xbd\x02\n\x04\x43\x61se\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\x62\n\x0c\x63\x61se_content\x18\x02 \x03(\x0b\x32L.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent\x1a\xbd\x01\n\x0b\x43\x61seContent\x12\x41\n\x07message\x18\x01 \x01(\x0b\x32..google.cloud.dialogflow.cx.v3.ResponseMessageH\x00\x12W\n\x10\x61\x64\x64itional_cases\x18\x02 \x01(\x0b\x32;.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCasesH\x00\x42\x12\n\x10\x63\x61ses_or_message\x1a\x97\x02\n\x11GeneratorSettings\x12>\n\tgenerator\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dialogflow.googleapis.com/Generator\x12k\n\x10input_parameters\x18\x02 \x03(\x0b\x32Q.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.InputParametersEntry\x12\x1d\n\x10output_parameter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\x36\n\x14InputParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\xb3\x01\n!com.google.cloud.dialogflow.cx.v3B\x10\x46ulfillmentProtoP\x01Z1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb\xa2\x02\x02\x44\x46\xaa\x02\x1dGoogle.Cloud.Dialogflow.Cx.V3\xea\x02!Google::Cloud::Dialogflow::CX::V3b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -49,6 +50,7 @@ module V3 Fulfillment::ConditionalCases = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases").msgclass Fulfillment::ConditionalCases::Case = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case").msgclass Fulfillment::ConditionalCases::Case::CaseContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent").msgclass + Fulfillment::GeneratorSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings").msgclass end end end diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/paths.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/paths.rb index 63c352df11c2..d40ec9c4da31 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/paths.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/paths.rb @@ -67,6 +67,27 @@ def flow_path project:, location:, agent:, flow: "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}" end + ## + # Create a fully-qualified Generator resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/agents/{agent}/generators/{generator}` + # + # @param project [String] + # @param location [String] + # @param agent [String] + # @param generator [String] + # + # @return [::String] + def generator_path project:, location:, agent:, generator: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" + + "projects/#{project}/locations/#{location}/agents/#{agent}/generators/#{generator}" + end + ## # Create a fully-qualified Intent resource string. # diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/paths.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/paths.rb index 3d03192204d7..1dee68b10c84 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/paths.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/paths.rb @@ -107,6 +107,27 @@ def flow_path project:, location:, agent:, flow: "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}" end + ## + # Create a fully-qualified Generator resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/agents/{agent}/generators/{generator}` + # + # @param project [String] + # @param location [String] + # @param agent [String] + # @param generator [String] + # + # @return [::String] + def generator_path project:, location:, agent:, generator: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" + + "projects/#{project}/locations/#{location}/agents/#{agent}/generators/#{generator}" + end + ## # Create a fully-qualified Intent resource string. # diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/paths.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/paths.rb index 51affcf5eea1..cac3e32eea70 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/paths.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/paths.rb @@ -65,6 +65,27 @@ def flow_path project:, location:, agent:, flow: "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}" end + ## + # Create a fully-qualified Generator resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/agents/{agent}/generators/{generator}` + # + # @param project [String] + # @param location [String] + # @param agent [String] + # @param generator [String] + # + # @return [::String] + def generator_path project:, location:, agent:, generator: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" + + "projects/#{project}/locations/#{location}/agents/#{agent}/generators/#{generator}" + end + ## # Create a fully-qualified Intent resource string. # diff --git a/google-cloud-dialogflow-cx-v3/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb b/google-cloud-dialogflow-cx-v3/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb index b5822241fc5b..b42d40d7d50a 100644 --- a/google-cloud-dialogflow-cx-v3/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +++ b/google-cloud-dialogflow-cx-v3/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb @@ -82,6 +82,9 @@ module V3 # {::Google::Cloud::Dialogflow::CX::V3::Fulfillment#messages responses} in the # fulfillment will be respected. This flag is only useful for fulfillments # associated with no-match event handlers. + # @!attribute [rw] generators + # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::GeneratorSettings>] + # A list of Generators to be called during this fulfillment. class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -142,6 +145,41 @@ class CaseContent end end end + + # Generator settings used by the LLM to generate a text response. + # @!attribute [rw] generator + # @return [::String] + # Required. The generator to call. + # Format: + # `projects//locations//agents//generators/`. + # @!attribute [rw] input_parameters + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from [placeholder parameter][Generator.Parameter.id] in the + # {::Google::Cloud::Dialogflow::CX::V3::Generator Generator} to corresponding + # session parameters. By default, Dialogflow uses the session parameter + # with the same name to fill in the generator template. e.g. If there is a + # placeholder parameter `city` in the Generator, Dialogflow default to fill + # in the `$city` with + # `$session.params.city`. However, you may choose to fill `$city` with + # `$session.params.desination-city`. + # - Map key: [parameter ID][Genrator.Parameter.id] + # - Map value: session parameter name + # @!attribute [rw] output_parameter + # @return [::String] + # Required. Output parameter which should contain the generator response. + class GeneratorSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class InputParametersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end end end end diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/flows_paths_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/flows_paths_test.rb index 928873826306..892e6983a6a6 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/flows_paths_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/flows_paths_test.rb @@ -77,6 +77,18 @@ def test_flow_validation_result_path end end + def test_generator_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dialogflow::CX::V3::Flows::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.generator_path project: "value0", location: "value1", agent: "value2", generator: "value3" + assert_equal "projects/value0/locations/value1/agents/value2/generators/value3", path + end + end + def test_intent_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/pages_paths_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/pages_paths_test.rb index 8cfca6530b30..33115a438bb6 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/pages_paths_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/pages_paths_test.rb @@ -65,6 +65,18 @@ def test_flow_path end end + def test_generator_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dialogflow::CX::V3::Pages::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.generator_path project: "value0", location: "value1", agent: "value2", generator: "value3" + assert_equal "projects/value0/locations/value1/agents/value2/generators/value3", path + end + end + def test_intent_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/test_cases_paths_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/test_cases_paths_test.rb index 7e82c3b7222f..c1ce6e7adda9 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/test_cases_paths_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/test_cases_paths_test.rb @@ -89,6 +89,18 @@ def test_flow_path end end + def test_generator_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.generator_path project: "value0", location: "value1", agent: "value2", generator: "value3" + assert_equal "projects/value0/locations/value1/agents/value2/generators/value3", path + end + end + def test_intent_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/transition_route_groups_paths_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/transition_route_groups_paths_test.rb index 1846226848f0..4b0a57942a7b 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/transition_route_groups_paths_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/transition_route_groups_paths_test.rb @@ -65,6 +65,18 @@ def test_flow_path end end + def test_generator_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.generator_path project: "value0", location: "value1", agent: "value2", generator: "value3" + assert_equal "projects/value0/locations/value1/agents/value2/generators/value3", path + end + end + def test_intent_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do From 61bc4d1e5a0b47dd469892e38ff755ae3680574c Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:06:14 -0700 Subject: [PATCH 186/457] feat(managed_kafka-v1): Support for Cluster TLS config (#30601) --- .../managed_kafka/v1/managed_kafka/paths.rb | 19 ++++++++ .../cloud/managedkafka/v1/resources_pb.rb | 5 +- .../google/cloud/managedkafka/v1/resources.rb | 47 +++++++++++++++++++ .../v1/managed_kafka_paths_test.rb | 12 +++++ 4 files changed, 82 insertions(+), 1 deletion(-) diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/paths.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/paths.rb index bdf892bce026..1edc9f9e2458 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/paths.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/managed_kafka/paths.rb @@ -45,6 +45,25 @@ def acl_path project:, location:, cluster:, acl: "projects/#{project}/locations/#{location}/clusters/#{cluster}/acls/#{acl}" end + ## + # Create a fully-qualified CaPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # + # @return [::String] + def ca_pool_path project:, location:, ca_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" + end + ## # Create a fully-qualified Cluster resource string. # diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/resources_pb.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/resources_pb.rb index a7d5fc19fc95..b6e90c1dc91d 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/resources_pb.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managedkafka/v1/resources_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/managedkafka/v1/resources.proto\x12\x1cgoogle.cloud.managedkafka.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x07\x43luster\x12\x42\n\ngcp_config\x18\t \x01(\x0b\x32\'.google.cloud.managedkafka.v1.GcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.managedkafka.v1.Cluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x05 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12L\n\x10rebalance_config\x18\x08 \x01(\x0b\x32-.google.cloud.managedkafka.v1.RebalanceConfigB\x03\xe0\x41\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.managedkafka.v1.Cluster.StateB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzi\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:w\xea\x41t\n#managedkafka.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterB\x11\n\x0fplatform_configB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzs\"D\n\x0e\x43\x61pacityConfig\x12\x17\n\nvcpu_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"\xa8\x01\n\x0fRebalanceConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.RebalanceConfig.ModeB\x03\xe0\x41\x01\"N\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNO_REBALANCE\x10\x01\x12\x1e\n\x1a\x41UTO_REBALANCE_ON_SCALE_UP\x10\x02\"$\n\rNetworkConfig\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x02\"Y\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32+.google.cloud.managedkafka.v1.NetworkConfigB\x03\xe0\x41\x02\"\x92\x01\n\tGcpConfig\x12\x46\n\raccess_config\x18\x03 \x01(\x0b\x32*.google.cloud.managedkafka.v1.AccessConfigB\x03\xe0\x41\x02\x12=\n\x07kms_key\x18\x02 \x01(\tB,\xe0\x41\x01\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xd7\x02\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fpartition_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\"\n\x12replication_factor\x18\x03 \x01(\x05\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x46\n\x07\x63onfigs\x18\x04 \x03(\x0b\x32\x30.google.cloud.managedkafka.v1.Topic.ConfigsEntryB\x03\xe0\x41\x01\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n!managedkafka.googleapis.com/Topic\x12Iprojects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}*\x06topics2\x05topic\"\xe1\x01\n\x15\x43onsumerTopicMetadata\x12\\\n\npartitions\x18\x01 \x03(\x0b\x32\x43.google.cloud.managedkafka.v1.ConsumerTopicMetadata.PartitionsEntryB\x03\xe0\x41\x01\x1aj\n\x0fPartitionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerPartitionMetadata:\x02\x38\x01\"G\n\x19\x43onsumerPartitionMetadata\x12\x13\n\x06offset\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x15\n\x08metadata\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x81\x03\n\rConsumerGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x06topics\x18\x02 \x03(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerGroup.TopicsEntryB\x03\xe0\x41\x01\x1a\x62\n\x0bTopicsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.managedkafka.v1.ConsumerTopicMetadata:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n)managedkafka.googleapis.com/ConsumerGroup\x12Zprojects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}*\x0e\x63onsumerGroups2\rconsumerGroup\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x83\x07\n\x0e\x43onnectCluster\x12I\n\ngcp_config\x18\x07 \x01(\x0b\x32..google.cloud.managedkafka.v1.ConnectGcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1d\n\rkafka_cluster\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x05 \x03(\x0b\x32\x38.google.cloud.managedkafka.v1.ConnectCluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x06 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12\x46\n\x05state\x18\x08 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.ConnectCluster.StateB\x03\xe0\x41\x03\x12M\n\x06\x63onfig\x18\t \x03(\x0b\x32\x38.google.cloud.managedkafka.v1.ConnectCluster.ConfigEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:\x9c\x01\xea\x41\x98\x01\n*managedkafka.googleapis.com/ConnectCluster\x12Iprojects/{project}/locations/{location}/connectClusters/{connect_cluster}*\x0f\x63onnectClusters2\x0e\x63onnectClusterB\x11\n\x0fplatform_config\"s\n\x14\x43onnectNetworkConfig\x12\x1b\n\x0eprimary_subnet\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x61\x64\x64itional_subnets\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64ns_domain_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"g\n\x13\x43onnectAccessConfig\x12P\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.managedkafka.v1.ConnectNetworkConfigB\x03\xe0\x41\x02\"\xab\x01\n\x10\x43onnectGcpConfig\x12M\n\raccess_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.managedkafka.v1.ConnectAccessConfigB\x03\xe0\x41\x02\x12H\n\x0csecret_paths\x18\x02 \x03(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xdb\x04\n\tConnector\x12Q\n\x13task_restart_policy\x18\x04 \x01(\x0b\x32-.google.cloud.managedkafka.v1.TaskRetryPolicyB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12J\n\x07\x63onfigs\x18\x02 \x03(\x0b\x32\x34.google.cloud.managedkafka.v1.Connector.ConfigsEntryB\x03\xe0\x41\x01\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.managedkafka.v1.Connector.StateB\x03\xe0\x41\x03\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nUNASSIGNED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0e\n\nRESTARTING\x10\x05\x12\x0b\n\x07STOPPED\x10\x06:\xa4\x01\xea\x41\xa0\x01\n%managedkafka.googleapis.com/Connector\x12`projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}*\nconnectors2\tconnectorB\x10\n\x0erestart_policy\"\x83\x01\n\x0fTaskRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xb8\x02\n\x03\x41\x63l\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12@\n\x0b\x61\x63l_entries\x18\x02 \x03(\x0b\x32&.google.cloud.managedkafka.v1.AclEntryB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rresource_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rresource_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpattern_type\x18\x06 \x01(\tB\x03\xe0\x41\x03:v\xea\x41s\n\x1fmanagedkafka.googleapis.com/Acl\x12\x45projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl}*\x04\x61\x63ls2\x03\x61\x63l\"k\n\x08\x41\x63lEntry\x12\x16\n\tprincipal\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0fpermission_type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\toperation\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04host\x18\x07 \x01(\tB\x03\xe0\x41\x02\x42\xa2\x04\n com.google.cloud.managedkafka.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb\xaa\x02\x1cGoogle.Cloud.ManagedKafka.V1\xca\x02\x1cGoogle\\Cloud\\ManagedKafka\\V1\xea\x02\x1fGoogle::Cloud::ManagedKafka::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" +descriptor_data = "\n,google/cloud/managedkafka/v1/resources.proto\x12\x1cgoogle.cloud.managedkafka.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x07\n\x07\x43luster\x12\x42\n\ngcp_config\x18\t \x01(\x0b\x32\'.google.cloud.managedkafka.v1.GcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.managedkafka.v1.Cluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x05 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12L\n\x10rebalance_config\x18\x08 \x01(\x0b\x32-.google.cloud.managedkafka.v1.RebalanceConfigB\x03\xe0\x41\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.managedkafka.v1.Cluster.StateB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzi\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12@\n\ntls_config\x18\r \x01(\x0b\x32\'.google.cloud.managedkafka.v1.TlsConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:w\xea\x41t\n#managedkafka.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterB\x11\n\x0fplatform_configB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzs\"D\n\x0e\x43\x61pacityConfig\x12\x17\n\nvcpu_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"\xa8\x01\n\x0fRebalanceConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.RebalanceConfig.ModeB\x03\xe0\x41\x01\"N\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNO_REBALANCE\x10\x01\x12\x1e\n\x1a\x41UTO_REBALANCE_ON_SCALE_UP\x10\x02\"$\n\rNetworkConfig\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x02\"Y\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32+.google.cloud.managedkafka.v1.NetworkConfigB\x03\xe0\x41\x02\"\x92\x01\n\tGcpConfig\x12\x46\n\raccess_config\x18\x03 \x01(\x0b\x32*.google.cloud.managedkafka.v1.AccessConfigB\x03\xe0\x41\x02\x12=\n\x07kms_key\x18\x02 \x01(\tB,\xe0\x41\x01\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"{\n\tTlsConfig\x12\x44\n\x0ctrust_config\x18\x01 \x01(\x0b\x32).google.cloud.managedkafka.v1.TrustConfigB\x03\xe0\x41\x01\x12(\n\x1bssl_principal_mapping_rules\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x0bTrustConfig\x12\x65\n\x0b\x63\x61s_configs\x18\x01 \x03(\x0b\x32K.google.cloud.managedkafka.v1.TrustConfig.CertificateAuthorityServiceConfigB\x03\xe0\x41\x01\x1a]\n!CertificateAuthorityServiceConfig\x12\x38\n\x07\x63\x61_pool\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\"\xd7\x02\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fpartition_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\"\n\x12replication_factor\x18\x03 \x01(\x05\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x46\n\x07\x63onfigs\x18\x04 \x03(\x0b\x32\x30.google.cloud.managedkafka.v1.Topic.ConfigsEntryB\x03\xe0\x41\x01\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n!managedkafka.googleapis.com/Topic\x12Iprojects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}*\x06topics2\x05topic\"\xe1\x01\n\x15\x43onsumerTopicMetadata\x12\\\n\npartitions\x18\x01 \x03(\x0b\x32\x43.google.cloud.managedkafka.v1.ConsumerTopicMetadata.PartitionsEntryB\x03\xe0\x41\x01\x1aj\n\x0fPartitionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerPartitionMetadata:\x02\x38\x01\"G\n\x19\x43onsumerPartitionMetadata\x12\x13\n\x06offset\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x15\n\x08metadata\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x81\x03\n\rConsumerGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x06topics\x18\x02 \x03(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerGroup.TopicsEntryB\x03\xe0\x41\x01\x1a\x62\n\x0bTopicsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.managedkafka.v1.ConsumerTopicMetadata:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n)managedkafka.googleapis.com/ConsumerGroup\x12Zprojects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}*\x0e\x63onsumerGroups2\rconsumerGroup\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x83\x07\n\x0e\x43onnectCluster\x12I\n\ngcp_config\x18\x07 \x01(\x0b\x32..google.cloud.managedkafka.v1.ConnectGcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1d\n\rkafka_cluster\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x05 \x03(\x0b\x32\x38.google.cloud.managedkafka.v1.ConnectCluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x06 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12\x46\n\x05state\x18\x08 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.ConnectCluster.StateB\x03\xe0\x41\x03\x12M\n\x06\x63onfig\x18\t \x03(\x0b\x32\x38.google.cloud.managedkafka.v1.ConnectCluster.ConfigEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:\x9c\x01\xea\x41\x98\x01\n*managedkafka.googleapis.com/ConnectCluster\x12Iprojects/{project}/locations/{location}/connectClusters/{connect_cluster}*\x0f\x63onnectClusters2\x0e\x63onnectClusterB\x11\n\x0fplatform_config\"s\n\x14\x43onnectNetworkConfig\x12\x1b\n\x0eprimary_subnet\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x61\x64\x64itional_subnets\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64ns_domain_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"g\n\x13\x43onnectAccessConfig\x12P\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.managedkafka.v1.ConnectNetworkConfigB\x03\xe0\x41\x02\"\xab\x01\n\x10\x43onnectGcpConfig\x12M\n\raccess_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.managedkafka.v1.ConnectAccessConfigB\x03\xe0\x41\x02\x12H\n\x0csecret_paths\x18\x02 \x03(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xdb\x04\n\tConnector\x12Q\n\x13task_restart_policy\x18\x04 \x01(\x0b\x32-.google.cloud.managedkafka.v1.TaskRetryPolicyB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12J\n\x07\x63onfigs\x18\x02 \x03(\x0b\x32\x34.google.cloud.managedkafka.v1.Connector.ConfigsEntryB\x03\xe0\x41\x01\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.managedkafka.v1.Connector.StateB\x03\xe0\x41\x03\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nUNASSIGNED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0e\n\nRESTARTING\x10\x05\x12\x0b\n\x07STOPPED\x10\x06:\xa4\x01\xea\x41\xa0\x01\n%managedkafka.googleapis.com/Connector\x12`projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}*\nconnectors2\tconnectorB\x10\n\x0erestart_policy\"\x83\x01\n\x0fTaskRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xb8\x02\n\x03\x41\x63l\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12@\n\x0b\x61\x63l_entries\x18\x02 \x03(\x0b\x32&.google.cloud.managedkafka.v1.AclEntryB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rresource_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rresource_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpattern_type\x18\x06 \x01(\tB\x03\xe0\x41\x03:v\xea\x41s\n\x1fmanagedkafka.googleapis.com/Acl\x12\x45projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl}*\x04\x61\x63ls2\x03\x61\x63l\"k\n\x08\x41\x63lEntry\x12\x16\n\tprincipal\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0fpermission_type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\toperation\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04host\x18\x07 \x01(\tB\x03\xe0\x41\x02\x42\xa2\x04\n com.google.cloud.managedkafka.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb\xaa\x02\x1cGoogle.Cloud.ManagedKafka.V1\xca\x02\x1cGoogle\\Cloud\\ManagedKafka\\V1\xea\x02\x1fGoogle::Cloud::ManagedKafka::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -50,6 +50,9 @@ module V1 NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.NetworkConfig").msgclass AccessConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.AccessConfig").msgclass GcpConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.GcpConfig").msgclass + TlsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.TlsConfig").msgclass + TrustConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.TrustConfig").msgclass + TrustConfig::CertificateAuthorityServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.TrustConfig.CertificateAuthorityServiceConfig").msgclass Topic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.Topic").msgclass ConsumerTopicMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.ConsumerTopicMetadata").msgclass ConsumerPartitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.v1.ConsumerPartitionMetadata").msgclass diff --git a/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/resources.rb b/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/resources.rb index 7c28868baa20..1516cbf1df22 100644 --- a/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/resources.rb +++ b/google-cloud-managed_kafka-v1/proto_docs/google/cloud/managedkafka/v1/resources.rb @@ -54,6 +54,9 @@ module V1 # @!attribute [r] satisfies_pzs # @return [::Boolean] # Output only. Reserved for future use. + # @!attribute [rw] tls_config + # @return [::Google::Cloud::ManagedKafka::V1::TlsConfig] + # Optional. TLS configuration for the Kafka cluster. class Cluster include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -163,6 +166,50 @@ class GcpConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # The TLS configuration for the Kafka cluster. + # @!attribute [rw] trust_config + # @return [::Google::Cloud::ManagedKafka::V1::TrustConfig] + # Optional. The configuration of the broker truststore. If specified, clients + # can use mTLS for authentication. + # @!attribute [rw] ssl_principal_mapping_rules + # @return [::String] + # Optional. A list of rules for mapping from SSL principal names to + # short names. These are applied in order by Kafka. + # Refer to the Apache Kafka documentation for `ssl.principal.mapping.rules` + # for the precise formatting details and syntax. + # Example: "RULE:^CN=(.*?),OU=ServiceUsers.*$/$1@example.com/,DEFAULT" + # + # This is a static Kafka broker configuration. Setting or modifying this + # field will trigger a rolling restart of the Kafka brokers to apply + # the change. An empty string means no rules are applied (Kafka default). + class TlsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sources of CA certificates to install in the broker's truststore. + # @!attribute [rw] cas_configs + # @return [::Array<::Google::Cloud::ManagedKafka::V1::TrustConfig::CertificateAuthorityServiceConfig>] + # Optional. Configuration for the Google Certificate Authority Service. + # Maximum 10. + class TrustConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A configuration for the Google Certificate Authority Service. + # @!attribute [rw] ca_pool + # @return [::String] + # Required. The name of the CA pool to pull CA certificates from. + # Structured like: + # projects/\\{project}/locations/\\{location}/caPools/\\{ca_pool}. + # The CA pool does not need to be in the same project or location as the + # Kafka cluster. + class CertificateAuthorityServiceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # A Kafka topic in a given cluster. # @!attribute [rw] name # @return [::String] diff --git a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_paths_test.rb b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_paths_test.rb index a387b24629f6..564791c02b5e 100644 --- a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_paths_test.rb +++ b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_paths_test.rb @@ -53,6 +53,18 @@ def test_acl_path end end + def test_ca_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ca_pool_path project: "value0", location: "value1", ca_pool: "value2" + assert_equal "projects/value0/locations/value1/caPools/value2", path + end + end + def test_cluster_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do From 10fb2a36633a49b4d93ee175a441728ad49a286a Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:07:01 -0700 Subject: [PATCH 187/457] feat(dataplex-v1): Support for semantic search (#30602) --- .../lib/google/cloud/dataplex/v1/catalog_pb.rb | 2 +- .../cloud/dataplex/v1/catalog_service/client.rb | 5 ++++- .../cloud/dataplex/v1/catalog_service/rest/client.rb | 5 ++++- .../proto_docs/google/cloud/dataplex/v1/catalog.rb | 4 ++++ .../cloud/dataplex/v1/catalog_service_rest_test.rb | 11 ++++++----- .../google/cloud/dataplex/v1/catalog_service_test.rb | 12 +++++++----- 6 files changed, 26 insertions(+), 13 deletions(-) diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb index 072ff78998fd..ba4d5944cb12 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb @@ -17,7 +17,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\r\n\nAspectType\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.AspectType.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12N\n\rauthorization\x18\x34 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.AspectType.AuthorizationB\x03\xe0\x41\x05\x12U\n\x11metadata_template\x18\x35 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x02\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a\xa4\x07\n\x10MetadataTemplate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rrecord_fields\x18\x06 \x03(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12Y\n\x0b\x65num_values\x18\x08 \x03(\x0b\x32?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueB\x03\xe0\x41\x01\x12M\n\tmap_items\x18\n \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12O\n\x0b\x61rray_items\x18\x0b \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12\x14\n\x07type_id\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08type_ref\x18\r \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x63onstraints\x18\x32 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x33 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsB\x03\xe0\x41\x01\x1aK\n\tEnumValue\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndeprecated\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0b\x43onstraints\x12\x15\n\x08required\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xad\x01\n\x0b\x41nnotations\x12\x17\n\ndeprecated\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdisplay_order\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bstring_type\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rstring_values\x18\x07 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/AspectType\x12\x41projects/{project}/locations/{location}/aspectTypes/{aspect_type}*\x0b\x61spectTypes2\naspectType\"\xcd\x04\n\nEntryGroup\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/EntryGroup\x12\x41projects/{project}/locations/{location}/entryGroups/{entry_group}*\x0b\x65ntryGroups2\nentryGroup\"\xdc\x06\n\tEntryType\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32/.google.cloud.dataplex.v1.EntryType.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctype_aliases\x18\t \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08platform\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06system\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12H\n\x10required_aspects\x18\x32 \x03(\x0b\x32..google.cloud.dataplex.v1.EntryType.AspectInfo\x12M\n\rauthorization\x18\x33 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.EntryType.AuthorizationB\x03\xe0\x41\x05\x1a\x43\n\nAspectInfo\x12\x35\n\x04type\x18\x01 \x01(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:~\xea\x41{\n!dataplex.googleapis.com/EntryType\x12?projects/{project}/locations/{location}/entryTypes/{entry_type}*\nentryTypes2\tentryType\"\x91\x02\n\x06\x41spect\x12\x18\n\x0b\x61spect_type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x04\x64\x61ta\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x42\n\raspect_source\x18\t \x01(\x0b\x32&.google.cloud.dataplex.v1.AspectSourceB\x03\xe0\x41\x01\"\x86\x01\n\x0c\x41spectSource\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0c\x64\x61ta_version\x18\x0c \x01(\t\"\xc4\x04\n\x05\x45ntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nentry_type\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07\x61spects\x18\t \x03(\x0b\x32,.google.cloud.dataplex.v1.Entry.AspectsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0cparent_entry\x18\n \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12!\n\x14\x66ully_qualified_name\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x65ntry_source\x18\x0f \x01(\x0b\x32%.google.cloud.dataplex.v1.EntrySourceB\x03\xe0\x41\x01\x1aP\n\x0c\x41spectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.Aspect:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Qprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*\x07\x65ntries2\x05\x65ntry\"\xd1\x03\n\x0b\x45ntrySource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0e\n\x06system\x18\x02 \x01(\t\x12\x10\n\x08platform\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.EntrySource.LabelsEntry\x12\x46\n\tancestors\x18\t \x03(\x0b\x32..google.cloud.dataplex.v1.EntrySource.AncestorB\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\x08location\x18\x0c \x01(\tB\x03\xe0\x41\x03\x1a\x30\n\x08\x41ncestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x01\n\x17\x43reateEntryGroupRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x65ntry_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x65ntry_group\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateEntryGroupRequest\x12>\n\x0b\x65ntry_group\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListEntryGroupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListEntryGroupsResponse\x12:\n\x0c\x65ntry_groups\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.EntryGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\"\xc9\x01\n\x16\x43reateEntryTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rentry_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_type\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateEntryTypeRequest\x12<\n\nentry_type\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x16\x44\x65leteEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x15ListEntryTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x16ListEntryTypesResponse\x12\x38\n\x0b\x65ntry_types\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"N\n\x13GetEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\"\xcd\x01\n\x17\x43reateAspectTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x61spect_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61spect_type\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateAspectTypeRequest\x12>\n\x0b\x61spect_type\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListAspectTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListAspectTypesResponse\x12:\n\x0c\x61spect_types\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.AspectType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"\x9c\x01\n\x12\x43reateEntryRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x15\n\x08\x65ntry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\"\xda\x01\n\x12UpdateEntryRequest\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x64\x65lete_missing_aspects\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x12\x44\x65leteEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x96\x01\n\x12ListEntriesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"`\n\x13ListEntriesResponse\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x0fGetEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x12LookupEntryRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x05\x65ntry\x18\x05 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\xbf\x01\n\x14SearchEntriesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\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\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\x86\x02\n\x13SearchEntriesResult\x12\x1b\n\x0flinked_resource\x18\x08 \x01(\tB\x02\x18\x01\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12L\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.SnippetsB\x02\x18\x01\x1aK\n\x08Snippets\x12;\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x02\x18\x01:\x02\x18\x01\"\x99\x01\n\x15SearchEntriesResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.dataplex.v1.SearchEntriesResult\x12\x12\n\ntotal_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x13\n\x0bunreachable\x18\x04 \x03(\t\"\x82\x01\n\nImportItem\x12.\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0b\x61spect_keys\x18\x03 \x03(\t\"\xd1\x01\n\x18\x43reateMetadataJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12@\n\x0cmetadata_job\x18\x02 \x01(\x0b\x32%.google.cloud.dataplex.v1.MetadataJobB\x03\xe0\x41\x02\x12\x1c\n\x0fmetadata_job_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"R\n\x15GetMetadataJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/MetadataJob\"\xb1\x01\n\x17ListMetadataJobsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x18ListMetadataJobsResponse\x12<\n\rmetadata_jobs\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.MetadataJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"U\n\x18\x43\x61ncelMetadataJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/MetadataJob\"\x83\x16\n\x0bMetadataJob\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x05 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.MetadataJob.LabelsEntryB\x03\xe0\x41\x01\x12=\n\x04type\x18\x06 \x01(\x0e\x32*.google.cloud.dataplex.v1.MetadataJob.TypeB\x03\xe0\x41\x02\x12J\n\x0bimport_spec\x18\x64 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.MetadataJob.ImportJobSpecH\x00\x12J\n\x0b\x65xport_spec\x18\x65 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.MetadataJob.ExportJobSpecH\x00\x12T\n\rimport_result\x18\xc8\x01 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.MetadataJob.ImportJobResultB\x03\xe0\x41\x03H\x01\x12T\n\rexport_result\x18\xc9\x01 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.MetadataJob.ExportJobResultB\x03\xe0\x41\x03H\x01\x12\x41\n\x06status\x18\x07 \x01(\x0b\x32,.google.cloud.dataplex.v1.MetadataJob.StatusB\x03\xe0\x41\x03\x1a\xe1\x01\n\x0fImportJobResult\x12\x1c\n\x0f\x64\x65leted_entries\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fupdated_entries\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63reated_entries\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11unchanged_entries\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11recreated_entries\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aL\n\x0f\x45xportJobResult\x12\x1d\n\x10\x65xported_entries\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xb3\x06\n\rImportJobSpec\x12\x1f\n\x12source_storage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12;\n\x12source_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12V\n\x05scope\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScopeB\x03\xe0\x41\x02\x12Z\n\x0f\x65ntry_sync_mode\x18\x03 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncModeB\x03\xe0\x41\x02\x12[\n\x10\x61spect_sync_mode\x18\x04 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncModeB\x03\xe0\x41\x02\x12T\n\tlog_level\x18\x06 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevelB\x03\xe0\x41\x01\x1a\xd4\x01\n\x0eImportJobScope\x12@\n\x0c\x65ntry_groups\x18\x01 \x03(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12>\n\x0b\x65ntry_types\x18\x02 \x03(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12@\n\x0c\x61spect_types\x18\x03 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"J\n\x08SyncMode\x12\x19\n\x15SYNC_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x12\x08\n\x04NONE\x10\x03\":\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x01\x12\x08\n\x04INFO\x10\x02\x1a\xaf\x03\n\rExportJobSpec\x12V\n\x05scope\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.MetadataJob.ExportJobSpec.ExportJobScopeB\x03\xe0\x41\x02\x12\x18\n\x0boutput_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xab\x02\n\x0e\x45xportJobScope\x12\x1a\n\x12organization_level\x18\x01 \x01(\x08\x12\x42\n\x08projects\x18\x02 \x03(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12=\n\x0c\x65ntry_groups\x18\x03 \x03(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12;\n\x0b\x65ntry_types\x18\x04 \x03(\tB&\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12=\n\x0c\x61spect_types\x18\x05 \x03(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\xca\x02\n\x06Status\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.MetadataJob.Status.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63ompletion_percent\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tCANCELING\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x19\n\x15SUCCEEDED_WITH_ERRORS\x10\x07\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06IMPORT\x10\x01\x12\n\n\x06\x45XPORT\x10\x02:l\xea\x41i\n#dataplex.googleapis.com/MetadataJob\x12\x42projects/{project}/locations/{location}/metadataJobs/{metadataJob}B\x06\n\x04specB\x08\n\x06result*Q\n\tEntryView\x12\x1a\n\x16\x45NTRY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x12\x07\n\x03\x41LL\x10\x04*p\n\x0eTransferStatus\x12\x1f\n\x1bTRANSFER_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n\x18TRANSFER_STATUS_MIGRATED\x10\x01\x12\x1f\n\x1bTRANSFER_STATUS_TRANSFERRED\x10\x02\x32\x95)\n\x0e\x43\x61talogService\x12\xea\x01\n\x0f\x43reateEntryType\x12\x30.google.cloud.dataplex.v1.CreateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x1fparent,entry_type,entry_type_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/entryTypes:\nentry_type\x12\xec\x01\n\x0fUpdateEntryType\x12\x30.google.cloud.dataplex.v1.UpdateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x16\x65ntry_type,update_mask\x82\xd3\xe4\x93\x02G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}:\nentry_type\x12\xce\x01\n\x0f\x44\x65leteEntryType\x12\x30.google.cloud.dataplex.v1.DeleteEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xb4\x01\n\x0eListEntryTypes\x12/.google.cloud.dataplex.v1.ListEntryTypesRequest\x1a\x30.google.cloud.dataplex.v1.ListEntryTypesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/entryTypes\x12\xa1\x01\n\x0cGetEntryType\x12-.google.cloud.dataplex.v1.GetEntryTypeRequest\x1a#.google.cloud.dataplex.v1.EntryType\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xf1\x01\n\x10\x43reateAspectType\x12\x31.google.cloud.dataplex.v1.CreateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41!parent,aspect_type,aspect_type_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/aspectTypes:\x0b\x61spect_type\x12\xf3\x01\n\x10UpdateAspectType\x12\x31.google.cloud.dataplex.v1.UpdateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41\x17\x61spect_type,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}:\x0b\x61spect_type\x12\xd1\x01\n\x10\x44\x65leteAspectType\x12\x31.google.cloud.dataplex.v1.DeleteAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xb8\x01\n\x0fListAspectTypes\x12\x30.google.cloud.dataplex.v1.ListAspectTypesRequest\x1a\x31.google.cloud.dataplex.v1.ListAspectTypesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/aspectTypes\x12\xa5\x01\n\rGetAspectType\x12..google.cloud.dataplex.v1.GetAspectTypeRequest\x1a$.google.cloud.dataplex.v1.AspectType\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xf1\x01\n\x10\x43reateEntryGroup\x12\x31.google.cloud.dataplex.v1.CreateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41!parent,entry_group,entry_group_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/entryGroups:\x0b\x65ntry_group\x12\xf3\x01\n\x10UpdateEntryGroup\x12\x31.google.cloud.dataplex.v1.UpdateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41\x17\x65ntry_group,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}:\x0b\x65ntry_group\x12\xd1\x01\n\x10\x44\x65leteEntryGroup\x12\x31.google.cloud.dataplex.v1.DeleteEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xb8\x01\n\x0fListEntryGroups\x12\x30.google.cloud.dataplex.v1.ListEntryGroupsRequest\x1a\x31.google.cloud.dataplex.v1.ListEntryGroupsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/entryGroups\x12\xa5\x01\n\rGetEntryGroup\x12..google.cloud.dataplex.v1.GetEntryGroupRequest\x1a$.google.cloud.dataplex.v1.EntryGroup\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xbe\x01\n\x0b\x43reateEntry\x12,.google.cloud.dataplex.v1.CreateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"`\xda\x41\x15parent,entry,entry_id\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:\x05\x65ntry\x12\xc1\x01\n\x0bUpdateEntry\x12,.google.cloud.dataplex.v1.UpdateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"c\xda\x41\x11\x65ntry,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:\x05\x65ntry\x12\xa7\x01\n\x0b\x44\x65leteEntry\x12,.google.cloud.dataplex.v1.DeleteEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\xb6\x01\n\x0bListEntries\x12,.google.cloud.dataplex.v1.ListEntriesRequest\x1a-.google.cloud.dataplex.v1.ListEntriesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/entryGroups/*}/entries\x12\xa1\x01\n\x08GetEntry\x12).google.cloud.dataplex.v1.GetEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\x93\x01\n\x0bLookupEntry\x12,.google.cloud.dataplex.v1.LookupEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*}:lookupEntry\x12\xb6\x01\n\rSearchEntries\x12..google.cloud.dataplex.v1.SearchEntriesRequest\x1a/.google.cloud.dataplex.v1.SearchEntriesResponse\"D\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x31\"//v1/{name=projects/*/locations/*}:searchEntries\x12\xf8\x01\n\x11\x43reateMetadataJob\x12\x32.google.cloud.dataplex.v1.CreateMetadataJobRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0bMetadataJob\x12\x11OperationMetadata\xda\x41#parent,metadata_job,metadata_job_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/metadataJobs:\x0cmetadata_job\x12\xa9\x01\n\x0eGetMetadataJob\x12/.google.cloud.dataplex.v1.GetMetadataJobRequest\x1a%.google.cloud.dataplex.v1.MetadataJob\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/metadataJobs/*}\x12\xbc\x01\n\x10ListMetadataJobs\x12\x31.google.cloud.dataplex.v1.ListMetadataJobsRequest\x1a\x32.google.cloud.dataplex.v1.ListMetadataJobsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/metadataJobs\x12\xaa\x01\n\x11\x43\x61ncelMetadataJob\x12\x32.google.cloud.dataplex.v1.CancelMetadataJobRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel:\x01*\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43\x61talogProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xaa\x02\x18Google.Cloud.Dataplex.V1\xca\x02\x18Google\\Cloud\\Dataplex\\V1\xea\x02\x1bGoogle::Cloud::Dataplex::V1b\x06proto3" +descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\r\n\nAspectType\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.AspectType.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12N\n\rauthorization\x18\x34 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.AspectType.AuthorizationB\x03\xe0\x41\x05\x12U\n\x11metadata_template\x18\x35 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x02\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a\xa4\x07\n\x10MetadataTemplate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rrecord_fields\x18\x06 \x03(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12Y\n\x0b\x65num_values\x18\x08 \x03(\x0b\x32?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueB\x03\xe0\x41\x01\x12M\n\tmap_items\x18\n \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12O\n\x0b\x61rray_items\x18\x0b \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12\x14\n\x07type_id\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08type_ref\x18\r \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x63onstraints\x18\x32 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x33 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsB\x03\xe0\x41\x01\x1aK\n\tEnumValue\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndeprecated\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0b\x43onstraints\x12\x15\n\x08required\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xad\x01\n\x0b\x41nnotations\x12\x17\n\ndeprecated\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdisplay_order\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bstring_type\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rstring_values\x18\x07 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/AspectType\x12\x41projects/{project}/locations/{location}/aspectTypes/{aspect_type}*\x0b\x61spectTypes2\naspectType\"\xcd\x04\n\nEntryGroup\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/EntryGroup\x12\x41projects/{project}/locations/{location}/entryGroups/{entry_group}*\x0b\x65ntryGroups2\nentryGroup\"\xdc\x06\n\tEntryType\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32/.google.cloud.dataplex.v1.EntryType.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctype_aliases\x18\t \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08platform\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06system\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12H\n\x10required_aspects\x18\x32 \x03(\x0b\x32..google.cloud.dataplex.v1.EntryType.AspectInfo\x12M\n\rauthorization\x18\x33 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.EntryType.AuthorizationB\x03\xe0\x41\x05\x1a\x43\n\nAspectInfo\x12\x35\n\x04type\x18\x01 \x01(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:~\xea\x41{\n!dataplex.googleapis.com/EntryType\x12?projects/{project}/locations/{location}/entryTypes/{entry_type}*\nentryTypes2\tentryType\"\x91\x02\n\x06\x41spect\x12\x18\n\x0b\x61spect_type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x04\x64\x61ta\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x42\n\raspect_source\x18\t \x01(\x0b\x32&.google.cloud.dataplex.v1.AspectSourceB\x03\xe0\x41\x01\"\x86\x01\n\x0c\x41spectSource\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0c\x64\x61ta_version\x18\x0c \x01(\t\"\xc4\x04\n\x05\x45ntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nentry_type\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07\x61spects\x18\t \x03(\x0b\x32,.google.cloud.dataplex.v1.Entry.AspectsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0cparent_entry\x18\n \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12!\n\x14\x66ully_qualified_name\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x65ntry_source\x18\x0f \x01(\x0b\x32%.google.cloud.dataplex.v1.EntrySourceB\x03\xe0\x41\x01\x1aP\n\x0c\x41spectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.Aspect:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Qprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*\x07\x65ntries2\x05\x65ntry\"\xd1\x03\n\x0b\x45ntrySource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0e\n\x06system\x18\x02 \x01(\t\x12\x10\n\x08platform\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.EntrySource.LabelsEntry\x12\x46\n\tancestors\x18\t \x03(\x0b\x32..google.cloud.dataplex.v1.EntrySource.AncestorB\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\x08location\x18\x0c \x01(\tB\x03\xe0\x41\x03\x1a\x30\n\x08\x41ncestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x01\n\x17\x43reateEntryGroupRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x65ntry_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x65ntry_group\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateEntryGroupRequest\x12>\n\x0b\x65ntry_group\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListEntryGroupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListEntryGroupsResponse\x12:\n\x0c\x65ntry_groups\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.EntryGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\"\xc9\x01\n\x16\x43reateEntryTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rentry_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_type\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateEntryTypeRequest\x12<\n\nentry_type\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x16\x44\x65leteEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x15ListEntryTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x16ListEntryTypesResponse\x12\x38\n\x0b\x65ntry_types\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"N\n\x13GetEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\"\xcd\x01\n\x17\x43reateAspectTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x61spect_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61spect_type\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateAspectTypeRequest\x12>\n\x0b\x61spect_type\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListAspectTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListAspectTypesResponse\x12:\n\x0c\x61spect_types\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.AspectType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"\x9c\x01\n\x12\x43reateEntryRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x15\n\x08\x65ntry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\"\xda\x01\n\x12UpdateEntryRequest\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x64\x65lete_missing_aspects\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x12\x44\x65leteEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x96\x01\n\x12ListEntriesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"`\n\x13ListEntriesResponse\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x0fGetEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x12LookupEntryRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x05\x65ntry\x18\x05 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\xdd\x01\n\x14SearchEntriesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\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\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsemantic_search\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\"\x86\x02\n\x13SearchEntriesResult\x12\x1b\n\x0flinked_resource\x18\x08 \x01(\tB\x02\x18\x01\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12L\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.SnippetsB\x02\x18\x01\x1aK\n\x08Snippets\x12;\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x02\x18\x01:\x02\x18\x01\"\x99\x01\n\x15SearchEntriesResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.dataplex.v1.SearchEntriesResult\x12\x12\n\ntotal_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x13\n\x0bunreachable\x18\x04 \x03(\t\"\x82\x01\n\nImportItem\x12.\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0b\x61spect_keys\x18\x03 \x03(\t\"\xd1\x01\n\x18\x43reateMetadataJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12@\n\x0cmetadata_job\x18\x02 \x01(\x0b\x32%.google.cloud.dataplex.v1.MetadataJobB\x03\xe0\x41\x02\x12\x1c\n\x0fmetadata_job_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"R\n\x15GetMetadataJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/MetadataJob\"\xb1\x01\n\x17ListMetadataJobsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x18ListMetadataJobsResponse\x12<\n\rmetadata_jobs\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.MetadataJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"U\n\x18\x43\x61ncelMetadataJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/MetadataJob\"\x83\x16\n\x0bMetadataJob\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x05 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.MetadataJob.LabelsEntryB\x03\xe0\x41\x01\x12=\n\x04type\x18\x06 \x01(\x0e\x32*.google.cloud.dataplex.v1.MetadataJob.TypeB\x03\xe0\x41\x02\x12J\n\x0bimport_spec\x18\x64 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.MetadataJob.ImportJobSpecH\x00\x12J\n\x0b\x65xport_spec\x18\x65 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.MetadataJob.ExportJobSpecH\x00\x12T\n\rimport_result\x18\xc8\x01 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.MetadataJob.ImportJobResultB\x03\xe0\x41\x03H\x01\x12T\n\rexport_result\x18\xc9\x01 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.MetadataJob.ExportJobResultB\x03\xe0\x41\x03H\x01\x12\x41\n\x06status\x18\x07 \x01(\x0b\x32,.google.cloud.dataplex.v1.MetadataJob.StatusB\x03\xe0\x41\x03\x1a\xe1\x01\n\x0fImportJobResult\x12\x1c\n\x0f\x64\x65leted_entries\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fupdated_entries\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63reated_entries\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11unchanged_entries\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11recreated_entries\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aL\n\x0f\x45xportJobResult\x12\x1d\n\x10\x65xported_entries\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xb3\x06\n\rImportJobSpec\x12\x1f\n\x12source_storage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12;\n\x12source_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12V\n\x05scope\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScopeB\x03\xe0\x41\x02\x12Z\n\x0f\x65ntry_sync_mode\x18\x03 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncModeB\x03\xe0\x41\x02\x12[\n\x10\x61spect_sync_mode\x18\x04 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncModeB\x03\xe0\x41\x02\x12T\n\tlog_level\x18\x06 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevelB\x03\xe0\x41\x01\x1a\xd4\x01\n\x0eImportJobScope\x12@\n\x0c\x65ntry_groups\x18\x01 \x03(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12>\n\x0b\x65ntry_types\x18\x02 \x03(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12@\n\x0c\x61spect_types\x18\x03 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"J\n\x08SyncMode\x12\x19\n\x15SYNC_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x12\x08\n\x04NONE\x10\x03\":\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x01\x12\x08\n\x04INFO\x10\x02\x1a\xaf\x03\n\rExportJobSpec\x12V\n\x05scope\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.MetadataJob.ExportJobSpec.ExportJobScopeB\x03\xe0\x41\x02\x12\x18\n\x0boutput_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xab\x02\n\x0e\x45xportJobScope\x12\x1a\n\x12organization_level\x18\x01 \x01(\x08\x12\x42\n\x08projects\x18\x02 \x03(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12=\n\x0c\x65ntry_groups\x18\x03 \x03(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12;\n\x0b\x65ntry_types\x18\x04 \x03(\tB&\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12=\n\x0c\x61spect_types\x18\x05 \x03(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\xca\x02\n\x06Status\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.MetadataJob.Status.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63ompletion_percent\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tCANCELING\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x19\n\x15SUCCEEDED_WITH_ERRORS\x10\x07\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06IMPORT\x10\x01\x12\n\n\x06\x45XPORT\x10\x02:l\xea\x41i\n#dataplex.googleapis.com/MetadataJob\x12\x42projects/{project}/locations/{location}/metadataJobs/{metadataJob}B\x06\n\x04specB\x08\n\x06result*Q\n\tEntryView\x12\x1a\n\x16\x45NTRY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x12\x07\n\x03\x41LL\x10\x04*p\n\x0eTransferStatus\x12\x1f\n\x1bTRANSFER_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n\x18TRANSFER_STATUS_MIGRATED\x10\x01\x12\x1f\n\x1bTRANSFER_STATUS_TRANSFERRED\x10\x02\x32\x95)\n\x0e\x43\x61talogService\x12\xea\x01\n\x0f\x43reateEntryType\x12\x30.google.cloud.dataplex.v1.CreateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x1fparent,entry_type,entry_type_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/entryTypes:\nentry_type\x12\xec\x01\n\x0fUpdateEntryType\x12\x30.google.cloud.dataplex.v1.UpdateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x16\x65ntry_type,update_mask\x82\xd3\xe4\x93\x02G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}:\nentry_type\x12\xce\x01\n\x0f\x44\x65leteEntryType\x12\x30.google.cloud.dataplex.v1.DeleteEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xb4\x01\n\x0eListEntryTypes\x12/.google.cloud.dataplex.v1.ListEntryTypesRequest\x1a\x30.google.cloud.dataplex.v1.ListEntryTypesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/entryTypes\x12\xa1\x01\n\x0cGetEntryType\x12-.google.cloud.dataplex.v1.GetEntryTypeRequest\x1a#.google.cloud.dataplex.v1.EntryType\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xf1\x01\n\x10\x43reateAspectType\x12\x31.google.cloud.dataplex.v1.CreateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41!parent,aspect_type,aspect_type_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/aspectTypes:\x0b\x61spect_type\x12\xf3\x01\n\x10UpdateAspectType\x12\x31.google.cloud.dataplex.v1.UpdateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41\x17\x61spect_type,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}:\x0b\x61spect_type\x12\xd1\x01\n\x10\x44\x65leteAspectType\x12\x31.google.cloud.dataplex.v1.DeleteAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xb8\x01\n\x0fListAspectTypes\x12\x30.google.cloud.dataplex.v1.ListAspectTypesRequest\x1a\x31.google.cloud.dataplex.v1.ListAspectTypesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/aspectTypes\x12\xa5\x01\n\rGetAspectType\x12..google.cloud.dataplex.v1.GetAspectTypeRequest\x1a$.google.cloud.dataplex.v1.AspectType\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xf1\x01\n\x10\x43reateEntryGroup\x12\x31.google.cloud.dataplex.v1.CreateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41!parent,entry_group,entry_group_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/entryGroups:\x0b\x65ntry_group\x12\xf3\x01\n\x10UpdateEntryGroup\x12\x31.google.cloud.dataplex.v1.UpdateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41\x17\x65ntry_group,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}:\x0b\x65ntry_group\x12\xd1\x01\n\x10\x44\x65leteEntryGroup\x12\x31.google.cloud.dataplex.v1.DeleteEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xb8\x01\n\x0fListEntryGroups\x12\x30.google.cloud.dataplex.v1.ListEntryGroupsRequest\x1a\x31.google.cloud.dataplex.v1.ListEntryGroupsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/entryGroups\x12\xa5\x01\n\rGetEntryGroup\x12..google.cloud.dataplex.v1.GetEntryGroupRequest\x1a$.google.cloud.dataplex.v1.EntryGroup\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xbe\x01\n\x0b\x43reateEntry\x12,.google.cloud.dataplex.v1.CreateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"`\xda\x41\x15parent,entry,entry_id\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:\x05\x65ntry\x12\xc1\x01\n\x0bUpdateEntry\x12,.google.cloud.dataplex.v1.UpdateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"c\xda\x41\x11\x65ntry,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:\x05\x65ntry\x12\xa7\x01\n\x0b\x44\x65leteEntry\x12,.google.cloud.dataplex.v1.DeleteEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\xb6\x01\n\x0bListEntries\x12,.google.cloud.dataplex.v1.ListEntriesRequest\x1a-.google.cloud.dataplex.v1.ListEntriesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/entryGroups/*}/entries\x12\xa1\x01\n\x08GetEntry\x12).google.cloud.dataplex.v1.GetEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\x93\x01\n\x0bLookupEntry\x12,.google.cloud.dataplex.v1.LookupEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*}:lookupEntry\x12\xb6\x01\n\rSearchEntries\x12..google.cloud.dataplex.v1.SearchEntriesRequest\x1a/.google.cloud.dataplex.v1.SearchEntriesResponse\"D\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x31\"//v1/{name=projects/*/locations/*}:searchEntries\x12\xf8\x01\n\x11\x43reateMetadataJob\x12\x32.google.cloud.dataplex.v1.CreateMetadataJobRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0bMetadataJob\x12\x11OperationMetadata\xda\x41#parent,metadata_job,metadata_job_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/metadataJobs:\x0cmetadata_job\x12\xa9\x01\n\x0eGetMetadataJob\x12/.google.cloud.dataplex.v1.GetMetadataJobRequest\x1a%.google.cloud.dataplex.v1.MetadataJob\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/metadataJobs/*}\x12\xbc\x01\n\x10ListMetadataJobs\x12\x31.google.cloud.dataplex.v1.ListMetadataJobsRequest\x1a\x32.google.cloud.dataplex.v1.ListMetadataJobsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/metadataJobs\x12\xaa\x01\n\x11\x43\x61ncelMetadataJob\x12\x32.google.cloud.dataplex.v1.CancelMetadataJobRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel:\x01*\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43\x61talogProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xaa\x02\x18Google.Cloud.Dataplex.V1\xca\x02\x18Google\\Cloud\\Dataplex\\V1\xea\x02\x1bGoogle::Cloud::Dataplex::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb index 0a386a7613a4..98dccc0742d1 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb @@ -2447,7 +2447,7 @@ def lookup_entry request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) + # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil, semantic_search: nil) # Pass arguments to `search_entries` 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). @@ -2478,6 +2478,9 @@ def lookup_entry request, options = nil # either be `organizations/` or `projects/`. If it is # unspecified, it defaults to the organization where the project provided in # `name` is located. + # @param semantic_search [::Boolean] + # Optional. Specifies whether the search should understand the meaning and + # intent behind the query, rather than just matching keywords. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb index 2c7a77fcf32f..018af7eb9afc 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb @@ -2295,7 +2295,7 @@ def lookup_entry request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) + # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil, semantic_search: nil) # Pass arguments to `search_entries` 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). @@ -2326,6 +2326,9 @@ def lookup_entry request, options = nil # either be `organizations/` or `projects/`. If it is # unspecified, it defaults to the organization where the project provided in # `name` is located. + # @param semantic_search [::Boolean] + # Optional. Specifies whether the search should understand the meaning and + # intent behind the query, rather than just matching keywords. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb index 221c3d34eb53..e55272de8482 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb @@ -1078,6 +1078,10 @@ class LookupEntryRequest # either be `organizations/` or `projects/`. If it is # unspecified, it defaults to the organization where the project provided in # `name` is located. + # @!attribute [rw] semantic_search + # @return [::Boolean] + # Optional. Specifies whether the search should understand the meaning and + # intent behind the query, rather than just matching keywords. class SearchEntriesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb index f827c1ac92b3..46ea1a528d5a 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb @@ -1272,6 +1272,7 @@ def test_search_entries page_token = "hello world" order_by = "hello world" scope = "hello world" + semantic_search = true search_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1287,27 +1288,27 @@ def test_search_entries end # Use hash object - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |_result, response| + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |_result, response| + client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |_result, response| + client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, call_options) do |_result, response| + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), call_options) do |_result, response| + client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb index e08b6e6b5a63..98630d62de2f 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb @@ -1453,6 +1453,7 @@ def test_search_entries page_token = "hello world" order_by = "hello world" scope = "hello world" + semantic_search = true search_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :search_entries, name @@ -1463,6 +1464,7 @@ def test_search_entries assert_equal "hello world", request["page_token"] assert_equal "hello world", request["order_by"] assert_equal "hello world", request["scope"] + assert_equal true, request["semantic_search"] refute_nil options end @@ -1473,35 +1475,35 @@ def test_search_entries end # Use hash object - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |response, operation| + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }) 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.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |response, operation| + client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search 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.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |response, operation| + client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search) 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.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, grpc_options) do |response, operation| + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }, 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.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), grpc_options) do |response, operation| + client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation From 1a0cf2c324eab4c6ce1add8ebcf84bfa0802664b Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:10:06 -0700 Subject: [PATCH 188/457] feat(security-private_ca-v1): Support for user-defined URLs for certificate authorities feat(security-private_ca-v1): Support for backdating certificates feat(security-private_ca-v1): Support for the TBS Certificate digest feat(security-private_ca-v1): Support for the relative distinguished names --- .../.owlbot-manifest.json | 1 + .../certificate_authority_service/client.rb | 5 +- .../rest/client.rb | 5 +- .../security/privateca/v1/resources_pb.rb | 6 +- .../cloud/security/privateca/v1/service_pb.rb | 3 +- .../proto_docs/google/api/field_info.rb | 88 +++++++++ .../cloud/security/privateca/v1/resources.rb | 170 +++++++++++++++--- .../cloud/security/privateca/v1/service.rb | 32 ++-- 8 files changed, 268 insertions(+), 42 deletions(-) create mode 100644 google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb diff --git a/google-cloud-security-private_ca-v1/.owlbot-manifest.json b/google-cloud-security-private_ca-v1/.owlbot-manifest.json index 27ae8014e39d..803faf5a0081 100644 --- a/google-cloud-security-private_ca-v1/.owlbot-manifest.json +++ b/google-cloud-security-private_ca-v1/.owlbot-manifest.json @@ -33,6 +33,7 @@ "proto_docs/README.md", "proto_docs/google/api/client.rb", "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/field_info.rb", "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", "proto_docs/google/cloud/security/privateca/v1/resources.rb", diff --git a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb index 7a8ba03bb2ba..96820dc0b248 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb @@ -266,8 +266,9 @@ def logger # Optional. It must be unique within a location and match the regular # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the Enterprise [CertificateAuthority.Tier][], but is optional and its - # value is ignored otherwise. + # in the Enterprise + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, + # but is optional and its value is ignored otherwise. # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} # with initial field values. diff --git a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb index b2867ed7df51..7c1b77439761 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb @@ -261,8 +261,9 @@ def logger # Optional. It must be unique within a location and match the regular # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the Enterprise [CertificateAuthority.Tier][], but is optional and its - # value is ignored otherwise. + # in the Enterprise + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, + # but is optional and its value is ignored otherwise. # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} # with initial field values. diff --git a/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb index a5369b6a2c6a..6bac8662d5d4 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb @@ -11,7 +11,7 @@ require 'google/type/expr_pb' -descriptor_data = "\n2google/cloud/security/privateca/v1/resources.proto\x12\"google.cloud.security.privateca.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xf5\x0f\n\x14\x43\x65rtificateAuthority\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x04type\x18\x02 \x01(\x0e\x32=.google.cloud.security.privateca.v1.CertificateAuthority.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12M\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.CertificateConfigB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12\x61\n\x08key_spec\x18\x05 \x01(\x0b\x32G.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x12subordinate_config\x18\x06 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.SubordinateConfigB\x03\xe0\x41\x01\x12\x42\n\x04tier\x18\x07 \x01(\x0e\x32/.google.cloud.security.privateca.v1.CaPool.TierB\x03\xe0\x41\x03\x12R\n\x05state\x18\x08 \x01(\x0e\x32>.google.cloud.security.privateca.v1.CertificateAuthority.StateB\x03\xe0\x41\x03\x12 \n\x13pem_ca_certificates\x18\t \x03(\tB\x03\xe0\x41\x03\x12\x64\n\x1b\x63\x61_certificate_descriptions\x18\n \x03(\x0b\x32:.google.cloud.security.privateca.v1.CertificateDescriptionB\x03\xe0\x41\x03\x12\x17\n\ngcs_bucket\x18\x0b \x01(\tB\x03\xe0\x41\x05\x12]\n\x0b\x61\x63\x63\x65ss_urls\x18\x0c \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x11 \x03(\x0b\x32\x44.google.cloud.security.privateca.v1.CertificateAuthority.LabelsEntryB\x03\xe0\x41\x01\x1aH\n\nAccessUrls\x12!\n\x19\x63\x61_certificate_access_url\x18\x01 \x01(\t\x12\x17\n\x0f\x63rl_access_urls\x18\x02 \x03(\t\x1a\xa0\x01\n\x0eKeyVersionSpec\x12\x1f\n\x15\x63loud_kms_key_version\x18\x01 \x01(\tH\x00\x12_\n\talgorithm\x18\x02 \x01(\x0e\x32J.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithmH\x00\x42\x0c\n\nKeyVersion\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSELF_SIGNED\x10\x01\x12\x0f\n\x0bSUBORDINATE\x10\x02\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\n\n\x06STAGED\x10\x03\x12\x1c\n\x18\x41WAITING_USER_ACTIVATION\x10\x04\x12\x0b\n\x07\x44\x45LETED\x10\x05\"\xfc\x01\n\x11SignHashAlgorithm\x12#\n\x1fSIGN_HASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x19\n\x15RSA_PKCS1_2048_SHA256\x10\x06\x12\x19\n\x15RSA_PKCS1_3072_SHA256\x10\x07\x12\x19\n\x15RSA_PKCS1_4096_SHA256\x10\x08\x12\x12\n\x0e\x45\x43_P256_SHA256\x10\x04\x12\x12\n\x0e\x45\x43_P384_SHA384\x10\x05:\x9d\x01\xea\x41\x99\x01\n-privateca.googleapis.com/CertificateAuthority\x12hprojects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}\"\xa1\x10\n\x06\x43\x61Pool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04tier\x18\x02 \x01(\x0e\x32/.google.cloud.security.privateca.v1.CaPool.TierB\x06\xe0\x41\x02\xe0\x41\x05\x12W\n\x0fissuance_policy\x18\x03 \x01(\x0b\x32\x39.google.cloud.security.privateca.v1.CaPool.IssuancePolicyB\x03\xe0\x41\x01\x12]\n\x12publishing_options\x18\x04 \x01(\x0b\x32<.google.cloud.security.privateca.v1.CaPool.PublishingOptionsB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x05 \x03(\x0b\x32\x36.google.cloud.security.privateca.v1.CaPool.LabelsEntryB\x03\xe0\x41\x01\x1a\xfb\x01\n\x11PublishingOptions\x12\x1c\n\x0fpublish_ca_cert\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bpublish_crl\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12i\n\x0f\x65ncoding_format\x18\x03 \x01(\x0e\x32K.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormatB\x03\xe0\x41\x01\"C\n\x0e\x45ncodingFormat\x12\x1f\n\x1b\x45NCODING_FORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03PEM\x10\x01\x12\x07\n\x03\x44\x45R\x10\x02\x1a\xef\t\n\x0eIssuancePolicy\x12h\n\x11\x61llowed_key_types\x18\x01 \x03(\x0b\x32H.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeB\x03\xe0\x41\x01\x12\x38\n\x10maximum_lifetime\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12l\n\x16\x61llowed_issuance_modes\x18\x03 \x01(\x0b\x32G.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesB\x03\xe0\x41\x01\x12P\n\x0f\x62\x61seline_values\x18\x04 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x01\x12\x65\n\x14identity_constraints\x18\x05 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.CertificateIdentityConstraintsB\x03\xe0\x41\x01\x12h\n\x16passthrough_extensions\x18\x06 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateExtensionConstraintsB\x03\xe0\x41\x01\x1a\xc5\x04\n\x0e\x41llowedKeyType\x12\x62\n\x03rsa\x18\x01 \x01(\x0b\x32S.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyTypeH\x00\x12l\n\x0e\x65lliptic_curve\x18\x02 \x01(\x0b\x32R.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyTypeH\x00\x1aJ\n\nRsaKeyType\x12\x1d\n\x10min_modulus_size\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10max_modulus_size\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x1a\x88\x02\n\tEcKeyType\x12\x89\x01\n\x13signature_algorithm\x18\x01 \x01(\x0e\x32g.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithmB\x03\xe0\x41\x01\"o\n\x14\x45\x63SignatureAlgorithm\x12&\n\"EC_SIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x0e\n\nECDSA_P256\x10\x01\x12\x0e\n\nECDSA_P384\x10\x02\x12\x0f\n\x0b\x45\x44\x44SA_25519\x10\x03\x42\n\n\x08key_type\x1a`\n\rIssuanceModes\x12%\n\x18\x61llow_csr_based_issuance\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1b\x61llow_config_based_issuance\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\n\n\x06\x44\x45VOPS\x10\x02:_\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}\"\xbc\x08\n\x19\x43\x65rtificateRevocationList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fsequence_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12s\n\x14revoked_certificates\x18\x03 \x03(\x0b\x32P.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificateB\x03\xe0\x41\x03\x12\x14\n\x07pem_crl\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naccess_url\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12W\n\x05state\x18\x06 \x01(\x0e\x32\x43.google.cloud.security.privateca.v1.CertificateRevocationList.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12^\n\x06labels\x18\n \x03(\x0b\x32I.google.cloud.security.privateca.v1.CertificateRevocationList.LabelsEntryB\x03\xe0\x41\x01\x1a\xc0\x01\n\x12RevokedCertificate\x12>\n\x0b\x63\x65rtificate\x18\x01 \x01(\tB)\xfa\x41&\n$privateca.googleapis.com/Certificate\x12\x19\n\x11hex_serial_number\x18\x02 \x01(\t\x12O\n\x11revocation_reason\x18\x03 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReason\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nSUPERSEDED\x10\x02:\xdc\x01\xea\x41\xd8\x01\n2privateca.googleapis.com/CertificateRevocationList\x12\xa1\x01projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}\"\x8f\n\n\x0b\x43\x65rtificate\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$privateca.googleapis.com/Certificate\x12\x16\n\x07pem_csr\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x12L\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.CertificateConfigB\x03\xe0\x41\x05H\x00\x12[\n\x1cissuer_certificate_authority\x18\x04 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x33\n\x08lifetime\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12R\n\x14\x63\x65rtificate_template\x18\x06 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12Q\n\x0csubject_mode\x18\x07 \x01(\x0e\x32\x36.google.cloud.security.privateca.v1.SubjectRequestModeB\x03\xe0\x41\x05\x12\x62\n\x12revocation_details\x18\x08 \x01(\x0b\x32\x41.google.cloud.security.privateca.v1.Certificate.RevocationDetailsB\x03\xe0\x41\x03\x12\x1c\n\x0fpem_certificate\x18\t \x01(\tB\x03\xe0\x41\x03\x12`\n\x17\x63\x65rtificate_description\x18\n \x01(\x0b\x32:.google.cloud.security.privateca.v1.CertificateDescriptionB\x03\xe0\x41\x03\x12\"\n\x15pem_certificate_chain\x18\x0b \x03(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x0e \x03(\x0b\x32;.google.cloud.security.privateca.v1.Certificate.LabelsEntryB\x03\xe0\x41\x01\x1a\x98\x01\n\x11RevocationDetails\x12N\n\x10revocation_state\x18\x01 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReason\x12\x33\n\x0frevocation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x7f\xea\x41|\n$privateca.googleapis.com/Certificate\x12Tprojects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}B\x14\n\x12\x63\x65rtificate_config\"\xd1\x06\n\x13\x43\x65rtificateTemplate\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12\x38\n\x10maximum_lifetime\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12R\n\x11predefined_values\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x01\x12\x65\n\x14identity_constraints\x18\x03 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.CertificateIdentityConstraintsB\x03\xe0\x41\x01\x12h\n\x16passthrough_extensions\x18\x04 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateExtensionConstraintsB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12X\n\x06labels\x18\x08 \x03(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateTemplate.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x87\x01\xea\x41\x83\x01\n,privateca.googleapis.com/CertificateTemplate\x12Sprojects/{project}/locations/{location}/certificateTemplates/{certificate_template}\"\xce\x06\n\x0eX509Parameters\x12\x44\n\tkey_usage\x18\x01 \x01(\x0b\x32,.google.cloud.security.privateca.v1.KeyUsageB\x03\xe0\x41\x01\x12U\n\nca_options\x18\x02 \x01(\x0b\x32<.google.cloud.security.privateca.v1.X509Parameters.CaOptionsB\x03\xe0\x41\x01\x12\x45\n\npolicy_ids\x18\x03 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x01\x12\x1d\n\x10\x61ia_ocsp_servers\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x10name_constraints\x18\x06 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.X509Parameters.NameConstraintsB\x03\xe0\x41\x01\x12U\n\x15\x61\x64\x64itional_extensions\x18\x05 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1.X509ExtensionB\x03\xe0\x41\x01\x1as\n\tCaOptions\x12\x17\n\x05is_ca\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12(\n\x16max_issuer_path_length\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x08\n\x06_is_caB\x19\n\x17_max_issuer_path_length\x1a\x89\x02\n\x0fNameConstraints\x12\x10\n\x08\x63ritical\x18\x01 \x01(\x08\x12\x1b\n\x13permitted_dns_names\x18\x02 \x03(\t\x12\x1a\n\x12\x65xcluded_dns_names\x18\x03 \x03(\t\x12\x1b\n\x13permitted_ip_ranges\x18\x04 \x03(\t\x12\x1a\n\x12\x65xcluded_ip_ranges\x18\x05 \x03(\t\x12!\n\x19permitted_email_addresses\x18\x06 \x03(\t\x12 \n\x18\x65xcluded_email_addresses\x18\x07 \x03(\t\x12\x16\n\x0epermitted_uris\x18\x08 \x03(\t\x12\x15\n\rexcluded_uris\x18\t \x03(\t\"\xa9\x02\n\x11SubordinateConfig\x12V\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthorityH\x00\x12m\n\x10pem_issuer_chain\x18\x02 \x01(\x0b\x32L.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChainB\x03\xe0\x41\x02H\x00\x1a\x37\n\x16SubordinateConfigChain\x12\x1d\n\x10pem_certificates\x18\x01 \x03(\tB\x03\xe0\x41\x02\x42\x14\n\x12subordinate_config\"\x9d\x01\n\tPublicKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12L\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x37.google.cloud.security.privateca.v1.PublicKey.KeyFormatB\x03\xe0\x41\x02\"0\n\tKeyFormat\x12\x1a\n\x16KEY_FORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03PEM\x10\x01\"\xac\x04\n\x11\x43\x65rtificateConfig\x12`\n\x0esubject_config\x18\x01 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfigB\x03\xe0\x41\x02\x12L\n\x0bx509_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x02\x12\x46\n\npublic_key\x18\x03 \x01(\x0b\x32-.google.cloud.security.privateca.v1.PublicKeyB\x03\xe0\x41\x01\x12X\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32;.google.cloud.security.privateca.v1.CertificateConfig.KeyIdB\x03\xe0\x41\x01\x1a\xa6\x01\n\rSubjectConfig\x12\x41\n\x07subject\x18\x01 \x01(\x0b\x32+.google.cloud.security.privateca.v1.SubjectB\x03\xe0\x41\x01\x12R\n\x10subject_alt_name\x18\x02 \x01(\x0b\x32\x33.google.cloud.security.privateca.v1.SubjectAltNamesB\x03\xe0\x41\x01\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xa1\x08\n\x16\x43\x65rtificateDescription\x12j\n\x13subject_description\x18\x01 \x01(\x0b\x32M.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription\x12L\n\x10x509_description\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509Parameters\x12\x41\n\npublic_key\x18\x03 \x01(\x0b\x32-.google.cloud.security.privateca.v1.PublicKey\x12X\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32@.google.cloud.security.privateca.v1.CertificateDescription.KeyId\x12Z\n\x10\x61uthority_key_id\x18\x05 \x01(\x0b\x32@.google.cloud.security.privateca.v1.CertificateDescription.KeyId\x12\x1f\n\x17\x63rl_distribution_points\x18\x06 \x03(\t\x12$\n\x1c\x61ia_issuing_certificate_urls\x18\x07 \x03(\t\x12k\n\x10\x63\x65rt_fingerprint\x18\x08 \x01(\x0b\x32Q.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint\x1a\xd2\x02\n\x12SubjectDescription\x12<\n\x07subject\x18\x01 \x01(\x0b\x32+.google.cloud.security.privateca.v1.Subject\x12M\n\x10subject_alt_name\x18\x02 \x01(\x0b\x32\x33.google.cloud.security.privateca.v1.SubjectAltNames\x12\x19\n\x11hex_serial_number\x18\x03 \x01(\t\x12+\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\x0fnot_before_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0enot_after_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x16\x43\x65rtificateFingerprint\x12\x13\n\x0bsha256_hash\x18\x01 \x01(\t\"\'\n\x08ObjectId\x12\x1b\n\x0eobject_id_path\x18\x01 \x03(\x05\x42\x03\xe0\x41\x02\"\x80\x01\n\rX509Extension\x12\x44\n\tobject_id\x18\x01 \x01(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x02\x12\x15\n\x08\x63ritical\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02\"\xa2\x05\n\x08KeyUsage\x12T\n\x0e\x62\x61se_key_usage\x18\x01 \x01(\x0b\x32<.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions\x12`\n\x12\x65xtended_key_usage\x18\x02 \x01(\x0b\x32\x44.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions\x12Q\n\x1bunknown_extended_key_usages\x18\x03 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectId\x1a\xe7\x01\n\x0fKeyUsageOptions\x12\x19\n\x11\x64igital_signature\x18\x01 \x01(\x08\x12\x1a\n\x12\x63ontent_commitment\x18\x02 \x01(\x08\x12\x18\n\x10key_encipherment\x18\x03 \x01(\x08\x12\x19\n\x11\x64\x61ta_encipherment\x18\x04 \x01(\x08\x12\x15\n\rkey_agreement\x18\x05 \x01(\x08\x12\x11\n\tcert_sign\x18\x06 \x01(\x08\x12\x10\n\x08\x63rl_sign\x18\x07 \x01(\x08\x12\x15\n\rencipher_only\x18\x08 \x01(\x08\x12\x15\n\rdecipher_only\x18\t \x01(\x08\x1a\xa0\x01\n\x17\x45xtendedKeyUsageOptions\x12\x13\n\x0bserver_auth\x18\x01 \x01(\x08\x12\x13\n\x0b\x63lient_auth\x18\x02 \x01(\x08\x12\x14\n\x0c\x63ode_signing\x18\x03 \x01(\x08\x12\x18\n\x10\x65mail_protection\x18\x04 \x01(\x08\x12\x15\n\rtime_stamping\x18\x05 \x01(\x08\x12\x14\n\x0cocsp_signing\x18\x06 \x01(\x08\"\xb8\x01\n\x07Subject\x12\x13\n\x0b\x63ommon_name\x18\x01 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x02 \x01(\t\x12\x14\n\x0corganization\x18\x03 \x01(\t\x12\x1b\n\x13organizational_unit\x18\x04 \x01(\t\x12\x10\n\x08locality\x18\x05 \x01(\t\x12\x10\n\x08province\x18\x06 \x01(\t\x12\x16\n\x0estreet_address\x18\x07 \x01(\t\x12\x13\n\x0bpostal_code\x18\x08 \x01(\t\"\xa9\x01\n\x0fSubjectAltNames\x12\x11\n\tdns_names\x18\x01 \x03(\t\x12\x0c\n\x04uris\x18\x02 \x03(\t\x12\x17\n\x0f\x65mail_addresses\x18\x03 \x03(\t\x12\x14\n\x0cip_addresses\x18\x04 \x03(\t\x12\x46\n\x0b\x63ustom_sans\x18\x05 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1.X509Extension\"\xfa\x01\n\x1e\x43\x65rtificateIdentityConstraints\x12.\n\x0e\x63\x65l_expression\x18\x01 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12+\n\x19\x61llow_subject_passthrough\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x35\n#allow_subject_alt_names_passthrough\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x1c\n\x1a_allow_subject_passthroughB&\n$_allow_subject_alt_names_passthrough\"\xb4\x03\n\x1f\x43\x65rtificateExtensionConstraints\x12|\n\x10known_extensions\x18\x01 \x03(\x0e\x32].google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtensionB\x03\xe0\x41\x01\x12P\n\x15\x61\x64\x64itional_extensions\x18\x02 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x01\"\xc0\x01\n\x19KnownCertificateExtension\x12+\n\'KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41SE_KEY_USAGE\x10\x01\x12\x16\n\x12\x45XTENDED_KEY_USAGE\x10\x02\x12\x0e\n\nCA_OPTIONS\x10\x03\x12\x0e\n\nPOLICY_IDS\x10\x04\x12\x14\n\x10\x41IA_OCSP_SERVERS\x10\x05\x12\x14\n\x10NAME_CONSTRAINTS\x10\x06*\x87\x02\n\x10RevocationReason\x12!\n\x1dREVOCATION_REASON_UNSPECIFIED\x10\x00\x12\x12\n\x0eKEY_COMPROMISE\x10\x01\x12$\n CERTIFICATE_AUTHORITY_COMPROMISE\x10\x02\x12\x17\n\x13\x41\x46\x46ILIATION_CHANGED\x10\x03\x12\x0e\n\nSUPERSEDED\x10\x04\x12\x1a\n\x16\x43\x45SSATION_OF_OPERATION\x10\x05\x12\x14\n\x10\x43\x45RTIFICATE_HOLD\x10\x06\x12\x17\n\x13PRIVILEGE_WITHDRAWN\x10\x07\x12\"\n\x1e\x41TTRIBUTE_AUTHORITY_COMPROMISE\x10\x08*]\n\x12SubjectRequestMode\x12$\n SUBJECT_REQUEST_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x14\n\x10REFLECTED_SPIFFE\x10\x02\x42\xff\x01\n&com.google.cloud.security.privateca.v1B\x17PrivateCaResourcesProtoP\x01ZDcloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb\xf8\x01\x01\xaa\x02\"Google.Cloud.Security.PrivateCA.V1\xca\x02\"Google\\Cloud\\Security\\PrivateCA\\V1\xea\x02&Google::Cloud::Security::PrivateCA::V1b\x06proto3" +descriptor_data = "\n2google/cloud/security/privateca/v1/resources.proto\x12\"google.cloud.security.privateca.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\x86\x12\n\x14\x43\x65rtificateAuthority\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12S\n\x04type\x18\x02 \x01(\x0e\x32=.google.cloud.security.privateca.v1.CertificateAuthority.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12M\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.CertificateConfigB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12\x61\n\x08key_spec\x18\x05 \x01(\x0b\x32G.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x12subordinate_config\x18\x06 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.SubordinateConfigB\x03\xe0\x41\x01\x12\x42\n\x04tier\x18\x07 \x01(\x0e\x32/.google.cloud.security.privateca.v1.CaPool.TierB\x03\xe0\x41\x03\x12R\n\x05state\x18\x08 \x01(\x0e\x32>.google.cloud.security.privateca.v1.CertificateAuthority.StateB\x03\xe0\x41\x03\x12 \n\x13pem_ca_certificates\x18\t \x03(\tB\x03\xe0\x41\x03\x12\x64\n\x1b\x63\x61_certificate_descriptions\x18\n \x03(\x0b\x32:.google.cloud.security.privateca.v1.CertificateDescriptionB\x03\xe0\x41\x03\x12\x17\n\ngcs_bucket\x18\x0b \x01(\tB\x03\xe0\x41\x05\x12]\n\x0b\x61\x63\x63\x65ss_urls\x18\x0c \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x11 \x03(\x0b\x32\x44.google.cloud.security.privateca.v1.CertificateAuthority.LabelsEntryB\x03\xe0\x41\x01\x12u\n\x18user_defined_access_urls\x18\x12 \x01(\x0b\x32N.google.cloud.security.privateca.v1.CertificateAuthority.UserDefinedAccessUrlsB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1aH\n\nAccessUrls\x12!\n\x19\x63\x61_certificate_access_url\x18\x01 \x01(\t\x12\x17\n\x0f\x63rl_access_urls\x18\x02 \x03(\t\x1a\xa0\x01\n\x0eKeyVersionSpec\x12\x1f\n\x15\x63loud_kms_key_version\x18\x01 \x01(\tH\x00\x12_\n\talgorithm\x18\x02 \x01(\x0e\x32J.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithmH\x00\x42\x0c\n\nKeyVersion\x1a`\n\x15UserDefinedAccessUrls\x12)\n\x1c\x61ia_issuing_certificate_urls\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63rl_access_urls\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSELF_SIGNED\x10\x01\x12\x0f\n\x0bSUBORDINATE\x10\x02\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\n\n\x06STAGED\x10\x03\x12\x1c\n\x18\x41WAITING_USER_ACTIVATION\x10\x04\x12\x0b\n\x07\x44\x45LETED\x10\x05\"\xfc\x01\n\x11SignHashAlgorithm\x12#\n\x1fSIGN_HASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x19\n\x15RSA_PKCS1_2048_SHA256\x10\x06\x12\x19\n\x15RSA_PKCS1_3072_SHA256\x10\x07\x12\x19\n\x15RSA_PKCS1_4096_SHA256\x10\x08\x12\x12\n\x0e\x45\x43_P256_SHA256\x10\x04\x12\x12\n\x0e\x45\x43_P384_SHA384\x10\x05:\x9d\x01\xea\x41\x99\x01\n-privateca.googleapis.com/CertificateAuthority\x12hprojects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}\"\xdc\x10\n\x06\x43\x61Pool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x04tier\x18\x02 \x01(\x0e\x32/.google.cloud.security.privateca.v1.CaPool.TierB\x06\xe0\x41\x02\xe0\x41\x05\x12W\n\x0fissuance_policy\x18\x03 \x01(\x0b\x32\x39.google.cloud.security.privateca.v1.CaPool.IssuancePolicyB\x03\xe0\x41\x01\x12]\n\x12publishing_options\x18\x04 \x01(\x0b\x32<.google.cloud.security.privateca.v1.CaPool.PublishingOptionsB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x05 \x03(\x0b\x32\x36.google.cloud.security.privateca.v1.CaPool.LabelsEntryB\x03\xe0\x41\x01\x1a\xfb\x01\n\x11PublishingOptions\x12\x1c\n\x0fpublish_ca_cert\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bpublish_crl\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12i\n\x0f\x65ncoding_format\x18\x03 \x01(\x0e\x32K.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormatB\x03\xe0\x41\x01\"C\n\x0e\x45ncodingFormat\x12\x1f\n\x1b\x45NCODING_FORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03PEM\x10\x01\x12\x07\n\x03\x44\x45R\x10\x02\x1a\xaa\n\n\x0eIssuancePolicy\x12h\n\x11\x61llowed_key_types\x18\x01 \x03(\x0b\x32H.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeB\x03\xe0\x41\x01\x12\x39\n\x11\x62\x61\x63kdate_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x38\n\x10maximum_lifetime\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12l\n\x16\x61llowed_issuance_modes\x18\x03 \x01(\x0b\x32G.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesB\x03\xe0\x41\x01\x12P\n\x0f\x62\x61seline_values\x18\x04 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x01\x12\x65\n\x14identity_constraints\x18\x05 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.CertificateIdentityConstraintsB\x03\xe0\x41\x01\x12h\n\x16passthrough_extensions\x18\x06 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateExtensionConstraintsB\x03\xe0\x41\x01\x1a\xc5\x04\n\x0e\x41llowedKeyType\x12\x62\n\x03rsa\x18\x01 \x01(\x0b\x32S.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyTypeH\x00\x12l\n\x0e\x65lliptic_curve\x18\x02 \x01(\x0b\x32R.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyTypeH\x00\x1aJ\n\nRsaKeyType\x12\x1d\n\x10min_modulus_size\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10max_modulus_size\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x1a\x88\x02\n\tEcKeyType\x12\x89\x01\n\x13signature_algorithm\x18\x01 \x01(\x0e\x32g.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithmB\x03\xe0\x41\x01\"o\n\x14\x45\x63SignatureAlgorithm\x12&\n\"EC_SIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x0e\n\nECDSA_P256\x10\x01\x12\x0e\n\nECDSA_P384\x10\x02\x12\x0f\n\x0b\x45\x44\x44SA_25519\x10\x03\x42\n\n\x08key_type\x1a`\n\rIssuanceModes\x12%\n\x18\x61llow_csr_based_issuance\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1b\x61llow_config_based_issuance\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\n\n\x06\x44\x45VOPS\x10\x02:_\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}\"\xbc\x08\n\x19\x43\x65rtificateRevocationList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fsequence_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12s\n\x14revoked_certificates\x18\x03 \x03(\x0b\x32P.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificateB\x03\xe0\x41\x03\x12\x14\n\x07pem_crl\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naccess_url\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12W\n\x05state\x18\x06 \x01(\x0e\x32\x43.google.cloud.security.privateca.v1.CertificateRevocationList.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12^\n\x06labels\x18\n \x03(\x0b\x32I.google.cloud.security.privateca.v1.CertificateRevocationList.LabelsEntryB\x03\xe0\x41\x01\x1a\xc0\x01\n\x12RevokedCertificate\x12>\n\x0b\x63\x65rtificate\x18\x01 \x01(\tB)\xfa\x41&\n$privateca.googleapis.com/Certificate\x12\x19\n\x11hex_serial_number\x18\x02 \x01(\t\x12O\n\x11revocation_reason\x18\x03 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReason\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nSUPERSEDED\x10\x02:\xdc\x01\xea\x41\xd8\x01\n2privateca.googleapis.com/CertificateRevocationList\x12\xa1\x01projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}\"\xe6\t\n\x0b\x43\x65rtificate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x07pem_csr\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x12L\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.CertificateConfigB\x03\xe0\x41\x05H\x00\x12[\n\x1cissuer_certificate_authority\x18\x04 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x33\n\x08lifetime\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12R\n\x14\x63\x65rtificate_template\x18\x06 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12Q\n\x0csubject_mode\x18\x07 \x01(\x0e\x32\x36.google.cloud.security.privateca.v1.SubjectRequestModeB\x03\xe0\x41\x05\x12\x62\n\x12revocation_details\x18\x08 \x01(\x0b\x32\x41.google.cloud.security.privateca.v1.Certificate.RevocationDetailsB\x03\xe0\x41\x03\x12\x1c\n\x0fpem_certificate\x18\t \x01(\tB\x03\xe0\x41\x03\x12`\n\x17\x63\x65rtificate_description\x18\n \x01(\x0b\x32:.google.cloud.security.privateca.v1.CertificateDescriptionB\x03\xe0\x41\x03\x12\"\n\x15pem_certificate_chain\x18\x0b \x03(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x0e \x03(\x0b\x32;.google.cloud.security.privateca.v1.Certificate.LabelsEntryB\x03\xe0\x41\x01\x1a\x98\x01\n\x11RevocationDetails\x12N\n\x10revocation_state\x18\x01 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReason\x12\x33\n\x0frevocation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x7f\xea\x41|\n$privateca.googleapis.com/Certificate\x12Tprojects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}B\x14\n\x12\x63\x65rtificate_config\"\xa0\x06\n\x13\x43\x65rtificateTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x38\n\x10maximum_lifetime\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12R\n\x11predefined_values\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x01\x12\x65\n\x14identity_constraints\x18\x03 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.CertificateIdentityConstraintsB\x03\xe0\x41\x01\x12h\n\x16passthrough_extensions\x18\x04 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateExtensionConstraintsB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12X\n\x06labels\x18\x08 \x03(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateTemplate.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x87\x01\xea\x41\x83\x01\n,privateca.googleapis.com/CertificateTemplate\x12Sprojects/{project}/locations/{location}/certificateTemplates/{certificate_template}\"\xce\x06\n\x0eX509Parameters\x12\x44\n\tkey_usage\x18\x01 \x01(\x0b\x32,.google.cloud.security.privateca.v1.KeyUsageB\x03\xe0\x41\x01\x12U\n\nca_options\x18\x02 \x01(\x0b\x32<.google.cloud.security.privateca.v1.X509Parameters.CaOptionsB\x03\xe0\x41\x01\x12\x45\n\npolicy_ids\x18\x03 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x01\x12\x1d\n\x10\x61ia_ocsp_servers\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x10name_constraints\x18\x06 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.X509Parameters.NameConstraintsB\x03\xe0\x41\x01\x12U\n\x15\x61\x64\x64itional_extensions\x18\x05 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1.X509ExtensionB\x03\xe0\x41\x01\x1as\n\tCaOptions\x12\x17\n\x05is_ca\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12(\n\x16max_issuer_path_length\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x08\n\x06_is_caB\x19\n\x17_max_issuer_path_length\x1a\x89\x02\n\x0fNameConstraints\x12\x10\n\x08\x63ritical\x18\x01 \x01(\x08\x12\x1b\n\x13permitted_dns_names\x18\x02 \x03(\t\x12\x1a\n\x12\x65xcluded_dns_names\x18\x03 \x03(\t\x12\x1b\n\x13permitted_ip_ranges\x18\x04 \x03(\t\x12\x1a\n\x12\x65xcluded_ip_ranges\x18\x05 \x03(\t\x12!\n\x19permitted_email_addresses\x18\x06 \x03(\t\x12 \n\x18\x65xcluded_email_addresses\x18\x07 \x03(\t\x12\x16\n\x0epermitted_uris\x18\x08 \x03(\t\x12\x15\n\rexcluded_uris\x18\t \x03(\t\"\xa9\x02\n\x11SubordinateConfig\x12V\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthorityH\x00\x12m\n\x10pem_issuer_chain\x18\x02 \x01(\x0b\x32L.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChainB\x03\xe0\x41\x02H\x00\x1a\x37\n\x16SubordinateConfigChain\x12\x1d\n\x10pem_certificates\x18\x01 \x03(\tB\x03\xe0\x41\x02\x42\x14\n\x12subordinate_config\"\x9d\x01\n\tPublicKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12L\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x37.google.cloud.security.privateca.v1.PublicKey.KeyFormatB\x03\xe0\x41\x02\"0\n\tKeyFormat\x12\x1a\n\x16KEY_FORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03PEM\x10\x01\"\xac\x04\n\x11\x43\x65rtificateConfig\x12`\n\x0esubject_config\x18\x01 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfigB\x03\xe0\x41\x02\x12L\n\x0bx509_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x02\x12\x46\n\npublic_key\x18\x03 \x01(\x0b\x32-.google.cloud.security.privateca.v1.PublicKeyB\x03\xe0\x41\x01\x12X\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32;.google.cloud.security.privateca.v1.CertificateConfig.KeyIdB\x03\xe0\x41\x01\x1a\xa6\x01\n\rSubjectConfig\x12\x41\n\x07subject\x18\x01 \x01(\x0b\x32+.google.cloud.security.privateca.v1.SubjectB\x03\xe0\x41\x01\x12R\n\x10subject_alt_name\x18\x02 \x01(\x0b\x32\x33.google.cloud.security.privateca.v1.SubjectAltNamesB\x03\xe0\x41\x01\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xc1\x08\n\x16\x43\x65rtificateDescription\x12j\n\x13subject_description\x18\x01 \x01(\x0b\x32M.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription\x12L\n\x10x509_description\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509Parameters\x12\x41\n\npublic_key\x18\x03 \x01(\x0b\x32-.google.cloud.security.privateca.v1.PublicKey\x12X\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32@.google.cloud.security.privateca.v1.CertificateDescription.KeyId\x12Z\n\x10\x61uthority_key_id\x18\x05 \x01(\x0b\x32@.google.cloud.security.privateca.v1.CertificateDescription.KeyId\x12\x1f\n\x17\x63rl_distribution_points\x18\x06 \x03(\t\x12$\n\x1c\x61ia_issuing_certificate_urls\x18\x07 \x03(\t\x12k\n\x10\x63\x65rt_fingerprint\x18\x08 \x01(\x0b\x32Q.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint\x12\x1e\n\x16tbs_certificate_digest\x18\t \x01(\t\x1a\xd2\x02\n\x12SubjectDescription\x12<\n\x07subject\x18\x01 \x01(\x0b\x32+.google.cloud.security.privateca.v1.Subject\x12M\n\x10subject_alt_name\x18\x02 \x01(\x0b\x32\x33.google.cloud.security.privateca.v1.SubjectAltNames\x12\x19\n\x11hex_serial_number\x18\x03 \x01(\t\x12+\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\x0fnot_before_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0enot_after_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x16\x43\x65rtificateFingerprint\x12\x13\n\x0bsha256_hash\x18\x01 \x01(\t\"\'\n\x08ObjectId\x12\x1b\n\x0eobject_id_path\x18\x01 \x03(\x05\x42\x03\xe0\x41\x02\"\x80\x01\n\rX509Extension\x12\x44\n\tobject_id\x18\x01 \x01(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x02\x12\x15\n\x08\x63ritical\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02\"\xa2\x05\n\x08KeyUsage\x12T\n\x0e\x62\x61se_key_usage\x18\x01 \x01(\x0b\x32<.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions\x12`\n\x12\x65xtended_key_usage\x18\x02 \x01(\x0b\x32\x44.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions\x12Q\n\x1bunknown_extended_key_usages\x18\x03 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectId\x1a\xe7\x01\n\x0fKeyUsageOptions\x12\x19\n\x11\x64igital_signature\x18\x01 \x01(\x08\x12\x1a\n\x12\x63ontent_commitment\x18\x02 \x01(\x08\x12\x18\n\x10key_encipherment\x18\x03 \x01(\x08\x12\x19\n\x11\x64\x61ta_encipherment\x18\x04 \x01(\x08\x12\x15\n\rkey_agreement\x18\x05 \x01(\x08\x12\x11\n\tcert_sign\x18\x06 \x01(\x08\x12\x10\n\x08\x63rl_sign\x18\x07 \x01(\x08\x12\x15\n\rencipher_only\x18\x08 \x01(\x08\x12\x15\n\rdecipher_only\x18\t \x01(\x08\x1a\xa0\x01\n\x17\x45xtendedKeyUsageOptions\x12\x13\n\x0bserver_auth\x18\x01 \x01(\x08\x12\x13\n\x0b\x63lient_auth\x18\x02 \x01(\x08\x12\x14\n\x0c\x63ode_signing\x18\x03 \x01(\x08\x12\x18\n\x10\x65mail_protection\x18\x04 \x01(\x08\x12\x15\n\rtime_stamping\x18\x05 \x01(\x08\x12\x14\n\x0cocsp_signing\x18\x06 \x01(\x08\"\xbe\x01\n\x15\x41ttributeTypeAndValue\x12\x41\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.security.privateca.v1.AttributeTypeH\x00\x12\x41\n\tobject_id\x18\x02 \x01(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdH\x00\x12\r\n\x05value\x18\x03 \x01(\tB\x10\n\x0e\x61ttribute_type\"j\n\x19RelativeDistinguishedName\x12M\n\nattributes\x18\x01 \x03(\x0b\x32\x39.google.cloud.security.privateca.v1.AttributeTypeAndValue\"\x8d\x02\n\x07Subject\x12\x13\n\x0b\x63ommon_name\x18\x01 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x02 \x01(\t\x12\x14\n\x0corganization\x18\x03 \x01(\t\x12\x1b\n\x13organizational_unit\x18\x04 \x01(\t\x12\x10\n\x08locality\x18\x05 \x01(\t\x12\x10\n\x08province\x18\x06 \x01(\t\x12\x16\n\x0estreet_address\x18\x07 \x01(\t\x12\x13\n\x0bpostal_code\x18\x08 \x01(\t\x12S\n\x0crdn_sequence\x18\t \x03(\x0b\x32=.google.cloud.security.privateca.v1.RelativeDistinguishedName\"\xa9\x01\n\x0fSubjectAltNames\x12\x11\n\tdns_names\x18\x01 \x03(\t\x12\x0c\n\x04uris\x18\x02 \x03(\t\x12\x17\n\x0f\x65mail_addresses\x18\x03 \x03(\t\x12\x14\n\x0cip_addresses\x18\x04 \x03(\t\x12\x46\n\x0b\x63ustom_sans\x18\x05 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1.X509Extension\"\xfa\x01\n\x1e\x43\x65rtificateIdentityConstraints\x12.\n\x0e\x63\x65l_expression\x18\x01 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12+\n\x19\x61llow_subject_passthrough\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x35\n#allow_subject_alt_names_passthrough\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x1c\n\x1a_allow_subject_passthroughB&\n$_allow_subject_alt_names_passthrough\"\xb4\x03\n\x1f\x43\x65rtificateExtensionConstraints\x12|\n\x10known_extensions\x18\x01 \x03(\x0e\x32].google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtensionB\x03\xe0\x41\x01\x12P\n\x15\x61\x64\x64itional_extensions\x18\x02 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x01\"\xc0\x01\n\x19KnownCertificateExtension\x12+\n\'KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41SE_KEY_USAGE\x10\x01\x12\x16\n\x12\x45XTENDED_KEY_USAGE\x10\x02\x12\x0e\n\nCA_OPTIONS\x10\x03\x12\x0e\n\nPOLICY_IDS\x10\x04\x12\x14\n\x10\x41IA_OCSP_SERVERS\x10\x05\x12\x14\n\x10NAME_CONSTRAINTS\x10\x06*\xbe\x01\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43OMMON_NAME\x10\x01\x12\x10\n\x0c\x43OUNTRY_CODE\x10\x02\x12\x10\n\x0cORGANIZATION\x10\x03\x12\x17\n\x13ORGANIZATIONAL_UNIT\x10\x04\x12\x0c\n\x08LOCALITY\x10\x05\x12\x0c\n\x08PROVINCE\x10\x06\x12\x12\n\x0eSTREET_ADDRESS\x10\x07\x12\x0f\n\x0bPOSTAL_CODE\x10\x08*\x87\x02\n\x10RevocationReason\x12!\n\x1dREVOCATION_REASON_UNSPECIFIED\x10\x00\x12\x12\n\x0eKEY_COMPROMISE\x10\x01\x12$\n CERTIFICATE_AUTHORITY_COMPROMISE\x10\x02\x12\x17\n\x13\x41\x46\x46ILIATION_CHANGED\x10\x03\x12\x0e\n\nSUPERSEDED\x10\x04\x12\x1a\n\x16\x43\x45SSATION_OF_OPERATION\x10\x05\x12\x14\n\x10\x43\x45RTIFICATE_HOLD\x10\x06\x12\x17\n\x13PRIVILEGE_WITHDRAWN\x10\x07\x12\"\n\x1e\x41TTRIBUTE_AUTHORITY_COMPROMISE\x10\x08*o\n\x12SubjectRequestMode\x12$\n SUBJECT_REQUEST_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x10\n\x0cRDN_SEQUENCE\x10\x03\x12\x14\n\x10REFLECTED_SPIFFE\x10\x02\x42\xfc\x01\n&com.google.cloud.security.privateca.v1B\x17PrivateCaResourcesProtoP\x01ZDcloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb\xaa\x02\"Google.Cloud.Security.PrivateCA.V1\xca\x02\"Google\\Cloud\\Security\\PrivateCA\\V1\xea\x02&Google::Cloud::Security::PrivateCA::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -48,6 +48,7 @@ module V1 CertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority").msgclass CertificateAuthority::AccessUrls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls").msgclass CertificateAuthority::KeyVersionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec").msgclass + CertificateAuthority::UserDefinedAccessUrls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.UserDefinedAccessUrls").msgclass CertificateAuthority::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.Type").enummodule CertificateAuthority::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.State").enummodule CertificateAuthority::SignHashAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm").enummodule @@ -86,11 +87,14 @@ module V1 KeyUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage").msgclass KeyUsage::KeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions").msgclass KeyUsage::ExtendedKeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions").msgclass + AttributeTypeAndValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.AttributeTypeAndValue").msgclass + RelativeDistinguishedName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.RelativeDistinguishedName").msgclass Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.Subject").msgclass SubjectAltNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubjectAltNames").msgclass CertificateIdentityConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateIdentityConstraints").msgclass CertificateExtensionConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateExtensionConstraints").msgclass CertificateExtensionConstraints::KnownCertificateExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension").enummodule + AttributeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.AttributeType").enummodule RevocationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.RevocationReason").enummodule SubjectRequestMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubjectRequestMode").enummodule end diff --git a/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb index 35021e8405bc..f376a66b6bcb 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb @@ -7,6 +7,7 @@ require 'google/api/annotations_pb' require 'google/api/client_pb' require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' require 'google/api/resource_pb' require 'google/cloud/security/privateca/v1/resources_pb' require 'google/longrunning/operations_pb' @@ -15,7 +16,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n0google/cloud/security/privateca/v1/service.proto\x12\"google.cloud.security.privateca.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/security/privateca/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x02\n\x18\x43reateCertificateRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x1b\n\x0e\x63\x65rtificate_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12I\n\x0b\x63\x65rtificate\x18\x03 \x01(\x0b\x32/.google.cloud.security.privateca.v1.CertificateB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n issuing_certificate_authority_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\"S\n\x15GetCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\"\xaf\x01\n\x17ListCertificatesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x18ListCertificatesResponse\x12\x45\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32/.google.cloud.security.privateca.v1.Certificate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x18RevokeCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\x12I\n\x06reason\x18\x02 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReasonB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x18UpdateCertificateRequest\x12I\n\x0b\x63\x65rtificate\x18\x01 \x01(\x0b\x32/.google.cloud.security.privateca.v1.CertificateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xfc\x01\n#ActivateCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\x12pem_ca_certificate\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x12subordinate_config\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.SubordinateConfigB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xfa\x01\n!CreateCertificateAuthorityRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12%\n\x18\x63\x65rtificate_authority_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x15\x63\x65rtificate_authority\x18\x03 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\"DisableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\'\n\x1aignore_dependent_resources\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x81\x01\n!EnableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"j\n#FetchCertificateAuthorityCsrRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"<\n$FetchCertificateAuthorityCsrResponse\x12\x14\n\x07pem_csr\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x1eGetCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"\xb9\x01\n!ListCertificateAuthoritiesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\"ListCertificateAuthoritiesResponse\x12Y\n\x17\x63\x65rtificate_authorities\x18\x01 \x03(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthority\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x83\x01\n#UndeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xf3\x01\n!DeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\'\n\x1aignore_active_certificates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11skip_grace_period\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1aignore_dependent_resources\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xd0\x01\n!UpdateCertificateAuthorityRequest\x12\\\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x13\x43reateCaPoolRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\nca_pool_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x07\x63\x61_pool\x18\x03 \x01(\x0b\x32*.google.cloud.security.privateca.v1.CaPoolB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa6\x01\n\x13UpdateCaPoolRequest\x12@\n\x07\x63\x61_pool\x18\x01 \x01(\x0b\x32*.google.cloud.security.privateca.v1.CaPoolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8e\x01\n\x13\x44\x65leteCaPoolRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\'\n\x1aignore_dependent_resources\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13\x46\x65tchCaCertsRequest\x12\x38\n\x07\x63\x61_pool\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x14\x46\x65tchCaCertsResponse\x12T\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32\x42.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain\x1a!\n\tCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t\"I\n\x10GetCaPoolRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\"\xac\x01\n\x12ListCaPoolsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x13ListCaPoolsResponse\x12<\n\x08\x63\x61_pools\x18\x01 \x03(\x0b\x32*.google.cloud.security.privateca.v1.CaPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"o\n#GetCertificateRevocationListRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privateca.googleapis.com/CertificateRevocationList\"\xcb\x01\n%ListCertificateRevocationListsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xbb\x01\n&ListCertificateRevocationListsResponse\x12\x63\n\x1c\x63\x65rtificate_revocation_lists\x18\x01 \x03(\x0b\x32=.google.cloud.security.privateca.v1.CertificateRevocationList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe0\x01\n&UpdateCertificateRevocationListRequest\x12g\n\x1b\x63\x65rtificate_revocation_list\x18\x01 \x01(\x0b\x32=.google.cloud.security.privateca.v1.CertificateRevocationListB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xf8\x01\n CreateCertificateTemplateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12$\n\x17\x63\x65rtificate_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x14\x63\x65rtificate_template\x18\x03 \x01(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplateB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n DeleteCertificateTemplateRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"c\n\x1dGetCertificateTemplateRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\"\xb9\x01\n\x1fListCertificateTemplatesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n ListCertificateTemplatesResponse\x12V\n\x15\x63\x65rtificate_templates\x18\x01 \x03(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xcd\x01\n UpdateCertificateTemplateRequest\x12Z\n\x14\x63\x65rtificate_template\x18\x01 \x01(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xfa;\n\x1b\x43\x65rtificateAuthorityService\x12\xf7\x01\n\x11\x43reateCertificate\x12<.google.cloud.security.privateca.v1.CreateCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"s\xda\x41!parent,certificate,certificate_id\x82\xd3\xe4\x93\x02I\":/v1/{parent=projects/*/locations/*/caPools/*}/certificates:\x0b\x63\x65rtificate\x12\xc7\x01\n\x0eGetCertificate\x12\x39.google.cloud.security.privateca.v1.GetCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/caPools/*/certificates/*}\x12\xda\x01\n\x10ListCertificates\x12;.google.cloud.security.privateca.v1.ListCertificatesRequest\x1a<.google.cloud.security.privateca.v1.ListCertificatesResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/caPools/*}/certificates\x12\xd7\x01\n\x11RevokeCertificate\x12<.google.cloud.security.privateca.v1.RevokeCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\"A/v1/{name=projects/*/locations/*/caPools/*/certificates/*}:revoke:\x01*\x12\xf9\x01\n\x11UpdateCertificate\x12<.google.cloud.security.privateca.v1.UpdateCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"u\xda\x41\x17\x63\x65rtificate,update_mask\x82\xd3\xe4\x93\x02U2F/v1/{certificate.name=projects/*/locations/*/caPools/*/certificates/*}:\x0b\x63\x65rtificate\x12\x94\x02\n\x1c\x41\x63tivateCertificateAuthority\x12G.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:activate:\x01*\x12\xcc\x02\n\x1a\x43reateCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x35parent,certificate_authority,certificate_authority_id\x82\xd3\xe4\x93\x02]\"D/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities:\x15\x63\x65rtificate_authority\x12\x91\x02\n\x1b\x44isableCertificateAuthority\x12\x46.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:disable:\x01*\x12\x8e\x02\n\x1a\x45nableCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02P\"K/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:enable:\x01*\x12\x8c\x02\n\x1c\x46\x65tchCertificateAuthorityCsr\x12G.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest\x1aH.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:fetch\x12\xec\x01\n\x17GetCertificateAuthority\x12\x42.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest\x1a\x38.google.cloud.security.privateca.v1.CertificateAuthority\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}\x12\x82\x02\n\x1aListCertificateAuthorities\x12\x45.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest\x1a\x46.google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities\x12\x94\x02\n\x1cUndeleteCertificateAuthority\x12G.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:undelete:\x01*\x12\x83\x02\n\x1a\x44\x65leteCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}\x12\xce\x02\n\x1aUpdateCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41!certificate_authority,update_mask\x82\xd3\xe4\x93\x02s2Z/v1/{certificate_authority.name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:\x15\x63\x65rtificate_authority\x12\xde\x01\n\x0c\x43reateCaPool\x12\x37.google.cloud.security.privateca.v1.CreateCaPoolRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x1b\n\x06\x43\x61Pool\x12\x11OperationMetadata\xda\x41\x19parent,ca_pool,ca_pool_id\x82\xd3\xe4\x93\x02\x36\"+/v1/{parent=projects/*/locations/*}/caPools:\x07\x63\x61_pool\x12\xe0\x01\n\x0cUpdateCaPool\x12\x37.google.cloud.security.privateca.v1.UpdateCaPoolRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1b\n\x06\x43\x61Pool\x12\x11OperationMetadata\xda\x41\x13\x63\x61_pool,update_mask\x82\xd3\xe4\x93\x02>23/v1/{ca_pool.name=projects/*/locations/*/caPools/*}:\x07\x63\x61_pool\x12\xa9\x01\n\tGetCaPool\x12\x34.google.cloud.security.privateca.v1.GetCaPoolRequest\x1a*.google.cloud.security.privateca.v1.CaPool\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/caPools/*}\x12\xbc\x01\n\x0bListCaPools\x12\x36.google.cloud.security.privateca.v1.ListCaPoolsRequest\x1a\x37.google.cloud.security.privateca.v1.ListCaPoolsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/caPools\x12\xcf\x01\n\x0c\x44\x65leteCaPool\x12\x37.google.cloud.security.privateca.v1.DeleteCaPoolRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/caPools/*}\x12\xd3\x01\n\x0c\x46\x65tchCaCerts\x12\x37.google.cloud.security.privateca.v1.FetchCaCertsRequest\x1a\x38.google.cloud.security.privateca.v1.FetchCaCertsResponse\"P\xda\x41\x07\x63\x61_pool\x82\xd3\xe4\x93\x02@\";/v1/{ca_pool=projects/*/locations/*/caPools/*}:fetchCaCerts:\x01*\x12\x98\x02\n\x1cGetCertificateRevocationList\x12G.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest\x1a=.google.cloud.security.privateca.v1.CertificateRevocationList\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}\x12\xab\x02\n\x1eListCertificateRevocationLists\x12I.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest\x1aJ.google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse\"r\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x63\x12\x61/v1/{parent=projects/*/locations/*/caPools/*/certificateAuthorities/*}/certificateRevocationLists\x12\x8d\x03\n\x1fUpdateCertificateRevocationList\x12J.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest\x1a\x1d.google.longrunning.Operation\"\xfe\x01\xca\x41.\n\x19\x43\x65rtificateRevocationList\x12\x11OperationMetadata\xda\x41\'certificate_revocation_list,update_mask\x82\xd3\xe4\x93\x02\x9c\x01\x32}/v1/{certificate_revocation_list.name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}:\x1b\x63\x65rtificate_revocation_list\x12\xba\x02\n\x19\x43reateCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41(\n\x13\x43\x65rtificateTemplate\x12\x11OperationMetadata\xda\x41\x33parent,certificate_template,certificate_template_id\x82\xd3\xe4\x93\x02P\"8/v1/{parent=projects/*/locations/*}/certificateTemplates:\x14\x63\x65rtificate_template\x12\x9a\x02\n\x19\x44\x65leteCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41M\n\x15google.protobuf.Empty\x12\x34google.cloud.security.privateca.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/certificateTemplates/*}\x12\xdd\x01\n\x16GetCertificateTemplate\x12\x41.google.cloud.security.privateca.v1.GetCertificateTemplateRequest\x1a\x37.google.cloud.security.privateca.v1.CertificateTemplate\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/certificateTemplates/*}\x12\xf0\x01\n\x18ListCertificateTemplates\x12\x43.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest\x1a\x44.google.cloud.security.privateca.v1.ListCertificateTemplatesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/certificateTemplates\x12\xbc\x02\n\x19UpdateCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41(\n\x13\x43\x65rtificateTemplate\x12\x11OperationMetadata\xda\x41 certificate_template,update_mask\x82\xd3\xe4\x93\x02\x65\x32M/v1/{certificate_template.name=projects/*/locations/*/certificateTemplates/*}:\x14\x63\x65rtificate_template\x1aL\xca\x41\x18privateca.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf6\x01\n&com.google.cloud.security.privateca.v1B\x0ePrivateCaProtoP\x01ZDcloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb\xf8\x01\x01\xaa\x02\"Google.Cloud.Security.PrivateCA.V1\xca\x02\"Google\\Cloud\\Security\\PrivateCA\\V1\xea\x02&Google::Cloud::Security::PrivateCA::V1b\x06proto3" +descriptor_data = "\n0google/cloud/security/privateca/v1/service.proto\x12\"google.cloud.security.privateca.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/security/privateca/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x02\n\x18\x43reateCertificateRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x1b\n\x0e\x63\x65rtificate_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12I\n\x0b\x63\x65rtificate\x18\x03 \x01(\x0b\x32/.google.cloud.security.privateca.v1.CertificateB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n issuing_certificate_authority_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\"S\n\x15GetCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\"\xaf\x01\n\x17ListCertificatesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x18ListCertificatesResponse\x12\x45\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32/.google.cloud.security.privateca.v1.Certificate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x18RevokeCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\x12I\n\x06reason\x18\x02 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReasonB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x18UpdateCertificateRequest\x12I\n\x0b\x63\x65rtificate\x18\x01 \x01(\x0b\x32/.google.cloud.security.privateca.v1.CertificateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x84\x02\n#ActivateCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\x12pem_ca_certificate\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x12subordinate_config\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.SubordinateConfigB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xfa\x01\n!CreateCertificateAuthorityRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12%\n\x18\x63\x65rtificate_authority_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x15\x63\x65rtificate_authority\x18\x03 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb3\x01\n\"DisableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_dependent_resources\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x89\x01\n!EnableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"j\n#FetchCertificateAuthorityCsrRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"<\n$FetchCertificateAuthorityCsrResponse\x12\x14\n\x07pem_csr\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x1eGetCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"\xb9\x01\n!ListCertificateAuthoritiesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\"ListCertificateAuthoritiesResponse\x12Y\n\x17\x63\x65rtificate_authorities\x18\x01 \x03(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthority\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8b\x01\n#UndeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xfb\x01\n!DeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_active_certificates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11skip_grace_period\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1aignore_dependent_resources\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xd8\x01\n!UpdateCertificateAuthorityRequest\x12\\\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xcc\x01\n\x13\x43reateCaPoolRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\nca_pool_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x07\x63\x61_pool\x18\x03 \x01(\x0b\x32*.google.cloud.security.privateca.v1.CaPoolB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xae\x01\n\x13UpdateCaPoolRequest\x12@\n\x07\x63\x61_pool\x18\x01 \x01(\x0b\x32*.google.cloud.security.privateca.v1.CaPoolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x96\x01\n\x13\x44\x65leteCaPoolRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_dependent_resources\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13\x46\x65tchCaCertsRequest\x12\x38\n\x07\x63\x61_pool\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x14\x46\x65tchCaCertsResponse\x12T\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32\x42.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain\x1a!\n\tCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t\"I\n\x10GetCaPoolRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\"\xac\x01\n\x12ListCaPoolsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x13ListCaPoolsResponse\x12<\n\x08\x63\x61_pools\x18\x01 \x03(\x0b\x32*.google.cloud.security.privateca.v1.CaPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"o\n#GetCertificateRevocationListRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privateca.googleapis.com/CertificateRevocationList\"\xcb\x01\n%ListCertificateRevocationListsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xbb\x01\n&ListCertificateRevocationListsResponse\x12\x63\n\x1c\x63\x65rtificate_revocation_lists\x18\x01 \x03(\x0b\x32=.google.cloud.security.privateca.v1.CertificateRevocationList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe0\x01\n&UpdateCertificateRevocationListRequest\x12g\n\x1b\x63\x65rtificate_revocation_list\x18\x01 \x01(\x0b\x32=.google.cloud.security.privateca.v1.CertificateRevocationListB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n CreateCertificateTemplateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12$\n\x17\x63\x65rtificate_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x14\x63\x65rtificate_template\x18\x03 \x01(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplateB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n DeleteCertificateTemplateRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"c\n\x1dGetCertificateTemplateRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\"\xb9\x01\n\x1fListCertificateTemplatesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n ListCertificateTemplatesResponse\x12V\n\x15\x63\x65rtificate_templates\x18\x01 \x03(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd5\x01\n UpdateCertificateTemplateRequest\x12Z\n\x14\x63\x65rtificate_template\x18\x01 \x01(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xfa;\n\x1b\x43\x65rtificateAuthorityService\x12\xf7\x01\n\x11\x43reateCertificate\x12<.google.cloud.security.privateca.v1.CreateCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"s\xda\x41!parent,certificate,certificate_id\x82\xd3\xe4\x93\x02I\":/v1/{parent=projects/*/locations/*/caPools/*}/certificates:\x0b\x63\x65rtificate\x12\xc7\x01\n\x0eGetCertificate\x12\x39.google.cloud.security.privateca.v1.GetCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/caPools/*/certificates/*}\x12\xda\x01\n\x10ListCertificates\x12;.google.cloud.security.privateca.v1.ListCertificatesRequest\x1a<.google.cloud.security.privateca.v1.ListCertificatesResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/caPools/*}/certificates\x12\xd7\x01\n\x11RevokeCertificate\x12<.google.cloud.security.privateca.v1.RevokeCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\"A/v1/{name=projects/*/locations/*/caPools/*/certificates/*}:revoke:\x01*\x12\xf9\x01\n\x11UpdateCertificate\x12<.google.cloud.security.privateca.v1.UpdateCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"u\xda\x41\x17\x63\x65rtificate,update_mask\x82\xd3\xe4\x93\x02U2F/v1/{certificate.name=projects/*/locations/*/caPools/*/certificates/*}:\x0b\x63\x65rtificate\x12\x94\x02\n\x1c\x41\x63tivateCertificateAuthority\x12G.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:activate:\x01*\x12\xcc\x02\n\x1a\x43reateCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x35parent,certificate_authority,certificate_authority_id\x82\xd3\xe4\x93\x02]\"D/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities:\x15\x63\x65rtificate_authority\x12\x91\x02\n\x1b\x44isableCertificateAuthority\x12\x46.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:disable:\x01*\x12\x8e\x02\n\x1a\x45nableCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02P\"K/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:enable:\x01*\x12\x8c\x02\n\x1c\x46\x65tchCertificateAuthorityCsr\x12G.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest\x1aH.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:fetch\x12\xec\x01\n\x17GetCertificateAuthority\x12\x42.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest\x1a\x38.google.cloud.security.privateca.v1.CertificateAuthority\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}\x12\x82\x02\n\x1aListCertificateAuthorities\x12\x45.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest\x1a\x46.google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities\x12\x94\x02\n\x1cUndeleteCertificateAuthority\x12G.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:undelete:\x01*\x12\x83\x02\n\x1a\x44\x65leteCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}\x12\xce\x02\n\x1aUpdateCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41!certificate_authority,update_mask\x82\xd3\xe4\x93\x02s2Z/v1/{certificate_authority.name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:\x15\x63\x65rtificate_authority\x12\xde\x01\n\x0c\x43reateCaPool\x12\x37.google.cloud.security.privateca.v1.CreateCaPoolRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x1b\n\x06\x43\x61Pool\x12\x11OperationMetadata\xda\x41\x19parent,ca_pool,ca_pool_id\x82\xd3\xe4\x93\x02\x36\"+/v1/{parent=projects/*/locations/*}/caPools:\x07\x63\x61_pool\x12\xe0\x01\n\x0cUpdateCaPool\x12\x37.google.cloud.security.privateca.v1.UpdateCaPoolRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1b\n\x06\x43\x61Pool\x12\x11OperationMetadata\xda\x41\x13\x63\x61_pool,update_mask\x82\xd3\xe4\x93\x02>23/v1/{ca_pool.name=projects/*/locations/*/caPools/*}:\x07\x63\x61_pool\x12\xa9\x01\n\tGetCaPool\x12\x34.google.cloud.security.privateca.v1.GetCaPoolRequest\x1a*.google.cloud.security.privateca.v1.CaPool\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/caPools/*}\x12\xbc\x01\n\x0bListCaPools\x12\x36.google.cloud.security.privateca.v1.ListCaPoolsRequest\x1a\x37.google.cloud.security.privateca.v1.ListCaPoolsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/caPools\x12\xcf\x01\n\x0c\x44\x65leteCaPool\x12\x37.google.cloud.security.privateca.v1.DeleteCaPoolRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/caPools/*}\x12\xd3\x01\n\x0c\x46\x65tchCaCerts\x12\x37.google.cloud.security.privateca.v1.FetchCaCertsRequest\x1a\x38.google.cloud.security.privateca.v1.FetchCaCertsResponse\"P\xda\x41\x07\x63\x61_pool\x82\xd3\xe4\x93\x02@\";/v1/{ca_pool=projects/*/locations/*/caPools/*}:fetchCaCerts:\x01*\x12\x98\x02\n\x1cGetCertificateRevocationList\x12G.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest\x1a=.google.cloud.security.privateca.v1.CertificateRevocationList\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}\x12\xab\x02\n\x1eListCertificateRevocationLists\x12I.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest\x1aJ.google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse\"r\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x63\x12\x61/v1/{parent=projects/*/locations/*/caPools/*/certificateAuthorities/*}/certificateRevocationLists\x12\x8d\x03\n\x1fUpdateCertificateRevocationList\x12J.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest\x1a\x1d.google.longrunning.Operation\"\xfe\x01\xca\x41.\n\x19\x43\x65rtificateRevocationList\x12\x11OperationMetadata\xda\x41\'certificate_revocation_list,update_mask\x82\xd3\xe4\x93\x02\x9c\x01\x32}/v1/{certificate_revocation_list.name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}:\x1b\x63\x65rtificate_revocation_list\x12\xba\x02\n\x19\x43reateCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41(\n\x13\x43\x65rtificateTemplate\x12\x11OperationMetadata\xda\x41\x33parent,certificate_template,certificate_template_id\x82\xd3\xe4\x93\x02P\"8/v1/{parent=projects/*/locations/*}/certificateTemplates:\x14\x63\x65rtificate_template\x12\x9a\x02\n\x19\x44\x65leteCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41M\n\x15google.protobuf.Empty\x12\x34google.cloud.security.privateca.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/certificateTemplates/*}\x12\xdd\x01\n\x16GetCertificateTemplate\x12\x41.google.cloud.security.privateca.v1.GetCertificateTemplateRequest\x1a\x37.google.cloud.security.privateca.v1.CertificateTemplate\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/certificateTemplates/*}\x12\xf0\x01\n\x18ListCertificateTemplates\x12\x43.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest\x1a\x44.google.cloud.security.privateca.v1.ListCertificateTemplatesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/certificateTemplates\x12\xbc\x02\n\x19UpdateCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41(\n\x13\x43\x65rtificateTemplate\x12\x11OperationMetadata\xda\x41 certificate_template,update_mask\x82\xd3\xe4\x93\x02\x65\x32M/v1/{certificate_template.name=projects/*/locations/*/certificateTemplates/*}:\x14\x63\x65rtificate_template\x1aL\xca\x41\x18privateca.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf3\x01\n&com.google.cloud.security.privateca.v1B\x0ePrivateCaProtoP\x01ZDcloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb\xaa\x02\"Google.Cloud.Security.PrivateCA.V1\xca\x02\"Google\\Cloud\\Security\\PrivateCA\\V1\xea\x02&Google::Cloud::Security::PrivateCA::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb b/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..cea53f02d1a8 --- /dev/null +++ b/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb b/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb index 1367a810ac1c..766c803fb581 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb @@ -28,9 +28,9 @@ module V1 # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} # can be used to create # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. - # @!attribute [r] name + # @!attribute [rw] name # @return [::String] - # Output only. The resource name for this + # Identifier. The resource name for this # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. # @!attribute [rw] type @@ -132,6 +132,17 @@ module V1 # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Labels with user-defined metadata. + # @!attribute [rw] user_defined_access_urls + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::UserDefinedAccessUrls] + # Optional. User-defined URLs for CA certificate and CRLs. The service does + # not publish content to these URLs. It is up to the user to mirror content + # to these URLs. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. class CertificateAuthority include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -180,6 +191,29 @@ class KeyVersionSpec extend ::Google::Protobuf::MessageExts::ClassMethods end + # User-defined URLs for accessing content published by this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] aia_issuing_certificate_urls + # @return [::Array<::String>] + # Optional. A list of URLs where the issuer CA certificate may be + # downloaded, which appears in the "Authority Information Access" extension + # in the certificate. If specified, the default [Cloud Storage + # URLs][google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.ca_certificate_access_url] + # will be omitted. + # @!attribute [rw] crl_access_urls + # @return [::Array<::String>] + # Optional. A list of URLs where to obtain CRL information, i.e. + # the DistributionPoint.fullName described by + # https://tools.ietf.org/html/rfc5280#section-4.2.1.13. + # If specified, the default + # [Cloud Storage + # URLs][google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.crl_access_urls] + # will be omitted. + class UserDefinedAccessUrls + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] key # @return [::String] # @!attribute [rw] value @@ -298,9 +332,9 @@ module SignHashAlgorithm # issuance policies for one or more # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} # resources and to rotate CA certificates in and out of the trust anchor. - # @!attribute [r] name + # @!attribute [rw] name # @return [::String] - # Output only. The resource name for this + # Identifier. The resource name for this # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format # `projects/*/locations/*/caPools/*`. # @!attribute [rw] tier @@ -392,6 +426,15 @@ module EncodingFormat # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType AllowedKeyType} # is specified, then the certificate request's public key must match one of # the key types listed here. Otherwise, any key may be used. + # @!attribute [rw] backdate_duration + # @return [::Google::Protobuf::Duration] + # Optional. The duration to backdate all certificates issued from this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. If not set, the + # certificates will be issued with a not_before_time of the issuance time + # (i.e. the current time). If set, the certificates will be issued with a + # not_before_time of the issuance time minus the backdate_duration. The + # not_after_time will be adjusted to preserve the requested lifetime. The + # backdate_duration must be less than or equal to 48 hours. # @!attribute [rw] maximum_lifetime # @return [::Google::Protobuf::Duration] # Optional. The maximum lifetime allowed for issued @@ -568,9 +611,9 @@ module Tier # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} # corresponds to a signed X.509 certificate Revocation List (CRL). A CRL # contains the serial numbers of certificates that should no longer be trusted. - # @!attribute [r] name + # @!attribute [rw] name # @return [::String] - # Output only. The resource name for this + # Identifier. The resource name for this # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} # in the format `projects/*/locations/*/caPools/*certificateAuthorities/*/ # certificateRevocationLists/*`. @@ -667,9 +710,9 @@ module State # A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} corresponds # to a signed X.509 certificate issued by a # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # @!attribute [r] name + # @!attribute [rw] name # @return [::String] - # Output only. The resource name for this + # Identifier. The resource name for this # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format # `projects/*/locations/*/caPools/*/certificates/*`. # @!attribute [rw] pem_csr @@ -771,9 +814,9 @@ class LabelsEntry # A # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} # refers to a managed template for certificate issuance. - # @!attribute [r] name + # @!attribute [rw] name # @return [::String] - # Output only. The resource name for this + # Identifier. The resource name for this # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} # in the format `projects/*/locations/*/certificateTemplates/*`. # @!attribute [rw] maximum_lifetime @@ -872,7 +915,9 @@ class LabelsEntry # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters::CaOptions] # Optional. Describes options in this # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters X509Parameters} that - # are relevant in a CA certificate. + # are relevant in a CA certificate. If not specified, a default basic + # constraints extension with `is_ca=false` will be added for leaf + # certificates. # @!attribute [rw] policy_ids # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::ObjectId>] # Optional. Describes the X.509 certificate policy object identifiers, per @@ -892,20 +937,20 @@ class X509Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # Describes values that are relevant in a CA certificate. + # Describes the X.509 basic constraints extension, per [RFC 5280 + # section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9) # @!attribute [rw] is_ca # @return [::Boolean] - # Optional. Refers to the "CA" X.509 extension, which is a boolean value. - # When this value is missing, the extension will be omitted from the CA - # certificate. + # Optional. Refers to the "CA" boolean field in the X.509 extension. + # When this value is missing, the basic constraints extension will be + # omitted from the certificate. # @!attribute [rw] max_issuer_path_length # @return [::Integer] - # Optional. Refers to the path length restriction X.509 extension. For a CA - # certificate, this value describes the depth of subordinate CA - # certificates that are allowed. - # If this value is less than 0, the request will fail. - # If this value is missing, the max path length will be omitted from the - # CA certificate. + # Optional. Refers to the path length constraint field in the X.509 + # extension. For a CA certificate, this value describes the depth of + # subordinate CA certificates that are allowed. If this value is less than + # 0, the request will fail. If this value is missing, the max path length + # will be omitted from the certificate. class CaOptions include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1134,6 +1179,12 @@ class KeyId # @!attribute [rw] cert_fingerprint # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::CertificateFingerprint] # The hash of the x.509 certificate. + # @!attribute [rw] tbs_certificate_digest + # @return [::String] + # The hash of the pre-signed certificate, which will be signed by the CA. + # Corresponds to the TBS Certificate in + # https://tools.ietf.org/html/rfc5280#section-4.1.2. The field will always be + # populated. class CertificateDescription include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1305,6 +1356,38 @@ class ExtendedKeyUsageOptions end end + # {::Google::Cloud::Security::PrivateCA::V1::AttributeTypeAndValue AttributeTypeAndValue} + # specifies an attribute type and value. It can use either a OID or enum value + # to specify the attribute type. + # @!attribute [rw] type + # @return [::Google::Cloud::Security::PrivateCA::V1::AttributeType] + # The attribute type of the attribute and value pair. + # + # Note: The following fields are mutually exclusive: `type`, `object_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] object_id + # @return [::Google::Cloud::Security::PrivateCA::V1::ObjectId] + # Object ID for an attribute type of an attribute and value pair. + # + # Note: The following fields are mutually exclusive: `object_id`, `type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value + # @return [::String] + # The value for the attribute type. + class AttributeTypeAndValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1::RelativeDistinguishedName RelativeDistinguishedName} + # specifies a relative distinguished name which will be used to build a + # distinguished name. + # @!attribute [rw] attributes + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::AttributeTypeAndValue>] + # Attributes describes the attribute value assertions in the RDN. + class RelativeDistinguishedName + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} describes parts of a # distinguished name that, in turn, describes the subject of the certificate. # @!attribute [rw] common_name @@ -1331,6 +1414,9 @@ class ExtendedKeyUsageOptions # @!attribute [rw] postal_code # @return [::String] # The postal code of the subject. + # @!attribute [rw] rdn_sequence + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::RelativeDistinguishedName>] + # This field can be used in place of the named subject fields. class Subject include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1465,6 +1551,37 @@ module KnownCertificateExtension end end + # {::Google::Cloud::Security::PrivateCA::V1::AttributeType AttributeType} specifies + # the type of Attribute in a relative distinguished name. + module AttributeType + # Attribute type is unspecified. + ATTRIBUTE_TYPE_UNSPECIFIED = 0 + + # The "common name" of the subject. + COMMON_NAME = 1 + + # The country code of the subject. + COUNTRY_CODE = 2 + + # The organization of the subject. + ORGANIZATION = 3 + + # The organizational unit of the subject. + ORGANIZATIONAL_UNIT = 4 + + # The locality or city of the subject. + LOCALITY = 5 + + # The province, territory, or regional state of the subject. + PROVINCE = 6 + + # The street address of the subject. + STREET_ADDRESS = 7 + + # The postal code of the subject. + POSTAL_CODE = 8 + end + # A {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} # indicates whether a # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} has been @@ -1530,6 +1647,17 @@ module SubjectRequestMode # the `privateca.certificates.create` permission. DEFAULT = 1 + # A mode used to get an accurate representation of the Subject + # field's distinguished name. Indicates that the certificate's + # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and/or + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} are + # specified in the certificate request. When parsing a PEM CSR this mode will + # maintain the sequence of RDNs found in the CSR's subject field in the + # issued {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. This + # mode requires the caller to have the `privateca.certificates.create` + # permission. + RDN_SEQUENCE = 3 + # A mode reserved for special cases. Indicates that the certificate should # have one SPIFFE # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} set diff --git a/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb b/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb index 2a880ed0a456..e2d65f801260 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb @@ -35,8 +35,9 @@ module V1 # Optional. It must be unique within a location and match the regular # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the Enterprise [CertificateAuthority.Tier][], but is optional and its - # value is ignored otherwise. + # in the Enterprise + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, + # but is optional and its value is ignored otherwise. # @!attribute [rw] certificate # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} @@ -148,8 +149,8 @@ class ListCertificatesRequest # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve next page of results. Pass this value in - # [ListCertificatesRequest.next_page_token][] to retrieve the - # next page of results. + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest#page_token ListCertificatesRequest.page_token} + # to retrieve the next page of results. # @!attribute [rw] unreachable # @return [::Array<::String>] # A list of locations (e.g. "us-west1") that could not be reached. @@ -428,8 +429,8 @@ class ListCertificateAuthoritiesRequest # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve next page of results. Pass this value in - # [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next - # page of results. + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest#page_token ListCertificateAuthoritiesRequest.page_token} + # to retrieve the next page of results. # @!attribute [rw] unreachable # @return [::Array<::String>] # A list of locations (e.g. "us-west1") that could not be reached. @@ -731,8 +732,8 @@ class ListCaPoolsRequest # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve next page of results. Pass this value in - # [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next - # page of results. + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest#page_token ListCertificateAuthoritiesRequest.page_token} + # to retrieve the next page of results. # @!attribute [rw] unreachable # @return [::Array<::String>] # A list of locations (e.g. "us-west1") that could not be reached. @@ -796,8 +797,8 @@ class ListCertificateRevocationListsRequest # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve next page of results. Pass this value in - # [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the - # next page of results. + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest#page_token ListCertificateRevocationListsRequest.page_token} + # to retrieve the next page of results. # @!attribute [rw] unreachable # @return [::Array<::String>] # A list of locations (e.g. "us-west1") that could not be reached. @@ -953,8 +954,8 @@ class ListCertificateTemplatesRequest # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve next page of results. Pass this value in - # [ListCertificateTemplatesRequest.next_page_token][] to retrieve - # the next page of results. + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest#page_token ListCertificateTemplatesRequest.page_token} + # to retrieve the next page of results. # @!attribute [rw] unreachable # @return [::Array<::String>] # A list of locations (e.g. "us-west1") that could not be reached. @@ -1013,9 +1014,10 @@ class UpdateCertificateTemplateRequest # @return [::Boolean] # Output only. Identifies whether the user has requested cancellation # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. # @!attribute [r] api_version # @return [::String] # Output only. API version used to start the operation. From 1b4deb23ba762d73af3f609acafe59cf319f5953 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:11:11 -0700 Subject: [PATCH 189/457] feat(network_services-v1): Support for Backend Service isolation configs (#30604) --- .../v1/service_lb_policy_pb.rb | 5 ++- .../networkservices/v1/service_lb_policy.rb | 41 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb index 61e67ec6a42b..406f188602d2 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n7google/cloud/networkservices/v1/service_lb_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe8\x07\n\x0fServiceLbPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.ServiceLbPolicy.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12n\n\x18load_balancing_algorithm\x18\x06 \x01(\x0e\x32G.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithmB\x03\xe0\x41\x01\x12\x64\n\x13\x61uto_capacity_drain\x18\x08 \x01(\x0b\x32\x42.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrainB\x03\xe0\x41\x01\x12]\n\x0f\x66\x61ilover_config\x18\n \x01(\x0b\x32?.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfigB\x03\xe0\x41\x01\x1a(\n\x11\x41utoCapacityDrain\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x38\n\x0e\x46\x61iloverConfig\x12&\n\x19\x66\x61ilover_health_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x01\n\x16LoadBalancingAlgorithm\x12(\n$LOAD_BALANCING_ALGORITHM_UNSPECIFIED\x10\x00\x12\x12\n\x0eSPRAY_TO_WORLD\x10\x03\x12\x13\n\x0fSPRAY_TO_REGION\x10\x04\x12\x17\n\x13WATERFALL_BY_REGION\x10\x05\x12\x15\n\x11WATERFALL_BY_ZONE\x10\x06:\x82\x01\xea\x41\x7f\n.networkservices.googleapis.com/ServiceLbPolicy\x12Mprojects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}\"\x8d\x01\n\x1cListServiceLbPoliciesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9c\x01\n\x1dListServiceLbPoliciesResponse\x12M\n\x13service_lb_policies\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicy\"\xdb\x01\n\x1c\x43reateServiceLbPolicyRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12!\n\x14service_lb_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11service_lb_policy\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"\xa6\x01\n\x1cUpdateServiceLbPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11service_lb_policy\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"d\n\x1c\x44\x65leteServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicyB\xf5\x01\n#com.google.cloud.networkservices.v1B\x14ServiceLbPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n7google/cloud/networkservices/v1/service_lb_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x0b\n\x0fServiceLbPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.ServiceLbPolicy.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12n\n\x18load_balancing_algorithm\x18\x06 \x01(\x0e\x32G.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithmB\x03\xe0\x41\x01\x12\x64\n\x13\x61uto_capacity_drain\x18\x08 \x01(\x0b\x32\x42.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrainB\x03\xe0\x41\x01\x12]\n\x0f\x66\x61ilover_config\x18\n \x01(\x0b\x32?.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfigB\x03\xe0\x41\x01\x12_\n\x10isolation_config\x18\x0b \x01(\x0b\x32@.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfigB\x03\xe0\x41\x01\x1a(\n\x11\x41utoCapacityDrain\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x38\n\x0e\x46\x61iloverConfig\x12&\n\x19\x66\x61ilover_health_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xd9\x01\n\x0fIsolationConfig\x12i\n\x15isolation_granularity\x18\x01 \x01(\x0e\x32\x45.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularityB\x03\xe0\x41\x01\x12[\n\x0eisolation_mode\x18\x02 \x01(\x0e\x32>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x01\n\x16LoadBalancingAlgorithm\x12(\n$LOAD_BALANCING_ALGORITHM_UNSPECIFIED\x10\x00\x12\x12\n\x0eSPRAY_TO_WORLD\x10\x03\x12\x13\n\x0fSPRAY_TO_REGION\x10\x04\x12\x17\n\x13WATERFALL_BY_REGION\x10\x05\x12\x15\n\x11WATERFALL_BY_ZONE\x10\x06\"I\n\x14IsolationGranularity\x12%\n!ISOLATION_GRANULARITY_UNSPECIFIED\x10\x00\x12\n\n\x06REGION\x10\x01\"H\n\rIsolationMode\x12\x1e\n\x1aISOLATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NEAREST\x10\x01\x12\n\n\x06STRICT\x10\x02:\x82\x01\xea\x41\x7f\n.networkservices.googleapis.com/ServiceLbPolicy\x12Mprojects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}\"\x8d\x01\n\x1cListServiceLbPoliciesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9c\x01\n\x1dListServiceLbPoliciesResponse\x12M\n\x13service_lb_policies\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicy\"\xdb\x01\n\x1c\x43reateServiceLbPolicyRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12!\n\x14service_lb_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11service_lb_policy\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"\xa6\x01\n\x1cUpdateServiceLbPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11service_lb_policy\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"d\n\x1c\x44\x65leteServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicyB\xf5\x01\n#com.google.cloud.networkservices.v1B\x14ServiceLbPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -45,7 +45,10 @@ module V1 ServiceLbPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy").msgclass ServiceLbPolicy::AutoCapacityDrain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain").msgclass ServiceLbPolicy::FailoverConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig").msgclass + ServiceLbPolicy::IsolationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig").msgclass ServiceLbPolicy::LoadBalancingAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithm").enummodule + ServiceLbPolicy::IsolationGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularity").enummodule + ServiceLbPolicy::IsolationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationMode").enummodule ListServiceLbPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesRequest").msgclass ListServiceLbPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesResponse").msgclass GetServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceLbPolicyRequest").msgclass diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb index e3abd6a70d68..a8fc812cf586 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb @@ -51,6 +51,10 @@ module V1 # @!attribute [rw] failover_config # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig] # Optional. Configuration related to health based failover. + # @!attribute [rw] isolation_config + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig] + # Optional. Configuration to provide isolation support for the associated + # Backend Service. class ServiceLbPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -84,6 +88,19 @@ class FailoverConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration to provide isolation support for the associated Backend + # Service. + # @!attribute [rw] isolation_granularity + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationGranularity] + # Optional. The isolation granularity of the load balancer. + # @!attribute [rw] isolation_mode + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationMode] + # Optional. The isolation mode of the load balancer. + class IsolationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] key # @return [::String] # @!attribute [rw] value @@ -117,6 +134,30 @@ module LoadBalancingAlgorithm # spilling over to other zones. WATERFALL_BY_ZONE = 6 end + + # The granularity of this isolation restriction. + module IsolationGranularity + # No isolation is configured for the backend service. Traffic can overflow + # based on the load balancing algorithm. + ISOLATION_GRANULARITY_UNSPECIFIED = 0 + + # Traffic for this service will be isolated at the cloud region level. + REGION = 1 + end + + # The mode of this isolation restriction, defining whether clients in a given + # region are allowed to reach out to another region. + module IsolationMode + # No isolation mode is configured for the backend service. + ISOLATION_MODE_UNSPECIFIED = 0 + + # Traffic will be sent to the nearest region. + NEAREST = 1 + + # Traffic will fail if no serving backends are available in the same region + # as the load balancer. + STRICT = 2 + end end # Request used with the ListServiceLbPolicies method. From 6cfde98ab75e127d5a0f379c75a654c3d517b45a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:12:47 -0700 Subject: [PATCH 190/457] feat(ai_platform-v1): Support for unique names for pipeline tasks (#30605) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 780661695 Source-Link: https://github.com/googleapis/googleapis/commit/b6084d2a2e58d59053c101f8b2fce48a7e7217bf Source-Link: https://github.com/googleapis/googleapis-gen/commit/adf70b4fc7b939afb4775f3847aa75596cbd5e80 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJhZGY3MGI0ZmM3YjkzOWFmYjQ3NzVmMzg0N2FhNzU1OTZjYmQ1ZTgwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb | 2 +- .../google/cloud/aiplatform/v1/pipeline_job.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb index df760dcdbe1e..a5a27fdad531 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb @@ -19,7 +19,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n-google/cloud/aiplatform/v1/pipeline_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/aiplatform/v1/artifact.proto\x1a(google/cloud/aiplatform/v1/context.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a*google/cloud/aiplatform/v1/execution.proto\x1a\x38google/cloud/aiplatform/v1/pipeline_failure_policy.proto\x1a/google/cloud/aiplatform/v1/pipeline_state.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a&google/cloud/aiplatform/v1/value.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xc7\x0f\n\x0bPipelineJob\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12.\n\rpipeline_spec\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\x12=\n\x05state\x18\x08 \x01(\x0e\x32).google.cloud.aiplatform.v1.PipelineStateB\x03\xe0\x41\x03\x12\x46\n\njob_detail\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.PipelineJobDetailB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\n \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x0b \x03(\x0b\x32\x33.google.cloud.aiplatform.v1.PipelineJob.LabelsEntry\x12M\n\x0eruntime_config\x18\x0c \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig\x12\x43\n\x0f\x65ncryption_spec\x18\x10 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12\x17\n\x0fservice_account\x18\x11 \x01(\t\x12\x34\n\x07network\x18\x12 \x01(\tB#\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1a\n\x12reserved_ip_ranges\x18\x19 \x03(\t\x12Q\n\x14psc_interface_config\x18\x1f \x01(\x0b\x32..google.cloud.aiplatform.v1.PscInterfaceConfigB\x03\xe0\x41\x01\x12\x14\n\x0ctemplate_uri\x18\x13 \x01(\t\x12T\n\x11template_metadata\x18\x14 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.PipelineTemplateMetadataB\x03\xe0\x41\x03\x12\x1a\n\rschedule_name\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15preflight_validations\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01\x1a\xf8\x05\n\rRuntimeConfig\x12]\n\nparameters\x18\x01 \x03(\x0b\x32\x45.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.ParametersEntryB\x02\x18\x01\x12!\n\x14gcs_output_directory\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\x10parameter_values\x18\x03 \x03(\x0b\x32J.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.ParameterValuesEntry\x12I\n\x0e\x66\x61ilure_policy\x18\x04 \x01(\x0e\x32\x31.google.cloud.aiplatform.v1.PipelineFailurePolicy\x12\x62\n\x0finput_artifacts\x18\x05 \x03(\x0b\x32I.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifactsEntry\x1a.\n\rInputArtifact\x12\x15\n\x0b\x61rtifact_id\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\x1aT\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32!.google.cloud.aiplatform.v1.Value:\x02\x38\x01\x1aN\n\x14ParameterValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1az\n\x13InputArtifactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12R\n\x05value\x18\x02 \x01(\x0b\x32\x43.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifact:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n%aiplatform.googleapis.com/PipelineJob\x12\x43projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}\"+\n\x18PipelineTemplateMetadata\x12\x0f\n\x07version\x18\x03 \x01(\t\"\xea\x01\n\x11PipelineJobDetail\x12\x42\n\x10pipeline_context\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContextB\x03\xe0\x41\x03\x12\x46\n\x14pipeline_run_context\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContextB\x03\xe0\x41\x03\x12I\n\x0ctask_details\x18\x03 \x03(\x0b\x32..google.cloud.aiplatform.v1.PipelineTaskDetailB\x03\xe0\x41\x03\"\x9d\x0b\n\x12PipelineTaskDetail\x12\x14\n\x07task_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eparent_task_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\ttask_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0f\x65xecutor_detail\x18\x06 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.PipelineTaskExecutorDetailB\x03\xe0\x41\x03\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PipelineTaskDetail.StateB\x03\xe0\x41\x03\x12=\n\texecution\x18\x08 \x01(\x0b\x32%.google.cloud.aiplatform.v1.ExecutionB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x64\n\x14pipeline_task_status\x18\r \x03(\x0b\x32\x41.google.cloud.aiplatform.v1.PipelineTaskDetail.PipelineTaskStatusB\x03\xe0\x41\x03\x12O\n\x06inputs\x18\n \x03(\x0b\x32:.google.cloud.aiplatform.v1.PipelineTaskDetail.InputsEntryB\x03\xe0\x41\x03\x12Q\n\x07outputs\x18\x0b \x03(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.OutputsEntryB\x03\xe0\x41\x03\x1a\xbc\x01\n\x12PipelineTaskStatus\x12\x34\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PipelineTaskDetail.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1aL\n\x0c\x41rtifactList\x12<\n\tartifacts\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.ArtifactB\x03\xe0\x41\x03\x1aj\n\x0bInputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList:\x02\x38\x01\x1ak\n\x0cOutputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList:\x02\x38\x01\"\xa6\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x12\n\x0e\x43\x41NCEL_PENDING\x10\x04\x12\x0e\n\nCANCELLING\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07\x12\x0b\n\x07SKIPPED\x10\x08\x12\x11\n\rNOT_TRIGGERED\x10\t\"\xcb\x04\n\x1aPipelineTaskExecutorDetail\x12g\n\x10\x63ontainer_detail\x18\x01 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.ContainerDetailB\x03\xe0\x41\x03H\x00\x12h\n\x11\x63ustom_job_detail\x18\x02 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetailB\x03\xe0\x41\x03H\x00\x1a\xe7\x01\n\x0f\x43ontainerDetail\x12=\n\x08main_job\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12J\n\x15pre_caching_check_job\x18\x02 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12\x1d\n\x10\x66\x61iled_main_jobs\x18\x03 \x03(\tB\x03\xe0\x41\x03\x12*\n\x1d\x66\x61iled_pre_caching_check_jobs\x18\x04 \x03(\tB\x03\xe0\x41\x03\x1a\x65\n\x0f\x43ustomJobDetail\x12\x38\n\x03job\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12\x18\n\x0b\x66\x61iled_jobs\x18\x03 \x03(\tB\x03\xe0\x41\x03\x42\t\n\x07\x64\x65tailsB\x97\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x08PipelineP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" +descriptor_data = "\n-google/cloud/aiplatform/v1/pipeline_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/aiplatform/v1/artifact.proto\x1a(google/cloud/aiplatform/v1/context.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a*google/cloud/aiplatform/v1/execution.proto\x1a\x38google/cloud/aiplatform/v1/pipeline_failure_policy.proto\x1a/google/cloud/aiplatform/v1/pipeline_state.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a&google/cloud/aiplatform/v1/value.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xc7\x0f\n\x0bPipelineJob\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12.\n\rpipeline_spec\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\x12=\n\x05state\x18\x08 \x01(\x0e\x32).google.cloud.aiplatform.v1.PipelineStateB\x03\xe0\x41\x03\x12\x46\n\njob_detail\x18\t \x01(\x0b\x32-.google.cloud.aiplatform.v1.PipelineJobDetailB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\n \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x0b \x03(\x0b\x32\x33.google.cloud.aiplatform.v1.PipelineJob.LabelsEntry\x12M\n\x0eruntime_config\x18\x0c \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig\x12\x43\n\x0f\x65ncryption_spec\x18\x10 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12\x17\n\x0fservice_account\x18\x11 \x01(\t\x12\x34\n\x07network\x18\x12 \x01(\tB#\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x1a\n\x12reserved_ip_ranges\x18\x19 \x03(\t\x12Q\n\x14psc_interface_config\x18\x1f \x01(\x0b\x32..google.cloud.aiplatform.v1.PscInterfaceConfigB\x03\xe0\x41\x01\x12\x14\n\x0ctemplate_uri\x18\x13 \x01(\t\x12T\n\x11template_metadata\x18\x14 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.PipelineTemplateMetadataB\x03\xe0\x41\x03\x12\x1a\n\rschedule_name\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15preflight_validations\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01\x1a\xf8\x05\n\rRuntimeConfig\x12]\n\nparameters\x18\x01 \x03(\x0b\x32\x45.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.ParametersEntryB\x02\x18\x01\x12!\n\x14gcs_output_directory\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\x10parameter_values\x18\x03 \x03(\x0b\x32J.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.ParameterValuesEntry\x12I\n\x0e\x66\x61ilure_policy\x18\x04 \x01(\x0e\x32\x31.google.cloud.aiplatform.v1.PipelineFailurePolicy\x12\x62\n\x0finput_artifacts\x18\x05 \x03(\x0b\x32I.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifactsEntry\x1a.\n\rInputArtifact\x12\x15\n\x0b\x61rtifact_id\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\x1aT\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32!.google.cloud.aiplatform.v1.Value:\x02\x38\x01\x1aN\n\x14ParameterValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1az\n\x13InputArtifactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12R\n\x05value\x18\x02 \x01(\x0b\x32\x43.google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifact:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n%aiplatform.googleapis.com/PipelineJob\x12\x43projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}\"+\n\x18PipelineTemplateMetadata\x12\x0f\n\x07version\x18\x03 \x01(\t\"\xea\x01\n\x11PipelineJobDetail\x12\x42\n\x10pipeline_context\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContextB\x03\xe0\x41\x03\x12\x46\n\x14pipeline_run_context\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContextB\x03\xe0\x41\x03\x12I\n\x0ctask_details\x18\x03 \x03(\x0b\x32..google.cloud.aiplatform.v1.PipelineTaskDetailB\x03\xe0\x41\x03\"\xbc\x0b\n\x12PipelineTaskDetail\x12\x14\n\x07task_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eparent_task_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\ttask_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0f\x65xecutor_detail\x18\x06 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.PipelineTaskExecutorDetailB\x03\xe0\x41\x03\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PipelineTaskDetail.StateB\x03\xe0\x41\x03\x12=\n\texecution\x18\x08 \x01(\x0b\x32%.google.cloud.aiplatform.v1.ExecutionB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x64\n\x14pipeline_task_status\x18\r \x03(\x0b\x32\x41.google.cloud.aiplatform.v1.PipelineTaskDetail.PipelineTaskStatusB\x03\xe0\x41\x03\x12O\n\x06inputs\x18\n \x03(\x0b\x32:.google.cloud.aiplatform.v1.PipelineTaskDetail.InputsEntryB\x03\xe0\x41\x03\x12Q\n\x07outputs\x18\x0b \x03(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.OutputsEntryB\x03\xe0\x41\x03\x12\x1d\n\x10task_unique_name\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a\xbc\x01\n\x12PipelineTaskStatus\x12\x34\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.PipelineTaskDetail.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1aL\n\x0c\x41rtifactList\x12<\n\tartifacts\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.ArtifactB\x03\xe0\x41\x03\x1aj\n\x0bInputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList:\x02\x38\x01\x1ak\n\x0cOutputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList:\x02\x38\x01\"\xa6\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x12\n\x0e\x43\x41NCEL_PENDING\x10\x04\x12\x0e\n\nCANCELLING\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07\x12\x0b\n\x07SKIPPED\x10\x08\x12\x11\n\rNOT_TRIGGERED\x10\t\"\xcb\x04\n\x1aPipelineTaskExecutorDetail\x12g\n\x10\x63ontainer_detail\x18\x01 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.ContainerDetailB\x03\xe0\x41\x03H\x00\x12h\n\x11\x63ustom_job_detail\x18\x02 \x01(\x0b\x32\x46.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetailB\x03\xe0\x41\x03H\x00\x1a\xe7\x01\n\x0f\x43ontainerDetail\x12=\n\x08main_job\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12J\n\x15pre_caching_check_job\x18\x02 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12\x1d\n\x10\x66\x61iled_main_jobs\x18\x03 \x03(\tB\x03\xe0\x41\x03\x12*\n\x1d\x66\x61iled_pre_caching_check_jobs\x18\x04 \x03(\tB\x03\xe0\x41\x03\x1a\x65\n\x0f\x43ustomJobDetail\x12\x38\n\x03job\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#aiplatform.googleapis.com/CustomJob\x12\x18\n\x0b\x66\x61iled_jobs\x18\x03 \x03(\tB\x03\xe0\x41\x03\x42\t\n\x07\x64\x65tailsB\x97\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x08PipelineP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb index 9d02594dce95..e726c60fde43 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb @@ -310,6 +310,16 @@ class PipelineJobDetail # @!attribute [r] outputs # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AIPlatform::V1::PipelineTaskDetail::ArtifactList}] # Output only. The runtime output artifacts of the task. + # @!attribute [r] task_unique_name + # @return [::String] + # Output only. The unique name of a task. + # This field is used by rerun pipeline job. + # Console UI and Vertex AI SDK will support triggering pipeline job reruns. + # The name is constructed by concatenating all the parent tasks name with + # the task name. For example, if a task named "child_task" has a parent task + # named "parent_task_1" and parent task 1 has a parent task named + # "parent_task_2", the task unique name will be + # "parent_task_2.parent_task_1.child_task". class PipelineTaskDetail include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From 1c7bee275b0f90d2a4575d6af708fb90f40322ef Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:53:11 -0700 Subject: [PATCH 191/457] chore(main): release google-cloud-pubsub 2.23.0 (#30594) --- .release-please-manifest.json | 2 +- google-cloud-pubsub/CHANGELOG.md | 9 +++++++++ google-cloud-pubsub/lib/google/cloud/pubsub/version.rb | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 68479da0df72..c2989c197506 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -601,7 +601,7 @@ "google-cloud-profiler+FILLER": "0.0.0", "google-cloud-profiler-v2": "1.3.0", "google-cloud-profiler-v2+FILLER": "0.0.0", - "google-cloud-pubsub": "2.22.0", + "google-cloud-pubsub": "2.23.0", "google-cloud-pubsub+FILLER": "0.0.0", "google-cloud-pubsub-v1": "1.11.0", "google-cloud-pubsub-v1+FILLER": "0.0.0", diff --git a/google-cloud-pubsub/CHANGELOG.md b/google-cloud-pubsub/CHANGELOG.md index a6098a8e8751..26a684b058f0 100644 --- a/google-cloud-pubsub/CHANGELOG.md +++ b/google-cloud-pubsub/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +### 2.23.0 (2025-07-08) + +#### Features + +* Update minimum Ruby version to 3.1 ([#30587](https://github.com/googleapis/google-cloud-ruby/issues/30587)) +#### Bug Fixes + +* Update google-cloud-pubsub-v1 dependency ([#30591](https://github.com/googleapis/google-cloud-ruby/issues/30591)) + ### 2.22.0 (2025-03-27) #### Features diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb index a60b47f51206..c67de9a427c0 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module PubSub - VERSION = "2.22.0".freeze + VERSION = "2.23.0".freeze end Pubsub = PubSub unless const_defined? :Pubsub From 9c6ec6e270cd36dc874de1fbd49198da3d78b8ce Mon Sep 17 00:00:00 2001 From: Yash Saraf <45588765+YashSaraf11@users.noreply.github.com> Date: Thu, 10 Jul 2025 00:31:30 +0530 Subject: [PATCH 192/457] chore(secret_manager): Added SecretManager Tags Sample (#30595) --- google-cloud-secret_manager/samples/Gemfile | 1 + google-cloud-secret_manager/samples/README.md | 2 + .../create_regional_secret_with_tags_test.rb | 125 +++++++++++++++++ .../create_secret_with_tags_test.rb | 126 ++++++++++++++++++ .../samples/acceptance/helper.rb | 1 + .../samples/acceptance/regional_helper.rb | 1 + .../create_regional_secret_with_tags.rb | 53 ++++++++ .../samples/create_secret_with_tags.rb | 50 +++++++ 8 files changed, 359 insertions(+) create mode 100644 google-cloud-secret_manager/samples/acceptance/create_regional_secret_with_tags_test.rb create mode 100644 google-cloud-secret_manager/samples/acceptance/create_secret_with_tags_test.rb create mode 100644 google-cloud-secret_manager/samples/create_regional_secret_with_tags.rb create mode 100644 google-cloud-secret_manager/samples/create_secret_with_tags.rb diff --git a/google-cloud-secret_manager/samples/Gemfile b/google-cloud-secret_manager/samples/Gemfile index 2b5ded4cba9c..307cd8f1faa6 100644 --- a/google-cloud-secret_manager/samples/Gemfile +++ b/google-cloud-secret_manager/samples/Gemfile @@ -17,6 +17,7 @@ source "https://rubygems.org" master = ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" gem "google-cloud-secret_manager", path: master ? "../../google-cloud-secret_manager" : nil +gem "google-cloud-resource_manager-v3", "~> 1.3" group :test do gem "google-style", "~> 1.25.1" diff --git a/google-cloud-secret_manager/samples/README.md b/google-cloud-secret_manager/samples/README.md index 5301e92a5fd8..9e307cc2dc0f 100644 --- a/google-cloud-secret_manager/samples/README.md +++ b/google-cloud-secret_manager/samples/README.md @@ -57,6 +57,7 @@ These samples show how to use the [Google Secret Manager API] create_secret_with_annotations Create a new secret with annotations create_secret_with_delayed_destroy Create a new secret with delayed destroy create_secret_with_labels Create a new secret with labels + create_secret_with_tags Create a new secret with tags create_ummr_secret Create a new secret with user managed replication delete_secret Delete an existing secret destroy_secret_version Destroy a secret version @@ -93,6 +94,7 @@ These samples show how to use the [Google Secret Manager API] access_regional_secret_version Access a regional secret version add_regional_secret_version Add a new regional secret version create_regional_secret Create a new regional secret + create_regional_secret Create a new regional secret with tags delete_regional_secret_with_etag Delete an existing regional secret with associated etag delete_regional_secret Delete an existing regional secret destroy_regional_secret_version_with_etag Destroy a regional secret version with associated etag diff --git a/google-cloud-secret_manager/samples/acceptance/create_regional_secret_with_tags_test.rb b/google-cloud-secret_manager/samples/acceptance/create_regional_secret_with_tags_test.rb new file mode 100644 index 000000000000..7e7654ef18ac --- /dev/null +++ b/google-cloud-secret_manager/samples/acceptance/create_regional_secret_with_tags_test.rb @@ -0,0 +1,125 @@ +# Copyright 2025 Google, Inc +# +# 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 "uri" + +require_relative "regional_helper" + +describe "#create_regional_secret_with_tags", :regional_secret_manager_snippet do + let(:tag_key_short_name) { "my-tag-key-#{(Time.now.to_f * 1000).to_i}" } + let(:tag_value_short_name) { "my-tag-value-#{(Time.now.to_f * 1000).to_i}" } + let(:tag_parent) { "projects/#{project_id}" } + let(:tag_key_client) { Google::Cloud::ResourceManager::V3::TagKeys::Client.new } + let(:tag_value_client) { Google::Cloud::ResourceManager::V3::TagValues::Client.new } + + let :tag_key do + tag_key_client.create_tag_key( + tag_key: { + parent: tag_parent, + short_name: tag_key_short_name + } + ).wait_until_done! + tag_key_client.list_tag_keys(parent: tag_parent).to_a.find { |key| key.short_name == tag_key_short_name } + end + + let :tag_value do + tag_value_client.create_tag_value( + tag_value: { + parent: tag_key.name, + short_name: tag_value_short_name + } + ).wait_until_done! + tag_value_client.list_tag_values(parent: tag_key.name).to_a.find { |value| value.short_name == tag_value_short_name } + end + + let(:interval_duration) { 15 } + let(:max_duration) { 60 } + + def cleanup_tag_value + return unless defined?(tag_value) && tag_value + start_time = Time.now + end_time = start_time + max_duration + deleted = false + + while start_time < end_time && !deleted + begin + start_time += interval_duration + tag_value_client.delete_tag_value(name: tag_value.name).wait_until_done! + # Verify if tag value is deleted + tag_value_to_delete = tag_value_client.list_tag_values(parent: tag_key.name).to_a.find { |value| value.short_name == tag_value_short_name } + unless tag_value_to_delete + deleted = true + end + rescue Google::Cloud::NotFoundError + deleted = true + rescue StandardError => e + puts "An error occurred while deleting tag value: #{e.message}. Retrying." + end + + unless deleted + sleep interval_duration + end + end + return if deleted + raise "Failed to delete tag value after #{max_duration} seconds." + end + + def cleanup_tag_key + return unless tag_key + start_time = Time.now + end_time = start_time + max_duration + deleted = false + + while start_time < end_time && !deleted + begin + start_time += interval_duration + tag_key_client.delete_tag_key(name: tag_key.name).wait_until_done! + # Verify if tag key is deleted + tag_key_to_delete = tag_key_client.list_tag_keys(parent: tag_parent).to_a.find { |key| key.short_name == tag_key_short_name } + unless tag_key_to_delete + deleted = true + end + rescue Google::Cloud::NotFoundError + deleted = true + rescue StandardError => e + puts "An error occurred while deleting tag key: #{e.message}. Retrying..." + end + + unless deleted + sleep interval_duration + end + end + + return if deleted + raise "Failed to delete tag key after #{max_duration} seconds." + end + + it "creates a regional secret with tags" do + sample = SampleLoader.load "create_regional_secret_with_tags.rb" + begin + out, _err = capture_io do + sample.run project_id: project_id, location_id: location_id, secret_id: secret_id, tag_key: tag_key, tag_value: tag_value + end + secret_id_regex = Regexp.escape secret_id + assert_match %r{Created regional secret with tags: projects/\S+locations/\S+/secrets/#{secret_id_regex}}, out + ensure + # Need to delete secret in the test file itself to clear the tag resources + client.delete_secret name: secret_name + + # Clean up created tag key and value + cleanup_tag_value + cleanup_tag_key + end + end +end diff --git a/google-cloud-secret_manager/samples/acceptance/create_secret_with_tags_test.rb b/google-cloud-secret_manager/samples/acceptance/create_secret_with_tags_test.rb new file mode 100644 index 000000000000..f159e6dbc59c --- /dev/null +++ b/google-cloud-secret_manager/samples/acceptance/create_secret_with_tags_test.rb @@ -0,0 +1,126 @@ +# Copyright 2025 Google, Inc +# +# 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 "uri" + +require_relative "helper" + +describe "#create_secret_with_tags", :secret_manager_snippet do + let(:tag_key_short_name) { "my-tag-key-#{(Time.now.to_f * 1000).to_i}" } + let(:tag_value_short_name) { "my-tag-value-#{(Time.now.to_f * 1000).to_i}" } + let(:tag_parent) { "projects/#{project_id}" } + let(:tag_key_client) { Google::Cloud::ResourceManager::V3::TagKeys::Client.new } + let(:tag_value_client) { Google::Cloud::ResourceManager::V3::TagValues::Client.new } + + let :tag_key do + tag_key_client.create_tag_key( + tag_key: { + parent: tag_parent, + short_name: tag_key_short_name + } + ).wait_until_done! + tag_key_client.list_tag_keys(parent: tag_parent).to_a.find { |key| key.short_name == tag_key_short_name } + end + + let :tag_value do + tag_value_client.create_tag_value( + tag_value: { + parent: tag_key.name, + short_name: tag_value_short_name + } + ).wait_until_done! + tag_value_client.list_tag_values(parent: tag_key.name).to_a.find { |value| value.short_name == tag_value_short_name } + end + + let(:interval_duration) { 15 } + let(:max_duration) { 60 } + + def cleanup_tag_value + return unless defined?(tag_value) && tag_value + start_time = Time.now + end_time = start_time + max_duration + deleted = false + + while start_time < end_time && !deleted + begin + start_time += interval_duration + tag_value_client.delete_tag_value(name: tag_value.name).wait_until_done! + # Verify if tag value is deleted + tag_value_to_delete = tag_value_client.list_tag_values(parent: tag_key.name).to_a.find { |value| value.short_name == tag_value_short_name } + unless tag_value_to_delete + deleted = true + end + rescue Google::Cloud::NotFoundError + deleted = true + rescue StandardError => e + puts "An error occurred while deleting tag value: #{e.message}. Retrying." + end + + unless deleted + sleep interval_duration + end + end + return if deleted + raise "Failed to delete tag value after #{max_duration} seconds." + end + + def cleanup_tag_key + return unless tag_key + start_time = Time.now + end_time = start_time + max_duration + deleted = false + + while start_time < end_time && !deleted + begin + start_time += interval_duration + tag_key_client.delete_tag_key(name: tag_key.name).wait_until_done! + # Verify if tag key is deleted + tag_key_to_delete = tag_key_client.list_tag_keys(parent: tag_parent).to_a.find { |key| key.short_name == tag_key_short_name } + unless tag_key_to_delete + deleted = true + end + rescue Google::Cloud::NotFoundError + deleted = true + rescue StandardError => e + puts "An error occurred while deleting tag key: #{e.message}. Retrying..." + end + + unless deleted + sleep interval_duration + end + end + + return if deleted + raise "Failed to delete tag key after #{max_duration} seconds." + end + + it "creates a secret with tags" do + sample = SampleLoader.load "create_secret_with_tags.rb" + + begin + out, _err = capture_io do + sample.run project_id: project_id, secret_id: secret_id, tag_key: tag_key, tag_value: tag_value + end + secret_id_regex = Regexp.escape secret_id + assert_match %r{Created secret with tag: projects/\S+/secrets/#{secret_id_regex}}, out + ensure + # Need to delete secret in the test file itself to clear the tag resources + client.delete_secret name: secret_name + + # Deleting the tag key and value + cleanup_tag_value + cleanup_tag_key + end + end +end diff --git a/google-cloud-secret_manager/samples/acceptance/helper.rb b/google-cloud-secret_manager/samples/acceptance/helper.rb index c5c774644797..c4c246c4e2c1 100644 --- a/google-cloud-secret_manager/samples/acceptance/helper.rb +++ b/google-cloud-secret_manager/samples/acceptance/helper.rb @@ -17,6 +17,7 @@ require "minitest/rg" require "google/cloud/secret_manager" +require "google/cloud/resource_manager/v3" require_relative "../../../.toys/.lib/sample_loader" diff --git a/google-cloud-secret_manager/samples/acceptance/regional_helper.rb b/google-cloud-secret_manager/samples/acceptance/regional_helper.rb index 45c254531de7..50dfdfc7fa32 100644 --- a/google-cloud-secret_manager/samples/acceptance/regional_helper.rb +++ b/google-cloud-secret_manager/samples/acceptance/regional_helper.rb @@ -17,6 +17,7 @@ require "minitest/rg" require "google/cloud/secret_manager" +require "google/cloud/resource_manager/v3" require_relative "../../../.toys/.lib/sample_loader" diff --git a/google-cloud-secret_manager/samples/create_regional_secret_with_tags.rb b/google-cloud-secret_manager/samples/create_regional_secret_with_tags.rb new file mode 100644 index 000000000000..584155fce25a --- /dev/null +++ b/google-cloud-secret_manager/samples/create_regional_secret_with_tags.rb @@ -0,0 +1,53 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START secretmanager_create_regional_secret_with_tags] +require "google/cloud/secret_manager" + +## +# Create a regional secret with tags +# +# @param project_id [String] Your Google Cloud project (e.g. "my-project") +# @param location_id [String] Your Google Cloud location (e.g. "us-west1") +# @param secret_id [String] Your secret name (e.g. "my-secret") +# @param tag_key [String] Your tag key (e.g. "my-tag-key") +# @param tag_value [String] Your tag value (e.g "my-tag-value") +# +def create_regional_secret_with_tags project_id:, location_id:, secret_id:, tag_key:, tag_value: + # Endpoint for the regional secret manager service. + api_endpoint = "secretmanager.#{location_id}.rep.googleapis.com" + + # Create the Secret Manager client. + client = Google::Cloud::SecretManager.secret_manager_service do |config| + config.endpoint = api_endpoint + end + + # Build the resource name of the parent project. + parent = client.location_path project: project_id, location: location_id + + # Create the secret. + secret = client.create_secret( + parent: parent, + secret_id: secret_id, + secret: { + tags: { + tag_key.name => tag_value.name + } + } + ) + + # Print the new secret name. + puts "Created regional secret with tags: #{secret.name}" +end +# [END secretmanager_create_regional_secret_with_tags] diff --git a/google-cloud-secret_manager/samples/create_secret_with_tags.rb b/google-cloud-secret_manager/samples/create_secret_with_tags.rb new file mode 100644 index 000000000000..413df4107075 --- /dev/null +++ b/google-cloud-secret_manager/samples/create_secret_with_tags.rb @@ -0,0 +1,50 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +# [START secretmanager_create_secret_with_tags] +require "google/cloud/secret_manager" + +## +# Create a secret with tags. +# +# @param project_id [String] Your Google Cloud project (e.g. "my-project") +# @param secret_id [String] Your secret name (e.g. "my-secret") +# @param tag_key [String] Your tag key (e.g. "my-tag-key") +# @param tag_value [String] Your tag value (e.g. "my-tag-value") +# +def create_secret_with_tags project_id:, secret_id:, tag_key:, tag_value: + # Create a Secret Manager client. + client = Google::Cloud::SecretManager.secret_manager_service + + # Build the resource name of the parent project. + parent = client.project_path project: project_id + + # Create the secret. + secret = client.create_secret( + parent: parent, + secret_id: secret_id, + secret: { + replication: { + automatic: {} + }, + tags: { + tag_key.name => tag_value.name + } + } + ) + + # Print the new secret name. + puts "Created secret with tag: #{secret.name}" +end +# [END secretmanager_create_secret_with_tags] From 57683eb5c4121a30895aa75228867dc9b1b9596e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 11:45:51 -0700 Subject: [PATCH 193/457] feat(storage-control-v2): Support for REST transport (#30535) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat:Update BUILD configs to support rest transportation for all client PiperOrigin-RevId: 774863055 Source-Link: https://github.com/googleapis/googleapis/commit/aab27766927e30f8ee30b75c3f9e2a6194da36ea Source-Link: https://github.com/googleapis/googleapis-gen/commit/0c3d8d951a9768cbeb353bac55c928683a89053d Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN0b3JhZ2UtY29udHJvbC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiMGMzZDhkOTUxYTk3NjhjYmViMzUzYmFjNTVjOTI4NjgzYTg5MDUzZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update ruby generator to v0.45.3 PiperOrigin-RevId: 775044050 Source-Link: https://github.com/googleapis/googleapis/commit/a4268de9aa350995d9b3cf3fc3cd0b19f6e5232a Source-Link: https://github.com/googleapis/googleapis-gen/commit/6f018d9c82ffb31eff6bf4a4092fe3035a8bcecf Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN0b3JhZ2UtY29udHJvbC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiNmYwMThkOWM4MmZmYjMxZWZmNmJmNGE0MDkyZmUzMDM1YThiY2VjZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method chore: remove require for `rest/operations` when rest operations are not generated PiperOrigin-RevId: 781586174 Source-Link: https://github.com/googleapis/googleapis/commit/74657e8a6690b249c048f685124ee3b8473b70b4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1e25816d65c7dab1e913abf439a6b4c4f97f8ef0 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN0b3JhZ2UtY29udHJvbC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 5 + google-cloud-storage-control-v2/Gemfile | 2 +- .../lib/google/cloud/storage/control/v2.rb | 5 + .../google/cloud/storage/control/v2/rest.rb | 39 + .../storage/control/v2/storage_control.rb | 6 + .../control/v2/storage_control/rest.rb | 54 ++ .../control/v2/storage_control/rest/client.rb | 913 ++++++++++++++++++ .../v2/storage_control/rest/service_stub.rb | 452 +++++++++ .../control/v2/storage_control_rest_test.rb | 429 ++++++++ 9 files changed, 1904 insertions(+), 1 deletion(-) create mode 100644 google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/rest.rb create mode 100644 google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest.rb create mode 100644 google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest/client.rb create mode 100644 google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest/service_stub.rb create mode 100644 google-cloud-storage-control-v2/test/google/cloud/storage/control/v2/storage_control_rest_test.rb diff --git a/google-cloud-storage-control-v2/.owlbot-manifest.json b/google-cloud-storage-control-v2/.owlbot-manifest.json index 2e13dfaa970d..bdd81b36dd22 100644 --- a/google-cloud-storage-control-v2/.owlbot-manifest.json +++ b/google-cloud-storage-control-v2/.owlbot-manifest.json @@ -15,11 +15,15 @@ "google-cloud-storage-control-v2.gemspec", "lib/google-cloud-storage-control-v2.rb", "lib/google/cloud/storage/control/v2.rb", + "lib/google/cloud/storage/control/v2/rest.rb", "lib/google/cloud/storage/control/v2/storage_control.rb", "lib/google/cloud/storage/control/v2/storage_control/client.rb", "lib/google/cloud/storage/control/v2/storage_control/credentials.rb", "lib/google/cloud/storage/control/v2/storage_control/operations.rb", "lib/google/cloud/storage/control/v2/storage_control/paths.rb", + "lib/google/cloud/storage/control/v2/storage_control/rest.rb", + "lib/google/cloud/storage/control/v2/storage_control/rest/client.rb", + "lib/google/cloud/storage/control/v2/storage_control/rest/service_stub.rb", "lib/google/cloud/storage/control/v2/version.rb", "lib/google/storage/control/v2/storage_control_pb.rb", "lib/google/storage/control/v2/storage_control_services_pb.rb", @@ -65,6 +69,7 @@ "snippets/storage_control/update_project_intelligence_config.rb", "test/google/cloud/storage/control/v2/storage_control_operations_test.rb", "test/google/cloud/storage/control/v2/storage_control_paths_test.rb", + "test/google/cloud/storage/control/v2/storage_control_rest_test.rb", "test/google/cloud/storage/control/v2/storage_control_test.rb", "test/helper.rb" ], diff --git a/google-cloud-storage-control-v2/Gemfile b/google-cloud-storage-control-v2/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-storage-control-v2/Gemfile +++ b/google-cloud-storage-control-v2/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2.rb b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2.rb index 0c28456db5be..41020affcce0 100644 --- a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2.rb +++ b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2.rb @@ -31,6 +31,11 @@ module Control # require "google/cloud/storage/control/v2" # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Client.new # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/storage/control/v2" + # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # module V2 end end diff --git a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/rest.rb b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/rest.rb new file mode 100644 index 000000000000..6befbffb9e2b --- /dev/null +++ b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/storage/control/v2/storage_control/rest" +require "google/cloud/storage/control/v2/version" + +module Google + module Cloud + module Storage + module Control + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/storage/control/v2/rest" + # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + module V2 + end + end + end + end +end diff --git a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control.rb b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control.rb index fef0da55f82d..0997d6399360 100644 --- a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control.rb +++ b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control.rb @@ -26,6 +26,7 @@ require "google/cloud/storage/control/v2/storage_control/paths" require "google/cloud/storage/control/v2/storage_control/operations" require "google/cloud/storage/control/v2/storage_control/client" +require "google/cloud/storage/control/v2/storage_control/rest" module Google module Cloud @@ -40,6 +41,11 @@ module V2 # require "google/cloud/storage/control/v2/storage_control" # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Client.new # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/storage/control/v2/storage_control/rest" + # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # module StorageControl end end diff --git a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest.rb b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest.rb new file mode 100644 index 000000000000..08a581f21bca --- /dev/null +++ b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/storage/control/v2/version" + +require "google/cloud/storage/control/v2/storage_control/credentials" +require "google/cloud/storage/control/v2/storage_control/paths" +require "google/cloud/storage/control/v2/storage_control/rest/client" + +module Google + module Cloud + module Storage + module Control + module V2 + ## + # StorageControl service includes selected control plane operations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/storage/control/v2/storage_control/rest" + # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + module StorageControl + # 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/storage/control/v2/storage_control/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest/client.rb b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest/client.rb new file mode 100644 index 000000000000..8b9b0473d69c --- /dev/null +++ b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest/client.rb @@ -0,0 +1,913 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/storage/control/v2/storage_control_pb" +require "google/cloud/storage/control/v2/storage_control/rest/service_stub" + +module Google + module Cloud + module Storage + module Control + module V2 + module StorageControl + module Rest + ## + # REST client for the StorageControl service. + # + # StorageControl service includes selected control plane operations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "storage.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :storage_control_stub + + ## + # Configure the StorageControl Client class. + # + # See {::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all StorageControl clients + # ::Google::Cloud::Storage::Control::V2::StorageControl::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", "Storage", "Control", "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.timeout = 60.0 + + default_config.rpcs.get_project_intelligence_config.timeout = 60.0 + default_config.rpcs.get_project_intelligence_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2] + } + + default_config.rpcs.update_project_intelligence_config.timeout = 60.0 + default_config.rpcs.update_project_intelligence_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2] + } + + default_config.rpcs.get_folder_intelligence_config.timeout = 60.0 + default_config.rpcs.get_folder_intelligence_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2] + } + + default_config.rpcs.update_folder_intelligence_config.timeout = 60.0 + default_config.rpcs.update_folder_intelligence_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2] + } + + default_config.rpcs.get_organization_intelligence_config.timeout = 60.0 + default_config.rpcs.get_organization_intelligence_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2] + } + + default_config.rpcs.update_organization_intelligence_config.timeout = 60.0 + default_config.rpcs.update_organization_intelligence_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the StorageControl 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::Storage::Control::V2::StorageControl::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 + @storage_control_stub.universe_domain + end + + ## + # Create a new StorageControl REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the StorageControl 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 + + @storage_control_stub = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @storage_control_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 + @storage_control_stub.logger + end + + # Service calls + + ## + # Returns the Project scoped singleton IntelligenceConfig resource. + # + # @overload get_project_intelligence_config(request, options = nil) + # Pass arguments to `get_project_intelligence_config` via a request object, either of type + # {::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest, ::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_project_intelligence_config(name: nil) + # Pass arguments to `get_project_intelligence_config` 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 name of the `IntelligenceConfig` resource associated with + # your project. + # + # Format: `projects/{id}/locations/global/intelligenceConfig` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/storage/control/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest.new + # + # # Call the get_project_intelligence_config method. + # result = client.get_project_intelligence_config request + # + # # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig. + # p result + # + def get_project_intelligence_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest + + # 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_project_intelligence_config.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::Storage::Control::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_project_intelligence_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_project_intelligence_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @storage_control_stub.get_project_intelligence_config 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 + + ## + # Updates the Project scoped singleton IntelligenceConfig resource. + # + # @overload update_project_intelligence_config(request, options = nil) + # Pass arguments to `update_project_intelligence_config` via a request object, either of type + # {::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest, ::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 update_project_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_project_intelligence_config` 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 intelligence_config [::Google::Cloud::Storage::Control::V2::IntelligenceConfig, ::Hash] + # Required. The `IntelligenceConfig` resource to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The `update_mask` that specifies the fields within the + # `IntelligenceConfig` resource that should be modified by this update. Only + # the listed fields are updated. + # @param request_id [::String] + # Optional. The ID that uniquely identifies the request, preventing duplicate + # processing. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/storage/control/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest.new + # + # # Call the update_project_intelligence_config method. + # result = client.update_project_intelligence_config request + # + # # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig. + # p result + # + def update_project_intelligence_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest + + # 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.update_project_intelligence_config.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::Storage::Control::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.update_project_intelligence_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_project_intelligence_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @storage_control_stub.update_project_intelligence_config 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 + + ## + # Returns the Folder scoped singleton IntelligenceConfig resource. + # + # @overload get_folder_intelligence_config(request, options = nil) + # Pass arguments to `get_folder_intelligence_config` via a request object, either of type + # {::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest, ::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_folder_intelligence_config(name: nil) + # Pass arguments to `get_folder_intelligence_config` 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 name of the `IntelligenceConfig` resource associated with + # your folder. + # + # Format: `folders/{id}/locations/global/intelligenceConfig` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/storage/control/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest.new + # + # # Call the get_folder_intelligence_config method. + # result = client.get_folder_intelligence_config request + # + # # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig. + # p result + # + def get_folder_intelligence_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest + + # 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_folder_intelligence_config.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::Storage::Control::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_folder_intelligence_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_folder_intelligence_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @storage_control_stub.get_folder_intelligence_config 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 + + ## + # Updates the Folder scoped singleton IntelligenceConfig resource. + # + # @overload update_folder_intelligence_config(request, options = nil) + # Pass arguments to `update_folder_intelligence_config` via a request object, either of type + # {::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest, ::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 update_folder_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_folder_intelligence_config` 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 intelligence_config [::Google::Cloud::Storage::Control::V2::IntelligenceConfig, ::Hash] + # Required. The `IntelligenceConfig` resource to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The `update_mask` that specifies the fields within the + # `IntelligenceConfig` resource that should be modified by this update. Only + # the listed fields are updated. + # @param request_id [::String] + # Optional. The ID that uniquely identifies the request, preventing duplicate + # processing. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/storage/control/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest.new + # + # # Call the update_folder_intelligence_config method. + # result = client.update_folder_intelligence_config request + # + # # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig. + # p result + # + def update_folder_intelligence_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest + + # 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.update_folder_intelligence_config.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::Storage::Control::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.update_folder_intelligence_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_folder_intelligence_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @storage_control_stub.update_folder_intelligence_config 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 + + ## + # Returns the Organization scoped singleton IntelligenceConfig resource. + # + # @overload get_organization_intelligence_config(request, options = nil) + # Pass arguments to `get_organization_intelligence_config` via a request object, either of type + # {::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest, ::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_organization_intelligence_config(name: nil) + # Pass arguments to `get_organization_intelligence_config` 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 name of the `IntelligenceConfig` resource associated with + # your organization. + # + # Format: `organizations/{org_id}/locations/global/intelligenceConfig` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/storage/control/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest.new + # + # # Call the get_organization_intelligence_config method. + # result = client.get_organization_intelligence_config request + # + # # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig. + # p result + # + def get_organization_intelligence_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest + + # 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_organization_intelligence_config.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::Storage::Control::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_organization_intelligence_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_organization_intelligence_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @storage_control_stub.get_organization_intelligence_config 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 + + ## + # Updates the Organization scoped singleton IntelligenceConfig resource. + # + # @overload update_organization_intelligence_config(request, options = nil) + # Pass arguments to `update_organization_intelligence_config` via a request object, either of type + # {::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest, ::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 update_organization_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_organization_intelligence_config` 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 intelligence_config [::Google::Cloud::Storage::Control::V2::IntelligenceConfig, ::Hash] + # Required. The `IntelligenceConfig` resource to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The `update_mask` that specifies the fields within the + # `IntelligenceConfig` resource that should be modified by this update. Only + # the listed fields are updated. + # @param request_id [::String] + # Optional. The ID that uniquely identifies the request, preventing duplicate + # processing. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/storage/control/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest.new + # + # # Call the update_organization_intelligence_config method. + # result = client.update_organization_intelligence_config request + # + # # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceConfig. + # p result + # + def update_organization_intelligence_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest + + # 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.update_organization_intelligence_config.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::Storage::Control::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.update_organization_intelligence_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_organization_intelligence_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @storage_control_stub.update_organization_intelligence_config 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 + + ## + # Configuration class for the StorageControl REST API. + # + # This class represents the configuration for StorageControl 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::Storage::Control::V2::StorageControl::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 + # # get_project_intelligence_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_project_intelligence_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_project_intelligence_config.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 = "storage.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 StorageControl 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 `get_project_intelligence_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_intelligence_config + ## + # RPC-specific configuration for `update_project_intelligence_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_intelligence_config + ## + # RPC-specific configuration for `get_folder_intelligence_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_folder_intelligence_config + ## + # RPC-specific configuration for `update_folder_intelligence_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_folder_intelligence_config + ## + # RPC-specific configuration for `get_organization_intelligence_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_intelligence_config + ## + # RPC-specific configuration for `update_organization_intelligence_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_organization_intelligence_config + + # @private + def initialize parent_rpcs = nil + get_project_intelligence_config_config = parent_rpcs.get_project_intelligence_config if parent_rpcs.respond_to? :get_project_intelligence_config + @get_project_intelligence_config = ::Gapic::Config::Method.new get_project_intelligence_config_config + update_project_intelligence_config_config = parent_rpcs.update_project_intelligence_config if parent_rpcs.respond_to? :update_project_intelligence_config + @update_project_intelligence_config = ::Gapic::Config::Method.new update_project_intelligence_config_config + get_folder_intelligence_config_config = parent_rpcs.get_folder_intelligence_config if parent_rpcs.respond_to? :get_folder_intelligence_config + @get_folder_intelligence_config = ::Gapic::Config::Method.new get_folder_intelligence_config_config + update_folder_intelligence_config_config = parent_rpcs.update_folder_intelligence_config if parent_rpcs.respond_to? :update_folder_intelligence_config + @update_folder_intelligence_config = ::Gapic::Config::Method.new update_folder_intelligence_config_config + get_organization_intelligence_config_config = parent_rpcs.get_organization_intelligence_config if parent_rpcs.respond_to? :get_organization_intelligence_config + @get_organization_intelligence_config = ::Gapic::Config::Method.new get_organization_intelligence_config_config + update_organization_intelligence_config_config = parent_rpcs.update_organization_intelligence_config if parent_rpcs.respond_to? :update_organization_intelligence_config + @update_organization_intelligence_config = ::Gapic::Config::Method.new update_organization_intelligence_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest/service_stub.rb b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest/service_stub.rb new file mode 100644 index 000000000000..c8b0d4a3948a --- /dev/null +++ b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/storage/control/v2/storage_control_pb" + +module Google + module Cloud + module Storage + module Control + module V2 + module StorageControl + module Rest + ## + # REST service stub for the StorageControl 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: true, + 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 get_project_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest] + # 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::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # A result object deserialized from the server's reply + def get_project_intelligence_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_project_intelligence_config_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_project_intelligence_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_project_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest] + # 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::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # A result object deserialized from the server's reply + def update_project_intelligence_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_project_intelligence_config_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: "update_project_intelligence_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.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_folder_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest] + # 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::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # A result object deserialized from the server's reply + def get_folder_intelligence_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_folder_intelligence_config_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_folder_intelligence_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_folder_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest] + # 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::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # A result object deserialized from the server's reply + def update_folder_intelligence_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_folder_intelligence_config_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: "update_folder_intelligence_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.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_organization_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest] + # 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::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # A result object deserialized from the server's reply + def get_organization_intelligence_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_intelligence_config_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_organization_intelligence_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_organization_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest] + # 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::Storage::Control::V2::IntelligenceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Storage::Control::V2::IntelligenceConfig] + # A result object deserialized from the server's reply + def update_organization_intelligence_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_organization_intelligence_config_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: "update_organization_intelligence_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.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 get_project_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest] + # 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_project_intelligence_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/intelligenceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_project_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_project_intelligence_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{intelligence_config.name}", + body: "intelligence_config", + matches: [ + ["intelligence_config.name", %r{^projects/[^/]+/locations/[^/]+/intelligenceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_folder_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest] + # 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_folder_intelligence_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/intelligenceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_folder_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_folder_intelligence_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{intelligence_config.name}", + body: "intelligence_config", + matches: [ + ["intelligence_config.name", %r{^folders/[^/]+/locations/[^/]+/intelligenceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_organization_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest] + # 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_organization_intelligence_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/intelligenceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_organization_intelligence_config REST call + # + # @param request_pb [::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_organization_intelligence_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{intelligence_config.name}", + body: "intelligence_config", + matches: [ + ["intelligence_config.name", %r{^organizations/[^/]+/locations/[^/]+/intelligenceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-storage-control-v2/test/google/cloud/storage/control/v2/storage_control_rest_test.rb b/google-cloud-storage-control-v2/test/google/cloud/storage/control/v2/storage_control_rest_test.rb new file mode 100644 index 000000000000..a31634ca6094 --- /dev/null +++ b/google-cloud-storage-control-v2/test/google/cloud/storage/control/v2/storage_control_rest_test.rb @@ -0,0 +1,429 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/storage/control/v2/storage_control_pb" +require "google/cloud/storage/control/v2/storage_control/rest" + + +class ::Google::Cloud::Storage::Control::V2::StorageControl::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_get_project_intelligence_config + # Create test objects. + client_result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_intelligence_config_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::Storage::Control::V2::StorageControl::Rest::ServiceStub.stub :transcode_get_project_intelligence_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_project_intelligence_config_client_stub do + # Create client + client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_project_intelligence_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_project_intelligence_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_project_intelligence_config ::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_project_intelligence_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_project_intelligence_config(::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_project_intelligence_config_client_stub.call_count + end + end + end + + def test_update_project_intelligence_config + # Create test objects. + client_result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + intelligence_config = {} + update_mask = {} + request_id = "hello world" + + update_project_intelligence_config_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::Storage::Control::V2::StorageControl::Rest::ServiceStub.stub :transcode_update_project_intelligence_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_project_intelligence_config_client_stub do + # Create client + client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_project_intelligence_config({ intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_project_intelligence_config intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_project_intelligence_config ::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest.new(intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_project_intelligence_config({ intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_project_intelligence_config(::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest.new(intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_project_intelligence_config_client_stub.call_count + end + end + end + + def test_get_folder_intelligence_config + # Create test objects. + client_result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_folder_intelligence_config_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::Storage::Control::V2::StorageControl::Rest::ServiceStub.stub :transcode_get_folder_intelligence_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_folder_intelligence_config_client_stub do + # Create client + client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_folder_intelligence_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_folder_intelligence_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_folder_intelligence_config ::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_folder_intelligence_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_folder_intelligence_config(::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_folder_intelligence_config_client_stub.call_count + end + end + end + + def test_update_folder_intelligence_config + # Create test objects. + client_result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + intelligence_config = {} + update_mask = {} + request_id = "hello world" + + update_folder_intelligence_config_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::Storage::Control::V2::StorageControl::Rest::ServiceStub.stub :transcode_update_folder_intelligence_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_folder_intelligence_config_client_stub do + # Create client + client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_folder_intelligence_config({ intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_folder_intelligence_config intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_folder_intelligence_config ::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest.new(intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_folder_intelligence_config({ intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_folder_intelligence_config(::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest.new(intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_folder_intelligence_config_client_stub.call_count + end + end + end + + def test_get_organization_intelligence_config + # Create test objects. + client_result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_intelligence_config_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::Storage::Control::V2::StorageControl::Rest::ServiceStub.stub :transcode_get_organization_intelligence_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_organization_intelligence_config_client_stub do + # Create client + client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_organization_intelligence_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_organization_intelligence_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_organization_intelligence_config ::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_organization_intelligence_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_organization_intelligence_config(::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_organization_intelligence_config_client_stub.call_count + end + end + end + + def test_update_organization_intelligence_config + # Create test objects. + client_result = ::Google::Cloud::Storage::Control::V2::IntelligenceConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + intelligence_config = {} + update_mask = {} + request_id = "hello world" + + update_organization_intelligence_config_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::Storage::Control::V2::StorageControl::Rest::ServiceStub.stub :transcode_update_organization_intelligence_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_organization_intelligence_config_client_stub do + # Create client + client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_organization_intelligence_config({ intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_organization_intelligence_config intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_organization_intelligence_config ::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest.new(intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_organization_intelligence_config({ intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_organization_intelligence_config(::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest.new(intelligence_config: intelligence_config, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_organization_intelligence_config_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::Storage::Control::V2::StorageControl::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::Storage::Control::V2::StorageControl::Rest::Client::Configuration, config + end +end From 04cb1ca14923f3d22f2e6f77b3bac433bf380f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Mon, 14 Jul 2025 11:57:27 -0700 Subject: [PATCH 194/457] feat: Introduce google-cloud-pubsub-v2 (#30349) feat!: The existing resource management API will be deprecated, and replaced with the gRPC autogenerated surface. It includes CRUDL operations for topics, subscriptions, snapshots, and schemas as well as IAM. All legacy handwritten resource management classes are now deleted and operations will be performed via the generated clients. feat!: Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages. feat!: Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile) feat: Introduce path helper methods for accessing resources --- google-cloud-pubsub/OVERVIEW.md | 332 ++-- .../acceptance/pubsub/async_test.rb | 124 +- .../acceptance/pubsub/pubsub_test.rb | 430 ++--- .../acceptance/pubsub/schema_test.rb | 144 -- .../acceptance/pubsub/service_test.rb | 16 +- .../acceptance/pubsub_helper.rb | 20 +- .../lib/google/cloud/pubsub.rb | 2 +- .../google/cloud/pubsub/async_publisher.rb | 12 +- .../lib/google/cloud/pubsub/errors.rb | 6 +- .../lib/google/cloud/pubsub/message.rb | 4 +- .../google/cloud/pubsub/message_listener.rb | 413 +++++ .../enumerator_queue.rb | 2 +- .../inventory.rb | 6 +- .../sequencer.rb | 2 +- .../stream.rb | 20 +- .../timed_unary_buffer.rb | 2 +- .../lib/google/cloud/pubsub/project.rb | 625 ++----- .../lib/google/cloud/pubsub/publisher.rb | 374 +++++ .../google/cloud/pubsub/received_message.rb | 69 +- .../lib/google/cloud/pubsub/schema.rb | 378 ----- .../lib/google/cloud/pubsub/schema/list.rb | 180 -- .../lib/google/cloud/pubsub/service.rb | 404 +---- .../lib/google/cloud/pubsub/snapshot.rb | 205 --- .../lib/google/cloud/pubsub/snapshot/list.rb | 178 -- .../lib/google/cloud/pubsub/subscriber.rb | 719 ++++---- .../lib/google/cloud/pubsub/subscription.rb | 1467 ----------------- .../google/cloud/pubsub/subscription/list.rb | 205 --- .../cloud/pubsub/subscription/push_config.rb | 268 --- .../lib/google/cloud/pubsub/topic.rb | 1100 ------------ .../lib/google/cloud/pubsub/topic/list.rb | 171 -- .../async_publisher/message_ordering_test.rb | 24 +- .../cloud/pubsub/async_publisher_test.rb | 98 +- .../cloud/pubsub/batch_publisher_test.rb | 58 +- .../acknowledge_test.rb | 93 +- .../error_test.rb | 30 +- .../inventory_test.rb | 128 +- .../message_ordering_test.rb | 44 +- .../modify_ack_deadline_test.rb | 44 +- .../nack_test.rb | 45 +- .../restart_test.rb | 22 +- .../stream_test.rb | 114 +- .../timed_unary_buffer_test.rb | 212 +-- .../cloud/pubsub/message_listener_test.rb | 77 + .../test/google/cloud/pubsub/policy_test.rb | 37 - .../cloud/pubsub/project/schemas_test.rb | 499 ------ .../cloud/pubsub/project/snapshots_test.rb | 222 --- .../pubsub/project/subscriptions_test.rb | 364 ---- .../cloud/pubsub/project/topics_test.rb | 620 ------- .../test/google/cloud/pubsub/project_test.rb | 29 - .../message_ordering_test.rb | 16 +- .../ordered_messages_test.rb | 118 +- .../publish_async_test.rb | 213 +-- .../{topic => publisher}/publish_test.rb | 52 +- .../google/cloud/pubsub/publisher_test.rb | 144 ++ .../cloud/pubsub/received_message_test.rb | 22 +- .../pubsub/schema/partial/schema_test.rb | 105 -- .../pubsub/schema/reference/schema_test.rb | 116 -- .../pubsub/schema/resource/schema_test.rb | 106 -- .../test/google/cloud/pubsub/service_test.rb | 56 +- .../test/google/cloud/pubsub/snapshot_test.rb | 104 -- .../cloud/pubsub/subscriber/attrs_test.rb | 83 + .../exists_test.rb | 29 +- .../{subscription => subscriber}/lazy_test.rb | 18 +- .../cloud/pubsub/subscriber/listen_test.rb | 192 +++ .../{subscription => subscriber}/name_test.rb | 20 +- .../{subscription => subscriber}/pull_test.rb | 26 +- .../pull_wait_test.rb | 16 +- .../reload_test.rb | 45 +- .../google/cloud/pubsub/subscriber_test.rb | 134 +- .../pubsub/subscription/acknowledge_test.rb | 274 --- .../cloud/pubsub/subscription/attrs_test.rb | 421 ----- .../cloud/pubsub/subscription/delete_test.rb | 71 - .../cloud/pubsub/subscription/detach_test.rb | 63 - .../cloud/pubsub/subscription/listen_test.rb | 271 --- .../subscription/modify_ack_deadline_test.rb | 286 ---- .../cloud/pubsub/subscription/policy_test.rb | 245 --- .../pubsub/subscription/push_config_test.rb | 36 - .../cloud/pubsub/subscription/seek_test.rb | 94 -- .../cloud/pubsub/subscription/update_test.rb | 562 ------- .../google/cloud/pubsub/subscription_test.rb | 205 --- .../google/cloud/pubsub/topic/attrs_test.rb | 172 -- .../cloud/pubsub/topic/autocreate_test.rb | 34 - .../google/cloud/pubsub/topic/exists_test.rb | 61 - .../google/cloud/pubsub/topic/lazy_test.rb | 37 - .../google/cloud/pubsub/topic/name_test.rb | 24 - .../google/cloud/pubsub/topic/policy_test.rb | 244 --- .../google/cloud/pubsub/topic/reload_test.rb | 72 - .../cloud/pubsub/topic/subscribe_test.rb | 86 - .../cloud/pubsub/topic/subscription_test.rb | 132 -- .../cloud/pubsub/topic/subscriptions_test.rb | 77 - .../google/cloud/pubsub/topic/update_test.rb | 247 --- .../test/google/cloud/pubsub/topic_test.rb | 726 -------- google-cloud-pubsub/test/helper.rb | 2 +- 93 files changed, 3182 insertions(+), 13513 deletions(-) delete mode 100644 google-cloud-pubsub/acceptance/pubsub/schema_test.rb create mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb rename google-cloud-pubsub/lib/google/cloud/pubsub/{subscriber => message_listener}/enumerator_queue.rb (98%) rename google-cloud-pubsub/lib/google/cloud/pubsub/{subscriber => message_listener}/inventory.rb (95%) rename google-cloud-pubsub/lib/google/cloud/pubsub/{subscriber => message_listener}/sequencer.rb (99%) rename google-cloud-pubsub/lib/google/cloud/pubsub/{subscriber => message_listener}/stream.rb (96%) rename google-cloud-pubsub/lib/google/cloud/pubsub/{subscriber => message_listener}/timed_unary_buffer.rb (99%) create mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/publisher.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/schema.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/schema/list.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/snapshot.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/snapshot/list.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/subscription.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/subscription/list.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/subscription/push_config.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/topic.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/topic/list.rb rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/acknowledge_test.rb (63%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/error_test.rb (77%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/inventory_test.rb (72%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/message_ordering_test.rb (85%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/modify_ack_deadline_test.rb (81%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/nack_test.rb (80%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/restart_test.rb (81%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/stream_test.rb (71%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscriber => message_listener}/timed_unary_buffer_test.rb (78%) create mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/message_listener_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/policy_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/project/schemas_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/project/snapshots_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/project/subscriptions_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/project/topics_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/project_test.rb rename google-cloud-pubsub/test/google/cloud/pubsub/{topic => publisher}/message_ordering_test.rb (86%) rename google-cloud-pubsub/test/google/cloud/pubsub/{topic => publisher}/ordered_messages_test.rb (52%) rename google-cloud-pubsub/test/google/cloud/pubsub/{topic => publisher}/publish_async_test.rb (50%) rename google-cloud-pubsub/test/google/cloud/pubsub/{topic => publisher}/publish_test.rb (84%) create mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/publisher_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/schema/partial/schema_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/schema/reference/schema_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/schema/resource/schema_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/snapshot_test.rb create mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscriber/attrs_test.rb rename google-cloud-pubsub/test/google/cloud/pubsub/{subscription => subscriber}/exists_test.rb (72%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscription => subscriber}/lazy_test.rb (65%) create mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscriber/listen_test.rb rename google-cloud-pubsub/test/google/cloud/pubsub/{subscription => subscriber}/name_test.rb (67%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscription => subscriber}/pull_test.rb (75%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscription => subscriber}/pull_wait_test.rb (80%) rename google-cloud-pubsub/test/google/cloud/pubsub/{subscription => subscriber}/reload_test.rb (66%) delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/acknowledge_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/attrs_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/delete_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/detach_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/listen_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/modify_ack_deadline_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/policy_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/push_config_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/seek_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription/update_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/subscription_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/attrs_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/autocreate_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/exists_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/lazy_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/name_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/policy_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/reload_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/subscribe_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/subscription_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/subscriptions_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic/update_test.rb delete mode 100644 google-cloud-pubsub/test/google/cloud/pubsub/topic_test.rb diff --git a/google-cloud-pubsub/OVERVIEW.md b/google-cloud-pubsub/OVERVIEW.md index 42d5d3180add..3b184ca1d5a8 100644 --- a/google-cloud-pubsub/OVERVIEW.md +++ b/google-cloud-pubsub/OVERVIEW.md @@ -19,96 +19,130 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -topic = pubsub.topic "my-topic" -topic.publish "task completed" +publisher = pubsub.publisher "my-topic" +publisher.publish "topic-message" + +subscriber = pubsub.subscriber "my-topic-sub" +subscriber.listen do |received_message| + puts "Message: #{received_message.message.data}" + received_message.acknowledge! +end ``` +This guide provides an overview of the client library's operations, which are categorized +into Admin Operations and Data Plane Operations. + +* **Admin Operations**: Used for creating, configuring, and managing Pub/Sub resources (topics, subscriptions, schemas). +* **Data Plane Operations**: For the core functionality of publishing and receiving messages. + To learn more about Pub/Sub, read the [Google Cloud Pub/Sub Overview ](https://cloud.google.com/pubsub/overview). -## Retrieving Topics +## Admin Operations + +### Topic Admin Client -A Topic is a named resource to which messages are sent by publishers. A Topic is -found by its name. (See {Google::Cloud::PubSub::Project#topic Project#topic}) +Manages topic resources. ```ruby require "google/cloud/pubsub" -pubsub = Google::Cloud::PubSub.new -topic = pubsub.topic "my-topic" +pubsub = Google::Cloud::PubSub.new project_id: "my-project-id" +topic_admin = pubsub.topic_admin ``` -## Creating a Topic +#### Creating a Topic -A Topic is created from a Project. (See -{Google::Cloud::PubSub::Project#create_topic Project#create_topic}) +A Topic is a named resource to which messages are sent by publishers. The resource must be created using +a topic admin client before it can be used. ```ruby -require "google/cloud/pubsub" +topic_path = pubsub.topic_path "my-topic" +topic = topic_admin.create_topic name: topic_path -pubsub = Google::Cloud::PubSub.new -topic = pubsub.create_topic "my-topic" +puts "Topic #{topic.name} created." ``` -## Retrieving Subscriptions +#### Retrieving a Topic -A Subscription is a named resource representing the stream of messages from a -single, specific Topic, to be delivered to the subscribing application. A -Subscription is found by its name. (See -{Google::Cloud::PubSub::Topic#subscription Topic#subscription}) +A Topic is found by its full name. ```ruby -require "google/cloud/pubsub" - -pubsub = Google::Cloud::PubSub.new +topic_name = "my-topic" +topic_path = pubsub.topic_path topic_name # Format is `projects/#{project_id}/topics/#{topic_name}` +topic = topic_admin.get_topic topic: topic_path -topic = pubsub.topic "my-topic" -subscription = topic.subscription "my-topic-subscription" -puts subscription.name +puts "Topic: #{topic.name}." ``` -## Creating a Subscription +### Subscription Admin Client -A Subscription is created from a Topic. (See -{Google::Cloud::PubSub::Topic#subscribe Topic#subscribe}) +Manages subscription and snapshot resources. ```ruby require "google/cloud/pubsub" -pubsub = Google::Cloud::PubSub.new +pubsub = Google::Cloud::PubSub.new project_id: "my-project-id" +subscription_admin = pubsub.subscription_admin +``` + + +#### Creating a Subscription + +A Subscription is a named resource representing the stream of messages from a +single, specific Topic, to be delivered to the subscribing application. -topic = pubsub.topic "my-topic" -sub = topic.subscribe "my-topic-sub" -puts sub.name # => "my-topic-sub" +```ruby +topic_path = pubsub.topic_path "my-topic" # Already created Topic resource +subscription_path = pubsub.subscription_path "my-topic-subscription" +subscription = subscription_admin.create_subscription name: subscription_path, topic: topic_path ``` The subscription can be created that specifies the number of seconds to wait to be acknowledged as well as an endpoint URL to push the messages to: ```ruby -require "google/cloud/pubsub" +topic_path = pubsub.topic_path "my-topic" # Already created Topic resource +subscription_path = pubsub.subscription_path "my-topic-subscription" +push_config = Google::Cloud::PubSub::V1::PushConfig.new push_endpoint: "https://example.com/push" +subscription = subscription_admin.create_subscription name: subscription_path, topic: topic_path, + push_config: push_config, + ack_deadline_seconds: 120 +``` -pubsub = Google::Cloud::PubSub.new +#### Retrieving Subscriptions + +A Subscription is found by its name. -topic = pubsub.topic "my-topic" -sub = topic.subscribe "my-topic-sub", - deadline: 120, - endpoint: "https://example.com/push" +```ruby +subscription_path = pubsub.subscription_path "my-topic-subscription" +subscription = subscription_admin.get_subscription subscription: subscription_path +``` + +## Data Plane Operations + +### Publisher Client + +```ruby +require "google/cloud/pubsub" + +pubsub = Google::Cloud::PubSub.new project_id: "my-project-id" +publisher = pubsub.publisher "my-topic" ``` -## Publishing Messages +#### Publishing Messages Messages are published to a topic. Any message published to a topic without a subscription will be lost. Ensure the topic has a subscription before -publishing. (See {Google::Cloud::PubSub::Topic#publish Topic#publish}) +publishing. ```ruby require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -topic = pubsub.topic "my-topic" -msg = topic.publish "task completed" +publisher = pubsub.publisher "my-topic" +msg = publisher.publish "task completed" ``` Messages can also be published with attributes: @@ -118,14 +152,14 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -topic = pubsub.topic "my-topic" -msg = topic.publish "task completed", +publisher = pubsub.publisher "my-topic" +msg = publisher.publish "task completed", foo: :bar, this: :that ``` Messages can also be published in batches asynchronously using `publish_async`. -(See {Google::Cloud::PubSub::Topic#publish_async Topic#publish_async} and +(See {Google::Cloud::PubSub::Publisher#publish_async Publisher#publish_async} and {Google::Cloud::PubSub::AsyncPublisher AsyncPublisher}) ```ruby @@ -133,8 +167,8 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -topic = pubsub.topic "my-topic" -topic.publish_async "task completed" do |result| +publisher = pubsub.publisher "my-topic" +publisher.publish_async "task completed" do |result| if result.succeeded? log_publish_success result.data else @@ -142,7 +176,7 @@ topic.publish_async "task completed" do |result| end end -topic.async_publisher.stop! +publisher.async_publisher.stop! ``` Or multiple messages can be published in batches at the same time by passing a @@ -153,57 +187,67 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -topic = pubsub.topic "my-topic" -msgs = topic.publish do |batch| +publisher = pubsub.publisher "my-topic" +msgs = publisher.publish do |batch| batch.publish "task 1 completed", foo: :bar batch.publish "task 2 completed", foo: :baz batch.publish "task 3 completed", foo: :bif end ``` -## Receiving Messages +### Subscriber Client + +```ruby +require "google/cloud/pubsub" + +pubsub = Google::Cloud::PubSub.new project_id: "my-project-id" +publisher = pubsub.subscriber "my-topic-subscription" + +``` + +#### Receiving Messages Messages can be streamed from a subscription with a subscriber object that is -created using `listen`. (See {Google::Cloud::PubSub::Subscription#listen -Subscription#listen} and {Google::Cloud::PubSub::Subscriber Subscriber}) +created using `listen`. (See {Google::Cloud::PubSub::Subscriber#listen +Subscriber#listen} and {Google::Cloud::PubSub::MessageListener MessageListener}) ```ruby require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" +subscriber = pubsub.subscriber "my-topic-sub" -# Create a subscriber to listen for available messages. +# Create a MessageListener to listen for available messages. # By default, this block will be called on 8 concurrent threads # but this can be tuned with the `threads` option. # The `streams` and `inventory` parameters allow further tuning. -subscriber = sub.listen threads: { callback: 16 } do |received_message| +listener = subscriber.listen threads: { callback: 16 } do |received_message| # process message puts "Data: #{received_message.message.data}, published at #{received_message.message.published_at}" received_message.acknowledge! end # Handle exceptions from listener -subscriber.on_error do |exception| +listener.on_error do |exception| puts "Exception: #{exception.class} #{exception.message}" end # Gracefully shut down the subscriber on program exit, blocking until # all received messages have been processed or 10 seconds have passed at_exit do - subscriber.stop!(10) + listener.stop!(10) end # Start background threads that will call the block passed to listen. -subscriber.start +listener.start # Block, letting processing threads continue in the background sleep ``` Messages also can be pulled directly in a one-time operation. (See -{Google::Cloud::PubSub::Subscription#pull Subscription#pull}) +{Google::Cloud::PubSub::Subscriber#pull Subscriber#pull}) The `immediate: false` option is recommended to avoid adverse impacts on the performance of pull operations. @@ -213,8 +257,8 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" -received_messages = sub.pull immediate: false +subscriber = pubsub.subscriber "my-topic-sub" +received_messages = subscriber.pull immediate: false ``` A maximum number of messages to pull can be specified: @@ -224,14 +268,14 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" -received_messages = sub.pull immediate: false, max: 10 +subscriber = pubsub.subscriber "my-topic-sub" +received_messages = subscriber.pull immediate: false, max: 10 ``` -## Acknowledging a Message +#### Acknowledging a Message -Messages that are received can be acknowledged in Pub/Sub, marking the message -to be removed so it cannot be pulled again. +Messages that are received can be acknowledged in Pub/Sub, signaling the server +not to deliver them again. A Message that can be acknowledged is called a ReceivedMessage. ReceivedMessages can be acknowledged one at a time: (See @@ -243,34 +287,34 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" +subscriber = pubsub.subscriber "my-topic-sub" -subscriber = sub.listen do |received_message| +listener = subscriber.listen do |received_message| # process message received_message.acknowledge! end # Start background threads that will call the block passed to listen. -subscriber.start +listener.start # Shut down the subscriber when ready to stop receiving messages. -subscriber.stop! +listener.stop! ``` Or, multiple messages can be acknowledged in a single API call: (See -{Google::Cloud::PubSub::Subscription#acknowledge Subscription#acknowledge}) +{Google::Cloud::PubSub::Subscriber#acknowledge Subscriber#acknowledge}) ```ruby require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" -received_messages = sub.pull immediate: false -sub.acknowledge received_messages +subscriber = pubsub.subscriber "my-topic-sub" +received_messages = subscriber.pull immediate: false +subscriber.acknowledge received_messages ``` -## Modifying a Deadline +#### Modifying a Deadline A message must be acknowledged after it is pulled, or Pub/Sub will mark the message for redelivery. The message acknowledgement deadline can delayed if more @@ -284,8 +328,8 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" -subscriber = sub.listen do |received_message| +subscriber = pubsub.subscriber "my-topic-sub" +listener = subscriber.listen do |received_message| puts received_message.message.data # Delay for 2 minutes @@ -293,10 +337,10 @@ subscriber = sub.listen do |received_message| end # Start background threads that will call the block passed to listen. -subscriber.start +listener.start # Shut down the subscriber when ready to stop receiving messages. -subscriber.stop! +listener.stop! ``` The message can also be made available for immediate redelivery: @@ -306,8 +350,8 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" -subscriber = sub.listen do |received_message| +subscriber = pubsub.subscriber "my-topic-sub" +listener = subscriber.listen do |received_message| puts received_message.message.data # Mark for redelivery @@ -315,27 +359,27 @@ subscriber = sub.listen do |received_message| end # Start background threads that will call the block passed to listen. -subscriber.start +listener.start # Shut down the subscriber when ready to stop receiving messages. -subscriber.stop! +listener.stop! ``` Multiple messages can be delayed or made available for immediate redelivery: -(See {Google::Cloud::PubSub::Subscription#modify_ack_deadline -Subscription#modify_ack_deadline}) +(See {Google::Cloud::PubSub::Subscriber#modify_ack_deadline +Subscriber#modify_ack_deadline}) ```ruby require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" -received_messages = sub.pull immediate: false -sub.modify_ack_deadline 120, received_messages +subscriber = pubsub.subscriber "my-topic-sub" +received_messages = subscriber.pull immediate: false +subscriber.modify_ack_deadline 120, received_messages ``` -## Using Ordering Keys +### Using Ordering Keys Google Cloud Pub/Sub ordering keys provide the ability to ensure related messages are sent to subscribers in the order in which they were published. @@ -349,50 +393,47 @@ messages for different ordering keys across subscribers. Note: At the time of this release, ordering keys are not yet publicly enabled and requires special project enablements. -### Publishing Ordered Messages +#### Publishing Ordered Messages To use ordering keys when publishing messages, a call to -{Google::Cloud::PubSub::Topic#enable_message_ordering! -Topic#enable_message_ordering!} must be made and the `ordering_key` argument -must be provided when calling {Google::Cloud::PubSub::Topic#publish_async -Topic#publish_async}. +{Google::Cloud::PubSub::Publisher#enable_message_ordering! +Publisher#enable_message_ordering!} must be made and the `ordering_key` argument +must be provided when calling {Google::Cloud::PubSub::Publisher#publish_async +Publisher#publish_async}. ```ruby require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -topic = pubsub.topic "my-ordered-topic" +publisher = pubsub.publisher "my-ordered-topic" # Ensure that message ordering is enabled. -topic.enable_message_ordering! +publisher.enable_message_ordering! # Publish an ordered message with an ordering key. -topic.publish_async "task completed", +publisher.publish_async "task completed", ordering_key: "task-key" # Shut down the publisher when ready to stop publishing messages. -topic.async_publisher.stop! +publisher.async_publisher.stop! ``` -### Handling errors with Ordered Keys +#### Handling errors with Ordered Keys Ordered messages that fail to publish to the Pub/Sub API due to error will put the `ordering_key` in a failed state, and future calls to -{Google::Cloud::PubSub::Topic#publish_async Topic#publish_async} with the +{Google::Cloud::PubSub::Publisher#publish_async Publisher#publish_async} with the `ordering_key` will raise {Google::Cloud::PubSub::OrderingKeyError OrderingKeyError}. To allow future messages with the `ordering_key` to be published, the `ordering_key` must be passed to -{Google::Cloud::PubSub::Topic#resume_publish Topic#resume_publish}. +{Google::Cloud::PubSub::Publisher#resume_publish Publisher#resume_publish}. -### Receiving Ordered Messages +#### Receiving Ordered Messages To use ordering keys when subscribing to messages, the subscription must be -created with message ordering enabled (See -{Google::Cloud::PubSub::Topic#subscribe Topic#subscribe} and -{Google::Cloud::PubSub::Subscription#message_ordering? -Subscription#message_ordering?}) before calling -{Google::Cloud::PubSub::Subscription#listen Subscription#listen}. When enabled, +created with message ordering enabled before calling +{Google::Cloud::PubSub::Subscriber#listen Subscriber#listen}. When enabled, the subscriber will deliver messages with the same `ordering_key` in the order they were published. @@ -401,30 +442,31 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-ordered-topic-sub" -sub.message_ordering? #=> true +subscription = ... # "my-ordered-topic-sub" subscription with message ordering enabled +puts subscription.enable_message_ordering #=> true -subscriber = sub.listen do |received_message| +subscriber = pubsub.subscriber "my-ordered-topic-sub" + +listener = subscriber.listen do |received_message| # Messsages with the same ordering_key are received # in the order in which they were published. received_message.acknowledge! end # Start background threads that will call block passed to listen. -subscriber.start +listener.start # Shut down the subscriber when ready to stop receiving messages. -subscriber.stop! +listener.stop! ``` -## Minimizing API calls before receiving and acknowledging messages +### Minimizing API calls before receiving and acknowledging messages -A subscription object can be created without making any API calls by providing -the `skip_lookup` argument to {Google::Cloud::PubSub::Project#subscription -Project#subscription} or {Google::Cloud::PubSub::Topic#subscription -Topic#subscription}. A subscriber object can also be created without an API call -by providing the `deadline` optional argument to -{Google::Cloud::PubSub::Subscription#listen Subscription#listen}: +A subscriber object can be created without making any API calls by providing +the `skip_lookup` argument to {Google::Cloud::PubSub::Project#subscriber +Project#subscriber}. A MessageListener object can also be created without an API +call by providing the `deadline` optional argument to +{Google::Cloud::PubSub::Subscriber#listen Subscriber#listen} ```ruby require "google/cloud/pubsub" @@ -432,19 +474,19 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new # No API call is made to retrieve the subscription resource. -sub = pubsub.subscription "my-topic-sub", skip_lookup: true +subscriber = pubsub.subscriber "my-topic-sub", skip_lookup: true # No API call is made to retrieve the subscription deadline. -subscriber = sub.listen deadline: 60 do |received_message| +listener = subscriber.listen deadline: 60 do |received_message| # process message received_message.acknowledge! end # Start background threads that will call block passed to listen. -subscriber.start +listener.start # Shut down the subscriber when ready to stop receiving messages. -subscriber.stop! +listener.stop! ``` Skipping API calls may be used to avoid `Google::Cloud::PermissionDeniedError` @@ -464,30 +506,28 @@ operation. Later, you can use `seek` to reset the subscription's backlog to the snapshot. -(See {Google::Cloud::PubSub::Subscription#create_snapshot -Subscription#create_snapshot} and {Google::Cloud::PubSub::Subscription#seek -Subscription#seek}) - ```ruby require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new -sub = pubsub.subscription "my-topic-sub" - -snapshot = sub.create_snapshot +subscription_admin = pubsub.subscription_admin +snapshot_path = pubsub.snapshot_path "my-snapshot" +subscription = ... # Already created Google::Cloud::PubSub::V1::Subscription +snapshot = subscription_admin.create_snapshot name: snapshot_path, subscription: subscription.name +subscriber = pubsub.subscriber "my-topic-sub" received_messages = sub.pull immediate: false -sub.acknowledge received_messages +subscriber.acknowledge received_messages -sub.seek snapshot +subcription_admin.seek subscription: subscription.name, snapshot: snapshot.name ``` ## Working Across Projects All calls to the Pub/Sub service use the same project and credentials provided to the {Google::Cloud::PubSub.new PubSub.new} method. However, it is common to -reference topics or subscriptions in other projects, which can be achieved by +reference publishers or subscribers in other projects, which can be achieved by using the `project` option. The main credentials must have permissions to the topics and subscriptions in other projects. @@ -496,12 +536,13 @@ require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new # my-project -# Get a topic in the current project -my_topic = pubsub.topic "my-topic" -my_topic.name #=> "projects/my-project/topics/my-topic" -# Get a topic in another project -other_topic = pubsub.topic "other-topic", project: "other-project-id" -other_topic.name #=> "projects/other-project-id/topics/other-topic" +# Get a Publisher for a topic in the current project +publisher = pubsub.publisher "my-topic" +publisher.name #=> "projects/my-project/topics/my-topic" + +# Get a Publisher for a topic in another project +other_publisher = pubsub.publisher "other-topic", project: "other-project-id" +other_publisher.name #=> "projects/other-project-id/topics/other-topic" ``` It is possible to create a subscription in the current project that pulls @@ -511,14 +552,17 @@ from a topic in another project: require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new # my-project +subscription_admin = pubsub.subscription_admin -# Get a topic in another project -topic = pubsub.topic "other-topic", project: "other-project-id" +# Get a Publisher for a topic in another project +publisher = pubsub.publisher "other-topic", project: "other-project-id" # Create a subscription in the current project that pulls from # the topic in another project -sub = topic.subscribe "my-sub" -sub.name #=> "projects/my-project/subscriptions/my-sub" -sub.topic.name #=> "projects/other-project-id/topics/other-topic" +subscription_path = pubsub.subscription_path "my-sub" +subscription = subscription_admin.create_subscription name: subscription_path, topic: publisher.name + +subscription.name #=> "projects/my-project/subscriptions/my-sub" +publisher.name #=> "projects/other-project-id/topics/other-topic" ``` ## Additional information diff --git a/google-cloud-pubsub/acceptance/pubsub/async_test.rb b/google-cloud-pubsub/acceptance/pubsub/async_test.rb index db5e80f177ac..a1cedd6f1542 100644 --- a/google-cloud-pubsub/acceptance/pubsub/async_test.rb +++ b/google-cloud-pubsub/acceptance/pubsub/async_test.rb @@ -17,12 +17,14 @@ describe Google::Cloud::PubSub, :async, :pubsub do def retrieve_topic topic_name, async: nil - pubsub.get_topic(topic_name, async: async) || pubsub.create_topic(topic_name, async: async) + topic_path = pubsub.topic_path topic_name + $topic_admin.get_topic(topic: topic_path) rescue $topic_admin.create_topic(name: topic_path) end - def retrieve_subscription topic, subscription_name - topic.get_subscription(subscription_name) || - topic.subscribe(subscription_name) + def retrieve_subscription topic, subscription_name, enable_message_ordering: false + subscription_path = pubsub.subscription_path subscription_name + $subscription_admin.get_subscription(subscription: subscription_path) \ + rescue $subscription_admin.create_subscription(name: subscription_path, topic: topic.name, enable_message_ordering: enable_message_ordering) end let(:nonce) { rand 100 } @@ -40,11 +42,13 @@ def retrieve_subscription topic, subscription_name let(:topic_flow_control) { retrieve_topic "#{$topic_prefix}-async#{nonce}", async: async_flow_control } it "publishes and pulls asyncronously" do - events = sub.pull + subscriber = pubsub.subscriber sub.name + events = subscriber.pull _(events).must_be :empty? # Publish a new message publish_result = nil - topic.publish_async "hello" do |result| + publisher = pubsub.publisher topic.name + publisher.publish_async "hello" do |result| publish_result = result assert_equal "hello", result.msg.data end @@ -60,12 +64,12 @@ def retrieve_subscription topic, subscription_name _(publish_result).must_be :succeeded? received_message = nil - subscriber = sub.listen do |msg| + listener = subscriber.listen do |msg| received_message = msg # Acknowledge the message msg.ack! end - subscriber.start + listener.start subscription_retries = 0 while received_message.nil? @@ -77,22 +81,25 @@ def retrieve_subscription topic, subscription_name _(received_message).wont_be :nil? _(received_message.data).must_equal publish_result.data - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! # Remove the subscription - sub.delete + $subscription_admin.delete_subscription(subscription: pubsub.subscription_path(sub.name)) end it "publishes and pulls ordered messages" do - topic = pubsub.create_topic "#{$topic_prefix}-omt-#{SecureRandom.hex(2)}" - topic.enable_message_ordering! - assert topic.message_ordering? + topic = retrieve_topic "#{$topic_prefix}-omt-#{SecureRandom.hex(2)}" + + sub = retrieve_subscription topic, "#{$topic_prefix}-oms2-#{SecureRandom.hex(2)}", enable_message_ordering: true - sub = topic.subscribe "#{$topic_prefix}-oms-#{SecureRandom.hex(2)}", message_ordering: true - assert sub.message_ordering? + assert sub.enable_message_ordering - events = sub.pull + publisher = pubsub.publisher topic.name + publisher.enable_message_ordering! + subscriber = pubsub.subscriber sub.name + + events = subscriber.pull _(events).must_be :empty? expected_message_hash = { @@ -116,7 +123,7 @@ def retrieve_subscription topic, subscription_name publish_result = nil expected_message_hash[key].each do |data| # Publish a new message with ordering key - topic.publish_async data, ordering_key: key do |result| + publisher.publish_async data, ordering_key: key do |result| publish_result = result assert_equal data, result.msg.data end @@ -135,15 +142,15 @@ def retrieve_subscription topic, subscription_name end received_message_hash = Hash.new { |hash, key| hash[key] = [] } - subscriber = sub.listen do |msg| + listener = subscriber.listen do |msg| received_message_hash[msg.ordering_key].push msg.data # Acknowledge the message msg.ack! end - subscriber.on_error do |error| + listener.on_error do |error| fail error.inspect end - subscriber.start + listener.start counter = 0 deadline = 300 # 5 min @@ -152,30 +159,33 @@ def retrieve_subscription topic, subscription_name counter += 1 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! # Remove the subscription - sub.delete + $subscription_admin.delete_subscription(subscription: pubsub.subscription_path(sub.name)) _(received_message_hash).must_equal expected_message_hash end it "will acknowledge asyncronously after subscriber stop wait!" do - msgs = sub.pull + subscriber = pubsub.subscriber sub.name + publisher = pubsub.publisher topic.name + + msgs = subscriber.pull _(msgs).must_be :empty? # Publish a new message - topic.publish "ack me please" + publisher.publish "ack me please" received_message = nil acked = false - subscriber = sub.listen do |msg| + listener = subscriber.listen do |msg| received_message = msg sleep 3 # Provide enough delay to execute subscriber.stop before msg.ack! msg.ack! acked = true end - subscriber.start + listener.start subscription_retries = 0 while received_message.nil? @@ -186,35 +196,37 @@ def retrieve_subscription topic, subscription_name _(received_message).wont_be :nil? _(received_message.data).must_equal "ack me please" - subscriber.stop # Should return before msg.ack! is called in the callback above. + listener.stop # Should return before msg.ack! is called in the callback above. - subscriber.wait! # Should block until TimedUnaryBuffer finally flushes the msg.ack! in the callback above. + listener.wait! # Should block until TimedUnaryBuffer finally flushes the msg.ack! in the callback above. _(acked).must_equal true - msgs = sub.pull immediate: false + msgs = subscriber.pull immediate: false _(msgs).must_be :empty? # Remove the subscription - sub.delete + $subscription_admin.delete_subscription(subscription: pubsub.subscription_path(sub.name)) end it "will acknowledge asyncronously after subscriber stop only" do - msgs = sub.pull + publisher = pubsub.publisher topic.name + subscriber = pubsub.subscriber sub.name + msgs = subscriber.pull _(msgs).must_be :empty? # Publish a new message - topic.publish "ack me please" + publisher.publish "ack me please" received_message = nil acked = false - subscriber = sub.listen do |msg| + listener = subscriber.listen do |msg| received_message = msg sleep 3 # Provide enough delay to execute subscriber.stop before msg.ack! msg.ack! acked = true end - subscriber.start + listener.start subscription_retries = 0 while received_message.nil? @@ -225,35 +237,38 @@ def retrieve_subscription topic, subscription_name _(received_message).wont_be :nil? _(received_message.data).must_equal "ack me please" - subscriber.stop # Should return before msg.ack! is called in the callback above. + listener.stop # Should return before msg.ack! is called in the callback above. sleep 4 # Do not call subscriber.wait! _(acked).must_equal true - msgs = sub.pull immediate: false + msgs = subscriber.pull immediate: false _(msgs).must_be :empty? # Remove the subscription - sub.delete + $subscription_admin.delete_subscription(subscription: pubsub.subscription_path(sub.name)) end it "will acknowledge asyncronously after subscriber wait! followed by stop in a different thread" do - msgs = sub.pull + publisher = pubsub.publisher topic.name + subscriber = pubsub.subscriber sub.name + + msgs = subscriber.pull _(msgs).must_be :empty? # Publish a new message - topic.publish "ack me please" + publisher.publish "ack me please" received_message = nil acked = false - subscriber = sub.listen do |msg| + listener = subscriber.listen do |msg| received_message = msg sleep 3 # Provide enough delay to execute subscriber.stop before msg.ack! msg.ack! acked = true end - subscriber.start + listener.start subscription_retries = 0 while received_message.nil? @@ -266,50 +281,51 @@ def retrieve_subscription topic, subscription_name Thread.new do sleep 4 - subscriber.stop # Follows wait!, below. + listener.stop # Follows wait!, below. end - subscriber.wait! # Should block until TimedUnaryBuffer finally flushes the msg.ack! in the callback above. + listener.wait! # Should block until TimedUnaryBuffer finally flushes the msg.ack! in the callback above. _(acked).must_equal true - msgs = sub.pull immediate: false + msgs = subscriber.pull immediate: false _(msgs).must_be :empty? # Remove the subscription - sub.delete + $subscription_admin.delete_subscription(subscription: pubsub.subscription_path(sub.name)) end it "publishes asyncronously with publisher flow control" do publish_1_done = Concurrent::Event.new publish_2_done = Concurrent::Event.new publish_3_done = Concurrent::Event.new + publisher = pubsub.publisher topic_flow_control.name, async: async_flow_control - topic_flow_control.publish_async("a") { publish_1_done.set } + publisher.publish_async("a") { publish_1_done.set } - flow_controller = topic_flow_control.async_publisher.flow_controller + flow_controller = publisher.async_publisher.flow_controller _(flow_controller.outstanding_messages).must_equal 1 - topic_flow_control.publish_async("b") { publish_2_done.set } + publisher.publish_async("b") { publish_2_done.set } _(flow_controller.outstanding_messages).must_equal 2 # Limit expect do - topic_flow_control.publish_async "c" + publisher.publish_async "c" end.must_raise Google::Cloud::PubSub::FlowControlLimitError # Force the queued messages to be published and wait for events. - topic_flow_control.async_publisher.flush + publisher.async_publisher.flush assert publish_1_done.wait(1), "Publishing message 1 errored." assert publish_2_done.wait(1), "Publishing message 2 errored." _(flow_controller.outstanding_messages).must_equal 0 - topic_flow_control.publish_async("c") { publish_3_done.set } + publisher.publish_async("c") { publish_3_done.set } _(flow_controller.outstanding_messages).must_equal 1 # Force the queued message to be published and wait for event. - topic_flow_control.async_publisher.stop! + publisher.async_publisher.stop! assert publish_3_done.wait(1), "Publishing message 3 errored." _(flow_controller.outstanding_messages).must_equal 0 diff --git a/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb b/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb index 498723708e7c..81ba05d0cd2b 100644 --- a/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb +++ b/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb @@ -18,17 +18,20 @@ describe Google::Cloud::PubSub, :pubsub do def retrieve_topic topic_name - pubsub.get_topic(topic_name) || pubsub.create_topic(topic_name) + topic_path = pubsub.topic_path topic_name + $topic_admin.get_topic(topic: topic_path) rescue $topic_admin.create_topic(name: topic_path) end - def retrieve_subscription topic, subscription_name - topic.get_subscription(subscription_name) || - topic.subscribe(subscription_name) + def retrieve_subscription topic, subscription_name, enable_message_ordering: false + subscription_path = pubsub.subscription_path subscription_name + $subscription_admin.get_subscription(subscription: subscription_path) \ + rescue $subscription_admin.create_subscription(name: subscription_path, topic: topic.name, enable_message_ordering: enable_message_ordering) end - def retrieve_snapshot project, subscription, snapshot_name - existing = project.snapshots.detect { |s| s.name.split("/").last == snapshot_name } - existing || subscription.create_snapshot(snapshot_name) + def retrieve_snapshot subscription, snapshot_name + snapshot_path = pubsub.snapshot_path snapshot_name + $subscription_admin.get_snapshot snapshot: snapshot_path \ + rescue $subscription_admin.create_snapshot name: snapshot_path, subscription: subscription.name end let(:new_topic_name) { $topic_names[0] } @@ -57,47 +60,39 @@ def retrieve_snapshot project, subscription, snapshot_name describe "Topic", :pubsub do it "should be listed" do - topics = pubsub.topics.all + topics = $topic_admin.list_topics(project: pubsub.project_path) topics.each do |topic| - _(topic).must_be_kind_of Google::Cloud::PubSub::Topic + _(topic).must_be_kind_of Google::Cloud::PubSub::V1::Topic end end it "should be created, updated and deleted" do - topic = pubsub.create_topic new_topic_name, - labels: labels, - retention: topic_retention - _(topic).must_be_kind_of Google::Cloud::PubSub::Topic - topic = pubsub.topic(topic.name) - _(topic).wont_be :nil? - - _(topic.labels).must_equal labels - _(topic.labels).must_be :frozen? - topic.labels = {} - _(topic.labels).must_be :empty? - - _(topic.retention).must_equal topic_retention - topic.retention = new_topic_retention - _(topic.retention).must_equal new_topic_retention - - subscription = topic.subscribe "#{$topic_prefix}-sub-topic-retention" - _(subscription.topic_retention).must_equal new_topic_retention - subscription.reload! - _(subscription.topic_retention).must_equal new_topic_retention - - # Clear message retention duration from the topic. - topic.retention = nil - _(topic.retention).must_be :nil? - topic.reload! - _(topic.retention).must_be :nil? - - topic.delete - _(pubsub.topic(topic.name)).must_be :nil? + topic_path = pubsub.topic_path new_topic_name + retention_duration = Google::Cloud::PubSub::Convert.number_to_duration topic_retention + topic = $topic_admin.create_topic name: topic_path, labels: labels, + message_retention_duration: retention_duration + + _(topic).must_be_kind_of Google::Cloud::PubSub::V1::Topic + _(topic.labels.to_h).must_equal labels + _(topic.message_retention_duration).must_equal retention_duration + + + new_retention_duration = Google::Cloud::PubSub::Convert.number_to_duration new_topic_retention + topic.message_retention_duration = new_retention_duration + mask = Google::Protobuf::FieldMask.new paths: ["message_retention_duration"] + $topic_admin.update_topic topic: topic, update_mask: mask + + # Reload topic after update + topic = $topic_admin.get_topic topic: topic_path + _(topic.message_retention_duration).must_equal new_retention_duration + + $topic_admin.delete_topic topic: topic.name end it "should publish a message" do data = "message from me" - msg = pubsub.topic(topic_names.first).publish data, foo: :bar + publisher = pubsub.publisher(topic_names.first) + msg = publisher.publish data, foo: :bar _(msg).wont_be :nil? _(msg).must_be_kind_of Google::Cloud::PubSub::Message @@ -106,7 +101,8 @@ def retrieve_snapshot project, subscription, snapshot_name end it "should publish multiple messages" do - msgs = pubsub.topic(topic_names.first).publish do |batch| + publisher = pubsub.publisher(topic_names.first) + msgs = publisher.publish do |batch| batch.publish "first message" batch.publish "second message" batch.publish "third message", format: :text @@ -118,28 +114,31 @@ def retrieve_snapshot project, subscription, snapshot_name end it "should publish messages with ordering_key" do - topic = pubsub.create_topic "#{$topic_prefix}-omt2-#{SecureRandom.hex(2)}" + topic = retrieve_topic "#{$topic_prefix}-omt2-#{SecureRandom.hex(2)}" + sub = retrieve_subscription topic, "#{$topic_prefix}-oms2-#{SecureRandom.hex(2)}", enable_message_ordering: true - sub = topic.subscribe "#{$topic_prefix}-oms2-#{SecureRandom.hex(2)}", message_ordering: true - assert sub.message_ordering? + assert sub.enable_message_ordering - topic.publish "ordered message 0", ordering_key: "my_key" - topic.publish do |batch| + publisher = pubsub.publisher topic.name + + publisher.publish "ordered message 0", ordering_key: "my_key" + publisher.publish do |batch| batch.publish "ordered message 1", ordering_key: "my_key" batch.publish "ordered message 2", ordering_key: "my_key" batch.publish "ordered message 3", ordering_key: "my_key" end + subscriber = pubsub.subscriber sub.name received_messages = [] - subscriber = sub.listen do |msg| + listener = subscriber.listen do |msg| received_messages.push msg.data # Acknowledge the message msg.ack! end - subscriber.on_error do |error| + listener.on_error do |error| fail error.inspect end - subscriber.start + listener.start counter = 0 deadline = 300 # 5 min @@ -148,10 +147,10 @@ def retrieve_snapshot project, subscription, snapshot_name counter += 1 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! # Remove the subscription - sub.delete + $subscription_admin.delete_subscription(subscription: pubsub.subscription_path(sub.name)) _(received_messages).must_equal ["ordered message 0", "ordered message 1", "ordered message 2", "ordered message 3"] end @@ -167,10 +166,9 @@ def retrieve_snapshot project, subscription, snapshot_name end it "should list all subscriptions registered to the project" do - subscriptions = pubsub.subscriptions.all - subscriptions.each do |subscription| + $subscription_admin.list_subscriptions(project: pubsub.project_path).each do |subscription| # subscriptions on project are objects... - _(subscription).must_be_kind_of Google::Cloud::PubSub::Subscription + _(subscription).must_be_kind_of Google::Cloud::PubSub::V1::Subscription end end end @@ -185,9 +183,9 @@ def retrieve_snapshot project, subscription, snapshot_name let(:retry_minimum_backoff) { 12.123 } let(:retry_maximum_backoff) { 123.321 } let(:retry_policy) do - Google::Cloud::PubSub::RetryPolicy.new( - minimum_backoff: retry_minimum_backoff, - maximum_backoff: retry_maximum_backoff + Google::Cloud::PubSub::V1::RetryPolicy.new( + minimum_backoff: Google::Cloud::PubSub::Convert.number_to_duration(retry_minimum_backoff), + maximum_backoff: Google::Cloud::PubSub::Convert.number_to_duration(retry_maximum_backoff) ) end @@ -198,85 +196,69 @@ def retrieve_snapshot project, subscription, snapshot_name end it "should list all subscriptions registered to the topic" do - subscriptions = topic.subscriptions.all - _(subscriptions.count).must_be :>=, subs.count - subscriptions.each do |subscription| - # subscriptions on topic are strings... - _(subscription).must_be_kind_of Google::Cloud::PubSub::Subscription + response = $topic_admin.list_topic_subscriptions(topic: topic.name) + response.subscriptions.each do |subscription| + _(subscription).must_be_kind_of String end end it "should create, update, detach and delete a subscription" do - # create - # `testdetachsubsxyz` is a special prefix to test the detach feature while pre-release in prod. - subscription = topic.subscribe "testdetachsubsxyz-#{$topic_prefix}-sub-detach", retain_acked: true, - retention: subscription_retention, - labels: labels, - filter: filter, - retry_policy: retry_policy + subscription_path = pubsub.subscription_path "testdetachsubsxyz-#{$topic_prefix}-sub-detach" + retention_duration = Google::Cloud::PubSub::Convert.number_to_duration subscription_retention + + subscription = $subscription_admin.create_subscription name: subscription_path, topic: topic.name, retain_acked_messages: true, + message_retention_duration: retention_duration, labels: labels, + filter: filter, retry_policy: retry_policy + + _(subscription).wont_be :nil? - _(subscription).must_be_kind_of Google::Cloud::PubSub::Subscription - assert subscription.retain_acked - _(subscription.retention).must_equal subscription_retention - _(subscription.labels).must_equal labels - _(subscription.labels).must_be :frozen? + _(subscription).must_be_kind_of Google::Cloud::PubSub::V1::Subscription + assert subscription.retain_acked_messages + _(subscription.message_retention_duration).must_equal retention_duration + _(subscription.labels.to_h).must_equal labels _(subscription.filter).must_equal filter - _(subscription.filter).must_be :frozen? - _(subscription.retry_policy.minimum_backoff).must_equal retry_minimum_backoff - _(subscription.retry_policy.maximum_backoff).must_equal retry_maximum_backoff - _(subscription.detached?).must_equal false + _(subscription.retry_policy).must_equal retry_policy + _(subscription.detached).must_equal false # update - subscription.labels = {} - _(subscription.labels).must_be :empty? subscription.retry_policy = nil - subscription.reload! - _(subscription.retry_policy).must_be :nil? - subscription.retry_policy = Google::Cloud::PubSub::RetryPolicy.new - _(subscription.retry_policy.minimum_backoff).must_equal 10 # Default value - _(subscription.retry_policy.maximum_backoff).must_equal 600 # Default value + mask = Google::Protobuf::FieldMask.new paths: ["retry_policy"] - subscription.retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: retry_minimum_backoff - _(subscription.retry_policy.minimum_backoff).must_equal retry_minimum_backoff - _(subscription.retry_policy.maximum_backoff).must_equal 600 # Default value + $subscription_admin.update_subscription subscription: subscription, update_mask: mask + # Reload subscription after update + subscription = $subscription_admin.get_subscription subscription: subscription.name + _(subscription.retry_policy).must_be :nil? - subscription.retry_policy = Google::Cloud::PubSub::RetryPolicy.new maximum_backoff: retry_maximum_backoff - _(subscription.retry_policy.minimum_backoff).must_equal 10 # Default value - _(subscription.retry_policy.maximum_backoff).must_equal retry_maximum_backoff - # detach - subscription.detach + $topic_admin.detach_subscription subscription: subscription.name # Per #6493, it can take 120 sec+ for the detachment to propagate. In the interim, the detached state is undefined. sleep 120 - subscription.reload! - _(subscription.detached?).must_equal true + subscription = $subscription_admin.get_subscription subscription: subscription.name + _(subscription.detached).must_equal true # delete - subscription.delete - end - - it "should not error when asking for a non-existent subscription" do - subscription = topic.get_subscription "non-existent-subscription" - _(subscription).must_be :nil? + $subscription_admin.delete_subscription subscription: subscription.name end it "should be able to pull and ack" do begin - subscription = topic.subscribe "#{$topic_prefix}-sub4" + subscription = retrieve_subscription topic, "#{$topic_prefix}-sub4" _(subscription).wont_be :nil? - _(subscription).must_be_kind_of Google::Cloud::PubSub::Subscription + _(subscription).must_be_kind_of Google::Cloud::PubSub::V1::Subscription _(subscription.retry_policy).must_be :nil? # No messages, should be empty - received_messages = subscription.pull + subscriber = pubsub.subscriber subscription.name + received_messages = subscriber.pull _(received_messages).must_be :empty? # Publish a new message - msg = topic.publish "hello" + publisher = pubsub.publisher topic.name + msg = publisher.publish "hello" _(msg).wont_be :nil? # Check it received the published message wait_for_condition description: "subscription pull" do - received_messages = subscription.pull immediate: false + received_messages = subscriber.pull immediate: false received_messages.any? end _(received_messages).wont_be :empty? @@ -287,31 +269,34 @@ def retrieve_snapshot project, subscription, snapshot_name _(received_message.msg.data).must_equal msg.data _(received_message.msg.published_at).wont_be :nil? # Acknowledge the message - subscription.ack received_message.ack_id + subscriber.ack received_message.ack_id ensure # Remove the subscription - subscription.delete + $subscription_admin.delete_subscription(subscription: subscription.name) end end it "should be able to pull same message again after ack by seeking to snapshot" do begin - subscription = topic.subscribe "#{$topic_prefix}-sub5" + subscription = retrieve_subscription topic, "#{$topic_prefix}-sub5" _(subscription).wont_be :nil? - _(subscription).must_be_kind_of Google::Cloud::PubSub::Subscription + _(subscription).must_be_kind_of Google::Cloud::PubSub::V1::Subscription # No messages, should be empty - received_messages = subscription.pull + subscriber = pubsub.subscriber subscription.name + received_messages = subscriber.pull _(received_messages).must_be :empty? # Publish a new message - msg = topic.publish "hello-#{rand(1000)}" + publisher = pubsub.publisher topic.name + msg = publisher.publish "hello-#{rand(1000)}" _(msg).wont_be :nil? - snapshot = subscription.create_snapshot labels: labels + snapshot = $subscription_admin.create_snapshot name: nil, subscription: subscription.name, labels: labels + # Check it pulls the message - wait_for_condition description: "subscription pull" do - received_messages = subscription.pull immediate: false + wait_for_condition description: "subscriber pull" do + received_messages = subscriber.pull immediate: false received_messages.any? end _(received_messages).wont_be :empty? @@ -322,18 +307,18 @@ def retrieve_snapshot project, subscription, snapshot_name _(received_message.msg.data).must_equal msg.data _(received_message.msg.published_at).wont_be :nil? # Acknowledge the message - subscription.ack received_message.ack_id + subscriber.ack received_message.ack_id # No messages, should be empty - received_messages = subscription.pull + received_messages = subscriber.pull _(received_messages).must_be :empty? # Reset to the snapshot - subscription.seek snapshot + $subscription_admin.seek subscription: subscription.name, snapshot: snapshot.name # Check it again pulls the message - wait_for_condition description: "subscription pull" do - received_messages = subscription.pull immediate: false + wait_for_condition description: "subscriber pull" do + received_messages = subscriber.pull immediate: false received_messages.any? end _(received_messages.count).must_equal 1 @@ -342,38 +327,28 @@ def retrieve_snapshot project, subscription, snapshot_name _(received_message.delivery_attempt).must_be :nil? _(received_message.msg.data).must_equal msg.data # Acknowledge the message - subscription.ack received_message.ack_id + subscriber.ack received_message.ack_id # No messages, should be empty - received_messages = subscription.pull + received_messages = subscriber.pull _(received_messages).must_be :empty? # No messages, should be empty - received_messages = subscription.pull + received_messages = subscriber.pull _(received_messages).must_be :empty? - - _(snapshot.labels).must_equal labels - _(snapshot.labels).must_be :frozen? - snapshot.labels = {} - _(snapshot.labels).must_be :empty? + _(snapshot.labels.to_h).must_equal labels ensure # Remove the subscription - subscription.delete + $subscription_admin.delete_subscription(subscription: subscription.name) end end - it "creates a push subscription with endpoint parameter" do - subscription = topic.subscribe "#{$topic_prefix}-sub-endpoint", endpoint: "https://pub-sub.test.com/pubsub" - - _(subscription).must_be_kind_of Google::Cloud::PubSub::Subscription - _(subscription.push_config.endpoint).must_equal "https://pub-sub.test.com/pubsub" - end - it "creates a push subscription with push_config" do - push_config = Google::Cloud::PubSub::Subscription::PushConfig.new endpoint: "https://pub-sub.test.com/pubsub" - subscription = topic.subscribe "#{$topic_prefix}-sub-push-config", push_config: push_config + subscription_path = pubsub.subscription_path "#{$topic_prefix}-sub-endpoint" + push_config = Google::Cloud::PubSub::V1::PushConfig.new push_endpoint: "https://pub-sub.test.com/pubsub" + subscription = $subscription_admin.create_subscription name: subscription_path, topic: topic.name, push_config: push_config - _(subscription).must_be_kind_of Google::Cloud::PubSub::Subscription - _(subscription.push_config.endpoint).must_equal "https://pub-sub.test.com/pubsub" + _(subscription).must_be_kind_of Google::Cloud::PubSub::V1::Subscription + _(subscription.push_config.push_endpoint).must_equal "https://pub-sub.test.com/pubsub" end if $project_number @@ -381,29 +356,47 @@ def retrieve_snapshot project, subscription, snapshot_name dead_letter_subscription_2 = nil begin dead_letter_topic = retrieve_topic dead_letter_topic_name - dead_letter_subscription = dead_letter_topic.subscribe "#{$topic_prefix}-dead-letter-sub1" + dead_subscription_path = pubsub.subscription_path "#{$topic_prefix}-dead-letter-sub1" + dead_letter_subscription = $subscription_admin.create_subscription name: dead_subscription_path, topic: dead_letter_topic.name # Dead Letter Queue (DLQ) testing requires IAM bindings to the Cloud Pub/Sub service account that is # automatically created and managed by the service team in a private project. service_account_email = "serviceAccount:service-#{$project_number}@gcp-sa-pubsub.iam.gserviceaccount.com" - dead_letter_topic.policy { |p| p.add "roles/pubsub.publisher", service_account_email } - dead_letter_subscription.policy { |p| p.add "roles/pubsub.subscriber", service_account_email } + # Update Publisher Iam policy + publisher_bindings = Google::Iam::V1::Binding.new role: "roles/pubsub.publisher", members: [service_account_email] + publisher_policy = Google::Iam::V1::Policy.new bindings: [publisher_bindings] + pubsub.iam.set_iam_policy resource: dead_letter_topic.name, policy: publisher_policy + + # Update Subscriber Iam policy + subscriber_bindings = Google::Iam::V1::Binding.new role: "roles/pubsub.subscriber", members: [service_account_email] + subscriber_policy = Google::Iam::V1::Policy.new bindings: [subscriber_bindings] + pubsub.iam.set_iam_policy resource: dead_letter_subscription.name, policy: subscriber_policy # create - subscription = topic.subscribe "#{$topic_prefix}-sub6", dead_letter_topic: dead_letter_topic, dead_letter_max_delivery_attempts: 6 - _(subscription.dead_letter_topic.name).must_equal dead_letter_topic.name - _(subscription.dead_letter_max_delivery_attempts).must_equal 6 + subscription_path = pubsub.subscription_path "#{$topic_prefix}-sub6" + dead_letter_policy = Google::Cloud::PubSub::V1::DeadLetterPolicy.new dead_letter_topic: dead_letter_topic.name, + max_delivery_attempts: 6 + subscription = $subscription_admin.create_subscription name: subscription_path, topic: topic.name, + dead_letter_policy: dead_letter_policy + + _(subscription.dead_letter_policy.dead_letter_topic).must_equal dead_letter_topic.name + _(subscription.dead_letter_policy.max_delivery_attempts).must_equal 6 + + #_(subscription.dead_letter_topic.name).must_equal dead_letter_topic.name + #_(subscription.dead_letter_max_delivery_attempts).must_equal 6 # Publish a new message - msg = topic.publish "dead-letter-#{rand(1000)}" + publisher = pubsub.publisher topic.name + subscriber = pubsub.subscriber subscription.name + msg = publisher.publish "dead-letter-#{rand(1000)}" _(msg).wont_be :nil? # Nack the message (1..7).each do |i| received_messages = [] wait_for_condition description: "subscription pull" do - received_messages = subscription.pull immediate: false + received_messages = subscriber.pull immediate: false received_messages.any? end _(received_messages.count).must_equal 1 @@ -416,7 +409,7 @@ def retrieve_snapshot project, subscription, snapshot_name # Check the dead letter subscription pulls the message received_messages = [] wait_for_condition description: "subscription pull" do - received_messages = subscription.pull immediate: false + received_messages = subscriber.pull immediate: false received_messages.any? end _(received_messages).wont_be :empty? @@ -428,86 +421,95 @@ def retrieve_snapshot project, subscription, snapshot_name # update dead_letter_topic_2 = retrieve_topic dead_letter_topic_name_2 - dead_letter_subscription_2 = dead_letter_topic_2.subscribe "#{$topic_prefix}-dead-letter-sub2" - subscription.dead_letter_topic = dead_letter_topic_2 - _(subscription.dead_letter_topic.name).must_equal dead_letter_topic_2.name - _(subscription.dead_letter_max_delivery_attempts).must_equal 6 + dead_subscription_path_2 = pubsub.subscription_path "#{$topic_prefix}-dead-letter-sub2" + dead_letter_policy_2 = Google::Cloud::PubSub::V1::DeadLetterPolicy.new dead_letter_topic: dead_letter_topic_2.name, + max_delivery_attempts: 5 + + dead_letter_subscription_2 = $subscription_admin.create_subscription name: dead_subscription_path_2, topic: dead_letter_topic_2.name + + subscription.dead_letter_policy = dead_letter_policy_2 + mask = Google::Protobuf::FieldMask.new paths: ["dead_letter_policy"] + $subscription_admin.update_subscription subscription: subscription, update_mask: mask + + subscription = $subscription_admin.get_subscription subscription: subscription.name + + _(subscription.dead_letter_policy.dead_letter_topic).must_equal dead_letter_topic_2.name + _(subscription.dead_letter_policy.max_delivery_attempts).must_equal 5 - subscription.dead_letter_max_delivery_attempts = 5 - _(subscription.dead_letter_topic.name).must_equal dead_letter_topic_2.name - _(subscription.dead_letter_max_delivery_attempts).must_equal 5 # delete - removed = subscription.remove_dead_letter_policy - _(removed).must_equal true - _(subscription.dead_letter_topic).must_be :nil? - _(subscription.dead_letter_max_delivery_attempts).must_be :nil? + subscription.dead_letter_policy = nil + mask = Google::Protobuf::FieldMask.new paths: ["dead_letter_policy"] + $subscription_admin.update_subscription subscription: subscription, update_mask: mask + _(subscription.dead_letter_policy).must_be :nil? ensure # cleanup - subscription.delete if subscription - dead_letter_subscription.delete if dead_letter_subscription - dead_letter_subscription_2.delete if dead_letter_subscription_2 + $subscription_admin.delete_subscription subscription: subscription.name if subscription + $subscription_admin.delete_subscription subscription: dead_letter_subscription.name if dead_letter_subscription + $subscription_admin.delete_subscription subscription: dead_letter_subscription_2.name if dead_letter_subscription_2 end end end end - describe "IAM Policies and Permissions" do - let(:topic) { retrieve_topic $topic_names[3] } - let(:subscription) { retrieve_subscription topic, "#{$topic_prefix}-subIAM" } - let(:service_account) { pubsub.service.credentials.client.issuer } - - it "allows policy to be updated on a topic" do - # Check permissions first - roles = ["pubsub.topics.getIamPolicy", "pubsub.topics.setIamPolicy"] - permissions = topic.test_permissions roles - skip "Don't have permissions to get/set topic's policy" unless permissions == roles - - _(topic.policy).must_be_kind_of Google::Cloud::PubSub::Policy - - # We need a valid service account in order to update the policy - _(service_account).wont_be :nil? - role = "roles/pubsub.publisher" - member = "serviceAccount:#{service_account}" - topic.policy do |p| - p.add role, member - p.add role, member # duplicate member will not be added to request - end + if $project_number + describe "IAM Policies and Permissions" do + let(:topic) { retrieve_topic $topic_names[3] } + let(:subscription) { retrieve_subscription topic, "#{$topic_prefix}-subIAM" } + let(:member) { "serviceAccount:service-#{$project_number}@gcp-sa-pubsub.iam.gserviceaccount.com" } - role_member = topic.policy.role(role).select { |x| x == member } - _(role_member.size).must_equal 1 - end + it "allows policy to be updated on a topic" do + # Check permissions first + permissions = ["pubsub.topics.getIamPolicy", "pubsub.topics.setIamPolicy"] + result = pubsub.iam.test_iam_permissions resource: topic.name, permissions: permissions + skip "Don't have permissions to get/set topic's policy" unless permissions == result.permissions + + policy = pubsub.iam.get_iam_policy resource: topic.name + _(policy).must_be_kind_of Google::Iam::V1::Policy - it "allows policy to be updated on a subscription" do - # Check permissions first - roles = ["pubsub.subscriptions.getIamPolicy", "pubsub.subscriptions.setIamPolicy"] - permissions = subscription.test_permissions roles - skip "Don't have permissions to get/set subscription's policy" unless permissions == roles + role = "roles/pubsub.publisher" + publisher_bindings = Google::Iam::V1::Binding.new role: role, members: [member] + publisher_policy = Google::Iam::V1::Policy.new bindings: [publisher_bindings] + pubsub.iam.set_iam_policy resource: topic.name, policy: publisher_policy - _(subscription.policy).must_be_kind_of Google::Cloud::PubSub::Policy + policy = pubsub.iam.get_iam_policy resource: topic.name - # We need a valid service account in order to update the policy - _(service_account).wont_be :nil? - role = "roles/pubsub.subscriber" - member = "serviceAccount:#{service_account}" - subscription.policy do |p| - p.add role, member + _(policy.bindings.first.role).must_equal role + _(policy.bindings.first.members.first).must_equal member end - _(subscription.policy.role(role)).must_include member - end + it "allows policy to be updated on a subscription" do + # Check permissions first + permissions = ["pubsub.subscriptions.getIamPolicy", "pubsub.subscriptions.setIamPolicy"] + result = pubsub.iam.test_iam_permissions resource: subscription.name, permissions: permissions + skip "Don't have permissions to get/set subscription's policy" unless permissions == result.permissions - it "allows permissions to be tested on a topic" do - roles = ["pubsub.topics.get", "pubsub.topics.publish"] - permissions = topic.test_permissions roles - _(permissions).must_equal roles - end + policy = pubsub.iam.get_iam_policy resource: subscription.name + _(policy).must_be_kind_of Google::Iam::V1::Policy + + role = "roles/pubsub.subscriber" + subscriber_bindings = Google::Iam::V1::Binding.new role: role, members: [member] + subscriber_policy = Google::Iam::V1::Policy.new bindings: [subscriber_bindings] + pubsub.iam.set_iam_policy resource: subscription.name, policy: subscriber_policy - it "allows permissions to be tested on a subscription" do - roles = ["pubsub.subscriptions.consume", "pubsub.subscriptions.get"] - permissions = subscription.test_permissions roles - _(permissions).must_equal roles + policy = pubsub.iam.get_iam_policy resource: subscription.name + + _(policy.bindings.first.role).must_equal role + _(policy.bindings.first.members.first).must_equal member + end + + it "allows permissions to be tested on a topic" do + permissions = ["pubsub.topics.get", "pubsub.topics.publish"] + result = pubsub.iam.test_iam_permissions resource: topic.name, permissions: permissions + _(result.permissions).must_equal permissions + end + + it "allows permissions to be tested on a subscription" do + permissions = ["pubsub.subscriptions.consume", "pubsub.subscriptions.get"] + result = pubsub.iam.test_iam_permissions resource: subscription.name, permissions: permissions + _(result.permissions).must_equal permissions + end end end @@ -517,15 +519,13 @@ def retrieve_snapshot project, subscription, snapshot_name before do 3.times.each do |i| - retrieve_snapshot pubsub, subscription, $snapshot_names[i] + retrieve_snapshot subscription, $snapshot_names[i] end end it "should list all snapshots registered to the project" do - snapshots = pubsub.snapshots.all - snapshots.each do |snapshot| - # snapshots on project are objects... - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot + $subscription_admin.list_snapshots(project: @pubsub.project_path).each do |snapshot| + _(snapshot).must_be_kind_of Google::Cloud::PubSub::V1::Snapshot end end end diff --git a/google-cloud-pubsub/acceptance/pubsub/schema_test.rb b/google-cloud-pubsub/acceptance/pubsub/schema_test.rb deleted file mode 100644 index 4333ea9c80bb..000000000000 --- a/google-cloud-pubsub/acceptance/pubsub/schema_test.rb +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 2021 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. - -require "pubsub_helper" -require "avro" - -# This test is a ruby version of gcloud-node's pubsub test. - -describe Google::Cloud::PubSub::Schema, :pubsub do - let(:topic_name) { $topic_names[10] } - let(:topic_name_2) { $topic_names[11] } - let(:schema_name) { $schema_names[0] } - let :definition_hash do - { - "type" => "record", - "name" => "State", - "namespace" => "utilities", - "doc" => "A list of states in the United States of America.", - "fields" => [ - { - "name" => "name", - "type" => "string", - "doc" => "The common name of the state." - }, - { - "name" => "post_abbr", - "type" => "string", - "doc" => "The postal code abbreviation of the state." - } - ] - } - end - let(:definition) { definition_hash.to_json } - let(:message_data) { { "name" => "Alaska", "post_abbr" => "AK" } } - let(:bad_value) { { "BAD_VALUE" => nil } } - - it "should validate, create, list, get, validate message, create topic, publish binary message, receive binary message, and delete a schema" do - skip("https://github.com/googleapis/google-cloud-ruby/issues/20925") - # validate schema - _(pubsub.valid_schema? :avro, definition).must_equal true - _(pubsub.valid_schema? :TYPE_UNSPECIFIED, definition).must_equal false - _(pubsub.valid_schema? :avro, nil).must_equal false - _(pubsub.valid_schema? :avro, bad_value.to_json).must_equal false - - # create - schema = pubsub.create_schema schema_name, :avro, definition - _(schema).must_be_kind_of Google::Cloud::PubSub::Schema - _(schema.name).must_equal "projects/#{pubsub.project_id}/schemas/#{schema_name}" - _(schema.type).must_equal :AVRO - _(schema.definition).must_equal definition - - # list - schemas = pubsub.schemas - _(schemas).wont_be :empty? - schema = schemas.first - _(schema).must_be_kind_of Google::Cloud::PubSub::Schema - _(schema.name).wont_be :nil? - _(schema.type).wont_be :nil? - _(schema.definition).wont_be :nil? - - # get - schema = pubsub.schema schema_name - _(schema).must_be_kind_of Google::Cloud::PubSub::Schema - _(schema.name).must_equal "projects/#{pubsub.project_id}/schemas/#{schema_name}" - _(schema.type).must_equal :AVRO - _(schema.definition).must_equal definition - - # validate message - _(schema.validate_message message_data.to_json, :json).must_equal true - _(schema.validate_message bad_value.to_json, :json).must_equal false - - # create topic with schema - topic = pubsub.create_topic topic_name, schema_name: schema_name, message_encoding: :binary - _(topic.schema_name).must_equal "projects/#{pubsub.project_id}/schemas/#{schema_name}" - _(topic.message_encoding).must_equal :BINARY - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal true - - topic = pubsub.topic topic.name - _(topic.schema_name).must_equal "projects/#{pubsub.project_id}/schemas/#{schema_name}" - _(topic.message_encoding).must_equal :BINARY - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal true - - begin - subscription = topic.subscribe "#{$topic_prefix}-sub-avro-1" - _(subscription).must_be_kind_of Google::Cloud::PubSub::Subscription - # No messages, should be empty - received_messages = subscription.pull - _(received_messages).must_be :empty? - - # Encode and publish a message - avro_schema = Avro::Schema.parse definition - writer = Avro::IO::DatumWriter.new avro_schema - buffer = StringIO.new - encoder = Avro::IO::BinaryEncoder.new buffer - writer.write message_data, encoder - msg = topic.publish buffer - _(msg).wont_be :nil? - - # Check it received the published message - wait_for_condition description: "subscription pull" do - received_messages = subscription.pull immediate: false - received_messages.any? - end - _(received_messages.count).must_equal 1 - received_message = received_messages.first - _(received_message.data).must_equal msg.data - # Acknowledge the message - subscription.ack received_message.ack_id - - # Decode the message data - buffer = StringIO.new received_message.data - decoder = Avro::IO::BinaryDecoder.new buffer - reader = Avro::IO::DatumReader.new avro_schema - decoded_message_data = reader.read decoder - _(decoded_message_data).must_be_kind_of Hash - _(decoded_message_data).must_equal message_data - ensure - # Remove the subscription - subscription.delete - end - - # delete - schema.delete - - wait_for_condition description: "schema delete" do - schema = pubsub.schema schema_name, view: :basic - schema.nil? - end - _(schema).must_be :nil? - end -end diff --git a/google-cloud-pubsub/acceptance/pubsub/service_test.rb b/google-cloud-pubsub/acceptance/pubsub/service_test.rb index edc1eda7cc6f..fe569f334881 100644 --- a/google-cloud-pubsub/acceptance/pubsub/service_test.rb +++ b/google-cloud-pubsub/acceptance/pubsub/service_test.rb @@ -45,10 +45,11 @@ end.configure end - it "configures the V1::Subscriber::Client" do + it "configures the V1::SubscriptionAdmin::Client" do _(pubsub.project_id).wont_be :empty? - config = pubsub.service.subscriber.configure - _(config).must_be_kind_of Google::Cloud::PubSub::V1::Subscriber::Client::Configuration + + config = pubsub.subscription_admin.configure + _(config).must_be_kind_of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration _(config.timeout).must_equal timeout _(config.endpoint).must_be :nil? _(config.universe_domain).must_equal universe_domain @@ -58,9 +59,9 @@ assert_config_rpcs_equals subscriber_default_config.rpcs, 16, config.rpcs, timeout: timeout end - it "configures the V1::Publisher::Client" do + it "configures the V1::TopicAdmin::Client" do _(pubsub.project_id).wont_be :empty? - config = pubsub.service.publisher.configure + config = pubsub.topic_admin.configure _(config).must_be_kind_of Google::Cloud::PubSub::V1::Publisher::Client::Configuration _(config.timeout).must_equal timeout _(config.endpoint).must_be :nil? @@ -73,7 +74,8 @@ it "configures the V1::IAMPolicy::Client" do _(pubsub.project_id).wont_be :empty? - config = pubsub.service.iam.configure + _topic_admin = pubsub.topic_admin + config = pubsub.iam.configure _(config).must_be_kind_of Google::Iam::V1::IAMPolicy::Client::Configuration _(config.timeout).must_equal timeout _(config.endpoint).must_equal endpoint @@ -86,7 +88,7 @@ it "configures the V1::SchemaService::Client" do _(pubsub.project_id).wont_be :empty? - config = pubsub.service.schemas.configure + config = pubsub.schemas.configure _(config).must_be_kind_of Google::Cloud::PubSub::V1::SchemaService::Client::Configuration _(config.timeout).must_equal timeout _(config.endpoint).must_be :nil? diff --git a/google-cloud-pubsub/acceptance/pubsub_helper.rb b/google-cloud-pubsub/acceptance/pubsub_helper.rb index 9158bfd3e16c..7dc3ba758cbf 100644 --- a/google-cloud-pubsub/acceptance/pubsub_helper.rb +++ b/google-cloud-pubsub/acceptance/pubsub_helper.rb @@ -28,6 +28,9 @@ # Create shared pubsub object so we don't create new for each test $pubsub = Google::Cloud::PubSub.new +$topic_admin = $pubsub.topic_admin +$subscription_admin = $pubsub.subscription_admin +$schema_admin = $pubsub.schemas # Dead Letter Queue (DLQ) testing requires IAM bindings to the Cloud Pub/Sub service account that is automatically # created and managed by the service team in a private project. @@ -113,10 +116,12 @@ def self.run_one_method klass, method_name, reporter def clean_up_pubsub_topics puts "Cleaning up pubsub topics after tests." - $pubsub.topics.all do |topic| + $topic_admin.list_topics(project: $pubsub.project_path).each do |topic| if topic.name.include? $topic_prefix - topic.subscriptions.each(&:delete) - topic.delete + response = $topic_admin.list_topic_subscriptions(topic: topic.name) + response.subscriptions.each do |subscription| + $subscription_admin.delete_subscription(subscription: subscription) + end end end rescue => e @@ -125,9 +130,10 @@ def clean_up_pubsub_topics def clean_up_pubsub_snapshots puts "Cleaning up pubsub snapshots after tests." - $pubsub.snapshots.all do |snapshot| + + $subscription_admin.list_snapshots(project: $pubsub.project_path).each do |snapshot| if snapshot.name.include? $snapshot_prefix - snapshot.delete + $subscription_admin.delete_snapshot(snapshot: snapshot.name) end end rescue => e @@ -136,9 +142,9 @@ def clean_up_pubsub_snapshots def clean_up_pubsub_schemas puts "Cleaning up pubsub schemas after tests." - $pubsub.schemas.all do |schema| + $schema_admin.list_schemas(parent: $pubsub.project_path).each do |schema| if schema.name.include? $schema_prefix - schema.delete + $schema_admin.delete_schema name: schema.name end end rescue => e diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub.rb b/google-cloud-pubsub/lib/google/cloud/pubsub.rb index b0e7a00ce437..36dfd3f63168 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub.rb @@ -133,7 +133,7 @@ def self.new project_id: nil, # `ENV["PUBSUB_EMULATOR_HOST"]` # * `on_error` - (Proc) A Proc to be run when an error is encountered # on a background thread. The Proc must take the error object as the - # single argument. (See {Subscriber.on_error}.) + # single argument. (See {MessageListener.on_error}.) # # @return [Google::Cloud::Config] The configuration object the # Google::Cloud::PubSub library uses. diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/async_publisher.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/async_publisher.rb index c71720a7546d..7b7fba613058 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/async_publisher.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/async_publisher.rb @@ -27,7 +27,7 @@ module Cloud module PubSub ## # Used to publish multiple messages in batches to a topic. See - # {Google::Cloud::PubSub::Topic#async_publisher} + # {Google::Cloud::PubSub::Publisher#async_publisher} # # @example # require "google/cloud/pubsub" @@ -116,7 +116,7 @@ def initialize topic_name, ## # Add a message to the async publisher to be published to the topic. # Messages will be collected in batches and published together. - # See {Google::Cloud::PubSub::Topic#publish_async} + # See {Google::Cloud::PubSub::Publisher#publish_async} # # @param [String, File] data The message payload. This will be converted # to bytes encoded as ASCII-8BIT. @@ -262,8 +262,8 @@ def stopped? # enabled, messages published with the same `ordering_key` will be # delivered in the order they were published. # - # See {#message_ordering?}. See {Topic#publish_async}, - # {Subscription#listen}, and {Message#ordering_key}. + # See {#message_ordering?}. See {Publisher#publish_async}, + # {Subscriber#listen}, and {Message#ordering_key}. # def enable_message_ordering! synchronize { @ordered = true } @@ -275,8 +275,8 @@ def enable_message_ordering! # will be delivered in the order they were published. When disabled, # messages may be delivered in any order. # - # See {#enable_message_ordering!}. See {Topic#publish_async}, - # {Subscription#listen}, and {Message#ordering_key}. + # See {#enable_message_ordering!}. See {Publisher#publish_async}, + # {Subscriber#listen}, and {Message#ordering_key}. # # @return [Boolean] # diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/errors.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/errors.rb index 15b85230d44c..a43a88848dc1 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/errors.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/errors.rb @@ -41,7 +41,7 @@ def initialize message = "Ordered messages are disabled." end ## - # Indicates that the {Subscriber} for a {Subscription} with message + # Indicates that the {MessageListener} for a {Subscriber} with message # ordering enabled has observed that a message has been delivered out of # order. # @@ -57,11 +57,11 @@ def initialize ordered_message ## # Indicates that messages using the {#ordering_key} are not being - # published due to error. Future calls to {Topic#publish_async} with the + # published due to error. Future calls to {Publisher#publish_async} with the # {#ordering_key} will fail with this error. # # To allow future messages with the {#ordering_key} to be published, the - # {#ordering_key} must be passed to {Topic#resume_publish}. + # {#ordering_key} must be passed to {Publisher#resume_publish}. # # If this error is retrieved from {PublishResult#error}, inspect `cause` # for the error raised while publishing. diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/message.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message.rb index 975a7f560837..ab3f499fd6f8 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/message.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message.rb @@ -24,7 +24,7 @@ module PubSub # # Represents a Pub/Sub Message. # - # Message objects are created by {Topic#publish}. {Subscription#pull} + # Message objects are created by {Publisher#publish}. {Subscriber#pull} # returns an array of {ReceivedMessage} objects, each of which contains a # Message object. Each {ReceivedMessage} object can be acknowledged and/or # delayed. @@ -113,7 +113,7 @@ def published_at # or scalability, as the service automatically distributes messages for # different ordering keys across subscribers. # - # See {Topic#publish_async} and {Subscription#listen}. + # See {Publisher#publish_async} and {Subscriber#listen}. # # @return [String] # diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb new file mode 100644 index 000000000000..11bf33762de2 --- /dev/null +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb @@ -0,0 +1,413 @@ +# Copyright 2017 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. + + +require "google/cloud/pubsub/service" +require "google/cloud/pubsub/message_listener/stream" +require "google/cloud/pubsub/message_listener/timed_unary_buffer" +require "monitor" + +module Google + module Cloud + module PubSub + ## + # MessageListener object used to stream and process messages from a + # Subscriber. See {Google::Cloud::PubSub::Subscriber#listen} + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # subscriber = pubsub.subscriber "my-topic-sub" + # + # listener = subscriber.listen do |received_message| + # # process message + # received_message.acknowledge! + # end + # + # # Start background threads that will call the block passed to listen. + # listener.start + # + # # Shut down the subscriber when ready to stop receiving messages. + # listener.stop! + # + # @attr_reader [String] subscription_name The name of the subscription the + # messages are pulled from. + # @attr_reader [Proc] callback The procedure that will handle the messages + # received from the subscription. + # @attr_reader [Numeric] deadline The default number of seconds the stream + # will hold received messages before modifying the message's ack + # deadline. The minimum is 10, the maximum is 600. Default is 60. + # @attr_reader [Boolean] message_ordering Whether message ordering has + # been enabled. + # @attr_reader [Integer] streams The number of concurrent streams to open + # to pull messages from the subscription. Default is 2. + # @attr_reader [Integer] callback_threads The number of threads used to + # handle the received messages. Default is 8. + # @attr_reader [Integer] push_threads The number of threads to handle + # acknowledgement ({ReceivedMessage#ack!}) and delay messages + # ({ReceivedMessage#nack!}, {ReceivedMessage#modify_ack_deadline!}). + # Default is 4. + # + class MessageListener + include MonitorMixin + + attr_reader :subscription_name + attr_reader :callback + attr_reader :deadline + attr_reader :streams + attr_reader :message_ordering + attr_reader :callback_threads + attr_reader :push_threads + + ## + # @private Implementation attributes. + attr_reader :stream_pool, :thread_pool, :buffer, :service + + ## + # @private Implementation attributes. + attr_accessor :exactly_once_delivery_enabled + + ## + # @private Create an empty {MessageListener} object. + def initialize subscription_name, callback, deadline: nil, message_ordering: nil, streams: nil, inventory: nil, + threads: {}, service: nil + super() # to init MonitorMixin + + @callback = callback + @error_callbacks = [] + @subscription_name = subscription_name + @deadline = deadline || 60 + @streams = streams || 2 + coerce_inventory inventory + @message_ordering = message_ordering + @callback_threads = Integer(threads[:callback] || 8) + @push_threads = Integer(threads[:push] || 4) + @exactly_once_delivery_enabled = nil + + @service = service + + @started = @stopped = nil + + stream_pool = Array.new @streams do + Thread.new { Stream.new self } + end + @stream_pool = stream_pool.map(&:value) + + @buffer = TimedUnaryBuffer.new self + end + + ## + # Starts the listener pulling from the subscription and processing the + # received messages. + # + # @return [MessageListener] returns self so calls can be chained. + # + def start + start_pool = synchronize do + @started = true + @stopped = false + + # Start the buffer before the streams are all started + @buffer.start + @stream_pool.map do |stream| + Thread.new { stream.start } + end + end + start_pool.map(&:join) + + self + end + + ## + # Immediately stops the listener. No new messages will be pulled from + # the subscription. Use {#wait!} to block until all received messages have + # been processed or released: All actions taken on received messages that + # have not yet been sent to the API will be sent to the API. All received + # but unprocessed messages will be released back to the API and redelivered. + # + # @return [MessageListener] returns self so calls can be chained. + # + def stop + synchronize do + @started = false + @stopped = true + @stream_pool.map(&:stop) + wait_stop_buffer_thread! + self + end + end + + ## + # Blocks until the listener is fully stopped and all received messages + # have been processed or released, or until `timeout` seconds have + # passed. + # + # Does not stop the listener. To stop the listener, first call + # {#stop} and then call {#wait!} to block until the listener is + # stopped. + # + # @param [Number, nil] timeout The number of seconds to block until the + # subscriber is fully stopped. Default will block indefinitely. + # + # @return [MessageListener] returns self so calls can be chained. + # + def wait! timeout = nil + wait_stop_buffer_thread! + @wait_stop_buffer_thread.join timeout + self + end + + ## + # Stop this listener and block until the listener is fully stopped + # and all received messages have been processed or released, or until + # `timeout` seconds have passed. + # + # The same as calling {#stop} and {#wait!}. + # + # @param [Number, nil] timeout The number of seconds to block until the + # listener is fully stopped. Default will block indefinitely. + # + # @return [MessageListener] returns self so calls can be chained. + # + def stop! timeout = nil + stop + wait! timeout + end + + ## + # Whether the listener has been started. + # + # @return [boolean] `true` when started, `false` otherwise. + # + def started? + synchronize { @started } + end + + ## + # Whether the listener has been stopped. + # + # @return [boolean] `true` when stopped, `false` otherwise. + # + def stopped? + synchronize { @stopped } + end + + ## + # Register to be notified of errors when raised. + # + # If an unhandled error has occurred the listener will attempt to + # recover from the error and resume listening. + # + # Multiple error handlers can be added. + # + # @yield [callback] The block to be called when an error is raised. + # @yieldparam [Exception] error The error raised. + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # subscriber = pubsub.subscriber "my-topic-sub" + # + # listener = subscriber.listen do |received_message| + # # process message + # received_message.acknowledge! + # end + # + # # Register to be notified when unhandled errors occur. + # listener.on_error do |error| + # # log error + # puts error + # end + # + # # Start listening for messages and errors. + # listener.start + # + # # Shut down the subscriber when ready to stop receiving messages. + # listener.stop! + # + def on_error &block + synchronize do + @error_callbacks << block + end + end + + ## + # The most recent unhandled error to occur while listening to messages + # on the listener. + # + # If an unhandled error has occurred the listener will attempt to + # recover from the error and resume listening. + # + # @return [Exception, nil] error The most recent error raised. + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # subscriber = pubsub.subscriber "my-topic-sub" + # + # listener = subscriber.listen do |received_message| + # # process message + # received_message.acknowledge! + # end + # + # # Start listening for messages and errors. + # listener.start + # + # # If an error was raised, it can be retrieved here: + # listener.last_error #=> nil + # + # # Shut down the subscriber when ready to stop receiving messages. + # listener.stop! + # + def last_error + synchronize { @last_error } + end + + ## + # The number of received messages to be collected by listener. Default is 1,000. + # + # @return [Integer] The maximum number of messages. + # + def max_outstanding_messages + @inventory[:max_outstanding_messages] + end + + ## + # The total byte size of received messages to be collected by listener. Default is 100,000,000 (100MB). + # + # @return [Integer] The maximum number of bytes. + # + def max_outstanding_bytes + @inventory[:max_outstanding_bytes] + end + + ## + # The number of seconds that received messages can be held awaiting processing. Default is 3,600 (1 hour). + # + # @return [Integer] The maximum number of seconds. + # + def max_total_lease_duration + @inventory[:max_total_lease_duration] + end + + ## + # The maximum amount of time in seconds for a single lease extension attempt. Bounds the delay before a message + # redelivery if the listener fails to extend the deadline. Default is 0 (disabled). + # + # @return [Integer] The maximum number of seconds. + # + def max_duration_per_lease_extension + @inventory[:max_duration_per_lease_extension] + end + + ## + # The minimum amount of time in seconds for a single lease extension attempt. Bounds the delay before a message + # redelivery if the listener fails to extend the deadline. Default is 0 (disabled). + # + # @return [Integer] The minimum number of seconds. + # + def min_duration_per_lease_extension + @inventory[:min_duration_per_lease_extension] + end + + ## + # @private + def stream_inventory + { + limit: @inventory[:max_outstanding_messages].fdiv(@streams).ceil, + bytesize: @inventory[:max_outstanding_bytes].fdiv(@streams).ceil, + extension: @inventory[:max_total_lease_duration], + max_duration_per_lease_extension: @inventory[:max_duration_per_lease_extension], + min_duration_per_lease_extension: @inventory[:min_duration_per_lease_extension] + } + end + + # @private returns error object from the stream thread. + def error! error + error_callbacks = synchronize do + @last_error = error + @error_callbacks + end + error_callbacks = default_error_callbacks if error_callbacks.empty? + error_callbacks.each { |error_callback| error_callback.call error } + end + + ## + # @private + def to_s + "(subscription: #{subscription_name}, streams: [#{stream_pool.map(&:to_s).join(', ')}])" + end + + ## + # @private + def inspect + "#<#{self.class.name} #{self}>" + end + + protected + + ## + # Starts a new thread to call wait! (blocking) on each Stream and then stop the TimedUnaryBuffer. + def wait_stop_buffer_thread! + synchronize do + @wait_stop_buffer_thread ||= Thread.new do + @stream_pool.map(&:wait!) + # Shutdown the buffer TimerTask (and flush the buffer) after the streams are all stopped. + @buffer.stop + end + end + end + + def coerce_inventory inventory + @inventory = inventory + if @inventory.is_a? Hash + @inventory = @inventory.dup + # Support deprecated field names + @inventory[:max_outstanding_messages] ||= @inventory.delete :limit + @inventory[:max_outstanding_bytes] ||= @inventory.delete :bytesize + @inventory[:max_total_lease_duration] ||= @inventory.delete :extension + else + @inventory = { max_outstanding_messages: @inventory } + end + @inventory[:max_outstanding_messages] = Integer(@inventory[:max_outstanding_messages] || 1000) + @inventory[:max_outstanding_bytes] = Integer(@inventory[:max_outstanding_bytes] || 100_000_000) + @inventory[:max_total_lease_duration] = Integer(@inventory[:max_total_lease_duration] || 3600) + @inventory[:max_duration_per_lease_extension] = Integer(@inventory[:max_duration_per_lease_extension] || 0) + @inventory[:min_duration_per_lease_extension] = Integer(@inventory[:min_duration_per_lease_extension] || 0) + end + + def default_error_callbacks + # This is memoized to reduce calls to the configuration. + @default_error_callbacks ||= begin + error_callback = Google::Cloud::PubSub.configure.on_error + error_callback ||= Google::Cloud.configure.on_error + if error_callback + [error_callback] + else + [] + end + end + end + end + end + + Pubsub = PubSub unless const_defined? :Pubsub + end +end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/enumerator_queue.rb similarity index 98% rename from google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb rename to google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/enumerator_queue.rb index 7079b029922f..420163f6c880 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/enumerator_queue.rb @@ -16,7 +16,7 @@ module Google module Cloud module PubSub - class Subscriber + class MessageListener # @private class EnumeratorQueue def initialize sentinel = nil diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/inventory.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/inventory.rb similarity index 95% rename from google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/inventory.rb rename to google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/inventory.rb index 5ce9ff7e5d3c..ca2333d76c1c 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/inventory.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/inventory.rb @@ -18,7 +18,7 @@ module Google module Cloud module PubSub - class Subscriber + class MessageListener ## # @private class Inventory @@ -36,10 +36,9 @@ def self.from rec_msg attr_reader :extension attr_reader :max_duration_per_lease_extension attr_accessor :min_duration_per_lease_extension - attr_reader :use_legacy_flow_control def initialize stream, limit:, bytesize:, extension:, max_duration_per_lease_extension:, - min_duration_per_lease_extension:, use_legacy_flow_control: + min_duration_per_lease_extension: super() @stream = stream @limit = limit @@ -47,7 +46,6 @@ def initialize stream, limit:, bytesize:, extension:, max_duration_per_lease_ext @extension = extension @max_duration_per_lease_extension = max_duration_per_lease_extension @min_duration_per_lease_extension = min_duration_per_lease_extension - @use_legacy_flow_control = use_legacy_flow_control @inventory = {} @wait_cond = new_cond end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/sequencer.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/sequencer.rb similarity index 99% rename from google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/sequencer.rb rename to google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/sequencer.rb index fda362fa6016..163df526a694 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/sequencer.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/sequencer.rb @@ -18,7 +18,7 @@ module Google module Cloud module PubSub - class Subscriber + class MessageListener ## # @private The sequencer's job is simple, keep track of all the # streams's recieved message and deliver the messages with an diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/stream.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/stream.rb similarity index 96% rename from google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/stream.rb rename to google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/stream.rb index 7ac741e69618..f7e0277d0f7f 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/stream.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/stream.rb @@ -13,9 +13,9 @@ # limitations under the License. -require "google/cloud/pubsub/subscriber/sequencer" -require "google/cloud/pubsub/subscriber/enumerator_queue" -require "google/cloud/pubsub/subscriber/inventory" +require "google/cloud/pubsub/message_listener/sequencer" +require "google/cloud/pubsub/message_listener/enumerator_queue" +require "google/cloud/pubsub/message_listener/inventory" require "google/cloud/pubsub/service" require "google/cloud/errors" require "monitor" @@ -24,7 +24,7 @@ module Google module Cloud module PubSub - class Subscriber + class MessageListener ## # @private class Stream @@ -372,8 +372,8 @@ def pause_streaming! end def pause_streaming? - return if @stopped - return if @paused + return false if @stopped + return false if @paused @inventory.full? end @@ -387,8 +387,8 @@ def unpause_streaming! end def unpause_streaming? - return if @stopped - return if @paused.nil? + return false if @stopped + return false if @paused.nil? @inventory.count < @inventory.limit * 0.8 end @@ -400,8 +400,8 @@ def initial_input_request req.modify_deadline_ack_ids += @inventory.ack_ids req.modify_deadline_seconds += @inventory.ack_ids.map { @subscriber.deadline } req.client_id = @subscriber.service.client_id - req.max_outstanding_messages = @inventory.use_legacy_flow_control ? 0 : @inventory.limit - req.max_outstanding_bytes = @inventory.use_legacy_flow_control ? 0 : @inventory.bytesize + req.max_outstanding_messages = @inventory.limit + req.max_outstanding_bytes = @inventory.bytesize end end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/timed_unary_buffer.rb similarity index 99% rename from google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb rename to google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/timed_unary_buffer.rb index f03cf28d4d8b..525bc4746f4f 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener/timed_unary_buffer.rb @@ -22,7 +22,7 @@ module Google module Cloud module PubSub - class Subscriber + class MessageListener ## # @private class TimedUnaryBuffer diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb index 3988d87d1e20..85ad637119da 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb @@ -16,10 +16,8 @@ require "google/cloud/errors" require "google/cloud/pubsub/service" require "google/cloud/pubsub/credentials" -require "google/cloud/pubsub/topic" -require "google/cloud/pubsub/batch_publisher" -require "google/cloud/pubsub/schema" -require "google/cloud/pubsub/snapshot" +require "google/cloud/pubsub/publisher" +require "google/cloud/pubsub/subscriber" module Google module Cloud @@ -31,10 +29,13 @@ module PubSub # # Project # # Represents the project that pubsub messages are pushed to and pulled - # from. {Topic} is a named resource to which messages are sent by - # publishers. {Subscription} is a named resource representing the stream + # from. + # + # {Google::Cloud::PubSub::V1::Topic} is a named resource to which + # messages are sent by using {Publisher}. + # {Google::Cloud::PubSub::V1::Subscription} is a named resource representing the stream # of messages from a single, specific topic, to be delivered to the - # subscribing application. {Message} is a combination of data and + # subscribing application via {Subscriber}. {Message} is a combination of data and # attributes that a publisher sends to a topic and is eventually delivered # to subscribers. # @@ -86,574 +87,140 @@ def universe_domain end ## - # Retrieves topic by name. - # - # @param [String] topic_name Name of a topic. The value can be a simple - # topic ID (relative name), in which case the current project ID will - # be supplied, or a fully-qualified topic name in the form - # `projects/{project_id}/topics/{topic_id}`. - # @param [String] project If the topic belongs to a project other than - # the one currently connected to, the alternate project ID can be - # specified here. Optional. Not used if a fully-qualified topic name - # is provided for `topic_name`. - # @param [Boolean] skip_lookup Optionally create a {Topic} object - # without verifying the topic resource exists on the Pub/Sub service. - # Calls made on this object will raise errors if the topic resource - # does not exist. Default is `false`. Optional. - # @param [Hash] async A hash of values to configure the topic's - # {AsyncPublisher} that is created when {Topic#publish_async} - # is called. Optional. - # - # Hash keys and values may include the following: - # - # * `:max_bytes` (Integer) The maximum size of messages to be collected before the batch is published. Default - # is 1,000,000 (1MB). - # * `:max_messages` (Integer) The maximum number of messages to be collected before the batch is published. - # Default is 100. - # * `:interval` (Numeric) The number of seconds to collect messages before the batch is published. Default is - # 0.01. - # * `:threads` (Hash) The number of threads to create to handle concurrent calls by the publisher: - # * `:publish` (Integer) The number of threads used to publish messages. Default is 2. - # * `:callback` (Integer) The number of threads to handle the published messages' callbacks. Default is 4. - # * `:compress` (Boolean) The flag that enables publisher compression. Default is false - # * `:compression_bytes_threshold` (Integer) The number of bytes above which compress should be enabled. - # Default is 240. - # * `:flow_control` (Hash) The client flow control settings for message publishing: - # * `:message_limit` (Integer) The maximum number of messages allowed to wait to be published. Default is - # `10 * max_messages`. - # * `:byte_limit` (Integer) The maximum total size of messages allowed to wait to be published. Default is - # `10 * max_bytes`. - # * `:limit_exceeded_behavior` (Symbol) The action to take when publish flow control limits are exceeded. - # Possible values include: `:ignore` - Flow control is disabled. `:error` - Calls to {Topic#publish_async} - # will raise {FlowControlLimitError} when publish flow control limits are exceeded. `:block` - Calls to - # {Topic#publish_async} will block until capacity is available when publish flow control limits are - # exceeded. The default value is `:ignore`. - # - # @return [Google::Cloud::PubSub::Topic, nil] Returns `nil` if topic - # does not exist. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "existing-topic" - # - # @example By default `nil` will be returned if topic does not exist. - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "non-existing-topic" # nil - # - # @example Create topic in a different project with the `project` flag. - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "another-topic", project: "another-project" - # - # @example Skip the lookup against the service with `skip_lookup`: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "another-topic", skip_lookup: true - # - # @example Configuring AsyncPublisher to increase concurrent callbacks: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic", - # async: { threads: { callback: 16 } } + # Retrieve a client for managing subscriptions. # - # topic.publish_async "task completed" do |result| - # if result.succeeded? - # log_publish_success result.data - # else - # log_publish_failure result.data, result.error - # end - # end + # @return [Google::Cloud::PubSub::V1::SubscriptionAdmin::Client] # - # topic.async_publisher.stop! - # - def topic topic_name, project: nil, skip_lookup: nil, async: nil - ensure_service! - options = { project: project, async: async } - return Topic.from_name topic_name, service, options if skip_lookup - grpc = service.get_topic topic_name, options - Topic.from_grpc grpc, service, async: async - rescue Google::Cloud::NotFoundError - nil + def subscription_admin + service.subscription_admin end - alias get_topic topic - alias find_topic topic ## - # Creates a new topic. - # - # @param [String] topic_name Name of a topic. Required. - # The value can be a simple topic ID (relative name), in which - # case the current project ID will be supplied, or a fully-qualified - # topic name in the form `projects/{project_id}/topics/{topic_id}`. - # - # The topic ID (relative name) must start with a letter, and - # contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent - # signs (`%`). It must be between 3 and 255 characters in length, and - # it must not start with `goog`. - # @param [Hash] labels A hash of user-provided labels associated with - # the topic. You can use these to organize and group your topics. - # Label keys and values can be no longer than 63 characters, can only - # contain lowercase letters, numeric characters, underscores and - # dashes. International characters are allowed. Label values are - # optional. Label keys must start with a letter and each label in the - # list must have a different key. See [Creating and Managing - # Labels](https://cloud.google.com/pubsub/docs/labels). - # @param [String] kms_key The Cloud KMS encryption key that will be used - # to protect access to messages published on this topic. Optional. - # For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d` - # @param [Array] persistence_regions The list of GCP region IDs - # where messages that are published to the topic may be persisted in - # storage. Optional. - # @param [Hash] async A hash of values to configure the topic's - # {AsyncPublisher} that is created when {Topic#publish_async} - # is called. Optional. - # - # Hash keys and values may include the following: - # - # * `:max_bytes` (Integer) The maximum size of messages to be collected - # before the batch is published. Default is 1,000,000 (1MB). - # * `:max_messages` (Integer) The maximum number of messages to be - # collected before the batch is published. Default is 100. - # * `:interval` (Numeric) The number of seconds to collect messages before - # the batch is published. Default is 0.01. - # * `:threads` (Hash) The number of threads to create to handle concurrent - # calls by the publisher: - # * `:publish` (Integer) The number of threads used to publish messages. - # Default is 2. - # * `:callback` (Integer) The number of threads to handle the published - # messages' callbacks. Default is 4. - # * `:compress` (Boolean) The flag that enables publisher compression. Default is false - # * `:compression_bytes_threshold` (Integer) The number of bytes above which compress should be enabled. - # Default is 240. - # * `:flow_control` (Hash) The client flow control settings for message publishing: - # * `:message_limit` (Integer) The maximum number of messages allowed to wait to be published. Default is - # `10 * max_messages`. - # * `:byte_limit` (Integer) The maximum total size of messages allowed to wait to be published. Default is - # `10 * max_bytes`. - # * `:limit_exceeded_behavior` (Symbol) The action to take when publish flow control limits are exceeded. - # Possible values include: `:ignore` - Flow control is disabled. `:error` - Calls to {Topic#publish_async} - # will raise {FlowControlLimitError} when publish flow control limits are exceeded. `:block` - Calls to - # {Topic#publish_async} will block until capacity is available when publish flow control limits are - # exceeded. The default value is `:ignore`. - # @param [String] schema_name The name of the schema that messages - # published should be validated against. Optional. The value can be a - # simple schema ID (relative name), in which case the current project - # ID will be supplied, or a fully-qualified schema name in the form - # `projects/{project_id}/schemas/{schema_id}`. If provided, - # `message_encoding` must also be provided. - # @param [String, Symbol] message_encoding The encoding of messages validated - # against the schema identified by `schema_name`. Optional. Values include: - # - # * `JSON` - JSON encoding. - # * `BINARY` - Binary encoding, as defined by the schema type. For some - # schema types, binary encoding may not be available. - # @param [Numeric] retention Indicates the minimum number of seconds to retain a message - # after it is published to the topic. If this field is set, messages published - # to the topic within the `retention` number of seconds are always available to - # subscribers. For instance, it allows any attached subscription to [seek to a - # timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) - # that is up to `retention` number of seconds in the past. If this field is - # not set, message retention is controlled by settings on individual - # subscriptions. Cannot be less than 600 (10 minutes) or more than 604,800 (7 days). - # @param ingestion_data_source_settings [::Google::Cloud::PubSub::V1::IngestionDataSourceSettings, ::Hash] - # Optional. Settings for ingestion from a data source into this topic. - # - # @return [Google::Cloud::PubSub::Topic] - # - # @example - # require "google/cloud/pubsub" + # Retrieve a client for managing topics. # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.create_topic "my-topic" + # @return [Google::Cloud::PubSub::V1::TopicAdmin::Client] # - def create_topic topic_name, - labels: nil, - kms_key: nil, - persistence_regions: nil, - async: nil, - schema_name: nil, - message_encoding: nil, - retention: nil, - ingestion_data_source_settings: nil - ensure_service! - grpc = service.create_topic topic_name, - labels: labels, - kms_key_name: kms_key, - persistence_regions: persistence_regions, - schema_name: schema_name, - message_encoding: message_encoding, - retention: retention, - ingestion_data_source_settings: ingestion_data_source_settings - Topic.from_grpc grpc, service, async: async + def topic_admin + service.topic_admin end - alias new_topic create_topic ## - # Retrieves a list of topics for the given project. - # - # @param [String] token The `token` value returned by the last call to - # `topics`; indicates that this is a continuation of a call, and that - # the system should return the next page of data. - # @param [Integer] max Maximum number of topics to return. - # - # @return [Array] (See - # {Google::Cloud::PubSub::Topic::List}) + # Retrieve a client for managing schemas. # - # @example - # require "google/cloud/pubsub" + # @return [Google::Cloud::PubSub::V1::SchemaService::Client] # - # pubsub = Google::Cloud::PubSub.new + def schemas + service.schemas + end + + ## + # Retrieve a client specific for Iam Policy related functions. # - # topics = pubsub.topics - # topics.each do |topic| - # puts topic.name - # end + # @return [Google::Iam::V1::IAMPolicy::Client] # - # @example Retrieve all topics: (See {Topic::List#all}) - # require "google/cloud/pubsub" + def iam + service.iam + end + + ## + # Retrieves a Publisher by topic name or full project path. # - # pubsub = Google::Cloud::PubSub.new + # @param [String] topic_name Name of a topic. The value can be a simple + # topic ID (relative name) or a fully-qualified topic name. + # @param [String] project The alternate project ID can be specified here. + # Optional. Not used if a fully-qualified topic name is provided + # for `topic_name`. + # @param [Hash] async A hash of values to configure the topic's + # {AsyncPublisher} that is created when {Publisher#publish_async} + # is called. Optional. # - # topics = pubsub.topics - # topics.all do |topic| - # puts topic.name - # end + # @return [Google::Cloud::PubSub::Publisher] # - def topics token: nil, max: nil + def publisher topic_name, project: nil, async: nil ensure_service! - options = { token: token, max: max } - grpc = service.list_topics options - Topic::List.from_grpc grpc, service, max + options = { project: project, async: async } + grpc = topic_admin.get_topic topic: service.topic_path(topic_name, options) + Publisher.from_grpc grpc, service, async: async end - alias find_topics topics - alias list_topics topics ## - # Retrieves subscription by name. + # Retrieves a Subscriber by subscription name or full project path. # # @param [String] subscription_name Name of a subscription. The value can - # be a simple subscription ID, in which case the current project ID - # will be supplied, or a fully-qualified subscription name in the form - # `projects/{project_id}/subscriptions/{subscription_id}`. - # @param [String] project If the subscription belongs to a project other - # than the one currently connected to, the alternate project ID can be - # specified here. Not used if a fully-qualified subscription name is - # provided for `subscription_name`. - # @param [Boolean] skip_lookup Optionally create a {Subscription} object - # without verifying the subscription resource exists on the Pub/Sub + # be a simple subscription ID (relative name) or a fully-qualified + # subscription name. + # @param [String] project The alternate project ID can be specified here. + # Optional. Not used if a fully-qualified topic name is provided + # for `topic_name`. + # @param [Boolean] skip_lookup Optionally create a {Google::Cloud::PubSub::V1::Subscription} + # object without verifying the subscription resource exists on the Pub/Sub # service. Calls made on this object will raise errors if the service # resource does not exist. Default is `false`. # - # @return [Google::Cloud::PubSub::Subscription, nil] Returns `nil` if - # the subscription does not exist - # - # @example - # require "google/cloud/pubsub" + # @return [Google::Cloud::PubSub::Subscriber, nil] Returns `nil` if + # the subscription does not exist. # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-sub" - # sub.name #=> "projects/my-project/subscriptions/my-sub" - # - # @example Skip the lookup against the service with `skip_lookup`: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # # No API call is made to retrieve the subscription information. - # sub = pubsub.subscription "my-sub", skip_lookup: true - # sub.name #=> "projects/my-project/subscriptions/my-sub" - # - def subscription subscription_name, project: nil, skip_lookup: nil + def subscriber subscription_name, project: nil, skip_lookup: nil ensure_service! options = { project: project } - return Subscription.from_name subscription_name, service, options if skip_lookup - grpc = service.get_subscription subscription_name, options - Subscription.from_grpc grpc, service - rescue Google::Cloud::NotFoundError - nil + return Subscriber.from_name subscription_name, service, options if skip_lookup + grpc = subscription_admin.get_subscription subscription: service.subscription_path(subscription_name, options) + Subscriber.from_grpc grpc, service end - alias get_subscription subscription - alias find_subscription subscription ## - # Retrieves a list of subscriptions for the given project. - # - # @param [String] token A previously-returned page token representing - # part of the larger set of results to view. - # @param [Integer] max Maximum number of subscriptions to return. - # - # @return [Array] (See - # {Google::Cloud::PubSub::Subscription::List}) - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new + # Returns a fully-qualified project path in the form of + # `projects/{project_id}` + # @param [String] project_name A project name. Optional. + # If provided, this will be used in place of the default `project_id`. # - # subs = pubsub.subscriptions - # subs.each do |sub| - # puts sub.name - # end - # - # @example Retrieve all subscriptions: (See {Subscription::List#all}) - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # subs = pubsub.subscriptions - # subs.all do |sub| - # puts sub.name - # end - # - def subscriptions token: nil, max: nil - ensure_service! - options = { token: token, max: max } - grpc = service.list_subscriptions options - Subscription::List.from_grpc grpc, service, max + def project_path project_name: nil + service.project_path options: { "project" => project_name }.compact end - alias find_subscriptions subscriptions - alias list_subscriptions subscriptions - ## - # Retrieves a list of snapshots for the given project. - # - # @param [String] token A previously-returned page token representing - # part of the larger set of results to view. - # @param [Integer] max Maximum number of snapshots to return. - # - # @return [Array] (See - # {Google::Cloud::PubSub::Snapshot::List}) - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # snapshots = pubsub.snapshots - # snapshots.each do |snapshot| - # puts snapshot.name - # end - # - # @example Retrieve all snapshots: (See {Snapshot::List#all}) - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # snapshots = pubsub.snapshots - # snapshots.all do |snapshot| - # puts snapshot.name - # end - # - def snapshots token: nil, max: nil - ensure_service! - options = { token: token, max: max } - grpc = service.list_snapshots options - Snapshot::List.from_grpc grpc, service, max - end - alias find_snapshots snapshots - alias list_snapshots snapshots - - ## - # Retrieves schema by name. - # - # @param [String] schema_name Name of a schema. The value can - # be a simple schema ID, in which case the current project ID - # will be supplied, or a fully-qualified schema name in the form - # `projects/{project_id}/schemas/{schema_id}`. - # @param view [Symbol, String, nil] Possible values: - # * `BASIC` - Include the `name` and `type` of the schema, but not the `definition`. - # * `FULL` - Include all Schema object fields. - # - # The default value is `FULL`. - # @param [String] project If the schema belongs to a project other - # than the one currently connected to, the alternate project ID can be - # specified here. Not used if a fully-qualified schema name is - # provided for `schema_name`. - # @param [Boolean] skip_lookup Optionally create a {Schema} object - # without verifying the schema resource exists on the Pub/Sub - # service. Calls made on this object will raise errors if the service - # resource does not exist. Default is `false`. - # - # @return [Google::Cloud::PubSub::Schema, nil] Returns `nil` if - # the schema does not exist. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schema = pubsub.schema "my-schema" - # schema.name #=> "projects/my-project/schemas/my-schema" - # schema.type #=> :PROTOCOL_BUFFER - # schema.definition # The schema definition - # - # @example Skip the lookup against the service with `skip_lookup`: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # # No API call is made to retrieve the schema information. - # # The default project is used in the name. - # schema = pubsub.schema "my-schema", skip_lookup: true - # schema.name #=> "projects/my-project/schemas/my-schema" - # schema.type #=> nil - # schema.definition #=> nil - # - # @example Omit the schema definition with `view: :basic`: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schema = pubsub.schema "my-schema", view: :basic - # schema.name #=> "projects/my-project/schemas/my-schema" - # schema.type #=> :PROTOCOL_BUFFER - # schema.definition #=> nil - # - def schema schema_name, view: nil, project: nil, skip_lookup: nil - ensure_service! - options = { project: project } - return Schema.from_name schema_name, view, service, options if skip_lookup - view ||= :FULL - grpc = service.get_schema schema_name, view, options - Schema.from_grpc grpc, service - rescue Google::Cloud::NotFoundError - nil + # Returns a fully-qualified topic path in the form of + # `projects/{project_id}/topics/{topic_name}` + # @param [String] topic_name A topic name. + # @param [String] project_name A project name. Optional. + # If provided, this will be used in place of the default `project_id`. + # + def topic_path topic_name, project_name: nil + service.topic_path topic_name, options: { "project" => project_name }.compact end - alias get_schema schema - alias find_schema schema ## - # Creates a new schema. - # - # @param [String] schema_id The ID to use for the schema, which will - # become the final component of the schema's resource name. Required. - # - # The schema ID (relative name) must start with a letter, and - # contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent - # signs (`%`). It must be between 3 and 255 characters in length, and - # it must not start with `goog`. - # @param [String, Symbol] type The type of the schema. Required. Possible - # values are case-insensitive and include: - # - # * `PROTOCOL_BUFFER` - A Protocol Buffer schema definition. - # * `AVRO` - An Avro schema definition. - # @param [String] definition The definition of the schema. Required. This - # should be a string representing the full definition of the schema that - # is a valid schema definition of the type specified in `type`. - # @param [String] project If the schema belongs to a project other - # than the one currently connected to, the alternate project ID can be - # specified here. Optional. - # - # @return [Google::Cloud::PubSub::Schema] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # definition = "..." - # schema = pubsub.create_schema "my-schema", :avro, definition - # schema.name #=> "projects/my-project/schemas/my-schema" - # - def create_schema schema_id, type, definition, project: nil - ensure_service! - type = type.to_s.upcase - grpc = service.create_schema schema_id, type, definition, project: project - Schema.from_grpc grpc, service + # Returns a fully-qualified subscription path in the form of + # `projects/{project_id}/subscriptions/{subscription_name}` + # @param [String] subscription_name A subscription name. + # @param [String] project_name A project name. Optional. + # If provided, this will be used in place of the default `project_id`. + # + def subscription_path subscription_name, project_name: nil + service.subscription_path subscription_name, options: { "project" => project_name }.compact end - alias new_schema create_schema ## - # Retrieves a list of schemas for the given project. - # - # @param view [String, Symbol, nil] The set of fields to return in the response. Possible values: - # - # * `BASIC` - Include the `name` and `type` of the schema, but not the `definition`. - # * `FULL` - Include all Schema object fields. - # - # The default value is `FULL`. - # @param [String] token A previously-returned page token representing - # part of the larger set of results to view. - # @param [Integer] max Maximum number of schemas to return. - # - # @return [Array] (See - # {Google::Cloud::PubSub::Schema::List}) - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schemas = pubsub.schemas - # schemas.each do |schema| - # puts schema.name - # end - # - # @example Retrieve all schemas: (See {Schema::List#all}) - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schemas = pubsub.schemas - # schemas.all do |schema| - # puts schema.name - # end - # - def schemas view: nil, token: nil, max: nil - ensure_service! - view ||= :FULL - options = { token: token, max: max } - grpc = service.list_schemas view, options - Schema::List.from_grpc grpc, service, view, max + # Returns a fully-qualified snapshot path in the form of + # `projects/{project_id}/snapshots/{snapshot_name}` + # @param [String] snapshot_name A snapshot name. + # @param [String] project_name A project name. Optional. + # If provided, this will be used in place of the default `project_id`. + # + def snapshot_path snapshot_name, project_name: nil + service.snapshot_path snapshot_name, options: { "project" => project_name }.compact end - alias find_schemas schemas - alias list_schemas schemas ## - # Validates a schema type and definition. - # - # @param [String, Symbol] type The type of the schema. Required. Possible - # values are case-insensitive and include: - # - # * `PROTOCOL_BUFFER` - A Protocol Buffer schema definition. - # * `AVRO` - An Avro schema definition. - # @param [String] definition The definition of the schema. Required. This - # should be a string representing the full definition of the schema that - # is a valid schema definition of the type specified in `type`. - # @param [String] project If the schema belongs to a project other - # than the one currently connected to, the alternate project ID can be - # specified here. Optional. - # - # @return [Boolean] `true` if the schema is valid, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # definition = "..." - # pubsub.validate_schema :avro, definition #=> true - # - def valid_schema? type, definition, project: nil - ensure_service! - type = type.to_s.upcase - service.validate_schema type, definition, project: project # return type is empty - true - rescue Google::Cloud::InvalidArgumentError - false + # Returns a fully-qualified schema path in the form of + # `projects/{project_id}/schemas/{schema_name}` + # @param [String] schema_name A schema name. + # @param [String] project_name A project name. Optional. + # If provided, this will be used in place of the default `project_id`. + # + def schema_path schema_name, project_name: nil + service.schema_path schema_name, options: { "project" => project_name }.compact end - alias validate_schema valid_schema? protected diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/publisher.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/publisher.rb new file mode 100644 index 000000000000..546a8aaaffa6 --- /dev/null +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/publisher.rb @@ -0,0 +1,374 @@ +# Copyright 2015 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. + + +require "google/cloud/errors" +require "google/cloud/pubsub/async_publisher" +require "google/cloud/pubsub/batch_publisher" +require "google/cloud/pubsub/policy" +require "google/cloud/pubsub/retry_policy" + +module Google + module Cloud + module PubSub + ## + # # Publisher + # + # A {Publisher} is the primary interface for data plane operations on a + # topic, including publishing messages, batching messages for higher + # throughput, and managing ordering keys. + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-topic-only" + # + # publisher.publish "task completed" + # + class Publisher + ## + # @private The Service object. + attr_accessor :service + + ## + # @private The Google::Cloud::PubSub::V1::Topic object. + attr_accessor :grpc + + ## + # @private Create an empty {Topic} object. + def initialize + @service = nil + @grpc = nil + @resource_name = nil + @async_opts = {} + end + + ## + # AsyncPublisher object used to publish multiple messages in batches. + # + # @return [AsyncPublisher] Returns publisher object if calls to + # {#publish_async} have been made, returns `nil` otherwise. + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-topic" + # publisher.publish_async "task completed" do |result| + # if result.succeeded? + # log_publish_success result.data + # else + # log_publish_failure result.data, result.error + # end + # end + # + # publisher.async_publisher.stop! + # + def async_publisher + @async_publisher + end + + ## + # The name of the publisher. + # + # @return [String] A fully-qualified topic name in the form + # `projects/{project_id}/topics/{topic_id}`. + # + def name + @grpc.name + end + + ## + # Publishes one or more messages to the publisher. + # + # The message payload must not be empty; it must contain either a + # non-empty data field, or at least one attribute. + # + # @param [String, File] data The message payload. This will be converted + # to bytes encoded as ASCII-8BIT. + # @param [Hash] attributes Optional attributes for the message. + # @param [String] ordering_key Identifies related messages for which + # publish order should be respected. + # @yield [batch] a block for publishing multiple messages in one + # request + # @yieldparam [BatchPublisher] batch the topic batch publisher + # object + # + # @return [Message, Array] Returns the published message when + # called without a block, or an array of messages when called with a + # block. + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-topic" + # msg = publisher.publish "task completed" + # + # @example A message can be published using a File object: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-topic" + # file = File.open "message.txt", mode: "rb" + # msg = publisher.publish file + # + # @example Additionally, a message can be published with attributes: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-topic" + # msg = publisher.publish "task completed", + # foo: :bar, + # this: :that + # + # @example Multiple messages can be sent at the same time using a block: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.ublisher "my-topic" + # msgs = publisher.publish do |t| + # p.publish "task 1 completed", foo: :bar + # p.publish "task 2 completed", foo: :baz + # p.publish "task 3 completed", foo: :bif + # end + # + # @example Ordered messages are supported using ordering_key: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-ordered-topic" + # + # # Ensure that message ordering is enabled. + # publisher.enable_message_ordering! + # + # # Publish an ordered message with an ordering key. + # publisher.publish "task completed", + # ordering_key: "task-key" + # + def publish data = nil, attributes = nil, ordering_key: nil, compress: nil, compression_bytes_threshold: nil, + **extra_attrs, &block + ensure_service! + batch = BatchPublisher.new data, + attributes, + ordering_key, + extra_attrs, + compress: compress, + compression_bytes_threshold: compression_bytes_threshold + + block&.call batch + return nil if batch.messages.count.zero? + batch.publish_batch_messages name, service + end + + ## + # Publishes a message asynchronously to the topic using + # {#async_publisher}. + # + # The message payload must not be empty; it must contain either a + # non-empty data field, or at least one attribute. + # + # Google Cloud Pub/Sub ordering keys provide the ability to ensure + # related messages are sent to subscribers in the order in which they + # were published. Messages can be tagged with an ordering key, a string + # that identifies related messages for which publish order should be + # respected. The service guarantees that, for a given ordering key and + # publisher, messages are sent to subscribers in the order in which they + # were published. Ordering does not require sacrificing high throughput + # or scalability, as the service automatically distributes messages for + # different ordering keys across subscribers. + # + # To use ordering keys, specify `ordering_key`. Before specifying + # `ordering_key` on a message a call to `#enable_message_ordering!` must + # be made or an error will be raised. + # + # @note At the time of this release, ordering keys are not yet publicly + # enabled and requires special project enablements. + # + # Publisher flow control limits the number of outstanding messages that + # are allowed to wait to be published. + # + # @param [String, File] data The message payload. This will be converted + # to bytes encoded as ASCII-8BIT. + # @param [Hash] attributes Optional attributes for the message. + # @param [String] ordering_key Identifies related messages for which + # publish order should be respected. + # @yield [result] the callback for when the message has been published + # @yieldparam [PublishResult] result the result of the asynchronous + # publish + # @raise [Google::Cloud::PubSub::AsyncPublisherStopped] when the + # publisher is stopped. (See {AsyncPublisher#stop} and + # {AsyncPublisher#stopped?}.) + # @raise [Google::Cloud::PubSub::OrderedMessagesDisabled] when + # publishing a message with an `ordering_key` but ordered messages are + # not enabled. (See {#message_ordering?} and + # {#enable_message_ordering!}.) + # @raise [Google::Cloud::PubSub::OrderingKeyError] when publishing a + # message with an `ordering_key` that has already failed when + # publishing. Use {#resume_publish} to allow this `ordering_key` to be + # published again. + # @raise [Google::Cloud::PubSub::FlowControlLimitError] when publish flow + # control limits are exceeded, and the `async` parameter key + # `flow_control.limit_exceeded_behavior` is set to `:error` or `:block`. + # If `flow_control.limit_exceeded_behavior` is set to `:block`, this error + # will be raised only when a limit would be exceeded by a single message. + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-topic" + # publisher.publish_async "task completed" do |result| + # if result.succeeded? + # log_publish_success result.data + # else + # log_publish_failure result.data, result.error + # end + # end + # + # # Shut down the publisher when ready to stop publishing messages. + # publisher.async_publisher.stop! + # + # @example A message can be published using a File object: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-topic" + # file = File.open "message.txt", mode: "rb" + # publisher.publish_async file + # + # # Shut down the publisher when ready to stop publishing messages. + # publisher.async_publisher.stop! + # + # @example Additionally, a message can be published with attributes: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-topic" + # publisher.publish_async "task completed", + # foo: :bar, this: :that + # + # # Shut down the publisher when ready to stop publishing messages. + # publisher.async_publisher.stop! + # + # @example Ordered messages are supported using ordering_key: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # publisher = pubsub.publisher "my-ordered-topic" + # + # # Ensure that message ordering is enabled. + # publisher.enable_message_ordering! + # + # # Publish an ordered message with an ordering key. + # publisher.publish_async "task completed", + # ordering_key: "task-key" + # + # # Shut down the publisher when ready to stop publishing messages. + # publisher.async_publisher.stop! + # + def publish_async data = nil, attributes = nil, ordering_key: nil, **extra_attrs, &callback + ensure_service! + + @async_publisher ||= AsyncPublisher.new name, service, **@async_opts + @async_publisher.publish data, attributes, ordering_key: ordering_key, **extra_attrs, &callback + end + + ## + # Enables message ordering for messages with ordering keys on the + # {#async_publisher}. When enabled, messages published with the same + # `ordering_key` will be delivered in the order they were published. + # + # @note At the time of this release, ordering keys are not yet publicly + # enabled and requires special project enablements. + # + # See {#message_ordering?}. See {#publish_async}, + # {Subscriber#listen}, and {Message#ordering_key}. + # + def enable_message_ordering! + @async_publisher ||= AsyncPublisher.new name, service, **@async_opts + @async_publisher.enable_message_ordering! + end + + ## + # Whether message ordering for messages with ordering keys has been + # enabled on the {#async_publisher}. When enabled, messages published + # with the same `ordering_key` will be delivered in the order they were + # published. When disabled, messages may be delivered in any order. + # + # See {#enable_message_ordering!}. See {#publish_async}, + # {Subscriber#listen}, and {Message#ordering_key}. + # + # @return [Boolean] + # + def message_ordering? + @async_publisher ||= AsyncPublisher.new name, service, **@async_opts + @async_publisher.message_ordering? + end + + ## + # Resume publishing ordered messages for the provided ordering key. + # + # @param [String] ordering_key Identifies related messages for which + # publish order should be respected. + # + # @return [boolean] `true` when resumed, `false` otherwise. + # + def resume_publish ordering_key + @async_publisher ||= AsyncPublisher.new name, service, **@async_opts + @async_publisher.resume_publish ordering_key + end + + ## + # @private New Publisher from a Google::Cloud::PubSub::V1::Topic object. + def self.from_grpc grpc, service, async: nil + new.tap do |t| + t.grpc = grpc + t.service = service + t.instance_variable_set :@async_opts, async if async + end + end + + protected + + ## + # @private Raise an error unless an active connection to the service is + # available. + def ensure_service! + raise "Must have active connection to service" unless service + end + + ## + # Ensures a Google::Cloud::PubSub::V1::Topic object exists. + def ensure_grpc! + ensure_service! + end + end + end + + Pubsub = PubSub unless const_defined? :Pubsub + end +end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb index 539dce76f79c..b2b47f4c8905 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb @@ -29,21 +29,21 @@ module PubSub # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # puts received_message.message.data # received_message.acknowledge! # end # # # Start background threads that will call the block passed to listen. - # subscriber.start + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # class ReceivedMessage ## - # @private The {Subscription} object. + # @private The {Google::Cloud::PubSub::V1::Subscription} object. attr_accessor :subscription ## @@ -51,7 +51,7 @@ class ReceivedMessage attr_accessor :grpc ## - # @private Create an empty {Subscription} object. + # @private Create an empty {Google::Cloud::PubSub::V1::Subscription} object. def initialize @subscription = nil @grpc = Google::Cloud::PubSub::V1::ReceivedMessage.new @@ -65,8 +65,7 @@ def ack_id ## # Returns the delivery attempt counter for the message. If a dead letter policy is not set on the subscription, - # this will be `nil`. See {Topic#subscribe}, {Subscription#dead_letter_topic=} and - # {Subscription#dead_letter_max_delivery_attempts=}. + # this will be `nil`. # # The delivery attempt counter is `1 + (the sum of number of NACKs and number of ack_deadline exceeds)` for the # message. @@ -88,11 +87,11 @@ def ack_id # # topic = pubsub.topic "my-topic" # dead_letter_topic = pubsub.topic "my-dead-letter-topic", skip_lookup: true - # sub = topic.subscribe "my-topic-sub", + # subscriber = topic.subscribe "my-topic-sub", # dead_letter_topic: dead_letter_topic, # dead_letter_max_delivery_attempts: 10 # - # subscriber = sub.listen do |received_message| + # listener = subscriber.listen do |received_message| # puts received_message.message.delivery_attempt # end # @@ -143,7 +142,7 @@ def message_id # or scalability, as the service automatically distributes messages for # different ordering keys across subscribers. # - # See {Topic#publish_async} and {Subscription#listen}. + # See {Publisher#publish_async} and {Subscriber#listen}. # # @return [String] # @@ -169,8 +168,8 @@ def published_at # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # puts received_message.message.data # # received_message.acknowledge! do |result| @@ -179,28 +178,28 @@ def published_at # end # # # Start background threads that will call block passed to listen. - # subscriber.start + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # # @example # require "google/cloud/pubsub" # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # puts received_message.message.data # # received_message.acknowledge! # end # # # Start background threads that will call block passed to listen. - # subscriber.start + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # def acknowledge!(&) ensure_subscription! @@ -233,8 +232,8 @@ def acknowledge!(&) # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # puts received_message.message.data # # # Delay for 2 minutes @@ -244,18 +243,18 @@ def acknowledge!(&) # end # # # Start background threads that will call block passed to listen. - # subscriber.start + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # # @example # require "google/cloud/pubsub" # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # puts received_message.message.data # # # Delay for 2 minutes @@ -263,10 +262,10 @@ def acknowledge!(&) # end # # # Start background threads that will call block passed to listen. - # subscriber.start + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # def modify_ack_deadline!(new_deadline, &) ensure_subscription! @@ -292,8 +291,8 @@ def modify_ack_deadline!(new_deadline, &) # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # puts received_message.message.data # # # Release message back to the API. @@ -303,18 +302,18 @@ def modify_ack_deadline!(new_deadline, &) # end # # # Start background threads that will call block passed to listen. - # subscriber.start + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # # @example # require "google/cloud/pubsub" # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # puts received_message.message.data # # # Release message back to the API. @@ -322,10 +321,10 @@ def modify_ack_deadline!(new_deadline, &) # end # # # Start background threads that will call block passed to listen. - # subscriber.start + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # def reject!(&) modify_ack_deadline! 0, & diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/schema.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/schema.rb deleted file mode 100644 index d759ba58c461..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/schema.rb +++ /dev/null @@ -1,378 +0,0 @@ -# Copyright 2021 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. - - -require "google/cloud/pubsub/schema/list" -require "google/cloud/pubsub/v1" - -module Google - module Cloud - module PubSub - ## - # # Schema - # - # A schema resource. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schema = pubsub.schema "my-schema" - # schema.name #=> "projects/my-project/schemas/my-schema" - # schema.type #=> :PROTOCOL_BUFFER - # - class Schema - ## - # @private The Service object. - attr_accessor :service - - ## - # @private The gRPC Google::Cloud::PubSub::V1::Schema object. - attr_accessor :grpc - - ## - # @private Create a new Schema instance. - def initialize grpc, service, view: nil - @grpc = grpc - @service = service - @exists = nil - @view = view || :FULL - end - - ## - # The name of the schema. - # - # @return [String] A fully-qualified schema name in the form `projects/{project_id}/schemas/{schema_id}`. - # - def name - @grpc.name - end - - ## - # The type of the schema. Possible values include: - # - # * `PROTOCOL_BUFFER` - A Protocol Buffer schema definition. - # * `AVRO` - An Avro schema definition. - # - # @return [String, nil] The upper-case type name. - # - def type - return nil if reference? - @grpc.type - end - - ## - # The definition of the schema. This should be a string representing the full definition of the schema that is a - # valid schema definition of the type specified in {#type}. - # - # @return [String, nil] The schema definition. - # - def definition - return nil if reference? - @grpc.definition if @grpc.definition && !@grpc.definition.empty? - end - - ## - # The revision ID of the schema. - # - # @return [String] The revision id. - # @return [nil] If this object is a reference. - # - def revision_id - return nil if reference? - @grpc.revision_id if @grpc.revision_id && !@grpc.revision_id.empty? - end - - ## - # Validates a message against a schema. - # - # @param message_data [String] Message to validate against the provided `schema_spec`. - # @param message_encoding [Symbol, String] The encoding of the message validated against the schema. Values - # include: - # - # * `JSON` - JSON encoding. - # * `BINARY` - Binary encoding, as defined by the schema type. For some schema types, binary encoding may not - # be available. - # - # @return [Boolean] Returns `true` if the message validiation succeeds, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # schema = pubsub.schema "my-schema" - # - # message_data = { "name" => "Alaska", "post_abbr" => "AK" }.to_json - # schema.validate_message message_data, :json - # - def validate_message message_data, message_encoding - message_encoding = message_encoding.to_s.upcase - service.validate_message message_data, message_encoding, schema_name: name - true - rescue Google::Cloud::InvalidArgumentError - false - end - - ## - # Removes the schema, if it exists. - # - # @return [Boolean] Returns `true` if the schema was deleted. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # schema = pubsub.schema "my-schema" - # - # schema.delete - # - def delete - ensure_service! - service.delete_schema name - true - end - - ## - # Reloads the schema with current data from the Pub/Sub service. - # - # @param view [Symbol, String, nil] The set of fields to return in the response. Possible values: - # * `BASIC` - Include the `name` and `type` of the schema, but not the `definition`. - # * `FULL` - Include all Schema object fields. - # - # Optional. If not provided or `nil`, the last non-nil `view` argument to this method will be used if one has - # been given, othewise `FULL` will be used. - # - # @return [Google::Cloud::PubSub::Schema] Returns the reloaded schema. - # - # @example Skip retrieving the schema from the service, then load it: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # schema = pubsub.schema "my-schema", skip_lookup: true - # - # schema.reload! - # - # @example Use the `view` option to load the basic or full resource: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # schema = pubsub.schema "my-schema", view: :basic - # schema.resource_partial? #=> true - # - # schema.reload! view: :full - # schema.resource_partial? #=> false - # - # @!group Lifecycle - # - def reload! view: nil - ensure_service! - @view = view || @view - @grpc = service.get_schema name, @view - @reference = nil - @exists = nil - self - end - alias refresh! reload! - - ## - # Determines whether the schema exists in the Pub/Sub service. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schema = pubsub.schema "my-schema" - # schema.exists? #=> true - # - def exists? - # Always true if the object is not set as reference - return true unless reference? - # If we have a value, return it - return @exists unless @exists.nil? - ensure_grpc! - @exists = true - rescue Google::Cloud::NotFoundError - @exists = false - end - - ## - # Commits a new schema revision to an existing schema. - # - # @param definition [String] The definition of the schema. This should - # contain a string representing the full definition of the schema that - # is a valid schema definition of the type specified in `type`. See - # https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas#Schema - # for details. - # @param type [String, Symbol] The type of the schema. Possible values are - # case-insensitive and include: - # - # * `PROTOCOL_BUFFER` - A Protocol Buffer schema definition. - # * `AVRO` - An Avro schema definition. - # - # @return [Google::Cloud::PubSub::Schema] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schema = pubsub.schema "my-schema" - # - # definition = File.read /path/to/file - # - # revision_schema = schema.commit definition, type: :protocol_buffer - # - def commit definition, type - type = type.to_s.upcase - grpc = service.commit_schema name, definition, type - Schema.from_grpc grpc, service, view: @view - end - - ## - # Lists all schema revisions for the named schema. - # - # @param view [Symbol, String, nil] The set of fields to return in the response. Possible values: - # * `BASIC` - Include the `name` and `type` of the schema, but not the `definition`. - # * `FULL` - Include all Schema object fields. - # - # @return [Google::Cloud::PubSub::V1::ListSchemaRevisionsResponse] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schema = pubsub.schema "my-schema" - # schema.list_revisions - # - def list_revisions view: nil, page_size: nil, page_token: nil - service.list_schema_revisions name, - view || @view, - page_size, - page_token - end - - ## - # Determines whether the schema object was created without retrieving the - # resource representation from the Pub/Sub service. - # - # @return [Boolean] `true` when the schema was created without a resource - # representation, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schema = pubsub.schema "my-schema", skip_lookup: true - # schema.reference? #=> true - # - def reference? - @grpc.type.nil? || @grpc.type == :TYPE_UNSPECIFIED - end - - ## - # Determines whether the schema object was created with a resource - # representation from the Pub/Sub service. - # - # @return [Boolean] `true` when the schema was created with a resource - # representation, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schema = pubsub.schema "my-schema" - # schema.resource? #=> true - # - def resource? - !reference? - end - - ## - # Whether the schema was created with a partial resource representation - # from the Pub/Sub service. - # - # @return [Boolean] `true` when the schema was created with a partial - # resource representation, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # schema = pubsub.schema "my-schema", view: :basic - # - # schema.resource_partial? #=> true - # schema.reload! view: :full # Loads the full resource. - # schema.resource_partial? #=> false - # - def resource_partial? - resource? && !resource_full? - end - - ## - # Whether the schema was created with a full resource representation - # from the Pub/Sub service. - # - # @return [Boolean] `true` when the schema was created with a full - # resource representation, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # schema = pubsub.schema "my-schema" - # - # schema.resource_full? #=> true - # - def resource_full? - resource? && @grpc.definition && !@grpc.definition.empty? - end - - ## - # @private New Schema from a Google::Cloud::PubSub::V1::Schema object. - def self.from_grpc grpc, service, view: nil - new grpc, service, view: view - end - - ## - # @private New reference Schema object without making an HTTP request. - def self.from_name name, view, service, options = {} - grpc = Google::Cloud::PubSub::V1::Schema.new name: service.schema_path(name, options) - from_grpc grpc, service, view: view - end - - protected - - ## - # @private Raise an error unless an active connection to the service is available. - def ensure_service! - raise "Must have active connection to service" unless service - end - - ## - # Ensures a Google::Cloud::PubSub::V1::Schema object exists. - def ensure_grpc! - ensure_service! - reload! if reference? - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/schema/list.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/schema/list.rb deleted file mode 100644 index 75a9e10dc933..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/schema/list.rb +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright 2021 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. - - -require "delegate" - -module Google - module Cloud - module PubSub - class Schema - ## - # Schema::List is a special case Array with additional values. - class List < DelegateClass(::Array) - ## - # If not empty, indicates that there are more schemas - # that match the request and this value should be passed to - # the next {Google::Cloud::PubSub::Project#schemas} to continue. - attr_accessor :token - - ## - # @private Create a new Schema::List with an array of values. - def initialize arr = [] - @prefix = nil - @token = nil - @view = nil - @max = nil - super arr - end - - ## - # Whether there a next page of schemas. - # - # @return [Boolean] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schemas = pubsub.schemas - # if schemas.next? - # next_schemas = schemas.next - # end - # - def next? - !token.nil? - end - - ## - # Retrieve the next page of schemas. - # - # @return [Schema::List] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schemas = pubsub.schemas - # if schemas.next? - # next_schemas = schemas.next - # end - # - def next - return nil unless next? - ensure_service! - next_schemas - end - - ## - # Retrieves remaining results by repeatedly invoking {#next} until - # {#next?} returns `false`. Calls the given block once for each - # result, which is passed as the argument to the block. - # - # An Enumerator is returned if no block is given. - # - # This method will make repeated API calls until all remaining results - # are retrieved. (Unlike `#each`, for example, which merely iterates - # over the results returned by a single API call.) Use with caution. - # - # @param [Integer] request_limit The upper limit of API requests to - # make to load all schemas. Default is no limit. - # @yield [schema] The block for accessing each schema. - # @yieldparam [Schema] schema The schema object. - # - # @return [Enumerator] - # - # @example Iterating each schema by passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schemas = pubsub.schemas - # schemas.all do |schema| - # puts schema.name - # end - # - # @example Using the enumerator by not passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schemas = pubsub.schemas - # all_names = schemas.all.map do |schema| - # schema.name - # end - # - # @example Limit the number of API calls made: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # schemas = pubsub.schemas - # schemas.all(request_limit: 10) do |schema| - # puts schema.name - # end - # - def all request_limit: nil, &block - request_limit = request_limit.to_i if request_limit - return enum_for :all, request_limit: request_limit unless block_given? - results = self - loop do - results.each(&block) - if request_limit - request_limit -= 1 - break if request_limit.negative? - end - break unless results.next? - results = results.next - end - end - - ## - # @private New Schemas::List from a - # Google::Cloud::PubSub::V1::ListSchemasRequest object. - def self.from_grpc grpc_list, service, view, max = nil - subs = new(Array(grpc_list.schemas).map do |grpc| - Schema.from_grpc grpc, service - end) - token = grpc_list.next_page_token - token = nil if token == "".freeze - subs.instance_variable_set :@token, token - subs.instance_variable_set :@service, service - subs.instance_variable_set :@view, view - subs.instance_variable_set :@max, max - subs - end - - protected - - ## - # @private Raise an error unless an active connection to the service - # is available. - def ensure_service! - raise "Must have active connection to service" unless @service - end - - def next_schemas - options = { prefix: @prefix, token: @token, max: @max } - grpc = @service.list_schemas @view, options - self.class.from_grpc grpc, @service, @view, @max - end - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb index a2c67d644b8c..f68ed5d5984d 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb @@ -50,9 +50,9 @@ def initialize project, credentials, host: nil, timeout: nil, universe_domain: n @universe_domain = universe_domain || ENV["GOOGLE_CLOUD_UNIVERSE_DOMAIN"] || "googleapis.com" end - def subscriber - return mocked_subscriber if mocked_subscriber - @subscriber ||= V1::Subscriber::Client.new do |config| + def subscription_admin + return mocked_subscription_admin if mocked_subscription_admin + @subscription_admin ||= V1::SubscriptionAdmin::Client.new do |config| config.credentials = credentials if credentials override_client_config_timeouts config if timeout config.endpoint = host if host @@ -62,11 +62,11 @@ def subscriber config.metadata = { "google-cloud-resource-prefix": "projects/#{@project}" } end end - attr_accessor :mocked_subscriber + attr_accessor :mocked_subscription_admin - def publisher - return mocked_publisher if mocked_publisher - @publisher ||= V1::Publisher::Client.new do |config| + def topic_admin + return mocked_topic_admin if mocked_topic_admin + @topic_admin ||= V1::TopicAdmin::Client.new do |config| config.credentials = credentials if credentials override_client_config_timeouts config if timeout config.endpoint = host if host @@ -76,12 +76,12 @@ def publisher config.metadata = { "google-cloud-resource-prefix": "projects/#{@project}" } end end - attr_accessor :mocked_publisher + attr_accessor :mocked_topic_admin def iam return mocked_iam if mocked_iam @iam ||= begin - iam = (@publisher || @subscriber || @schemas || subscriber).iam_policy_client + iam = (@topic_admin || @subscription_admin || @schemas).iam_policy_client iam.configure do |config| override_client_config_timeouts config if timeout config.lib_name = "gccl" @@ -107,77 +107,6 @@ def schemas end attr_accessor :mocked_schemas - ## - # Gets the configuration of a topic. - # Since the topic only has the name attribute, - # this method is only useful to check the existence of a topic. - # If other attributes are added in the future, - # they will be returned here. - def get_topic topic_name, options = {} - publisher.get_topic topic: topic_path(topic_name, options) - end - - ## - # Lists matching topics. - def list_topics options = {} - paged_enum = publisher.list_topics project: project_path(options), - page_size: options[:max], - page_token: options[:token] - - paged_enum.response - end - - ## - # Creates the given topic with the given name. - def create_topic topic_name, - labels: nil, - kms_key_name: nil, - persistence_regions: nil, - schema_name: nil, - message_encoding: nil, - retention: nil, - ingestion_data_source_settings: nil, - options: {} - if persistence_regions - message_storage_policy = Google::Cloud::PubSub::V1::MessageStoragePolicy.new( - allowed_persistence_regions: Array(persistence_regions) - ) - end - - if schema_name || message_encoding - unless schema_name && message_encoding - raise ArgumentError, "Schema settings must include both schema_name and message_encoding." - end - schema_settings = Google::Cloud::PubSub::V1::SchemaSettings.new( - schema: schema_path(schema_name), - encoding: message_encoding.to_s.upcase - ) - end - - publisher.create_topic \ - name: topic_path(topic_name, options), - labels: labels, - kms_key_name: kms_key_name, - message_storage_policy: message_storage_policy, - schema_settings: schema_settings, - message_retention_duration: Convert.number_to_duration(retention), - ingestion_data_source_settings: ingestion_data_source_settings - end - - def update_topic topic_obj, *fields - mask = Google::Protobuf::FieldMask.new paths: fields.map(&:to_s) - publisher.update_topic topic: topic_obj, update_mask: mask - end - - ## - # Deletes the topic with the given name. All subscriptions to this topic - # are also deleted. Raises GRPC status code 5 if the topic does not - # exist. After a topic is deleted, a new topic may be created with the - # same name. - def delete_topic topic_name - publisher.delete_topic topic: topic_path(topic_name) - end - ## # Adds one or more messages to the topic. # Raises GRPC status code 5 if the topic does not exist. @@ -186,57 +115,7 @@ def delete_topic topic_name def publish topic, messages, compress: false request = { topic: topic_path(topic), messages: messages } compress_options = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } - compress ? (publisher.publish request, compress_options) : (publisher.publish request) - end - - ## - # Gets the details of a subscription. - def get_subscription subscription_name, options = {} - subscriber.get_subscription subscription: subscription_path(subscription_name, options) - end - - ## - # Lists matching subscriptions by project and topic. - def list_topics_subscriptions topic, options = {} - publisher.list_topic_subscriptions topic: topic_path(topic, options), - page_size: options[:max], - page_token: options[:token] - end - - ## - # Lists matching subscriptions by project. - def list_subscriptions options = {} - paged_enum = subscriber.list_subscriptions project: project_path(options), - page_size: options[:max], - page_token: options[:token] - - paged_enum.response - end - - ## - # Creates a subscription on a given topic for a given subscriber. - def create_subscription topic, subscription_name, options = {} - updated_option = construct_create_subscription_options topic, subscription_name, options - subscriber.create_subscription(**updated_option) - end - - def update_subscription subscription_obj, *fields - mask = Google::Protobuf::FieldMask.new paths: fields.map(&:to_s) - subscriber.update_subscription subscription: subscription_obj, update_mask: mask - end - - ## - # Deletes an existing subscription. All pending messages in the subscription are immediately dropped. - def delete_subscription subscription - subscriber.delete_subscription subscription: subscription_path(subscription) - end - - ## - # Detaches a subscription from its topic. All messages retained in the subscription are dropped. Subsequent - # `Pull` and `StreamingPull` requests will raise `FAILED_PRECONDITION`. If the subscription is a push - # subscription, pushes to the endpoint will stop. - def detach_subscription subscription - publisher.detach_subscription subscription: subscription_path(subscription) + compress ? (topic_admin.publish request, compress_options) : (topic_admin.publish request) end ## @@ -245,233 +124,31 @@ def pull subscription, options = {} max_messages = options.fetch(:max, 100).to_i return_immediately = !(!options.fetch(:immediate, true)) - subscriber.pull subscription: subscription_path(subscription, options), - max_messages: max_messages, - return_immediately: return_immediately + subscription_admin.pull subscription: subscription_path(subscription, options), + max_messages: max_messages, + return_immediately: return_immediately end def streaming_pull request_enum, options = {} - subscriber.streaming_pull request_enum, options + subscription_admin.streaming_pull request_enum, options end ## # Acknowledges receipt of a message. def acknowledge subscription, *ack_ids - subscriber.acknowledge subscription: subscription_path(subscription), ack_ids: ack_ids - end - - ## - # Modifies the PushConfig for a specified subscription. - def modify_push_config subscription, endpoint, attributes - # Convert attributes to strings to match the protobuf definition - attributes = attributes.to_h { |k, v| [String(k), String(v)] } - push_config = Google::Cloud::PubSub::V1::PushConfig.new( - push_endpoint: endpoint, - attributes: attributes - ) - - subscriber.modify_push_config subscription: subscription_path(subscription), - push_config: push_config + subscription_admin.acknowledge subscription: subscription_path(subscription), ack_ids: ack_ids end ## # Modifies the ack deadline for a specific message. def modify_ack_deadline subscription, ids, deadline - subscriber.modify_ack_deadline subscription: subscription_path(subscription), - ack_ids: Array(ids), - ack_deadline_seconds: deadline - end - - ## - # Lists snapshots by project. - def list_snapshots options = {} - paged_enum = subscriber.list_snapshots project: project_path(options), - page_size: options[:max], - page_token: options[:token] - - paged_enum.response - end - - ## - # Creates a snapshot on a given subscription. - def create_snapshot subscription, snapshot_name, labels: nil - subscriber.create_snapshot name: snapshot_path(snapshot_name), - subscription: subscription_path(subscription), - labels: labels - end - - def update_snapshot snapshot_obj, *fields - mask = Google::Protobuf::FieldMask.new paths: fields.map(&:to_s) - subscriber.update_snapshot snapshot: snapshot_obj, update_mask: mask - end - - ## - # Deletes an existing snapshot. - # All pending messages in the snapshot are immediately dropped. - def delete_snapshot snapshot - subscriber.delete_snapshot snapshot: snapshot_path(snapshot) - end - - ## - # Adjusts the given subscription to a time or snapshot. - def seek subscription, time_or_snapshot - if a_time? time_or_snapshot - time = Convert.time_to_timestamp time_or_snapshot - subscriber.seek subscription: subscription, time: time - else - time_or_snapshot = time_or_snapshot.name if time_or_snapshot.is_a? Snapshot - subscriber.seek subscription: subscription_path(subscription), - snapshot: snapshot_path(time_or_snapshot) - end - end - - ## - # Lists schemas in the current (or given) project. - # @param view [String, Symbol, nil] Possible values: - # * `BASIC` - Include the name and type of the schema, but not the definition. - # * `FULL` - Include all Schema object fields. - # - def list_schemas view, options = {} - schema_view = Google::Cloud::PubSub::V1::SchemaView.const_get view.to_s.upcase - paged_enum = schemas.list_schemas parent: project_path(options), - view: schema_view, - page_size: options[:max], - page_token: options[:token] - - paged_enum.response - end - - ## - # Lists all schema revisions for the named schema. - # @param name [String] The name of the schema to list revisions for. - # @param view [String, Symbol, nil] Possible values: - # * `BASIC` - Include the name and type of the schema, but not the definition. - # * `FULL` - Include all Schema object fields. - # - def list_schema_revisions name, view, page_size, page_token - schema_view = Google::Cloud::PubSub::V1::SchemaView.const_get view.to_s.upcase - schemas.list_schema_revisions name: name, - view: schema_view, - page_size: page_size, - page_token: page_token - end - - ## - # Creates a schema in the current (or given) project. - def create_schema schema_id, type, definition, options = {} - schema = Google::Cloud::PubSub::V1::Schema.new( - type: type, - definition: definition - ) - schemas.create_schema parent: project_path(options), - schema: schema, - schema_id: schema_id - end - - ## - # Gets the details of a schema. - # @param view [String, Symbol, nil] The set of fields to return in the response. Possible values: - # * `BASIC` - Include the name and type of the schema, but not the definition. - # * `FULL` - Include all Schema object fields. - # - def get_schema schema_name, view, options = {} - schema_view = Google::Cloud::PubSub::V1::SchemaView.const_get view.to_s.upcase - schemas.get_schema name: schema_path(schema_name, options), - view: schema_view - end - - ## - # Delete a schema. - def delete_schema schema_name - schemas.delete_schema name: schema_path(schema_name) - end - - ## - # Commits a new schema revision to an existing schema. - # - # @param name [String] The name of the schema to revision. - # @param definition [String] The definition of the schema. This should - # contain a string representing the full definition of the schema that - # is a valid schema definition of the type specified in `type`. See - # https://cloud.google.com/pubsub/docs/schemas for details. - # @param type [String, Symbol] The type of the schema. Required. Possible - # values are case-insensitive and include: - # - # * `PROTOCOL_BUFFER` - A Protocol Buffer schema definition. - # * `AVRO` - An Avro schema definition. - # - # @return [Google::Cloud::PubSub::V1::Schema] - # - def commit_schema name, definition, type - schema = Google::Cloud::PubSub::V1::Schema.new( - name: name, - definition: definition, - type: type - ) - schemas.commit_schema name: name, schema: schema - end - - ## - # Validate the definition string intended for a schema. - def validate_schema type, definition, options = {} - schema = Google::Cloud::PubSub::V1::Schema.new( - type: type, - definition: definition - ) - schemas.validate_schema parent: project_path(options), - schema: schema - end - - ## - # Validates a message against a schema. - # - # @param message_data [String] Message to validate against the provided `schema_spec`. - # @param message_encoding [Google::Cloud::PubSub::V1::Encoding] The encoding expected for messages. - # @param schema_name [String] Name of the schema against which to validate. - # @param project [String] Name of the project if not the default project. - # @param type [String] Ad-hoc schema type against which to validate. - # @param definition [String] Ad-hoc schema definition against which to validate. - # - def validate_message message_data, message_encoding, schema_name: nil, project: nil, type: nil, definition: nil - if type && definition - schema = Google::Cloud::PubSub::V1::Schema.new( - type: type, - definition: definition - ) - end - schemas.validate_message parent: project_path(project: project), - name: schema_path(schema_name), - schema: schema, - message: message_data, - encoding: message_encoding + subscription_admin.modify_ack_deadline subscription: subscription_path(subscription), + ack_ids: Array(ids), + ack_deadline_seconds: deadline end # Helper methods - def get_topic_policy topic_name, options = {} - iam.get_iam_policy resource: topic_path(topic_name, options) - end - - def set_topic_policy topic_name, new_policy, options = {} - iam.set_iam_policy resource: topic_path(topic_name, options), policy: new_policy - end - - def test_topic_permissions topic_name, permissions, options = {} - iam.test_iam_permissions resource: topic_path(topic_name, options), permissions: permissions - end - - def get_subscription_policy subscription_name, options = {} - iam.get_iam_policy resource: subscription_path(subscription_name, options) - end - - def set_subscription_policy subscription_name, new_policy, options = {} - iam.set_iam_policy resource: subscription_path(subscription_name, options), policy: new_policy - end - - def test_subscription_permissions subscription_name, permissions, options = {} - iam.test_iam_permissions resource: subscription_path(subscription_name, options), permissions: permissions - end - def project_path options = {} project_name = options[:project] || project "projects/#{project_name}" @@ -497,10 +174,6 @@ def schema_path schema_name, options = {} "#{project_path options}/schemas/#{schema_name}" end - def inspect - "#<#{self.class.name} (#{@project})>" - end - protected # Set the timeout in the client config. @@ -514,49 +187,8 @@ def override_client_config_timeouts config rpc.timeout = timeout if rpc.respond_to? :timeout= end end - - def a_time? obj - return false unless obj.respond_to? :to_time - # Rails' String#to_time returns nil if the string doesn't parse. - return false if obj.to_time.nil? - true - end - - def dead_letter_policy options - return nil unless options[:dead_letter_topic_name] - policy = Google::Cloud::PubSub::V1::DeadLetterPolicy.new dead_letter_topic: options[:dead_letter_topic_name] - if options[:dead_letter_max_delivery_attempts] - policy.max_delivery_attempts = options[:dead_letter_max_delivery_attempts] - end - policy - end - - private - - def construct_create_subscription_options topic, subscription_name, options - excess_options = [:deadline, - :retention, - :retain_acked, - :message_ordering, - :endpoint, - :dead_letter_topic_name, - :dead_letter_max_delivery_attempts, - :dead_letter_topic] - - new_options = options.filter { |k, v| !v.nil? && !excess_options.include?(k) } - new_options[:name] = subscription_path subscription_name, options - new_options[:topic] = topic_path topic - new_options[:message_retention_duration] = Convert.number_to_duration options[:retention] - new_options[:dead_letter_policy] = dead_letter_policy options - new_options[:ack_deadline_seconds] = options[:deadline] - new_options[:retain_acked_messages] = options[:retain_acked] - new_options[:enable_message_ordering] = options[:message_ordering] - - new_options.compact - end end end - Pubsub = PubSub unless const_defined? :Pubsub end end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/snapshot.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/snapshot.rb deleted file mode 100644 index 471613c51594..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/snapshot.rb +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright 2017 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. - - -require "google/cloud/errors" -require "google/cloud/pubsub/snapshot/list" -require "google/cloud/pubsub/v1" - -module Google - module Cloud - module PubSub - ## - # # Snapshot - # - # A named resource created from a subscription to retain a stream of - # messages from a topic. A snapshot is guaranteed to retain: - # - # * The existing backlog on the subscription. More precisely, this is - # defined as the messages in the subscription's backlog that are - # unacknowledged upon the successful completion of the - # `create_snapshot` operation; as well as: - # * Any messages published to the subscription's topic following the - # successful completion of the `create_snapshot` operation. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-sub" - # - # snapshot = sub.create_snapshot "my-snapshot" - # snapshot.name #=> "projects/my-project/snapshots/my-snapshot" - # - class Snapshot - ## - # @private The Service object. - attr_accessor :service - - ## - # @private The gRPC Google::Cloud::PubSub::V1::Snapshot object. - attr_accessor :grpc - - ## - # @private Create an empty {Snapshot} object. - def initialize - @service = nil - @grpc = Google::Cloud::PubSub::V1::Snapshot.new - end - - ## - # The name of the snapshot. - # - # @return [String] A fully-qualified snapshot name in the form - # `projects/{project_id}/snapshots/{snapshot_id}`. - def name - @grpc.name - end - - ## - # The {Topic} from which this snapshot is retaining messages. - # - # @return [Topic] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-sub" - # - # snapshot = sub.create_snapshot "my-snapshot" - # snapshot.topic.name #=> "projects/my-project/topics/my-topic" - # - def topic - Topic.from_name @grpc.topic, service - end - - ## - # The snapshot is guaranteed to exist up until this time. - # A newly-created snapshot expires no later than 7 days from the time of - # its creation. Its exact lifetime is determined at creation by the - # existing backlog in the source subscription. Specifically, the - # lifetime of the snapshot is 7 days - (age of oldest unacked message in - # the subscription). For example, consider a subscription whose oldest - # unacked message is 3 days old. If a snapshot is created from this - # subscription, the snapshot -- which will always capture this 3-day-old - # backlog as long as the snapshot exists -- will expire in 4 days. - # - # @return [Time] The time until which the snapshot is guaranteed to - # exist. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-sub" - # - # snapshot = sub.create_snapshot "my-snapshot" - # snapshot.topic.name #=> "projects/my-project/topics/my-topic" - # snapshot.expiration_time - # - def expiration_time - self.class.timestamp_from_grpc @grpc.expire_time - end - - ## - # A hash of user-provided labels associated with this snapshot. - # Labels can be used to organize and group snapshots.See [Creating and - # Managing Labels](https://cloud.google.com/pubsub/docs/labels). - # - # The returned hash is frozen and changes are not allowed. Use - # {#labels=} to update the labels for this snapshot. - # - # @return [Hash] The frozen labels hash. - # - def labels - @grpc.labels.to_h.freeze - end - - ## - # Sets the hash of user-provided labels associated with this - # snapshot. Labels can be used to organize and group snapshots. - # Label keys and values can be no longer than 63 characters, can only - # contain lowercase letters, numeric characters, underscores and dashes. - # International characters are allowed. Label values are optional. Label - # keys must start with a letter and each label in the list must have a - # different key. See [Creating and Managing - # Labels](https://cloud.google.com/pubsub/docs/labels). - # - # @param [Hash] new_labels The new labels hash. - # - def labels= new_labels - raise ArgumentError, "Value must be a Hash" if new_labels.nil? - labels_map = Google::Protobuf::Map.new :string, :string - Hash(new_labels).each { |k, v| labels_map[String(k)] = String(v) } - update_grpc = @grpc.dup - update_grpc.labels = labels_map - @grpc = service.update_snapshot update_grpc, :labels - end - - ## - # Removes an existing snapshot. All messages retained in the snapshot - # are immediately dropped. After a snapshot is deleted, a new one may be - # created with the same name, but the new one has no association with - # the old snapshot or its subscription, unless the same subscription is - # specified. - # - # @return [Boolean] Returns `true` if the snapshot was deleted. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # pubsub.snapshots.each do |snapshot| - # snapshot.delete - # end - # - def delete - ensure_service! - service.delete_snapshot name - true - end - - ## - # @private New Snapshot from a Google::Cloud::PubSub::V1::Snapshot - # object. - def self.from_grpc grpc, service - new.tap do |f| - f.grpc = grpc - f.service = service - end - end - - ## - # @private Get a Time object from a Google::Protobuf::Timestamp object. - def self.timestamp_from_grpc grpc_timestamp - return nil if grpc_timestamp.nil? - Time.at grpc_timestamp.seconds, Rational(grpc_timestamp.nanos, 1000) - end - - protected - - ## - # @private Raise an error unless an active connection to the service is - # available. - def ensure_service! - raise "Must have active connection to service" unless service - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/snapshot/list.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/snapshot/list.rb deleted file mode 100644 index 06bb89393e68..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/snapshot/list.rb +++ /dev/null @@ -1,178 +0,0 @@ -# Copyright 2017 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. - - -require "delegate" - -module Google - module Cloud - module PubSub - class Snapshot - ## - # Snapshot::List is a special case Array with additional values. - class List < DelegateClass(::Array) - ## - # If not empty, indicates that there are more snapshots - # that match the request and this value should be passed to - # the next {Google::Cloud::PubSub::Project#snapshots} to continue. - attr_accessor :token - - ## - # @private Create a new Snapshot::List with an array of values. - def initialize arr = [] - @prefix = nil - @token = nil - @max = nil - super arr - end - - ## - # Whether there a next page of snapshots. - # - # @return [Boolean] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # snapshots = pubsub.snapshots - # if snapshots.next? - # next_snapshots = snapshots.next - # end - # - def next? - !token.nil? - end - - ## - # Retrieve the next page of snapshots. - # - # @return [Snapshot::List] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # snapshots = pubsub.snapshots - # if snapshots.next? - # next_snapshots = snapshots.next - # end - # - def next - return nil unless next? - ensure_service! - next_snapshots - end - - ## - # Retrieves remaining results by repeatedly invoking {#next} until - # {#next?} returns `false`. Calls the given block once for each - # result, which is passed as the argument to the block. - # - # An Enumerator is returned if no block is given. - # - # This method will make repeated API calls until all remaining results - # are retrieved. (Unlike `#each`, for example, which merely iterates - # over the results returned by a single API call.) Use with caution. - # - # @param [Integer] request_limit The upper limit of API requests to - # make to load all snapshots. Default is no limit. - # @yield [snapshot] The block for accessing each snapshot. - # @yieldparam [Snapshot] snapshot The snapshot object. - # - # @return [Enumerator] - # - # @example Iterating each snapshot by passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # snapshots = pubsub.snapshots - # snapshots.all do |snapshot| - # puts snapshot.name - # end - # - # @example Using the enumerator by not passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # snapshots = pubsub.snapshots - # all_names = snapshots.all.map do |snapshot| - # snapshot.name - # end - # - # @example Limit the number of API calls made: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # snapshots = pubsub.snapshots - # snapshots.all(request_limit: 10) do |snapshot| - # puts snapshot.name - # end - # - def all request_limit: nil, &block - request_limit = request_limit.to_i if request_limit - return enum_for :all, request_limit: request_limit unless block_given? - results = self - loop do - results.each(&block) - if request_limit - request_limit -= 1 - break if request_limit.negative? - end - break unless results.next? - results = results.next - end - end - - ## - # @private New Snapshots::List from a - # Google::Cloud::PubSub::V1::ListSnapshotsRequest object. - def self.from_grpc grpc_list, service, max = nil - subs = new(Array(grpc_list.snapshots).map do |grpc| - Snapshot.from_grpc grpc, service - end) - token = grpc_list.next_page_token - token = nil if token == "".freeze - subs.instance_variable_set :@token, token - subs.instance_variable_set :@service, service - subs.instance_variable_set :@max, max - subs - end - - protected - - ## - # @private Raise an error unless an active connection to the service - # is available. - def ensure_service! - raise "Must have active connection to service" unless @service - end - - def next_snapshots - options = { prefix: @prefix, token: @token, max: @max } - grpc = @service.list_snapshots options - self.class.from_grpc grpc, @service, @max - end - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb index 8b384da3d332..1f8f1c42621f 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb @@ -1,4 +1,4 @@ -# Copyright 2017 Google LLC +# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,417 +13,578 @@ # limitations under the License. -require "google/cloud/pubsub/service" -require "google/cloud/pubsub/subscriber/stream" -require "google/cloud/pubsub/subscriber/timed_unary_buffer" -require "monitor" +require "google/cloud/pubsub/convert" +require "google/cloud/errors" +require "google/cloud/pubsub/received_message" +require "google/cloud/pubsub/retry_policy" +require "google/cloud/pubsub/message_listener" +require "google/cloud/pubsub/v1" module Google module Cloud module PubSub ## - # Subscriber object used to stream and process messages from a - # Subscription. See {Google::Cloud::PubSub::Subscription#listen} + # # Subscriber + + # A {Subscriber} is the primary interface for data plane operations, + # enabling you to receive messages from a subscription, either by streaming + # with a {MessageListener} or by pulling them directly. # # @example # require "google/cloud/pubsub" # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # # process message # received_message.acknowledge! # end # - # # Start background threads that will call the block passed to listen. - # subscriber.start - # - # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # # Handle exceptions from listener + # listener.on_error do |exception| + # puts "Exception: #{exception.class} #{exception.message}" + # end # - # @attr_reader [String] subscription_name The name of the subscription the - # messages are pulled from. - # @attr_reader [Proc] callback The procedure that will handle the messages - # received from the subscription. - # @attr_reader [Numeric] deadline The default number of seconds the stream - # will hold received messages before modifying the message's ack - # deadline. The minimum is 10, the maximum is 600. Default is 60. - # @attr_reader [Boolean] message_ordering Whether message ordering has - # been enabled. - # @attr_reader [Integer] streams The number of concurrent streams to open - # to pull messages from the subscription. Default is 2. - # @attr_reader [Integer] callback_threads The number of threads used to - # handle the received messages. Default is 8. - # @attr_reader [Integer] push_threads The number of threads to handle - # acknowledgement ({ReceivedMessage#ack!}) and delay messages - # ({ReceivedMessage#nack!}, {ReceivedMessage#modify_ack_deadline!}). - # Default is 4. + # # Gracefully shut down the subscriber + # at_exit do + # listener.stop! + # end # + # # Start background threads that will call the block passed to listen. + # listener.start + # sleep class Subscriber - include MonitorMixin - - attr_reader :subscription_name - attr_reader :callback - attr_reader :deadline - attr_reader :streams - attr_reader :message_ordering - attr_reader :callback_threads - attr_reader :push_threads - ## - # @private Implementation attributes. - attr_reader :stream_pool, :thread_pool, :buffer, :service + # @private The Service object. + attr_accessor :service ## - # @private Implementation attributes. - attr_accessor :exactly_once_delivery_enabled + # @private The gRPC Google::Cloud::PubSub::V1::Subscription object. + attr_accessor :grpc ## # @private Create an empty {Subscriber} object. - def initialize subscription_name, callback, deadline: nil, message_ordering: nil, streams: nil, inventory: nil, - threads: {}, service: nil - super() # to init MonitorMixin - - @callback = callback - @error_callbacks = [] - @subscription_name = subscription_name - @deadline = deadline || 60 - @streams = streams || 2 - coerce_inventory inventory - @message_ordering = message_ordering - @callback_threads = Integer(threads[:callback] || 8) - @push_threads = Integer(threads[:push] || 4) - @exactly_once_delivery_enabled = nil - - @service = service - - @started = @stopped = nil - - stream_pool = Array.new @streams do - Thread.new { Stream.new self } - end - @stream_pool = stream_pool.map(&:value) - - @buffer = TimedUnaryBuffer.new self + def initialize + @service = nil + @grpc = nil + @resource_name = nil + @exists = nil end ## - # Starts the subscriber pulling from the subscription and processing the - # received messages. + # The underlying Subscription resource. # - # @return [Subscriber] returns self so calls can be chained. + # Provides access to the `Google::Cloud::PubSub::V1::Subscription` + # resource managed by this subscriber. # - def start - start_pool = synchronize do - @started = true - @stopped = false - - # Start the buffer before the streams are all started - @buffer.start - @stream_pool.map do |stream| - Thread.new { stream.start } - end - end - start_pool.map(&:join) - - self + # Makes an API call to retrieve the actual subscription when called + # on a reference object. See {#reference?}. + # + # @return [Google::Cloud::PubSub::V1::Subscription] + # + def subscription_resource + ensure_grpc! + @grpc end ## - # Immediately stops the subscriber. No new messages will be pulled from - # the subscription. Use {#wait!} to block until all received messages have - # been processed or released: All actions taken on received messages that - # have not yet been sent to the API will be sent to the API. All received - # but unprocessed messages will be released back to the API and redelivered. - # - # @return [Subscriber] returns self so calls can be chained. - # - def stop - synchronize do - @started = false - @stopped = true - @stream_pool.map(&:stop) - wait_stop_buffer_thread! - self - end + # The name of the subscription. + # + # @return [String] A fully-qualified subscription name in the form + # `projects/{project_id}/subscriptions/{subscription_id}`. + # + def name + return @resource_name if reference? + @grpc.name end ## - # Blocks until the subscriber is fully stopped and all received messages - # have been processed or released, or until `timeout` seconds have - # passed. - # - # Does not stop the subscriber. To stop the subscriber, first call - # {#stop} and then call {#wait!} to block until the subscriber is - # stopped. + # This value is the maximum number of seconds after a subscriber + # receives a message before the subscriber should acknowledge the + # message. # - # @param [Number, nil] timeout The number of seconds to block until the - # subscriber is fully stopped. Default will block indefinitely. + # Makes an API call to retrieve the deadline value when called on a + # reference object. See {#reference?}. # - # @return [Subscriber] returns self so calls can be chained. - # - def wait! timeout = nil - wait_stop_buffer_thread! - @wait_stop_buffer_thread.join timeout - self + # @return [Integer] + def deadline + ensure_grpc! + @grpc.ack_deadline_seconds end ## - # Stop this subscriber and block until the subscriber is fully stopped - # and all received messages have been processed or released, or until - # `timeout` seconds have passed. + # Whether message ordering has been enabled. When enabled, messages + # published with the same `ordering_key` will be delivered in the order + # they were published. When disabled, messages may be delivered in any + # order. # - # The same as calling {#stop} and {#wait!}. + # @note At the time of this release, ordering keys are not yet publicly + # enabled and requires special project enablements. # - # @param [Number, nil] timeout The number of seconds to block until the - # subscriber is fully stopped. Default will block indefinitely. + # See {Publisher#publish_async}, {#listen}, and {Message#ordering_key}. # - # @return [Subscriber] returns self so calls can be chained. + # Makes an API call to retrieve the enable_message_ordering value when called on a + # reference object. See {#reference?}. # - def stop! timeout = nil - stop - wait! timeout + # @return [Boolean] + # + def message_ordering? + ensure_grpc! + @grpc.enable_message_ordering end ## - # Whether the subscriber has been started. + # Determines whether the subscription exists in the Pub/Sub service. # - # @return [boolean] `true` when started, `false` otherwise. + # Makes an API call to determine whether the subscription resource + # exists when called on a reference object. See {#reference?}. # - def started? - synchronize { @started } - end - - ## - # Whether the subscriber has been stopped. + # @return [Boolean] # - # @return [boolean] `true` when stopped, `false` otherwise. + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new # - def stopped? - synchronize { @stopped } + # subscriber = pubsub.subscriber "my-topic-sub" + # subscriber.exists? #=> true + # + def exists? + # Always true if the object is not set as reference + return true unless reference? + # If we have a value, return it + return @exists unless @exists.nil? + ensure_grpc! + @exists = true + rescue Google::Cloud::NotFoundError + @exists = false end ## - # Register to be notified of errors when raised. + # Pulls messages from the server, blocking until messages are available + # when called with the `immediate: false` option, which is recommended + # to avoid adverse impacts on the performance of pull operations. # - # If an unhandled error has occurred the subscriber will attempt to - # recover from the error and resume listening. + # Raises an API error with status `UNAVAILABLE` if there are too many + # concurrent pull requests pending for the given subscription. # - # Multiple error handlers can be added. + # See also {#listen} for the preferred way to process messages as they + # become available. # - # @yield [callback] The block to be called when an error is raised. - # @yieldparam [Exception] error The error raised. + # @param [Boolean] immediate Whether to return immediately or block until + # messages are available. # - # @example + # **Warning:** The default value of this field is `true`. However, sending + # `true` is discouraged because it adversely impacts the performance of + # pull operations. We recommend that users always explicitly set this field + # to `false`. + # + # If this field set to `true`, the system will respond immediately + # even if it there are no messages available to return in the pull + # response. Otherwise, the system may wait (for a bounded amount of time) + # until at least one message is available, rather than returning no messages. + # + # See also {#listen} for the preferred way to process messages as they + # become available. + # @param [Integer] max The maximum number of messages to return for this + # request. The Pub/Sub system may return fewer than the number + # specified. The default value is `100`, the maximum value is `1000`. + # + # @return [Array] + # + # @example The `immediate: false` option is now recommended to avoid adverse impacts on pull operations: # require "google/cloud/pubsub" # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" - # - # subscriber = sub.listen do |received_message| - # # process message + # subscriber = pubsub.subscriber "my-topic-sub" + # received_messages = subscriber.pull immediate: false + # received_messages.each do |received_message| # received_message.acknowledge! # end # - # # Register to be notified when unhandled errors occur. - # subscriber.on_error do |error| - # # log error - # puts error - # end + # @example A maximum number of messages returned can also be specified: + # require "google/cloud/pubsub" # - # # Start listening for messages and errors. - # subscriber.start + # pubsub = Google::Cloud::PubSub.new # - # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # subscriber = pubsub.subscriber "my-topic-sub" + # received_messages = subcriber.pull immediate: false, max: 10 + # received_messages.each do |received_message| + # received_message.acknowledge! + # end # - def on_error &block - synchronize do - @error_callbacks << block + def pull immediate: true, max: 100 + ensure_service! + options = { immediate: immediate, max: max } + list_grpc = service.pull name, options + Array(list_grpc.received_messages).map do |msg_grpc| + ReceivedMessage.from_grpc msg_grpc, self end + rescue Google::Cloud::DeadlineExceededError + [] end ## - # The most recent unhandled error to occur while listening to messages - # on the subscriber. + # Pulls from the server while waiting for messages to become available. + # This is the same as: + # + # subscriber.pull immediate: false # - # If an unhandled error has occurred the subscriber will attempt to - # recover from the error and resume listening. + # See also {#listen} for the preferred way to process messages as they + # become available. # - # @return [Exception, nil] error The most recent error raised. + # @param [Integer] max The maximum number of messages to return for this + # request. The Pub/Sub system may return fewer than the number + # specified. The default value is `100`, the maximum value is `1000`. + # + # @return [Array] # # @example # require "google/cloud/pubsub" # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscription "my-topic-sub" + # subscriber = pubsub.subscriber "my-topic-sub" + # received_messages = subscriber.wait_for_messages + # received_messages.each do |received_message| + # received_message.acknowledge! + # end # - # subscriber = sub.listen do |received_message| + def wait_for_messages max: 100 + pull immediate: false, max: max + end + + ## + # Create a {MessageListener} object that receives and processes messages + # using the code provided in the callback. Messages passed to the + # callback should acknowledge ({ReceivedMessage#acknowledge!}) or reject + # ({ReceivedMessage#reject!}) the message. If no action is taken, the + # message will be removed from the subscriber and made available for + # redelivery after the callback is completed. + # + # Google Cloud Pub/Sub ordering keys provide the ability to ensure + # related messages are sent to subscribers in the order in which they + # were published. Messages can be tagged with an ordering key, a string + # that identifies related messages for which publish order should be + # respected. The service guarantees that, for a given ordering key and + # publisher, messages are sent to subscribers in the order in which they + # were published. Ordering does not require sacrificing high throughput + # or scalability, as the service automatically distributes messages for + # different ordering keys across subscribers. + # + # To use ordering keys, the subscription must be created with message + # ordering enabled before calling {#listen}. When enabled, the subscriber + # will deliver messages with the same `ordering_key` in the order they were + # published. + # + # @note At the time of this release, ordering keys are not yet publicly + # enabled and requires special project enablements. + # + # @param [Numeric] deadline The default number of seconds the stream + # will hold received messages before modifying the message's ack + # deadline. The minimum is 10, the maximum is 600. Default is + # {#deadline}. Optional. + # + # When using a reference object an API call will be made to retrieve + # the default deadline value for the subscription when this argument + # is not provided. See {#reference?}. + # @param [Boolean] message_ordering Whether message ordering has been + # enabled. The value provided must match the value set on the Pub/Sub + # service. See {#message_ordering?}. Optional. + # + # When using a reference object an API call will be made to retrieve + # the default message_ordering value for the subscription when this + # argument is not provided. See {#reference?}. + # @param [Integer] streams The number of concurrent streams to open to + # pull messages from the subscription. Default is 2. Optional. + # @param [Hash, Integer] inventory The settings to control how received messages are to be handled by the + # subscriber. When provided as an Integer instead of a Hash only `max_outstanding_messages` will be set. + # Optional. + # + # Hash keys and values may include the following: + # + # * `:max_outstanding_messages` [Integer] The number of received messages to be collected by subscriber. + # Default is 1,000. (Note: replaces `:limit`, which is deprecated.) + # * `:max_outstanding_bytes` [Integer] The total byte size of received messages to be collected by + # subscriber. Default is 100,000,000 (100MB). (Note: replaces `:bytesize`, which is deprecated.) + # * `:max_total_lease_duration` [Integer] The number of seconds that received messages can be held awaiting + # processing. Default is 3,600 (1 hour). (Note: replaces `:extension`, which is deprecated.) + # * `:max_duration_per_lease_extension` [Integer] The maximum amount of time in seconds for a single lease + # extension attempt. Bounds the delay before a message redelivery if the subscriber fails to extend the + # deadline. Default is 0 (disabled). + # @param [Hash] threads The number of threads to create to handle + # concurrent calls by each stream opened by the subscriber. Optional. + # + # Hash keys and values may include the following: + # + # * `:callback` (Integer) The number of threads used to handle the + # received messages. Default is 8. + # * `:push` (Integer) The number of threads to handle + # acknowledgement ({ReceivedMessage#ack!}) and modify ack deadline + # messages ({ReceivedMessage#nack!}, + # {ReceivedMessage#modify_ack_deadline!}). Default is 4. + # + # @yield [received_message] a block for processing new messages + # @yieldparam [ReceivedMessage] received_message the newly received + # message + # + # @return [MessageListener] + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # subscriber = pubsub.subscriber "my-topic-sub" + # + # listener = subscriber.listen do |received_message| # # process message + # puts "Data: #{received_message.message.data}, published at #{received_message.message.published_at}" + # received_message.acknowledge! + # end + # + # # Start background threads that will call block passed to listen. + # listener.start + # + # # Shut down the subscriber when ready to stop receiving messages. + # listener.stop! + # + # @example Configuring to increase concurrent callbacks: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # subscriber = pubsub.subscription "my-topic-sub" + # + # listener = subscriber.listen threads: { callback: 16 } do |rec_message| + # # store the message somewhere before acknowledging + # store_in_backend rec_message.data # takes a few seconds + # rec_message.acknowledge! + # end + # + # # Start background threads that will call block passed to listen. + # listener.start + # + # # Shut down the subscriber when ready to stop receiving messages. + # listener.stop! + # + # @example Ordered messages are supported using ordering_key: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # sub = pubsub.subscriber "my-ordered-topic-sub" + # subscriber.message_ordering? #=> true + # + # listener = subscriber.listen do |received_message| + # # messsages with the same ordering_key are received + # # in the order in which they were published. # received_message.acknowledge! # end # - # # Start listening for messages and errors. - # subscriber.start + # # Start background threads that will call block passed to listen. + # listener.start # - # # If an error was raised, it can be retrieved here: - # subscriber.last_error #=> nil + # # Shut down the subscriber when ready to stop receiving messages. + # listener.stop! + # + # @example Set the maximum amount of time before redelivery if the subscriber fails to extend the deadline: + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # subscriber = pubsub.subscriber "my-topic-sub" + # + # listener = subscriber.listen inventory: { max_duration_per_lease_extension: 20 } do |received_message| + # # Process message very slowly with possibility of failure. + # process rec_message.data # takes minutes + # rec_message.acknowledge! + # end + # + # # Start background threads that will call block passed to listen. + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # - def last_error - synchronize { @last_error } + def listen deadline: nil, message_ordering: nil, streams: nil, inventory: nil, threads: {}, &block + ensure_service! + deadline ||= self.deadline + message_ordering = message_ordering? if message_ordering.nil? + + MessageListener.new name, block, deadline: deadline, streams: streams, inventory: inventory, + message_ordering: message_ordering, threads: threads, service: service end ## - # The number of received messages to be collected by subscriber. Default is 1,000. + # Acknowledges receipt of a message. After an ack, + # the Pub/Sub system can remove the message from the subscription. + # Acknowledging a message whose ack deadline has expired may succeed, + # although the message may have been sent again. + # Acknowledging a message more than once will not result in an error. + # This is only used for messages received via pull. # - # @return [Integer] The maximum number of messages. + # See also {ReceivedMessage#acknowledge!}. # - def max_outstanding_messages - @inventory[:max_outstanding_messages] - end - # @deprecated Use {#max_outstanding_messages}. - alias inventory_limit max_outstanding_messages - # @deprecated Use {#max_outstanding_messages}. - alias inventory max_outstanding_messages - - ## - # The total byte size of received messages to be collected by subscriber. Default is 100,000,000 (100MB). + # @param [ReceivedMessage, String] messages One or more + # {ReceivedMessage} objects or ack_id values. # - # @return [Integer] The maximum number of bytes. + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # subscriber = pubsub.subscriber "my-topic-sub" + # received_messages = sub.pull immediate: false + # subscriber.acknowledge received_messages # - def max_outstanding_bytes - @inventory[:max_outstanding_bytes] + def acknowledge *messages + ack_ids = coerce_ack_ids messages + return true if ack_ids.empty? + ensure_service! + service.acknowledge name, *ack_ids + true end - # @deprecated Use {#max_outstanding_bytes}. - alias inventory_bytesize max_outstanding_bytes + alias ack acknowledge ## - # Whether to enforce flow control at the client side only or to enforce it at both the client and - # the server. For more details about flow control see https://cloud.google.com/pubsub/docs/pull#config. + # Modifies the acknowledge deadline for messages. + # + # This indicates that more time is needed to process the messages, or to + # make the messages available for redelivery if the processing was + # interrupted. + # + # See also {ReceivedMessage#modify_ack_deadline!}. + # + # @param [Integer] new_deadline The new ack deadline in seconds from the + # time this request is sent to the Pub/Sub system. Must be >= 0. For + # example, if the value is `10`, the new ack deadline will expire 10 + # seconds after the call is made. Specifying `0` may immediately make + # the message available for another pull request. + # @param [ReceivedMessage, String] messages One or more + # {ReceivedMessage} objects or ack_id values. + # + # @example + # require "google/cloud/pubsub" # - # @return [Boolean] `true` when only client side flow control is enforced, `false` when both client and - # server side flow control are enforced. + # pubsub = Google::Cloud::PubSub.new # - def use_legacy_flow_control? - @inventory[:use_legacy_flow_control] + # subscriber = pubsub.subscriber "my-topic-sub" + # received_messages = subscriber.pull immediate: false + # subscriber.modify_ack_deadline 120, received_messages + # + def modify_ack_deadline new_deadline, *messages + ack_ids = coerce_ack_ids messages + ensure_service! + service.modify_ack_deadline name, ack_ids, new_deadline + true end ## - # The number of seconds that received messages can be held awaiting processing. Default is 3,600 (1 hour). + # Determines whether the subscription object was created without + # retrieving the resource representation from the Pub/Sub service. + # + # @return [Boolean] `true` when the subscription was created without a + # resource representation, `false` otherwise. + # + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new # - # @return [Integer] The maximum number of seconds. + # sub = pubsub.get_subscription "my-topic-sub", skip_lookup: true + # sub.reference? #=> true # - def max_total_lease_duration - @inventory[:max_total_lease_duration] + def reference? + @grpc.nil? end - # @deprecated Use {#max_total_lease_duration}. - alias inventory_extension max_total_lease_duration ## - # The maximum amount of time in seconds for a single lease extension attempt. Bounds the delay before a message - # redelivery if the subscriber fails to extend the deadline. Default is 0 (disabled). + # Determines whether the subscription object was created with a resource + # representation from the Pub/Sub service. # - # @return [Integer] The maximum number of seconds. + # @return [Boolean] `true` when the subscription was created with a + # resource representation, `false` otherwise. # - def max_duration_per_lease_extension - @inventory[:max_duration_per_lease_extension] + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # sub = pubsub.get_subscription "my-topic-sub" + # sub.resource? #=> true + # + def resource? + !@grpc.nil? end ## - # The minimum amount of time in seconds for a single lease extension attempt. Bounds the delay before a message - # redelivery if the subscriber fails to extend the deadline. Default is 0 (disabled). + # Reloads the subscription with current data from the Pub/Sub service. # - # @return [Integer] The minimum number of seconds. + # @return [Google::Cloud::PubSub::Subscription] Returns the reloaded + # subscription # - def min_duration_per_lease_extension - @inventory[:min_duration_per_lease_extension] + # @example + # require "google/cloud/pubsub" + # + # pubsub = Google::Cloud::PubSub.new + # + # sub = pubsub.get_subscription "my-topic-sub" + # sub.reload! + # + def reload! + ensure_service! + subscription_path = service.subscription_path name + @grpc = service.subscription_admin.get_subscription subscription: subscription_path + @resource_name = nil + self end ## # @private - def stream_inventory - { - limit: @inventory[:max_outstanding_messages].fdiv(@streams).ceil, - bytesize: @inventory[:max_outstanding_bytes].fdiv(@streams).ceil, - extension: @inventory[:max_total_lease_duration], - max_duration_per_lease_extension: @inventory[:max_duration_per_lease_extension], - min_duration_per_lease_extension: @inventory[:min_duration_per_lease_extension], - use_legacy_flow_control: @inventory[:use_legacy_flow_control] - } - end - - # @private returns error object from the stream thread. - def error! error - error_callbacks = synchronize do - @last_error = error - @error_callbacks + # New Subscriber from a Google::Cloud::PubSub::V1::Subscription + # object. + def self.from_grpc grpc, service + new.tap do |f| + f.grpc = grpc + f.service = service end - error_callbacks = default_error_callbacks if error_callbacks.empty? - error_callbacks.each { |error_callback| error_callback.call error } end ## - # @private - def to_s - "(subscription: #{subscription_name}, streams: [#{stream_pool.map(&:to_s).join(', ')}])" - end - - ## - # @private - def inspect - "#<#{self.class.name} #{self}>" + # @private New reference {Subscriber} object without making an HTTP + # request. + def self.from_name name, service, options = {} + name = service.subscription_path name, options + from_grpc(nil, service).tap do |s| + s.instance_variable_set :@resource_name, name + end end protected ## - # Starts a new thread to call wait! (blocking) on each Stream and then stop the TimedUnaryBuffer. - def wait_stop_buffer_thread! - synchronize do - @wait_stop_buffer_thread ||= Thread.new do - @stream_pool.map(&:wait!) - # Shutdown the buffer TimerTask (and flush the buffer) after the streams are all stopped. - @buffer.stop - end - end + # @private Raise an error unless an active connection to the service is + # available. + def ensure_service! + raise "Must have active connection to service" unless service end - def coerce_inventory inventory - @inventory = inventory - if @inventory.is_a? Hash - @inventory = @inventory.dup - # Support deprecated field names - @inventory[:max_outstanding_messages] ||= @inventory.delete :limit - @inventory[:max_outstanding_bytes] ||= @inventory.delete :bytesize - @inventory[:max_total_lease_duration] ||= @inventory.delete :extension - else - @inventory = { max_outstanding_messages: @inventory } - end - @inventory[:max_outstanding_messages] = Integer(@inventory[:max_outstanding_messages] || 1000) - @inventory[:max_outstanding_bytes] = Integer(@inventory[:max_outstanding_bytes] || 100_000_000) - @inventory[:max_total_lease_duration] = Integer(@inventory[:max_total_lease_duration] || 3600) - @inventory[:max_duration_per_lease_extension] = Integer(@inventory[:max_duration_per_lease_extension] || 0) - @inventory[:min_duration_per_lease_extension] = Integer(@inventory[:min_duration_per_lease_extension] || 0) - @inventory[:use_legacy_flow_control] = @inventory[:use_legacy_flow_control] || false + ## + # Ensures a Google::Cloud::PubSub::V1::Subscription object exists. + def ensure_grpc! + ensure_service! + reload! if reference? end - def default_error_callbacks - # This is memoized to reduce calls to the configuration. - @default_error_callbacks ||= begin - error_callback = Google::Cloud::PubSub.configure.on_error - error_callback ||= Google::Cloud.configure.on_error - if error_callback - [error_callback] - else - [] - end + ## + # Makes sure the values are the `ack_id`. If given several + # {ReceivedMessage} objects extract the `ack_id` values. + def coerce_ack_ids messages + Array(messages).flatten.map do |msg| + msg.respond_to?(:ack_id) ? msg.ack_id : msg.to_s end end end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscription.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/subscription.rb deleted file mode 100644 index d6a44aa0e339..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscription.rb +++ /dev/null @@ -1,1467 +0,0 @@ -# Copyright 2015 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. - - -require "google/cloud/pubsub/convert" -require "google/cloud/errors" -require "google/cloud/pubsub/subscription/list" -require "google/cloud/pubsub/subscription/push_config" -require "google/cloud/pubsub/received_message" -require "google/cloud/pubsub/retry_policy" -require "google/cloud/pubsub/snapshot" -require "google/cloud/pubsub/subscriber" -require "google/cloud/pubsub/v1" - -module Google - module Cloud - module PubSub - ## - # # Subscription - # - # A named resource representing the stream of messages from a single, - # specific {Topic}, to be delivered to the subscribing application. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| - # # process message - # received_message.acknowledge! - # end - # - # # Handle exceptions from listener - # subscriber.on_error do |exception| - # puts "Exception: #{exception.class} #{exception.message}" - # end - # - # # Gracefully shut down the subscriber - # at_exit do - # subscriber.stop! - # end - # - # # Start background threads that will call the block passed to listen. - # subscriber.start - # sleep - class Subscription - ## - # @private The Service object. - attr_accessor :service - - ## - # @private The gRPC Google::Cloud::PubSub::V1::Subscription object. - attr_accessor :grpc - - ## - # @private Create an empty {Subscription} object. - def initialize - @service = nil - @grpc = nil - @resource_name = nil - @exists = nil - end - - ## - # The name of the subscription. - # - # @return [String] A fully-qualified subscription name in the form - # `projects/{project_id}/subscriptions/{subscription_id}`. - # - def name - return @resource_name if reference? - @grpc.name - end - - ## - # The {Topic} from which this subscription receives messages. - # - # Makes an API call to retrieve the topic information when called on a - # reference object. See {#reference?}. - # - # @return [Topic] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.topic.name #=> "projects/my-project/topics/my-topic" - # - def topic - ensure_grpc! - Topic.from_name @grpc.topic, service - end - - ## - # This value is the maximum number of seconds after a subscriber - # receives a message before the subscriber should acknowledge the - # message. - # - # Makes an API call to retrieve the deadline value when called on a - # reference object. See {#reference?}. - # - # @return [Integer] - def deadline - ensure_grpc! - @grpc.ack_deadline_seconds - end - - ## - # Sets the maximum number of seconds after a subscriber - # receives a message before the subscriber should acknowledge the - # message. - # - # @param [Integer] new_deadline The new deadline value. - # - def deadline= new_deadline - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, ack_deadline_seconds: new_deadline - @grpc = service.update_subscription update_grpc, :ack_deadline_seconds - @resource_name = nil - end - - ## - # Indicates whether to retain acknowledged messages. If `true`, then - # messages are not expunged from the subscription's backlog, even if - # they are acknowledged, until they fall out of the {#retention} window. - # Default is `false`. - # - # Makes an API call to retrieve the retain_acked value when called on a - # reference object. See {#reference?}. - # - # @return [Boolean] Returns `true` if acknowledged messages are - # retained. - # - def retain_acked - ensure_grpc! - @grpc.retain_acked_messages - end - - ## - # Sets whether to retain acknowledged messages. - # - # @param [Boolean] new_retain_acked The new retain acknowledged messages - # value. - # - def retain_acked= new_retain_acked - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, - retain_acked_messages: !(!new_retain_acked) - @grpc = service.update_subscription update_grpc, :retain_acked_messages - @resource_name = nil - end - - ## - # How long to retain unacknowledged messages in the subscription's - # backlog, from the moment a message is published. If - # {#retain_acked} is `true`, then this also configures the retention of - # acknowledged messages, and thus configures how far back in time a - # {#seek} can be done. Cannot be less than 600 (10 minutes) or more - # than 604,800 (7 days). Default is 604,800 seconds (7 days). - # - # Makes an API call to retrieve the retention value when called on a - # reference object. See {#reference?}. - # - # @return [Numeric] The message retention duration in seconds. - # - def retention - ensure_grpc! - Convert.duration_to_number @grpc.message_retention_duration - end - - ## - # Sets the message retention duration in seconds. - # - # @param [Numeric] new_retention The new retention value. - # - def retention= new_retention - new_retention_duration = Convert.number_to_duration new_retention - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, - message_retention_duration: new_retention_duration - @grpc = service.update_subscription update_grpc, :message_retention_duration - @resource_name = nil - end - - ## - # Indicates the minimum duration for which a message is retained after - # it is published to the subscription's topic. If this field is set, - # messages published to the subscription's topic in the last - # `topic_message_retention_duration` are always available to subscribers. - # Output only. See {Topic#retention}. - # - # Makes an API call to retrieve the retention value when called on a - # reference object. See {#reference?}. - # - # @return [Numeric, nil] The topic message retention duration in seconds, - # or `nil` if not set. - # - def topic_retention - ensure_grpc! - Convert.duration_to_number @grpc.topic_message_retention_duration - end - - ## - # Returns the URL locating the endpoint to which messages should be - # pushed. For example, a Webhook endpoint might use - # `https://example.com/push`. - # - # Makes an API call to retrieve the endpoint value when called on a - # reference object. See {#reference?}. - # - # @return [String] - # - def endpoint - ensure_grpc! - @grpc.push_config&.push_endpoint - end - - ## - # Sets the URL locating the endpoint to which messages should be pushed. - # For example, a Webhook endpoint might use `https://example.com/push`. - # - # @param [String] new_endpoint The new endpoint value. - # - def endpoint= new_endpoint - ensure_service! - service.modify_push_config name, new_endpoint, {} - - return if reference? - - @grpc.push_config = Google::Cloud::PubSub::V1::PushConfig.new( - push_endpoint: new_endpoint, - attributes: {} - ) - end - - ## - # Inspect the Subscription's push configuration settings. The - # configuration can be changed by modifying the values in the method's - # block. - # - # Subscription objects that are reference only will return an empty - # {Subscription::PushConfig} object, which can be configured and saved - # using the method's block. Unlike {#endpoint}, which will retrieve the - # full resource from the API before returning. To get the actual values - # for a reference object, call {#reload!} before calling {#push_config}. - # - # @yield [push_config] a block for modifying the push configuration - # @yieldparam [Subscription::PushConfig] push_config the push - # configuration - # - # @return [Subscription::PushConfig] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.push_config.endpoint #=> "http://example.com/callback" - # sub.push_config.authentication.email #=> "user@example.com" - # sub.push_config.authentication.audience #=> "client-12345" - # - # @example Update the push configuration by passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-subscription" - # - # sub.push_config do |pc| - # pc.endpoint = "http://example.net/callback" - # pc.set_oidc_token "user@example.net", "client-67890" - # end - # - def push_config - ensure_service! - - orig_config = reference? ? nil : @grpc.push_config - config = PushConfig.from_grpc orig_config - - if block_given? - old_config = config.to_grpc.dup - yield config - new_config = config.to_grpc - - if old_config != new_config # has the object been changed? - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, push_config: new_config - @grpc = service.update_subscription update_grpc, :push_config - end - end - - config.freeze - end - - ## - # Inspect the Subscription's bigquery configuration settings. The - # configuration can be changed by modifying the values in the method's - # block. - # - # @yield [bigquery_config] a block for modifying the bigquery configuration - # @yieldparam [Google::Cloud::PubSub::V1::BigQueryConfig] bigquery_config - # - # @return [Google::Cloud::PubSub::V1::BigQueryConfig] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.bigquery_config.table #=> "my-project:dataset-id.table-id" - # sub.bigquery_config.use_topic_schema #=> true - # sub.bigquery_config.write_metadata #=> false - # - # @example Update the bigquery configuration by passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-subscription" - # - # sub.bigquery_config do |bc| - # bc.write_metadata = true - # bc.use_topic_schema = false - # end - # - def bigquery_config - ensure_service! - - config = reference? ? Google::Cloud::PubSub::V1::BigQueryConfig.new : @grpc.bigquery_config - - if block_given? - old_config = config.dup - yield config - new_config = config - - if old_config != new_config # has the object been changed? - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, bigquery_config: new_config - @grpc = service.update_subscription update_grpc, :bigquery_config - end - end - - config.freeze - end - - ## - # A hash of user-provided labels associated with this subscription. - # Labels can be used to organize and group subscriptions.See [Creating - # and Managing Labels](https://cloud.google.com/pubsub/docs/labels). - # - # The returned hash is frozen and changes are not allowed. Use - # {#labels=} to update the labels for this subscription. - # - # Makes an API call to retrieve the labels value when called on a - # reference object. See {#reference?}. - # - # @return [Hash] The frozen labels hash. - # - def labels - ensure_grpc! - @grpc.labels.to_h.freeze - end - - ## - # Sets the hash of user-provided labels associated with this - # subscription. Labels can be used to organize and group subscriptions. - # Label keys and values can be no longer than 63 characters, can only - # contain lowercase letters, numeric characters, underscores and dashes. - # International characters are allowed. Label values are optional. Label - # keys must start with a letter and each label in the list must have a - # different key. See [Creating and Managing - # Labels](https://cloud.google.com/pubsub/docs/labels). - # - # @param [Hash] new_labels The new labels hash. - # - def labels= new_labels - raise ArgumentError, "Value must be a Hash" if new_labels.nil? - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, labels: new_labels - @grpc = service.update_subscription update_grpc, :labels - @resource_name = nil - end - - ## - # The duration (in seconds) for when a subscription expires after the - # subscription goes inactive. A subscription is considered active as - # long as any connected subscriber is successfully consuming messages - # from the subscription or is issuing operations on the subscription. - # - # If {#expires_in=} is not set, a *default* value of of 31 days will be - # used. The minimum allowed value is 1 day. - # - # Makes an API call to retrieve the expires_in value when called on a - # reference object. See {#reference?}. - # - # @return [Numeric, nil] The expiration duration, or `nil` if unset. - # - def expires_in - ensure_grpc! - - return nil if @grpc.expiration_policy.nil? - - Convert.duration_to_number @grpc.expiration_policy.ttl - end - - ## - # Sets the duration (in seconds) for when a subscription expires after - # the subscription goes inactive. - # - # See also {#expires_in}. - # - # @param [Numeric, nil] ttl The expiration duration in seconds, or `nil` - # to unset. - # - def expires_in= ttl - new_expiration_policy = Google::Cloud::PubSub::V1::ExpirationPolicy.new ttl: Convert.number_to_duration(ttl) - - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, expiration_policy: new_expiration_policy - @grpc = service.update_subscription update_grpc, :expiration_policy - @resource_name = nil - end - - ## - # An expression written in the Cloud Pub/Sub filter language. If non-empty, then only {Message} instances whose - # `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are - # filtered out. - # - # Makes an API call to retrieve the filter value when called on a reference - # object. See {#reference?}. - # - # @return [String] The frozen filter string. - # - def filter - ensure_grpc! - @grpc.filter.freeze - end - - ## - # Returns the {Topic} to which dead letter messages should be published if a dead letter policy is configured, - # otherwise `nil`. Dead lettering is done on a best effort basis. The same message might be dead lettered - # multiple times. - # - # See also {#dead_letter_topic=}, {#dead_letter_max_delivery_attempts=}, {#dead_letter_max_delivery_attempts} - # and {#remove_dead_letter_policy}. - # - # Makes an API call to retrieve the topic name when called on a reference object. See {#reference?}. - # - # @return [Topic, nil] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.dead_letter_topic.name #=> "projects/my-project/topics/my-dead-letter-topic" - # sub.dead_letter_max_delivery_attempts #=> 10 - # - def dead_letter_topic - ensure_grpc! - return nil unless @grpc.dead_letter_policy - Topic.from_name @grpc.dead_letter_policy.dead_letter_topic, service - end - - ## - # Sets the {Topic} to which dead letter messages for the subscription should be published. Dead lettering is - # done on a best effort basis. The same message might be dead lettered multiple times. - # The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., - # `service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com`) must have permission to Publish() to this - # topic. - # - # The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached - # to this topic since messages published to a topic with no subscriptions are lost. - # - # Makes an API call to retrieve the dead_letter_policy value when called on a - # reference object. See {#reference?}. - # - # See also {#dead_letter_topic}, {#dead_letter_max_delivery_attempts=}, {#dead_letter_max_delivery_attempts} - # and {#remove_dead_letter_policy}. - # - # @param [Topic] new_dead_letter_topic The topic to which dead letter messages for the subscription should be - # published. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # dead_letter_topic = pubsub.topic "my-dead-letter-topic", skip_lookup: true - # sub.dead_letter_topic = dead_letter_topic - # - def dead_letter_topic= new_dead_letter_topic - ensure_grpc! - dead_letter_policy = @grpc.dead_letter_policy || Google::Cloud::PubSub::V1::DeadLetterPolicy.new - dead_letter_policy.dead_letter_topic = new_dead_letter_topic.name - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, dead_letter_policy: dead_letter_policy - @grpc = service.update_subscription update_grpc, :dead_letter_policy - @resource_name = nil - end - - ## - # Returns the maximum number of delivery attempts for any message in the subscription's dead letter policy if a - # dead letter policy is configured, otherwise `nil`. Dead lettering is done on a best effort basis. The same - # message might be dead lettered multiple times. The value must be between 5 and 100. - # - # The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the - # acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 - # deadline. Note that client libraries may automatically extend ack_deadlines. - # - # This field will be honored on a best effort basis. If this parameter is `nil` or `0`, a default value of `5` - # is used. - # - # See also {#dead_letter_max_delivery_attempts=}, {#dead_letter_topic=}, {#dead_letter_topic} - # and {#remove_dead_letter_policy}. - # - # Makes an API call to retrieve the dead_letter_policy when called on a reference object. See {#reference?}. - # - # @return [Integer, nil] A value between `5` and `100`, or `nil` if no dead letter policy is configured. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.dead_letter_topic.name #=> "projects/my-project/topics/my-dead-letter-topic" - # sub.dead_letter_max_delivery_attempts #=> 10 - # - def dead_letter_max_delivery_attempts - ensure_grpc! - @grpc.dead_letter_policy&.max_delivery_attempts - end - - ## - # Sets the maximum number of delivery attempts for any message in the subscription's dead letter policy. - # Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. - # The value must be between 5 and 100. - # - # The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the - # acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 - # deadline. Note that client libraries may automatically extend ack_deadlines. - # - # This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used. - # - # Makes an API call to retrieve the dead_letter_policy when called on a reference object. See {#reference?}. - # - # The dead letter topic must be set first. See {#dead_letter_topic=}, {#dead_letter_topic} and - # {#remove_dead_letter_policy}. - # - # @param [Integer, nil] new_dead_letter_max_delivery_attempts A value between 5 and 100. If this parameter is - # `nil` or `0`, a default value of 5 is used. - # - # @raise [ArgumentError] if the dead letter topic has not been set. See {#dead_letter_topic=}. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.dead_letter_topic.name #=> "projects/my-project/topics/my-dead-letter-topic" - # - # sub.dead_letter_max_delivery_attempts = 20 - # - def dead_letter_max_delivery_attempts= new_dead_letter_max_delivery_attempts - ensure_grpc! - unless @grpc.dead_letter_policy&.dead_letter_topic - # Service error message "3:Invalid resource name given (name=)." does not identify param. - raise ArgumentError, "dead_letter_topic is required with dead_letter_max_delivery_attempts" - end - dead_letter_policy = @grpc.dead_letter_policy || Google::Cloud::PubSub::V1::DeadLetterPolicy.new - dead_letter_policy.max_delivery_attempts = new_dead_letter_max_delivery_attempts - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, dead_letter_policy: dead_letter_policy - @grpc = service.update_subscription update_grpc, :dead_letter_policy - @resource_name = nil - end - - ## - # Removes an existing dead letter policy. A dead letter policy specifies the conditions for dead lettering - # messages in the subscription. If a dead letter policy is not set, dead lettering is disabled. - # - # Makes an API call to retrieve the dead_letter_policy when called on a reference object. See {#reference?}. - # - # See {#dead_letter_topic}, {#dead_letter_topic=}, {#dead_letter_max_delivery_attempts} and - # {#dead_letter_max_delivery_attempts=}. - # - # @return [Boolean] `true` if an existing dead letter policy was removed, `false` if no existing dead letter - # policy was present. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # - # sub.dead_letter_topic.name #=> "projects/my-project/topics/my-dead-letter-topic" - # sub.dead_letter_max_delivery_attempts #=> 10 - # - # sub.remove_dead_letter_policy - # - # sub.dead_letter_topic #=> nil - # sub.dead_letter_max_delivery_attempts #=> nil - # - def remove_dead_letter_policy - ensure_grpc! - return false if @grpc.dead_letter_policy.nil? - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, dead_letter_policy: nil - @grpc = service.update_subscription update_grpc, :dead_letter_policy - true - end - - ## - # A policy that specifies how Cloud Pub/Sub retries message delivery for this subscription. If `nil`, the - # default retry policy is applied. This generally implies that messages will be retried as soon as possible - # for healthy subscribers. Retry Policy will be triggered on NACKs or acknowledgement deadline exceeded events - # for a given message. - # - # Makes an API call to retrieve the retry_policy when called on a reference object. See {#reference?}. - # - # @return [RetryPolicy, nil] The retry policy for the subscription, or `nil`. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # - # sub.retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: 5, maximum_backoff: 300 - # - # sub.retry_policy.minimum_backoff #=> 5 - # sub.retry_policy.maximum_backoff #=> 300 - # - def retry_policy - ensure_grpc! - return nil unless @grpc.retry_policy - RetryPolicy.from_grpc @grpc.retry_policy - end - - ## - # Sets a policy that specifies how Cloud Pub/Sub retries message delivery for this subscription. If `nil`, the - # default retry policy is applied. This generally implies that messages will be retried as soon as possible - # for healthy subscribers. Retry Policy will be triggered on NACKs or acknowledgement deadline exceeded events - # for a given message. - # - # @param [RetryPolicy, nil] new_retry_policy A new retry policy for the subscription, or `nil`. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # - # sub.retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: 5, maximum_backoff: 300 - # - # sub.retry_policy.minimum_backoff #=> 5 - # sub.retry_policy.maximum_backoff #=> 300 - # - def retry_policy= new_retry_policy - ensure_service! - new_retry_policy = new_retry_policy.to_grpc if new_retry_policy - update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, retry_policy: new_retry_policy - @grpc = service.update_subscription update_grpc, :retry_policy - @resource_name = nil - end - - ## - # Whether message ordering has been enabled. When enabled, messages - # published with the same `ordering_key` will be delivered in the order - # they were published. When disabled, messages may be delivered in any - # order. - # - # @note At the time of this release, ordering keys are not yet publicly - # enabled and requires special project enablements. - # - # See {Topic#publish_async}, {#listen}, and {Message#ordering_key}. - # - # Makes an API call to retrieve the enable_message_ordering value when called on a - # reference object. See {#reference?}. - # - # @return [Boolean] - # - def message_ordering? - ensure_grpc! - @grpc.enable_message_ordering - end - - ## - # Whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their - # topic and don't retain any backlog. {#pull} and {#listen} (pull and streaming pull) operations will raise - # `FAILED_PRECONDITION`. If the subscription is a push subscription (see {#push_config}), pushes to the endpoint - # will not be made. The default value is `false`. - # - # See {Topic#subscribe} and {#detach}. - # - # Makes an API call to retrieve the detached value when called on a - # reference object. See {#reference?}. - # - # @return [Boolean] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.detach - # - # # sleep 120 - # sub.detached? #=> true - # - def detached? - ensure_grpc! - @grpc.detached - end - - ## - # Determines whether the subscription exists in the Pub/Sub service. - # - # Makes an API call to determine whether the subscription resource - # exists when called on a reference object. See {#reference?}. - # - # @return [Boolean] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.exists? #=> true - # - def exists? - # Always true if the object is not set as reference - return true unless reference? - # If we have a value, return it - return @exists unless @exists.nil? - ensure_grpc! - @exists = true - rescue Google::Cloud::NotFoundError - @exists = false - end - - ## - # Deletes an existing subscription. - # All pending messages in the subscription are immediately dropped. - # - # @return [Boolean] Returns `true` if the subscription was deleted. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.delete - # - def delete - ensure_service! - service.delete_subscription name - true - end - - ## - # Detaches a subscription from its topic. All messages retained in the subscription are dropped. Detached - # subscriptions don't receive messages from their topic and don't retain any backlog. Subsequent {#pull} and - # {#listen} (pull and streaming pull) operations will raise `FAILED_PRECONDITION`. If the subscription is a push - # subscription (see {#push_config}), pushes to the endpoint will stop. It may take a few minutes for the - # subscription's detached state to be reflected in subsequent calls to {#detached?}. - # - # @return [Boolean] Returns `true` if the detach operation was successful. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.detach - # - # # sleep 120 - # sub.detached? #=> true - # - def detach - ensure_service! - service.detach_subscription name - true - end - - ## - # Pulls messages from the server, blocking until messages are available - # when called with the `immediate: false` option, which is recommended - # to avoid adverse impacts on the performance of pull operations. - # - # Raises an API error with status `UNAVAILABLE` if there are too many - # concurrent pull requests pending for the given subscription. - # - # See also {#listen} for the preferred way to process messages as they - # become available. - # - # @param [Boolean] immediate Whether to return immediately or block until - # messages are available. - # - # **Warning:** The default value of this field is `true`. However, sending - # `true` is discouraged because it adversely impacts the performance of - # pull operations. We recommend that users always explicitly set this field - # to `false`. - # - # If this field set to `true`, the system will respond immediately - # even if it there are no messages available to return in the pull - # response. Otherwise, the system may wait (for a bounded amount of time) - # until at least one message is available, rather than returning no messages. - # - # See also {#listen} for the preferred way to process messages as they - # become available. - # @param [Integer] max The maximum number of messages to return for this - # request. The Pub/Sub system may return fewer than the number - # specified. The default value is `100`, the maximum value is `1000`. - # - # @return [Array] - # - # @example The `immediate: false` option is now recommended to avoid adverse impacts on pull operations: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # received_messages = sub.pull immediate: false - # received_messages.each do |received_message| - # received_message.acknowledge! - # end - # - # @example A maximum number of messages returned can also be specified: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # received_messages = sub.pull immediate: false, max: 10 - # received_messages.each do |received_message| - # received_message.acknowledge! - # end - # - def pull immediate: true, max: 100 - ensure_service! - options = { immediate: immediate, max: max } - list_grpc = service.pull name, options - Array(list_grpc.received_messages).map do |msg_grpc| - ReceivedMessage.from_grpc msg_grpc, self - end - rescue Google::Cloud::DeadlineExceededError - [] - end - - ## - # Pulls from the server while waiting for messages to become available. - # This is the same as: - # - # subscription.pull immediate: false - # - # See also {#listen} for the preferred way to process messages as they - # become available. - # - # @param [Integer] max The maximum number of messages to return for this - # request. The Pub/Sub system may return fewer than the number - # specified. The default value is `100`, the maximum value is `1000`. - # - # @return [Array] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # received_messages = sub.wait_for_messages - # received_messages.each do |received_message| - # received_message.acknowledge! - # end - # - def wait_for_messages max: 100 - pull immediate: false, max: max - end - - ## - # Create a {Subscriber} object that receives and processes messages - # using the code provided in the callback. Messages passed to the - # callback should acknowledge ({ReceivedMessage#acknowledge!}) or reject - # ({ReceivedMessage#reject!}) the message. If no action is taken, the - # message will be removed from the subscriber and made available for - # redelivery after the callback is completed. - # - # Google Cloud Pub/Sub ordering keys provide the ability to ensure - # related messages are sent to subscribers in the order in which they - # were published. Messages can be tagged with an ordering key, a string - # that identifies related messages for which publish order should be - # respected. The service guarantees that, for a given ordering key and - # publisher, messages are sent to subscribers in the order in which they - # were published. Ordering does not require sacrificing high throughput - # or scalability, as the service automatically distributes messages for - # different ordering keys across subscribers. - # - # To use ordering keys, the subscription must be created with message - # ordering enabled (See {Topic#subscribe} and {#message_ordering?}) - # before calling {#listen}. When enabled, the subscriber will deliver - # messages with the same `ordering_key` in the order they were - # published. - # - # @note At the time of this release, ordering keys are not yet publicly - # enabled and requires special project enablements. - # - # @param [Numeric] deadline The default number of seconds the stream - # will hold received messages before modifying the message's ack - # deadline. The minimum is 10, the maximum is 600. Default is - # {#deadline}. Optional. - # - # When using a reference object an API call will be made to retrieve - # the default deadline value for the subscription when this argument - # is not provided. See {#reference?}. - # @param [Boolean] message_ordering Whether message ordering has been - # enabled. The value provided must match the value set on the Pub/Sub - # service. See {#message_ordering?}. Optional. - # - # When using a reference object an API call will be made to retrieve - # the default message_ordering value for the subscription when this - # argument is not provided. See {#reference?}. - # @param [Integer] streams The number of concurrent streams to open to - # pull messages from the subscription. Default is 2. Optional. - # @param [Hash, Integer] inventory The settings to control how received messages are to be handled by the - # subscriber. When provided as an Integer instead of a Hash only `max_outstanding_messages` will be set. - # Optional. - # - # Hash keys and values may include the following: - # - # * `:max_outstanding_messages` [Integer] The number of received messages to be collected by subscriber. - # Default is 1,000. (Note: replaces `:limit`, which is deprecated.) - # * `:max_outstanding_bytes` [Integer] The total byte size of received messages to be collected by - # subscriber. Default is 100,000,000 (100MB). (Note: replaces `:bytesize`, which is deprecated.) - # * `:use_legacy_flow_control` [Boolean] Disables enforcing flow control settings at the Cloud PubSub - # server and the less accurate method of only enforcing flow control at the client side is used instead. - # Default is false. - # * `:max_total_lease_duration` [Integer] The number of seconds that received messages can be held awaiting - # processing. Default is 3,600 (1 hour). (Note: replaces `:extension`, which is deprecated.) - # * `:max_duration_per_lease_extension` [Integer] The maximum amount of time in seconds for a single lease - # extension attempt. Bounds the delay before a message redelivery if the subscriber fails to extend the - # deadline. Default is 0 (disabled). - # @param [Hash] threads The number of threads to create to handle - # concurrent calls by each stream opened by the subscriber. Optional. - # - # Hash keys and values may include the following: - # - # * `:callback` (Integer) The number of threads used to handle the - # received messages. Default is 8. - # * `:push` (Integer) The number of threads to handle - # acknowledgement ({ReceivedMessage#ack!}) and modify ack deadline - # messages ({ReceivedMessage#nack!}, - # {ReceivedMessage#modify_ack_deadline!}). Default is 4. - # - # @yield [received_message] a block for processing new messages - # @yieldparam [ReceivedMessage] received_message the newly received - # message - # - # @return [Subscriber] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # - # subscriber = sub.listen do |received_message| - # # process message - # puts "Data: #{received_message.message.data}, published at #{received_message.message.published_at}" - # received_message.acknowledge! - # end - # - # # Start background threads that will call block passed to listen. - # subscriber.start - # - # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! - # - # @example Configuring to increase concurrent callbacks: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # - # subscriber = sub.listen threads: { callback: 16 } do |rec_message| - # # store the message somewhere before acknowledging - # store_in_backend rec_message.data # takes a few seconds - # rec_message.acknowledge! - # end - # - # # Start background threads that will call block passed to listen. - # subscriber.start - # - # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! - # - # @example Ordered messages are supported using ordering_key: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-ordered-topic-sub" - # sub.message_ordering? #=> true - # - # subscriber = sub.listen do |received_message| - # # messsages with the same ordering_key are received - # # in the order in which they were published. - # received_message.acknowledge! - # end - # - # # Start background threads that will call block passed to listen. - # subscriber.start - # - # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! - # - # @example Set the maximum amount of time before redelivery if the subscriber fails to extend the deadline: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # - # subscriber = sub.listen inventory: { max_duration_per_lease_extension: 20 } do |received_message| - # # Process message very slowly with possibility of failure. - # process rec_message.data # takes minutes - # rec_message.acknowledge! - # end - # - # # Start background threads that will call block passed to listen. - # subscriber.start - # - # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! - # - def listen deadline: nil, message_ordering: nil, streams: nil, inventory: nil, threads: {}, &block - ensure_service! - deadline ||= self.deadline - message_ordering = message_ordering? if message_ordering.nil? - - Subscriber.new name, block, deadline: deadline, streams: streams, inventory: inventory, - message_ordering: message_ordering, threads: threads, service: service - end - - ## - # Acknowledges receipt of a message. After an ack, - # the Pub/Sub system can remove the message from the subscription. - # Acknowledging a message whose ack deadline has expired may succeed, - # although the message may have been sent again. - # Acknowledging a message more than once will not result in an error. - # This is only used for messages received via pull. - # - # See also {ReceivedMessage#acknowledge!}. - # - # @param [ReceivedMessage, String] messages One or more - # {ReceivedMessage} objects or ack_id values. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # received_messages = sub.pull immediate: false - # sub.acknowledge received_messages - # - def acknowledge *messages - ack_ids = coerce_ack_ids messages - return true if ack_ids.empty? - ensure_service! - service.acknowledge name, *ack_ids - true - end - alias ack acknowledge - - ## - # Modifies the acknowledge deadline for messages. - # - # This indicates that more time is needed to process the messages, or to - # make the messages available for redelivery if the processing was - # interrupted. - # - # See also {ReceivedMessage#modify_ack_deadline!}. - # - # @param [Integer] new_deadline The new ack deadline in seconds from the - # time this request is sent to the Pub/Sub system. Must be >= 0. For - # example, if the value is `10`, the new ack deadline will expire 10 - # seconds after the call is made. Specifying `0` may immediately make - # the message available for another pull request. - # @param [ReceivedMessage, String] messages One or more - # {ReceivedMessage} objects or ack_id values. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # received_messages = sub.pull immediate: false - # sub.modify_ack_deadline 120, received_messages - # - def modify_ack_deadline new_deadline, *messages - ack_ids = coerce_ack_ids messages - ensure_service! - service.modify_ack_deadline name, ack_ids, new_deadline - true - end - - ## - # Creates a new {Snapshot} from the subscription. The created snapshot - # is guaranteed to retain: - # - # * The existing backlog on the subscription. More precisely, this is - # defined as the messages in the subscription's backlog that are - # unacknowledged upon the successful completion of the - # `create_snapshot` operation; as well as: - # * Any messages published to the subscription's topic following the - # successful completion of the `create_snapshot` operation. - # - # @param [String, nil] snapshot_name Name of the new snapshot. Optional. - # If the name is not provided, the server will assign a random name - # for this snapshot on the same project as the subscription. - # The value can be a simple snapshot ID (relative name), in which - # case the current project ID will be supplied, or a fully-qualified - # snapshot name in the form - # `projects/{project_id}/snapshots/{snapshot_id}`. - # - # The snapshot ID (relative name) must start with a letter, and - # contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent - # signs (`%`). It must be between 3 and 255 characters in length, and - # it must not start with `goog`. - # @param [Hash] labels A hash of user-provided labels associated with - # the snapshot. You can use these to organize and group your - # snapshots. Label keys and values can be no longer than 63 - # characters, can only contain lowercase letters, numeric characters, - # underscores and dashes. International characters are allowed. Label - # values are optional. Label keys must start with a letter and each - # label in the list must have a different key. See [Creating and - # Managing Labels](https://cloud.google.com/pubsub/docs/labels). - # - # @return [Google::Cloud::PubSub::Snapshot] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-sub" - # - # snapshot = sub.create_snapshot "my-snapshot" - # snapshot.name #=> "projects/my-project/snapshots/my-snapshot" - # - # @example Without providing a name: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-sub" - # - # snapshot = sub.create_snapshot - # snapshot.name #=> "projects/my-project/snapshots/gcr-analysis-..." - # - def create_snapshot snapshot_name = nil, labels: nil - ensure_service! - grpc = service.create_snapshot name, snapshot_name, labels: labels - Snapshot.from_grpc grpc, service - end - alias new_snapshot create_snapshot - - ## - # Resets the subscription's backlog to a given {Snapshot} or to a point - # in time, whichever is provided in the request. - # - # @param [Snapshot, String, Time] snapshot The `Snapshot` instance, - # snapshot name, or time to which to perform the seek. - # If the argument is a snapshot, the snapshot's topic must be the - # same as that of the subscription. If it is a time, messages retained - # in the subscription that were published before this time are marked - # as acknowledged, and messages retained in the subscription that were - # published after this time are marked as unacknowledged. Note that - # this operation affects only those messages retained in the - # subscription. For example, if the time corresponds to a point before - # the message retention window (or to a point before the system's - # notion of the subscription creation time), only retained messages - # will be marked as unacknowledged, and already-expunged messages will - # not be restored. - # - # @return [Boolean] Returns `true` if the seek was successful. - # - # @example Using a snapshot - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-sub" - # - # snapshot = sub.create_snapshot - # - # received_messages = sub.pull immediate: false - # sub.acknowledge received_messages - # - # sub.seek snapshot - # - # @example Using a time: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-sub" - # - # time = Time.now - # - # received_messages = sub.pull immediate: false - # sub.acknowledge received_messages - # - # sub.seek time - # - def seek snapshot - ensure_service! - service.seek name, snapshot - true - end - - ## - # Determines whether the subscription object was created without - # retrieving the resource representation from the Pub/Sub service. - # - # @return [Boolean] `true` when the subscription was created without a - # resource representation, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.get_subscription "my-topic-sub", skip_lookup: true - # sub.reference? #=> true - # - def reference? - @grpc.nil? - end - - ## - # Determines whether the subscription object was created with a resource - # representation from the Pub/Sub service. - # - # @return [Boolean] `true` when the subscription was created with a - # resource representation, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.get_subscription "my-topic-sub" - # sub.resource? #=> true - # - def resource? - !@grpc.nil? - end - - ## - # Reloads the subscription with current data from the Pub/Sub service. - # - # @return [Google::Cloud::PubSub::Subscription] Returns the reloaded - # subscription - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.get_subscription "my-topic-sub" - # sub.reload! - # - def reload! - ensure_service! - @grpc = service.get_subscription name - @resource_name = nil - self - end - alias refresh! reload! - - ## - # Gets the [Cloud IAM](https://cloud.google.com/iam/) access control - # policy for this subscription. - # - # @see https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#iampolicy - # google.iam.v1.IAMPolicy - # - # @yield [policy] A block for updating the policy. The latest policy - # will be read from the Pub/Sub service and passed to the block. After - # the block completes, the modified policy will be written to the - # service. - # @yieldparam [Policy] policy the current Cloud IAM Policy for this - # subscription - # - # @return [Policy] the current Cloud IAM Policy for this subscription - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-subscription" - # - # policy = sub.policy - # - # @example Update the policy by passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-subscription" - # - # sub.policy do |p| - # p.add "roles/owner", "user:owner@example.com" - # end - # - def policy - ensure_service! - grpc = service.get_subscription_policy name - policy = Policy.from_grpc grpc - return policy unless block_given? - yield policy - update_policy policy - end - - ## - # Updates the [Cloud IAM](https://cloud.google.com/iam/) access control - # policy for this subscription. The policy should be read from - # {#policy}. See {Google::Cloud::PubSub::Policy} for an explanation of - # the policy `etag` property and how to modify policies. - # - # You can also update the policy by passing a block to {#policy}, which - # will call this method internally after the block completes. - # - # @see https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#iampolicy - # google.iam.v1.IAMPolicy - # - # @param [Policy] new_policy a new or modified Cloud IAM Policy for this - # subscription - # - # @return [Policy] the policy returned by the API update operation - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-subscription" - # - # policy = sub.policy # API call - # - # policy.add "roles/owner", "user:owner@example.com" - # - # sub.update_policy policy # API call - # - def update_policy new_policy - ensure_service! - grpc = service.set_subscription_policy name, new_policy.to_grpc - Policy.from_grpc grpc - end - alias policy= update_policy - - ## - # Tests the specified permissions against the [Cloud - # IAM](https://cloud.google.com/iam/) access control policy. - # - # @see https://cloud.google.com/iam/docs/managing-policies Managing - # Policies - # - # @param [String, Array] permissions The set of permissions to - # check access for. Permissions with wildcards (such as `*` or - # `storage.*`) are not allowed. - # - # The permissions that can be checked on a subscription are: - # - # * pubsub.subscriptions.consume - # * pubsub.subscriptions.get - # * pubsub.subscriptions.delete - # * pubsub.subscriptions.update - # * pubsub.subscriptions.getIamPolicy - # * pubsub.subscriptions.setIamPolicy - # - # @return [Array] The permissions that have access. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-subscription" - # perms = sub.test_permissions "pubsub.subscriptions.get", - # "pubsub.subscriptions.consume" - # perms.include? "pubsub.subscriptions.get" #=> true - # perms.include? "pubsub.subscriptions.consume" #=> false - # - def test_permissions *permissions - permissions = Array(permissions).flatten - ensure_service! - grpc = service.test_subscription_permissions name, permissions - grpc.permissions - end - - ## - # @private - # New Subscription from a Google::Cloud::PubSub::V1::Subscription - # object. - def self.from_grpc grpc, service - new.tap do |f| - f.grpc = grpc - f.service = service - end - end - - ## - # @private New reference {Subscription} object without making an HTTP - # request. - def self.from_name name, service, options = {} - name = service.subscription_path name, options - from_grpc(nil, service).tap do |s| - s.instance_variable_set :@resource_name, name - end - end - - protected - - ## - # @private Raise an error unless an active connection to the service is - # available. - def ensure_service! - raise "Must have active connection to service" unless service - end - - ## - # Ensures a Google::Cloud::PubSub::V1::Subscription object exists. - def ensure_grpc! - ensure_service! - reload! if reference? - end - - ## - # Makes sure the values are the `ack_id`. If given several - # {ReceivedMessage} objects extract the `ack_id` values. - def coerce_ack_ids messages - Array(messages).flatten.map do |msg| - msg.respond_to?(:ack_id) ? msg.ack_id : msg.to_s - end - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscription/list.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/subscription/list.rb deleted file mode 100644 index 3db106dd41a3..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscription/list.rb +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright 2015 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. - - -require "delegate" - -module Google - module Cloud - module PubSub - class Subscription - ## - # Subscription::List is a special case Array with additional values. - class List < DelegateClass(::Array) - ## - # If not empty, indicates that there are more subscriptions - # that match the request and this value should be passed to - # the next {Google::Cloud::PubSub::Topic#subscriptions} to continue. - attr_accessor :token - - ## - # @private Create a new Subscription::List with an array of values. - def initialize arr = [] - @topic = nil - @prefix = nil - @token = nil - @max = nil - super arr - end - - ## - # Whether there a next page of subscriptions. - # - # @return [Boolean] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # subscriptions = pubsub.subscriptions - # if subscriptions.next? - # next_subscriptions = subscriptions.next - # end - # - def next? - !token.nil? - end - - ## - # Retrieve the next page of subscriptions. - # - # @return [Subscription::List] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # subscriptions = pubsub.subscriptions - # if subscriptions.next? - # next_subscriptions = subscriptions.next - # end - # - def next - return nil unless next? - ensure_service! - if @topic - next_topic_subscriptions - else - next_subscriptions - end - end - - ## - # Retrieves remaining results by repeatedly invoking {#next} until - # {#next?} returns `false`. Calls the given block once for each - # result, which is passed as the argument to the block. - # - # An Enumerator is returned if no block is given. - # - # This method will make repeated API calls until all remaining results - # are retrieved. (Unlike `#each`, for example, which merely iterates - # over the results returned by a single API call.) Use with caution. - # - # @param [Integer] request_limit The upper limit of API requests to - # make to load all subscriptions. Default is no limit. - # @yield [subscription] The block for accessing each subscription. - # @yieldparam [Subscription] subscription The subscription object. - # - # @return [Enumerator] - # - # @example Iterating each subscription by passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # subscriptions = pubsub.subscriptions - # subscriptions.all do |subscription| - # puts subscription.name - # end - # - # @example Using the enumerator by not passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # subscriptions = pubsub.subscriptions - # all_names = subscriptions.all.map do |subscription| - # subscription.name - # end - # - # @example Limit the number of API calls made: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # subscriptions = pubsub.subscriptions - # subscriptions.all(request_limit: 10) do |subscription| - # puts subscription.name - # end - # - def all request_limit: nil, &block - request_limit = request_limit.to_i if request_limit - return enum_for :all, request_limit: request_limit unless block_given? - results = self - loop do - results.each(&block) - if request_limit - request_limit -= 1 - break if request_limit.negative? - end - break unless results.next? - results = results.next - end - end - - ## - # @private New Subscriptions::List from a - # Google::Cloud::PubSub::V1::ListSubscriptionsRequest object. - def self.from_grpc grpc_list, service, max = nil - subs = new(Array(grpc_list.subscriptions).map do |grpc| - Subscription.from_grpc grpc, service - end) - token = grpc_list.next_page_token - token = nil if token == "".freeze - subs.instance_variable_set :@token, token - subs.instance_variable_set :@service, service - subs.instance_variable_set :@max, max - subs - end - - ## - # @private New Subscriptions::List from a - # Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse object. - def self.from_topic_grpc grpc_list, service, topic, max = nil - subs = new(Array(grpc_list.subscriptions).map do |grpc| - Subscription.from_name grpc, service - end) - token = grpc_list.next_page_token - token = nil if token == "".freeze - subs.instance_variable_set :@token, token - subs.instance_variable_set :@service, service - subs.instance_variable_set :@topic, topic - subs.instance_variable_set :@max, max - subs - end - - protected - - ## - # @private Raise an error unless an active connection to the service - # is available. - def ensure_service! - raise "Must have active connection to service" unless @service - end - - def next_subscriptions - options = { prefix: @prefix, token: @token, max: @max } - grpc = @service.list_subscriptions options - self.class.from_grpc grpc, @service, @max - end - - def next_topic_subscriptions - options = { token: @token, max: @max } - grpc = @service.list_topics_subscriptions @topic, options - self.class.from_topic_grpc grpc, @service, @topic, @max - end - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscription/push_config.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/subscription/push_config.rb deleted file mode 100644 index a7e1b6846689..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscription/push_config.rb +++ /dev/null @@ -1,268 +0,0 @@ -# Copyright 2019 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. - - -require "google/pubsub/v1/pubsub_pb" - -module Google - module Cloud - module PubSub - class Subscription - ## - # Configuration for a push delivery endpoint. - # - # @example Create a push config: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # push_config = Google::Cloud::PubSub::Subscription::PushConfig.new endpoint: "http://example.net/callback" - # push_config.set_oidc_token "service-account@example.net", "audience-header-value" - # - # sub = topic.subscribe "my-subscription", push_config: push_config - # - # @example Read a push config: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # sub.push_config.endpoint #=> "http://example.com/callback" - # sub.push_config.authentication.email #=> "user@example.com" - # sub.push_config.authentication.audience #=> "client-12345" - # - # @example Update a push config: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # sub = pubsub.subscription "my-subscription" - # - # sub.push_config do |pc| - # pc.endpoint = "http://example.net/callback" - # pc.set_oidc_token "user@example.net", "client-67890" - # end - # - class PushConfig - ## - # Creates a new push configuration. - # - # @param [String] endpoint A URL locating the endpoint to which messages should be pushed. For - # example, a Webhook endpoint might use `https://example.com/push`. - # @param [String] email The service account email to be used for generating the OIDC token. - # The caller must have the `iam.serviceAccounts.actAs` permission for the service account. - # @param [String] audience The audience to be used when generating OIDC token. The audience claim identifies - # the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having - # multiple values (array) for the audience field is not supported. More info about the OIDC JWT token - # audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the `endpoint` - # URL will be used. - # - def initialize endpoint: nil, email: nil, audience: nil - @grpc = Google::Cloud::PubSub::V1::PushConfig.new - - self.endpoint = endpoint unless endpoint.nil? - - raise ArgumentError, "audience provided without email. Authentication is invalid" if audience && !email - - set_oidc_token email, audience if email - end - - ## - # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use - # `https://example.com/push`. - # - # @return [String] - def endpoint - @grpc.push_endpoint - end - - ## - # Sets the URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might - # use `https://example.com/push`. - # - # @param [String, nil] new_endpoint New URL value - def endpoint= new_endpoint - @grpc.push_endpoint = String new_endpoint - end - - ## - # The authentication method used by push endpoints to verify the source of push requests. - # - # @return [OidcToken, nil] An OIDC JWT token if specified, `nil` - # otherwise. - def authentication - return nil unless @grpc.authentication_method == :oidc_token - - OidcToken.from_grpc @grpc.oidc_token - end - - ## - # Sets the authentication method used by push endpoints to verify the source of push requests. - # - # @param [OidcToken, nil] new_auth An authentication value. - def authentication= new_auth - if new_auth.nil? - @grpc.oidc_token = nil - else - raise ArgumentError unless new_auth.is_a? OidcToken - - @grpc.oidc_token = new_auth.to_grpc - end - end - - ## - # Checks whether authentication is an {OidcToken}. - # - # @return [Boolean] - def oidc_token? - authentication.is_a? OidcToken - end - - ## - # Sets the authentication method to use an {OidcToken}. - # - # @param [String] email Service account email. - # @param [String] audience Audience to be used. - def set_oidc_token email, audience - oidc_token = OidcToken.new.tap do |token| - token.email = email - token.audience = audience - end - self.authentication = oidc_token - end - - ## - # The format of the pushed message. This attribute indicates the version of the data expected by the endpoint. - # This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based - # on the version of the Pub/Sub API. - # - # If not present during the Subscription creation, it will default to the version of the API used to make such - # call. - # - # The possible values for this attribute are: - # - # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub - # API. - # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub - # API. - # - # @return [String] - def version - @grpc.attributes["x-goog-version"] - end - - ## - # Sets the format of the pushed message. - # - # The possible values for this attribute are: - # - # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub - # API. - # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub - # API. - # - # @param [String, nil] new_version The new version value. - def version= new_version - if new_version.nil? - @grpc.attributes.delete "x-goog-version" - else - @grpc.attributes["x-goog-version"] = new_version - end - end - - ## - # @private - def to_grpc - @grpc - end - - ## - # @private - def self.from_grpc grpc - new.tap do |pc| - pc.instance_variable_set :@grpc, grpc.dup if grpc - end - end - - ## - # Contains information needed for generating an [OpenID Connect - # token](https://developers.google.com/identity/protocols/OpenIDConnect). - class OidcToken - ## - # @private - def initialize - @grpc = Google::Cloud::PubSub::V1::PushConfig::OidcToken.new - end - - ## - # The service account email to be used for generating the OIDC token. The caller must have the - # `iam.serviceAccounts.actAs` permission for the service account. - # - # @return [String] - def email - @grpc.service_account_email - end - - ## - # Sets the service account email to be used for generating the OIDC token. The caller must have the - # `iam.serviceAccounts.actAs` permission for the service account. - # - # @param [String] new_email New service account email value. - def email= new_email - @grpc.service_account_email = new_email - end - - ## - # The audience to be used when generating OIDC token. The audience claim identifies the recipients that - # the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values - # (array) for the audience field is not supported. More info about the OIDC JWT token audience here: - # https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the `endpoint` URL will be used. - # - # @return [String] - def audience - @grpc.audience - end - - ## - # Sets the audience to be used when generating OIDC token. The audience claim identifies the recipients that - # the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values - # (array) for the audience field is not supported. More info about the OIDC JWT token audience here: - # https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the `endpoint` URL will be used. - # - # @param [String] new_audience New audience value. - def audience= new_audience - @grpc.audience = new_audience - end - - ## - # @private - def to_grpc - @grpc - end - - ## - # @private - def self.from_grpc grpc - grpc ||= Google::Cloud::PubSub::V1::PushConfig::OidcToken.new - - new.tap do |pc| - pc.instance_variable_set :@grpc, grpc.dup - end - end - end - end - end - end - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/topic.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/topic.rb deleted file mode 100644 index 25e786bf259b..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/topic.rb +++ /dev/null @@ -1,1100 +0,0 @@ -# Copyright 2015 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. - - -require "google/cloud/errors" -require "google/cloud/pubsub/topic/list" -require "google/cloud/pubsub/async_publisher" -require "google/cloud/pubsub/batch_publisher" -require "google/cloud/pubsub/subscription" -require "google/cloud/pubsub/policy" -require "google/cloud/pubsub/retry_policy" - -module Google - module Cloud - module PubSub - ## - # # Topic - # - # A named resource to which messages are published. - # - # See {Project#create_topic} and {Project#topic}. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # topic.publish "task completed" - # - class Topic - ## - # @private The Service object. - attr_accessor :service - - ## - # @private The Google::Cloud::PubSub::V1::Topic object. - attr_accessor :grpc - - ## - # @private Create an empty {Topic} object. - def initialize - @service = nil - @grpc = nil - @resource_name = nil - @exists = nil - @async_opts = {} - end - - ## - # AsyncPublisher object used to publish multiple messages in batches. - # - # @return [AsyncPublisher] Returns publisher object if calls to - # {#publish_async} have been made, returns `nil` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # topic.publish_async "task completed" do |result| - # if result.succeeded? - # log_publish_success result.data - # else - # log_publish_failure result.data, result.error - # end - # end - # - # topic.async_publisher.stop! - # - def async_publisher - @async_publisher - end - - ## - # The name of the topic. - # - # @return [String] A fully-qualified topic name in the form - # `projects/{project_id}/topics/{topic_id}`. - # - def name - return @resource_name if reference? - @grpc.name - end - - ## - # A hash of user-provided labels associated with this topic. Labels can - # be used to organize and group topics. See [Creating and Managing - # Labels](https://cloud.google.com/pubsub/docs/labels). - # - # The returned hash is frozen and changes are not allowed. Use - # {#labels=} to update the labels for this topic. - # - # Makes an API call to retrieve the labels values when called on a - # reference object. See {#reference?}. - # - # @return [Hash] The frozen labels hash. - # - def labels - ensure_grpc! - @grpc.labels.to_h.freeze - end - - ## - # Sets the hash of user-provided labels associated with this - # topic. Labels can be used to organize and group topics. - # Label keys and values can be no longer than 63 characters, can only - # contain lowercase letters, numeric characters, underscores and dashes. - # International characters are allowed. Label values are optional. Label - # keys must start with a letter and each label in the list must have a - # different key. See [Creating and Managing - # Labels](https://cloud.google.com/pubsub/docs/labels). - # - # @param [Hash] new_labels The new labels hash. - # - def labels= new_labels - raise ArgumentError, "Value must be a Hash" if new_labels.nil? - update_grpc = Google::Cloud::PubSub::V1::Topic.new name: name, labels: new_labels - @grpc = service.update_topic update_grpc, :labels - @resource_name = nil - end - - ## - # The Cloud KMS encryption key that will be used to protect access - # to messages published on this topic. - # For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d` - # The default value is `nil`, which means default encryption is used. - # - # Makes an API call to retrieve the KMS encryption key when called on a - # reference object. See {#reference?}. - # - # @return [String] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # topic.kms_key #=> "projects/a/locations/b/keyRings/c/cryptoKeys/d" - # - def kms_key - ensure_grpc! - @grpc.kms_key_name - end - - ## - # Set the Cloud KMS encryption key that will be used to protect access - # to messages published on this topic. - # For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d` - # The default value is `nil`, which means default encryption is used. - # - # @param [String] new_kms_key_name New Cloud KMS key name - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # key_name = "projects/a/locations/b/keyRings/c/cryptoKeys/d" - # topic.kms_key = key_name - # - def kms_key= new_kms_key_name - update_grpc = Google::Cloud::PubSub::V1::Topic.new name: name, kms_key_name: new_kms_key_name - @grpc = service.update_topic update_grpc, :kms_key_name - @resource_name = nil - end - - ## - # The list of GCP region IDs where messages that are published to the - # topic may be persisted in storage. - # - # Messages published by publishers running in non-allowed GCP regions - # (or running outside of GCP altogether) will be routed for storage in - # one of the allowed regions. An empty list indicates a misconfiguration - # at the project or organization level, which will result in all publish - # operations failing. - # - # Makes an API call to retrieve the list of GCP region IDs values when - # called on a reference object. See {#reference?}. - # - # @return [Array] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # topic.persistence_regions #=> ["us-central1", "us-central2"] - # - def persistence_regions - ensure_grpc! - return [] if @grpc.message_storage_policy.nil? - Array @grpc.message_storage_policy.allowed_persistence_regions - end - - ## - # Sets the list of GCP region IDs where messages that are published to - # the topic may be persisted in storage. - # - # @param [Array] new_persistence_regions - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # topic.persistence_regions = ["us-central1", "us-central2"] - # - def persistence_regions= new_persistence_regions - update_grpc = Google::Cloud::PubSub::V1::Topic.new \ - name: name, message_storage_policy: { allowed_persistence_regions: Array(new_persistence_regions) } - @grpc = service.update_topic update_grpc, :message_storage_policy - @resource_name = nil - end - - ## - # The name of the schema that messages published should be validated against, if schema settings are configured - # for the topic. The value is a fully-qualified schema name in the form - # `projects/{project_id}/schemas/{schema_id}`. If present, {#message_encoding} should also be present. The value - # of this field will be `_deleted-schema_` if the schema has been deleted. - # - # Makes an API call to retrieve the schema settings when called on a reference object. See {#reference?}. - # - # @return [String, nil] The schema name, or `nil` if schema settings are not configured for the topic. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # topic.schema_name #=> "projects/my-project/schemas/my-schema" - # - def schema_name - ensure_grpc! - @grpc.schema_settings&.schema - end - - ## - # The encoding of messages validated against the schema identified by {#schema_name}. If present, {#schema_name} - # should also be present. Values include: - # - # * `JSON` - JSON encoding. - # * `BINARY` - Binary encoding, as defined by the schema type. For some schema types, binary encoding may not be - # available. - # - # Makes an API call to retrieve the schema settings when called on a reference object. See {#reference?}. - # - # @return [Symbol, nil] The schema encoding, or `nil` if schema settings are not configured for the topic. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # topic.message_encoding #=> :JSON - # - def message_encoding - ensure_grpc! - @grpc.schema_settings&.encoding - end - - ## - # Checks if the encoding of messages in the schema settings is `BINARY`. See {#message_encoding}. - # - # Makes an API call to retrieve the schema settings when called on a reference object. See {#reference?}. - # - # @return [Boolean] `true` when `BINARY`, `false` if not `BINARY` or schema settings is not set. - # - def message_encoding_binary? - message_encoding.to_s.upcase == "BINARY" - end - - ## - # Checks if the encoding of messages in the schema settings is `JSON`. See {#message_encoding}. - # - # Makes an API call to retrieve the schema settings when called on a reference object. See {#reference?}. - # - # @return [Boolean] `true` when `JSON`, `false` if not `JSON` or schema settings is not set. - # - def message_encoding_json? - message_encoding.to_s.upcase == "JSON" - end - - ## - # Indicates the minimum number of seconds to retain a message after it is - # published to the topic. If this field is set, messages published to the topic - # within the `retention` number of seconds are always available to subscribers. - # For instance, it allows any attached subscription to [seek to a - # timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) - # that is up to `retention` number of seconds in the past. If this field is - # not set, message retention is controlled by settings on individual - # subscriptions. Cannot be less than 600 (10 minutes) or more than 604,800 (7 days). - # See {#retention=}. - # - # Makes an API call to retrieve the retention value when called on a - # reference object. See {#reference?}. - # - # @return [Numeric, nil] The message retention duration in seconds, or `nil` if not set. - # - def retention - ensure_grpc! - Convert.duration_to_number @grpc.message_retention_duration - end - - ## - # Sets the message retention duration in seconds. If set to a positive duration - # between 600 (10 minutes) and 604,800 (7 days), inclusive, the message retention - # duration is changed. If set to `nil`, this clears message retention duration - # from the topic. See {#retention}. - # - # @param [Numeric, nil] new_retention The new message retention duration value. - # - def retention= new_retention - new_retention_duration = Convert.number_to_duration new_retention - update_grpc = Google::Cloud::PubSub::V1::Topic.new name: name, - message_retention_duration: new_retention_duration - @grpc = service.update_topic update_grpc, :message_retention_duration - @resource_name = nil - end - - ## - # Permanently deletes the topic. - # - # @return [Boolean] Returns `true` if the topic was deleted. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # topic.delete - # - def delete - ensure_service! - service.delete_topic name - true - end - - ## - # Creates a new {Subscription} object on the current Topic. - # - # @option options [String] subscription_name Name of the new subscription. Required. - # The value can be a simple subscription ID (relative name), in which - # case the current project ID will be supplied, or a fully-qualified - # subscription name in the form - # `projects/{project_id}/subscriptions/{subscription_id}`. - # - # The subscription ID (relative name) must start with a letter, and - # contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent - # signs (`%`). It must be between 3 and 255 characters in length, and - # it must not start with `goog`. - # @option options [Integer] deadline The maximum number of seconds after a - # subscriber receives a message before the subscriber should - # acknowledge the message. - # @option options [Boolean] retain_acked Indicates whether to retain acknowledged - # messages. If `true`, then messages are not expunged from the - # subscription's backlog, even if they are acknowledged, until they - # fall out of the `retention` window. Default is `false`. - # @option options [Numeric] retention How long to retain unacknowledged messages - # in the subscription's backlog, from the moment a message is - # published. If `retain_acked` is `true`, then this also configures - # the retention of acknowledged messages, and thus configures how far - # back in time a {Subscription#seek} can be done. Cannot be more than - # 604,800 seconds (7 days) or less than 600 seconds (10 minutes). - # Default is 604,800 seconds (7 days). - # @option options [String] endpoint A URL locating the endpoint to which messages - # should be pushed. The parameters `push_config` and `endpoint` should not both be provided. - # @option options [Google::Cloud::PubSub::Subscription::PushConfig] push_config - # The configuration for a push delivery endpoint that should contain the endpoint, - # and can contain authentication data (OIDC token authentication). - # The parameters `push_config` and `endpoint` should not both be provided. - # @option options [Hash] labels A hash of user-provided labels associated with - # the subscription. You can use these to organize and group your - # subscriptions. Label keys and values can be no longer than 63 - # characters, can only contain lowercase letters, numeric characters, - # underscores and dashes. International characters are allowed. Label - # values are optional. Label keys must start with a letter and each - # label in the list must have a different key. See [Creating and - # Managing Labels](https://cloud.google.com/pubsub/docs/labels). - # @option options [Boolean] message_ordering Whether to enable message ordering - # on the subscription. - # @option options [String] filter An expression written in the Cloud Pub/Sub filter language. - # If non-empty, then only {Message} instances whose `attributes` field - # matches the filter are delivered on this subscription. If - # empty, then no messages are filtered out. Optional. - # @option options [Topic] dead_letter_topic - # The {Topic} to which dead letter messages for the subscription should be published. - # Dead lettering is done on a best effort basis. The same message might be dead lettered multiple - # times. The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., - # `service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com`) must have permission to Publish() to - # this topic. - # - # The operation will fail if the topic does not exist. Users should ensure that there is a subscription - # attached to this topic since messages published to a topic with no subscriptions are lost. - # @option options [Integer] dead_letter_max_delivery_attempts - # The maximum number of delivery attempts for any message in the subscription's dead letter policy. - # Dead lettering is done on a best effort basis. The same message might - # be dead lettered multiple times. The value must be between 5 and 100. If this parameter is 0, a default - # value of 5 is used. The `dead_letter_topic` must also be set. - # @option options [RetryPolicy] retry_policy - # A policy that specifies how Cloud Pub/Sub retries message delivery for this subscription. - # If not set, the default retry policy is applied. This generally implies that messages - # will be retried as soon as possible for healthy subscribers. Retry Policy will be triggered on NACKs or - # acknowledgement deadline exceeded events for a given message. - # - # @return [Google::Cloud::PubSub::Subscription] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # sub = topic.subscribe "my-topic-sub" - # sub.name # => "my-topic-sub" - # - # @example Wait 2 minutes for acknowledgement: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # sub = topic.subscribe "my-topic-sub", - # deadline: 120 - # - # @example Configure a push endpoint: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # push_config = Google::Cloud::PubSub::Subscription::PushConfig.new endpoint: "http://example.net/callback" - # push_config.set_oidc_token "service-account@example.net", "audience-header-value" - # - # sub = topic.subscribe "my-subscription", push_config: push_config - # - # @example Configure a Dead Letter Queues policy: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # # Dead Letter Queue (DLQ) testing requires IAM bindings to the Cloud Pub/Sub service account that is - # # automatically created and managed by the service team in a private project. - # my_project_number = "000000000000" - # service_account_email = "serviceAccount:service-#{my_project_number}@gcp-sa-pubsub.iam.gserviceaccount.com" - # - # dead_letter_topic = pubsub.topic "my-dead-letter-topic" - # dead_letter_subscription = dead_letter_topic.subscribe "my-dead-letter-sub" - # - # dead_letter_topic.policy { |p| p.add "roles/pubsub.publisher", service_account_email } - # dead_letter_subscription.policy { |p| p.add "roles/pubsub.subscriber", service_account_email } - # - # topic = pubsub.topic "my-topic" - # sub = topic.subscribe "my-topic-sub", - # dead_letter_topic: dead_letter_topic, - # dead_letter_max_delivery_attempts: 10 - # - # @example Configure a Retry Policy: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: 5, maximum_backoff: 300 - # sub = topic.subscribe "my-topic-sub", retry_policy: retry_policy - # - def subscribe subscription_name, **options - ensure_service! - if options[:push_config] && options[:endpoint] - raise ArgumentError, "endpoint and push_config were both provided. Please provide only one." - end - if options[:endpoint] - options[:push_config] = - Google::Cloud::PubSub::Subscription::PushConfig.new endpoint: options[:endpoint] - end - - options[:dead_letter_topic_name] = options[:dead_letter_topic].name if options[:dead_letter_topic] - if options[:dead_letter_max_delivery_attempts] && !options[:dead_letter_topic_name] - # Service error message "3:Invalid resource name given (name=)." does not identify param. - raise ArgumentError, "dead_letter_topic is required with dead_letter_max_delivery_attempts" - end - options[:push_config] = options[:push_config].to_grpc if options[:push_config] - options[:retry_policy] = options[:retry_policy].to_grpc if options[:retry_policy] - grpc = service.create_subscription name, subscription_name, options - Subscription.from_grpc grpc, service - end - alias create_subscription subscribe - alias new_subscription subscribe - - ## - # Retrieves subscription by name. - # - # @param [String] subscription_name Name of a subscription. The value - # can be a simple subscription ID (relative name), in which case the - # current project ID will be supplied, or a fully-qualified - # subscription name in the form - # `projects/{project_id}/subscriptions/{subscription_id}`. - # @param [Boolean] skip_lookup Optionally create a {Subscription} object - # without verifying the subscription resource exists on the Pub/Sub - # service. Calls made on this object will raise errors if the service - # resource does not exist. Default is `false`. - # - # @return [Google::Cloud::PubSub::Subscription, nil] Returns `nil` if - # the subscription does not exist. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # sub = topic.subscription "my-topic-sub" - # sub.name #=> "projects/my-project/subscriptions/my-topic-sub" - # - # @example Skip the lookup against the service with `skip_lookup`: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # - # # No API call is made to retrieve the subscription information. - # sub = topic.subscription "my-topic-sub", skip_lookup: true - # sub.name #=> "projects/my-project/subscriptions/my-topic-sub" - # - def subscription subscription_name, skip_lookup: nil - ensure_service! - return Subscription.from_name subscription_name, service if skip_lookup - grpc = service.get_subscription subscription_name - Subscription.from_grpc grpc, service - rescue Google::Cloud::NotFoundError - nil - end - alias get_subscription subscription - alias find_subscription subscription - - ## - # Retrieves a list of subscription names for the given project. - # - # @param [String] token The `token` value returned by the last call to - # `subscriptions`; indicates that this is a continuation of a call, - # and that the system should return the next page of data. - # @param [Integer] max Maximum number of subscriptions to return. - # - # @return [Array] (See {Subscription::List}) - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # subscriptions = topic.subscriptions - # subscriptions.each do |subscription| - # puts subscription.name - # end - # - # @example Retrieve all subscriptions: (See {Subscription::List#all}) - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # subscriptions = topic.subscriptions - # subscriptions.all do |subscription| - # puts subscription.name - # end - # - def subscriptions token: nil, max: nil - ensure_service! - options = { token: token, max: max } - grpc = service.list_topics_subscriptions name, options - Subscription::List.from_topic_grpc grpc, service, name, max - end - alias find_subscriptions subscriptions - alias list_subscriptions subscriptions - - ## - # Publishes one or more messages to the topic. - # - # The message payload must not be empty; it must contain either a - # non-empty data field, or at least one attribute. - # - # @param [String, File] data The message payload. This will be converted - # to bytes encoded as ASCII-8BIT. - # @param [Hash] attributes Optional attributes for the message. - # @param [String] ordering_key Identifies related messages for which - # publish order should be respected. - # @yield [batch] a block for publishing multiple messages in one - # request - # @yieldparam [BatchPublisher] batch the topic batch publisher - # object - # - # @return [Message, Array] Returns the published message when - # called without a block, or an array of messages when called with a - # block. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # msg = topic.publish "task completed" - # - # @example A message can be published using a File object: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # file = File.open "message.txt", mode: "rb" - # msg = topic.publish file - # - # @example Additionally, a message can be published with attributes: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # msg = topic.publish "task completed", - # foo: :bar, - # this: :that - # - # @example Multiple messages can be sent at the same time using a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # msgs = topic.publish do |t| - # t.publish "task 1 completed", foo: :bar - # t.publish "task 2 completed", foo: :baz - # t.publish "task 3 completed", foo: :bif - # end - # - # @example Ordered messages are supported using ordering_key: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-ordered-topic" - # - # # Ensure that message ordering is enabled. - # topic.enable_message_ordering! - # - # # Publish an ordered message with an ordering key. - # topic.publish "task completed", - # ordering_key: "task-key" - # - def publish data = nil, attributes = nil, ordering_key: nil, compress: nil, compression_bytes_threshold: nil, - **extra_attrs, &block - ensure_service! - batch = BatchPublisher.new data, - attributes, - ordering_key, - extra_attrs, - compress: compress, - compression_bytes_threshold: compression_bytes_threshold - - block&.call batch - return nil if batch.messages.count.zero? - batch.publish_batch_messages name, service - end - - ## - # Publishes a message asynchronously to the topic using - # {#async_publisher}. - # - # The message payload must not be empty; it must contain either a - # non-empty data field, or at least one attribute. - # - # Google Cloud Pub/Sub ordering keys provide the ability to ensure - # related messages are sent to subscribers in the order in which they - # were published. Messages can be tagged with an ordering key, a string - # that identifies related messages for which publish order should be - # respected. The service guarantees that, for a given ordering key and - # publisher, messages are sent to subscribers in the order in which they - # were published. Ordering does not require sacrificing high throughput - # or scalability, as the service automatically distributes messages for - # different ordering keys across subscribers. - # - # To use ordering keys, specify `ordering_key`. Before specifying - # `ordering_key` on a message a call to `#enable_message_ordering!` must - # be made or an error will be raised. - # - # @note At the time of this release, ordering keys are not yet publicly - # enabled and requires special project enablements. - # - # Publisher flow control limits the number of outstanding messages that - # are allowed to wait to be published. See the `flow_control` key in the - # `async` parameter in {Project#topic} for more information about publisher - # flow control settings. - # - # @param [String, File] data The message payload. This will be converted - # to bytes encoded as ASCII-8BIT. - # @param [Hash] attributes Optional attributes for the message. - # @param [String] ordering_key Identifies related messages for which - # publish order should be respected. - # @yield [result] the callback for when the message has been published - # @yieldparam [PublishResult] result the result of the asynchronous - # publish - # @raise [Google::Cloud::PubSub::AsyncPublisherStopped] when the - # publisher is stopped. (See {AsyncPublisher#stop} and - # {AsyncPublisher#stopped?}.) - # @raise [Google::Cloud::PubSub::OrderedMessagesDisabled] when - # publishing a message with an `ordering_key` but ordered messages are - # not enabled. (See {#message_ordering?} and - # {#enable_message_ordering!}.) - # @raise [Google::Cloud::PubSub::OrderingKeyError] when publishing a - # message with an `ordering_key` that has already failed when - # publishing. Use {#resume_publish} to allow this `ordering_key` to be - # published again. - # @raise [Google::Cloud::PubSub::FlowControlLimitError] when publish flow - # control limits are exceeded, and the `async` parameter key - # `flow_control.limit_exceeded_behavior` is set to `:error` or `:block`. - # If `flow_control.limit_exceeded_behavior` is set to `:block`, this error - # will be raised only when a limit would be exceeded by a single message. - # See the `async` parameter in {Project#topic} for more information about - # `flow_control` settings. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # topic.publish_async "task completed" do |result| - # if result.succeeded? - # log_publish_success result.data - # else - # log_publish_failure result.data, result.error - # end - # end - # - # # Shut down the publisher when ready to stop publishing messages. - # topic.async_publisher.stop! - # - # @example A message can be published using a File object: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # file = File.open "message.txt", mode: "rb" - # topic.publish_async file - # - # # Shut down the publisher when ready to stop publishing messages. - # topic.async_publisher.stop! - # - # @example Additionally, a message can be published with attributes: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # topic.publish_async "task completed", - # foo: :bar, this: :that - # - # # Shut down the publisher when ready to stop publishing messages. - # topic.async_publisher.stop! - # - # @example Ordered messages are supported using ordering_key: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-ordered-topic" - # - # # Ensure that message ordering is enabled. - # topic.enable_message_ordering! - # - # # Publish an ordered message with an ordering key. - # topic.publish_async "task completed", - # ordering_key: "task-key" - # - # # Shut down the publisher when ready to stop publishing messages. - # topic.async_publisher.stop! - # - def publish_async data = nil, attributes = nil, ordering_key: nil, **extra_attrs, &callback - ensure_service! - - @async_publisher ||= AsyncPublisher.new name, service, **@async_opts - @async_publisher.publish data, attributes, ordering_key: ordering_key, **extra_attrs, &callback - end - - ## - # Enables message ordering for messages with ordering keys on the - # {#async_publisher}. When enabled, messages published with the same - # `ordering_key` will be delivered in the order they were published. - # - # @note At the time of this release, ordering keys are not yet publicly - # enabled and requires special project enablements. - # - # See {#message_ordering?}. See {#publish_async}, - # {Subscription#listen}, and {Message#ordering_key}. - # - def enable_message_ordering! - @async_publisher ||= AsyncPublisher.new name, service, **@async_opts - @async_publisher.enable_message_ordering! - end - - ## - # Whether message ordering for messages with ordering keys has been - # enabled on the {#async_publisher}. When enabled, messages published - # with the same `ordering_key` will be delivered in the order they were - # published. When disabled, messages may be delivered in any order. - # - # See {#enable_message_ordering!}. See {#publish_async}, - # {Subscription#listen}, and {Message#ordering_key}. - # - # @return [Boolean] - # - def message_ordering? - @async_publisher ||= AsyncPublisher.new name, service, **@async_opts - @async_publisher.message_ordering? - end - - ## - # Resume publishing ordered messages for the provided ordering key. - # - # @param [String] ordering_key Identifies related messages for which - # publish order should be respected. - # - # @return [boolean] `true` when resumed, `false` otherwise. - # - def resume_publish ordering_key - @async_publisher ||= AsyncPublisher.new name, service, **@async_opts - @async_publisher.resume_publish ordering_key - end - - ## - # Gets the [Cloud IAM](https://cloud.google.com/iam/) access control - # policy for this topic. - # - # @see https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#iampolicy - # google.iam.v1.IAMPolicy - # - # @yield [policy] A block for updating the policy. The latest policy - # will be read from the Pub/Sub service and passed to the block. After - # the block completes, the modified policy will be written to the - # service. - # @yieldparam [Policy] policy the current Cloud IAM Policy for this - # topic - # - # @return [Policy] the current Cloud IAM Policy for this topic - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # policy = topic.policy - # - # @example Update the policy by passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # topic.policy do |p| - # p.add "roles/owner", "user:owner@example.com" - # end - # - def policy - ensure_service! - grpc = service.get_topic_policy name - policy = Policy.from_grpc grpc - return policy unless block_given? - yield policy - update_policy policy - end - - ## - # Updates the [Cloud IAM](https://cloud.google.com/iam/) access control - # policy for this topic. The policy should be read from {#policy}. See - # {Google::Cloud::PubSub::Policy} for an explanation of the policy - # `etag` property and how to modify policies. - # - # You can also update the policy by passing a block to {#policy}, which - # will call this method internally after the block completes. - # - # @see https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#iampolicy - # google.iam.v1.IAMPolicy - # - # @param [Policy] new_policy a new or modified Cloud IAM Policy for this - # topic - # - # @return [Policy] the policy returned by the API update operation - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # policy = topic.policy # API call - # - # policy.add "roles/owner", "user:owner@example.com" - # - # topic.update_policy policy # API call - # - def update_policy new_policy - ensure_service! - grpc = service.set_topic_policy name, new_policy.to_grpc - @policy = Policy.from_grpc grpc - end - alias policy= update_policy - - ## - # Tests the specified permissions against the [Cloud - # IAM](https://cloud.google.com/iam/) access control policy. - # - # @see https://cloud.google.com/iam/docs/managing-policies Managing - # Policies - # - # @param [String, Array] permissions The set of permissions to - # check access for. Permissions with wildcards (such as `*` or - # `storage.*`) are not allowed. - # - # The permissions that can be checked on a topic are: - # - # * pubsub.topics.publish - # * pubsub.topics.attachSubscription - # * pubsub.topics.get - # * pubsub.topics.delete - # * pubsub.topics.update - # * pubsub.topics.getIamPolicy - # * pubsub.topics.setIamPolicy - # - # @return [Array] The permissions that have access. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # perms = topic.test_permissions "pubsub.topics.get", - # "pubsub.topics.publish" - # perms.include? "pubsub.topics.get" #=> true - # perms.include? "pubsub.topics.publish" #=> false - # - def test_permissions *permissions - permissions = Array(permissions).flatten - permissions = Array(permissions).flatten - ensure_service! - grpc = service.test_topic_permissions name, permissions - grpc.permissions - end - - ## - # Determines whether the topic exists in the Pub/Sub service. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # topic.exists? #=> true - # - def exists? - # Always true if the object is not set as reference - return true unless reference? - # If we have a value, return it - return @exists unless @exists.nil? - ensure_grpc! - @exists = true - rescue Google::Cloud::NotFoundError - @exists = false - end - - ## - # Determines whether the topic object was created without retrieving the - # resource representation from the Pub/Sub service. - # - # @return [Boolean] `true` when the topic was created without a resource - # representation, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic", skip_lookup: true - # topic.reference? #=> true - # - def reference? - @grpc.nil? - end - - ## - # Determines whether the topic object was created with a resource - # representation from the Pub/Sub service. - # - # @return [Boolean] `true` when the topic was created with a resource - # representation, `false` otherwise. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # topic.resource? #=> true - # - def resource? - !@grpc.nil? - end - - ## - # Reloads the topic with current data from the Pub/Sub service. - # - # @return [Google::Cloud::PubSub::Topic] Returns the reloaded topic - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topic = pubsub.topic "my-topic" - # topic.reload! - # - def reload! - ensure_service! - @grpc = service.get_topic name - @resource_name = nil - self - end - alias refresh! reload! - - ## - # @private New Topic from a Google::Cloud::PubSub::V1::Topic object. - def self.from_grpc grpc, service, async: nil - new.tap do |t| - t.grpc = grpc - t.service = service - t.instance_variable_set :@async_opts, async if async - end - end - - ## - # @private New reference {Topic} object without making an HTTP request. - def self.from_name name, service, options = {} - name = service.topic_path name, options - from_grpc(nil, service, async: options[:async]).tap do |t| - t.instance_variable_set :@resource_name, name - end - end - - protected - - ## - # @private Raise an error unless an active connection to the service is - # available. - def ensure_service! - raise "Must have active connection to service" unless service - end - - ## - # Ensures a Google::Cloud::PubSub::V1::Topic object exists. - def ensure_grpc! - ensure_service! - reload! if reference? - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/topic/list.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/topic/list.rb deleted file mode 100644 index 609913857c94..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/topic/list.rb +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright 2015 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. - - -require "delegate" - -module Google - module Cloud - module PubSub - class Topic - ## - # Topic::List is a special case Array with additional values. - class List < DelegateClass(::Array) - ## - # If not empty, indicates that there are more topics - # that match the request and this value should be passed to - # the next {Google::Cloud::PubSub::Project#topics} to continue. - attr_accessor :token - - ## - # @private Create a new Topic::List with an array of values. - def initialize arr = [] - super arr - end - - ## - # Whether there a next page of topics. - # - # @return [Boolean] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topics = pubsub.topics - # if topics.next? - # next_topics = topics.next - # end - # - def next? - !token.nil? - end - - ## - # Retrieve the next page of topics. - # - # @return [Topic::List] - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topics = pubsub.topics - # if topics.next? - # next_topics = topics.next - # end - # - def next - return nil unless next? - ensure_service! - options = { token: token, max: @max } - grpc = @service.list_topics options - self.class.from_grpc grpc, @service, @max - end - - ## - # Retrieves remaining results by repeatedly invoking {#next} until - # {#next?} returns `false`. Calls the given block once for each - # result, which is passed as the argument to the block. - # - # An Enumerator is returned if no block is given. - # - # This method will make repeated API calls until all remaining results - # are retrieved. (Unlike `#each`, for example, which merely iterates - # over the results returned by a single API call.) Use with caution. - # - # @param [Integer] request_limit The upper limit of API requests to - # make to load all topics. Default is no limit. - # @yield [topic] The block for accessing each topic. - # @yieldparam [Topic] topic The topic object. - # - # @return [Enumerator] - # - # @example Iterating each topic by passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topics = pubsub.topics - # topics.all do |topic| - # puts topic.name - # end - # - # @example Using the enumerator by not passing a block: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topics = pubsub.topics - # all_names = topics.all.map do |topic| - # topic.name - # end - # - # @example Limit the number of API calls made: - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # topics = pubsub.topics - # topics.all(request_limit: 10) do |topic| - # puts topic.name - # end - # - def all request_limit: nil, &block - request_limit = request_limit.to_i if request_limit - return enum_for :all, request_limit: request_limit unless block_given? - results = self - loop do - results.each(&block) - if request_limit - request_limit -= 1 - break if request_limit.negative? - end - break unless results.next? - results = results.next - end - end - - ## - # @private New Topic::List from a - # Google::Cloud::PubSub::V1::ListTopicsResponse object. - def self.from_grpc grpc_list, service, max = nil - topics = new(Array(grpc_list.topics).map do |grpc| - Topic.from_grpc grpc, service - end) - token = grpc_list.next_page_token - token = nil if token == "".freeze - topics.instance_variable_set :@token, token - topics.instance_variable_set :@service, service - topics.instance_variable_set :@max, max - topics - end - - protected - - ## - # @private Raise an error unless an active connection to the service - # is available. - def ensure_service! - raise "Must have active connection to service" unless @service - end - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher/message_ordering_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher/message_ordering_test.rb index 78331c7ce5fb..aae0aaff71ba 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher/message_ordering_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher/message_ordering_test.rb @@ -21,7 +21,7 @@ let(:fixture_expected_hash) { Hash[fixture[:expected].map { |exp| [exp[:key], exp[:messages]] }] } it "publishes messages with ordering_key" do - pubsub.service.mocked_publisher = AsyncPublisherStub.new + pubsub.service.mocked_topic_admin = AsyncPublisherStub.new publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, interval: 30 publisher.enable_message_ordering! @@ -40,7 +40,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = pubsub.service.mocked_publisher.message_hash + published_messages_hash = pubsub.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -49,7 +49,7 @@ end it "publishes messages with ordering_key and callback" do - pubsub.service.mocked_publisher = AsyncPublisherStub.new + pubsub.service.mocked_topic_admin = AsyncPublisherStub.new publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, interval: 30 publisher.enable_message_ordering! @@ -70,7 +70,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = pubsub.service.mocked_publisher.message_hash + published_messages_hash = pubsub.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -79,7 +79,7 @@ end it "publishes messages with ordering_key provided only when needed" do - pubsub.service.mocked_publisher = AsyncPublisherStub.new + pubsub.service.mocked_topic_admin = AsyncPublisherStub.new publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, interval: 30 publisher.enable_message_ordering! @@ -102,7 +102,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = pubsub.service.mocked_publisher.message_hash + published_messages_hash = pubsub.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -111,7 +111,7 @@ end it "publishes messages with ordering_key in reverse order" do - pubsub.service.mocked_publisher = AsyncPublisherStub.new + pubsub.service.mocked_topic_admin = AsyncPublisherStub.new publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, interval: 30 publisher.enable_message_ordering! @@ -130,7 +130,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = pubsub.service.mocked_publisher.message_hash + published_messages_hash = pubsub.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -139,7 +139,7 @@ end it "publishes messages with ordering_key with a low max_messages" do - pubsub.service.mocked_publisher = AsyncPublisherStub.new + pubsub.service.mocked_topic_admin = AsyncPublisherStub.new publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, interval: 30, max_messages: 100 publisher.enable_message_ordering! @@ -158,7 +158,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = pubsub.service.mocked_publisher.message_hash + published_messages_hash = pubsub.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -176,7 +176,7 @@ end it "publishes messages with ordering_key and flow_controller" do - pubsub.service.mocked_publisher = AsyncPublisherStub.new + pubsub.service.mocked_topic_admin = AsyncPublisherStub.new flow_control = { message_limit: 1000, @@ -230,7 +230,7 @@ _(publisher.flow_controller.outstanding_bytes).must_equal 0 - published_messages_hash = pubsub.service.mocked_publisher.message_hash + published_messages_hash = pubsub.service.mocked_topic_admin.message_hash assert_equal ["a","b","c"], published_messages_hash["k1"].map(&:data) end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher_test.rb index c66270bd4cb6..debb6fde7fa9 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher_test.rb @@ -89,7 +89,7 @@ Google::Cloud::PubSub::V1::PubsubMessage.new(data: msg_encoded1) ] - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new publisher.publish message1 @@ -102,7 +102,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = publisher.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash expected_messages_hash = { "" => messages } assert_equal expected_messages_hash, published_messages_hash end @@ -113,7 +113,7 @@ Google::Cloud::PubSub::V1::PubsubMessage.new(data: msg_encoded1, attributes: {"format" => "text"}) ] - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new publisher.publish message1, format: :text @@ -126,7 +126,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = publisher.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash expected_messages_hash = { "" => messages } assert_equal expected_messages_hash, published_messages_hash end @@ -138,7 +138,7 @@ ] callback_called = false - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new publisher.publish message1 do |result| assert_kind_of Google::Cloud::PubSub::PublishResult, result @@ -154,7 +154,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = publisher.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash expected_messages_hash = { "" => messages } assert_equal expected_messages_hash, published_messages_hash _(callback_called).must_equal true @@ -168,7 +168,7 @@ Google::Cloud::PubSub::V1::PubsubMessage.new(data: msg_encoded3, attributes: {"format" => "none"}) ] - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new publisher.publish message1 publisher.publish message2 @@ -183,7 +183,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = publisher.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash expected_messages_hash = { "" => messages } assert_equal expected_messages_hash, published_messages_hash end @@ -197,7 +197,7 @@ ] callback_count = 0 - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new publisher.publish message1 do |result| assert_kind_of Google::Cloud::PubSub::PublishResult, result @@ -221,7 +221,7 @@ _(publisher).wont_be :started? _(publisher).must_be :stopped? - published_messages_hash = publisher.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash expected_messages_hash = { "" => messages } assert_equal expected_messages_hash, published_messages_hash _(callback_count).must_equal 3 @@ -235,7 +235,7 @@ ] callback_count = 0 - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new 30.times do |count| publisher.publish message1 do |msg| @@ -258,7 +258,7 @@ end end - assert_equal expected_messages, publisher.service.mocked_publisher.messages + assert_equal expected_messages, publisher.service.mocked_topic_admin.messages _(callback_count).must_equal 30 end @@ -270,7 +270,7 @@ ] callback_count = 0 - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new 30.times do publisher.publish message1 do |msg| @@ -293,8 +293,8 @@ end end - assert_equal expected_messages.map(&:count), publisher.service.mocked_publisher.messages.map(&:count) - assert_equal expected_messages, publisher.service.mocked_publisher.messages + assert_equal expected_messages.map(&:count), publisher.service.mocked_topic_admin.messages.map(&:count) + assert_equal expected_messages, publisher.service.mocked_topic_admin.messages _(callback_count).must_equal 30 end @@ -305,7 +305,7 @@ big_msg_data = SecureRandom.random_bytes 120 callback_count = 0 - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new publisher.publish message1 do |msg| callback_count += 1 @@ -327,7 +327,7 @@ [Google::Cloud::PubSub::V1::PubsubMessage.new(data: msg_encoded1, message_id: "msg0")], [Google::Cloud::PubSub::V1::PubsubMessage.new(data: big_msg_data, message_id: "msg1")] ] - assert_equal publisher.service.mocked_publisher.messages, expected_messages + assert_equal publisher.service.mocked_topic_admin.messages, expected_messages _(callback_count).must_equal 2 end @@ -342,7 +342,7 @@ interval: 10, flow_control: flow_control - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new _(publisher.flow_controller.outstanding_messages).must_equal 0 @@ -366,7 +366,7 @@ _(publisher.flow_controller.outstanding_messages).must_equal 0 - published_messages_hash = publisher.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal ["a","b"], published_messages_hash[""].map(&:data) end @@ -381,7 +381,7 @@ interval: 10, flow_control: flow_control - publisher.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new _(publisher.flow_controller.outstanding_bytes).must_equal 0 @@ -404,63 +404,63 @@ _(publisher.flow_controller.outstanding_bytes).must_equal 0 - published_messages_hash = publisher.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal ["a","b"], published_messages_hash[""].map(&:data) _(callback_called).must_equal true end it "passes compress true to service when compress enabled and size above default threshold" do publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, compress: true - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } actual_request = nil actual_option = nil - mocked_publisher.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish, nil do |request, option| actual_request = request actual_option = option end - publisher.service.mocked_publisher = mocked_publisher + publisher.service.mocked_topic_admin = mocked_topic_admin batch = OpenStruct.new( "rebalance!" => [OpenStruct.new(:msg => "data")], "total_message_bytes" => 241, "ordering_key" => [], "items" => [OpenStruct.new(:msg => "data")]) publisher.send(:publish_batch_sync, topic_name, batch) - mocked_publisher.verify + mocked_topic_admin.verify assert_equal actual_option, expected_option assert_equal actual_request, expected_request end it "passes compress true to service when compress enabled and size equal default threshold" do publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, compress: true - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } actual_request = nil actual_option = nil - mocked_publisher.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish, nil do |request, option| actual_request = request actual_option = option end - publisher.service.mocked_publisher = mocked_publisher + publisher.service.mocked_topic_admin = mocked_topic_admin batch = OpenStruct.new( "rebalance!" => [OpenStruct.new(:msg => "data")], "total_message_bytes" => 240, "ordering_key" => [], "items" => [OpenStruct.new(:msg => "data")]) publisher.send(:publish_batch_sync, topic_name, batch) - mocked_publisher.verify + mocked_topic_admin.verify assert_equal actual_option, expected_option assert_equal actual_request, expected_request end it "passes compress false to service when compress enabled and size below default threshold" do publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, compress: true - mocked_publisher = Minitest::Mock.new - publisher.service.mocked_publisher = mocked_publisher + mocked_topic_admin = Minitest::Mock.new + publisher.service.mocked_topic_admin = mocked_topic_admin expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} actual_request = nil actual_option = "test" - mocked_publisher.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish, nil do |request, option| actual_request = request actual_option = option end @@ -469,20 +469,20 @@ "ordering_key" => [], "items" => [OpenStruct.new(:msg => "data")]) publisher.send(:publish_batch_sync, topic_name, batch) - mocked_publisher.verify + mocked_topic_admin.verify assert_nil actual_option assert_equal actual_request, expected_request end it "passes compress true to service when compress enabled and size above given threshold" do publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, compress: true, compression_bytes_threshold: 150 - mocked_publisher = Minitest::Mock.new - publisher.service.mocked_publisher = mocked_publisher + mocked_topic_admin = Minitest::Mock.new + publisher.service.mocked_topic_admin = mocked_topic_admin expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } actual_request = nil actual_option = nil - mocked_publisher.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish, nil do |request, option| actual_request = request actual_option = option end @@ -491,20 +491,20 @@ "ordering_key" => [], "items" => [OpenStruct.new(:msg => "data")]) publisher.send(:publish_batch_sync, topic_name, batch) - mocked_publisher.verify + mocked_topic_admin.verify assert_equal actual_option, expected_option assert_equal actual_request, expected_request end it "passes compress true to service when compress enabled and size equal given threshold" do publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, compress: true, compression_bytes_threshold: 150 - mocked_publisher = Minitest::Mock.new - publisher.service.mocked_publisher = mocked_publisher + mocked_topic_admin = Minitest::Mock.new + publisher.service.mocked_topic_admin = mocked_topic_admin expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } actual_request = nil actual_option = nil - mocked_publisher.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish, nil do |request, option| actual_request = request actual_option = option end @@ -513,19 +513,19 @@ "ordering_key" => [], "items" => [OpenStruct.new(:msg => "data")]) publisher.send(:publish_batch_sync, topic_name, batch) - mocked_publisher.verify + mocked_topic_admin.verify assert_equal actual_option, expected_option assert_equal actual_request, expected_request end it "passes compress false to service when compress enabled and size below given threshold" do publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service, compress: true, compression_bytes_threshold: 150 - mocked_publisher = Minitest::Mock.new - publisher.service.mocked_publisher = mocked_publisher + mocked_topic_admin = Minitest::Mock.new + publisher.service.mocked_topic_admin = mocked_topic_admin expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} actual_request = nil actual_option = "test" - mocked_publisher.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish, nil do |request, option| actual_request = request actual_option = option end @@ -534,28 +534,28 @@ "ordering_key" => [], "items" => [OpenStruct.new(:msg => "data")]) publisher.send(:publish_batch_sync, topic_name, batch) - mocked_publisher.verify + mocked_topic_admin.verify assert_nil actual_option assert_equal actual_request, expected_request end it "passes compress false to service when compress disabled" do publisher = Google::Cloud::PubSub::AsyncPublisher.new topic_name, pubsub.service - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} actual_request = nil actual_option = "test" - mocked_publisher.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish, nil do |request, option| actual_request = request actual_option = option end - publisher.service.mocked_publisher = mocked_publisher + publisher.service.mocked_topic_admin = mocked_topic_admin batch = OpenStruct.new( "rebalance!" => [OpenStruct.new(:msg => "data")], "total_message_bytes" => 300, "ordering_key" => [], "items" => [OpenStruct.new(:msg => "data")]) publisher.send(:publish_batch_sync, topic_name, batch) - mocked_publisher.verify + mocked_topic_admin.verify assert_nil actual_option assert_equal actual_request, expected_request end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/batch_publisher_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/batch_publisher_test.rb index dff5fa717073..7fc0c53b6c25 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/batch_publisher_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/batch_publisher_test.rb @@ -19,110 +19,110 @@ it "passes compress true to service when compress enabled and size above default threshold" do publisher = Google::Cloud::PubSub::BatchPublisher.new "d"*241, nil, nil, {}, compress: true - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*241)]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_publisher.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end service = pubsub.service - service.mocked_publisher = mocked_publisher + service.mocked_topic_admin = mocked_topic_admin publisher.publish_batch_messages topic_name, service - mocked_publisher.verify + mocked_topic_admin.verify end it "passes compress false to service when compress enabled and size equal default threshold" do publisher = Google::Cloud::PubSub::BatchPublisher.new "d"*238, nil, nil, {}, compress: true - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*238)]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_publisher.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end service = pubsub.service - service.mocked_publisher = mocked_publisher + service.mocked_topic_admin = mocked_topic_admin publisher.publish_batch_messages topic_name, service - mocked_publisher.verify + mocked_topic_admin.verify end it "passes compress false to service when compress enabled and size below default threshold" do publisher = Google::Cloud::PubSub::BatchPublisher.new "data", nil, nil, {}, compress: true - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"data")]} publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_publisher.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end service = pubsub.service - service.mocked_publisher = mocked_publisher + service.mocked_topic_admin = mocked_topic_admin publisher.publish_batch_messages topic_name, service - mocked_publisher.verify + mocked_topic_admin.verify end it "passes compress true to service when compress enabled and size above given threshold" do publisher = Google::Cloud::PubSub::BatchPublisher.new "d"*141, nil, nil, {}, compress: true, compression_bytes_threshold: 140 - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*141)]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_publisher.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end service = pubsub.service - service.mocked_publisher = mocked_publisher + service.mocked_topic_admin = mocked_topic_admin publisher.publish_batch_messages topic_name, service - mocked_publisher.verify + mocked_topic_admin.verify end it "passes compress true to service when compress enabled and size equal given threshold" do publisher = Google::Cloud::PubSub::BatchPublisher.new "d"*138, nil, nil, {}, compress: true, compression_bytes_threshold: 140 - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*138)]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_publisher.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end service = pubsub.service - service.mocked_publisher = mocked_publisher + service.mocked_topic_admin = mocked_topic_admin publisher.publish_batch_messages topic_name, service - mocked_publisher.verify + mocked_topic_admin.verify end it "passes compress false to service when compress enabled and size below given threshold" do publisher = Google::Cloud::PubSub::BatchPublisher.new "data", nil, nil, {}, compress: true, compression_bytes_threshold: 140 - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"data")]} publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_publisher.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end service = pubsub.service - service.mocked_publisher = mocked_publisher + service.mocked_topic_admin = mocked_topic_admin publisher.publish_batch_messages topic_name, service - mocked_publisher.verify + mocked_topic_admin.verify end it "passes compress false to service when compress disabled" do publisher = Google::Cloud::PubSub::BatchPublisher.new "d"*241, nil, nil, {} - mocked_publisher = Minitest::Mock.new + mocked_topic_admin = Minitest::Mock.new expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*241)]} publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_publisher.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end service = pubsub.service - service.mocked_publisher = mocked_publisher + service.mocked_topic_admin = mocked_topic_admin publisher.publish_batch_messages topic_name, service - mocked_publisher.verify + mocked_topic_admin.verify end -end \ No newline at end of file +end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/acknowledge_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/acknowledge_test.rb similarity index 63% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/acknowledge_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/acknowledge_test.rb index 30bc04ffd8ec..05b8eeb4ccb8 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/acknowledge_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/acknowledge_test.rb @@ -14,13 +14,14 @@ require "helper" -describe Google::Cloud::PubSub::Subscriber, :acknowledge, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :acknowledge, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } + let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new sub_hash } let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } + let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ rec_message_hash("rec_message1-msg-goes-here", 1111) } let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ @@ -38,12 +39,12 @@ stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id + subscriber.service.mocked_subscription_admin = stub + subscriber.service.client_id = client_id - subscriber = subscription.listen streams: 1 do |result| + listener = subscriber.listen streams: 1 do |result| # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! unless called + listener.buffer.flush! unless called assert_kind_of Google::Cloud::PubSub::ReceivedMessage, result assert_equal rec_message_msg, result.data @@ -52,17 +53,17 @@ result.ack! called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while !called - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 100 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! _(stub.requests.map(&:to_a)).must_equal [ [Google::Cloud::PubSub::V1::StreamingPullRequest.new( @@ -102,28 +103,28 @@ stub = StreamingPullStub.new response_groups called = 0 - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id + subscriber.service.mocked_subscription_admin = stub + subscriber.service.client_id = client_id - subscriber = subscription.listen streams: 1 do |msg| + listener = subscriber.listen streams: 1 do |msg| # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! if called.zero? + listener.buffer.flush! if called.zero? assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg msg.ack! called += 1 end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while called < 3 - fail "total number of calls were never made" if subscriber_retries > 200 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 200 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! _(stub.requests.map(&:to_a)).must_equal [ [Google::Cloud::PubSub::V1::StreamingPullRequest.new( @@ -155,50 +156,4 @@ end _(mod_ack_hash[60].sort).must_equal ["ack-id-1111", "ack-id-1112", "ack-id-1113"] end - - it "does not send flow control settings to server when use_legacy_flow_control is true" do - rec_message_msg = "pulled-message" - rec_message_ack_id = 123456789 - pull_res = Google::Cloud::PubSub::V1::StreamingPullResponse.new rec_messages_hash(rec_message_msg, rec_message_ack_id) - response_groups = [[pull_res]] - - stub = StreamingPullStub.new response_groups - called = false - - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id - - subscriber = subscription.listen streams: 1, inventory: { max_outstanding_messages: 999, max_outstanding_bytes: 777, use_legacy_flow_control: true } do |result| - # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! unless called - - assert_kind_of Google::Cloud::PubSub::ReceivedMessage, result - assert_equal rec_message_msg, result.data - assert_equal "ack-id-#{rec_message_ack_id}", result.ack_id - - result.ack! - called = true - end - subscriber.start - - subscriber_retries = 0 - while !called - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 - sleep 0.01 - end - - subscriber.stop - subscriber.wait! - - _(stub.requests.map(&:to_a)).must_equal [ - [Google::Cloud::PubSub::V1::StreamingPullRequest.new( - client_id: client_id, - subscription: sub_path, - stream_ack_deadline_seconds: 60, - max_outstanding_messages: 0, - max_outstanding_bytes: 0 - )] - ] - end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/error_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/error_test.rb similarity index 77% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/error_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/error_test.rb index f4d4d69ae8c9..bcdf45240be5 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/error_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/error_test.rb @@ -14,13 +14,13 @@ require "helper" -describe Google::Cloud::PubSub::Subscriber, :error, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :error, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:sub_path) { subscription_path sub_name } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ rec_message_hash("rec_message1-msg-goes-here", 1111) } let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ @@ -38,36 +38,36 @@ called = 0 errors = [] - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg msg.ack! - called +=1 + called += 1 end - subscriber.on_error do |error| + listener.on_error do |error| # raise error errors << error end - _(subscriber.last_error).must_be :nil? + _(listener.last_error).must_be :nil? - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while called < 3 - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 100 + listener_retries += 1 sleep 0.01 end _(errors.count).must_equal 2 _(errors[0]).must_be_kind_of ArgumentError _(errors[1]).must_be_kind_of ZeroDivisionError - _(subscriber.last_error).must_be_kind_of ZeroDivisionError + _(listener.last_error).must_be_kind_of ZeroDivisionError - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! # stub requests are not guaranteed, so don't check in this test end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/inventory_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/inventory_test.rb similarity index 72% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/inventory_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/inventory_test.rb index e82a2487094b..fec618a2e312 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/inventory_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/inventory_test.rb @@ -15,13 +15,13 @@ require "helper" require "ostruct" -describe Google::Cloud::PubSub::Subscriber, :inventory, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :inventory, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ rec_message_hash("rec_message1-msg-goes-here", 1111) } let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ @@ -39,14 +39,14 @@ stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id + subscriber.service.mocked_subscription_admin = stub + subscriber.service.client_id = client_id - subscriber = subscription.listen streams: 1 do |result| + listener = subscriber.listen streams: 1 do |result| # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! unless called + listener.buffer.flush! unless called - assert_equal ["ack-id-123456789"], subscriber.stream_pool.first.inventory.ack_ids + assert_equal ["ack-id-123456789"], listener.stream_pool.first.inventory.ack_ids assert_kind_of Google::Cloud::PubSub::ReceivedMessage, result assert_equal rec_message_msg, result.data @@ -55,20 +55,20 @@ called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while !called - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 100 + listener_retries += 1 sleep 0.01 end sleep 0.01 - assert_empty subscriber.stream_pool.first.inventory.ack_ids + assert_empty listener.stream_pool.first.inventory.ack_ids - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! _(stub.requests.map(&:to_a)).must_equal [ [Google::Cloud::PubSub::V1::StreamingPullRequest.new( @@ -108,32 +108,32 @@ stub = StreamingPullStub.new response_groups called = 0 - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id + subscriber.service.mocked_subscription_admin = stub + subscriber.service.client_id = client_id - subscriber = subscription.listen streams: 1 do |msg| + listener = subscriber.listen streams: 1 do |msg| # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! if called.zero? + listener.buffer.flush! if called.zero? - refute_empty subscriber.stream_pool.first.inventory.ack_ids + refute_empty listener.stream_pool.first.inventory.ack_ids assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg called += 1 end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while called < 3 - fail "total number of calls were never made" if subscriber_retries > 200 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 200 + listener_retries += 1 sleep 0.01 end sleep 0.01 - assert_empty subscriber.stream_pool.first.inventory.ack_ids + assert_empty listener.stream_pool.first.inventory.ack_ids - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! _(stub.requests.map(&:to_a)).must_equal [ [Google::Cloud::PubSub::V1::StreamingPullRequest.new( @@ -168,15 +168,14 @@ it "calculates delay considering min_duration_per_lease_extension" do subscriber_mock = Minitest::Mock.new - subscriber_mock.expect :subscriber, OpenStruct.new({:deadline => 60}) + subscriber_mock.expect :subscriber, OpenStruct.new({ :deadline => 60 }) subscriber_mock.expect :exactly_once_delivery_enabled, true - inventory = Google::Cloud::PubSub::Subscriber::Inventory.new subscriber_mock, - limit: 2, - bytesize: 100_000, - extension: 3600, - max_duration_per_lease_extension: 0, - min_duration_per_lease_extension: 61, - use_legacy_flow_control: false + inventory = Google::Cloud::PubSub::MessageListener::Inventory.new subscriber_mock, + limit: 2, + bytesize: 100_000, + extension: 3600, + max_duration_per_lease_extension: 0, + min_duration_per_lease_extension: 61 inventory.add rec_msg1_grpc delay = inventory.send :calc_delay @@ -185,13 +184,12 @@ it "knows its count limit" do subscriber_mock = Minitest::Mock.new - inventory = Google::Cloud::PubSub::Subscriber::Inventory.new subscriber_mock, - limit: 2, - bytesize: 100_000, - extension: 3600, - max_duration_per_lease_extension: 0, - min_duration_per_lease_extension: 0, - use_legacy_flow_control: false + inventory = Google::Cloud::PubSub::MessageListener::Inventory.new subscriber_mock, + limit: 2, + bytesize: 100_000, + extension: 3600, + max_duration_per_lease_extension: 0, + min_duration_per_lease_extension: 0 inventory.add rec_msg1_grpc _(inventory).wont_be :full? @@ -203,13 +201,12 @@ it "knows its bytesize limit" do subscriber_mock = Minitest::Mock.new - inventory = Google::Cloud::PubSub::Subscriber::Inventory.new subscriber_mock, - limit: 1000, - bytesize: 100, - extension: 3600, - max_duration_per_lease_extension: 0, - min_duration_per_lease_extension: 0, - use_legacy_flow_control: false + inventory = Google::Cloud::PubSub::MessageListener::Inventory.new subscriber_mock, + limit: 1000, + bytesize: 100, + extension: 3600, + max_duration_per_lease_extension: 0, + min_duration_per_lease_extension: 0 inventory.add rec_msg1_grpc _(inventory).wont_be :full? @@ -221,13 +218,12 @@ it "removes expired items" do subscriber_mock = Minitest::Mock.new - inventory = Google::Cloud::PubSub::Subscriber::Inventory.new subscriber_mock, - limit: 1000, - bytesize: 100_000, - extension: 3600, + inventory = Google::Cloud::PubSub::MessageListener::Inventory.new subscriber_mock, + limit: 1000, + bytesize: 100_000, + extension: 3600, max_duration_per_lease_extension: 0, - min_duration_per_lease_extension: 0, - use_legacy_flow_control: false + min_duration_per_lease_extension: 0 expired_time = Time.now - 7200 @@ -245,26 +241,24 @@ it "knows its max_duration_per_lease_extension limit" do subscriber_mock = Minitest::Mock.new - inventory = Google::Cloud::PubSub::Subscriber::Inventory.new subscriber_mock, + inventory = Google::Cloud::PubSub::MessageListener::Inventory.new subscriber_mock, limit: 1000, - bytesize: 100, - extension: 3600, - max_duration_per_lease_extension: 10, - min_duration_per_lease_extension: 0, - use_legacy_flow_control: false + bytesize: 100, + extension: 3600, + max_duration_per_lease_extension: 10, + min_duration_per_lease_extension: 0 _(inventory.max_duration_per_lease_extension).must_equal 10 end it "knows its min_duration_per_lease_extension limit" do subscriber_mock = Minitest::Mock.new - inventory = Google::Cloud::PubSub::Subscriber::Inventory.new subscriber_mock, - limit: 1000, - bytesize: 100, - extension: 3600, - max_duration_per_lease_extension: 0, - min_duration_per_lease_extension: 10, - use_legacy_flow_control: false + inventory = Google::Cloud::PubSub::MessageListener::Inventory.new subscriber_mock, + limit: 1000, + bytesize: 100, + extension: 3600, + max_duration_per_lease_extension: 0, + min_duration_per_lease_extension: 10 _(inventory.min_duration_per_lease_extension).must_equal 10 end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/message_ordering_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/message_ordering_test.rb similarity index 85% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/message_ordering_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/message_ordering_test.rb index 0da91798ceb8..74b41e911340 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/message_ordering_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/message_ordering_test.rb @@ -14,13 +14,13 @@ require "helper" -describe Google::Cloud::PubSub::Subscriber, :message_ordering, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :message_ordering, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash(topic_name, sub_name).merge enable_message_ordering: true } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } let(:fixture_file_path) { File.expand_path File.join __dir__, "../../../../conformance/ordered_messages.json" } let(:fixture) { JSON.parse File.read(fixture_file_path), symbolize_names: true } @@ -70,33 +70,33 @@ def pull_response_groups streams: 1 message_hash = Hash.new { |hash, key| hash[key] = [] } callback_count = 0 - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1, inventory: 100 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1, inventory: 100 do |msg| assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg callback_count += 1 message_hash[msg.ordering_key].push msg.data msg.ack! end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 previous_callback_count = 0 until callback_count >= fixture_input_count if previous_callback_count == callback_count - subscriber_retries += 1 + listener_retries += 1 else - subscriber_retries = 0 + listener_retries = 0 end previous_callback_count = callback_count - $PUBSUB_STATUS = "#{callback_count}|#{previous_callback_count}|#{subscriber_retries}" - fail "the subscriber has stopped processing messages - #{$PUBSUB_STATUS}" if subscriber_retries > 500 + $PUBSUB_STATUS = "#{callback_count}|#{previous_callback_count}|#{listener_retries}" + fail "the subscriber has stopped processing messages - #{$PUBSUB_STATUS}" if listener_retries > 500 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! assert_equal fixture_expected_hash.keys.sort, message_hash.keys.sort fixture_expected_hash.each do |key, messages| @@ -115,32 +115,32 @@ def pull_response_groups streams: 1 message_hash = Hash.new { |hash, key| hash[key] = [] } callback_count = 0 - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 4, inventory: 1000 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 4, inventory: 1000 do |msg| assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg callback_count += 1 message_hash[msg.ordering_key].push msg.data msg.ack! end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 previous_callback_count = 0 until callback_count == fixture_input_count if previous_callback_count == callback_count - subscriber_retries += 1 + listener_retries += 1 else - subscriber_retries = 0 + listener_retries = 0 end previous_callback_count = callback_count - $PUBSUB_STATUS = "#{callback_count}|#{previous_callback_count}|#{subscriber_retries}" - fail "the subscriber has stopped processing messages - #{$PUBSUB_STATUS}" if subscriber_retries > 250 + $PUBSUB_STATUS = "#{callback_count}|#{previous_callback_count}|#{listener_retries}" + fail "the subscriber has stopped processing messages - #{$PUBSUB_STATUS}" if listener_retries > 250 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! assert_equal fixture_expected_hash.keys.sort, message_hash.keys.sort fixture_expected_hash.each do |key, messages| diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/modify_ack_deadline_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/modify_ack_deadline_test.rb similarity index 81% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/modify_ack_deadline_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/modify_ack_deadline_test.rb index 89dca961d252..190bbe8d6a78 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/modify_ack_deadline_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/modify_ack_deadline_test.rb @@ -14,13 +14,13 @@ require "helper" -describe Google::Cloud::PubSub::Subscriber, :modify_ack_deadline, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :modify_ack_deadline, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ rec_message_hash("rec_message1-msg-goes-here", 1111) } let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ @@ -38,12 +38,12 @@ stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id + subscriber.service.mocked_subscription_admin = stub + subscriber.service.client_id = client_id - subscriber = subscription.listen streams: 1 do |msg| + listener = subscriber.listen streams: 1 do |msg| # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! unless called + listener.buffer.flush! unless called assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg assert_equal rec_message_msg, msg.data @@ -52,17 +52,17 @@ msg.modify_ack_deadline! 42 called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while !called - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 100 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! _(stub.requests.map(&:to_a)).must_equal [ [Google::Cloud::PubSub::V1::StreamingPullRequest.new( @@ -97,28 +97,28 @@ stub = StreamingPullStub.new response_groups called = 0 - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id + subscriber.service.mocked_subscription_admin = stub + subscriber.service.client_id = client_id - subscriber = subscription.listen streams: 1 do |msg| + listener = subscriber.listen streams: 1 do |msg| # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! if called.zero? + listener.buffer.flush! if called.zero? assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg msg.modify_ack_deadline! 42 called +=1 end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while called < 3 - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 100 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! _(stub.requests.map(&:to_a)).must_equal [ [Google::Cloud::PubSub::V1::StreamingPullRequest.new( diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/nack_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/nack_test.rb similarity index 80% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/nack_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/nack_test.rb index 97f7e660ef93..5b0744ef97de 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/nack_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/nack_test.rb @@ -14,13 +14,14 @@ require "helper" -describe Google::Cloud::PubSub::Subscriber, :nack, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :nack, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + #let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::Pubsub::Subscriber.from_grpc sub_grpc, pubsub.service} let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ rec_message_hash("rec_message1-msg-goes-here", 1111) } let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ @@ -38,12 +39,12 @@ stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id + subscriber.service.mocked_subscription_admin = stub + subscriber.service.client_id = client_id - subscriber = subscription.listen streams: 1 do |msg| + listener = subscriber.listen streams: 1 do |msg| # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! unless called + listener.buffer.flush! unless called assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg assert_equal rec_message_msg, msg.data @@ -52,16 +53,16 @@ msg.nack! called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while !called - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 100 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! _(stub.requests.map(&:to_a)).must_equal [ [Google::Cloud::PubSub::V1::StreamingPullRequest.new( @@ -96,28 +97,28 @@ stub = StreamingPullStub.new response_groups called = 0 - subscription.service.mocked_subscriber = stub - subscription.service.client_id = client_id + subscriber.service.mocked_subscription_admin = stub + subscriber.service.client_id = client_id - subscriber = subscription.listen streams: 1 do |msg| + listener = subscriber.listen streams: 1 do |msg| # flush the initial buffer before any callbacks are processed - subscriber.buffer.flush! if called.zero? + listener.buffer.flush! if called.zero? assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg msg.nack! called +=1 end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while called < 3 - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 100 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! _(stub.requests.map(&:to_a)).must_equal [ [Google::Cloud::PubSub::V1::StreamingPullRequest.new( diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/restart_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/restart_test.rb similarity index 81% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/restart_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/restart_test.rb index dfdf6a65269d..5fe8a66dbc27 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/restart_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/restart_test.rb @@ -14,13 +14,13 @@ require "helper" -describe Google::Cloud::PubSub::Subscriber, :error, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :error, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ rec_message_hash("rec_message1-msg-goes-here", 1111) } let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ @@ -38,31 +38,31 @@ called = 0 errors = [] - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| assert_kind_of Google::Cloud::PubSub::ReceivedMessage, msg msg.ack! called +=1 end - subscriber.on_error do |error| + listener.on_error do |error| raise error errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 while called < 3 - fail "total number of calls were never made" if subscriber_retries > 100 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 100 + listener_retries += 1 sleep 0.01 end _(errors.count).must_equal 0 - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! # stub requests are not guaranteed, so don't check in this test end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/stream_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/stream_test.rb similarity index 71% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/stream_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/stream_test.rb index 94438c6b05dd..5f457b90405c 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/stream_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/stream_test.rb @@ -14,13 +14,13 @@ require "helper" -describe Google::Cloud::PubSub::Subscriber, :stream, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :stream, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ rec_message_hash("rec_message1-msg-goes-here", 1111) } @@ -35,24 +35,24 @@ stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| assert msg.subscription.exactly_once_delivery_enabled called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.01 end - assert subscriber.stream_pool.first.exactly_once_delivery_enabled - subscriber.stop - subscriber.wait! + assert listener.stream_pool.first.exactly_once_delivery_enabled + listener.stop + listener.wait! end it "should update min_duration_per_lease_extension when exactly_once_delivery is modified" do @@ -65,29 +65,29 @@ stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| assert msg.subscription.exactly_once_delivery_enabled called = true end - subscriber.on_error do |error| + listener.on_error do |error| # raise error p error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.01 end - assert_equal subscriber.stream_pool.first.inventory.min_duration_per_lease_extension, 60 - subscriber.stop - subscriber.wait! + assert_equal listener.stream_pool.first.inventory.min_duration_per_lease_extension, 60 + listener.stop + listener.wait! end it "should not update min_duration_per_lease_extension when exactly_once_delivery is not modified" do @@ -100,23 +100,23 @@ stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.01 end - assert_equal subscriber.stream_pool.first.inventory.min_duration_per_lease_extension, 0 - subscriber.stop - subscriber.wait! + assert_equal listener.stream_pool.first.inventory.min_duration_per_lease_extension, 0 + listener.stop + listener.wait! end it "should send message to callback on receipt modack success of when exactly only delivery is enabled" do @@ -129,29 +129,29 @@ stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub + subscriber.service.mocked_subscription_admin = stub def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: if @modify_ack_deadline_requests.count == 0 return @modify_ack_deadline_requests << ["ack_ids"] end raise Google::Cloud::PermissionDeniedError.new "Test failure" end - - subscriber = subscription.listen streams: 1 do |msg| + + listener = subscriber.listen streams: 1 do |msg| called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should not send message to callback on receipt modack failure when exactly only delivery is enabled" do @@ -164,25 +164,25 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub + subscriber.service.mocked_subscription_admin = stub def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: raise Google::Cloud::PermissionDeniedError.new "Test failure" end - - subscriber = subscription.listen streams: 1 do |msg| + + listener = subscriber.listen streams: 1 do |msg| called = true end - subscriber.start + listener.start - subscriber_retries = 0 - until subscriber_retries < 120 - subscriber_retries += 1 + listener_retries = 0 + until listener_retries < 120 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! assert_equal called, false end @@ -196,25 +196,25 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: stub = StreamingPullStub.new response_groups called = false - subscription.service.mocked_subscriber = stub + subscriber.service.mocked_subscription_admin = stub def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: raise Google::Cloud::PermissionDeniedError.new "Test failure" end - - subscriber = subscription.listen streams: 1 do |msg| + + listener = subscriber.listen streams: 1 do |msg| called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.01 end - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/timed_unary_buffer_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/timed_unary_buffer_test.rb similarity index 78% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscriber/timed_unary_buffer_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/message_listener/timed_unary_buffer_test.rb index 35cc24499e05..6eb4222cb956 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/timed_unary_buffer_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/timed_unary_buffer_test.rb @@ -14,13 +14,13 @@ require "helper" -describe Google::Cloud::PubSub::Subscriber, :stream, :mock_pubsub do +describe Google::Cloud::PubSub::MessageListener, :stream, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } let(:sub_path) { sub_grpc.name } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ rec_message_hash("rec_message1-msg-goes-here", 1111) } let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ @@ -47,32 +47,32 @@ def stub.acknowledge subscription:, ack_ids: end end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.acknowledge! called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.01 end sleep 5 assert stub.acknowledge_requests.length > 1 - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should call handle error for retry mod ack on retriable error" do pull_res1 = Google::Cloud::PubSub::V1::StreamingPullResponse.new received_messages: [rec_msg1_grpc], subscription_properties: { exactly_once_delivery_enabled: true - } + } response_groups = [[pull_res1]] stub = StreamingPullStub.new response_groups @@ -89,25 +89,25 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: end end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.modify_ack_deadline! 120 called = true end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert stub.modify_ack_deadline_requests.length > 2 - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should raise other errors on modack" do @@ -127,8 +127,8 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: raise StandardError.new "Test failure" end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.modify_ack_deadline! 120 do |result| assert_kind_of Google::Cloud::PubSub::AcknowledgeResult, result, Proc.new { raise "Result kind did not match!" } assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::OTHER, Proc.new { raise "Staus did not match!" } @@ -137,23 +137,23 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: called = true end - subscriber.on_error do |error| + listener.on_error do |error| errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_empty errors, Proc.new { raise errors.first } - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should raise other errors on ack" do @@ -170,8 +170,8 @@ def stub.acknowledge subscription:, ack_ids: raise StandardError.new "Test failure" end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.acknowledge! do |result| assert_kind_of Google::Cloud::PubSub::AcknowledgeResult, result, Proc.new { raise "Result kind did not match!" } assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::OTHER, Proc.new { raise "Staus did not match!" } @@ -179,23 +179,23 @@ def stub.acknowledge subscription:, ack_ids: called = true end - subscriber.on_error do |error| + listener.on_error do |error| errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_empty errors, Proc.new { raise errors.first } - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should raise permission errors on ack" do @@ -212,8 +212,8 @@ def stub.acknowledge subscription:, ack_ids: raise Google::Cloud::PermissionDeniedError.new "Test failure" end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.acknowledge! do |result| assert_kind_of Google::Cloud::PubSub::AcknowledgeResult, result, Proc.new { raise "Result kind did not match!" } assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::PERMISSION_DENIED, Proc.new { raise "Staus did not match!" } @@ -221,23 +221,23 @@ def stub.acknowledge subscription:, ack_ids: called = true end - subscriber.on_error do |error| + listener.on_error do |error| errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_empty errors, Proc.new { raise errors.first } - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should raise permission errors on modack" do @@ -257,8 +257,8 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: raise Google::Cloud::PermissionDeniedError.new "Test failure" end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.modify_ack_deadline! 120 do |result| assert_kind_of Google::Cloud::PubSub::AcknowledgeResult, result, Proc.new { raise "Result kind did not match!" } assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::PERMISSION_DENIED, Proc.new { raise "Staus did not match!" } @@ -266,23 +266,23 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: called = true end - subscriber.on_error do |error| + listener.on_error do |error| errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_empty errors, Proc.new { raise errors.first } - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should raise failed precondition errors on ack" do @@ -299,8 +299,8 @@ def stub.acknowledge subscription:, ack_ids: raise Google::Cloud::FailedPreconditionError.new "Test failure" end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.acknowledge! do |result| assert_kind_of Google::Cloud::PubSub::AcknowledgeResult, result, Proc.new { raise "Result kind did not match!" } assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::FAILED_PRECONDITION, Proc.new { raise "Staus did not match!" } @@ -308,23 +308,23 @@ def stub.acknowledge subscription:, ack_ids: called = true end - subscriber.on_error do |error| + listener.on_error do |error| errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_empty errors, Proc.new { raise errors.first } - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should raise failed precondition errors on modack" do @@ -344,8 +344,8 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: raise Google::Cloud::FailedPreconditionError.new "Test failure" end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.modify_ack_deadline! 120 do |result| assert_kind_of Google::Cloud::PubSub::AcknowledgeResult, result, Proc.new { raise "Result kind did not match!" } assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::FAILED_PRECONDITION, Proc.new { raise "Staus did not match!" } @@ -353,23 +353,23 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: called = true end - subscriber.on_error do |error| - errors << error + listener.on_error do |error| + errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_empty errors, Proc.new { raise errors.first } - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should send success on modack" do @@ -380,11 +380,11 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: response_groups = [[pull_res1]] stub = StreamingPullStub.new response_groups - called = false + called = false errors = [] - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.modify_ack_deadline! 120 do |result| assert_kind_of Google::Cloud::PubSub::AcknowledgeResult, result, Proc.new { raise "Result kind did not match!" } assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::SUCCESS, Proc.new { raise "Staus did not match!" } @@ -392,23 +392,23 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: called = true end - subscriber.on_error do |error| + listener.on_error do |error| errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_empty errors, Proc.new { raise errors.first } - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should send success on ack" do @@ -422,8 +422,8 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: called = false errors = [] - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.acknowledge! do |result| assert_kind_of Google::Cloud::PubSub::AcknowledgeResult, result, Proc.new { raise "Result kind did not match!" } assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::SUCCESS, Proc.new { raise "Staus did not match!" } @@ -431,23 +431,23 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: called = true end - subscriber.on_error do |error| + listener.on_error do |error| errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_empty errors, Proc.new { raise errors.first } - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should retry only transient failures" do @@ -481,36 +481,36 @@ def error.error_metadata end end - subscription.service.mocked_subscriber = stub - subscriber = subscription.listen streams: 1 do |msg| + subscriber.service.mocked_subscription_admin = stub + listener = subscriber.listen streams: 1 do |msg| msg.acknowledge! called = true end - subscriber.on_error do |error| + listener.on_error do |error| errors << error end - subscriber.start + listener.start - subscriber_retries = 0 + listener_retries = 0 until called - fail "total number of calls were never made" if subscriber_retries > 120 - subscriber_retries += 1 + fail "total number of calls were never made" if listener_retries > 120 + listener_retries += 1 sleep 0.1 end sleep 5 assert_equal stub.acknowledge_requests[1][1], ["ack-id-1113"] - subscriber.stop - subscriber.wait! + listener.stop + listener.wait! end it "should parse error_metadata to give temp and permanent errors" do - mocked_subscriber = Minitest::Mock.new - mocked_subscriber.expect :callback_threads, 4 - mocked_subscriber.expect :callback_threads, 4 - buffer = Google::Cloud::PubSub::Subscriber::TimedUnaryBuffer.new mocked_subscriber + mocked_subscription_admin = Minitest::Mock.new + mocked_subscription_admin.expect :callback_threads, 4 + mocked_subscription_admin.expect :callback_threads, 4 + buffer = Google::Cloud::PubSub::MessageListener::TimedUnaryBuffer.new mocked_subscription_admin temp_error = buffer.send(:parse_error, OpenStruct.new(error_metadata: {"12" =>"PERMANENT_FAILURE_INVALID_ACK_ID", "13" => "TRANSIENT_FAILURE"})) diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/message_listener_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener_test.rb new file mode 100644 index 000000000000..2dfc2623d841 --- /dev/null +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener_test.rb @@ -0,0 +1,77 @@ +# Copyright 2017 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. + +require "helper" + +describe Google::Cloud::PubSub::MessageListener, :mock_pubsub do + let(:callback) { Proc.new { |msg| puts msg.inspect } } + let(:subscription_name) { "subscription-name-goes-here" } + let(:deadline) { 120 } + let(:streams) { 8 } + let(:max_outstanding_messages) { 2000 } + let(:callback_threads) { 16 } + let(:push_threads) { 8 } + let :listener do + Google::Cloud::PubSub::MessageListener.new( + subscription_name, + callback, + deadline: deadline, + streams: streams, + inventory: max_outstanding_messages, + threads: { + callback: callback_threads, + push: push_threads + }, + service: pubsub.service + ) + end + + it "knows its defaults" do + listener = Google::Cloud::PubSub::MessageListener.new( + subscription_name, + callback, + service: pubsub.service + ) + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 100_000_000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + _(listener.min_duration_per_lease_extension).must_equal 0 + _(listener.stream_inventory).must_equal({limit: 500, bytesize: 50000000, max_duration_per_lease_extension: 0, min_duration_per_lease_extension: 0, extension: 3600}) + _(listener.callback_threads).must_equal 8 + _(listener.push_threads).must_equal 4 + end + + it "knows its given attributes and retains defaults" do + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.callback).must_equal callback + _(listener.subscription_name).must_equal subscription_name + _(listener.deadline).must_equal deadline + _(listener.streams).must_equal streams + _(listener.max_outstanding_messages).must_equal max_outstanding_messages + _(listener.max_outstanding_bytes).must_equal 100_000_000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + _(listener.min_duration_per_lease_extension).must_equal 0 + _(listener.stream_inventory).must_equal({limit: 250, bytesize: 12500000, max_duration_per_lease_extension: 0, min_duration_per_lease_extension: 0, extension: 3600}) + _(listener.callback_threads).must_equal callback_threads + _(listener.push_threads).must_equal push_threads + + _(listener.to_s).must_equal "(subscription: subscription-name-goes-here, streams: [(inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started)])" + _(listener.stream_pool.first.to_s).must_equal "(inventory: 0, status: running, thread: not started)" + end +end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/policy_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/policy_test.rb deleted file mode 100644 index 1ef499e7fa49..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/policy_test.rb +++ /dev/null @@ -1,37 +0,0 @@ - # Copyright 2016 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. - -require "helper" - -describe Google::Cloud::PubSub::Policy, :mock_pubsub do - let(:etag) { "etag-1" } - let(:roles) { { "roles/viewer" => ["allUsers"] } } - let(:policy) { Google::Cloud::PubSub::Policy.new etag, roles } - - it "knows its etag" do - _(policy.roles).must_equal roles - end - - it "knows its roles" do - _(policy.roles.keys.sort).must_equal roles.keys.sort - _(policy.roles.values.sort).must_equal roles.values.sort - end - - it "returns an empty array for missing role" do - role = policy.role "roles/does-not-exist" - _(role).must_be_kind_of Array - _(role).must_be :empty? - _(role.frozen?).must_equal false - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/project/schemas_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/project/schemas_test.rb deleted file mode 100644 index c56e7548a9e1..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/project/schemas_test.rb +++ /dev/null @@ -1,499 +0,0 @@ -# Copyright 2021 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. - -require "helper" - -describe Google::Cloud::PubSub::Project, :schemas, :mock_pubsub do - let(:schemas_with_token) do - response = Google::Cloud::PubSub::V1::ListSchemasResponse.new schemas_hash(3, "next_page_token") - paged_enum_struct response - end - let(:schemas_without_token) do - response = Google::Cloud::PubSub::V1::ListSchemasResponse.new schemas_hash(2) - paged_enum_struct response - end - let(:schemas_with_token_2) do - response = Google::Cloud::PubSub::V1::ListSchemasResponse.new schemas_hash(3, "second_page_token") - paged_enum_struct response - end - let(:type) { :AVRO } - let(:definition) { "AVRO schema definition" } - let(:project_2) { "other-project" } - let(:project_2_path) { "projects/#{project_2}" } - - it "validates a schema" do - validate_req = Google::Cloud::PubSub::V1::Schema.new type: type, definition: definition - validate_res = Google::Cloud::PubSub::V1::ValidateSchemaResponse.new - mock = Minitest::Mock.new - mock.expect :validate_schema, validate_res, parent: project_path, schema: validate_req - pubsub.service.mocked_schemas = mock - - res = pubsub.valid_schema? type, definition - - mock.verify - - _(res).must_equal true - end - - it "validates a schema with project option" do - validate_req = Google::Cloud::PubSub::V1::Schema.new type: type, definition: definition - validate_res = Google::Cloud::PubSub::V1::ValidateSchemaResponse.new - mock = Minitest::Mock.new - mock.expect :validate_schema, validate_res, parent: project_2_path, schema: validate_req - pubsub.service.mocked_schemas = mock - - res = pubsub.valid_schema? type, definition, project: project_2 - - mock.verify - - _(res).must_equal true - end - - it "validates a schema with validate_schema alias" do - validate_req = Google::Cloud::PubSub::V1::Schema.new type: type, definition: definition - validate_res = Google::Cloud::PubSub::V1::ValidateSchemaResponse.new - mock = Minitest::Mock.new - mock.expect :validate_schema, validate_res, parent: project_path, schema: validate_req - pubsub.service.mocked_schemas = mock - - res = pubsub.validate_schema type, definition - - mock.verify - - _(res).must_equal true - end - - it "validates an invalid schema" do - stub = Object.new - def stub.validate_schema *args - raise Google::Cloud::InvalidArgumentError.new("Request contains an invalid argument.") - end - pubsub.service.mocked_schemas = stub - - res = pubsub.valid_schema? :TYPE_UNSPECIFIED, nil - - _(res).must_equal false - end - - it "creates a schema" do - new_schema_id = "new-schema-#{Time.now.to_i}" - - create_req = Google::Cloud::PubSub::V1::Schema.new type: type, definition: definition - create_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(new_schema_id) - mock = Minitest::Mock.new - mock.expect :create_schema, create_res, parent: project_path, schema: create_req, schema_id: new_schema_id - pubsub.service.mocked_schemas = mock - - schema = pubsub.create_schema new_schema_id, type, definition - - mock.verify - - _(schema.name).must_equal schema_path(new_schema_id) - _(schema.type).must_equal type - _(schema.definition).must_equal definition - end - - it "creates a schema with project option" do - new_schema_id = "new-schema-#{Time.now.to_i}" - new_schema_path = "#{project_2_path}/topics/#{new_schema_id}" - - create_req = Google::Cloud::PubSub::V1::Schema.new type: type, definition: definition - create_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(new_schema_path) - mock = Minitest::Mock.new - mock.expect :create_schema, create_res, parent: project_2_path, schema: create_req, schema_id: new_schema_id - pubsub.service.mocked_schemas = mock - - schema = pubsub.new_schema new_schema_id, type, definition, project: project_2 - - mock.verify - - _(schema.name).must_equal new_schema_path - _(schema.type).must_equal type - _(schema.definition).must_equal definition - end - - it "creates a schema with new_schema alias" do - new_schema_id = "new-schema-#{Time.now.to_i}" - - create_req = Google::Cloud::PubSub::V1::Schema.new type: type, definition: definition - create_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(new_schema_id) - mock = Minitest::Mock.new - mock.expect :create_schema, create_res, parent: project_path, schema: create_req, schema_id: new_schema_id - pubsub.service.mocked_schemas = mock - - schema = pubsub.new_schema new_schema_id, type, definition - - mock.verify - - _(schema.name).must_equal schema_path(new_schema_id) - _(schema.type).must_equal type - _(schema.definition).must_equal definition - end - - it "gets a schema" do - schema_id = "found-schema" - - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: nil) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 2 - pubsub.service.mocked_schemas = mock - - schema = pubsub.schema schema_id - - mock.verify - - _(schema.name).must_equal schema_path(schema_id) - _(schema).wont_be :reference? - _(schema).must_be :resource? - end - - it "gets a schema with fully-qualified schema path" do - schema_full_path = "projects/other-project/schemas/found-schema" - - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_full_path, definition: nil) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_full_path), view: 2 - pubsub.service.mocked_schemas = mock - - schema = pubsub.schema schema_full_path - - mock.verify - - _(schema.name).must_equal schema_full_path - end - - it "gets a schema with get_schema alias" do - schema_id = "found-schema" - - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: nil) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 2 - pubsub.service.mocked_schemas = mock - - schema = pubsub.get_schema schema_id - - mock.verify - - _(schema.name).must_equal schema_path(schema_id) - _(schema).wont_be :reference? - _(schema).must_be :resource? - end - - it "gets a schema with find_schema alias" do - schema_id = "found-schema" - - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: nil) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 2 - pubsub.service.mocked_schemas = mock - - schema = pubsub.find_schema schema_id - - mock.verify - - _(schema.name).must_equal schema_path(schema_id) - _(schema).wont_be :reference? - _(schema).must_be :resource? - end - - it "returns nil when getting an non-existent schema" do - not_found_schema_id = "not-found-schema" - - stub = Object.new - def stub.get_schema *args - raise Google::Cloud::NotFoundError.new("not found") - end - pubsub.service.mocked_schemas = stub - - schema = pubsub.schema not_found_schema_id - _(schema).must_be :nil? - end - - it "gets a schema with view option" do - schema_id = "found-schema" - - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 1 - pubsub.service.mocked_schemas = mock - - schema = pubsub.schema schema_id, view: :basic - - mock.verify - - _(schema.name).must_equal schema_path(schema_id) - _(schema).wont_be :reference? - _(schema).must_be :resource? - end - - it "gets a schema with project option" do - schema_id = "found-schema" - other_project_id = "my-other-project" - - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: "projects/#{other_project_id}/schemas/#{schema_id}", view: 2 - pubsub.service.mocked_schemas = mock - - schema = pubsub.schema schema_id, project: other_project_id - - mock.verify - - _(schema.name).must_equal schema_path(schema_id) - _(schema).wont_be :reference? - _(schema).must_be :resource? - end - - it "gets a schema with skip_lookup option" do - schema_id = "found-schema" - # No HTTP mock needed, since the lookup is not made - - schema = pubsub.schema schema_id, skip_lookup: true - _(schema.name).must_equal schema_path(schema_id) - _(schema).must_be :reference? - _(schema).wont_be :resource? - end - - it "gets a schema with skip_lookup and basic view option, then schema reloads basic view" do - schema_id = "found-schema" - - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: nil) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 1 - pubsub.service.mocked_schemas = mock - - schema = pubsub.schema schema_id, skip_lookup: true, view: :basic - _(schema.name).must_equal schema_path(schema_id) - _(schema).must_be :reference? - _(schema).wont_be :resource? - - schema.reload! - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema).must_be :resource_partial? - _(schema).wont_be :resource_full? - - mock.verify - end - - it "gets a schema with skip_lookup and full view option, then schema reloads full view" do - schema_id = "found-schema" - - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 2 - pubsub.service.mocked_schemas = mock - - schema = pubsub.schema schema_id, skip_lookup: true, view: :full - _(schema.name).must_equal schema_path(schema_id) - _(schema).must_be :reference? - _(schema).wont_be :resource? - - schema.reload! - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema).wont_be :resource_partial? - _(schema).must_be :resource_full? - - mock.verify - end - - it "lists schemas" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - pubsub.service.mocked_schemas = mock - - schemas = pubsub.schemas - - mock.verify - - _(schemas.size).must_equal 3 - end - - it "lists schemas with find_schemas alias" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - pubsub.service.mocked_schemas = mock - - schemas = pubsub.find_schemas - - mock.verify - - _(schemas.size).must_equal 3 - end - - it "lists schemas with list_schemas alias" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - pubsub.service.mocked_schemas = mock - - schemas = pubsub.list_schemas - - mock.verify - - _(schemas.size).must_equal 3 - end - - it "lists schemas with view option" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 1, page_size: nil, page_token: nil - pubsub.service.mocked_schemas = mock - - schemas = pubsub.schemas view: :basic - - mock.verify - - _(schemas.size).must_equal 3 - end - - it "paginates schemas" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - mock.expect :list_schemas, schemas_without_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_schemas = mock - - first_schemas = pubsub.schemas - second_schemas = pubsub.schemas token: first_schemas.token - - mock.verify - - _(first_schemas.size).must_equal 3 - token = first_schemas.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - - _(second_schemas.size).must_equal 2 - _(second_schemas.token).must_be :nil? - end - - it "paginates schemas with max set" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: 3, page_token: nil - pubsub.service.mocked_schemas = mock - - schemas = pubsub.schemas max: 3 - - mock.verify - - _(schemas.size).must_equal 3 - token = schemas.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - end - - it "paginates schemas with next? and next" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - mock.expect :list_schemas, schemas_without_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_schemas = mock - - first_schemas = pubsub.schemas - second_schemas = first_schemas.next - - mock.verify - - _(first_schemas.size).must_equal 3 - _(first_schemas.next?).must_equal true - - _(second_schemas.size).must_equal 2 - _(second_schemas.next?).must_equal false - end - - it "paginates schemas with next? and next and max set" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: 3, page_token: nil - mock.expect :list_schemas, schemas_without_token, parent: "projects/#{project}", view: 2, page_size: 3, page_token: "next_page_token" - pubsub.service.mocked_schemas = mock - - first_schemas = pubsub.schemas max: 3 - second_schemas = first_schemas.next - - mock.verify - - _(first_schemas.size).must_equal 3 - _(first_schemas.next?).must_equal true - - _(second_schemas.size).must_equal 2 - _(second_schemas.next?).must_equal false - end - - it "paginates schemas with all" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - mock.expect :list_schemas, schemas_without_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_schemas = mock - - schemas = pubsub.schemas.all.to_a - - mock.verify - - _(schemas.size).must_equal 5 - end - - it "paginates schemas with all and max set" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: 3, page_token: nil - mock.expect :list_schemas, schemas_without_token, parent: "projects/#{project}", view: 2, page_size: 3, page_token: "next_page_token" - pubsub.service.mocked_schemas = mock - - schemas = pubsub.schemas(max: 3).all.to_a - - mock.verify - - _(schemas.size).must_equal 5 - end - - it "iterates schemas with all using Enumerator" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - mock.expect :list_schemas, schemas_with_token_2, parent: "projects/#{project}", view: 2, page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_schemas = mock - - schemas = pubsub.schemas.all.take(5) - - mock.verify - - _(schemas.size).must_equal 5 - end - - it "iterates schemas with all and request_limit set" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - mock.expect :list_schemas, schemas_with_token_2, parent: "projects/#{project}", view: 2, page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_schemas = mock - - schemas = pubsub.schemas.all(request_limit: 1).to_a - - mock.verify - - _(schemas.size).must_equal 6 - end - - it "paginates schemas without max set" do - mock = Minitest::Mock.new - mock.expect :list_schemas, schemas_with_token, parent: "projects/#{project}", view: 2, page_size: nil, page_token: nil - pubsub.service.mocked_schemas = mock - - schemas = pubsub.schemas - - mock.verify - - _(schemas.size).must_equal 3 - token = schemas.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/project/snapshots_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/project/snapshots_test.rb deleted file mode 100644 index 3ec1bf0b0036..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/project/snapshots_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 2021 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. - -require "helper" - -describe Google::Cloud::PubSub::Project, :snapshots, :mock_pubsub do - let(:snapshots_with_token) do - response = Google::Cloud::PubSub::V1::ListSnapshotsResponse.new snapshots_hash("fake-topic", 3, "next_page_token") - paged_enum_struct response - end - let(:snapshots_without_token) do - response = Google::Cloud::PubSub::V1::ListSnapshotsResponse.new snapshots_hash("fake-topic", 2) - paged_enum_struct response - end - let(:snapshots_with_token_2) do - response = Google::Cloud::PubSub::V1::ListSnapshotsResponse.new snapshots_hash("fake-topic", 3, "second_page_token") - paged_enum_struct response - end - - it "lists snapshots" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_subscriber = mock - - snapshots = pubsub.snapshots - - mock.verify - - _(snapshots.count).must_equal 3 - snapshots.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end - - it "lists snapshots with find_snapshots alias" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_subscriber = mock - - snapshots = pubsub.find_snapshots - - mock.verify - - _(snapshots.count).must_equal 3 - snapshots.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end - - it "lists snapshots with list_snapshots alias" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_subscriber = mock - - snapshots = pubsub.list_snapshots - - mock.verify - - _(snapshots.count).must_equal 3 - snapshots.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end - - it "paginates snapshots" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_snapshots, snapshots_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - first_subs = pubsub.snapshots - second_subs = pubsub.snapshots token: first_subs.token - - mock.verify - - _(first_subs.count).must_equal 3 - token = first_subs.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - - _(second_subs.count).must_equal 2 - _(second_subs.token).must_be :nil? - end - - it "paginates snapshots with max set" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - pubsub.service.mocked_subscriber = mock - - snapshots = pubsub.snapshots max: 3 - - mock.verify - - _(snapshots.count).must_equal 3 - token = snapshots.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - end - - it "paginates snapshots with next? and next" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_snapshots, snapshots_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - first_subs = pubsub.snapshots - second_subs = first_subs.next - - mock.verify - - _(first_subs.count).must_equal 3 - _(first_subs.next?).must_equal true - first_subs.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - - _(second_subs.count).must_equal 2 - _(second_subs.next?).must_equal false - second_subs.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end - - it "paginates snapshots with next? and next and max set" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - mock.expect :list_snapshots, snapshots_without_token, project: "projects/#{project}", page_size: 3, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - first_subs = pubsub.snapshots max: 3 - second_subs = first_subs.next - - mock.verify - - _(first_subs.count).must_equal 3 - _(first_subs.next?).must_equal true - first_subs.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - - _(second_subs.count).must_equal 2 - _(second_subs.next?).must_equal false - second_subs.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end - - it "paginates snapshots with all" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_snapshots, snapshots_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - snapshots = pubsub.snapshots.all.to_a - - mock.verify - - _(snapshots.count).must_equal 5 - snapshots.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end - - it "paginates snapshots with all and max set" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - mock.expect :list_snapshots, snapshots_without_token, project: "projects/#{project}", page_size: 3, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - snapshots = pubsub.snapshots(max: 3).all.to_a - - mock.verify - - _(snapshots.count).must_equal 5 - snapshots.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end - - it "iterates snapshots with all using Enumerator" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_snapshots, snapshots_with_token_2, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - snapshots = pubsub.snapshots.all.take(5) - - mock.verify - - _(snapshots.count).must_equal 5 - snapshots.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end - - it "iterates snapshots with all and request_limit set" do - mock = Minitest::Mock.new - mock.expect :list_snapshots, snapshots_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_snapshots, snapshots_with_token_2, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - snapshots = pubsub.snapshots.all(request_limit: 1).to_a - - mock.verify - - _(snapshots.count).must_equal 6 - snapshots.each do |snapshot| - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/project/subscriptions_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/project/subscriptions_test.rb deleted file mode 100644 index 3f0afc661edf..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/project/subscriptions_test.rb +++ /dev/null @@ -1,364 +0,0 @@ -# Copyright 2021 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. - -require "helper" - -describe Google::Cloud::PubSub::Project, :subscriptions, :mock_pubsub do - let(:subscriptions_with_token) do - response = Google::Cloud::PubSub::V1::ListSubscriptionsResponse.new subscriptions_hash("fake-topic", 3, "next_page_token") - paged_enum_struct response - end - let(:subscriptions_without_token) do - response = Google::Cloud::PubSub::V1::ListSubscriptionsResponse.new subscriptions_hash("fake-topic", 2) - paged_enum_struct response - end - let(:subscriptions_with_token_2) do - response = Google::Cloud::PubSub::V1::ListSubscriptionsResponse.new subscriptions_hash("fake-topic", 3, "second_page_token") - paged_enum_struct response - end - - it "gets a subscription" do - sub_name = "found-sub-#{Time.now.to_i}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash("random-topic", sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - pubsub.service.mocked_subscriber = mock - - sub = pubsub.subscription sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal subscription_path(sub_name) - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "gets a subscription with fully-qualified subscription path" do - sub_full_path = "projects/other-project/subscriptions/found-sub-#{Time.now.to_i}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash("random-topic", sub_full_path) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: sub_full_path - pubsub.service.mocked_subscriber = mock - - sub = pubsub.subscription sub_full_path - - mock.verify - - _(sub.name).must_equal sub_full_path - end - - it "gets a subscription with get_subscription alias" do - sub_name = "found-sub-#{Time.now.to_i}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash("random-topic", sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - pubsub.service.mocked_subscriber = mock - - sub = pubsub.get_subscription sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal subscription_path(sub_name) - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "gets a subscription with find_subscription alias" do - sub_name = "found-sub-#{Time.now.to_i}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash("random-topic", sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - pubsub.service.mocked_subscriber = mock - - sub = pubsub.find_subscription sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal subscription_path(sub_name) - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "returns nil when getting an non-existent subscription" do - not_found_sub_name = "does-not-exist" - - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - pubsub.service.mocked_subscriber = stub - - sub = pubsub.subscription not_found_sub_name - _(sub).must_be :nil? - end - - it "gets a subscription with skip_lookup option" do - sub_name = "found-sub-#{Time.now.to_i}" - # No HTTP mock needed, since the lookup is not made - - sub = pubsub.subscription sub_name, skip_lookup: true - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal subscription_path(sub_name) - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - - it "gets a subscription with project option" do - sub_name = "found-sub-#{Time.now.to_i}" - sub_full_path = "projects/custom/subscriptions/#{sub_name}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash("random-topic", sub_full_path) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: sub_full_path - pubsub.service.mocked_subscriber = mock - - sub = pubsub.subscription sub_name, project: "custom" - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal sub_full_path - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "gets a subscription with skip_lookup and project options" do - sub_name = "found-sub-#{Time.now.to_i}" - # No HTTP mock needed, since the lookup is not made - - sub = pubsub.subscription sub_name, skip_lookup: true, project: "custom" - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal "projects/custom/subscriptions/#{sub_name}" - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - - it "lists subscriptions" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_subscriber = mock - - subs = pubsub.subscriptions - - mock.verify - - _(subs.count).must_equal 3 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - end - - it "lists subscriptions with find_subscriptions alias" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_subscriber = mock - - subs = pubsub.find_subscriptions - - mock.verify - - _(subs.count).must_equal 3 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - end - - it "lists subscriptions with list_subscriptions alias" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_subscriber = mock - - subs = pubsub.list_subscriptions - - mock.verify - - _(subs.count).must_equal 3 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - end - - it "paginates subscriptions" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_subscriptions, subscriptions_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - first_subs = pubsub.subscriptions - second_subs = pubsub.subscriptions token: first_subs.token - - mock.verify - - _(first_subs.count).must_equal 3 - token = first_subs.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - - _(second_subs.count).must_equal 2 - _(second_subs.token).must_be :nil? - end - - it "paginates subscriptions with max set" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - pubsub.service.mocked_subscriber = mock - - subs = pubsub.subscriptions max: 3 - - mock.verify - - _(subs.count).must_equal 3 - token = subs.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - end - - it "paginates subscriptions with next? and next" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_subscriptions, subscriptions_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - first_subs = pubsub.subscriptions - second_subs = first_subs.next - - mock.verify - - _(first_subs.count).must_equal 3 - _(first_subs.next?).must_equal true - first_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - _(second_subs.count).must_equal 2 - _(second_subs.next?).must_equal false - second_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - end - - it "paginates subscriptions with next? and next and max set" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - mock.expect :list_subscriptions, subscriptions_without_token, project: "projects/#{project}", page_size: 3, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - first_subs = pubsub.subscriptions max: 3 - second_subs = first_subs.next - - mock.verify - - _(first_subs.count).must_equal 3 - _(first_subs.next?).must_equal true - first_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - _(second_subs.count).must_equal 2 - _(second_subs.next?).must_equal false - second_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - end - - it "paginates subscriptions with all" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_subscriptions, subscriptions_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - subs = pubsub.subscriptions.all.to_a - - mock.verify - - _(subs.count).must_equal 5 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - end - - it "paginates subscriptions with all and max set" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - mock.expect :list_subscriptions, subscriptions_without_token, project: "projects/#{project}", page_size: 3, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - subs = pubsub.subscriptions(max: 3).all.to_a - - mock.verify - - _(subs.count).must_equal 5 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - end - - it "iterates subscriptions with all using Enumerator" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_subscriptions, subscriptions_with_token_2, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - subs = pubsub.subscriptions.all.take(5) - - mock.verify - - _(subs.count).must_equal 5 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - end - - it "iterates subscriptions with all and request_limit set" do - mock = Minitest::Mock.new - mock.expect :list_subscriptions, subscriptions_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_subscriptions, subscriptions_with_token_2, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_subscriber = mock - - subs = pubsub.subscriptions.all(request_limit: 1).to_a - - mock.verify - - _(subs.count).must_equal 6 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/project/topics_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/project/topics_test.rb deleted file mode 100644 index b685de1b811f..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/project/topics_test.rb +++ /dev/null @@ -1,620 +0,0 @@ -# Copyright 2021 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. - -require "helper" - -describe Google::Cloud::PubSub::Project, :topics, :mock_pubsub do - let(:topics_with_token) do - response = Google::Cloud::PubSub::V1::ListTopicsResponse.new topics_hash(3, "next_page_token") - paged_enum_struct response - end - let(:topics_without_token) do - response = Google::Cloud::PubSub::V1::ListTopicsResponse.new topics_hash(2) - paged_enum_struct response - end - let(:topics_with_token_2) do - response = Google::Cloud::PubSub::V1::ListTopicsResponse.new topics_hash(3, "second_page_token") - paged_enum_struct response - end - let(:labels) { { "foo" => "bar" } } - let(:kms_key) { "projects/a/locations/b/keyRings/c/cryptoKeys/d" } - let(:persistence_regions) { ["us-west1", "us-west2"] } - let(:schema_name) { "my-schema" } - let(:message_encoding) { :JSON } - let(:retention) { 600 } - let(:async) do - { - max_bytes: 2_000_000, - max_messages: 200, - interval: 0.02, - compress: true, - compression_bytes_threshold: 140, - threads: { - publish: 3, - callback: 5 - }, - flow_control: { - message_limit: 4_000, - byte_limit: 40_000_000, - limit_exceeded_behavior: :block - } - } - end - - it "creates a topic" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name) - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), labels: nil, kms_key_name: nil, message_storage_policy: nil, schema_settings: nil, message_retention_duration: nil, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_name - - mock.verify - - _(topic.name).must_equal topic_path(new_topic_name) - _(topic.labels).must_be :empty? - _(topic.labels).must_be :frozen? - _(topic.kms_key).must_be :empty? - _(topic.persistence_regions).must_be :empty? - _(topic.schema_name).must_be :nil? - _(topic.message_encoding).must_be :nil? - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal false - _(topic.retention).must_be :nil? - end - - it "creates a topic with fully-qualified topic path" do - new_topic_path = "projects/other-project/topics/new-topic-#{Time.now.to_i}" - - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_path) - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: new_topic_path, labels: nil, kms_key_name: nil, message_storage_policy: nil, schema_settings: nil, message_retention_duration: nil, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_path - - mock.verify - - _(topic.name).must_equal new_topic_path - end - - it "creates a topic with new_topic_alias" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name) - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), labels: nil, kms_key_name: nil, message_storage_policy: nil, schema_settings: nil, message_retention_duration: nil, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.new_topic new_topic_name - - mock.verify - - _(topic.name).must_equal topic_path(new_topic_name) - _(topic.labels).must_be :empty? - _(topic.labels).must_be :frozen? - _(topic.kms_key).must_be :empty? - _(topic.persistence_regions).must_be :empty? - _(topic.schema_name).must_be :nil? - _(topic.message_encoding).must_be :nil? - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal false - _(topic.retention).must_be :nil? - end - - it "creates a topic with labels" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name, labels: labels) - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), labels: labels, kms_key_name: nil, message_storage_policy: nil, schema_settings: nil, message_retention_duration: nil, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_name, labels: labels - - mock.verify - - _(topic.name).must_equal topic_path(new_topic_name) - _(topic.labels).must_equal labels - _(topic.labels).must_be :frozen? - _(topic.kms_key).must_be :empty? - _(topic.persistence_regions).must_be :empty? - _(topic.schema_name).must_be :nil? - _(topic.message_encoding).must_be :nil? - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal false - _(topic.retention).must_be :nil? - end - - it "creates a topic with kms_key" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name, kms_key_name: kms_key) - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), labels: nil, kms_key_name: kms_key, message_storage_policy: nil, schema_settings: nil, message_retention_duration: nil, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_name, kms_key: kms_key - - mock.verify - - _(topic.name).must_equal topic_path(new_topic_name) - _(topic.labels).must_be :empty? - _(topic.labels).must_be :frozen? - _(topic.kms_key).must_equal kms_key - _(topic.persistence_regions).must_be :empty? - _(topic.schema_name).must_be :nil? - _(topic.message_encoding).must_be :nil? - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal false - _(topic.retention).must_be :nil? - end - - it "creates a topic with persistence_regions" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name, persistence_regions: persistence_regions) - mock = Minitest::Mock.new - message_storage_policy = Google::Cloud::PubSub::V1::MessageStoragePolicy.new allowed_persistence_regions: persistence_regions - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), labels: nil, kms_key_name: nil, message_storage_policy: message_storage_policy, schema_settings: nil, message_retention_duration: nil, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_name, persistence_regions: persistence_regions - - mock.verify - - _(topic.name).must_equal topic_path(new_topic_name) - _(topic.labels).must_be :empty? - _(topic.labels).must_be :frozen? - _(topic.kms_key).must_be :empty? - _(topic.persistence_regions).must_equal persistence_regions - _(topic.schema_name).must_be :nil? - _(topic.message_encoding).must_be :nil? - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal false - _(topic.retention).must_be :nil? - end - - it "creates a topic with schema_name and message_encoding" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - schema_settings = Google::Cloud::PubSub::V1::SchemaSettings.new schema: schema_path(schema_name), encoding: message_encoding - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name) - create_res.schema_settings = schema_settings - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), labels: nil, kms_key_name: nil, message_storage_policy: nil, schema_settings: schema_settings, message_retention_duration: nil, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_name, schema_name: schema_name, message_encoding: message_encoding - - mock.verify - - _(topic.name).must_equal topic_path(new_topic_name) - _(topic.labels).must_be :empty? - _(topic.labels).must_be :frozen? - _(topic.kms_key).must_be :empty? - _(topic.schema_name).must_equal schema_path(schema_name) - _(topic.message_encoding).must_equal message_encoding - _(topic.retention).must_be :nil? - end - - it "creates a topic with retention" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - duration = Google::Protobuf::Duration.new seconds: retention, nanos: 0 - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name) - create_res.message_retention_duration = duration - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), labels: nil, kms_key_name: nil, message_storage_policy: nil, schema_settings: nil, message_retention_duration: duration, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_name, retention: retention - - mock.verify - - _(topic.name).must_equal topic_path(new_topic_name) - _(topic.labels).must_be :empty? - _(topic.labels).must_be :frozen? - _(topic.kms_key).must_be :empty? - _(topic.persistence_regions).must_be :empty? - _(topic.schema_name).must_be :nil? - _(topic.message_encoding).must_be :nil? - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal false - _(topic.retention).must_equal retention - end - - it "creates a topic with ingestion_data_source_settings" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - ingestion_data_source_settings = Google::Cloud::PubSub::V1::IngestionDataSourceSettings.new - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name) - create_res.ingestion_data_source_settings = ingestion_data_source_settings - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), - labels: nil, - kms_key_name: nil, - message_storage_policy: nil, - schema_settings: nil, - message_retention_duration: nil, - ingestion_data_source_settings: ingestion_data_source_settings - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_name, ingestion_data_source_settings: ingestion_data_source_settings - - mock.verify - - _(topic.name).must_equal topic_path(new_topic_name) - _(topic.labels).must_be :empty? - _(topic.labels).must_be :frozen? - _(topic.kms_key).must_be :empty? - _(topic.persistence_regions).must_be :empty? - _(topic.schema_name).must_be :nil? - _(topic.message_encoding).must_be :nil? - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal false - end - - it "creates a topic with async option" do - new_topic_name = "new-topic-#{Time.now.to_i}" - - create_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(new_topic_name) - mock = Minitest::Mock.new - mock.expect :create_topic, create_res, name: topic_path(new_topic_name), labels: nil, kms_key_name: nil, message_storage_policy: nil, schema_settings: nil, message_retention_duration: nil, ingestion_data_source_settings: nil - pubsub.service.mocked_publisher = mock - - topic = pubsub.create_topic new_topic_name, async: async - topic.enable_message_ordering! # Create the AsyncPublisher - - mock.verify - - _(topic.async_publisher.topic_name).must_equal topic_path(new_topic_name) - _(topic.async_publisher.max_bytes).must_equal async[:max_bytes] - _(topic.async_publisher.max_messages).must_equal async[:max_messages] - _(topic.async_publisher.interval).must_equal async[:interval] - _(topic.async_publisher.publish_threads).must_equal async[:threads][:publish] - _(topic.async_publisher.callback_threads).must_equal async[:threads][:callback] - _(topic.async_publisher.flow_control).must_equal async[:flow_control] - _(topic.async_publisher.compress).must_equal async[:compress] - _(topic.async_publisher.compression_bytes_threshold).must_equal async[:compression_bytes_threshold] - end - - it "raises when creating a topic with schema_name but without message_encoding" do - err = expect do - topic = pubsub.create_topic "new-topic", schema_name: schema_name - end.must_raise ArgumentError - _(err.message).must_equal "Schema settings must include both schema_name and message_encoding." - end - - it "raises when creating a topic without schema_name but with message_encoding" do - err = expect do - topic = pubsub.create_topic "new-topic", message_encoding: message_encoding - end.must_raise ArgumentError - _(err.message).must_equal "Schema settings must include both schema_name and message_encoding." - end - - it "gets a topic" do - topic_name = "found-topic" - - get_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name) - mock = Minitest::Mock.new - mock.expect :get_topic, get_res, topic: topic_path(topic_name) - pubsub.service.mocked_publisher = mock - - topic = pubsub.topic topic_name - - mock.verify - - _(topic.name).must_equal topic_path(topic_name) - _(topic).wont_be :reference? - _(topic).must_be :resource? - end - - it "gets a topic with fully-qualified topic path" do - topic_full_path = "projects/other-project/topics/found-topic" - - get_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_full_path) - mock = Minitest::Mock.new - mock.expect :get_topic, get_res, topic: topic_path(topic_full_path) - pubsub.service.mocked_publisher = mock - - topic = pubsub.topic topic_full_path - - mock.verify - - _(topic.name).must_equal topic_full_path - end - - it "gets a topic with get_topic alias" do - topic_name = "found-topic" - - get_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name) - mock = Minitest::Mock.new - mock.expect :get_topic, get_res, topic: topic_path(topic_name) - pubsub.service.mocked_publisher = mock - - topic = pubsub.get_topic topic_name - - mock.verify - - _(topic.name).must_equal topic_path(topic_name) - _(topic).wont_be :reference? - _(topic).must_be :resource? - end - - it "gets a topic with find_topic alias" do - topic_name = "found-topic" - - get_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name) - mock = Minitest::Mock.new - mock.expect :get_topic, get_res, topic: topic_path(topic_name) - pubsub.service.mocked_publisher = mock - - topic = pubsub.find_topic topic_name - - mock.verify - - _(topic.name).must_equal topic_path(topic_name) - _(topic).wont_be :reference? - _(topic).must_be :resource? - end - - it "returns nil when getting an non-existent topic" do - not_found_topic_name = "not-found-topic" - - stub = Object.new - def stub.get_topic *args - raise Google::Cloud::NotFoundError.new("not found") - end - pubsub.service.mocked_publisher = stub - - topic = pubsub.find_topic not_found_topic_name - _(topic).must_be :nil? - end - - it "gets a topic with skip_lookup option" do - topic_name = "found-topic" - # No HTTP mock needed, since the lookup is not made - - topic = pubsub.find_topic topic_name, skip_lookup: true - _(topic.name).must_equal topic_path(topic_name) - _(topic).must_be :reference? - _(topic).wont_be :resource? - end - - it "gets a topic with project option" do - topic_name = "found-topic" - topic_full_path = "projects/custom/topics/found-topic" - - get_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_full_path) - mock = Minitest::Mock.new - mock.expect :get_topic, get_res, topic: topic_full_path - pubsub.service.mocked_publisher = mock - - topic = pubsub.find_topic topic_name, project: "custom" - _(topic.name).must_equal topic_full_path - _(topic).wont_be :reference? - _(topic).must_be :resource? - end - - it "gets a topic with skip_lookup and project options" do - topic_name = "found-topic" - # No HTTP mock needed, since the lookup is not made - - topic = pubsub.find_topic topic_name, skip_lookup: true, project: "custom" - _(topic.name).must_equal "projects/custom/topics/found-topic" - _(topic).must_be :reference? - _(topic).wont_be :resource? - end - - it "gets a topic with async option" do - topic_name = "found-topic" - - get_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name) - mock = Minitest::Mock.new - mock.expect :get_topic, get_res, topic: topic_path(topic_name) - pubsub.service.mocked_publisher = mock - - topic = pubsub.topic topic_name, async: async - topic.enable_message_ordering! # Create the AsyncPublisher - - mock.verify - - _(topic.async_publisher.topic_name).must_equal topic_path(topic_name) - _(topic.async_publisher.max_bytes).must_equal async[:max_bytes] - _(topic.async_publisher.max_messages).must_equal async[:max_messages] - _(topic.async_publisher.interval).must_equal async[:interval] - _(topic.async_publisher.publish_threads).must_equal async[:threads][:publish] - _(topic.async_publisher.callback_threads).must_equal async[:threads][:callback] - _(topic.async_publisher.flow_control).must_equal async[:flow_control] - _(topic.async_publisher.compress).must_equal async[:compress] - _(topic.async_publisher.compression_bytes_threshold).must_equal async[:compression_bytes_threshold] - end - - it "lists topics" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_publisher = mock - - topics = pubsub.topics - - mock.verify - - _(topics.size).must_equal 3 - end - - it "lists topics with find_topics alias" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_publisher = mock - - topics = pubsub.find_topics - - mock.verify - - _(topics.size).must_equal 3 - end - - it "lists topics with list_topics alias" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_publisher = mock - - topics = pubsub.list_topics - - mock.verify - - _(topics.size).must_equal 3 - end - - it "paginates topics" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_topics, topics_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_publisher = mock - - first_topics = pubsub.topics - second_topics = pubsub.topics token: first_topics.token - - mock.verify - - _(first_topics.size).must_equal 3 - token = first_topics.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - - _(second_topics.size).must_equal 2 - _(second_topics.token).must_be :nil? - end - - it "paginates topics with max set" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - pubsub.service.mocked_publisher = mock - - topics = pubsub.topics max: 3 - - mock.verify - - _(topics.size).must_equal 3 - token = topics.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - end - - it "paginates topics with next? and next" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_topics, topics_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_publisher = mock - - first_topics = pubsub.topics - second_topics = first_topics.next - - mock.verify - - _(first_topics.size).must_equal 3 - _(first_topics.next?).must_equal true - - _(second_topics.size).must_equal 2 - _(second_topics.next?).must_equal false - end - - it "paginates topics with next? and next and max set" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - mock.expect :list_topics, topics_without_token, project: "projects/#{project}", page_size: 3, page_token: "next_page_token" - pubsub.service.mocked_publisher = mock - - first_topics = pubsub.topics max: 3 - second_topics = first_topics.next - - mock.verify - - _(first_topics.size).must_equal 3 - _(first_topics.next?).must_equal true - - _(second_topics.size).must_equal 2 - _(second_topics.next?).must_equal false - end - - it "paginates topics with all" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_topics, topics_without_token, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_publisher = mock - - topics = pubsub.topics.all.to_a - - mock.verify - - _(topics.size).must_equal 5 - end - - it "paginates topics with all and max set" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: 3, page_token: nil - mock.expect :list_topics, topics_without_token, project: "projects/#{project}", page_size: 3, page_token: "next_page_token" - pubsub.service.mocked_publisher = mock - - topics = pubsub.topics(max: 3).all.to_a - - mock.verify - - _(topics.size).must_equal 5 - end - - it "iterates topics with all using Enumerator" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_topics, topics_with_token_2, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_publisher = mock - - topics = pubsub.topics.all.take(5) - - mock.verify - - _(topics.size).must_equal 5 - end - - it "iterates topics with all and request_limit set" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - mock.expect :list_topics, topics_with_token_2, project: "projects/#{project}", page_size: nil, page_token: "next_page_token" - pubsub.service.mocked_publisher = mock - - topics = pubsub.topics.all(request_limit: 1).to_a - - mock.verify - - _(topics.size).must_equal 6 - end - - it "paginates topics without max set" do - mock = Minitest::Mock.new - mock.expect :list_topics, topics_with_token, project: "projects/#{project}", page_size: nil, page_token: nil - pubsub.service.mocked_publisher = mock - - topics = pubsub.topics - - mock.verify - - _(topics.size).must_equal 3 - token = topics.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/project_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/project_test.rb deleted file mode 100644 index 171ff47802c7..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/project_test.rb +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2014 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. - -require "helper" - -describe Google::Cloud::PubSub::Project, :mock_pubsub do - it "knows the project identifier" do - _(pubsub.project).must_equal project - end - - it "creates topic with async options when skip_lookup enabled" do - topic = pubsub.topic("test", skip_lookup: true, async: { interval: 1, compress: true, compression_bytes_threshold: 140 }) - topic.publish_async("{}") - _(topic.async_publisher.instance_variable_get("@interval")).must_equal 1 - _(topic.async_publisher.instance_variable_get("@compress")).must_equal true - _(topic.async_publisher.instance_variable_get("@compression_bytes_threshold")).must_equal 140 - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/message_ordering_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/message_ordering_test.rb similarity index 86% rename from google-cloud-pubsub/test/google/cloud/pubsub/topic/message_ordering_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/publisher/message_ordering_test.rb index 7a3b7c753a7e..2953e9ba8aa8 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/message_ordering_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/message_ordering_test.rb @@ -14,9 +14,9 @@ require "helper" -describe Google::Cloud::PubSub::Topic, :publish, :mock_pubsub do +describe Google::Cloud::PubSub::Publisher, :publish, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } + let(:publisher) { Google::Cloud::PubSub::Publisher.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } let(:message1) { "new-message-here" } let(:message2) { "second-new-message" } let(:message3) { "third-new-message" } @@ -35,9 +35,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msg = topic.publish message1, ordering_key: ordering_key + msg = publisher.publish message1, ordering_key: ordering_key mock.verify @@ -55,9 +55,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msg = topic.publish message1, format: :text, ordering_key: ordering_key + msg = publisher.publish message1, format: :text, ordering_key: ordering_key mock.verify @@ -78,9 +78,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msgs = topic.publish do |batch| + msgs = publisher.publish do |batch| batch.publish message1, ordering_key: ordering_key batch.publish message2, ordering_key: ordering_key batch.publish message3, ordering_key: ordering_key, format: :none diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/ordered_messages_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/ordered_messages_test.rb similarity index 52% rename from google-cloud-pubsub/test/google/cloud/pubsub/topic/ordered_messages_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/publisher/ordered_messages_test.rb index c1c498bfa675..34911985b1e1 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/ordered_messages_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/ordered_messages_test.rb @@ -14,12 +14,12 @@ require "helper" -describe Google::Cloud::PubSub::Topic, :publish_async, :ordered_messages, :mock_pubsub do +describe Google::Cloud::PubSub::Publisher, :publish_async, :ordered_messages, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:topic_grpc) { Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)) } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc topic_grpc, pubsub.service, async: { interval: 10 } } - let(:topic_low_max_messages) do - Google::Cloud::PubSub::Topic.from_grpc topic_grpc, pubsub.service, async: { max_messages: 100, interval: 30 } + let(:publisher) { Google::Cloud::PubSub::Publisher.from_grpc topic_grpc, pubsub.service, async: { interval: 10 } } + let(:publisher_low_max_messages) do + Google::Cloud::PubSub::Publisher.from_grpc topic_grpc, pubsub.service, async: { max_messages: 100, interval: 30 } end let(:fixture_file_path) { File.expand_path File.join __dir__, "../../../../conformance/ordered_messages.json" } @@ -27,25 +27,25 @@ let(:fixture_expected_hash) { Hash[fixture[:expected].map { |exp| [exp[:key], exp[:messages]] }] } it "publishes messages with ordering_key" do - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - topic.enable_message_ordering! - assert topic.message_ordering? + publisher.enable_message_ordering! + assert publisher.message_ordering? fixture[:input].each do |msg| - topic.publish_async msg[:message], ordering_key: msg[:key] + publisher.publish_async msg[:message], ordering_key: msg[:key] end - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -54,27 +54,27 @@ end it "publishes messages with ordering_key and callback" do - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - topic.enable_message_ordering! - assert topic.message_ordering? + publisher.enable_message_ordering! + assert publisher.message_ordering? fixture[:input].each do |msg| - topic.publish_async msg[:message], ordering_key: msg[:key] do |publish_result| + publisher.publish_async msg[:message], ordering_key: msg[:key] do |publish_result| raise publish_result.error if publish_result.failed? end end - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -83,29 +83,29 @@ end it "publishes messages with ordering_key provided only when needed" do - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - topic.enable_message_ordering! - assert topic.message_ordering? + publisher.enable_message_ordering! + assert publisher.message_ordering? fixture[:input].each do |msg| if msg[:key].empty? - topic.publish_async msg[:message] + publisher.publish_async msg[:message] else - topic.publish_async msg[:message], ordering_key: msg[:key] + publisher.publish_async msg[:message], ordering_key: msg[:key] end end - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -114,25 +114,25 @@ end it "publishes messages with ordering_key in reverse order" do - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - topic.enable_message_ordering! - assert topic.message_ordering? + publisher.enable_message_ordering! + assert publisher.message_ordering? fixture[:input].reverse.each do |msg| - topic.publish_async msg[:message], ordering_key: msg[:key] + publisher.publish_async msg[:message], ordering_key: msg[:key] end - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -141,27 +141,27 @@ end it "publishes messages with ordering_key with a low max_messages" do - topic_low_max_messages.service.mocked_publisher = AsyncPublisherStub.new + publisher_low_max_messages.service.mocked_topic_admin = AsyncPublisherStub.new - topic_low_max_messages.enable_message_ordering! - assert topic_low_max_messages.message_ordering? - _(topic_low_max_messages.async_publisher.max_messages).must_equal 100 - _(topic_low_max_messages.async_publisher.interval).must_equal 30 + publisher_low_max_messages.enable_message_ordering! + assert publisher_low_max_messages.message_ordering? + _(publisher_low_max_messages.async_publisher.max_messages).must_equal 100 + _(publisher_low_max_messages.async_publisher.interval).must_equal 30 fixture[:input].each do |msg| - topic_low_max_messages.publish_async msg[:message], ordering_key: msg[:key] + publisher_low_max_messages.publish_async msg[:message], ordering_key: msg[:key] end - _(topic_low_max_messages.async_publisher).must_be :started? - _(topic_low_max_messages.async_publisher).wont_be :stopped? + _(publisher_low_max_messages.async_publisher).must_be :started? + _(publisher_low_max_messages.async_publisher).wont_be :stopped? # force the queued messages to be published - topic_low_max_messages.async_publisher.stop! + publisher_low_max_messages.async_publisher.stop! - _(topic_low_max_messages.async_publisher).wont_be :started? - _(topic_low_max_messages.async_publisher).must_be :stopped? + _(publisher_low_max_messages.async_publisher).wont_be :started? + _(publisher_low_max_messages.async_publisher).must_be :stopped? - published_messages_hash = topic_low_max_messages.service.mocked_publisher.message_hash + published_messages_hash = publisher_low_max_messages.service.mocked_topic_admin.message_hash assert_equal fixture_expected_hash.keys.sort, published_messages_hash.keys.sort fixture_expected_hash.each do |key, messages| assert_equal messages.count, published_messages_hash[key].count, "Message count for #{key} is incorrect" @@ -170,10 +170,10 @@ end it "raises when ordered messages is not yet enabled" do - refute topic_low_max_messages.message_ordering? + refute publisher_low_max_messages.message_ordering? assert_raises Google::Cloud::PubSub::OrderedMessagesDisabled do - topic_low_max_messages.publish_async "ordered message", ordering_key: "123" + publisher_low_max_messages.publish_async "ordered message", ordering_key: "123" end end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/publish_async_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_async_test.rb similarity index 50% rename from google-cloud-pubsub/test/google/cloud/pubsub/topic/publish_async_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_async_test.rb index f8cc9c936b1b..c97ab4ef098a 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/publish_async_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_async_test.rb @@ -14,34 +14,34 @@ require "helper" -describe Google::Cloud::PubSub::Topic, :publish_async, :mock_pubsub do +describe Google::Cloud::PubSub::Publisher, :publish_async, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } + let(:publisher) { Google::Cloud::PubSub::Publisher.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } it "publishes a message" do - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - _(topic.async_publisher).must_be :nil? + _(publisher.async_publisher).must_be :nil? - topic.publish_async "async-message" + publisher.publish_async "async-message" - _(topic.async_publisher).wont_be :nil? + _(publisher.async_publisher).wont_be :nil? - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? expected_messages_hash = { "" => [ Google::Cloud::PubSub::V1::PubsubMessage.new(data: "async-message".encode(Encoding::ASCII_8BIT)) ] } - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal expected_messages_hash, published_messages_hash end @@ -51,29 +51,29 @@ ] callback_called = false - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - _(topic.async_publisher).must_be :nil? + _(publisher.async_publisher).must_be :nil? - topic.publish_async "async-message" do |result| + publisher.publish_async "async-message" do |result| assert_kind_of Google::Cloud::PubSub::PublishResult, result assert result.succeeded? assert_equal "msg0", result.msg_id callback_called = true end - _(topic.async_publisher).wont_be :nil? + _(publisher.async_publisher).wont_be :nil? - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash expected_messages_hash = { "" => messages } assert_equal expected_messages_hash, published_messages_hash _(callback_called).must_equal true @@ -87,32 +87,32 @@ ] callbacks_called = 0 - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - _(topic.async_publisher).must_be :nil? + _(publisher.async_publisher).must_be :nil? - topic.publish_async "async-message 0" do |result| + publisher.publish_async "async-message 0" do |result| assert_equal "msg0", result.msg_id mutex.synchronize { callbacks_called += 1 } end - topic.publish_async "async-message 1" do |result| + publisher.publish_async "async-message 1" do |result| assert_equal "msg1", result.msg_id mutex.synchronize { callbacks_called += 1 } end - _(topic.async_publisher).wont_be :nil? + _(publisher.async_publisher).wont_be :nil? - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash expected_messages_hash = { "" => messages } assert_equal expected_messages_hash, published_messages_hash _(callbacks_called).must_equal 2 @@ -121,11 +121,11 @@ it "publishes a message with multibyte characters" do callback_called = false - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - _(topic.async_publisher).must_be :nil? + _(publisher.async_publisher).must_be :nil? - topic.publish_async "あ" do |result| + publisher.publish_async "あ" do |result| assert_kind_of Google::Cloud::PubSub::PublishResult, result assert result.succeeded? assert_equal "msg0", result.msg_id @@ -133,23 +133,23 @@ callback_called = true end - _(topic.async_publisher).wont_be :nil? + _(publisher.async_publisher).wont_be :nil? - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? expected_messages_hash = { "" => [ Google::Cloud::PubSub::V1::PubsubMessage.new(data: "\xE3\x81\x82".force_encoding(Encoding::ASCII_8BIT), message_id: "msg0") ] } - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal expected_messages_hash, published_messages_hash _(callback_called).must_equal true end @@ -157,16 +157,16 @@ it "publishes a message using an IO-ish object" do callback_called = false - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - _(topic.async_publisher).must_be :nil? + _(publisher.async_publisher).must_be :nil? Tempfile.open ["message", "txt"] do |tmpfile| tmpfile.binmode tmpfile.write "あ" tmpfile.rewind - topic.publish_async tmpfile do |result| + publisher.publish_async tmpfile do |result| assert_kind_of Google::Cloud::PubSub::PublishResult, result assert result.succeeded? assert_equal "msg0", result.msg_id @@ -175,23 +175,23 @@ end end - _(topic.async_publisher).wont_be :nil? + _(publisher.async_publisher).wont_be :nil? - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? expected_messages_hash = { "" => [ Google::Cloud::PubSub::V1::PubsubMessage.new(data: "\xE3\x81\x82".force_encoding(Encoding::ASCII_8BIT), message_id: "msg0") ] } - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal expected_messages_hash, published_messages_hash _(callback_called).must_equal true end @@ -199,11 +199,11 @@ it "publishes a message with attributes" do callback_called = false - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - _(topic.async_publisher).must_be :nil? + _(publisher.async_publisher).must_be :nil? - topic.publish_async "async-message", format: :text do |result| + publisher.publish_async "async-message", format: :text do |result| assert_kind_of Google::Cloud::PubSub::PublishResult, result assert result.succeeded? assert_equal "msg0", result.msg_id @@ -212,67 +212,66 @@ callback_called = true end - _(topic.async_publisher).wont_be :nil? + _(publisher.async_publisher).wont_be :nil? - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? expected_messages_hash = { "" => [ Google::Cloud::PubSub::V1::PubsubMessage.new(data: "async-message".encode(Encoding::ASCII_8BIT), attributes: {"format" => "text"}, message_id: "msg0") ] } - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal expected_messages_hash, published_messages_hash _(callback_called).must_equal true end describe "reference topic that exists" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, - pubsub.service, - autocreate: false } + let(:publisher) { Google::Cloud::PubSub::Publisher.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), + pubsub.service } it "publishes a message" do - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - _(topic.async_publisher).must_be :nil? + _(publisher.async_publisher).must_be :nil? - topic.publish_async "async-message" + publisher.publish_async "async-message" - _(topic.async_publisher).wont_be :nil? + _(publisher.async_publisher).wont_be :nil? - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? expected_messages_hash = { "" => [ Google::Cloud::PubSub::V1::PubsubMessage.new(data: "async-message".encode(Encoding::ASCII_8BIT)) ] } - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal expected_messages_hash, published_messages_hash end it "publishes a message with attributes" do callback_called = false - topic.service.mocked_publisher = AsyncPublisherStub.new + publisher.service.mocked_topic_admin = AsyncPublisherStub.new - _(topic.async_publisher).must_be :nil? + _(publisher.async_publisher).must_be :nil? - topic.publish_async "async-message", format: :text do |result| + publisher.publish_async "async-message", format: :text do |result| assert_kind_of Google::Cloud::PubSub::PublishResult, result assert result.succeeded? assert_equal "msg0", result.msg_id @@ -281,67 +280,25 @@ callback_called = true end - _(topic.async_publisher).wont_be :nil? + _(publisher.async_publisher).wont_be :nil? - _(topic.async_publisher).must_be :started? - _(topic.async_publisher).wont_be :stopped? + _(publisher.async_publisher).must_be :started? + _(publisher.async_publisher).wont_be :stopped? # force the queued messages to be published - topic.async_publisher.stop! + publisher.async_publisher.stop! - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? + _(publisher.async_publisher).wont_be :started? + _(publisher.async_publisher).must_be :stopped? expected_messages_hash = { "" => [ Google::Cloud::PubSub::V1::PubsubMessage.new(data: "async-message".encode(Encoding::ASCII_8BIT), attributes: { "format" => "text" }, message_id: "msg0") ] } - published_messages_hash = topic.service.mocked_publisher.message_hash + published_messages_hash = publisher.service.mocked_topic_admin.message_hash assert_equal expected_messages_hash, published_messages_hash _(callback_called).must_equal true end end - - describe "reference topic that does not exist" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, - pubsub.service, - autocreate: false } - - it "publishes a message" do - messages = [ - Google::Cloud::PubSub::V1::PubsubMessage.new(data: "async-message".encode(Encoding::ASCII_8BIT)) - ] - - stub = Object.new - def stub.publish *args - raise Google::Cloud::NotFoundError.new("not found") - end - pubsub.service.mocked_publisher = stub - - _(topic.async_publisher).must_be :nil? - - callback_called = false - - topic.publish_async "async-message" do |result| - assert_kind_of Google::Cloud::PubSub::PublishResult, result - refute result.succeeded? - assert result.failed? - assert_equal "async-message".force_encoding(Encoding::ASCII_8BIT), result.data - assert_kind_of Google::Cloud::NotFoundError, result.error - callback_called = true - end - - _(topic.async_publisher).wont_be :nil? - - # force the queued messages to be published - topic.async_publisher.stop! - - _(topic.async_publisher).wont_be :started? - _(topic.async_publisher).must_be :stopped? - - _(topic.async_publisher.batch).must_be :nil? - _(callback_called).must_equal true - end - end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/publish_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_test.rb similarity index 84% rename from google-cloud-pubsub/test/google/cloud/pubsub/topic/publish_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_test.rb index 09e1c281801a..90b2cbd29594 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/publish_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_test.rb @@ -14,9 +14,9 @@ require "helper" -describe Google::Cloud::PubSub::Topic, :publish, :mock_pubsub do +describe Google::Cloud::PubSub::Publisher, :publish, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } + let(:publisher) { Google::Cloud::PubSub::Publisher.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } let(:message1) { "new-message-here" } let(:message2) { "second-new-message" } let(:message3) { "third-new-message" } @@ -34,9 +34,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msg = topic.publish message1 + msg = publisher.publish message1 mock.verify @@ -54,9 +54,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msg = topic.publish "あ" + msg = publisher.publish "あ" mock.verify @@ -75,7 +75,7 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock msg = nil Tempfile.open ["message", "txt"] do |tmpfile| @@ -83,7 +83,7 @@ tmpfile.write "あ" tmpfile.rewind - msg = topic.publish tmpfile + msg = publisher.publish tmpfile end mock.verify @@ -102,9 +102,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msg = topic.publish message1, format: :text + msg = publisher.publish message1, format: :text mock.verify @@ -125,9 +125,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msgs = topic.publish do |batch| + msgs = publisher.publish do |batch| batch.publish message1 batch.publish message2 batch.publish message3, format: :none @@ -143,7 +143,7 @@ end describe "reference topic that exists" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } + let(:publisher) { Google::Cloud::PubSub::Publisher.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } it "publishes a message" do messages = [ @@ -155,9 +155,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msg = topic.publish message1 + msg = publisher.publish message1 mock.verify @@ -175,9 +175,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msg = topic.publish message1, format: :text + msg = publisher.publish message1, format: :text mock.verify @@ -198,9 +198,9 @@ mock.expect :publish, publish_res do |actual_request| actual_request == expected_request end - topic.service.mocked_publisher = mock + publisher.service.mocked_topic_admin = mock - msgs = topic.publish do |batch| + msgs = publisher.publish do |batch| batch.publish message1 batch.publish message2 batch.publish message3, format: :none @@ -217,17 +217,17 @@ end describe "reference topic that does not exist" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } + let(:publisher) { Google::Cloud::PubSub::Publisher.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } it "publishes a message" do stub = Object.new def stub.publish *args raise Google::Cloud::NotFoundError.new("not found") end - pubsub.service.mocked_publisher = stub + pubsub.service.mocked_topic_admin = stub expect do - topic.publish message1 + publisher.publish message1 end.must_raise Google::Cloud::NotFoundError end @@ -236,10 +236,10 @@ def stub.publish *args def stub.publish *args raise Google::Cloud::NotFoundError.new("not found") end - pubsub.service.mocked_publisher = stub + pubsub.service.mocked_topic_admin = stub expect do - topic.publish message1, format: :text + publisher.publish message1, format: :text end.must_raise Google::Cloud::NotFoundError end @@ -248,10 +248,10 @@ def stub.publish *args def stub.publish *args raise Google::Cloud::NotFoundError.new("not found") end - pubsub.service.mocked_publisher = stub + pubsub.service.mocked_topic_admin = stub expect do - topic.publish do |batch| + publisher.publish do |batch| batch.publish message1 batch.publish message2 batch.publish message3, format: :none diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/publisher_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/publisher_test.rb new file mode 100644 index 000000000000..06a79e346236 --- /dev/null +++ b/google-cloud-pubsub/test/google/cloud/pubsub/publisher_test.rb @@ -0,0 +1,144 @@ +# Copyright 2015 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. + +require "helper" + +describe Google::Cloud::PubSub::Publisher, :mock_pubsub do + let(:topic_name) { "topic-name-goes-here" } + let(:labels) { { "foo" => "bar" } } + let(:publisher) { Google::Cloud::PubSub::Publisher.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name, labels: labels)), pubsub.service } + + it "knows its name" do + _(publisher.name).must_equal topic_path(topic_name) + end + + it "can publish a message" do + message = "new-message-here" + encoded_msg = message.encode(Encoding::ASCII_8BIT) + messages = [ + Google::Cloud::PubSub::V1::PubsubMessage.new(data: encoded_msg) + ] + publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) + mock = Minitest::Mock.new + expected_request = {topic: topic_path(topic_name), messages: messages} + mock.expect :publish, publish_res do |actual_request, actual_option| + actual_request == expected_request && actual_option.nil? + end + publisher.service.mocked_topic_admin = mock + + msg = publisher.publish message + + mock.verify + + _(msg).must_be_kind_of Google::Cloud::PubSub::Message + _(msg.message_id).must_equal "msg1" + end + + it "can publish a message with compression" do + messages = [ + Google::Cloud::PubSub::V1::PubsubMessage.new(data: "d"*238) + ] + publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) + mock = Minitest::Mock.new + expected_request = {topic: topic_path(topic_name), messages: messages} + expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } + mock.expect :publish, publish_res do |actual_request, actual_option| + actual_request == expected_request && actual_option == expected_option + end + publisher.service.mocked_topic_admin = mock + + msg = publisher.publish "d"*238, compress: true + + mock.verify + + _(msg).must_be_kind_of Google::Cloud::PubSub::Message + _(msg.message_id).must_equal "msg1" + end + + it "can publish a message with compression_bytes_threshold " do + messages = [ + Google::Cloud::PubSub::V1::PubsubMessage.new(data: "d"*138) + ] + publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) + mock = Minitest::Mock.new + expected_request = {topic: topic_path(topic_name), messages: messages} + expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } + mock.expect :publish, publish_res do |actual_request, actual_option| + actual_request == expected_request && actual_option == expected_option + end + publisher.service.mocked_topic_admin = mock + + msg = publisher.publish "d"*138, compress: true, compression_bytes_threshold: 140 + + mock.verify + + _(msg).must_be_kind_of Google::Cloud::PubSub::Message + _(msg.message_id).must_equal "msg1" + end + + it "can publish a message with attributes" do + message = "new-message-here" + encoded_msg = message.encode(Encoding::ASCII_8BIT) + messages = [ + Google::Cloud::PubSub::V1::PubsubMessage.new(data: encoded_msg, attributes: { "format" => "text" }) + ] + publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) + mock = Minitest::Mock.new + expected_request = {topic: topic_path(topic_name), messages: messages} + mock.expect :publish, publish_res do |actual_request| + actual_request == expected_request + end + publisher.service.mocked_topic_admin = mock + + msg = publisher.publish message, format: :text + + mock.verify + + _(msg).must_be_kind_of Google::Cloud::PubSub::Message + _(msg.message_id).must_equal "msg1" + _(msg.attributes["format"]).must_equal "text" + end + + it "can publish multiple messages with a block" do + message1 = "first-new-message" + message2 = "second-new-message" + encoded_msg1 = message1.encode(Encoding::ASCII_8BIT) + encoded_msg2 = message2.encode(Encoding::ASCII_8BIT) + messages = [ + Google::Cloud::PubSub::V1::PubsubMessage.new(data: encoded_msg1), + Google::Cloud::PubSub::V1::PubsubMessage.new(data: encoded_msg2, attributes: { "format" => "none" }) + ] + publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1", "msg2"] }) + mock = Minitest::Mock.new + expected_request = {topic: topic_path(topic_name), messages: messages} + mock.expect :publish, publish_res do |actual_request| + actual_request == expected_request + end + publisher.service.mocked_topic_admin = mock + + msgs = publisher.publish do |batch| + batch.publish message1 + batch.publish message2, format: :none + end + + mock.verify + + _(msgs.count).must_equal 2 + _(msgs.first).must_be_kind_of Google::Cloud::PubSub::Message + _(msgs.first.message_id).must_equal "msg1" + _(msgs.last).must_be_kind_of Google::Cloud::PubSub::Message + _(msgs.last.message_id).must_equal "msg2" + _(msgs.last.attributes["format"]).must_equal "none" + end +end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/received_message_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/received_message_test.rb index 8c967347715c..03198b710c56 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/received_message_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/received_message_test.rb @@ -19,12 +19,12 @@ let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } let(:subscription_name) { "subscription-name-goes-here" } let(:subscription_grpc) { Google::Cloud::PubSub::V1::Subscription.new(subscription_hash(topic_name, subscription_name)) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc subscription_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc subscription_grpc, pubsub.service } let(:rec_message_name) { "rec_message-name-goes-here" } let(:rec_message_msg) { "rec_message-msg-goes-here" } let(:rec_message_data) { rec_message_hash(rec_message_msg) } let(:rec_message_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new rec_message_data } - let(:rec_message) { Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_message_grpc, subscription } + let(:rec_message) { Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_message_grpc, subscriber } it "knows its subscription" do _(rec_message.subscription).wont_be :nil? @@ -75,7 +75,7 @@ it "returns nil for delivery_attempt when delivery_attempt is 0" do rec_message_data_non_dlq = rec_message_hash rec_message_msg, delivery_attempt: 0 rec_message_grpc_non_dlq = Google::Cloud::PubSub::V1::ReceivedMessage.new rec_message_data_non_dlq - rec_message_non_dlq = Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_message_grpc_non_dlq, subscription + rec_message_non_dlq = Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_message_grpc_non_dlq, subscriber _(rec_message_non_dlq.delivery_attempt).must_be :nil? end @@ -83,7 +83,7 @@ ack_res = nil mock = Minitest::Mock.new mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock rec_message.acknowledge! @@ -94,7 +94,7 @@ ack_res = nil mock = Minitest::Mock.new mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock rec_message.ack! @@ -105,7 +105,7 @@ ack_res = nil mock = Minitest::Mock.new mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock rec_message.ack! do |result| assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::SUCCESS, Proc.new { raise "Staus did not match!" } @@ -119,7 +119,7 @@ mad_res = nil mock = Minitest::Mock.new mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock rec_message.modify_ack_deadline! new_deadline @@ -131,7 +131,7 @@ mad_res = nil mock = Minitest::Mock.new mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock rec_message.modify_ack_deadline! new_deadline do |result| assert_equal result.status, Google::Cloud::PubSub::AcknowledgeResult::SUCCESS, Proc.new { raise "Staus did not match!" } @@ -143,7 +143,7 @@ it "can reject" do mock = Minitest::Mock.new mock.expect :modify_ack_deadline, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock rec_message.reject! @@ -153,7 +153,7 @@ it "can nack" do mock = Minitest::Mock.new mock.expect :modify_ack_deadline, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock rec_message.nack! @@ -163,7 +163,7 @@ it "can ignore" do mock = Minitest::Mock.new mock.expect :modify_ack_deadline, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock rec_message.ignore! diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/schema/partial/schema_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/schema/partial/schema_test.rb deleted file mode 100644 index 8a96f1bf2f85..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/schema/partial/schema_test.rb +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2021 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. - -require "helper" - -describe Google::Cloud::PubSub::Schema, :partial, :mock_pubsub do - let(:schema_id) { "my-schema" } - let(:type) { :AVRO } - let(:schema_grpc) { Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: nil) } - let(:schema) { Google::Cloud::PubSub::Schema.from_grpc schema_grpc, pubsub.service, view: :BASIC } - let(:message_data) { { "name" => "Alaska", "post_abbr" => "AK" }.to_json } - let(:message_data_invalid) { { "BAD_VALUE" => nil }.to_json } - let(:message_encoding) { :JSON } - - it "knows its attributes" do - _(schema.name).must_equal schema_path(schema_id) - _(schema.type).must_equal type - _(schema.definition).must_be :nil? - end - - it "knows its view state" do - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema.resource_partial?).must_equal true - _(schema.resource_full?).must_equal false - end - - it "validates a message" do - mock = Minitest::Mock.new - res = Google::Cloud::PubSub::V1::ValidateMessageResponse.new # always empty - mock.expect :validate_message, res, parent: project_path, name: schema_path(schema_id), schema: nil, message: message_data, encoding: message_encoding.to_s - pubsub.service.mocked_schemas = mock - - _(schema.validate_message message_data, message_encoding).must_equal true - - mock.verify - end - - it "validates an invalid message" do - stub = Object.new - def stub.validate_message *args - raise Google::Cloud::InvalidArgumentError.new("Request contains an invalid argument.") - end - pubsub.service.mocked_schemas = stub - - _(schema.validate_message message_data, message_encoding).must_equal false - end - - it "deletes itself" do - mock = Minitest::Mock.new - mock.expect :delete_schema, nil, name: schema_path(schema_id) - pubsub.service.mocked_schemas = mock - - schema.delete - - mock.verify - end - - it "reloads itself" do - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: nil) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 1 - pubsub.service.mocked_schemas = mock - - schema.reload! - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema.resource_partial?).must_equal true - _(schema.resource_full?).must_equal false - - mock.verify - end - - it "reloads itself with view option" do - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 2 - pubsub.service.mocked_schemas = mock - - schema.reload! view: :full - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema).wont_be :resource_partial? - _(schema).must_be :resource_full? - - mock.verify - end - - it "checks if it exists without making RPC" do - _(schema.exists?).must_equal true - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/schema/reference/schema_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/schema/reference/schema_test.rb deleted file mode 100644 index 74b6edd33600..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/schema/reference/schema_test.rb +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 2021 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. - -require "helper" - -describe Google::Cloud::PubSub::Schema, :reference, :mock_pubsub do - let(:schema_id) { "my-schema" } - let(:schema) { Google::Cloud::PubSub::Schema.from_name schema_id, :FULL, pubsub.service } - let(:message_data) { { "name" => "Alaska", "post_abbr" => "AK" }.to_json } - let(:message_data_invalid) { { "BAD_VALUE" => nil }.to_json } - let(:message_encoding) { :JSON } - let(:definition) { "Schema definition" } - - it "knows its attributes" do - _(schema.name).must_equal schema_path(schema_id) - _(schema.type).must_be :nil? - _(schema.definition).must_be :nil? - end - - it "knows its view state" do - _(schema).must_be :reference? - _(schema).wont_be :resource? - _(schema).wont_be :resource_partial? - _(schema.resource_full?).must_equal false - end - - it "validates a message" do - mock = Minitest::Mock.new - res = Google::Cloud::PubSub::V1::ValidateMessageResponse.new # always empty - mock.expect :validate_message, res, parent: project_path, name: schema_path(schema_id), schema: nil, message: message_data, encoding: message_encoding.to_s - pubsub.service.mocked_schemas = mock - - _(schema.validate_message message_data, message_encoding).must_equal true - - mock.verify - end - - it "validates an invalid message" do - stub = Object.new - def stub.validate_message *args - raise Google::Cloud::InvalidArgumentError.new("Request contains an invalid argument.") - end - pubsub.service.mocked_schemas = stub - - _(schema.validate_message message_data, message_encoding).must_equal false - end - - it "deletes itself" do - mock = Minitest::Mock.new - mock.expect :delete_schema, nil, name: schema_path(schema_id) - pubsub.service.mocked_schemas = mock - - schema.delete - - mock.verify - end - - it "reloads itself" do - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 2 - pubsub.service.mocked_schemas = mock - - schema.reload! - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema).wont_be :resource_partial? - _(schema).must_be :resource_full? - - mock.verify - end - - it "reloads itself with view option" do - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: nil) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 1 - pubsub.service.mocked_schemas = mock - - schema.reload! view: :basic - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema.resource_partial?).must_equal true - _(schema.resource_full?).must_equal false - - mock.verify - end - - it "checks if it exists with RPC" do - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: definition) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 2 - pubsub.service.mocked_schemas = mock - - _(schema.exists?).must_equal true - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema.resource_partial?).must_equal false - _(schema.resource_full?).must_equal true - - mock.verify - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/schema/resource/schema_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/schema/resource/schema_test.rb deleted file mode 100644 index 1331dde0fcd5..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/schema/resource/schema_test.rb +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 2021 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. - -require "helper" - -describe Google::Cloud::PubSub::Schema, :resource, :mock_pubsub do - let(:schema_id) { "my-schema" } - let(:type) { :AVRO } - let(:definition) { "AVRO schema definition" } - let(:schema_grpc) { Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id) } - let(:schema) { Google::Cloud::PubSub::Schema.from_grpc schema_grpc, pubsub.service, view: :FULL } - let(:message_data) { { "name" => "Alaska", "post_abbr" => "AK" }.to_json } - let(:message_data_invalid) { { "BAD_VALUE" => nil }.to_json } - let(:message_encoding) { :JSON } - - it "knows its attributes" do - _(schema.name).must_equal schema_path(schema_id) - _(schema.type).must_equal type - _(schema.definition).must_equal definition - end - - it "knows its view state" do - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema).wont_be :resource_partial? - _(schema).must_be :resource_full? - end - - it "validates a message" do - mock = Minitest::Mock.new - res = Google::Cloud::PubSub::V1::ValidateMessageResponse.new # always empty - mock.expect :validate_message, res, parent: project_path, name: schema_path(schema_id), schema: nil, message: message_data, encoding: message_encoding.to_s - pubsub.service.mocked_schemas = mock - - _(schema.validate_message message_data, message_encoding).must_equal true - - mock.verify - end - - it "validates an invalid message" do - stub = Object.new - def stub.validate_message *args - raise Google::Cloud::InvalidArgumentError.new("Request contains an invalid argument.") - end - pubsub.service.mocked_schemas = stub - - _(schema.validate_message message_data, message_encoding).must_equal false - end - - it "deletes itself" do - mock = Minitest::Mock.new - mock.expect :delete_schema, nil, name: schema_path(schema_id) - pubsub.service.mocked_schemas = mock - - schema.delete - - mock.verify - end - - it "reloads itself" do - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 2 - pubsub.service.mocked_schemas = mock - - schema.reload! - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema).wont_be :resource_partial? - _(schema).must_be :resource_full? - - mock.verify - end - - it "reloads itself with view option" do - get_res = Google::Cloud::PubSub::V1::Schema.new schema_hash(schema_id, definition: nil) - mock = Minitest::Mock.new - mock.expect :get_schema, get_res, name: schema_path(schema_id), view: 1 - pubsub.service.mocked_schemas = mock - - schema.reload! view: :basic - - _(schema).wont_be :reference? - _(schema).must_be :resource? - _(schema.resource_partial?).must_equal true - _(schema.resource_full?).must_equal false - - mock.verify - end - - it "checks if it exists without making RPC" do - _(schema.exists?).must_equal true - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/service_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/service_test.rb index ce93699b0e13..fa8c3e8750b9 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/service_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/service_test.rb @@ -49,12 +49,12 @@ def logger let(:expected_metadata) { { "google-cloud-resource-prefix": "projects/#{project}" } } let(:subscriber_default_config) do - Google::Cloud::PubSub::V1::Subscriber::Client.new do |config| + Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config| config.credentials = :this_channel_is_insecure end.configure end let(:publisher_default_config) do - Google::Cloud::PubSub::V1::Publisher::Client.new do |config| + Google::Cloud::PubSub::V1::TopicAdmin::Client.new do |config| config.credentials = :this_channel_is_insecure end.configure end @@ -70,15 +70,15 @@ def logger end let(:dummy_stub) { PubSubServiceTestDummyStub.new } - it "configures the V1::Subscriber::Client" do + it "configures the V1::SubscriptionAdmin::Client" do # Clear all environment variables ENV.stub :[], nil do Google::Auth::Credentials.stub :default, credentials do Gapic::ServiceStub.stub :new, dummy_stub do service = Google::Cloud::PubSub::Service.new project, nil _(service.project).must_equal project - config = service.subscriber.configure - _(config).must_be_kind_of Google::Cloud::PubSub::V1::Subscriber::Client::Configuration + config = service.subscription_admin.configure + _(config).must_be_kind_of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration _(config.timeout).must_be :nil? _(config.endpoint).must_be :nil? _(config.universe_domain).must_equal universe_domain @@ -92,15 +92,15 @@ def logger end end - it "configures the V1::Subscriber::Client with host, universe_domain, and timeout" do + it "configures the V1::SubscriptionAdmin::Client with host, universe_domain, and timeout" do # Clear all environment variables ENV.stub :[], nil do Google::Auth::Credentials.stub :default, credentials do Gapic::ServiceStub.stub :new, dummy_stub do service = Google::Cloud::PubSub::Service.new project, nil, host: endpoint_2, timeout: timeout, universe_domain: universe_domain_2 _(service.project).must_equal project - config = service.subscriber.configure - _(config).must_be_kind_of Google::Cloud::PubSub::V1::Subscriber::Client::Configuration + config = service.subscription_admin.configure + _(config).must_be_kind_of Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration _(config.timeout).must_equal timeout _(config.endpoint).must_equal endpoint_2 _(config.universe_domain).must_equal universe_domain_2 @@ -114,15 +114,15 @@ def logger end end - it "configures the V1::Publisher::Client" do + it "configures the V1::TopicAdmin::Client" do # Clear all environment variables ENV.stub :[], nil do Google::Auth::Credentials.stub :default, credentials do Gapic::ServiceStub.stub :new, dummy_stub do service = Google::Cloud::PubSub::Service.new project, nil _(service.project).must_equal project - config = service.publisher.configure - _(config).must_be_kind_of Google::Cloud::PubSub::V1::Publisher::Client::Configuration + config = service.topic_admin.configure + _(config).must_be_kind_of Google::Cloud::PubSub::V1::TopicAdmin::Client::Configuration _(config.timeout).must_be :nil? _(config.endpoint).must_be :nil? _(config.universe_domain).must_equal universe_domain @@ -136,15 +136,15 @@ def logger end end - it "configures the V1::Publisher::Client with host and timeout" do + it "configures the V1::TopicAdmin::Client with host and timeout" do # Clear all environment variables ENV.stub :[], nil do Google::Auth::Credentials.stub :default, credentials do Gapic::ServiceStub.stub :new, dummy_stub do service = Google::Cloud::PubSub::Service.new project, nil, host: endpoint_2, timeout: timeout, universe_domain: universe_domain_2 _(service.project).must_equal project - config = service.publisher.configure - _(config).must_be_kind_of Google::Cloud::PubSub::V1::Publisher::Client::Configuration + config = service.topic_admin.configure + _(config).must_be_kind_of Google::Cloud::PubSub::V1::TopicAdmin::Client::Configuration _(config.timeout).must_equal timeout _(config.endpoint).must_equal endpoint_2 _(config.universe_domain).must_equal universe_domain_2 @@ -204,9 +204,9 @@ def logger it "should raise errors other than grpc on ack" do service = Google::Cloud::PubSub::Service.new project, nil - mocked_subscriber = Minitest::Mock.new - service.mocked_subscriber = mocked_subscriber - def mocked_subscriber.acknowledge *args + mocked_subscription_admin = Minitest::Mock.new + service.mocked_subscription_admin = mocked_subscription_admin + def mocked_subscription_admin.acknowledge *args raise RuntimeError.new "test" end assert_raises RuntimeError do @@ -216,9 +216,9 @@ def mocked_subscriber.acknowledge *args it "should raise errors other than grpc on modack" do service = Google::Cloud::PubSub::Service.new project, nil - mocked_subscriber = Minitest::Mock.new - service.mocked_subscriber = mocked_subscriber - def mocked_subscriber.modify_ack_deadline *args + mocked_subscription_admin = Minitest::Mock.new + service.mocked_subscription_admin = mocked_subscription_admin + def mocked_subscription_admin.modify_ack_deadline *args raise RuntimeError.new "test" end assert_raises RuntimeError do @@ -228,27 +228,27 @@ def mocked_subscriber.modify_ack_deadline *args it "should pass call option with compression header when compress enabled" do service = Google::Cloud::PubSub::Service.new project, nil - mocked_publisher = Minitest::Mock.new - service.mocked_publisher = mocked_publisher + mocked_topic_admin = Minitest::Mock.new + service.mocked_topic_admin = mocked_topic_admin expected_request = {topic: "projects/test/topics/test", messages: "data"} expected_options = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } - mocked_publisher.expect :publish, nil do |actual_request, actual_option| + mocked_topic_admin.expect :publish, nil do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_options end service.publish "test", "data", compress: true - mocked_publisher.verify + mocked_topic_admin.verify end it "should not add call option when compress disabled" do service = Google::Cloud::PubSub::Service.new project, nil - mocked_publisher = Minitest::Mock.new - service.mocked_publisher = mocked_publisher + mocked_topic_admin = Minitest::Mock.new + service.mocked_topic_admin = mocked_topic_admin expected_request = {topic: "projects/test/topics/test", messages: "data"} - mocked_publisher.expect :publish, nil do |actual_request, actual_option| + mocked_topic_admin.expect :publish, nil do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end service.publish "test", "data" - mocked_publisher.verify + mocked_topic_admin.verify end # @param [Numeric, nil] timeout Expected non-default timeout. diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/snapshot_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/snapshot_test.rb deleted file mode 100644 index 1a19d7f823f1..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/snapshot_test.rb +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2017 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. - -require "helper" - -describe Google::Cloud::PubSub::Snapshot, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:snapshot_name) { "snapshot-name-goes-here" } - let(:labels) { { "foo" => "bar" } } - let(:snapshot_grpc) { Google::Cloud::PubSub::V1::Snapshot.new(snapshot_hash(topic_name, snapshot_name, labels: labels)) } - let(:snapshot) { Google::Cloud::PubSub::Snapshot.from_grpc snapshot_grpc, pubsub.service } - let(:new_labels) { { "baz" => "qux" } } - let(:new_labels_map) do - labels_map = Google::Protobuf::Map.new(:string, :string) - new_labels.each { |k, v| labels_map[String(k)] = String(v) } - labels_map - end - - it "knows its name" do - _(snapshot.name).must_equal snapshot_path(snapshot_name) - end - - it "knows its topic" do - _(snapshot.topic).must_be_kind_of Google::Cloud::PubSub::Topic - _(snapshot.topic).must_be :reference? - _(snapshot.topic).wont_be :resource? - _(snapshot.topic.name).must_equal topic_path(topic_name) - end - - it "knows its expiration_time" do - _(snapshot.expiration_time).must_be_kind_of ::Time - end - - it "knows its labels" do - _(snapshot.labels).must_equal labels - end - - - it "updates labels" do - _(snapshot.labels).must_equal labels - - update_sub = snapshot_grpc.dup - update_sub.labels = new_labels_map - update_mask = Google::Protobuf::FieldMask.new paths: ["labels"] - mock = Minitest::Mock.new - mock.expect :update_snapshot, update_sub, snapshot: update_sub, update_mask: update_mask - snapshot.service.mocked_subscriber = mock - - snapshot.labels = new_labels - - mock.verify - - _(snapshot.labels).must_equal new_labels - end - - it "updates labels to empty hash" do - _(snapshot.labels).must_equal labels - - update_sub = snapshot_grpc.dup - update_sub.labels = Google::Protobuf::Map.new(:string, :string) - - update_mask = Google::Protobuf::FieldMask.new paths: ["labels"] - mock = Minitest::Mock.new - mock.expect :update_snapshot, update_sub, snapshot: update_sub, update_mask: update_mask - snapshot.service.mocked_subscriber = mock - - snapshot.labels = {} - - mock.verify - - _(snapshot.labels).wont_be :nil? - _(snapshot.labels).must_be :empty? - end - - it "raises when setting labels to nil" do - _(snapshot.labels).must_equal labels - - expect { snapshot.labels = nil }.must_raise ArgumentError - - _(snapshot.labels).must_equal labels - end - - it "can delete itself" do - del_res = nil - mock = Minitest::Mock.new - mock.expect :delete_snapshot, del_res, snapshot: snapshot_path(snapshot_name) - pubsub.service.mocked_subscriber = mock - - snapshot.delete - - mock.verify - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/attrs_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/attrs_test.rb new file mode 100644 index 000000000000..2f30c9157d98 --- /dev/null +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/attrs_test.rb @@ -0,0 +1,83 @@ +# Copyright 2015 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. + +require "helper" + +describe Google::Cloud::PubSub::Subscriber, :attributes, :mock_pubsub do + let(:labels) { { "foo" => "bar" } } + let(:topic_name) { "topic-name-goes-here" } + let(:table_id) { "table_id" } + let(:dead_letter_topic_path) { topic_path("topic-name-dead-letter") } + let(:retry_minimum_backoff) { 12.123 } + let(:retry_maximum_backoff) { 123.321 } + let(:filter) { "attributes.event_type = \"1\"" } + let(:sub_name) { "subscription-name-goes-here" } + let(:sub_hash) do + subscription_hash topic_name, sub_name, labels: labels, dead_letter_topic: dead_letter_topic_path, \ + max_delivery_attempts: 6, retry_minimum_backoff: retry_minimum_backoff, retry_maximum_backoff: retry_maximum_backoff, \ + filter: filter, detached: true + end + let(:sub_deadline) { sub_hash[:ack_deadline_seconds] } + let(:sub_endpoint) { sub_hash[:push_config][:push_endpoint] } + let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } + let(:bq_subscriber) do + Google::Cloud::PubSub::Subscriber.from_grpc Google::Cloud::PubSub::V1::Subscription.new(sub_hash.merge!({ + bigquery_config: { + table: table_id, + write_metadata: true + } + })), + pubsub.service + end + + it "gets deadline from the Google API object" do + _(subscriber.deadline).must_equal sub_deadline + end + + describe "reference subscription object of a subscription that does exist" do + let :subscriber do + Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service + end + + it "makes an HTTP API call to retrieve deadline" do + get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) + mock = Minitest::Mock.new + mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) + subscriber.service.mocked_subscription_admin = mock + + _(subscriber.deadline).must_equal sub_deadline + + mock.verify + end + end + + describe "reference subscription object of a subscription that does not exist" do + let :subscription do + Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service + end + + it "raises NotFoundError when retrieving deadline" do + stub = Object.new + def stub.get_subscription *args + raise Google::Cloud::NotFoundError.new("not found") + end + subscription.service.mocked_subscription_admin = stub + + expect do + subscription.deadline + end.must_raise Google::Cloud::NotFoundError + end + end +end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/exists_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/exists_test.rb similarity index 72% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscription/exists_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/subscriber/exists_test.rb index f03b4b98f8a9..8dbe1460715e 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/exists_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/exists_test.rb @@ -14,45 +14,44 @@ require "helper" -describe Google::Cloud::PubSub::Subscription, :exists, :mock_pubsub do +describe Google::Cloud::PubSub::Subscriber, :exists, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash(topic_name, sub_name) } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } it "knows if it exists when created with an HTTP method" do # The absense of a mock means this test will fail # if the method exists? makes an HTTP call. - _(subscription).must_be :exists? + _(subscriber).must_be :exists? # Additional exists? calls do not make HTTP calls either - _(subscription).must_be :exists? + _(subscriber).must_be :exists? end describe "reference subscription object of a subscription that exists" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service + let :subscriber do + Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service end it "checks if the subscription exists by making an HTTP call" do get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) mock = Minitest::Mock.new mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock - _(subscription).must_be :exists? + _(subscriber).must_be :exists? mock.verify # Additional exists? calls do not make HTTP calls - _(subscription).must_be :exists? + _(subscriber).must_be :exists? end end describe "reference subscription object of a subscription that does not exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, + let :subscriber do + Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service end @@ -61,11 +60,11 @@ def stub.get_subscription *args raise Google::Cloud::NotFoundError.new("not found") end - subscription.service.mocked_subscriber = stub + subscriber.service.mocked_subscription_admin = stub - _(subscription).wont_be :exists? + _(subscriber).wont_be :exists? # Additional exists? calls do not make HTTP calls - _(subscription).wont_be :exists? + _(subscriber).wont_be :exists? end end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/lazy_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/lazy_test.rb similarity index 65% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscription/lazy_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/subscriber/lazy_test.rb index a1dff6897ad0..febe84055c72 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/lazy_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/lazy_test.rb @@ -14,27 +14,27 @@ require "helper" -describe Google::Cloud::PubSub::Subscription, :name, :mock_pubsub do +describe Google::Cloud::PubSub::Subscriber, :name, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_path) { subscription_path sub_name } let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new sub_hash } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } it "is not reference when created with an HTTP method" do - _(subscription).wont_be :reference? - _(subscription).must_be :resource? + _(subscriber).wont_be :reference? + _(subscriber).must_be :resource? end describe "reference subscription" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, pubsub.service + let :subscriber do + Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service end it "is reference" do - _(subscription).must_be :reference? - _(subscription).wont_be :resource? + _(subscriber).must_be :reference? + _(subscriber).wont_be :resource? end end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/listen_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/listen_test.rb new file mode 100644 index 000000000000..4996a1875883 --- /dev/null +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/listen_test.rb @@ -0,0 +1,192 @@ +# Copyright 2015 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. + +require "helper" + +describe Google::Cloud::PubSub::Subscriber, :listen, :mock_pubsub do + let(:topic_name) { "topic-name-goes-here" } + let(:sub_name) { "subscription-name-goes-here" } + let(:sub_hash) { subscription_hash topic_name, sub_name } + let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new sub_hash } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } + + it "will create a MessageListener" do + listener = subscriber.listen do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set deadline while creating a MessageListener" do + listener = subscriber.listen deadline: 120 do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 120 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set deadline while creating a MessageListener" do + listener = subscriber.listen streams: 2 do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set inventory (deprecated) while creating a MessageListener" do + listener = subscriber.listen inventory: 500 do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 500 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set inventory max_outstanding_messages while creating a MessageListener" do + listener = subscriber.listen inventory: { max_outstanding_messages: 500 } do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 500 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set inventory limit alias while creating a MessageListener" do + listener = subscriber.listen inventory: { limit: 500 } do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 500 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set inventory max_outstanding_bytes while creating a MessageListener" do + listener = subscriber.listen inventory: { max_outstanding_bytes: 50_000 } do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 50_000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set inventory bytesize alias while creating a MessageListener" do + listener = subscriber.listen inventory: { bytesize: 50_000 } do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 50_000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set inventory max_total_lease_duration while creating a MessageListener" do + listener = subscriber.listen inventory: { max_total_lease_duration: 7_200 } do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 7200 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set inventory extension alias while creating a MessageListener" do + listener = subscriber.listen inventory: { extension: 7_200 } do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 7200 + _(listener.max_duration_per_lease_extension).must_equal 0 + end + + it "will set inventory max_duration_per_lease_extension while creating a MessageListener" do + listener = subscriber.listen inventory: { max_duration_per_lease_extension: 10 } do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 10 + end + + it "will set inventory min_duration_per_lease_extension while creating a MessageListener" do + listener = subscriber.listen inventory: { min_duration_per_lease_extension: 10 } do |msg| + puts msg.msg_id + end + _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener + _(listener.subscription_name).must_equal subscriber.name + _(listener.deadline).must_equal 60 + _(listener.streams).must_equal 2 + _(listener.max_outstanding_messages).must_equal 1000 + _(listener.max_outstanding_bytes).must_equal 100000000 + _(listener.max_total_lease_duration).must_equal 3600 + _(listener.max_duration_per_lease_extension).must_equal 0 + _(listener.min_duration_per_lease_extension).must_equal 10 + end +end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/name_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/name_test.rb similarity index 67% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscription/name_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/subscriber/name_test.rb index 2eb62f5539fb..29335fa34d51 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/name_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/name_test.rb @@ -14,37 +14,35 @@ require "helper" -describe Google::Cloud::PubSub::Subscription, :name, :mock_pubsub do +describe Google::Cloud::PubSub::Subscriber, :name, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_path) { subscription_path sub_name } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } it "gives the name returned from the HTTP method" do - _(subscription.name).must_equal sub_path + _(subscriber.name).must_equal sub_path end describe "reference subscription given the short name" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service + let :subscriber do + Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service end it "matches the name returned from the HTTP method" do - _(subscription.name).must_equal sub_path + _(subscriber.name).must_equal sub_path end end describe "reference subscription object given the full path" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_path, - pubsub.service + let :subscriber do + Google::Cloud::PubSub::Subscriber.from_name sub_path, pubsub.service end it "matches the name returned from the HTTP method" do - _(subscription.name).must_equal sub_path + _(subscriber.name).must_equal sub_path end end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/pull_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_test.rb similarity index 75% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscription/pull_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_test.rb index da0e7608bb56..9a304fe67a7a 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/pull_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_test.rb @@ -14,21 +14,21 @@ require "helper" -describe Google::Cloud::PubSub::Subscription, :pull, :mock_pubsub do +describe Google::Cloud::PubSub::Subscriber, :pull, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new sub_hash } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } it "can pull messages" do rec_message_msg = "pulled-message" pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new mock.expect :pull, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: true - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock - rec_messages = subscription.pull + rec_messages = subscriber.pull mock.verify @@ -37,8 +37,8 @@ end describe "reference subscription object of a subscription that does exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, pubsub.service + let :subscriber do + Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service end it "can pull messages" do @@ -46,9 +46,9 @@ pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new mock.expect :pull, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: true - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock - rec_messages = subscription.pull + rec_messages = subscriber.pull mock.verify @@ -58,8 +58,8 @@ end describe "reference subscription object of a subscription that does not exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, + let :subscriber do + Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service end @@ -68,10 +68,10 @@ def stub.pull *args raise Google::Cloud::NotFoundError.new("not found") end - subscription.service.mocked_subscriber = stub + subscriber.service.mocked_subscription_admin = stub expect do - subscription.pull + subscriber.pull end.must_raise Google::Cloud::NotFoundError end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/pull_wait_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_wait_test.rb similarity index 80% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscription/pull_wait_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_wait_test.rb index 9225231e32d9..85176669a262 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/pull_wait_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_wait_test.rb @@ -14,21 +14,21 @@ require "helper" -describe Google::Cloud::PubSub::Subscription, :pull, :wait, :mock_pubsub do +describe Google::Cloud::PubSub::Subscriber, :pull, :wait, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_hash) { subscription_hash topic_name, sub_name } let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc, pubsub.service } it "can pull messages without returning immediately" do rec_message_msg = "pulled-message" pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new mock.expect :pull, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: false - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock - rec_messages = subscription.pull immediate: false + rec_messages = subscriber.pull immediate: false mock.verify @@ -41,9 +41,9 @@ pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new mock.expect :pull, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: false - subscription.service.mocked_subscriber = mock + subscriber.service.mocked_subscription_admin = mock - rec_messages = subscription.wait_for_messages + rec_messages = subscriber.wait_for_messages mock.verify @@ -56,9 +56,9 @@ def stub.pull *args raise Google::Cloud::DeadlineExceededError end - subscription.service.mocked_subscriber = stub + subscriber.service.mocked_subscription_admin = stub - rec_messages = subscription.pull immediate: false + rec_messages = subscriber.pull immediate: false _(rec_messages).must_be :empty? end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/reload_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/reload_test.rb similarity index 66% rename from google-cloud-pubsub/test/google/cloud/pubsub/subscription/reload_test.rb rename to google-cloud-pubsub/test/google/cloud/pubsub/subscriber/reload_test.rb index eaf7f5f2ef73..b6494db72bbd 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/reload_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/reload_test.rb @@ -14,7 +14,7 @@ require "helper" -describe Google::Cloud::PubSub::Subscription, :name, :mock_pubsub do +describe Google::Cloud::PubSub::Subscriber, :name, :mock_pubsub do let(:topic_name) { "topic-name-goes-here" } let(:sub_name) { "subscription-name-goes-here" } let(:sub_path) { subscription_path sub_name } @@ -22,51 +22,42 @@ let(:sub_hash_new) { subscription_hash topic_name, sub_name, 30, "http://example.net/endpoint", labels: { "foo" => "bar" } } let(:sub_grpc_old) { Google::Cloud::PubSub::V1::Subscription.new sub_hash_old } let(:sub_grpc_new) { Google::Cloud::PubSub::V1::Subscription.new sub_hash_new } - let(:sub_resource) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc_old, pubsub.service } - let(:sub_reference) { Google::Cloud::PubSub::Subscription.from_name sub_name, pubsub.service } + let(:sub_resource) { Google::Cloud::PubSub::Subscriber.from_grpc sub_grpc_old, pubsub.service } + let(:sub_reference) { Google::Cloud::PubSub::Subscriber.from_name sub_name, pubsub.service } it "it has a reload method and a refresh alias" do _(sub_resource).must_respond_to :reload! _(sub_reference).must_respond_to :reload! - - _(sub_resource).must_respond_to :refresh! - _(sub_reference).must_respond_to :refresh! end - it "is reloads a resource by calling get_topic API" do + it "reloads a resource by calling get_subscription API" do _(sub_resource.name).must_equal sub_path - _(sub_resource.topic.name).must_equal topic_path(topic_name) _(sub_resource.deadline).must_equal 60 - _(sub_resource.endpoint).must_equal "http://example.com/callback" - _(sub_resource.labels).must_be :empty? _(sub_resource).wont_be :reference? _(sub_resource).must_be :resource? mock = Minitest::Mock.new mock.expect :get_subscription, sub_grpc_new, subscription: sub_path - pubsub.service.mocked_subscriber = mock + pubsub.service.mocked_subscription_admin = mock sub_resource.reload! mock.verify _(sub_resource.name).must_equal sub_path - _(sub_resource.topic.name).must_equal topic_path(topic_name) _(sub_resource.deadline).must_equal 30 - _(sub_resource.endpoint).must_equal "http://example.net/endpoint" - _(sub_resource.labels).must_equal({ "foo" => "bar" }) _(sub_resource).wont_be :reference? _(sub_resource).must_be :resource? end - it "is reloads a reference by calling get_topic API" do + it "reloads a reference by calling get_subscription API" do _(sub_reference.name).must_equal sub_path _(sub_reference).must_be :reference? _(sub_reference).wont_be :resource? mock = Minitest::Mock.new mock.expect :get_subscription, sub_grpc_new, subscription: sub_path - pubsub.service.mocked_subscriber = mock + pubsub.service.mocked_subscription_admin = mock sub_reference.reload! @@ -74,9 +65,27 @@ _(sub_reference.name).must_equal sub_path _(sub_reference.deadline).must_equal 30 - _(sub_reference.endpoint).must_equal "http://example.net/endpoint" - _(sub_reference.labels).must_equal({ "foo" => "bar" }) _(sub_reference).wont_be :reference? _(sub_reference).must_be :resource? end + + it "reloads a subscription_resource by calling get_subscription API" do + _(sub_reference.name).must_equal sub_path + _(sub_reference).must_be :reference? + _(sub_reference).wont_be :resource? + + mock = Minitest::Mock.new + mock.expect :get_subscription, sub_grpc_new, subscription: sub_path + pubsub.service.mocked_subscription_admin = mock + + subs_resource = sub_reference.subscription_resource + + mock.verify + + _(subs_resource).must_be_kind_of Google::Cloud::PubSub::V1::Subscription + _(subs_resource.name).must_equal sub_path + _(sub_reference).wont_be :reference? + _(sub_reference).must_be :resource? + end + end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber_test.rb index 9a1ef5258872..fc48203309b6 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber_test.rb @@ -1,4 +1,4 @@ -# Copyright 2017 Google LLC +# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,85 +15,71 @@ require "helper" describe Google::Cloud::PubSub::Subscriber, :mock_pubsub do - let(:callback) { Proc.new { |msg| puts msg.inspect } } + let(:topic_name) { "topic-name-goes-here" } let(:subscription_name) { "subscription-name-goes-here" } - let(:deadline) { 120 } - let(:streams) { 8 } - let(:max_outstanding_messages) { 2000 } - let(:callback_threads) { 16 } - let(:push_threads) { 8 } - let :subscriber do - Google::Cloud::PubSub::Subscriber.new( - subscription_name, - callback, - deadline: deadline, - streams: streams, - inventory: max_outstanding_messages, - threads: { - callback: callback_threads, - push: push_threads - }, - service: pubsub.service - ) + let(:subscription_grpc) { Google::Cloud::PubSub::V1::Subscription.new(subscription_hash(topic_name, subscription_name)) } + let(:subscriber) { Google::Cloud::PubSub::Subscriber.from_grpc subscription_grpc, pubsub.service } + let(:labels) { { "foo" => "bar" } } + + it "knows its name" do + _(subscriber.name).must_equal subscription_path(subscription_name) + end + + it "has an ack deadline" do + _(subscriber).must_respond_to :deadline + end + + it "can pull a message" do + rec_message_msg = "pulled-message" + pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) + mock = Minitest::Mock.new + mock.expect :pull, pull_res, subscription: subscription_path(subscription_name), max_messages: 100, return_immediately: true + subscriber.service.mocked_subscription_admin = mock + + rec_messages = subscriber.pull + + mock.verify + + _(rec_messages).wont_be :empty? + _(rec_messages.first.message.data).must_equal rec_message_msg end - it "knows its defaults" do - subscriber = Google::Cloud::PubSub::Subscriber.new( - subscription_name, - callback, - service: pubsub.service - ) - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 # deprecated Use #max_outstanding_messages. - _(subscriber.inventory_limit).must_equal 1000 # deprecated Use #max_outstanding_messages. - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100_000_000 # deprecated Use #max_outstanding_bytes. - _(subscriber.max_outstanding_bytes).must_equal 100_000_000 - _(subscriber.inventory_extension).must_equal 3600 # deprecated Use #max_total_lease_duration. - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.min_duration_per_lease_extension).must_equal 0 - _(subscriber.stream_inventory).must_equal({limit: 500, bytesize: 50000000, max_duration_per_lease_extension: 0, min_duration_per_lease_extension: 0, extension: 3600, use_legacy_flow_control: false}) - _(subscriber.callback_threads).must_equal 8 - _(subscriber.push_threads).must_equal 4 + it "can acknowledge one message" do + ack_res = nil + mock = Minitest::Mock.new + mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1"] + subscriber.service.mocked_subscription_admin = mock + + subscriber.acknowledge "ack-id-1" + + mock.verify + end + + it "can acknowledge many messages" do + ack_res = nil + mock = Minitest::Mock.new + mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1", "ack-id-2", "ack-id-3"] + subscriber.service.mocked_subscription_admin = mock + + subscriber.acknowledge "ack-id-1", "ack-id-2", "ack-id-3" + + mock.verify end - it "knows its given attributes and retains defaults" do - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.callback).must_equal callback - _(subscriber.subscription_name).must_equal subscription_name - _(subscriber.deadline).must_equal deadline - _(subscriber.streams).must_equal streams - _(subscriber.inventory).must_equal max_outstanding_messages # deprecated Use #max_outstanding_messages. - _(subscriber.inventory_limit).must_equal max_outstanding_messages # deprecated Use #max_outstanding_messages. - _(subscriber.max_outstanding_messages).must_equal max_outstanding_messages - _(subscriber.inventory_bytesize).must_equal 100_000_000 # deprecated Use #max_outstanding_bytes. - _(subscriber.max_outstanding_bytes).must_equal 100_000_000 - _(subscriber.inventory_extension).must_equal 3600 # deprecated Use #max_total_lease_duration. - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.min_duration_per_lease_extension).must_equal 0 - _(subscriber.stream_inventory).must_equal({limit: 250, bytesize: 12500000, max_duration_per_lease_extension: 0, min_duration_per_lease_extension: 0, extension: 3600, use_legacy_flow_control: false}) - _(subscriber.callback_threads).must_equal callback_threads - _(subscriber.push_threads).must_equal push_threads - - _(subscriber.to_s).must_equal "(subscription: subscription-name-goes-here, streams: [(inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started), (inventory: 0, status: running, thread: not started)])" - _(subscriber.stream_pool.first.to_s).must_equal "(inventory: 0, status: running, thread: not started)" + it "can acknowledge with ack" do + ack_res = nil + mock = Minitest::Mock.new + mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1"] + subscriber.service.mocked_subscription_admin = mock + + subscriber.ack "ack-id-1" + + mock.verify end - it "propagates use_legacy_flow_control" do - subscriber = Google::Cloud::PubSub::Subscriber.new( - subscription_name, - callback, - inventory: { - max_outstanding_messages: 999, - use_legacy_flow_control: true - } - ) - _(subscriber.max_outstanding_messages).must_equal 999 - _(subscriber.use_legacy_flow_control?).must_equal true - _(subscriber.stream_inventory).must_equal({limit: 500, bytesize: 50000000, max_duration_per_lease_extension: 0, min_duration_per_lease_extension: 0, extension: 3600, use_legacy_flow_control: true}) + it "retrieves a subscription_resource" do + subs_resource = subscriber.subscription_resource + _(subs_resource).must_be_kind_of Google::Cloud::PubSub::V1::Subscription + _(subs_resource).must_equal subscription_grpc end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/acknowledge_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/acknowledge_test.rb deleted file mode 100644 index d5d9dc33f318..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/acknowledge_test.rb +++ /dev/null @@ -1,274 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :pull, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ - rec_message_hash("rec_message1-msg-goes-here") } - let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ - rec_message_hash("rec_message2-msg-goes-here") } - let(:rec_msg3_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new \ - rec_message_hash("rec_message3-msg-goes-here") } - let(:rec_message1) { Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_msg1_grpc, subscription } - let(:rec_message2) { Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_msg2_grpc, subscription } - let(:rec_message3) { Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_msg3_grpc, subscription } - - it "can acknowledge an ack id" do - ack_id = rec_message1.ack_id - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: [ack_id] - subscription.service.mocked_subscriber = mock - - subscription.acknowledge ack_id - - mock.verify - end - - it "can acknowledge many ack ids" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: ack_ids - subscription.service.mocked_subscriber = mock - - subscription.acknowledge(*ack_ids) - - mock.verify - end - - it "can acknowledge many ack ids in an array" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: ack_ids - subscription.service.mocked_subscriber = mock - - subscription.acknowledge ack_ids - - mock.verify - end - - it "can acknowledge a message" do - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: [rec_message1.ack_id] - subscription.service.mocked_subscriber = mock - - subscription.acknowledge rec_message1 - - mock.verify - end - - it "can acknowledge many messages" do - rec_messages = [rec_message1, rec_message3, rec_message3] - ack_ids = rec_messages.map(&:ack_id) - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: ack_ids - subscription.service.mocked_subscriber = mock - - subscription.acknowledge(*rec_messages) - - mock.verify - end - - it "can acknowledge many messages in an array" do - rec_messages = [rec_message1, rec_message3, rec_message3] - ack_ids = rec_messages.map(&:ack_id) - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: ack_ids - subscription.service.mocked_subscriber = mock - - subscription.acknowledge rec_messages - - mock.verify - end - - describe "reference subscription object of a subscription that does exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "can acknowledge an ack id" do - ack_id = rec_message1.ack_id - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: [ack_id] - subscription.service.mocked_subscriber = mock - - subscription.acknowledge ack_id - - mock.verify - end - - it "can acknowledge many ack ids" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: ack_ids - subscription.service.mocked_subscriber = mock - - subscription.acknowledge(*ack_ids) - - mock.verify - end - - it "can acknowledge many ack ids in an array" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: ack_ids - subscription.service.mocked_subscriber = mock - - subscription.acknowledge ack_ids - - mock.verify - end - - it "can acknowledge a message" do - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: [rec_message1.ack_id] - subscription.service.mocked_subscriber = mock - - subscription.acknowledge rec_message1 - - mock.verify - end - - it "can acknowledge many messages" do - rec_messages = [rec_message1, rec_message3, rec_message3] - ack_ids = rec_messages.map(&:ack_id) - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: ack_ids - subscription.service.mocked_subscriber = mock - - subscription.acknowledge(*rec_messages) - - mock.verify - end - - it "can acknowledge many messages in an array" do - rec_messages = [rec_message1, rec_message3, rec_message3] - ack_ids = rec_messages.map(&:ack_id) - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(sub_name), ack_ids: ack_ids - subscription.service.mocked_subscriber = mock - - subscription.acknowledge rec_messages - - mock.verify - end - end - - describe "reference subscription object of a subscription that does not exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "raises NotFoundError when acknowledging an ack id" do - ack_id = rec_message1.ack_id - - stub = Object.new - def stub.acknowledge *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.acknowledge ack_id - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when acknowledging many ack ids" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - - stub = Object.new - def stub.acknowledge *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.acknowledge(*ack_ids) - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when acknowledging many ack ids in an array" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - - stub = Object.new - def stub.acknowledge *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.acknowledge ack_ids - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when acknowledging a message" do - stub = Object.new - def stub.acknowledge *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.acknowledge rec_message1 - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when acknowledging many messages" do - rec_messages = [rec_message1, rec_message3, rec_message3] - - stub = Object.new - def stub.acknowledge *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.acknowledge(*rec_messages) - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when acknowledging many messages in an array" do - rec_messages = [rec_message1, rec_message3, rec_message3] - - stub = Object.new - def stub.acknowledge *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.acknowledge rec_messages - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/attrs_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/attrs_test.rb deleted file mode 100644 index d996e15f5e93..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/attrs_test.rb +++ /dev/null @@ -1,421 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :attributes, :mock_pubsub do - let(:labels) { { "foo" => "bar" } } - let(:topic_name) { "topic-name-goes-here" } - let(:table_id) { "table_id" } - let(:dead_letter_topic_path) { topic_path("topic-name-dead-letter") } - let(:retry_minimum_backoff) { 12.123 } - let(:retry_maximum_backoff) { 123.321 } - let(:filter) { "attributes.event_type = \"1\"" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_hash) do - subscription_hash topic_name, sub_name, labels: labels, dead_letter_topic: dead_letter_topic_path, \ - max_delivery_attempts: 6, retry_minimum_backoff: retry_minimum_backoff, retry_maximum_backoff: retry_maximum_backoff, \ - filter: filter, detached: true - end - let(:sub_deadline) { sub_hash[:ack_deadline_seconds] } - let(:sub_endpoint) { sub_hash[:push_config][:push_endpoint] } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - let(:bq_subscription) do - Google::Cloud::PubSub::Subscription.from_grpc Google::Cloud::PubSub::V1::Subscription.new(sub_hash.merge!({ - bigquery_config: { - table: table_id, - write_metadata: true - } - })), - pubsub.service - end - - it "gets topic from the Google API object" do - # No mocked service means no API calls are happening. - _(subscription.topic).must_be_kind_of Google::Cloud::PubSub::Topic - _(subscription.topic).must_be :reference? - _(subscription.topic).wont_be :resource? - _(subscription.topic.name).must_equal topic_path(topic_name) - end - - it "gets deadline from the Google API object" do - _(subscription.deadline).must_equal sub_deadline - end - - it "gets retain_acked from the Google API object" do - assert subscription.retain_acked - end - - it "gets its retention from the Google API object" do - _(subscription.retention).must_equal 600.9 - end - - it "gets endpoint from the Google API object" do - _(subscription.endpoint).must_equal sub_endpoint - end - - it "can update the endpoint" do - new_push_endpoint = "https://foo.bar/baz" - push_config = Google::Cloud::PubSub::V1::PushConfig.new(push_endpoint: new_push_endpoint) - mpc_res = nil - mock = Minitest::Mock.new - mock.expect :modify_push_config, mpc_res, subscription: subscription_path(sub_name), push_config: push_config - pubsub.service.mocked_subscriber = mock - - subscription.endpoint = new_push_endpoint - - mock.verify - end - - it "gets expires_in from the Google API object" do - two_days_seconds = 60*60*24*2 - _(subscription.expires_in).must_equal two_days_seconds - end - - it "gets push_config from the Google API object" do - _(bq_subscription.bigquery_config).must_be_kind_of Google::Cloud::PubSub::V1::BigQueryConfig - _(bq_subscription.bigquery_config.table).must_equal table_id - _(bq_subscription.bigquery_config.write_metadata).must_equal true - end - - it "can update bigquery config" do - mock = Minitest::Mock.new - mask = Google::Protobuf::FieldMask.new paths: ["bigquery_config"] - new_config = Google::Cloud::PubSub::V1::BigQueryConfig.new table: table_id, write_metadata: false - mock.expect :update_subscription, - nil, - subscription: Google::Cloud::PubSub::V1::Subscription.new(name: "projects/test/subscriptions/#{sub_name}", - bigquery_config: new_config), - update_mask: mask - pubsub.service.mocked_subscriber = mock - - bq_subscription.bigquery_config do |bq_config| - bq_config.write_metadata = false - end - - mock.verify - end - - it "gets bigquery_config from the Google API object" do - _(subscription.push_config).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig - _(subscription.push_config.endpoint).must_equal sub_endpoint - _(subscription.push_config.authentication).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig::OidcToken - _(subscription.push_config.authentication.email).must_equal "user@example.com" - _(subscription.push_config.authentication.audience).must_equal "client-12345" - _(subscription.push_config).must_be :oidc_token? - end - - it "gets labels from the Google API object" do - _(subscription.labels).must_equal labels - end - - it "gets filter from the Google API object" do - _(subscription.filter).must_equal filter - end - - it "gets dead_letter_topic from the Google API object" do - _(subscription.dead_letter_topic.name).must_equal dead_letter_topic_path - end - - it "gets dead_letter_max_delivery_attempts from the Google API object" do - _(subscription.dead_letter_max_delivery_attempts).must_equal 6 - end - - it "gets retry_minimum_backoff from the Google API object" do - _(subscription.retry_policy.minimum_backoff).must_equal retry_minimum_backoff - end - - it "gets retry_maximum_backoff from the Google API object" do - _(subscription.retry_policy.maximum_backoff).must_equal retry_maximum_backoff - end - - it "gets detached from the Google API object" do - _(subscription.detached?).must_equal true - end - - describe "reference subscription object of a subscription that does exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "makes an HTTP API call to retrieve topic" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.topic).must_be_kind_of Google::Cloud::PubSub::Topic - - mock.verify - - _(subscription.topic).must_be :reference? - _(subscription.topic).wont_be :resource? - _(subscription.topic.name).must_equal topic_path(topic_name) - end - - it "makes an HTTP API call to retrieve deadline" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.deadline).must_equal sub_deadline - - mock.verify - end - - it "makes an HTTP API call to retrieve retain_acked" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - assert subscription.retain_acked - - mock.verify - end - - it "makes an HTTP API call to retrieve endpoint" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.endpoint).must_equal sub_endpoint - - mock.verify - end - - it "makes an HTTP API call to retrieve expires_in" do - two_days_seconds = 60*60*24*2 - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.expires_in).must_equal two_days_seconds - - mock.verify - end - - it "makes an HTTP API call to retrieve labels" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name, labels: labels) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.labels).must_equal labels - - mock.verify - end - - it "makes an HTTP API call to retrieve filter" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name, filter: filter) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.filter).must_equal filter - - mock.verify - end - - it "makes an HTTP API call to retrieve dead_letter_topic and dead_letter_max_delivery_attempts" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name, dead_letter_topic: dead_letter_topic_path, max_delivery_attempts: 7) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.dead_letter_topic.name).must_equal dead_letter_topic_path - _(subscription.dead_letter_max_delivery_attempts).must_equal 7 - - mock.verify - end - - it "makes an HTTP API call to retrieve retry_minimum_backoff" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name, retry_minimum_backoff: retry_minimum_backoff) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.retry_policy.minimum_backoff).must_equal retry_minimum_backoff - - mock.verify - end - - it "makes an HTTP API call to retrieve retry_maximum_backoff" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name, retry_maximum_backoff: retry_maximum_backoff) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.retry_policy.maximum_backoff).must_equal retry_maximum_backoff - - mock.verify - end - - it "makes an HTTP API call to retrieve detached" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name, detached: true) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - subscription.service.mocked_subscriber = mock - - _(subscription.detached?).must_equal true - - mock.verify - end - - it "does not make an HTTP API call to access push_config" do - _(subscription.push_config).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig - _(subscription.push_config.endpoint).must_be :empty? - _(subscription.push_config.authentication).must_be :nil? - end - end - - describe "reference subscription object of a subscription that does not exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "raises NotFoundError when retrieving topic" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.topic - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when retrieving deadline" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.deadline - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when retrieving endpoint" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.endpoint - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when retrieving expires_in" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.expires_in - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when retrieving labels" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.labels - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when retrieving filter" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.filter - end.must_raise Google::Cloud::NotFoundError - end - - it "does not raise NotFoundError when accessing push_config" do - _(subscription.push_config).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig - _(subscription.push_config.endpoint).must_be :empty? - _(subscription.push_config.authentication).must_be :nil? - end - - it "raises NotFoundError when retrieving dead_letter_topic" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.dead_letter_topic - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when retrieving dead_letter_max_delivery_attempts" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.dead_letter_max_delivery_attempts - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when retrieving retry_policy" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.retry_policy - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when retrieving detached" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.detached? - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/delete_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/delete_test.rb deleted file mode 100644 index 9cfa31078a49..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/delete_test.rb +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :delete, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - - it "can delete itself" do - del_res = nil - mock = Minitest::Mock.new - mock.expect :delete_subscription, del_res, subscription: subscription_path(sub_name) - pubsub.service.mocked_subscriber = mock - - subscription.delete - - mock.verify - end - - describe "reference subscription object of a subscription that does exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "can delete itself" do - del_res = nil - mock = Minitest::Mock.new - mock.expect :delete_subscription, del_res, subscription: subscription_path(sub_name) - pubsub.service.mocked_subscriber = mock - - subscription.delete - - mock.verify - end - end - - describe "reference subscription object of a subscription that does not exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "raises NotFoundError when deleting itself" do - stub = Object.new - def stub.delete_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.delete - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/detach_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/detach_test.rb deleted file mode 100644 index cbb3739ce0db..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/detach_test.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2020 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :detach, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_path) { subscription_path sub_name } - let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - - describe "resource subscription" do - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - - it "can detach itself" do - mock = Minitest::Mock.new - mock.expect :detach_subscription, nil, subscription: sub_path - pubsub.service.mocked_publisher = mock - - subscription.detach - - mock.verify - end - end - - describe "reference subscription" do - let(:subscription) { Google::Cloud::PubSub::Subscription.from_name sub_name, pubsub.service } - - it "can detach itself if it exists" do - mock = Minitest::Mock.new - mock.expect :detach_subscription, nil, subscription: sub_path - pubsub.service.mocked_publisher = mock - - subscription.detach - - mock.verify - end - - it "raises NotFoundError when detach is called if it does not exist" do - stub = Object.new - def stub.detach_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_publisher = stub - - expect do - subscription.detach - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/listen_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/listen_test.rb deleted file mode 100644 index 374b8dc52ec3..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/listen_test.rb +++ /dev/null @@ -1,271 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :listen, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - - it "will create a Subscriber" do - subscriber = subscription.listen do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set deadline while creating a Subscriber" do - subscriber = subscription.listen deadline: 120 do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 120 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set deadline while creating a Subscriber" do - subscriber = subscription.listen streams: 2 do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory (deprecated) while creating a Subscriber" do - subscriber = subscription.listen inventory: 500 do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 500 - _(subscriber.inventory_limit).must_equal 500 - _(subscriber.max_outstanding_messages).must_equal 500 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory max_outstanding_messages while creating a Subscriber" do - subscriber = subscription.listen inventory: { max_outstanding_messages: 500 } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 500 - _(subscriber.inventory_limit).must_equal 500 - _(subscriber.max_outstanding_messages).must_equal 500 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory limit alias while creating a Subscriber" do - subscriber = subscription.listen inventory: { limit: 500 } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 500 - _(subscriber.inventory_limit).must_equal 500 - _(subscriber.max_outstanding_messages).must_equal 500 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory max_outstanding_bytes while creating a Subscriber" do - subscriber = subscription.listen inventory: { max_outstanding_bytes: 50_000 } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 50_000 - _(subscriber.max_outstanding_bytes).must_equal 50_000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory bytesize alias while creating a Subscriber" do - subscriber = subscription.listen inventory: { bytesize: 50_000 } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 50_000 - _(subscriber.max_outstanding_bytes).must_equal 50_000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory max_total_lease_duration while creating a Subscriber" do - subscriber = subscription.listen inventory: { max_total_lease_duration: 7_200 } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 7200 - _(subscriber.max_total_lease_duration).must_equal 7200 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory extension alias while creating a Subscriber" do - subscriber = subscription.listen inventory: { extension: 7_200 } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 7200 - _(subscriber.max_total_lease_duration).must_equal 7200 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory max_duration_per_lease_extension while creating a Subscriber" do - subscriber = subscription.listen inventory: { max_duration_per_lease_extension: 10 } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 10 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will set inventory min_duration_per_lease_extension while creating a Subscriber" do - subscriber = subscription.listen inventory: { min_duration_per_lease_extension: 10 } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.min_duration_per_lease_extension).must_equal 10 - _(subscriber.use_legacy_flow_control?).must_equal false - end - - it "will use inventory use_legacy_flow_control while creating a Subscriber" do - subscriber = subscription.listen inventory: { use_legacy_flow_control: true } do |msg| - puts msg.msg_id - end - _(subscriber).must_be_kind_of Google::Cloud::PubSub::Subscriber - _(subscriber.subscription_name).must_equal subscription.name - _(subscriber.deadline).must_equal 60 - _(subscriber.streams).must_equal 2 - _(subscriber.inventory).must_equal 1000 - _(subscriber.inventory_limit).must_equal 1000 - _(subscriber.max_outstanding_messages).must_equal 1000 - _(subscriber.inventory_bytesize).must_equal 100000000 - _(subscriber.max_outstanding_bytes).must_equal 100000000 - _(subscriber.inventory_extension).must_equal 3600 - _(subscriber.max_total_lease_duration).must_equal 3600 - _(subscriber.max_duration_per_lease_extension).must_equal 0 - _(subscriber.use_legacy_flow_control?).must_equal true - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/modify_ack_deadline_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/modify_ack_deadline_test.rb deleted file mode 100644 index 2912910a0993..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/modify_ack_deadline_test.rb +++ /dev/null @@ -1,286 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :modify_ack_deadline, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - let(:rec_msg1_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new rec_message_hash("rec_message1-msg-goes-here") } - let(:rec_msg2_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new rec_message_hash("rec_message2-msg-goes-here") } - let(:rec_msg3_grpc) { Google::Cloud::PubSub::V1::ReceivedMessage.new rec_message_hash("rec_message3-msg-goes-here") } - let(:rec_message1) { Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_msg1_grpc, subscription } - let(:rec_message2) { Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_msg2_grpc, subscription } - let(:rec_message3) { Google::Cloud::PubSub::ReceivedMessage.from_grpc rec_msg3_grpc, subscription } - - it "can modify_ack_deadline an ack id" do - ack_id = rec_message1.ack_id - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: [ack_id], ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, ack_id - - mock.verify - end - - it "can modify_ack_deadline many ack ids" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: ack_ids, ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, *ack_ids - - mock.verify - end - - it "can modify_ack_deadline many ack ids in an array" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: ack_ids, ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, ack_ids - - mock.verify - end - - it "can modify_ack_deadline a message" do - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: [rec_message1.ack_id], ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, rec_message1 - - mock.verify - end - - it "can modify_ack_deadline many messages" do - rec_messages = [rec_message1, rec_message3, rec_message3] - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: rec_messages.map(&:ack_id), ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, *rec_messages - - mock.verify - end - - it "can modify_ack_deadline many messages in an array" do - rec_messages = [rec_message1, rec_message3, rec_message3] - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: rec_messages.map(&:ack_id), ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, rec_messages - - mock.verify - end - - describe "reference subscription object of a subscription that does exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "can modify_ack_deadline an ack id" do - ack_id = rec_message1.ack_id - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: [ack_id], ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, ack_id - - mock.verify - end - - it "can modify_ack_deadline many ack ids" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: ack_ids, ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, *ack_ids - - mock.verify - end - - it "can modify_ack_deadline many ack ids in an array" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: ack_ids, ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, ack_ids - - mock.verify - end - - it "can modify_ack_deadline a message" do - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: [rec_message1.ack_id], ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, rec_message1 - - mock.verify - end - - it "can modify_ack_deadline many messages" do - rec_messages = [rec_message1, rec_message3, rec_message3] - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: rec_messages.map(&:ack_id), ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, *rec_messages - - mock.verify - end - - it "can modify_ack_deadline many messages in an array" do - rec_messages = [rec_message1, rec_message3, rec_message3] - new_deadline = 42 - mad_res = nil - mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(sub_name), ack_ids: rec_messages.map(&:ack_id), ack_deadline_seconds: new_deadline - subscription.service.mocked_subscriber = mock - - subscription.modify_ack_deadline new_deadline, rec_messages - - mock.verify - end - end - - describe "reference subscription object of a subscription that does not exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "raises NotFoundError when modify_ack_deadlineing an ack id" do - ack_id = rec_message1.ack_id - new_deadline = 42 - - stub = Object.new - def stub.modify_ack_deadline *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.modify_ack_deadline new_deadline, ack_id - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when modify_ack_deadlineing many ack ids" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - new_deadline = 42 - - stub = Object.new - def stub.modify_ack_deadline *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.modify_ack_deadline new_deadline, *ack_ids - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when modify_ack_deadlineing many ack ids in an array" do - ack_ids = [rec_message1.ack_id, rec_message3.ack_id, rec_message3.ack_id] - new_deadline = 42 - - stub = Object.new - def stub.modify_ack_deadline *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.modify_ack_deadline new_deadline, ack_ids - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when modify_ack_deadlineing a message" do - new_deadline = 42 - - stub = Object.new - def stub.modify_ack_deadline *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.modify_ack_deadline new_deadline, rec_message1 - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when modify_ack_deadlineing many messages" do - rec_messages = [rec_message1, rec_message3, rec_message3] - new_deadline = 42 - - stub = Object.new - def stub.modify_ack_deadline *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.modify_ack_deadline new_deadline, *rec_messages - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when modify_ack_deadlineing many messages in an array" do - rec_messages = [rec_message1, rec_message3, rec_message3] - new_deadline = 42 - - stub = Object.new - def stub.modify_ack_deadline *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.modify_ack_deadline new_deadline, rec_messages - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/policy_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/policy_test.rb deleted file mode 100644 index cff6329438df..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/policy_test.rb +++ /dev/null @@ -1,245 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :policy, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - - it "gets the IAM Policy" do - policy_hash = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/viewer", - "members" => [ - "user:viewer@example.com", - "serviceAccount:1234567890@developer.gserviceaccount.com" - ] - }] - } - get_res = Google::Iam::V1::Policy.decode_json policy_hash.to_json - mock = Minitest::Mock.new - mock.expect :get_iam_policy, get_res, resource: subscription_path(sub_name) - subscription.service.mocked_iam = mock - - policy = subscription.policy - - mock.verify - - _(policy).must_be_kind_of Google::Cloud::PubSub::Policy - _(policy.etag).must_equal "\b\x01" - _(policy.roles).must_be_kind_of Hash - _(policy.roles.size).must_equal 1 - _(policy.roles["roles/viewer"]).must_be_kind_of Array - _(policy.roles["roles/viewer"].count).must_equal 2 - _(policy.roles["roles/viewer"].first).must_equal "user:viewer@example.com" - _(policy.roles["roles/viewer"].last).must_equal "serviceAccount:1234567890@developer.gserviceaccount.com" - end - - it "sets the IAM Policy" do - policy_hash = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "user:owner@example.com", - "serviceAccount:0987654321@developer.gserviceaccount.com" - ] - }] - } - get_res = Google::Iam::V1::Policy.decode_json policy_hash.to_json - mock = Minitest::Mock.new - mock.expect :get_iam_policy, get_res, resource: subscription_path(sub_name) - - updated_policy = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "serviceAccount:0987654321@developer.gserviceaccount.com", - "user:newowner@example.com" - ] - }] - } - new_policy = { - "etag"=>"CBD=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "serviceAccount:0987654321@developer.gserviceaccount.com", - "user:newowner@example.com" - ] - }] - } - - set_req = Google::Iam::V1::Policy.decode_json JSON.dump(updated_policy) - set_res = Google::Iam::V1::Policy.decode_json JSON.dump(new_policy) - mock.expect :set_iam_policy, set_res, resource: subscription_path(sub_name), policy: set_req - subscription.service.mocked_iam = mock - - policy = subscription.policy - - policy.add "roles/owner", "user:newowner@example.com" - policy.remove "roles/owner", "user:owner@example.com" - - policy_2 = subscription.update_policy policy - - mock.verify - - _(policy_2).must_be_kind_of Google::Cloud::PubSub::Policy - _(policy_2.etag).must_equal "\b\x10" - _(policy_2.roles).must_be_kind_of Hash - _(policy_2.roles.size).must_equal 1 - _(policy_2.roles["roles/viewer"]).must_be :nil? - _(policy_2.roles["roles/owner"]).must_be_kind_of Array - _(policy_2.roles["roles/owner"].count).must_equal 2 - _(policy_2.roles["roles/owner"].first).must_equal "serviceAccount:0987654321@developer.gserviceaccount.com" - _(policy_2.roles["roles/owner"].last).must_equal "user:newowner@example.com" - end - - it "sets the IAM Policy in a block" do - policy_hash = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "user:owner@example.com", - "serviceAccount:0987654321@developer.gserviceaccount.com" - ] - }] - } - get_res = Google::Iam::V1::Policy.decode_json policy_hash.to_json - mock = Minitest::Mock.new - mock.expect :get_iam_policy, get_res, resource: subscription_path(sub_name) - - updated_policy = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "serviceAccount:0987654321@developer.gserviceaccount.com", - "user:newowner@example.com" - ] - }] - } - new_policy = { - "etag"=>"CBA=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "serviceAccount:0987654321@developer.gserviceaccount.com", - "user:newowner@example.com" - ] - }] - } - set_req = Google::Iam::V1::Policy.decode_json JSON.dump(updated_policy) - set_res = Google::Iam::V1::Policy.decode_json JSON.dump(new_policy) - mock.expect :set_iam_policy, set_res, resource: subscription_path(sub_name), policy: set_req - subscription.service.mocked_iam = mock - - policy = subscription.policy do |p| - p.add "roles/owner", "user:newowner@example.com" - p.remove "roles/owner", "user:owner@example.com" - end - - mock.verify - - _(policy).must_be_kind_of Google::Cloud::PubSub::Policy - _(policy.etag).must_equal "\b\x10" - _(policy.roles).must_be_kind_of Hash - _(policy.roles.size).must_equal 1 - _(policy.roles["roles/viewer"]).must_be :nil? - _(policy.roles["roles/owner"]).must_be_kind_of Array - _(policy.roles["roles/owner"].count).must_equal 2 - _(policy.roles["roles/owner"].first).must_equal "serviceAccount:0987654321@developer.gserviceaccount.com" - _(policy.roles["roles/owner"].last).must_equal "user:newowner@example.com" - end - - it "tests the available permissions" do - permissions = ["pubsub.subscriptions.get", "pubsub.subscriptions.consume"] - test_res = Google::Iam::V1::TestIamPermissionsResponse.new( - permissions: ["pubsub.subscriptions.get"] - ) - mock = Minitest::Mock.new - mock.expect :test_iam_permissions, test_res, resource: subscription_path(sub_name), permissions: permissions - subscription.service.mocked_iam = mock - - permissions = subscription.test_permissions "pubsub.subscriptions.get", - "pubsub.subscriptions.consume" - - mock.verify - - _(permissions).must_equal ["pubsub.subscriptions.get"] - end - - it "removes the only member in the IAM Policy" do - policy_hash = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "user:owner@example.com" - ] - }] - } - get_res = Google::Iam::V1::Policy.decode_json policy_hash.to_json - mock = Minitest::Mock.new - mock.expect :get_iam_policy, get_res, resource: subscription_path(sub_name) - - updated_policy = { - "etag"=>"CAE=", - "bindings" => [] - } - new_policy = { - "etag"=>"CBA=", - "bindings" => [] - } - set_req = Google::Iam::V1::Policy.decode_json JSON.dump(updated_policy) - set_res = Google::Iam::V1::Policy.decode_json JSON.dump(new_policy) - mock.expect :set_iam_policy, set_res, resource: subscription_path(sub_name), policy: set_req - subscription.service.mocked_iam = mock - - policy = subscription.policy do |p| - p.remove "roles/owner", "user:owner@example.com" - end - - mock.verify - - _(policy).must_be_kind_of Google::Cloud::PubSub::Policy - _(policy.etag).must_equal "\b\x10" - _(policy.roles).must_be_kind_of Hash - _(policy.roles).must_be :empty? - end - - it "tests the available permissions" do - permissions = ["pubsub.subscriptions.get", "pubsub.subscriptions.consume"] - test_res = Google::Iam::V1::TestIamPermissionsResponse.new( - permissions: ["pubsub.subscriptions.get"] - ) - mock = Minitest::Mock.new - mock.expect :test_iam_permissions, test_res, resource: subscription_path(sub_name), permissions: permissions - subscription.service.mocked_iam = mock - - permissions = subscription.test_permissions "pubsub.subscriptions.get", - "pubsub.subscriptions.consume" - - mock.verify - - _(permissions).must_equal ["pubsub.subscriptions.get"] - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/push_config_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/push_config_test.rb deleted file mode 100644 index eaade7f7d819..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/push_config_test.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2017 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription::PushConfig do - let(:endpoint) { "https://pub-sub.test.com/pubsub" } - let(:email) { "service-account@example.net" } - let(:audience) { "audience-header-value" } - - it "constructs a PushConfig with arguments" do - push_config = Google::Cloud::PubSub::Subscription::PushConfig.new endpoint: endpoint, email: email, audience: audience - - _(push_config.endpoint).must_equal endpoint - _(push_config.authentication).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig::OidcToken - _(push_config.authentication.email).must_equal email - _(push_config.authentication.audience).must_equal audience - end - - it "does not accept audience without an email" do - assert_raises ArgumentError do - Google::Cloud::PubSub::Subscription::PushConfig.new endpoint: endpoint, email: nil, audience: audience - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/seek_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/seek_test.rb deleted file mode 100644 index 0f884b5da395..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/seek_test.rb +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 2017 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :seek, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_hash) { subscription_hash topic_name, sub_name } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - let(:snapshot_name) { "my-snapshot" } - let(:snapshot_grpc) { Google::Cloud::PubSub::V1::Snapshot.new(snapshot_hash(topic_name, snapshot_name)) } - let(:snapshot) { Google::Cloud::PubSub::Snapshot.from_grpc snapshot_grpc, pubsub.service } - - it "can seek using a time" do - time = Time.now - mock = Minitest::Mock.new - timestamp = Google::Protobuf::Timestamp.new seconds: time.to_i, nanos: time.nsec - mock.expect :seek, nil, subscription: subscription_path(sub_name), time: timestamp - subscription.service.mocked_subscriber = mock - - subscription.seek time - - mock.verify - end - - it "can seek using a snapshot name" do - mock = Minitest::Mock.new - mock.expect :seek, nil, subscription: subscription_path(sub_name), snapshot: snapshot_path(snapshot_name) - subscription.service.mocked_subscriber = mock - - subscription.seek snapshot_name - - mock.verify - end - - it "can seek using a snapshot object" do - mock = Minitest::Mock.new - mock.expect :seek, nil, subscription: subscription_path(sub_name), snapshot: snapshot.name - subscription.service.mocked_subscriber = mock - subscription.seek snapshot - - mock.verify - end - - describe "reference subscription object of a subscription that does exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "can seek using a snapshot name" do - mock = Minitest::Mock.new - snapshot_name = "my-snapshot" - mock.expect :seek, nil, subscription: subscription_path(sub_name), snapshot: snapshot_path(snapshot_name) - subscription.service.mocked_subscriber = mock - - subscription.seek snapshot_name - - mock.verify - end - end - - describe "reference subscription object of a subscription that does not exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "raises NotFoundError when seeking" do - stub = Object.new - def stub.seek *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.seek "my-snapshot" - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/update_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription/update_test.rb deleted file mode 100644 index a2e6b428ebe7..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription/update_test.rb +++ /dev/null @@ -1,562 +0,0 @@ -# Copyright 2017 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :update, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:sub_name) { "subscription-name-goes-here" } - let(:sub_path) { subscription_path sub_name } - let(:labels) { { "foo" => "bar" } } - let(:new_labels) { { "baz" => "qux" } } - let(:new_labels_map) do - labels_map = Google::Protobuf::Map.new(:string, :string) - new_labels.each { |k, v| labels_map[String(k)] = String(v) } - labels_map - end - let(:dead_letter_topic_name) { "topic-name-dead-letter" } - let(:dead_letter_topic_path) { topic_path(dead_letter_topic_name) } - let(:new_dead_letter_topic_name) { "topic-name-dead-letter-2" } - let(:new_dead_letter_topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(new_dead_letter_topic_name)), pubsub.service } - let(:retry_minimum_backoff) { 12.123 } - let(:new_retry_minimum_backoff) { 13 } - let(:retry_maximum_backoff) { 123.321 } - let(:new_retry_maximum_backoff) { 130 } - let(:sub_hash) { subscription_hash topic_name, sub_name, labels: labels, dead_letter_topic: dead_letter_topic_path, max_delivery_attempts: 6, retry_minimum_backoff: retry_minimum_backoff, retry_maximum_backoff: retry_maximum_backoff } - let(:sub_deadline) { sub_hash["ack_deadline_seconds"] } - let(:sub_endpoint) { sub_hash["push_config"]["push_endpoint"] } - let(:sub_grpc) { Google::Cloud::PubSub::V1::Subscription.new(sub_hash) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc sub_grpc, pubsub.service } - - it "updates deadline" do - _(subscription.deadline).must_equal 60 - - update_sub = update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, ack_deadline_seconds: 30 - update_mask = Google::Protobuf::FieldMask.new paths: ["ack_deadline_seconds"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.deadline = 30 - - mock.verify - - _(subscription.deadline).must_equal 30 - end - - it "updates retain_acked" do - _(subscription.retain_acked).must_equal true - - update_sub = update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, retain_acked_messages: false - update_mask = Google::Protobuf::FieldMask.new paths: ["retain_acked_messages"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.retain_acked = false - - mock.verify - - _(subscription.retain_acked).must_equal false - end - - it "updates retention" do - _(subscription.retention).must_equal 600.9 - - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, message_retention_duration: Google::Cloud::PubSub::Convert.number_to_duration(600.2) - update_mask = Google::Protobuf::FieldMask.new paths: ["message_retention_duration"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.retention = 600.2 - - mock.verify - - _(subscription.retention).must_equal 600.2 - end - - it "updates labels" do - _(subscription.labels).must_equal labels - - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, labels: new_labels - update_mask = Google::Protobuf::FieldMask.new paths: ["labels"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.labels = new_labels - - mock.verify - - _(subscription.labels).must_equal new_labels - end - - it "updates labels to empty hash" do - _(subscription.labels).must_equal labels - - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, labels: {} - - update_mask = Google::Protobuf::FieldMask.new paths: ["labels"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.labels = {} - - mock.verify - - _(subscription.labels).wont_be :nil? - _(subscription.labels).must_be :empty? - end - - it "raises when setting labels to nil" do - _(subscription.labels).must_equal labels - - expect { subscription.labels = nil }.must_raise ArgumentError - - _(subscription.labels).must_equal labels - end - - it "can update the endpoint" do - new_push_endpoint = "https://foo.bar/baz" - - push_config = Google::Cloud::PubSub::V1::PushConfig.new(push_endpoint: new_push_endpoint) - mpc_res = nil - mock = Minitest::Mock.new - mock.expect :modify_push_config, mpc_res, subscription: subscription_path(sub_name), push_config: push_config - pubsub.service.mocked_subscriber = mock - - subscription.endpoint = new_push_endpoint - - mock.verify - end - - it "can update the expires_in" do - week_seconds = 60*60*24*7 - - expiration_policy = Google::Cloud::PubSub::V1::ExpirationPolicy.new( - ttl: Google::Cloud::PubSub::Convert.number_to_duration(week_seconds) - ) - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, expiration_policy: expiration_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["expiration_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - pubsub.service.mocked_subscriber = mock - - subscription.expires_in = week_seconds - - mock.verify - - _(subscription.expires_in).must_equal week_seconds - end - - it "can update the expires_in to nil" do - expiration_policy = Google::Cloud::PubSub::V1::ExpirationPolicy.new - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, expiration_policy: expiration_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["expiration_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - pubsub.service.mocked_subscriber = mock - - subscription.expires_in = nil - - mock.verify - - _(subscription.expires_in).must_be :nil? - end - - it "updates push_config" do - _(subscription.push_config).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig - _(subscription.push_config.endpoint).must_equal "http://example.com/callback" - _(subscription.push_config.authentication).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig::OidcToken - _(subscription.push_config.authentication.email).must_equal "user@example.com" - _(subscription.push_config.authentication.audience).must_equal "client-12345" - - update_sub = Google::Cloud::PubSub::V1::Subscription.new( - name: sub_path, push_config: Google::Cloud::PubSub::V1::PushConfig.new( - push_endpoint: "http://example.net/endpoint", - oidc_token: Google::Cloud::PubSub::V1::PushConfig::OidcToken.new( - service_account_email: "admin@example.net", - audience: "some-header-value" - ) - ) - ) - update_mask = Google::Protobuf::FieldMask.new paths: ["push_config"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.push_config do |pc| - pc.endpoint = "http://example.net/endpoint" - pc.set_oidc_token "admin@example.net", "some-header-value" - end - - mock.verify - - _(subscription.push_config).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig - _(subscription.push_config.endpoint).must_equal "http://example.net/endpoint" - _(subscription.push_config.authentication).must_be_kind_of Google::Cloud::PubSub::Subscription::PushConfig::OidcToken - _(subscription.push_config.authentication.email).must_equal "admin@example.net" - _(subscription.push_config.authentication.audience).must_equal "some-header-value" - end - - it "updates dead_letter_topic" do - dead_letter_policy = Google::Cloud::PubSub::V1::DeadLetterPolicy.new(dead_letter_topic: new_dead_letter_topic.name, max_delivery_attempts: 6) - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, dead_letter_policy: dead_letter_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["dead_letter_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.dead_letter_topic = new_dead_letter_topic - - mock.verify - - _(subscription.dead_letter_topic.name).must_equal new_dead_letter_topic.name - _(subscription.dead_letter_max_delivery_attempts).must_equal 6 - end - - it "updates dead_letter_max_delivery_attempts" do - dead_letter_policy = Google::Cloud::PubSub::V1::DeadLetterPolicy.new(dead_letter_topic: dead_letter_topic_path, max_delivery_attempts: 7) - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, dead_letter_policy: dead_letter_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["dead_letter_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.dead_letter_max_delivery_attempts = 7 - - mock.verify - - _(subscription.dead_letter_topic.name).must_equal dead_letter_topic_path - _(subscription.dead_letter_max_delivery_attempts).must_equal 7 - end - - it "removes the dead letter policy if present" do - dead_letter_policy = Google::Cloud::PubSub::V1::DeadLetterPolicy.new(dead_letter_topic: new_dead_letter_topic.name, max_delivery_attempts: 6) - update_sub = Google::Cloud::PubSub::V1::Subscription.new name: sub_path, dead_letter_policy: nil - update_mask = Google::Protobuf::FieldMask.new paths: ["dead_letter_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - _(subscription.dead_letter_topic).wont_be :nil? - removed = subscription.remove_dead_letter_policy - _(removed).must_equal true - _(subscription.dead_letter_topic).must_be :nil? - _(subscription.dead_letter_max_delivery_attempts).must_be :nil? - removed = subscription.remove_dead_letter_policy - _(removed).must_equal false - - mock.verify - end - - it "raises when updating dead_letter_max_delivery_attempts if dead_letter_topic is not set" do - grpc = Google::Cloud::PubSub::V1::Subscription.new(subscription_hash(topic_name, sub_name)) - subscription_without_dead_letter = Google::Cloud::PubSub::Subscription.from_grpc grpc, pubsub.service - assert_raises ArgumentError do - subscription_without_dead_letter.dead_letter_max_delivery_attempts = 7 - end - end - - it "updates retry_minimum_backoff" do - retry_policy = retry_policy_grpc new_retry_minimum_backoff, retry_maximum_backoff - update_sub = Google::Cloud::PubSub::V1::Subscription.new name: sub_path, retry_policy: retry_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["retry_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: new_retry_minimum_backoff, maximum_backoff: retry_maximum_backoff - - mock.verify - - _(subscription.retry_policy.minimum_backoff).must_equal new_retry_minimum_backoff - _(subscription.retry_policy.maximum_backoff).must_equal retry_maximum_backoff - end - - it "updates retry_maximum_backoff" do - retry_policy = retry_policy_grpc retry_minimum_backoff, new_retry_maximum_backoff - update_sub = Google::Cloud::PubSub::V1::Subscription.new name: sub_path, retry_policy: retry_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["retry_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: retry_minimum_backoff, maximum_backoff: new_retry_maximum_backoff - - mock.verify - - _(subscription.retry_policy.minimum_backoff).must_equal retry_minimum_backoff - _(subscription.retry_policy.maximum_backoff).must_equal new_retry_maximum_backoff - end - - describe :reference do - let(:subscription) { Google::Cloud::PubSub::Subscription.from_name sub_name, pubsub.service } - - it "updates deadline" do - _(subscription).must_be :reference? - _(subscription).wont_be :resource? - - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: subscription_path(sub_name), - ack_deadline_seconds: 30 - sub_grpc.ack_deadline_seconds = 30 - update_mask = Google::Protobuf::FieldMask.new paths: ["ack_deadline_seconds"] - mock = Minitest::Mock.new - mock.expect :update_subscription, sub_grpc, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.deadline = 30 - - mock.verify - - _(subscription).wont_be :reference? - _(subscription).must_be :resource? - _(subscription.deadline).must_equal 30 - end - - it "updates retain_acked" do - _(subscription).must_be :reference? - _(subscription).wont_be :resource? - - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: subscription_path(sub_name), - retain_acked_messages: true - sub_grpc.retain_acked_messages = true - update_mask = Google::Protobuf::FieldMask.new paths: ["retain_acked_messages"] - mock = Minitest::Mock.new - mock.expect :update_subscription, sub_grpc, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.retain_acked = true - - mock.verify - - _(subscription).wont_be :reference? - _(subscription).must_be :resource? - _(subscription.retain_acked).must_equal true - end - - it "updates retention" do - _(subscription).must_be :reference? - _(subscription).wont_be :resource? - - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: subscription_path(sub_name), - message_retention_duration: Google::Cloud::PubSub::Convert.number_to_duration(600.2) - sub_grpc.message_retention_duration = Google::Cloud::PubSub::Convert.number_to_duration 600.2 - update_mask = Google::Protobuf::FieldMask.new paths: ["message_retention_duration"] - mock = Minitest::Mock.new - mock.expect :update_subscription, sub_grpc, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.retention = 600.2 - - mock.verify - - _(subscription).wont_be :reference? - _(subscription).must_be :resource? - _(subscription.retention).must_equal 600.2 - end - - it "updates labels" do - _(subscription).must_be :reference? - _(subscription).wont_be :resource? - - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: subscription_path(sub_name), - labels: new_labels - sub_grpc.labels = new_labels_map - update_mask = Google::Protobuf::FieldMask.new paths: ["labels"] - mock = Minitest::Mock.new - mock.expect :update_subscription, sub_grpc, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.labels = new_labels - - mock.verify - - _(subscription).wont_be :reference? - _(subscription).must_be :resource? - _(subscription.labels).must_equal new_labels - end - - it "updates retry_minimum_backoff" do - _(subscription).must_be :reference? - _(subscription).wont_be :resource? - _(subscription.name).must_equal sub_path - retry_policy = retry_policy_grpc new_retry_minimum_backoff, retry_maximum_backoff - update_sub = Google::Cloud::PubSub::V1::Subscription.new name: sub_path, retry_policy: retry_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["retry_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: new_retry_minimum_backoff, maximum_backoff: retry_maximum_backoff - - mock.verify - - _(subscription).wont_be :reference? - _(subscription).must_be :resource? - _(subscription.retry_policy.minimum_backoff).must_equal new_retry_minimum_backoff - _(subscription.retry_policy.maximum_backoff).must_equal retry_maximum_backoff - end - - it "updates retry_maximum_backoff" do - _(subscription).must_be :reference? - _(subscription).wont_be :resource? - retry_policy = retry_policy_grpc retry_minimum_backoff, new_retry_maximum_backoff - update_sub = Google::Cloud::PubSub::V1::Subscription.new name: sub_path, retry_policy: retry_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["retry_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - subscription.service.mocked_subscriber = mock - - subscription.retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: retry_minimum_backoff, maximum_backoff: new_retry_maximum_backoff - - mock.verify - - _(subscription).wont_be :reference? - _(subscription).must_be :resource? - _(subscription.retry_policy.minimum_backoff).must_equal retry_minimum_backoff - _(subscription.retry_policy.maximum_backoff).must_equal new_retry_maximum_backoff - end - - it "makes an HTTP API call to update endpoint" do - new_push_endpoint = "https://foo.bar/baz" - - push_config = Google::Cloud::PubSub::V1::PushConfig.new(push_endpoint: new_push_endpoint) - mpc_res = nil - mock = Minitest::Mock.new - mock.expect :modify_push_config, mpc_res, subscription: subscription_path(sub_name), push_config: push_config - pubsub.service.mocked_subscriber = mock - - subscription.endpoint = new_push_endpoint - - mock.verify - end - - it "makes an HTTP API call to update expires_in" do - week_seconds = 60*60*24*7 - - expiration_policy = Google::Cloud::PubSub::V1::ExpirationPolicy.new( - ttl: Google::Cloud::PubSub::Convert.number_to_duration(week_seconds) - ) - update_sub = Google::Cloud::PubSub::V1::Subscription.new \ - name: sub_path, expiration_policy: expiration_policy - update_mask = Google::Protobuf::FieldMask.new paths: ["expiration_policy"] - mock = Minitest::Mock.new - mock.expect :update_subscription, update_sub, subscription: update_sub, update_mask: update_mask - pubsub.service.mocked_subscriber = mock - - subscription.expires_in = week_seconds - - mock.verify - end - end - - describe "reference subscription object of a subscription that does not exist" do - let :subscription do - Google::Cloud::PubSub::Subscription.from_name sub_name, - pubsub.service - end - - it "raises NotFoundError when updating deadline" do - stub = Object.new - def stub.update_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.deadline = 30 - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when updating retain_acked" do - stub = Object.new - def stub.update_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.retain_acked = true - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when updating retention" do - stub = Object.new - def stub.update_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.retention = 600.2 - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when updating labels" do - stub = Object.new - def stub.update_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.labels = new_labels - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when updating endpoint" do - new_push_endpoint = "https://foo.bar/baz" - - stub = Object.new - def stub.modify_push_config *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.endpoint = new_push_endpoint - end.must_raise Google::Cloud::NotFoundError - end - - it "raises NotFoundError when updating expires_in" do - week_seconds = 60*60*24*7 - - stub = Object.new - def stub.update_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - expect do - subscription.expires_in = week_seconds - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscription_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscription_test.rb deleted file mode 100644 index 4dd9f159d6be..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscription_test.rb +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Subscription, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:subscription_name) { "subscription-name-goes-here" } - let(:subscription_grpc) { Google::Cloud::PubSub::V1::Subscription.new(subscription_hash(topic_name, subscription_name)) } - let(:subscription) { Google::Cloud::PubSub::Subscription.from_grpc subscription_grpc, pubsub.service } - let(:labels) { { "foo" => "bar" } } - - it "knows its name" do - _(subscription.name).must_equal subscription_path(subscription_name) - end - - it "knows its topic" do - _(subscription.topic).must_be_kind_of Google::Cloud::PubSub::Topic - _(subscription.topic).must_be :reference? - _(subscription.topic).wont_be :resource? - _(subscription.topic.name).must_equal topic_path(topic_name) - end - - it "has an ack deadline" do - _(subscription).must_respond_to :deadline - end - - it "knows its retain_acked" do - _(subscription).must_respond_to :retain_acked - end - - it "knows its retention" do - _(subscription).must_respond_to :retention - end - - it "knows its topic_retention" do - _(subscription).must_respond_to :topic_retention - end - - it "has an endpoint" do - _(subscription).must_respond_to :endpoint - end - - it "can update the endpoint" do - new_push_endpoint = "https://foo.bar/baz" - push_config = Google::Cloud::PubSub::V1::PushConfig.new(push_endpoint: new_push_endpoint) - mpc_res = nil - mock = Minitest::Mock.new - mock.expect :modify_push_config, mpc_res, subscription: subscription_path(subscription_name), push_config: push_config - pubsub.service.mocked_subscriber = mock - - subscription.endpoint = new_push_endpoint - - mock.verify - end - - it "can pull a message" do - rec_message_msg = "pulled-message" - pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) - mock = Minitest::Mock.new - mock.expect :pull, pull_res, subscription: subscription_path(subscription_name), max_messages: 100, return_immediately: true - subscription.service.mocked_subscriber = mock - - rec_messages = subscription.pull - - mock.verify - - _(rec_messages).wont_be :empty? - _(rec_messages.first.message.data).must_equal rec_message_msg - end - - it "can acknowledge one message" do - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1"] - subscription.service.mocked_subscriber = mock - - subscription.acknowledge "ack-id-1" - - mock.verify - end - - it "can acknowledge many messages" do - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1", "ack-id-2", "ack-id-3"] - subscription.service.mocked_subscriber = mock - - subscription.acknowledge "ack-id-1", "ack-id-2", "ack-id-3" - - mock.verify - end - - it "can acknowledge with ack" do - ack_res = nil - mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1"] - subscription.service.mocked_subscriber = mock - - subscription.ack "ack-id-1" - - mock.verify - end - - it "creates a snapshot" do - new_snapshot_name = "new-snapshot-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Snapshot.new snapshot_hash(subscription_name, new_snapshot_name) - mock = Minitest::Mock.new - mock.expect :create_snapshot, create_res, name: snapshot_path(new_snapshot_name), subscription: subscription_path(subscription_name), labels: nil - subscription.service.mocked_subscriber = mock - - snapshot = subscription.create_snapshot new_snapshot_name - - mock.verify - - _(snapshot).wont_be :nil? - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - - it "creates a snapshot with fully-qualified snapshot path" do - new_snapshot_path = "projects/other-project/snapshots/new-snapshot-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Snapshot.new snapshot_hash(subscription_name, new_snapshot_path) - mock = Minitest::Mock.new - mock.expect :create_snapshot, create_res, name: snapshot_path(new_snapshot_path), subscription: subscription_path(subscription_name), labels: nil - subscription.service.mocked_subscriber = mock - - snapshot = subscription.create_snapshot new_snapshot_path - - mock.verify - - _(snapshot.name).must_equal new_snapshot_path - end - - it "creates a snapshot with new_snapshot alias" do - new_snapshot_name = "new-snapshot-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Snapshot.new snapshot_hash(subscription_name, new_snapshot_name) - mock = Minitest::Mock.new - mock.expect :create_snapshot, create_res, name: snapshot_path(new_snapshot_name), subscription: subscription_path(subscription_name), labels: nil - subscription.service.mocked_subscriber = mock - - snapshot = subscription.new_snapshot new_snapshot_name - - mock.verify - - _(snapshot).wont_be :nil? - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - end - - it "creates a snapshot with labels" do - new_snapshot_name = "new-snapshot-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Snapshot.new snapshot_hash(subscription_name, new_snapshot_name, labels: labels) - mock = Minitest::Mock.new - mock.expect :create_snapshot, create_res, name: snapshot_path(new_snapshot_name), subscription: subscription_path(subscription_name), labels: labels - subscription.service.mocked_subscriber = mock - - snapshot = subscription.create_snapshot new_snapshot_name, labels: labels - - mock.verify - - _(snapshot).wont_be :nil? - _(snapshot).must_be_kind_of Google::Cloud::PubSub::Snapshot - _(snapshot.labels).must_equal labels - _(snapshot.labels).must_be :frozen? - end - - it "raises when creating a snapshot that already exists" do - existing_snapshot_name = "existing-snapshot" - - stub = Object.new - def stub.create_snapshot *args - raise Google::Cloud::AlreadyExistsError.new("already exists") - end - subscription.service.mocked_subscriber = stub - - assert_raises Google::Cloud::AlreadyExistsError do - subscription.create_snapshot existing_snapshot_name - end - end - - it "raises when creating a snapshot on a deleted subscription" do - new_snapshot_name = "new-snapshot-#{Time.now.to_i}" - - stub = Object.new - def stub.create_snapshot *args - raise Google::Cloud::NotFoundError.new("not found") - end - subscription.service.mocked_subscriber = stub - - assert_raises Google::Cloud::NotFoundError do - # Let's assume the subscription has been deleted before calling create. - subscription.create_snapshot new_snapshot_name - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/attrs_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/attrs_test.rb deleted file mode 100644 index bf2acbf50c32..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/attrs_test.rb +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :attributes, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:labels) { { "foo" => "bar" } } - let(:kms_key_name) { "projects/a/locations/b/keyRings/c/cryptoKeys/d" } - let(:persistence_regions) { ["us-central1", "us-central2"] } - let(:schema_name) { schema_path("my-schema") } - let(:message_encoding) { :JSON } - let(:topic_hsh) do - topic_hash topic_name, - labels: labels, - kms_key_name: kms_key_name, - persistence_regions: persistence_regions, - schema_settings: { schema: schema_name, encoding: message_encoding } - end - let(:topic_grpc) { Google::Cloud::PubSub::V1::Topic.new topic_hsh } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc topic_grpc, pubsub.service } - - it "is not reference when created with an HTTP method" do - _(topic).wont_be :reference? - _(topic).must_be :resource? - end - - it "accesses name without making an API call" do - _(topic.name).must_equal topic_path(topic_name) - end - - it "accesses labels without making an API call" do - _(topic.labels).must_equal labels - end - - it "accesses kms_key without making an API call" do - _(topic.kms_key).must_equal kms_key_name - end - - it "accesses persistence_regions without making an API call" do - _(topic.persistence_regions).must_equal persistence_regions - end - - it "accesses schema_settings without making an API call" do - _(topic.schema_name).must_equal schema_name - _(topic.message_encoding).must_equal message_encoding - _(topic.message_encoding_json?).must_equal true - _(topic.message_encoding_binary?).must_equal false - end - - describe "reference topic" do - let :topic do - Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service - end - - it "is reference" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - end - - it "accesses name without making an API call" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - - _(topic.name).must_equal topic_path(topic_name) - - _(topic).must_be :reference? - _(topic).wont_be :resource? - end - - it "accesses labels by making an API call" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - - mock = Minitest::Mock.new - mock.expect :get_topic, topic_grpc, topic: topic_path(topic_name) - topic.service.mocked_publisher = mock - - _(topic.labels).must_equal labels - - _(topic).wont_be :reference? - _(topic).must_be :resource? - - mock.verify - end - - it "accesses kms_key by making an API call" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - - mock = Minitest::Mock.new - mock.expect :get_topic, topic_grpc, topic: topic_path(topic_name) - topic.service.mocked_publisher = mock - - _(topic.kms_key).must_equal kms_key_name - - _(topic).wont_be :reference? - _(topic).must_be :resource? - - mock.verify - end - - it "accesses persistence_regions by making an API call" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - - mock = Minitest::Mock.new - mock.expect :get_topic, topic_grpc, topic: topic_path(topic_name) - topic.service.mocked_publisher = mock - - _(topic.persistence_regions).must_equal persistence_regions - - _(topic).wont_be :reference? - _(topic).must_be :resource? - - mock.verify - end - - it "accesses schema_settings by making an API call" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - - mock = Minitest::Mock.new - mock.expect :get_topic, topic_grpc, topic: topic_path(topic_name) - topic.service.mocked_publisher = mock - - _(topic.schema_name).must_equal schema_name - _(topic.message_encoding).must_equal message_encoding - _(topic.message_encoding_json?).must_equal true - _(topic.message_encoding_binary?).must_equal false - - _(topic).wont_be :reference? - _(topic).must_be :resource? - - mock.verify - end - - describe "no SchemaSettings" do - let(:topic_grpc) { Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name, labels: labels) } - - it "accesses persistence_regions by making an API call" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - - mock = Minitest::Mock.new - mock.expect :get_topic, topic_grpc, topic: topic_path(topic_name) - topic.service.mocked_publisher = mock - - _(topic.schema_name).must_be :nil? - _(topic.message_encoding).must_be :nil? - _(topic.message_encoding_json?).must_equal false - _(topic.message_encoding_binary?).must_equal false - - _(topic).wont_be :reference? - _(topic).must_be :resource? - - mock.verify - end - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/autocreate_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/autocreate_test.rb deleted file mode 100644 index 4652bf4042a2..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/autocreate_test.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :reference, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } - - it "will not be reference when created with an HTTP method" do - _(topic).wont_be :reference? - _(topic).must_be :resource? - end - - describe "reference topic" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "will be reference when created lazily" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/exists_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/exists_test.rb deleted file mode 100644 index 61574a2c6e47..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/exists_test.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :exists, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } - - it "knows if it exists when created with an HTTP method" do - # The absense of a mock means this test will fail - # if the method exists? makes an HTTP call. - _(topic).must_be :exists? - # Additional exists? calls do not make HTTP calls either - _(topic).must_be :exists? - end - - describe "reference topic object of a topic that exists" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "checks if the topic exists by making an HTTP call" do - get_res = Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name) - mock = Minitest::Mock.new - mock.expect :get_topic, get_res, topic: topic_path(topic_name) - topic.service.mocked_publisher = mock - - _(topic).must_be :exists? - # Additional exists? calls do not make HTTP calls - _(topic).must_be :exists? - - mock.verify - end - end - - describe "reference topic object of a topic that does not exist" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "checks if the topic exists by making an HTTP call" do - stub = Object.new - def stub.get_topic *args - raise Google::Cloud::NotFoundError.new("not found") - end - topic.service.mocked_publisher = stub - - _(topic).wont_be :exists? - # Additional exists? calls do not make HTTP calls - _(topic).wont_be :exists? - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/lazy_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/lazy_test.rb deleted file mode 100644 index 2911db6c5fd6..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/lazy_test.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :reference, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:topic_grpc) { Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name) } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc topic_grpc, pubsub.service } - - it "is not reference when created with an HTTP method" do - _(topic).wont_be :reference? - _(topic).must_be :resource? - end - - describe "reference topic" do - let :topic do - Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service - end - - it "is reference" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/name_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/name_test.rb deleted file mode 100644 index 66cf0c963f6e..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/name_test.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :name, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } - - it "gives the name returned from the HTTP method" do - _(topic.name).must_equal "projects/#{project}/topics/#{topic_name}" - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/policy_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/policy_test.rb deleted file mode 100644 index d8b5c20f6c1a..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/policy_test.rb +++ /dev/null @@ -1,244 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :policy, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } - - it "gets the IAM Policy" do - policy_hash = { - "etag"=>"CAE=", - "bindings"=>[{ - "role"=>"roles/viewer", - "members"=>[ - "user:viewer@example.com", - "serviceAccount:1234567890@developer.gserviceaccount.com" - ] - }] - } - get_res = Google::Iam::V1::Policy.decode_json policy_hash.to_json - mock = Minitest::Mock.new - mock.expect :get_iam_policy, get_res, resource: topic_path(topic_name) - topic.service.mocked_iam = mock - - policy = topic.policy - - mock.verify - - _(policy).must_be_kind_of Google::Cloud::PubSub::Policy - _(policy.etag).must_equal "\b\x01" - _(policy.roles).must_be_kind_of Hash - _(policy.roles.size).must_equal 1 - _(policy.roles["roles/viewer"]).must_be_kind_of Array - _(policy.roles["roles/viewer"].count).must_equal 2 - _(policy.roles["roles/viewer"].first).must_equal "user:viewer@example.com" - _(policy.roles["roles/viewer"].last).must_equal "serviceAccount:1234567890@developer.gserviceaccount.com" - end - - it "sets the IAM Policy" do - policy_hash = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "user:owner@example.com", - "serviceAccount:0987654321@developer.gserviceaccount.com" - ] - }] - } - get_res = Google::Iam::V1::Policy.decode_json policy_hash.to_json - mock = Minitest::Mock.new - mock.expect :get_iam_policy, get_res, resource: topic_path(topic_name) - - updated_policy = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "serviceAccount:0987654321@developer.gserviceaccount.com", - "user:newowner@example.com" - ] - }] - } - new_policy = { - "etag"=>"CBD=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "serviceAccount:0987654321@developer.gserviceaccount.com", - "user:newowner@example.com" - ] - }] - } - - set_req = Google::Iam::V1::Policy.decode_json JSON.dump(updated_policy) - set_res = Google::Iam::V1::Policy.decode_json JSON.dump(new_policy) - mock.expect :set_iam_policy, set_res, resource: topic_path(topic_name), policy: set_req - topic.service.mocked_iam = mock - - policy = topic.policy - - policy.add "roles/owner", "user:newowner@example.com" - policy.remove "roles/owner", "user:owner@example.com" - - policy_2 = topic.update_policy policy - - mock.verify - - _(policy_2).must_be_kind_of Google::Cloud::PubSub::Policy - _(policy_2.etag).must_equal "\b\x10" - _(policy_2.roles).must_be_kind_of Hash - _(policy_2.roles.size).must_equal 1 - _(policy_2.roles["roles/viewer"]).must_be :nil? - _(policy_2.roles["roles/owner"]).must_be_kind_of Array - _(policy_2.roles["roles/owner"].count).must_equal 2 - _(policy_2.roles["roles/owner"].first).must_equal "serviceAccount:0987654321@developer.gserviceaccount.com" - _(policy_2.roles["roles/owner"].last).must_equal "user:newowner@example.com" - end - - it "sets the IAM Policy in a block" do - policy_hash = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "user:owner@example.com", - "serviceAccount:0987654321@developer.gserviceaccount.com" - ] - }] - } - get_res = Google::Iam::V1::Policy.decode_json policy_hash.to_json - mock = Minitest::Mock.new - mock.expect :get_iam_policy, get_res, resource: topic_path(topic_name) - - updated_policy = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "serviceAccount:0987654321@developer.gserviceaccount.com", - "user:newowner@example.com" - ] - }] - } - new_policy = { - "etag"=>"CBD=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "serviceAccount:0987654321@developer.gserviceaccount.com", - "user:newowner@example.com" - ] - }] - } - - set_req = Google::Iam::V1::Policy.decode_json JSON.dump(updated_policy) - set_res = Google::Iam::V1::Policy.decode_json JSON.dump(new_policy) - mock.expect :set_iam_policy, set_res, resource: topic_path(topic_name), policy: set_req - topic.service.mocked_iam = mock - - policy = topic.policy do |p| - p.add "roles/owner", "user:newowner@example.com" - p.remove "roles/owner", "user:owner@example.com" - end - - mock.verify - - _(policy).must_be_kind_of Google::Cloud::PubSub::Policy - _(policy.etag).must_equal "\b\x10" - _(policy.roles).must_be_kind_of Hash - _(policy.roles.size).must_equal 1 - _(policy.roles["roles/viewer"]).must_be :nil? - _(policy.roles["roles/owner"]).must_be_kind_of Array - _(policy.roles["roles/owner"].count).must_equal 2 - _(policy.roles["roles/owner"].first).must_equal "serviceAccount:0987654321@developer.gserviceaccount.com" - _(policy.roles["roles/owner"].last).must_equal "user:newowner@example.com" - end - - it "tests the available permissions" do - permissions = ["pubsub.topics.get", "pubsub.topics.publish"] - test_res = Google::Iam::V1::TestIamPermissionsResponse.new( - permissions: ["pubsub.topics.get"] - ) - mock = Minitest::Mock.new - mock.expect :test_iam_permissions, test_res, resource: topic_path(topic_name), permissions: permissions - topic.service.mocked_iam = mock - - permissions = topic.test_permissions "pubsub.topics.get", - "pubsub.topics.publish" - - mock.verify - - _(permissions).must_equal ["pubsub.topics.get"] - end - - it "removes the only member in the IAM Policy" do - policy_hash = { - "etag"=>"CAE=", - "bindings" => [{ - "role" => "roles/owner", - "members" => [ - "user:owner@example.com" - ] - }] - } - get_res = Google::Iam::V1::Policy.decode_json policy_hash.to_json - mock = Minitest::Mock.new - mock.expect :get_iam_policy, get_res, resource: topic_path(topic_name) - - updated_policy = { - "etag"=>"CAE=", - "bindings" => [] - } - new_policy = { - "etag"=>"CBD=", - "bindings" => [] - } - - set_req = Google::Iam::V1::Policy.decode_json JSON.dump(updated_policy) - set_res = Google::Iam::V1::Policy.decode_json JSON.dump(new_policy) - mock.expect :set_iam_policy, set_res, resource: topic_path(topic_name), policy: set_req - topic.service.mocked_iam = mock - - policy = topic.policy do |p| - p.remove "roles/owner", "user:owner@example.com" - end - - mock.verify - - _(policy).must_be_kind_of Google::Cloud::PubSub::Policy - _(policy.etag).must_equal "\b\x10" - _(policy.roles).must_be_kind_of Hash - _(policy.roles).must_be :empty? - end - - it "tests the available permissions" do - permissions = ["pubsub.topics.get", "pubsub.topics.publish"] - test_res = Google::Iam::V1::TestIamPermissionsResponse.new( - permissions: ["pubsub.topics.get"] - ) - mock = Minitest::Mock.new - mock.expect :test_iam_permissions, test_res, resource: topic_path(topic_name), permissions: permissions - topic.service.mocked_iam = mock - - permissions = topic.test_permissions "pubsub.topics.get", - "pubsub.topics.publish" - - mock.verify - - _(permissions).must_equal ["pubsub.topics.get"] - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/reload_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/reload_test.rb deleted file mode 100644 index cb223c49a708..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/reload_test.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2019 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :reload, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:old_labels) { { "foo" => "bar" } } - let(:topic_grpc_old) { Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name, labels: old_labels) } - let(:new_labels) { { "baz" => "bif" } } - let(:topic_grpc_new) { Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name, labels: new_labels) } - let(:topic_resource) { Google::Cloud::PubSub::Topic.from_grpc topic_grpc_old, pubsub.service } - let(:topic_reference) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "it has a reload method and a refresh alias" do - _(topic_resource).must_respond_to :reload! - _(topic_reference).must_respond_to :reload! - - _(topic_resource).must_respond_to :refresh! - _(topic_reference).must_respond_to :refresh! - end - - it "is reloads a resource by calling get_topic API" do - _(topic_resource.name).must_equal topic_path(topic_name) - _(topic_resource.labels).must_equal old_labels - _(topic_resource).wont_be :reference? - _(topic_resource).must_be :resource? - - mock = Minitest::Mock.new - mock.expect :get_topic, topic_grpc_new, topic: topic_path(topic_name) - pubsub.service.mocked_publisher = mock - - topic_resource.reload! - - mock.verify - - _(topic_resource.name).must_equal topic_path(topic_name) - _(topic_resource.labels).must_equal new_labels - _(topic_resource).wont_be :reference? - _(topic_resource).must_be :resource? - end - - it "is reloads a reference by calling get_topic API" do - _(topic_reference.name).must_equal topic_path(topic_name) - _(topic_reference).must_be :reference? - _(topic_reference).wont_be :resource? - - mock = Minitest::Mock.new - mock.expect :get_topic, topic_grpc_new, topic: topic_path(topic_name) - pubsub.service.mocked_publisher = mock - - topic_reference.reload! - - mock.verify - - _(topic_reference.name).must_equal topic_path(topic_name) - _(topic_reference.labels).must_equal new_labels - _(topic_reference).wont_be :reference? - _(topic_reference).must_be :resource? - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscribe_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscribe_test.rb deleted file mode 100644 index 0adc41202df7..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscribe_test.rb +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :subscribe, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } - let(:new_sub_name) { "new-sub-#{Time.now.to_i}" } - let(:labels) { { "foo" => "bar" } } - - it "creates a subscription when calling subscribe" do - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal "projects/#{project}/subscriptions/#{new_sub_name}" - end - - it "creates a subscription with labels" do - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name, labels: labels) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, labels: labels) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, labels: labels - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal "projects/#{project}/subscriptions/#{new_sub_name}" - _(sub.labels).must_equal labels - _(sub.labels).must_be :frozen? - end - - describe "reference topic that exists" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "creates a subscription when calling subscribe" do - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.name).must_equal "projects/#{project}/subscriptions/#{new_sub_name}" - end - end - - describe "reference topic that does not exist" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "raises NotFoundError when calling subscribe" do - stub = Object.new - def stub.create_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - topic.service.mocked_subscriber = stub - - expect do - topic.subscribe new_sub_name - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscription_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscription_test.rb deleted file mode 100644 index 3492278c7aeb..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscription_test.rb +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :subscription, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } - let(:found_sub_name) { "found-sub-#{Time.now.to_i}" } - let(:not_found_sub_name) { "found-sub-#{Time.now.to_i}" } - - it "gets an existing subscription" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, found_sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(found_sub_name) - topic.service.mocked_subscriber = mock - - sub = topic.subscription found_sub_name - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "gets an existing subscription with get_subscription alias" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, found_sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(found_sub_name) - topic.service.mocked_subscriber = mock - - sub = topic.get_subscription found_sub_name - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "gets an existing subscription with find_subscription alias" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, found_sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(found_sub_name) - topic.service.mocked_subscriber = mock - - sub = topic.find_subscription found_sub_name - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "returns nil when getting an non-existant subscription" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - topic.service.mocked_subscriber = stub - - sub = topic.subscription found_sub_name - _(sub).must_be :nil? - end - - it "gets a subscription with skip_lookup option" do - # No HTTP mock needed, since the lookup is not made - - sub = topic.find_subscription found_sub_name, skip_lookup: true - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - - describe "reference topic that exists" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "gets an existing subscription" do - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, found_sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(found_sub_name) - topic.service.mocked_subscriber = mock - - sub = topic.subscription found_sub_name - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "returns nil when getting an non-existant subscription" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - topic.service.mocked_subscriber = stub - - sub = topic.subscription found_sub_name - _(sub).must_be :nil? - end - end - - describe "reference topic that does not exist" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "returns nil when getting an non-existant subscription" do - stub = Object.new - def stub.get_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - topic.service.mocked_subscriber = stub - - sub = topic.subscription found_sub_name - _(sub).must_be :nil? - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscriptions_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscriptions_test.rb deleted file mode 100644 index fee5706b09fd..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/subscriptions_test.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :subscriptions, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name)), pubsub.service } - let(:subscriptions_with_token) do - Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse.new topic_subscriptions_hash(3, "next_page_token") - end - - it "lists subscriptions" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - topic.service.mocked_publisher = mock - - subs = topic.subscriptions - - mock.verify - - _(subs.count).must_equal 3 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - describe "reference topic that exists" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "lists subscriptions" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - topic.service.mocked_publisher = mock - - subs = topic.subscriptions - - mock.verify - - _(subs.count).must_equal 3 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - end - - describe "reference topic that does not exist" do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "lists subscriptions" do - stub = Object.new - def stub.list_topic_subscriptions *args - raise Google::Cloud::NotFoundError.new("not found") - end - topic.service.mocked_publisher = stub - - expect do - topic.subscriptions - end.must_raise Google::Cloud::NotFoundError - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic/update_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic/update_test.rb deleted file mode 100644 index f52fdd9359f9..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic/update_test.rb +++ /dev/null @@ -1,247 +0,0 @@ -# Copyright 2018 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :update, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:labels) { { "foo" => "bar" } } - let(:new_labels) { { "baz" => "qux" } } - let(:new_labels_map) do - labels_map = Google::Protobuf::Map.new(:string, :string) - new_labels.each { |k, v| labels_map[String(k)] = String(v) } - labels_map - end - let(:kms_key_name) { "projects/a/locations/b/keyRings/c/cryptoKeys/d" } - let(:new_kms_key_name) { "projects/d/locations/c/keyRings/b/cryptoKeys/a" } - let(:persistence_regions) { ["us-west1", "us-west2"] } - let(:new_persistence_regions) { ["us-central1", "us-central2"] } - let(:topic_grpc) { Google::Cloud::PubSub::V1::Topic.new topic_hash(topic_name, labels: labels) } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc topic_grpc, pubsub.service } - - it "updates labels" do - _(topic.labels).must_equal labels - - update_grpc = topic_grpc.dup - update_grpc.labels = new_labels_map - update_mask = Google::Protobuf::FieldMask.new paths: ["labels"] - mock = Minitest::Mock.new - mock.expect :update_topic, update_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.labels = new_labels - - mock.verify - - _(topic.labels).must_equal new_labels - end - - it "updates labels to empty hash" do - _(topic.labels).must_equal labels - - update_grpc = topic_grpc.dup - update_grpc.labels = Google::Protobuf::Map.new(:string, :string) - - update_mask = Google::Protobuf::FieldMask.new paths: ["labels"] - mock = Minitest::Mock.new - mock.expect :update_topic, update_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.labels = {} - - mock.verify - - _(topic.labels).wont_be :nil? - _(topic.labels).must_be :empty? - end - - it "raises when setting labels to nil" do - _(topic.labels).must_equal labels - - expect { topic.labels = nil }.must_raise ArgumentError - - _(topic.labels).must_equal labels - end - - it "updates kms_key" do - topic_grpc.kms_key_name = kms_key_name - _(topic.kms_key).must_equal kms_key_name - - update_grpc = Google::Cloud::PubSub::V1::Topic.new \ - name: topic_path(topic_name), - kms_key_name: new_kms_key_name - update_mask = Google::Protobuf::FieldMask.new paths: ["kms_key_name"] - mock = Minitest::Mock.new - mock.expect :update_topic, update_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.kms_key = new_kms_key_name - - mock.verify - - _(topic.kms_key).must_equal new_kms_key_name - end - - it "updates kms_key to empty string" do - topic_grpc.kms_key_name = kms_key_name - _(topic.kms_key).must_equal kms_key_name - - update_grpc = Google::Cloud::PubSub::V1::Topic.new \ - name: topic_path(topic_name), - kms_key_name: "" - update_mask = Google::Protobuf::FieldMask.new paths: ["kms_key_name"] - mock = Minitest::Mock.new - mock.expect :update_topic, update_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.kms_key = "" - - mock.verify - - _(topic.kms_key).must_be :empty? - end - - it "updates kms_key to nil" do - topic_grpc.kms_key_name = kms_key_name - _(topic.kms_key).must_equal kms_key_name - - update_grpc = Google::Cloud::PubSub::V1::Topic.new \ - name: topic_path(topic_name), - kms_key_name: "" - update_mask = Google::Protobuf::FieldMask.new paths: ["kms_key_name"] - mock = Minitest::Mock.new - mock.expect :update_topic, update_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.kms_key = nil - - mock.verify - - _(topic.kms_key).must_be :empty? - end - - it "updates persistence_regions" do - topic_grpc.message_storage_policy = Google::Cloud::PubSub::V1::MessageStoragePolicy.new( - allowed_persistence_regions: persistence_regions - ) - _(topic.persistence_regions).must_equal persistence_regions - - update_grpc = Google::Cloud::PubSub::V1::Topic.new( - name: topic_path(topic_name), - message_storage_policy: { allowed_persistence_regions: new_persistence_regions } - ) - update_mask = Google::Protobuf::FieldMask.new paths: ["message_storage_policy"] - mock = Minitest::Mock.new - mock.expect :update_topic, update_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.persistence_regions = new_persistence_regions - - mock.verify - - _(topic.persistence_regions).must_equal new_persistence_regions - end - - it "updates persistence_regions to empty array" do - topic_grpc.message_storage_policy = Google::Cloud::PubSub::V1::MessageStoragePolicy.new( - allowed_persistence_regions: persistence_regions - ) - _(topic.persistence_regions).must_equal persistence_regions - - update_grpc = Google::Cloud::PubSub::V1::Topic.new( - name: topic_path(topic_name), - message_storage_policy: { allowed_persistence_regions: [] } - ) - update_mask = Google::Protobuf::FieldMask.new paths: ["message_storage_policy"] - mock = Minitest::Mock.new - mock.expect :update_topic, update_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.persistence_regions = [] - - mock.verify - - _(topic.persistence_regions).must_be :empty? - end - - it "updates persistence_regions to nil" do - topic_grpc.message_storage_policy = Google::Cloud::PubSub::V1::MessageStoragePolicy.new( - allowed_persistence_regions: persistence_regions - ) - _(topic.persistence_regions).must_equal persistence_regions - - update_grpc = Google::Cloud::PubSub::V1::Topic.new( - name: topic_path(topic_name), - message_storage_policy: { allowed_persistence_regions: [] } - ) - update_mask = Google::Protobuf::FieldMask.new paths: ["message_storage_policy"] - mock = Minitest::Mock.new - mock.expect :update_topic, update_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.persistence_regions = nil - - mock.verify - - _(topic.persistence_regions).must_be :empty? - end - - describe :reference do - let(:topic) { Google::Cloud::PubSub::Topic.from_name topic_name, pubsub.service } - - it "updates labels" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - - update_grpc = Google::Cloud::PubSub::V1::Topic.new \ - name: topic_path(topic_name), - labels: new_labels - topic_grpc.labels = new_labels_map - update_mask = Google::Protobuf::FieldMask.new paths: ["labels"] - mock = Minitest::Mock.new - mock.expect :update_topic, topic_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.labels = new_labels - - mock.verify - - _(topic).wont_be :reference? - _(topic).must_be :resource? - _(topic.labels).must_equal new_labels - end - - it "updates kms_key" do - _(topic).must_be :reference? - _(topic).wont_be :resource? - - update_grpc = Google::Cloud::PubSub::V1::Topic.new \ - name: topic_path(topic_name), - kms_key_name: new_kms_key_name - topic_grpc.kms_key_name = new_kms_key_name - update_mask = Google::Protobuf::FieldMask.new paths: ["kms_key_name"] - mock = Minitest::Mock.new - mock.expect :update_topic, topic_grpc, topic: update_grpc, update_mask: update_mask - topic.service.mocked_publisher = mock - - topic.kms_key = new_kms_key_name - - mock.verify - - _(topic).wont_be :reference? - _(topic).must_be :resource? - _(topic.kms_key).must_equal new_kms_key_name - end - end -end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/topic_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/topic_test.rb deleted file mode 100644 index b9421ad24418..000000000000 --- a/google-cloud-pubsub/test/google/cloud/pubsub/topic_test.rb +++ /dev/null @@ -1,726 +0,0 @@ -# Copyright 2015 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. - -require "helper" - -describe Google::Cloud::PubSub::Topic, :mock_pubsub do - let(:topic_name) { "topic-name-goes-here" } - let(:labels) { { "foo" => "bar" } } - let(:topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(topic_name, labels: labels)), pubsub.service } - let(:subscriptions_with_token) do - Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse.new topic_subscriptions_hash(3, "next_page_token") - end - let(:subscriptions_without_token) do - Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse.new topic_subscriptions_hash(2) - end - let(:subscriptions_with_token_2) do - Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse.new topic_subscriptions_hash(3, "next_page_token") - end - let(:filter) { "attributes.event_type = \"1\"" } - let(:dead_letter_topic_name) { "topic-name-dead-letter" } - let(:dead_letter_topic) { Google::Cloud::PubSub::Topic.from_grpc Google::Cloud::PubSub::V1::Topic.new(topic_hash(dead_letter_topic_name)), pubsub.service } - let(:retry_minimum_backoff) { 12.123 } - let(:retry_maximum_backoff) { 123.321 } - let(:retry_policy) do - Google::Cloud::PubSub::RetryPolicy.new( - minimum_backoff: retry_minimum_backoff, - maximum_backoff: retry_maximum_backoff - ) - end - - it "knows its name" do - _(topic.name).must_equal topic_path(topic_name) - end - - it "knows its labels" do - _(topic.labels).must_equal labels - _(topic.labels).must_be :frozen? - end - - it "can delete itself" do - get_res = nil - mock = Minitest::Mock.new - mock.expect :delete_topic, get_res, topic: topic_path(topic_name) - pubsub.service.mocked_publisher = mock - - topic.delete - - mock.verify - end - - it "creates a subscription" do - new_sub_name = "new-sub-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - - it "creates a subscription with fully-qualified subscription path" do - new_sub_path = "projects/other-project/subscriptions/new-sub-#{Time.now.to_i}" - - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_path) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_path, topic_name) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_path - - mock.verify - - _(sub.name).must_equal new_sub_path - end - - it "creates a subscription with create_subscription alias" do - new_sub_name = "new-sub-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name) - topic.service.mocked_subscriber = mock - - sub = topic.create_subscription new_sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - - it "creates a subscription with new_subscription alias" do - new_sub_name = "new-sub-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name) - topic.service.mocked_subscriber = mock - - sub = topic.new_subscription new_sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - - it "creates a subscription with a deadline" do - new_sub_name = "new-sub-#{Time.now.to_i}" - deadline = 42 - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, ack_deadline_seconds: 42) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, deadline: deadline - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - - it "creates a subscription with retain_acked and retention" do - new_sub_name = "new-sub-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name) - - duration = Google::Protobuf::Duration.new seconds: 600, nanos: 0 - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, retain_acked_messages: true, message_retention_duration: duration) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, retain_acked: true, retention: 600 - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - - it "creates a subscription with a push endpoint" do - new_sub_name = "new-sub-#{Time.now.to_i}" - endpoint = "http://foo.bar/baz" - push_config = Google::Cloud::PubSub::V1::PushConfig.new(push_endpoint: endpoint) - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, push_config: push_config) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, endpoint: endpoint - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - - it "creates a subscription with an authenticated push endpoint via push config" do - new_sub_name = "new-sub-#{Time.now.to_i}" - endpoint = "http://foo.bar/baz" - - push_config = Google::Cloud::PubSub::Subscription::PushConfig.new - push_config.endpoint = endpoint - push_config.set_oidc_token( - "service-account@example.net", "audience-header-value" - ) - - expected_oidc_token = { - service_account_email: "service-account@example.net", - audience: "audience-header-value" - } - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name, oidc_token: expected_oidc_token) - - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, push_config: push_config.to_grpc) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, push_config: push_config - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - end - - it "raises if both push_config and endpoint are provided" do - new_sub_name = "new-sub-#{Time.now.to_i}" - endpoint = "http://foo.bar/baz" - push_config = Google::Cloud::PubSub::Subscription::PushConfig.new - push_config.endpoint = endpoint - assert_raises ArgumentError do - topic.subscribe new_sub_name, push_config: push_config, endpoint: endpoint - end - end - - it "creates a subscription with labels" do - new_sub_name = "new-sub-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name, labels: labels) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, labels: labels) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, labels: labels - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.labels).must_equal labels - _(sub.labels).must_be :frozen? - end - - it "creates a subscription with filter" do - new_sub_name = "new-sub-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name, filter: filter) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, filter: filter) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, filter: filter - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.filter).must_equal filter - _(sub.filter).must_be :frozen? - end - - it "creates a subscription with dead_letter_topic and dead_letter_max_delivery_attempts" do - new_sub_name = "new-sub-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name, dead_letter_topic: dead_letter_topic_name, max_delivery_attempts: 7) - dead_letter_policy = Google::Cloud::PubSub::V1::DeadLetterPolicy.new dead_letter_topic: topic_path(dead_letter_topic_name), max_delivery_attempts: 7 - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, dead_letter_policy: dead_letter_policy) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, dead_letter_topic: dead_letter_topic, dead_letter_max_delivery_attempts: 7 - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.dead_letter_topic.name).must_equal topic_path(dead_letter_topic_name) - _(sub.dead_letter_max_delivery_attempts).must_equal 7 - end - - it "raises when creating a subscription with dead_letter_max_delivery_attempts but no dead_letter_topic" do - assert_raises ArgumentError do - topic.subscribe "my-new-sub", dead_letter_max_delivery_attempts: 7 - end - end - - it "creates a subscription with retry_minimum_backoff and retry_maximum_backoff" do - new_sub_name = "new-sub-#{Time.now.to_i}" - create_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, new_sub_name, retry_minimum_backoff: retry_minimum_backoff, retry_maximum_backoff: retry_maximum_backoff) - mock = Minitest::Mock.new - mock.expect :create_subscription, create_res, **create_subscription_args(new_sub_name, topic_name, retry_policy: retry_policy_grpc(retry_minimum_backoff, retry_maximum_backoff)) - topic.service.mocked_subscriber = mock - - sub = topic.subscribe new_sub_name, retry_policy: retry_policy - - mock.verify - - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub.retry_policy.minimum_backoff).must_equal retry_minimum_backoff - _(sub.retry_policy.maximum_backoff).must_equal retry_maximum_backoff - end - - it "raises when creating a subscription that already exists" do - existing_sub_name = "existing-sub" - - stub = Object.new - def stub.create_subscription *args - raise Google::Cloud::AlreadyExistsError.new("already exists") - end - topic.service.mocked_subscriber = stub - - assert_raises Google::Cloud::AlreadyExistsError do - topic.subscribe existing_sub_name - end - end - - it "raises when creating a subscription on a deleted topic" do - new_sub_name = "new-sub-#{Time.now.to_i}" - - stub = Object.new - def stub.create_subscription *args - raise Google::Cloud::NotFoundError.new("not found") - end - topic.service.mocked_subscriber = stub - - assert_raises Google::Cloud::NotFoundError do - # Let's assume the topic has been deleted before calling create. - topic.subscribe new_sub_name - end - end - - it "gets a subscription" do - sub_name = "found-sub-#{Time.now.to_i}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - topic.service.mocked_subscriber = mock - - sub = topic.subscription sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "gets a subscription with fully-qualified subscription path" do - sub_full_path = "projects/other-project/subscriptions/found-sub-#{Time.now.to_i}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_full_path) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: sub_full_path - topic.service.mocked_subscriber = mock - - sub = topic.subscription sub_full_path - - mock.verify - - _(sub.name).must_equal sub_full_path - end - - it "gets a subscription with get_subscription alias" do - sub_name = "found-sub-#{Time.now.to_i}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - topic.service.mocked_subscriber = mock - - sub = topic.get_subscription sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "gets a subscription with find_subscription alias" do - sub_name = "found-sub-#{Time.now.to_i}" - - get_res = Google::Cloud::PubSub::V1::Subscription.new subscription_hash(topic_name, sub_name) - mock = Minitest::Mock.new - mock.expect :get_subscription, get_res, subscription: subscription_path(sub_name) - topic.service.mocked_subscriber = mock - - sub = topic.find_subscription sub_name - - mock.verify - - _(sub).wont_be :nil? - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).wont_be :reference? - _(sub).must_be :resource? - end - - it "lists subscriptions" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - topic.service.mocked_publisher = mock - - subs = topic.subscriptions - - mock.verify - - _(subs.count).must_equal 3 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "lists subscriptions with find_subscriptions alias" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - topic.service.mocked_publisher = mock - - subs = topic.find_subscriptions - - _(subs.count).must_equal 3 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "lists subscriptions with list_subscriptions alias" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - topic.service.mocked_publisher = mock - - subs = topic.list_subscriptions - - mock.verify - - _(subs.count).must_equal 3 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "paginates subscriptions" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - mock.expect :list_topic_subscriptions, subscriptions_without_token, topic: topic_path(topic_name), page_size: nil, page_token: "next_page_token" - topic.service.mocked_publisher = mock - - first_subs = topic.subscriptions - second_subs = topic.subscriptions token: first_subs.token - - mock.verify - - _(first_subs.count).must_equal 3 - token = first_subs.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - first_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - - _(second_subs.count).must_equal 2 - _(second_subs.token).must_be :nil? - second_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "paginates subscriptions with max set" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: 3, page_token: nil - topic.service.mocked_publisher = mock - - subs = topic.subscriptions max: 3 - - mock.verify - - _(subs.count).must_equal 3 - token = subs.token - _(token).wont_be :nil? - _(token).must_equal "next_page_token" - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "paginates subscriptions with next? and next" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - mock.expect :list_topic_subscriptions, subscriptions_without_token, topic: topic_path(topic_name), page_size: nil, page_token: "next_page_token" - topic.service.mocked_publisher = mock - - first_subs = topic.subscriptions - second_subs = first_subs.next - - mock.verify - - _(first_subs.count).must_equal 3 - _(first_subs.next?).must_equal true - first_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - - _(second_subs.count).must_equal 2 - _(second_subs.next?).must_equal false - second_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "paginates subscriptions with with next? and next and max set" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: 3, page_token: nil - mock.expect :list_topic_subscriptions, subscriptions_without_token, topic: topic_path(topic_name), page_size: 3, page_token: "next_page_token" - topic.service.mocked_publisher = mock - - first_subs = topic.subscriptions max: 3 - second_subs = first_subs.next - - mock.verify - - _(first_subs.count).must_equal 3 - _(first_subs.next?).must_equal true - first_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - - _(second_subs.count).must_equal 2 - _(second_subs.next?).must_equal false - second_subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "paginates subscriptions with all" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - mock.expect :list_topic_subscriptions, subscriptions_without_token, topic: topic_path(topic_name), page_size: nil, page_token: "next_page_token" - topic.service.mocked_publisher = mock - - subs = topic.subscriptions.all.to_a - - mock.verify - - _(subs.count).must_equal 5 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "paginates subscriptions with with all and max set" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: 3, page_token: nil - mock.expect :list_topic_subscriptions, subscriptions_without_token, topic: topic_path(topic_name), page_size: 3, page_token: "next_page_token" - topic.service.mocked_publisher = mock - - subs = topic.subscriptions(max: 3).all.to_a - - mock.verify - - _(subs.count).must_equal 5 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "iterates subscriptions with all using Enumerator" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - mock.expect :list_topic_subscriptions, subscriptions_with_token_2, topic: topic_path(topic_name), page_size: nil, page_token: "next_page_token" - topic.service.mocked_publisher = mock - - subs = topic.subscriptions.all.take(5) - - mock.verify - - _(subs.count).must_equal 5 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "iterates subscriptions with all and request_limit set" do - mock = Minitest::Mock.new - mock.expect :list_topic_subscriptions, subscriptions_with_token, topic: topic_path(topic_name), page_size: nil, page_token: nil - mock.expect :list_topic_subscriptions, subscriptions_with_token_2, topic: topic_path(topic_name), page_size: nil, page_token: "next_page_token" - topic.service.mocked_publisher = mock - - subs = topic.subscriptions.all(request_limit: 1).to_a - - mock.verify - - _(subs.count).must_equal 6 - subs.each do |sub| - _(sub).must_be_kind_of Google::Cloud::PubSub::Subscription - _(sub).must_be :reference? - _(sub).wont_be :resource? - end - end - - it "can publish a message" do - message = "new-message-here" - encoded_msg = message.encode(Encoding::ASCII_8BIT) - messages = [ - Google::Cloud::PubSub::V1::PubsubMessage.new(data: encoded_msg) - ] - publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mock = Minitest::Mock.new - expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request, actual_option| - actual_request == expected_request && actual_option.nil? - end - topic.service.mocked_publisher = mock - - msg = topic.publish message - - mock.verify - - _(msg).must_be_kind_of Google::Cloud::PubSub::Message - _(msg.message_id).must_equal "msg1" - end - - it "can publish a message with compression" do - messages = [ - Google::Cloud::PubSub::V1::PubsubMessage.new(data: "d"*238) - ] - publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mock = Minitest::Mock.new - expected_request = {topic: topic_path(topic_name), messages: messages} - expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } - mock.expect :publish, publish_res do |actual_request, actual_option| - actual_request == expected_request && actual_option == expected_option - end - topic.service.mocked_publisher = mock - - msg = topic.publish "d"*238, compress: true - - mock.verify - - _(msg).must_be_kind_of Google::Cloud::PubSub::Message - _(msg.message_id).must_equal "msg1" - end - - it "can publish a message with compression_bytes_threshold " do - messages = [ - Google::Cloud::PubSub::V1::PubsubMessage.new(data: "d"*138) - ] - publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mock = Minitest::Mock.new - expected_request = {topic: topic_path(topic_name), messages: messages} - expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } - mock.expect :publish, publish_res do |actual_request, actual_option| - actual_request == expected_request && actual_option == expected_option - end - topic.service.mocked_publisher = mock - - msg = topic.publish "d"*138, compress: true, compression_bytes_threshold: 140 - - mock.verify - - _(msg).must_be_kind_of Google::Cloud::PubSub::Message - _(msg.message_id).must_equal "msg1" - end - - it "can publish a message with attributes" do - message = "new-message-here" - encoded_msg = message.encode(Encoding::ASCII_8BIT) - messages = [ - Google::Cloud::PubSub::V1::PubsubMessage.new(data: encoded_msg, attributes: { "format" => "text" }) - ] - publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mock = Minitest::Mock.new - expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| - actual_request == expected_request - end - topic.service.mocked_publisher = mock - - msg = topic.publish message, format: :text - - mock.verify - - _(msg).must_be_kind_of Google::Cloud::PubSub::Message - _(msg.message_id).must_equal "msg1" - _(msg.attributes["format"]).must_equal "text" - end - - it "can publish multiple messages with a block" do - message1 = "first-new-message" - message2 = "second-new-message" - encoded_msg1 = message1.encode(Encoding::ASCII_8BIT) - encoded_msg2 = message2.encode(Encoding::ASCII_8BIT) - messages = [ - Google::Cloud::PubSub::V1::PubsubMessage.new(data: encoded_msg1), - Google::Cloud::PubSub::V1::PubsubMessage.new(data: encoded_msg2, attributes: { "format" => "none" }) - ] - publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1", "msg2"] }) - mock = Minitest::Mock.new - expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| - actual_request == expected_request - end - topic.service.mocked_publisher = mock - - msgs = topic.publish do |batch| - batch.publish message1 - batch.publish message2, format: :none - end - - mock.verify - - _(msgs.count).must_equal 2 - _(msgs.first).must_be_kind_of Google::Cloud::PubSub::Message - _(msgs.first.message_id).must_equal "msg1" - _(msgs.last).must_be_kind_of Google::Cloud::PubSub::Message - _(msgs.last.message_id).must_equal "msg2" - _(msgs.last.attributes["format"]).must_equal "none" - end -end diff --git a/google-cloud-pubsub/test/helper.rb b/google-cloud-pubsub/test/helper.rb index 0bea4b4367ea..d335530f2067 100644 --- a/google-cloud-pubsub/test/helper.rb +++ b/google-cloud-pubsub/test/helper.rb @@ -327,4 +327,4 @@ def number_to_duration_hash number register_spec_type(self) do |desc, *addl| addl.include? :mock_pubsub end -end \ No newline at end of file +end From a70a05a58c8f35048f43ca3ba2db63c914189f83 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:10:17 -0700 Subject: [PATCH 195/457] feat(maps-fleet_engine-v1): Support for Android's Fused Location Provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(maps-fleet_engine-v1): Support for custom Trip attributes docs(maps-fleet_engine-v1): Deprecated remaining_waypoints_version; remaining waypoints are now always retrieved PiperOrigin-RevId: 781185838 Source-Link: https://github.com/googleapis/googleapis/commit/302273adb3293bb504ecd83be8e1467511d5c779 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dd3d22b67c589f8f6042f30a885a57728a2ed4fa Copy-Tag: eyJwIjoiZ29vZ2xlLW1hcHMtZmxlZXRfZW5naW5lLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkZDNkMjJiNjdjNTg5ZjhmNjA0MmYzMGE4ODVhNTc3MjhhMmVkNGZhIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../fleet_engine/v1/trip_service/client.rb | 8 ++-- .../v1/trip_service/rest/client.rb | 8 ++-- .../maps/fleetengine/v1/fleetengine_pb.rb | 3 +- .../google/maps/fleetengine/v1/trip_api_pb.rb | 2 +- .../google/maps/fleetengine/v1/trips_pb.rb | 2 +- .../google/maps/fleetengine/v1/fleetengine.rb | 38 +++++++++++++++++++ .../google/maps/fleetengine/v1/traffic.rb | 6 +-- .../google/maps/fleetengine/v1/trip_api.rb | 9 +++-- .../google/maps/fleetengine/v1/trips.rb | 3 ++ 9 files changed, 61 insertions(+), 18 deletions(-) diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb index 0eb95b3d9c7a..93e703fb3e2d 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb @@ -373,10 +373,10 @@ def create_trip request, options = nil # unchanged since this timestamp, the route field is not set in the response. # If a minimum is unspecified, the route data are always retrieved. # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints` are retrieved. If they are unchanged since this - # timestamp, the `remaining_waypoints` are not set in the response. If this - # field is unspecified, `remaining_waypoints` is always retrieved. + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb index c5c9aa0bb1b9..a38a4fa346e3 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb @@ -358,10 +358,10 @@ def create_trip request, options = nil # unchanged since this timestamp, the route field is not set in the response. # If a minimum is unspecified, the route data are always retrieved. # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints` are retrieved. If they are unchanged since this - # timestamp, the `remaining_waypoints` are not set in the response. If this - # field is unspecified, `remaining_waypoints` is always retrieved. + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb index 7c8f353258f2..026c83b7a9e4 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb @@ -13,7 +13,7 @@ require 'google/type/latlng_pb' -descriptor_data = "\n,google/maps/fleetengine/v1/fleetengine.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"b\n\x0fTerminalPointId\x12\x16\n\x08place_id\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x1a\n\x0cgenerated_id\x18\x03 \x01(\tB\x02\x18\x01H\x00\x12\x11\n\x05value\x18\x04 \x01(\tB\x02\x18\x01:\x02\x18\x01\x42\x04\n\x02Id\"\xf9\x01\n\x10TerminalLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x43\n\x11terminal_point_id\x18\x02 \x01(\x0b\x32$.maps.fleetengine.v1.TerminalPointIdB\x02\x18\x01\x12\x1b\n\x0f\x61\x63\x63\x65ss_point_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x13\n\x07trip_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x45\n\x16terminal_location_type\x18\x05 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointTypeB\x02\x18\x01\"\xbc\x03\n\x0cTripWaypoint\x12\x37\n\x08location\x18\x01 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x0f\n\x07trip_id\x18\x02 \x01(\t\x12\x38\n\rwaypoint_type\x18\x03 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointType\x12-\n\x10path_to_waypoint\x18\x04 \x03(\x0b\x32\x13.google.type.LatLng\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x05 \x01(\t\x12K\n\x13traffic_to_waypoint\x18\n \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolyline\x12\x34\n\x0f\x64istance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\'\n\x03\x65ta\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8f\x01\n\x10VehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\x19\n\x17vehicle_attribute_value\"\xa4\x0c\n\x0fVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01*<\n\x08TripType\x12\x15\n\x11UNKNOWN_TRIP_TYPE\x10\x00\x12\n\n\x06SHARED\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*\x8b\x01\n\x0cWaypointType\x12\x19\n\x15UNKNOWN_WAYPOINT_TYPE\x10\x00\x12\x18\n\x14PICKUP_WAYPOINT_TYPE\x10\x01\x12\x1a\n\x16\x44ROP_OFF_WAYPOINT_TYPE\x10\x02\x12*\n&INTERMEDIATE_DESTINATION_WAYPOINT_TYPE\x10\x03*_\n\x12PolylineFormatType\x12\x17\n\x13UNKNOWN_FORMAT_TYPE\x10\x00\x12\x15\n\x11LAT_LNG_LIST_TYPE\x10\x01\x12\x19\n\x15\x45NCODED_POLYLINE_TYPE\x10\x02*\x89\x01\n\x10NavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04*\xd7\x01\n\x0eLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01\x42\xd7\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0b\x46leetEngineP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" +descriptor_data = "\n,google/maps/fleetengine/v1/fleetengine.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"b\n\x0fTerminalPointId\x12\x16\n\x08place_id\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x1a\n\x0cgenerated_id\x18\x03 \x01(\tB\x02\x18\x01H\x00\x12\x11\n\x05value\x18\x04 \x01(\tB\x02\x18\x01:\x02\x18\x01\x42\x04\n\x02Id\"\xf9\x01\n\x10TerminalLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x43\n\x11terminal_point_id\x18\x02 \x01(\x0b\x32$.maps.fleetengine.v1.TerminalPointIdB\x02\x18\x01\x12\x1b\n\x0f\x61\x63\x63\x65ss_point_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x13\n\x07trip_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x45\n\x16terminal_location_type\x18\x05 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointTypeB\x02\x18\x01\"\xbc\x03\n\x0cTripWaypoint\x12\x37\n\x08location\x18\x01 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x0f\n\x07trip_id\x18\x02 \x01(\t\x12\x38\n\rwaypoint_type\x18\x03 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointType\x12-\n\x10path_to_waypoint\x18\x04 \x03(\x0b\x32\x13.google.type.LatLng\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x05 \x01(\t\x12K\n\x13traffic_to_waypoint\x18\n \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolyline\x12\x34\n\x0f\x64istance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\'\n\x03\x65ta\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8f\x01\n\x10VehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\x19\n\x17vehicle_attribute_value\"\x80\x0e\n\x0fVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"z\n\rTripAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14trip_attribute_value*<\n\x08TripType\x12\x15\n\x11UNKNOWN_TRIP_TYPE\x10\x00\x12\n\n\x06SHARED\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*\x8b\x01\n\x0cWaypointType\x12\x19\n\x15UNKNOWN_WAYPOINT_TYPE\x10\x00\x12\x18\n\x14PICKUP_WAYPOINT_TYPE\x10\x01\x12\x1a\n\x16\x44ROP_OFF_WAYPOINT_TYPE\x10\x02\x12*\n&INTERMEDIATE_DESTINATION_WAYPOINT_TYPE\x10\x03*_\n\x12PolylineFormatType\x12\x17\n\x13UNKNOWN_FORMAT_TYPE\x10\x00\x12\x15\n\x11LAT_LNG_LIST_TYPE\x10\x01\x12\x19\n\x15\x45NCODED_POLYLINE_TYPE\x10\x02*\x89\x01\n\x10NavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04*\xd7\x01\n\x0eLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01\x42\xd7\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0b\x46leetEngineP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -53,6 +53,7 @@ module V1 TripWaypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripWaypoint").msgclass VehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttribute").msgclass VehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleLocation").msgclass + TripAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripAttribute").msgclass TripType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripType").enummodule WaypointType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.WaypointType").enummodule PolylineFormatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PolylineFormatType").enummodule diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb index 326b77574ba6..591c8d6b494e 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb @@ -18,7 +18,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n)google/maps/fleetengine/v1/trip_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a&google/maps/fleetengine/v1/trips.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\x11\x43reateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x37\n\x06parent\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12\x14\n\x07trip_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\"\x82\x04\n\x0eGetTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12+\n\x04view\x18\x0b \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\x1bremaining_waypoints_version\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11route_format_type\x18\x08 \x01(\x0e\x32\'.maps.fleetengine.v1.PolylineFormatType\x12I\n%current_route_segment_traffic_version\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n!remaining_waypoints_route_version\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x01\n\x11\x44\x65leteTripRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x35\n\x04name\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\"\xcd\x02\n\x19ReportBillableTripRequest\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08platform\x18\x05 \x01(\x0e\x32..maps.fleetengine.v1.BillingPlatformIdentifier\x12\x13\n\x0brelated_ids\x18\x06 \x03(\t\x12R\n\rsolution_type\x18\x07 \x01(\x0e\x32;.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType\"W\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12(\n$ON_DEMAND_RIDESHARING_AND_DELIVERIES\x10\x01\"\xbe\x01\n\x11UpdateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe9\x01\n\x12SearchTripsRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nvehicle_id\x18\x04 \x01(\t\x12\x19\n\x11\x61\x63tive_trips_only\x18\x05 \x01(\x08\x12\x11\n\tpage_size\x18\x06 \x01(\x05\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x34\n\x11minimum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"X\n\x13SearchTripsResponse\x12(\n\x05trips\x18\x01 \x03(\x0b\x32\x19.maps.fleetengine.v1.Trip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\x08\n\x0bTripService\x12\xa8\x01\n\nCreateTrip\x12&.maps.fleetengine.v1.CreateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"W\x82\xd3\xe4\x93\x02&\"\x1e/v1/{parent=providers/*}/trips:\x04trip\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\x9a\x01\n\x07GetTrip\x12#.maps.fleetengine.v1.GetTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"O\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xa4\x01\n\nDeleteTrip\x12&.maps.fleetengine.v1.DeleteTripRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbf\x01\n\x12ReportBillableTrip\x12..maps.fleetengine.v1.ReportBillableTripRequest\x1a\x16.google.protobuf.Empty\"a\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=providers/*/billableTrips/*}:report:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbd\x01\n\x0bSearchTrips\x12\'.maps.fleetengine.v1.SearchTripsRequest\x1a(.maps.fleetengine.v1.SearchTripsResponse\"[\x82\xd3\xe4\x93\x02*\"%/v1/{parent=providers/*}/trips:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nUpdateTrip\x12&.maps.fleetengine.v1.UpdateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"U\x82\xd3\xe4\x93\x02&\x1a\x1e/v1/{name=providers/*/trips/*}:\x04trip\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07TripApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" +descriptor_data = "\n)google/maps/fleetengine/v1/trip_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a&google/maps/fleetengine/v1/trips.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\x11\x43reateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x37\n\x06parent\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12\x14\n\x07trip_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\"\x86\x04\n\x0eGetTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12+\n\x04view\x18\x0b \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1bremaining_waypoints_version\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x42\n\x11route_format_type\x18\x08 \x01(\x0e\x32\'.maps.fleetengine.v1.PolylineFormatType\x12I\n%current_route_segment_traffic_version\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n!remaining_waypoints_route_version\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x01\n\x11\x44\x65leteTripRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x35\n\x04name\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\"\xcd\x02\n\x19ReportBillableTripRequest\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08platform\x18\x05 \x01(\x0e\x32..maps.fleetengine.v1.BillingPlatformIdentifier\x12\x13\n\x0brelated_ids\x18\x06 \x03(\t\x12R\n\rsolution_type\x18\x07 \x01(\x0e\x32;.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType\"W\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12(\n$ON_DEMAND_RIDESHARING_AND_DELIVERIES\x10\x01\"\xbe\x01\n\x11UpdateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe9\x01\n\x12SearchTripsRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nvehicle_id\x18\x04 \x01(\t\x12\x19\n\x11\x61\x63tive_trips_only\x18\x05 \x01(\x08\x12\x11\n\tpage_size\x18\x06 \x01(\x05\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x34\n\x11minimum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"X\n\x13SearchTripsResponse\x12(\n\x05trips\x18\x01 \x03(\x0b\x32\x19.maps.fleetengine.v1.Trip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\x08\n\x0bTripService\x12\xa8\x01\n\nCreateTrip\x12&.maps.fleetengine.v1.CreateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"W\x82\xd3\xe4\x93\x02&\"\x1e/v1/{parent=providers/*}/trips:\x04trip\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\x9a\x01\n\x07GetTrip\x12#.maps.fleetengine.v1.GetTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"O\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xa4\x01\n\nDeleteTrip\x12&.maps.fleetengine.v1.DeleteTripRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbf\x01\n\x12ReportBillableTrip\x12..maps.fleetengine.v1.ReportBillableTripRequest\x1a\x16.google.protobuf.Empty\"a\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=providers/*/billableTrips/*}:report:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbd\x01\n\x0bSearchTrips\x12\'.maps.fleetengine.v1.SearchTripsRequest\x1a(.maps.fleetengine.v1.SearchTripsResponse\"[\x82\xd3\xe4\x93\x02*\"%/v1/{parent=providers/*}/trips:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nUpdateTrip\x12&.maps.fleetengine.v1.UpdateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"U\x82\xd3\xe4\x93\x02&\x1a\x1e/v1/{name=providers/*/trips/*}:\x04trip\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07TripApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb index f9d5e4976894..e9097669435a 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb @@ -14,7 +14,7 @@ require 'google/type/latlng_pb' -descriptor_data = "\n&google/maps/fleetengine/v1/trips.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xb7\x10\n\x04Trip\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nvehicle_id\x18\x02 \x01(\t\x12\x34\n\x0btrip_status\x18\x03 \x01(\x0e\x32\x1f.maps.fleetengine.v1.TripStatus\x12\x30\n\ttrip_type\x18\x04 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12;\n\x0cpickup_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x43\n\x13\x61\x63tual_pickup_point\x18\x16 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12K\n\x1b\x61\x63tual_pickup_arrival_point\x18 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x34\n\x0bpickup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x19intermediate_destinations\x18\x0e \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x45\n!intermediate_destinations_version\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12&\n\x1eintermediate_destination_index\x18\x0f \x01(\x05\x12^\n.actual_intermediate_destination_arrival_points\x18! \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12P\n actual_intermediate_destinations\x18\" \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12<\n\rdropoff_point\x18\x07 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x44\n\x14\x61\x63tual_dropoff_point\x18\x17 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x35\n\x0c\x64ropoff_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x13remaining_waypoints\x18\x10 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12<\n\x11vehicle_waypoints\x18\x14 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12\'\n\x05route\x18\t \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\x12\"\n\x15\x63urrent_route_segment\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolylineB\x03\xe0\x41\x03\x12N\n%current_route_segment_traffic_version\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12\x43\n\x19remaining_distance_meters\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12>\n\x15\x65ta_to_first_waypoint\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n remaining_time_to_first_waypoint\x18\x1b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x44\n\x1bremaining_waypoints_version\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n!remaining_waypoints_route_version\x18\x1d \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14number_of_passengers\x18\n \x01(\x05\x42\x03\xe0\x41\x05\x12@\n\rlast_location\x18\x0b \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x03\x12$\n\x17last_location_snappable\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\x04view\x18\x1f \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView:G\xea\x41\x44\n\x1f\x66leetengine.googleapis.com/Trip\x12!providers/{provider}/trips/{trip}\"\x9c\x01\n\x0cStopLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x04*\xe2\x01\n\nTripStatus\x12\x17\n\x13UNKNOWN_TRIP_STATUS\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x15\n\x11\x45NROUTE_TO_PICKUP\x10\x02\x12\x15\n\x11\x41RRIVED_AT_PICKUP\x10\x03\x12\'\n#ARRIVED_AT_INTERMEDIATE_DESTINATION\x10\x07\x12\'\n#ENROUTE_TO_INTERMEDIATE_DESTINATION\x10\x08\x12\x16\n\x12\x45NROUTE_TO_DROPOFF\x10\x04\x12\x0c\n\x08\x43OMPLETE\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06*\x7f\n\x19\x42illingPlatformIdentifier\x12+\n\'BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED\x10\x00\x12\n\n\x06SERVER\x10\x01\x12\x07\n\x03WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\n\n\x06OTHERS\x10\x05*G\n\x08TripView\x12\x19\n\x15TRIP_VIEW_UNSPECIFIED\x10\x00\x12\x07\n\x03SDK\x10\x01\x12\x17\n\x13JOURNEY_SHARING_V1S\x10\x02\x42\xd1\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x05TripsP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" +descriptor_data = "\n&google/maps/fleetengine/v1/trips.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xef\x10\n\x04Trip\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nvehicle_id\x18\x02 \x01(\t\x12\x34\n\x0btrip_status\x18\x03 \x01(\x0e\x32\x1f.maps.fleetengine.v1.TripStatus\x12\x30\n\ttrip_type\x18\x04 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12;\n\x0cpickup_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x43\n\x13\x61\x63tual_pickup_point\x18\x16 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12K\n\x1b\x61\x63tual_pickup_arrival_point\x18 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x34\n\x0bpickup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x19intermediate_destinations\x18\x0e \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x45\n!intermediate_destinations_version\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12&\n\x1eintermediate_destination_index\x18\x0f \x01(\x05\x12^\n.actual_intermediate_destination_arrival_points\x18! \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12P\n actual_intermediate_destinations\x18\" \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12<\n\rdropoff_point\x18\x07 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x44\n\x14\x61\x63tual_dropoff_point\x18\x17 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x35\n\x0c\x64ropoff_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x13remaining_waypoints\x18\x10 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12<\n\x11vehicle_waypoints\x18\x14 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12\'\n\x05route\x18\t \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\x12\"\n\x15\x63urrent_route_segment\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolylineB\x03\xe0\x41\x03\x12N\n%current_route_segment_traffic_version\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12\x43\n\x19remaining_distance_meters\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12>\n\x15\x65ta_to_first_waypoint\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n remaining_time_to_first_waypoint\x18\x1b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x44\n\x1bremaining_waypoints_version\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n!remaining_waypoints_route_version\x18\x1d \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14number_of_passengers\x18\n \x01(\x05\x42\x03\xe0\x41\x05\x12@\n\rlast_location\x18\x0b \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x03\x12$\n\x17last_location_snappable\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\x04view\x18\x1f \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x36\n\nattributes\x18# \x03(\x0b\x32\".maps.fleetengine.v1.TripAttribute:G\xea\x41\x44\n\x1f\x66leetengine.googleapis.com/Trip\x12!providers/{provider}/trips/{trip}\"\x9c\x01\n\x0cStopLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x04*\xe2\x01\n\nTripStatus\x12\x17\n\x13UNKNOWN_TRIP_STATUS\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x15\n\x11\x45NROUTE_TO_PICKUP\x10\x02\x12\x15\n\x11\x41RRIVED_AT_PICKUP\x10\x03\x12\'\n#ARRIVED_AT_INTERMEDIATE_DESTINATION\x10\x07\x12\'\n#ENROUTE_TO_INTERMEDIATE_DESTINATION\x10\x08\x12\x16\n\x12\x45NROUTE_TO_DROPOFF\x10\x04\x12\x0c\n\x08\x43OMPLETE\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06*\x7f\n\x19\x42illingPlatformIdentifier\x12+\n\'BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED\x10\x00\x12\n\n\x06SERVER\x10\x01\x12\x07\n\x03WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\n\n\x06OTHERS\x10\x05*G\n\x08TripView\x12\x19\n\x15TRIP_VIEW_UNSPECIFIED\x10\x00\x12\x07\n\x03SDK\x10\x01\x12\x17\n\x13JOURNEY_SHARING_V1S\x10\x02\x42\xd1\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x05TripsP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb index d65ae5c8a4d9..57a3b013af54 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb @@ -233,6 +233,19 @@ class VehicleAttribute # @!attribute [rw] raw_location_accuracy # @return [::Google::Protobuf::DoubleValue] # Accuracy of `raw_location` as a radius, in meters. + # @!attribute [rw] flp_location + # @return [::Google::Type::LatLng] + # The location from Android's Fused Location Provider. + # @!attribute [rw] flp_update_time + # @return [::Google::Protobuf::Timestamp] + # Update timestamp of `flp_location`. + # @!attribute [rw] flp_latlng_accuracy_meters + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `flp_location` in meters as a radius. + # @!attribute [rw] flp_heading_degrees + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees, as determined by the Fused + # Location Provider. 0 represents North. The valid range is [0,360). # @!attribute [rw] supplemental_location # @return [::Google::Type::LatLng] # Supplemental location provided by the integrating app. @@ -255,6 +268,31 @@ class VehicleLocation extend ::Google::Protobuf::MessageExts::ClassMethods end + # Describes a trip attribute as a key-value pair. The "key:value" string length + # cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. Keys may not contain the colon character (:). + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TripAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The type of a trip. module TripType # Default, used for unspecified or unrecognized trip types. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb index b0c903ebae72..69cc7a18e0bb 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb @@ -44,13 +44,13 @@ module Speed # Default value. This value is unused. SPEED_UNSPECIFIED = 0 - # Normal speed, no slowdown is detected. + # Normal speed, no traffic delays. NORMAL = 1 - # Slowdown detected, but no traffic jam formed. + # Slowdown detected, medium amount of traffic. SLOW = 2 - # Traffic jam detected. + # Traffic delays. TRAFFIC_JAM = 3 end end diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb index 2c2311962e01..b677517131c2 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb @@ -104,11 +104,12 @@ class CreateTripRequest # unchanged since this timestamp, the route field is not set in the response. # If a minimum is unspecified, the route data are always retrieved. # @!attribute [rw] remaining_waypoints_version + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints` are retrieved. If they are unchanged since this - # timestamp, the `remaining_waypoints` are not set in the response. If this - # field is unspecified, `remaining_waypoints` is always retrieved. + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. # @!attribute [rw] route_format_type # @return [::Google::Maps::FleetEngine::V1::PolylineFormatType] # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb index 07e8e907d353..4bc45542041a 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb @@ -187,6 +187,9 @@ module V1 # @return [::Google::Maps::FleetEngine::V1::TripView] # The subset of Trip fields that are populated and how they should be # interpreted. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::TripAttribute>] + # A list of custom Trip attributes. Each attribute must have a unique key. class Trip include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From eb5fd4f4de04bea398ae379b00dc63ebbb06a877 Mon Sep 17 00:00:00 2001 From: Viacheslav Rostovtsev <58152857+viacheslav-rostovtsev@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:19:21 -0700 Subject: [PATCH 196/457] chore: style and doc fixes for datastore (#30626) * chore: style and doc fixes for datastore --- google-cloud-datastore/.rubocop.yml | 2 + .../datastore/aggregate_query_test.rb | 14 +++---- .../acceptance/datastore/datastore_test.rb | 4 +- .../dataset/aggregate_query_results.rb | 29 +++++++------ .../cloud/datastore/dataset/lookup_results.rb | 42 ++++++++++++------- .../lib/google/cloud/datastore/service.rb | 11 +++++ 6 files changed, 66 insertions(+), 36 deletions(-) diff --git a/google-cloud-datastore/.rubocop.yml b/google-cloud-datastore/.rubocop.yml index 7bcaacaa8a5b..475068746d87 100644 --- a/google-cloud-datastore/.rubocop.yml +++ b/google-cloud-datastore/.rubocop.yml @@ -24,3 +24,5 @@ Naming/FileName: Style/BisectedAttrAccessor: Exclude: - "lib/google/cloud/datastore/dataset/query_results.rb" + - "lib/google/cloud/datastore/dataset/lookup_results.rb" + - "lib/google/cloud/datastore/dataset/aggregate_query_results.rb" diff --git a/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb b/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb index d39d727e4a89..00c1707cc4d8 100644 --- a/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb +++ b/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb @@ -79,11 +79,11 @@ end before do - dataset.transaction { |tx| tx.save *characters } + dataset.transaction { |tx| tx.save(*characters) } end after do - dataset.delete *characters + dataset.delete(*characters) end describe "Common tests for aggregates" do @@ -99,7 +99,7 @@ describe "COUNT via AggregateQuery" do it "returns 0 for no records" do - dataset.delete *characters + dataset.delete(*characters) query = Google::Cloud::Datastore.new .query("Character") .ancestor(book) @@ -301,7 +301,7 @@ describe "SUM via AggregateQuery" do it "returns 0 for no records" do - dataset.delete *characters # delete dataset before querying + dataset.delete(*characters) # delete dataset before querying query = Google::Cloud::Datastore.new .query("Character") .ancestor(book) @@ -325,11 +325,11 @@ it "returns double sum for records with double values" do # delete integer dataset and save records with doubles - dataset.delete *characters + dataset.delete(*characters) characters.each do |ch| ch["appearances"] = ch["appearances"].to_f end - dataset.transaction { |tx| tx.save *characters } + dataset.transaction { |tx| tx.save(*characters) } query = Google::Cloud::Datastore.new .query("Character") @@ -519,7 +519,7 @@ describe "AVG via AggregateQuery" do it "returns 0 for no records" do - dataset.delete *characters # delete dataset before querying + dataset.delete(*characters) # delete dataset before querying query = Google::Cloud::Datastore.new .query("Character") .ancestor(book) diff --git a/google-cloud-datastore/acceptance/datastore/datastore_test.rb b/google-cloud-datastore/acceptance/datastore/datastore_test.rb index 68fac3d7a29c..de5af58738ba 100644 --- a/google-cloud-datastore/acceptance/datastore/datastore_test.rb +++ b/google-cloud-datastore/acceptance/datastore/datastore_test.rb @@ -500,7 +500,7 @@ end before do - dataset.transaction { |tx| tx.save *characters } + dataset.transaction { |tx| tx.save(*characters) } end it "should limit queries" do @@ -850,7 +850,7 @@ end after do - dataset.delete *characters + dataset.delete(*characters) end end diff --git a/google-cloud-datastore/lib/google/cloud/datastore/dataset/aggregate_query_results.rb b/google-cloud-datastore/lib/google/cloud/datastore/dataset/aggregate_query_results.rb index 58f03b58072a..3d7f29ca746f 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/dataset/aggregate_query_results.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/dataset/aggregate_query_results.rb @@ -40,22 +40,27 @@ class Dataset # class AggregateQueryResults ## - # @private Object of type [Hash{String => Object}]. + # The result of the aggregation query, returned as a hash of key-value + # pairs. The key is the alias of the aggregate function, and the value + # is the result of the aggregation. # - # String can have the following values: - # - an aggregate literal "sum", "avg", or "count" - # - a custom aggregate alias - # Object can have the following types: - # - Integer - # - Float + # The alias of the aggregate function can be: + # - an aggregate literal "sum", "avg", or "count" + # - a custom aggregate alias + # + # @return [Hash{String => Integer, Float}] attr_reader :aggregate_fields ## - # Read timestamp the query was done on the database at. + # The time when the query was executed. # - # @return Google::Protobuf::Timestamp + # @return [Google::Protobuf::Timestamp] attr_reader :read_time + ## + # @private + attr_writer :aggregate_fields, :read_time + ## # Retrieves the aggregate data. # @@ -121,9 +126,9 @@ def self.from_grpc aggregate_query_response end end - new.tap do |s| - s.instance_variable_set :@aggregate_fields, aggregate_fields.to_h - s.instance_variable_set :@read_time, aggregate_query_response.batch.read_time + new.tap do |aq_result| + aq_result.aggregate_fields = aggregate_fields.to_h + aq_result.read_time = aggregate_query_response.batch.read_time end end end diff --git a/google-cloud-datastore/lib/google/cloud/datastore/dataset/lookup_results.rb b/google-cloud-datastore/lib/google/cloud/datastore/dataset/lookup_results.rb index c78478303e5f..684d25f024f3 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/dataset/lookup_results.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/dataset/lookup_results.rb @@ -20,12 +20,12 @@ module Cloud module Datastore class Dataset ## - # LookupResults is a special case Array with additional values. - # A LookupResults object is returned from Dataset#find_all and + # {LookupResults} is a special case Array with additional values. + # A {LookupResults} object is returned from {Dataset#find_all} and # contains the entities as well as the Keys that were deferred from # the results and the Entities that were missing in the dataset. # - # Please be cautious when treating the QueryResults as an Array. + # Please be cautious when treating the {LookupResults} as an Array. # Many common Array methods will return a new Array instance. # # @example @@ -55,21 +55,32 @@ class Dataset class LookupResults < DelegateClass(::Array) ## # The time at which these entities were read or found missing. + # @return [Google::Protobuf::Timestamp] attr_reader :response_read_time ## # Time at which the entities are being read. This would not be # older than 270 seconds. + # + # This is a copy of the input parameter supplied to the {Dataset#find_all} function. + # + # @return [Time, nil] attr_reader :read_time ## # Keys that were not looked up due to resource constraints. + # @return [Array] attr_accessor :deferred ## # Entities not found, with only the key populated. + # @return [Array] attr_accessor :missing + ## + # @private + attr_writer :service, :consistency, :transaction, :response_read_time, :read_time + ## # @private Create a new LookupResults with an array of values. def initialize arr = [] @@ -196,18 +207,19 @@ def all request_limit: nil, &block ## # @private New Dataset::LookupResults from a # Google::Dataset::V1::LookupResponse object. - def self.from_grpc lookup_res, service, consistency = nil, transaction = nil, read_time = nil - entities = to_gcloud_entities lookup_res.found - deferred = to_gcloud_keys lookup_res.deferred - missing = to_gcloud_entities lookup_res.missing - new(entities).tap do |lr| - lr.instance_variable_set :@service, service - lr.instance_variable_set :@consistency, consistency - lr.instance_variable_set :@transaction, transaction - lr.instance_variable_set :@read_time, read_time - lr.instance_variable_set :@response_read_time, lookup_res.read_time - lr.instance_variable_set :@deferred, deferred - lr.instance_variable_set :@missing, missing + def self.from_grpc lookup_resp, service, consistency = nil, transaction = nil, read_time = nil + entities = to_gcloud_entities lookup_resp.found + deferred = to_gcloud_keys lookup_resp.deferred + missing = to_gcloud_entities lookup_resp.missing + + new(entities).tap do |lookup_results| + lookup_results.service = service + lookup_results.consistency = consistency + lookup_results.transaction = transaction + lookup_results.read_time = read_time + lookup_results.response_read_time = lookup_resp.read_time + lookup_results.deferred = deferred + lookup_results.missing = missing end end diff --git a/google-cloud-datastore/lib/google/cloud/datastore/service.rb b/google-cloud-datastore/lib/google/cloud/datastore/service.rb index 0297fc0f4918..367437d686a8 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/service.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/service.rb @@ -174,6 +174,17 @@ def generate_read_options consistency, transaction, read_time nil end + ## + # @private Converts a time-like object to a Google::Protobuf::Timestamp. + # + # Any object that responds to `#to_time` is a valid input. + # + # @param time [Time, DateTime, Google::Protobuf::Timestamp, nil] The + # time object to convert. If `nil`, `nil` will be returned. + # + # @return [Google::Protobuf::Timestamp, nil] The converted Protobuf timestamp, + # or `nil` if the input was `nil`. + # def read_time_to_timestamp time return nil if time.nil? From 5dd234b61d49bf8cb554f6524e11d78035e1d961 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:24:07 -0700 Subject: [PATCH 197/457] docs: clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method (#30625) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method chore: remove require for `rest/operations` when rest operations are not generated PiperOrigin-RevId: 781586174 Source-Link: https://github.com/googleapis/googleapis/commit/74657e8a6690b249c048f685124ee3b8473b70b4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1e25816d65c7dab1e913abf439a6b4c4f97f8ef0 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpc2lvbi12MXA0YmV0YTEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpc2lvbl9haS12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtzdGF0aW9ucy12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtzdGF0aW9ucy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/cloud/vision/v1p4beta1/product_search/client.rb | 4 ++-- .../cloud/vision/v1p4beta1/product_search/rest/client.rb | 4 ++-- .../lib/google/cloud/vision_ai/v1/warehouse/client.rb | 4 ++-- .../lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb | 4 ++-- .../lib/google/cloud/workstations/v1/workstations/client.rb | 4 ++-- .../google/cloud/workstations/v1/workstations/rest/client.rb | 4 ++-- .../google/cloud/workstations/v1beta/workstations/client.rb | 4 ++-- .../cloud/workstations/v1beta/workstations/rest/client.rb | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/product_search/client.rb b/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/product_search/client.rb index a08c23314858..b85dd8ae4406 100644 --- a/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/product_search/client.rb +++ b/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/product_search/client.rb @@ -2139,12 +2139,12 @@ def import_product_sets request, options = nil # @param product_set_purge_config [::Google::Cloud::Vision::V1p4beta1::ProductSetPurgeConfig, ::Hash] # Specify which ProductSet contains the Products to be deleted. # - # Note: The following fields are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param delete_orphan_products [::Boolean] # If delete_orphan_products is true, all Products that are not in any # ProductSet will be deleted. # - # Note: The following fields are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The project and location in which the Products should be deleted. # diff --git a/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/product_search/rest/client.rb b/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/product_search/rest/client.rb index cef62a59ac4d..8b42492b7d73 100644 --- a/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/product_search/rest/client.rb +++ b/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/product_search/rest/client.rb @@ -2006,12 +2006,12 @@ def import_product_sets request, options = nil # @param product_set_purge_config [::Google::Cloud::Vision::V1p4beta1::ProductSetPurgeConfig, ::Hash] # Specify which ProductSet contains the Products to be deleted. # - # Note: The following fields are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param delete_orphan_products [::Boolean] # If delete_orphan_products is true, all Products that are not in any # ProductSet will be deleted. # - # Note: The following fields are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The project and location in which the Products should be deleted. # diff --git a/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/warehouse/client.rb b/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/warehouse/client.rb index f3d2a948f270..a5a9cdcd0bc3 100644 --- a/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/warehouse/client.rb +++ b/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/warehouse/client.rb @@ -4801,11 +4801,11 @@ def search_assets request, options = nil # @param image_query [::Google::Cloud::VisionAI::V1::ImageQuery, ::Hash] # An image-only query. # - # Note: The following fields are mutually exclusive: `image_query`, `text_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_query`, `text_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param text_query [::String] # A text-only query. # - # Note: The following fields are mutually exclusive: `text_query`, `image_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `text_query`, `image_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param index_endpoint [::String] # Required. The index endpoint to search. # Format: diff --git a/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb b/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb index 5720f87f7257..177877bcb45d 100644 --- a/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +++ b/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb @@ -4386,11 +4386,11 @@ def search_assets request, options = nil # @param image_query [::Google::Cloud::VisionAI::V1::ImageQuery, ::Hash] # An image-only query. # - # Note: The following fields are mutually exclusive: `image_query`, `text_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_query`, `text_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param text_query [::String] # A text-only query. # - # Note: The following fields are mutually exclusive: `text_query`, `image_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `text_query`, `image_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param index_endpoint [::String] # Required. The index endpoint to search. # Format: diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb index f8462e36d8c2..614410d71d08 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb @@ -2181,13 +2181,13 @@ def stop_workstation request, options = nil # token's expiration time will be set to a default value of 1 hour in the # future. # - # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param ttl [::Google::Protobuf::Duration, ::Hash] # Desired lifetime duration of the access token. This value must # be at most 24 hours. If a value is not specified, the token's lifetime # will be set to a default value of 1 hour. # - # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `ttl`, `expire_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param workstation [::String] # Required. Name of the workstation for which the access token should be # generated. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb index 9f15bb8d6302..0111d49bcb72 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb @@ -2042,13 +2042,13 @@ def stop_workstation request, options = nil # token's expiration time will be set to a default value of 1 hour in the # future. # - # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param ttl [::Google::Protobuf::Duration, ::Hash] # Desired lifetime duration of the access token. This value must # be at most 24 hours. If a value is not specified, the token's lifetime # will be set to a default value of 1 hour. # - # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `ttl`, `expire_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param workstation [::String] # Required. Name of the workstation for which the access token should be # generated. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb index 726e4797ef57..2c7b4c930efd 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb @@ -2181,13 +2181,13 @@ def stop_workstation request, options = nil # token's expiration time will be set to a default value of 1 hour in the # future. # - # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param ttl [::Google::Protobuf::Duration, ::Hash] # Desired lifetime duration of the access token. This value must # be at most 24 hours. If a value is not specified, the token's lifetime # will be set to a default value of 1 hour. # - # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `ttl`, `expire_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param workstation [::String] # Required. Name of the workstation for which the access token should be # generated. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb index 0779321dc25d..e5496c18cd0a 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb @@ -2042,13 +2042,13 @@ def stop_workstation request, options = nil # token's expiration time will be set to a default value of 1 hour in the # future. # - # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param ttl [::Google::Protobuf::Duration, ::Hash] # Desired lifetime duration of the access token. This value must # be at most 24 hours. If a value is not specified, the token's lifetime # will be set to a default value of 1 hour. # - # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `ttl`, `expire_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param workstation [::String] # Required. Name of the workstation for which the access token should be # generated. From 9a0efad0afecaab9c460d850231fbd5a8e475e9d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:25:45 -0700 Subject: [PATCH 198/457] docs: clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method (#30623) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method chore: remove require for `rest/operations` when rest operations are not generated PiperOrigin-RevId: 781586174 Source-Link: https://github.com/googleapis/googleapis/commit/74657e8a6690b249c048f685124ee3b8473b70b4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1e25816d65c7dab1e913abf439a6b4c4f97f8ef0 Copy-Tag: eyJwIjoiZ29vZ2xlLWFuYWx5dGljcy1hZG1pbi12MWFscGhhLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFsbG95X2RiLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFsbG95X2RiLXYxYWxwaGEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFsbG95X2RiLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc2V0LXYxLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc3VyZWRfd29ya2xvYWRzLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1dG9tbC12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1dG9tbC12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWFuYWx5dGljc19odWItdjEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfdHJhbnNmZXItdjEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLWFkbWluLXYyLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNoYW5uZWwtdjEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX2Rtcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbmZpZGVudGlhbF9jb21wdXRpbmctdjEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfY2F0YWxvZy1saW5lYWdlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfY2F0YWxvZy12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfY2F0YWxvZy12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfbGFiZWxpbmctdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1alpha/analytics_admin_service/client.rb | 8 +-- .../analytics_admin_service/rest/client.rb | 8 +-- .../ai_platform/v1/dataset_service/client.rb | 4 +- .../v1/dataset_service/rest/client.rb | 4 +- .../v1/evaluation_service/client.rb | 50 +++++++++---------- .../v1/evaluation_service/rest/client.rb | 50 +++++++++---------- .../v1/featurestore_service/client.rb | 22 ++++---- .../v1/featurestore_service/rest/client.rb | 22 ++++---- .../v1/model_garden_service/client.rb | 4 +- .../v1/model_garden_service/rest/client.rb | 4 +- .../ai_platform/v1/model_service/client.rb | 4 +- .../v1/model_service/rest/client.rb | 4 +- .../alloy_db/v1/alloy_db_admin/client.rb | 12 ++--- .../alloy_db/v1/alloy_db_admin/rest/client.rb | 12 ++--- .../alloy_db/v1alpha/alloy_db_admin/client.rb | 12 ++--- .../v1alpha/alloy_db_admin/rest/client.rb | 12 ++--- .../alloy_db/v1beta/alloy_db_admin/client.rb | 12 ++--- .../v1beta/alloy_db_admin/rest/client.rb | 12 ++--- .../cloud/asset/v1/asset_service/client.rb | 8 +-- .../asset/v1/asset_service/rest/client.rb | 8 +-- .../assured_workloads_service/client.rb | 4 +- .../google/cloud/automl/v1/automl/client.rb | 4 +- .../cloud/automl/v1/automl/rest/client.rb | 4 +- .../cloud/automl/v1beta1/automl/client.rb | 4 +- .../automl/v1beta1/automl/rest/client.rb | 4 +- .../v1/analytics_hub_service/client.rb | 4 +- .../v1/analytics_hub_service/rest/client.rb | 4 +- .../v1/data_transfer_service/client.rb | 4 +- .../v1/data_transfer_service/rest/client.rb | 4 +- .../admin/v2/bigtable_table_admin/client.rb | 8 +-- .../cloud/bigtable/v2/bigtable/client.rb | 4 +- .../v1/cloud_channel_service/client.rb | 22 ++++---- .../v1/cloud_channel_service/rest/client.rb | 22 ++++---- .../v1/data_migration_service/client.rb | 8 +-- .../v1/confidential_computing/client.rb | 4 +- .../v1/confidential_computing/rest/client.rb | 4 +- .../data_catalog/lineage/v1/lineage/client.rb | 4 +- .../lineage/v1/lineage/rest/client.rb | 4 +- .../data_catalog/v1/data_catalog/client.rb | 10 ++-- .../v1/data_catalog/rest/client.rb | 10 ++-- .../client.rb | 4 +- .../rest/client.rb | 4 +- .../v1beta1/data_catalog/client.rb | 4 +- .../v1beta1/data_catalog/rest/client.rb | 4 +- .../v1beta1/data_labeling_service/client.rb | 20 ++++---- 45 files changed, 222 insertions(+), 222 deletions(-) diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb index 3770d70933b4..a167255a1316 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb @@ -14480,22 +14480,22 @@ def delete_reporting_data_annotation request, options = nil # Google Analytics [user # ID](https://firebase.google.com/docs/analytics/userid). # - # Note: The following fields are mutually exclusive: `user_id`, `client_id`, `app_instance_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `user_id`, `client_id`, `app_instance_id`, `user_provided_data`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param client_id [::String] # Google Analytics [client # ID](https://support.google.com/analytics/answer/11593727). # - # Note: The following fields are mutually exclusive: `client_id`, `user_id`, `app_instance_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `client_id`, `user_id`, `app_instance_id`, `user_provided_data`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param app_instance_id [::String] # Firebase [application instance # ID](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#getAppInstanceId). # - # Note: The following fields are mutually exclusive: `app_instance_id`, `user_id`, `client_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `app_instance_id`, `user_id`, `client_id`, `user_provided_data`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param user_provided_data [::String] # The un-hashed, unencrypted, [user-provided # data](https://support.google.com/analytics/answer/14077171). # - # Note: The following fields are mutually exclusive: `user_provided_data`, `user_id`, `client_id`, `app_instance_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `user_provided_data`, `user_id`, `client_id`, `app_instance_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The name of the property to submit user deletion for. # diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb index a623dfeff35f..e71c17179dde 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb @@ -13482,22 +13482,22 @@ def delete_reporting_data_annotation request, options = nil # Google Analytics [user # ID](https://firebase.google.com/docs/analytics/userid). # - # Note: The following fields are mutually exclusive: `user_id`, `client_id`, `app_instance_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `user_id`, `client_id`, `app_instance_id`, `user_provided_data`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param client_id [::String] # Google Analytics [client # ID](https://support.google.com/analytics/answer/11593727). # - # Note: The following fields are mutually exclusive: `client_id`, `user_id`, `app_instance_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `client_id`, `user_id`, `app_instance_id`, `user_provided_data`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param app_instance_id [::String] # Firebase [application instance # ID](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#getAppInstanceId). # - # Note: The following fields are mutually exclusive: `app_instance_id`, `user_id`, `client_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `app_instance_id`, `user_id`, `client_id`, `user_provided_data`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param user_provided_data [::String] # The un-hashed, unencrypted, [user-provided # data](https://support.google.com/analytics/answer/14077171). # - # Note: The following fields are mutually exclusive: `user_provided_data`, `user_id`, `client_id`, `app_instance_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `user_provided_data`, `user_id`, `client_id`, `app_instance_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The name of the property to submit user deletion for. # @yield [result, operation] Access the result along with the TransportOperation object diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/dataset_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/dataset_service/client.rb index 3a52339c95c0..a94821f48ec7 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/dataset_service/client.rb @@ -1622,11 +1622,11 @@ def list_data_items request, options = nil # A comma-separated list of data item fields to order by, sorted in # ascending order. Use "desc" after a field name for descending. # - # Note: The following fields are mutually exclusive: `order_by_data_item`, `order_by_annotation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `order_by_data_item`, `order_by_annotation`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param order_by_annotation [::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest::OrderByAnnotation, ::Hash] # Expression that allows ranking results based on annotation's property. # - # Note: The following fields are mutually exclusive: `order_by_annotation`, `order_by_data_item`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `order_by_annotation`, `order_by_data_item`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param dataset [::String] # Required. The resource name of the Dataset from which to search DataItems. # Format: diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb index e3226debe920..94250cf1c2f3 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb @@ -1519,11 +1519,11 @@ def list_data_items request, options = nil # A comma-separated list of data item fields to order by, sorted in # ascending order. Use "desc" after a field name for descending. # - # Note: The following fields are mutually exclusive: `order_by_data_item`, `order_by_annotation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `order_by_data_item`, `order_by_annotation`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param order_by_annotation [::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest::OrderByAnnotation, ::Hash] # Expression that allows ranking results based on annotation's property. # - # Note: The following fields are mutually exclusive: `order_by_annotation`, `order_by_data_item`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `order_by_annotation`, `order_by_data_item`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param dataset [::String] # Required. The resource name of the Dataset from which to search DataItems. # Format: diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb index 086e1ad9469f..4f1c3b4ce2a1 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb @@ -237,109 +237,109 @@ def logger # Auto metric instances. # Instances and metric spec for exact match metric. # - # Note: The following fields are mutually exclusive: `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bleu_input [::Google::Cloud::AIPlatform::V1::BleuInput, ::Hash] # Instances and metric spec for bleu metric. # - # Note: The following fields are mutually exclusive: `bleu_input`, `exact_match_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bleu_input`, `exact_match_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param rouge_input [::Google::Cloud::AIPlatform::V1::RougeInput, ::Hash] # Instances and metric spec for rouge metric. # - # Note: The following fields are mutually exclusive: `rouge_input`, `exact_match_input`, `bleu_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `rouge_input`, `exact_match_input`, `bleu_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fluency_input [::Google::Cloud::AIPlatform::V1::FluencyInput, ::Hash] # LLM-based metric instance. # General text generation metrics, applicable to other categories. # Input for fluency metric. # - # Note: The following fields are mutually exclusive: `fluency_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fluency_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param coherence_input [::Google::Cloud::AIPlatform::V1::CoherenceInput, ::Hash] # Input for coherence metric. # - # Note: The following fields are mutually exclusive: `coherence_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `coherence_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param safety_input [::Google::Cloud::AIPlatform::V1::SafetyInput, ::Hash] # Input for safety metric. # - # Note: The following fields are mutually exclusive: `safety_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `safety_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param groundedness_input [::Google::Cloud::AIPlatform::V1::GroundednessInput, ::Hash] # Input for groundedness metric. # - # Note: The following fields are mutually exclusive: `groundedness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `groundedness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fulfillment_input [::Google::Cloud::AIPlatform::V1::FulfillmentInput, ::Hash] # Input for fulfillment metric. # - # Note: The following fields are mutually exclusive: `fulfillment_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fulfillment_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param summarization_quality_input [::Google::Cloud::AIPlatform::V1::SummarizationQualityInput, ::Hash] # Input for summarization quality metric. # - # Note: The following fields are mutually exclusive: `summarization_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `summarization_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param pairwise_summarization_quality_input [::Google::Cloud::AIPlatform::V1::PairwiseSummarizationQualityInput, ::Hash] # Input for pairwise summarization quality metric. # - # Note: The following fields are mutually exclusive: `pairwise_summarization_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `pairwise_summarization_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param summarization_helpfulness_input [::Google::Cloud::AIPlatform::V1::SummarizationHelpfulnessInput, ::Hash] # Input for summarization helpfulness metric. # - # Note: The following fields are mutually exclusive: `summarization_helpfulness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `summarization_helpfulness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param summarization_verbosity_input [::Google::Cloud::AIPlatform::V1::SummarizationVerbosityInput, ::Hash] # Input for summarization verbosity metric. # - # Note: The following fields are mutually exclusive: `summarization_verbosity_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `summarization_verbosity_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param question_answering_quality_input [::Google::Cloud::AIPlatform::V1::QuestionAnsweringQualityInput, ::Hash] # Input for question answering quality metric. # - # Note: The following fields are mutually exclusive: `question_answering_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `question_answering_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param pairwise_question_answering_quality_input [::Google::Cloud::AIPlatform::V1::PairwiseQuestionAnsweringQualityInput, ::Hash] # Input for pairwise question answering quality metric. # - # Note: The following fields are mutually exclusive: `pairwise_question_answering_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `pairwise_question_answering_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param question_answering_relevance_input [::Google::Cloud::AIPlatform::V1::QuestionAnsweringRelevanceInput, ::Hash] # Input for question answering relevance metric. # - # Note: The following fields are mutually exclusive: `question_answering_relevance_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `question_answering_relevance_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param question_answering_helpfulness_input [::Google::Cloud::AIPlatform::V1::QuestionAnsweringHelpfulnessInput, ::Hash] # Input for question answering helpfulness # metric. # - # Note: The following fields are mutually exclusive: `question_answering_helpfulness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `question_answering_helpfulness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param question_answering_correctness_input [::Google::Cloud::AIPlatform::V1::QuestionAnsweringCorrectnessInput, ::Hash] # Input for question answering correctness # metric. # - # Note: The following fields are mutually exclusive: `question_answering_correctness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `question_answering_correctness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param pointwise_metric_input [::Google::Cloud::AIPlatform::V1::PointwiseMetricInput, ::Hash] # Input for pointwise metric. # - # Note: The following fields are mutually exclusive: `pointwise_metric_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `pointwise_metric_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param pairwise_metric_input [::Google::Cloud::AIPlatform::V1::PairwiseMetricInput, ::Hash] # Input for pairwise metric. # - # Note: The following fields are mutually exclusive: `pairwise_metric_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `pairwise_metric_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param tool_call_valid_input [::Google::Cloud::AIPlatform::V1::ToolCallValidInput, ::Hash] # Tool call metric instances. # Input for tool call valid metric. # - # Note: The following fields are mutually exclusive: `tool_call_valid_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tool_call_valid_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param tool_name_match_input [::Google::Cloud::AIPlatform::V1::ToolNameMatchInput, ::Hash] # Input for tool name match metric. # - # Note: The following fields are mutually exclusive: `tool_name_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tool_name_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param tool_parameter_key_match_input [::Google::Cloud::AIPlatform::V1::ToolParameterKeyMatchInput, ::Hash] # Input for tool parameter key match metric. # - # Note: The following fields are mutually exclusive: `tool_parameter_key_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tool_parameter_key_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param tool_parameter_kv_match_input [::Google::Cloud::AIPlatform::V1::ToolParameterKVMatchInput, ::Hash] # Input for tool parameter key value match metric. # - # Note: The following fields are mutually exclusive: `tool_parameter_kv_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tool_parameter_kv_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param comet_input [::Google::Cloud::AIPlatform::V1::CometInput, ::Hash] # Translation metrics. # Input for Comet metric. # - # Note: The following fields are mutually exclusive: `comet_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `comet_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param metricx_input [::Google::Cloud::AIPlatform::V1::MetricxInput, ::Hash] # Input for Metricx metric. # - # Note: The following fields are mutually exclusive: `metricx_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `metricx_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param location [::String] # Required. The resource name of the Location to evaluate the instances. # Format: `projects/{project}/locations/{location}` diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb index 46ed8862fac0..6e27a949fb15 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb @@ -232,109 +232,109 @@ def logger # Auto metric instances. # Instances and metric spec for exact match metric. # - # Note: The following fields are mutually exclusive: `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bleu_input [::Google::Cloud::AIPlatform::V1::BleuInput, ::Hash] # Instances and metric spec for bleu metric. # - # Note: The following fields are mutually exclusive: `bleu_input`, `exact_match_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bleu_input`, `exact_match_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param rouge_input [::Google::Cloud::AIPlatform::V1::RougeInput, ::Hash] # Instances and metric spec for rouge metric. # - # Note: The following fields are mutually exclusive: `rouge_input`, `exact_match_input`, `bleu_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `rouge_input`, `exact_match_input`, `bleu_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fluency_input [::Google::Cloud::AIPlatform::V1::FluencyInput, ::Hash] # LLM-based metric instance. # General text generation metrics, applicable to other categories. # Input for fluency metric. # - # Note: The following fields are mutually exclusive: `fluency_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fluency_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param coherence_input [::Google::Cloud::AIPlatform::V1::CoherenceInput, ::Hash] # Input for coherence metric. # - # Note: The following fields are mutually exclusive: `coherence_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `coherence_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param safety_input [::Google::Cloud::AIPlatform::V1::SafetyInput, ::Hash] # Input for safety metric. # - # Note: The following fields are mutually exclusive: `safety_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `safety_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param groundedness_input [::Google::Cloud::AIPlatform::V1::GroundednessInput, ::Hash] # Input for groundedness metric. # - # Note: The following fields are mutually exclusive: `groundedness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `groundedness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fulfillment_input [::Google::Cloud::AIPlatform::V1::FulfillmentInput, ::Hash] # Input for fulfillment metric. # - # Note: The following fields are mutually exclusive: `fulfillment_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fulfillment_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param summarization_quality_input [::Google::Cloud::AIPlatform::V1::SummarizationQualityInput, ::Hash] # Input for summarization quality metric. # - # Note: The following fields are mutually exclusive: `summarization_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `summarization_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param pairwise_summarization_quality_input [::Google::Cloud::AIPlatform::V1::PairwiseSummarizationQualityInput, ::Hash] # Input for pairwise summarization quality metric. # - # Note: The following fields are mutually exclusive: `pairwise_summarization_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `pairwise_summarization_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param summarization_helpfulness_input [::Google::Cloud::AIPlatform::V1::SummarizationHelpfulnessInput, ::Hash] # Input for summarization helpfulness metric. # - # Note: The following fields are mutually exclusive: `summarization_helpfulness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `summarization_helpfulness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param summarization_verbosity_input [::Google::Cloud::AIPlatform::V1::SummarizationVerbosityInput, ::Hash] # Input for summarization verbosity metric. # - # Note: The following fields are mutually exclusive: `summarization_verbosity_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `summarization_verbosity_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param question_answering_quality_input [::Google::Cloud::AIPlatform::V1::QuestionAnsweringQualityInput, ::Hash] # Input for question answering quality metric. # - # Note: The following fields are mutually exclusive: `question_answering_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `question_answering_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param pairwise_question_answering_quality_input [::Google::Cloud::AIPlatform::V1::PairwiseQuestionAnsweringQualityInput, ::Hash] # Input for pairwise question answering quality metric. # - # Note: The following fields are mutually exclusive: `pairwise_question_answering_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `pairwise_question_answering_quality_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param question_answering_relevance_input [::Google::Cloud::AIPlatform::V1::QuestionAnsweringRelevanceInput, ::Hash] # Input for question answering relevance metric. # - # Note: The following fields are mutually exclusive: `question_answering_relevance_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `question_answering_relevance_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param question_answering_helpfulness_input [::Google::Cloud::AIPlatform::V1::QuestionAnsweringHelpfulnessInput, ::Hash] # Input for question answering helpfulness # metric. # - # Note: The following fields are mutually exclusive: `question_answering_helpfulness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `question_answering_helpfulness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param question_answering_correctness_input [::Google::Cloud::AIPlatform::V1::QuestionAnsweringCorrectnessInput, ::Hash] # Input for question answering correctness # metric. # - # Note: The following fields are mutually exclusive: `question_answering_correctness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `question_answering_correctness_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param pointwise_metric_input [::Google::Cloud::AIPlatform::V1::PointwiseMetricInput, ::Hash] # Input for pointwise metric. # - # Note: The following fields are mutually exclusive: `pointwise_metric_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `pointwise_metric_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param pairwise_metric_input [::Google::Cloud::AIPlatform::V1::PairwiseMetricInput, ::Hash] # Input for pairwise metric. # - # Note: The following fields are mutually exclusive: `pairwise_metric_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `pairwise_metric_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param tool_call_valid_input [::Google::Cloud::AIPlatform::V1::ToolCallValidInput, ::Hash] # Tool call metric instances. # Input for tool call valid metric. # - # Note: The following fields are mutually exclusive: `tool_call_valid_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tool_call_valid_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param tool_name_match_input [::Google::Cloud::AIPlatform::V1::ToolNameMatchInput, ::Hash] # Input for tool name match metric. # - # Note: The following fields are mutually exclusive: `tool_name_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tool_name_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param tool_parameter_key_match_input [::Google::Cloud::AIPlatform::V1::ToolParameterKeyMatchInput, ::Hash] # Input for tool parameter key match metric. # - # Note: The following fields are mutually exclusive: `tool_parameter_key_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tool_parameter_key_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_kv_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param tool_parameter_kv_match_input [::Google::Cloud::AIPlatform::V1::ToolParameterKVMatchInput, ::Hash] # Input for tool parameter key value match metric. # - # Note: The following fields are mutually exclusive: `tool_parameter_kv_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `comet_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tool_parameter_kv_match_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `comet_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param comet_input [::Google::Cloud::AIPlatform::V1::CometInput, ::Hash] # Translation metrics. # Input for Comet metric. # - # Note: The following fields are mutually exclusive: `comet_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `metricx_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `comet_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `metricx_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param metricx_input [::Google::Cloud::AIPlatform::V1::MetricxInput, ::Hash] # Input for Metricx metric. # - # Note: The following fields are mutually exclusive: `metricx_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `metricx_input`, `exact_match_input`, `bleu_input`, `rouge_input`, `fluency_input`, `coherence_input`, `safety_input`, `groundedness_input`, `fulfillment_input`, `summarization_quality_input`, `pairwise_summarization_quality_input`, `summarization_helpfulness_input`, `summarization_verbosity_input`, `question_answering_quality_input`, `pairwise_question_answering_quality_input`, `question_answering_relevance_input`, `question_answering_helpfulness_input`, `question_answering_correctness_input`, `pointwise_metric_input`, `pairwise_metric_input`, `tool_call_valid_input`, `tool_name_match_input`, `tool_parameter_key_match_input`, `tool_parameter_kv_match_input`, `comet_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param location [::String] # Required. The resource name of the Location to evaluate the instances. # Format: `projects/{project}/locations/{location}` diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb index 93c3274a8fd5..a5eab2d6340c 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb @@ -1996,21 +1996,21 @@ def delete_feature request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param avro_source [::Google::Cloud::AIPlatform::V1::AvroSource, ::Hash] - # Note: The following fields are mutually exclusive: `avro_source`, `bigquery_source`, `csv_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `avro_source`, `bigquery_source`, `csv_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::AIPlatform::V1::BigQuerySource, ::Hash] - # Note: The following fields are mutually exclusive: `bigquery_source`, `avro_source`, `csv_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `avro_source`, `csv_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param csv_source [::Google::Cloud::AIPlatform::V1::CsvSource, ::Hash] - # Note: The following fields are mutually exclusive: `csv_source`, `avro_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_source`, `avro_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param feature_time_field [::String] # Source column that holds the Feature timestamp for all Feature # values in each entity. # - # Note: The following fields are mutually exclusive: `feature_time_field`, `feature_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `feature_time_field`, `feature_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param feature_time [::Google::Protobuf::Timestamp, ::Hash] # Single Feature timestamp for all entities being imported. The # timestamp must not have higher than millisecond precision. # - # Note: The following fields are mutually exclusive: `feature_time`, `feature_time_field`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `feature_time`, `feature_time_field`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_type [::String] # Required. The resource name of the EntityType grouping the Features for # which values are being imported. Format: @@ -2158,11 +2158,11 @@ def import_feature_values request, options = nil # Values in the timestamp column must use the RFC 3339 format, e.g. # `2012-07-30T10:43:17.123Z`. # - # Note: The following fields are mutually exclusive: `csv_read_instances`, `bigquery_read_instances`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_read_instances`, `bigquery_read_instances`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_read_instances [::Google::Cloud::AIPlatform::V1::BigQuerySource, ::Hash] # Similar to csv_read_instances, but from BigQuery source. # - # Note: The following fields are mutually exclusive: `bigquery_read_instances`, `csv_read_instances`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_read_instances`, `csv_read_instances`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param featurestore [::String] # Required. The resource name of the Featurestore from which to query Feature # values. Format: @@ -2280,12 +2280,12 @@ def batch_read_feature_values request, options = nil # Exports the latest Feature values of all entities of the EntityType # within a time range. # - # Note: The following fields are mutually exclusive: `snapshot_export`, `full_export`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `snapshot_export`, `full_export`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param full_export [::Google::Cloud::AIPlatform::V1::ExportFeatureValuesRequest::FullExport, ::Hash] # Exports all historical values of all entities of the EntityType within a # time range # - # Note: The following fields are mutually exclusive: `full_export`, `snapshot_export`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `full_export`, `snapshot_export`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_type [::String] # Required. The resource name of the EntityType from which to export Feature # values. Format: @@ -2400,12 +2400,12 @@ def export_feature_values request, options = nil # @param select_entity [::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest::SelectEntity, ::Hash] # Select feature values to be deleted by specifying entities. # - # Note: The following fields are mutually exclusive: `select_entity`, `select_time_range_and_feature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `select_entity`, `select_time_range_and_feature`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param select_time_range_and_feature [::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest::SelectTimeRangeAndFeature, ::Hash] # Select feature values to be deleted by specifying time range and # features. # - # Note: The following fields are mutually exclusive: `select_time_range_and_feature`, `select_entity`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `select_time_range_and_feature`, `select_entity`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_type [::String] # Required. The resource name of the EntityType grouping the Features for # which values are being deleted from. Format: diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb index 9328a891bafb..70b96c76da81 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb @@ -1879,21 +1879,21 @@ def delete_feature request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param avro_source [::Google::Cloud::AIPlatform::V1::AvroSource, ::Hash] - # Note: The following fields are mutually exclusive: `avro_source`, `bigquery_source`, `csv_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `avro_source`, `bigquery_source`, `csv_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::AIPlatform::V1::BigQuerySource, ::Hash] - # Note: The following fields are mutually exclusive: `bigquery_source`, `avro_source`, `csv_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `avro_source`, `csv_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param csv_source [::Google::Cloud::AIPlatform::V1::CsvSource, ::Hash] - # Note: The following fields are mutually exclusive: `csv_source`, `avro_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_source`, `avro_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param feature_time_field [::String] # Source column that holds the Feature timestamp for all Feature # values in each entity. # - # Note: The following fields are mutually exclusive: `feature_time_field`, `feature_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `feature_time_field`, `feature_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param feature_time [::Google::Protobuf::Timestamp, ::Hash] # Single Feature timestamp for all entities being imported. The # timestamp must not have higher than millisecond precision. # - # Note: The following fields are mutually exclusive: `feature_time`, `feature_time_field`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `feature_time`, `feature_time_field`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_type [::String] # Required. The resource name of the EntityType grouping the Features for # which values are being imported. Format: @@ -2034,11 +2034,11 @@ def import_feature_values request, options = nil # Values in the timestamp column must use the RFC 3339 format, e.g. # `2012-07-30T10:43:17.123Z`. # - # Note: The following fields are mutually exclusive: `csv_read_instances`, `bigquery_read_instances`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_read_instances`, `bigquery_read_instances`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_read_instances [::Google::Cloud::AIPlatform::V1::BigQuerySource, ::Hash] # Similar to csv_read_instances, but from BigQuery source. # - # Note: The following fields are mutually exclusive: `bigquery_read_instances`, `csv_read_instances`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_read_instances`, `csv_read_instances`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param featurestore [::String] # Required. The resource name of the Featurestore from which to query Feature # values. Format: @@ -2149,12 +2149,12 @@ def batch_read_feature_values request, options = nil # Exports the latest Feature values of all entities of the EntityType # within a time range. # - # Note: The following fields are mutually exclusive: `snapshot_export`, `full_export`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `snapshot_export`, `full_export`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param full_export [::Google::Cloud::AIPlatform::V1::ExportFeatureValuesRequest::FullExport, ::Hash] # Exports all historical values of all entities of the EntityType within a # time range # - # Note: The following fields are mutually exclusive: `full_export`, `snapshot_export`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `full_export`, `snapshot_export`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_type [::String] # Required. The resource name of the EntityType from which to export Feature # values. Format: @@ -2262,12 +2262,12 @@ def export_feature_values request, options = nil # @param select_entity [::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest::SelectEntity, ::Hash] # Select feature values to be deleted by specifying entities. # - # Note: The following fields are mutually exclusive: `select_entity`, `select_time_range_and_feature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `select_entity`, `select_time_range_and_feature`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param select_time_range_and_feature [::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest::SelectTimeRangeAndFeature, ::Hash] # Select feature values to be deleted by specifying time range and # features. # - # Note: The following fields are mutually exclusive: `select_time_range_and_feature`, `select_entity`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `select_time_range_and_feature`, `select_entity`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_type [::String] # Required. The resource name of the EntityType grouping the Features for # which values are being deleted from. Format: diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb index eeeb3ba1e422..3db624d9a90f 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb @@ -350,12 +350,12 @@ def get_publisher_model request, options = nil # `publishers/{publisher}/models/{publisher_model}@{version_id}`, or # `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`. # - # Note: The following fields are mutually exclusive: `publisher_model_name`, `hugging_face_model_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `publisher_model_name`, `hugging_face_model_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param hugging_face_model_id [::String] # The Hugging Face model to deploy. # Format: Hugging Face model ID like `google/gemma-2-2b-it`. # - # Note: The following fields are mutually exclusive: `hugging_face_model_id`, `publisher_model_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `hugging_face_model_id`, `publisher_model_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param destination [::String] # Required. The resource name of the Location to deploy the model in. # Format: `projects/{project}/locations/{location}` diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb index eced1b0cc0f2..e41d7d656fe2 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb @@ -338,12 +338,12 @@ def get_publisher_model request, options = nil # `publishers/{publisher}/models/{publisher_model}@{version_id}`, or # `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`. # - # Note: The following fields are mutually exclusive: `publisher_model_name`, `hugging_face_model_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `publisher_model_name`, `hugging_face_model_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param hugging_face_model_id [::String] # The Hugging Face model to deploy. # Format: Hugging Face model ID like `google/gemma-2-2b-it`. # - # Note: The following fields are mutually exclusive: `hugging_face_model_id`, `publisher_model_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `hugging_face_model_id`, `publisher_model_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param destination [::String] # Required. The resource name of the Location to deploy the model in. # Format: `projects/{project}/locations/{location}` diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/client.rb index 8c0ccf231ad4..7724723406ed 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/client.rb @@ -1441,13 +1441,13 @@ def export_model request, options = nil # This value may be up to 63 characters, and valid characters are # `[a-z0-9_-]`. The first character cannot be a number or hyphen. # - # Note: The following fields are mutually exclusive: `model_id`, `parent_model`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `model_id`, `parent_model`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent_model [::String] # Optional. Specify this field to copy source_model into this existing # Model as a new version. Format: # `projects/{project}/locations/{location}/models/{model}` # - # Note: The following fields are mutually exclusive: `parent_model`, `model_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `parent_model`, `model_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The resource name of the Location into which to copy the Model. # Format: `projects/{project}/locations/{location}` diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb index 54c2fec6b39d..74b009922230 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb @@ -1359,13 +1359,13 @@ def export_model request, options = nil # This value may be up to 63 characters, and valid characters are # `[a-z0-9_-]`. The first character cannot be a number or hyphen. # - # Note: The following fields are mutually exclusive: `model_id`, `parent_model`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `model_id`, `parent_model`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent_model [::String] # Optional. Specify this field to copy source_model into this existing # Model as a new version. Format: # `projects/{project}/locations/{location}/models/{model}` # - # Note: The following fields are mutually exclusive: `parent_model`, `model_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `parent_model`, `model_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The resource name of the Location into which to copy the Model. # Format: `projects/{project}/locations/{location}` diff --git a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb index f125c0575be3..529174ed5189 100644 --- a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb +++ b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb @@ -731,12 +731,12 @@ def update_cluster request, options = nil # Options for exporting data in CSV format. Required field to be set for # CSV file type. # - # Note: The following fields are mutually exclusive: `csv_export_options`, `sql_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_export_options`, `sql_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_export_options [::Google::Cloud::AlloyDB::V1::ExportClusterRequest::SqlExportOptions, ::Hash] # Options for exporting data in SQL format. Required field to be set for # SQL file type. # - # Note: The following fields are mutually exclusive: `sql_export_options`, `csv_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_export_options`, `csv_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param database [::String] @@ -839,11 +839,11 @@ def export_cluster request, options = nil # @param sql_import_options [::Google::Cloud::AlloyDB::V1::ImportClusterRequest::SqlImportOptions, ::Hash] # Options for importing data in SQL format. # - # Note: The following fields are mutually exclusive: `sql_import_options`, `csv_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_import_options`, `csv_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param csv_import_options [::Google::Cloud::AlloyDB::V1::ImportClusterRequest::CsvImportOptions, ::Hash] # Options for importing data in CSV format. # - # Note: The following fields are mutually exclusive: `csv_import_options`, `sql_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_import_options`, `sql_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param gcs_uri [::String] @@ -1430,12 +1430,12 @@ def switchover_cluster request, options = nil # @param backup_source [::Google::Cloud::AlloyDB::V1::BackupSource, ::Hash] # Backup source. # - # Note: The following fields are mutually exclusive: `backup_source`, `continuous_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `backup_source`, `continuous_backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1::ContinuousBackupSource, ::Hash] # ContinuousBackup source. Continuous backup needs to be enabled in the # source cluster for this operation to succeed. # - # Note: The following fields are mutually exclusive: `continuous_backup_source`, `backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `continuous_backup_source`, `backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The name of the parent resource. For the required format, see the # comment on the Cluster.name field. diff --git a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb index 9e004c1f3adf..d210426af9f6 100644 --- a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb +++ b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb @@ -697,12 +697,12 @@ def update_cluster request, options = nil # Options for exporting data in CSV format. Required field to be set for # CSV file type. # - # Note: The following fields are mutually exclusive: `csv_export_options`, `sql_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_export_options`, `sql_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_export_options [::Google::Cloud::AlloyDB::V1::ExportClusterRequest::SqlExportOptions, ::Hash] # Options for exporting data in SQL format. Required field to be set for # SQL file type. # - # Note: The following fields are mutually exclusive: `sql_export_options`, `csv_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_export_options`, `csv_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param database [::String] @@ -798,11 +798,11 @@ def export_cluster request, options = nil # @param sql_import_options [::Google::Cloud::AlloyDB::V1::ImportClusterRequest::SqlImportOptions, ::Hash] # Options for importing data in SQL format. # - # Note: The following fields are mutually exclusive: `sql_import_options`, `csv_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_import_options`, `csv_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param csv_import_options [::Google::Cloud::AlloyDB::V1::ImportClusterRequest::CsvImportOptions, ::Hash] # Options for importing data in CSV format. # - # Note: The following fields are mutually exclusive: `csv_import_options`, `sql_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_import_options`, `sql_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param gcs_uri [::String] @@ -1354,12 +1354,12 @@ def switchover_cluster request, options = nil # @param backup_source [::Google::Cloud::AlloyDB::V1::BackupSource, ::Hash] # Backup source. # - # Note: The following fields are mutually exclusive: `backup_source`, `continuous_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `backup_source`, `continuous_backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1::ContinuousBackupSource, ::Hash] # ContinuousBackup source. Continuous backup needs to be enabled in the # source cluster for this operation to succeed. # - # Note: The following fields are mutually exclusive: `continuous_backup_source`, `backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `continuous_backup_source`, `backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The name of the parent resource. For the required format, see the # comment on the Cluster.name field. diff --git a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/client.rb b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/client.rb index 426f2e0bcfbf..aac3a3eacdf9 100644 --- a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/client.rb +++ b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/client.rb @@ -741,12 +741,12 @@ def update_cluster request, options = nil # Options for exporting data in CSV format. Required field to be set for # CSV file type. # - # Note: The following fields are mutually exclusive: `csv_export_options`, `sql_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_export_options`, `sql_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_export_options [::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest::SqlExportOptions, ::Hash] # Options for exporting data in SQL format. Required field to be set for # SQL file type. # - # Note: The following fields are mutually exclusive: `sql_export_options`, `csv_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_export_options`, `csv_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param database [::String] @@ -849,11 +849,11 @@ def export_cluster request, options = nil # @param sql_import_options [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest::SqlImportOptions, ::Hash] # Options for importing data in SQL format. # - # Note: The following fields are mutually exclusive: `sql_import_options`, `csv_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_import_options`, `csv_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param csv_import_options [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest::CsvImportOptions, ::Hash] # Options for importing data in CSV format. # - # Note: The following fields are mutually exclusive: `csv_import_options`, `sql_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_import_options`, `sql_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param gcs_uri [::String] @@ -1440,12 +1440,12 @@ def switchover_cluster request, options = nil # @param backup_source [::Google::Cloud::AlloyDB::V1alpha::BackupSource, ::Hash] # Backup source. # - # Note: The following fields are mutually exclusive: `backup_source`, `continuous_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `backup_source`, `continuous_backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1alpha::ContinuousBackupSource, ::Hash] # ContinuousBackup source. Continuous backup needs to be enabled in the # source cluster for this operation to succeed. # - # Note: The following fields are mutually exclusive: `continuous_backup_source`, `backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `continuous_backup_source`, `backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The name of the parent resource. For the required format, see the # comment on the Cluster.name field. diff --git a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb index a76fd1129bd2..c733430e64f5 100644 --- a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb +++ b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb @@ -707,12 +707,12 @@ def update_cluster request, options = nil # Options for exporting data in CSV format. Required field to be set for # CSV file type. # - # Note: The following fields are mutually exclusive: `csv_export_options`, `sql_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_export_options`, `sql_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_export_options [::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest::SqlExportOptions, ::Hash] # Options for exporting data in SQL format. Required field to be set for # SQL file type. # - # Note: The following fields are mutually exclusive: `sql_export_options`, `csv_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_export_options`, `csv_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param database [::String] @@ -808,11 +808,11 @@ def export_cluster request, options = nil # @param sql_import_options [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest::SqlImportOptions, ::Hash] # Options for importing data in SQL format. # - # Note: The following fields are mutually exclusive: `sql_import_options`, `csv_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_import_options`, `csv_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param csv_import_options [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest::CsvImportOptions, ::Hash] # Options for importing data in CSV format. # - # Note: The following fields are mutually exclusive: `csv_import_options`, `sql_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_import_options`, `sql_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param gcs_uri [::String] @@ -1364,12 +1364,12 @@ def switchover_cluster request, options = nil # @param backup_source [::Google::Cloud::AlloyDB::V1alpha::BackupSource, ::Hash] # Backup source. # - # Note: The following fields are mutually exclusive: `backup_source`, `continuous_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `backup_source`, `continuous_backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1alpha::ContinuousBackupSource, ::Hash] # ContinuousBackup source. Continuous backup needs to be enabled in the # source cluster for this operation to succeed. # - # Note: The following fields are mutually exclusive: `continuous_backup_source`, `backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `continuous_backup_source`, `backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The name of the parent resource. For the required format, see the # comment on the Cluster.name field. diff --git a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/client.rb b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/client.rb index 5951295f1d37..04c68fbf1918 100644 --- a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/client.rb +++ b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/client.rb @@ -746,12 +746,12 @@ def update_cluster request, options = nil # Options for exporting data in CSV format. Required field to be set for # CSV file type. # - # Note: The following fields are mutually exclusive: `csv_export_options`, `sql_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_export_options`, `sql_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_export_options [::Google::Cloud::AlloyDB::V1beta::ExportClusterRequest::SqlExportOptions, ::Hash] # Options for exporting data in SQL format. Required field to be set for # SQL file type. # - # Note: The following fields are mutually exclusive: `sql_export_options`, `csv_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_export_options`, `csv_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param database [::String] @@ -854,11 +854,11 @@ def export_cluster request, options = nil # @param sql_import_options [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest::SqlImportOptions, ::Hash] # Options for importing data in SQL format. # - # Note: The following fields are mutually exclusive: `sql_import_options`, `csv_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_import_options`, `csv_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param csv_import_options [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest::CsvImportOptions, ::Hash] # Options for importing data in CSV format. # - # Note: The following fields are mutually exclusive: `csv_import_options`, `sql_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_import_options`, `sql_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param gcs_uri [::String] @@ -1445,12 +1445,12 @@ def switchover_cluster request, options = nil # @param backup_source [::Google::Cloud::AlloyDB::V1beta::BackupSource, ::Hash] # Backup source. # - # Note: The following fields are mutually exclusive: `backup_source`, `continuous_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `backup_source`, `continuous_backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1beta::ContinuousBackupSource, ::Hash] # ContinuousBackup source. Continuous backup needs to be enabled in the # source cluster for this operation to succeed. # - # Note: The following fields are mutually exclusive: `continuous_backup_source`, `backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `continuous_backup_source`, `backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The name of the parent resource. For the required format, see the # comment on the Cluster.name field. diff --git a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb index 609c7b84c843..1e10d62df1eb 100644 --- a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb +++ b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb @@ -712,12 +712,12 @@ def update_cluster request, options = nil # Options for exporting data in CSV format. Required field to be set for # CSV file type. # - # Note: The following fields are mutually exclusive: `csv_export_options`, `sql_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_export_options`, `sql_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_export_options [::Google::Cloud::AlloyDB::V1beta::ExportClusterRequest::SqlExportOptions, ::Hash] # Options for exporting data in SQL format. Required field to be set for # SQL file type. # - # Note: The following fields are mutually exclusive: `sql_export_options`, `csv_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_export_options`, `csv_export_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param database [::String] @@ -813,11 +813,11 @@ def export_cluster request, options = nil # @param sql_import_options [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest::SqlImportOptions, ::Hash] # Options for importing data in SQL format. # - # Note: The following fields are mutually exclusive: `sql_import_options`, `csv_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_import_options`, `csv_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param csv_import_options [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest::CsvImportOptions, ::Hash] # Options for importing data in CSV format. # - # Note: The following fields are mutually exclusive: `csv_import_options`, `sql_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `csv_import_options`, `sql_import_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the cluster. # @param gcs_uri [::String] @@ -1369,12 +1369,12 @@ def switchover_cluster request, options = nil # @param backup_source [::Google::Cloud::AlloyDB::V1beta::BackupSource, ::Hash] # Backup source. # - # Note: The following fields are mutually exclusive: `backup_source`, `continuous_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `backup_source`, `continuous_backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1beta::ContinuousBackupSource, ::Hash] # ContinuousBackup source. Continuous backup needs to be enabled in the # source cluster for this operation to succeed. # - # Note: The following fields are mutually exclusive: `continuous_backup_source`, `backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `continuous_backup_source`, `backup_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The name of the parent resource. For the required format, see the # comment on the Cluster.name field. diff --git a/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb b/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb index 7286fee97e13..bd3f26824af9 100644 --- a/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb +++ b/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb @@ -2001,12 +2001,12 @@ def analyze_move request, options = nil # Optional. A SQL statement that's compatible with [BigQuery # SQL](https://cloud.google.com/bigquery/docs/introduction-sql). # - # Note: The following fields are mutually exclusive: `statement`, `job_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `statement`, `job_reference`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param job_reference [::String] # Optional. Reference to the query job, which is from the # `QueryAssetsResponse` of previous `QueryAssets` call. # - # Note: The following fields are mutually exclusive: `job_reference`, `statement`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `job_reference`, `statement`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param page_size [::Integer] # Optional. The maximum number of rows to return in the results. Responses # are limited to 10 MB and 1000 rows. @@ -2038,12 +2038,12 @@ def analyze_move request, options = nil # [end_time] Defaults [end_time] to now if [start_time] is set and # [end_time] isn't. Maximum permitted time range is 7 days. # - # Note: The following fields are mutually exclusive: `read_time_window`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time_window`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Optional. Queries cloud assets as they appeared at the specified point in # time. # - # Note: The following fields are mutually exclusive: `read_time`, `read_time_window`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `read_time_window`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param output_config [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig, ::Hash] # Optional. Destination where the query results will be saved. # diff --git a/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb b/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb index c06fae8fc7ec..83655887ca21 100644 --- a/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb +++ b/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb @@ -1903,12 +1903,12 @@ def analyze_move request, options = nil # Optional. A SQL statement that's compatible with [BigQuery # SQL](https://cloud.google.com/bigquery/docs/introduction-sql). # - # Note: The following fields are mutually exclusive: `statement`, `job_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `statement`, `job_reference`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param job_reference [::String] # Optional. Reference to the query job, which is from the # `QueryAssetsResponse` of previous `QueryAssets` call. # - # Note: The following fields are mutually exclusive: `job_reference`, `statement`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `job_reference`, `statement`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param page_size [::Integer] # Optional. The maximum number of rows to return in the results. Responses # are limited to 10 MB and 1000 rows. @@ -1940,12 +1940,12 @@ def analyze_move request, options = nil # [end_time] Defaults [end_time] to now if [start_time] is set and # [end_time] isn't. Maximum permitted time range is 7 days. # - # Note: The following fields are mutually exclusive: `read_time_window`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time_window`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Optional. Queries cloud assets as they appeared at the specified point in # time. # - # Note: The following fields are mutually exclusive: `read_time`, `read_time_window`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `read_time_window`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param output_config [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig, ::Hash] # Optional. Destination where the query results will be saved. # diff --git a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb index f214d1113df2..7643209a3833 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb @@ -706,7 +706,7 @@ def get_workload request, options = nil # For example: # "organizations/123/locations/us-east1/workloads/assured-workload-1" # - # Note: The following fields are mutually exclusive: `source`, `project`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `source`, `project`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param project [::String] # The source type is a project. Specify the project's relative resource # name, formatted as either a project number or a project ID: @@ -715,7 +715,7 @@ def get_workload request, options = nil # "projects/951040570662" when specifying a project number, or # "projects/my-project-123" when specifying a project ID. # - # Note: The following fields are mutually exclusive: `project`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `project`, `source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param target [::String] # Required. The resource ID of the folder-based destination workload. This workload is # where the source project will hypothetically be moved to. Specify the diff --git a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb index 7744a795d07e..dce0427deb5c 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb @@ -1544,11 +1544,11 @@ def update_model request, options = nil # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] # Model deployment metadata specific to Image Object Detection. # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] # Model deployment metadata specific to Image Classification. # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. Resource name of the model to deploy. # diff --git a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb index d6066065867b..d5fdb1f72304 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb @@ -1446,11 +1446,11 @@ def update_model request, options = nil # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] # Model deployment metadata specific to Image Object Detection. # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] # Model deployment metadata specific to Image Classification. # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. Resource name of the model to deploy. # @yield [result, operation] Access the result along with the TransportOperation object diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb index 9501f4302c3e..2a69a9262289 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb @@ -2025,11 +2025,11 @@ def delete_model request, options = nil # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] # Model deployment metadata specific to Image Object Detection. # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] # Model deployment metadata specific to Image Classification. # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. Resource name of the model to deploy. # diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb index f51ceb534fc2..65351c18fa36 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb @@ -1892,11 +1892,11 @@ def delete_model request, options = nil # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] # Model deployment metadata specific to Image Object Detection. # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] # Model deployment metadata specific to Image Classification. # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. Resource name of the model to deploy. # @yield [result, operation] Access the result along with the TransportOperation object diff --git a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb index 7ab6a7ee49f1..ec5860f6970c 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb @@ -1239,12 +1239,12 @@ def delete_listing request, options = nil # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] # Input only. BigQuery destination dataset to create for the subscriber. # - # Note: The following fields are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] # Input only. Destination Pub/Sub subscription to create for the # subscriber. # - # Note: The following fields are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. Resource name of the listing that you want to subscribe to. # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. diff --git a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb index 309cfe6fd567..6b470535c05d 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb @@ -1155,12 +1155,12 @@ def delete_listing request, options = nil # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] # Input only. BigQuery destination dataset to create for the subscriber. # - # Note: The following fields are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] # Input only. Destination Pub/Sub subscription to create for the # subscriber. # - # Note: The following fields are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. Resource name of the listing that you want to subscribe to. # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. diff --git a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb index 057d634ee62a..7f726d9a3587 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb @@ -1122,14 +1122,14 @@ def schedule_transfer_runs request, options = nil # requested_time_range must be a past time and cannot include future time # values. # - # Note: The following fields are mutually exclusive: `requested_time_range`, `requested_run_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] # A run_time timestamp for historical data files or reports # that are scheduled to be transferred by the scheduled transfer run. # requested_run_time must be a past time and cannot include future time # values. # - # Note: The following fields are mutually exclusive: `requested_run_time`, `requested_time_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] diff --git a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb index a800b5158dac..86a94c8b3472 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb @@ -1058,14 +1058,14 @@ def schedule_transfer_runs request, options = nil # requested_time_range must be a past time and cannot include future time # values. # - # Note: The following fields are mutually exclusive: `requested_time_range`, `requested_run_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] # A run_time timestamp for historical data files or reports # that are scheduled to be transferred by the scheduled transfer run. # requested_run_time must be a past time and cannot include future time # values. # - # Note: The following fields are mutually exclusive: `requested_run_time`, `requested_time_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb index 53aedfc22775..6a38b75b6322 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb @@ -1610,11 +1610,11 @@ def modify_column_families request, options = nil # Delete all rows that start with this row key prefix. Prefix cannot be # zero length. # - # Note: The following fields are mutually exclusive: `row_key_prefix`, `delete_all_data_from_table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `row_key_prefix`, `delete_all_data_from_table`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param delete_all_data_from_table [::Boolean] # Delete all rows in the table. Setting this to false is a no-op. # - # Note: The following fields are mutually exclusive: `delete_all_data_from_table`, `row_key_prefix`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `delete_all_data_from_table`, `row_key_prefix`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] @@ -1801,13 +1801,13 @@ def generate_consistency_token request, options = nil # see all writes committed before the token was created, even if the # read and write target different clusters. # - # Note: The following fields are mutually exclusive: `standard_read_remote_writes`, `data_boost_read_local_writes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `standard_read_remote_writes`, `data_boost_read_local_writes`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param data_boost_read_local_writes [::Google::Cloud::Bigtable::Admin::V2::DataBoostReadLocalWrites, ::Hash] # Checks that reads using an app profile with `DataBoostIsolationReadOnly` # can see all writes committed before the token was created, but only if # the read and write target the same cluster. # - # Note: The following fields are mutually exclusive: `data_boost_read_local_writes`, `standard_read_remote_writes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `data_boost_read_local_writes`, `standard_read_remote_writes`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponse] diff --git a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb index aac209538e13..b80a38734529 100644 --- a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb +++ b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb @@ -1170,7 +1170,7 @@ def generate_initial_change_stream_partitions request, options = nil # current time, and after change stream creation, whichever is greater. # This value is inclusive and will be truncated to microsecond granularity. # - # Note: The following fields are mutually exclusive: `start_time`, `continuation_tokens`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `start_time`, `continuation_tokens`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param continuation_tokens [::Google::Cloud::Bigtable::V2::StreamContinuationTokens, ::Hash] # Tokens that describe how to resume reading a stream where reading # previously left off. If specified, changes will be read starting at the @@ -1183,7 +1183,7 @@ def generate_initial_change_stream_partitions request, options = nil # cover the request’s partition. Otherwise, INVALID_ARGUMENT will be # returned. # - # Note: The following fields are mutually exclusive: `continuation_tokens`, `start_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `continuation_tokens`, `start_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param end_time [::Google::Protobuf::Timestamp, ::Hash] # If specified, OK will be returned when the stream advances beyond # this time. Otherwise, changes will be continuously delivered on the stream. diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb index b29d9b58abd9..5bbebe63dd92 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb @@ -907,15 +907,15 @@ def delete_customer request, options = nil # @param domain [::String] # Required. Customer domain. # - # Note: The following fields are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param cloud_identity_id [::String] # Required. Customer's Cloud Identity ID # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param primary_admin_email [::String] # Required. Customer's primary admin email. # - # Note: The following fields are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The resource name of the reseller's account. # Parent takes the format: accounts/\\{account_id} or @@ -1280,14 +1280,14 @@ def list_entitlements request, options = nil # @param cloud_identity_id [::String] # Customer's Cloud Identity ID # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `customer_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param customer_name [::String] # A reseller is required to create a customer and use the resource name of # the created customer here. # Customer_name uses the format: # accounts/\\{account_id}/customers/\\{customer_id} # - # Note: The following fields are mutually exclusive: `customer_name`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The reseller account's resource name. # Parent uses the format: accounts/\\{account_id} @@ -1426,12 +1426,12 @@ def list_transferable_skus request, options = nil # @param cloud_identity_id [::String] # Customer's Cloud Identity ID # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `customer_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param customer_name [::String] # A reseller should create a customer and use the resource name of # that customer here. # - # Note: The following fields are mutually exclusive: `customer_name`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The resource name of the reseller's account. # @param page_size [::Integer] @@ -5328,11 +5328,11 @@ def list_offers request, options = nil # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase, ::Hash] # List SKUs for CreateEntitlement purchase. # - # Note: The following fields are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase, ::Hash] # List SKUs for ChangeOffer purchase with a new SKU. # - # Note: The following fields are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param customer [::String] # Required. The resource name of the customer to list SKUs for. # Format: accounts/\\{account_id}/customers/\\{customer_id}. @@ -5449,11 +5449,11 @@ def list_purchasable_skus request, options = nil # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase, ::Hash] # List Offers for CreateEntitlement purchase. # - # Note: The following fields are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::ChangeOfferPurchase, ::Hash] # List Offers for ChangeOffer purchase. # - # Note: The following fields are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param customer [::String] # Required. The resource name of the customer to list Offers for. # Format: accounts/\\{account_id}/customers/\\{customer_id}. diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb index 5917a76eb54d..d58690db9053 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb @@ -858,15 +858,15 @@ def delete_customer request, options = nil # @param domain [::String] # Required. Customer domain. # - # Note: The following fields are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param cloud_identity_id [::String] # Required. Customer's Cloud Identity ID # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param primary_admin_email [::String] # Required. Customer's primary admin email. # - # Note: The following fields are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The resource name of the reseller's account. # Parent takes the format: accounts/\\{account_id} or @@ -1210,14 +1210,14 @@ def list_entitlements request, options = nil # @param cloud_identity_id [::String] # Customer's Cloud Identity ID # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `customer_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param customer_name [::String] # A reseller is required to create a customer and use the resource name of # the created customer here. # Customer_name uses the format: # accounts/\\{account_id}/customers/\\{customer_id} # - # Note: The following fields are mutually exclusive: `customer_name`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The reseller account's resource name. # Parent uses the format: accounts/\\{account_id} @@ -1349,12 +1349,12 @@ def list_transferable_skus request, options = nil # @param cloud_identity_id [::String] # Customer's Cloud Identity ID # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `customer_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param customer_name [::String] # A reseller should create a customer and use the resource name of # that customer here. # - # Note: The following fields are mutually exclusive: `customer_name`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The resource name of the reseller's account. # @param page_size [::Integer] @@ -5035,11 +5035,11 @@ def list_offers request, options = nil # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase, ::Hash] # List SKUs for CreateEntitlement purchase. # - # Note: The following fields are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase, ::Hash] # List SKUs for ChangeOffer purchase with a new SKU. # - # Note: The following fields are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param customer [::String] # Required. The resource name of the customer to list SKUs for. # Format: accounts/\\{account_id}/customers/\\{customer_id}. @@ -5149,11 +5149,11 @@ def list_purchasable_skus request, options = nil # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase, ::Hash] # List Offers for CreateEntitlement purchase. # - # Note: The following fields are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::ChangeOfferPurchase, ::Hash] # List Offers for ChangeOffer purchase. # - # Note: The following fields are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param customer [::String] # Required. The resource name of the customer to list Offers for. # Format: accounts/\\{account_id}/customers/\\{customer_id}. diff --git a/google-cloud-cloud_dms-v1/lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb b/google-cloud-cloud_dms-v1/lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb index e23469d010f8..94b04cf2e49a 100644 --- a/google-cloud-cloud_dms-v1/lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb +++ b/google-cloud-cloud_dms-v1/lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb @@ -1432,11 +1432,11 @@ def restart_migration_job request, options = nil # @param vm_creation_config [::Google::Cloud::CloudDMS::V1::VmCreationConfig, ::Hash] # The VM creation configuration # - # Note: The following fields are mutually exclusive: `vm_creation_config`, `vm_selection_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `vm_creation_config`, `vm_selection_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param vm_selection_config [::Google::Cloud::CloudDMS::V1::VmSelectionConfig, ::Hash] # The VM selection configuration # - # Note: The following fields are mutually exclusive: `vm_selection_config`, `vm_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `vm_selection_config`, `vm_creation_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param vm_port [::Integer] # The port that will be open on the bastion host. # @@ -3469,12 +3469,12 @@ def get_mapping_rule request, options = nil # @param source_connection_profile [::String] # Optional. Fully qualified (Uri) name of the source connection profile. # - # Note: The following fields are mutually exclusive: `source_connection_profile`, `destination_connection_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `source_connection_profile`, `destination_connection_profile`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param destination_connection_profile [::String] # Optional. Fully qualified (Uri) name of the destination connection # profile. # - # Note: The following fields are mutually exclusive: `destination_connection_profile`, `source_connection_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `destination_connection_profile`, `source_connection_profile`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] diff --git a/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/confidential_computing/client.rb b/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/confidential_computing/client.rb index c8ce1e871e63..bce26ff1d55d 100644 --- a/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/confidential_computing/client.rb +++ b/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/confidential_computing/client.rb @@ -321,11 +321,11 @@ def create_challenge request, options = nil # @param td_ccel [::Google::Cloud::ConfidentialComputing::V1::TdxCcelAttestation, ::Hash] # Optional. A TDX with CCEL and RTMR Attestation Quote. # - # Note: The following fields are mutually exclusive: `td_ccel`, `sev_snp_attestation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `td_ccel`, `sev_snp_attestation`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sev_snp_attestation [::Google::Cloud::ConfidentialComputing::V1::SevSnpAttestation, ::Hash] # Optional. An SEV-SNP Attestation Report. # - # Note: The following fields are mutually exclusive: `sev_snp_attestation`, `td_ccel`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sev_snp_attestation`, `td_ccel`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param challenge [::String] # Required. The name of the Challenge whose nonce was used to generate the # attestation, in the format `projects/*/locations/*/challenges/*`. The diff --git a/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/confidential_computing/rest/client.rb b/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/confidential_computing/rest/client.rb index c3a77042d26a..2a9cd17f8ca4 100644 --- a/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/confidential_computing/rest/client.rb +++ b/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/confidential_computing/rest/client.rb @@ -308,11 +308,11 @@ def create_challenge request, options = nil # @param td_ccel [::Google::Cloud::ConfidentialComputing::V1::TdxCcelAttestation, ::Hash] # Optional. A TDX with CCEL and RTMR Attestation Quote. # - # Note: The following fields are mutually exclusive: `td_ccel`, `sev_snp_attestation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `td_ccel`, `sev_snp_attestation`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sev_snp_attestation [::Google::Cloud::ConfidentialComputing::V1::SevSnpAttestation, ::Hash] # Optional. An SEV-SNP Attestation Report. # - # Note: The following fields are mutually exclusive: `sev_snp_attestation`, `td_ccel`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sev_snp_attestation`, `td_ccel`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param challenge [::String] # Required. The name of the Challenge whose nonce was used to generate the # attestation, in the format `projects/*/locations/*/challenges/*`. The diff --git a/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/lineage/client.rb b/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/lineage/client.rb index e8635d0c7c3f..bc582091be3a 100644 --- a/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/lineage/client.rb +++ b/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/lineage/client.rb @@ -1644,12 +1644,12 @@ def delete_lineage_event request, options = nil # Optional. Send asset information in the **source** field to retrieve all # links that lead from the specified asset to downstream assets. # - # Note: The following fields are mutually exclusive: `source`, `target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `source`, `target`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param target [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash] # Optional. Send asset information in the **target** field to retrieve all # links that lead from upstream assets to the specified asset. # - # Note: The following fields are mutually exclusive: `target`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `target`, `source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param page_size [::Integer] # Optional. The maximum number of links to return in a single page of the # response. A page may contain fewer links than this value. If unspecified, diff --git a/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/lineage/rest/client.rb b/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/lineage/rest/client.rb index 930e218f0e03..cb30bab03871 100644 --- a/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/lineage/rest/client.rb +++ b/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/lineage/rest/client.rb @@ -1532,12 +1532,12 @@ def delete_lineage_event request, options = nil # Optional. Send asset information in the **source** field to retrieve all # links that lead from the specified asset to downstream assets. # - # Note: The following fields are mutually exclusive: `source`, `target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `source`, `target`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param target [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash] # Optional. Send asset information in the **target** field to retrieve all # links that lead from upstream assets to the specified asset. # - # Note: The following fields are mutually exclusive: `target`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `target`, `source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param page_size [::Integer] # Optional. The maximum number of links to return in a single page of the # response. A page may contain fewer links than this value. If unspecified, diff --git a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/data_catalog/client.rb b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/data_catalog/client.rb index 1443c915e5ff..1d84352fbcb9 100644 --- a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/data_catalog/client.rb +++ b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/data_catalog/client.rb @@ -1331,7 +1331,7 @@ def get_entry request, options = nil # * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` # * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` # - # Note: The following fields are mutually exclusive: `linked_resource`, `sql_resource`, `fully_qualified_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `linked_resource`, `sql_resource`, `fully_qualified_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_resource [::String] # The SQL name of the entry. SQL names are case-sensitive. # @@ -1347,7 +1347,7 @@ def get_entry request, options = nil # [Lexical structure in GoogleSQL] # (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). # - # Note: The following fields are mutually exclusive: `sql_resource`, `linked_resource`, `fully_qualified_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_resource`, `linked_resource`, `fully_qualified_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fully_qualified_name [::String] # [Fully Qualified Name # (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) @@ -1367,7 +1367,7 @@ def get_entry request, options = nil # # `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` # - # Note: The following fields are mutually exclusive: `fully_qualified_name`, `linked_resource`, `sql_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fully_qualified_name`, `linked_resource`, `sql_resource`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param project [::String] # Project where the lookup should be performed. Required to lookup # entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` @@ -3778,11 +3778,11 @@ def import_entries request, options = nil # @param tag_template_migration [::Google::Cloud::DataCatalog::V1::TagTemplateMigration] # Opt-in status for the migration of Tag Templates to Dataplex. # - # Note: The following fields are mutually exclusive: `tag_template_migration`, `catalog_ui_experience`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tag_template_migration`, `catalog_ui_experience`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param catalog_ui_experience [::Google::Cloud::DataCatalog::V1::CatalogUIExperience] # Opt-in status for the UI switch to Dataplex. # - # Note: The following fields are mutually exclusive: `catalog_ui_experience`, `tag_template_migration`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `catalog_ui_experience`, `tag_template_migration`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::DataCatalog::V1::MigrationConfig] diff --git a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/data_catalog/rest/client.rb b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/data_catalog/rest/client.rb index 3dd436cd1c59..ebfd20950a47 100644 --- a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/data_catalog/rest/client.rb +++ b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/data_catalog/rest/client.rb @@ -1239,7 +1239,7 @@ def get_entry request, options = nil # * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` # * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` # - # Note: The following fields are mutually exclusive: `linked_resource`, `sql_resource`, `fully_qualified_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `linked_resource`, `sql_resource`, `fully_qualified_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_resource [::String] # The SQL name of the entry. SQL names are case-sensitive. # @@ -1255,7 +1255,7 @@ def get_entry request, options = nil # [Lexical structure in GoogleSQL] # (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). # - # Note: The following fields are mutually exclusive: `sql_resource`, `linked_resource`, `fully_qualified_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_resource`, `linked_resource`, `fully_qualified_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fully_qualified_name [::String] # [Fully Qualified Name # (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) @@ -1275,7 +1275,7 @@ def get_entry request, options = nil # # `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` # - # Note: The following fields are mutually exclusive: `fully_qualified_name`, `linked_resource`, `sql_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fully_qualified_name`, `linked_resource`, `sql_resource`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param project [::String] # Project where the lookup should be performed. Required to lookup # entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` @@ -3478,11 +3478,11 @@ def import_entries request, options = nil # @param tag_template_migration [::Google::Cloud::DataCatalog::V1::TagTemplateMigration] # Opt-in status for the migration of Tag Templates to Dataplex. # - # Note: The following fields are mutually exclusive: `tag_template_migration`, `catalog_ui_experience`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `tag_template_migration`, `catalog_ui_experience`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param catalog_ui_experience [::Google::Cloud::DataCatalog::V1::CatalogUIExperience] # Opt-in status for the UI switch to Dataplex. # - # Note: The following fields are mutually exclusive: `catalog_ui_experience`, `tag_template_migration`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `catalog_ui_experience`, `tag_template_migration`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::DataCatalog::V1::MigrationConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb index ef487fdfd18f..526e9912c353 100644 --- a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb +++ b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb @@ -334,11 +334,11 @@ def replace_taxonomy request, options = nil # @param inline_source [::Google::Cloud::DataCatalog::V1::InlineSource, ::Hash] # Inline source taxonomy to import. # - # Note: The following fields are mutually exclusive: `inline_source`, `cross_regional_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `cross_regional_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param cross_regional_source [::Google::Cloud::DataCatalog::V1::CrossRegionalSource, ::Hash] # Cross-regional source taxonomy to import. # - # Note: The following fields are mutually exclusive: `cross_regional_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cross_regional_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse] diff --git a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/client.rb b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/client.rb index bafed753741c..e6e72737ec63 100644 --- a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/client.rb +++ b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/client.rb @@ -320,11 +320,11 @@ def replace_taxonomy request, options = nil # @param inline_source [::Google::Cloud::DataCatalog::V1::InlineSource, ::Hash] # Inline source taxonomy to import. # - # Note: The following fields are mutually exclusive: `inline_source`, `cross_regional_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `cross_regional_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param cross_regional_source [::Google::Cloud::DataCatalog::V1::CrossRegionalSource, ::Hash] # Cross-regional source taxonomy to import. # - # Note: The following fields are mutually exclusive: `cross_regional_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cross_regional_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/data_catalog/client.rb b/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/data_catalog/client.rb index 7d2827227a68..8f2ecda0e231 100644 --- a/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/data_catalog/client.rb +++ b/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/data_catalog/client.rb @@ -1269,7 +1269,7 @@ def get_entry request, options = nil # * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId # * //pubsub.googleapis.com/projects/projectId/topics/topicId # - # Note: The following fields are mutually exclusive: `linked_resource`, `sql_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `linked_resource`, `sql_resource`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_resource [::String] # The SQL name of the entry. SQL names are case-sensitive. # @@ -1284,7 +1284,7 @@ def get_entry request, options = nil # `*_id`s should satisfy the GoogleSQL rules for identifiers. # https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. # - # Note: The following fields are mutually exclusive: `sql_resource`, `linked_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_resource`, `linked_resource`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::DataCatalog::V1beta1::Entry] diff --git a/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest/client.rb b/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest/client.rb index e5b0ef153043..e2c437162cdf 100644 --- a/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest/client.rb +++ b/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest/client.rb @@ -1177,7 +1177,7 @@ def get_entry request, options = nil # * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId # * //pubsub.googleapis.com/projects/projectId/topics/topicId # - # Note: The following fields are mutually exclusive: `linked_resource`, `sql_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `linked_resource`, `sql_resource`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_resource [::String] # The SQL name of the entry. SQL names are case-sensitive. # @@ -1192,7 +1192,7 @@ def get_entry request, options = nil # `*_id`s should satisfy the GoogleSQL rules for identifiers. # https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. # - # Note: The following fields are mutually exclusive: `sql_resource`, `linked_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_resource`, `linked_resource`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Entry] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-data_labeling-v1beta1/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb b/google-cloud-data_labeling-v1beta1/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb index aed2e53e6d22..cf69c9c2c12e 100644 --- a/google-cloud-data_labeling-v1beta1/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb +++ b/google-cloud-data_labeling-v1beta1/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb @@ -1393,25 +1393,25 @@ def delete_annotated_dataset request, options = nil # One of image_classification_config, bounding_poly_config, # polyline_config and segmentation_config are required. # - # Note: The following fields are mutually exclusive: `image_classification_config`, `bounding_poly_config`, `polyline_config`, `segmentation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `image_classification_config`, `bounding_poly_config`, `polyline_config`, `segmentation_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bounding_poly_config [::Google::Cloud::DataLabeling::V1beta1::BoundingPolyConfig, ::Hash] # Configuration for bounding box and bounding poly task. # One of image_classification_config, bounding_poly_config, # polyline_config and segmentation_config are required. # - # Note: The following fields are mutually exclusive: `bounding_poly_config`, `image_classification_config`, `polyline_config`, `segmentation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bounding_poly_config`, `image_classification_config`, `polyline_config`, `segmentation_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param polyline_config [::Google::Cloud::DataLabeling::V1beta1::PolylineConfig, ::Hash] # Configuration for polyline task. # One of image_classification_config, bounding_poly_config, # polyline_config and segmentation_config are required. # - # Note: The following fields are mutually exclusive: `polyline_config`, `image_classification_config`, `bounding_poly_config`, `segmentation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `polyline_config`, `image_classification_config`, `bounding_poly_config`, `segmentation_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param segmentation_config [::Google::Cloud::DataLabeling::V1beta1::SegmentationConfig, ::Hash] # Configuration for segmentation task. # One of image_classification_config, bounding_poly_config, # polyline_config and segmentation_config are required. # - # Note: The following fields are mutually exclusive: `segmentation_config`, `image_classification_config`, `bounding_poly_config`, `polyline_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `segmentation_config`, `image_classification_config`, `bounding_poly_config`, `polyline_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. Name of the dataset to request labeling task, format: # projects/\\{project_id}/datasets/\\{dataset_id} @@ -1517,25 +1517,25 @@ def label_image request, options = nil # One of video_classification_config, object_detection_config, # object_tracking_config and event_config is required. # - # Note: The following fields are mutually exclusive: `video_classification_config`, `object_detection_config`, `object_tracking_config`, `event_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `video_classification_config`, `object_detection_config`, `object_tracking_config`, `event_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param object_detection_config [::Google::Cloud::DataLabeling::V1beta1::ObjectDetectionConfig, ::Hash] # Configuration for video object detection task. # One of video_classification_config, object_detection_config, # object_tracking_config and event_config is required. # - # Note: The following fields are mutually exclusive: `object_detection_config`, `video_classification_config`, `object_tracking_config`, `event_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `object_detection_config`, `video_classification_config`, `object_tracking_config`, `event_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param object_tracking_config [::Google::Cloud::DataLabeling::V1beta1::ObjectTrackingConfig, ::Hash] # Configuration for video object tracking task. # One of video_classification_config, object_detection_config, # object_tracking_config and event_config is required. # - # Note: The following fields are mutually exclusive: `object_tracking_config`, `video_classification_config`, `object_detection_config`, `event_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `object_tracking_config`, `video_classification_config`, `object_detection_config`, `event_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param event_config [::Google::Cloud::DataLabeling::V1beta1::EventConfig, ::Hash] # Configuration for video event task. # One of video_classification_config, object_detection_config, # object_tracking_config and event_config is required. # - # Note: The following fields are mutually exclusive: `event_config`, `video_classification_config`, `object_detection_config`, `object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `event_config`, `video_classification_config`, `object_detection_config`, `object_tracking_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. Name of the dataset to request labeling task, format: # projects/\\{project_id}/datasets/\\{dataset_id} @@ -1641,13 +1641,13 @@ def label_video request, options = nil # One of text_classification_config and text_entity_extraction_config # is required. # - # Note: The following fields are mutually exclusive: `text_classification_config`, `text_entity_extraction_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `text_classification_config`, `text_entity_extraction_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param text_entity_extraction_config [::Google::Cloud::DataLabeling::V1beta1::TextEntityExtractionConfig, ::Hash] # Configuration for entity extraction task. # One of text_classification_config and text_entity_extraction_config # is required. # - # Note: The following fields are mutually exclusive: `text_entity_extraction_config`, `text_classification_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `text_entity_extraction_config`, `text_classification_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. Name of the data set to request labeling task, format: # projects/\\{project_id}/datasets/\\{dataset_id} From 6cc23623db5d195d7cd32370adef0f381b05289b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:32:37 -0700 Subject: [PATCH 199/457] feat: add ability to specify trip attributes to Trip and deprecate Trip.remaining_waypoints_version (#30620) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add ability to specify trip attributes to Trip and deprecate Trip.remaining_waypoints_version PiperOrigin-RevId: 781185838 Source-Link: https://github.com/googleapis/googleapis/commit/302273adb3293bb504ecd83be8e1467511d5c779 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dd3d22b67c589f8f6042f30a885a57728a2ed4fa Copy-Tag: eyJwIjoiZ29vZ2xlLW1hcHMtZmxlZXRfZW5naW5lLWRlbGl2ZXJ5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkZDNkMjJiNjdjNTg5ZjhmNjA0MmYzMGE4ODVhNTc3MjhhMmVkNGZhIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../maps/fleetengine/delivery/v1/common_pb.rb | 2 +- .../google/maps/fleetengine/delivery/v1/common.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb index 7306c5bb6940..345c895f9d83 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb @@ -10,7 +10,7 @@ require 'google/type/latlng_pb' -descriptor_data = "\n0google/maps/fleetengine/delivery/v1/common.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xa0\x01\n\x18\x44\x65liveryVehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\"\n delivery_vehicle_attribute_value\"\xf4\x0c\n\x17\x44\x65liveryVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x61\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"t\n\nTimeWindow\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"z\n\rTaskAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14task_attribute_value*\xe6\x01\n\x1d\x44\x65liveryVehicleLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01*\x98\x01\n\x1f\x44\x65liveryVehicleNavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04\x42\xfb\x01\n\'com.google.maps.fleetengine.delivery.v1B\x06\x43ommonP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" +descriptor_data = "\n0google/maps/fleetengine/delivery/v1/common.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xa0\x01\n\x18\x44\x65liveryVehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\"\n delivery_vehicle_attribute_value\"\xd0\x0e\n\x17\x44\x65liveryVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x61\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"t\n\nTimeWindow\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"z\n\rTaskAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14task_attribute_value*\xe6\x01\n\x1d\x44\x65liveryVehicleLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01*\x98\x01\n\x1f\x44\x65liveryVehicleNavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04\x42\xfb\x01\n\'com.google.maps.fleetengine.delivery.v1B\x06\x43ommonP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb index f066be79410a..68ca054427ee 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb @@ -142,6 +142,19 @@ class DeliveryVehicleAttribute # @!attribute [rw] raw_location_accuracy # @return [::Google::Protobuf::DoubleValue] # Accuracy of `raw_location` as a radius, in meters. + # @!attribute [rw] flp_location + # @return [::Google::Type::LatLng] + # The location from Android's Fused Location Provider. + # @!attribute [rw] flp_update_time + # @return [::Google::Protobuf::Timestamp] + # Update timestamp of the `flp_location` + # @!attribute [rw] flp_latlng_accuracy_meters + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `flp_location` in meters as a radius. + # @!attribute [rw] flp_heading_degrees + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees, as determined by the Fused + # Location Provider. 0 represents North. The valid range is [0,360). # @!attribute [rw] supplemental_location # @return [::Google::Type::LatLng] # Supplemental location provided by the integrating app. From 47f35998f5a3fe3f65a4570fd3f641382d202599 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:34:03 -0700 Subject: [PATCH 200/457] feat: added resource change and drift details for the preview (#30606) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: added resource change and drift details for the preview docs: A comment for field `name` in message `.google.cloud.config.v1.Deployment` is changed docs: A comment for field `labels` in message `.google.cloud.config.v1.Deployment` is changed docs: A comment for field `input_values` in message `.google.cloud.config.v1.TerraformBlueprint` is changed docs: A comment for field `input_value` in message `.google.cloud.config.v1.TerraformVariable` is changed docs: A comment for field `error` in message `.google.cloud.config.v1.TerraformError` is changed docs: A comment for field `annotations` in message `.google.cloud.config.v1.Preview` is changed docs: A comment for field `page_size` in message `.google.cloud.config.v1.ListTerraformVersionsRequest` is changed docs: A comment for field `page_token` in message `.google.cloud.config.v1.ListTerraformVersionsRequest` is changed PiperOrigin-RevId: 780715974 Source-Link: https://github.com/googleapis/googleapis/commit/e0ccc57ed01b0057222f865de5765b7e453cfd81 Source-Link: https://github.com/googleapis/googleapis-gen/commit/03acbb3def154d07849aa77b6707ae7d36d0c3d5 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbmZpZ19zZXJ2aWNlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIwM2FjYmIzZGVmMTU0ZDA3ODQ5YWE3N2I2NzA3YWU3ZDM2ZDBjM2Q1In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 4 + .../gapic_metadata.json | 20 + .../lib/google/cloud/config/v1/config_pb.rb | 15 +- .../cloud/config/v1/config_services_pb.rb | 8 + .../cloud/config_service/v1/config/client.rb | 446 +++++++++++++++++- .../cloud/config_service/v1/config/paths.rb | 42 ++ .../config_service/v1/config/rest/client.rb | 418 +++++++++++++++- .../v1/config/rest/service_stub.rb | 244 ++++++++++ .../google/cloud/config/v1/config.rb | 303 +++++++++++- .../snippets/config/get_resource_change.rb | 47 ++ .../snippets/config/get_resource_drift.rb | 47 ++ .../snippets/config/list_resource_changes.rb | 51 ++ .../snippets/config/list_resource_drifts.rb | 51 ++ ...ippet_metadata_google.cloud.config.v1.json | 160 +++++++ .../config_service/v1/config_paths_test.rb | 24 + .../config_service/v1/config_rest_test.rb | 224 +++++++++ .../cloud/config_service/v1/config_test.rb | 258 ++++++++++ 17 files changed, 2342 insertions(+), 20 deletions(-) create mode 100644 google-cloud-config_service-v1/snippets/config/get_resource_change.rb create mode 100644 google-cloud-config_service-v1/snippets/config/get_resource_drift.rb create mode 100644 google-cloud-config_service-v1/snippets/config/list_resource_changes.rb create mode 100644 google-cloud-config_service-v1/snippets/config/list_resource_drifts.rb diff --git a/google-cloud-config_service-v1/.owlbot-manifest.json b/google-cloud-config_service-v1/.owlbot-manifest.json index a061afb95471..3c7d1bf8673a 100644 --- a/google-cloud-config_service-v1/.owlbot-manifest.json +++ b/google-cloud-config_service-v1/.owlbot-manifest.json @@ -58,11 +58,15 @@ "snippets/config/get_deployment.rb", "snippets/config/get_preview.rb", "snippets/config/get_resource.rb", + "snippets/config/get_resource_change.rb", + "snippets/config/get_resource_drift.rb", "snippets/config/get_revision.rb", "snippets/config/get_terraform_version.rb", "snippets/config/import_statefile.rb", "snippets/config/list_deployments.rb", "snippets/config/list_previews.rb", + "snippets/config/list_resource_changes.rb", + "snippets/config/list_resource_drifts.rb", "snippets/config/list_resources.rb", "snippets/config/list_revisions.rb", "snippets/config/list_terraform_versions.rb", diff --git a/google-cloud-config_service-v1/gapic_metadata.json b/google-cloud-config_service-v1/gapic_metadata.json index d7c933e30939..fe5b65211f57 100644 --- a/google-cloud-config_service-v1/gapic_metadata.json +++ b/google-cloud-config_service-v1/gapic_metadata.json @@ -124,6 +124,26 @@ "methods": [ "get_terraform_version" ] + }, + "ListResourceChanges": { + "methods": [ + "list_resource_changes" + ] + }, + "GetResourceChange": { + "methods": [ + "get_resource_change" + ] + }, + "ListResourceDrifts": { + "methods": [ + "list_resource_drifts" + ] + }, + "GetResourceDrift": { + "methods": [ + "get_resource_drift" + ] } } } diff --git a/google-cloud-config_service-v1/lib/google/cloud/config/v1/config_pb.rb b/google-cloud-config_service-v1/lib/google/cloud/config/v1/config_pb.rb index 6fcbc24868b9..4fdeb25b57db 100644 --- a/google-cloud-config_service-v1/lib/google/cloud/config/v1/config_pb.rb +++ b/google-cloud-config_service-v1/lib/google/cloud/config/v1/config_pb.rb @@ -17,7 +17,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n#google/cloud/config/v1/config.proto\x12\x16google.cloud.config.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xd0\x0f\n\nDeployment\x12I\n\x13terraform_blueprint\x18\x06 \x01(\x0b\x32*.google.cloud.config.v1.TerraformBlueprintH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x06labels\x18\x04 \x03(\x0b\x32..google.cloud.config.v1.Deployment.LabelsEntry\x12<\n\x05state\x18\x05 \x01(\x0e\x32(.google.cloud.config.v1.Deployment.StateB\x03\xe0\x41\x03\x12\x1c\n\x0flatest_revision\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cstate_detail\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x45\n\nerror_code\x18\n \x01(\x0e\x32,.google.cloud.config.v1.Deployment.ErrorCodeB\x03\xe0\x41\x03\x12\x41\n\x0e\x64\x65lete_results\x18\x08 \x01(\x0b\x32$.google.cloud.config.v1.ApplyResultsB\x03\xe0\x41\x03\x12\x19\n\x0c\x64\x65lete_build\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65lete_logs\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12>\n\ttf_errors\x18\r \x03(\x0b\x32&.google.cloud.config.v1.TerraformErrorB\x03\xe0\x41\x03\x12\x17\n\nerror_logs\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12&\n\x14\x61rtifacts_gcs_bucket\x18\x0f \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12G\n\x0fservice_account\x18\x10 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccountH\x02\x88\x01\x01\x12&\n\x19import_existing_resources\x18\x11 \x01(\x08H\x03\x88\x01\x01\x12\x46\n\x0bworker_pool\x18\x13 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPoolH\x04\x88\x01\x01\x12\x45\n\nlock_state\x18\x14 \x01(\x0e\x32,.google.cloud.config.v1.Deployment.LockStateB\x03\xe0\x41\x03\x12\'\n\x15tf_version_constraint\x18\x15 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\ntf_version\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x10quota_validation\x18\x17 \x01(\x0e\x32\'.google.cloud.config.v1.QuotaValidationB\x03\xe0\x41\x01\x12M\n\x0b\x61nnotations\x18\x18 \x03(\x0b\x32\x33.google.cloud.config.v1.Deployment.AnnotationsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\r\n\tSUSPENDED\x10\x06\x12\x0b\n\x07\x44\x45LETED\x10\x07\"\xdc\x01\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREVISION_FAILED\x10\x01\x12!\n\x1d\x43LOUD_BUILD_PERMISSION_DENIED\x10\x03\x12\x1b\n\x17\x44\x45LETE_BUILD_API_FAILED\x10\x05\x12\x1b\n\x17\x44\x45LETE_BUILD_RUN_FAILED\x10\x06\x12%\n!BUCKET_CREATION_PERMISSION_DENIED\x10\x07\x12\x1a\n\x16\x42UCKET_CREATION_FAILED\x10\x08\"\x81\x01\n\tLockState\x12\x1a\n\x16LOCK_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x0c\n\x08UNLOCKED\x10\x02\x12\x0b\n\x07LOCKING\x10\x03\x12\r\n\tUNLOCKING\x10\x04\x12\x0f\n\x0bLOCK_FAILED\x10\x05\x12\x11\n\rUNLOCK_FAILED\x10\x06:g\xea\x41\x64\n config.googleapis.com/Deployment\x12@projects/{project}/locations/{location}/deployments/{deployment}B\x0b\n\tblueprintB\x17\n\x15_artifacts_gcs_bucketB\x12\n\x10_service_accountB\x1c\n\x1a_import_existing_resourcesB\x0e\n\x0c_worker_poolB\x18\n\x16_tf_version_constraint\"\x9f\x02\n\x12TerraformBlueprint\x12\x14\n\ngcs_source\x18\x01 \x01(\tH\x00\x12\x37\n\ngit_source\x18\x02 \x01(\x0b\x32!.google.cloud.config.v1.GitSourceH\x00\x12Q\n\x0cinput_values\x18\x04 \x03(\x0b\x32;.google.cloud.config.v1.TerraformBlueprint.InputValuesEntry\x1a]\n\x10InputValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.cloud.config.v1.TerraformVariable:\x02\x38\x01\x42\x08\n\x06source\"@\n\x11TerraformVariable\x12+\n\x0binput_value\x18\x05 \x01(\x0b\x32\x16.google.protobuf.Value\"\xcf\x01\n\x0c\x41pplyResults\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tartifacts\x18\x02 \x01(\t\x12\x42\n\x07outputs\x18\x03 \x03(\x0b\x32\x31.google.cloud.config.v1.ApplyResults.OutputsEntry\x1aW\n\x0cOutputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.config.v1.TerraformOutput:\x02\x38\x01\"K\n\x0fTerraformOutput\x12\x11\n\tsensitive\x18\x01 \x01(\x08\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\"\x9c\x01\n\x16ListDeploymentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x80\x01\n\x17ListDeploymentsResponse\x12\x37\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32\".google.cloud.config.v1.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x14GetDeploymentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\"\x99\x01\n\x14ListRevisionsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"z\n\x15ListRevisionsResponse\x12\x33\n\trevisions\x18\x01 \x03(\x0b\x32 .google.cloud.config.v1.Revision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"J\n\x12GetRevisionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63onfig.googleapis.com/Revision\"\xc6\x01\n\x17\x43reateDeploymentRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rdeployment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\ndeployment\x18\x03 \x01(\x0b\x32\".google.cloud.config.v1.DeploymentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\x17UpdateDeploymentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12;\n\ndeployment\x18\x02 \x01(\x0b\x32\".google.cloud.config.v1.DeploymentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x02\n\x17\x44\x65leteDeploymentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12X\n\rdelete_policy\x18\x04 \x01(\x0e\x32<.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicyB\x03\xe0\x41\x01\"F\n\x0c\x44\x65letePolicy\x12\x1d\n\x19\x44\x45LETE_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x0b\n\x07\x41\x42\x41NDON\x10\x02\"\xc1\x03\n\x11OperationMetadata\x12W\n\x13\x64\x65ployment_metadata\x18\x08 \x01(\x0b\x32\x33.google.cloud.config.v1.DeploymentOperationMetadataB\x03\xe0\x41\x03H\x00\x12Q\n\x10preview_metadata\x18\t \x01(\x0b\x32\x30.google.cloud.config.v1.PreviewOperationMetadataB\x03\xe0\x41\x03H\x00\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x13\n\x11resource_metadata\"\x83\x0b\n\x08Revision\x12N\n\x13terraform_blueprint\x18\x06 \x01(\x0b\x32*.google.cloud.config.v1.TerraformBlueprintB\x03\xe0\x41\x03H\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\'.google.cloud.config.v1.Revision.ActionB\x03\xe0\x41\x03\x12:\n\x05state\x18\x05 \x01(\x0e\x32&.google.cloud.config.v1.Revision.StateB\x03\xe0\x41\x03\x12@\n\rapply_results\x18\x07 \x01(\x0b\x32$.google.cloud.config.v1.ApplyResultsB\x03\xe0\x41\x03\x12\x19\n\x0cstate_detail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\nerror_code\x18\t \x01(\x0e\x32*.google.cloud.config.v1.Revision.ErrorCodeB\x03\xe0\x41\x03\x12\x12\n\x05\x62uild\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04logs\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12>\n\ttf_errors\x18\x0c \x03(\x0b\x32&.google.cloud.config.v1.TerraformErrorB\x03\xe0\x41\x03\x12\x17\n\nerror_logs\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0fservice_account\x18\x0e \x01(\tB)\xe0\x41\x03\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12&\n\x19import_existing_resources\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0bworker_pool\x18\x11 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12\"\n\x15tf_version_constraint\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ntf_version\x18\x13 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18quota_validation_results\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x10quota_validation\x18\x14 \x01(\x0e\x32\'.google.cloud.config.v1.QuotaValidationB\x03\xe0\x41\x01\"D\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41PPLYING\x10\x01\x12\x0b\n\x07\x41PPLIED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"\x9f\x01\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12!\n\x1d\x43LOUD_BUILD_PERMISSION_DENIED\x10\x01\x12\x1a\n\x16\x41PPLY_BUILD_API_FAILED\x10\x04\x12\x1a\n\x16\x41PPLY_BUILD_RUN_FAILED\x10\x05\x12\x1b\n\x17QUOTA_VALIDATION_FAILED\x10\x07:z\xea\x41w\n\x1e\x63onfig.googleapis.com/Revision\x12Uprojects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}B\x0b\n\tblueprint\"\x84\x01\n\x0eTerraformError\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12\x1a\n\x12http_response_code\x18\x02 \x01(\x05\x12\x19\n\x11\x65rror_description\x18\x03 \x01(\t\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"v\n\tGitSource\x12\x16\n\x04repo\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1b\n\tdirectory\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x15\n\x03ref\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x07\n\x05_repoB\x0c\n\n_directoryB\x06\n\x04_ref\"\x9f\x04\n\x1b\x44\x65ploymentOperationMetadata\x12P\n\x04step\x18\x01 \x01(\x0e\x32\x42.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep\x12;\n\rapply_results\x18\x02 \x01(\x0b\x32$.google.cloud.config.v1.ApplyResults\x12\x12\n\x05\x62uild\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04logs\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xc9\x02\n\x0e\x44\x65ploymentStep\x12\x1f\n\x1b\x44\x45PLOYMENT_STEP_UNSPECIFIED\x10\x00\x12\x1c\n\x18PREPARING_STORAGE_BUCKET\x10\x01\x12\x19\n\x15\x44OWNLOADING_BLUEPRINT\x10\x02\x12\x13\n\x0fRUNNING_TF_INIT\x10\x03\x12\x13\n\x0fRUNNING_TF_PLAN\x10\x04\x12\x14\n\x10RUNNING_TF_APPLY\x10\x05\x12\x16\n\x12RUNNING_TF_DESTROY\x10\x06\x12\x17\n\x13RUNNING_TF_VALIDATE\x10\x07\x12\x18\n\x14UNLOCKING_DEPLOYMENT\x10\x08\x12\r\n\tSUCCEEDED\x10\t\x12\n\n\x06\x46\x41ILED\x10\n\x12\x19\n\x15VALIDATING_REPOSITORY\x10\x0b\x12\x1c\n\x18RUNNING_QUOTA_VALIDATION\x10\x0c\"\xd8\x05\n\x08Resource\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12J\n\x0eterraform_info\x18\x02 \x01(\x0b\x32-.google.cloud.config.v1.ResourceTerraformInfoB\x03\xe0\x41\x03\x12H\n\ncai_assets\x18\x03 \x03(\x0b\x32/.google.cloud.config.v1.Resource.CaiAssetsEntryB\x03\xe0\x41\x03\x12<\n\x06intent\x18\x04 \x01(\x0e\x32\'.google.cloud.config.v1.Resource.IntentB\x03\xe0\x41\x03\x12:\n\x05state\x18\x05 \x01(\x0e\x32&.google.cloud.config.v1.Resource.StateB\x03\xe0\x41\x03\x1aY\n\x0e\x43\x61iAssetsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.config.v1.ResourceCAIInfo:\x02\x38\x01\"a\n\x06Intent\x12\x16\n\x12INTENT_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x12\x0c\n\x08RECREATE\x10\x04\x12\r\n\tUNCHANGED\x10\x05\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PLANNED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\x0e\n\nRECONCILED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x90\x01\xea\x41\x8c\x01\n\x1e\x63onfig.googleapis.com/Resource\x12jprojects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}\"B\n\x15ResourceTerraformInfo\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\"-\n\x0fResourceCAIInfo\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\"J\n\x12GetResourceRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63onfig.googleapis.com/Resource\"\x97\x01\n\x14ListResourcesRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63onfig.googleapis.com/Revision\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"z\n\x15ListResourcesResponse\x12\x33\n\tresources\x18\x01 \x03(\x0b\x32 .google.cloud.config.v1.Resource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"$\n\tStatefile\x12\x17\n\nsigned_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\"p\n ExportDeploymentStatefileRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x12\n\x05\x64raft\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"X\n\x1e\x45xportRevisionStatefileRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63onfig.googleapis.com/Revision\"\x81\x01\n\x16ImportStatefileRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x14\n\x07lock_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nskip_draft\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x16\x44\x65leteStatefileRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x14\n\x07lock_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"O\n\x15LockDeploymentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\"g\n\x17UnlockDeploymentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x14\n\x07lock_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"O\n\x15\x45xportLockInfoRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\"\x8b\x01\n\x08LockInfo\x12\x0f\n\x07lock_id\x18\x01 \x01(\x03\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x0c\n\x04info\x18\x03 \x01(\t\x12\x0b\n\x03who\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xf8\r\n\x07Preview\x12I\n\x13terraform_blueprint\x18\x06 \x01(\x0b\x32*.google.cloud.config.v1.TerraformBlueprintH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x03 \x03(\x0b\x32+.google.cloud.config.v1.Preview.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x05state\x18\x04 \x01(\x0e\x32%.google.cloud.config.v1.Preview.StateB\x03\xe0\x41\x03\x12<\n\ndeployment\x18\x05 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n config.googleapis.com/Deployment\x12\x46\n\x0cpreview_mode\x18\x0f \x01(\x0e\x32+.google.cloud.config.v1.Preview.PreviewModeB\x03\xe0\x41\x01\x12\x42\n\x0fservice_account\x18\x07 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12&\n\x14\x61rtifacts_gcs_bucket\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x46\n\x0bworker_pool\x18\t \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPoolH\x02\x88\x01\x01\x12\x42\n\nerror_code\x18\n \x01(\x0e\x32).google.cloud.config.v1.Preview.ErrorCodeB\x03\xe0\x41\x03\x12-\n\x0c\x65rror_status\x18\x0b \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x12\n\x05\x62uild\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12>\n\ttf_errors\x18\r \x03(\x0b\x32&.google.cloud.config.v1.TerraformErrorB\x03\xe0\x41\x03\x12\x17\n\nerror_logs\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12H\n\x11preview_artifacts\x18\x10 \x01(\x0b\x32(.google.cloud.config.v1.PreviewArtifactsB\x03\xe0\x41\x03\x12\x11\n\x04logs\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ntf_version\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x15tf_version_constraint\x18\x13 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12J\n\x0b\x61nnotations\x18\x14 \x03(\x0b\x32\x30.google.cloud.config.v1.Preview.AnnotationsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x41PPLYING\x10\x03\x12\t\n\x05STALE\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0b\n\x07\x44\x45LETED\x10\x07\"D\n\x0bPreviewMode\x12\x1c\n\x18PREVIEW_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\"\xed\x01\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12!\n\x1d\x43LOUD_BUILD_PERMISSION_DENIED\x10\x01\x12%\n!BUCKET_CREATION_PERMISSION_DENIED\x10\x02\x12\x1a\n\x16\x42UCKET_CREATION_FAILED\x10\x03\x12\"\n\x1e\x44\x45PLOYMENT_LOCK_ACQUIRE_FAILED\x10\x04\x12\x1c\n\x18PREVIEW_BUILD_API_FAILED\x10\x05\x12\x1c\n\x18PREVIEW_BUILD_RUN_FAILED\x10\x06:q\xea\x41n\n\x1d\x63onfig.googleapis.com/Preview\x12:projects/{project}/locations/{location}/previews/{preview}*\x08previews2\x07previewB\x0b\n\tblueprintB\x17\n\x15_artifacts_gcs_bucketB\x0e\n\x0c_worker_poolB\x18\n\x16_tf_version_constraint\"\xe4\x03\n\x18PreviewOperationMetadata\x12J\n\x04step\x18\x01 \x01(\x0e\x32<.google.cloud.config.v1.PreviewOperationMetadata.PreviewStep\x12\x43\n\x11preview_artifacts\x18\x02 \x01(\x0b\x32(.google.cloud.config.v1.PreviewArtifacts\x12\x11\n\x04logs\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x62uild\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x8f\x02\n\x0bPreviewStep\x12\x1c\n\x18PREVIEW_STEP_UNSPECIFIED\x10\x00\x12\x1c\n\x18PREPARING_STORAGE_BUCKET\x10\x01\x12\x19\n\x15\x44OWNLOADING_BLUEPRINT\x10\x02\x12\x13\n\x0fRUNNING_TF_INIT\x10\x03\x12\x13\n\x0fRUNNING_TF_PLAN\x10\x04\x12\x17\n\x13\x46\x45TCHING_DEPLOYMENT\x10\x05\x12\x16\n\x12LOCKING_DEPLOYMENT\x10\x06\x12\x18\n\x14UNLOCKING_DEPLOYMENT\x10\x07\x12\r\n\tSUCCEEDED\x10\x08\x12\n\n\x06\x46\x41ILED\x10\t\x12\x19\n\x15VALIDATING_REPOSITORY\x10\n\"@\n\x10PreviewArtifacts\x12\x14\n\x07\x63ontent\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tartifacts\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xc2\x01\n\x14\x43reatePreviewRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\npreview_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\x07preview\x18\x03 \x01(\x0b\x32\x1f.google.cloud.config.v1.PreviewB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"H\n\x11GetPreviewRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63onfig.googleapis.com/Preview\"\xad\x01\n\x13ListPreviewsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"w\n\x14ListPreviewsResponse\x12\x31\n\x08previews\x18\x01 \x03(\x0b\x32\x1f.google.cloud.config.v1.Preview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"l\n\x14\x44\x65letePreviewRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63onfig.googleapis.com/Preview\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"S\n\x1a\x45xportPreviewResultRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63onfig.googleapis.com/Preview\"Y\n\x1b\x45xportPreviewResultResponse\x12:\n\x06result\x18\x01 \x01(\x0b\x32%.google.cloud.config.v1.PreviewResultB\x03\xe0\x41\x03\"M\n\rPreviewResult\x12\x1e\n\x11\x62inary_signed_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fjson_signed_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"Z\n\x1aGetTerraformVersionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&config.googleapis.com/TerraformVersion\"\xb6\x01\n\x1cListTerraformVersionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x1dListTerraformVersionsResponse\x12\x44\n\x12terraform_versions\x18\x01 \x03(\x0b\x32(.google.cloud.config.v1.TerraformVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xad\x04\n\x10TerraformVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x42\n\x05state\x18\x02 \x01(\x0e\x32..google.cloud.config.v1.TerraformVersion.StateB\x03\xe0\x41\x03\x12\x35\n\x0csupport_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0e\x64\x65precate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12;\n\robsolete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nDEPRECATED\x10\x02\x12\x0c\n\x08OBSOLETE\x10\x03:\xa0\x01\xea\x41\x9c\x01\n&config.googleapis.com/TerraformVersion\x12Mprojects/{project}/locations/{location}/terraformVersions/{terraform_version}*\x11terraformVersions2\x10terraformVersionB\x11\n\x0f_deprecate_timeB\x10\n\x0e_obsolete_time*N\n\x0fQuotaValidation\x12 \n\x1cQUOTA_VALIDATION_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x45NFORCED\x10\x02\x32\xa7#\n\x06\x43onfig\x12\xb4\x01\n\x0fListDeployments\x12..google.cloud.config.v1.ListDeploymentsRequest\x1a/.google.cloud.config.v1.ListDeploymentsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/deployments\x12\xa1\x01\n\rGetDeployment\x12,.google.cloud.config.v1.GetDeploymentRequest\x1a\".google.cloud.config.v1.Deployment\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/deployments/*}\x12\xec\x01\n\x10\x43reateDeployment\x12/.google.cloud.config.v1.CreateDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x1fparent,deployment,deployment_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/deployments:\ndeployment\x12\xee\x01\n\x10UpdateDeployment\x12/.google.cloud.config.v1.UpdateDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x16\x64\x65ployment,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{deployment.name=projects/*/locations/*/deployments/*}:\ndeployment\x12\xc4\x01\n\x10\x44\x65leteDeployment\x12/.google.cloud.config.v1.DeleteDeploymentRequest\x1a\x1d.google.longrunning.Operation\"`\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/deployments/*}\x12\xba\x01\n\rListRevisions\x12,.google.cloud.config.v1.ListRevisionsRequest\x1a-.google.cloud.config.v1.ListRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/deployments/*}/revisions\x12\xa7\x01\n\x0bGetRevision\x12*.google.cloud.config.v1.GetRevisionRequest\x1a .google.cloud.config.v1.Revision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/deployments/*/revisions/*}\x12\xb3\x01\n\x0bGetResource\x12*.google.cloud.config.v1.GetResourceRequest\x1a .google.cloud.config.v1.Resource\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}\x12\xc6\x01\n\rListResources\x12,.google.cloud.config.v1.ListResourcesRequest\x1a-.google.cloud.config.v1.ListResourcesResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources\x12\xc2\x01\n\x19\x45xportDeploymentStatefile\x12\x38.google.cloud.config.v1.ExportDeploymentStatefileRequest\x1a!.google.cloud.config.v1.Statefile\"H\x82\xd3\xe4\x93\x02\x42\"=/v1/{parent=projects/*/locations/*/deployments/*}:exportState:\x01*\x12\xca\x01\n\x17\x45xportRevisionStatefile\x12\x36.google.cloud.config.v1.ExportRevisionStatefileRequest\x1a!.google.cloud.config.v1.Statefile\"T\x82\xd3\xe4\x93\x02N\"I/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState:\x01*\x12\xbf\x01\n\x0fImportStatefile\x12..google.cloud.config.v1.ImportStatefileRequest\x1a!.google.cloud.config.v1.Statefile\"Y\xda\x41\x0eparent,lock_id\x82\xd3\xe4\x93\x02\x42\"=/v1/{parent=projects/*/locations/*/deployments/*}:importState:\x01*\x12\xa8\x01\n\x0f\x44\x65leteStatefile\x12..google.cloud.config.v1.DeleteStatefileRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/locations/*/deployments/*}:deleteState:\x01*\x12\xc8\x01\n\x0eLockDeployment\x12-.google.cloud.config.v1.LockDeploymentRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/deployments/*}:lock:\x01*\x12\xd6\x01\n\x10UnlockDeployment\x12/.google.cloud.config.v1.UnlockDeploymentRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x0cname,lock_id\x82\xd3\xe4\x93\x02;\"6/v1/{name=projects/*/locations/*/deployments/*}:unlock:\x01*\x12\xac\x01\n\x0e\x45xportLockInfo\x12-.google.cloud.config.v1.ExportLockInfoRequest\x1a .google.cloud.config.v1.LockInfo\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/deployments/*}:exportLock\x12\xcb\x01\n\rCreatePreview\x12,.google.cloud.config.v1.CreatePreviewRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41\x1c\n\x07Preview\x12\x11OperationMetadata\xda\x41\x0eparent,preview\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/previews:\x07preview\x12\x95\x01\n\nGetPreview\x12).google.cloud.config.v1.GetPreviewRequest\x1a\x1f.google.cloud.config.v1.Preview\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/previews/*}\x12\xa8\x01\n\x0cListPreviews\x12+.google.cloud.config.v1.ListPreviewsRequest\x1a,.google.cloud.config.v1.ListPreviewsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/previews\x12\xb8\x01\n\rDeletePreview\x12,.google.cloud.config.v1.DeletePreviewRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41\x1c\n\x07Preview\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/previews/*}\x12\xc0\x01\n\x13\x45xportPreviewResult\x12\x32.google.cloud.config.v1.ExportPreviewResultRequest\x1a\x33.google.cloud.config.v1.ExportPreviewResultResponse\"@\x82\xd3\xe4\x93\x02:\"5/v1/{parent=projects/*/locations/*/previews/*}:export:\x01*\x12\xcc\x01\n\x15ListTerraformVersions\x12\x34.google.cloud.config.v1.ListTerraformVersionsRequest\x1a\x35.google.cloud.config.v1.ListTerraformVersionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/terraformVersions\x12\xb9\x01\n\x13GetTerraformVersion\x12\x32.google.cloud.config.v1.GetTerraformVersionRequest\x1a(.google.cloud.config.v1.TerraformVersion\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/terraformVersions/*}\x1aI\xca\x41\x15\x63onfig.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfc\x02\n\x1a\x63om.google.cloud.config.v1B\x0b\x43onfigProtoP\x01Z2cloud.google.com/go/config/apiv1/configpb;configpb\xaa\x02\x16Google.Cloud.Config.V1\xca\x02\x16Google\\Cloud\\Config\\V1\xea\x02 Google::Cloud::ConfigService::V1\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41i\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}b\x06proto3" +descriptor_data = "\n#google/cloud/config/v1/config.proto\x12\x16google.cloud.config.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xda\x0f\n\nDeployment\x12I\n\x13terraform_blueprint\x18\x06 \x01(\x0b\x32*.google.cloud.config.v1.TerraformBlueprintH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x04 \x03(\x0b\x32..google.cloud.config.v1.Deployment.LabelsEntryB\x03\xe0\x41\x01\x12<\n\x05state\x18\x05 \x01(\x0e\x32(.google.cloud.config.v1.Deployment.StateB\x03\xe0\x41\x03\x12\x1c\n\x0flatest_revision\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cstate_detail\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x45\n\nerror_code\x18\n \x01(\x0e\x32,.google.cloud.config.v1.Deployment.ErrorCodeB\x03\xe0\x41\x03\x12\x41\n\x0e\x64\x65lete_results\x18\x08 \x01(\x0b\x32$.google.cloud.config.v1.ApplyResultsB\x03\xe0\x41\x03\x12\x19\n\x0c\x64\x65lete_build\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65lete_logs\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12>\n\ttf_errors\x18\r \x03(\x0b\x32&.google.cloud.config.v1.TerraformErrorB\x03\xe0\x41\x03\x12\x17\n\nerror_logs\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12&\n\x14\x61rtifacts_gcs_bucket\x18\x0f \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12G\n\x0fservice_account\x18\x10 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccountH\x02\x88\x01\x01\x12&\n\x19import_existing_resources\x18\x11 \x01(\x08H\x03\x88\x01\x01\x12\x46\n\x0bworker_pool\x18\x13 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPoolH\x04\x88\x01\x01\x12\x45\n\nlock_state\x18\x14 \x01(\x0e\x32,.google.cloud.config.v1.Deployment.LockStateB\x03\xe0\x41\x03\x12\'\n\x15tf_version_constraint\x18\x15 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\ntf_version\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x10quota_validation\x18\x17 \x01(\x0e\x32\'.google.cloud.config.v1.QuotaValidationB\x03\xe0\x41\x01\x12M\n\x0b\x61nnotations\x18\x18 \x03(\x0b\x32\x33.google.cloud.config.v1.Deployment.AnnotationsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\r\n\tSUSPENDED\x10\x06\x12\x0b\n\x07\x44\x45LETED\x10\x07\"\xdc\x01\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREVISION_FAILED\x10\x01\x12!\n\x1d\x43LOUD_BUILD_PERMISSION_DENIED\x10\x03\x12\x1b\n\x17\x44\x45LETE_BUILD_API_FAILED\x10\x05\x12\x1b\n\x17\x44\x45LETE_BUILD_RUN_FAILED\x10\x06\x12%\n!BUCKET_CREATION_PERMISSION_DENIED\x10\x07\x12\x1a\n\x16\x42UCKET_CREATION_FAILED\x10\x08\"\x81\x01\n\tLockState\x12\x1a\n\x16LOCK_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x0c\n\x08UNLOCKED\x10\x02\x12\x0b\n\x07LOCKING\x10\x03\x12\r\n\tUNLOCKING\x10\x04\x12\x0f\n\x0bLOCK_FAILED\x10\x05\x12\x11\n\rUNLOCK_FAILED\x10\x06:g\xea\x41\x64\n config.googleapis.com/Deployment\x12@projects/{project}/locations/{location}/deployments/{deployment}B\x0b\n\tblueprintB\x17\n\x15_artifacts_gcs_bucketB\x12\n\x10_service_accountB\x1c\n\x1a_import_existing_resourcesB\x0e\n\x0c_worker_poolB\x18\n\x16_tf_version_constraint\"\xa4\x02\n\x12TerraformBlueprint\x12\x14\n\ngcs_source\x18\x01 \x01(\tH\x00\x12\x37\n\ngit_source\x18\x02 \x01(\x0b\x32!.google.cloud.config.v1.GitSourceH\x00\x12V\n\x0cinput_values\x18\x04 \x03(\x0b\x32;.google.cloud.config.v1.TerraformBlueprint.InputValuesEntryB\x03\xe0\x41\x01\x1a]\n\x10InputValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.cloud.config.v1.TerraformVariable:\x02\x38\x01\x42\x08\n\x06source\"E\n\x11TerraformVariable\x12\x30\n\x0binput_value\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\"\xcf\x01\n\x0c\x41pplyResults\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tartifacts\x18\x02 \x01(\t\x12\x42\n\x07outputs\x18\x03 \x03(\x0b\x32\x31.google.cloud.config.v1.ApplyResults.OutputsEntry\x1aW\n\x0cOutputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.config.v1.TerraformOutput:\x02\x38\x01\"K\n\x0fTerraformOutput\x12\x11\n\tsensitive\x18\x01 \x01(\x08\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\"\x9c\x01\n\x16ListDeploymentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x80\x01\n\x17ListDeploymentsResponse\x12\x37\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32\".google.cloud.config.v1.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x14GetDeploymentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\"\x99\x01\n\x14ListRevisionsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"z\n\x15ListRevisionsResponse\x12\x33\n\trevisions\x18\x01 \x03(\x0b\x32 .google.cloud.config.v1.Revision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"J\n\x12GetRevisionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63onfig.googleapis.com/Revision\"\xc6\x01\n\x17\x43reateDeploymentRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rdeployment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\ndeployment\x18\x03 \x01(\x0b\x32\".google.cloud.config.v1.DeploymentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\x17UpdateDeploymentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12;\n\ndeployment\x18\x02 \x01(\x0b\x32\".google.cloud.config.v1.DeploymentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x02\n\x17\x44\x65leteDeploymentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12X\n\rdelete_policy\x18\x04 \x01(\x0e\x32<.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicyB\x03\xe0\x41\x01\"F\n\x0c\x44\x65letePolicy\x12\x1d\n\x19\x44\x45LETE_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x0b\n\x07\x41\x42\x41NDON\x10\x02\"\xc1\x03\n\x11OperationMetadata\x12W\n\x13\x64\x65ployment_metadata\x18\x08 \x01(\x0b\x32\x33.google.cloud.config.v1.DeploymentOperationMetadataB\x03\xe0\x41\x03H\x00\x12Q\n\x10preview_metadata\x18\t \x01(\x0b\x32\x30.google.cloud.config.v1.PreviewOperationMetadataB\x03\xe0\x41\x03H\x00\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x13\n\x11resource_metadata\"\x83\x0b\n\x08Revision\x12N\n\x13terraform_blueprint\x18\x06 \x01(\x0b\x32*.google.cloud.config.v1.TerraformBlueprintB\x03\xe0\x41\x03H\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\'.google.cloud.config.v1.Revision.ActionB\x03\xe0\x41\x03\x12:\n\x05state\x18\x05 \x01(\x0e\x32&.google.cloud.config.v1.Revision.StateB\x03\xe0\x41\x03\x12@\n\rapply_results\x18\x07 \x01(\x0b\x32$.google.cloud.config.v1.ApplyResultsB\x03\xe0\x41\x03\x12\x19\n\x0cstate_detail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\nerror_code\x18\t \x01(\x0e\x32*.google.cloud.config.v1.Revision.ErrorCodeB\x03\xe0\x41\x03\x12\x12\n\x05\x62uild\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04logs\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12>\n\ttf_errors\x18\x0c \x03(\x0b\x32&.google.cloud.config.v1.TerraformErrorB\x03\xe0\x41\x03\x12\x17\n\nerror_logs\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0fservice_account\x18\x0e \x01(\tB)\xe0\x41\x03\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12&\n\x19import_existing_resources\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0bworker_pool\x18\x11 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12\"\n\x15tf_version_constraint\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ntf_version\x18\x13 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18quota_validation_results\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x10quota_validation\x18\x14 \x01(\x0e\x32\'.google.cloud.config.v1.QuotaValidationB\x03\xe0\x41\x01\"D\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41PPLYING\x10\x01\x12\x0b\n\x07\x41PPLIED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"\x9f\x01\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12!\n\x1d\x43LOUD_BUILD_PERMISSION_DENIED\x10\x01\x12\x1a\n\x16\x41PPLY_BUILD_API_FAILED\x10\x04\x12\x1a\n\x16\x41PPLY_BUILD_RUN_FAILED\x10\x05\x12\x1b\n\x17QUOTA_VALIDATION_FAILED\x10\x07:z\xea\x41w\n\x1e\x63onfig.googleapis.com/Revision\x12Uprojects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}B\x0b\n\tblueprint\"\x89\x01\n\x0eTerraformError\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12\x1a\n\x12http_response_code\x18\x02 \x01(\x05\x12\x19\n\x11\x65rror_description\x18\x03 \x01(\t\x12&\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"v\n\tGitSource\x12\x16\n\x04repo\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1b\n\tdirectory\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x15\n\x03ref\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x07\n\x05_repoB\x0c\n\n_directoryB\x06\n\x04_ref\"\x9f\x04\n\x1b\x44\x65ploymentOperationMetadata\x12P\n\x04step\x18\x01 \x01(\x0e\x32\x42.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep\x12;\n\rapply_results\x18\x02 \x01(\x0b\x32$.google.cloud.config.v1.ApplyResults\x12\x12\n\x05\x62uild\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04logs\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xc9\x02\n\x0e\x44\x65ploymentStep\x12\x1f\n\x1b\x44\x45PLOYMENT_STEP_UNSPECIFIED\x10\x00\x12\x1c\n\x18PREPARING_STORAGE_BUCKET\x10\x01\x12\x19\n\x15\x44OWNLOADING_BLUEPRINT\x10\x02\x12\x13\n\x0fRUNNING_TF_INIT\x10\x03\x12\x13\n\x0fRUNNING_TF_PLAN\x10\x04\x12\x14\n\x10RUNNING_TF_APPLY\x10\x05\x12\x16\n\x12RUNNING_TF_DESTROY\x10\x06\x12\x17\n\x13RUNNING_TF_VALIDATE\x10\x07\x12\x18\n\x14UNLOCKING_DEPLOYMENT\x10\x08\x12\r\n\tSUCCEEDED\x10\t\x12\n\n\x06\x46\x41ILED\x10\n\x12\x19\n\x15VALIDATING_REPOSITORY\x10\x0b\x12\x1c\n\x18RUNNING_QUOTA_VALIDATION\x10\x0c\"\xd8\x05\n\x08Resource\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12J\n\x0eterraform_info\x18\x02 \x01(\x0b\x32-.google.cloud.config.v1.ResourceTerraformInfoB\x03\xe0\x41\x03\x12H\n\ncai_assets\x18\x03 \x03(\x0b\x32/.google.cloud.config.v1.Resource.CaiAssetsEntryB\x03\xe0\x41\x03\x12<\n\x06intent\x18\x04 \x01(\x0e\x32\'.google.cloud.config.v1.Resource.IntentB\x03\xe0\x41\x03\x12:\n\x05state\x18\x05 \x01(\x0e\x32&.google.cloud.config.v1.Resource.StateB\x03\xe0\x41\x03\x1aY\n\x0e\x43\x61iAssetsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.config.v1.ResourceCAIInfo:\x02\x38\x01\"a\n\x06Intent\x12\x16\n\x12INTENT_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x12\x0c\n\x08RECREATE\x10\x04\x12\r\n\tUNCHANGED\x10\x05\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PLANNED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\x0e\n\nRECONCILED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x90\x01\xea\x41\x8c\x01\n\x1e\x63onfig.googleapis.com/Resource\x12jprojects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}\"B\n\x15ResourceTerraformInfo\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\"-\n\x0fResourceCAIInfo\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\"J\n\x12GetResourceRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63onfig.googleapis.com/Resource\"\x97\x01\n\x14ListResourcesRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63onfig.googleapis.com/Revision\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"z\n\x15ListResourcesResponse\x12\x33\n\tresources\x18\x01 \x03(\x0b\x32 .google.cloud.config.v1.Resource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"$\n\tStatefile\x12\x17\n\nsigned_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\"p\n ExportDeploymentStatefileRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x12\n\x05\x64raft\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"X\n\x1e\x45xportRevisionStatefileRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63onfig.googleapis.com/Revision\"\x81\x01\n\x16ImportStatefileRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x14\n\x07lock_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nskip_draft\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x16\x44\x65leteStatefileRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x14\n\x07lock_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"O\n\x15LockDeploymentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\"g\n\x17UnlockDeploymentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\x12\x14\n\x07lock_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"O\n\x15\x45xportLockInfoRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n config.googleapis.com/Deployment\"\x8b\x01\n\x08LockInfo\x12\x0f\n\x07lock_id\x18\x01 \x01(\x03\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x0c\n\x04info\x18\x03 \x01(\t\x12\x0b\n\x03who\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xf8\r\n\x07Preview\x12I\n\x13terraform_blueprint\x18\x06 \x01(\x0b\x32*.google.cloud.config.v1.TerraformBlueprintH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x03 \x03(\x0b\x32+.google.cloud.config.v1.Preview.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x05state\x18\x04 \x01(\x0e\x32%.google.cloud.config.v1.Preview.StateB\x03\xe0\x41\x03\x12<\n\ndeployment\x18\x05 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n config.googleapis.com/Deployment\x12\x46\n\x0cpreview_mode\x18\x0f \x01(\x0e\x32+.google.cloud.config.v1.Preview.PreviewModeB\x03\xe0\x41\x01\x12\x42\n\x0fservice_account\x18\x07 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12&\n\x14\x61rtifacts_gcs_bucket\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x46\n\x0bworker_pool\x18\t \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPoolH\x02\x88\x01\x01\x12\x42\n\nerror_code\x18\n \x01(\x0e\x32).google.cloud.config.v1.Preview.ErrorCodeB\x03\xe0\x41\x03\x12-\n\x0c\x65rror_status\x18\x0b \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x12\n\x05\x62uild\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12>\n\ttf_errors\x18\r \x03(\x0b\x32&.google.cloud.config.v1.TerraformErrorB\x03\xe0\x41\x03\x12\x17\n\nerror_logs\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12H\n\x11preview_artifacts\x18\x10 \x01(\x0b\x32(.google.cloud.config.v1.PreviewArtifactsB\x03\xe0\x41\x03\x12\x11\n\x04logs\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ntf_version\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x15tf_version_constraint\x18\x13 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12J\n\x0b\x61nnotations\x18\x14 \x03(\x0b\x32\x30.google.cloud.config.v1.Preview.AnnotationsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x41PPLYING\x10\x03\x12\t\n\x05STALE\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0b\n\x07\x44\x45LETED\x10\x07\"D\n\x0bPreviewMode\x12\x1c\n\x18PREVIEW_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\"\xed\x01\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12!\n\x1d\x43LOUD_BUILD_PERMISSION_DENIED\x10\x01\x12%\n!BUCKET_CREATION_PERMISSION_DENIED\x10\x02\x12\x1a\n\x16\x42UCKET_CREATION_FAILED\x10\x03\x12\"\n\x1e\x44\x45PLOYMENT_LOCK_ACQUIRE_FAILED\x10\x04\x12\x1c\n\x18PREVIEW_BUILD_API_FAILED\x10\x05\x12\x1c\n\x18PREVIEW_BUILD_RUN_FAILED\x10\x06:q\xea\x41n\n\x1d\x63onfig.googleapis.com/Preview\x12:projects/{project}/locations/{location}/previews/{preview}*\x08previews2\x07previewB\x0b\n\tblueprintB\x17\n\x15_artifacts_gcs_bucketB\x0e\n\x0c_worker_poolB\x18\n\x16_tf_version_constraint\"\xe4\x03\n\x18PreviewOperationMetadata\x12J\n\x04step\x18\x01 \x01(\x0e\x32<.google.cloud.config.v1.PreviewOperationMetadata.PreviewStep\x12\x43\n\x11preview_artifacts\x18\x02 \x01(\x0b\x32(.google.cloud.config.v1.PreviewArtifacts\x12\x11\n\x04logs\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x62uild\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x8f\x02\n\x0bPreviewStep\x12\x1c\n\x18PREVIEW_STEP_UNSPECIFIED\x10\x00\x12\x1c\n\x18PREPARING_STORAGE_BUCKET\x10\x01\x12\x19\n\x15\x44OWNLOADING_BLUEPRINT\x10\x02\x12\x13\n\x0fRUNNING_TF_INIT\x10\x03\x12\x13\n\x0fRUNNING_TF_PLAN\x10\x04\x12\x17\n\x13\x46\x45TCHING_DEPLOYMENT\x10\x05\x12\x16\n\x12LOCKING_DEPLOYMENT\x10\x06\x12\x18\n\x14UNLOCKING_DEPLOYMENT\x10\x07\x12\r\n\tSUCCEEDED\x10\x08\x12\n\n\x06\x46\x41ILED\x10\t\x12\x19\n\x15VALIDATING_REPOSITORY\x10\n\"@\n\x10PreviewArtifacts\x12\x14\n\x07\x63ontent\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tartifacts\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xc2\x01\n\x14\x43reatePreviewRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\npreview_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\x07preview\x18\x03 \x01(\x0b\x32\x1f.google.cloud.config.v1.PreviewB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"H\n\x11GetPreviewRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63onfig.googleapis.com/Preview\"\xad\x01\n\x13ListPreviewsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"w\n\x14ListPreviewsResponse\x12\x31\n\x08previews\x18\x01 \x03(\x0b\x32\x1f.google.cloud.config.v1.Preview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"l\n\x14\x44\x65letePreviewRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63onfig.googleapis.com/Preview\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"S\n\x1a\x45xportPreviewResultRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63onfig.googleapis.com/Preview\"Y\n\x1b\x45xportPreviewResultResponse\x12:\n\x06result\x18\x01 \x01(\x0b\x32%.google.cloud.config.v1.PreviewResultB\x03\xe0\x41\x03\"M\n\rPreviewResult\x12\x1e\n\x11\x62inary_signed_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fjson_signed_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"Z\n\x1aGetTerraformVersionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&config.googleapis.com/TerraformVersion\"\xb6\x01\n\x1cListTerraformVersionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x1dListTerraformVersionsResponse\x12\x44\n\x12terraform_versions\x18\x01 \x03(\x0b\x32(.google.cloud.config.v1.TerraformVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xad\x04\n\x10TerraformVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x42\n\x05state\x18\x02 \x01(\x0e\x32..google.cloud.config.v1.TerraformVersion.StateB\x03\xe0\x41\x03\x12\x35\n\x0csupport_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0e\x64\x65precate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12;\n\robsolete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nDEPRECATED\x10\x02\x12\x0c\n\x08OBSOLETE\x10\x03:\xa0\x01\xea\x41\x9c\x01\n&config.googleapis.com/TerraformVersion\x12Mprojects/{project}/locations/{location}/terraformVersions/{terraform_version}*\x11terraformVersions2\x10terraformVersionB\x11\n\x0f_deprecate_timeB\x10\n\x0e_obsolete_time\"\x8f\x01\n\x1bResourceChangeTerraformInfo\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rresource_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08provider\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63tions\x18\x05 \x03(\tB\x03\xe0\x41\x03\"\x8f\x04\n\x0eResourceChange\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0eterraform_info\x18\x02 \x01(\x0b\x32\x33.google.cloud.config.v1.ResourceChangeTerraformInfoB\x03\xe0\x41\x03\x12\x42\n\x06intent\x18\x03 \x01(\x0e\x32-.google.cloud.config.v1.ResourceChange.IntentB\x03\xe0\x41\x03\x12\x45\n\x10property_changes\x18\x04 \x03(\x0b\x32&.google.cloud.config.v1.PropertyChangeB\x03\xe0\x41\x03\"a\n\x06Intent\x12\x16\n\x12INTENT_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x12\x0c\n\x08RECREATE\x10\x04\x12\r\n\tUNCHANGED\x10\x05:\xa9\x01\xea\x41\xa5\x01\n$config.googleapis.com/ResourceChange\x12\\projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}*\x0fresourceChanges2\x0eresourceChange\"\xc5\x01\n\x0ePropertyChange\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x62\x65\x66ore_sensitive_paths\x18\x02 \x03(\tB\x03\xe0\x41\x03\x12+\n\x06\x62\x65\x66ore\x18\x03 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66ter_sensitive_paths\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12*\n\x05\x61\x66ter\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\"\xb0\x01\n\x1aListResourceChangesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63onfig.googleapis.com/Preview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1bListResourceChangesResponse\x12@\n\x10resource_changes\x18\x01 \x03(\x0b\x32&.google.cloud.config.v1.ResourceChange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"V\n\x18GetResourceChangeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$config.googleapis.com/ResourceChange\"x\n\x1aResourceDriftTerraformInfo\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rresource_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08provider\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xdf\x02\n\rResourceDrift\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12O\n\x0eterraform_info\x18\x02 \x01(\x0b\x32\x32.google.cloud.config.v1.ResourceDriftTerraformInfoB\x03\xe0\x41\x03\x12\x43\n\x0fproperty_drifts\x18\x03 \x03(\x0b\x32%.google.cloud.config.v1.PropertyDriftB\x03\xe0\x41\x03:\xa4\x01\xea\x41\xa0\x01\n#config.googleapis.com/ResourceDrift\x12Zprojects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}*\x0eresourceDrifts2\rresourceDrift\"\xc4\x01\n\rPropertyDrift\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x62\x65\x66ore_sensitive_paths\x18\x02 \x03(\tB\x03\xe0\x41\x03\x12+\n\x06\x62\x65\x66ore\x18\x03 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66ter_sensitive_paths\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12*\n\x05\x61\x66ter\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\"\xaf\x01\n\x19ListResourceDriftsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63onfig.googleapis.com/Preview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x1aListResourceDriftsResponse\x12>\n\x0fresource_drifts\x18\x01 \x03(\x0b\x32%.google.cloud.config.v1.ResourceDrift\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"T\n\x17GetResourceDriftRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#config.googleapis.com/ResourceDrift*N\n\x0fQuotaValidation\x12 \n\x1cQUOTA_VALIDATION_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x45NFORCED\x10\x02\x32\xc1)\n\x06\x43onfig\x12\xb4\x01\n\x0fListDeployments\x12..google.cloud.config.v1.ListDeploymentsRequest\x1a/.google.cloud.config.v1.ListDeploymentsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/deployments\x12\xa1\x01\n\rGetDeployment\x12,.google.cloud.config.v1.GetDeploymentRequest\x1a\".google.cloud.config.v1.Deployment\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/deployments/*}\x12\xec\x01\n\x10\x43reateDeployment\x12/.google.cloud.config.v1.CreateDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x1fparent,deployment,deployment_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/deployments:\ndeployment\x12\xee\x01\n\x10UpdateDeployment\x12/.google.cloud.config.v1.UpdateDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x16\x64\x65ployment,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{deployment.name=projects/*/locations/*/deployments/*}:\ndeployment\x12\xc4\x01\n\x10\x44\x65leteDeployment\x12/.google.cloud.config.v1.DeleteDeploymentRequest\x1a\x1d.google.longrunning.Operation\"`\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/deployments/*}\x12\xba\x01\n\rListRevisions\x12,.google.cloud.config.v1.ListRevisionsRequest\x1a-.google.cloud.config.v1.ListRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/deployments/*}/revisions\x12\xa7\x01\n\x0bGetRevision\x12*.google.cloud.config.v1.GetRevisionRequest\x1a .google.cloud.config.v1.Revision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/deployments/*/revisions/*}\x12\xb3\x01\n\x0bGetResource\x12*.google.cloud.config.v1.GetResourceRequest\x1a .google.cloud.config.v1.Resource\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}\x12\xc6\x01\n\rListResources\x12,.google.cloud.config.v1.ListResourcesRequest\x1a-.google.cloud.config.v1.ListResourcesResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources\x12\xc2\x01\n\x19\x45xportDeploymentStatefile\x12\x38.google.cloud.config.v1.ExportDeploymentStatefileRequest\x1a!.google.cloud.config.v1.Statefile\"H\x82\xd3\xe4\x93\x02\x42\"=/v1/{parent=projects/*/locations/*/deployments/*}:exportState:\x01*\x12\xca\x01\n\x17\x45xportRevisionStatefile\x12\x36.google.cloud.config.v1.ExportRevisionStatefileRequest\x1a!.google.cloud.config.v1.Statefile\"T\x82\xd3\xe4\x93\x02N\"I/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState:\x01*\x12\xbf\x01\n\x0fImportStatefile\x12..google.cloud.config.v1.ImportStatefileRequest\x1a!.google.cloud.config.v1.Statefile\"Y\xda\x41\x0eparent,lock_id\x82\xd3\xe4\x93\x02\x42\"=/v1/{parent=projects/*/locations/*/deployments/*}:importState:\x01*\x12\xa8\x01\n\x0f\x44\x65leteStatefile\x12..google.cloud.config.v1.DeleteStatefileRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/locations/*/deployments/*}:deleteState:\x01*\x12\xc8\x01\n\x0eLockDeployment\x12-.google.cloud.config.v1.LockDeploymentRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/deployments/*}:lock:\x01*\x12\xd6\x01\n\x10UnlockDeployment\x12/.google.cloud.config.v1.UnlockDeploymentRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41\x1f\n\nDeployment\x12\x11OperationMetadata\xda\x41\x0cname,lock_id\x82\xd3\xe4\x93\x02;\"6/v1/{name=projects/*/locations/*/deployments/*}:unlock:\x01*\x12\xac\x01\n\x0e\x45xportLockInfo\x12-.google.cloud.config.v1.ExportLockInfoRequest\x1a .google.cloud.config.v1.LockInfo\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/deployments/*}:exportLock\x12\xcb\x01\n\rCreatePreview\x12,.google.cloud.config.v1.CreatePreviewRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41\x1c\n\x07Preview\x12\x11OperationMetadata\xda\x41\x0eparent,preview\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/previews:\x07preview\x12\x95\x01\n\nGetPreview\x12).google.cloud.config.v1.GetPreviewRequest\x1a\x1f.google.cloud.config.v1.Preview\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/previews/*}\x12\xa8\x01\n\x0cListPreviews\x12+.google.cloud.config.v1.ListPreviewsRequest\x1a,.google.cloud.config.v1.ListPreviewsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/previews\x12\xb8\x01\n\rDeletePreview\x12,.google.cloud.config.v1.DeletePreviewRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41\x1c\n\x07Preview\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/previews/*}\x12\xc0\x01\n\x13\x45xportPreviewResult\x12\x32.google.cloud.config.v1.ExportPreviewResultRequest\x1a\x33.google.cloud.config.v1.ExportPreviewResultResponse\"@\x82\xd3\xe4\x93\x02:\"5/v1/{parent=projects/*/locations/*/previews/*}:export:\x01*\x12\xcc\x01\n\x15ListTerraformVersions\x12\x34.google.cloud.config.v1.ListTerraformVersionsRequest\x1a\x35.google.cloud.config.v1.ListTerraformVersionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/terraformVersions\x12\xb9\x01\n\x13GetTerraformVersion\x12\x32.google.cloud.config.v1.GetTerraformVersionRequest\x1a(.google.cloud.config.v1.TerraformVersion\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/terraformVersions/*}\x12\xcf\x01\n\x13ListResourceChanges\x12\x32.google.cloud.config.v1.ListResourceChangesRequest\x1a\x33.google.cloud.config.v1.ListResourceChangesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges\x12\xbc\x01\n\x11GetResourceChange\x12\x30.google.cloud.config.v1.GetResourceChangeRequest\x1a&.google.cloud.config.v1.ResourceChange\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}\x12\xcb\x01\n\x12ListResourceDrifts\x12\x31.google.cloud.config.v1.ListResourceDriftsRequest\x1a\x32.google.cloud.config.v1.ListResourceDriftsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts\x12\xb8\x01\n\x10GetResourceDrift\x12/.google.cloud.config.v1.GetResourceDriftRequest\x1a%.google.cloud.config.v1.ResourceDrift\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}\x1aI\xca\x41\x15\x63onfig.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfc\x02\n\x1a\x63om.google.cloud.config.v1B\x0b\x43onfigProtoP\x01Z2cloud.google.com/go/config/apiv1/configpb;configpb\xaa\x02\x16Google.Cloud.Config.V1\xca\x02\x16Google\\Cloud\\Config\\V1\xea\x02 Google::Cloud::ConfigService::V1\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41i\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -115,6 +115,19 @@ module V1 ListTerraformVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ListTerraformVersionsResponse").msgclass TerraformVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.TerraformVersion").msgclass TerraformVersion::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.TerraformVersion.State").enummodule + ResourceChangeTerraformInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ResourceChangeTerraformInfo").msgclass + ResourceChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ResourceChange").msgclass + ResourceChange::Intent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ResourceChange.Intent").enummodule + PropertyChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.PropertyChange").msgclass + ListResourceChangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ListResourceChangesRequest").msgclass + ListResourceChangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ListResourceChangesResponse").msgclass + GetResourceChangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.GetResourceChangeRequest").msgclass + ResourceDriftTerraformInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ResourceDriftTerraformInfo").msgclass + ResourceDrift = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ResourceDrift").msgclass + PropertyDrift = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.PropertyDrift").msgclass + ListResourceDriftsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ListResourceDriftsRequest").msgclass + ListResourceDriftsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.ListResourceDriftsResponse").msgclass + GetResourceDriftRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.GetResourceDriftRequest").msgclass QuotaValidation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.config.v1.QuotaValidation").enummodule end end diff --git a/google-cloud-config_service-v1/lib/google/cloud/config/v1/config_services_pb.rb b/google-cloud-config_service-v1/lib/google/cloud/config/v1/config_services_pb.rb index 406dc42ee227..a923b8b8367c 100644 --- a/google-cloud-config_service-v1/lib/google/cloud/config/v1/config_services_pb.rb +++ b/google-cloud-config_service-v1/lib/google/cloud/config/v1/config_services_pb.rb @@ -86,6 +86,14 @@ class Service # Gets details about a # [TerraformVersion][google.cloud.config.v1.TerraformVersion]. rpc :GetTerraformVersion, ::Google::Cloud::ConfigService::V1::GetTerraformVersionRequest, ::Google::Cloud::ConfigService::V1::TerraformVersion + # Lists ResourceChanges for a given preview. + rpc :ListResourceChanges, ::Google::Cloud::ConfigService::V1::ListResourceChangesRequest, ::Google::Cloud::ConfigService::V1::ListResourceChangesResponse + # Get a ResourceChange for a given preview. + rpc :GetResourceChange, ::Google::Cloud::ConfigService::V1::GetResourceChangeRequest, ::Google::Cloud::ConfigService::V1::ResourceChange + # List ResourceDrifts for a given preview. + rpc :ListResourceDrifts, ::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest, ::Google::Cloud::ConfigService::V1::ListResourceDriftsResponse + # Get a ResourceDrift for a given preview. + rpc :GetResourceDrift, ::Google::Cloud::ConfigService::V1::GetResourceDriftRequest, ::Google::Cloud::ConfigService::V1::ResourceDrift end Stub = Service.rpc_stub_class diff --git a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/client.rb b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/client.rb index a25e0842f2d4..2ea799a5dc16 100644 --- a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/client.rb +++ b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/client.rb @@ -2391,13 +2391,13 @@ def export_preview_result request, options = nil # parent value is in the format: # 'projects/\\{project_id}/locations/\\{location}'. # @param page_size [::Integer] - # Optional. When requesting a page of resources, 'page_size' specifies number - # of resources to return. If unspecified, at most 500 will be returned. The - # maximum value is 1000. + # Optional. When requesting a page of terraform versions, 'page_size' + # specifies number of terraform versions to return. If unspecified, at most + # 500 will be returned. The maximum value is 1000. # @param page_token [::String] # Optional. Token returned by previous call to 'ListTerraformVersions' which # specifies the position in the list from where to continue listing the - # resources. + # terraform versions. # @param filter [::String] # Optional. Lists the TerraformVersions that match the filter expression. A # filter expression filters the resources listed in the response. The @@ -2567,6 +2567,416 @@ def get_terraform_version request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists ResourceChanges for a given preview. + # + # @overload list_resource_changes(request, options = nil) + # Pass arguments to `list_resource_changes` via a request object, either of type + # {::Google::Cloud::ConfigService::V1::ListResourceChangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigService::V1::ListResourceChangesRequest, ::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_resource_changes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_changes` 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 parent in whose context the ResourceChanges are listed. The + # parent value is in the format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'. + # @param page_size [::Integer] + # Optional. When requesting a page of resource changes, 'page_size' specifies + # number of resource changes to return. If unspecified, at most 500 will be + # returned. The maximum value is 1000. + # @param page_token [::String] + # Optional. Token returned by previous call to 'ListResourceChanges' which + # specifies the position in the list from where to continue listing the + # resource changes. + # @param filter [::String] + # Optional. Lists the resource changes that match the filter expression. A + # filter expression filters the resource changes listed in the response. The + # expression must be of the form '\\{field} \\{operator} \\{value}' where + # operators: '<', '>', + # '<=', + # '>=', + # '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + # roughly synonymous with equality). \\{field} can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = + # "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + # @param order_by [::String] + # Optional. Field to use to sort the list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceChange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceChange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_service/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigService::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new + # + # # Call the list_resource_changes method. + # result = client.list_resource_changes 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::ConfigService::V1::ResourceChange. + # p item + # end + # + def list_resource_changes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourceChangesRequest + + # 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_resource_changes.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::ConfigService::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_resource_changes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_changes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :list_resource_changes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_stub, :list_resource_changes, 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 + + ## + # Get a ResourceChange for a given preview. + # + # @overload get_resource_change(request, options = nil) + # Pass arguments to `get_resource_change` via a request object, either of type + # {::Google::Cloud::ConfigService::V1::GetResourceChangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigService::V1::GetResourceChangeRequest, ::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_resource_change(name: nil) + # Pass arguments to `get_resource_change` 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 name of the resource change to retrieve. + # Format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceChanges/\\{resource_change}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ConfigService::V1::ResourceChange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ConfigService::V1::ResourceChange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_service/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigService::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigService::V1::GetResourceChangeRequest.new + # + # # Call the get_resource_change method. + # result = client.get_resource_change request + # + # # The returned object is of type Google::Cloud::ConfigService::V1::ResourceChange. + # p result + # + def get_resource_change request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceChangeRequest + + # 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_resource_change.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::ConfigService::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_resource_change.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_resource_change.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :get_resource_change, 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 + + ## + # List ResourceDrifts for a given preview. + # + # @overload list_resource_drifts(request, options = nil) + # Pass arguments to `list_resource_drifts` via a request object, either of type + # {::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest, ::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_resource_drifts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_drifts` 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 parent in whose context the ResourceDrifts are listed. The + # parent value is in the format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'. + # @param page_size [::Integer] + # Optional. When requesting a page of resource drifts, 'page_size' specifies + # number of resource drifts to return. If unspecified, at most 500 will be + # returned. The maximum value is 1000. + # @param page_token [::String] + # Optional. Token returned by previous call to 'ListResourceDrifts' which + # specifies the position in the list from where to continue listing the + # resource drifts. + # @param filter [::String] + # Optional. Lists the resource drifts that match the filter expression. A + # filter expression filters the resource drifts listed in the response. The + # expression must be of the form '\\{field} \\{operator} \\{value}' where + # operators: '<', '>', + # '<=', + # '>=', + # '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + # roughly synonymous with equality). \\{field} can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = + # "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + # @param order_by [::String] + # Optional. Field to use to sort the list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceDrift>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceDrift>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_service/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigService::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new + # + # # Call the list_resource_drifts method. + # result = client.list_resource_drifts 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::ConfigService::V1::ResourceDrift. + # p item + # end + # + def list_resource_drifts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest + + # 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_resource_drifts.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::ConfigService::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_resource_drifts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_drifts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :list_resource_drifts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_stub, :list_resource_drifts, 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 + + ## + # Get a ResourceDrift for a given preview. + # + # @overload get_resource_drift(request, options = nil) + # Pass arguments to `get_resource_drift` via a request object, either of type + # {::Google::Cloud::ConfigService::V1::GetResourceDriftRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigService::V1::GetResourceDriftRequest, ::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_resource_drift(name: nil) + # Pass arguments to `get_resource_drift` 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 name of the resource drift to retrieve. + # Format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceDrifts/\\{resource_drift}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ConfigService::V1::ResourceDrift] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ConfigService::V1::ResourceDrift] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_service/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigService::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigService::V1::GetResourceDriftRequest.new + # + # # Call the get_resource_drift method. + # result = client.get_resource_drift request + # + # # The returned object is of type Google::Cloud::ConfigService::V1::ResourceDrift. + # p result + # + def get_resource_drift request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceDriftRequest + + # 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_resource_drift.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::ConfigService::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_resource_drift.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_resource_drift.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :get_resource_drift, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the Config API. # @@ -2848,6 +3258,26 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :get_terraform_version + ## + # RPC-specific configuration for `list_resource_changes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_changes + ## + # RPC-specific configuration for `get_resource_change` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_change + ## + # RPC-specific configuration for `list_resource_drifts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_drifts + ## + # RPC-specific configuration for `get_resource_drift` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_drift # @private def initialize parent_rpcs = nil @@ -2897,6 +3327,14 @@ def initialize parent_rpcs = nil @list_terraform_versions = ::Gapic::Config::Method.new list_terraform_versions_config get_terraform_version_config = parent_rpcs.get_terraform_version if parent_rpcs.respond_to? :get_terraform_version @get_terraform_version = ::Gapic::Config::Method.new get_terraform_version_config + list_resource_changes_config = parent_rpcs.list_resource_changes if parent_rpcs.respond_to? :list_resource_changes + @list_resource_changes = ::Gapic::Config::Method.new list_resource_changes_config + get_resource_change_config = parent_rpcs.get_resource_change if parent_rpcs.respond_to? :get_resource_change + @get_resource_change = ::Gapic::Config::Method.new get_resource_change_config + list_resource_drifts_config = parent_rpcs.list_resource_drifts if parent_rpcs.respond_to? :list_resource_drifts + @list_resource_drifts = ::Gapic::Config::Method.new list_resource_drifts_config + get_resource_drift_config = parent_rpcs.get_resource_drift if parent_rpcs.respond_to? :get_resource_drift + @get_resource_drift = ::Gapic::Config::Method.new get_resource_drift_config yield self if block_given? end diff --git a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/paths.rb b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/paths.rb index ce11753a85ba..b4b7e05cec1c 100644 --- a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/paths.rb +++ b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/paths.rb @@ -102,6 +102,48 @@ def resource_path project:, location:, deployment:, revision:, resource: "projects/#{project}/locations/#{location}/deployments/#{deployment}/revisions/#{revision}/resources/#{resource}" end + ## + # Create a fully-qualified ResourceChange resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}` + # + # @param project [String] + # @param location [String] + # @param preview [String] + # @param resource_change [String] + # + # @return [::String] + def resource_change_path project:, location:, preview:, resource_change: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "preview cannot contain /" if preview.to_s.include? "/" + + "projects/#{project}/locations/#{location}/previews/#{preview}/resourceChanges/#{resource_change}" + end + + ## + # Create a fully-qualified ResourceDrift resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}` + # + # @param project [String] + # @param location [String] + # @param preview [String] + # @param resource_drift [String] + # + # @return [::String] + def resource_drift_path project:, location:, preview:, resource_drift: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "preview cannot contain /" if preview.to_s.include? "/" + + "projects/#{project}/locations/#{location}/previews/#{preview}/resourceDrifts/#{resource_drift}" + end + ## # Create a fully-qualified Revision resource string. # diff --git a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/rest/client.rb b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/rest/client.rb index 2b1bc7cf4435..4fc891b8db7e 100644 --- a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/rest/client.rb +++ b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/rest/client.rb @@ -2239,13 +2239,13 @@ def export_preview_result request, options = nil # parent value is in the format: # 'projects/\\{project_id}/locations/\\{location}'. # @param page_size [::Integer] - # Optional. When requesting a page of resources, 'page_size' specifies number - # of resources to return. If unspecified, at most 500 will be returned. The - # maximum value is 1000. + # Optional. When requesting a page of terraform versions, 'page_size' + # specifies number of terraform versions to return. If unspecified, at most + # 500 will be returned. The maximum value is 1000. # @param page_token [::String] # Optional. Token returned by previous call to 'ListTerraformVersions' which # specifies the position in the list from where to continue listing the - # resources. + # terraform versions. # @param filter [::String] # Optional. Lists the TerraformVersions that match the filter expression. A # filter expression filters the resources listed in the response. The @@ -2401,6 +2401,388 @@ def get_terraform_version request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists ResourceChanges for a given preview. + # + # @overload list_resource_changes(request, options = nil) + # Pass arguments to `list_resource_changes` via a request object, either of type + # {::Google::Cloud::ConfigService::V1::ListResourceChangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigService::V1::ListResourceChangesRequest, ::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_resource_changes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_changes` 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 parent in whose context the ResourceChanges are listed. The + # parent value is in the format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'. + # @param page_size [::Integer] + # Optional. When requesting a page of resource changes, 'page_size' specifies + # number of resource changes to return. If unspecified, at most 500 will be + # returned. The maximum value is 1000. + # @param page_token [::String] + # Optional. Token returned by previous call to 'ListResourceChanges' which + # specifies the position in the list from where to continue listing the + # resource changes. + # @param filter [::String] + # Optional. Lists the resource changes that match the filter expression. A + # filter expression filters the resource changes listed in the response. The + # expression must be of the form '\\{field} \\{operator} \\{value}' where + # operators: '<', '>', + # '<=', + # '>=', + # '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + # roughly synonymous with equality). \\{field} can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = + # "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + # @param order_by [::String] + # Optional. Field to use to sort the list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceChange>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceChange>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_service/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigService::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new + # + # # Call the list_resource_changes method. + # result = client.list_resource_changes 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::ConfigService::V1::ResourceChange. + # p item + # end + # + def list_resource_changes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourceChangesRequest + + # 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_resource_changes.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::ConfigService::V1::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_resource_changes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_changes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.list_resource_changes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_stub, :list_resource_changes, "resource_changes", 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 + + ## + # Get a ResourceChange for a given preview. + # + # @overload get_resource_change(request, options = nil) + # Pass arguments to `get_resource_change` via a request object, either of type + # {::Google::Cloud::ConfigService::V1::GetResourceChangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigService::V1::GetResourceChangeRequest, ::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_resource_change(name: nil) + # Pass arguments to `get_resource_change` 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 name of the resource change to retrieve. + # Format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceChanges/\\{resource_change}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ConfigService::V1::ResourceChange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigService::V1::ResourceChange] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_service/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigService::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigService::V1::GetResourceChangeRequest.new + # + # # Call the get_resource_change method. + # result = client.get_resource_change request + # + # # The returned object is of type Google::Cloud::ConfigService::V1::ResourceChange. + # p result + # + def get_resource_change request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceChangeRequest + + # 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_resource_change.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::ConfigService::V1::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_resource_change.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_resource_change.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.get_resource_change 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 + + ## + # List ResourceDrifts for a given preview. + # + # @overload list_resource_drifts(request, options = nil) + # Pass arguments to `list_resource_drifts` via a request object, either of type + # {::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest, ::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_resource_drifts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_drifts` 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 parent in whose context the ResourceDrifts are listed. The + # parent value is in the format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'. + # @param page_size [::Integer] + # Optional. When requesting a page of resource drifts, 'page_size' specifies + # number of resource drifts to return. If unspecified, at most 500 will be + # returned. The maximum value is 1000. + # @param page_token [::String] + # Optional. Token returned by previous call to 'ListResourceDrifts' which + # specifies the position in the list from where to continue listing the + # resource drifts. + # @param filter [::String] + # Optional. Lists the resource drifts that match the filter expression. A + # filter expression filters the resource drifts listed in the response. The + # expression must be of the form '\\{field} \\{operator} \\{value}' where + # operators: '<', '>', + # '<=', + # '>=', + # '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + # roughly synonymous with equality). \\{field} can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = + # "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + # @param order_by [::String] + # Optional. Field to use to sort the list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceDrift>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceDrift>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_service/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigService::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new + # + # # Call the list_resource_drifts method. + # result = client.list_resource_drifts 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::ConfigService::V1::ResourceDrift. + # p item + # end + # + def list_resource_drifts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest + + # 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_resource_drifts.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::ConfigService::V1::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_resource_drifts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_drifts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.list_resource_drifts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_stub, :list_resource_drifts, "resource_drifts", 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 + + ## + # Get a ResourceDrift for a given preview. + # + # @overload get_resource_drift(request, options = nil) + # Pass arguments to `get_resource_drift` via a request object, either of type + # {::Google::Cloud::ConfigService::V1::GetResourceDriftRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigService::V1::GetResourceDriftRequest, ::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_resource_drift(name: nil) + # Pass arguments to `get_resource_drift` 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 name of the resource drift to retrieve. + # Format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceDrifts/\\{resource_drift}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ConfigService::V1::ResourceDrift] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigService::V1::ResourceDrift] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_service/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigService::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigService::V1::GetResourceDriftRequest.new + # + # # Call the get_resource_drift method. + # result = client.get_resource_drift request + # + # # The returned object is of type Google::Cloud::ConfigService::V1::ResourceDrift. + # p result + # + def get_resource_drift request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceDriftRequest + + # 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_resource_drift.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::ConfigService::V1::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_resource_drift.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_resource_drift.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.get_resource_drift 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 + ## # Configuration class for the Config REST API. # @@ -2669,6 +3051,26 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :get_terraform_version + ## + # RPC-specific configuration for `list_resource_changes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_changes + ## + # RPC-specific configuration for `get_resource_change` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_change + ## + # RPC-specific configuration for `list_resource_drifts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_drifts + ## + # RPC-specific configuration for `get_resource_drift` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_drift # @private def initialize parent_rpcs = nil @@ -2718,6 +3120,14 @@ def initialize parent_rpcs = nil @list_terraform_versions = ::Gapic::Config::Method.new list_terraform_versions_config get_terraform_version_config = parent_rpcs.get_terraform_version if parent_rpcs.respond_to? :get_terraform_version @get_terraform_version = ::Gapic::Config::Method.new get_terraform_version_config + list_resource_changes_config = parent_rpcs.list_resource_changes if parent_rpcs.respond_to? :list_resource_changes + @list_resource_changes = ::Gapic::Config::Method.new list_resource_changes_config + get_resource_change_config = parent_rpcs.get_resource_change if parent_rpcs.respond_to? :get_resource_change + @get_resource_change = ::Gapic::Config::Method.new get_resource_change_config + list_resource_drifts_config = parent_rpcs.list_resource_drifts if parent_rpcs.respond_to? :list_resource_drifts + @list_resource_drifts = ::Gapic::Config::Method.new list_resource_drifts_config + get_resource_drift_config = parent_rpcs.get_resource_drift if parent_rpcs.respond_to? :get_resource_drift + @get_resource_drift = ::Gapic::Config::Method.new get_resource_drift_config yield self if block_given? end diff --git a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/rest/service_stub.rb b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/rest/service_stub.rb index d80311c1a5e5..9f60b38ea9e6 100644 --- a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/rest/service_stub.rb +++ b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/config/rest/service_stub.rb @@ -993,6 +993,166 @@ def get_terraform_version request_pb, options = nil end end + ## + # Baseline implementation for the list_resource_changes REST call + # + # @param request_pb [::Google::Cloud::ConfigService::V1::ListResourceChangesRequest] + # 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::ConfigService::V1::ListResourceChangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigService::V1::ListResourceChangesResponse] + # A result object deserialized from the server's reply + def list_resource_changes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_changes_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_resource_changes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigService::V1::ListResourceChangesResponse.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_resource_change REST call + # + # @param request_pb [::Google::Cloud::ConfigService::V1::GetResourceChangeRequest] + # 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::ConfigService::V1::ResourceChange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigService::V1::ResourceChange] + # A result object deserialized from the server's reply + def get_resource_change request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_change_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_resource_change", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigService::V1::ResourceChange.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_resource_drifts REST call + # + # @param request_pb [::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest] + # 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::ConfigService::V1::ListResourceDriftsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigService::V1::ListResourceDriftsResponse] + # A result object deserialized from the server's reply + def list_resource_drifts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_drifts_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_resource_drifts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigService::V1::ListResourceDriftsResponse.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_resource_drift REST call + # + # @param request_pb [::Google::Cloud::ConfigService::V1::GetResourceDriftRequest] + # 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::ConfigService::V1::ResourceDrift] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigService::V1::ResourceDrift] + # A result object deserialized from the server's reply + def get_resource_drift request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_drift_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_resource_drift", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigService::V1::ResourceDrift.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -1485,6 +1645,90 @@ def self.transcode_get_terraform_version_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_changes REST call + # + # @param request_pb [::Google::Cloud::ConfigService::V1::ListResourceChangesRequest] + # 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_resource_changes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceChanges", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/previews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_resource_change REST call + # + # @param request_pb [::Google::Cloud::ConfigService::V1::GetResourceChangeRequest] + # 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_resource_change_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/previews/[^/]+/resourceChanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_drifts REST call + # + # @param request_pb [::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest] + # 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_resource_drifts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceDrifts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/previews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_resource_drift REST call + # + # @param request_pb [::Google::Cloud::ConfigService::V1::GetResourceDriftRequest] + # 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_resource_drift_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/previews/[^/]+/resourceDrifts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-config_service-v1/proto_docs/google/cloud/config/v1/config.rb b/google-cloud-config_service-v1/proto_docs/google/cloud/config/v1/config.rb index 14cbb2ef5e38..ff0e6cb98d5f 100644 --- a/google-cloud-config_service-v1/proto_docs/google/cloud/config/v1/config.rb +++ b/google-cloud-config_service-v1/proto_docs/google/cloud/config/v1/config.rb @@ -29,7 +29,7 @@ module V1 # as a root module. # @!attribute [rw] name # @return [::String] - # Resource name of the deployment. + # Identifier. Resource name of the deployment. # Format: `projects/{project}/locations/{location}/deployments/{deployment}` # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] @@ -39,7 +39,7 @@ module V1 # Output only. Time when the deployment was last modified. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined metadata for the deployment. + # Optional. User-defined metadata for the deployment. # @!attribute [r] state # @return [::Google::Cloud::ConfigService::V1::Deployment::State] # Output only. Current state of the deployment. @@ -248,7 +248,7 @@ module LockState # Note: The following fields are mutually exclusive: `git_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] input_values # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ConfigService::V1::TerraformVariable}] - # Input variable values for the Terraform blueprint. + # Optional. Input variable values for the Terraform blueprint. class TerraformBlueprint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -266,7 +266,7 @@ class InputValuesEntry # A Terraform input variable. # @!attribute [rw] input_value # @return [::Google::Protobuf::Value] - # Input variable value. + # Optional. Input variable value. class TerraformVariable include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -763,9 +763,10 @@ module ErrorCode # @!attribute [rw] error_description # @return [::String] # A human-readable error description. - # @!attribute [rw] error + # @!attribute [r] error # @return [::Google::Rpc::Status] - # Original error response from underlying Google API, if available. + # Output only. Original error response from underlying Google API, if + # available. class TerraformError include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1233,7 +1234,7 @@ class LockInfo # @!attribute [rw] annotations # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Arbitrary key-value metadata storage e.g. to help client tools - # identifiy preview during automation. See + # identify preview during automation. See # https://google.aip.dev/148#annotations for details on format and size # limitations. class Preview @@ -1571,14 +1572,14 @@ class GetTerraformVersionRequest # 'projects/\\{project_id}/locations/\\{location}'. # @!attribute [rw] page_size # @return [::Integer] - # Optional. When requesting a page of resources, 'page_size' specifies number - # of resources to return. If unspecified, at most 500 will be returned. The - # maximum value is 1000. + # Optional. When requesting a page of terraform versions, 'page_size' + # specifies number of terraform versions to return. If unspecified, at most + # 500 will be returned. The maximum value is 1000. # @!attribute [rw] page_token # @return [::String] # Optional. Token returned by previous call to 'ListTerraformVersions' which # specifies the position in the list from where to continue listing the - # resources. + # terraform versions. # @!attribute [rw] filter # @return [::String] # Optional. Lists the TerraformVersions that match the filter expression. A @@ -1651,6 +1652,286 @@ module State end end + # Terraform info of a ResourceChange. + # @!attribute [r] address + # @return [::String] + # Output only. TF resource address that uniquely identifies the resource. + # @!attribute [r] type + # @return [::String] + # Output only. TF resource type. + # @!attribute [r] resource_name + # @return [::String] + # Output only. TF resource name. + # @!attribute [r] provider + # @return [::String] + # Output only. TF resource provider. + # @!attribute [r] actions + # @return [::Array<::String>] + # Output only. TF resource actions. + class ResourceChangeTerraformInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A resource change represents a change to a resource in the state file. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the resource change. + # Format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceChanges/\\{resource_change}'. + # @!attribute [r] terraform_info + # @return [::Google::Cloud::ConfigService::V1::ResourceChangeTerraformInfo] + # Output only. Terraform info of the resource change. + # @!attribute [r] intent + # @return [::Google::Cloud::ConfigService::V1::ResourceChange::Intent] + # Output only. The intent of the resource change. + # @!attribute [r] property_changes + # @return [::Array<::Google::Cloud::ConfigService::V1::PropertyChange>] + # Output only. The property changes of the resource change. + class ResourceChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible intent of the resource change. + module Intent + # The default value. + INTENT_UNSPECIFIED = 0 + + # The resource will be created. + CREATE = 1 + + # The resource will be updated. + UPDATE = 2 + + # The resource will be deleted. + DELETE = 3 + + # The resource will be recreated. + RECREATE = 4 + + # The resource will be untouched. + UNCHANGED = 5 + end + end + + # A property change represents a change to a property in the state file. + # @!attribute [r] path + # @return [::String] + # Output only. The path of the property change. + # @!attribute [r] before_sensitive_paths + # @return [::Array<::String>] + # Output only. The paths of sensitive fields in `before`. Paths are relative + # to `path`. + # @!attribute [r] before + # @return [::Google::Protobuf::Value] + # Output only. Representations of the object value before the actions. + # @!attribute [r] after_sensitive_paths + # @return [::Array<::String>] + # Output only. The paths of sensitive fields in `after`. Paths are relative + # to `path`. + # @!attribute [r] after + # @return [::Google::Protobuf::Value] + # Output only. Representations of the object value after the actions. + class PropertyChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListResourceChanges method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent in whose context the ResourceChanges are listed. The + # parent value is in the format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a page of resource changes, 'page_size' specifies + # number of resource changes to return. If unspecified, at most 500 will be + # returned. The maximum value is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to 'ListResourceChanges' which + # specifies the position in the list from where to continue listing the + # resource changes. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists the resource changes that match the filter expression. A + # filter expression filters the resource changes listed in the response. The + # expression must be of the form '\\{field} \\{operator} \\{value}' where + # operators: '<', '>', + # '<=', + # '>=', + # '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + # roughly synonymous with equality). \\{field} can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = + # "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to use to sort the list. + class ListResourceChangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to a 'ListResourceChanges' call. Contains a list of + # ResourceChanges. + # @!attribute [rw] resource_changes + # @return [::Array<::Google::Cloud::ConfigService::V1::ResourceChange>] + # List of ResourceChanges. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # 'ListResourceChanges' method. The value of an empty string means that + # there are no more resources to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListResourceChangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetResourceChange method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the resource change to retrieve. + # Format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceChanges/\\{resource_change}'. + class GetResourceChangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Terraform info of a ResourceChange. + # @!attribute [r] address + # @return [::String] + # Output only. The address of the drifted resource. + # @!attribute [r] type + # @return [::String] + # Output only. The type of the drifted resource. + # @!attribute [r] resource_name + # @return [::String] + # Output only. TF resource name. + # @!attribute [r] provider + # @return [::String] + # Output only. The provider of the drifted resource. + class ResourceDriftTerraformInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A resource drift represents a drift to a resource in the state file. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the resource drift. + # Format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceDrifts/\\{resource_drift}'. + # @!attribute [r] terraform_info + # @return [::Google::Cloud::ConfigService::V1::ResourceDriftTerraformInfo] + # Output only. Terraform info of the resource drift. + # @!attribute [r] property_drifts + # @return [::Array<::Google::Cloud::ConfigService::V1::PropertyDrift>] + # Output only. The property drifts of the resource drift. + class ResourceDrift + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A property drift represents a drift to a property in the state file. + # @!attribute [r] path + # @return [::String] + # Output only. The path of the property drift. + # @!attribute [r] before_sensitive_paths + # @return [::Array<::String>] + # Output only. The paths of sensitive fields in `before`. Paths are relative + # to `path`. + # @!attribute [r] before + # @return [::Google::Protobuf::Value] + # Output only. Representations of the object value before the actions. + # @!attribute [r] after_sensitive_paths + # @return [::Array<::String>] + # Output only. The paths of sensitive fields in `after`. Paths are relative + # to `path`. + # @!attribute [r] after + # @return [::Google::Protobuf::Value] + # Output only. Representations of the object value after the actions. + class PropertyDrift + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListResourceDrifts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent in whose context the ResourceDrifts are listed. The + # parent value is in the format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a page of resource drifts, 'page_size' specifies + # number of resource drifts to return. If unspecified, at most 500 will be + # returned. The maximum value is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to 'ListResourceDrifts' which + # specifies the position in the list from where to continue listing the + # resource drifts. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists the resource drifts that match the filter expression. A + # filter expression filters the resource drifts listed in the response. The + # expression must be of the form '\\{field} \\{operator} \\{value}' where + # operators: '<', '>', + # '<=', + # '>=', + # '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + # roughly synonymous with equality). \\{field} can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = + # "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to use to sort the list. + class ListResourceDriftsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to a 'ListResourceDrifts' call. Contains a list of ResourceDrifts. + # @!attribute [rw] resource_drifts + # @return [::Array<::Google::Cloud::ConfigService::V1::ResourceDrift>] + # List of ResourceDrifts. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # 'ListResourceDrifts' method. The value of an empty string means that + # there are no more resources to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListResourceDriftsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetResourceDrift method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the resource drift to retrieve. + # Format: + # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceDrifts/\\{resource_drift}'. + class GetResourceDriftRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Enum values to control quota checks for resources in terraform # configuration files. module QuotaValidation diff --git a/google-cloud-config_service-v1/snippets/config/get_resource_change.rb b/google-cloud-config_service-v1/snippets/config/get_resource_change.rb new file mode 100644 index 000000000000..a8d377281acf --- /dev/null +++ b/google-cloud-config_service-v1/snippets/config/get_resource_change.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 inframanager_v1_generated_Config_GetResourceChange_sync] +require "google/cloud/config_service/v1" + +## +# Snippet for the get_resource_change call in the Config 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::ConfigService::V1::Config::Client#get_resource_change. +# +def get_resource_change + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigService::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigService::V1::GetResourceChangeRequest.new + + # Call the get_resource_change method. + result = client.get_resource_change request + + # The returned object is of type Google::Cloud::ConfigService::V1::ResourceChange. + p result +end +# [END inframanager_v1_generated_Config_GetResourceChange_sync] diff --git a/google-cloud-config_service-v1/snippets/config/get_resource_drift.rb b/google-cloud-config_service-v1/snippets/config/get_resource_drift.rb new file mode 100644 index 000000000000..d6a33f617912 --- /dev/null +++ b/google-cloud-config_service-v1/snippets/config/get_resource_drift.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 inframanager_v1_generated_Config_GetResourceDrift_sync] +require "google/cloud/config_service/v1" + +## +# Snippet for the get_resource_drift call in the Config 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::ConfigService::V1::Config::Client#get_resource_drift. +# +def get_resource_drift + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigService::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigService::V1::GetResourceDriftRequest.new + + # Call the get_resource_drift method. + result = client.get_resource_drift request + + # The returned object is of type Google::Cloud::ConfigService::V1::ResourceDrift. + p result +end +# [END inframanager_v1_generated_Config_GetResourceDrift_sync] diff --git a/google-cloud-config_service-v1/snippets/config/list_resource_changes.rb b/google-cloud-config_service-v1/snippets/config/list_resource_changes.rb new file mode 100644 index 000000000000..4af716812c43 --- /dev/null +++ b/google-cloud-config_service-v1/snippets/config/list_resource_changes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 inframanager_v1_generated_Config_ListResourceChanges_sync] +require "google/cloud/config_service/v1" + +## +# Snippet for the list_resource_changes call in the Config 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::ConfigService::V1::Config::Client#list_resource_changes. +# +def list_resource_changes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigService::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new + + # Call the list_resource_changes method. + result = client.list_resource_changes 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::ConfigService::V1::ResourceChange. + p item + end +end +# [END inframanager_v1_generated_Config_ListResourceChanges_sync] diff --git a/google-cloud-config_service-v1/snippets/config/list_resource_drifts.rb b/google-cloud-config_service-v1/snippets/config/list_resource_drifts.rb new file mode 100644 index 000000000000..438910e4d186 --- /dev/null +++ b/google-cloud-config_service-v1/snippets/config/list_resource_drifts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 inframanager_v1_generated_Config_ListResourceDrifts_sync] +require "google/cloud/config_service/v1" + +## +# Snippet for the list_resource_drifts call in the Config 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::ConfigService::V1::Config::Client#list_resource_drifts. +# +def list_resource_drifts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigService::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new + + # Call the list_resource_drifts method. + result = client.list_resource_drifts 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::ConfigService::V1::ResourceDrift. + p item + end +end +# [END inframanager_v1_generated_Config_ListResourceDrifts_sync] diff --git a/google-cloud-config_service-v1/snippets/snippet_metadata_google.cloud.config.v1.json b/google-cloud-config_service-v1/snippets/snippet_metadata_google.cloud.config.v1.json index c74b999e174d..715ace6e0a9a 100644 --- a/google-cloud-config_service-v1/snippets/snippet_metadata_google.cloud.config.v1.json +++ b/google-cloud-config_service-v1/snippets/snippet_metadata_google.cloud.config.v1.json @@ -930,6 +930,166 @@ "type": "FULL" } ] + }, + { + "region_tag": "inframanager_v1_generated_Config_ListResourceChanges_sync", + "title": "Snippet for the list_resource_changes call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigService::V1::Config::Client#list_resource_changes.", + "file": "config/list_resource_changes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_changes", + "full_name": "::Google::Cloud::ConfigService::V1::Config::Client#list_resource_changes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigService::V1::ListResourceChangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigService::V1::ListResourceChangesResponse", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::ConfigService::V1::Config::Client" + }, + "method": { + "short_name": "ListResourceChanges", + "full_name": "google.cloud.config.v1.Config.ListResourceChanges", + "service": { + "short_name": "Config", + "full_name": "google.cloud.config.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "inframanager_v1_generated_Config_GetResourceChange_sync", + "title": "Snippet for the get_resource_change call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigService::V1::Config::Client#get_resource_change.", + "file": "config/get_resource_change.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_resource_change", + "full_name": "::Google::Cloud::ConfigService::V1::Config::Client#get_resource_change", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigService::V1::GetResourceChangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigService::V1::ResourceChange", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::ConfigService::V1::Config::Client" + }, + "method": { + "short_name": "GetResourceChange", + "full_name": "google.cloud.config.v1.Config.GetResourceChange", + "service": { + "short_name": "Config", + "full_name": "google.cloud.config.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "inframanager_v1_generated_Config_ListResourceDrifts_sync", + "title": "Snippet for the list_resource_drifts call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigService::V1::Config::Client#list_resource_drifts.", + "file": "config/list_resource_drifts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_drifts", + "full_name": "::Google::Cloud::ConfigService::V1::Config::Client#list_resource_drifts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigService::V1::ListResourceDriftsResponse", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::ConfigService::V1::Config::Client" + }, + "method": { + "short_name": "ListResourceDrifts", + "full_name": "google.cloud.config.v1.Config.ListResourceDrifts", + "service": { + "short_name": "Config", + "full_name": "google.cloud.config.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "inframanager_v1_generated_Config_GetResourceDrift_sync", + "title": "Snippet for the get_resource_drift call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigService::V1::Config::Client#get_resource_drift.", + "file": "config/get_resource_drift.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_resource_drift", + "full_name": "::Google::Cloud::ConfigService::V1::Config::Client#get_resource_drift", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigService::V1::GetResourceDriftRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigService::V1::ResourceDrift", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::ConfigService::V1::Config::Client" + }, + "method": { + "short_name": "GetResourceDrift", + "full_name": "google.cloud.config.v1.Config.GetResourceDrift", + "service": { + "short_name": "Config", + "full_name": "google.cloud.config.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_paths_test.rb b/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_paths_test.rb index f82fb09dfa55..1310eaba0451 100644 --- a/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_paths_test.rb +++ b/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_paths_test.rb @@ -89,6 +89,30 @@ def test_resource_path end end + def test_resource_change_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigService::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.resource_change_path project: "value0", location: "value1", preview: "value2", resource_change: "value3" + assert_equal "projects/value0/locations/value1/previews/value2/resourceChanges/value3", path + end + end + + def test_resource_drift_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigService::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.resource_drift_path project: "value0", location: "value1", preview: "value2", resource_drift: "value3" + assert_equal "projects/value0/locations/value1/previews/value2/resourceDrifts/value3", path + end + end + def test_revision_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_rest_test.rb b/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_rest_test.rb index d3d104deb0eb..89bff02ec454 100644 --- a/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_rest_test.rb +++ b/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_rest_test.rb @@ -1357,6 +1357,230 @@ def test_get_terraform_version end end + def test_list_resource_changes + # Create test objects. + client_result = ::Google::Cloud::ConfigService::V1::ListResourceChangesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_changes_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::ConfigService::V1::Config::Rest::ServiceStub.stub :transcode_list_resource_changes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_changes_client_stub do + # Create client + client = ::Google::Cloud::ConfigService::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_resource_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_resource_changes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_resource_changes ::Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_resource_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_resource_changes(::Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_changes_client_stub.call_count + end + end + end + + def test_get_resource_change + # Create test objects. + client_result = ::Google::Cloud::ConfigService::V1::ResourceChange.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_change_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::ConfigService::V1::Config::Rest::ServiceStub.stub :transcode_get_resource_change_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_resource_change_client_stub do + # Create client + client = ::Google::Cloud::ConfigService::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_resource_change({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_resource_change name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_resource_change ::Google::Cloud::ConfigService::V1::GetResourceChangeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_resource_change({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_resource_change(::Google::Cloud::ConfigService::V1::GetResourceChangeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_resource_change_client_stub.call_count + end + end + end + + def test_list_resource_drifts + # Create test objects. + client_result = ::Google::Cloud::ConfigService::V1::ListResourceDriftsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_drifts_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::ConfigService::V1::Config::Rest::ServiceStub.stub :transcode_list_resource_drifts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_drifts_client_stub do + # Create client + client = ::Google::Cloud::ConfigService::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_resource_drifts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_resource_drifts parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_resource_drifts ::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_resource_drifts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_resource_drifts(::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_drifts_client_stub.call_count + end + end + end + + def test_get_resource_drift + # Create test objects. + client_result = ::Google::Cloud::ConfigService::V1::ResourceDrift.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_drift_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::ConfigService::V1::Config::Rest::ServiceStub.stub :transcode_get_resource_drift_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_resource_drift_client_stub do + # Create client + client = ::Google::Cloud::ConfigService::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_resource_drift({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_resource_drift name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_resource_drift ::Google::Cloud::ConfigService::V1::GetResourceDriftRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_resource_drift({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_resource_drift(::Google::Cloud::ConfigService::V1::GetResourceDriftRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_resource_drift_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_test.rb b/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_test.rb index 9ee13579228e..e85d6db49f09 100644 --- a/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_test.rb +++ b/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_test.rb @@ -1532,6 +1532,264 @@ def test_get_terraform_version end end + def test_list_resource_changes + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigService::V1::ListResourceChangesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_changes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_changes, name + assert_kind_of ::Google::Cloud::ConfigService::V1::ListResourceChangesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_changes_client_stub do + # Create client + client = ::Google::Cloud::ConfigService::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_resource_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_resource_changes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_resource_changes ::Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_resource_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_resource_changes(::Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_resource_changes_client_stub.call_rpc_count + end + end + + def test_get_resource_change + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigService::V1::ResourceChange.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" + + get_resource_change_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_resource_change, name + assert_kind_of ::Google::Cloud::ConfigService::V1::GetResourceChangeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_resource_change_client_stub do + # Create client + client = ::Google::Cloud::ConfigService::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_resource_change({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_resource_change name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_resource_change ::Google::Cloud::ConfigService::V1::GetResourceChangeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_resource_change({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_resource_change(::Google::Cloud::ConfigService::V1::GetResourceChangeRequest.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, get_resource_change_client_stub.call_rpc_count + end + end + + def test_list_resource_drifts + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigService::V1::ListResourceDriftsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_drifts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_drifts, name + assert_kind_of ::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_drifts_client_stub do + # Create client + client = ::Google::Cloud::ConfigService::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_resource_drifts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_resource_drifts parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_resource_drifts ::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_resource_drifts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_resource_drifts(::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_resource_drifts_client_stub.call_rpc_count + end + end + + def test_get_resource_drift + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigService::V1::ResourceDrift.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" + + get_resource_drift_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_resource_drift, name + assert_kind_of ::Google::Cloud::ConfigService::V1::GetResourceDriftRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_resource_drift_client_stub do + # Create client + client = ::Google::Cloud::ConfigService::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_resource_drift({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_resource_drift name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_resource_drift ::Google::Cloud::ConfigService::V1::GetResourceDriftRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_resource_drift({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_resource_drift(::Google::Cloud::ConfigService::V1::GetResourceDriftRequest.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, get_resource_drift_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From 6c2916d58d3dd679dfe836260ee8fb2b9b919301 Mon Sep 17 00:00:00 2001 From: Viacheslav Rostovtsev <58152857+viacheslav-rostovtsev@users.noreply.github.com> Date: Mon, 14 Jul 2025 18:00:27 -0700 Subject: [PATCH 201/457] feat: query explanation features for Cloud Datastore (#30588) --- .../datastore/aggregate_query_test.rb | 10 +- .../acceptance/datastore/explain_test.rb | 78 +++++++++++++ .../lib/google/cloud/datastore/dataset.rb | 61 +++++++++- .../cloud/datastore/dataset/query_results.rb | 64 +++++++++-- .../cloud/datastore/read_only_transaction.rb | 54 ++++++++- .../lib/google/cloud/datastore/service.rb | 10 +- .../lib/google/cloud/datastore/transaction.rb | 53 ++++++++- .../google/cloud/datastore/dataset_test.rb | 40 +++++-- .../cloud/datastore/query_results/all_test.rb | 8 +- .../query_results/all_with_explain_test.rb | 104 ++++++++++++++++++ .../query_results/all_with_more_test.rb | 4 +- .../query_results/all_with_offset_test.rb | 4 +- .../cloud/datastore/query_results_test.rb | 8 +- .../datastore/read_only_transaction_test.rb | 4 +- .../cloud/datastore/transaction_test.rb | 2 +- 15 files changed, 454 insertions(+), 50 deletions(-) create mode 100644 google-cloud-datastore/acceptance/datastore/explain_test.rb create mode 100644 google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_explain_test.rb diff --git a/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb b/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb index 00c1707cc4d8..1d26249092c8 100644 --- a/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb +++ b/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb @@ -135,10 +135,10 @@ it "returns count on filter with and without read time" do read_time = Time.now - sleep(1) - + sleep(0.5) arya["alive"] = false dataset.transaction { |tx| tx.save arya } + sleep(0.5) query = Google::Cloud::Datastore.new .query("Character") @@ -355,8 +355,9 @@ it "returns sum on filter with and without read time" do read_time = Time.now - sleep(1) + sleep(0.5) dataset.transaction { |tx| tx.delete george } + sleep(0.5) query = Google::Cloud::Datastore.new .query("Character") @@ -555,8 +556,9 @@ it "returns average on filter with and without read time" do read_time = Time.now - sleep(1) + sleep(0.5) dataset.transaction { |tx| tx.delete george } + sleep(0.5) query = Google::Cloud::Datastore.new .query("Character") diff --git a/google-cloud-datastore/acceptance/datastore/explain_test.rb b/google-cloud-datastore/acceptance/datastore/explain_test.rb new file mode 100644 index 000000000000..02df9b548a31 --- /dev/null +++ b/google-cloud-datastore/acceptance/datastore/explain_test.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "datastore_helper" + +describe "Datastore Query Explain", :datastore do + let(:prefix) { "gcloud-explain-#{SecureRandom.hex 4}" } + let(:kind) { "ExplainTask" } + let(:tasks) do + 3.times.map do |i| + dataset.entity "#{prefix}-#{kind}", "#{prefix}-task-#{i}" do |t| + t["description"] = "explain task #{i}" + t["done"] = false + end + end + end + + before do + dataset.save(*tasks) + # Ensure the entities are created + try_with_backoff "getting tasks" do + entities = dataset.find_all tasks.map(&:key) + raise "not all tasks created" if entities.count != tasks.count + end + end + + after do + dataset.delete(*tasks) + end + + it "returns explain_metrics when analyze is true" do + query = dataset.query "#{prefix}-#{kind}" + results = dataset.run query, explain_options: { analyze: true } + + all_results = [] + loop do + results.each { |r| all_results << r } + break unless results.next? + results = results.next + end + + _(all_results.count).must_equal tasks.count + _(results.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(results.explain_metrics.plan_summary).wont_be_nil + _(results.explain_metrics.execution_stats.results_returned).must_equal tasks.count + end + + it "does not return execution stats when analyze is false" do + query = dataset.query "#{prefix}-#{kind}" + results = dataset.run query, explain_options: { analyze: false } + + all_results = [] + loop do + results.each { |r| all_results << r } + break unless results.next? + results = results.next + end + + # If `analyze: false` is passed, the `run` returns no results, just a plan summary + _(all_results.count).must_equal 0 + _(results.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(results.explain_metrics.plan_summary).wont_be_nil + _(results.explain_metrics.execution_stats).must_be :nil? + end +end diff --git a/google-cloud-datastore/lib/google/cloud/datastore/dataset.rb b/google-cloud-datastore/lib/google/cloud/datastore/dataset.rb index a8b1fe581983..2a7807c4f6e7 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/dataset.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/dataset.rb @@ -416,7 +416,11 @@ def find_all *keys, consistency: nil, read_time: nil # Datastore](https://cloud.google.com/datastore/docs/articles/balancing-strong-and-eventual-consistency-with-google-cloud-datastore/#h.tf76fya5nqk8) # for more information. # @param [Time] read_time Reads entities as they were at the given time. - # This may not be older than 270 seconds. Optional + # This may not be older than 270 seconds. Optional. + # @param [Hash, Google::Cloud::Datastore::V1::ExplainOptions] explain_options The options for query explanation. + # Provide this argument to enable explain metrics. If this argument is left unset, + # the results will not include explain metrics. + # See {Google::Cloud::Datastore::V1::ExplainOptions} for details. Optional. # # @return [Google::Cloud::Datastore::Dataset::QueryResults] # @@ -467,16 +471,65 @@ def find_all *keys, consistency: nil, read_time: nil # done: false # tasks = datastore.run gql_query, namespace: "example-ns" # - def run query, namespace: nil, consistency: nil, read_time: nil + # @example Run the query with explain options to get query plan and execution statistics. + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # query = datastore.query("Task") + # results = datastore.run query, explain_options: { analyze: true } + # + # # The explain_metrics are available on the results object only after + # # all results have been retrieved. You must iterate through all + # # pages of results to get the metrics. + # all_tasks = [] + # loop do + # results.each { |task| all_tasks << task } + # break unless results.next? + # results = results.next + # end + # + # # The `results` object now holds the last page of results, + # # and contains the explain_metrics. + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Results returned: #{stats.results_returned}" + # puts "Read operations: #{stats.read_operations}" + # end + # + # @example Run the query with explain options using a `Google::Cloud::Datastore::V1::ExplainOptions` object. + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # query = datastore.query("Task") + # explain_options = Google::Cloud::Datastore::V1::ExplainOptions.new + # results = datastore.run query, explain_options: explain_options + # + # # You must iterate through all pages of results to get the metrics. + # loop do + # break unless results.next? + # results = results.next + # end + # + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Read operations: #{stats.read_operations}" + # end + # + def run query, namespace: nil, consistency: nil, read_time: nil, explain_options: nil ensure_service! unless query.is_a?(Query) || query.is_a?(GqlQuery) raise ArgumentError, "Cannot run a #{query.class} object." end check_consistency! consistency + query_res = service.run_query query.to_grpc, namespace, - consistency: consistency, read_time: read_time + consistency: consistency, read_time: read_time, + explain_options: explain_options + QueryResults.from_grpc query_res, service, namespace, - query.to_grpc.dup, read_time + query.to_grpc.dup, read_time, explain_options end alias run_query run diff --git a/google-cloud-datastore/lib/google/cloud/datastore/dataset/query_results.rb b/google-cloud-datastore/lib/google/cloud/datastore/dataset/query_results.rb index dbbc771b0e94..1d91d1392238 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/dataset/query_results.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/dataset/query_results.rb @@ -70,6 +70,7 @@ class QueryResults < DelegateClass(::Array) # * `:MORE_RESULTS_AFTER_LIMIT` # * `:MORE_RESULTS_AFTER_CURSOR` # * `:NO_MORE_RESULTS` + # @return [Symbol] attr_reader :more_results ## @@ -83,20 +84,45 @@ class QueryResults < DelegateClass(::Array) # is valid for all preceding batches. # This value will not be set for eventually consistent queries in Cloud # Datastore. + # @return [Google::Protobuf::Timestamp] attr_reader :batch_read_time + # Query explain metrics. This is only present when the + # [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + # is provided, and it is sent only once with or after the last QueryResults batch. + # + # To retrieve metrics, iterate over all QueryResults (e.g. with `next`). The explain_metrics + # field will be set on final QueryResults object. + # + # @return [Google::Cloud::Datastore::V1::ExplainMetrics, nil] + attr_reader :explain_metrics + ## # Time at which the entities are being read. This would not be # older than 270 seconds. + # + # This is a copy of the input parameter supplied to the {Dataset#run} function. + # + # @return [Time, nil] attr_reader :read_time + ## + # The options for query explanation. + # + # This is a copy of the input parameter supplied to the {Dataset#run} function. + # + # @return [Google::Cloud::Datastore::V1::ExplainOptions, nil] + attr_reader :explain_options + ## # @private attr_accessor :service, :namespace, :cursors, :query ## # @private - attr_writer :end_cursor, :more_results + attr_writer :end_cursor, :more_results, :explain_metrics, :read_time, :batch_read_time, :explain_options + + ## ## # Convenience method for determining if the `more_results` value @@ -153,6 +179,8 @@ def next? not_finished? end + # rubocop:disable Metrics/AbcSize + ## # Retrieve the next page of results. # @@ -180,10 +208,12 @@ def next # Reduce the limit by the number of entities returned in the current batch query.limit.value -= count end - query_res = service.run_query query, namespace, read_time: read_time - self.class.from_grpc query_res, service, namespace, query, read_time + query_res = service.run_query query, namespace, read_time: read_time, explain_options: explain_options + self.class.from_grpc query_res, service, namespace, query, read_time, explain_options end + # rubocop:enable Metrics/AbcSize + ## # Retrieve the {Cursor} for the provided result. # @@ -375,27 +405,39 @@ def all_with_cursor request_limit: nil, &block end end + # rubocop:disable Metrics/AbcSize + ## # @private New Dataset::QueryResults from a # Google::Dataset::V1::RunQueryResponse object. - def self.from_grpc query_res, service, namespace, query, read_time = nil - r, c = Array(query_res.batch.entity_results).map do |result| - [Entity.from_grpc(result.entity), Cursor.from_grpc(result.cursor)] - end.transpose + def self.from_grpc query_res, service, namespace, query, read_time = nil, explain_options = nil + if query_res.batch + r, c = Array(query_res.batch.entity_results).map do |result| + [Entity.from_grpc(result.entity), Cursor.from_grpc(result.cursor)] + end.transpose + end r ||= [] c ||= [] + + next_more_results = query_res.batch.more_results if query_res.batch + next_more_results ||= :NO_MORE_RESULTS + new(r).tap do |qr| qr.cursors = c - qr.end_cursor = Cursor.from_grpc query_res.batch.end_cursor - qr.more_results = query_res.batch.more_results + qr.explain_metrics = query_res.explain_metrics + qr.end_cursor = Cursor.from_grpc query_res.batch.end_cursor if query_res.batch + qr.more_results = next_more_results + qr.read_time = read_time + qr.batch_read_time = query_res.batch.read_time if query_res.batch + qr.explain_options = explain_options qr.service = service qr.namespace = namespace qr.query = query_res.query || query - qr.instance_variable_set :@read_time, read_time - qr.instance_variable_set :@batch_read_time, query_res.batch.read_time end end + # rubocop:enable Metrics/AbcSize + protected ## diff --git a/google-cloud-datastore/lib/google/cloud/datastore/read_only_transaction.rb b/google-cloud-datastore/lib/google/cloud/datastore/read_only_transaction.rb index 33da33470323..8693eebd6485 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/read_only_transaction.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/read_only_transaction.rb @@ -138,8 +138,11 @@ def find_all *keys # Retrieve entities specified by a Query. The query is run within the # transaction. # - # @param [Query] query The Query object with the search criteria. + # @param [Query, GqlQuery] query The query with the search criteria. # @param [String] namespace The namespace the query is to run within. + # @param [Hash, Google::Cloud::Datastore::V1::ExplainOptions] explain_options + # The options for query explanation. See {Google::Cloud::Datastore::V1::ExplainOptions} + # for details. Optional. # # @return [Google::Cloud::Datastore::Dataset::QueryResults] # @@ -154,15 +157,60 @@ def find_all *keys # tasks = tx.run query # end # - def run query, namespace: nil + # @example Run the query with explain options: + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # datastore.read_only_transaction do |tx| + # query = tx.query("Task") + # results = tx.run query, explain_options: { analyze: true } + # + # # You must iterate through all pages of results to get the metrics. + # loop do + # break unless results.next? + # results = results.next + # end + # + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Read operations: #{stats.read_operations}" + # end + # end + # + # @example Run the query with explain options using a `Google::Cloud::Datastore::V1::ExplainOptions` object. + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # datastore.read_only_transaction do |tx| + # query = tx.query("Task") + # explain_options = Google::Cloud::Datastore::V1::ExplainOptions.new + # results = tx.run query, explain_options: explain_options + # + # # You must iterate through all pages of results to get the metrics. + # loop do + # break unless results.next? + # results = results.next + # end + # + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Read operations: #{stats.read_operations}" + # end + # end + # + def run query, namespace: nil, explain_options: nil ensure_service! unless query.is_a?(Query) || query.is_a?(GqlQuery) raise ArgumentError, "Cannot run a #{query.class} object." end query_res = service.run_query query.to_grpc, namespace, + explain_options: explain_options, transaction: @id + Dataset::QueryResults.from_grpc query_res, service, namespace, - query.to_grpc.dup + query.to_grpc.dup, nil, explain_options end alias run_query run diff --git a/google-cloud-datastore/lib/google/cloud/datastore/service.rb b/google-cloud-datastore/lib/google/cloud/datastore/service.rb index 367437d686a8..207bed8be868 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/service.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/service.rb @@ -70,7 +70,12 @@ def lookup *keys, consistency: nil, transaction: nil, read_time: nil end # Query for entities. - def run_query query, namespace = nil, consistency: nil, transaction: nil, read_time: nil + def run_query query, namespace = nil, consistency: nil, transaction: nil, read_time: nil, explain_options: nil + if explain_options + explain_options = ::Gapic::Protobuf.coerce(explain_options, + to: ::Google::Cloud::Datastore::V1::ExplainOptions) + end + gql_query = nil if query.is_a? Google::Cloud::Datastore::V1::GqlQuery gql_query = query @@ -88,7 +93,8 @@ def run_query query, namespace = nil, consistency: nil, transaction: nil, read_t partition_id: partition_id, read_options: read_options, query: query, - gql_query: gql_query + gql_query: gql_query, + explain_options: explain_options end ## Query for aggregates diff --git a/google-cloud-datastore/lib/google/cloud/datastore/transaction.rb b/google-cloud-datastore/lib/google/cloud/datastore/transaction.rb index c7e7646d1524..4bdbf9fb8aaa 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/transaction.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/transaction.rb @@ -225,8 +225,11 @@ def find_all *keys # Retrieve entities specified by a Query. The query is run within the # transaction. # - # @param [Query] query The Query object with the search criteria. + # @param [Query, GqlQuery] query The query with the search criteria. # @param [String] namespace The namespace the query is to run within. + # @param [Hash, Google::Cloud::Datastore::V1::ExplainOptions] explain_options + # The options for query explanation. See {Google::Cloud::Datastore::V1::ExplainOptions} + # for details. Optional. # # @return [Google::Cloud::Datastore::Dataset::QueryResults] # @@ -251,15 +254,59 @@ def find_all *keys # tasks = tx.run query, namespace: "example-ns" # end # - def run query, namespace: nil + # @example Run the query with explain options: + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # datastore.transaction do |tx| + # query = datastore.query("Task") + # results = tx.run query, explain_options: { analyze: true } + # + # # You must iterate through all pages of results to get the metrics. + # loop do + # break unless results.next? + # results = results.next + # end + # + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Read operations: #{stats.read_operations}" + # end + # end + # + # @example Run the query with explain options using a `Google::Cloud::Datastore::V1::ExplainOptions` object. + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # datastore.transaction do |tx| + # query = datastore.query("Task") + # explain_options = Google::Cloud::Datastore::V1::ExplainOptions.new + # results = tx.run query, explain_options: explain_options + # + # # You must iterate through all pages of results to get the metrics. + # loop do + # break unless results.next? + # results = results.next + # end + # + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Read operations: #{stats.read_operations}" + # end + # end + # + def run query, namespace: nil, explain_options: nil ensure_service! unless query.is_a?(Query) || query.is_a?(GqlQuery) raise ArgumentError, "Cannot run a #{query.class} object." end query_res = service.run_query query.to_grpc, namespace, + explain_options: explain_options, transaction: @id QueryResults.from_grpc query_res, service, namespace, - query.to_grpc.dup + query.to_grpc.dup, nil, explain_options end alias run_query run diff --git a/google-cloud-datastore/test/google/cloud/datastore/dataset_test.rb b/google-cloud-datastore/test/google/cloud/datastore/dataset_test.rb index 61f6a70fe77c..b9e52243d84d 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/dataset_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/dataset_test.rb @@ -34,6 +34,11 @@ ) ) end + let(:run_query_res_with_explain) do + run_query_res.dup.tap do |response| + response.explain_metrics = Google::Cloud::Datastore::V1::ExplainMetrics.new + end + end let(:begin_transaction_response) do Google::Cloud::Datastore::V1::BeginTransactionResponse.new.tap do |response| response.transaction = "giterdone" @@ -782,7 +787,7 @@ end it "run will fulfill a query on the secondary dataset" do - secondary_dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: database_sec + secondary_dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: database_sec, explain_options: nil entities = secondary_dataset.run query _(entities.count).must_equal 2 @@ -812,7 +817,7 @@ end it "run will fulfill a query" do - dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database, explain_options: nil entities = dataset.run query _(entities.count).must_equal 2 @@ -870,7 +875,7 @@ end it "run_query will fulfill a query" do - dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database, explain_options: nil entities = dataset.run_query query _(entities.count).must_equal 2 @@ -900,7 +905,7 @@ it "run_query will fulfill a query with a namespace" do partition_id = Google::Cloud::Datastore::V1::PartitionId.new(namespace_id: "foobar") - dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: partition_id, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: partition_id, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database, explain_options: nil entities = dataset.run_query query, namespace: "foobar" _(entities.count).must_equal 2 @@ -929,7 +934,7 @@ end it "run will fulfill a gql query" do - dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: nil, gql_query: gql_query_grpc, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: nil, gql_query: gql_query_grpc, database_id: default_database, explain_options: nil gql = dataset.gql "SELECT * FROM Task" entities = dataset.run gql @@ -961,7 +966,7 @@ it "run will fulfill a gql query with a namespace" do partition_id = Google::Cloud::Datastore::V1::PartitionId.new(namespace_id: "foobar") - dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: partition_id, read_options: nil, query: nil, gql_query: gql_query_grpc, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: partition_id, read_options: nil, query: nil, gql_query: gql_query_grpc, database_id: default_database, explain_options: nil gql = dataset.gql "SELECT * FROM Task" entities = dataset.run gql, namespace: "foobar" @@ -992,7 +997,7 @@ end it "run_query will fulfill a gql query" do - dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: nil, gql_query: gql_query_grpc, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: nil, query: nil, gql_query: gql_query_grpc, database_id: default_database, explain_options: nil gql = dataset.gql "SELECT * FROM Task" entities = dataset.run_query gql @@ -1024,7 +1029,7 @@ it "run_query will fulfill a gql query with a namespace" do partition_id = Google::Cloud::Datastore::V1::PartitionId.new(namespace_id: "foobar") - dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: partition_id, read_options: nil, query: nil, gql_query: gql_query_grpc, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: partition_id, read_options: nil, query: nil, gql_query: gql_query_grpc, database_id: default_database, explain_options: nil gql = dataset.gql "SELECT * FROM Task" entities = dataset.run_query gql, namespace: "foobar" @@ -1054,6 +1059,25 @@ refute entities.no_more? end + it "run will fulfill a query with explain_options" do + explain_options = { analyze: true } + explain_options_grpc = Google::Cloud::Datastore::V1::ExplainOptions.new analyze: true + + dataset.service.mocked_service.expect :run_query, run_query_res_with_explain, + project_id: project, + partition_id: nil, + read_options: nil, + query: query.to_grpc, + gql_query: nil, + database_id: default_database, + explain_options: explain_options_grpc + + entities = dataset.run query, explain_options: explain_options + _(entities.count).must_equal 2 + _(entities.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(entities.explain_options).must_equal explain_options + end + it "run will raise when given an unknown argument" do expect do entities = dataset.run 123 diff --git a/google-cloud-datastore/test/google/cloud/datastore/query_results/all_test.rb b/google-cloud-datastore/test/google/cloud/datastore/query_results/all_test.rb index 349a99c872c6..dc9a19832e17 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/query_results/all_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/query_results/all_test.rb @@ -59,8 +59,8 @@ before do dataset.service.mocked_service = Minitest::Mock.new - dataset.service.mocked_service.expect :run_query, first_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: first_run_query, gql_query: nil, database_id: default_database - dataset.service.mocked_service.expect :run_query, next_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: next_run_query, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, first_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: first_run_query, gql_query: nil, database_id: default_database, explain_options: nil + dataset.service.mocked_service.expect :run_query, next_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: next_run_query, gql_query: nil, database_id: default_database, explain_options: nil end after do @@ -133,8 +133,8 @@ next_run_query_res_dup = next_run_query_res.dup next_run_query_res_dup.batch.read_time = read_time dataset.service.mocked_service = Minitest::Mock.new - dataset.service.mocked_service.expect :run_query, first_run_query_res, project_id: project, partition_id: nil, database_id: default_database, read_options: read_options, query: first_run_query, gql_query: nil - dataset.service.mocked_service.expect :run_query, next_run_query_res, project_id: project, partition_id: nil, database_id: default_database, read_options: read_options, query: next_run_query, gql_query: nil + dataset.service.mocked_service.expect :run_query, first_run_query_res, project_id: project, partition_id: nil, database_id: default_database, read_options: read_options, query: first_run_query, gql_query: nil, explain_options: nil + dataset.service.mocked_service.expect :run_query, next_run_query_res, project_id: project, partition_id: nil, database_id: default_database, read_options: read_options, query: next_run_query, gql_query: nil, explain_options: nil first_entities = dataset.run dataset.query("Task"), read_time: read_time _(first_entities.count).must_equal 25 diff --git a/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_explain_test.rb b/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_explain_test.rb new file mode 100644 index 000000000000..10f5a91619e5 --- /dev/null +++ b/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_explain_test.rb @@ -0,0 +1,104 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "helper" + +describe Google::Cloud::Datastore::Dataset, :all_with_explain, :mock_datastore do + let(:explain_options) { { analyze: true } } + let(:query_1) { Google::Cloud::Datastore::Query.new.kind("User").to_grpc } + let(:run_query_res_1) do + run_query_res_entities_1 = 2.times.map do + Google::Cloud::Datastore::V1::EntityResult.new( + entity: Google::Cloud::Datastore::V1::Entity.new( + key: Google::Cloud::Datastore::V1::Key.new( + partition_id: Google::Cloud::Datastore::V1::PartitionId.new(project_id: project), + path: [Google::Cloud::Datastore::V1::Key::PathElement.new(kind: "User")] + ) + ) + ) + end + Google::Cloud::Datastore::V1::RunQueryResponse.new( + batch: Google::Cloud::Datastore::V1::QueryResultBatch.new( + entity_results: run_query_res_entities_1, + more_results: :NOT_FINISHED, + end_cursor: "second-page-cursor".force_encoding("ASCII-8BIT") + ) + ) + end + let(:query_2) do + Google::Cloud::Datastore::Query.new.kind("User").start( + Google::Cloud::Datastore::Cursor.from_grpc("second-page-cursor") + ).to_grpc + end + let(:run_query_res_2) do + run_query_res_entities_2 = 2.times.map do + Google::Cloud::Datastore::V1::EntityResult.new( + entity: Google::Cloud::Datastore::V1::Entity.new( + key: Google::Cloud::Datastore::V1::Key.new( + partition_id: Google::Cloud::Datastore::V1::PartitionId.new(project_id: project), + path: [Google::Cloud::Datastore::V1::Key::PathElement.new(kind: "User")] + ) + ) + ) + end + Google::Cloud::Datastore::V1::RunQueryResponse.new( + batch: Google::Cloud::Datastore::V1::QueryResultBatch.new( + entity_results: run_query_res_entities_2, + more_results: :NO_MORE_RESULTS, + end_cursor: nil + ), + explain_metrics: Google::Cloud::Datastore::V1::ExplainMetrics.new( + plan_summary: Google::Cloud::Datastore::V1::PlanSummary.new( + indexes_used: [] + ), + execution_stats: Google::Cloud::Datastore::V1::ExecutionStats.new( + results_returned: 4, + execution_duration: { "seconds" => 0, "nanos" => 20_000_000 }, + read_operations: 4 + ) + ) + ) + end + + before do + dataset.service.mocked_service = Minitest::Mock.new + dataset.service.mocked_service.expect :run_query, run_query_res_1, + project_id: project, + partition_id: nil, + read_options: nil, + query: query_1, + gql_query: nil, + database_id: default_database, + explain_options: Google::Cloud::Datastore::V1::ExplainOptions.new(analyze: true) + + dataset.service.mocked_service.expect :run_query, run_query_res_2, + project_id: project, + partition_id: nil, + read_options: nil, + query: query_2, + gql_query: nil, + database_id: default_database, + explain_options: Google::Cloud::Datastore::V1::ExplainOptions.new(analyze: true) + end + + after do + dataset.service.mocked_service.verify + end + + it "keeps explain_options for subsequent API calls" do + results_1 = dataset.run dataset.query("User"), explain_options: explain_options + results_2 = results_1.next + _(results_2.explain_metrics).wont_be :nil? + end +end diff --git a/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_more_test.rb b/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_more_test.rb index 73ae6c518c0d..689a1d6e8a1d 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_more_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_more_test.rb @@ -60,8 +60,8 @@ before do dataset.service.mocked_service = Minitest::Mock.new - dataset.service.mocked_service.expect :run_query, first_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: first_run_query, gql_query: nil, database_id: default_database - dataset.service.mocked_service.expect :run_query, next_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: next_run_query, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, first_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: first_run_query, gql_query: nil, database_id: default_database, explain_options: nil + dataset.service.mocked_service.expect :run_query, next_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: next_run_query, gql_query: nil, database_id: default_database, explain_options: nil end after do diff --git a/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_offset_test.rb b/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_offset_test.rb index 2445c0451bf4..40cfe7cc0301 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_offset_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/query_results/all_with_offset_test.rb @@ -60,8 +60,8 @@ before do dataset.service.mocked_service = Minitest::Mock.new - dataset.service.mocked_service.expect :run_query, first_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: first_run_query, gql_query: nil, database_id: default_database - dataset.service.mocked_service.expect :run_query, next_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: next_run_query, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, first_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: first_run_query, gql_query: nil, database_id: default_database, explain_options: nil + dataset.service.mocked_service.expect :run_query, next_run_query_res, project_id: project, partition_id: nil, read_options: nil, query: next_run_query, gql_query: nil, database_id: default_database, explain_options: nil end after do diff --git a/google-cloud-datastore/test/google/cloud/datastore/query_results_test.rb b/google-cloud-datastore/test/google/cloud/datastore/query_results_test.rb index 2a7b15de4e5b..8598313b9c29 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/query_results_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/query_results_test.rb @@ -69,7 +69,7 @@ it "has more_results not_finished" do query = Google::Cloud::Datastore::Query.new.kind("User") - dataset.service.mocked_service.expect :run_query, run_query_res_not_finished, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res_not_finished, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database, explain_options: nil entities = dataset.run query _(entities.count).must_equal 2 @@ -98,7 +98,7 @@ end it "has more_results more_after_limit" do - dataset.service.mocked_service.expect :run_query, run_query_res_more_after_limit, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res_more_after_limit, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database, explain_options: nil entities = dataset.run query _(entities.count).must_equal 2 @@ -127,7 +127,7 @@ end it "has more_results more_after_cursor" do - dataset.service.mocked_service.expect :run_query, run_query_res_more_after_cursor, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res_more_after_cursor, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database, explain_options: nil entities = dataset.run query _(entities.count).must_equal 2 @@ -156,7 +156,7 @@ end it "has more_results no_more" do - dataset.service.mocked_service.expect :run_query, run_query_res_no_more, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database + dataset.service.mocked_service.expect :run_query, run_query_res_no_more, project_id: project, partition_id: nil, read_options: nil, query: query.to_grpc, gql_query: nil, database_id: default_database, explain_options: nil entities = dataset.run query _(entities.count).must_equal 2 diff --git a/google-cloud-datastore/test/google/cloud/datastore/read_only_transaction_test.rb b/google-cloud-datastore/test/google/cloud/datastore/read_only_transaction_test.rb index dd9be76ca28c..4c5fea8d27f3 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/read_only_transaction_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/read_only_transaction_test.rb @@ -155,7 +155,7 @@ it "run will fulfill a query" do query_grpc = Google::Cloud::Datastore::Query.new.kind("User").to_grpc - transaction.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: read_options, query: query_grpc, gql_query: nil, database_id: default_database + transaction.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: read_options, query: query_grpc, gql_query: nil, database_id: default_database, explain_options: nil query = Google::Cloud::Datastore::Query.new.kind("User") entities = transaction.run query @@ -173,7 +173,7 @@ end it "run will fulfill a gql query" do - transaction.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: read_options, query: nil, gql_query: gql_query_grpc, database_id: default_database + transaction.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: read_options, query: nil, gql_query: gql_query_grpc, database_id: default_database, explain_options: nil gql = transaction.gql "SELECT * FROM Task" entities = transaction.run gql diff --git a/google-cloud-datastore/test/google/cloud/datastore/transaction_test.rb b/google-cloud-datastore/test/google/cloud/datastore/transaction_test.rb index 47002fab1536..b09f3224baec 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/transaction_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/transaction_test.rb @@ -364,7 +364,7 @@ it "run will fulfill a query" do query_grpc = Google::Cloud::Datastore::Query.new.kind("User").to_grpc read_options = Google::Cloud::Datastore::V1::ReadOptions.new(transaction: tx_id) - transaction.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: read_options, query: query_grpc, gql_query: nil, database_id: default_database + transaction.service.mocked_service.expect :run_query, run_query_res, project_id: project, partition_id: nil, read_options: read_options, query: query_grpc, gql_query: nil, database_id: default_database, explain_options: nil query = Google::Cloud::Datastore::Query.new.kind("User") entities = transaction.run query From 418a4f1d293bcfbfc437e2d54411159fd89e2256 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 18:13:33 -0700 Subject: [PATCH 202/457] feat(merchant-reviews-v1beta): Added is_verified_purchase and is_incentivized_review to product review attributes (#30621) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 781457438 Source-Link: https://github.com/googleapis/googleapis/commit/d60f969a2b193fa22cc3e993e2c4e14d38535574 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eac475d7c4f6b31109a0d85f756d3b9ac3818c54 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJldmlld3MtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJlYWM0NzVkN2M0ZjZiMzExMDlhMGQ4NWY3NTZkM2I5YWMzODE4YzU0In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../merchant/reviews/v1beta/merchantreviews_common_pb.rb | 2 +- .../merchant/reviews/v1beta/merchantreviews_pb.rb | 2 +- .../merchant/reviews/v1beta/productreviews_common_pb.rb | 2 +- .../shopping/merchant/reviews/v1beta/merchantreviews.rb | 2 +- .../merchant/reviews/v1beta/merchantreviews_common.rb | 2 +- .../merchant/reviews/v1beta/productreviews_common.rb | 9 ++++++++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb index db5ec6f85f02..5816fcc2e2af 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb @@ -9,7 +9,7 @@ require 'google/shopping/type/types_pb' -descriptor_data = "\nDgoogle/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa5\x08\n\x18MerchantReviewAttributes\x12\x1d\n\x0bmerchant_id\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\'\n\x15merchant_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1f\n\rmerchant_link\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12&\n\x14merchant_rating_link\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nmin_rating\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x18\n\x06rating\x18\x07 \x01(\x01\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x17\n\x05title\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\t \x01(\tB\x03\xe0\x41\x02H\x08\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\n \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12#\n\x11reviewer_username\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0cis_anonymous\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12w\n\x11\x63ollection_method\x18\r \x01(\x0e\x32R.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes.CollectionMethodB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x39\n\x0breview_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02H\r\x88\x01\x01\x12!\n\x0freview_language\x18\x0f \x01(\tB\x03\xe0\x41\x02H\x0e\x88\x01\x01\x12 \n\x0ereview_country\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0f\x88\x01\x01\"y\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x18\n\x14MERCHANT_UNSOLICITED\x10\x01\x12\x11\n\rPOINT_OF_SALE\x10\x02\x12\x15\n\x11\x41\x46TER_FULFILLMENT\x10\x03\x42\x0e\n\x0c_merchant_idB\x18\n\x16_merchant_display_nameB\x10\n\x0e_merchant_linkB\x17\n\x15_merchant_rating_linkB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\x08\n\x06_titleB\n\n\x08_contentB\x0e\n\x0c_reviewer_idB\x14\n\x12_reviewer_usernameB\x0f\n\r_is_anonymousB\x14\n\x12_collection_methodB\x0e\n\x0c_review_timeB\x12\n\x10_review_languageB\x11\n\x0f_review_country\"\xd8\x07\n\x14MerchantReviewStatus\x12\x80\x01\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32].google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewDestinationStatusB\x03\xe0\x41\x03\x12z\n\x11item_level_issues\x18\x04 \x03(\x0b\x32Z.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a~\n\x1fMerchantReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcf\x03\n\x1cMerchantReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12z\n\x08severity\x18\x02 \x01(\x0e\x32\x63.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x9a\x02\n+com.google.shopping.merchant.reviews.v1betaB\x1aMerchantReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" +descriptor_data = "\nDgoogle/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa5\x08\n\x18MerchantReviewAttributes\x12\x1d\n\x0bmerchant_id\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\'\n\x15merchant_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1f\n\rmerchant_link\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12&\n\x14merchant_rating_link\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nmin_rating\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x18\n\x06rating\x18\x07 \x01(\x01\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x17\n\x05title\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\t \x01(\tB\x03\xe0\x41\x02H\x08\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\n \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12#\n\x11reviewer_username\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0cis_anonymous\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12w\n\x11\x63ollection_method\x18\r \x01(\x0e\x32R.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes.CollectionMethodB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x39\n\x0breview_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02H\r\x88\x01\x01\x12!\n\x0freview_language\x18\x0f \x01(\tB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x12 \n\x0ereview_country\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0f\x88\x01\x01\"y\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x18\n\x14MERCHANT_UNSOLICITED\x10\x01\x12\x11\n\rPOINT_OF_SALE\x10\x02\x12\x15\n\x11\x41\x46TER_FULFILLMENT\x10\x03\x42\x0e\n\x0c_merchant_idB\x18\n\x16_merchant_display_nameB\x10\n\x0e_merchant_linkB\x17\n\x15_merchant_rating_linkB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\x08\n\x06_titleB\n\n\x08_contentB\x0e\n\x0c_reviewer_idB\x14\n\x12_reviewer_usernameB\x0f\n\r_is_anonymousB\x14\n\x12_collection_methodB\x0e\n\x0c_review_timeB\x12\n\x10_review_languageB\x11\n\x0f_review_country\"\xd8\x07\n\x14MerchantReviewStatus\x12\x80\x01\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32].google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewDestinationStatusB\x03\xe0\x41\x03\x12z\n\x11item_level_issues\x18\x04 \x03(\x0b\x32Z.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a~\n\x1fMerchantReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcf\x03\n\x1cMerchantReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12z\n\x08severity\x18\x02 \x01(\x0e\x32\x63.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x9a\x02\n+com.google.shopping.merchant.reviews.v1betaB\x1aMerchantReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb index 213075d74b92..2171a6ba247e 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb @@ -13,7 +13,7 @@ require 'google/shopping/type/types_pb' -descriptor_data = "\n=google/shopping/merchant/reviews/v1beta/merchantreviews.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x44google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x1a google/shopping/type/types.proto\"[\n\x18GetMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"^\n\x1b\x44\x65leteMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"\x90\x01\n\x1aListMerchantReviewsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/MerchantReview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1bInsertMerchantReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0fmerchant_review\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x1bListMerchantReviewsResponse\x12Q\n\x10merchant_reviews\x18\x01 \x03(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe1\x03\n\x0eMerchantReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1f\n\x12merchant_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\nattributes\x18\x03 \x01(\x0b\x32\x41.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16merchant_review_status\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reviews.v1beta.MerchantReviewStatusB\x03\xe0\x41\x03:z\xea\x41w\n)merchantapi.googleapis.com/MerchantReview\x12)accounts/{account}/merchantReviews/{name}*\x0fmerchantReviews2\x0emerchantReview2\xc8\x07\n\x16MerchantReviewsService\x12\xd3\x01\n\x11GetMerchantReview\x12\x41.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x12\xe6\x01\n\x13ListMerchantReviews\x12\x43.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest\x1a\x44.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{parent=accounts/*}/merchantReviews\x12\xea\x01\n\x14InsertMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"S\x82\xd3\xe4\x93\x02M\":/reviews/v1beta/{parent=accounts/*}/merchantReviews:insert:\x0fmerchant_review\x12\xb8\x01\n\x14\x44\x65leteMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcf\x02\n+com.google.shopping.merchant.reviews.v1betaB\x14MerchantReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" +descriptor_data = "\n=google/shopping/merchant/reviews/v1beta/merchantreviews.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x44google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x1a google/shopping/type/types.proto\"[\n\x18GetMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"^\n\x1b\x44\x65leteMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"\x90\x01\n\x1aListMerchantReviewsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/MerchantReview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1bInsertMerchantReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0fmerchant_review\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x1bListMerchantReviewsResponse\x12Q\n\x10merchant_reviews\x18\x01 \x03(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe1\x03\n\x0eMerchantReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1f\n\x12merchant_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\nattributes\x18\x03 \x01(\x0b\x32\x41.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16merchant_review_status\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reviews.v1beta.MerchantReviewStatusB\x03\xe0\x41\x03:z\xea\x41w\n)merchantapi.googleapis.com/MerchantReview\x12)accounts/{account}/merchantReviews/{name}*\x0fmerchantReviews2\x0emerchantReview2\xc8\x07\n\x16MerchantReviewsService\x12\xd3\x01\n\x11GetMerchantReview\x12\x41.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x12\xe6\x01\n\x13ListMerchantReviews\x12\x43.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest\x1a\x44.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{parent=accounts/*}/merchantReviews\x12\xea\x01\n\x14InsertMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"S\x82\xd3\xe4\x93\x02M\":/reviews/v1beta/{parent=accounts/*}/merchantReviews:insert:\x0fmerchant_review\x12\xb8\x01\n\x14\x44\x65leteMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcf\x02\n+com.google.shopping.merchant.reviews.v1betaB\x14MerchantReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb index 15a99b4113b6..e903476f4479 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb @@ -9,7 +9,7 @@ require 'google/shopping/type/types_pb' -descriptor_data = "\nCgoogle/shopping/merchant/reviews/v1beta/productreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xac\x0c\n\x17ProductReviewAttributes\x12!\n\x0f\x61ggregator_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12 \n\x0esubclient_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0epublisher_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12#\n\x11publisher_favicon\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\'\n\x15reviewer_is_anonymous\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12#\n\x11reviewer_username\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12!\n\x0freview_language\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12 \n\x0ereview_country\x18\t \x01(\tB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x34\n\x0breview_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x17\n\x05title\x18\x0b \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\x0c \x01(\tB\x03\xe0\x41\x02H\n\x88\x01\x01\x12\x11\n\x04pros\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x63ons\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x65\n\x0breview_link\x18\x0f \x01(\x0b\x32K.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLinkB\x03\xe0\x41\x01\x12!\n\x14reviewer_image_links\x18\x10 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\nmin_rating\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x12 \x01(\x03\x42\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x18\n\x06rating\x18\x13 \x01(\x01\x42\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x1a\n\rproduct_names\x18\x14 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rproduct_links\x18\x15 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x61sins\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05gtins\x18\x17 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04mpns\x18\x18 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04skus\x18\x19 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x62rands\x18\x1a \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x07is_spam\x18\x1b \x01(\x08\x42\x03\xe0\x41\x01H\x0e\x88\x01\x01\x12q\n\x11\x63ollection_method\x18\x1c \x01(\x0e\x32Q.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.CollectionMethodB\x03\xe0\x41\x01\x12\x1b\n\x0etransaction_id\x18\x1d \x01(\tB\x03\xe0\x41\x01\x1a\xbc\x01\n\nReviewLink\x12\x63\n\x04type\x18\x01 \x01(\x0e\x32P.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLink.TypeB\x03\xe0\x41\x01\x12\x11\n\x04link\x18\x02 \x01(\tB\x03\xe0\x41\x01\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSINGLETON\x10\x01\x12\t\n\x05GROUP\x10\x02\"\\\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x0f\n\x0bUNSOLICITED\x10\x01\x12\x14\n\x10POST_FULFILLMENT\x10\x02\x42\x12\n\x10_aggregator_nameB\x11\n\x0f_subclient_nameB\x11\n\x0f_publisher_nameB\x14\n\x12_publisher_faviconB\x0e\n\x0c_reviewer_idB\x18\n\x16_reviewer_is_anonymousB\x14\n\x12_reviewer_usernameB\x12\n\x10_review_languageB\x11\n\x0f_review_countryB\x08\n\x06_titleB\n\n\x08_contentB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\n\n\x08_is_spam\"\xce\x07\n\x13ProductReviewStatus\x12~\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32[.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewDestinationStatusB\x03\xe0\x41\x03\x12x\n\x11item_level_issues\x18\x04 \x03(\x0b\x32X.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a}\n\x1eProductReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcc\x03\n\x1bProductReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12x\n\x08severity\x18\x02 \x01(\x0e\x32\x61.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x99\x02\n+com.google.shopping.merchant.reviews.v1betaB\x19ProductReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" +descriptor_data = "\nCgoogle/shopping/merchant/reviews/v1beta/productreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xb2\r\n\x17ProductReviewAttributes\x12!\n\x0f\x61ggregator_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12 \n\x0esubclient_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0epublisher_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12#\n\x11publisher_favicon\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\'\n\x15reviewer_is_anonymous\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12#\n\x11reviewer_username\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12!\n\x0freview_language\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12 \n\x0ereview_country\x18\t \x01(\tB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x34\n\x0breview_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x17\n\x05title\x18\x0b \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\x0c \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x11\n\x04pros\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x63ons\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x65\n\x0breview_link\x18\x0f \x01(\x0b\x32K.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLinkB\x03\xe0\x41\x01\x12!\n\x14reviewer_image_links\x18\x10 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\nmin_rating\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x12 \x01(\x03\x42\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x18\n\x06rating\x18\x13 \x01(\x01\x42\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x1a\n\rproduct_names\x18\x14 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rproduct_links\x18\x15 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x61sins\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05gtins\x18\x17 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04mpns\x18\x18 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04skus\x18\x19 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x62rands\x18\x1a \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x07is_spam\x18\x1b \x01(\x08\x42\x03\xe0\x41\x01H\x0e\x88\x01\x01\x12&\n\x14is_verified_purchase\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12(\n\x16is_incentivized_review\x18\x1f \x01(\x08\x42\x03\xe0\x41\x01H\x10\x88\x01\x01\x12q\n\x11\x63ollection_method\x18\x1c \x01(\x0e\x32Q.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.CollectionMethodB\x03\xe0\x41\x01\x12\x1b\n\x0etransaction_id\x18\x1d \x01(\tB\x03\xe0\x41\x01\x1a\xbc\x01\n\nReviewLink\x12\x63\n\x04type\x18\x01 \x01(\x0e\x32P.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLink.TypeB\x03\xe0\x41\x01\x12\x11\n\x04link\x18\x02 \x01(\tB\x03\xe0\x41\x01\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSINGLETON\x10\x01\x12\t\n\x05GROUP\x10\x02\"\\\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x0f\n\x0bUNSOLICITED\x10\x01\x12\x14\n\x10POST_FULFILLMENT\x10\x02\x42\x12\n\x10_aggregator_nameB\x11\n\x0f_subclient_nameB\x11\n\x0f_publisher_nameB\x14\n\x12_publisher_faviconB\x0e\n\x0c_reviewer_idB\x18\n\x16_reviewer_is_anonymousB\x14\n\x12_reviewer_usernameB\x12\n\x10_review_languageB\x11\n\x0f_review_countryB\x08\n\x06_titleB\n\n\x08_contentB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\n\n\x08_is_spamB\x17\n\x15_is_verified_purchaseB\x19\n\x17_is_incentivized_review\"\xce\x07\n\x13ProductReviewStatus\x12~\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32[.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewDestinationStatusB\x03\xe0\x41\x03\x12x\n\x11item_level_issues\x18\x04 \x03(\x0b\x32X.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a}\n\x1eProductReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcc\x03\n\x1bProductReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12x\n\x08severity\x18\x02 \x01(\x0e\x32\x61.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x99\x02\n+com.google.shopping.merchant.reviews.v1betaB\x19ProductReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb index 8248847e9396..df7a60dac9eb 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb @@ -113,7 +113,7 @@ class ListMerchantReviewsResponse # Optional. A list of merchant review attributes. # @!attribute [rw] custom_attributes # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Required. A list of custom (merchant-provided) attributes. It can also be + # Optional. A list of custom (merchant-provided) attributes. It can also be # used for submitting any attribute of the data specification in its generic # form (for example, # `{ "name": "size type", "value": "regular" }`). diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb index 2cb2d3b49629..3424e3f87b74 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb @@ -79,7 +79,7 @@ module V1beta # Required. The timestamp indicating when the review was written. # @!attribute [rw] review_language # @return [::String] - # Required. The language of the review defined by BCP-47 language code. + # Optional. The language of the review defined by BCP-47 language code. # @!attribute [rw] review_country # @return [::String] # Optional. The country where the reviewer made the order defined by ISO diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb index b116b81d58ff..c9ed13111b1d 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb @@ -76,7 +76,8 @@ module V1beta # Optional. The title of the review. # @!attribute [rw] content # @return [::String] - # Required. The content of the review. + # Optional. The content of the review. If empty, the content might still get + # populated from pros and cons. # @!attribute [rw] pros # @return [::Array<::String>] # Optional. Contains the advantages based on the opinion of the reviewer. @@ -135,6 +136,12 @@ module V1beta # @return [::Boolean] # Optional. Indicates whether the review is marked as spam in the publisher's # system. + # @!attribute [rw] is_verified_purchase + # @return [::Boolean] + # Optional. Indicates whether the reviewer's purchase is verified. + # @!attribute [rw] is_incentivized_review + # @return [::Boolean] + # Optional. Indicates whether the review is incentivized. # @!attribute [rw] collection_method # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes::CollectionMethod] # Optional. The method used to collect the review. From e4259d6b9bbbd8ff2f7cc9a32bac5305b02d4c83 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 18:25:24 -0700 Subject: [PATCH 203/457] feat(merchant-products-v1beta): Renamed "gtin" field to "gtins" and deprecated the old field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(merchant-products-v1beta): Added maximum_retail_price field (applicable to India only) docs(merchant-products-v1beta): Deprecated tax information fields PiperOrigin-RevId: 781460799 Source-Link: https://github.com/googleapis/googleapis/commit/29839aab3c3eef13c1e5434f7b2860f083cee92d Source-Link: https://github.com/googleapis/googleapis-gen/commit/938ca688b2f2962ce8ba458a9fb33ebaa6e215b5 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiOTM4Y2E2ODhiMmYyOTYyY2U4YmE0NThhOWZiMzNlYmFhNmUyMTViNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1beta/product_inputs_service/client.rb | 32 ++-- .../product_inputs_service/rest/client.rb | 32 ++-- .../products/v1beta/productinputs_pb.rb | 2 +- .../v1beta/productinputs_services_pb.rb | 11 +- .../products/v1beta/products_common_pb.rb | 2 +- .../v1beta/products_service/client.rb | 2 +- .../v1beta/products_service/rest/client.rb | 2 +- .../merchant/products/v1beta/productinputs.rb | 59 ++++--- .../merchant/products/v1beta/products.rb | 8 +- .../products/v1beta/products_common.rb | 144 ++++++++++++------ 10 files changed, 197 insertions(+), 97 deletions(-) diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb index bb9d5610adb6..e5657bc56602 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb @@ -191,9 +191,14 @@ def logger # Service calls ## - # Uploads a product input to your Merchant Center account. If an input - # with the same contentLanguage, offerId, and dataSource already exists, - # this method replaces that entry. + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/overview#upload-product-input). You + # must have a products data source to be able to insert a product. The unique + # identifier of the data source is passed as a query parameter in the request + # URL. + # + # If an input with the same contentLanguage, offerId, and dataSource already + # exists, this method replaces that entry. # # After inserting, updating, or deleting a product input, it may take several # minutes before the processed product can be retrieved. @@ -215,17 +220,20 @@ def logger # # @param parent [::String] # Required. The account where this product will be inserted. - # Format: accounts/\\{account} + # Format: `accounts/{account}` # @param product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] # Required. The product input to insert. # @param data_source [::String] # Required. The primary or supplemental product data source name. If the # product already exists and data source provided is different, then the - # product will be moved to a new data source. + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). # # Only API data sources are supported. # - # Format: `accounts/{account}/dataSources/{datasource}`. + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Shopping::Merchant::Products::V1beta::ProductInput] @@ -337,7 +345,8 @@ def insert_product_input request, options = nil # # Only API data sources are supported. # - # Format: `accounts/{account}/dataSources/{datasource}`. + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Shopping::Merchant::Products::V1beta::ProductInput] @@ -426,15 +435,16 @@ def update_product_input request, options = nil # # @param name [::String] # Required. The name of the product input resource to delete. - # Format: accounts/\\{account}/productInputs/\\{product} + # Format: `accounts/{account}/productInputs/{product}` # where the last section `product` consists of 4 parts: - # channel~content_language~feed_label~offer_id + # `channel~content_language~feed_label~offer_id` # example for product name is - # "accounts/123/productInputs/online~en~US~sku123" + # `accounts/123/productInputs/online~en~US~sku123`. # @param data_source [::String] # Required. The primary or supplemental data source from which the product # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb index 28a2a15626ef..a7b07a6632a7 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb @@ -184,9 +184,14 @@ def logger # Service calls ## - # Uploads a product input to your Merchant Center account. If an input - # with the same contentLanguage, offerId, and dataSource already exists, - # this method replaces that entry. + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/overview#upload-product-input). You + # must have a products data source to be able to insert a product. The unique + # identifier of the data source is passed as a query parameter in the request + # URL. + # + # If an input with the same contentLanguage, offerId, and dataSource already + # exists, this method replaces that entry. # # After inserting, updating, or deleting a product input, it may take several # minutes before the processed product can be retrieved. @@ -208,17 +213,20 @@ def logger # # @param parent [::String] # Required. The account where this product will be inserted. - # Format: accounts/\\{account} + # Format: `accounts/{account}` # @param product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] # Required. The product input to insert. # @param data_source [::String] # Required. The primary or supplemental product data source name. If the # product already exists and data source provided is different, then the - # product will be moved to a new data source. + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). # # Only API data sources are supported. # - # Format: `accounts/{account}/dataSources/{datasource}`. + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -323,7 +331,8 @@ def insert_product_input request, options = nil # # Only API data sources are supported. # - # Format: `accounts/{account}/dataSources/{datasource}`. + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -405,15 +414,16 @@ def update_product_input request, options = nil # # @param name [::String] # Required. The name of the product input resource to delete. - # Format: accounts/\\{account}/productInputs/\\{product} + # Format: `accounts/{account}/productInputs/{product}` # where the last section `product` consists of 4 parts: - # channel~content_language~feed_label~offer_id + # `channel~content_language~feed_label~offer_id` # example for product name is - # "accounts/123/productInputs/online~en~US~sku123" + # `accounts/123/productInputs/online~en~US~sku123`. # @param data_source [::String] # Required. The primary or supplemental data source from which the product # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb index 308c6e81b758..3b4be860bd86 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb @@ -14,7 +14,7 @@ require 'google/shopping/type/types_pb' -descriptor_data = "\ngoogle/shopping/merchant/products/v1beta/products_common.proto\x1a google/shopping/type/types.proto\"\x97\x04\n\x0cProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07product\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12?\n\x07\x63hannel\x18\x03 \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumB\x03\xe0\x41\x05\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\nfeed_label\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x0eversion_number\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12M\n\nattributes\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.products.v1beta.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01:z\xea\x41w\n\'merchantapi.googleapis.com/ProductInput\x12/accounts/{account}/productInputs/{productinput}*\rproductInputs2\x0cproductInputB\x11\n\x0f_version_number\"\xc5\x01\n\x19InsertProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12R\n\rproduct_input\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.products.v1beta.ProductInputB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x19UpdateProductInputRequest\x12R\n\rproduct_input\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.products.v1beta.ProductInputB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"t\n\x19\x44\x65leteProductInputRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/ProductInput\x12\x18\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\x85\x06\n\x14ProductInputsService\x12\xe3\x01\n\x12InsertProductInput\x12\x43.google.shopping.merchant.products.v1beta.InsertProductInputRequest\x1a\x36.google.shopping.merchant.products.v1beta.ProductInput\"P\x82\xd3\xe4\x93\x02J\"9/products/v1beta/{parent=accounts/*}/productInputs:insert:\rproduct_input\x12\x86\x02\n\x12UpdateProductInput\x12\x43.google.shopping.merchant.products.v1beta.UpdateProductInputRequest\x1a\x36.google.shopping.merchant.products.v1beta.ProductInput\"s\xda\x41\x19product_input,update_mask\x82\xd3\xe4\x93\x02Q2@/products/v1beta/{product_input.name=accounts/*/productInputs/*}:\rproduct_input\x12\xb4\x01\n\x12\x44\x65leteProductInput\x12\x43.google.shopping.merchant.products.v1beta.DeleteProductInputRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/products/v1beta/{name=accounts/*/productInputs/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x94\x01\n,com.google.shopping.merchant.products.v1betaB\x12ProductInputsProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspbb\x06proto3" +descriptor_data = "\ngoogle/shopping/merchant/products/v1beta/products_common.proto\x1a google/shopping/type/types.proto\"\x9a\x04\n\x0cProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07product\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12?\n\x07\x63hannel\x18\x03 \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumB\x03\xe0\x41\x05\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\nfeed_label\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12#\n\x0eversion_number\x18\x07 \x01(\x03\x42\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12M\n\nattributes\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.products.v1beta.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01:z\xea\x41w\n\'merchantapi.googleapis.com/ProductInput\x12/accounts/{account}/productInputs/{productinput}*\rproductInputs2\x0cproductInputB\x11\n\x0f_version_number\"\xc5\x01\n\x19InsertProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12R\n\rproduct_input\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.products.v1beta.ProductInputB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x19UpdateProductInputRequest\x12R\n\rproduct_input\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.products.v1beta.ProductInputB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"t\n\x19\x44\x65leteProductInputRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/ProductInput\x12\x18\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\x85\x06\n\x14ProductInputsService\x12\xe3\x01\n\x12InsertProductInput\x12\x43.google.shopping.merchant.products.v1beta.InsertProductInputRequest\x1a\x36.google.shopping.merchant.products.v1beta.ProductInput\"P\x82\xd3\xe4\x93\x02J\"9/products/v1beta/{parent=accounts/*}/productInputs:insert:\rproduct_input\x12\x86\x02\n\x12UpdateProductInput\x12\x43.google.shopping.merchant.products.v1beta.UpdateProductInputRequest\x1a\x36.google.shopping.merchant.products.v1beta.ProductInput\"s\xda\x41\x19product_input,update_mask\x82\xd3\xe4\x93\x02Q2@/products/v1beta/{product_input.name=accounts/*/productInputs/*}:\rproduct_input\x12\xb4\x01\n\x12\x44\x65leteProductInput\x12\x43.google.shopping.merchant.products.v1beta.DeleteProductInputRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/products/v1beta/{name=accounts/*/productInputs/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x94\x01\n,com.google.shopping.merchant.products.v1betaB\x12ProductInputsProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb index 043f6cf66925..7e8ffb5e5c7d 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb @@ -35,9 +35,14 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'google.shopping.merchant.products.v1beta.ProductInputsService' - # Uploads a product input to your Merchant Center account. If an input - # with the same contentLanguage, offerId, and dataSource already exists, - # this method replaces that entry. + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/overview#upload-product-input). You + # must have a products data source to be able to insert a product. The unique + # identifier of the data source is passed as a query parameter in the request + # URL. + # + # If an input with the same contentLanguage, offerId, and dataSource already + # exists, this method replaces that entry. # # After inserting, updating, or deleting a product input, it may take several # minutes before the processed product can be retrieved. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb index 3dab230baa9d..bef2119a4948 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb @@ -10,7 +10,7 @@ require 'google/type/interval_pb' -descriptor_data = "\n>google/shopping/merchant/products/v1beta/products_common.proto\x12(google.shopping.merchant.products.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\x89(\n\nAttributes\x12\x1e\n\x11identifier_exists\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12\x16\n\tis_bundle\x18\x05 \x01(\x08H\x01\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04link\x18\x08 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0bmobile_link\x18\t \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0e\x63\x61nonical_link\x18\n \x01(\tH\x06\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x07\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x33\n\x0f\x65xpiration_date\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x64isclosure_date\x18O \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\x05\x61\x64ult\x18\x11 \x01(\x08H\x08\x88\x01\x01\x12\x16\n\tage_group\x18\x12 \x01(\tH\t\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\n\x88\x01\x01\x12\x35\n\x11\x61vailability_date\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\x05\x62rand\x18\x15 \x01(\tH\x0b\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\tcondition\x18\x17 \x01(\tH\r\x88\x01\x01\x12\x13\n\x06gender\x18\x18 \x01(\tH\x0e\x88\x01\x01\x12$\n\x17google_product_category\x18\x19 \x01(\tH\x0f\x88\x01\x01\x12\x0c\n\x04gtin\x18\x1a \x03(\t\x12\x1a\n\ritem_group_id\x18\x1b \x01(\tH\x10\x88\x01\x01\x12\x15\n\x08material\x18\x1c \x01(\tH\x11\x88\x01\x01\x12\x10\n\x03mpn\x18\x1d \x01(\tH\x12\x88\x01\x01\x12\x14\n\x07pattern\x18\x1e \x01(\tH\x13\x88\x01\x01\x12*\n\x05price\x18\x1f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12J\n\x0binstallment\x18 \x01(\x0b\x32\x35.google.shopping.merchant.products.v1beta.Installment\x12U\n\x11subscription_cost\x18! \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.SubscriptionCost\x12O\n\x0eloyalty_points\x18\" \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.LoyaltyPoints\x12S\n\x10loyalty_programs\x18\x88\x01 \x03(\x0b\x32\x38.google.shopping.merchant.products.v1beta.LoyaltyProgram\x12\x15\n\rproduct_types\x18# \x03(\t\x12/\n\nsale_price\x18$ \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18% \x01(\x0b\x32\x15.google.type.Interval\x12$\n\x17sell_on_google_quantity\x18& \x01(\x03H\x14\x88\x01\x01\x12R\n\x0eproduct_height\x18w \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12R\n\x0eproduct_length\x18x \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12Q\n\rproduct_width\x18y \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12O\n\x0eproduct_weight\x18z \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductWeight\x12\x44\n\x08shipping\x18\' \x03(\x0b\x32\x32.google.shopping.merchant.products.v1beta.Shipping\x12\x61\n\x17\x66ree_shipping_threshold\x18\x87\x01 \x03(\x0b\x32?.google.shopping.merchant.products.v1beta.FreeShippingThreshold\x12Q\n\x0fshipping_weight\x18( \x01(\x0b\x32\x38.google.shopping.merchant.products.v1beta.ShippingWeight\x12T\n\x0fshipping_length\x18) \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12S\n\x0eshipping_width\x18* \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12T\n\x0fshipping_height\x18+ \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12\x1e\n\x11max_handling_time\x18, \x01(\x03H\x15\x88\x01\x01\x12\x1e\n\x11min_handling_time\x18- \x01(\x03H\x16\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18. \x01(\tH\x17\x88\x01\x01\x12\x1f\n\x12transit_time_label\x18/ \x01(\tH\x18\x88\x01\x01\x12\x11\n\x04size\x18\x30 \x01(\tH\x19\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x31 \x01(\tH\x1a\x88\x01\x01\x12\x12\n\nsize_types\x18\x32 \x03(\t\x12<\n\x05taxes\x18\x33 \x03(\x0b\x32-.google.shopping.merchant.products.v1beta.Tax\x12\x19\n\x0ctax_category\x18\x34 \x01(\tH\x1b\x88\x01\x01\x12$\n\x17\x65nergy_efficiency_class\x18\x35 \x01(\tH\x1c\x88\x01\x01\x12(\n\x1bmin_energy_efficiency_class\x18\x36 \x01(\tH\x1d\x88\x01\x01\x12(\n\x1bmax_energy_efficiency_class\x18\x37 \x01(\tH\x1e\x88\x01\x01\x12Z\n\x14unit_pricing_measure\x18\x38 \x01(\x0b\x32<.google.shopping.merchant.products.v1beta.UnitPricingMeasure\x12\x63\n\x19unit_pricing_base_measure\x18\x39 \x01(\x0b\x32@.google.shopping.merchant.products.v1beta.UnitPricingBaseMeasure\x12\x16\n\tmultipack\x18: \x01(\x03H\x1f\x88\x01\x01\x12\x19\n\x0c\x61\x64s_grouping\x18; \x01(\tH \x88\x01\x01\x12\x12\n\nads_labels\x18< \x03(\t\x12\x19\n\x0c\x61\x64s_redirect\x18= \x01(\tH!\x88\x01\x01\x12\x37\n\x12\x63ost_of_goods_sold\x18> \x01(\x0b\x32\x1b.google.shopping.type.Price\x12P\n\x0fproduct_details\x18? \x03(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductDetail\x12\x1a\n\x12product_highlights\x18@ \x03(\t\x12\x1b\n\x0e\x64isplay_ads_id\x18\x41 \x01(\tH\"\x88\x01\x01\x12\x1f\n\x17\x64isplay_ads_similar_ids\x18\x42 \x03(\t\x12\x1e\n\x11\x64isplay_ads_title\x18\x43 \x01(\tH#\x88\x01\x01\x12\x1d\n\x10\x64isplay_ads_link\x18\x44 \x01(\tH$\x88\x01\x01\x12\x1e\n\x11\x64isplay_ads_value\x18\x45 \x01(\x01H%\x88\x01\x01\x12\x15\n\rpromotion_ids\x18\x46 \x03(\t\x12\x1a\n\rpickup_method\x18P \x01(\tH&\x88\x01\x01\x12\x17\n\npickup_sla\x18Q \x01(\tH\'\x88\x01\x01\x12\x1a\n\rlink_template\x18R \x01(\tH(\x88\x01\x01\x12!\n\x14mobile_link_template\x18S \x01(\tH)\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18G \x01(\tH*\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18H \x01(\tH+\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18I \x01(\tH,\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18J \x01(\tH-\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18K \x01(\tH.\x88\x01\x01\x12\x1d\n\x15included_destinations\x18L \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18M \x03(\t\x12\'\n\x1fshopping_ads_excluded_countries\x18N \x03(\t\x12\x1f\n\x12\x65xternal_seller_id\x18\x01 \x01(\tH/\x88\x01\x01\x12\x12\n\x05pause\x18\r \x01(\tH0\x88\x01\x01\x12\x1d\n\x15lifestyle_image_links\x18\x0e \x03(\t\x12u\n\"cloud_export_additional_properties\x18T \x03(\x0b\x32I.google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties\x12 \n\x12virtual_model_link\x18\x82\x01 \x01(\tH1\x88\x01\x01\x12O\n\x0e\x63\x65rtifications\x18{ \x03(\x0b\x32\x37.google.shopping.merchant.products.v1beta.Certification\x12`\n\x10structured_title\x18\x84\x01 \x01(\x0b\x32@.google.shopping.merchant.products.v1beta.ProductStructuredTitleH2\x88\x01\x01\x12l\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStructuredDescriptionH3\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.Price\x12l\n\x19sustainability_incentives\x18\x8a\x01 \x03(\x0b\x32H.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentiveB\x14\n\x12_identifier_existsB\x0c\n\n_is_bundleB\x08\n\x06_titleB\x0e\n\x0c_descriptionB\x07\n\x05_linkB\x0e\n\x0c_mobile_linkB\x11\n\x0f_canonical_linkB\r\n\x0b_image_linkB\x08\n\x06_adultB\x0c\n\n_age_groupB\x0f\n\r_availabilityB\x08\n\x06_brandB\x08\n\x06_colorB\x0c\n\n_conditionB\t\n\x07_genderB\x1a\n\x18_google_product_categoryB\x10\n\x0e_item_group_idB\x0b\n\t_materialB\x06\n\x04_mpnB\n\n\x08_patternB\x1a\n\x18_sell_on_google_quantityB\x14\n\x12_max_handling_timeB\x14\n\x12_min_handling_timeB\x11\n\x0f_shipping_labelB\x15\n\x13_transit_time_labelB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x0f\n\r_tax_categoryB\x1a\n\x18_energy_efficiency_classB\x1e\n\x1c_min_energy_efficiency_classB\x1e\n\x1c_max_energy_efficiency_classB\x0c\n\n_multipackB\x0f\n\r_ads_groupingB\x0f\n\r_ads_redirectB\x11\n\x0f_display_ads_idB\x14\n\x12_display_ads_titleB\x13\n\x11_display_ads_linkB\x14\n\x12_display_ads_valueB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x10\n\x0e_link_templateB\x17\n\x15_mobile_link_templateB\x11\n\x0f_custom_label_0B\x11\n\x0f_custom_label_1B\x11\n\x0f_custom_label_2B\x11\n\x0f_custom_label_3B\x11\n\x0f_custom_label_4B\x15\n\x13_external_seller_idB\x08\n\x06_pauseB\x15\n\x13_virtual_model_linkB\x13\n\x11_structured_titleB\x19\n\x17_structured_description\"p\n\x03Tax\x12\x0c\n\x04rate\x18\x01 \x01(\x01\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x10\n\x08tax_ship\x18\x04 \x01(\x08\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x13\n\x0bpostal_code\x18\x06 \x01(\t\"-\n\x0eShippingWeight\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"0\n\x11ShippingDimension\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"5\n\x16UnitPricingBaseMeasure\x12\r\n\x05value\x18\x01 \x01(\x03\x12\x0c\n\x04unit\x18\x02 \x01(\t\"1\n\x12UnitPricingMeasure\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"\xa4\x01\n\x10SubscriptionCost\x12L\n\x06period\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.products.v1beta.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\xbb\x01\n\x0bInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x35\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x12\x18\n\x0b\x63redit_type\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_downpaymentB\x0e\n\x0c_credit_type\"B\n\rLoyaltyPoints\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cpoints_value\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\"\xc1\x03\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12?\n\x1bmember_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\x1e\n\x1c_member_price_effective_dateB\x11\n\x0f_shipping_label\"\x83\x03\n\x08Shipping\x12*\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x1b\n\x13location_group_name\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\x12\x1e\n\x11min_handling_time\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x10min_transit_time\x18\n \x01(\x03H\x02\x88\x01\x01\x12\x1d\n\x10max_transit_time\x18\x0b \x01(\x03H\x03\x88\x01\x01\x42\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x13\n\x11_min_transit_timeB\x13\n\x11_max_transit_time\"\x88\x01\n\x15\x46reeShippingThreshold\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0fprice_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x42\n\n\x08_countryB\x12\n\x10_price_threshold\"V\n\rProductDetail\x12\x14\n\x0csection_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x02 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x03 \x01(\t\"\xfb\x01\n\rCertification\x12$\n\x17\x63\x65rtification_authority\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x63\x65rtification_value\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x1a\n\x18_certification_authorityB\x15\n\x13_certification_nameB\x15\n\x13_certification_codeB\x16\n\x14_certification_value\"t\n\x16ProductStructuredTitle\x12 \n\x13\x64igital_source_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"z\n\x1cProductStructuredDescription\x12 \n\x13\x64igital_source_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"9\n\x10ProductDimension\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"6\n\rProductWeight\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xf7\x07\n\rProductStatus\x12g\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32I.google.shopping.merchant.products.v1beta.ProductStatus.DestinationStatus\x12\x61\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue\x12\x31\n\rcreation_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16google_expiration_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xc1\x01\n\x11\x44\x65stinationStatus\x12V\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x19\n\x11pending_countries\x18\x03 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x04 \x03(\t\x1a\xb0\x03\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x61\n\x08severity\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue.Severity\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12V\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x15\n\rdocumentation\x18\x08 \x01(\t\x12\x1c\n\x14\x61pplicable_countries\x18\t \x03(\t\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"\xa5\x02\n\x1f\x43loudExportAdditionalProperties\x12\x1a\n\rproperty_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ntext_value\x18\x02 \x03(\t\x12\x17\n\nbool_value\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x11\n\tint_value\x18\x04 \x03(\x03\x12\x13\n\x0b\x66loat_value\x18\x05 \x03(\x02\x12\x16\n\tmin_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12\x16\n\tmax_value\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12\x16\n\tunit_code\x18\x08 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_property_nameB\r\n\x0b_bool_valueB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0c\n\n_unit_code\"\xa1\x02\n\x1eProductSustainabilityIncentive\x12-\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x14\n\npercentage\x18\x03 \x01(\x01H\x00\x12`\n\x04type\x18\x01 \x01(\x0e\x32M.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.TypeH\x01\x88\x01\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rEV_TAX_CREDIT\x10\x01\x12\x15\n\x11\x45V_PRICE_DISCOUNT\x10\x02\x42\x07\n\x05valueB\x07\n\x05_type\"\xb4\x01\n\x12\x41utomatedDiscounts\x12\x30\n\x0bprior_price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12<\n\x17prior_price_progressive\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12.\n\tgad_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price*N\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x42\x95\x01\n,com.google.shopping.merchant.products.v1betaB\x13ProductsCommonProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspbb\x06proto3" +descriptor_data = "\n>google/shopping/merchant/products/v1beta/products_common.proto\x12(google.shopping.merchant.products.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xe1(\n\nAttributes\x12\x1e\n\x11identifier_exists\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12\x16\n\tis_bundle\x18\x05 \x01(\x08H\x01\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04link\x18\x08 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0bmobile_link\x18\t \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0e\x63\x61nonical_link\x18\n \x01(\tH\x06\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x07\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x33\n\x0f\x65xpiration_date\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x64isclosure_date\x18O \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\x05\x61\x64ult\x18\x11 \x01(\x08H\x08\x88\x01\x01\x12\x16\n\tage_group\x18\x12 \x01(\tH\t\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\n\x88\x01\x01\x12\x35\n\x11\x61vailability_date\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\x05\x62rand\x18\x15 \x01(\tH\x0b\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\tcondition\x18\x17 \x01(\tH\r\x88\x01\x01\x12\x13\n\x06gender\x18\x18 \x01(\tH\x0e\x88\x01\x01\x12$\n\x17google_product_category\x18\x19 \x01(\tH\x0f\x88\x01\x01\x12\x10\n\x04gtin\x18\x1a \x03(\tB\x02\x18\x01\x12\x0e\n\x05gtins\x18\x8c\x01 \x03(\t\x12\x1a\n\ritem_group_id\x18\x1b \x01(\tH\x10\x88\x01\x01\x12\x15\n\x08material\x18\x1c \x01(\tH\x11\x88\x01\x01\x12\x10\n\x03mpn\x18\x1d \x01(\tH\x12\x88\x01\x01\x12\x14\n\x07pattern\x18\x1e \x01(\tH\x13\x88\x01\x01\x12*\n\x05price\x18\x1f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12:\n\x14maximum_retail_price\x18\x8b\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12J\n\x0binstallment\x18 \x01(\x0b\x32\x35.google.shopping.merchant.products.v1beta.Installment\x12U\n\x11subscription_cost\x18! \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.SubscriptionCost\x12O\n\x0eloyalty_points\x18\" \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.LoyaltyPoints\x12S\n\x10loyalty_programs\x18\x88\x01 \x03(\x0b\x32\x38.google.shopping.merchant.products.v1beta.LoyaltyProgram\x12\x15\n\rproduct_types\x18# \x03(\t\x12/\n\nsale_price\x18$ \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18% \x01(\x0b\x32\x15.google.type.Interval\x12$\n\x17sell_on_google_quantity\x18& \x01(\x03H\x14\x88\x01\x01\x12R\n\x0eproduct_height\x18w \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12R\n\x0eproduct_length\x18x \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12Q\n\rproduct_width\x18y \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12O\n\x0eproduct_weight\x18z \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductWeight\x12\x44\n\x08shipping\x18\' \x03(\x0b\x32\x32.google.shopping.merchant.products.v1beta.Shipping\x12\x61\n\x17\x66ree_shipping_threshold\x18\x87\x01 \x03(\x0b\x32?.google.shopping.merchant.products.v1beta.FreeShippingThreshold\x12Q\n\x0fshipping_weight\x18( \x01(\x0b\x32\x38.google.shopping.merchant.products.v1beta.ShippingWeight\x12T\n\x0fshipping_length\x18) \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12S\n\x0eshipping_width\x18* \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12T\n\x0fshipping_height\x18+ \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12\x1e\n\x11max_handling_time\x18, \x01(\x03H\x15\x88\x01\x01\x12\x1e\n\x11min_handling_time\x18- \x01(\x03H\x16\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18. \x01(\tH\x17\x88\x01\x01\x12\x1f\n\x12transit_time_label\x18/ \x01(\tH\x18\x88\x01\x01\x12\x11\n\x04size\x18\x30 \x01(\tH\x19\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x31 \x01(\tH\x1a\x88\x01\x01\x12\x12\n\nsize_types\x18\x32 \x03(\t\x12@\n\x05taxes\x18\x33 \x03(\x0b\x32-.google.shopping.merchant.products.v1beta.TaxB\x02\x18\x01\x12\x1d\n\x0ctax_category\x18\x34 \x01(\tB\x02\x18\x01H\x1b\x88\x01\x01\x12$\n\x17\x65nergy_efficiency_class\x18\x35 \x01(\tH\x1c\x88\x01\x01\x12(\n\x1bmin_energy_efficiency_class\x18\x36 \x01(\tH\x1d\x88\x01\x01\x12(\n\x1bmax_energy_efficiency_class\x18\x37 \x01(\tH\x1e\x88\x01\x01\x12Z\n\x14unit_pricing_measure\x18\x38 \x01(\x0b\x32<.google.shopping.merchant.products.v1beta.UnitPricingMeasure\x12\x63\n\x19unit_pricing_base_measure\x18\x39 \x01(\x0b\x32@.google.shopping.merchant.products.v1beta.UnitPricingBaseMeasure\x12\x16\n\tmultipack\x18: \x01(\x03H\x1f\x88\x01\x01\x12\x19\n\x0c\x61\x64s_grouping\x18; \x01(\tH \x88\x01\x01\x12\x12\n\nads_labels\x18< \x03(\t\x12\x19\n\x0c\x61\x64s_redirect\x18= \x01(\tH!\x88\x01\x01\x12\x37\n\x12\x63ost_of_goods_sold\x18> \x01(\x0b\x32\x1b.google.shopping.type.Price\x12P\n\x0fproduct_details\x18? \x03(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductDetail\x12\x1a\n\x12product_highlights\x18@ \x03(\t\x12\x1b\n\x0e\x64isplay_ads_id\x18\x41 \x01(\tH\"\x88\x01\x01\x12\x1f\n\x17\x64isplay_ads_similar_ids\x18\x42 \x03(\t\x12\x1e\n\x11\x64isplay_ads_title\x18\x43 \x01(\tH#\x88\x01\x01\x12\x1d\n\x10\x64isplay_ads_link\x18\x44 \x01(\tH$\x88\x01\x01\x12\x1e\n\x11\x64isplay_ads_value\x18\x45 \x01(\x01H%\x88\x01\x01\x12\x15\n\rpromotion_ids\x18\x46 \x03(\t\x12\x1a\n\rpickup_method\x18P \x01(\tH&\x88\x01\x01\x12\x17\n\npickup_sla\x18Q \x01(\tH\'\x88\x01\x01\x12\x1a\n\rlink_template\x18R \x01(\tH(\x88\x01\x01\x12!\n\x14mobile_link_template\x18S \x01(\tH)\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18G \x01(\tH*\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18H \x01(\tH+\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18I \x01(\tH,\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18J \x01(\tH-\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18K \x01(\tH.\x88\x01\x01\x12\x1d\n\x15included_destinations\x18L \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18M \x03(\t\x12\'\n\x1fshopping_ads_excluded_countries\x18N \x03(\t\x12\x1f\n\x12\x65xternal_seller_id\x18\x01 \x01(\tH/\x88\x01\x01\x12\x12\n\x05pause\x18\r \x01(\tH0\x88\x01\x01\x12\x1d\n\x15lifestyle_image_links\x18\x0e \x03(\t\x12u\n\"cloud_export_additional_properties\x18T \x03(\x0b\x32I.google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties\x12 \n\x12virtual_model_link\x18\x82\x01 \x01(\tH1\x88\x01\x01\x12O\n\x0e\x63\x65rtifications\x18{ \x03(\x0b\x32\x37.google.shopping.merchant.products.v1beta.Certification\x12`\n\x10structured_title\x18\x84\x01 \x01(\x0b\x32@.google.shopping.merchant.products.v1beta.ProductStructuredTitleH2\x88\x01\x01\x12l\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStructuredDescriptionH3\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.Price\x12l\n\x19sustainability_incentives\x18\x8a\x01 \x03(\x0b\x32H.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentiveB\x14\n\x12_identifier_existsB\x0c\n\n_is_bundleB\x08\n\x06_titleB\x0e\n\x0c_descriptionB\x07\n\x05_linkB\x0e\n\x0c_mobile_linkB\x11\n\x0f_canonical_linkB\r\n\x0b_image_linkB\x08\n\x06_adultB\x0c\n\n_age_groupB\x0f\n\r_availabilityB\x08\n\x06_brandB\x08\n\x06_colorB\x0c\n\n_conditionB\t\n\x07_genderB\x1a\n\x18_google_product_categoryB\x10\n\x0e_item_group_idB\x0b\n\t_materialB\x06\n\x04_mpnB\n\n\x08_patternB\x1a\n\x18_sell_on_google_quantityB\x14\n\x12_max_handling_timeB\x14\n\x12_min_handling_timeB\x11\n\x0f_shipping_labelB\x15\n\x13_transit_time_labelB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x0f\n\r_tax_categoryB\x1a\n\x18_energy_efficiency_classB\x1e\n\x1c_min_energy_efficiency_classB\x1e\n\x1c_max_energy_efficiency_classB\x0c\n\n_multipackB\x0f\n\r_ads_groupingB\x0f\n\r_ads_redirectB\x11\n\x0f_display_ads_idB\x14\n\x12_display_ads_titleB\x13\n\x11_display_ads_linkB\x14\n\x12_display_ads_valueB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x10\n\x0e_link_templateB\x17\n\x15_mobile_link_templateB\x11\n\x0f_custom_label_0B\x11\n\x0f_custom_label_1B\x11\n\x0f_custom_label_2B\x11\n\x0f_custom_label_3B\x11\n\x0f_custom_label_4B\x15\n\x13_external_seller_idB\x08\n\x06_pauseB\x15\n\x13_virtual_model_linkB\x13\n\x11_structured_titleB\x19\n\x17_structured_description\"p\n\x03Tax\x12\x0c\n\x04rate\x18\x01 \x01(\x01\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x10\n\x08tax_ship\x18\x04 \x01(\x08\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x13\n\x0bpostal_code\x18\x06 \x01(\t\"-\n\x0eShippingWeight\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"0\n\x11ShippingDimension\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"5\n\x16UnitPricingBaseMeasure\x12\r\n\x05value\x18\x01 \x01(\x03\x12\x0c\n\x04unit\x18\x02 \x01(\t\"1\n\x12UnitPricingMeasure\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"\xa4\x01\n\x10SubscriptionCost\x12L\n\x06period\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.products.v1beta.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\xbb\x01\n\x0bInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x35\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x12\x18\n\x0b\x63redit_type\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_downpaymentB\x0e\n\x0c_credit_type\"B\n\rLoyaltyPoints\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cpoints_value\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\"\xc1\x03\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12?\n\x1bmember_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\x1e\n\x1c_member_price_effective_dateB\x11\n\x0f_shipping_label\"\x83\x03\n\x08Shipping\x12*\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x1b\n\x13location_group_name\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\x12\x1e\n\x11min_handling_time\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x10min_transit_time\x18\n \x01(\x03H\x02\x88\x01\x01\x12\x1d\n\x10max_transit_time\x18\x0b \x01(\x03H\x03\x88\x01\x01\x42\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x13\n\x11_min_transit_timeB\x13\n\x11_max_transit_time\"\x88\x01\n\x15\x46reeShippingThreshold\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0fprice_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x42\n\n\x08_countryB\x12\n\x10_price_threshold\"V\n\rProductDetail\x12\x14\n\x0csection_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x02 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x03 \x01(\t\"\xfb\x01\n\rCertification\x12$\n\x17\x63\x65rtification_authority\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x63\x65rtification_value\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x1a\n\x18_certification_authorityB\x15\n\x13_certification_nameB\x15\n\x13_certification_codeB\x16\n\x14_certification_value\"t\n\x16ProductStructuredTitle\x12 \n\x13\x64igital_source_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"z\n\x1cProductStructuredDescription\x12 \n\x13\x64igital_source_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"9\n\x10ProductDimension\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"6\n\rProductWeight\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xf7\x07\n\rProductStatus\x12g\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32I.google.shopping.merchant.products.v1beta.ProductStatus.DestinationStatus\x12\x61\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue\x12\x31\n\rcreation_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16google_expiration_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xc1\x01\n\x11\x44\x65stinationStatus\x12V\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x19\n\x11pending_countries\x18\x03 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x04 \x03(\t\x1a\xb0\x03\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x61\n\x08severity\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue.Severity\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12V\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x15\n\rdocumentation\x18\x08 \x01(\t\x12\x1c\n\x14\x61pplicable_countries\x18\t \x03(\t\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"\xa5\x02\n\x1f\x43loudExportAdditionalProperties\x12\x1a\n\rproperty_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ntext_value\x18\x02 \x03(\t\x12\x17\n\nbool_value\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x11\n\tint_value\x18\x04 \x03(\x03\x12\x13\n\x0b\x66loat_value\x18\x05 \x03(\x02\x12\x16\n\tmin_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12\x16\n\tmax_value\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12\x16\n\tunit_code\x18\x08 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_property_nameB\r\n\x0b_bool_valueB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0c\n\n_unit_code\"\xa1\x02\n\x1eProductSustainabilityIncentive\x12-\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x14\n\npercentage\x18\x03 \x01(\x01H\x00\x12`\n\x04type\x18\x01 \x01(\x0e\x32M.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.TypeH\x01\x88\x01\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rEV_TAX_CREDIT\x10\x01\x12\x15\n\x11\x45V_PRICE_DISCOUNT\x10\x02\x42\x07\n\x05valueB\x07\n\x05_type\"\xb4\x01\n\x12\x41utomatedDiscounts\x12\x30\n\x0bprior_price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12<\n\x17prior_price_progressive\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12.\n\tgad_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price*N\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x42\x95\x01\n,com.google.shopping.merchant.products.v1betaB\x13ProductsCommonProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb index 435d7bf641e6..53aea65b04d8 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb @@ -311,7 +311,7 @@ def get_product request, options = nil # @param page_size [::Integer] # The maximum number of products to return. The service may return fewer than # this value. - # The maximum value is 250; values above 250 will be coerced to 250. + # The maximum value is 1000; values above 1000 will be coerced to 1000. # If unspecified, the maximum number of products will be returned. # @param page_token [::String] # A page token, received from a previous `ListProducts` call. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb index 14a1bdb0156e..f90e912f08f7 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb @@ -297,7 +297,7 @@ def get_product request, options = nil # @param page_size [::Integer] # The maximum number of products to return. The service may return fewer than # this value. - # The maximum value is 250; values above 250 will be coerced to 250. + # The maximum value is 1000; values above 1000 will be coerced to 1000. # If unspecified, the maximum number of products will be returned. # @param page_token [::String] # A page token, received from a previous `ListProducts` call. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb index 476aabac0ece..702ae44564ea 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb @@ -26,7 +26,8 @@ module V1beta # processed product that you see in Merchant Center, in Shopping ads, or # across Google surfaces. Product inputs, rules and supplemental data source # data are combined to create the processed - # {::Google::Shopping::Merchant::Products::V1beta::Product Product}. + # {::Google::Shopping::Merchant::Products::V1beta::Product Product}. For more + # information, see [Manage products](/merchant/api/guides/products/overview). # # Required product input attributes to pass data validation checks are # primarily defined in the [Products Data @@ -41,21 +42,24 @@ module V1beta # minutes before the processed product can be retrieved. # # All fields in the product input and its sub-messages match the English name - # of their corresponding attribute in the vertical spec with [some - # exceptions](https://support.google.com/merchants/answer/7052112). + # of their corresponding attribute in the [Products Data + # Specification](https://support.google.com/merchants/answer/188494) with + # [some exceptions](https://support.google.com/merchants/answer/7052112). + # The following reference documentation lists the field names in the + # **camelCase** casing style while the Products Data Specification lists the + # names in the **snake_case** casing style. # @!attribute [rw] name # @return [::String] # Identifier. The name of the product input. - # Format: accounts/\\{account}/productInputs/\\{productinput} + # Format: `accounts/{account}/productInputs/{productinput}` # where the last section `productinput` consists of 4 parts: - # channel~content_language~feed_label~offer_id + # `channel~content_language~feed_label~offer_id` # example for product input name is - # "accounts/123/productInputs/online~en~US~sku123" + # `accounts/123/productInputs/online~en~US~sku123` # @!attribute [r] product # @return [::String] # Output only. The name of the processed product. - # Format: - # `"{product.name=accounts/{account}/products/{product}}"` + # Format: `accounts/{account}/products/{product}` # @!attribute [rw] channel # @return [::Google::Shopping::Type::Channel::ChannelEnum] # Immutable. The @@ -76,14 +80,16 @@ module V1beta # product. # @!attribute [rw] feed_label # @return [::String] - # Required. Immutable. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the product. + # Required. Immutable. The label that lets you categorize and identify your + # products. The maximum allowed characters are 20, and the supported + # characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must + # not include any spaces. For more information, see [Using feed + # labels](//support.google.com/merchants/answer/14994087). # @!attribute [rw] version_number # @return [::Integer] - # Optional. Represents the existing version (freshness) of the product, which - # can be used to preserve the right order when multiple updates are done at - # the same time. + # Optional. Immutable. Represents the existing version (freshness) of the + # product, which can be used to preserve the right order when multiple + # updates are done at the same time. # # If set, the insertion is prevented when version number is lower than # the current version number of the existing product. Re-insertion (for @@ -91,6 +97,8 @@ module V1beta # `version_number`. # # Only supported for insertions into primary data sources. + # Do not set this field for updates. + # Do not set this field for insertions into supplemental data sources. # # If the operation is prevented, the aborted exception will be # thrown. @@ -104,7 +112,7 @@ module V1beta # form (for example, # `{ "name": "size type", "value": "regular" }`). # This is useful for submitting attributes not explicitly exposed by the - # API, such as additional attributes used for Buy on Google. + # API. # Maximum allowed number of characters for each # custom attribute is 10240 (represents sum of characters for name and # value). Maximum 2500 custom attributes can be set per product, with total @@ -119,7 +127,7 @@ class ProductInput # @!attribute [rw] parent # @return [::String] # Required. The account where this product will be inserted. - # Format: accounts/\\{account} + # Format: `accounts/{account}` # @!attribute [rw] product_input # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] # Required. The product input to insert. @@ -127,11 +135,14 @@ class ProductInput # @return [::String] # Required. The primary or supplemental product data source name. If the # product already exists and data source provided is different, then the - # product will be moved to a new data source. + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). # # Only API data sources are supported. # - # Format: `accounts/{account}/dataSources/{datasource}`. + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. class InsertProductInputRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -169,7 +180,8 @@ class InsertProductInputRequest # # Only API data sources are supported. # - # Format: `accounts/{account}/dataSources/{datasource}`. + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. class UpdateProductInputRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -179,16 +191,17 @@ class UpdateProductInputRequest # @!attribute [rw] name # @return [::String] # Required. The name of the product input resource to delete. - # Format: accounts/\\{account}/productInputs/\\{product} + # Format: `accounts/{account}/productInputs/{product}` # where the last section `product` consists of 4 parts: - # channel~content_language~feed_label~offer_id + # `channel~content_language~feed_label~offer_id` # example for product name is - # "accounts/123/productInputs/online~en~US~sku123" + # `accounts/123/productInputs/online~en~US~sku123`. # @!attribute [rw] data_source # @return [::String] # Required. The primary or supplemental data source from which the product # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. class DeleteProductInputRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb index 1eb7a548a9b1..d3ca422c8207 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb @@ -63,7 +63,11 @@ module V1beta # product. # @!attribute [r] feed_label # @return [::String] - # Output only. The feed label for the product. + # Output only. The feed label lets you categorize and identify your products. + # The maximum allowed characters is 20 and the supported characters are`A-Z`, + # `0-9`, hyphen and underscore. The feed label must not include any spaces. + # For more information, see [Using feed + # labels](//support.google.com/merchants/answer/14994087) # @!attribute [r] data_source # @return [::String] # Output only. The primary data source of the product. @@ -128,7 +132,7 @@ class GetProductRequest # @return [::Integer] # The maximum number of products to return. The service may return fewer than # this value. - # The maximum value is 250; values above 250 will be coerced to 250. + # The maximum value is 1000; values above 1000 will be coerced to 1000. # If unspecified, the maximum number of products will be returned. # @!attribute [rw] page_token # @return [::String] diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb index 8c90f9764417..262a75f654dc 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb @@ -30,8 +30,9 @@ module V1beta # Defaults to true, if not provided. # @!attribute [rw] is_bundle # @return [::Boolean] - # Whether the item is a merchant-defined bundle. A bundle is a custom - # grouping of different products sold by a merchant for a single price. + # Whether the item is a business-defined sub-API. A [sub-API] + # (https://support.google.com/merchants/answer/6324449) is a custom + # grouping of different products sold by a business for a single price. # @!attribute [rw] title # @return [::String] # Title of the item. @@ -65,8 +66,9 @@ module V1beta # @return [::Google::Protobuf::Timestamp] # The date time when an offer becomes visible in search results across # Google’s YouTube surfaces, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. See [Disclosure date]( - # https://support.google.com/merchants/answer/13034208) for more information. + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # See [Disclosure date](https://support.google.com/merchants/answer/13034208) + # for more information. # @!attribute [rw] adult # @return [::Boolean] # Set to true if the item is targeted towards adults. @@ -76,23 +78,28 @@ module V1beta # the item. # @!attribute [rw] availability # @return [::String] - # Availability status of the item. + # [Availability](https://support.google.com/merchants/answer/6324448) status + # of the item. For example, "in_stock" or "out_of_stock". # @!attribute [rw] availability_date # @return [::Google::Protobuf::Timestamp] # The day a pre-ordered product becomes available for delivery, in [ISO # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. # @!attribute [rw] brand # @return [::String] - # Brand of the item. + # [Brand](https://support.google.com/merchants/answer/6324351) of the item. + # For example, "Google". # @!attribute [rw] color # @return [::String] - # Color of the item. + # [Color](https://support.google.com/merchants/answer/6324487) of the item. + # For example, "red". # @!attribute [rw] condition # @return [::String] - # Condition or state of the item. + # [Condition](https://support.google.com/merchants/answer/6324469) or state + # of the item. For example, "new" or "used". # @!attribute [rw] gender # @return [::String] - # Target gender of the item. + # Target [gender](https://support.google.com/merchants/answer/6324479) of the + # item. For example, "male" or "female". # @!attribute [rw] google_product_category # @return [::String] # Google's category of the item (see [Google product @@ -101,6 +108,15 @@ module V1beta # is currently no way to get back the auto assigned google product # categories through the API. # @!attribute [rw] gtin + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # Global Trade Item Numbers + # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the + # item. + # You can provide up to 10 GTINs. + # + # Deprecated: Use `gtins` instead. + # @!attribute [rw] gtins # @return [::Array<::String>] # Global Trade Item Numbers # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the @@ -111,7 +127,8 @@ module V1beta # Shared identifier for all variants of the same product. # @!attribute [rw] material # @return [::String] - # The material of which the item is made. + # The [material](https://support.google.com/merchants/answer/6324410) of + # which the item is made. For example, "Leather" or "Cotton". # @!attribute [rw] mpn # @return [::String] # Manufacturer Part Number @@ -119,10 +136,14 @@ module V1beta # item. # @!attribute [rw] pattern # @return [::String] - # The item's pattern (for example, polka dots). + # The item's [pattern](https://support.google.com/merchants/answer/6324483). + # For example, polka dots. # @!attribute [rw] price # @return [::Google::Shopping::Type::Price] # Price of the item. + # @!attribute [rw] maximum_retail_price + # @return [::Google::Shopping::Type::Price] + # Maximum retail price (MRP) of the item. Applicable to India only. # @!attribute [rw] installment # @return [::Google::Shopping::Merchant::Products::V1beta::Installment] # Number and amount of installments to pay for an item. @@ -141,14 +162,14 @@ module V1beta # @!attribute [rw] product_types # @return [::Array<::String>] # Categories of the item (formatted as in [product data - # specification](https://support.google.com/merchants/answer/188494#product_type)). + # specification](https://support.google.com/merchants/answer/7052112#product_category)). # @!attribute [rw] sale_price # @return [::Google::Shopping::Type::Price] # Advertised sale price of the item. # @!attribute [rw] sale_price_effective_date # @return [::Google::Type::Interval] - # Date range during which the item is on sale (see [product data - # specification](https://support.google.com/merchants/answer/188494#sale_price_effective_date)). + # Date range during which the item is on sale, see [product data + # specification](https://support.google.com/merchants/answer/7052112#price_and_availability). # @!attribute [rw] sell_on_google_quantity # @return [::Integer] # The quantity of the product that is available for selling on Google. @@ -206,22 +227,29 @@ module V1beta # @return [::String] # Size of the item. Only one value is allowed. For variants with different # sizes, insert a separate product for each size with the same - # `itemGroupId` value (see - # [https://support.google.com/merchants/answer/6324492](size definition)). + # `itemGroupId` value, see + # [Size](https://support.google.com/merchants/answer/6324492). # @!attribute [rw] size_system # @return [::String] # System in which the size is specified. Recommended for apparel items. + # For example, "US", "UK", "DE". + # For more information, see + # [Size system](https://support.google.com/merchants/answer/6324502). # @!attribute [rw] size_types # @return [::Array<::String>] # The cut of the item. It can be used to represent combined size types for - # apparel items. Maximum two of size types can be provided (see - # [https://support.google.com/merchants/answer/6324497](size type)). + # apparel items. Maximum two of size types can be provided, see + # [Size type](https://support.google.com/merchants/answer/6324497). + # For example, "petite", "plus size". # @!attribute [rw] taxes + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Tax>] # Tax information. # @!attribute [rw] tax_category + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] - # The tax category of the product. + # The [tax category](https://support.google.com/merchants/answer/7569847) of + # the product. # @!attribute [rw] energy_efficiency_class # @return [::String] # The energy efficiency class as defined in EU directive 2010/30/EU. @@ -239,11 +267,13 @@ module V1beta # The preference of the denominator of the unit price. # @!attribute [rw] multipack # @return [::Integer] - # The number of identical products in a merchant-defined multipack. + # The number of identical products in a business-defined multipack. # @!attribute [rw] ads_grouping # @return [::String] # Used to group items in an arbitrary way. Only for CPA%, discouraged - # otherwise. + # otherwise. For more information, see + # [Display ads + # attribute](https://support.google.com/merchants/answer/6069387). # @!attribute [rw] ads_labels # @return [::Array<::String>] # Similar to ads_grouping, but only works on CPC. @@ -259,13 +289,16 @@ module V1beta # Technical specification or additional product details. # @!attribute [rw] product_highlights # @return [::Array<::String>] - # Bullet points describing the most relevant highlights of a product. + # Bullet points describing the most relevant [product + # highlights](https://support.google.com/merchants/answer/9216100). # @!attribute [rw] display_ads_id # @return [::String] # An identifier for an item for dynamic remarketing campaigns. # @!attribute [rw] display_ads_similar_ids # @return [::Array<::String>] - # Advertiser-specified recommendations. + # Advertiser-specified recommendations. For more information, see + # [Display ads attribute + # specification](https://support.google.com/merchants/answer/6069387). # @!attribute [rw] display_ads_title # @return [::String] # Title of an item for dynamic remarketing campaigns. @@ -275,53 +308,78 @@ module V1beta # campaigns. # @!attribute [rw] display_ads_value # @return [::Float] - # Offer margin for dynamic remarketing campaigns. + # Offer margin for dynamic remarketing campaigns. For more information, see + # [Display ads + # attribute](https://support.google.com/merchants/answer/6069387). # @!attribute [rw] promotion_ids # @return [::Array<::String>] # The unique ID of a promotion. # @!attribute [rw] pickup_method # @return [::String] - # The pick up option for the item. + # The [pickup](https://support.google.com/merchants/answer/14634021) option + # for the item. # @!attribute [rw] pickup_sla # @return [::String] - # Item store pickup timeline. + # Item store pickup timeline. For more information, see + # [Pickup SLA](https://support.google.com/merchants/answer/14635400). # @!attribute [rw] link_template # @return [::String] - # Link template for merchant hosted local storefront. + # [Link template](https://support.google.com/merchants/answer/13871172) for + # business hosted local storefront. # @!attribute [rw] mobile_link_template # @return [::String] - # Link template for merchant hosted local storefront optimized for mobile + # [Link template](https://support.google.com/merchants/answer/13870216) for + # business hosted local storefront optimized for mobile # devices. # @!attribute [rw] custom_label_0 # @return [::String] - # Custom label 0 for custom grouping of items in a Shopping campaign. + # [Custom label 0](https://support.google.com/merchants/answer/6324473) for + # custom grouping of items in a Shopping campaign. # @!attribute [rw] custom_label_1 # @return [::String] - # Custom label 1 for custom grouping of items in a Shopping campaign. + # [Custom label 1](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. # @!attribute [rw] custom_label_2 # @return [::String] - # Custom label 2 for custom grouping of items in a Shopping campaign. + # [Custom label 2](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. # @!attribute [rw] custom_label_3 # @return [::String] - # Custom label 3 for custom grouping of items in a Shopping campaign. + # [Custom label 3](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. # @!attribute [rw] custom_label_4 # @return [::String] - # Custom label 4 for custom grouping of items in a Shopping campaign. + # [Custom label 4](https://support.google.com/merchants/answer/6324473) for + # custom grouping of items in a Shopping campaign. # @!attribute [rw] included_destinations # @return [::Array<::String>] # The list of destinations to include for this target (corresponds to # checked check boxes in Merchant Center). Default destinations are always # included unless provided in `excludedDestinations`. + # + # For more information, see + # [Included + # destination](https://support.google.com/merchants/answer/7501026). + # + # Note: We recommend setting destinations on datasources level for most use + # cases. Use this field within products to only setup exceptions. # @!attribute [rw] excluded_destinations # @return [::Array<::String>] # The list of destinations to exclude for this target (corresponds to # unchecked check boxes in Merchant Center). + # + # For more information, see + # [Excluded + # destination](https://support.google.com/merchants/answer/6324486). + # + # Note: We recommend setting destinations on datasources level for most use + # cases. Use this field within products to only setup exceptions. # @!attribute [rw] shopping_ads_excluded_countries # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) to exclude the offer from - # Shopping Ads destination. - # Countries from this list are removed from countries configured - # in data source settings. + # List of country codes [(ISO 3166-1 + # alpha-2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to exclude the + # offer from Shopping Ads destination. Countries from this list are removed + # from countries configured in data source settings. # @!attribute [rw] external_seller_id # @return [::String] # Required for multi-seller accounts. Use this attribute if you're a @@ -360,11 +418,11 @@ module V1beta # Structured description, for algorithmically (AI)-generated descriptions. # @!attribute [rw] auto_pricing_min_price # @return [::Google::Shopping::Type::Price] - # A safeguard in the "Automated Discounts" + # A safeguard in the [automated discounts] # (https://support.google.com/merchants/answer/10295759) and # "Dynamic Promotions" # (https://support.google.com/merchants/answer/13949249) projects, - # ensuring that discounts on merchants' offers do not fall below this value, + # ensuring that discounts on business offers do not fall below this value, # thereby preserving the offer's value and profitability. # @!attribute [rw] sustainability_incentives # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductSustainabilityIncentive>] @@ -516,10 +574,10 @@ class LoyaltyPoints # @!attribute [rw] program_label # @return [::String] # The label of the loyalty program. This is an internal label that uniquely - # identifies the relationship between a merchant entity and a loyalty + # identifies the relationship between a business entity and a loyalty # program entity. The label must be provided so that the system can associate - # the assets below (for example, price and points) with a merchant. The - # corresponding program must be linked to the merchant account. + # the assets below (for example, price and points) with a business. The + # corresponding program must be linked to the Merchant Center account. # @!attribute [rw] tier_label # @return [::String] # The label of the tier within the loyalty program. @@ -807,7 +865,7 @@ class DestinationStatus # How this issue affects serving of the offer. # @!attribute [rw] resolution # @return [::String] - # Whether the issue can be resolved by the merchant. + # Whether the issue can be resolved by the business. # @!attribute [rw] attribute # @return [::String] # The attribute's name, if the issue is caused by a single attribute. From 82bae40ec4fe4af8c0c70916d17fba1f4162ecc5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 18:52:22 -0700 Subject: [PATCH 204/457] docs(multi): Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method (#30624) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 781586174 Source-Link: https://github.com/googleapis/googleapis/commit/74657e8a6690b249c048f685124ee3b8473b70b4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1e25816d65c7dab1e913abf439a6b4c4f97f8ef0 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFmbG93LXYxYmV0YTMvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFzdG9yZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0tdjEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0tdjFhbHBoYTEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gtdjMvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctdjIvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUtdjEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRscC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRvY3VtZW50X2FpLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIxZTI1ODE2ZDY1YzdkYWIxZTkxM2FiZjQzOWE2YjRjNGY5N2Y4ZWYwIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRvY3VtZW50X2FpLXYxYmV0YTMvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXB1Ymxpc2hpbmctdjEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpcmVzdG9yZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmctdjMvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXB1YnN1Yi12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJ1bi12Mi8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwYW5uZXItdjEvLk93bEJvdC55YW1sIiwiaCI6IjFlMjU4MTZkNjVjN2RhYjFlOTEzYWJmNDM5YTZiNGM0Zjk3ZjhlZjAifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwZWVjaC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRyYW5zbGF0ZS12My8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpc2lvbi12MS8uT3dsQm90LnlhbWwiLCJoIjoiMWUyNTgxNmQ2NWM3ZGFiMWU5MTNhYmY0MzlhNmI0YzRmOTdmOGVmMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1beta3/templates_service/client.rb | 4 +-- .../v1beta3/templates_service/rest/client.rb | 4 +-- .../cloud/datastore/v1/datastore/client.rb | 12 ++++----- .../datastore/v1/datastore/rest/client.rb | 12 ++++----- .../cloud/datastream/v1/datastream/client.rb | 16 ++++++------ .../datastream/v1/datastream/rest/client.rb | 16 ++++++------ .../datastream/v1alpha1/datastream/client.rb | 12 ++++----- .../v1alpha1/datastream/rest/client.rb | 12 ++++----- .../cloud/dialogflow/cx/v3/agents/client.rb | 6 ++--- .../dialogflow/cx/v3/agents/rest/client.rb | 6 ++--- .../dialogflow/cx/v3/entity_types/client.rb | 8 +++--- .../cx/v3/entity_types/rest/client.rb | 8 +++--- .../cloud/dialogflow/cx/v3/flows/client.rb | 4 +-- .../dialogflow/cx/v3/flows/rest/client.rb | 4 +-- .../cloud/dialogflow/cx/v3/intents/client.rb | 8 +++--- .../dialogflow/cx/v3/intents/rest/client.rb | 8 +++--- .../dialogflow/cx/v3/test_cases/client.rb | 4 +-- .../cx/v3/test_cases/rest/client.rb | 4 +-- .../cloud/dialogflow/v2/agents/client.rb | 8 +++--- .../cloud/dialogflow/v2/agents/rest/client.rb | 8 +++--- .../dialogflow/v2/conversations/client.rb | 4 +-- .../v2/conversations/rest/client.rb | 4 +-- .../dialogflow/v2/entity_types/client.rb | 4 +-- .../dialogflow/v2/entity_types/rest/client.rb | 4 +-- .../cloud/dialogflow/v2/intents/client.rb | 4 +-- .../dialogflow/v2/intents/rest/client.rb | 4 +-- .../dialogflow/v2/participants/client.rb | 8 +++--- .../dialogflow/v2/participants/rest/client.rb | 8 +++--- .../v1/completion_service/client.rb | 10 +++---- .../v1/completion_service/rest/client.rb | 10 +++---- .../v1/data_store_service/client.rb | 4 +-- .../v1/data_store_service/rest/client.rb | 4 +-- .../v1/document_service/client.rb | 22 ++++++++-------- .../v1/document_service/rest/client.rb | 22 ++++++++-------- .../identity_mapping_store_service/client.rb | 4 +-- .../rest/client.rb | 4 +-- .../v1/user_event_service/client.rb | 6 ++--- .../v1/user_event_service/rest/client.rb | 6 ++--- .../v1beta/completion_service/client.rb | 10 +++---- .../v1beta/completion_service/rest/client.rb | 10 +++---- .../v1beta/document_service/client.rb | 22 ++++++++-------- .../v1beta/document_service/rest/client.rb | 22 ++++++++-------- .../v1beta/sample_query_service/client.rb | 6 ++--- .../sample_query_service/rest/client.rb | 6 ++--- .../v1beta/user_event_service/client.rb | 6 ++--- .../v1beta/user_event_service/rest/client.rb | 6 ++--- .../google/cloud/dlp/v2/dlp_service/client.rb | 4 +-- .../cloud/dlp/v2/dlp_service/rest/client.rb | 4 +-- .../v1/document_processor_service/client.rb | 10 +++---- .../document_processor_service/rest/client.rb | 10 +++---- .../document_processor_service/client.rb | 14 +++++----- .../document_processor_service/rest/client.rb | 14 +++++----- .../publishing/v1/publisher/client.rb | 6 ++--- .../publishing/v1/publisher/rest/client.rb | 6 ++--- .../cloud/firestore/v1/firestore/client.rb | 26 +++++++++---------- .../firestore/v1/firestore/rest/client.rb | 26 +++++++++---------- .../monitoring/v3/group_service/client.rb | 6 ++--- .../cloud/pubsub/v1/schema_service/client.rb | 4 +-- .../pubsub/v1/subscription_admin/client.rb | 4 +-- .../lib/google/cloud/run/v2/builds/client.rb | 4 +-- .../google/cloud/run/v2/builds/rest/client.rb | 4 +-- .../google/cloud/spanner/v1/spanner/client.rb | 4 +-- .../google/cloud/speech/v2/speech/client.rb | 4 +-- .../cloud/speech/v2/speech/rest/client.rb | 4 +-- .../v3/translation_service/client.rb | 4 +-- .../v3/translation_service/rest/client.rb | 4 +-- .../cloud/vision/v1/product_search/client.rb | 4 +-- .../vision/v1/product_search/rest/client.rb | 4 +-- 68 files changed, 277 insertions(+), 277 deletions(-) diff --git a/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb b/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb index 3651da99a8dc..df654c367949 100644 --- a/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb +++ b/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb @@ -326,11 +326,11 @@ def create_job_from_template request, options = nil # the job. # Must be valid Cloud Storage URL, beginning with `gs://`. # - # Note: The following fields are mutually exclusive: `gcs_path`, `dynamic_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_path`, `dynamic_template`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param dynamic_template [::Google::Cloud::Dataflow::V1beta3::DynamicTemplateLaunchParams, ::Hash] # Parameters for launching a dynamic template. # - # Note: The following fields are mutually exclusive: `dynamic_template`, `gcs_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `dynamic_template`, `gcs_path`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param launch_parameters [::Google::Cloud::Dataflow::V1beta3::LaunchTemplateParameters, ::Hash] # The parameters of the template to launch. Part of the # body of the POST request. diff --git a/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb b/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb index 77b727bea749..2739aef9875b 100644 --- a/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb +++ b/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb @@ -309,11 +309,11 @@ def create_job_from_template request, options = nil # the job. # Must be valid Cloud Storage URL, beginning with `gs://`. # - # Note: The following fields are mutually exclusive: `gcs_path`, `dynamic_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_path`, `dynamic_template`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param dynamic_template [::Google::Cloud::Dataflow::V1beta3::DynamicTemplateLaunchParams, ::Hash] # Parameters for launching a dynamic template. # - # Note: The following fields are mutually exclusive: `dynamic_template`, `gcs_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `dynamic_template`, `gcs_path`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param launch_parameters [::Google::Cloud::Dataflow::V1beta3::LaunchTemplateParameters, ::Hash] # The parameters of the template to launch. Part of the # body of the POST request. diff --git a/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/datastore/client.rb b/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/datastore/client.rb index bf34e0eff912..20342dec3dfc 100644 --- a/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/datastore/client.rb +++ b/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/datastore/client.rb @@ -353,11 +353,11 @@ def lookup request, options = nil # @param query [::Google::Cloud::Datastore::V1::Query, ::Hash] # The query to run. # - # Note: The following fields are mutually exclusive: `query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `query`, `gql_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gql_query [::Google::Cloud::Datastore::V1::GqlQuery, ::Hash] # The GQL query to run. This query must be a non-aggregation query. # - # Note: The following fields are mutually exclusive: `gql_query`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gql_query`, `query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param property_mask [::Google::Cloud::Datastore::V1::PropertyMask, ::Hash] # The properties to return. # This field must not be set for a projection query. @@ -470,11 +470,11 @@ def run_query request, options = nil # @param aggregation_query [::Google::Cloud::Datastore::V1::AggregationQuery, ::Hash] # The query to run. # - # Note: The following fields are mutually exclusive: `aggregation_query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `aggregation_query`, `gql_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gql_query [::Google::Cloud::Datastore::V1::GqlQuery, ::Hash] # The GQL query to run. This query must be an aggregation query. # - # Note: The following fields are mutually exclusive: `gql_query`, `aggregation_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gql_query`, `aggregation_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param explain_options [::Google::Cloud::Datastore::V1::ExplainOptions, ::Hash] # Optional. Explain options for the query. If set, additional query # statistics will be returned. If not, only query results will be returned. @@ -674,14 +674,14 @@ def begin_transaction request, options = nil # transaction identifier is returned by a call to # {::Google::Cloud::Datastore::V1::Datastore::Client#begin_transaction Datastore.BeginTransaction}. # - # Note: The following fields are mutually exclusive: `transaction`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `single_use_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param single_use_transaction [::Google::Cloud::Datastore::V1::TransactionOptions, ::Hash] # Options for beginning a new transaction for this request. # The transaction is committed when the request completes. If specified, # {::Google::Cloud::Datastore::V1::TransactionOptions TransactionOptions.mode} must be # {::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite TransactionOptions.ReadWrite}. # - # Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `single_use_transaction`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mutations [::Array<::Google::Cloud::Datastore::V1::Mutation, ::Hash>] # The mutations to perform. # diff --git a/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/datastore/rest/client.rb b/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/datastore/rest/client.rb index eb22cddc1451..727ef1d7c8fd 100644 --- a/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/datastore/rest/client.rb +++ b/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/datastore/rest/client.rb @@ -336,11 +336,11 @@ def lookup request, options = nil # @param query [::Google::Cloud::Datastore::V1::Query, ::Hash] # The query to run. # - # Note: The following fields are mutually exclusive: `query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `query`, `gql_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gql_query [::Google::Cloud::Datastore::V1::GqlQuery, ::Hash] # The GQL query to run. This query must be a non-aggregation query. # - # Note: The following fields are mutually exclusive: `gql_query`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gql_query`, `query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param property_mask [::Google::Cloud::Datastore::V1::PropertyMask, ::Hash] # The properties to return. # This field must not be set for a projection query. @@ -443,11 +443,11 @@ def run_query request, options = nil # @param aggregation_query [::Google::Cloud::Datastore::V1::AggregationQuery, ::Hash] # The query to run. # - # Note: The following fields are mutually exclusive: `aggregation_query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `aggregation_query`, `gql_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gql_query [::Google::Cloud::Datastore::V1::GqlQuery, ::Hash] # The GQL query to run. This query must be an aggregation query. # - # Note: The following fields are mutually exclusive: `gql_query`, `aggregation_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gql_query`, `aggregation_query`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param explain_options [::Google::Cloud::Datastore::V1::ExplainOptions, ::Hash] # Optional. Explain options for the query. If set, additional query # statistics will be returned. If not, only query results will be returned. @@ -627,14 +627,14 @@ def begin_transaction request, options = nil # transaction identifier is returned by a call to # {::Google::Cloud::Datastore::V1::Datastore::Rest::Client#begin_transaction Datastore.BeginTransaction}. # - # Note: The following fields are mutually exclusive: `transaction`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `single_use_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param single_use_transaction [::Google::Cloud::Datastore::V1::TransactionOptions, ::Hash] # Options for beginning a new transaction for this request. # The transaction is committed when the request completes. If specified, # {::Google::Cloud::Datastore::V1::TransactionOptions TransactionOptions.mode} must be # {::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite TransactionOptions.ReadWrite}. # - # Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `single_use_transaction`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mutations [::Array<::Google::Cloud::Datastore::V1::Mutation, ::Hash>] # The mutations to perform. # diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/client.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/client.rb index 6b875c9e502f..b3bfb4fb9e71 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/client.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/client.rb @@ -816,36 +816,36 @@ def delete_connection_profile request, options = nil # @param connection_profile [::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash] # An ad-hoc connection profile configuration. # - # Note: The following fields are mutually exclusive: `connection_profile`, `connection_profile_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `connection_profile`, `connection_profile_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param connection_profile_name [::String] # A reference to an existing connection profile. # - # Note: The following fields are mutually exclusive: `connection_profile_name`, `connection_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `connection_profile_name`, `connection_profile`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param full_hierarchy [::Boolean] # Whether to retrieve the full hierarchy of data objects (TRUE) or only the # current level (FALSE). # - # Note: The following fields are mutually exclusive: `full_hierarchy`, `hierarchy_depth`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `full_hierarchy`, `hierarchy_depth`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param hierarchy_depth [::Integer] # The number of hierarchy levels below the current level to be retrieved. # - # Note: The following fields are mutually exclusive: `hierarchy_depth`, `full_hierarchy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `hierarchy_depth`, `full_hierarchy`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param oracle_rdbms [::Google::Cloud::Datastream::V1::OracleRdbms, ::Hash] # Oracle RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mysql_rdbms [::Google::Cloud::Datastream::V1::MysqlRdbms, ::Hash] # MySQL RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param postgresql_rdbms [::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash] # PostgreSQL RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_server_rdbms [::Google::Cloud::Datastream::V1::SqlServerRdbms, ::Hash] # SQLServer RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse] diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/rest/client.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/rest/client.rb index f6c04468b194..d93fd8a32fbb 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/rest/client.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/rest/client.rb @@ -775,36 +775,36 @@ def delete_connection_profile request, options = nil # @param connection_profile [::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash] # An ad-hoc connection profile configuration. # - # Note: The following fields are mutually exclusive: `connection_profile`, `connection_profile_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `connection_profile`, `connection_profile_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param connection_profile_name [::String] # A reference to an existing connection profile. # - # Note: The following fields are mutually exclusive: `connection_profile_name`, `connection_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `connection_profile_name`, `connection_profile`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param full_hierarchy [::Boolean] # Whether to retrieve the full hierarchy of data objects (TRUE) or only the # current level (FALSE). # - # Note: The following fields are mutually exclusive: `full_hierarchy`, `hierarchy_depth`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `full_hierarchy`, `hierarchy_depth`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param hierarchy_depth [::Integer] # The number of hierarchy levels below the current level to be retrieved. # - # Note: The following fields are mutually exclusive: `hierarchy_depth`, `full_hierarchy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `hierarchy_depth`, `full_hierarchy`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param oracle_rdbms [::Google::Cloud::Datastream::V1::OracleRdbms, ::Hash] # Oracle RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mysql_rdbms [::Google::Cloud::Datastream::V1::MysqlRdbms, ::Hash] # MySQL RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param postgresql_rdbms [::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash] # PostgreSQL RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_server_rdbms [::Google::Cloud::Datastream::V1::SqlServerRdbms, ::Hash] # SQLServer RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/datastream/client.rb b/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/datastream/client.rb index 082e33e1a71f..eceb17018c83 100644 --- a/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/datastream/client.rb +++ b/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/datastream/client.rb @@ -774,28 +774,28 @@ def delete_connection_profile request, options = nil # @param connection_profile [::Google::Cloud::Datastream::V1alpha1::ConnectionProfile, ::Hash] # An ad-hoc ConnectionProfile configuration. # - # Note: The following fields are mutually exclusive: `connection_profile`, `connection_profile_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `connection_profile`, `connection_profile_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param connection_profile_name [::String] # A reference to an existing ConnectionProfile. # - # Note: The following fields are mutually exclusive: `connection_profile_name`, `connection_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `connection_profile_name`, `connection_profile`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param recursive [::Boolean] # Whether to retrieve the full hierarchy of data objects (TRUE) or only the # current level (FALSE). # - # Note: The following fields are mutually exclusive: `recursive`, `recursion_depth`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `recursive`, `recursion_depth`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param recursion_depth [::Integer] # The number of hierarchy levels below the current level to be retrieved. # - # Note: The following fields are mutually exclusive: `recursion_depth`, `recursive`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `recursion_depth`, `recursive`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param oracle_rdbms [::Google::Cloud::Datastream::V1alpha1::OracleRdbms, ::Hash] # Oracle RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mysql_rdbms [::Google::Cloud::Datastream::V1alpha1::MysqlRdbms, ::Hash] # MySQL RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Datastream::V1alpha1::DiscoverConnectionProfileResponse] diff --git a/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/datastream/rest/client.rb b/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/datastream/rest/client.rb index 64f0d7eb36be..24452ea1cdff 100644 --- a/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/datastream/rest/client.rb +++ b/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/datastream/rest/client.rb @@ -732,28 +732,28 @@ def delete_connection_profile request, options = nil # @param connection_profile [::Google::Cloud::Datastream::V1alpha1::ConnectionProfile, ::Hash] # An ad-hoc ConnectionProfile configuration. # - # Note: The following fields are mutually exclusive: `connection_profile`, `connection_profile_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `connection_profile`, `connection_profile_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param connection_profile_name [::String] # A reference to an existing ConnectionProfile. # - # Note: The following fields are mutually exclusive: `connection_profile_name`, `connection_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `connection_profile_name`, `connection_profile`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param recursive [::Boolean] # Whether to retrieve the full hierarchy of data objects (TRUE) or only the # current level (FALSE). # - # Note: The following fields are mutually exclusive: `recursive`, `recursion_depth`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `recursive`, `recursion_depth`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param recursion_depth [::Integer] # The number of hierarchy levels below the current level to be retrieved. # - # Note: The following fields are mutually exclusive: `recursion_depth`, `recursive`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `recursion_depth`, `recursive`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param oracle_rdbms [::Google::Cloud::Datastream::V1alpha1::OracleRdbms, ::Hash] # Oracle RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mysql_rdbms [::Google::Cloud::Datastream::V1alpha1::MysqlRdbms, ::Hash] # MySQL RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Datastream::V1alpha1::DiscoverConnectionProfileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/client.rb index b8f59de40798..456c96635608 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/client.rb @@ -851,15 +851,15 @@ def export_agent request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `agent_uri`, `agent_content`, `git_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_uri`, `agent_content`, `git_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param agent_content [::String] # Uncompressed raw byte content for agent. # - # Note: The following fields are mutually exclusive: `agent_content`, `agent_uri`, `git_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_content`, `agent_uri`, `git_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param git_source [::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest::GitSource, ::Hash] # Setting for restoring from a git branch # - # Note: The following fields are mutually exclusive: `git_source`, `agent_uri`, `agent_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `git_source`, `agent_uri`, `agent_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param restore_option [::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest::RestoreOption] # Agent restore mode. If not specified, `KEEP` is assumed. # diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb index bb6ed8f0e513..709eea9a2981 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb @@ -803,15 +803,15 @@ def export_agent request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `agent_uri`, `agent_content`, `git_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_uri`, `agent_content`, `git_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param agent_content [::String] # Uncompressed raw byte content for agent. # - # Note: The following fields are mutually exclusive: `agent_content`, `agent_uri`, `git_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_content`, `agent_uri`, `git_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param git_source [::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest::GitSource, ::Hash] # Setting for restoring from a git branch # - # Note: The following fields are mutually exclusive: `git_source`, `agent_uri`, `agent_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `git_source`, `agent_uri`, `agent_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param restore_option [::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest::RestoreOption] # Agent restore mode. If not specified, `KEEP` is assumed. # @yield [result, operation] Access the result along with the TransportOperation object diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb index 01d16c327f70..75df03f28d03 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb @@ -777,11 +777,11 @@ def list_entity_types request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `entity_types_uri`, `entity_types_content_inline`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_types_uri`, `entity_types_content_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_types_content_inline [::Boolean] # Optional. The option to return the serialized entity types inline. # - # Note: The following fields are mutually exclusive: `entity_types_content_inline`, `entity_types_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_types_content_inline`, `entity_types_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param data_format [::Google::Cloud::Dialogflow::CX::V3::ExportEntityTypesRequest::DataFormat] # Optional. The data format of the exported entity types. If not specified, # `BLOB` is assumed. @@ -904,11 +904,11 @@ def export_entity_types request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `entity_types_uri`, `entity_types_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_types_uri`, `entity_types_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_types_content [::Google::Cloud::Dialogflow::CX::V3::InlineSource, ::Hash] # Uncompressed byte content of entity types. # - # Note: The following fields are mutually exclusive: `entity_types_content`, `entity_types_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_types_content`, `entity_types_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param merge_option [::Google::Cloud::Dialogflow::CX::V3::ImportEntityTypesRequest::MergeOption] # Required. Merge option for importing entity types. # @param target_entity_type [::String] diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb index b6698afaba20..21066ff90f9d 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb @@ -736,11 +736,11 @@ def list_entity_types request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `entity_types_uri`, `entity_types_content_inline`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_types_uri`, `entity_types_content_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_types_content_inline [::Boolean] # Optional. The option to return the serialized entity types inline. # - # Note: The following fields are mutually exclusive: `entity_types_content_inline`, `entity_types_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_types_content_inline`, `entity_types_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param data_format [::Google::Cloud::Dialogflow::CX::V3::ExportEntityTypesRequest::DataFormat] # Optional. The data format of the exported entity types. If not specified, # `BLOB` is assumed. @@ -856,11 +856,11 @@ def export_entity_types request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `entity_types_uri`, `entity_types_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_types_uri`, `entity_types_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_types_content [::Google::Cloud::Dialogflow::CX::V3::InlineSource, ::Hash] # Uncompressed byte content of entity types. # - # Note: The following fields are mutually exclusive: `entity_types_content`, `entity_types_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_types_content`, `entity_types_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param merge_option [::Google::Cloud::Dialogflow::CX::V3::ImportEntityTypesRequest::MergeOption] # Required. Merge option for importing entity types. # @param target_entity_type [::String] diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/client.rb index 308740aabfd5..8b1cf409dabc 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/client.rb @@ -1075,11 +1075,11 @@ def get_flow_validation_result request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `flow_uri`, `flow_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `flow_uri`, `flow_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param flow_content [::String] # Uncompressed raw byte content for flow. # - # Note: The following fields are mutually exclusive: `flow_content`, `flow_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `flow_content`, `flow_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param import_option [::Google::Cloud::Dialogflow::CX::V3::ImportFlowRequest::ImportOption] # Flow import mode. If not specified, `KEEP` is assumed. # @param flow_import_strategy [::Google::Cloud::Dialogflow::CX::V3::FlowImportStrategy, ::Hash] diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb index 6c8a6d80d86c..90b27c684f9f 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb @@ -1013,11 +1013,11 @@ def get_flow_validation_result request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `flow_uri`, `flow_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `flow_uri`, `flow_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param flow_content [::String] # Uncompressed raw byte content for flow. # - # Note: The following fields are mutually exclusive: `flow_content`, `flow_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `flow_content`, `flow_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param import_option [::Google::Cloud::Dialogflow::CX::V3::ImportFlowRequest::ImportOption] # Flow import mode. If not specified, `KEEP` is assumed. # @param flow_import_strategy [::Google::Cloud::Dialogflow::CX::V3::FlowImportStrategy, ::Hash] diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/client.rb index 3f4dcacef4c7..4608c6ec1ed3 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/client.rb @@ -763,11 +763,11 @@ def delete_intent request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `intents_uri`, `intents_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intents_uri`, `intents_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param intents_content [::Google::Cloud::Dialogflow::CX::V3::InlineSource, ::Hash] # Uncompressed byte content of intents. # - # Note: The following fields are mutually exclusive: `intents_content`, `intents_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intents_content`, `intents_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param merge_option [::Google::Cloud::Dialogflow::CX::V3::ImportIntentsRequest::MergeOption] # Merge option for importing intents. If not specified, `REJECT` is assumed. # @@ -890,11 +890,11 @@ def import_intents request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `intents_uri`, `intents_content_inline`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intents_uri`, `intents_content_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param intents_content_inline [::Boolean] # Optional. The option to return the serialized intents inline. # - # Note: The following fields are mutually exclusive: `intents_content_inline`, `intents_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intents_content_inline`, `intents_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param data_format [::Google::Cloud::Dialogflow::CX::V3::ExportIntentsRequest::DataFormat] # Optional. The data format of the exported intents. If not specified, `BLOB` # is assumed. diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb index ed24219b94df..368f3c482e91 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb @@ -722,11 +722,11 @@ def delete_intent request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `intents_uri`, `intents_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intents_uri`, `intents_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param intents_content [::Google::Cloud::Dialogflow::CX::V3::InlineSource, ::Hash] # Uncompressed byte content of intents. # - # Note: The following fields are mutually exclusive: `intents_content`, `intents_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intents_content`, `intents_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param merge_option [::Google::Cloud::Dialogflow::CX::V3::ImportIntentsRequest::MergeOption] # Merge option for importing intents. If not specified, `REJECT` is assumed. # @yield [result, operation] Access the result along with the TransportOperation object @@ -842,11 +842,11 @@ def import_intents request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `intents_uri`, `intents_content_inline`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intents_uri`, `intents_content_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param intents_content_inline [::Boolean] # Optional. The option to return the serialized intents inline. # - # Note: The following fields are mutually exclusive: `intents_content_inline`, `intents_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intents_content_inline`, `intents_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param data_format [::Google::Cloud::Dialogflow::CX::V3::ExportIntentsRequest::DataFormat] # Optional. The data format of the exported intents. If not specified, `BLOB` # is assumed. diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb index 0867aca8fde0..9c471b076346 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb @@ -1023,11 +1023,11 @@ def calculate_coverage request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `gcs_uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_uri`, `content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param content [::String] # Uncompressed raw byte content for test cases. # - # Note: The following fields are mutually exclusive: `content`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `content`, `gcs_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb index 7cf1dd4d5f18..a8f720e8b698 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb @@ -961,11 +961,11 @@ def calculate_coverage request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `gcs_uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_uri`, `content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param content [::String] # Uncompressed raw byte content for test cases. # - # Note: The following fields are mutually exclusive: `content`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `content`, `gcs_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/client.rb index a26653bbbdad..d40a44874682 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/client.rb @@ -864,11 +864,11 @@ def export_agent request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `agent_uri`, `agent_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_uri`, `agent_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param agent_content [::String] # Zip compressed raw byte content for agent. # - # Note: The following fields are mutually exclusive: `agent_content`, `agent_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_content`, `agent_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -998,11 +998,11 @@ def import_agent request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `agent_uri`, `agent_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_uri`, `agent_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param agent_content [::String] # Zip compressed raw byte content for agent. # - # Note: The following fields are mutually exclusive: `agent_content`, `agent_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_content`, `agent_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/client.rb index 543373fb8e35..83bf4dce61aa 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/client.rb @@ -816,11 +816,11 @@ def export_agent request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `agent_uri`, `agent_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_uri`, `agent_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param agent_content [::String] # Zip compressed raw byte content for agent. # - # Note: The following fields are mutually exclusive: `agent_content`, `agent_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_content`, `agent_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -943,11 +943,11 @@ def import_agent request, options = nil # [Dialogflow access # control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). # - # Note: The following fields are mutually exclusive: `agent_uri`, `agent_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_uri`, `agent_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param agent_content [::String] # Zip compressed raw byte content for agent. # - # Note: The following fields are mutually exclusive: `agent_content`, `agent_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `agent_content`, `agent_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/client.rb index d8b1af36aca7..e91ef0f4f557 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/client.rb @@ -1038,12 +1038,12 @@ def generate_stateless_summary request, options = nil # Uncreated generator. It should be a complete generator that includes all # information about the generator. # - # Note: The following fields are mutually exclusive: `generator`, `generator_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `generator`, `generator_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param generator_name [::String] # The resource name of the existing created generator. Format: # `projects//locations//generators/` # - # Note: The following fields are mutually exclusive: `generator_name`, `generator`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `generator_name`, `generator`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param context_references [::Hash{::String => ::Google::Cloud::Dialogflow::V2::Conversation::ContextReference, ::Hash}] # Optional. A section of ingested context information. The key is the name of # the context reference and the value contains the contents of the context diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb index 733b43da2514..fa5d09743b7a 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb @@ -976,12 +976,12 @@ def generate_stateless_summary request, options = nil # Uncreated generator. It should be a complete generator that includes all # information about the generator. # - # Note: The following fields are mutually exclusive: `generator`, `generator_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `generator`, `generator_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param generator_name [::String] # The resource name of the existing created generator. Format: # `projects//locations//generators/` # - # Note: The following fields are mutually exclusive: `generator_name`, `generator`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `generator_name`, `generator`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param context_references [::Hash{::String => ::Google::Cloud::Dialogflow::V2::Conversation::ContextReference, ::Hash}] # Optional. A section of ingested context information. The key is the name of # the context reference and the value contains the contents of the context diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/client.rb index b29761040a82..b0c14f602ce0 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/client.rb @@ -738,11 +738,11 @@ def delete_entity_type request, options = nil # EntityBatch type) or a JSON object. Note: The URI must start with # "gs://". # - # Note: The following fields are mutually exclusive: `entity_type_batch_uri`, `entity_type_batch_inline`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_type_batch_uri`, `entity_type_batch_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_type_batch_inline [::Google::Cloud::Dialogflow::V2::EntityTypeBatch, ::Hash] # The collection of entity types to update or create. # - # Note: The following fields are mutually exclusive: `entity_type_batch_inline`, `entity_type_batch_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_type_batch_inline`, `entity_type_batch_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param language_code [::String] # Optional. The language used to access language-specific data. # If not specified, the agent's default language is used. diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb index 5ce975783202..59b8344f96be 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb @@ -697,11 +697,11 @@ def delete_entity_type request, options = nil # EntityBatch type) or a JSON object. Note: The URI must start with # "gs://". # - # Note: The following fields are mutually exclusive: `entity_type_batch_uri`, `entity_type_batch_inline`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_type_batch_uri`, `entity_type_batch_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param entity_type_batch_inline [::Google::Cloud::Dialogflow::V2::EntityTypeBatch, ::Hash] # The collection of entity types to update or create. # - # Note: The following fields are mutually exclusive: `entity_type_batch_inline`, `entity_type_batch_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `entity_type_batch_inline`, `entity_type_batch_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param language_code [::String] # Optional. The language used to access language-specific data. # If not specified, the agent's default language is used. diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/client.rb index 42b4f9307b32..a138ac4dd0e6 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/client.rb @@ -754,11 +754,11 @@ def delete_intent request, options = nil # create. The file format can either be a serialized proto (of IntentBatch # type) or JSON object. Note: The URI must start with "gs://". # - # Note: The following fields are mutually exclusive: `intent_batch_uri`, `intent_batch_inline`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intent_batch_uri`, `intent_batch_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param intent_batch_inline [::Google::Cloud::Dialogflow::V2::IntentBatch, ::Hash] # The collection of intents to update or create. # - # Note: The following fields are mutually exclusive: `intent_batch_inline`, `intent_batch_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intent_batch_inline`, `intent_batch_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param language_code [::String] # Optional. The language used to access language-specific data. # If not specified, the agent's default language is used. diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/client.rb index 5eaeae9098ec..b38bd447f03f 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/client.rb @@ -713,11 +713,11 @@ def delete_intent request, options = nil # create. The file format can either be a serialized proto (of IntentBatch # type) or JSON object. Note: The URI must start with "gs://". # - # Note: The following fields are mutually exclusive: `intent_batch_uri`, `intent_batch_inline`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intent_batch_uri`, `intent_batch_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param intent_batch_inline [::Google::Cloud::Dialogflow::V2::IntentBatch, ::Hash] # The collection of intents to update or create. # - # Note: The following fields are mutually exclusive: `intent_batch_inline`, `intent_batch_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `intent_batch_inline`, `intent_batch_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param language_code [::String] # Optional. The language used to access language-specific data. # If not specified, the agent's default language is used. diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/client.rb index 935cafa028de..276287ac9aa3 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/client.rb @@ -602,19 +602,19 @@ def update_participant request, options = nil # @param text_input [::Google::Cloud::Dialogflow::V2::TextInput, ::Hash] # The natural language text to be processed. # - # Note: The following fields are mutually exclusive: `text_input`, `audio_input`, `event_input`, `suggestion_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `text_input`, `audio_input`, `event_input`, `suggestion_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param audio_input [::Google::Cloud::Dialogflow::V2::AudioInput, ::Hash] # The natural language speech audio to be processed. # - # Note: The following fields are mutually exclusive: `audio_input`, `text_input`, `event_input`, `suggestion_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `audio_input`, `text_input`, `event_input`, `suggestion_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param event_input [::Google::Cloud::Dialogflow::V2::EventInput, ::Hash] # An input event to send to Dialogflow. # - # Note: The following fields are mutually exclusive: `event_input`, `text_input`, `audio_input`, `suggestion_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `event_input`, `text_input`, `audio_input`, `suggestion_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param suggestion_input [::Google::Cloud::Dialogflow::V2::SuggestionInput, ::Hash] # An input representing the selection of a suggestion. # - # Note: The following fields are mutually exclusive: `suggestion_input`, `text_input`, `audio_input`, `event_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `suggestion_input`, `text_input`, `audio_input`, `event_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param reply_audio_config [::Google::Cloud::Dialogflow::V2::OutputAudioConfig, ::Hash] # Speech synthesis configuration. # The speech synthesis settings for a virtual agent that may be configured diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/rest/client.rb index fbbf997c7d7e..0eb5cd84082d 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/rest/client.rb @@ -566,19 +566,19 @@ def update_participant request, options = nil # @param text_input [::Google::Cloud::Dialogflow::V2::TextInput, ::Hash] # The natural language text to be processed. # - # Note: The following fields are mutually exclusive: `text_input`, `audio_input`, `event_input`, `suggestion_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `text_input`, `audio_input`, `event_input`, `suggestion_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param audio_input [::Google::Cloud::Dialogflow::V2::AudioInput, ::Hash] # The natural language speech audio to be processed. # - # Note: The following fields are mutually exclusive: `audio_input`, `text_input`, `event_input`, `suggestion_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `audio_input`, `text_input`, `event_input`, `suggestion_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param event_input [::Google::Cloud::Dialogflow::V2::EventInput, ::Hash] # An input event to send to Dialogflow. # - # Note: The following fields are mutually exclusive: `event_input`, `text_input`, `audio_input`, `suggestion_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `event_input`, `text_input`, `audio_input`, `suggestion_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param suggestion_input [::Google::Cloud::Dialogflow::V2::SuggestionInput, ::Hash] # An input representing the selection of a suggestion. # - # Note: The following fields are mutually exclusive: `suggestion_input`, `text_input`, `audio_input`, `event_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `suggestion_input`, `text_input`, `audio_input`, `event_input`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param reply_audio_config [::Google::Cloud::Dialogflow::V2::OutputAudioConfig, ::Hash] # Speech synthesis configuration. # The speech synthesis settings for a virtual agent that may be configured diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/client.rb index c7261146f733..5bae7faaa0f6 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/client.rb @@ -369,7 +369,7 @@ def complete_query request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportSuggestionDenyListEntriesRequest::InlineSource, ::Hash] # The Inline source for the input content for suggestion deny list entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash] # Cloud Storage location for the input content. # @@ -380,7 +380,7 @@ def complete_query request, options = nil # * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] # per line. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent data store resource name for which to import denylist # entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. @@ -578,15 +578,15 @@ def purge_suggestion_deny_list_entries request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportCompletionSuggestionsRequest::InlineSource, ::Hash] # The Inline source for suggestion entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent data store resource name for which to import customer # autocomplete suggestions. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb index e07424715676..2a535102db63 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb @@ -355,7 +355,7 @@ def complete_query request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportSuggestionDenyListEntriesRequest::InlineSource, ::Hash] # The Inline source for the input content for suggestion deny list entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash] # Cloud Storage location for the input content. # @@ -366,7 +366,7 @@ def complete_query request, options = nil # * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] # per line. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent data store resource name for which to import denylist # entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. @@ -550,15 +550,15 @@ def purge_suggestion_deny_list_entries request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportCompletionSuggestionsRequest::InlineSource, ::Hash] # The Inline source for suggestion entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent data store resource name for which to import customer # autocomplete suggestions. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb index f9334848c0bd..4192783508ab 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb @@ -241,13 +241,13 @@ def logger # @param cmek_config_name [::String] # Resource name of the CmekConfig to use for protecting this DataStore. # - # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cmek_config_name`, `disable_cmek`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param disable_cmek [::Boolean] # DataStore without CMEK protections. If a default CmekConfig is set for # the project, setting this field will override the default CmekConfig as # well. # - # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `disable_cmek`, `cmek_config_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb index 1e0c125e671a..f42d94e69ca2 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb @@ -234,13 +234,13 @@ def logger # @param cmek_config_name [::String] # Resource name of the CmekConfig to use for protecting this DataStore. # - # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cmek_config_name`, `disable_cmek`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param disable_cmek [::Boolean] # DataStore without CMEK protections. If a default CmekConfig is set for # the project, setting this field will override the default CmekConfig as # well. # - # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `disable_cmek`, `cmek_config_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/client.rb index ba65d391a0bf..4a4b8b5f5bd7 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/client.rb @@ -763,39 +763,39 @@ def delete_document request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::InlineSource, ::Hash] # The Inline source for the input content for documents. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fhir_store_source [::Google::Cloud::DiscoveryEngine::V1::FhirStoreSource, ::Hash] # FhirStore input source. # - # Note: The following fields are mutually exclusive: `fhir_store_source`, `inline_source`, `gcs_source`, `bigquery_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fhir_store_source`, `inline_source`, `gcs_source`, `bigquery_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param spanner_source [::Google::Cloud::DiscoveryEngine::V1::SpannerSource, ::Hash] # Spanner input source. # - # Note: The following fields are mutually exclusive: `spanner_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `spanner_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param cloud_sql_source [::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource, ::Hash] # Cloud SQL input source. # - # Note: The following fields are mutually exclusive: `cloud_sql_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_sql_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param firestore_source [::Google::Cloud::DiscoveryEngine::V1::FirestoreSource, ::Hash] # Firestore input source. # - # Note: The following fields are mutually exclusive: `firestore_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `firestore_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param alloy_db_source [::Google::Cloud::DiscoveryEngine::V1::AlloyDbSource, ::Hash] # AlloyDB input source. # - # Note: The following fields are mutually exclusive: `alloy_db_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `alloy_db_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigtable_source [::Google::Cloud::DiscoveryEngine::V1::BigtableSource, ::Hash] # Cloud Bigtable input source. # - # Note: The following fields are mutually exclusive: `bigtable_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigtable_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent branch resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. @@ -989,11 +989,11 @@ def import_documents request, options = nil # * `document_id`: One valid # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} per line. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::PurgeDocumentsRequest::InlineSource, ::Hash] # Inline source for the input content for purge. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb index 5d6130b0bb93..0e5bcfb22501 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb @@ -721,39 +721,39 @@ def delete_document request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::InlineSource, ::Hash] # The Inline source for the input content for documents. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fhir_store_source [::Google::Cloud::DiscoveryEngine::V1::FhirStoreSource, ::Hash] # FhirStore input source. # - # Note: The following fields are mutually exclusive: `fhir_store_source`, `inline_source`, `gcs_source`, `bigquery_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fhir_store_source`, `inline_source`, `gcs_source`, `bigquery_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param spanner_source [::Google::Cloud::DiscoveryEngine::V1::SpannerSource, ::Hash] # Spanner input source. # - # Note: The following fields are mutually exclusive: `spanner_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `spanner_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param cloud_sql_source [::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource, ::Hash] # Cloud SQL input source. # - # Note: The following fields are mutually exclusive: `cloud_sql_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_sql_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param firestore_source [::Google::Cloud::DiscoveryEngine::V1::FirestoreSource, ::Hash] # Firestore input source. # - # Note: The following fields are mutually exclusive: `firestore_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `firestore_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param alloy_db_source [::Google::Cloud::DiscoveryEngine::V1::AlloyDbSource, ::Hash] # AlloyDB input source. # - # Note: The following fields are mutually exclusive: `alloy_db_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `alloy_db_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigtable_source [::Google::Cloud::DiscoveryEngine::V1::BigtableSource, ::Hash] # Cloud Bigtable input source. # - # Note: The following fields are mutually exclusive: `bigtable_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigtable_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent branch resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. @@ -940,11 +940,11 @@ def import_documents request, options = nil # * `document_id`: One valid # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} per line. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::PurgeDocumentsRequest::InlineSource, ::Hash] # Inline source for the input content for purge. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb index 43de79e2a25d..d99e400f7452 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb @@ -235,13 +235,13 @@ def logger # Resource name of the CmekConfig to use for protecting this Identity # Mapping Store. # - # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cmek_config_name`, `disable_cmek`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param disable_cmek [::Boolean] # Identity Mapping Store without CMEK protections. If a default CmekConfig # is set for the project, setting this field will override the default # CmekConfig as well. # - # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `disable_cmek`, `cmek_config_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent collection resource name, such as # `projects/{project}/locations/{location}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb index c1ac17cd9cae..f7813d0258c6 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb @@ -228,13 +228,13 @@ def logger # Resource name of the CmekConfig to use for protecting this Identity # Mapping Store. # - # Note: The following fields are mutually exclusive: `cmek_config_name`, `disable_cmek`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cmek_config_name`, `disable_cmek`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param disable_cmek [::Boolean] # Identity Mapping Store without CMEK protections. If a default CmekConfig # is set for the project, setting this field will override the default # CmekConfig as well. # - # Note: The following fields are mutually exclusive: `disable_cmek`, `cmek_config_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `disable_cmek`, `cmek_config_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent collection resource name, such as # `projects/{project}/locations/{location}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb index bc877690e01b..08bd0442c50a 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb @@ -595,15 +595,15 @@ def purge_user_events request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportUserEventsRequest::InlineSource, ::Hash] # The Inline source for the input content for UserEvents. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. Parent DataStore resource name, of the form # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb index 84f0fd453b20..58a59cafcdea 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb @@ -567,15 +567,15 @@ def purge_user_events request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::ImportUserEventsRequest::InlineSource, ::Hash] # The Inline source for the input content for UserEvents. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. Parent DataStore resource name, of the form # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb index 7cd430018d09..30f997e2f4e2 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb @@ -516,7 +516,7 @@ def advanced_complete_query request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportSuggestionDenyListEntriesRequest::InlineSource, ::Hash] # The Inline source for the input content for suggestion deny list entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # @@ -527,7 +527,7 @@ def advanced_complete_query request, options = nil # * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] # per line. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent data store resource name for which to import denylist # entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. @@ -725,15 +725,15 @@ def purge_suggestion_deny_list_entries request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportCompletionSuggestionsRequest::InlineSource, ::Hash] # The Inline source for suggestion entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent data store resource name for which to import customer # autocomplete suggestions. diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb index 32fbf6fc982f..85ed045bf55a 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb @@ -495,7 +495,7 @@ def advanced_complete_query request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportSuggestionDenyListEntriesRequest::InlineSource, ::Hash] # The Inline source for the input content for suggestion deny list entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # @@ -506,7 +506,7 @@ def advanced_complete_query request, options = nil # * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] # per line. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent data store resource name for which to import denylist # entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. @@ -690,15 +690,15 @@ def purge_suggestion_deny_list_entries request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportCompletionSuggestionsRequest::InlineSource, ::Hash] # The Inline source for suggestion entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent data store resource name for which to import customer # autocomplete suggestions. diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb index d02cd26a386e..45f734451ff7 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb @@ -764,39 +764,39 @@ def delete_document request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::InlineSource, ::Hash] # The Inline source for the input content for documents. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fhir_store_source [::Google::Cloud::DiscoveryEngine::V1beta::FhirStoreSource, ::Hash] # FhirStore input source. # - # Note: The following fields are mutually exclusive: `fhir_store_source`, `inline_source`, `gcs_source`, `bigquery_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fhir_store_source`, `inline_source`, `gcs_source`, `bigquery_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param spanner_source [::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource, ::Hash] # Spanner input source. # - # Note: The following fields are mutually exclusive: `spanner_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `spanner_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param cloud_sql_source [::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource, ::Hash] # Cloud SQL input source. # - # Note: The following fields are mutually exclusive: `cloud_sql_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_sql_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param firestore_source [::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource, ::Hash] # Firestore input source. # - # Note: The following fields are mutually exclusive: `firestore_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `firestore_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param alloy_db_source [::Google::Cloud::DiscoveryEngine::V1beta::AlloyDbSource, ::Hash] # AlloyDB input source. # - # Note: The following fields are mutually exclusive: `alloy_db_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `alloy_db_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigtable_source [::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource, ::Hash] # Cloud Bigtable input source. # - # Note: The following fields are mutually exclusive: `bigtable_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigtable_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent branch resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. @@ -985,11 +985,11 @@ def import_documents request, options = nil # * `document_id`: One valid # {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} per line. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::PurgeDocumentsRequest::InlineSource, ::Hash] # Inline source for the input content for purge. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb index c7d50cb14e9d..5df2f29d585e 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb @@ -722,39 +722,39 @@ def delete_document request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::InlineSource, ::Hash] # The Inline source for the input content for documents. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param fhir_store_source [::Google::Cloud::DiscoveryEngine::V1beta::FhirStoreSource, ::Hash] # FhirStore input source. # - # Note: The following fields are mutually exclusive: `fhir_store_source`, `inline_source`, `gcs_source`, `bigquery_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `fhir_store_source`, `inline_source`, `gcs_source`, `bigquery_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param spanner_source [::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource, ::Hash] # Spanner input source. # - # Note: The following fields are mutually exclusive: `spanner_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `spanner_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param cloud_sql_source [::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource, ::Hash] # Cloud SQL input source. # - # Note: The following fields are mutually exclusive: `cloud_sql_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `cloud_sql_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `firestore_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param firestore_source [::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource, ::Hash] # Firestore input source. # - # Note: The following fields are mutually exclusive: `firestore_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `alloy_db_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `firestore_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `alloy_db_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param alloy_db_source [::Google::Cloud::DiscoveryEngine::V1beta::AlloyDbSource, ::Hash] # AlloyDB input source. # - # Note: The following fields are mutually exclusive: `alloy_db_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `bigtable_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `alloy_db_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `bigtable_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigtable_source [::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource, ::Hash] # Cloud Bigtable input source. # - # Note: The following fields are mutually exclusive: `bigtable_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigtable_source`, `inline_source`, `gcs_source`, `bigquery_source`, `fhir_store_source`, `spanner_source`, `cloud_sql_source`, `firestore_source`, `alloy_db_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent branch resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. @@ -936,11 +936,11 @@ def import_documents request, options = nil # * `document_id`: One valid # {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} per line. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::PurgeDocumentsRequest::InlineSource, ::Hash] # Inline source for the input content for purge. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/sample_query_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/sample_query_service/client.rb index 920d80b7d35c..0aa994b5dc15 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/sample_query_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/sample_query_service/client.rb @@ -754,15 +754,15 @@ def delete_sample_query request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportSampleQueriesRequest::InlineSource, ::Hash] # The Inline source for sample query entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent sample query set resource name, such as # `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/client.rb index 3cb40f954bec..6f62276c8e2c 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/client.rb @@ -712,15 +712,15 @@ def delete_sample_query request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportSampleQueriesRequest::InlineSource, ::Hash] # The Inline source for sample query entries. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent sample query set resource name, such as # `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb index bbd925140daf..fb0406f4c32d 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb @@ -583,15 +583,15 @@ def purge_user_events request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportUserEventsRequest::InlineSource, ::Hash] # The Inline source for the input content for UserEvents. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. Parent DataStore resource name, of the form # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb index 9b014b4fee5e..2a3490b73622 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb @@ -555,15 +555,15 @@ def purge_user_events request, options = nil # @param inline_source [::Google::Cloud::DiscoveryEngine::V1beta::ImportUserEventsRequest::InlineSource, ::Hash] # The Inline source for the input content for UserEvents. # - # Note: The following fields are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_source`, `gcs_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource, ::Hash] # Cloud Storage location for the input content. # - # Note: The following fields are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_source`, `inline_source`, `bigquery_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash] # BigQuery input source. # - # Note: The following fields are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `bigquery_source`, `inline_source`, `gcs_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. Parent DataStore resource name, of the form # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` diff --git a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb index d9bda225c22f..aaeac9527fe1 100644 --- a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb +++ b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb @@ -3315,12 +3315,12 @@ def delete_discovery_config request, options = nil # @param inspect_job [::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash] # An inspection job scans a storage repository for InfoTypes. # - # Note: The following fields are mutually exclusive: `inspect_job`, `risk_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inspect_job`, `risk_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param risk_job [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash] # A risk analysis job calculates re-identification risk metrics for a # BigQuery table. # - # Note: The following fields are mutually exclusive: `risk_job`, `inspect_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `risk_job`, `inspect_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param job_id [::String] # The job id can contain uppercase and lowercase letters, # numbers, and hyphens; that is, it must match the regular diff --git a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb index ba3bc377a38b..8729675f9314 100644 --- a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +++ b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb @@ -3127,12 +3127,12 @@ def delete_discovery_config request, options = nil # @param inspect_job [::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash] # An inspection job scans a storage repository for InfoTypes. # - # Note: The following fields are mutually exclusive: `inspect_job`, `risk_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inspect_job`, `risk_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param risk_job [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash] # A risk analysis job calculates re-identification risk metrics for a # BigQuery table. # - # Note: The following fields are mutually exclusive: `risk_job`, `inspect_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `risk_job`, `inspect_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param job_id [::String] # The job id can contain uppercase and lowercase letters, # numbers, and hyphens; that is, it must match the regular diff --git a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/client.rb b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/client.rb index 09560b5af4f0..362d02c01f54 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/client.rb @@ -252,15 +252,15 @@ def logger # @param inline_document [::Google::Cloud::DocumentAI::V1::Document, ::Hash] # An inline document proto. # - # Note: The following fields are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param raw_document [::Google::Cloud::DocumentAI::V1::RawDocument, ::Hash] # A raw document content (bytes). # - # Note: The following fields are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_document [::Google::Cloud::DocumentAI::V1::GcsDocument, ::Hash] # A raw document on Google Cloud Storage. # - # Note: The following fields are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the # {::Google::Cloud::DocumentAI::V1::Processor Processor} or @@ -954,11 +954,11 @@ def get_processor request, options = nil # @param custom_document_extraction_options [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::CustomDocumentExtractionOptions, ::Hash] # Options to control Custom Document Extraction (CDE) Processor. # - # Note: The following fields are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param foundation_model_tuning_options [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::FoundationModelTuningOptions, ::Hash] # Options to control foundation model tuning of a processor. # - # Note: The following fields are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent (project, location and processor) to create the new # version for. Format: diff --git a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb index d9820897eb64..b2058266509e 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb @@ -246,15 +246,15 @@ def logger # @param inline_document [::Google::Cloud::DocumentAI::V1::Document, ::Hash] # An inline document proto. # - # Note: The following fields are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param raw_document [::Google::Cloud::DocumentAI::V1::RawDocument, ::Hash] # A raw document content (bytes). # - # Note: The following fields are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_document [::Google::Cloud::DocumentAI::V1::GcsDocument, ::Hash] # A raw document on Google Cloud Storage. # - # Note: The following fields are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the # {::Google::Cloud::DocumentAI::V1::Processor Processor} or @@ -899,11 +899,11 @@ def get_processor request, options = nil # @param custom_document_extraction_options [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::CustomDocumentExtractionOptions, ::Hash] # Options to control Custom Document Extraction (CDE) Processor. # - # Note: The following fields are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param foundation_model_tuning_options [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::FoundationModelTuningOptions, ::Hash] # Options to control foundation model tuning of a processor. # - # Note: The following fields are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent (project, location and processor) to create the new # version for. Format: diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb index 3758239906ff..a3b881bf1910 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb @@ -252,15 +252,15 @@ def logger # @param inline_document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash] # An inline document proto. # - # Note: The following fields are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param raw_document [::Google::Cloud::DocumentAI::V1beta3::RawDocument, ::Hash] # A raw document content (bytes). # - # Note: The following fields are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_document [::Google::Cloud::DocumentAI::V1beta3::GcsDocument, ::Hash] # A raw document on Google Cloud Storage. # - # Note: The following fields are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the # {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or @@ -963,11 +963,11 @@ def get_processor request, options = nil # @param custom_document_extraction_options [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::CustomDocumentExtractionOptions, ::Hash] # Options to control Custom Document Extraction (CDE) Processor. # - # Note: The following fields are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param foundation_model_tuning_options [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::FoundationModelTuningOptions, ::Hash] # Options to control foundation model tuning of a processor. # - # Note: The following fields are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent (project, location and processor) to create the new # version for. Format: @@ -2432,12 +2432,12 @@ def list_evaluations request, options = nil # Note that ProcessorVersions with `model_type` `MODEL_TYPE_LLM` are not # supported. # - # Note: The following fields are mutually exclusive: `processor_version_source`, `external_processor_version_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `processor_version_source`, `external_processor_version_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param external_processor_version_source [::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest::ExternalProcessorVersionSource, ::Hash] # The source processor version to import from. It can be from a different # environment and region than the destination processor. # - # Note: The following fields are mutually exclusive: `external_processor_version_source`, `processor_version_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `external_processor_version_source`, `processor_version_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The destination processor name to create the processor version # in. Format: diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb index a294d09c55ae..6ddb63dea648 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb @@ -246,15 +246,15 @@ def logger # @param inline_document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash] # An inline document proto. # - # Note: The following fields are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param raw_document [::Google::Cloud::DocumentAI::V1beta3::RawDocument, ::Hash] # A raw document content (bytes). # - # Note: The following fields are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_document [::Google::Cloud::DocumentAI::V1beta3::GcsDocument, ::Hash] # A raw document on Google Cloud Storage. # - # Note: The following fields are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param name [::String] # Required. The resource name of the # {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or @@ -908,11 +908,11 @@ def get_processor request, options = nil # @param custom_document_extraction_options [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::CustomDocumentExtractionOptions, ::Hash] # Options to control Custom Document Extraction (CDE) Processor. # - # Note: The following fields are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param foundation_model_tuning_options [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::FoundationModelTuningOptions, ::Hash] # Options to control foundation model tuning of a processor. # - # Note: The following fields are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The parent (project, location and processor) to create the new # version for. Format: @@ -2272,12 +2272,12 @@ def list_evaluations request, options = nil # Note that ProcessorVersions with `model_type` `MODEL_TYPE_LLM` are not # supported. # - # Note: The following fields are mutually exclusive: `processor_version_source`, `external_processor_version_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `processor_version_source`, `external_processor_version_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param external_processor_version_source [::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest::ExternalProcessorVersionSource, ::Hash] # The source processor version to import from. It can be from a different # environment and region than the destination processor. # - # Note: The following fields are mutually exclusive: `external_processor_version_source`, `processor_version_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `external_processor_version_source`, `processor_version_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The destination processor name to create the processor version # in. Format: diff --git a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb index 16478d798e94..e9aff54e621d 100644 --- a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb +++ b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb @@ -430,19 +430,19 @@ def publish_events request, options = nil # be found here: # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md # - # Note: The following fields are mutually exclusive: `proto_message`, `json_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `proto_message`, `json_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param json_message [::String] # The JSON format of the CloudEvent being published. Specification can be # found here: # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md # - # Note: The following fields are mutually exclusive: `json_message`, `proto_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `json_message`, `proto_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param avro_message [::String] # The Avro format of the CloudEvent being published. Specification can # be found here: # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md # - # Note: The following fields are mutually exclusive: `avro_message`, `proto_message`, `json_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `avro_message`, `proto_message`, `json_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] diff --git a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb index d154fe610428..35c5c881a9a8 100644 --- a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb +++ b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb @@ -409,19 +409,19 @@ def publish_events request, options = nil # be found here: # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md # - # Note: The following fields are mutually exclusive: `proto_message`, `json_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `proto_message`, `json_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param json_message [::String] # The JSON format of the CloudEvent being published. Specification can be # found here: # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md # - # Note: The following fields are mutually exclusive: `json_message`, `proto_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `json_message`, `proto_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param avro_message [::String] # The Avro format of the CloudEvent being published. Specification can # be found here: # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md # - # Note: The following fields are mutually exclusive: `avro_message`, `proto_message`, `json_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `avro_message`, `proto_message`, `json_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb index 4c8953b19494..95f6ad361940 100644 --- a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb +++ b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb @@ -310,7 +310,7 @@ def logger # @param transaction [::String] # Reads the document in a transaction. # - # Note: The following fields are mutually exclusive: `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Reads the version of the document at the given time. # @@ -318,7 +318,7 @@ def logger # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Firestore::V1::Document] @@ -443,7 +443,7 @@ def get_document request, options = nil # @param transaction [::String] # Perform the read as part of an already active transaction. # - # Note: The following fields are mutually exclusive: `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Perform the read at the provided time. # @@ -451,7 +451,7 @@ def get_document request, options = nil # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param show_missing [::Boolean] # If the list should show missing documents. # @@ -764,14 +764,14 @@ def delete_document request, options = nil # @param transaction [::String] # Reads documents in a transaction. # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] # Starts a new transaction and reads the documents. # Defaults to a read-only transaction. # The new transaction ID will be returned as the first response in the # stream. # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Reads documents as they were at the given time. # @@ -779,7 +779,7 @@ def delete_document request, options = nil # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse>] @@ -1149,14 +1149,14 @@ def rollback request, options = nil # # The value here is the opaque transaction ID to execute the query in. # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] # Starts a new transaction and reads the documents. # Defaults to a read-only transaction. # The new transaction ID will be returned as the first response in the # stream. # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Reads documents as they were at the given time. # @@ -1164,7 +1164,7 @@ def rollback request, options = nil # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] # Optional. Explain options for the query. If set, additional query # statistics will be returned. If not, only query results will be returned. @@ -1280,14 +1280,14 @@ def run_query request, options = nil # # The value here is the opaque transaction ID to execute the query in. # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] # Starts a new transaction as part of the query, defaulting to read-only. # # The new transaction ID will be returned as the first response in the # stream. # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Executes the query at the given timestamp. # @@ -1295,7 +1295,7 @@ def run_query request, options = nil # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] # Optional. Explain options for the query. If set, additional query # statistics will be returned. If not, only query results will be returned. diff --git a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb index fc20cf8103e6..78b2550d096d 100644 --- a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb +++ b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb @@ -296,7 +296,7 @@ def logger # @param transaction [::String] # Reads the document in a transaction. # - # Note: The following fields are mutually exclusive: `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Reads the version of the document at the given time. # @@ -304,7 +304,7 @@ def logger # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Firestore::V1::Document] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -422,7 +422,7 @@ def get_document request, options = nil # @param transaction [::String] # Perform the read as part of an already active transaction. # - # Note: The following fields are mutually exclusive: `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Perform the read at the provided time. # @@ -430,7 +430,7 @@ def get_document request, options = nil # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param show_missing [::Boolean] # If the list should show missing documents. # @@ -719,14 +719,14 @@ def delete_document request, options = nil # @param transaction [::String] # Reads documents in a transaction. # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] # Starts a new transaction and reads the documents. # Defaults to a read-only transaction. # The new transaction ID will be returned as the first response in the # stream. # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Reads documents as they were at the given time. # @@ -734,7 +734,7 @@ def delete_document request, options = nil # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @return [::Enumerable<::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. @@ -1078,14 +1078,14 @@ def rollback request, options = nil # # The value here is the opaque transaction ID to execute the query in. # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] # Starts a new transaction and reads the documents. # Defaults to a read-only transaction. # The new transaction ID will be returned as the first response in the # stream. # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Reads documents as they were at the given time. # @@ -1093,7 +1093,7 @@ def rollback request, options = nil # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] # Optional. Explain options for the query. If set, additional query # statistics will be returned. If not, only query results will be returned. @@ -1204,14 +1204,14 @@ def run_query request, options = nil # # The value here is the opaque transaction ID to execute the query in. # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] # Starts a new transaction as part of the query, defaulting to read-only. # # The new transaction ID will be returned as the first response in the # stream. # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param read_time [::Google::Protobuf::Timestamp, ::Hash] # Executes the query at the given timestamp. # @@ -1219,7 +1219,7 @@ def run_query request, options = nil # or if Point-in-Time Recovery is enabled, can additionally be a whole # minute timestamp within the past 7 days. # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] # Optional. Explain options for the query. If set, additional query # statistics will be returned. If not, only query results will be returned. diff --git a/google-cloud-monitoring-v3/lib/google/cloud/monitoring/v3/group_service/client.rb b/google-cloud-monitoring-v3/lib/google/cloud/monitoring/v3/group_service/client.rb index 0e20e40f61cc..9e5da2b9ebdb 100644 --- a/google-cloud-monitoring-v3/lib/google/cloud/monitoring/v3/group_service/client.rb +++ b/google-cloud-monitoring-v3/lib/google/cloud/monitoring/v3/group_service/client.rb @@ -253,7 +253,7 @@ def logger # Returns groups whose `parent_name` field contains the group # name. If no groups have this parent, the results are empty. # - # Note: The following fields are mutually exclusive: `children_of_group`, `ancestors_of_group`, `descendants_of_group`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `children_of_group`, `ancestors_of_group`, `descendants_of_group`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param ancestors_of_group [::String] # A group name. The format is: # @@ -264,7 +264,7 @@ def logger # ending with the most distant ancestor. If the specified group has no # immediate parent, the results are empty. # - # Note: The following fields are mutually exclusive: `ancestors_of_group`, `children_of_group`, `descendants_of_group`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `ancestors_of_group`, `children_of_group`, `descendants_of_group`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param descendants_of_group [::String] # A group name. The format is: # @@ -274,7 +274,7 @@ def logger # the results returned by the `children_of_group` filter, and includes # children-of-children, and so forth. # - # Note: The following fields are mutually exclusive: `descendants_of_group`, `children_of_group`, `ancestors_of_group`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `descendants_of_group`, `children_of_group`, `ancestors_of_group`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param page_size [::Integer] # A positive number that is the maximum number of results to return. # @param page_token [::String] diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/schema_service/client.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/schema_service/client.rb index b16bafb48d07..7305682d6cd6 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/schema_service/client.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/schema_service/client.rb @@ -1108,11 +1108,11 @@ def validate_schema request, options = nil # # Format is `projects/{project}/schemas/{schema}`. # - # Note: The following fields are mutually exclusive: `name`, `schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `name`, `schema`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param schema [::Google::Cloud::PubSub::V1::Schema, ::Hash] # Ad-hoc schema against which to validate # - # Note: The following fields are mutually exclusive: `schema`, `name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `schema`, `name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param message [::String] # Message to validate against the provided `schema_spec`. # @param encoding [::Google::Cloud::PubSub::V1::Encoding] diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/client.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/client.rb index fece30685a48..597cccb356ba 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/client.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/subscription_admin/client.rb @@ -1867,13 +1867,13 @@ def delete_snapshot request, options = nil # creation time), only retained messages will be marked as unacknowledged, # and already-expunged messages will not be restored. # - # Note: The following fields are mutually exclusive: `time`, `snapshot`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `time`, `snapshot`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param snapshot [::String] # Optional. The snapshot to seek to. The snapshot's topic must be the same # as that of the provided subscription. Format is # `projects/{project}/snapshots/{snap}`. # - # Note: The following fields are mutually exclusive: `snapshot`, `time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `snapshot`, `time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::PubSub::V1::SeekResponse] diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/builds/client.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/builds/client.rb index ac2849e313ae..341ce9962819 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/builds/client.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/builds/client.rb @@ -229,11 +229,11 @@ def logger # @param buildpack_build [::Google::Cloud::Run::V2::SubmitBuildRequest::BuildpacksBuild, ::Hash] # Build the source using Buildpacks. # - # Note: The following fields are mutually exclusive: `buildpack_build`, `docker_build`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `buildpack_build`, `docker_build`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param docker_build [::Google::Cloud::Run::V2::SubmitBuildRequest::DockerBuild, ::Hash] # Build the source using Docker. This means the source has a Dockerfile. # - # Note: The following fields are mutually exclusive: `docker_build`, `buildpack_build`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `docker_build`, `buildpack_build`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param service_account [::String] # Optional. The service account to use for the build. If not set, the default # Cloud Build service account for the project will be used. diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/builds/rest/client.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/builds/rest/client.rb index 1b967624f6fb..c6e008963a59 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/builds/rest/client.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/builds/rest/client.rb @@ -222,11 +222,11 @@ def logger # @param buildpack_build [::Google::Cloud::Run::V2::SubmitBuildRequest::BuildpacksBuild, ::Hash] # Build the source using Buildpacks. # - # Note: The following fields are mutually exclusive: `buildpack_build`, `docker_build`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `buildpack_build`, `docker_build`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param docker_build [::Google::Cloud::Run::V2::SubmitBuildRequest::DockerBuild, ::Hash] # Build the source using Docker. This means the source has a Dockerfile. # - # Note: The following fields are mutually exclusive: `docker_build`, `buildpack_build`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `docker_build`, `buildpack_build`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param service_account [::String] # Optional. The service account to use for the build. If not set, the default # Cloud Build service account for the project will be used. diff --git a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb index 84e6291c7bd0..6a1e26691c20 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb @@ -1708,7 +1708,7 @@ def begin_transaction request, options = nil # @param transaction_id [::String] # Commit a previously-started transaction. # - # Note: The following fields are mutually exclusive: `transaction_id`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `transaction_id`, `single_use_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param single_use_transaction [::Google::Cloud::Spanner::V1::TransactionOptions, ::Hash] # Execute mutations in a temporary transaction. Note that unlike # commit of a previously-started transaction, commit with a @@ -1720,7 +1720,7 @@ def begin_transaction request, options = nil # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction} and # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} instead. # - # Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `single_use_transaction`, `transaction_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mutations [::Array<::Google::Cloud::Spanner::V1::Mutation, ::Hash>] # The mutations to be executed when this transaction commits. All # mutations are applied atomically, in the order they appear in diff --git a/google-cloud-speech-v2/lib/google/cloud/speech/v2/speech/client.rb b/google-cloud-speech-v2/lib/google/cloud/speech/v2/speech/client.rb index a0fe6a4afd6d..e84706e23bd6 100644 --- a/google-cloud-speech-v2/lib/google/cloud/speech/v2/speech/client.rb +++ b/google-cloud-speech-v2/lib/google/cloud/speech/v2/speech/client.rb @@ -880,7 +880,7 @@ def undelete_recognizer request, options = nil # with all bytes fields, proto buffers use a pure binary representation, # whereas JSON representations use base64. # - # Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `content`, `uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param uri [::String] # URI that points to a file that contains audio data bytes as specified in # {::Google::Cloud::Speech::V2::RecognitionConfig RecognitionConfig}. The file @@ -891,7 +891,7 @@ def undelete_recognizer request, options = nil # information, see [Request # URIs](https://cloud.google.com/storage/docs/reference-uris). # - # Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `uri`, `content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Speech::V2::RecognizeResponse] diff --git a/google-cloud-speech-v2/lib/google/cloud/speech/v2/speech/rest/client.rb b/google-cloud-speech-v2/lib/google/cloud/speech/v2/speech/rest/client.rb index ee5df14290d9..c38d34742b0b 100644 --- a/google-cloud-speech-v2/lib/google/cloud/speech/v2/speech/rest/client.rb +++ b/google-cloud-speech-v2/lib/google/cloud/speech/v2/speech/rest/client.rb @@ -832,7 +832,7 @@ def undelete_recognizer request, options = nil # with all bytes fields, proto buffers use a pure binary representation, # whereas JSON representations use base64. # - # Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `content`, `uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param uri [::String] # URI that points to a file that contains audio data bytes as specified in # {::Google::Cloud::Speech::V2::RecognitionConfig RecognitionConfig}. The file @@ -843,7 +843,7 @@ def undelete_recognizer request, options = nil # information, see [Request # URIs](https://cloud.google.com/storage/docs/reference-uris). # - # Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `uri`, `content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Speech::V2::RecognizeResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb index e5dbcbce791f..c1879f8a001c 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb @@ -3200,11 +3200,11 @@ def delete_adaptive_mt_file request, options = nil # @param file_input_source [::Google::Cloud::Translate::V3::FileInputSource, ::Hash] # Inline file source. # - # Note: The following fields are mutually exclusive: `file_input_source`, `gcs_input_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `file_input_source`, `gcs_input_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_input_source [::Google::Cloud::Translate::V3::GcsInputSource, ::Hash] # Google Cloud Storage file source. # - # Note: The following fields are mutually exclusive: `gcs_input_source`, `file_input_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_input_source`, `file_input_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb index f63b924d2c88..8aea8c3fc54c 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb @@ -2998,11 +2998,11 @@ def delete_adaptive_mt_file request, options = nil # @param file_input_source [::Google::Cloud::Translate::V3::FileInputSource, ::Hash] # Inline file source. # - # Note: The following fields are mutually exclusive: `file_input_source`, `gcs_input_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `file_input_source`, `gcs_input_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param gcs_input_source [::Google::Cloud::Translate::V3::GcsInputSource, ::Hash] # Google Cloud Storage file source. # - # Note: The following fields are mutually exclusive: `gcs_input_source`, `file_input_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `gcs_input_source`, `file_input_source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/client.rb b/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/client.rb index e91bcaefab0f..7a626bb6bbcf 100644 --- a/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/client.rb +++ b/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/client.rb @@ -2140,12 +2140,12 @@ def import_product_sets request, options = nil # @param product_set_purge_config [::Google::Cloud::Vision::V1::ProductSetPurgeConfig, ::Hash] # Specify which ProductSet contains the Products to be deleted. # - # Note: The following fields are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param delete_orphan_products [::Boolean] # If delete_orphan_products is true, all Products that are not in any # ProductSet will be deleted. # - # Note: The following fields are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The project and location in which the Products should be deleted. # diff --git a/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb b/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb index 653348787a01..a5569310731e 100644 --- a/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb +++ b/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb @@ -2007,12 +2007,12 @@ def import_product_sets request, options = nil # @param product_set_purge_config [::Google::Cloud::Vision::V1::ProductSetPurgeConfig, ::Hash] # Specify which ProductSet contains the Products to be deleted. # - # Note: The following fields are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param delete_orphan_products [::Boolean] # If delete_orphan_products is true, all Products that are not in any # ProductSet will be deleted. # - # Note: The following fields are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following parameters are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param parent [::String] # Required. The project and location in which the Products should be deleted. # From 9722090f43d02e3c9179e4b5f1d6099c30f74b0d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:25:19 +0000 Subject: [PATCH 205/457] chore(main): release google-shopping-merchant-reviews-v1beta 0.4.0 (#30678) --- .release-please-manifest.json | 2 +- google-shopping-merchant-reviews-v1beta/CHANGELOG.md | 6 ++++++ .../lib/google/shopping/merchant/reviews/v1beta/version.rb | 2 +- ...et_metadata_google.shopping.merchant.reviews.v1beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c2989c197506..509c8185bfe0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -951,7 +951,7 @@ "google-shopping-merchant-reports-v1beta+FILLER": "0.0.0", "google-shopping-merchant-reviews": "0.2.1", "google-shopping-merchant-reviews+FILLER": "0.0.0", - "google-shopping-merchant-reviews-v1beta": "0.3.0", + "google-shopping-merchant-reviews-v1beta": "0.4.0", "google-shopping-merchant-reviews-v1beta+FILLER": "0.0.0", "grafeas": "1.5.2", "grafeas+FILLER": "0.0.0", diff --git a/google-shopping-merchant-reviews-v1beta/CHANGELOG.md b/google-shopping-merchant-reviews-v1beta/CHANGELOG.md index 02c2d7cc79c4..ccebda404044 100644 --- a/google-shopping-merchant-reviews-v1beta/CHANGELOG.md +++ b/google-shopping-merchant-reviews-v1beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.4.0 (2025-07-15) + +#### Features + +* Added is_verified_purchase and is_incentivized_review to product review attributes ([#30621](https://github.com/googleapis/google-cloud-ruby/issues/30621)) + ### 0.3.0 (2025-05-11) #### Features diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb index cb86a7ff790e..f6e77406491d 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Reviews module V1beta - VERSION = "0.3.0" + VERSION = "0.4.0" end end end diff --git a/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json b/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json index cfd4b1521932..f17dd59cba2f 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json +++ b/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-reviews-v1beta", - "version": "0.3.0", + "version": "0.4.0", "language": "RUBY", "apis": [ { From 25feed10cc832d1f2db3b78892fb9bdd15e5ad63 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:25:38 +0000 Subject: [PATCH 206/457] chore(main): release google-shopping-merchant-products-v1beta 0.7.0 (#30677) --- .release-please-manifest.json | 2 +- google-shopping-merchant-products-v1beta/CHANGELOG.md | 7 +++++++ .../google/shopping/merchant/products/v1beta/version.rb | 2 +- ..._metadata_google.shopping.merchant.products.v1beta.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 509c8185bfe0..9820fd5de8de 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -935,7 +935,7 @@ "google-shopping-merchant-order_tracking-v1beta+FILLER": "0.0.0", "google-shopping-merchant-products": "0.2.2", "google-shopping-merchant-products+FILLER": "0.0.0", - "google-shopping-merchant-products-v1beta": "0.6.0", + "google-shopping-merchant-products-v1beta": "0.7.0", "google-shopping-merchant-products-v1beta+FILLER": "0.0.0", "google-shopping-merchant-promotions": "0.2.1", "google-shopping-merchant-promotions+FILLER": "0.0.0", diff --git a/google-shopping-merchant-products-v1beta/CHANGELOG.md b/google-shopping-merchant-products-v1beta/CHANGELOG.md index f70de728c271..07e6df0a1eb9 100644 --- a/google-shopping-merchant-products-v1beta/CHANGELOG.md +++ b/google-shopping-merchant-products-v1beta/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 0.7.0 (2025-07-15) + +#### Features + +* Added maximum_retail_price field (applicable to India only) +* Renamed "gtin" field to "gtins" and deprecated the old field + ### 0.6.0 (2025-05-11) #### Features diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb index a680e0247b9e..2dfe1e049db7 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Products module V1beta - VERSION = "0.6.0" + VERSION = "0.7.0" end end end diff --git a/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json b/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json index 0bca8a46e95a..627399a2ffc5 100644 --- a/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json +++ b/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-products-v1beta", - "version": "0.6.0", + "version": "0.7.0", "language": "RUBY", "apis": [ { From 63a42679be0c4a87f92fa4c03014041e3d50f91e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:25:56 +0000 Subject: [PATCH 207/457] chore(main): release google-maps-fleet_engine-v1 0.7.0 (#30676) --- .release-please-manifest.json | 2 +- google-maps-fleet_engine-v1/CHANGELOG.md | 7 +++++++ .../lib/google/maps/fleet_engine/v1/version.rb | 2 +- .../snippets/snippet_metadata_maps.fleetengine.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9820fd5de8de..cf814764c51f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -895,7 +895,7 @@ "google-maps-fleet_engine-delivery+FILLER": "0.0.0", "google-maps-fleet_engine-delivery-v1": "0.6.0", "google-maps-fleet_engine-delivery-v1+FILLER": "0.0.0", - "google-maps-fleet_engine-v1": "0.6.0", + "google-maps-fleet_engine-v1": "0.7.0", "google-maps-fleet_engine-v1+FILLER": "0.0.0", "google-shopping-css": "1.2.1", "google-shopping-css+FILLER": "0.0.0", diff --git a/google-maps-fleet_engine-v1/CHANGELOG.md b/google-maps-fleet_engine-v1/CHANGELOG.md index d389f7d92756..5f07880897de 100644 --- a/google-maps-fleet_engine-v1/CHANGELOG.md +++ b/google-maps-fleet_engine-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 0.7.0 (2025-07-15) + +#### Features + +* Support for Android's Fused Location Provider +* Support for custom Trip attributes + ### 0.6.0 (2025-05-11) #### Features diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb index 92fcaad83e92..d84496aa48f4 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb @@ -21,7 +21,7 @@ module Google module Maps module FleetEngine module V1 - VERSION = "0.6.0" + VERSION = "0.7.0" end end end diff --git a/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json b/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json index 4fac83a1286e..a85b74aa82e6 100644 --- a/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json +++ b/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-maps-fleet_engine-v1", - "version": "0.6.0", + "version": "0.7.0", "language": "RUBY", "apis": [ { From 4578cbf6f82fe403531fd914319dbdaa3bb2c517 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:26:15 +0000 Subject: [PATCH 208/457] chore(main): release google-maps-fleet_engine-delivery-v1 0.7.0 (#30675) --- .release-please-manifest.json | 2 +- google-maps-fleet_engine-delivery-v1/CHANGELOG.md | 6 ++++++ .../lib/google/maps/fleet_engine/delivery/v1/version.rb | 2 +- .../snippet_metadata_maps.fleetengine.delivery.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cf814764c51f..01ea1c40637e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -893,7 +893,7 @@ "google-maps-fleet_engine+FILLER": "0.0.0", "google-maps-fleet_engine-delivery": "1.1.1", "google-maps-fleet_engine-delivery+FILLER": "0.0.0", - "google-maps-fleet_engine-delivery-v1": "0.6.0", + "google-maps-fleet_engine-delivery-v1": "0.7.0", "google-maps-fleet_engine-delivery-v1+FILLER": "0.0.0", "google-maps-fleet_engine-v1": "0.7.0", "google-maps-fleet_engine-v1+FILLER": "0.0.0", diff --git a/google-maps-fleet_engine-delivery-v1/CHANGELOG.md b/google-maps-fleet_engine-delivery-v1/CHANGELOG.md index 67bfc4333e4a..a402f2aa6c1c 100644 --- a/google-maps-fleet_engine-delivery-v1/CHANGELOG.md +++ b/google-maps-fleet_engine-delivery-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.7.0 (2025-07-15) + +#### Features + +* add ability to specify trip attributes to Trip and deprecate Trip.remaining_waypoints_version ([#30620](https://github.com/googleapis/google-cloud-ruby/issues/30620)) + ### 0.6.0 (2025-05-11) #### Features diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb index e6f14a547cc8..cb5b02e81cc9 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb @@ -22,7 +22,7 @@ module Maps module FleetEngine module Delivery module V1 - VERSION = "0.6.0" + VERSION = "0.7.0" end end end diff --git a/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json b/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json index dbdb7574f5d6..a18856daed1e 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json +++ b/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-maps-fleet_engine-delivery-v1", - "version": "0.6.0", + "version": "0.7.0", "language": "RUBY", "apis": [ { From aa7fbe7acc3d844b2626fb4867ad16b270830b54 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:26:33 +0000 Subject: [PATCH 209/457] chore(main): release google-cloud-workstations-v1beta 0.5.1 (#30674) --- .release-please-manifest.json | 2 +- google-cloud-workstations-v1beta/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/workstations/v1beta/version.rb | 2 +- .../snippet_metadata_google.cloud.workstations.v1beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 01ea1c40637e..7f4dc4444a7b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -867,7 +867,7 @@ "google-cloud-workstations+FILLER": "0.0.0", "google-cloud-workstations-v1": "1.1.0", "google-cloud-workstations-v1+FILLER": "0.0.0", - "google-cloud-workstations-v1beta": "0.5.0", + "google-cloud-workstations-v1beta": "0.5.1", "google-cloud-workstations-v1beta+FILLER": "0.0.0", "google-iam-client": "1.1.1", "google-iam-client+FILLER": "0.0.0", diff --git a/google-cloud-workstations-v1beta/CHANGELOG.md b/google-cloud-workstations-v1beta/CHANGELOG.md index 71ae8a1a0080..90818ecb058f 100644 --- a/google-cloud-workstations-v1beta/CHANGELOG.md +++ b/google-cloud-workstations-v1beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.5.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30625](https://github.com/googleapis/google-cloud-ruby/issues/30625)) + ### 0.5.0 (2025-05-11) #### Features diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb index 131ace2ef2e9..fb948178f0d0 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Workstations module V1beta - VERSION = "0.5.0" + VERSION = "0.5.1" end end end diff --git a/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json b/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json index 563cc9ace748..10cbb74fff99 100644 --- a/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json +++ b/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-workstations-v1beta", - "version": "0.5.0", + "version": "0.5.1", "language": "RUBY", "apis": [ { From f6b7e867e78c46d4dfabe29965b1d377769390a6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:26:52 +0000 Subject: [PATCH 210/457] chore(main): release google-cloud-workstations-v1 1.1.1 (#30673) --- .release-please-manifest.json | 2 +- google-cloud-workstations-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/workstations/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.workstations.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7f4dc4444a7b..c908eb2f1c82 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -865,7 +865,7 @@ "google-cloud-workflows-v1beta+FILLER": "0.0.0", "google-cloud-workstations": "2.0.1", "google-cloud-workstations+FILLER": "0.0.0", - "google-cloud-workstations-v1": "1.1.0", + "google-cloud-workstations-v1": "1.1.1", "google-cloud-workstations-v1+FILLER": "0.0.0", "google-cloud-workstations-v1beta": "0.5.1", "google-cloud-workstations-v1beta+FILLER": "0.0.0", diff --git a/google-cloud-workstations-v1/CHANGELOG.md b/google-cloud-workstations-v1/CHANGELOG.md index b5c547de221e..9d15b9a7e17b 100644 --- a/google-cloud-workstations-v1/CHANGELOG.md +++ b/google-cloud-workstations-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.1.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30625](https://github.com/googleapis/google-cloud-ruby/issues/30625)) + ### 1.1.0 (2025-05-12) #### Features diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb index 4afbb64208aa..6c4455b5122a 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Workstations module V1 - VERSION = "1.1.0" + VERSION = "1.1.1" end end end diff --git a/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json b/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json index f666a04237de..cf0553c3645e 100644 --- a/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json +++ b/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-workstations-v1", - "version": "1.1.0", + "version": "1.1.1", "language": "RUBY", "apis": [ { From 15050999560d8093f3a60bc04d4ef85b6e786d2e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:27:10 +0000 Subject: [PATCH 211/457] chore(main): release google-cloud-vision_ai-v1 1.1.1 (#30672) --- .release-please-manifest.json | 2 +- google-cloud-vision_ai-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/vision_ai/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.visionai.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c908eb2f1c82..a970a47e0e17 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -827,7 +827,7 @@ "google-cloud-vision-v1p4beta1+FILLER": "0.0.0", "google-cloud-vision_ai": "1.0.1", "google-cloud-vision_ai+FILLER": "0.0.0", - "google-cloud-vision_ai-v1": "1.1.0", + "google-cloud-vision_ai-v1": "1.1.1", "google-cloud-vision_ai-v1+FILLER": "0.0.0", "google-cloud-vm_migration": "2.0.1", "google-cloud-vm_migration+FILLER": "0.0.0", diff --git a/google-cloud-vision_ai-v1/CHANGELOG.md b/google-cloud-vision_ai-v1/CHANGELOG.md index 39b1258a1776..4d397a001e20 100644 --- a/google-cloud-vision_ai-v1/CHANGELOG.md +++ b/google-cloud-vision_ai-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.1.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30625](https://github.com/googleapis/google-cloud-ruby/issues/30625)) + ### 1.1.0 (2025-05-12) #### Features diff --git a/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/version.rb b/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/version.rb index 1cd82de5772e..a572a0b81608 100644 --- a/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/version.rb +++ b/google-cloud-vision_ai-v1/lib/google/cloud/vision_ai/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module VisionAI module V1 - VERSION = "1.1.0" + VERSION = "1.1.1" end end end diff --git a/google-cloud-vision_ai-v1/snippets/snippet_metadata_google.cloud.visionai.v1.json b/google-cloud-vision_ai-v1/snippets/snippet_metadata_google.cloud.visionai.v1.json index 9c74eb5ded83..7920fee89dd4 100644 --- a/google-cloud-vision_ai-v1/snippets/snippet_metadata_google.cloud.visionai.v1.json +++ b/google-cloud-vision_ai-v1/snippets/snippet_metadata_google.cloud.visionai.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-vision_ai-v1", - "version": "1.1.0", + "version": "1.1.1", "language": "RUBY", "apis": [ { From b196c262b27d81597bda94743df8de0f43188e44 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:27:29 +0000 Subject: [PATCH 212/457] chore(main): release google-cloud-vision-v1p4beta1 0.12.1 (#30671) --- .release-please-manifest.json | 2 +- google-cloud-vision-v1p4beta1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/vision/v1p4beta1/version.rb | 2 +- .../snippet_metadata_google.cloud.vision.v1p4beta1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a970a47e0e17..538a28e080e5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -823,7 +823,7 @@ "google-cloud-vision-v1+FILLER": "0.0.0", "google-cloud-vision-v1p3beta1": "0.16.0", "google-cloud-vision-v1p3beta1+FILLER": "0.0.0", - "google-cloud-vision-v1p4beta1": "0.12.0", + "google-cloud-vision-v1p4beta1": "0.12.1", "google-cloud-vision-v1p4beta1+FILLER": "0.0.0", "google-cloud-vision_ai": "1.0.1", "google-cloud-vision_ai+FILLER": "0.0.0", diff --git a/google-cloud-vision-v1p4beta1/CHANGELOG.md b/google-cloud-vision-v1p4beta1/CHANGELOG.md index 777e5c30a1e7..f829742fd19d 100644 --- a/google-cloud-vision-v1p4beta1/CHANGELOG.md +++ b/google-cloud-vision-v1p4beta1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.12.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30625](https://github.com/googleapis/google-cloud-ruby/issues/30625)) + ### 0.12.0 (2025-05-12) #### Features diff --git a/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/version.rb b/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/version.rb index 44c9864a9483..afb8e2b42c26 100644 --- a/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/version.rb +++ b/google-cloud-vision-v1p4beta1/lib/google/cloud/vision/v1p4beta1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Vision module V1p4beta1 - VERSION = "0.12.0" + VERSION = "0.12.1" end end end diff --git a/google-cloud-vision-v1p4beta1/snippets/snippet_metadata_google.cloud.vision.v1p4beta1.json b/google-cloud-vision-v1p4beta1/snippets/snippet_metadata_google.cloud.vision.v1p4beta1.json index 23d0cc9a63ed..4d561b7ac562 100644 --- a/google-cloud-vision-v1p4beta1/snippets/snippet_metadata_google.cloud.vision.v1p4beta1.json +++ b/google-cloud-vision-v1p4beta1/snippets/snippet_metadata_google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-vision-v1p4beta1", - "version": "0.12.0", + "version": "0.12.1", "language": "RUBY", "apis": [ { From 3ccb3b86f5dcd9ebc0873f9f320786ec615c5e8f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:27:47 +0000 Subject: [PATCH 213/457] chore(main): release google-cloud-vision-v1 1.3.1 (#30670) --- .release-please-manifest.json | 2 +- google-cloud-vision-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/vision/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.vision.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 538a28e080e5..21f9aded61cf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -819,7 +819,7 @@ "google-cloud-video_intelligence-v1p3beta1+FILLER": "0.0.0", "google-cloud-vision": "2.0.2", "google-cloud-vision+FILLER": "0.0.0", - "google-cloud-vision-v1": "1.3.0", + "google-cloud-vision-v1": "1.3.1", "google-cloud-vision-v1+FILLER": "0.0.0", "google-cloud-vision-v1p3beta1": "0.16.0", "google-cloud-vision-v1p3beta1+FILLER": "0.0.0", diff --git a/google-cloud-vision-v1/CHANGELOG.md b/google-cloud-vision-v1/CHANGELOG.md index d791385cf47b..3b3ae416e535 100644 --- a/google-cloud-vision-v1/CHANGELOG.md +++ b/google-cloud-vision-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.3.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.3.0 (2025-05-12) #### Features diff --git a/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb b/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb index 61fbc8b77043..78852f7f8113 100644 --- a/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb +++ b/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Vision module V1 - VERSION = "1.3.0" + VERSION = "1.3.1" end end end diff --git a/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json b/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json index f66f42bcb6b1..841f725521f2 100644 --- a/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json +++ b/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-vision-v1", - "version": "1.3.0", + "version": "1.3.1", "language": "RUBY", "apis": [ { From e59bd09cb9a03acd21355be5aea9d4a73c4bfecb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:28:06 +0000 Subject: [PATCH 214/457] chore(main): release google-cloud-translate-v3 1.5.2 (#30669) --- .release-please-manifest.json | 2 +- google-cloud-translate-v3/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/translate/v3/version.rb | 2 +- .../snippet_metadata_google.cloud.translation.v3.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 21f9aded61cf..7fc9c6d51683 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -791,7 +791,7 @@ "google-cloud-translate+FILLER": "0.0.0", "google-cloud-translate-v2": "1.1.0", "google-cloud-translate-v2+FILLER": "0.0.0", - "google-cloud-translate-v3": "1.5.1", + "google-cloud-translate-v3": "1.5.2", "google-cloud-translate-v3+FILLER": "0.0.0", "google-cloud-video-live_stream": "2.0.1", "google-cloud-video-live_stream+FILLER": "0.0.0", diff --git a/google-cloud-translate-v3/CHANGELOG.md b/google-cloud-translate-v3/CHANGELOG.md index fffa22666aea..c34ff09f43d8 100644 --- a/google-cloud-translate-v3/CHANGELOG.md +++ b/google-cloud-translate-v3/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.5.2 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.5.1 (2025-06-24) #### Documentation diff --git a/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb b/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb index ddeb1a9df61c..bb5e686c3f2e 100644 --- a/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb +++ b/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Translate module V3 - VERSION = "1.5.1" + VERSION = "1.5.2" end end end diff --git a/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json b/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json index 978397cc6a92..d068407ebd3b 100644 --- a/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json +++ b/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-translate-v3", - "version": "1.5.1", + "version": "1.5.2", "language": "RUBY", "apis": [ { From f48c6668539c0dea433b849aedc03168bcffba94 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:28:24 +0000 Subject: [PATCH 215/457] chore(main): release google-cloud-storage-control-v2 1.5.0 (#30668) --- .release-please-manifest.json | 2 +- google-cloud-storage-control-v2/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/storage/control/v2/version.rb | 2 +- .../snippet_metadata_google.storage.control.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7fc9c6d51683..cc6c61b54ebb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -733,7 +733,7 @@ "google-cloud-storage+FILLER": "0.0.0", "google-cloud-storage-control": "1.1.1", "google-cloud-storage-control+FILLER": "0.0.0", - "google-cloud-storage-control-v2": "1.4.0", + "google-cloud-storage-control-v2": "1.5.0", "google-cloud-storage-control-v2+FILLER": "0.0.0", "google-cloud-storage_batch_operations": "0.1.1", "google-cloud-storage_batch_operations+FILLER": "0.0.0", diff --git a/google-cloud-storage-control-v2/CHANGELOG.md b/google-cloud-storage-control-v2/CHANGELOG.md index d64c89763306..3b0796524e09 100644 --- a/google-cloud-storage-control-v2/CHANGELOG.md +++ b/google-cloud-storage-control-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.5.0 (2025-07-15) + +#### Features + +* Support for REST transport ([#30535](https://github.com/googleapis/google-cloud-ruby/issues/30535)) + ### 1.4.0 (2025-05-16) #### Features diff --git a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/version.rb b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/version.rb index 3a09ae73fd85..0c9fa0acae1b 100644 --- a/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/version.rb +++ b/google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/version.rb @@ -22,7 +22,7 @@ module Cloud module Storage module Control module V2 - VERSION = "1.4.0" + VERSION = "1.5.0" end end end diff --git a/google-cloud-storage-control-v2/snippets/snippet_metadata_google.storage.control.v2.json b/google-cloud-storage-control-v2/snippets/snippet_metadata_google.storage.control.v2.json index ba76739e468b..45bc6ffca466 100644 --- a/google-cloud-storage-control-v2/snippets/snippet_metadata_google.storage.control.v2.json +++ b/google-cloud-storage-control-v2/snippets/snippet_metadata_google.storage.control.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-storage-control-v2", - "version": "1.4.0", + "version": "1.5.0", "language": "RUBY", "apis": [ { From 7cd535a69214c896fe921068e749586c7b625720 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:28:43 +0000 Subject: [PATCH 216/457] chore(main): release google-cloud-speech-v2 1.2.1 (#30667) --- .release-please-manifest.json | 2 +- google-cloud-speech-v2/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/speech/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.speech.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cc6c61b54ebb..e98c81144671 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -727,7 +727,7 @@ "google-cloud-speech-v1+FILLER": "0.0.0", "google-cloud-speech-v1p1beta1": "0.25.0", "google-cloud-speech-v1p1beta1+FILLER": "0.0.0", - "google-cloud-speech-v2": "1.2.0", + "google-cloud-speech-v2": "1.2.1", "google-cloud-speech-v2+FILLER": "0.0.0", "google-cloud-storage": "1.56.0", "google-cloud-storage+FILLER": "0.0.0", diff --git a/google-cloud-speech-v2/CHANGELOG.md b/google-cloud-speech-v2/CHANGELOG.md index 41b7373f2b86..1e2f9a58db1b 100644 --- a/google-cloud-speech-v2/CHANGELOG.md +++ b/google-cloud-speech-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.2.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.2.0 (2025-06-16) #### Features diff --git a/google-cloud-speech-v2/lib/google/cloud/speech/v2/version.rb b/google-cloud-speech-v2/lib/google/cloud/speech/v2/version.rb index bf26ace59fd8..57c1e2307e9b 100644 --- a/google-cloud-speech-v2/lib/google/cloud/speech/v2/version.rb +++ b/google-cloud-speech-v2/lib/google/cloud/speech/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Speech module V2 - VERSION = "1.2.0" + VERSION = "1.2.1" end end end diff --git a/google-cloud-speech-v2/snippets/snippet_metadata_google.cloud.speech.v2.json b/google-cloud-speech-v2/snippets/snippet_metadata_google.cloud.speech.v2.json index 39ec20b22baf..dda014f75d61 100644 --- a/google-cloud-speech-v2/snippets/snippet_metadata_google.cloud.speech.v2.json +++ b/google-cloud-speech-v2/snippets/snippet_metadata_google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-speech-v2", - "version": "1.2.0", + "version": "1.2.1", "language": "RUBY", "apis": [ { From b61324d85b4b72afc8c6460eed7147bd067470d3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:29:01 +0000 Subject: [PATCH 217/457] chore(main): release google-cloud-spanner-v1 1.9.1 (#30666) --- .release-please-manifest.json | 2 +- google-cloud-spanner-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/spanner/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.spanner.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e98c81144671..4844eefcbf95 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -719,7 +719,7 @@ "google-cloud-spanner-admin-database-v1+FILLER": "0.0.0", "google-cloud-spanner-admin-instance-v1": "2.1.0", "google-cloud-spanner-admin-instance-v1+FILLER": "0.0.0", - "google-cloud-spanner-v1": "1.9.0", + "google-cloud-spanner-v1": "1.9.1", "google-cloud-spanner-v1+FILLER": "0.0.0", "google-cloud-speech": "2.0.2", "google-cloud-speech+FILLER": "0.0.0", diff --git a/google-cloud-spanner-v1/CHANGELOG.md b/google-cloud-spanner-v1/CHANGELOG.md index 5e1977749ccd..a56aa2cbabe9 100644 --- a/google-cloud-spanner-v1/CHANGELOG.md +++ b/google-cloud-spanner-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.9.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.9.0 (2025-06-13) #### Features diff --git a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb index 9b1cd35fca30..39cffd0eb3cc 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Spanner module V1 - VERSION = "1.9.0" + VERSION = "1.9.1" end end end diff --git a/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json b/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json index 7faa1878ff23..a7bd0e885af6 100644 --- a/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json +++ b/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-spanner-v1", - "version": "1.9.0", + "version": "1.9.1", "language": "RUBY", "apis": [ { From 8138f9fd8a935e32a9d2fa9d0b1c732a67ec30ff Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:29:20 +0000 Subject: [PATCH 218/457] chore(main): release google-cloud-run-v2 0.24.1 (#30665) --- .release-please-manifest.json | 2 +- google-cloud-run-v2/CHANGELOG.md | 6 ++++++ google-cloud-run-v2/lib/google/cloud/run/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.run.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4844eefcbf95..7d086539b6c3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -645,7 +645,7 @@ "google-cloud-retail-v2+FILLER": "0.0.0", "google-cloud-run-client": "1.4.1", "google-cloud-run-client+FILLER": "0.0.0", - "google-cloud-run-v2": "0.24.0", + "google-cloud-run-v2": "0.24.1", "google-cloud-run-v2+FILLER": "0.0.0", "google-cloud-scheduler": "3.0.2", "google-cloud-scheduler+FILLER": "0.0.0", diff --git a/google-cloud-run-v2/CHANGELOG.md b/google-cloud-run-v2/CHANGELOG.md index d67d3b0c9d50..b203453af8d2 100644 --- a/google-cloud-run-v2/CHANGELOG.md +++ b/google-cloud-run-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.24.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 0.24.0 (2025-05-16) #### Features diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb index 495d9deb21b1..e96e0668f261 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Run module V2 - VERSION = "0.24.0" + VERSION = "0.24.1" end end end diff --git a/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json b/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json index 6ae253e279a2..2147f8da75fd 100644 --- a/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json +++ b/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-run-v2", - "version": "0.24.0", + "version": "0.24.1", "language": "RUBY", "apis": [ { From cba6a60f731e3d89dea9a0b37d208844c87c8909 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:29:38 +0000 Subject: [PATCH 219/457] chore(main): release google-cloud-pubsub-v1 1.11.1 (#30664) --- .release-please-manifest.json | 2 +- google-cloud-pubsub-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/pubsub/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.pubsub.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7d086539b6c3..16152b3dd4ae 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -603,7 +603,7 @@ "google-cloud-profiler-v2+FILLER": "0.0.0", "google-cloud-pubsub": "2.23.0", "google-cloud-pubsub+FILLER": "0.0.0", - "google-cloud-pubsub-v1": "1.11.0", + "google-cloud-pubsub-v1": "1.11.1", "google-cloud-pubsub-v1+FILLER": "0.0.0", "google-cloud-rapid_migration_assessment": "2.0.1", "google-cloud-rapid_migration_assessment+FILLER": "0.0.0", diff --git a/google-cloud-pubsub-v1/CHANGELOG.md b/google-cloud-pubsub-v1/CHANGELOG.md index cccd8eed6513..e1af1125154b 100644 --- a/google-cloud-pubsub-v1/CHANGELOG.md +++ b/google-cloud-pubsub-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.11.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.11.0 (2025-07-01) #### Features diff --git a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb index 3e0b9d06d940..3ed4de0d79c5 100644 --- a/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb +++ b/google-cloud-pubsub-v1/lib/google/cloud/pubsub/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module PubSub module V1 - VERSION = "1.11.0" + VERSION = "1.11.1" end end end diff --git a/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json b/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json index 0925b1a018df..1254ff671d94 100644 --- a/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json +++ b/google-cloud-pubsub-v1/snippets/snippet_metadata_google.pubsub.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-pubsub-v1", - "version": "1.11.0", + "version": "1.11.1", "language": "RUBY", "apis": [ { From 4fa2563eec094ffd6418e2f19bd1aaf0a7b208f0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:29:57 +0000 Subject: [PATCH 220/457] chore(main): release google-cloud-monitoring-v3 1.6.1 (#30662) --- .release-please-manifest.json | 2 +- google-cloud-monitoring-v3/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/monitoring/v3/version.rb | 2 +- .../snippets/snippet_metadata_google.monitoring.v3.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 16152b3dd4ae..61c13e2aba3d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -505,7 +505,7 @@ "google-cloud-monitoring-dashboard-v1+FILLER": "0.0.0", "google-cloud-monitoring-metrics_scope-v1": "1.3.0", "google-cloud-monitoring-metrics_scope-v1+FILLER": "0.0.0", - "google-cloud-monitoring-v3": "1.6.0", + "google-cloud-monitoring-v3": "1.6.1", "google-cloud-monitoring-v3+FILLER": "0.0.0", "google-cloud-netapp": "2.0.1", "google-cloud-netapp+FILLER": "0.0.0", diff --git a/google-cloud-monitoring-v3/CHANGELOG.md b/google-cloud-monitoring-v3/CHANGELOG.md index 47af6371df3a..1df59e573001 100644 --- a/google-cloud-monitoring-v3/CHANGELOG.md +++ b/google-cloud-monitoring-v3/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.6.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.6.0 (2025-05-12) #### Features diff --git a/google-cloud-monitoring-v3/lib/google/cloud/monitoring/v3/version.rb b/google-cloud-monitoring-v3/lib/google/cloud/monitoring/v3/version.rb index 6f6734f28b0a..6b372c020aa6 100644 --- a/google-cloud-monitoring-v3/lib/google/cloud/monitoring/v3/version.rb +++ b/google-cloud-monitoring-v3/lib/google/cloud/monitoring/v3/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Monitoring module V3 - VERSION = "1.6.0" + VERSION = "1.6.1" end end end diff --git a/google-cloud-monitoring-v3/snippets/snippet_metadata_google.monitoring.v3.json b/google-cloud-monitoring-v3/snippets/snippet_metadata_google.monitoring.v3.json index b0e7abd2c80b..e21db75936c5 100644 --- a/google-cloud-monitoring-v3/snippets/snippet_metadata_google.monitoring.v3.json +++ b/google-cloud-monitoring-v3/snippets/snippet_metadata_google.monitoring.v3.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-monitoring-v3", - "version": "1.6.0", + "version": "1.6.1", "language": "RUBY", "apis": [ { From e9aedb5ca2a85df9cc6ef68b736215099ac18389 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:30:15 +0000 Subject: [PATCH 221/457] chore(main): release google-cloud-firestore-v1 2.1.1 (#30661) --- .release-please-manifest.json | 2 +- google-cloud-firestore-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/firestore/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.firestore.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 61c13e2aba3d..127a2997853c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -391,7 +391,7 @@ "google-cloud-firestore-admin+FILLER": "0.0.0", "google-cloud-firestore-admin-v1": "1.5.0", "google-cloud-firestore-admin-v1+FILLER": "0.0.0", - "google-cloud-firestore-v1": "2.1.0", + "google-cloud-firestore-v1": "2.1.1", "google-cloud-firestore-v1+FILLER": "0.0.0", "google-cloud-functions": "2.0.1", "google-cloud-functions+FILLER": "0.0.0", diff --git a/google-cloud-firestore-v1/CHANGELOG.md b/google-cloud-firestore-v1/CHANGELOG.md index 2a7f88846f9b..59ef7486f1dd 100644 --- a/google-cloud-firestore-v1/CHANGELOG.md +++ b/google-cloud-firestore-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.1.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 2.1.0 (2025-05-12) #### Features diff --git a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb index 09481b7c8eb1..dbb1533411a7 100644 --- a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb +++ b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Firestore module V1 - VERSION = "2.1.0" + VERSION = "2.1.1" end end end diff --git a/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json b/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json index 9419d5712dab..596832cebe20 100644 --- a/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json +++ b/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-firestore-v1", - "version": "2.1.0", + "version": "2.1.1", "language": "RUBY", "apis": [ { From 6943d60e297f16b03c1b9591648789216dadcba0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:30:33 +0000 Subject: [PATCH 222/457] chore(main): release google-cloud-eventarc-publishing-v1 1.4.1 (#30660) --- .release-please-manifest.json | 2 +- google-cloud-eventarc-publishing-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/eventarc/publishing/v1/version.rb | 2 +- ...nippet_metadata_google.cloud.eventarc.publishing.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 127a2997853c..3bd8a5c9b4e9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -373,7 +373,7 @@ "google-cloud-eventarc+FILLER": "0.0.0", "google-cloud-eventarc-publishing": "1.3.3", "google-cloud-eventarc-publishing+FILLER": "0.0.0", - "google-cloud-eventarc-publishing-v1": "1.4.0", + "google-cloud-eventarc-publishing-v1": "1.4.1", "google-cloud-eventarc-publishing-v1+FILLER": "0.0.0", "google-cloud-eventarc-v1": "2.1.0", "google-cloud-eventarc-v1+FILLER": "0.0.0", diff --git a/google-cloud-eventarc-publishing-v1/CHANGELOG.md b/google-cloud-eventarc-publishing-v1/CHANGELOG.md index e845c80a58e2..5a61b4042231 100644 --- a/google-cloud-eventarc-publishing-v1/CHANGELOG.md +++ b/google-cloud-eventarc-publishing-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.4.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.4.0 (2025-05-12) #### Features diff --git a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb index e85d8935fe48..2a0bdd4c954c 100644 --- a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb +++ b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module Eventarc module Publishing module V1 - VERSION = "1.4.0" + VERSION = "1.4.1" end end end diff --git a/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json b/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json index bf3892c22648..ff73812cb983 100644 --- a/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json +++ b/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-eventarc-publishing-v1", - "version": "1.4.0", + "version": "1.4.1", "language": "RUBY", "apis": [ { From 656f7706d981275556c778bb40b5d00fb38661f5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:30:52 +0000 Subject: [PATCH 223/457] chore(main): release google-cloud-document_ai-v1beta3 0.43.1 (#30659) --- .release-please-manifest.json | 2 +- google-cloud-document_ai-v1beta3/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/document_ai/v1beta3/version.rb | 2 +- .../snippet_metadata_google.cloud.documentai.v1beta3.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3bd8a5c9b4e9..e9359f389d03 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -343,7 +343,7 @@ "google-cloud-document_ai+FILLER": "0.0.0", "google-cloud-document_ai-v1": "1.6.0", "google-cloud-document_ai-v1+FILLER": "0.0.0", - "google-cloud-document_ai-v1beta3": "0.43.0", + "google-cloud-document_ai-v1beta3": "0.43.1", "google-cloud-document_ai-v1beta3+FILLER": "0.0.0", "google-cloud-domains": "2.0.1", "google-cloud-domains+FILLER": "0.0.0", diff --git a/google-cloud-document_ai-v1beta3/CHANGELOG.md b/google-cloud-document_ai-v1beta3/CHANGELOG.md index bed1fc84adec..c58cc98fa9ec 100644 --- a/google-cloud-document_ai-v1beta3/CHANGELOG.md +++ b/google-cloud-document_ai-v1beta3/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 0.43.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 0.43.0 (2025-05-12) #### Features diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/version.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/version.rb index 849ee727d2d6..83af4f9a2507 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/version.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DocumentAI module V1beta3 - VERSION = "0.43.0" + VERSION = "0.43.1" end end end diff --git a/google-cloud-document_ai-v1beta3/snippets/snippet_metadata_google.cloud.documentai.v1beta3.json b/google-cloud-document_ai-v1beta3/snippets/snippet_metadata_google.cloud.documentai.v1beta3.json index 36fd2ee5b862..39b5452e5003 100644 --- a/google-cloud-document_ai-v1beta3/snippets/snippet_metadata_google.cloud.documentai.v1beta3.json +++ b/google-cloud-document_ai-v1beta3/snippets/snippet_metadata_google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-document_ai-v1beta3", - "version": "0.43.0", + "version": "0.43.1", "language": "RUBY", "apis": [ { From 798abb2ff29f9cfc25213194c215805d273863a8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:31:10 +0000 Subject: [PATCH 224/457] chore(main): release google-cloud-document_ai-v1 1.6.1 (#30658) --- .release-please-manifest.json | 2 +- google-cloud-document_ai-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/document_ai/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.documentai.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e9359f389d03..a3f63f3eb8ed 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -341,7 +341,7 @@ "google-cloud-dns+FILLER": "0.0.0", "google-cloud-document_ai": "2.0.1", "google-cloud-document_ai+FILLER": "0.0.0", - "google-cloud-document_ai-v1": "1.6.0", + "google-cloud-document_ai-v1": "1.6.1", "google-cloud-document_ai-v1+FILLER": "0.0.0", "google-cloud-document_ai-v1beta3": "0.43.1", "google-cloud-document_ai-v1beta3+FILLER": "0.0.0", diff --git a/google-cloud-document_ai-v1/CHANGELOG.md b/google-cloud-document_ai-v1/CHANGELOG.md index 3aab59425428..0eb96bb2827d 100644 --- a/google-cloud-document_ai-v1/CHANGELOG.md +++ b/google-cloud-document_ai-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.6.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.6.0 (2025-05-12) #### Features diff --git a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/version.rb b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/version.rb index 2ba2ed28d8dd..ebb41f27456e 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/version.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DocumentAI module V1 - VERSION = "1.6.0" + VERSION = "1.6.1" end end end diff --git a/google-cloud-document_ai-v1/snippets/snippet_metadata_google.cloud.documentai.v1.json b/google-cloud-document_ai-v1/snippets/snippet_metadata_google.cloud.documentai.v1.json index 65303f47e1d2..99bc16ee68d1 100644 --- a/google-cloud-document_ai-v1/snippets/snippet_metadata_google.cloud.documentai.v1.json +++ b/google-cloud-document_ai-v1/snippets/snippet_metadata_google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-document_ai-v1", - "version": "1.6.0", + "version": "1.6.1", "language": "RUBY", "apis": [ { From 5ce4a631779eb341ccb0a36153eed3a3b31e2c31 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:31:29 +0000 Subject: [PATCH 225/457] chore(main): release google-cloud-dlp-v2 1.12.1 (#30657) --- .release-please-manifest.json | 2 +- google-cloud-dlp-v2/CHANGELOG.md | 6 ++++++ google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.privacy.dlp.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a3f63f3eb8ed..095aa07fc84c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -335,7 +335,7 @@ "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", "google-cloud-dlp": "1.8.2", "google-cloud-dlp+FILLER": "0.0.0", - "google-cloud-dlp-v2": "1.12.0", + "google-cloud-dlp-v2": "1.12.1", "google-cloud-dlp-v2+FILLER": "0.0.0", "google-cloud-dns": "1.1.0", "google-cloud-dns+FILLER": "0.0.0", diff --git a/google-cloud-dlp-v2/CHANGELOG.md b/google-cloud-dlp-v2/CHANGELOG.md index 0e977d012616..e3173b8217c3 100644 --- a/google-cloud-dlp-v2/CHANGELOG.md +++ b/google-cloud-dlp-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.12.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.12.0 (2025-06-24) #### Features diff --git a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb index 5945bd3ec387..5b0af5c4f01a 100644 --- a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb +++ b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Dlp module V2 - VERSION = "1.12.0" + VERSION = "1.12.1" end end end diff --git a/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json b/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json index 5a9dd841d4f6..33d5fc51eb0d 100644 --- a/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json +++ b/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dlp-v2", - "version": "1.12.0", + "version": "1.12.1", "language": "RUBY", "apis": [ { From 2be8c1b2e62a50ec446bbb366866dd0d0d776dd2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:31:47 +0000 Subject: [PATCH 226/457] chore(main): release google-cloud-discovery_engine-v1beta 0.20.1 (#30656) --- .release-please-manifest.json | 2 +- google-cloud-discovery_engine-v1beta/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/discovery_engine/v1beta/version.rb | 2 +- ...nippet_metadata_google.cloud.discoveryengine.v1beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 095aa07fc84c..944e2c9a0669 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -331,7 +331,7 @@ "google-cloud-discovery_engine+FILLER": "0.0.0", "google-cloud-discovery_engine-v1": "2.3.0", "google-cloud-discovery_engine-v1+FILLER": "0.0.0", - "google-cloud-discovery_engine-v1beta": "0.20.0", + "google-cloud-discovery_engine-v1beta": "0.20.1", "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", "google-cloud-dlp": "1.8.2", "google-cloud-dlp+FILLER": "0.0.0", diff --git a/google-cloud-discovery_engine-v1beta/CHANGELOG.md b/google-cloud-discovery_engine-v1beta/CHANGELOG.md index 000f1f5507cc..58fbb15e0b16 100644 --- a/google-cloud-discovery_engine-v1beta/CHANGELOG.md +++ b/google-cloud-discovery_engine-v1beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.20.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 0.20.0 (2025-05-12) #### Features diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/version.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/version.rb index fdd92633f552..cf0c78cab345 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/version.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DiscoveryEngine module V1beta - VERSION = "0.20.0" + VERSION = "0.20.1" end end end diff --git a/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json b/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json index 449b30de6173..2dfb79b7a260 100644 --- a/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json +++ b/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-discovery_engine-v1beta", - "version": "0.20.0", + "version": "0.20.1", "language": "RUBY", "apis": [ { From ffbf60363dfcb6902cc3344d1338e7bd29cd066b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:32:05 +0000 Subject: [PATCH 227/457] chore(main): release google-cloud-discovery_engine-v1 2.3.1 (#30655) --- .release-please-manifest.json | 2 +- google-cloud-discovery_engine-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/discovery_engine/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.discoveryengine.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 944e2c9a0669..5c01e481f6ec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -329,7 +329,7 @@ "google-cloud-dialogflow-v2+FILLER": "0.0.0", "google-cloud-discovery_engine": "2.2.0", "google-cloud-discovery_engine+FILLER": "0.0.0", - "google-cloud-discovery_engine-v1": "2.3.0", + "google-cloud-discovery_engine-v1": "2.3.1", "google-cloud-discovery_engine-v1+FILLER": "0.0.0", "google-cloud-discovery_engine-v1beta": "0.20.1", "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", diff --git a/google-cloud-discovery_engine-v1/CHANGELOG.md b/google-cloud-discovery_engine-v1/CHANGELOG.md index 3f7f342e1043..b040e15bba52 100644 --- a/google-cloud-discovery_engine-v1/CHANGELOG.md +++ b/google-cloud-discovery_engine-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.3.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 2.3.0 (2025-06-13) #### Features diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb index da002d3cf253..23ae6cf1c53b 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DiscoveryEngine module V1 - VERSION = "2.3.0" + VERSION = "2.3.1" end end end diff --git a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json index 60732d4c70aa..91e6f11d08b5 100644 --- a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-discovery_engine-v1", - "version": "2.3.0", + "version": "2.3.1", "language": "RUBY", "apis": [ { From 9f878775edc6c0bfa0e5263c6a8b51885577bee5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:32:24 +0000 Subject: [PATCH 228/457] chore(main): release google-cloud-dialogflow-v2 1.10.1 (#30654) --- .release-please-manifest.json | 2 +- google-cloud-dialogflow-v2/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/dialogflow/v2/version.rb | 2 +- .../snippet_metadata_google.cloud.dialogflow.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5c01e481f6ec..aea33a473d18 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -325,7 +325,7 @@ "google-cloud-dialogflow-cx+FILLER": "0.0.0", "google-cloud-dialogflow-cx-v3": "1.7.0", "google-cloud-dialogflow-cx-v3+FILLER": "0.0.0", - "google-cloud-dialogflow-v2": "1.10.0", + "google-cloud-dialogflow-v2": "1.10.1", "google-cloud-dialogflow-v2+FILLER": "0.0.0", "google-cloud-discovery_engine": "2.2.0", "google-cloud-discovery_engine+FILLER": "0.0.0", diff --git a/google-cloud-dialogflow-v2/CHANGELOG.md b/google-cloud-dialogflow-v2/CHANGELOG.md index c8d0136f790d..2b36de9d7e7e 100644 --- a/google-cloud-dialogflow-v2/CHANGELOG.md +++ b/google-cloud-dialogflow-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.10.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.10.0 (2025-05-12) #### Features diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/version.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/version.rb index 7b9236351808..3c73191fbb4b 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/version.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Dialogflow module V2 - VERSION = "1.10.0" + VERSION = "1.10.1" end end end diff --git a/google-cloud-dialogflow-v2/snippets/snippet_metadata_google.cloud.dialogflow.v2.json b/google-cloud-dialogflow-v2/snippets/snippet_metadata_google.cloud.dialogflow.v2.json index 073607ba28c7..8b486e175e45 100644 --- a/google-cloud-dialogflow-v2/snippets/snippet_metadata_google.cloud.dialogflow.v2.json +++ b/google-cloud-dialogflow-v2/snippets/snippet_metadata_google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dialogflow-v2", - "version": "1.10.0", + "version": "1.10.1", "language": "RUBY", "apis": [ { From e0dfa6d43f898cc89ed8ac542f9533b91c07e368 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:32:42 +0000 Subject: [PATCH 229/457] chore(main): release google-cloud-datastream-v1alpha1 0.11.1 (#30653) --- .release-please-manifest.json | 2 +- google-cloud-datastream-v1alpha1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/datastream/v1alpha1/version.rb | 2 +- .../snippet_metadata_google.cloud.datastream.v1alpha1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aea33a473d18..591b8e38f968 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -305,7 +305,7 @@ "google-cloud-datastream+FILLER": "0.0.0", "google-cloud-datastream-v1": "1.2.0", "google-cloud-datastream-v1+FILLER": "0.0.0", - "google-cloud-datastream-v1alpha1": "0.11.0", + "google-cloud-datastream-v1alpha1": "0.11.1", "google-cloud-datastream-v1alpha1+FILLER": "0.0.0", "google-cloud-deploy": "2.0.1", "google-cloud-deploy+FILLER": "0.0.0", diff --git a/google-cloud-datastream-v1alpha1/CHANGELOG.md b/google-cloud-datastream-v1alpha1/CHANGELOG.md index d2761c2fdeeb..c89004d586cf 100644 --- a/google-cloud-datastream-v1alpha1/CHANGELOG.md +++ b/google-cloud-datastream-v1alpha1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.11.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 0.11.0 (2025-05-12) #### Features diff --git a/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/version.rb b/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/version.rb index d2c6a2d838db..764930cd052f 100644 --- a/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/version.rb +++ b/google-cloud-datastream-v1alpha1/lib/google/cloud/datastream/v1alpha1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Datastream module V1alpha1 - VERSION = "0.11.0" + VERSION = "0.11.1" end end end diff --git a/google-cloud-datastream-v1alpha1/snippets/snippet_metadata_google.cloud.datastream.v1alpha1.json b/google-cloud-datastream-v1alpha1/snippets/snippet_metadata_google.cloud.datastream.v1alpha1.json index 569756cc217e..412a54345811 100644 --- a/google-cloud-datastream-v1alpha1/snippets/snippet_metadata_google.cloud.datastream.v1alpha1.json +++ b/google-cloud-datastream-v1alpha1/snippets/snippet_metadata_google.cloud.datastream.v1alpha1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-datastream-v1alpha1", - "version": "0.11.0", + "version": "0.11.1", "language": "RUBY", "apis": [ { From 633e9f4c05a93cd15274f51524da30077c9dbb16 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:33:00 +0000 Subject: [PATCH 230/457] chore(main): release google-cloud-datastream-v1 1.2.1 (#30652) --- .release-please-manifest.json | 2 +- google-cloud-datastream-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/datastream/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.datastream.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 591b8e38f968..f34b44689503 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -303,7 +303,7 @@ "google-cloud-datastore-v1+FILLER": "0.0.0", "google-cloud-datastream": "2.0.1", "google-cloud-datastream+FILLER": "0.0.0", - "google-cloud-datastream-v1": "1.2.0", + "google-cloud-datastream-v1": "1.2.1", "google-cloud-datastream-v1+FILLER": "0.0.0", "google-cloud-datastream-v1alpha1": "0.11.1", "google-cloud-datastream-v1alpha1+FILLER": "0.0.0", diff --git a/google-cloud-datastream-v1/CHANGELOG.md b/google-cloud-datastream-v1/CHANGELOG.md index d8b96beaa886..86a69241abeb 100644 --- a/google-cloud-datastream-v1/CHANGELOG.md +++ b/google-cloud-datastream-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.2.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.2.0 (2025-05-12) #### Features diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/version.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/version.rb index ef0568b6b86d..458cf59ff9be 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/version.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Datastream module V1 - VERSION = "1.2.0" + VERSION = "1.2.1" end end end diff --git a/google-cloud-datastream-v1/snippets/snippet_metadata_google.cloud.datastream.v1.json b/google-cloud-datastream-v1/snippets/snippet_metadata_google.cloud.datastream.v1.json index a6ac94564618..83f1b1c95f69 100644 --- a/google-cloud-datastream-v1/snippets/snippet_metadata_google.cloud.datastream.v1.json +++ b/google-cloud-datastream-v1/snippets/snippet_metadata_google.cloud.datastream.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-datastream-v1", - "version": "1.2.0", + "version": "1.2.1", "language": "RUBY", "apis": [ { From 92586cbbd803c1fdff043c904076ab82c385c74d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:33:19 +0000 Subject: [PATCH 231/457] chore(main): release google-cloud-datastore-v1 1.4.1 (#30651) --- .release-please-manifest.json | 2 +- google-cloud-datastore-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/datastore/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.datastore.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f34b44689503..c3f98f304da5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -299,7 +299,7 @@ "google-cloud-datastore-admin+FILLER": "0.0.0", "google-cloud-datastore-admin-v1": "1.3.0", "google-cloud-datastore-admin-v1+FILLER": "0.0.0", - "google-cloud-datastore-v1": "1.4.0", + "google-cloud-datastore-v1": "1.4.1", "google-cloud-datastore-v1+FILLER": "0.0.0", "google-cloud-datastream": "2.0.1", "google-cloud-datastream+FILLER": "0.0.0", diff --git a/google-cloud-datastore-v1/CHANGELOG.md b/google-cloud-datastore-v1/CHANGELOG.md index 5a306feebc1a..34ccc9edc401 100644 --- a/google-cloud-datastore-v1/CHANGELOG.md +++ b/google-cloud-datastore-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.4.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.4.0 (2025-05-12) #### Features diff --git a/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/version.rb b/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/version.rb index 39816631ddff..2262f04d807a 100644 --- a/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/version.rb +++ b/google-cloud-datastore-v1/lib/google/cloud/datastore/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Datastore module V1 - VERSION = "1.4.0" + VERSION = "1.4.1" end end end diff --git a/google-cloud-datastore-v1/snippets/snippet_metadata_google.datastore.v1.json b/google-cloud-datastore-v1/snippets/snippet_metadata_google.datastore.v1.json index 5a3ae0b96971..b782fba6f2ae 100644 --- a/google-cloud-datastore-v1/snippets/snippet_metadata_google.datastore.v1.json +++ b/google-cloud-datastore-v1/snippets/snippet_metadata_google.datastore.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-datastore-v1", - "version": "1.4.0", + "version": "1.4.1", "language": "RUBY", "apis": [ { From 18804b8d98c5e8639c4fa3411147eb33b7838b1b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:33:37 +0000 Subject: [PATCH 232/457] chore(main): release google-cloud-datastore 2.12.0 (#30650) --- .release-please-manifest.json | 2 +- google-cloud-datastore/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/datastore/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c3f98f304da5..408720bb264d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -293,7 +293,7 @@ "google-cloud-dataqna+FILLER": "0.0.0", "google-cloud-dataqna-v1alpha": "0.10.0", "google-cloud-dataqna-v1alpha+FILLER": "0.0.0", - "google-cloud-datastore": "2.11.0", + "google-cloud-datastore": "2.12.0", "google-cloud-datastore+FILLER": "0.0.0", "google-cloud-datastore-admin": "0.5.1", "google-cloud-datastore-admin+FILLER": "0.0.0", diff --git a/google-cloud-datastore/CHANGELOG.md b/google-cloud-datastore/CHANGELOG.md index 1ea94a2e4efb..60492763dedd 100644 --- a/google-cloud-datastore/CHANGELOG.md +++ b/google-cloud-datastore/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.12.0 (2025-07-15) + +#### Features + +* query explanation features for Cloud Datastore ([#30588](https://github.com/googleapis/google-cloud-ruby/issues/30588)) + ### 2.11.0 (2025-03-04) #### Features diff --git a/google-cloud-datastore/lib/google/cloud/datastore/version.rb b/google-cloud-datastore/lib/google/cloud/datastore/version.rb index 051b710c87bb..7d88897b8e14 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/version.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Datastore - VERSION = "2.11.0".freeze + VERSION = "2.12.0".freeze end end end From 8b8cc51287eb91fdcb9cd9edb7cbb572fed4f66d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:33:56 +0000 Subject: [PATCH 233/457] chore(main): release google-cloud-dataflow-v1beta3 0.13.1 (#30649) --- .release-please-manifest.json | 2 +- google-cloud-dataflow-v1beta3/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/dataflow/v1beta3/version.rb | 2 +- .../snippets/snippet_metadata_google.dataflow.v1beta3.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 408720bb264d..bf83d7f9f843 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -273,7 +273,7 @@ "google-cloud-data_labeling-v1beta1+FILLER": "0.0.0", "google-cloud-dataflow": "0.6.2", "google-cloud-dataflow+FILLER": "0.0.0", - "google-cloud-dataflow-v1beta3": "0.13.0", + "google-cloud-dataflow-v1beta3": "0.13.1", "google-cloud-dataflow-v1beta3+FILLER": "0.0.0", "google-cloud-dataform": "0.5.1", "google-cloud-dataform+FILLER": "0.0.0", diff --git a/google-cloud-dataflow-v1beta3/CHANGELOG.md b/google-cloud-dataflow-v1beta3/CHANGELOG.md index c5abcb343db0..d1e99fb4ac4c 100644 --- a/google-cloud-dataflow-v1beta3/CHANGELOG.md +++ b/google-cloud-dataflow-v1beta3/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.13.1 (2025-07-15) + +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 0.13.0 (2025-05-12) #### Features diff --git a/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/version.rb b/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/version.rb index 4ba795f8f83f..7ba8ee1b709f 100644 --- a/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/version.rb +++ b/google-cloud-dataflow-v1beta3/lib/google/cloud/dataflow/v1beta3/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Dataflow module V1beta3 - VERSION = "0.13.0" + VERSION = "0.13.1" end end end diff --git a/google-cloud-dataflow-v1beta3/snippets/snippet_metadata_google.dataflow.v1beta3.json b/google-cloud-dataflow-v1beta3/snippets/snippet_metadata_google.dataflow.v1beta3.json index a036e025d781..95fa80592cc9 100644 --- a/google-cloud-dataflow-v1beta3/snippets/snippet_metadata_google.dataflow.v1beta3.json +++ b/google-cloud-dataflow-v1beta3/snippets/snippet_metadata_google.dataflow.v1beta3.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dataflow-v1beta3", - "version": "0.13.0", + "version": "0.13.1", "language": "RUBY", "apis": [ { From 71e501c013f6b424001219f42000d555a321f819 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:34:14 +0000 Subject: [PATCH 234/457] chore(main): release google-cloud-data_labeling-v1beta1 0.11.1 (#30648) --- .release-please-manifest.json | 2 +- google-cloud-data_labeling-v1beta1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/data_labeling/v1beta1/version.rb | 2 +- .../snippet_metadata_google.cloud.datalabeling.v1beta1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bf83d7f9f843..7317715206fd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -269,7 +269,7 @@ "google-cloud-data_fusion-v1+FILLER": "0.0.0", "google-cloud-data_labeling": "0.6.1", "google-cloud-data_labeling+FILLER": "0.0.0", - "google-cloud-data_labeling-v1beta1": "0.11.0", + "google-cloud-data_labeling-v1beta1": "0.11.1", "google-cloud-data_labeling-v1beta1+FILLER": "0.0.0", "google-cloud-dataflow": "0.6.2", "google-cloud-dataflow+FILLER": "0.0.0", diff --git a/google-cloud-data_labeling-v1beta1/CHANGELOG.md b/google-cloud-data_labeling-v1beta1/CHANGELOG.md index 7a96726da3db..303f6266f190 100644 --- a/google-cloud-data_labeling-v1beta1/CHANGELOG.md +++ b/google-cloud-data_labeling-v1beta1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 0.11.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.11.0 (2025-05-12) #### Features diff --git a/google-cloud-data_labeling-v1beta1/lib/google/cloud/data_labeling/v1beta1/version.rb b/google-cloud-data_labeling-v1beta1/lib/google/cloud/data_labeling/v1beta1/version.rb index c32cf95ff5b3..7f9a5fc8abe0 100644 --- a/google-cloud-data_labeling-v1beta1/lib/google/cloud/data_labeling/v1beta1/version.rb +++ b/google-cloud-data_labeling-v1beta1/lib/google/cloud/data_labeling/v1beta1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DataLabeling module V1beta1 - VERSION = "0.11.0" + VERSION = "0.11.1" end end end diff --git a/google-cloud-data_labeling-v1beta1/snippets/snippet_metadata_google.cloud.datalabeling.v1beta1.json b/google-cloud-data_labeling-v1beta1/snippets/snippet_metadata_google.cloud.datalabeling.v1beta1.json index 625501f1d0f3..2008e231c034 100644 --- a/google-cloud-data_labeling-v1beta1/snippets/snippet_metadata_google.cloud.datalabeling.v1beta1.json +++ b/google-cloud-data_labeling-v1beta1/snippets/snippet_metadata_google.cloud.datalabeling.v1beta1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-data_labeling-v1beta1", - "version": "0.11.0", + "version": "0.11.1", "language": "RUBY", "apis": [ { From 91d66298ac75e8c66dfdfca8237b53d1809b9079 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:34:33 +0000 Subject: [PATCH 235/457] chore(main): release google-cloud-data_catalog-v1beta1 0.9.1 (#30647) --- .release-please-manifest.json | 2 +- google-cloud-data_catalog-v1beta1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/data_catalog/v1beta1/version.rb | 2 +- .../snippet_metadata_google.cloud.datacatalog.v1beta1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7317715206fd..0d2ee2a6ac86 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -261,7 +261,7 @@ "google-cloud-data_catalog-lineage-v1+FILLER": "0.0.0", "google-cloud-data_catalog-v1": "2.3.0", "google-cloud-data_catalog-v1+FILLER": "0.0.0", - "google-cloud-data_catalog-v1beta1": "0.9.0", + "google-cloud-data_catalog-v1beta1": "0.9.1", "google-cloud-data_catalog-v1beta1+FILLER": "0.0.0", "google-cloud-data_fusion": "2.0.1", "google-cloud-data_fusion+FILLER": "0.0.0", diff --git a/google-cloud-data_catalog-v1beta1/CHANGELOG.md b/google-cloud-data_catalog-v1beta1/CHANGELOG.md index d41ab385b2e3..8068ec1aa2db 100644 --- a/google-cloud-data_catalog-v1beta1/CHANGELOG.md +++ b/google-cloud-data_catalog-v1beta1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.9.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.9.0 (2025-05-12) #### Features diff --git a/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/version.rb b/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/version.rb index 946e921a87e7..66b7f3d2ea11 100644 --- a/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/version.rb +++ b/google-cloud-data_catalog-v1beta1/lib/google/cloud/data_catalog/v1beta1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DataCatalog module V1beta1 - VERSION = "0.9.0" + VERSION = "0.9.1" end end end diff --git a/google-cloud-data_catalog-v1beta1/snippets/snippet_metadata_google.cloud.datacatalog.v1beta1.json b/google-cloud-data_catalog-v1beta1/snippets/snippet_metadata_google.cloud.datacatalog.v1beta1.json index 01c8118b8612..7c15e832b740 100644 --- a/google-cloud-data_catalog-v1beta1/snippets/snippet_metadata_google.cloud.datacatalog.v1beta1.json +++ b/google-cloud-data_catalog-v1beta1/snippets/snippet_metadata_google.cloud.datacatalog.v1beta1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-data_catalog-v1beta1", - "version": "0.9.0", + "version": "0.9.1", "language": "RUBY", "apis": [ { From 9ff183e2c19a6f9188953683ff2bac3d6a7b0b15 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:34:51 +0000 Subject: [PATCH 236/457] chore(main): release google-cloud-data_catalog-v1 2.3.1 (#30646) --- .release-please-manifest.json | 2 +- google-cloud-data_catalog-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/data_catalog/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.datacatalog.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0d2ee2a6ac86..f991f02762f1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -259,7 +259,7 @@ "google-cloud-data_catalog-lineage+FILLER": "0.0.0", "google-cloud-data_catalog-lineage-v1": "0.10.0", "google-cloud-data_catalog-lineage-v1+FILLER": "0.0.0", - "google-cloud-data_catalog-v1": "2.3.0", + "google-cloud-data_catalog-v1": "2.3.1", "google-cloud-data_catalog-v1+FILLER": "0.0.0", "google-cloud-data_catalog-v1beta1": "0.9.1", "google-cloud-data_catalog-v1beta1+FILLER": "0.0.0", diff --git a/google-cloud-data_catalog-v1/CHANGELOG.md b/google-cloud-data_catalog-v1/CHANGELOG.md index 99e85a14813a..d9d7a68213c6 100644 --- a/google-cloud-data_catalog-v1/CHANGELOG.md +++ b/google-cloud-data_catalog-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.3.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 2.3.0 (2025-05-12) #### Features diff --git a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/version.rb b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/version.rb index d6ef34496c95..825985c6bb8e 100644 --- a/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/version.rb +++ b/google-cloud-data_catalog-v1/lib/google/cloud/data_catalog/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DataCatalog module V1 - VERSION = "2.3.0" + VERSION = "2.3.1" end end end diff --git a/google-cloud-data_catalog-v1/snippets/snippet_metadata_google.cloud.datacatalog.v1.json b/google-cloud-data_catalog-v1/snippets/snippet_metadata_google.cloud.datacatalog.v1.json index ec27c9efb13b..e8391fc58226 100644 --- a/google-cloud-data_catalog-v1/snippets/snippet_metadata_google.cloud.datacatalog.v1.json +++ b/google-cloud-data_catalog-v1/snippets/snippet_metadata_google.cloud.datacatalog.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-data_catalog-v1", - "version": "2.3.0", + "version": "2.3.1", "language": "RUBY", "apis": [ { From bbbbdc53af746bca5c42fda3a79d908ca045aacd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:35:09 +0000 Subject: [PATCH 237/457] chore(main): release google-cloud-data_catalog-lineage-v1 0.10.1 (#30645) --- .release-please-manifest.json | 2 +- google-cloud-data_catalog-lineage-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/data_catalog/lineage/v1/version.rb | 2 +- ...nippet_metadata_google.cloud.datacatalog.lineage.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f991f02762f1..fe222207f0d4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -257,7 +257,7 @@ "google-cloud-data_catalog+FILLER": "0.0.0", "google-cloud-data_catalog-lineage": "1.1.1", "google-cloud-data_catalog-lineage+FILLER": "0.0.0", - "google-cloud-data_catalog-lineage-v1": "0.10.0", + "google-cloud-data_catalog-lineage-v1": "0.10.1", "google-cloud-data_catalog-lineage-v1+FILLER": "0.0.0", "google-cloud-data_catalog-v1": "2.3.1", "google-cloud-data_catalog-v1+FILLER": "0.0.0", diff --git a/google-cloud-data_catalog-lineage-v1/CHANGELOG.md b/google-cloud-data_catalog-lineage-v1/CHANGELOG.md index 561c32c76e03..dd61e92081a2 100644 --- a/google-cloud-data_catalog-lineage-v1/CHANGELOG.md +++ b/google-cloud-data_catalog-lineage-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.10.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.10.0 (2025-05-12) #### Features diff --git a/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/version.rb b/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/version.rb index 1891031c18ec..85fd6ac1baac 100644 --- a/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/version.rb +++ b/google-cloud-data_catalog-lineage-v1/lib/google/cloud/data_catalog/lineage/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module DataCatalog module Lineage module V1 - VERSION = "0.10.0" + VERSION = "0.10.1" end end end diff --git a/google-cloud-data_catalog-lineage-v1/snippets/snippet_metadata_google.cloud.datacatalog.lineage.v1.json b/google-cloud-data_catalog-lineage-v1/snippets/snippet_metadata_google.cloud.datacatalog.lineage.v1.json index a1855da88d8f..574705d7ff12 100644 --- a/google-cloud-data_catalog-lineage-v1/snippets/snippet_metadata_google.cloud.datacatalog.lineage.v1.json +++ b/google-cloud-data_catalog-lineage-v1/snippets/snippet_metadata_google.cloud.datacatalog.lineage.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-data_catalog-lineage-v1", - "version": "0.10.0", + "version": "0.10.1", "language": "RUBY", "apis": [ { From 8ca1a457a312b526d83cec6f45b25410d3bf8795 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:35:28 +0000 Subject: [PATCH 238/457] chore(main): release google-cloud-config_service-v1 2.2.0 (#30644) --- .release-please-manifest.json | 2 +- google-cloud-config_service-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/config_service/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.config.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fe222207f0d4..64876cc1c59b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -231,7 +231,7 @@ "google-cloud-confidential_computing-v1+FILLER": "0.0.0", "google-cloud-config_service": "2.0.1", "google-cloud-config_service+FILLER": "0.0.0", - "google-cloud-config_service-v1": "2.1.0", + "google-cloud-config_service-v1": "2.2.0", "google-cloud-config_service-v1+FILLER": "0.0.0", "google-cloud-connectors": "2.0.1", "google-cloud-connectors+FILLER": "0.0.0", diff --git a/google-cloud-config_service-v1/CHANGELOG.md b/google-cloud-config_service-v1/CHANGELOG.md index b02c6f18db5f..879c8852893a 100644 --- a/google-cloud-config_service-v1/CHANGELOG.md +++ b/google-cloud-config_service-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.2.0 (2025-07-15) + +#### Features + +* added resource change and drift details for the preview ([#30606](https://github.com/googleapis/google-cloud-ruby/issues/30606)) + ### 2.1.0 (2025-05-12) #### Features diff --git a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/version.rb b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/version.rb index 228e2d8990af..019117818377 100644 --- a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/version.rb +++ b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module ConfigService module V1 - VERSION = "2.1.0" + VERSION = "2.2.0" end end end diff --git a/google-cloud-config_service-v1/snippets/snippet_metadata_google.cloud.config.v1.json b/google-cloud-config_service-v1/snippets/snippet_metadata_google.cloud.config.v1.json index 715ace6e0a9a..677c75d286e0 100644 --- a/google-cloud-config_service-v1/snippets/snippet_metadata_google.cloud.config.v1.json +++ b/google-cloud-config_service-v1/snippets/snippet_metadata_google.cloud.config.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-config_service-v1", - "version": "2.1.0", + "version": "2.2.0", "language": "RUBY", "apis": [ { From 82b75d66b145be982dbc29eaaac31bc58a5b5c57 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:35:46 +0000 Subject: [PATCH 239/457] chore(main): release google-cloud-confidential_computing-v1 1.6.1 (#30643) --- .release-please-manifest.json | 2 +- google-cloud-confidential_computing-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/confidential_computing/v1/version.rb | 2 +- ...ppet_metadata_google.cloud.confidentialcomputing.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 64876cc1c59b..b7d5b1baa660 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -227,7 +227,7 @@ "google-cloud-compute-v1+FILLER": "0.0.0", "google-cloud-confidential_computing": "1.1.1", "google-cloud-confidential_computing+FILLER": "0.0.0", - "google-cloud-confidential_computing-v1": "1.6.0", + "google-cloud-confidential_computing-v1": "1.6.1", "google-cloud-confidential_computing-v1+FILLER": "0.0.0", "google-cloud-config_service": "2.0.1", "google-cloud-config_service+FILLER": "0.0.0", diff --git a/google-cloud-confidential_computing-v1/CHANGELOG.md b/google-cloud-confidential_computing-v1/CHANGELOG.md index 5f0741189323..660ae0cb2fb1 100644 --- a/google-cloud-confidential_computing-v1/CHANGELOG.md +++ b/google-cloud-confidential_computing-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.6.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.6.0 (2025-05-12) #### Features diff --git a/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/version.rb b/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/version.rb index 78868e77e295..14a97e493709 100644 --- a/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/version.rb +++ b/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module ConfidentialComputing module V1 - VERSION = "1.6.0" + VERSION = "1.6.1" end end end diff --git a/google-cloud-confidential_computing-v1/snippets/snippet_metadata_google.cloud.confidentialcomputing.v1.json b/google-cloud-confidential_computing-v1/snippets/snippet_metadata_google.cloud.confidentialcomputing.v1.json index b1806d7b2b2b..aa914655f640 100644 --- a/google-cloud-confidential_computing-v1/snippets/snippet_metadata_google.cloud.confidentialcomputing.v1.json +++ b/google-cloud-confidential_computing-v1/snippets/snippet_metadata_google.cloud.confidentialcomputing.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-confidential_computing-v1", - "version": "1.6.0", + "version": "1.6.1", "language": "RUBY", "apis": [ { From 04ea966d9598d38396e0e443e1867a9b93799a7c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:36:05 +0000 Subject: [PATCH 240/457] chore(main): release google-cloud-cloud_dms-v1 1.3.1 (#30642) --- .release-please-manifest.json | 2 +- google-cloud-cloud_dms-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/cloud_dms/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.clouddms.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b7d5b1baa660..079ae62f6a7b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -209,7 +209,7 @@ "google-cloud-cloud_controls_partner-v1beta+FILLER": "0.0.0", "google-cloud-cloud_dms": "1.4.1", "google-cloud-cloud_dms+FILLER": "0.0.0", - "google-cloud-cloud_dms-v1": "1.3.0", + "google-cloud-cloud_dms-v1": "1.3.1", "google-cloud-cloud_dms-v1+FILLER": "0.0.0", "google-cloud-cloud_quotas": "2.0.1", "google-cloud-cloud_quotas+FILLER": "0.0.0", diff --git a/google-cloud-cloud_dms-v1/CHANGELOG.md b/google-cloud-cloud_dms-v1/CHANGELOG.md index b4206b445bf5..7117a365dc0e 100644 --- a/google-cloud-cloud_dms-v1/CHANGELOG.md +++ b/google-cloud-cloud_dms-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.3.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.3.0 (2025-05-12) #### Features diff --git a/google-cloud-cloud_dms-v1/lib/google/cloud/cloud_dms/v1/version.rb b/google-cloud-cloud_dms-v1/lib/google/cloud/cloud_dms/v1/version.rb index 1f960d5e87e7..e2a362ec022a 100644 --- a/google-cloud-cloud_dms-v1/lib/google/cloud/cloud_dms/v1/version.rb +++ b/google-cloud-cloud_dms-v1/lib/google/cloud/cloud_dms/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module CloudDMS module V1 - VERSION = "1.3.0" + VERSION = "1.3.1" end end end diff --git a/google-cloud-cloud_dms-v1/snippets/snippet_metadata_google.cloud.clouddms.v1.json b/google-cloud-cloud_dms-v1/snippets/snippet_metadata_google.cloud.clouddms.v1.json index f5309292c561..352dadfd7538 100644 --- a/google-cloud-cloud_dms-v1/snippets/snippet_metadata_google.cloud.clouddms.v1.json +++ b/google-cloud-cloud_dms-v1/snippets/snippet_metadata_google.cloud.clouddms.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-cloud_dms-v1", - "version": "1.3.0", + "version": "1.3.1", "language": "RUBY", "apis": [ { From f5576d3a99eb560f6efe6cc7f0c1c16827228c05 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:36:23 +0000 Subject: [PATCH 241/457] chore(main): release google-cloud-channel-v1 2.2.1 (#30641) --- .release-please-manifest.json | 2 +- google-cloud-channel-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/channel/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.channel.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 079ae62f6a7b..3950cda93eef 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -195,7 +195,7 @@ "google-cloud-certificate_manager-v1+FILLER": "0.0.0", "google-cloud-channel": "2.0.1", "google-cloud-channel+FILLER": "0.0.0", - "google-cloud-channel-v1": "2.2.0", + "google-cloud-channel-v1": "2.2.1", "google-cloud-channel-v1+FILLER": "0.0.0", "google-cloud-chronicle": "0.1.0", "google-cloud-chronicle+FILLER": "0.0.0", diff --git a/google-cloud-channel-v1/CHANGELOG.md b/google-cloud-channel-v1/CHANGELOG.md index 8a393918bcfe..0b7137aad19c 100644 --- a/google-cloud-channel-v1/CHANGELOG.md +++ b/google-cloud-channel-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.2.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 2.2.0 (2025-06-16) #### Features diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb index 5ea6f015f79a..45544a940bbf 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Channel module V1 - VERSION = "2.2.0" + VERSION = "2.2.1" end end end diff --git a/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json b/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json index 504456b88e57..84280c28577c 100644 --- a/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json +++ b/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-channel-v1", - "version": "2.2.0", + "version": "2.2.1", "language": "RUBY", "apis": [ { From 1bfc026b3831bef1db3a1f3eb47b8dc58c63c026 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:36:42 +0000 Subject: [PATCH 242/457] chore(main): release google-cloud-bigtable-admin-v2 1.11.1 (#30640) --- .release-please-manifest.json | 2 +- google-cloud-bigtable-admin-v2/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/bigtable/admin/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.bigtable.admin.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3950cda93eef..148f8adacfb9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -163,7 +163,7 @@ "google-cloud-bigquery-storage-v1+FILLER": "0.0.0", "google-cloud-bigtable": "2.12.0", "google-cloud-bigtable+FILLER": "0.0.0", - "google-cloud-bigtable-admin-v2": "1.11.0", + "google-cloud-bigtable-admin-v2": "1.11.1", "google-cloud-bigtable-admin-v2+FILLER": "0.0.0", "google-cloud-bigtable-v2": "1.7.0", "google-cloud-bigtable-v2+FILLER": "0.0.0", diff --git a/google-cloud-bigtable-admin-v2/CHANGELOG.md b/google-cloud-bigtable-admin-v2/CHANGELOG.md index 746e41125d87..dc52e030b0ab 100644 --- a/google-cloud-bigtable-admin-v2/CHANGELOG.md +++ b/google-cloud-bigtable-admin-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.11.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.11.0 (2025-06-24) #### Features diff --git a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb index d6fa14579fa8..fb2a23ac6e51 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb @@ -22,7 +22,7 @@ module Cloud module Bigtable module Admin module V2 - VERSION = "1.11.0" + VERSION = "1.11.1" end end end diff --git a/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json b/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json index 1c5fb1d2837d..12c623f8e99e 100644 --- a/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json +++ b/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-bigtable-admin-v2", - "version": "1.11.0", + "version": "1.11.1", "language": "RUBY", "apis": [ { From 8ac6ff963c5957161de86d14ee015779ba5098c4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:37:00 +0000 Subject: [PATCH 243/457] chore(main): release google-cloud-bigquery-data_transfer-v1 1.4.1 (#30639) --- .release-please-manifest.json | 2 +- google-cloud-bigquery-data_transfer-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/bigquery/data_transfer/v1/version.rb | 2 +- ...ppet_metadata_google.cloud.bigquery.datatransfer.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 148f8adacfb9..3148df8f4e4d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -147,7 +147,7 @@ "google-cloud-bigquery-data_policies-v1beta1+FILLER": "0.0.0", "google-cloud-bigquery-data_transfer": "1.7.2", "google-cloud-bigquery-data_transfer+FILLER": "0.0.0", - "google-cloud-bigquery-data_transfer-v1": "1.4.0", + "google-cloud-bigquery-data_transfer-v1": "1.4.1", "google-cloud-bigquery-data_transfer-v1+FILLER": "0.0.0", "google-cloud-bigquery-migration": "1.3.2", "google-cloud-bigquery-migration+FILLER": "0.0.0", diff --git a/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md b/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md index 9dce17f60032..9054f04db501 100644 --- a/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md +++ b/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.4.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.4.0 (2025-05-12) #### Features diff --git a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb index 5cb76e3468d2..9f051189bc26 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module Bigquery module DataTransfer module V1 - VERSION = "1.4.0" + VERSION = "1.4.1" end end end diff --git a/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json index 924f7c3bbbbd..f50198b01237 100644 --- a/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ b/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-bigquery-data_transfer-v1", - "version": "1.4.0", + "version": "1.4.1", "language": "RUBY", "apis": [ { From 32697714e9ad7331c129fff36d25c4ec83c05c6b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:37:18 +0000 Subject: [PATCH 244/457] chore(main): release google-cloud-bigquery-analytics_hub-v1 0.13.1 (#30638) --- .release-please-manifest.json | 2 +- google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/bigquery/analytics_hub/v1/version.rb | 2 +- ...ppet_metadata_google.cloud.bigquery.analyticshub.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3148df8f4e4d..88f678dd1ca3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -129,7 +129,7 @@ "google-cloud-bigquery+FILLER": "0.0.0", "google-cloud-bigquery-analytics_hub": "1.3.1", "google-cloud-bigquery-analytics_hub+FILLER": "0.0.0", - "google-cloud-bigquery-analytics_hub-v1": "0.13.0", + "google-cloud-bigquery-analytics_hub-v1": "0.13.1", "google-cloud-bigquery-analytics_hub-v1+FILLER": "0.0.0", "google-cloud-bigquery-connection": "1.6.1", "google-cloud-bigquery-connection+FILLER": "0.0.0", diff --git a/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md b/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md index 02956d79611a..f50ede9f39e9 100644 --- a/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md +++ b/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.13.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.13.0 (2025-05-16) #### Features diff --git a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb index 8dc06c920896..d9e6861a5fa1 100644 --- a/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb +++ b/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module Bigquery module AnalyticsHub module V1 - VERSION = "0.13.0" + VERSION = "0.13.1" end end end diff --git a/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json index bc3f45e63f6f..9a7babd53ef7 100644 --- a/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json +++ b/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-bigquery-analytics_hub-v1", - "version": "0.13.0", + "version": "0.13.1", "language": "RUBY", "apis": [ { From d966e95de4466752adf53bad0f69cdb4718cf899 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:37:37 +0000 Subject: [PATCH 245/457] chore(main): release google-cloud-automl-v1beta1 0.14.1 (#30637) --- .release-please-manifest.json | 2 +- google-cloud-automl-v1beta1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/automl/v1beta1/version.rb | 2 +- .../snippet_metadata_google.cloud.automl.v1beta1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 88f678dd1ca3..cd67c802a09f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -101,7 +101,7 @@ "google-cloud-automl+FILLER": "0.0.0", "google-cloud-automl-v1": "1.3.0", "google-cloud-automl-v1+FILLER": "0.0.0", - "google-cloud-automl-v1beta1": "0.14.0", + "google-cloud-automl-v1beta1": "0.14.1", "google-cloud-automl-v1beta1+FILLER": "0.0.0", "google-cloud-backupdr": "2.0.1", "google-cloud-backupdr+FILLER": "0.0.0", diff --git a/google-cloud-automl-v1beta1/CHANGELOG.md b/google-cloud-automl-v1beta1/CHANGELOG.md index 46ab085d0179..4a1c2d0431af 100644 --- a/google-cloud-automl-v1beta1/CHANGELOG.md +++ b/google-cloud-automl-v1beta1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 0.14.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.14.0 (2025-05-12) #### Features diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb index 807b2e22dc96..a9886855e985 100644 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AutoML module V1beta1 - VERSION = "0.14.0" + VERSION = "0.14.1" end end end diff --git a/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json b/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json index b6bb51b3ab6b..dfd0d0689ce7 100644 --- a/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json +++ b/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-automl-v1beta1", - "version": "0.14.0", + "version": "0.14.1", "language": "RUBY", "apis": [ { From c2ed6f23badcd7d3434a29d6fcf33d48e9dbee6b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:37:56 +0000 Subject: [PATCH 246/457] chore(main): release google-cloud-automl-v1 1.3.1 (#30636) --- .release-please-manifest.json | 2 +- google-cloud-automl-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/automl/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.automl.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cd67c802a09f..d488c0905308 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -99,7 +99,7 @@ "google-cloud-assured_workloads-v1beta1+FILLER": "0.0.0", "google-cloud-automl": "2.0.2", "google-cloud-automl+FILLER": "0.0.0", - "google-cloud-automl-v1": "1.3.0", + "google-cloud-automl-v1": "1.3.1", "google-cloud-automl-v1+FILLER": "0.0.0", "google-cloud-automl-v1beta1": "0.14.1", "google-cloud-automl-v1beta1+FILLER": "0.0.0", diff --git a/google-cloud-automl-v1/CHANGELOG.md b/google-cloud-automl-v1/CHANGELOG.md index 1a5cf798bae8..4d59afc264be 100644 --- a/google-cloud-automl-v1/CHANGELOG.md +++ b/google-cloud-automl-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.3.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.3.0 (2025-05-12) #### Features diff --git a/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb b/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb index a986e6a7a528..4230e5310e11 100644 --- a/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb +++ b/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AutoML module V1 - VERSION = "1.3.0" + VERSION = "1.3.1" end end end diff --git a/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json b/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json index 5620271e0ad5..427787bb3769 100644 --- a/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json +++ b/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-automl-v1", - "version": "1.3.0", + "version": "1.3.1", "language": "RUBY", "apis": [ { From 2c13084f785db6a5bce6af0d691a7ecac010022b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:38:14 +0000 Subject: [PATCH 247/457] chore(main): release google-cloud-assured_workloads-v1beta1 0.21.1 (#30635) --- .release-please-manifest.json | 2 +- google-cloud-assured_workloads-v1beta1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/assured_workloads/v1beta1/version.rb | 2 +- ...ppet_metadata_google.cloud.assuredworkloads.v1beta1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d488c0905308..3d5e4a6d18ee 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -95,7 +95,7 @@ "google-cloud-assured_workloads+FILLER": "0.0.0", "google-cloud-assured_workloads-v1": "1.3.0", "google-cloud-assured_workloads-v1+FILLER": "0.0.0", - "google-cloud-assured_workloads-v1beta1": "0.21.0", + "google-cloud-assured_workloads-v1beta1": "0.21.1", "google-cloud-assured_workloads-v1beta1+FILLER": "0.0.0", "google-cloud-automl": "2.0.2", "google-cloud-automl+FILLER": "0.0.0", diff --git a/google-cloud-assured_workloads-v1beta1/CHANGELOG.md b/google-cloud-assured_workloads-v1beta1/CHANGELOG.md index 018f7d153d5c..32b52835ae24 100644 --- a/google-cloud-assured_workloads-v1beta1/CHANGELOG.md +++ b/google-cloud-assured_workloads-v1beta1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 0.21.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.21.0 (2025-05-12) #### Features diff --git a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb index d1fdd6593372..8e7fbccdf6c7 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AssuredWorkloads module V1beta1 - VERSION = "0.21.0" + VERSION = "0.21.1" end end end diff --git a/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json b/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json index c2743ff0aaad..6943f5adf047 100644 --- a/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json +++ b/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-assured_workloads-v1beta1", - "version": "0.21.0", + "version": "0.21.1", "language": "RUBY", "apis": [ { From e1a3e99c94f9a4dab452d7c0c7f01df16e13a288 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:38:32 +0000 Subject: [PATCH 248/457] chore(main): release google-cloud-asset-v1 1.4.1 (#30634) --- .release-please-manifest.json | 2 +- google-cloud-asset-v1/CHANGELOG.md | 6 ++++++ google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.asset.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3d5e4a6d18ee..384b34515a97 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -89,7 +89,7 @@ "google-cloud-artifact_registry-v1beta2+FILLER": "0.0.0", "google-cloud-asset": "1.8.2", "google-cloud-asset+FILLER": "0.0.0", - "google-cloud-asset-v1": "1.4.0", + "google-cloud-asset-v1": "1.4.1", "google-cloud-asset-v1+FILLER": "0.0.0", "google-cloud-assured_workloads": "2.0.1", "google-cloud-assured_workloads+FILLER": "0.0.0", diff --git a/google-cloud-asset-v1/CHANGELOG.md b/google-cloud-asset-v1/CHANGELOG.md index 61a415a357c7..f6add0063f9e 100644 --- a/google-cloud-asset-v1/CHANGELOG.md +++ b/google-cloud-asset-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.4.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.4.0 (2025-05-12) #### Features diff --git a/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb b/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb index d951f6f4b152..3120f8f0f24a 100644 --- a/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb +++ b/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Asset module V1 - VERSION = "1.4.0" + VERSION = "1.4.1" end end end diff --git a/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json b/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json index 629e81a52970..e404965a1f73 100644 --- a/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json +++ b/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-asset-v1", - "version": "1.4.0", + "version": "1.4.1", "language": "RUBY", "apis": [ { From 2e30b2a2dbf185b21e2dc7e5b10567228aca5d5c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:38:51 +0000 Subject: [PATCH 249/457] chore(main): release google-cloud-alloy_db-v1beta 0.17.1 (#30633) --- .release-please-manifest.json | 2 +- google-cloud-alloy_db-v1beta/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/alloy_db/v1beta/version.rb | 2 +- .../snippet_metadata_google.cloud.alloydb.v1beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 384b34515a97..71a1941e76a0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -51,7 +51,7 @@ "google-cloud-alloy_db-v1+FILLER": "0.0.0", "google-cloud-alloy_db-v1alpha": "0.14.0", "google-cloud-alloy_db-v1alpha+FILLER": "0.0.0", - "google-cloud-alloy_db-v1beta": "0.17.0", + "google-cloud-alloy_db-v1beta": "0.17.1", "google-cloud-alloy_db-v1beta+FILLER": "0.0.0", "google-cloud-api_gateway": "2.0.1", "google-cloud-api_gateway+FILLER": "0.0.0", diff --git a/google-cloud-alloy_db-v1beta/CHANGELOG.md b/google-cloud-alloy_db-v1beta/CHANGELOG.md index 89c1463aec74..d9e653ae15cc 100644 --- a/google-cloud-alloy_db-v1beta/CHANGELOG.md +++ b/google-cloud-alloy_db-v1beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.17.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.17.0 (2025-06-24) #### Features diff --git a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/version.rb b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/version.rb index 1c70d3dae7b3..64d0422539c4 100644 --- a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/version.rb +++ b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AlloyDB module V1beta - VERSION = "0.17.0" + VERSION = "0.17.1" end end end diff --git a/google-cloud-alloy_db-v1beta/snippets/snippet_metadata_google.cloud.alloydb.v1beta.json b/google-cloud-alloy_db-v1beta/snippets/snippet_metadata_google.cloud.alloydb.v1beta.json index 3e5d7b6e3c81..0b188aabd616 100644 --- a/google-cloud-alloy_db-v1beta/snippets/snippet_metadata_google.cloud.alloydb.v1beta.json +++ b/google-cloud-alloy_db-v1beta/snippets/snippet_metadata_google.cloud.alloydb.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-alloy_db-v1beta", - "version": "0.17.0", + "version": "0.17.1", "language": "RUBY", "apis": [ { From dcaefc448637ffbc133c868373525c820f702ba3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:39:09 +0000 Subject: [PATCH 250/457] chore(main): release google-cloud-alloy_db-v1alpha 0.14.1 (#30632) --- .release-please-manifest.json | 2 +- google-cloud-alloy_db-v1alpha/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/alloy_db/v1alpha/version.rb | 2 +- .../snippet_metadata_google.cloud.alloydb.v1alpha.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 71a1941e76a0..9f9ee5b6a1ca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -49,7 +49,7 @@ "google-cloud-alloy_db+FILLER": "0.0.0", "google-cloud-alloy_db-v1": "1.3.0", "google-cloud-alloy_db-v1+FILLER": "0.0.0", - "google-cloud-alloy_db-v1alpha": "0.14.0", + "google-cloud-alloy_db-v1alpha": "0.14.1", "google-cloud-alloy_db-v1alpha+FILLER": "0.0.0", "google-cloud-alloy_db-v1beta": "0.17.1", "google-cloud-alloy_db-v1beta+FILLER": "0.0.0", diff --git a/google-cloud-alloy_db-v1alpha/CHANGELOG.md b/google-cloud-alloy_db-v1alpha/CHANGELOG.md index 087a1f444993..ef9fc60620f7 100644 --- a/google-cloud-alloy_db-v1alpha/CHANGELOG.md +++ b/google-cloud-alloy_db-v1alpha/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.14.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.14.0 (2025-06-23) #### Features diff --git a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/version.rb b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/version.rb index 9288557388e1..c9d3a9b7fda5 100644 --- a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/version.rb +++ b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AlloyDB module V1alpha - VERSION = "0.14.0" + VERSION = "0.14.1" end end end diff --git a/google-cloud-alloy_db-v1alpha/snippets/snippet_metadata_google.cloud.alloydb.v1alpha.json b/google-cloud-alloy_db-v1alpha/snippets/snippet_metadata_google.cloud.alloydb.v1alpha.json index 92d221983d73..4bc2e8e4cb3b 100644 --- a/google-cloud-alloy_db-v1alpha/snippets/snippet_metadata_google.cloud.alloydb.v1alpha.json +++ b/google-cloud-alloy_db-v1alpha/snippets/snippet_metadata_google.cloud.alloydb.v1alpha.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-alloy_db-v1alpha", - "version": "0.14.0", + "version": "0.14.1", "language": "RUBY", "apis": [ { From d75a7f4b7cd5307d59d6f673acf4432cf5d3bf00 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:39:27 +0000 Subject: [PATCH 251/457] chore(main): release google-cloud-alloy_db-v1 1.3.1 (#30631) --- .release-please-manifest.json | 2 +- google-cloud-alloy_db-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/alloy_db/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.alloydb.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9f9ee5b6a1ca..3fbc05eab1f4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -47,7 +47,7 @@ "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", - "google-cloud-alloy_db-v1": "1.3.0", + "google-cloud-alloy_db-v1": "1.3.1", "google-cloud-alloy_db-v1+FILLER": "0.0.0", "google-cloud-alloy_db-v1alpha": "0.14.1", "google-cloud-alloy_db-v1alpha+FILLER": "0.0.0", diff --git a/google-cloud-alloy_db-v1/CHANGELOG.md b/google-cloud-alloy_db-v1/CHANGELOG.md index 448ebc8dc055..110a9c965b38 100644 --- a/google-cloud-alloy_db-v1/CHANGELOG.md +++ b/google-cloud-alloy_db-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.3.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.3.0 (2025-06-24) #### Features diff --git a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/version.rb b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/version.rb index edaeb72b882a..0c458d4b14e9 100644 --- a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/version.rb +++ b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AlloyDB module V1 - VERSION = "1.3.0" + VERSION = "1.3.1" end end end diff --git a/google-cloud-alloy_db-v1/snippets/snippet_metadata_google.cloud.alloydb.v1.json b/google-cloud-alloy_db-v1/snippets/snippet_metadata_google.cloud.alloydb.v1.json index 998e2ef90fcc..5f9324266f0f 100644 --- a/google-cloud-alloy_db-v1/snippets/snippet_metadata_google.cloud.alloydb.v1.json +++ b/google-cloud-alloy_db-v1/snippets/snippet_metadata_google.cloud.alloydb.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-alloy_db-v1", - "version": "1.3.0", + "version": "1.3.1", "language": "RUBY", "apis": [ { From 6d1670d56e93f051723c262595e5dec6f6b249cb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:39:45 +0000 Subject: [PATCH 252/457] chore(main): release google-analytics-admin-v1alpha 0.36.1 (#30630) --- .release-please-manifest.json | 2 +- google-analytics-admin-v1alpha/CHANGELOG.md | 6 ++++++ .../lib/google/analytics/admin/v1alpha/version.rb | 2 +- .../snippet_metadata_google.analytics.admin.v1alpha.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3fbc05eab1f4..eff3cca17dab 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -9,7 +9,7 @@ "google-ads-marketing_platform-admin-v1alpha+FILLER": "0.0.0", "google-analytics-admin": "0.6.2", "google-analytics-admin+FILLER": "0.0.0", - "google-analytics-admin-v1alpha": "0.36.0", + "google-analytics-admin-v1alpha": "0.36.1", "google-analytics-admin-v1alpha+FILLER": "0.0.0", "google-analytics-data": "0.7.1", "google-analytics-data+FILLER": "0.0.0", diff --git a/google-analytics-admin-v1alpha/CHANGELOG.md b/google-analytics-admin-v1alpha/CHANGELOG.md index 075d7c2b8fc9..2830f527acf4 100644 --- a/google-analytics-admin-v1alpha/CHANGELOG.md +++ b/google-analytics-admin-v1alpha/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 0.36.1 (2025-07-15) + +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 0.36.0 (2025-06-16) #### Features diff --git a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/version.rb b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/version.rb index a307bc7e2690..aad36722478a 100644 --- a/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/version.rb +++ b/google-analytics-admin-v1alpha/lib/google/analytics/admin/v1alpha/version.rb @@ -21,7 +21,7 @@ module Google module Analytics module Admin module V1alpha - VERSION = "0.36.0" + VERSION = "0.36.1" end end end diff --git a/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json b/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json index 22e15aefd417..f7887db9ae15 100644 --- a/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json +++ b/google-analytics-admin-v1alpha/snippets/snippet_metadata_google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-analytics-admin-v1alpha", - "version": "0.36.0", + "version": "0.36.1", "language": "RUBY", "apis": [ { From 96c1532c350c7650f3083995c969a071cd91be58 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:40:04 +0000 Subject: [PATCH 253/457] chore(main): release google-cloud-security_center-v2 1.3.0 (#30617) --- .release-please-manifest.json | 2 +- google-cloud-security_center-v2/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/security_center/v2/version.rb | 2 +- .../snippet_metadata_google.cloud.securitycenter.v2.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index eff3cca17dab..c12856b6195d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -683,7 +683,7 @@ "google-cloud-security_center-v1+FILLER": "0.0.0", "google-cloud-security_center-v1p1beta1": "0.17.0", "google-cloud-security_center-v1p1beta1+FILLER": "0.0.0", - "google-cloud-security_center-v2": "1.2.0", + "google-cloud-security_center-v2": "1.3.0", "google-cloud-security_center-v2+FILLER": "0.0.0", "google-cloud-security_center_management": "1.2.1", "google-cloud-security_center_management+FILLER": "0.0.0", diff --git a/google-cloud-security_center-v2/CHANGELOG.md b/google-cloud-security_center-v2/CHANGELOG.md index ff2398715629..ca732c34e04d 100644 --- a/google-cloud-security_center-v2/CHANGELOG.md +++ b/google-cloud-security_center-v2/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 1.3.0 (2025-07-15) + +#### Features + +* Support for File operations +* Support for various additional Finding fields + ### 1.2.0 (2025-05-12) #### Features diff --git a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb index 5ff7640cf61a..903fc371a9d2 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module SecurityCenter module V2 - VERSION = "1.2.0" + VERSION = "1.3.0" end end end diff --git a/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json b/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json index 3065201934ca..2b057b21c1b6 100644 --- a/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json +++ b/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-security_center-v2", - "version": "1.2.0", + "version": "1.3.0", "language": "RUBY", "apis": [ { From e2d4416f6693900de15a896b4acc1965c2b11ab5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:40:22 +0000 Subject: [PATCH 254/457] chore(main): release google-cloud-security-private_ca-v1 2.2.0 (#30616) --- .release-please-manifest.json | 2 +- google-cloud-security-private_ca-v1/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/security/private_ca/v1/version.rb | 2 +- ...ppet_metadata_google.cloud.security.privateca.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c12856b6195d..39d3580e2889 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -667,7 +667,7 @@ "google-cloud-secure_source_manager-v1+FILLER": "0.0.0", "google-cloud-security-private_ca": "2.0.1", "google-cloud-security-private_ca+FILLER": "0.0.0", - "google-cloud-security-private_ca-v1": "2.1.0", + "google-cloud-security-private_ca-v1": "2.2.0", "google-cloud-security-private_ca-v1+FILLER": "0.0.0", "google-cloud-security-private_ca-v1beta1": "0.13.0", "google-cloud-security-private_ca-v1beta1+FILLER": "0.0.0", diff --git a/google-cloud-security-private_ca-v1/CHANGELOG.md b/google-cloud-security-private_ca-v1/CHANGELOG.md index 1dc95e560bf4..f62bc6d23d23 100644 --- a/google-cloud-security-private_ca-v1/CHANGELOG.md +++ b/google-cloud-security-private_ca-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 2.2.0 (2025-07-15) + +#### Features + +* Support for backdating certificates +* Support for the relative distinguished names +* Support for the TBS Certificate digest +* Support for user-defined URLs for certificate authorities + ### 2.1.0 (2025-05-12) #### Features diff --git a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb index 594fcce69b92..4b8c96d70e01 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module Security module PrivateCA module V1 - VERSION = "2.1.0" + VERSION = "2.2.0" end end end diff --git a/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json b/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json index 3e713e732ed5..8d549f15ac0a 100644 --- a/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json +++ b/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-security-private_ca-v1", - "version": "2.1.0", + "version": "2.2.0", "language": "RUBY", "apis": [ { From 84c9db2f66279a03a9bf9a7d4ff8b76d521a92ec Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:40:41 +0000 Subject: [PATCH 255/457] chore(main): release google-cloud-network_services-v1 2.4.0 (#30615) --- .release-please-manifest.json | 2 +- google-cloud-network_services-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/network_services/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.networkservices.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 39d3580e2889..3ecf74fe7bb8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -527,7 +527,7 @@ "google-cloud-network_security-v1beta1+FILLER": "0.0.0", "google-cloud-network_services": "2.0.1", "google-cloud-network_services+FILLER": "0.0.0", - "google-cloud-network_services-v1": "2.3.0", + "google-cloud-network_services-v1": "2.4.0", "google-cloud-network_services-v1+FILLER": "0.0.0", "google-cloud-notebooks": "3.0.1", "google-cloud-notebooks+FILLER": "0.0.0", diff --git a/google-cloud-network_services-v1/CHANGELOG.md b/google-cloud-network_services-v1/CHANGELOG.md index 4073760aa9ae..e7c21e495968 100644 --- a/google-cloud-network_services-v1/CHANGELOG.md +++ b/google-cloud-network_services-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.4.0 (2025-07-15) + +#### Features + +* Support for Backend Service isolation configs ([#30604](https://github.com/googleapis/google-cloud-ruby/issues/30604)) + ### 2.3.0 (2025-06-24) #### Features diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb index 017a2f1b7ea7..8920683fe9e1 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module NetworkServices module V1 - VERSION = "2.3.0" + VERSION = "2.4.0" end end end diff --git a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json index 71891c5e0a32..14afcb32456a 100644 --- a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-network_services-v1", - "version": "2.3.0", + "version": "2.4.0", "language": "RUBY", "apis": [ { From 09815f1055a4e4854af455d3c4909dfd8166df27 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:40:59 +0000 Subject: [PATCH 256/457] chore(main): release google-cloud-managed_kafka-v1 1.4.0 (#30614) --- .release-please-manifest.json | 2 +- google-cloud-managed_kafka-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/managed_kafka/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.managedkafka.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3ecf74fe7bb8..534e47333c09 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -471,7 +471,7 @@ "google-cloud-managed_identities-v1+FILLER": "0.0.0", "google-cloud-managed_kafka": "2.1.1", "google-cloud-managed_kafka+FILLER": "0.0.0", - "google-cloud-managed_kafka-v1": "1.3.0", + "google-cloud-managed_kafka-v1": "1.4.0", "google-cloud-managed_kafka-v1+FILLER": "0.0.0", "google-cloud-media_translation": "0.6.1", "google-cloud-media_translation+FILLER": "0.0.0", diff --git a/google-cloud-managed_kafka-v1/CHANGELOG.md b/google-cloud-managed_kafka-v1/CHANGELOG.md index 8bc4eedda345..2c6cc9477b44 100644 --- a/google-cloud-managed_kafka-v1/CHANGELOG.md +++ b/google-cloud-managed_kafka-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.4.0 (2025-07-15) + +#### Features + +* Support for Cluster TLS config ([#30601](https://github.com/googleapis/google-cloud-ruby/issues/30601)) + ### 1.3.0 (2025-05-27) #### Features diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/version.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/version.rb index d3498266ed06..96e4f9ddbf2e 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/version.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module ManagedKafka module V1 - VERSION = "1.3.0" + VERSION = "1.4.0" end end end diff --git a/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json b/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json index 929a305ef288..865c9b12785f 100644 --- a/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json +++ b/google-cloud-managed_kafka-v1/snippets/snippet_metadata_google.cloud.managedkafka.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-managed_kafka-v1", - "version": "1.3.0", + "version": "1.4.0", "language": "RUBY", "apis": [ { From 5c326aa180b96508d4d7002a8e2df9a92d4ee566 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:41:18 +0000 Subject: [PATCH 257/457] chore(main): release google-cloud-dialogflow-cx-v3 1.8.0 (#30613) --- .release-please-manifest.json | 2 +- google-cloud-dialogflow-cx-v3/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/dialogflow/cx/v3/version.rb | 2 +- .../snippet_metadata_google.cloud.dialogflow.cx.v3.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 534e47333c09..b13a733bd80a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -323,7 +323,7 @@ "google-cloud-dialogflow+FILLER": "0.0.0", "google-cloud-dialogflow-cx": "1.3.1", "google-cloud-dialogflow-cx+FILLER": "0.0.0", - "google-cloud-dialogflow-cx-v3": "1.7.0", + "google-cloud-dialogflow-cx-v3": "1.8.0", "google-cloud-dialogflow-cx-v3+FILLER": "0.0.0", "google-cloud-dialogflow-v2": "1.10.1", "google-cloud-dialogflow-v2+FILLER": "0.0.0", diff --git a/google-cloud-dialogflow-cx-v3/CHANGELOG.md b/google-cloud-dialogflow-cx-v3/CHANGELOG.md index d652508299c4..8de20a7b7f72 100644 --- a/google-cloud-dialogflow-cx-v3/CHANGELOG.md +++ b/google-cloud-dialogflow-cx-v3/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 1.8.0 (2025-07-15) + +#### Features + +* Add support for generator settings on fulfillment ([#30596](https://github.com/googleapis/google-cloud-ruby/issues/30596)) +#### Documentation + +* Clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30624](https://github.com/googleapis/google-cloud-ruby/issues/30624)) + ### 1.7.0 (2025-05-12) #### Features diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/version.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/version.rb index df24dac87701..e301129661f2 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/version.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/version.rb @@ -22,7 +22,7 @@ module Cloud module Dialogflow module CX module V3 - VERSION = "1.7.0" + VERSION = "1.8.0" end end end diff --git a/google-cloud-dialogflow-cx-v3/snippets/snippet_metadata_google.cloud.dialogflow.cx.v3.json b/google-cloud-dialogflow-cx-v3/snippets/snippet_metadata_google.cloud.dialogflow.cx.v3.json index 331c566dcea9..bea94be93ed8 100644 --- a/google-cloud-dialogflow-cx-v3/snippets/snippet_metadata_google.cloud.dialogflow.cx.v3.json +++ b/google-cloud-dialogflow-cx-v3/snippets/snippet_metadata_google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dialogflow-cx-v3", - "version": "1.7.0", + "version": "1.8.0", "language": "RUBY", "apis": [ { From 2e7505ab85b585c489919f3f680f3cacc0fc8cc8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:41:36 +0000 Subject: [PATCH 258/457] chore(main): release google-cloud-dataproc-v1 1.6.0 (#30612) --- .release-please-manifest.json | 2 +- google-cloud-dataproc-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/dataproc/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.dataproc.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b13a733bd80a..62c809fa3fab 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -287,7 +287,7 @@ "google-cloud-dataplex-v1+FILLER": "0.0.0", "google-cloud-dataproc": "2.7.2", "google-cloud-dataproc+FILLER": "0.0.0", - "google-cloud-dataproc-v1": "1.5.0", + "google-cloud-dataproc-v1": "1.6.0", "google-cloud-dataproc-v1+FILLER": "0.0.0", "google-cloud-dataqna": "0.6.1", "google-cloud-dataqna+FILLER": "0.0.0", diff --git a/google-cloud-dataproc-v1/CHANGELOG.md b/google-cloud-dataproc-v1/CHANGELOG.md index 2ce278ec8960..0053190fc77a 100644 --- a/google-cloud-dataproc-v1/CHANGELOG.md +++ b/google-cloud-dataproc-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.6.0 (2025-07-15) + +#### Features + +* Support for creating premium clusters ([#30583](https://github.com/googleapis/google-cloud-ruby/issues/30583)) + ### 1.5.0 (2025-06-16) #### Features diff --git a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/version.rb b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/version.rb index 16d2b11625d9..bb37e4735aa2 100644 --- a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/version.rb +++ b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Dataproc module V1 - VERSION = "1.5.0" + VERSION = "1.6.0" end end end diff --git a/google-cloud-dataproc-v1/snippets/snippet_metadata_google.cloud.dataproc.v1.json b/google-cloud-dataproc-v1/snippets/snippet_metadata_google.cloud.dataproc.v1.json index 453f213b8b89..dc5a8d483280 100644 --- a/google-cloud-dataproc-v1/snippets/snippet_metadata_google.cloud.dataproc.v1.json +++ b/google-cloud-dataproc-v1/snippets/snippet_metadata_google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dataproc-v1", - "version": "1.5.0", + "version": "1.6.0", "language": "RUBY", "apis": [ { From 75c5ea39795766676a20bdc457b4bf07edbb7b9f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:41:54 +0000 Subject: [PATCH 259/457] chore(main): release google-cloud-dataplex-v1 2.5.0 (#30611) --- .release-please-manifest.json | 2 +- google-cloud-dataplex-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/dataplex/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.dataplex.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 62c809fa3fab..7288c803a22d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -283,7 +283,7 @@ "google-cloud-dataform-v1beta1+FILLER": "0.0.0", "google-cloud-dataplex": "2.1.1", "google-cloud-dataplex+FILLER": "0.0.0", - "google-cloud-dataplex-v1": "2.4.1", + "google-cloud-dataplex-v1": "2.5.0", "google-cloud-dataplex-v1+FILLER": "0.0.0", "google-cloud-dataproc": "2.7.2", "google-cloud-dataproc+FILLER": "0.0.0", diff --git a/google-cloud-dataplex-v1/CHANGELOG.md b/google-cloud-dataplex-v1/CHANGELOG.md index 4ba3f287f0b6..8d25d1209a4f 100644 --- a/google-cloud-dataplex-v1/CHANGELOG.md +++ b/google-cloud-dataplex-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.5.0 (2025-07-15) + +#### Features + +* Support for semantic search ([#30602](https://github.com/googleapis/google-cloud-ruby/issues/30602)) + ### 2.4.1 (2025-05-16) #### Documentation diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb index cbc5eaf3d7b2..ea60b1e12a14 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Dataplex module V1 - VERSION = "2.4.1" + VERSION = "2.5.0" end end end diff --git a/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json b/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json index a32a6003b787..e776176b64dd 100644 --- a/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json +++ b/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-dataplex-v1", - "version": "2.4.1", + "version": "2.5.0", "language": "RUBY", "apis": [ { From c91603b4c35e254da161e67f345eeba742d345cb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:42:13 +0000 Subject: [PATCH 260/457] chore(main): release google-cloud-bigtable-v2 1.8.0 (#30610) --- .release-please-manifest.json | 2 +- google-cloud-bigtable-v2/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/bigtable/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.bigtable.v2.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7288c803a22d..e365385a8d2f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -165,7 +165,7 @@ "google-cloud-bigtable+FILLER": "0.0.0", "google-cloud-bigtable-admin-v2": "1.11.1", "google-cloud-bigtable-admin-v2+FILLER": "0.0.0", - "google-cloud-bigtable-v2": "1.7.0", + "google-cloud-bigtable-v2": "1.8.0", "google-cloud-bigtable-v2+FILLER": "0.0.0", "google-cloud-billing": "1.6.1", "google-cloud-billing+FILLER": "0.0.0", diff --git a/google-cloud-bigtable-v2/CHANGELOG.md b/google-cloud-bigtable-v2/CHANGELOG.md index efff5dd8d0b4..ccc485724fb8 100644 --- a/google-cloud-bigtable-v2/CHANGELOG.md +++ b/google-cloud-bigtable-v2/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +### 1.8.0 (2025-07-15) + +#### Features + +* Support idempotency parameter to the mutate_row RPC ([#30581](https://github.com/googleapis/google-cloud-ruby/issues/30581)) +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.7.0 (2025-05-12) #### Features diff --git a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb index bd171bfdeb0d..dace23aed05c 100644 --- a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb +++ b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Bigtable module V2 - VERSION = "1.7.0" + VERSION = "1.8.0" end end end diff --git a/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json b/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json index ce6884557a95..76fd1b04ba07 100644 --- a/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json +++ b/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-bigtable-v2", - "version": "1.7.0", + "version": "1.8.0", "language": "RUBY", "apis": [ { From 283abf49aa387172e773a51da24e9387773e275a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:42:31 +0000 Subject: [PATCH 261/457] chore(main): release google-cloud-ai_platform-v1 1.18.0 (#30609) --- .release-please-manifest.json | 2 +- google-cloud-ai_platform-v1/CHANGELOG.md | 11 +++++++++++ .../lib/google/cloud/ai_platform/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e365385a8d2f..768e302cf157 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -43,7 +43,7 @@ "google-cloud-advisory_notifications-v1+FILLER": "0.0.0", "google-cloud-ai_platform": "2.0.1", "google-cloud-ai_platform+FILLER": "0.0.0", - "google-cloud-ai_platform-v1": "1.17.0", + "google-cloud-ai_platform-v1": "1.18.0", "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", diff --git a/google-cloud-ai_platform-v1/CHANGELOG.md b/google-cloud-ai_platform-v1/CHANGELOG.md index 591c8b292ee3..33f74c81cc66 100644 --- a/google-cloud-ai_platform-v1/CHANGELOG.md +++ b/google-cloud-ai_platform-v1/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +### 1.18.0 (2025-07-15) + +#### Features + +* Support for ColabImage +* Support for Tool to support computer use +* Support for unique names for pipeline tasks ([#30605](https://github.com/googleapis/google-cloud-ruby/issues/30605)) +#### Documentation + +* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) + ### 1.17.0 (2025-06-30) #### Features diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb index f36ed93fa4ef..be45e2bbcbea 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AIPlatform module V1 - VERSION = "1.17.0" + VERSION = "1.18.0" end end end diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index bf0fa10b73dc..86e59d4e8aab 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-ai_platform-v1", - "version": "1.17.0", + "version": "1.18.0", "language": "RUBY", "apis": [ { From 53d4ba0740de061a2f13ea57cd2ca77d118db291 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:42:49 +0000 Subject: [PATCH 262/457] chore(main): release google-ads-ad_manager-v1 2.0.0 (#30608) --- .release-please-manifest.json | 2 +- google-ads-ad_manager-v1/CHANGELOG.md | 22 +++++++++++++++++++ .../lib/google/ads/ad_manager/v1/version.rb | 2 +- ...ppet_metadata_google.ads.admanager.v1.json | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 768e302cf157..6f3195b6aa06 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,7 +1,7 @@ { "google-ads-ad_manager": "1.0.1", "google-ads-ad_manager+FILLER": "0.0.0", - "google-ads-ad_manager-v1": "1.1.0", + "google-ads-ad_manager-v1": "2.0.0", "google-ads-ad_manager-v1+FILLER": "0.0.0", "google-ads-marketing_platform-admin": "0.1.0", "google-ads-marketing_platform-admin+FILLER": "0.0.0", diff --git a/google-ads-ad_manager-v1/CHANGELOG.md b/google-ads-ad_manager-v1/CHANGELOG.md index 75a0622dcc25..c723561aa5f6 100644 --- a/google-ads-ad_manager-v1/CHANGELOG.md +++ b/google-ads-ad_manager-v1/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +### 2.0.0 (2025-07-15) + +### ⚠ BREAKING CHANGES + +* Removed Contact ID and Team ID fields + +#### Features + +* Support for Contact company display name +* Support for custom targeting key +* Support for the AdBreakService +* Support for the BandwidthGroupService +* Support for the DeviceCategoryService +* Support for the GeoTargetService +* Support for the OperatingSystemService and OperatingSystemVersionService +* Support for the PrivateAuctionService and PrivateAuctionDealService +* Support for the ProgrammaticBuyerService +* Added support for AdBreak resource ([#30579](https://github.com/googleapis/google-cloud-ruby/issues/30579)) +#### Bug Fixes + +* Removed Contact ID and Team ID fields + ### 1.1.0 (2025-05-12) #### Features diff --git a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/version.rb b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/version.rb index 9a1cb3473250..45514c66377e 100644 --- a/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/version.rb +++ b/google-ads-ad_manager-v1/lib/google/ads/ad_manager/v1/version.rb @@ -21,7 +21,7 @@ module Google module Ads module AdManager module V1 - VERSION = "1.1.0" + VERSION = "2.0.0" end end end diff --git a/google-ads-ad_manager-v1/snippets/snippet_metadata_google.ads.admanager.v1.json b/google-ads-ad_manager-v1/snippets/snippet_metadata_google.ads.admanager.v1.json index ef35857de990..6b0dfd12167e 100644 --- a/google-ads-ad_manager-v1/snippets/snippet_metadata_google.ads.admanager.v1.json +++ b/google-ads-ad_manager-v1/snippets/snippet_metadata_google.ads.admanager.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-ads-ad_manager-v1", - "version": "1.1.0", + "version": "2.0.0", "language": "RUBY", "apis": [ { From e0384db2d8ce3612338a3b0339f6055887ebe289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Tue, 15 Jul 2025 13:38:53 -0700 Subject: [PATCH 263/457] chore(pubsub): copy v2 samples to new directory (#30629) --- google-cloud-pubsub/.rubocop.yml | 1 + google-cloud-pubsub/v2samples/Gemfile | 40 ++++++ google-cloud-pubsub/v2samples/README.md | 129 ++++++++++++++++++ google-cloud-pubsub/v2samples/listener.rb | 26 ++++ .../v2samples/pubsub_commit_proto_schema.rb | 32 +++++ .../v2samples/pubsub_create_avro_schema.rb | 29 ++++ .../pubsub_create_bigquery_subscription.rb | 42 ++++++ .../v2samples/pubsub_create_proto_schema.rb | 29 ++++ .../pubsub_create_pull_subscription.rb | 29 ++++ .../pubsub_create_push_subscription.rb | 31 +++++ ...subscription_with_exactly_once_delivery.rb | 44 ++++++ .../pubsub_create_subscription_with_filter.rb | 43 ++++++ .../v2samples/pubsub_create_topic.rb | 27 ++++ .../pubsub_create_topic_with_schema.rb | 30 ++++ .../pubsub_dead_letter_create_subscription.rb | 34 +++++ .../pubsub_dead_letter_delivery_attempt.rb | 30 ++++ .../v2samples/pubsub_dead_letter_remove.rb | 27 ++++ .../pubsub_dead_letter_update_subscription.rb | 29 ++++ .../v2samples/pubsub_delete_schema.rb | 28 ++++ .../v2samples/pubsub_delete_subscription.rb | 28 ++++ .../v2samples/pubsub_delete_topic.rb | 28 ++++ .../v2samples/pubsub_detach_subscription.rb | 34 +++++ .../pubsub_enable_subscription_ordering.rb | 30 ++++ .../v2samples/pubsub_get_schema.rb | 27 ++++ .../pubsub_get_subscription_policy.rb | 29 ++++ .../v2samples/pubsub_get_topic_policy.rb | 29 ++++ .../v2samples/pubsub_list_schema_revisions.rb | 32 +++++ .../v2samples/pubsub_list_schemas.rb | 29 ++++ .../v2samples/pubsub_list_subscriptions.rb | 29 ++++ .../pubsub_list_topic_subscriptions.rb | 31 +++++ .../v2samples/pubsub_list_topics.rb | 29 ++++ .../v2samples/pubsub_publish.rb | 32 +++++ .../v2samples/pubsub_publish_avro_records.rb | 45 ++++++ .../pubsub_publish_custom_attributes.rb | 35 +++++ .../pubsub_publish_proto_messages.rb | 38 ++++++ .../pubsub_publish_with_error_handler.rb | 37 +++++ .../pubsub_publish_with_ordering_keys.rb | 39 ++++++ .../pubsub_publisher_batch_settings.rb | 37 +++++ .../pubsub_publisher_concurrency_control.rb | 39 ++++++ .../pubsub_publisher_flow_control.rb | 45 ++++++ .../pubsub_publisher_with_compression.rb | 49 +++++++ .../v2samples/pubsub_quickstart_publisher.rb | 28 ++++ ...ubsub_resume_publish_with_ordering_keys.rb | 47 +++++++ .../pubsub_set_subscription_policy.rb | 30 ++++ .../v2samples/pubsub_set_topic_policy.rb | 30 ++++ .../pubsub_subscribe_avro_records.rb | 53 +++++++ .../pubsub_subscribe_proto_messages.rb | 48 +++++++ .../v2samples/pubsub_subscriber_async_pull.rb | 37 +++++ ...subscriber_async_pull_custom_attributes.rb | 41 ++++++ .../pubsub_subscriber_concurrency_control.rb | 40 ++++++ .../pubsub_subscriber_error_listener.rb | 44 ++++++ ...pubsub_subscriber_exactly_once_delivery.rb | 55 ++++++++ .../pubsub_subscriber_flow_settings.rb | 35 +++++ .../v2samples/pubsub_subscriber_sync_pull.rb | 29 ++++ .../pubsub_subscriber_sync_pull_with_lease.rb | 56 ++++++++ .../pubsub_test_subscription_permissions.rb | 30 ++++ .../pubsub_test_topic_permissions.rb | 31 +++++ .../pubsub_update_push_configuration.rb | 29 ++++ google-cloud-pubsub/v2samples/quickstart.rb | 35 +++++ .../v2samples/utilities/us-states_pb.rb | 15 ++ 60 files changed, 2144 insertions(+) create mode 100644 google-cloud-pubsub/v2samples/Gemfile create mode 100644 google-cloud-pubsub/v2samples/README.md create mode 100644 google-cloud-pubsub/v2samples/listener.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_commit_proto_schema.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_avro_schema.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_bigquery_subscription.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_proto_schema.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_pull_subscription.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_push_subscription.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_subscription_with_exactly_once_delivery.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_subscription_with_filter.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_topic.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_create_topic_with_schema.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_dead_letter_create_subscription.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_dead_letter_delivery_attempt.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_dead_letter_remove.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_dead_letter_update_subscription.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_delete_schema.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_delete_subscription.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_delete_topic.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_detach_subscription.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_enable_subscription_ordering.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_get_schema.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_get_subscription_policy.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_get_topic_policy.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_list_schema_revisions.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_list_schemas.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_list_subscriptions.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_list_topic_subscriptions.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_list_topics.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publish.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publish_avro_records.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publish_custom_attributes.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publish_proto_messages.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publish_with_error_handler.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publish_with_ordering_keys.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publisher_batch_settings.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publisher_concurrency_control.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publisher_flow_control.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_publisher_with_compression.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_quickstart_publisher.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_resume_publish_with_ordering_keys.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_set_subscription_policy.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_set_topic_policy.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscribe_avro_records.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscribe_proto_messages.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscriber_async_pull.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscriber_async_pull_custom_attributes.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscriber_concurrency_control.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscriber_error_listener.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscriber_exactly_once_delivery.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscriber_flow_settings.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscriber_sync_pull.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_subscriber_sync_pull_with_lease.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_test_subscription_permissions.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_test_topic_permissions.rb create mode 100644 google-cloud-pubsub/v2samples/pubsub_update_push_configuration.rb create mode 100644 google-cloud-pubsub/v2samples/quickstart.rb create mode 100644 google-cloud-pubsub/v2samples/utilities/us-states_pb.rb diff --git a/google-cloud-pubsub/.rubocop.yml b/google-cloud-pubsub/.rubocop.yml index 5eb3c63d18a6..a8938fb82daf 100644 --- a/google-cloud-pubsub/.rubocop.yml +++ b/google-cloud-pubsub/.rubocop.yml @@ -7,6 +7,7 @@ AllCops: - "support/**/*" - "test/**/*" - "samples/utilities/**/*" + - "v2samples/**/*" Style/Documentation: Enabled: false diff --git a/google-cloud-pubsub/v2samples/Gemfile b/google-cloud-pubsub/v2samples/Gemfile new file mode 100644 index 000000000000..7cb35b395703 --- /dev/null +++ b/google-cloud-pubsub/v2samples/Gemfile @@ -0,0 +1,40 @@ +# Copyright 2021 Google, Inc +# +# 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. + +# [START pubsub_old_version_dependencies] +source "https://rubygems.org" + +# [END pubsub_old_version_dependencies] + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-pubsub", path: "../../google-cloud-pubsub" +else + # [START pubsub_old_version_dependencies] + gem "google-cloud-pubsub" + # [END pubsub_old_version_dependencies] +end + +gem "sinatra" + +group :test do + gem "avro", "~> 1.10" + gem "google-cloud-bigquery" + gem "google-style", "~> 1.25.1" + gem "minitest", "~> 5.14" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" + gem "rack-test" + gem "rake" + gem "toys-core" +end diff --git a/google-cloud-pubsub/v2samples/README.md b/google-cloud-pubsub/v2samples/README.md new file mode 100644 index 000000000000..3326bbc2e80f --- /dev/null +++ b/google-cloud-pubsub/v2samples/README.md @@ -0,0 +1,129 @@ +Google Cloud Platform logo + +# Google Cloud Pub/Sub Ruby Samples + +[Google Cloud Pub/Sub][language_docs] is a simple, reliable, scalable foundation for stream analytics +and event-driven computing systems. + +[language_docs]: https://cloud.google.com/pubsub/docs/ + +## Setup + +### Authentication + +Authentication is typically done through [Application Default Credentials](https://cloud.google.com/docs/authentication#getting_credentials_for_server-centric_flow) +, which means you do not have to change the code to authenticate as long as your +environment has credentials. You have a few options for setting up +authentication: + +1. When running locally, use the [Google Cloud SDK](https://cloud.google.com/sdk/) + + gcloud auth application-default login + +1. When running on App Engine or Compute Engine, credentials are already set-up. +However, you may need to configure your Compute Engine instance with +[additional scopes](https://cloud.google.com/compute/docs/authentication#using). + +1. You can create a [Service Account key file](https://cloud.google.com/docs/authentication#service_accounts) +. This file can be used to authenticate to Google Cloud Platform services from +any environment. To use the file, set the `GOOGLE_APPLICATION_CREDENTIALS` +environment variable to the path to the key file, for example: + + export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json + +### Set Project ID + +Next, set the `GOOGLE_CLOUD_PROJECT` environment variable to the project name +set in the +[Google Cloud Platform Developer Console](https://console.cloud.google.com): + + export GOOGLE_CLOUD_PROJECT="YOUR-PROJECT-ID" + +### Install Dependencies + +1. Install the [Bundler](http://bundler.io/) gem. + +1. Install dependencies using: + + bundle install + +## Run samples + +If using the `topics.rb create_push_subscription` command (see below), first deploy the push listener +App Engine app defined in `listener.rb` and configured in `app.yaml`. The `endpoint` argument to +`create_push_subscription` should look like `https://my-project.appspot.com/push`. You can see messages +pushed to the listener in [Google Cloud Logging](https://cloud.google.com/logging/docs/), or simply +run `tail` on the logs as shown below. + + gcloud app deploy --promote + gcloud app logs tail -s default + +Run the quickstart sample to create a topic: + + bundle exec ruby quickstart.rb + +Run the sample for using topics: + + bundle exec ruby topics.rb + +Usage: + + bundle exec ruby topics.rb [command] [arguments] + + Commands: + create_topic Create a topic + list_topics List topics in a project + list_topic_subscriptions List subscriptions in a topic + delete_topic Delete topic policies + get_topic_policy Get topic policies + set_topic_policy Set topic policies + test_topic_permissions Test topic permissions + create_pull_subscription Create a pull subscription + create_push_subscription Create a push subscription + publish_message Publish message + publish_message_async Publish messages asynchronously + publish_messages_async_with_batch_settings Publish messages asynchronously in batch + publish_message_async_with_custom_attributes Publish messages asynchronously with custom attributes + publish_messages_async_with_concurrency_control Publish messages asynchronously with concurrency control + +Example: + + bundle exec ruby topics.rb create_topic my-new-topic + + Topic my-new-topic created. + +Run the sample for using subscriptions: + + bundle exec ruby subscriptions.rb + +Usage: + + bundle exec ruby subscriptions.rb [command] [arguments] + + Commands: + update_push_configuration Update the endpoint of a push subscription + list_subscriptions List subscriptions of a project + delete_subscription Delete a subscription + get_subscription_policy Get policies of a subscription + set_subscription_policy Set policies of a subscription + test_subscription_policy Test policies of a subscription + listen_for_messages Listen for messages + listen_for_messages_with_custom_attributes Listen for messages with custom attributes + pull_messages Pull messages + listen_for_messages_with_error_handler Listen for messages with an error handler + listen_for_messages_with_flow_control Listen for messages with flow control + listen_for_messages_with_concurrency_control Listen for messages with concurrency control + +Example: + + bundle exec ruby subscriptions.rb list_subscriptions + + Subscriptions: + YOUR-SUBSCRIPTION + + +## Test samples + +Test the samples using the Project ID configured above: + + bundle exec rake test diff --git a/google-cloud-pubsub/v2samples/listener.rb b/google-cloud-pubsub/v2samples/listener.rb new file mode 100644 index 000000000000..5689d562b1c5 --- /dev/null +++ b/google-cloud-pubsub/v2samples/listener.rb @@ -0,0 +1,26 @@ +# Copyright 2021 Google, Inc +# +# 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 "sinatra" +require "json" +require "base64" + +post "/push" do + message = JSON.parse request.body.read + data = Base64.decode64 message["message"]["data"] + logger.info "Pushed Message: #{data}" + response.status = 204 +end + +set :port, 8080 diff --git a/google-cloud-pubsub/v2samples/pubsub_commit_proto_schema.rb b/google-cloud-pubsub/v2samples/pubsub_commit_proto_schema.rb new file mode 100644 index 000000000000..6472f4edb433 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_commit_proto_schema.rb @@ -0,0 +1,32 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def commit_proto_schema schema_id:, proto_file: + # [START pubsub_old_version_commit_proto_schema] + # schema_id = "your-schema-id" + # proto_file = "path/to/a/proto_file.proto" + + pubsub = Google::Cloud::Pubsub.new + schema = pubsub.schema schema_id + + definition = File.read proto_file + + result = schema.commit definition, :protocol_buffer + + puts "Schema commited with revision #{result.revision_id}." + result + # [END pubsub_old_version_commit_proto_schema] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_create_avro_schema.rb b/google-cloud-pubsub/v2samples/pubsub_create_avro_schema.rb new file mode 100644 index 000000000000..ed4811383f59 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_avro_schema.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def create_avro_schema schema_id:, avsc_file: + # [START pubsub_old_version_create_avro_schema] + # schema_id = "your-schema-id" + # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" + + pubsub = Google::Cloud::Pubsub.new + + definition = File.read avsc_file + schema = pubsub.create_schema schema_id, :avro, definition + + puts "Schema #{schema.name} created." + # [END pubsub_old_version_create_avro_schema] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_create_bigquery_subscription.rb b/google-cloud-pubsub/v2samples/pubsub_create_bigquery_subscription.rb new file mode 100644 index 000000000000..1d63be51c3bd --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_bigquery_subscription.rb @@ -0,0 +1,42 @@ +# Copyright 2022 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. + +# [START pubsub_old_version_create_bigquery_subscription] +require "google/cloud/pubsub" + +## +# Shows how to create a BigQuery subscription where messages published +# to a topic populates a BigQuery table. +# +# @param project_id [String] +# Your Google Cloud project (e.g. "my-project") +# @param topic_id [String] +# Your topic name (e.g. "my-secret") +# @param subscription_id [String] +# ID for new subscription to be created (e.g. "my-subscription") +# @param bigquery_table_id [String] +# ID of bigquery table (e.g "my-project:dataset-id.table-id") +# +def pubsub_old_version_create_bigquery_subscription project_id:, topic_id:, subscription_id:, bigquery_table_id: + pubsub = Google::Cloud::Pubsub.new project_id: project_id + topic = pubsub.topic topic_id + subscription = topic.subscribe subscription_id, + bigquery_config: { + table: bigquery_table_id, + write_metadata: true + } + puts "BigQuery subscription created: #{subscription_id}." + puts "Table for subscription is: #{bigquery_table_id}" +end +# [END pubsub_old_version_create_bigquery_subscription] diff --git a/google-cloud-pubsub/v2samples/pubsub_create_proto_schema.rb b/google-cloud-pubsub/v2samples/pubsub_create_proto_schema.rb new file mode 100644 index 000000000000..de6ff05299b1 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_proto_schema.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def create_proto_schema schema_id:, proto_file: + # [START pubsub_old_version_create_proto_schema] + # schema_id = "your-schema-id" + # proto_file = "path/to/a/proto/file/(.proto)/formatted/in/protocol/buffers" + + pubsub = Google::Cloud::Pubsub.new + + definition = File.read proto_file + schema = pubsub.create_schema schema_id, :protocol_buffer, definition + + puts "Schema #{schema.name} created." + # [END pubsub_old_version_create_proto_schema] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_create_pull_subscription.rb b/google-cloud-pubsub/v2samples/pubsub_create_pull_subscription.rb new file mode 100644 index 000000000000..dd08e2fda0b9 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_pull_subscription.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def create_pull_subscription topic_id:, subscription_id: + # [START pubsub_old_version_create_pull_subscription] + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + subscription = topic.subscribe subscription_id + + puts "Pull subscription #{subscription_id} created." + # [END pubsub_old_version_create_pull_subscription] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_create_push_subscription.rb b/google-cloud-pubsub/v2samples/pubsub_create_push_subscription.rb new file mode 100644 index 000000000000..522ec5aad68f --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_push_subscription.rb @@ -0,0 +1,31 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def create_push_subscription topic_id:, subscription_id:, endpoint: + # [START pubsub_old_version_create_push_subscription] + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + # endpoint = "https://your-test-project.appspot.com/push" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + subscription = topic.subscribe subscription_id, + endpoint: endpoint + + puts "Push subscription #{subscription_id} created." + # [END pubsub_old_version_create_push_subscription] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_create_subscription_with_exactly_once_delivery.rb b/google-cloud-pubsub/v2samples/pubsub_create_subscription_with_exactly_once_delivery.rb new file mode 100644 index 000000000000..57bf15f818f1 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_subscription_with_exactly_once_delivery.rb @@ -0,0 +1,44 @@ +# Copyright 2022 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. + +# [START pubsub_old_version_create_subscription_with_exactly_once_delivery] +require "google/cloud/pubsub" + +# Shows how to create a new subscription with exactly once delivery enabled +class PubsubCreateSubscriptionWithExactlyOnceDelivery + def create_subscription_with_exactly_once_delivery project_id:, topic_id:, subscription_id: + pubsub = Google::Cloud::Pubsub.new project_id: project_id + topic = pubsub.topic topic_id + subscription = topic.subscribe subscription_id, enable_exactly_once_delivery: true + puts "Created subscription with exactly once delivery enabled: #{subscription_id}" + end + + def self.run + # TODO(developer): Replace these variables before running the sample. + project_id = "your-project-id" + topic_id = "your-topic-id" + subscription_id = "id-for-new-subcription" + pubsub_old_version_create_subscription_with_exactly_once_delivery = PubsubCreateSubscriptionWithExactlyOnceDelivery.new + pubsub_old_version_create_subscription_with_exactly_once_delivery.create_subscription_with_exactly_once_delivery( + project_id: project_id, + topic_id: topic_id, + subscription_id: subscription_id + ) + end +end + +if $PROGRAM_NAME == __FILE__ + PubsubCreateSubscriptionWithExactlyOnceDelivery.run +end +# [END pubsub_old_version_create_subscription_with_exactly_once_delivery] diff --git a/google-cloud-pubsub/v2samples/pubsub_create_subscription_with_filter.rb b/google-cloud-pubsub/v2samples/pubsub_create_subscription_with_filter.rb new file mode 100644 index 000000000000..c67290ff86e8 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_subscription_with_filter.rb @@ -0,0 +1,43 @@ +# Copyright 2022 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. + +# [START pubsub_old_version_create_subscription_with_filter] +require "google/cloud/pubsub" + +# Shows how to create a new subscription with filter for a given topic +class PubsubCreateSubscriptionWithFilter + def create_subscription_with_filter project_id:, topic_id:, subscription_id:, filter: + pubsub = Google::Cloud::Pubsub.new project_id: project_id + topic = pubsub.topic topic_id + subscription = topic.subscribe subscription_id, filter: filter + puts "Created subscription with filtering enabled: #{subscription_id}" + end + + def self.run + # TODO(developer): Replace these variables before running the sample. + project_id = "your-project-id" + topic_id = "your-topic-id" + subscription_id = "id-for-new-subcription" + filter = "attributes.author=\"unknown\"" + PubsubCreateSubscriptionWithFilter.new.create_subscription_with_filter project_id: project_id, + topic_id: topic_id, + subscription_id: subscription_id, + filter: filter + end +end + +if $PROGRAM_NAME == __FILE__ + PubsubCreateSubscriptionWithFilter.run +end +# [END pubsub_old_version_create_subscription_with_filter] diff --git a/google-cloud-pubsub/v2samples/pubsub_create_topic.rb b/google-cloud-pubsub/v2samples/pubsub_create_topic.rb new file mode 100644 index 000000000000..6d35784e09a8 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_topic.rb @@ -0,0 +1,27 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def create_topic topic_id: + # [START pubsub_old_version_create_topic] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.create_topic topic_id + + puts "Topic #{topic.name} created." + # [END pubsub_old_version_create_topic] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_create_topic_with_schema.rb b/google-cloud-pubsub/v2samples/pubsub_create_topic_with_schema.rb new file mode 100644 index 000000000000..1e06a2b341b3 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_create_topic_with_schema.rb @@ -0,0 +1,30 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def create_topic_with_schema topic_id:, schema_id:, message_encoding: + # [START pubsub_old_version_create_topic_with_schema] + # topic_id = "your-topic-id" + # schema_id = "your-schema-id" + # Choose either BINARY or JSON as valid message encoding in this topic. + # message_encoding = :binary + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.create_topic topic_id, schema_name: schema_id, message_encoding: message_encoding + + puts "Topic #{topic.name} created." + # [END pubsub_old_version_create_topic_with_schema] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_dead_letter_create_subscription.rb b/google-cloud-pubsub/v2samples/pubsub_dead_letter_create_subscription.rb new file mode 100644 index 000000000000..0a052fac49e0 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_dead_letter_create_subscription.rb @@ -0,0 +1,34 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def dead_letter_create_subscription topic_id:, subscription_id:, dead_letter_topic_id: + # [START pubsub_old_version_dead_letter_create_subscription] + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + # dead_letter_topic_id = "your-dead-letter-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + dead_letter_topic = pubsub.topic dead_letter_topic_id + subscription = topic.subscribe subscription_id, + dead_letter_topic: dead_letter_topic, + dead_letter_max_delivery_attempts: 10 + + puts "Created subscription #{subscription_id} with dead letter topic #{dead_letter_topic_id}." + puts "To process dead letter messages, remember to add a subscription to your dead letter topic." + # [END pubsub_old_version_dead_letter_create_subscription] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_dead_letter_delivery_attempt.rb b/google-cloud-pubsub/v2samples/pubsub_dead_letter_delivery_attempt.rb new file mode 100644 index 000000000000..60c9490e7c0d --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_dead_letter_delivery_attempt.rb @@ -0,0 +1,30 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def dead_letter_delivery_attempt subscription_id: + # [START pubsub_old_version_dead_letter_delivery_attempt] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscription.pull(immediate: false).each do |message| + puts "Received message: #{message.data}" + puts "Delivery Attempt: #{message.delivery_attempt}" + message.acknowledge! + end + # [END pubsub_old_version_dead_letter_delivery_attempt] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_dead_letter_remove.rb b/google-cloud-pubsub/v2samples/pubsub_dead_letter_remove.rb new file mode 100644 index 000000000000..8f57e5eaf9ea --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_dead_letter_remove.rb @@ -0,0 +1,27 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def dead_letter_remove subscription_id: + # [START pubsub_old_version_dead_letter_remove] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscription.remove_dead_letter_policy + puts "Removed dead letter topic from #{subscription_id} subscription." + # [END pubsub_old_version_dead_letter_remove] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_dead_letter_update_subscription.rb b/google-cloud-pubsub/v2samples/pubsub_dead_letter_update_subscription.rb new file mode 100644 index 000000000000..499234940949 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_dead_letter_update_subscription.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def dead_letter_update_subscription subscription_id: + # [START pubsub_old_version_dead_letter_update_subscription] + # subscription_id = "your-subscription-id" + # role = "roles/pubsub.publisher" + # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscription.dead_letter_max_delivery_attempts = 20 + puts "Max delivery attempts is now #{subscription.dead_letter_max_delivery_attempts}." + # [END pubsub_old_version_dead_letter_update_subscription] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_delete_schema.rb b/google-cloud-pubsub/v2samples/pubsub_delete_schema.rb new file mode 100644 index 000000000000..bd53579a47bd --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_delete_schema.rb @@ -0,0 +1,28 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def delete_schema schema_id: + # [START pubsub_old_version_delete_schema] + # schema_id = "your-schema-id" + + pubsub = Google::Cloud::Pubsub.new + + schema = pubsub.schema schema_id + schema.delete + + puts "Schema #{schema_id} deleted." + # [END pubsub_old_version_delete_schema] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_delete_subscription.rb b/google-cloud-pubsub/v2samples/pubsub_delete_subscription.rb new file mode 100644 index 000000000000..28e750ce9130 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_delete_subscription.rb @@ -0,0 +1,28 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def delete_subscription subscription_id: + # [START pubsub_old_version_delete_subscription] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscription.delete + + puts "Subscription #{subscription_id} deleted." + # [END pubsub_old_version_delete_subscription] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_delete_topic.rb b/google-cloud-pubsub/v2samples/pubsub_delete_topic.rb new file mode 100644 index 000000000000..d4c8cd361729 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_delete_topic.rb @@ -0,0 +1,28 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def delete_topic topic_id: + # [START pubsub_old_version_delete_topic] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + topic.delete + + puts "Topic #{topic_id} deleted." + # [END pubsub_old_version_delete_topic] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_detach_subscription.rb b/google-cloud-pubsub/v2samples/pubsub_detach_subscription.rb new file mode 100644 index 000000000000..d1b561739d2a --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_detach_subscription.rb @@ -0,0 +1,34 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def detach_subscription subscription_id: + # [START pubsub_old_version_detach_subscription] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscription.detach + + sleep 120 + subscription.reload! + if subscription.detached? + puts "Subscription is detached." + else + puts "Subscription is NOT detached." + end + # [END pubsub_old_version_detach_subscription] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_enable_subscription_ordering.rb b/google-cloud-pubsub/v2samples/pubsub_enable_subscription_ordering.rb new file mode 100644 index 000000000000..d4acb9c1655a --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_enable_subscription_ordering.rb @@ -0,0 +1,30 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def enable_subscription_ordering topic_id:, subscription_id: + # [START pubsub_old_version_enable_subscription_ordering] + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + subscription = topic.subscribe subscription_id, + message_ordering: true + + puts "Pull subscription #{subscription_id} created with message ordering." + # [END pubsub_old_version_enable_subscription_ordering] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_get_schema.rb b/google-cloud-pubsub/v2samples/pubsub_get_schema.rb new file mode 100644 index 000000000000..7af0361e8420 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_get_schema.rb @@ -0,0 +1,27 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def get_schema schema_id: + # [START pubsub_old_version_get_schema] + # schema_id = "your-schema-id" + + pubsub = Google::Cloud::Pubsub.new + + schema = pubsub.schema schema_id + + puts "Schema #{schema.name} retrieved." + # [END pubsub_old_version_get_schema] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_get_subscription_policy.rb b/google-cloud-pubsub/v2samples/pubsub_get_subscription_policy.rb new file mode 100644 index 000000000000..c901313de840 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_get_subscription_policy.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def get_subscription_policy subscription_id: + # [START pubsub_old_version_get_subscription_policy] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + policy = subscription.policy + + puts "Subscription policy:" + puts policy.roles + # [END pubsub_old_version_get_subscription_policy] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_get_topic_policy.rb b/google-cloud-pubsub/v2samples/pubsub_get_topic_policy.rb new file mode 100644 index 000000000000..3861fcbb88bf --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_get_topic_policy.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def get_topic_policy topic_id: + # [START pubsub_old_version_get_topic_policy] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + policy = topic.policy + + puts "Topic policy:" + puts policy.roles + # [END pubsub_old_version_get_topic_policy] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_list_schema_revisions.rb b/google-cloud-pubsub/v2samples/pubsub_list_schema_revisions.rb new file mode 100644 index 000000000000..ef34aff59a01 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_list_schema_revisions.rb @@ -0,0 +1,32 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def list_schema_revisions schema_id: + # [START pubsub_old_version_list_schema_revisions] + # schema_id = "your-schema-id" + + pubsub = Google::Cloud::Pubsub.new + + schema = pubsub.schema schema_id + + response = schema.list_revisions + + puts "Listed revisions of schema #{schema_id}" + response.each do |revision_schema| + puts revision_schema.revision_id + end + # [END pubsub_old_version_list_schema_revisions] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_list_schemas.rb b/google-cloud-pubsub/v2samples/pubsub_list_schemas.rb new file mode 100644 index 000000000000..a156d420600f --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_list_schemas.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def list_schemas + # [START pubsub_old_version_list_schemas] + + pubsub = Google::Cloud::Pubsub.new + + schemas = pubsub.schemas + + puts "Schemas in project:" + schemas.each do |schema| + puts schema.name + end + # [END pubsub_old_version_list_schemas] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_list_subscriptions.rb b/google-cloud-pubsub/v2samples/pubsub_list_subscriptions.rb new file mode 100644 index 000000000000..bc9bd130cc82 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_list_subscriptions.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def list_subscriptions + # [START pubsub_old_version_list_subscriptions] + + pubsub = Google::Cloud::Pubsub.new + + subscriptions = pubsub.list_subscriptions + + puts "Subscriptions:" + subscriptions.each do |subscription| + puts subscription.name + end + # [END pubsub_old_version_list_subscriptions] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_list_topic_subscriptions.rb b/google-cloud-pubsub/v2samples/pubsub_list_topic_subscriptions.rb new file mode 100644 index 000000000000..31ae3dae2322 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_list_topic_subscriptions.rb @@ -0,0 +1,31 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def list_topic_subscriptions topic_id: + # [START pubsub_old_version_list_topic_subscriptions] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + subscriptions = topic.subscriptions + + puts "Subscriptions in topic #{topic.name}:" + subscriptions.each do |subscription| + puts subscription.name + end + # [END pubsub_old_version_list_topic_subscriptions] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_list_topics.rb b/google-cloud-pubsub/v2samples/pubsub_list_topics.rb new file mode 100644 index 000000000000..27a6531ec355 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_list_topics.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def list_topics + # [START pubsub_old_version_list_topics] + + pubsub = Google::Cloud::Pubsub.new + + topics = pubsub.topics + + puts "Topics in project:" + topics.each do |topic| + puts topic.name + end + # [END pubsub_old_version_list_topics] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publish.rb b/google-cloud-pubsub/v2samples/pubsub_publish.rb new file mode 100644 index 000000000000..ae9321f74c8c --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publish.rb @@ -0,0 +1,32 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_message_async topic_id: + # [START pubsub_old_version_publish] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + topic.publish_async "This is a test message." do |result| + raise "Failed to publish the message." unless result.succeeded? + puts "Message published asynchronously." + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop.wait! + # [END pubsub_old_version_publish] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publish_avro_records.rb b/google-cloud-pubsub/v2samples/pubsub_publish_avro_records.rb new file mode 100644 index 000000000000..668721d16f84 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publish_avro_records.rb @@ -0,0 +1,45 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_avro_records topic_id:, avsc_file: + # [START pubsub_old_version_publish_avro_records] + # topic_id = "your-topic-id" + # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + + record = { "name" => "Alaska", "post_abbr" => "AK" } + + if topic.message_encoding_binary? + require "avro" + avro_schema = Avro::Schema.parse File.read(avsc_file) + writer = Avro::IO::DatumWriter.new avro_schema + buffer = StringIO.new + encoder = Avro::IO::BinaryEncoder.new buffer + writer.write record, encoder + topic.publish buffer + puts "Published binary-encoded AVRO message." + elsif topic.message_encoding_json? + require "json" + topic.publish record.to_json + puts "Published JSON-encoded AVRO message." + else + raise "No encoding specified in #{topic.name}." + end + # [END pubsub_old_version_publish_avro_records] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publish_custom_attributes.rb b/google-cloud-pubsub/v2samples/pubsub_publish_custom_attributes.rb new file mode 100644 index 000000000000..7b47ee5b2cfc --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publish_custom_attributes.rb @@ -0,0 +1,35 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_message_async_with_custom_attributes topic_id: + # [START pubsub_old_version_publish_custom_attributes] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + # Add two attributes, origin and username, to the message + topic.publish_async "This is a test message.", + origin: "ruby-sample", + username: "gcp" do |result| + raise "Failed to publish the message." unless result.succeeded? + puts "Message with custom attributes published asynchronously." + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop.wait! + # [END pubsub_old_version_publish_custom_attributes] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publish_proto_messages.rb b/google-cloud-pubsub/v2samples/pubsub_publish_proto_messages.rb new file mode 100644 index 000000000000..e16b4d50816c --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publish_proto_messages.rb @@ -0,0 +1,38 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" +require_relative "utilities/us-states_pb" + +def publish_proto_messages topic_id: + # [START pubsub_old_version_publish_proto_messages] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + + state = Utilities::StateProto.new name: "Alaska", post_abbr: "AK" + + if topic.message_encoding_binary? + topic.publish Utilities::StateProto.encode(state) + puts "Published binary-encoded protobuf message." + elsif topic.message_encoding_json? + topic.publish Utilities::StateProto.encode_json(state) + puts "Published JSON-encoded protobuf message." + else + raise "No encoding specified in #{topic.name}." + end + # [END pubsub_old_version_publish_proto_messages] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publish_with_error_handler.rb b/google-cloud-pubsub/v2samples/pubsub_publish_with_error_handler.rb new file mode 100644 index 000000000000..cd244e9d88f7 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publish_with_error_handler.rb @@ -0,0 +1,37 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_with_error_handler topic_id: + # [START pubsub_old_version_publish_with_error_handler] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + + begin + topic.publish_async "This is a test message." do |result| + raise "Failed to publish the message." unless result.succeeded? + puts "Message published asynchronously." + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop.wait! + rescue StandardError => e + puts "Received error while publishing: #{e.message}" + end + # [END pubsub_old_version_publish_with_error_handler] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publish_with_ordering_keys.rb b/google-cloud-pubsub/v2samples/pubsub_publish_with_ordering_keys.rb new file mode 100644 index 000000000000..ab24878db1b1 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publish_with_ordering_keys.rb @@ -0,0 +1,39 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_ordered_messages topic_id: + # [START pubsub_old_version_publish_with_ordering_keys] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new endpoint: "us-east1-pubsub.googleapis.com:443" + + # Start sending messages in one request once the size of all queued messages + # reaches 1 MB or the number of queued messages reaches 20 + topic = pubsub.topic topic_id, async: { + max_bytes: 1_000_000, + max_messages: 20 + } + topic.enable_message_ordering! + 10.times do |i| + topic.publish_async "This is message ##{i}.", + ordering_key: "ordering-key" + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop! + puts "Messages published with ordering key." + # [END pubsub_old_version_publish_with_ordering_keys] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publisher_batch_settings.rb b/google-cloud-pubsub/v2samples/pubsub_publisher_batch_settings.rb new file mode 100644 index 000000000000..9e0fc32ed406 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publisher_batch_settings.rb @@ -0,0 +1,37 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_messages_async_with_batch_settings topic_id: + # [START pubsub_old_version_publisher_batch_settings] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + # Start sending messages in one request once the size of all queued messages + # reaches 1 MB or the number of queued messages reaches 20 + topic = pubsub.topic topic_id, async: { + max_bytes: 1_000_000, + max_messages: 20 + } + 10.times do |i| + topic.publish_async "This is message ##{i}." + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop.wait! + puts "Messages published asynchronously in batch." + # [END pubsub_old_version_publisher_batch_settings] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publisher_concurrency_control.rb b/google-cloud-pubsub/v2samples/pubsub_publisher_concurrency_control.rb new file mode 100644 index 000000000000..bb6bff72cd6a --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publisher_concurrency_control.rb @@ -0,0 +1,39 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_messages_async_with_concurrency_control topic_id: + # [START pubsub_old_version_publisher_concurrency_control] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id, async: { + threads: { + # Use exactly one thread for publishing message and exactly one thread + # for executing callbacks + publish: 1, + callback: 1 + } + } + topic.publish_async "This is a test message." do |result| + raise "Failed to publish the message." unless result.succeeded? + puts "Message published asynchronously." + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop.wait! + # [END pubsub_old_version_publisher_concurrency_control] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publisher_flow_control.rb b/google-cloud-pubsub/v2samples/pubsub_publisher_flow_control.rb new file mode 100644 index 000000000000..3ccfd6cbd2aa --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publisher_flow_control.rb @@ -0,0 +1,45 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_messages_async_with_flow_control topic_id: + # [START pubsub_old_version_publisher_flow_control] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id, async: { + # Configure how many messages the publisher client can hold in memory + # and what to do when messages exceed the limit. + flow_control: { + message_limit: 100, + byte_limit: 10 * 1024 * 1024, # 10 MiB + # Block more messages from being published when the limit is reached. The + # other options are :ignore and :error. + limit_exceeded_behavior: :block + } + } + # Rapidly publishing 1000 messages in a loop may be constrained by flow control. + 1000.times do |i| + topic.publish_async "message #{i}" do |result| + raise "Failed to publish the message." unless result.succeeded? + end + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop.wait! + puts "Published messages with flow control settings to #{topic_id}." + # [END pubsub_old_version_publisher_flow_control] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_publisher_with_compression.rb b/google-cloud-pubsub/v2samples/pubsub_publisher_with_compression.rb new file mode 100644 index 000000000000..81fb3912a864 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_publisher_with_compression.rb @@ -0,0 +1,49 @@ +# Copyright 2023 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. + +# [START pubsub_old_version_publisher_with_compression] +require "google/cloud/pubsub" + +## +# Shows how to create a BigQuery subscription where messages published +# to a topic populates a BigQuery table. +# +# @param project_id [String] +# Your Google Cloud project (e.g. "my-project") +# @param topic_id [String] +# Your topic name (e.g. "my-secret") +# +def pubsub_old_version_publisher_with_compression project_id:, topic_id: + pubsub = Google::Cloud::Pubsub.new project_id: project_id + + # Enable compression and configure the compression threshold to 10 bytes (default to 240 B). + # Publish requests of sizes > 10 B (excluding the request headers) will get compressed. + topic = pubsub.topic topic_id, async: { + compress: true, + compression_bytes_threshold: 10 + } + + begin + topic.publish_async "This is a test message." do |result| + raise "Failed to publish the message." unless result.succeeded? + puts "Published a compressed message of message ID: #{result.message_id}" + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop.wait! + rescue StandardError => e + puts "Received error while publishing: #{e.message}" + end +end +# [END pubsub_old_version_publisher_with_compression] diff --git a/google-cloud-pubsub/v2samples/pubsub_quickstart_publisher.rb b/google-cloud-pubsub/v2samples/pubsub_quickstart_publisher.rb new file mode 100644 index 000000000000..98e9f9c6763f --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_quickstart_publisher.rb @@ -0,0 +1,28 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_message topic_id: + # [START pubsub_old_version_quickstart_publisher] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + topic.publish "This is a test message." + + puts "Message published." + # [END pubsub_old_version_quickstart_publisher] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_resume_publish_with_ordering_keys.rb b/google-cloud-pubsub/v2samples/pubsub_resume_publish_with_ordering_keys.rb new file mode 100644 index 000000000000..14985dbcf378 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_resume_publish_with_ordering_keys.rb @@ -0,0 +1,47 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def publish_resume_publish topic_id: + # [START pubsub_old_version_resume_publish_with_ordering_keys] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + # Start sending messages in one request once the size of all queued messages + # reaches 1 MB or the number of queued messages reaches 20 + topic = pubsub.topic topic_id, async: { + max_bytes: 1_000_000, + max_messages: 20 + } + topic.enable_message_ordering! + 10.times do |i| + topic.publish_async "This is message ##{i}.", + ordering_key: "ordering-key" do |result| + if result.succeeded? + puts "Message ##{i} successfully published." + else + puts "Message ##{i} failed to publish" + # Allow publishing to continue on "ordering-key" after processing the + # failure. + topic.resume_publish "ordering-key" + end + end + end + + # Stop the async_publisher to send all queued messages immediately. + topic.async_publisher.stop! + # [END pubsub_old_version_resume_publish_with_ordering_keys] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_set_subscription_policy.rb b/google-cloud-pubsub/v2samples/pubsub_set_subscription_policy.rb new file mode 100644 index 000000000000..f017fff8ecee --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_set_subscription_policy.rb @@ -0,0 +1,30 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def set_subscription_policy subscription_id:, role:, service_account_email: + # [START pubsub_old_version_set_subscription_policy] + # subscription_id = "your-subscription-id" + # role = "roles/pubsub.publisher" + # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscription.policy do |policy| + policy.add role, service_account_email + end + # [END pubsub_old_version_set_subscription_policy] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_set_topic_policy.rb b/google-cloud-pubsub/v2samples/pubsub_set_topic_policy.rb new file mode 100644 index 000000000000..01402a1385e2 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_set_topic_policy.rb @@ -0,0 +1,30 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def set_topic_policy topic_id:, role:, service_account_email: + # [START pubsub_old_version_set_topic_policy] + # topic_id = "your-topic-id" + # role = "roles/pubsub.publisher" + # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + topic.policy do |policy| + policy.add role, service_account_email + end + # [END pubsub_old_version_set_topic_policy] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscribe_avro_records.rb b/google-cloud-pubsub/v2samples/pubsub_subscribe_avro_records.rb new file mode 100644 index 000000000000..5a1a03c88ce0 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscribe_avro_records.rb @@ -0,0 +1,53 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def subscribe_avro_records subscription_id:, avsc_file: + # [START pubsub_old_version_subscribe_avro_records] + # subscription_id = "your-subscription-id" + # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + + subscriber = subscription.listen do |received_message| + encoding = received_message.attributes["googclient_schemaencoding"] + case encoding + when "BINARY" + require "avro" + avro_schema = Avro::Schema.parse File.read(avsc_file) + buffer = StringIO.new received_message.data + decoder = Avro::IO::BinaryDecoder.new buffer + reader = Avro::IO::DatumReader.new avro_schema + message_data = reader.read decoder + puts "Received a binary-encoded message:\n#{message_data}" + when "JSON" + require "json" + message_data = JSON.parse received_message.data + puts "Received a JSON-encoded message:\n#{message_data}" + else + "Received a message with no encoding:\n#{received_message.message_id}" + end + received_message.acknowledge! + end + + subscriber.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + subscriber.stop.wait! + # [END pubsub_old_version_subscribe_avro_records] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscribe_proto_messages.rb b/google-cloud-pubsub/v2samples/pubsub_subscribe_proto_messages.rb new file mode 100644 index 000000000000..09b1c8b9da87 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscribe_proto_messages.rb @@ -0,0 +1,48 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" +require_relative "utilities/us-states_pb" + +def subscribe_proto_messages subscription_id: + # [START pubsub_old_version_subscribe_proto_messages] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + + subscriber = subscription.listen do |received_message| + encoding = received_message.attributes["googclient_schemaencoding"] + case encoding + when "BINARY" + state = Utilities::StateProto.decode received_message.data + puts "Received a binary-encoded message:\n#{state}" + when "JSON" + require "json" + state = Utilities::StateProto.decode_json received_message.data + puts "Received a JSON-encoded message:\n#{state}" + else + "Received a message with no encoding:\n#{received_message.message_id}" + end + received_message.acknowledge! + end + + subscriber.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + subscriber.stop.wait! + # [END pubsub_old_version_subscribe_proto_messages] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_async_pull.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_async_pull.rb new file mode 100644 index 000000000000..65b248c2472b --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_async_pull.rb @@ -0,0 +1,37 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def listen_for_messages subscription_id: + # [START pubsub_old_version_subscriber_async_pull] + # [START pubsub_old_version_quickstart_subscriber] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscriber = subscription.listen do |received_message| + puts "Received message: #{received_message.data}" + received_message.acknowledge! + end + + subscriber.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + subscriber.stop.wait! + # [END pubsub_old_version_subscriber_async_pull] + # [END pubsub_old_version_quickstart_subscriber] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_async_pull_custom_attributes.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_async_pull_custom_attributes.rb new file mode 100644 index 000000000000..8fc7e08bf43a --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_async_pull_custom_attributes.rb @@ -0,0 +1,41 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def listen_for_messages_with_custom_attributes subscription_id: + # [START pubsub_old_version_subscriber_async_pull_custom_attributes] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscriber = subscription.listen do |received_message| + puts "Received message: #{received_message.data}" + unless received_message.attributes.empty? + puts "Attributes:" + received_message.attributes.each do |key, value| + puts "#{key}: #{value}" + end + end + received_message.acknowledge! + end + + subscriber.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + subscriber.stop.wait! + # [END pubsub_old_version_subscriber_async_pull_custom_attributes] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_concurrency_control.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_concurrency_control.rb new file mode 100644 index 000000000000..dec52e2a3db3 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_concurrency_control.rb @@ -0,0 +1,40 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def listen_for_messages_with_concurrency_control subscription_id: + # [START pubsub_old_version_subscriber_concurrency_control] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + # Use 2 threads for streaming, 4 threads for executing callbacks and 2 threads + # for sending acknowledgements and/or delays + subscriber = subscription.listen streams: 2, threads: { + callback: 4, + push: 2 + } do |received_message| + puts "Received message: #{received_message.data}" + received_message.acknowledge! + end + + subscriber.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + subscriber.stop.wait! + # [END pubsub_old_version_subscriber_concurrency_control] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_error_listener.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_error_listener.rb new file mode 100644 index 000000000000..73356677057b --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_error_listener.rb @@ -0,0 +1,44 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def listen_for_messages_with_error_handler subscription_id: + # [START pubsub_old_version_subscriber_error_listener] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscriber = subscription.listen do |received_message| + puts "Received message: #{received_message.data}" + received_message.acknowledge! + end + # Propagate expection from child threads to the main thread as soon as it is + # raised. Exceptions happened in the callback thread are collected in the + # callback thread pool and do not propagate to the main thread + Thread.abort_on_exception = true + + begin + subscriber.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + subscriber.stop.wait! + rescue StandardError => e + puts "Exception #{e.inspect}: #{e.message}" + raise "Stopped listening for messages." + end + # [END pubsub_old_version_subscriber_error_listener] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_exactly_once_delivery.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_exactly_once_delivery.rb new file mode 100644 index 000000000000..eb45cb4f5168 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_exactly_once_delivery.rb @@ -0,0 +1,55 @@ +# Copyright 2022 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. + +# [START pubsub_old_version_subscriber_exactly_once] +require "google/cloud/pubsub" + +# Shows how to register callback to acknowledge method and access the result passed in +class PubsubSubscriberExactlyOnceDelivery + def subscriber_exactly_once_delivery project_id:, topic_id:, subscription_id: + pubsub = Google::Cloud::Pubsub.new project_id: project_id + topic = pubsub.topic topic_id + subscription = pubsub.subscription subscription_id + subscriber = subscription.listen do |received_message| + puts "Received message: #{received_message.data}" + + # Pass in callback to access the acknowledge result. + # For subscription with Exactly once delivery disabled the result will be success always. + received_message.acknowledge! do |result| + puts "Acknowledge result's status: #{result.status}" + end + end + + subscriber.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + subscriber.stop.wait! + end + + def self.run + # TODO(developer): Replace these variables before running the sample. + project_id = "your-project-id" + topic_id = "your-topic-id" + subscription_id = "id-for-new-subcription" # subscription with exactly once delivery enabled + PubsubSubscriberExactlyOnceDelivery.new.subscriber_exactly_once_delivery project_id: project_id, + topic_id: topic_id, + subscription_id: subscription_id + end +end + +if $PROGRAM_NAME == __FILE__ + PubsubSubscriberExactlyOnceDelivery.run +end +# [END pubsub_old_version_subscriber_exactly_once] diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_flow_settings.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_flow_settings.rb new file mode 100644 index 000000000000..059d5ed6c1db --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_flow_settings.rb @@ -0,0 +1,35 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def listen_for_messages_with_flow_control subscription_id: + # [START pubsub_old_version_subscriber_flow_settings] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscriber = subscription.listen inventory: 10 do |received_message| + puts "Received message: #{received_message.data}" + received_message.acknowledge! + end + + subscriber.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + subscriber.stop.wait! + # [END pubsub_old_version_subscriber_flow_settings] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_sync_pull.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_sync_pull.rb new file mode 100644 index 000000000000..17e84282fe24 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_sync_pull.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def pull_messages subscription_id: + # [START pubsub_old_version_subscriber_sync_pull] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscription.pull(immediate: false).each do |message| + puts "Message pulled: #{message.data}" + message.acknowledge! + end + # [END pubsub_old_version_subscriber_sync_pull] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_sync_pull_with_lease.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_sync_pull_with_lease.rb new file mode 100644 index 000000000000..d028ced85e00 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_sync_pull_with_lease.rb @@ -0,0 +1,56 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def subscriber_sync_pull_with_lease subscription_id: + # [START pubsub_old_version_subscriber_sync_pull_with_lease] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + new_ack_deadline = 30 + processed = false + + # The subscriber pulls a specified number of messages. + received_messages = subscription.pull immediate: false, max: 1 + + # Obtain the first message. + message = received_messages.first + + # Send the message to a non-blocking worker that starts a long-running process, such as writing + # the message to a table, which may take longer than the default 10-sec acknowledge deadline. + Thread.new do + sleep 15 + processed = true + puts "Finished processing \"#{message.data}\"." + end + + loop do + sleep 1 + if processed + # If the message has been processed, acknowledge the message. + message.acknowledge! + puts "Done." + # Exit after the message is acknowledged. + break + else + # If the message has not yet been processed, reset its ack deadline. + message.modify_ack_deadline! new_ack_deadline + puts "Reset ack deadline for \"#{message.data}\" for #{new_ack_deadline} seconds." + end + end + # [END pubsub_old_version_subscriber_sync_pull_with_lease] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_test_subscription_permissions.rb b/google-cloud-pubsub/v2samples/pubsub_test_subscription_permissions.rb new file mode 100644 index 000000000000..4e157b908d70 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_test_subscription_permissions.rb @@ -0,0 +1,30 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def test_subscription_permissions subscription_id: + # [START pubsub_old_version_test_subscription_permissions] + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + permissions = subscription.test_permissions "pubsub.subscriptions.consume", + "pubsub.subscriptions.update" + + puts "Permission to consume" if permissions.include? "pubsub.subscriptions.consume" + puts "Permission to update" if permissions.include? "pubsub.subscriptions.update" + # [END pubsub_old_version_test_subscription_permissions] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_test_topic_permissions.rb b/google-cloud-pubsub/v2samples/pubsub_test_topic_permissions.rb new file mode 100644 index 000000000000..f95686ba89e6 --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_test_topic_permissions.rb @@ -0,0 +1,31 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def test_topic_permissions topic_id: + # [START pubsub_old_version_test_topic_permissions] + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::Pubsub.new + + topic = pubsub.topic topic_id + permissions = topic.test_permissions "pubsub.topics.attachSubscription", + "pubsub.topics.publish", "pubsub.topics.update" + + puts "Permission to attach subscription" if permissions.include? "pubsub.topics.attachSubscription" + puts "Permission to publish" if permissions.include? "pubsub.topics.publish" + puts "Permission to update" if permissions.include? "pubsub.topics.update" + # [END pubsub_old_version_test_topic_permissions] +end diff --git a/google-cloud-pubsub/v2samples/pubsub_update_push_configuration.rb b/google-cloud-pubsub/v2samples/pubsub_update_push_configuration.rb new file mode 100644 index 000000000000..ff4fcbcae3fe --- /dev/null +++ b/google-cloud-pubsub/v2samples/pubsub_update_push_configuration.rb @@ -0,0 +1,29 @@ +# Copyright 2023 Google, Inc +# +# 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 "google/cloud/pubsub" + +def update_push_configuration subscription_id:, new_endpoint: + # [START pubsub_old_version_update_push_configuration] + # subscription_id = "your-subscription-id" + # new_endpoint = "Endpoint where your app receives messages"" + + pubsub = Google::Cloud::Pubsub.new + + subscription = pubsub.subscription subscription_id + subscription.endpoint = new_endpoint + + puts "Push endpoint updated." + # [END pubsub_old_version_update_push_configuration] +end diff --git a/google-cloud-pubsub/v2samples/quickstart.rb b/google-cloud-pubsub/v2samples/quickstart.rb new file mode 100644 index 000000000000..b0ba3378cbd6 --- /dev/null +++ b/google-cloud-pubsub/v2samples/quickstart.rb @@ -0,0 +1,35 @@ +# Copyright 2021 Google, Inc +# +# 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. + +def quickstart topic_id: + # [START pubsub_old_version_quickstart_create_topic] + # [START require_library] + # Imports the Google Cloud client library + require "google/cloud/pubsub" + # [END require_library] + + # Instantiates a client + pubsub = Google::Cloud::Pubsub.new + + # The name for the new topic + # topic_id = "your-topic-id" + + # Creates the new topic + topic = pubsub.create_topic topic_id + + puts "Topic #{topic.name} created." + # [END pubsub_old_version_quickstart_create_topic] +end + +quickstart topic_id: ARGV.shift if $PROGRAM_NAME == __FILE__ diff --git a/google-cloud-pubsub/v2samples/utilities/us-states_pb.rb b/google-cloud-pubsub/v2samples/utilities/us-states_pb.rb new file mode 100644 index 000000000000..4208b93686c0 --- /dev/null +++ b/google-cloud-pubsub/v2samples/utilities/us-states_pb.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: us-states.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x0fus-states.proto\x12\tutilities\"-\n\nStateProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tpost_abbr\x18\x02 \x01(\tb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Utilities + StateProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("utilities.StateProto").msgclass +end From 47a7f8bec5ca8707e0d289fdcfa1b1a159aeedb2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 18:00:25 -0700 Subject: [PATCH 264/457] feat(container-v1): The update_node_pool RPC supports the boot disk parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(container-v1): Support for configuring the transparent hugepage on Linux nodes feat(container-v1): Support for configuring eviction on node kubelets feat(container-v1): Support for configuring max_parallel_image_pulls on node kubelets feat(container-v1): Support for enabling the single process OOM killer on node kubelets feat(container-v1): Support for configuring the subnetwork on node networks feat(container-v1): Support for configuring the minimum virtual CPUs on a sole tenant config feat(container-v1): Support for configuring the Lustre CSI driver feat(container-v1): Support for additional IP allocation policy configurations feat(container-v1): Support for configuring GKE auto upgrade feat(container-v1): Support for configuring the anonymous access limiting mode in a cluster feat(container-v1): Support for configuring default compute class for cluster autoscaling PiperOrigin-RevId: 783416488 Source-Link: https://github.com/googleapis/googleapis/commit/a640ed837f82299e6ec7b805d2c111add7704a2e Source-Link: https://github.com/googleapis/googleapis-gen/commit/ce5b0ed600f382b507611d985166eb9078aad749 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci12MS8uT3dsQm90LnlhbWwiLCJoIjoiY2U1YjBlZDYwMGYzODJiNTA3NjExZDk4NTE2NmViOTA3OGFhZDc0OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../container/v1/cluster_manager/client.rb | 215 +++--- .../v1/cluster_manager/rest/client.rb | 215 +++--- .../google/container/v1/cluster_service_pb.rb | 16 +- .../google/container/v1/cluster_service.rb | 705 ++++++++++++++---- .../container/v1/cluster_manager_rest_test.rb | 11 +- .../container/v1/cluster_manager_test.rb | 12 +- 6 files changed, 821 insertions(+), 353 deletions(-) diff --git a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/client.rb b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/client.rb index ec07d4de2bc6..927f651d0035 100644 --- a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/client.rb +++ b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/client.rb @@ -295,9 +295,9 @@ def logger # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides, or "-" for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides, or "-" for all zones. This field has been + # deprecated and replaced by the parent field. # @param parent [::String] # The parent (project and location) where the clusters will be listed. # Specified in the format `projects/*/locations/*`. @@ -391,9 +391,9 @@ def list_clusters request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to retrieve. # This field has been deprecated and replaced by the name field. @@ -502,9 +502,9 @@ def get_cluster request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster [::Google::Cloud::Container::V1::Cluster, ::Hash] # Required. A [cluster # resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) @@ -600,9 +600,9 @@ def create_cluster request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -689,7 +689,7 @@ def update_cluster request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil) + # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil, boot_disk: nil) # Pass arguments to `update_node_pool` 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). @@ -700,9 +700,9 @@ def update_cluster request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -723,18 +723,18 @@ def update_cluster request, options = nil # - "-": picks the Kubernetes master version # @param image_type [::String] # Required. The desired image type for the node pool. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @param name [::String] # The name (project, location, cluster, node pool) of the node pool to # update. Specified in the format # `projects/*/locations/*/clusters/*/nodePools/*`. # @param locations [::Array<::String>] # The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # node pool's nodes should be located. Changing the locations for a node pool - # will result in nodes being either created or removed from the node pool, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the node pool's nodes should be located. Changing the locations + # for a node pool will result in nodes being either created or removed from + # the node pool, depending on whether locations are being added or removed. # @param workload_metadata_config [::Google::Cloud::Container::V1::WorkloadMetadataConfig, ::Hash] # The desired workload metadata config for the node pool. # @param upgrade_settings [::Google::Cloud::Container::V1::NodePool::UpgradeSettings, ::Hash] @@ -779,13 +779,14 @@ def update_cluster request, options = nil # Parameters that can be configured on Windows nodes. # @param accelerators [::Array<::Google::Cloud::Container::V1::AcceleratorConfig, ::Hash>] # A list of hardware accelerators to be attached to each node. - # See https://cloud.google.com/compute/docs/gpus for more information about - # support for GPUs. + # See + # https://cloud.google.com/compute/docs/gpus + # for more information about support for GPUs. # @param machine_type [::String] # Optional. The desired [Google Compute Engine machine - # type](https://cloud.google.com/compute/docs/machine-types) for nodes in the - # node pool. Initiates an upgrade operation that migrates the nodes in the - # node pool to the specified machine type. + # type](https://cloud.google.com/compute/docs/machine-types) + # for nodes in the node pool. Initiates an upgrade operation that migrates + # the nodes in the node pool to the specified machine type. # @param disk_type [::String] # Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or # 'pd-balanced') for nodes in the node pool. @@ -814,6 +815,10 @@ def update_cluster request, options = nil # If unspecified, the nodes can exist indefinitely. # @param flex_start [::Boolean] # Flex Start flag for enabling Flex Start VM. + # @param boot_disk [::Google::Cloud::Container::V1::BootDisk, ::Hash] + # The desired boot disk config for nodes in the node pool. + # Initiates an upgrade operation that migrates the nodes in the + # node pool to the specified boot disk config. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Container::V1::Operation] @@ -903,9 +908,9 @@ def update_node_pool request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1007,9 +1012,9 @@ def set_node_pool_autoscaling request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1117,9 +1122,9 @@ def set_logging_service request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1227,9 +1232,9 @@ def set_monitoring_service request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1333,18 +1338,18 @@ def set_addons_config request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param locations [::Array<::String>] # Required. The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. Changing the locations a cluster is in - # will result in nodes being either created or removed from the cluster, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. Changing the locations a + # cluster is in will result in nodes being either created or removed from the + # cluster, depending on whether locations are being added or removed. # # This list must always include the cluster's primary zone. # @param name [::String] @@ -1439,9 +1444,9 @@ def set_locations request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1550,9 +1555,9 @@ def update_master request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1660,9 +1665,9 @@ def set_master_auth request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to delete. # This field has been deprecated and replaced by the name field. @@ -1758,9 +1763,9 @@ def delete_cluster request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for, or `-` for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for, or `-` for all zones. This field has been + # deprecated and replaced by the parent field. # @param parent [::String] # The parent (project and location) where the operations will be listed. # Specified in the format `projects/*/locations/*`. @@ -1854,9 +1859,9 @@ def list_operations request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param operation_id [::String] # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. @@ -1952,9 +1957,9 @@ def get_operation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # operation resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the operation resides. This field has been deprecated and replaced + # by the name field. # @param operation_id [::String] # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. @@ -2050,9 +2055,9 @@ def cancel_operation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for. This field has been deprecated and replaced by + # the name field. # @param name [::String] # The name (project and location) of the server config to get, # specified in the format `projects/*/locations/*`. @@ -2232,9 +2237,9 @@ def get_json_web_keys request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. @@ -2330,9 +2335,9 @@ def list_node_pools request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -2432,9 +2437,9 @@ def get_node_pool request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. @@ -2533,9 +2538,9 @@ def create_node_pool request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -2724,9 +2729,9 @@ def complete_node_pool_upgrade request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to rollback. # This field has been deprecated and replaced by the name field. @@ -2829,9 +2834,9 @@ def rollback_node_pool_upgrade request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -2933,9 +2938,9 @@ def set_node_pool_management request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3040,9 +3045,9 @@ def set_labels request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -3140,9 +3145,9 @@ def set_legacy_abac request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3240,9 +3245,9 @@ def start_ip_rotation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3340,9 +3345,9 @@ def complete_ip_rotation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -3444,9 +3449,9 @@ def set_node_pool_size request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3543,8 +3548,8 @@ def set_network_policy request, options = nil # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # @param zone [::String] # Required. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. # @param cluster_id [::String] # Required. The name of the cluster to update. # @param maintenance_policy [::Google::Cloud::Container::V1::MaintenancePolicy, ::Hash] diff --git a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/client.rb b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/client.rb index a416b28001f4..9919d5f927f8 100644 --- a/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/client.rb +++ b/google-cloud-container-v1/lib/google/cloud/container/v1/cluster_manager/rest/client.rb @@ -288,9 +288,9 @@ def logger # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides, or "-" for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides, or "-" for all zones. This field has been + # deprecated and replaced by the parent field. # @param parent [::String] # The parent (project and location) where the clusters will be listed. # Specified in the format `projects/*/locations/*`. @@ -377,9 +377,9 @@ def list_clusters request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to retrieve. # This field has been deprecated and replaced by the name field. @@ -481,9 +481,9 @@ def get_cluster request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster [::Google::Cloud::Container::V1::Cluster, ::Hash] # Required. A [cluster # resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) @@ -572,9 +572,9 @@ def create_cluster request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -654,7 +654,7 @@ def update_cluster request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil) + # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil, boot_disk: nil) # Pass arguments to `update_node_pool` 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). @@ -665,9 +665,9 @@ def update_cluster request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -688,18 +688,18 @@ def update_cluster request, options = nil # - "-": picks the Kubernetes master version # @param image_type [::String] # Required. The desired image type for the node pool. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @param name [::String] # The name (project, location, cluster, node pool) of the node pool to # update. Specified in the format # `projects/*/locations/*/clusters/*/nodePools/*`. # @param locations [::Array<::String>] # The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # node pool's nodes should be located. Changing the locations for a node pool - # will result in nodes being either created or removed from the node pool, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the node pool's nodes should be located. Changing the locations + # for a node pool will result in nodes being either created or removed from + # the node pool, depending on whether locations are being added or removed. # @param workload_metadata_config [::Google::Cloud::Container::V1::WorkloadMetadataConfig, ::Hash] # The desired workload metadata config for the node pool. # @param upgrade_settings [::Google::Cloud::Container::V1::NodePool::UpgradeSettings, ::Hash] @@ -744,13 +744,14 @@ def update_cluster request, options = nil # Parameters that can be configured on Windows nodes. # @param accelerators [::Array<::Google::Cloud::Container::V1::AcceleratorConfig, ::Hash>] # A list of hardware accelerators to be attached to each node. - # See https://cloud.google.com/compute/docs/gpus for more information about - # support for GPUs. + # See + # https://cloud.google.com/compute/docs/gpus + # for more information about support for GPUs. # @param machine_type [::String] # Optional. The desired [Google Compute Engine machine - # type](https://cloud.google.com/compute/docs/machine-types) for nodes in the - # node pool. Initiates an upgrade operation that migrates the nodes in the - # node pool to the specified machine type. + # type](https://cloud.google.com/compute/docs/machine-types) + # for nodes in the node pool. Initiates an upgrade operation that migrates + # the nodes in the node pool to the specified machine type. # @param disk_type [::String] # Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or # 'pd-balanced') for nodes in the node pool. @@ -779,6 +780,10 @@ def update_cluster request, options = nil # If unspecified, the nodes can exist indefinitely. # @param flex_start [::Boolean] # Flex Start flag for enabling Flex Start VM. + # @param boot_disk [::Google::Cloud::Container::V1::BootDisk, ::Hash] + # The desired boot disk config for nodes in the node pool. + # Initiates an upgrade operation that migrates the nodes in the + # node pool to the specified boot disk config. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -861,9 +866,9 @@ def update_node_pool request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -958,9 +963,9 @@ def set_node_pool_autoscaling request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1061,9 +1066,9 @@ def set_logging_service request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1164,9 +1169,9 @@ def set_monitoring_service request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1261,18 +1266,18 @@ def set_addons_config request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param locations [::Array<::String>] # Required. The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. Changing the locations a cluster is in - # will result in nodes being either created or removed from the cluster, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. Changing the locations a + # cluster is in will result in nodes being either created or removed from the + # cluster, depending on whether locations are being added or removed. # # This list must always include the cluster's primary zone. # @param name [::String] @@ -1360,9 +1365,9 @@ def set_locations request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1464,9 +1469,9 @@ def update_master request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1567,9 +1572,9 @@ def set_master_auth request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to delete. # This field has been deprecated and replaced by the name field. @@ -1658,9 +1663,9 @@ def delete_cluster request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for, or `-` for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for, or `-` for all zones. This field has been + # deprecated and replaced by the parent field. # @param parent [::String] # The parent (project and location) where the operations will be listed. # Specified in the format `projects/*/locations/*`. @@ -1747,9 +1752,9 @@ def list_operations request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param operation_id [::String] # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. @@ -1838,9 +1843,9 @@ def get_operation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # operation resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the operation resides. This field has been deprecated and replaced + # by the name field. # @param operation_id [::String] # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. @@ -1929,9 +1934,9 @@ def cancel_operation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for. This field has been deprecated and replaced by + # the name field. # @param name [::String] # The name (project and location) of the server config to get, # specified in the format `projects/*/locations/*`. @@ -2097,9 +2102,9 @@ def get_json_web_keys request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. @@ -2188,9 +2193,9 @@ def list_node_pools request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -2283,9 +2288,9 @@ def get_node_pool request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. @@ -2377,9 +2382,9 @@ def create_node_pool request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -2554,9 +2559,9 @@ def complete_node_pool_upgrade request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to rollback. # This field has been deprecated and replaced by the name field. @@ -2652,9 +2657,9 @@ def rollback_node_pool_upgrade request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -2749,9 +2754,9 @@ def set_node_pool_management request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -2849,9 +2854,9 @@ def set_labels request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -2942,9 +2947,9 @@ def set_legacy_abac request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3035,9 +3040,9 @@ def start_ip_rotation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3128,9 +3133,9 @@ def complete_ip_rotation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -3225,9 +3230,9 @@ def set_node_pool_size request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3317,8 +3322,8 @@ def set_network_policy request, options = nil # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # @param zone [::String] # Required. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. # @param cluster_id [::String] # Required. The name of the cluster to update. # @param maintenance_policy [::Google::Cloud::Container::V1::MaintenancePolicy, ::Hash] diff --git a/google-cloud-container-v1/lib/google/container/v1/cluster_service_pb.rb b/google-cloud-container-v1/lib/google/container/v1/cluster_service_pb.rb index b6394347bd4e..a4de81fca91f 100644 --- a/google-cloud-container-v1/lib/google/container/v1/cluster_service_pb.rb +++ b/google-cloud-container-v1/lib/google/container/v1/cluster_service_pb.rb @@ -16,7 +16,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n)google/container/v1/cluster_service.proto\x12\x13google.container.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x15google/rpc/code.proto\x1a\x17google/rpc/status.proto\"\x80\x04\n\x0fLinuxNodeConfig\x12\x42\n\x07sysctls\x18\x01 \x03(\x0b\x32\x31.google.container.v1.LinuxNodeConfig.SysctlsEntry\x12\x44\n\x0b\x63group_mode\x18\x02 \x01(\x0e\x32/.google.container.v1.LinuxNodeConfig.CgroupMode\x12Q\n\thugepages\x18\x03 \x01(\x0b\x32\x34.google.container.v1.LinuxNodeConfig.HugepagesConfigB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x7f\n\x0fHugepagesConfig\x12!\n\x0fhugepage_size2m\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0fhugepage_size1g\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x12\n\x10_hugepage_size2mB\x12\n\x10_hugepage_size1g\x1a.\n\x0cSysctlsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\nCgroupMode\x12\x1b\n\x17\x43GROUP_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43GROUP_MODE_V1\x10\x01\x12\x12\n\x0e\x43GROUP_MODE_V2\x10\x02\x42\x0c\n\n_hugepages\"\xb4\x01\n\x11WindowsNodeConfig\x12\x44\n\nos_version\x18\x01 \x01(\x0e\x32\x30.google.container.v1.WindowsNodeConfig.OSVersion\"Y\n\tOSVersion\x12\x1a\n\x16OS_VERSION_UNSPECIFIED\x10\x00\x12\x17\n\x13OS_VERSION_LTSC2019\x10\x01\x12\x17\n\x13OS_VERSION_LTSC2022\x10\x02\"\x8f\x05\n\x11NodeKubeletConfig\x12\x1a\n\x12\x63pu_manager_policy\x18\x01 \x01(\t\x12\x43\n\x10topology_manager\x18\x08 \x01(\x0b\x32$.google.container.v1.TopologyManagerB\x03\xe0\x41\x01\x12?\n\x0ememory_manager\x18\t \x01(\x0b\x32\".google.container.v1.MemoryManagerB\x03\xe0\x41\x01\x12\x31\n\rcpu_cfs_quota\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x1c\n\x14\x63pu_cfs_quota_period\x18\x03 \x01(\t\x12\x16\n\x0epod_pids_limit\x18\x04 \x01(\x03\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12+\n\x1eimage_gc_low_threshold_percent\x18\n \x01(\x05\x42\x03\xe0\x41\x01\x12,\n\x1fimage_gc_high_threshold_percent\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01\x12!\n\x14image_minimum_gc_age\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12!\n\x14image_maximum_gc_age\x18\r \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x63ontainer_log_max_size\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12$\n\x17\x63ontainer_log_max_files\x18\x0f \x01(\x05\x42\x03\xe0\x41\x01\x12#\n\x16\x61llowed_unsafe_sysctls\x18\x10 \x03(\tB\x03\xe0\x41\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"0\n\x0fTopologyManager\x12\x0e\n\x06policy\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"\x1f\n\rMemoryManager\x12\x0e\n\x06policy\x18\x01 \x01(\t\"\xa7\x16\n\nNodeConfig\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x05\x12\x14\n\x0coauth_scopes\x18\x03 \x03(\t\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12?\n\x08metadata\x18\x04 \x03(\x0b\x32-.google.container.v1.NodeConfig.MetadataEntry\x12\x12\n\nimage_type\x18\x05 \x01(\t\x12;\n\x06labels\x18\x06 \x03(\x0b\x32+.google.container.v1.NodeConfig.LabelsEntry\x12\x17\n\x0flocal_ssd_count\x18\x07 \x01(\x05\x12\x0c\n\x04tags\x18\x08 \x03(\t\x12\x13\n\x0bpreemptible\x18\n \x01(\x08\x12<\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32&.google.container.v1.AcceleratorConfig\x12\x11\n\tdisk_type\x18\x0c \x01(\t\x12\x18\n\x10min_cpu_platform\x18\r \x01(\t\x12M\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32+.google.container.v1.WorkloadMetadataConfig\x12.\n\x06taints\x18\x0f \x03(\x0b\x32\x1e.google.container.v1.NodeTaint\x12:\n\x0esandbox_config\x18\x11 \x01(\x0b\x32\".google.container.v1.SandboxConfig\x12\x12\n\nnode_group\x18\x12 \x01(\t\x12\x46\n\x14reservation_affinity\x18\x13 \x01(\x0b\x32(.google.container.v1.ReservationAffinity\x12M\n\x18shielded_instance_config\x18\x14 \x01(\x0b\x32+.google.container.v1.ShieldedInstanceConfig\x12?\n\x11linux_node_config\x18\x15 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12>\n\x0ekubelet_config\x18\x16 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\x17 \x01(\t\x12\x34\n\x0bgcfs_config\x18\x19 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12O\n\x19\x61\x64vanced_machine_features\x18\x1a \x01(\x0b\x32,.google.container.v1.AdvancedMachineFeatures\x12.\n\x05gvnic\x18\x1d \x01(\x0b\x32\x1f.google.container.v1.VirtualNIC\x12\x0c\n\x04spot\x18 \x01(\x08\x12\x42\n\x12\x63onfidential_nodes\x18# \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12\x39\n\x0b\x66\x61st_socket\x18$ \x01(\x0b\x32\x1f.google.container.v1.FastSocketH\x00\x88\x01\x01\x12L\n\x0fresource_labels\x18% \x03(\x0b\x32\x33.google.container.v1.NodeConfig.ResourceLabelsEntry\x12\x42\n\x0elogging_config\x18& \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12\x43\n\x13windows_node_config\x18\' \x01(\x0b\x32&.google.container.v1.WindowsNodeConfig\x12Q\n\x1blocal_nvme_ssd_block_config\x18( \x01(\x0b\x32,.google.container.v1.LocalNvmeSsdBlockConfig\x12_\n\"ephemeral_storage_local_ssd_config\x18) \x01(\x0b\x32\x33.google.container.v1.EphemeralStorageLocalSsdConfig\x12\x41\n\x12sole_tenant_config\x18* \x01(\x0b\x32%.google.container.v1.SoleTenantConfig\x12@\n\x11\x63ontainerd_config\x18+ \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12G\n\x15resource_manager_tags\x18- \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12(\n\x1b\x65nable_confidential_storage\x18. \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x14secondary_boot_disks\x18\x30 \x03(\x0b\x32&.google.container.v1.SecondaryBootDisk\x12\x15\n\rstorage_pools\x18\x31 \x03(\t\x12\x66\n#secondary_boot_disk_update_strategy\x18\x32 \x01(\x0b\x32\x34.google.container.v1.SecondaryBootDiskUpdateStrategyH\x01\x88\x01\x01\x12\x33\n\x10max_run_duration\x18\x35 \x01(\x0b\x32\x19.google.protobuf.Duration\x12^\n\x19local_ssd_encryption_mode\x18\x36 \x01(\x0e\x32\x36.google.container.v1.NodeConfig.LocalSsdEncryptionModeH\x02\x88\x01\x01\x12W\n\x15\x65\x66\x66\x65\x63tive_cgroup_mode\x18\x37 \x01(\x0e\x32\x33.google.container.v1.NodeConfig.EffectiveCgroupModeB\x03\xe0\x41\x03\x12\x17\n\nflex_start\x18\x38 \x01(\x08H\x03\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x16LocalSsdEncryptionMode\x12)\n%LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_ENCRYPTION\x10\x01\x12\x1c\n\x18\x45PHEMERAL_KEY_ENCRYPTION\x10\x02\"x\n\x13\x45\x66\x66\x65\x63tiveCgroupMode\x12%\n!EFFECTIVE_CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V1\x10\x01\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V2\x10\x02\x42\x0e\n\x0c_fast_socketB&\n$_secondary_boot_disk_update_strategyB\x1c\n\x1a_local_ssd_encryption_modeB\r\n\x0b_flex_start\"\xa4\x03\n\x17\x41\x64vancedMachineFeatures\x12\x1d\n\x10threads_per_core\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12p\n\x1bperformance_monitoring_unit\x18\x03 \x01(\x0e\x32\x46.google.container.v1.AdvancedMachineFeatures.PerformanceMonitoringUnitH\x02\x88\x01\x01\"w\n\x19PerformanceMonitoringUnit\x12+\n\'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\x00\x12\x11\n\rARCHITECTURAL\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08\x45NHANCED\x10\x03\x42\x13\n\x11_threads_per_coreB\x1f\n\x1d_enable_nested_virtualizationB\x1e\n\x1c_performance_monitoring_unit\"\xb3\x06\n\x11NodeNetworkConfig\x12\x1d\n\x10\x63reate_pod_range\x18\x04 \x01(\x08\x42\x03\xe0\x41\x04\x12\x11\n\tpod_range\x18\x05 \x01(\t\x12\x1b\n\x13pod_ipv4_cidr_block\x18\x06 \x01(\t\x12!\n\x14\x65nable_private_nodes\x18\t \x01(\x08H\x00\x88\x01\x01\x12h\n\x1anetwork_performance_config\x18\x0b \x01(\x0b\x32?.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfigH\x01\x88\x01\x01\x12V\n\x1dpod_cidr_overprovision_config\x18\r \x01(\x0b\x32/.google.container.v1.PodCIDROverprovisionConfig\x12Y\n\x1f\x61\x64\x64itional_node_network_configs\x18\x0e \x03(\x0b\x32\x30.google.container.v1.AdditionalNodeNetworkConfig\x12W\n\x1e\x61\x64\x64itional_pod_network_configs\x18\x0f \x03(\x0b\x32/.google.container.v1.AdditionalPodNetworkConfig\x12\'\n\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01\x42\x03\xe0\x41\x03\x1a\xd4\x01\n\x18NetworkPerformanceConfig\x12n\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x44.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x17\n\x15_enable_private_nodesB\x1d\n\x1b_network_performance_config\"B\n\x1b\x41\x64\x64itionalNodeNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\"\xab\x01\n\x1a\x41\x64\x64itionalPodNetworkConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1b\n\x13secondary_pod_range\x18\x02 \x01(\t\x12\x46\n\x11max_pods_per_node\x18\x03 \x01(\x0b\x32&.google.container.v1.MaxPodsConstraintH\x00\x88\x01\x01\x42\x14\n\x12_max_pods_per_node\"Y\n\x16ShieldedInstanceConfig\x12\x1a\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x12#\n\x1b\x65nable_integrity_monitoring\x18\x02 \x01(\x08\"k\n\rSandboxConfig\x12\x35\n\x04type\x18\x02 \x01(\x0e\x32\'.google.container.v1.SandboxConfig.Type\"#\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06GVISOR\x10\x01\"\x1d\n\nGcfsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xdf\x01\n\x13ReservationAffinity\x12O\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32-.google.container.v1.ReservationAffinity.Type\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"Z\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\"\x96\x02\n\x10SoleTenantConfig\x12K\n\x0fnode_affinities\x18\x01 \x03(\x0b\x32\x32.google.container.v1.SoleTenantConfig.NodeAffinity\x1a\xb4\x01\n\x0cNodeAffinity\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x08operator\x18\x02 \x01(\x0e\x32;.google.container.v1.SoleTenantConfig.NodeAffinity.Operator\x12\x0e\n\x06values\x18\x03 \x03(\t\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\"\xfc\x04\n\x10\x43ontainerdConfig\x12i\n\x1eprivate_registry_access_config\x18\x01 \x01(\x0b\x32\x41.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig\x1a\xfc\x03\n\x1bPrivateRegistryAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x8f\x01\n#certificate_authority_domain_config\x18\x02 \x03(\x0b\x32\x62.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig\x1a\xb9\x02\n CertificateAuthorityDomainConfig\x12\r\n\x05\x66qdns\x18\x01 \x03(\t\x12\xb6\x01\n%gcp_secret_manager_certificate_config\x18\x02 \x01(\x0b\x32\x84\x01.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00\x1a\x37\n!GCPSecretManagerCertificateConfig\x12\x12\n\nsecret_uri\x18\x01 \x01(\tB\x14\n\x12\x63\x65rtificate_config\"\xb9\x01\n\tNodeTaint\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x35\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32%.google.container.v1.NodeTaint.Effect\"Y\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNO_SCHEDULE\x10\x01\x12\x16\n\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n\nNO_EXECUTE\x10\x03\"<\n\nNodeTaints\x12.\n\x06taints\x18\x01 \x03(\x0b\x32\x1e.google.container.v1.NodeTaint\"x\n\nNodeLabels\x12;\n\x06labels\x18\x01 \x03(\x0b\x32+.google.container.v1.NodeLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\x0eResourceLabels\x12?\n\x06labels\x18\x01 \x03(\x0b\x32/.google.container.v1.ResourceLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x0bNetworkTags\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\xe8\x01\n\nMasterAuth\x12\x14\n\x08username\x18\x01 \x01(\tB\x02\x18\x01\x12\x14\n\x08password\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x19\x63lient_certificate_config\x18\x03 \x01(\x0b\x32,.google.container.v1.ClientCertificateConfig\x12#\n\x16\x63luster_ca_certificate\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63lient_certificate\x18\x65 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nclient_key\x18\x66 \x01(\tB\x03\xe0\x41\x03\";\n\x17\x43lientCertificateConfig\x12 \n\x18issue_client_certificate\x18\x01 \x01(\x08\"\xae\t\n\x0c\x41\x64\x64onsConfig\x12\x43\n\x13http_load_balancing\x18\x01 \x01(\x0b\x32&.google.container.v1.HttpLoadBalancing\x12Q\n\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\x0b\x32-.google.container.v1.HorizontalPodAutoscaling\x12J\n\x14kubernetes_dashboard\x18\x03 \x01(\x0b\x32(.google.container.v1.KubernetesDashboardB\x02\x18\x01\x12G\n\x15network_policy_config\x18\x04 \x01(\x0b\x32(.google.container.v1.NetworkPolicyConfig\x12=\n\x10\x63loud_run_config\x18\x07 \x01(\x0b\x32#.google.container.v1.CloudRunConfig\x12=\n\x10\x64ns_cache_config\x18\x08 \x01(\x0b\x32#.google.container.v1.DnsCacheConfig\x12K\n\x17\x63onfig_connector_config\x18\n \x01(\x0b\x32*.google.container.v1.ConfigConnectorConfig\x12\x64\n%gce_persistent_disk_csi_driver_config\x18\x0b \x01(\x0b\x32\x35.google.container.v1.GcePersistentDiskCsiDriverConfig\x12Y\n\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1.GcpFilestoreCsiDriverConfig\x12J\n\x17gke_backup_agent_config\x18\x10 \x01(\x0b\x32).google.container.v1.GkeBackupAgentConfig\x12O\n\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\x0b\x32+.google.container.v1.GcsFuseCsiDriverConfig\x12\x46\n\x12stateful_ha_config\x18\x12 \x01(\x0b\x32%.google.container.v1.StatefulHAConfigB\x03\xe0\x41\x01\x12Z\n\x1fparallelstore_csi_driver_config\x18\x13 \x01(\x0b\x32\x31.google.container.v1.ParallelstoreCsiDriverConfig\x12H\n\x13ray_operator_config\x18\x15 \x01(\x0b\x32&.google.container.v1.RayOperatorConfigB\x03\xe0\x41\x01\x12Z\n\x1fhigh_scale_checkpointing_config\x18\x16 \x01(\x0b\x32\x31.google.container.v1.HighScaleCheckpointingConfig\"%\n\x11HttpLoadBalancing\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x18HorizontalPodAutoscaling\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13KubernetesDashboard\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13NetworkPolicyConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"!\n\x0e\x44nsCacheConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"9\n&PrivateClusterMasterGlobalAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe8\x02\n\x14PrivateClusterConfig\x12 \n\x14\x65nable_private_nodes\x18\x01 \x01(\x08\x42\x02\x18\x01\x12#\n\x17\x65nable_private_endpoint\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x1e\n\x16master_ipv4_cidr_block\x18\x03 \x01(\t\x12\x1f\n\x10private_endpoint\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x1e\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cpeering_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x1bmaster_global_access_config\x18\x08 \x01(\x0b\x32;.google.container.v1.PrivateClusterMasterGlobalAccessConfigB\x02\x18\x01\x12\'\n\x1bprivate_endpoint_subnetwork\x18\n \x01(\tB\x02\x18\x01\"D\n\x19\x41uthenticatorGroupsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0esecurity_group\x18\x02 \x01(\t\"\xee\x01\n\x0e\x43loudRunConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12P\n\x12load_balancer_type\x18\x03 \x01(\x0e\x32\x34.google.container.v1.CloudRunConfig.LoadBalancerType\"x\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"(\n\x15\x43onfigConnectorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"3\n GcePersistentDiskCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\".\n\x1bGcpFilestoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16GcsFuseCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cParallelstoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cHighScaleCheckpointingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xd8\x01\n\x11RayOperatorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12U\n\x1aray_cluster_logging_config\x18\x02 \x01(\x0b\x32,.google.container.v1.RayClusterLoggingConfigB\x03\xe0\x41\x01\x12[\n\x1dray_cluster_monitoring_config\x18\x03 \x01(\x0b\x32/.google.container.v1.RayClusterMonitoringConfigB\x03\xe0\x41\x01\"\'\n\x14GkeBackupAgentConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"#\n\x10StatefulHAConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xea\x02\n\x1eMasterAuthorizedNetworksConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12R\n\x0b\x63idr_blocks\x18\x02 \x03(\x0b\x32=.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock\x12,\n\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x31\n$private_endpoint_enforcement_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x1a\x35\n\tCidrBlock\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x12\n\ncidr_block\x18\x02 \x01(\tB\"\n _gcp_public_cidrs_access_enabledB\'\n%_private_endpoint_enforcement_enabled\"\x1d\n\nLegacyAbac\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x91\x01\n\rNetworkPolicy\x12=\n\x08provider\x18\x01 \x01(\x0e\x32+.google.container.v1.NetworkPolicy.Provider\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"0\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41LICO\x10\x01\"\xe3\x01\n\x13\x42inaryAuthorization\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12P\n\x0f\x65valuation_mode\x18\x02 \x01(\x0e\x32\x37.google.container.v1.BinaryAuthorization.EvaluationMode\"e\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12$\n PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\"-\n\x1aPodCIDROverprovisionConfig\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\"\xc1\x06\n\x12IPAllocationPolicy\x12\x16\n\x0euse_ip_aliases\x18\x01 \x01(\x08\x12\x19\n\x11\x63reate_subnetwork\x18\x02 \x01(\x08\x12\x17\n\x0fsubnetwork_name\x18\x03 \x01(\t\x12\x1d\n\x11\x63luster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01\x12\x1a\n\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01\x12\x1e\n\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01\x12$\n\x1c\x63luster_secondary_range_name\x18\x07 \x01(\t\x12%\n\x1dservices_secondary_range_name\x18\x08 \x01(\t\x12\x1f\n\x17\x63luster_ipv4_cidr_block\x18\t \x01(\t\x12\x1c\n\x14node_ipv4_cidr_block\x18\n \x01(\t\x12 \n\x18services_ipv4_cidr_block\x18\x0b \x01(\t\x12\x1f\n\x13tpu_ipv4_cidr_block\x18\r \x01(\tB\x02\x18\x01\x12\x12\n\nuse_routes\x18\x0f \x01(\x08\x12\x32\n\nstack_type\x18\x10 \x01(\x0e\x32\x1e.google.container.v1.StackType\x12=\n\x10ipv6_access_type\x18\x11 \x01(\x0e\x32#.google.container.v1.IPv6AccessType\x12V\n\x1dpod_cidr_overprovision_config\x18\x15 \x01(\x0b\x32/.google.container.v1.PodCIDROverprovisionConfig\x12#\n\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12Y\n\x1c\x61\x64\x64itional_pod_ranges_config\x18\x18 \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfigB\x03\xe0\x41\x03\x12/\n\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01\x42\x03\xe0\x41\x03\"\xda!\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x12initial_node_count\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x38\n\x0bnode_config\x18\x04 \x01(\x0b\x32\x1f.google.container.v1.NodeConfigB\x02\x18\x01\x12\x34\n\x0bmaster_auth\x18\x05 \x01(\x0b\x32\x1f.google.container.v1.MasterAuth\x12\x17\n\x0flogging_service\x18\x06 \x01(\t\x12\x1a\n\x12monitoring_service\x18\x07 \x01(\t\x12\x0f\n\x07network\x18\x08 \x01(\t\x12\x19\n\x11\x63luster_ipv4_cidr\x18\t \x01(\t\x12\x38\n\raddons_config\x18\n \x01(\x0b\x32!.google.container.v1.AddonsConfig\x12\x12\n\nsubnetwork\x18\x0b \x01(\t\x12\x31\n\nnode_pools\x18\x0c \x03(\x0b\x32\x1d.google.container.v1.NodePool\x12\x11\n\tlocations\x18\r \x03(\t\x12\x1f\n\x17\x65nable_kubernetes_alpha\x18\x0e \x01(\x08\x12$\n\x1b\x61lpha_cluster_feature_gates\x18\xa0\x01 \x03(\t\x12I\n\x0fresource_labels\x18\x0f \x03(\x0b\x32\x30.google.container.v1.Cluster.ResourceLabelsEntry\x12\x19\n\x11label_fingerprint\x18\x10 \x01(\t\x12\x34\n\x0blegacy_abac\x18\x12 \x01(\x0b\x32\x1f.google.container.v1.LegacyAbac\x12:\n\x0enetwork_policy\x18\x13 \x01(\x0b\x32\".google.container.v1.NetworkPolicy\x12\x45\n\x14ip_allocation_policy\x18\x14 \x01(\x0b\x32\'.google.container.v1.IPAllocationPolicy\x12\x62\n!master_authorized_networks_config\x18\x16 \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12\x42\n\x12maintenance_policy\x18\x17 \x01(\x0b\x32&.google.container.v1.MaintenancePolicy\x12\x46\n\x14\x62inary_authorization\x18\x18 \x01(\x0b\x32(.google.container.v1.BinaryAuthorization\x12<\n\x0b\x61utoscaling\x18\x1a \x01(\x0b\x32\'.google.container.v1.ClusterAutoscaling\x12:\n\x0enetwork_config\x18\x1b \x01(\x0b\x32\".google.container.v1.NetworkConfig\x12K\n\x1b\x64\x65\x66\x61ult_max_pods_constraint\x18\x1e \x01(\x0b\x32&.google.container.v1.MaxPodsConstraint\x12T\n\x1cresource_usage_export_config\x18! \x01(\x0b\x32..google.container.v1.ResourceUsageExportConfig\x12S\n\x1b\x61uthenticator_groups_config\x18\" \x01(\x0b\x32..google.container.v1.AuthenticatorGroupsConfig\x12I\n\x16private_cluster_config\x18% \x01(\x0b\x32).google.container.v1.PrivateClusterConfig\x12\x44\n\x13\x64\x61tabase_encryption\x18& \x01(\x0b\x32\'.google.container.v1.DatabaseEncryption\x12M\n\x18vertical_pod_autoscaling\x18\' \x01(\x0b\x32+.google.container.v1.VerticalPodAutoscaling\x12:\n\x0eshielded_nodes\x18( \x01(\x0b\x32\".google.container.v1.ShieldedNodes\x12<\n\x0frelease_channel\x18) \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12M\n\x18workload_identity_config\x18+ \x01(\x0b\x32+.google.container.v1.WorkloadIdentityConfig\x12@\n\x11mesh_certificates\x18\x43 \x01(\x0b\x32%.google.container.v1.MeshCertificates\x12I\n\x16\x63ost_management_config\x18- \x01(\x0b\x32).google.container.v1.CostManagementConfig\x12\x44\n\x13notification_config\x18\x31 \x01(\x0b\x32\'.google.container.v1.NotificationConfig\x12\x42\n\x12\x63onfidential_nodes\x18\x32 \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12K\n\x17identity_service_config\x18\x36 \x01(\x0b\x32*.google.container.v1.IdentityServiceConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x65 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x15\n\x08\x65ndpoint\x18\x66 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17initial_cluster_version\x18g \x01(\t\x12#\n\x16\x63urrent_master_version\x18h \x01(\tB\x03\xe0\x41\x03\x12#\n\x14\x63urrent_node_version\x18i \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x63reate_time\x18j \x01(\tB\x03\xe0\x41\x03\x12\x38\n\x06status\x18k \x01(\x0e\x32#.google.container.v1.Cluster.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18l \x01(\tB\x05\x18\x01\xe0\x41\x03\x12 \n\x13node_ipv4_cidr_size\x18m \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0\x41\x03\x12\"\n\x13instance_group_urls\x18o \x03(\tB\x05\x18\x01\xe0\x41\x03\x12!\n\x12\x63urrent_node_count\x18p \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x65xpire_time\x18q \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18r \x01(\tB\x03\xe0\x41\x03\x12\x16\n\nenable_tpu\x18s \x01(\x08\x42\x02\x18\x01\x12\"\n\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x38\n\nconditions\x18v \x03(\x0b\x32$.google.container.v1.StatusCondition\x12\x32\n\tautopilot\x18\x80\x01 \x01(\x0b\x32\x1e.google.container.v1.Autopilot\x12\x10\n\x02id\x18\x81\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x12node_pool_defaults\x18\x83\x01 \x01(\x0b\x32%.google.container.v1.NodePoolDefaultsH\x00\x88\x01\x01\x12;\n\x0elogging_config\x18\x84\x01 \x01(\x0b\x32\".google.container.v1.LoggingConfig\x12\x41\n\x11monitoring_config\x18\x85\x01 \x01(\x0b\x32%.google.container.v1.MonitoringConfig\x12G\n\x15node_pool_auto_config\x18\x88\x01 \x01(\x0b\x32\'.google.container.v1.NodePoolAutoConfig\x12=\n\x0fpod_autoscaling\x18\x8a\x01 \x01(\x0b\x32#.google.container.v1.PodAutoscaling\x12\r\n\x04\x65tag\x18\x8b\x01 \x01(\t\x12*\n\x05\x66leet\x18\x8c\x01 \x01(\x0b\x32\x1a.google.container.v1.Fleet\x12L\n\x17security_posture_config\x18\x91\x01 \x01(\x0b\x32*.google.container.v1.SecurityPostureConfig\x12Y\n\x1e\x63ontrol_plane_endpoints_config\x18\x92\x01 \x01(\x0b\x32\x30.google.container.v1.ControlPlaneEndpointsConfig\x12\x44\n\x14\x65nable_k8s_beta_apis\x18\x8f\x01 \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12\x41\n\x11\x65nterprise_config\x18\x95\x01 \x01(\x0b\x32%.google.container.v1.EnterpriseConfig\x12H\n\x15secret_manager_config\x18\x96\x01 \x01(\x0b\x32(.google.container.v1.SecretManagerConfig\x12P\n\x19\x63ompliance_posture_config\x18\x97\x01 \x01(\x0b\x32,.google.container.v1.CompliancePostureConfig\x12 \n\rsatisfies_pzs\x18\x98\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12 \n\rsatisfies_pzi\x18\x99\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x18user_managed_keys_config\x18\x9a\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfigH\x03\x88\x01\x01\x12I\n\x13rbac_binding_config\x18\x9c\x01 \x01(\x0b\x32&.google.container.v1.RBACBindingConfigH\x04\x88\x01\x01\x12\\\n\x1f\x61nonymous_authentication_config\x18\xa4\x01 \x01(\x0b\x32\x32.google.container.v1.AnonymousAuthenticationConfig\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"w\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0f\n\x0bRECONCILING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x44\x45GRADED\x10\x06\x42\x15\n\x13_node_pool_defaultsB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pziB\x1b\n\x19_user_managed_keys_configB\x16\n\x14_rbac_binding_config\"\xef\x01\n\x11RBACBindingConfig\x12;\n.enable_insecure_binding_system_unauthenticated\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n,enable_insecure_binding_system_authenticated\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x31\n/_enable_insecure_binding_system_unauthenticatedB/\n-_enable_insecure_binding_system_authenticated\"\xe9\x04\n\x15UserManagedKeysConfig\x12\x38\n\ncluster_ca\x18\n \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x39\n\x0b\x65tcd_api_ca\x18\x0b \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12:\n\x0c\x65tcd_peer_ca\x18\x0c \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12S\n\x1cservice_account_signing_keys\x18\r \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!service_account_verification_keys\x18\x0e \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12<\n\x0e\x61ggregation_ca\x18\x0f \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12X\n!control_plane_disk_encryption_key\x18\x10 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!gkeops_etcd_backup_encryption_key\x18\x11 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\x1f\n\x1d\x41nonymousAuthenticationConfig\"\xba\x02\n\x17\x43ompliancePostureConfig\x12\x44\n\x04mode\x18\x01 \x01(\x0e\x32\x31.google.container.v1.CompliancePostureConfig.ModeH\x00\x88\x01\x01\x12]\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32?.google.container.v1.CompliancePostureConfig.ComplianceStandard\x1a\x38\n\x12\x43omplianceStandard\x12\x15\n\x08standard\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_standard\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\x07\n\x05_mode\"(\n\x10K8sBetaAPIConfig\x12\x14\n\x0c\x65nabled_apis\x18\x01 \x03(\t\"\xae\x03\n\x15SecurityPostureConfig\x12\x42\n\x04mode\x18\x01 \x01(\x0e\x32/.google.container.v1.SecurityPostureConfig.ModeH\x00\x88\x01\x01\x12]\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32<.google.container.v1.SecurityPostureConfig.VulnerabilityModeH\x01\x88\x01\x01\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\x42\x07\n\x05_modeB\x15\n\x13_vulnerability_mode\"\xa0\x02\n\x12NodePoolAutoConfig\x12\x36\n\x0cnetwork_tags\x18\x01 \x01(\x0b\x32 .google.container.v1.NetworkTags\x12G\n\x15resource_manager_tags\x18\x02 \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12\x43\n\x13node_kubelet_config\x18\x03 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x44\n\x11linux_node_config\x18\x04 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfigB\x03\xe0\x41\x03\"Y\n\x10NodePoolDefaults\x12\x45\n\x14node_config_defaults\x18\x01 \x01(\x0b\x32\'.google.container.v1.NodeConfigDefaults\"\x95\x02\n\x12NodeConfigDefaults\x12\x34\n\x0bgcfs_config\x18\x01 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12\x42\n\x0elogging_config\x18\x03 \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12@\n\x11\x63ontainerd_config\x18\x04 \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12\x43\n\x13node_kubelet_config\x18\x06 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\"\xe7)\n\rClusterUpdate\x12\x1c\n\x14\x64\x65sired_node_version\x18\x04 \x01(\t\x12\"\n\x1a\x64\x65sired_monitoring_service\x18\x05 \x01(\t\x12@\n\x15\x64\x65sired_addons_config\x18\x06 \x01(\x0b\x32!.google.container.v1.AddonsConfig\x12\x1c\n\x14\x64\x65sired_node_pool_id\x18\x07 \x01(\t\x12\x1a\n\x12\x64\x65sired_image_type\x18\x08 \x01(\t\x12L\n\x1b\x64\x65sired_database_encryption\x18. \x01(\x0b\x32\'.google.container.v1.DatabaseEncryption\x12U\n desired_workload_identity_config\x18/ \x01(\x0b\x32+.google.container.v1.WorkloadIdentityConfig\x12H\n\x19\x64\x65sired_mesh_certificates\x18\x43 \x01(\x0b\x32%.google.container.v1.MeshCertificates\x12\x42\n\x16\x64\x65sired_shielded_nodes\x18\x30 \x01(\x0b\x32\".google.container.v1.ShieldedNodes\x12Q\n\x1e\x64\x65sired_cost_management_config\x18\x31 \x01(\x0b\x32).google.container.v1.CostManagementConfig\x12:\n\x12\x64\x65sired_dns_config\x18\x35 \x01(\x0b\x32\x1e.google.container.v1.DNSConfig\x12O\n\x1d\x64\x65sired_node_pool_autoscaling\x18\t \x01(\x0b\x32(.google.container.v1.NodePoolAutoscaling\x12\x19\n\x11\x64\x65sired_locations\x18\n \x03(\t\x12j\n)desired_master_authorized_networks_config\x18\x0c \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12L\n\x1b\x64\x65sired_cluster_autoscaling\x18\x0f \x01(\x0b\x32\'.google.container.v1.ClusterAutoscaling\x12N\n\x1c\x64\x65sired_binary_authorization\x18\x10 \x01(\x0b\x32(.google.container.v1.BinaryAuthorization\x12\x1f\n\x17\x64\x65sired_logging_service\x18\x13 \x01(\t\x12\\\n$desired_resource_usage_export_config\x18\x15 \x01(\x0b\x32..google.container.v1.ResourceUsageExportConfig\x12U\n desired_vertical_pod_autoscaling\x18\x16 \x01(\x0b\x32+.google.container.v1.VerticalPodAutoscaling\x12U\n\x1e\x64\x65sired_private_cluster_config\x18\x19 \x01(\x0b\x32).google.container.v1.PrivateClusterConfigB\x02\x18\x01\x12\\\n$desired_intra_node_visibility_config\x18\x1a \x01(\x0b\x32..google.container.v1.IntraNodeVisibilityConfig\x12K\n\x1b\x64\x65sired_default_snat_status\x18\x1c \x01(\x0b\x32&.google.container.v1.DefaultSnatStatus\x12\x44\n\x17\x64\x65sired_release_channel\x18\x1f \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12Q\n\x1f\x64\x65sired_l4ilb_subsetting_config\x18\' \x01(\x0b\x32(.google.container.v1.ILBSubsettingConfig\x12H\n\x19\x64\x65sired_datapath_provider\x18\x32 \x01(\x0e\x32%.google.container.v1.DatapathProvider\x12X\n\"desired_private_ipv6_google_access\x18\x33 \x01(\x0e\x32,.google.container.v1.PrivateIPv6GoogleAccess\x12L\n\x1b\x64\x65sired_notification_config\x18\x37 \x01(\x0b\x32\'.google.container.v1.NotificationConfig\x12[\n#desired_authenticator_groups_config\x18? \x01(\x0b\x32..google.container.v1.AuthenticatorGroupsConfig\x12\x42\n\x16\x64\x65sired_logging_config\x18@ \x01(\x0b\x32\".google.container.v1.LoggingConfig\x12H\n\x19\x64\x65sired_monitoring_config\x18\x41 \x01(\x0b\x32%.google.container.v1.MonitoringConfig\x12S\n\x1f\x64\x65sired_identity_service_config\x18\x42 \x01(\x0b\x32*.google.container.v1.IdentityServiceConfig\x12Z\n#desired_service_external_ips_config\x18< \x01(\x0b\x32-.google.container.v1.ServiceExternalIPsConfig\x12\x30\n\x1f\x64\x65sired_enable_private_endpoint\x18G \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x31\n$desired_default_enable_private_nodes\x18H \x01(\x08H\x01\x88\x01\x01\x12`\n&desired_control_plane_endpoints_config\x18I \x01(\x0b\x32\x30.google.container.v1.ControlPlaneEndpointsConfig\x12\x1e\n\x16\x64\x65sired_master_version\x18\x64 \x01(\t\x12<\n\x13\x64\x65sired_gcfs_config\x18m \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12T\n*desired_node_pool_auto_config_network_tags\x18n \x01(\x0b\x32 .google.container.v1.NetworkTags\x12\x44\n\x17\x64\x65sired_pod_autoscaling\x18q \x01(\x0b\x32#.google.container.v1.PodAutoscaling\x12I\n\x1a\x64\x65sired_gateway_api_config\x18r \x01(\x0b\x32%.google.container.v1.GatewayAPIConfig\x12\x0c\n\x04\x65tag\x18s \x01(\t\x12T\n desired_node_pool_logging_config\x18t \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12\x31\n\rdesired_fleet\x18u \x01(\x0b\x32\x1a.google.container.v1.Fleet\x12:\n\x12\x64\x65sired_stack_type\x18w \x01(\x0e\x32\x1e.google.container.v1.StackType\x12T\n\x1c\x61\x64\x64itional_pod_ranges_config\x18x \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfig\x12\\\n$removed_additional_pod_ranges_config\x18y \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfig\x12\x43\n\x14\x65nable_k8s_beta_apis\x18z \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12S\n\x1f\x64\x65sired_security_posture_config\x18| \x01(\x0b\x32*.google.container.v1.SecurityPostureConfig\x12n\n\"desired_network_performance_config\x18} \x01(\x0b\x32\x42.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig\x12/\n\"desired_enable_fqdn_network_policy\x18~ \x01(\x08H\x02\x88\x01\x01\x12\\\n(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\x0b\x32).google.container.v1.WorkloadPolicyConfig\x12\x45\n\x15\x64\x65sired_k8s_beta_apis\x18\x83\x01 \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12I\n\x19\x64\x65sired_containerd_config\x18\x86\x01 \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12-\n\x1f\x64\x65sired_enable_multi_networking\x18\x87\x01 \x01(\x08H\x03\x88\x01\x01\x12\x66\n3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12\x62\n$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e\x32..google.container.v1.InTransitEncryptionConfigH\x04\x88\x01\x01\x12>\n0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\x08H\x05\x88\x01\x01\x12U\n\x1d\x64\x65sired_secret_manager_config\x18\x8b\x01 \x01(\x0b\x32(.google.container.v1.SecretManagerConfigH\x06\x88\x01\x01\x12]\n!desired_compliance_posture_config\x18\x8c\x01 \x01(\x0b\x32,.google.container.v1.CompliancePostureConfigH\x07\x88\x01\x01\x12L\n\x1b\x64\x65sired_node_kubelet_config\x18\x8d\x01 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12]\n,desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12M\n\x18user_managed_keys_config\x18\x8f\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfig\x12Q\n\x1b\x64\x65sired_rbac_binding_config\x18\x90\x01 \x01(\x0b\x32&.google.container.v1.RBACBindingConfigH\x08\x88\x01\x01\x12P\n\x19\x64\x65sired_enterprise_config\x18\x93\x01 \x01(\x0b\x32,.google.container.v1.DesiredEnterpriseConfig\x12;\n-desired_disable_l4_lb_firewall_reconciliation\x18\x95\x01 \x01(\x08H\t\x88\x01\x01\x12^\n/desired_node_pool_auto_config_linux_node_config\x18\x96\x01 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12\x64\n\'desired_anonymous_authentication_config\x18\x9c\x01 \x01(\x0b\x32\x32.google.container.v1.AnonymousAuthenticationConfigB\"\n _desired_enable_private_endpointB\'\n%_desired_default_enable_private_nodesB%\n#_desired_enable_fqdn_network_policyB\"\n _desired_enable_multi_networkingB\'\n%_desired_in_transit_encryption_configB3\n1_desired_enable_cilium_clusterwide_network_policyB \n\x1e_desired_secret_manager_configB$\n\"_desired_compliance_posture_configB\x1e\n\x1c_desired_rbac_binding_configB0\n._desired_disable_l4_lb_firewall_reconciliation\"q\n\x19\x41\x64\x64itionalPodRangesConfig\x12\x17\n\x0fpod_range_names\x18\x01 \x03(\t\x12;\n\x0epod_range_info\x18\x02 \x03(\x0b\x32\x1e.google.container.v1.RangeInfoB\x03\xe0\x41\x03\">\n\tRangeInfo\x12\x17\n\nrange_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0butilization\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"b\n\x17\x44\x65siredEnterpriseConfig\x12G\n\x0c\x64\x65sired_tier\x18\x01 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTier\"\xe4\x08\n\tOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12@\n\x0eoperation_type\x18\x03 \x01(\x0e\x32#.google.container.v1.Operation.TypeB\x03\xe0\x41\x03\x12:\n\x06status\x18\x04 \x01(\x0e\x32%.google.container.v1.Operation.StatusB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x16\n\tself_link\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0btarget_link\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nstart_time\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_time\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12=\n\x08progress\x18\x0c \x01(\x0b\x32&.google.container.v1.OperationProgressB\x03\xe0\x41\x03\x12\x44\n\x12\x63luster_conditions\x18\r \x03(\x0b\x32$.google.container.v1.StatusConditionB\x02\x18\x01\x12\x45\n\x13nodepool_conditions\x18\x0e \x03(\x0b\x32$.google.container.v1.StatusConditionB\x02\x18\x01\x12!\n\x05\x65rror\x18\x0f \x01(\x0b\x32\x12.google.rpc.Status\"R\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x41\x42ORTING\x10\x04\"\xc0\x03\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43REATE_CLUSTER\x10\x01\x12\x12\n\x0e\x44\x45LETE_CLUSTER\x10\x02\x12\x12\n\x0eUPGRADE_MASTER\x10\x03\x12\x11\n\rUPGRADE_NODES\x10\x04\x12\x12\n\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n\x10\x43REATE_NODE_POOL\x10\x07\x12\x14\n\x10\x44\x45LETE_NODE_POOL\x10\x08\x12\x1c\n\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n\x11\x41UTO_REPAIR_NODES\x10\n\x12\x1a\n\x12\x41UTO_UPGRADE_NODES\x10\x0b\x1a\x02\x08\x01\x12\x12\n\nSET_LABELS\x10\x0c\x1a\x02\x08\x01\x12\x17\n\x0fSET_MASTER_AUTH\x10\r\x1a\x02\x08\x01\x12\x16\n\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\x08\x01\x12\x1e\n\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\x08\x01\x12\x12\n\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n\x15\x46LEET_FEATURE_UPGRADE\x10\x13\"\xbb\x02\n\x11OperationProgress\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x06status\x18\x02 \x01(\x0e\x32%.google.container.v1.Operation.Status\x12>\n\x07metrics\x18\x03 \x03(\x0b\x32-.google.container.v1.OperationProgress.Metric\x12\x36\n\x06stages\x18\x04 \x03(\x0b\x32&.google.container.v1.OperationProgress\x1ai\n\x06Metric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\tint_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\x42\x07\n\x05value\"\x84\x01\n\x14\x43reateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x32\n\x07\x63luster\x18\x03 \x01(\x0b\x32\x1c.google.container.v1.ClusterB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"c\n\x11GetClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x9f\x01\n\x14UpdateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x37\n\x06update\x18\x04 \x01(\x0b\x32\".google.container.v1.ClusterUpdateB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xc7\x0c\n\x15UpdateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x19\n\x0cnode_version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nimage_type\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x11\n\tlocations\x18\r \x03(\t\x12M\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32+.google.container.v1.WorkloadMetadataConfig\x12G\n\x10upgrade_settings\x18\x0f \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12.\n\x04tags\x18\x10 \x01(\x0b\x32 .google.container.v1.NetworkTags\x12/\n\x06taints\x18\x11 \x01(\x0b\x32\x1f.google.container.v1.NodeTaints\x12/\n\x06labels\x18\x12 \x01(\x0b\x32\x1f.google.container.v1.NodeLabels\x12?\n\x11linux_node_config\x18\x13 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12>\n\x0ekubelet_config\x18\x14 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x43\n\x13node_network_config\x18\x15 \x01(\x0b\x32&.google.container.v1.NodeNetworkConfig\x12\x34\n\x0bgcfs_config\x18\x16 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12\x42\n\x12\x63onfidential_nodes\x18\x17 \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12.\n\x05gvnic\x18\x1d \x01(\x0b\x32\x1f.google.container.v1.VirtualNIC\x12\x0c\n\x04\x65tag\x18\x1e \x01(\t\x12\x34\n\x0b\x66\x61st_socket\x18\x1f \x01(\x0b\x32\x1f.google.container.v1.FastSocket\x12\x42\n\x0elogging_config\x18 \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12<\n\x0fresource_labels\x18! \x01(\x0b\x32#.google.container.v1.ResourceLabels\x12\x43\n\x13windows_node_config\x18\" \x01(\x0b\x32&.google.container.v1.WindowsNodeConfig\x12<\n\x0c\x61\x63\x63\x65lerators\x18# \x03(\x0b\x32&.google.container.v1.AcceleratorConfig\x12\x19\n\x0cmachine_type\x18$ \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18% \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isk_size_gb\x18& \x01(\x03\x42\x03\xe0\x41\x01\x12G\n\x15resource_manager_tags\x18\' \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12@\n\x11\x63ontainerd_config\x18( \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12M\n\x13queued_provisioning\x18* \x01(\x0b\x32\x30.google.container.v1.NodePool.QueuedProvisioning\x12\x15\n\rstorage_pools\x18+ \x03(\t\x12\x33\n\x10max_run_duration\x18- \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\nflex_start\x18. \x01(\x08H\x00\x88\x01\x01\x42\r\n\x0b_flex_start\"\xcd\x01\n\x1dSetNodePoolAutoscalingRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x42\n\x0b\x61utoscaling\x18\x05 \x01(\x0b\x32(.google.container.v1.NodePoolAutoscalingB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x88\x01\n\x18SetLoggingServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1c\n\x0flogging_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x8e\x01\n\x1bSetMonitoringServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xa7\x01\n\x16SetAddonsConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12=\n\raddons_config\x18\x04 \x01(\x0b\x32!.google.container.v1.AddonsConfigB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"}\n\x13SetLocationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\tlocations\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x82\x01\n\x13UpdateMasterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1b\n\x0emaster_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xb5\x02\n\x14SetMasterAuthRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x45\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x30.google.container.v1.SetMasterAuthRequest.ActionB\x03\xe0\x41\x02\x12\x34\n\x06update\x18\x05 \x01(\x0b\x32\x1f.google.container.v1.MasterAuthB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"P\n\x06\x41\x63tion\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cSET_PASSWORD\x10\x01\x12\x15\n\x11GENERATE_PASSWORD\x10\x02\x12\x10\n\x0cSET_USERNAME\x10\x03\"f\n\x14\x44\x65leteClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"O\n\x13ListClustersRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"]\n\x14ListClustersResponse\x12.\n\x08\x63lusters\x18\x01 \x03(\x0b\x32\x1c.google.container.v1.Cluster\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"g\n\x13GetOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"Q\n\x15ListOperationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"j\n\x16\x43\x61ncelOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"c\n\x16ListOperationsResponse\x12\x32\n\noperations\x18\x01 \x03(\x0b\x32\x1e.google.container.v1.Operation\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"P\n\x16GetServerConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"\x94\x03\n\x0cServerConfig\x12\x1f\n\x17\x64\x65\x66\x61ult_cluster_version\x18\x01 \x01(\t\x12\x1b\n\x13valid_node_versions\x18\x03 \x03(\t\x12\x1a\n\x12\x64\x65\x66\x61ult_image_type\x18\x04 \x01(\t\x12\x19\n\x11valid_image_types\x18\x05 \x03(\t\x12\x1d\n\x15valid_master_versions\x18\x06 \x03(\t\x12H\n\x08\x63hannels\x18\t \x03(\x0b\x32\x36.google.container.v1.ServerConfig.ReleaseChannelConfig\x1a\xa5\x01\n\x14ReleaseChannelConfig\x12<\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.google.container.v1.ReleaseChannel.Channel\x12\x17\n\x0f\x64\x65\x66\x61ult_version\x18\x02 \x01(\t\x12\x16\n\x0evalid_versions\x18\x04 \x03(\t\x12\x1e\n\x16upgrade_target_version\x18\x05 \x01(\t\"\xa0\x01\n\x15\x43reateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x35\n\tnode_pool\x18\x04 \x01(\x0b\x32\x1d.google.container.v1.NodePoolB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x06 \x01(\t\"\x81\x01\n\x15\x44\x65leteNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"h\n\x14ListNodePoolsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x05 \x01(\t\"~\n\x12GetNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x9f\x03\n\x11\x42lueGreenSettings\x12_\n\x17standard_rollout_policy\x18\x01 \x01(\x0b\x32<.google.container.v1.BlueGreenSettings.StandardRolloutPolicyH\x00\x12?\n\x17node_pool_soak_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x1a\xb9\x01\n\x15StandardRolloutPolicy\x12\x1a\n\x10\x62\x61tch_percentage\x18\x01 \x01(\x02H\x00\x12\x1a\n\x10\x62\x61tch_node_count\x18\x02 \x01(\x05H\x00\x12;\n\x13\x62\x61tch_soak_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\x13\n\x11update_batch_sizeB\x16\n\x14_batch_soak_durationB\x10\n\x0erollout_policyB\x1a\n\x18_node_pool_soak_duration\"\xd1\x10\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x1f.google.container.v1.NodeConfig\x12\x1a\n\x12initial_node_count\x18\x03 \x01(\x05\x12\x11\n\tlocations\x18\r \x03(\t\x12>\n\x0enetwork_config\x18\x0e \x01(\x0b\x32&.google.container.v1.NodeNetworkConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x65 \x01(\t\x12 \n\x13instance_group_urls\x18\x66 \x03(\tB\x03\xe0\x41\x03\x12\x39\n\x06status\x18g \x01(\x0e\x32$.google.container.v1.NodePool.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18h \x01(\tB\x05\x18\x01\xe0\x41\x03\x12=\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32(.google.container.v1.NodePoolAutoscaling\x12\x37\n\nmanagement\x18\x05 \x01(\x0b\x32#.google.container.v1.NodeManagement\x12\x43\n\x13max_pods_constraint\x18\x06 \x01(\x0b\x32&.google.container.v1.MaxPodsConstraint\x12\x38\n\nconditions\x18i \x03(\x0b\x32$.google.container.v1.StatusCondition\x12\x1f\n\x12pod_ipv4_cidr_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12G\n\x10upgrade_settings\x18k \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12G\n\x10placement_policy\x18l \x01(\x0b\x32-.google.container.v1.NodePool.PlacementPolicy\x12\x42\n\x0bupdate_info\x18m \x01(\x0b\x32(.google.container.v1.NodePool.UpdateInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18n \x01(\t\x12M\n\x13queued_provisioning\x18p \x01(\x0b\x32\x30.google.container.v1.NodePool.QueuedProvisioning\x12M\n\x18\x62\x65st_effort_provisioning\x18q \x01(\x0b\x32+.google.container.v1.BestEffortProvisioning\x1a\xf0\x01\n\x0fUpgradeSettings\x12\x11\n\tmax_surge\x18\x01 \x01(\x05\x12\x17\n\x0fmax_unavailable\x18\x02 \x01(\x05\x12\x42\n\x08strategy\x18\x03 \x01(\x0e\x32+.google.container.v1.NodePoolUpdateStrategyH\x00\x88\x01\x01\x12H\n\x13\x62lue_green_settings\x18\x04 \x01(\x0b\x32&.google.container.v1.BlueGreenSettingsH\x01\x88\x01\x01\x42\x0b\n\t_strategyB\x16\n\x14_blue_green_settings\x1a\x88\x04\n\nUpdateInfo\x12O\n\x0f\x62lue_green_info\x18\x01 \x01(\x0b\x32\x36.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo\x1a\xa8\x03\n\rBlueGreenInfo\x12K\n\x05phase\x18\x01 \x01(\x0e\x32<.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase\x12 \n\x18\x62lue_instance_group_urls\x18\x02 \x03(\t\x12!\n\x19green_instance_group_urls\x18\x03 \x03(\t\x12%\n\x1d\x62lue_pool_deletion_start_time\x18\x04 \x01(\t\x12\x1a\n\x12green_pool_version\x18\x05 \x01(\t\"\xc1\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUPDATE_STARTED\x10\x01\x12\x17\n\x13\x43REATING_GREEN_POOL\x10\x02\x12\x17\n\x13\x43ORDONING_BLUE_POOL\x10\x03\x12\x16\n\x12\x44RAINING_BLUE_POOL\x10\x04\x12\x15\n\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n\x12\x44\x45LETING_BLUE_POOL\x10\x06\x12\x14\n\x10ROLLBACK_STARTED\x10\x07\x1a\xae\x01\n\x0fPlacementPolicy\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.container.v1.NodePool.PlacementPolicy.Type\x12\x19\n\x0ctpu_topology\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x0bpolicy_name\x18\x03 \x01(\t\")\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMPACT\x10\x01\x1a%\n\x12QueuedProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x16\n\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n\x0bRECONCILING\x10\x04\x12\x0c\n\x08STOPPING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\"}\n\x0eNodeManagement\x12\x14\n\x0c\x61uto_upgrade\x18\x01 \x01(\x08\x12\x13\n\x0b\x61uto_repair\x18\x02 \x01(\x08\x12@\n\x0fupgrade_options\x18\n \x01(\x0b\x32\'.google.container.v1.AutoUpgradeOptions\"F\n\x16\x42\x65stEffortProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x13min_provision_nodes\x18\x02 \x01(\x05\"T\n\x12\x41utoUpgradeOptions\x12$\n\x17\x61uto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"e\n\x11MaintenancePolicy\x12\x36\n\x06window\x18\x01 \x01(\x0b\x32&.google.container.v1.MaintenanceWindow\x12\x18\n\x10resource_version\x18\x03 \x01(\t\"\xf6\x02\n\x11MaintenanceWindow\x12O\n\x18\x64\x61ily_maintenance_window\x18\x02 \x01(\x0b\x32+.google.container.v1.DailyMaintenanceWindowH\x00\x12\x44\n\x10recurring_window\x18\x03 \x01(\x0b\x32(.google.container.v1.RecurringTimeWindowH\x00\x12\x61\n\x16maintenance_exclusions\x18\x04 \x03(\x0b\x32\x41.google.container.v1.MaintenanceWindow.MaintenanceExclusionsEntry\x1a]\n\x1aMaintenanceExclusionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.google.container.v1.TimeWindow:\x02\x38\x01\x42\x08\n\x06policy\"\xd0\x01\n\nTimeWindow\x12Y\n\x1dmaintenance_exclusion_options\x18\x03 \x01(\x0b\x32\x30.google.container.v1.MaintenanceExclusionOptionsH\x00\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07options\"\xb4\x01\n\x1bMaintenanceExclusionOptions\x12\x45\n\x05scope\x18\x01 \x01(\x0e\x32\x36.google.container.v1.MaintenanceExclusionOptions.Scope\"N\n\x05Scope\x12\x0f\n\x0bNO_UPGRADES\x10\x00\x12\x15\n\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"Z\n\x13RecurringTimeWindow\x12/\n\x06window\x18\x01 \x01(\x0b\x32\x1f.google.container.v1.TimeWindow\x12\x12\n\nrecurrence\x18\x02 \x01(\t\"C\n\x16\x44\x61ilyMaintenanceWindow\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x15\n\x08\x64uration\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x1cSetNodePoolManagementRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\nmanagement\x18\x05 \x01(\x0b\x32#.google.container.v1.NodeManagementB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\x9b\x01\n\x16SetNodePoolSizeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x17\n\nnode_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\".\n\x1e\x43ompleteNodePoolUpgradeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9f\x01\n\x1eRollbackNodePoolUpgradeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0brespect_pdb\x18\x07 \x01(\x08\"J\n\x15ListNodePoolsResponse\x12\x31\n\nnode_pools\x18\x01 \x03(\x0b\x32\x1d.google.container.v1.NodePool\"\xaf\x03\n\x12\x43lusterAutoscaling\x12$\n\x1c\x65nable_node_autoprovisioning\x18\x01 \x01(\x08\x12;\n\x0fresource_limits\x18\x02 \x03(\x0b\x32\".google.container.v1.ResourceLimit\x12W\n\x13\x61utoscaling_profile\x18\x03 \x01(\x0e\x32:.google.container.v1.ClusterAutoscaling.AutoscalingProfile\x12\x62\n#autoprovisioning_node_pool_defaults\x18\x04 \x01(\x0b\x32\x35.google.container.v1.AutoprovisioningNodePoolDefaults\x12\"\n\x1a\x61utoprovisioning_locations\x18\x05 \x03(\t\"U\n\x12\x41utoscalingProfile\x12\x17\n\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n\x14OPTIMIZE_UTILIZATION\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\"\xf8\x03\n AutoprovisioningNodePoolDefaults\x12\x14\n\x0coauth_scopes\x18\x01 \x03(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12G\n\x10upgrade_settings\x18\x03 \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12\x37\n\nmanagement\x18\x04 \x01(\x0b\x32#.google.container.v1.NodeManagement\x12\x1c\n\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x05\x12\x11\n\tdisk_type\x18\x07 \x01(\t\x12M\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32+.google.container.v1.ShieldedInstanceConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\t \x01(\t\x12\x12\n\nimage_type\x18\n \x01(\t\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\r \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"H\n\rResourceLimit\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x0f\n\x07minimum\x18\x02 \x01(\x03\x12\x0f\n\x07maximum\x18\x03 \x01(\x03\"\xc7\x02\n\x13NodePoolAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\x12\x17\n\x0f\x61utoprovisioned\x18\x04 \x01(\x08\x12P\n\x0flocation_policy\x18\x05 \x01(\x0e\x32\x37.google.container.v1.NodePoolAutoscaling.LocationPolicy\x12\x1c\n\x14total_min_node_count\x18\x06 \x01(\x05\x12\x1c\n\x14total_max_node_count\x18\x07 \x01(\x05\"H\n\x0eLocationPolicy\x12\x1f\n\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"\x92\x02\n\x10SetLabelsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12W\n\x0fresource_labels\x18\x04 \x03(\x0b\x32\x39.google.container.v1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0\x41\x02\x12\x1e\n\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x14SetLegacyAbacRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x84\x01\n\x16StartIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x1a\n\x12rotate_credentials\x18\x07 \x01(\x08\"k\n\x19\x43ompleteIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xc5\x02\n\x11\x41\x63\x63\x65leratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x12\x46\n\x12gpu_sharing_config\x18\x05 \x01(\x0b\x32%.google.container.v1.GPUSharingConfigH\x00\x88\x01\x01\x12]\n\x1egpu_driver_installation_config\x18\x06 \x01(\x0b\x32\x30.google.container.v1.GPUDriverInstallationConfigH\x01\x88\x01\x01\x42\x15\n\x13_gpu_sharing_configB!\n\x1f_gpu_driver_installation_config\"\x83\x02\n\x10GPUSharingConfig\x12\"\n\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03\x12[\n\x14gpu_sharing_strategy\x18\x02 \x01(\x0e\x32\x38.google.container.v1.GPUSharingConfig.GPUSharingStrategyH\x00\x88\x01\x01\"U\n\x12GPUSharingStrategy\x12$\n GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n\x0cTIME_SHARING\x10\x01\x12\x07\n\x03MPS\x10\x02\x42\x17\n\x15_gpu_sharing_strategy\"\x84\x02\n\x1bGPUDriverInstallationConfig\x12\x62\n\x12gpu_driver_version\x18\x01 \x01(\x0e\x32\x41.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersionH\x00\x88\x01\x01\"j\n\x10GPUDriverVersion\x12\"\n\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n\x15INSTALLATION_DISABLED\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\n\n\x06LATEST\x10\x03\x42\x15\n\x13_gpu_driver_version\"\x9a\x01\n\x16WorkloadMetadataConfig\x12>\n\x04mode\x18\x02 \x01(\x0e\x32\x30.google.container.v1.WorkloadMetadataConfig.Mode\"@\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCE_METADATA\x10\x01\x12\x10\n\x0cGKE_METADATA\x10\x02\"\xaa\x01\n\x17SetNetworkPolicyRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12?\n\x0enetwork_policy\x18\x04 \x01(\x0b\x32\".google.container.v1.NetworkPolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xb9\x01\n\x1bSetMaintenancePolicyRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x12maintenance_policy\x18\x04 \x01(\x0b\x32&.google.container.v1.MaintenancePolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xd7\x02\n\x0fStatusCondition\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32).google.container.v1.StatusCondition.CodeB\x02\x18\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12(\n\x0e\x63\x61nonical_code\x18\x03 \x01(\x0e\x32\x10.google.rpc.Code\"\xcb\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cGCE_STOCKOUT\x10\x01\x12\x1f\n\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n\x13\x43LOUD_KMS_KEY_ERROR\x10\x07\x12\x0f\n\x0b\x43\x41_EXPIRING\x10\t\x12,\n(NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS\x10\n\"\xe5\n\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x1c\x65nable_intra_node_visibility\x18\x05 \x01(\x08\x12\x43\n\x13\x64\x65\x66\x61ult_snat_status\x18\x07 \x01(\x0b\x32&.google.container.v1.DefaultSnatStatus\x12\x1f\n\x17\x65nable_l4ilb_subsetting\x18\n \x01(\x08\x12@\n\x11\x64\x61tapath_provider\x18\x0b \x01(\x0e\x32%.google.container.v1.DatapathProvider\x12P\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32,.google.container.v1.PrivateIPv6GoogleAccess\x12\x32\n\ndns_config\x18\r \x01(\x0b\x32\x1e.google.container.v1.DNSConfig\x12R\n\x1bservice_external_ips_config\x18\x0f \x01(\x0b\x32-.google.container.v1.ServiceExternalIPsConfig\x12\x41\n\x12gateway_api_config\x18\x10 \x01(\x0b\x32%.google.container.v1.GatewayAPIConfig\x12\x1f\n\x17\x65nable_multi_networking\x18\x11 \x01(\x08\x12\x66\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x42.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig\x12\'\n\x1a\x65nable_fqdn_network_policy\x18\x13 \x01(\x08H\x00\x88\x01\x01\x12Y\n\x1cin_transit_encryption_config\x18\x14 \x01(\x0e\x32..google.container.v1.InTransitEncryptionConfigH\x01\x88\x01\x01\x12\x35\n(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\x08H\x02\x88\x01\x01\x12)\n\x1c\x64\x65\x66\x61ult_enable_private_nodes\x18\x16 \x01(\x08H\x03\x88\x01\x01\x12\x32\n%disable_l4_lb_firewall_reconciliation\x18\x18 \x01(\x08H\x04\x88\x01\x01\x1a\xde\x01\n\x1f\x43lusterNetworkPerformanceConfig\x12q\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32G.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x1d\n\x1b_enable_fqdn_network_policyB\x1f\n\x1d_in_transit_encryption_configB+\n)_enable_cilium_clusterwide_network_policyB\x1f\n\x1d_default_enable_private_nodesB(\n&_disable_l4_lb_firewall_reconciliation\"\xc0\x01\n\x10GatewayAPIConfig\x12>\n\x07\x63hannel\x18\x01 \x01(\x0e\x32-.google.container.v1.GatewayAPIConfig.Channel\"l\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HANNEL_DISABLED\x10\x01\x12\x1c\n\x14\x43HANNEL_EXPERIMENTAL\x10\x03\x1a\x02\x08\x01\x12\x14\n\x10\x43HANNEL_STANDARD\x10\x04\"+\n\x18ServiceExternalIPsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x16GetOpenIDConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"\xdf\x02\n\x17GetOpenIDConfigResponse\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x1a\n\x08jwks_uri\x18\x02 \x01(\tR\x08jwks_uri\x12:\n\x18response_types_supported\x18\x03 \x03(\tR\x18response_types_supported\x12\x38\n\x17subject_types_supported\x18\x04 \x03(\tR\x17subject_types_supported\x12T\n%id_token_signing_alg_values_supported\x18\x05 \x03(\tR%id_token_signing_alg_values_supported\x12*\n\x10\x63laims_supported\x18\x06 \x03(\tR\x10\x63laims_supported\x12 \n\x0bgrant_types\x18\x07 \x03(\tR\x0bgrant_types\"\'\n\x15GetJSONWebKeysRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"r\n\x03Jwk\x12\x0b\n\x03kty\x18\x01 \x01(\t\x12\x0b\n\x03\x61lg\x18\x02 \x01(\t\x12\x0b\n\x03use\x18\x03 \x01(\t\x12\x0b\n\x03kid\x18\x04 \x01(\t\x12\t\n\x01n\x18\x05 \x01(\t\x12\t\n\x01\x65\x18\x06 \x01(\t\x12\t\n\x01x\x18\x07 \x01(\t\x12\t\n\x01y\x18\x08 \x01(\t\x12\x0b\n\x03\x63rv\x18\t \x01(\t\"@\n\x16GetJSONWebKeysResponse\x12&\n\x04keys\x18\x01 \x03(\x0b\x32\x18.google.container.v1.Jwk\"2\n\"CheckAutopilotCompatibilityRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xfc\x02\n\x1b\x41utopilotCompatibilityIssue\x12\x34\n\x10last_observation\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onstraint_type\x18\x02 \x01(\t\x12X\n\x14incompatibility_type\x18\x03 \x01(\x0e\x32:.google.container.v1.AutopilotCompatibilityIssue.IssueType\x12\x10\n\x08subjects\x18\x04 \x03(\t\x12\x19\n\x11\x64ocumentation_url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"r\n\tIssueType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n\x1a\x41\x44\x44ITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"x\n#CheckAutopilotCompatibilityResponse\x12@\n\x06issues\x18\x01 \x03(\x0b\x32\x30.google.container.v1.AutopilotCompatibilityIssue\x12\x0f\n\x07summary\x18\x02 \x01(\t\"\x9c\x01\n\x0eReleaseChannel\x12<\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.google.container.v1.ReleaseChannel.Channel\"L\n\x07\x43hannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05RAPID\x10\x01\x12\x0b\n\x07REGULAR\x10\x02\x12\n\n\x06STABLE\x10\x03\x12\x0c\n\x08\x45XTENDED\x10\x04\"\'\n\x14\x43ostManagementConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\",\n\x19IntraNodeVisibilityConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"&\n\x13ILBSubsettingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xf7\x02\n\tDNSConfig\x12<\n\x0b\x63luster_dns\x18\x01 \x01(\x0e\x32\'.google.container.v1.DNSConfig.Provider\x12\x42\n\x11\x63luster_dns_scope\x18\x02 \x01(\x0e\x32\'.google.container.v1.DNSConfig.DNSScope\x12\x1a\n\x12\x63luster_dns_domain\x18\x03 \x01(\t\x12*\n\x1d\x61\x64\x64itive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n\x10PLATFORM_DEFAULT\x10\x01\x12\r\n\tCLOUD_DNS\x10\x02\x12\x0c\n\x08KUBE_DNS\x10\x03\"G\n\x08\x44NSScope\x12\x19\n\x15\x44NS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rCLUSTER_SCOPE\x10\x01\x12\r\n\tVPC_SCOPE\x10\x02\".\n\x11MaxPodsConstraint\x12\x19\n\x11max_pods_per_node\x18\x01 \x01(\x03\"/\n\x16WorkloadIdentityConfig\x12\x15\n\rworkload_pool\x18\x02 \x01(\t\"(\n\x15IdentityServiceConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"K\n\x10MeshCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"\xe3\x05\n\x12\x44\x61tabaseEncryption\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.container.v1.DatabaseEncryption.State\x12U\n\rcurrent_state\x18\x03 \x01(\x0e\x32\x34.google.container.v1.DatabaseEncryption.CurrentStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x63ryption_keys\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12Z\n\x15last_operation_errors\x18\x05 \x03(\x0b\x32\x36.google.container.v1.DatabaseEncryption.OperationErrorB\x03\xe0\x41\x03\x1ah\n\x0eOperationError\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"2\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tENCRYPTED\x10\x01\x12\r\n\tDECRYPTED\x10\x02\"\xfb\x01\n\x0c\x43urrentState\x12\x1d\n\x19\x43URRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43URRENT_STATE_ENCRYPTED\x10\x07\x12\x1b\n\x17\x43URRENT_STATE_DECRYPTED\x10\x02\x12$\n CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n\x1e\x43URRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n\x1e\x43URRENT_STATE_DECRYPTION_ERROR\x10\x06\x42\x10\n\x0e_current_state\"e\n\x1cListUsableSubnetworksRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"t\n\x1dListUsableSubnetworksResponse\x12:\n\x0bsubnetworks\x18\x01 \x03(\x0b\x32%.google.container.v1.UsableSubnetwork\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x80\x02\n\x1eUsableSubnetworkSecondaryRange\x12\x12\n\nrange_name\x18\x01 \x01(\t\x12\x15\n\rip_cidr_range\x18\x02 \x01(\t\x12J\n\x06status\x18\x03 \x01(\x0e\x32:.google.container.v1.UsableSubnetworkSecondaryRange.Status\"g\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x12\n\x0eIN_USE_SERVICE\x10\x02\x12\x18\n\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n\x12IN_USE_MANAGED_POD\x10\x04\"\xb8\x01\n\x10UsableSubnetwork\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12P\n\x13secondary_ip_ranges\x18\x04 \x03(\x0b\x32\x33.google.container.v1.UsableSubnetworkSecondaryRange\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\"\xed\x02\n\x19ResourceUsageExportConfig\x12`\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32\x42.google.container.v1.ResourceUsageExportConfig.BigQueryDestination\x12&\n\x1e\x65nable_network_egress_metering\x18\x02 \x01(\x08\x12m\n\x1b\x63onsumption_metering_config\x18\x03 \x01(\x0b\x32H.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig\x1a)\n\x13\x42igQueryDestination\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a,\n\x19\x43onsumptionMeteringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16VerticalPodAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x11\x44\x65\x66\x61ultSnatStatus\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\" \n\rShieldedNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nVirtualNIC\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nFastSocket\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xc1\x03\n\x12NotificationConfig\x12>\n\x06pubsub\x18\x01 \x01(\x0b\x32..google.container.v1.NotificationConfig.PubSub\x1a\x8a\x01\n\x06PubSub\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12>\n\x06\x66ilter\x18\x03 \x01(\x0b\x32..google.container.v1.NotificationConfig.Filter\x1aO\n\x06\x46ilter\x12\x45\n\nevent_type\x18\x01 \x03(\x0e\x32\x31.google.container.v1.NotificationConfig.EventType\"\x8c\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n\rUPGRADE_EVENT\x10\x02\x12\x1b\n\x17SECURITY_BULLETIN_EVENT\x10\x03\x12\x16\n\x12UPGRADE_INFO_EVENT\x10\x04\"\xf0\x01\n\x11\x43onfidentialNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x63\n\x1a\x63onfidential_instance_type\x18\x02 \x01(\x0e\x32?.google.container.v1.ConfidentialNodes.ConfidentialInstanceType\"e\n\x18\x43onfidentialInstanceType\x12*\n&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SEV\x10\x01\x12\x0b\n\x07SEV_SNP\x10\x02\x12\x07\n\x03TDX\x10\x03\"\xdf\x01\n\x0cUpgradeEvent\x12?\n\rresource_type\x18\x01 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x38\n\x14operation_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x10\n\x08resource\x18\x06 \x01(\t\"\xb2\x06\n\x10UpgradeInfoEvent\x12?\n\rresource_type\x18\x01 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x05 \x01(\t\x12\x16\n\x0etarget_version\x18\x06 \x01(\t\x12\x10\n\x08resource\x18\x07 \x01(\t\x12?\n\x05state\x18\x08 \x01(\x0e\x32+.google.container.v1.UpgradeInfoEvent.StateB\x03\xe0\x41\x03\x12\x42\n\x19standard_support_end_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x42\n\x19\x65xtended_support_end_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\x12\x43\n\nevent_type\x18\x0c \x01(\x0e\x32/.google.container.v1.UpgradeInfoEvent.EventType\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06\"t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45ND_OF_SUPPORT\x10\x01\x12 \n\x1c\x43OS_MILESTONE_VERSION_UPDATE\x10\x02\x12\x15\n\x11UPGRADE_LIFECYCLE\x10\x03\x42\x1c\n\x1a_standard_support_end_timeB\x1c\n\x1a_extended_support_end_time\"\xb9\x01\n\x15UpgradeAvailableEvent\x12\x0f\n\x07version\x18\x01 \x01(\t\x12?\n\rresource_type\x18\x02 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12<\n\x0frelease_channel\x18\x03 \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12\x10\n\x08resource\x18\x04 \x01(\t\"\xba\x02\n\x15SecurityBulletinEvent\x12\x1e\n\x16resource_type_affected\x18\x01 \x01(\t\x12\x13\n\x0b\x62ulletin_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ve_ids\x18\x03 \x03(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x14\n\x0c\x62ulletin_uri\x18\x05 \x01(\t\x12\x19\n\x11\x62rief_description\x18\x06 \x01(\t\x12!\n\x19\x61\x66\x66\x65\x63ted_supported_minors\x18\x07 \x03(\t\x12\x18\n\x10patched_versions\x18\x08 \x03(\t\x12 \n\x18suggested_upgrade_target\x18\t \x01(\t\x12\x1d\n\x15manual_steps_required\x18\n \x01(\x08\x12\x1a\n\x12mitigated_versions\x18\x0b \x03(\t\"g\n\tAutopilot\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12I\n\x16workload_policy_config\x18\x02 \x01(\x0b\x32).google.container.v1.WorkloadPolicyConfig\"\xac\x01\n\x14WorkloadPolicyConfig\x12\x1c\n\x0f\x61llow_net_admin\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x35\n(autopilot_compatibility_auditing_enabled\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_allow_net_adminB+\n)_autopilot_compatibility_auditing_enabled\"V\n\rLoggingConfig\x12\x45\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32+.google.container.v1.LoggingComponentConfig\"\x9e\x02\n\x16LoggingComponentConfig\x12P\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32\x35.google.container.v1.LoggingComponentConfig.Component\"\xb1\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tWORKLOADS\x10\x02\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0c\n\x08KCP_SSHD\x10\x07\x12\x12\n\x0eKCP_CONNECTION\x10\x08\x12\x0b\n\x07KCP_HPA\x10\t\"*\n\x17RayClusterLoggingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x97\x02\n\x10MonitoringConfig\x12H\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32..google.container.v1.MonitoringComponentConfig\x12O\n\x19managed_prometheus_config\x18\x02 \x01(\x0b\x32,.google.container.v1.ManagedPrometheusConfig\x12h\n&advanced_datapath_observability_config\x18\x03 \x01(\x0b\x32\x38.google.container.v1.AdvancedDatapathObservabilityConfig\"\x9e\x02\n#AdvancedDatapathObservabilityConfig\x12\x16\n\x0e\x65nable_metrics\x18\x01 \x01(\x08\x12V\n\nrelay_mode\x18\x02 \x01(\x0e\x32\x42.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode\x12\x19\n\x0c\x65nable_relay\x18\x03 \x01(\x08H\x00\x88\x01\x01\"[\n\tRelayMode\x12\x1a\n\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n\x0b\x45XTERNAL_LB\x10\x04\x42\x0f\n\r_enable_relay\"-\n\x1aRayClusterMonitoringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"Z\n\x15NodePoolLoggingConfig\x12\x41\n\x0evariant_config\x18\x01 \x01(\x0b\x32).google.container.v1.LoggingVariantConfig\"\x9f\x01\n\x14LoggingVariantConfig\x12\x42\n\x07variant\x18\x01 \x01(\x0e\x32\x31.google.container.v1.LoggingVariantConfig.Variant\"C\n\x07Variant\x12\x17\n\x13VARIANT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x12\n\x0eMAX_THROUGHPUT\x10\x02\"\xe6\x02\n\x19MonitoringComponentConfig\x12S\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32\x38.google.container.v1.MonitoringComponentConfig.Component\"\xf3\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0b\n\x07STORAGE\x10\x07\x12\x07\n\x03HPA\x10\x08\x12\x07\n\x03POD\x10\t\x12\r\n\tDAEMONSET\x10\n\x12\x0e\n\nDEPLOYMENT\x10\x0b\x12\x0f\n\x0bSTATEFULSET\x10\x0c\x12\x0c\n\x08\x43\x41\x44VISOR\x10\r\x12\x0b\n\x07KUBELET\x10\x0e\x12\x08\n\x04\x44\x43GM\x10\x0f\x12\n\n\x06JOBSET\x10\x10\"u\n\x17ManagedPrometheusConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12I\n\x16\x61uto_monitoring_config\x18\x02 \x01(\x0b\x32).google.container.v1.AutoMonitoringConfig\"\x89\x01\n\x14\x41utoMonitoringConfig\x12>\n\x05scope\x18\x01 \x01(\x0e\x32/.google.container.v1.AutoMonitoringConfig.Scope\"1\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x08\n\x04NONE\x10\x02\"\xb0\x01\n\x0ePodAutoscaling\x12H\n\x0bhpa_profile\x18\x02 \x01(\x0e\x32..google.container.v1.PodAutoscaling.HPAProfileH\x00\x88\x01\x01\"D\n\nHPAProfile\x12\x1b\n\x17HPA_PROFILE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0f\n\x0bPERFORMANCE\x10\x02\x42\x0e\n\x0c_hpa_profile\"N\n\x05\x46leet\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x17\n\nmembership\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0epre_registered\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\xac\x05\n\x1b\x43ontrolPlaneEndpointsConfig\x12_\n\x13\x64ns_endpoint_config\x18\x01 \x01(\x0b\x32\x42.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig\x12_\n\x13ip_endpoints_config\x18\x03 \x01(\x0b\x32\x42.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig\x1aj\n\x11\x44NSEndpointConfig\x12\x15\n\x08\x65ndpoint\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61llow_external_traffic\x18\x03 \x01(\x08H\x00\x88\x01\x01\x42\x19\n\x17_allow_external_traffic\x1a\xde\x02\n\x11IPEndpointsConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x65nable_public_endpoint\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\rglobal_access\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12W\n\x1a\x61uthorized_networks_config\x18\x04 \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfig\x12\x1c\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10private_endpoint\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1bprivate_endpoint_subnetwork\x18\x07 \x01(\tB\n\n\x08_enabledB\x19\n\x17_enable_public_endpointB\x10\n\x0e_global_access\"2\n\x17LocalNvmeSsdBlockConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"S\n\x1e\x45phemeralStorageLocalSsdConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\x12\x18\n\x10\x64\x61ta_cache_count\x18\x02 \x01(\x05\"\x84\x01\n\x13ResourceManagerTags\x12@\n\x04tags\x18\x01 \x03(\x0b\x32\x32.google.container.v1.ResourceManagerTags.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf4\x01\n\x10\x45nterpriseConfig\x12L\n\x0c\x63luster_tier\x18\x01 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTierB\x03\xe0\x41\x03\x12G\n\x0c\x64\x65sired_tier\x18\x02 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTier\"I\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\"7\n\x13SecretManagerConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_enabled\"\x9b\x01\n\x11SecondaryBootDisk\x12\x39\n\x04mode\x18\x01 \x01(\x0e\x32+.google.container.v1.SecondaryBootDisk.Mode\x12\x12\n\ndisk_image\x18\x02 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONTAINER_IMAGE_CACHE\x10\x01\"!\n\x1fSecondaryBootDiskUpdateStrategy\"D\n\x1e\x46\x65tchClusterUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\x95\x07\n\x12\x43lusterUpgradeInfo\x12!\n\x14minor_target_version\x18\x07 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x08 \x01(\tH\x01\x88\x01\x01\x12V\n\x13\x61uto_upgrade_status\x18\x02 \x03(\x0e\x32\x39.google.container.v1.ClusterUpgradeInfo.AutoUpgradeStatus\x12V\n\rpaused_reason\x18\x03 \x03(\x0e\x32?.google.container.v1.ClusterUpgradeInfo.AutoUpgradePausedReason\x12<\n\x0fupgrade_details\x18\x04 \x03(\x0b\x32#.google.container.v1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x05 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x06 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x04\x12\x12\n\x0eUPGRADE_PAUSED\x10\x05\"\x90\x02\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x05\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x06\x12\x1d\n\x19\x43LUSTER_DISRUPTION_BUDGET\x10\x04\x12+\n\'CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE\x10\x07\x12\x11\n\rSYSTEM_CONFIG\x10\x08\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp\"\xd7\x03\n\x0eUpgradeDetails\x12=\n\x05state\x18\x01 \x01(\x0e\x32).google.container.v1.UpgradeDetails.StateB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x17\n\x0finitial_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x41\n\nstart_type\x18\x06 \x01(\x0e\x32-.google.container.v1.UpgradeDetails.StartType\"J\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\"B\n\tStartType\x12\x1a\n\x16START_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\x42\r\n\x0b_start_timeB\x0b\n\t_end_time\"E\n\x1f\x46\x65tchNodePoolUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xcc\x06\n\x13NodePoolUpgradeInfo\x12!\n\x14minor_target_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12W\n\x13\x61uto_upgrade_status\x18\x03 \x03(\x0e\x32:.google.container.v1.NodePoolUpgradeInfo.AutoUpgradeStatus\x12W\n\rpaused_reason\x18\x04 \x03(\x0e\x32@.google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReason\x12<\n\x0fupgrade_details\x18\x05 \x03(\x0b\x32#.google.container.v1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x06 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x07 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x02\x12\x12\n\x0eUPGRADE_PAUSED\x10\x03\"\xc4\x01\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x02\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x03\x12\x11\n\rSYSTEM_CONFIG\x10\x04\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp*\xc6\x01\n\x17PrivateIPv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\'\n#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n\x13UpgradeResourceType\x12%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MASTER\x10\x01\x12\r\n\tNODE_POOL\x10\x02*a\n\x10\x44\x61tapathProvider\x12!\n\x1d\x44\x41TAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n\x11\x41\x44VANCED_DATAPATH\x10\x02*^\n\x16NodePoolUpdateStrategy\x12)\n%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nBLUE_GREEN\x10\x02\x12\t\n\x05SURGE\x10\x03*@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02*N\n\x0eIPv6AccessType\x12 \n\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02*\x9f\x01\n\x19InTransitEncryptionConfig\x12,\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x30\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x02\x32\xf9M\n\x0e\x43lusterManager\x12\xe8\x01\n\x0cListClusters\x12(.google.container.v1.ListClustersRequest\x1a).google.container.v1.ListClustersResponse\"\x82\x01\xda\x41\x0fproject_id,zone\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x61\x12,/v1/{parent=projects/*/locations/*}/clustersZ1\x12//v1/projects/{project_id}/zones/{zone}/clusters\x12\xed\x01\n\nGetCluster\x12&.google.container.v1.GetClusterRequest\x1a\x1c.google.container.v1.Cluster\"\x98\x01\xda\x41\x1aproject_id,zone,cluster_id\xda\x41\x04name\x82\xd3\xe4\x93\x02n\x12,/v1/{name=projects/*/locations/*/clusters/*}Z>\x12*/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels:\x01*ZP\"K/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels:\x01*\x12\xa5\x02\n\rSetLegacyAbac\x12).google.container.v1.SetLegacyAbacRequest\x1a\x1e.google.container.v1.Operation\"\xc8\x01\xda\x41\"project_id,zone,cluster_id,enabled\xda\x41\x0cname,enabled\x82\xd3\xe4\x93\x02\x8d\x01\":/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac:\x01*ZL\"G/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac:\x01*\x12\xa0\x02\n\x0fStartIPRotation\x12+.google.container.v1.StartIPRotationRequest\x1a\x1e.google.container.v1.Operation\"\xbf\x01\xda\x41\x1aproject_id,zone,cluster_id\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x01\".google.container.v1.LinuxNodeConfig.TransparentHugepageDefragB\x03\xe0\x41\x01\x1a\x7f\n\x0fHugepagesConfig\x12!\n\x0fhugepage_size2m\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0fhugepage_size1g\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x12\n\x10_hugepage_size2mB\x12\n\x10_hugepage_size1g\x1a.\n\x0cSysctlsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\nCgroupMode\x12\x1b\n\x17\x43GROUP_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43GROUP_MODE_V1\x10\x01\x12\x12\n\x0e\x43GROUP_MODE_V2\x10\x02\"\xc5\x01\n\x1aTransparentHugepageEnabled\x12,\n(TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED\x10\x00\x12\'\n#TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS\x10\x01\x12(\n$TRANSPARENT_HUGEPAGE_ENABLED_MADVISE\x10\x02\x12&\n\"TRANSPARENT_HUGEPAGE_ENABLED_NEVER\x10\x03\"\x9b\x02\n\x19TransparentHugepageDefrag\x12+\n\'TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED\x10\x00\x12&\n\"TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS\x10\x01\x12%\n!TRANSPARENT_HUGEPAGE_DEFRAG_DEFER\x10\x02\x12\x32\n.TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE\x10\x03\x12\'\n#TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE\x10\x04\x12%\n!TRANSPARENT_HUGEPAGE_DEFRAG_NEVER\x10\x05\x42\x0c\n\n_hugepages\"\xb4\x01\n\x11WindowsNodeConfig\x12\x44\n\nos_version\x18\x01 \x01(\x0e\x32\x30.google.container.v1.WindowsNodeConfig.OSVersion\"Y\n\tOSVersion\x12\x1a\n\x16OS_VERSION_UNSPECIFIED\x10\x00\x12\x17\n\x13OS_VERSION_LTSC2019\x10\x01\x12\x17\n\x13OS_VERSION_LTSC2022\x10\x02\"\x9a\x08\n\x11NodeKubeletConfig\x12\x1a\n\x12\x63pu_manager_policy\x18\x01 \x01(\t\x12\x43\n\x10topology_manager\x18\x08 \x01(\x0b\x32$.google.container.v1.TopologyManagerB\x03\xe0\x41\x01\x12?\n\x0ememory_manager\x18\t \x01(\x0b\x32\".google.container.v1.MemoryManagerB\x03\xe0\x41\x01\x12\x31\n\rcpu_cfs_quota\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x1c\n\x14\x63pu_cfs_quota_period\x18\x03 \x01(\t\x12\x16\n\x0epod_pids_limit\x18\x04 \x01(\x03\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12+\n\x1eimage_gc_low_threshold_percent\x18\n \x01(\x05\x42\x03\xe0\x41\x01\x12,\n\x1fimage_gc_high_threshold_percent\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01\x12!\n\x14image_minimum_gc_age\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12!\n\x14image_maximum_gc_age\x18\r \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x63ontainer_log_max_size\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12$\n\x17\x63ontainer_log_max_files\x18\x0f \x01(\x05\x42\x03\xe0\x41\x01\x12#\n\x16\x61llowed_unsafe_sysctls\x18\x10 \x03(\tB\x03\xe0\x41\x01\x12@\n\reviction_soft\x18\x11 \x01(\x0b\x32$.google.container.v1.EvictionSignalsB\x03\xe0\x41\x01\x12Q\n\x1a\x65viction_soft_grace_period\x18\x12 \x01(\x0b\x32(.google.container.v1.EvictionGracePeriodB\x03\xe0\x41\x01\x12R\n\x18\x65viction_minimum_reclaim\x18\x13 \x01(\x0b\x32+.google.container.v1.EvictionMinimumReclaimB\x03\xe0\x41\x01\x12\x32\n%eviction_max_pod_grace_period_seconds\x18\x14 \x01(\x05\x42\x03\xe0\x41\x01\x12%\n\x18max_parallel_image_pulls\x18\x15 \x01(\x05\x42\x03\xe0\x41\x01\x12)\n\x17single_process_oom_kill\x18\x16 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabledB\x1a\n\x18_single_process_oom_kill\"0\n\x0fTopologyManager\x12\x0e\n\x06policy\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"\x1f\n\rMemoryManager\x12\x0e\n\x06policy\x18\x01 \x01(\t\"\xce\x01\n\x0f\x45victionSignals\x12\x1d\n\x10memory_available\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10nodefs_available\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12nodefs_inodes_free\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11imagefs_available\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13imagefs_inodes_free\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rpid_available\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xd2\x01\n\x13\x45victionGracePeriod\x12\x1d\n\x10memory_available\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10nodefs_available\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12nodefs_inodes_free\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11imagefs_available\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13imagefs_inodes_free\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rpid_available\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xd5\x01\n\x16\x45victionMinimumReclaim\x12\x1d\n\x10memory_available\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10nodefs_available\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12nodefs_inodes_free\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11imagefs_available\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13imagefs_inodes_free\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rpid_available\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xd9\x16\n\nNodeConfig\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x05\x12\x14\n\x0coauth_scopes\x18\x03 \x03(\t\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12?\n\x08metadata\x18\x04 \x03(\x0b\x32-.google.container.v1.NodeConfig.MetadataEntry\x12\x12\n\nimage_type\x18\x05 \x01(\t\x12;\n\x06labels\x18\x06 \x03(\x0b\x32+.google.container.v1.NodeConfig.LabelsEntry\x12\x17\n\x0flocal_ssd_count\x18\x07 \x01(\x05\x12\x0c\n\x04tags\x18\x08 \x03(\t\x12\x13\n\x0bpreemptible\x18\n \x01(\x08\x12<\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32&.google.container.v1.AcceleratorConfig\x12\x11\n\tdisk_type\x18\x0c \x01(\t\x12\x18\n\x10min_cpu_platform\x18\r \x01(\t\x12M\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32+.google.container.v1.WorkloadMetadataConfig\x12.\n\x06taints\x18\x0f \x03(\x0b\x32\x1e.google.container.v1.NodeTaint\x12:\n\x0esandbox_config\x18\x11 \x01(\x0b\x32\".google.container.v1.SandboxConfig\x12\x12\n\nnode_group\x18\x12 \x01(\t\x12\x46\n\x14reservation_affinity\x18\x13 \x01(\x0b\x32(.google.container.v1.ReservationAffinity\x12M\n\x18shielded_instance_config\x18\x14 \x01(\x0b\x32+.google.container.v1.ShieldedInstanceConfig\x12?\n\x11linux_node_config\x18\x15 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12>\n\x0ekubelet_config\x18\x16 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\x17 \x01(\t\x12\x34\n\x0bgcfs_config\x18\x19 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12O\n\x19\x61\x64vanced_machine_features\x18\x1a \x01(\x0b\x32,.google.container.v1.AdvancedMachineFeatures\x12.\n\x05gvnic\x18\x1d \x01(\x0b\x32\x1f.google.container.v1.VirtualNIC\x12\x0c\n\x04spot\x18 \x01(\x08\x12\x42\n\x12\x63onfidential_nodes\x18# \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12\x39\n\x0b\x66\x61st_socket\x18$ \x01(\x0b\x32\x1f.google.container.v1.FastSocketH\x00\x88\x01\x01\x12L\n\x0fresource_labels\x18% \x03(\x0b\x32\x33.google.container.v1.NodeConfig.ResourceLabelsEntry\x12\x42\n\x0elogging_config\x18& \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12\x43\n\x13windows_node_config\x18\' \x01(\x0b\x32&.google.container.v1.WindowsNodeConfig\x12Q\n\x1blocal_nvme_ssd_block_config\x18( \x01(\x0b\x32,.google.container.v1.LocalNvmeSsdBlockConfig\x12_\n\"ephemeral_storage_local_ssd_config\x18) \x01(\x0b\x32\x33.google.container.v1.EphemeralStorageLocalSsdConfig\x12\x41\n\x12sole_tenant_config\x18* \x01(\x0b\x32%.google.container.v1.SoleTenantConfig\x12@\n\x11\x63ontainerd_config\x18+ \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12G\n\x15resource_manager_tags\x18- \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12(\n\x1b\x65nable_confidential_storage\x18. \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x14secondary_boot_disks\x18\x30 \x03(\x0b\x32&.google.container.v1.SecondaryBootDisk\x12\x15\n\rstorage_pools\x18\x31 \x03(\t\x12\x66\n#secondary_boot_disk_update_strategy\x18\x32 \x01(\x0b\x32\x34.google.container.v1.SecondaryBootDiskUpdateStrategyH\x01\x88\x01\x01\x12\x33\n\x10max_run_duration\x18\x35 \x01(\x0b\x32\x19.google.protobuf.Duration\x12^\n\x19local_ssd_encryption_mode\x18\x36 \x01(\x0e\x32\x36.google.container.v1.NodeConfig.LocalSsdEncryptionModeH\x02\x88\x01\x01\x12W\n\x15\x65\x66\x66\x65\x63tive_cgroup_mode\x18\x37 \x01(\x0e\x32\x33.google.container.v1.NodeConfig.EffectiveCgroupModeB\x03\xe0\x41\x03\x12\x17\n\nflex_start\x18\x38 \x01(\x08H\x03\x88\x01\x01\x12\x30\n\tboot_disk\x18\x39 \x01(\x0b\x32\x1d.google.container.v1.BootDisk\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x16LocalSsdEncryptionMode\x12)\n%LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_ENCRYPTION\x10\x01\x12\x1c\n\x18\x45PHEMERAL_KEY_ENCRYPTION\x10\x02\"x\n\x13\x45\x66\x66\x65\x63tiveCgroupMode\x12%\n!EFFECTIVE_CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V1\x10\x01\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V2\x10\x02\x42\x0e\n\x0c_fast_socketB&\n$_secondary_boot_disk_update_strategyB\x1c\n\x1a_local_ssd_encryption_modeB\r\n\x0b_flex_start\"\xa4\x03\n\x17\x41\x64vancedMachineFeatures\x12\x1d\n\x10threads_per_core\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12p\n\x1bperformance_monitoring_unit\x18\x03 \x01(\x0e\x32\x46.google.container.v1.AdvancedMachineFeatures.PerformanceMonitoringUnitH\x02\x88\x01\x01\"w\n\x19PerformanceMonitoringUnit\x12+\n\'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\x00\x12\x11\n\rARCHITECTURAL\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08\x45NHANCED\x10\x03\x42\x13\n\x11_threads_per_coreB\x1f\n\x1d_enable_nested_virtualizationB\x1e\n\x1c_performance_monitoring_unit\"\xcc\x06\n\x11NodeNetworkConfig\x12\x1d\n\x10\x63reate_pod_range\x18\x04 \x01(\x08\x42\x03\xe0\x41\x04\x12\x11\n\tpod_range\x18\x05 \x01(\t\x12\x1b\n\x13pod_ipv4_cidr_block\x18\x06 \x01(\t\x12!\n\x14\x65nable_private_nodes\x18\t \x01(\x08H\x00\x88\x01\x01\x12h\n\x1anetwork_performance_config\x18\x0b \x01(\x0b\x32?.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfigH\x01\x88\x01\x01\x12V\n\x1dpod_cidr_overprovision_config\x18\r \x01(\x0b\x32/.google.container.v1.PodCIDROverprovisionConfig\x12Y\n\x1f\x61\x64\x64itional_node_network_configs\x18\x0e \x03(\x0b\x32\x30.google.container.v1.AdditionalNodeNetworkConfig\x12W\n\x1e\x61\x64\x64itional_pod_network_configs\x18\x0f \x03(\x0b\x32/.google.container.v1.AdditionalPodNetworkConfig\x12\'\n\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01\x42\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x13 \x01(\tB\x03\xe0\x41\x03\x1a\xd4\x01\n\x18NetworkPerformanceConfig\x12n\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x44.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x17\n\x15_enable_private_nodesB\x1d\n\x1b_network_performance_config\"B\n\x1b\x41\x64\x64itionalNodeNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\"\xab\x01\n\x1a\x41\x64\x64itionalPodNetworkConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1b\n\x13secondary_pod_range\x18\x02 \x01(\t\x12\x46\n\x11max_pods_per_node\x18\x03 \x01(\x0b\x32&.google.container.v1.MaxPodsConstraintH\x00\x88\x01\x01\x42\x14\n\x12_max_pods_per_node\"Y\n\x16ShieldedInstanceConfig\x12\x1a\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x12#\n\x1b\x65nable_integrity_monitoring\x18\x02 \x01(\x08\"k\n\rSandboxConfig\x12\x35\n\x04type\x18\x02 \x01(\x0e\x32\'.google.container.v1.SandboxConfig.Type\"#\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06GVISOR\x10\x01\"\x1d\n\nGcfsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xdf\x01\n\x13ReservationAffinity\x12O\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32-.google.container.v1.ReservationAffinity.Type\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"Z\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\"\xc9\x02\n\x10SoleTenantConfig\x12K\n\x0fnode_affinities\x18\x01 \x03(\x0b\x32\x32.google.container.v1.SoleTenantConfig.NodeAffinity\x12\x1f\n\rmin_node_cpus\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\xb4\x01\n\x0cNodeAffinity\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x08operator\x18\x02 \x01(\x0e\x32;.google.container.v1.SoleTenantConfig.NodeAffinity.Operator\x12\x0e\n\x06values\x18\x03 \x03(\t\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x10\n\x0e_min_node_cpus\"\xfc\x04\n\x10\x43ontainerdConfig\x12i\n\x1eprivate_registry_access_config\x18\x01 \x01(\x0b\x32\x41.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig\x1a\xfc\x03\n\x1bPrivateRegistryAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x8f\x01\n#certificate_authority_domain_config\x18\x02 \x03(\x0b\x32\x62.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig\x1a\xb9\x02\n CertificateAuthorityDomainConfig\x12\r\n\x05\x66qdns\x18\x01 \x03(\t\x12\xb6\x01\n%gcp_secret_manager_certificate_config\x18\x02 \x01(\x0b\x32\x84\x01.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00\x1a\x37\n!GCPSecretManagerCertificateConfig\x12\x12\n\nsecret_uri\x18\x01 \x01(\tB\x14\n\x12\x63\x65rtificate_config\"\xb9\x01\n\tNodeTaint\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x35\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32%.google.container.v1.NodeTaint.Effect\"Y\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNO_SCHEDULE\x10\x01\x12\x16\n\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n\nNO_EXECUTE\x10\x03\"<\n\nNodeTaints\x12.\n\x06taints\x18\x01 \x03(\x0b\x32\x1e.google.container.v1.NodeTaint\"x\n\nNodeLabels\x12;\n\x06labels\x18\x01 \x03(\x0b\x32+.google.container.v1.NodeLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\x0eResourceLabels\x12?\n\x06labels\x18\x01 \x03(\x0b\x32/.google.container.v1.ResourceLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x0bNetworkTags\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\xe8\x01\n\nMasterAuth\x12\x14\n\x08username\x18\x01 \x01(\tB\x02\x18\x01\x12\x14\n\x08password\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x19\x63lient_certificate_config\x18\x03 \x01(\x0b\x32,.google.container.v1.ClientCertificateConfig\x12#\n\x16\x63luster_ca_certificate\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63lient_certificate\x18\x65 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nclient_key\x18\x66 \x01(\tB\x03\xe0\x41\x03\";\n\x17\x43lientCertificateConfig\x12 \n\x18issue_client_certificate\x18\x01 \x01(\x08\"\xfc\t\n\x0c\x41\x64\x64onsConfig\x12\x43\n\x13http_load_balancing\x18\x01 \x01(\x0b\x32&.google.container.v1.HttpLoadBalancing\x12Q\n\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\x0b\x32-.google.container.v1.HorizontalPodAutoscaling\x12J\n\x14kubernetes_dashboard\x18\x03 \x01(\x0b\x32(.google.container.v1.KubernetesDashboardB\x02\x18\x01\x12G\n\x15network_policy_config\x18\x04 \x01(\x0b\x32(.google.container.v1.NetworkPolicyConfig\x12=\n\x10\x63loud_run_config\x18\x07 \x01(\x0b\x32#.google.container.v1.CloudRunConfig\x12=\n\x10\x64ns_cache_config\x18\x08 \x01(\x0b\x32#.google.container.v1.DnsCacheConfig\x12K\n\x17\x63onfig_connector_config\x18\n \x01(\x0b\x32*.google.container.v1.ConfigConnectorConfig\x12\x64\n%gce_persistent_disk_csi_driver_config\x18\x0b \x01(\x0b\x32\x35.google.container.v1.GcePersistentDiskCsiDriverConfig\x12Y\n\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1.GcpFilestoreCsiDriverConfig\x12J\n\x17gke_backup_agent_config\x18\x10 \x01(\x0b\x32).google.container.v1.GkeBackupAgentConfig\x12O\n\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\x0b\x32+.google.container.v1.GcsFuseCsiDriverConfig\x12\x46\n\x12stateful_ha_config\x18\x12 \x01(\x0b\x32%.google.container.v1.StatefulHAConfigB\x03\xe0\x41\x01\x12Z\n\x1fparallelstore_csi_driver_config\x18\x13 \x01(\x0b\x32\x31.google.container.v1.ParallelstoreCsiDriverConfig\x12H\n\x13ray_operator_config\x18\x15 \x01(\x0b\x32&.google.container.v1.RayOperatorConfigB\x03\xe0\x41\x01\x12Z\n\x1fhigh_scale_checkpointing_config\x18\x16 \x01(\x0b\x32\x31.google.container.v1.HighScaleCheckpointingConfig\x12L\n\x18lustre_csi_driver_config\x18\x17 \x01(\x0b\x32*.google.container.v1.LustreCsiDriverConfig\"%\n\x11HttpLoadBalancing\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x18HorizontalPodAutoscaling\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13KubernetesDashboard\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13NetworkPolicyConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"!\n\x0e\x44nsCacheConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"9\n&PrivateClusterMasterGlobalAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe8\x02\n\x14PrivateClusterConfig\x12 \n\x14\x65nable_private_nodes\x18\x01 \x01(\x08\x42\x02\x18\x01\x12#\n\x17\x65nable_private_endpoint\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x1e\n\x16master_ipv4_cidr_block\x18\x03 \x01(\t\x12\x1f\n\x10private_endpoint\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x1e\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cpeering_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x1bmaster_global_access_config\x18\x08 \x01(\x0b\x32;.google.container.v1.PrivateClusterMasterGlobalAccessConfigB\x02\x18\x01\x12\'\n\x1bprivate_endpoint_subnetwork\x18\n \x01(\tB\x02\x18\x01\"D\n\x19\x41uthenticatorGroupsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0esecurity_group\x18\x02 \x01(\t\"\xee\x01\n\x0e\x43loudRunConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12P\n\x12load_balancer_type\x18\x03 \x01(\x0e\x32\x34.google.container.v1.CloudRunConfig.LoadBalancerType\"x\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"(\n\x15\x43onfigConnectorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"3\n GcePersistentDiskCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\".\n\x1bGcpFilestoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16GcsFuseCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cParallelstoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cHighScaleCheckpointingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"K\n\x15LustreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12!\n\x19\x65nable_legacy_lustre_port\x18\x03 \x01(\x08\"\xd8\x01\n\x11RayOperatorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12U\n\x1aray_cluster_logging_config\x18\x02 \x01(\x0b\x32,.google.container.v1.RayClusterLoggingConfigB\x03\xe0\x41\x01\x12[\n\x1dray_cluster_monitoring_config\x18\x03 \x01(\x0b\x32/.google.container.v1.RayClusterMonitoringConfigB\x03\xe0\x41\x01\"\'\n\x14GkeBackupAgentConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"#\n\x10StatefulHAConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xea\x02\n\x1eMasterAuthorizedNetworksConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12R\n\x0b\x63idr_blocks\x18\x02 \x03(\x0b\x32=.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock\x12,\n\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x31\n$private_endpoint_enforcement_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x1a\x35\n\tCidrBlock\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x12\n\ncidr_block\x18\x02 \x01(\tB\"\n _gcp_public_cidrs_access_enabledB\'\n%_private_endpoint_enforcement_enabled\"\x1d\n\nLegacyAbac\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x91\x01\n\rNetworkPolicy\x12=\n\x08provider\x18\x01 \x01(\x0e\x32+.google.container.v1.NetworkPolicy.Provider\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"0\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41LICO\x10\x01\"\xe3\x01\n\x13\x42inaryAuthorization\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12P\n\x0f\x65valuation_mode\x18\x02 \x01(\x0e\x32\x37.google.container.v1.BinaryAuthorization.EvaluationMode\"e\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12$\n PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\"-\n\x1aPodCIDROverprovisionConfig\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\"\xdf\x07\n\x12IPAllocationPolicy\x12\x16\n\x0euse_ip_aliases\x18\x01 \x01(\x08\x12\x19\n\x11\x63reate_subnetwork\x18\x02 \x01(\x08\x12\x17\n\x0fsubnetwork_name\x18\x03 \x01(\t\x12\x1d\n\x11\x63luster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01\x12\x1a\n\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01\x12\x1e\n\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01\x12$\n\x1c\x63luster_secondary_range_name\x18\x07 \x01(\t\x12%\n\x1dservices_secondary_range_name\x18\x08 \x01(\t\x12\x1f\n\x17\x63luster_ipv4_cidr_block\x18\t \x01(\t\x12\x1c\n\x14node_ipv4_cidr_block\x18\n \x01(\t\x12 \n\x18services_ipv4_cidr_block\x18\x0b \x01(\t\x12\x1f\n\x13tpu_ipv4_cidr_block\x18\r \x01(\tB\x02\x18\x01\x12\x12\n\nuse_routes\x18\x0f \x01(\x08\x12\x32\n\nstack_type\x18\x10 \x01(\x0e\x32\x1e.google.container.v1.StackType\x12=\n\x10ipv6_access_type\x18\x11 \x01(\x0e\x32#.google.container.v1.IPv6AccessType\x12V\n\x1dpod_cidr_overprovision_config\x18\x15 \x01(\x0b\x32/.google.container.v1.PodCIDROverprovisionConfig\x12#\n\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12Y\n\x1c\x61\x64\x64itional_pod_ranges_config\x18\x18 \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfigB\x03\xe0\x41\x03\x12/\n\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01\x42\x03\xe0\x41\x03\x12X\n\x1c\x61\x64\x64itional_ip_ranges_configs\x18\x1d \x03(\x0b\x32-.google.container.v1.AdditionalIPRangesConfigB\x03\xe0\x41\x03\x12\x42\n\x10\x61uto_ipam_config\x18\x1e \x01(\x0b\x32#.google.container.v1.AutoIpamConfigB\x03\xe0\x41\x01\"\xa7\"\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x12initial_node_count\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x38\n\x0bnode_config\x18\x04 \x01(\x0b\x32\x1f.google.container.v1.NodeConfigB\x02\x18\x01\x12\x34\n\x0bmaster_auth\x18\x05 \x01(\x0b\x32\x1f.google.container.v1.MasterAuth\x12\x17\n\x0flogging_service\x18\x06 \x01(\t\x12\x1a\n\x12monitoring_service\x18\x07 \x01(\t\x12\x0f\n\x07network\x18\x08 \x01(\t\x12\x19\n\x11\x63luster_ipv4_cidr\x18\t \x01(\t\x12\x38\n\raddons_config\x18\n \x01(\x0b\x32!.google.container.v1.AddonsConfig\x12\x12\n\nsubnetwork\x18\x0b \x01(\t\x12\x31\n\nnode_pools\x18\x0c \x03(\x0b\x32\x1d.google.container.v1.NodePool\x12\x11\n\tlocations\x18\r \x03(\t\x12\x1f\n\x17\x65nable_kubernetes_alpha\x18\x0e \x01(\x08\x12$\n\x1b\x61lpha_cluster_feature_gates\x18\xa0\x01 \x03(\t\x12I\n\x0fresource_labels\x18\x0f \x03(\x0b\x32\x30.google.container.v1.Cluster.ResourceLabelsEntry\x12\x19\n\x11label_fingerprint\x18\x10 \x01(\t\x12\x34\n\x0blegacy_abac\x18\x12 \x01(\x0b\x32\x1f.google.container.v1.LegacyAbac\x12:\n\x0enetwork_policy\x18\x13 \x01(\x0b\x32\".google.container.v1.NetworkPolicy\x12\x45\n\x14ip_allocation_policy\x18\x14 \x01(\x0b\x32\'.google.container.v1.IPAllocationPolicy\x12\x62\n!master_authorized_networks_config\x18\x16 \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12\x42\n\x12maintenance_policy\x18\x17 \x01(\x0b\x32&.google.container.v1.MaintenancePolicy\x12\x46\n\x14\x62inary_authorization\x18\x18 \x01(\x0b\x32(.google.container.v1.BinaryAuthorization\x12<\n\x0b\x61utoscaling\x18\x1a \x01(\x0b\x32\'.google.container.v1.ClusterAutoscaling\x12:\n\x0enetwork_config\x18\x1b \x01(\x0b\x32\".google.container.v1.NetworkConfig\x12K\n\x1b\x64\x65\x66\x61ult_max_pods_constraint\x18\x1e \x01(\x0b\x32&.google.container.v1.MaxPodsConstraint\x12T\n\x1cresource_usage_export_config\x18! \x01(\x0b\x32..google.container.v1.ResourceUsageExportConfig\x12S\n\x1b\x61uthenticator_groups_config\x18\" \x01(\x0b\x32..google.container.v1.AuthenticatorGroupsConfig\x12I\n\x16private_cluster_config\x18% \x01(\x0b\x32).google.container.v1.PrivateClusterConfig\x12\x44\n\x13\x64\x61tabase_encryption\x18& \x01(\x0b\x32\'.google.container.v1.DatabaseEncryption\x12M\n\x18vertical_pod_autoscaling\x18\' \x01(\x0b\x32+.google.container.v1.VerticalPodAutoscaling\x12:\n\x0eshielded_nodes\x18( \x01(\x0b\x32\".google.container.v1.ShieldedNodes\x12<\n\x0frelease_channel\x18) \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12M\n\x18workload_identity_config\x18+ \x01(\x0b\x32+.google.container.v1.WorkloadIdentityConfig\x12@\n\x11mesh_certificates\x18\x43 \x01(\x0b\x32%.google.container.v1.MeshCertificates\x12I\n\x16\x63ost_management_config\x18- \x01(\x0b\x32).google.container.v1.CostManagementConfig\x12\x44\n\x13notification_config\x18\x31 \x01(\x0b\x32\'.google.container.v1.NotificationConfig\x12\x42\n\x12\x63onfidential_nodes\x18\x32 \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12K\n\x17identity_service_config\x18\x36 \x01(\x0b\x32*.google.container.v1.IdentityServiceConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x65 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x15\n\x08\x65ndpoint\x18\x66 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17initial_cluster_version\x18g \x01(\t\x12#\n\x16\x63urrent_master_version\x18h \x01(\tB\x03\xe0\x41\x03\x12#\n\x14\x63urrent_node_version\x18i \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x63reate_time\x18j \x01(\tB\x03\xe0\x41\x03\x12\x38\n\x06status\x18k \x01(\x0e\x32#.google.container.v1.Cluster.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18l \x01(\tB\x05\x18\x01\xe0\x41\x03\x12 \n\x13node_ipv4_cidr_size\x18m \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0\x41\x03\x12\"\n\x13instance_group_urls\x18o \x03(\tB\x05\x18\x01\xe0\x41\x03\x12!\n\x12\x63urrent_node_count\x18p \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x65xpire_time\x18q \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18r \x01(\tB\x03\xe0\x41\x03\x12\x16\n\nenable_tpu\x18s \x01(\x08\x42\x02\x18\x01\x12\"\n\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x38\n\nconditions\x18v \x03(\x0b\x32$.google.container.v1.StatusCondition\x12\x32\n\tautopilot\x18\x80\x01 \x01(\x0b\x32\x1e.google.container.v1.Autopilot\x12\x10\n\x02id\x18\x81\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x12node_pool_defaults\x18\x83\x01 \x01(\x0b\x32%.google.container.v1.NodePoolDefaultsH\x00\x88\x01\x01\x12;\n\x0elogging_config\x18\x84\x01 \x01(\x0b\x32\".google.container.v1.LoggingConfig\x12\x41\n\x11monitoring_config\x18\x85\x01 \x01(\x0b\x32%.google.container.v1.MonitoringConfig\x12G\n\x15node_pool_auto_config\x18\x88\x01 \x01(\x0b\x32\'.google.container.v1.NodePoolAutoConfig\x12=\n\x0fpod_autoscaling\x18\x8a\x01 \x01(\x0b\x32#.google.container.v1.PodAutoscaling\x12\r\n\x04\x65tag\x18\x8b\x01 \x01(\t\x12*\n\x05\x66leet\x18\x8c\x01 \x01(\x0b\x32\x1a.google.container.v1.Fleet\x12L\n\x17security_posture_config\x18\x91\x01 \x01(\x0b\x32*.google.container.v1.SecurityPostureConfig\x12Y\n\x1e\x63ontrol_plane_endpoints_config\x18\x92\x01 \x01(\x0b\x32\x30.google.container.v1.ControlPlaneEndpointsConfig\x12\x44\n\x14\x65nable_k8s_beta_apis\x18\x8f\x01 \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12\x41\n\x11\x65nterprise_config\x18\x95\x01 \x01(\x0b\x32%.google.container.v1.EnterpriseConfig\x12H\n\x15secret_manager_config\x18\x96\x01 \x01(\x0b\x32(.google.container.v1.SecretManagerConfig\x12P\n\x19\x63ompliance_posture_config\x18\x97\x01 \x01(\x0b\x32,.google.container.v1.CompliancePostureConfig\x12 \n\rsatisfies_pzs\x18\x98\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12 \n\rsatisfies_pzi\x18\x99\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x18user_managed_keys_config\x18\x9a\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfigH\x03\x88\x01\x01\x12I\n\x13rbac_binding_config\x18\x9c\x01 \x01(\x0b\x32&.google.container.v1.RBACBindingConfigH\x04\x88\x01\x01\x12K\n\x17gke_auto_upgrade_config\x18\xa3\x01 \x01(\x0b\x32).google.container.v1.GkeAutoUpgradeConfig\x12\\\n\x1f\x61nonymous_authentication_config\x18\xa4\x01 \x01(\x0b\x32\x32.google.container.v1.AnonymousAuthenticationConfig\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"w\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0f\n\x0bRECONCILING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x44\x45GRADED\x10\x06\x42\x15\n\x13_node_pool_defaultsB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pziB\x1b\n\x19_user_managed_keys_configB\x16\n\x14_rbac_binding_config\"\xef\x01\n\x11RBACBindingConfig\x12;\n.enable_insecure_binding_system_unauthenticated\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n,enable_insecure_binding_system_authenticated\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x31\n/_enable_insecure_binding_system_unauthenticatedB/\n-_enable_insecure_binding_system_authenticated\"\xe9\x04\n\x15UserManagedKeysConfig\x12\x38\n\ncluster_ca\x18\n \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x39\n\x0b\x65tcd_api_ca\x18\x0b \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12:\n\x0c\x65tcd_peer_ca\x18\x0c \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12S\n\x1cservice_account_signing_keys\x18\r \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!service_account_verification_keys\x18\x0e \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12<\n\x0e\x61ggregation_ca\x18\x0f \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12X\n!control_plane_disk_encryption_key\x18\x10 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!gkeops_etcd_backup_encryption_key\x18\x11 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\x9e\x01\n\x1d\x41nonymousAuthenticationConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.container.v1.AnonymousAuthenticationConfig.Mode\"6\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0b\n\x07LIMITED\x10\x02\"\xba\x02\n\x17\x43ompliancePostureConfig\x12\x44\n\x04mode\x18\x01 \x01(\x0e\x32\x31.google.container.v1.CompliancePostureConfig.ModeH\x00\x88\x01\x01\x12]\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32?.google.container.v1.CompliancePostureConfig.ComplianceStandard\x1a\x38\n\x12\x43omplianceStandard\x12\x15\n\x08standard\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_standard\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\x07\n\x05_mode\"(\n\x10K8sBetaAPIConfig\x12\x14\n\x0c\x65nabled_apis\x18\x01 \x03(\t\"\xae\x03\n\x15SecurityPostureConfig\x12\x42\n\x04mode\x18\x01 \x01(\x0e\x32/.google.container.v1.SecurityPostureConfig.ModeH\x00\x88\x01\x01\x12]\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32<.google.container.v1.SecurityPostureConfig.VulnerabilityModeH\x01\x88\x01\x01\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\x42\x07\n\x05_modeB\x15\n\x13_vulnerability_mode\"\xa0\x02\n\x12NodePoolAutoConfig\x12\x36\n\x0cnetwork_tags\x18\x01 \x01(\x0b\x32 .google.container.v1.NetworkTags\x12G\n\x15resource_manager_tags\x18\x02 \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12\x43\n\x13node_kubelet_config\x18\x03 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x44\n\x11linux_node_config\x18\x04 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfigB\x03\xe0\x41\x03\"Y\n\x10NodePoolDefaults\x12\x45\n\x14node_config_defaults\x18\x01 \x01(\x0b\x32\'.google.container.v1.NodeConfigDefaults\"\x95\x02\n\x12NodeConfigDefaults\x12\x34\n\x0bgcfs_config\x18\x01 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12\x42\n\x0elogging_config\x18\x03 \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12@\n\x11\x63ontainerd_config\x18\x04 \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12\x43\n\x13node_kubelet_config\x18\x06 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\"\xbb,\n\rClusterUpdate\x12\x1c\n\x14\x64\x65sired_node_version\x18\x04 \x01(\t\x12\"\n\x1a\x64\x65sired_monitoring_service\x18\x05 \x01(\t\x12@\n\x15\x64\x65sired_addons_config\x18\x06 \x01(\x0b\x32!.google.container.v1.AddonsConfig\x12\x1c\n\x14\x64\x65sired_node_pool_id\x18\x07 \x01(\t\x12\x1a\n\x12\x64\x65sired_image_type\x18\x08 \x01(\t\x12L\n\x1b\x64\x65sired_database_encryption\x18. \x01(\x0b\x32\'.google.container.v1.DatabaseEncryption\x12U\n desired_workload_identity_config\x18/ \x01(\x0b\x32+.google.container.v1.WorkloadIdentityConfig\x12H\n\x19\x64\x65sired_mesh_certificates\x18\x43 \x01(\x0b\x32%.google.container.v1.MeshCertificates\x12\x42\n\x16\x64\x65sired_shielded_nodes\x18\x30 \x01(\x0b\x32\".google.container.v1.ShieldedNodes\x12Q\n\x1e\x64\x65sired_cost_management_config\x18\x31 \x01(\x0b\x32).google.container.v1.CostManagementConfig\x12:\n\x12\x64\x65sired_dns_config\x18\x35 \x01(\x0b\x32\x1e.google.container.v1.DNSConfig\x12O\n\x1d\x64\x65sired_node_pool_autoscaling\x18\t \x01(\x0b\x32(.google.container.v1.NodePoolAutoscaling\x12\x19\n\x11\x64\x65sired_locations\x18\n \x03(\t\x12j\n)desired_master_authorized_networks_config\x18\x0c \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12L\n\x1b\x64\x65sired_cluster_autoscaling\x18\x0f \x01(\x0b\x32\'.google.container.v1.ClusterAutoscaling\x12N\n\x1c\x64\x65sired_binary_authorization\x18\x10 \x01(\x0b\x32(.google.container.v1.BinaryAuthorization\x12\x1f\n\x17\x64\x65sired_logging_service\x18\x13 \x01(\t\x12\\\n$desired_resource_usage_export_config\x18\x15 \x01(\x0b\x32..google.container.v1.ResourceUsageExportConfig\x12U\n desired_vertical_pod_autoscaling\x18\x16 \x01(\x0b\x32+.google.container.v1.VerticalPodAutoscaling\x12U\n\x1e\x64\x65sired_private_cluster_config\x18\x19 \x01(\x0b\x32).google.container.v1.PrivateClusterConfigB\x02\x18\x01\x12\\\n$desired_intra_node_visibility_config\x18\x1a \x01(\x0b\x32..google.container.v1.IntraNodeVisibilityConfig\x12K\n\x1b\x64\x65sired_default_snat_status\x18\x1c \x01(\x0b\x32&.google.container.v1.DefaultSnatStatus\x12\x44\n\x17\x64\x65sired_release_channel\x18\x1f \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12Q\n\x1f\x64\x65sired_l4ilb_subsetting_config\x18\' \x01(\x0b\x32(.google.container.v1.ILBSubsettingConfig\x12H\n\x19\x64\x65sired_datapath_provider\x18\x32 \x01(\x0e\x32%.google.container.v1.DatapathProvider\x12X\n\"desired_private_ipv6_google_access\x18\x33 \x01(\x0e\x32,.google.container.v1.PrivateIPv6GoogleAccess\x12L\n\x1b\x64\x65sired_notification_config\x18\x37 \x01(\x0b\x32\'.google.container.v1.NotificationConfig\x12[\n#desired_authenticator_groups_config\x18? \x01(\x0b\x32..google.container.v1.AuthenticatorGroupsConfig\x12\x42\n\x16\x64\x65sired_logging_config\x18@ \x01(\x0b\x32\".google.container.v1.LoggingConfig\x12H\n\x19\x64\x65sired_monitoring_config\x18\x41 \x01(\x0b\x32%.google.container.v1.MonitoringConfig\x12S\n\x1f\x64\x65sired_identity_service_config\x18\x42 \x01(\x0b\x32*.google.container.v1.IdentityServiceConfig\x12Z\n#desired_service_external_ips_config\x18< \x01(\x0b\x32-.google.container.v1.ServiceExternalIPsConfig\x12\x30\n\x1f\x64\x65sired_enable_private_endpoint\x18G \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x31\n$desired_default_enable_private_nodes\x18H \x01(\x08H\x01\x88\x01\x01\x12`\n&desired_control_plane_endpoints_config\x18I \x01(\x0b\x32\x30.google.container.v1.ControlPlaneEndpointsConfig\x12\x1e\n\x16\x64\x65sired_master_version\x18\x64 \x01(\t\x12<\n\x13\x64\x65sired_gcfs_config\x18m \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12T\n*desired_node_pool_auto_config_network_tags\x18n \x01(\x0b\x32 .google.container.v1.NetworkTags\x12\x44\n\x17\x64\x65sired_pod_autoscaling\x18q \x01(\x0b\x32#.google.container.v1.PodAutoscaling\x12I\n\x1a\x64\x65sired_gateway_api_config\x18r \x01(\x0b\x32%.google.container.v1.GatewayAPIConfig\x12\x0c\n\x04\x65tag\x18s \x01(\t\x12T\n desired_node_pool_logging_config\x18t \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12\x31\n\rdesired_fleet\x18u \x01(\x0b\x32\x1a.google.container.v1.Fleet\x12:\n\x12\x64\x65sired_stack_type\x18w \x01(\x0e\x32\x1e.google.container.v1.StackType\x12T\n\x1c\x61\x64\x64itional_pod_ranges_config\x18x \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfig\x12\\\n$removed_additional_pod_ranges_config\x18y \x01(\x0b\x32..google.container.v1.AdditionalPodRangesConfig\x12\x43\n\x14\x65nable_k8s_beta_apis\x18z \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12S\n\x1f\x64\x65sired_security_posture_config\x18| \x01(\x0b\x32*.google.container.v1.SecurityPostureConfig\x12n\n\"desired_network_performance_config\x18} \x01(\x0b\x32\x42.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig\x12/\n\"desired_enable_fqdn_network_policy\x18~ \x01(\x08H\x02\x88\x01\x01\x12\\\n(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\x0b\x32).google.container.v1.WorkloadPolicyConfig\x12\x45\n\x15\x64\x65sired_k8s_beta_apis\x18\x83\x01 \x01(\x0b\x32%.google.container.v1.K8sBetaAPIConfig\x12I\n\x19\x64\x65sired_containerd_config\x18\x86\x01 \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12-\n\x1f\x64\x65sired_enable_multi_networking\x18\x87\x01 \x01(\x08H\x03\x88\x01\x01\x12\x66\n3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12\x62\n$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e\x32..google.container.v1.InTransitEncryptionConfigH\x04\x88\x01\x01\x12>\n0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\x08H\x05\x88\x01\x01\x12U\n\x1d\x64\x65sired_secret_manager_config\x18\x8b\x01 \x01(\x0b\x32(.google.container.v1.SecretManagerConfigH\x06\x88\x01\x01\x12]\n!desired_compliance_posture_config\x18\x8c\x01 \x01(\x0b\x32,.google.container.v1.CompliancePostureConfigH\x07\x88\x01\x01\x12L\n\x1b\x64\x65sired_node_kubelet_config\x18\x8d\x01 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12]\n,desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12Q\n\x18user_managed_keys_config\x18\x8f\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfigB\x02\x18\x01\x12Q\n\x1b\x64\x65sired_rbac_binding_config\x18\x90\x01 \x01(\x0b\x32&.google.container.v1.RBACBindingConfigH\x08\x88\x01\x01\x12\x62\n#desired_additional_ip_ranges_config\x18\x91\x01 \x01(\x0b\x32\x34.google.container.v1.DesiredAdditionalIPRangesConfig\x12P\n\x19\x64\x65sired_enterprise_config\x18\x93\x01 \x01(\x0b\x32,.google.container.v1.DesiredEnterpriseConfig\x12\x46\n\x18\x64\x65sired_auto_ipam_config\x18\x94\x01 \x01(\x0b\x32#.google.container.v1.AutoIpamConfig\x12;\n-desired_disable_l4_lb_firewall_reconciliation\x18\x95\x01 \x01(\x08H\t\x88\x01\x01\x12^\n/desired_node_pool_auto_config_linux_node_config\x18\x96\x01 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12U\n desired_user_managed_keys_config\x18\x98\x01 \x01(\x0b\x32*.google.container.v1.UserManagedKeysConfig\x12\x64\n\'desired_anonymous_authentication_config\x18\x9c\x01 \x01(\x0b\x32\x32.google.container.v1.AnonymousAuthenticationConfig\x12K\n\x17gke_auto_upgrade_config\x18\x9a\x01 \x01(\x0b\x32).google.container.v1.GkeAutoUpgradeConfigB\"\n _desired_enable_private_endpointB\'\n%_desired_default_enable_private_nodesB%\n#_desired_enable_fqdn_network_policyB\"\n _desired_enable_multi_networkingB\'\n%_desired_in_transit_encryption_configB3\n1_desired_enable_cilium_clusterwide_network_policyB \n\x1e_desired_secret_manager_configB$\n\"_desired_compliance_posture_configB\x1e\n\x1c_desired_rbac_binding_configB0\n._desired_disable_l4_lb_firewall_reconciliation\"q\n\x19\x41\x64\x64itionalPodRangesConfig\x12\x17\n\x0fpod_range_names\x18\x01 \x03(\t\x12;\n\x0epod_range_info\x18\x02 \x03(\x0b\x32\x1e.google.container.v1.RangeInfoB\x03\xe0\x41\x03\"L\n\x18\x41\x64\x64itionalIPRangesConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1c\n\x14pod_ipv4_range_names\x18\x02 \x03(\t\"v\n\x1f\x44\x65siredAdditionalIPRangesConfig\x12S\n\x1c\x61\x64\x64itional_ip_ranges_configs\x18\x01 \x03(\x0b\x32-.google.container.v1.AdditionalIPRangesConfig\"\x10\n\x0e\x41utoIpamConfig\">\n\tRangeInfo\x12\x17\n\nrange_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0butilization\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"b\n\x17\x44\x65siredEnterpriseConfig\x12G\n\x0c\x64\x65sired_tier\x18\x01 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTier\"\xe4\x08\n\tOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12@\n\x0eoperation_type\x18\x03 \x01(\x0e\x32#.google.container.v1.Operation.TypeB\x03\xe0\x41\x03\x12:\n\x06status\x18\x04 \x01(\x0e\x32%.google.container.v1.Operation.StatusB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x16\n\tself_link\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0btarget_link\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nstart_time\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_time\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12=\n\x08progress\x18\x0c \x01(\x0b\x32&.google.container.v1.OperationProgressB\x03\xe0\x41\x03\x12\x44\n\x12\x63luster_conditions\x18\r \x03(\x0b\x32$.google.container.v1.StatusConditionB\x02\x18\x01\x12\x45\n\x13nodepool_conditions\x18\x0e \x03(\x0b\x32$.google.container.v1.StatusConditionB\x02\x18\x01\x12!\n\x05\x65rror\x18\x0f \x01(\x0b\x32\x12.google.rpc.Status\"R\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x41\x42ORTING\x10\x04\"\xc0\x03\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43REATE_CLUSTER\x10\x01\x12\x12\n\x0e\x44\x45LETE_CLUSTER\x10\x02\x12\x12\n\x0eUPGRADE_MASTER\x10\x03\x12\x11\n\rUPGRADE_NODES\x10\x04\x12\x12\n\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n\x10\x43REATE_NODE_POOL\x10\x07\x12\x14\n\x10\x44\x45LETE_NODE_POOL\x10\x08\x12\x1c\n\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n\x11\x41UTO_REPAIR_NODES\x10\n\x12\x1a\n\x12\x41UTO_UPGRADE_NODES\x10\x0b\x1a\x02\x08\x01\x12\x12\n\nSET_LABELS\x10\x0c\x1a\x02\x08\x01\x12\x17\n\x0fSET_MASTER_AUTH\x10\r\x1a\x02\x08\x01\x12\x16\n\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\x08\x01\x12\x1e\n\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\x08\x01\x12\x12\n\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n\x15\x46LEET_FEATURE_UPGRADE\x10\x13\"\xbb\x02\n\x11OperationProgress\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x06status\x18\x02 \x01(\x0e\x32%.google.container.v1.Operation.Status\x12>\n\x07metrics\x18\x03 \x03(\x0b\x32-.google.container.v1.OperationProgress.Metric\x12\x36\n\x06stages\x18\x04 \x03(\x0b\x32&.google.container.v1.OperationProgress\x1ai\n\x06Metric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\tint_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\x42\x07\n\x05value\"\x84\x01\n\x14\x43reateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x32\n\x07\x63luster\x18\x03 \x01(\x0b\x32\x1c.google.container.v1.ClusterB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"c\n\x11GetClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x9f\x01\n\x14UpdateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x37\n\x06update\x18\x04 \x01(\x0b\x32\".google.container.v1.ClusterUpdateB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xf9\x0c\n\x15UpdateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x19\n\x0cnode_version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nimage_type\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x11\n\tlocations\x18\r \x03(\t\x12M\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32+.google.container.v1.WorkloadMetadataConfig\x12G\n\x10upgrade_settings\x18\x0f \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12.\n\x04tags\x18\x10 \x01(\x0b\x32 .google.container.v1.NetworkTags\x12/\n\x06taints\x18\x11 \x01(\x0b\x32\x1f.google.container.v1.NodeTaints\x12/\n\x06labels\x18\x12 \x01(\x0b\x32\x1f.google.container.v1.NodeLabels\x12?\n\x11linux_node_config\x18\x13 \x01(\x0b\x32$.google.container.v1.LinuxNodeConfig\x12>\n\x0ekubelet_config\x18\x14 \x01(\x0b\x32&.google.container.v1.NodeKubeletConfig\x12\x43\n\x13node_network_config\x18\x15 \x01(\x0b\x32&.google.container.v1.NodeNetworkConfig\x12\x34\n\x0bgcfs_config\x18\x16 \x01(\x0b\x32\x1f.google.container.v1.GcfsConfig\x12\x42\n\x12\x63onfidential_nodes\x18\x17 \x01(\x0b\x32&.google.container.v1.ConfidentialNodes\x12.\n\x05gvnic\x18\x1d \x01(\x0b\x32\x1f.google.container.v1.VirtualNIC\x12\x0c\n\x04\x65tag\x18\x1e \x01(\t\x12\x34\n\x0b\x66\x61st_socket\x18\x1f \x01(\x0b\x32\x1f.google.container.v1.FastSocket\x12\x42\n\x0elogging_config\x18 \x01(\x0b\x32*.google.container.v1.NodePoolLoggingConfig\x12<\n\x0fresource_labels\x18! \x01(\x0b\x32#.google.container.v1.ResourceLabels\x12\x43\n\x13windows_node_config\x18\" \x01(\x0b\x32&.google.container.v1.WindowsNodeConfig\x12<\n\x0c\x61\x63\x63\x65lerators\x18# \x03(\x0b\x32&.google.container.v1.AcceleratorConfig\x12\x19\n\x0cmachine_type\x18$ \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18% \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isk_size_gb\x18& \x01(\x03\x42\x03\xe0\x41\x01\x12G\n\x15resource_manager_tags\x18\' \x01(\x0b\x32(.google.container.v1.ResourceManagerTags\x12@\n\x11\x63ontainerd_config\x18( \x01(\x0b\x32%.google.container.v1.ContainerdConfig\x12M\n\x13queued_provisioning\x18* \x01(\x0b\x32\x30.google.container.v1.NodePool.QueuedProvisioning\x12\x15\n\rstorage_pools\x18+ \x03(\t\x12\x33\n\x10max_run_duration\x18- \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\nflex_start\x18. \x01(\x08H\x00\x88\x01\x01\x12\x30\n\tboot_disk\x18/ \x01(\x0b\x32\x1d.google.container.v1.BootDiskB\r\n\x0b_flex_start\"\xcd\x01\n\x1dSetNodePoolAutoscalingRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x42\n\x0b\x61utoscaling\x18\x05 \x01(\x0b\x32(.google.container.v1.NodePoolAutoscalingB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x88\x01\n\x18SetLoggingServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1c\n\x0flogging_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x8e\x01\n\x1bSetMonitoringServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xa7\x01\n\x16SetAddonsConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12=\n\raddons_config\x18\x04 \x01(\x0b\x32!.google.container.v1.AddonsConfigB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"}\n\x13SetLocationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\tlocations\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x82\x01\n\x13UpdateMasterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1b\n\x0emaster_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xb5\x02\n\x14SetMasterAuthRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x45\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x30.google.container.v1.SetMasterAuthRequest.ActionB\x03\xe0\x41\x02\x12\x34\n\x06update\x18\x05 \x01(\x0b\x32\x1f.google.container.v1.MasterAuthB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"P\n\x06\x41\x63tion\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cSET_PASSWORD\x10\x01\x12\x15\n\x11GENERATE_PASSWORD\x10\x02\x12\x10\n\x0cSET_USERNAME\x10\x03\"f\n\x14\x44\x65leteClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"O\n\x13ListClustersRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"]\n\x14ListClustersResponse\x12.\n\x08\x63lusters\x18\x01 \x03(\x0b\x32\x1c.google.container.v1.Cluster\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"g\n\x13GetOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"Q\n\x15ListOperationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"j\n\x16\x43\x61ncelOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"c\n\x16ListOperationsResponse\x12\x32\n\noperations\x18\x01 \x03(\x0b\x32\x1e.google.container.v1.Operation\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"P\n\x16GetServerConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"\x94\x03\n\x0cServerConfig\x12\x1f\n\x17\x64\x65\x66\x61ult_cluster_version\x18\x01 \x01(\t\x12\x1b\n\x13valid_node_versions\x18\x03 \x03(\t\x12\x1a\n\x12\x64\x65\x66\x61ult_image_type\x18\x04 \x01(\t\x12\x19\n\x11valid_image_types\x18\x05 \x03(\t\x12\x1d\n\x15valid_master_versions\x18\x06 \x03(\t\x12H\n\x08\x63hannels\x18\t \x03(\x0b\x32\x36.google.container.v1.ServerConfig.ReleaseChannelConfig\x1a\xa5\x01\n\x14ReleaseChannelConfig\x12<\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.google.container.v1.ReleaseChannel.Channel\x12\x17\n\x0f\x64\x65\x66\x61ult_version\x18\x02 \x01(\t\x12\x16\n\x0evalid_versions\x18\x04 \x03(\t\x12\x1e\n\x16upgrade_target_version\x18\x05 \x01(\t\"\xa0\x01\n\x15\x43reateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x35\n\tnode_pool\x18\x04 \x01(\x0b\x32\x1d.google.container.v1.NodePoolB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x06 \x01(\t\"\x81\x01\n\x15\x44\x65leteNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"h\n\x14ListNodePoolsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x05 \x01(\t\"~\n\x12GetNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x9f\x03\n\x11\x42lueGreenSettings\x12_\n\x17standard_rollout_policy\x18\x01 \x01(\x0b\x32<.google.container.v1.BlueGreenSettings.StandardRolloutPolicyH\x00\x12?\n\x17node_pool_soak_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x1a\xb9\x01\n\x15StandardRolloutPolicy\x12\x1a\n\x10\x62\x61tch_percentage\x18\x01 \x01(\x02H\x00\x12\x1a\n\x10\x62\x61tch_node_count\x18\x02 \x01(\x05H\x00\x12;\n\x13\x62\x61tch_soak_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\x13\n\x11update_batch_sizeB\x16\n\x14_batch_soak_durationB\x10\n\x0erollout_policyB\x1a\n\x18_node_pool_soak_duration\"\xd1\x10\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x1f.google.container.v1.NodeConfig\x12\x1a\n\x12initial_node_count\x18\x03 \x01(\x05\x12\x11\n\tlocations\x18\r \x03(\t\x12>\n\x0enetwork_config\x18\x0e \x01(\x0b\x32&.google.container.v1.NodeNetworkConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x65 \x01(\t\x12 \n\x13instance_group_urls\x18\x66 \x03(\tB\x03\xe0\x41\x03\x12\x39\n\x06status\x18g \x01(\x0e\x32$.google.container.v1.NodePool.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18h \x01(\tB\x05\x18\x01\xe0\x41\x03\x12=\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32(.google.container.v1.NodePoolAutoscaling\x12\x37\n\nmanagement\x18\x05 \x01(\x0b\x32#.google.container.v1.NodeManagement\x12\x43\n\x13max_pods_constraint\x18\x06 \x01(\x0b\x32&.google.container.v1.MaxPodsConstraint\x12\x38\n\nconditions\x18i \x03(\x0b\x32$.google.container.v1.StatusCondition\x12\x1f\n\x12pod_ipv4_cidr_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12G\n\x10upgrade_settings\x18k \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12G\n\x10placement_policy\x18l \x01(\x0b\x32-.google.container.v1.NodePool.PlacementPolicy\x12\x42\n\x0bupdate_info\x18m \x01(\x0b\x32(.google.container.v1.NodePool.UpdateInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18n \x01(\t\x12M\n\x13queued_provisioning\x18p \x01(\x0b\x32\x30.google.container.v1.NodePool.QueuedProvisioning\x12M\n\x18\x62\x65st_effort_provisioning\x18q \x01(\x0b\x32+.google.container.v1.BestEffortProvisioning\x1a\xf0\x01\n\x0fUpgradeSettings\x12\x11\n\tmax_surge\x18\x01 \x01(\x05\x12\x17\n\x0fmax_unavailable\x18\x02 \x01(\x05\x12\x42\n\x08strategy\x18\x03 \x01(\x0e\x32+.google.container.v1.NodePoolUpdateStrategyH\x00\x88\x01\x01\x12H\n\x13\x62lue_green_settings\x18\x04 \x01(\x0b\x32&.google.container.v1.BlueGreenSettingsH\x01\x88\x01\x01\x42\x0b\n\t_strategyB\x16\n\x14_blue_green_settings\x1a\x88\x04\n\nUpdateInfo\x12O\n\x0f\x62lue_green_info\x18\x01 \x01(\x0b\x32\x36.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo\x1a\xa8\x03\n\rBlueGreenInfo\x12K\n\x05phase\x18\x01 \x01(\x0e\x32<.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase\x12 \n\x18\x62lue_instance_group_urls\x18\x02 \x03(\t\x12!\n\x19green_instance_group_urls\x18\x03 \x03(\t\x12%\n\x1d\x62lue_pool_deletion_start_time\x18\x04 \x01(\t\x12\x1a\n\x12green_pool_version\x18\x05 \x01(\t\"\xc1\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUPDATE_STARTED\x10\x01\x12\x17\n\x13\x43REATING_GREEN_POOL\x10\x02\x12\x17\n\x13\x43ORDONING_BLUE_POOL\x10\x03\x12\x16\n\x12\x44RAINING_BLUE_POOL\x10\x04\x12\x15\n\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n\x12\x44\x45LETING_BLUE_POOL\x10\x06\x12\x14\n\x10ROLLBACK_STARTED\x10\x07\x1a\xae\x01\n\x0fPlacementPolicy\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.container.v1.NodePool.PlacementPolicy.Type\x12\x19\n\x0ctpu_topology\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x0bpolicy_name\x18\x03 \x01(\t\")\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMPACT\x10\x01\x1a%\n\x12QueuedProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x16\n\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n\x0bRECONCILING\x10\x04\x12\x0c\n\x08STOPPING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\"}\n\x0eNodeManagement\x12\x14\n\x0c\x61uto_upgrade\x18\x01 \x01(\x08\x12\x13\n\x0b\x61uto_repair\x18\x02 \x01(\x08\x12@\n\x0fupgrade_options\x18\n \x01(\x0b\x32\'.google.container.v1.AutoUpgradeOptions\"F\n\x16\x42\x65stEffortProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x13min_provision_nodes\x18\x02 \x01(\x05\"T\n\x12\x41utoUpgradeOptions\x12$\n\x17\x61uto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"e\n\x11MaintenancePolicy\x12\x36\n\x06window\x18\x01 \x01(\x0b\x32&.google.container.v1.MaintenanceWindow\x12\x18\n\x10resource_version\x18\x03 \x01(\t\"\xf6\x02\n\x11MaintenanceWindow\x12O\n\x18\x64\x61ily_maintenance_window\x18\x02 \x01(\x0b\x32+.google.container.v1.DailyMaintenanceWindowH\x00\x12\x44\n\x10recurring_window\x18\x03 \x01(\x0b\x32(.google.container.v1.RecurringTimeWindowH\x00\x12\x61\n\x16maintenance_exclusions\x18\x04 \x03(\x0b\x32\x41.google.container.v1.MaintenanceWindow.MaintenanceExclusionsEntry\x1a]\n\x1aMaintenanceExclusionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.google.container.v1.TimeWindow:\x02\x38\x01\x42\x08\n\x06policy\"\xd0\x01\n\nTimeWindow\x12Y\n\x1dmaintenance_exclusion_options\x18\x03 \x01(\x0b\x32\x30.google.container.v1.MaintenanceExclusionOptionsH\x00\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07options\"\xb4\x01\n\x1bMaintenanceExclusionOptions\x12\x45\n\x05scope\x18\x01 \x01(\x0e\x32\x36.google.container.v1.MaintenanceExclusionOptions.Scope\"N\n\x05Scope\x12\x0f\n\x0bNO_UPGRADES\x10\x00\x12\x15\n\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"Z\n\x13RecurringTimeWindow\x12/\n\x06window\x18\x01 \x01(\x0b\x32\x1f.google.container.v1.TimeWindow\x12\x12\n\nrecurrence\x18\x02 \x01(\t\"C\n\x16\x44\x61ilyMaintenanceWindow\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x15\n\x08\x64uration\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x1cSetNodePoolManagementRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\nmanagement\x18\x05 \x01(\x0b\x32#.google.container.v1.NodeManagementB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\x9b\x01\n\x16SetNodePoolSizeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x17\n\nnode_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\".\n\x1e\x43ompleteNodePoolUpgradeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9f\x01\n\x1eRollbackNodePoolUpgradeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0brespect_pdb\x18\x07 \x01(\x08\"J\n\x15ListNodePoolsResponse\x12\x31\n\nnode_pools\x18\x01 \x03(\x0b\x32\x1d.google.container.v1.NodePool\"\x85\x04\n\x12\x43lusterAutoscaling\x12$\n\x1c\x65nable_node_autoprovisioning\x18\x01 \x01(\x08\x12;\n\x0fresource_limits\x18\x02 \x03(\x0b\x32\".google.container.v1.ResourceLimit\x12W\n\x13\x61utoscaling_profile\x18\x03 \x01(\x0e\x32:.google.container.v1.ClusterAutoscaling.AutoscalingProfile\x12\x62\n#autoprovisioning_node_pool_defaults\x18\x04 \x01(\x0b\x32\x35.google.container.v1.AutoprovisioningNodePoolDefaults\x12\"\n\x1a\x61utoprovisioning_locations\x18\x05 \x03(\t\x12T\n\x1c\x64\x65\x66\x61ult_compute_class_config\x18\t \x01(\x0b\x32..google.container.v1.DefaultComputeClassConfig\"U\n\x12\x41utoscalingProfile\x12\x17\n\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n\x14OPTIMIZE_UTILIZATION\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\"\xf8\x03\n AutoprovisioningNodePoolDefaults\x12\x14\n\x0coauth_scopes\x18\x01 \x03(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12G\n\x10upgrade_settings\x18\x03 \x01(\x0b\x32-.google.container.v1.NodePool.UpgradeSettings\x12\x37\n\nmanagement\x18\x04 \x01(\x0b\x32#.google.container.v1.NodeManagement\x12\x1c\n\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x05\x12\x11\n\tdisk_type\x18\x07 \x01(\t\x12M\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32+.google.container.v1.ShieldedInstanceConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\t \x01(\t\x12\x12\n\nimage_type\x18\n \x01(\t\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\r \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"H\n\rResourceLimit\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x0f\n\x07minimum\x18\x02 \x01(\x03\x12\x0f\n\x07maximum\x18\x03 \x01(\x03\",\n\x19\x44\x65\x66\x61ultComputeClassConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xc7\x02\n\x13NodePoolAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\x12\x17\n\x0f\x61utoprovisioned\x18\x04 \x01(\x08\x12P\n\x0flocation_policy\x18\x05 \x01(\x0e\x32\x37.google.container.v1.NodePoolAutoscaling.LocationPolicy\x12\x1c\n\x14total_min_node_count\x18\x06 \x01(\x05\x12\x1c\n\x14total_max_node_count\x18\x07 \x01(\x05\"H\n\x0eLocationPolicy\x12\x1f\n\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"\x92\x02\n\x10SetLabelsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12W\n\x0fresource_labels\x18\x04 \x03(\x0b\x32\x39.google.container.v1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0\x41\x02\x12\x1e\n\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x14SetLegacyAbacRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x84\x01\n\x16StartIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x1a\n\x12rotate_credentials\x18\x07 \x01(\x08\"k\n\x19\x43ompleteIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xc5\x02\n\x11\x41\x63\x63\x65leratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x12\x46\n\x12gpu_sharing_config\x18\x05 \x01(\x0b\x32%.google.container.v1.GPUSharingConfigH\x00\x88\x01\x01\x12]\n\x1egpu_driver_installation_config\x18\x06 \x01(\x0b\x32\x30.google.container.v1.GPUDriverInstallationConfigH\x01\x88\x01\x01\x42\x15\n\x13_gpu_sharing_configB!\n\x1f_gpu_driver_installation_config\"\x83\x02\n\x10GPUSharingConfig\x12\"\n\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03\x12[\n\x14gpu_sharing_strategy\x18\x02 \x01(\x0e\x32\x38.google.container.v1.GPUSharingConfig.GPUSharingStrategyH\x00\x88\x01\x01\"U\n\x12GPUSharingStrategy\x12$\n GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n\x0cTIME_SHARING\x10\x01\x12\x07\n\x03MPS\x10\x02\x42\x17\n\x15_gpu_sharing_strategy\"\x84\x02\n\x1bGPUDriverInstallationConfig\x12\x62\n\x12gpu_driver_version\x18\x01 \x01(\x0e\x32\x41.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersionH\x00\x88\x01\x01\"j\n\x10GPUDriverVersion\x12\"\n\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n\x15INSTALLATION_DISABLED\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\n\n\x06LATEST\x10\x03\x42\x15\n\x13_gpu_driver_version\"\x9a\x01\n\x16WorkloadMetadataConfig\x12>\n\x04mode\x18\x02 \x01(\x0e\x32\x30.google.container.v1.WorkloadMetadataConfig.Mode\"@\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCE_METADATA\x10\x01\x12\x10\n\x0cGKE_METADATA\x10\x02\"\xaa\x01\n\x17SetNetworkPolicyRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12?\n\x0enetwork_policy\x18\x04 \x01(\x0b\x32\".google.container.v1.NetworkPolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xb9\x01\n\x1bSetMaintenancePolicyRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x12maintenance_policy\x18\x04 \x01(\x0b\x32&.google.container.v1.MaintenancePolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xf4\x02\n\x0fStatusCondition\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32).google.container.v1.StatusCondition.CodeB\x02\x18\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12(\n\x0e\x63\x61nonical_code\x18\x03 \x01(\x0e\x32\x10.google.rpc.Code\"\xe8\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cGCE_STOCKOUT\x10\x01\x12\x1f\n\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n\x13\x43LOUD_KMS_KEY_ERROR\x10\x07\x12\x0f\n\x0b\x43\x41_EXPIRING\x10\t\x12,\n(NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS\x10\n\x12\x1b\n\x17\x43LOUD_KMS_KEY_DESTROYED\x10\x0b\"\xe5\n\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x1c\x65nable_intra_node_visibility\x18\x05 \x01(\x08\x12\x43\n\x13\x64\x65\x66\x61ult_snat_status\x18\x07 \x01(\x0b\x32&.google.container.v1.DefaultSnatStatus\x12\x1f\n\x17\x65nable_l4ilb_subsetting\x18\n \x01(\x08\x12@\n\x11\x64\x61tapath_provider\x18\x0b \x01(\x0e\x32%.google.container.v1.DatapathProvider\x12P\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32,.google.container.v1.PrivateIPv6GoogleAccess\x12\x32\n\ndns_config\x18\r \x01(\x0b\x32\x1e.google.container.v1.DNSConfig\x12R\n\x1bservice_external_ips_config\x18\x0f \x01(\x0b\x32-.google.container.v1.ServiceExternalIPsConfig\x12\x41\n\x12gateway_api_config\x18\x10 \x01(\x0b\x32%.google.container.v1.GatewayAPIConfig\x12\x1f\n\x17\x65nable_multi_networking\x18\x11 \x01(\x08\x12\x66\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x42.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig\x12\'\n\x1a\x65nable_fqdn_network_policy\x18\x13 \x01(\x08H\x00\x88\x01\x01\x12Y\n\x1cin_transit_encryption_config\x18\x14 \x01(\x0e\x32..google.container.v1.InTransitEncryptionConfigH\x01\x88\x01\x01\x12\x35\n(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\x08H\x02\x88\x01\x01\x12)\n\x1c\x64\x65\x66\x61ult_enable_private_nodes\x18\x16 \x01(\x08H\x03\x88\x01\x01\x12\x32\n%disable_l4_lb_firewall_reconciliation\x18\x18 \x01(\x08H\x04\x88\x01\x01\x1a\xde\x01\n\x1f\x43lusterNetworkPerformanceConfig\x12q\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32G.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x1d\n\x1b_enable_fqdn_network_policyB\x1f\n\x1d_in_transit_encryption_configB+\n)_enable_cilium_clusterwide_network_policyB\x1f\n\x1d_default_enable_private_nodesB(\n&_disable_l4_lb_firewall_reconciliation\"\xc0\x01\n\x10GatewayAPIConfig\x12>\n\x07\x63hannel\x18\x01 \x01(\x0e\x32-.google.container.v1.GatewayAPIConfig.Channel\"l\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HANNEL_DISABLED\x10\x01\x12\x1c\n\x14\x43HANNEL_EXPERIMENTAL\x10\x03\x1a\x02\x08\x01\x12\x14\n\x10\x43HANNEL_STANDARD\x10\x04\"+\n\x18ServiceExternalIPsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x16GetOpenIDConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"\xdf\x02\n\x17GetOpenIDConfigResponse\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x1a\n\x08jwks_uri\x18\x02 \x01(\tR\x08jwks_uri\x12:\n\x18response_types_supported\x18\x03 \x03(\tR\x18response_types_supported\x12\x38\n\x17subject_types_supported\x18\x04 \x03(\tR\x17subject_types_supported\x12T\n%id_token_signing_alg_values_supported\x18\x05 \x03(\tR%id_token_signing_alg_values_supported\x12*\n\x10\x63laims_supported\x18\x06 \x03(\tR\x10\x63laims_supported\x12 \n\x0bgrant_types\x18\x07 \x03(\tR\x0bgrant_types\"\'\n\x15GetJSONWebKeysRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"r\n\x03Jwk\x12\x0b\n\x03kty\x18\x01 \x01(\t\x12\x0b\n\x03\x61lg\x18\x02 \x01(\t\x12\x0b\n\x03use\x18\x03 \x01(\t\x12\x0b\n\x03kid\x18\x04 \x01(\t\x12\t\n\x01n\x18\x05 \x01(\t\x12\t\n\x01\x65\x18\x06 \x01(\t\x12\t\n\x01x\x18\x07 \x01(\t\x12\t\n\x01y\x18\x08 \x01(\t\x12\x0b\n\x03\x63rv\x18\t \x01(\t\"@\n\x16GetJSONWebKeysResponse\x12&\n\x04keys\x18\x01 \x03(\x0b\x32\x18.google.container.v1.Jwk\"2\n\"CheckAutopilotCompatibilityRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xfc\x02\n\x1b\x41utopilotCompatibilityIssue\x12\x34\n\x10last_observation\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onstraint_type\x18\x02 \x01(\t\x12X\n\x14incompatibility_type\x18\x03 \x01(\x0e\x32:.google.container.v1.AutopilotCompatibilityIssue.IssueType\x12\x10\n\x08subjects\x18\x04 \x03(\t\x12\x19\n\x11\x64ocumentation_url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"r\n\tIssueType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n\x1a\x41\x44\x44ITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"x\n#CheckAutopilotCompatibilityResponse\x12@\n\x06issues\x18\x01 \x03(\x0b\x32\x30.google.container.v1.AutopilotCompatibilityIssue\x12\x0f\n\x07summary\x18\x02 \x01(\t\"\x9c\x01\n\x0eReleaseChannel\x12<\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.google.container.v1.ReleaseChannel.Channel\"L\n\x07\x43hannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05RAPID\x10\x01\x12\x0b\n\x07REGULAR\x10\x02\x12\n\n\x06STABLE\x10\x03\x12\x0c\n\x08\x45XTENDED\x10\x04\"\'\n\x14\x43ostManagementConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\",\n\x19IntraNodeVisibilityConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"&\n\x13ILBSubsettingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xf7\x02\n\tDNSConfig\x12<\n\x0b\x63luster_dns\x18\x01 \x01(\x0e\x32\'.google.container.v1.DNSConfig.Provider\x12\x42\n\x11\x63luster_dns_scope\x18\x02 \x01(\x0e\x32\'.google.container.v1.DNSConfig.DNSScope\x12\x1a\n\x12\x63luster_dns_domain\x18\x03 \x01(\t\x12*\n\x1d\x61\x64\x64itive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n\x10PLATFORM_DEFAULT\x10\x01\x12\r\n\tCLOUD_DNS\x10\x02\x12\x0c\n\x08KUBE_DNS\x10\x03\"G\n\x08\x44NSScope\x12\x19\n\x15\x44NS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rCLUSTER_SCOPE\x10\x01\x12\r\n\tVPC_SCOPE\x10\x02\".\n\x11MaxPodsConstraint\x12\x19\n\x11max_pods_per_node\x18\x01 \x01(\x03\"/\n\x16WorkloadIdentityConfig\x12\x15\n\rworkload_pool\x18\x02 \x01(\t\"(\n\x15IdentityServiceConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"K\n\x10MeshCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"\xe3\x05\n\x12\x44\x61tabaseEncryption\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.container.v1.DatabaseEncryption.State\x12U\n\rcurrent_state\x18\x03 \x01(\x0e\x32\x34.google.container.v1.DatabaseEncryption.CurrentStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x63ryption_keys\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12Z\n\x15last_operation_errors\x18\x05 \x03(\x0b\x32\x36.google.container.v1.DatabaseEncryption.OperationErrorB\x03\xe0\x41\x03\x1ah\n\x0eOperationError\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"2\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tENCRYPTED\x10\x01\x12\r\n\tDECRYPTED\x10\x02\"\xfb\x01\n\x0c\x43urrentState\x12\x1d\n\x19\x43URRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43URRENT_STATE_ENCRYPTED\x10\x07\x12\x1b\n\x17\x43URRENT_STATE_DECRYPTED\x10\x02\x12$\n CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n\x1e\x43URRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n\x1e\x43URRENT_STATE_DECRYPTION_ERROR\x10\x06\x42\x10\n\x0e_current_state\"e\n\x1cListUsableSubnetworksRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"t\n\x1dListUsableSubnetworksResponse\x12:\n\x0bsubnetworks\x18\x01 \x03(\x0b\x32%.google.container.v1.UsableSubnetwork\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x80\x02\n\x1eUsableSubnetworkSecondaryRange\x12\x12\n\nrange_name\x18\x01 \x01(\t\x12\x15\n\rip_cidr_range\x18\x02 \x01(\t\x12J\n\x06status\x18\x03 \x01(\x0e\x32:.google.container.v1.UsableSubnetworkSecondaryRange.Status\"g\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x12\n\x0eIN_USE_SERVICE\x10\x02\x12\x18\n\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n\x12IN_USE_MANAGED_POD\x10\x04\"\xb8\x01\n\x10UsableSubnetwork\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12P\n\x13secondary_ip_ranges\x18\x04 \x03(\x0b\x32\x33.google.container.v1.UsableSubnetworkSecondaryRange\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\"\xed\x02\n\x19ResourceUsageExportConfig\x12`\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32\x42.google.container.v1.ResourceUsageExportConfig.BigQueryDestination\x12&\n\x1e\x65nable_network_egress_metering\x18\x02 \x01(\x08\x12m\n\x1b\x63onsumption_metering_config\x18\x03 \x01(\x0b\x32H.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig\x1a)\n\x13\x42igQueryDestination\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a,\n\x19\x43onsumptionMeteringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16VerticalPodAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x11\x44\x65\x66\x61ultSnatStatus\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\" \n\rShieldedNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nVirtualNIC\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nFastSocket\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xc1\x03\n\x12NotificationConfig\x12>\n\x06pubsub\x18\x01 \x01(\x0b\x32..google.container.v1.NotificationConfig.PubSub\x1a\x8a\x01\n\x06PubSub\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12>\n\x06\x66ilter\x18\x03 \x01(\x0b\x32..google.container.v1.NotificationConfig.Filter\x1aO\n\x06\x46ilter\x12\x45\n\nevent_type\x18\x01 \x03(\x0e\x32\x31.google.container.v1.NotificationConfig.EventType\"\x8c\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n\rUPGRADE_EVENT\x10\x02\x12\x1b\n\x17SECURITY_BULLETIN_EVENT\x10\x03\x12\x16\n\x12UPGRADE_INFO_EVENT\x10\x04\"\xf0\x01\n\x11\x43onfidentialNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x63\n\x1a\x63onfidential_instance_type\x18\x02 \x01(\x0e\x32?.google.container.v1.ConfidentialNodes.ConfidentialInstanceType\"e\n\x18\x43onfidentialInstanceType\x12*\n&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SEV\x10\x01\x12\x0b\n\x07SEV_SNP\x10\x02\x12\x07\n\x03TDX\x10\x03\"\xdf\x01\n\x0cUpgradeEvent\x12?\n\rresource_type\x18\x01 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x38\n\x14operation_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x10\n\x08resource\x18\x06 \x01(\t\"\xb2\x06\n\x10UpgradeInfoEvent\x12?\n\rresource_type\x18\x01 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x05 \x01(\t\x12\x16\n\x0etarget_version\x18\x06 \x01(\t\x12\x10\n\x08resource\x18\x07 \x01(\t\x12?\n\x05state\x18\x08 \x01(\x0e\x32+.google.container.v1.UpgradeInfoEvent.StateB\x03\xe0\x41\x03\x12\x42\n\x19standard_support_end_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x42\n\x19\x65xtended_support_end_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\x12\x43\n\nevent_type\x18\x0c \x01(\x0e\x32/.google.container.v1.UpgradeInfoEvent.EventType\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06\"t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45ND_OF_SUPPORT\x10\x01\x12 \n\x1c\x43OS_MILESTONE_VERSION_UPDATE\x10\x02\x12\x15\n\x11UPGRADE_LIFECYCLE\x10\x03\x42\x1c\n\x1a_standard_support_end_timeB\x1c\n\x1a_extended_support_end_time\"\xb9\x01\n\x15UpgradeAvailableEvent\x12\x0f\n\x07version\x18\x01 \x01(\t\x12?\n\rresource_type\x18\x02 \x01(\x0e\x32(.google.container.v1.UpgradeResourceType\x12<\n\x0frelease_channel\x18\x03 \x01(\x0b\x32#.google.container.v1.ReleaseChannel\x12\x10\n\x08resource\x18\x04 \x01(\t\"\xba\x02\n\x15SecurityBulletinEvent\x12\x1e\n\x16resource_type_affected\x18\x01 \x01(\t\x12\x13\n\x0b\x62ulletin_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ve_ids\x18\x03 \x03(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x14\n\x0c\x62ulletin_uri\x18\x05 \x01(\t\x12\x19\n\x11\x62rief_description\x18\x06 \x01(\t\x12!\n\x19\x61\x66\x66\x65\x63ted_supported_minors\x18\x07 \x03(\t\x12\x18\n\x10patched_versions\x18\x08 \x03(\t\x12 \n\x18suggested_upgrade_target\x18\t \x01(\t\x12\x1d\n\x15manual_steps_required\x18\n \x01(\x08\x12\x1a\n\x12mitigated_versions\x18\x0b \x03(\t\"g\n\tAutopilot\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12I\n\x16workload_policy_config\x18\x02 \x01(\x0b\x32).google.container.v1.WorkloadPolicyConfig\"\xac\x01\n\x14WorkloadPolicyConfig\x12\x1c\n\x0f\x61llow_net_admin\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x35\n(autopilot_compatibility_auditing_enabled\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_allow_net_adminB+\n)_autopilot_compatibility_auditing_enabled\"V\n\rLoggingConfig\x12\x45\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32+.google.container.v1.LoggingComponentConfig\"\x9e\x02\n\x16LoggingComponentConfig\x12P\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32\x35.google.container.v1.LoggingComponentConfig.Component\"\xb1\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tWORKLOADS\x10\x02\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0c\n\x08KCP_SSHD\x10\x07\x12\x12\n\x0eKCP_CONNECTION\x10\x08\x12\x0b\n\x07KCP_HPA\x10\t\"*\n\x17RayClusterLoggingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x97\x02\n\x10MonitoringConfig\x12H\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32..google.container.v1.MonitoringComponentConfig\x12O\n\x19managed_prometheus_config\x18\x02 \x01(\x0b\x32,.google.container.v1.ManagedPrometheusConfig\x12h\n&advanced_datapath_observability_config\x18\x03 \x01(\x0b\x32\x38.google.container.v1.AdvancedDatapathObservabilityConfig\"\x9e\x02\n#AdvancedDatapathObservabilityConfig\x12\x16\n\x0e\x65nable_metrics\x18\x01 \x01(\x08\x12V\n\nrelay_mode\x18\x02 \x01(\x0e\x32\x42.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode\x12\x19\n\x0c\x65nable_relay\x18\x03 \x01(\x08H\x00\x88\x01\x01\"[\n\tRelayMode\x12\x1a\n\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n\x0b\x45XTERNAL_LB\x10\x04\x42\x0f\n\r_enable_relay\"-\n\x1aRayClusterMonitoringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"Z\n\x15NodePoolLoggingConfig\x12\x41\n\x0evariant_config\x18\x01 \x01(\x0b\x32).google.container.v1.LoggingVariantConfig\"\x9f\x01\n\x14LoggingVariantConfig\x12\x42\n\x07variant\x18\x01 \x01(\x0e\x32\x31.google.container.v1.LoggingVariantConfig.Variant\"C\n\x07Variant\x12\x17\n\x13VARIANT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x12\n\x0eMAX_THROUGHPUT\x10\x02\"\xe6\x02\n\x19MonitoringComponentConfig\x12S\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32\x38.google.container.v1.MonitoringComponentConfig.Component\"\xf3\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0b\n\x07STORAGE\x10\x07\x12\x07\n\x03HPA\x10\x08\x12\x07\n\x03POD\x10\t\x12\r\n\tDAEMONSET\x10\n\x12\x0e\n\nDEPLOYMENT\x10\x0b\x12\x0f\n\x0bSTATEFULSET\x10\x0c\x12\x0c\n\x08\x43\x41\x44VISOR\x10\r\x12\x0b\n\x07KUBELET\x10\x0e\x12\x08\n\x04\x44\x43GM\x10\x0f\x12\n\n\x06JOBSET\x10\x10\"u\n\x17ManagedPrometheusConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12I\n\x16\x61uto_monitoring_config\x18\x02 \x01(\x0b\x32).google.container.v1.AutoMonitoringConfig\"\x89\x01\n\x14\x41utoMonitoringConfig\x12>\n\x05scope\x18\x01 \x01(\x0e\x32/.google.container.v1.AutoMonitoringConfig.Scope\"1\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x08\n\x04NONE\x10\x02\"\xb0\x01\n\x0ePodAutoscaling\x12H\n\x0bhpa_profile\x18\x02 \x01(\x0e\x32..google.container.v1.PodAutoscaling.HPAProfileH\x00\x88\x01\x01\"D\n\nHPAProfile\x12\x1b\n\x17HPA_PROFILE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0f\n\x0bPERFORMANCE\x10\x02\x42\x0e\n\x0c_hpa_profile\"N\n\x05\x46leet\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x17\n\nmembership\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0epre_registered\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\xac\x05\n\x1b\x43ontrolPlaneEndpointsConfig\x12_\n\x13\x64ns_endpoint_config\x18\x01 \x01(\x0b\x32\x42.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig\x12_\n\x13ip_endpoints_config\x18\x03 \x01(\x0b\x32\x42.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig\x1aj\n\x11\x44NSEndpointConfig\x12\x15\n\x08\x65ndpoint\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61llow_external_traffic\x18\x03 \x01(\x08H\x00\x88\x01\x01\x42\x19\n\x17_allow_external_traffic\x1a\xde\x02\n\x11IPEndpointsConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x65nable_public_endpoint\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\rglobal_access\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12W\n\x1a\x61uthorized_networks_config\x18\x04 \x01(\x0b\x32\x33.google.container.v1.MasterAuthorizedNetworksConfig\x12\x1c\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10private_endpoint\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1bprivate_endpoint_subnetwork\x18\x07 \x01(\tB\n\n\x08_enabledB\x19\n\x17_enable_public_endpointB\x10\n\x0e_global_access\"2\n\x17LocalNvmeSsdBlockConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"S\n\x1e\x45phemeralStorageLocalSsdConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\x12\x18\n\x10\x64\x61ta_cache_count\x18\x02 \x01(\x05\"\x84\x01\n\x13ResourceManagerTags\x12@\n\x04tags\x18\x01 \x03(\x0b\x32\x32.google.container.v1.ResourceManagerTags.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf4\x01\n\x10\x45nterpriseConfig\x12L\n\x0c\x63luster_tier\x18\x01 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTierB\x03\xe0\x41\x03\x12G\n\x0c\x64\x65sired_tier\x18\x02 \x01(\x0e\x32\x31.google.container.v1.EnterpriseConfig.ClusterTier\"I\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\"7\n\x13SecretManagerConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_enabled\"h\n\x08\x42ootDisk\x12\x11\n\tdisk_type\x18\x01 \x01(\t\x12\x0f\n\x07size_gb\x18\x02 \x01(\x03\x12\x18\n\x10provisioned_iops\x18\x03 \x01(\x03\x12\x1e\n\x16provisioned_throughput\x18\x04 \x01(\x03\"\x9b\x01\n\x11SecondaryBootDisk\x12\x39\n\x04mode\x18\x01 \x01(\x0e\x32+.google.container.v1.SecondaryBootDisk.Mode\x12\x12\n\ndisk_image\x18\x02 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONTAINER_IMAGE_CACHE\x10\x01\"!\n\x1fSecondaryBootDiskUpdateStrategy\"D\n\x1e\x46\x65tchClusterUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\x95\x07\n\x12\x43lusterUpgradeInfo\x12!\n\x14minor_target_version\x18\x07 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x08 \x01(\tH\x01\x88\x01\x01\x12V\n\x13\x61uto_upgrade_status\x18\x02 \x03(\x0e\x32\x39.google.container.v1.ClusterUpgradeInfo.AutoUpgradeStatus\x12V\n\rpaused_reason\x18\x03 \x03(\x0e\x32?.google.container.v1.ClusterUpgradeInfo.AutoUpgradePausedReason\x12<\n\x0fupgrade_details\x18\x04 \x03(\x0b\x32#.google.container.v1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x05 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x06 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x04\x12\x12\n\x0eUPGRADE_PAUSED\x10\x05\"\x90\x02\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x05\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x06\x12\x1d\n\x19\x43LUSTER_DISRUPTION_BUDGET\x10\x04\x12+\n\'CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE\x10\x07\x12\x11\n\rSYSTEM_CONFIG\x10\x08\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp\"\xd7\x03\n\x0eUpgradeDetails\x12=\n\x05state\x18\x01 \x01(\x0e\x32).google.container.v1.UpgradeDetails.StateB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x17\n\x0finitial_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x41\n\nstart_type\x18\x06 \x01(\x0e\x32-.google.container.v1.UpgradeDetails.StartType\"J\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\"B\n\tStartType\x12\x1a\n\x16START_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\x42\r\n\x0b_start_timeB\x0b\n\t_end_time\"E\n\x1f\x46\x65tchNodePoolUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xcc\x06\n\x13NodePoolUpgradeInfo\x12!\n\x14minor_target_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12W\n\x13\x61uto_upgrade_status\x18\x03 \x03(\x0e\x32:.google.container.v1.NodePoolUpgradeInfo.AutoUpgradeStatus\x12W\n\rpaused_reason\x18\x04 \x03(\x0e\x32@.google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReason\x12<\n\x0fupgrade_details\x18\x05 \x03(\x0b\x32#.google.container.v1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x06 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x07 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x02\x12\x12\n\x0eUPGRADE_PAUSED\x10\x03\"\xc4\x01\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x02\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x03\x12\x11\n\rSYSTEM_CONFIG\x10\x04\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp\"\x99\x01\n\x14GkeAutoUpgradeConfig\x12G\n\npatch_mode\x18\x01 \x01(\x0e\x32\x33.google.container.v1.GkeAutoUpgradeConfig.PatchMode\"8\n\tPatchMode\x12\x1a\n\x16PATCH_MODE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41\x43\x43\x45LERATED\x10\x01*\xc6\x01\n\x17PrivateIPv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\'\n#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n\x13UpgradeResourceType\x12%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MASTER\x10\x01\x12\r\n\tNODE_POOL\x10\x02*a\n\x10\x44\x61tapathProvider\x12!\n\x1d\x44\x41TAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n\x11\x41\x44VANCED_DATAPATH\x10\x02*^\n\x16NodePoolUpdateStrategy\x12)\n%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nBLUE_GREEN\x10\x02\x12\t\n\x05SURGE\x10\x03*@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02*N\n\x0eIPv6AccessType\x12 \n\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02*\x9f\x01\n\x19InTransitEncryptionConfig\x12,\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x30\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x02\x32\xf9M\n\x0e\x43lusterManager\x12\xe8\x01\n\x0cListClusters\x12(.google.container.v1.ListClustersRequest\x1a).google.container.v1.ListClustersResponse\"\x82\x01\xda\x41\x0fproject_id,zone\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x61\x12,/v1/{parent=projects/*/locations/*}/clustersZ1\x12//v1/projects/{project_id}/zones/{zone}/clusters\x12\xed\x01\n\nGetCluster\x12&.google.container.v1.GetClusterRequest\x1a\x1c.google.container.v1.Cluster\"\x98\x01\xda\x41\x1aproject_id,zone,cluster_id\xda\x41\x04name\x82\xd3\xe4\x93\x02n\x12,/v1/{name=projects/*/locations/*/clusters/*}Z>\x12*/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels:\x01*ZP\"K/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels:\x01*\x12\xa5\x02\n\rSetLegacyAbac\x12).google.container.v1.SetLegacyAbacRequest\x1a\x1e.google.container.v1.Operation\"\xc8\x01\xda\x41\"project_id,zone,cluster_id,enabled\xda\x41\x0cname,enabled\x82\xd3\xe4\x93\x02\x8d\x01\":/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac:\x01*ZL\"G/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac:\x01*\x12\xa0\x02\n\x0fStartIPRotation\x12+.google.container.v1.StartIPRotationRequest\x1a\x1e.google.container.v1.Operation\"\xbf\x01\xda\x41\x1aproject_id,zone,cluster_id\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x01\"= 100Mi and <= 50% + # of the node's memory. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_available + # @return [::String] + # Optional. Amount of storage available on filesystem that kubelet uses for + # volumes, daemon logs, etc. Defines the amount of "nodefs.available" signal + # in kubelet. Default is unset, if not specified in the kubelet config. It + # takses percentage value for now. Sample format: "30%". Must be >= 10% and + # <= 50%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_inodes_free + # @return [::String] + # Optional. Amount of inodes available on filesystem that kubelet uses for + # volumes, daemon logs, etc. Defines the amount of "nodefs.inodesFree" signal + # in kubelet. Default is unset, if not specified in the kubelet config. Linux + # only. It takses percentage value for now. Sample format: "30%". Must be >= + # 5% and <= 50%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_available + # @return [::String] + # Optional. Amount of storage available on filesystem that container runtime + # uses for storing images layers. If the container filesystem and image + # filesystem are not separate, then imagefs can store both image layers and + # writeable layers. Defines the amount of "imagefs.available" signal in + # kubelet. Default is unset, if not specified in the kubelet config. It + # takses percentage value for now. Sample format: "30%". Must be >= 15% and + # <= 50%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_inodes_free + # @return [::String] + # Optional. Amount of inodes available on filesystem that container runtime + # uses for storing images layers. Defines the amount of "imagefs.inodesFree" + # signal in kubelet. Default is unset, if not specified in the kubelet + # config. Linux only. It takses percentage value for now. Sample format: + # "30%". Must be >= 5% and <= 50%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] pid_available + # @return [::String] + # Optional. Amount of PID available for pod allocation. Defines the amount of + # "pid.available" signal in kubelet. Default is unset, if not specified in + # the kubelet config. It takses percentage value for now. Sample format: + # "30%". Must be >= 10% and <= 50%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + class EvictionSignals + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Eviction grace periods are grace periods for each eviction signal. + # @!attribute [rw] memory_available + # @return [::String] + # Optional. Grace period for eviction due to memory available signal. Sample + # format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_available + # @return [::String] + # Optional. Grace period for eviction due to nodefs available signal. Sample + # format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_inodes_free + # @return [::String] + # Optional. Grace period for eviction due to nodefs inodes free signal. + # Sample format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_available + # @return [::String] + # Optional. Grace period for eviction due to imagefs available signal. Sample + # format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_inodes_free + # @return [::String] + # Optional. Grace period for eviction due to imagefs inodes free signal. + # Sample format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] pid_available + # @return [::String] + # Optional. Grace period for eviction due to pid available signal. Sample + # format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + class EvictionGracePeriod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Eviction minimum reclaims are the resource amounts of minimum reclaims for + # each eviction signal. + # @!attribute [rw] memory_available + # @return [::String] + # Optional. Minimum reclaim for eviction due to memory available signal. Only + # take percentage value for now. Sample format: "10%". Must be <=10%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_available + # @return [::String] + # Optional. Minimum reclaim for eviction due to nodefs available signal. Only + # take percentage value for now. Sample format: "10%". Must be <=10%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_inodes_free + # @return [::String] + # Optional. Minimum reclaim for eviction due to nodefs inodes free signal. + # Only take percentage value for now. Sample format: "10%". Must be <=10%. + # See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_available + # @return [::String] + # Optional. Minimum reclaim for eviction due to imagefs available signal. + # Only take percentage value for now. Sample format: "10%". Must be <=10%. + # See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_inodes_free + # @return [::String] + # Optional. Minimum reclaim for eviction due to imagefs inodes free signal. + # Only take percentage value for now. Sample format: "10%". Must be <=10%. + # See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] pid_available + # @return [::String] + # Optional. Minimum reclaim for eviction due to pid available signal. Only + # take percentage value for now. Sample format: "10%". Must be <=10%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + class EvictionMinimumReclaim + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Parameters that describe the nodes in a cluster. # # GKE Autopilot clusters do not @@ -398,8 +654,8 @@ class MemoryManager # @return [::String] # The image type to use for this node. Note that for a given image type, # the latest version of it will be used. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # The map of Kubernetes labels (key/value pairs) to be applied to each node. @@ -427,13 +683,14 @@ class MemoryManager # @!attribute [rw] preemptible # @return [::Boolean] # Whether the nodes are created as preemptible VM instances. See: - # https://cloud.google.com/compute/docs/instances/preemptible for more - # information about preemptible VM instances. + # https://cloud.google.com/compute/docs/instances/preemptible + # for more information about preemptible VM instances. # @!attribute [rw] accelerators # @return [::Array<::Google::Cloud::Container::V1::AcceleratorConfig>] # A list of hardware accelerators to be attached to each node. - # See https://cloud.google.com/compute/docs/gpus for more information about - # support for GPUs. + # See + # https://cloud.google.com/compute/docs/gpus + # for more information about support for GPUs. # @!attribute [rw] disk_type # @return [::String] # Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or @@ -565,6 +822,9 @@ class MemoryManager # @!attribute [rw] flex_start # @return [::Boolean] # Flex Start flag for enabling Flex Start VM. + # @!attribute [rw] boot_disk + # @return [::Google::Cloud::Container::V1::BootDisk] + # The boot disk configuration for the node pool. class NodeConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -649,7 +909,7 @@ class AdvancedMachineFeatures include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # Level of PMU access + # Level of PMU access. module PerformanceMonitoringUnit # PMU not enabled. PERFORMANCE_MONITORING_UNIT_UNSPECIFIED = 0 @@ -742,6 +1002,13 @@ module PerformanceMonitoringUnit # Output only. The utilization of the IPv4 range for the pod. # The ratio is Usage/[Total number of IPs in the secondary range], # Usage=numNodes*numZones*podIPsPerNode. + # @!attribute [r] subnetwork + # @return [::String] + # Output only. The subnetwork path for the node pool. + # Format: projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} + # If the cluster is associated with multiple subnetworks, the subnetwork for + # the node pool is picked based on the IP utilization during node pool + # creation and is immutable. class NodeNetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -885,6 +1152,11 @@ module Type # @!attribute [rw] node_affinities # @return [::Array<::Google::Cloud::Container::V1::SoleTenantConfig::NodeAffinity>] # NodeAffinities used to match to a shared sole tenant node group. + # @!attribute [rw] min_node_cpus + # @return [::Integer] + # Optional. The minimum number of virtual CPUs this instance will consume + # when running on a sole-tenant node. This field can only be set if the node + # pool is created in a shared sole-tenant node group. class SoleTenantConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -959,7 +1231,8 @@ class CertificateAuthorityDomainConfig extend ::Google::Protobuf::MessageExts::ClassMethods # GCPSecretManagerCertificateConfig configures a secret from - # [Google Secret Manager](https://cloud.google.com/secret-manager). + # [Google Secret + # Manager](https://cloud.google.com/secret-manager). # @!attribute [rw] secret_uri # @return [::String] # Secret URI, in the form @@ -1183,6 +1456,9 @@ class ClientCertificateConfig # @!attribute [rw] high_scale_checkpointing_config # @return [::Google::Cloud::Container::V1::HighScaleCheckpointingConfig] # Configuration for the High Scale Checkpointing add-on. + # @!attribute [rw] lustre_csi_driver_config + # @return [::Google::Cloud::Container::V1::LustreCsiDriverConfig] + # Configuration for the Lustre CSI driver. class AddonsConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1412,6 +1688,19 @@ class HighScaleCheckpointingConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for the Lustre CSI driver. + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the Lustre CSI driver is enabled for this cluster. + # @!attribute [rw] enable_legacy_lustre_port + # @return [::Boolean] + # If set to true, the Lustre CSI driver will install Lustre kernel modules + # using port 6988. + class LustreCsiDriverConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Configuration options for the Ray Operator add-on. # @!attribute [rw] enabled # @return [::Boolean] @@ -1716,6 +2005,16 @@ class PodCIDROverprovisionConfig # Output only. The utilization of the cluster default IPv4 range for the # pod. The ratio is Usage/[Total number of IPs in the secondary range], # Usage=numNodes*numZones*podIPsPerNode. + # @!attribute [r] additional_ip_ranges_configs + # @return [::Array<::Google::Cloud::Container::V1::AdditionalIPRangesConfig>] + # Output only. The additional IP ranges that are added to the cluster. + # These IP ranges can be used by new node pools to allocate node and pod IPs + # automatically. + # Each AdditionalIPRangesConfig corresponds to a single subnetwork. + # Once a range is removed it will not show up in IPAllocationPolicy. + # @!attribute [rw] auto_ipam_config + # @return [::Google::Cloud::Container::V1::AutoIpamConfig] + # Optional. AutoIpamConfig contains all information related to Auto IPAM class IPAllocationPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1738,7 +2037,8 @@ class IPAllocationPolicy # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The number of nodes to create in this cluster. You must ensure that your - # Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + # Compute Engine [resource + # quota](https://cloud.google.com/compute/quotas) # is sufficient for this number of instances. You must also have available # firewall and routes quota. # For requests, this field should only be used in lieu of a @@ -1812,8 +2112,8 @@ class IPAllocationPolicy # @!attribute [rw] subnetwork # @return [::String] # The name of the Google Compute Engine - # [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which - # the cluster is connected. + # [subnetwork](https://cloud.google.com/compute/docs/subnetworks) + # to which the cluster is connected. # @!attribute [rw] node_pools # @return [::Array<::Google::Cloud::Container::V1::NodePool>] # The node pools associated with this cluster. @@ -1822,8 +2122,8 @@ class IPAllocationPolicy # @!attribute [rw] locations # @return [::Array<::String>] # The list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. # # This field provides a default value if # [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) @@ -1941,8 +2241,9 @@ class IPAllocationPolicy # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Output only. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field is deprecated, use location instead. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field is deprecated, use location + # instead. # @!attribute [r] endpoint # @return [::String] # Output only. The IP address of this cluster's master endpoint. @@ -2102,6 +2403,9 @@ class IPAllocationPolicy # @return [::Google::Cloud::Container::V1::RBACBindingConfig] # RBACBindingConfig allows user to restrict ClusterRoleBindings an # RoleBindings that can be created. + # @!attribute [rw] gke_auto_upgrade_config + # @return [::Google::Cloud::Container::V1::GkeAutoUpgradeConfig] + # Configuration for GKE auto upgrades. # @!attribute [rw] anonymous_authentication_config # @return [::Google::Cloud::Container::V1::AnonymousAuthenticationConfig] # Configuration for limiting anonymous access to all endpoints except the @@ -2211,9 +2515,25 @@ class UserManagedKeysConfig # AnonymousAuthenticationConfig defines the settings needed to limit endpoints # that allow anonymous authentication. + # @!attribute [rw] mode + # @return [::Google::Cloud::Container::V1::AnonymousAuthenticationConfig::Mode] + # Defines the mode of limiting anonymous access in the cluster. class AnonymousAuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mode defines the mode of anonymous authentication + # allowed in the cluster. + module Mode + # Default value not specified. + MODE_UNSPECIFIED = 0 + + # Anonymous authentication is allowed for all endpoints. + ENABLED = 1 + + # Anonymous authentication is allowed for only health check endpoints. + LIMITED = 2 + end end # CompliancePostureConfig defines the settings needed to enable/disable @@ -2427,8 +2747,8 @@ class NodeConfigDefaults # @!attribute [rw] desired_locations # @return [::Array<::String>] # The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. # # This list must always include the cluster's primary zone. # @@ -2634,15 +2954,27 @@ class NodeConfigDefaults # The desired node kubelet config for all auto-provisioned node pools # in autopilot clusters and node auto-provisioning enabled clusters. # @!attribute [rw] user_managed_keys_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::Container::V1::UserManagedKeysConfig] # The Custom keys configuration for the cluster. + # + # This field is deprecated. + # Use + # {::Google::Cloud::Container::V1::ClusterUpdate#desired_user_managed_keys_config ClusterUpdate.desired_user_managed_keys_config} + # instead. # @!attribute [rw] desired_rbac_binding_config # @return [::Google::Cloud::Container::V1::RBACBindingConfig] # RBACBindingConfig allows user to restrict ClusterRoleBindings an # RoleBindings that can be created. + # @!attribute [rw] desired_additional_ip_ranges_config + # @return [::Google::Cloud::Container::V1::DesiredAdditionalIPRangesConfig] + # The desired config for additional subnetworks attached to the cluster. # @!attribute [rw] desired_enterprise_config # @return [::Google::Cloud::Container::V1::DesiredEnterpriseConfig] # The desired enterprise configuration for the cluster. + # @!attribute [rw] desired_auto_ipam_config + # @return [::Google::Cloud::Container::V1::AutoIpamConfig] + # AutoIpamConfig contains all information related to Auto IPAM # @!attribute [rw] desired_disable_l4_lb_firewall_reconciliation # @return [::Boolean] # Enable/Disable L4 LB VPC firewall reconciliation for the cluster. @@ -2652,10 +2984,16 @@ class NodeConfigDefaults # in autopilot clusters and node auto-provisioning enabled clusters. # # Currently only `cgroup_mode` can be set here. + # @!attribute [rw] desired_user_managed_keys_config + # @return [::Google::Cloud::Container::V1::UserManagedKeysConfig] + # The desired user managed keys config for the cluster. # @!attribute [rw] desired_anonymous_authentication_config # @return [::Google::Cloud::Container::V1::AnonymousAuthenticationConfig] # Configuration for limiting anonymous access to all endpoints except the # health checks. + # @!attribute [rw] gke_auto_upgrade_config + # @return [::Google::Cloud::Container::V1::GkeAutoUpgradeConfig] + # Configuration for GKE auto upgrade. class ClusterUpdate include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2674,6 +3012,42 @@ class AdditionalPodRangesConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # AdditionalIPRangesConfig is the configuration for individual additional + # subnetwork attached to the cluster + # @!attribute [rw] subnetwork + # @return [::String] + # Name of the subnetwork. This can be the full path of the subnetwork or + # just the name. + # Example1: my-subnet + # Example2: projects/gke-project/regions/us-central1/subnetworks/my-subnet + # @!attribute [rw] pod_ipv4_range_names + # @return [::Array<::String>] + # List of secondary ranges names within this subnetwork that can be used for + # pod IPs. + # Example1: gke-pod-range1 + # Example2: gke-pod-range1,gke-pod-range2 + class AdditionalIPRangesConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DesiredAdditionalIPRangesConfig is a wrapper used for cluster update + # operation and contains multiple AdditionalIPRangesConfigs. + # @!attribute [rw] additional_ip_ranges_configs + # @return [::Array<::Google::Cloud::Container::V1::AdditionalIPRangesConfig>] + # List of additional IP ranges configs where each AdditionalIPRangesConfig + # corresponds to one subnetwork's IP ranges + class DesiredAdditionalIPRangesConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AutoIpamConfig contains all information related to Auto IPAM + class AutoIpamConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # RangeInfo contains the range name and the range utilization by this cluster. # @!attribute [r] range_name # @return [::String] @@ -2704,8 +3078,9 @@ class DesiredEnterpriseConfig # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Output only. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # operation is taking place. This field is deprecated, use location instead. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the operation is taking place. This field is deprecated, use + # location instead. # @!attribute [r] operation_type # @return [::Google::Cloud::Container::V1::Operation::Type] # Output only. The operation type. @@ -2981,9 +3356,9 @@ class Metric # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @!attribute [rw] cluster # @return [::Google::Cloud::Container::V1::Cluster] # Required. A [cluster @@ -3008,9 +3383,9 @@ class CreateClusterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3036,9 +3411,9 @@ class GetClusterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3067,9 +3442,9 @@ class UpdateClusterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3096,8 +3471,8 @@ class UpdateClusterRequest # @!attribute [rw] image_type # @return [::String] # Required. The desired image type for the node pool. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @!attribute [rw] name # @return [::String] # The name (project, location, cluster, node pool) of the node pool to @@ -3106,10 +3481,10 @@ class UpdateClusterRequest # @!attribute [rw] locations # @return [::Array<::String>] # The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # node pool's nodes should be located. Changing the locations for a node pool - # will result in nodes being either created or removed from the node pool, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the node pool's nodes should be located. Changing the locations + # for a node pool will result in nodes being either created or removed from + # the node pool, depending on whether locations are being added or removed. # @!attribute [rw] workload_metadata_config # @return [::Google::Cloud::Container::V1::WorkloadMetadataConfig] # The desired workload metadata config for the node pool. @@ -3171,14 +3546,15 @@ class UpdateClusterRequest # @!attribute [rw] accelerators # @return [::Array<::Google::Cloud::Container::V1::AcceleratorConfig>] # A list of hardware accelerators to be attached to each node. - # See https://cloud.google.com/compute/docs/gpus for more information about - # support for GPUs. + # See + # https://cloud.google.com/compute/docs/gpus + # for more information about support for GPUs. # @!attribute [rw] machine_type # @return [::String] # Optional. The desired [Google Compute Engine machine - # type](https://cloud.google.com/compute/docs/machine-types) for nodes in the - # node pool. Initiates an upgrade operation that migrates the nodes in the - # node pool to the specified machine type. + # type](https://cloud.google.com/compute/docs/machine-types) + # for nodes in the node pool. Initiates an upgrade operation that migrates + # the nodes in the node pool to the specified machine type. # @!attribute [rw] disk_type # @return [::String] # Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or @@ -3215,6 +3591,11 @@ class UpdateClusterRequest # @!attribute [rw] flex_start # @return [::Boolean] # Flex Start flag for enabling Flex Start VM. + # @!attribute [rw] boot_disk + # @return [::Google::Cloud::Container::V1::BootDisk] + # The desired boot disk config for nodes in the node pool. + # Initiates an upgrade operation that migrates the nodes in the + # node pool to the specified boot disk config. class UpdateNodePoolRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -3231,9 +3612,9 @@ class UpdateNodePoolRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3268,9 +3649,9 @@ class SetNodePoolAutoscalingRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3309,9 +3690,9 @@ class SetLoggingServiceRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3350,9 +3731,9 @@ class SetMonitoringServiceRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3382,9 +3763,9 @@ class SetAddonsConfigRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3393,10 +3774,10 @@ class SetAddonsConfigRequest # @!attribute [rw] locations # @return [::Array<::String>] # Required. The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. Changing the locations a cluster is in - # will result in nodes being either created or removed from the cluster, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. Changing the locations a + # cluster is in will result in nodes being either created or removed from the + # cluster, depending on whether locations are being added or removed. # # This list must always include the cluster's primary zone. # @!attribute [rw] name @@ -3419,9 +3800,9 @@ class SetLocationsRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3459,9 +3840,9 @@ class UpdateMasterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3511,9 +3892,9 @@ module Action # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3539,9 +3920,9 @@ class DeleteClusterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides, or "-" for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides, or "-" for all zones. This field has been + # deprecated and replaced by the parent field. # @!attribute [rw] parent # @return [::String] # The parent (project and location) where the clusters will be listed. @@ -3577,9 +3958,9 @@ class ListClustersResponse # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] operation_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3605,9 +3986,9 @@ class GetOperationRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for, or `-` for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for, or `-` for all zones. This field has been + # deprecated and replaced by the parent field. # @!attribute [rw] parent # @return [::String] # The parent (project and location) where the operations will be listed. @@ -3629,9 +4010,9 @@ class ListOperationsRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # operation resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the operation resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] operation_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3670,9 +4051,9 @@ class ListOperationsResponse # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for. This field has been deprecated and replaced by + # the name field. # @!attribute [rw] name # @return [::String] # The name (project and location) of the server config to get, @@ -3735,9 +4116,9 @@ class ReleaseChannelConfig # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3767,9 +4148,9 @@ class CreateNodePoolRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3801,9 +4182,9 @@ class DeleteNodePoolRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3829,9 +4210,9 @@ class ListNodePoolsRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3900,14 +4281,15 @@ class StandardRolloutPolicy # @!attribute [rw] initial_node_count # @return [::Integer] # The initial node count for the pool. You must ensure that your - # Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + # Compute Engine [resource + # quota](https://cloud.google.com/compute/quotas) # is sufficient for this number of instances. You must also have available # firewall and routes quota. # @!attribute [rw] locations # @return [::Array<::String>] # The list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # NodePool's nodes should be located. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the NodePool's nodes should be located. # # If this value is unspecified during node pool creation, the # [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) @@ -4402,9 +4784,9 @@ class DailyMaintenanceWindow # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4439,9 +4821,9 @@ class SetNodePoolManagementRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4490,9 +4872,9 @@ class CompleteNodePoolUpgradeRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4547,8 +4929,11 @@ class ListNodePoolsResponse # @!attribute [rw] autoprovisioning_locations # @return [::Array<::String>] # The list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # NodePool's nodes can be created by NAP. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the NodePool's nodes can be created by NAP. + # @!attribute [rw] default_compute_class_config + # @return [::Google::Cloud::Container::V1::DefaultComputeClassConfig] + # Default compute class is a configuration for default compute class. class ClusterAutoscaling include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -4620,8 +5005,8 @@ module AutoscalingProfile # @!attribute [rw] image_type # @return [::String] # The image type to use for NAP created node. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @!attribute [rw] insecure_kubelet_readonly_port_enabled # @return [::Boolean] # DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead. @@ -4646,6 +5031,16 @@ class ResourceLimit extend ::Google::Protobuf::MessageExts::ClassMethods end + # DefaultComputeClassConfig defines default compute class + # configuration. + # @!attribute [rw] enabled + # @return [::Boolean] + # Enables default compute class. + class DefaultComputeClassConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # NodePoolAutoscaling contains information required by cluster autoscaler to # adjust the size of the node pool to the current cluster usage. # @!attribute [rw] enabled @@ -4709,9 +5104,9 @@ module LocationPolicy # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4758,9 +5153,9 @@ class ResourceLabelsEntry # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4790,9 +5185,9 @@ class SetLegacyAbacRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4821,9 +5216,9 @@ class StartIPRotationRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4951,9 +5346,9 @@ module Mode # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4979,8 +5374,8 @@ class SetNetworkPolicyRequest # @!attribute [rw] zone # @return [::String] # Required. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. # @!attribute [rw] cluster_id # @return [::String] # Required. The name of the cluster to update. @@ -5043,6 +5438,10 @@ module Code # Node service account is missing permissions. NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS = 10 + + # Cloud KMS key version used for etcd level encryption has been destroyed. + # This is a permanent error. + CLOUD_KMS_KEY_DESTROYED = 11 end end @@ -5056,8 +5455,8 @@ module Code # @!attribute [r] subnetwork # @return [::String] # Output only. The relative name of the Google Compute Engine - # [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the - # cluster is connected. Example: + # [subnetwork](https://cloud.google.com/compute/docs/vpc) + # to which the cluster is connected. Example: # projects/my-project/regions/us-central1/subnetworks/my-subnet # @!attribute [rw] enable_intra_node_visibility # @return [::Boolean] @@ -6528,6 +6927,25 @@ class SecretManagerConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # BootDisk specifies the boot disk configuration for nodepools. + # @!attribute [rw] disk_type + # @return [::String] + # Disk type of the boot disk. + # (i.e. Hyperdisk-Balanced, PD-Balanced, etc.) + # @!attribute [rw] size_gb + # @return [::Integer] + # Disk size in GB. Replaces NodeConfig.disk_size_gb + # @!attribute [rw] provisioned_iops + # @return [::Integer] + # For Hyperdisk-Balanced only, the provisioned IOPS config value. + # @!attribute [rw] provisioned_throughput + # @return [::Integer] + # For Hyperdisk-Balanced only, the provisioned throughput config value. + class BootDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # SecondaryBootDisk represents a persistent disk attached to a node # with special configurations based on its mode. # @!attribute [rw] mode @@ -6782,6 +7200,29 @@ module AutoUpgradePausedReason end end + # GkeAutoUpgradeConfig is the configuration for GKE auto upgrades. + # @!attribute [rw] patch_mode + # @return [::Google::Cloud::Container::V1::GkeAutoUpgradeConfig::PatchMode] + # PatchMode specifies how auto upgrade patch builds should be + # selected. + class GkeAutoUpgradeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # PatchMode specifies how auto upgrade patch builds should be + # selected. + module PatchMode + # PATCH_MODE_UNSPECIFIED defaults to using the upgrade target from the + # channel's patch upgrade targets as the upgrade target for the + # version. + PATCH_MODE_UNSPECIFIED = 0 + + # ACCELERATED denotes that the latest patch build in the channel should be + # used as the upgrade target for the version. + ACCELERATED = 1 + end + end + # PrivateIPv6GoogleAccess controls whether and how the pods can communicate # with Google Services through gRPC over IPv6. module PrivateIPv6GoogleAccess diff --git a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_rest_test.rb b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_rest_test.rb index 3ce542fc8f1c..dd32e2a93b76 100644 --- a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_rest_test.rb +++ b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_rest_test.rb @@ -348,6 +348,7 @@ def test_update_node_pool storage_pools = ["hello world"] max_run_duration = {} flex_start = true + boot_disk = {} update_node_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -363,27 +364,27 @@ def test_update_node_pool end # Use hash object - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }) do |_result, response| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start do |_result, response| + client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.update_node_pool ::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start) do |_result, response| + client.update_node_pool ::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }, call_options) do |_result, response| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.update_node_pool(::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start), call_options) do |_result, response| + client.update_node_pool(::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb index 5c2f82482729..c32c0b2c86ab 100644 --- a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb +++ b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb @@ -362,6 +362,7 @@ def test_update_node_pool storage_pools = ["hello world"] max_run_duration = {} flex_start = true + boot_disk = {} update_node_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :update_node_pool, name @@ -401,6 +402,7 @@ def test_update_node_pool assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["max_run_duration"] assert_equal true, request["flex_start"] assert request.has_flex_start? + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Container::V1::BootDisk), request["boot_disk"] refute_nil options end @@ -411,31 +413,31 @@ def test_update_node_pool end # Use hash object - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }) do |response, operation| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start do |response, operation| + client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.update_node_pool ::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start) do |response, operation| + client.update_node_pool ::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }, grpc_options) do |response, operation| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.update_node_pool(::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start), grpc_options) do |response, operation| + client.update_node_pool(::Google::Cloud::Container::V1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, name: name, locations: locations, workload_metadata_config: workload_metadata_config, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end From 6971fd08cfa44ba6626c398d30188c30ca91d7a1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 18:01:24 -0700 Subject: [PATCH 265/457] feat(firestore-admin-v1): Support for tags when restoring a database (#30683) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change exposes the tags field in the Database and RestoreDatabaseRequest messages, allowing users to manage tags for Firestore databases. PiperOrigin-RevId: 783460561 Source-Link: https://github.com/googleapis/googleapis/commit/ba7105d1d1e0ed0c505eefcc3450a05e2675a0f3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5e034bb55145e814fd7ba7b49d8af28bc20fa679 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpcmVzdG9yZS1hZG1pbi12MS8uT3dsQm90LnlhbWwiLCJoIjoiNWUwMzRiYjU1MTQ1ZTgxNGZkN2JhN2I0OWQ4YWYyOGJjMjBmYTY3OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../firestore/admin/v1/firestore_admin/client.rb | 7 ++++++- .../admin/v1/firestore_admin/rest/client.rb | 7 ++++++- .../lib/google/firestore/admin/v1/database_pb.rb | 2 +- .../firestore/admin/v1/firestore_admin_pb.rb | 2 +- .../google/firestore/admin/v1/database.rb | 15 +++++++++++++++ .../google/firestore/admin/v1/firestore_admin.rb | 15 +++++++++++++++ .../admin/v1/firestore_admin_rest_test.rb | 11 ++++++----- .../firestore/admin/v1/firestore_admin_test.rb | 12 +++++++----- 8 files changed, 57 insertions(+), 14 deletions(-) diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb index 0048e2af5555..d8601c8675ae 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb @@ -2724,7 +2724,7 @@ def delete_backup request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil) + # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil, tags: nil) # Pass arguments to `restore_database` 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). @@ -2756,6 +2756,11 @@ def delete_backup request, options = nil # If this field is not specified, the restored database will use # the same encryption configuration as the backup, namely # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @param tags [::Hash{::String => ::String}] + # Optional. Immutable. Tags to be bound to the restored database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb index f1ddcb67aef8..e167aee024f8 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb @@ -2542,7 +2542,7 @@ def delete_backup request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil) + # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil, tags: nil) # Pass arguments to `restore_database` 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). @@ -2574,6 +2574,11 @@ def delete_backup request, options = nil # If this field is not specified, the restored database will use # the same encryption configuration as the backup, namely # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @param tags [::Hash{::String => ::String}] + # Optional. Immutable. Tags to be bound to the restored database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb index ded40c444cd7..637cde4b3cc8 100644 --- a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb +++ b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n(google/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xae\x15\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0blocation_id\x18\t \x01(\t\x12>\n\x04type\x18\n \x01(\x0e\x32\x30.google.firestore.admin.v1.Database.DatabaseType\x12M\n\x10\x63oncurrency_mode\x18\x0f \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\n\x18version_retention_period\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12l\n!point_in_time_recovery_enablement\x18\x15 \x01(\x0e\x32\x41.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12\x61\n\x1b\x61pp_engine_integration_mode\x18\x13 \x01(\x0e\x32<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\n\nkey_prefix\x18\x14 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x17\x64\x65lete_protection_state\x18\x16 \x01(\x0e\x32\x39.google.firestore.admin.v1.Database.DeleteProtectionState\x12H\n\x0b\x63mek_config\x18\x17 \x01(\x0b\x32..google.firestore.admin.v1.Database.CmekConfigB\x03\xe0\x41\x01\x12\x18\n\x0bprevious_id\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12H\n\x0bsource_info\x18\x1a \x01(\x0b\x32..google.firestore.admin.v1.Database.SourceInfoB\x03\xe0\x41\x03\x12\x1b\n\tfree_tier\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x0c\n\x04\x65tag\x18\x63 \x01(\t\x12R\n\x10\x64\x61tabase_edition\x18\x1c \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.DatabaseEditionB\x03\xe0\x41\x05\x1aH\n\nCmekConfig\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x61\x63tive_key_version\x18\x02 \x03(\tB\x03\xe0\x41\x03\x1a\xe7\x01\n\nSourceInfo\x12M\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32;.google.firestore.admin.v1.Database.SourceInfo.BackupSourceH\x00\x12:\n\toperation\x18\x03 \x01(\tB\'\xfa\x41$\n\"firestore.googleapis.com/Operation\x1a\x44\n\x0c\x42\x61\x63kupSource\x12\x34\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x66irestore.googleapis.com/BackupB\x08\n\x06source\x1a\x88\x04\n\x10\x45ncryptionConfig\x12x\n\x19google_default_encryption\x18\x01 \x01(\x0b\x32S.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsH\x00\x12m\n\x15use_source_encryption\x18\x02 \x01(\x0b\x32L.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsH\x00\x12|\n\x1b\x63ustomer_managed_encryption\x18\x03 \x01(\x0b\x32U.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptionsH\x00\x1a \n\x1eGoogleDefaultEncryptionOptions\x1a\x19\n\x17SourceEncryptionOptions\x1a=\n CustomerManagedEncryptionOptions\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0f\x65ncryption_type\"W\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x46IRESTORE_NATIVE\x10\x01\x12\x12\n\x0e\x44\x41TASTORE_MODE\x10\x02\"w\n\x0f\x43oncurrencyMode\x12 \n\x1c\x43ONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nOPTIMISTIC\x10\x01\x12\x0f\n\x0bPESSIMISTIC\x10\x02\x12!\n\x1dOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9b\x01\n\x1dPointInTimeRecoveryEnablement\x12\x31\n-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\n\x1ePOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\n\x1fPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\n\x18\x41ppEngineIntegrationMode\x12+\n\'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\x7f\n\x15\x44\x65leteProtectionState\x12\'\n#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETE_PROTECTION_DISABLED\x10\x01\x12\x1d\n\x19\x44\x45LETE_PROTECTION_ENABLED\x10\x02\"Q\n\x0f\x44\x61tabaseEdition\x12 \n\x1c\x44\x41TABASE_EDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02:R\xea\x41O\n!firestore.googleapis.com/Database\x12\'projects/{project}/databases/{database}R\x01\x01\x42\x0c\n\n_free_tierB\xc3\x02\n\x1d\x63om.google.firestore.admin.v1B\rDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41\x64\n\"firestore.googleapis.com/Operation\x12>projects/{project}/databases/{database}/operations/{operation}b\x06proto3" +descriptor_data = "\n(google/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x16\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0blocation_id\x18\t \x01(\t\x12>\n\x04type\x18\n \x01(\x0e\x32\x30.google.firestore.admin.v1.Database.DatabaseType\x12M\n\x10\x63oncurrency_mode\x18\x0f \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\n\x18version_retention_period\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12l\n!point_in_time_recovery_enablement\x18\x15 \x01(\x0e\x32\x41.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12\x61\n\x1b\x61pp_engine_integration_mode\x18\x13 \x01(\x0e\x32<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\n\nkey_prefix\x18\x14 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x17\x64\x65lete_protection_state\x18\x16 \x01(\x0e\x32\x39.google.firestore.admin.v1.Database.DeleteProtectionState\x12H\n\x0b\x63mek_config\x18\x17 \x01(\x0b\x32..google.firestore.admin.v1.Database.CmekConfigB\x03\xe0\x41\x01\x12\x18\n\x0bprevious_id\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12H\n\x0bsource_info\x18\x1a \x01(\x0b\x32..google.firestore.admin.v1.Database.SourceInfoB\x03\xe0\x41\x03\x12\x46\n\x04tags\x18\x1d \x03(\x0b\x32-.google.firestore.admin.v1.Database.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12\x1b\n\tfree_tier\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x0c\n\x04\x65tag\x18\x63 \x01(\t\x12R\n\x10\x64\x61tabase_edition\x18\x1c \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.DatabaseEditionB\x03\xe0\x41\x05\x1aH\n\nCmekConfig\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x61\x63tive_key_version\x18\x02 \x03(\tB\x03\xe0\x41\x03\x1a\xe7\x01\n\nSourceInfo\x12M\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32;.google.firestore.admin.v1.Database.SourceInfo.BackupSourceH\x00\x12:\n\toperation\x18\x03 \x01(\tB\'\xfa\x41$\n\"firestore.googleapis.com/Operation\x1a\x44\n\x0c\x42\x61\x63kupSource\x12\x34\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x66irestore.googleapis.com/BackupB\x08\n\x06source\x1a\x88\x04\n\x10\x45ncryptionConfig\x12x\n\x19google_default_encryption\x18\x01 \x01(\x0b\x32S.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsH\x00\x12m\n\x15use_source_encryption\x18\x02 \x01(\x0b\x32L.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsH\x00\x12|\n\x1b\x63ustomer_managed_encryption\x18\x03 \x01(\x0b\x32U.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptionsH\x00\x1a \n\x1eGoogleDefaultEncryptionOptions\x1a\x19\n\x17SourceEncryptionOptions\x1a=\n CustomerManagedEncryptionOptions\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0f\x65ncryption_type\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x46IRESTORE_NATIVE\x10\x01\x12\x12\n\x0e\x44\x41TASTORE_MODE\x10\x02\"w\n\x0f\x43oncurrencyMode\x12 \n\x1c\x43ONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nOPTIMISTIC\x10\x01\x12\x0f\n\x0bPESSIMISTIC\x10\x02\x12!\n\x1dOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9b\x01\n\x1dPointInTimeRecoveryEnablement\x12\x31\n-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\n\x1ePOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\n\x1fPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\n\x18\x41ppEngineIntegrationMode\x12+\n\'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\x7f\n\x15\x44\x65leteProtectionState\x12\'\n#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETE_PROTECTION_DISABLED\x10\x01\x12\x1d\n\x19\x44\x45LETE_PROTECTION_ENABLED\x10\x02\"Q\n\x0f\x44\x61tabaseEdition\x12 \n\x1c\x44\x41TABASE_EDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02:R\xea\x41O\n!firestore.googleapis.com/Database\x12\'projects/{project}/databases/{database}R\x01\x01\x42\x0c\n\n_free_tierB\xc3\x02\n\x1d\x63om.google.firestore.admin.v1B\rDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41\x64\n\"firestore.googleapis.com/Operation\x12>projects/{project}/databases/{database}/operations/{operation}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb index f0b23658a5f4..fdcf65e66a55 100644 --- a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb +++ b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb @@ -21,7 +21,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/firestore/admin/v1/backup.proto\x1a(google/firestore/admin/v1/database.proto\x1a%google/firestore/admin/v1/field.proto\x1a%google/firestore/admin/v1/index.proto\x1a)google/firestore/admin/v1/operation.proto\x1a(google/firestore/admin/v1/schedule.proto\x1a*google/firestore/admin/v1/user_creds.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"g\n\x14ListDatabasesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"\xa8\x01\n\x15\x43reateDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12:\n\x08\x64\x61tabase\x18\x02 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x18\n\x16\x43reateDatabaseMetadata\"d\n\x15ListDatabasesResponse\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.google.firestore.admin.v1.Database\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"\x84\x01\n\x15UpdateDatabaseRequest\x12:\n\x08\x64\x61tabase\x18\x01 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x18\n\x16UpdateDatabaseMetadata\"^\n\x15\x44\x65leteDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x18\n\x16\x44\x65leteDatabaseMetadata\"\xaf\x01\n\x16\x43reateUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\x12=\n\nuser_creds\x18\x02 \x01(\x0b\x32$.google.firestore.admin.v1.UserCredsB\x03\xe0\x41\x02\x12\x1a\n\ruser_creds_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x14ListUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\"Q\n\x15ListUserCredsResponse\x12\x38\n\nuser_creds\x18\x01 \x03(\x0b\x32$.google.firestore.admin.v1.UserCreds\"R\n\x16\x45nableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"S\n\x17\x44isableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"T\n\x18ResetUserPasswordRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x16\x44\x65leteUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"\xa1\x01\n\x1b\x43reateBackupScheduleRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x02 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\"Y\n\x18GetBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x97\x01\n\x1bUpdateBackupScheduleRequest\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x01 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"W\n\x1aListBackupSchedulesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"b\n\x1bListBackupSchedulesResponse\x12\x43\n\x10\x62\x61\x63kup_schedules\x18\x01 \x03(\x0b\x32).google.firestore.admin.v1.BackupSchedule\"\\\n\x1b\x44\x65leteBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x8c\x01\n\x12\x43reateIndexRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x34\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.IndexB\x03\xe0\x41\x02\"\x8d\x01\n\x12ListIndexesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"J\n\x12\x44\x65leteIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"{\n\x12UpdateFieldRequest\x12\x34\n\x05\x66ield\x18\x01 \x01(\x0b\x32 .google.firestore.admin.v1.FieldB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x0fGetFieldRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Field\"\x8c\x01\n\x11ListFieldsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x12ListFieldsResponse\x12\x30\n\x06\x66ields\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Field\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x01\n\x16\x45xportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\x12\x31\n\rsnapshot_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9a\x01\n\x16ImportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\"\x8e\x01\n\x1a\x42ulkDeleteDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x1b\n\x0e\x63ollection_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rnamespace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x1d\n\x1b\x42ulkDeleteDocumentsResponse\"I\n\x10GetBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"_\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"^\n\x13ListBackupsResponse\x12\x32\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32!.google.firestore.admin.v1.Backup\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x13\x44\x65leteBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"\xfc\x01\n\x16RestoreDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x06\x62\x61\x63kup\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12T\n\x11\x65ncryption_config\x18\t \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x32\xc1/\n\x0e\x46irestoreAdmin\x12\xdb\x01\n\x0b\x43reateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1f\n\x05Index\x12\x16IndexOperationMetadata\xda\x41\x0cparent,index\x82\xd3\xe4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xbd\x01\n\x0bListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1a..google.firestore.admin.v1.ListIndexesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xa7\x01\n\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1a .google.firestore.admin.v1.Index\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa3\x01\n\x0b\x44\x65leteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa6\x01\n\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1a .google.firestore.admin.v1.Field\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xd9\x01\n\x0bUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41\x1f\n\x05\x46ield\x12\x16\x46ieldOperationMetadata\xda\x41\x05\x66ield\x82\xd3\xe4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05\x66ield\x12\xb9\x01\n\nListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1a-.google.firestore.admin.v1.ListFieldsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xdd\x01\n\x0f\x45xportDocuments\x12\x31.google.firestore.admin.v1.ExportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x32\n\x17\x45xportDocumentsResponse\x12\x17\x45xportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xdb\x01\n\x0fImportDocuments\x12\x31.google.firestore.admin.v1.ImportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xf2\x01\n\x13\x42ulkDeleteDocuments\x12\x35.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41:\n\x1b\x42ulkDeleteDocumentsResponse\x12\x1b\x42ulkDeleteDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xd9\x01\n\x0e\x43reateDatabase\x12\x30.google.firestore.admin.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x43reateDatabaseMetadata\xda\x41\x1bparent,database,database_id\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08\x64\x61tabase\x12\x93\x01\n\x0bGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1a#.google.firestore.admin.v1.Database\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xa6\x01\n\rListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1a\x30.google.firestore.admin.v1.ListDatabasesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xdb\x01\n\x0eUpdateDatabase\x12\x30.google.firestore.admin.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x36\x32*/v1/{database.name=projects/*/databases/*}:\x08\x64\x61tabase\x12\xb8\x01\n\x0e\x44\x65leteDatabase\x12\x30.google.firestore.admin.v1.DeleteDatabaseRequest\x1a\x1d.google.longrunning.Operation\"U\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x44\x65leteDatabaseMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xcf\x01\n\x0f\x43reateUserCreds\x12\x31.google.firestore.admin.v1.CreateUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"c\xda\x41\x1fparent,user_creds,user_creds_id\x82\xd3\xe4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\nuser_creds\x12\xa2\x01\n\x0cGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xb2\x01\n\rListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1a\x30.google.firestore.admin.v1.ListUserCredsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xb2\x01\n\x0f\x45nableUserCreds\x12\x31.google.firestore.admin.v1.EnableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xb5\x01\n\x10\x44isableUserCreds\x12\x32.google.firestore.admin.v1.DisableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xbd\x01\n\x11ResetUserPassword\x12\x33.google.firestore.admin.v1.ResetUserPasswordRequest\x1a$.google.firestore.admin.v1.UserCreds\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9a\x01\n\x0f\x44\x65leteUserCreds\x12\x31.google.firestore.admin.v1.DeleteUserCredsRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\n\tGetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1a!.google.firestore.admin.v1.Backup\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xaa\x01\n\x0bListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1a..google.firestore.admin.v1.ListBackupsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\n\x0c\x44\x65leteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xbf\x01\n\x0fRestoreDatabase\x12\x31.google.firestore.admin.v1.RestoreDatabaseRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41#\n\x08\x44\x61tabase\x12\x17RestoreDatabaseMetadata\x82\xd3\xe4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xe0\x01\n\x14\x43reateBackupSchedule\x12\x36.google.firestore.admin.v1.CreateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"e\xda\x41\x16parent,backup_schedule\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xb7\x01\n\x11GetBackupSchedule\x12\x33.google.firestore.admin.v1.GetBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xca\x01\n\x13ListBackupSchedules\x12\x35.google.firestore.admin.v1.ListBackupSchedulesRequest\x1a\x36.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xf5\x01\n\x14UpdateBackupSchedule\x12\x36.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"z\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xaa\x01\n\x14\x44\x65leteBackupSchedule\x12\x36.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xa5\x03\n\x1d\x63om.google.firestore.admin.v1B\x13\x46irestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41L\n!firestore.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41q\n(firestore.googleapis.com/CollectionGroup\x12\x45projects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3" +descriptor_data = "\n/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/firestore/admin/v1/backup.proto\x1a(google/firestore/admin/v1/database.proto\x1a%google/firestore/admin/v1/field.proto\x1a%google/firestore/admin/v1/index.proto\x1a)google/firestore/admin/v1/operation.proto\x1a(google/firestore/admin/v1/schedule.proto\x1a*google/firestore/admin/v1/user_creds.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"g\n\x14ListDatabasesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"\xa8\x01\n\x15\x43reateDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12:\n\x08\x64\x61tabase\x18\x02 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x18\n\x16\x43reateDatabaseMetadata\"d\n\x15ListDatabasesResponse\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.google.firestore.admin.v1.Database\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"\x84\x01\n\x15UpdateDatabaseRequest\x12:\n\x08\x64\x61tabase\x18\x01 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x18\n\x16UpdateDatabaseMetadata\"^\n\x15\x44\x65leteDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x18\n\x16\x44\x65leteDatabaseMetadata\"\xaf\x01\n\x16\x43reateUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\x12=\n\nuser_creds\x18\x02 \x01(\x0b\x32$.google.firestore.admin.v1.UserCredsB\x03\xe0\x41\x02\x12\x1a\n\ruser_creds_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x14ListUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\"Q\n\x15ListUserCredsResponse\x12\x38\n\nuser_creds\x18\x01 \x03(\x0b\x32$.google.firestore.admin.v1.UserCreds\"R\n\x16\x45nableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"S\n\x17\x44isableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"T\n\x18ResetUserPasswordRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x16\x44\x65leteUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"\xa1\x01\n\x1b\x43reateBackupScheduleRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x02 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\"Y\n\x18GetBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x97\x01\n\x1bUpdateBackupScheduleRequest\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x01 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"W\n\x1aListBackupSchedulesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"b\n\x1bListBackupSchedulesResponse\x12\x43\n\x10\x62\x61\x63kup_schedules\x18\x01 \x03(\x0b\x32).google.firestore.admin.v1.BackupSchedule\"\\\n\x1b\x44\x65leteBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x8c\x01\n\x12\x43reateIndexRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x34\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.IndexB\x03\xe0\x41\x02\"\x8d\x01\n\x12ListIndexesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"J\n\x12\x44\x65leteIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"{\n\x12UpdateFieldRequest\x12\x34\n\x05\x66ield\x18\x01 \x01(\x0b\x32 .google.firestore.admin.v1.FieldB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x0fGetFieldRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Field\"\x8c\x01\n\x11ListFieldsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x12ListFieldsResponse\x12\x30\n\x06\x66ields\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Field\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x01\n\x16\x45xportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\x12\x31\n\rsnapshot_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9a\x01\n\x16ImportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\"\x8e\x01\n\x1a\x42ulkDeleteDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x1b\n\x0e\x63ollection_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rnamespace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x1d\n\x1b\x42ulkDeleteDocumentsResponse\"I\n\x10GetBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"_\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"^\n\x13ListBackupsResponse\x12\x32\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32!.google.firestore.admin.v1.Backup\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x13\x44\x65leteBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"\xfc\x02\n\x16RestoreDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x06\x62\x61\x63kup\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12T\n\x11\x65ncryption_config\x18\t \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x12Q\n\x04tags\x18\n \x03(\x0b\x32;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xe0\x41\x05\xe0\x41\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xc1/\n\x0e\x46irestoreAdmin\x12\xdb\x01\n\x0b\x43reateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1f\n\x05Index\x12\x16IndexOperationMetadata\xda\x41\x0cparent,index\x82\xd3\xe4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xbd\x01\n\x0bListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1a..google.firestore.admin.v1.ListIndexesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xa7\x01\n\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1a .google.firestore.admin.v1.Index\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa3\x01\n\x0b\x44\x65leteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa6\x01\n\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1a .google.firestore.admin.v1.Field\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xd9\x01\n\x0bUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41\x1f\n\x05\x46ield\x12\x16\x46ieldOperationMetadata\xda\x41\x05\x66ield\x82\xd3\xe4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05\x66ield\x12\xb9\x01\n\nListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1a-.google.firestore.admin.v1.ListFieldsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xdd\x01\n\x0f\x45xportDocuments\x12\x31.google.firestore.admin.v1.ExportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x32\n\x17\x45xportDocumentsResponse\x12\x17\x45xportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xdb\x01\n\x0fImportDocuments\x12\x31.google.firestore.admin.v1.ImportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xf2\x01\n\x13\x42ulkDeleteDocuments\x12\x35.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41:\n\x1b\x42ulkDeleteDocumentsResponse\x12\x1b\x42ulkDeleteDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xd9\x01\n\x0e\x43reateDatabase\x12\x30.google.firestore.admin.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x43reateDatabaseMetadata\xda\x41\x1bparent,database,database_id\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08\x64\x61tabase\x12\x93\x01\n\x0bGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1a#.google.firestore.admin.v1.Database\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xa6\x01\n\rListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1a\x30.google.firestore.admin.v1.ListDatabasesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xdb\x01\n\x0eUpdateDatabase\x12\x30.google.firestore.admin.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x36\x32*/v1/{database.name=projects/*/databases/*}:\x08\x64\x61tabase\x12\xb8\x01\n\x0e\x44\x65leteDatabase\x12\x30.google.firestore.admin.v1.DeleteDatabaseRequest\x1a\x1d.google.longrunning.Operation\"U\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x44\x65leteDatabaseMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xcf\x01\n\x0f\x43reateUserCreds\x12\x31.google.firestore.admin.v1.CreateUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"c\xda\x41\x1fparent,user_creds,user_creds_id\x82\xd3\xe4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\nuser_creds\x12\xa2\x01\n\x0cGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xb2\x01\n\rListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1a\x30.google.firestore.admin.v1.ListUserCredsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xb2\x01\n\x0f\x45nableUserCreds\x12\x31.google.firestore.admin.v1.EnableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xb5\x01\n\x10\x44isableUserCreds\x12\x32.google.firestore.admin.v1.DisableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xbd\x01\n\x11ResetUserPassword\x12\x33.google.firestore.admin.v1.ResetUserPasswordRequest\x1a$.google.firestore.admin.v1.UserCreds\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9a\x01\n\x0f\x44\x65leteUserCreds\x12\x31.google.firestore.admin.v1.DeleteUserCredsRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\n\tGetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1a!.google.firestore.admin.v1.Backup\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xaa\x01\n\x0bListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1a..google.firestore.admin.v1.ListBackupsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\n\x0c\x44\x65leteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xbf\x01\n\x0fRestoreDatabase\x12\x31.google.firestore.admin.v1.RestoreDatabaseRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41#\n\x08\x44\x61tabase\x12\x17RestoreDatabaseMetadata\x82\xd3\xe4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xe0\x01\n\x14\x43reateBackupSchedule\x12\x36.google.firestore.admin.v1.CreateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"e\xda\x41\x16parent,backup_schedule\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xb7\x01\n\x11GetBackupSchedule\x12\x33.google.firestore.admin.v1.GetBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xca\x01\n\x13ListBackupSchedules\x12\x35.google.firestore.admin.v1.ListBackupSchedulesRequest\x1a\x36.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xf5\x01\n\x14UpdateBackupSchedule\x12\x36.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"z\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xaa\x01\n\x14\x44\x65leteBackupSchedule\x12\x36.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xa5\x03\n\x1d\x63om.google.firestore.admin.v1B\x13\x46irestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41L\n!firestore.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41q\n(firestore.googleapis.com/CollectionGroup\x12\x45projects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb index 16cc307fcc8b..29b375935a63 100644 --- a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb +++ b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb @@ -105,6 +105,12 @@ module V1 # @!attribute [r] source_info # @return [::Google::Cloud::Firestore::Admin::V1::Database::SourceInfo] # Output only. Information about the provenance of this database. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag keys/values directly bound to this + # resource. For example: + # "123/environment": "production", + # "123/costCenter": "marketing" # @!attribute [r] free_tier # @return [::Boolean] # Output only. Background: Free tier is the ability of a Firestore database @@ -241,6 +247,15 @@ class CustomerManagedEncryptionOptions end end + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The type of the database. # See https://cloud.google.com/datastore/docs/firestore-or-datastore for # information about how to choose. diff --git a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb index 0b1be13c555d..73786068aa54 100644 --- a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb +++ b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb @@ -669,9 +669,24 @@ class DeleteBackupRequest # If this field is not specified, the restored database will use # the same encryption configuration as the backup, namely # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Immutable. Tags to be bound to the restored database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. class RestoreDatabaseRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb index cf35a05d4cf2..8a259caa7d22 100644 --- a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb +++ b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb @@ -1465,6 +1465,7 @@ def test_restore_database database_id = "hello world" backup = "hello world" encryption_config = {} + tags = {} restore_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1480,27 +1481,27 @@ def test_restore_database end # Use hash object - client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }) do |_result, response| + client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config do |_result, response| + client.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.restore_database ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config) do |_result, response| + client.restore_database ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }, call_options) do |_result, response| + client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.restore_database(::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config), call_options) do |_result, response| + client.restore_database(::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb index bb77187a746a..27829c905732 100644 --- a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb +++ b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb @@ -1626,6 +1626,7 @@ def test_restore_database database_id = "hello world" backup = "hello world" encryption_config = {} + tags = {} restore_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :restore_database, name @@ -1634,6 +1635,7 @@ def test_restore_database assert_equal "hello world", request["database_id"] assert_equal "hello world", request["backup"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig), request["encryption_config"] + assert_equal({}, request["tags"].to_h) refute_nil options end @@ -1644,35 +1646,35 @@ def test_restore_database end # Use hash object - client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }) do |response, operation| + client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config do |response, operation| + client.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.restore_database ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config) do |response, operation| + client.restore_database ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }, grpc_options) do |response, operation| + client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.restore_database(::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config), grpc_options) do |response, operation| + client.restore_database(::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation From 17df14549d4bad1487ffb71dbcbc58b52fa36054 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 18:03:25 -0700 Subject: [PATCH 266/457] feat(run-v2): Support for disabling GPU zonal redundancy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(run-v2): Task attempt results include the container termination signal PiperOrigin-RevId: 783503468 Source-Link: https://github.com/googleapis/googleapis/commit/f1537a7be292b8976503d6f76d98c48039f3ddda Source-Link: https://github.com/googleapis/googleapis-gen/commit/a1e3ef39b55ebaac94b2a83d5825546f8a6318a1 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJ1bi12Mi8uT3dsQm90LnlhbWwiLCJoIjoiYTFlM2VmMzliNTVlYmFhYzk0YjJhODNkNTgyNTU0NmY4YTYzMThhMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/run/v2/task_pb.rb | 2 +- .../lib/google/cloud/run/v2/task_template_pb.rb | 2 +- .../proto_docs/google/cloud/run/v2/task.rb | 12 ++++++++++++ .../proto_docs/google/cloud/run/v2/task_template.rb | 3 +++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/task_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/task_pb.rb index 50d3d77a4ddd..181bb99f4a89 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/task_pb.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/task_pb.rb @@ -16,7 +16,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n\x1egoogle/cloud/run/v2/task.proto\x12\x13google.cloud.run.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/run/v2/condition.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"?\n\x0eGetTaskRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17run.googleapis.com/Task\"\x80\x01\n\x10ListTasksRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17run.googleapis.com/Task\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"V\n\x11ListTasksResponse\x12(\n\x05tasks\x18\x01 \x03(\x0b\x32\x19.google.cloud.run.v2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf7\x0c\n\x04Task\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12:\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.run.v2.Task.LabelsEntryB\x03\xe0\x41\x03\x12\x44\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32*.google.cloud.run.v2.Task.AnnotationsEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0escheduled_time\x18\" \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x0f\x63ompletion_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12+\n\x03job\x18\x0c \x01(\tB\x1e\xe0\x41\x03\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x37\n\texecution\x18\r \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\x12\x32\n\ncontainers\x18\x0e \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12,\n\x07volumes\x18\x0f \x03(\x0b\x32\x1b.google.cloud.run.v2.Volume\x12\x13\n\x0bmax_retries\x18\x10 \x01(\x05\x12*\n\x07timeout\x18\x11 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fservice_account\x18\x12 \x01(\t\x12H\n\x15\x65xecution_environment\x18\x14 \x01(\x0e\x32).google.cloud.run.v2.ExecutionEnvironment\x12\x18\n\x0breconciling\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x16 \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12 \n\x13observed_generation\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\x12\n\x05index\x18\x18 \x01(\x05\x42\x03\xe0\x41\x03\x12\x14\n\x07retried\x18\x19 \x01(\x05\x42\x03\xe0\x41\x03\x12H\n\x13last_attempt_result\x18\x1a \x01(\x0b\x32&.google.cloud.run.v2.TaskAttemptResultB\x03\xe0\x41\x03\x12\x41\n\x0e\x65ncryption_key\x18\x1c \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x37\n\nvpc_access\x18\x1d \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccessB\x03\xe0\x41\x03\x12\x14\n\x07log_uri\x18 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18! \x01(\x08\x42\x03\xe0\x41\x03\x12=\n\rnode_selector\x18$ \x01(\x0b\x32!.google.cloud.run.v2.NodeSelectorB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:w\xea\x41t\n\x17run.googleapis.com/Task\x12Vprojects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}R\x01\x01\"T\n\x11TaskAttemptResult\x12\'\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x16\n\texit_code\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x32\x96\x03\n\x05Tasks\x12\x97\x01\n\x07GetTask\x12#.google.cloud.run.v2.GetTaskRequest\x1a\x19.google.cloud.run.v2.Task\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/jobs/*/executions/*/tasks/*}\x12\xaa\x01\n\tListTasks\x12%.google.cloud.run.v2.ListTasksRequest\x1a&.google.cloud.run.v2.ListTasksResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v2/{parent=projects/*/locations/*/jobs/*/executions/*}/tasks\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBQ\n\x17\x63om.google.cloud.run.v2B\tTaskProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" +descriptor_data = "\n\x1egoogle/cloud/run/v2/task.proto\x12\x13google.cloud.run.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/run/v2/condition.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"?\n\x0eGetTaskRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17run.googleapis.com/Task\"\x80\x01\n\x10ListTasksRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17run.googleapis.com/Task\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"V\n\x11ListTasksResponse\x12(\n\x05tasks\x18\x01 \x03(\x0b\x32\x19.google.cloud.run.v2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcd\r\n\x04Task\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12:\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.run.v2.Task.LabelsEntryB\x03\xe0\x41\x03\x12\x44\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32*.google.cloud.run.v2.Task.AnnotationsEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0escheduled_time\x18\" \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x0f\x63ompletion_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12+\n\x03job\x18\x0c \x01(\tB\x1e\xe0\x41\x03\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x37\n\texecution\x18\r \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\x12\x32\n\ncontainers\x18\x0e \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12,\n\x07volumes\x18\x0f \x03(\x0b\x32\x1b.google.cloud.run.v2.Volume\x12\x13\n\x0bmax_retries\x18\x10 \x01(\x05\x12*\n\x07timeout\x18\x11 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fservice_account\x18\x12 \x01(\t\x12H\n\x15\x65xecution_environment\x18\x14 \x01(\x0e\x32).google.cloud.run.v2.ExecutionEnvironment\x12\x18\n\x0breconciling\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x16 \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12 \n\x13observed_generation\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\x12\n\x05index\x18\x18 \x01(\x05\x42\x03\xe0\x41\x03\x12\x14\n\x07retried\x18\x19 \x01(\x05\x42\x03\xe0\x41\x03\x12H\n\x13last_attempt_result\x18\x1a \x01(\x0b\x32&.google.cloud.run.v2.TaskAttemptResultB\x03\xe0\x41\x03\x12\x41\n\x0e\x65ncryption_key\x18\x1c \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x37\n\nvpc_access\x18\x1d \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccessB\x03\xe0\x41\x03\x12\x14\n\x07log_uri\x18 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18! \x01(\x08\x42\x03\xe0\x41\x03\x12=\n\rnode_selector\x18$ \x01(\x0b\x32!.google.cloud.run.v2.NodeSelectorB\x03\xe0\x41\x03\x12\x32\n\x1dgpu_zonal_redundancy_disabled\x18% \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x03H\x00\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:w\xea\x41t\n\x17run.googleapis.com/Task\x12Vprojects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}R\x01\x01\x42 \n\x1e_gpu_zonal_redundancy_disabled\"n\n\x11TaskAttemptResult\x12\'\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x16\n\texit_code\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bterm_signal\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x32\x96\x03\n\x05Tasks\x12\x97\x01\n\x07GetTask\x12#.google.cloud.run.v2.GetTaskRequest\x1a\x19.google.cloud.run.v2.Task\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/jobs/*/executions/*/tasks/*}\x12\xaa\x01\n\tListTasks\x12%.google.cloud.run.v2.ListTasksRequest\x1a&.google.cloud.run.v2.ListTasksResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v2/{parent=projects/*/locations/*/jobs/*/executions/*}/tasks\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBQ\n\x17\x63om.google.cloud.run.v2B\tTaskProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/task_template_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/task_template_pb.rb index ad1fb448c547..a3a2cef8f3b5 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/task_template_pb.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/task_template_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/duration_pb' -descriptor_data = "\n\'google/cloud/run/v2/task_template.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\"\xed\x03\n\x0cTaskTemplate\x12\x32\n\ncontainers\x18\x01 \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12\x31\n\x07volumes\x18\x02 \x03(\x0b\x32\x1b.google.cloud.run.v2.VolumeB\x03\xe0\x41\x01\x12\x15\n\x0bmax_retries\x18\x03 \x01(\x05H\x00\x12/\n\x07timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12M\n\x15\x65xecution_environment\x18\x06 \x01(\x0e\x32).google.cloud.run.v2.ExecutionEnvironmentB\x03\xe0\x41\x01\x12>\n\x0e\x65ncryption_key\x18\x07 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x37\n\nvpc_access\x18\x08 \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccessB\x03\xe0\x41\x01\x12=\n\rnode_selector\x18\x0b \x01(\x0b\x32!.google.cloud.run.v2.NodeSelectorB\x03\xe0\x41\x01\x42\t\n\x07retriesBY\n\x17\x63om.google.cloud.run.v2B\x11TaskTemplateProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" +descriptor_data = "\n\'google/cloud/run/v2/task_template.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\"\xc0\x04\n\x0cTaskTemplate\x12\x32\n\ncontainers\x18\x01 \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12\x31\n\x07volumes\x18\x02 \x03(\x0b\x32\x1b.google.cloud.run.v2.VolumeB\x03\xe0\x41\x01\x12\x15\n\x0bmax_retries\x18\x03 \x01(\x05H\x00\x12/\n\x07timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12M\n\x15\x65xecution_environment\x18\x06 \x01(\x0e\x32).google.cloud.run.v2.ExecutionEnvironmentB\x03\xe0\x41\x01\x12>\n\x0e\x65ncryption_key\x18\x07 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x37\n\nvpc_access\x18\x08 \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccessB\x03\xe0\x41\x01\x12=\n\rnode_selector\x18\x0b \x01(\x0b\x32!.google.cloud.run.v2.NodeSelectorB\x03\xe0\x41\x01\x12/\n\x1dgpu_zonal_redundancy_disabled\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07retriesB \n\x1e_gpu_zonal_redundancy_disabledBY\n\x17\x63om.google.cloud.run.v2B\x11TaskTemplateProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/task.rb b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/task.rb index e3279d218ed9..b9a943643b21 100644 --- a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/task.rb +++ b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/task.rb @@ -198,6 +198,10 @@ class ListTasksResponse # @!attribute [r] node_selector # @return [::Google::Cloud::Run::V2::NodeSelector] # Output only. The node selector for the task. + # @!attribute [r] gpu_zonal_redundancy_disabled + # @return [::Boolean] + # Optional. Output only. True if GPU zonal redundancy is disabled on this + # task. # @!attribute [r] etag # @return [::String] # Output only. A system-generated fingerprint for this version of the @@ -236,6 +240,14 @@ class AnnotationsEntry # This may be unset if the container was unable to exit cleanly with a code # due to some other failure. # See status field for possible failure details. + # + # At most one of exit_code or term_signal will be set. + # @!attribute [r] term_signal + # @return [::Integer] + # Output only. Termination signal of the container. This is set to non-zero + # if the container is terminated by the system. + # + # At most one of exit_code or term_signal will be set. class TaskAttemptResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/task_template.rb b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/task_template.rb index 801bf9bb83f8..596964692b70 100644 --- a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/task_template.rb +++ b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/task_template.rb @@ -62,6 +62,9 @@ module V2 # @!attribute [rw] node_selector # @return [::Google::Cloud::Run::V2::NodeSelector] # Optional. The node selector for the task template. + # @!attribute [rw] gpu_zonal_redundancy_disabled + # @return [::Boolean] + # Optional. True if GPU zonal redundancy is disabled on this task template. class TaskTemplate include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From d03a097e8a1e34adf2bd568e965b780414311b2d Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 15 Jul 2025 19:44:31 -0700 Subject: [PATCH 267/457] feat: Initial generation of google-cloud-maintenance-api-v1beta (#30685) --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 53 ++ .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + google-cloud-maintenance-api-v1beta/.toys.rb | 28 + google-cloud-maintenance-api-v1beta/.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + google-cloud-maintenance-api-v1beta/Gemfile | 11 + .../LICENSE.md | 201 +++++ google-cloud-maintenance-api-v1beta/README.md | 154 ++++ google-cloud-maintenance-api-v1beta/Rakefile | 169 +++++ .../gapic_metadata.json | 33 + ...oogle-cloud-maintenance-api-v1beta.gemspec | 29 + .../google-cloud-maintenance-api-v1beta.rb | 21 + .../google/cloud/maintenance/api/v1beta.rb | 47 ++ .../api/v1beta/bindings_override.rb | 104 +++ .../maintenance/api/v1beta/maintenance.rb | 57 ++ .../api/v1beta/maintenance/client.rb | 707 ++++++++++++++++++ .../api/v1beta/maintenance/credentials.rb | 49 ++ .../api/v1beta/maintenance/paths.rb | 71 ++ .../api/v1beta/maintenance/rest.rb | 55 ++ .../api/v1beta/maintenance/rest/client.rb | 668 +++++++++++++++++ .../v1beta/maintenance/rest/service_stub.rb | 266 +++++++ .../api/v1beta/maintenance_service_pb.rb | 66 ++ .../v1beta/maintenance_service_services_pb.rb | 51 ++ .../cloud/maintenance/api/v1beta/rest.rb | 40 + .../cloud/maintenance/api/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++++++++++++ .../proto_docs/google/api/field_behavior.rb | 85 +++ .../proto_docs/google/api/field_info.rb | 88 +++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 ++++++ .../api/v1beta/maintenance_service.rb | 423 +++++++++++ .../proto_docs/google/protobuf/any.rb | 145 ++++ .../proto_docs/google/protobuf/duration.rb | 98 +++ .../proto_docs/google/protobuf/timestamp.rb | 127 ++++ .../snippets/Gemfile | 32 + .../maintenance/get_resource_maintenance.rb | 47 ++ .../maintenance/list_resource_maintenances.rb | 51 ++ .../maintenance/summarize_maintenances.rb | 51 ++ ...a_google.cloud.maintenance.api.v1beta.json | 135 ++++ .../api/v1beta/maintenance_paths_test.rb | 67 ++ .../api/v1beta/maintenance_rest_test.rb | 269 +++++++ .../api/v1beta/maintenance_test.rb | 285 +++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 50 files changed, 5830 insertions(+) create mode 100644 google-cloud-maintenance-api-v1beta/.OwlBot.yaml create mode 100644 google-cloud-maintenance-api-v1beta/.gitignore create mode 100644 google-cloud-maintenance-api-v1beta/.owlbot-manifest.json create mode 100644 google-cloud-maintenance-api-v1beta/.repo-metadata.json create mode 100644 google-cloud-maintenance-api-v1beta/.rubocop.yml create mode 100644 google-cloud-maintenance-api-v1beta/.toys.rb create mode 100644 google-cloud-maintenance-api-v1beta/.yardopts create mode 100644 google-cloud-maintenance-api-v1beta/AUTHENTICATION.md create mode 100644 google-cloud-maintenance-api-v1beta/CHANGELOG.md create mode 100644 google-cloud-maintenance-api-v1beta/Gemfile create mode 100644 google-cloud-maintenance-api-v1beta/LICENSE.md create mode 100644 google-cloud-maintenance-api-v1beta/README.md create mode 100644 google-cloud-maintenance-api-v1beta/Rakefile create mode 100644 google-cloud-maintenance-api-v1beta/gapic_metadata.json create mode 100644 google-cloud-maintenance-api-v1beta/google-cloud-maintenance-api-v1beta.gemspec create mode 100644 google-cloud-maintenance-api-v1beta/lib/google-cloud-maintenance-api-v1beta.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/client.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/credentials.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/paths.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/client.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/service_stub.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance_service_pb.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance_service_services_pb.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/rest.rb create mode 100644 google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/version.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/README.md create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/api/client.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/api/field_info.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/api/resource.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/cloud/maintenance/api/v1beta/maintenance_service.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-cloud-maintenance-api-v1beta/snippets/Gemfile create mode 100644 google-cloud-maintenance-api-v1beta/snippets/maintenance/get_resource_maintenance.rb create mode 100644 google-cloud-maintenance-api-v1beta/snippets/maintenance/list_resource_maintenances.rb create mode 100644 google-cloud-maintenance-api-v1beta/snippets/maintenance/summarize_maintenances.rb create mode 100644 google-cloud-maintenance-api-v1beta/snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json create mode 100644 google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_paths_test.rb create mode 100644 google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_rest_test.rb create mode 100644 google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_test.rb create mode 100644 google-cloud-maintenance-api-v1beta/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6f3195b6aa06..88bcab0bae93 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -465,6 +465,8 @@ "google-cloud-lustre+FILLER": "0.0.0", "google-cloud-lustre-v1": "0.1.1", "google-cloud-lustre-v1+FILLER": "0.0.0", + "google-cloud-maintenance-api-v1beta": "0.0.1", + "google-cloud-maintenance-api-v1beta+FILLER": "0.0.0", "google-cloud-managed_identities": "1.4.1", "google-cloud-managed_identities+FILLER": "0.0.0", "google-cloud-managed_identities-v1": "1.3.0", diff --git a/google-cloud-maintenance-api-v1beta/.OwlBot.yaml b/google-cloud-maintenance-api-v1beta/.OwlBot.yaml new file mode 100644 index 000000000000..9ba6bc888ea8 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/cloud/maintenance/api/v1beta/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-cloud-maintenance-api-v1beta/$1 diff --git a/google-cloud-maintenance-api-v1beta/.gitignore b/google-cloud-maintenance-api-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/.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/google-cloud-maintenance-api-v1beta/.owlbot-manifest.json b/google-cloud-maintenance-api-v1beta/.owlbot-manifest.json new file mode 100644 index 000000000000..ead5cc4b773f --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/.owlbot-manifest.json @@ -0,0 +1,53 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-cloud-maintenance-api-v1beta.gemspec", + "lib/google-cloud-maintenance-api-v1beta.rb", + "lib/google/cloud/maintenance/api/v1beta.rb", + "lib/google/cloud/maintenance/api/v1beta/bindings_override.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance/client.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance/credentials.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance/paths.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance/rest.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance/rest/client.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance/rest/service_stub.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance_service_pb.rb", + "lib/google/cloud/maintenance/api/v1beta/maintenance_service_services_pb.rb", + "lib/google/cloud/maintenance/api/v1beta/rest.rb", + "lib/google/cloud/maintenance/api/v1beta/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/field_info.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/maintenance/api/v1beta/maintenance_service.rb", + "proto_docs/google/protobuf/any.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/timestamp.rb", + "snippets/Gemfile", + "snippets/maintenance/get_resource_maintenance.rb", + "snippets/maintenance/list_resource_maintenances.rb", + "snippets/maintenance/summarize_maintenances.rb", + "snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json", + "test/google/cloud/maintenance/api/v1beta/maintenance_paths_test.rb", + "test/google/cloud/maintenance/api/v1beta/maintenance_rest_test.rb", + "test/google/cloud/maintenance/api/v1beta/maintenance_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-cloud-maintenance-api-v1beta/.repo-metadata.json b/google-cloud-maintenance-api-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..26b8e5ff28c8 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "maintenance.googleapis.com", + "api_shortname": "maintenance", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-maintenance-api-v1beta/latest", + "distribution_name": "google-cloud-maintenance-api-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "maintenance", + "name_pretty": "Maintenance V1BETA API", + "product_documentation": "https://cloud.google.com/unified-maintenance/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates. Note that google-cloud-maintenance-api-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-maintenance-api instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/unified-maintenance/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/google-cloud-maintenance-api-v1beta/.rubocop.yml b/google-cloud-maintenance-api-v1beta/.rubocop.yml new file mode 100644 index 000000000000..a5c1b5cf4136 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-maintenance-api-v1beta.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-maintenance-api-v1beta.rb" diff --git a/google-cloud-maintenance-api-v1beta/.toys.rb b/google-cloud-maintenance-api-v1beta/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-maintenance-api-v1beta/.yardopts b/google-cloud-maintenance-api-v1beta/.yardopts new file mode 100644 index 000000000000..070814b1cbeb --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Maintenance V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-cloud-maintenance-api-v1beta/AUTHENTICATION.md b/google-cloud-maintenance-api-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..1ae8e092f6cd --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-maintenance-api-v1beta 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-maintenance-api-v1beta 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/maintenance/api/v1beta" + +client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/maintenance/api/v1beta" + +::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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-maintenance-api-v1beta +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/maintenance/api/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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/google-cloud-maintenance-api-v1beta/CHANGELOG.md b/google-cloud-maintenance-api-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-cloud-maintenance-api-v1beta/Gemfile b/google-cloud-maintenance-api-v1beta/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-cloud-maintenance-api-v1beta/LICENSE.md b/google-cloud-maintenance-api-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/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/google-cloud-maintenance-api-v1beta/README.md b/google-cloud-maintenance-api-v1beta/README.md new file mode 100644 index 000000000000..60fe510f8348 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Maintenance V1BETA API + +The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates. + +The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Maintenance V1BETA API. Most users should consider using +the main client gem, +[google-cloud-maintenance-api](https://rubygems.org/gems/google-cloud-maintenance-api). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-maintenance-api-v1beta +``` + +## 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/maintenance.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/maintenance/api/v1beta" + +client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new +request = ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new # (request fields as keyword arguments...) +response = client.summarize_maintenances request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-maintenance-api-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/unified-maintenance/docs/overview) +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/maintenance/api/v1beta" +require "logger" + +client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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-maintenance-api`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-maintenance-api-v1beta`. +_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-maintenance-api`. +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-maintenance-api-v1beta`. + +### 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/google-cloud-maintenance-api-v1beta/Rakefile b/google-cloud-maintenance-api-v1beta/Rakefile new file mode 100644 index 000000000000..7f44413cb0c8 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-maintenance-api-v1beta 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/maintenance/api/v1beta/maintenance/credentials" + ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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-maintenance-api-v1beta 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-maintenance-api-v1beta 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-maintenance-api-v1beta 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-maintenance-api-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-maintenance-api-v1beta" + header "google-cloud-maintenance-api-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-maintenance-api-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-maintenance-api-v1beta 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-maintenance-api-v1beta 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-maintenance-api-v1beta 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/google-cloud-maintenance-api-v1beta/gapic_metadata.json b/google-cloud-maintenance-api-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..84343be45f83 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.maintenance.api.v1beta", + "libraryPackage": "::Google::Cloud::Maintenance::Api::V1beta", + "services": { + "Maintenance": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client", + "rpcs": { + "SummarizeMaintenances": { + "methods": [ + "summarize_maintenances" + ] + }, + "ListResourceMaintenances": { + "methods": [ + "list_resource_maintenances" + ] + }, + "GetResourceMaintenance": { + "methods": [ + "get_resource_maintenance" + ] + } + } + } + } + } + } +} diff --git a/google-cloud-maintenance-api-v1beta/google-cloud-maintenance-api-v1beta.gemspec b/google-cloud-maintenance-api-v1beta/google-cloud-maintenance-api-v1beta.gemspec new file mode 100644 index 000000000000..e8ab59300909 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/google-cloud-maintenance-api-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/maintenance/api/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-maintenance-api-v1beta" + gem.version = Google::Cloud::Maintenance::Api::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates. Note that google-cloud-maintenance-api-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-maintenance-api instead. See the readme for more details." + gem.summary = "The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/google-cloud-maintenance-api-v1beta/lib/google-cloud-maintenance-api-v1beta.rb b/google-cloud-maintenance-api-v1beta/lib/google-cloud-maintenance-api-v1beta.rb new file mode 100644 index 000000000000..62fa2f9eab33 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google-cloud-maintenance-api-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta" diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta.rb new file mode 100644 index 000000000000..f9576ab60dd3 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/maintenance" +require "google/cloud/maintenance/api/v1beta/version" + +module Google + module Cloud + module Maintenance + module Api + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/maintenance/api/v1beta" + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/maintenance/api/v1beta" + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/maintenance/api/v1beta/_helpers" if ::File.file? helper_path diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb new file mode 100644 index 000000000000..c0dd98ba7b0b --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" + +module Google + module Cloud + module Maintenance + module Api + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/maintenance/api/v1beta/rest" + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new + # + module V1beta + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Maintenance", "Api"] + 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 = Configuration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + + ## + # @private + # Configuration class for the google.cloud.maintenance.api.v1beta package. + # + # This class contains common configuration for all services + # of the google.cloud.maintenance.api.v1beta package. + # + # This configuration is for internal use of the client library classes, + # and it is not intended that the end-users will read or change it. + # + class Configuration + extend ::Gapic::Config + + # @private + # Overrides for http bindings for the RPC of the mixins for this package. + # Services in this package should use these when creating clients for the mixin services. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + end + end + end + end + end +end diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance.rb new file mode 100644 index 000000000000..781039bc193f --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/version" + +require "google/cloud/maintenance/api/v1beta/maintenance/credentials" +require "google/cloud/maintenance/api/v1beta/maintenance/paths" +require "google/cloud/maintenance/api/v1beta/maintenance/client" +require "google/cloud/maintenance/api/v1beta/maintenance/rest" + +module Google + module Cloud + module Maintenance + module Api + module V1beta + ## + # Unified Maintenance service + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/maintenance/api/v1beta/maintenance" + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/maintenance/api/v1beta/maintenance/rest" + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new + # + module Maintenance + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "maintenance", "helpers.rb" +require "google/cloud/maintenance/api/v1beta/maintenance/helpers" if ::File.file? helper_path diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/client.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/client.rb new file mode 100644 index 000000000000..641ef430779b --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/client.rb @@ -0,0 +1,707 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/maintenance_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module Maintenance + module Api + module V1beta + module Maintenance + ## + # Client for the Maintenance service. + # + # Unified Maintenance service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "maintenance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :maintenance_stub + + ## + # Configure the Maintenance Client class. + # + # See {::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Maintenance clients + # ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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", "Maintenance", "Api", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Maintenance 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::Maintenance::Api::V1beta::Maintenance::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 + @maintenance_stub.universe_domain + end + + ## + # Create a new Maintenance client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Maintenance 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/maintenance/api/v1beta/maintenance_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 + + @maintenance_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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 + ) + + @maintenance_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @maintenance_stub.endpoint + config.universe_domain = @maintenance_stub.universe_domain + config.logger = @maintenance_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @maintenance_stub.logger + end + + # Service calls + + ## + # Retrieves the statistics of a specific maintenance. + # + # @overload summarize_maintenances(request, options = nil) + # Pass arguments to `summarize_maintenances` via a request object, either of type + # {::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest, ::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 summarize_maintenances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `summarize_maintenances` 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 parent of the resource maintenance. + # eg. `projects/123/locations/*` + # @param page_size [::Integer] + # The maximum number of resource maintenances to send per page. The default + # page size is 20 and the maximum is 1000. + # @param page_token [::String] + # The page token: If the next_page_token from a previous response + # is provided, this request will send the subsequent page. + # @param filter [::String] + # Filter the list as specified in https://google.aip.dev/160. + # Supported fields include: + # - state + # - resource.location + # - resource.resourceName + # - resource.type + # - maintenance.maintenanceName + # - maintenanceStartTime + # - maintenanceCompleteTime + # Examples: + # - state="SCHEDULED" + # - resource.location="us-central1-c" + # - resource.resourceName=~"*/instance-20241212-211259" + # - maintenanceStartTime>"2000-10-11T20:44:51Z" + # - state="SCHEDULED" OR resource.type="compute.googleapis.com/Instance" + # - maintenance.maitenanceName="eb3b709c-9ca1-5472-9fb6-800a3849eda1" AND + # maintenanceCompleteTime>"2000-10-11T20:44:51Z" + # @param order_by [::String] + # Order results as specified in https://google.aip.dev/132. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/maintenance/api/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new + # + # # Call the summarize_maintenances method. + # result = client.summarize_maintenances 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::Maintenance::Api::V1beta::MaintenanceSummary. + # p item + # end + # + def summarize_maintenances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest + + # 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.summarize_maintenances.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::Maintenance::Api::V1beta::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.summarize_maintenances.timeout, + metadata: metadata, + retry_policy: @config.rpcs.summarize_maintenances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @maintenance_stub.call_rpc :summarize_maintenances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @maintenance_stub, :summarize_maintenances, 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 + + ## + # Retrieve a collection of resource maintenances. + # + # @overload list_resource_maintenances(request, options = nil) + # Pass arguments to `list_resource_maintenances` via a request object, either of type + # {::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest, ::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_resource_maintenances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_maintenances` 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 parent of the resource maintenance. + # @param page_size [::Integer] + # The maximum number of resource maintenances to send per page. + # @param page_token [::String] + # The page token: If the next_page_token from a previous response + # is provided, this request will send the subsequent page. + # @param filter [::String] + # Filter the list as specified in https://google.aip.dev/160. + # @param order_by [::String] + # Order results as specified in https://google.aip.dev/132. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/maintenance/api/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest.new + # + # # Call the list_resource_maintenances method. + # result = client.list_resource_maintenances 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::Maintenance::Api::V1beta::ResourceMaintenance. + # p item + # end + # + def list_resource_maintenances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest + + # 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_resource_maintenances.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::Maintenance::Api::V1beta::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_resource_maintenances.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_maintenances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @maintenance_stub.call_rpc :list_resource_maintenances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @maintenance_stub, :list_resource_maintenances, 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 + + ## + # Retrieve a single resource maintenance. + # + # @overload get_resource_maintenance(request, options = nil) + # Pass arguments to `get_resource_maintenance` via a request object, either of type + # {::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest, ::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_resource_maintenance(name: nil) + # Pass arguments to `get_resource_maintenance` 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 resource name of the resource within a service. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/maintenance/api/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest.new + # + # # Call the get_resource_maintenance method. + # result = client.get_resource_maintenance request + # + # # The returned object is of type Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance. + # p result + # + def get_resource_maintenance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest + + # 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_resource_maintenance.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::Maintenance::Api::V1beta::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_resource_maintenance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_resource_maintenance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @maintenance_stub.call_rpc :get_resource_maintenance, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Maintenance API. + # + # This class represents the configuration for Maintenance, + # 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::Maintenance::Api::V1beta::Maintenance::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 + # # summarize_maintenances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.summarize_maintenances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.summarize_maintenances.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "maintenance.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 Maintenance 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 `summarize_maintenances` + # @return [::Gapic::Config::Method] + # + attr_reader :summarize_maintenances + ## + # RPC-specific configuration for `list_resource_maintenances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_maintenances + ## + # RPC-specific configuration for `get_resource_maintenance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_maintenance + + # @private + def initialize parent_rpcs = nil + summarize_maintenances_config = parent_rpcs.summarize_maintenances if parent_rpcs.respond_to? :summarize_maintenances + @summarize_maintenances = ::Gapic::Config::Method.new summarize_maintenances_config + list_resource_maintenances_config = parent_rpcs.list_resource_maintenances if parent_rpcs.respond_to? :list_resource_maintenances + @list_resource_maintenances = ::Gapic::Config::Method.new list_resource_maintenances_config + get_resource_maintenance_config = parent_rpcs.get_resource_maintenance if parent_rpcs.respond_to? :get_resource_maintenance + @get_resource_maintenance = ::Gapic::Config::Method.new get_resource_maintenance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/credentials.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/credentials.rb new file mode 100644 index 000000000000..3b56cbc6f541 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Maintenance + module Api + module V1beta + module Maintenance + # Credentials for the Maintenance 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/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/paths.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/paths.rb new file mode 100644 index 000000000000..81dbd98dc48e --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Maintenance + module Api + module V1beta + module Maintenance + # Path helper methods for the Maintenance 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 ResourceMaintenance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/resourceMaintenances/{resource_maintenance}` + # + # @param project [String] + # @param location [String] + # @param resource_maintenance [String] + # + # @return [::String] + def resource_maintenance_path project:, location:, resource_maintenance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/resourceMaintenances/#{resource_maintenance}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest.rb new file mode 100644 index 000000000000..c3029aa4e657 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/version" +require "google/cloud/maintenance/api/v1beta/bindings_override" + +require "google/cloud/maintenance/api/v1beta/maintenance/credentials" +require "google/cloud/maintenance/api/v1beta/maintenance/paths" +require "google/cloud/maintenance/api/v1beta/maintenance/rest/client" + +module Google + module Cloud + module Maintenance + module Api + module V1beta + ## + # Unified Maintenance service + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/maintenance/api/v1beta/maintenance/rest" + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new + # + module Maintenance + # 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/maintenance/api/v1beta/maintenance/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/client.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/client.rb new file mode 100644 index 000000000000..c9c1dbbddaee --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/client.rb @@ -0,0 +1,668 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/maintenance_service_pb" +require "google/cloud/maintenance/api/v1beta/maintenance/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Maintenance + module Api + module V1beta + module Maintenance + module Rest + ## + # REST client for the Maintenance service. + # + # Unified Maintenance service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "maintenance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :maintenance_stub + + ## + # Configure the Maintenance Client class. + # + # See {::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Maintenance clients + # ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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", "Maintenance", "Api", "V1beta"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Maintenance 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::Maintenance::Api::V1beta::Maintenance::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 + @maintenance_stub.universe_domain + end + + ## + # Create a new Maintenance REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Maintenance 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 + + @maintenance_stub = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @maintenance_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @maintenance_stub.endpoint + config.universe_domain = @maintenance_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @maintenance_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @maintenance_stub.logger + end + + # Service calls + + ## + # Retrieves the statistics of a specific maintenance. + # + # @overload summarize_maintenances(request, options = nil) + # Pass arguments to `summarize_maintenances` via a request object, either of type + # {::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest, ::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 summarize_maintenances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `summarize_maintenances` 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 parent of the resource maintenance. + # eg. `projects/123/locations/*` + # @param page_size [::Integer] + # The maximum number of resource maintenances to send per page. The default + # page size is 20 and the maximum is 1000. + # @param page_token [::String] + # The page token: If the next_page_token from a previous response + # is provided, this request will send the subsequent page. + # @param filter [::String] + # Filter the list as specified in https://google.aip.dev/160. + # Supported fields include: + # - state + # - resource.location + # - resource.resourceName + # - resource.type + # - maintenance.maintenanceName + # - maintenanceStartTime + # - maintenanceCompleteTime + # Examples: + # - state="SCHEDULED" + # - resource.location="us-central1-c" + # - resource.resourceName=~"*/instance-20241212-211259" + # - maintenanceStartTime>"2000-10-11T20:44:51Z" + # - state="SCHEDULED" OR resource.type="compute.googleapis.com/Instance" + # - maintenance.maitenanceName="eb3b709c-9ca1-5472-9fb6-800a3849eda1" AND + # maintenanceCompleteTime>"2000-10-11T20:44:51Z" + # @param order_by [::String] + # Order results as specified in https://google.aip.dev/132. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/maintenance/api/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new + # + # # Call the summarize_maintenances method. + # result = client.summarize_maintenances 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::Maintenance::Api::V1beta::MaintenanceSummary. + # p item + # end + # + def summarize_maintenances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest + + # 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.summarize_maintenances.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::Maintenance::Api::V1beta::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.summarize_maintenances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.summarize_maintenances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @maintenance_stub.summarize_maintenances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @maintenance_stub, :summarize_maintenances, "maintenances", 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 + + ## + # Retrieve a collection of resource maintenances. + # + # @overload list_resource_maintenances(request, options = nil) + # Pass arguments to `list_resource_maintenances` via a request object, either of type + # {::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest, ::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_resource_maintenances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_maintenances` 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 parent of the resource maintenance. + # @param page_size [::Integer] + # The maximum number of resource maintenances to send per page. + # @param page_token [::String] + # The page token: If the next_page_token from a previous response + # is provided, this request will send the subsequent page. + # @param filter [::String] + # Filter the list as specified in https://google.aip.dev/160. + # @param order_by [::String] + # Order results as specified in https://google.aip.dev/132. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/maintenance/api/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest.new + # + # # Call the list_resource_maintenances method. + # result = client.list_resource_maintenances 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::Maintenance::Api::V1beta::ResourceMaintenance. + # p item + # end + # + def list_resource_maintenances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest + + # 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_resource_maintenances.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::Maintenance::Api::V1beta::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_resource_maintenances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_maintenances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @maintenance_stub.list_resource_maintenances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @maintenance_stub, :list_resource_maintenances, "resource_maintenances", 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 + + ## + # Retrieve a single resource maintenance. + # + # @overload get_resource_maintenance(request, options = nil) + # Pass arguments to `get_resource_maintenance` via a request object, either of type + # {::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest, ::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_resource_maintenance(name: nil) + # Pass arguments to `get_resource_maintenance` 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 resource name of the resource within a service. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/maintenance/api/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest.new + # + # # Call the get_resource_maintenance method. + # result = client.get_resource_maintenance request + # + # # The returned object is of type Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance. + # p result + # + def get_resource_maintenance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest + + # 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_resource_maintenance.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::Maintenance::Api::V1beta::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_resource_maintenance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_resource_maintenance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @maintenance_stub.get_resource_maintenance 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 + + ## + # Configuration class for the Maintenance REST API. + # + # This class represents the configuration for Maintenance 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::Maintenance::Api::V1beta::Maintenance::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 + # # summarize_maintenances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.summarize_maintenances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.summarize_maintenances.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 = "maintenance.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, 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 Maintenance 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 `summarize_maintenances` + # @return [::Gapic::Config::Method] + # + attr_reader :summarize_maintenances + ## + # RPC-specific configuration for `list_resource_maintenances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_maintenances + ## + # RPC-specific configuration for `get_resource_maintenance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_maintenance + + # @private + def initialize parent_rpcs = nil + summarize_maintenances_config = parent_rpcs.summarize_maintenances if parent_rpcs.respond_to? :summarize_maintenances + @summarize_maintenances = ::Gapic::Config::Method.new summarize_maintenances_config + list_resource_maintenances_config = parent_rpcs.list_resource_maintenances if parent_rpcs.respond_to? :list_resource_maintenances + @list_resource_maintenances = ::Gapic::Config::Method.new list_resource_maintenances_config + get_resource_maintenance_config = parent_rpcs.get_resource_maintenance if parent_rpcs.respond_to? :get_resource_maintenance + @get_resource_maintenance = ::Gapic::Config::Method.new get_resource_maintenance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/service_stub.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/service_stub.rb new file mode 100644 index 000000000000..5618dfa6e393 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/service_stub.rb @@ -0,0 +1,266 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/maintenance_service_pb" + +module Google + module Cloud + module Maintenance + module Api + module V1beta + module Maintenance + module Rest + ## + # REST service stub for the Maintenance 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: true, + 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 summarize_maintenances REST call + # + # @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest] + # 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::Maintenance::Api::V1beta::SummarizeMaintenancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse] + # A result object deserialized from the server's reply + def summarize_maintenances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_summarize_maintenances_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: "summarize_maintenances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse.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_resource_maintenances REST call + # + # @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest] + # 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::Maintenance::Api::V1beta::ListResourceMaintenancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse] + # A result object deserialized from the server's reply + def list_resource_maintenances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_maintenances_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_resource_maintenances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse.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_resource_maintenance REST call + # + # @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest] + # 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::Maintenance::Api::V1beta::ResourceMaintenance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance] + # A result object deserialized from the server's reply + def get_resource_maintenance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_maintenance_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_resource_maintenance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance.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 summarize_maintenances REST call + # + # @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_summarize_maintenances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/resourceMaintenances:summarize", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_maintenances REST call + # + # @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest] + # 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_resource_maintenances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/resourceMaintenances", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_resource_maintenance REST call + # + # @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest] + # 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_resource_maintenance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/resourceMaintenances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance_service_pb.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance_service_pb.rb new file mode 100644 index 000000000000..11cd46bdf554 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/maintenance_service_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/maintenance/api/v1beta/maintenance_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n=google/cloud/maintenance/api/v1beta/maintenance_service.proto\x12#google.cloud.maintenance.api.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb4\x01\n\x1cSummarizeMaintenancesRequest\x12G\n\x06parent\x18\x96N \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.maintenance.googleapis.com/ResourceMaintenance\x12\x12\n\tpage_size\x18\x89R \x01(\x05\x12\x13\n\npage_token\x18\x8aR \x01(\t\x12\x0f\n\x06\x66ilter\x18\x8bR \x01(\t\x12\x11\n\x08order_by\x18\x8cR \x01(\t\"\xa4\x01\n\x1dSummarizeMaintenancesResponse\x12N\n\x0cmaintenances\x18\x8dR \x03(\x0b\x32\x37.google.cloud.maintenance.api.v1beta.MaintenanceSummary\x12\x18\n\x0fnext_page_token\x18\x8eR \x01(\t\x12\x19\n\x0bunreachable\x18\x8fR \x03(\tB\x03\xe0\x41\x06\"\xa6\x06\n\x12MaintenanceSummary\x12\x1d\n\x10maintenance_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12O\n\x08\x63\x61tegory\x18\r \x01(\x0e\x32\x38.google.cloud.maintenance.api.v1beta.MaintenanceCategoryB\x03\xe0\x41\x03\x12I\n maintenance_scheduled_start_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x1emaintenance_scheduled_end_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16maintenance_start_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14maintenance_end_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11user_controllable\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12N\n\x08\x63ontrols\x18\x0e \x03(\x0b\x32\x37.google.cloud.maintenance.api.v1beta.MaintenanceControlB\x03\xe0\x41\x03\x12Q\n\x05stats\x18\x0c \x03(\x0b\x32=.google.cloud.maintenance.api.v1beta.MaintenanceSummary.StatsB\x03\xe0\x41\x03\x1ap\n\x05Stats\x12\x10\n\x08group_by\x18\x01 \x01(\t\x12U\n\naggregates\x18\x02 \x03(\x0b\x32\x41.google.cloud.maintenance.api.v1beta.MaintenanceSummary.Aggregate\x1a)\n\tAggregate\x12\r\n\x05group\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc8\r\n\x13ResourceMaintenance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12X\n\x08resource\x18\x02 \x01(\x0b\x32\x41.google.cloud.maintenance.api.v1beta.ResourceMaintenance.ResourceB\x03\xe0\x41\x03\x12^\n\x0bmaintenance\x18\x03 \x01(\x0b\x32\x44.google.cloud.maintenance.api.v1beta.ResourceMaintenance.MaintenanceB\x03\xe0\x41\x03\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.maintenance.api.v1beta.ResourceMaintenance.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16maintenance_start_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14maintenance_end_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x17maintenance_cancel_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n maintenance_scheduled_start_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x1emaintenance_scheduled_end_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11user_controllable\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12N\n\x08\x63ontrols\x18\r \x03(\x0b\x32\x37.google.cloud.maintenance.api.v1beta.MaintenanceControlB\x03\xe0\x41\x03\x12Z\n\x06labels\x18\xa1Q \x03(\x0b\x32\x44.google.cloud.maintenance.api.v1beta.ResourceMaintenance.LabelsEntryB\x03\xe0\x41\x01\x12\x64\n\x0b\x61nnotations\x18\xa2Q \x03(\x0b\x32I.google.cloud.maintenance.api.v1beta.ResourceMaintenance.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x03uid\x18\xd9O \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x04\x65tag\x18\xdaO \x01(\tB\x03\xe0\x41\x03\x1aP\n\x08Resource\x12\x1a\n\rresource_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x03 \x01(\tB\x03\xe0\x41\x03\x1a\xa6\x01\n\x0bMaintenance\x12\x18\n\x10maintenance_name\x18\x01 \x01(\t\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12O\n\x08\x63\x61tegory\x18\x04 \x01(\x0e\x32\x38.google.cloud.maintenance.api.v1beta.MaintenanceCategoryB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04:\xb4\x01\xea\x41\xb0\x01\n.maintenance.googleapis.com/ResourceMaintenance\x12Sprojects/{project}/locations/{location}/resourceMaintenances/{resource_maintenance}*\x14resourceMaintenances2\x13resourceMaintenance\"\xe2\x01\n\x12MaintenanceControl\x12P\n\x07\x63ontrol\x18\x01 \x01(\x0e\x32?.google.cloud.maintenance.api.v1beta.MaintenanceControl.Control\x12\x11\n\tis_custom\x18\x02 \x01(\x08\x12\x15\n\rdocumentation\x18\x03 \x01(\t\"P\n\x07\x43ontrol\x12\x17\n\x13\x43ONTROL_UNSPECIFIED\x10\x00\x12\t\n\x05\x41PPLY\x10\x01\x12\x11\n\rMANAGE_POLICY\x10\x02\x12\x0e\n\nRESCHEDULE\x10\x03\"\xb7\x01\n\x1fListResourceMaintenancesRequest\x12G\n\x06parent\x18\x96N \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.maintenance.googleapis.com/ResourceMaintenance\x12\x12\n\tpage_size\x18\x89R \x01(\x05\x12\x13\n\npage_token\x18\x8aR \x01(\t\x12\x0f\n\x06\x66ilter\x18\x8bR \x01(\t\x12\x11\n\x08order_by\x18\x8cR \x01(\t\"\xac\x01\n ListResourceMaintenancesResponse\x12X\n\x15resource_maintenances\x18\x8dR \x03(\x0b\x32\x38.google.cloud.maintenance.api.v1beta.ResourceMaintenance\x12\x18\n\x0fnext_page_token\x18\x8eR \x01(\t\x12\x14\n\x0bunreachable\x18\x8fR \x03(\t\"f\n\x1dGetResourceMaintenanceRequest\x12\x45\n\x04name\x18\x91N \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.maintenance.googleapis.com/ResourceMaintenance*c\n\x13MaintenanceCategory\x12$\n MAINTENANCE_CATEGORY_UNSPECIFIED\x10\x00\x12\x12\n\x0eINFRASTRUCTURE\x10\x01\x12\x12\n\x0eSERVICE_UPDATE\x10\x03\x32\xb6\x06\n\x0bMaintenance\x12\xf7\x01\n\x15SummarizeMaintenances\x12\x41.google.cloud.maintenance.api.v1beta.SummarizeMaintenancesRequest\x1a\x42.google.cloud.maintenance.api.v1beta.SummarizeMaintenancesResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{parent=projects/*/locations/*}/resourceMaintenances:summarize\x12\xf6\x01\n\x18ListResourceMaintenances\x12\x44.google.cloud.maintenance.api.v1beta.ListResourceMaintenancesRequest\x1a\x45.google.cloud.maintenance.api.v1beta.ListResourceMaintenancesResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12] + # 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-cloud-maintenance-api-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-maintenance-api-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-maintenance-api-v1beta/proto_docs/google/api/field_info.rb b/google-cloud-maintenance-api-v1beta/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..cea53f02d1a8 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-maintenance-api-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-maintenance-api-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-maintenance-api-v1beta/proto_docs/google/api/resource.rb b/google-cloud-maintenance-api-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-maintenance-api-v1beta/proto_docs/google/cloud/maintenance/api/v1beta/maintenance_service.rb b/google-cloud-maintenance-api-v1beta/proto_docs/google/cloud/maintenance/api/v1beta/maintenance_service.rb new file mode 100644 index 000000000000..4ecc47b56d0f --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/proto_docs/google/cloud/maintenance/api/v1beta/maintenance_service.rb @@ -0,0 +1,423 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Maintenance + module Api + module V1beta + # Request message for SummarizeMaintenances custom method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the resource maintenance. + # eg. `projects/123/locations/*` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of resource maintenances to send per page. The default + # page size is 20 and the maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # The page token: If the next_page_token from a previous response + # is provided, this request will send the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Filter the list as specified in https://google.aip.dev/160. + # Supported fields include: + # - state + # - resource.location + # - resource.resourceName + # - resource.type + # - maintenance.maintenanceName + # - maintenanceStartTime + # - maintenanceCompleteTime + # Examples: + # - state="SCHEDULED" + # - resource.location="us-central1-c" + # - resource.resourceName=~"*/instance-20241212-211259" + # - maintenanceStartTime>"2000-10-11T20:44:51Z" + # - state="SCHEDULED" OR resource.type="compute.googleapis.com/Instance" + # - maintenance.maitenanceName="eb3b709c-9ca1-5472-9fb6-800a3849eda1" AND + # maintenanceCompleteTime>"2000-10-11T20:44:51Z" + # @!attribute [rw] order_by + # @return [::String] + # Order results as specified in https://google.aip.dev/132. + class SummarizeMaintenancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SummarizeMaintenances custom method. + # @!attribute [rw] maintenances + # @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>] + # The resulting summaries. + # @!attribute [rw] next_page_token + # @return [::String] + # If present, the next page token can be provided to a subsequent + # SummarizeMaintenances call to list the next page. + # If empty, there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class SummarizeMaintenancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MaintenanceSummary contains maintenance statistics calculated based on + # ResourceMaintenances within the scope: project and location. + # @!attribute [r] maintenance_name + # @return [::String] + # Output only. The name of the maintenance. + # @!attribute [r] title + # @return [::String] + # Output only. The title of the maintenance. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the maintenance. + # @!attribute [r] category + # @return [::Google::Cloud::Maintenance::Api::V1beta::MaintenanceCategory] + # Output only. The category of the maintenance event. + # @!attribute [r] maintenance_scheduled_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Scheduled start time of the maintenance. The maintenance will + # start at `maintenanceScheduledStartTime` or later, with best effort to + # finish before `maintenanceScheduledEndTime`. + # @!attribute [r] maintenance_scheduled_end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. An estimated (best effort, not guaranteed) end time of the + # scheduled maintenance. + # @!attribute [r] maintenance_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Actual date when the maintenance started. Field present only + # after the state changed to `RUNNING`. + # @!attribute [r] maintenance_end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Actual date when the maintenance successfully completed. Field + # present only after the state changed to `SUCCEEDED`. + # @!attribute [r] user_controllable + # @return [::Boolean] + # Output only. Indicates whether the user has some control over that + # maintenance, either proactively before maintenance was scheduled with + # maintenance policy or with reactive controls after it was scheduled (see + # controls field). + # @!attribute [r] controls + # @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceControl>] + # Output only. Control available for that Maintenance (might not be available + # for every resource that maintenance is applied to). + # @!attribute [r] stats + # @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary::Stats>] + # Output only. Stats is a field of ResourceMaintenance used to aggregate the + # stats. + class MaintenanceSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stats indicates the type of aggregate and the corresponding aggregates. + # @!attribute [rw] group_by + # @return [::String] + # groupBy specifies the type of aggregate. + # For example a group_by might be `"state"` + # @!attribute [rw] aggregates + # @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary::Aggregate>] + # Aggregates is a list pairs. For example, if the + # group_by is `"state"` a possible tuple in the aggregates list could be + # "SCHEDULED" : `11`, + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregate is a pair. + # @!attribute [rw] group + # @return [::String] + # Specifies what specific value of the group_by the count represents. For + # example if group_by is `"state"` its corresponding group could be + # `"SCHEDULED"`. + # @!attribute [rw] count + # @return [::Integer] + # The count of the group. + class Aggregate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # ResourceMaintenance is a resource that represents a maintenance operation + # on a resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the resource_maintenance resource. + # Format: + # `"projects/{project}/locations/{location}/resourceMaintenance/{resource-maintenance-id}"` + # @!attribute [r] resource + # @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance::Resource] + # Output only. The resource spec of the resource maintenance. + # @!attribute [r] maintenance + # @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance::Maintenance] + # Output only. The details of the maintenance. + # @!attribute [r] state + # @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance::State] + # Output only. The state of the resource maintenance. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The create time of the resource maintenance. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time of the resource maintenance. + # @!attribute [r] maintenance_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the resource maintenance has started. + # @!attribute [r] maintenance_end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the resource maintenance has completed. + # @!attribute [r] maintenance_cancel_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the resource maintenance was cancelled. + # @!attribute [r] maintenance_scheduled_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the maintenance on the resource was scheduled to + # start. + # @!attribute [r] maintenance_scheduled_end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the maintenance on the resource was scheduled to + # end. + # @!attribute [r] user_controllable + # @return [::Boolean] + # Output only. Indicates whether the user has some control over that + # maintenance, either + # proactively before maintenance was scheduled with maintenance policy or + # with reactive controls after it was scheduled (see controls field) + # @!attribute [r] controls + # @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceControl>] + # Output only. The controls of the maintenance. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels on the resource, which can be used for categorization. + # similar to Kubernetes resource labels. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Annotations is an unstructured key-value map stored with a + # resource that may be set by external tools to store and retrieve arbitrary + # metadata. They are not queryable and should be preserved when modifying + # objects. + # + # More info: https://kubernetes.io/docs/user-guide/annotations + # @!attribute [r] uid + # @return [::String] + # Output only. The unique identifier of the resource. UID is unique in the + # time and space for this resource within the scope of the service. It is + # typically generated by the server on successful creation of a resource + # and must not be changed. UID is used to uniquely identify resources + # with resource name reuses. This should be a UUID4. + # @!attribute [r] etag + # @return [::String] + # Output only. An opaque value that uniquely identifies a version or + # generation of a resource. It can be used to confirm that the client + # and server agree on the ordering of a resource being written. + class ResourceMaintenance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Resource contains information about the resource affected by maintenance. + # @!attribute [r] resource_name + # @return [::String] + # Output only. Name is the reference to the consumer resource affected by + # the maintenance. Available values can be found here: + # https://cloud.google.com/asset-inventory/docs/asset-names + # @!attribute [r] location + # @return [::String] + # Output only. The location of the resource. + # Format: + # `us-central1` + # @!attribute [r] type + # @return [::String] + # Output only. The type of the resource. + # Available values can be found here: + # https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types + # Please note that not all the resource types will have their maintenances + # reported. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Maintenance is the maintenance details of a resource's maintenance. + # @!attribute [rw] maintenance_name + # @return [::String] + # Maintenance is the name of the corresponding maintenance resource + # following the standard naming scheme: `"{maintenance-id}"` + # @!attribute [r] title + # @return [::String] + # Output only. The title of the maintenance. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the maintenance. + # @!attribute [r] category + # @return [::Google::Cloud::Maintenance::Api::V1beta::MaintenanceCategory] + # Output only. The category of the maintenance. + class Maintenance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State is the state of a resource maintenance. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Scheduled for a particular window. For disruptive maintenance it should + # respect maintenance policy, i.e. its available windows, exclusions and + # notification period. + SCHEDULED = 1 + + # Maintenance is ongoing. + RUNNING = 2 + + # No longer planned, typically when other maintenance (e.g. upgrade to + # newer version) already happened, or the user skipped the maintenance. + CANCELLED = 3 + + # Successfully completed. + SUCCEEDED = 4 + end + end + + # The control of the maintenance. + # @!attribute [rw] control + # @return [::Google::Cloud::Maintenance::Api::V1beta::MaintenanceControl::Control] + # The control of the resource maintenance. + # @!attribute [rw] is_custom + # @return [::Boolean] + # Indicates whether the control is available only in Service Producer API + # (not through Unified Maintenance). + # @!attribute [rw] documentation + # @return [::String] + # Link to Service Producer documentation about maintenance control. Provided + # only when `isCustom` is `true`. + class MaintenanceControl + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Sets the type of control supported. comment (as in logs). + module Control + # Unspecified control. + CONTROL_UNSPECIFIED = 0 + + # Apply control. + APPLY = 1 + + # Manage policy control. + MANAGE_POLICY = 2 + + # Reschedule control. + RESCHEDULE = 3 + end + end + + # The request structure for the ListResourceMaintenances method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the resource maintenance. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of resource maintenances to send per page. + # @!attribute [rw] page_token + # @return [::String] + # The page token: If the next_page_token from a previous response + # is provided, this request will send the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Filter the list as specified in https://google.aip.dev/160. + # @!attribute [rw] order_by + # @return [::String] + # Order results as specified in https://google.aip.dev/132. + class ListResourceMaintenancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response structure for the ListResourceMaintenances method. + # @!attribute [rw] resource_maintenances + # @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>] + # The resulting resource maintenances. + # @!attribute [rw] next_page_token + # @return [::String] + # If present, the next page token can be provided to a subsequent + # ListResourceMaintenances call to list the next page. + # If empty, there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListResourceMaintenancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request structure for the GetResourceMaintenance method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the resource within a service. + class GetResourceMaintenanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Category of the maintenance. + module MaintenanceCategory + # Unspecified category. + MAINTENANCE_CATEGORY_UNSPECIFIED = 0 + + # Infrastructure maintenance events are times that Google Cloud performs + # regular maintenance on network equipment e.g. Google Cloud Interconnect + # These events are usually scheduled in advance and we provide + # notification, when possible, so that users can plan for the + # infrastructure maintenance event and prevent downtime. Infrastructure + # maintenance events don't have a set interval between occurrences, but + # generally occur several times a year. + INFRASTRUCTURE = 1 + + # Updates that can include bug fixes, changes, or new features that are + # backward compatible with existing versions (including patches). + # Some SPs allow users to control the scheduling of these maintenance + # events using maintenance windows and/or deny maintenance features. + SERVICE_UPDATE = 3 + end + end + end + end + end +end diff --git a/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/any.rb b/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..9e9bdbb09ea4 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-maintenance-api-v1beta/snippets/Gemfile b/google-cloud-maintenance-api-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..8860a46f93ac --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-maintenance-api-v1beta", path: "../" +else + gem "google-cloud-maintenance-api-v1beta" +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/google-cloud-maintenance-api-v1beta/snippets/maintenance/get_resource_maintenance.rb b/google-cloud-maintenance-api-v1beta/snippets/maintenance/get_resource_maintenance.rb new file mode 100644 index 000000000000..e4b5d2ca1642 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/snippets/maintenance/get_resource_maintenance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 maintenance_v1beta_generated_Maintenance_GetResourceMaintenance_sync] +require "google/cloud/maintenance/api/v1beta" + +## +# Snippet for the get_resource_maintenance call in the Maintenance 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::Maintenance::Api::V1beta::Maintenance::Client#get_resource_maintenance. +# +def get_resource_maintenance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest.new + + # Call the get_resource_maintenance method. + result = client.get_resource_maintenance request + + # The returned object is of type Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance. + p result +end +# [END maintenance_v1beta_generated_Maintenance_GetResourceMaintenance_sync] diff --git a/google-cloud-maintenance-api-v1beta/snippets/maintenance/list_resource_maintenances.rb b/google-cloud-maintenance-api-v1beta/snippets/maintenance/list_resource_maintenances.rb new file mode 100644 index 000000000000..c1666f5fea6f --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/snippets/maintenance/list_resource_maintenances.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 maintenance_v1beta_generated_Maintenance_ListResourceMaintenances_sync] +require "google/cloud/maintenance/api/v1beta" + +## +# Snippet for the list_resource_maintenances call in the Maintenance 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::Maintenance::Api::V1beta::Maintenance::Client#list_resource_maintenances. +# +def list_resource_maintenances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest.new + + # Call the list_resource_maintenances method. + result = client.list_resource_maintenances 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::Maintenance::Api::V1beta::ResourceMaintenance. + p item + end +end +# [END maintenance_v1beta_generated_Maintenance_ListResourceMaintenances_sync] diff --git a/google-cloud-maintenance-api-v1beta/snippets/maintenance/summarize_maintenances.rb b/google-cloud-maintenance-api-v1beta/snippets/maintenance/summarize_maintenances.rb new file mode 100644 index 000000000000..40eab8fde734 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/snippets/maintenance/summarize_maintenances.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 maintenance_v1beta_generated_Maintenance_SummarizeMaintenances_sync] +require "google/cloud/maintenance/api/v1beta" + +## +# Snippet for the summarize_maintenances call in the Maintenance 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::Maintenance::Api::V1beta::Maintenance::Client#summarize_maintenances. +# +def summarize_maintenances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new + + # Call the summarize_maintenances method. + result = client.summarize_maintenances 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::Maintenance::Api::V1beta::MaintenanceSummary. + p item + end +end +# [END maintenance_v1beta_generated_Maintenance_SummarizeMaintenances_sync] diff --git a/google-cloud-maintenance-api-v1beta/snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json b/google-cloud-maintenance-api-v1beta/snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json new file mode 100644 index 000000000000..a3355d4b739f --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-cloud-maintenance-api-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.maintenance.api.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "maintenance_v1beta_generated_Maintenance_SummarizeMaintenances_sync", + "title": "Snippet for the summarize_maintenances call in the Maintenance service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client#summarize_maintenances.", + "file": "maintenance/summarize_maintenances.rb", + "language": "RUBY", + "client_method": { + "short_name": "summarize_maintenances", + "full_name": "::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client#summarize_maintenances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse", + "client": { + "short_name": "Maintenance::Client", + "full_name": "::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client" + }, + "method": { + "short_name": "SummarizeMaintenances", + "full_name": "google.cloud.maintenance.api.v1beta.Maintenance.SummarizeMaintenances", + "service": { + "short_name": "Maintenance", + "full_name": "google.cloud.maintenance.api.v1beta.Maintenance" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "maintenance_v1beta_generated_Maintenance_ListResourceMaintenances_sync", + "title": "Snippet for the list_resource_maintenances call in the Maintenance service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client#list_resource_maintenances.", + "file": "maintenance/list_resource_maintenances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_maintenances", + "full_name": "::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client#list_resource_maintenances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse", + "client": { + "short_name": "Maintenance::Client", + "full_name": "::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client" + }, + "method": { + "short_name": "ListResourceMaintenances", + "full_name": "google.cloud.maintenance.api.v1beta.Maintenance.ListResourceMaintenances", + "service": { + "short_name": "Maintenance", + "full_name": "google.cloud.maintenance.api.v1beta.Maintenance" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "maintenance_v1beta_generated_Maintenance_GetResourceMaintenance_sync", + "title": "Snippet for the get_resource_maintenance call in the Maintenance service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client#get_resource_maintenance.", + "file": "maintenance/get_resource_maintenance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_resource_maintenance", + "full_name": "::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client#get_resource_maintenance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance", + "client": { + "short_name": "Maintenance::Client", + "full_name": "::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client" + }, + "method": { + "short_name": "GetResourceMaintenance", + "full_name": "google.cloud.maintenance.api.v1beta.Maintenance.GetResourceMaintenance", + "service": { + "short_name": "Maintenance", + "full_name": "google.cloud.maintenance.api.v1beta.Maintenance" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_paths_test.rb b/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_paths_test.rb new file mode 100644 index 000000000000..9ea29c54c9d8 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/maintenance" + +class ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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::Maintenance::Api::V1beta::Maintenance::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_resource_maintenance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.resource_maintenance_path project: "value0", location: "value1", resource_maintenance: "value2" + assert_equal "projects/value0/locations/value1/resourceMaintenances/value2", path + end + end +end diff --git a/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_rest_test.rb b/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_rest_test.rb new file mode 100644 index 000000000000..1c4482b40c22 --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_rest_test.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/maintenance_service_pb" +require "google/cloud/maintenance/api/v1beta/maintenance/rest" + + +class ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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_summarize_maintenances + # Create test objects. + client_result = ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + summarize_maintenances_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::Maintenance::Api::V1beta::Maintenance::Rest::ServiceStub.stub :transcode_summarize_maintenances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, summarize_maintenances_client_stub do + # Create client + client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.summarize_maintenances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.summarize_maintenances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.summarize_maintenances ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.summarize_maintenances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.summarize_maintenances(::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, summarize_maintenances_client_stub.call_count + end + end + end + + def test_list_resource_maintenances + # Create test objects. + client_result = ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_maintenances_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::Maintenance::Api::V1beta::Maintenance::Rest::ServiceStub.stub :transcode_list_resource_maintenances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_maintenances_client_stub do + # Create client + client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_resource_maintenances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_resource_maintenances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_resource_maintenances ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_resource_maintenances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_resource_maintenances(::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_maintenances_client_stub.call_count + end + end + end + + def test_get_resource_maintenance + # Create test objects. + client_result = ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_maintenance_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::Maintenance::Api::V1beta::Maintenance::Rest::ServiceStub.stub :transcode_get_resource_maintenance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_resource_maintenance_client_stub do + # Create client + client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_resource_maintenance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_resource_maintenance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_resource_maintenance ::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_resource_maintenance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_resource_maintenance(::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_resource_maintenance_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::Maintenance::Api::V1beta::Maintenance::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::Maintenance::Api::V1beta::Maintenance::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_test.rb b/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_test.rb new file mode 100644 index 000000000000..0e13e092d66d --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_test.rb @@ -0,0 +1,285 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api/v1beta/maintenance_service_pb" +require "google/cloud/maintenance/api/v1beta/maintenance_service_services_pb" +require "google/cloud/maintenance/api/v1beta/maintenance" + +class ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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_summarize_maintenances + # Create GRPC objects. + grpc_response = ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + summarize_maintenances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :summarize_maintenances, name + assert_kind_of ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, summarize_maintenances_client_stub do + # Create client + client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.summarize_maintenances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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.summarize_maintenances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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.summarize_maintenances ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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.summarize_maintenances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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.summarize_maintenances(::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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, summarize_maintenances_client_stub.call_rpc_count + end + end + + def test_list_resource_maintenances + # Create GRPC objects. + grpc_response = ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_maintenances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_maintenances, name + assert_kind_of ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_maintenances_client_stub do + # Create client + client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_resource_maintenances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_resource_maintenances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_resource_maintenances ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_resource_maintenances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_resource_maintenances(::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_resource_maintenances_client_stub.call_rpc_count + end + end + + def test_get_resource_maintenance + # Create GRPC objects. + grpc_response = ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance.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" + + get_resource_maintenance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_resource_maintenance, name + assert_kind_of ::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_resource_maintenance_client_stub do + # Create client + client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_resource_maintenance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_resource_maintenance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_resource_maintenance ::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_resource_maintenance({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_resource_maintenance(::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest.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, get_resource_maintenance_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::Maintenance::Api::V1beta::Maintenance::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::Maintenance::Api::V1beta::Maintenance::Client::Configuration, config + end +end diff --git a/google-cloud-maintenance-api-v1beta/test/helper.rb b/google-cloud-maintenance-api-v1beta/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-cloud-maintenance-api-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index fa4d850a45b7..a17ca15531e7 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -943,6 +943,10 @@ "component": "google-cloud-lustre-v1", "version_file": "lib/google/cloud/lustre/v1/version.rb" }, + "google-cloud-maintenance-api-v1beta": { + "component": "google-cloud-maintenance-api-v1beta", + "version_file": "lib/google/cloud/maintenance/api/v1beta/version.rb" + }, "google-cloud-managed_identities": { "component": "google-cloud-managed_identities", "version_file": "lib/google/cloud/managed_identities/version.rb" From 493f8965bd84da33057c48218494feb0bcd39df8 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 15 Jul 2025 20:05:55 -0700 Subject: [PATCH 268/457] feat: Initial generation of google-cloud-maintenance-api (#30686) --- .release-please-manifest.json | 2 + google-cloud-maintenance-api/.OwlBot.yaml | 3 + google-cloud-maintenance-api/.gitignore | 22 ++ .../.owlbot-manifest.json | 25 +++ .../.repo-metadata.json | 17 ++ google-cloud-maintenance-api/.rubocop.yml | 39 ++++ google-cloud-maintenance-api/.toys.rb | 28 +++ google-cloud-maintenance-api/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++++++++++ google-cloud-maintenance-api/CHANGELOG.md | 2 + google-cloud-maintenance-api/Gemfile | 28 +++ google-cloud-maintenance-api/LICENSE.md | 201 ++++++++++++++++++ google-cloud-maintenance-api/README.md | 134 ++++++++++++ google-cloud-maintenance-api/Rakefile | 169 +++++++++++++++ .../google-cloud-maintenance-api.gemspec | 27 +++ .../lib/google-cloud-maintenance-api.rb | 19 ++ .../lib/google/cloud/maintenance/api.rb | 158 ++++++++++++++ .../google/cloud/maintenance/api/version.rb | 28 +++ .../cloud/maintenance/api/client_test.rb | 64 ++++++ .../cloud/maintenance/api/version_test.rb | 26 +++ google-cloud-maintenance-api/test/helper.rb | 25 +++ release-please-config.json | 4 + 22 files changed, 1154 insertions(+) create mode 100644 google-cloud-maintenance-api/.OwlBot.yaml create mode 100644 google-cloud-maintenance-api/.gitignore create mode 100644 google-cloud-maintenance-api/.owlbot-manifest.json create mode 100644 google-cloud-maintenance-api/.repo-metadata.json create mode 100644 google-cloud-maintenance-api/.rubocop.yml create mode 100644 google-cloud-maintenance-api/.toys.rb create mode 100644 google-cloud-maintenance-api/.yardopts create mode 100644 google-cloud-maintenance-api/AUTHENTICATION.md create mode 100644 google-cloud-maintenance-api/CHANGELOG.md create mode 100644 google-cloud-maintenance-api/Gemfile create mode 100644 google-cloud-maintenance-api/LICENSE.md create mode 100644 google-cloud-maintenance-api/README.md create mode 100644 google-cloud-maintenance-api/Rakefile create mode 100644 google-cloud-maintenance-api/google-cloud-maintenance-api.gemspec create mode 100644 google-cloud-maintenance-api/lib/google-cloud-maintenance-api.rb create mode 100644 google-cloud-maintenance-api/lib/google/cloud/maintenance/api.rb create mode 100644 google-cloud-maintenance-api/lib/google/cloud/maintenance/api/version.rb create mode 100644 google-cloud-maintenance-api/test/google/cloud/maintenance/api/client_test.rb create mode 100644 google-cloud-maintenance-api/test/google/cloud/maintenance/api/version_test.rb create mode 100644 google-cloud-maintenance-api/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 88bcab0bae93..4c6a52515f37 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -465,6 +465,8 @@ "google-cloud-lustre+FILLER": "0.0.0", "google-cloud-lustre-v1": "0.1.1", "google-cloud-lustre-v1+FILLER": "0.0.0", + "google-cloud-maintenance-api": "0.0.1", + "google-cloud-maintenance-api+FILLER": "0.0.0", "google-cloud-maintenance-api-v1beta": "0.0.1", "google-cloud-maintenance-api-v1beta+FILLER": "0.0.0", "google-cloud-managed_identities": "1.4.1", diff --git a/google-cloud-maintenance-api/.OwlBot.yaml b/google-cloud-maintenance-api/.OwlBot.yaml new file mode 100644 index 000000000000..100181f6240d --- /dev/null +++ b/google-cloud-maintenance-api/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/cloud/maintenance/api/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-cloud-maintenance-api/$1 diff --git a/google-cloud-maintenance-api/.gitignore b/google-cloud-maintenance-api/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-cloud-maintenance-api/.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/google-cloud-maintenance-api/.owlbot-manifest.json b/google-cloud-maintenance-api/.owlbot-manifest.json new file mode 100644 index 000000000000..9df950feb052 --- /dev/null +++ b/google-cloud-maintenance-api/.owlbot-manifest.json @@ -0,0 +1,25 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "google-cloud-maintenance-api.gemspec", + "lib/google-cloud-maintenance-api.rb", + "lib/google/cloud/maintenance/api.rb", + "lib/google/cloud/maintenance/api/version.rb", + "test/google/cloud/maintenance/api/client_test.rb", + "test/google/cloud/maintenance/api/version_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-cloud-maintenance-api/.repo-metadata.json b/google-cloud-maintenance-api/.repo-metadata.json new file mode 100644 index 000000000000..22d9d940e65a --- /dev/null +++ b/google-cloud-maintenance-api/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "maintenance.googleapis.com", + "api_shortname": "maintenance", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-maintenance-api/latest", + "distribution_name": "google-cloud-maintenance-api", + "is_cloud": true, + "language": "ruby", + "name": "maintenance", + "name_pretty": "Maintenance API", + "product_documentation": "https://cloud.google.com/unified-maintenance/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates.", + "ruby-cloud-product-url": "https://cloud.google.com/unified-maintenance/docs/overview", + "library_type": "GAPIC_MANUAL" +} diff --git a/google-cloud-maintenance-api/.rubocop.yml b/google-cloud-maintenance-api/.rubocop.yml new file mode 100644 index 000000000000..60db4435ba1f --- /dev/null +++ b/google-cloud-maintenance-api/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-maintenance-api.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-maintenance-api.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/google-cloud-maintenance-api/.toys.rb b/google-cloud-maintenance-api/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-cloud-maintenance-api/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-maintenance-api/.yardopts b/google-cloud-maintenance-api/.yardopts new file mode 100644 index 000000000000..8a4de49df535 --- /dev/null +++ b/google-cloud-maintenance-api/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Maintenance API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/google-cloud-maintenance-api/AUTHENTICATION.md b/google-cloud-maintenance-api/AUTHENTICATION.md new file mode 100644 index 000000000000..bac15f53dc6e --- /dev/null +++ b/google-cloud-maintenance-api/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-maintenance-api 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-maintenance-api 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/maintenance/api" + +client = Google::Cloud::Maintenance::Api.maintenance do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/maintenance/api" + +Google::Cloud::Maintenance::Api.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Maintenance::Api.maintenance +``` + +### 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-maintenance-api +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/maintenance/api" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Maintenance::Api.maintenance +``` + +### 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/google-cloud-maintenance-api/CHANGELOG.md b/google-cloud-maintenance-api/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-cloud-maintenance-api/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-cloud-maintenance-api/Gemfile b/google-cloud-maintenance-api/Gemfile new file mode 100644 index 000000000000..6650335bb0ec --- /dev/null +++ b/google-cloud-maintenance-api/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-maintenance-api-v1beta"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-maintenance-api.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-cloud-maintenance-api/LICENSE.md b/google-cloud-maintenance-api/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-cloud-maintenance-api/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/google-cloud-maintenance-api/README.md b/google-cloud-maintenance-api/README.md new file mode 100644 index 000000000000..160361a6307d --- /dev/null +++ b/google-cloud-maintenance-api/README.md @@ -0,0 +1,134 @@ +# Ruby Client for the Maintenance API + +The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates. + +The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-maintenance-api-v*`. +The gem `google-cloud-maintenance-api` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-maintenance-api/latest) +for this library, google-cloud-maintenance-api, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-maintenance-api-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-maintenance-api-v1beta/latest). + +See also the [Product Documentation](https://cloud.google.com/unified-maintenance/docs/overview) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-maintenance-api +``` + +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/maintenance.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-maintenance-api-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-maintenance-api-v1beta/latest). + +## 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-maintenance-api`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-maintenance-api-v1beta`. +_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-maintenance-api`. +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-maintenance-api-v1beta`. + +### 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/google-cloud-maintenance-api/Rakefile b/google-cloud-maintenance-api/Rakefile new file mode 100644 index 000000000000..966eb1502edd --- /dev/null +++ b/google-cloud-maintenance-api/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 = true +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-maintenance-api 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/maintenance/api/v1beta/maintenance/credentials" + ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::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-maintenance-api 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-maintenance-api 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-maintenance-api 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-maintenance-api gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-maintenance-api" + header "google-cloud-maintenance-api rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-maintenance-api yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-maintenance-api 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-maintenance-api 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-maintenance-api 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/google-cloud-maintenance-api/google-cloud-maintenance-api.gemspec b/google-cloud-maintenance-api/google-cloud-maintenance-api.gemspec new file mode 100644 index 000000000000..96b98ba4c1d5 --- /dev/null +++ b/google-cloud-maintenance-api/google-cloud-maintenance-api.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/maintenance/api/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-maintenance-api" + gem.version = Google::Cloud::Maintenance::Api::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates." + gem.summary = "The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-maintenance-api-v1beta", ">= 0.0", "< 2.a" +end diff --git a/google-cloud-maintenance-api/lib/google-cloud-maintenance-api.rb b/google-cloud-maintenance-api/lib/google-cloud-maintenance-api.rb new file mode 100644 index 000000000000..7f1f7c1613fe --- /dev/null +++ b/google-cloud-maintenance-api/lib/google-cloud-maintenance-api.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/maintenance/api" unless defined? Google::Cloud::Maintenance::Api::VERSION diff --git a/google-cloud-maintenance-api/lib/google/cloud/maintenance/api.rb b/google-cloud-maintenance-api/lib/google/cloud/maintenance/api.rb new file mode 100644 index 000000000000..5a780eb17b8c --- /dev/null +++ b/google-cloud-maintenance-api/lib/google/cloud/maintenance/api.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/maintenance/api/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :maintenance_api do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Maintenance + module Api + ## + # Create a new client object for Maintenance. + # + # By default, this returns an instance of + # [Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-maintenance-api-v1beta/latest/Google-Cloud-Maintenance-Api-V1beta-Maintenance-Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Maintenance service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Maintenance service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Maintenance::Api.maintenance_available?}. + # + # ## About Maintenance + # + # Unified Maintenance service + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.maintenance version: :v1beta, transport: :grpc, &block + require "google/cloud/maintenance/api/#{version.to_s.downcase}" + + package_name = Google::Cloud::Maintenance::Api + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Maintenance::Api.const_get(package_name).const_get(:Maintenance) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Maintenance service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Maintenance::Api.maintenance}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Maintenance service, + # or if the versioned client gem needs an update to support the Maintenance service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.maintenance_available? version: :v1beta, transport: :grpc + require "google/cloud/maintenance/api/#{version.to_s.downcase}" + package_name = Google::Cloud::Maintenance::Api + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Maintenance::Api.const_get package_name + return false unless service_module.const_defined? :Maintenance + service_module = service_module.const_get :Maintenance + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-maintenance-api library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.maintenance_api if block_given? + + ::Google::Cloud.configure.maintenance_api + end + end + end + end +end + +helper_path = ::File.join __dir__, "api", "helpers.rb" +require "google/cloud/maintenance/api/helpers" if ::File.file? helper_path diff --git a/google-cloud-maintenance-api/lib/google/cloud/maintenance/api/version.rb b/google-cloud-maintenance-api/lib/google/cloud/maintenance/api/version.rb new file mode 100644 index 000000000000..b0a2c41d97f7 --- /dev/null +++ b/google-cloud-maintenance-api/lib/google/cloud/maintenance/api/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Maintenance + module Api + VERSION = "0.0.1" + end + end + end +end diff --git a/google-cloud-maintenance-api/test/google/cloud/maintenance/api/client_test.rb b/google-cloud-maintenance-api/test/google/cloud/maintenance/api/client_test.rb new file mode 100644 index 000000000000..fc62aba39882 --- /dev/null +++ b/google-cloud-maintenance-api/test/google/cloud/maintenance/api/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/maintenance/api" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Maintenance::Api::ClientConstructionMinitest < 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_maintenance_grpc + skip unless Google::Cloud::Maintenance::Api.maintenance_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Maintenance::Api.maintenance transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client, client + end + end + + def test_maintenance_rest + skip unless Google::Cloud::Maintenance::Api.maintenance_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Maintenance::Api.maintenance transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client, client + end + end +end diff --git a/google-cloud-maintenance-api/test/google/cloud/maintenance/api/version_test.rb b/google-cloud-maintenance-api/test/google/cloud/maintenance/api/version_test.rb new file mode 100644 index 000000000000..65eb7428cadb --- /dev/null +++ b/google-cloud-maintenance-api/test/google/cloud/maintenance/api/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/maintenance/api/version" + +class Google::Cloud::Maintenance::Api::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Maintenance::Api::VERSION + end +end diff --git a/google-cloud-maintenance-api/test/helper.rb b/google-cloud-maintenance-api/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-cloud-maintenance-api/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index a17ca15531e7..80c39e6e94c6 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -943,6 +943,10 @@ "component": "google-cloud-lustre-v1", "version_file": "lib/google/cloud/lustre/v1/version.rb" }, + "google-cloud-maintenance-api": { + "component": "google-cloud-maintenance-api", + "version_file": "lib/google/cloud/maintenance/api/version.rb" + }, "google-cloud-maintenance-api-v1beta": { "component": "google-cloud-maintenance-api-v1beta", "version_file": "lib/google/cloud/maintenance/api/v1beta/version.rb" From d9eeec0611e79be412fd13b60213e7e6513841c1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 07:56:54 -0700 Subject: [PATCH 269/457] chore(main): release google-cloud-maintenance-api-v1beta 0.1.0 (#30691) --- .release-please-manifest.json | 2 +- google-cloud-maintenance-api-v1beta/.repo-metadata.json | 2 +- google-cloud-maintenance-api-v1beta/CHANGELOG.md | 9 ++++++++- .../lib/google/cloud/maintenance/api/v1beta/version.rb | 2 +- ...pet_metadata_google.cloud.maintenance.api.v1beta.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4c6a52515f37..3aaff0a66c25 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -467,7 +467,7 @@ "google-cloud-lustre-v1+FILLER": "0.0.0", "google-cloud-maintenance-api": "0.0.1", "google-cloud-maintenance-api+FILLER": "0.0.0", - "google-cloud-maintenance-api-v1beta": "0.0.1", + "google-cloud-maintenance-api-v1beta": "0.1.0", "google-cloud-maintenance-api-v1beta+FILLER": "0.0.0", "google-cloud-managed_identities": "1.4.1", "google-cloud-managed_identities+FILLER": "0.0.0", diff --git a/google-cloud-maintenance-api-v1beta/.repo-metadata.json b/google-cloud-maintenance-api-v1beta/.repo-metadata.json index 26b8e5ff28c8..9960873d6a3f 100644 --- a/google-cloud-maintenance-api-v1beta/.repo-metadata.json +++ b/google-cloud-maintenance-api-v1beta/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "maintenance", "name_pretty": "Maintenance V1BETA API", "product_documentation": "https://cloud.google.com/unified-maintenance/docs/overview", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates. Note that google-cloud-maintenance-api-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-maintenance-api instead. See the readme for more details.", diff --git a/google-cloud-maintenance-api-v1beta/CHANGELOG.md b/google-cloud-maintenance-api-v1beta/CHANGELOG.md index f88957a62ba2..501267ceb93e 100644 --- a/google-cloud-maintenance-api-v1beta/CHANGELOG.md +++ b/google-cloud-maintenance-api-v1beta/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-07-16) + +#### Features + +* Initial generation of google-cloud-maintenance-api-v1beta ([#30685](https://github.com/googleapis/google-cloud-ruby/issues/30685)) + +## Release History diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/version.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/version.rb index c41540e14074..620099490792 100644 --- a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/version.rb +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/version.rb @@ -22,7 +22,7 @@ module Cloud module Maintenance module Api module V1beta - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-cloud-maintenance-api-v1beta/snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json b/google-cloud-maintenance-api-v1beta/snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json index a3355d4b739f..bbe8a78cdf70 100644 --- a/google-cloud-maintenance-api-v1beta/snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json +++ b/google-cloud-maintenance-api-v1beta/snippets/snippet_metadata_google.cloud.maintenance.api.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-maintenance-api-v1beta", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 024aeb48d625142046a1ffdbc3d35fa84dd24a7d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 07:57:11 -0700 Subject: [PATCH 270/457] chore(main): release google-cloud-maintenance-api 0.1.0 (#30690) --- .release-please-manifest.json | 2 +- google-cloud-maintenance-api/.repo-metadata.json | 2 +- google-cloud-maintenance-api/CHANGELOG.md | 9 ++++++++- .../lib/google/cloud/maintenance/api/version.rb | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3aaff0a66c25..9f4ffb31f1ad 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -465,7 +465,7 @@ "google-cloud-lustre+FILLER": "0.0.0", "google-cloud-lustre-v1": "0.1.1", "google-cloud-lustre-v1+FILLER": "0.0.0", - "google-cloud-maintenance-api": "0.0.1", + "google-cloud-maintenance-api": "0.1.0", "google-cloud-maintenance-api+FILLER": "0.0.0", "google-cloud-maintenance-api-v1beta": "0.1.0", "google-cloud-maintenance-api-v1beta+FILLER": "0.0.0", diff --git a/google-cloud-maintenance-api/.repo-metadata.json b/google-cloud-maintenance-api/.repo-metadata.json index 22d9d940e65a..a0d35fa8baaa 100644 --- a/google-cloud-maintenance-api/.repo-metadata.json +++ b/google-cloud-maintenance-api/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "maintenance", "name_pretty": "Maintenance API", "product_documentation": "https://cloud.google.com/unified-maintenance/docs/overview", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. It offers users visibility into upcoming, ongoing, and completed maintenance, along with controls to manage certain maintenance activities, such as mainteance windows, rescheduling, and on-demand updates.", diff --git a/google-cloud-maintenance-api/CHANGELOG.md b/google-cloud-maintenance-api/CHANGELOG.md index f88957a62ba2..f24694f5cb9f 100644 --- a/google-cloud-maintenance-api/CHANGELOG.md +++ b/google-cloud-maintenance-api/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-07-16) + +#### Features + +* Initial generation of google-cloud-maintenance-api ([#30686](https://github.com/googleapis/google-cloud-ruby/issues/30686)) + +## Release History diff --git a/google-cloud-maintenance-api/lib/google/cloud/maintenance/api/version.rb b/google-cloud-maintenance-api/lib/google/cloud/maintenance/api/version.rb index b0a2c41d97f7..7838c7764c08 100644 --- a/google-cloud-maintenance-api/lib/google/cloud/maintenance/api/version.rb +++ b/google-cloud-maintenance-api/lib/google/cloud/maintenance/api/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Maintenance module Api - VERSION = "0.0.1" + VERSION = "0.1.0" end end end From 48b29cac2d4d705cb26faeacbb0cf7796b1180b5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 17:04:26 -0700 Subject: [PATCH 271/457] feat(ad_manager)!: Updated google-ads-ad_manager-v1 dependency to version 2.x (#30695) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 783941747 Source-Link: https://github.com/googleapis/googleapis/commit/56f26a7d042d41ca5da9e7cdf16f427c7aee255d Source-Link: https://github.com/googleapis/googleapis-gen/commit/43aab6f68bc8271e05d7bc3c63a2e0fcff2f0532 Copy-Tag: eyJwIjoiZ29vZ2xlLWFkcy1hZF9tYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiI0M2FhYjZmNjhiYzgyNzFlMDVkN2JjM2M2M2EyZTBmY2ZmMmYwNTMyIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- google-ads-ad_manager/google-ads-ad_manager.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-ads-ad_manager/google-ads-ad_manager.gemspec b/google-ads-ad_manager/google-ads-ad_manager.gemspec index c5474d2c0259..24f05a4c2451 100644 --- a/google-ads-ad_manager/google-ads-ad_manager.gemspec +++ b/google-ads-ad_manager/google-ads-ad_manager.gemspec @@ -22,6 +22,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.0" - gem.add_dependency "google-ads-ad_manager-v1", "~> 1.0" + gem.add_dependency "google-ads-ad_manager-v1", "~> 2.0" gem.add_dependency "google-cloud-core", "~> 1.6" end From 669bf999799bd6169ce86e1afe36025eea58a441 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 17:04:55 -0700 Subject: [PATCH 272/457] chore(main): release google-cloud-run-v2 0.25.0 (#30692) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-run-v2 0.25.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-run-v2/CHANGELOG.md | 7 +++++++ google-cloud-run-v2/lib/google/cloud/run/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.run.v2.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9f4ffb31f1ad..9259d3a6902a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -649,7 +649,7 @@ "google-cloud-retail-v2+FILLER": "0.0.0", "google-cloud-run-client": "1.4.1", "google-cloud-run-client+FILLER": "0.0.0", - "google-cloud-run-v2": "0.24.1", + "google-cloud-run-v2": "0.25.0", "google-cloud-run-v2+FILLER": "0.0.0", "google-cloud-scheduler": "3.0.2", "google-cloud-scheduler+FILLER": "0.0.0", diff --git a/google-cloud-run-v2/CHANGELOG.md b/google-cloud-run-v2/CHANGELOG.md index b203453af8d2..f50edf5e2932 100644 --- a/google-cloud-run-v2/CHANGELOG.md +++ b/google-cloud-run-v2/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 0.25.0 (2025-07-17) + +#### Features + +* Support for disabling GPU zonal redundancy +* Task attempt results include the container termination signal + ### 0.24.1 (2025-07-15) #### Documentation diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb index e96e0668f261..fc990d1ab8e0 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Run module V2 - VERSION = "0.24.1" + VERSION = "0.25.0" end end end diff --git a/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json b/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json index 2147f8da75fd..3b8ac3fb00d2 100644 --- a/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json +++ b/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-run-v2", - "version": "0.24.1", + "version": "0.25.0", "language": "RUBY", "apis": [ { From 557a156efbabea2f9d8923960ab264e267570eaa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 17:05:17 -0700 Subject: [PATCH 273/457] chore(main): release google-cloud-firestore-admin-v1 1.6.0 (#30689) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-firestore-admin-v1 1.6.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-firestore-admin-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/firestore/admin/v1/version.rb | 2 +- .../snippet_metadata_google.firestore.admin.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9259d3a6902a..432d6b515d12 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -389,7 +389,7 @@ "google-cloud-firestore+FILLER": "0.0.0", "google-cloud-firestore-admin": "0.5.1", "google-cloud-firestore-admin+FILLER": "0.0.0", - "google-cloud-firestore-admin-v1": "1.5.0", + "google-cloud-firestore-admin-v1": "1.6.0", "google-cloud-firestore-admin-v1+FILLER": "0.0.0", "google-cloud-firestore-v1": "2.1.1", "google-cloud-firestore-v1+FILLER": "0.0.0", diff --git a/google-cloud-firestore-admin-v1/CHANGELOG.md b/google-cloud-firestore-admin-v1/CHANGELOG.md index b8c6f4d54258..d09498b902c8 100644 --- a/google-cloud-firestore-admin-v1/CHANGELOG.md +++ b/google-cloud-firestore-admin-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.6.0 (2025-07-17) + +#### Features + +* Support for tags when restoring a database ([#30683](https://github.com/googleapis/google-cloud-ruby/issues/30683)) + ### 1.5.0 (2025-05-12) #### Features diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb index fe71c1ad68d6..1ca89f6a809d 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module Firestore module Admin module V1 - VERSION = "1.5.0" + VERSION = "1.6.0" end end end diff --git a/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json b/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json index 6882f5b31a53..9ab17f0e9245 100644 --- a/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json +++ b/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-firestore-admin-v1", - "version": "1.5.0", + "version": "1.6.0", "language": "RUBY", "apis": [ { From 35f086ca6359031f2eec13206b3149aa0087c0f3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 17:05:32 -0700 Subject: [PATCH 274/457] chore(main): release google-cloud-container-v1 1.9.0 (#30688) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-container-v1 1.9.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-container-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/container/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.container.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 432d6b515d12..138d6c0ab087 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -243,7 +243,7 @@ "google-cloud-contact_center_insights-v1+FILLER": "0.0.0", "google-cloud-container": "2.0.2", "google-cloud-container+FILLER": "0.0.0", - "google-cloud-container-v1": "1.8.0", + "google-cloud-container-v1": "1.9.0", "google-cloud-container-v1+FILLER": "0.0.0", "google-cloud-container-v1beta1": "0.47.0", "google-cloud-container-v1beta1+FILLER": "0.0.0", diff --git a/google-cloud-container-v1/CHANGELOG.md b/google-cloud-container-v1/CHANGELOG.md index 83691755ee3b..f59358e7f03f 100644 --- a/google-cloud-container-v1/CHANGELOG.md +++ b/google-cloud-container-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +### 1.9.0 (2025-07-17) + +#### Features + +* Support for configuring the transparent hugepage on Linux nodes +* The update_node_pool RPC supports the boot disk parameter + ### 1.8.0 (2025-06-05) #### Features diff --git a/google-cloud-container-v1/lib/google/cloud/container/v1/version.rb b/google-cloud-container-v1/lib/google/cloud/container/v1/version.rb index a19d0c3fe91d..470b4fbf5bee 100644 --- a/google-cloud-container-v1/lib/google/cloud/container/v1/version.rb +++ b/google-cloud-container-v1/lib/google/cloud/container/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Container module V1 - VERSION = "1.8.0" + VERSION = "1.9.0" end end end diff --git a/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json b/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json index 7e10a9c3f80d..7c47a4a2f009 100644 --- a/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json +++ b/google-cloud-container-v1/snippets/snippet_metadata_google.container.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-container-v1", - "version": "1.8.0", + "version": "1.9.0", "language": "RUBY", "apis": [ { From 27389bd61f818bd6297f9c6c38c08b9fc215f4bf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:21:14 -0700 Subject: [PATCH 275/457] feat(lustre-v1): Added a new instance state UPDATING (#30687) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs(lustre-v1): Deprecated gke_support_enabled flag PiperOrigin-RevId: 783531040 Source-Link: https://github.com/googleapis/googleapis/commit/c4b0839af7bb3e72551cd07fa8f815b66cf1089b Source-Link: https://github.com/googleapis/googleapis-gen/commit/b92705750f6234f9c2bed5fd00c5d683de2fb32b Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWx1c3RyZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYjkyNzA1NzUwZjYyMzRmOWMyYmVkNWZkMDBjNWQ2ODNkZTJmYjMyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/lustre/v1/instance_pb.rb | 2 +- .../proto_docs/google/cloud/lustre/v1/instance.rb | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/instance_pb.rb b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/instance_pb.rb index a26608206bf8..a0ce479686ca 100644 --- a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/instance_pb.rb +++ b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/instance_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n%google/cloud/lustre/v1/instance.proto\x12\x16google.cloud.lustre.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x06\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nfilesystem\x18\n \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x19\n\x0c\x63\x61pacity_gib\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12:\n\x07network\x18\x03 \x01(\tB)\xe0\x41\x05\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12:\n\x05state\x18\x04 \x01(\x0e\x32&.google.cloud.lustre.v1.Instance.StateB\x03\xe0\x41\x03\x12\x18\n\x0bmount_point\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x06labels\x18\t \x03(\x0b\x32,.google.cloud.lustre.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12(\n\x1bper_unit_storage_throughput\x18\x0b \x01(\x03\x42\x03\xe0\x41\x02\x12 \n\x13gke_support_enabled\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\r\n\tUPGRADING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0b\n\x07STOPPED\x10\x06:v\xea\x41s\n\x1elustre.googleapis.com/Instance\x12 Date: Fri, 18 Jul 2025 15:22:05 -0700 Subject: [PATCH 276/457] feat(bigtable-admin-v2): Added type support for Proto and Enum (#30694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 783889912 Source-Link: https://github.com/googleapis/googleapis/commit/ff470725e0d32afab5d827767ff2df73fa1ad37c Source-Link: https://github.com/googleapis/googleapis-gen/commit/d8bdf4492f0fbb09fc00b89a2479174a08d147d3 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLWFkbWluLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJkOGJkZjQ0OTJmMGZiYjA5ZmMwMGI4OWEyNDc5MTc0YTA4ZDE0N2QzIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/bigtable/admin/v2/types_pb.rb | 4 +- .../google/bigtable/admin/v2/types.rb | 62 +++++++++++++++---- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/types_pb.rb b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/types_pb.rb index 3aa9ccdee453..96233ef30933 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/types_pb.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/types_pb.rb @@ -7,7 +7,7 @@ require 'google/api/field_behavior_pb' -descriptor_data = "\n$google/bigtable/admin/v2/types.proto\x12\x18google.bigtable.admin.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe3\x17\n\x04Type\x12:\n\nbytes_type\x18\x01 \x01(\x0b\x32$.google.bigtable.admin.v2.Type.BytesH\x00\x12<\n\x0bstring_type\x18\x02 \x01(\x0b\x32%.google.bigtable.admin.v2.Type.StringH\x00\x12:\n\nint64_type\x18\x05 \x01(\x0b\x32$.google.bigtable.admin.v2.Type.Int64H\x00\x12>\n\x0c\x66loat32_type\x18\x0c \x01(\x0b\x32&.google.bigtable.admin.v2.Type.Float32H\x00\x12>\n\x0c\x66loat64_type\x18\t \x01(\x0b\x32&.google.bigtable.admin.v2.Type.Float64H\x00\x12\x38\n\tbool_type\x18\x08 \x01(\x0b\x32#.google.bigtable.admin.v2.Type.BoolH\x00\x12\x42\n\x0etimestamp_type\x18\n \x01(\x0b\x32(.google.bigtable.admin.v2.Type.TimestampH\x00\x12\x38\n\tdate_type\x18\x0b \x01(\x0b\x32#.google.bigtable.admin.v2.Type.DateH\x00\x12\x42\n\x0e\x61ggregate_type\x18\x06 \x01(\x0b\x32(.google.bigtable.admin.v2.Type.AggregateH\x00\x12<\n\x0bstruct_type\x18\x07 \x01(\x0b\x32%.google.bigtable.admin.v2.Type.StructH\x00\x12:\n\narray_type\x18\x03 \x01(\x0b\x32$.google.bigtable.admin.v2.Type.ArrayH\x00\x12\x36\n\x08map_type\x18\x04 \x01(\x0b\x32\".google.bigtable.admin.v2.Type.MapH\x00\x1a\xa9\x01\n\x05\x42ytes\x12?\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32-.google.bigtable.admin.v2.Type.Bytes.Encoding\x1a_\n\x08\x45ncoding\x12@\n\x03raw\x18\x01 \x01(\x0b\x32\x31.google.bigtable.admin.v2.Type.Bytes.Encoding.RawH\x00\x1a\x05\n\x03RawB\n\n\x08\x65ncoding\x1a\x9f\x02\n\x06String\x12@\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32..google.bigtable.admin.v2.Type.String.Encoding\x1a\xd2\x01\n\x08\x45ncoding\x12N\n\x08utf8_raw\x18\x01 \x01(\x0b\x32\x36.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawB\x02\x18\x01H\x00\x12N\n\nutf8_bytes\x18\x02 \x01(\x0b\x32\x38.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesH\x00\x1a\r\n\x07Utf8Raw:\x02\x18\x01\x1a\x0b\n\tUtf8BytesB\n\n\x08\x65ncoding\x1a\xfd\x02\n\x05Int64\x12?\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32-.google.bigtable.admin.v2.Type.Int64.Encoding\x1a\xb2\x02\n\x08\x45ncoding\x12X\n\x10\x62ig_endian_bytes\x18\x01 \x01(\x0b\x32<.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesH\x00\x12\\\n\x12ordered_code_bytes\x18\x02 \x01(\x0b\x32>.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesH\x00\x1aN\n\x0e\x42igEndianBytes\x12<\n\nbytes_type\x18\x01 \x01(\x0b\x32$.google.bigtable.admin.v2.Type.BytesB\x02\x18\x01\x1a\x12\n\x10OrderedCodeBytesB\n\n\x08\x65ncoding\x1a\x06\n\x04\x42ool\x1a\t\n\x07\x46loat32\x1a\t\n\x07\x46loat64\x1a\xb4\x01\n\tTimestamp\x12\x43\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\x31.google.bigtable.admin.v2.Type.Timestamp.Encoding\x1a\x62\n\x08\x45ncoding\x12J\n\x11unix_micros_int64\x18\x01 \x01(\x0b\x32-.google.bigtable.admin.v2.Type.Int64.EncodingH\x00\x42\n\n\x08\x65ncoding\x1a\x06\n\x04\x44\x61te\x1a\xb9\x04\n\x06Struct\x12;\n\x06\x66ields\x18\x01 \x03(\x0b\x32+.google.bigtable.admin.v2.Type.Struct.Field\x12@\n\x08\x65ncoding\x18\x02 \x01(\x0b\x32..google.bigtable.admin.v2.Type.Struct.Encoding\x1aI\n\x05\x46ield\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12,\n\x04type\x18\x02 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x1a\xe4\x02\n\x08\x45ncoding\x12M\n\tsingleton\x18\x01 \x01(\x0b\x32\x38.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonH\x00\x12X\n\x0f\x64\x65limited_bytes\x18\x02 \x01(\x0b\x32=.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesH\x00\x12]\n\x12ordered_code_bytes\x18\x03 \x01(\x0b\x32?.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesH\x00\x1a\x0b\n\tSingleton\x1a#\n\x0e\x44\x65limitedBytes\x12\x11\n\tdelimiter\x18\x01 \x01(\x0c\x1a\x12\n\x10OrderedCodeBytesB\n\n\x08\x65ncoding\x1a=\n\x05\x41rray\x12\x34\n\x0c\x65lement_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x1ak\n\x03Map\x12\x30\n\x08key_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x12\x32\n\nvalue_type\x18\x02 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x1a\xdb\x03\n\tAggregate\x12\x32\n\ninput_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x12\x37\n\nstate_type\x18\x02 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.TypeB\x03\xe0\x41\x03\x12;\n\x03sum\x18\x04 \x01(\x0b\x32,.google.bigtable.admin.v2.Type.Aggregate.SumH\x00\x12\x65\n\x12hllpp_unique_count\x18\x05 \x01(\x0b\x32G.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountH\x00\x12;\n\x03max\x18\x06 \x01(\x0b\x32,.google.bigtable.admin.v2.Type.Aggregate.MaxH\x00\x12;\n\x03min\x18\x07 \x01(\x0b\x32,.google.bigtable.admin.v2.Type.Aggregate.MinH\x00\x1a\x05\n\x03Sum\x1a\x05\n\x03Max\x1a\x05\n\x03Min\x1a \n\x1eHyperLogLogPlusPlusUniqueCountB\x0c\n\naggregatorB\x06\n\x04kindB\xcd\x01\n\x1c\x63om.google.bigtable.admin.v2B\nTypesProtoP\x01Z8cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb\xaa\x02\x1eGoogle.Cloud.Bigtable.Admin.V2\xca\x02\x1eGoogle\\Cloud\\Bigtable\\Admin\\V2\xea\x02\"Google::Cloud::Bigtable::Admin::V2b\x06proto3" +descriptor_data = "\n$google/bigtable/admin/v2/types.proto\x12\x18google.bigtable.admin.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xc7\x19\n\x04Type\x12:\n\nbytes_type\x18\x01 \x01(\x0b\x32$.google.bigtable.admin.v2.Type.BytesH\x00\x12<\n\x0bstring_type\x18\x02 \x01(\x0b\x32%.google.bigtable.admin.v2.Type.StringH\x00\x12:\n\nint64_type\x18\x05 \x01(\x0b\x32$.google.bigtable.admin.v2.Type.Int64H\x00\x12>\n\x0c\x66loat32_type\x18\x0c \x01(\x0b\x32&.google.bigtable.admin.v2.Type.Float32H\x00\x12>\n\x0c\x66loat64_type\x18\t \x01(\x0b\x32&.google.bigtable.admin.v2.Type.Float64H\x00\x12\x38\n\tbool_type\x18\x08 \x01(\x0b\x32#.google.bigtable.admin.v2.Type.BoolH\x00\x12\x42\n\x0etimestamp_type\x18\n \x01(\x0b\x32(.google.bigtable.admin.v2.Type.TimestampH\x00\x12\x38\n\tdate_type\x18\x0b \x01(\x0b\x32#.google.bigtable.admin.v2.Type.DateH\x00\x12\x42\n\x0e\x61ggregate_type\x18\x06 \x01(\x0b\x32(.google.bigtable.admin.v2.Type.AggregateH\x00\x12<\n\x0bstruct_type\x18\x07 \x01(\x0b\x32%.google.bigtable.admin.v2.Type.StructH\x00\x12:\n\narray_type\x18\x03 \x01(\x0b\x32$.google.bigtable.admin.v2.Type.ArrayH\x00\x12\x36\n\x08map_type\x18\x04 \x01(\x0b\x32\".google.bigtable.admin.v2.Type.MapH\x00\x12:\n\nproto_type\x18\r \x01(\x0b\x32$.google.bigtable.admin.v2.Type.ProtoH\x00\x12\x38\n\tenum_type\x18\x0e \x01(\x0b\x32#.google.bigtable.admin.v2.Type.EnumH\x00\x1a\xa9\x01\n\x05\x42ytes\x12?\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32-.google.bigtable.admin.v2.Type.Bytes.Encoding\x1a_\n\x08\x45ncoding\x12@\n\x03raw\x18\x01 \x01(\x0b\x32\x31.google.bigtable.admin.v2.Type.Bytes.Encoding.RawH\x00\x1a\x05\n\x03RawB\n\n\x08\x65ncoding\x1a\x9f\x02\n\x06String\x12@\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32..google.bigtable.admin.v2.Type.String.Encoding\x1a\xd2\x01\n\x08\x45ncoding\x12N\n\x08utf8_raw\x18\x01 \x01(\x0b\x32\x36.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawB\x02\x18\x01H\x00\x12N\n\nutf8_bytes\x18\x02 \x01(\x0b\x32\x38.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesH\x00\x1a\r\n\x07Utf8Raw:\x02\x18\x01\x1a\x0b\n\tUtf8BytesB\n\n\x08\x65ncoding\x1a\xfd\x02\n\x05Int64\x12?\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32-.google.bigtable.admin.v2.Type.Int64.Encoding\x1a\xb2\x02\n\x08\x45ncoding\x12X\n\x10\x62ig_endian_bytes\x18\x01 \x01(\x0b\x32<.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesH\x00\x12\\\n\x12ordered_code_bytes\x18\x02 \x01(\x0b\x32>.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesH\x00\x1aN\n\x0e\x42igEndianBytes\x12<\n\nbytes_type\x18\x01 \x01(\x0b\x32$.google.bigtable.admin.v2.Type.BytesB\x02\x18\x01\x1a\x12\n\x10OrderedCodeBytesB\n\n\x08\x65ncoding\x1a\x06\n\x04\x42ool\x1a\t\n\x07\x46loat32\x1a\t\n\x07\x46loat64\x1a\xb4\x01\n\tTimestamp\x12\x43\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\x31.google.bigtable.admin.v2.Type.Timestamp.Encoding\x1a\x62\n\x08\x45ncoding\x12J\n\x11unix_micros_int64\x18\x01 \x01(\x0b\x32-.google.bigtable.admin.v2.Type.Int64.EncodingH\x00\x42\n\n\x08\x65ncoding\x1a\x06\n\x04\x44\x61te\x1a\xb9\x04\n\x06Struct\x12;\n\x06\x66ields\x18\x01 \x03(\x0b\x32+.google.bigtable.admin.v2.Type.Struct.Field\x12@\n\x08\x65ncoding\x18\x02 \x01(\x0b\x32..google.bigtable.admin.v2.Type.Struct.Encoding\x1aI\n\x05\x46ield\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12,\n\x04type\x18\x02 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x1a\xe4\x02\n\x08\x45ncoding\x12M\n\tsingleton\x18\x01 \x01(\x0b\x32\x38.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonH\x00\x12X\n\x0f\x64\x65limited_bytes\x18\x02 \x01(\x0b\x32=.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesH\x00\x12]\n\x12ordered_code_bytes\x18\x03 \x01(\x0b\x32?.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesH\x00\x1a\x0b\n\tSingleton\x1a#\n\x0e\x44\x65limitedBytes\x12\x11\n\tdelimiter\x18\x01 \x01(\x0c\x1a\x12\n\x10OrderedCodeBytesB\n\n\x08\x65ncoding\x1a\x37\n\x05Proto\x12\x18\n\x10schema_bundle_id\x18\x01 \x01(\t\x12\x14\n\x0cmessage_name\x18\x02 \x01(\t\x1a\x33\n\x04\x45num\x12\x18\n\x10schema_bundle_id\x18\x01 \x01(\t\x12\x11\n\tenum_name\x18\x02 \x01(\t\x1a=\n\x05\x41rray\x12\x34\n\x0c\x65lement_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x1ak\n\x03Map\x12\x30\n\x08key_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x12\x32\n\nvalue_type\x18\x02 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x1a\xdb\x03\n\tAggregate\x12\x32\n\ninput_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.Type\x12\x37\n\nstate_type\x18\x02 \x01(\x0b\x32\x1e.google.bigtable.admin.v2.TypeB\x03\xe0\x41\x03\x12;\n\x03sum\x18\x04 \x01(\x0b\x32,.google.bigtable.admin.v2.Type.Aggregate.SumH\x00\x12\x65\n\x12hllpp_unique_count\x18\x05 \x01(\x0b\x32G.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountH\x00\x12;\n\x03max\x18\x06 \x01(\x0b\x32,.google.bigtable.admin.v2.Type.Aggregate.MaxH\x00\x12;\n\x03min\x18\x07 \x01(\x0b\x32,.google.bigtable.admin.v2.Type.Aggregate.MinH\x00\x1a\x05\n\x03Sum\x1a\x05\n\x03Max\x1a\x05\n\x03Min\x1a \n\x1eHyperLogLogPlusPlusUniqueCountB\x0c\n\naggregatorB\x06\n\x04kindB\xcd\x01\n\x1c\x63om.google.bigtable.admin.v2B\nTypesProtoP\x01Z8cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb\xaa\x02\x1eGoogle.Cloud.Bigtable.Admin.V2\xca\x02\x1eGoogle\\Cloud\\Bigtable\\Admin\\V2\xea\x02\"Google::Cloud::Bigtable::Admin::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -62,6 +62,8 @@ module V2 Type::Struct::Encoding::Singleton = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Type.Struct.Encoding.Singleton").msgclass Type::Struct::Encoding::DelimitedBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes").msgclass Type::Struct::Encoding::OrderedCodeBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes").msgclass + Type::Proto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Type.Proto").msgclass + Type::Enum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Type.Enum").msgclass Type::Array = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Type.Array").msgclass Type::Map = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Type.Map").msgclass Type::Aggregate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Type.Aggregate").msgclass diff --git a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/types.rb b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/types.rb index 873121f84961..eed1394020ce 100644 --- a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/types.rb +++ b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/types.rb @@ -48,62 +48,72 @@ module V2 # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Bytes] # Bytes # - # Note: The following fields are mutually exclusive: `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] string_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::String] # String # - # Note: The following fields are mutually exclusive: `string_type`, `bytes_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `string_type`, `bytes_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] int64_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Int64] # Int64 # - # Note: The following fields are mutually exclusive: `int64_type`, `bytes_type`, `string_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `int64_type`, `bytes_type`, `string_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] float32_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Float32] # Float32 # - # Note: The following fields are mutually exclusive: `float32_type`, `bytes_type`, `string_type`, `int64_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `float32_type`, `bytes_type`, `string_type`, `int64_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] float64_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Float64] # Float64 # - # Note: The following fields are mutually exclusive: `float64_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `float64_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bool_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Bool] # Bool # - # Note: The following fields are mutually exclusive: `bool_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `bool_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] timestamp_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Timestamp] # Timestamp # - # Note: The following fields are mutually exclusive: `timestamp_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `timestamp_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] date_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Date] # Date # - # Note: The following fields are mutually exclusive: `date_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `date_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] aggregate_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Aggregate] # Aggregate # - # Note: The following fields are mutually exclusive: `aggregate_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `struct_type`, `array_type`, `map_type`. 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: `aggregate_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] struct_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Struct] # Struct # - # Note: The following fields are mutually exclusive: `struct_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `array_type`, `map_type`. 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: `struct_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] array_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Array] # Array # - # Note: The following fields are mutually exclusive: `array_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `map_type`. 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: `array_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] map_type # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Map] # Map # - # Note: The following fields are mutually exclusive: `map_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`. 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: `map_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] proto_type + # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Proto] + # Proto + # + # Note: The following fields are mutually exclusive: `proto_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] enum_type + # @return [::Google::Cloud::Bigtable::Admin::V2::Type::Enum] + # Enum + # + # Note: The following fields are mutually exclusive: `enum_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Type include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -425,6 +435,34 @@ class OrderedCodeBytes end end + # A protobuf message type. + # Values of type `Proto` are stored in `Value.bytes_value`. + # @!attribute [rw] schema_bundle_id + # @return [::String] + # The ID of the schema bundle that this proto is defined in. + # @!attribute [rw] message_name + # @return [::String] + # The fully qualified name of the protobuf message, including package. In + # the format of "foo.bar.Message". + class Proto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A protobuf enum type. + # Values of type `Enum` are stored in `Value.int_value`. + # @!attribute [rw] schema_bundle_id + # @return [::String] + # The ID of the schema bundle that this enum is defined in. + # @!attribute [rw] enum_name + # @return [::String] + # The fully qualified name of the protobuf enum message, including package. + # In the format of "foo.bar.EnumMessage". + class Enum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # An ordered list of elements of a given type. # Values of type `Array` are stored in `Value.array_value`. # @!attribute [rw] element_type From 966af764fcd61eadf9ce0d5a1439d967fdd4bf06 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:26:15 -0700 Subject: [PATCH 277/457] feat(video-transcoder-v1): Support for filling content gaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(video-transcoder-v1): Support for fmp4 container configuration feat(video-transcoder-v1): Support for configuring the frame rate conversion strategy feat(video-transcoder-v1): Support for SDR and HLG color format settings for H264 feat(video-transcoder-v1): Support for SDR, HLG, and HDR10 color format settings for H265 feat(video-transcoder-v1): Support for SDR and HLG color format settings for VP9 PiperOrigin-RevId: 784316559 Source-Link: https://github.com/googleapis/googleapis/commit/142ec419af024eed5faa4e793e17c7a37a1a7f12 Source-Link: https://github.com/googleapis/googleapis-gen/commit/174c3e5fbd20e0db181b16d733ab011b31268186 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvLXRyYW5zY29kZXItdjEvLk93bEJvdC55YW1sIiwiaCI6IjE3NGMzZTVmYmQyMGUwZGIxODFiMTZkNzMzYWIwMTFiMzEyNjgxODYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../cloud/video/transcoder/v1/resources_pb.rb | 11 +- .../v1/transcoder_service/client.rb | 17 +- .../v1/transcoder_service/rest/client.rb | 17 +- .../cloud/video/transcoder/v1/resources.rb | 306 ++++++++++++++---- 4 files changed, 275 insertions(+), 76 deletions(-) diff --git a/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb b/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb index 5002b5edb77f..210f4f65c69b 100644 --- a/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb +++ b/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb @@ -11,7 +11,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n0google/cloud/video/transcoder/v1/resources.proto\x12 google.cloud.video.transcoder.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x99\t\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tinput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x17\n\noutput_uri\x18\x03 \x01(\tB\x03\xe0\x41\x04\x12\x1a\n\x0btemplate_id\x18\x04 \x01(\tB\x03\xe0\x41\x04H\x00\x12=\n\x06\x63onfig\x18\x05 \x01(\x0b\x32+.google.cloud.video.transcoder.v1.JobConfigH\x00\x12I\n\x05state\x18\x08 \x01(\x0e\x32\x35.google.cloud.video.transcoder.v1.Job.ProcessingStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x19ttl_after_completion_days\x18\x0f \x01(\x05\x12\x41\n\x06labels\x18\x10 \x03(\x0b\x32\x31.google.cloud.video.transcoder.v1.Job.LabelsEntry\x12&\n\x05\x65rror\x18\x11 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x42\n\x04mode\x18\x14 \x01(\x0e\x32\x34.google.cloud.video.transcoder.v1.Job.ProcessingMode\x12\x1b\n\x13\x62\x61tch_mode_priority\x18\x15 \x01(\x05\x12U\n\x0coptimization\x18\x16 \x01(\x0e\x32:.google.cloud.video.transcoder.v1.Job.OptimizationStrategyB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"h\n\x0fProcessingState\x12 \n\x1cPROCESSING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"m\n\x0eProcessingMode\x12\x1f\n\x1bPROCESSING_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bPROCESSING_MODE_INTERACTIVE\x10\x01\x12\x19\n\x15PROCESSING_MODE_BATCH\x10\x02\"[\n\x14OptimizationStrategy\x12%\n!OPTIMIZATION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTODETECT\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:V\xea\x41S\n\x1dtranscoder.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}B\x0c\n\njob_config\"\xc3\x02\n\x0bJobTemplate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.cloud.video.transcoder.v1.JobConfig\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x39.google.cloud.video.transcoder.v1.JobTemplate.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n%transcoder.googleapis.com/JobTemplate\x12\x43projects/{project}/locations/{location}/jobTemplates/{job_template}\"\xe3\x05\n\tJobConfig\x12\x37\n\x06inputs\x18\x01 \x03(\x0b\x32\'.google.cloud.video.transcoder.v1.Input\x12=\n\tedit_list\x18\x02 \x03(\x0b\x32*.google.cloud.video.transcoder.v1.EditAtom\x12N\n\x12\x65lementary_streams\x18\x03 \x03(\x0b\x32\x32.google.cloud.video.transcoder.v1.ElementaryStream\x12@\n\x0bmux_streams\x18\x04 \x03(\x0b\x32+.google.cloud.video.transcoder.v1.MuxStream\x12=\n\tmanifests\x18\x05 \x03(\x0b\x32*.google.cloud.video.transcoder.v1.Manifest\x12\x38\n\x06output\x18\x06 \x01(\x0b\x32(.google.cloud.video.transcoder.v1.Output\x12<\n\tad_breaks\x18\x07 \x03(\x0b\x32).google.cloud.video.transcoder.v1.AdBreak\x12O\n\x12pubsub_destination\x18\x08 \x01(\x0b\x32\x33.google.cloud.video.transcoder.v1.PubsubDestination\x12\x44\n\rsprite_sheets\x18\t \x03(\x0b\x32-.google.cloud.video.transcoder.v1.SpriteSheet\x12;\n\x08overlays\x18\n \x03(\x0b\x32).google.cloud.video.transcoder.v1.Overlay\x12\x41\n\x0b\x65ncryptions\x18\x0b \x03(\x0b\x32,.google.cloud.video.transcoder.v1.Encryption\"v\n\x05Input\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12S\n\x14preprocessing_config\x18\x03 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.PreprocessingConfig\"\x15\n\x06Output\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x91\x01\n\x08\x45\x64itAtom\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06inputs\x18\x02 \x03(\t\x12\x32\n\x0f\x65nd_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11start_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"?\n\x07\x41\x64\x42reak\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x87\x02\n\x10\x45lementaryStream\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x45\n\x0cvideo_stream\x18\x01 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.VideoStreamH\x00\x12\x45\n\x0c\x61udio_stream\x18\x02 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.AudioStreamH\x00\x12\x43\n\x0btext_stream\x18\x03 \x01(\x0b\x32,.google.cloud.video.transcoder.v1.TextStreamH\x00\x42\x13\n\x11\x65lementary_stream\"\xbe\x01\n\tMuxStream\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x11\n\tcontainer\x18\x03 \x01(\t\x12\x1a\n\x12\x65lementary_streams\x18\x04 \x03(\t\x12K\n\x10segment_settings\x18\x05 \x01(\x0b\x32\x31.google.cloud.video.transcoder.v1.SegmentSettings\x12\x15\n\rencryption_id\x18\x07 \x01(\t\"\x91\x04\n\x08Manifest\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.video.transcoder.v1.Manifest.ManifestTypeB\x03\xe0\x41\x02\x12\x18\n\x0bmux_streams\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x45\n\x04\x64\x61sh\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Manifest.DashConfigH\x00\x1a\xef\x01\n\nDashConfig\x12n\n\x18segment_reference_scheme\x18\x01 \x01(\x0e\x32L.google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme\"q\n\x16SegmentReferenceScheme\x12(\n$SEGMENT_REFERENCE_SCHEME_UNSPECIFIED\x10\x00\x12\x10\n\x0cSEGMENT_LIST\x10\x01\x12\x1b\n\x17SEGMENT_TEMPLATE_NUMBER\x10\x02\"@\n\x0cManifestType\x12\x1d\n\x19MANIFEST_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03HLS\x10\x01\x12\x08\n\x04\x44\x41SH\x10\x02\x42\x11\n\x0fmanifest_config\"\"\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t\"\xfd\x02\n\x0bSpriteSheet\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x18\n\x0b\x66ile_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13sprite_width_pixels\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12!\n\x14sprite_height_pixels\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0c\x63olumn_count\x18\x05 \x01(\x05\x12\x11\n\trow_count\x18\x06 \x01(\x05\x12\x34\n\x11start_time_offset\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\x0btotal_count\x18\t \x01(\x05H\x00\x12-\n\x08interval\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x0f\n\x07quality\x18\x0b \x01(\x05\x42\x15\n\x13\x65xtraction_strategy\"\x8b\t\n\x07Overlay\x12>\n\x05image\x18\x01 \x01(\x0b\x32/.google.cloud.video.transcoder.v1.Overlay.Image\x12G\n\nanimations\x18\x02 \x03(\x0b\x32\x33.google.cloud.video.transcoder.v1.Overlay.Animation\x1a,\n\x14NormalizedCoordinate\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\x1a|\n\x05Image\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\nresolution\x18\x02 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\r\n\x05\x61lpha\x18\x03 \x01(\x01\x1a\x93\x01\n\x0f\x41nimationStatic\x12J\n\x02xy\x18\x01 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\x34\n\x11start_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x91\x02\n\rAnimationFade\x12J\n\tfade_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.video.transcoder.v1.Overlay.FadeTypeB\x03\xe0\x41\x02\x12J\n\x02xy\x18\x02 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\x34\n\x11start_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x44\n\x0c\x41nimationEnd\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x98\x02\n\tAnimation\x12U\n\x10\x61nimation_static\x18\x01 \x01(\x0b\x32\x39.google.cloud.video.transcoder.v1.Overlay.AnimationStaticH\x00\x12Q\n\x0e\x61nimation_fade\x18\x02 \x01(\x0b\x32\x37.google.cloud.video.transcoder.v1.Overlay.AnimationFadeH\x00\x12O\n\ranimation_end\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.Overlay.AnimationEndH\x00\x42\x10\n\x0e\x61nimation_type\"@\n\x08\x46\x61\x64\x65Type\x12\x19\n\x15\x46\x41\x44\x45_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46\x41\x44\x45_IN\x10\x01\x12\x0c\n\x08\x46\x41\x44\x45_OUT\x10\x02\"\xf3\n\n\x13PreprocessingConfig\x12J\n\x05\x63olor\x18\x01 \x01(\x0b\x32;.google.cloud.video.transcoder.v1.PreprocessingConfig.Color\x12N\n\x07\x64\x65noise\x18\x02 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise\x12N\n\x07\x64\x65\x62lock\x18\x03 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock\x12J\n\x05\x61udio\x18\x04 \x01(\x0b\x32;.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio\x12H\n\x04\x63rop\x18\x05 \x01(\x0b\x32:.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop\x12\x46\n\x03pad\x18\x06 \x01(\x0b\x32\x39.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad\x12V\n\x0b\x64\x65interlace\x18\x07 \x01(\x0b\x32\x41.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace\x1a\x41\n\x05\x43olor\x12\x12\n\nsaturation\x18\x01 \x01(\x01\x12\x10\n\x08\x63ontrast\x18\x02 \x01(\x01\x12\x12\n\nbrightness\x18\x03 \x01(\x01\x1a)\n\x07\x44\x65noise\x12\x10\n\x08strength\x18\x01 \x01(\x01\x12\x0c\n\x04tune\x18\x02 \x01(\t\x1a,\n\x07\x44\x65\x62lock\x12\x10\n\x08strength\x18\x01 \x01(\x01\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x1a<\n\x05\x41udio\x12\x0c\n\x04lufs\x18\x01 \x01(\x01\x12\x12\n\nhigh_boost\x18\x02 \x01(\x08\x12\x11\n\tlow_boost\x18\x03 \x01(\x08\x1a\\\n\x04\x43rop\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a[\n\x03Pad\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a\xa4\x03\n\x0b\x44\x65interlace\x12^\n\x05yadif\x18\x01 \x01(\x0b\x32M.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfigH\x00\x12^\n\x05\x62wdif\x18\x02 \x01(\x0b\x32M.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfigH\x00\x1ap\n\x0bYadifConfig\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12#\n\x1b\x64isable_spatial_interlacing\x18\x02 \x01(\x08\x12\x0e\n\x06parity\x18\x03 \x01(\t\x12\x1e\n\x16\x64\x65interlace_all_frames\x18\x04 \x01(\x08\x1aK\n\x0b\x42wdifConfig\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12\x0e\n\x06parity\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65interlace_all_frames\x18\x03 \x01(\x08\x42\x16\n\x14\x64\x65interlacing_filter\"\x95\x0c\n\x0bVideoStream\x12O\n\x04h264\x18\x01 \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettingsH\x00\x12O\n\x04h265\x18\x02 \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettingsH\x00\x12M\n\x03vp9\x18\x03 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettingsH\x00\x1a\xf9\x03\n\x11H264CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x16\n\x0e\x61llow_open_gop\x18\x08 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\t \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x17\n\x0f\x65nable_two_pass\x18\x0b \x01(\x08\x12\x15\n\rvbv_size_bits\x18\x0c \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\r \x01(\x05\x12\x15\n\rentropy_coder\x18\x0e \x01(\t\x12\x11\n\tb_pyramid\x18\x0f \x01(\x08\x12\x15\n\rb_frame_count\x18\x10 \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x11 \x01(\x01\x12\x0f\n\x07profile\x18\x12 \x01(\t\x12\x0c\n\x04tune\x18\x13 \x01(\t\x12\x0e\n\x06preset\x18\x14 \x01(\tB\n\n\x08gop_mode\x1a\xe2\x03\n\x11H265CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x16\n\x0e\x61llow_open_gop\x18\x08 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\t \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x17\n\x0f\x65nable_two_pass\x18\x0b \x01(\x08\x12\x15\n\rvbv_size_bits\x18\x0c \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\r \x01(\x05\x12\x11\n\tb_pyramid\x18\x0e \x01(\x08\x12\x15\n\rb_frame_count\x18\x0f \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x10 \x01(\x01\x12\x0f\n\x07profile\x18\x11 \x01(\t\x12\x0c\n\x04tune\x18\x12 \x01(\t\x12\x0e\n\x06preset\x18\x13 \x01(\tB\n\n\x08gop_mode\x1a\xa1\x02\n\x10Vp9CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x19\n\x0fgop_frame_count\x18\x08 \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x0f\n\x07profile\x18\n \x01(\tB\n\n\x08gop_modeB\x10\n\x0e\x63odec_settings\"\x9e\x03\n\x0b\x41udioStream\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x18\n\x0b\x62itrate_bps\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x15\n\rchannel_count\x18\x03 \x01(\x05\x12\x16\n\x0e\x63hannel_layout\x18\x04 \x03(\t\x12K\n\x07mapping\x18\x05 \x03(\x0b\x32:.google.cloud.video.transcoder.v1.AudioStream.AudioMapping\x12\x19\n\x11sample_rate_hertz\x18\x06 \x01(\x05\x12\x15\n\rlanguage_code\x18\x07 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x08 \x01(\t\x1a\xa1\x01\n\x0c\x41udioMapping\x12\x15\n\x08\x61tom_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tinput_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rinput_channel\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_channel\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0f\n\x07gain_db\x18\x06 \x01(\x01\"\xeb\x01\n\nTextStream\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12I\n\x07mapping\x18\x03 \x03(\x0b\x32\x38.google.cloud.video.transcoder.v1.TextStream.TextMapping\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x1aV\n\x0bTextMapping\x12\x15\n\x08\x61tom_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tinput_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"h\n\x0fSegmentSettings\x12\x33\n\x10segment_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x13individual_segments\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\"\xef\x07\n\nEncryption\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12P\n\x07\x61\x65s_128\x18\x03 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.Encryption.Aes128EncryptionH\x00\x12V\n\nsample_aes\x18\x04 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryptionH\x00\x12V\n\tmpeg_cenc\x18\x05 \x01(\x0b\x32\x41.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryptionH\x00\x12\x65\n\x19secret_manager_key_source\x18\x07 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.Encryption.SecretManagerSourceH\x01\x12Q\n\x0b\x64rm_systems\x18\x08 \x01(\x0b\x32\x37.google.cloud.video.transcoder.v1.Encryption.DrmSystemsB\x03\xe0\x41\x02\x1a\x12\n\x10\x41\x65s128Encryption\x1a\x15\n\x13SampleAesEncryption\x1a+\n\x14MpegCommonEncryption\x12\x13\n\x06scheme\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x32\n\x13SecretManagerSource\x12\x1b\n\x0esecret_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\n\n\x08Widevine\x1a\n\n\x08\x46\x61irplay\x1a\x0b\n\tPlayready\x1a\n\n\x08\x43learkey\x1a\xb2\x02\n\nDrmSystems\x12G\n\x08widevine\x18\x01 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.Widevine\x12G\n\x08\x66\x61irplay\x18\x02 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.Fairplay\x12I\n\tplayready\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.Encryption.Playready\x12G\n\x08\x63learkey\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.ClearkeyB\x11\n\x0f\x65ncryption_modeB\x0f\n\rsecret_sourceB~\n$com.google.cloud.video.transcoder.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpbb\x06proto3" +descriptor_data = "\n0google/cloud/video/transcoder/v1/resources.proto\x12 google.cloud.video.transcoder.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xb9\t\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tinput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x17\n\noutput_uri\x18\x03 \x01(\tB\x03\xe0\x41\x04\x12\x1a\n\x0btemplate_id\x18\x04 \x01(\tB\x03\xe0\x41\x04H\x00\x12=\n\x06\x63onfig\x18\x05 \x01(\x0b\x32+.google.cloud.video.transcoder.v1.JobConfigH\x00\x12I\n\x05state\x18\x08 \x01(\x0e\x32\x35.google.cloud.video.transcoder.v1.Job.ProcessingStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x19ttl_after_completion_days\x18\x0f \x01(\x05\x12\x41\n\x06labels\x18\x10 \x03(\x0b\x32\x31.google.cloud.video.transcoder.v1.Job.LabelsEntry\x12&\n\x05\x65rror\x18\x11 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x42\n\x04mode\x18\x14 \x01(\x0e\x32\x34.google.cloud.video.transcoder.v1.Job.ProcessingMode\x12\x1b\n\x13\x62\x61tch_mode_priority\x18\x15 \x01(\x05\x12U\n\x0coptimization\x18\x16 \x01(\x0e\x32:.google.cloud.video.transcoder.v1.Job.OptimizationStrategyB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ill_content_gaps\x18\x19 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"h\n\x0fProcessingState\x12 \n\x1cPROCESSING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"m\n\x0eProcessingMode\x12\x1f\n\x1bPROCESSING_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bPROCESSING_MODE_INTERACTIVE\x10\x01\x12\x19\n\x15PROCESSING_MODE_BATCH\x10\x02\"[\n\x14OptimizationStrategy\x12%\n!OPTIMIZATION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTODETECT\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:V\xea\x41S\n\x1dtranscoder.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}B\x0c\n\njob_config\"\xc3\x02\n\x0bJobTemplate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.cloud.video.transcoder.v1.JobConfig\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x39.google.cloud.video.transcoder.v1.JobTemplate.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n%transcoder.googleapis.com/JobTemplate\x12\x43projects/{project}/locations/{location}/jobTemplates/{job_template}\"\xe3\x05\n\tJobConfig\x12\x37\n\x06inputs\x18\x01 \x03(\x0b\x32\'.google.cloud.video.transcoder.v1.Input\x12=\n\tedit_list\x18\x02 \x03(\x0b\x32*.google.cloud.video.transcoder.v1.EditAtom\x12N\n\x12\x65lementary_streams\x18\x03 \x03(\x0b\x32\x32.google.cloud.video.transcoder.v1.ElementaryStream\x12@\n\x0bmux_streams\x18\x04 \x03(\x0b\x32+.google.cloud.video.transcoder.v1.MuxStream\x12=\n\tmanifests\x18\x05 \x03(\x0b\x32*.google.cloud.video.transcoder.v1.Manifest\x12\x38\n\x06output\x18\x06 \x01(\x0b\x32(.google.cloud.video.transcoder.v1.Output\x12<\n\tad_breaks\x18\x07 \x03(\x0b\x32).google.cloud.video.transcoder.v1.AdBreak\x12O\n\x12pubsub_destination\x18\x08 \x01(\x0b\x32\x33.google.cloud.video.transcoder.v1.PubsubDestination\x12\x44\n\rsprite_sheets\x18\t \x03(\x0b\x32-.google.cloud.video.transcoder.v1.SpriteSheet\x12;\n\x08overlays\x18\n \x03(\x0b\x32).google.cloud.video.transcoder.v1.Overlay\x12\x41\n\x0b\x65ncryptions\x18\x0b \x03(\x0b\x32,.google.cloud.video.transcoder.v1.Encryption\"v\n\x05Input\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12S\n\x14preprocessing_config\x18\x03 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.PreprocessingConfig\"\x15\n\x06Output\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x91\x01\n\x08\x45\x64itAtom\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06inputs\x18\x02 \x03(\t\x12\x32\n\x0f\x65nd_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11start_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"?\n\x07\x41\x64\x42reak\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x87\x02\n\x10\x45lementaryStream\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x45\n\x0cvideo_stream\x18\x01 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.VideoStreamH\x00\x12\x45\n\x0c\x61udio_stream\x18\x02 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.AudioStreamH\x00\x12\x43\n\x0btext_stream\x18\x03 \x01(\x0b\x32,.google.cloud.video.transcoder.v1.TextStreamH\x00\x42\x13\n\x11\x65lementary_stream\"\xc5\x02\n\tMuxStream\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x11\n\tcontainer\x18\x03 \x01(\t\x12\x1a\n\x12\x65lementary_streams\x18\x04 \x03(\t\x12K\n\x10segment_settings\x18\x05 \x01(\x0b\x32\x31.google.cloud.video.transcoder.v1.SegmentSettings\x12\x15\n\rencryption_id\x18\x07 \x01(\t\x12K\n\x04\x66mp4\x18\x08 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.MuxStream.Fmp4ConfigB\x03\xe0\x41\x01H\x00\x1a$\n\nFmp4Config\x12\x16\n\tcodec_tag\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x12\n\x10\x63ontainer_config\"\x91\x04\n\x08Manifest\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.video.transcoder.v1.Manifest.ManifestTypeB\x03\xe0\x41\x02\x12\x18\n\x0bmux_streams\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x45\n\x04\x64\x61sh\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Manifest.DashConfigH\x00\x1a\xef\x01\n\nDashConfig\x12n\n\x18segment_reference_scheme\x18\x01 \x01(\x0e\x32L.google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme\"q\n\x16SegmentReferenceScheme\x12(\n$SEGMENT_REFERENCE_SCHEME_UNSPECIFIED\x10\x00\x12\x10\n\x0cSEGMENT_LIST\x10\x01\x12\x1b\n\x17SEGMENT_TEMPLATE_NUMBER\x10\x02\"@\n\x0cManifestType\x12\x1d\n\x19MANIFEST_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03HLS\x10\x01\x12\x08\n\x04\x44\x41SH\x10\x02\x42\x11\n\x0fmanifest_config\"\"\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t\"\xfd\x02\n\x0bSpriteSheet\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x18\n\x0b\x66ile_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13sprite_width_pixels\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12!\n\x14sprite_height_pixels\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0c\x63olumn_count\x18\x05 \x01(\x05\x12\x11\n\trow_count\x18\x06 \x01(\x05\x12\x34\n\x11start_time_offset\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\x0btotal_count\x18\t \x01(\x05H\x00\x12-\n\x08interval\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x0f\n\x07quality\x18\x0b \x01(\x05\x42\x15\n\x13\x65xtraction_strategy\"\x8b\t\n\x07Overlay\x12>\n\x05image\x18\x01 \x01(\x0b\x32/.google.cloud.video.transcoder.v1.Overlay.Image\x12G\n\nanimations\x18\x02 \x03(\x0b\x32\x33.google.cloud.video.transcoder.v1.Overlay.Animation\x1a,\n\x14NormalizedCoordinate\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\x1a|\n\x05Image\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\nresolution\x18\x02 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\r\n\x05\x61lpha\x18\x03 \x01(\x01\x1a\x93\x01\n\x0f\x41nimationStatic\x12J\n\x02xy\x18\x01 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\x34\n\x11start_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x91\x02\n\rAnimationFade\x12J\n\tfade_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.video.transcoder.v1.Overlay.FadeTypeB\x03\xe0\x41\x02\x12J\n\x02xy\x18\x02 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\x34\n\x11start_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x44\n\x0c\x41nimationEnd\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x98\x02\n\tAnimation\x12U\n\x10\x61nimation_static\x18\x01 \x01(\x0b\x32\x39.google.cloud.video.transcoder.v1.Overlay.AnimationStaticH\x00\x12Q\n\x0e\x61nimation_fade\x18\x02 \x01(\x0b\x32\x37.google.cloud.video.transcoder.v1.Overlay.AnimationFadeH\x00\x12O\n\ranimation_end\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.Overlay.AnimationEndH\x00\x42\x10\n\x0e\x61nimation_type\"@\n\x08\x46\x61\x64\x65Type\x12\x19\n\x15\x46\x41\x44\x45_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46\x41\x44\x45_IN\x10\x01\x12\x0c\n\x08\x46\x41\x44\x45_OUT\x10\x02\"\xf3\n\n\x13PreprocessingConfig\x12J\n\x05\x63olor\x18\x01 \x01(\x0b\x32;.google.cloud.video.transcoder.v1.PreprocessingConfig.Color\x12N\n\x07\x64\x65noise\x18\x02 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise\x12N\n\x07\x64\x65\x62lock\x18\x03 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock\x12J\n\x05\x61udio\x18\x04 \x01(\x0b\x32;.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio\x12H\n\x04\x63rop\x18\x05 \x01(\x0b\x32:.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop\x12\x46\n\x03pad\x18\x06 \x01(\x0b\x32\x39.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad\x12V\n\x0b\x64\x65interlace\x18\x07 \x01(\x0b\x32\x41.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace\x1a\x41\n\x05\x43olor\x12\x12\n\nsaturation\x18\x01 \x01(\x01\x12\x10\n\x08\x63ontrast\x18\x02 \x01(\x01\x12\x12\n\nbrightness\x18\x03 \x01(\x01\x1a)\n\x07\x44\x65noise\x12\x10\n\x08strength\x18\x01 \x01(\x01\x12\x0c\n\x04tune\x18\x02 \x01(\t\x1a,\n\x07\x44\x65\x62lock\x12\x10\n\x08strength\x18\x01 \x01(\x01\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x1a<\n\x05\x41udio\x12\x0c\n\x04lufs\x18\x01 \x01(\x01\x12\x12\n\nhigh_boost\x18\x02 \x01(\x08\x12\x11\n\tlow_boost\x18\x03 \x01(\x08\x1a\\\n\x04\x43rop\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a[\n\x03Pad\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a\xa4\x03\n\x0b\x44\x65interlace\x12^\n\x05yadif\x18\x01 \x01(\x0b\x32M.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfigH\x00\x12^\n\x05\x62wdif\x18\x02 \x01(\x0b\x32M.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfigH\x00\x1ap\n\x0bYadifConfig\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12#\n\x1b\x64isable_spatial_interlacing\x18\x02 \x01(\x08\x12\x0e\n\x06parity\x18\x03 \x01(\t\x12\x1e\n\x16\x64\x65interlace_all_frames\x18\x04 \x01(\x08\x1aK\n\x0b\x42wdifConfig\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12\x0e\n\x06parity\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65interlace_all_frames\x18\x03 \x01(\x08\x42\x16\n\x14\x64\x65interlacing_filter\"\x96\x16\n\x0bVideoStream\x12O\n\x04h264\x18\x01 \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettingsH\x00\x12O\n\x04h265\x18\x02 \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettingsH\x00\x12M\n\x03vp9\x18\x03 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettingsH\x00\x1a\x14\n\x12H264ColorFormatSDR\x1a\x14\n\x12H264ColorFormatHLG\x1a\xad\x06\n\x11H264CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\x17 \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x16\n\x0e\x61llow_open_gop\x18\x08 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\t \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x17\n\x0f\x65nable_two_pass\x18\x0b \x01(\x08\x12\x15\n\rvbv_size_bits\x18\x0c \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\r \x01(\x05\x12\x15\n\rentropy_coder\x18\x0e \x01(\t\x12\x11\n\tb_pyramid\x18\x0f \x01(\x08\x12\x15\n\rb_frame_count\x18\x10 \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x11 \x01(\x01\x12\x0f\n\x07profile\x18\x12 \x01(\t\x12\x0c\n\x04tune\x18\x13 \x01(\t\x12\x0e\n\x06preset\x18\x14 \x01(\t\x12T\n\x03sdr\x18\x15 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12T\n\x03hlg\x18\x16 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatHLGB\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\x1a\x14\n\x12H265ColorFormatSDR\x1a\x14\n\x12H265ColorFormatHLG\x1a\x16\n\x14H265ColorFormatHDR10\x1a\xf0\x06\n\x11H265CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\x17 \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x16\n\x0e\x61llow_open_gop\x18\x08 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\t \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x17\n\x0f\x65nable_two_pass\x18\x0b \x01(\x08\x12\x15\n\rvbv_size_bits\x18\x0c \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\r \x01(\x05\x12\x11\n\tb_pyramid\x18\x0e \x01(\x08\x12\x15\n\rb_frame_count\x18\x0f \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x10 \x01(\x01\x12\x0f\n\x07profile\x18\x11 \x01(\t\x12\x0c\n\x04tune\x18\x12 \x01(\t\x12\x0e\n\x06preset\x18\x13 \x01(\t\x12T\n\x03sdr\x18\x14 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12T\n\x03hlg\x18\x15 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHLGB\x03\xe0\x41\x01H\x01\x12X\n\x05hdr10\x18\x16 \x01(\x0b\x32\x42.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHDR10B\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\x1a\x13\n\x11Vp9ColorFormatSDR\x1a\x13\n\x11Vp9ColorFormatHLG\x1a\xd3\x04\n\x10Vp9CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\r \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x19\n\x0fgop_frame_count\x18\x08 \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x0f\n\x07profile\x18\n \x01(\t\x12S\n\x03sdr\x18\x0b \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12S\n\x03hlg\x18\x0c \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatHLGB\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\"q\n\x1b\x46rameRateConversionStrategy\x12.\n*FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nDOWNSAMPLE\x10\x01\x12\x12\n\x0e\x44ROP_DUPLICATE\x10\x02\x42\x10\n\x0e\x63odec_settings\"\x9e\x03\n\x0b\x41udioStream\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x18\n\x0b\x62itrate_bps\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x15\n\rchannel_count\x18\x03 \x01(\x05\x12\x16\n\x0e\x63hannel_layout\x18\x04 \x03(\t\x12K\n\x07mapping\x18\x05 \x03(\x0b\x32:.google.cloud.video.transcoder.v1.AudioStream.AudioMapping\x12\x19\n\x11sample_rate_hertz\x18\x06 \x01(\x05\x12\x15\n\rlanguage_code\x18\x07 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x08 \x01(\t\x1a\xa1\x01\n\x0c\x41udioMapping\x12\x15\n\x08\x61tom_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tinput_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rinput_channel\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_channel\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0f\n\x07gain_db\x18\x06 \x01(\x01\"\xeb\x01\n\nTextStream\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12I\n\x07mapping\x18\x03 \x03(\x0b\x32\x38.google.cloud.video.transcoder.v1.TextStream.TextMapping\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x1aV\n\x0bTextMapping\x12\x15\n\x08\x61tom_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tinput_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"h\n\x0fSegmentSettings\x12\x33\n\x10segment_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x13individual_segments\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\"\xef\x07\n\nEncryption\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12P\n\x07\x61\x65s_128\x18\x03 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.Encryption.Aes128EncryptionH\x00\x12V\n\nsample_aes\x18\x04 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryptionH\x00\x12V\n\tmpeg_cenc\x18\x05 \x01(\x0b\x32\x41.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryptionH\x00\x12\x65\n\x19secret_manager_key_source\x18\x07 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.Encryption.SecretManagerSourceH\x01\x12Q\n\x0b\x64rm_systems\x18\x08 \x01(\x0b\x32\x37.google.cloud.video.transcoder.v1.Encryption.DrmSystemsB\x03\xe0\x41\x02\x1a\x12\n\x10\x41\x65s128Encryption\x1a\x15\n\x13SampleAesEncryption\x1a+\n\x14MpegCommonEncryption\x12\x13\n\x06scheme\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x32\n\x13SecretManagerSource\x12\x1b\n\x0esecret_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\n\n\x08Widevine\x1a\n\n\x08\x46\x61irplay\x1a\x0b\n\tPlayready\x1a\n\n\x08\x43learkey\x1a\xb2\x02\n\nDrmSystems\x12G\n\x08widevine\x18\x01 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.Widevine\x12G\n\x08\x66\x61irplay\x18\x02 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.Fairplay\x12I\n\tplayready\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.Encryption.Playready\x12G\n\x08\x63learkey\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.ClearkeyB\x11\n\x0f\x65ncryption_modeB\x0f\n\rsecret_sourceB~\n$com.google.cloud.video.transcoder.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -57,6 +57,7 @@ module V1 AdBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AdBreak").msgclass ElementaryStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ElementaryStream").msgclass MuxStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.MuxStream").msgclass + MuxStream::Fmp4Config = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.MuxStream.Fmp4Config").msgclass Manifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest").msgclass Manifest::DashConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest.DashConfig").msgclass Manifest::DashConfig::SegmentReferenceScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme").enummodule @@ -82,9 +83,17 @@ module V1 PreprocessingConfig::Deinterlace::YadifConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig").msgclass PreprocessingConfig::Deinterlace::BwdifConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig").msgclass VideoStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream").msgclass + VideoStream::H264ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatSDR").msgclass + VideoStream::H264ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatHLG").msgclass VideoStream::H264CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings").msgclass + VideoStream::H265ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatSDR").msgclass + VideoStream::H265ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHLG").msgclass + VideoStream::H265ColorFormatHDR10 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHDR10").msgclass VideoStream::H265CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings").msgclass + VideoStream::Vp9ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatSDR").msgclass + VideoStream::Vp9ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatHLG").msgclass VideoStream::Vp9CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings").msgclass + VideoStream::FrameRateConversionStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategy").enummodule AudioStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AudioStream").msgclass AudioStream::AudioMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AudioStream.AudioMapping").msgclass TextStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.TextStream").msgclass diff --git a/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb b/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb index eff84154a7fc..9f89b25bc898 100644 --- a/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb +++ b/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb @@ -76,24 +76,31 @@ def self.configure end default_config = Client::Configuration.new parent_config - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - default_config.rpcs.create_job.timeout = 60.0 default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } default_config.rpcs.delete_job.timeout = 60.0 default_config.rpcs.create_job_template.timeout = 60.0 default_config.rpcs.list_job_templates.timeout = 60.0 + default_config.rpcs.list_job_templates.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } default_config.rpcs.get_job_template.timeout = 60.0 + default_config.rpcs.get_job_template.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } default_config.rpcs.delete_job_template.timeout = 60.0 diff --git a/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb b/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb index 8547ca24e7e0..6e60d7401a52 100644 --- a/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb +++ b/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb @@ -78,24 +78,31 @@ def self.configure end default_config = Client::Configuration.new parent_config - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - default_config.rpcs.create_job.timeout = 60.0 default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } default_config.rpcs.delete_job.timeout = 60.0 default_config.rpcs.create_job_template.timeout = 60.0 default_config.rpcs.list_job_templates.timeout = 60.0 + default_config.rpcs.list_job_templates.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } default_config.rpcs.get_job_template.timeout = 60.0 + default_config.rpcs.get_job_template.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } default_config.rpcs.delete_job_template.timeout = 60.0 diff --git a/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb b/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb index 36bfa926d8b8..7c6fa572c5af 100644 --- a/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb +++ b/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb @@ -79,7 +79,9 @@ module V1 # @!attribute [r] error # @return [::Google::Rpc::Status] # Output only. An error object that describes the reason for the failure. - # This property is always present when `state` is `FAILED`. + # This property is always present when + # {::Google::Cloud::Video::Transcoder::V1::Job::ProcessingState ProcessingState} is + # `FAILED`. # @!attribute [rw] mode # @return [::Google::Cloud::Video::Transcoder::V1::Job::ProcessingMode] # The processing mode of the job. @@ -94,6 +96,10 @@ module V1 # @return [::Google::Cloud::Video::Transcoder::V1::Job::OptimizationStrategy] # Optional. The optimization strategy of the job. The default is # `AUTODETECT`. + # @!attribute [rw] fill_content_gaps + # @return [::Boolean] + # Optional. Insert silence and duplicate frames when timestamp gaps are + # detected in a given stream. class Job include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -121,8 +127,8 @@ module ProcessingState # The job has been completed successfully. SUCCEEDED = 3 - # The job has failed. For additional information, see `failure_reason` and - # `failure_details` + # The job has failed. For additional information, see + # [Troubleshooting](https://cloud.google.com/transcoder/docs/troubleshooting). FAILED = 4 end @@ -187,7 +193,7 @@ class LabelsEntry # List of input assets stored in Cloud Storage. # @!attribute [rw] edit_list # @return [::Array<::Google::Cloud::Video::Transcoder::V1::EditAtom>] - # List of `Edit atom`s. Defines the ultimate timeline of the resulting + # List of edit atoms. Defines the ultimate timeline of the resulting # file or manifest. # @!attribute [rw] elementary_streams # @return [::Array<::Google::Cloud::Video::Transcoder::V1::ElementaryStream>] @@ -235,7 +241,8 @@ class JobConfig # @return [::String] # URI of the media. Input files must be at least 5 seconds in duration and # stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - # If empty, the value is populated from `Job.input_uri`. See + # If empty, the value is populated from + # {::Google::Cloud::Video::Transcoder::V1::Job#input_uri Job.input_uri}. See # [Supported input and output # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). # @!attribute [rw] preprocessing_config @@ -249,8 +256,9 @@ class Input # Location of output file(s) in a Cloud Storage bucket. # @!attribute [rw] uri # @return [::String] - # URI for the output file(s). For example, `gs://my-bucket/outputs/`. - # If empty, the value is populated from `Job.output_uri`. See + # URI for the output file(s). For example, `gs://my-bucket/outputs/`. Must be + # a directory and not a top-level bucket. If empty, the value is populated + # from {::Google::Cloud::Video::Transcoder::V1::Job#output_uri Job.output_uri}. See # [Supported input and output # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). class Output @@ -265,8 +273,9 @@ class Output # mapping. # @!attribute [rw] inputs # @return [::Array<::String>] - # List of `Input.key`s identifying files that should be used in this atom. - # The listed `inputs` must have the same timeline. + # List of {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} values + # identifying files that should be used in this atom. The listed `inputs` + # must have the same timeline. # @!attribute [rw] end_time_offset # @return [::Google::Protobuf::Duration] # End time in seconds for the atom, relative to the input file timeline. @@ -320,12 +329,13 @@ class ElementaryStream # Multiplexing settings for output stream. # @!attribute [rw] key # @return [::String] - # A unique key for this multiplexed stream. HLS media manifests will be - # named `MuxStream.key` with the `.m3u8` extension suffix. + # A unique key for this multiplexed stream. # @!attribute [rw] file_name # @return [::String] - # The name of the generated file. The default is `MuxStream.key` with the - # extension suffix corresponding to the `MuxStream.container`. + # The name of the generated file. The default is + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} with the + # extension suffix corresponding to the + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#container MuxStream.container}. # # Individual segments also have an incremental 10-digit zero-padded suffix # starting from 0 before the extension, such as `mux_stream0000000123.ts`. @@ -333,11 +343,16 @@ class ElementaryStream # @return [::String] # The container format. The default is `mp4` # - # Supported container formats: + # Supported streaming formats: # # - `ts` # - `fmp4`- the corresponding file extension is `.m4s` + # + # Supported standalone file formats: + # # - `mp4` + # - `mp3` + # - `ogg` # - `vtt` # # See also: @@ -345,7 +360,9 @@ class ElementaryStream # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) # @!attribute [rw] elementary_streams # @return [::Array<::String>] - # List of `ElementaryStream.key`s multiplexed in this stream. + # List of + # {::Google::Cloud::Video::Transcoder::V1::ElementaryStream#key ElementaryStream.key} + # values multiplexed in this stream. # @!attribute [rw] segment_settings # @return [::Google::Cloud::Video::Transcoder::V1::SegmentSettings] # Segment settings for `ts`, `fmp4` and `vtt`. @@ -353,27 +370,48 @@ class ElementaryStream # @return [::String] # Identifier of the encryption configuration to use. If omitted, output will # be unencrypted. + # @!attribute [rw] fmp4 + # @return [::Google::Cloud::Video::Transcoder::V1::MuxStream::Fmp4Config] + # Optional. `fmp4` container configuration. class MuxStream include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # `fmp4` container configuration. + # @!attribute [rw] codec_tag + # @return [::String] + # Optional. Specify the codec tag string that will be used in the media + # bitstream. When not specified, the codec appropriate value is used. + # + # Supported H265 codec tags: + # + # - `hvc1` (default) + # - `hev1` + class Fmp4Config + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # Manifest configuration. # @!attribute [rw] file_name # @return [::String] # The name of the generated file. The default is `manifest` with the - # extension suffix corresponding to the `Manifest.type`. + # extension suffix corresponding to the + # {::Google::Cloud::Video::Transcoder::V1::Manifest#type Manifest.type}. # @!attribute [rw] type # @return [::Google::Cloud::Video::Transcoder::V1::Manifest::ManifestType] # Required. Type of the manifest. # @!attribute [rw] mux_streams # @return [::Array<::String>] - # Required. List of user given `MuxStream.key`s that should appear in this - # manifest. + # Required. List of user supplied + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} values that + # should appear in this manifest. # - # When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - # and `.m3u8` extension is generated for each element of the - # `Manifest.mux_streams`. + # When {::Google::Cloud::Video::Transcoder::V1::Manifest#type Manifest.type} is + # `HLS`, a media manifest with name + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} and `.m3u8` + # extension is generated for each element in this list. # @!attribute [rw] dash # @return [::Google::Cloud::Video::Transcoder::V1::Manifest::DashConfig] # `DASH` manifest configuration. @@ -395,10 +433,31 @@ module SegmentReferenceScheme # The segment reference scheme is not specified. SEGMENT_REFERENCE_SCHEME_UNSPECIFIED = 0 - # Lists the URLs of media files for each segment. + # Explicitly lists the URLs of media files for each segment. For example, + # if + # {::Google::Cloud::Video::Transcoder::V1::SegmentSettings#individual_segments SegmentSettings.individual_segments} + # is `true`, then the manifest contains fields similar to the following: + # ```xml + # + # + # + # + # ... + # ``` SEGMENT_LIST = 1 - # Lists each segment from a template with $Number$ variable. + # {::Google::Cloud::Video::Transcoder::V1::SegmentSettings#individual_segments SegmentSettings.individual_segments} + # must be set to `true` to use this segment reference scheme. Uses the + # DASH specification + # `` tag to determine the URLs of media files for each + # segment. For example: + # ```xml + # + # ... + # ``` SEGMENT_TEMPLATE_NUMBER = 2 end end @@ -516,7 +575,7 @@ class SpriteSheet # Image overlay. # @!attribute [rw] animations # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Overlay::Animation>] - # List of Animations. The list should be chronological, without any time + # List of animations. The list should be chronological, without any time # overlap. class Overlay include ::Google::Protobuf::MessageExts @@ -593,7 +652,7 @@ class AnimationFade extend ::Google::Protobuf::MessageExts::ClassMethods end - # End previous overlay animation from the video. Without AnimationEnd, the + # End previous overlay animation from the video. Without `AnimationEnd`, the # overlay object will keep the state of previous animation until the end of # the video. # @!attribute [rw] start_time_offset @@ -885,6 +944,18 @@ class VideoStream include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + # Convert the input video to a Standard Dynamic Range (SDR) video. + class H264ColorFormatSDR + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a Hybrid Log Gamma (HLG) video. + class H264ColorFormatHLG + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # H264 codec settings. # @!attribute [rw] width_pixels # @return [::Integer] @@ -909,12 +980,11 @@ class VideoStream # @!attribute [rw] frame_rate # @return [::Float] # Required. The target video frame rate in frames per second (FPS). Must be - # less than or equal to 120. Will default to the input frame rate if larger - # than the input frame rate. The API will generate an output FPS that is - # divisible by the input FPS, and smaller or equal to the target FPS. See - # [Calculating frame - # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - # more information. + # less than or equal to 120. + # @!attribute [rw] frame_rate_conversion_strategy + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] + # Optional. Frame rate conversion strategy for desired frame rate. The + # default is `DOWNSAMPLE`. # @!attribute [rw] bitrate_bps # @return [::Integer] # Required. The video bitrate in bits per second. The minimum value is @@ -936,7 +1006,7 @@ class VideoStream # - `yuv444p12` 12-bit HDR pixel format # @!attribute [rw] rate_control_mode # @return [::String] - # Specify the `rate_control_mode`. The default is `vbr`. + # Specify the mode. The default is `vbr`. # # Supported rate control modes: # @@ -968,16 +1038,18 @@ class VideoStream # @!attribute [rw] enable_two_pass # @return [::Boolean] # Use two-pass encoding strategy to achieve better video quality. - # `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#rate_control_mode H264CodecSettings.rate_control_mode} + # must be `vbr`. The default is `false`. # @!attribute [rw] vbv_size_bits # @return [::Integer] # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - # greater than zero. The default is equal to `VideoStream.bitrate_bps`. + # greater than zero. The default is equal to + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#bitrate_bps H264CodecSettings.bitrate_bps}. # @!attribute [rw] vbv_fullness_bits # @return [::Integer] # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. # Must be greater than zero. The default is equal to 90% of - # `VideoStream.vbv_size_bits`. + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#vbv_size_bits H264CodecSettings.vbv_size_bits}. # @!attribute [rw] entropy_coder # @return [::String] # The entropy coder to use. The default is `cabac`. @@ -993,8 +1065,9 @@ class VideoStream # @!attribute [rw] b_frame_count # @return [::Integer] # The number of consecutive B-frames. Must be greater than or equal to - # zero. Must be less than `VideoStream.gop_frame_count` if set. The default - # is 0. + # zero. Must be less than + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#gop_frame_count H264CodecSettings.gop_frame_count} + # if set. The default is 0. # @!attribute [rw] aq_strength # @return [::Float] # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 @@ -1029,11 +1102,39 @@ class VideoStream # Note that certain values for this field may cause the # transcoder to override other fields you set in the `H264CodecSettings` # message. + # @!attribute [rw] sdr + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H264ColorFormatSDR] + # Optional. SDR color format setting for H264. + # + # Note: The following fields are mutually exclusive: `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hlg + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H264ColorFormatHLG] + # Optional. HLG color format setting for H264. + # + # Note: The following fields are mutually exclusive: `hlg`, `sdr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class H264CodecSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # Convert the input video to a Standard Dynamic Range (SDR) video. + class H265ColorFormatSDR + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a Hybrid Log Gamma (HLG) video. + class H265ColorFormatHLG + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a High Dynamic Range 10 (HDR10) video. + class H265ColorFormatHDR10 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # H265 codec settings. # @!attribute [rw] width_pixels # @return [::Integer] @@ -1058,12 +1159,11 @@ class H264CodecSettings # @!attribute [rw] frame_rate # @return [::Float] # Required. The target video frame rate in frames per second (FPS). Must be - # less than or equal to 120. Will default to the input frame rate if larger - # than the input frame rate. The API will generate an output FPS that is - # divisible by the input FPS, and smaller or equal to the target FPS. See - # [Calculating frame - # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - # more information. + # less than or equal to 120. + # @!attribute [rw] frame_rate_conversion_strategy + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] + # Optional. Frame rate conversion strategy for desired frame rate. The + # default is `DOWNSAMPLE`. # @!attribute [rw] bitrate_bps # @return [::Integer] # Required. The video bitrate in bits per second. The minimum value is @@ -1085,7 +1185,7 @@ class H264CodecSettings # - `yuv444p12` 12-bit HDR pixel format # @!attribute [rw] rate_control_mode # @return [::String] - # Specify the `rate_control_mode`. The default is `vbr`. + # Specify the mode. The default is `vbr`. # # Supported rate control modes: # @@ -1117,7 +1217,8 @@ class H264CodecSettings # @!attribute [rw] enable_two_pass # @return [::Boolean] # Use two-pass encoding strategy to achieve better video quality. - # `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#rate_control_mode H265CodecSettings.rate_control_mode} + # must be `vbr`. The default is `false`. # @!attribute [rw] vbv_size_bits # @return [::Integer] # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be @@ -1126,7 +1227,7 @@ class H264CodecSettings # @return [::Integer] # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. # Must be greater than zero. The default is equal to 90% of - # `VideoStream.vbv_size_bits`. + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#vbv_size_bits H265CodecSettings.vbv_size_bits}. # @!attribute [rw] b_pyramid # @return [::Boolean] # Allow B-pyramid for reference frame selection. This may not be supported @@ -1134,8 +1235,9 @@ class H264CodecSettings # @!attribute [rw] b_frame_count # @return [::Integer] # The number of consecutive B-frames. Must be greater than or equal to - # zero. Must be less than `VideoStream.gop_frame_count` if set. The default - # is 0. + # zero. Must be less than + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#gop_frame_count H265CodecSettings.gop_frame_count} + # if set. The default is 0. # @!attribute [rw] aq_strength # @return [::Float] # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 @@ -1185,11 +1287,38 @@ class H264CodecSettings # Note that certain values for this field may cause the # transcoder to override other fields you set in the `H265CodecSettings` # message. + # @!attribute [rw] sdr + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatSDR] + # Optional. SDR color format setting for H265. + # + # Note: The following fields are mutually exclusive: `sdr`, `hlg`, `hdr10`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hlg + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatHLG] + # Optional. HLG color format setting for H265. + # + # Note: The following fields are mutually exclusive: `hlg`, `sdr`, `hdr10`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hdr10 + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatHDR10] + # Optional. HDR10 color format setting for H265. + # + # Note: The following fields are mutually exclusive: `hdr10`, `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. class H265CodecSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # Convert the input video to a Standard Dynamic Range (SDR) video. + class Vp9ColorFormatSDR + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a Hybrid Log Gamma (HLG) video. + class Vp9ColorFormatHLG + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # VP9 codec settings. # @!attribute [rw] width_pixels # @return [::Integer] @@ -1214,12 +1343,11 @@ class H265CodecSettings # @!attribute [rw] frame_rate # @return [::Float] # Required. The target video frame rate in frames per second (FPS). Must be - # less than or equal to 120. Will default to the input frame rate if larger - # than the input frame rate. The API will generate an output FPS that is - # divisible by the input FPS, and smaller or equal to the target FPS. See - # [Calculating frame - # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - # more information. + # less than or equal to 120. + # @!attribute [rw] frame_rate_conversion_strategy + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] + # Optional. Frame rate conversion strategy for desired frame rate. The + # default is `DOWNSAMPLE`. # @!attribute [rw] bitrate_bps # @return [::Integer] # Required. The video bitrate in bits per second. The minimum value is @@ -1241,7 +1369,7 @@ class H265CodecSettings # - `yuv444p12` 12-bit HDR pixel format # @!attribute [rw] rate_control_mode # @return [::String] - # Specify the `rate_control_mode`. The default is `vbr`. + # Specify the mode. The default is `vbr`. # # Supported rate control modes: # @@ -1282,10 +1410,39 @@ class H265CodecSettings # Note that certain values for this field may cause the # transcoder to override other fields you set in the `Vp9CodecSettings` # message. + # @!attribute [rw] sdr + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::Vp9ColorFormatSDR] + # Optional. SDR color format setting for VP9. + # + # Note: The following fields are mutually exclusive: `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hlg + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::Vp9ColorFormatHLG] + # Optional. HLG color format setting for VP9. + # + # Note: The following fields are mutually exclusive: `hlg`, `sdr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Vp9CodecSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # The conversion strategy for desired frame rate. + module FrameRateConversionStrategy + # Unspecified frame rate conversion strategy. + FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED = 0 + + # Selectively retain frames to reduce the output frame rate. + # Every _n_ th frame is kept, where `n = ceil(input frame rate / target + # frame rate)`. When _n_ = 1 (that is, the target frame rate is greater + # than the input frame rate), the output frame rate matches the input frame + # rate. When _n_ > 1, frames are dropped and the output frame rate is + # equal to `(input frame rate / n)`. For more information, see + # [Calculate frame + # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate). + DOWNSAMPLE = 1 + + # Drop or duplicate frames to match the specified frame rate. + DROP_DUPLICATE = 2 + end end # Audio stream resource. @@ -1301,6 +1458,7 @@ class Vp9CodecSettings # - `mp3` # - `ac3` # - `eac3` + # - `vorbis` # @!attribute [rw] bitrate_bps # @return [::Integer] # Required. Audio bitrate in bits per second. Must be between 1 and @@ -1324,7 +1482,10 @@ class Vp9CodecSettings # - `lfe` - Low frequency # @!attribute [rw] mapping # @return [::Array<::Google::Cloud::Video::Transcoder::V1::AudioStream::AudioMapping>] - # The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + # The mapping for the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} + # atoms with audio + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. # @!attribute [rw] sample_rate_hertz # @return [::Integer] # The audio sample rate in Hertz. The default is 48000 Hertz. @@ -1342,14 +1503,20 @@ class AudioStream include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + # The mapping for the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} + # atoms with audio + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. # @!attribute [rw] atom_key # @return [::String] - # Required. The `EditAtom.key` that references the atom with audio inputs - # in the `Job.edit_list`. + # Required. The + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#key EditAtom.key} that + # references the atom with audio inputs in the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list}. # @!attribute [rw] input_key # @return [::String] - # Required. The `Input.key` that identifies the input file. + # Required. The {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} + # that identifies the input file. # @!attribute [rw] input_track # @return [::Integer] # Required. The zero-based index of the track in the input file. @@ -1389,7 +1556,10 @@ class AudioMapping # supported in MP4 files. # @!attribute [rw] mapping # @return [::Array<::Google::Cloud::Video::Transcoder::V1::TextStream::TextMapping>] - # The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + # The mapping for the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} + # atoms with text + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. # @!attribute [rw] display_name # @return [::String] # The name for this particular text stream that @@ -1398,14 +1568,20 @@ class TextStream include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + # The mapping for the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} + # atoms with text + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. # @!attribute [rw] atom_key # @return [::String] - # Required. The `EditAtom.key` that references atom with text inputs in the - # `Job.edit_list`. + # Required. The + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#key EditAtom.key} that + # references atom with text inputs in the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list}. # @!attribute [rw] input_key # @return [::String] - # Required. The `Input.key` that identifies the input file. + # Required. The {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} + # that identifies the input file. # @!attribute [rw] input_track # @return [::Integer] # Required. The zero-based index of the track in the input file. From b679466947f7df1684a4ac8a824d3a04c8c6b763 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:27:47 -0700 Subject: [PATCH 278/457] feat(spanner-v1): Support for snapshot timestamp for the REPEATABLE_READ isolation level (#30697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 784456709 Source-Link: https://github.com/googleapis/googleapis/commit/62babf26d128656ac94fcc73c415b5f9f85cfc45 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c1d5fdd6222217236d7375534126b4f6ccdae9c9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwYW5uZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImMxZDVmZGQ2MjIyMjE3MjM2ZDczNzU1MzQxMjZiNGY2Y2NkYWU5YzkifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/spanner/v1/commit_response_pb.rb | 2 +- .../google/spanner/v1/commit_response.rb | 10 +- .../google/spanner/v1/transaction.rb | 396 ++---------------- 3 files changed, 49 insertions(+), 359 deletions(-) diff --git a/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb b/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb index f4d3c964625e..42faa7a00e43 100644 --- a/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb +++ b/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb @@ -8,7 +8,7 @@ require 'google/spanner/v1/transaction_pb' -descriptor_data = "\n\'google/spanner/v1/commit_response.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a#google/spanner/v1/transaction.proto\"\x9d\x02\n\x0e\x43ommitResponse\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0c\x63ommit_stats\x18\x02 \x01(\x0b\x32-.google.spanner.v1.CommitResponse.CommitStats\x12N\n\x0fprecommit_token\x18\x04 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenH\x00\x1a%\n\x0b\x43ommitStats\x12\x16\n\x0emutation_count\x18\x01 \x01(\x03\x42\x19\n\x17MultiplexedSessionRetryB\xb6\x01\n\x15\x63om.google.spanner.v1B\x13\x43ommitResponseProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" +descriptor_data = "\n\'google/spanner/v1/commit_response.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a#google/spanner/v1/transaction.proto\"\xd5\x02\n\x0e\x43ommitResponse\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0c\x63ommit_stats\x18\x02 \x01(\x0b\x32-.google.spanner.v1.CommitResponse.CommitStats\x12N\n\x0fprecommit_token\x18\x04 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenH\x00\x12\x36\n\x12snapshot_timestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a%\n\x0b\x43ommitStats\x12\x16\n\x0emutation_count\x18\x01 \x01(\x03\x42\x19\n\x17MultiplexedSessionRetryB\xb6\x01\n\x15\x63om.google.spanner.v1B\x13\x43ommitResponseProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb index 3f165cbad305..f6d90b21ec8c 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb @@ -27,13 +27,19 @@ module V1 # The Cloud Spanner timestamp at which the transaction committed. # @!attribute [rw] commit_stats # @return [::Google::Cloud::Spanner::V1::CommitResponse::CommitStats] - # The statistics about this Commit. Not returned by default. + # The statistics about this `Commit`. Not returned by default. # For more information, see # {::Google::Cloud::Spanner::V1::CommitRequest#return_commit_stats CommitRequest.return_commit_stats}. # @!attribute [rw] precommit_token # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] # If specified, transaction has not committed yet. - # Clients must retry the commit with the new precommit token. + # You must retry the commit with the new precommit token. + # @!attribute [rw] snapshot_timestamp + # @return [::Google::Protobuf::Timestamp] + # If `TransactionOptions.isolation_level` is set to + # `IsolationLevel.REPEATABLE_READ`, then the snapshot timestamp is the + # timestamp at which all reads in the transaction ran. This timestamp is + # never returned. class CommitResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb index da680228bd42..8a12a6a7ca38 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb @@ -21,330 +21,7 @@ module Google module Cloud module Spanner module V1 - # Transactions: - # - # Each session can have at most one active transaction at a time (note that - # standalone reads and queries use a transaction internally and do count - # towards the one transaction limit). After the active transaction is - # completed, the session can immediately be re-used for the next transaction. - # It is not necessary to create a new session for each transaction. - # - # Transaction modes: - # - # Cloud Spanner supports three transaction modes: - # - # 1. Locking read-write. This type of transaction is the only way - # to write data into Cloud Spanner. These transactions rely on - # pessimistic locking and, if necessary, two-phase commit. - # Locking read-write transactions may abort, requiring the - # application to retry. - # - # 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed - # consistency across several reads, but do not allow - # writes. Snapshot read-only transactions can be configured to read at - # timestamps in the past, or configured to perform a strong read - # (where Spanner will select a timestamp such that the read is - # guaranteed to see the effects of all transactions that have committed - # before the start of the read). Snapshot read-only transactions do not - # need to be committed. - # - # Queries on change streams must be performed with the snapshot read-only - # transaction mode, specifying a strong read. Please see - # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong} - # for more details. - # - # 3. Partitioned DML. This type of transaction is used to execute - # a single Partitioned DML statement. Partitioned DML partitions - # the key space and runs the DML statement over each partition - # in parallel using separate, internal transactions that commit - # independently. Partitioned DML transactions do not need to be - # committed. - # - # For transactions that only read, snapshot read-only transactions - # provide simpler semantics and are almost always faster. In - # particular, read-only transactions do not take locks, so they do - # not conflict with read-write transactions. As a consequence of not - # taking locks, they also do not abort, so retry loops are not needed. - # - # Transactions may only read-write data in a single database. They - # may, however, read-write data in different tables within that - # database. - # - # Locking read-write transactions: - # - # Locking transactions may be used to atomically read-modify-write - # data anywhere in a database. This type of transaction is externally - # consistent. - # - # Clients should attempt to minimize the amount of time a transaction - # is active. Faster transactions commit with higher probability - # and cause less contention. Cloud Spanner attempts to keep read locks - # active as long as the transaction continues to do reads, and the - # transaction has not been terminated by - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} or - # {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback}. Long periods of - # inactivity at the client may cause Cloud Spanner to release a - # transaction's locks and abort it. - # - # Conceptually, a read-write transaction consists of zero or more - # reads or SQL statements followed by - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}. At any time before - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}, the client can send a - # {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback} request to abort the - # transaction. - # - # Semantics: - # - # Cloud Spanner can commit the transaction if all read locks it acquired - # are still valid at commit time, and it is able to acquire write - # locks for all writes. Cloud Spanner can abort the transaction for any - # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees - # that the transaction has not modified any user data in Cloud Spanner. - # - # Unless the transaction commits, Cloud Spanner makes no guarantees about - # how long the transaction's locks were held for. It is an error to - # use Cloud Spanner locks for any sort of mutual exclusion other than - # between Cloud Spanner transactions themselves. - # - # Retrying aborted transactions: - # - # When a transaction aborts, the application can choose to retry the - # whole transaction again. To maximize the chances of successfully - # committing the retry, the client should execute the retry in the - # same session as the original attempt. The original session's lock - # priority increases with each consecutive abort, meaning that each - # attempt has a slightly better chance of success than the previous. - # - # Under some circumstances (for example, many transactions attempting to - # modify the same row(s)), a transaction can abort many times in a - # short period before successfully committing. Thus, it is not a good - # idea to cap the number of retries a transaction can attempt; - # instead, it is better to limit the total amount of time spent - # retrying. - # - # Idle transactions: - # - # A transaction is considered idle if it has no outstanding reads or - # SQL queries and has not started a read or SQL query within the last 10 - # seconds. Idle transactions can be aborted by Cloud Spanner so that they - # don't hold on to locks indefinitely. If an idle transaction is aborted, the - # commit will fail with error `ABORTED`. - # - # If this behavior is undesirable, periodically executing a simple - # SQL query in the transaction (for example, `SELECT 1`) prevents the - # transaction from becoming idle. - # - # Snapshot read-only transactions: - # - # Snapshot read-only transactions provides a simpler method than - # locking read-write transactions for doing several consistent - # reads. However, this type of transaction does not support writes. - # - # Snapshot transactions do not take locks. Instead, they work by - # choosing a Cloud Spanner timestamp, then executing all reads at that - # timestamp. Since they do not acquire locks, they do not block - # concurrent read-write transactions. - # - # Unlike locking read-write transactions, snapshot read-only - # transactions never abort. They can fail if the chosen read - # timestamp is garbage collected; however, the default garbage - # collection policy is generous enough that most applications do not - # need to worry about this in practice. - # - # Snapshot read-only transactions do not need to call - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} or - # {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback} (and in fact are not - # permitted to do so). - # - # To execute a snapshot transaction, the client specifies a timestamp - # bound, which tells Cloud Spanner how to choose a read timestamp. - # - # The types of timestamp bound are: - # - # - Strong (the default). - # - Bounded staleness. - # - Exact staleness. - # - # If the Cloud Spanner database to be read is geographically distributed, - # stale read-only transactions can execute more quickly than strong - # or read-write transactions, because they are able to execute far - # from the leader replica. - # - # Each type of timestamp bound is discussed in detail below. - # - # Strong: Strong reads are guaranteed to see the effects of all transactions - # that have committed before the start of the read. Furthermore, all - # rows yielded by a single read are consistent with each other -- if - # any part of the read observes a transaction, all parts of the read - # see the transaction. - # - # Strong reads are not repeatable: two consecutive strong read-only - # transactions might return inconsistent results if there are - # concurrent writes. If consistency across reads is required, the - # reads should be executed within a transaction or at an exact read - # timestamp. - # - # Queries on change streams (see below for more details) must also specify - # the strong read timestamp bound. - # - # See - # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong}. - # - # Exact staleness: - # - # These timestamp bounds execute reads at a user-specified - # timestamp. Reads at a timestamp are guaranteed to see a consistent - # prefix of the global transaction history: they observe - # modifications done by all transactions with a commit timestamp less than or - # equal to the read timestamp, and observe none of the modifications done by - # transactions with a larger commit timestamp. They will block until - # all conflicting transactions that may be assigned commit timestamps - # <= the read timestamp have finished. - # - # The timestamp can either be expressed as an absolute Cloud Spanner commit - # timestamp or a staleness relative to the current time. - # - # These modes do not require a "negotiation phase" to pick a - # timestamp. As a result, they execute slightly faster than the - # equivalent boundedly stale concurrency modes. On the other hand, - # boundedly stale reads usually return fresher results. - # - # See - # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#read_timestamp TransactionOptions.ReadOnly.read_timestamp} - # and - # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#exact_staleness TransactionOptions.ReadOnly.exact_staleness}. - # - # Bounded staleness: - # - # Bounded staleness modes allow Cloud Spanner to pick the read timestamp, - # subject to a user-provided staleness bound. Cloud Spanner chooses the - # newest timestamp within the staleness bound that allows execution - # of the reads at the closest available replica without blocking. - # - # All rows yielded are consistent with each other -- if any part of - # the read observes a transaction, all parts of the read see the - # transaction. Boundedly stale reads are not repeatable: two stale - # reads, even if they use the same staleness bound, can execute at - # different timestamps and thus return inconsistent results. - # - # Boundedly stale reads execute in two phases: the first phase - # negotiates a timestamp among all replicas needed to serve the - # read. In the second phase, reads are executed at the negotiated - # timestamp. - # - # As a result of the two phase execution, bounded staleness reads are - # usually a little slower than comparable exact staleness - # reads. However, they are typically able to return fresher - # results, and are more likely to execute at the closest replica. - # - # Because the timestamp negotiation requires up-front knowledge of - # which rows will be read, it can only be used with single-use - # read-only transactions. - # - # See - # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#max_staleness TransactionOptions.ReadOnly.max_staleness} - # and - # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#min_read_timestamp TransactionOptions.ReadOnly.min_read_timestamp}. - # - # Old read timestamps and garbage collection: - # - # Cloud Spanner continuously garbage collects deleted and overwritten data - # in the background to reclaim storage space. This process is known - # as "version GC". By default, version GC reclaims versions after they - # are one hour old. Because of this, Cloud Spanner cannot perform reads - # at read timestamps more than one hour in the past. This - # restriction also applies to in-progress reads and/or SQL queries whose - # timestamp become too old while executing. Reads and SQL queries with - # too-old read timestamps fail with the error `FAILED_PRECONDITION`. - # - # You can configure and extend the `VERSION_RETENTION_PERIOD` of a - # database up to a period as long as one week, which allows Cloud Spanner - # to perform reads up to one week in the past. - # - # Querying change Streams: - # - # A Change Stream is a schema object that can be configured to watch data - # changes on the entire database, a set of tables, or a set of columns - # in a database. - # - # When a change stream is created, Spanner automatically defines a - # corresponding SQL Table-Valued Function (TVF) that can be used to query - # the change records in the associated change stream using the - # ExecuteStreamingSql API. The name of the TVF for a change stream is - # generated from the name of the change stream: READ_. - # - # All queries on change stream TVFs must be executed using the - # ExecuteStreamingSql API with a single-use read-only transaction with a - # strong read-only timestamp_bound. The change stream TVF allows users to - # specify the start_timestamp and end_timestamp for the time range of - # interest. All change records within the retention period is accessible - # using the strong read-only timestamp_bound. All other TransactionOptions - # are invalid for change stream queries. - # - # In addition, if TransactionOptions.read_only.return_read_timestamp is set - # to true, a special value of 2^63 - 2 will be returned in the - # {::Google::Cloud::Spanner::V1::Transaction Transaction} message that describes the - # transaction, instead of a valid read timestamp. This special value should be - # discarded and not used for any subsequent queries. - # - # Please see https://cloud.google.com/spanner/docs/change-streams - # for more details on how to query the change stream TVFs. - # - # Partitioned DML transactions: - # - # Partitioned DML transactions are used to execute DML statements with a - # different execution strategy that provides different, and often better, - # scalability properties for large, table-wide operations than DML in a - # ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, - # should prefer using ReadWrite transactions. - # - # Partitioned DML partitions the keyspace and runs the DML statement on each - # partition in separate, internal transactions. These transactions commit - # automatically when complete, and run independently from one another. - # - # To reduce lock contention, this execution strategy only acquires read locks - # on rows that match the WHERE clause of the statement. Additionally, the - # smaller per-partition transactions hold locks for less time. - # - # That said, Partitioned DML is not a drop-in replacement for standard DML used - # in ReadWrite transactions. - # - # - The DML statement must be fully-partitionable. Specifically, the statement - # must be expressible as the union of many statements which each access only - # a single row of the table. - # - # - The statement is not applied atomically to all rows of the table. Rather, - # the statement is applied atomically to partitions of the table, in - # independent transactions. Secondary index rows are updated atomically - # with the base table rows. - # - # - Partitioned DML does not guarantee exactly-once execution semantics - # against a partition. The statement will be applied at least once to each - # partition. It is strongly recommended that the DML statement should be - # idempotent to avoid unexpected results. For instance, it is potentially - # dangerous to run a statement such as - # `UPDATE table SET column = column + 1` as it could be run multiple times - # against some rows. - # - # - The partitions are committed automatically - there is no support for - # Commit or Rollback. If the call returns an error, or if the client issuing - # the ExecuteSql call dies, it is possible that some rows had the statement - # executed on them successfully. It is also possible that statement was - # never executed against other rows. - # - # - Partitioned DML transactions may only contain the execution of a single - # DML statement via ExecuteSql or ExecuteStreamingSql. - # - # - If any error is encountered during the execution of the partitioned DML - # operation (for instance, a UNIQUE INDEX violation, division by zero, or a - # value that cannot be stored due to schema constraints), then the - # operation is stopped at that point and an error is returned. It is - # possible that at this point, some partitions have been committed (or even - # committed multiple times), and other partitions have not been run at all. - # - # Given the above, Partitioned DML is good fit for large, database-wide, - # operations that are idempotent, such as deleting old rows from a very large - # table. + # Options to use for transactions. # @!attribute [rw] read_write # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite] # Transaction may write. @@ -365,7 +42,7 @@ module V1 # Note: The following fields are mutually exclusive: `partitioned_dml`, `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] read_only # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly] - # Transaction will not write. + # Transaction does not write. # # Authorization to begin a read-only transaction requires # `spanner.databases.beginReadOnlyTransaction` permission @@ -374,20 +51,24 @@ module V1 # Note: The following fields are mutually exclusive: `read_only`, `read_write`, `partitioned_dml`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] exclude_txn_from_change_streams # @return [::Boolean] - # When `exclude_txn_from_change_streams` is set to `true`: - # * Mutations from this transaction will not be recorded in change streams - # with DDL option `allow_txn_exclusion=true` that are tracking columns - # modified by these transactions. - # * Mutations from this transaction will be recorded in change streams with - # DDL option `allow_txn_exclusion=false or not set` that are tracking - # columns modified by these transactions. + # When `exclude_txn_from_change_streams` is set to `true`, it prevents read + # or write transactions from being tracked in change streams. + # + # * If the DDL option `allow_txn_exclusion` is set to `true`, then the + # updates + # made within this transaction aren't recorded in the change stream. + # + # * If you don't set the DDL option `allow_txn_exclusion` or if it's + # set to `false`, then the updates made within this transaction are + # recorded in the change stream. # # When `exclude_txn_from_change_streams` is set to `false` or not set, - # mutations from this transaction will be recorded in all change streams that - # are tracking columns modified by these transactions. - # `exclude_txn_from_change_streams` may only be specified for read-write or - # partitioned-dml transactions, otherwise the API will return an - # `INVALID_ARGUMENT` error. + # modifications from this transaction are recorded in all change streams + # that are tracking columns modified by these transactions. + # + # The `exclude_txn_from_change_streams` option can only be specified + # for read-write or partitioned DML transactions, otherwise the API returns + # an `INVALID_ARGUMENT` error. # @!attribute [rw] isolation_level # @return [::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel] # Isolation level for the transaction. @@ -405,8 +86,6 @@ class TransactionOptions # Optional. Clients should pass the transaction ID of the previous # transaction attempt that was aborted if this transaction is being # executed on a multiplexed session. - # This feature is not yet supported and will result in an UNIMPLEMENTED - # error. class ReadWrite include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -416,23 +95,26 @@ class ReadWrite module ReadLockMode # Default value. # - # * If isolation level is `REPEATABLE_READ`, then it is an error to - # specify `read_lock_mode`. Locking semantics default to `OPTIMISTIC`. - # No validation checks are done for reads, except for: + # * If isolation level is + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::REPEATABLE_READ REPEATABLE_READ}, + # then it is an error to specify `read_lock_mode`. Locking semantics + # default to `OPTIMISTIC`. No validation checks are done for reads, + # except to validate that the data that was served at the snapshot time + # is unchanged at commit time in the following cases: # 1. reads done as part of queries that use `SELECT FOR UPDATE` # 2. reads done as part of statements with a `LOCK_SCANNED_RANGES` # hint # 3. reads done as part of DML statements - # to validate that the data that was served at the snapshot time is - # unchanged at commit time. # * At all other isolation levels, if `read_lock_mode` is the default - # value, then pessimistic read lock is used. + # value, then pessimistic read locks are used. READ_LOCK_MODE_UNSPECIFIED = 0 # Pessimistic lock mode. # # Read locks are acquired immediately on read. - # Semantics described only applies to `SERIALIZABLE` isolation. + # Semantics described only applies to + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::SERIALIZABLE SERIALIZABLE} + # isolation. PESSIMISTIC = 1 # Optimistic lock mode. @@ -440,7 +122,9 @@ module ReadLockMode # Locks for reads within the transaction are not acquired on read. # Instead the locks are acquired on a commit to validate that # read/queried data has not changed since the transaction started. - # Semantics described only applies to `SERIALIZABLE` isolation. + # Semantics described only applies to + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::SERIALIZABLE SERIALIZABLE} + # isolation. OPTIMISTIC = 2 end end @@ -494,7 +178,7 @@ class PartitionedDml # Executes all reads at the given timestamp. Unlike other modes, # reads at a specific timestamp are repeatable; the same read at # the same timestamp always returns the same data. If the - # timestamp is in the future, the read will block until the + # timestamp is in the future, the read is blocked until the # specified timestamp, modulo the read's deadline. # # Useful for large scale consistent reads such as mapreduces, or @@ -548,9 +232,9 @@ module IsolationLevel SERIALIZABLE = 1 # All reads performed during the transaction observe a consistent snapshot - # of the database, and the transaction will only successfully commit in the - # absence of conflicts between its updates and any concurrent updates that - # have occurred since that snapshot. Consequently, in contrast to + # of the database, and the transaction is only successfully committed in + # the absence of conflicts between its updates and any concurrent updates + # that have occurred since that snapshot. Consequently, in contrast to # `SERIALIZABLE` transactions, only write-write conflicts are detected in # snapshot transactions. # @@ -584,15 +268,13 @@ module IsolationLevel # Example: `"2014-10-02T15:01:23.045123456Z"`. # @!attribute [rw] precommit_token # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] - # A precommit token will be included in the response of a BeginTransaction + # A precommit token is included in the response of a BeginTransaction # request if the read-write transaction is on a multiplexed session and # a mutation_key was specified in the # {::Google::Cloud::Spanner::V1::BeginTransactionRequest BeginTransaction}. # The precommit token with the highest sequence number from this transaction # attempt should be passed to the {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} # request for this transaction. - # This feature is not yet supported and will result in an UNIMPLEMENTED - # error. class Transaction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -631,8 +313,10 @@ class TransactionSelector # When a read-write transaction is executed on a multiplexed session, # this precommit token is sent back to the client - # as a part of the [Transaction] message in the BeginTransaction response and - # also as a part of the [ResultSet] and [PartialResultSet] responses. + # as a part of the {::Google::Cloud::Spanner::V1::Transaction Transaction} message in the + # {::Google::Cloud::Spanner::V1::BeginTransactionRequest BeginTransaction} response and + # also as a part of the {::Google::Cloud::Spanner::V1::ResultSet ResultSet} and + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} responses. # @!attribute [rw] precommit_token # @return [::String] # Opaque precommit token. From 01f4e61bdc455207ed5ab27568179bda20b495c3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sun, 20 Jul 2025 20:34:04 -0700 Subject: [PATCH 279/457] feat(policy_simulator): Support for OrgPolicyViolationsPreviewService (#30698) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 784668306 Source-Link: https://github.com/googleapis/googleapis/commit/d14c969e3aed732da0a5c4b2b2f0e9c70aaec66b Source-Link: https://github.com/googleapis/googleapis-gen/commit/d780e186cd05e1a9f660fe4ebc2424b39e7094a2 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBvbGljeV9zaW11bGF0b3IvLk93bEJvdC55YW1sIiwiaCI6ImQ3ODBlMTg2Y2QwNWUxYTlmNjYwZmU0ZWJjMjQyNGIzOWU3MDk0YTIifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../AUTHENTICATION.md | 6 +- google-cloud-policy_simulator/Rakefile | 4 +- .../lib/google/cloud/policy_simulator.rb | 80 +++++++++++++++++++ .../cloud/policy_simulator/client_test.rb | 21 +++++ 4 files changed, 106 insertions(+), 5 deletions(-) diff --git a/google-cloud-policy_simulator/AUTHENTICATION.md b/google-cloud-policy_simulator/AUTHENTICATION.md index 7152a87c534a..24e75f80cda3 100644 --- a/google-cloud-policy_simulator/AUTHENTICATION.md +++ b/google-cloud-policy_simulator/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/policy_simulator" -client = Google::Cloud::PolicySimulator.simulator do |config| +client = Google::Cloud::PolicySimulator.org_policy_violations_preview_service do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -70,7 +70,7 @@ Google::Cloud::PolicySimulator.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = Google::Cloud::PolicySimulator.simulator +client = Google::Cloud::PolicySimulator.org_policy_violations_preview_service ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/policy_simulator" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = Google::Cloud::PolicySimulator.simulator +client = Google::Cloud::PolicySimulator.org_policy_violations_preview_service ``` ### Local ADC file diff --git a/google-cloud-policy_simulator/Rakefile b/google-cloud-policy_simulator/Rakefile index af5903a820c4..a54ed7b72e44 100644 --- a/google-cloud-policy_simulator/Rakefile +++ b/google-cloud-policy_simulator/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/policy_simulator/v1/simulator/credentials" - ::Google::Cloud::PolicySimulator::V1::Simulator::Credentials.env_vars.each do |path| + require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials" + ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-policy_simulator/lib/google/cloud/policy_simulator.rb b/google-cloud-policy_simulator/lib/google/cloud/policy_simulator.rb index fd0eda9d9682..36d395a8d688 100644 --- a/google-cloud-policy_simulator/lib/google/cloud/policy_simulator.rb +++ b/google-cloud-policy_simulator/lib/google/cloud/policy_simulator.rb @@ -45,6 +45,86 @@ module Google module Cloud module PolicySimulator + ## + # Create a new client object for OrgPolicyViolationsPreviewService. + # + # By default, this returns an instance of + # [Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the OrgPolicyViolationsPreviewService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the OrgPolicyViolationsPreviewService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::PolicySimulator.org_policy_violations_preview_service_available?}. + # + # ## About OrgPolicyViolationsPreviewService + # + # Violations Preview API service for OrgPolicy. + # + # An + # OrgPolicyViolationsPreview + # is a preview of the violations that will exist as soon as a proposed + # OrgPolicy change is submitted. To create an + # OrgPolicyViolationsPreview, + # the API user specifies the changes they wish to make and requests the + # generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy + # Simulator service then scans the API user's currently existing resources to + # determine these resources violate the newly set OrgPolicy. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.org_policy_violations_preview_service version: :v1, transport: :grpc, &block + require "google/cloud/policy_simulator/#{version.to_s.downcase}" + + package_name = Google::Cloud::PolicySimulator + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::PolicySimulator.const_get(package_name).const_get(:OrgPolicyViolationsPreviewService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the OrgPolicyViolationsPreviewService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::PolicySimulator.org_policy_violations_preview_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the OrgPolicyViolationsPreviewService service, + # or if the versioned client gem needs an update to support the OrgPolicyViolationsPreviewService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.org_policy_violations_preview_service_available? version: :v1, transport: :grpc + require "google/cloud/policy_simulator/#{version.to_s.downcase}" + package_name = Google::Cloud::PolicySimulator + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::PolicySimulator.const_get package_name + return false unless service_module.const_defined? :OrgPolicyViolationsPreviewService + service_module = service_module.const_get :OrgPolicyViolationsPreviewService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for Simulator. # diff --git a/google-cloud-policy_simulator/test/google/cloud/policy_simulator/client_test.rb b/google-cloud-policy_simulator/test/google/cloud/policy_simulator/client_test.rb index c5e7f138f1b5..5eeea7a014a0 100644 --- a/google-cloud-policy_simulator/test/google/cloud/policy_simulator/client_test.rb +++ b/google-cloud-policy_simulator/test/google/cloud/policy_simulator/client_test.rb @@ -41,6 +41,27 @@ def logger end end + def test_org_policy_violations_preview_service_grpc + skip unless Google::Cloud::PolicySimulator.org_policy_violations_preview_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::PolicySimulator.org_policy_violations_preview_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client, client + end + end + + def test_org_policy_violations_preview_service_rest + skip unless Google::Cloud::PolicySimulator.org_policy_violations_preview_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::PolicySimulator.org_policy_violations_preview_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client, client + end + end + def test_simulator_grpc skip unless Google::Cloud::PolicySimulator.simulator_available? transport: :grpc Gapic::ServiceStub.stub :new, DummyStub.new do From 81a9a0b10a6736c005de97794d13d21225d610db Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Mon, 21 Jul 2025 13:26:51 -0700 Subject: [PATCH 280/457] chore: Reference tombstone-library tool (#30693) --- .github/workflows/tombstone-library.yml | 31 +++ .kokoro/tombstone-gem.cfg | 47 ---- .kokoro/tombstone-gem.sh | 11 - .../tombstone-gem/.data/gemspec-template.erb | 27 --- .../tombstone-gem/.data/license-template.erb | 201 ------------------ .toys/tombstone-gem/.data/readme-template.erb | 4 - .toys/tombstone-gem/.toys.rb | 135 ------------ ...sion-template.erb => tombstone-library.rb} | 13 +- 8 files changed, 42 insertions(+), 427 deletions(-) create mode 100644 .github/workflows/tombstone-library.yml delete mode 100644 .kokoro/tombstone-gem.cfg delete mode 100755 .kokoro/tombstone-gem.sh delete mode 100644 .toys/tombstone-gem/.data/gemspec-template.erb delete mode 100644 .toys/tombstone-gem/.data/license-template.erb delete mode 100644 .toys/tombstone-gem/.data/readme-template.erb delete mode 100644 .toys/tombstone-gem/.toys.rb rename .toys/{tombstone-gem/.data/version-template.erb => tombstone-library.rb} (60%) diff --git a/.github/workflows/tombstone-library.yml b/.github/workflows/tombstone-library.yml new file mode 100644 index 000000000000..292f02bf1f92 --- /dev/null +++ b/.github/workflows/tombstone-library.yml @@ -0,0 +1,31 @@ +name: Tombstone a Library + +on: + workflow_dispatch: + inputs: + gem: + description: "gem name to tombstone" + required: true + flags: + description: "Extra flags to pass to toys tombstone-library" + required: false + +jobs: + TombstoneLibrary: + if: ${{ github.repository == 'googleapis/google-cloud-ruby' }} + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Install Ruby 3.4 + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + - name: Install tools + run: | + gem install --no-document toys + - name: Tombstone-library + run: | + toys tombstone-library -v --fork ${{ github.event.inputs.flags }} ${{ github.event.inputs.gem }} diff --git a/.kokoro/tombstone-gem.cfg b/.kokoro/tombstone-gem.cfg deleted file mode 100644 index 8b941b8e448e..000000000000 --- a/.kokoro/tombstone-gem.cfg +++ /dev/null @@ -1,47 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Use the trampoline script to run in docker. -build_file: "google-cloud-ruby/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "us-central1-docker.pkg.dev/cloud-sdk-release-custom-pool/release-images/ruby-release" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: ".kokoro/tombstone-gem.sh" -} - -env_vars: { - key: "SECRET_MANAGER_PROJECT_ID" - value: "cloud-sdk-release-custom-pool" -} - -# Pick up Rubygems key from internal keystore -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "rubygems-publish-key" - backend: "blade:keystore-fastconfigpush" - } - } -} - -# Store the packages uploaded to rubygems.org, which -# we can later use to generate SBOMs and attestations. -action { - define_artifacts { - regex: "github/google-cloud-ruby/tmp/*.gem" - strip_prefix: "github" - } -} diff --git a/.kokoro/tombstone-gem.sh b/.kokoro/tombstone-gem.sh deleted file mode 100755 index a8356093c8e9..000000000000 --- a/.kokoro/tombstone-gem.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -# Install gems in the user directory because the default install directory -# is in a read-only location. -export GEM_HOME=$HOME/.gem -export PATH=$GEM_HOME/bin:$PATH - -gem install --no-document toys -toys tombstone-gem -v --release --info-url=$INFO_URL $RELEASE_PACKAGE < /dev/null diff --git a/.toys/tombstone-gem/.data/gemspec-template.erb b/.toys/tombstone-gem/.data/gemspec-template.erb deleted file mode 100644 index bc481d183372..000000000000 --- a/.toys/tombstone-gem/.data/gemspec-template.erb +++ /dev/null @@ -1,27 +0,0 @@ -require File.expand_path("<%= namespace_dir %>/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "<%= gem_name %>" - gem.version = <%= namespace %>::VERSION - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = - "This gem is obsolete because the related Google backend is turned down. " \ - "For more information, see <%= info_url %>." - gem.summary = "This gem is obsolete because the related backend is turned down." - gem.post_install_message = <<~MESSAGE - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - The <%= gem_name %> gem is OBSOLETE. - For more information, see: - <%= info_url %> - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - MESSAGE - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - gem.platform = Gem::Platform::RUBY - gem.files = ["README.md", "LICENSE.md", "<%= namespace_dir %>/version.rb"] - gem.require_paths = ["lib"] - gem.required_ruby_version = ">= 2.0" -end diff --git a/.toys/tombstone-gem/.data/license-template.erb b/.toys/tombstone-gem/.data/license-template.erb deleted file mode 100644 index c261857ba6ad..000000000000 --- a/.toys/tombstone-gem/.data/license-template.erb +++ /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/.toys/tombstone-gem/.data/readme-template.erb b/.toys/tombstone-gem/.data/readme-template.erb deleted file mode 100644 index dad48a00a74d..000000000000 --- a/.toys/tombstone-gem/.data/readme-template.erb +++ /dev/null @@ -1,4 +0,0 @@ -# Tombstone for Ruby gem <%= gem_name %> - -This gem is obsolete because the related Google backend is turned down. -For more information, see <%= info_url %>. diff --git a/.toys/tombstone-gem/.toys.rb b/.toys/tombstone-gem/.toys.rb deleted file mode 100644 index 1a6ef7c9fd32..000000000000 --- a/.toys/tombstone-gem/.toys.rb +++ /dev/null @@ -1,135 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 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. - -desc "Tombstone a gem in RubyGems after we think it's no longer useful" - -required_arg :gem_name -optional_arg :gem_version -flag :info_url, "--info-url=URL", default: "" -flag :rubygems_api_token, "--rubygems-api-token=TOKEN", default: ENV["RUBYGEMS_API_TOKEN"] -flag :release, "--[no-]release" -flag :tmpdir, "--tmpdir=PATH" - -include :exec, e: true -include :terminal -include :fileutils - -DEFAULT_INFO_URL = "https://cloud.google.com/terms/deprecation" - -def run - cd context_directory - load_kokoro_env - ensure_gem_version - set :tmpdir, "tmp" if !tmpdir && !release - set :info_url, DEFAULT_INFO_URL if info_url.to_s.empty? - if tmpdir - mkdir_p tmpdir - cd tmpdir do - generate_files - build_gem - release_gem if release - end - else - require "tmpdir" - Dir.mktmpdir do |gem_dir| - cd gem_dir do - generate_files - build_gem - release_gem if release - end - end - end -end - -def load_kokoro_env - return if rubygems_api_token - keystore_dir = ENV["KOKORO_KEYSTORE_DIR"] - raise "No rubygems token given, and no Kokoro keystore dir found." unless keystore_dir - token_filename = File.join keystore_dir, "73713_rubygems-publish-key" - raise "No rubygems token given, and #{token_filename} not found." unless File.file? token_filename - token_data = File.read token_filename - set :rubygems_api_token, token_data - puts "Rubygems API token acquired from keystore." -end - -def ensure_gem_version - return if gem_version - require "json" - content = capture ["curl", "https://rubygems.org/api/v1/gems/#{gem_name}.json"], err: :null - last_version = JSON.parse(content)["version"] - puts "Last released version for #{gem_name} was #{last_version}" - last_version = last_version.split(".").first.to_i - set :gem_version, "#{last_version + 1}.0.0" - puts "Going to release #{gem_version}" -end - -def generate_files - require "erb" - puts "Generating files for #{gem_name} in #{Dir.getwd}", :bold - template = File.read find_data "readme-template.erb" - File.write "README.md", ERB.new(template).result(binding) - template = File.read find_data "license-template.erb" - File.write "LICENSE.md", ERB.new(template).result(binding) - template = File.read find_data "gemspec-template.erb" - File.write "#{gem_name}.gemspec", ERB.new(template).result(binding) - mkdir_p namespace_dir - template = File.read find_data "version-template.erb" - File.write "#{namespace_dir}/version.rb", ERB.new(template).result(binding) -end - -def build_gem - puts "Building #{gem_name}-#{gem_version}.gem", :bold - exec ["gem", "build", "#{gem_name}.gemspec", "--output", "#{gem_name}-#{gem_version}.gem"] -end - -def release_gem - puts "Releasing #{gem_name}-#{gem_version}.gem", :bold - env = { - "GEM_HOST_API_KEY" => rubygems_api_token - } - exec ["gem", "push", "#{gem_name}-#{gem_version}.gem"], env: env -end - -def cur_year - Time.now.year.to_s -end - -def namespace_modules - @namespace_modules ||= gem_name.split("-").map { |segment| segment.split("_").map(&:capitalize).join } -end - -def namespace - @namespace ||= namespace_modules.join "::" -end - -def namespace_dir - @namespace_dir ||= "lib-#{gem_name}".tr "-", "/" -end - -def version_lines - lines = [] - indent = 0 - namespace_modules.each do |mod| - lines << "#{' ' * indent}module #{mod}" - indent += 2 - end - lines << "#{' ' * indent}VERSION = \"#{gem_version}\"" - while indent > 0 - indent -= 2 - lines << "#{' ' * indent}end" - end - lines.join "\n" -end diff --git a/.toys/tombstone-gem/.data/version-template.erb b/.toys/tombstone-library.rb similarity index 60% rename from .toys/tombstone-gem/.data/version-template.erb rename to .toys/tombstone-library.rb index b3dfc956007a..4cdf4577ace2 100644 --- a/.toys/tombstone-gem/.data/version-template.erb +++ b/.toys/tombstone-library.rb @@ -1,4 +1,6 @@ -# Copyright <%= cur_year %> Google LLC +# frozen_string_literal: true + +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,4 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -<%= version_lines %> +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "tombstone-library") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/tombstone-library", + update: true +end From fe48be07395f91ce9d07e8fdbe8668b9d0731e80 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Mon, 21 Jul 2025 13:27:05 -0700 Subject: [PATCH 281/457] chore: Deleting a library removes the directory altogether instead of moving it to obsolete (#30708) --- .../{obsolete-library.yml => delete-library.yml} | 16 ++++++++-------- .toys/{obsolete-library.rb => delete-library.rb} | 15 ++++----------- 2 files changed, 12 insertions(+), 19 deletions(-) rename .github/workflows/{obsolete-library.yml => delete-library.yml} (57%) rename .toys/{obsolete-library.rb => delete-library.rb} (86%) diff --git a/.github/workflows/obsolete-library.yml b/.github/workflows/delete-library.yml similarity index 57% rename from .github/workflows/obsolete-library.yml rename to .github/workflows/delete-library.yml index 51a8167bf0ce..71ea5d6b4d6b 100644 --- a/.github/workflows/obsolete-library.yml +++ b/.github/workflows/delete-library.yml @@ -1,17 +1,17 @@ -name: Mark Library Obsolete +name: Delete a library on: workflow_dispatch: inputs: gem: - description: "gem name to obsolete" + description: "name of gem to remove" required: true flags: - description: "Extra flags to pass to toys obsolete-library" + description: "Extra flags to pass to toys delete-library" required: false jobs: - ObsoleteLibrary: + DeleteLibrary: if: ${{ github.repository == 'googleapis/google-cloud-ruby' }} runs-on: ubuntu-latest env: @@ -19,13 +19,13 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Install Ruby 3.3 + - name: Install Ruby 3.4 uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" - name: Install tools run: | gem install --no-document toys - - name: Obsolete-library + - name: Delete-library run: | - toys obsolete-library -v --fork ${{ github.event.inputs.flags }} ${{ github.event.inputs.gem }} + toys delete-library -v --fork ${{ github.event.inputs.flags }} ${{ github.event.inputs.gem }} diff --git a/.toys/obsolete-library.rb b/.toys/delete-library.rb similarity index 86% rename from .toys/obsolete-library.rb rename to .toys/delete-library.rb index 74c516ae4a9d..480e31ac8f41 100644 --- a/.toys/obsolete-library.rb +++ b/.toys/delete-library.rb @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -desc "A tool that obsoletes a client library" +desc "A tool that removes a client library from the repository" required_arg :gem_name @@ -32,17 +32,16 @@ def run setup branch_name = "pr/delete/#{gem_name}" - message = "chore: obsolete #{gem_name}" + message = "chore: remove #{gem_name}" result = yoshi_pr_generator.capture enabled: !git_remote.nil?, remote: git_remote, branch_name: branch_name, commit_message: message do remove_release_manifest remove_release_config - remove_owlbot_config remove_directory end - puts "result: #{result}" + puts "Pull request result: #{result}" end def setup @@ -66,12 +65,6 @@ def remove_release_config File.write "release-please-config.json", "#{JSON.pretty_generate config_json}\n" end -def remove_owlbot_config - rm_f "#{gem_name}/.OwlBot.yaml" - rm_f "#{gem_name}/.owlbot-manifest.json" - rm_f "#{gem_name}/.owlbot.rb" -end - def remove_directory - mv gem_name, "obsolete/#{gem_name}" + rm_rf gem_name end From 1d18a01932cd304b53872c2107517f19a7b98367 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 13:40:55 -0700 Subject: [PATCH 282/457] chore(main): release google-ads-ad_manager 2.0.0 (#30607) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-ads-ad_manager/CHANGELOG.md | 19 +++++++++++++++++++ .../lib/google/ads/ad_manager/version.rb | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 138d6c0ab087..e6f56e108575 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,5 +1,5 @@ { - "google-ads-ad_manager": "1.0.1", + "google-ads-ad_manager": "2.0.0", "google-ads-ad_manager+FILLER": "0.0.0", "google-ads-ad_manager-v1": "2.0.0", "google-ads-ad_manager-v1+FILLER": "0.0.0", diff --git a/google-ads-ad_manager/CHANGELOG.md b/google-ads-ad_manager/CHANGELOG.md index ae91af209329..7727d574355d 100644 --- a/google-ads-ad_manager/CHANGELOG.md +++ b/google-ads-ad_manager/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +### 2.0.0 (2025-07-21) + +### ⚠ BREAKING CHANGES + +* Updated google-ads-ad_manager-v1 dependency to version 2.x ([#30695](https://github.com/googleapis/google-cloud-ruby/issues/30695)) + +#### Features + +* Support for Contact company display name +* Support for custom targeting key +* Support for the AdBreakService +* Support for the BandwidthGroupService +* Support for the DeviceCategoryService +* Support for the GeoTargetService +* Support for the OperatingSystemService and OperatingSystemVersionService +* Support for the PrivateAuctionService and PrivateAuctionDealService +* Support for the ProgrammaticBuyerService +* Updated google-ads-ad_manager-v1 dependency to version 2.x ([#30695](https://github.com/googleapis/google-cloud-ruby/issues/30695)) + ### 1.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-ads-ad_manager/lib/google/ads/ad_manager/version.rb b/google-ads-ad_manager/lib/google/ads/ad_manager/version.rb index bcb215f14c02..6fc78bd42abe 100644 --- a/google-ads-ad_manager/lib/google/ads/ad_manager/version.rb +++ b/google-ads-ad_manager/lib/google/ads/ad_manager/version.rb @@ -20,7 +20,7 @@ module Google module Ads module AdManager - VERSION = "1.0.1" + VERSION = "2.0.0" end end end From 859ae7327c1098ff83413f1e2c5e06365b30f678 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 13:43:05 -0700 Subject: [PATCH 283/457] feat(policy_simulator-v1): Support for OrgPolicyViolationsPreview resources (#30699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 784668306 Source-Link: https://github.com/googleapis/googleapis/commit/d14c969e3aed732da0a5c4b2b2f0e9c70aaec66b Source-Link: https://github.com/googleapis/googleapis-gen/commit/d780e186cd05e1a9f660fe4ebc2424b39e7094a2 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBvbGljeV9zaW11bGF0b3ItdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ3ODBlMTg2Y2QwNWUxYTlmNjYwZmU0ZWJjMjQyNGIzOWU3MDk0YTIifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Added extra dependency on google-cloud-org_policy-v2 PiperOrigin-RevId: 784741366 Source-Link: https://github.com/googleapis/googleapis/commit/29c240bcc463751f6224deb048f3332bddf4c3ef Source-Link: https://github.com/googleapis/googleapis-gen/commit/a9507345fca7b4957d24682eb5ab7d5502133cde Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBvbGljeV9zaW11bGF0b3ItdjEvLk93bEJvdC55YW1sIiwiaCI6ImE5NTA3MzQ1ZmNhN2I0OTU3ZDI0NjgyZWI1YWI3ZDU1MDIxMzNjZGUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 24 + .../AUTHENTICATION.md | 8 +- google-cloud-policy_simulator-v1/README.md | 8 +- google-cloud-policy_simulator-v1/Rakefile | 4 +- .../gapic_metadata.json | 29 + .../google-cloud-policy_simulator-v1.gemspec | 1 + .../lib/google/cloud/policy_simulator/v1.rb | 5 +- .../org_policy_violations_preview_service.rb | 66 ++ .../client.rb | 848 +++++++++++++++ .../credentials.rb | 47 + .../operations.rb | 813 ++++++++++++++ .../paths.rb | 138 +++ .../rest.rb | 63 ++ .../rest/client.rb | 794 ++++++++++++++ .../rest/operations.rb | 998 ++++++++++++++++++ .../rest/service_stub.rb | 326 ++++++ .../google/cloud/policy_simulator/v1/rest.rb | 3 +- .../v1/simulator/rest/operations.rb | 42 + .../policysimulator/v1/explanations_pb.rb | 2 +- .../cloud/policysimulator/v1/orgpolicy_pb.rb | 70 ++ .../v1/orgpolicy_services_pb.rb | 76 ++ .../cloud/policysimulator/v1/simulator_pb.rb | 2 +- .../google/cloud/orgpolicy/v2/constraint.rb | 370 +++++++ .../google/cloud/orgpolicy/v2/orgpolicy.rb | 454 ++++++++ .../cloud/policysimulator/v1/explanations.rb | 6 +- .../cloud/policysimulator/v1/orgpolicy.rb | 380 +++++++ .../proto_docs/google/protobuf/field_mask.rb | 229 ++++ .../proto_docs/google/protobuf/struct.rb | 108 ++ .../create_org_policy_violations_preview.rb | 54 + .../get_org_policy_violations_preview.rb | 47 + .../list_org_policy_violations.rb | 51 + .../list_org_policy_violations_previews.rb | 51 + ...adata_google.cloud.policysimulator.v1.json | 160 +++ ...lations_preview_service_operations_test.rb | 398 +++++++ ...y_violations_preview_service_paths_test.rb | 97 ++ ...cy_violations_preview_service_rest_test.rb | 321 ++++++ ..._policy_violations_preview_service_test.rb | 358 +++++++ 37 files changed, 7433 insertions(+), 18 deletions(-) create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/client.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/operations.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/client.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/operations.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/service_stub.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/orgpolicy_pb.rb create mode 100644 google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/orgpolicy_services_pb.rb create mode 100644 google-cloud-policy_simulator-v1/proto_docs/google/cloud/orgpolicy/v2/constraint.rb create mode 100644 google-cloud-policy_simulator-v1/proto_docs/google/cloud/orgpolicy/v2/orgpolicy.rb create mode 100644 google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb create mode 100644 google-cloud-policy_simulator-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 google-cloud-policy_simulator-v1/proto_docs/google/protobuf/struct.rb create mode 100644 google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/create_org_policy_violations_preview.rb create mode 100644 google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/get_org_policy_violations_preview.rb create mode 100644 google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/list_org_policy_violations.rb create mode 100644 google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/list_org_policy_violations_previews.rb create mode 100644 google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_operations_test.rb create mode 100644 google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_paths_test.rb create mode 100644 google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_rest_test.rb create mode 100644 google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb diff --git a/google-cloud-policy_simulator-v1/.owlbot-manifest.json b/google-cloud-policy_simulator-v1/.owlbot-manifest.json index d4d997b07826..3f92758319cb 100644 --- a/google-cloud-policy_simulator-v1/.owlbot-manifest.json +++ b/google-cloud-policy_simulator-v1/.owlbot-manifest.json @@ -15,6 +15,15 @@ "google-cloud-policy_simulator-v1.gemspec", "lib/google-cloud-policy_simulator-v1.rb", "lib/google/cloud/policy_simulator/v1.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/client.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/operations.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/client.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/operations.rb", + "lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/service_stub.rb", "lib/google/cloud/policy_simulator/v1/rest.rb", "lib/google/cloud/policy_simulator/v1/simulator.rb", "lib/google/cloud/policy_simulator/v1/simulator/client.rb", @@ -27,6 +36,8 @@ "lib/google/cloud/policy_simulator/v1/simulator/rest/service_stub.rb", "lib/google/cloud/policy_simulator/v1/version.rb", "lib/google/cloud/policysimulator/v1/explanations_pb.rb", + "lib/google/cloud/policysimulator/v1/orgpolicy_pb.rb", + "lib/google/cloud/policysimulator/v1/orgpolicy_services_pb.rb", "lib/google/cloud/policysimulator/v1/simulator_pb.rb", "lib/google/cloud/policysimulator/v1/simulator_services_pb.rb", "proto_docs/README.md", @@ -34,22 +45,35 @@ "proto_docs/google/api/field_behavior.rb", "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/orgpolicy/v2/constraint.rb", + "proto_docs/google/cloud/orgpolicy/v2/orgpolicy.rb", "proto_docs/google/cloud/policysimulator/v1/explanations.rb", + "proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb", "proto_docs/google/cloud/policysimulator/v1/simulator.rb", "proto_docs/google/iam/v1/policy.rb", "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", "proto_docs/google/protobuf/duration.rb", "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", + "proto_docs/google/protobuf/struct.rb", "proto_docs/google/protobuf/timestamp.rb", "proto_docs/google/rpc/status.rb", "proto_docs/google/type/date.rb", "proto_docs/google/type/expr.rb", "snippets/Gemfile", + "snippets/org_policy_violations_preview_service/create_org_policy_violations_preview.rb", + "snippets/org_policy_violations_preview_service/get_org_policy_violations_preview.rb", + "snippets/org_policy_violations_preview_service/list_org_policy_violations.rb", + "snippets/org_policy_violations_preview_service/list_org_policy_violations_previews.rb", "snippets/simulator/create_replay.rb", "snippets/simulator/get_replay.rb", "snippets/simulator/list_replay_results.rb", "snippets/snippet_metadata_google.cloud.policysimulator.v1.json", + "test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_operations_test.rb", + "test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_paths_test.rb", + "test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_rest_test.rb", + "test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb", "test/google/cloud/policy_simulator/v1/simulator_operations_test.rb", "test/google/cloud/policy_simulator/v1/simulator_paths_test.rb", "test/google/cloud/policy_simulator/v1/simulator_rest_test.rb", diff --git a/google-cloud-policy_simulator-v1/AUTHENTICATION.md b/google-cloud-policy_simulator-v1/AUTHENTICATION.md index a0c96751bc79..0200e4148daf 100644 --- a/google-cloud-policy_simulator-v1/AUTHENTICATION.md +++ b/google-cloud-policy_simulator-v1/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/policy_simulator/v1" -client = ::Google::Cloud::PolicySimulator::V1::Simulator::Client.new do |config| +client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients: ```ruby require "google/cloud/policy_simulator/v1" -::Google::Cloud::PolicySimulator::V1::Simulator::Client.configure do |config| +::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Cloud::PolicySimulator::V1::Simulator::Client.new +client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/policy_simulator/v1" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Cloud::PolicySimulator::V1::Simulator::Client.new +client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new ``` ### Local ADC file diff --git a/google-cloud-policy_simulator-v1/README.md b/google-cloud-policy_simulator-v1/README.md index c9c54938c86f..e85e54143888 100644 --- a/google-cloud-policy_simulator-v1/README.md +++ b/google-cloud-policy_simulator-v1/README.md @@ -32,9 +32,9 @@ In order to use this library, you first need to go through the following steps: ```ruby require "google/cloud/policy_simulator/v1" -client = ::Google::Cloud::PolicySimulator::V1::Simulator::Client.new -request = ::Google::Cloud::PolicySimulator::V1::GetReplayRequest.new # (request fields as keyword arguments...) -response = client.get_replay request +client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new +request = ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest.new # (request fields as keyword arguments...) +response = client.list_org_policy_violations_previews request ``` View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest) @@ -75,7 +75,7 @@ constructing a client object. For example: require "google/cloud/policy_simulator/v1" require "logger" -client = ::Google::Cloud::PolicySimulator::V1::Simulator::Client.new do |config| +client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| config.logger = Logger.new "my-app.log" end ``` diff --git a/google-cloud-policy_simulator-v1/Rakefile b/google-cloud-policy_simulator-v1/Rakefile index 1b695d4b33ef..eb1725c1e821 100644 --- a/google-cloud-policy_simulator-v1/Rakefile +++ b/google-cloud-policy_simulator-v1/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/policy_simulator/v1/simulator/credentials" - ::Google::Cloud::PolicySimulator::V1::Simulator::Credentials.env_vars.each do |path| + require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials" + ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-policy_simulator-v1/gapic_metadata.json b/google-cloud-policy_simulator-v1/gapic_metadata.json index 08898a68c120..12751c254bf0 100644 --- a/google-cloud-policy_simulator-v1/gapic_metadata.json +++ b/google-cloud-policy_simulator-v1/gapic_metadata.json @@ -5,6 +5,35 @@ "protoPackage": "google.cloud.policysimulator.v1", "libraryPackage": "::Google::Cloud::PolicySimulator::V1", "services": { + "OrgPolicyViolationsPreviewService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client", + "rpcs": { + "ListOrgPolicyViolationsPreviews": { + "methods": [ + "list_org_policy_violations_previews" + ] + }, + "GetOrgPolicyViolationsPreview": { + "methods": [ + "get_org_policy_violations_preview" + ] + }, + "CreateOrgPolicyViolationsPreview": { + "methods": [ + "create_org_policy_violations_preview" + ] + }, + "ListOrgPolicyViolations": { + "methods": [ + "list_org_policy_violations" + ] + } + } + } + } + }, "Simulator": { "clients": { "grpc": { diff --git a/google-cloud-policy_simulator-v1/google-cloud-policy_simulator-v1.gemspec b/google-cloud-policy_simulator-v1/google-cloud-policy_simulator-v1.gemspec index 918d7a4ac0ab..c7d6a7b38e7e 100644 --- a/google-cloud-policy_simulator-v1/google-cloud-policy_simulator-v1.gemspec +++ b/google-cloud-policy_simulator-v1/google-cloud-policy_simulator-v1.gemspec @@ -25,5 +25,6 @@ Gem::Specification.new do |gem| gem.add_dependency "gapic-common", "~> 1.0" gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-org_policy-v2", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1.rb index 5e3045734acc..a1f1903b1711 100644 --- a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1.rb +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1.rb @@ -16,6 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service" require "google/cloud/policy_simulator/v1/simulator" require "google/cloud/policy_simulator/v1/version" @@ -28,12 +29,12 @@ module PolicySimulator # @example Load this package, including all its services, and instantiate a gRPC client # # require "google/cloud/policy_simulator/v1" - # client = ::Google::Cloud::PolicySimulator::V1::Simulator::Client.new + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new # # @example Load this package, including all its services, and instantiate a REST client # # require "google/cloud/policy_simulator/v1" - # client = ::Google::Cloud::PolicySimulator::V1::Simulator::Rest::Client.new + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new # module V1 end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service.rb new file mode 100644 index 000000000000..d01305c45925 --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policy_simulator/v1/version" + +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/operations" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/client" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest" + +module Google + module Cloud + module PolicySimulator + module V1 + ## + # Violations Preview API service for OrgPolicy. + # + # An + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is a preview of the violations that will exist as soon as a proposed + # OrgPolicy change is submitted. To create an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}, + # the API user specifies the changes they wish to make and requests the + # generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy + # Simulator service then scans the API user's currently existing resources to + # determine these resources violate the newly set OrgPolicy. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service" + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest" + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new + # + module OrgPolicyViolationsPreviewService + end + end + end + end +end + +helper_path = ::File.join __dir__, "org_policy_violations_preview_service", "helpers.rb" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/client.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/client.rb new file mode 100644 index 000000000000..a7846111ea10 --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/client.rb @@ -0,0 +1,848 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policysimulator/v1/orgpolicy_pb" + +module Google + module Cloud + module PolicySimulator + module V1 + module OrgPolicyViolationsPreviewService + ## + # Client for the OrgPolicyViolationsPreviewService service. + # + # Violations Preview API service for OrgPolicy. + # + # An + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is a preview of the violations that will exist as soon as a proposed + # OrgPolicy change is submitted. To create an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}, + # the API user specifies the changes they wish to make and requests the + # generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy + # Simulator service then scans the API user's currently existing resources to + # determine these resources violate the newly set OrgPolicy. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "policysimulator.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :org_policy_violations_preview_service_stub + + ## + # Configure the OrgPolicyViolationsPreviewService Client class. + # + # See {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrgPolicyViolationsPreviewService clients + # ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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", "PolicySimulator", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_org_policy_violations_previews.timeout = 60.0 + default_config.rpcs.list_org_policy_violations_previews.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_org_policy_violations_preview.timeout = 60.0 + default_config.rpcs.get_org_policy_violations_preview.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_org_policy_violations_preview.timeout = 60.0 + + default_config.rpcs.list_org_policy_violations.timeout = 60.0 + default_config.rpcs.list_org_policy_violations.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 OrgPolicyViolationsPreviewService 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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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 + @org_policy_violations_preview_service_stub.universe_domain + end + + ## + # Create a new OrgPolicyViolationsPreviewService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrgPolicyViolationsPreviewService 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/policysimulator/v1/orgpolicy_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @org_policy_violations_preview_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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 + ) + + @org_policy_violations_preview_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @org_policy_violations_preview_service_stub.logger + end + + # Service calls + + ## + # ListOrgPolicyViolationsPreviews lists each + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # in an organization. Each + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is available for at least 7 days. + # + # @overload list_org_policy_violations_previews(request, options = nil) + # Pass arguments to `list_org_policy_violations_previews` via a request object, either of type + # {::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest, ::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_org_policy_violations_previews(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_policy_violations_previews` 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 parent the violations are scoped to. + # Format: + # `organizations/{organization}/locations/{location}` + # + # Example: `organizations/my-example-org/locations/global` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The service may return + # fewer than this value. If unspecified, at most 5 items will be returned. + # The maximum value is 10; values above 10 will be coerced to 10. + # @param page_token [::String] + # Optional. A page token, received from a previous call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters 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::PolicySimulator::V1::OrgPolicyViolationsPreview>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/policy_simulator/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest.new + # + # # Call the list_org_policy_violations_previews method. + # result = client.list_org_policy_violations_previews 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::PolicySimulator::V1::OrgPolicyViolationsPreview. + # p item + # end + # + def list_org_policy_violations_previews request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest + + # 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_org_policy_violations_previews.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_org_policy_violations_previews.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_org_policy_violations_previews.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @org_policy_violations_preview_service_stub.call_rpc :list_org_policy_violations_previews, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @org_policy_violations_preview_service_stub, :list_org_policy_violations_previews, 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 + + ## + # GetOrgPolicyViolationsPreview gets the specified + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}. + # Each + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is available for at least 7 days. + # + # @overload get_org_policy_violations_preview(request, options = nil) + # Pass arguments to `get_org_policy_violations_preview` via a request object, either of type + # {::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest, ::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_org_policy_violations_preview(name: nil) + # Pass arguments to `get_org_policy_violations_preview` 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 name of the OrgPolicyViolationsPreview to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/policy_simulator/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest.new + # + # # Call the get_org_policy_violations_preview method. + # result = client.get_org_policy_violations_preview request + # + # # The returned object is of type Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview. + # p result + # + def get_org_policy_violations_preview request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest + + # 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_org_policy_violations_preview.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_org_policy_violations_preview.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_org_policy_violations_preview.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @org_policy_violations_preview_service_stub.call_rpc :get_org_policy_violations_preview, 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 + + ## + # CreateOrgPolicyViolationsPreview creates an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # for the proposed changes in the provided + # [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy + # are specified by this `OrgPolicyOverlay`. The resources to scan are + # inferred from these specified changes. + # + # @overload create_org_policy_violations_preview(request, options = nil) + # Pass arguments to `create_org_policy_violations_preview` via a request object, either of type + # {::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest, ::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_org_policy_violations_preview(parent: nil, org_policy_violations_preview: nil, org_policy_violations_preview_id: nil) + # Pass arguments to `create_org_policy_violations_preview` 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 organization under which this + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # will be created. + # + # Example: `organizations/my-example-org/locations/global` + # @param org_policy_violations_preview [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview, ::Hash] + # Required. The + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # to generate. + # @param org_policy_violations_preview_id [::String] + # Optional. An optional user-specified ID for the + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}. + # If not provided, a random ID will be generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/policy_simulator/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest.new + # + # # Call the create_org_policy_violations_preview method. + # result = client.create_org_policy_violations_preview request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_org_policy_violations_preview request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest + + # 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_org_policy_violations_preview.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_org_policy_violations_preview.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_org_policy_violations_preview.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @org_policy_violations_preview_service_stub.call_rpc :create_org_policy_violations_preview, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present + # in an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}. + # + # @overload list_org_policy_violations(request, options = nil) + # Pass arguments to `list_org_policy_violations` via a request object, either of type + # {::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest, ::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_org_policy_violations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_policy_violations` 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 OrgPolicyViolationsPreview to get OrgPolicyViolations from. + # Format: + # organizations/\\{organization}/locations/\\{location}/orgPolicyViolationsPreviews/\\{orgPolicyViolationsPreview} + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The service may return + # fewer than this value. If unspecified, at most 1000 items will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters 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::PolicySimulator::V1::OrgPolicyViolation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::PolicySimulator::V1::OrgPolicyViolation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/policy_simulator/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest.new + # + # # Call the list_org_policy_violations method. + # result = client.list_org_policy_violations 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::PolicySimulator::V1::OrgPolicyViolation. + # p item + # end + # + def list_org_policy_violations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest + + # 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_org_policy_violations.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_org_policy_violations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_org_policy_violations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @org_policy_violations_preview_service_stub.call_rpc :list_org_policy_violations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @org_policy_violations_preview_service_stub, :list_org_policy_violations, 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 OrgPolicyViolationsPreviewService API. + # + # This class represents the configuration for OrgPolicyViolationsPreviewService, + # 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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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 + # # list_org_policy_violations_previews to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_org_policy_violations_previews.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_org_policy_violations_previews.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "policysimulator.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 OrgPolicyViolationsPreviewService 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 `list_org_policy_violations_previews` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_policy_violations_previews + ## + # RPC-specific configuration for `get_org_policy_violations_preview` + # @return [::Gapic::Config::Method] + # + attr_reader :get_org_policy_violations_preview + ## + # RPC-specific configuration for `create_org_policy_violations_preview` + # @return [::Gapic::Config::Method] + # + attr_reader :create_org_policy_violations_preview + ## + # RPC-specific configuration for `list_org_policy_violations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_policy_violations + + # @private + def initialize parent_rpcs = nil + list_org_policy_violations_previews_config = parent_rpcs.list_org_policy_violations_previews if parent_rpcs.respond_to? :list_org_policy_violations_previews + @list_org_policy_violations_previews = ::Gapic::Config::Method.new list_org_policy_violations_previews_config + get_org_policy_violations_preview_config = parent_rpcs.get_org_policy_violations_preview if parent_rpcs.respond_to? :get_org_policy_violations_preview + @get_org_policy_violations_preview = ::Gapic::Config::Method.new get_org_policy_violations_preview_config + create_org_policy_violations_preview_config = parent_rpcs.create_org_policy_violations_preview if parent_rpcs.respond_to? :create_org_policy_violations_preview + @create_org_policy_violations_preview = ::Gapic::Config::Method.new create_org_policy_violations_preview_config + list_org_policy_violations_config = parent_rpcs.list_org_policy_violations if parent_rpcs.respond_to? :list_org_policy_violations + @list_org_policy_violations = ::Gapic::Config::Method.new list_org_policy_violations_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials.rb new file mode 100644 index 000000000000..5edbddd535ed --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 PolicySimulator + module V1 + module OrgPolicyViolationsPreviewService + # Credentials for the OrgPolicyViolationsPreviewService 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 diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/operations.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/operations.rb new file mode 100644 index 000000000000..60a55a133350 --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/operations.rb @@ -0,0 +1,813 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module PolicySimulator + module V1 + module OrgPolicyViolationsPreviewService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "policysimulator.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the OrgPolicyViolationsPreviewService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the OrgPolicyViolationsPreviewService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::PolicySimulator::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "policysimulator.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths.rb new file mode 100644 index 000000000000..e8cd3e26040d --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 PolicySimulator + module V1 + module OrgPolicyViolationsPreviewService + # Path helper methods for the OrgPolicyViolationsPreviewService API. + module Paths + ## + # Create a fully-qualified CustomConstraint resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/customConstraints/{custom_constraint}` + # + # @param organization [String] + # @param custom_constraint [String] + # + # @return [::String] + def custom_constraint_path organization:, custom_constraint: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/customConstraints/#{custom_constraint}" + end + + ## + # Create a fully-qualified OrgPolicyViolationsPreview resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{org_policy_violations_preview}` + # + # @param organization [String] + # @param location [String] + # @param org_policy_violations_preview [String] + # + # @return [::String] + def org_policy_violations_preview_path organization:, location:, org_policy_violations_preview: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/orgPolicyViolationsPreviews/#{org_policy_violations_preview}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(project:, policy:) + # The resource will be in the following format: + # + # `projects/{project}/policies/{policy}` + # + # @param project [String] + # @param policy [String] + # + # @overload policy_path(folder:, policy:) + # The resource will be in the following format: + # + # `folders/{folder}/policies/{policy}` + # + # @param folder [String] + # @param policy [String] + # + # @overload policy_path(organization:, policy:) + # The resource will be in the following format: + # + # `organizations/{organization}/policies/{policy}` + # + # @param organization [String] + # @param policy [String] + # + # @return [::String] + def policy_path **args + resources = { + "policy:project" => (proc do |project:, policy:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/policies/#{policy}" + end), + "folder:policy" => (proc do |folder:, policy:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/policies/#{policy}" + end), + "organization:policy" => (proc do |organization:, policy:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/policies/#{policy}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest.rb new file mode 100644 index 000000000000..6f7995e5ddf5 --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policy_simulator/v1/version" + +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/operations" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/client" + +module Google + module Cloud + module PolicySimulator + module V1 + ## + # Violations Preview API service for OrgPolicy. + # + # An + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is a preview of the violations that will exist as soon as a proposed + # OrgPolicy change is submitted. To create an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}, + # the API user specifies the changes they wish to make and requests the + # generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy + # Simulator service then scans the API user's currently existing resources to + # determine these resources violate the newly set OrgPolicy. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest" + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new + # + module OrgPolicyViolationsPreviewService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/client.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/client.rb new file mode 100644 index 000000000000..30cd67e8e8d2 --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/client.rb @@ -0,0 +1,794 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policysimulator/v1/orgpolicy_pb" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/service_stub" + +module Google + module Cloud + module PolicySimulator + module V1 + module OrgPolicyViolationsPreviewService + module Rest + ## + # REST client for the OrgPolicyViolationsPreviewService service. + # + # Violations Preview API service for OrgPolicy. + # + # An + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is a preview of the violations that will exist as soon as a proposed + # OrgPolicy change is submitted. To create an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}, + # the API user specifies the changes they wish to make and requests the + # generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy + # Simulator service then scans the API user's currently existing resources to + # determine these resources violate the newly set OrgPolicy. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "policysimulator.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :org_policy_violations_preview_service_stub + + ## + # Configure the OrgPolicyViolationsPreviewService Client class. + # + # See {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrgPolicyViolationsPreviewService clients + # ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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", "PolicySimulator", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_org_policy_violations_previews.timeout = 60.0 + default_config.rpcs.list_org_policy_violations_previews.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_org_policy_violations_preview.timeout = 60.0 + default_config.rpcs.get_org_policy_violations_preview.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_org_policy_violations_preview.timeout = 60.0 + + default_config.rpcs.list_org_policy_violations.timeout = 60.0 + default_config.rpcs.list_org_policy_violations.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 OrgPolicyViolationsPreviewService 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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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 + @org_policy_violations_preview_service_stub.universe_domain + end + + ## + # Create a new OrgPolicyViolationsPreviewService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrgPolicyViolationsPreviewService 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 + + @operations_client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @org_policy_violations_preview_service_stub = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @org_policy_violations_preview_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @org_policy_violations_preview_service_stub.logger + end + + # Service calls + + ## + # ListOrgPolicyViolationsPreviews lists each + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # in an organization. Each + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is available for at least 7 days. + # + # @overload list_org_policy_violations_previews(request, options = nil) + # Pass arguments to `list_org_policy_violations_previews` via a request object, either of type + # {::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest, ::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_org_policy_violations_previews(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_policy_violations_previews` 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 parent the violations are scoped to. + # Format: + # `organizations/{organization}/locations/{location}` + # + # Example: `organizations/my-example-org/locations/global` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The service may return + # fewer than this value. If unspecified, at most 5 items will be returned. + # The maximum value is 10; values above 10 will be coerced to 10. + # @param page_token [::String] + # Optional. A page token, received from a previous call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters 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::PolicySimulator::V1::OrgPolicyViolationsPreview>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/policy_simulator/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest.new + # + # # Call the list_org_policy_violations_previews method. + # result = client.list_org_policy_violations_previews 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::PolicySimulator::V1::OrgPolicyViolationsPreview. + # p item + # end + # + def list_org_policy_violations_previews request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest + + # 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_org_policy_violations_previews.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::PolicySimulator::V1::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_org_policy_violations_previews.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_org_policy_violations_previews.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @org_policy_violations_preview_service_stub.list_org_policy_violations_previews request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @org_policy_violations_preview_service_stub, :list_org_policy_violations_previews, "org_policy_violations_previews", 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 + + ## + # GetOrgPolicyViolationsPreview gets the specified + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}. + # Each + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is available for at least 7 days. + # + # @overload get_org_policy_violations_preview(request, options = nil) + # Pass arguments to `get_org_policy_violations_preview` via a request object, either of type + # {::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest, ::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_org_policy_violations_preview(name: nil) + # Pass arguments to `get_org_policy_violations_preview` 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 name of the OrgPolicyViolationsPreview to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/policy_simulator/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest.new + # + # # Call the get_org_policy_violations_preview method. + # result = client.get_org_policy_violations_preview request + # + # # The returned object is of type Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview. + # p result + # + def get_org_policy_violations_preview request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest + + # 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_org_policy_violations_preview.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::PolicySimulator::V1::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_org_policy_violations_preview.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_org_policy_violations_preview.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @org_policy_violations_preview_service_stub.get_org_policy_violations_preview 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 + + ## + # CreateOrgPolicyViolationsPreview creates an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # for the proposed changes in the provided + # [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy + # are specified by this `OrgPolicyOverlay`. The resources to scan are + # inferred from these specified changes. + # + # @overload create_org_policy_violations_preview(request, options = nil) + # Pass arguments to `create_org_policy_violations_preview` via a request object, either of type + # {::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest, ::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_org_policy_violations_preview(parent: nil, org_policy_violations_preview: nil, org_policy_violations_preview_id: nil) + # Pass arguments to `create_org_policy_violations_preview` 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 organization under which this + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # will be created. + # + # Example: `organizations/my-example-org/locations/global` + # @param org_policy_violations_preview [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview, ::Hash] + # Required. The + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # to generate. + # @param org_policy_violations_preview_id [::String] + # Optional. An optional user-specified ID for the + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}. + # If not provided, a random ID will be generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/policy_simulator/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest.new + # + # # Call the create_org_policy_violations_preview method. + # result = client.create_org_policy_violations_preview request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_org_policy_violations_preview request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest + + # 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_org_policy_violations_preview.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::PolicySimulator::V1::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_org_policy_violations_preview.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_org_policy_violations_preview.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @org_policy_violations_preview_service_stub.create_org_policy_violations_preview request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present + # in an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}. + # + # @overload list_org_policy_violations(request, options = nil) + # Pass arguments to `list_org_policy_violations` via a request object, either of type + # {::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest, ::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_org_policy_violations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_policy_violations` 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 OrgPolicyViolationsPreview to get OrgPolicyViolations from. + # Format: + # organizations/\\{organization}/locations/\\{location}/orgPolicyViolationsPreviews/\\{orgPolicyViolationsPreview} + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The service may return + # fewer than this value. If unspecified, at most 1000 items will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters 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::PolicySimulator::V1::OrgPolicyViolation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::PolicySimulator::V1::OrgPolicyViolation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/policy_simulator/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest.new + # + # # Call the list_org_policy_violations method. + # result = client.list_org_policy_violations 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::PolicySimulator::V1::OrgPolicyViolation. + # p item + # end + # + def list_org_policy_violations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest + + # 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_org_policy_violations.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::PolicySimulator::V1::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_org_policy_violations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_org_policy_violations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @org_policy_violations_preview_service_stub.list_org_policy_violations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @org_policy_violations_preview_service_stub, :list_org_policy_violations, "org_policy_violations", 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 OrgPolicyViolationsPreviewService REST API. + # + # This class represents the configuration for OrgPolicyViolationsPreviewService 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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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 + # # list_org_policy_violations_previews to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_org_policy_violations_previews.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_org_policy_violations_previews.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 = "policysimulator.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 OrgPolicyViolationsPreviewService 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 `list_org_policy_violations_previews` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_policy_violations_previews + ## + # RPC-specific configuration for `get_org_policy_violations_preview` + # @return [::Gapic::Config::Method] + # + attr_reader :get_org_policy_violations_preview + ## + # RPC-specific configuration for `create_org_policy_violations_preview` + # @return [::Gapic::Config::Method] + # + attr_reader :create_org_policy_violations_preview + ## + # RPC-specific configuration for `list_org_policy_violations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_policy_violations + + # @private + def initialize parent_rpcs = nil + list_org_policy_violations_previews_config = parent_rpcs.list_org_policy_violations_previews if parent_rpcs.respond_to? :list_org_policy_violations_previews + @list_org_policy_violations_previews = ::Gapic::Config::Method.new list_org_policy_violations_previews_config + get_org_policy_violations_preview_config = parent_rpcs.get_org_policy_violations_preview if parent_rpcs.respond_to? :get_org_policy_violations_preview + @get_org_policy_violations_preview = ::Gapic::Config::Method.new get_org_policy_violations_preview_config + create_org_policy_violations_preview_config = parent_rpcs.create_org_policy_violations_preview if parent_rpcs.respond_to? :create_org_policy_violations_preview + @create_org_policy_violations_preview = ::Gapic::Config::Method.new create_org_policy_violations_preview_config + list_org_policy_violations_config = parent_rpcs.list_org_policy_violations if parent_rpcs.respond_to? :list_org_policy_violations + @list_org_policy_violations = ::Gapic::Config::Method.new list_org_policy_violations_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/operations.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/operations.rb new file mode 100644 index 000000000000..50218d1a22ea --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/operations.rb @@ -0,0 +1,998 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Cloud + module PolicySimulator + module V1 + module OrgPolicyViolationsPreviewService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "policysimulator.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the OrgPolicyViolationsPreviewService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the OrgPolicyViolationsPreviewService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::PolicySimulator::V1::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::PolicySimulator::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::PolicySimulator::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::PolicySimulator::V1::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "policysimulator.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicySimulations/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicySimulations/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicySimulations/[^/]+/operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/service_stub.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/service_stub.rb new file mode 100644 index 000000000000..c364db058ca1 --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/service_stub.rb @@ -0,0 +1,326 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policysimulator/v1/orgpolicy_pb" + +module Google + module Cloud + module PolicySimulator + module V1 + module OrgPolicyViolationsPreviewService + module Rest + ## + # REST service stub for the OrgPolicyViolationsPreviewService 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: true, + 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 list_org_policy_violations_previews REST call + # + # @param request_pb [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest] + # 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::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse] + # A result object deserialized from the server's reply + def list_org_policy_violations_previews request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_org_policy_violations_previews_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_org_policy_violations_previews", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse.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_org_policy_violations_preview REST call + # + # @param request_pb [::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest] + # 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::PolicySimulator::V1::OrgPolicyViolationsPreview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview] + # A result object deserialized from the server's reply + def get_org_policy_violations_preview request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_org_policy_violations_preview_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_org_policy_violations_preview", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_org_policy_violations_preview REST call + # + # @param request_pb [::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_org_policy_violations_preview request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_org_policy_violations_preview_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_org_policy_violations_preview", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_org_policy_violations REST call + # + # @param request_pb [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest] + # 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::PolicySimulator::V1::ListOrgPolicyViolationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsResponse] + # A result object deserialized from the server's reply + def list_org_policy_violations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_org_policy_violations_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_org_policy_violations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsResponse.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 list_org_policy_violations_previews REST call + # + # @param request_pb [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest] + # 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_org_policy_violations_previews_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/orgPolicyViolationsPreviews", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_org_policy_violations_preview REST call + # + # @param request_pb [::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest] + # 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_org_policy_violations_preview_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_org_policy_violations_preview REST call + # + # @param request_pb [::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest] + # 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_org_policy_violations_preview_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/orgPolicyViolationsPreviews", + body: "org_policy_violations_preview", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_org_policy_violations REST call + # + # @param request_pb [::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest] + # 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_org_policy_violations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/orgPolicyViolations", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/rest.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/rest.rb index 2a6de8dd6861..2774de4b24ff 100644 --- a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/rest.rb +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/rest.rb @@ -16,6 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest" require "google/cloud/policy_simulator/v1/simulator/rest" require "google/cloud/policy_simulator/v1/version" @@ -28,7 +29,7 @@ module PolicySimulator # @example # # require "google/cloud/policy_simulator/v1/rest" - # client = ::Google::Cloud::PolicySimulator::V1::Simulator::Rest::Client.new + # client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new # module V1 end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/simulator/rest/operations.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/simulator/rest/operations.rb index ce02ce4b554e..79df542da235 100644 --- a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/simulator/rest/operations.rb +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/simulator/rest/operations.rb @@ -902,6 +902,48 @@ def self.transcode_get_operation_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations(?:/.*)?$}, true] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicySimulations/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicySimulations/[^/]+/operations(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicySimulations/[^/]+/operations(?:/.*)?$}, true] + ] + ) transcoder.transcode request_pb end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/explanations_pb.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/explanations_pb.rb index 9fd40118248f..b7392de5363f 100644 --- a/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/explanations_pb.rb +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/explanations_pb.rb @@ -9,7 +9,7 @@ require 'google/type/expr_pb' -descriptor_data = "\n2google/cloud/policysimulator/v1/explanations.proto\x12\x1fgoogle.cloud.policysimulator.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x16google/type/expr.proto\"_\n\x0b\x41\x63\x63\x65ssTuple\x12\x16\n\tprincipal\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x66ull_resource_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\npermission\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xad\x02\n\x0f\x45xplainedPolicy\x12<\n\x06\x61\x63\x63\x65ss\x18\x01 \x01(\x0e\x32,.google.cloud.policysimulator.v1.AccessState\x12\x1a\n\x12\x66ull_resource_name\x18\x02 \x01(\t\x12%\n\x06policy\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12Q\n\x14\x62inding_explanations\x18\x04 \x03(\x0b\x32\x33.google.cloud.policysimulator.v1.BindingExplanation\x12\x46\n\trelevance\x18\x05 \x01(\x0e\x32\x33.google.cloud.policysimulator.v1.HeuristicRelevance\"\xda\x08\n\x12\x42indingExplanation\x12\x41\n\x06\x61\x63\x63\x65ss\x18\x01 \x01(\x0e\x32,.google.cloud.policysimulator.v1.AccessStateB\x03\xe0\x41\x02\x12\x0c\n\x04role\x18\x02 \x01(\t\x12[\n\x0frole_permission\x18\x03 \x01(\x0e\x32\x42.google.cloud.policysimulator.v1.BindingExplanation.RolePermission\x12V\n\x19role_permission_relevance\x18\x04 \x01(\x0e\x32\x33.google.cloud.policysimulator.v1.HeuristicRelevance\x12Y\n\x0bmemberships\x18\x05 \x03(\x0b\x32\x44.google.cloud.policysimulator.v1.BindingExplanation.MembershipsEntry\x12\x46\n\trelevance\x18\x06 \x01(\x0e\x32\x33.google.cloud.policysimulator.v1.HeuristicRelevance\x12$\n\tcondition\x18\x07 \x01(\x0b\x32\x11.google.type.Expr\x1a\xb1\x01\n\x13\x41nnotatedMembership\x12R\n\nmembership\x18\x01 \x01(\x0e\x32>.google.cloud.policysimulator.v1.BindingExplanation.Membership\x12\x46\n\trelevance\x18\x02 \x01(\x0e\x32\x33.google.cloud.policysimulator.v1.HeuristicRelevance\x1a{\n\x10MembershipsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12V\n\x05value\x18\x02 \x01(\x0b\x32G.google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership:\x02\x38\x01\"\x9a\x01\n\x0eRolePermission\x12\x1f\n\x1bROLE_PERMISSION_UNSPECIFIED\x10\x00\x12\x1c\n\x18ROLE_PERMISSION_INCLUDED\x10\x01\x12 \n\x1cROLE_PERMISSION_NOT_INCLUDED\x10\x02\x12\'\n#ROLE_PERMISSION_UNKNOWN_INFO_DENIED\x10\x03\"\xa6\x01\n\nMembership\x12\x1a\n\x16MEMBERSHIP_UNSPECIFIED\x10\x00\x12\x17\n\x13MEMBERSHIP_INCLUDED\x10\x01\x12\x1b\n\x17MEMBERSHIP_NOT_INCLUDED\x10\x02\x12\"\n\x1eMEMBERSHIP_UNKNOWN_INFO_DENIED\x10\x03\x12\"\n\x1eMEMBERSHIP_UNKNOWN_UNSUPPORTED\x10\x04*{\n\x0b\x41\x63\x63\x65ssState\x12\x1c\n\x18\x41\x43\x43\x45SS_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07GRANTED\x10\x01\x12\x0f\n\x0bNOT_GRANTED\x10\x02\x12\x17\n\x13UNKNOWN_CONDITIONAL\x10\x03\x12\x17\n\x13UNKNOWN_INFO_DENIED\x10\x04*O\n\x12HeuristicRelevance\x12#\n\x1fHEURISTIC_RELEVANCE_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x42\xf5\x01\n#com.google.cloud.policysimulator.v1B\x11\x45xplanationsProtoP\x01ZMcloud.google.com/go/policysimulator/apiv1/policysimulatorpb;policysimulatorpb\xf8\x01\x01\xaa\x02\x1fGoogle.Cloud.PolicySimulator.V1\xca\x02\x1fGoogle\\Cloud\\PolicySimulator\\V1\xea\x02\"Google::Cloud::PolicySimulator::V1b\x06proto3" +descriptor_data = "\n2google/cloud/policysimulator/v1/explanations.proto\x12\x1fgoogle.cloud.policysimulator.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x16google/type/expr.proto\"_\n\x0b\x41\x63\x63\x65ssTuple\x12\x16\n\tprincipal\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x66ull_resource_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\npermission\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xad\x02\n\x0f\x45xplainedPolicy\x12<\n\x06\x61\x63\x63\x65ss\x18\x01 \x01(\x0e\x32,.google.cloud.policysimulator.v1.AccessState\x12\x1a\n\x12\x66ull_resource_name\x18\x02 \x01(\t\x12%\n\x06policy\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12Q\n\x14\x62inding_explanations\x18\x04 \x03(\x0b\x32\x33.google.cloud.policysimulator.v1.BindingExplanation\x12\x46\n\trelevance\x18\x05 \x01(\x0e\x32\x33.google.cloud.policysimulator.v1.HeuristicRelevance\"\xda\x08\n\x12\x42indingExplanation\x12\x41\n\x06\x61\x63\x63\x65ss\x18\x01 \x01(\x0e\x32,.google.cloud.policysimulator.v1.AccessStateB\x03\xe0\x41\x02\x12\x0c\n\x04role\x18\x02 \x01(\t\x12[\n\x0frole_permission\x18\x03 \x01(\x0e\x32\x42.google.cloud.policysimulator.v1.BindingExplanation.RolePermission\x12V\n\x19role_permission_relevance\x18\x04 \x01(\x0e\x32\x33.google.cloud.policysimulator.v1.HeuristicRelevance\x12Y\n\x0bmemberships\x18\x05 \x03(\x0b\x32\x44.google.cloud.policysimulator.v1.BindingExplanation.MembershipsEntry\x12\x46\n\trelevance\x18\x06 \x01(\x0e\x32\x33.google.cloud.policysimulator.v1.HeuristicRelevance\x12$\n\tcondition\x18\x07 \x01(\x0b\x32\x11.google.type.Expr\x1a\xb1\x01\n\x13\x41nnotatedMembership\x12R\n\nmembership\x18\x01 \x01(\x0e\x32>.google.cloud.policysimulator.v1.BindingExplanation.Membership\x12\x46\n\trelevance\x18\x02 \x01(\x0e\x32\x33.google.cloud.policysimulator.v1.HeuristicRelevance\x1a{\n\x10MembershipsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12V\n\x05value\x18\x02 \x01(\x0b\x32G.google.cloud.policysimulator.v1.BindingExplanation.AnnotatedMembership:\x02\x38\x01\"\x9a\x01\n\x0eRolePermission\x12\x1f\n\x1bROLE_PERMISSION_UNSPECIFIED\x10\x00\x12\x1c\n\x18ROLE_PERMISSION_INCLUDED\x10\x01\x12 \n\x1cROLE_PERMISSION_NOT_INCLUDED\x10\x02\x12\'\n#ROLE_PERMISSION_UNKNOWN_INFO_DENIED\x10\x03\"\xa6\x01\n\nMembership\x12\x1a\n\x16MEMBERSHIP_UNSPECIFIED\x10\x00\x12\x17\n\x13MEMBERSHIP_INCLUDED\x10\x01\x12\x1b\n\x17MEMBERSHIP_NOT_INCLUDED\x10\x02\x12\"\n\x1eMEMBERSHIP_UNKNOWN_INFO_DENIED\x10\x03\x12\"\n\x1eMEMBERSHIP_UNKNOWN_UNSUPPORTED\x10\x04*{\n\x0b\x41\x63\x63\x65ssState\x12\x1c\n\x18\x41\x43\x43\x45SS_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07GRANTED\x10\x01\x12\x0f\n\x0bNOT_GRANTED\x10\x02\x12\x17\n\x13UNKNOWN_CONDITIONAL\x10\x03\x12\x17\n\x13UNKNOWN_INFO_DENIED\x10\x04*O\n\x12HeuristicRelevance\x12#\n\x1fHEURISTIC_RELEVANCE_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x42\xf2\x01\n#com.google.cloud.policysimulator.v1B\x11\x45xplanationsProtoP\x01ZMcloud.google.com/go/policysimulator/apiv1/policysimulatorpb;policysimulatorpb\xaa\x02\x1fGoogle.Cloud.PolicySimulator.V1\xca\x02\x1fGoogle\\Cloud\\PolicySimulator\\V1\xea\x02\"Google::Cloud::PolicySimulator::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/orgpolicy_pb.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/orgpolicy_pb.rb new file mode 100644 index 000000000000..1613893cc5a0 --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/orgpolicy_pb.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/policysimulator/v1/orgpolicy.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/orgpolicy/v2/constraint_pb' +require 'google/cloud/orgpolicy/v2/orgpolicy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n/google/cloud/policysimulator/v1/orgpolicy.proto\x12\x1fgoogle.cloud.policysimulator.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/orgpolicy/v2/constraint.proto\x1a)google/cloud/orgpolicy/v2/orgpolicy.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xbd\x06\n\x1aOrgPolicyViolationsPreview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.policysimulator.v1.PreviewStateB\x03\xe0\x41\x03\x12G\n\x07overlay\x18\x03 \x01(\x0b\x32\x31.google.cloud.policysimulator.v1.OrgPolicyOverlayB\x03\xe0\x41\x02\x12\x1d\n\x10violations_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12h\n\x0fresource_counts\x18\x05 \x01(\x0b\x32J.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCountsB\x03\xe0\x41\x03\x12M\n\x12\x63ustom_constraints\x18\x06 \x03(\tB1\xe0\x41\x03\xfa\x41+\n)orgpolicy.googleapis.com/CustomConstraint\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x87\x01\n\x0eResourceCounts\x12\x14\n\x07scanned\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cnoncompliant\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tcompliant\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nunenforced\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x13\n\x06\x65rrors\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03:\xe7\x01\xea\x41\xe3\x01\n9policysimulator.googleapis.com/OrgPolicyViolationsPreview\x12morganizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{org_policy_violations_preview}*\x1borgPolicyViolationsPreviews2\x1aorgPolicyViolationsPreview\"\xcf\x03\n\x12OrgPolicyViolation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x08resource\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ResourceContext\x12\x46\n\x11\x63ustom_constraint\x18\x03 \x01(\x0b\x32+.google.cloud.orgpolicy.v2.CustomConstraint\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status:\xfb\x01\xea\x41\xf7\x01\n1policysimulator.googleapis.com/OrgPolicyViolation\x12\x98\x01organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{org_policy_violations_preview}/orgPolicyViolations/{org_policy_violation}*\x13orgPolicyViolations2\x12orgPolicyViolation\"J\n\x0fResourceContext\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x11\n\tancestors\x18\x03 \x03(\t\"\xcb\x03\n\x10OrgPolicyOverlay\x12V\n\x08policies\x18\x01 \x03(\x0b\x32?.google.cloud.policysimulator.v1.OrgPolicyOverlay.PolicyOverlayB\x03\xe0\x41\x01\x12j\n\x12\x63ustom_constraints\x18\x02 \x03(\x0b\x32I.google.cloud.policysimulator.v1.OrgPolicyOverlay.CustomConstraintOverlayB\x03\xe0\x41\x01\x1a\x63\n\rPolicyOverlay\x12\x1a\n\rpolicy_parent\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x06policy\x18\x02 \x01(\x0b\x32!.google.cloud.orgpolicy.v2.PolicyB\x03\xe0\x41\x01\x1a\x8d\x01\n\x17\x43ustomConstraintOverlay\x12%\n\x18\x63ustom_constraint_parent\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12K\n\x11\x63ustom_constraint\x18\x02 \x01(\x0b\x32+.google.cloud.orgpolicy.v2.CustomConstraintB\x03\xe0\x41\x01\"\xa7\x02\n1CreateOrgPolicyViolationsPreviewOperationMetadata\x12\x30\n\x0crequest_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.policysimulator.v1.PreviewStateB\x03\xe0\x41\x03\x12\x17\n\x0fresources_found\x18\x04 \x01(\x05\x12\x19\n\x11resources_scanned\x18\x05 \x01(\x05\x12\x19\n\x11resources_pending\x18\x06 \x01(\x05\"\xac\x01\n&ListOrgPolicyViolationsPreviewsRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39policysimulator.googleapis.com/OrgPolicyViolationsPreview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa7\x01\n\'ListOrgPolicyViolationsPreviewsResponse\x12\x63\n\x1eorg_policy_violations_previews\x18\x01 \x03(\x0b\x32;.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"w\n$GetOrgPolicyViolationsPreviewRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9policysimulator.googleapis.com/OrgPolicyViolationsPreview\"\x94\x02\n\'CreateOrgPolicyViolationsPreviewRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39policysimulator.googleapis.com/OrgPolicyViolationsPreview\x12g\n\x1dorg_policy_violations_preview\x18\x02 \x01(\x0b\x32;.google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewB\x03\xe0\x41\x02\x12-\n org_policy_violations_preview_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9c\x01\n\x1eListOrgPolicyViolationsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31policysimulator.googleapis.com/OrgPolicyViolation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8e\x01\n\x1fListOrgPolicyViolationsResponse\x12R\n\x15org_policy_violations\x18\x01 \x03(\x0b\x32\x33.google.cloud.policysimulator.v1.OrgPolicyViolation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t*\x82\x01\n\x0cPreviewState\x12\x1d\n\x19PREVIEW_STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fPREVIEW_PENDING\x10\x01\x12\x13\n\x0fPREVIEW_RUNNING\x10\x02\x12\x15\n\x11PREVIEW_SUCCEEDED\x10\x03\x12\x12\n\x0ePREVIEW_FAILED\x10\x04\x32\xa2\n\n!OrgPolicyViolationsPreviewService\x12\x8b\x02\n\x1fListOrgPolicyViolationsPreviews\x12G.google.cloud.policysimulator.v1.ListOrgPolicyViolationsPreviewsRequest\x1aH.google.cloud.policysimulator.v1.ListOrgPolicyViolationsPreviewsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=organizations/*/locations/*}/orgPolicyViolationsPreviews\x12\xf8\x01\n\x1dGetOrgPolicyViolationsPreview\x12\x45.google.cloud.policysimulator.v1.GetOrgPolicyViolationsPreviewRequest\x1a;.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=organizations/*/locations/*/orgPolicyViolationsPreviews/*}\x12\x93\x03\n CreateOrgPolicyViolationsPreview\x12H.google.cloud.policysimulator.v1.CreateOrgPolicyViolationsPreviewRequest\x1a\x1d.google.longrunning.Operation\"\x85\x02\xca\x41O\n\x1aOrgPolicyViolationsPreview\x12\x31\x43reateOrgPolicyViolationsPreviewOperationMetadata\xda\x41\x45parent,org_policy_violations_preview,org_policy_violations_preview_id\x82\xd3\xe4\x93\x02\x65\"D/v1/{parent=organizations/*/locations/*}/orgPolicyViolationsPreviews:\x1dorg_policy_violations_preview\x12\x89\x02\n\x17ListOrgPolicyViolations\x12?.google.cloud.policysimulator.v1.ListOrgPolicyViolationsRequest\x1a@.google.cloud.policysimulator.v1.ListOrgPolicyViolationsResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12Z/v1/{parent=organizations/*/locations/*/orgPolicyViolationsPreviews/*}/orgPolicyViolations\x1aR\xca\x41\x1epolicysimulator.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x9b\x03\n#com.google.cloud.policysimulator.v1B\x0eOrgpolicyProtoP\x01ZMcloud.google.com/go/policysimulator/apiv1/policysimulatorpb;policysimulatorpb\xaa\x02\x1fGoogle.Cloud.PolicySimulator.V1\xca\x02\x1fGoogle\\Cloud\\PolicySimulator\\V1\xea\x02\"Google::Cloud::PolicySimulator::V1\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.orgpolicy.v2.CustomConstraint", "google/cloud/orgpolicy/v2/constraint.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ["google.cloud.orgpolicy.v2.Policy", "google/cloud/orgpolicy/v2/orgpolicy.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module PolicySimulator + module V1 + OrgPolicyViolationsPreview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyViolationsPreview").msgclass + OrgPolicyViolationsPreview::ResourceCounts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts").msgclass + OrgPolicyViolation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyViolation").msgclass + ResourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ResourceContext").msgclass + OrgPolicyOverlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyOverlay").msgclass + OrgPolicyOverlay::PolicyOverlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyOverlay.PolicyOverlay").msgclass + OrgPolicyOverlay::CustomConstraintOverlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyOverlay.CustomConstraintOverlay").msgclass + CreateOrgPolicyViolationsPreviewOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.CreateOrgPolicyViolationsPreviewOperationMetadata").msgclass + ListOrgPolicyViolationsPreviewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ListOrgPolicyViolationsPreviewsRequest").msgclass + ListOrgPolicyViolationsPreviewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ListOrgPolicyViolationsPreviewsResponse").msgclass + GetOrgPolicyViolationsPreviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.GetOrgPolicyViolationsPreviewRequest").msgclass + CreateOrgPolicyViolationsPreviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.CreateOrgPolicyViolationsPreviewRequest").msgclass + ListOrgPolicyViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ListOrgPolicyViolationsRequest").msgclass + ListOrgPolicyViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ListOrgPolicyViolationsResponse").msgclass + PreviewState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.PreviewState").enummodule + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/orgpolicy_services_pb.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/orgpolicy_services_pb.rb new file mode 100644 index 000000000000..98a534938876 --- /dev/null +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/orgpolicy_services_pb.rb @@ -0,0 +1,76 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/policysimulator/v1/orgpolicy.proto for package 'Google.Cloud.PolicySimulator.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policysimulator/v1/orgpolicy_pb' + +module Google + module Cloud + module PolicySimulator + module V1 + module OrgPolicyViolationsPreviewService + # Violations Preview API service for OrgPolicy. + # + # An + # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] + # is a preview of the violations that will exist as soon as a proposed + # OrgPolicy change is submitted. To create an + # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview], + # the API user specifies the changes they wish to make and requests the + # generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy + # Simulator service then scans the API user's currently existing resources to + # determine these resources violate the newly set OrgPolicy. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService' + + # ListOrgPolicyViolationsPreviews lists each + # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] + # in an organization. Each + # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] + # is available for at least 7 days. + rpc :ListOrgPolicyViolationsPreviews, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse + # GetOrgPolicyViolationsPreview gets the specified + # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]. + # Each + # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] + # is available for at least 7 days. + rpc :GetOrgPolicyViolationsPreview, ::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest, ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview + # CreateOrgPolicyViolationsPreview creates an + # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] + # for the proposed changes in the provided + # [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy + # are specified by this `OrgPolicyOverlay`. The resources to scan are + # inferred from these specified changes. + rpc :CreateOrgPolicyViolationsPreview, ::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest, ::Google::Longrunning::Operation + # ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present + # in an + # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]. + rpc :ListOrgPolicyViolations, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/simulator_pb.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/simulator_pb.rb index 7eb45e2ec48e..d89164cdde04 100644 --- a/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/simulator_pb.rb +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policysimulator/v1/simulator_pb.rb @@ -16,7 +16,7 @@ require 'google/type/date_pb' -descriptor_data = "\n/google/cloud/policysimulator/v1/simulator.proto\x12\x1fgoogle.cloud.policysimulator.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/policysimulator/v1/explanations.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"\xef\x05\n\x06Replay\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.policysimulator.v1.Replay.StateB\x03\xe0\x41\x03\x12\x42\n\x06\x63onfig\x18\x03 \x01(\x0b\x32-.google.cloud.policysimulator.v1.ReplayConfigB\x03\xe0\x41\x02\x12T\n\x0fresults_summary\x18\x05 \x01(\x0b\x32\x36.google.cloud.policysimulator.v1.Replay.ResultsSummaryB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0eResultsSummary\x12\x11\n\tlog_count\x18\x01 \x01(\x05\x12\x17\n\x0funchanged_count\x18\x02 \x01(\x05\x12\x18\n\x10\x64ifference_count\x18\x03 \x01(\x05\x12\x13\n\x0b\x65rror_count\x18\x04 \x01(\x05\x12&\n\x0boldest_date\x18\x05 \x01(\x0b\x32\x11.google.type.Date\x12&\n\x0bnewest_date\x18\x06 \x01(\x0b\x32\x11.google.type.Date\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\xe1\x01\xea\x41\xdd\x01\n%policysimulator.googleapis.com/Replay\x12\x38projects/{project}/locations/{location}/replays/{replay}\x12\x36\x66olders/{folder}/locations/{location}/replays/{replay}\x12\x42organizations/{organization}/locations/{location}/replays/{replay}\"\xe5\x04\n\x0cReplayResult\x12;\n\x04\x64iff\x18\x05 \x01(\x0b\x32+.google.cloud.policysimulator.v1.ReplayDiffH\x00\x12#\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x06parent\x18\x02 \x01(\tB*\xfa\x41\'\n%policysimulator.googleapis.com/Replay\x12\x42\n\x0c\x61\x63\x63\x65ss_tuple\x18\x03 \x01(\x0b\x32,.google.cloud.policysimulator.v1.AccessTuple\x12)\n\x0elast_seen_date\x18\x04 \x01(\x0b\x32\x11.google.type.Date:\xaf\x02\xea\x41\xab\x02\n+policysimulator.googleapis.com/ReplayResult\x12Pprojects/{project}/locations/{location}/replays/{replay}/results/{replay_result}\x12Nfolders/{folder}/locations/{location}/replays/{replay}/results/{replay_result}\x12Zorganizations/{organization}/locations/{location}/replays/{replay}/results/{replay_result}B\x08\n\x06result\"h\n\x13\x43reateReplayRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\x06replay\x18\x02 \x01(\x0b\x32\'.google.cloud.policysimulator.v1.ReplayB\x03\xe0\x41\x02\"I\n\x17ReplayOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"O\n\x10GetReplayRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%policysimulator.googleapis.com/Replay\"\x80\x01\n\x18ListReplayResultsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%policysimulator.googleapis.com/Replay\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"{\n\x19ListReplayResultsResponse\x12\x45\n\x0ereplay_results\x18\x01 \x03(\x0b\x32-.google.cloud.policysimulator.v1.ReplayResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x02\n\x0cReplayConfig\x12X\n\x0epolicy_overlay\x18\x01 \x03(\x0b\x32@.google.cloud.policysimulator.v1.ReplayConfig.PolicyOverlayEntry\x12K\n\nlog_source\x18\x02 \x01(\x0e\x32\x37.google.cloud.policysimulator.v1.ReplayConfig.LogSource\x1aK\n\x12PolicyOverlayEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy:\x02\x38\x01\"<\n\tLogSource\x12\x1a\n\x16LOG_SOURCE_UNSPECIFIED\x10\x00\x12\x13\n\x0fRECENT_ACCESSES\x10\x01\"S\n\nReplayDiff\x12\x45\n\x0b\x61\x63\x63\x65ss_diff\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.AccessStateDiff\"\xaa\x03\n\x0f\x41\x63\x63\x65ssStateDiff\x12\x42\n\x08\x62\x61seline\x18\x01 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedAccess\x12\x43\n\tsimulated\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedAccess\x12X\n\raccess_change\x18\x03 \x01(\x0e\x32\x41.google.cloud.policysimulator.v1.AccessStateDiff.AccessChangeType\"\xb3\x01\n\x10\x41\x63\x63\x65ssChangeType\x12\"\n\x1e\x41\x43\x43\x45SS_CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNO_CHANGE\x10\x01\x12\x12\n\x0eUNKNOWN_CHANGE\x10\x02\x12\x12\n\x0e\x41\x43\x43\x45SS_REVOKED\x10\x03\x12\x11\n\rACCESS_GAINED\x10\x04\x12\x18\n\x14\x41\x43\x43\x45SS_MAYBE_REVOKED\x10\x05\x12\x17\n\x13\x41\x43\x43\x45SS_MAYBE_GAINED\x10\x06\"\xbd\x01\n\x0f\x45xplainedAccess\x12\x42\n\x0c\x61\x63\x63\x65ss_state\x18\x01 \x01(\x0e\x32,.google.cloud.policysimulator.v1.AccessState\x12\x42\n\x08policies\x18\x02 \x03(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedPolicy\x12\"\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status2\x81\x08\n\tSimulator\x12\x87\x02\n\tGetReplay\x12\x31.google.cloud.policysimulator.v1.GetReplayRequest\x1a\'.google.cloud.policysimulator.v1.Replay\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12+/v1/{name=projects/*/locations/*/replays/*}Z,\x12*/v1/{name=folders/*/locations/*/replays/*}Z2\x12\x30/v1/{name=organizations/*/locations/*/replays/*}\x12\xc8\x02\n\x0c\x43reateReplay\x12\x34.google.cloud.policysimulator.v1.CreateReplayRequest\x1a\x1d.google.longrunning.Operation\"\xe2\x01\xca\x41!\n\x06Replay\x12\x17ReplayOperationMetadata\xda\x41\rparent,replay\x82\xd3\xe4\x93\x02\xa7\x01\"+/v1/{parent=projects/*/locations/*}/replays:\x06replayZ4\"*/v1/{parent=folders/*/locations/*}/replays:\x06replayZ:\"0/v1/{parent=organizations/*/locations/*}/replays:\x06replay\x12\xca\x02\n\x11ListReplayResults\x12\x39.google.cloud.policysimulator.v1.ListReplayResultsRequest\x1a:.google.cloud.policysimulator.v1.ListReplayResultsResponse\"\xbd\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xad\x01\x12\x35/v1/{parent=projects/*/locations/*/replays/*}/resultsZ6\x12\x34/v1/{parent=folders/*/locations/*/replays/*}/resultsZ<\x12:/v1/{parent=organizations/*/locations/*/replays/*}/results\x1aR\xca\x41\x1epolicysimulator.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf2\x01\n#com.google.cloud.policysimulator.v1B\x0eSimulatorProtoP\x01ZMcloud.google.com/go/policysimulator/apiv1/policysimulatorpb;policysimulatorpb\xf8\x01\x01\xaa\x02\x1fGoogle.Cloud.PolicySimulator.V1\xca\x02\x1fGoogle\\Cloud\\PolicySimulator\\V1\xea\x02\"Google::Cloud::PolicySimulator::V1b\x06proto3" +descriptor_data = "\n/google/cloud/policysimulator/v1/simulator.proto\x12\x1fgoogle.cloud.policysimulator.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/policysimulator/v1/explanations.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"\xef\x05\n\x06Replay\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.policysimulator.v1.Replay.StateB\x03\xe0\x41\x03\x12\x42\n\x06\x63onfig\x18\x03 \x01(\x0b\x32-.google.cloud.policysimulator.v1.ReplayConfigB\x03\xe0\x41\x02\x12T\n\x0fresults_summary\x18\x05 \x01(\x0b\x32\x36.google.cloud.policysimulator.v1.Replay.ResultsSummaryB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0eResultsSummary\x12\x11\n\tlog_count\x18\x01 \x01(\x05\x12\x17\n\x0funchanged_count\x18\x02 \x01(\x05\x12\x18\n\x10\x64ifference_count\x18\x03 \x01(\x05\x12\x13\n\x0b\x65rror_count\x18\x04 \x01(\x05\x12&\n\x0boldest_date\x18\x05 \x01(\x0b\x32\x11.google.type.Date\x12&\n\x0bnewest_date\x18\x06 \x01(\x0b\x32\x11.google.type.Date\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\xe1\x01\xea\x41\xdd\x01\n%policysimulator.googleapis.com/Replay\x12\x38projects/{project}/locations/{location}/replays/{replay}\x12\x36\x66olders/{folder}/locations/{location}/replays/{replay}\x12\x42organizations/{organization}/locations/{location}/replays/{replay}\"\xe5\x04\n\x0cReplayResult\x12;\n\x04\x64iff\x18\x05 \x01(\x0b\x32+.google.cloud.policysimulator.v1.ReplayDiffH\x00\x12#\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x06parent\x18\x02 \x01(\tB*\xfa\x41\'\n%policysimulator.googleapis.com/Replay\x12\x42\n\x0c\x61\x63\x63\x65ss_tuple\x18\x03 \x01(\x0b\x32,.google.cloud.policysimulator.v1.AccessTuple\x12)\n\x0elast_seen_date\x18\x04 \x01(\x0b\x32\x11.google.type.Date:\xaf\x02\xea\x41\xab\x02\n+policysimulator.googleapis.com/ReplayResult\x12Pprojects/{project}/locations/{location}/replays/{replay}/results/{replay_result}\x12Nfolders/{folder}/locations/{location}/replays/{replay}/results/{replay_result}\x12Zorganizations/{organization}/locations/{location}/replays/{replay}/results/{replay_result}B\x08\n\x06result\"h\n\x13\x43reateReplayRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\x06replay\x18\x02 \x01(\x0b\x32\'.google.cloud.policysimulator.v1.ReplayB\x03\xe0\x41\x02\"I\n\x17ReplayOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"O\n\x10GetReplayRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%policysimulator.googleapis.com/Replay\"\x80\x01\n\x18ListReplayResultsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%policysimulator.googleapis.com/Replay\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"{\n\x19ListReplayResultsResponse\x12\x45\n\x0ereplay_results\x18\x01 \x03(\x0b\x32-.google.cloud.policysimulator.v1.ReplayResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x02\n\x0cReplayConfig\x12X\n\x0epolicy_overlay\x18\x01 \x03(\x0b\x32@.google.cloud.policysimulator.v1.ReplayConfig.PolicyOverlayEntry\x12K\n\nlog_source\x18\x02 \x01(\x0e\x32\x37.google.cloud.policysimulator.v1.ReplayConfig.LogSource\x1aK\n\x12PolicyOverlayEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy:\x02\x38\x01\"<\n\tLogSource\x12\x1a\n\x16LOG_SOURCE_UNSPECIFIED\x10\x00\x12\x13\n\x0fRECENT_ACCESSES\x10\x01\"S\n\nReplayDiff\x12\x45\n\x0b\x61\x63\x63\x65ss_diff\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.AccessStateDiff\"\xaa\x03\n\x0f\x41\x63\x63\x65ssStateDiff\x12\x42\n\x08\x62\x61seline\x18\x01 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedAccess\x12\x43\n\tsimulated\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedAccess\x12X\n\raccess_change\x18\x03 \x01(\x0e\x32\x41.google.cloud.policysimulator.v1.AccessStateDiff.AccessChangeType\"\xb3\x01\n\x10\x41\x63\x63\x65ssChangeType\x12\"\n\x1e\x41\x43\x43\x45SS_CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNO_CHANGE\x10\x01\x12\x12\n\x0eUNKNOWN_CHANGE\x10\x02\x12\x12\n\x0e\x41\x43\x43\x45SS_REVOKED\x10\x03\x12\x11\n\rACCESS_GAINED\x10\x04\x12\x18\n\x14\x41\x43\x43\x45SS_MAYBE_REVOKED\x10\x05\x12\x17\n\x13\x41\x43\x43\x45SS_MAYBE_GAINED\x10\x06\"\xbd\x01\n\x0f\x45xplainedAccess\x12\x42\n\x0c\x61\x63\x63\x65ss_state\x18\x01 \x01(\x0e\x32,.google.cloud.policysimulator.v1.AccessState\x12\x42\n\x08policies\x18\x02 \x03(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedPolicy\x12\"\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status2\x81\x08\n\tSimulator\x12\x87\x02\n\tGetReplay\x12\x31.google.cloud.policysimulator.v1.GetReplayRequest\x1a\'.google.cloud.policysimulator.v1.Replay\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12+/v1/{name=projects/*/locations/*/replays/*}Z,\x12*/v1/{name=folders/*/locations/*/replays/*}Z2\x12\x30/v1/{name=organizations/*/locations/*/replays/*}\x12\xc8\x02\n\x0c\x43reateReplay\x12\x34.google.cloud.policysimulator.v1.CreateReplayRequest\x1a\x1d.google.longrunning.Operation\"\xe2\x01\xca\x41!\n\x06Replay\x12\x17ReplayOperationMetadata\xda\x41\rparent,replay\x82\xd3\xe4\x93\x02\xa7\x01\"+/v1/{parent=projects/*/locations/*}/replays:\x06replayZ4\"*/v1/{parent=folders/*/locations/*}/replays:\x06replayZ:\"0/v1/{parent=organizations/*/locations/*}/replays:\x06replay\x12\xca\x02\n\x11ListReplayResults\x12\x39.google.cloud.policysimulator.v1.ListReplayResultsRequest\x1a:.google.cloud.policysimulator.v1.ListReplayResultsResponse\"\xbd\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xad\x01\x12\x35/v1/{parent=projects/*/locations/*/replays/*}/resultsZ6\x12\x34/v1/{parent=folders/*/locations/*/replays/*}/resultsZ<\x12:/v1/{parent=organizations/*/locations/*/replays/*}/results\x1aR\xca\x41\x1epolicysimulator.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xef\x01\n#com.google.cloud.policysimulator.v1B\x0eSimulatorProtoP\x01ZMcloud.google.com/go/policysimulator/apiv1/policysimulatorpb;policysimulatorpb\xaa\x02\x1fGoogle.Cloud.PolicySimulator.V1\xca\x02\x1fGoogle\\Cloud\\PolicySimulator\\V1\xea\x02\"Google::Cloud::PolicySimulator::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/orgpolicy/v2/constraint.rb b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/orgpolicy/v2/constraint.rb new file mode 100644 index 000000000000..2a07864020f4 --- /dev/null +++ b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/orgpolicy/v2/constraint.rb @@ -0,0 +1,370 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 OrgPolicy + module V2 + # A constraint describes a way to restrict resource's configuration. For + # example, you could enforce a constraint that controls which Google Cloud + # services can be activated across an organization, or whether a Compute Engine + # instance can have serial port connections established. Constraints can be + # configured by the organization policy administrator to fit the needs of the + # organization by setting a policy that includes constraints at different + # locations in the organization's resource hierarchy. Policies are inherited + # down the resource hierarchy from higher levels, but can also be overridden. + # For details about the inheritance rules, see + # {::Google::Cloud::OrgPolicy::V2::Policy `Policy`}. + # + # Constraints have a default behavior determined by the `constraint_default` + # field, which is the enforcement behavior that is used in the absence of a + # policy being defined or inherited for the resource in question. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the constraint. Must be in one of + # the following forms: + # + # * `projects/{project_number}/constraints/{constraint_name}` + # * `folders/{folder_id}/constraints/{constraint_name}` + # * `organizations/{organization_id}/constraints/{constraint_name}` + # + # For example, "/projects/123/constraints/compute.disableSerialPortAccess". + # @!attribute [rw] display_name + # @return [::String] + # The human readable name. + # + # Mutable. + # @!attribute [rw] description + # @return [::String] + # Detailed description of what this constraint controls as well as how and + # where it is enforced. + # + # Mutable. + # @!attribute [rw] constraint_default + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::ConstraintDefault] + # The evaluation behavior of this constraint in the absence of a policy. + # @!attribute [rw] list_constraint + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::ListConstraint] + # Defines this constraint as being a list constraint. + # + # Note: The following fields are mutually exclusive: `list_constraint`, `boolean_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] boolean_constraint + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::BooleanConstraint] + # Defines this constraint as being a boolean constraint. + # + # Note: The following fields are mutually exclusive: `boolean_constraint`, `list_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] supports_dry_run + # @return [::Boolean] + # Shows if dry run is supported for this constraint or not. + # @!attribute [rw] equivalent_constraint + # @return [::String] + # Managed constraint and canned constraint sometimes can have + # equivalents. This field is used to store the equivalent constraint name. + # @!attribute [rw] supports_simulation + # @return [::Boolean] + # Shows if simulation is supported for this constraint or not. + class Constraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A constraint type that allows or disallows a list of string values, which + # are configured in the + # {::Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule `PolicyRule`}. + # @!attribute [rw] supports_in + # @return [::Boolean] + # Indicates whether values grouped into categories can be used in + # `Policy.allowed_values` and `Policy.denied_values`. For example, + # `"in:Python"` would match any value in the 'Python' group. + # @!attribute [rw] supports_under + # @return [::Boolean] + # Indicates whether subtrees of the Resource Manager resource hierarchy + # can be used in `Policy.allowed_values` and `Policy.denied_values`. For + # example, `"under:folders/123"` would match any resource under the + # 'folders/123' folder. + class ListConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom constraint definition. Defines this as a managed constraint. + # @!attribute [rw] resource_types + # @return [::Array<::String>] + # The resource instance type on which this policy applies. Format will be + # of the form : `/` Example: + # + # * `compute.googleapis.com/Instance`. + # @!attribute [rw] method_types + # @return [::Array<::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::MethodType>] + # All the operations being applied for this constraint. + # @!attribute [rw] condition + # @return [::String] + # Org policy condition/expression. For example: + # `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, + # `resource.management.auto_upgrade == true` + # + # The max length of the condition is 1000 characters. + # @!attribute [rw] action_type + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::ActionType] + # Allow or deny type. + # @!attribute [rw] parameters + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter}] + # Stores the structure of + # {::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter `Parameters`} + # used by the constraint condition. The key of `map` represents the name of + # the parameter. + class CustomConstraintDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a parameter structure. + # @!attribute [rw] type + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] + # Type of the parameter. + # @!attribute [rw] default_value + # @return [::Google::Protobuf::Value] + # Sets the value of the parameter in an assignment if no value is given. + # @!attribute [rw] valid_values_expr + # @return [::String] + # Provides a CEL expression to specify the acceptable parameter values + # during assignment. + # For example, parameterName in ("parameterValue1", "parameterValue2") + # @!attribute [rw] metadata + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Metadata] + # Defines subproperties primarily used by the UI to display user-friendly + # information. + # @!attribute [rw] item + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] + # Determines the parameter's value structure. + # For example, `LIST` can be specified by defining `type: LIST`, + # and `item: STRING`. + class Parameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines Metadata structure. + # @!attribute [rw] description + # @return [::String] + # Detailed description of what this `parameter` is and use of it. + # Mutable. + class Metadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # All valid types of parameter. + module Type + # This is only used for distinguishing unset values and should never be + # used. Results in an error. + TYPE_UNSPECIFIED = 0 + + # List parameter type. + LIST = 1 + + # String parameter type. + STRING = 2 + + # Boolean parameter type. + BOOLEAN = 3 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter] + class ParametersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation for which this constraint will be applied. To apply this + # constraint only when creating new resources, the `method_types` should be + # `CREATE` only. To apply this constraint when creating or deleting + # resources, the `method_types` should be `CREATE` and `DELETE`. + # + # `UPDATE`-only custom constraints are not supported. Use `CREATE` or + # `CREATE, UPDATE`. + module MethodType + # This is only used for distinguishing unset values and should never be + # used. Results in an error. + METHOD_TYPE_UNSPECIFIED = 0 + + # Constraint applied when creating the resource. + CREATE = 1 + + # Constraint applied when updating the resource. + UPDATE = 2 + + # Constraint applied when deleting the resource. + # Not currently supported. + DELETE = 3 + + # Constraint applied when removing an IAM grant. + REMOVE_GRANT = 4 + + # Constraint applied when enforcing forced tagging. + GOVERN_TAGS = 5 + end + + # Allow or deny type. + module ActionType + # This is only used for distinguishing unset values and should never be + # used. Results in an error. + ACTION_TYPE_UNSPECIFIED = 0 + + # Allowed action type. + ALLOW = 1 + + # Deny action type. + DENY = 2 + end + end + + # A constraint type is enforced or not enforced, which is configured in the + # {::Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule `PolicyRule`}. + # + # If `customConstraintDefinition` is defined, this constraint is a managed + # constraint. + # @!attribute [rw] custom_constraint_definition + # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition] + # Custom constraint definition. Defines this as a managed constraint. + class BooleanConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the default behavior in the absence of any policy for the + # constraint. This must not be `CONSTRAINT_DEFAULT_UNSPECIFIED`. + # + # Immutable after creation. + module ConstraintDefault + # This is only used for distinguishing unset values and should never be + # used. Results in an error. + CONSTRAINT_DEFAULT_UNSPECIFIED = 0 + + # Indicate that all values are allowed for list constraints. + # Indicate that enforcement is off for boolean constraints. + ALLOW = 1 + + # Indicate that all values are denied for list constraints. + # Indicate that enforcement is on for boolean constraints. + DENY = 2 + end + end + + # A custom constraint defined by customers which can *only* be applied to the + # given resource types and organization. + # + # By creating a custom constraint, customers can apply policies of this + # custom constraint. *Creating a custom constraint itself does NOT apply any + # policy enforcement*. + # @!attribute [rw] name + # @return [::String] + # Immutable. Name of the constraint. This is unique within the organization. + # Format of the name should be + # + # * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` + # + # Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + # + # The max length is 70 characters and the minimum length is 1. Note that the + # prefix `organizations/{organization_id}/customConstraints/` is not counted. + # @!attribute [rw] resource_types + # @return [::Array<::String>] + # Immutable. The resource instance type on which this policy applies. Format + # will be of the form : `/` Example: + # + # * `compute.googleapis.com/Instance`. + # @!attribute [rw] method_types + # @return [::Array<::Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType>] + # All the operations being applied for this constraint. + # @!attribute [rw] condition + # @return [::String] + # A Common Expression Language (CEL) condition which is used in the + # evaluation of the constraint. For example: + # `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, + # `resource.management.auto_upgrade == true` + # + # The max length of the condition is 1000 characters. + # @!attribute [rw] action_type + # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint::ActionType] + # Allow or deny type. + # @!attribute [rw] display_name + # @return [::String] + # One line display name for the UI. + # The max length of the display_name is 200 characters. + # @!attribute [rw] description + # @return [::String] + # Detailed information about this custom policy constraint. + # The max length of the description is 2000 characters. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time this custom constraint was updated. This + # represents the last time that the `CreateCustomConstraint` or + # `UpdateCustomConstraint` methods were called. + class CustomConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The operation for which this constraint will be applied. To apply this + # constraint only when creating new resources, the `method_types` should be + # `CREATE` only. To apply this constraint when creating or deleting + # resources, the `method_types` should be `CREATE` and `DELETE`. + # + # `UPDATE` only custom constraints are not supported. Use `CREATE` or + # `CREATE, UPDATE`. + module MethodType + # This is only used for distinguishing unset values and should never be + # used. Results in an error. + METHOD_TYPE_UNSPECIFIED = 0 + + # Constraint applied when creating the resource. + CREATE = 1 + + # Constraint applied when updating the resource. + UPDATE = 2 + + # Constraint applied when deleting the resource. + # Not currently supported. + DELETE = 3 + + # Constraint applied when removing an IAM grant. + REMOVE_GRANT = 4 + + # Constraint applied when enforcing forced tagging. + GOVERN_TAGS = 5 + end + + # Allow or deny type. + module ActionType + # This is only used for distinguishing unset values and should never be + # used. Results in an error. + ACTION_TYPE_UNSPECIFIED = 0 + + # Allowed action type. + ALLOW = 1 + + # Deny action type. + DENY = 2 + end + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/orgpolicy/v2/orgpolicy.rb b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/orgpolicy/v2/orgpolicy.rb new file mode 100644 index 000000000000..52a4bc779aa7 --- /dev/null +++ b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/orgpolicy/v2/orgpolicy.rb @@ -0,0 +1,454 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 OrgPolicy + module V2 + # Defines an organization policy which is used to specify constraints + # for configurations of Google Cloud resources. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the policy. Must be one of the following + # forms, where `constraint_name` is the name of the constraint which this + # policy configures: + # + # * `projects/{project_number}/policies/{constraint_name}` + # * `folders/{folder_id}/policies/{constraint_name}` + # * `organizations/{organization_id}/policies/{constraint_name}` + # + # For example, `projects/123/policies/compute.disableSerialPortAccess`. + # + # Note: `projects/{project_id}/policies/{constraint_name}` is also an + # acceptable name for API requests, but responses will return the name using + # the equivalent project number. + # @!attribute [rw] spec + # @return [::Google::Cloud::OrgPolicy::V2::PolicySpec] + # Basic information about the organization policy. + # @!attribute [rw] alternate + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::OrgPolicy::V2::AlternatePolicySpec] + # Deprecated. + # @!attribute [rw] dry_run_spec + # @return [::Google::Cloud::OrgPolicy::V2::PolicySpec] + # Dry-run policy. + # Audit-only policy, can be used to monitor how the policy would have + # impacted the existing and future resources if it's enforced. + # @!attribute [rw] etag + # @return [::String] + # Optional. An opaque tag indicating the current state of the policy, used + # for concurrency control. This 'etag' is computed by the server based on the + # value of other fields, and may be sent on update and delete requests to + # ensure the client has an up-to-date value before proceeding. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Similar to PolicySpec but with an extra 'launch' field for launch reference. + # The PolicySpec here is specific for dry-run. + # @!attribute [rw] launch + # @return [::String] + # Reference to the launch that will be used while audit logging and to + # control the launch. + # Should be set only in the alternate policy. + # @!attribute [rw] spec + # @return [::Google::Cloud::OrgPolicy::V2::PolicySpec] + # Specify constraint for configurations of Google Cloud resources. + class AlternatePolicySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines a Google Cloud policy specification which is used to specify + # constraints for configurations of Google Cloud resources. + # @!attribute [rw] etag + # @return [::String] + # An opaque tag indicating the current version of the policySpec, used for + # concurrency control. + # + # This field is ignored if used in a `CreatePolicy` request. + # + # When the policy is returned from either a `GetPolicy` or a + # `ListPolicies` request, this `etag` indicates the version of the + # current policySpec to use when executing a read-modify-write loop. + # + # When the policy is returned from a `GetEffectivePolicy` request, the + # `etag` will be unset. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time stamp this was previously updated. This + # represents the last time a call to `CreatePolicy` or `UpdatePolicy` was + # made for that policy. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule>] + # In policies for boolean constraints, the following requirements apply: + # + # - There must be one and only one policy rule where condition is unset. + # - Boolean policy rules with conditions must set `enforced` to the + # opposite of the policy rule without a condition. + # - During policy evaluation, policy rules with conditions that are + # true for a target resource take precedence. + # @!attribute [rw] inherit_from_parent + # @return [::Boolean] + # Determines the inheritance behavior for this policy. + # + # If `inherit_from_parent` is true, policy rules set higher up in the + # hierarchy (up to the closest root) are inherited and present in the + # effective policy. If it is false, then no rules are inherited, and this + # policy becomes the new root for evaluation. + # This field can be set only for policies which configure list constraints. + # @!attribute [rw] reset + # @return [::Boolean] + # Ignores policies set above this resource and restores the + # `constraint_default` enforcement behavior of the specific constraint at + # this resource. + # This field can be set in policies for either list or boolean + # constraints. If set, `rules` must be empty and `inherit_from_parent` + # must be set to false. + class PolicySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A rule used to express this policy. + # @!attribute [rw] values + # @return [::Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule::StringValues] + # List of values to be used for this policy rule. This field can be set + # only in policies for list constraints. + # + # Note: The following fields are mutually exclusive: `values`, `allow_all`, `deny_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] allow_all + # @return [::Boolean] + # Setting this to true means that all values are allowed. This field can + # be set only in policies for list constraints. + # + # Note: The following fields are mutually exclusive: `allow_all`, `values`, `deny_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deny_all + # @return [::Boolean] + # Setting this to true means that all values are denied. This field can + # be set only in policies for list constraints. + # + # Note: The following fields are mutually exclusive: `deny_all`, `values`, `allow_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] enforce + # @return [::Boolean] + # If `true`, then the policy is enforced. If `false`, then any + # configuration is acceptable. + # This field can be set only in policies for boolean constraints. + # + # Note: The following fields are mutually exclusive: `enforce`, `values`, `allow_all`, `deny_all`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # A condition which determines whether this rule is used + # in the evaluation of the policy. When set, the `expression` field in + # the `Expr' must include from 1 to 10 subexpressions, joined by the "||" + # or "&&" operators. Each subexpression must be of the form + # "resource.matchTag('/tag_key_short_name, + # 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', + # 'tagValues/value_id')". where key_name and value_name are the resource + # names for Label Keys and Values. These names are available from the Tag + # Manager Service. An example expression is: + # "resource.matchTag('123456789/environment, + # 'prod')". or "resource.matchTagId('tagKeys/123', + # 'tagValues/456')". + # @!attribute [rw] parameters + # @return [::Google::Protobuf::Struct] + # Optional. Required for managed constraints if parameters are defined. + # Passes parameter values when policy enforcement is enabled. Ensure that + # parameter value types match those defined in the constraint definition. + # For example: + # { + # "allowedLocations" : ["us-east1", "us-west1"], + # "allowAll" : true + # } + class PolicyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message that holds specific allowed and denied values. + # This message can define specific values and subtrees of the Resource + # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that + # are allowed or denied. This is achieved by using the `under:` and + # optional `is:` prefixes. + # The `under:` prefix is used to denote resource subtree values. + # The `is:` prefix is used to denote specific values, and is required only + # if the value contains a ":". Values prefixed with "is:" are treated the + # same as values with no prefix. + # Ancestry subtrees must be in one of the following formats: + # + # - `projects/` (for example, `projects/tokyo-rain-123`) + # - `folders/` (for example, `folders/1234`) + # - `organizations/` (for example, `organizations/1234`) + # + # The `supports_under` field of the associated `Constraint` defines + # whether ancestry prefixes can be used. + # @!attribute [rw] allowed_values + # @return [::Array<::String>] + # List of values allowed at this resource. + # @!attribute [rw] denied_values + # @return [::Array<::String>] + # List of values denied at this resource. + class StringValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # The request sent to the [ListConstraints] + # [google.cloud.orgpolicy.v2.OrgPolicy.ListConstraints] method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Google Cloud resource that parents the constraint. Must be in + # one of the following forms: + # + # * `projects/{project_number}` + # * `projects/{project_id}` + # * `folders/{folder_id}` + # * `organizations/{organization_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + class ListConstraintsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response returned from the [ListConstraints] + # [google.cloud.orgpolicy.v2.OrgPolicy.ListConstraints] method. + # @!attribute [rw] constraints + # @return [::Array<::Google::Cloud::OrgPolicy::V2::Constraint>] + # The collection of constraints that are available on the targeted resource. + # @!attribute [rw] next_page_token + # @return [::String] + # Page token used to retrieve the next page. This is currently not used. + class ListConstraintsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [ListPolicies] + # [google.cloud.orgpolicy.v2.OrgPolicy.ListPolicies] method. + # @!attribute [rw] parent + # @return [::String] + # Required. The target Google Cloud resource that parents the set of + # constraints and policies that will be returned from this call. Must be in + # one of the following forms: + # + # * `projects/{project_number}` + # * `projects/{project_id}` + # * `folders/{folder_id}` + # * `organizations/{organization_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + class ListPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response returned from the [ListPolicies] + # [google.cloud.orgpolicy.v2.OrgPolicy.ListPolicies] method. It will be empty + # if no policies are set on the resource. + # @!attribute [rw] policies + # @return [::Array<::Google::Cloud::OrgPolicy::V2::Policy>] + # All policies that exist on the resource. It will be empty if no + # policies are set. + # @!attribute [rw] next_page_token + # @return [::String] + # Page token used to retrieve the next page. This is currently not used, but + # the server may at any point start supplying a valid token. + class ListPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [GetPolicy] + # [google.cloud.orgpolicy.v2.OrgPolicy.GetPolicy] method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the policy. See + # {::Google::Cloud::OrgPolicy::V2::Policy Policy} for naming requirements. + class GetPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [GetEffectivePolicy] + # [google.cloud.orgpolicy.v2.OrgPolicy.GetEffectivePolicy] method. + # @!attribute [rw] name + # @return [::String] + # Required. The effective policy to compute. See + # {::Google::Cloud::OrgPolicy::V2::Policy Policy} for naming requirements. + class GetEffectivePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [CreatePolicyRequest] + # [google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicy] method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Google Cloud resource that will parent the new policy. Must + # be in one of the following forms: + # + # * `projects/{project_number}` + # * `projects/{project_id}` + # * `folders/{folder_id}` + # * `organizations/{organization_id}` + # @!attribute [rw] policy + # @return [::Google::Cloud::OrgPolicy::V2::Policy] + # Required. Policy to create. + class CreatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [UpdatePolicyRequest] + # [google.cloud.orgpolicy.v2.OrgPolicy.UpdatePolicy] method. + # @!attribute [rw] policy + # @return [::Google::Cloud::OrgPolicy::V2::Policy] + # Required. Policy to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask used to specify the fields to be overwritten in the policy + # by the set. The fields specified in the update_mask are relative to the + # policy, not the full request. + class UpdatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [DeletePolicy] + # [google.cloud.orgpolicy.v2.OrgPolicy.DeletePolicy] method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the policy to delete. + # See the policy entry for naming rules. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of policy. If an etag is provided and does not + # match the current etag of the policy, deletion will be blocked and an + # ABORTED error will be returned. + class DeletePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [CreateCustomConstraintRequest] + # [google.cloud.orgpolicy.v2.OrgPolicy.CreateCustomConstraint] method. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the following form: + # + # * `organizations/{organization_id}` + # @!attribute [rw] custom_constraint + # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint] + # Required. Custom constraint to create. + class CreateCustomConstraintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [GetCustomConstraint] + # [google.cloud.orgpolicy.v2.OrgPolicy.GetCustomConstraint] method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the custom or managed constraint. See the custom + # constraint entry for naming requirements. + class GetCustomConstraintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [ListCustomConstraints] + # [google.cloud.orgpolicy.v2.OrgPolicy.ListCustomConstraints] method. + # @!attribute [rw] parent + # @return [::String] + # Required. The target Google Cloud resource that parents the set of custom + # constraints that will be returned from this call. Must be in one of the + # following forms: + # + # * `organizations/{organization_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + class ListCustomConstraintsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response returned from the [ListCustomConstraints] + # [google.cloud.orgpolicy.v2.OrgPolicy.ListCustomConstraints] method. It will + # be empty if no custom or managed constraints are set on the organization + # resource. + # @!attribute [rw] custom_constraints + # @return [::Array<::Google::Cloud::OrgPolicy::V2::CustomConstraint>] + # All custom and managed constraints that exist on the organization resource. + # It will be empty if no custom constraints are set. + # @!attribute [rw] next_page_token + # @return [::String] + # Page token used to retrieve the next page. This is currently not used, but + # the server may at any point start supplying a valid token. + class ListCustomConstraintsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [UpdateCustomConstraintRequest] + # [google.cloud.orgpolicy.v2.OrgPolicy.UpdateCustomConstraint] method. + # @!attribute [rw] custom_constraint + # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint] + # Required. `CustomConstraint` to update. + class UpdateCustomConstraintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request sent to the [DeleteCustomConstraint] + # [google.cloud.orgpolicy.v2.OrgPolicy.DeleteCustomConstraint] method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom constraint to delete. + # See the custom constraint entry for naming rules. + class DeleteCustomConstraintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/explanations.rb b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/explanations.rb index 06b45c44bc29..f9fd706a4704 100644 --- a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/explanations.rb +++ b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/explanations.rb @@ -64,7 +64,7 @@ class AccessTuple # permission for the resource. There might be another policy that overrides # this policy. To determine whether the principal actually has the # permission, use the `access` field in the - # [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + # [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse]. # @!attribute [rw] full_resource_name # @return [::String] # The full resource name that identifies the resource. For example, @@ -94,7 +94,7 @@ class AccessTuple # @!attribute [rw] relevance # @return [::Google::Cloud::PolicySimulator::V1::HeuristicRelevance] # The relevance of this policy to the overall determination in the - # [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + # [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse]. # # If the user who created the # {::Google::Cloud::PolicySimulator::V1::Replay Replay} does not have @@ -115,7 +115,7 @@ class ExplainedPolicy # permission for the resource. There might be another binding that overrides # this binding. To determine whether the principal actually has the # permission, use the `access` field in the - # [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + # [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse]. # @!attribute [rw] role # @return [::String] # The role that this binding grants. For example, diff --git a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb new file mode 100644 index 000000000000..38f594c3f6da --- /dev/null +++ b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb @@ -0,0 +1,380 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 PolicySimulator + module V1 + # OrgPolicyViolationsPreview is a resource providing a preview of the + # violations that will exist if an OrgPolicy change is made. + # + # The list of violations are modeled as child resources and retrieved via a + # [ListOrgPolicyViolations][] API call. There are potentially more + # [OrgPolicyViolations][] than could fit in an embedded field. Thus, the use of + # a child resource instead of a field. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has + # the following format: + # + # `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` + # + # Example: + # `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f` + # @!attribute [r] state + # @return [::Google::Cloud::PolicySimulator::V1::PreviewState] + # Output only. The state of the `OrgPolicyViolationsPreview`. + # @!attribute [rw] overlay + # @return [::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay] + # Required. The proposed changes we are previewing violations for. + # @!attribute [r] violations_count + # @return [::Integer] + # Output only. The number of [OrgPolicyViolations][] in this + # `OrgPolicyViolationsPreview`. This count may differ from + # `resource_summary.noncompliant_count` because each + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolation OrgPolicyViolation} is + # specific to a resource **and** constraint. If there are multiple + # constraints being evaluated (i.e. multiple policies in the overlay), a + # single resource may violate multiple constraints. + # @!attribute [r] resource_counts + # @return [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview::ResourceCounts] + # Output only. A summary of the state of all resources scanned for compliance + # with the changed OrgPolicy. + # @!attribute [r] custom_constraints + # @return [::Array<::String>] + # Output only. The names of the constraints against which all + # `OrgPolicyViolations` were evaluated. + # + # If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains + # the name of the configured custom constraint, applicable to the specified + # policies. Otherwise it contains the name of the constraint specified in + # `CustomConstraintOverlay`. + # + # Format: + # `organizations/{organization_id}/customConstraints/{custom_constraint_id}` + # + # Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this `OrgPolicyViolationsPreview` was created. + class OrgPolicyViolationsPreview + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A summary of the state of all resources scanned for compliance with the + # changed OrgPolicy. + # @!attribute [r] scanned + # @return [::Integer] + # Output only. Number of resources checked for compliance. + # + # Must equal: unenforced + noncompliant + compliant + error + # @!attribute [r] noncompliant + # @return [::Integer] + # Output only. Number of scanned resources with at least one violation. + # @!attribute [r] compliant + # @return [::Integer] + # Output only. Number of scanned resources with zero violations. + # @!attribute [r] unenforced + # @return [::Integer] + # Output only. Number of resources where the constraint was not enforced, + # i.e. the Policy set `enforced: false` for that resource. + # @!attribute [r] errors + # @return [::Integer] + # Output only. Number of resources that returned an error when scanned. + class ResourceCounts + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # OrgPolicyViolation is a resource representing a single resource violating a + # single OrgPolicy constraint. + # @!attribute [rw] name + # @return [::String] + # The name of the `OrgPolicyViolation`. Example: + # organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce` + # @!attribute [rw] resource + # @return [::Google::Cloud::PolicySimulator::V1::ResourceContext] + # The resource violating the constraint. + # @!attribute [rw] custom_constraint + # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint] + # The custom constraint being violated. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Any error encountered during the evaluation. + class OrgPolicyViolation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ResourceContext provides the context we know about a resource. + # It is similar in concept to google.cloud.asset.v1.Resource, but focuses + # on the information specifically used by Simulator. + # @!attribute [rw] resource + # @return [::String] + # The full name of the resource. Example: + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + # + # See [Resource + # names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # for more information. + # @!attribute [rw] asset_type + # @return [::String] + # The asset type of the resource as defined by CAIS. + # + # Example: `compute.googleapis.com/Firewall` + # + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. + # @!attribute [rw] ancestors + # @return [::Array<::String>] + # The ancestry path of the resource in Google Cloud [resource + # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + # represented as a list of relative resource names. An ancestry path starts + # with the closest ancestor in the hierarchy and ends at root. If the + # resource is a project, folder, or organization, the ancestry path starts + # from the resource itself. + # + # Example: `["projects/123456789", "folders/5432", "organizations/1234"]` + class ResourceContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The proposed changes to OrgPolicy. + # @!attribute [rw] policies + # @return [::Array<::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay::PolicyOverlay>] + # Optional. The OrgPolicy changes to preview violations for. + # + # Any existing OrgPolicies with the same name will be overridden + # in the simulation. That is, violations will be determined as if all + # policies in the overlay were created or updated. + # @!attribute [rw] custom_constraints + # @return [::Array<::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay::CustomConstraintOverlay>] + # Optional. The OrgPolicy CustomConstraint changes to preview violations for. + # + # Any existing CustomConstraints with the same name will be overridden + # in the simulation. That is, violations will be determined as if all + # custom constraints in the overlay were instantiated. + # + # Only a single custom_constraint is supported in the overlay at a time. + # For evaluating multiple constraints, multiple + # `GenerateOrgPolicyViolationsPreview` requests are made, where each request + # evaluates a single constraint. + class OrgPolicyOverlay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A change to an OrgPolicy. + # @!attribute [rw] policy_parent + # @return [::String] + # Optional. The parent of the policy we are attaching to. + # Example: "projects/123456" + # @!attribute [rw] policy + # @return [::Google::Cloud::OrgPolicy::V2::Policy] + # Optional. The new or updated OrgPolicy. + class PolicyOverlay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A change to an OrgPolicy custom constraint. + # @!attribute [rw] custom_constraint_parent + # @return [::String] + # Optional. Resource the constraint is attached to. + # Example: "organization/987654" + # @!attribute [rw] custom_constraint + # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint] + # Optional. The new or updated custom constraint. + class CustomConstraintOverlay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an + # OrgPolicyViolationsPreview generations operation. + # @!attribute [rw] request_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request started processing, i.e., when the state was set to + # RUNNING. + # @!attribute [r] state + # @return [::Google::Cloud::PolicySimulator::V1::PreviewState] + # Output only. The current state of the operation. + # @!attribute [rw] resources_found + # @return [::Integer] + # Total number of resources that need scanning. + # Should equal resource_scanned + resources_pending + # @!attribute [rw] resources_scanned + # @return [::Integer] + # Number of resources already scanned. + # @!attribute [rw] resources_pending + # @return [::Integer] + # Number of resources still to scan. + class CreateOrgPolicyViolationsPreviewOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListOrgPolicyViolationsPreviewsRequest is the request message for + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations_previews OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent the violations are scoped to. + # Format: + # `organizations/{organization}/locations/{location}` + # + # Example: `organizations/my-example-org/locations/global` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. The service may return + # fewer than this value. If unspecified, at most 5 items will be returned. + # The maximum value is 10; values above 10 will be coerced to 10. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters must match the call that provided the + # page token. + class ListOrgPolicyViolationsPreviewsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListOrgPolicyViolationsPreviewsResponse is the response message for + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations_previews OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews}. + # @!attribute [rw] org_policy_violations_previews + # @return [::Array<::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview>] + # The list of OrgPolicyViolationsPreview + # @!attribute [rw] next_page_token + # @return [::String] + # A token that you can use to retrieve the next page of results. + # If this field is omitted, there are no subsequent pages. + class ListOrgPolicyViolationsPreviewsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetOrgPolicyViolationsPreviewRequest is the request message for + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#get_org_policy_violations_preview OrgPolicyViolationsPreviewService.GetOrgPolicyViolationsPreview}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the OrgPolicyViolationsPreview to get. + class GetOrgPolicyViolationsPreviewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CreateOrgPolicyViolationsPreviewRequest is the request message for + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#create_org_policy_violations_preview OrgPolicyViolationsPreviewService.CreateOrgPolicyViolationsPreview}. + # @!attribute [rw] parent + # @return [::String] + # Required. The organization under which this + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # will be created. + # + # Example: `organizations/my-example-org/locations/global` + # @!attribute [rw] org_policy_violations_preview + # @return [::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview] + # Required. The + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # to generate. + # @!attribute [rw] org_policy_violations_preview_id + # @return [::String] + # Optional. An optional user-specified ID for the + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}. + # If not provided, a random ID will be generated. + class CreateOrgPolicyViolationsPreviewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListOrgPolicyViolationsRequest is the request message for + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations OrgPolicyViolationsPreviewService.ListOrgPolicyViolations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. + # Format: + # organizations/\\{organization}/locations/\\{location}/orgPolicyViolationsPreviews/\\{orgPolicyViolationsPreview} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. The service may return + # fewer than this value. If unspecified, at most 1000 items will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters must match the call that provided the + # page token. + class ListOrgPolicyViolationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListOrgPolicyViolationsResponse is the response message for + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations OrgPolicyViolationsPreviewService.ListOrgPolicyViolations} + # @!attribute [rw] org_policy_violations + # @return [::Array<::Google::Cloud::PolicySimulator::V1::OrgPolicyViolation>] + # The list of OrgPolicyViolations + # @!attribute [rw] next_page_token + # @return [::String] + # A token that you can use to retrieve the next page of results. + # If this field is omitted, there are no subsequent pages. + class ListOrgPolicyViolationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The current state of an + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview}. + module PreviewState + # The state is unspecified. + PREVIEW_STATE_UNSPECIFIED = 0 + + # The + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # has not been created yet. + PREVIEW_PENDING = 1 + + # The + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # is currently being created. + PREVIEW_RUNNING = 2 + + # The + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # creation finished successfully. + PREVIEW_SUCCEEDED = 3 + + # The + # {::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview OrgPolicyViolationsPreview} + # creation failed with an error. + PREVIEW_FAILED = 4 + end + end + end + end +end diff --git a/google-cloud-policy_simulator-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-policy_simulator-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/google-cloud-policy_simulator-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-policy_simulator-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-policy_simulator-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..b8b33e5c8cec --- /dev/null +++ b/google-cloud-policy_simulator-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_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] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/create_org_policy_violations_preview.rb b/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/create_org_policy_violations_preview.rb new file mode 100644 index 000000000000..f6dca8216f5e --- /dev/null +++ b/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/create_org_policy_violations_preview.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 policysimulator_v1_generated_OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_sync] +require "google/cloud/policy_simulator/v1" + +## +# Snippet for the create_org_policy_violations_preview call in the OrgPolicyViolationsPreviewService 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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#create_org_policy_violations_preview. +# +def create_org_policy_violations_preview + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest.new + + # Call the create_org_policy_violations_preview method. + result = client.create_org_policy_violations_preview request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END policysimulator_v1_generated_OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_sync] diff --git a/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/get_org_policy_violations_preview.rb b/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/get_org_policy_violations_preview.rb new file mode 100644 index 000000000000..9e605979d669 --- /dev/null +++ b/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/get_org_policy_violations_preview.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 policysimulator_v1_generated_OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_sync] +require "google/cloud/policy_simulator/v1" + +## +# Snippet for the get_org_policy_violations_preview call in the OrgPolicyViolationsPreviewService 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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#get_org_policy_violations_preview. +# +def get_org_policy_violations_preview + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest.new + + # Call the get_org_policy_violations_preview method. + result = client.get_org_policy_violations_preview request + + # The returned object is of type Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview. + p result +end +# [END policysimulator_v1_generated_OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_sync] diff --git a/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/list_org_policy_violations.rb b/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/list_org_policy_violations.rb new file mode 100644 index 000000000000..a991c1eef9fe --- /dev/null +++ b/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/list_org_policy_violations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 policysimulator_v1_generated_OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_sync] +require "google/cloud/policy_simulator/v1" + +## +# Snippet for the list_org_policy_violations call in the OrgPolicyViolationsPreviewService 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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations. +# +def list_org_policy_violations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest.new + + # Call the list_org_policy_violations method. + result = client.list_org_policy_violations 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::PolicySimulator::V1::OrgPolicyViolation. + p item + end +end +# [END policysimulator_v1_generated_OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_sync] diff --git a/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/list_org_policy_violations_previews.rb b/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/list_org_policy_violations_previews.rb new file mode 100644 index 000000000000..2113175b79a5 --- /dev/null +++ b/google-cloud-policy_simulator-v1/snippets/org_policy_violations_preview_service/list_org_policy_violations_previews.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 policysimulator_v1_generated_OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_sync] +require "google/cloud/policy_simulator/v1" + +## +# Snippet for the list_org_policy_violations_previews call in the OrgPolicyViolationsPreviewService 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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations_previews. +# +def list_org_policy_violations_previews + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest.new + + # Call the list_org_policy_violations_previews method. + result = client.list_org_policy_violations_previews 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::PolicySimulator::V1::OrgPolicyViolationsPreview. + p item + end +end +# [END policysimulator_v1_generated_OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_sync] diff --git a/google-cloud-policy_simulator-v1/snippets/snippet_metadata_google.cloud.policysimulator.v1.json b/google-cloud-policy_simulator-v1/snippets/snippet_metadata_google.cloud.policysimulator.v1.json index bff978a9826d..46df9e855b3d 100644 --- a/google-cloud-policy_simulator-v1/snippets/snippet_metadata_google.cloud.policysimulator.v1.json +++ b/google-cloud-policy_simulator-v1/snippets/snippet_metadata_google.cloud.policysimulator.v1.json @@ -11,6 +11,166 @@ ] }, "snippets": [ + { + "region_tag": "policysimulator_v1_generated_OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_sync", + "title": "Snippet for the list_org_policy_violations_previews call in the OrgPolicyViolationsPreviewService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations_previews.", + "file": "org_policy_violations_preview_service/list_org_policy_violations_previews.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_org_policy_violations_previews", + "full_name": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations_previews", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse", + "client": { + "short_name": "OrgPolicyViolationsPreviewService::Client", + "full_name": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client" + }, + "method": { + "short_name": "ListOrgPolicyViolationsPreviews", + "full_name": "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews", + "service": { + "short_name": "OrgPolicyViolationsPreviewService", + "full_name": "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "policysimulator_v1_generated_OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_sync", + "title": "Snippet for the get_org_policy_violations_preview call in the OrgPolicyViolationsPreviewService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#get_org_policy_violations_preview.", + "file": "org_policy_violations_preview_service/get_org_policy_violations_preview.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_org_policy_violations_preview", + "full_name": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#get_org_policy_violations_preview", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview", + "client": { + "short_name": "OrgPolicyViolationsPreviewService::Client", + "full_name": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client" + }, + "method": { + "short_name": "GetOrgPolicyViolationsPreview", + "full_name": "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService.GetOrgPolicyViolationsPreview", + "service": { + "short_name": "OrgPolicyViolationsPreviewService", + "full_name": "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "policysimulator_v1_generated_OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_sync", + "title": "Snippet for the create_org_policy_violations_preview call in the OrgPolicyViolationsPreviewService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#create_org_policy_violations_preview.", + "file": "org_policy_violations_preview_service/create_org_policy_violations_preview.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_org_policy_violations_preview", + "full_name": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#create_org_policy_violations_preview", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "OrgPolicyViolationsPreviewService::Client", + "full_name": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client" + }, + "method": { + "short_name": "CreateOrgPolicyViolationsPreview", + "full_name": "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService.CreateOrgPolicyViolationsPreview", + "service": { + "short_name": "OrgPolicyViolationsPreviewService", + "full_name": "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "policysimulator_v1_generated_OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_sync", + "title": "Snippet for the list_org_policy_violations call in the OrgPolicyViolationsPreviewService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations.", + "file": "org_policy_violations_preview_service/list_org_policy_violations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_org_policy_violations", + "full_name": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client#list_org_policy_violations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsResponse", + "client": { + "short_name": "OrgPolicyViolationsPreviewService::Client", + "full_name": "::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client" + }, + "method": { + "short_name": "ListOrgPolicyViolations", + "full_name": "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService.ListOrgPolicyViolations", + "service": { + "short_name": "OrgPolicyViolationsPreviewService", + "full_name": "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "policysimulator_v1_generated_Simulator_GetReplay_sync", "title": "Snippet for the get_replay call in the Simulator service", diff --git a/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_operations_test.rb b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_operations_test.rb new file mode 100644 index 000000000000..25c367e2f921 --- /dev/null +++ b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policysimulator/v1/orgpolicy_pb" +require "google/cloud/policysimulator/v1/orgpolicy_services_pb" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service" + +class ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations.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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations::Configuration, config + end +end diff --git a/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_paths_test.rb b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_paths_test.rb new file mode 100644 index 000000000000..0252c13b4738 --- /dev/null +++ b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_paths_test.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policy_simulator/v1/org_policy_violations_preview_service" + +class ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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_custom_constraint_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.custom_constraint_path organization: "value0", custom_constraint: "value1" + assert_equal "organizations/value0/customConstraints/value1", path + end + end + + def test_org_policy_violations_preview_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.org_policy_violations_preview_path organization: "value0", location: "value1", org_policy_violations_preview: "value2" + assert_equal "organizations/value0/locations/value1/orgPolicyViolationsPreviews/value2", path + end + end + + def test_organization_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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0", policy: "value1" + assert_equal "projects/value0/policies/value1", path + + path = client.policy_path folder: "value0", policy: "value1" + assert_equal "folders/value0/policies/value1", path + + path = client.policy_path organization: "value0", policy: "value1" + assert_equal "organizations/value0/policies/value1", path + end + end +end diff --git a/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_rest_test.rb b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_rest_test.rb new file mode 100644 index 000000000000..bbc3440d495a --- /dev/null +++ b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_rest_test.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policysimulator/v1/orgpolicy_pb" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest" + + +class ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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_list_org_policy_violations_previews + # Create test objects. + client_result = ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_org_policy_violations_previews_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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::ServiceStub.stub :transcode_list_org_policy_violations_previews_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_org_policy_violations_previews_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_org_policy_violations_previews({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_org_policy_violations_previews parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_org_policy_violations_previews ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest.new(parent: parent, 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_org_policy_violations_previews({ parent: parent, 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_org_policy_violations_previews(::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest.new(parent: parent, 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_org_policy_violations_previews_client_stub.call_count + end + end + end + + def test_get_org_policy_violations_preview + # Create test objects. + client_result = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_org_policy_violations_preview_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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::ServiceStub.stub :transcode_get_org_policy_violations_preview_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_org_policy_violations_preview_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_org_policy_violations_preview({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_org_policy_violations_preview name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_org_policy_violations_preview ::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_org_policy_violations_preview({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_org_policy_violations_preview(::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_org_policy_violations_preview_client_stub.call_count + end + end + end + + def test_create_org_policy_violations_preview + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + org_policy_violations_preview = {} + org_policy_violations_preview_id = "hello world" + + create_org_policy_violations_preview_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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::ServiceStub.stub :transcode_create_org_policy_violations_preview_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_org_policy_violations_preview_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_org_policy_violations_preview({ parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_org_policy_violations_preview parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_org_policy_violations_preview ::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest.new(parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_org_policy_violations_preview({ parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_org_policy_violations_preview(::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest.new(parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_org_policy_violations_preview_client_stub.call_count + end + end + end + + def test_list_org_policy_violations + # Create test objects. + client_result = ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_org_policy_violations_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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::ServiceStub.stub :transcode_list_org_policy_violations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_org_policy_violations_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_org_policy_violations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_org_policy_violations parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_org_policy_violations ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest.new(parent: parent, 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_org_policy_violations({ parent: parent, 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_org_policy_violations(::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest.new(parent: parent, 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_org_policy_violations_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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb new file mode 100644 index 000000000000..7816c8ca512f --- /dev/null +++ b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb @@ -0,0 +1,358 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/policysimulator/v1/orgpolicy_pb" +require "google/cloud/policysimulator/v1/orgpolicy_services_pb" +require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service" + +class ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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_list_org_policy_violations_previews + # Create GRPC objects. + grpc_response = ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse.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" + page_size = 42 + page_token = "hello world" + + list_org_policy_violations_previews_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_org_policy_violations_previews, name + assert_kind_of ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_org_policy_violations_previews_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_org_policy_violations_previews({ parent: parent, 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_org_policy_violations_previews parent: parent, 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_org_policy_violations_previews ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest.new(parent: parent, 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_org_policy_violations_previews({ parent: parent, 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_org_policy_violations_previews(::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest.new(parent: parent, 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_org_policy_violations_previews_client_stub.call_rpc_count + end + end + + def test_get_org_policy_violations_preview + # Create GRPC objects. + grpc_response = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview.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" + + get_org_policy_violations_preview_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_org_policy_violations_preview, name + assert_kind_of ::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_org_policy_violations_preview_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_org_policy_violations_preview({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_org_policy_violations_preview name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_org_policy_violations_preview ::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_org_policy_violations_preview({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_org_policy_violations_preview(::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest.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, get_org_policy_violations_preview_client_stub.call_rpc_count + end + end + + def test_create_org_policy_violations_preview + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + org_policy_violations_preview = {} + org_policy_violations_preview_id = "hello world" + + create_org_policy_violations_preview_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_org_policy_violations_preview, name + assert_kind_of ::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview), request["org_policy_violations_preview"] + assert_equal "hello world", request["org_policy_violations_preview_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_org_policy_violations_preview_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_org_policy_violations_preview({ parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_org_policy_violations_preview parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_org_policy_violations_preview ::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest.new(parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_org_policy_violations_preview({ parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_org_policy_violations_preview(::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest.new(parent: parent, org_policy_violations_preview: org_policy_violations_preview, org_policy_violations_preview_id: org_policy_violations_preview_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_org_policy_violations_preview_client_stub.call_rpc_count + end + end + + def test_list_org_policy_violations + # Create GRPC objects. + grpc_response = ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsResponse.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" + page_size = 42 + page_token = "hello world" + + list_org_policy_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_org_policy_violations, name + assert_kind_of ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_org_policy_violations_client_stub do + # Create client + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_org_policy_violations({ parent: parent, 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_org_policy_violations parent: parent, 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_org_policy_violations ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest.new(parent: parent, 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_org_policy_violations({ parent: parent, 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_org_policy_violations(::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest.new(parent: parent, 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_org_policy_violations_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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::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::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Operations, client.operations_client + end +end From 80e4f19c021c83e0c8faf42861160ab6be6459e1 Mon Sep 17 00:00:00 2001 From: Viacheslav Rostovtsev <58152857+viacheslav-rostovtsev@users.noreply.github.com> Date: Mon, 21 Jul 2025 14:08:51 -0700 Subject: [PATCH 284/457] feat: add explain query features to aggregate query in Cloud Datastore (#30704) --- .../datastore/aggregate_explain_test.rb | 98 +++++++++++++++++++ .../datastore/aggregate_query_test.rb | 39 ++++++-- .../lib/google/cloud/datastore/dataset.rb | 27 ++++- .../dataset/aggregate_query_results.rb | 54 +++++++--- .../cloud/datastore/read_only_transaction.rb | 26 ++++- .../lib/google/cloud/datastore/service.rb | 13 ++- .../lib/google/cloud/datastore/transaction.rb | 53 ++++++++++ .../google/cloud/datastore/dataset_test.rb | 51 ++++++++++ .../datastore/read_only_transaction_test.rb | 22 ++++- .../cloud/datastore/transaction_test.rb | 94 ++++++++++++++++++ 10 files changed, 443 insertions(+), 34 deletions(-) create mode 100644 google-cloud-datastore/acceptance/datastore/aggregate_explain_test.rb diff --git a/google-cloud-datastore/acceptance/datastore/aggregate_explain_test.rb b/google-cloud-datastore/acceptance/datastore/aggregate_explain_test.rb new file mode 100644 index 000000000000..05bace19d6ea --- /dev/null +++ b/google-cloud-datastore/acceptance/datastore/aggregate_explain_test.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "datastore_helper" + +describe "Datastore Aggregate Query Explain", :datastore do + let(:prefix) { "gcloud-explain-#{SecureRandom.hex 4}" } + let(:kind) { "ExplainTask" } + let(:tasks) do + 3.times.map do |i| + dataset.entity "#{prefix}-#{kind}", "#{prefix}-task-#{i}" do |t| + t["description"] = "explain task #{i}" + t["done"] = false + end + end + end + + before do + dataset.save(*tasks) + # Ensure the entities are created + try_with_backoff "getting tasks" do + entities = dataset.find_all tasks.map(&:key) + raise "not all tasks created" if entities.count != tasks.count + end + end + + after do + dataset.delete(*tasks) + end + + it "returns explain_metrics when analyze is true" do + query = dataset.query "#{prefix}-#{kind}" + aggregate_query = query.aggregate_query.add_count aggregate_alias: "total" + results = dataset.run_aggregation aggregate_query, explain_options: { analyze: true } + + _(results.get("total")).must_equal tasks.count + + _(results.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(results.explain_metrics.plan_summary).wont_be_nil + _(results.explain_metrics.execution_stats).wont_be_nil + _(results.explain_metrics.execution_stats.results_returned).must_equal 1 + end + + it "does not return execution stats when analyze is false" do + query = dataset.query "#{prefix}-#{kind}" + aggregate_query = query.aggregate_query.add_count aggregate_alias: "total" + results = dataset.run_aggregation aggregate_query, explain_options: { analyze: false } + + _(results.get("total")).must_be :nil? + + _(results.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(results.explain_metrics.plan_summary).wont_be_nil + _(results.explain_metrics.execution_stats).must_be :nil? + end + + it "runs aggregate query via dataset transaction" do + dataset.transaction do |tx| + query = tx.query "#{prefix}-#{kind}" + aggregate_query = query.aggregate_query.add_count aggregate_alias: "total" + results = tx.run_aggregation aggregate_query, explain_options: { analyze: true } + + _(results.get("total")).must_equal tasks.count + + _(results.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(results.explain_metrics.plan_summary).wont_be_nil + _(results.explain_metrics.execution_stats).wont_be_nil + _(results.explain_metrics.execution_stats.results_returned).must_equal 1 + end + end + + it "runs aggregate query via dataset read-only transaction" do + dataset.read_only_transaction do |tx| + query = tx.query "#{prefix}-#{kind}" + aggregate_query = query.aggregate_query.add_count aggregate_alias: "total" + results = tx.run_aggregation aggregate_query, explain_options: { analyze: true } + + _(results.get("total")).must_equal tasks.count + + _(results.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(results.explain_metrics.plan_summary).wont_be_nil + _(results.explain_metrics.execution_stats).wont_be_nil + _(results.explain_metrics.execution_stats.results_returned).must_equal 1 + end + end +end diff --git a/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb b/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb index 1d26249092c8..a4518f302b43 100644 --- a/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb +++ b/google-cloud-datastore/acceptance/datastore/aggregate_query_test.rb @@ -134,11 +134,12 @@ end it "returns count on filter with and without read time" do + sleep(0.5) # wait for `before` tx that saves all characters to settle read_time = Time.now - sleep(0.5) + sleep(0.5) # wait so that "arya" tx happens definitely after `read_time` (for read time aggregation query) arya["alive"] = false dataset.transaction { |tx| tx.save arya } - sleep(0.5) + sleep(0.5) # wait for the "arya" tx to settle (so that something is changed since `read_time`) query = Google::Cloud::Datastore.new .query("Character") @@ -354,10 +355,19 @@ end it "returns sum on filter with and without read time" do + sleep(0.5) # wait for `before` tx that saves all characters to settle read_time = Time.now - sleep(0.5) - dataset.transaction { |tx| tx.delete george } - sleep(0.5) + sleep(0.5) # wait so the "Paul" tx happens definitely after `read_time` (for read time aggregation query) + paul = Google::Cloud::Datastore::Entity.new.tap do |e| + e["name"] = "Paul" + e["family"] = "Martin" + e["appearances"] = 3 + e["alive"] = true + end + paul.key = Google::Cloud::Datastore::Key.new "Character", "Paul" + paul.key.parent = book + dataset.transaction { |tx| tx.save paul } + sleep(0.5) # wait for the "Paul" tx to settle (so that something is changed since `read_time`) query = Google::Cloud::Datastore.new .query("Character") @@ -371,7 +381,7 @@ _(res.get).must_equal 1 res = dataset.run_aggregation aggregate_query _(res.get).must_be_kind_of Integer - _(res.get).must_equal 0 + _(res.get).must_equal 4 end it "returns sum on limit" do @@ -555,10 +565,19 @@ end it "returns average on filter with and without read time" do + sleep(0.5) # wait for `before` tx that saves all characters to settle read_time = Time.now - sleep(0.5) - dataset.transaction { |tx| tx.delete george } - sleep(0.5) + sleep(0.5) # wait so the "Paul" tx happens definitely after `read_time` (for read time aggregation query) + paul = Google::Cloud::Datastore::Entity.new.tap do |e| + e["name"] = "Paul" + e["family"] = "Martin" + e["appearances"] = 3 + e["alive"] = true + end + paul.key = Google::Cloud::Datastore::Key.new "Character", "Paul" + paul.key.parent = book + dataset.transaction { |tx| tx.save paul } + sleep(0.5) # wait for the "Paul" tx to settle (so that something is changed since `read_time`) query = Google::Cloud::Datastore.new .query("Character") @@ -572,7 +591,7 @@ _(res.get).must_equal 1.0 res = dataset.run_aggregation aggregate_query _(res.get).must_be_kind_of Float - _(res.get).must_equal 0.0 + _(res.get).must_equal 2.0 end it "returns average on limit" do diff --git a/google-cloud-datastore/lib/google/cloud/datastore/dataset.rb b/google-cloud-datastore/lib/google/cloud/datastore/dataset.rb index 2a7807c4f6e7..25569b695e1f 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/dataset.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/dataset.rb @@ -549,6 +549,10 @@ def run query, namespace: nil, consistency: nil, read_time: nil, explain_options # [Eventual Consistency in Google Cloud # Datastore](https://cloud.google.com/datastore/docs/articles/balancing-strong-and-eventual-consistency-with-google-cloud-datastore/#h.tf76fya5nqk8) # for more information. + # @param [Hash, Google::Cloud::Datastore::V1::ExplainOptions] explain_options The options for query explanation. + # Provide this argument to enable explain metrics. If this argument is left unset, + # the results will not include explain metrics. + # See {Google::Cloud::Datastore::V1::ExplainOptions} for details. Optional. # # @return [Google::Cloud::Datastore::Dataset::AggregateQueryResults] # @@ -607,15 +611,32 @@ def run query, namespace: nil, consistency: nil, read_time: nil, explain_options # done: false # res = datastore.run_aggregation gql_query, namespace: "example-ns" # - def run_aggregation aggregate_query, namespace: nil, consistency: nil, read_time: nil + # @example Run the aggregate query with explain options to get query plan and execution statistics. + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # query = datastore.query("Task") + # aggregate_query = query.aggregate_query.add_count aggregate_alias: "total" + # results = datastore.run_aggregation aggregate_query, explain_options: { analyze: true } + # + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Read operations: #{stats.read_operations}" + # end + # + def run_aggregation aggregate_query, namespace: nil, consistency: nil, read_time: nil, explain_options: nil ensure_service! unless aggregate_query.is_a?(AggregateQuery) || aggregate_query.is_a?(GqlQuery) raise ArgumentError, "Cannot run a #{aggregate_query.class} object." end check_consistency! consistency aggregate_query_res = service.run_aggregation_query aggregate_query.to_grpc, namespace, - consistency: consistency, read_time: read_time - AggregateQueryResults.from_grpc aggregate_query_res + consistency: consistency, + read_time: read_time, + explain_options: explain_options + + AggregateQueryResults.from_grpc aggregate_query_res, explain_options end ## diff --git a/google-cloud-datastore/lib/google/cloud/datastore/dataset/aggregate_query_results.rb b/google-cloud-datastore/lib/google/cloud/datastore/dataset/aggregate_query_results.rb index 3d7f29ca746f..51a7a9ed4852 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/dataset/aggregate_query_results.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/dataset/aggregate_query_results.rb @@ -57,9 +57,24 @@ class AggregateQueryResults # @return [Google::Protobuf::Timestamp] attr_reader :read_time + # Query explain metrics. This is only present when the `explain_options` + # are provided to {Google::Cloud::Datastore::Dataset#run_aggregation}. + # It is sent only once with the response. + # + # @return [Google::Cloud::Datastore::V1::ExplainMetrics, nil] + attr_reader :explain_metrics + + ## + # The options for query explanation. + # + # This is a copy of the input parameter supplied to the {Dataset#run_aggregation} function. + # + # @return [Google::Cloud::Datastore::V1::ExplainOptions, nil] + attr_reader :explain_options + ## # @private - attr_writer :aggregate_fields, :read_time + attr_writer :aggregate_fields, :read_time, :explain_metrics, :explain_options ## # Retrieves the aggregate data. @@ -113,22 +128,33 @@ def get aggregate_alias = nil ## # @private New AggregateQueryResults from a # Google::Cloud::Datastore::V1::RunAggregationQueryResponse object. - def self.from_grpc aggregate_query_response - aggregate_fields = aggregate_query_response - .batch - .aggregation_results[0] - .aggregate_properties - .map do |aggregate_alias, value| - if value.has_integer_value? - [aggregate_alias, value.integer_value] - else - [aggregate_alias, value.double_value] - end - end + def self.from_grpc aggregate_query_response, explain_options + # If the aggregate query is run with explain_options and analyze = false, + # the RunAggregationQueryResponse will not have batch results + # only explain metrics. + aggregate_fields = {} + read_time = nil + + if aggregate_query_response.batch + aggregate_fields = aggregate_query_response + .batch + .aggregation_results[0] + .aggregate_properties + .map do |aggregate_alias, value| + if value.has_integer_value? + [aggregate_alias, value.integer_value] + else + [aggregate_alias, value.double_value] + end + end + read_time = aggregate_query_response.batch.read_time + end new.tap do |aq_result| + aq_result.explain_options = explain_options + aq_result.explain_metrics = aggregate_query_response.explain_metrics aq_result.aggregate_fields = aggregate_fields.to_h - aq_result.read_time = aggregate_query_response.batch.read_time + aq_result.read_time = read_time end end end diff --git a/google-cloud-datastore/lib/google/cloud/datastore/read_only_transaction.rb b/google-cloud-datastore/lib/google/cloud/datastore/read_only_transaction.rb index 8693eebd6485..9d061ff4a86c 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/read_only_transaction.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/read_only_transaction.rb @@ -236,14 +236,34 @@ def run query, namespace: nil, explain_options: nil # .add_count # res = tx.run_aggregation aggregate_query # end + # @example Run the aggregate query with explain options: + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # datastore.read_only_transaction do |tx| + # query = tx.query("Task") + # aggregate_query = query.aggregate_query.add_count aggregate_alias: "total" + # results = tx.run_aggregation aggregate_query, explain_options: { analyze: true } + # + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Read operations: #{stats.read_operations}" + # end + # end # - def run_aggregation aggregate_query, namespace: nil + def run_aggregation aggregate_query, namespace: nil, explain_options: nil ensure_service! unless aggregate_query.is_a?(AggregateQuery) || aggregate_query.is_a?(GqlQuery) raise ArgumentError, "Cannot run a #{aggregate_query.class} object." end - aggregate_query_results = service.run_aggregation_query aggregate_query.to_grpc, namespace, transaction: @id - Dataset::AggregateQueryResults.from_grpc aggregate_query_results + + aggregate_query_results = service.run_aggregation_query aggregate_query.to_grpc, + namespace, + transaction: @id, + explain_options: explain_options + + Dataset::AggregateQueryResults.from_grpc aggregate_query_results, explain_options end ## diff --git a/google-cloud-datastore/lib/google/cloud/datastore/service.rb b/google-cloud-datastore/lib/google/cloud/datastore/service.rb index 207bed8be868..c91037d01358 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/service.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/service.rb @@ -98,7 +98,15 @@ def run_query query, namespace = nil, consistency: nil, transaction: nil, read_t end ## Query for aggregates - def run_aggregation_query query, namespace = nil, consistency: nil, transaction: nil, read_time: nil + def run_aggregation_query query, namespace = nil, consistency: nil, transaction: nil, read_time: nil, + explain_options: nil + if explain_options + explain_options = ::Gapic::Protobuf.coerce( + explain_options, + to: ::Google::Cloud::Datastore::V1::ExplainOptions + ) + end + gql_query = nil if query.is_a? Google::Cloud::Datastore::V1::GqlQuery gql_query = query @@ -115,7 +123,8 @@ def run_aggregation_query query, namespace = nil, consistency: nil, transaction: partition_id: partition_id, read_options: read_options, aggregation_query: query, - gql_query: gql_query + gql_query: gql_query, + explain_options: explain_options end ## diff --git a/google-cloud-datastore/lib/google/cloud/datastore/transaction.rb b/google-cloud-datastore/lib/google/cloud/datastore/transaction.rb index 4bdbf9fb8aaa..0aa8638bf5c3 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/transaction.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/transaction.rb @@ -310,6 +310,59 @@ def run query, namespace: nil, explain_options: nil end alias run_query run + ## + # Retrieve aggregate query results specified by an AggregateQuery. The query is run within the + # transaction. + # + # @param [AggregateQuery, GqlQuery] aggregate_query The Query object + # with the search criteria. + # @param [String] namespace The namespace the query is to run within. + # @param [Hash, Google::Cloud::Datastore::V1::ExplainOptions] explain_options + # The options for query explanation. See {Google::Cloud::Datastore::V1::ExplainOptions} + # for details. Optional. + # + # @return [Google::Cloud::Datastore::Dataset::AggregateQueryResults] + # + # @example + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # datastore.transaction do |tx| + # query = tx.query("Task") + # .where("done", "=", false) + # aggregate_query = query.aggregate_query + # .add_count + # res = tx.run_aggregation aggregate_query + # end + # + # @example Run the aggregate query with explain options: + # require "google/cloud/datastore" + # + # datastore = Google::Cloud::Datastore.new + # + # datastore.transaction do |tx| + # query = tx.query("Task") + # aggregate_query = query.aggregate_query.add_count aggregate_alias: "total" + # results = tx.run_aggregation aggregate_query, explain_options: { analyze: true } + # + # if results.explain_metrics + # stats = results.explain_metrics.execution_stats + # puts "Read operations: #{stats.read_operations}" + # end + # end + # + def run_aggregation aggregate_query, namespace: nil, explain_options: nil + ensure_service! + unless aggregate_query.is_a?(AggregateQuery) || aggregate_query.is_a?(GqlQuery) + raise ArgumentError, "Cannot run a #{aggregate_query.class} object." + end + aggregate_query_results = service.run_aggregation_query aggregate_query.to_grpc, namespace, + transaction: @id, + explain_options: explain_options + Dataset::AggregateQueryResults.from_grpc aggregate_query_results, explain_options + end + ## # Begins a transaction. # This method is run when a new Transaction is created. diff --git a/google-cloud-datastore/test/google/cloud/datastore/dataset_test.rb b/google-cloud-datastore/test/google/cloud/datastore/dataset_test.rb index b9e52243d84d..4b65492b9dcc 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/dataset_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/dataset_test.rb @@ -1078,6 +1078,57 @@ _(entities.explain_options).must_equal explain_options end + let(:run_aggregation_query_res) do + Google::Cloud::Datastore::V1::RunAggregationQueryResponse.new( + batch: Google::Cloud::Datastore::V1::AggregationResultBatch.new( + aggregation_results: [ + Google::Cloud::Datastore::V1::AggregationResult.new( + aggregate_properties: { + "count" => Google::Cloud::Datastore::V1::Value.new(integer_value: 3) + } + ) + ] + ) + ) + end + let(:run_aggregation_query_res_with_explain) do + run_aggregation_query_res.dup.tap do |response| + response.explain_metrics = Google::Cloud::Datastore::V1::ExplainMetrics.new + end + end + let(:aggregate_query) { dataset.query("User").aggregate_query.add_count } + + it "run_aggregation will fulfill an aggregate query" do + dataset.service.mocked_service.expect :run_aggregation_query, run_aggregation_query_res, + project_id: project, + partition_id: nil, + read_options: nil, + aggregation_query: aggregate_query.to_grpc, + gql_query: nil, + explain_options: nil + + results = dataset.run_aggregation aggregate_query + _(results.get("count")).must_equal 3 + end + + it "run_aggregation will fulfill an aggregate query with explain_options" do + explain_options = { analyze: true } + explain_options_grpc = Google::Cloud::Datastore::V1::ExplainOptions.new analyze: true + + dataset.service.mocked_service.expect :run_aggregation_query, run_aggregation_query_res_with_explain, + project_id: project, + partition_id: nil, + read_options: nil, + aggregation_query: aggregate_query.to_grpc, + gql_query: nil, + explain_options: explain_options_grpc + + results = dataset.run_aggregation aggregate_query, explain_options: explain_options + _(results.get("count")).must_equal 3 + _(results.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(results.explain_options).must_equal explain_options + end + it "run will raise when given an unknown argument" do expect do entities = dataset.run 123 diff --git a/google-cloud-datastore/test/google/cloud/datastore/read_only_transaction_test.rb b/google-cloud-datastore/test/google/cloud/datastore/read_only_transaction_test.rb index 4c5fea8d27f3..63184acef59c 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/read_only_transaction_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/read_only_transaction_test.rb @@ -83,6 +83,11 @@ ) ) end + let(:run_aggregation_query_res_with_explain) do + run_aggregation_query_res.dup.tap do |response| + response.explain_metrics = Google::Cloud::Datastore::V1::ExplainMetrics.new + end + end let(:aggregate_query_grpc) do aggregations = [ Google::Cloud::Datastore::V1::AggregationQuery::Aggregation.new( @@ -204,7 +209,7 @@ end it "run_aggregate will fulfill an aggregate query" do - transaction.service.mocked_service.expect :run_aggregation_query, run_aggregation_query_res, project_id: project, partition_id: nil, read_options: read_options, aggregation_query: aggregate_query_grpc, gql_query: nil + transaction.service.mocked_service.expect :run_aggregation_query, run_aggregation_query_res, project_id: project, partition_id: nil, read_options: read_options, aggregation_query: aggregate_query_grpc, gql_query: nil, explain_options: nil query = Google::Cloud::Datastore::Query.new.kind("User") aq = query.aggregate_query .add_count @@ -212,8 +217,21 @@ _(res.get('count')).must_equal 2 end + it "run_aggregate will fulfill an aggregate query with explain_options" do + explain_options = { analyze: true } + explain_options_grpc = Google::Cloud::Datastore::V1::ExplainOptions.new analyze: true + transaction.service.mocked_service.expect :run_aggregation_query, run_aggregation_query_res_with_explain, project_id: project, partition_id: nil, read_options: read_options, aggregation_query: aggregate_query_grpc, gql_query: nil, explain_options: explain_options_grpc + query = Google::Cloud::Datastore::Query.new.kind("User") + aq = query.aggregate_query + .add_count + res = transaction.run_aggregation aq, explain_options: explain_options + _(res.get('count')).must_equal 2 + _(res.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(res.explain_options).must_equal explain_options + end + it "run_aggregate will fulfill an aggregate gql query" do - transaction.service.mocked_service.expect :run_aggregation_query, aggregate_gql_query_res, project_id: project, partition_id: nil, read_options: read_options, aggregation_query: nil, gql_query: gql_aggregate_query_grpc + transaction.service.mocked_service.expect :run_aggregation_query, aggregate_gql_query_res, project_id: project, partition_id: nil, read_options: read_options, aggregation_query: nil, gql_query: gql_aggregate_query_grpc, explain_options: nil gql = dataset.gql "SELECT COUNT(*) as total FROM Task" res = transaction.run_aggregation gql _(res.get('total')).must_equal 2 diff --git a/google-cloud-datastore/test/google/cloud/datastore/transaction_test.rb b/google-cloud-datastore/test/google/cloud/datastore/transaction_test.rb index b09f3224baec..08b5e81fcabd 100644 --- a/google-cloud-datastore/test/google/cloud/datastore/transaction_test.rb +++ b/google-cloud-datastore/test/google/cloud/datastore/transaction_test.rb @@ -60,6 +60,71 @@ Google::Cloud::Datastore::V1::BeginTransactionResponse.new(transaction: tx_id) end let(:tx_id) { "giterdone".encode("ASCII-8BIT") } + let(:query_grpc) do + Google::Cloud::Datastore::V1::Query.new( + projection: [], + kind: [Google::Cloud::Datastore::V1::KindExpression.new(name: "User")], + order: [], + distinct_on: [], + start_cursor: "", + end_cursor: "", + offset: 0 + ) + end + let(:run_aggregation_query_res) do + aggregation_results = [ + Google::Cloud::Datastore::V1::AggregationResult.new( + aggregate_properties: { + 'count' => Google::Cloud::Datastore::V1::Value.new(meaning: 0, exclude_from_indexes: false, integer_value: 2) + } + ) + ] + Google::Cloud::Datastore::V1::RunAggregationQueryResponse.new( + batch: Google::Cloud::Datastore::V1::AggregationResultBatch.new( + read_time: Google::Protobuf::Timestamp.new(seconds: 1673852227, nanos: 370563000), + more_results: :NO_MORE_RESULTS, + aggregation_results: aggregation_results + ) + ) + end + let(:run_aggregation_query_res_with_explain) do + run_aggregation_query_res.dup.tap do |response| + response.explain_metrics = Google::Cloud::Datastore::V1::ExplainMetrics.new + end + end + let(:aggregate_query_grpc) do + aggregations = [ + Google::Cloud::Datastore::V1::AggregationQuery::Aggregation.new( + alias: 'count', + count: Google::Cloud::Datastore::V1::AggregationQuery::Aggregation::Count.new + ) + ] + Google::Cloud::Datastore::V1::AggregationQuery.new(nested_query: query_grpc, aggregations: aggregations) + end + let(:aggregate_gql_query_res) do + aggregation_results = [ + Google::Cloud::Datastore::V1::AggregationResult.new(aggregate_properties: { 'total' => Google::Cloud::Datastore::V1::Value.new(meaning: 0, exclude_from_indexes: false, integer_value: 2) }) + ] + Google::Cloud::Datastore::V1::RunAggregationQueryResponse.new( + batch: Google::Cloud::Datastore::V1::AggregationResultBatch.new( + read_time: Google::Protobuf::Timestamp.new(seconds: 1673852227, nanos: 370563000), + more_results: :NO_MORE_RESULTS, + aggregation_results: aggregation_results + ), + query: Google::Cloud::Datastore::V1::AggregationQuery.new( + nested_query: query_grpc, + aggregations: [ + Google::Cloud::Datastore::V1::AggregationQuery::Aggregation.new( + alias: "total", + count: Google::Cloud::Datastore::V1::AggregationQuery::Aggregation::Count.new + ) + ] + ) + ) + end + let(:read_options) { Google::Cloud::Datastore::V1::ReadOptions.new(transaction: tx_id) } + let(:gql_query_grpc) { Google::Cloud::Datastore::V1::GqlQuery.new(query_string: "SELECT * FROM Task") } + let(:gql_aggregate_query_grpc) { Google::Cloud::Datastore::V1::GqlQuery.new(query_string: "SELECT COUNT(*) as total FROM Task") } after do transaction.service.mocked_service.verify @@ -381,6 +446,35 @@ refute entities.no_more? end + it "run_aggregation will fulfill an aggregate query" do + transaction.service.mocked_service.expect :run_aggregation_query, run_aggregation_query_res, project_id: project, partition_id: nil, read_options: read_options, aggregation_query: aggregate_query_grpc, gql_query: nil, explain_options: nil + query = Google::Cloud::Datastore::Query.new.kind("User") + aq = query.aggregate_query + .add_count + res = transaction.run_aggregation aq + _(res.get('count')).must_equal 2 + end + + it "run_aggregation will fulfill an aggregate query with explain_options" do + explain_options = { analyze: true } + explain_options_grpc = Google::Cloud::Datastore::V1::ExplainOptions.new analyze: true + transaction.service.mocked_service.expect :run_aggregation_query, run_aggregation_query_res_with_explain, project_id: project, partition_id: nil, read_options: read_options, aggregation_query: aggregate_query_grpc, gql_query: nil, explain_options: explain_options_grpc + query = Google::Cloud::Datastore::Query.new.kind("User") + aq = query.aggregate_query + .add_count + res = transaction.run_aggregation aq, explain_options: explain_options + _(res.get('count')).must_equal 2 + _(res.explain_metrics).must_be_kind_of Google::Cloud::Datastore::V1::ExplainMetrics + _(res.explain_options).must_equal explain_options + end + + it "run_aggregation will fulfill an aggregate gql query" do + transaction.service.mocked_service.expect :run_aggregation_query, aggregate_gql_query_res, project_id: project, partition_id: nil, read_options: read_options, aggregation_query: nil, gql_query: gql_aggregate_query_grpc, explain_options: nil + gql = dataset.gql "SELECT COUNT(*) as total FROM Task" + res = transaction.run_aggregation gql + _(res.get('total')).must_equal 2 + end + it "commit persists entities with complete keys" do commit_res = Google::Cloud::Datastore::V1::CommitResponse.new( mutation_results: [Google::Cloud::Datastore::V1::MutationResult.new] From 73361bb952eccdb0ca8d2750645510d8c5a676df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Mon, 21 Jul 2025 17:32:46 -0700 Subject: [PATCH 285/457] chore: migrate samples to google-cloud-pubsub v3 (#30618) --- .../samples/acceptance/quickstart_test.rb | 7 +- .../samples/acceptance/schemas_test.rb | 149 ++++++++++++++---- .../samples/acceptance/subscriptions_test.rb | 80 ++++++---- .../samples/acceptance/topics_test.rb | 141 ++++++++++------- .../samples/pubsub_commit_proto_schema.rb | 12 +- .../samples/pubsub_create_avro_schema.rb | 13 +- .../pubsub_create_bigquery_subscription.rb | 36 ++--- .../samples/pubsub_create_proto_schema.rb | 2 +- .../pubsub_create_pull_subscription.rb | 8 +- .../pubsub_create_push_subscription.rb | 12 +- ...subscription_with_exactly_once_delivery.rb | 39 ++--- .../pubsub_create_subscription_with_filter.rb | 38 ++--- .../samples/pubsub_create_topic.rb | 6 +- .../pubsub_create_topic_with_schema.rb | 12 +- .../pubsub_dead_letter_create_subscription.rb | 18 ++- .../pubsub_dead_letter_delivery_attempt.rb | 7 +- .../samples/pubsub_dead_letter_remove.rb | 15 +- .../pubsub_dead_letter_update_subscription.rb | 17 +- .../samples/pubsub_delete_schema.rb | 7 +- .../samples/pubsub_delete_subscription.rb | 7 +- .../samples/pubsub_delete_topic.rb | 7 +- .../samples/pubsub_detach_subscription.rb | 13 +- .../pubsub_enable_subscription_ordering.rb | 11 +- .../samples/pubsub_get_schema.rb | 6 +- .../samples/pubsub_get_subscription_policy.rb | 9 +- .../samples/pubsub_get_topic_policy.rb | 9 +- .../samples/pubsub_list_schema_revisions.rb | 8 +- .../samples/pubsub_list_schemas.rb | 8 +- .../samples/pubsub_list_subscriptions.rb | 6 +- .../pubsub_list_topic_subscriptions.rb | 13 +- .../samples/pubsub_list_topics.rb | 6 +- google-cloud-pubsub/samples/pubsub_publish.rb | 9 +- .../samples/pubsub_publish_avro_records.rb | 19 ++- .../pubsub_publish_custom_attributes.rb | 13 +- .../samples/pubsub_publish_proto_messages.rb | 19 ++- .../pubsub_publish_with_error_handler.rb | 2 +- .../pubsub_publish_with_ordering_keys.rb | 13 +- .../pubsub_publisher_batch_settings.rb | 8 +- .../pubsub_publisher_concurrency_control.rb | 8 +- .../samples/pubsub_publisher_flow_control.rb | 8 +- .../pubsub_publisher_with_compression.rb | 20 ++- .../samples/pubsub_quickstart_publisher.rb | 7 +- ...ubsub_resume_publish_with_ordering_keys.rb | 14 +- .../samples/pubsub_set_subscription_policy.rb | 16 +- .../samples/pubsub_set_topic_policy.rb | 14 +- .../samples/pubsub_subscribe_avro_records.rb | 10 +- .../pubsub_subscribe_proto_messages.rb | 11 +- .../samples/pubsub_subscriber_async_pull.rb | 11 +- ...subscriber_async_pull_custom_attributes.rb | 11 +- .../pubsub_subscriber_concurrency_control.rb | 11 +- .../pubsub_subscriber_error_listener.rb | 2 +- ...pubsub_subscriber_exactly_once_delivery.rb | 52 +++--- .../pubsub_subscriber_flow_settings.rb | 11 +- .../samples/pubsub_subscriber_sync_pull.rb | 7 +- .../pubsub_subscriber_sync_pull_with_lease.rb | 7 +- .../pubsub_test_subscription_permissions.rb | 15 +- .../samples/pubsub_test_topic_permissions.rb | 15 +- .../pubsub_update_push_configuration.rb | 16 +- google-cloud-pubsub/samples/quickstart.rb | 5 +- 59 files changed, 641 insertions(+), 435 deletions(-) diff --git a/google-cloud-pubsub/samples/acceptance/quickstart_test.rb b/google-cloud-pubsub/samples/acceptance/quickstart_test.rb index f36075a15ca5..2721fb1b7553 100644 --- a/google-cloud-pubsub/samples/acceptance/quickstart_test.rb +++ b/google-cloud-pubsub/samples/acceptance/quickstart_test.rb @@ -16,17 +16,18 @@ require_relative "../quickstart.rb" describe "quickstart" do - let(:pubsub) { Google::Cloud::Pubsub.new } + let(:pubsub) { Google::Cloud::PubSub.new } let(:topic_id) { random_topic_id } + let(:topic_admin) { pubsub.topic_admin } it "supports quickstart_create_topic" do assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do quickstart topic_id: topic_id end - topic = pubsub.topic topic_id + topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) assert topic # cleanup - topic.delete + topic_admin.delete_topic topic: topic.name end end diff --git a/google-cloud-pubsub/samples/acceptance/schemas_test.rb b/google-cloud-pubsub/samples/acceptance/schemas_test.rb index c44eb1387bbb..8548639762eb 100644 --- a/google-cloud-pubsub/samples/acceptance/schemas_test.rb +++ b/google-cloud-pubsub/samples/acceptance/schemas_test.rb @@ -28,16 +28,19 @@ describe "schemas" do - let(:pubsub) { Google::Cloud::Pubsub.new } + let(:pubsub) { Google::Cloud::PubSub.new } let(:schema_id) { random_schema_id } let(:topic_id) { random_topic_id } let(:subscription_id) { random_subscription_id } let(:avsc_file) { File.expand_path "data/us-states.avsc", __dir__ } + let(:topic_admin) { pubsub.topic_admin } + let(:subscription_admin) { pubsub.subscription_admin } + let(:schemas) { pubsub.schemas } after do - @subscription.delete if @subscription - @topic.delete if @topic - @schema.delete if @schema + subscription_admin.delete_subscription subscription: @subscription.name if @subscription + topic_admin.delete_topic topic: @topic.name if @topic + schemas.delete_schema name: @schema.name if @schema end it "supports pubsub_create_schema, pubsub_get_schema, pubsub_list_schemas, pubsub_delete_schema" do @@ -45,7 +48,7 @@ assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id} created.\n" do create_avro_schema schema_id: schema_id, avsc_file: avsc_file end - @schema = pubsub.schema schema_id + @schema = schemas.get_schema name: pubsub.schema_path(schema_id) assert @schema assert_equal "projects/#{pubsub.project}/schemas/#{schema_id}", @schema.name @@ -75,13 +78,19 @@ let(:record) { { "name" => "Alaska", "post_abbr" => "AK" } } it "supports pubsub_create_topic_with_schema, pubsub_publish_avro_records with binary encoding" do - @schema = pubsub.create_schema schema_id, :avro, avsc_definition + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :AVRO, + definition: avsc_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id + # pubsub_create_topic_with_schema assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do - create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :binary + create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :BINARY end - @topic = pubsub.topic topic_id + @topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) assert @topic assert_equal "projects/#{pubsub.project}/topics/#{topic_id}", @topic.name @@ -92,13 +101,18 @@ end it "supports pubsub_create_topic_with_schema, pubsub_publish_avro_records with JSON encoding" do - @schema = pubsub.create_schema schema_id, :avro, avsc_definition + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :AVRO, + definition: avsc_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id # pubsub_create_topic_with_schema assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do - create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :json + create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :JSON end - @topic = pubsub.topic topic_id + @topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) assert @topic assert_equal "projects/#{pubsub.project}/topics/#{topic_id}", @topic.name @@ -109,15 +123,28 @@ end it "supports pubsub_subscribe_avro_records with binary encoding" do - @schema = pubsub.create_schema schema_id, :avro, avsc_definition - @topic = pubsub.create_topic random_topic_id, schema_name: schema_id, message_encoding: :binary + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :AVRO, + definition: avsc_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id + + schema_settings = Google::Cloud::PubSub::V1::SchemaSettings.new schema: pubsub.schema_path(schema_id), + encoding: :BINARY + + + @topic = topic_admin.create_topic name: pubsub.topic_path(random_topic_id), + schema_settings: schema_settings - @subscription = @topic.subscribe random_subscription_id + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name writer = Avro::IO::DatumWriter.new avro_schema buffer = StringIO.new writer.write record, Avro::IO::BinaryEncoder.new(buffer) - @topic.publish buffer + publisher = pubsub.publisher @topic.name + publisher.publish buffer sleep 5 # pubsub_subscribe_avro_records @@ -129,12 +156,24 @@ end it "supports pubsub_subscribe_avro_records with JSON encoding" do - @schema = pubsub.create_schema schema_id, :avro, avsc_definition - @topic = pubsub.create_topic random_topic_id, schema_name: schema_id, message_encoding: :json + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :AVRO, + definition: avsc_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id + schema_settings = Google::Cloud::PubSub::V1::SchemaSettings.new schema: pubsub.schema_path(schema_id), + encoding: :JSON - @subscription = @topic.subscribe random_subscription_id - @topic.publish record.to_json + @topic = topic_admin.create_topic name: pubsub.topic_path(random_topic_id), + schema_settings: schema_settings + + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name + + publisher = pubsub.publisher @topic.name + publisher.publish record.to_json sleep 5 # pubsub_subscribe_avro_records @@ -153,13 +192,19 @@ let(:revision_file) { File.expand_path "data/us-states-revision.proto", __dir__ } it "supports pubsub_create_topic_with_schema, pubsub_publish_proto_messages with binary encoding" do - @schema = pubsub.create_schema schema_id, :protocol_buffer, proto_definition + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :PROTOCOL_BUFFER, + definition: proto_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id # pubsub_create_topic_with_schema assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do - create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :binary + create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :BINARY end - @topic = pubsub.topic topic_id + + @topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) assert @topic assert_equal "projects/#{pubsub.project}/topics/#{topic_id}", @topic.name @@ -170,13 +215,19 @@ end it "supports pubsub_create_topic_with_schema, pubsub_publish_proto_messages with JSON encoding" do - @schema = pubsub.create_schema schema_id, :protocol_buffer, proto_definition + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :PROTOCOL_BUFFER, + definition: proto_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id # pubsub_create_topic_with_schema assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do - create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :json + create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :JSON end - @topic = pubsub.topic topic_id + + @topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) assert @topic assert_equal "projects/#{pubsub.project}/topics/#{topic_id}", @topic.name @@ -187,13 +238,25 @@ end it "supports pubsub_subscribe_proto_messages with binary encoding" do - @schema = pubsub.create_schema schema_id, :protocol_buffer, proto_definition - @topic = pubsub.create_topic random_topic_id, schema_name: schema_id, message_encoding: :binary + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :PROTOCOL_BUFFER, + definition: proto_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id + + schema_settings = Google::Cloud::PubSub::V1::SchemaSettings.new schema: pubsub.schema_path(schema_id), + encoding: :BINARY + + @topic = topic_admin.create_topic name: pubsub.topic_path(random_topic_id), + schema_settings: schema_settings - @subscription = @topic.subscribe random_subscription_id + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name state = Utilities::StateProto.new name: "Alaska", post_abbr: "AK" - @topic.publish Utilities::StateProto.encode(state) + publisher = pubsub.publisher @topic.name + publisher.publish Utilities::StateProto.encode(state) sleep 5 # pubsub_subscribe_proto_messages @@ -205,13 +268,25 @@ end it "supports pubsub_subscribe_proto_messages with JSON encoding" do - @schema = pubsub.create_schema schema_id, :protocol_buffer, proto_definition - @topic = pubsub.create_topic random_topic_id, schema_name: schema_id, message_encoding: :json + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :PROTOCOL_BUFFER, + definition: proto_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id - @subscription = @topic.subscribe random_subscription_id + schema_settings = Google::Cloud::PubSub::V1::SchemaSettings.new schema: pubsub.schema_path(schema_id), + encoding: :JSON + + @topic = topic_admin.create_topic name: pubsub.topic_path(random_topic_id), + schema_settings: schema_settings + + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name state = Utilities::StateProto.new name: "Alaska", post_abbr: "AK" - @topic.publish Utilities::StateProto.encode_json(state) + publisher = pubsub.publisher @topic.name + publisher.publish Utilities::StateProto.encode_json(state) sleep 5 # pubsub_subscribe_proto_messages @@ -223,7 +298,13 @@ end it "supports pubsub_commit_proto_schema & pubsub_commit_list_schema_revisions" do - @schema = pubsub.create_schema schema_id, :protocol_buffer, proto_definition + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :PROTOCOL_BUFFER, + definition: proto_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id + rev_id = @schema.revision_id # pubsub_commit_proto_schema diff --git a/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb b/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb index 84523cace8e0..877132d4db55 100644 --- a/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb +++ b/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb @@ -34,29 +34,32 @@ require "google/cloud/bigquery" describe "subscriptions" do - let(:pubsub) { Google::Cloud::Pubsub.new } + let(:pubsub) { Google::Cloud::PubSub.new } let(:endpoint) { "https://#{pubsub.project}.appspot.com/push" } let(:role) { "roles/pubsub.subscriber" } let(:service_account_email) { "serviceAccount:kokoro@#{pubsub.project}.iam.gserviceaccount.com" } + let(:topic_admin) { pubsub.topic_admin } + let(:subscription_admin) { pubsub.subscription_admin } before :all do - @topic = pubsub.create_topic random_topic_id + @topic = topic_admin.create_topic name: pubsub.topic_path(random_topic_id) @created_subscriptions = [] end after :all do - @topic.delete + topic_admin.delete_topic topic: @topic.name if @topic @created_subscriptions.each do |sub| - pubsub.subscription(sub).delete + subscription_admin.delete_subscription subscription: pubsub.subscription_path(sub) end end before do - @subscription = @topic.subscribe random_subscription_id + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name end after do - @subscription.delete if @subscription + subscription_admin.delete_subscription subscription: @subscription.name if @subscription @subscription = nil cleanup_bq @table, @dataset if @table end @@ -67,11 +70,9 @@ assert_output "Push endpoint updated.\n" do update_push_configuration subscription_id: @subscription.name, new_endpoint: endpoint end - @subscription = @topic.subscription @subscription.name + @subscription = subscription_admin.get_subscription subscription: @subscription.name assert @subscription - assert_equal endpoint, @subscription.endpoint - assert @subscription.push_config - assert_equal endpoint, @subscription.push_config.endpoint + assert_equal endpoint, @subscription.push_config.push_endpoint # pubsub_list_subscriptions out, _err = capture_io do @@ -82,11 +83,13 @@ # pubsub_set_subscription_policy set_subscription_policy subscription_id: @subscription.name, role: role, service_account_email: service_account_email - @subscription.reload! - assert_equal [service_account_email], @subscription.policy.roles[role] + @subscription = subscription_admin.get_subscription subscription: @subscription.name + policy = pubsub.iam.get_iam_policy resource: @subscription.name + + assert_equal [service_account_email], policy.bindings.first.members # pubsub_get_subscription_policy - assert_output "Subscription policy:\n#{@subscription.policy.roles}\n" do + assert_output "Subscription policy:\n#{policy.bindings.first.role}\n" do get_subscription_policy subscription_id: @subscription.name end @@ -104,12 +107,15 @@ assert_output "Subscription #{@subscription.name} deleted.\n" do delete_subscription subscription_id: @subscription.name end - @subscription = @topic.subscription @subscription.name - refute @subscription + assert_raises Google::Cloud::NotFoundError do + subscription_admin.get_subscription subscription: @subscription.name + end + @subscription = nil end it "supports pubsub_subscriber_sync_pull" do - @topic.publish "This is a test message." + publisher = pubsub.publisher @topic.name + publisher.publish "This is a test message." sleep 5 # pubsub_subscriber_sync_pull @@ -124,18 +130,19 @@ project_id = pubsub.project topic_id = @topic.name subscription_id = random_subscription_id + + subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), + topic: @topic.name @created_subscriptions << subscription_id - @topic.subscribe subscription_id, enable_exactly_once_delivery: true + publisher = pubsub.publisher @topic.name - @topic.publish "This is a test message." + publisher.publish "This is a test message." sleep 5 expect_with_retry "pubsub_subscriber_async_pull_with_ack_response" do out, _err = capture_io do - PubsubSubscriberExactlyOnceDelivery.new.subscriber_exactly_once_delivery project_id: project_id, - topic_id: topic_id, - subscription_id: subscription_id + subscriber_exactly_once_delivery project_id: project_id, subscription_id: subscription_id end assert_includes out, "Received message: This is a test message." @@ -144,7 +151,8 @@ end it "supports pubsub_subscriber_async_pull, pubsub_quickstart_subscriber" do - @topic.publish "This is a test message." + publisher = pubsub.publisher @topic.name + publisher.publish "This is a test message." sleep 5 # pubsub_subscriber_async_pull @@ -157,7 +165,8 @@ end it "supports pubsub_subscriber_async_pull_custom_attributes" do - @topic.publish "This is a test message.", origin: "ruby-sample" + publisher = pubsub.publisher @topic.name + publisher.publish "This is a test message.", origin: "ruby-sample" sleep 5 # pubsub_subscriber_async_pull_custom_attributes @@ -172,7 +181,8 @@ end it "supports pubsub_subscriber_flow_settings" do - @topic.publish "This is a test message." + publisher = pubsub.publisher @topic.name + publisher.publish "This is a test message." sleep 5 # pubsub_subscriber_flow_settings @@ -184,7 +194,8 @@ end it "supports pubsub_subscriber_concurrency_control" do - @topic.publish "This is a test message." + publisher = pubsub.publisher @topic.name + publisher.publish "This is a test message." sleep 5 # pubsub_subscriber_concurrency_control @@ -196,7 +207,8 @@ end it "supports pubsub_subscriber_sync_pull_with_lease" do - @topic.publish "This is a test message." + publisher = pubsub.publisher @topic.name + publisher.publish "This is a test message." sleep 5 # # pubsub_subscriber_sync_pull_with_lease @@ -219,10 +231,10 @@ filter = "attributes.author=\"unknown\"" assert_output "Created subscription with filtering enabled: #{subscription_id}\n" do - PubsubCreateSubscriptionWithFilter.new.create_subscription_with_filter project_id: project_id, - topic_id: topic_id, - subscription_id: subscription_id, - filter: filter + create_subscription_with_filter project_id: project_id, + topic_id: @topic.name, + subscription_id: subscription_id, + filter: filter end end @@ -233,11 +245,9 @@ @created_subscriptions << subscription_id assert_output "Created subscription with exactly once delivery enabled: #{subscription_id}\n" do - PubsubCreateSubscriptionWithExactlyOnceDelivery.new.create_subscription_with_exactly_once_delivery( - project_id: project_id, - topic_id: topic_id, - subscription_id: subscription_id - ) + create_subscription_with_exactly_once_delivery project_id: project_id, + topic_id: topic_id, + subscription_id: subscription_id end end diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index 652ff3121418..a2e584e2a5a5 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -30,22 +30,25 @@ require_relative "../pubsub_publisher_batch_settings.rb" require_relative "../pubsub_publisher_concurrency_control.rb" require_relative "../pubsub_publisher_flow_control.rb" +require_relative "../pubsub_publisher_with_compression.rb" require_relative "../pubsub_quickstart_publisher.rb" require_relative "../pubsub_resume_publish_with_ordering_keys.rb" require_relative "../pubsub_set_topic_policy.rb" require_relative "../pubsub_test_topic_permissions.rb" describe "topics" do - let(:pubsub) { Google::Cloud::Pubsub.new } + let(:pubsub) { Google::Cloud::PubSub.new } let(:role) { "roles/pubsub.publisher" } let(:service_account_email) { "serviceAccount:kokoro@#{pubsub.project}.iam.gserviceaccount.com" } let(:topic_id) { random_topic_id } let(:subscription_id) { random_subscription_id } let(:dead_letter_topic_id) { random_topic_id } + let(:topic_admin) { pubsub.topic_admin } + let(:subscription_admin) { pubsub.subscription_admin } after do - @subscription.delete if @subscription - @topic.delete if @topic + subscription_admin.delete_subscription subscription: @subscription.name if @subscription + topic_admin.delete_topic topic: @topic.name if @topic end it "supports pubsub_create_topic, pubsub_list_topics, pubsub_set_topic_policy, pubsub_get_topic_policy, pubsub_test_topic_permissions, pubsub_delete_topic" do @@ -53,7 +56,7 @@ assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do create_topic topic_id: topic_id end - topic = pubsub.topic topic_id + topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) assert topic assert_equal "projects/#{pubsub.project}/topics/#{topic_id}", topic.name @@ -66,11 +69,12 @@ # pubsub_set_topic_policy set_topic_policy topic_id: topic.name, role: role, service_account_email: service_account_email - topic.reload! - assert_equal [service_account_email], topic.policy.roles[role] + policy = pubsub.iam.get_iam_policy resource: pubsub.topic_path(topic_id) + + assert_equal [service_account_email], policy.bindings.first.members # pubsub_get_topic_policy - assert_output "Topic policy:\n#{topic.policy.roles}\n" do + assert_output "Topic policy:\n#{policy.bindings.first.role}\n" do get_topic_policy topic_id: topic_id end @@ -83,24 +87,26 @@ assert_output "Topic #{topic_id} deleted.\n" do delete_topic topic_id: topic_id end - topic = pubsub.topic topic_id - refute topic + + assert_raises Google::Cloud::NotFoundError do + topic_admin.get_topic topic: pubsub.topic_path(topic_id) + end end it "supports pubsub_create_pull_subscription, pubsub_list_topic_subscriptions, pubsub_quickstart_publisher, pubsub_subscriber_sync_pull" do #setup - @topic = pubsub.create_topic topic_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) # pubsub_create_pull_subscription assert_output "Pull subscription #{subscription_id} created.\n" do create_pull_subscription topic_id: topic_id, subscription_id: subscription_id end - @subscription = @topic.subscription subscription_id + @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) assert @subscription assert_equal "projects/#{pubsub.project}/subscriptions/#{subscription_id}", @subscription.name # pubsub_list_topic_subscriptions - assert_output "Subscriptions in topic #{@topic.name}:\n#{@subscription.name}\n" do + assert_output "Subscriptions in topic #{topic_id}:\n#{@subscription.name}\n" do list_topic_subscriptions topic_id: topic_id end @@ -119,16 +125,16 @@ it "supports pubsub_enable_subscription_ordering, pubsub_publish_with_ordering_keys, pubsub_resume_publish_with_ordering_keys" do #setup - @topic = pubsub.create_topic topic_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) # pubsub_enable_subscription_ordering assert_output "Pull subscription #{subscription_id} created with message ordering.\n" do enable_subscription_ordering topic_id: topic_id, subscription_id: subscription_id end - @subscription = @topic.subscription subscription_id + @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) assert @subscription assert_equal "projects/#{pubsub.project}/subscriptions/#{subscription_id}", @subscription.name - assert @subscription.message_ordering? + assert @subscription.enable_message_ordering # pubsub_publish_with_ordering_keys assert_output "Messages published with ordering key.\n" do @@ -137,7 +143,8 @@ messages = [] expect_with_retry "pubsub_publish_with_ordering_keys" do - @subscription.pull(immediate: false, max: 20).each do |message| + subscriber = pubsub.subscriber @subscription.name + subscriber.pull(immediate: false, max: 20).each do |message| messages << message message.acknowledge! end @@ -160,7 +167,8 @@ messages = [] expect_with_retry "pubsub_resume_publish_with_ordering_keys" do - @subscription.pull(immediate: false, max: 20).each do |message| + subscriber = pubsub.subscriber @subscription.name + subscriber.pull(immediate: false, max: 20).each do |message| messages << message message.acknowledge! end @@ -177,25 +185,26 @@ it "supports pubsub_create_push_subscription" do #setup - @topic = pubsub.create_topic topic_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + endpoint = "https://#{pubsub.project}.appspot.com/push" # pubsub_create_pull_subscription assert_output "Push subscription #{subscription_id} created.\n" do create_push_subscription topic_id: topic_id, subscription_id: subscription_id, endpoint: endpoint end - @subscription = @topic.subscription subscription_id + + @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) assert @subscription assert_equal "projects/#{pubsub.project}/subscriptions/#{subscription_id}", @subscription.name - assert_equal endpoint, @subscription.endpoint - assert @subscription.push_config - assert_equal endpoint, @subscription.push_config.endpoint + assert_equal endpoint, @subscription.push_config.push_endpoint end it "supports pubsub_dead_letter_create_subscription, pubsub_dead_letter_update_subscription, pubsub_dead_letter_delivery_attempt" do #setup - @topic = pubsub.create_topic topic_id - @dead_letter_topic = pubsub.create_topic dead_letter_topic_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + + @dead_letter_topic = topic_admin.create_topic name: pubsub.topic_path(dead_letter_topic_id) begin # pubsub_dead_letter_create_subscription @@ -206,23 +215,25 @@ end assert_includes out, "Created subscription #{subscription_id} with dead letter topic #{dead_letter_topic_id}." - @subscription = @topic.subscription subscription_id + @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) assert @subscription assert_equal "projects/#{pubsub.project}/subscriptions/#{subscription_id}", @subscription.name - assert @subscription.dead_letter_topic - assert_equal "projects/#{pubsub.project}/topics/#{dead_letter_topic_id}", @subscription.dead_letter_topic.name - assert_equal 10, @subscription.dead_letter_max_delivery_attempts + assert @subscription.dead_letter_policy + assert_equal "projects/#{pubsub.project}/topics/#{dead_letter_topic_id}", @subscription.dead_letter_policy.dead_letter_topic + assert_equal 10, @subscription.dead_letter_policy.max_delivery_attempts # pubsub_dead_letter_update_subscription assert_output "Max delivery attempts is now 20.\n" do dead_letter_update_subscription subscription_id: subscription_id end - @subscription.reload! - assert @subscription.dead_letter_topic - assert_equal "projects/#{pubsub.project}/topics/#{dead_letter_topic_id}", @subscription.dead_letter_topic.name - assert_equal 20, @subscription.dead_letter_max_delivery_attempts - @topic.publish "This is a dead letter topic test message." + @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) + assert @subscription.dead_letter_policy + assert_equal "projects/#{pubsub.project}/topics/#{dead_letter_topic_id}", @subscription.dead_letter_policy.dead_letter_topic + assert_equal 20, @subscription.dead_letter_policy.max_delivery_attempts + + publisher = pubsub.publisher @topic.name + publisher.publish "This is a dead letter topic test message." # pubsub_dead_letter_delivery_attempt expect_with_retry "pubsub_dead_letter_delivery_attempt" do out, _err = capture_io do @@ -236,19 +247,20 @@ assert_output "Removed dead letter topic from #{subscription_id} subscription.\n" do dead_letter_remove subscription_id: subscription_id end - @subscription.reload! - refute @subscription.dead_letter_topic - refute @subscription.dead_letter_max_delivery_attempts + @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) + refute @subscription.dead_letter_policy ensure - @dead_letter_topic.delete + topic_admin.delete_topic topic: @dead_letter_topic.name end end it "supports pubsub_publish" do #setup - @topic = pubsub.create_topic topic_id - @subscription = @topic.subscribe random_subscription_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name # pubsub_publish assert_output "Message published asynchronously.\n" do @@ -257,7 +269,8 @@ messages = [] expect_with_retry "pubsub_publish" do - @subscription.pull(immediate: false, max: 1).each do |message| + subscriber = pubsub.subscriber @subscription.name + subscriber.pull(immediate: false, max: 1).each do |message| messages << message message.acknowledge! end @@ -268,18 +281,19 @@ it "supports pubsub_publisher_with_compression" do #setup - sample = SampleLoader.load "pubsub_publisher_with_compression.rb" - @topic = pubsub.create_topic topic_id - @subscription = @topic.subscribe random_subscription_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name # pubsub_publisher_with_compression assert_output /Published a compressed message of message ID:/ do - sample.run project_id: pubsub.project, topic_id: topic_id + pubsub_publisher_with_compression project_id: pubsub.project, topic_id: topic_id end messages = [] expect_with_retry "pubsub_publisher_with_compression" do - @subscription.pull(immediate: false, max: 1).each do |message| + subscriber = pubsub.subscriber @subscription.name + subscriber.pull(immediate: false, max: 1).each do |message| messages << message message.acknowledge! end @@ -290,8 +304,9 @@ it "supports pubsub_publish_custom_attributes" do #setup - @topic = pubsub.create_topic topic_id - @subscription = @topic.subscribe random_subscription_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name # pubsub_publish_custom_attributes assert_output "Message with custom attributes published asynchronously.\n" do @@ -300,7 +315,8 @@ messages = [] expect_with_retry "pubsub_publish_custom_attributes" do - @subscription.pull(immediate: false, max: 1).each do |message| + subscriber = pubsub.subscriber @subscription.name + subscriber.pull(immediate: false, max: 1).each do |message| messages << message message.acknowledge! end @@ -314,8 +330,9 @@ it "supports pubsub_publisher_batch_settings" do #setup - @topic = pubsub.create_topic topic_id - @subscription = @topic.subscribe random_subscription_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name # pubsub_publisher_batch_settings assert_output "Messages published asynchronously in batch.\n" do @@ -324,7 +341,8 @@ messages = [] expect_with_retry "pubsub_publisher_batch_settings" do - @subscription.pull(immediate: false, max: 20).each do |message| + subscriber = pubsub.subscriber @subscription.name + subscriber.pull(immediate: false, max: 20).each do |message| messages << message message.acknowledge! end @@ -339,8 +357,9 @@ it "supports pubsub_publisher_concurrency_control" do #setup - @topic = pubsub.create_topic topic_id - @subscription = @topic.subscribe random_subscription_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name # pubsub_publisher_concurrency_control assert_output "Message published asynchronously.\n" do @@ -349,7 +368,8 @@ messages = [] expect_with_retry "pubsub_publisher_concurrency_control" do - @subscription.pull(immediate: false, max: 1).each do |message| + subscriber = pubsub.subscriber @subscription.name + subscriber.pull(immediate: false, max: 1).each do |message| messages << message message.acknowledge! end @@ -360,8 +380,9 @@ it "supports pubsub_publisher_flow_control" do #setup - @topic = pubsub.create_topic topic_id - @subscription = @topic.subscribe random_subscription_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name # pubsub_publisher_flow_control assert_output "Published messages with flow control settings to #{topic_id}.\n" do @@ -371,8 +392,9 @@ it "supports publish_with_error_handler" do #setup - @topic = pubsub.create_topic topic_id - @subscription = @topic.subscribe random_subscription_id + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), + topic: @topic.name # publish_with_error_handler assert_output "Message published asynchronously.\n" do @@ -381,7 +403,8 @@ messages = [] expect_with_retry "pubsub_publish" do - @subscription.pull(immediate: false, max: 1).each do |message| + subscriber = pubsub.subscriber @subscription.name + subscriber.pull(immediate: false, max: 1).each do |message| messages << message message.acknowledge! end diff --git a/google-cloud-pubsub/samples/pubsub_commit_proto_schema.rb b/google-cloud-pubsub/samples/pubsub_commit_proto_schema.rb index dd95195da400..6efcf07ecae7 100644 --- a/google-cloud-pubsub/samples/pubsub_commit_proto_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_commit_proto_schema.rb @@ -19,12 +19,18 @@ def commit_proto_schema schema_id:, proto_file: # schema_id = "your-schema-id" # proto_file = "path/to/a/proto_file.proto" - pubsub = Google::Cloud::Pubsub.new - schema = pubsub.schema schema_id + pubsub = Google::Cloud::PubSub.new + + schemas = pubsub.schemas + + schema = schemas.get_schema name: pubsub.schema_path(schema_id) definition = File.read proto_file - result = schema.commit definition, :protocol_buffer + schema.definition = definition + + result = schemas.commit_schema name: schema.name, + schema: schema puts "Schema commited with revision #{result.revision_id}." result diff --git a/google-cloud-pubsub/samples/pubsub_create_avro_schema.rb b/google-cloud-pubsub/samples/pubsub_create_avro_schema.rb index 457f72768b70..bfa398c4ea50 100644 --- a/google-cloud-pubsub/samples/pubsub_create_avro_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_create_avro_schema.rb @@ -19,10 +19,19 @@ def create_avro_schema schema_id:, avsc_file: # schema_id = "your-schema-id" # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new definition = File.read avsc_file - schema = pubsub.create_schema schema_id, :avro, definition + + schemas = pubsub.schemas + + schema = schemas.create_schema parent: pubsub.project_path, + schema: { + name: schema_id, + type: :AVRO, + definition: definition + }, + schema_id: schema_id puts "Schema #{schema.name} created." # [END pubsub_create_avro_schema] diff --git a/google-cloud-pubsub/samples/pubsub_create_bigquery_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_bigquery_subscription.rb index 722d32a088ac..a4e042de5bb6 100644 --- a/google-cloud-pubsub/samples/pubsub_create_bigquery_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_create_bigquery_subscription.rb @@ -12,31 +12,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START pubsub_create_bigquery_subscription] require "google/cloud/pubsub" ## # Shows how to create a BigQuery subscription where messages published # to a topic populates a BigQuery table. # -# @param project_id [String] -# Your Google Cloud project (e.g. "my-project") -# @param topic_id [String] -# Your topic name (e.g. "my-secret") -# @param subscription_id [String] -# ID for new subscription to be created (e.g. "my-subscription") -# @param bigquery_table_id [String] -# ID of bigquery table (e.g "my-project:dataset-id.table-id") -# def pubsub_create_bigquery_subscription project_id:, topic_id:, subscription_id:, bigquery_table_id: - pubsub = Google::Cloud::Pubsub.new project_id: project_id - topic = pubsub.topic topic_id - subscription = topic.subscribe subscription_id, - bigquery_config: { - table: bigquery_table_id, - write_metadata: true - } + # [START pubsub_create_bigquery_subscription] + # project_id = "your-project-id" + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + # bigquery_table_id = "my-project:dataset-id.table-id" + pubsub = Google::Cloud::PubSub.new project_id: project_id + + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + bigquery_config: { + table: bigquery_table_id, + write_metadata: true + } + puts "BigQuery subscription created: #{subscription_id}." puts "Table for subscription is: #{bigquery_table_id}" + # [END pubsub_create_bigquery_subscription] end -# [END pubsub_create_bigquery_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb b/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb index c925e544b602..b79f136bf040 100644 --- a/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb @@ -19,7 +19,7 @@ def create_proto_schema schema_id:, proto_file: # schema_id = "your-schema-id" # proto_file = "path/to/a/proto/file/(.proto)/formatted/in/protocol/buffers" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new definition = File.read proto_file schema = pubsub.create_schema schema_id, :protocol_buffer, definition diff --git a/google-cloud-pubsub/samples/pubsub_create_pull_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_pull_subscription.rb index 2a10130f8356..0f832df1594c 100644 --- a/google-cloud-pubsub/samples/pubsub_create_pull_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_create_pull_subscription.rb @@ -19,10 +19,12 @@ def create_pull_subscription topic_id:, subscription_id: # topic_id = "your-topic-id" # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - subscription = topic.subscribe subscription_id + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id) puts "Pull subscription #{subscription_id} created." # [END pubsub_create_pull_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_create_push_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_push_subscription.rb index 8ab5a8839c57..2b170c6dff1a 100644 --- a/google-cloud-pubsub/samples/pubsub_create_push_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_create_push_subscription.rb @@ -20,11 +20,15 @@ def create_push_subscription topic_id:, subscription_id:, endpoint: # subscription_id = "your-subscription-id" # endpoint = "https://your-test-project.appspot.com/push" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - subscription = topic.subscribe subscription_id, - endpoint: endpoint + subscription_admin = pubsub.subscription_admin + + push_config = Google::Cloud::PubSub::V1::PushConfig.new push_endpoint: endpoint + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + push_config: push_config puts "Push subscription #{subscription_id} created." # [END pubsub_create_push_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_create_subscription_with_exactly_once_delivery.rb b/google-cloud-pubsub/samples/pubsub_create_subscription_with_exactly_once_delivery.rb index 6c742050970b..72b112a1f569 100644 --- a/google-cloud-pubsub/samples/pubsub_create_subscription_with_exactly_once_delivery.rb +++ b/google-cloud-pubsub/samples/pubsub_create_subscription_with_exactly_once_delivery.rb @@ -12,33 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START pubsub_create_subscription_with_exactly_once_delivery] require "google/cloud/pubsub" # Shows how to create a new subscription with exactly once delivery enabled -class PubsubCreateSubscriptionWithExactlyOnceDelivery - def create_subscription_with_exactly_once_delivery project_id:, topic_id:, subscription_id: - pubsub = Google::Cloud::Pubsub.new project_id: project_id - topic = pubsub.topic topic_id - subscription = topic.subscribe subscription_id, enable_exactly_once_delivery: true - puts "Created subscription with exactly once delivery enabled: #{subscription_id}" - end +def create_subscription_with_exactly_once_delivery project_id:, topic_id:, subscription_id: + # [START pubsub_create_subscription_with_exactly_once_delivery] + # project_id = "your-project-id" + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" - def self.run - # TODO(developer): Replace these variables before running the sample. - project_id = "your-project-id" - topic_id = "your-topic-id" - subscription_id = "id-for-new-subcription" - pubsub_create_subscription_with_exactly_once_delivery = PubsubCreateSubscriptionWithExactlyOnceDelivery.new - pubsub_create_subscription_with_exactly_once_delivery.create_subscription_with_exactly_once_delivery( - project_id: project_id, - topic_id: topic_id, - subscription_id: subscription_id - ) - end -end + pubsub = Google::Cloud::PubSub.new project_id: project_id + + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + enable_exactly_once_delivery: true -if $PROGRAM_NAME == __FILE__ - PubsubCreateSubscriptionWithExactlyOnceDelivery.run + puts "Created subscription with exactly once delivery enabled: #{subscription_id}" + # [END pubsub_create_subscription_with_exactly_once_delivery] end -# [END pubsub_create_subscription_with_exactly_once_delivery] diff --git a/google-cloud-pubsub/samples/pubsub_create_subscription_with_filter.rb b/google-cloud-pubsub/samples/pubsub_create_subscription_with_filter.rb index 8a7c1133f9d3..ef82ee01521c 100644 --- a/google-cloud-pubsub/samples/pubsub_create_subscription_with_filter.rb +++ b/google-cloud-pubsub/samples/pubsub_create_subscription_with_filter.rb @@ -12,32 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START pubsub_create_subscription_with_filter] require "google/cloud/pubsub" # Shows how to create a new subscription with filter for a given topic -class PubsubCreateSubscriptionWithFilter - def create_subscription_with_filter project_id:, topic_id:, subscription_id:, filter: - pubsub = Google::Cloud::Pubsub.new project_id: project_id - topic = pubsub.topic topic_id - subscription = topic.subscribe subscription_id, filter: filter - puts "Created subscription with filtering enabled: #{subscription_id}" - end +def create_subscription_with_filter project_id:, topic_id:, subscription_id:, filter: + # [START pubsub_create_subscription_with_filter] + # project_id = "your-project-id" + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + # filter = "attributes.author=\"unknown\"" - def self.run - # TODO(developer): Replace these variables before running the sample. - project_id = "your-project-id" - topic_id = "your-topic-id" - subscription_id = "id-for-new-subcription" - filter = "attributes.author=\"unknown\"" - PubsubCreateSubscriptionWithFilter.new.create_subscription_with_filter project_id: project_id, - topic_id: topic_id, - subscription_id: subscription_id, - filter: filter - end -end + pubsub = Google::Cloud::PubSub.new project_id: project_id + + subscription_admin = pubsub.subscription_admin -if $PROGRAM_NAME == __FILE__ - PubsubCreateSubscriptionWithFilter.run + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + filter: filter + puts "Created subscription with filtering enabled: #{subscription_id}" + # [END pubsub_create_subscription_with_filter] end -# [END pubsub_create_subscription_with_filter] diff --git a/google-cloud-pubsub/samples/pubsub_create_topic.rb b/google-cloud-pubsub/samples/pubsub_create_topic.rb index c97029ca4bac..1fe99401d4b3 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic.rb @@ -18,9 +18,11 @@ def create_topic topic_id: # [START pubsub_create_topic] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.create_topic topic_id + topic_admin = pubsub.topic_admin + + topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) puts "Topic #{topic.name} created." # [END pubsub_create_topic] diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_schema.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_schema.rb index 6a4bd4daa978..c6a590d559c9 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_schema.rb @@ -19,11 +19,17 @@ def create_topic_with_schema topic_id:, schema_id:, message_encoding: # topic_id = "your-topic-id" # schema_id = "your-schema-id" # Choose either BINARY or JSON as valid message encoding in this topic. - # message_encoding = :binary + # message_encoding = :BINARY - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.create_topic topic_id, schema_name: schema_id, message_encoding: message_encoding + topic_admin = pubsub.topic_admin + + topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), + schema_settings: { + schema: pubsub.schema_path(schema_id), + encoding: message_encoding + } puts "Topic #{topic.name} created." # [END pubsub_create_topic_with_schema] diff --git a/google-cloud-pubsub/samples/pubsub_dead_letter_create_subscription.rb b/google-cloud-pubsub/samples/pubsub_dead_letter_create_subscription.rb index baf5054842f3..e29e78c4704a 100644 --- a/google-cloud-pubsub/samples/pubsub_dead_letter_create_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_dead_letter_create_subscription.rb @@ -20,13 +20,19 @@ def dead_letter_create_subscription topic_id:, subscription_id:, dead_letter_top # subscription_id = "your-subscription-id" # dead_letter_topic_id = "your-dead-letter-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - dead_letter_topic = pubsub.topic dead_letter_topic_id - subscription = topic.subscribe subscription_id, - dead_letter_topic: dead_letter_topic, - dead_letter_max_delivery_attempts: 10 + subscription_admin = pubsub.subscription_admin + + dl_topic_path = pubsub.topic_path dead_letter_topic_id + + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + dead_letter_policy: { + dead_letter_topic: pubsub.topic_path(dead_letter_topic_id), + max_delivery_attempts: 10 + } puts "Created subscription #{subscription_id} with dead letter topic #{dead_letter_topic_id}." puts "To process dead letter messages, remember to add a subscription to your dead letter topic." diff --git a/google-cloud-pubsub/samples/pubsub_dead_letter_delivery_attempt.rb b/google-cloud-pubsub/samples/pubsub_dead_letter_delivery_attempt.rb index bc5667751fbc..0cdd91e8eff7 100644 --- a/google-cloud-pubsub/samples/pubsub_dead_letter_delivery_attempt.rb +++ b/google-cloud-pubsub/samples/pubsub_dead_letter_delivery_attempt.rb @@ -18,10 +18,11 @@ def dead_letter_delivery_attempt subscription_id: # [START pubsub_dead_letter_delivery_attempt] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscription.pull(immediate: false).each do |message| + subscriber = pubsub.subscriber subscription_id + + subscriber.pull(immediate: false).each do |message| puts "Received message: #{message.data}" puts "Delivery Attempt: #{message.delivery_attempt}" message.acknowledge! diff --git a/google-cloud-pubsub/samples/pubsub_dead_letter_remove.rb b/google-cloud-pubsub/samples/pubsub_dead_letter_remove.rb index 25afd9364b7f..d9c466e289e6 100644 --- a/google-cloud-pubsub/samples/pubsub_dead_letter_remove.rb +++ b/google-cloud-pubsub/samples/pubsub_dead_letter_remove.rb @@ -18,10 +18,19 @@ def dead_letter_remove subscription_id: # [START pubsub_dead_letter_remove] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new + + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.get_subscription \ + subscription: pubsub.subscription_path(subscription_id) + subscription.dead_letter_policy = nil + + subscription_admin.update_subscription subscription: subscription, + update_mask: { + paths: ["dead_letter_policy"] + } - subscription = pubsub.subscription subscription_id - subscription.remove_dead_letter_policy puts "Removed dead letter topic from #{subscription_id} subscription." # [END pubsub_dead_letter_remove] end diff --git a/google-cloud-pubsub/samples/pubsub_dead_letter_update_subscription.rb b/google-cloud-pubsub/samples/pubsub_dead_letter_update_subscription.rb index c52de03cdd59..d9e432cf2913 100644 --- a/google-cloud-pubsub/samples/pubsub_dead_letter_update_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_dead_letter_update_subscription.rb @@ -20,10 +20,19 @@ def dead_letter_update_subscription subscription_id: # role = "roles/pubsub.publisher" # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscription.dead_letter_max_delivery_attempts = 20 - puts "Max delivery attempts is now #{subscription.dead_letter_max_delivery_attempts}." + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) + + subscription.dead_letter_policy.max_delivery_attempts = 20 + + subscription_admin.update_subscription subscription: subscription, + update_mask: { + paths: ["dead_letter_policy"] + } + + puts "Max delivery attempts is now #{subscription.dead_letter_policy.max_delivery_attempts}." # [END pubsub_dead_letter_update_subscription] end diff --git a/google-cloud-pubsub/samples/pubsub_delete_schema.rb b/google-cloud-pubsub/samples/pubsub_delete_schema.rb index 1994540ddafe..9f013d3ba57e 100644 --- a/google-cloud-pubsub/samples/pubsub_delete_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_delete_schema.rb @@ -18,10 +18,11 @@ def delete_schema schema_id: # [START pubsub_delete_schema] # schema_id = "your-schema-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - schema = pubsub.schema schema_id - schema.delete + schemas = pubsub.schemas + + result = schemas.delete_schema name: pubsub.schema_path(schema_id) puts "Schema #{schema_id} deleted." # [END pubsub_delete_schema] diff --git a/google-cloud-pubsub/samples/pubsub_delete_subscription.rb b/google-cloud-pubsub/samples/pubsub_delete_subscription.rb index d1ff415b815b..893d030c3701 100644 --- a/google-cloud-pubsub/samples/pubsub_delete_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_delete_subscription.rb @@ -18,10 +18,11 @@ def delete_subscription subscription_id: # [START pubsub_delete_subscription] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscription.delete + subscription_admin = pubsub.subscription_admin + + subscription_admin.delete_subscription subscription: pubsub.subscription_path(subscription_id) puts "Subscription #{subscription_id} deleted." # [END pubsub_delete_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_delete_topic.rb b/google-cloud-pubsub/samples/pubsub_delete_topic.rb index 74c7dc0cc689..e95a819284a5 100644 --- a/google-cloud-pubsub/samples/pubsub_delete_topic.rb +++ b/google-cloud-pubsub/samples/pubsub_delete_topic.rb @@ -18,10 +18,11 @@ def delete_topic topic_id: # [START pubsub_delete_topic] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - topic.delete + topic_admin = pubsub.topic_admin + + topic_admin.delete_topic topic: pubsub.topic_path(topic_id) puts "Topic #{topic_id} deleted." # [END pubsub_delete_topic] diff --git a/google-cloud-pubsub/samples/pubsub_detach_subscription.rb b/google-cloud-pubsub/samples/pubsub_detach_subscription.rb index 20a81be7434b..4d7b7c1d227f 100644 --- a/google-cloud-pubsub/samples/pubsub_detach_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_detach_subscription.rb @@ -18,14 +18,17 @@ def detach_subscription subscription_id: # [START pubsub_detach_subscription] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscription.detach + topic_admin = pubsub.topic_admin + subscription_admin = pubsub.subscription_admin + subscription_path = pubsub.subscription_path subscription_id + + topic_admin.detach_subscription subscription: subscription_path sleep 120 - subscription.reload! - if subscription.detached? + subscription = subscription_admin.get_subscription subscription: subscription_path + if subscription.detached puts "Subscription is detached." else puts "Subscription is NOT detached." diff --git a/google-cloud-pubsub/samples/pubsub_enable_subscription_ordering.rb b/google-cloud-pubsub/samples/pubsub_enable_subscription_ordering.rb index 77fffa71ce07..86969613c9f9 100644 --- a/google-cloud-pubsub/samples/pubsub_enable_subscription_ordering.rb +++ b/google-cloud-pubsub/samples/pubsub_enable_subscription_ordering.rb @@ -19,11 +19,14 @@ def enable_subscription_ordering topic_id:, subscription_id: # topic_id = "your-topic-id" # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - subscription = topic.subscribe subscription_id, - message_ordering: true + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + enable_message_ordering: true puts "Pull subscription #{subscription_id} created with message ordering." # [END pubsub_enable_subscription_ordering] diff --git a/google-cloud-pubsub/samples/pubsub_get_schema.rb b/google-cloud-pubsub/samples/pubsub_get_schema.rb index aa1394eb7735..06702ca9f960 100644 --- a/google-cloud-pubsub/samples/pubsub_get_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_get_schema.rb @@ -18,9 +18,11 @@ def get_schema schema_id: # [START pubsub_get_schema] # schema_id = "your-schema-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - schema = pubsub.schema schema_id + schemas = pubsub.schemas + + schema = schemas.get_schema name: pubsub.schema_path(schema_id) puts "Schema #{schema.name} retrieved." # [END pubsub_get_schema] diff --git a/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb b/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb index 77123e9e2335..c3cd3bdc42f6 100644 --- a/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb @@ -18,12 +18,13 @@ def get_subscription_policy subscription_id: # [START pubsub_get_subscription_policy] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - policy = subscription.policy + subscription_admin = pubsub.subscription_admin + + policy = pubsub.iam.get_iam_policy resource: pubsub.subscription_path(subscription_id) puts "Subscription policy:" - puts policy.roles + puts policy.bindings.first.role # [END pubsub_get_subscription_policy] end diff --git a/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb b/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb index 830f9a0d4d34..81bf3834d7a3 100644 --- a/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb @@ -18,12 +18,13 @@ def get_topic_policy topic_id: # [START pubsub_get_topic_policy] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - policy = topic.policy + topic_admin = pubsub.topic_admin + + policy = pubsub.iam.get_iam_policy resource: pubsub.topic_path(topic_id) puts "Topic policy:" - puts policy.roles + puts policy.bindings.first.role # [END pubsub_get_topic_policy] end diff --git a/google-cloud-pubsub/samples/pubsub_list_schema_revisions.rb b/google-cloud-pubsub/samples/pubsub_list_schema_revisions.rb index d67fa0d639d6..35692b3081a3 100644 --- a/google-cloud-pubsub/samples/pubsub_list_schema_revisions.rb +++ b/google-cloud-pubsub/samples/pubsub_list_schema_revisions.rb @@ -18,11 +18,13 @@ def list_schema_revisions schema_id: # [START pubsub_list_schema_revisions] # schema_id = "your-schema-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - schema = pubsub.schema schema_id + schemas = pubsub.schemas - response = schema.list_revisions + response = schemas.list_schema_revisions \ + name: pubsub.schema_path(schema_id), + view: Google::Cloud::PubSub::V1::SchemaView::FULL puts "Listed revisions of schema #{schema_id}" response.each do |revision_schema| diff --git a/google-cloud-pubsub/samples/pubsub_list_schemas.rb b/google-cloud-pubsub/samples/pubsub_list_schemas.rb index 3aa86e4cca10..65709cbb6c8a 100644 --- a/google-cloud-pubsub/samples/pubsub_list_schemas.rb +++ b/google-cloud-pubsub/samples/pubsub_list_schemas.rb @@ -17,9 +17,13 @@ def list_schemas # [START pubsub_list_schemas] - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - schemas = pubsub.schemas + schema_service = pubsub.schemas + + schemas = schema_service.list_schemas \ + parent: pubsub.project_path, + view: Google::Cloud::PubSub::V1::SchemaView::FULL puts "Schemas in project:" schemas.each do |schema| diff --git a/google-cloud-pubsub/samples/pubsub_list_subscriptions.rb b/google-cloud-pubsub/samples/pubsub_list_subscriptions.rb index 19af47db5aef..8ba67134cbb4 100644 --- a/google-cloud-pubsub/samples/pubsub_list_subscriptions.rb +++ b/google-cloud-pubsub/samples/pubsub_list_subscriptions.rb @@ -17,9 +17,11 @@ def list_subscriptions # [START pubsub_list_subscriptions] - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscriptions = pubsub.list_subscriptions + subscription_admin = pubsub.subscription_admin + + subscriptions = subscription_admin.list_subscriptions project: pubsub.project_path puts "Subscriptions:" subscriptions.each do |subscription| diff --git a/google-cloud-pubsub/samples/pubsub_list_topic_subscriptions.rb b/google-cloud-pubsub/samples/pubsub_list_topic_subscriptions.rb index 82b19ad19316..1e463d71144d 100644 --- a/google-cloud-pubsub/samples/pubsub_list_topic_subscriptions.rb +++ b/google-cloud-pubsub/samples/pubsub_list_topic_subscriptions.rb @@ -18,14 +18,15 @@ def list_topic_subscriptions topic_id: # [START pubsub_list_topic_subscriptions] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - subscriptions = topic.subscriptions + topic_admin = pubsub.topic_admin - puts "Subscriptions in topic #{topic.name}:" - subscriptions.each do |subscription| - puts subscription.name + response = topic_admin.list_topic_subscriptions topic: pubsub.topic_path(topic_id) + + puts "Subscriptions in topic #{topic_id}:" + response.subscriptions.each do |subscription_name| + puts subscription_name end # [END pubsub_list_topic_subscriptions] end diff --git a/google-cloud-pubsub/samples/pubsub_list_topics.rb b/google-cloud-pubsub/samples/pubsub_list_topics.rb index 7c7bd4225248..08ba5c4d2af6 100644 --- a/google-cloud-pubsub/samples/pubsub_list_topics.rb +++ b/google-cloud-pubsub/samples/pubsub_list_topics.rb @@ -17,9 +17,11 @@ def list_topics # [START pubsub_list_topics] - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topics = pubsub.topics + topic_admin = pubsub.topic_admin + + topics = topic_admin.list_topics project: pubsub.project_path puts "Topics in project:" topics.each do |topic| diff --git a/google-cloud-pubsub/samples/pubsub_publish.rb b/google-cloud-pubsub/samples/pubsub_publish.rb index b74035227806..b8fe1270cada 100644 --- a/google-cloud-pubsub/samples/pubsub_publish.rb +++ b/google-cloud-pubsub/samples/pubsub_publish.rb @@ -18,15 +18,16 @@ def publish_message_async topic_id: # [START pubsub_publish] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - topic.publish_async "This is a test message." do |result| + publisher = pubsub.publisher topic_id + + publisher.publish_async "This is a test message." do |result| raise "Failed to publish the message." unless result.succeeded? puts "Message published asynchronously." end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop.wait! + publisher.async_publisher.stop.wait! # [END pubsub_publish] end diff --git a/google-cloud-pubsub/samples/pubsub_publish_avro_records.rb b/google-cloud-pubsub/samples/pubsub_publish_avro_records.rb index d82bc20e1dcc..77e34420e616 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_avro_records.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_avro_records.rb @@ -19,24 +19,31 @@ def publish_avro_records topic_id:, avsc_file: # topic_id = "your-topic-id" # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id + topic_admin = pubsub.topic_admin + + topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) + + encoding = topic.schema_settings.encoding + + publisher = pubsub.publisher topic_id record = { "name" => "Alaska", "post_abbr" => "AK" } - if topic.message_encoding_binary? + case encoding + when :BINARY require "avro" avro_schema = Avro::Schema.parse File.read(avsc_file) writer = Avro::IO::DatumWriter.new avro_schema buffer = StringIO.new encoder = Avro::IO::BinaryEncoder.new buffer writer.write record, encoder - topic.publish buffer + publisher.publish buffer puts "Published binary-encoded AVRO message." - elsif topic.message_encoding_json? + when :JSON require "json" - topic.publish record.to_json + publisher.publish record.to_json puts "Published JSON-encoded AVRO message." else raise "No encoding specified in #{topic.name}." diff --git a/google-cloud-pubsub/samples/pubsub_publish_custom_attributes.rb b/google-cloud-pubsub/samples/pubsub_publish_custom_attributes.rb index 078839367909..80d686243b8d 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_custom_attributes.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_custom_attributes.rb @@ -18,18 +18,19 @@ def publish_message_async_with_custom_attributes topic_id: # [START pubsub_publish_custom_attributes] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new + + publisher = pubsub.publisher topic_id - topic = pubsub.topic topic_id # Add two attributes, origin and username, to the message - topic.publish_async "This is a test message.", - origin: "ruby-sample", - username: "gcp" do |result| + publisher.publish_async "This is a test message.", + origin: "ruby-sample", + username: "gcp" do |result| raise "Failed to publish the message." unless result.succeeded? puts "Message with custom attributes published asynchronously." end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop.wait! + publisher.async_publisher.stop.wait! # [END pubsub_publish_custom_attributes] end diff --git a/google-cloud-pubsub/samples/pubsub_publish_proto_messages.rb b/google-cloud-pubsub/samples/pubsub_publish_proto_messages.rb index ef761ffde010..45b379b93773 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_proto_messages.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_proto_messages.rb @@ -19,17 +19,24 @@ def publish_proto_messages topic_id: # [START pubsub_publish_proto_messages] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id + topic_admin = pubsub.topic_admin + + publisher = pubsub.publisher topic_id + + topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) + + encoding = topic.schema_settings.encoding state = Utilities::StateProto.new name: "Alaska", post_abbr: "AK" - if topic.message_encoding_binary? - topic.publish Utilities::StateProto.encode(state) + case encoding + when :BINARY + publisher.publish Utilities::StateProto.encode(state) puts "Published binary-encoded protobuf message." - elsif topic.message_encoding_json? - topic.publish Utilities::StateProto.encode_json(state) + when :JSON + publisher.publish Utilities::StateProto.encode_json(state) puts "Published JSON-encoded protobuf message." else raise "No encoding specified in #{topic.name}." diff --git a/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb b/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb index d742a3c85371..d7324f670053 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb @@ -18,7 +18,7 @@ def publish_with_error_handler topic_id: # [START pubsub_publish_with_error_handler] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new topic = pubsub.topic topic_id diff --git a/google-cloud-pubsub/samples/pubsub_publish_with_ordering_keys.rb b/google-cloud-pubsub/samples/pubsub_publish_with_ordering_keys.rb index 3ea786ff7c17..1d49fecd6968 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_with_ordering_keys.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_with_ordering_keys.rb @@ -18,22 +18,23 @@ def publish_ordered_messages topic_id: # [START pubsub_publish_with_ordering_keys] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new endpoint: "us-east1-pubsub.googleapis.com:443" + pubsub = Google::Cloud::PubSub.new # Start sending messages in one request once the size of all queued messages # reaches 1 MB or the number of queued messages reaches 20 - topic = pubsub.topic topic_id, async: { + publisher = pubsub.publisher topic_id, async: { max_bytes: 1_000_000, max_messages: 20 } - topic.enable_message_ordering! + + publisher.enable_message_ordering! 10.times do |i| - topic.publish_async "This is message ##{i}.", - ordering_key: "ordering-key" + publisher.publish_async "This is message ##{i}.", + ordering_key: "ordering-key" end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop! + publisher.async_publisher.stop! puts "Messages published with ordering key." # [END pubsub_publish_with_ordering_keys] end diff --git a/google-cloud-pubsub/samples/pubsub_publisher_batch_settings.rb b/google-cloud-pubsub/samples/pubsub_publisher_batch_settings.rb index b9527df41396..c06b962b1f5c 100644 --- a/google-cloud-pubsub/samples/pubsub_publisher_batch_settings.rb +++ b/google-cloud-pubsub/samples/pubsub_publisher_batch_settings.rb @@ -18,20 +18,20 @@ def publish_messages_async_with_batch_settings topic_id: # [START pubsub_publisher_batch_settings] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new # Start sending messages in one request once the size of all queued messages # reaches 1 MB or the number of queued messages reaches 20 - topic = pubsub.topic topic_id, async: { + publisher = pubsub.publisher topic_id, async: { max_bytes: 1_000_000, max_messages: 20 } 10.times do |i| - topic.publish_async "This is message ##{i}." + publisher.publish_async "This is message ##{i}." end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop.wait! + publisher.async_publisher.stop.wait! puts "Messages published asynchronously in batch." # [END pubsub_publisher_batch_settings] end diff --git a/google-cloud-pubsub/samples/pubsub_publisher_concurrency_control.rb b/google-cloud-pubsub/samples/pubsub_publisher_concurrency_control.rb index 95523a901da8..85cd5009a7d7 100644 --- a/google-cloud-pubsub/samples/pubsub_publisher_concurrency_control.rb +++ b/google-cloud-pubsub/samples/pubsub_publisher_concurrency_control.rb @@ -18,9 +18,9 @@ def publish_messages_async_with_concurrency_control topic_id: # [START pubsub_publisher_concurrency_control] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id, async: { + publisher = pubsub.publisher topic_id, async: { threads: { # Use exactly one thread for publishing message and exactly one thread # for executing callbacks @@ -28,12 +28,12 @@ def publish_messages_async_with_concurrency_control topic_id: callback: 1 } } - topic.publish_async "This is a test message." do |result| + publisher.publish_async "This is a test message." do |result| raise "Failed to publish the message." unless result.succeeded? puts "Message published asynchronously." end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop.wait! + publisher.async_publisher.stop.wait! # [END pubsub_publisher_concurrency_control] end diff --git a/google-cloud-pubsub/samples/pubsub_publisher_flow_control.rb b/google-cloud-pubsub/samples/pubsub_publisher_flow_control.rb index ba1c16679541..2fdb846b06b0 100644 --- a/google-cloud-pubsub/samples/pubsub_publisher_flow_control.rb +++ b/google-cloud-pubsub/samples/pubsub_publisher_flow_control.rb @@ -18,9 +18,9 @@ def publish_messages_async_with_flow_control topic_id: # [START pubsub_publisher_flow_control] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id, async: { + publisher = pubsub.publisher topic_id, async: { # Configure how many messages the publisher client can hold in memory # and what to do when messages exceed the limit. flow_control: { @@ -33,13 +33,13 @@ def publish_messages_async_with_flow_control topic_id: } # Rapidly publishing 1000 messages in a loop may be constrained by flow control. 1000.times do |i| - topic.publish_async "message #{i}" do |result| + publisher.publish_async "message #{i}" do |result| raise "Failed to publish the message." unless result.succeeded? end end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop.wait! + publisher.async_publisher.stop.wait! puts "Published messages with flow control settings to #{topic_id}." # [END pubsub_publisher_flow_control] end diff --git a/google-cloud-pubsub/samples/pubsub_publisher_with_compression.rb b/google-cloud-pubsub/samples/pubsub_publisher_with_compression.rb index 1e4bf926a75c..11c4ef72e254 100644 --- a/google-cloud-pubsub/samples/pubsub_publisher_with_compression.rb +++ b/google-cloud-pubsub/samples/pubsub_publisher_with_compression.rb @@ -12,38 +12,36 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START pubsub_publisher_with_compression] require "google/cloud/pubsub" ## # Shows how to create a BigQuery subscription where messages published # to a topic populates a BigQuery table. # -# @param project_id [String] -# Your Google Cloud project (e.g. "my-project") -# @param topic_id [String] -# Your topic name (e.g. "my-secret") -# def pubsub_publisher_with_compression project_id:, topic_id: - pubsub = Google::Cloud::Pubsub.new project_id: project_id + # [START pubsub_publisher_with_compression] + # project_id = "your-project-id" + # topic_id = "your-topic-id" + + pubsub = Google::Cloud::PubSub.new project_id: project_id # Enable compression and configure the compression threshold to 10 bytes (default to 240 B). # Publish requests of sizes > 10 B (excluding the request headers) will get compressed. - topic = pubsub.topic topic_id, async: { + publisher = pubsub.publisher topic_id, async: { compress: true, compression_bytes_threshold: 10 } begin - topic.publish_async "This is a test message." do |result| + publisher.publish_async "This is a test message." do |result| raise "Failed to publish the message." unless result.succeeded? puts "Published a compressed message of message ID: #{result.message_id}" end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop.wait! + publisher.async_publisher.stop.wait! rescue StandardError => e puts "Received error while publishing: #{e.message}" end + # [END pubsub_publisher_with_compression] end -# [END pubsub_publisher_with_compression] diff --git a/google-cloud-pubsub/samples/pubsub_quickstart_publisher.rb b/google-cloud-pubsub/samples/pubsub_quickstart_publisher.rb index 1b67d2fdfca0..236473f7eb61 100644 --- a/google-cloud-pubsub/samples/pubsub_quickstart_publisher.rb +++ b/google-cloud-pubsub/samples/pubsub_quickstart_publisher.rb @@ -18,10 +18,11 @@ def publish_message topic_id: # [START pubsub_quickstart_publisher] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - topic.publish "This is a test message." + publisher = pubsub.publisher topic_id + + publisher.publish "This is a test message." puts "Message published." # [END pubsub_quickstart_publisher] diff --git a/google-cloud-pubsub/samples/pubsub_resume_publish_with_ordering_keys.rb b/google-cloud-pubsub/samples/pubsub_resume_publish_with_ordering_keys.rb index e2d8844aa033..c20debcfc97b 100644 --- a/google-cloud-pubsub/samples/pubsub_resume_publish_with_ordering_keys.rb +++ b/google-cloud-pubsub/samples/pubsub_resume_publish_with_ordering_keys.rb @@ -18,30 +18,30 @@ def publish_resume_publish topic_id: # [START pubsub_resume_publish_with_ordering_keys] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new # Start sending messages in one request once the size of all queued messages # reaches 1 MB or the number of queued messages reaches 20 - topic = pubsub.topic topic_id, async: { + publisher = pubsub.publisher topic_id, async: { max_bytes: 1_000_000, max_messages: 20 } - topic.enable_message_ordering! + publisher.enable_message_ordering! 10.times do |i| - topic.publish_async "This is message ##{i}.", - ordering_key: "ordering-key" do |result| + publisher.publish_async "This is message ##{i}.", + ordering_key: "ordering-key" do |result| if result.succeeded? puts "Message ##{i} successfully published." else puts "Message ##{i} failed to publish" # Allow publishing to continue on "ordering-key" after processing the # failure. - topic.resume_publish "ordering-key" + publisher.resume_publish "ordering-key" end end end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop! + publisher.async_publisher.stop! # [END pubsub_resume_publish_with_ordering_keys] end diff --git a/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb b/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb index 783b34d27069..e935369689c6 100644 --- a/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb @@ -17,14 +17,18 @@ def set_subscription_policy subscription_id:, role:, service_account_email: # [START pubsub_set_subscription_policy] # subscription_id = "your-subscription-id" - # role = "roles/pubsub.publisher" + # role = "roles/pubsub.subscriber" # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscription.policy do |policy| - policy.add role, service_account_email - end + subscription_admin = pubsub.subscription_admin + + bindings = Google::Iam::V1::Binding.new role: role, members: [service_account_email] + + pubsub.iam.set_iam_policy resource: pubsub.subscription_path(subscription_id), + policy: { + bindings: [bindings] + } # [END pubsub_set_subscription_policy] end diff --git a/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb b/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb index 1c7ace249ca3..3e0648ae7879 100644 --- a/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb @@ -20,11 +20,15 @@ def set_topic_policy topic_id:, role:, service_account_email: # role = "roles/pubsub.publisher" # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - topic.policy do |policy| - policy.add role, service_account_email - end + topic_admin = pubsub.topic_admin + + bindings = Google::Iam::V1::Binding.new role: role, members: [service_account_email] + + pubsub.iam.set_iam_policy resource: pubsub.topic_path(topic_id), + policy: { + bindings: [bindings] + } # [END pubsub_set_topic_policy] end diff --git a/google-cloud-pubsub/samples/pubsub_subscribe_avro_records.rb b/google-cloud-pubsub/samples/pubsub_subscribe_avro_records.rb index ffa5942d1634..c13392fa5ccd 100644 --- a/google-cloud-pubsub/samples/pubsub_subscribe_avro_records.rb +++ b/google-cloud-pubsub/samples/pubsub_subscribe_avro_records.rb @@ -19,11 +19,11 @@ def subscribe_avro_records subscription_id:, avsc_file: # subscription_id = "your-subscription-id" # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id + subscriber = pubsub.subscriber subscription_id - subscriber = subscription.listen do |received_message| + listener = subscriber.listen do |received_message| encoding = received_message.attributes["googclient_schemaencoding"] case encoding when "BINARY" @@ -44,10 +44,10 @@ def subscribe_avro_records subscription_id:, avsc_file: received_message.acknowledge! end - subscriber.start + listener.start # Let the main thread sleep for 60 seconds so the thread for listening # messages does not quit sleep 60 - subscriber.stop.wait! + listener.stop.wait! # [END pubsub_subscribe_avro_records] end diff --git a/google-cloud-pubsub/samples/pubsub_subscribe_proto_messages.rb b/google-cloud-pubsub/samples/pubsub_subscribe_proto_messages.rb index 31df60fdaaf0..70ad55c24f6a 100644 --- a/google-cloud-pubsub/samples/pubsub_subscribe_proto_messages.rb +++ b/google-cloud-pubsub/samples/pubsub_subscribe_proto_messages.rb @@ -19,11 +19,10 @@ def subscribe_proto_messages subscription_id: # [START pubsub_subscribe_proto_messages] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - - subscriber = subscription.listen do |received_message| + subscriber = pubsub.subscriber subscription_id + listener = subscriber.listen do |received_message| encoding = received_message.attributes["googclient_schemaencoding"] case encoding when "BINARY" @@ -39,10 +38,10 @@ def subscribe_proto_messages subscription_id: received_message.acknowledge! end - subscriber.start + listener.start # Let the main thread sleep for 60 seconds so the thread for listening # messages does not quit sleep 60 - subscriber.stop.wait! + listener.stop.wait! # [END pubsub_subscribe_proto_messages] end diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_async_pull.rb b/google-cloud-pubsub/samples/pubsub_subscriber_async_pull.rb index 033f7d8daf3e..ad7d691400ad 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_async_pull.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_async_pull.rb @@ -19,19 +19,20 @@ def listen_for_messages subscription_id: # [START pubsub_quickstart_subscriber] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscriber = subscription.listen do |received_message| + subscriber = pubsub.subscriber subscription_id + + listener = subscriber.listen do |received_message| puts "Received message: #{received_message.data}" received_message.acknowledge! end - subscriber.start + listener.start # Let the main thread sleep for 60 seconds so the thread for listening # messages does not quit sleep 60 - subscriber.stop.wait! + listener.stop.wait! # [END pubsub_subscriber_async_pull] # [END pubsub_quickstart_subscriber] end diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_async_pull_custom_attributes.rb b/google-cloud-pubsub/samples/pubsub_subscriber_async_pull_custom_attributes.rb index fb7c690b796e..6d9a7f6fc73f 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_async_pull_custom_attributes.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_async_pull_custom_attributes.rb @@ -18,10 +18,11 @@ def listen_for_messages_with_custom_attributes subscription_id: # [START pubsub_subscriber_async_pull_custom_attributes] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscriber = subscription.listen do |received_message| + subscriber = pubsub.subscriber subscription_id + + listener = subscriber.listen do |received_message| puts "Received message: #{received_message.data}" unless received_message.attributes.empty? puts "Attributes:" @@ -32,10 +33,10 @@ def listen_for_messages_with_custom_attributes subscription_id: received_message.acknowledge! end - subscriber.start + listener.start # Let the main thread sleep for 60 seconds so the thread for listening # messages does not quit sleep 60 - subscriber.stop.wait! + listener.stop.wait! # [END pubsub_subscriber_async_pull_custom_attributes] end diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_concurrency_control.rb b/google-cloud-pubsub/samples/pubsub_subscriber_concurrency_control.rb index 291b623384fe..dc377a113cf5 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_concurrency_control.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_concurrency_control.rb @@ -18,12 +18,13 @@ def listen_for_messages_with_concurrency_control subscription_id: # [START pubsub_subscriber_concurrency_control] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new + + subscriber = pubsub.subscriber subscription_id - subscription = pubsub.subscription subscription_id # Use 2 threads for streaming, 4 threads for executing callbacks and 2 threads # for sending acknowledgements and/or delays - subscriber = subscription.listen streams: 2, threads: { + listener = subscriber.listen streams: 2, threads: { callback: 4, push: 2 } do |received_message| @@ -31,10 +32,10 @@ def listen_for_messages_with_concurrency_control subscription_id: received_message.acknowledge! end - subscriber.start + listener.start # Let the main thread sleep for 60 seconds so the thread for listening # messages does not quit sleep 60 - subscriber.stop.wait! + listener.stop.wait! # [END pubsub_subscriber_concurrency_control] end diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb b/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb index fbd236c6b95f..49b39bf7a84a 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb @@ -18,7 +18,7 @@ def listen_for_messages_with_error_handler subscription_id: # [START pubsub_subscriber_error_listener] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new subscription = pubsub.subscription subscription_id subscriber = subscription.listen do |received_message| diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb b/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb index b3b52edd5448..215ebbc73cc2 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb @@ -12,44 +12,28 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START pubsub_subscriber_exactly_once] require "google/cloud/pubsub" -# Shows how to register callback to acknowledge method and access the result passed in -class PubsubSubscriberExactlyOnceDelivery - def subscriber_exactly_once_delivery project_id:, topic_id:, subscription_id: - pubsub = Google::Cloud::Pubsub.new project_id: project_id - topic = pubsub.topic topic_id - subscription = pubsub.subscription subscription_id - subscriber = subscription.listen do |received_message| - puts "Received message: #{received_message.data}" +def subscriber_exactly_once_delivery project_id:, subscription_id: + # [START pubsub_subscriber_exactly_once] + # project_id = "your-project-id" + # subscription_id = "your-subscription-id" + pubsub = Google::Cloud::PubSub.new project_id: project_id + subscriber = pubsub.subscriber subscription_id + listener = subscriber.listen do |received_message| + puts "Received message: #{received_message.data}" - # Pass in callback to access the acknowledge result. - # For subscription with Exactly once delivery disabled the result will be success always. - received_message.acknowledge! do |result| - puts "Acknowledge result's status: #{result.status}" - end + # Pass in callback to access the acknowledge result. + # For subscription with Exactly once delivery disabled the result will be success always. + received_message.acknowledge! do |result| + puts "Acknowledge result's status: #{result.status}" end - - subscriber.start - # Let the main thread sleep for 60 seconds so the thread for listening - # messages does not quit - sleep 60 - subscriber.stop.wait! - end - - def self.run - # TODO(developer): Replace these variables before running the sample. - project_id = "your-project-id" - topic_id = "your-topic-id" - subscription_id = "id-for-new-subcription" # subscription with exactly once delivery enabled - PubsubSubscriberExactlyOnceDelivery.new.subscriber_exactly_once_delivery project_id: project_id, - topic_id: topic_id, - subscription_id: subscription_id end -end -if $PROGRAM_NAME == __FILE__ - PubsubSubscriberExactlyOnceDelivery.run + listener.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + listener.stop.wait! + # [END pubsub_subscriber_exactly_once] end -# [END pubsub_subscriber_exactly_once] diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_flow_settings.rb b/google-cloud-pubsub/samples/pubsub_subscriber_flow_settings.rb index cd2196280a52..ea4461e9ce5e 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_flow_settings.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_flow_settings.rb @@ -18,18 +18,19 @@ def listen_for_messages_with_flow_control subscription_id: # [START pubsub_subscriber_flow_settings] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscriber = subscription.listen inventory: 10 do |received_message| + subscriber = pubsub.subscriber subscription_id + + listener = subscriber.listen inventory: 10 do |received_message| puts "Received message: #{received_message.data}" received_message.acknowledge! end - subscriber.start + listener.start # Let the main thread sleep for 60 seconds so the thread for listening # messages does not quit sleep 60 - subscriber.stop.wait! + listener.stop.wait! # [END pubsub_subscriber_flow_settings] end diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull.rb b/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull.rb index 536212af9b6b..7cf94a80462e 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull.rb @@ -18,10 +18,11 @@ def pull_messages subscription_id: # [START pubsub_subscriber_sync_pull] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscription.pull(immediate: false).each do |message| + subscriber = pubsub.subscriber subscription_id + + subscriber.pull(immediate: false).each do |message| puts "Message pulled: #{message.data}" message.acknowledge! end diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull_with_lease.rb b/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull_with_lease.rb index bb2861b2074a..558c11ab6f72 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull_with_lease.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull_with_lease.rb @@ -18,14 +18,15 @@ def subscriber_sync_pull_with_lease subscription_id: # [START pubsub_subscriber_sync_pull_with_lease] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new + + subscriber = pubsub.subscriber subscription_id - subscription = pubsub.subscription subscription_id new_ack_deadline = 30 processed = false # The subscriber pulls a specified number of messages. - received_messages = subscription.pull immediate: false, max: 1 + received_messages = subscriber.pull immediate: false, max: 1 # Obtain the first message. message = received_messages.first diff --git a/google-cloud-pubsub/samples/pubsub_test_subscription_permissions.rb b/google-cloud-pubsub/samples/pubsub_test_subscription_permissions.rb index 77a26a6f3480..ce07816a680c 100644 --- a/google-cloud-pubsub/samples/pubsub_test_subscription_permissions.rb +++ b/google-cloud-pubsub/samples/pubsub_test_subscription_permissions.rb @@ -18,13 +18,16 @@ def test_subscription_permissions subscription_id: # [START pubsub_test_subscription_permissions] # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - permissions = subscription.test_permissions "pubsub.subscriptions.consume", - "pubsub.subscriptions.update" + subscription_admin = pubsub.subscription_admin - puts "Permission to consume" if permissions.include? "pubsub.subscriptions.consume" - puts "Permission to update" if permissions.include? "pubsub.subscriptions.update" + permissions = ["pubsub.subscriptions.consume", "pubsub.subscriptions.update"] + + response = pubsub.iam.test_iam_permissions resource: pubsub.subscription_path(subscription_id), + permissions: permissions + + puts "Permission to consume" if response.permissions.include? "pubsub.subscriptions.consume" + puts "Permission to update" if response.permissions.include? "pubsub.subscriptions.update" # [END pubsub_test_subscription_permissions] end diff --git a/google-cloud-pubsub/samples/pubsub_test_topic_permissions.rb b/google-cloud-pubsub/samples/pubsub_test_topic_permissions.rb index a817edafdd24..b7d204a862f3 100644 --- a/google-cloud-pubsub/samples/pubsub_test_topic_permissions.rb +++ b/google-cloud-pubsub/samples/pubsub_test_topic_permissions.rb @@ -18,14 +18,17 @@ def test_topic_permissions topic_id: # [START pubsub_test_topic_permissions] # topic_id = "your-topic-id" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id - permissions = topic.test_permissions "pubsub.topics.attachSubscription", - "pubsub.topics.publish", "pubsub.topics.update" + topic_admin = pubsub.topic_admin + + permissions = ["pubsub.topics.attachSubscription", "pubsub.topics.publish", "pubsub.topics.update"] + + response = pubsub.iam.test_iam_permissions resource: pubsub.topic_path(topic_id), + permissions: permissions puts "Permission to attach subscription" if permissions.include? "pubsub.topics.attachSubscription" - puts "Permission to publish" if permissions.include? "pubsub.topics.publish" - puts "Permission to update" if permissions.include? "pubsub.topics.update" + puts "Permission to publish" if response.permissions.include? "pubsub.topics.publish" + puts "Permission to update" if response.permissions.include? "pubsub.topics.update" # [END pubsub_test_topic_permissions] end diff --git a/google-cloud-pubsub/samples/pubsub_update_push_configuration.rb b/google-cloud-pubsub/samples/pubsub_update_push_configuration.rb index 7f26e98df0d7..2e2f68674a80 100644 --- a/google-cloud-pubsub/samples/pubsub_update_push_configuration.rb +++ b/google-cloud-pubsub/samples/pubsub_update_push_configuration.rb @@ -19,10 +19,20 @@ def update_push_configuration subscription_id:, new_endpoint: # subscription_id = "your-subscription-id" # new_endpoint = "Endpoint where your app receives messages"" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscription.endpoint = new_endpoint + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.get_subscription \ + subscription: pubsub.subscription_path(subscription_id) + + subscription.push_config = Google::Cloud::PubSub::V1::PushConfig.new \ + push_endpoint: new_endpoint + + subscription_admin.update_subscription subscription: subscription, + update_mask: { + paths: ["push_config"] + } puts "Push endpoint updated." # [END pubsub_update_push_configuration] diff --git a/google-cloud-pubsub/samples/quickstart.rb b/google-cloud-pubsub/samples/quickstart.rb index 365fe57c29e3..ed7c03af5217 100644 --- a/google-cloud-pubsub/samples/quickstart.rb +++ b/google-cloud-pubsub/samples/quickstart.rb @@ -20,13 +20,14 @@ def quickstart topic_id: # [END require_library] # Instantiates a client - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::PubSub.new + topic_admin = pubsub.topic_admin # The name for the new topic # topic_id = "your-topic-id" # Creates the new topic - topic = pubsub.create_topic topic_id + topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) puts "Topic #{topic.name} created." # [END pubsub_quickstart_create_topic] From d8d1601e6283373b8371f2f009dcd6a575d7c70d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:07:31 -0700 Subject: [PATCH 286/457] feat: add Idempotency to Cloud Bigtable MutateRowsRequest API (#30709) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs: Sync generated comments from the API Protos PiperOrigin-RevId: 785555034 Source-Link: https://github.com/googleapis/googleapis/commit/5feffd940877775c76330c4e37cc139979fccd72 Source-Link: https://github.com/googleapis/googleapis-gen/commit/460384882245fea96d07448c53114823d75f380a Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiI0NjAzODQ4ODIyNDVmZWE5NmQwNzQ0OGM1MzExNDgyM2Q3NWYzODBhIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md docs: Minor comment update for field `idempotency` in message `.google.bigtable.v2.MutateRowRequest` PiperOrigin-RevId: 785585326 Source-Link: https://github.com/googleapis/googleapis/commit/0da61b4af3b87dd71dd557457b5099e23154b297 Source-Link: https://github.com/googleapis/googleapis-gen/commit/58e001cdd148c15e8f72e7954c308ba61eeaf8cd Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiI1OGUwMDFjZGQxNDhjMTVlOGY3MmU3OTU0YzMwOGJhNjFlZWFmOGNkIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/bigtable/v2/bigtable_pb.rb | 2 +- .../bigtable/v2/bigtable_services_pb.rb | 4 +- .../cloud/bigtable/v2/bigtable/client.rb | 17 +++-- .../proto_docs/google/bigtable/v2/bigtable.rb | 75 +++++++++---------- .../proto_docs/google/bigtable/v2/data.rb | 1 + .../google/bigtable/v2/request_stats.rb | 3 +- .../google/bigtable/v2/response_params.rb | 3 - 7 files changed, 48 insertions(+), 57 deletions(-) diff --git a/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb b/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb index 25a8afa99aa1..ad08f5d9caf1 100644 --- a/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb +++ b/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb @@ -18,7 +18,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n!google/bigtable/v2/bigtable.proto\x12\x12google.bigtable.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1dgoogle/bigtable/v2/data.proto\x1a&google/bigtable/v2/request_stats.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xcc\x04\n\x0fReadRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x0b \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x05 \x01(\t\x12(\n\x04rows\x18\x02 \x01(\x0b\x32\x1a.google.bigtable.v2.RowSet\x12-\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x12\n\nrows_limit\x18\x04 \x01(\x03\x12P\n\x12request_stats_view\x18\x06 \x01(\x0e\x32\x34.google.bigtable.v2.ReadRowsRequest.RequestStatsView\x12\x10\n\x08reversed\x18\x07 \x01(\x08\"f\n\x10RequestStatsView\x12\"\n\x1eREQUEST_STATS_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12REQUEST_STATS_NONE\x10\x01\x12\x16\n\x12REQUEST_STATS_FULL\x10\x02\"\xb1\x03\n\x10ReadRowsResponse\x12>\n\x06\x63hunks\x18\x01 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12\x1c\n\x14last_scanned_row_key\x18\x02 \x01(\x0c\x12\x37\n\rrequest_stats\x18\x03 \x01(\x0b\x32 .google.bigtable.v2.RequestStats\x1a\x85\x02\n\tCellChunk\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x31\n\x0b\x66\x61mily_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12.\n\tqualifier\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\x0e\n\x06labels\x18\x05 \x03(\t\x12\r\n\x05value\x18\x06 \x01(\x0c\x12\x12\n\nvalue_size\x18\x07 \x01(\x05\x12\x13\n\treset_row\x18\x08 \x01(\x08H\x00\x12\x14\n\ncommit_row\x18\t \x01(\x08H\x00\x42\x0c\n\nrow_status\"\x98\x02\n\x14SampleRowKeysRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x05 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\">\n\x15SampleRowKeysResponse\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\"\xbf\x02\n\x10MutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x34\n\tmutations\x18\x03 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x08 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\x13\n\x11MutateRowResponse\"\xd1\x02\n\x11MutateRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x03 \x01(\t\x12\x41\n\x07\x65ntries\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.MutateRowsRequest.EntryB\x03\xe0\x41\x02\x1aN\n\x05\x45ntry\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x34\n\tmutations\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\"\xe4\x01\n\x12MutateRowsResponse\x12=\n\x07\x65ntries\x18\x01 \x03(\x0b\x32,.google.bigtable.v2.MutateRowsResponse.Entry\x12?\n\x0frate_limit_info\x18\x03 \x01(\x0b\x32!.google.bigtable.v2.RateLimitInfoH\x00\x88\x01\x01\x1a:\n\x05\x45ntry\x12\r\n\x05index\x18\x01 \x01(\x03\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x12\n\x10_rate_limit_info\"J\n\rRateLimitInfo\x12)\n\x06period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\x01\"\x81\x03\n\x18\x43heckAndMutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x07 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x37\n\x10predicate_filter\x18\x06 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x34\n\x0etrue_mutations\x18\x04 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\x12\x35\n\x0f\x66\x61lse_mutations\x18\x05 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\"6\n\x19\x43heckAndMutateRowResponse\x12\x19\n\x11predicate_matched\x18\x01 \x01(\x08\"i\n\x12PingAndWarmRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"\x15\n\x13PingAndWarmResponse\"\x99\x02\n\x19ReadModifyWriteRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12;\n\x05rules\x18\x03 \x03(\x0b\x32\'.google.bigtable.v2.ReadModifyWriteRuleB\x03\xe0\x41\x02\"B\n\x1aReadModifyWriteRowResponse\x12$\n\x03row\x18\x01 \x01(\x0b\x32\x17.google.bigtable.v2.Row\"\x86\x01\n,GenerateInitialChangeStreamPartitionsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"g\n-GenerateInitialChangeStreamPartitionsResponse\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\"\x9b\x03\n\x17ReadChangeStreamRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\x12\x36\n\tpartition\x18\x03 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\x30\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12K\n\x13\x63ontinuation_tokens\x18\x06 \x01(\x0b\x32,.google.bigtable.v2.StreamContinuationTokensH\x00\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12heartbeat_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\n\nstart_from\"\xa9\n\n\x18ReadChangeStreamResponse\x12N\n\x0b\x64\x61ta_change\x18\x01 \x01(\x0b\x32\x37.google.bigtable.v2.ReadChangeStreamResponse.DataChangeH\x00\x12K\n\theartbeat\x18\x02 \x01(\x0b\x32\x36.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatH\x00\x12P\n\x0c\x63lose_stream\x18\x03 \x01(\x0b\x32\x38.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamH\x00\x1a\xf4\x01\n\rMutationChunk\x12X\n\nchunk_info\x18\x01 \x01(\x0b\x32\x44.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\x12.\n\x08mutation\x18\x02 \x01(\x0b\x32\x1c.google.bigtable.v2.Mutation\x1aY\n\tChunkInfo\x12\x1a\n\x12\x63hunked_value_size\x18\x01 \x01(\x05\x12\x1c\n\x14\x63hunked_value_offset\x18\x02 \x01(\x05\x12\x12\n\nlast_chunk\x18\x03 \x01(\x08\x1a\xc6\x03\n\nDataChange\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\x12\x19\n\x11source_cluster_id\x18\x02 \x01(\t\x12\x0f\n\x07row_key\x18\x03 \x01(\x0c\x12\x34\n\x10\x63ommit_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntiebreaker\x18\x05 \x01(\x05\x12J\n\x06\x63hunks\x18\x06 \x03(\x0b\x32:.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\r\n\x05token\x18\t \x01(\t\x12;\n\x17\x65stimated_low_watermark\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x16\n\x12GARBAGE_COLLECTION\x10\x02\x12\x10\n\x0c\x43ONTINUATION\x10\x03\x1a\x91\x01\n\tHeartbeat\x12G\n\x12\x63ontinuation_token\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x17\x65stimated_low_watermark\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb8\x01\n\x0b\x43loseStream\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x13\x63ontinuation_tokens\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x0enew_partitions\x18\x03 \x03(\x0b\x32#.google.bigtable.v2.StreamPartitionB\x0f\n\rstream_record\"\xa1\x03\n\x13\x45xecuteQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x05query\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\x0eprepared_query\x18\t \x01(\x0c\x12;\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatB\x02\x18\x01H\x00\x12\x19\n\x0cresume_token\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x06params\x18\x07 \x03(\x0b\x32\x33.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\x03\xe0\x41\x02\x1aH\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x96\x01\n\x14\x45xecuteQueryResponse\x12\x39\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadataH\x00\x12\x37\n\x07results\x18\x02 \x01(\x0b\x32$.google.bigtable.v2.PartialResultSetH\x00\x42\n\n\x08response\"\xf4\x02\n\x13PrepareQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatH\x00\x12Q\n\x0bparam_types\x18\x06 \x03(\x0b\x32\x37.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\x03\xe0\x41\x02\x1aK\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x98\x01\n\x14PrepareQueryResponse\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadata\x12\x16\n\x0eprepared_query\x18\x02 \x01(\x0c\x12/\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xc9&\n\x08\x42igtable\x12\xdb\x03\n\x08ReadRows\x12#.google.bigtable.v2.ReadRowsRequest\x1a$.google.bigtable.v2.ReadRowsResponse\"\x81\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9a\x01\"9/v2/{table_name=projects/*/instances/*/tables/*}:readRows:\x01*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xee\x03\n\rSampleRowKeys\x12(.google.bigtable.v2.SampleRowKeysRequest\x1a).google.bigtable.v2.SampleRowKeysResponse\"\x85\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\x12>/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\x12Z/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\x82\x04\n\tMutateRow\x12$.google.bigtable.v2.MutateRowRequest\x1a%.google.bigtable.v2.MutateRowResponse\"\xa7\x03\xda\x41\x1ctable_name,row_key,mutations\xda\x41+table_name,row_key,mutations,app_profile_id\x82\xd3\xe4\x93\x02\x9c\x01\":/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow:\x01*Z[\"V/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xf5\x03\n\nMutateRows\x12%.google.bigtable.v2.MutateRowsRequest\x1a&.google.bigtable.v2.MutateRowsResponse\"\x95\x03\xda\x41\x12table_name,entries\xda\x41!table_name,entries,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\";/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows:\x01*Z\\\"W/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xf6\x04\n\x11\x43heckAndMutateRow\x12,.google.bigtable.v2.CheckAndMutateRowRequest\x1a-.google.bigtable.v2.CheckAndMutateRowResponse\"\x83\x04\xda\x41\x42table_name,row_key,predicate_filter,true_mutations,false_mutations\xda\x41Qtable_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id\x82\xd3\xe4\x93\x02\xac\x01\"B/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\x01*Zc\"^/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xee\x01\n\x0bPingAndWarm\x12&.google.bigtable.v2.PingAndWarmRequest\x1a\'.google.bigtable.v2.PingAndWarmResponse\"\x8d\x01\xda\x41\x04name\xda\x41\x13name,app_profile_id\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/instances/*}:ping:\x01*\x8a\xd3\xe4\x93\x02\x39\x12%\n\x04name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xa7\x04\n\x12ReadModifyWriteRow\x12-.google.bigtable.v2.ReadModifyWriteRowRequest\x1a..google.bigtable.v2.ReadModifyWriteRowResponse\"\xb1\x03\xda\x41\x18table_name,row_key,rules\xda\x41\'table_name,row_key,rules,app_profile_id\x82\xd3\xe4\x93\x02\xae\x01\"C/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow:\x01*Zd\"_/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xbb\x02\n%GenerateInitialChangeStreamPartitions\x12@.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest\x1a\x41.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\x8a\x01\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02[\"V/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions:\x01*0\x01\x12\xe6\x01\n\x10ReadChangeStream\x12+.google.bigtable.v2.ReadChangeStreamRequest\x1a,.google.bigtable.v2.ReadChangeStreamResponse\"u\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x46\"A/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream:\x01*0\x01\x12\xa9\x02\n\x0cPrepareQuery\x12\'.google.bigtable.v2.PrepareQueryRequest\x1a(.google.bigtable.v2.PrepareQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:prepareQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xab\x02\n\x0c\x45xecuteQuery\x12\'.google.bigtable.v2.ExecuteQueryRequest\x1a(.google.bigtable.v2.ExecuteQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id0\x01\x1a\xdb\x02\xca\x41\x17\x62igtable.googleapis.com\xd2\x41\xbd\x02https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf5\x04\n\x16\x63om.google.bigtable.v2B\rBigtableProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\xea\x41\x87\x01\n+bigtableadmin.googleapis.com/AuthorizedView\x12Xprojects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}\xea\x41~\n-bigtableadmin.googleapis.com/MaterializedView\x12Mprojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\x06proto3" +descriptor_data = "\n!google/bigtable/v2/bigtable.proto\x12\x12google.bigtable.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1dgoogle/bigtable/v2/data.proto\x1a&google/bigtable/v2/request_stats.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xcc\x04\n\x0fReadRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x0b \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x05 \x01(\t\x12(\n\x04rows\x18\x02 \x01(\x0b\x32\x1a.google.bigtable.v2.RowSet\x12-\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x12\n\nrows_limit\x18\x04 \x01(\x03\x12P\n\x12request_stats_view\x18\x06 \x01(\x0e\x32\x34.google.bigtable.v2.ReadRowsRequest.RequestStatsView\x12\x10\n\x08reversed\x18\x07 \x01(\x08\"f\n\x10RequestStatsView\x12\"\n\x1eREQUEST_STATS_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12REQUEST_STATS_NONE\x10\x01\x12\x16\n\x12REQUEST_STATS_FULL\x10\x02\"\xb1\x03\n\x10ReadRowsResponse\x12>\n\x06\x63hunks\x18\x01 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12\x1c\n\x14last_scanned_row_key\x18\x02 \x01(\x0c\x12\x37\n\rrequest_stats\x18\x03 \x01(\x0b\x32 .google.bigtable.v2.RequestStats\x1a\x85\x02\n\tCellChunk\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x31\n\x0b\x66\x61mily_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12.\n\tqualifier\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\x0e\n\x06labels\x18\x05 \x03(\t\x12\r\n\x05value\x18\x06 \x01(\x0c\x12\x12\n\nvalue_size\x18\x07 \x01(\x05\x12\x13\n\treset_row\x18\x08 \x01(\x08H\x00\x12\x14\n\ncommit_row\x18\t \x01(\x08H\x00\x42\x0c\n\nrow_status\"\x98\x02\n\x14SampleRowKeysRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x05 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\">\n\x15SampleRowKeysResponse\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\"\xbf\x02\n\x10MutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x34\n\tmutations\x18\x03 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x08 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\x13\n\x11MutateRowResponse\"\x88\x03\n\x11MutateRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x03 \x01(\t\x12\x41\n\x07\x65ntries\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.MutateRowsRequest.EntryB\x03\xe0\x41\x02\x1a\x84\x01\n\x05\x45ntry\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x34\n\tmutations\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x03 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\xe4\x01\n\x12MutateRowsResponse\x12=\n\x07\x65ntries\x18\x01 \x03(\x0b\x32,.google.bigtable.v2.MutateRowsResponse.Entry\x12?\n\x0frate_limit_info\x18\x03 \x01(\x0b\x32!.google.bigtable.v2.RateLimitInfoH\x00\x88\x01\x01\x1a:\n\x05\x45ntry\x12\r\n\x05index\x18\x01 \x01(\x03\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x12\n\x10_rate_limit_info\"J\n\rRateLimitInfo\x12)\n\x06period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\x01\"\x81\x03\n\x18\x43heckAndMutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x07 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x37\n\x10predicate_filter\x18\x06 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x34\n\x0etrue_mutations\x18\x04 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\x12\x35\n\x0f\x66\x61lse_mutations\x18\x05 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\"6\n\x19\x43heckAndMutateRowResponse\x12\x19\n\x11predicate_matched\x18\x01 \x01(\x08\"i\n\x12PingAndWarmRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"\x15\n\x13PingAndWarmResponse\"\x99\x02\n\x19ReadModifyWriteRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12;\n\x05rules\x18\x03 \x03(\x0b\x32\'.google.bigtable.v2.ReadModifyWriteRuleB\x03\xe0\x41\x02\"B\n\x1aReadModifyWriteRowResponse\x12$\n\x03row\x18\x01 \x01(\x0b\x32\x17.google.bigtable.v2.Row\"\x86\x01\n,GenerateInitialChangeStreamPartitionsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"g\n-GenerateInitialChangeStreamPartitionsResponse\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\"\x9b\x03\n\x17ReadChangeStreamRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\x12\x36\n\tpartition\x18\x03 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\x30\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12K\n\x13\x63ontinuation_tokens\x18\x06 \x01(\x0b\x32,.google.bigtable.v2.StreamContinuationTokensH\x00\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12heartbeat_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\n\nstart_from\"\xa9\n\n\x18ReadChangeStreamResponse\x12N\n\x0b\x64\x61ta_change\x18\x01 \x01(\x0b\x32\x37.google.bigtable.v2.ReadChangeStreamResponse.DataChangeH\x00\x12K\n\theartbeat\x18\x02 \x01(\x0b\x32\x36.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatH\x00\x12P\n\x0c\x63lose_stream\x18\x03 \x01(\x0b\x32\x38.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamH\x00\x1a\xf4\x01\n\rMutationChunk\x12X\n\nchunk_info\x18\x01 \x01(\x0b\x32\x44.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\x12.\n\x08mutation\x18\x02 \x01(\x0b\x32\x1c.google.bigtable.v2.Mutation\x1aY\n\tChunkInfo\x12\x1a\n\x12\x63hunked_value_size\x18\x01 \x01(\x05\x12\x1c\n\x14\x63hunked_value_offset\x18\x02 \x01(\x05\x12\x12\n\nlast_chunk\x18\x03 \x01(\x08\x1a\xc6\x03\n\nDataChange\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\x12\x19\n\x11source_cluster_id\x18\x02 \x01(\t\x12\x0f\n\x07row_key\x18\x03 \x01(\x0c\x12\x34\n\x10\x63ommit_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntiebreaker\x18\x05 \x01(\x05\x12J\n\x06\x63hunks\x18\x06 \x03(\x0b\x32:.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\r\n\x05token\x18\t \x01(\t\x12;\n\x17\x65stimated_low_watermark\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x16\n\x12GARBAGE_COLLECTION\x10\x02\x12\x10\n\x0c\x43ONTINUATION\x10\x03\x1a\x91\x01\n\tHeartbeat\x12G\n\x12\x63ontinuation_token\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x17\x65stimated_low_watermark\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb8\x01\n\x0b\x43loseStream\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x13\x63ontinuation_tokens\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x0enew_partitions\x18\x03 \x03(\x0b\x32#.google.bigtable.v2.StreamPartitionB\x0f\n\rstream_record\"\xa1\x03\n\x13\x45xecuteQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x05query\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\x0eprepared_query\x18\t \x01(\x0c\x12;\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatB\x02\x18\x01H\x00\x12\x19\n\x0cresume_token\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x06params\x18\x07 \x03(\x0b\x32\x33.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\x03\xe0\x41\x02\x1aH\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x96\x01\n\x14\x45xecuteQueryResponse\x12\x39\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadataH\x00\x12\x37\n\x07results\x18\x02 \x01(\x0b\x32$.google.bigtable.v2.PartialResultSetH\x00\x42\n\n\x08response\"\xf4\x02\n\x13PrepareQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatH\x00\x12Q\n\x0bparam_types\x18\x06 \x03(\x0b\x32\x37.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\x03\xe0\x41\x02\x1aK\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x98\x01\n\x14PrepareQueryResponse\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadata\x12\x16\n\x0eprepared_query\x18\x02 \x01(\x0c\x12/\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xc9&\n\x08\x42igtable\x12\xdb\x03\n\x08ReadRows\x12#.google.bigtable.v2.ReadRowsRequest\x1a$.google.bigtable.v2.ReadRowsResponse\"\x81\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9a\x01\"9/v2/{table_name=projects/*/instances/*/tables/*}:readRows:\x01*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xee\x03\n\rSampleRowKeys\x12(.google.bigtable.v2.SampleRowKeysRequest\x1a).google.bigtable.v2.SampleRowKeysResponse\"\x85\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\x12>/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\x12Z/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\x82\x04\n\tMutateRow\x12$.google.bigtable.v2.MutateRowRequest\x1a%.google.bigtable.v2.MutateRowResponse\"\xa7\x03\xda\x41\x1ctable_name,row_key,mutations\xda\x41+table_name,row_key,mutations,app_profile_id\x82\xd3\xe4\x93\x02\x9c\x01\":/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow:\x01*Z[\"V/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xf5\x03\n\nMutateRows\x12%.google.bigtable.v2.MutateRowsRequest\x1a&.google.bigtable.v2.MutateRowsResponse\"\x95\x03\xda\x41\x12table_name,entries\xda\x41!table_name,entries,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\";/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows:\x01*Z\\\"W/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xf6\x04\n\x11\x43heckAndMutateRow\x12,.google.bigtable.v2.CheckAndMutateRowRequest\x1a-.google.bigtable.v2.CheckAndMutateRowResponse\"\x83\x04\xda\x41\x42table_name,row_key,predicate_filter,true_mutations,false_mutations\xda\x41Qtable_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id\x82\xd3\xe4\x93\x02\xac\x01\"B/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\x01*Zc\"^/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xee\x01\n\x0bPingAndWarm\x12&.google.bigtable.v2.PingAndWarmRequest\x1a\'.google.bigtable.v2.PingAndWarmResponse\"\x8d\x01\xda\x41\x04name\xda\x41\x13name,app_profile_id\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/instances/*}:ping:\x01*\x8a\xd3\xe4\x93\x02\x39\x12%\n\x04name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xa7\x04\n\x12ReadModifyWriteRow\x12-.google.bigtable.v2.ReadModifyWriteRowRequest\x1a..google.bigtable.v2.ReadModifyWriteRowResponse\"\xb1\x03\xda\x41\x18table_name,row_key,rules\xda\x41\'table_name,row_key,rules,app_profile_id\x82\xd3\xe4\x93\x02\xae\x01\"C/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow:\x01*Zd\"_/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xbb\x02\n%GenerateInitialChangeStreamPartitions\x12@.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest\x1a\x41.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\x8a\x01\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02[\"V/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions:\x01*0\x01\x12\xe6\x01\n\x10ReadChangeStream\x12+.google.bigtable.v2.ReadChangeStreamRequest\x1a,.google.bigtable.v2.ReadChangeStreamResponse\"u\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x46\"A/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream:\x01*0\x01\x12\xa9\x02\n\x0cPrepareQuery\x12\'.google.bigtable.v2.PrepareQueryRequest\x1a(.google.bigtable.v2.PrepareQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:prepareQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xab\x02\n\x0c\x45xecuteQuery\x12\'.google.bigtable.v2.ExecuteQueryRequest\x1a(.google.bigtable.v2.ExecuteQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id0\x01\x1a\xdb\x02\xca\x41\x17\x62igtable.googleapis.com\xd2\x41\xbd\x02https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf5\x04\n\x16\x63om.google.bigtable.v2B\rBigtableProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\xea\x41\x87\x01\n+bigtableadmin.googleapis.com/AuthorizedView\x12Xprojects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}\xea\x41~\n-bigtableadmin.googleapis.com/MaterializedView\x12Mprojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb b/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb index c8d4db110773..a439e312ddcb 100644 --- a/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb +++ b/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb @@ -62,15 +62,15 @@ class Service # timestamp is the greater of the existing timestamp or the current server # time. The method returns the new contents of all modified cells. rpc :ReadModifyWriteRow, ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest, ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse - # NOTE: This API is intended to be used by Apache Beam BigtableIO. # Returns the current list of partitions that make up the table's # change stream. The union of partitions will cover the entire keyspace. # Partitions can be read with `ReadChangeStream`. + # NOTE: This API is only intended to be used by Apache Beam BigtableIO. rpc :GenerateInitialChangeStreamPartitions, ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest, stream(::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse) - # NOTE: This API is intended to be used by Apache Beam BigtableIO. # Reads changes from a table's change stream. Changes will # reflect both user-initiated mutations and mutations that are caused by # garbage collection. + # NOTE: This API is only intended to be used by Apache Beam BigtableIO. rpc :ReadChangeStream, ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest, stream(::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse) # Prepares a GoogleSQL query for execution on a particular Bigtable instance. rpc :PrepareQuery, ::Google::Cloud::Bigtable::V2::PrepareQueryRequest, ::Google::Cloud::Bigtable::V2::PrepareQueryResponse diff --git a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb index b80a38734529..8592e905a84a 100644 --- a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb +++ b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb @@ -504,8 +504,8 @@ def sample_row_keys request, options = nil # are applied in order, meaning that earlier mutations can be masked by later # ones. Must contain at least one entry and at most 100000. # @param idempotency [::Google::Cloud::Bigtable::V2::Idempotency, ::Hash] - # Optional parameter for ensuring a MutateRow request is only applied once. - # Currently applicable only for certain aggregate types. + # If set consistently across retries, prevents this mutation from being + # double applied to aggregate column families within a 15m window. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Bigtable::V2::MutateRowResponse] @@ -960,7 +960,8 @@ def ping_and_warm request, options = nil # @param rules [::Array<::Google::Cloud::Bigtable::V2::ReadModifyWriteRule, ::Hash>] # Required. Rules specifying how the specified row's contents are to be # transformed into writes. Entries are applied in order, meaning that earlier - # rules will affect the results of later ones. + # rules will affect the results of later ones. At least one entry must be + # specified, and there can be at most 100000 rules. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse] @@ -1035,10 +1036,10 @@ def read_modify_write_row request, options = nil end ## - # NOTE: This API is intended to be used by Apache Beam BigtableIO. # Returns the current list of partitions that make up the table's # change stream. The union of partitions will cover the entire keyspace. # Partitions can be read with `ReadChangeStream`. + # NOTE: This API is only intended to be used by Apache Beam BigtableIO. # # @overload generate_initial_change_stream_partitions(request, options = nil) # Pass arguments to `generate_initial_change_stream_partitions` via a request object, either of type @@ -1133,10 +1134,10 @@ def generate_initial_change_stream_partitions request, options = nil end ## - # NOTE: This API is intended to be used by Apache Beam BigtableIO. # Reads changes from a table's change stream. Changes will # reflect both user-initiated mutations and mutations that are caused by # garbage collection. + # NOTE: This API is only intended to be used by Apache Beam BigtableIO. # # @overload read_change_stream(request, options = nil) # Pass arguments to `read_change_stream` via a request object, either of type @@ -1177,10 +1178,10 @@ def generate_initial_change_stream_partitions request, options = nil # the position. Tokens are delivered on the stream as part of `Heartbeat` # and `CloseStream` messages. # - # If a single token is provided, the token’s partition must exactly match - # the request’s partition. If multiple tokens are provided, as in the case + # If a single token is provided, the token's partition must exactly match + # the request's partition. If multiple tokens are provided, as in the case # of a partition merge, the union of the token partitions must exactly - # cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + # cover the request's partition. Otherwise, INVALID_ARGUMENT will be # returned. # # Note: The following parameters are mutually exclusive: `continuation_tokens`, `start_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. diff --git a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb index af9776b73d12..cf1d8f8e541d 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb @@ -109,25 +109,11 @@ module RequestStatsView # key, allowing the client to skip that work on a retry. # @!attribute [rw] request_stats # @return [::Google::Cloud::Bigtable::V2::RequestStats] - # If requested, provide enhanced query performance statistics. The semantics - # dictate: - # * request_stats is empty on every (streamed) response, except - # * request_stats has non-empty information after all chunks have been - # streamed, where the ReadRowsResponse message only contains - # request_stats. - # * For example, if a read request would have returned an empty - # response instead a single ReadRowsResponse is streamed with empty - # chunks and request_stats filled. - # - # Visually, response messages will stream as follows: - # ... -> \\{chunks: [...]} -> \\{chunks: [], request_stats: \\{...}} - # \______________________/ \________________________________/ - # Primary response Trailer of RequestStats info - # - # Or if the read did not return any values: - # \\{chunks: [], request_stats: \\{...}} - # \________________________________/ - # Trailer of RequestStats info + # If requested, return enhanced query performance statistics. The field + # request_stats is empty in a streamed response unless the ReadRowsResponse + # message contains request_stats in the last message of the stream. Always + # returned when requested, even when the read request returns an empty + # response. class ReadRowsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -280,8 +266,8 @@ class SampleRowKeysResponse # ones. Must contain at least one entry and at most 100000. # @!attribute [rw] idempotency # @return [::Google::Cloud::Bigtable::V2::Idempotency] - # Optional parameter for ensuring a MutateRow request is only applied once. - # Currently applicable only for certain aggregate types. + # If set consistently across retries, prevents this mutation from being + # double applied to aggregate column families within a 15m window. class MutateRowRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -332,6 +318,10 @@ class MutateRowsRequest # Required. Changes to be atomically applied to the specified row. # Mutations are applied in order, meaning that earlier mutations can be # masked by later ones. You must specify at least one mutation. + # @!attribute [rw] idempotency + # @return [::Google::Cloud::Bigtable::V2::Idempotency] + # If set consistently across retries, prevents this mutation from being + # double applied to aggregate column families within a 15m window. class Entry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -385,7 +375,7 @@ class Entry # target load should be 80. After adjusting, the client should ignore # `factor` until another `period` has passed. # - # The client can measure its load using any unit that's comparable over time + # The client can measure its load using any unit that's comparable over time. # For example, QPS can be used as long as each request involves a similar # amount of work. class RateLimitInfo @@ -499,7 +489,8 @@ class PingAndWarmResponse # @return [::Array<::Google::Cloud::Bigtable::V2::ReadModifyWriteRule>] # Required. Rules specifying how the specified row's contents are to be # transformed into writes. Entries are applied in order, meaning that earlier - # rules will affect the results of later ones. + # rules will affect the results of later ones. At least one entry must be + # specified, and there can be at most 100000 rules. class ReadModifyWriteRowRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -573,10 +564,10 @@ class GenerateInitialChangeStreamPartitionsResponse # the position. Tokens are delivered on the stream as part of `Heartbeat` # and `CloseStream` messages. # - # If a single token is provided, the token’s partition must exactly match - # the request’s partition. If multiple tokens are provided, as in the case + # If a single token is provided, the token's partition must exactly match + # the request's partition. If multiple tokens are provided, as in the case # of a partition merge, the union of the token partitions must exactly - # cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + # cover the request's partition. Otherwise, INVALID_ARGUMENT will be # returned. # # Note: The following fields are mutually exclusive: `continuation_tokens`, `start_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. @@ -696,8 +687,8 @@ class ChunkInfo # An estimate of the commit timestamp that is usually lower than or equal # to any timestamp for a record that will be delivered in the future on the # stream. It is possible that, under particular circumstances that a future - # record has a timestamp is is lower than a previously seen timestamp. For - # an example usage see + # record has a timestamp that is lower than a previously seen timestamp. + # For an example usage see # https://beam.apache.org/documentation/basics/#watermarks class DataChange include ::Google::Protobuf::MessageExts @@ -731,8 +722,8 @@ module Type # An estimate of the commit timestamp that is usually lower than or equal # to any timestamp for a record that will be delivered in the future on the # stream. It is possible that, under particular circumstances that a future - # record has a timestamp is is lower than a previously seen timestamp. For - # an example usage see + # record has a timestamp that is lower than a previously seen timestamp. + # For an example usage see # https://beam.apache.org/documentation/basics/#watermarks class Heartbeat include ::Google::Protobuf::MessageExts @@ -745,17 +736,19 @@ class Heartbeat # If `continuation_tokens` & `new_partitions` are present, then a change in # partitioning requires the client to open a new stream for each token to # resume reading. Example: - # [B, D) ends - # | - # v - # new_partitions: [A, C) [C, E) - # continuation_tokens.partitions: [B,C) [C,D) - # ^---^ ^---^ - # ^ ^ - # | | - # | StreamContinuationToken 2 - # | - # StreamContinuationToken 1 + # + # [B, D) ends + # | + # v + # new_partitions: [A, C) [C, E) + # continuation_tokens.partitions: [B,C) [C,D) + # ^---^ ^---^ + # ^ ^ + # | | + # | StreamContinuationToken 2 + # | + # StreamContinuationToken 1 + # # To read the new partition [A,C), supply the continuation tokens whose # ranges cover the new partition, for example ContinuationToken[A,B) & # ContinuationToken[B,C). diff --git a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb index 2beda16a4f2f..00ae95b12cdf 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb @@ -148,6 +148,7 @@ class Cell # @!attribute [rw] float_value # @return [::Float] # Represents a typed value transported as a floating point number. + # Does not support NaN or infinities. # # Note: The following fields are mutually exclusive: `float_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] timestamp_value diff --git a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb index 3656c2756e8e..1c2a5a06c6ef 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb @@ -88,8 +88,7 @@ class FullReadStatsView # RequestStats is the container for additional information pertaining to a # single request, helpful for evaluating the performance of the sent request. - # Currently, there are the following supported methods: - # * google.bigtable.v2.ReadRows + # Currently, the following method is supported: google.bigtable.v2.ReadRows # @!attribute [rw] full_read_stats_view # @return [::Google::Cloud::Bigtable::V2::FullReadStatsView] # Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL diff --git a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb index af7f0a8833a6..8cae53a9825b 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb @@ -22,9 +22,6 @@ module Cloud module Bigtable module V2 # Response metadata proto - # This is an experimental feature that will be used to get zone_id and - # cluster_id from response trailers to tag the metrics. This should not be - # used by customers directly # @!attribute [rw] zone_id # @return [::String] # The cloud bigtable zone associated with the cluster. From 21bf8b946cfe0999b9bf13d28123723ad7029c2c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:08:23 -0700 Subject: [PATCH 287/457] feat: add Network Connectivity Center APIs for Internal Range service (#30707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 785376390 Source-Link: https://github.com/googleapis/googleapis/commit/deb6327efce102408fa665b99af3887b02b4b27c Source-Link: https://github.com/googleapis/googleapis-gen/commit/92fd30dba8913fba2f59887bfb1b787a8abeffb1 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfY29ubmVjdGl2aXR5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiI5MmZkMzBkYmE4OTEzZmJhMmY1OTg4N2JmYjFiNzg3YThhYmVmZmIxIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 16 + .../gapic_metadata.json | 34 + .../google/cloud/network_connectivity/v1.rb | 1 + .../v1/internal_range_service.rb | 51 + .../v1/internal_range_service/client.rb | 983 ++++++++++++++++++ .../v1/internal_range_service/credentials.rb | 51 + .../v1/internal_range_service/operations.rb | 813 +++++++++++++++ .../v1/internal_range_service/paths.rb | 69 ++ .../v1/internal_range_pb.rb | 66 ++ .../v1/internal_range_services_pb.rb | 54 + .../networkconnectivity/v1/internal_range.rb | 397 +++++++ .../create_internal_range.rb | 54 + .../delete_internal_range.rb | 54 + .../get_internal_range.rb | 47 + .../list_internal_ranges.rb | 51 + .../update_internal_range.rb | 54 + ...a_google.cloud.networkconnectivity.v1.json | 200 ++++ .../internal_range_service_operations_test.rb | 398 +++++++ .../v1/internal_range_service_paths_test.rb | 67 ++ .../v1/internal_range_service_test.rb | 429 ++++++++ 20 files changed, 3889 insertions(+) create mode 100644 google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service.rb create mode 100644 google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/client.rb create mode 100644 google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/credentials.rb create mode 100644 google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/operations.rb create mode 100644 google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/paths.rb create mode 100644 google-cloud-network_connectivity-v1/lib/google/cloud/networkconnectivity/v1/internal_range_pb.rb create mode 100644 google-cloud-network_connectivity-v1/lib/google/cloud/networkconnectivity/v1/internal_range_services_pb.rb create mode 100644 google-cloud-network_connectivity-v1/proto_docs/google/cloud/networkconnectivity/v1/internal_range.rb create mode 100644 google-cloud-network_connectivity-v1/snippets/internal_range_service/create_internal_range.rb create mode 100644 google-cloud-network_connectivity-v1/snippets/internal_range_service/delete_internal_range.rb create mode 100644 google-cloud-network_connectivity-v1/snippets/internal_range_service/get_internal_range.rb create mode 100644 google-cloud-network_connectivity-v1/snippets/internal_range_service/list_internal_ranges.rb create mode 100644 google-cloud-network_connectivity-v1/snippets/internal_range_service/update_internal_range.rb create mode 100644 google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_operations_test.rb create mode 100644 google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_paths_test.rb create mode 100644 google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_test.rb diff --git a/google-cloud-network_connectivity-v1/.owlbot-manifest.json b/google-cloud-network_connectivity-v1/.owlbot-manifest.json index bdf9383ba8b4..1346d8b65ae2 100644 --- a/google-cloud-network_connectivity-v1/.owlbot-manifest.json +++ b/google-cloud-network_connectivity-v1/.owlbot-manifest.json @@ -25,6 +25,11 @@ "lib/google/cloud/network_connectivity/v1/hub_service/credentials.rb", "lib/google/cloud/network_connectivity/v1/hub_service/operations.rb", "lib/google/cloud/network_connectivity/v1/hub_service/paths.rb", + "lib/google/cloud/network_connectivity/v1/internal_range_service.rb", + "lib/google/cloud/network_connectivity/v1/internal_range_service/client.rb", + "lib/google/cloud/network_connectivity/v1/internal_range_service/credentials.rb", + "lib/google/cloud/network_connectivity/v1/internal_range_service/operations.rb", + "lib/google/cloud/network_connectivity/v1/internal_range_service/paths.rb", "lib/google/cloud/network_connectivity/v1/policy_based_routing_service.rb", "lib/google/cloud/network_connectivity/v1/policy_based_routing_service/client.rb", "lib/google/cloud/network_connectivity/v1/policy_based_routing_service/credentials.rb", @@ -36,6 +41,8 @@ "lib/google/cloud/networkconnectivity/v1/cross_network_automation_services_pb.rb", "lib/google/cloud/networkconnectivity/v1/hub_pb.rb", "lib/google/cloud/networkconnectivity/v1/hub_services_pb.rb", + "lib/google/cloud/networkconnectivity/v1/internal_range_pb.rb", + "lib/google/cloud/networkconnectivity/v1/internal_range_services_pb.rb", "lib/google/cloud/networkconnectivity/v1/policy_based_routing_pb.rb", "lib/google/cloud/networkconnectivity/v1/policy_based_routing_services_pb.rb", "proto_docs/README.md", @@ -47,6 +54,7 @@ "proto_docs/google/cloud/networkconnectivity/v1/common.rb", "proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb", "proto_docs/google/cloud/networkconnectivity/v1/hub.rb", + "proto_docs/google/cloud/networkconnectivity/v1/internal_range.rb", "proto_docs/google/cloud/networkconnectivity/v1/policy_based_routing.rb", "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", @@ -99,6 +107,11 @@ "snippets/hub_service/update_group.rb", "snippets/hub_service/update_hub.rb", "snippets/hub_service/update_spoke.rb", + "snippets/internal_range_service/create_internal_range.rb", + "snippets/internal_range_service/delete_internal_range.rb", + "snippets/internal_range_service/get_internal_range.rb", + "snippets/internal_range_service/list_internal_ranges.rb", + "snippets/internal_range_service/update_internal_range.rb", "snippets/policy_based_routing_service/create_policy_based_route.rb", "snippets/policy_based_routing_service/delete_policy_based_route.rb", "snippets/policy_based_routing_service/get_policy_based_route.rb", @@ -110,6 +123,9 @@ "test/google/cloud/network_connectivity/v1/hub_service_operations_test.rb", "test/google/cloud/network_connectivity/v1/hub_service_paths_test.rb", "test/google/cloud/network_connectivity/v1/hub_service_test.rb", + "test/google/cloud/network_connectivity/v1/internal_range_service_operations_test.rb", + "test/google/cloud/network_connectivity/v1/internal_range_service_paths_test.rb", + "test/google/cloud/network_connectivity/v1/internal_range_service_test.rb", "test/google/cloud/network_connectivity/v1/policy_based_routing_service_operations_test.rb", "test/google/cloud/network_connectivity/v1/policy_based_routing_service_paths_test.rb", "test/google/cloud/network_connectivity/v1/policy_based_routing_service_test.rb", diff --git a/google-cloud-network_connectivity-v1/gapic_metadata.json b/google-cloud-network_connectivity-v1/gapic_metadata.json index 44ddfd652874..bdf68ec0062d 100644 --- a/google-cloud-network_connectivity-v1/gapic_metadata.json +++ b/google-cloud-network_connectivity-v1/gapic_metadata.json @@ -228,6 +228,40 @@ } } }, + "InternalRangeService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client", + "rpcs": { + "ListInternalRanges": { + "methods": [ + "list_internal_ranges" + ] + }, + "GetInternalRange": { + "methods": [ + "get_internal_range" + ] + }, + "CreateInternalRange": { + "methods": [ + "create_internal_range" + ] + }, + "UpdateInternalRange": { + "methods": [ + "update_internal_range" + ] + }, + "DeleteInternalRange": { + "methods": [ + "delete_internal_range" + ] + } + } + } + } + }, "PolicyBasedRoutingService": { "clients": { "grpc": { diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1.rb index 24a87c2c5afc..a2b1ea38adaf 100644 --- a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1.rb +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1.rb @@ -18,6 +18,7 @@ require "google/cloud/network_connectivity/v1/cross_network_automation_service" require "google/cloud/network_connectivity/v1/hub_service" +require "google/cloud/network_connectivity/v1/internal_range_service" require "google/cloud/network_connectivity/v1/policy_based_routing_service" require "google/cloud/network_connectivity/v1/version" diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service.rb new file mode 100644 index 000000000000..93de77d93a6c --- /dev/null +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/network_connectivity/v1/version" + +require "google/cloud/network_connectivity/v1/internal_range_service/credentials" +require "google/cloud/network_connectivity/v1/internal_range_service/paths" +require "google/cloud/network_connectivity/v1/internal_range_service/operations" +require "google/cloud/network_connectivity/v1/internal_range_service/client" + +module Google + module Cloud + module NetworkConnectivity + module V1 + ## + # The CLH-based service for internal range resources used to perform IPAM + # operations within a VPC network. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/network_connectivity/v1/internal_range_service" + # client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + # + module InternalRangeService + end + end + end + end +end + +helper_path = ::File.join __dir__, "internal_range_service", "helpers.rb" +require "google/cloud/network_connectivity/v1/internal_range_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/client.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/client.rb new file mode 100644 index 000000000000..e2750c15f351 --- /dev/null +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/client.rb @@ -0,0 +1,983 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/networkconnectivity/v1/internal_range_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module NetworkConnectivity + module V1 + module InternalRangeService + ## + # Client for the InternalRangeService service. + # + # The CLH-based service for internal range resources used to perform IPAM + # operations within a VPC network. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkconnectivity.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :internal_range_service_stub + + ## + # Configure the InternalRangeService Client class. + # + # See {::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InternalRangeService clients + # ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::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", "NetworkConnectivity", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_internal_ranges.timeout = 60.0 + + default_config.rpcs.get_internal_range.timeout = 60.0 + + default_config.rpcs.create_internal_range.timeout = 60.0 + + default_config.rpcs.update_internal_range.timeout = 60.0 + + default_config.rpcs.delete_internal_range.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InternalRangeService 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::NetworkConnectivity::V1::InternalRangeService::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 + @internal_range_service_stub.universe_domain + end + + ## + # Create a new InternalRangeService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InternalRangeService 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/networkconnectivity/v1/internal_range_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @internal_range_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::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 + ) + + @internal_range_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @internal_range_service_stub.endpoint + config.universe_domain = @internal_range_service_stub.universe_domain + config.logger = @internal_range_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @internal_range_service_stub.endpoint + config.universe_domain = @internal_range_service_stub.universe_domain + config.logger = @internal_range_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @internal_range_service_stub.logger + end + + # Service calls + + ## + # Lists internal ranges in a given project and location. + # + # @overload list_internal_ranges(request, options = nil) + # Pass arguments to `list_internal_ranges` via a request object, either of type + # {::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest, ::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_internal_ranges(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_internal_ranges` 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 parent resource's name. + # @param page_size [::Integer] + # The maximum number of results per page that should be returned. + # @param page_token [::String] + # The page token. + # @param filter [::String] + # A filter expression that filters the results listed in the response. + # @param order_by [::String] + # Sort the results by a certain order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::InternalRange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::InternalRange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_connectivity/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest.new + # + # # Call the list_internal_ranges method. + # result = client.list_internal_ranges 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::NetworkConnectivity::V1::InternalRange. + # p item + # end + # + def list_internal_ranges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest + + # 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_internal_ranges.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_internal_ranges.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_internal_ranges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @internal_range_service_stub.call_rpc :list_internal_ranges, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @internal_range_service_stub, :list_internal_ranges, 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 + + ## + # Gets details of a single internal range. + # + # @overload get_internal_range(request, options = nil) + # Pass arguments to `get_internal_range` via a request object, either of type + # {::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest, ::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_internal_range(name: nil) + # Pass arguments to `get_internal_range` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the InternalRange to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkConnectivity::V1::InternalRange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_connectivity/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest.new + # + # # Call the get_internal_range method. + # result = client.get_internal_range request + # + # # The returned object is of type Google::Cloud::NetworkConnectivity::V1::InternalRange. + # p result + # + def get_internal_range request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest + + # 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_internal_range.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_internal_range.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_internal_range.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @internal_range_service_stub.call_rpc :get_internal_range, 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 + + ## + # Creates a new internal range in a given project and location. + # + # @overload create_internal_range(request, options = nil) + # Pass arguments to `create_internal_range` via a request object, either of type + # {::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest, ::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_internal_range(parent: nil, internal_range_id: nil, internal_range: nil, request_id: nil) + # Pass arguments to `create_internal_range` 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 parent resource's name of the internal range. + # @param internal_range_id [::String] + # Optional. Resource ID + # (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') + # See https://google.aip.dev/122#resource-id-segments + # Unique per location. + # @param internal_range [::Google::Cloud::NetworkConnectivity::V1::InternalRange, ::Hash] + # Required. Initial values for a new internal range + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_connectivity/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest.new + # + # # Call the create_internal_range method. + # result = client.create_internal_range request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_internal_range request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest + + # 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_internal_range.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_internal_range.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_internal_range.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @internal_range_service_stub.call_rpc :create_internal_range, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single internal range. + # + # @overload update_internal_range(request, options = nil) + # Pass arguments to `update_internal_range` via a request object, either of type + # {::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest, ::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 update_internal_range(update_mask: nil, internal_range: nil, request_id: nil) + # Pass arguments to `update_internal_range` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # InternalRange resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param internal_range [::Google::Cloud::NetworkConnectivity::V1::InternalRange, ::Hash] + # Required. New values to be patched into the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_connectivity/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest.new + # + # # Call the update_internal_range method. + # result = client.update_internal_range request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_internal_range request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest + + # 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.update_internal_range.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.internal_range&.name + header_params["internal_range.name"] = request.internal_range.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.update_internal_range.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_internal_range.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @internal_range_service_stub.call_rpc :update_internal_range, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 single internal range. + # + # @overload delete_internal_range(request, options = nil) + # Pass arguments to `delete_internal_range` via a request object, either of type + # {::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest, ::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_internal_range(name: nil, request_id: nil) + # Pass arguments to `delete_internal_range` 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 name of the internal range to delete. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_connectivity/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest.new + # + # # Call the delete_internal_range method. + # result = client.delete_internal_range request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_internal_range request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest + + # 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_internal_range.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_internal_range.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_internal_range.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @internal_range_service_stub.call_rpc :delete_internal_range, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 InternalRangeService API. + # + # This class represents the configuration for InternalRangeService, + # 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::NetworkConnectivity::V1::InternalRangeService::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 + # # list_internal_ranges to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_internal_ranges.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_internal_ranges.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "networkconnectivity.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 InternalRangeService 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 `list_internal_ranges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_internal_ranges + ## + # RPC-specific configuration for `get_internal_range` + # @return [::Gapic::Config::Method] + # + attr_reader :get_internal_range + ## + # RPC-specific configuration for `create_internal_range` + # @return [::Gapic::Config::Method] + # + attr_reader :create_internal_range + ## + # RPC-specific configuration for `update_internal_range` + # @return [::Gapic::Config::Method] + # + attr_reader :update_internal_range + ## + # RPC-specific configuration for `delete_internal_range` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_internal_range + + # @private + def initialize parent_rpcs = nil + list_internal_ranges_config = parent_rpcs.list_internal_ranges if parent_rpcs.respond_to? :list_internal_ranges + @list_internal_ranges = ::Gapic::Config::Method.new list_internal_ranges_config + get_internal_range_config = parent_rpcs.get_internal_range if parent_rpcs.respond_to? :get_internal_range + @get_internal_range = ::Gapic::Config::Method.new get_internal_range_config + create_internal_range_config = parent_rpcs.create_internal_range if parent_rpcs.respond_to? :create_internal_range + @create_internal_range = ::Gapic::Config::Method.new create_internal_range_config + update_internal_range_config = parent_rpcs.update_internal_range if parent_rpcs.respond_to? :update_internal_range + @update_internal_range = ::Gapic::Config::Method.new update_internal_range_config + delete_internal_range_config = parent_rpcs.delete_internal_range if parent_rpcs.respond_to? :delete_internal_range + @delete_internal_range = ::Gapic::Config::Method.new delete_internal_range_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/credentials.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/credentials.rb new file mode 100644 index 000000000000..6a23d1739e00 --- /dev/null +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 NetworkConnectivity + module V1 + module InternalRangeService + # Credentials for the InternalRangeService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "NETWORK_CONNECTIVITY_CREDENTIALS", + "NETWORK_CONNECTIVITY_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "NETWORK_CONNECTIVITY_CREDENTIALS_JSON", + "NETWORK_CONNECTIVITY_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/operations.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/operations.rb new file mode 100644 index 000000000000..9e2b28a8a468 --- /dev/null +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/operations.rb @@ -0,0 +1,813 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module NetworkConnectivity + module V1 + module InternalRangeService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkconnectivity.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the InternalRangeService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the InternalRangeService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::NetworkConnectivity::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "networkconnectivity.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/paths.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/paths.rb new file mode 100644 index 000000000000..723ca9939922 --- /dev/null +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/internal_range_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 NetworkConnectivity + module V1 + module InternalRangeService + # Path helper methods for the InternalRangeService API. + module Paths + ## + # Create a fully-qualified InternalRange resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/internalRanges/{internal_range}` + # + # @param project [String] + # @param location [String] + # @param internal_range [String] + # + # @return [::String] + def internal_range_path project:, location:, internal_range: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/internalRanges/#{internal_range}" + end + + ## + # 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 + + extend self + end + end + end + end + end +end diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/networkconnectivity/v1/internal_range_pb.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/networkconnectivity/v1/internal_range_pb.rb new file mode 100644 index 000000000000..6b0e3925ff6f --- /dev/null +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/networkconnectivity/v1/internal_range_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkconnectivity/v1/internal_range.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/networkconnectivity/v1/common_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/networkconnectivity/v1/internal_range.proto\x12#google.cloud.networkconnectivity.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/networkconnectivity/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\r\n\rInternalRange\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x06labels\x18\x04 \x03(\x0b\x32>.google.cloud.networkconnectivity.v1.InternalRange.LabelsEntry\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rip_cidr_range\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07network\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12L\n\x05usage\x18\x08 \x01(\x0e\x32\x38.google.cloud.networkconnectivity.v1.InternalRange.UsageB\x03\xe0\x41\x01\x12P\n\x07peering\x18\t \x01(\x0e\x32:.google.cloud.networkconnectivity.v1.InternalRange.PeeringB\x03\xe0\x41\x01\x12\x1a\n\rprefix_length\x18\n \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11target_cidr_range\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05users\x18\x0c \x03(\tB\x03\xe0\x41\x03\x12Q\n\x08overlaps\x18\r \x03(\x0e\x32:.google.cloud.networkconnectivity.v1.InternalRange.OverlapB\x03\xe0\x41\x01\x12T\n\tmigration\x18\x0e \x01(\x0b\x32<.google.cloud.networkconnectivity.v1.InternalRange.MigrationB\x03\xe0\x41\x01\x12\x16\n\timmutable\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12\x65\n\x12\x61llocation_options\x18\x10 \x01(\x0b\x32\x44.google.cloud.networkconnectivity.v1.InternalRange.AllocationOptionsB\x03\xe0\x41\x01\x12 \n\x13\x65xclude_cidr_ranges\x18\x11 \x03(\tB\x03\xe0\x41\x01\x1a\x35\n\tMigration\x12\x13\n\x06source\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x05\x1a\xad\x01\n\x11\x41llocationOptions\x12g\n\x13\x61llocation_strategy\x18\x01 \x01(\x0e\x32\x45.google.cloud.networkconnectivity.v1.InternalRange.AllocationStrategyB\x03\xe0\x41\x01\x12/\n\"first_available_ranges_lookup_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"S\n\x05Usage\x12\x15\n\x11USAGE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46OR_VPC\x10\x01\x12\x13\n\x0f\x45XTERNAL_TO_VPC\x10\x02\x12\x11\n\rFOR_MIGRATION\x10\x03\"N\n\x07Peering\x12\x17\n\x13PEERING_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46OR_SELF\x10\x01\x12\x0c\n\x08\x46OR_PEER\x10\x02\x12\x0e\n\nNOT_SHARED\x10\x03\"^\n\x07Overlap\x12\x17\n\x13OVERLAP_UNSPECIFIED\x10\x00\x12\x17\n\x13OVERLAP_ROUTE_RANGE\x10\x01\x12!\n\x1dOVERLAP_EXISTING_SUBNET_RANGE\x10\x02\"\x94\x01\n\x12\x41llocationStrategy\x12#\n\x1f\x41LLOCATION_STRATEGY_UNSPECIFIED\x10\x00\x12\n\n\x06RANDOM\x10\x01\x12\x13\n\x0f\x46IRST_AVAILABLE\x10\x02\x12\x1c\n\x18RANDOM_FIRST_N_AVAILABLE\x10\x03\x12\x1a\n\x16\x46IRST_SMALLEST_FITTING\x10\x04:~\xea\x41{\n0networkconnectivity.googleapis.com/InternalRange\x12Gprojects/{project}/locations/{location}/internalRanges/{internal_range}\"\x9f\x01\n\x19ListInternalRangesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x97\x01\n\x1aListInternalRangesResponse\x12K\n\x0finternal_ranges\x18\x01 \x03(\x0b\x32\x32.google.cloud.networkconnectivity.v1.InternalRange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x17GetInternalRangeRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkconnectivity.googleapis.com/InternalRange\"\xf0\x01\n\x1a\x43reateInternalRangeRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkconnectivity.googleapis.com/InternalRange\x12\x1e\n\x11internal_range_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12O\n\x0einternal_range\x18\x03 \x01(\x0b\x32\x32.google.cloud.networkconnectivity.v1.InternalRangeB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xbc\x01\n\x1aUpdateInternalRangeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12O\n\x0einternal_range\x18\x02 \x01(\x0b\x32\x32.google.cloud.networkconnectivity.v1.InternalRangeB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"}\n\x1a\x44\x65leteInternalRangeRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkconnectivity.googleapis.com/InternalRange\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa7\n\n\x14InternalRangeService\x12\xda\x01\n\x12ListInternalRanges\x12>.google.cloud.networkconnectivity.v1.ListInternalRangesRequest\x1a?.google.cloud.networkconnectivity.v1.ListInternalRangesResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/internalRanges\x12\xc7\x01\n\x10GetInternalRange\x12<.google.cloud.networkconnectivity.v1.GetInternalRangeRequest\x1a\x32.google.cloud.networkconnectivity.v1.InternalRange\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/internalRanges/*}\x12\x91\x02\n\x13\x43reateInternalRange\x12?.google.cloud.networkconnectivity.v1.CreateInternalRangeRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41\"\n\rInternalRange\x12\x11OperationMetadata\xda\x41\'parent,internal_range,internal_range_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/internalRanges:\x0einternal_range\x12\x93\x02\n\x13UpdateInternalRange\x12?.google.cloud.networkconnectivity.v1.UpdateInternalRangeRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\"\n\rInternalRange\x12\x11OperationMetadata\xda\x41\x1ainternal_range,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{internal_range.name=projects/*/locations/*/internalRanges/*}:\x0einternal_range\x12\xe5\x01\n\x13\x44\x65leteInternalRange\x12?.google.cloud.networkconnectivity.v1.DeleteInternalRangeRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/internalRanges/*}\x1aV\xca\x41\"networkconnectivity.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8f\x02\n\'com.google.cloud.networkconnectivity.v1B\x12InternalRangeProtoP\x01ZYcloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb;networkconnectivitypb\xaa\x02#Google.Cloud.NetworkConnectivity.V1\xca\x02#Google\\Cloud\\NetworkConnectivity\\V1\xea\x02&Google::Cloud::NetworkConnectivity::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module NetworkConnectivity + module V1 + InternalRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.InternalRange").msgclass + InternalRange::Migration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.InternalRange.Migration").msgclass + InternalRange::AllocationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.InternalRange.AllocationOptions").msgclass + InternalRange::Usage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.InternalRange.Usage").enummodule + InternalRange::Peering = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.InternalRange.Peering").enummodule + InternalRange::Overlap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.InternalRange.Overlap").enummodule + InternalRange::AllocationStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.InternalRange.AllocationStrategy").enummodule + ListInternalRangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.ListInternalRangesRequest").msgclass + ListInternalRangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.ListInternalRangesResponse").msgclass + GetInternalRangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.GetInternalRangeRequest").msgclass + CreateInternalRangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.CreateInternalRangeRequest").msgclass + UpdateInternalRangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.UpdateInternalRangeRequest").msgclass + DeleteInternalRangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkconnectivity.v1.DeleteInternalRangeRequest").msgclass + end + end + end +end diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/networkconnectivity/v1/internal_range_services_pb.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/networkconnectivity/v1/internal_range_services_pb.rb new file mode 100644 index 000000000000..49561fe0be57 --- /dev/null +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/networkconnectivity/v1/internal_range_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/networkconnectivity/v1/internal_range.proto for package 'Google.Cloud.NetworkConnectivity.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/networkconnectivity/v1/internal_range_pb' + +module Google + module Cloud + module NetworkConnectivity + module V1 + module InternalRangeService + # The CLH-based service for internal range resources used to perform IPAM + # operations within a VPC network. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.networkconnectivity.v1.InternalRangeService' + + # Lists internal ranges in a given project and location. + rpc :ListInternalRanges, ::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest, ::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesResponse + # Gets details of a single internal range. + rpc :GetInternalRange, ::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest, ::Google::Cloud::NetworkConnectivity::V1::InternalRange + # Creates a new internal range in a given project and location. + rpc :CreateInternalRange, ::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single internal range. + rpc :UpdateInternalRange, ::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest, ::Google::Longrunning::Operation + # Deletes a single internal range. + rpc :DeleteInternalRange, ::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-network_connectivity-v1/proto_docs/google/cloud/networkconnectivity/v1/internal_range.rb b/google-cloud-network_connectivity-v1/proto_docs/google/cloud/networkconnectivity/v1/internal_range.rb new file mode 100644 index 000000000000..867374d561ff --- /dev/null +++ b/google-cloud-network_connectivity-v1/proto_docs/google/cloud/networkconnectivity/v1/internal_range.rb @@ -0,0 +1,397 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 NetworkConnectivity + module V1 + # The internal range resource for IPAM operations within a VPC network. + # Used to represent a private address range along with behavioral + # characteristics of that range (its usage and peering behavior). + # Networking resources can link to this range if they are created + # as belonging to it. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of an internal range. + # Format: + # projects/\\{project}/locations/\\{location}/internalRanges/\\{internal_range} + # See: https://google.aip.dev/122#fields-representing-resource-names + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time when the internal range was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Time when the internal range was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined labels. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of this resource. + # @!attribute [rw] ip_cidr_range + # @return [::String] + # Optional. The IP range that this internal range defines. + # NOTE: IPv6 ranges are limited to usage=EXTERNAL_TO_VPC and + # peering=FOR_SELF. + # NOTE: For IPv6 Ranges this field is compulsory, i.e. the address range must + # be specified explicitly. + # @!attribute [rw] network + # @return [::String] + # Immutable. The URL or resource ID of the network in which to reserve the + # internal range. The network cannot be deleted if there are any reserved + # internal ranges referring to it. Legacy networks are not supported. For + # example: + # https://www.googleapis.com/compute/v1/projects/\\{project}/locations/global/networks/\\{network} + # projects/\\{project}/locations/global/networks/\\{network} + # \\{network} + # @!attribute [rw] usage + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRange::Usage] + # Optional. The type of usage set for this InternalRange. + # @!attribute [rw] peering + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRange::Peering] + # Optional. The type of peering set for this internal range. + # @!attribute [rw] prefix_length + # @return [::Integer] + # Optional. An alternate to ip_cidr_range. Can be set when trying to create + # an IPv4 reservation that automatically finds a free range of the given + # size. If both ip_cidr_range and prefix_length are set, there is an error if + # the range sizes do not match. Can also be used during updates to change the + # range size. + # NOTE: For IPv6 this field only works if ip_cidr_range is set as well, and + # both fields must match. In other words, with IPv6 this field only works as + # a redundant parameter. + # @!attribute [rw] target_cidr_range + # @return [::Array<::String>] + # Optional. Can be set to narrow down or pick a different address space while + # searching for a free range. If not set, defaults to the "10.0.0.0/8" + # address space. This can be used to search in other rfc-1918 address + # spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 + # address spaces used in the VPC. + # @!attribute [r] users + # @return [::Array<::String>] + # Output only. The list of resources that refer to this internal range. + # Resources that use the internal range for their range allocation + # are referred to as users of the range. Other resources mark themselves + # as users while doing so by creating a reference to this internal range. + # Having a user, based on this reference, prevents deletion of the + # internal range referred to. Can be empty. + # @!attribute [rw] overlaps + # @return [::Array<::Google::Cloud::NetworkConnectivity::V1::InternalRange::Overlap>] + # Optional. Types of resources that are allowed to overlap with the current + # internal range. + # @!attribute [rw] migration + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRange::Migration] + # Optional. Must be present if usage is set to FOR_MIGRATION. + # @!attribute [rw] immutable + # @return [::Boolean] + # Optional. Immutable ranges cannot have their fields modified, except for + # labels and description. + # @!attribute [rw] allocation_options + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRange::AllocationOptions] + # Optional. Range auto-allocation options, may be set only when + # auto-allocation is selected by not setting ip_cidr_range (and setting + # prefix_length). + # @!attribute [rw] exclude_cidr_ranges + # @return [::Array<::String>] + # Optional. ExcludeCidrRanges flag. Specifies a set of CIDR blocks that + # allows exclusion of particular CIDR ranges from the auto-allocation + # process, without having to reserve these blocks + class InternalRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specification for migration with source and target resource names. + # @!attribute [rw] source + # @return [::String] + # Immutable. Resource path as an URI of the source resource, for example a + # subnet. The project for the source resource should match the project for + # the InternalRange. An example: + # /projects/\\{project}/regions/\\{region}/subnetworks/\\{subnet} + # @!attribute [rw] target + # @return [::String] + # Immutable. Resource path of the target resource. The target project can + # be different, as in the cases when migrating to peer networks. For + # example: + # /projects/\\{project}/regions/\\{region}/subnetworks/\\{subnet} + class Migration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Range auto-allocation options, to be optionally used when CIDR block is not + # explicitly set. + # @!attribute [rw] allocation_strategy + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRange::AllocationStrategy] + # Optional. Allocation strategy Not setting this field when the allocation + # is requested means an implementation defined strategy is used. + # @!attribute [rw] first_available_ranges_lookup_size + # @return [::Integer] + # Optional. This field must be set only when allocation_strategy is set to + # RANDOM_FIRST_N_AVAILABLE. + # The value should be the maximum expected parallelism of range creation + # requests issued to the same space of peered netwroks. + class AllocationOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible usage of an internal range. + module Usage + # Unspecified usage is allowed in calls which identify the resource by + # other fields and do not need Usage set to complete. These are, i.e.: + # GetInternalRange and DeleteInternalRange. + # Usage needs to be specified explicitly in CreateInternalRange + # or UpdateInternalRange calls. + USAGE_UNSPECIFIED = 0 + + # A VPC resource can use the reserved CIDR block by associating it with the + # internal range resource if usage is set to FOR_VPC. + FOR_VPC = 1 + + # Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC + # resources and are meant to block out address ranges for various use + # cases, like for example, usage on-prem, with dynamic route announcements + # via interconnect. + EXTERNAL_TO_VPC = 2 + + # Ranges created FOR_MIGRATION can be used to lock a CIDR range between a + # source and target subnet. If usage is set to FOR_MIGRATION, the peering + # value has to be set to FOR_SELF or default to FOR_SELF when unset. + FOR_MIGRATION = 3 + end + + # Peering type. + module Peering + # If Peering is left unspecified in CreateInternalRange or + # UpdateInternalRange, it will be defaulted to FOR_SELF. + PEERING_UNSPECIFIED = 0 + + # This is the default behavior and represents the case that this + # internal range is intended to be used in the VPC in which it is created + # and is accessible from its peers. This implies that peers or + # peers-of-peers cannot use this range. + FOR_SELF = 1 + + # This behavior can be set when the internal range is being reserved for + # usage by peers. This means that no resource within the VPC in which + # it is being created can use this to associate with a VPC resource, but + # one of the peers can. This represents donating a range for peers to + # use. + FOR_PEER = 2 + + # This behavior can be set when the internal range is being reserved for + # usage by the VPC in which it is created, but not shared with peers. + # In a sense, it is local to the VPC. This can be used to create internal + # ranges for various purposes like HTTP_INTERNAL_LOAD_BALANCER or for + # Interconnect routes that are not shared with peers. This also implies + # that peers cannot use this range in a way that is visible to this VPC, + # but can re-use this range as long as it is NOT_SHARED from the peer VPC, + # too. + NOT_SHARED = 3 + end + + # Overlap specifications. + module Overlap + # No overlap overrides. + OVERLAP_UNSPECIFIED = 0 + + # Allow creation of static routes more specific that the current + # internal range. + OVERLAP_ROUTE_RANGE = 1 + + # Allow creation of internal ranges that overlap with existing subnets. + OVERLAP_EXISTING_SUBNET_RANGE = 2 + end + + # Enumeration of range auto-allocation strategies + module AllocationStrategy + # Unspecified is the only valid option when the range is specified + # explicitly by ip_cidr_range field. Otherwise unspefified means using the + # default strategy. + ALLOCATION_STRATEGY_UNSPECIFIED = 0 + + # Random strategy, the legacy algorithm, used for backwards compatibility. + # This allocation strategy remains efficient in the case of concurrent + # allocation requests in the same peered network space and doesn't require + # providing the level of concurrency in an explicit parameter, but it is + # prone to fragmenting available address space. + RANDOM = 1 + + # Pick the first available address range. This strategy is deterministic + # and the result is easy to predict. + FIRST_AVAILABLE = 2 + + # Pick an arbitrary range out of the first N available ones. The N will be + # set in the first_available_ranges_lookup_size field. This strategy should + # be used when concurrent allocation requests are made in the same space of + # peered networks while the fragmentation of the addrress space is reduced. + RANDOM_FIRST_N_AVAILABLE = 3 + + # Pick the smallest but fitting available range. This deterministic + # strategy minimizes fragmentation of the address space. + FIRST_SMALLEST_FITTING = 4 + end + end + + # Request for InternalRangeService.ListInternalRanges + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource's name. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results per page that should be returned. + # @!attribute [rw] page_token + # @return [::String] + # The page token. + # @!attribute [rw] filter + # @return [::String] + # A filter expression that filters the results listed in the response. + # @!attribute [rw] order_by + # @return [::String] + # Sort the results by a certain order. + class ListInternalRangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for InternalRange.ListInternalRanges + # @!attribute [rw] internal_ranges + # @return [::Array<::Google::Cloud::NetworkConnectivity::V1::InternalRange>] + # Internal ranges to be returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The next pagination token in the List response. It should be used as + # page_token for the following request. An empty value means no more result. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInternalRangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for InternalRangeService.GetInternalRange + # @!attribute [rw] name + # @return [::String] + # Required. Name of the InternalRange to get. + class GetInternalRangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for InternalRangeService.CreateInternalRange + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource's name of the internal range. + # @!attribute [rw] internal_range_id + # @return [::String] + # Optional. Resource ID + # (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') + # See https://google.aip.dev/122#resource-id-segments + # Unique per location. + # @!attribute [rw] internal_range + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRange] + # Required. Initial values for a new internal range + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateInternalRangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for InternalRangeService.UpdateInternalRange + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # InternalRange resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] internal_range + # @return [::Google::Cloud::NetworkConnectivity::V1::InternalRange] + # Required. New values to be patched into the resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateInternalRangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for InternalRangeService.DeleteInternalRange + # @!attribute [rw] name + # @return [::String] + # Required. The name of the internal range to delete. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteInternalRangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-network_connectivity-v1/snippets/internal_range_service/create_internal_range.rb b/google-cloud-network_connectivity-v1/snippets/internal_range_service/create_internal_range.rb new file mode 100644 index 000000000000..b9a1ef1d9034 --- /dev/null +++ b/google-cloud-network_connectivity-v1/snippets/internal_range_service/create_internal_range.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkconnectivity_v1_generated_InternalRangeService_CreateInternalRange_sync] +require "google/cloud/network_connectivity/v1" + +## +# Snippet for the create_internal_range call in the InternalRangeService 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::NetworkConnectivity::V1::InternalRangeService::Client#create_internal_range. +# +def create_internal_range + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest.new + + # Call the create_internal_range method. + result = client.create_internal_range request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkconnectivity_v1_generated_InternalRangeService_CreateInternalRange_sync] diff --git a/google-cloud-network_connectivity-v1/snippets/internal_range_service/delete_internal_range.rb b/google-cloud-network_connectivity-v1/snippets/internal_range_service/delete_internal_range.rb new file mode 100644 index 000000000000..9a100cdd6884 --- /dev/null +++ b/google-cloud-network_connectivity-v1/snippets/internal_range_service/delete_internal_range.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkconnectivity_v1_generated_InternalRangeService_DeleteInternalRange_sync] +require "google/cloud/network_connectivity/v1" + +## +# Snippet for the delete_internal_range call in the InternalRangeService 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::NetworkConnectivity::V1::InternalRangeService::Client#delete_internal_range. +# +def delete_internal_range + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest.new + + # Call the delete_internal_range method. + result = client.delete_internal_range request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkconnectivity_v1_generated_InternalRangeService_DeleteInternalRange_sync] diff --git a/google-cloud-network_connectivity-v1/snippets/internal_range_service/get_internal_range.rb b/google-cloud-network_connectivity-v1/snippets/internal_range_service/get_internal_range.rb new file mode 100644 index 000000000000..60f457d88fdd --- /dev/null +++ b/google-cloud-network_connectivity-v1/snippets/internal_range_service/get_internal_range.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkconnectivity_v1_generated_InternalRangeService_GetInternalRange_sync] +require "google/cloud/network_connectivity/v1" + +## +# Snippet for the get_internal_range call in the InternalRangeService 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::NetworkConnectivity::V1::InternalRangeService::Client#get_internal_range. +# +def get_internal_range + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest.new + + # Call the get_internal_range method. + result = client.get_internal_range request + + # The returned object is of type Google::Cloud::NetworkConnectivity::V1::InternalRange. + p result +end +# [END networkconnectivity_v1_generated_InternalRangeService_GetInternalRange_sync] diff --git a/google-cloud-network_connectivity-v1/snippets/internal_range_service/list_internal_ranges.rb b/google-cloud-network_connectivity-v1/snippets/internal_range_service/list_internal_ranges.rb new file mode 100644 index 000000000000..97c52a4c8214 --- /dev/null +++ b/google-cloud-network_connectivity-v1/snippets/internal_range_service/list_internal_ranges.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkconnectivity_v1_generated_InternalRangeService_ListInternalRanges_sync] +require "google/cloud/network_connectivity/v1" + +## +# Snippet for the list_internal_ranges call in the InternalRangeService 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::NetworkConnectivity::V1::InternalRangeService::Client#list_internal_ranges. +# +def list_internal_ranges + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest.new + + # Call the list_internal_ranges method. + result = client.list_internal_ranges 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::NetworkConnectivity::V1::InternalRange. + p item + end +end +# [END networkconnectivity_v1_generated_InternalRangeService_ListInternalRanges_sync] diff --git a/google-cloud-network_connectivity-v1/snippets/internal_range_service/update_internal_range.rb b/google-cloud-network_connectivity-v1/snippets/internal_range_service/update_internal_range.rb new file mode 100644 index 000000000000..4522be33609a --- /dev/null +++ b/google-cloud-network_connectivity-v1/snippets/internal_range_service/update_internal_range.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 networkconnectivity_v1_generated_InternalRangeService_UpdateInternalRange_sync] +require "google/cloud/network_connectivity/v1" + +## +# Snippet for the update_internal_range call in the InternalRangeService 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::NetworkConnectivity::V1::InternalRangeService::Client#update_internal_range. +# +def update_internal_range + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest.new + + # Call the update_internal_range method. + result = client.update_internal_range request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END networkconnectivity_v1_generated_InternalRangeService_UpdateInternalRange_sync] diff --git a/google-cloud-network_connectivity-v1/snippets/snippet_metadata_google.cloud.networkconnectivity.v1.json b/google-cloud-network_connectivity-v1/snippets/snippet_metadata_google.cloud.networkconnectivity.v1.json index c1f942b26499..75825941064c 100644 --- a/google-cloud-network_connectivity-v1/snippets/snippet_metadata_google.cloud.networkconnectivity.v1.json +++ b/google-cloud-network_connectivity-v1/snippets/snippet_metadata_google.cloud.networkconnectivity.v1.json @@ -1651,6 +1651,206 @@ } ] }, + { + "region_tag": "networkconnectivity_v1_generated_InternalRangeService_ListInternalRanges_sync", + "title": "Snippet for the list_internal_ranges call in the InternalRangeService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#list_internal_ranges.", + "file": "internal_range_service/list_internal_ranges.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_internal_ranges", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#list_internal_ranges", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesResponse", + "client": { + "short_name": "InternalRangeService::Client", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client" + }, + "method": { + "short_name": "ListInternalRanges", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService.ListInternalRanges", + "service": { + "short_name": "InternalRangeService", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkconnectivity_v1_generated_InternalRangeService_GetInternalRange_sync", + "title": "Snippet for the get_internal_range call in the InternalRangeService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#get_internal_range.", + "file": "internal_range_service/get_internal_range.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_internal_range", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#get_internal_range", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkConnectivity::V1::InternalRange", + "client": { + "short_name": "InternalRangeService::Client", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client" + }, + "method": { + "short_name": "GetInternalRange", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService.GetInternalRange", + "service": { + "short_name": "InternalRangeService", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkconnectivity_v1_generated_InternalRangeService_CreateInternalRange_sync", + "title": "Snippet for the create_internal_range call in the InternalRangeService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#create_internal_range.", + "file": "internal_range_service/create_internal_range.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_internal_range", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#create_internal_range", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InternalRangeService::Client", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client" + }, + "method": { + "short_name": "CreateInternalRange", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService.CreateInternalRange", + "service": { + "short_name": "InternalRangeService", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkconnectivity_v1_generated_InternalRangeService_UpdateInternalRange_sync", + "title": "Snippet for the update_internal_range call in the InternalRangeService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#update_internal_range.", + "file": "internal_range_service/update_internal_range.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_internal_range", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#update_internal_range", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InternalRangeService::Client", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client" + }, + "method": { + "short_name": "UpdateInternalRange", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService.UpdateInternalRange", + "service": { + "short_name": "InternalRangeService", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkconnectivity_v1_generated_InternalRangeService_DeleteInternalRange_sync", + "title": "Snippet for the delete_internal_range call in the InternalRangeService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#delete_internal_range.", + "file": "internal_range_service/delete_internal_range.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_internal_range", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client#delete_internal_range", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InternalRangeService::Client", + "full_name": "::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client" + }, + "method": { + "short_name": "DeleteInternalRange", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService.DeleteInternalRange", + "service": { + "short_name": "InternalRangeService", + "full_name": "google.cloud.networkconnectivity.v1.InternalRangeService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "networkconnectivity_v1_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_sync", "title": "Snippet for the list_policy_based_routes call in the PolicyBasedRoutingService service", diff --git a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_operations_test.rb b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_operations_test.rb new file mode 100644 index 000000000000..e114e429946a --- /dev/null +++ b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/networkconnectivity/v1/internal_range_pb" +require "google/cloud/networkconnectivity/v1/internal_range_services_pb" +require "google/cloud/network_connectivity/v1/internal_range_service" + +class ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::NetworkConnectivity::V1::InternalRangeService::Operations.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::NetworkConnectivity::V1::InternalRangeService::Operations::Configuration, config + end +end diff --git a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_paths_test.rb b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_paths_test.rb new file mode 100644 index 000000000000..d79215ecfa99 --- /dev/null +++ b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/network_connectivity/v1/internal_range_service" + +class ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::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_internal_range_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.internal_range_path project: "value0", location: "value1", internal_range: "value2" + assert_equal "projects/value0/locations/value1/internalRanges/value2", path + 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::NetworkConnectivity::V1::InternalRangeService::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 +end diff --git a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_test.rb b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_test.rb new file mode 100644 index 000000000000..50e76448fce3 --- /dev/null +++ b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_test.rb @@ -0,0 +1,429 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/networkconnectivity/v1/internal_range_pb" +require "google/cloud/networkconnectivity/v1/internal_range_services_pb" +require "google/cloud/network_connectivity/v1/internal_range_service" + +class ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::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_list_internal_ranges + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_internal_ranges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_internal_ranges, name + assert_kind_of ::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_internal_ranges_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_internal_ranges({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_internal_ranges parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_internal_ranges ::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_internal_ranges({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_internal_ranges(::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_internal_ranges_client_stub.call_rpc_count + end + end + + def test_get_internal_range + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkConnectivity::V1::InternalRange.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" + + get_internal_range_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_internal_range, name + assert_kind_of ::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_internal_range_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_internal_range({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_internal_range name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_internal_range ::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_internal_range({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_internal_range(::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest.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, get_internal_range_client_stub.call_rpc_count + end + end + + def test_create_internal_range + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + internal_range_id = "hello world" + internal_range = {} + request_id = "hello world" + + create_internal_range_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_internal_range, name + assert_kind_of ::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["internal_range_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkConnectivity::V1::InternalRange), request["internal_range"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_internal_range_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_internal_range({ parent: parent, internal_range_id: internal_range_id, internal_range: internal_range, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_internal_range parent: parent, internal_range_id: internal_range_id, internal_range: internal_range, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_internal_range ::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest.new(parent: parent, internal_range_id: internal_range_id, internal_range: internal_range, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_internal_range({ parent: parent, internal_range_id: internal_range_id, internal_range: internal_range, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_internal_range(::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest.new(parent: parent, internal_range_id: internal_range_id, internal_range: internal_range, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_internal_range_client_stub.call_rpc_count + end + end + + def test_update_internal_range + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + internal_range = {} + request_id = "hello world" + + update_internal_range_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_internal_range, name + assert_kind_of ::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkConnectivity::V1::InternalRange), request["internal_range"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_internal_range_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_internal_range({ update_mask: update_mask, internal_range: internal_range, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_internal_range update_mask: update_mask, internal_range: internal_range, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_internal_range ::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest.new(update_mask: update_mask, internal_range: internal_range, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_internal_range({ update_mask: update_mask, internal_range: internal_range, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_internal_range(::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest.new(update_mask: update_mask, internal_range: internal_range, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_internal_range_client_stub.call_rpc_count + end + end + + def test_delete_internal_range + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + + delete_internal_range_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_internal_range, name + assert_kind_of ::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_internal_range_client_stub do + # Create client + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_internal_range({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_internal_range name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_internal_range ::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_internal_range({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_internal_range(::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_internal_range_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::NetworkConnectivity::V1::InternalRangeService::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::NetworkConnectivity::V1::InternalRangeService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations, client.operations_client + end +end From 78bad51cf9ae485ed89f2b76bafee778f4ea6f94 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:11:41 -0700 Subject: [PATCH 288/457] feat: add Network Connectivity Center APIs for Internal Range service (#30706) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 785376390 Source-Link: https://github.com/googleapis/googleapis/commit/deb6327efce102408fa665b99af3887b02b4b27c Source-Link: https://github.com/googleapis/googleapis-gen/commit/92fd30dba8913fba2f59887bfb1b787a8abeffb1 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfY29ubmVjdGl2aXR5Ly5Pd2xCb3QueWFtbCIsImgiOiI5MmZkMzBkYmE4OTEzZmJhMmY1OTg4N2JmYjFiNzg3YThhYmVmZmIxIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/network_connectivity.rb | 62 +++++++++++++++++++ .../cloud/network_connectivity/client_test.rb | 11 ++++ 2 files changed, 73 insertions(+) diff --git a/google-cloud-network_connectivity/lib/google/cloud/network_connectivity.rb b/google-cloud-network_connectivity/lib/google/cloud/network_connectivity.rb index 00b452f36cfc..b48a99b89e7a 100644 --- a/google-cloud-network_connectivity/lib/google/cloud/network_connectivity.rb +++ b/google-cloud-network_connectivity/lib/google/cloud/network_connectivity.rb @@ -169,6 +169,68 @@ def self.hub_service_available? version: :v1 false end + ## + # Create a new client object for InternalRangeService. + # + # By default, this returns an instance of + # [Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the InternalRangeService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the InternalRangeService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::NetworkConnectivity.internal_range_service_available?}. + # + # ## About InternalRangeService + # + # The CLH-based service for internal range resources used to perform IPAM + # operations within a VPC network. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.internal_range_service version: :v1, &block + require "google/cloud/network_connectivity/#{version.to_s.downcase}" + + package_name = Google::Cloud::NetworkConnectivity + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::NetworkConnectivity.const_get(package_name).const_get(:InternalRangeService) + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the InternalRangeService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::NetworkConnectivity.internal_range_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the InternalRangeService service, + # or if the versioned client gem needs an update to support the InternalRangeService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.internal_range_service_available? version: :v1 + require "google/cloud/network_connectivity/#{version.to_s.downcase}" + package_name = Google::Cloud::NetworkConnectivity + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::NetworkConnectivity.const_get package_name + return false unless service_module.const_defined? :InternalRangeService + service_module = service_module.const_get :InternalRangeService + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for PolicyBasedRoutingService. # diff --git a/google-cloud-network_connectivity/test/google/cloud/network_connectivity/client_test.rb b/google-cloud-network_connectivity/test/google/cloud/network_connectivity/client_test.rb index 415234899d85..240770cda181 100644 --- a/google-cloud-network_connectivity/test/google/cloud/network_connectivity/client_test.rb +++ b/google-cloud-network_connectivity/test/google/cloud/network_connectivity/client_test.rb @@ -62,6 +62,17 @@ def test_hub_service_grpc end end + def test_internal_range_service_grpc + skip unless Google::Cloud::NetworkConnectivity.internal_range_service_available? + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::NetworkConnectivity.internal_range_service do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client, client + end + end + def test_policy_based_routing_service_grpc skip unless Google::Cloud::NetworkConnectivity.policy_based_routing_service_available? Gapic::ServiceStub.stub :new, DummyStub.new do From 5956ceaede4fd669ca1e48a8989aa0e88d80f86f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:19:39 -0700 Subject: [PATCH 289/457] feat: Exposing 1p integration message content (drive, calendar, huddle, meet chips) (#30712) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs: Update reference documentation for annotations. Introduce new richlink metadata types PiperOrigin-RevId: 785870918 Source-Link: https://github.com/googleapis/googleapis/commit/31c25931c740a2d03439c8ed8dee99d2b14eac75 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0daa0c86744b49a1ee6a149e101bcece19da6a94 Copy-Tag: eyJwIjoiZ29vZ2xlLWFwcHMtY2hhdC12MS8uT3dsQm90LnlhbWwiLCJoIjoiMGRhYTBjODY3NDRiNDlhMWVlNmExNDllMTAxYmNlY2UxOWRhNmE5NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/chat/v1/annotation_pb.rb | 7 +- .../proto_docs/google/chat/v1/annotation.rb | 95 +++++++++++++++++-- .../proto_docs/google/chat/v1/message.rb | 4 +- 3 files changed, 97 insertions(+), 9 deletions(-) diff --git a/google-apps-chat-v1/lib/google/chat/v1/annotation_pb.rb b/google-apps-chat-v1/lib/google/chat/v1/annotation_pb.rb index b44a3a4767cd..f1da4d23ece5 100644 --- a/google-apps-chat-v1/lib/google/chat/v1/annotation_pb.rb +++ b/google-apps-chat-v1/lib/google/chat/v1/annotation_pb.rb @@ -4,13 +4,14 @@ require 'google/protobuf' +require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/chat/v1/attachment_pb' require 'google/chat/v1/reaction_pb' require 'google/chat/v1/user_pb' -descriptor_data = "\n\x1fgoogle/chat/v1/annotation.proto\x12\x0egoogle.chat.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x19google/chat/v1/user.proto\"\x82\x03\n\nAnnotation\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.google.chat.v1.AnnotationType\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12;\n\x0cuser_mention\x18\x04 \x01(\x0b\x32#.google.chat.v1.UserMentionMetadataH\x00\x12=\n\rslash_command\x18\x05 \x01(\x0b\x32$.google.chat.v1.SlashCommandMetadataH\x00\x12>\n\x12rich_link_metadata\x18\x06 \x01(\x0b\x32 .google.chat.v1.RichLinkMetadataH\x00\x12\x44\n\x15\x63ustom_emoji_metadata\x18\x07 \x01(\x0b\x32#.google.chat.v1.CustomEmojiMetadataH\x00\x42\n\n\x08metadataB\x0e\n\x0c_start_index\"\xa5\x01\n\x13UserMentionMetadata\x12\"\n\x04user\x18\x01 \x01(\x0b\x32\x14.google.chat.v1.User\x12\x36\n\x04type\x18\x02 \x01(\x0e\x32(.google.chat.v1.UserMentionMetadata.Type\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\x0b\n\x07MENTION\x10\x02\"\xe8\x01\n\x14SlashCommandMetadata\x12!\n\x03\x62ot\x18\x01 \x01(\x0b\x32\x14.google.chat.v1.User\x12\x37\n\x04type\x18\x02 \x01(\x0e\x32).google.chat.v1.SlashCommandMetadata.Type\x12\x14\n\x0c\x63ommand_name\x18\x03 \x01(\t\x12\x12\n\ncommand_id\x18\x04 \x01(\x03\x12\x17\n\x0ftriggers_dialog\x18\x05 \x01(\x08\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06INVOKE\x10\x02\"\xbb\x02\n\x10RichLinkMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x45\n\x0erich_link_type\x18\x02 \x01(\x0e\x32-.google.chat.v1.RichLinkMetadata.RichLinkType\x12\x38\n\x0f\x64rive_link_data\x18\x03 \x01(\x0b\x32\x1d.google.chat.v1.DriveLinkDataH\x00\x12\x41\n\x14\x63hat_space_link_data\x18\x04 \x01(\x0b\x32!.google.chat.v1.ChatSpaceLinkDataH\x00\"N\n\x0cRichLinkType\x12\x1e\n\x1aRICH_LINK_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDRIVE_FILE\x10\x01\x12\x0e\n\nCHAT_SPACE\x10\x02\x42\x06\n\x04\x64\x61ta\"H\n\x13\x43ustomEmojiMetadata\x12\x31\n\x0c\x63ustom_emoji\x18\x01 \x01(\x0b\x32\x1b.google.chat.v1.CustomEmoji\"X\n\rDriveLinkData\x12\x34\n\x0e\x64rive_data_ref\x18\x01 \x01(\x0b\x32\x1c.google.chat.v1.DriveDataRef\x12\x11\n\tmime_type\x18\x02 \x01(\t\"\xa6\x01\n\x11\x43hatSpaceLinkData\x12-\n\x05space\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12/\n\x06thread\x18\x02 \x01(\tB\x1f\xfa\x41\x1c\n\x1a\x63hat.googleapis.com/Thread\x12\x31\n\x07message\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message*w\n\x0e\x41nnotationType\x12\x1f\n\x1b\x41NNOTATION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cUSER_MENTION\x10\x01\x12\x11\n\rSLASH_COMMAND\x10\x02\x12\r\n\tRICH_LINK\x10\x03\x12\x10\n\x0c\x43USTOM_EMOJI\x10\x04\x42\xa8\x01\n\x12\x63om.google.chat.v1B\x0f\x41nnotationProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" +descriptor_data = "\n\x1fgoogle/chat/v1/annotation.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x19google/chat/v1/user.proto\"\x82\x03\n\nAnnotation\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.google.chat.v1.AnnotationType\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12;\n\x0cuser_mention\x18\x04 \x01(\x0b\x32#.google.chat.v1.UserMentionMetadataH\x00\x12=\n\rslash_command\x18\x05 \x01(\x0b\x32$.google.chat.v1.SlashCommandMetadataH\x00\x12>\n\x12rich_link_metadata\x18\x06 \x01(\x0b\x32 .google.chat.v1.RichLinkMetadataH\x00\x12\x44\n\x15\x63ustom_emoji_metadata\x18\x07 \x01(\x0b\x32#.google.chat.v1.CustomEmojiMetadataH\x00\x42\n\n\x08metadataB\x0e\n\x0c_start_index\"\xa5\x01\n\x13UserMentionMetadata\x12\"\n\x04user\x18\x01 \x01(\x0b\x32\x14.google.chat.v1.User\x12\x36\n\x04type\x18\x02 \x01(\x0e\x32(.google.chat.v1.UserMentionMetadata.Type\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\x0b\n\x07MENTION\x10\x02\"\xe8\x01\n\x14SlashCommandMetadata\x12!\n\x03\x62ot\x18\x01 \x01(\x0b\x32\x14.google.chat.v1.User\x12\x37\n\x04type\x18\x02 \x01(\x0e\x32).google.chat.v1.SlashCommandMetadata.Type\x12\x14\n\x0c\x63ommand_name\x18\x03 \x01(\t\x12\x12\n\ncommand_id\x18\x04 \x01(\x03\x12\x17\n\x0ftriggers_dialog\x18\x05 \x01(\x08\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06INVOKE\x10\x02\"\xed\x03\n\x10RichLinkMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x45\n\x0erich_link_type\x18\x02 \x01(\x0e\x32-.google.chat.v1.RichLinkMetadata.RichLinkType\x12\x38\n\x0f\x64rive_link_data\x18\x03 \x01(\x0b\x32\x1d.google.chat.v1.DriveLinkDataH\x00\x12\x41\n\x14\x63hat_space_link_data\x18\x04 \x01(\x0b\x32!.google.chat.v1.ChatSpaceLinkDataH\x00\x12\x41\n\x14meet_space_link_data\x18\x05 \x01(\x0b\x32!.google.chat.v1.MeetSpaceLinkDataH\x00\x12I\n\x18\x63\x61lendar_event_link_data\x18\x06 \x01(\x0b\x32%.google.chat.v1.CalendarEventLinkDataH\x00\"r\n\x0cRichLinkType\x12\x1e\n\x1aRICH_LINK_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDRIVE_FILE\x10\x01\x12\x0e\n\nCHAT_SPACE\x10\x02\x12\x0e\n\nMEET_SPACE\x10\x04\x12\x12\n\x0e\x43\x41LENDAR_EVENT\x10\x05\x42\x06\n\x04\x64\x61ta\"H\n\x13\x43ustomEmojiMetadata\x12\x31\n\x0c\x63ustom_emoji\x18\x01 \x01(\x0b\x32\x1b.google.chat.v1.CustomEmoji\"X\n\rDriveLinkData\x12\x34\n\x0e\x64rive_data_ref\x18\x01 \x01(\x0b\x32\x1c.google.chat.v1.DriveDataRef\x12\x11\n\tmime_type\x18\x02 \x01(\t\"\xa6\x01\n\x11\x43hatSpaceLinkData\x12-\n\x05space\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12/\n\x06thread\x18\x02 \x01(\tB\x1f\xfa\x41\x1c\n\x1a\x63hat.googleapis.com/Thread\x12\x31\n\x07message\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message\"\xb8\x02\n\x11MeetSpaceLinkData\x12\x14\n\x0cmeeting_code\x18\x01 \x01(\t\x12\x34\n\x04type\x18\x02 \x01(\x0e\x32&.google.chat.v1.MeetSpaceLinkData.Type\x12M\n\rhuddle_status\x18\x03 \x01(\x0e\x32..google.chat.v1.MeetSpaceLinkData.HuddleStatusB\x06\xe0\x41\x01\xe0\x41\x03\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MEETING\x10\x01\x12\n\n\x06HUDDLE\x10\x02\"Q\n\x0cHuddleStatus\x12\x1d\n\x19HUDDLE_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\t\n\x05\x45NDED\x10\x02\x12\n\n\x06MISSED\x10\x03\">\n\x15\x43\x61lendarEventLinkData\x12\x13\n\x0b\x63\x61lendar_id\x18\x01 \x01(\t\x12\x10\n\x08\x65vent_id\x18\x02 \x01(\t*w\n\x0e\x41nnotationType\x12\x1f\n\x1b\x41NNOTATION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cUSER_MENTION\x10\x01\x12\x11\n\rSLASH_COMMAND\x10\x02\x12\r\n\tRICH_LINK\x10\x03\x12\x10\n\x0c\x43USTOM_EMOJI\x10\x04\x42\xa8\x01\n\x12\x63om.google.chat.v1B\x0f\x41nnotationProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -53,6 +54,10 @@ module V1 CustomEmojiMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.CustomEmojiMetadata").msgclass DriveLinkData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.DriveLinkData").msgclass ChatSpaceLinkData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.ChatSpaceLinkData").msgclass + MeetSpaceLinkData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.MeetSpaceLinkData").msgclass + MeetSpaceLinkData::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.MeetSpaceLinkData.Type").enummodule + MeetSpaceLinkData::HuddleStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.MeetSpaceLinkData.HuddleStatus").enummodule + CalendarEventLinkData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.CalendarEventLinkData").msgclass AnnotationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.AnnotationType").enummodule end end diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/annotation.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/annotation.rb index ed675094a359..9e07840b5254 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/annotation.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/annotation.rb @@ -21,9 +21,10 @@ module Google module Apps module Chat module V1 - # Output only. Annotations associated with the plain-text body of the message. - # To add basic formatting to a text message, see - # [Format text + # Output only. Annotations can be associated with the plain-text body of the + # message or with chips that link to Google Workspace resources like Google + # Docs or Sheets with `start_index` and `length` of 0. To add basic formatting + # to a text message, see [Format text # messages](https://developers.google.com/workspace/chat/format-messages). # # Example plain-text message body: @@ -58,7 +59,7 @@ module V1 # @!attribute [rw] length # @return [::Integer] # Length of the substring in the plain-text message body this annotation - # corresponds to. + # corresponds to. If not present, indicates a length of 0. # @!attribute [rw] user_mention # @return [::Google::Apps::Chat::V1::UserMentionMetadata] # The metadata of user mention. @@ -139,7 +140,10 @@ module Type end end - # A rich link to a resource. + # A rich link to a resource. Rich links can be associated with the plain-text + # body of the message or represent chips that link to Google Workspace + # resources like Google Docs or Sheets with `start_index` and `length` + # of 0. # @!attribute [rw] uri # @return [::String] # The URI of this link. @@ -150,12 +154,22 @@ module Type # @return [::Google::Apps::Chat::V1::DriveLinkData] # Data for a drive link. # - # Note: The following fields are mutually exclusive: `drive_link_data`, `chat_space_link_data`. 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: `drive_link_data`, `chat_space_link_data`, `meet_space_link_data`, `calendar_event_link_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chat_space_link_data # @return [::Google::Apps::Chat::V1::ChatSpaceLinkData] # Data for a chat space link. # - # Note: The following fields are mutually exclusive: `chat_space_link_data`, `drive_link_data`. 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: `chat_space_link_data`, `drive_link_data`, `meet_space_link_data`, `calendar_event_link_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] meet_space_link_data + # @return [::Google::Apps::Chat::V1::MeetSpaceLinkData] + # Data for a Meet space link. + # + # Note: The following fields are mutually exclusive: `meet_space_link_data`, `drive_link_data`, `chat_space_link_data`, `calendar_event_link_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] calendar_event_link_data + # @return [::Google::Apps::Chat::V1::CalendarEventLinkData] + # Data for a Calendar event link. + # + # Note: The following fields are mutually exclusive: `calendar_event_link_data`, `drive_link_data`, `chat_space_link_data`, `meet_space_link_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. class RichLinkMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -170,6 +184,12 @@ module RichLinkType # A Chat space rich link type. For example, a space smart chip. CHAT_SPACE = 2 + + # A Meet message rich link type. For example, a Meet chip. + MEET_SPACE = 4 + + # A Calendar message rich link type. For example, a Calendar chip. + CALENDAR_EVENT = 5 end end @@ -217,6 +237,67 @@ class ChatSpaceLinkData extend ::Google::Protobuf::MessageExts::ClassMethods end + # Data for Meet space links. + # @!attribute [rw] meeting_code + # @return [::String] + # Meeting code of the linked Meet space. + # @!attribute [rw] type + # @return [::Google::Apps::Chat::V1::MeetSpaceLinkData::Type] + # Indicates the type of the Meet space. + # @!attribute [r] huddle_status + # @return [::Google::Apps::Chat::V1::MeetSpaceLinkData::HuddleStatus] + # Optional. Output only. If the Meet is a Huddle, indicates the status of the + # huddle. Otherwise, this is unset. + class MeetSpaceLinkData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the Meet space. + module Type + # Default value for the enum. Don't use. + TYPE_UNSPECIFIED = 0 + + # The Meet space is a meeting. + MEETING = 1 + + # The Meet space is a huddle. + HUDDLE = 2 + end + + # The status of the huddle + module HuddleStatus + # Default value for the enum. Don't use. + HUDDLE_STATUS_UNSPECIFIED = 0 + + # The huddle has started. + STARTED = 1 + + # The huddle has ended. In this case the Meet space URI and identifiers + # will no longer be valid. + ENDED = 2 + + # The huddle has been missed. In this case the Meet space URI and + # identifiers will no longer be valid. + MISSED = 3 + end + end + + # Data for Calendar event links. + # @!attribute [rw] calendar_id + # @return [::String] + # The [Calendar + # identifier](https://developers.google.com/workspace/calendar/api/v3/reference/calendars) + # of the linked Calendar. + # @!attribute [rw] event_id + # @return [::String] + # The [Event + # identifier](https://developers.google.com/workspace/calendar/api/v3/reference/events) + # of the linked Calendar event. + class CalendarEventLinkData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Type of the annotation. module AnnotationType # Default value for the enum. Don't use. diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/message.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/message.rb index 6102bf93d93c..e122397bfc02 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/message.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/message.rb @@ -124,7 +124,9 @@ module V1 # [Card builder](https://addons.gsuite.google.com/uikit/builder) # @!attribute [r] annotations # @return [::Array<::Google::Apps::Chat::V1::Annotation>] - # Output only. Annotations associated with the `text` in this message. + # Output only. Annotations can be associated with the plain-text body of the + # message or with chips that link to Google Workspace resources like Google + # Docs or Sheets with `start_index` and `length` of 0. # @!attribute [rw] thread # @return [::Google::Apps::Chat::V1::Thread] # The thread the message belongs to. For example usage, see From 9acd791a3567c49737553035227f9400a45d2080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Thu, 24 Jul 2025 10:28:12 -0700 Subject: [PATCH 290/457] chore: create pubsub v3 migration guide (#30680) --- google-cloud-pubsub/MIGRATION_GUIDE.md | 351 +++++++++++++++++++++++++ 1 file changed, 351 insertions(+) create mode 100644 google-cloud-pubsub/MIGRATION_GUIDE.md diff --git a/google-cloud-pubsub/MIGRATION_GUIDE.md b/google-cloud-pubsub/MIGRATION_GUIDE.md new file mode 100644 index 000000000000..7b45f0766677 --- /dev/null +++ b/google-cloud-pubsub/MIGRATION_GUIDE.md @@ -0,0 +1,351 @@ +# Ruby Pub/Sub V3 Migration Guide + +This page summarizes the changes needed to migrate from `google-cloud-pubsub` +`v2.x` to `google-cloud-pubsub` `v3.x`. +In line with [Google's Breaking Change Policy](https://opensource.google/documentation/policies/library-breaking-change), +we plan to support the existing `v2.x` library until July 31st, 2026 (12 months from the `v3.x` release), +including bug and security patches, but it will not receive new features. + +Note that this is a major version bump that includes breaking changes for the +Ruby library specifically, but the Pub/Sub API itself remains the same. + +## Overview + +This major version update involves several significant changes to the Ruby Pub/Sub client library: + +1. **Removal of handwritten resource management APIs**: +The APIs for resource management, also known as admin operations, have been replaced with +auto-generated clients. Using these generated clients ensures you have access to the latest +features and updates to the API. +2. **Service Renaming**: +The `Publisher` and `Subscriber` services within the auto-generated layer have +been renamed to `TopicAdmin` and `SubscriptionAdmin`, respectively. +3. **Restructured Publishing and Subscribing**: +To better reflect their purpose, `Publisher` and `Subscriber` objects now exclusively +handle publishing and receiving messages. These operations were formerly handled +by `Topic` and `Subscription`. +4. **Auto-generated Client Exposure**: +The `TopicAdmin::Client`, `SubscriptionAdmin::Client`, and `SchemaService::Client` are now directly +accessible from `Google::Cloud::PubSub::Project`. + +## Admin Operations + +The Pub/Sub admin plane, also known as the control plane, handles the lifecycle of server-side +resources like topics, subscriptions, and schemas. This API consists of admin operations such +as creating, getting, updating, and deleting these resources. + +One of the key differences between version `2.x` and `3.x` is the change to the admin API. +The handwritten methods have been removed, and the new way to make admin calls is through +auto-generated clients. You can access them directly from a `Google::Cloud::PubSub::Project` object. + +```ruby +pubsub = Google::Cloud::PubSub.new + +# Get the auto-generated client for managing topic resources +topic_admin = pubsub.topic_admin + +# Get the auto-generated client for managing subscription resources +subscription_admin = pubsub.subscription_admin + +# Get the auto-generated client for managing schema resources +schema_admin = pubsub.schema +``` + +There is a mostly one-to-one mapping of existing admin methods to the new admin methods. +A notable exception is that the auto-generated admin library does not provide an `exists?` method. +The recommended pattern is to optimistically perform an operation like `get_topic` and handle +the incoming error (e.g. `Google::Cloud::NotFoundError`) if the resource does not exist. + +The new admin clients use a standard gRPC request/response format. A key difference is that requests +now require the fully qualified resource name instead of just the resource ID. +It is easiest to use the provided helper methods (such as `topic_path`, +`subscription_path` and `schema_path`) to generate these names. + +Here are examples of the differences between version `2.x` and `3.x`: + +### Creating a Topic + +`v2.x`: + +```ruby +# topic_id = "your-topic-id" +pubsub = Google::Cloud::PubSub.new + +topic = pubsub.create_topic topic_id +``` + +`v3.x`: + +```ruby +# topic_id = "your-topic-id" +pubsub = Google::Cloud::PubSub.new + +topic_admin = pubsub.topic_admin + +topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) +``` + +### Deleting a Topic + +`v2.x`: + +```ruby +# topic_id = "your-topic-id" +pubsub = Google::Cloud::Pubsub.new + +topic = pubsub.topic topic_id + +topic.delete +``` + +`v3.x`: + +```ruby +pubsub = Google::Cloud::PubSub.new + +topic_admin = pubsub.topic_admin + +topic_admin.delete_topic topic: pubsub.topic_path(topic_id) +``` + +### Update RPCs + +Update RPCs now require passing a `FieldMask` along with the resource you are modifying. +The service uses the field mask to know which fields should be updated. +The strings passed into the update field mask should be the `snake_case` name of the field +you are editing (e.g., `dead_letter_policy`). + +If a field mask is not present, the operation applies to all fields and overrides +the entire resource. For more information on FieldMasks, refer to +[google.aip.dev/161](https://google.aip.dev/161). + +`v2.x`: + +```ruby +# subscription_id = "your-subscription-id" +pubsub = Google::Cloud::PubSub.new + +subscription = pubsub.subscription subscription_id + +subscription.remove_dead_letter_policy +``` + +`v3.x`: + +```ruby +# subscription_id = "your-subscription-id" +pubsub = Google::Cloud::PubSub.new + +subscription_admin = pubsub.subscription_admin + +subscription = subscription_admin.get_subscription \ + subscription: pubsub.subscription_path(subscription_id) + +subscription.dead_letter_policy = nil + +subscription_admin.update_subscription subscription: subscription, + update_mask: { + paths: ["dead_letter_policy"] + } +``` + +## Data Plane Operations + +In contrast with admin operations that deal with resource management, the data plane handles +the movement of data, which in Pub/Sub is the publishing and receiving of messages. + +In version 3.x, admin operations have been moved to separate auto-generated clients as illustrated +above. The data operations have not been moved, but a few of the class names have been modified to +clarify their intent. + +### Publishing Messages + +Instead of instantiating a `Topic` for data plane operations, you will now create a `Publisher`. +The `publisher` method can accept either the resource ID (e.g., `"my-topic"`) or the fully qualified +resource name (e.g., `"projects/my-project/topics/my-topic"`) for convenience. + +`v2.x`: + +```ruby +pubsub = Google::Cloud::Pubsub.new + +topic = pubsub.topic "my-topic" +topic.publish "This is a test message." +``` + +`v3.x`: + +```ruby +pubsub = Google::Cloud::Pubsub.new + +publisher = pubsub.publisher "my-topic" +publisher.publish "This is a test message." +``` + +### Receiving Messages + +Similarly, a `Subscription` object no longer manages receiving messages; that action +is now performed by a `Subscriber`. + +`v2.x`: + +```ruby +pubsub = Google::Cloud::PubSub.new + +subscription = pubsub.subscription "my-topic-sub" + +subscriber = subscription.listen do |received_message| + puts "Message: #{received_message.message.data}" + received_message.acknowledge! +end + +subscriber.start +``` + +`v3.x`: + +```ruby +pubsub = Google::Cloud::PubSub.new + +subscriber = pubsub.subscriber "my-topic-sub" + +listener = subscriber.listen do |received_message| + puts "Message: #{received_message.message.data}" + received_message.acknowledge! +end + +listener.start +``` + +Admin operations like `create_topic` no longer return an object that can perform data operations. +Consequently, after creating the topic resource, you must separately instantiate a `Publisher` client +to publish messages. The following example illustrates the new workflow: + +```ruby +# topic_id = "your-topic-id" +pubsub = Google::Cloud::PubSub.new + +# 1. Create the topic using the admin client +topic_admin = pubsub.topic_admin + +topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + +# 2. Instantiate a publisher to publish messages +publisher = pubsub.publisher topic.name + +publisher.publish "This is a message." +``` + + +## FAQs + +### Why is the admin API surface changing? + +One of the primary goals is to reduce confusion between the data plane and admin plane surfaces. +Creating a topic is a server-side operation, while creating a publisher is a client-side +operation; this separation makes the library's behavior more explicit. +Additionally, replacing handwritten admin operations with auto-generated clients ensures more +timely availability of the latest features. + +### What is required for migration? + +Migration primarily involves the following: + +1. Replacing `topic` and `subscription` instantiations with `publisher` and `subscriber` +for publishing and receiving messages. +2. Rewriting admin operations (i.e. `create_topic`, `delete_subscription`, etc.) to use +the new admin clients (e.g. `topic_admin`, `subscription_admin`). +3. Updating code that creates a resource and then uses the returned object for data plane calls. +You will now need to instantiate a `Publisher` or `Subscriber` separately after the resource is created. + +## Appendix: Method Mappings + +The following tables provide a mapping from the `v2.x` methods to their `v3.x` equivalents. + +### Topic + +| `v2.x` | `v3.x` | +| ------ | ------ | +| name | TopicAdmin::Client.get_topic | +| labels | TopicAdmin::Client.get_topic | +| labels= | TopicAdmin::Client.update_topic | +| kms_key | TopicAdmin::Client.get_topic | +| kms_key= | TopicAdmin::Client.update_topic | +| persistence_regions | TopicAdmin::Client.get_topic | +| persistence_regions= | TopicAdmin::Client.update_topic | +| schema_name | TopicAdmin::Client.get_topic | +| message_encoding | TopicAdmin::Client.get_topic | +| retention | TopicAdmin::Client.get_topic | +| retention= | TopicAdmin::Client.update_topic | +| delete | TopicAdmin::Client.delete_topic | +| subscribe | SubscriptionAdmin::Client.create_subscription | +| subscription | SubscriptionAdmin::Client.get_subscription | +| subscriptions | SubscriptionAdmin::Client.list_topic_subscriptions | + + +### Subscription + +| `v2.x` | `v3.x` | +| ------ | ------ | +| name | SubscriptionAdmin::Client.get_subscription | +| topic | TopicAdmin::Client.get_topic | +| deadline | SubscriptionAdmin::Client.get_subscription | +| deadline= | SubscriptionAdmin::Client.update_subscription | +| retain_acked | SubscriptionAdmin::Client.get_subscription | +| retain_acked= | SubscriptionAdmin::Client.update_subscription | +| retention | SubscriptionAdmin::Client.get_subscription | +| retention= | SubscriptionAdmin::Client.update_subscription | +| topic_retention | SubscriptionAdmin::Client.get_subscription | +| endpoint | SubscriptionAdmin::Client.get_subscription | +| endpoint= | SubscriptionAdmin::Client.modify_push_config | +| push_config | SubscriptionAdmin::Client.update_subscription | +| bigquery_config | SubscriptionAdmin::Client.update_subscription | +| labels | SubscriptionAdmin::Client.get_subscription | +| labels= | SubscriptionAdmin::Client.update_subscription | +| expires_in | SubscriptionAdmin::Client.get_subscription | +| expires_in= | SubscriptionAdmin::Client.update_subscription | +| filter | SubscriptionAdmin::Client.get_subscription | +| dead_letter_topic | SubscriptionAdmin::Client.get_subscription **then** TopicAdmin::Client.get_topic | +| dead_letter_topic= | SubscriptionAdmin::Client.update_subscription | +| dead_letter_max_delivery_attempts | SubscriptionAdmin::Client.get_subscription | +| dead_letter_max_delivery_attempts= | SubscriptionAdmin::Client.update_subscription | +| remove_dead_letter_policy | SubscriptionAdmin::Client.update_subscription | +| retry_policy | SubscriptionAdmin::Client.get_subscription | +| retry_policy= | SubscriptionAdmin::Client.update_subscription | +| message_ordering? | SubscriptionAdmin::Client.get_subscription | +| detached? | SubscriptionAdmin::Client.get_subscription | +| delete | SubscriptionAdmin::Client.delete_subscription | +| detach | TopicAdmin::Client.detach_subscription | +| acknowledge | SubscriptionAdmin::Client.acknowledge | +| modify_ack_deadline | SubscriptionAdmin::Client.modify_ack_deadline | +| create_snapshot | SubscriptionAdmin::Client.create_snapshot | +| seek | SubscriptionAdmin::Client.seek | + +### Schema + +| `v2.x` | `v3.x` | +| ------ | ------ | +| name | SchemaService::Client.get_schema | +| type | SchemaService::Client.get_schema | +| definition | SchemaService::Client.get_schema | +| revision_id | SchemaService::Client.get_schema | +| validate_message | SchemaService::Client.validate_message | +| delete | SchemaService::Client.delete_schema | +| commit | SchemaService::Client.commit_schema | +| resource_full? | SchemaService::Client.get_schema | + + +### Project + +| `v2.x` | `v3.x` | +| ------ | ------ | +| topic | TopicAdmin::Client.get_topic | +| create_topic | TopicAdmin::Client.create_topic | +| topics | TopicAdmin::Client.list_topics | +| subscription | SubscriptionAdmin::Client.get_subscription | +| subscriptions | SubscriptionAdmin::Client.list_subscriptions | +| snapshots | SubscriptionAdmin::Client.list_snapshots | +| schema | SchemaService::Client.get_schema | +| create_schema | SchemaService::Client.create_schema | +| schemas | SchemaService::Client.list_schemas | +| valid_schema? | SchemaService::Client.validate_schema | From c5c91ce812fcddfeef4a6ac0865db22457bf1afd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 13:43:43 -0700 Subject: [PATCH 291/457] chore(main): release google-cloud-bigtable-admin-v2 1.12.0 (#30700) --- .release-please-manifest.json | 2 +- google-cloud-bigtable-admin-v2/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/bigtable/admin/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.bigtable.admin.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e6f56e108575..6ef121595513 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -163,7 +163,7 @@ "google-cloud-bigquery-storage-v1+FILLER": "0.0.0", "google-cloud-bigtable": "2.12.0", "google-cloud-bigtable+FILLER": "0.0.0", - "google-cloud-bigtable-admin-v2": "1.11.1", + "google-cloud-bigtable-admin-v2": "1.12.0", "google-cloud-bigtable-admin-v2+FILLER": "0.0.0", "google-cloud-bigtable-v2": "1.8.0", "google-cloud-bigtable-v2+FILLER": "0.0.0", diff --git a/google-cloud-bigtable-admin-v2/CHANGELOG.md b/google-cloud-bigtable-admin-v2/CHANGELOG.md index dc52e030b0ab..a150697dd797 100644 --- a/google-cloud-bigtable-admin-v2/CHANGELOG.md +++ b/google-cloud-bigtable-admin-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.12.0 (2025-07-24) + +#### Features + +* Added type support for Proto and Enum ([#30694](https://github.com/googleapis/google-cloud-ruby/issues/30694)) + ### 1.11.1 (2025-07-15) #### Documentation diff --git a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb index fb2a23ac6e51..a741369587f9 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/version.rb @@ -22,7 +22,7 @@ module Cloud module Bigtable module Admin module V2 - VERSION = "1.11.1" + VERSION = "1.12.0" end end end diff --git a/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json b/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json index 12c623f8e99e..9c2804537211 100644 --- a/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json +++ b/google-cloud-bigtable-admin-v2/snippets/snippet_metadata_google.bigtable.admin.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-bigtable-admin-v2", - "version": "1.11.1", + "version": "1.12.0", "language": "RUBY", "apis": [ { From fcd49c1981da5c1e6830937ec899549ada2984ca Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 13:44:06 -0700 Subject: [PATCH 292/457] chore(main): release google-cloud-lustre-v1 0.2.0 (#30701) --- .release-please-manifest.json | 2 +- google-cloud-lustre-v1/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/lustre/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.lustre.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6ef121595513..517d4b2637dd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -463,7 +463,7 @@ "google-cloud-logging-v2+FILLER": "0.0.0", "google-cloud-lustre": "0.1.0", "google-cloud-lustre+FILLER": "0.0.0", - "google-cloud-lustre-v1": "0.1.1", + "google-cloud-lustre-v1": "0.2.0", "google-cloud-lustre-v1+FILLER": "0.0.0", "google-cloud-maintenance-api": "0.1.0", "google-cloud-maintenance-api+FILLER": "0.0.0", diff --git a/google-cloud-lustre-v1/CHANGELOG.md b/google-cloud-lustre-v1/CHANGELOG.md index 6208129139f9..e61fa9af50fa 100644 --- a/google-cloud-lustre-v1/CHANGELOG.md +++ b/google-cloud-lustre-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 0.2.0 (2025-07-24) + +#### Features + +* Added a new instance state UPDATING ([#30687](https://github.com/googleapis/google-cloud-ruby/issues/30687)) +#### Documentation + +* Deprecated gke_support_enabled flag + ### 0.1.1 (2025-06-23) #### Bug Fixes diff --git a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/version.rb b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/version.rb index fd7b786b398c..8d6d24b58978 100644 --- a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/version.rb +++ b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Lustre module V1 - VERSION = "0.1.1" + VERSION = "0.2.0" end end end diff --git a/google-cloud-lustre-v1/snippets/snippet_metadata_google.cloud.lustre.v1.json b/google-cloud-lustre-v1/snippets/snippet_metadata_google.cloud.lustre.v1.json index 2d2af8bedee3..0ecf38ec986c 100644 --- a/google-cloud-lustre-v1/snippets/snippet_metadata_google.cloud.lustre.v1.json +++ b/google-cloud-lustre-v1/snippets/snippet_metadata_google.cloud.lustre.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-lustre-v1", - "version": "0.1.1", + "version": "0.2.0", "language": "RUBY", "apis": [ { From 7853580261c0a2778c12aea658ffffa705ad9319 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 13:44:26 -0700 Subject: [PATCH 293/457] chore(main): release google-cloud-spanner-v1 1.10.0 (#30702) --- .release-please-manifest.json | 2 +- google-cloud-spanner-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/spanner/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.spanner.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 517d4b2637dd..f2a27aeb81e4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -723,7 +723,7 @@ "google-cloud-spanner-admin-database-v1+FILLER": "0.0.0", "google-cloud-spanner-admin-instance-v1": "2.1.0", "google-cloud-spanner-admin-instance-v1+FILLER": "0.0.0", - "google-cloud-spanner-v1": "1.9.1", + "google-cloud-spanner-v1": "1.10.0", "google-cloud-spanner-v1+FILLER": "0.0.0", "google-cloud-speech": "2.0.2", "google-cloud-speech+FILLER": "0.0.0", diff --git a/google-cloud-spanner-v1/CHANGELOG.md b/google-cloud-spanner-v1/CHANGELOG.md index a56aa2cbabe9..c5e7655c689c 100644 --- a/google-cloud-spanner-v1/CHANGELOG.md +++ b/google-cloud-spanner-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.10.0 (2025-07-24) + +#### Features + +* Support for snapshot timestamp for the REPEATABLE_READ isolation level ([#30697](https://github.com/googleapis/google-cloud-ruby/issues/30697)) + ### 1.9.1 (2025-07-15) #### Documentation diff --git a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb index 39cffd0eb3cc..034a8b668005 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Spanner module V1 - VERSION = "1.9.1" + VERSION = "1.10.0" end end end diff --git a/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json b/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json index a7bd0e885af6..19ceae5221c2 100644 --- a/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json +++ b/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-spanner-v1", - "version": "1.9.1", + "version": "1.10.0", "language": "RUBY", "apis": [ { From 0f2ed672fb4406db91030720745789f3bf8e0b13 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 13:45:54 -0700 Subject: [PATCH 294/457] chore(main): release google-cloud-policy_simulator 1.3.0 (#30705) --- .release-please-manifest.json | 2 +- google-cloud-policy_simulator/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/policy_simulator/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f2a27aeb81e4..807b9784ec18 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -583,7 +583,7 @@ "google-cloud-phishing_protection+FILLER": "0.0.0", "google-cloud-phishing_protection-v1beta1": "0.12.0", "google-cloud-phishing_protection-v1beta1+FILLER": "0.0.0", - "google-cloud-policy_simulator": "1.2.1", + "google-cloud-policy_simulator": "1.3.0", "google-cloud-policy_simulator+FILLER": "0.0.0", "google-cloud-policy_simulator-v1": "1.3.0", "google-cloud-policy_simulator-v1+FILLER": "0.0.0", diff --git a/google-cloud-policy_simulator/CHANGELOG.md b/google-cloud-policy_simulator/CHANGELOG.md index 7b0f28965812..8b75f7ea4fba 100644 --- a/google-cloud-policy_simulator/CHANGELOG.md +++ b/google-cloud-policy_simulator/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.3.0 (2025-07-24) + +#### Features + +* Support for OrgPolicyViolationsPreviewService ([#30698](https://github.com/googleapis/google-cloud-ruby/issues/30698)) + ### 1.2.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-policy_simulator/lib/google/cloud/policy_simulator/version.rb b/google-cloud-policy_simulator/lib/google/cloud/policy_simulator/version.rb index 49b0d8a640ee..4d54a82f7dfb 100644 --- a/google-cloud-policy_simulator/lib/google/cloud/policy_simulator/version.rb +++ b/google-cloud-policy_simulator/lib/google/cloud/policy_simulator/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module PolicySimulator - VERSION = "1.2.1" + VERSION = "1.3.0" end end end From 0036d52c9e2d667a8a83ecc2deb65f65db2e33df Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 13:46:13 -0700 Subject: [PATCH 295/457] chore(main): release google-cloud-policy_simulator-v1 1.4.0 (#30711) --- .release-please-manifest.json | 2 +- google-cloud-policy_simulator-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/policy_simulator/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.policysimulator.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 807b9784ec18..c8806108098c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -585,7 +585,7 @@ "google-cloud-phishing_protection-v1beta1+FILLER": "0.0.0", "google-cloud-policy_simulator": "1.3.0", "google-cloud-policy_simulator+FILLER": "0.0.0", - "google-cloud-policy_simulator-v1": "1.3.0", + "google-cloud-policy_simulator-v1": "1.4.0", "google-cloud-policy_simulator-v1+FILLER": "0.0.0", "google-cloud-policy_troubleshooter": "1.7.1", "google-cloud-policy_troubleshooter+FILLER": "0.0.0", diff --git a/google-cloud-policy_simulator-v1/CHANGELOG.md b/google-cloud-policy_simulator-v1/CHANGELOG.md index f1529811cc83..a9031f9efe0e 100644 --- a/google-cloud-policy_simulator-v1/CHANGELOG.md +++ b/google-cloud-policy_simulator-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.4.0 (2025-07-24) + +#### Features + +* Support for OrgPolicyViolationsPreview resources ([#30699](https://github.com/googleapis/google-cloud-ruby/issues/30699)) + ### 1.3.0 (2025-05-12) #### Features diff --git a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/version.rb b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/version.rb index b8e247d96f0c..1f748176e8ef 100644 --- a/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/version.rb +++ b/google-cloud-policy_simulator-v1/lib/google/cloud/policy_simulator/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module PolicySimulator module V1 - VERSION = "1.3.0" + VERSION = "1.4.0" end end end diff --git a/google-cloud-policy_simulator-v1/snippets/snippet_metadata_google.cloud.policysimulator.v1.json b/google-cloud-policy_simulator-v1/snippets/snippet_metadata_google.cloud.policysimulator.v1.json index 46df9e855b3d..a081bcd56e46 100644 --- a/google-cloud-policy_simulator-v1/snippets/snippet_metadata_google.cloud.policysimulator.v1.json +++ b/google-cloud-policy_simulator-v1/snippets/snippet_metadata_google.cloud.policysimulator.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-policy_simulator-v1", - "version": "1.3.0", + "version": "1.4.0", "language": "RUBY", "apis": [ { From 02f2cbebd160922e5e5e7fe3a4256502fb5a5ca0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 13:46:58 -0700 Subject: [PATCH 296/457] chore(main): release google-cloud-datastore 2.13.0 (#30710) --- .release-please-manifest.json | 2 +- google-cloud-datastore/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/datastore/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c8806108098c..7f9eccb8e083 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -293,7 +293,7 @@ "google-cloud-dataqna+FILLER": "0.0.0", "google-cloud-dataqna-v1alpha": "0.10.0", "google-cloud-dataqna-v1alpha+FILLER": "0.0.0", - "google-cloud-datastore": "2.12.0", + "google-cloud-datastore": "2.13.0", "google-cloud-datastore+FILLER": "0.0.0", "google-cloud-datastore-admin": "0.5.1", "google-cloud-datastore-admin+FILLER": "0.0.0", diff --git a/google-cloud-datastore/CHANGELOG.md b/google-cloud-datastore/CHANGELOG.md index 60492763dedd..801e9601b71f 100644 --- a/google-cloud-datastore/CHANGELOG.md +++ b/google-cloud-datastore/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.13.0 (2025-07-24) + +#### Features + +* add explain query features to aggregate query in Cloud Datastore ([#30704](https://github.com/googleapis/google-cloud-ruby/issues/30704)) + ### 2.12.0 (2025-07-15) #### Features diff --git a/google-cloud-datastore/lib/google/cloud/datastore/version.rb b/google-cloud-datastore/lib/google/cloud/datastore/version.rb index 7d88897b8e14..dfd750ab96d4 100644 --- a/google-cloud-datastore/lib/google/cloud/datastore/version.rb +++ b/google-cloud-datastore/lib/google/cloud/datastore/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Datastore - VERSION = "2.12.0".freeze + VERSION = "2.13.0".freeze end end end From 78b7a33dd12bb22c396e6bb6d20963de27f8463a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 14:18:08 -0700 Subject: [PATCH 297/457] feat: Publish Proto and Enum types to CBT data API (#30726) PiperOrigin-RevId: 786403430 --- .../lib/google/bigtable/v2/types_pb.rb | 4 +- .../proto_docs/google/bigtable/v2/types.rb | 62 +++++++++++++++---- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb b/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb index 108ccdfb9b38..1fc882dc15be 100644 --- a/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb +++ b/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb @@ -7,7 +7,7 @@ require 'google/api/field_behavior_pb' -descriptor_data = "\n\x1egoogle/bigtable/v2/types.proto\x12\x12google.bigtable.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe0\x10\n\x04Type\x12\x34\n\nbytes_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.BytesH\x00\x12\x36\n\x0bstring_type\x18\x02 \x01(\x0b\x32\x1f.google.bigtable.v2.Type.StringH\x00\x12\x34\n\nint64_type\x18\x05 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.Int64H\x00\x12\x38\n\x0c\x66loat32_type\x18\x0c \x01(\x0b\x32 .google.bigtable.v2.Type.Float32H\x00\x12\x38\n\x0c\x66loat64_type\x18\t \x01(\x0b\x32 .google.bigtable.v2.Type.Float64H\x00\x12\x32\n\tbool_type\x18\x08 \x01(\x0b\x32\x1d.google.bigtable.v2.Type.BoolH\x00\x12<\n\x0etimestamp_type\x18\n \x01(\x0b\x32\".google.bigtable.v2.Type.TimestampH\x00\x12\x32\n\tdate_type\x18\x0b \x01(\x0b\x32\x1d.google.bigtable.v2.Type.DateH\x00\x12<\n\x0e\x61ggregate_type\x18\x06 \x01(\x0b\x32\".google.bigtable.v2.Type.AggregateH\x00\x12\x36\n\x0bstruct_type\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v2.Type.StructH\x00\x12\x34\n\narray_type\x18\x03 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.ArrayH\x00\x12\x30\n\x08map_type\x18\x04 \x01(\x0b\x32\x1c.google.bigtable.v2.Type.MapH\x00\x1a\x9d\x01\n\x05\x42ytes\x12\x39\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Bytes.Encoding\x1aY\n\x08\x45ncoding\x12:\n\x03raw\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.Type.Bytes.Encoding.RawH\x00\x1a\x05\n\x03RawB\n\n\x08\x65ncoding\x1a\x8d\x02\n\x06String\x12:\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32(.google.bigtable.v2.Type.String.Encoding\x1a\xc6\x01\n\x08\x45ncoding\x12H\n\x08utf8_raw\x18\x01 \x01(\x0b\x32\x30.google.bigtable.v2.Type.String.Encoding.Utf8RawB\x02\x18\x01H\x00\x12H\n\nutf8_bytes\x18\x02 \x01(\x0b\x32\x32.google.bigtable.v2.Type.String.Encoding.Utf8BytesH\x00\x1a\r\n\x07Utf8Raw:\x02\x18\x01\x1a\x0b\n\tUtf8BytesB\n\n\x08\x65ncoding\x1a\xf5\x01\n\x05Int64\x12\x39\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Int64.Encoding\x1a\xb0\x01\n\x08\x45ncoding\x12R\n\x10\x62ig_endian_bytes\x18\x01 \x01(\x0b\x32\x36.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesH\x00\x1a\x44\n\x0e\x42igEndianBytes\x12\x32\n\nbytes_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.BytesB\n\n\x08\x65ncoding\x1a\x06\n\x04\x42ool\x1a\t\n\x07\x46loat32\x1a\t\n\x07\x46loat64\x1a\x0b\n\tTimestamp\x1a\x06\n\x04\x44\x61te\x1a\x84\x01\n\x06Struct\x12\x35\n\x06\x66ields\x18\x01 \x03(\x0b\x32%.google.bigtable.v2.Type.Struct.Field\x1a\x43\n\x05\x46ield\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12&\n\x04type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a\x37\n\x05\x41rray\x12.\n\x0c\x65lement_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a_\n\x03Map\x12*\n\x08key_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12,\n\nvalue_type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a\xb7\x03\n\tAggregate\x12,\n\ninput_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12\x31\n\nstate_type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.TypeB\x03\xe0\x41\x03\x12\x35\n\x03sum\x18\x04 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.SumH\x00\x12_\n\x12hllpp_unique_count\x18\x05 \x01(\x0b\x32\x41.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountH\x00\x12\x35\n\x03max\x18\x06 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.MaxH\x00\x12\x35\n\x03min\x18\x07 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.MinH\x00\x1a\x05\n\x03Sum\x1a\x05\n\x03Max\x1a\x05\n\x03Min\x1a \n\x1eHyperLogLogPlusPlusUniqueCountB\x0c\n\naggregatorB\x06\n\x04kindB\xb4\x01\n\x16\x63om.google.bigtable.v2B\nTypesProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" +descriptor_data = "\n\x1egoogle/bigtable/v2/types.proto\x12\x12google.bigtable.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xb8\x12\n\x04Type\x12\x34\n\nbytes_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.BytesH\x00\x12\x36\n\x0bstring_type\x18\x02 \x01(\x0b\x32\x1f.google.bigtable.v2.Type.StringH\x00\x12\x34\n\nint64_type\x18\x05 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.Int64H\x00\x12\x38\n\x0c\x66loat32_type\x18\x0c \x01(\x0b\x32 .google.bigtable.v2.Type.Float32H\x00\x12\x38\n\x0c\x66loat64_type\x18\t \x01(\x0b\x32 .google.bigtable.v2.Type.Float64H\x00\x12\x32\n\tbool_type\x18\x08 \x01(\x0b\x32\x1d.google.bigtable.v2.Type.BoolH\x00\x12<\n\x0etimestamp_type\x18\n \x01(\x0b\x32\".google.bigtable.v2.Type.TimestampH\x00\x12\x32\n\tdate_type\x18\x0b \x01(\x0b\x32\x1d.google.bigtable.v2.Type.DateH\x00\x12<\n\x0e\x61ggregate_type\x18\x06 \x01(\x0b\x32\".google.bigtable.v2.Type.AggregateH\x00\x12\x36\n\x0bstruct_type\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v2.Type.StructH\x00\x12\x34\n\narray_type\x18\x03 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.ArrayH\x00\x12\x30\n\x08map_type\x18\x04 \x01(\x0b\x32\x1c.google.bigtable.v2.Type.MapH\x00\x12\x34\n\nproto_type\x18\r \x01(\x0b\x32\x1e.google.bigtable.v2.Type.ProtoH\x00\x12\x32\n\tenum_type\x18\x0e \x01(\x0b\x32\x1d.google.bigtable.v2.Type.EnumH\x00\x1a\x9d\x01\n\x05\x42ytes\x12\x39\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Bytes.Encoding\x1aY\n\x08\x45ncoding\x12:\n\x03raw\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.Type.Bytes.Encoding.RawH\x00\x1a\x05\n\x03RawB\n\n\x08\x65ncoding\x1a\x8d\x02\n\x06String\x12:\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32(.google.bigtable.v2.Type.String.Encoding\x1a\xc6\x01\n\x08\x45ncoding\x12H\n\x08utf8_raw\x18\x01 \x01(\x0b\x32\x30.google.bigtable.v2.Type.String.Encoding.Utf8RawB\x02\x18\x01H\x00\x12H\n\nutf8_bytes\x18\x02 \x01(\x0b\x32\x32.google.bigtable.v2.Type.String.Encoding.Utf8BytesH\x00\x1a\r\n\x07Utf8Raw:\x02\x18\x01\x1a\x0b\n\tUtf8BytesB\n\n\x08\x65ncoding\x1a\xf5\x01\n\x05Int64\x12\x39\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Int64.Encoding\x1a\xb0\x01\n\x08\x45ncoding\x12R\n\x10\x62ig_endian_bytes\x18\x01 \x01(\x0b\x32\x36.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesH\x00\x1a\x44\n\x0e\x42igEndianBytes\x12\x32\n\nbytes_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.BytesB\n\n\x08\x65ncoding\x1a\x06\n\x04\x42ool\x1a\t\n\x07\x46loat32\x1a\t\n\x07\x46loat64\x1a\x0b\n\tTimestamp\x1a\x06\n\x04\x44\x61te\x1a\x84\x01\n\x06Struct\x12\x35\n\x06\x66ields\x18\x01 \x03(\x0b\x32%.google.bigtable.v2.Type.Struct.Field\x1a\x43\n\x05\x46ield\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12&\n\x04type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a\x37\n\x05Proto\x12\x18\n\x10schema_bundle_id\x18\x01 \x01(\t\x12\x14\n\x0cmessage_name\x18\x02 \x01(\t\x1a\x33\n\x04\x45num\x12\x18\n\x10schema_bundle_id\x18\x01 \x01(\t\x12\x11\n\tenum_name\x18\x02 \x01(\t\x1a\x37\n\x05\x41rray\x12.\n\x0c\x65lement_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a_\n\x03Map\x12*\n\x08key_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12,\n\nvalue_type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a\xb7\x03\n\tAggregate\x12,\n\ninput_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12\x31\n\nstate_type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.TypeB\x03\xe0\x41\x03\x12\x35\n\x03sum\x18\x04 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.SumH\x00\x12_\n\x12hllpp_unique_count\x18\x05 \x01(\x0b\x32\x41.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountH\x00\x12\x35\n\x03max\x18\x06 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.MaxH\x00\x12\x35\n\x03min\x18\x07 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.MinH\x00\x1a\x05\n\x03Sum\x1a\x05\n\x03Max\x1a\x05\n\x03Min\x1a \n\x1eHyperLogLogPlusPlusUniqueCountB\x0c\n\naggregatorB\x06\n\x04kindB\xb4\x01\n\x16\x63om.google.bigtable.v2B\nTypesProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -55,6 +55,8 @@ module V2 Type::Date = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Date").msgclass Type::Struct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct").msgclass Type::Struct::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Field").msgclass + Type::Proto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Proto").msgclass + Type::Enum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Enum").msgclass Type::Array = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Array").msgclass Type::Map = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Map").msgclass Type::Aggregate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate").msgclass diff --git a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb index 72be404185ab..c8d6b5c3bd9a 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb @@ -49,62 +49,72 @@ module V2 # @return [::Google::Cloud::Bigtable::V2::Type::Bytes] # Bytes # - # Note: The following fields are mutually exclusive: `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] string_type # @return [::Google::Cloud::Bigtable::V2::Type::String] # String # - # Note: The following fields are mutually exclusive: `string_type`, `bytes_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `string_type`, `bytes_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] int64_type # @return [::Google::Cloud::Bigtable::V2::Type::Int64] # Int64 # - # Note: The following fields are mutually exclusive: `int64_type`, `bytes_type`, `string_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `int64_type`, `bytes_type`, `string_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] float32_type # @return [::Google::Cloud::Bigtable::V2::Type::Float32] # Float32 # - # Note: The following fields are mutually exclusive: `float32_type`, `bytes_type`, `string_type`, `int64_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `float32_type`, `bytes_type`, `string_type`, `int64_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] float64_type # @return [::Google::Cloud::Bigtable::V2::Type::Float64] # Float64 # - # Note: The following fields are mutually exclusive: `float64_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `float64_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bool_type # @return [::Google::Cloud::Bigtable::V2::Type::Bool] # Bool # - # Note: The following fields are mutually exclusive: `bool_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `bool_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] timestamp_type # @return [::Google::Cloud::Bigtable::V2::Type::Timestamp] # Timestamp # - # Note: The following fields are mutually exclusive: `timestamp_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `timestamp_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] date_type # @return [::Google::Cloud::Bigtable::V2::Type::Date] # Date # - # Note: The following fields are mutually exclusive: `date_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`. 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: `date_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] aggregate_type # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate] # Aggregate # - # Note: The following fields are mutually exclusive: `aggregate_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `struct_type`, `array_type`, `map_type`. 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: `aggregate_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] struct_type # @return [::Google::Cloud::Bigtable::V2::Type::Struct] # Struct # - # Note: The following fields are mutually exclusive: `struct_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `array_type`, `map_type`. 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: `struct_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] array_type # @return [::Google::Cloud::Bigtable::V2::Type::Array] # Array # - # Note: The following fields are mutually exclusive: `array_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `map_type`. 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: `array_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] map_type # @return [::Google::Cloud::Bigtable::V2::Type::Map] # Map # - # Note: The following fields are mutually exclusive: `map_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`. 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: `map_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] proto_type + # @return [::Google::Cloud::Bigtable::V2::Type::Proto] + # Proto + # + # Note: The following fields are mutually exclusive: `proto_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] enum_type + # @return [::Google::Cloud::Bigtable::V2::Type::Enum] + # Enum + # + # Note: The following fields are mutually exclusive: `enum_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Type include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -278,6 +288,34 @@ class Field end end + # A protobuf message type. + # Values of type `Proto` are stored in `Value.bytes_value`. + # @!attribute [rw] schema_bundle_id + # @return [::String] + # The ID of the schema bundle that this proto is defined in. + # @!attribute [rw] message_name + # @return [::String] + # The fully qualified name of the protobuf message, including package. In + # the format of "foo.bar.Message". + class Proto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A protobuf enum type. + # Values of type `Enum` are stored in `Value.int_value`. + # @!attribute [rw] schema_bundle_id + # @return [::String] + # The ID of the schema bundle that this enum is defined in. + # @!attribute [rw] enum_name + # @return [::String] + # The fully qualified name of the protobuf enum message, including package. + # In the format of "foo.bar.EnumMessage". + class Enum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # An ordered list of elements of a given type. # Values of type `Array` are stored in `Value.array_value`. # @!attribute [rw] element_type From e8c98ea9724882e94cefec2dfc3f93b5df13913e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Thu, 24 Jul 2025 15:23:48 -0700 Subject: [PATCH 298/457] feat!: Remove Policy and RetryPolicy in favor of auto-generated counterparts (#30725) chore: Update PubSub doctests to new API --- .../lib/google-cloud-pubsub.rb | 9 +- .../lib/google/cloud/pubsub.rb | 21 +- .../google/cloud/pubsub/async_publisher.rb | 6 +- .../google/cloud/pubsub/batch_publisher.rb | 8 +- .../lib/google/cloud/pubsub/message.rb | 12 +- .../lib/google/cloud/pubsub/policy.rb | 188 ----- .../lib/google/cloud/pubsub/project.rb | 4 +- .../lib/google/cloud/pubsub/publisher.rb | 7 +- .../google/cloud/pubsub/received_message.rb | 16 +- .../lib/google/cloud/pubsub/retry_policy.rb | 88 -- .../lib/google/cloud/pubsub/subscriber.rb | 20 +- google-cloud-pubsub/support/doctest_helper.rb | 780 ++++-------------- .../test/google/cloud/pubsub_test.rb | 2 +- 13 files changed, 203 insertions(+), 958 deletions(-) delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/policy.rb delete mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/retry_policy.rb diff --git a/google-cloud-pubsub/lib/google-cloud-pubsub.rb b/google-cloud-pubsub/lib/google-cloud-pubsub.rb index 5cdcdb4a0e3f..a6412dcb711e 100644 --- a/google-cloud-pubsub/lib/google-cloud-pubsub.rb +++ b/google-cloud-pubsub/lib/google-cloud-pubsub.rb @@ -50,8 +50,9 @@ module Cloud # # gcloud = Google::Cloud.new # pubsub = gcloud.pubsub - # topic = pubsub.topic "my-topic" - # topic.publish "task completed" + # topic_admin = pubsub.topic_admin + # publisher = pubsub.publisher "my-topic" + # publisher.publish "task completed" # # @example The default scope can be overridden with the `scope` option: # require "google/cloud" @@ -96,8 +97,8 @@ def pubsub scope: nil, timeout: nil # # pubsub = Google::Cloud.pubsub # - # topic = pubsub.topic "my-topic" - # topic.publish "task completed" + # publisher = pubsub.publisher "my-topic" + # publisher.publish "task completed" # def self.pubsub project_id = nil, credentials = nil, diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub.rb b/google-cloud-pubsub/lib/google/cloud/pubsub.rb index 36dfd3f63168..f4f4319757c3 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub.rb @@ -59,9 +59,6 @@ module PubSub # If the param is nil, uses the default endpoint. # @param [String] emulator_host Pub/Sub emulator host. Optional. # If the param is nil, uses the value of the `emulator_host` config. - # @param [String] project Alias for the `project_id` argument. Deprecated. - # @param [String] keyfile Alias for the `credentials` argument. - # Deprecated. # @param universe_domain [String] A custom universe domain. Optional. # # @return [Google::Cloud::PubSub::Project] @@ -71,8 +68,8 @@ module PubSub # # pubsub = Google::Cloud::PubSub.new # - # topic = pubsub.topic "my-topic" - # topic.publish "task completed" + # publisher = pubsub.publisher "my-topic" + # publisher.publish "task completed" # def self.new project_id: nil, credentials: nil, @@ -80,10 +77,8 @@ def self.new project_id: nil, timeout: nil, universe_domain: nil, endpoint: nil, - emulator_host: nil, - project: nil, - keyfile: nil - project_id ||= project || default_project_id + emulator_host: nil + project_id ||= default_project_id scope ||= configure.scope timeout ||= configure.timeout endpoint ||= configure.endpoint @@ -94,7 +89,7 @@ def self.new project_id: nil, credentials = :this_channel_is_insecure endpoint = emulator_host else - credentials ||= keyfile || default_credentials(scope: scope) + credentials ||= default_credentials scope: scope unless credentials.is_a? Google::Auth::Credentials credentials = PubSub::Credentials.new credentials, scope: scope end @@ -116,12 +111,10 @@ def self.new project_id: nil, # # The following PubSub configuration parameters are supported: # - # * `project_id` - (String) Identifier for a PubSub project. (The - # parameter `project` is considered deprecated, but may also be used.) + # * `project_id` - (String) Identifier for a PubSub project. # * `credentials` - (String, Hash, Google::Auth::Credentials) The path to # the keyfile as a String, the contents of the keyfile as a Hash, or a - # Google::Auth::Credentials object. (See {PubSub::Credentials}) (The - # parameter `keyfile` is considered deprecated, but may also be used.) + # Google::Auth::Credentials object. (See {PubSub::Credentials}) # * `scope` - (String, Array) The OAuth 2.0 scopes controlling # the set of resources and operations that the connection can access. # * `quota_project` - (String) The project ID for a project that can be diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/async_publisher.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/async_publisher.rb index 7b7fba613058..67becf27b7b0 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/async_publisher.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/async_publisher.rb @@ -34,8 +34,8 @@ module PubSub # # pubsub = Google::Cloud::PubSub.new # - # topic = pubsub.topic "my-topic" - # topic.publish_async "task completed" do |result| + # publisher = pubsub.publisher "my-topic" + # publisher.publish_async "task completed" do |result| # if result.succeeded? # log_publish_success result.data # else @@ -43,7 +43,7 @@ module PubSub # end # end # - # topic.async_publisher.stop! + # publisher.async_publisher.stop! # # @attr_reader [String] topic_name The name of the topic the messages are published to. The value is a # fully-qualified topic name in the form `projects/{project_id}/topics/{topic_id}`. diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/batch_publisher.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/batch_publisher.rb index 77d0f7dd56a9..613312619978 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/batch_publisher.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/batch_publisher.rb @@ -27,8 +27,8 @@ module PubSub # # pubsub = Google::Cloud::PubSub.new # - # topic = pubsub.topic "my-topic" - # msgs = topic.publish do |batch_publisher| + # publisher = pubsub.publisher "my-topic" + # msgs = publisher.publish do |batch_publisher| # batch_publisher.publish "task 1 completed", foo: :bar # batch_publisher.publish "task 2 completed", foo: :baz # batch_publisher.publish "task 3 completed", foo: :bif @@ -86,8 +86,8 @@ def initialize data, # # pubsub = Google::Cloud::PubSub.new # - # topic = pubsub.topic "my-topic" - # msgs = topic.publish do |batch_publisher| + # publisher = pubsub.publisher "my-topic" + # msgs = publisher.publish do |batch_publisher| # batch_publisher.publish "task 1 completed", foo: :bar # batch_publisher.publish "task 2 completed", foo: :baz # batch_publisher.publish "task 3 completed", foo: :bif diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/message.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message.rb index ab3f499fd6f8..0ff093560693 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/message.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message.rb @@ -35,22 +35,22 @@ module PubSub # pubsub = Google::Cloud::PubSub.new # # # Publish a message - # topic = pubsub.topic "my-topic" - # message = topic.publish "task completed" + # publisher = pubsub.publisher "my-topic" + # message = publisher.publish "task completed" # message.data #=> "task completed" # # # Listen for messages - # sub = pubsub.subscription "my-topic-sub" - # subscriber = sub.listen do |received_message| + # subscriber = pubsub.subscriber "my-topic-sub" + # listener = subscriber.listen do |received_message| # # process message # received_message.acknowledge! # end # # # Start background threads that will call the block passed to listen. - # subscriber.start + # listener.start # # # Shut down the subscriber when ready to stop receiving messages. - # subscriber.stop! + # listener.stop! # class Message ## diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/policy.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/policy.rb deleted file mode 100644 index 18ffc2b790f3..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/policy.rb +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 2016 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. - - -require "google/cloud/errors" - -module Google - module Cloud - module PubSub - ## - # # Policy - # - # Represents a Cloud IAM Policy for the Pub/Sub service. - # - # A common pattern for updating a resource's metadata, such as its Policy, - # is to read the current data from the service, update the data locally, - # and then send the modified data for writing. This pattern may result in - # a conflict if two or more processes attempt the sequence simultaneously. - # IAM solves this problem with the {Google::Cloud::PubSub::Policy#etag} - # property, which is used to verify whether the policy has changed since - # the last request. When you make a request to with an `etag` value, Cloud - # IAM compares the `etag` value in the request with the existing `etag` - # value associated with the policy. It writes the policy only if the - # `etag` values match. - # - # When you update a policy, first read the policy (and its current `etag`) - # from the service, then modify the policy locally, and then write the - # modified policy to the service. See - # {Google::Cloud::PubSub::Topic#policy} and - # {Google::Cloud::PubSub::Topic#policy=}. - # - # @see https://cloud.google.com/iam/docs/managing-policies Managing - # policies - # @see https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#iampolicy - # google.iam.v1.IAMPolicy - # - # @attr [String] etag Used to verify whether the policy has changed since - # the last request. The policy will be written only if the `etag` values - # match. - # @attr [Hash{String => Array}] roles The bindings that associate - # roles with an array of members. See [Understanding - # Roles](https://cloud.google.com/iam/docs/understanding-roles) for a - # listing of primitive and curated roles. - # See [Binding](https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#binding) - # for a listing of values and patterns for members. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # topic.policy do |p| - # p.remove "roles/owner", "user:owner@example.com" - # p.add "roles/owner", "user:newowner@example.com" - # p.roles["roles/viewer"] = ["allUsers"] - # end - # - class Policy - attr_reader :etag - attr_reader :roles - - ## - # @private Creates a Policy object. - def initialize etag, roles - @etag = etag - @roles = roles - end - - ## - # Convenience method for adding a member to a binding on this policy. - # See [Understanding - # Roles](https://cloud.google.com/iam/docs/understanding-roles) for a - # listing of primitive and curated roles. - # See [Binding](https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#binding) - # for a listing of values and patterns for members. - # - # @param [String] role_name A Cloud IAM role, such as - # `"roles/pubsub.admin"`. - # @param [String] member A Cloud IAM identity, such as - # `"user:owner@example.com"`. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # topic.policy do |p| - # p.add "roles/owner", "user:newowner@example.com" - # end - # - def add role_name, member - role(role_name) << member - end - - ## - # Convenience method for removing a member from a binding on this - # policy. See [Understanding - # Roles](https://cloud.google.com/iam/docs/understanding-roles) for a - # listing of primitive and curated roles. See - # [Binding](https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#binding) - # for a listing of values and patterns for members. - # - # @param [String] role_name A Cloud IAM role, such as - # `"roles/pubsub.admin"`. - # @param [String] member A Cloud IAM identity, such as - # `"user:owner@example.com"`. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # topic.policy do |p| - # p.remove "roles/owner", "user:owner@example.com" - # end - # - def remove role_name, member - role(role_name).delete member - end - - ## - # Convenience method returning the array of members bound to a role in - # this policy, or an empty array if no value is present for the role in - # {#roles}. See [Understanding - # Roles](https://cloud.google.com/iam/docs/understanding-roles) for a - # listing of primitive and curated roles. See - # [Binding](https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#binding) - # for a listing of values and patterns for members. - # - # @return [Array] The members strings, or an empty array. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # topic = pubsub.topic "my-topic" - # - # topic.policy do |p| - # p.role("roles/viewer") << "user:viewer@example.com" - # end - # - def role role_name - roles[role_name] ||= [] - end - - ## - # @private Convert the Policy to a Google::Iam::V1::Policy object. - def to_grpc - Google::Iam::V1::Policy.new( - etag: etag, - bindings: roles.keys.map do |role_name| - next if roles[role_name].empty? - Google::Iam::V1::Binding.new( - role: role_name, - members: roles[role_name] - ) - end.compact - ) - end - - ## - # @private New Policy from a Google::Iam::V1::Policy object. - def self.from_grpc grpc - roles = grpc.bindings.each_with_object({}) do |binding, memo| - memo[binding.role] = binding.members.to_a - end - new grpc.etag, roles - end - end - end - - Pubsub = PubSub unless const_defined? :Pubsub - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb index 85ad637119da..5bbf7cb317cb 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb @@ -46,8 +46,8 @@ module PubSub # # pubsub = Google::Cloud::PubSub.new # - # topic = pubsub.topic "my-topic" - # topic.publish "task completed" + # publisher = pubsub.publisher "my-topic" + # publisher.publish "task completed" # class Project ## diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/publisher.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/publisher.rb index 546a8aaaffa6..61e1e9c37ceb 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/publisher.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/publisher.rb @@ -16,8 +16,6 @@ require "google/cloud/errors" require "google/cloud/pubsub/async_publisher" require "google/cloud/pubsub/batch_publisher" -require "google/cloud/pubsub/policy" -require "google/cloud/pubsub/retry_policy" module Google module Cloud @@ -144,8 +142,9 @@ def name # # pubsub = Google::Cloud::PubSub.new # - # publisher = pubsub.ublisher "my-topic" - # msgs = publisher.publish do |t| + # publisher = pubsub.publisher "my-topic" + # + # msgs = publisher.publish do |p| # p.publish "task 1 completed", foo: :bar # p.publish "task 2 completed", foo: :baz # p.publish "task 3 completed", foo: :bif diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb index b2b47f4c8905..24b0c93c377a 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/received_message.rb @@ -85,11 +85,17 @@ def ack_id # # pubsub = Google::Cloud::PubSub.new # - # topic = pubsub.topic "my-topic" - # dead_letter_topic = pubsub.topic "my-dead-letter-topic", skip_lookup: true - # subscriber = topic.subscribe "my-topic-sub", - # dead_letter_topic: dead_letter_topic, - # dead_letter_max_delivery_attempts: 10 + # subscription_admin = pubsub.subscription_admin + # + # subscription = subscription_admin.create_subscription \ + # name: pubsub.subscription_path("my-topic-sub"), + # topic: pubsub.topic_path("my-topic"), + # dead_letter_policy: { + # dead_letter_topic: pubsub.topic_path("my-dead-letter-topic"), + # max_delivery_attempts: 10 + # } + # + # subscriber = pubsub.subscriber "my-topic-sub" # # listener = subscriber.listen do |received_message| # puts received_message.message.delivery_attempt diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/retry_policy.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/retry_policy.rb deleted file mode 100644 index e710459b60fe..000000000000 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/retry_policy.rb +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2016 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. - - -require "google/cloud/errors" - -module Google - module Cloud - module PubSub - ## - # # RetryPolicy - # - # An immutable Retry Policy value object that specifies how Cloud Pub/Sub retries message delivery. - # - # Retry delay will be exponential based on provided minimum and maximum backoffs. (See [Exponential - # backoff](https://en.wikipedia.org/wiki/Exponential_backoff).) - # - # Retry Policy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message. - # - # Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not - # match the configuration. That is, delay can be more or less than configured backoff. - # - # @attr [Numeric] minimum_backoff The minimum delay between consecutive deliveries of a given message. Value - # should be between 0 and 600 seconds. The default value is 10 seconds. - # @attr [Numeric] maximum_backoff The maximum delay between consecutive deliveries of a given message. Value - # should be between 0 and 600 seconds. The default value is 600 seconds. - # - # @example - # require "google/cloud/pubsub" - # - # pubsub = Google::Cloud::PubSub.new - # - # sub = pubsub.subscription "my-topic-sub" - # - # sub.retry_policy = Google::Cloud::PubSub::RetryPolicy.new minimum_backoff: 5, maximum_backoff: 300 - # - # sub.retry_policy.minimum_backoff #=> 5 - # sub.retry_policy.maximum_backoff #=> 300 - # - class RetryPolicy - attr_reader :minimum_backoff - attr_reader :maximum_backoff - - ## - # Creates a new, immutable RetryPolicy value object. - # - # @attr [Numeric, nil] minimum_backoff The minimum delay between consecutive deliveries of a given message. - # Value should be between 0 and 600 seconds. If `nil` is provided, the default value is 10 seconds. - # @attr [Numeric, nil] maximum_backoff The maximum delay between consecutive deliveries of a given message. - # Value should be between 0 and 600 seconds. If `nil` is provided, the default value is 600 seconds. - # - def initialize minimum_backoff: nil, maximum_backoff: nil - @minimum_backoff = minimum_backoff - @maximum_backoff = maximum_backoff - end - - ## - # @private Convert the RetryPolicy to a Google::Cloud::PubSub::V1::RetryPolicy object. - def to_grpc - Google::Cloud::PubSub::V1::RetryPolicy.new( - minimum_backoff: Convert.number_to_duration(minimum_backoff), - maximum_backoff: Convert.number_to_duration(maximum_backoff) - ) - end - - ## - # @private New RetryPolicy from a Google::Cloud::PubSub::V1::RetryPolicy object. - def self.from_grpc grpc - new( - minimum_backoff: Convert.duration_to_number(grpc.minimum_backoff), - maximum_backoff: Convert.duration_to_number(grpc.maximum_backoff) - ) - end - end - end - end -end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb index 1f8f1c42621f..16f63ae0f774 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb @@ -16,7 +16,6 @@ require "google/cloud/pubsub/convert" require "google/cloud/errors" require "google/cloud/pubsub/received_message" -require "google/cloud/pubsub/retry_policy" require "google/cloud/pubsub/message_listener" require "google/cloud/pubsub/v1" @@ -210,7 +209,7 @@ def exists? # pubsub = Google::Cloud::PubSub.new # # subscriber = pubsub.subscriber "my-topic-sub" - # received_messages = subcriber.pull immediate: false, max: 10 + # received_messages = subscriber.pull immediate: false, max: 10 # received_messages.each do |received_message| # received_message.acknowledge! # end @@ -356,7 +355,7 @@ def wait_for_messages max: 100 # # pubsub = Google::Cloud::PubSub.new # - # subscriber = pubsub.subscription "my-topic-sub" + # subscriber = pubsub.subscriber "my-topic-sub" # # listener = subscriber.listen threads: { callback: 16 } do |rec_message| # # store the message somewhere before acknowledging @@ -375,7 +374,7 @@ def wait_for_messages max: 100 # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.subscriber "my-ordered-topic-sub" + # subscriber = pubsub.subscriber "my-ordered-topic-sub" # subscriber.message_ordering? #=> true # # listener = subscriber.listen do |received_message| @@ -494,8 +493,9 @@ def modify_ack_deadline new_deadline, *messages # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.get_subscription "my-topic-sub", skip_lookup: true - # sub.reference? #=> true + # subscriber = pubsub.subscriber "my-topic-sub", skip_lookup: true + # + # subscriber.reference? #=> true # def reference? @grpc.nil? @@ -513,8 +513,9 @@ def reference? # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.get_subscription "my-topic-sub" - # sub.resource? #=> true + # subscriber = pubsub.subscriber "my-topic-sub" + # + # subscriber.resource? #=> true # def resource? !@grpc.nil? @@ -531,7 +532,8 @@ def resource? # # pubsub = Google::Cloud::PubSub.new # - # sub = pubsub.get_subscription "my-topic-sub" + # sub = Google::Cloud::PubSub::Subscriber.from_name "my-topic-sub", pubsub.service + # # sub.reload! # def reload! diff --git a/google-cloud-pubsub/support/doctest_helper.rb b/google-cloud-pubsub/support/doctest_helper.rb index d238c0c58e65..53cee2b7f396 100644 --- a/google-cloud-pubsub/support/doctest_helper.rb +++ b/google-cloud-pubsub/support/doctest_helper.rb @@ -13,6 +13,7 @@ # limitations under the License. require "minitest/focus" +require "ostruct" require "google/cloud/pubsub" @@ -44,7 +45,7 @@ def self.new *args OpenStruct.new(client: OpenStruct.new(updater_proc: Proc.new {})) end end - class Subscriber + class MessageListener # doctest has issues running this code, so punt on it completely def start self @@ -68,13 +69,13 @@ def mock_pubsub credentials = OpenStruct.new(client: OpenStruct.new(updater_proc: Proc.new {})) pubsub = Google::Cloud::PubSub::Project.new(Google::Cloud::PubSub::Service.new("my-project", credentials)) - pubsub.service.mocked_publisher = Minitest::Mock.new - pubsub.service.mocked_subscriber = Minitest::Mock.new + pubsub.service.mocked_topic_admin = Minitest::Mock.new + pubsub.service.mocked_subscription_admin = Minitest::Mock.new pubsub.service.mocked_iam = Minitest::Mock.new pubsub.service.mocked_schemas = Minitest::Mock.new if block_given? - yield pubsub.service.mocked_publisher, - pubsub.service.mocked_subscriber, + yield pubsub.service.mocked_topic_admin, + pubsub.service.mocked_subscription_admin, pubsub.service.mocked_iam, pubsub.service.mocked_schemas end @@ -86,77 +87,36 @@ def mock_pubsub YARD::Doctest.configure do |doctest| # Skip all aliases, since tests would be exact duplicates doctest.skip "Google::Cloud::PubSub::Message#msg_id" - doctest.skip "Google::Cloud::PubSub::Project#get_topic" - doctest.skip "Google::Cloud::PubSub::Project#find_topic" - doctest.skip "Google::Cloud::PubSub::Project#new_topic" - doctest.skip "Google::Cloud::PubSub::Project#find_topics" - doctest.skip "Google::Cloud::PubSub::Project#list_topics" - doctest.skip "Google::Cloud::PubSub::Project#create_subscription" - doctest.skip "Google::Cloud::PubSub::Project#new_subscription" - doctest.skip "Google::Cloud::PubSub::Project#get_subscription" - doctest.skip "Google::Cloud::PubSub::Project#find_subscription" - doctest.skip "Google::Cloud::PubSub::Project#find_subscriptions" - doctest.skip "Google::Cloud::PubSub::Project#list_subscriptions" - doctest.skip "Google::Cloud::PubSub::Project#find_snapshots" - doctest.skip "Google::Cloud::PubSub::Project#list_snapshots" - doctest.skip "Google::Cloud::PubSub::Project#get_schema" - doctest.skip "Google::Cloud::PubSub::Project#find_schema" - doctest.skip "Google::Cloud::PubSub::Project#new_schema" - doctest.skip "Google::Cloud::PubSub::Project#find_schemas" - doctest.skip "Google::Cloud::PubSub::Project#list_schemas" - doctest.skip "Google::Cloud::PubSub::Project#validate_schema" - doctest.skip "Google::Cloud::PubSub::Schema#refresh!" - doctest.skip "Google::Cloud::PubSub::Subscription#ack" - doctest.skip "Google::Cloud::PubSub::Subscription#new_snapshot" - doctest.skip "Google::Cloud::PubSub::Topic#create_subscription" - doctest.skip "Google::Cloud::PubSub::Topic#new_subscription" - doctest.skip "Google::Cloud::PubSub::Topic#get_subscription" - doctest.skip "Google::Cloud::PubSub::Topic#find_subscription" - doctest.skip "Google::Cloud::PubSub::Topic#find_subscriptions" - doctest.skip "Google::Cloud::PubSub::Topic#list_subscriptions" - - doctest.before "Google::Cloud.pubsub" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] - end - end + doctest.skip "Google::Cloud::PubSub::Subscriber#ack" + doctest.skip "Google::Cloud::PubSub::ReceivedMessage#nack!" + doctest.skip "Google::Cloud::PubSub::ReceivedMessage#ignore!" - doctest.before "Google::Cloud#pubsub" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] + + doctest.before "Google::Cloud" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") end end doctest.before "Google::Cloud::PubSub" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") end end doctest.skip "Google::Cloud::PubSub::Credentials" # occasionally getting "This code example is not yet mocked" doctest.before "Google::Cloud::PubSub::Message" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - end - end - - # Policy - - doctest.before "Google::Cloud::PubSub::Policy" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_iam.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :set_iam_policy, policy_resp, [Hash] + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") + mock_subscription_admin.expect :get_subscription, subscription_resp, subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] end end @@ -164,105 +124,9 @@ def mock_pubsub # Project doctest.before "Google::Cloud::PubSub::Project" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#topic" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#topic@By default `nil` will be returned if topic does not exist." do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#topic@Create topic in a different project with the `project` flag." do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#topic@Configuring AsyncPublisher to increase concurrent callbacks:" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#create_topic" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :create_topic, nil, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#topics" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :list_topics, list_topics_paged_enum, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#subscription" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#subscriptions" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :list_subscriptions, list_subscriptions_resp, [Hash] - mock_subscriber.expect :list_subscriptions, list_subscriptions_resp(nil), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#snapshots" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :list_snapshots, list_snapshots_resp, [Hash] - mock_subscriber.expect :list_snapshots, list_snapshots_resp(nil), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#create_schema" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - schema = Google::Cloud::PubSub::V1::Schema.new type: "AVRO", definition: "..." - mock_schema.expect :create_schema, schema_resp("my-schema"), [parent: project_path, schema: schema, schema_id: "my-schema"] - end - end - - doctest.before "Google::Cloud::PubSub::Project#schema" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema"), [name: schema_path("my-schema"), view: 2] - end - end - - doctest.before "Google::Cloud::PubSub::Project#schema@Skip the lookup against the service with `skip_lookup`:" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema", definition: "the schema definition"), [name: schema_path("my-schema"), view: 2] - end - end - - doctest.before "Google::Cloud::PubSub::Project#schema@Omit the schema definition with `view: :basic`:" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema"), [name: schema_path("my-schema"), view: 1] - end - end - - doctest.before "Google::Cloud::PubSub::Project#schemas" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :list_schemas, list_schemas_resp, [Hash] - mock_schema.expect :list_schemas, list_schemas_resp(nil), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Project#valid_schema?" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - schema = Google::Cloud::PubSub::V1::Schema.new type: "AVRO", definition: "..." - mock_schema.expect :validate_schema, schema_resp("my-schema"), [parent: project_path, schema: schema] + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") end end @@ -270,549 +134,205 @@ def mock_pubsub # ReceivedMessage doctest.before "Google::Cloud::PubSub::ReceivedMessage" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :acknowledge, nil, ["projects/my-project/subscriptions/my-sub", ["2"], Hash] + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp, subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :acknowledge, nil, ["projects/my-project/subscriptions/my-sub", ["2"], Hash] end end doctest.before "Google::Cloud::PubSub::ReceivedMessage#delivery_attempt" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_subscriber.expect :create_subscription, OpenStruct.new(name: "my-topic-sub"), [Hash] + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") + mock_subscription_admin.expect :create_subscription, OpenStruct.new(name: "my-topic-sub"), name: subscription_path("my-topic-sub"), + topic: topic_path("my-topic"), + dead_letter_policy: { + dead_letter_topic: topic_path("my-dead-letter-topic"), + max_delivery_attempts: 10 + } + mock_subscription_admin.expect :get_subscription, subscription_resp, subscription: subscription_path("my-topic-sub") + end end doctest.before "Google::Cloud::PubSub::ReceivedMessage#modify_ack_deadline!" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :modify_ack_deadline, nil, [Hash] + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp("my-topic-sub"), subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :modify_ack_deadline, nil, [Hash] end end doctest.before "Google::Cloud::PubSub::ReceivedMessage#reject!" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - end - end - - doctest.before "Google::Cloud::PubSub::ReceivedMessage#nack!" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :modify_ack_deadline, nil, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::ReceivedMessage#ignore!" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :modify_ack_deadline, nil, [Hash] - end - end - - ## - # RetryPolicy - - doctest.before "Google::Cloud::PubSub::RetryPolicy" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :update_subscription, subscription_resp, [Hash] - end - end - - ## - # Schema - - doctest.before "Google::Cloud::PubSub::Schema" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema"), [name: schema_path("my-schema"), view: 2] - end - end - - doctest.before "Google::Cloud::PubSub::Schema#delete" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema"), [name: schema_path("my-schema"), view: 2] - mock_schema.expect :delete_schema, nil, [name: schema_path("my-schema")] - end - end - - doctest.before "Google::Cloud::PubSub::Schema#reload!" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema", definition: "the schema definition"), [name: schema_path("my-schema"), view: 2] - end - end - - doctest.before "Google::Cloud::PubSub::Schema#reload!@Use the `view` option to load the basic or full resource:" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema"), [name: schema_path("my-schema"), view: 1] - mock_schema.expect :get_schema, schema_resp("my-schema", definition: "the schema definition"), [name: schema_path("my-schema"), view: 2] - end - end - - doctest.before "Google::Cloud::PubSub::Schema#resource_full?" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema", definition: "the schema definition"), [name: schema_path("my-schema"), view: 2] - end - end - - doctest.before "Google::Cloud::PubSub::Schema#resource_partial?" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema"), [name: schema_path("my-schema"), view: 1] - mock_schema.expect :get_schema, schema_resp("my-schema", definition: "the schema definition"), [name: schema_path("my-schema"), view: 2] - end - end - - doctest.before "Google::Cloud::PubSub::Schema#validate_message" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :get_schema, schema_resp("my-schema"), [name: schema_path("my-schema"), view: 2] - message_data = { "name" => "Alaska", "post_abbr" => "AK" }.to_json - mock_schema.expect :validate_message, nil, [parent: project_path, name: schema_path("my-schema"), schema: nil, message: message_data, encoding: "JSON"] - end - end - - ## - # Schema::List - - doctest.before "Google::Cloud::PubSub::Schema::List" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam, mock_schema| - mock_schema.expect :list_schemas, list_schemas_resp, [Hash] - mock_schema.expect :list_schemas, list_schemas_resp(nil), [Hash] - end - end - - ## - # Snapshot - - doctest.before "Google::Cloud::PubSub::Snapshot" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :create_snapshot, snapshot_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Snapshot#delete" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :list_snapshots, list_snapshots_resp, [Hash] - mock_subscriber.expect :delete_snapshot, nil, [Hash] - mock_subscriber.expect :delete_snapshot, nil, [Hash] - mock_subscriber.expect :delete_snapshot, nil, [Hash] + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp, subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), [Hash] + mock_subscription_admin.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] end end ## - # Snapshot::List - - doctest.before "Google::Cloud::PubSub::Snapshot::List" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :list_snapshots, list_snapshots_resp, [Hash] - mock_subscriber.expect :list_snapshots, list_snapshots_resp(nil), [Hash] - end - end - - ## - # Subscription - - doctest.before "Google::Cloud::PubSub::Subscription" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :acknowledge, nil, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Subscription#dead_letter" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub", dead_letter_topic: "my-dead-letter-topic", max_delivery_attempts: 10), [Hash] - mock_subscriber.expect :update_subscription, subscription_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Subscription#remove_dead_letter_policy" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub", dead_letter_topic: "my-dead-letter-topic", max_delivery_attempts: 10), [Hash] - mock_subscriber.expect :update_subscription, subscription_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Subscription#modify_ack_deadline" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), [Hash] - mock_subscriber.expect :modify_ack_deadline, nil, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Subscription#pull" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), [Hash] - mock_subscriber.expect :acknowledge, nil, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Subscription#wait_for_messages" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), [Hash] - mock_subscriber.expect :acknowledge, nil, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Subscription#delete" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :delete_subscription, subscription_resp, [Hash] - end - end + # Subscriber - doctest.before "Google::Cloud::PubSub::Subscription#detach" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_publisher.expect :detach_subscription, subscription_resp, [Hash] - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] + doctest.before "Google::Cloud::PubSub::Subscriber" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp("my-topic-sub"), subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :acknowledge, nil, [Hash] end end - doctest.before "Google::Cloud::PubSub::Subscription#policy" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam| - mock_subscriber.expect :get_subscription, subscription_resp("my-subscription"), [Hash] - mock_iam.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :set_iam_policy, policy_resp, [Hash] + doctest.before "Google::Cloud::PubSub::Subscriber#wait_for_messages" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp("my-topic-sub"), subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), + subscription: subscription_path("my-topic-sub"), max_messages: 100, return_immediately: false + mock_subscription_admin.expect :acknowledge, nil, subscription: subscription_path("my-topic-sub"), ack_ids: ["2"] end end - doctest.before "Google::Cloud::PubSub::Subscription#update_policy" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam| - mock_subscriber.expect :get_subscription, subscription_resp("my-subscription"), [Hash] - mock_iam.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :set_iam_policy, policy_resp, [Hash] + doctest.before "Google::Cloud::PubSub::Subscriber#pull" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp("my-topic-sub"), subscription: subscription_path("my-topic-sub") end end - doctest.before "Google::Cloud::PubSub::Subscription#pull@A maximum number of messages returned can also be specified:" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), [Hash] - mock_subscriber.expect :acknowledge, nil, [Hash] - end - end - doctest.before "Google::Cloud::PubSub::Subscription#test_permissions" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam| - mock_subscriber.expect :get_subscription, subscription_resp("my-subscription"), [Hash] - mock_iam.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :test_iam_permissions, subscription_permissions_resp, [Hash] + doctest.before "Google::Cloud::PubSub::Subscriber#pull@The `immediate: false` option is now recommended to avoid adverse impacts on pull operations:" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp("my-topic-sub"), subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), + subscription: subscription_path("my-topic-sub"), max_messages: 100, return_immediately: false + mock_subscription_admin.expect :acknowledge, nil, subscription: subscription_path("my-topic-sub"), ack_ids: ["2"] end end - doctest.before "Google::Cloud::PubSub::Subscription#topic" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), [Hash] - mock_subscriber.expect :acknowledge, nil, [Hash] + doctest.before "Google::Cloud::PubSub::Subscriber#pull@A maximum number of messages returned can also be specified:" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp("my-topic-sub"), subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), + subscription: subscription_path("my-topic-sub"), max_messages: 10, return_immediately: false + mock_subscription_admin.expect :acknowledge, nil, subscription: subscription_path("my-topic-sub"), ack_ids: ["2"] end end - doctest.before "Google::Cloud::PubSub::Subscription#create_snapshot" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :create_snapshot, snapshot_resp, [Hash] - end - end + doctest.before "Google::Cloud::PubSub::Subscriber#modify_ack_deadline" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp, subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), + subscription: subscription_path("my-sub"), max_messages: 100, return_immediately: false + mock_subscription_admin.expect :modify_ack_deadline, nil, subscription: subscription_path("my-sub"), ack_ids: ["2"], ack_deadline_seconds: 120 - doctest.before "Google::Cloud::PubSub::Subscription#create_snapshot@Without providing a name:" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :create_snapshot, snapshot_resp("gcr-analysis-..."), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Subscription#seek" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-sub"), [Hash] - mock_subscriber.expect :create_snapshot, snapshot_resp("gcr-analysis-..."), [Hash] - mock_subscriber.expect :pull, OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)]), [Hash] - mock_subscriber.expect :acknowledge, nil, [Hash] - mock_subscriber.expect :seek, nil, [Hash] - end - end - doctest.before "Google::Cloud::PubSub::Subscription#reload!" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] end end - doctest.skip "Google::Cloud::PubSub::Subscription#refresh!" - doctest.before "Google::Cloud::PubSub::Subscription#retry_policy" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :update_subscription, subscription_resp, [Hash] + doctest.before "Google::Cloud::PubSub::Subscriber#resource?" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp, subscription: subscription_path("my-topic-sub") end end - doctest.before "Google::Cloud::PubSub::Subscription#push_config" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - end - end - doctest.before "Google::Cloud::PubSub::Subscription#push_config@Update the push configuration by passing a block:" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :update_subscription, subscription_resp, [Hash] + doctest.before "Google::Cloud::PubSub::Subscriber#reload!" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp, subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :get_subscription, subscription_resp, subscription: subscription_path("my-topic-sub") end end - doctest.before "Google::Cloud::PubSub::Subscription#listen@Ordered messages are supported using ordering_key:" do - mock_pubsub do |mock_publisher, mock_subscriber| + doctest.before "Google::Cloud::PubSub::Subscriber#listen@Ordered messages are supported using ordering_key:" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| ordered_subscription_resp = subscription_resp "my-ordered-topic-sub" ordered_subscription_resp.enable_message_ordering = true - mock_subscriber.expect :get_subscription, ordered_subscription_resp, [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :acknowledge, nil, ["projects/my-project/subscriptions/my-ordered-topic-sub", ["2"], Hash] + mock_subscription_admin.expect :get_subscription, ordered_subscription_resp, subscription: subscription_path("my-ordered-topic-sub") + mock_subscription_admin.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :acknowledge, nil, ["projects/my-project/subscriptions/my-ordered-topic-sub", ["2"], Hash] end end ## - # Subscription::PushConfig + # MessageListener - doctest.before "Google::Cloud::PubSub::Subscription::PushConfig" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_subscriber.expect :create_subscription, subscription_resp, [Hash] - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] + doctest.before "Google::Cloud::PubSub::MessageListener" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_subscription_admin.expect :get_subscription, subscription_resp("my-topic-sub"), subscription: subscription_path("my-topic-sub") + mock_subscription_admin.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :streaming_pull, [].to_enum, [Enumerator, Hash] + mock_subscription_admin.expect :acknowledge, nil, [Hash] end end - doctest.before "Google::Cloud::PubSub::Subscription::PushConfig@Update a push config:" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp, [Hash] - mock_subscriber.expect :update_subscription, subscription_resp, [Hash] - end - end - - - ## - # Subscription::List + # Publisher - doctest.before "Google::Cloud::PubSub::Subscription::List" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :list_subscriptions, list_subscriptions_resp, [Hash] - mock_subscriber.expect :list_subscriptions, list_subscriptions_resp(nil), [Hash] + doctest.before "Google::Cloud::PubSub::Publisher" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic-only") + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] end end - ## - # Subscriber - - doctest.before "Google::Cloud::PubSub::Subscriber" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - mock_subscriber.expect :streaming_pull, [OpenStruct.new(received_messages: [Google::Cloud::PubSub::V1::ReceivedMessage.new(ack_id: "2", message: pubsub_message)])].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :streaming_pull, [].to_enum, [Enumerator, Hash] - mock_subscriber.expect :acknowledge, nil, [Hash] + doctest.before "Google::Cloud::PubSub::Publisher#async_publisher" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] end end - ## - # Topic - - doctest.before "Google::Cloud::PubSub::Topic" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] + doctest.before "Google::Cloud::PubSub::Publisher#publish" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] end end - doctest.before "Google::Cloud::PubSub::Topic#kms_key" do - mock_pubsub do |mock_publisher, mock_subscriber| - this_topic = topic_resp "my-topic", kms_key_name: "projects/a/locations/b/keyRings/c/cryptoKeys/d" - mock_publisher.expect :get_topic, this_topic, [Hash] + doctest.before "Google::Cloud::PubSub::Publisher#publish@Additionally, a message can be published with attributes:" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] end end - doctest.before "Google::Cloud::PubSub::Topic#kms_key=" do - mock_pubsub do |mock_publisher, mock_subscriber| - this_topic = topic_resp "my-topic", kms_key_name: "projects/a/locations/b/keyRings/c/cryptoKeys/d" - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :update_topic, this_topic, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#persistence_regions" do - mock_pubsub do |mock_publisher, mock_subscriber| - this_topic = topic_resp "my-topic", persistence_regions: ["us-central1", "us-central2"] - mock_publisher.expect :get_topic, this_topic, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#persistence_regions=" do - mock_pubsub do |mock_publisher, mock_subscriber| - this_topic = topic_resp "my-topic", persistence_regions: ["us-central1", "us-central2"] - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :update_topic, this_topic, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#schema_name" do - mock_pubsub do |mock_publisher, mock_subscriber| - this_topic = topic_resp "my-topic", schema_settings: { schema: schema_path("my-schema"), encoding: :JSON } - mock_publisher.expect :get_topic, this_topic, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#message_encoding" do - mock_pubsub do |mock_publisher, mock_subscriber| - this_topic = topic_resp "my-topic", schema_settings: { schema: schema_path("my-schema"), encoding: :JSON } - mock_publisher.expect :get_topic, this_topic, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#delete" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :delete_topic, nil, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#policy" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_iam.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :set_iam_policy, policy_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#update_policy" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_iam.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :set_iam_policy, policy_resp, [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#publish" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#publish@Additionally, a message can be published with attributes:" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#publish@Multiple messages can be sent at the same time using a block:" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] + doctest.before "Google::Cloud::PubSub::Publisher#publish@Multiple messages can be sent at the same time using a block:" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") messages = [ pubsub_message("task 1 completed", { "foo" => "bar" }), pubsub_message("task 2 completed", { "foo" => "baz" }), pubsub_message("task 3 completed", { "foo" => "bif" }) ] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1", "2", "3"]), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#publish_async@Ordered messages are supported using ordering_key:" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#subscribe" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_subscriber.expect :create_subscription, OpenStruct.new(name: "my-topic-sub"), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#subscribe@Configure a Dead Letter Queues policy:" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam| - mock_publisher.expect :get_topic, topic_resp("my-dead-letter-topic"), [Hash] - mock_subscriber.expect :create_subscription, OpenStruct.new(name: "my-dead-letter-sub"), [Hash] - mock_iam.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :set_iam_policy, policy_resp, [Hash] - mock_iam.expect :set_iam_policy, policy_resp, [Hash] - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_subscriber.expect :create_subscription, OpenStruct.new(name: "my-topic-sub"), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#subscription" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_subscriber.expect :get_subscription, subscription_resp("my-topic-sub"), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#subscriptions" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :list_topic_subscriptions, list_topic_subscriptions_resp, [Hash] - mock_publisher.expect :list_topic_subscriptions, list_topic_subscriptions_resp(nil), [Hash] - end - end - - doctest.before "Google::Cloud::PubSub::Topic#test_permissions" do - mock_pubsub do |mock_publisher, mock_subscriber, mock_iam| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :get_iam_policy, policy_resp, [Hash] - mock_iam.expect :test_iam_permissions, topic_permissions_resp, [Hash] + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1", "2", "3"]), [Hash] end end - doctest.before "Google::Cloud::PubSub::Topic#reload!" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] - mock_publisher.expect :get_topic, topic_resp, [Hash] + doctest.before "Google::Cloud::PubSub::Publisher#publish@Ordered messages are supported using ordering_key:" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-ordered-topic") + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1"]), [Hash] end end - doctest.skip "Google::Cloud::PubSub::Topic#refresh!" - - ## - # Topic::List - doctest.before "Google::Cloud::PubSub::Topic::List" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :list_topics, list_topics_paged_enum, [Hash] + doctest.before "Google::Cloud::PubSub::Publisher#publish_async@Ordered messages are supported using ordering_key:" do + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-ordered-topic") end end @@ -820,14 +340,14 @@ def mock_pubsub # BatchPublisher doctest.before "Google::Cloud::PubSub::BatchPublisher" do - mock_pubsub do |mock_publisher, mock_subscriber| - mock_publisher.expect :get_topic, topic_resp, [Hash] + mock_pubsub do |mock_topic_admin, mock_subscription_admin| + mock_topic_admin.expect :get_topic, topic_resp, topic: topic_path("my-topic") messages = [ pubsub_message("task 1 completed", { "foo" => "bar" }), pubsub_message("task 2 completed", { "foo" => "baz" }), pubsub_message("task 3 completed", { "foo" => "bif" }) ] - mock_publisher.expect :publish, OpenStruct.new(message_ids: ["1", "2", "3"]), [Hash] + mock_topic_admin.expect :publish, OpenStruct.new(message_ids: ["1", "2", "3"]), [Hash] end end end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub_test.rb index 1e88a7f4bd18..aa5009c316b3 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub_test.rb @@ -199,7 +199,7 @@ def creds.is_a? target File.stub :read, found_credentials, ["path/to/keyfile.json"] do Google::Cloud::PubSub::Credentials.stub :new, stubbed_credentials do Google::Cloud::PubSub::Service.stub :new, stubbed_service do - pubsub = Google::Cloud::PubSub.new project: "project-id", keyfile: "path/to/keyfile.json" + pubsub = Google::Cloud::PubSub.new project_id: "project-id", credentials: "path/to/keyfile.json" _(pubsub).must_be_kind_of Google::Cloud::PubSub::Project _(pubsub.project).must_equal "project-id" _(pubsub.service).must_be_kind_of OpenStruct From bd92fec79a7240d6761ac739f87cb5ba986a3ee7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 15:34:03 -0700 Subject: [PATCH 299/457] chore(main): release google-cloud-network_connectivity 2.2.0 (#30721) --- .release-please-manifest.json | 2 +- google-cloud-network_connectivity/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/network_connectivity/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7f9eccb8e083..1baa9b5f230c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -515,7 +515,7 @@ "google-cloud-netapp+FILLER": "0.0.0", "google-cloud-netapp-v1": "2.3.0", "google-cloud-netapp-v1+FILLER": "0.0.0", - "google-cloud-network_connectivity": "2.1.1", + "google-cloud-network_connectivity": "2.2.0", "google-cloud-network_connectivity+FILLER": "0.0.0", "google-cloud-network_connectivity-v1": "1.6.0", "google-cloud-network_connectivity-v1+FILLER": "0.0.0", diff --git a/google-cloud-network_connectivity/CHANGELOG.md b/google-cloud-network_connectivity/CHANGELOG.md index 02ba67bd53d3..af08c015ffdb 100644 --- a/google-cloud-network_connectivity/CHANGELOG.md +++ b/google-cloud-network_connectivity/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.2.0 (2025-07-24) + +#### Features + +* add Network Connectivity Center APIs for Internal Range service ([#30706](https://github.com/googleapis/google-cloud-ruby/issues/30706)) + ### 2.1.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-network_connectivity/lib/google/cloud/network_connectivity/version.rb b/google-cloud-network_connectivity/lib/google/cloud/network_connectivity/version.rb index 344475ac7ff3..aad6e1e94fb6 100644 --- a/google-cloud-network_connectivity/lib/google/cloud/network_connectivity/version.rb +++ b/google-cloud-network_connectivity/lib/google/cloud/network_connectivity/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module NetworkConnectivity - VERSION = "2.1.1" + VERSION = "2.2.0" end end end From 56fd12ba6e441ad42d91fba3a802834ddbb58df0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 15:34:20 -0700 Subject: [PATCH 300/457] chore(main): release google-cloud-network_connectivity-v1 1.7.0 (#30722) --- .release-please-manifest.json | 2 +- google-cloud-network_connectivity-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/network_connectivity/v1/version.rb | 2 +- ...nippet_metadata_google.cloud.networkconnectivity.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1baa9b5f230c..e1ca73e1b91d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -517,7 +517,7 @@ "google-cloud-netapp-v1+FILLER": "0.0.0", "google-cloud-network_connectivity": "2.2.0", "google-cloud-network_connectivity+FILLER": "0.0.0", - "google-cloud-network_connectivity-v1": "1.6.0", + "google-cloud-network_connectivity-v1": "1.7.0", "google-cloud-network_connectivity-v1+FILLER": "0.0.0", "google-cloud-network_connectivity-v1alpha1": "0.12.0", "google-cloud-network_connectivity-v1alpha1+FILLER": "0.0.0", diff --git a/google-cloud-network_connectivity-v1/CHANGELOG.md b/google-cloud-network_connectivity-v1/CHANGELOG.md index f4deb66cb50a..9c6c0aa468db 100644 --- a/google-cloud-network_connectivity-v1/CHANGELOG.md +++ b/google-cloud-network_connectivity-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.7.0 (2025-07-24) + +#### Features + +* add Network Connectivity Center APIs for Internal Range service ([#30707](https://github.com/googleapis/google-cloud-ruby/issues/30707)) + ### 1.6.0 (2025-05-12) #### Features diff --git a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/version.rb b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/version.rb index 1e6434ef1d4e..e806e901a46d 100644 --- a/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/version.rb +++ b/google-cloud-network_connectivity-v1/lib/google/cloud/network_connectivity/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module NetworkConnectivity module V1 - VERSION = "1.6.0" + VERSION = "1.7.0" end end end diff --git a/google-cloud-network_connectivity-v1/snippets/snippet_metadata_google.cloud.networkconnectivity.v1.json b/google-cloud-network_connectivity-v1/snippets/snippet_metadata_google.cloud.networkconnectivity.v1.json index 75825941064c..c61cdbec9530 100644 --- a/google-cloud-network_connectivity-v1/snippets/snippet_metadata_google.cloud.networkconnectivity.v1.json +++ b/google-cloud-network_connectivity-v1/snippets/snippet_metadata_google.cloud.networkconnectivity.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-network_connectivity-v1", - "version": "1.6.0", + "version": "1.7.0", "language": "RUBY", "apis": [ { From 78fd8b88d098ccb907e711e5b64afe4e047a1f32 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 15:41:01 -0700 Subject: [PATCH 301/457] feat: add SessionService (#30717) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: add AssistantService PiperOrigin-RevId: 785997711 Source-Link: https://github.com/googleapis/googleapis/commit/29c6015e95fd02c939f44b7061c4506812f2debc Source-Link: https://github.com/googleapis/googleapis-gen/commit/ceba1d4cb9372ca25178b789fd480045128a3dd3 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUtdjEvLk93bEJvdC55YW1sIiwiaCI6ImNlYmExZDRjYjkzNzJjYTI1MTc4Yjc4OWZkNDgwMDQ1MTI4YTNkZDMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 786299564 Source-Link: https://github.com/googleapis/googleapis/commit/1791a77dfb0580ae2bbde3840105d2096968cc13 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f686e1f0e5f4f393d2ca165cd16ffe037efcc498 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUtdjEvLk93bEJvdC55YW1sIiwiaCI6ImY2ODZlMWYwZTVmNGYzOTNkMmNhMTY1Y2QxNmZmZTAzN2VmY2M0OTgifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 35 + .../AUTHENTICATION.md | 8 +- google-cloud-discovery_engine-v1/README.md | 8 +- google-cloud-discovery_engine-v1/Rakefile | 4 +- .../gapic_metadata.json | 86 +- .../lib/google/cloud/discovery_engine/v1.rb | 8 +- .../discovery_engine/v1/assistant_service.rb | 55 ++ .../v1/assistant_service/client.rb | 509 ++++++++++ .../v1/assistant_service/credentials.rb | 47 + .../v1/assistant_service/paths.rb | 169 ++++ .../v1/assistant_service/rest.rb | 52 + .../v1/assistant_service/rest/client.rb | 478 +++++++++ .../v1/assistant_service/rest/service_stub.rb | 137 +++ .../conversational_search_service/client.rb | 20 +- .../rest/client.rb | 20 +- .../google/cloud/discovery_engine/v1/rest.rb | 6 +- .../v1/search_service/client.rb | 44 +- .../v1/search_service/rest/client.rb | 44 +- .../discovery_engine/v1/session_service.rb | 55 ++ .../v1/session_service/client.rb | 920 ++++++++++++++++++ .../v1/session_service/credentials.rb | 47 + .../v1/session_service/paths.rb | 330 +++++++ .../v1/session_service/rest.rb | 52 + .../v1/session_service/rest/client.rb | 859 ++++++++++++++++ .../v1/session_service/rest/service_stub.rb | 462 +++++++++ .../discoveryengine/v1/assist_answer_pb.rb | 59 ++ .../cloud/discoveryengine/v1/assistant_pb.rb | 45 + .../v1/assistant_service_pb.rb | 62 ++ .../v1/assistant_service_services_pb.rb | 45 + .../cloud/discoveryengine/v1/session_pb.rb | 2 +- .../discoveryengine/v1/session_service_pb.rb | 49 + .../v1/session_service_services_pb.rb | 64 ++ .../cloud/discoveryengine/v1/assist_answer.rb | 278 ++++++ .../cloud/discoveryengine/v1/assistant.rb | 39 + .../discoveryengine/v1/assistant_service.rb | 207 ++++ .../v1/conversational_search_service.rb | 18 +- .../discoveryengine/v1/search_service.rb | 22 +- .../cloud/discoveryengine/v1/session.rb | 24 +- .../assistant_service/stream_assist.rb | 50 + .../session_service/create_session.rb | 47 + .../session_service/delete_session.rb | 47 + .../snippets/session_service/get_session.rb | 47 + .../snippets/session_service/list_sessions.rb | 51 + .../session_service/update_session.rb | 47 + ...adata_google.cloud.discoveryengine.v1.json | 400 ++++++-- .../v1/assistant_service_paths_test.rb | 88 ++ .../v1/assistant_service_rest_test.rb | 158 +++ .../v1/assistant_service_test.rb | 168 ++++ .../v1/session_service_paths_test.rb | 124 +++ .../v1/session_service_rest_test.rb | 376 +++++++ .../v1/session_service_test.rb | 394 ++++++++ 51 files changed, 7166 insertions(+), 200 deletions(-) create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/credentials.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/paths.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest/service_stub.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/credentials.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/paths.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest/client.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest/service_stub.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assist_answer_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_service_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_service_services_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_service_pb.rb create mode 100644 google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_service_services_pb.rb create mode 100644 google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assist_answer.rb create mode 100644 google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assistant.rb create mode 100644 google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assistant_service.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/assistant_service/stream_assist.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/session_service/create_session.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/session_service/delete_session.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/session_service/get_session.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/session_service/list_sessions.rb create mode 100644 google-cloud-discovery_engine-v1/snippets/session_service/update_session.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_paths_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_rest_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_paths_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_rest_test.rb create mode 100644 google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_test.rb diff --git a/google-cloud-discovery_engine-v1/.owlbot-manifest.json b/google-cloud-discovery_engine-v1/.owlbot-manifest.json index 082d96f2849b..2feb796c3ac0 100644 --- a/google-cloud-discovery_engine-v1/.owlbot-manifest.json +++ b/google-cloud-discovery_engine-v1/.owlbot-manifest.json @@ -15,6 +15,13 @@ "google-cloud-discovery_engine-v1.gemspec", "lib/google-cloud-discovery_engine-v1.rb", "lib/google/cloud/discovery_engine/v1.rb", + "lib/google/cloud/discovery_engine/v1/assistant_service.rb", + "lib/google/cloud/discovery_engine/v1/assistant_service/client.rb", + "lib/google/cloud/discovery_engine/v1/assistant_service/credentials.rb", + "lib/google/cloud/discovery_engine/v1/assistant_service/paths.rb", + "lib/google/cloud/discovery_engine/v1/assistant_service/rest.rb", + "lib/google/cloud/discovery_engine/v1/assistant_service/rest/client.rb", + "lib/google/cloud/discovery_engine/v1/assistant_service/rest/service_stub.rb", "lib/google/cloud/discovery_engine/v1/cmek_config_service.rb", "lib/google/cloud/discovery_engine/v1/cmek_config_service/client.rb", "lib/google/cloud/discovery_engine/v1/cmek_config_service/credentials.rb", @@ -146,6 +153,13 @@ "lib/google/cloud/discovery_engine/v1/serving_config_service/rest.rb", "lib/google/cloud/discovery_engine/v1/serving_config_service/rest/client.rb", "lib/google/cloud/discovery_engine/v1/serving_config_service/rest/service_stub.rb", + "lib/google/cloud/discovery_engine/v1/session_service.rb", + "lib/google/cloud/discovery_engine/v1/session_service/client.rb", + "lib/google/cloud/discovery_engine/v1/session_service/credentials.rb", + "lib/google/cloud/discovery_engine/v1/session_service/paths.rb", + "lib/google/cloud/discovery_engine/v1/session_service/rest.rb", + "lib/google/cloud/discovery_engine/v1/session_service/rest/client.rb", + "lib/google/cloud/discovery_engine/v1/session_service/rest/service_stub.rb", "lib/google/cloud/discovery_engine/v1/site_search_engine_service.rb", "lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb", "lib/google/cloud/discovery_engine/v1/site_search_engine_service/credentials.rb", @@ -175,6 +189,10 @@ "lib/google/cloud/discovery_engine/v1/user_license_service/rest/service_stub.rb", "lib/google/cloud/discovery_engine/v1/version.rb", "lib/google/cloud/discoveryengine/v1/answer_pb.rb", + "lib/google/cloud/discoveryengine/v1/assist_answer_pb.rb", + "lib/google/cloud/discoveryengine/v1/assistant_pb.rb", + "lib/google/cloud/discoveryengine/v1/assistant_service_pb.rb", + "lib/google/cloud/discoveryengine/v1/assistant_service_services_pb.rb", "lib/google/cloud/discoveryengine/v1/chunk_pb.rb", "lib/google/cloud/discoveryengine/v1/cmek_config_service_pb.rb", "lib/google/cloud/discoveryengine/v1/cmek_config_service_services_pb.rb", @@ -226,6 +244,8 @@ "lib/google/cloud/discoveryengine/v1/serving_config_service_pb.rb", "lib/google/cloud/discoveryengine/v1/serving_config_service_services_pb.rb", "lib/google/cloud/discoveryengine/v1/session_pb.rb", + "lib/google/cloud/discoveryengine/v1/session_service_pb.rb", + "lib/google/cloud/discoveryengine/v1/session_service_services_pb.rb", "lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb", "lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb", "lib/google/cloud/discoveryengine/v1/site_search_engine_service_services_pb.rb", @@ -242,6 +262,9 @@ "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", "proto_docs/google/cloud/discoveryengine/v1/answer.rb", + "proto_docs/google/cloud/discoveryengine/v1/assist_answer.rb", + "proto_docs/google/cloud/discoveryengine/v1/assistant.rb", + "proto_docs/google/cloud/discoveryengine/v1/assistant_service.rb", "proto_docs/google/cloud/discoveryengine/v1/chunk.rb", "proto_docs/google/cloud/discoveryengine/v1/cmek_config_service.rb", "proto_docs/google/cloud/discoveryengine/v1/common.rb", @@ -293,6 +316,7 @@ "proto_docs/google/rpc/status.rb", "proto_docs/google/type/date.rb", "snippets/Gemfile", + "snippets/assistant_service/stream_assist.rb", "snippets/cmek_config_service/delete_cmek_config.rb", "snippets/cmek_config_service/get_cmek_config.rb", "snippets/cmek_config_service/list_cmek_configs.rb", @@ -362,6 +386,11 @@ "snippets/search_tuning_service/list_custom_models.rb", "snippets/search_tuning_service/train_custom_model.rb", "snippets/serving_config_service/update_serving_config.rb", + "snippets/session_service/create_session.rb", + "snippets/session_service/delete_session.rb", + "snippets/session_service/get_session.rb", + "snippets/session_service/list_sessions.rb", + "snippets/session_service/update_session.rb", "snippets/site_search_engine_service/batch_create_target_sites.rb", "snippets/site_search_engine_service/batch_verify_target_sites.rb", "snippets/site_search_engine_service/create_sitemap.rb", @@ -384,6 +413,9 @@ "snippets/user_event_service/write_user_event.rb", "snippets/user_license_service/batch_update_user_licenses.rb", "snippets/user_license_service/list_user_licenses.rb", + "test/google/cloud/discovery_engine/v1/assistant_service_paths_test.rb", + "test/google/cloud/discovery_engine/v1/assistant_service_rest_test.rb", + "test/google/cloud/discovery_engine/v1/assistant_service_test.rb", "test/google/cloud/discovery_engine/v1/cmek_config_service_operations_test.rb", "test/google/cloud/discovery_engine/v1/cmek_config_service_paths_test.rb", "test/google/cloud/discovery_engine/v1/cmek_config_service_rest_test.rb", @@ -441,6 +473,9 @@ "test/google/cloud/discovery_engine/v1/serving_config_service_paths_test.rb", "test/google/cloud/discovery_engine/v1/serving_config_service_rest_test.rb", "test/google/cloud/discovery_engine/v1/serving_config_service_test.rb", + "test/google/cloud/discovery_engine/v1/session_service_paths_test.rb", + "test/google/cloud/discovery_engine/v1/session_service_rest_test.rb", + "test/google/cloud/discovery_engine/v1/session_service_test.rb", "test/google/cloud/discovery_engine/v1/site_search_engine_service_operations_test.rb", "test/google/cloud/discovery_engine/v1/site_search_engine_service_paths_test.rb", "test/google/cloud/discovery_engine/v1/site_search_engine_service_rest_test.rb", diff --git a/google-cloud-discovery_engine-v1/AUTHENTICATION.md b/google-cloud-discovery_engine-v1/AUTHENTICATION.md index 33d159012e26..9cc4fc80271b 100644 --- a/google-cloud-discovery_engine-v1/AUTHENTICATION.md +++ b/google-cloud-discovery_engine-v1/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/discovery_engine/v1" -client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| +client = ::Google::Cloud::DiscoveryEngine::V1::SearchService::Client.new do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients: ```ruby require "google/cloud/discovery_engine/v1" -::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.configure do |config| +::Google::Cloud::DiscoveryEngine::V1::SearchService::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new +client = ::Google::Cloud::DiscoveryEngine::V1::SearchService::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/discovery_engine/v1" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new +client = ::Google::Cloud::DiscoveryEngine::V1::SearchService::Client.new ``` ### Local ADC file diff --git a/google-cloud-discovery_engine-v1/README.md b/google-cloud-discovery_engine-v1/README.md index 63db707810c4..923b5e4740b1 100644 --- a/google-cloud-discovery_engine-v1/README.md +++ b/google-cloud-discovery_engine-v1/README.md @@ -31,9 +31,9 @@ In order to use this library, you first need to go through the following steps: ```ruby require "google/cloud/discovery_engine/v1" -client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new -request = ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new # (request fields as keyword arguments...) -response = client.update_cmek_config request +client = ::Google::Cloud::DiscoveryEngine::V1::SearchService::Client.new +request = ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new # (request fields as keyword arguments...) +response = client.search request ``` View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest) @@ -74,7 +74,7 @@ constructing a client object. For example: require "google/cloud/discovery_engine/v1" require "logger" -client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| +client = ::Google::Cloud::DiscoveryEngine::V1::SearchService::Client.new do |config| config.logger = Logger.new "my-app.log" end ``` diff --git a/google-cloud-discovery_engine-v1/Rakefile b/google-cloud-discovery_engine-v1/Rakefile index b23e2b1eb863..ecac5d24736e 100644 --- a/google-cloud-discovery_engine-v1/Rakefile +++ b/google-cloud-discovery_engine-v1/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/discovery_engine/v1/cmek_config_service/credentials" - ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Credentials.env_vars.each do |path| + require "google/cloud/discovery_engine/v1/search_service/credentials" + ::Google::Cloud::DiscoveryEngine::V1::SearchService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-discovery_engine-v1/gapic_metadata.json b/google-cloud-discovery_engine-v1/gapic_metadata.json index cc167336c413..98ebe5c969da 100644 --- a/google-cloud-discovery_engine-v1/gapic_metadata.json +++ b/google-cloud-discovery_engine-v1/gapic_metadata.json @@ -5,6 +5,39 @@ "protoPackage": "google.cloud.discoveryengine.v1", "libraryPackage": "::Google::Cloud::DiscoveryEngine::V1", "services": { + "SearchService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client", + "rpcs": { + "Search": { + "methods": [ + "search" + ] + }, + "SearchLite": { + "methods": [ + "search_lite" + ] + } + } + } + } + }, + "AssistantService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client", + "rpcs": { + "StreamAssist": { + "methods": [ + "stream_assist" + ] + } + } + } + } + }, "CmekConfigService": { "clients": { "grpc": { @@ -102,25 +135,6 @@ } } }, - "SearchService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client", - "rpcs": { - "Search": { - "methods": [ - "search" - ] - }, - "SearchLite": { - "methods": [ - "search_lite" - ] - } - } - } - } - }, "ConversationalSearchService": { "clients": { "grpc": { @@ -494,6 +508,40 @@ } } }, + "SessionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client", + "rpcs": { + "CreateSession": { + "methods": [ + "create_session" + ] + }, + "DeleteSession": { + "methods": [ + "delete_session" + ] + }, + "UpdateSession": { + "methods": [ + "update_session" + ] + }, + "GetSession": { + "methods": [ + "get_session" + ] + }, + "ListSessions": { + "methods": [ + "list_sessions" + ] + } + } + } + } + }, "SiteSearchEngineService": { "clients": { "grpc": { diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1.rb index aaf0d19c323f..eb1002458562 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1.rb @@ -16,10 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/discovery_engine/v1/search_service" +require "google/cloud/discovery_engine/v1/assistant_service" require "google/cloud/discovery_engine/v1/cmek_config_service" require "google/cloud/discovery_engine/v1/completion_service" require "google/cloud/discovery_engine/v1/control_service" -require "google/cloud/discovery_engine/v1/search_service" require "google/cloud/discovery_engine/v1/conversational_search_service" require "google/cloud/discovery_engine/v1/data_store_service" require "google/cloud/discovery_engine/v1/document_service" @@ -32,6 +33,7 @@ require "google/cloud/discovery_engine/v1/schema_service" require "google/cloud/discovery_engine/v1/search_tuning_service" require "google/cloud/discovery_engine/v1/serving_config_service" +require "google/cloud/discovery_engine/v1/session_service" require "google/cloud/discovery_engine/v1/site_search_engine_service" require "google/cloud/discovery_engine/v1/user_event_service" require "google/cloud/discovery_engine/v1/user_license_service" @@ -46,12 +48,12 @@ module DiscoveryEngine # @example Load this package, including all its services, and instantiate a gRPC client # # require "google/cloud/discovery_engine/v1" - # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new + # client = ::Google::Cloud::DiscoveryEngine::V1::SearchService::Client.new # # @example Load this package, including all its services, and instantiate a REST client # # require "google/cloud/discovery_engine/v1" - # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # client = ::Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client.new # module V1 end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service.rb new file mode 100644 index 000000000000..480e2a026212 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/assistant_service/credentials" +require "google/cloud/discovery_engine/v1/assistant_service/paths" +require "google/cloud/discovery_engine/v1/assistant_service/client" +require "google/cloud/discovery_engine/v1/assistant_service/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing Assistant configuration and assisting users. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/discovery_engine/v1/assistant_service" + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/discovery_engine/v1/assistant_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client.new + # + module AssistantService + end + end + end + end +end + +helper_path = ::File.join __dir__, "assistant_service", "helpers.rb" +require "google/cloud/discovery_engine/v1/assistant_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/client.rb new file mode 100644 index 000000000000..b4ff2d83afc9 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/client.rb @@ -0,0 +1,509 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/assistant_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module AssistantService + ## + # Client for the AssistantService service. + # + # Service for managing Assistant configuration and assisting users. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assistant_service_stub + + ## + # Configure the AssistantService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssistantService clients + # ::Google::Cloud::DiscoveryEngine::V1::AssistantService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 30.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.stream_assist.timeout = 300.0 + default_config.rpcs.stream_assist.retry_policy = { + initial_delay: 1.0, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssistantService 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::DiscoveryEngine::V1::AssistantService::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 + @assistant_service_stub.universe_domain + end + + ## + # Create a new AssistantService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssistantService 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/discoveryengine/v1/assistant_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 + + @assistant_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::DiscoveryEngine::V1::AssistantService::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 + ) + + @assistant_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @assistant_service_stub.endpoint + config.universe_domain = @assistant_service_stub.universe_domain + config.logger = @assistant_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assistant_service_stub.logger + end + + # Service calls + + ## + # Assists the user with a query in a streaming fashion. + # + # @overload stream_assist(request, options = nil) + # Pass arguments to `stream_assist` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest, ::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 stream_assist(name: nil, query: nil, session: nil, user_metadata: nil, tools_spec: nil, generation_spec: nil) + # Pass arguments to `stream_assist` 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 resource name of the + # {::Google::Cloud::DiscoveryEngine::V1::Assistant Assistant}. Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + # @param query [::Google::Cloud::DiscoveryEngine::V1::Query, ::Hash] + # Optional. Current user query. + # + # Empty query is only supported if `file_ids` are provided. In this case, the + # answer will be generated based on those context files. + # @param session [::String] + # Optional. The session to use for the request. If specified, the assistant + # has access to the session history, and the query and the answer are stored + # there. + # + # If `-` is specified as the session ID, or it is left empty, then a new + # session is created with an automatically generated ID. + # + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` + # @param user_metadata [::Google::Cloud::DiscoveryEngine::V1::AssistUserMetadata, ::Hash] + # Optional. Information about the user initiating the query. + # @param tools_spec [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec, ::Hash] + # Optional. Specification of tools that are used to serve the request. + # @param generation_spec [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::GenerationSpec, ::Hash] + # Optional. Specification of the generation configuration for the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest.new + # + # # Call the stream_assist method to start streaming. + # output = client.stream_assist request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse + # output.each do |current_response| + # p current_response + # end + # + def stream_assist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest + + # 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.stream_assist.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.stream_assist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stream_assist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assistant_service_stub.call_rpc :stream_assist, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssistantService API. + # + # This class represents the configuration for AssistantService, + # 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::DiscoveryEngine::V1::AssistantService::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 + # # stream_assist to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.stream_assist.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.stream_assist.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 AssistantService 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 `stream_assist` + # @return [::Gapic::Config::Method] + # + attr_reader :stream_assist + + # @private + def initialize parent_rpcs = nil + stream_assist_config = parent_rpcs.stream_assist if parent_rpcs.respond_to? :stream_assist + @stream_assist = ::Gapic::Config::Method.new stream_assist_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/credentials.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/credentials.rb new file mode 100644 index 000000000000..089a0d7059f0 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module AssistantService + # Credentials for the AssistantService 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 diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/paths.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/paths.rb new file mode 100644 index 000000000000..d16bd2135937 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/paths.rb @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module AssistantService + # Path helper methods for the AssistantService API. + module Paths + ## + # Create a fully-qualified Assistant resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param engine [String] + # @param assistant [String] + # + # @return [::String] + def assistant_path project:, location:, collection:, engine:, assistant: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/assistants/#{assistant}" + end + + ## + # Create a fully-qualified DataStore resource string. + # + # @overload data_store_path(project:, location:, data_store:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # + # @overload data_store_path(project:, location:, collection:, data_store:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # + # @return [::String] + def data_store_path **args + resources = { + "data_store:location:project" => (proc do |project:, location:, data_store:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}" + end), + "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Session resource string. + # + # @overload session_path(project:, location:, data_store:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param session [String] + # + # @overload session_path(project:, location:, collection:, data_store:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param session [String] + # + # @overload session_path(project:, location:, collection:, engine:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param engine [String] + # @param session [String] + # + # @return [::String] + def session_path **args + resources = { + "data_store:location:project:session" => (proc do |project:, location:, data_store:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}" + end), + "collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}" + end), + "collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest.rb new file mode 100644 index 000000000000..4c875b85fb16 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/assistant_service/credentials" +require "google/cloud/discovery_engine/v1/assistant_service/paths" +require "google/cloud/discovery_engine/v1/assistant_service/rest/client" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing Assistant configuration and assisting users. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/discovery_engine/v1/assistant_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client.new + # + module AssistantService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/discovery_engine/v1/assistant_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest/client.rb new file mode 100644 index 000000000000..97d5d9ec4e1f --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest/client.rb @@ -0,0 +1,478 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/assistant_service_pb" +require "google/cloud/discovery_engine/v1/assistant_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module AssistantService + module Rest + ## + # REST client for the AssistantService service. + # + # Service for managing Assistant configuration and assisting users. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assistant_service_stub + + ## + # Configure the AssistantService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssistantService clients + # ::Google::Cloud::DiscoveryEngine::V1::AssistantService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 30.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.stream_assist.timeout = 300.0 + default_config.rpcs.stream_assist.retry_policy = { + initial_delay: 1.0, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssistantService 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::DiscoveryEngine::V1::AssistantService::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 + @assistant_service_stub.universe_domain + end + + ## + # Create a new AssistantService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssistantService 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 + + @assistant_service_stub = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @assistant_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @assistant_service_stub.endpoint + config.universe_domain = @assistant_service_stub.universe_domain + config.logger = @assistant_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assistant_service_stub.logger + end + + # Service calls + + ## + # Assists the user with a query in a streaming fashion. + # + # @overload stream_assist(request, options = nil) + # Pass arguments to `stream_assist` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest, ::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 stream_assist(name: nil, query: nil, session: nil, user_metadata: nil, tools_spec: nil, generation_spec: nil) + # Pass arguments to `stream_assist` 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 resource name of the + # {::Google::Cloud::DiscoveryEngine::V1::Assistant Assistant}. Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + # @param query [::Google::Cloud::DiscoveryEngine::V1::Query, ::Hash] + # Optional. Current user query. + # + # Empty query is only supported if `file_ids` are provided. In this case, the + # answer will be generated based on those context files. + # @param session [::String] + # Optional. The session to use for the request. If specified, the assistant + # has access to the session history, and the query and the answer are stored + # there. + # + # If `-` is specified as the session ID, or it is left empty, then a new + # session is created with an automatically generated ID. + # + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` + # @param user_metadata [::Google::Cloud::DiscoveryEngine::V1::AssistUserMetadata, ::Hash] + # Optional. Information about the user initiating the query. + # @param tools_spec [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec, ::Hash] + # Optional. Specification of tools that are used to serve the request. + # @param generation_spec [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::GenerationSpec, ::Hash] + # Optional. Specification of the generation configuration for the request. + # @return [::Enumerable<::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest.new + # + # # Call the stream_assist method to start streaming. + # output = client.stream_assist request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse + # output.each do |current_response| + # p current_response + # end + # + def stream_assist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest + + # 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.stream_assist.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::DiscoveryEngine::V1::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.stream_assist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stream_assist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + ::Gapic::Rest::ServerStream.new( + ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse, + ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| + @assistant_service_stub.stream_assist request, options do |chunk| + in_q.deq + out_q.enq chunk + end + end + ) + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssistantService REST API. + # + # This class represents the configuration for AssistantService 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::DiscoveryEngine::V1::AssistantService::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 + # # stream_assist to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.stream_assist.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.stream_assist.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 = "discoveryengine.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 AssistantService 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 `stream_assist` + # @return [::Gapic::Config::Method] + # + attr_reader :stream_assist + + # @private + def initialize parent_rpcs = nil + stream_assist_config = parent_rpcs.stream_assist if parent_rpcs.respond_to? :stream_assist + @stream_assist = ::Gapic::Config::Method.new stream_assist_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest/service_stub.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest/service_stub.rb new file mode 100644 index 000000000000..b5e5a049c0e9 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/assistant_service/rest/service_stub.rb @@ -0,0 +1,137 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/assistant_service_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module AssistantService + module Rest + ## + # REST service stub for the AssistantService 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: true, + 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 stream_assist REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest] + # 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. + # + # @yieldparam chunk [::String] The chunk of data received during server streaming. + # + # @return [::Gapic::Rest::TransportOperation] + def stream_assist(request_pb, options = nil, &) + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stream_assist_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: "stream_assist", + options: options, + is_server_streaming: true, + & + ) + ::Gapic::Rest::TransportOperation.new response + end + + ## + # @private + # + # GRPC transcoding helper method for the stream_assist REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_stream_assist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:streamAssist", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/assistants/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb index 721a5e285424..fc7d3430e813 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb @@ -1625,11 +1625,23 @@ def get_session request, options = nil # A page token, received from a previous `ListSessions` call. # Provide this to retrieve the subsequent page. # @param filter [::String] - # A filter to apply on the list results. The supported features are: - # user_pseudo_id, state. - # - # Example: + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` + # + # Examples: # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" # @param order_by [::String] # A comma-separated list of fields to order by, sorted in ascending order. # Use "desc" after a field name for descending. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb index bad01a7aa55d..46b85ff63cf1 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb @@ -1529,11 +1529,23 @@ def get_session request, options = nil # A page token, received from a previous `ListSessions` call. # Provide this to retrieve the subsequent page. # @param filter [::String] - # A filter to apply on the list results. The supported features are: - # user_pseudo_id, state. - # - # Example: + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` + # + # Examples: # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" # @param order_by [::String] # A comma-separated list of fields to order by, sorted in ascending order. # Use "desc" after a field name for descending. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/rest.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/rest.rb index 5171995c17f1..d04b9484e9b5 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/rest.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/rest.rb @@ -16,10 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/discovery_engine/v1/search_service/rest" +require "google/cloud/discovery_engine/v1/assistant_service/rest" require "google/cloud/discovery_engine/v1/cmek_config_service/rest" require "google/cloud/discovery_engine/v1/completion_service/rest" require "google/cloud/discovery_engine/v1/control_service/rest" -require "google/cloud/discovery_engine/v1/search_service/rest" require "google/cloud/discovery_engine/v1/conversational_search_service/rest" require "google/cloud/discovery_engine/v1/data_store_service/rest" require "google/cloud/discovery_engine/v1/document_service/rest" @@ -32,6 +33,7 @@ require "google/cloud/discovery_engine/v1/schema_service/rest" require "google/cloud/discovery_engine/v1/search_tuning_service/rest" require "google/cloud/discovery_engine/v1/serving_config_service/rest" +require "google/cloud/discovery_engine/v1/session_service/rest" require "google/cloud/discovery_engine/v1/site_search_engine_service/rest" require "google/cloud/discovery_engine/v1/user_event_service/rest" require "google/cloud/discovery_engine/v1/user_license_service/rest" @@ -46,7 +48,7 @@ module DiscoveryEngine # @example # # require "google/cloud/discovery_engine/v1/rest" - # client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Rest::Client.new + # client = ::Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client.new # module V1 end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb index dcb33d322e55..2b4261402a0d 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb @@ -415,22 +415,16 @@ def logger # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public @@ -743,22 +737,16 @@ def search request, options = nil # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb index 6a5223b84fd6..458c9869407b 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb @@ -408,22 +408,16 @@ def logger # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public @@ -729,22 +723,16 @@ def search request, options = nil # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service.rb new file mode 100644 index 000000000000..b2333a696f84 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/session_service/credentials" +require "google/cloud/discovery_engine/v1/session_service/paths" +require "google/cloud/discovery_engine/v1/session_service/client" +require "google/cloud/discovery_engine/v1/session_service/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing Sessions and Session-related resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/discovery_engine/v1/session_service" + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/discovery_engine/v1/session_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new + # + module SessionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "session_service", "helpers.rb" +require "google/cloud/discovery_engine/v1/session_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/client.rb new file mode 100644 index 000000000000..45b9938768c3 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/client.rb @@ -0,0 +1,920 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/session_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module SessionService + ## + # Client for the SessionService service. + # + # Service for managing Sessions and Session-related resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :session_service_stub + + ## + # Configure the SessionService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::SessionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SessionService clients + # ::Google::Cloud::DiscoveryEngine::V1::SessionService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 30.0 + default_config.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 SessionService 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::DiscoveryEngine::V1::SessionService::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 + @session_service_stub.universe_domain + end + + ## + # Create a new SessionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SessionService 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/discoveryengine/v1/session_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 + + @session_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::DiscoveryEngine::V1::SessionService::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 + ) + + @session_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @session_service_stub.endpoint + config.universe_domain = @session_service_stub.universe_domain + config.logger = @session_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @session_service_stub.logger + end + + # Service calls + + ## + # Creates a Session. + # + # If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to create already + # exists, an ALREADY_EXISTS error is returned. + # + # @overload create_session(request, options = nil) + # Pass arguments to `create_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest, ::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_session(parent: nil, session: nil) + # Pass arguments to `create_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Full resource name of parent data store. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + # @param session [::Google::Cloud::DiscoveryEngine::V1::Session, ::Hash] + # Required. The session to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Session] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest.new + # + # # Call the create_session method. + # result = client.create_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + # p result + # + def create_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest + + # 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_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :create_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Session. + # + # If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to delete does + # not exist, a NOT_FOUND error is returned. + # + # @overload delete_session(request, options = nil) + # Pass arguments to `delete_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest, ::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_session(name: nil) + # Pass arguments to `delete_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Session to delete. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # + # @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/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest.new + # + # # Call the delete_session method. + # result = client.delete_session request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest + + # 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_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :delete_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Session. + # + # {::Google::Cloud::DiscoveryEngine::V1::Session Session} action type cannot be + # changed. If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to + # update does not exist, a NOT_FOUND error is returned. + # + # @overload update_session(request, options = nil) + # Pass arguments to `update_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest, ::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 update_session(session: nil, update_mask: nil) + # Pass arguments to `update_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::Google::Cloud::DiscoveryEngine::V1::Session, ::Hash] + # Required. The Session to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Indicates which fields in the provided + # {::Google::Cloud::DiscoveryEngine::V1::Session Session} to update. The following + # are NOT supported: + # + # * {::Google::Cloud::DiscoveryEngine::V1::Session#name Session.name} + # + # If not set or empty, all supported fields are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Session] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest.new + # + # # Call the update_session method. + # result = client.update_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + # p result + # + def update_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest + + # 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.update_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session&.name + header_params["session.name"] = request.session.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.update_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :update_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Session. + # + # @overload get_session(request, options = nil) + # Pass arguments to `get_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest, ::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_session(name: nil, include_answer_details: nil) + # Pass arguments to `get_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Session to get. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @param include_answer_details [::Boolean] + # Optional. If set to true, the full session including all answer details + # will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Session] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::GetSessionRequest.new + # + # # Call the get_session method. + # result = client.get_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + # p result + # + def get_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest + + # 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_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :get_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Sessions by their parent + # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest, ::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_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_sessions` 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 data store resource name. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + # @param page_size [::Integer] + # Maximum number of results to return. If unspecified, defaults + # to 50. Max allowed value is 1000. + # @param page_token [::String] + # A page token, received from a previous `ListSessions` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` + # + # Examples: + # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" + # @param order_by [::String] + # A comma-separated list of fields to order by, sorted in ascending order. + # Use "desc" after a field name for descending. + # Supported fields: + # + # * `update_time` + # * `create_time` + # * `session_name` + # * `is_pinned` + # + # Example: + # + # * "update_time desc" + # * "create_time" + # * "is_pinned desc,update_time desc": list sessions by is_pinned first, then + # by update_time. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Session>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Session>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions 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::DiscoveryEngine::V1::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest + + # 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_sessions.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::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :list_sessions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @session_service_stub, :list_sessions, 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 SessionService API. + # + # This class represents the configuration for SessionService, + # 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::DiscoveryEngine::V1::SessionService::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_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 SessionService 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_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_session + ## + # RPC-specific configuration for `delete_session` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_session + ## + # RPC-specific configuration for `update_session` + # @return [::Gapic::Config::Method] + # + attr_reader :update_session + ## + # RPC-specific configuration for `get_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_session + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + + # @private + def initialize parent_rpcs = nil + create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session + @create_session = ::Gapic::Config::Method.new create_session_config + delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session + @delete_session = ::Gapic::Config::Method.new delete_session_config + update_session_config = parent_rpcs.update_session if parent_rpcs.respond_to? :update_session + @update_session = ::Gapic::Config::Method.new update_session_config + get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session + @get_session = ::Gapic::Config::Method.new get_session_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/credentials.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/credentials.rb new file mode 100644 index 000000000000..e808e7948ed5 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module SessionService + # Credentials for the SessionService 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 diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/paths.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/paths.rb new file mode 100644 index 000000000000..b80e7723e9f7 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/paths.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + module SessionService + # Path helper methods for the SessionService API. + module Paths + ## + # Create a fully-qualified Answer resource string. + # + # @overload answer_path(project:, location:, data_store:, session:, answer:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param session [String] + # @param answer [String] + # + # @overload answer_path(project:, location:, collection:, data_store:, session:, answer:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param session [String] + # @param answer [String] + # + # @overload answer_path(project:, location:, collection:, engine:, session:, answer:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param engine [String] + # @param session [String] + # @param answer [String] + # + # @return [::String] + def answer_path **args + resources = { + "answer:data_store:location:project:session" => (proc do |project:, location:, data_store:, session:, answer:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}" + end), + "answer:collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:, answer:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}" + end), + "answer:collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:, answer:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/" + raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}/answers/#{answer}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Chunk resource string. + # + # @overload chunk_path(project:, location:, data_store:, branch:, document:, chunk:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # @param chunk [String] + # + # @overload chunk_path(project:, location:, collection:, data_store:, branch:, document:, chunk:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # @param chunk [String] + # + # @return [::String] + def chunk_path **args + resources = { + "branch:chunk:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:, chunk:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}" + end), + "branch:chunk:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:, chunk:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified DataStore resource string. + # + # @overload data_store_path(project:, location:, data_store:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # + # @overload data_store_path(project:, location:, collection:, data_store:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # + # @return [::String] + def data_store_path **args + resources = { + "data_store:location:project" => (proc do |project:, location:, data_store:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}" + end), + "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Document resource string. + # + # @overload document_path(project:, location:, data_store:, branch:, document:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # + # @overload document_path(project:, location:, collection:, data_store:, branch:, document:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # + # @return [::String] + def document_path **args + resources = { + "branch:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}" + end), + "branch:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Session resource string. + # + # @overload session_path(project:, location:, data_store:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param session [String] + # + # @overload session_path(project:, location:, collection:, data_store:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param session [String] + # + # @overload session_path(project:, location:, collection:, engine:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param engine [String] + # @param session [String] + # + # @return [::String] + def session_path **args + resources = { + "data_store:location:project:session" => (proc do |project:, location:, data_store:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}" + end), + "collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}" + end), + "collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest.rb new file mode 100644 index 000000000000..e5318190fedb --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/version" + +require "google/cloud/discovery_engine/v1/session_service/credentials" +require "google/cloud/discovery_engine/v1/session_service/paths" +require "google/cloud/discovery_engine/v1/session_service/rest/client" + +module Google + module Cloud + module DiscoveryEngine + module V1 + ## + # Service for managing Sessions and Session-related resources. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/discovery_engine/v1/session_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new + # + module SessionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/discovery_engine/v1/session_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest/client.rb new file mode 100644 index 000000000000..ffa5e9bfeacd --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest/client.rb @@ -0,0 +1,859 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/session_service_pb" +require "google/cloud/discovery_engine/v1/session_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module SessionService + module Rest + ## + # REST client for the SessionService service. + # + # Service for managing Sessions and Session-related resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :session_service_stub + + ## + # Configure the SessionService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SessionService clients + # ::Google::Cloud::DiscoveryEngine::V1::SessionService::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", "DiscoveryEngine", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 30.0 + default_config.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 SessionService 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::DiscoveryEngine::V1::SessionService::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 + @session_service_stub.universe_domain + end + + ## + # Create a new SessionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SessionService 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 + + @session_service_stub = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @session_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @session_service_stub.endpoint + config.universe_domain = @session_service_stub.universe_domain + config.logger = @session_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @session_service_stub.logger + end + + # Service calls + + ## + # Creates a Session. + # + # If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to create already + # exists, an ALREADY_EXISTS error is returned. + # + # @overload create_session(request, options = nil) + # Pass arguments to `create_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest, ::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_session(parent: nil, session: nil) + # Pass arguments to `create_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Full resource name of parent data store. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + # @param session [::Google::Cloud::DiscoveryEngine::V1::Session, ::Hash] + # Required. The session to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest.new + # + # # Call the create_session method. + # result = client.create_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + # p result + # + def create_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest + + # 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_session.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::DiscoveryEngine::V1::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_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.create_session 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 + + ## + # Deletes a Session. + # + # If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to delete does + # not exist, a NOT_FOUND error is returned. + # + # @overload delete_session(request, options = nil) + # Pass arguments to `delete_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest, ::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_session(name: nil) + # Pass arguments to `delete_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Session to delete. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @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/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest.new + # + # # Call the delete_session method. + # result = client.delete_session request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest + + # 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_session.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::DiscoveryEngine::V1::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_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.delete_session 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 + + ## + # Updates a Session. + # + # {::Google::Cloud::DiscoveryEngine::V1::Session Session} action type cannot be + # changed. If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to + # update does not exist, a NOT_FOUND error is returned. + # + # @overload update_session(request, options = nil) + # Pass arguments to `update_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest, ::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 update_session(session: nil, update_mask: nil) + # Pass arguments to `update_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::Google::Cloud::DiscoveryEngine::V1::Session, ::Hash] + # Required. The Session to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Indicates which fields in the provided + # {::Google::Cloud::DiscoveryEngine::V1::Session Session} to update. The following + # are NOT supported: + # + # * {::Google::Cloud::DiscoveryEngine::V1::Session#name Session.name} + # + # If not set or empty, all supported fields are updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest.new + # + # # Call the update_session method. + # result = client.update_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + # p result + # + def update_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest + + # 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.update_session.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::DiscoveryEngine::V1::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.update_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.update_session 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 Session. + # + # @overload get_session(request, options = nil) + # Pass arguments to `get_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest, ::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_session(name: nil, include_answer_details: nil) + # Pass arguments to `get_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Session to get. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @param include_answer_details [::Boolean] + # Optional. If set to true, the full session including all answer details + # will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::GetSessionRequest.new + # + # # Call the get_session method. + # result = client.get_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + # p result + # + def get_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest + + # 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_session.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::DiscoveryEngine::V1::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_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.get_session 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 all Sessions by their parent + # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest, ::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_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_sessions` 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 data store resource name. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + # @param page_size [::Integer] + # Maximum number of results to return. If unspecified, defaults + # to 50. Max allowed value is 1000. + # @param page_token [::String] + # A page token, received from a previous `ListSessions` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` + # + # Examples: + # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" + # @param order_by [::String] + # A comma-separated list of fields to order by, sorted in ascending order. + # Use "desc" after a field name for descending. + # Supported fields: + # + # * `update_time` + # * `create_time` + # * `session_name` + # * `is_pinned` + # + # Example: + # + # * "update_time desc" + # * "create_time" + # * "is_pinned desc,update_time desc": list sessions by is_pinned first, then + # by update_time. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Session>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Session>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions 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::DiscoveryEngine::V1::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest + + # 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_sessions.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::DiscoveryEngine::V1::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_sessions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.list_sessions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @session_service_stub, :list_sessions, "sessions", 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 SessionService REST API. + # + # This class represents the configuration for SessionService 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::DiscoveryEngine::V1::SessionService::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_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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 = "discoveryengine.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 SessionService 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_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_session + ## + # RPC-specific configuration for `delete_session` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_session + ## + # RPC-specific configuration for `update_session` + # @return [::Gapic::Config::Method] + # + attr_reader :update_session + ## + # RPC-specific configuration for `get_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_session + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + + # @private + def initialize parent_rpcs = nil + create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session + @create_session = ::Gapic::Config::Method.new create_session_config + delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session + @delete_session = ::Gapic::Config::Method.new delete_session_config + update_session_config = parent_rpcs.update_session if parent_rpcs.respond_to? :update_session + @update_session = ::Gapic::Config::Method.new update_session_config + get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session + @get_session = ::Gapic::Config::Method.new get_session_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest/service_stub.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest/service_stub.rb new file mode 100644 index 000000000000..14dc29274fc5 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/session_service/rest/service_stub.rb @@ -0,0 +1,462 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/session_service_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1 + module SessionService + module Rest + ## + # REST service stub for the SessionService 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: true, + 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_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest] + # 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::DiscoveryEngine::V1::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # A result object deserialized from the server's reply + def create_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_session_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_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::Session.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_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest] + # 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_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_session_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_session", + 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 update_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest] + # 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::DiscoveryEngine::V1::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # A result object deserialized from the server's reply + def update_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_session_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: "update_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::Session.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_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest] + # 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::DiscoveryEngine::V1::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::Session] + # A result object deserialized from the server's reply + def get_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_session_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_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::Session.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_sessions REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest] + # 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::DiscoveryEngine::V1::ListSessionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1::ListSessionsResponse] + # A result object deserialized from the server's reply + def list_sessions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sessions_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_sessions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1::ListSessionsResponse.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_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest] + # 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_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/sessions", + body: "session", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/sessions", + body: "session", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/sessions", + body: "session", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest] + # 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_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{session.name}", + body: "session", + matches: [ + ["session.name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{session.name}", + body: "session", + matches: [ + ["session.name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{session.name}", + body: "session", + matches: [ + ["session.name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest] + # 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_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sessions REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest] + # 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_sessions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assist_answer_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assist_answer_pb.rb new file mode 100644 index 000000000000..88f096da08b6 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assist_answer_pb.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1/assist_answer.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/cloud/discoveryengine/v1/assist_answer.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8d\x06\n\x0c\x41ssistAnswer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x42\n\x05state\x18\x02 \x01(\x0e\x32\x33.google.cloud.discoveryengine.v1.AssistAnswer.State\x12\x44\n\x07replies\x18\x03 \x03(\x0b\x32\x33.google.cloud.discoveryengine.v1.AssistAnswer.Reply\x12\x61\n\x16\x61ssist_skipped_reasons\x18\x05 \x03(\x0e\x32\x41.google.cloud.discoveryengine.v1.AssistAnswer.AssistSkippedReason\x1ag\n\x05Reply\x12U\n\x10grounded_content\x18\x01 \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.AssistantGroundedContentH\x00\x42\x07\n\x05reply\"W\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x0b\n\x07SKIPPED\x10\x04\"\x81\x01\n\x13\x41ssistSkippedReason\x12%\n!ASSIST_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12$\n NON_ASSIST_SEEKING_QUERY_IGNORED\x10\x01\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x02:\xb6\x01\xea\x41\xb2\x01\n+discoveryengine.googleapis.com/AssistAnswer\x12\x82\x01projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}\"\xb1\x06\n\x10\x41ssistantContent\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12M\n\x0binline_data\x18\x03 \x01(\x0b\x32\x36.google.cloud.discoveryengine.v1.AssistantContent.BlobH\x00\x12\x46\n\x04\x66ile\x18\x04 \x01(\x0b\x32\x36.google.cloud.discoveryengine.v1.AssistantContent.FileH\x00\x12[\n\x0f\x65xecutable_code\x18\x07 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.AssistantContent.ExecutableCodeH\x00\x12\x66\n\x15\x63ode_execution_result\x18\x08 \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1.AssistantContent.CodeExecutionResultH\x00\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x14\n\x07thought\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x1a\x34\n\x04\x46ile\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x66ile_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a#\n\x0e\x45xecutableCode\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xf6\x01\n\x13\x43odeExecutionResult\x12\x63\n\x07outcome\x18\x01 \x01(\x0e\x32M.google.cloud.discoveryengine.v1.AssistantContent.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\x42\x06\n\x04\x64\x61ta\"\xdf\x07\n\x18\x41ssistantGroundedContent\x12r\n\x17text_grounding_metadata\x18\x03 \x01(\x0b\x32O.google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadataH\x00\x12\x42\n\x07\x63ontent\x18\x01 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1.AssistantContent\x1a\xfe\x05\n\x15TextGroundingMetadata\x12i\n\x08segments\x18\x04 \x03(\x0b\x32W.google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Segment\x12m\n\nreferences\x18\x02 \x03(\x0b\x32Y.google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Reference\x1as\n\x07Segment\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12\x19\n\x11reference_indices\x18\x04 \x03(\x05\x12\x17\n\x0fgrounding_score\x18\x05 \x01(\x02\x12\x0c\n\x04text\x18\x06 \x01(\t\x1a\x95\x03\n\tReference\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x85\x01\n\x11\x64ocument_metadata\x18\x02 \x01(\x0b\x32j.google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata\x1a\xee\x01\n\x10\x44ocumentMetadata\x12\x43\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/DocumentH\x00\x88\x01\x01\x12\x10\n\x03uri\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0fpage_identifier\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x13\n\x06\x64omain\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0b\n\t_documentB\x06\n\x04_uriB\x08\n\x06_titleB\x12\n\x10_page_identifierB\t\n\x07_domainB\n\n\x08metadataB\x84\x02\n#com.google.cloud.discoveryengine.v1B\x11\x41ssistAnswerProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1 + AssistAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistAnswer").msgclass + AssistAnswer::Reply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistAnswer.Reply").msgclass + AssistAnswer::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistAnswer.State").enummodule + AssistAnswer::AssistSkippedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistAnswer.AssistSkippedReason").enummodule + AssistantContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantContent").msgclass + AssistantContent::Blob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantContent.Blob").msgclass + AssistantContent::File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantContent.File").msgclass + AssistantContent::ExecutableCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantContent.ExecutableCode").msgclass + AssistantContent::CodeExecutionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantContent.CodeExecutionResult").msgclass + AssistantContent::CodeExecutionResult::Outcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantContent.CodeExecutionResult.Outcome").enummodule + AssistantGroundedContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantGroundedContent").msgclass + AssistantGroundedContent::TextGroundingMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata").msgclass + AssistantGroundedContent::TextGroundingMetadata::Segment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Segment").msgclass + AssistantGroundedContent::TextGroundingMetadata::Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Reference").msgclass + AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata").msgclass + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_pb.rb new file mode 100644 index 000000000000..248652636560 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1/assistant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n/google/cloud/discoveryengine/v1/assistant.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb9\x01\n\tAssistant\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05:\x98\x01\xea\x41\x94\x01\n(discoveryengine.googleapis.com/Assistant\x12hprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}B\x81\x02\n#com.google.cloud.discoveryengine.v1B\x0e\x41ssistantProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1 + Assistant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.Assistant").msgclass + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_service_pb.rb new file mode 100644 index 000000000000..f9d6f1816674 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_service_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1/assistant_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/discoveryengine/v1/assist_answer_pb' +require 'google/cloud/discoveryengine/v1/search_service_pb' +require 'google/cloud/discoveryengine/v1/session_pb' + + +descriptor_data = "\n7google/cloud/discoveryengine/v1/assistant_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/discoveryengine/v1/assist_answer.proto\x1a\x34google/cloud/discoveryengine/v1/search_service.proto\x1a-google/cloud/discoveryengine/v1/session.proto\"R\n\x12\x41ssistUserMetadata\x12\x16\n\ttime_zone\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17preferred_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xba\t\n\x13StreamAssistRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/Assistant\x12:\n\x05query\x18\x02 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.QueryB\x03\xe0\x41\x01\x12?\n\x07session\x18\x03 \x01(\tB.\xe0\x41\x01\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12O\n\ruser_metadata\x18\x06 \x01(\x0b\x32\x33.google.cloud.discoveryengine.v1.AssistUserMetadataB\x03\xe0\x41\x01\x12W\n\ntools_spec\x18\x12 \x01(\x0b\x32>.google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpecB\x03\xe0\x41\x01\x12\x61\n\x0fgeneration_spec\x18\x13 \x01(\x0b\x32\x43.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpecB\x03\xe0\x41\x01\x1a\xaf\x05\n\tToolsSpec\x12u\n\x15vertex_ai_search_spec\x18\x01 \x01(\x0b\x32Q.google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.VertexAiSearchSpecB\x03\xe0\x41\x01\x12p\n\x12web_grounding_spec\x18\x02 \x01(\x0b\x32O.google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.WebGroundingSpecB\x03\xe0\x41\x01\x12v\n\x15image_generation_spec\x18\x03 \x01(\x0b\x32R.google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.ImageGenerationSpecB\x03\xe0\x41\x01\x12v\n\x15video_generation_spec\x18\x04 \x01(\x0b\x32R.google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.VideoGenerationSpecB\x03\xe0\x41\x01\x1a\x86\x01\n\x12VertexAiSearchSpec\x12[\n\x10\x64\x61ta_store_specs\x18\x02 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpecB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x12\n\x10WebGroundingSpec\x1a\x15\n\x13ImageGenerationSpec\x1a\x15\n\x13VideoGenerationSpec\x1a\'\n\x0eGenerationSpec\x12\x15\n\x08model_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\x91\x02\n\x14StreamAssistResponse\x12=\n\x06\x61nswer\x18\x01 \x01(\x0b\x32-.google.cloud.discoveryengine.v1.AssistAnswer\x12W\n\x0csession_info\x18\x02 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo\x12\x14\n\x0c\x61ssist_token\x18\x04 \x01(\t\x1aK\n\x0bSessionInfo\x12<\n\x07session\x18\x01 \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session2\xc6\x02\n\x10\x41ssistantService\x12\xdd\x01\n\x0cStreamAssist\x12\x34.google.cloud.discoveryengine.v1.StreamAssistRequest\x1a\x35.google.cloud.discoveryengine.v1.StreamAssistResponse\"^\x82\xd3\xe4\x93\x02X\"S/v1/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}:streamAssist:\x01*0\x01\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x88\x02\n#com.google.cloud.discoveryengine.v1B\x15\x41ssistantServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.discoveryengine.v1.Query", "google/cloud/discoveryengine/v1/session.proto"], + ["google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec", "google/cloud/discoveryengine/v1/search_service.proto"], + ["google.cloud.discoveryengine.v1.AssistAnswer", "google/cloud/discoveryengine/v1/assist_answer.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1 + AssistUserMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AssistUserMetadata").msgclass + StreamAssistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistRequest").msgclass + StreamAssistRequest::ToolsSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec").msgclass + StreamAssistRequest::ToolsSpec::VertexAiSearchSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec").msgclass + StreamAssistRequest::ToolsSpec::WebGroundingSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.WebGroundingSpec").msgclass + StreamAssistRequest::ToolsSpec::ImageGenerationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.ImageGenerationSpec").msgclass + StreamAssistRequest::ToolsSpec::VideoGenerationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.VideoGenerationSpec").msgclass + StreamAssistRequest::GenerationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec").msgclass + StreamAssistResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistResponse").msgclass + StreamAssistResponse::SessionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo").msgclass + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_service_services_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_service_services_pb.rb new file mode 100644 index 000000000000..5de4fd4e5cbb --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/assistant_service_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/discoveryengine/v1/assistant_service.proto for package 'Google.Cloud.DiscoveryEngine.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/assistant_service_pb' + +module Google + module Cloud + module DiscoveryEngine + module V1 + module AssistantService + # Service for managing Assistant configuration and assisting users. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.discoveryengine.v1.AssistantService' + + # Assists the user with a query in a streaming fashion. + rpc :StreamAssist, ::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest, stream(::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_pb.rb index ab615bd51a22..823eb88aa1b0 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n-google/cloud/discoveryengine/v1/session.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/answer.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x96\x07\n\x07Session\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12=\n\x05state\x18\x02 \x01(\x0e\x32..google.cloud.discoveryengine.v1.Session.State\x12\x16\n\x0euser_pseudo_id\x18\x03 \x01(\t\x12<\n\x05turns\x18\x04 \x03(\x0b\x32-.google.cloud.discoveryengine.v1.Session.Turn\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tis_pinned\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xc0\x01\n\x04Turn\x12\x35\n\x05query\x18\x01 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.Query\x12:\n\x06\x61nswer\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Answer\x12\x45\n\x0f\x64\x65tailed_answer\x18\x07 \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.AnswerB\x03\xe0\x41\x03\"/\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01:\xd3\x02\xea\x41\xcf\x02\n&discoveryengine.googleapis.com/Session\x12Rprojects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}\x12kprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}\x12\x64projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}\"4\n\x05Query\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12\x10\n\x08query_id\x18\x01 \x01(\tB\t\n\x07\x63ontentB\xff\x01\n#com.google.cloud.discoveryengine.v1B\x0cSessionProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" +descriptor_data = "\n-google/cloud/discoveryengine/v1/session.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/discoveryengine/v1/answer.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc0\x08\n\x07Session\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12=\n\x05state\x18\x02 \x01(\x0e\x32..google.cloud.discoveryengine.v1.Session.State\x12\x16\n\x0euser_pseudo_id\x18\x03 \x01(\t\x12<\n\x05turns\x18\x04 \x03(\x0b\x32-.google.cloud.discoveryengine.v1.Session.Turn\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tis_pinned\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xd7\x02\n\x04Turn\x12:\n\x05query\x18\x01 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.QueryB\x03\xe0\x41\x01\x12=\n\x06\x61nswer\x18\x02 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%discoveryengine.googleapis.com/Answer\x12\x45\n\x0f\x64\x65tailed_answer\x18\x07 \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.AnswerB\x03\xe0\x41\x03\x12Y\n\x0cquery_config\x18\x10 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.Session.Turn.QueryConfigEntryB\x03\xe0\x41\x01\x1a\x32\n\x10QueryConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"/\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01:\xe6\x02\xea\x41\xe2\x02\n&discoveryengine.googleapis.com/Session\x12Rprojects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}\x12kprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}\x12\x64projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}*\x08sessions2\x07session\"9\n\x05Query\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12\x15\n\x08query_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x42\t\n\x07\x63ontentB\xff\x01\n#com.google.cloud.discoveryengine.v1B\x0cSessionProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_service_pb.rb new file mode 100644 index 000000000000..14561db3cfb8 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_service_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1/session_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/discoveryengine/v1/conversational_search_service_pb' +require 'google/cloud/discoveryengine/v1/session_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n5google/cloud/discoveryengine/v1/session_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x43google/cloud/discoveryengine/v1/conversational_search_service.proto\x1a-google/cloud/discoveryengine/v1/session.proto\x1a\x1bgoogle/protobuf/empty.proto2\xda\x0e\n\x0eSessionService\x12\xf4\x02\n\rCreateSession\x12\x35.google.cloud.discoveryengine.v1.CreateSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\x81\x02\xda\x41\x0eparent,session\x82\xd3\xe4\x93\x02\xe9\x01\"9/v1/{parent=projects/*/locations/*/dataStores/*}/sessions:\x07sessionZR\"G/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions:\x07sessionZO\"D/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions:\x07session\x12\xbd\x02\n\rDeleteSession\x12\x35.google.cloud.discoveryengine.v1.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"\xdc\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xce\x01*9/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}ZI*G/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZF*D/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\x91\x03\n\rUpdateSession\x12\x35.google.cloud.discoveryengine.v1.UpdateSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\x9e\x02\xda\x41\x13session,update_mask\x82\xd3\xe4\x93\x02\x81\x02\x32\x41/v1/{session.name=projects/*/locations/*/dataStores/*/sessions/*}:\x07sessionZZ2O/v1/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}:\x07sessionZW2L/v1/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}:\x07session\x12\xc9\x02\n\nGetSession\x12\x32.google.cloud.discoveryengine.v1.GetSessionRequest\x1a(.google.cloud.discoveryengine.v1.Session\"\xdc\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xce\x01\x12\x39/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}ZI\x12G/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZF\x12\x44/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xdc\x02\n\x0cListSessions\x12\x34.google.cloud.discoveryengine.v1.ListSessionsRequest\x1a\x35.google.cloud.discoveryengine.v1.ListSessionsResponse\"\xde\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xce\x01\x12\x39/v1/{parent=projects/*/locations/*/dataStores/*}/sessionsZI\x12G/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessionsZF\x12\x44/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x86\x02\n#com.google.cloud.discoveryengine.v1B\x13SessionServiceProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1 + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_service_services_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_service_services_pb.rb new file mode 100644 index 000000000000..652682c6b529 --- /dev/null +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/session_service_services_pb.rb @@ -0,0 +1,64 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/discoveryengine/v1/session_service.proto for package 'Google.Cloud.DiscoveryEngine.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/session_service_pb' + +module Google + module Cloud + module DiscoveryEngine + module V1 + module SessionService + # Service for managing Sessions and Session-related resources. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.discoveryengine.v1.SessionService' + + # Creates a Session. + # + # If the [Session][google.cloud.discoveryengine.v1.Session] to create already + # exists, an ALREADY_EXISTS error is returned. + rpc :CreateSession, ::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest, ::Google::Cloud::DiscoveryEngine::V1::Session + # Deletes a Session. + # + # If the [Session][google.cloud.discoveryengine.v1.Session] to delete does + # not exist, a NOT_FOUND error is returned. + rpc :DeleteSession, ::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest, ::Google::Protobuf::Empty + # Updates a Session. + # + # [Session][google.cloud.discoveryengine.v1.Session] action type cannot be + # changed. If the [Session][google.cloud.discoveryengine.v1.Session] to + # update does not exist, a NOT_FOUND error is returned. + rpc :UpdateSession, ::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest, ::Google::Cloud::DiscoveryEngine::V1::Session + # Gets a Session. + rpc :GetSession, ::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest, ::Google::Cloud::DiscoveryEngine::V1::Session + # Lists all Sessions by their parent + # [DataStore][google.cloud.discoveryengine.v1.DataStore]. + rpc :ListSessions, ::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest, ::Google::Cloud::DiscoveryEngine::V1::ListSessionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assist_answer.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assist_answer.rb new file mode 100644 index 000000000000..963d52af06e5 --- /dev/null +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assist_answer.rb @@ -0,0 +1,278 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + # AssistAnswer resource, main part of + # [AssistResponse][google.cloud.discoveryengine.v1.AssistResponse]. + # @!attribute [rw] name + # @return [::String] + # Immutable. Resource name of the `AssistAnswer`. + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` + # + # This field must be a UTF-8 encoded string with a length limit of 1024 + # characters. + # @!attribute [rw] state + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistAnswer::State] + # State of the answer generation. + # @!attribute [rw] replies + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AssistAnswer::Reply>] + # Replies of the assistant. + # @!attribute [rw] assist_skipped_reasons + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AssistAnswer::AssistSkippedReason>] + # Reasons for not answering the assist call. + class AssistAnswer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # One part of the multi-part response of the assist call. + # @!attribute [rw] grounded_content + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent] + # Possibly grounded response text or media from the assistant. + class Reply + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the answer generation. + module State + # Unknown. + STATE_UNSPECIFIED = 0 + + # Assist operation is currently in progress. + IN_PROGRESS = 1 + + # Assist operation has failed. + FAILED = 2 + + # Assist operation has succeeded. + SUCCEEDED = 3 + + # Assist operation has been skipped. + SKIPPED = 4 + end + + # Possible reasons for not answering an assist call. + module AssistSkippedReason + # Default value. Skip reason is not specified. + ASSIST_SKIPPED_REASON_UNSPECIFIED = 0 + + # The assistant ignored the query, because it did not appear to be + # answer-seeking. + NON_ASSIST_SEEKING_QUERY_IGNORED = 1 + + # The assistant ignored the query or refused to answer because of a + # customer policy violation (e.g., the query or the answer contained a + # banned phrase). + CUSTOMER_POLICY_VIOLATION = 2 + end + end + + # Multi-modal content. + # @!attribute [rw] text + # @return [::String] + # Inline text. + # + # Note: The following fields are mutually exclusive: `text`, `inline_data`, `file`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] inline_data + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::Blob] + # Inline binary data. + # + # Note: The following fields are mutually exclusive: `inline_data`, `text`, `file`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] file + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::File] + # A file, e.g., an audio summary. + # + # Note: The following fields are mutually exclusive: `file`, `text`, `inline_data`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] executable_code + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::ExecutableCode] + # Code generated by the model that is meant to be executed. + # + # Note: The following fields are mutually exclusive: `executable_code`, `text`, `inline_data`, `file`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] code_execution_result + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::CodeExecutionResult] + # Result of executing an ExecutableCode. + # + # Note: The following fields are mutually exclusive: `code_execution_result`, `text`, `inline_data`, `file`, `executable_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] role + # @return [::String] + # The producer of the content. Can be "model" or "user". + # @!attribute [rw] thought + # @return [::Boolean] + # Optional. Indicates if the part is thought from the model. + class AssistantContent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Inline blob. + # @!attribute [rw] mime_type + # @return [::String] + # Required. The media type (MIME type) of the generated data. + # @!attribute [rw] data + # @return [::String] + # Required. Raw bytes. + class Blob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A file, e.g., an audio summary. + # @!attribute [rw] mime_type + # @return [::String] + # Required. The media type (MIME type) of the file. + # @!attribute [rw] file_id + # @return [::String] + # Required. The file ID. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Code generated by the model that is meant to be executed by the model. + # @!attribute [rw] code + # @return [::String] + # Required. The code content. Currently only supports Python. + class ExecutableCode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result of executing ExecutableCode. + # @!attribute [rw] outcome + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::CodeExecutionResult::Outcome] + # Required. Outcome of the code execution. + # @!attribute [rw] output + # @return [::String] + # Optional. Contains stdout when code execution is successful, stderr or + # other description otherwise. + class CodeExecutionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enumeration of possible outcomes of the code execution. + module Outcome + # Unspecified status. This value should not be used. + OUTCOME_UNSPECIFIED = 0 + + # Code execution completed successfully. + OUTCOME_OK = 1 + + # Code execution finished but with a failure. `stderr` should contain the + # reason. + OUTCOME_FAILED = 2 + + # Code execution ran for too long, and was cancelled. There may or may + # not be a partial output present. + OUTCOME_DEADLINE_EXCEEDED = 3 + end + end + end + + # A piece of content and possibly its grounding information. + # + # Not all content needs grounding. Phrases like "Of course, I will gladly + # search it for you." do not need grounding. + # @!attribute [rw] text_grounding_metadata + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent::TextGroundingMetadata] + # Metadata for grounding based on text sources. + # @!attribute [rw] content + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent] + # The content. + class AssistantGroundedContent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Grounding details for text sources. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent::TextGroundingMetadata::Segment>] + # Grounding information for parts of the text. + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent::TextGroundingMetadata::Reference>] + # References for the grounded text. + class TextGroundingMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Grounding information for a segment of the text. + # @!attribute [rw] start_index + # @return [::Integer] + # Zero-based index indicating the start of the segment, measured in bytes + # of a UTF-8 string (i.e. characters encoded on multiple bytes have a + # length of more than one). + # @!attribute [rw] end_index + # @return [::Integer] + # End of the segment, exclusive. + # @!attribute [rw] reference_indices + # @return [::Array<::Integer>] + # References for the segment. + # @!attribute [rw] grounding_score + # @return [::Float] + # Score for the segment. + # @!attribute [rw] text + # @return [::String] + # The text segment itself. + class Segment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Referenced content and related document metadata. + # @!attribute [rw] content + # @return [::String] + # Referenced text content. + # @!attribute [rw] document_metadata + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata] + # Document metadata. + class Reference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Document metadata. + # @!attribute [rw] document + # @return [::String] + # Document resource name. + # @!attribute [rw] uri + # @return [::String] + # URI for the document. It may contain a URL that redirects to the + # actual website. + # @!attribute [rw] title + # @return [::String] + # Title. + # @!attribute [rw] page_identifier + # @return [::String] + # Page identifier. + # @!attribute [rw] domain + # @return [::String] + # Domain name from the document URI. Note that the `uri` field may + # contain a URL that redirects to the actual website, in which case + # this will contain the domain name of the target site. + class DocumentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assistant.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assistant.rb new file mode 100644 index 000000000000..9d5245ee17e6 --- /dev/null +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assistant.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + # Discovery Engine Assistant resource. + # @!attribute [rw] name + # @return [::String] + # Immutable. Resource name of the assistant. + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + # + # It must be a UTF-8 encoded string with a length limit of 1024 characters. + class Assistant + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assistant_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assistant_service.rb new file mode 100644 index 000000000000..6290e508e795 --- /dev/null +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/assistant_service.rb @@ -0,0 +1,207 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1 + # User metadata of the request. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. IANA time zone, e.g. Europe/Budapest. + # @!attribute [rw] preferred_language_code + # @return [::String] + # Optional. Preferred language to be used for answering if language detection + # fails. Also used as the language of error messages created by actions, + # regardless of language detection results. + class AssistUserMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client#stream_assist AssistantService.StreamAssist} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::DiscoveryEngine::V1::Assistant Assistant}. Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + # @!attribute [rw] query + # @return [::Google::Cloud::DiscoveryEngine::V1::Query] + # Optional. Current user query. + # + # Empty query is only supported if `file_ids` are provided. In this case, the + # answer will be generated based on those context files. + # @!attribute [rw] session + # @return [::String] + # Optional. The session to use for the request. If specified, the assistant + # has access to the session history, and the query and the answer are stored + # there. + # + # If `-` is specified as the session ID, or it is left empty, then a new + # session is created with an automatically generated ID. + # + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` + # @!attribute [rw] user_metadata + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistUserMetadata] + # Optional. Information about the user initiating the query. + # @!attribute [rw] tools_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec] + # Optional. Specification of tools that are used to serve the request. + # @!attribute [rw] generation_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::GenerationSpec] + # Optional. Specification of the generation configuration for the request. + class StreamAssistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specification of tools that are used to serve the request. + # @!attribute [rw] vertex_ai_search_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec::VertexAiSearchSpec] + # Optional. Specification of the Vertex AI Search tool. + # @!attribute [rw] web_grounding_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec::WebGroundingSpec] + # Optional. Specification of the web grounding tool. + # If field is present, enables grounding with web search. Works only if + # [Assistant.web_grounding_type][google.cloud.discoveryengine.v1.Assistant.web_grounding_type] + # is [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][] or + # [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][]. + # @!attribute [rw] image_generation_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec::ImageGenerationSpec] + # Optional. Specification of the image generation tool. + # @!attribute [rw] video_generation_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec::VideoGenerationSpec] + # Optional. Specification of the video generation tool. + class ToolsSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specification of the Vertex AI Search tool. + # @!attribute [rw] data_store_specs + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] + # Optional. Specs defining + # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}s to filter on in + # a search call and configurations for those data stores. This is only + # considered for {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}s with + # multiple data stores. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter syntax consists of an expression language for + # constructing a predicate from one or more fields of the documents being + # filtered. Filter expression is case-sensitive. + # + # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + # + # Filtering in Vertex AI Search is done by mapping the LHS filter key to + # a key property defined in the Vertex AI Search backend -- this mapping + # is defined by the customer in their schema. For example a media + # customer might have a field 'name' in their schema. In this case the + # filter would look like this: filter --> name:'ANY("king kong")' + # + # For more information about filtering including syntax and filter + # operators, see + # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + class VertexAiSearchSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specification of the web grounding tool. + class WebGroundingSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specification of the image generation tool. + class ImageGenerationSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specification of the video generation tool. + class VideoGenerationSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Assistant generation specification for the request. + # This allows to override the default generation configuration at the engine + # level. + # @!attribute [rw] model_id + # @return [::String] + # Optional. The Vertex AI model_id used for the generative model. If not + # set, the default Assistant model will be used. + class GenerationSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response for the + # {::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client#stream_assist AssistantService.StreamAssist} + # method. + # @!attribute [rw] answer + # @return [::Google::Cloud::DiscoveryEngine::V1::AssistAnswer] + # Assist answer resource object containing parts of the assistant's final + # answer for the user's query. + # + # Not present if the current response doesn't add anything to previously + # sent + # {::Google::Cloud::DiscoveryEngine::V1::AssistAnswer#replies AssistAnswer.replies}. + # + # Observe + # {::Google::Cloud::DiscoveryEngine::V1::AssistAnswer#state AssistAnswer.state} to + # see if more parts are to be expected. While the state is `IN_PROGRESS`, the + # {::Google::Cloud::DiscoveryEngine::V1::AssistAnswer#replies AssistAnswer.replies} + # field in each response will contain replies (reply fragments) to be + # appended to the ones received in previous responses. [AssistAnswer.name][] + # won't be filled. + # + # If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response + # is the last response and [AssistAnswer.name][] will have a value. + # @!attribute [rw] session_info + # @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse::SessionInfo] + # Session information. + # @!attribute [rw] assist_token + # @return [::String] + # A global unique ID that identifies the current pair of request and stream + # of responses. Used for feedback and support. + class StreamAssistResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the session. + # @!attribute [rw] session + # @return [::String] + # Name of the newly generated or continued session. + # + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`. + class SessionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb index c4fc7289298b..2ba82baec45b 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb @@ -926,11 +926,23 @@ class GetSessionRequest # Provide this to retrieve the subsequent page. # @!attribute [rw] filter # @return [::String] - # A filter to apply on the list results. The supported features are: - # user_pseudo_id, state. + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` # - # Example: + # Examples: # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" # @!attribute [rw] order_by # @return [::String] # A comma-separated list of fields to order by, sorted in ascending order. diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb index f2ce4d7b30af..61c9ea4d5198 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb @@ -243,22 +243,16 @@ module V1 # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/session.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/session.rb index 853437c085a8..83a4eb80f9cd 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/session.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/session.rb @@ -59,10 +59,11 @@ class Session # answer from service. # @!attribute [rw] query # @return [::Google::Cloud::DiscoveryEngine::V1::Query] - # The user query. + # Optional. The user query. May not be set if this turn is merely + # regenerating an answer to a different turn # @!attribute [rw] answer # @return [::String] - # The resource name of the answer to the user query. + # Optional. The resource name of the answer to the user query. # # Only set if the answer generation (/answer API call) happened in this # turn. @@ -74,9 +75,24 @@ class Session # {::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest#include_answer_details GetSessionRequest.include_answer_details} # is set to true, this field will be populated when getting answer query # session. + # @!attribute [rw] query_config + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Represents metadata related to the query config, for example + # LLM model and version used, model parameters (temperature, grounding + # parameters, etc.). The prefix "google." is reserved for Google-developed + # functionality. class Turn include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class QueryConfigEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # Enumeration of the state of the session. @@ -93,9 +109,9 @@ module State # @!attribute [rw] text # @return [::String] # Plain text. - # @!attribute [rw] query_id + # @!attribute [r] query_id # @return [::String] - # Unique Id for the query. + # Output only. Unique Id for the query. class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-discovery_engine-v1/snippets/assistant_service/stream_assist.rb b/google-cloud-discovery_engine-v1/snippets/assistant_service/stream_assist.rb new file mode 100644 index 000000000000..950a743494eb --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/assistant_service/stream_assist.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_AssistantService_StreamAssist_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the stream_assist call in the AssistantService 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::DiscoveryEngine::V1::AssistantService::Client#stream_assist. +# +def stream_assist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest.new + + # Call the stream_assist method to start streaming. + output = client.stream_assist request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse + output.each do |current_response| + p current_response + end +end +# [END discoveryengine_v1_generated_AssistantService_StreamAssist_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/session_service/create_session.rb b/google-cloud-discovery_engine-v1/snippets/session_service/create_session.rb new file mode 100644 index 000000000000..676c9e7fa8ad --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/session_service/create_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_SessionService_CreateSession_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the create_session call in the SessionService 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::DiscoveryEngine::V1::SessionService::Client#create_session. +# +def create_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest.new + + # Call the create_session method. + result = client.create_session request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + p result +end +# [END discoveryengine_v1_generated_SessionService_CreateSession_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/session_service/delete_session.rb b/google-cloud-discovery_engine-v1/snippets/session_service/delete_session.rb new file mode 100644 index 000000000000..84d20b6d92d9 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/session_service/delete_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_SessionService_DeleteSession_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the delete_session call in the SessionService 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::DiscoveryEngine::V1::SessionService::Client#delete_session. +# +def delete_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest.new + + # Call the delete_session method. + result = client.delete_session request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END discoveryengine_v1_generated_SessionService_DeleteSession_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/session_service/get_session.rb b/google-cloud-discovery_engine-v1/snippets/session_service/get_session.rb new file mode 100644 index 000000000000..72759846d142 --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/session_service/get_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_SessionService_GetSession_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the get_session call in the SessionService 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::DiscoveryEngine::V1::SessionService::Client#get_session. +# +def get_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::GetSessionRequest.new + + # Call the get_session method. + result = client.get_session request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + p result +end +# [END discoveryengine_v1_generated_SessionService_GetSession_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/session_service/list_sessions.rb b/google-cloud-discovery_engine-v1/snippets/session_service/list_sessions.rb new file mode 100644 index 000000000000..2b06dcdeceea --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/session_service/list_sessions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_SessionService_ListSessions_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the list_sessions call in the SessionService 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::DiscoveryEngine::V1::SessionService::Client#list_sessions. +# +def list_sessions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest.new + + # Call the list_sessions method. + result = client.list_sessions 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::DiscoveryEngine::V1::Session. + p item + end +end +# [END discoveryengine_v1_generated_SessionService_ListSessions_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/session_service/update_session.rb b/google-cloud-discovery_engine-v1/snippets/session_service/update_session.rb new file mode 100644 index 000000000000..42581cd036eb --- /dev/null +++ b/google-cloud-discovery_engine-v1/snippets/session_service/update_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1_generated_SessionService_UpdateSession_sync] +require "google/cloud/discovery_engine/v1" + +## +# Snippet for the update_session call in the SessionService 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::DiscoveryEngine::V1::SessionService::Client#update_session. +# +def update_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest.new + + # Call the update_session method. + result = client.update_session request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session. + p result +end +# [END discoveryengine_v1_generated_SessionService_UpdateSession_sync] diff --git a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json index 91e6f11d08b5..8495e6ee217a 100644 --- a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -11,6 +11,126 @@ ] }, "snippets": [ + { + "region_tag": "discoveryengine_v1_generated_SearchService_Search_sync", + "title": "Snippet for the search call in the SearchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search.", + "file": "search_service/search.rb", + "language": "RUBY", + "client_method": { + "short_name": "search", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::SearchRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::SearchResponse", + "client": { + "short_name": "SearchService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client" + }, + "method": { + "short_name": "Search", + "full_name": "google.cloud.discoveryengine.v1.SearchService.Search", + "service": { + "short_name": "SearchService", + "full_name": "google.cloud.discoveryengine.v1.SearchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_SearchService_SearchLite_sync", + "title": "Snippet for the search_lite call in the SearchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search_lite.", + "file": "search_service/search_lite.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_lite", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search_lite", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::SearchRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::SearchResponse", + "client": { + "short_name": "SearchService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client" + }, + "method": { + "short_name": "SearchLite", + "full_name": "google.cloud.discoveryengine.v1.SearchService.SearchLite", + "service": { + "short_name": "SearchService", + "full_name": "google.cloud.discoveryengine.v1.SearchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_AssistantService_StreamAssist_sync", + "title": "Snippet for the stream_assist call in the AssistantService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::AssistantService::Client#stream_assist.", + "file": "assistant_service/stream_assist.rb", + "language": "RUBY", + "client_method": { + "short_name": "stream_assist", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client#stream_assist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse", + "client": { + "short_name": "AssistantService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client" + }, + "method": { + "short_name": "StreamAssist", + "full_name": "google.cloud.discoveryengine.v1.AssistantService.StreamAssist", + "service": { + "short_name": "AssistantService", + "full_name": "google.cloud.discoveryengine.v1.AssistantService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, { "region_tag": "discoveryengine_v1_generated_CmekConfigService_UpdateCmekConfig_sync", "title": "Snippet for the update_cmek_config call in the CmekConfigService service", @@ -571,86 +691,6 @@ } ] }, - { - "region_tag": "discoveryengine_v1_generated_SearchService_Search_sync", - "title": "Snippet for the search call in the SearchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search.", - "file": "search_service/search.rb", - "language": "RUBY", - "client_method": { - "short_name": "search", - "full_name": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DiscoveryEngine::V1::SearchRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DiscoveryEngine::V1::SearchResponse", - "client": { - "short_name": "SearchService::Client", - "full_name": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client" - }, - "method": { - "short_name": "Search", - "full_name": "google.cloud.discoveryengine.v1.SearchService.Search", - "service": { - "short_name": "SearchService", - "full_name": "google.cloud.discoveryengine.v1.SearchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "discoveryengine_v1_generated_SearchService_SearchLite_sync", - "title": "Snippet for the search_lite call in the SearchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search_lite.", - "file": "search_service/search_lite.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_lite", - "full_name": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search_lite", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DiscoveryEngine::V1::SearchRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DiscoveryEngine::V1::SearchResponse", - "client": { - "short_name": "SearchService::Client", - "full_name": "::Google::Cloud::DiscoveryEngine::V1::SearchService::Client" - }, - "method": { - "short_name": "SearchLite", - "full_name": "google.cloud.discoveryengine.v1.SearchService.SearchLite", - "service": { - "short_name": "SearchService", - "full_name": "google.cloud.discoveryengine.v1.SearchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, { "region_tag": "discoveryengine_v1_generated_ConversationalSearchService_ConverseConversation_sync", "title": "Snippet for the converse_conversation call in the ConversationalSearchService service", @@ -2771,6 +2811,206 @@ } ] }, + { + "region_tag": "discoveryengine_v1_generated_SessionService_CreateSession_sync", + "title": "Snippet for the create_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SessionService::Client#create_session.", + "file": "session_service/create_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_session", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client#create_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::Session", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client" + }, + "method": { + "short_name": "CreateSession", + "full_name": "google.cloud.discoveryengine.v1.SessionService.CreateSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_SessionService_DeleteSession_sync", + "title": "Snippet for the delete_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SessionService::Client#delete_session.", + "file": "session_service/delete_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_session", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client#delete_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client" + }, + "method": { + "short_name": "DeleteSession", + "full_name": "google.cloud.discoveryengine.v1.SessionService.DeleteSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_SessionService_UpdateSession_sync", + "title": "Snippet for the update_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SessionService::Client#update_session.", + "file": "session_service/update_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_session", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client#update_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::Session", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client" + }, + "method": { + "short_name": "UpdateSession", + "full_name": "google.cloud.discoveryengine.v1.SessionService.UpdateSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_SessionService_GetSession_sync", + "title": "Snippet for the get_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SessionService::Client#get_session.", + "file": "session_service/get_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_session", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client#get_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::Session", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client" + }, + "method": { + "short_name": "GetSession", + "full_name": "google.cloud.discoveryengine.v1.SessionService.GetSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1_generated_SessionService_ListSessions_sync", + "title": "Snippet for the list_sessions call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1::SessionService::Client#list_sessions.", + "file": "session_service/list_sessions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sessions", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client#list_sessions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1::ListSessionsResponse", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1::SessionService::Client" + }, + "method": { + "short_name": "ListSessions", + "full_name": "google.cloud.discoveryengine.v1.SessionService.ListSessions", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "discoveryengine_v1_generated_SiteSearchEngineService_GetSiteSearchEngine_sync", "title": "Snippet for the get_site_search_engine call in the SiteSearchEngineService service", diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_paths_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_paths_test.rb new file mode 100644 index 000000000000..6ff7b5131acd --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_paths_test.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/assistant_service" + +class ::Google::Cloud::DiscoveryEngine::V1::AssistantService::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_assistant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.assistant_path project: "value0", location: "value1", collection: "value2", engine: "value3", assistant: "value4" + assert_equal "projects/value0/locations/value1/collections/value2/engines/value3/assistants/value4", path + end + end + + def test_data_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_store_path project: "value0", location: "value1", data_store: "value2" + assert_equal "projects/value0/locations/value1/dataStores/value2", path + + path = client.data_store_path project: "value0", location: "value1", collection: "value2", data_store: "value3" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3", path + end + end + + def test_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.session_path project: "value0", location: "value1", data_store: "value2", session: "value3" + assert_equal "projects/value0/locations/value1/dataStores/value2/sessions/value3", path + + path = client.session_path project: "value0", location: "value1", collection: "value2", data_store: "value3", session: "value4" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/sessions/value4", path + + path = client.session_path project: "value0", location: "value1", collection: "value2", engine: "value3", session: "value4" + assert_equal "projects/value0/locations/value1/collections/value2/engines/value3/sessions/value4", path + end + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_rest_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_rest_test.rb new file mode 100644 index 000000000000..50eefc765f3c --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_rest_test.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/assistant_service_pb" +require "google/cloud/discovery_engine/v1/assistant_service/rest" + + +class ::Google::Cloud::DiscoveryEngine::V1::AssistantService::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_stream_assist + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + query = {} + session = "hello world" + user_metadata = {} + tools_spec = {} + generation_spec = {} + + stream_assist_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, 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::DiscoveryEngine::V1::AssistantService::Rest::ServiceStub.stub :transcode_stream_assist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stream_assist_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stream_assist({ name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec }) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use named arguments + client.stream_assist name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object + client.stream_assist ::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest.new(name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use hash object with options + client.stream_assist({ name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object with options + client.stream_assist(::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest.new(name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Verify method calls + assert_equal 5, stream_assist_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::DiscoveryEngine::V1::AssistantService::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::DiscoveryEngine::V1::AssistantService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_test.rb new file mode 100644 index 000000000000..cd9efd419a46 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_test.rb @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/assistant_service_pb" +require "google/cloud/discoveryengine/v1/assistant_service_services_pb" +require "google/cloud/discovery_engine/v1/assistant_service" + +class ::Google::Cloud::DiscoveryEngine::V1::AssistantService::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_stream_assist + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + name = "hello world" + query = {} + session = "hello world" + user_metadata = {} + tools_spec = {} + generation_spec = {} + + stream_assist_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :stream_assist, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::Query), request["query"] + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::AssistUserMetadata), request["user_metadata"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec), request["tools_spec"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::GenerationSpec), request["generation_spec"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stream_assist_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stream_assist({ name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.stream_assist name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.stream_assist ::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest.new(name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.stream_assist({ name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.stream_assist(::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest.new(name: name, query: query, session: session, user_metadata: user_metadata, tools_spec: tools_spec, generation_spec: generation_spec), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, stream_assist_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::DiscoveryEngine::V1::AssistantService::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::DiscoveryEngine::V1::AssistantService::Client::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_paths_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_paths_test.rb new file mode 100644 index 000000000000..99342f6ddda2 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_paths_test.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1/session_service" + +class ::Google::Cloud::DiscoveryEngine::V1::SessionService::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_answer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.answer_path project: "value0", location: "value1", data_store: "value2", session: "value3", answer: "value4" + assert_equal "projects/value0/locations/value1/dataStores/value2/sessions/value3/answers/value4", path + + path = client.answer_path project: "value0", location: "value1", collection: "value2", data_store: "value3", session: "value4", answer: "value5" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/sessions/value4/answers/value5", path + + path = client.answer_path project: "value0", location: "value1", collection: "value2", engine: "value3", session: "value4", answer: "value5" + assert_equal "projects/value0/locations/value1/collections/value2/engines/value3/sessions/value4/answers/value5", path + end + end + + def test_chunk_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.chunk_path project: "value0", location: "value1", data_store: "value2", branch: "value3", document: "value4", chunk: "value5" + assert_equal "projects/value0/locations/value1/dataStores/value2/branches/value3/documents/value4/chunks/value5", path + + path = client.chunk_path project: "value0", location: "value1", collection: "value2", data_store: "value3", branch: "value4", document: "value5", chunk: "value6" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/branches/value4/documents/value5/chunks/value6", path + end + end + + def test_data_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_store_path project: "value0", location: "value1", data_store: "value2" + assert_equal "projects/value0/locations/value1/dataStores/value2", path + + path = client.data_store_path project: "value0", location: "value1", collection: "value2", data_store: "value3" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3", path + end + end + + def test_document_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.document_path project: "value0", location: "value1", data_store: "value2", branch: "value3", document: "value4" + assert_equal "projects/value0/locations/value1/dataStores/value2/branches/value3/documents/value4", path + + path = client.document_path project: "value0", location: "value1", collection: "value2", data_store: "value3", branch: "value4", document: "value5" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/branches/value4/documents/value5", path + end + end + + def test_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.session_path project: "value0", location: "value1", data_store: "value2", session: "value3" + assert_equal "projects/value0/locations/value1/dataStores/value2/sessions/value3", path + + path = client.session_path project: "value0", location: "value1", collection: "value2", data_store: "value3", session: "value4" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/sessions/value4", path + + path = client.session_path project: "value0", location: "value1", collection: "value2", engine: "value3", session: "value4" + assert_equal "projects/value0/locations/value1/collections/value2/engines/value3/sessions/value4", path + end + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_rest_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_rest_test.rb new file mode 100644 index 000000000000..fcf6d61852a5 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_rest_test.rb @@ -0,0 +1,376 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/session_service_pb" +require "google/cloud/discovery_engine/v1/session_service/rest" + + +class ::Google::Cloud::DiscoveryEngine::V1::SessionService::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_session + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::Session.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + session = {} + + create_session_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::DiscoveryEngine::V1::SessionService::Rest::ServiceStub.stub :transcode_create_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_session({ parent: parent, session: session }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_session parent: parent, session: session do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_session ::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest.new(parent: parent, session: session) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_session({ parent: parent, session: session }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_session(::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest.new(parent: parent, session: session), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_session_client_stub.call_count + end + end + end + + def test_delete_session + # 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_session_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::DiscoveryEngine::V1::SessionService::Rest::ServiceStub.stub :transcode_delete_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_session({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_session name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_session ::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_session({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_session(::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_session_client_stub.call_count + end + end + end + + def test_update_session + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::Session.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + session = {} + update_mask = {} + + update_session_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::DiscoveryEngine::V1::SessionService::Rest::ServiceStub.stub :transcode_update_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_session({ session: session, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_session session: session, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_session ::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest.new(session: session, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_session({ session: session, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_session(::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest.new(session: session, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_session_client_stub.call_count + end + end + end + + def test_get_session + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::Session.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + include_answer_details = true + + get_session_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::DiscoveryEngine::V1::SessionService::Rest::ServiceStub.stub :transcode_get_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_session({ name: name, include_answer_details: include_answer_details }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_session name: name, include_answer_details: include_answer_details do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_session ::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest.new(name: name, include_answer_details: include_answer_details) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_session({ name: name, include_answer_details: include_answer_details }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_session(::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest.new(name: name, include_answer_details: include_answer_details), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_session_client_stub.call_count + end + end + end + + def test_list_sessions + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1::ListSessionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_sessions_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::DiscoveryEngine::V1::SessionService::Rest::ServiceStub.stub :transcode_list_sessions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sessions_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sessions ::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_sessions(::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sessions_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::DiscoveryEngine::V1::SessionService::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::DiscoveryEngine::V1::SessionService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_test.rb new file mode 100644 index 000000000000..8db9fc904b82 --- /dev/null +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_test.rb @@ -0,0 +1,394 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1/session_service_pb" +require "google/cloud/discoveryengine/v1/session_service_services_pb" +require "google/cloud/discovery_engine/v1/session_service" + +class ::Google::Cloud::DiscoveryEngine::V1::SessionService::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_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::Session.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" + session = {} + + create_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_session, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::Session), request["session"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_session({ parent: parent, session: session }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_session parent: parent, session: session do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_session ::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest.new(parent: parent, session: session) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_session({ parent: parent, session: session }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_session(::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest.new(parent: parent, session: session), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_session_client_stub.call_rpc_count + end + end + + def test_delete_session + # 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_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_session, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_session({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_session name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_session ::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_session({ 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_session(::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest.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_session_client_stub.call_rpc_count + end + end + + def test_update_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::Session.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. + session = {} + update_mask = {} + + update_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_session, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::Session), request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_session({ session: session, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_session session: session, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_session ::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest.new(session: session, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_session({ session: session, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_session(::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest.new(session: session, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_session_client_stub.call_rpc_count + end + end + + def test_get_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::Session.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" + include_answer_details = true + + get_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_session, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["include_answer_details"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_session({ name: name, include_answer_details: include_answer_details }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_session name: name, include_answer_details: include_answer_details do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_session ::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest.new(name: name, include_answer_details: include_answer_details) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_session({ name: name, include_answer_details: include_answer_details }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_session(::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest.new(name: name, include_answer_details: include_answer_details), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_session_client_stub.call_rpc_count + end + end + + def test_list_sessions + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1::ListSessionsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sessions, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sessions_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_sessions ::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_sessions(::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_sessions_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::DiscoveryEngine::V1::SessionService::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::DiscoveryEngine::V1::SessionService::Client::Configuration, config + end +end From 99c85864f0a8bbbe9febb5843c4cbe88b265d94b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 15:41:40 -0700 Subject: [PATCH 302/457] feat: add SessionService (#30716) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: add AssistantService PiperOrigin-RevId: 785997711 Source-Link: https://github.com/googleapis/googleapis/commit/29c6015e95fd02c939f44b7061c4506812f2debc Source-Link: https://github.com/googleapis/googleapis-gen/commit/ceba1d4cb9372ca25178b789fd480045128a3dd3 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6ImNlYmExZDRjYjkzNzJjYTI1MTc4Yjc4OWZkNDgwMDQ1MTI4YTNkZDMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 786299564 Source-Link: https://github.com/googleapis/googleapis/commit/1791a77dfb0580ae2bbde3840105d2096968cc13 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f686e1f0e5f4f393d2ca165cd16ffe037efcc498 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6ImY2ODZlMWYwZTVmNGYzOTNkMmNhMTY1Y2QxNmZmZTAzN2VmY2M0OTgifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../AUTHENTICATION.md | 6 +- google-cloud-discovery_engine/Rakefile | 4 +- .../lib/google/cloud/discovery_engine.rb | 274 +++++++++++++----- .../cloud/discovery_engine/client_test.rb | 84 ++++-- 4 files changed, 275 insertions(+), 93 deletions(-) diff --git a/google-cloud-discovery_engine/AUTHENTICATION.md b/google-cloud-discovery_engine/AUTHENTICATION.md index a40ebeeadfff..9a0a1e4512db 100644 --- a/google-cloud-discovery_engine/AUTHENTICATION.md +++ b/google-cloud-discovery_engine/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/discovery_engine" -client = Google::Cloud::DiscoveryEngine.cmek_config_service do |config| +client = Google::Cloud::DiscoveryEngine.search_service do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -70,7 +70,7 @@ Google::Cloud::DiscoveryEngine.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = Google::Cloud::DiscoveryEngine.cmek_config_service +client = Google::Cloud::DiscoveryEngine.search_service ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/discovery_engine" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = Google::Cloud::DiscoveryEngine.cmek_config_service +client = Google::Cloud::DiscoveryEngine.search_service ``` ### Local ADC file diff --git a/google-cloud-discovery_engine/Rakefile b/google-cloud-discovery_engine/Rakefile index 4190ec5f593e..3a066feca2f2 100644 --- a/google-cloud-discovery_engine/Rakefile +++ b/google-cloud-discovery_engine/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| 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/discovery_engine/v1/cmek_config_service/credentials" - ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Credentials.env_vars.each do |path| + require "google/cloud/discovery_engine/v1/search_service/credentials" + ::Google::Cloud::DiscoveryEngine::V1::SearchService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-discovery_engine/lib/google/cloud/discovery_engine.rb b/google-cloud-discovery_engine/lib/google/cloud/discovery_engine.rb index ff24822bac3d..7d7707e91a72 100644 --- a/google-cloud-discovery_engine/lib/google/cloud/discovery_engine.rb +++ b/google-cloud-discovery_engine/lib/google/cloud/discovery_engine.rb @@ -46,57 +46,57 @@ module Google module Cloud module DiscoveryEngine ## - # Create a new client object for CmekConfigService. + # Create a new client object for SearchService. # # By default, this returns an instance of - # [Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CmekConfigService-Client) + # [Google::Cloud::DiscoveryEngine::V1::SearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchService-Client) # for a gRPC client for version V1 of the API. # However, you can specify a different API version by passing it in the - # `version` parameter. If the CmekConfigService service is + # `version` parameter. If the SearchService service is # supported by that API version, and the corresponding gem is available, the # appropriate versioned client will be returned. # You can also specify a different transport by passing `:rest` or `:grpc` in # the `transport` parameter. # # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CmekConfigService service. + # given API version does not support the given transport of the SearchService service. # You can determine whether the method will succeed by calling - # {Google::Cloud::DiscoveryEngine.cmek_config_service_available?}. + # {Google::Cloud::DiscoveryEngine.search_service_available?}. # - # ## About CmekConfigService + # ## About SearchService # - # Service for managing CMEK related tasks + # Service for search. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. # @return [::Object] A client object for the specified version. # - def self.cmek_config_service version: :v1, transport: :grpc, &block + def self.search_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first - service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CmekConfigService) + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SearchService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end ## - # Determines whether the CmekConfigService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.cmek_config_service}. + # Determines whether the SearchService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.search_service}. # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CmekConfigService service, - # or if the versioned client gem needs an update to support the CmekConfigService service. + # API version does not exist or does not support the SearchService service, + # or if the versioned client gem needs an update to support the SearchService service. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. # @return [boolean] Whether the service is available. # - def self.cmek_config_service_available? version: :v1, transport: :grpc + def self.search_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants @@ -104,8 +104,8 @@ def self.cmek_config_service_available? version: :v1, transport: :grpc .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name - return false unless service_module.const_defined? :CmekConfigService - service_module = service_module.const_get :CmekConfigService + return false unless service_module.const_defined? :SearchService + service_module = service_module.const_get :SearchService if transport == :rest return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest @@ -116,57 +116,57 @@ def self.cmek_config_service_available? version: :v1, transport: :grpc end ## - # Create a new client object for CompletionService. + # Create a new client object for AssistantService. # # By default, this returns an instance of - # [Google::Cloud::DiscoveryEngine::V1::CompletionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CompletionService-Client) + # [Google::Cloud::DiscoveryEngine::V1::AssistantService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-AssistantService-Client) # for a gRPC client for version V1 of the API. # However, you can specify a different API version by passing it in the - # `version` parameter. If the CompletionService service is + # `version` parameter. If the AssistantService service is # supported by that API version, and the corresponding gem is available, the # appropriate versioned client will be returned. # You can also specify a different transport by passing `:rest` or `:grpc` in # the `transport` parameter. # # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CompletionService service. + # given API version does not support the given transport of the AssistantService service. # You can determine whether the method will succeed by calling - # {Google::Cloud::DiscoveryEngine.completion_service_available?}. + # {Google::Cloud::DiscoveryEngine.assistant_service_available?}. # - # ## About CompletionService + # ## About AssistantService # - # Service for Auto-Completion. + # Service for managing Assistant configuration and assisting users. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. # @return [::Object] A client object for the specified version. # - def self.completion_service version: :v1, transport: :grpc, &block + def self.assistant_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first - service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CompletionService) + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:AssistantService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end ## - # Determines whether the CompletionService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.completion_service}. + # Determines whether the AssistantService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.assistant_service}. # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CompletionService service, - # or if the versioned client gem needs an update to support the CompletionService service. + # API version does not exist or does not support the AssistantService service, + # or if the versioned client gem needs an update to support the AssistantService service. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. # @return [boolean] Whether the service is available. # - def self.completion_service_available? version: :v1, transport: :grpc + def self.assistant_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants @@ -174,8 +174,8 @@ def self.completion_service_available? version: :v1, transport: :grpc .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name - return false unless service_module.const_defined? :CompletionService - service_module = service_module.const_get :CompletionService + return false unless service_module.const_defined? :AssistantService + service_module = service_module.const_get :AssistantService if transport == :rest return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest @@ -186,60 +186,57 @@ def self.completion_service_available? version: :v1, transport: :grpc end ## - # Create a new client object for ControlService. + # Create a new client object for CmekConfigService. # # By default, this returns an instance of - # [Google::Cloud::DiscoveryEngine::V1::ControlService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-ControlService-Client) + # [Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CmekConfigService-Client) # for a gRPC client for version V1 of the API. # However, you can specify a different API version by passing it in the - # `version` parameter. If the ControlService service is + # `version` parameter. If the CmekConfigService service is # supported by that API version, and the corresponding gem is available, the # appropriate versioned client will be returned. # You can also specify a different transport by passing `:rest` or `:grpc` in # the `transport` parameter. # # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ControlService service. + # given API version does not support the given transport of the CmekConfigService service. # You can determine whether the method will succeed by calling - # {Google::Cloud::DiscoveryEngine.control_service_available?}. + # {Google::Cloud::DiscoveryEngine.cmek_config_service_available?}. # - # ## About ControlService + # ## About CmekConfigService # - # Service for performing CRUD operations on Controls. - # Controls allow for custom logic to be implemented in the serving path. - # Controls need to be attached to a Serving Config to be considered during a - # request. + # Service for managing CMEK related tasks # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. # @return [::Object] A client object for the specified version. # - def self.control_service version: :v1, transport: :grpc, &block + def self.cmek_config_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first - service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:ControlService) + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CmekConfigService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end ## - # Determines whether the ControlService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.control_service}. + # Determines whether the CmekConfigService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.cmek_config_service}. # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ControlService service, - # or if the versioned client gem needs an update to support the ControlService service. + # API version does not exist or does not support the CmekConfigService service, + # or if the versioned client gem needs an update to support the CmekConfigService service. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. # @return [boolean] Whether the service is available. # - def self.control_service_available? version: :v1, transport: :grpc + def self.cmek_config_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants @@ -247,8 +244,8 @@ def self.control_service_available? version: :v1, transport: :grpc .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name - return false unless service_module.const_defined? :ControlService - service_module = service_module.const_get :ControlService + return false unless service_module.const_defined? :CmekConfigService + service_module = service_module.const_get :CmekConfigService if transport == :rest return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest @@ -259,57 +256,57 @@ def self.control_service_available? version: :v1, transport: :grpc end ## - # Create a new client object for SearchService. + # Create a new client object for CompletionService. # # By default, this returns an instance of - # [Google::Cloud::DiscoveryEngine::V1::SearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchService-Client) + # [Google::Cloud::DiscoveryEngine::V1::CompletionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CompletionService-Client) # for a gRPC client for version V1 of the API. # However, you can specify a different API version by passing it in the - # `version` parameter. If the SearchService service is + # `version` parameter. If the CompletionService service is # supported by that API version, and the corresponding gem is available, the # appropriate versioned client will be returned. # You can also specify a different transport by passing `:rest` or `:grpc` in # the `transport` parameter. # # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the SearchService service. + # given API version does not support the given transport of the CompletionService service. # You can determine whether the method will succeed by calling - # {Google::Cloud::DiscoveryEngine.search_service_available?}. + # {Google::Cloud::DiscoveryEngine.completion_service_available?}. # - # ## About SearchService + # ## About CompletionService # - # Service for search. + # Service for Auto-Completion. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. # @return [::Object] A client object for the specified version. # - def self.search_service version: :v1, transport: :grpc, &block + def self.completion_service version: :v1, transport: :grpc, &block require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first - service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SearchService) + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CompletionService) service_module = service_module.const_get(:Rest) if transport == :rest service_module.const_get(:Client).new(&block) end ## - # Determines whether the SearchService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.search_service}. + # Determines whether the CompletionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.completion_service}. # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the SearchService service, - # or if the versioned client gem needs an update to support the SearchService service. + # API version does not exist or does not support the CompletionService service, + # or if the versioned client gem needs an update to support the CompletionService service. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. # @return [boolean] Whether the service is available. # - def self.search_service_available? version: :v1, transport: :grpc + def self.completion_service_available? version: :v1, transport: :grpc require "google/cloud/discovery_engine/#{version.to_s.downcase}" package_name = Google::Cloud::DiscoveryEngine .constants @@ -317,8 +314,81 @@ def self.search_service_available? version: :v1, transport: :grpc .first return false unless package_name service_module = Google::Cloud::DiscoveryEngine.const_get package_name - return false unless service_module.const_defined? :SearchService - service_module = service_module.const_get :SearchService + return false unless service_module.const_defined? :CompletionService + service_module = service_module.const_get :CompletionService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ControlService. + # + # By default, this returns an instance of + # [Google::Cloud::DiscoveryEngine::V1::ControlService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-ControlService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ControlService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ControlService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::DiscoveryEngine.control_service_available?}. + # + # ## About ControlService + # + # Service for performing CRUD operations on Controls. + # Controls allow for custom logic to be implemented in the serving path. + # Controls need to be attached to a Serving Config to be considered during a + # request. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.control_service version: :v1, transport: :grpc, &block + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:ControlService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ControlService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.control_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ControlService service, + # or if the versioned client gem needs an update to support the ControlService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.control_service_available? version: :v1, transport: :grpc + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::DiscoveryEngine.const_get package_name + return false unless service_module.const_defined? :ControlService + service_module = service_module.const_get :ControlService if transport == :rest return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest @@ -1173,6 +1243,76 @@ def self.serving_config_service_available? version: :v1, transport: :grpc false end + ## + # Create a new client object for SessionService. + # + # By default, this returns an instance of + # [Google::Cloud::DiscoveryEngine::V1::SessionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SessionService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the SessionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the SessionService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::DiscoveryEngine.session_service_available?}. + # + # ## About SessionService + # + # Service for managing Sessions and Session-related resources. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.session_service version: :v1, transport: :grpc, &block + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SessionService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the SessionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.session_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the SessionService service, + # or if the versioned client gem needs an update to support the SessionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.session_service_available? version: :v1, transport: :grpc + require "google/cloud/discovery_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::DiscoveryEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::DiscoveryEngine.const_get package_name + return false unless service_module.const_defined? :SessionService + service_module = service_module.const_get :SessionService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Create a new client object for SiteSearchEngineService. # diff --git a/google-cloud-discovery_engine/test/google/cloud/discovery_engine/client_test.rb b/google-cloud-discovery_engine/test/google/cloud/discovery_engine/client_test.rb index 2a7f41bd80f8..d36eccc31596 100644 --- a/google-cloud-discovery_engine/test/google/cloud/discovery_engine/client_test.rb +++ b/google-cloud-discovery_engine/test/google/cloud/discovery_engine/client_test.rb @@ -41,6 +41,48 @@ def logger end end + def test_search_service_grpc + skip unless Google::Cloud::DiscoveryEngine.search_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::DiscoveryEngine.search_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::SearchService::Client, client + end + end + + def test_search_service_rest + skip unless Google::Cloud::DiscoveryEngine.search_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::DiscoveryEngine.search_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client, client + end + end + + def test_assistant_service_grpc + skip unless Google::Cloud::DiscoveryEngine.assistant_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::DiscoveryEngine.assistant_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::AssistantService::Client, client + end + end + + def test_assistant_service_rest + skip unless Google::Cloud::DiscoveryEngine.assistant_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::DiscoveryEngine.assistant_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::AssistantService::Rest::Client, client + end + end + def test_cmek_config_service_grpc skip unless Google::Cloud::DiscoveryEngine.cmek_config_service_available? transport: :grpc Gapic::ServiceStub.stub :new, DummyStub.new do @@ -104,27 +146,6 @@ def test_control_service_rest end end - def test_search_service_grpc - skip unless Google::Cloud::DiscoveryEngine.search_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::DiscoveryEngine.search_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::DiscoveryEngine::V1::SearchService::Client, client - end - end - - def test_search_service_rest - skip unless Google::Cloud::DiscoveryEngine.search_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::DiscoveryEngine.search_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client, client - end - end - def test_conversational_search_service_grpc skip unless Google::Cloud::DiscoveryEngine.conversational_search_service_available? transport: :grpc Gapic::ServiceStub.stub :new, DummyStub.new do @@ -377,6 +398,27 @@ def test_serving_config_service_rest end end + def test_session_service_grpc + skip unless Google::Cloud::DiscoveryEngine.session_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::DiscoveryEngine.session_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::SessionService::Client, client + end + end + + def test_session_service_rest + skip unless Google::Cloud::DiscoveryEngine.session_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::DiscoveryEngine.session_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::DiscoveryEngine::V1::SessionService::Rest::Client, client + end + end + def test_site_search_engine_service_grpc skip unless Google::Cloud::DiscoveryEngine.site_search_engine_service_available? transport: :grpc Gapic::ServiceStub.stub :new, DummyStub.new do From 4d5258fe45cc50d7c6fc1dc0e6b2d50882e444d0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 15:42:05 -0700 Subject: [PATCH 303/457] chore(main): release google-apps-chat-v1 0.13.0 (#30719) --- .release-please-manifest.json | 2 +- google-apps-chat-v1/CHANGELOG.md | 9 +++++++++ google-apps-chat-v1/lib/google/apps/chat/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.chat.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e1ca73e1b91d..829e58c64063 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -17,7 +17,7 @@ "google-analytics-data-v1beta+FILLER": "0.0.0", "google-apps-chat": "1.1.1", "google-apps-chat+FILLER": "0.0.0", - "google-apps-chat-v1": "0.12.0", + "google-apps-chat-v1": "0.13.0", "google-apps-chat-v1+FILLER": "0.0.0", "google-apps-events-subscriptions": "1.1.1", "google-apps-events-subscriptions+FILLER": "0.0.0", diff --git a/google-apps-chat-v1/CHANGELOG.md b/google-apps-chat-v1/CHANGELOG.md index 4acb41bfe077..f25f66217d22 100644 --- a/google-apps-chat-v1/CHANGELOG.md +++ b/google-apps-chat-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 0.13.0 (2025-07-24) + +#### Features + +* Exposing 1p integration message content (drive, calendar, huddle, meet chips) ([#30712](https://github.com/googleapis/google-cloud-ruby/issues/30712)) +#### Documentation + +* Update reference documentation for annotations. Introduce new richlink metadata types + ### 0.12.0 (2025-05-12) #### Features diff --git a/google-apps-chat-v1/lib/google/apps/chat/v1/version.rb b/google-apps-chat-v1/lib/google/apps/chat/v1/version.rb index a5bf2c0e7c82..e39ad79b5286 100644 --- a/google-apps-chat-v1/lib/google/apps/chat/v1/version.rb +++ b/google-apps-chat-v1/lib/google/apps/chat/v1/version.rb @@ -21,7 +21,7 @@ module Google module Apps module Chat module V1 - VERSION = "0.12.0" + VERSION = "0.13.0" end end end diff --git a/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json b/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json index 3cd9a9dbf40a..12b3dbf11d1d 100644 --- a/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json +++ b/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-apps-chat-v1", - "version": "0.12.0", + "version": "0.13.0", "language": "RUBY", "apis": [ { From 0bcc5b7c4390a1ae0b7b36a20b95d2e5ccc41480 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:28:52 -0700 Subject: [PATCH 304/457] docs: Updated Private Service Connect IP ranges when route_all_traffic is false (#30731) --- .../proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb b/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb index 553e978a4658..a8187731ffb2 100644 --- a/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb +++ b/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb @@ -2491,8 +2491,8 @@ module EgressOption # want full control of traffic in the private pool. Configure Cloud NAT for # the subnet of network attachment if you need to access public Internet. # - # If false, Only route private IPs, e.g. 10.0.0.0/8, 172.16.0.0/12, and - # 192.168.0.0/16 through PSC interface. + # If false, Only route RFC 1918 (10.0.0.0/8, 172.16.0.0/12, and + # 192.168.0.0/16) and RFC 6598 (100.64.0.0/10) through PSC interface. class PrivateServiceConnect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From 79d3ded0f3e949d34373515c951b4725eb9905a2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:29:22 -0700 Subject: [PATCH 305/457] chore(main): release google-cloud-discovery_engine-v1 2.4.0 (#30730) --- .release-please-manifest.json | 2 +- google-cloud-discovery_engine-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/discovery_engine/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.discoveryengine.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 829e58c64063..d48daf681ddf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -329,7 +329,7 @@ "google-cloud-dialogflow-v2+FILLER": "0.0.0", "google-cloud-discovery_engine": "2.2.0", "google-cloud-discovery_engine+FILLER": "0.0.0", - "google-cloud-discovery_engine-v1": "2.3.1", + "google-cloud-discovery_engine-v1": "2.4.0", "google-cloud-discovery_engine-v1+FILLER": "0.0.0", "google-cloud-discovery_engine-v1beta": "0.20.1", "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", diff --git a/google-cloud-discovery_engine-v1/CHANGELOG.md b/google-cloud-discovery_engine-v1/CHANGELOG.md index b040e15bba52..480fd453fb49 100644 --- a/google-cloud-discovery_engine-v1/CHANGELOG.md +++ b/google-cloud-discovery_engine-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 2.4.0 (2025-07-25) + +#### Features + +* add AssistantService +* add SessionService ([#30717](https://github.com/googleapis/google-cloud-ruby/issues/30717)) + ### 2.3.1 (2025-07-15) #### Documentation diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb index 23ae6cf1c53b..13e962c216de 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DiscoveryEngine module V1 - VERSION = "2.3.1" + VERSION = "2.4.0" end end end diff --git a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json index 8495e6ee217a..0f3693cc60a8 100644 --- a/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/google-cloud-discovery_engine-v1/snippets/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-discovery_engine-v1", - "version": "2.3.1", + "version": "2.4.0", "language": "RUBY", "apis": [ { From 469ce731fc1341c50e5ddc8419a0627c0a53a4c9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:29:39 -0700 Subject: [PATCH 306/457] chore(main): release google-cloud-discovery_engine 2.3.0 (#30729) --- .release-please-manifest.json | 2 +- google-cloud-discovery_engine/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/discovery_engine/version.rb | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d48daf681ddf..ddb9669963ca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -327,7 +327,7 @@ "google-cloud-dialogflow-cx-v3+FILLER": "0.0.0", "google-cloud-dialogflow-v2": "1.10.1", "google-cloud-dialogflow-v2+FILLER": "0.0.0", - "google-cloud-discovery_engine": "2.2.0", + "google-cloud-discovery_engine": "2.3.0", "google-cloud-discovery_engine+FILLER": "0.0.0", "google-cloud-discovery_engine-v1": "2.4.0", "google-cloud-discovery_engine-v1+FILLER": "0.0.0", diff --git a/google-cloud-discovery_engine/CHANGELOG.md b/google-cloud-discovery_engine/CHANGELOG.md index c2553c2a5b80..0c3dfe10c366 100644 --- a/google-cloud-discovery_engine/CHANGELOG.md +++ b/google-cloud-discovery_engine/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 2.3.0 (2025-07-25) + +#### Features + +* add AssistantService +* add SessionService ([#30716](https://github.com/googleapis/google-cloud-ruby/issues/30716)) + ### 2.2.0 (2025-06-13) #### Features diff --git a/google-cloud-discovery_engine/lib/google/cloud/discovery_engine/version.rb b/google-cloud-discovery_engine/lib/google/cloud/discovery_engine/version.rb index 683205d1acf1..e4d8909c0152 100644 --- a/google-cloud-discovery_engine/lib/google/cloud/discovery_engine/version.rb +++ b/google-cloud-discovery_engine/lib/google/cloud/discovery_engine/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module DiscoveryEngine - VERSION = "2.2.0" + VERSION = "2.3.0" end end end From 31d400fd5a22e58eafc79a65e3f3e24522b824c2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:30:30 -0700 Subject: [PATCH 307/457] feat: add SessionService (#30728) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 787001221 Source-Link: https://github.com/googleapis/googleapis/commit/f1923692a0bee2744249e9c4d4c85460e8ae9f0a Source-Link: https://github.com/googleapis/googleapis-gen/commit/72daf89013dd5053bbd9a036d81659372fc6e01f Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI3MmRhZjg5MDEzZGQ1MDUzYmJkOWEwMzZkODE2NTkzNzJmYzZlMDFmIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 17 + .../gapic_metadata.json | 34 + .../google/cloud/discovery_engine/v1beta.rb | 1 + .../conversational_search_service/client.rb | 34 +- .../rest/client.rb | 34 +- .../cloud/discovery_engine/v1beta/rest.rb | 1 + .../v1beta/search_service/client.rb | 44 +- .../v1beta/search_service/rest/client.rb | 44 +- .../v1beta/session_service.rb | 55 ++ .../v1beta/session_service/client.rb | 920 ++++++++++++++++++ .../v1beta/session_service/credentials.rb | 47 + .../v1beta/session_service/paths.rb | 330 +++++++ .../v1beta/session_service/rest.rb | 52 + .../v1beta/session_service/rest/client.rb | 859 ++++++++++++++++ .../session_service/rest/service_stub.rb | 462 +++++++++ .../conversational_search_service_pb.rb | 2 +- .../discoveryengine/v1beta/session_pb.rb | 4 +- .../v1beta/session_service_pb.rb | 49 + .../v1beta/session_service_services_pb.rb | 64 ++ .../v1beta/conversational_search_service.rb | 31 +- .../discoveryengine/v1beta/search_service.rb | 22 +- .../cloud/discoveryengine/v1beta/session.rb | 42 +- .../session_service/create_session.rb | 47 + .../session_service/delete_session.rb | 47 + .../snippets/session_service/get_session.rb | 47 + .../snippets/session_service/list_sessions.rb | 51 + .../session_service/update_session.rb | 47 + ...a_google.cloud.discoveryengine.v1beta.json | 200 ++++ ...conversational_search_service_rest_test.rb | 11 +- .../conversational_search_service_test.rb | 12 +- .../v1beta/session_service_paths_test.rb | 124 +++ .../v1beta/session_service_rest_test.rb | 376 +++++++ .../v1beta/session_service_test.rb | 394 ++++++++ 33 files changed, 4399 insertions(+), 105 deletions(-) create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service.rb create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/client.rb create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/credentials.rb create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/paths.rb create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest.rb create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest/client.rb create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest/service_stub.rb create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_service_pb.rb create mode 100644 google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_service_services_pb.rb create mode 100644 google-cloud-discovery_engine-v1beta/snippets/session_service/create_session.rb create mode 100644 google-cloud-discovery_engine-v1beta/snippets/session_service/delete_session.rb create mode 100644 google-cloud-discovery_engine-v1beta/snippets/session_service/get_session.rb create mode 100644 google-cloud-discovery_engine-v1beta/snippets/session_service/list_sessions.rb create mode 100644 google-cloud-discovery_engine-v1beta/snippets/session_service/update_session.rb create mode 100644 google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_paths_test.rb create mode 100644 google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_rest_test.rb create mode 100644 google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_test.rb diff --git a/google-cloud-discovery_engine-v1beta/.owlbot-manifest.json b/google-cloud-discovery_engine-v1beta/.owlbot-manifest.json index 1b8d7ccef6cd..d4cf10028b75 100644 --- a/google-cloud-discovery_engine-v1beta/.owlbot-manifest.json +++ b/google-cloud-discovery_engine-v1beta/.owlbot-manifest.json @@ -153,6 +153,13 @@ "lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest.rb", "lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb", "lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/service_stub.rb", + "lib/google/cloud/discovery_engine/v1beta/session_service.rb", + "lib/google/cloud/discovery_engine/v1beta/session_service/client.rb", + "lib/google/cloud/discovery_engine/v1beta/session_service/credentials.rb", + "lib/google/cloud/discovery_engine/v1beta/session_service/paths.rb", + "lib/google/cloud/discovery_engine/v1beta/session_service/rest.rb", + "lib/google/cloud/discovery_engine/v1beta/session_service/rest/client.rb", + "lib/google/cloud/discovery_engine/v1beta/session_service/rest/service_stub.rb", "lib/google/cloud/discovery_engine/v1beta/site_search_engine_service.rb", "lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb", "lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/credentials.rb", @@ -227,6 +234,8 @@ "lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb", "lib/google/cloud/discoveryengine/v1beta/serving_config_service_services_pb.rb", "lib/google/cloud/discoveryengine/v1beta/session_pb.rb", + "lib/google/cloud/discoveryengine/v1beta/session_service_pb.rb", + "lib/google/cloud/discoveryengine/v1beta/session_service_services_pb.rb", "lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb", "lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_pb.rb", "lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_services_pb.rb", @@ -369,6 +378,11 @@ "snippets/serving_config_service/get_serving_config.rb", "snippets/serving_config_service/list_serving_configs.rb", "snippets/serving_config_service/update_serving_config.rb", + "snippets/session_service/create_session.rb", + "snippets/session_service/delete_session.rb", + "snippets/session_service/get_session.rb", + "snippets/session_service/list_sessions.rb", + "snippets/session_service/update_session.rb", "snippets/site_search_engine_service/batch_create_target_sites.rb", "snippets/site_search_engine_service/batch_verify_target_sites.rb", "snippets/site_search_engine_service/create_sitemap.rb", @@ -449,6 +463,9 @@ "test/google/cloud/discovery_engine/v1beta/serving_config_service_paths_test.rb", "test/google/cloud/discovery_engine/v1beta/serving_config_service_rest_test.rb", "test/google/cloud/discovery_engine/v1beta/serving_config_service_test.rb", + "test/google/cloud/discovery_engine/v1beta/session_service_paths_test.rb", + "test/google/cloud/discovery_engine/v1beta/session_service_rest_test.rb", + "test/google/cloud/discovery_engine/v1beta/session_service_test.rb", "test/google/cloud/discovery_engine/v1beta/site_search_engine_service_operations_test.rb", "test/google/cloud/discovery_engine/v1beta/site_search_engine_service_paths_test.rb", "test/google/cloud/discovery_engine/v1beta/site_search_engine_service_rest_test.rb", diff --git a/google-cloud-discovery_engine-v1beta/gapic_metadata.json b/google-cloud-discovery_engine-v1beta/gapic_metadata.json index 735fe2d9e947..08c9c834c4e1 100644 --- a/google-cloud-discovery_engine-v1beta/gapic_metadata.json +++ b/google-cloud-discovery_engine-v1beta/gapic_metadata.json @@ -548,6 +548,40 @@ } } }, + "SessionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client", + "rpcs": { + "CreateSession": { + "methods": [ + "create_session" + ] + }, + "DeleteSession": { + "methods": [ + "delete_session" + ] + }, + "UpdateSession": { + "methods": [ + "update_session" + ] + }, + "GetSession": { + "methods": [ + "get_session" + ] + }, + "ListSessions": { + "methods": [ + "list_sessions" + ] + } + } + } + } + }, "SiteSearchEngineService": { "clients": { "grpc": { diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta.rb index 2283e0cea156..2cf4007732ad 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta.rb @@ -33,6 +33,7 @@ require "google/cloud/discovery_engine/v1beta/schema_service" require "google/cloud/discovery_engine/v1beta/search_tuning_service" require "google/cloud/discovery_engine/v1beta/serving_config_service" +require "google/cloud/discovery_engine/v1beta/session_service" require "google/cloud/discovery_engine/v1beta/site_search_engine_service" require "google/cloud/discovery_engine/v1beta/user_event_service" require "google/cloud/discovery_engine/v1beta/version" diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb index c48dc0f428d8..a90df1b0f2f1 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb @@ -1355,7 +1355,7 @@ def update_session request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload get_session(name: nil) + # @overload get_session(name: nil, include_answer_details: nil) # Pass arguments to `get_session` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -1363,6 +1363,9 @@ def update_session request, options = nil # @param name [::String] # Required. The resource name of the Session to get. Format: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @param include_answer_details [::Boolean] + # Optional. If set to true, the full session including all answer details + # will be returned. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Session] @@ -1457,22 +1460,39 @@ def get_session request, options = nil # A page token, received from a previous `ListSessions` call. # Provide this to retrieve the subsequent page. # @param filter [::String] - # A filter to apply on the list results. The supported features are: - # user_pseudo_id, state. - # - # Example: + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` + # + # Examples: # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" # @param order_by [::String] # A comma-separated list of fields to order by, sorted in ascending order. # Use "desc" after a field name for descending. # Supported fields: + # # * `update_time` # * `create_time` # * `session_name` + # * `is_pinned` # # Example: - # "update_time desc" - # "create_time" + # + # * "update_time desc" + # * "create_time" + # * "is_pinned desc,update_time desc": list sessions by is_pinned first, then + # by update_time. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Session>] diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb index 1beb8e09577a..e775a753ef86 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb @@ -1271,7 +1271,7 @@ def update_session request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload get_session(name: nil) + # @overload get_session(name: nil, include_answer_details: nil) # Pass arguments to `get_session` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -1279,6 +1279,9 @@ def update_session request, options = nil # @param name [::String] # Required. The resource name of the Session to get. Format: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @param include_answer_details [::Boolean] + # Optional. If set to true, the full session including all answer details + # will be returned. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Session] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1366,22 +1369,39 @@ def get_session request, options = nil # A page token, received from a previous `ListSessions` call. # Provide this to retrieve the subsequent page. # @param filter [::String] - # A filter to apply on the list results. The supported features are: - # user_pseudo_id, state. - # - # Example: + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` + # + # Examples: # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" # @param order_by [::String] # A comma-separated list of fields to order by, sorted in ascending order. # Use "desc" after a field name for descending. # Supported fields: + # # * `update_time` # * `create_time` # * `session_name` + # * `is_pinned` # # Example: - # "update_time desc" - # "create_time" + # + # * "update_time desc" + # * "create_time" + # * "is_pinned desc,update_time desc": list sessions by is_pinned first, then + # by update_time. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Session>] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rest.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rest.rb index 3f0ea44b5775..46e0fa60566a 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rest.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rest.rb @@ -33,6 +33,7 @@ require "google/cloud/discovery_engine/v1beta/schema_service/rest" require "google/cloud/discovery_engine/v1beta/search_tuning_service/rest" require "google/cloud/discovery_engine/v1beta/serving_config_service/rest" +require "google/cloud/discovery_engine/v1beta/session_service/rest" require "google/cloud/discovery_engine/v1beta/site_search_engine_service/rest" require "google/cloud/discovery_engine/v1beta/user_event_service/rest" require "google/cloud/discovery_engine/v1beta/version" diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb index 6d0773dea158..ae360fd26d9f 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb @@ -455,22 +455,16 @@ def logger # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public @@ -830,22 +824,16 @@ def search request, options = nil # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb index ab8c67e29258..be25cf56fb42 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb @@ -448,22 +448,16 @@ def logger # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public @@ -816,22 +810,16 @@ def search request, options = nil # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service.rb new file mode 100644 index 000000000000..9da14b08cb23 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1beta/version" + +require "google/cloud/discovery_engine/v1beta/session_service/credentials" +require "google/cloud/discovery_engine/v1beta/session_service/paths" +require "google/cloud/discovery_engine/v1beta/session_service/client" +require "google/cloud/discovery_engine/v1beta/session_service/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1beta + ## + # Service for managing Sessions and Session-related resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/discovery_engine/v1beta/session_service" + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/discovery_engine/v1beta/session_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new + # + module SessionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "session_service", "helpers.rb" +require "google/cloud/discovery_engine/v1beta/session_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/client.rb new file mode 100644 index 000000000000..86d506f6d207 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/client.rb @@ -0,0 +1,920 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1beta/session_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module DiscoveryEngine + module V1beta + module SessionService + ## + # Client for the SessionService service. + # + # Service for managing Sessions and Session-related resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :session_service_stub + + ## + # Configure the SessionService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SessionService clients + # ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::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", "DiscoveryEngine", "V1beta"] + 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.timeout = 30.0 + default_config.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 SessionService 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::DiscoveryEngine::V1beta::SessionService::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 + @session_service_stub.universe_domain + end + + ## + # Create a new SessionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SessionService 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/discoveryengine/v1beta/session_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 + + @session_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::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 + ) + + @session_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @session_service_stub.endpoint + config.universe_domain = @session_service_stub.universe_domain + config.logger = @session_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @session_service_stub.logger + end + + # Service calls + + ## + # Creates a Session. + # + # If the {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} to create + # already exists, an ALREADY_EXISTS error is returned. + # + # @overload create_session(request, options = nil) + # Pass arguments to `create_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest, ::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_session(parent: nil, session: nil) + # Pass arguments to `create_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Full resource name of parent data store. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + # @param session [::Google::Cloud::DiscoveryEngine::V1beta::Session, ::Hash] + # Required. The session to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest.new + # + # # Call the create_session method. + # result = client.create_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + # p result + # + def create_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest + + # 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_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::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_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :create_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Session. + # + # If the {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} to delete + # does not exist, a NOT_FOUND error is returned. + # + # @overload delete_session(request, options = nil) + # Pass arguments to `delete_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest, ::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_session(name: nil) + # Pass arguments to `delete_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Session to delete. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # + # @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/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest.new + # + # # Call the delete_session method. + # result = client.delete_session request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest + + # 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_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::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_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :delete_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Session. + # + # {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} action type cannot + # be changed. If the {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} + # to update does not exist, a NOT_FOUND error is returned. + # + # @overload update_session(request, options = nil) + # Pass arguments to `update_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest, ::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 update_session(session: nil, update_mask: nil) + # Pass arguments to `update_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::Google::Cloud::DiscoveryEngine::V1beta::Session, ::Hash] + # Required. The Session to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Indicates which fields in the provided + # {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} to update. The + # following are NOT supported: + # + # * {::Google::Cloud::DiscoveryEngine::V1beta::Session#name Session.name} + # + # If not set or empty, all supported fields are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest.new + # + # # Call the update_session method. + # result = client.update_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + # p result + # + def update_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest + + # 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.update_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::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.session&.name + header_params["session.name"] = request.session.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.update_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :update_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Session. + # + # @overload get_session(request, options = nil) + # Pass arguments to `get_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest, ::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_session(name: nil, include_answer_details: nil) + # Pass arguments to `get_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Session to get. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @param include_answer_details [::Boolean] + # Optional. If set to true, the full session including all answer details + # will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new + # + # # Call the get_session method. + # result = client.get_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + # p result + # + def get_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest + + # 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_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::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_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :get_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Sessions by their parent + # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest, ::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_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_sessions` 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 data store resource name. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + # @param page_size [::Integer] + # Maximum number of results to return. If unspecified, defaults + # to 50. Max allowed value is 1000. + # @param page_token [::String] + # A page token, received from a previous `ListSessions` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` + # + # Examples: + # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" + # @param order_by [::String] + # A comma-separated list of fields to order by, sorted in ascending order. + # Use "desc" after a field name for descending. + # Supported fields: + # + # * `update_time` + # * `create_time` + # * `session_name` + # * `is_pinned` + # + # Example: + # + # * "update_time desc" + # * "create_time" + # * "is_pinned desc,update_time desc": list sessions by is_pinned first, then + # by update_time. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Session>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Session>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions 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::DiscoveryEngine::V1beta::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest + + # 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_sessions.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::DiscoveryEngine::V1beta::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_sessions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :list_sessions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @session_service_stub, :list_sessions, 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 SessionService API. + # + # This class represents the configuration for SessionService, + # 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::DiscoveryEngine::V1beta::SessionService::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_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "discoveryengine.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 SessionService 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_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_session + ## + # RPC-specific configuration for `delete_session` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_session + ## + # RPC-specific configuration for `update_session` + # @return [::Gapic::Config::Method] + # + attr_reader :update_session + ## + # RPC-specific configuration for `get_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_session + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + + # @private + def initialize parent_rpcs = nil + create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session + @create_session = ::Gapic::Config::Method.new create_session_config + delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session + @delete_session = ::Gapic::Config::Method.new delete_session_config + update_session_config = parent_rpcs.update_session if parent_rpcs.respond_to? :update_session + @update_session = ::Gapic::Config::Method.new update_session_config + get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session + @get_session = ::Gapic::Config::Method.new get_session_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/credentials.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/credentials.rb new file mode 100644 index 000000000000..1dd493b671d9 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1beta + module SessionService + # Credentials for the SessionService 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 diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/paths.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/paths.rb new file mode 100644 index 000000000000..3b68c5e32614 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/paths.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 DiscoveryEngine + module V1beta + module SessionService + # Path helper methods for the SessionService API. + module Paths + ## + # Create a fully-qualified Answer resource string. + # + # @overload answer_path(project:, location:, data_store:, session:, answer:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param session [String] + # @param answer [String] + # + # @overload answer_path(project:, location:, collection:, data_store:, session:, answer:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param session [String] + # @param answer [String] + # + # @overload answer_path(project:, location:, collection:, engine:, session:, answer:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param engine [String] + # @param session [String] + # @param answer [String] + # + # @return [::String] + def answer_path **args + resources = { + "answer:data_store:location:project:session" => (proc do |project:, location:, data_store:, session:, answer:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}" + end), + "answer:collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:, answer:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}" + end), + "answer:collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:, answer:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/" + raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}/answers/#{answer}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Chunk resource string. + # + # @overload chunk_path(project:, location:, data_store:, branch:, document:, chunk:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # @param chunk [String] + # + # @overload chunk_path(project:, location:, collection:, data_store:, branch:, document:, chunk:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # @param chunk [String] + # + # @return [::String] + def chunk_path **args + resources = { + "branch:chunk:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:, chunk:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}" + end), + "branch:chunk:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:, chunk:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified DataStore resource string. + # + # @overload data_store_path(project:, location:, data_store:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # + # @overload data_store_path(project:, location:, collection:, data_store:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # + # @return [::String] + def data_store_path **args + resources = { + "data_store:location:project" => (proc do |project:, location:, data_store:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}" + end), + "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Document resource string. + # + # @overload document_path(project:, location:, data_store:, branch:, document:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # + # @overload document_path(project:, location:, collection:, data_store:, branch:, document:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param branch [String] + # @param document [String] + # + # @return [::String] + def document_path **args + resources = { + "branch:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}" + end), + "branch:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Session resource string. + # + # @overload session_path(project:, location:, data_store:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param data_store [String] + # @param session [String] + # + # @overload session_path(project:, location:, collection:, data_store:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param data_store [String] + # @param session [String] + # + # @overload session_path(project:, location:, collection:, engine:, session:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param engine [String] + # @param session [String] + # + # @return [::String] + def session_path **args + resources = { + "data_store:location:project:session" => (proc do |project:, location:, data_store:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}" + end), + "collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}" + end), + "collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest.rb new file mode 100644 index 000000000000..4c5d14f0d326 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1beta/version" + +require "google/cloud/discovery_engine/v1beta/session_service/credentials" +require "google/cloud/discovery_engine/v1beta/session_service/paths" +require "google/cloud/discovery_engine/v1beta/session_service/rest/client" + +module Google + module Cloud + module DiscoveryEngine + module V1beta + ## + # Service for managing Sessions and Session-related resources. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/discovery_engine/v1beta/session_service/rest" + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new + # + module SessionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/discovery_engine/v1beta/session_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest/client.rb new file mode 100644 index 000000000000..ff989979fb1b --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest/client.rb @@ -0,0 +1,859 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1beta/session_service_pb" +require "google/cloud/discovery_engine/v1beta/session_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module DiscoveryEngine + module V1beta + module SessionService + module Rest + ## + # REST client for the SessionService service. + # + # Service for managing Sessions and Session-related resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :session_service_stub + + ## + # Configure the SessionService Client class. + # + # See {::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SessionService clients + # ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::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", "DiscoveryEngine", "V1beta"] + 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.timeout = 30.0 + default_config.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 SessionService 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::DiscoveryEngine::V1beta::SessionService::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 + @session_service_stub.universe_domain + end + + ## + # Create a new SessionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SessionService 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 + + @session_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @session_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @session_service_stub.endpoint + config.universe_domain = @session_service_stub.universe_domain + config.logger = @session_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @session_service_stub.logger + end + + # Service calls + + ## + # Creates a Session. + # + # If the {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} to create + # already exists, an ALREADY_EXISTS error is returned. + # + # @overload create_session(request, options = nil) + # Pass arguments to `create_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest, ::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_session(parent: nil, session: nil) + # Pass arguments to `create_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Full resource name of parent data store. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + # @param session [::Google::Cloud::DiscoveryEngine::V1beta::Session, ::Hash] + # Required. The session to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest.new + # + # # Call the create_session method. + # result = client.create_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + # p result + # + def create_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest + + # 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_session.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::DiscoveryEngine::V1beta::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_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.create_session 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 + + ## + # Deletes a Session. + # + # If the {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} to delete + # does not exist, a NOT_FOUND error is returned. + # + # @overload delete_session(request, options = nil) + # Pass arguments to `delete_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest, ::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_session(name: nil) + # Pass arguments to `delete_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Session to delete. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @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/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest.new + # + # # Call the delete_session method. + # result = client.delete_session request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest + + # 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_session.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::DiscoveryEngine::V1beta::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_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.delete_session 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 + + ## + # Updates a Session. + # + # {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} action type cannot + # be changed. If the {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} + # to update does not exist, a NOT_FOUND error is returned. + # + # @overload update_session(request, options = nil) + # Pass arguments to `update_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest, ::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 update_session(session: nil, update_mask: nil) + # Pass arguments to `update_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::Google::Cloud::DiscoveryEngine::V1beta::Session, ::Hash] + # Required. The Session to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Indicates which fields in the provided + # {::Google::Cloud::DiscoveryEngine::V1beta::Session Session} to update. The + # following are NOT supported: + # + # * {::Google::Cloud::DiscoveryEngine::V1beta::Session#name Session.name} + # + # If not set or empty, all supported fields are updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest.new + # + # # Call the update_session method. + # result = client.update_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + # p result + # + def update_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest + + # 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.update_session.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::DiscoveryEngine::V1beta::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.update_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.update_session 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 Session. + # + # @overload get_session(request, options = nil) + # Pass arguments to `get_session` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest, ::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_session(name: nil, include_answer_details: nil) + # Pass arguments to `get_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Session to get. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @param include_answer_details [::Boolean] + # Optional. If set to true, the full session including all answer details + # will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new + # + # # Call the get_session method. + # result = client.get_session request + # + # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + # p result + # + def get_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest + + # 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_session.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::DiscoveryEngine::V1beta::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_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.get_session 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 all Sessions by their parent + # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest, ::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_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_sessions` 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 data store resource name. Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + # @param page_size [::Integer] + # Maximum number of results to return. If unspecified, defaults + # to 50. Max allowed value is 1000. + # @param page_token [::String] + # A page token, received from a previous `ListSessions` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` + # + # Examples: + # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" + # @param order_by [::String] + # A comma-separated list of fields to order by, sorted in ascending order. + # Use "desc" after a field name for descending. + # Supported fields: + # + # * `update_time` + # * `create_time` + # * `session_name` + # * `is_pinned` + # + # Example: + # + # * "update_time desc" + # * "create_time" + # * "is_pinned desc,update_time desc": list sessions by is_pinned first, then + # by update_time. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Session>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Session>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/discovery_engine/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions 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::DiscoveryEngine::V1beta::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest + + # 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_sessions.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::DiscoveryEngine::V1beta::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_sessions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.list_sessions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @session_service_stub, :list_sessions, "sessions", 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 SessionService REST API. + # + # This class represents the configuration for SessionService 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::DiscoveryEngine::V1beta::SessionService::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_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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 = "discoveryengine.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 SessionService 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_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_session + ## + # RPC-specific configuration for `delete_session` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_session + ## + # RPC-specific configuration for `update_session` + # @return [::Gapic::Config::Method] + # + attr_reader :update_session + ## + # RPC-specific configuration for `get_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_session + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + + # @private + def initialize parent_rpcs = nil + create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session + @create_session = ::Gapic::Config::Method.new create_session_config + delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session + @delete_session = ::Gapic::Config::Method.new delete_session_config + update_session_config = parent_rpcs.update_session if parent_rpcs.respond_to? :update_session + @update_session = ::Gapic::Config::Method.new update_session_config + get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session + @get_session = ::Gapic::Config::Method.new get_session_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest/service_stub.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest/service_stub.rb new file mode 100644 index 000000000000..4bac857e2de8 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/session_service/rest/service_stub.rb @@ -0,0 +1,462 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1beta/session_service_pb" + +module Google + module Cloud + module DiscoveryEngine + module V1beta + module SessionService + module Rest + ## + # REST service stub for the SessionService 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: true, + 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_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest] + # 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::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # A result object deserialized from the server's reply + def create_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_session_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_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.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_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest] + # 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_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_session_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_session", + 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 update_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest] + # 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::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # A result object deserialized from the server's reply + def update_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_session_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: "update_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.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_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest] + # 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::DiscoveryEngine::V1beta::Session] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session] + # A result object deserialized from the server's reply + def get_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_session_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_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.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_sessions REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest] + # 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::DiscoveryEngine::V1beta::ListSessionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse] + # A result object deserialized from the server's reply + def list_sessions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sessions_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_sessions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse.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_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest] + # 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_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/sessions", + body: "session", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/sessions", + body: "session", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/sessions", + body: "session", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest] + # 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_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{session.name}", + body: "session", + matches: [ + ["session.name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{session.name}", + body: "session", + matches: [ + ["session.name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{session.name}", + body: "session", + matches: [ + ["session.name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_session REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest] + # 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_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sessions REST call + # + # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest] + # 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_sessions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/sessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/sessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/sessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb index 2f02d4e997c2..fe922e913ee6 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb @@ -16,7 +16,7 @@ require 'google/protobuf/field_mask_pb' -descriptor_data = "\nGgoogle/cloud/discoveryengine/v1beta/conversational_search_service.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/discoveryengine/v1beta/answer.proto\x1a\x36google/cloud/discoveryengine/v1beta/conversation.proto\x1a\x38google/cloud/discoveryengine/v1beta/search_service.proto\x1a\x31google/cloud/discoveryengine/v1beta/session.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb1\x05\n\x1b\x43onverseConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\x12\x42\n\x05query\x18\x02 \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.TextInputB\x03\xe0\x41\x02\x12I\n\x0eserving_config\x18\x03 \x01(\tB1\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12G\n\x0c\x63onversation\x18\x05 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.Conversation\x12\x13\n\x0bsafe_search\x18\x06 \x01(\x08\x12\x65\n\x0buser_labels\x18\x07 \x03(\x0b\x32P.google.cloud.discoveryengine.v1beta.ConverseConversationRequest.UserLabelsEntry\x12\x66\n\x0csummary_spec\x18\x08 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec\x12\x0e\n\x06\x66ilter\x18\t \x01(\t\x12P\n\nboost_spec\x18\n \x01(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x97\x02\n\x1c\x43onverseConversationResponse\x12\x39\n\x05reply\x18\x01 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.Reply\x12G\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.Conversation\x12\x19\n\x11related_questions\x18\x06 \x03(\t\x12X\n\x0esearch_results\x18\x03 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\"\xab\x01\n\x19\x43reateConversationRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12L\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.ConversationB\x03\xe0\x41\x02\"\x9a\x01\n\x19UpdateConversationRequest\x12L\n\x0c\x63onversation\x18\x01 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.ConversationB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x19\x44\x65leteConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\"[\n\x16GetConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\"\xa5\x01\n\x18ListConversationsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"~\n\x19ListConversationsResponse\x12H\n\rconversations\x18\x01 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc5&\n\x12\x41nswerQueryRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12>\n\x05query\x18\x02 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.QueryB\x03\xe0\x41\x02\x12<\n\x07session\x18\x03 \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12W\n\x0bsafety_spec\x18\x04 \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec\x12l\n\x16related_questions_spec\x18\x05 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec\x12\x62\n\x0egrounding_spec\x18\x06 \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpecB\x03\xe0\x41\x01\x12l\n\x16\x61nswer_generation_spec\x18\x07 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec\x12W\n\x0bsearch_spec\x18\x08 \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec\x12p\n\x18query_understanding_spec\x18\t \x01(\x0b\x32N.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec\x12\x1d\n\x11\x61synchronous_mode\x18\n \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0euser_pseudo_id\x18\x0c \x01(\t\x12\\\n\x0buser_labels\x18\r \x03(\x0b\x32G.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.UserLabelsEntry\x1a\x1c\n\nSafetySpec\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\x1a&\n\x14RelatedQuestionsSpec\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\x1a\x92\x02\n\rGroundingSpec\x12\'\n\x1ainclude_grounding_supports\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12r\n\x0f\x66iltering_level\x18\x03 \x01(\x0e\x32T.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevelB\x03\xe0\x41\x01\"d\n\x0e\x46ilteringLevel\x12\x1f\n\x1b\x46ILTERING_LEVEL_UNSPECIFIED\x10\x00\x12\x17\n\x13\x46ILTERING_LEVEL_LOW\x10\x01\x12\x18\n\x14\x46ILTERING_LEVEL_HIGH\x10\x02\x1a\xab\x04\n\x14\x41nswerGenerationSpec\x12j\n\nmodel_spec\x18\x01 \x01(\x0b\x32V.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec\x12l\n\x0bprompt_spec\x18\x02 \x01(\x0b\x32W.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec\x12\x19\n\x11include_citations\x18\x03 \x01(\x08\x12\x1c\n\x14\x61nswer_language_code\x18\x04 \x01(\t\x12 \n\x18ignore_adversarial_query\x18\x05 \x01(\x08\x12\'\n\x1fignore_non_answer_seeking_query\x18\x06 \x01(\x08\x12(\n\x1bignore_low_relevant_content\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1aignore_jail_breaking_query\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\"\n\tModelSpec\x12\x15\n\rmodel_version\x18\x01 \x01(\t\x1a\x1e\n\nPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\tB\x1e\n\x1c_ignore_low_relevant_content\x1a\x9c\x12\n\nSearchSpec\x12h\n\rsearch_params\x18\x01 \x01(\x0b\x32O.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParamsH\x00\x12q\n\x12search_result_list\x18\x02 \x01(\x0b\x32S.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultListH\x00\x1a\x80\x04\n\x0cSearchParams\x12\x1a\n\x12max_return_results\x18\x01 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12P\n\nboost_spec\x18\x03 \x01(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12q\n\x12search_result_mode\x18\x05 \x01(\x0e\x32U.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode\x12Z\n\x10\x64\x61ta_store_specs\x18\x07 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec\x12\x90\x01\n)natural_language_query_understanding_spec\x18\x08 \x01(\x0b\x32X.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpecB\x03\xe0\x41\x01\x1a\xa4\x0c\n\x10SearchResultList\x12x\n\x0esearch_results\x18\x01 \x03(\x0b\x32`.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult\x1a\x95\x0b\n\x0cSearchResult\x12\x9f\x01\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32y.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfoH\x00\x12\x80\x01\n\nchunk_info\x18\x02 \x01(\x0b\x32j.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfoH\x00\x1a\xb2\x06\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\xa5\x01\n\x11\x64ocument_contexts\x18\x04 \x03(\x0b\x32\x89\x01.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext\x12\xa9\x01\n\x13\x65xtractive_segments\x18\x05 \x03(\x0b\x32\x8b\x01.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment\x12\xab\x01\n\x12\x65xtractive_answers\x18\x06 \x03(\x0b\x32\x8a\x01.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerB\x02\x18\x01\x1a;\n\x0f\x44ocumentContext\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a=\n\x11\x45xtractiveSegment\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a<\n\x10\x45xtractiveAnswer\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a\x9f\x02\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x96\x01\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32{.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata\x1a.\n\x10\x44ocumentMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\tB\t\n\x07\x63ontentB\x07\n\x05input\x1a\x8e\x05\n\x16QueryUnderstandingSpec\x12\x89\x01\n\x19query_classification_spec\x18\x01 \x01(\x0b\x32\x66.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec\x12\x7f\n\x14query_rephraser_spec\x18\x02 \x01(\x0b\x32\x61.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec\x1a\xa3\x02\n\x17QueryClassificationSpec\x12z\n\x05types\x18\x01 \x03(\x0e\x32k.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type\"\x8b\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\x12\x1f\n\x1bNON_ANSWER_SEEKING_QUERY_V2\x10\x04\x1a\x41\n\x12QueryRephraserSpec\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\x12\x1a\n\x12max_rephrase_steps\x18\x02 \x01(\x05\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xad\x01\n\x13\x41nswerQueryResponse\x12;\n\x06\x61nswer\x18\x01 \x01(\x0b\x32+.google.cloud.discoveryengine.v1beta.Answer\x12=\n\x07session\x18\x02 \x01(\x0b\x32,.google.cloud.discoveryengine.v1beta.Session\x12\x1a\n\x12\x61nswer_query_token\x18\x03 \x01(\t\"O\n\x10GetAnswerRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%discoveryengine.googleapis.com/Answer\"\x9c\x01\n\x14\x43reateSessionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x42\n\x07session\x18\x02 \x01(\x0b\x32,.google.cloud.discoveryengine.v1beta.SessionB\x03\xe0\x41\x02\"\x8b\x01\n\x14UpdateSessionRequest\x12\x42\n\x07session\x18\x01 \x01(\x0b\x32,.google.cloud.discoveryengine.v1beta.SessionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"T\n\x14\x44\x65leteSessionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&discoveryengine.googleapis.com/Session\"Q\n\x11GetSessionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&discoveryengine.googleapis.com/Session\"\xa0\x01\n\x13ListSessionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"o\n\x14ListSessionsResponse\x12>\n\x08sessions\x18\x01 \x03(\x0b\x32,.google.cloud.discoveryengine.v1beta.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd7)\n\x1b\x43onversationalSearchService\x12\xbf\x03\n\x14\x43onverseConversation\x12@.google.cloud.discoveryengine.v1beta.ConverseConversationRequest\x1a\x41.google.cloud.discoveryengine.v1beta.ConverseConversationResponse\"\xa1\x02\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x8d\x02\"K/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse:\x01*Z^\"Y/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse:\x01*Z[\"V/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}:converse:\x01*\x12\xba\x03\n\x12\x43reateConversation\x12>.google.cloud.discoveryengine.v1beta.CreateConversationRequest\x1a\x31.google.cloud.discoveryengine.v1beta.Conversation\"\xb0\x02\xda\x41\x13parent,conversation\x82\xd3\xe4\x93\x02\x93\x02\"B/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversations:\x0c\x63onversationZ`\"P/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations:\x0c\x63onversationZ]\"M/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/conversations:\x0c\x63onversation\x12\xe6\x02\n\x12\x44\x65leteConversation\x12>.google.cloud.discoveryengine.v1beta.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"\xf7\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe9\x01*B/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}ZR*P/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZO*M/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}\x12\xe6\x03\n\x12UpdateConversation\x12>.google.cloud.discoveryengine.v1beta.UpdateConversationRequest\x1a\x31.google.cloud.discoveryengine.v1beta.Conversation\"\xdc\x02\xda\x41\x18\x63onversation,update_mask\x82\xd3\xe4\x93\x02\xba\x02\x32O/v1beta/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}:\x0c\x63onversationZm2]/v1beta/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:\x0c\x63onversationZj2Z/v1beta/{conversation.name=projects/*/locations/*/collections/*/engines/*/conversations/*}:\x0c\x63onversation\x12\xfb\x02\n\x0fGetConversation\x12;.google.cloud.discoveryengine.v1beta.GetConversationRequest\x1a\x31.google.cloud.discoveryengine.v1beta.Conversation\"\xf7\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe9\x01\x12\x42/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}ZR\x12P/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZO\x12M/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}\x12\x8e\x03\n\x11ListConversations\x12=.google.cloud.discoveryengine.v1beta.ListConversationsRequest\x1a>.google.cloud.discoveryengine.v1beta.ListConversationsResponse\"\xf9\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xe9\x01\x12\x42/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversationsZR\x12P/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversationsZO\x12M/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/conversations\x12\xb2\x03\n\x0b\x41nswerQuery\x12\x37.google.cloud.discoveryengine.v1beta.AnswerQueryRequest\x1a\x38.google.cloud.discoveryengine.v1beta.AnswerQueryResponse\"\xaf\x02\x82\xd3\xe4\x93\x02\xa8\x02\"T/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer:\x01*Zg\"b/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer:\x01*Zd\"_/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer:\x01*\x12\xf8\x02\n\tGetAnswer\x12\x35.google.cloud.discoveryengine.v1beta.GetAnswerRequest\x1a+.google.cloud.discoveryengine.v1beta.Answer\"\x86\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf8\x01\x12G/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}ZW\x12U/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}ZT\x12R/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*/answers/*}\x12\x88\x03\n\rCreateSession\x12\x39.google.cloud.discoveryengine.v1beta.CreateSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\x8d\x02\xda\x41\x0eparent,session\x82\xd3\xe4\x93\x02\xf5\x01\"=/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessions:\x07sessionZV\"K/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions:\x07sessionZS\"H/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions:\x07session\x12\xcd\x02\n\rDeleteSession\x12\x39.google.cloud.discoveryengine.v1beta.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01*=/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}ZM*K/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZJ*H/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xa5\x03\n\rUpdateSession\x12\x39.google.cloud.discoveryengine.v1beta.UpdateSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\xaa\x02\xda\x41\x13session,update_mask\x82\xd3\xe4\x93\x02\x8d\x02\x32\x45/v1beta/{session.name=projects/*/locations/*/dataStores/*/sessions/*}:\x07sessionZ^2S/v1beta/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}:\x07sessionZ[2P/v1beta/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}:\x07session\x12\xdd\x02\n\nGetSession\x12\x36.google.cloud.discoveryengine.v1beta.GetSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01\x12=/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}ZM\x12K/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZJ\x12H/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xf0\x02\n\x0cListSessions\x12\x38.google.cloud.discoveryengine.v1beta.ListSessionsRequest\x1a\x39.google.cloud.discoveryengine.v1beta.ListSessionsResponse\"\xea\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xda\x01\x12=/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessionsZM\x12K/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessionsZJ\x12H/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa7\x02\n\'com.google.cloud.discoveryengine.v1betaB ConversationalSearchServiceProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3" +descriptor_data = "\nGgoogle/cloud/discoveryengine/v1beta/conversational_search_service.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/discoveryengine/v1beta/answer.proto\x1a\x36google/cloud/discoveryengine/v1beta/conversation.proto\x1a\x38google/cloud/discoveryengine/v1beta/search_service.proto\x1a\x31google/cloud/discoveryengine/v1beta/session.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb1\x05\n\x1b\x43onverseConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\x12\x42\n\x05query\x18\x02 \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.TextInputB\x03\xe0\x41\x02\x12I\n\x0eserving_config\x18\x03 \x01(\tB1\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12G\n\x0c\x63onversation\x18\x05 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.Conversation\x12\x13\n\x0bsafe_search\x18\x06 \x01(\x08\x12\x65\n\x0buser_labels\x18\x07 \x03(\x0b\x32P.google.cloud.discoveryengine.v1beta.ConverseConversationRequest.UserLabelsEntry\x12\x66\n\x0csummary_spec\x18\x08 \x01(\x0b\x32P.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec\x12\x0e\n\x06\x66ilter\x18\t \x01(\t\x12P\n\nboost_spec\x18\n \x01(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x97\x02\n\x1c\x43onverseConversationResponse\x12\x39\n\x05reply\x18\x01 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.Reply\x12G\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.Conversation\x12\x19\n\x11related_questions\x18\x06 \x03(\t\x12X\n\x0esearch_results\x18\x03 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\"\xab\x01\n\x19\x43reateConversationRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12L\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.ConversationB\x03\xe0\x41\x02\"\x9a\x01\n\x19UpdateConversationRequest\x12L\n\x0c\x63onversation\x18\x01 \x01(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.ConversationB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x19\x44\x65leteConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\"[\n\x16GetConversationRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+discoveryengine.googleapis.com/Conversation\"\xa5\x01\n\x18ListConversationsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"~\n\x19ListConversationsResponse\x12H\n\rconversations\x18\x01 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc5&\n\x12\x41nswerQueryRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12>\n\x05query\x18\x02 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.QueryB\x03\xe0\x41\x02\x12<\n\x07session\x18\x03 \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12W\n\x0bsafety_spec\x18\x04 \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec\x12l\n\x16related_questions_spec\x18\x05 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec\x12\x62\n\x0egrounding_spec\x18\x06 \x01(\x0b\x32\x45.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpecB\x03\xe0\x41\x01\x12l\n\x16\x61nswer_generation_spec\x18\x07 \x01(\x0b\x32L.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec\x12W\n\x0bsearch_spec\x18\x08 \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec\x12p\n\x18query_understanding_spec\x18\t \x01(\x0b\x32N.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec\x12\x1d\n\x11\x61synchronous_mode\x18\n \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0euser_pseudo_id\x18\x0c \x01(\t\x12\\\n\x0buser_labels\x18\r \x03(\x0b\x32G.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.UserLabelsEntry\x1a\x1c\n\nSafetySpec\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\x1a&\n\x14RelatedQuestionsSpec\x12\x0e\n\x06\x65nable\x18\x01 \x01(\x08\x1a\x92\x02\n\rGroundingSpec\x12\'\n\x1ainclude_grounding_supports\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12r\n\x0f\x66iltering_level\x18\x03 \x01(\x0e\x32T.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevelB\x03\xe0\x41\x01\"d\n\x0e\x46ilteringLevel\x12\x1f\n\x1b\x46ILTERING_LEVEL_UNSPECIFIED\x10\x00\x12\x17\n\x13\x46ILTERING_LEVEL_LOW\x10\x01\x12\x18\n\x14\x46ILTERING_LEVEL_HIGH\x10\x02\x1a\xab\x04\n\x14\x41nswerGenerationSpec\x12j\n\nmodel_spec\x18\x01 \x01(\x0b\x32V.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec\x12l\n\x0bprompt_spec\x18\x02 \x01(\x0b\x32W.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec\x12\x19\n\x11include_citations\x18\x03 \x01(\x08\x12\x1c\n\x14\x61nswer_language_code\x18\x04 \x01(\t\x12 \n\x18ignore_adversarial_query\x18\x05 \x01(\x08\x12\'\n\x1fignore_non_answer_seeking_query\x18\x06 \x01(\x08\x12(\n\x1bignore_low_relevant_content\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1aignore_jail_breaking_query\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\"\n\tModelSpec\x12\x15\n\rmodel_version\x18\x01 \x01(\t\x1a\x1e\n\nPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\tB\x1e\n\x1c_ignore_low_relevant_content\x1a\x9c\x12\n\nSearchSpec\x12h\n\rsearch_params\x18\x01 \x01(\x0b\x32O.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParamsH\x00\x12q\n\x12search_result_list\x18\x02 \x01(\x0b\x32S.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultListH\x00\x1a\x80\x04\n\x0cSearchParams\x12\x1a\n\x12max_return_results\x18\x01 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12P\n\nboost_spec\x18\x03 \x01(\x0b\x32<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12q\n\x12search_result_mode\x18\x05 \x01(\x0e\x32U.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode\x12Z\n\x10\x64\x61ta_store_specs\x18\x07 \x03(\x0b\x32@.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec\x12\x90\x01\n)natural_language_query_understanding_spec\x18\x08 \x01(\x0b\x32X.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpecB\x03\xe0\x41\x01\x1a\xa4\x0c\n\x10SearchResultList\x12x\n\x0esearch_results\x18\x01 \x03(\x0b\x32`.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult\x1a\x95\x0b\n\x0cSearchResult\x12\x9f\x01\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32y.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfoH\x00\x12\x80\x01\n\nchunk_info\x18\x02 \x01(\x0b\x32j.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfoH\x00\x1a\xb2\x06\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\xa5\x01\n\x11\x64ocument_contexts\x18\x04 \x03(\x0b\x32\x89\x01.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext\x12\xa9\x01\n\x13\x65xtractive_segments\x18\x05 \x03(\x0b\x32\x8b\x01.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment\x12\xab\x01\n\x12\x65xtractive_answers\x18\x06 \x03(\x0b\x32\x8a\x01.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerB\x02\x18\x01\x1a;\n\x0f\x44ocumentContext\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a=\n\x11\x45xtractiveSegment\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a<\n\x10\x45xtractiveAnswer\x12\x17\n\x0fpage_identifier\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a\x9f\x02\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x96\x01\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32{.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata\x1a.\n\x10\x44ocumentMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\tB\t\n\x07\x63ontentB\x07\n\x05input\x1a\x8e\x05\n\x16QueryUnderstandingSpec\x12\x89\x01\n\x19query_classification_spec\x18\x01 \x01(\x0b\x32\x66.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec\x12\x7f\n\x14query_rephraser_spec\x18\x02 \x01(\x0b\x32\x61.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec\x1a\xa3\x02\n\x17QueryClassificationSpec\x12z\n\x05types\x18\x01 \x03(\x0e\x32k.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type\"\x8b\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\x12\x1f\n\x1bNON_ANSWER_SEEKING_QUERY_V2\x10\x04\x1a\x41\n\x12QueryRephraserSpec\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\x12\x1a\n\x12max_rephrase_steps\x18\x02 \x01(\x05\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xad\x01\n\x13\x41nswerQueryResponse\x12;\n\x06\x61nswer\x18\x01 \x01(\x0b\x32+.google.cloud.discoveryengine.v1beta.Answer\x12=\n\x07session\x18\x02 \x01(\x0b\x32,.google.cloud.discoveryengine.v1beta.Session\x12\x1a\n\x12\x61nswer_query_token\x18\x03 \x01(\t\"O\n\x10GetAnswerRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%discoveryengine.googleapis.com/Answer\"\x9c\x01\n\x14\x43reateSessionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x42\n\x07session\x18\x02 \x01(\x0b\x32,.google.cloud.discoveryengine.v1beta.SessionB\x03\xe0\x41\x02\"\x8b\x01\n\x14UpdateSessionRequest\x12\x42\n\x07session\x18\x01 \x01(\x0b\x32,.google.cloud.discoveryengine.v1beta.SessionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"T\n\x14\x44\x65leteSessionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&discoveryengine.googleapis.com/Session\"v\n\x11GetSessionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12#\n\x16include_answer_details\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa0\x01\n\x13ListSessionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"o\n\x14ListSessionsResponse\x12>\n\x08sessions\x18\x01 \x03(\x0b\x32,.google.cloud.discoveryengine.v1beta.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd7)\n\x1b\x43onversationalSearchService\x12\xbf\x03\n\x14\x43onverseConversation\x12@.google.cloud.discoveryengine.v1beta.ConverseConversationRequest\x1a\x41.google.cloud.discoveryengine.v1beta.ConverseConversationResponse\"\xa1\x02\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x8d\x02\"K/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse:\x01*Z^\"Y/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse:\x01*Z[\"V/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}:converse:\x01*\x12\xba\x03\n\x12\x43reateConversation\x12>.google.cloud.discoveryengine.v1beta.CreateConversationRequest\x1a\x31.google.cloud.discoveryengine.v1beta.Conversation\"\xb0\x02\xda\x41\x13parent,conversation\x82\xd3\xe4\x93\x02\x93\x02\"B/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversations:\x0c\x63onversationZ`\"P/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations:\x0c\x63onversationZ]\"M/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/conversations:\x0c\x63onversation\x12\xe6\x02\n\x12\x44\x65leteConversation\x12>.google.cloud.discoveryengine.v1beta.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"\xf7\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe9\x01*B/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}ZR*P/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZO*M/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}\x12\xe6\x03\n\x12UpdateConversation\x12>.google.cloud.discoveryengine.v1beta.UpdateConversationRequest\x1a\x31.google.cloud.discoveryengine.v1beta.Conversation\"\xdc\x02\xda\x41\x18\x63onversation,update_mask\x82\xd3\xe4\x93\x02\xba\x02\x32O/v1beta/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}:\x0c\x63onversationZm2]/v1beta/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:\x0c\x63onversationZj2Z/v1beta/{conversation.name=projects/*/locations/*/collections/*/engines/*/conversations/*}:\x0c\x63onversation\x12\xfb\x02\n\x0fGetConversation\x12;.google.cloud.discoveryengine.v1beta.GetConversationRequest\x1a\x31.google.cloud.discoveryengine.v1beta.Conversation\"\xf7\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe9\x01\x12\x42/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}ZR\x12P/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZO\x12M/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}\x12\x8e\x03\n\x11ListConversations\x12=.google.cloud.discoveryengine.v1beta.ListConversationsRequest\x1a>.google.cloud.discoveryengine.v1beta.ListConversationsResponse\"\xf9\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xe9\x01\x12\x42/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversationsZR\x12P/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversationsZO\x12M/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/conversations\x12\xb2\x03\n\x0b\x41nswerQuery\x12\x37.google.cloud.discoveryengine.v1beta.AnswerQueryRequest\x1a\x38.google.cloud.discoveryengine.v1beta.AnswerQueryResponse\"\xaf\x02\x82\xd3\xe4\x93\x02\xa8\x02\"T/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer:\x01*Zg\"b/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer:\x01*Zd\"_/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer:\x01*\x12\xf8\x02\n\tGetAnswer\x12\x35.google.cloud.discoveryengine.v1beta.GetAnswerRequest\x1a+.google.cloud.discoveryengine.v1beta.Answer\"\x86\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf8\x01\x12G/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}ZW\x12U/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}ZT\x12R/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*/answers/*}\x12\x88\x03\n\rCreateSession\x12\x39.google.cloud.discoveryengine.v1beta.CreateSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\x8d\x02\xda\x41\x0eparent,session\x82\xd3\xe4\x93\x02\xf5\x01\"=/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessions:\x07sessionZV\"K/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions:\x07sessionZS\"H/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions:\x07session\x12\xcd\x02\n\rDeleteSession\x12\x39.google.cloud.discoveryengine.v1beta.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01*=/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}ZM*K/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZJ*H/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xa5\x03\n\rUpdateSession\x12\x39.google.cloud.discoveryengine.v1beta.UpdateSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\xaa\x02\xda\x41\x13session,update_mask\x82\xd3\xe4\x93\x02\x8d\x02\x32\x45/v1beta/{session.name=projects/*/locations/*/dataStores/*/sessions/*}:\x07sessionZ^2S/v1beta/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}:\x07sessionZ[2P/v1beta/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}:\x07session\x12\xdd\x02\n\nGetSession\x12\x36.google.cloud.discoveryengine.v1beta.GetSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01\x12=/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}ZM\x12K/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZJ\x12H/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xf0\x02\n\x0cListSessions\x12\x38.google.cloud.discoveryengine.v1beta.ListSessionsRequest\x1a\x39.google.cloud.discoveryengine.v1beta.ListSessionsResponse\"\xea\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xda\x01\x12=/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessionsZM\x12K/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessionsZJ\x12H/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa7\x02\n\'com.google.cloud.discoveryengine.v1betaB ConversationalSearchServiceProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_pb.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_pb.rb index e3f48f5f2d8d..fc8a3278645c 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_pb.rb @@ -6,10 +6,11 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/cloud/discoveryengine/v1beta/answer_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n1google/cloud/discoveryengine/v1beta/session.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa7\x06\n\x07Session\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32\x32.google.cloud.discoveryengine.v1beta.Session.State\x12\x16\n\x0euser_pseudo_id\x18\x03 \x01(\t\x12@\n\x05turns\x18\x04 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.Session.Turn\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a}\n\x04Turn\x12\x39\n\x05query\x18\x01 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.Query\x12:\n\x06\x61nswer\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Answer\"/\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01:\xd3\x02\xea\x41\xcf\x02\n&discoveryengine.googleapis.com/Session\x12Rprojects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}\x12kprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}\x12\x64projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}\"4\n\x05Query\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12\x10\n\x08query_id\x18\x01 \x01(\tB\t\n\x07\x63ontentB\x93\x02\n\'com.google.cloud.discoveryengine.v1betaB\x0cSessionProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3" +descriptor_data = "\n1google/cloud/discoveryengine/v1beta/session.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/discoveryengine/v1beta/answer.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x08\n\x07Session\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32\x32.google.cloud.discoveryengine.v1beta.Session.State\x12\x16\n\x0euser_pseudo_id\x18\x03 \x01(\t\x12@\n\x05turns\x18\x04 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1beta.Session.Turn\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tis_pinned\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xe3\x02\n\x04Turn\x12>\n\x05query\x18\x01 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.QueryB\x03\xe0\x41\x01\x12=\n\x06\x61nswer\x18\x02 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%discoveryengine.googleapis.com/Answer\x12I\n\x0f\x64\x65tailed_answer\x18\x07 \x01(\x0b\x32+.google.cloud.discoveryengine.v1beta.AnswerB\x03\xe0\x41\x03\x12]\n\x0cquery_config\x18\x10 \x03(\x0b\x32\x42.google.cloud.discoveryengine.v1beta.Session.Turn.QueryConfigEntryB\x03\xe0\x41\x01\x1a\x32\n\x10QueryConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"/\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01:\xe6\x02\xea\x41\xe2\x02\n&discoveryengine.googleapis.com/Session\x12Rprojects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}\x12kprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}\x12\x64projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}*\x08sessions2\x07session\"9\n\x05Query\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12\x15\n\x08query_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x42\t\n\x07\x63ontentB\x93\x02\n\'com.google.cloud.discoveryengine.v1betaB\x0cSessionProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -25,6 +26,7 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.discoveryengine.v1beta.Answer", "google/cloud/discoveryengine/v1beta/answer.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_service_pb.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_service_pb.rb new file mode 100644 index 000000000000..72ab79fdd7fb --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_service_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/discoveryengine/v1beta/session_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/discoveryengine/v1beta/conversational_search_service_pb' +require 'google/cloud/discoveryengine/v1beta/session_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n9google/cloud/discoveryengine/v1beta/session_service.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aGgoogle/cloud/discoveryengine/v1beta/conversational_search_service.proto\x1a\x31google/cloud/discoveryengine/v1beta/session.proto\x1a\x1bgoogle/protobuf/empty.proto2\xba\x0f\n\x0eSessionService\x12\x88\x03\n\rCreateSession\x12\x39.google.cloud.discoveryengine.v1beta.CreateSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\x8d\x02\xda\x41\x0eparent,session\x82\xd3\xe4\x93\x02\xf5\x01\"=/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessions:\x07sessionZV\"K/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions:\x07sessionZS\"H/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions:\x07session\x12\xcd\x02\n\rDeleteSession\x12\x39.google.cloud.discoveryengine.v1beta.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01*=/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}ZM*K/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZJ*H/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xa5\x03\n\rUpdateSession\x12\x39.google.cloud.discoveryengine.v1beta.UpdateSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\xaa\x02\xda\x41\x13session,update_mask\x82\xd3\xe4\x93\x02\x8d\x02\x32\x45/v1beta/{session.name=projects/*/locations/*/dataStores/*/sessions/*}:\x07sessionZ^2S/v1beta/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}:\x07sessionZ[2P/v1beta/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}:\x07session\x12\xdd\x02\n\nGetSession\x12\x36.google.cloud.discoveryengine.v1beta.GetSessionRequest\x1a,.google.cloud.discoveryengine.v1beta.Session\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01\x12=/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}ZM\x12K/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}ZJ\x12H/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\x12\xf0\x02\n\x0cListSessions\x12\x38.google.cloud.discoveryengine.v1beta.ListSessionsRequest\x1a\x39.google.cloud.discoveryengine.v1beta.ListSessionsResponse\"\xea\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xda\x01\x12=/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessionsZM\x12K/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessionsZJ\x12H/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x9a\x02\n\'com.google.cloud.discoveryengine.v1betaB\x13SessionServiceProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module DiscoveryEngine + module V1beta + end + end + end +end diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_service_services_pb.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_service_services_pb.rb new file mode 100644 index 000000000000..4c5041077d83 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discoveryengine/v1beta/session_service_services_pb.rb @@ -0,0 +1,64 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/discoveryengine/v1beta/session_service.proto for package 'Google.Cloud.DiscoveryEngine.V1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1beta/session_service_pb' + +module Google + module Cloud + module DiscoveryEngine + module V1beta + module SessionService + # Service for managing Sessions and Session-related resources. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.discoveryengine.v1beta.SessionService' + + # Creates a Session. + # + # If the [Session][google.cloud.discoveryengine.v1beta.Session] to create + # already exists, an ALREADY_EXISTS error is returned. + rpc :CreateSession, ::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest, ::Google::Cloud::DiscoveryEngine::V1beta::Session + # Deletes a Session. + # + # If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete + # does not exist, a NOT_FOUND error is returned. + rpc :DeleteSession, ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest, ::Google::Protobuf::Empty + # Updates a Session. + # + # [Session][google.cloud.discoveryengine.v1beta.Session] action type cannot + # be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session] + # to update does not exist, a NOT_FOUND error is returned. + rpc :UpdateSession, ::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest, ::Google::Cloud::DiscoveryEngine::V1beta::Session + # Gets a Session. + rpc :GetSession, ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest, ::Google::Cloud::DiscoveryEngine::V1beta::Session + # Lists all Sessions by their parent + # [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + rpc :ListSessions, ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest, ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb b/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb index bb158121abb2..4da859e90c50 100644 --- a/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +++ b/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb @@ -791,6 +791,10 @@ class DeleteSessionRequest # @return [::String] # Required. The resource name of the Session to get. Format: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + # @!attribute [rw] include_answer_details + # @return [::Boolean] + # Optional. If set to true, the full session including all answer details + # will be returned. class GetSessionRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -811,23 +815,40 @@ class GetSessionRequest # Provide this to retrieve the subsequent page. # @!attribute [rw] filter # @return [::String] - # A filter to apply on the list results. The supported features are: - # user_pseudo_id, state. + # A comma-separated list of fields to filter by, in EBNF grammar. + # The supported fields are: + # * `user_pseudo_id` + # * `state` + # * `display_name` + # * `starred` + # * `is_pinned` + # * `labels` + # * `create_time` + # * `update_time` # - # Example: + # Examples: # "user_pseudo_id = some_id" + # "display_name = \"some_name\"" + # "starred = true" + # "is_pinned=true AND (NOT labels:hidden)" + # "create_time > \"1970-01-01T12:00:00Z\"" # @!attribute [rw] order_by # @return [::String] # A comma-separated list of fields to order by, sorted in ascending order. # Use "desc" after a field name for descending. # Supported fields: + # # * `update_time` # * `create_time` # * `session_name` + # * `is_pinned` # # Example: - # "update_time desc" - # "create_time" + # + # * "update_time desc" + # * "create_time" + # * "is_pinned desc,update_time desc": list sessions by is_pinned first, then + # by update_time. class ListSessionsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb b/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb index d8cc0326d0a7..74ad1eb74b85 100644 --- a/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +++ b/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb @@ -286,22 +286,16 @@ module V1beta # between /search API calls and /answer API calls. # # Example #1 (multi-turn /search API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". # # Example #2 (coordination between /search API calls and /answer API calls): - # 1. Call /search API with the auto-session mode (see below). - # 2. Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Auto-session mode: when `projects/.../sessions/-` is used, a new session - # gets automatically created. Otherwise, users can use the create-session API - # to create a session manually. + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. # # Multi-turn Search feature is currently at private GA stage. Please use # v1alpha or v1beta version instead before we launch this feature to public diff --git a/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/session.rb b/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/session.rb index 5f2574a24e5b..f319a4b9db8f 100644 --- a/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +++ b/google-cloud-discovery_engine-v1beta/proto_docs/google/cloud/discoveryengine/v1beta/session.rb @@ -26,6 +26,12 @@ module V1beta # @return [::String] # Immutable. Fully qualified name # `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the session. + # + # This field is used to identify the session in the UI. + # By default, the display name is the first turn query text in the session. # @!attribute [rw] state # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session::State] # The state of the session. @@ -41,6 +47,10 @@ module V1beta # @!attribute [r] end_time # @return [::Google::Protobuf::Timestamp] # Output only. The time the session finished. + # @!attribute [rw] is_pinned + # @return [::Boolean] + # Optional. Whether the session is pinned, pinned session will be displayed + # on the top of the session list. class Session include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -49,16 +59,40 @@ class Session # answer from service. # @!attribute [rw] query # @return [::Google::Cloud::DiscoveryEngine::V1beta::Query] - # The user query. + # Optional. The user query. May not be set if this turn is merely + # regenerating an answer to a different turn # @!attribute [rw] answer # @return [::String] - # The resource name of the answer to the user query. + # Optional. The resource name of the answer to the user query. # # Only set if the answer generation (/answer API call) happened in this # turn. + # @!attribute [r] detailed_answer + # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer] + # Output only. In + # {::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Client#get_session ConversationalSearchService.GetSession} + # API, if + # {::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest#include_answer_details GetSessionRequest.include_answer_details} + # is set to true, this field will be populated when getting answer query + # session. + # @!attribute [rw] query_config + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Represents metadata related to the query config, for example + # LLM model and version used, model parameters (temperature, grounding + # parameters, etc.). The prefix "google." is reserved for Google-developed + # functionality. class Turn include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class QueryConfigEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # Enumeration of the state of the session. @@ -75,9 +109,9 @@ module State # @!attribute [rw] text # @return [::String] # Plain text. - # @!attribute [rw] query_id + # @!attribute [r] query_id # @return [::String] - # Unique Id for the query. + # Output only. Unique Id for the query. class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-discovery_engine-v1beta/snippets/session_service/create_session.rb b/google-cloud-discovery_engine-v1beta/snippets/session_service/create_session.rb new file mode 100644 index 000000000000..d44129b83461 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/snippets/session_service/create_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1beta_generated_SessionService_CreateSession_sync] +require "google/cloud/discovery_engine/v1beta" + +## +# Snippet for the create_session call in the SessionService 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::DiscoveryEngine::V1beta::SessionService::Client#create_session. +# +def create_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest.new + + # Call the create_session method. + result = client.create_session request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + p result +end +# [END discoveryengine_v1beta_generated_SessionService_CreateSession_sync] diff --git a/google-cloud-discovery_engine-v1beta/snippets/session_service/delete_session.rb b/google-cloud-discovery_engine-v1beta/snippets/session_service/delete_session.rb new file mode 100644 index 000000000000..52dd392d681a --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/snippets/session_service/delete_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1beta_generated_SessionService_DeleteSession_sync] +require "google/cloud/discovery_engine/v1beta" + +## +# Snippet for the delete_session call in the SessionService 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::DiscoveryEngine::V1beta::SessionService::Client#delete_session. +# +def delete_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest.new + + # Call the delete_session method. + result = client.delete_session request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END discoveryengine_v1beta_generated_SessionService_DeleteSession_sync] diff --git a/google-cloud-discovery_engine-v1beta/snippets/session_service/get_session.rb b/google-cloud-discovery_engine-v1beta/snippets/session_service/get_session.rb new file mode 100644 index 000000000000..cb75d8e13158 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/snippets/session_service/get_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1beta_generated_SessionService_GetSession_sync] +require "google/cloud/discovery_engine/v1beta" + +## +# Snippet for the get_session call in the SessionService 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::DiscoveryEngine::V1beta::SessionService::Client#get_session. +# +def get_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new + + # Call the get_session method. + result = client.get_session request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + p result +end +# [END discoveryengine_v1beta_generated_SessionService_GetSession_sync] diff --git a/google-cloud-discovery_engine-v1beta/snippets/session_service/list_sessions.rb b/google-cloud-discovery_engine-v1beta/snippets/session_service/list_sessions.rb new file mode 100644 index 000000000000..4eb542d30e5b --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/snippets/session_service/list_sessions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1beta_generated_SessionService_ListSessions_sync] +require "google/cloud/discovery_engine/v1beta" + +## +# Snippet for the list_sessions call in the SessionService 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::DiscoveryEngine::V1beta::SessionService::Client#list_sessions. +# +def list_sessions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest.new + + # Call the list_sessions method. + result = client.list_sessions 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::DiscoveryEngine::V1beta::Session. + p item + end +end +# [END discoveryengine_v1beta_generated_SessionService_ListSessions_sync] diff --git a/google-cloud-discovery_engine-v1beta/snippets/session_service/update_session.rb b/google-cloud-discovery_engine-v1beta/snippets/session_service/update_session.rb new file mode 100644 index 000000000000..337ce9ec13ad --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/snippets/session_service/update_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 discoveryengine_v1beta_generated_SessionService_UpdateSession_sync] +require "google/cloud/discovery_engine/v1beta" + +## +# Snippet for the update_session call in the SessionService 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::DiscoveryEngine::V1beta::SessionService::Client#update_session. +# +def update_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest.new + + # Call the update_session method. + result = client.update_session request + + # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Session. + p result +end +# [END discoveryengine_v1beta_generated_SessionService_UpdateSession_sync] diff --git a/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json b/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json index 2dfb79b7a260..3a419a1edf5f 100644 --- a/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json +++ b/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json @@ -3131,6 +3131,206 @@ } ] }, + { + "region_tag": "discoveryengine_v1beta_generated_SessionService_CreateSession_sync", + "title": "Snippet for the create_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#create_session.", + "file": "session_service/create_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_session", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#create_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1beta::Session", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client" + }, + "method": { + "short_name": "CreateSession", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService.CreateSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1beta_generated_SessionService_DeleteSession_sync", + "title": "Snippet for the delete_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#delete_session.", + "file": "session_service/delete_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_session", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#delete_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client" + }, + "method": { + "short_name": "DeleteSession", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService.DeleteSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1beta_generated_SessionService_UpdateSession_sync", + "title": "Snippet for the update_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#update_session.", + "file": "session_service/update_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_session", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#update_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1beta::Session", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client" + }, + "method": { + "short_name": "UpdateSession", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService.UpdateSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1beta_generated_SessionService_GetSession_sync", + "title": "Snippet for the get_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#get_session.", + "file": "session_service/get_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_session", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#get_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1beta::Session", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client" + }, + "method": { + "short_name": "GetSession", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService.GetSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "discoveryengine_v1beta_generated_SessionService_ListSessions_sync", + "title": "Snippet for the list_sessions call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#list_sessions.", + "file": "session_service/list_sessions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sessions", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client#list_sessions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client" + }, + "method": { + "short_name": "ListSessions", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService.ListSessions", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.discoveryengine.v1beta.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "discoveryengine_v1beta_generated_SiteSearchEngineService_GetSiteSearchEngine_sync", "title": "Snippet for the get_site_search_engine call in the SiteSearchEngineService service", diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_rest_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_rest_test.rb index 9c8df6c0fea0..231261b727eb 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_rest_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_rest_test.rb @@ -708,6 +708,7 @@ def test_get_session # Create request parameters for a unary method. name = "hello world" + include_answer_details = true get_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -723,27 +724,27 @@ def test_get_session end # Use hash object - client.get_session({ name: name }) do |_result, response| + client.get_session({ name: name, include_answer_details: include_answer_details }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.get_session name: name do |_result, response| + client.get_session name: name, include_answer_details: include_answer_details do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.get_session ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name) do |_result, response| + client.get_session ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name, include_answer_details: include_answer_details) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.get_session({ name: name }, call_options) do |_result, response| + client.get_session({ name: name, include_answer_details: include_answer_details }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.get_session(::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name), call_options) do |_result, response| + client.get_session(::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name, include_answer_details: include_answer_details), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_test.rb index 2f1311495517..e527e1d12855 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_test.rb @@ -770,11 +770,13 @@ def test_get_session # Create request parameters for a unary method. name = "hello world" + include_answer_details = true get_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :get_session, name assert_kind_of ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest, request assert_equal "hello world", request["name"] + assert_equal true, request["include_answer_details"] refute_nil options end @@ -785,31 +787,31 @@ def test_get_session end # Use hash object - client.get_session({ name: name }) do |response, operation| + client.get_session({ name: name, include_answer_details: include_answer_details }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.get_session name: name do |response, operation| + client.get_session name: name, include_answer_details: include_answer_details do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.get_session ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name) do |response, operation| + client.get_session ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name, include_answer_details: include_answer_details) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.get_session({ name: name }, grpc_options) do |response, operation| + client.get_session({ name: name, include_answer_details: include_answer_details }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.get_session(::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name), grpc_options) do |response, operation| + client.get_session(::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name, include_answer_details: include_answer_details), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_paths_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_paths_test.rb new file mode 100644 index 000000000000..04a22c41164c --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_paths_test.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discovery_engine/v1beta/session_service" + +class ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::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_answer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.answer_path project: "value0", location: "value1", data_store: "value2", session: "value3", answer: "value4" + assert_equal "projects/value0/locations/value1/dataStores/value2/sessions/value3/answers/value4", path + + path = client.answer_path project: "value0", location: "value1", collection: "value2", data_store: "value3", session: "value4", answer: "value5" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/sessions/value4/answers/value5", path + + path = client.answer_path project: "value0", location: "value1", collection: "value2", engine: "value3", session: "value4", answer: "value5" + assert_equal "projects/value0/locations/value1/collections/value2/engines/value3/sessions/value4/answers/value5", path + end + end + + def test_chunk_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.chunk_path project: "value0", location: "value1", data_store: "value2", branch: "value3", document: "value4", chunk: "value5" + assert_equal "projects/value0/locations/value1/dataStores/value2/branches/value3/documents/value4/chunks/value5", path + + path = client.chunk_path project: "value0", location: "value1", collection: "value2", data_store: "value3", branch: "value4", document: "value5", chunk: "value6" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/branches/value4/documents/value5/chunks/value6", path + end + end + + def test_data_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_store_path project: "value0", location: "value1", data_store: "value2" + assert_equal "projects/value0/locations/value1/dataStores/value2", path + + path = client.data_store_path project: "value0", location: "value1", collection: "value2", data_store: "value3" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3", path + end + end + + def test_document_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.document_path project: "value0", location: "value1", data_store: "value2", branch: "value3", document: "value4" + assert_equal "projects/value0/locations/value1/dataStores/value2/branches/value3/documents/value4", path + + path = client.document_path project: "value0", location: "value1", collection: "value2", data_store: "value3", branch: "value4", document: "value5" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/branches/value4/documents/value5", path + end + end + + def test_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.session_path project: "value0", location: "value1", data_store: "value2", session: "value3" + assert_equal "projects/value0/locations/value1/dataStores/value2/sessions/value3", path + + path = client.session_path project: "value0", location: "value1", collection: "value2", data_store: "value3", session: "value4" + assert_equal "projects/value0/locations/value1/collections/value2/dataStores/value3/sessions/value4", path + + path = client.session_path project: "value0", location: "value1", collection: "value2", engine: "value3", session: "value4" + assert_equal "projects/value0/locations/value1/collections/value2/engines/value3/sessions/value4", path + end + end +end diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_rest_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_rest_test.rb new file mode 100644 index 000000000000..4fab92f14066 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_rest_test.rb @@ -0,0 +1,376 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1beta/session_service_pb" +require "google/cloud/discovery_engine/v1beta/session_service/rest" + + +class ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::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_session + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + session = {} + + create_session_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::DiscoveryEngine::V1beta::SessionService::Rest::ServiceStub.stub :transcode_create_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_session({ parent: parent, session: session }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_session parent: parent, session: session do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_session ::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest.new(parent: parent, session: session) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_session({ parent: parent, session: session }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_session(::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest.new(parent: parent, session: session), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_session_client_stub.call_count + end + end + end + + def test_delete_session + # 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_session_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::DiscoveryEngine::V1beta::SessionService::Rest::ServiceStub.stub :transcode_delete_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_session({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_session name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_session ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_session({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_session(::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_session_client_stub.call_count + end + end + end + + def test_update_session + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + session = {} + update_mask = {} + + update_session_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::DiscoveryEngine::V1beta::SessionService::Rest::ServiceStub.stub :transcode_update_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_session({ session: session, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_session session: session, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_session ::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest.new(session: session, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_session({ session: session, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_session(::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest.new(session: session, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_session_client_stub.call_count + end + end + end + + def test_get_session + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + include_answer_details = true + + get_session_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::DiscoveryEngine::V1beta::SessionService::Rest::ServiceStub.stub :transcode_get_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_session({ name: name, include_answer_details: include_answer_details }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_session name: name, include_answer_details: include_answer_details do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_session ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name, include_answer_details: include_answer_details) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_session({ name: name, include_answer_details: include_answer_details }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_session(::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name, include_answer_details: include_answer_details), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_session_client_stub.call_count + end + end + end + + def test_list_sessions + # Create test objects. + client_result = ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_sessions_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::DiscoveryEngine::V1beta::SessionService::Rest::ServiceStub.stub :transcode_list_sessions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sessions_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sessions ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_sessions(::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sessions_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::DiscoveryEngine::V1beta::SessionService::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::DiscoveryEngine::V1beta::SessionService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_test.rb new file mode 100644 index 000000000000..eeb8961003f0 --- /dev/null +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_test.rb @@ -0,0 +1,394 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/discoveryengine/v1beta/session_service_pb" +require "google/cloud/discoveryengine/v1beta/session_service_services_pb" +require "google/cloud/discovery_engine/v1beta/session_service" + +class ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::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_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1beta::Session.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" + session = {} + + create_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_session, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1beta::Session), request["session"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_session({ parent: parent, session: session }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_session parent: parent, session: session do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_session ::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest.new(parent: parent, session: session) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_session({ parent: parent, session: session }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_session(::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest.new(parent: parent, session: session), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_session_client_stub.call_rpc_count + end + end + + def test_delete_session + # 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_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_session, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_session({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_session name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_session ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_session({ 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_session(::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest.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_session_client_stub.call_rpc_count + end + end + + def test_update_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1beta::Session.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. + session = {} + update_mask = {} + + update_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_session, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1beta::Session), request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_session({ session: session, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_session session: session, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_session ::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest.new(session: session, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_session({ session: session, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_session(::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest.new(session: session, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_session_client_stub.call_rpc_count + end + end + + def test_get_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1beta::Session.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" + include_answer_details = true + + get_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_session, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["include_answer_details"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_session_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_session({ name: name, include_answer_details: include_answer_details }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_session name: name, include_answer_details: include_answer_details do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_session ::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name, include_answer_details: include_answer_details) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_session({ name: name, include_answer_details: include_answer_details }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_session(::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest.new(name: name, include_answer_details: include_answer_details), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_session_client_stub.call_rpc_count + end + end + + def test_list_sessions + # Create GRPC objects. + grpc_response = ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sessions, name + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sessions_client_stub do + # Create client + client = ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_sessions ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_sessions(::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_sessions_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::DiscoveryEngine::V1beta::SessionService::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::DiscoveryEngine::V1beta::SessionService::Client::Configuration, config + end +end From 482735578a5500ec7bc1d5c223e5426aab563d1c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:32:53 -0700 Subject: [PATCH 308/457] feat: add support for new API resources: Issues, IssueComments, PullRequests, PullRequestComments, Blobs (#30724) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: add new UpdateRepository API feat: add support for workforce identity federation in instance docs: remove mention of DataPlane from `ListRepositories` endpoint docs: remove mention of DataPlane from `GetRepository` endpont docs: remove mention of DataPlane from `CreateRepository` endpoint docs: remove mention of DataPlane from `DeleteRepository` endpoint docs: `ca_pool` in message `.google.cloud.securesourcemanager.v1.Instance` is Optional docs: fix typo in `BranchRule` comment docs: A comment for field `requested_cancellation` in message `.google.cloud.securesourcemanager.v1.OperationMetadata` is changed PiperOrigin-RevId: 786353207 Source-Link: https://github.com/googleapis/googleapis/commit/9461532e7d19c8d71709ec3b502e5d81340fb661 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7f10df4015f0c30b46d80ff50818aea1bd923cc0 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyZV9zb3VyY2VfbWFuYWdlci12MS8uT3dsQm90LnlhbWwiLCJoIjoiN2YxMGRmNDAxNWYwYzMwYjQ2ZDgwZmY1MDgxOGFlYTFiZDkyM2NjMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 36 + .../gapic_metadata.json | 180 + .../v1/secure_source_manager.rb | 17 - .../v1/secure_source_manager/client.rb | 4235 ++++++++++++++++- .../v1/secure_source_manager/paths.rb | 109 + .../v1/secure_source_manager/rest.rb | 17 - .../v1/secure_source_manager/rest/client.rb | 3967 ++++++++++++++- .../rest/service_stub.rb | 2407 +++++++++- .../v1/secure_source_manager_pb.rb | 69 +- .../v1/secure_source_manager_services_pb.rb | 99 +- .../v1/secure_source_manager.rb | 1083 ++++- .../batch_create_pull_request_comments.rb | 54 + .../secure_source_manager/close_issue.rb | 54 + .../close_pull_request.rb | 54 + .../secure_source_manager/create_hook.rb | 54 + .../secure_source_manager/create_issue.rb | 54 + .../create_issue_comment.rb | 54 + .../create_pull_request.rb | 54 + .../create_pull_request_comment.rb | 54 + .../secure_source_manager/delete_hook.rb | 54 + .../secure_source_manager/delete_issue.rb | 54 + .../delete_issue_comment.rb | 54 + .../delete_pull_request_comment.rb | 54 + .../secure_source_manager/fetch_blob.rb | 47 + .../secure_source_manager/fetch_tree.rb | 51 + .../secure_source_manager/get_hook.rb | 47 + .../secure_source_manager/get_issue.rb | 47 + .../get_issue_comment.rb | 47 + .../secure_source_manager/get_pull_request.rb | 47 + .../get_pull_request_comment.rb | 47 + .../secure_source_manager/list_hooks.rb | 51 + .../list_issue_comments.rb | 51 + .../secure_source_manager/list_issues.rb | 51 + .../list_pull_request_comments.rb | 51 + .../list_pull_request_file_diffs.rb | 51 + .../list_pull_requests.rb | 51 + .../merge_pull_request.rb | 54 + .../secure_source_manager/open_issue.rb | 54 + .../open_pull_request.rb | 54 + .../resolve_pull_request_comments.rb | 54 + .../unresolve_pull_request_comments.rb | 54 + .../secure_source_manager/update_hook.rb | 54 + .../secure_source_manager/update_issue.rb | 54 + .../update_issue_comment.rb | 54 + .../update_pull_request.rb | 54 + .../update_pull_request_comment.rb | 54 + .../update_repository.rb | 54 + ...a_google.cloud.securesourcemanager.v1.json | 1440 ++++++ .../v1/secure_source_manager_paths_test.rb | 60 + .../v1/secure_source_manager_rest_test.rb | 2191 ++++++++- .../v1/secure_source_manager_test.rb | 2650 ++++++++++- 51 files changed, 19498 insertions(+), 943 deletions(-) create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb create mode 100644 google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb diff --git a/google-cloud-secure_source_manager-v1/.owlbot-manifest.json b/google-cloud-secure_source_manager-v1/.owlbot-manifest.json index e66b05c5c6c6..0c5f6b7657f0 100644 --- a/google-cloud-secure_source_manager-v1/.owlbot-manifest.json +++ b/google-cloud-secure_source_manager-v1/.owlbot-manifest.json @@ -44,22 +44,58 @@ "proto_docs/google/rpc/status.rb", "proto_docs/google/type/expr.rb", "snippets/Gemfile", + "snippets/secure_source_manager/batch_create_pull_request_comments.rb", + "snippets/secure_source_manager/close_issue.rb", + "snippets/secure_source_manager/close_pull_request.rb", "snippets/secure_source_manager/create_branch_rule.rb", + "snippets/secure_source_manager/create_hook.rb", "snippets/secure_source_manager/create_instance.rb", + "snippets/secure_source_manager/create_issue.rb", + "snippets/secure_source_manager/create_issue_comment.rb", + "snippets/secure_source_manager/create_pull_request.rb", + "snippets/secure_source_manager/create_pull_request_comment.rb", "snippets/secure_source_manager/create_repository.rb", "snippets/secure_source_manager/delete_branch_rule.rb", + "snippets/secure_source_manager/delete_hook.rb", "snippets/secure_source_manager/delete_instance.rb", + "snippets/secure_source_manager/delete_issue.rb", + "snippets/secure_source_manager/delete_issue_comment.rb", + "snippets/secure_source_manager/delete_pull_request_comment.rb", "snippets/secure_source_manager/delete_repository.rb", + "snippets/secure_source_manager/fetch_blob.rb", + "snippets/secure_source_manager/fetch_tree.rb", "snippets/secure_source_manager/get_branch_rule.rb", + "snippets/secure_source_manager/get_hook.rb", "snippets/secure_source_manager/get_iam_policy_repo.rb", "snippets/secure_source_manager/get_instance.rb", + "snippets/secure_source_manager/get_issue.rb", + "snippets/secure_source_manager/get_issue_comment.rb", + "snippets/secure_source_manager/get_pull_request.rb", + "snippets/secure_source_manager/get_pull_request_comment.rb", "snippets/secure_source_manager/get_repository.rb", "snippets/secure_source_manager/list_branch_rules.rb", + "snippets/secure_source_manager/list_hooks.rb", "snippets/secure_source_manager/list_instances.rb", + "snippets/secure_source_manager/list_issue_comments.rb", + "snippets/secure_source_manager/list_issues.rb", + "snippets/secure_source_manager/list_pull_request_comments.rb", + "snippets/secure_source_manager/list_pull_request_file_diffs.rb", + "snippets/secure_source_manager/list_pull_requests.rb", "snippets/secure_source_manager/list_repositories.rb", + "snippets/secure_source_manager/merge_pull_request.rb", + "snippets/secure_source_manager/open_issue.rb", + "snippets/secure_source_manager/open_pull_request.rb", + "snippets/secure_source_manager/resolve_pull_request_comments.rb", "snippets/secure_source_manager/set_iam_policy_repo.rb", "snippets/secure_source_manager/test_iam_permissions_repo.rb", + "snippets/secure_source_manager/unresolve_pull_request_comments.rb", "snippets/secure_source_manager/update_branch_rule.rb", + "snippets/secure_source_manager/update_hook.rb", + "snippets/secure_source_manager/update_issue.rb", + "snippets/secure_source_manager/update_issue_comment.rb", + "snippets/secure_source_manager/update_pull_request.rb", + "snippets/secure_source_manager/update_pull_request_comment.rb", + "snippets/secure_source_manager/update_repository.rb", "snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json", "test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb", "test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb", diff --git a/google-cloud-secure_source_manager-v1/gapic_metadata.json b/google-cloud-secure_source_manager-v1/gapic_metadata.json index 7b866d9df7ee..cb4bf595a281 100644 --- a/google-cloud-secure_source_manager-v1/gapic_metadata.json +++ b/google-cloud-secure_source_manager-v1/gapic_metadata.json @@ -45,11 +45,41 @@ "create_repository" ] }, + "UpdateRepository": { + "methods": [ + "update_repository" + ] + }, "DeleteRepository": { "methods": [ "delete_repository" ] }, + "ListHooks": { + "methods": [ + "list_hooks" + ] + }, + "GetHook": { + "methods": [ + "get_hook" + ] + }, + "CreateHook": { + "methods": [ + "create_hook" + ] + }, + "UpdateHook": { + "methods": [ + "update_hook" + ] + }, + "DeleteHook": { + "methods": [ + "delete_hook" + ] + }, "GetIamPolicyRepo": { "methods": [ "get_iam_policy_repo" @@ -89,6 +119,156 @@ "methods": [ "delete_branch_rule" ] + }, + "CreatePullRequest": { + "methods": [ + "create_pull_request" + ] + }, + "GetPullRequest": { + "methods": [ + "get_pull_request" + ] + }, + "ListPullRequests": { + "methods": [ + "list_pull_requests" + ] + }, + "UpdatePullRequest": { + "methods": [ + "update_pull_request" + ] + }, + "MergePullRequest": { + "methods": [ + "merge_pull_request" + ] + }, + "OpenPullRequest": { + "methods": [ + "open_pull_request" + ] + }, + "ClosePullRequest": { + "methods": [ + "close_pull_request" + ] + }, + "ListPullRequestFileDiffs": { + "methods": [ + "list_pull_request_file_diffs" + ] + }, + "FetchTree": { + "methods": [ + "fetch_tree" + ] + }, + "FetchBlob": { + "methods": [ + "fetch_blob" + ] + }, + "CreateIssue": { + "methods": [ + "create_issue" + ] + }, + "GetIssue": { + "methods": [ + "get_issue" + ] + }, + "ListIssues": { + "methods": [ + "list_issues" + ] + }, + "UpdateIssue": { + "methods": [ + "update_issue" + ] + }, + "DeleteIssue": { + "methods": [ + "delete_issue" + ] + }, + "OpenIssue": { + "methods": [ + "open_issue" + ] + }, + "CloseIssue": { + "methods": [ + "close_issue" + ] + }, + "GetPullRequestComment": { + "methods": [ + "get_pull_request_comment" + ] + }, + "ListPullRequestComments": { + "methods": [ + "list_pull_request_comments" + ] + }, + "CreatePullRequestComment": { + "methods": [ + "create_pull_request_comment" + ] + }, + "UpdatePullRequestComment": { + "methods": [ + "update_pull_request_comment" + ] + }, + "DeletePullRequestComment": { + "methods": [ + "delete_pull_request_comment" + ] + }, + "BatchCreatePullRequestComments": { + "methods": [ + "batch_create_pull_request_comments" + ] + }, + "ResolvePullRequestComments": { + "methods": [ + "resolve_pull_request_comments" + ] + }, + "UnresolvePullRequestComments": { + "methods": [ + "unresolve_pull_request_comments" + ] + }, + "CreateIssueComment": { + "methods": [ + "create_issue_comment" + ] + }, + "GetIssueComment": { + "methods": [ + "get_issue_comment" + ] + }, + "ListIssueComments": { + "methods": [ + "list_issue_comments" + ] + }, + "UpdateIssueComment": { + "methods": [ + "update_issue_comment" + ] + }, + "DeleteIssueComment": { + "methods": [ + "delete_issue_comment" + ] } } } diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb index 0ac61b36498b..f56f049be934 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb @@ -37,23 +37,6 @@ module V1 # # Access Secure Source Manager instances, resources, and repositories. # - # This API is split across two servers: the Control Plane and the Data Plane. - # - # Data Plane endpoints are hosted directly by your Secure Source Manager - # instance, so you must connect to your instance's API hostname to access - # them. The API hostname looks like the following: - # - # https://[instance-id]-[project-number]-api.[location].sourcemanager.dev - # - # For example, - # - # https://my-instance-702770452863-api.us-central1.sourcemanager.dev - # - # Data Plane endpoints are denoted with **Host: Data Plane**. - # - # All other endpoints are found in the normal Cloud API location, namely, - # `securcesourcemanager.googleapis.com`. - # # @example Load this service and instantiate a gRPC client # # require "google/cloud/secure_source_manager/v1/secure_source_manager" diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb index 32245397a917..0cde142708b4 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb @@ -33,23 +33,6 @@ module SecureSourceManager # # Access Secure Source Manager instances, resources, and repositories. # - # This API is split across two servers: the Control Plane and the Data Plane. - # - # Data Plane endpoints are hosted directly by your Secure Source Manager - # instance, so you must connect to your instance's API hostname to access - # them. The API hostname looks like the following: - # - # https://[instance-id]-[project-number]-api.[location].sourcemanager.dev - # - # For example, - # - # https://my-instance-702770452863-api.us-central1.sourcemanager.dev - # - # Data Plane endpoints are denoted with **Host: Data Plane**. - # - # All other endpoints are found in the normal Cloud API location, namely, - # `securcesourcemanager.googleapis.com`. - # class Client # @private API_VERSION = "" @@ -681,7 +664,8 @@ def delete_instance request, options = nil ## # Lists Repositories in a given project and location. # - # **Host: Data Plane** + # The instance field is required in the query parameter for requests using + # the securesourcemanager.googleapis.com endpoint. # # @overload list_repositories(request, options = nil) # Pass arguments to `list_repositories` via a request object, either of type @@ -711,10 +695,9 @@ def delete_instance request, options = nil # Optional. The name of the instance in which the repository is hosted, # formatted as # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # When listing repositories via - # securesourcemanager.googleapis.com (Control Plane API), this field is - # required. When listing repositories via *.sourcemanager.dev (Data Plane - # API), this field is ignored. + # When listing repositories via securesourcemanager.googleapis.com, this + # field is required. When listing repositories via *.sourcemanager.dev, this + # field is ignored. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] @@ -789,8 +772,6 @@ def list_repositories request, options = nil ## # Gets metadata of a repository. # - # **Host: Data Plane** - # # @overload get_repository(request, options = nil) # Pass arguments to `get_repository` via a request object, either of type # {::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest} or an equivalent Hash. @@ -878,7 +859,8 @@ def get_repository request, options = nil ## # Creates a new repository in a given project and location. # - # **Host: Data Plane** + # The Repository.Instance field is required in the request body for requests + # using the securesourcemanager.googleapis.com endpoint. # # @overload create_repository(request, options = nil) # Pass arguments to `create_repository` via a request object, either of type @@ -979,32 +961,34 @@ def create_repository request, options = nil end ## - # Deletes a Repository. - # - # **Host: Data Plane** + # Updates the metadata of a repository. # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash. + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::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_repository(name: nil, allow_missing: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at + # @overload update_repository(update_mask: nil, repository: nil, validate_only: nil) + # Pass arguments to `update_repository` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # - # @param name [::String] - # Required. Name of the repository to delete. - # The format is - # projects/\\{project_number}/locations/\\{location_id}/repositories/\\{repository_id}. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the repository is not found, the request will - # succeed but no action will be taken on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # repository resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] + # Required. The repository being updated. + # @param validate_only [::Boolean] + # Optional. False by default. If set to true, the request is validated and + # the user is provided with an expected result, but no actual change is made. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -1021,10 +1005,10 @@ def create_repository request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new + # request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new # - # # Call the delete_repository method. - # result = client.delete_repository request + # # Call the update_repository method. + # result = client.update_repository request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -1036,16 +1020,16 @@ def create_repository request, options = nil # puts "No response received." # end # - def delete_repository request, options = nil + def update_repository request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest # 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_repository.metadata.to_h + metadata = @config.rpcs.update_repository.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 \ @@ -1055,22 +1039,22 @@ def delete_repository request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.name - header_params["name"] = request.name + if request.repository&.name + header_params["repository.name"] = request.repository.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_repository.timeout, + options.apply_defaults timeout: @config.rpcs.update_repository.timeout, metadata: metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy + retry_policy: @config.rpcs.update_repository.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :delete_repository, request, options: options do |response, operation| + @secure_source_manager_stub.call_rpc :update_repository, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? throw :response, response @@ -1080,35 +1064,36 @@ def delete_repository request, options = nil end ## - # Get IAM policy for a repository. + # Deletes a Repository. # - # @overload get_iam_policy_repo(request, options = nil) - # Pass arguments to `get_iam_policy_repo` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::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_iam_policy_repo(resource: nil, options: nil) - # Pass arguments to `get_iam_policy_repo` via keyword arguments. Note that at + # @overload delete_repository(name: nil, allow_missing: nil) + # Pass arguments to `delete_repository` 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 resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. + # @param name [::String] + # Required. Name of the repository to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the repository is not found, the request will + # succeed but no action will be taken on the server. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -1119,24 +1104,31 @@ def delete_repository request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new + # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new # - # # Call the get_iam_policy_repo method. - # result = client.get_iam_policy_repo request + # # Call the delete_repository method. + # result = client.delete_repository request # - # # The returned object is of type Google::Iam::V1::Policy. - # p result + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end # - def get_iam_policy_repo request, options = nil + def delete_repository request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest # 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_iam_policy_repo.metadata.to_h + metadata = @config.rpcs.delete_repository.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 \ @@ -1146,66 +1138,61 @@ def get_iam_policy_repo request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.resource - header_params["resource"] = request.resource + 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_iam_policy_repo.timeout, + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy + retry_policy: @config.rpcs.delete_repository.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :get_iam_policy_repo, request, options: options do |response, operation| + @secure_source_manager_stub.call_rpc :delete_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? + throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## - # Set IAM policy on a repository. + # Lists hooks in a given repository. # - # @overload set_iam_policy_repo(request, options = nil) - # Pass arguments to `set_iam_policy_repo` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # @overload list_hooks(request, options = nil) + # Pass arguments to `list_hooks` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListHooksRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::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 set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy_repo` via keyword arguments. Note that at + # @overload list_hooks(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_hooks` 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 resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` + # @param parent [::String] + # Required. Parent value for ListHooksRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -1216,24 +1203,28 @@ def get_iam_policy_repo request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new + # request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new # - # # Call the set_iam_policy_repo method. - # result = client.set_iam_policy_repo request + # # Call the list_hooks method. + # result = client.list_hooks request # - # # The returned object is of type Google::Iam::V1::Policy. - # p result + # # 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::SecureSourceManager::V1::Hook. + # p item + # end # - def set_iam_policy_repo request, options = nil + def list_hooks request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest # 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.set_iam_policy_repo.metadata.to_h + metadata = @config.rpcs.list_hooks.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 \ @@ -1243,61 +1234,58 @@ def set_iam_policy_repo request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.resource - header_params["resource"] = request.resource + 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.set_iam_policy_repo.timeout, + options.apply_defaults timeout: @config.rpcs.list_hooks.timeout, metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy + retry_policy: @config.rpcs.list_hooks.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :set_iam_policy_repo, request, options: options do |response, operation| + @secure_source_manager_stub.call_rpc :list_hooks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, 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 ## - # Test IAM permissions on a repository. - # IAM permission checks are not required on this method. + # Gets metadata of a hook. # - # @overload test_iam_permissions_repo(request, options = nil) - # Pass arguments to `test_iam_permissions_repo` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # @overload get_hook(request, options = nil) + # Pass arguments to `get_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetHookRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::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 test_iam_permissions_repo(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions_repo` via keyword arguments. Note that at + # @overload get_hook(name: nil) + # Pass arguments to `get_hook` 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 resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @param name [::String] + # Required. Name of the hook to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Hook] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -1308,24 +1296,24 @@ def set_iam_policy_repo request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new + # request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new # - # # Call the test_iam_permissions_repo method. - # result = client.test_iam_permissions_repo request + # # Call the get_hook method. + # result = client.get_hook request # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. # p result # - def test_iam_permissions_repo request, options = nil + def get_hook request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetHookRequest # 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.test_iam_permissions_repo.metadata.to_h + metadata = @config.rpcs.get_hook.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 \ @@ -1335,22 +1323,22 @@ def test_iam_permissions_repo request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.resource - header_params["resource"] = request.resource + 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.test_iam_permissions_repo.timeout, + options.apply_defaults timeout: @config.rpcs.get_hook.timeout, metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy + retry_policy: @config.rpcs.get_hook.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :test_iam_permissions_repo, request, options: options do |response, operation| + @secure_source_manager_stub.call_rpc :get_hook, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1358,26 +1346,34 @@ def test_iam_permissions_repo request, options = nil end ## - # CreateBranchRule creates a branch rule in a given repository. + # Creates a new hook in a given repository. # - # @overload create_branch_rule(request, options = nil) - # Pass arguments to `create_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash. + # @overload create_hook(request, options = nil) + # Pass arguments to `create_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateHookRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::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_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) - # Pass arguments to `create_branch_rule` via keyword arguments. Note that at + # @overload create_hook(parent: nil, hook: nil, hook_id: nil) + # Pass arguments to `create_hook` 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] - # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] - # @param branch_rule_id [::String] + # Required. The repository in which to create the hook. Values are of the + # form + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] + # Required. The resource being created. + # @param hook_id [::String] + # Required. The ID to use for the hook, which will become the final component + # of the hook's resource name. This value restricts to lower-case letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -1394,10 +1390,10 @@ def test_iam_permissions_repo request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new + # request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new # - # # Call the create_branch_rule method. - # result = client.create_branch_rule request + # # Call the create_hook method. + # result = client.create_hook request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -1409,16 +1405,16 @@ def test_iam_permissions_repo request, options = nil # puts "No response received." # end # - def create_branch_rule request, options = nil + def create_hook request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest # 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_branch_rule.metadata.to_h + metadata = @config.rpcs.create_hook.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 \ @@ -1435,15 +1431,15 @@ def create_branch_rule request, options = nil 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_branch_rule.timeout, + options.apply_defaults timeout: @config.rpcs.create_hook.timeout, metadata: metadata, - retry_policy: @config.rpcs.create_branch_rule.retry_policy + retry_policy: @config.rpcs.create_hook.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :create_branch_rule, request, options: options do |response, operation| + @secure_source_manager_stub.call_rpc :create_hook, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? throw :response, response @@ -1453,32 +1449,37 @@ def create_branch_rule request, options = nil end ## - # ListBranchRules lists branch rules in a given repository. + # Updates the metadata of a hook. # - # @overload list_branch_rules(request, options = nil) - # Pass arguments to `list_branch_rules` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash. + # @overload update_hook(request, options = nil) + # Pass arguments to `update_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::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_branch_rules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_branch_rules` via keyword arguments. Note that at + # @overload update_hook(update_mask: nil, hook: nil) + # Pass arguments to `update_hook` 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] - # @param page_size [::Integer] - # @param page_token [::String] + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # hook resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] + # Required. The hook being updated. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -1489,28 +1490,31 @@ def create_branch_rule request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new + # request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new # - # # Call the list_branch_rules method. - # result = client.list_branch_rules request + # # Call the update_hook method. + # result = client.update_hook 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::SecureSourceManager::V1::BranchRule. - # p item + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." # end # - def list_branch_rules request, options = nil + def update_hook request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest # 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_branch_rules.metadata.to_h + metadata = @config.rpcs.update_hook.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 \ @@ -1520,23 +1524,23 @@ def list_branch_rules request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.parent - header_params["parent"] = request.parent + if request.hook&.name + header_params["hook.name"] = request.hook.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.list_branch_rules.timeout, + options.apply_defaults timeout: @config.rpcs.update_hook.timeout, metadata: metadata, - retry_policy: @config.rpcs.list_branch_rules.retry_policy + retry_policy: @config.rpcs.update_hook.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :list_branch_rules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, request, response, operation, options + @secure_source_manager_stub.call_rpc :update_hook, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? throw :response, response end @@ -1545,33 +1549,3405 @@ def list_branch_rules request, options = nil end ## - # GetBranchRule gets a branch rule. + # Deletes a Hook. # - # @overload get_branch_rule(request, options = nil) - # Pass arguments to `get_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash. + # @overload delete_hook(request, options = nil) + # Pass arguments to `delete_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::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_branch_rule(name: nil) + # @overload delete_hook(name: nil) + # Pass arguments to `delete_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the hook to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new + # + # # Call the delete_hook method. + # result = client.delete_hook request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest + + # 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_hook.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_hook.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_hook, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get IAM policy for a repository. + # + # @overload get_iam_policy_repo(request, options = nil) + # Pass arguments to `get_iam_policy_repo` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::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_iam_policy_repo(resource: nil, options: nil) + # Pass arguments to `get_iam_policy_repo` 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 resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy_repo method. + # result = client.get_iam_policy_repo request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # 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_iam_policy_repo.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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_iam_policy_repo.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_iam_policy_repo, 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 + + ## + # Set IAM policy on a repository. + # + # @overload set_iam_policy_repo(request, options = nil) + # Pass arguments to `set_iam_policy_repo` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::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 set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy_repo` 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 resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy_repo method. + # result = client.set_iam_policy_repo request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # 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.set_iam_policy_repo.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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.set_iam_policy_repo.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :set_iam_policy_repo, 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 + + ## + # Test IAM permissions on a repository. + # IAM permission checks are not required on this method. + # + # @overload test_iam_permissions_repo(request, options = nil) + # Pass arguments to `test_iam_permissions_repo` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::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 test_iam_permissions_repo(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions_repo` 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 resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions_repo method. + # result = client.test_iam_permissions_repo request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # 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.test_iam_permissions_repo.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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.test_iam_permissions_repo.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :test_iam_permissions_repo, 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 + + ## + # CreateBranchRule creates a branch rule in a given repository. + # + # @overload create_branch_rule(request, options = nil) + # Pass arguments to `create_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::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_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) + # Pass arguments to `create_branch_rule` 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] + # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] + # @param branch_rule_id [::String] + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new + # + # # Call the create_branch_rule method. + # result = client.create_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest + + # 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_branch_rule.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_branch_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_branch_rule, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # ListBranchRules lists branch rules in a given repository. + # + # @overload list_branch_rules(request, options = nil) + # Pass arguments to `list_branch_rules` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::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_branch_rules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_branch_rules` 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] + # @param page_size [::Integer] + # @param page_token [::String] + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new + # + # # Call the list_branch_rules method. + # result = client.list_branch_rules 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::SecureSourceManager::V1::BranchRule. + # p item + # end + # + def list_branch_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest + + # 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_branch_rules.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_branch_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_branch_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_branch_rules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, 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 + + ## + # GetBranchRule gets a branch rule. + # + # @overload get_branch_rule(request, options = nil) + # Pass arguments to `get_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::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_branch_rule(name: nil) # Pass arguments to `get_branch_rule` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. Name of the repository to retrieve. + # Required. Name of the repository to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new + # + # # Call the get_branch_rule method. + # result = client.get_branch_rule request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. + # p result + # + def get_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest + + # 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_branch_rule.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_branch_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_branch_rule, 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 + + ## + # UpdateBranchRule updates a branch rule. + # + # @overload update_branch_rule(request, options = nil) + # Pass arguments to `update_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::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 update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_branch_rule` 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 branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually post it. (https://google.aip.dev/163, for declarative friendly) + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # branchRule resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new + # + # # Call the update_branch_rule method. + # result = client.update_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest + + # 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.update_branch_rule.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.branch_rule&.name + header_params["branch_rule.name"] = request.branch_rule.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.update_branch_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_branch_rule, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # DeleteBranchRule deletes a branch rule. + # + # @overload delete_branch_rule(request, options = nil) + # Pass arguments to `delete_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::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_branch_rule(name: nil, allow_missing: nil) + # Pass arguments to `delete_branch_rule` 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] + # @param allow_missing [::Boolean] + # Optional. If set to true, and the branch rule is not found, the request + # will succeed but no action will be taken on the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new + # + # # Call the delete_branch_rule method. + # result = client.delete_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest + + # 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_branch_rule.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_branch_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_branch_rule, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a pull request. + # + # @overload create_pull_request(request, options = nil) + # Pass arguments to `create_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::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_pull_request(parent: nil, pull_request: nil) + # Pass arguments to `create_pull_request` 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 repository that the pull request is created from. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] + # Required. The pull request to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new + # + # # Call the create_pull_request method. + # result = client.create_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest + + # 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_pull_request.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a pull request. + # + # @overload get_pull_request(request, options = nil) + # Pass arguments to `get_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::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_pull_request(name: nil) + # Pass arguments to `get_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new + # + # # Call the get_pull_request method. + # result = client.get_pull_request request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. + # p result + # + def get_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest + + # 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_pull_request.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_pull_request, 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 pull requests in a repository. + # + # @overload list_pull_requests(request, options = nil) + # Pass arguments to `list_pull_requests` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::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_pull_requests(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_requests` 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 repository in which to list pull requests. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new + # + # # Call the list_pull_requests method. + # result = client.list_pull_requests 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::SecureSourceManager::V1::PullRequest. + # p item + # end + # + def list_pull_requests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest + + # 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_pull_requests.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_pull_requests.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_pull_requests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_pull_requests, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, 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 + + ## + # Updates a pull request. + # + # @overload update_pull_request(request, options = nil) + # Pass arguments to `update_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::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 update_pull_request(pull_request: nil, update_mask: nil) + # Pass arguments to `update_pull_request` 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 pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] + # Required. The pull request to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new + # + # # Call the update_pull_request method. + # result = client.update_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest + + # 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.update_pull_request.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.pull_request&.name + header_params["pull_request.name"] = request.pull_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.update_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Merges a pull request. + # + # @overload merge_pull_request(request, options = nil) + # Pass arguments to `merge_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::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 merge_pull_request(name: nil) + # Pass arguments to `merge_pull_request` 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 pull request to merge. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new + # + # # Call the merge_pull_request method. + # result = client.merge_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def merge_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest + + # 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.merge_pull_request.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.merge_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.merge_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :merge_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Opens a pull request. + # + # @overload open_pull_request(request, options = nil) + # Pass arguments to `open_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::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 open_pull_request(name: nil) + # Pass arguments to `open_pull_request` 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 pull request to open. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new + # + # # Call the open_pull_request method. + # result = client.open_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def open_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest + + # 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.open_pull_request.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.open_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.open_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :open_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Closes a pull request without merging. + # + # @overload close_pull_request(request, options = nil) + # Pass arguments to `close_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::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 close_pull_request(name: nil) + # Pass arguments to `close_pull_request` 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 pull request to close. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new + # + # # Call the close_pull_request method. + # result = client.close_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def close_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest + + # 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.close_pull_request.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.close_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.close_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :close_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a pull request's file diffs. + # + # @overload list_pull_request_file_diffs(request, options = nil) + # Pass arguments to `list_pull_request_file_diffs` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::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_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_request_file_diffs` 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 pull request to list file diffs for. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new + # + # # Call the list_pull_request_file_diffs method. + # result = client.list_pull_request_file_diffs 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::SecureSourceManager::V1::FileDiff. + # p item + # end + # + def list_pull_request_file_diffs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest + + # 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_pull_request_file_diffs.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_pull_request_file_diffs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_pull_request_file_diffs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_pull_request_file_diffs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, 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 + + ## + # Fetches a tree from a repository. + # + # @overload fetch_tree(request, options = nil) + # Pass arguments to `fetch_tree` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::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 fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_tree` 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 repository [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository to fetch the tree from. + # @param ref [::String] + # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + # which tree to fetch. If not specified, the default branch will be used. + # @param recursive [::Boolean] + # Optional. If true, include all subfolders and their files in the response. + # If false, only the immediate children are returned. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, at most 10,000 items will be returned. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new + # + # # Call the fetch_tree method. + # result = client.fetch_tree 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::SecureSourceManager::V1::TreeEntry. + # p item + # end + # + def fetch_tree request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest + + # 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.fetch_tree.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.repository + header_params["repository"] = request.repository + 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.fetch_tree.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_tree.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :fetch_tree, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, 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 + + ## + # Fetches a blob from a repository. + # + # @overload fetch_blob(request, options = nil) + # Pass arguments to `fetch_blob` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::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 fetch_blob(repository: nil, sha: nil) + # Pass arguments to `fetch_blob` 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 repository [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository containing the blob. + # @param sha [::String] + # Required. The SHA-1 hash of the blob to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new + # + # # Call the fetch_blob method. + # result = client.fetch_blob request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. + # p result + # + def fetch_blob request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest + + # 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.fetch_blob.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.repository + header_params["repository"] = request.repository + 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.fetch_blob.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_blob.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :fetch_blob, 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 + + ## + # Creates an issue. + # + # @overload create_issue(request, options = nil) + # Pass arguments to `create_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::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_issue(parent: nil, issue: nil) + # Pass arguments to `create_issue` 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 repository in which to create the issue. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] + # Required. The issue to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new + # + # # Call the create_issue method. + # result = client.create_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest + + # 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_issue.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue. + # + # @overload get_issue(request, options = nil) + # Pass arguments to `get_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::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_issue(name: nil) + # Pass arguments to `get_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Issue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new + # + # # Call the get_issue method. + # result = client.get_issue request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. + # p result + # + def get_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest + + # 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_issue.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_issue, 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 issues in a repository. + # + # @overload list_issues(request, options = nil) + # Pass arguments to `list_issues` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::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_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_issues` 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 repository in which to list issues. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Used to filter the resulting issues list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new + # + # # Call the list_issues method. + # result = client.list_issues 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::SecureSourceManager::V1::Issue. + # p item + # end + # + def list_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest + + # 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_issues.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_issues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_issues, 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 + + ## + # Updates a issue. + # + # @overload update_issue(request, options = nil) + # Pass arguments to `update_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::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 update_issue(issue: nil, update_mask: nil) + # Pass arguments to `update_issue` 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 issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] + # Required. The issue to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new + # + # # Call the update_issue method. + # result = client.update_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest + + # 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.update_issue.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.issue&.name + header_params["issue.name"] = request.issue.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.update_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue. + # + # @overload delete_issue(request, options = nil) + # Pass arguments to `delete_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::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_issue(name: nil, etag: nil) + # Pass arguments to `delete_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # deletion will be blocked and an ABORTED error will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new + # + # # Call the delete_issue method. + # result = client.delete_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest + + # 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_issue.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Opens an issue. + # + # @overload open_issue(request, options = nil) + # Pass arguments to `open_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::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 open_issue(name: nil, etag: nil) + # Pass arguments to `open_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to open. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # opening will be blocked and an ABORTED error will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new + # + # # Call the open_issue method. + # result = client.open_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def open_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest + + # 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.open_issue.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.open_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.open_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :open_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Closes an issue. + # + # @overload close_issue(request, options = nil) + # Pass arguments to `close_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::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 close_issue(name: nil, etag: nil) + # Pass arguments to `close_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to close. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # closing will be blocked and an ABORTED error will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new + # + # # Call the close_issue method. + # result = client.close_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def close_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest + + # 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.close_issue.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.close_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.close_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :close_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a pull request comment. + # + # @overload get_pull_request_comment(request, options = nil) + # Pass arguments to `get_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::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_pull_request_comment(name: nil) + # Pass arguments to `get_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request comment to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new + # + # # Call the get_pull_request_comment method. + # result = client.get_pull_request_comment request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. + # p result + # + def get_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest + + # 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_pull_request_comment.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_pull_request_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_pull_request_comment, 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 pull request comments. + # + # @overload list_pull_request_comments(request, options = nil) + # Pass arguments to `list_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::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_pull_request_comments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_request_comments` 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 pull request in which to list pull request comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, at most 100 pull request + # comments will be returned. The maximum value is 100; values above 100 will + # be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new + # + # # Call the list_pull_request_comments method. + # result = client.list_pull_request_comments 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::SecureSourceManager::V1::PullRequestComment. + # p item + # end + # + def list_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest + + # 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_pull_request_comments.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_pull_request_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_pull_request_comments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, 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 + + ## + # Creates a pull request comment. + # + # @overload create_pull_request_comment(request, options = nil) + # Pass arguments to `create_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::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_pull_request_comment(parent: nil, pull_request_comment: nil) + # Pass arguments to `create_pull_request_comment` 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 pull request in which to create the pull request comment. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] + # Required. The pull request comment to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new + # + # # Call the create_pull_request_comment method. + # result = client.create_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest + + # 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_pull_request_comment.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_pull_request_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_pull_request_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a pull request comment. + # + # @overload update_pull_request_comment(request, options = nil) + # Pass arguments to `update_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::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 update_pull_request_comment(pull_request_comment: nil, update_mask: nil) + # Pass arguments to `update_pull_request_comment` 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 pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] + # Required. The pull request comment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request comment resource by the update. Updatable fields are + # `body`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new + # + # # Call the update_pull_request_comment method. + # result = client.update_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest + + # 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.update_pull_request_comment.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.pull_request_comment&.name + header_params["pull_request_comment.name"] = request.pull_request_comment.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.update_pull_request_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_pull_request_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 pull request comment. + # + # @overload delete_pull_request_comment(request, options = nil) + # Pass arguments to `delete_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::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_pull_request_comment(name: nil) + # Pass arguments to `delete_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new + # + # # Call the delete_pull_request_comment method. + # result = client.delete_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest + + # 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_pull_request_comment.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_pull_request_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_pull_request_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Batch creates pull request comments. + # + # @overload batch_create_pull_request_comments(request, options = nil) + # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_create_pull_request_comments(parent: nil, requests: nil) + # Pass arguments to `batch_create_pull_request_comments` 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 pull request in which to create the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param requests [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>] + # Required. The request message specifying the resources to create. There + # should be exactly one CreatePullRequestCommentRequest with CommentDetail + # being REVIEW in the list, and no more than 100 + # CreatePullRequestCommentRequests with CommentDetail being CODE in the list + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new + # + # # Call the batch_create_pull_request_comments method. + # result = client.batch_create_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_create_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_create_pull_request_comments.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_create_pull_request_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :batch_create_pull_request_comments, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resolves pull request comments. + # + # @overload resolve_pull_request_comments(request, options = nil) + # Pass arguments to `resolve_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::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 resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) + # Pass arguments to `resolve_pull_request_comments` 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 pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param names [::Array<::String>] + # Required. The names of the pull request comments to resolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @param auto_fill [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to resolved. If + # unset, all comments in the same thread need be present. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new + # + # # Call the resolve_pull_request_comments method. + # result = client.resolve_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resolve_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest + + # 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.resolve_pull_request_comments.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resolve_pull_request_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :resolve_pull_request_comments, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unresolves pull request comment. + # + # @overload unresolve_pull_request_comments(request, options = nil) + # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::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 unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) + # Pass arguments to `unresolve_pull_request_comments` 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 pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param names [::Array<::String>] + # Required. The names of the pull request comments to unresolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @param auto_fill [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to unresolved. If + # unset, all comments in the same thread need be present. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new + # + # # Call the unresolve_pull_request_comments method. + # result = client.unresolve_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def unresolve_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest + + # 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.unresolve_pull_request_comments.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unresolve_pull_request_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :unresolve_pull_request_comments, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an issue comment. + # + # @overload create_issue_comment(request, options = nil) + # Pass arguments to `create_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::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_issue_comment(parent: nil, issue_comment: nil) + # Pass arguments to `create_issue_comment` 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 issue in which to create the issue comment. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] + # Required. The issue comment to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new + # + # # Call the create_issue_comment method. + # result = client.create_issue_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest + + # 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_issue_comment.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_issue_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_issue_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue comment. + # + # @overload get_issue_comment(request, options = nil) + # Pass arguments to `get_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::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_issue_comment(name: nil) + # Pass arguments to `get_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue comment to retrieve. # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::IssueComment] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -1582,24 +4958,24 @@ def list_branch_rules request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new + # request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new # - # # Call the get_branch_rule method. - # result = client.get_branch_rule request + # # Call the get_issue_comment method. + # result = client.get_issue_comment request # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. # p result # - def get_branch_rule request, options = nil + def get_issue_comment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest # 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_branch_rule.metadata.to_h + metadata = @config.rpcs.get_issue_comment.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 \ @@ -1616,15 +4992,15 @@ def get_branch_rule request, options = nil 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_branch_rule.timeout, + options.apply_defaults timeout: @config.rpcs.get_issue_comment.timeout, metadata: metadata, - retry_policy: @config.rpcs.get_branch_rule.retry_policy + retry_policy: @config.rpcs.get_issue_comment.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :get_branch_rule, request, options: options do |response, operation| + @secure_source_manager_stub.call_rpc :get_issue_comment, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -1632,30 +5008,125 @@ def get_branch_rule request, options = nil end ## - # UpdateBranchRule updates a branch rule. + # Lists comments in an issue. # - # @overload update_branch_rule(request, options = nil) - # Pass arguments to `update_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash. + # @overload list_issue_comments(request, options = nil) + # Pass arguments to `list_issue_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::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 update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_branch_rule` via keyword arguments. Note that at + # @overload list_issue_comments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_issue_comments` 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 branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually post it. (https://google.aip.dev/163, for declarative friendly) + # @param parent [::String] + # Required. The issue in which to list the comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new + # + # # Call the list_issue_comments method. + # result = client.list_issue_comments 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::SecureSourceManager::V1::IssueComment. + # p item + # end + # + def list_issue_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest + + # 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_issue_comments.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::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_issue_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_issue_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_issue_comments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, 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 + + ## + # Updates an issue comment. + # + # @overload update_issue_comment(request, options = nil) + # Pass arguments to `update_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::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 update_issue_comment(issue_comment: nil, update_mask: nil) + # Pass arguments to `update_issue_comment` 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 issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] + # Required. The issue comment to update. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # branchRule resource by the update. + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue comment resource by the update. # The fields specified in the update_mask are relative to the resource, not # the full request. A field will be overwritten if it is in the mask. # The special value "*" means full replacement. @@ -1675,10 +5146,10 @@ def get_branch_rule request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new + # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new # - # # Call the update_branch_rule method. - # result = client.update_branch_rule request + # # Call the update_issue_comment method. + # result = client.update_issue_comment request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -1690,16 +5161,16 @@ def get_branch_rule request, options = nil # puts "No response received." # end # - def update_branch_rule request, options = nil + def update_issue_comment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest # 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.update_branch_rule.metadata.to_h + metadata = @config.rpcs.update_issue_comment.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 \ @@ -1709,22 +5180,22 @@ def update_branch_rule request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.branch_rule&.name - header_params["branch_rule.name"] = request.branch_rule.name + if request.issue_comment&.name + header_params["issue_comment.name"] = request.issue_comment.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.update_branch_rule.timeout, + options.apply_defaults timeout: @config.rpcs.update_issue_comment.timeout, metadata: metadata, - retry_policy: @config.rpcs.update_branch_rule.retry_policy + retry_policy: @config.rpcs.update_issue_comment.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :update_branch_rule, request, options: options do |response, operation| + @secure_source_manager_stub.call_rpc :update_issue_comment, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? throw :response, response @@ -1734,27 +5205,27 @@ def update_branch_rule request, options = nil end ## - # DeleteBranchRule deletes a branch rule. + # Deletes an issue comment. # - # @overload delete_branch_rule(request, options = nil) - # Pass arguments to `delete_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash. + # @overload delete_issue_comment(request, options = nil) + # Pass arguments to `delete_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::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_branch_rule(name: nil, allow_missing: nil) - # Pass arguments to `delete_branch_rule` via keyword arguments. Note that at + # @overload delete_issue_comment(name: nil) + # Pass arguments to `delete_issue_comment` 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] - # @param allow_missing [::Boolean] - # Optional. If set to true, and the branch rule is not found, the request - # will succeed but no action will be taken on the server. + # Required. Name of the issue comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -1771,10 +5242,10 @@ def update_branch_rule request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new + # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new # - # # Call the delete_branch_rule method. - # result = client.delete_branch_rule request + # # Call the delete_issue_comment method. + # result = client.delete_issue_comment request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -1786,16 +5257,16 @@ def update_branch_rule request, options = nil # puts "No response received." # end # - def delete_branch_rule request, options = nil + def delete_issue_comment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest # 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_branch_rule.metadata.to_h + metadata = @config.rpcs.delete_issue_comment.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 \ @@ -1812,15 +5283,15 @@ def delete_branch_rule request, options = nil 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_branch_rule.timeout, + options.apply_defaults timeout: @config.rpcs.delete_issue_comment.timeout, metadata: metadata, - retry_policy: @config.rpcs.delete_branch_rule.retry_policy + retry_policy: @config.rpcs.delete_issue_comment.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.call_rpc :delete_branch_rule, request, options: options do |response, operation| + @secure_source_manager_stub.call_rpc :delete_issue_comment, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? throw :response, response @@ -2031,11 +5502,41 @@ class Rpcs # attr_reader :create_repository ## + # RPC-specific configuration for `update_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :update_repository + ## # RPC-specific configuration for `delete_repository` # @return [::Gapic::Config::Method] # attr_reader :delete_repository ## + # RPC-specific configuration for `list_hooks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hooks + ## + # RPC-specific configuration for `get_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hook + ## + # RPC-specific configuration for `create_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :create_hook + ## + # RPC-specific configuration for `update_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hook + ## + # RPC-specific configuration for `delete_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_hook + ## # RPC-specific configuration for `get_iam_policy_repo` # @return [::Gapic::Config::Method] # @@ -2075,6 +5576,156 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_branch_rule + ## + # RPC-specific configuration for `create_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pull_request + ## + # RPC-specific configuration for `get_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pull_request + ## + # RPC-specific configuration for `list_pull_requests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_requests + ## + # RPC-specific configuration for `update_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pull_request + ## + # RPC-specific configuration for `merge_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :merge_pull_request + ## + # RPC-specific configuration for `open_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :open_pull_request + ## + # RPC-specific configuration for `close_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :close_pull_request + ## + # RPC-specific configuration for `list_pull_request_file_diffs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_request_file_diffs + ## + # RPC-specific configuration for `fetch_tree` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_tree + ## + # RPC-specific configuration for `fetch_blob` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_blob + ## + # RPC-specific configuration for `create_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue + ## + # RPC-specific configuration for `get_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue + ## + # RPC-specific configuration for `list_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issues + ## + # RPC-specific configuration for `update_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue + ## + # RPC-specific configuration for `delete_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue + ## + # RPC-specific configuration for `open_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :open_issue + ## + # RPC-specific configuration for `close_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :close_issue + ## + # RPC-specific configuration for `get_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pull_request_comment + ## + # RPC-specific configuration for `list_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_request_comments + ## + # RPC-specific configuration for `create_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pull_request_comment + ## + # RPC-specific configuration for `update_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pull_request_comment + ## + # RPC-specific configuration for `delete_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_pull_request_comment + ## + # RPC-specific configuration for `batch_create_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_pull_request_comments + ## + # RPC-specific configuration for `resolve_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_pull_request_comments + ## + # RPC-specific configuration for `unresolve_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :unresolve_pull_request_comments + ## + # RPC-specific configuration for `create_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue_comment + ## + # RPC-specific configuration for `get_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue_comment + ## + # RPC-specific configuration for `list_issue_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issue_comments + ## + # RPC-specific configuration for `update_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue_comment + ## + # RPC-specific configuration for `delete_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue_comment # @private def initialize parent_rpcs = nil @@ -2092,8 +5743,20 @@ def initialize parent_rpcs = nil @get_repository = ::Gapic::Config::Method.new get_repository_config create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository @create_repository = ::Gapic::Config::Method.new create_repository_config + update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository + @update_repository = ::Gapic::Config::Method.new update_repository_config delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository @delete_repository = ::Gapic::Config::Method.new delete_repository_config + list_hooks_config = parent_rpcs.list_hooks if parent_rpcs.respond_to? :list_hooks + @list_hooks = ::Gapic::Config::Method.new list_hooks_config + get_hook_config = parent_rpcs.get_hook if parent_rpcs.respond_to? :get_hook + @get_hook = ::Gapic::Config::Method.new get_hook_config + create_hook_config = parent_rpcs.create_hook if parent_rpcs.respond_to? :create_hook + @create_hook = ::Gapic::Config::Method.new create_hook_config + update_hook_config = parent_rpcs.update_hook if parent_rpcs.respond_to? :update_hook + @update_hook = ::Gapic::Config::Method.new update_hook_config + delete_hook_config = parent_rpcs.delete_hook if parent_rpcs.respond_to? :delete_hook + @delete_hook = ::Gapic::Config::Method.new delete_hook_config get_iam_policy_repo_config = parent_rpcs.get_iam_policy_repo if parent_rpcs.respond_to? :get_iam_policy_repo @get_iam_policy_repo = ::Gapic::Config::Method.new get_iam_policy_repo_config set_iam_policy_repo_config = parent_rpcs.set_iam_policy_repo if parent_rpcs.respond_to? :set_iam_policy_repo @@ -2110,6 +5773,66 @@ def initialize parent_rpcs = nil @update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule @delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config + create_pull_request_config = parent_rpcs.create_pull_request if parent_rpcs.respond_to? :create_pull_request + @create_pull_request = ::Gapic::Config::Method.new create_pull_request_config + get_pull_request_config = parent_rpcs.get_pull_request if parent_rpcs.respond_to? :get_pull_request + @get_pull_request = ::Gapic::Config::Method.new get_pull_request_config + list_pull_requests_config = parent_rpcs.list_pull_requests if parent_rpcs.respond_to? :list_pull_requests + @list_pull_requests = ::Gapic::Config::Method.new list_pull_requests_config + update_pull_request_config = parent_rpcs.update_pull_request if parent_rpcs.respond_to? :update_pull_request + @update_pull_request = ::Gapic::Config::Method.new update_pull_request_config + merge_pull_request_config = parent_rpcs.merge_pull_request if parent_rpcs.respond_to? :merge_pull_request + @merge_pull_request = ::Gapic::Config::Method.new merge_pull_request_config + open_pull_request_config = parent_rpcs.open_pull_request if parent_rpcs.respond_to? :open_pull_request + @open_pull_request = ::Gapic::Config::Method.new open_pull_request_config + close_pull_request_config = parent_rpcs.close_pull_request if parent_rpcs.respond_to? :close_pull_request + @close_pull_request = ::Gapic::Config::Method.new close_pull_request_config + list_pull_request_file_diffs_config = parent_rpcs.list_pull_request_file_diffs if parent_rpcs.respond_to? :list_pull_request_file_diffs + @list_pull_request_file_diffs = ::Gapic::Config::Method.new list_pull_request_file_diffs_config + fetch_tree_config = parent_rpcs.fetch_tree if parent_rpcs.respond_to? :fetch_tree + @fetch_tree = ::Gapic::Config::Method.new fetch_tree_config + fetch_blob_config = parent_rpcs.fetch_blob if parent_rpcs.respond_to? :fetch_blob + @fetch_blob = ::Gapic::Config::Method.new fetch_blob_config + create_issue_config = parent_rpcs.create_issue if parent_rpcs.respond_to? :create_issue + @create_issue = ::Gapic::Config::Method.new create_issue_config + get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue + @get_issue = ::Gapic::Config::Method.new get_issue_config + list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues + @list_issues = ::Gapic::Config::Method.new list_issues_config + update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue + @update_issue = ::Gapic::Config::Method.new update_issue_config + delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue + @delete_issue = ::Gapic::Config::Method.new delete_issue_config + open_issue_config = parent_rpcs.open_issue if parent_rpcs.respond_to? :open_issue + @open_issue = ::Gapic::Config::Method.new open_issue_config + close_issue_config = parent_rpcs.close_issue if parent_rpcs.respond_to? :close_issue + @close_issue = ::Gapic::Config::Method.new close_issue_config + get_pull_request_comment_config = parent_rpcs.get_pull_request_comment if parent_rpcs.respond_to? :get_pull_request_comment + @get_pull_request_comment = ::Gapic::Config::Method.new get_pull_request_comment_config + list_pull_request_comments_config = parent_rpcs.list_pull_request_comments if parent_rpcs.respond_to? :list_pull_request_comments + @list_pull_request_comments = ::Gapic::Config::Method.new list_pull_request_comments_config + create_pull_request_comment_config = parent_rpcs.create_pull_request_comment if parent_rpcs.respond_to? :create_pull_request_comment + @create_pull_request_comment = ::Gapic::Config::Method.new create_pull_request_comment_config + update_pull_request_comment_config = parent_rpcs.update_pull_request_comment if parent_rpcs.respond_to? :update_pull_request_comment + @update_pull_request_comment = ::Gapic::Config::Method.new update_pull_request_comment_config + delete_pull_request_comment_config = parent_rpcs.delete_pull_request_comment if parent_rpcs.respond_to? :delete_pull_request_comment + @delete_pull_request_comment = ::Gapic::Config::Method.new delete_pull_request_comment_config + batch_create_pull_request_comments_config = parent_rpcs.batch_create_pull_request_comments if parent_rpcs.respond_to? :batch_create_pull_request_comments + @batch_create_pull_request_comments = ::Gapic::Config::Method.new batch_create_pull_request_comments_config + resolve_pull_request_comments_config = parent_rpcs.resolve_pull_request_comments if parent_rpcs.respond_to? :resolve_pull_request_comments + @resolve_pull_request_comments = ::Gapic::Config::Method.new resolve_pull_request_comments_config + unresolve_pull_request_comments_config = parent_rpcs.unresolve_pull_request_comments if parent_rpcs.respond_to? :unresolve_pull_request_comments + @unresolve_pull_request_comments = ::Gapic::Config::Method.new unresolve_pull_request_comments_config + create_issue_comment_config = parent_rpcs.create_issue_comment if parent_rpcs.respond_to? :create_issue_comment + @create_issue_comment = ::Gapic::Config::Method.new create_issue_comment_config + get_issue_comment_config = parent_rpcs.get_issue_comment if parent_rpcs.respond_to? :get_issue_comment + @get_issue_comment = ::Gapic::Config::Method.new get_issue_comment_config + list_issue_comments_config = parent_rpcs.list_issue_comments if parent_rpcs.respond_to? :list_issue_comments + @list_issue_comments = ::Gapic::Config::Method.new list_issue_comments_config + update_issue_comment_config = parent_rpcs.update_issue_comment if parent_rpcs.respond_to? :update_issue_comment + @update_issue_comment = ::Gapic::Config::Method.new update_issue_comment_config + delete_issue_comment_config = parent_rpcs.delete_issue_comment if parent_rpcs.respond_to? :delete_issue_comment + @delete_issue_comment = ::Gapic::Config::Method.new delete_issue_comment_config yield self if block_given? end diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb index 6732d961066d..14acf9962921 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb @@ -85,6 +85,27 @@ def crypto_key_path project:, location:, key_ring:, crypto_key: "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" end + ## + # Create a fully-qualified Hook resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/hooks/{hook}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param hook [String] + # + # @return [::String] + def hook_path project:, location:, repository:, hook: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/hooks/#{hook}" + end + ## # Create a fully-qualified Instance resource string. # @@ -104,6 +125,50 @@ def instance_path project:, location:, instance: "projects/#{project}/locations/#{location}/instances/#{instance}" end + ## + # Create a fully-qualified Issue resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param issue [String] + # + # @return [::String] + def issue_path project:, location:, repository:, issue: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/issues/#{issue}" + end + + ## + # Create a fully-qualified IssueComment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param issue [String] + # @param comment [String] + # + # @return [::String] + def issue_comment_path project:, location:, repository:, issue:, comment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + raise ::ArgumentError, "issue cannot contain /" if issue.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/issues/#{issue}/issueComments/#{comment}" + end + ## # Create a fully-qualified Location resource string. # @@ -121,6 +186,50 @@ def location_path project:, location: "projects/#{project}/locations/#{location}" end + ## + # Create a fully-qualified PullRequest resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param pull_request [String] + # + # @return [::String] + def pull_request_path project:, location:, repository:, pull_request: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/pullRequests/#{pull_request}" + end + + ## + # Create a fully-qualified PullRequestComment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param pull_request [String] + # @param comment [String] + # + # @return [::String] + def pull_request_comment_path project:, location:, repository:, pull_request:, comment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + raise ::ArgumentError, "pull_request cannot contain /" if pull_request.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/pullRequests/#{pull_request}/pullRequestComments/#{comment}" + end + ## # Create a fully-qualified Repository resource string. # diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb index c5cd84e5d7f9..3cffe16871f6 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb @@ -37,23 +37,6 @@ module V1 # # Access Secure Source Manager instances, resources, and repositories. # - # This API is split across two servers: the Control Plane and the Data Plane. - # - # Data Plane endpoints are hosted directly by your Secure Source Manager - # instance, so you must connect to your instance's API hostname to access - # them. The API hostname looks like the following: - # - # https://[instance-id]-[project-number]-api.[location].sourcemanager.dev - # - # For example, - # - # https://my-instance-702770452863-api.us-central1.sourcemanager.dev - # - # Data Plane endpoints are denoted with **Host: Data Plane**. - # - # All other endpoints are found in the normal Cloud API location, namely, - # `securcesourcemanager.googleapis.com`. - # # To load this service and instantiate a REST client: # # require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb index d2a52c324acf..6a910a068127 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb @@ -35,23 +35,6 @@ module Rest # # Access Secure Source Manager instances, resources, and repositories. # - # This API is split across two servers: the Control Plane and the Data Plane. - # - # Data Plane endpoints are hosted directly by your Secure Source Manager - # instance, so you must connect to your instance's API hostname to access - # them. The API hostname looks like the following: - # - # https://[instance-id]-[project-number]-api.[location].sourcemanager.dev - # - # For example, - # - # https://my-instance-702770452863-api.us-central1.sourcemanager.dev - # - # Data Plane endpoints are denoted with **Host: Data Plane**. - # - # All other endpoints are found in the normal Cloud API location, namely, - # `securcesourcemanager.googleapis.com`. - # class Client # @private API_VERSION = "" @@ -648,7 +631,8 @@ def delete_instance request, options = nil ## # Lists Repositories in a given project and location. # - # **Host: Data Plane** + # The instance field is required in the query parameter for requests using + # the securesourcemanager.googleapis.com endpoint. # # @overload list_repositories(request, options = nil) # Pass arguments to `list_repositories` via a request object, either of type @@ -678,10 +662,9 @@ def delete_instance request, options = nil # Optional. The name of the instance in which the repository is hosted, # formatted as # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # When listing repositories via - # securesourcemanager.googleapis.com (Control Plane API), this field is - # required. When listing repositories via *.sourcemanager.dev (Data Plane - # API), this field is ignored. + # When listing repositories via securesourcemanager.googleapis.com, this + # field is required. When listing repositories via *.sourcemanager.dev, this + # field is ignored. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -749,8 +732,6 @@ def list_repositories request, options = nil ## # Gets metadata of a repository. # - # **Host: Data Plane** - # # @overload get_repository(request, options = nil) # Pass arguments to `get_repository` via a request object, either of type # {::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest} or an equivalent Hash. @@ -831,7 +812,8 @@ def get_repository request, options = nil ## # Creates a new repository in a given project and location. # - # **Host: Data Plane** + # The Repository.Instance field is required in the request body for requests + # using the securesourcemanager.googleapis.com endpoint. # # @overload create_repository(request, options = nil) # Pass arguments to `create_repository` via a request object, either of type @@ -925,32 +907,34 @@ def create_repository request, options = nil end ## - # Deletes a Repository. - # - # **Host: Data Plane** + # Updates the metadata of a repository. # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash. + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::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_repository(name: nil, allow_missing: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at + # @overload update_repository(update_mask: nil, repository: nil, validate_only: nil) + # Pass arguments to `update_repository` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # - # @param name [::String] - # Required. Name of the repository to delete. - # The format is - # projects/\\{project_number}/locations/\\{location_id}/repositories/\\{repository_id}. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the repository is not found, the request will - # succeed but no action will be taken on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # repository resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] + # Required. The repository being updated. + # @param validate_only [::Boolean] + # Optional. False by default. If set to true, the request is validated and + # the user is provided with an expected result, but no actual change is made. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -966,10 +950,10 @@ def create_repository request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new + # request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new # - # # Call the delete_repository method. - # result = client.delete_repository request + # # Call the update_repository method. + # result = client.update_repository request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -981,16 +965,16 @@ def create_repository request, options = nil # puts "No response received." # end # - def delete_repository request, options = nil + def update_repository request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest # 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_repository.metadata.to_h + call_metadata = @config.rpcs.update_repository.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 \ @@ -1001,15 +985,15 @@ def delete_repository request, options = nil 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_repository.timeout, + options.apply_defaults timeout: @config.rpcs.update_repository.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy + retry_policy: @config.rpcs.update_repository.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.delete_repository request, options do |result, operation| + @secure_source_manager_stub.update_repository request, options do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? throw :response, result @@ -1019,34 +1003,35 @@ def delete_repository request, options = nil end ## - # Get IAM policy for a repository. + # Deletes a Repository. # - # @overload get_iam_policy_repo(request, options = nil) - # Pass arguments to `get_iam_policy_repo` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::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_iam_policy_repo(resource: nil, options: nil) - # Pass arguments to `get_iam_policy_repo` via keyword arguments. Note that at + # @overload delete_repository(name: nil, allow_missing: nil) + # Pass arguments to `delete_repository` 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 resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. + # @param name [::String] + # Required. Name of the repository to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the repository is not found, the request will + # succeed but no action will be taken on the server. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -1057,24 +1042,31 @@ def delete_repository request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new + # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new # - # # Call the get_iam_policy_repo method. - # result = client.get_iam_policy_repo request + # # Call the delete_repository method. + # result = client.delete_repository request # - # # The returned object is of type Google::Iam::V1::Policy. - # p result + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end # - def get_iam_policy_repo request, options = nil + def delete_repository request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest # 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_iam_policy_repo.metadata.to_h + call_metadata = @config.rpcs.delete_repository.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 \ @@ -1085,58 +1077,53 @@ def get_iam_policy_repo request, options = nil 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_iam_policy_repo.timeout, + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy + retry_policy: @config.rpcs.delete_repository.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.get_iam_policy_repo request, options do |result, operation| + @secure_source_manager_stub.delete_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? + throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end ## - # Set IAM policy on a repository. + # Lists hooks in a given repository. # - # @overload set_iam_policy_repo(request, options = nil) - # Pass arguments to `set_iam_policy_repo` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # @overload list_hooks(request, options = nil) + # Pass arguments to `list_hooks` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListHooksRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::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 set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy_repo` via keyword arguments. Note that at + # @overload list_hooks(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_hooks` 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 resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` + # @param parent [::String] + # Required. Parent value for ListHooksRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -1147,24 +1134,28 @@ def get_iam_policy_repo request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new + # request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new # - # # Call the set_iam_policy_repo method. - # result = client.set_iam_policy_repo request + # # Call the list_hooks method. + # result = client.list_hooks request # - # # The returned object is of type Google::Iam::V1::Policy. - # p result + # # 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::SecureSourceManager::V1::Hook. + # p item + # end # - def set_iam_policy_repo request, options = nil + def list_hooks request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest # 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.set_iam_policy_repo.metadata.to_h + call_metadata = @config.rpcs.list_hooks.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 \ @@ -1175,53 +1166,50 @@ def set_iam_policy_repo request, options = nil 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.set_iam_policy_repo.timeout, + options.apply_defaults timeout: @config.rpcs.list_hooks.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy + retry_policy: @config.rpcs.list_hooks.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.set_iam_policy_repo request, options do |result, operation| + @secure_source_manager_stub.list_hooks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, "hooks", 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 ## - # Test IAM permissions on a repository. - # IAM permission checks are not required on this method. + # Gets metadata of a hook. # - # @overload test_iam_permissions_repo(request, options = nil) - # Pass arguments to `test_iam_permissions_repo` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # @overload get_hook(request, options = nil) + # Pass arguments to `get_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetHookRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::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 test_iam_permissions_repo(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions_repo` via keyword arguments. Note that at + # @overload get_hook(name: nil) + # Pass arguments to `get_hook` 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 resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @param name [::String] + # Required. Name of the hook to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Hook] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -1232,24 +1220,24 @@ def set_iam_policy_repo request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new + # request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new # - # # Call the test_iam_permissions_repo method. - # result = client.test_iam_permissions_repo request + # # Call the get_hook method. + # result = client.get_hook request # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. # p result # - def test_iam_permissions_repo request, options = nil + def get_hook request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetHookRequest # 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.test_iam_permissions_repo.metadata.to_h + call_metadata = @config.rpcs.get_hook.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 \ @@ -1260,15 +1248,15 @@ def test_iam_permissions_repo request, options = nil 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.test_iam_permissions_repo.timeout, + options.apply_defaults timeout: @config.rpcs.get_hook.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy + retry_policy: @config.rpcs.get_hook.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.test_iam_permissions_repo request, options do |result, operation| + @secure_source_manager_stub.get_hook request, options do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e @@ -1276,26 +1264,34 @@ def test_iam_permissions_repo request, options = nil end ## - # CreateBranchRule creates a branch rule in a given repository. + # Creates a new hook in a given repository. # - # @overload create_branch_rule(request, options = nil) - # Pass arguments to `create_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash. + # @overload create_hook(request, options = nil) + # Pass arguments to `create_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateHookRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::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_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) - # Pass arguments to `create_branch_rule` via keyword arguments. Note that at + # @overload create_hook(parent: nil, hook: nil, hook_id: nil) + # Pass arguments to `create_hook` 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] - # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] - # @param branch_rule_id [::String] + # Required. The repository in which to create the hook. Values are of the + # form + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] + # Required. The resource being created. + # @param hook_id [::String] + # Required. The ID to use for the hook, which will become the final component + # of the hook's resource name. This value restricts to lower-case letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1311,10 +1307,10 @@ def test_iam_permissions_repo request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new + # request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new # - # # Call the create_branch_rule method. - # result = client.create_branch_rule request + # # Call the create_hook method. + # result = client.create_hook request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -1326,16 +1322,16 @@ def test_iam_permissions_repo request, options = nil # puts "No response received." # end # - def create_branch_rule request, options = nil + def create_hook request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest # 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_branch_rule.metadata.to_h + call_metadata = @config.rpcs.create_hook.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 \ @@ -1346,15 +1342,15 @@ def create_branch_rule request, options = nil 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_branch_rule.timeout, + options.apply_defaults timeout: @config.rpcs.create_hook.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.create_branch_rule.retry_policy + retry_policy: @config.rpcs.create_hook.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.create_branch_rule request, options do |result, operation| + @secure_source_manager_stub.create_hook request, options do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? throw :response, result @@ -1364,31 +1360,36 @@ def create_branch_rule request, options = nil end ## - # ListBranchRules lists branch rules in a given repository. + # Updates the metadata of a hook. # - # @overload list_branch_rules(request, options = nil) - # Pass arguments to `list_branch_rules` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash. + # @overload update_hook(request, options = nil) + # Pass arguments to `update_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::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_branch_rules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_branch_rules` via keyword arguments. Note that at + # @overload update_hook(update_mask: nil, hook: nil) + # Pass arguments to `update_hook` 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] - # @param page_size [::Integer] - # @param page_token [::String] + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # hook resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] + # Required. The hook being updated. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -1399,28 +1400,31 @@ def create_branch_rule request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new + # request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new # - # # Call the list_branch_rules method. - # result = client.list_branch_rules request + # # Call the update_hook method. + # result = client.update_hook 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::SecureSourceManager::V1::BranchRule. - # p item + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." # end # - def list_branch_rules request, options = nil + def update_hook request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest # 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_branch_rules.metadata.to_h + call_metadata = @config.rpcs.update_hook.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 \ @@ -1431,16 +1435,16 @@ def list_branch_rules request, options = nil 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_branch_rules.timeout, + options.apply_defaults timeout: @config.rpcs.update_hook.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.list_branch_rules.retry_policy + retry_policy: @config.rpcs.update_hook.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.list_branch_rules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, "branch_rules", request, result, options + @secure_source_manager_stub.update_hook request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? throw :response, result end @@ -1449,32 +1453,32 @@ def list_branch_rules request, options = nil end ## - # GetBranchRule gets a branch rule. + # Deletes a Hook. # - # @overload get_branch_rule(request, options = nil) - # Pass arguments to `get_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash. + # @overload delete_hook(request, options = nil) + # Pass arguments to `delete_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::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_branch_rule(name: nil) - # Pass arguments to `get_branch_rule` via keyword arguments. Note that at + # @overload delete_hook(name: nil) + # Pass arguments to `delete_hook` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. Name of the repository to retrieve. + # Required. Name of the hook to delete. # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -1485,24 +1489,3151 @@ def list_branch_rules request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new + # request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new # - # # Call the get_branch_rule method. - # result = client.get_branch_rule request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. - # p result + # # Call the delete_hook method. + # result = client.delete_hook request # - def get_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest + + # 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_hook.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::SecureSourceManager::V1::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_hook.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_hook request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get IAM policy for a repository. + # + # @overload get_iam_policy_repo(request, options = nil) + # Pass arguments to `get_iam_policy_repo` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::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_iam_policy_repo(resource: nil, options: nil) + # Pass arguments to `get_iam_policy_repo` 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 resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy_repo method. + # result = client.get_iam_policy_repo request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # 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_iam_policy_repo.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::SecureSourceManager::V1::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_iam_policy_repo.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_iam_policy_repo 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 + + ## + # Set IAM policy on a repository. + # + # @overload set_iam_policy_repo(request, options = nil) + # Pass arguments to `set_iam_policy_repo` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::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 set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy_repo` 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 resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy_repo method. + # result = client.set_iam_policy_repo request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # 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.set_iam_policy_repo.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::SecureSourceManager::V1::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.set_iam_policy_repo.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.set_iam_policy_repo 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 + + ## + # Test IAM permissions on a repository. + # IAM permission checks are not required on this method. + # + # @overload test_iam_permissions_repo(request, options = nil) + # Pass arguments to `test_iam_permissions_repo` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::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 test_iam_permissions_repo(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions_repo` 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 resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions_repo method. + # result = client.test_iam_permissions_repo request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # 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.test_iam_permissions_repo.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::SecureSourceManager::V1::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.test_iam_permissions_repo.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.test_iam_permissions_repo 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 + + ## + # CreateBranchRule creates a branch rule in a given repository. + # + # @overload create_branch_rule(request, options = nil) + # Pass arguments to `create_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::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_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) + # Pass arguments to `create_branch_rule` 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] + # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] + # @param branch_rule_id [::String] + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new + # + # # Call the create_branch_rule method. + # result = client.create_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest + + # 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_branch_rule.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::SecureSourceManager::V1::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_branch_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_branch_rule request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # ListBranchRules lists branch rules in a given repository. + # + # @overload list_branch_rules(request, options = nil) + # Pass arguments to `list_branch_rules` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::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_branch_rules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_branch_rules` 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] + # @param page_size [::Integer] + # @param page_token [::String] + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new + # + # # Call the list_branch_rules method. + # result = client.list_branch_rules 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::SecureSourceManager::V1::BranchRule. + # p item + # end + # + def list_branch_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest + + # 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_branch_rules.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::SecureSourceManager::V1::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_branch_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_branch_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_branch_rules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, "branch_rules", 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 + + ## + # GetBranchRule gets a branch rule. + # + # @overload get_branch_rule(request, options = nil) + # Pass arguments to `get_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::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_branch_rule(name: nil) + # Pass arguments to `get_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the repository to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new + # + # # Call the get_branch_rule method. + # result = client.get_branch_rule request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. + # p result + # + def get_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest # 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_branch_rule.metadata.to_h + call_metadata = @config.rpcs.get_branch_rule.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::SecureSourceManager::V1::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_branch_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_branch_rule 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 + + ## + # UpdateBranchRule updates a branch rule. + # + # @overload update_branch_rule(request, options = nil) + # Pass arguments to `update_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::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 update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_branch_rule` 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 branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually post it. (https://google.aip.dev/163, for declarative friendly) + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # branchRule resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new + # + # # Call the update_branch_rule method. + # result = client.update_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest + + # 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.update_branch_rule.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::SecureSourceManager::V1::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.update_branch_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_branch_rule request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # DeleteBranchRule deletes a branch rule. + # + # @overload delete_branch_rule(request, options = nil) + # Pass arguments to `delete_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::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_branch_rule(name: nil, allow_missing: nil) + # Pass arguments to `delete_branch_rule` 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] + # @param allow_missing [::Boolean] + # Optional. If set to true, and the branch rule is not found, the request + # will succeed but no action will be taken on the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new + # + # # Call the delete_branch_rule method. + # result = client.delete_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest + + # 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_branch_rule.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::SecureSourceManager::V1::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_branch_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_branch_rule request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a pull request. + # + # @overload create_pull_request(request, options = nil) + # Pass arguments to `create_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::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_pull_request(parent: nil, pull_request: nil) + # Pass arguments to `create_pull_request` 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 repository that the pull request is created from. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] + # Required. The pull request to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new + # + # # Call the create_pull_request method. + # result = client.create_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest + + # 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_pull_request.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::SecureSourceManager::V1::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_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a pull request. + # + # @overload get_pull_request(request, options = nil) + # Pass arguments to `get_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::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_pull_request(name: nil) + # Pass arguments to `get_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new + # + # # Call the get_pull_request method. + # result = client.get_pull_request request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. + # p result + # + def get_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest + + # 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_pull_request.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::SecureSourceManager::V1::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_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_pull_request 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 pull requests in a repository. + # + # @overload list_pull_requests(request, options = nil) + # Pass arguments to `list_pull_requests` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::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_pull_requests(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_requests` 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 repository in which to list pull requests. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new + # + # # Call the list_pull_requests method. + # result = client.list_pull_requests 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::SecureSourceManager::V1::PullRequest. + # p item + # end + # + def list_pull_requests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest + + # 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_pull_requests.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::SecureSourceManager::V1::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_pull_requests.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_pull_requests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_pull_requests request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, "pull_requests", 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 + + ## + # Updates a pull request. + # + # @overload update_pull_request(request, options = nil) + # Pass arguments to `update_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::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 update_pull_request(pull_request: nil, update_mask: nil) + # Pass arguments to `update_pull_request` 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 pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] + # Required. The pull request to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new + # + # # Call the update_pull_request method. + # result = client.update_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest + + # 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.update_pull_request.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::SecureSourceManager::V1::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.update_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Merges a pull request. + # + # @overload merge_pull_request(request, options = nil) + # Pass arguments to `merge_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::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 merge_pull_request(name: nil) + # Pass arguments to `merge_pull_request` 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 pull request to merge. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new + # + # # Call the merge_pull_request method. + # result = client.merge_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def merge_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest + + # 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.merge_pull_request.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::SecureSourceManager::V1::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.merge_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.merge_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.merge_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Opens a pull request. + # + # @overload open_pull_request(request, options = nil) + # Pass arguments to `open_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::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 open_pull_request(name: nil) + # Pass arguments to `open_pull_request` 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 pull request to open. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new + # + # # Call the open_pull_request method. + # result = client.open_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def open_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest + + # 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.open_pull_request.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::SecureSourceManager::V1::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.open_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.open_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.open_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Closes a pull request without merging. + # + # @overload close_pull_request(request, options = nil) + # Pass arguments to `close_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::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 close_pull_request(name: nil) + # Pass arguments to `close_pull_request` 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 pull request to close. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new + # + # # Call the close_pull_request method. + # result = client.close_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def close_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest + + # 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.close_pull_request.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::SecureSourceManager::V1::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.close_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.close_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.close_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a pull request's file diffs. + # + # @overload list_pull_request_file_diffs(request, options = nil) + # Pass arguments to `list_pull_request_file_diffs` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::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_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_request_file_diffs` 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 pull request to list file diffs for. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new + # + # # Call the list_pull_request_file_diffs method. + # result = client.list_pull_request_file_diffs 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::SecureSourceManager::V1::FileDiff. + # p item + # end + # + def list_pull_request_file_diffs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest + + # 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_pull_request_file_diffs.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::SecureSourceManager::V1::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_pull_request_file_diffs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_pull_request_file_diffs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_pull_request_file_diffs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, "file_diffs", 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 + + ## + # Fetches a tree from a repository. + # + # @overload fetch_tree(request, options = nil) + # Pass arguments to `fetch_tree` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::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 fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_tree` 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 repository [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository to fetch the tree from. + # @param ref [::String] + # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + # which tree to fetch. If not specified, the default branch will be used. + # @param recursive [::Boolean] + # Optional. If true, include all subfolders and their files in the response. + # If false, only the immediate children are returned. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, at most 10,000 items will be returned. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new + # + # # Call the fetch_tree method. + # result = client.fetch_tree 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::SecureSourceManager::V1::TreeEntry. + # p item + # end + # + def fetch_tree request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest + + # 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.fetch_tree.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::SecureSourceManager::V1::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.fetch_tree.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_tree.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.fetch_tree request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, "tree_entries", 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 + + ## + # Fetches a blob from a repository. + # + # @overload fetch_blob(request, options = nil) + # Pass arguments to `fetch_blob` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::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 fetch_blob(repository: nil, sha: nil) + # Pass arguments to `fetch_blob` 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 repository [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository containing the blob. + # @param sha [::String] + # Required. The SHA-1 hash of the blob to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new + # + # # Call the fetch_blob method. + # result = client.fetch_blob request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. + # p result + # + def fetch_blob request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest + + # 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.fetch_blob.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::SecureSourceManager::V1::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.fetch_blob.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_blob.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.fetch_blob 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 + + ## + # Creates an issue. + # + # @overload create_issue(request, options = nil) + # Pass arguments to `create_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::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_issue(parent: nil, issue: nil) + # Pass arguments to `create_issue` 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 repository in which to create the issue. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] + # Required. The issue to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new + # + # # Call the create_issue method. + # result = client.create_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest + + # 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_issue.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::SecureSourceManager::V1::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_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue. + # + # @overload get_issue(request, options = nil) + # Pass arguments to `get_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::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_issue(name: nil) + # Pass arguments to `get_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Issue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new + # + # # Call the get_issue method. + # result = client.get_issue request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. + # p result + # + def get_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest + + # 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_issue.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::SecureSourceManager::V1::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_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_issue 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 issues in a repository. + # + # @overload list_issues(request, options = nil) + # Pass arguments to `list_issues` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::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_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_issues` 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 repository in which to list issues. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Used to filter the resulting issues list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new + # + # # Call the list_issues method. + # result = client.list_issues 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::SecureSourceManager::V1::Issue. + # p item + # end + # + def list_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest + + # 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_issues.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::SecureSourceManager::V1::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_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_issues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issues, "issues", 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 + + ## + # Updates a issue. + # + # @overload update_issue(request, options = nil) + # Pass arguments to `update_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::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 update_issue(issue: nil, update_mask: nil) + # Pass arguments to `update_issue` 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 issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] + # Required. The issue to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new + # + # # Call the update_issue method. + # result = client.update_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest + + # 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.update_issue.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::SecureSourceManager::V1::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.update_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 an issue. + # + # @overload delete_issue(request, options = nil) + # Pass arguments to `delete_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::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_issue(name: nil, etag: nil) + # Pass arguments to `delete_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # deletion will be blocked and an ABORTED error will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new + # + # # Call the delete_issue method. + # result = client.delete_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest + + # 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_issue.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::SecureSourceManager::V1::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_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Opens an issue. + # + # @overload open_issue(request, options = nil) + # Pass arguments to `open_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::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 open_issue(name: nil, etag: nil) + # Pass arguments to `open_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to open. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # opening will be blocked and an ABORTED error will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new + # + # # Call the open_issue method. + # result = client.open_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def open_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest + + # 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.open_issue.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::SecureSourceManager::V1::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.open_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.open_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.open_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Closes an issue. + # + # @overload close_issue(request, options = nil) + # Pass arguments to `close_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::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 close_issue(name: nil, etag: nil) + # Pass arguments to `close_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to close. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # closing will be blocked and an ABORTED error will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new + # + # # Call the close_issue method. + # result = client.close_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def close_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest + + # 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.close_issue.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::SecureSourceManager::V1::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.close_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.close_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.close_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a pull request comment. + # + # @overload get_pull_request_comment(request, options = nil) + # Pass arguments to `get_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::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_pull_request_comment(name: nil) + # Pass arguments to `get_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request comment to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new + # + # # Call the get_pull_request_comment method. + # result = client.get_pull_request_comment request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. + # p result + # + def get_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest + + # 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_pull_request_comment.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::SecureSourceManager::V1::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_pull_request_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_pull_request_comment 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 pull request comments. + # + # @overload list_pull_request_comments(request, options = nil) + # Pass arguments to `list_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::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_pull_request_comments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_request_comments` 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 pull request in which to list pull request comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, at most 100 pull request + # comments will be returned. The maximum value is 100; values above 100 will + # be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new + # + # # Call the list_pull_request_comments method. + # result = client.list_pull_request_comments 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::SecureSourceManager::V1::PullRequestComment. + # p item + # end + # + def list_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest + + # 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_pull_request_comments.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::SecureSourceManager::V1::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_pull_request_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_pull_request_comments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, "pull_request_comments", 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 + + ## + # Creates a pull request comment. + # + # @overload create_pull_request_comment(request, options = nil) + # Pass arguments to `create_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::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_pull_request_comment(parent: nil, pull_request_comment: nil) + # Pass arguments to `create_pull_request_comment` 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 pull request in which to create the pull request comment. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] + # Required. The pull request comment to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new + # + # # Call the create_pull_request_comment method. + # result = client.create_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest + + # 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_pull_request_comment.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::SecureSourceManager::V1::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_pull_request_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_pull_request_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a pull request comment. + # + # @overload update_pull_request_comment(request, options = nil) + # Pass arguments to `update_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::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 update_pull_request_comment(pull_request_comment: nil, update_mask: nil) + # Pass arguments to `update_pull_request_comment` 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 pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] + # Required. The pull request comment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request comment resource by the update. Updatable fields are + # `body`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new + # + # # Call the update_pull_request_comment method. + # result = client.update_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest + + # 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.update_pull_request_comment.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::SecureSourceManager::V1::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.update_pull_request_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_pull_request_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 pull request comment. + # + # @overload delete_pull_request_comment(request, options = nil) + # Pass arguments to `delete_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::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_pull_request_comment(name: nil) + # Pass arguments to `delete_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new + # + # # Call the delete_pull_request_comment method. + # result = client.delete_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest + + # 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_pull_request_comment.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::SecureSourceManager::V1::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_pull_request_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_pull_request_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Batch creates pull request comments. + # + # @overload batch_create_pull_request_comments(request, options = nil) + # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_create_pull_request_comments(parent: nil, requests: nil) + # Pass arguments to `batch_create_pull_request_comments` 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 pull request in which to create the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param requests [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>] + # Required. The request message specifying the resources to create. There + # should be exactly one CreatePullRequestCommentRequest with CommentDetail + # being REVIEW in the list, and no more than 100 + # CreatePullRequestCommentRequests with CommentDetail being CODE in the list + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new + # + # # Call the batch_create_pull_request_comments method. + # result = client.batch_create_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_create_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest + + # 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.batch_create_pull_request_comments.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::SecureSourceManager::V1::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.batch_create_pull_request_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.batch_create_pull_request_comments request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resolves pull request comments. + # + # @overload resolve_pull_request_comments(request, options = nil) + # Pass arguments to `resolve_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::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 resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) + # Pass arguments to `resolve_pull_request_comments` 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 pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param names [::Array<::String>] + # Required. The names of the pull request comments to resolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @param auto_fill [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to resolved. If + # unset, all comments in the same thread need be present. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new + # + # # Call the resolve_pull_request_comments method. + # result = client.resolve_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resolve_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest + + # 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.resolve_pull_request_comments.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::SecureSourceManager::V1::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.resolve_pull_request_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.resolve_pull_request_comments request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unresolves pull request comment. + # + # @overload unresolve_pull_request_comments(request, options = nil) + # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::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 unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) + # Pass arguments to `unresolve_pull_request_comments` 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 pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param names [::Array<::String>] + # Required. The names of the pull request comments to unresolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @param auto_fill [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to unresolved. If + # unset, all comments in the same thread need be present. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new + # + # # Call the unresolve_pull_request_comments method. + # result = client.unresolve_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def unresolve_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest + + # 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.unresolve_pull_request_comments.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::SecureSourceManager::V1::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.unresolve_pull_request_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.unresolve_pull_request_comments request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an issue comment. + # + # @overload create_issue_comment(request, options = nil) + # Pass arguments to `create_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::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_issue_comment(parent: nil, issue_comment: nil) + # Pass arguments to `create_issue_comment` 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 issue in which to create the issue comment. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] + # Required. The issue comment to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new + # + # # Call the create_issue_comment method. + # result = client.create_issue_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest + + # 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_issue_comment.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::SecureSourceManager::V1::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_issue_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_issue_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue comment. + # + # @overload get_issue_comment(request, options = nil) + # Pass arguments to `get_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::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_issue_comment(name: nil) + # Pass arguments to `get_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue comment to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new + # + # # Call the get_issue_comment method. + # result = client.get_issue_comment request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. + # p result + # + def get_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest + + # 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_issue_comment.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 \ @@ -1513,15 +4644,15 @@ def get_branch_rule request, options = nil 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_branch_rule.timeout, + options.apply_defaults timeout: @config.rpcs.get_issue_comment.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.get_branch_rule.retry_policy + retry_policy: @config.rpcs.get_issue_comment.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.get_branch_rule request, options do |result, operation| + @secure_source_manager_stub.get_issue_comment request, options do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e @@ -1529,30 +4660,118 @@ def get_branch_rule request, options = nil end ## - # UpdateBranchRule updates a branch rule. + # Lists comments in an issue. # - # @overload update_branch_rule(request, options = nil) - # Pass arguments to `update_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash. + # @overload list_issue_comments(request, options = nil) + # Pass arguments to `list_issue_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::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 update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_branch_rule` via keyword arguments. Note that at + # @overload list_issue_comments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_issue_comments` 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 branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually post it. (https://google.aip.dev/163, for declarative friendly) + # @param parent [::String] + # Required. The issue in which to list the comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new + # + # # Call the list_issue_comments method. + # result = client.list_issue_comments 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::SecureSourceManager::V1::IssueComment. + # p item + # end + # + def list_issue_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest + + # 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_issue_comments.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::SecureSourceManager::V1::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_issue_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_issue_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_issue_comments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, "issue_comments", 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 + + ## + # Updates an issue comment. + # + # @overload update_issue_comment(request, options = nil) + # Pass arguments to `update_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::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 update_issue_comment(issue_comment: nil, update_mask: nil) + # Pass arguments to `update_issue_comment` 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 issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] + # Required. The issue comment to update. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # branchRule resource by the update. + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue comment resource by the update. # The fields specified in the update_mask are relative to the resource, not # the full request. A field will be overwritten if it is in the mask. # The special value "*" means full replacement. @@ -1571,10 +4790,10 @@ def get_branch_rule request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new + # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new # - # # Call the update_branch_rule method. - # result = client.update_branch_rule request + # # Call the update_issue_comment method. + # result = client.update_issue_comment request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -1586,16 +4805,16 @@ def get_branch_rule request, options = nil # puts "No response received." # end # - def update_branch_rule request, options = nil + def update_issue_comment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest # 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.update_branch_rule.metadata.to_h + call_metadata = @config.rpcs.update_issue_comment.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 \ @@ -1606,15 +4825,15 @@ def update_branch_rule request, options = nil 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.update_branch_rule.timeout, + options.apply_defaults timeout: @config.rpcs.update_issue_comment.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.update_branch_rule.retry_policy + retry_policy: @config.rpcs.update_issue_comment.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.update_branch_rule request, options do |result, operation| + @secure_source_manager_stub.update_issue_comment request, options do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? throw :response, result @@ -1624,27 +4843,27 @@ def update_branch_rule request, options = nil end ## - # DeleteBranchRule deletes a branch rule. + # Deletes an issue comment. # - # @overload delete_branch_rule(request, options = nil) - # Pass arguments to `delete_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash. + # @overload delete_issue_comment(request, options = nil) + # Pass arguments to `delete_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash] + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::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_branch_rule(name: nil, allow_missing: nil) - # Pass arguments to `delete_branch_rule` via keyword arguments. Note that at + # @overload delete_issue_comment(name: nil) + # Pass arguments to `delete_issue_comment` 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] - # @param allow_missing [::Boolean] - # Optional. If set to true, and the branch rule is not found, the request - # will succeed but no action will be taken on the server. + # Required. Name of the issue comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1660,10 +4879,10 @@ def update_branch_rule request, options = nil # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new + # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new # - # # Call the delete_branch_rule method. - # result = client.delete_branch_rule request + # # Call the delete_issue_comment method. + # result = client.delete_issue_comment request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -1675,16 +4894,16 @@ def update_branch_rule request, options = nil # puts "No response received." # end # - def delete_branch_rule request, options = nil + def delete_issue_comment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest # 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_branch_rule.metadata.to_h + call_metadata = @config.rpcs.delete_issue_comment.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 \ @@ -1695,15 +4914,15 @@ def delete_branch_rule request, options = nil 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_branch_rule.timeout, + options.apply_defaults timeout: @config.rpcs.delete_issue_comment.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.delete_branch_rule.retry_policy + retry_policy: @config.rpcs.delete_issue_comment.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @secure_source_manager_stub.delete_branch_rule request, options do |result, operation| + @secure_source_manager_stub.delete_issue_comment request, options do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? throw :response, result @@ -1901,11 +5120,41 @@ class Rpcs # attr_reader :create_repository ## + # RPC-specific configuration for `update_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :update_repository + ## # RPC-specific configuration for `delete_repository` # @return [::Gapic::Config::Method] # attr_reader :delete_repository ## + # RPC-specific configuration for `list_hooks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hooks + ## + # RPC-specific configuration for `get_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hook + ## + # RPC-specific configuration for `create_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :create_hook + ## + # RPC-specific configuration for `update_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hook + ## + # RPC-specific configuration for `delete_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_hook + ## # RPC-specific configuration for `get_iam_policy_repo` # @return [::Gapic::Config::Method] # @@ -1945,6 +5194,156 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_branch_rule + ## + # RPC-specific configuration for `create_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pull_request + ## + # RPC-specific configuration for `get_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pull_request + ## + # RPC-specific configuration for `list_pull_requests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_requests + ## + # RPC-specific configuration for `update_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pull_request + ## + # RPC-specific configuration for `merge_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :merge_pull_request + ## + # RPC-specific configuration for `open_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :open_pull_request + ## + # RPC-specific configuration for `close_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :close_pull_request + ## + # RPC-specific configuration for `list_pull_request_file_diffs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_request_file_diffs + ## + # RPC-specific configuration for `fetch_tree` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_tree + ## + # RPC-specific configuration for `fetch_blob` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_blob + ## + # RPC-specific configuration for `create_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue + ## + # RPC-specific configuration for `get_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue + ## + # RPC-specific configuration for `list_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issues + ## + # RPC-specific configuration for `update_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue + ## + # RPC-specific configuration for `delete_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue + ## + # RPC-specific configuration for `open_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :open_issue + ## + # RPC-specific configuration for `close_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :close_issue + ## + # RPC-specific configuration for `get_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pull_request_comment + ## + # RPC-specific configuration for `list_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_request_comments + ## + # RPC-specific configuration for `create_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pull_request_comment + ## + # RPC-specific configuration for `update_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pull_request_comment + ## + # RPC-specific configuration for `delete_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_pull_request_comment + ## + # RPC-specific configuration for `batch_create_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_pull_request_comments + ## + # RPC-specific configuration for `resolve_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_pull_request_comments + ## + # RPC-specific configuration for `unresolve_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :unresolve_pull_request_comments + ## + # RPC-specific configuration for `create_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue_comment + ## + # RPC-specific configuration for `get_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue_comment + ## + # RPC-specific configuration for `list_issue_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issue_comments + ## + # RPC-specific configuration for `update_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue_comment + ## + # RPC-specific configuration for `delete_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue_comment # @private def initialize parent_rpcs = nil @@ -1962,8 +5361,20 @@ def initialize parent_rpcs = nil @get_repository = ::Gapic::Config::Method.new get_repository_config create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository @create_repository = ::Gapic::Config::Method.new create_repository_config + update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository + @update_repository = ::Gapic::Config::Method.new update_repository_config delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository @delete_repository = ::Gapic::Config::Method.new delete_repository_config + list_hooks_config = parent_rpcs.list_hooks if parent_rpcs.respond_to? :list_hooks + @list_hooks = ::Gapic::Config::Method.new list_hooks_config + get_hook_config = parent_rpcs.get_hook if parent_rpcs.respond_to? :get_hook + @get_hook = ::Gapic::Config::Method.new get_hook_config + create_hook_config = parent_rpcs.create_hook if parent_rpcs.respond_to? :create_hook + @create_hook = ::Gapic::Config::Method.new create_hook_config + update_hook_config = parent_rpcs.update_hook if parent_rpcs.respond_to? :update_hook + @update_hook = ::Gapic::Config::Method.new update_hook_config + delete_hook_config = parent_rpcs.delete_hook if parent_rpcs.respond_to? :delete_hook + @delete_hook = ::Gapic::Config::Method.new delete_hook_config get_iam_policy_repo_config = parent_rpcs.get_iam_policy_repo if parent_rpcs.respond_to? :get_iam_policy_repo @get_iam_policy_repo = ::Gapic::Config::Method.new get_iam_policy_repo_config set_iam_policy_repo_config = parent_rpcs.set_iam_policy_repo if parent_rpcs.respond_to? :set_iam_policy_repo @@ -1980,6 +5391,66 @@ def initialize parent_rpcs = nil @update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule @delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config + create_pull_request_config = parent_rpcs.create_pull_request if parent_rpcs.respond_to? :create_pull_request + @create_pull_request = ::Gapic::Config::Method.new create_pull_request_config + get_pull_request_config = parent_rpcs.get_pull_request if parent_rpcs.respond_to? :get_pull_request + @get_pull_request = ::Gapic::Config::Method.new get_pull_request_config + list_pull_requests_config = parent_rpcs.list_pull_requests if parent_rpcs.respond_to? :list_pull_requests + @list_pull_requests = ::Gapic::Config::Method.new list_pull_requests_config + update_pull_request_config = parent_rpcs.update_pull_request if parent_rpcs.respond_to? :update_pull_request + @update_pull_request = ::Gapic::Config::Method.new update_pull_request_config + merge_pull_request_config = parent_rpcs.merge_pull_request if parent_rpcs.respond_to? :merge_pull_request + @merge_pull_request = ::Gapic::Config::Method.new merge_pull_request_config + open_pull_request_config = parent_rpcs.open_pull_request if parent_rpcs.respond_to? :open_pull_request + @open_pull_request = ::Gapic::Config::Method.new open_pull_request_config + close_pull_request_config = parent_rpcs.close_pull_request if parent_rpcs.respond_to? :close_pull_request + @close_pull_request = ::Gapic::Config::Method.new close_pull_request_config + list_pull_request_file_diffs_config = parent_rpcs.list_pull_request_file_diffs if parent_rpcs.respond_to? :list_pull_request_file_diffs + @list_pull_request_file_diffs = ::Gapic::Config::Method.new list_pull_request_file_diffs_config + fetch_tree_config = parent_rpcs.fetch_tree if parent_rpcs.respond_to? :fetch_tree + @fetch_tree = ::Gapic::Config::Method.new fetch_tree_config + fetch_blob_config = parent_rpcs.fetch_blob if parent_rpcs.respond_to? :fetch_blob + @fetch_blob = ::Gapic::Config::Method.new fetch_blob_config + create_issue_config = parent_rpcs.create_issue if parent_rpcs.respond_to? :create_issue + @create_issue = ::Gapic::Config::Method.new create_issue_config + get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue + @get_issue = ::Gapic::Config::Method.new get_issue_config + list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues + @list_issues = ::Gapic::Config::Method.new list_issues_config + update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue + @update_issue = ::Gapic::Config::Method.new update_issue_config + delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue + @delete_issue = ::Gapic::Config::Method.new delete_issue_config + open_issue_config = parent_rpcs.open_issue if parent_rpcs.respond_to? :open_issue + @open_issue = ::Gapic::Config::Method.new open_issue_config + close_issue_config = parent_rpcs.close_issue if parent_rpcs.respond_to? :close_issue + @close_issue = ::Gapic::Config::Method.new close_issue_config + get_pull_request_comment_config = parent_rpcs.get_pull_request_comment if parent_rpcs.respond_to? :get_pull_request_comment + @get_pull_request_comment = ::Gapic::Config::Method.new get_pull_request_comment_config + list_pull_request_comments_config = parent_rpcs.list_pull_request_comments if parent_rpcs.respond_to? :list_pull_request_comments + @list_pull_request_comments = ::Gapic::Config::Method.new list_pull_request_comments_config + create_pull_request_comment_config = parent_rpcs.create_pull_request_comment if parent_rpcs.respond_to? :create_pull_request_comment + @create_pull_request_comment = ::Gapic::Config::Method.new create_pull_request_comment_config + update_pull_request_comment_config = parent_rpcs.update_pull_request_comment if parent_rpcs.respond_to? :update_pull_request_comment + @update_pull_request_comment = ::Gapic::Config::Method.new update_pull_request_comment_config + delete_pull_request_comment_config = parent_rpcs.delete_pull_request_comment if parent_rpcs.respond_to? :delete_pull_request_comment + @delete_pull_request_comment = ::Gapic::Config::Method.new delete_pull_request_comment_config + batch_create_pull_request_comments_config = parent_rpcs.batch_create_pull_request_comments if parent_rpcs.respond_to? :batch_create_pull_request_comments + @batch_create_pull_request_comments = ::Gapic::Config::Method.new batch_create_pull_request_comments_config + resolve_pull_request_comments_config = parent_rpcs.resolve_pull_request_comments if parent_rpcs.respond_to? :resolve_pull_request_comments + @resolve_pull_request_comments = ::Gapic::Config::Method.new resolve_pull_request_comments_config + unresolve_pull_request_comments_config = parent_rpcs.unresolve_pull_request_comments if parent_rpcs.respond_to? :unresolve_pull_request_comments + @unresolve_pull_request_comments = ::Gapic::Config::Method.new unresolve_pull_request_comments_config + create_issue_comment_config = parent_rpcs.create_issue_comment if parent_rpcs.respond_to? :create_issue_comment + @create_issue_comment = ::Gapic::Config::Method.new create_issue_comment_config + get_issue_comment_config = parent_rpcs.get_issue_comment if parent_rpcs.respond_to? :get_issue_comment + @get_issue_comment = ::Gapic::Config::Method.new get_issue_comment_config + list_issue_comments_config = parent_rpcs.list_issue_comments if parent_rpcs.respond_to? :list_issue_comments + @list_issue_comments = ::Gapic::Config::Method.new list_issue_comments_config + update_issue_comment_config = parent_rpcs.update_issue_comment if parent_rpcs.respond_to? :update_issue_comment + @update_issue_comment = ::Gapic::Config::Method.new update_issue_comment_config + delete_issue_comment_config = parent_rpcs.delete_issue_comment if parent_rpcs.respond_to? :delete_issue_comment + @delete_issue_comment = ::Gapic::Config::Method.new delete_issue_comment_config yield self if block_given? end diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb index 03ed49260d75..40a886cc49d3 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb @@ -353,6 +353,46 @@ def create_repository request_pb, options = nil end end + ## + # Baseline implementation for the update_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_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: "update_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_repository REST call # @@ -393,6 +433,206 @@ def delete_repository request_pb, options = nil end end + ## + # Baseline implementation for the list_hooks REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest] + # 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::SecureSourceManager::V1::ListHooksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListHooksResponse] + # A result object deserialized from the server's reply + def list_hooks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_hooks_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_hooks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.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_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetHookRequest] + # 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::SecureSourceManager::V1::Hook] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] + # A result object deserialized from the server's reply + def get_hook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_hook_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_hook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::Hook.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_hook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_hook_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_hook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_hook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_hook_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: "update_hook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_hook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_hook_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_hook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_iam_policy_repo REST call # @@ -714,42 +954,1844 @@ def delete_branch_rule request_pb, options = nil end ## - # @private - # - # GRPC transcoding helper method for the list_instances REST call + # Baseline implementation for the create_pull_request REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest] # 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_instances_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instances", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_pull_request_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_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 get_instance REST call + # Baseline implementation for the get_pull_request REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest] # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters + # @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::SecureSourceManager::V1::PullRequest] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # A result object deserialized from the server's reply + def get_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_pull_request_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_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::PullRequest.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_pull_requests REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest] + # 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::SecureSourceManager::V1::ListPullRequestsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse] + # A result object deserialized from the server's reply + def list_pull_requests request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_requests_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_pull_requests", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_pull_request_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: "update_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the merge_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def merge_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_merge_pull_request_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: "merge_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the open_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def open_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_open_pull_request_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: "open_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the close_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def close_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_close_pull_request_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: "close_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_pull_request_file_diffs REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest] + # 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::SecureSourceManager::V1::ListPullRequestFileDiffsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse] + # A result object deserialized from the server's reply + def list_pull_request_file_diffs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_request_file_diffs_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_pull_request_file_diffs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_tree REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest] + # 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::SecureSourceManager::V1::FetchTreeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse] + # A result object deserialized from the server's reply + def fetch_tree request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_tree_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: "fetch_tree", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_blob REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest] + # 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::SecureSourceManager::V1::FetchBlobResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # A result object deserialized from the server's reply + def fetch_blob request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_blob_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: "fetch_blob", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_issue_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_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest] + # 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::SecureSourceManager::V1::Issue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # A result object deserialized from the server's reply + def get_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_issue_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_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::Issue.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_issues REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest] + # 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::SecureSourceManager::V1::ListIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse] + # A result object deserialized from the server's reply + def list_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_issues_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_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_issue_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: "update_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_issue_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_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the open_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def open_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_open_issue_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: "open_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the close_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def close_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_close_issue_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: "close_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest] + # 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::SecureSourceManager::V1::PullRequestComment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # A result object deserialized from the server's reply + def get_pull_request_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_pull_request_comment_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_pull_request_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.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_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest] + # 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::SecureSourceManager::V1::ListPullRequestCommentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse] + # A result object deserialized from the server's reply + def list_pull_request_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_request_comments_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_pull_request_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_pull_request_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_pull_request_comment_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_pull_request_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_pull_request_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_pull_request_comment_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: "update_pull_request_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_pull_request_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_pull_request_comment_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_pull_request_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_create_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_create_pull_request_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_pull_request_comments_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: "batch_create_pull_request_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resolve_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def resolve_pull_request_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resolve_pull_request_comments_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: "resolve_pull_request_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unresolve_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def unresolve_pull_request_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unresolve_pull_request_comments_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: "unresolve_pull_request_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_issue_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_issue_comment_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_issue_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest] + # 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::SecureSourceManager::V1::IssueComment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # A result object deserialized from the server's reply + def get_issue_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_issue_comment_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_issue_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::IssueComment.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_issue_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest] + # 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::SecureSourceManager::V1::ListIssueCommentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse] + # A result object deserialized from the server's reply + def list_issue_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_issue_comments_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_issue_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_issue_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_issue_comment_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: "update_issue_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_issue_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_issue_comment_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_issue_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 list_instances REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest] + # 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_instances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instances", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest] + # 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_instance_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, - uri_template: "/v1/{name}", + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/instances", + body: "instance", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest] + # 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_repositories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/repositories", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest] + # 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_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest] + # 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_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/repositories", + body: "repository", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{repository.name}", + body: "repository", + matches: [ + ["repository.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest] + # 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_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_hooks REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest] + # 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_hooks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/hooks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetHookRequest] + # 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_hook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest] + # 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_hook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/hooks", + body: "hook", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_hook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{hook.name}", + body: "hook", + matches: [ + ["hook.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest] + # 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_hook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy_repo REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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_iam_policy_repo_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy_repo REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_repo_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions_repo REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_repo_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest] + # 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_branch_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/branchRules", + body: "branch_rule", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_branch_rules REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest] + # 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_branch_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/branchRules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest] + # 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_branch_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_branch_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{branch_rule.name}", + body: "branch_rule", + matches: [ + ["branch_rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest] + # 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_branch_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest] + # 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_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/pullRequests", + body: "pull_request", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest] + # 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_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_pull_requests REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest] + # 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_pull_requests_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/pullRequests", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{pull_request.name}", + body: "pull_request", + matches: [ + ["pull_request.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the merge_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_merge_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:merge", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the open_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_open_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:open", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the close_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_close_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:close", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_pull_request_file_diffs REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest] + # 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_pull_request_file_diffs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listFileDiffs", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -758,20 +2800,62 @@ def self.transcode_get_instance_request request_pb ## # @private # - # GRPC transcoding helper method for the create_instance REST call + # GRPC transcoding helper method for the fetch_tree REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest] # 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_instance_request request_pb + def self.transcode_fetch_tree_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{repository}:fetchTree", + matches: [ + ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_blob REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_blob_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{repository}:fetchBlob", + matches: [ + ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest] + # 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_issue_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, - uri_template: "/v1/{parent}/instances", - body: "instance", + uri_template: "/v1/{parent}/issues", + body: "issue", matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -780,19 +2864,19 @@ def self.transcode_create_instance_request request_pb ## # @private # - # GRPC transcoding helper method for the delete_instance REST call + # GRPC transcoding helper method for the get_issue REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest] # 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_instance_request request_pb + def self.transcode_get_issue_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( - uri_method: :delete, + uri_method: :get, uri_template: "/v1/{name}", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -801,19 +2885,19 @@ def self.transcode_delete_instance_request request_pb ## # @private # - # GRPC transcoding helper method for the list_repositories REST call + # GRPC transcoding helper method for the list_issues REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest] # 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_repositories_request request_pb + def self.transcode_list_issues_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, - uri_template: "/v1/{parent}/repositories", + uri_template: "/v1/{parent}/issues", matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -822,19 +2906,106 @@ def self.transcode_list_repositories_request request_pb ## # @private # - # GRPC transcoding helper method for the get_repository REST call + # GRPC transcoding helper method for the update_issue REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest] # 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_repository_request request_pb + def self.transcode_update_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{issue.name}", + body: "issue", + matches: [ + ["issue.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest] + # 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_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the open_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_open_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:open", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the close_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_close_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:close", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest] + # 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_pull_request_comment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -843,20 +3014,41 @@ def self.transcode_get_repository_request request_pb ## # @private # - # GRPC transcoding helper method for the create_repository REST call + # GRPC transcoding helper method for the list_pull_request_comments REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest] # 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_repository_request request_pb + def self.transcode_list_pull_request_comments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/pullRequestComments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest] + # 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_pull_request_comment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, - uri_template: "/v1/{parent}/repositories", - body: "repository", + uri_template: "/v1/{parent}/pullRequestComments", + body: "pull_request_comment", matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -865,19 +3057,41 @@ def self.transcode_create_repository_request request_pb ## # @private # - # GRPC transcoding helper method for the delete_repository REST call + # GRPC transcoding helper method for the update_pull_request_comment REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest] # 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_repository_request request_pb + def self.transcode_update_pull_request_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{pull_request_comment.name}", + body: "pull_request_comment", + matches: [ + ["pull_request_comment.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest] + # 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_pull_request_comment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -886,19 +3100,20 @@ def self.transcode_delete_repository_request request_pb ## # @private # - # GRPC transcoding helper method for the get_iam_policy_repo REST call + # GRPC transcoding helper method for the batch_create_pull_request_comments REST call # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest] # 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_iam_policy_repo_request request_pb + def self.transcode_batch_create_pull_request_comments_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", + uri_method: :post, + uri_template: "/v1/{parent}/pullRequestComments:batchCreate", + body: "*", matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -907,20 +3122,20 @@ def self.transcode_get_iam_policy_repo_request request_pb ## # @private # - # GRPC transcoding helper method for the set_iam_policy_repo REST call + # GRPC transcoding helper method for the resolve_pull_request_comments REST call # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_repo_request request_pb + def self.transcode_resolve_pull_request_comments_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", + uri_template: "/v1/{parent}/pullRequestComments:resolve", body: "*", matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -929,20 +3144,20 @@ def self.transcode_set_iam_policy_repo_request request_pb ## # @private # - # GRPC transcoding helper method for the test_iam_permissions_repo REST call + # GRPC transcoding helper method for the unresolve_pull_request_comments REST call # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_repo_request request_pb + def self.transcode_unresolve_pull_request_comments_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", + uri_template: "/v1/{parent}/pullRequestComments:unresolve", body: "*", matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -951,20 +3166,20 @@ def self.transcode_test_iam_permissions_repo_request request_pb ## # @private # - # GRPC transcoding helper method for the create_branch_rule REST call + # GRPC transcoding helper method for the create_issue_comment REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest] # 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_branch_rule_request request_pb + def self.transcode_create_issue_comment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, - uri_template: "/v1/{parent}/branchRules", - body: "branch_rule", + uri_template: "/v1/{parent}/issueComments", + body: "issue_comment", matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -973,19 +3188,19 @@ def self.transcode_create_branch_rule_request request_pb ## # @private # - # GRPC transcoding helper method for the list_branch_rules REST call + # GRPC transcoding helper method for the get_issue_comment REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest] # 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_branch_rules_request request_pb + def self.transcode_get_issue_comment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, - uri_template: "/v1/{parent}/branchRules", + uri_template: "/v1/{name}", matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -994,19 +3209,19 @@ def self.transcode_list_branch_rules_request request_pb ## # @private # - # GRPC transcoding helper method for the get_branch_rule REST call + # GRPC transcoding helper method for the list_issue_comments REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest] # 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_branch_rule_request request_pb + def self.transcode_list_issue_comments_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, - uri_template: "/v1/{name}", + uri_template: "/v1/{parent}/issueComments", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -1015,20 +3230,20 @@ def self.transcode_get_branch_rule_request request_pb ## # @private # - # GRPC transcoding helper method for the update_branch_rule REST call + # GRPC transcoding helper method for the update_issue_comment REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters - def self.transcode_update_branch_rule_request request_pb + def self.transcode_update_issue_comment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, - uri_template: "/v1/{branch_rule.name}", - body: "branch_rule", + uri_template: "/v1/{issue_comment.name}", + body: "issue_comment", matches: [ - ["branch_rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ["issue_comment.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -1037,19 +3252,19 @@ def self.transcode_update_branch_rule_request request_pb ## # @private # - # GRPC transcoding helper method for the delete_branch_rule REST call + # GRPC transcoding helper method for the delete_issue_comment REST call # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest] + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest] # 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_branch_rule_request request_pb + def self.transcode_delete_issue_comment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] ] ) transcoder.transcode request_pb diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb index 09fd82522401..d89058573db8 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb @@ -16,7 +16,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n?google/cloud/securesourcemanager/v1/secure_source_manager.proto\x12#google.cloud.securesourcemanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\n\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.securesourcemanager.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x0eprivate_config\x18\r \x01(\x0b\x32;.google.cloud.securesourcemanager.v1.Instance.PrivateConfigB\x03\xe0\x41\x01\x12G\n\x05state\x18\x05 \x01(\x0e\x32\x33.google.cloud.securesourcemanager.v1.Instance.StateB\x03\xe0\x41\x03\x12P\n\nstate_note\x18\n \x01(\x0e\x32\x37.google.cloud.securesourcemanager.v1.Instance.StateNoteB\x03\xe0\x41\x03\x12:\n\x07kms_key\x18\x0b \x01(\tB)\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12R\n\x0bhost_config\x18\t \x01(\x0b\x32\x38.google.cloud.securesourcemanager.v1.Instance.HostConfigB\x03\xe0\x41\x03\x1a^\n\nHostConfig\x12\x11\n\x04html\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08git_http\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07git_ssh\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\xb0\x02\n\rPrivateConfig\x12\x1a\n\nis_private\x18\x01 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x02\x12;\n\x07\x63\x61_pool\x18\x02 \x01(\tB*\xe0\x41\x05\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12Q\n\x17http_service_attachment\x18\x03 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(compute.googleapis.com/ServiceAttachment\x12P\n\x16ssh_service_attachment\x18\x04 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(compute.googleapis.com/ServiceAttachment\x12!\n\x14psc_allowed_projects\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\n\n\x06PAUSED\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x06\"_\n\tStateNote\x12\x1a\n\x16STATE_NOTE_UNSPECIFIED\x10\x00\x12\x1b\n\x17PAUSED_CMEK_UNAVAILABLE\x10\x01\x12\x19\n\x11INSTANCE_RESUMING\x10\x02\x1a\x02\x08\x01:q\xea\x41n\n+securesourcemanager.googleapis.com/Instance\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xb3\x01\n\x0bGetInstance\x12\x37.google.cloud.securesourcemanager.v1.GetInstanceRequest\x1a-.google.cloud.securesourcemanager.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xea\x01\n\x0e\x43reateInstance\x12:.google.cloud.securesourcemanager.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xd6\x01\n\x0e\x44\x65leteInstance\x12:.google.cloud.securesourcemanager.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xd2\x01\n\x10ListRepositories\x12<.google.cloud.securesourcemanager.v1.ListRepositoriesRequest\x1a=.google.cloud.securesourcemanager.v1.ListRepositoriesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/repositories\x12\xbc\x01\n\rGetRepository\x12\x39.google.cloud.securesourcemanager.v1.GetRepositoryRequest\x1a/.google.cloud.securesourcemanager.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xfa\x01\n\x10\x43reateRepository\x12<.google.cloud.securesourcemanager.v1.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41\x1f\n\nRepository\x12\x11OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xdd\x01\n\x10\x44\x65leteRepository\x12<.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xa3\x01\n\x10GetIamPolicyRepo\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"T\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xa6\x01\n\x10SetIamPolicyRepo\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"W\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\xcc\x01\n\x16TestIamPermissionsRepo\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x08resource\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\x8b\x02\n\x10\x43reateBranchRule\x12<.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41\x1f\n\nBranchRule\x12\x11OperationMetadata\xda\x41!parent,branch_rule,branch_rule_id\x82\xd3\xe4\x93\x02M\">/v1/{parent=projects/*/locations/*/repositories/*}/branchRules:\x0b\x62ranch_rule\x12\xdd\x01\n\x0fListBranchRules\x12;.google.cloud.securesourcemanager.v1.ListBranchRulesRequest\x1a<.google.cloud.securesourcemanager.v1.ListBranchRulesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/branchRules\x12\xca\x01\n\rGetBranchRule\x12\x39.google.cloud.securesourcemanager.v1.GetBranchRuleRequest\x1a/.google.cloud.securesourcemanager.v1.BranchRule\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\x8d\x02\n\x10UpdateBranchRule\x12<.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nBranchRule\x12\x11OperationMetadata\xda\x41\x17\x62ranch_rule,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}:\x0b\x62ranch_rule\x12\xeb\x01\n\x10\x44\x65leteBranchRule\x12<.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x1aV\xca\x41\"securesourcemanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x04\n\'com.google.cloud.securesourcemanager.v1B\x18SecureSourceManagerProtoP\x01ZYcloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb;securesourcemanagerpb\xaa\x02#Google.Cloud.SecureSourceManager.V1\xca\x02#Google\\Cloud\\SecureSourceManager\\V1\xea\x02&Google::Cloud::SecureSourceManager::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" +descriptor_data = "\n?google/cloud/securesourcemanager/v1/secure_source_manager.proto\x12#google.cloud.securesourcemanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x98\x0c\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.securesourcemanager.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x0eprivate_config\x18\r \x01(\x0b\x32;.google.cloud.securesourcemanager.v1.Instance.PrivateConfigB\x03\xe0\x41\x01\x12G\n\x05state\x18\x05 \x01(\x0e\x32\x33.google.cloud.securesourcemanager.v1.Instance.StateB\x03\xe0\x41\x03\x12P\n\nstate_note\x18\n \x01(\x0e\x32\x37.google.cloud.securesourcemanager.v1.Instance.StateNoteB\x03\xe0\x41\x03\x12:\n\x07kms_key\x18\x0b \x01(\tB)\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12R\n\x0bhost_config\x18\t \x01(\x0b\x32\x38.google.cloud.securesourcemanager.v1.Instance.HostConfigB\x03\xe0\x41\x03\x12\x82\x01\n$workforce_identity_federation_config\x18\x0e \x01(\x0b\x32O.google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfigB\x03\xe0\x41\x01\x1a^\n\nHostConfig\x12\x11\n\x04html\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08git_http\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07git_ssh\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\xb0\x02\n\rPrivateConfig\x12\x1a\n\nis_private\x18\x01 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x02\x12;\n\x07\x63\x61_pool\x18\x02 \x01(\tB*\xe0\x41\x05\xe0\x41\x01\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12Q\n\x17http_service_attachment\x18\x03 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(compute.googleapis.com/ServiceAttachment\x12P\n\x16ssh_service_attachment\x18\x04 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(compute.googleapis.com/ServiceAttachment\x12!\n\x14psc_allowed_projects\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a<\n!WorkforceIdentityFederationConfig\x12\x17\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\n\n\x06PAUSED\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x06\"_\n\tStateNote\x12\x1a\n\x16STATE_NOTE_UNSPECIFIED\x10\x00\x12\x1b\n\x17PAUSED_CMEK_UNAVAILABLE\x10\x01\x12\x19\n\x11INSTANCE_RESUMING\x10\x02\x1a\x02\x08\x01:q\xea\x41n\n+securesourcemanager.googleapis.com/Instance\x12.google.cloud.securesourcemanager.v1.PullRequestComment.ReviewB\x03\xe0\x41\x01H\x00\x12W\n\x07\x63omment\x18\x05 \x01(\x0b\x32?.google.cloud.securesourcemanager.v1.PullRequestComment.CommentB\x03\xe0\x41\x01H\x00\x12Q\n\x04\x63ode\x18\x06 \x01(\x0b\x32<.google.cloud.securesourcemanager.v1.PullRequestComment.CodeB\x03\xe0\x41\x01H\x00\x1a\xff\x01\n\x06Review\x12\x63\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32I.google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionTypeB\x03\xe0\x41\x02\x12\x11\n\x04\x62ody\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14\x65\x66\x66\x65\x63tive_commit_sha\x18\x04 \x01(\tB\x03\xe0\x41\x03\"Z\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMMENT\x10\x01\x12\x14\n\x10\x43HANGE_REQUESTED\x10\x02\x12\x0c\n\x08\x41PPROVED\x10\x03\x1a\x1c\n\x07\x43omment\x12\x11\n\x04\x62ody\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xe8\x01\n\x04\x43ode\x12\x11\n\x04\x62ody\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x05reply\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x04\x12W\n\x08position\x18\x03 \x01(\x0b\x32@.google.cloud.securesourcemanager.v1.PullRequestComment.PositionB\x03\xe0\x41\x01\x12#\n\x16\x65\x66\x66\x65\x63tive_root_comment\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08resolved\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12!\n\x14\x65\x66\x66\x65\x63tive_commit_sha\x18\x07 \x01(\tB\x03\xe0\x41\x03\x1a\x30\n\x08Position\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02:\xb8\x01\xea\x41\xb4\x01\n5securesourcemanager.googleapis.com/PullRequestComment\x12{projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}B\x10\n\x0e\x63omment_detail\"\xa4\x01\n\x14ListInstancesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+securesourcemanager.googleapis.com/Instance\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x87\x01\n\x15ListInstancesResponse\x12@\n\tinstances\x18\x01 \x03(\x0b\x32-.google.cloud.securesourcemanager.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x12GetInstanceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"\xd5\x01\n\x15\x43reateInstanceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+securesourcemanager.googleapis.com/Instance\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x08instance\x18\x03 \x01(\x0b\x32-.google.cloud.securesourcemanager.v1.InstanceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"s\n\x15\x44\x65leteInstanceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xe8\x01\n\x17ListRepositoriesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x08instance\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"z\n\x18ListRepositoriesResponse\x12\x45\n\x0crepositories\x18\x01 \x03(\x0b\x32/.google.cloud.securesourcemanager.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"[\n\x14GetRepositoryRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\"\xc6\x01\n\x17\x43reateRepositoryRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/Repository\x12H\n\nrepository\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb5\x01\n\x17UpdateRepositoryRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12H\n\nrepository\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"z\n\x17\x44\x65leteRepositoryRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x1a\n\rallow_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x10ListHooksRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'securesourcemanager.googleapis.com/Hook\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x11ListHooksResponse\x12\x38\n\x05hooks\x18\x01 \x03(\x0b\x32).google.cloud.securesourcemanager.v1.Hook\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x0eGetHookRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'securesourcemanager.googleapis.com/Hook\"\xae\x01\n\x11\x43reateHookRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12<\n\x04hook\x18\x02 \x01(\x0b\x32).google.cloud.securesourcemanager.v1.HookB\x03\xe0\x41\x02\x12\x14\n\x07hook_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x87\x01\n\x11UpdateHookRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12<\n\x04hook\x18\x02 \x01(\x0b\x32).google.cloud.securesourcemanager.v1.HookB\x03\xe0\x41\x02\"R\n\x11\x44\x65leteHookRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'securesourcemanager.googleapis.com/Hook\"[\n\x14GetBranchRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/BranchRule\"\xc8\x01\n\x17\x43reateBranchRuleRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/BranchRule\x12I\n\x0b\x62ranch_rule\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xe0\x41\x02\x12\x1b\n\x0e\x62ranch_rule_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x90\x01\n\x16ListBranchRulesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/BranchRule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"z\n\x17\x44\x65leteBranchRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/BranchRule\x12\x1a\n\rallow_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb6\x01\n\x17UpdateBranchRuleRequest\x12I\n\x0b\x62ranch_rule\x18\x01 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"y\n\x17ListBranchRulesResponse\x12\x45\n\x0c\x62ranch_rules\x18\x01 \x03(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xae\x01\n\x18\x43reatePullRequestRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12K\n\x0cpull_request\x18\x02 \x01(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequestB\x03\xe0\x41\x02\"]\n\x15GetPullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"\x91\x01\n\x17ListPullRequestsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"|\n\x18ListPullRequestsResponse\x12G\n\rpull_requests\x18\x01 \x03(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9d\x01\n\x18UpdatePullRequestRequest\x12K\n\x0cpull_request\x18\x01 \x01(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequestB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"_\n\x17MergePullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"^\n\x16OpenPullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"_\n\x17\x43losePullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"\x98\x01\n\x1fListPullRequestFileDiffsRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"~\n ListPullRequestFileDiffsResponse\x12\x41\n\nfile_diffs\x18\x01 \x03(\x0b\x32-.google.cloud.securesourcemanager.v1.FileDiff\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x12\x43reateIssueRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12>\n\x05issue\x18\x02 \x01(\x0b\x32*.google.cloud.securesourcemanager.v1.IssueB\x03\xe0\x41\x02\"Q\n\x0fGetIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\"\x9b\x01\n\x11ListIssuesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securesourcemanager.googleapis.com/Issue\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"i\n\x12ListIssuesResponse\x12:\n\x06issues\x18\x01 \x03(\x0b\x32*.google.cloud.securesourcemanager.v1.Issue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x12UpdateIssueRequest\x12>\n\x05issue\x18\x01 \x01(\x0b\x32*.google.cloud.securesourcemanager.v1.IssueB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"g\n\x12\x44\x65leteIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"f\n\x11\x43loseIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x10OpenIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xef\x01\n\tTreeEntry\x12L\n\x04type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securesourcemanager.v1.TreeEntry.ObjectTypeB\x03\xe0\x41\x03\x12\x10\n\x03sha\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04mode\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04size\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\"I\n\nObjectType\x12\x1b\n\x17OBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TREE\x10\x01\x12\x08\n\x04\x42LOB\x10\x02\x12\n\n\x06\x43OMMIT\x10\x03\"\xb8\x01\n\x10\x46\x65tchTreeRequest\x12I\n\nrepository\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x10\n\x03ref\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\trecursive\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"r\n\x11\x46\x65tchTreeResponse\x12\x44\n\x0ctree_entries\x18\x01 \x03(\x0b\x32..google.cloud.securesourcemanager.v1.TreeEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x10\x46\x65tchBlobRequest\x12I\n\nrepository\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x10\n\x03sha\x18\x02 \x01(\tB\x03\xe0\x41\x02\"1\n\x11\x46\x65tchBlobResponse\x12\x0b\n\x03sha\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\"\xa0\x01\n\x1eListPullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x92\x01\n\x1fListPullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\n\x1f\x43reatePullRequestCommentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12Z\n\x14pull_request_comment\x18\x02 \x01(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xe0\x41\x02\"\xd3\x01\n%BatchCreatePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12[\n\x08requests\x18\x02 \x03(\x0b\x32\x44.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequestB\x03\xe0\x41\x02\"\x80\x01\n&BatchCreatePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xb3\x01\n\x1fUpdatePullRequestCommentRequest\x12Z\n\x14pull_request_comment\x18\x01 \x01(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"n\n\x1f\x44\x65letePullRequestCommentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\"k\n\x1cGetPullRequestCommentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\"\xd8\x01\n!ResolvePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12L\n\x05names\x18\x02 \x03(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tauto_fill\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"|\n\"ResolvePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xda\x01\n#UnresolvePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12L\n\x05names\x18\x02 \x03(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tauto_fill\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"~\n$UnresolvePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xac\x01\n\x19\x43reateIssueCommentRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12M\n\rissue_comment\x18\x02 \x01(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xe0\x41\x02\"_\n\x16GetIssueCommentRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/securesourcemanager.googleapis.com/IssueComment\"\x94\x01\n\x18ListIssueCommentsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/securesourcemanager.googleapis.com/IssueComment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x19ListIssueCommentsResponse\x12I\n\x0eissue_comments\x18\x01 \x03(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueComment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x19UpdateIssueCommentRequest\x12M\n\rissue_comment\x18\x01 \x01(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x19\x44\x65leteIssueCommentRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/securesourcemanager.googleapis.com/IssueComment2\xfe\x64\n\x13SecureSourceManager\x12\xc6\x01\n\rListInstances\x12\x39.google.cloud.securesourcemanager.v1.ListInstancesRequest\x1a:.google.cloud.securesourcemanager.v1.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xb3\x01\n\x0bGetInstance\x12\x37.google.cloud.securesourcemanager.v1.GetInstanceRequest\x1a-.google.cloud.securesourcemanager.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xea\x01\n\x0e\x43reateInstance\x12:.google.cloud.securesourcemanager.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xd6\x01\n\x0e\x44\x65leteInstance\x12:.google.cloud.securesourcemanager.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xd2\x01\n\x10ListRepositories\x12<.google.cloud.securesourcemanager.v1.ListRepositoriesRequest\x1a=.google.cloud.securesourcemanager.v1.ListRepositoriesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/repositories\x12\xbc\x01\n\rGetRepository\x12\x39.google.cloud.securesourcemanager.v1.GetRepositoryRequest\x1a/.google.cloud.securesourcemanager.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xfa\x01\n\x10\x43reateRepository\x12<.google.cloud.securesourcemanager.v1.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41\x1f\n\nRepository\x12\x11OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xfc\x01\n\x10UpdateRepository\x12<.google.cloud.securesourcemanager.v1.UpdateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nRepository\x12\x11OperationMetadata\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\xdd\x01\n\x10\x44\x65leteRepository\x12<.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xc5\x01\n\tListHooks\x12\x35.google.cloud.securesourcemanager.v1.ListHooksRequest\x1a\x36.google.cloud.securesourcemanager.v1.ListHooksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/hooks\x12\xb2\x01\n\x07GetHook\x12\x33.google.cloud.securesourcemanager.v1.GetHookRequest\x1a).google.cloud.securesourcemanager.v1.Hook\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xdd\x01\n\nCreateHook\x12\x36.google.cloud.securesourcemanager.v1.CreateHookRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x19\n\x04Hook\x12\x11OperationMetadata\xda\x41\x13parent,hook,hook_id\x82\xd3\xe4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/hooks:\x04hook\x12\xdf\x01\n\nUpdateHook\x12\x36.google.cloud.securesourcemanager.v1.UpdateHookRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x19\n\x04Hook\x12\x11OperationMetadata\xda\x41\x10hook,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}:\x04hook\x12\xd9\x01\n\nDeleteHook\x12\x36.google.cloud.securesourcemanager.v1.DeleteHookRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xa3\x01\n\x10GetIamPolicyRepo\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"T\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xa6\x01\n\x10SetIamPolicyRepo\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"W\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\xcc\x01\n\x16TestIamPermissionsRepo\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x08resource\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\x8b\x02\n\x10\x43reateBranchRule\x12<.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41\x1f\n\nBranchRule\x12\x11OperationMetadata\xda\x41!parent,branch_rule,branch_rule_id\x82\xd3\xe4\x93\x02M\">/v1/{parent=projects/*/locations/*/repositories/*}/branchRules:\x0b\x62ranch_rule\x12\xdd\x01\n\x0fListBranchRules\x12;.google.cloud.securesourcemanager.v1.ListBranchRulesRequest\x1a<.google.cloud.securesourcemanager.v1.ListBranchRulesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/branchRules\x12\xca\x01\n\rGetBranchRule\x12\x39.google.cloud.securesourcemanager.v1.GetBranchRuleRequest\x1a/.google.cloud.securesourcemanager.v1.BranchRule\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\x8d\x02\n\x10UpdateBranchRule\x12<.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nBranchRule\x12\x11OperationMetadata\xda\x41\x17\x62ranch_rule,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}:\x0b\x62ranch_rule\x12\xeb\x01\n\x10\x44\x65leteBranchRule\x12<.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\xa6\x02\n\x11\x43reatePullRequest\x12=.google.cloud.securesourcemanager.v1.CreatePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x13parent,pull_request\x82\xd3\xe4\x93\x02O\"?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests:\x0cpull_request\x12\xce\x01\n\x0eGetPullRequest\x12:.google.cloud.securesourcemanager.v1.GetPullRequestRequest\x1a\x30.google.cloud.securesourcemanager.v1.PullRequest\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}\x12\xe1\x01\n\x10ListPullRequests\x12<.google.cloud.securesourcemanager.v1.ListPullRequestsRequest\x1a=.google.cloud.securesourcemanager.v1.ListPullRequestsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests\x12\xb8\x02\n\x11UpdatePullRequest\x12=.google.cloud.securesourcemanager.v1.UpdatePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x18pull_request,update_mask\x82\xd3\xe4\x93\x02\\2L/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}:\x0cpull_request\x12\x90\x02\n\x10MergePullRequest\x12<.google.cloud.securesourcemanager.v1.MergePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge:\x01*\x12\x8d\x02\n\x0fOpenPullRequest\x12;.google.cloud.securesourcemanager.v1.OpenPullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open:\x01*\x12\x90\x02\n\x10\x43losePullRequest\x12<.google.cloud.securesourcemanager.v1.ClosePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close:\x01*\x12\x85\x02\n\x18ListPullRequestFileDiffs\x12\x44.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest\x1a\x45.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\x12M/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs\x12\xc4\x01\n\tFetchTree\x12\x35.google.cloud.securesourcemanager.v1.FetchTreeRequest\x1a\x36.google.cloud.securesourcemanager.v1.FetchTreeResponse\"H\x82\xd3\xe4\x93\x02\x42\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree\x12\xc4\x01\n\tFetchBlob\x12\x35.google.cloud.securesourcemanager.v1.FetchBlobRequest\x1a\x36.google.cloud.securesourcemanager.v1.FetchBlobResponse\"H\x82\xd3\xe4\x93\x02\x42\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob\x12\x80\x02\n\x0b\x43reateIssue\x12\x37.google.cloud.securesourcemanager.v1.CreateIssueRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x0cparent,issue\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/repositories/*}/issues:\x05issue\x12\xb6\x01\n\x08GetIssue\x12\x34.google.cloud.securesourcemanager.v1.GetIssueRequest\x1a*.google.cloud.securesourcemanager.v1.Issue\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xc9\x01\n\nListIssues\x12\x36.google.cloud.securesourcemanager.v1.ListIssuesRequest\x1a\x37.google.cloud.securesourcemanager.v1.ListIssuesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/repositories/*}/issues\x12\x8b\x02\n\x0bUpdateIssue\x12\x37.google.cloud.securesourcemanager.v1.UpdateIssueRequest\x1a\x1d.google.longrunning.Operation\"\xa3\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x11issue,update_mask\x82\xd3\xe4\x93\x02H2?/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}:\x05issue\x12\xdc\x01\n\x0b\x44\x65leteIssue\x12\x37.google.cloud.securesourcemanager.v1.DeleteIssueRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xf5\x01\n\tOpenIssue\x12\x35.google.cloud.securesourcemanager.v1.OpenIssueRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\">/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open:\x01*\x12\xf8\x01\n\nCloseIssue\x12\x36.google.cloud.securesourcemanager.v1.CloseIssueRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close:\x01*\x12\xf9\x01\n\x15GetPullRequestComment\x12\x41.google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest\x1a\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"d\xda\x41\x04name\x82\xd3\xe4\x93\x02W\x12U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\x8c\x02\n\x17ListPullRequestComments\x12\x43.google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest\x1a\x44.google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse\"f\xda\x41\x06parent\x82\xd3\xe4\x93\x02W\x12U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments\x12\xe1\x02\n\x18\x43reatePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41K\n6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xda\x41\x1bparent,pull_request_comment\x82\xd3\xe4\x93\x02m\"U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:\x14pull_request_comment\x12\xfc\x02\n\x18UpdatePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\xfa\x01\xca\x41K\n6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xda\x41 pull_request_comment,update_mask\x82\xd3\xe4\x93\x02\x82\x01\x32j/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}:\x14pull_request_comment\x12\x93\x02\n\x18\x44\x65letePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02W*U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\xca\x02\n\x1e\x42\x61tchCreatePullRequestComments\x12J.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41;\n&BatchCreatePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x66\"a/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate:\x01*\x12\xb7\x02\n\x1aResolvePullRequestComments\x12\x46.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41\x37\n\"ResolvePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x62\"]/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve:\x01*\x12\xbf\x02\n\x1cUnresolvePullRequestComments\x12H.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\x39\n$UnresolvePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x64\"_/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve:\x01*\x12\xb5\x02\n\x12\x43reateIssueComment\x12>.google.cloud.securesourcemanager.v1.CreateIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x45\n0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xda\x41\x14parent,issue_comment\x82\xd3\xe4\x93\x02Z\"I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments:\rissue_comment\x12\xdb\x01\n\x0fGetIssueComment\x12;.google.cloud.securesourcemanager.v1.GetIssueCommentRequest\x1a\x31.google.cloud.securesourcemanager.v1.IssueComment\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x12\xee\x01\n\x11ListIssueComments\x12=.google.cloud.securesourcemanager.v1.ListIssueCommentsRequest\x1a>.google.cloud.securesourcemanager.v1.ListIssueCommentsResponse\"Z\xda\x41\x06parent\x82\xd3\xe4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments\x12\xc8\x02\n\x12UpdateIssueComment\x12>.google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\xd2\x01\xca\x41\x45\n0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xda\x41\x19issue_comment,update_mask\x82\xd3\xe4\x93\x02h2W/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}:\rissue_comment\x12\xfb\x01\n\x12\x44\x65leteIssueComment\x12>.google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02K*I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x1aV\xca\x41\"securesourcemanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x04\n\'com.google.cloud.securesourcemanager.v1B\x18SecureSourceManagerProtoP\x01ZYcloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb;securesourcemanagerpb\xaa\x02#Google.Cloud.SecureSourceManager.V1\xca\x02#Google\\Cloud\\SecureSourceManager\\V1\xea\x02&Google::Cloud::SecureSourceManager::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -51,13 +51,31 @@ module V1 Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance").msgclass Instance::HostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.HostConfig").msgclass Instance::PrivateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.PrivateConfig").msgclass + Instance::WorkforceIdentityFederationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig").msgclass Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.State").enummodule Instance::StateNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.StateNote").enummodule Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository").msgclass Repository::URIs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.URIs").msgclass Repository::InitialConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.InitialConfig").msgclass + Hook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook").msgclass + Hook::PushOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook.PushOption").msgclass + Hook::HookEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook.HookEventType").enummodule BranchRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BranchRule").msgclass BranchRule::Check = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BranchRule.Check").msgclass + PullRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest").msgclass + PullRequest::Branch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest.Branch").msgclass + PullRequest::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest.State").enummodule + FileDiff = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FileDiff").msgclass + FileDiff::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FileDiff.Action").enummodule + Issue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Issue").msgclass + Issue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Issue.State").enummodule + IssueComment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.IssueComment").msgclass + PullRequestComment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment").msgclass + PullRequestComment::Review = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Review").msgclass + PullRequestComment::Review::ActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType").enummodule + PullRequestComment::Comment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Comment").msgclass + PullRequestComment::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Code").msgclass + PullRequestComment::Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Position").msgclass ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListInstancesRequest").msgclass ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListInstancesResponse").msgclass GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetInstanceRequest").msgclass @@ -68,13 +86,62 @@ module V1 ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListRepositoriesResponse").msgclass GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetRepositoryRequest").msgclass CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateRepositoryRequest").msgclass + UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateRepositoryRequest").msgclass DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteRepositoryRequest").msgclass + ListHooksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListHooksRequest").msgclass + ListHooksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListHooksResponse").msgclass + GetHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetHookRequest").msgclass + CreateHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateHookRequest").msgclass + UpdateHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateHookRequest").msgclass + DeleteHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteHookRequest").msgclass GetBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetBranchRuleRequest").msgclass CreateBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateBranchRuleRequest").msgclass ListBranchRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListBranchRulesRequest").msgclass DeleteBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest").msgclass UpdateBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest").msgclass ListBranchRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListBranchRulesResponse").msgclass + CreatePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreatePullRequestRequest").msgclass + GetPullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetPullRequestRequest").msgclass + ListPullRequestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestsRequest").msgclass + ListPullRequestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestsResponse").msgclass + UpdatePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdatePullRequestRequest").msgclass + MergePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.MergePullRequestRequest").msgclass + OpenPullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.OpenPullRequestRequest").msgclass + ClosePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ClosePullRequestRequest").msgclass + ListPullRequestFileDiffsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest").msgclass + ListPullRequestFileDiffsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse").msgclass + CreateIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateIssueRequest").msgclass + GetIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetIssueRequest").msgclass + ListIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssuesRequest").msgclass + ListIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssuesResponse").msgclass + UpdateIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateIssueRequest").msgclass + DeleteIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteIssueRequest").msgclass + CloseIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CloseIssueRequest").msgclass + OpenIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.OpenIssueRequest").msgclass + TreeEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.TreeEntry").msgclass + TreeEntry::ObjectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.TreeEntry.ObjectType").enummodule + FetchTreeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchTreeRequest").msgclass + FetchTreeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchTreeResponse").msgclass + FetchBlobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchBlobRequest").msgclass + FetchBlobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchBlobResponse").msgclass + ListPullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest").msgclass + ListPullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse").msgclass + CreatePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest").msgclass + BatchCreatePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest").msgclass + BatchCreatePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsResponse").msgclass + UpdatePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest").msgclass + DeletePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest").msgclass + GetPullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest").msgclass + ResolvePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest").msgclass + ResolvePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsResponse").msgclass + UnresolvePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest").msgclass + UnresolvePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsResponse").msgclass + CreateIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateIssueCommentRequest").msgclass + GetIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetIssueCommentRequest").msgclass + ListIssueCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssueCommentsRequest").msgclass + ListIssueCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssueCommentsResponse").msgclass + UpdateIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest").msgclass + DeleteIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest").msgclass end end end diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb index ad31b2af6d00..ba71d2c05854 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb @@ -27,23 +27,6 @@ module SecureSourceManager # Secure Source Manager API # # Access Secure Source Manager instances, resources, and repositories. - # - # This API is split across two servers: the Control Plane and the Data Plane. - # - # Data Plane endpoints are hosted directly by your Secure Source Manager - # instance, so you must connect to your instance's API hostname to access - # them. The API hostname looks like the following: - # - # https://[instance-id]-[project-number]-api.[location].sourcemanager.dev - # - # For example, - # - # https://my-instance-702770452863-api.us-central1.sourcemanager.dev - # - # Data Plane endpoints are denoted with **Host: Data Plane**. - # - # All other endpoints are found in the normal Cloud API location, namely, - # `securcesourcemanager.googleapis.com`. class Service include ::GRPC::GenericService @@ -62,20 +45,30 @@ class Service rpc :DeleteInstance, ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation # Lists Repositories in a given project and location. # - # **Host: Data Plane** + # The instance field is required in the query parameter for requests using + # the securesourcemanager.googleapis.com endpoint. rpc :ListRepositories, ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse # Gets metadata of a repository. - # - # **Host: Data Plane** rpc :GetRepository, ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, ::Google::Cloud::SecureSourceManager::V1::Repository # Creates a new repository in a given project and location. # - # **Host: Data Plane** + # The Repository.Instance field is required in the request body for requests + # using the securesourcemanager.googleapis.com endpoint. rpc :CreateRepository, ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, ::Google::Longrunning::Operation + # Updates the metadata of a repository. + rpc :UpdateRepository, ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::Google::Longrunning::Operation # Deletes a Repository. - # - # **Host: Data Plane** rpc :DeleteRepository, ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Google::Longrunning::Operation + # Lists hooks in a given repository. + rpc :ListHooks, ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse + # Gets metadata of a hook. + rpc :GetHook, ::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::Google::Cloud::SecureSourceManager::V1::Hook + # Creates a new hook in a given repository. + rpc :CreateHook, ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::Google::Longrunning::Operation + # Updates the metadata of a hook. + rpc :UpdateHook, ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::Google::Longrunning::Operation + # Deletes a Hook. + rpc :DeleteHook, ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::Google::Longrunning::Operation # Get IAM policy for a repository. rpc :GetIamPolicyRepo, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy # Set IAM policy on a repository. @@ -93,6 +86,66 @@ class Service rpc :UpdateBranchRule, ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Google::Longrunning::Operation # DeleteBranchRule deletes a branch rule. rpc :DeleteBranchRule, ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Google::Longrunning::Operation + # Creates a pull request. + rpc :CreatePullRequest, ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::Google::Longrunning::Operation + # Gets a pull request. + rpc :GetPullRequest, ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::Google::Cloud::SecureSourceManager::V1::PullRequest + # Lists pull requests in a repository. + rpc :ListPullRequests, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse + # Updates a pull request. + rpc :UpdatePullRequest, ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::Google::Longrunning::Operation + # Merges a pull request. + rpc :MergePullRequest, ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::Google::Longrunning::Operation + # Opens a pull request. + rpc :OpenPullRequest, ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::Google::Longrunning::Operation + # Closes a pull request without merging. + rpc :ClosePullRequest, ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::Google::Longrunning::Operation + # Lists a pull request's file diffs. + rpc :ListPullRequestFileDiffs, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse + # Fetches a tree from a repository. + rpc :FetchTree, ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse + # Fetches a blob from a repository. + rpc :FetchBlob, ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse + # Creates an issue. + rpc :CreateIssue, ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::Google::Longrunning::Operation + # Gets an issue. + rpc :GetIssue, ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::Google::Cloud::SecureSourceManager::V1::Issue + # Lists issues in a repository. + rpc :ListIssues, ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse + # Updates a issue. + rpc :UpdateIssue, ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::Google::Longrunning::Operation + # Deletes an issue. + rpc :DeleteIssue, ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::Google::Longrunning::Operation + # Opens an issue. + rpc :OpenIssue, ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::Google::Longrunning::Operation + # Closes an issue. + rpc :CloseIssue, ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::Google::Longrunning::Operation + # Gets a pull request comment. + rpc :GetPullRequestComment, ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Google::Cloud::SecureSourceManager::V1::PullRequestComment + # Lists pull request comments. + rpc :ListPullRequestComments, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse + # Creates a pull request comment. + rpc :CreatePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Google::Longrunning::Operation + # Updates a pull request comment. + rpc :UpdatePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Google::Longrunning::Operation + # Deletes a pull request comment. + rpc :DeletePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Google::Longrunning::Operation + # Batch creates pull request comments. + rpc :BatchCreatePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Google::Longrunning::Operation + # Resolves pull request comments. + rpc :ResolvePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Google::Longrunning::Operation + # Unresolves pull request comment. + rpc :UnresolvePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Google::Longrunning::Operation + # Creates an issue comment. + rpc :CreateIssueComment, ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Google::Longrunning::Operation + # Gets an issue comment. + rpc :GetIssueComment, ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Google::Cloud::SecureSourceManager::V1::IssueComment + # Lists comments in an issue. + rpc :ListIssueComments, ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse + # Updates an issue comment. + rpc :UpdateIssueComment, ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Google::Longrunning::Operation + # Deletes an issue comment. + rpc :DeleteIssueComment, ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class diff --git a/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb index 4c6060864a35..3ae2440a286a 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb @@ -62,6 +62,10 @@ module V1 # @!attribute [r] host_config # @return [::Google::Cloud::SecureSourceManager::V1::Instance::HostConfig] # Output only. A list of hostnames for this instance. + # @!attribute [rw] workforce_identity_federation_config + # @return [::Google::Cloud::SecureSourceManager::V1::Instance::WorkforceIdentityFederationConfig] + # Optional. Configuration for Workforce Identity Federation to support + # third party identity provider. If unset, defaults to the Google OIDC IdP. class Instance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -72,8 +76,7 @@ class Instance # Output only. HTML hostname. # @!attribute [r] api # @return [::String] - # Output only. API hostname. This is the hostname to use for **Host: Data - # Plane** endpoints. + # Output only. API hostname. # @!attribute [r] git_http # @return [::String] # Output only. Git HTTP hostname. @@ -91,7 +94,7 @@ class HostConfig # Required. Immutable. Indicate if it's private instance. # @!attribute [rw] ca_pool # @return [::String] - # Required. Immutable. CA pool resource, resource must in the format of + # Optional. Immutable. CA pool resource, resource must in the format of # `projects/{project}/locations/{location}/caPools/{ca_pool}`. # @!attribute [r] http_service_attachment # @return [::String] @@ -111,6 +114,16 @@ class PrivateConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # WorkforceIdentityFederationConfig allows this instance to support users + # from external identity providers. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Immutable. Whether Workforce Identity Federation is enabled. + class WorkforceIdentityFederationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] key # @return [::String] # @!attribute [rw] value @@ -170,10 +183,9 @@ module StateNote # Optional. The name of the instance in which the repository is hosted, # formatted as # `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - # When creating repository via - # securesourcemanager.googleapis.com (Control Plane API), this field is used - # as input. When creating repository via *.sourcemanager.dev (Data Plane - # API), this field is output only. + # When creating repository via securesourcemanager.googleapis.com, this field + # is used as input. When creating repository via *.sourcemanager.dev, this + # field is output only. # @!attribute [r] uid # @return [::String] # Output only. Unique identifier of the repository. @@ -357,8 +369,67 @@ class InitialConfig end end + # Metadata of a Secure Source Manager Hook. + # @!attribute [rw] name + # @return [::String] + # Identifier. A unique identifier for a Hook. The name should be of the + # format: + # `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` + # @!attribute [rw] target_uri + # @return [::String] + # Required. The target URI to which the payloads will be delivered. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Determines if the hook disabled or not. + # Set to true to stop sending traffic. + # @!attribute [rw] events + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Hook::HookEventType>] + # Optional. The events that trigger hook on. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update timestamp. + # @!attribute [r] uid + # @return [::String] + # Output only. Unique identifier of the hook. + # @!attribute [rw] push_option + # @return [::Google::Cloud::SecureSourceManager::V1::Hook::PushOption] + # Optional. The trigger option for push events. + # @!attribute [rw] sensitive_query_string + # @return [::String] + # Optional. The sensitive query string to be appended to the target URI. + class Hook + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] branch_filter + # @return [::String] + # Optional. Trigger hook for matching branches only. + # Specified as glob pattern. If empty or *, events for all branches are + # reported. Examples: main, \\{main,release*}. + # See https://pkg.go.dev/github.com/gobwas/glob documentation. + class PushOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module HookEventType + # Unspecified. + UNSPECIFIED = 0 + + # Push events are triggered when pushing to the repository. + PUSH = 1 + + # Pull request events are triggered when a pull request is opened, closed, + # reopened, or edited. + PULL_REQUEST = 2 + end + end + # Metadata of a BranchRule. BranchRule is the protection rule to enforce - # pre-defined rules on desginated branches within a repository. + # pre-defined rules on designated branches within a repository. # @!attribute [rw] name # @return [::String] # Optional. A unique identifier for a BranchRule. The name should be of the @@ -441,6 +512,281 @@ class AnnotationsEntry end end + # Metadata of a PullRequest. PullRequest is the request + # from a user to merge a branch (head) into another branch (base). + # @!attribute [r] name + # @return [::String] + # Output only. A unique identifier for a PullRequest. The number appended at + # the end is generated by the server. Format: + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` + # @!attribute [rw] title + # @return [::String] + # Required. The pull request title. + # @!attribute [rw] body + # @return [::String] + # Optional. The pull request body. Provides a detailed description of the + # changes. + # @!attribute [rw] base + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::Branch] + # Required. The branch to merge changes in. + # @!attribute [rw] head + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::Branch] + # Immutable. The branch containing the changes to be merged. + # @!attribute [r] state + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::State] + # Output only. State of the pull request (open, closed or merged). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last updated timestamp. + # @!attribute [r] close_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Close timestamp (if closed or merged). Cleared when pull + # request is re-opened. + class PullRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Branch represents a branch involved in a pull request. + # @!attribute [rw] ref + # @return [::String] + # Required. Name of the branch. + # @!attribute [r] sha + # @return [::String] + # Output only. The commit at the tip of the branch. + class Branch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the pull request. + module State + # Unspecified. + STATE_UNSPECIFIED = 0 + + # An open pull request. + OPEN = 1 + + # A closed pull request. + CLOSED = 2 + + # A merged pull request. + MERGED = 3 + end + end + + # Metadata of a FileDiff. FileDiff represents a single file diff in a pull + # request. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the file. + # @!attribute [r] action + # @return [::Google::Cloud::SecureSourceManager::V1::FileDiff::Action] + # Output only. The action taken on the file (eg. added, modified, deleted). + # @!attribute [r] sha + # @return [::String] + # Output only. The commit pointing to the file changes. + # @!attribute [r] patch + # @return [::String] + # Output only. The git patch containing the file changes. + class FileDiff + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Action taken on the file. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # The file was added. + ADDED = 1 + + # The file was modified. + MODIFIED = 2 + + # The file was deleted. + DELETED = 3 + end + end + + # Metadata of an Issue. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique identifier for an issue. The issue id is generated by + # the server. Format: + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` + # @!attribute [rw] title + # @return [::String] + # Required. Issue title. + # @!attribute [rw] body + # @return [::String] + # Optional. Issue body. Provides a detailed description of the issue. + # @!attribute [r] state + # @return [::Google::Cloud::SecureSourceManager::V1::Issue::State] + # Output only. State of the issue. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last updated timestamp. + # @!attribute [r] close_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Close timestamp (if closed). Cleared when is re-opened. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class Issue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of an issue. + module State + # Unspecified. + STATE_UNSPECIFIED = 0 + + # An open issue. + OPEN = 1 + + # A closed issue. + CLOSED = 2 + end + end + + # IssueComment represents a comment on an issue. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique identifier for an issue comment. The comment id is + # generated by the server. Format: + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` + # @!attribute [rw] body + # @return [::String] + # Required. The comment body. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last updated timestamp. + class IssueComment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PullRequestComment represents a comment on a pull request. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique identifier for the pull request comment. The comment id + # is generated by the server. Format: + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last updated timestamp. + # @!attribute [rw] review + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Review] + # Optional. The review summary comment. + # + # Note: The following fields are mutually exclusive: `review`, `comment`, `code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] comment + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Comment] + # Optional. The general pull request comment. + # + # Note: The following fields are mutually exclusive: `comment`, `review`, `code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] code + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Code] + # Optional. The comment on a code line. + # + # Note: The following fields are mutually exclusive: `code`, `review`, `comment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PullRequestComment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The review summary comment. + # @!attribute [rw] action_type + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Review::ActionType] + # Required. The review action type. + # @!attribute [rw] body + # @return [::String] + # Optional. The comment body. + # @!attribute [r] effective_commit_sha + # @return [::String] + # Output only. The effective commit sha this review is pointing to. + class Review + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The review action type. + module ActionType + # Unspecified. + ACTION_TYPE_UNSPECIFIED = 0 + + # A general review comment. + COMMENT = 1 + + # Change required from this review. + CHANGE_REQUESTED = 2 + + # Change approved from this review. + APPROVED = 3 + end + end + + # The general pull request comment. + # @!attribute [rw] body + # @return [::String] + # Required. The comment body. + class Comment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The comment on a code line. + # @!attribute [rw] body + # @return [::String] + # Required. The comment body. + # @!attribute [rw] reply + # @return [::String] + # Optional. Input only. The PullRequestComment resource name that this + # comment is replying to. + # @!attribute [rw] position + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Position] + # Optional. The position of the comment. + # @!attribute [r] effective_root_comment + # @return [::String] + # Output only. The root comment of the conversation, derived from the reply + # field. + # @!attribute [r] resolved + # @return [::Boolean] + # Output only. Boolean indicator if the comment is resolved. + # @!attribute [r] effective_commit_sha + # @return [::String] + # Output only. The effective commit sha this code comment is pointing to. + class Code + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The position of the code comment. + # @!attribute [rw] path + # @return [::String] + # Required. The path of the file. + # @!attribute [rw] line + # @return [::Integer] + # Required. The line number of the comment. Positive value means it's on + # the new side of the diff, negative value means it's on the old side. + class Position + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # ListInstancesRequest is the request to list instances. # @!attribute [rw] parent # @return [::String] @@ -560,7 +906,7 @@ class DeleteInstanceRequest # @return [::Boolean] # Output only. Identifies whether the user has requested cancellation # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a + # have {::Google::Longrunning::Operation#error Operation.error} value with a # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to # `Code.CANCELLED`. # @!attribute [r] api_version @@ -590,10 +936,9 @@ class OperationMetadata # Optional. The name of the instance in which the repository is hosted, # formatted as # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # When listing repositories via - # securesourcemanager.googleapis.com (Control Plane API), this field is - # required. When listing repositories via *.sourcemanager.dev (Data Plane - # API), this field is ignored. + # When listing repositories via securesourcemanager.googleapis.com, this + # field is required. When listing repositories via *.sourcemanager.dev, this + # field is ignored. class ListRepositoriesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -639,12 +984,32 @@ class CreateRepositoryRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # UpdateRepositoryRequest is the request to update a repository. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # repository resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] repository + # @return [::Google::Cloud::SecureSourceManager::V1::Repository] + # Required. The repository being updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. False by default. If set to true, the request is validated and + # the user is provided with an expected result, but no actual change is made. + class UpdateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # DeleteRepositoryRequest is the request to delete a repository. # @!attribute [rw] name # @return [::String] # Required. Name of the repository to delete. # The format is - # projects/\\{project_number}/locations/\\{location_id}/repositories/\\{repository_id}. + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. # @!attribute [rw] allow_missing # @return [::Boolean] # Optional. If set to true, and the repository is not found, the request will @@ -654,6 +1019,92 @@ class DeleteRepositoryRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # ListHooksRequest is request to list hooks. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListHooksRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListHooksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListHooksResponse is response to list hooks. + # @!attribute [rw] hooks + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Hook>] + # The list of hooks. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListHooksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetHookRequest is the request for getting a hook. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the hook to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + class GetHookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CreateHookRequest is the request for creating a hook. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository in which to create the hook. Values are of the + # form + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] hook + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] + # Required. The resource being created. + # @!attribute [rw] hook_id + # @return [::String] + # Required. The ID to use for the hook, which will become the final component + # of the hook's resource name. This value restricts to lower-case letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum. + class CreateHookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdateHookRequest is the request to update a hook. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # hook resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @!attribute [rw] hook + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] + # Required. The hook being updated. + class UpdateHookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteHookRequest is the request to delete a hook. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the hook to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + class DeleteHookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # GetBranchRuleRequest is the request for getting a branch rule. # @!attribute [rw] name # @return [::String] @@ -731,6 +1182,610 @@ class ListBranchRulesResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # CreatePullRequestRequest is the request to create a pull request. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository that the pull request is created from. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] pull_request + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # Required. The pull request to create. + class CreatePullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetPullRequestRequest is the request to get a pull request. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the pull request to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + class GetPullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListPullRequestsRequest is the request to list pull requests. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository in which to list pull requests. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListPullRequestsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListPullRequestsResponse is the response to list pull requests. + # @!attribute [rw] pull_requests + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # The list of pull requests. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListPullRequestsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdatePullRequestRequest is the request to update a pull request. + # @!attribute [rw] pull_request + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # Required. The pull request to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + class UpdatePullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MergePullRequestRequest is the request to merge a pull request. + # @!attribute [rw] name + # @return [::String] + # Required. The pull request to merge. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + class MergePullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OpenPullRequestRequest is the request to open a pull request. + # @!attribute [rw] name + # @return [::String] + # Required. The pull request to open. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + class OpenPullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ClosePullRequestRequest is the request to close a pull request. + # @!attribute [rw] name + # @return [::String] + # Required. The pull request to close. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + class ClosePullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListPullRequestFileDiffsRequest is the request to list pull request file + # diffs. + # @!attribute [rw] name + # @return [::String] + # Required. The pull request to list file diffs for. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListPullRequestFileDiffsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListPullRequestFileDiffsResponse is the response containing file diffs + # returned from ListPullRequestFileDiffs. + # @!attribute [rw] file_diffs + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # The list of pull request file diffs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListPullRequestFileDiffsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create an issue. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository in which to create the issue. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] issue + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # Required. The issue to create. + class CreateIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get an issue. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + class GetIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list issues. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository in which to list issues. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Used to filter the resulting issues list. + class ListIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to list issues. + # @!attribute [rw] issues + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Issue>] + # The list of issues. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update an issue. + # @!attribute [rw] issue + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # Required. The issue to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + class UpdateIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an issue. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # deletion will be blocked and an ABORTED error will be returned. + class DeleteIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to close an issue. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue to close. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # closing will be blocked and an ABORTED error will be returned. + class CloseIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to open an issue. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue to open. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # opening will be blocked and an ABORTED error will be returned. + class OpenIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an entry within a tree structure (like a Git tree). + # @!attribute [r] type + # @return [::Google::Cloud::SecureSourceManager::V1::TreeEntry::ObjectType] + # Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. + # @!attribute [r] sha + # @return [::String] + # Output only. The SHA-1 hash of the object (unique identifier). Output-only. + # @!attribute [r] path + # @return [::String] + # Output only. The path of the file or directory within the tree (e.g., + # "src/main/java/MyClass.java"). Output-only. + # @!attribute [r] mode + # @return [::String] + # Output only. The file mode as a string (e.g., "100644"). Indicates file + # type. Output-only. + # @!attribute [r] size + # @return [::Integer] + # Output only. The size of the object in bytes (only for blobs). Output-only. + class TreeEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the type of object the TreeEntry represents. + module ObjectType + # Default value, indicating the object type is unspecified. + OBJECT_TYPE_UNSPECIFIED = 0 + + # Represents a directory (folder). + TREE = 1 + + # Represents a file (contains file data). + BLOB = 2 + + # Represents a pointer to another repository (submodule). + COMMIT = 3 + end + end + + # Request message for fetching a tree structure from a repository. + # @!attribute [rw] repository + # @return [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository to fetch the tree from. + # @!attribute [rw] ref + # @return [::String] + # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + # which tree to fetch. If not specified, the default branch will be used. + # @!attribute [rw] recursive + # @return [::Boolean] + # Optional. If true, include all subfolders and their files in the response. + # If false, only the immediate children are returned. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, at most 10,000 items will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class FetchTreeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing a list of TreeEntry objects. + # @!attribute [rw] tree_entries + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # The list of TreeEntry objects. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class FetchTreeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for fetching a blob (file content) from a repository. + # @!attribute [rw] repository + # @return [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository containing the blob. + # @!attribute [rw] sha + # @return [::String] + # Required. The SHA-1 hash of the blob to retrieve. + class FetchBlobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the content of a blob. + # @!attribute [rw] sha + # @return [::String] + # The SHA-1 hash of the blob. + # @!attribute [rw] content + # @return [::String] + # The content of the blob, encoded as base64. + class FetchBlobResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list pull request comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to list pull request comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, at most 100 pull request + # comments will be returned. The maximum value is 100; values above 100 will + # be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListPullRequestCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to list pull request comments. + # @!attribute [rw] pull_request_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # The list of pull request comments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to set as page_token to retrieve the next page. If this field is + # omitted, there are no subsequent pages. + class ListPullRequestCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a pull request comment. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to create the pull request comment. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] pull_request_comment + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # Required. The pull request comment to create. + class CreatePullRequestCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to batch create pull request comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to create the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest>] + # Required. The request message specifying the resources to create. There + # should be exactly one CreatePullRequestCommentRequest with CommentDetail + # being REVIEW in the list, and no more than 100 + # CreatePullRequestCommentRequests with CommentDetail being CODE in the list + class BatchCreatePullRequestCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to batch create pull request comments. + # @!attribute [rw] pull_request_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # The list of pull request comments created. + class BatchCreatePullRequestCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a pull request comment. + # @!attribute [rw] pull_request_comment + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # Required. The pull request comment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request comment resource by the update. Updatable fields are + # `body`. + class UpdatePullRequestCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a pull request comment. A Review PullRequestComment + # cannot be deleted. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the pull request comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + class DeletePullRequestCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get a pull request comment. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the pull request comment to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + class GetPullRequestCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to resolve multiple pull request comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names of the pull request comments to resolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @!attribute [rw] auto_fill + # @return [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to resolved. If + # unset, all comments in the same thread need be present. + class ResolvePullRequestCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to resolve multiple pull request comments. + # @!attribute [rw] pull_request_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # The list of pull request comments resolved. + class ResolvePullRequestCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to unresolve multiple pull request comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names of the pull request comments to unresolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @!attribute [rw] auto_fill + # @return [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to unresolved. If + # unset, all comments in the same thread need be present. + class UnresolvePullRequestCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to unresolve multiple pull request comments. + # @!attribute [rw] pull_request_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # The list of pull request comments unresolved. + class UnresolvePullRequestCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create an issue comment. + # @!attribute [rw] parent + # @return [::String] + # Required. The issue in which to create the issue comment. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @!attribute [rw] issue_comment + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # Required. The issue comment to create. + class CreateIssueCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get an issue comment. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue comment to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + class GetIssueCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list issue comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The issue in which to list the comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListIssueCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to list issue comments. + # @!attribute [rw] issue_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # The list of issue comments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListIssueCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update an issue comment. + # @!attribute [rw] issue_comment + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # Required. The issue comment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue comment resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + class UpdateIssueCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an issue comment. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. + class DeleteIssueCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb new file mode 100644 index 000000000000..3d27add3b407 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the batch_create_pull_request_comments call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments. +# +def batch_create_pull_request_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new + + # Call the batch_create_pull_request_comments method. + result = client.batch_create_pull_request_comments request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb new file mode 100644 index 000000000000..e24883234599 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the close_issue call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#close_issue. +# +def close_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new + + # Call the close_issue method. + result = client.close_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb new file mode 100644 index 000000000000..a54a1b94cf6e --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the close_pull_request call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request. +# +def close_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new + + # Call the close_pull_request method. + result = client.close_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb new file mode 100644 index 000000000000..c1ab5431e915 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_hook call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#create_hook. +# +def create_hook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new + + # Call the create_hook method. + result = client.create_hook request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb new file mode 100644 index 000000000000..61c3da1b86a9 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_issue call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#create_issue. +# +def create_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new + + # Call the create_issue method. + result = client.create_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb new file mode 100644 index 000000000000..01f891a45785 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_issue_comment call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment. +# +def create_issue_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new + + # Call the create_issue_comment method. + result = client.create_issue_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb new file mode 100644 index 000000000000..b6d6c1b3ca24 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_pull_request call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request. +# +def create_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new + + # Call the create_pull_request method. + result = client.create_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb new file mode 100644 index 000000000000..7fb5f36effa4 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_pull_request_comment call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment. +# +def create_pull_request_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new + + # Call the create_pull_request_comment method. + result = client.create_pull_request_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb new file mode 100644 index 000000000000..17337a21e4b6 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_hook call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook. +# +def delete_hook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new + + # Call the delete_hook method. + result = client.delete_hook request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb new file mode 100644 index 000000000000..8201185bbacd --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_issue call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue. +# +def delete_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new + + # Call the delete_issue method. + result = client.delete_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb new file mode 100644 index 000000000000..8dd3f8d59f3c --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_issue_comment call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment. +# +def delete_issue_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new + + # Call the delete_issue_comment method. + result = client.delete_issue_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb new file mode 100644 index 000000000000..9c9e4bee54c6 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_pull_request_comment call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment. +# +def delete_pull_request_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new + + # Call the delete_pull_request_comment method. + result = client.delete_pull_request_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb new file mode 100644 index 000000000000..453280676ee9 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the fetch_blob call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob. +# +def fetch_blob + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new + + # Call the fetch_blob method. + result = client.fetch_blob request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb new file mode 100644 index 000000000000..b5c3b8bf2091 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the fetch_tree call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree. +# +def fetch_tree + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new + + # Call the fetch_tree method. + result = client.fetch_tree 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::SecureSourceManager::V1::TreeEntry. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb new file mode 100644 index 000000000000..c0a3c53e3187 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_hook call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#get_hook. +# +def get_hook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new + + # Call the get_hook method. + result = client.get_hook request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb new file mode 100644 index 000000000000..dcdf2c672e9c --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_issue call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#get_issue. +# +def get_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new + + # Call the get_issue method. + result = client.get_issue request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb new file mode 100644 index 000000000000..090eed282d3c --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_issue_comment call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment. +# +def get_issue_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new + + # Call the get_issue_comment method. + result = client.get_issue_comment request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb new file mode 100644 index 000000000000..3a712a930693 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_pull_request call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request. +# +def get_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new + + # Call the get_pull_request method. + result = client.get_pull_request request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb new file mode 100644 index 000000000000..c6493cdda1a0 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_pull_request_comment call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment. +# +def get_pull_request_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new + + # Call the get_pull_request_comment method. + result = client.get_pull_request_comment request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb new file mode 100644 index 000000000000..8a171810610b --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_hooks call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks. +# +def list_hooks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new + + # Call the list_hooks method. + result = client.list_hooks 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::SecureSourceManager::V1::Hook. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb new file mode 100644 index 000000000000..5fe91a537cdf --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_issue_comments call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments. +# +def list_issue_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new + + # Call the list_issue_comments method. + result = client.list_issue_comments 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::SecureSourceManager::V1::IssueComment. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb new file mode 100644 index 000000000000..680e3b304327 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_issues call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#list_issues. +# +def list_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new + + # Call the list_issues method. + result = client.list_issues 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::SecureSourceManager::V1::Issue. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb new file mode 100644 index 000000000000..014f2de5c4ee --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_pull_request_comments call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments. +# +def list_pull_request_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new + + # Call the list_pull_request_comments method. + result = client.list_pull_request_comments 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::SecureSourceManager::V1::PullRequestComment. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb new file mode 100644 index 000000000000..2b33c239028c --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_pull_request_file_diffs call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs. +# +def list_pull_request_file_diffs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new + + # Call the list_pull_request_file_diffs method. + result = client.list_pull_request_file_diffs 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::SecureSourceManager::V1::FileDiff. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb new file mode 100644 index 000000000000..5f0cf6e44b60 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_pull_requests call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests. +# +def list_pull_requests + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new + + # Call the list_pull_requests method. + result = client.list_pull_requests 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::SecureSourceManager::V1::PullRequest. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb new file mode 100644 index 000000000000..fa2e24c0f52a --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the merge_pull_request call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request. +# +def merge_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new + + # Call the merge_pull_request method. + result = client.merge_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb new file mode 100644 index 000000000000..df5eebcca650 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the open_issue call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#open_issue. +# +def open_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new + + # Call the open_issue method. + result = client.open_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb new file mode 100644 index 000000000000..a5815a5abc63 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the open_pull_request call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request. +# +def open_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new + + # Call the open_pull_request method. + result = client.open_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb new file mode 100644 index 000000000000..8d553fe1bc99 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the resolve_pull_request_comments call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments. +# +def resolve_pull_request_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new + + # Call the resolve_pull_request_comments method. + result = client.resolve_pull_request_comments request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb new file mode 100644 index 000000000000..9d4b8798420d --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the unresolve_pull_request_comments call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments. +# +def unresolve_pull_request_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new + + # Call the unresolve_pull_request_comments method. + result = client.unresolve_pull_request_comments request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb new file mode 100644 index 000000000000..3c8bf32057c4 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_hook call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#update_hook. +# +def update_hook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new + + # Call the update_hook method. + result = client.update_hook request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb new file mode 100644 index 000000000000..ce8e1609cfe0 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_issue call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#update_issue. +# +def update_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new + + # Call the update_issue method. + result = client.update_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb new file mode 100644 index 000000000000..f660c1c8c72b --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_issue_comment call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment. +# +def update_issue_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new + + # Call the update_issue_comment method. + result = client.update_issue_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb new file mode 100644 index 000000000000..4d831958edb2 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_pull_request call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request. +# +def update_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new + + # Call the update_pull_request method. + result = client.update_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb new file mode 100644 index 000000000000..19ac42f2303a --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_pull_request_comment call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment. +# +def update_pull_request_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new + + # Call the update_pull_request_comment method. + result = client.update_pull_request_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb new file mode 100644 index 000000000000..079eeb6e1871 --- /dev/null +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_repository call in the SecureSourceManager 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::SecureSourceManager::V1::SecureSourceManager::Client#update_repository. +# +def update_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new + + # Call the update_repository method. + result = client.update_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync] diff --git a/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json b/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json index 60684618c19c..b5c0546b1878 100644 --- a/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json +++ b/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json @@ -291,6 +291,46 @@ } ] }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync", + "title": "Snippet for the update_repository call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_repository.", + "file": "secure_source_manager/update_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_repository", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateRepository", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateRepository", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync", "title": "Snippet for the delete_repository call in the SecureSourceManager service", @@ -331,6 +371,206 @@ } ] }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync", + "title": "Snippet for the list_hooks call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks.", + "file": "secure_source_manager/list_hooks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_hooks", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListHooksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListHooksResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListHooks", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListHooks", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync", + "title": "Snippet for the get_hook call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_hook.", + "file": "secure_source_manager/get_hook.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_hook", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_hook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetHookRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::Hook", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetHook", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetHook", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync", + "title": "Snippet for the create_hook call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_hook.", + "file": "secure_source_manager/create_hook.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_hook", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_hook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateHookRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateHook", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateHook", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync", + "title": "Snippet for the update_hook call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_hook.", + "file": "secure_source_manager/update_hook.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_hook", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_hook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateHook", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateHook", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync", + "title": "Snippet for the delete_hook call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook.", + "file": "secure_source_manager/delete_hook.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_hook", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteHook", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteHook", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync", "title": "Snippet for the get_iam_policy_repo call in the SecureSourceManager service", @@ -650,6 +890,1206 @@ "type": "FULL" } ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync", + "title": "Snippet for the create_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request.", + "file": "secure_source_manager/create_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreatePullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreatePullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync", + "title": "Snippet for the get_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request.", + "file": "secure_source_manager/get_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::PullRequest", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetPullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetPullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync", + "title": "Snippet for the list_pull_requests call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests.", + "file": "secure_source_manager/list_pull_requests.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_pull_requests", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListPullRequests", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequests", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync", + "title": "Snippet for the update_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request.", + "file": "secure_source_manager/update_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdatePullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdatePullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync", + "title": "Snippet for the merge_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request.", + "file": "secure_source_manager/merge_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "merge_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "MergePullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.MergePullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync", + "title": "Snippet for the open_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request.", + "file": "secure_source_manager/open_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "open_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "OpenPullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.OpenPullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync", + "title": "Snippet for the close_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request.", + "file": "secure_source_manager/close_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "close_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ClosePullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ClosePullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync", + "title": "Snippet for the list_pull_request_file_diffs call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs.", + "file": "secure_source_manager/list_pull_request_file_diffs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_pull_request_file_diffs", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListPullRequestFileDiffs", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequestFileDiffs", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync", + "title": "Snippet for the fetch_tree call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree.", + "file": "secure_source_manager/fetch_tree.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_tree", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "FetchTree", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.FetchTree", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync", + "title": "Snippet for the fetch_blob call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob.", + "file": "secure_source_manager/fetch_blob.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_blob", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "FetchBlob", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.FetchBlob", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync", + "title": "Snippet for the create_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue.", + "file": "secure_source_manager/create_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync", + "title": "Snippet for the get_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue.", + "file": "secure_source_manager/get_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::Issue", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync", + "title": "Snippet for the list_issues call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issues.", + "file": "secure_source_manager/list_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_issues", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListIssues", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListIssues", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync", + "title": "Snippet for the update_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue.", + "file": "secure_source_manager/update_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync", + "title": "Snippet for the delete_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue.", + "file": "secure_source_manager/delete_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync", + "title": "Snippet for the open_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_issue.", + "file": "secure_source_manager/open_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "open_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "OpenIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.OpenIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync", + "title": "Snippet for the close_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_issue.", + "file": "secure_source_manager/close_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "close_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CloseIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CloseIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync", + "title": "Snippet for the get_pull_request_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment.", + "file": "secure_source_manager/get_pull_request_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_pull_request_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::PullRequestComment", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetPullRequestComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetPullRequestComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync", + "title": "Snippet for the list_pull_request_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments.", + "file": "secure_source_manager/list_pull_request_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_pull_request_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListPullRequestComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequestComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync", + "title": "Snippet for the create_pull_request_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment.", + "file": "secure_source_manager/create_pull_request_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_pull_request_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreatePullRequestComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreatePullRequestComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync", + "title": "Snippet for the update_pull_request_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment.", + "file": "secure_source_manager/update_pull_request_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_pull_request_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdatePullRequestComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdatePullRequestComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync", + "title": "Snippet for the delete_pull_request_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment.", + "file": "secure_source_manager/delete_pull_request_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_pull_request_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeletePullRequestComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeletePullRequestComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync", + "title": "Snippet for the batch_create_pull_request_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments.", + "file": "secure_source_manager/batch_create_pull_request_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_pull_request_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "BatchCreatePullRequestComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.BatchCreatePullRequestComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync", + "title": "Snippet for the resolve_pull_request_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments.", + "file": "secure_source_manager/resolve_pull_request_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "resolve_pull_request_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ResolvePullRequestComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ResolvePullRequestComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync", + "title": "Snippet for the unresolve_pull_request_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments.", + "file": "secure_source_manager/unresolve_pull_request_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "unresolve_pull_request_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UnresolvePullRequestComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UnresolvePullRequestComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync", + "title": "Snippet for the create_issue_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment.", + "file": "secure_source_manager/create_issue_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_issue_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateIssueComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateIssueComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync", + "title": "Snippet for the get_issue_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment.", + "file": "secure_source_manager/get_issue_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_issue_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::IssueComment", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetIssueComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetIssueComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync", + "title": "Snippet for the list_issue_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments.", + "file": "secure_source_manager/list_issue_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_issue_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListIssueComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListIssueComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync", + "title": "Snippet for the update_issue_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment.", + "file": "secure_source_manager/update_issue_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_issue_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateIssueComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateIssueComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync", + "title": "Snippet for the delete_issue_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment.", + "file": "secure_source_manager/delete_issue_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_issue_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteIssueComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteIssueComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb index cf01d9a7e076..4a6c750b2157 100644 --- a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb +++ b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb @@ -77,6 +77,18 @@ def test_crypto_key_path end end + def test_hook_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.hook_path project: "value0", location: "value1", repository: "value2", hook: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/hooks/value3", path + end + end + def test_instance_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -89,6 +101,30 @@ def test_instance_path end end + def test_issue_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.issue_path project: "value0", location: "value1", repository: "value2", issue: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/issues/value3", path + end + end + + def test_issue_comment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.issue_comment_path project: "value0", location: "value1", repository: "value2", issue: "value3", comment: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/issues/value3/issueComments/value4", path + 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 @@ -101,6 +137,30 @@ def test_location_path end end + def test_pull_request_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.pull_request_path project: "value0", location: "value1", repository: "value2", pull_request: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/pullRequests/value3", path + end + end + + def test_pull_request_comment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.pull_request_comment_path project: "value0", location: "value1", repository: "value2", pull_request: "value3", comment: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/pullRequests/value3/pullRequestComments/value4", path + end + end + def test_repository_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb index 0c6755c884f6..0964d4f74760 100644 --- a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb +++ b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb @@ -470,6 +470,62 @@ def test_create_repository end end + def test_update_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + repository = {} + validate_only = true + + update_repository_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_repository update_mask: update_mask, repository: repository, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_repository ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_repository(::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_repository_client_stub.call_count + end + end + end + def test_delete_repository # Create test objects. client_result = ::Google::Longrunning::Operation.new @@ -525,173 +581,173 @@ def test_delete_repository end end - def test_get_iam_policy_repo + def test_list_hooks # Create test objects. - client_result = ::Google::Iam::V1::Policy.new + client_result = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.new http_response = OpenStruct.new body: client_result.to_json call_options = {} # Create request parameters for a unary method. - resource = "hello world" - options = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" - get_iam_policy_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + list_hooks_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_iam_policy_repo_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_repo_client_stub do + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_hooks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_hooks_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.credentials = :dummy_value end # Use hash object - client.get_iam_policy_repo({ resource: resource, options: options }) do |_result, response| + client.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.get_iam_policy_repo resource: resource, options: options do |_result, response| + client.list_hooks parent: parent, page_size: page_size, page_token: page_token do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.get_iam_policy_repo ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + client.list_hooks ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, 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.get_iam_policy_repo({ resource: resource, options: options }, call_options) do |_result, response| + client.list_hooks({ parent: parent, 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.get_iam_policy_repo(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + client.list_hooks(::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, 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, get_iam_policy_repo_client_stub.call_count + assert_equal 5, list_hooks_client_stub.call_count end end end - def test_set_iam_policy_repo + def test_get_hook # Create test objects. - client_result = ::Google::Iam::V1::Policy.new + client_result = ::Google::Cloud::SecureSourceManager::V1::Hook.new http_response = OpenStruct.new body: client_result.to_json call_options = {} # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} + name = "hello world" - set_iam_policy_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + get_hook_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_set_iam_policy_repo_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_repo_client_stub do + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_hook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_hook_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.credentials = :dummy_value end # Use hash object - client.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + client.get_hook({ name: name }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.set_iam_policy_repo resource: resource, policy: policy, update_mask: update_mask do |_result, response| + client.get_hook name: name do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.set_iam_policy_repo ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + client.get_hook ::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + client.get_hook({ name: name }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.set_iam_policy_repo(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + client.get_hook(::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name), call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Verify method calls - assert_equal 5, set_iam_policy_repo_client_stub.call_count + assert_equal 5, get_hook_client_stub.call_count end end end - def test_test_iam_permissions_repo + def test_create_hook # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + client_result = ::Google::Longrunning::Operation.new http_response = OpenStruct.new body: client_result.to_json call_options = {} # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] + parent = "hello world" + hook = {} + hook_id = "hello world" - test_iam_permissions_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + create_hook_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_repo_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_repo_client_stub do + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_hook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_hook_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.credentials = :dummy_value end # Use hash object - client.test_iam_permissions_repo({ resource: resource, permissions: permissions }) do |_result, response| + client.create_hook({ parent: parent, hook: hook, hook_id: hook_id }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.test_iam_permissions_repo resource: resource, permissions: permissions do |_result, response| + client.create_hook parent: parent, hook: hook, hook_id: hook_id do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.test_iam_permissions_repo ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + client.create_hook ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.test_iam_permissions_repo({ resource: resource, permissions: permissions }, call_options) do |_result, response| + client.create_hook({ parent: parent, hook: hook, hook_id: hook_id }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.test_iam_permissions_repo(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + client.create_hook(::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id), call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Verify method calls - assert_equal 5, test_iam_permissions_repo_client_stub.call_count + assert_equal 5, create_hook_client_stub.call_count end end end - def test_create_branch_rule + def test_update_hook # Create test objects. client_result = ::Google::Longrunning::Operation.new http_response = OpenStruct.new body: client_result.to_json @@ -699,221 +755,274 @@ def test_create_branch_rule call_options = {} # Create request parameters for a unary method. - parent = "hello world" - branch_rule = {} - branch_rule_id = "hello world" + update_mask = {} + hook = {} - create_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + update_hook_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_branch_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_branch_rule_client_stub do + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_hook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_hook_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.credentials = :dummy_value end # Use hash object - client.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }) do |_result, response| + client.update_hook({ update_mask: update_mask, hook: hook }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.create_branch_rule parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id do |_result, response| + client.update_hook update_mask: update_mask, hook: hook do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.create_branch_rule ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id) do |_result, response| + client.update_hook ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }, call_options) do |_result, response| + client.update_hook({ update_mask: update_mask, hook: hook }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.create_branch_rule(::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id), call_options) do |_result, response| + client.update_hook(::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook), call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Verify method calls - assert_equal 5, create_branch_rule_client_stub.call_count + assert_equal 5, update_hook_client_stub.call_count end end end - def test_list_branch_rules + def test_delete_hook # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.new + client_result = ::Google::Longrunning::Operation.new http_response = OpenStruct.new body: client_result.to_json call_options = {} # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" + name = "hello world" - list_branch_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + delete_hook_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_branch_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_branch_rules_client_stub do + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_hook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_hook_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.credentials = :dummy_value end # Use hash object - client.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + client.delete_hook({ name: name }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_branch_rules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + client.delete_hook name: name do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_branch_rules ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + client.delete_hook ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.delete_hook({ name: name }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_branch_rules(::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.delete_hook(::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name), call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Verify method calls - assert_equal 5, list_branch_rules_client_stub.call_count + assert_equal 5, delete_hook_client_stub.call_count end end end - def test_get_branch_rule + def test_get_iam_policy_repo # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::BranchRule.new + client_result = ::Google::Iam::V1::Policy.new http_response = OpenStruct.new body: client_result.to_json call_options = {} # Create request parameters for a unary method. - name = "hello world" + resource = "hello world" + options = {} - get_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + get_iam_policy_repo_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_branch_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_branch_rule_client_stub do + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_iam_policy_repo_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_repo_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.credentials = :dummy_value end # Use hash object - client.get_branch_rule({ name: name }) do |_result, response| + client.get_iam_policy_repo({ resource: resource, options: options }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.get_branch_rule name: name do |_result, response| + client.get_iam_policy_repo resource: resource, options: options do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.get_branch_rule ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name) do |_result, response| + client.get_iam_policy_repo ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.get_branch_rule({ name: name }, call_options) do |_result, response| + client.get_iam_policy_repo({ resource: resource, options: options }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.get_branch_rule(::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name), call_options) do |_result, response| + client.get_iam_policy_repo(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Verify method calls - assert_equal 5, get_branch_rule_client_stub.call_count + assert_equal 5, get_iam_policy_repo_client_stub.call_count end end end - def test_update_branch_rule + def test_set_iam_policy_repo # Create test objects. - client_result = ::Google::Longrunning::Operation.new + client_result = ::Google::Iam::V1::Policy.new http_response = OpenStruct.new body: client_result.to_json call_options = {} # Create request parameters for a unary method. - branch_rule = {} - validate_only = true + resource = "hello world" + policy = {} update_mask = {} - update_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + set_iam_policy_repo_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_branch_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_branch_rule_client_stub do + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_set_iam_policy_repo_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_repo_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.credentials = :dummy_value end # Use hash object - client.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + client.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.update_branch_rule branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask do |_result, response| + client.set_iam_policy_repo resource: resource, policy: policy, update_mask: update_mask do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.update_branch_rule ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask) do |_result, response| + client.set_iam_policy_repo ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + client.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.update_branch_rule(::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + client.set_iam_policy_repo(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Verify method calls - assert_equal 5, update_branch_rule_client_stub.call_count + assert_equal 5, set_iam_policy_repo_client_stub.call_count end end end - def test_delete_branch_rule + def test_test_iam_permissions_repo + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_repo_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_repo_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_repo_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions_repo({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions_repo resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions_repo ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions_repo({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions_repo(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_repo_client_stub.call_count + end + end + end + + def test_create_branch_rule # Create test objects. client_result = ::Google::Longrunning::Operation.new http_response = OpenStruct.new body: client_result.to_json @@ -921,49 +1030,1923 @@ def test_delete_branch_rule call_options = {} # Create request parameters for a unary method. - name = "hello world" - allow_missing = true + parent = "hello world" + branch_rule = {} + branch_rule_id = "hello world" - delete_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + create_branch_rule_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_branch_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_branch_rule_client_stub do + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_branch_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_branch_rule_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.credentials = :dummy_value end # Use hash object - client.delete_branch_rule({ name: name, allow_missing: allow_missing }) do |_result, response| + client.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.delete_branch_rule name: name, allow_missing: allow_missing do |_result, response| + client.create_branch_rule parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.delete_branch_rule ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing) do |_result, response| + client.create_branch_rule ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.delete_branch_rule({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| + client.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.delete_branch_rule(::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| + client.create_branch_rule(::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id), call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Verify method calls - assert_equal 5, delete_branch_rule_client_stub.call_count + assert_equal 5, create_branch_rule_client_stub.call_count + end + end + end + + def test_list_branch_rules + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_branch_rules_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_branch_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_branch_rules_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_branch_rules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_branch_rules ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, 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_branch_rules({ parent: parent, 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_branch_rules(::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, 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_branch_rules_client_stub.call_count + end + end + end + + def test_get_branch_rule + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::BranchRule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_branch_rule_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_branch_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_branch_rule_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_branch_rule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_branch_rule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_branch_rule ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_branch_rule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_branch_rule(::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_branch_rule_client_stub.call_count + end + end + end + + def test_update_branch_rule + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + branch_rule = {} + validate_only = true + update_mask = {} + + update_branch_rule_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_branch_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_branch_rule_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_branch_rule branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_branch_rule ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_branch_rule(::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_branch_rule_client_stub.call_count + end + end + end + + def test_delete_branch_rule + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + allow_missing = true + + delete_branch_rule_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_branch_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_branch_rule_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_branch_rule({ name: name, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_branch_rule name: name, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_branch_rule ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_branch_rule({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_branch_rule(::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_branch_rule_client_stub.call_count + end + end + end + + def test_create_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + pull_request = {} + + create_pull_request_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_pull_request({ parent: parent, pull_request: pull_request }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_pull_request parent: parent, pull_request: pull_request do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_pull_request ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_pull_request({ parent: parent, pull_request: pull_request }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_pull_request(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_pull_request_client_stub.call_count + end + end + end + + def test_get_pull_request + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::PullRequest.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_pull_request_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_pull_request({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_pull_request name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_pull_request ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_pull_request({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_pull_request(::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_pull_request_client_stub.call_count + end + end + end + + def test_list_pull_requests + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_requests_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_requests_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_pull_requests_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_pull_requests parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_pull_requests ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, 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_pull_requests({ parent: parent, 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_pull_requests(::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, 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_pull_requests_client_stub.call_count + end + end + end + + def test_update_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + pull_request = {} + update_mask = {} + + update_pull_request_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_pull_request({ pull_request: pull_request, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_pull_request pull_request: pull_request, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_pull_request ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_pull_request({ pull_request: pull_request, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_pull_request(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_pull_request_client_stub.call_count + end + end + end + + def test_merge_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + merge_pull_request_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_merge_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, merge_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.merge_pull_request({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.merge_pull_request name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.merge_pull_request ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.merge_pull_request({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.merge_pull_request(::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, merge_pull_request_client_stub.call_count + end + end + end + + def test_open_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + open_pull_request_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_open_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, open_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.open_pull_request({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.open_pull_request name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.open_pull_request ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.open_pull_request({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.open_pull_request(::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, open_pull_request_client_stub.call_count + end + end + end + + def test_close_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + close_pull_request_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_close_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, close_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.close_pull_request({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.close_pull_request name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.close_pull_request ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.close_pull_request({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.close_pull_request(::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, close_pull_request_client_stub.call_count + end + end + end + + def test_list_pull_request_file_diffs + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_request_file_diffs_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_request_file_diffs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_pull_request_file_diffs_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_pull_request_file_diffs name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_pull_request_file_diffs ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, 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_pull_request_file_diffs({ name: name, 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_pull_request_file_diffs(::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, 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_pull_request_file_diffs_client_stub.call_count + end + end + end + + def test_fetch_tree + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + repository = "hello world" + ref = "hello world" + recursive = true + page_size = 42 + page_token = "hello world" + + fetch_tree_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_fetch_tree_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_tree_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_tree repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_tree ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, 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.fetch_tree({ repository: repository, ref: ref, recursive: recursive, 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.fetch_tree(::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, 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, fetch_tree_client_stub.call_count + end + end + end + + def test_fetch_blob + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + repository = "hello world" + sha = "hello world" + + fetch_blob_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_fetch_blob_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_blob_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_blob({ repository: repository, sha: sha }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_blob repository: repository, sha: sha do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_blob ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_blob({ repository: repository, sha: sha }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_blob(::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_blob_client_stub.call_count + end + end + end + + def test_create_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + issue = {} + + create_issue_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_issue({ parent: parent, issue: issue }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_issue parent: parent, issue: issue do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_issue ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_issue({ parent: parent, issue: issue }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_issue(::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_issue_client_stub.call_count + end + end + end + + def test_get_issue + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::Issue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_issue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_issue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_issue ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_issue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_issue(::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_issue_client_stub.call_count + end + end + end + + def test_list_issues + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_issues_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_issues_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_issues({ parent: parent, 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_issues parent: parent, 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_issues ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, 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_issues({ parent: parent, 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_issues(::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, 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_issues_client_stub.call_count + end + end + end + + def test_update_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + issue = {} + update_mask = {} + + update_issue_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_issue({ issue: issue, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_issue issue: issue, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_issue ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_issue({ issue: issue, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_issue(::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_issue_client_stub.call_count + end + end + end + + def test_delete_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_issue_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_issue({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_issue name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_issue ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_issue({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_issue(::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_issue_client_stub.call_count + end + end + end + + def test_open_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + open_issue_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_open_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, open_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.open_issue({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.open_issue name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.open_issue ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.open_issue({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.open_issue(::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, open_issue_client_stub.call_count + end + end + end + + def test_close_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + close_issue_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_close_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, close_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.close_issue({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.close_issue name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.close_issue ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.close_issue({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.close_issue(::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, close_issue_client_stub.call_count + end + end + end + + def test_get_pull_request_comment + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_pull_request_comment_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_pull_request_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_pull_request_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_pull_request_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_pull_request_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_pull_request_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_pull_request_comment_client_stub.call_count + end + end + end + + def test_list_pull_request_comments + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_request_comments_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_request_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_pull_request_comments_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_pull_request_comments parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, 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_pull_request_comments({ parent: parent, 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_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, 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_pull_request_comments_client_stub.call_count + end + end + end + + def test_create_pull_request_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + pull_request_comment = {} + + create_pull_request_comment_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_pull_request_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_pull_request_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_pull_request_comment parent: parent, pull_request_comment: pull_request_comment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_pull_request_comment_client_stub.call_count + end + end + end + + def test_update_pull_request_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + pull_request_comment = {} + update_mask = {} + + update_pull_request_comment_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_pull_request_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_pull_request_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_pull_request_comment pull_request_comment: pull_request_comment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_pull_request_comment_client_stub.call_count + end + end + end + + def test_delete_pull_request_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_pull_request_comment_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_pull_request_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_pull_request_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_pull_request_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_pull_request_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_pull_request_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_pull_request_comment_client_stub.call_count + end + end + end + + def test_batch_create_pull_request_comments + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_pull_request_comments_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_batch_create_pull_request_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_pull_request_comments_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_create_pull_request_comments({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_create_pull_request_comments parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_create_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_create_pull_request_comments({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_create_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_pull_request_comments_client_stub.call_count + end + end + end + + def test_resolve_pull_request_comments + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + auto_fill = true + + resolve_pull_request_comments_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_resolve_pull_request_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resolve_pull_request_comments_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.resolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.resolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.resolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resolve_pull_request_comments_client_stub.call_count + end + end + end + + def test_unresolve_pull_request_comments + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + auto_fill = true + + unresolve_pull_request_comments_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_unresolve_pull_request_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unresolve_pull_request_comments_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.unresolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.unresolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.unresolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unresolve_pull_request_comments_client_stub.call_count + end + end + end + + def test_create_issue_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + issue_comment = {} + + create_issue_comment_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_issue_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_issue_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_issue_comment({ parent: parent, issue_comment: issue_comment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_issue_comment parent: parent, issue_comment: issue_comment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_issue_comment ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_issue_comment({ parent: parent, issue_comment: issue_comment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_issue_comment(::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_issue_comment_client_stub.call_count + end + end + end + + def test_get_issue_comment + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::IssueComment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_comment_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_issue_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_issue_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_issue_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_issue_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_issue_comment ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_issue_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_issue_comment(::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_issue_comment_client_stub.call_count + end + end + end + + def test_list_issue_comments + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_issue_comments_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_issue_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_issue_comments_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_issue_comments parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_issue_comments ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, 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_issue_comments({ parent: parent, 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_issue_comments(::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, 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_issue_comments_client_stub.call_count + end + end + end + + def test_update_issue_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + issue_comment = {} + update_mask = {} + + update_issue_comment_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_issue_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_issue_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_issue_comment issue_comment: issue_comment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_issue_comment ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_issue_comment(::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_issue_comment_client_stub.call_count + end + end + end + + def test_delete_issue_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_issue_comment_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::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_issue_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_issue_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_issue_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_issue_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_issue_comment ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_issue_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_issue_comment(::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_issue_comment_client_stub.call_count end end end diff --git a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb index 6337357b5029..a17148daa13a 100644 --- a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb +++ b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb @@ -523,6 +523,73 @@ def test_create_repository end end + def test_update_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + repository = {} + validate_only = true + + update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_repository, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Repository), request["repository"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_repository_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_repository update_mask: update_mask, repository: repository, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_repository ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_repository(::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_repository_client_stub.call_rpc_count + end + end + def test_delete_repository # Create GRPC objects. grpc_response = ::Google::Longrunning::Operation.new @@ -532,245 +599,2500 @@ def test_delete_repository # Create request parameters for a unary method. name = "hello world" - allow_missing = true + allow_missing = true + + delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_repository, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_repository_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_repository({ name: name, allow_missing: allow_missing }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_repository name: name, allow_missing: allow_missing do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_repository ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_repository({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_repository(::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_repository_client_stub.call_rpc_count + end + end + + def test_list_hooks + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.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" + page_size = 42 + page_token = "hello world" + + list_hooks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_hooks, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_hooks_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_hooks({ parent: parent, 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_hooks parent: parent, 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_hooks ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, 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_hooks({ parent: parent, 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_hooks(::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, 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_hooks_client_stub.call_rpc_count + end + end + + def test_get_hook + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::Hook.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" + + get_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_hook, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetHookRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_hook_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_hook({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_hook name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_hook ::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_hook({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_hook(::Google::Cloud::SecureSourceManager::V1::GetHookRequest.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, get_hook_client_stub.call_rpc_count + end + end + + def test_create_hook + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + hook = {} + hook_id = "hello world" + + create_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_hook, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Hook), request["hook"] + assert_equal "hello world", request["hook_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_hook_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_hook({ parent: parent, hook: hook, hook_id: hook_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_hook parent: parent, hook: hook, hook_id: hook_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_hook ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_hook({ parent: parent, hook: hook, hook_id: hook_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_hook(::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_hook_client_stub.call_rpc_count + end + end + + def test_update_hook + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + hook = {} + + update_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_hook, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Hook), request["hook"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_hook_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_hook({ update_mask: update_mask, hook: hook }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_hook update_mask: update_mask, hook: hook do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_hook ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_hook({ update_mask: update_mask, hook: hook }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_hook(::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_hook_client_stub.call_rpc_count + end + end + + def test_delete_hook + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_hook, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_hook_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_hook({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_hook name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_hook ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_hook({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_hook(::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_hook_client_stub.call_rpc_count + end + end + + def test_get_iam_policy_repo + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.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. + resource = "hello world" + options = {} + + get_iam_policy_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy_repo, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_repo_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy_repo({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy_repo resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy_repo ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy_repo({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy_repo(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_repo_client_stub.call_rpc_count + end + end + + def test_set_iam_policy_repo + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.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. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy_repo, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_repo_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy_repo resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy_repo ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy_repo(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_repo_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions_repo + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions_repo, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_repo_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions_repo({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions_repo resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions_repo ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions_repo({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions_repo(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_repo_client_stub.call_rpc_count + end + end + + def test_create_branch_rule + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + branch_rule = {} + branch_rule_id = "hello world" + + create_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_branch_rule, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::BranchRule), request["branch_rule"] + assert_equal "hello world", request["branch_rule_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_branch_rule_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_branch_rule parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_branch_rule ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_branch_rule(::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_branch_rule_client_stub.call_rpc_count + end + end + + def test_list_branch_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.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" + page_size = 42 + page_token = "hello world" + + list_branch_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_branch_rules, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_branch_rules_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_branch_rules({ parent: parent, 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_branch_rules parent: parent, 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_branch_rules ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, 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_branch_rules({ parent: parent, 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_branch_rules(::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, 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_branch_rules_client_stub.call_rpc_count + end + end + + def test_get_branch_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::BranchRule.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" + + get_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_branch_rule, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_branch_rule_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_branch_rule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_branch_rule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_branch_rule ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_branch_rule({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_branch_rule(::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.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, get_branch_rule_client_stub.call_rpc_count + end + end + + def test_update_branch_rule + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + branch_rule = {} + validate_only = true + update_mask = {} + + update_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_branch_rule, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::BranchRule), request["branch_rule"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_branch_rule_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_branch_rule branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_branch_rule ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_branch_rule(::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_branch_rule_client_stub.call_rpc_count + end + end + + def test_delete_branch_rule + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + allow_missing = true + + delete_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_branch_rule, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_branch_rule_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_branch_rule({ name: name, allow_missing: allow_missing }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_branch_rule name: name, allow_missing: allow_missing do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_branch_rule ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_branch_rule({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_branch_rule(::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_branch_rule_client_stub.call_rpc_count + end + end + + def test_create_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + pull_request = {} + + create_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequest), request["pull_request"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_pull_request({ parent: parent, pull_request: pull_request }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_pull_request parent: parent, pull_request: pull_request do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_pull_request ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_pull_request({ parent: parent, pull_request: pull_request }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_pull_request(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_pull_request_client_stub.call_rpc_count + end + end + + def test_get_pull_request + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::PullRequest.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" + + get_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_pull_request({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_pull_request name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_pull_request ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_pull_request({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_pull_request(::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.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, get_pull_request_client_stub.call_rpc_count + end + end + + def test_list_pull_requests + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.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" + page_size = 42 + page_token = "hello world" + + list_pull_requests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_pull_requests, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_pull_requests_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_pull_requests({ parent: parent, 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_pull_requests parent: parent, 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_pull_requests ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, 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_pull_requests({ parent: parent, 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_pull_requests(::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, 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_pull_requests_client_stub.call_rpc_count + end + end + + def test_update_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + pull_request = {} + update_mask = {} + + update_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequest), request["pull_request"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_pull_request({ pull_request: pull_request, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_pull_request pull_request: pull_request, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_pull_request ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_pull_request({ pull_request: pull_request, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_pull_request(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_pull_request_client_stub.call_rpc_count + end + end + + def test_merge_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + merge_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :merge_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, merge_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.merge_pull_request({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.merge_pull_request name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.merge_pull_request ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.merge_pull_request({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.merge_pull_request(::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, merge_pull_request_client_stub.call_rpc_count + end + end + + def test_open_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + open_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :open_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, open_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.open_pull_request({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.open_pull_request name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.open_pull_request ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.open_pull_request({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.open_pull_request(::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, open_pull_request_client_stub.call_rpc_count + end + end + + def test_close_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + close_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :close_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, close_pull_request_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.close_pull_request({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.close_pull_request name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.close_pull_request ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.close_pull_request({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.close_pull_request(::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, close_pull_request_client_stub.call_rpc_count + end + end + + def test_list_pull_request_file_diffs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.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" + page_size = 42 + page_token = "hello world" + + list_pull_request_file_diffs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_pull_request_file_diffs, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_pull_request_file_diffs_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_pull_request_file_diffs({ name: name, 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_pull_request_file_diffs name: name, 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_pull_request_file_diffs ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, 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_pull_request_file_diffs({ name: name, 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_pull_request_file_diffs(::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, 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_pull_request_file_diffs_client_stub.call_rpc_count + end + end + + def test_fetch_tree + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.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. + repository = "hello world" + ref = "hello world" + recursive = true + page_size = 42 + page_token = "hello world" + + fetch_tree_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_tree, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, request + assert_equal "hello world", request["repository"] + assert_equal "hello world", request["ref"] + assert_equal true, request["recursive"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_tree_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_tree({ repository: repository, ref: ref, recursive: recursive, 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.fetch_tree repository: repository, ref: ref, recursive: recursive, 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.fetch_tree ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, 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.fetch_tree({ repository: repository, ref: ref, recursive: recursive, 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.fetch_tree(::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, 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, fetch_tree_client_stub.call_rpc_count + end + end + + def test_fetch_blob + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.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. + repository = "hello world" + sha = "hello world" + + fetch_blob_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_blob, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, request + assert_equal "hello world", request["repository"] + assert_equal "hello world", request["sha"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_blob_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_blob({ repository: repository, sha: sha }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_blob repository: repository, sha: sha do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_blob ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_blob({ repository: repository, sha: sha }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_blob(::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_blob_client_stub.call_rpc_count + end + end + + def test_create_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + issue = {} + + create_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Issue), request["issue"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_issue({ parent: parent, issue: issue }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_issue parent: parent, issue: issue do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_issue ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_issue({ parent: parent, issue: issue }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_issue(::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_issue_client_stub.call_rpc_count + end + end + + def test_get_issue + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::Issue.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" + + get_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_issue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_issue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_issue ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_issue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_issue(::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.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, get_issue_client_stub.call_rpc_count + end + end + + def test_list_issues + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_issues, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, request + assert_equal "hello world", request["parent"] + 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_issues_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_issues({ parent: parent, 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_issues parent: parent, 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_issues ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, 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_issues({ parent: parent, 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_issues(::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, 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_issues_client_stub.call_rpc_count + end + end + + def test_update_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + issue = {} + update_mask = {} + + update_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Issue), request["issue"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_issue({ issue: issue, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_issue issue: issue, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_issue ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_issue({ issue: issue, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_issue(::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_issue_client_stub.call_rpc_count + end + end + + def test_delete_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + etag = "hello world" + + delete_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_issue({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_issue name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_issue ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_issue({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_issue(::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_issue_client_stub.call_rpc_count + end + end + + def test_open_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + etag = "hello world" + + open_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :open_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, open_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.open_issue({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.open_issue name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.open_issue ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.open_issue({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.open_issue(::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, open_issue_client_stub.call_rpc_count + end + end + + def test_close_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + etag = "hello world" + + close_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :close_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, close_issue_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.close_issue({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.close_issue name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.close_issue ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.close_issue({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.close_issue(::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, close_issue_client_stub.call_rpc_count + end + end + + def test_get_pull_request_comment + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.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" + + get_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_pull_request_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_pull_request_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_pull_request_comment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_pull_request_comment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_pull_request_comment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.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, get_pull_request_comment_client_stub.call_rpc_count + end + end + + def test_list_pull_request_comments + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.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" + page_size = 42 + page_token = "hello world" + + list_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_pull_request_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_pull_request_comments_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_pull_request_comments({ parent: parent, 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_pull_request_comments parent: parent, 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_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, 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_pull_request_comments({ parent: parent, 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_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, 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_pull_request_comments_client_stub.call_rpc_count + end + end + + def test_create_pull_request_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + pull_request_comment = {} + + create_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_pull_request_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequestComment), request["pull_request_comment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_pull_request_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_pull_request_comment parent: parent, pull_request_comment: pull_request_comment do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_pull_request_comment_client_stub.call_rpc_count + end + end + + def test_update_pull_request_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + pull_request_comment = {} + update_mask = {} + + update_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_pull_request_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequestComment), request["pull_request_comment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_pull_request_comment_client_stub do + # Create client + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_pull_request_comment pull_request_comment: pull_request_comment, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_pull_request_comment_client_stub.call_rpc_count + end + end + + def test_delete_pull_request_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_repository, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, request + delete_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_pull_request_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, request assert_equal "hello world", request["name"] - assert_equal true, request["allow_missing"] refute_nil options end - Gapic::ServiceStub.stub :new, delete_repository_client_stub do + Gapic::ServiceStub.stub :new, delete_pull_request_comment_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.delete_repository({ name: name, allow_missing: allow_missing }) do |response, operation| + client.delete_pull_request_comment({ name: name }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.delete_repository name: name, allow_missing: allow_missing do |response, operation| + client.delete_pull_request_comment name: name do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.delete_repository ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + client.delete_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.delete_repository({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + client.delete_pull_request_comment({ name: name }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.delete_repository(::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + client.delete_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Verify method calls - assert_equal 5, delete_repository_client_stub.call_rpc_count + assert_equal 5, delete_pull_request_comment_client_stub.call_rpc_count end end - def test_get_iam_policy_repo + def test_batch_create_pull_request_comments # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new + grpc_response = ::Google::Longrunning::Operation.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. - resource = "hello world" - options = {} + parent = "hello world" + requests = [{}] - get_iam_policy_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy_repo, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + batch_create_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_pull_request_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, request["requests"].first refute_nil options end - Gapic::ServiceStub.stub :new, get_iam_policy_repo_client_stub do + Gapic::ServiceStub.stub :new, batch_create_pull_request_comments_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.get_iam_policy_repo({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response + client.batch_create_pull_request_comments({ parent: parent, requests: requests }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.get_iam_policy_repo resource: resource, options: options do |response, operation| - assert_equal grpc_response, response + client.batch_create_pull_request_comments parent: parent, requests: requests do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.get_iam_policy_repo ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response + client.batch_create_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.get_iam_policy_repo({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response + client.batch_create_pull_request_comments({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.get_iam_policy_repo(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response + client.batch_create_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Verify method calls - assert_equal 5, get_iam_policy_repo_client_stub.call_rpc_count + assert_equal 5, batch_create_pull_request_comments_client_stub.call_rpc_count end end - def test_set_iam_policy_repo + def test_resolve_pull_request_comments # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new + grpc_response = ::Google::Longrunning::Operation.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. - resource = "hello world" - policy = {} - update_mask = {} + parent = "hello world" + names = ["hello world"] + auto_fill = true - set_iam_policy_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy_repo, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + resolve_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resolve_pull_request_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal true, request["auto_fill"] refute_nil options end - Gapic::ServiceStub.stub :new, set_iam_policy_repo_client_stub do + Gapic::ServiceStub.stub :new, resolve_pull_request_comments_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response + client.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.set_iam_policy_repo resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response + client.resolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.set_iam_policy_repo ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response + client.resolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response + client.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.set_iam_policy_repo(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response + client.resolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Verify method calls - assert_equal 5, set_iam_policy_repo_client_stub.call_rpc_count + assert_equal 5, resolve_pull_request_comments_client_stub.call_rpc_count end end - def test_test_iam_permissions_repo + def test_unresolve_pull_request_comments # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_response = ::Google::Longrunning::Operation.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. - resource = "hello world" - permissions = ["hello world"] + parent = "hello world" + names = ["hello world"] + auto_fill = true - test_iam_permissions_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions_repo, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] + unresolve_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unresolve_pull_request_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal true, request["auto_fill"] refute_nil options end - Gapic::ServiceStub.stub :new, test_iam_permissions_repo_client_stub do + Gapic::ServiceStub.stub :new, unresolve_pull_request_comments_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.test_iam_permissions_repo({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response + client.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.test_iam_permissions_repo resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response + client.unresolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.test_iam_permissions_repo ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response + client.unresolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.test_iam_permissions_repo({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response + client.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.test_iam_permissions_repo(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response + client.unresolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Verify method calls - assert_equal 5, test_iam_permissions_repo_client_stub.call_rpc_count + assert_equal 5, unresolve_pull_request_comments_client_stub.call_rpc_count end end - def test_create_branch_rule + def test_create_issue_comment # Create GRPC objects. grpc_response = ::Google::Longrunning::Operation.new grpc_operation = GRPC::ActiveCall::Operation.new nil @@ -779,190 +3101,188 @@ def test_create_branch_rule # Create request parameters for a unary method. parent = "hello world" - branch_rule = {} - branch_rule_id = "hello world" + issue_comment = {} - create_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_branch_rule, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, request + create_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_issue_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, request assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::BranchRule), request["branch_rule"] - assert_equal "hello world", request["branch_rule_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::IssueComment), request["issue_comment"] refute_nil options end - Gapic::ServiceStub.stub :new, create_branch_rule_client_stub do + Gapic::ServiceStub.stub :new, create_issue_comment_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }) do |response, operation| + client.create_issue_comment({ parent: parent, issue_comment: issue_comment }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.create_branch_rule parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id do |response, operation| + client.create_issue_comment parent: parent, issue_comment: issue_comment do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.create_branch_rule ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id) do |response, operation| + client.create_issue_comment ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }, grpc_options) do |response, operation| + client.create_issue_comment({ parent: parent, issue_comment: issue_comment }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.create_branch_rule(::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id), grpc_options) do |response, operation| + client.create_issue_comment(::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Verify method calls - assert_equal 5, create_branch_rule_client_stub.call_rpc_count + assert_equal 5, create_issue_comment_client_stub.call_rpc_count end end - def test_list_branch_rules + def test_get_issue_comment # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.new + grpc_response = ::Google::Cloud::SecureSourceManager::V1::IssueComment.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" - page_size = 42 - page_token = "hello world" + name = "hello world" - list_branch_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_branch_rules, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] + get_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_issue_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, request + assert_equal "hello world", request["name"] refute_nil options end - Gapic::ServiceStub.stub :new, list_branch_rules_client_stub do + Gapic::ServiceStub.stub :new, get_issue_comment_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response + client.get_issue_comment({ name: name }) do |response, operation| + assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.list_branch_rules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response + client.get_issue_comment name: name do |response, operation| + assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.list_branch_rules ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response + client.get_issue_comment ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.list_branch_rules({ parent: parent, 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 + client.get_issue_comment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.list_branch_rules(::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, 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 + client.get_issue_comment(::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.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, list_branch_rules_client_stub.call_rpc_count + assert_equal 5, get_issue_comment_client_stub.call_rpc_count end end - def test_get_branch_rule + def test_list_issue_comments # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::BranchRule.new + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.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" + parent = "hello world" + page_size = 42 + page_token = "hello world" - get_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_branch_rule, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, request - assert_equal "hello world", request["name"] + list_issue_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_issue_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] refute_nil options end - Gapic::ServiceStub.stub :new, get_branch_rule_client_stub do + Gapic::ServiceStub.stub :new, list_issue_comments_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.get_branch_rule({ name: name }) do |response, operation| - assert_equal grpc_response, response + client.list_issue_comments({ parent: parent, 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.get_branch_rule name: name do |response, operation| - assert_equal grpc_response, response + client.list_issue_comments parent: parent, 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.get_branch_rule ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response + client.list_issue_comments ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, 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.get_branch_rule({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response + client.list_issue_comments({ parent: parent, 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.get_branch_rule(::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response + client.list_issue_comments(::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, 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, get_branch_rule_client_stub.call_rpc_count + assert_equal 5, list_issue_comments_client_stub.call_rpc_count end end - def test_update_branch_rule + def test_update_issue_comment # Create GRPC objects. grpc_response = ::Google::Longrunning::Operation.new grpc_operation = GRPC::ActiveCall::Operation.new nil @@ -970,66 +3290,64 @@ def test_update_branch_rule grpc_options = {} # Create request parameters for a unary method. - branch_rule = {} - validate_only = true + issue_comment = {} update_mask = {} - update_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_branch_rule, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::BranchRule), request["branch_rule"] - assert_equal true, request["validate_only"] + update_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_issue_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::IssueComment), request["issue_comment"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] refute_nil options end - Gapic::ServiceStub.stub :new, update_branch_rule_client_stub do + Gapic::ServiceStub.stub :new, update_issue_comment_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }) do |response, operation| + client.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.update_branch_rule branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask do |response, operation| + client.update_issue_comment issue_comment: issue_comment, update_mask: update_mask do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.update_branch_rule ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask) do |response, operation| + client.update_issue_comment ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| + client.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.update_branch_rule(::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| + client.update_issue_comment(::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Verify method calls - assert_equal 5, update_branch_rule_client_stub.call_rpc_count + assert_equal 5, update_issue_comment_client_stub.call_rpc_count end end - def test_delete_branch_rule + def test_delete_issue_comment # Create GRPC objects. grpc_response = ::Google::Longrunning::Operation.new grpc_operation = GRPC::ActiveCall::Operation.new nil @@ -1038,59 +3356,57 @@ def test_delete_branch_rule # Create request parameters for a unary method. name = "hello world" - allow_missing = true - delete_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_branch_rule, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, request + delete_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_issue_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, request assert_equal "hello world", request["name"] - assert_equal true, request["allow_missing"] refute_nil options end - Gapic::ServiceStub.stub :new, delete_branch_rule_client_stub do + Gapic::ServiceStub.stub :new, delete_issue_comment_client_stub do # Create client client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| config.credentials = grpc_channel end # Use hash object - client.delete_branch_rule({ name: name, allow_missing: allow_missing }) do |response, operation| + client.delete_issue_comment({ name: name }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.delete_branch_rule name: name, allow_missing: allow_missing do |response, operation| + client.delete_issue_comment name: name do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.delete_branch_rule ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + client.delete_issue_comment ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.delete_branch_rule({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + client.delete_issue_comment({ name: name }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.delete_branch_rule(::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + client.delete_issue_comment(::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Verify method calls - assert_equal 5, delete_branch_rule_client_stub.call_rpc_count + assert_equal 5, delete_issue_comment_client_stub.call_rpc_count end end From f9dc2eb48026673a446247f8de2129d631d10955 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:33:02 -0700 Subject: [PATCH 309/457] feat: add support for new API resources: Issues, IssueComments, PullRequests, PullRequestComments, Blobs (#30723) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: add new UpdateRepository API feat: add support for workforce identity federation in instance docs: remove mention of DataPlane from `ListRepositories` endpoint docs: remove mention of DataPlane from `GetRepository` endpont docs: remove mention of DataPlane from `CreateRepository` endpoint docs: remove mention of DataPlane from `DeleteRepository` endpoint docs: `ca_pool` in message `.google.cloud.securesourcemanager.v1.Instance` is Optional docs: fix typo in `BranchRule` comment docs: A comment for field `requested_cancellation` in message `.google.cloud.securesourcemanager.v1.OperationMetadata` is changed PiperOrigin-RevId: 786353207 Source-Link: https://github.com/googleapis/googleapis/commit/9461532e7d19c8d71709ec3b502e5d81340fb661 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7f10df4015f0c30b46d80ff50818aea1bd923cc0 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyZV9zb3VyY2VfbWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiN2YxMGRmNDAxNWYwYzMwYjQ2ZDgwZmY1MDgxOGFlYTFiZDkyM2NjMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/secure_source_manager.rb | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb b/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb index 09ea7b7a9a7c..0e7f58d3e88e 100644 --- a/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb +++ b/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb @@ -69,23 +69,6 @@ module SecureSourceManager # # Access Secure Source Manager instances, resources, and repositories. # - # This API is split across two servers: the Control Plane and the Data Plane. - # - # Data Plane endpoints are hosted directly by your Secure Source Manager - # instance, so you must connect to your instance's API hostname to access - # them. The API hostname looks like the following: - # - # https://[instance-id]-[project-number]-api.[location].sourcemanager.dev - # - # For example, - # - # https://my-instance-702770452863-api.us-central1.sourcemanager.dev - # - # Data Plane endpoints are denoted with **Host: Data Plane**. - # - # All other endpoints are found in the normal Cloud API location, namely, - # `securcesourcemanager.googleapis.com`. - # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. From b6d629683250f71d5f0c5bdabfc6f905538008e5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:34:56 -0700 Subject: [PATCH 310/457] feat: proto changes for an internal api (#30718) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 786045230 Source-Link: https://github.com/googleapis/googleapis/commit/2a2ea87fcad7327e0afcfeaa84ec4d4b014f11a3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a0a01cf19f9ee6d2c8c4f8cb11fd3790c81f2e73 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwYW5uZXItYWRtaW4tZGF0YWJhc2UtdjEvLk93bEJvdC55YW1sIiwiaCI6ImEwYTAxY2YxOWY5ZWU2ZDJjOGM0ZjhjYjExZmQzNzkwYzgxZjJlNzMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 1 + .../gapic_metadata.json | 5 + .../database/v1/database_admin/client.rb | 93 +++++++++++++++++++ .../database/v1/spanner_database_admin_pb.rb | 6 +- .../v1/spanner_database_admin_services_pb.rb | 3 + .../database/v1/spanner_database_admin.rb | 27 ++++++ .../internal_update_graph_operation.rb | 47 ++++++++++ ...data_google.spanner.admin.database.v1.json | 40 ++++++++ .../admin/database/v1/database_admin_test.rb | 66 +++++++++++++ 9 files changed, 287 insertions(+), 1 deletion(-) create mode 100644 google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb diff --git a/google-cloud-spanner-admin-database-v1/.owlbot-manifest.json b/google-cloud-spanner-admin-database-v1/.owlbot-manifest.json index 4a4fe386c316..383b5620c5be 100644 --- a/google-cloud-spanner-admin-database-v1/.owlbot-manifest.json +++ b/google-cloud-spanner-admin-database-v1/.owlbot-manifest.json @@ -66,6 +66,7 @@ "snippets/database_admin/get_database.rb", "snippets/database_admin/get_database_ddl.rb", "snippets/database_admin/get_iam_policy.rb", + "snippets/database_admin/internal_update_graph_operation.rb", "snippets/database_admin/list_backup_operations.rb", "snippets/database_admin/list_backup_schedules.rb", "snippets/database_admin/list_backups.rb", diff --git a/google-cloud-spanner-admin-database-v1/gapic_metadata.json b/google-cloud-spanner-admin-database-v1/gapic_metadata.json index 391b3627ecd7..d7aa9420ad18 100644 --- a/google-cloud-spanner-admin-database-v1/gapic_metadata.json +++ b/google-cloud-spanner-admin-database-v1/gapic_metadata.json @@ -139,6 +139,11 @@ "methods": [ "list_backup_schedules" ] + }, + "InternalUpdateGraphOperation": { + "methods": [ + "internal_update_graph_operation" + ] } } } diff --git a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb index 4ccb9e8c6988..257da4c0dc33 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb @@ -3182,6 +3182,92 @@ def list_backup_schedules request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # This is an internal API called by Spanner Graph jobs. You should never need + # to call this API directly. + # + # @overload internal_update_graph_operation(request, options = nil) + # Pass arguments to `internal_update_graph_operation` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, ::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 internal_update_graph_operation(database: nil, operation_id: nil, vm_identity_token: nil, progress: nil, status: nil) + # Pass arguments to `internal_update_graph_operation` 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 database [::String] + # Internal field, do not use directly. + # @param operation_id [::String] + # Internal field, do not use directly. + # @param vm_identity_token [::String] + # Internal field, do not use directly. + # @param progress [::Float] + # Internal field, do not use directly. + # @param status [::Google::Rpc::Status, ::Hash] + # Internal field, do not use directly. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new + # + # # Call the internal_update_graph_operation method. + # result = client.internal_update_graph_operation request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse. + # p result + # + def internal_update_graph_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest + + # 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.internal_update_graph_operation.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::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.internal_update_graph_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.internal_update_graph_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :internal_update_graph_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the DatabaseAdmin API. # @@ -3478,6 +3564,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :list_backup_schedules + ## + # RPC-specific configuration for `internal_update_graph_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :internal_update_graph_operation # @private def initialize parent_rpcs = nil @@ -3533,6 +3624,8 @@ def initialize parent_rpcs = nil @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config + internal_update_graph_operation_config = parent_rpcs.internal_update_graph_operation if parent_rpcs.respond_to? :internal_update_graph_operation + @internal_update_graph_operation = ::Gapic::Config::Method.new internal_update_graph_operation_config yield self if block_given? end diff --git a/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb b/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb index 52b1401ebd82..9bbc9cd1553a 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb @@ -15,12 +15,13 @@ require 'google/protobuf/field_mask_pb' require 'google/protobuf/struct_pb' require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' require 'google/spanner/admin/database/v1/backup_pb' require 'google/spanner/admin/database/v1/backup_schedule_pb' require 'google/spanner/admin/database/v1/common_pb' -descriptor_data = "\n=google/spanner/admin/database/v1/spanner_database_admin.proto\x12 google.spanner.admin.database.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/database/v1/backup.proto\x1a\x36google/spanner/admin/database/v1/backup_schedule.proto\x1a-google/spanner/admin/database/v1/common.proto\"\xab\x01\n\x0bRestoreInfo\x12H\n\x0bsource_type\x18\x01 \x01(\x0e\x32\x33.google.spanner.admin.database.v1.RestoreSourceType\x12\x43\n\x0b\x62\x61\x63kup_info\x18\x02 \x01(\x0b\x32,.google.spanner.admin.database.v1.BackupInfoH\x00\x42\r\n\x0bsource_info\"\xca\x06\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.spanner.admin.database.v1.Database.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0crestore_info\x18\x04 \x01(\x0b\x32-.google.spanner.admin.database.v1.RestoreInfoB\x03\xe0\x41\x03\x12R\n\x11\x65ncryption_config\x18\x05 \x01(\x0b\x32\x32.google.spanner.admin.database.v1.EncryptionConfigB\x03\xe0\x41\x03\x12N\n\x0f\x65ncryption_info\x18\x08 \x03(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12%\n\x18version_retention_period\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x64\x65\x66\x61ult_leader\x18\t \x01(\tB\x03\xe0\x41\x03\x12P\n\x10\x64\x61tabase_dialect\x18\n \x01(\x0e\x32\x31.google.spanner.admin.database.v1.DatabaseDialectB\x03\xe0\x41\x03\x12\x1e\n\x16\x65nable_drop_protection\x18\x0b \x01(\x08\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\"M\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x14\n\x10READY_OPTIMIZING\x10\x03:b\xea\x41_\n\x1fspanner.googleapis.com/Database\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/instances/*}/databases\x12\xa4\x02\n\x0e\x43reateDatabase\x12\x37.google.spanner.admin.database.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41\x64\n)google.spanner.admin.database.v1.Database\x12\x37google.spanner.admin.database.v1.CreateDatabaseMetadata\xda\x41\x17parent,create_statement\x82\xd3\xe4\x93\x02\x32\"-/v1/{parent=projects/*/instances/*}/databases:\x01*\x12\xad\x01\n\x0bGetDatabase\x12\x34.google.spanner.admin.database.v1.GetDatabaseRequest\x1a*.google.spanner.admin.database.v1.Database\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/instances/*/databases/*}\x12\xef\x01\n\x0eUpdateDatabase\x12\x37.google.spanner.admin.database.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{database.name=projects/*/instances/*/databases/*}:\x08\x64\x61tabase\x12\x9d\x02\n\x11UpdateDatabaseDdl\x12:.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata\xda\x41\x13\x64\x61tabase,statements\x82\xd3\xe4\x93\x02:25/v1/{database=projects/*/instances/*/databases/*}/ddl:\x01*\x12\xa3\x01\n\x0c\x44ropDatabase\x12\x35.google.spanner.admin.database.v1.DropDatabaseRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x33*1/v1/{database=projects/*/instances/*/databases/*}\x12\xcd\x01\n\x0eGetDatabaseDdl\x12\x37.google.spanner.admin.database.v1.GetDatabaseDdlRequest\x1a\x38.google.spanner.admin.database.v1.GetDatabaseDdlResponse\"H\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{database=projects/*/instances/*/databases/*}/ddl\x12\xc2\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xf6\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\xdd\x01\">/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy:\x01*ZA\"/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy:\x01*ZA\".google.spanner.admin.database.v1.ListBackupOperationsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/instances/*}/backupOperations\x12\xdc\x01\n\x11ListDatabaseRoles\x12:.google.spanner.admin.database.v1.ListDatabaseRolesRequest\x1a;.google.spanner.admin.database.v1.ListDatabaseRolesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles\x12\xe8\x01\n\x0e\x41\x64\x64SplitPoints\x12\x37.google.spanner.admin.database.v1.AddSplitPointsRequest\x1a\x38.google.spanner.admin.database.v1.AddSplitPointsResponse\"c\xda\x41\x15\x64\x61tabase,split_points\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints:\x01*\x12\x8e\x02\n\x14\x43reateBackupSchedule\x12=.google.spanner.admin.database.v1.CreateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x84\x01\xda\x41)parent,backup_schedule,backup_schedule_id\x82\xd3\xe4\x93\x02R\"?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xd1\x01\n\x11GetBackupSchedule\x12:.google.spanner.admin.database.v1.GetBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\x90\x02\n\x14UpdateBackupSchedule\x12=.google.spanner.admin.database.v1.UpdateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x86\x01\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02\x62\x32O/v1/{backup_schedule.name=projects/*/instances/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xbd\x01\n\x14\x44\x65leteBackupSchedule\x12=.google.spanner.admin.database.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\xe4\x01\n\x13ListBackupSchedules\x12<.google.spanner.admin.database.v1.ListBackupSchedulesRequest\x1a=.google.spanner.admin.database.v1.ListBackupSchedulesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules\x1ax\xca\x41\x16spanner.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.adminB\xd6\x03\n$com.google.spanner.admin.database.v1B\x19SpannerDatabaseAdminProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1\xea\x41J\n\x1fspanner.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41{\n(spanner.googleapis.com/InstancePartition\x12Oprojects/{project}/instances/{instance}/instancePartitions/{instance_partition}b\x06proto3" +descriptor_data = "\n=google/spanner/admin/database/v1/spanner_database_admin.proto\x12 google.spanner.admin.database.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a-google/spanner/admin/database/v1/backup.proto\x1a\x36google/spanner/admin/database/v1/backup_schedule.proto\x1a-google/spanner/admin/database/v1/common.proto\"\xab\x01\n\x0bRestoreInfo\x12H\n\x0bsource_type\x18\x01 \x01(\x0e\x32\x33.google.spanner.admin.database.v1.RestoreSourceType\x12\x43\n\x0b\x62\x61\x63kup_info\x18\x02 \x01(\x0b\x32,.google.spanner.admin.database.v1.BackupInfoH\x00\x42\r\n\x0bsource_info\"\xca\x06\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.spanner.admin.database.v1.Database.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0crestore_info\x18\x04 \x01(\x0b\x32-.google.spanner.admin.database.v1.RestoreInfoB\x03\xe0\x41\x03\x12R\n\x11\x65ncryption_config\x18\x05 \x01(\x0b\x32\x32.google.spanner.admin.database.v1.EncryptionConfigB\x03\xe0\x41\x03\x12N\n\x0f\x65ncryption_info\x18\x08 \x03(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12%\n\x18version_retention_period\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x64\x65\x66\x61ult_leader\x18\t \x01(\tB\x03\xe0\x41\x03\x12P\n\x10\x64\x61tabase_dialect\x18\n \x01(\x0e\x32\x31.google.spanner.admin.database.v1.DatabaseDialectB\x03\xe0\x41\x03\x12\x1e\n\x16\x65nable_drop_protection\x18\x0b \x01(\x08\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\"M\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x14\n\x10READY_OPTIMIZING\x10\x03:b\xea\x41_\n\x1fspanner.googleapis.com/Database\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/instances/*}/databases\x12\xa4\x02\n\x0e\x43reateDatabase\x12\x37.google.spanner.admin.database.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41\x64\n)google.spanner.admin.database.v1.Database\x12\x37google.spanner.admin.database.v1.CreateDatabaseMetadata\xda\x41\x17parent,create_statement\x82\xd3\xe4\x93\x02\x32\"-/v1/{parent=projects/*/instances/*}/databases:\x01*\x12\xad\x01\n\x0bGetDatabase\x12\x34.google.spanner.admin.database.v1.GetDatabaseRequest\x1a*.google.spanner.admin.database.v1.Database\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/instances/*/databases/*}\x12\xef\x01\n\x0eUpdateDatabase\x12\x37.google.spanner.admin.database.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{database.name=projects/*/instances/*/databases/*}:\x08\x64\x61tabase\x12\x9d\x02\n\x11UpdateDatabaseDdl\x12:.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata\xda\x41\x13\x64\x61tabase,statements\x82\xd3\xe4\x93\x02:25/v1/{database=projects/*/instances/*/databases/*}/ddl:\x01*\x12\xa3\x01\n\x0c\x44ropDatabase\x12\x35.google.spanner.admin.database.v1.DropDatabaseRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x33*1/v1/{database=projects/*/instances/*/databases/*}\x12\xcd\x01\n\x0eGetDatabaseDdl\x12\x37.google.spanner.admin.database.v1.GetDatabaseDdlRequest\x1a\x38.google.spanner.admin.database.v1.GetDatabaseDdlResponse\"H\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{database=projects/*/instances/*/databases/*}/ddl\x12\xc2\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xf6\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\xdd\x01\">/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy:\x01*ZA\"/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy:\x01*ZA\".google.spanner.admin.database.v1.ListBackupOperationsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/instances/*}/backupOperations\x12\xdc\x01\n\x11ListDatabaseRoles\x12:.google.spanner.admin.database.v1.ListDatabaseRolesRequest\x1a;.google.spanner.admin.database.v1.ListDatabaseRolesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles\x12\xe8\x01\n\x0e\x41\x64\x64SplitPoints\x12\x37.google.spanner.admin.database.v1.AddSplitPointsRequest\x1a\x38.google.spanner.admin.database.v1.AddSplitPointsResponse\"c\xda\x41\x15\x64\x61tabase,split_points\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints:\x01*\x12\x8e\x02\n\x14\x43reateBackupSchedule\x12=.google.spanner.admin.database.v1.CreateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x84\x01\xda\x41)parent,backup_schedule,backup_schedule_id\x82\xd3\xe4\x93\x02R\"?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xd1\x01\n\x11GetBackupSchedule\x12:.google.spanner.admin.database.v1.GetBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\x90\x02\n\x14UpdateBackupSchedule\x12=.google.spanner.admin.database.v1.UpdateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x86\x01\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02\x62\x32O/v1/{backup_schedule.name=projects/*/instances/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xbd\x01\n\x14\x44\x65leteBackupSchedule\x12=.google.spanner.admin.database.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\xe4\x01\n\x13ListBackupSchedules\x12<.google.spanner.admin.database.v1.ListBackupSchedulesRequest\x1a=.google.spanner.admin.database.v1.ListBackupSchedulesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules\x12\xc7\x01\n\x1cInternalUpdateGraphOperation\x12\x45.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest\x1a\x46.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse\"\x18\xda\x41\x15\x64\x61tabase,operation_id\x1ax\xca\x41\x16spanner.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.adminB\xd6\x03\n$com.google.spanner.admin.database.v1B\x19SpannerDatabaseAdminProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1\xea\x41J\n\x1fspanner.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41{\n(spanner.googleapis.com/InstancePartition\x12Oprojects/{project}/instances/{instance}/instancePartitions/{instance_partition}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -41,6 +42,7 @@ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ["google.longrunning.Operation", "google/longrunning/operations.proto"], ["google.protobuf.ListValue", "google/protobuf/struct.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -88,6 +90,8 @@ module V1 AddSplitPointsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.AddSplitPointsResponse").msgclass SplitPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.SplitPoints").msgclass SplitPoints::Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.SplitPoints.Key").msgclass + InternalUpdateGraphOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest").msgclass + InternalUpdateGraphOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse").msgclass RestoreSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreSourceType").enummodule end end diff --git a/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb b/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb index 60542ba233c9..194ab7b96ab8 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb @@ -230,6 +230,9 @@ class Service rpc :DeleteBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, ::Google::Protobuf::Empty # Lists all the backup schedules for the database. rpc :ListBackupSchedules, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse + # This is an internal API called by Spanner Graph jobs. You should never need + # to call this API directly. + rpc :InternalUpdateGraphOperation, ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse end Stub = Service.rpc_stub_class diff --git a/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb index a47ec2ef7cd0..ac524090f132 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb @@ -791,6 +791,33 @@ class Key end end + # Internal request proto, do not use directly. + # @!attribute [rw] database + # @return [::String] + # Internal field, do not use directly. + # @!attribute [rw] operation_id + # @return [::String] + # Internal field, do not use directly. + # @!attribute [rw] vm_identity_token + # @return [::String] + # Internal field, do not use directly. + # @!attribute [rw] progress + # @return [::Float] + # Internal field, do not use directly. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Internal field, do not use directly. + class InternalUpdateGraphOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Internal response proto, do not use directly. + class InternalUpdateGraphOperationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Indicates the type of the restore source. module RestoreSourceType # No restore associated. diff --git a/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb new file mode 100644 index 000000000000..464b146a0625 --- /dev/null +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the internal_update_graph_operation call in the DatabaseAdmin 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::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation. +# +def internal_update_graph_operation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new + + # Call the internal_update_graph_operation method. + result = client.internal_update_graph_operation request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync] diff --git a/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json b/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json index fac73b6b4db4..e760a8d19055 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json +++ b/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json @@ -1050,6 +1050,46 @@ "type": "FULL" } ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync", + "title": "Snippet for the internal_update_graph_operation call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation.", + "file": "database_admin/internal_update_graph_operation.rb", + "language": "RUBY", + "client_method": { + "short_name": "internal_update_graph_operation", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "InternalUpdateGraphOperation", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.InternalUpdateGraphOperation", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb index 508f2aea3cad..cf6961567cbf 100644 --- a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb +++ b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb @@ -1723,6 +1723,72 @@ def test_list_backup_schedules end end + def test_internal_update_graph_operation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse.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. + database = "hello world" + operation_id = "hello world" + vm_identity_token = "hello world" + progress = 3.5 + status = {} + + internal_update_graph_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :internal_update_graph_operation, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, request + assert_equal "hello world", request["database"] + assert_equal "hello world", request["operation_id"] + assert_equal "hello world", request["vm_identity_token"] + assert_equal 3.5, request["progress"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Rpc::Status), request["status"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, internal_update_graph_operation_client_stub do + # Create client + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.internal_update_graph_operation({ database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.internal_update_graph_operation database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.internal_update_graph_operation ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new(database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.internal_update_graph_operation({ database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.internal_update_graph_operation(::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new(database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, internal_update_graph_operation_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From a0585e683009c564a531bb0152634f7c7fe56024 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:35:50 -0700 Subject: [PATCH 311/457] feat: Add service_account to Reasoning Engine public protos (#30715) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 785969680 Source-Link: https://github.com/googleapis/googleapis/commit/2e4cb44c27da895834a590fec0600964dfca46d5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cdae6f64f364f4dcca2995b36a667b1cb18835d5 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJjZGFlNmY2NGYzNjRmNGRjY2EyOTk1YjM2YTY2N2IxY2IxODgzNWQ1In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb | 2 +- .../google/cloud/aiplatform/v1/reasoning_engine.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb index e7e953f5a0f9..084700a89adb 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n1google/cloud/aiplatform/v1/reasoning_engine.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x04\n\x13ReasoningEngineSpec\x12V\n\x0cpackage_spec\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.ReasoningEngineSpec.PackageSpecB\x03\xe0\x41\x01\x12\\\n\x0f\x64\x65ployment_spec\x18\x04 \x01(\x0b\x32>.google.cloud.aiplatform.v1.ReasoningEngineSpec.DeploymentSpecB\x03\xe0\x41\x01\x12\x33\n\rclass_methods\x18\x03 \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61gent_framework\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x98\x01\n\x0bPackageSpec\x12\"\n\x15pickle_object_gcs_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x64\x65pendency_files_gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14requirements_gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0epython_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x89\x01\n\x0e\x44\x65ploymentSpec\x12\x34\n\x03\x65nv\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVarB\x03\xe0\x41\x01\x12\x41\n\nsecret_env\x18\x02 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SecretEnvVarB\x03\xe0\x41\x01\"\xbe\x03\n\x0fReasoningEngine\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04spec\x18\x03 \x01(\x0b\x32/.google.cloud.aiplatform.v1.ReasoningEngineSpecB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x01:\x9f\x01\xea\x41\x9b\x01\n)aiplatform.googleapis.com/ReasoningEngine\x12Kprojects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}*\x10reasoningEngines2\x0freasoningEngineB\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14ReasoningEngineProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n1google/cloud/aiplatform/v1/reasoning_engine.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x04\n\x13ReasoningEngineSpec\x12!\n\x0fservice_account\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x0cpackage_spec\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.ReasoningEngineSpec.PackageSpecB\x03\xe0\x41\x01\x12\\\n\x0f\x64\x65ployment_spec\x18\x04 \x01(\x0b\x32>.google.cloud.aiplatform.v1.ReasoningEngineSpec.DeploymentSpecB\x03\xe0\x41\x01\x12\x33\n\rclass_methods\x18\x03 \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61gent_framework\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x98\x01\n\x0bPackageSpec\x12\"\n\x15pickle_object_gcs_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x64\x65pendency_files_gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14requirements_gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0epython_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x89\x01\n\x0e\x44\x65ploymentSpec\x12\x34\n\x03\x65nv\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVarB\x03\xe0\x41\x01\x12\x41\n\nsecret_env\x18\x02 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SecretEnvVarB\x03\xe0\x41\x01\x42\x12\n\x10_service_account\"\xbe\x03\n\x0fReasoningEngine\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04spec\x18\x03 \x01(\x0b\x32/.google.cloud.aiplatform.v1.ReasoningEngineSpecB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x01:\x9f\x01\xea\x41\x9b\x01\n)aiplatform.googleapis.com/ReasoningEngine\x12Kprojects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}*\x10reasoningEngines2\x0freasoningEngineB\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14ReasoningEngineProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb index 171bda4dfb4d..6f0405e90907 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb @@ -22,6 +22,13 @@ module Cloud module AIPlatform module V1 # ReasoningEngine configurations + # @!attribute [rw] service_account + # @return [::String] + # Optional. The service account that the Reasoning Engine artifact runs as. + # It should have "roles/storage.objectViewer" for reading the user project's + # Cloud Storage and "roles/aiplatform.user" for using Vertex extensions. If + # not specified, the Vertex AI Reasoning Engine Service Agent in the project + # will be used. # @!attribute [rw] package_spec # @return [::Google::Cloud::AIPlatform::V1::ReasoningEngineSpec::PackageSpec] # Optional. User provided package spec of the ReasoningEngine. From 36a38bb34498b5c2c778d1cf30f0a8da30570ae7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:36:09 -0700 Subject: [PATCH 312/457] feat: Add support for Cloud SQL backup and restore (#30713) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: Add support for GCE Disk backup and restore feat: Add BackupPlanRevision resource and associated RPCs feat: Add DataSourceReference resource and associated RPCs feat: Add Update RPCs for BackupPlan and BackupPlanAssociation feat: Add FetchBackupPlanAssociationsForResourceType RPC feat: Add new states to resources (UPDATING, UPLOADING) feat: Add ON_DEMAND_OPERATIONAL backup type feat: Change BackupRule.standard_schedule to be OPTIONAL docs: A comment for field disks in message .google.cloud.backupdr.v1.ComputeInstanceRestoreProperties is changed docs: A comment for field network_interfaces in message .google.cloud.backupdr.v1.ComputeInstanceRestoreProperties is changed docs: A comment for field resource_policies in message .google.cloud.backupdr.v1.ComputeInstanceRestoreProperties is changed docs: A comment for field resource_type in message .google.cloud.backupdr.v1.BackupPlanAssociation is changed docs: A comment for field resource in message .google.cloud.backupdr.v1.BackupPlanAssociation is changed docs: A comment for field resource_type in message .google.cloud.backupdr.v1.BackupPlan is changed docs: A comment for field backup_retention_days in message .google.cloud.backupdr.v1.BackupRule is changed docs: A comment for field hourly_frequency in message .google.cloud.backupdr.v1.StandardSchedule is changed PiperOrigin-RevId: 785893442 Source-Link: https://github.com/googleapis/googleapis/commit/a2afc2935ee0c3bd4c5816d9fb8ca28432e2255c Source-Link: https://github.com/googleapis/googleapis-gen/commit/89b19792c410d5ee7d54d3eac868eeccea03a2ec Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4OWIxOTc5MmM0MTBkNWVlN2Q1NGQzZWFjODY4ZWVjY2VhMDNhMmVjIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 13 + google-cloud-backupdr-v1/gapic_metadata.json | 35 + .../cloud/backupdr/v1/backupdr/client.rb | 866 +++++++++++++++++- .../cloud/backupdr/v1/backupdr/paths.rb | 76 ++ .../cloud/backupdr/v1/backupdr/rest/client.rb | 847 ++++++++++++++++- .../backupdr/v1/backupdr/rest/service_stub.rb | 429 +++++++++ .../google/cloud/backupdr/v1/backupdr_pb.rb | 5 +- .../cloud/backupdr/v1/backupdr_services_pb.rb | 14 + .../google/cloud/backupdr/v1/backupplan_pb.rb | 10 +- .../backupdr/v1/backupplanassociation_pb.rb | 9 +- .../backupdr/v1/backupvault_cloudsql_pb.rb | 52 ++ .../cloud/backupdr/v1/backupvault_disk_pb.rb | 54 ++ .../cloud/backupdr/v1/backupvault_gce_pb.rb | 2 +- .../cloud/backupdr/v1/backupvault_pb.rb | 6 +- .../backupdr/v1/datasourcereference_pb.rb | 55 ++ .../google/cloud/backupdr/v1/backupdr.rb | 3 + .../google/cloud/backupdr/v1/backupplan.rb | 184 +++- .../backupdr/v1/backupplanassociation.rb | 119 ++- .../google/cloud/backupdr/v1/backupvault.rb | 87 +- .../cloud/backupdr/v1/backupvault_cloudsql.rb | 125 +++ .../cloud/backupdr/v1/backupvault_disk.rb | 241 +++++ .../cloud/backupdr/v1/backupvault_gce.rb | 12 +- .../cloud/backupdr/v1/datasourcereference.rb | 165 ++++ ...kup_plan_associations_for_resource_type.rb | 51 ++ ...ata_source_references_for_resource_type.rb | 51 ++ .../backupdr/get_backup_plan_revision.rb | 47 + .../backupdr/get_data_source_reference.rb | 47 + .../backupdr/list_backup_plan_revisions.rb | 51 ++ .../snippets/backupdr/update_backup_plan.rb | 54 ++ .../update_backup_plan_association.rb | 54 ++ ...pet_metadata_google.cloud.backupdr.v1.json | 280 ++++++ .../cloud/backupdr/v1/backupdr_paths_test.rb | 48 + .../cloud/backupdr/v1/backupdr_rest_test.rb | 416 ++++++++- .../google/cloud/backupdr/v1/backupdr_test.rb | 488 +++++++++- 34 files changed, 4911 insertions(+), 85 deletions(-) create mode 100644 google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb create mode 100644 google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb create mode 100644 google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb create mode 100644 google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb create mode 100644 google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb create mode 100644 google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb create mode 100644 google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb create mode 100644 google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb create mode 100644 google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb create mode 100644 google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb create mode 100644 google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb create mode 100644 google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb create mode 100644 google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb diff --git a/google-cloud-backupdr-v1/.owlbot-manifest.json b/google-cloud-backupdr-v1/.owlbot-manifest.json index 3ae2696fc9da..a63f720782a0 100644 --- a/google-cloud-backupdr-v1/.owlbot-manifest.json +++ b/google-cloud-backupdr-v1/.owlbot-manifest.json @@ -29,9 +29,12 @@ "lib/google/cloud/backupdr/v1/backupplan_pb.rb", "lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb", "lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb", + "lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb", + "lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb", "lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb", "lib/google/cloud/backupdr/v1/backupvault_pb.rb", "lib/google/cloud/backupdr/v1/bindings_override.rb", + "lib/google/cloud/backupdr/v1/datasourcereference_pb.rb", "lib/google/cloud/backupdr/v1/rest.rb", "lib/google/cloud/backupdr/v1/version.rb", "proto_docs/README.md", @@ -45,7 +48,10 @@ "proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb", "proto_docs/google/cloud/backupdr/v1/backupvault.rb", "proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb", + "proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb", + "proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb", "proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb", + "proto_docs/google/cloud/backupdr/v1/datasourcereference.rb", "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", "proto_docs/google/protobuf/duration.rb", @@ -67,15 +73,20 @@ "snippets/backupdr/delete_backup_plan_association.rb", "snippets/backupdr/delete_backup_vault.rb", "snippets/backupdr/delete_management_server.rb", + "snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb", + "snippets/backupdr/fetch_data_source_references_for_resource_type.rb", "snippets/backupdr/fetch_usable_backup_vaults.rb", "snippets/backupdr/get_backup.rb", "snippets/backupdr/get_backup_plan.rb", "snippets/backupdr/get_backup_plan_association.rb", + "snippets/backupdr/get_backup_plan_revision.rb", "snippets/backupdr/get_backup_vault.rb", "snippets/backupdr/get_data_source.rb", + "snippets/backupdr/get_data_source_reference.rb", "snippets/backupdr/get_management_server.rb", "snippets/backupdr/initialize_service.rb", "snippets/backupdr/list_backup_plan_associations.rb", + "snippets/backupdr/list_backup_plan_revisions.rb", "snippets/backupdr/list_backup_plans.rb", "snippets/backupdr/list_backup_vaults.rb", "snippets/backupdr/list_backups.rb", @@ -84,6 +95,8 @@ "snippets/backupdr/restore_backup.rb", "snippets/backupdr/trigger_backup.rb", "snippets/backupdr/update_backup.rb", + "snippets/backupdr/update_backup_plan.rb", + "snippets/backupdr/update_backup_plan_association.rb", "snippets/backupdr/update_backup_vault.rb", "snippets/backupdr/update_data_source.rb", "snippets/snippet_metadata_google.cloud.backupdr.v1.json", diff --git a/google-cloud-backupdr-v1/gapic_metadata.json b/google-cloud-backupdr-v1/gapic_metadata.json index fbc6546f8fdf..28cde7d35622 100644 --- a/google-cloud-backupdr-v1/gapic_metadata.json +++ b/google-cloud-backupdr-v1/gapic_metadata.json @@ -105,6 +105,11 @@ "create_backup_plan" ] }, + "UpdateBackupPlan": { + "methods": [ + "update_backup_plan" + ] + }, "GetBackupPlan": { "methods": [ "get_backup_plan" @@ -120,11 +125,26 @@ "delete_backup_plan" ] }, + "GetBackupPlanRevision": { + "methods": [ + "get_backup_plan_revision" + ] + }, + "ListBackupPlanRevisions": { + "methods": [ + "list_backup_plan_revisions" + ] + }, "CreateBackupPlanAssociation": { "methods": [ "create_backup_plan_association" ] }, + "UpdateBackupPlanAssociation": { + "methods": [ + "update_backup_plan_association" + ] + }, "GetBackupPlanAssociation": { "methods": [ "get_backup_plan_association" @@ -135,6 +155,11 @@ "list_backup_plan_associations" ] }, + "FetchBackupPlanAssociationsForResourceType": { + "methods": [ + "fetch_backup_plan_associations_for_resource_type" + ] + }, "DeleteBackupPlanAssociation": { "methods": [ "delete_backup_plan_association" @@ -145,6 +170,16 @@ "trigger_backup" ] }, + "GetDataSourceReference": { + "methods": [ + "get_data_source_reference" + ] + }, + "FetchDataSourceReferencesForResourceType": { + "methods": [ + "fetch_data_source_references_for_resource_type" + ] + }, "InitializeService": { "methods": [ "initialize_service" diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb index a93e3f71212b..10972dee2226 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb @@ -1150,7 +1150,7 @@ def get_backup_vault request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil) + # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) # Pass arguments to `update_backup_vault` 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). @@ -1183,6 +1183,9 @@ def get_backup_vault request, options = nil # @param force [::Boolean] # Optional. If set to true, will not check plan duration against backup vault # enforcement duration. + # @param force_update_access_restriction [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -2120,7 +2123,7 @@ def delete_backup request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, compute_instance_restore_properties: nil) + # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil) # Pass arguments to `restore_backup` 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). @@ -2144,9 +2147,25 @@ def delete_backup request, options = nil # not supported (00000000-0000-0000-0000-000000000000). # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] # Compute Engine target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] + # Disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] + # Region disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] # Compute Engine instance properties to be overridden during restore. # + # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] + # Disk properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] @@ -2337,6 +2356,123 @@ def create_backup_plan request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Update a BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::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 update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan` 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 backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest + + # 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.update_backup_plan.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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_plan&.name + header_params["backup_plan.name"] = request.backup_plan.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.update_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Gets details of a single BackupPlan. # @@ -2647,6 +2783,202 @@ def delete_backup_plan request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Gets details of a single BackupPlanRevision. + # + # @overload get_backup_plan_revision(request, options = nil) + # Pass arguments to `get_backup_plan_revision` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::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_backup_plan_revision(name: nil) + # Pass arguments to `get_backup_plan_revision` 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 resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + # + # # Call the get_backup_plan_revision method. + # result = client.get_backup_plan_revision request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p result + # + def get_backup_plan_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest + + # 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_backup_plan_revision.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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan_revision, 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 BackupPlanRevisions in a given project and location. + # + # @overload list_backup_plan_revisions(request, options = nil) + # Pass arguments to `list_backup_plan_revisions` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::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_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_plan_revisions` 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 for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` 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::BackupDR::V1::BackupPlanRevision>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + # + # # Call the list_backup_plan_revisions method. + # result = client.list_backup_plan_revisions 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::BackupDR::V1::BackupPlanRevision. + # p item + # end + # + def list_backup_plan_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest + + # 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_backup_plan_revisions.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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plan_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, 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 + ## # Create a BackupPlanAssociation # @@ -2704,10 +3036,126 @@ def delete_backup_plan request, options = nil # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # + # # Call the create_backup_plan_association method. + # result = client.create_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + + # 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_backup_plan_association.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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlanAssociation. + # + # @overload update_backup_plan_association(request, options = nil) + # Pass arguments to `update_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::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 update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan_association` 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 backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new # - # # Call the create_backup_plan_association method. - # result = client.create_backup_plan_association request + # # Call the update_backup_plan_association method. + # result = client.update_backup_plan_association request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -2719,16 +3167,16 @@ def delete_backup_plan request, options = nil # puts "No response received." # end # - def create_backup_plan_association request, options = nil + def update_backup_plan_association request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest # 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_backup_plan_association.metadata.to_h + metadata = @config.rpcs.update_backup_plan_association.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 \ @@ -2738,22 +3186,22 @@ def create_backup_plan_association request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.parent - header_params["parent"] = request.parent + if request.backup_plan_association&.name + header_params["backup_plan_association.name"] = request.backup_plan_association.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.create_backup_plan_association.timeout, + options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, metadata: metadata, - retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + retry_policy: @config.rpcs.update_backup_plan_association.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @backup_dr_stub.call_rpc :create_backup_plan_association, request, options: options do |response, operation| + @backup_dr_stub.call_rpc :update_backup_plan_association, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? throw :response, response @@ -2951,6 +3399,130 @@ def list_backup_plan_associations request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # List BackupPlanAssociations for a given resource type. + # + # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::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 fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` 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 parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + # + # # Call the fetch_backup_plan_associations_for_resource_type method. + # result = client.fetch_backup_plan_associations_for_resource_type 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::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def fetch_backup_plan_associations_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest + + # 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.fetch_backup_plan_associations_for_resource_type.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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_backup_plan_associations_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, 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 single BackupPlanAssociation. # @@ -3171,6 +3743,221 @@ def trigger_backup request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Gets details of a single DataSourceReference. + # + # @overload get_data_source_reference(request, options = nil) + # Pass arguments to `get_data_source_reference` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::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_data_source_reference(name: nil) + # Pass arguments to `get_data_source_reference` 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 name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + # + # # Call the get_data_source_reference method. + # result = client.get_data_source_reference request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + # p result + # + def get_data_source_reference request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest + + # 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_data_source_reference.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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source_reference.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_data_source_reference, 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 + + ## + # Fetch DataSourceReferences for a given project, location and resource type. + # + # @overload fetch_data_source_references_for_resource_type(request, options = nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::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 fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` 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 parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + # + # # Call the fetch_data_source_references_for_resource_type method. + # result = client.fetch_data_source_references_for_resource_type 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::BackupDR::V1::DataSourceReference. + # p item + # end + # + def fetch_data_source_references_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest + + # 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.fetch_data_source_references_for_resource_type.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::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_data_source_references_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, 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 + ## # Initializes the service related config for a project. # @@ -3184,7 +3971,7 @@ def trigger_backup request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload initialize_service(name: nil, resource_type: nil, request_id: nil) + # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) # Pass arguments to `initialize_service` 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). @@ -3211,6 +3998,8 @@ def trigger_backup request, options = nil # # The request ID must be a valid UUID with the exception that zero UUID is # not supported (00000000-0000-0000-0000-000000000000). + # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] + # Optional. The configuration for initializing a Cloud SQL instance. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -3547,6 +4336,11 @@ class Rpcs # attr_reader :create_backup_plan ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## # RPC-specific configuration for `get_backup_plan` # @return [::Gapic::Config::Method] # @@ -3562,11 +4356,26 @@ class Rpcs # attr_reader :delete_backup_plan ## + # RPC-specific configuration for `get_backup_plan_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_revision + ## + # RPC-specific configuration for `list_backup_plan_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_revisions + ## # RPC-specific configuration for `create_backup_plan_association` # @return [::Gapic::Config::Method] # attr_reader :create_backup_plan_association ## + # RPC-specific configuration for `update_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan_association + ## # RPC-specific configuration for `get_backup_plan_association` # @return [::Gapic::Config::Method] # @@ -3577,6 +4386,11 @@ class Rpcs # attr_reader :list_backup_plan_associations ## + # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backup_plan_associations_for_resource_type + ## # RPC-specific configuration for `delete_backup_plan_association` # @return [::Gapic::Config::Method] # @@ -3587,6 +4401,16 @@ class Rpcs # attr_reader :trigger_backup ## + # RPC-specific configuration for `get_data_source_reference` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source_reference + ## + # RPC-specific configuration for `fetch_data_source_references_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source_references_for_resource_type + ## # RPC-specific configuration for `initialize_service` # @return [::Gapic::Config::Method] # @@ -3632,22 +4456,36 @@ def initialize parent_rpcs = nil @restore_backup = ::Gapic::Config::Method.new restore_backup_config create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision + @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config + list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions + @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config + update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association + @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config + fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type + @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config + get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference + @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config + fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type + @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service @initialize_service = ::Gapic::Config::Method.new initialize_service_config diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb index 96a93598d991..0cd97f2d7522 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb @@ -85,6 +85,27 @@ def backup_plan_association_path project:, location:, backup_plan_association: "projects/#{project}/locations/#{location}/backupPlanAssociations/#{backup_plan_association}" end + ## + # Create a fully-qualified BackupPlanRevision resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # @param revision [String] + # + # @return [::String] + def backup_plan_revision_path project:, location:, backup_plan:, revision: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/revisions/#{revision}" + end + ## # Create a fully-qualified BackupVault resource string. # @@ -125,6 +146,42 @@ def data_source_path project:, location:, backupvault:, datasource: "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}" end + ## + # Create a fully-qualified DataSourceReference resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}` + # + # @param project [String] + # @param location [String] + # @param data_source_reference [String] + # + # @return [::String] + def data_source_reference_path project:, location:, data_source_reference: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataSourceReferences/#{data_source_reference}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}` + # + # @param project [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/instances/#{instance}" + end + ## # Create a fully-qualified Location resource string. # @@ -161,6 +218,25 @@ def management_server_path project:, location:, managementserver: "projects/#{project}/locations/#{location}/managementServers/#{managementserver}" end + ## + # Create a fully-qualified StoragePool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/zones/{zone}/storagePools/{storage_pool}` + # + # @param project [String] + # @param zone [String] + # @param storage_pool [String] + # + # @return [::String] + def storage_pool_path project:, zone:, storage_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/zones/#{zone}/storagePools/#{storage_pool}" + end + extend self end end diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb index e069566d023a..3c8d5558781c 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb @@ -1089,7 +1089,7 @@ def get_backup_vault request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil) + # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) # Pass arguments to `update_backup_vault` 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). @@ -1122,6 +1122,9 @@ def get_backup_vault request, options = nil # @param force [::Boolean] # Optional. If set to true, will not check plan duration against backup vault # enforcement duration. + # @param force_update_access_restriction [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1996,7 +1999,7 @@ def delete_backup request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, compute_instance_restore_properties: nil) + # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil) # Pass arguments to `restore_backup` 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). @@ -2020,8 +2023,24 @@ def delete_backup request, options = nil # not supported (00000000-0000-0000-0000-000000000000). # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] # Compute Engine target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] + # Disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] + # Region disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] # Compute Engine instance properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] + # Disk properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2199,6 +2218,116 @@ def create_backup_plan request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Update a BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::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 update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan` 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 backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest + + # 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.update_backup_plan.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::BackupDR::V1::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.update_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Gets details of a single BackupPlan. # @@ -2473,13 +2602,303 @@ def delete_backup_plan request, options = nil options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanRevision. + # + # @overload get_backup_plan_revision(request, options = nil) + # Pass arguments to `get_backup_plan_revision` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::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_backup_plan_revision(name: nil) + # Pass arguments to `get_backup_plan_revision` 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 resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + # + # # Call the get_backup_plan_revision method. + # result = client.get_backup_plan_revision request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p result + # + def get_backup_plan_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest + + # 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_backup_plan_revision.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::BackupDR::V1::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_backup_plan_revision.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan_revision 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 BackupPlanRevisions in a given project and location. + # + # @overload list_backup_plan_revisions(request, options = nil) + # Pass arguments to `list_backup_plan_revisions` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::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_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_plan_revisions` 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 for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` 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::BackupDR::V1::BackupPlanRevision>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + # + # # Call the list_backup_plan_revisions method. + # result = client.list_backup_plan_revisions 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::BackupDR::V1::BackupPlanRevision. + # p item + # end + # + def list_backup_plan_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest + + # 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_backup_plan_revisions.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::BackupDR::V1::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_backup_plan_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plan_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, "backup_plan_revisions", 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 + + ## + # Create a BackupPlanAssociation + # + # @overload create_backup_plan_association(request, options = nil) + # Pass arguments to `create_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::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_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) + # Pass arguments to `create_backup_plan_association` 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 backup plan association project and location in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_association_id [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # + # # Call the create_backup_plan_association method. + # result = client.create_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + + # 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_backup_plan_association.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::BackupDR::V1::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_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_plan_association.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @backup_dr_stub.delete_backup_plan request, options do |result, operation| + @backup_dr_stub.create_backup_plan_association request, options do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? throw :response, result @@ -2489,32 +2908,33 @@ def delete_backup_plan request, options = nil end ## - # Create a BackupPlanAssociation + # Update a BackupPlanAssociation. # - # @overload create_backup_plan_association(request, options = nil) - # Pass arguments to `create_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. + # @overload update_backup_plan_association(request, options = nil) + # Pass arguments to `update_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::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_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) - # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at + # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan_association` 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 backup plan association project and location in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_association_id [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being created + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. # @param request_id [::String] # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to @@ -2544,10 +2964,10 @@ def delete_backup_plan request, options = nil # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new # - # # Call the create_backup_plan_association method. - # result = client.create_backup_plan_association request + # # Call the update_backup_plan_association method. + # result = client.update_backup_plan_association request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. @@ -2559,16 +2979,16 @@ def delete_backup_plan request, options = nil # puts "No response received." # end # - def create_backup_plan_association request, options = nil + def update_backup_plan_association request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest # 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_backup_plan_association.metadata.to_h + call_metadata = @config.rpcs.update_backup_plan_association.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 \ @@ -2579,15 +2999,15 @@ def create_backup_plan_association request, options = nil 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_backup_plan_association.timeout, + options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + retry_policy: @config.rpcs.update_backup_plan_association.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @backup_dr_stub.create_backup_plan_association request, options do |result, operation| + @backup_dr_stub.update_backup_plan_association request, options do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? throw :response, result @@ -2771,6 +3191,123 @@ def list_backup_plan_associations request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # List BackupPlanAssociations for a given resource type. + # + # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::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 fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` 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 parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + # + # # Call the fetch_backup_plan_associations_for_resource_type method. + # result = client.fetch_backup_plan_associations_for_resource_type 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::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def fetch_backup_plan_associations_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest + + # 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.fetch_backup_plan_associations_for_resource_type.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::BackupDR::V1::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.fetch_backup_plan_associations_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_backup_plan_associations_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, "backup_plan_associations", 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 single BackupPlanAssociation. # @@ -2977,6 +3514,207 @@ def trigger_backup request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Gets details of a single DataSourceReference. + # + # @overload get_data_source_reference(request, options = nil) + # Pass arguments to `get_data_source_reference` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::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_data_source_reference(name: nil) + # Pass arguments to `get_data_source_reference` 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 name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + # + # # Call the get_data_source_reference method. + # result = client.get_data_source_reference request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + # p result + # + def get_data_source_reference request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest + + # 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_data_source_reference.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::BackupDR::V1::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_data_source_reference.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source_reference.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_data_source_reference 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 + + ## + # Fetch DataSourceReferences for a given project, location and resource type. + # + # @overload fetch_data_source_references_for_resource_type(request, options = nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::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 fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` 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 parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + # + # # Call the fetch_data_source_references_for_resource_type method. + # result = client.fetch_data_source_references_for_resource_type 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::BackupDR::V1::DataSourceReference. + # p item + # end + # + def fetch_data_source_references_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest + + # 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.fetch_data_source_references_for_resource_type.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::BackupDR::V1::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.fetch_data_source_references_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_data_source_references_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, "data_source_references", 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 + ## # Initializes the service related config for a project. # @@ -2990,7 +3728,7 @@ def trigger_backup request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload initialize_service(name: nil, resource_type: nil, request_id: nil) + # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) # Pass arguments to `initialize_service` 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). @@ -3017,6 +3755,8 @@ def trigger_backup request, options = nil # # The request ID must be a valid UUID with the exception that zero UUID is # not supported (00000000-0000-0000-0000-000000000000). + # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] + # Optional. The configuration for initializing a Cloud SQL instance. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3333,6 +4073,11 @@ class Rpcs # attr_reader :create_backup_plan ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## # RPC-specific configuration for `get_backup_plan` # @return [::Gapic::Config::Method] # @@ -3348,11 +4093,26 @@ class Rpcs # attr_reader :delete_backup_plan ## + # RPC-specific configuration for `get_backup_plan_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_revision + ## + # RPC-specific configuration for `list_backup_plan_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_revisions + ## # RPC-specific configuration for `create_backup_plan_association` # @return [::Gapic::Config::Method] # attr_reader :create_backup_plan_association ## + # RPC-specific configuration for `update_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan_association + ## # RPC-specific configuration for `get_backup_plan_association` # @return [::Gapic::Config::Method] # @@ -3363,6 +4123,11 @@ class Rpcs # attr_reader :list_backup_plan_associations ## + # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backup_plan_associations_for_resource_type + ## # RPC-specific configuration for `delete_backup_plan_association` # @return [::Gapic::Config::Method] # @@ -3373,6 +4138,16 @@ class Rpcs # attr_reader :trigger_backup ## + # RPC-specific configuration for `get_data_source_reference` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source_reference + ## + # RPC-specific configuration for `fetch_data_source_references_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source_references_for_resource_type + ## # RPC-specific configuration for `initialize_service` # @return [::Gapic::Config::Method] # @@ -3418,22 +4193,36 @@ def initialize parent_rpcs = nil @restore_backup = ::Gapic::Config::Method.new restore_backup_config create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision + @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config + list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions + @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config + update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association + @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config + fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type + @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config + get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference + @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config + fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type + @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service @initialize_service = ::Gapic::Config::Method.new initialize_service_config diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb index 54d112befd70..b610a6626953 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb @@ -833,6 +833,46 @@ def create_backup_plan request_pb, options = nil end end + ## + # Baseline implementation for the update_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_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: "update_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_backup_plan REST call # @@ -953,6 +993,86 @@ def delete_backup_plan request_pb, options = nil end end + ## + # Baseline implementation for the get_backup_plan_revision REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] + # 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::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # A result object deserialized from the server's reply + def get_backup_plan_revision request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_revision_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_backup_plan_revision", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.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_backup_plan_revisions REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] + # 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::BackupDR::V1::ListBackupPlanRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] + # A result object deserialized from the server's reply + def list_backup_plan_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_revisions_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_backup_plan_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # Baseline implementation for the create_backup_plan_association REST call # @@ -993,6 +1113,46 @@ def create_backup_plan_association request_pb, options = nil end end + ## + # Baseline implementation for the update_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_association_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: "update_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_backup_plan_association REST call # @@ -1073,6 +1233,46 @@ def list_backup_plan_associations request_pb, options = nil end end + ## + # Baseline implementation for the fetch_backup_plan_associations_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] + # 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::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_backup_plan_associations_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backup_plan_associations_for_resource_type_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: "fetch_backup_plan_associations_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.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_backup_plan_association REST call # @@ -1153,6 +1353,86 @@ def trigger_backup request_pb, options = nil end end + ## + # Baseline implementation for the get_data_source_reference REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] + # 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::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # A result object deserialized from the server's reply + def get_data_source_reference request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_reference_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_data_source_reference", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::DataSourceReference.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_data_source_references_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] + # 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::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_data_source_references_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_references_for_resource_type_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: "fetch_data_source_references_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # Baseline implementation for the initialize_service REST call # @@ -1599,6 +1879,28 @@ def self.transcode_create_backup_plan_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan.name}", + body: "backup_plan", + matches: [ + ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -1662,6 +1964,48 @@ def self.transcode_delete_backup_plan_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan_revision REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] + # 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_backup_plan_revision_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/revisions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plan_revisions REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] + # 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_backup_plan_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/revisions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -1684,6 +2028,28 @@ def self.transcode_create_backup_plan_association_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan_association.name}", + body: "backup_plan_association", + matches: [ + ["backup_plan_association.name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -1726,6 +2092,27 @@ def self.transcode_list_backup_plan_associations_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the fetch_backup_plan_associations_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlanAssociations:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -1769,6 +2156,48 @@ def self.transcode_trigger_backup_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the get_data_source_reference REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] + # 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_data_source_reference_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataSourceReferences/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_data_source_references_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_data_source_references_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSourceReferences:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb index 8d5e6c5850bc..3dd7d6d63d19 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb @@ -12,13 +12,15 @@ require 'google/cloud/backupdr/v1/backupplan_pb' require 'google/cloud/backupdr/v1/backupplanassociation_pb' require 'google/cloud/backupdr/v1/backupvault_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/cloud/backupdr/v1/datasourcereference_pb' require 'google/longrunning/operations_pb' require 'google/protobuf/empty_pb' require 'google/protobuf/timestamp_pb' require 'google/protobuf/wrappers_pb' -descriptor_data = "\n\'google/cloud/backupdr/v1/backupdr.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/backupdr/v1/backupplan.proto\x1a\x34google/cloud/backupdr/v1/backupplanassociation.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x01\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cpeering_mode\x18\x02 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.NetworkConfig.PeeringModeB\x03\xe0\x41\x01\"G\n\x0bPeeringMode\x12\x1c\n\x18PEERING_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x01\"6\n\rManagementURI\x12\x13\n\x06web_ui\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\"w\n#WorkforceIdentityBasedManagementURI\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"|\n$WorkforceIdentityBasedOAuth2ClientID\x12)\n\x1c\x66irst_party_oauth2_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1cthird_party_oauth2_client_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd1\n\n\x10ManagementServer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.ManagementServer.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x04type\x18\x0e \x01(\x0e\x32\x37.google.cloud.backupdr.v1.ManagementServer.InstanceTypeB\x03\xe0\x41\x01\x12\x44\n\x0emanagement_uri\x18\x0b \x01(\x0b\x32\'.google.cloud.backupdr.v1.ManagementURIB\x03\xe0\x41\x03\x12s\n\'workforce_identity_based_management_uri\x18\x10 \x01(\x0b\x32=.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURIB\x03\xe0\x41\x03\x12L\n\x05state\x18\x07 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.ManagementServer.InstanceStateB\x03\xe0\x41\x03\x12>\n\x08networks\x18\x08 \x03(\x0b\x32\'.google.cloud.backupdr.v1.NetworkConfigB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10oauth2_client_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12v\n)workforce_identity_based_oauth2_client_id\x18\x11 \x01(\x0b\x32>.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientIDB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61_proxy_uri\x18\x12 \x03(\tB\x03\xe0\x41\x03\x12\x36\n\rsatisfies_pzs\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41\x43KUP_RESTORE\x10\x01\"\x8f\x01\n\rInstanceState\x12\x1e\n\x1aINSTANCE_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\t\n\x05\x45RROR\x10\x07:\xa1\x01\xea\x41\x9d\x01\n(backupdr.googleapis.com/ManagementServer\x12Lprojects/{project}/locations/{location}/managementServers/{managementserver}*\x11managementServers2\x10managementServer\"\xdf\x01\n\x1cListManagementServersRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_filterB\x0b\n\t_order_by\"\x95\x01\n\x1dListManagementServersResponse\x12\x46\n\x12management_servers\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.ManagementServer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x1aGetManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\"\xe9\x01\n\x1d\x43reateManagementServerRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12!\n\x14management_server_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11management_server\x18\x03 \x01(\x0b\x32*.google.cloud.backupdr.v1.ManagementServerB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x1d\x44\x65leteManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"j\n\x18InitializeServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"P\n\x19InitializeServiceResponse\x12\x19\n\x11\x62\x61\x63kup_vault_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_plan_name\x18\x02 \x01(\t\"\x96\x03\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0f\x61\x64\x64itional_info\x18\x08 \x03(\x0b\x32?.google.cloud.backupdr.v1.OperationMetadata.AdditionalInfoEntryB\x03\xe0\x41\x03\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xbb\x31\n\x08\x42\x61\x63kupDR\x12\xd0\x01\n\x15ListManagementServers\x12\x36.google.cloud.backupdr.v1.ListManagementServersRequest\x1a\x37.google.cloud.backupdr.v1.ListManagementServersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/managementServers\x12\xbd\x01\n\x13GetManagementServer\x12\x34.google.cloud.backupdr.v1.GetManagementServerRequest\x1a*.google.cloud.backupdr.v1.ManagementServer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/managementServers/*}\x12\x9b\x02\n\x16\x43reateManagementServer\x12\x37.google.cloud.backupdr.v1.CreateManagementServerRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10ManagementServer\x12\x11OperationMetadata\xda\x41-parent,management_server,management_server_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/managementServers:\x11management_server\x12\xe3\x01\n\x16\x44\x65leteManagementServer\x12\x37.google.cloud.backupdr.v1.DeleteManagementServerRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/managementServers/*}\x12\xf8\x01\n\x11\x43reateBackupVault\x12\x32.google.cloud.backupdr.v1.CreateBackupVaultRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x42\x61\x63kupVault\x12\x11OperationMetadata\xda\x41#parent,backup_vault,backup_vault_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/backupVaults:\x0c\x62\x61\x63kup_vault\x12\xbc\x01\n\x10ListBackupVaults\x12\x31.google.cloud.backupdr.v1.ListBackupVaultsRequest\x1a\x32.google.cloud.backupdr.v1.ListBackupVaultsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/backupVaults\x12\xdd\x01\n\x17\x46\x65tchUsableBackupVaults\x12\x38.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest\x1a\x39.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources\x12\xb4\x01\n\rGetDataSource\x12..google.cloud.backupdr.v1.GetDataSourceRequest\x1a$.google.cloud.backupdr.v1.DataSource\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\x12\x82\x02\n\x10UpdateDataSource\x12\x31.google.cloud.backupdr.v1.UpdateDataSourceRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nDataSource\x12\x11OperationMetadata\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xc5\x01\n\x0bListBackups\x12,.google.cloud.backupdr.v1.ListBackupsRequest\x1a-.google.cloud.backupdr.v1.ListBackupsResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\x12\xb2\x01\n\tGetBackup\x12*.google.cloud.backupdr.v1.GetBackupRequest\x1a .google.cloud.backupdr.v1.Backup\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf1\x01\n\x0cUpdateBackup\x12-.google.cloud.backupdr.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02Y2O/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:\x06\x62\x61\x63kup\x12\xd3\x01\n\x0c\x44\x65leteBackup\x12-.google.cloud.backupdr.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf0\x01\n\rRestoreBackup\x12..google.cloud.backupdr.v1.RestoreBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15RestoreBackupResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore:\x01*\x12\xf1\x01\n\x10\x43reateBackupPlan\x12\x31.google.cloud.backupdr.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xa5\x01\n\rGetBackupPlan\x12..google.cloud.backupdr.v1.GetBackupPlanRequest\x1a$.google.cloud.backupdr.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xb8\x01\n\x0fListBackupPlans\x12\x30.google.cloud.backupdr.v1.ListBackupPlansRequest\x1a\x31.google.cloud.backupdr.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xd1\x01\n\x10\x44\x65leteBackupPlan\x12\x31.google.cloud.backupdr.v1.DeleteBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xc1\x02\n\x1b\x43reateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x39parent,backup_plan_association,backup_plan_association_id\x82\xd3\xe4\x93\x02U\":/v1/{parent=projects/*/locations/*}/backupPlanAssociations:\x17\x62\x61\x63kup_plan_association\x12\xd1\x01\n\x18GetBackupPlanAssociation\x12\x39.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest\x1a/.google.cloud.backupdr.v1.BackupPlanAssociation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xe4\x01\n\x1aListBackupPlanAssociations\x12;.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest\x1a<.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/backupPlanAssociations\x12\xf2\x01\n\x1b\x44\x65leteBackupPlanAssociation\x12<.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xf0\x01\n\rTriggerBackup\x12..google.cloud.backupdr.v1.TriggerBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x0cname,rule_id\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup:\x01*\x12\xde\x01\n\x11InitializeService\x12\x32.google.cloud.backupdr.v1.InitializeServiceRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41.\n\x19InitializeServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/serviceConfig}:initialize:\x01*\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.backupdr.v1B\rBackupDRProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" +descriptor_data = "\n\'google/cloud/backupdr/v1/backupdr.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/backupdr/v1/backupplan.proto\x1a\x34google/cloud/backupdr/v1/backupplanassociation.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x32google/cloud/backupdr/v1/datasourcereference.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x01\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cpeering_mode\x18\x02 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.NetworkConfig.PeeringModeB\x03\xe0\x41\x01\"G\n\x0bPeeringMode\x12\x1c\n\x18PEERING_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x01\"6\n\rManagementURI\x12\x13\n\x06web_ui\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\"w\n#WorkforceIdentityBasedManagementURI\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"|\n$WorkforceIdentityBasedOAuth2ClientID\x12)\n\x1c\x66irst_party_oauth2_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1cthird_party_oauth2_client_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd1\n\n\x10ManagementServer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.ManagementServer.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x04type\x18\x0e \x01(\x0e\x32\x37.google.cloud.backupdr.v1.ManagementServer.InstanceTypeB\x03\xe0\x41\x01\x12\x44\n\x0emanagement_uri\x18\x0b \x01(\x0b\x32\'.google.cloud.backupdr.v1.ManagementURIB\x03\xe0\x41\x03\x12s\n\'workforce_identity_based_management_uri\x18\x10 \x01(\x0b\x32=.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURIB\x03\xe0\x41\x03\x12L\n\x05state\x18\x07 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.ManagementServer.InstanceStateB\x03\xe0\x41\x03\x12>\n\x08networks\x18\x08 \x03(\x0b\x32\'.google.cloud.backupdr.v1.NetworkConfigB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10oauth2_client_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12v\n)workforce_identity_based_oauth2_client_id\x18\x11 \x01(\x0b\x32>.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientIDB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61_proxy_uri\x18\x12 \x03(\tB\x03\xe0\x41\x03\x12\x36\n\rsatisfies_pzs\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41\x43KUP_RESTORE\x10\x01\"\x8f\x01\n\rInstanceState\x12\x1e\n\x1aINSTANCE_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\t\n\x05\x45RROR\x10\x07:\xa1\x01\xea\x41\x9d\x01\n(backupdr.googleapis.com/ManagementServer\x12Lprojects/{project}/locations/{location}/managementServers/{managementserver}*\x11managementServers2\x10managementServer\"\xdf\x01\n\x1cListManagementServersRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_filterB\x0b\n\t_order_by\"\x95\x01\n\x1dListManagementServersResponse\x12\x46\n\x12management_servers\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.ManagementServer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x1aGetManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\"\xe9\x01\n\x1d\x43reateManagementServerRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12!\n\x14management_server_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11management_server\x18\x03 \x01(\x0b\x32*.google.cloud.backupdr.v1.ManagementServerB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x1d\x44\x65leteManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xfc\x01\n\x18InitializeServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12w\n(cloud_sql_instance_initialization_config\x18\x04 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfigB\x03\xe0\x41\x01H\x00\x42\x17\n\x15initialization_config\"P\n\x19InitializeServiceResponse\x12\x19\n\x11\x62\x61\x63kup_vault_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_plan_name\x18\x02 \x01(\t\"\x96\x03\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0f\x61\x64\x64itional_info\x18\x08 \x03(\x0b\x32?.google.cloud.backupdr.v1.OperationMetadata.AdditionalInfoEntryB\x03\xe0\x41\x03\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xda?\n\x08\x42\x61\x63kupDR\x12\xd0\x01\n\x15ListManagementServers\x12\x36.google.cloud.backupdr.v1.ListManagementServersRequest\x1a\x37.google.cloud.backupdr.v1.ListManagementServersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/managementServers\x12\xbd\x01\n\x13GetManagementServer\x12\x34.google.cloud.backupdr.v1.GetManagementServerRequest\x1a*.google.cloud.backupdr.v1.ManagementServer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/managementServers/*}\x12\x9b\x02\n\x16\x43reateManagementServer\x12\x37.google.cloud.backupdr.v1.CreateManagementServerRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10ManagementServer\x12\x11OperationMetadata\xda\x41-parent,management_server,management_server_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/managementServers:\x11management_server\x12\xe3\x01\n\x16\x44\x65leteManagementServer\x12\x37.google.cloud.backupdr.v1.DeleteManagementServerRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/managementServers/*}\x12\xf8\x01\n\x11\x43reateBackupVault\x12\x32.google.cloud.backupdr.v1.CreateBackupVaultRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x42\x61\x63kupVault\x12\x11OperationMetadata\xda\x41#parent,backup_vault,backup_vault_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/backupVaults:\x0c\x62\x61\x63kup_vault\x12\xbc\x01\n\x10ListBackupVaults\x12\x31.google.cloud.backupdr.v1.ListBackupVaultsRequest\x1a\x32.google.cloud.backupdr.v1.ListBackupVaultsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/backupVaults\x12\xdd\x01\n\x17\x46\x65tchUsableBackupVaults\x12\x38.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest\x1a\x39.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources\x12\xb4\x01\n\rGetDataSource\x12..google.cloud.backupdr.v1.GetDataSourceRequest\x1a$.google.cloud.backupdr.v1.DataSource\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\x12\x82\x02\n\x10UpdateDataSource\x12\x31.google.cloud.backupdr.v1.UpdateDataSourceRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nDataSource\x12\x11OperationMetadata\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xc5\x01\n\x0bListBackups\x12,.google.cloud.backupdr.v1.ListBackupsRequest\x1a-.google.cloud.backupdr.v1.ListBackupsResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\x12\xb2\x01\n\tGetBackup\x12*.google.cloud.backupdr.v1.GetBackupRequest\x1a .google.cloud.backupdr.v1.Backup\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf1\x01\n\x0cUpdateBackup\x12-.google.cloud.backupdr.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02Y2O/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:\x06\x62\x61\x63kup\x12\xd3\x01\n\x0c\x44\x65leteBackup\x12-.google.cloud.backupdr.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf0\x01\n\rRestoreBackup\x12..google.cloud.backupdr.v1.RestoreBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15RestoreBackupResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore:\x01*\x12\xf1\x01\n\x10\x43reateBackupPlan\x12\x31.google.cloud.backupdr.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xf3\x01\n\x10UpdateBackupPlan\x12\x31.google.cloud.backupdr.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xa5\x01\n\rGetBackupPlan\x12..google.cloud.backupdr.v1.GetBackupPlanRequest\x1a$.google.cloud.backupdr.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xb8\x01\n\x0fListBackupPlans\x12\x30.google.cloud.backupdr.v1.ListBackupPlansRequest\x1a\x31.google.cloud.backupdr.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xd1\x01\n\x10\x44\x65leteBackupPlan\x12\x31.google.cloud.backupdr.v1.DeleteBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xc9\x01\n\x15GetBackupPlanRevision\x12\x36.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest\x1a,.google.cloud.backupdr.v1.BackupPlanRevision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/backupPlans/*/revisions/*}\x12\xdc\x01\n\x17ListBackupPlanRevisions\x12\x38.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest\x1a\x39.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/backupPlans/*}/revisions\x12\xc1\x02\n\x1b\x43reateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x39parent,backup_plan_association,backup_plan_association_id\x82\xd3\xe4\x93\x02U\":/v1/{parent=projects/*/locations/*}/backupPlanAssociations:\x17\x62\x61\x63kup_plan_association\x12\xc3\x02\n\x1bUpdateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc6\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41#backup_plan_association,update_mask\x82\xd3\xe4\x93\x02m2R/v1/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}:\x17\x62\x61\x63kup_plan_association\x12\xd1\x01\n\x18GetBackupPlanAssociation\x12\x39.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest\x1a/.google.cloud.backupdr.v1.BackupPlanAssociation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xe4\x01\n\x1aListBackupPlanAssociations\x12;.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest\x1a<.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/backupPlanAssociations\x12\xb7\x02\n*FetchBackupPlanAssociationsForResourceType\x12K.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest\x1aL.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse\"n\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02Q\x12O/v1/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType\x12\xf2\x01\n\x1b\x44\x65leteBackupPlanAssociation\x12<.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xf0\x01\n\rTriggerBackup\x12..google.cloud.backupdr.v1.TriggerBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x0cname,rule_id\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup:\x01*\x12\xc9\x01\n\x16GetDataSourceReference\x12\x37.google.cloud.backupdr.v1.GetDataSourceReferenceRequest\x1a-.google.cloud.backupdr.v1.DataSourceReference\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/dataSourceReferences/*}\x12\xaf\x02\n(FetchDataSourceReferencesForResourceType\x12I.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest\x1aJ.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse\"l\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02O\x12M/v1/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType\x12\xde\x01\n\x11InitializeService\x12\x32.google.cloud.backupdr.v1.InitializeServiceRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41.\n\x19InitializeServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/serviceConfig}:initialize:\x01*\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.backupdr.v1B\rBackupDRProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -35,6 +37,7 @@ imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.protobuf.BoolValue", "google/protobuf/wrappers.proto"], + ["google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb index 0cf148e9eaf0..991d7db6c3f1 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb @@ -73,22 +73,36 @@ class Service rpc :RestoreBackup, ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Google::Longrunning::Operation # Create a BackupPlan rpc :CreateBackupPlan, ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation + # Update a BackupPlan. + rpc :UpdateBackupPlan, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation # Gets details of a single BackupPlan. rpc :GetBackupPlan, ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Google::Cloud::BackupDR::V1::BackupPlan # Lists BackupPlans in a given project and location. rpc :ListBackupPlans, ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse # Deletes a single BackupPlan. rpc :DeleteBackupPlan, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlanRevision. + rpc :GetBackupPlanRevision, ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Google::Cloud::BackupDR::V1::BackupPlanRevision + # Lists BackupPlanRevisions in a given project and location. + rpc :ListBackupPlanRevisions, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse # Create a BackupPlanAssociation rpc :CreateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Update a BackupPlanAssociation. + rpc :UpdateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Google::Longrunning::Operation # Gets details of a single BackupPlanAssociation. rpc :GetBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Google::Cloud::BackupDR::V1::BackupPlanAssociation # Lists BackupPlanAssociations in a given project and location. rpc :ListBackupPlanAssociations, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse + # List BackupPlanAssociations for a given resource type. + rpc :FetchBackupPlanAssociationsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse # Deletes a single BackupPlanAssociation. rpc :DeleteBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Google::Longrunning::Operation # Triggers a new Backup. rpc :TriggerBackup, ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Google::Longrunning::Operation + # Gets details of a single DataSourceReference. + rpc :GetDataSourceReference, ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Google::Cloud::BackupDR::V1::DataSourceReference + # Fetch DataSourceReferences for a given project, location and resource type. + rpc :FetchDataSourceReferencesForResourceType, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse # Initializes the service related config for a project. rpc :InitializeService, ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Google::Longrunning::Operation end diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb index 3e24b3d8940f..4920dc53d378 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb @@ -7,12 +7,13 @@ require 'google/api/field_behavior_pb' require 'google/api/field_info_pb' require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' require 'google/type/dayofweek_pb' require 'google/type/month_pb' -descriptor_data = "\n)google/cloud/backupdr/v1/backupplan.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x17google/type/month.proto\"\x99\x06\n\nBackupPlan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.BackupPlan.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x0c\x62\x61\x63kup_rules\x18\x06 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupRuleB\x03\xe0\x41\x02\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.backupdr.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62\x61\x63kup_vault\x18\n \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12)\n\x1c\x62\x61\x63kup_vault_service_account\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04:\x84\x01\xea\x41\x80\x01\n\"backupdr.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}*\x0b\x62\x61\x63kupPlans2\nbackupPlan\"\xb0\x01\n\nBackupRule\x12\x17\n\x07rule_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x15\x62\x61\x63kup_retention_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12L\n\x11standard_schedule\x18\x05 \x01(\x0b\x32*.google.cloud.backupdr.v1.StandardScheduleB\x03\xe0\x41\x02H\x00\x42\x17\n\x15\x62\x61\x63kup_schedule_oneof\"\x97\x04\n\x10StandardSchedule\x12W\n\x0frecurrence_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.backupdr.v1.StandardSchedule.RecurrenceTypeB\x03\xe0\x41\x02\x12\x1d\n\x10hourly_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x31\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x1a\n\rdays_of_month\x18\x04 \x03(\x05\x42\x03\xe0\x41\x01\x12H\n\x11week_day_of_month\x18\x05 \x01(\x0b\x32(.google.cloud.backupdr.v1.WeekDayOfMonthB\x03\xe0\x41\x01\x12\'\n\x06months\x18\x06 \x03(\x0e\x32\x12.google.type.MonthB\x03\xe0\x41\x01\x12\x42\n\rbackup_window\x18\x07 \x01(\x0b\x32&.google.cloud.backupdr.v1.BackupWindowB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x08 \x01(\tB\x03\xe0\x41\x02\"m\n\x0eRecurrenceType\x12\x1f\n\x1bRECURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\"L\n\x0c\x42\x61\x63kupWindow\x12\x1e\n\x11start_hour_of_day\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x65nd_hour_of_day\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xfa\x01\n\x0eWeekDayOfMonth\x12P\n\rweek_of_month\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonthB\x03\xe0\x41\x02\x12\x30\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"d\n\x0bWeekOfMonth\x12\x1d\n\x19WEEK_OF_MONTH_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IRST\x10\x01\x12\n\n\x06SECOND\x10\x02\x12\t\n\x05THIRD\x10\x03\x12\n\n\x06\x46OURTH\x10\x04\x12\x08\n\x04LAST\x10\x05\"\xd3\x01\n\x17\x43reateBackupPlanRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x62\x61\x63kup_plan\x18\x03 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb1\x01\n\x16ListBackupPlansRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListBackupPlansResponse\x12:\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\"t\n\x17\x44\x65leteBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xbf\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" +descriptor_data = "\n)google/cloud/backupdr/v1/backupplan.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x17google/type/month.proto\"\xa5\x07\n\nBackupPlan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.BackupPlan.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x0c\x62\x61\x63kup_rules\x18\x06 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupRuleB\x03\xe0\x41\x02\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.backupdr.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62\x61\x63kup_vault\x18\n \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12)\n\x1c\x62\x61\x63kup_vault_service_account\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12log_retention_days\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18supported_resource_types\x18\r \x03(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rrevision_name\x18\x0f \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x84\x01\xea\x41\x80\x01\n\"backupdr.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}*\x0b\x62\x61\x63kupPlans2\nbackupPlan\"\xb0\x01\n\nBackupRule\x12\x17\n\x07rule_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x15\x62\x61\x63kup_retention_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12L\n\x11standard_schedule\x18\x05 \x01(\x0b\x32*.google.cloud.backupdr.v1.StandardScheduleB\x03\xe0\x41\x01H\x00\x42\x17\n\x15\x62\x61\x63kup_schedule_oneof\"\x97\x04\n\x10StandardSchedule\x12W\n\x0frecurrence_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.backupdr.v1.StandardSchedule.RecurrenceTypeB\x03\xe0\x41\x02\x12\x1d\n\x10hourly_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x31\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x1a\n\rdays_of_month\x18\x04 \x03(\x05\x42\x03\xe0\x41\x01\x12H\n\x11week_day_of_month\x18\x05 \x01(\x0b\x32(.google.cloud.backupdr.v1.WeekDayOfMonthB\x03\xe0\x41\x01\x12\'\n\x06months\x18\x06 \x03(\x0e\x32\x12.google.type.MonthB\x03\xe0\x41\x01\x12\x42\n\rbackup_window\x18\x07 \x01(\x0b\x32&.google.cloud.backupdr.v1.BackupWindowB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x08 \x01(\tB\x03\xe0\x41\x02\"m\n\x0eRecurrenceType\x12\x1f\n\x1bRECURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\"L\n\x0c\x42\x61\x63kupWindow\x12\x1e\n\x11start_hour_of_day\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x65nd_hour_of_day\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xfa\x01\n\x0eWeekDayOfMonth\x12P\n\rweek_of_month\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonthB\x03\xe0\x41\x02\x12\x30\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"d\n\x0bWeekOfMonth\x12\x1d\n\x19WEEK_OF_MONTH_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IRST\x10\x01\x12\n\n\x06SECOND\x10\x02\x12\t\n\x05THIRD\x10\x03\x12\n\n\x06\x46OURTH\x10\x04\x12\x08\n\x04LAST\x10\x05\"\xd3\x01\n\x17\x43reateBackupPlanRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x62\x61\x63kup_plan\x18\x03 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb1\x01\n\x16ListBackupPlansRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListBackupPlansResponse\x12:\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\"t\n\x17\x44\x65leteBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n\x17UpdateBackupPlanRequest\x12>\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x90\x04\n\x12\x42\x61\x63kupPlanRevision\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupPlanRevision.StateB\x03\xe0\x41\x03\x12\x42\n\x14\x62\x61\x63kup_plan_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04:\xb1\x01\xea\x41\xad\x01\n*backupdr.googleapis.com/BackupPlanRevision\x12Vprojects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}*\x13\x62\x61\x63kupPlanRevisions2\x12\x62\x61\x63kupPlanRevision\"`\n\x1cGetBackupPlanRevisionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*backupdr.googleapis.com/BackupPlanRevision\"\x95\x01\n\x1eListBackupPlanRevisionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*backupdr.googleapis.com/BackupPlanRevision\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9c\x01\n\x1fListBackupPlanRevisionsResponse\x12K\n\x15\x62\x61\x63kup_plan_revisions\x18\x01 \x03(\x0b\x32,.google.cloud.backupdr.v1.BackupPlanRevision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xbf\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -28,6 +29,7 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -56,6 +58,12 @@ module V1 ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansResponse").msgclass GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRequest").msgclass DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanRequest").msgclass + UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanRequest").msgclass + BackupPlanRevision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision").msgclass + BackupPlanRevision::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision.State").enummodule + GetBackupPlanRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRevisionRequest").msgclass + ListBackupPlanRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest").msgclass + ListBackupPlanRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse").msgclass end end end diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb index 655889dde520..62ec916ed7ad 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb @@ -7,11 +7,13 @@ require 'google/api/field_behavior_pb' require 'google/api/field_info_pb' require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' require 'google/rpc/status_pb' -descriptor_data = "\n4google/cloud/backupdr/v1/backupplanassociation.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xd7\x05\n\x15\x42\x61\x63kupPlanAssociation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1d\n\rresource_type\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x08resource\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12?\n\x0b\x62\x61\x63kup_plan\x18\x04 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.BackupPlanAssociation.StateB\x03\xe0\x41\x03\x12H\n\x11rules_config_info\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.RuleConfigInfoB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\t \x01(\tB\x03\xe0\x41\x03\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04:\xbc\x01\xea\x41\xb8\x01\n-backupdr.googleapis.com/BackupPlanAssociation\x12Xprojects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}*\x16\x62\x61\x63kupPlanAssociations2\x15\x62\x61\x63kupPlanAssociation\"\x89\x03\n\x0eRuleConfigInfo\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x11last_backup_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\x8c\x02\n\"CreateBackupPlanAssociationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\'\n\x1a\x62\x61\x63kup_plan_association_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n!ListBackupPlanAssociationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\"ListBackupPlanAssociationsResponse\x12Q\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"f\n\x1fGetBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\"\x8a\x01\n\"DeleteBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x92\x01\n\x14TriggerBackupRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x14\n\x07rule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xca\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x1a\x42\x61\x63kupPlanAssociationProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" +descriptor_data = "\n4google/cloud/backupdr/v1/backupplanassociation.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xdc\x07\n\x15\x42\x61\x63kupPlanAssociation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1d\n\rresource_type\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x08resource\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12?\n\x0b\x62\x61\x63kup_plan\x18\x04 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.BackupPlanAssociation.StateB\x03\xe0\x41\x03\x12H\n\x11rules_config_info\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.RuleConfigInfoB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x8f\x01\n5cloud_sql_instance_backup_plan_association_properties\x18\n \x01(\x0b\x32I.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12$\n\x17\x62\x61\x63kup_plan_revision_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x62\x61\x63kup_plan_revision_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xbc\x01\xea\x41\xb8\x01\n-backupdr.googleapis.com/BackupPlanAssociation\x12Xprojects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}*\x16\x62\x61\x63kupPlanAssociations2\x15\x62\x61\x63kupPlanAssociationB\x15\n\x13resource_properties\"\x89\x03\n\x0eRuleConfigInfo\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x11last_backup_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\x8c\x02\n\"CreateBackupPlanAssociationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\'\n\x1a\x62\x61\x63kup_plan_association_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n!ListBackupPlanAssociationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\"ListBackupPlanAssociationsResponse\x12Q\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xf3\x01\n1FetchBackupPlanAssociationsForResourceTypeRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\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\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n2FetchBackupPlanAssociationsForResourceTypeResponse\x12V\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"f\n\x1fGetBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\"\x8a\x01\n\"DeleteBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd2\x01\n\"UpdateBackupPlanAssociationRequest\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x01 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x92\x01\n\x14TriggerBackupRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x14\n\x07rule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xca\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x1a\x42\x61\x63kupPlanAssociationProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -27,7 +29,9 @@ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], ["google.rpc.Status", "google/rpc/status.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -50,8 +54,11 @@ module V1 CreateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest").msgclass ListBackupPlanAssociationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest").msgclass ListBackupPlanAssociationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse").msgclass + FetchBackupPlanAssociationsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest").msgclass + FetchBackupPlanAssociationsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse").msgclass GetBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanAssociationRequest").msgclass DeleteBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest").msgclass + UpdateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest").msgclass TriggerBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TriggerBackupRequest").msgclass end end diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb new file mode 100644 index 000000000000..94878d569b60 --- /dev/null +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_cloudsql.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/backupdr/v1/backupvault_cloudsql.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x01\n$CloudSqlInstanceDataSourceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xc5\x01\n CloudSqlInstanceBackupProperties\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x66inal_backup\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0fsource_instance\x18\x04 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\x1a\n\rinstance_tier\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xeb\x01\n-CloudSqlInstanceDataSourceReferenceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n$CloudSqlInstanceInitializationConfig\x12\\\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x46.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.EditionB\x03\xe0\x41\x02\"G\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x02\"p\n/CloudSqlInstanceBackupPlanAssociationProperties\x12=\n\x14instance_create_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x96\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x42\x61\x63kupvaultCloudSqlProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41K\n sqladmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + CloudSqlInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties").msgclass + CloudSqlInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties").msgclass + CloudSqlInstanceDataSourceReferenceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties").msgclass + CloudSqlInstanceInitializationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig").msgclass + CloudSqlInstanceInitializationConfig::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition").enummodule + CloudSqlInstanceBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties").msgclass + end + end + end +end diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb new file mode 100644 index 000000000000..2fefb83b4977 --- /dev/null +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_disk.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_gce_pb' + + +descriptor_data = "\n/google/cloud/backupdr/v1/backupvault_disk.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\"@\n\x15\x44iskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"d\n\x1bRegionDiskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rreplica_zones\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xa5\x0b\n\x15\x44iskRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x19\n\x07size_gb\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x15\n\x08licenses\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12G\n\x10guest_os_feature\x18\x05 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x06 \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12+\n\x19physical_block_size_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10provisioned_iops\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16provisioned_throughput\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12-\n\x1b\x65nable_confidential_compute\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x45\n\x0cstorage_pool\x18\x0b \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"compute.googleapis.com/StoragePoolH\x08\x88\x01\x01\x12Y\n\x0b\x61\x63\x63\x65ss_mode\x18\x0c \x01(\x0e\x32:.google.cloud.backupdr.v1.DiskRestoreProperties.AccessModeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\\\n\x0c\x61rchitecture\x18\x0e \x01(\x0e\x32<.google.cloud.backupdr.v1.DiskRestoreProperties.ArchitectureB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1c\n\x0fresource_policy\x18\x0f \x03(\tB\x03\xe0\x41\x01\x12\x16\n\x04type\x18\x10 \x01(\tB\x03\xe0\x41\x02H\x0b\x88\x01\x01\x12P\n\x06labels\x18\x11 \x03(\x0b\x32;.google.cloud.backupdr.v1.DiskRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12l\n\x15resource_manager_tags\x18\x12 \x03(\x0b\x32H.google.cloud.backupdr.v1.DiskRestoreProperties.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"L\n\nAccessMode\x12\x15\n\x11READ_WRITE_SINGLE\x10\x00\x12\x13\n\x0fREAD_WRITE_MANY\x10\x01\x12\x12\n\x0eREAD_ONLY_MANY\x10\x02\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\n\n\x08_size_gbB\x16\n\x14_disk_encryption_keyB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x1e\n\x1c_enable_confidential_computeB\x0f\n\r_storage_poolB\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x07\n\x05_type\"\xff\x03\n\x14\x44iskBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08licenses\x18\x02 \x03(\t\x12\x42\n\x10guest_os_feature\x18\x03 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeature\x12V\n\x0c\x61rchitecture\x18\x04 \x01(\x0e\x32;.google.cloud.backupdr.v1.DiskBackupProperties.ArchitectureH\x01\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07size_gb\x18\x06 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06region\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x11\n\x04zone\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x15\n\rreplica_zones\x18\t \x03(\t\x12\x18\n\x0bsource_disk\x18\n \x01(\tH\x06\x88\x01\x01\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x0e\n\x0c_descriptionB\x0f\n\r_architectureB\x07\n\x05_typeB\n\n\x08_size_gbB\t\n\x07_regionB\x07\n\x05_zoneB\x0e\n\x0c_source_disk\"\\\n\x18\x44iskDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0f\n\x07size_gb\x18\x04 \x01(\x03\x42\xa8\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x14\x42\x61\x63kupvaultDiskProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\x61\n\"compute.googleapis.com/StoragePool\x12;projects/{project}/zones/{zone}/storagePools/{storage_pool}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.backupdr.v1.GuestOsFeature", "google/cloud/backupdr/v1/backupvault_gce.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + DiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskTargetEnvironment").msgclass + RegionDiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RegionDiskTargetEnvironment").msgclass + DiskRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties").msgclass + DiskRestoreProperties::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode").enummodule + DiskRestoreProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.Architecture").enummodule + DiskBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties").msgclass + DiskBackupProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties.Architecture").enummodule + DiskDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskDataSourceProperties").msgclass + end + end + end +end diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb index 6d5259561595..7822118f6ba8 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb @@ -8,7 +8,7 @@ require 'google/api/field_info_pb' -descriptor_data = "\n.google/cloud/backupdr/v1/backupvault_gce.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xe8\x07\n\x1f\x43omputeInstanceBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x04tags\x18\x02 \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsH\x01\x88\x01\x01\x12\x19\n\x0cmachine_type\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63\x61n_ip_forward\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x45\n\x11network_interface\x18\x05 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterface\x12\x34\n\x04\x64isk\x18\x06 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDisk\x12\x39\n\x08metadata\x18\x07 \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataH\x04\x88\x01\x01\x12\x41\n\x0fservice_account\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccount\x12=\n\nscheduling\x18\t \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingH\x05\x88\x01\x01\x12\x46\n\x11guest_accelerator\x18\n \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfig\x12\x1d\n\x10min_cpu_platform\x18\x0b \x01(\tH\x06\x88\x01\x01\x12Z\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeH\x07\x88\x01\x01\x12\x1c\n\x0fsource_instance\x18\r \x01(\tH\x08\x88\x01\x01\x12U\n\x06labels\x18\x0e \x03(\x0b\x32\x45.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\x07\n\x05_tagsB\x0f\n\r_machine_typeB\x11\n\x0f_can_ip_forwardB\x0b\n\t_metadataB\r\n\x0b_schedulingB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_key_revocation_action_typeB\x12\n\x10_source_instance\"\xb2\x12\n ComputeInstanceRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12^\n\x19\x61\x64vanced_machine_features\x18\x02 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.AdvancedMachineFeaturesB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0e\x63\x61n_ip_forward\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x64\n\x1c\x63onfidential_instance_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12%\n\x13\x64\x65letion_protection\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12:\n\x05\x64isks\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDiskB\x03\xe0\x41\x01\x12I\n\x0e\x64isplay_device\x18\x08 \x01(\x0b\x32\'.google.cloud.backupdr.v1.DisplayDeviceB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12L\n\x12guest_accelerators\x18\t \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1a\n\x08hostname\x18\n \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12Z\n\x17instance_encryption_key\x18\x0b \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12_\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12[\n\x06labels\x18\r \x03(\x0b\x32\x46.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x0cmachine_type\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x08metadata\x18\x0f \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\x10min_cpu_platform\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12K\n\x12network_interfaces\x18\x11 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterfaceB\x03\xe0\x41\x01\x12`\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.NetworkPerformanceConfigB\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x42\n\x06params\x18\x13 \x01(\x0b\x32(.google.cloud.backupdr.v1.InstanceParamsB\x03\xe0\x41\x04H\x0e\x88\x01\x01\x12\x88\x01\n\x1aprivate_ipv6_google_access\x18\x14 \x01(\x0e\x32Z.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccessB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12S\n\x13\x61llocation_affinity\x18\x15 \x01(\x0b\x32,.google.cloud.backupdr.v1.AllocationAffinityB\x03\xe0\x41\x01H\x10\x88\x01\x01\x12\x1e\n\x11resource_policies\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\nscheduling\x18\x17 \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingB\x03\xe0\x41\x01H\x11\x88\x01\x01\x12G\n\x10service_accounts\x18\x18 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccountB\x03\xe0\x41\x01\x12\x36\n\x04tags\x18\x1a \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsB\x03\xe0\x41\x01H\x12\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc7\x01\n\x1fInstancePrivateIpv6GoogleAccess\x12\x33\n/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\'\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\x02\x12)\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\x03\x42\x07\n\x05_nameB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0b\n\t_hostnameB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x16\n\x14_allocation_affinityB\r\n\x0b_schedulingB\x07\n\x05_tags\"K\n ComputeInstanceTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n#ComputeInstanceDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cmachine_type\x18\x03 \x01(\t\x12\x18\n\x10total_disk_count\x18\x04 \x01(\x03\x12\x1a\n\x12total_disk_size_gb\x18\x05 \x01(\x03\"\xa5\x02\n\x17\x41\x64vancedMachineFeatures\x12.\n\x1c\x65nable_nested_virtualization\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10threads_per_core\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x12visible_core_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12(\n\x16\x65nable_uefi_networking\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x13\n\x11_threads_per_coreB\x15\n\x13_visible_core_countB\x19\n\x17_enable_uefi_networking\"k\n\x1a\x43onfidentialInstanceConfig\x12-\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1e\n\x1c_enable_confidential_compute\"D\n\rDisplayDevice\x12 \n\x0e\x65nable_display\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x87\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x10\x61\x63\x63\x65lerator_type\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_accelerator_typeB\x14\n\x12_accelerator_count\"\xbc\x01\n\x15\x43ustomerEncryptionKey\x12\x16\n\x07raw_key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12 \n\x11rsa_encrypted_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0ckms_key_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12)\n\x17kms_key_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x05\n\x03keyB\x1a\n\x18_kms_key_service_account\"I\n\x05\x45ntry\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"?\n\x08Metadata\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32\x1f.google.cloud.backupdr.v1.EntryB\x03\xe0\x41\x01\"\x8b\t\n\x10NetworkInterface\x12\x19\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02H\x02\x88\x01\x01\x12&\n\x0cipv6_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x03H\x03\x88\x01\x01\x12-\n\x1binternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63\x65ss_configs\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12H\n\x13ipv6_access_configs\x18\x08 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x61lias_ip_ranges\x18\t \x03(\x0b\x32&.google.cloud.backupdr.v1.AliasIpRangeB\x03\xe0\x41\x01\x12M\n\nstack_type\x18\n \x01(\x0e\x32\x34.google.cloud.backupdr.v1.NetworkInterface.StackTypeH\x06\x88\x01\x01\x12]\n\x10ipv6_access_type\x18\x0b \x01(\x0e\x32\x39.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessTypeB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0bqueue_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12N\n\x08nic_type\x18\r \x01(\x0e\x32\x32.google.cloud.backupdr.v1.NetworkInterface.NicTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12$\n\x12network_attachment\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\"E\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIPV4_ONLY\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIpv6AccessType\x12 \n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\">\n\x07NicType\x12\x18\n\x14NIC_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nVIRTIO_NET\x10\x01\x12\t\n\x05GVNIC\x10\x02\x42\n\n\x08_networkB\r\n\x0b_subnetworkB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x07\n\x05_nameB\r\n\x0b_stack_typeB\x13\n\x11_ipv6_access_typeB\x0e\n\x0c_queue_countB\x0b\n\t_nic_typeB\x15\n\x13_network_attachment\"\xd9\x01\n\x18NetworkPerformanceConfig\x12\x66\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.NetworkPerformanceConfig.TierB\x03\xe0\x41\x01H\x00\x88\x01\x01\"5\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06TIER_1\x10\x02\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\xab\x05\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AccessConfig.AccessTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0b\x65xternal_ip\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1f\n\rexternal_ipv6\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x65xternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12 \n\x0eset_public_ptr\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16public_ptr_domain_name\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12R\n\x0cnetwork_tier\x18\x08 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.AccessConfig.NetworkTierB\x03\xe0\x41\x01H\x07\x88\x01\x01\"N\n\nAccessType\x12\x1b\n\x17\x41\x43\x43\x45SS_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eONE_TO_ONE_NAT\x10\x01\x12\x0f\n\x0b\x44IRECT_IPV6\x10\x02\"F\n\x0bNetworkTier\x12\x1c\n\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREMIUM\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x42\x07\n\x05_typeB\x07\n\x05_nameB\x0e\n\x0c_external_ipB\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x11\n\x0f_set_public_ptrB\x19\n\x17_public_ptr_domain_nameB\x0f\n\r_network_tier\"\x84\x01\n\x0c\x41liasIpRange\x12\x1f\n\rip_cidr_range\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15subnetwork_range_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\xb3\x01\n\x0eInstanceParams\x12\x65\n\x15resource_manager_tags\x18\x01 \x03(\x0b\x32\x41.google.cloud.backupdr.v1.InstanceParams.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa3\x02\n\x12\x41llocationAffinity\x12\\\n\x17\x63onsume_allocation_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AllocationAffinity.TypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x15\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x42\x1a\n\x18_consume_allocation_typeB\x06\n\x04_key\"\xdc\t\n\nScheduling\x12]\n\x13on_host_maintenance\x18\x01 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.OnHostMaintenanceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61utomatic_restart\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bpreemptible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12O\n\x0fnode_affinities\x18\x04 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.Scheduling.NodeAffinityB\x03\xe0\x41\x01\x12\x1f\n\rmin_node_cpus\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x12provisioning_model\x18\x06 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.ProvisioningModelB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12m\n\x1binstance_termination_action\x18\x07 \x01(\x0e\x32>.google.cloud.backupdr.v1.Scheduling.InstanceTerminationActionB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12Z\n\x1alocal_ssd_recovery_timeout\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.SchedulingDurationB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\xe1\x01\n\x0cNodeAffinity\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x08operator\x18\x02 \x01(\x0e\x32:.google.cloud.backupdr.v1.Scheduling.NodeAffinity.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x06\n\x04_keyB\x0b\n\t_operator\"U\n\x11OnHostMaintenance\x12#\n\x1fON_HOST_MAINTENANCE_UNSPECIFIED\x10\x00\x12\r\n\tTERMINATE\x10\x01\x12\x0c\n\x07MIGRATE\x10\xe8\x07\"O\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\"^\n\x19InstanceTerminationAction\x12+\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\x16\n\x14_on_host_maintenanceB\x14\n\x12_automatic_restartB\x0e\n\x0c_preemptibleB\x10\n\x0e_min_node_cpusB\x15\n\x13_provisioning_modelB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeout\"^\n\x12SchedulingDuration\x12\x19\n\x07seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05nanos\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_secondsB\x08\n\x06_nanos\"H\n\x0eServiceAccount\x12\x17\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x08\n\x06_email\"\x1a\n\x04Tags\x12\x12\n\x05items\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x91\x0c\n\x0c\x41ttachedDisk\x12\\\n\x11initialize_params\x18\x01 \x01(\x0b\x32\x37.google.cloud.backupdr.v1.AttachedDisk.InitializeParamsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65vice_name\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\x04kind\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14\x64isk_type_deprecated\x18\x06 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x02\x18\x01H\x03\x88\x01\x01\x12G\n\x04mode\x18\x07 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskModeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x18\n\x06source\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\x05index\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04\x62oot\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0b\x61uto_delete\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x14\n\x07license\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12V\n\x0e\x64isk_interface\x18\r \x01(\x0e\x32\x34.google.cloud.backupdr.v1.AttachedDisk.DiskInterfaceB\x03\xe0\x41\x01H\t\x88\x01\x01\x12G\n\x10guest_os_feature\x18\x0e \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x0f \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0c\x64isk_size_gb\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12W\n\x0bsaved_state\x18\x11 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.AttachedDisk.DiskSavedStateB\x06\xe0\x41\x01\xe0\x41\x03H\x0c\x88\x01\x01\x12\x1e\n\tdisk_type\x18\x12 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\r\x88\x01\x01\x12G\n\x04type\x18\x13 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x1aY\n\x10InitializeParams\x12\x1b\n\tdisk_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\rreplica_zones\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_disk_name\"B\n\x08\x44iskType\x12\x19\n\x15\x44ISK_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCRATCH\x10\x01\x12\x0e\n\nPERSISTENT\x10\x02\"P\n\x08\x44iskMode\x12\x19\n\x15\x44ISK_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\n\n\x06LOCKED\x10\x03\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\"A\n\x0e\x44iskSavedState\x12 \n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\x00\x12\r\n\tPRESERVED\x10\x01\x42\x14\n\x12_initialize_paramsB\x0e\n\x0c_device_nameB\x07\n\x05_kindB\x17\n\x15_disk_type_deprecatedB\x07\n\x05_modeB\t\n\x07_sourceB\x08\n\x06_indexB\x07\n\x05_bootB\x0e\n\x0c_auto_deleteB\x11\n\x0f_disk_interfaceB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0e\n\x0c_saved_stateB\x0c\n\n_disk_typeB\x07\n\x05_type\"\xb5\x03\n\x0eGuestOsFeature\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.GuestOsFeature.FeatureTypeH\x00\x88\x01\x01\"\xd0\x02\n\x0b\x46\x65\x61tureType\x12\x1c\n\x18\x46\x45\x41TURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VIRTIO_SCSI_MULTIQUEUE\x10\x01\x12\x0b\n\x07WINDOWS\x10\x02\x12\x13\n\x0fMULTI_IP_SUBNET\x10\x03\x12\x13\n\x0fUEFI_COMPATIBLE\x10\x04\x12\x0f\n\x0bSECURE_BOOT\x10\x05\x12\t\n\x05GVNIC\x10\x06\x12\x0f\n\x0bSEV_CAPABLE\x10\x07\x12\x1f\n\x1b\x42\x41RE_METAL_LINUX_COMPATIBLE\x10\x08\x12\x1d\n\x19SUSPEND_RESUME_COMPATIBLE\x10\t\x12\x17\n\x13SEV_LIVE_MIGRATABLE\x10\n\x12\x13\n\x0fSEV_SNP_CAPABLE\x10\x0b\x12\x0f\n\x0bTDX_CAPABLE\x10\x0c\x12\x08\n\x04IDPF\x10\r\x12\x1a\n\x16SEV_LIVE_MIGRATABLE_V2\x10\x0e\x42\x07\n\x05_type*Y\n\x17KeyRevocationActionType\x12*\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\xc3\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x13\x42\x61\x63kupvaultGceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" +descriptor_data = "\n.google/cloud/backupdr/v1/backupvault_gce.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xe8\x07\n\x1f\x43omputeInstanceBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x04tags\x18\x02 \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsH\x01\x88\x01\x01\x12\x19\n\x0cmachine_type\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63\x61n_ip_forward\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x45\n\x11network_interface\x18\x05 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterface\x12\x34\n\x04\x64isk\x18\x06 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDisk\x12\x39\n\x08metadata\x18\x07 \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataH\x04\x88\x01\x01\x12\x41\n\x0fservice_account\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccount\x12=\n\nscheduling\x18\t \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingH\x05\x88\x01\x01\x12\x46\n\x11guest_accelerator\x18\n \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfig\x12\x1d\n\x10min_cpu_platform\x18\x0b \x01(\tH\x06\x88\x01\x01\x12Z\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeH\x07\x88\x01\x01\x12\x1c\n\x0fsource_instance\x18\r \x01(\tH\x08\x88\x01\x01\x12U\n\x06labels\x18\x0e \x03(\x0b\x32\x45.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\x07\n\x05_tagsB\x0f\n\r_machine_typeB\x11\n\x0f_can_ip_forwardB\x0b\n\t_metadataB\r\n\x0b_schedulingB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_key_revocation_action_typeB\x12\n\x10_source_instance\"\xc7\x12\n ComputeInstanceRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12^\n\x19\x61\x64vanced_machine_features\x18\x02 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.AdvancedMachineFeaturesB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0e\x63\x61n_ip_forward\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x64\n\x1c\x63onfidential_instance_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12%\n\x13\x64\x65letion_protection\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12:\n\x05\x64isks\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDiskB\x03\xe0\x41\x01\x12I\n\x0e\x64isplay_device\x18\x08 \x01(\x0b\x32\'.google.cloud.backupdr.v1.DisplayDeviceB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12L\n\x12guest_accelerators\x18\t \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1a\n\x08hostname\x18\n \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12Z\n\x17instance_encryption_key\x18\x0b \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12_\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12[\n\x06labels\x18\r \x03(\x0b\x32\x46.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x0cmachine_type\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x08metadata\x18\x0f \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\x10min_cpu_platform\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12K\n\x12network_interfaces\x18\x11 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterfaceB\x03\xe0\x41\x01\x12`\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.NetworkPerformanceConfigB\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x42\n\x06params\x18\x13 \x01(\x0b\x32(.google.cloud.backupdr.v1.InstanceParamsB\x03\xe0\x41\x04H\x0e\x88\x01\x01\x12\x88\x01\n\x1aprivate_ipv6_google_access\x18\x14 \x01(\x0e\x32Z.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccessB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12h\n\x13\x61llocation_affinity\x18\x15 \x01(\x0b\x32,.google.cloud.backupdr.v1.AllocationAffinityB\x03\xe0\x41\x01H\x10R\x13reservationAffinity\x88\x01\x01\x12\x1e\n\x11resource_policies\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\nscheduling\x18\x17 \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingB\x03\xe0\x41\x01H\x11\x88\x01\x01\x12G\n\x10service_accounts\x18\x18 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccountB\x03\xe0\x41\x01\x12\x36\n\x04tags\x18\x1a \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsB\x03\xe0\x41\x01H\x12\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc7\x01\n\x1fInstancePrivateIpv6GoogleAccess\x12\x33\n/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\'\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\x02\x12)\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\x03\x42\x07\n\x05_nameB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0b\n\t_hostnameB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x16\n\x14_allocation_affinityB\r\n\x0b_schedulingB\x07\n\x05_tags\"K\n ComputeInstanceTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n#ComputeInstanceDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cmachine_type\x18\x03 \x01(\t\x12\x18\n\x10total_disk_count\x18\x04 \x01(\x03\x12\x1a\n\x12total_disk_size_gb\x18\x05 \x01(\x03\"\xa5\x02\n\x17\x41\x64vancedMachineFeatures\x12.\n\x1c\x65nable_nested_virtualization\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10threads_per_core\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x12visible_core_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12(\n\x16\x65nable_uefi_networking\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x13\n\x11_threads_per_coreB\x15\n\x13_visible_core_countB\x19\n\x17_enable_uefi_networking\"k\n\x1a\x43onfidentialInstanceConfig\x12-\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1e\n\x1c_enable_confidential_compute\"D\n\rDisplayDevice\x12 \n\x0e\x65nable_display\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x87\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x10\x61\x63\x63\x65lerator_type\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_accelerator_typeB\x14\n\x12_accelerator_count\"\xbc\x01\n\x15\x43ustomerEncryptionKey\x12\x16\n\x07raw_key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12 \n\x11rsa_encrypted_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0ckms_key_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12)\n\x17kms_key_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x05\n\x03keyB\x1a\n\x18_kms_key_service_account\"I\n\x05\x45ntry\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"?\n\x08Metadata\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32\x1f.google.cloud.backupdr.v1.EntryB\x03\xe0\x41\x01\"\x96\t\n\x10NetworkInterface\x12\x19\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12/\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02H\x02R\tnetworkIP\x88\x01\x01\x12&\n\x0cipv6_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x03H\x03\x88\x01\x01\x12-\n\x1binternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63\x65ss_configs\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12H\n\x13ipv6_access_configs\x18\x08 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x61lias_ip_ranges\x18\t \x03(\x0b\x32&.google.cloud.backupdr.v1.AliasIpRangeB\x03\xe0\x41\x01\x12M\n\nstack_type\x18\n \x01(\x0e\x32\x34.google.cloud.backupdr.v1.NetworkInterface.StackTypeH\x06\x88\x01\x01\x12]\n\x10ipv6_access_type\x18\x0b \x01(\x0e\x32\x39.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessTypeB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0bqueue_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12N\n\x08nic_type\x18\r \x01(\x0e\x32\x32.google.cloud.backupdr.v1.NetworkInterface.NicTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12$\n\x12network_attachment\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\"E\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIPV4_ONLY\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIpv6AccessType\x12 \n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\">\n\x07NicType\x12\x18\n\x14NIC_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nVIRTIO_NET\x10\x01\x12\t\n\x05GVNIC\x10\x02\x42\n\n\x08_networkB\r\n\x0b_subnetworkB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x07\n\x05_nameB\r\n\x0b_stack_typeB\x13\n\x11_ipv6_access_typeB\x0e\n\x0c_queue_countB\x0b\n\t_nic_typeB\x15\n\x13_network_attachment\"\xd9\x01\n\x18NetworkPerformanceConfig\x12\x66\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.NetworkPerformanceConfig.TierB\x03\xe0\x41\x01H\x00\x88\x01\x01\"5\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06TIER_1\x10\x02\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\xb2\x05\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AccessConfig.AccessTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x0b\x65xternal_ip\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x05natIP\x88\x01\x01\x12\x1f\n\rexternal_ipv6\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x65xternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12 \n\x0eset_public_ptr\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16public_ptr_domain_name\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12R\n\x0cnetwork_tier\x18\x08 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.AccessConfig.NetworkTierB\x03\xe0\x41\x01H\x07\x88\x01\x01\"N\n\nAccessType\x12\x1b\n\x17\x41\x43\x43\x45SS_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eONE_TO_ONE_NAT\x10\x01\x12\x0f\n\x0b\x44IRECT_IPV6\x10\x02\"F\n\x0bNetworkTier\x12\x1c\n\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREMIUM\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x42\x07\n\x05_typeB\x07\n\x05_nameB\x0e\n\x0c_external_ipB\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x11\n\x0f_set_public_ptrB\x19\n\x17_public_ptr_domain_nameB\x0f\n\r_network_tier\"\x84\x01\n\x0c\x41liasIpRange\x12\x1f\n\rip_cidr_range\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15subnetwork_range_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\xb3\x01\n\x0eInstanceParams\x12\x65\n\x15resource_manager_tags\x18\x01 \x03(\x0b\x32\x41.google.cloud.backupdr.v1.InstanceParams.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x02\n\x12\x41llocationAffinity\x12t\n\x17\x63onsume_allocation_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AllocationAffinity.TypeB\x03\xe0\x41\x01H\x00R\x16\x63onsumeReservationType\x88\x01\x01\x12\x15\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x42\x1a\n\x18_consume_allocation_typeB\x06\n\x04_key\"\xdc\t\n\nScheduling\x12]\n\x13on_host_maintenance\x18\x01 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.OnHostMaintenanceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61utomatic_restart\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bpreemptible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12O\n\x0fnode_affinities\x18\x04 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.Scheduling.NodeAffinityB\x03\xe0\x41\x01\x12\x1f\n\rmin_node_cpus\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x12provisioning_model\x18\x06 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.ProvisioningModelB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12m\n\x1binstance_termination_action\x18\x07 \x01(\x0e\x32>.google.cloud.backupdr.v1.Scheduling.InstanceTerminationActionB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12Z\n\x1alocal_ssd_recovery_timeout\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.SchedulingDurationB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\xe1\x01\n\x0cNodeAffinity\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x08operator\x18\x02 \x01(\x0e\x32:.google.cloud.backupdr.v1.Scheduling.NodeAffinity.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x06\n\x04_keyB\x0b\n\t_operator\"U\n\x11OnHostMaintenance\x12#\n\x1fON_HOST_MAINTENANCE_UNSPECIFIED\x10\x00\x12\r\n\tTERMINATE\x10\x01\x12\x0c\n\x07MIGRATE\x10\xe8\x07\"O\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\"^\n\x19InstanceTerminationAction\x12+\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\x16\n\x14_on_host_maintenanceB\x14\n\x12_automatic_restartB\x0e\n\x0c_preemptibleB\x10\n\x0e_min_node_cpusB\x15\n\x13_provisioning_modelB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeout\"^\n\x12SchedulingDuration\x12\x19\n\x07seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05nanos\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_secondsB\x08\n\x06_nanos\"H\n\x0eServiceAccount\x12\x17\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x08\n\x06_email\"\x1a\n\x04Tags\x12\x12\n\x05items\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x91\x0c\n\x0c\x41ttachedDisk\x12\\\n\x11initialize_params\x18\x01 \x01(\x0b\x32\x37.google.cloud.backupdr.v1.AttachedDisk.InitializeParamsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65vice_name\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\x04kind\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14\x64isk_type_deprecated\x18\x06 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x02\x18\x01H\x03\x88\x01\x01\x12G\n\x04mode\x18\x07 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskModeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x18\n\x06source\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\x05index\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04\x62oot\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0b\x61uto_delete\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x14\n\x07license\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12V\n\x0e\x64isk_interface\x18\r \x01(\x0e\x32\x34.google.cloud.backupdr.v1.AttachedDisk.DiskInterfaceB\x03\xe0\x41\x01H\t\x88\x01\x01\x12G\n\x10guest_os_feature\x18\x0e \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x0f \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0c\x64isk_size_gb\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12W\n\x0bsaved_state\x18\x11 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.AttachedDisk.DiskSavedStateB\x06\xe0\x41\x01\xe0\x41\x03H\x0c\x88\x01\x01\x12\x1e\n\tdisk_type\x18\x12 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\r\x88\x01\x01\x12G\n\x04type\x18\x13 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x1aY\n\x10InitializeParams\x12\x1b\n\tdisk_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\rreplica_zones\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_disk_name\"B\n\x08\x44iskType\x12\x19\n\x15\x44ISK_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCRATCH\x10\x01\x12\x0e\n\nPERSISTENT\x10\x02\"P\n\x08\x44iskMode\x12\x19\n\x15\x44ISK_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\n\n\x06LOCKED\x10\x03\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\"A\n\x0e\x44iskSavedState\x12 \n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\x00\x12\r\n\tPRESERVED\x10\x01\x42\x14\n\x12_initialize_paramsB\x0e\n\x0c_device_nameB\x07\n\x05_kindB\x17\n\x15_disk_type_deprecatedB\x07\n\x05_modeB\t\n\x07_sourceB\x08\n\x06_indexB\x07\n\x05_bootB\x0e\n\x0c_auto_deleteB\x11\n\x0f_disk_interfaceB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0e\n\x0c_saved_stateB\x0c\n\n_disk_typeB\x07\n\x05_type\"\xb5\x03\n\x0eGuestOsFeature\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.GuestOsFeature.FeatureTypeH\x00\x88\x01\x01\"\xd0\x02\n\x0b\x46\x65\x61tureType\x12\x1c\n\x18\x46\x45\x41TURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VIRTIO_SCSI_MULTIQUEUE\x10\x01\x12\x0b\n\x07WINDOWS\x10\x02\x12\x13\n\x0fMULTI_IP_SUBNET\x10\x03\x12\x13\n\x0fUEFI_COMPATIBLE\x10\x04\x12\x0f\n\x0bSECURE_BOOT\x10\x05\x12\t\n\x05GVNIC\x10\x06\x12\x0f\n\x0bSEV_CAPABLE\x10\x07\x12\x1f\n\x1b\x42\x41RE_METAL_LINUX_COMPATIBLE\x10\x08\x12\x1d\n\x19SUSPEND_RESUME_COMPATIBLE\x10\t\x12\x17\n\x13SEV_LIVE_MIGRATABLE\x10\n\x12\x13\n\x0fSEV_SNP_CAPABLE\x10\x0b\x12\x0f\n\x0bTDX_CAPABLE\x10\x0c\x12\x08\n\x04IDPF\x10\r\x12\x1a\n\x16SEV_LIVE_MIGRATABLE_V2\x10\x0e\x42\x07\n\x05_type*Y\n\x17KeyRevocationActionType\x12*\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\xc3\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x13\x42\x61\x63kupvaultGceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb index 4a034521fc3a..2eacc66e5fa6 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb @@ -8,6 +8,8 @@ require 'google/api/field_info_pb' require 'google/api/resource_pb' require 'google/cloud/backupdr/v1/backupvault_ba_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/cloud/backupdr/v1/backupvault_disk_pb' require 'google/cloud/backupdr/v1/backupvault_gce_pb' require 'google/protobuf/duration_pb' require 'google/protobuf/field_mask_pb' @@ -15,7 +17,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n*google/cloud/backupdr/v1/backupvault.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/backupdr/v1/backupvault_ba.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x98\x0b\n\x0b\x42\x61\x63kupVault\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.BackupVault.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12W\n*backup_minimum_enforced_retention_duration\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1b\n\tdeletable\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x16\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupVault.StateB\x03\xe0\x41\x03\x12<\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12total_stored_bytes\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x15 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12P\n\x0b\x61nnotations\x18\x16 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.AnnotationsEntryB\x03\xe0\x41\x01\x12X\n\x12\x61\x63\x63\x65ss_restriction\x18\x18 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.BackupVault.AccessRestrictionB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\"\x9e\x01\n\x11\x41\x63\x63\x65ssRestriction\x12\"\n\x1e\x41\x43\x43\x45SS_RESTRICTION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWITHIN_PROJECT\x10\x01\x12\x17\n\x13WITHIN_ORGANIZATION\x10\x02\x12\x10\n\x0cUNRESTRICTED\x10\x03\x12&\n\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\x10\x04:\x88\x01\xea\x41\x84\x01\n#backupdr.googleapis.com/BackupVault\x12\x42projects/{project}/locations/{location}/backupVaults/{backupvault}*\x0c\x62\x61\x63kupVaults2\x0b\x62\x61\x63kupVaultB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB-\n+_backup_minimum_enforced_retention_durationB\x0c\n\n_deletableB\x07\n\x05_etagB\x11\n\x0f_effective_time\"\xd3\x08\n\nDataSource\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05state\x18\x15 \x01(\x0e\x32*.google.cloud.backupdr.v1.DataSource.StateB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.DataSource.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x07 \x01(\x03H\x03\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x12total_stored_bytes\x18\x17 \x01(\x03H\x05\x88\x01\x01\x12\x46\n\x0c\x63onfig_state\x18\x18 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12K\n\x12\x62\x61\x63kup_config_info\x18\x19 \x01(\x0b\x32*.google.cloud.backupdr.v1.BackupConfigInfoB\x03\xe0\x41\x03\x12S\n\x18\x64\x61ta_source_gcp_resource\x18\x1a \x01(\x0b\x32/.google.cloud.backupdr.v1.DataSourceGcpResourceH\x00\x12r\n(data_source_backup_appliance_application\x18\x1b \x01(\x0b\x32>.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationH\x00\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\x9e\x01\xea\x41\x9a\x01\n\"backupdr.googleapis.com/DataSource\x12[projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x11\n\x0fsource_resourceB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x0f\n\r_backup_countB\x07\n\x05_etagB\x15\n\x13_total_stored_bytes\"\xb1\x04\n\x10\x42\x61\x63kupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x11gcp_backup_config\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.GcpBackupConfigH\x00\x12_\n\x1e\x62\x61\x63kup_appliance_backup_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.BackupApplianceBackupConfigH\x00\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x0f\n\rbackup_config\"\xe0\x01\n\x0fGcpBackupConfig\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\x17\x62\x61\x63kup_plan_description\x18\x02 \x01(\t\x12S\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\tB2\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x19\n\x11\x62\x61\x63kup_plan_rules\x18\x04 \x03(\t\"\xba\x01\n\x1b\x42\x61\x63kupApplianceBackupConfig\x12\x1d\n\x15\x62\x61\x63kup_appliance_name\x18\x01 \x01(\t\x12\x1b\n\x13\x62\x61\x63kup_appliance_id\x18\x02 \x01(\x03\x12\x0e\n\x06sla_id\x18\x03 \x01(\x03\x12\x18\n\x10\x61pplication_name\x18\x04 \x01(\t\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x10\n\x08slt_name\x18\x06 \x01(\t\x12\x10\n\x08slp_name\x18\x07 \x01(\t\"\xe2\x01\n\x15\x44\x61taSourceGcpResource\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12o\n&compute_instance_datasource_properties\x18\x04 \x01(\x0b\x32=.google.cloud.backupdr.v1.ComputeInstanceDataSourcePropertiesH\x00\x42\x19\n\x17gcp_resource_properties\"\xb9\x01\n$DataSourceBackupApplianceApplication\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_appliance\x18\x02 \x01(\t\x12\x14\n\x0c\x61ppliance_id\x18\x03 \x01(\x03\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x08 \x01(\x03\x12\x10\n\x08hostname\x18\x06 \x01(\t\x12\x0f\n\x07host_id\x18\x07 \x01(\x03\")\n\x0fServiceLockInfo\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x17\x42\x61\x63kupApplianceLockInfo\x12 \n\x13\x62\x61\x63kup_appliance_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\"\n\x15\x62\x61\x63kup_appliance_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0block_reason\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x08job_name\x18\x06 \x01(\tH\x00\x12\x16\n\x0c\x62\x61\x63kup_image\x18\x07 \x01(\tH\x00\x12\x10\n\x06sla_id\x18\x08 \x01(\x03H\x00\x42\r\n\x0block_source\"\xfe\x01\n\nBackupLock\x12\x38\n\x0flock_until_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12W\n\x1a\x62\x61\x63kup_appliance_lock_info\x18\x03 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.BackupApplianceLockInfoH\x00\x12K\n\x11service_lock_info\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.ServiceLockInfoB\x03\xe0\x41\x03H\x00\x42\x10\n\x0e\x43lientLockInfo\"\xbc\r\n\x06\x42\x61\x63kup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x41\n\x06labels\x18\x05 \x03(\x0b\x32,.google.cloud.backupdr.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12I\n\x1b\x65nforced_retention_end_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x39\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12>\n\x10\x63onsistency_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x16\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12:\n\x05state\x18\x0f \x01(\x0e\x32&.google.cloud.backupdr.v1.Backup.StateB\x03\xe0\x41\x03\x12@\n\rservice_locks\x18\x11 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x03\x12I\n\x16\x62\x61\x63kup_appliance_locks\x18\x12 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x01\x12l\n\"compute_instance_backup_properties\x18\x13 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.ComputeInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12l\n\"backup_appliance_backup_properties\x18\x15 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.BackupApplianceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x45\n\x0b\x62\x61\x63kup_type\x18\x14 \x01(\x0e\x32+.google.cloud.backupdr.v1.Backup.BackupTypeB\x03\xe0\x41\x03\x12W\n\x14gcp_backup_plan_info\x18\x16 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfoB\x03\xe0\x41\x03H\x01\x12 \n\x13resource_size_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x1an\n\x11GCPBackupPlanInfo\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x13\x62\x61\x63kup_plan_rule_id\x18\x02 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\"G\n\nBackupType\x12\x1b\n\x17\x42\x41\x43KUP_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\r\n\tON_DEMAND\x10\x02:\xa3\x01\xea\x41\x9f\x01\n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12lprojects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupB\x13\n\x11\x62\x61\x63kup_propertiesB\x0b\n\tplan_infoB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x1e\n\x1c_enforced_retention_end_timeB\x0e\n\x0c_expire_timeB\x13\n\x11_consistency_timeB\x07\n\x05_etag\"\xf4\x01\n\x18\x43reateBackupVaultRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x1c\n\x0f\x62\x61\x63kup_vault_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x03 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xf1\x01\n\x17ListBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12<\n\x04view\x18\x06 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x86\x01\n\x18ListBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x1e\x46\x65tchUsableBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1f\x46\x65tchUsableBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x90\x01\n\x15GetBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12<\n\x04view\x18\x02 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\xe3\x01\n\x18UpdateBackupVaultRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x02 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xfc\x01\n\x18\x44\x65leteBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1dignore_backup_plan_references\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x16ListDataSourcesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/DataSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListDataSourcesResponse\x12:\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetDataSourceRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/DataSource\"\xcc\x01\n\x17UpdateDataSourceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12>\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32$.google.cloud.backupdr.v1.DataSourceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x01\n\x12ListBackupsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x06 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"v\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10GetBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x37\n\x04view\x18\x02 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"\xa3\x01\n\x13UpdateBackupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32 .google.cloud.backupdr.v1.BackupB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"l\n\x13\x44\x65leteBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xf0\x02\n\x14RestoreBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n#compute_instance_target_environment\x18\x03 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironmentH\x00\x12i\n#compute_instance_restore_properties\x18\x04 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceRestorePropertiesH\x01\x42\x14\n\x12target_environmentB\x15\n\x13instance_properties\"Z\n\x15RestoreBackupResponse\x12\x41\n\x0ftarget_resource\x18\x01 \x01(\x0b\x32(.google.cloud.backupdr.v1.TargetResource\"g\n\x0eTargetResource\x12=\n\x0cgcp_resource\x18\x01 \x01(\x0b\x32%.google.cloud.backupdr.v1.GcpResourceH\x00\x42\x16\n\x14target_resource_info\"G\n\x0bGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t*Q\n\x11\x42\x61\x63kupConfigState\x12#\n\x1f\x42\x41\x43KUP_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PASSIVE\x10\x02*V\n\nBackupView\x12\x1b\n\x17\x42\x41\x43KUP_VIEW_UNSPECIFIED\x10\x00\x12\x15\n\x11\x42\x41\x43KUP_VIEW_BASIC\x10\x01\x12\x14\n\x10\x42\x41\x43KUP_VIEW_FULL\x10\x02*m\n\x0f\x42\x61\x63kupVaultView\x12!\n\x1d\x42\x41\x43KUP_VAULT_VIEW_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42\x41\x43KUP_VAULT_VIEW_BASIC\x10\x01\x12\x1a\n\x16\x42\x41\x43KUP_VAULT_VIEW_FULL\x10\x02\x42\xc0\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x10\x42\x61\x63kupVaultProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" +descriptor_data = "\n*google/cloud/backupdr/v1/backupvault.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/backupdr/v1/backupvault_ba.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a/google/cloud/backupdr/v1/backupvault_disk.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xa6\x0b\n\x0b\x42\x61\x63kupVault\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.BackupVault.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12W\n*backup_minimum_enforced_retention_duration\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1b\n\tdeletable\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x16\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupVault.StateB\x03\xe0\x41\x03\x12<\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12total_stored_bytes\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x15 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12P\n\x0b\x61nnotations\x18\x16 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.AnnotationsEntryB\x03\xe0\x41\x01\x12X\n\x12\x61\x63\x63\x65ss_restriction\x18\x18 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.BackupVault.AccessRestrictionB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\"\x9e\x01\n\x11\x41\x63\x63\x65ssRestriction\x12\"\n\x1e\x41\x43\x43\x45SS_RESTRICTION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWITHIN_PROJECT\x10\x01\x12\x17\n\x13WITHIN_ORGANIZATION\x10\x02\x12\x10\n\x0cUNRESTRICTED\x10\x03\x12&\n\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\x10\x04:\x88\x01\xea\x41\x84\x01\n#backupdr.googleapis.com/BackupVault\x12\x42projects/{project}/locations/{location}/backupVaults/{backupvault}*\x0c\x62\x61\x63kupVaults2\x0b\x62\x61\x63kupVaultB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB-\n+_backup_minimum_enforced_retention_durationB\x0c\n\n_deletableB\x07\n\x05_etagB\x11\n\x0f_effective_time\"\x8c\t\n\nDataSource\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05state\x18\x15 \x01(\x0e\x32*.google.cloud.backupdr.v1.DataSource.StateB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.DataSource.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x07 \x01(\x03H\x03\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x12total_stored_bytes\x18\x17 \x01(\x03H\x05\x88\x01\x01\x12\x46\n\x0c\x63onfig_state\x18\x18 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12K\n\x12\x62\x61\x63kup_config_info\x18\x19 \x01(\x0b\x32*.google.cloud.backupdr.v1.BackupConfigInfoB\x03\xe0\x41\x03\x12S\n\x18\x64\x61ta_source_gcp_resource\x18\x1a \x01(\x0b\x32/.google.cloud.backupdr.v1.DataSourceGcpResourceH\x00\x12r\n(data_source_backup_appliance_application\x18\x1b \x01(\x0b\x32>.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationH\x00\x12\x37\n*backup_blocked_by_vault_access_restriction\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\x9e\x01\xea\x41\x9a\x01\n\"backupdr.googleapis.com/DataSource\x12[projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x11\n\x0fsource_resourceB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x0f\n\r_backup_countB\x07\n\x05_etagB\x15\n\x13_total_stored_bytes\"\xb1\x04\n\x10\x42\x61\x63kupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x11gcp_backup_config\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.GcpBackupConfigH\x00\x12_\n\x1e\x62\x61\x63kup_appliance_backup_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.BackupApplianceBackupConfigH\x00\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x0f\n\rbackup_config\"\xa4\x02\n\x0fGcpBackupConfig\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\x17\x62\x61\x63kup_plan_description\x18\x02 \x01(\t\x12S\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\tB2\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x19\n\x11\x62\x61\x63kup_plan_rules\x18\x04 \x03(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x05 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x06 \x01(\t\"\xba\x01\n\x1b\x42\x61\x63kupApplianceBackupConfig\x12\x1d\n\x15\x62\x61\x63kup_appliance_name\x18\x01 \x01(\t\x12\x1b\n\x13\x62\x61\x63kup_appliance_id\x18\x02 \x01(\x03\x12\x0e\n\x06sla_id\x18\x03 \x01(\x03\x12\x18\n\x10\x61pplication_name\x18\x04 \x01(\t\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x10\n\x08slt_name\x18\x06 \x01(\t\x12\x10\n\x08slp_name\x18\x07 \x01(\t\"\xb5\x03\n\x15\x44\x61taSourceGcpResource\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12o\n&compute_instance_datasource_properties\x18\x04 \x01(\x0b\x32=.google.cloud.backupdr.v1.ComputeInstanceDataSourcePropertiesH\x00\x12w\n(cloud_sql_instance_datasource_properties\x18\x05 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12X\n\x1a\x64isk_datasource_properties\x18\x07 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.DiskDataSourcePropertiesH\x00\x42\x19\n\x17gcp_resource_properties\"\xb9\x01\n$DataSourceBackupApplianceApplication\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_appliance\x18\x02 \x01(\t\x12\x14\n\x0c\x61ppliance_id\x18\x03 \x01(\x03\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x08 \x01(\x03\x12\x10\n\x08hostname\x18\x06 \x01(\t\x12\x0f\n\x07host_id\x18\x07 \x01(\x03\")\n\x0fServiceLockInfo\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x17\x42\x61\x63kupApplianceLockInfo\x12 \n\x13\x62\x61\x63kup_appliance_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\"\n\x15\x62\x61\x63kup_appliance_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0block_reason\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x08job_name\x18\x06 \x01(\tH\x00\x12\x16\n\x0c\x62\x61\x63kup_image\x18\x07 \x01(\tH\x00\x12\x10\n\x06sla_id\x18\x08 \x01(\x03H\x00\x42\r\n\x0block_source\"\xfe\x01\n\nBackupLock\x12\x38\n\x0flock_until_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12W\n\x1a\x62\x61\x63kup_appliance_lock_info\x18\x03 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.BackupApplianceLockInfoH\x00\x12K\n\x11service_lock_info\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.ServiceLockInfoB\x03\xe0\x41\x03H\x00\x42\x10\n\x0e\x43lientLockInfo\"\xdf\x10\n\x06\x42\x61\x63kup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x41\n\x06labels\x18\x05 \x03(\x0b\x32,.google.cloud.backupdr.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12I\n\x1b\x65nforced_retention_end_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x39\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12>\n\x10\x63onsistency_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x16\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12:\n\x05state\x18\x0f \x01(\x0e\x32&.google.cloud.backupdr.v1.Backup.StateB\x03\xe0\x41\x03\x12@\n\rservice_locks\x18\x11 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x03\x12I\n\x16\x62\x61\x63kup_appliance_locks\x18\x12 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x01\x12l\n\"compute_instance_backup_properties\x18\x13 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.ComputeInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12o\n$cloud_sql_instance_backup_properties\x18\x1a \x01(\x0b\x32:.google.cloud.backupdr.v1.CloudSqlInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12l\n\"backup_appliance_backup_properties\x18\x15 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.BackupApplianceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12U\n\x16\x64isk_backup_properties\x18\x1c \x01(\x0b\x32..google.cloud.backupdr.v1.DiskBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x45\n\x0b\x62\x61\x63kup_type\x18\x14 \x01(\x0e\x32+.google.cloud.backupdr.v1.Backup.BackupTypeB\x03\xe0\x41\x03\x12W\n\x14gcp_backup_plan_info\x18\x16 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfoB\x03\xe0\x41\x03H\x01\x12 \n\x13resource_size_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\t\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x19 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\n\x88\x01\x01\x1a\xb2\x01\n\x11GCPBackupPlanInfo\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x13\x62\x61\x63kup_plan_rule_id\x18\x02 \x01(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x03 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x04 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\r\n\tUPLOADING\x10\x05\"b\n\nBackupType\x12\x1b\n\x17\x42\x41\x43KUP_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\r\n\tON_DEMAND\x10\x02\x12\x19\n\x15ON_DEMAND_OPERATIONAL\x10\x03:\xa3\x01\xea\x41\x9f\x01\n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12lprojects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupB\x13\n\x11\x62\x61\x63kup_propertiesB\x0b\n\tplan_infoB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x1e\n\x1c_enforced_retention_end_timeB\x0e\n\x0c_expire_timeB\x13\n\x11_consistency_timeB\x07\n\x05_etagB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xf4\x01\n\x18\x43reateBackupVaultRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x1c\n\x0f\x62\x61\x63kup_vault_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x03 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xf1\x01\n\x17ListBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12<\n\x04view\x18\x06 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x86\x01\n\x18ListBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x1e\x46\x65tchUsableBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1f\x46\x65tchUsableBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x90\x01\n\x15GetBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12<\n\x04view\x18\x02 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x91\x02\n\x18UpdateBackupVaultRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x02 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x66orce_update_access_restriction\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xfc\x01\n\x18\x44\x65leteBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1dignore_backup_plan_references\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x16ListDataSourcesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/DataSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListDataSourcesResponse\x12:\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetDataSourceRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/DataSource\"\xcc\x01\n\x17UpdateDataSourceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12>\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32$.google.cloud.backupdr.v1.DataSourceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x01\n\x12ListBackupsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x06 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"v\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10GetBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x37\n\x04view\x18\x02 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"\xa3\x01\n\x13UpdateBackupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32 .google.cloud.backupdr.v1.BackupB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"l\n\x13\x44\x65leteBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xf9\x04\n\x14RestoreBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n#compute_instance_target_environment\x18\x03 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironmentH\x00\x12R\n\x17\x64isk_target_environment\x18\x05 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskTargetEnvironmentH\x00\x12_\n\x1eregion_disk_target_environment\x18\x06 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.RegionDiskTargetEnvironmentH\x00\x12i\n#compute_instance_restore_properties\x18\x04 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceRestorePropertiesH\x01\x12R\n\x17\x64isk_restore_properties\x18\x07 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskRestorePropertiesH\x01\x42\x14\n\x12target_environmentB\x15\n\x13instance_properties\"Z\n\x15RestoreBackupResponse\x12\x41\n\x0ftarget_resource\x18\x01 \x01(\x0b\x32(.google.cloud.backupdr.v1.TargetResource\"g\n\x0eTargetResource\x12=\n\x0cgcp_resource\x18\x01 \x01(\x0b\x32%.google.cloud.backupdr.v1.GcpResourceH\x00\x42\x16\n\x14target_resource_info\"G\n\x0bGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t*Q\n\x11\x42\x61\x63kupConfigState\x12#\n\x1f\x42\x41\x43KUP_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PASSIVE\x10\x02*V\n\nBackupView\x12\x1b\n\x17\x42\x41\x43KUP_VIEW_UNSPECIFIED\x10\x00\x12\x15\n\x11\x42\x41\x43KUP_VIEW_BASIC\x10\x01\x12\x14\n\x10\x42\x41\x43KUP_VIEW_FULL\x10\x02*m\n\x0f\x42\x61\x63kupVaultView\x12!\n\x1d\x42\x41\x43KUP_VAULT_VIEW_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42\x41\x43KUP_VAULT_VIEW_BASIC\x10\x01\x12\x1a\n\x16\x42\x41\x43KUP_VAULT_VIEW_FULL\x10\x02\x42\xc0\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x10\x42\x61\x63kupVaultProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -34,6 +36,8 @@ ["google.protobuf.Duration", "google/protobuf/duration.proto"], ["google.rpc.Status", "google/rpc/status.proto"], ["google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties", "google/cloud/backupdr/v1/backupvault_gce.proto"], + ["google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], + ["google.cloud.backupdr.v1.DiskDataSourceProperties", "google/cloud/backupdr/v1/backupvault_disk.proto"], ["google.cloud.backupdr.v1.BackupApplianceBackupProperties", "google/cloud/backupdr/v1/backupvault_ba.proto"], ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ] diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb new file mode 100644 index 000000000000..a1ed8ac7c0cc --- /dev/null +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/datasourcereference.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/backupdr/v1/datasourcereference.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x05\n\x13\x44\x61taSourceReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12?\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"backupdr.googleapis.com/DataSource\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x1f\x64\x61ta_source_backup_config_state\x18\x04 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12%\n\x18\x64\x61ta_source_backup_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x61\n\x1e\x64\x61ta_source_backup_config_info\x18\x06 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.DataSourceBackupConfigInfoB\x03\xe0\x41\x03\x12_\n\x1d\x64\x61ta_source_gcp_resource_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.backupdr.v1.DataSourceGcpResourceInfoB\x03\xe0\x41\x03:\xb2\x01\xea\x41\xae\x01\n+backupdr.googleapis.com/DataSourceReference\x12Tprojects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}*\x14\x64\x61taSourceReferences2\x13\x64\x61taSourceReference\"\xca\x01\n\x1a\x44\x61taSourceBackupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xf2\x01\n\x19\x44\x61taSourceGcpResourceInfo\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12u\n\x1d\x63loud_sql_instance_properties\x18\x04 \x01(\x0b\x32G.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferencePropertiesB\x03\xe0\x41\x03H\x00\x42\x15\n\x13resource_properties\"b\n\x1dGetDataSourceReferenceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+backupdr.googleapis.com/DataSourceReference\"\xef\x01\n/FetchDataSourceReferencesForResourceTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\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\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n0FetchDataSourceReferencesForResourceTypeResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xc8\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x44\x61taSourceReferenceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceReference").msgclass + DataSourceBackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupConfigInfo").msgclass + DataSourceGcpResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResourceInfo").msgclass + GetDataSourceReferenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceReferenceRequest").msgclass + FetchDataSourceReferencesForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest").msgclass + FetchDataSourceReferencesForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse").msgclass + end + end + end +end diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb index 21d33811803c..49d0774423dc 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb @@ -341,6 +341,9 @@ class DeleteManagementServerRequest # # The request ID must be a valid UUID with the exception that zero UUID is # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] cloud_sql_instance_initialization_config + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig] + # Optional. The configuration for initializing a Cloud SQL instance. class InitializeServiceRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb index b0a3dc279fa8..1435128f59d0 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb @@ -59,7 +59,8 @@ module V1 # @return [::String] # Required. The resource type to which the `BackupPlan` will be applied. # Examples include, "compute.googleapis.com/Instance", - # "sqladmin.googleapis.com/Instance", or "alloydb.googleapis.com/Cluster". + # "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", + # "compute.googleapis.com/Disk". # @!attribute [rw] etag # @return [::String] # Optional. `etag` is returned from the service in the response. As a user of @@ -75,6 +76,27 @@ module V1 # Output only. The Google Cloud Platform Service Account to be used by the # BackupVault for taking backups. Specify the email address of the Backup # Vault Service Account. + # @!attribute [rw] log_retention_days + # @return [::Integer] + # Optional. Applicable only for CloudSQL resource_type. + # + # Configures how long logs will be stored. It is defined in “days”. This + # value should be greater than or equal to minimum enforced log retention + # duration of the backup vault. + # @!attribute [r] supported_resource_types + # @return [::Array<::String>] + # Output only. All resource types to which backupPlan can be applied. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] revision_name + # @return [::String] + # Output only. The resource id of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` class BackupPlan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -104,6 +126,9 @@ module State # The resource has been created but is not usable. INACTIVE = 4 + + # The resource is being updated. + UPDATING = 5 end end @@ -120,14 +145,12 @@ module State # defined in “days”. The value should be greater than or equal to minimum # enforced retention of the backup vault. # - # Minimum value is 1 and maximum value is 90 for hourly backups. - # Minimum value is 1 and maximum value is 90 for daily backups. - # Minimum value is 7 and maximum value is 186 for weekly backups. - # Minimum value is 30 and maximum value is 732 for monthly backups. - # Minimum value is 365 and maximum value is 36159 for yearly backups. + # Minimum value is 1 and maximum value is 36159 for custom retention + # on-demand backup. + # Minimum and maximum values are workload specific for all other rules. # @!attribute [rw] standard_schedule # @return [::Google::Cloud::BackupDR::V1::StandardSchedule] - # Required. Defines a schedule that runs within the confines of a defined + # Optional. Defines a schedule that runs within the confines of a defined # window of time. class BackupRule include ::Google::Protobuf::MessageExts @@ -149,7 +172,7 @@ class BackupRule # otherwise. A validation error will occur if a value is supplied and # `recurrence_type` is not `HOURLY`. # - # Value of hourly frequency should be between 6 and 23. + # Value of hourly frequency should be between 4 and 23. # # Reason for limit : We found that there is bandwidth limitation of 3GB/S for # GMI while taking a backup and 5GB/S while doing a restore. Given the amount @@ -414,6 +437,151 @@ class DeleteBackupPlanRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Request message for updating a backup plan. + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # Required. The resource being updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in + # time. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # @!attribute [r] revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision::State] + # Output only. Resource State + # @!attribute [rw] backup_plan_snapshot + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # The Backup Plan being encompassed by this revision. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp that the revision was created. + class BackupPlanRevision + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the `BackupPlanRevision`. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + end + end + + # The request message for getting a `BackupPlanRevision`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + class GetBackupPlanRevisionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a list of `BackupPlanRevision`. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + class ListBackupPlanRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for getting a list of `BackupPlanRevision`. + # @!attribute [rw] backup_plan_revisions + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # The list of `BackupPlanRevisions` in the project for the specified + # location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of resources from all locations. In case any location is unreachable, + # the response will only return backup plans in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest#page_token page_token} + # in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlanRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb index 0bf1f57b5db0..ae4377724369 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb @@ -34,8 +34,13 @@ module V1 # applied # @!attribute [rw] resource # @return [::String] - # Required. Immutable. Resource name of workload on which backupplan is - # applied + # Required. Immutable. Resource name of workload on which the backup plan is + # applied. + # + # The format can either be the resource name (e.g., + # "projects/my-project/zones/us-central1-a/instances/my-instance") or the + # full resource URI (e.g., + # "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). # @!attribute [rw] backup_plan # @return [::String] # Required. Resource name of backup plan which needs to be applied on @@ -58,6 +63,20 @@ module V1 # Output only. Resource name of data source which will be used as storage # location for backups taken. Format : # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault}/dataSources/\\{datasource} + # @!attribute [r] cloud_sql_instance_backup_plan_association_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupPlanAssociationProperties] + # Output only. Cloud SQL instance's backup plan association properties. + # @!attribute [r] backup_plan_revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] backup_plan_revision_name + # @return [::String] + # Output only. The resource id of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` class BackupPlanAssociation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -78,6 +97,9 @@ module State # The resource has been created but is not usable. INACTIVE = 4 + + # The resource is being updated. + UPDATING = 5 end end @@ -198,6 +220,66 @@ class ListBackupPlanAssociationsResponse extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request for the FetchBackupPlanAssociationsForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + class FetchBackupPlanAssociationsForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchBackupPlanAssociationsForResourceType method. + # @!attribute [r] backup_plan_associations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # Output only. The BackupPlanAssociations from the specified parent. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. 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 FetchBackupPlanAssociationsForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request message for getting a BackupPlanAssociation resource. # @!attribute [rw] name # @return [::String] @@ -233,6 +315,39 @@ class DeleteBackupPlanAssociationRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for updating a backup plan association. + # @!attribute [rw] backup_plan_association + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # Required. The resource being updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request message for triggering a backup. # @!attribute [rw] name # @return [::String] diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb index 076fe7a71531..90a9fe4e979f 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb @@ -124,6 +124,9 @@ module State # The backup vault is experiencing an issue and might be unusable. ERROR = 4 + + # The backup vault is being updated. + UPDATING = 5 end # Holds the access restriction for the backup vault. @@ -200,6 +203,10 @@ module AccessRestriction # The backed up resource is a backup appliance application. # # Note: The following fields are mutually exclusive: `data_source_backup_appliance_application`, `data_source_gcp_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_blocked_by_vault_access_restriction + # @return [::Boolean] + # Output only. This field is set to true if the backup is blocked by vault + # access restriction. class DataSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -294,6 +301,13 @@ module LastBackupState # @!attribute [rw] backup_plan_rules # @return [::Array<::String>] # The names of the backup plan rules which point to this backupvault + # @!attribute [rw] backup_plan_revision_name + # @return [::String] + # The name of the backup plan revision. + # @!attribute [rw] backup_plan_revision_id + # @return [::String] + # The user friendly id of the backup plan revision. + # E.g. v0, v1 etc. class GcpBackupConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -345,6 +359,20 @@ class BackupApplianceBackupConfig # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceDataSourceProperties] # ComputeInstanceDataSourceProperties has a subset of Compute Instance # properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cloud_sql_instance_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceProperties] + # Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud + # SQL Instance properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_datasource_properties`, `compute_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::DiskDataSourceProperties] + # DiskDataSourceProperties has a subset of Disk properties that are useful + # at the Datasource level. + # + # Note: The following fields are mutually exclusive: `disk_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. class DataSourceGcpResource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -494,12 +522,22 @@ class BackupLock # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties] # Output only. Compute Engine specific backup properties. # - # Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `backup_appliance_backup_properties`. 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: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cloud_sql_instance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties] + # Output only. Cloud SQL specific backup properties. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] backup_appliance_backup_properties # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties] # Output only. Backup Appliance specific backup properties. # - # Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`. 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: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] disk_backup_properties + # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties] + # Output only. Disk specific backup properties. + # + # Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] backup_type # @return [::Google::Cloud::BackupDR::V1::Backup::BackupType] # Output only. Type of the backup, unspecified, scheduled or ondemand. @@ -509,6 +547,12 @@ class BackupLock # @!attribute [r] resource_size_bytes # @return [::Integer] # Output only. source resource size in bytes at the time of the backup. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Optional. Output only. Reserved for future use. class Backup include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -525,6 +569,16 @@ class Backup # @return [::String] # The rule id of the backup plan which triggered this backup in case of # scheduled backup or used for + # @!attribute [rw] backup_plan_revision_name + # @return [::String] + # Resource name of the backup plan revision which triggered this backup in + # case of scheduled backup or used for on demand backup. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId}/revisions/\\{revisionId} + # @!attribute [rw] backup_plan_revision_id + # @return [::String] + # The user friendly id of the backup plan revision which triggered this + # backup in case of scheduled backup or used for on demand backup. class GCPBackupPlanInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -555,6 +609,9 @@ module State # The backup is experiencing an issue and might be unusable. ERROR = 4 + + # The backup is being uploaded. + UPLOADING = 5 end # Type of the backup, scheduled or ondemand. @@ -567,6 +624,9 @@ module BackupType # On demand backup. ON_DEMAND = 2 + + # Operational backup. + ON_DEMAND_OPERATIONAL = 3 end end @@ -756,6 +816,10 @@ class GetBackupVaultRequest # @return [::Boolean] # Optional. If set to true, will not check plan duration against backup vault # enforcement duration. + # @!attribute [rw] force_update_access_restriction + # @return [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. class UpdateBackupVaultRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1044,9 +1108,28 @@ class DeleteBackupRequest # @!attribute [rw] compute_instance_target_environment # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment] # Compute Engine target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_target_environment + # @return [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment] + # Disk target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] region_disk_target_environment + # @return [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment] + # Region disk target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] compute_instance_restore_properties # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties] # Compute Engine instance properties to be overridden during restore. + # + # Note: The following fields are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_restore_properties + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties] + # Disk properties to be overridden during restore. + # + # Note: The following fields are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. class RestoreBackupRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb new file mode 100644 index 000000000000..e23baff8a9bf --- /dev/null +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb @@ -0,0 +1,125 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 BackupDR + module V1 + # CloudSqlInstanceDataSourceProperties represents the properties of a + # Cloud SQL resource that are stored in the DataSource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the Cloud SQL instance backed up by the datasource. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceBackupProperties represents Cloud SQL Instance + # Backup properties. + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance + # when the backup was taken. + # @!attribute [r] final_backup + # @return [::Boolean] + # Output only. Whether the backup is a final backup. + # @!attribute [r] source_instance + # @return [::String] + # Output only. The source instance of the backup. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceDataSourceReferenceProperties represents the properties of a + # Cloud SQL resource that are stored in the DataSourceReference. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the Cloud SQL instance backed up by the datasource. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceDataSourceReferenceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceInitializationConfig contains the configuration for + # initializing a Cloud SQL instance. + # @!attribute [rw] edition + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig::Edition] + # Required. The edition of the Cloud SQL instance. + class CloudSqlInstanceInitializationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The edition of the Cloud SQL instance. For details, see + # https://cloud.google.com/sql/docs/editions-intro. + module Edition + # Unspecified edition. + EDITION_UNSPECIFIED = 0 + + # Enterprise edition. + ENTERPRISE = 1 + + # Enterprise Plus edition. + ENTERPRISE_PLUS = 2 + end + end + + # Cloud SQL instance's BPA properties. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + class CloudSqlInstanceBackupPlanAssociationProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb new file mode 100644 index 000000000000..7a9cf2728530 --- /dev/null +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb @@ -0,0 +1,241 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 BackupDR + module V1 + # DiskTargetEnvironment represents the target environment for the disk. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the disk. + # @!attribute [rw] zone + # @return [::String] + # Required. Target zone for the disk. + class DiskTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RegionDiskTargetEnvironment represents the target environment for the disk. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the disk. + # @!attribute [rw] region + # @return [::String] + # Required. Target region for the disk. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Required. Target URLs of the replica zones for the disk. + class RegionDiskTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DiskRestoreProperties represents the properties of a Disk restore. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the disk. + # @!attribute [rw] description + # @return [::String] + # Optional. An optional description of this resource. Provide this property + # when you create the resource. + # @!attribute [rw] size_gb + # @return [::Integer] + # Required. The size of the disk in GB. + # @!attribute [rw] licenses + # @return [::Array<::String>] + # Optional. A list of publicly available licenses that are applicable to this + # backup. This is applicable if the original image had licenses attached, + # e.g. Windows image + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # Optional. A list of features to enable in the guest operating system. This + # is applicable only for bootable images. + # @!attribute [rw] disk_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts the disk using a + # customer-supplied encryption key or a customer-managed encryption key. + # @!attribute [rw] physical_block_size_bytes + # @return [::Integer] + # Optional. Physical block size of the persistent disk, in bytes. + # If not present in a request, a default value is used. + # Currently, the supported size is 4096. + # @!attribute [rw] provisioned_iops + # @return [::Integer] + # Optional. Indicates how many IOPS to provision for the disk. This sets the + # number of I/O operations per second that the disk can handle. + # @!attribute [rw] provisioned_throughput + # @return [::Integer] + # Optional. Indicates how much throughput to provision for the disk. This + # sets the number of throughput MB per second that the disk can handle. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Indicates whether this disk is using confidential compute mode. + # Encryption with a Cloud KMS key is required to enable this option. + # @!attribute [rw] storage_pool + # @return [::String] + # Optional. The storage pool in which the new disk is created. You can + # provide this as a partial or full URL to the resource. + # @!attribute [rw] access_mode + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::AccessMode] + # Optional. The access mode of the disk. + # @!attribute [rw] architecture + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::Architecture] + # Optional. The architecture of the source disk. Valid values are + # ARM64 or X86_64. + # @!attribute [rw] resource_policy + # @return [::Array<::String>] + # Optional. Resource policies applied to this disk. + # @!attribute [rw] type + # @return [::String] + # Required. URL of the disk type resource describing which disk type to use + # to create the disk. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to apply to this disk. These can be modified later using + # setLabels method. Label values can be empty. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to the disk. + class DiskRestoreProperties + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The supported access modes of the disk. + module AccessMode + # The default AccessMode, means the disk can be attached to single instance + # in RW mode. + READ_WRITE_SINGLE = 0 + + # The AccessMode means the disk can be attached to multiple instances in RW + # mode. + READ_WRITE_MANY = 1 + + # The AccessMode means the disk can be attached to multiple instances in RO + # mode. + READ_ONLY_MANY = 2 + end + + # Architecture of the source disk. + module Architecture + # Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0 + + # Disks with architecture X86_64 + X86_64 = 1 + + # Disks with architecture ARM64 + ARM64 = 2 + end + end + + # DiskBackupProperties represents the properties of a Disk backup. + # @!attribute [rw] description + # @return [::String] + # A description of the source disk. + # @!attribute [rw] licenses + # @return [::Array<::String>] + # A list of publicly available licenses that are applicable to this backup. + # This is applicable if the original image had licenses attached, e.g. + # Windows image. + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # A list of guest OS features that are applicable to this backup. + # @!attribute [rw] architecture + # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties::Architecture] + # The architecture of the source disk. Valid values are + # ARM64 or X86_64. + # @!attribute [rw] type + # @return [::String] + # The URL of the type of the disk. + # @!attribute [rw] size_gb + # @return [::Integer] + # Size(in GB) of the source disk. + # @!attribute [rw] region + # @return [::String] + # Region and zone are mutually exclusive fields. + # The URL of the region of the source disk. + # @!attribute [rw] zone + # @return [::String] + # The URL of the Zone where the source disk. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # The URL of the Zones where the source disk should be replicated. + # @!attribute [rw] source_disk + # @return [::String] + # The source disk used to create this backup. + class DiskBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Architecture of the source disk. + module Architecture + # Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0 + + # Disks with architecture X86_64 + X86_64 = 1 + + # Disks with architecture ARM64 + ARM64 = 2 + end + end + + # DiskDataSourceProperties represents the properties of a + # Disk resource that are stored in the DataSource. + # . + # @!attribute [rw] name + # @return [::String] + # Name of the disk backed up by the datasource. + # @!attribute [rw] description + # @return [::String] + # The description of the disk. + # @!attribute [rw] type + # @return [::String] + # The type of the disk. + # @!attribute [rw] size_gb + # @return [::Integer] + # The size of the disk in GB. + class DiskDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb index c3fbb5220923..32fa7a4ac467 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb @@ -133,7 +133,8 @@ class LabelsEntry # @!attribute [rw] disks # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] # Optional. Array of disks associated with this instance. Persistent disks - # must be created before you can assign them. + # must be created before you can assign them. Source regional persistent + # disks will be restored with default replica zones if not specified. # @!attribute [rw] display_device # @return [::Google::Cloud::BackupDR::V1::DisplayDevice] # Optional. Enables display device for the instance. @@ -173,7 +174,7 @@ class LabelsEntry # Optional. An array of network configurations for this instance. These # specify how interfaces are configured to interact with other network # services, such as connecting to the internet. Multiple interfaces are - # supported per instance. + # supported per instance. Required to restore in different project or region. # @!attribute [rw] network_performance_config # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig] # Optional. Configure network performance such as egress bandwidth tier. @@ -191,6 +192,7 @@ class LabelsEntry # @!attribute [rw] resource_policies # @return [::Array<::String>] # Optional. Resource policies applied to this instance. + # By default, no resource policies will be applied. # @!attribute [rw] scheduling # @return [::Google::Cloud::BackupDR::V1::Scheduling] # Optional. Sets the scheduling options for this instance. @@ -522,9 +524,9 @@ module Tier # @!attribute [rw] type # @return [::Google::Cloud::BackupDR::V1::AccessConfig::AccessType] # Optional. In accessConfigs (IPv4), the - # default and only option is ONE_TO_ONE_NAT. In - # ipv6AccessConfigs, the default and only option is - # DIRECT_IPV6. + # default and only option is ONE_TO_ONE_NAT. In + # ipv6AccessConfigs, the default and only option is + # DIRECT_IPV6. # @!attribute [rw] name # @return [::String] # Optional. The name of this access configuration. diff --git a/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb new file mode 100644 index 000000000000..0908d62f641b --- /dev/null +++ b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb @@ -0,0 +1,165 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 BackupDR + module V1 + # DataSourceReference is a reference to a DataSource resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the DataSourceReference. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # @!attribute [r] data_source + # @return [::String] + # Output only. The resource name of the DataSource. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{dataSource} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataSourceReference was created. + # @!attribute [r] data_source_backup_config_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] + # Output only. The backup configuration state of the DataSource. + # @!attribute [r] data_source_backup_count + # @return [::Integer] + # Output only. Number of backups in the DataSource. + # @!attribute [r] data_source_backup_config_info + # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupConfigInfo] + # Output only. Information of backup configuration on the DataSource. + # @!attribute [r] data_source_gcp_resource_info + # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResourceInfo] + # Output only. The GCP resource that the DataSource is associated with. + class DataSourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information of backup configuration on the DataSource. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] + # Output only. The status of the last backup in this DataSource + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the last successful backup to this DataSource. + class DataSourceBackupConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The GCP resource that the DataSource is associated with. + # @!attribute [r] gcp_resourcename + # @return [::String] + # Output only. The resource name of the GCP resource. + # Ex: projects/\\{project}/zones/\\{zone}/instances/\\{instance} + # @!attribute [r] type + # @return [::String] + # Output only. The type of the GCP resource. + # Ex: compute.googleapis.com/Instance + # @!attribute [r] location + # @return [::String] + # Output only. The location of the GCP resource. + # Ex: //"global"/"unspecified" + # @!attribute [r] cloud_sql_instance_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceReferenceProperties] + # Output only. The properties of the Cloud SQL instance. + class DataSourceGcpResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the GetDataSourceReference method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + class GetDataSourceReferenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchDataSourceReferencesForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + class FetchDataSourceReferencesForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchDataSourceReferencesForResourceType method. + # @!attribute [rw] data_source_references + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # The DataSourceReferences from the specified parent. + # @!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 FetchDataSourceReferencesForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb b/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb new file mode 100644 index 000000000000..047f63eeec6a --- /dev/null +++ b/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR 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::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type. +# +def fetch_backup_plan_associations_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + + # Call the fetch_backup_plan_associations_for_resource_type method. + result = client.fetch_backup_plan_associations_for_resource_type 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::BackupDR::V1::BackupPlanAssociation. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] diff --git a/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb b/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb new file mode 100644 index 000000000000..6202b0f0c269 --- /dev/null +++ b/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR 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::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type. +# +def fetch_data_source_references_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + + # Call the fetch_data_source_references_for_resource_type method. + result = client.fetch_data_source_references_for_resource_type 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::BackupDR::V1::DataSourceReference. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] diff --git a/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb new file mode 100644 index 000000000000..2226a8657426 --- /dev/null +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan_revision call in the BackupDR 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::BackupDR::V1::BackupDR::Client#get_backup_plan_revision. +# +def get_backup_plan_revision + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + + # Call the get_backup_plan_revision method. + result = client.get_backup_plan_revision request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] diff --git a/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb b/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb new file mode 100644 index 000000000000..73cd013d67e1 --- /dev/null +++ b/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_data_source_reference call in the BackupDR 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::BackupDR::V1::BackupDR::Client#get_data_source_reference. +# +def get_data_source_reference + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + + # Call the get_data_source_reference method. + result = client.get_data_source_reference request + + # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + p result +end +# [END backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] diff --git a/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb new file mode 100644 index 000000000000..abdbe815c078 --- /dev/null +++ b/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plan_revisions call in the BackupDR 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::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions. +# +def list_backup_plan_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + + # Call the list_backup_plan_revisions method. + result = client.list_backup_plan_revisions 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::BackupDR::V1::BackupPlanRevision. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] diff --git a/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb new file mode 100644 index 000000000000..ba37a70f2a27 --- /dev/null +++ b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_plan call in the BackupDR 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::BackupDR::V1::BackupDR::Client#update_backup_plan. +# +def update_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + + # Call the update_backup_plan method. + result = client.update_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] diff --git a/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb new file mode 100644 index 000000000000..3c7e44b4b31d --- /dev/null +++ b/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_plan_association call in the BackupDR 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::BackupDR::V1::BackupDR::Client#update_backup_plan_association. +# +def update_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + + # Call the update_backup_plan_association method. + result = client.update_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] diff --git a/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json index d4f57b798ead..1972a91df4a7 100644 --- a/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json +++ b/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json @@ -771,6 +771,46 @@ } ] }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync", + "title": "Snippet for the update_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan.", + "file": "backupdr/update_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlan_sync", "title": "Snippet for the get_backup_plan call in the BackupDR service", @@ -891,6 +931,86 @@ } ] }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync", + "title": "Snippet for the get_backup_plan_revision call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision.", + "file": "backupdr/get_backup_plan_revision.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan_revision", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanRevision", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlanRevision", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanRevision", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync", + "title": "Snippet for the list_backup_plan_revisions call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions.", + "file": "backupdr/list_backup_plan_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plan_revisions", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlanRevisions", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanRevisions", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync", "title": "Snippet for the create_backup_plan_association call in the BackupDR service", @@ -931,6 +1051,46 @@ } ] }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync", + "title": "Snippet for the update_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association.", + "file": "backupdr/update_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync", "title": "Snippet for the get_backup_plan_association call in the BackupDR service", @@ -1011,6 +1171,46 @@ } ] }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync", + "title": "Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type.", + "file": "backupdr/fetch_backup_plan_associations_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_backup_plan_associations_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchBackupPlanAssociationsForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupPlanAssociationsForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync", "title": "Snippet for the delete_backup_plan_association call in the BackupDR service", @@ -1091,6 +1291,86 @@ } ] }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetDataSourceReference_sync", + "title": "Snippet for the get_data_source_reference call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference.", + "file": "backupdr/get_data_source_reference.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source_reference", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::DataSourceReference", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetDataSourceReference", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSourceReference", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync", + "title": "Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type.", + "file": "backupdr/fetch_data_source_references_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_data_source_references_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchDataSourceReferencesForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchDataSourceReferencesForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "backupdr_v1_generated_BackupDR_InitializeService_sync", "title": "Snippet for the initialize_service call in the BackupDR service", diff --git a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb index cad96554799c..3c04731c931b 100644 --- a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb +++ b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb @@ -77,6 +77,18 @@ def test_backup_plan_association_path end end + def test_backup_plan_revision_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_revision_path project: "value0", location: "value1", backup_plan: "value2", revision: "value3" + assert_equal "projects/value0/locations/value1/backupPlans/value2/revisions/value3", path + end + end + def test_backup_vault_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -101,6 +113,30 @@ def test_data_source_path end end + def test_data_source_reference_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_reference_path project: "value0", location: "value1", data_source_reference: "value2" + assert_equal "projects/value0/locations/value1/dataSourceReferences/value2", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", instance: "value1" + assert_equal "projects/value0/instances/value1", path + 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 @@ -124,4 +160,16 @@ def test_management_server_path assert_equal "projects/value0/locations/value1/managementServers/value2", path end end + + def test_storage_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.storage_pool_path project: "value0", zone: "value1", storage_pool: "value2" + assert_equal "projects/value0/zones/value1/storagePools/value2", path + end + end end diff --git a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb index f91452939667..19f34e3add3b 100644 --- a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb +++ b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb @@ -545,6 +545,7 @@ def test_update_backup_vault request_id = "hello world" validate_only = true force = true + force_update_access_restriction = true update_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -560,27 +561,27 @@ def test_update_backup_vault end # Use hash object - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force }) do |_result, response| + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force do |_result, response| + client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force) do |_result, response| + client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force }, call_options) do |_result, response| + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force), call_options) do |_result, response| + client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -1158,6 +1159,62 @@ def test_create_backup_plan end end + def test_update_backup_plan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_plan = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_plan_client_stub.call_count + end + end + end + def test_get_backup_plan # Create test objects. client_result = ::Google::Cloud::BackupDR::V1::BackupPlan.new @@ -1325,6 +1382,116 @@ def test_delete_backup_plan end end + def test_get_backup_plan_revision + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_revision_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_revision_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_revision_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan_revision({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan_revision name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan_revision({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_revision_client_stub.call_count + end + end + end + + def test_list_backup_plan_revisions + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_plan_revisions_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plan_revisions_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, 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_backup_plan_revisions({ parent: parent, 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_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, 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_backup_plan_revisions_client_stub.call_count + end + end + end + def test_create_backup_plan_association # Create test objects. client_result = ::Google::Longrunning::Operation.new @@ -1382,6 +1549,62 @@ def test_create_backup_plan_association end end + def test_update_backup_plan_association + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_plan_association = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_association_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_plan_association_client_stub.call_count + end + end + end + def test_get_backup_plan_association # Create test objects. client_result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new @@ -1493,6 +1716,65 @@ def test_list_backup_plan_associations end end + def test_fetch_backup_plan_associations_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_backup_plan_associations_for_resource_type_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backup_plan_associations_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_count + end + end + end + def test_delete_backup_plan_association # Create test objects. client_result = ::Google::Longrunning::Operation.new @@ -1604,6 +1886,119 @@ def test_trigger_backup end end + def test_get_data_source_reference + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::DataSourceReference.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_reference_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_reference_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_reference_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source_reference({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source_reference name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source_reference({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_reference_client_stub.call_count + end + end + end + + def test_fetch_data_source_references_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_data_source_references_for_resource_type_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::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_data_source_references_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_count + end + end + end + def test_initialize_service # Create test objects. client_result = ::Google::Longrunning::Operation.new @@ -1615,6 +2010,7 @@ def test_initialize_service name = "hello world" resource_type = "hello world" request_id = "hello world" + cloud_sql_instance_initialization_config = {} initialize_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1630,27 +2026,27 @@ def test_initialize_service end # Use hash object - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id }) do |_result, response| + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.initialize_service name: name, resource_type: resource_type, request_id: request_id do |_result, response| + client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id) do |_result, response| + client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id }, call_options) do |_result, response| + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id), call_options) do |_result, response| + client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb index e7596ea6e160..744cd86f92cd 100644 --- a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb +++ b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb @@ -617,6 +617,7 @@ def test_update_backup_vault request_id = "hello world" validate_only = true force = true + force_update_access_restriction = true update_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :update_backup_vault, name @@ -626,6 +627,7 @@ def test_update_backup_vault assert_equal "hello world", request["request_id"] assert_equal true, request["validate_only"] assert_equal true, request["force"] + assert_equal true, request["force_update_access_restriction"] refute_nil options end @@ -636,35 +638,35 @@ def test_update_backup_vault end # Use hash object - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force }) do |response, operation| + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force do |response, operation| + client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force) do |response, operation| + client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force }, grpc_options) do |response, operation| + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force), grpc_options) do |response, operation| + client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation @@ -1353,6 +1355,73 @@ def test_create_backup_plan end end + def test_update_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + backup_plan = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_plan_client_stub.call_rpc_count + end + end + def test_get_backup_plan # Create GRPC objects. grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlan.new @@ -1547,6 +1616,131 @@ def test_delete_backup_plan end end + def test_get_backup_plan_revision + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.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" + + get_backup_plan_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan_revision, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_revision_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan_revision({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan_revision name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan_revision({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.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, get_backup_plan_revision_client_stub.call_rpc_count + end + end + + def test_list_backup_plan_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.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" + page_size = 42 + page_token = "hello world" + + list_backup_plan_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plan_revisions, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_plan_revisions_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plan_revisions({ parent: parent, 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_backup_plan_revisions parent: parent, 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_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, 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_backup_plan_revisions({ parent: parent, 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_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, 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_backup_plan_revisions_client_stub.call_rpc_count + end + end + def test_create_backup_plan_association # Create GRPC objects. grpc_response = ::Google::Longrunning::Operation.new @@ -1616,6 +1810,73 @@ def test_create_backup_plan_association end end + def test_update_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + backup_plan_association = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_plan_association_client_stub.call_rpc_count + end + end + def test_get_backup_plan_association # Create GRPC objects. grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new @@ -1743,6 +2004,79 @@ def test_list_backup_plan_associations end end + def test_fetch_backup_plan_associations_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.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" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_backup_plan_associations_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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, fetch_backup_plan_associations_for_resource_type_client_stub.call_rpc_count + end + end + def test_delete_backup_plan_association # Create GRPC objects. grpc_response = ::Google::Longrunning::Operation.new @@ -1875,6 +2209,137 @@ def test_trigger_backup end end + def test_get_data_source_reference + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::DataSourceReference.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" + + get_data_source_reference_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source_reference, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_reference_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source_reference({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source_reference name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source_reference({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.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, get_data_source_reference_client_stub.call_rpc_count + end + end + + def test_fetch_data_source_references_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.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" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_data_source_references_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_data_source_references_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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, fetch_data_source_references_for_resource_type_client_stub.call_rpc_count + end + end + def test_initialize_service # Create GRPC objects. grpc_response = ::Google::Longrunning::Operation.new @@ -1886,6 +2351,7 @@ def test_initialize_service name = "hello world" resource_type = "hello world" request_id = "hello world" + cloud_sql_instance_initialization_config = {} initialize_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :initialize_service, name @@ -1893,6 +2359,8 @@ def test_initialize_service assert_equal "hello world", request["name"] assert_equal "hello world", request["resource_type"] assert_equal "hello world", request["request_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig), request["cloud_sql_instance_initialization_config"] + assert_equal :cloud_sql_instance_initialization_config, request.initialization_config refute_nil options end @@ -1903,35 +2371,35 @@ def test_initialize_service end # Use hash object - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id }) do |response, operation| + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.initialize_service name: name, resource_type: resource_type, request_id: request_id do |response, operation| + client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id) do |response, operation| + client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id }, grpc_options) do |response, operation| + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id), grpc_options) do |response, operation| + client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation From 20c15d9660b9302a642759ac74cb5e9f0538ed01 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:36:51 -0700 Subject: [PATCH 313/457] feat: A new enum `TransparentHugepageEnabled` is added (#30714) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: A new enum `TransparentHugepageDefrag` is added feat: A new field `transparent_hugepage_enabled` is added to message `.google.container.v1beta1.LinuxNodeConfig` feat: A new field `transparent_hugepage_defrag` is added to message `.google.container.v1beta1.LinuxNodeConfig` feat: A new field `eviction_soft` is added to message `.google.container.v1beta1.NodeKubeletConfig` feat: A new field `eviction_soft_grace_period` is added to message `.google.container.v1beta1.NodeKubeletConfig` feat: A new field `eviction_minimum_reclaim` is added to message `.google.container.v1beta1.NodeKubeletConfig` feat: A new field `eviction_max_pod_grace_period_seconds` is added to message `.google.container.v1beta1.NodeKubeletConfig` feat: A new field `max_parallel_image_pulls` is added to message `.google.container.v1beta1.NodeKubeletConfig` feat: A new field `single_process_oom_kill` is added to message `.google.container.v1beta1.NodeKubeletConfig` feat: A new message `EvictionSignals` is added feat: A new message `EvictionGracePeriod` is added feat: A new message `EvictionMinimumReclaim` is added feat: A new field `boot_disk` is added to message `.google.container.v1beta1.NodeConfig` feat: A new field `subnetwork` is added to message `.google.container.v1beta1.NodeNetworkConfig` feat: A new field `min_node_cpus` is added to message `.google.container.v1beta1.SoleTenantConfig` feat: A new field `lustre_csi_driver_config` is added to message `.google.container.v1beta1.AddonsConfig` feat: A new message `LustreCsiDriverConfig` is added feat: A new field `additional_ip_ranges_configs` is added to message `.google.container.v1beta1.IPAllocationPolicy` feat: A new field `auto_ipam_config` is added to message `.google.container.v1beta1.IPAllocationPolicy` feat: A new field `gke_auto_upgrade_config` is added to message `.google.container.v1beta1.Cluster` feat: A new enum `Mode` is added feat: A new field `mode` is added to message `.google.container.v1beta1.AnonymousAuthenticationConfig` feat: A new field `desired_additional_ip_ranges_config` is added to message `.google.container.v1beta1.ClusterUpdate` feat: A new field `desired_auto_ipam_config` is added to message `.google.container.v1beta1.ClusterUpdate` feat: A new field `desired_user_managed_keys_config` is added to message `.google.container.v1beta1.ClusterUpdate` feat: A new field `gke_auto_upgrade_config` is added to message `.google.container.v1beta1.ClusterUpdate` feat: A new message `AdditionalIPRangesConfig` is added feat: A new message `DesiredAdditionalIPRangesConfig` is added feat: A new message `AutoIpamConfig` is added feat: A new field `boot_disk` is added to message `.google.container.v1beta1.UpdateNodePoolRequest` feat: A new field `default_compute_class_config` is added to message `.google.container.v1beta1.ClusterAutoscaling` feat: A new message `DefaultComputeClassConfig` is added feat: A new value `CLOUD_KMS_KEY_DESTROYED` is added to enum `Code` feat: A new message `BootDisk` is added feat: A new message `GkeAutoUpgradeConfig` is added docs: updated comments for various types, messages, and fields. PiperOrigin-RevId: 785934891 Source-Link: https://github.com/googleapis/googleapis/commit/97ac3d391f00a6d57728b2b6d444eae00b9a3514 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7c8ad6fdba49cbd796d40d55bcf56a3b9ecc5260 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiI3YzhhZDZmZGJhNDljYmQ3OTZkNDBkNTViY2Y1NmEzYjllY2M1MjYwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1beta1/cluster_manager/client.rb | 209 +++--- .../container/v1beta1/cluster_service_pb.rb | 16 +- .../container/v1beta1/cluster_service.rb | 698 ++++++++++++++---- .../container/v1beta1/cluster_manager_test.rb | 12 +- 4 files changed, 697 insertions(+), 238 deletions(-) diff --git a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb index 5210107efc89..35ba47690fa7 100644 --- a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb +++ b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb @@ -305,9 +305,9 @@ def logger # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides, or "-" for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides, or "-" for all zones. This field has been + # deprecated and replaced by the parent field. # @param parent [::String] # The parent (project and location) where the clusters will be listed. # Specified in the format `projects/*/locations/*`. @@ -401,9 +401,9 @@ def list_clusters request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to retrieve. # This field has been deprecated and replaced by the name field. @@ -512,9 +512,9 @@ def get_cluster request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster [::Google::Cloud::Container::V1beta1::Cluster, ::Hash] # Required. A [cluster # resource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters) @@ -610,9 +610,9 @@ def create_cluster request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -699,7 +699,7 @@ def update_cluster request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil) + # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil, boot_disk: nil) # Pass arguments to `update_node_pool` 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). @@ -710,9 +710,9 @@ def update_cluster request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -733,14 +733,14 @@ def update_cluster request, options = nil # - "-": picks the Kubernetes master version # @param image_type [::String] # Required. The desired image type for the node pool. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @param locations [::Array<::String>] # The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # node pool's nodes should be located. Changing the locations for a node pool - # will result in nodes being either created or removed from the node pool, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the node pool's nodes should be located. Changing the locations + # for a node pool will result in nodes being either created or removed from + # the node pool, depending on whether locations are being added or removed. # @param workload_metadata_config [::Google::Cloud::Container::V1beta1::WorkloadMetadataConfig, ::Hash] # The desired workload metadata config for the node pool. # @param name [::String] @@ -789,8 +789,9 @@ def update_cluster request, options = nil # Parameters that can be configured on Windows nodes. # @param accelerators [::Array<::Google::Cloud::Container::V1beta1::AcceleratorConfig, ::Hash>] # A list of hardware accelerators to be attached to each node. - # See https://cloud.google.com/compute/docs/gpus for more information about - # support for GPUs. + # See + # https://cloud.google.com/compute/docs/gpus + # for more information about support for GPUs. # @param machine_type [::String] # Optional. The desired machine type for nodes in the node pool. # Initiates an upgrade operation that migrates the nodes in the @@ -821,6 +822,10 @@ def update_cluster request, options = nil # If unspecified, the nodes can exist indefinitely. # @param flex_start [::Boolean] # Flex Start flag for enabling Flex Start VM. + # @param boot_disk [::Google::Cloud::Container::V1beta1::BootDisk, ::Hash] + # The desired boot disk config for nodes in the node pool. + # Initiates an upgrade operation that migrates the nodes in the + # node pool to the specified boot disk config. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Container::V1beta1::Operation] @@ -910,9 +915,9 @@ def update_node_pool request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1014,9 +1019,9 @@ def set_node_pool_autoscaling request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1124,9 +1129,9 @@ def set_logging_service request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1234,9 +1239,9 @@ def set_monitoring_service request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1340,18 +1345,18 @@ def set_addons_config request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. # @param locations [::Array<::String>] # Required. The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. Changing the locations a cluster is in - # will result in nodes being either created or removed from the cluster, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. Changing the locations a + # cluster is in will result in nodes being either created or removed from the + # cluster, depending on whether locations are being added or removed. # # This list must always include the cluster's primary zone. # @param name [::String] @@ -1446,9 +1451,9 @@ def set_locations request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1557,9 +1562,9 @@ def update_master request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to upgrade. # This field has been deprecated and replaced by the name field. @@ -1667,9 +1672,9 @@ def set_master_auth request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to delete. # This field has been deprecated and replaced by the name field. @@ -1765,9 +1770,9 @@ def delete_cluster request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for, or `-` for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for, or `-` for all zones. This field has been + # deprecated and replaced by the parent field. # @param parent [::String] # The parent (project and location) where the operations will be listed. # Specified in the format `projects/*/locations/*`. @@ -1861,9 +1866,9 @@ def list_operations request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param operation_id [::String] # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. @@ -1959,9 +1964,9 @@ def get_operation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # operation resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the operation resides. This field has been deprecated and replaced + # by the name field. # @param operation_id [::String] # Deprecated. The server-assigned `name` of the operation. # This field has been deprecated and replaced by the name field. @@ -2057,9 +2062,9 @@ def cancel_operation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for. This field has been deprecated and replaced by + # the name field. # @param name [::String] # The name (project and location) of the server config to get, # specified in the format `projects/*/locations/*`. @@ -2239,9 +2244,9 @@ def get_json_web_keys request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. @@ -2337,9 +2342,9 @@ def list_node_pools request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -2439,9 +2444,9 @@ def get_node_pool request, options = nil # This field has been deprecated and replaced by the parent field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the parent field. @@ -2540,9 +2545,9 @@ def create_node_pool request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -2731,9 +2736,9 @@ def complete_node_pool_upgrade request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to rollback. # This field has been deprecated and replaced by the name field. @@ -2836,9 +2841,9 @@ def rollback_node_pool_upgrade request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -2940,9 +2945,9 @@ def set_node_pool_management request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3047,9 +3052,9 @@ def set_labels request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -3147,9 +3152,9 @@ def set_legacy_abac request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3247,9 +3252,9 @@ def start_ip_rotation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3347,9 +3352,9 @@ def complete_ip_rotation request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster to update. # This field has been deprecated and replaced by the name field. @@ -3451,9 +3456,9 @@ def set_node_pool_size request, options = nil # This field has been deprecated and replaced by the name field. # @param zone [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @param cluster_id [::String] # Deprecated. The name of the cluster. # This field has been deprecated and replaced by the name field. @@ -3550,8 +3555,8 @@ def set_network_policy request, options = nil # number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). # @param zone [::String] # Required. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. # @param cluster_id [::String] # Required. The name of the cluster to update. # @param maintenance_policy [::Google::Cloud::Container::V1beta1::MaintenancePolicy, ::Hash] diff --git a/google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb b/google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb index 6b89d1994eaa..5d5b73c15c59 100644 --- a/google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb +++ b/google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb @@ -17,7 +17,7 @@ require 'google/type/date_pb' -descriptor_data = "\n.google/container/v1beta1/cluster_service.proto\x12\x18google.container.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x15google/rpc/code.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"\x8f\x04\n\x0fLinuxNodeConfig\x12G\n\x07sysctls\x18\x01 \x03(\x0b\x32\x36.google.container.v1beta1.LinuxNodeConfig.SysctlsEntry\x12I\n\x0b\x63group_mode\x18\x02 \x01(\x0e\x32\x34.google.container.v1beta1.LinuxNodeConfig.CgroupMode\x12V\n\thugepages\x18\x03 \x01(\x0b\x32\x39.google.container.v1beta1.LinuxNodeConfig.HugepagesConfigB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x7f\n\x0fHugepagesConfig\x12!\n\x0fhugepage_size2m\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0fhugepage_size1g\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x12\n\x10_hugepage_size2mB\x12\n\x10_hugepage_size1g\x1a.\n\x0cSysctlsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\nCgroupMode\x12\x1b\n\x17\x43GROUP_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43GROUP_MODE_V1\x10\x01\x12\x12\n\x0e\x43GROUP_MODE_V2\x10\x02\x42\x0c\n\n_hugepages\"\xb9\x01\n\x11WindowsNodeConfig\x12I\n\nos_version\x18\x01 \x01(\x0e\x32\x35.google.container.v1beta1.WindowsNodeConfig.OSVersion\"Y\n\tOSVersion\x12\x1a\n\x16OS_VERSION_UNSPECIFIED\x10\x00\x12\x17\n\x13OS_VERSION_LTSC2019\x10\x01\x12\x17\n\x13OS_VERSION_LTSC2022\x10\x02\"\x99\x05\n\x11NodeKubeletConfig\x12\x1a\n\x12\x63pu_manager_policy\x18\x01 \x01(\t\x12H\n\x10topology_manager\x18\x08 \x01(\x0b\x32).google.container.v1beta1.TopologyManagerB\x03\xe0\x41\x01\x12\x44\n\x0ememory_manager\x18\t \x01(\x0b\x32\'.google.container.v1beta1.MemoryManagerB\x03\xe0\x41\x01\x12\x31\n\rcpu_cfs_quota\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x1c\n\x14\x63pu_cfs_quota_period\x18\x03 \x01(\t\x12\x16\n\x0epod_pids_limit\x18\x04 \x01(\x03\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12+\n\x1eimage_gc_low_threshold_percent\x18\n \x01(\x05\x42\x03\xe0\x41\x01\x12,\n\x1fimage_gc_high_threshold_percent\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01\x12!\n\x14image_minimum_gc_age\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12!\n\x14image_maximum_gc_age\x18\r \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x63ontainer_log_max_size\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12$\n\x17\x63ontainer_log_max_files\x18\x0f \x01(\x05\x42\x03\xe0\x41\x01\x12#\n\x16\x61llowed_unsafe_sysctls\x18\x10 \x03(\tB\x03\xe0\x41\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"0\n\x0fTopologyManager\x12\x0e\n\x06policy\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"\x1f\n\rMemoryManager\x12\x0e\n\x06policy\x18\x01 \x01(\t\"\xd4\x18\n\nNodeConfig\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x05\x12\x14\n\x0coauth_scopes\x18\x03 \x03(\t\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x44\n\x08metadata\x18\x04 \x03(\x0b\x32\x32.google.container.v1beta1.NodeConfig.MetadataEntry\x12\x12\n\nimage_type\x18\x05 \x01(\t\x12@\n\x06labels\x18\x06 \x03(\x0b\x32\x30.google.container.v1beta1.NodeConfig.LabelsEntry\x12\x17\n\x0flocal_ssd_count\x18\x07 \x01(\x05\x12\x0c\n\x04tags\x18\x08 \x03(\t\x12\x13\n\x0bpreemptible\x18\n \x01(\x08\x12\x41\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32+.google.container.v1beta1.AcceleratorConfig\x12?\n\x0esandbox_config\x18\x11 \x01(\x0b\x32\'.google.container.v1beta1.SandboxConfig\x12\x12\n\nnode_group\x18\x12 \x01(\t\x12K\n\x14reservation_affinity\x18\x13 \x01(\x0b\x32-.google.container.v1beta1.ReservationAffinity\x12\x11\n\tdisk_type\x18\x0c \x01(\t\x12\x18\n\x10min_cpu_platform\x18\r \x01(\t\x12R\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadMetadataConfig\x12\x33\n\x06taints\x18\x0f \x03(\x0b\x32#.google.container.v1beta1.NodeTaint\x12\x19\n\x11\x62oot_disk_kms_key\x18\x17 \x01(\t\x12R\n\x18shielded_instance_config\x18\x14 \x01(\x0b\x32\x30.google.container.v1beta1.ShieldedInstanceConfig\x12\x44\n\x11linux_node_config\x18\x15 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12\x43\n\x0ekubelet_config\x18\x16 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12R\n\x18\x65phemeral_storage_config\x18\x18 \x01(\x0b\x32\x30.google.container.v1beta1.EphemeralStorageConfig\x12\x39\n\x0bgcfs_config\x18\x19 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12T\n\x19\x61\x64vanced_machine_features\x18\x1a \x01(\x0b\x32\x31.google.container.v1beta1.AdvancedMachineFeatures\x12\x33\n\x05gvnic\x18\x1d \x01(\x0b\x32$.google.container.v1beta1.VirtualNIC\x12\x0c\n\x04spot\x18 \x01(\x08\x12G\n\x12\x63onfidential_nodes\x18# \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12>\n\x0b\x66\x61st_socket\x18$ \x01(\x0b\x32$.google.container.v1beta1.FastSocketH\x00\x88\x01\x01\x12Q\n\x0fresource_labels\x18% \x03(\x0b\x32\x38.google.container.v1beta1.NodeConfig.ResourceLabelsEntry\x12G\n\x0elogging_config\x18& \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12H\n\x13windows_node_config\x18\' \x01(\x0b\x32+.google.container.v1beta1.WindowsNodeConfig\x12V\n\x1blocal_nvme_ssd_block_config\x18( \x01(\x0b\x32\x31.google.container.v1beta1.LocalNvmeSsdBlockConfig\x12\x64\n\"ephemeral_storage_local_ssd_config\x18) \x01(\x0b\x32\x38.google.container.v1beta1.EphemeralStorageLocalSsdConfig\x12\x46\n\x12sole_tenant_config\x18* \x01(\x0b\x32*.google.container.v1beta1.SoleTenantConfig\x12\x45\n\x11\x63ontainerd_config\x18+ \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12P\n\x17host_maintenance_policy\x18, \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12L\n\x15resource_manager_tags\x18- \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12(\n\x1b\x65nable_confidential_storage\x18. \x01(\x08\x42\x03\xe0\x41\x01\x12I\n\x14secondary_boot_disks\x18\x30 \x03(\x0b\x32+.google.container.v1beta1.SecondaryBootDisk\x12\x15\n\rstorage_pools\x18\x31 \x03(\t\x12k\n#secondary_boot_disk_update_strategy\x18\x32 \x01(\x0b\x32\x39.google.container.v1beta1.SecondaryBootDiskUpdateStrategyH\x01\x88\x01\x01\x12\x33\n\x10max_run_duration\x18\x35 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x63\n\x19local_ssd_encryption_mode\x18\x36 \x01(\x0e\x32;.google.container.v1beta1.NodeConfig.LocalSsdEncryptionModeH\x02\x88\x01\x01\x12\\\n\x15\x65\x66\x66\x65\x63tive_cgroup_mode\x18\x37 \x01(\x0e\x32\x38.google.container.v1beta1.NodeConfig.EffectiveCgroupModeB\x03\xe0\x41\x03\x12\x17\n\nflex_start\x18\x38 \x01(\x08H\x03\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x16LocalSsdEncryptionMode\x12)\n%LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_ENCRYPTION\x10\x01\x12\x1c\n\x18\x45PHEMERAL_KEY_ENCRYPTION\x10\x02\"x\n\x13\x45\x66\x66\x65\x63tiveCgroupMode\x12%\n!EFFECTIVE_CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V1\x10\x01\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V2\x10\x02\x42\x0e\n\x0c_fast_socketB&\n$_secondary_boot_disk_update_strategyB\x1c\n\x1a_local_ssd_encryption_modeB\r\n\x0b_flex_start\"\xa9\x03\n\x17\x41\x64vancedMachineFeatures\x12\x1d\n\x10threads_per_core\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12u\n\x1bperformance_monitoring_unit\x18\x03 \x01(\x0e\x32K.google.container.v1beta1.AdvancedMachineFeatures.PerformanceMonitoringUnitH\x02\x88\x01\x01\"w\n\x19PerformanceMonitoringUnit\x12+\n\'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\x00\x12\x11\n\rARCHITECTURAL\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08\x45NHANCED\x10\x03\x42\x13\n\x11_threads_per_coreB\x1f\n\x1d_enable_nested_virtualizationB\x1e\n\x1c_performance_monitoring_unit\"\xed\x07\n\x11NodeNetworkConfig\x12\x1d\n\x10\x63reate_pod_range\x18\x04 \x01(\x08\x42\x03\xe0\x41\x04\x12\x11\n\tpod_range\x18\x05 \x01(\t\x12\x1b\n\x13pod_ipv4_cidr_block\x18\x06 \x01(\t\x12!\n\x14\x65nable_private_nodes\x18\t \x01(\x08H\x00\x88\x01\x01\x12m\n\x1anetwork_performance_config\x18\x0b \x01(\x0b\x32\x44.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfigH\x01\x88\x01\x01\x12[\n\x1dpod_cidr_overprovision_config\x18\r \x01(\x0b\x32\x34.google.container.v1beta1.PodCIDROverprovisionConfig\x12^\n\x1f\x61\x64\x64itional_node_network_configs\x18\x0e \x03(\x0b\x32\x35.google.container.v1beta1.AdditionalNodeNetworkConfig\x12\\\n\x1e\x61\x64\x64itional_pod_network_configs\x18\x0f \x03(\x0b\x32\x34.google.container.v1beta1.AdditionalPodNetworkConfig\x12\'\n\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01\x42\x03\xe0\x41\x03\x1a\xfa\x02\n\x18NetworkPerformanceConfig\x12s\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32I.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00\x88\x01\x01\x12y\n!external_ip_egress_bandwidth_tier\x18\x02 \x01(\x0e\x32I.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x01\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB$\n\"_external_ip_egress_bandwidth_tierB\x17\n\x15_enable_private_nodesB\x1d\n\x1b_network_performance_config\"B\n\x1b\x41\x64\x64itionalNodeNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\"\xb0\x01\n\x1a\x41\x64\x64itionalPodNetworkConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1b\n\x13secondary_pod_range\x18\x02 \x01(\t\x12K\n\x11max_pods_per_node\x18\x03 \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraintH\x00\x88\x01\x01\x42\x14\n\x12_max_pods_per_node\"Y\n\x16ShieldedInstanceConfig\x12\x1a\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x12#\n\x1b\x65nable_integrity_monitoring\x18\x02 \x01(\x08\"\x8a\x01\n\rSandboxConfig\x12\x18\n\x0csandbox_type\x18\x01 \x01(\tB\x02\x18\x01\x12:\n\x04type\x18\x02 \x01(\x0e\x32,.google.container.v1beta1.SandboxConfig.Type\"#\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06GVISOR\x10\x01\"1\n\x16\x45phemeralStorageConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"2\n\x17LocalNvmeSsdBlockConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"S\n\x1e\x45phemeralStorageLocalSsdConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\x12\x18\n\x10\x64\x61ta_cache_count\x18\x02 \x01(\x05\"\x1d\n\nGcfsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe4\x01\n\x13ReservationAffinity\x12T\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32\x32.google.container.v1beta1.ReservationAffinity.Type\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"Z\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\"\xa0\x02\n\x10SoleTenantConfig\x12P\n\x0fnode_affinities\x18\x01 \x03(\x0b\x32\x37.google.container.v1beta1.SoleTenantConfig.NodeAffinity\x1a\xb9\x01\n\x0cNodeAffinity\x12\x0b\n\x03key\x18\x01 \x01(\t\x12R\n\x08operator\x18\x02 \x01(\x0e\x32@.google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator\x12\x0e\n\x06values\x18\x03 \x03(\t\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\"\x8b\x05\n\x10\x43ontainerdConfig\x12n\n\x1eprivate_registry_access_config\x18\x01 \x01(\x0b\x32\x46.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig\x1a\x86\x04\n\x1bPrivateRegistryAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x94\x01\n#certificate_authority_domain_config\x18\x02 \x03(\x0b\x32g.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig\x1a\xbe\x02\n CertificateAuthorityDomainConfig\x12\r\n\x05\x66qdns\x18\x01 \x03(\t\x12\xbb\x01\n%gcp_secret_manager_certificate_config\x18\x02 \x01(\x0b\x32\x89\x01.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00\x1a\x37\n!GCPSecretManagerCertificateConfig\x12\x12\n\nsecret_uri\x18\x01 \x01(\tB\x14\n\x12\x63\x65rtificate_config\"\xad\x05\n\x15HostMaintenancePolicy\x12\x66\n\x14maintenance_interval\x18\x01 \x01(\x0e\x32\x43.google.container.v1beta1.HostMaintenancePolicy.MaintenanceIntervalH\x01\x88\x01\x01\x12~\n\"opportunistic_maintenance_strategy\x18\x02 \x01(\x0b\x32P.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategyH\x00\x1a\xa0\x02\n OpportunisticMaintenanceStrategy\x12=\n\x15node_idle_time_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12G\n\x1fmaintenance_availability_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x12\x1f\n\x12min_nodes_per_pool\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x18\n\x16_node_idle_time_windowB\"\n _maintenance_availability_windowB\x15\n\x13_min_nodes_per_pool\"X\n\x13MaintenanceInterval\x12$\n MAINTENANCE_INTERVAL_UNSPECIFIED\x10\x00\x12\r\n\tAS_NEEDED\x10\x01\x12\x0c\n\x08PERIODIC\x10\x02\x42\x16\n\x14maintenance_strategyB\x17\n\x15_maintenance_interval\"\xbe\x01\n\tNodeTaint\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12:\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32*.google.container.v1beta1.NodeTaint.Effect\"Y\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNO_SCHEDULE\x10\x01\x12\x16\n\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n\nNO_EXECUTE\x10\x03\"A\n\nNodeTaints\x12\x33\n\x06taints\x18\x01 \x03(\x0b\x32#.google.container.v1beta1.NodeTaint\"}\n\nNodeLabels\x12@\n\x06labels\x18\x01 \x03(\x0b\x32\x30.google.container.v1beta1.NodeLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x0eResourceLabels\x12\x44\n\x06labels\x18\x01 \x03(\x0b\x32\x34.google.container.v1beta1.ResourceLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x0bNetworkTags\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\xed\x01\n\nMasterAuth\x12\x14\n\x08username\x18\x01 \x01(\tB\x02\x18\x01\x12\x14\n\x08password\x18\x02 \x01(\tB\x02\x18\x01\x12T\n\x19\x63lient_certificate_config\x18\x03 \x01(\x0b\x32\x31.google.container.v1beta1.ClientCertificateConfig\x12#\n\x16\x63luster_ca_certificate\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63lient_certificate\x18\x65 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nclient_key\x18\x66 \x01(\tB\x03\xe0\x41\x03\";\n\x17\x43lientCertificateConfig\x12 \n\x18issue_client_certificate\x18\x01 \x01(\x08\"\xf9\n\n\x0c\x41\x64\x64onsConfig\x12H\n\x13http_load_balancing\x18\x01 \x01(\x0b\x32+.google.container.v1beta1.HttpLoadBalancing\x12V\n\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\x0b\x32\x32.google.container.v1beta1.HorizontalPodAutoscaling\x12O\n\x14kubernetes_dashboard\x18\x03 \x01(\x0b\x32-.google.container.v1beta1.KubernetesDashboardB\x02\x18\x01\x12L\n\x15network_policy_config\x18\x04 \x01(\x0b\x32-.google.container.v1beta1.NetworkPolicyConfig\x12?\n\x0cistio_config\x18\x05 \x01(\x0b\x32%.google.container.v1beta1.IstioConfigB\x02\x18\x01\x12\x42\n\x10\x63loud_run_config\x18\x07 \x01(\x0b\x32(.google.container.v1beta1.CloudRunConfig\x12\x42\n\x10\x64ns_cache_config\x18\x08 \x01(\x0b\x32(.google.container.v1beta1.DnsCacheConfig\x12P\n\x17\x63onfig_connector_config\x18\n \x01(\x0b\x32/.google.container.v1beta1.ConfigConnectorConfig\x12i\n%gce_persistent_disk_csi_driver_config\x18\x0b \x01(\x0b\x32:.google.container.v1beta1.GcePersistentDiskCsiDriverConfig\x12=\n\x0bkalm_config\x18\x0c \x01(\x0b\x32$.google.container.v1beta1.KalmConfigB\x02\x18\x01\x12^\n\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\x0b\x32\x35.google.container.v1beta1.GcpFilestoreCsiDriverConfig\x12O\n\x17gke_backup_agent_config\x18\x10 \x01(\x0b\x32..google.container.v1beta1.GkeBackupAgentConfig\x12T\n\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\x0b\x32\x30.google.container.v1beta1.GcsFuseCsiDriverConfig\x12K\n\x12stateful_ha_config\x18\x12 \x01(\x0b\x32*.google.container.v1beta1.StatefulHAConfigB\x03\xe0\x41\x01\x12_\n\x1fparallelstore_csi_driver_config\x18\x13 \x01(\x0b\x32\x36.google.container.v1beta1.ParallelstoreCsiDriverConfig\x12M\n\x13ray_operator_config\x18\x15 \x01(\x0b\x32+.google.container.v1beta1.RayOperatorConfigB\x03\xe0\x41\x01\x12_\n\x1fhigh_scale_checkpointing_config\x18\x16 \x01(\x0b\x32\x36.google.container.v1beta1.HighScaleCheckpointingConfig\"%\n\x11HttpLoadBalancing\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x18HorizontalPodAutoscaling\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13KubernetesDashboard\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13NetworkPolicyConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"!\n\x0e\x44nsCacheConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"!\n\nKalmConfig\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\"\'\n\x14GkeBackupAgentConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"#\n\x10StatefulHAConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x15\x43onfigConnectorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"3\n GcePersistentDiskCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\".\n\x1bGcpFilestoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16GcsFuseCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cParallelstoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cHighScaleCheckpointingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe2\x01\n\x11RayOperatorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12Z\n\x1aray_cluster_logging_config\x18\x02 \x01(\x0b\x32\x31.google.container.v1beta1.RayClusterLoggingConfigB\x03\xe0\x41\x01\x12`\n\x1dray_cluster_monitoring_config\x18\x03 \x01(\x0b\x32\x34.google.container.v1beta1.RayClusterMonitoringConfigB\x03\xe0\x41\x01\"9\n&PrivateClusterMasterGlobalAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xed\x02\n\x14PrivateClusterConfig\x12 \n\x14\x65nable_private_nodes\x18\x01 \x01(\x08\x42\x02\x18\x01\x12#\n\x17\x65nable_private_endpoint\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x1e\n\x16master_ipv4_cidr_block\x18\x03 \x01(\t\x12\x1f\n\x10private_endpoint\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x1e\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cpeering_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12i\n\x1bmaster_global_access_config\x18\x08 \x01(\x0b\x32@.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfigB\x02\x18\x01\x12\'\n\x1bprivate_endpoint_subnetwork\x18\n \x01(\tB\x02\x18\x01\"\x9f\x01\n\x0bIstioConfig\x12\x14\n\x08\x64isabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12\x45\n\x04\x61uth\x18\x02 \x01(\x0e\x32\x33.google.container.v1beta1.IstioConfig.IstioAuthModeB\x02\x18\x01\"3\n\rIstioAuthMode\x12\r\n\tAUTH_NONE\x10\x00\x12\x13\n\x0f\x41UTH_MUTUAL_TLS\x10\x01\"\xf3\x01\n\x0e\x43loudRunConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12U\n\x12load_balancer_type\x18\x03 \x01(\x0e\x32\x39.google.container.v1beta1.CloudRunConfig.LoadBalancerType\"x\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"\xef\x02\n\x1eMasterAuthorizedNetworksConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12W\n\x0b\x63idr_blocks\x18\x02 \x03(\x0b\x32\x42.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock\x12,\n\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x31\n$private_endpoint_enforcement_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x1a\x35\n\tCidrBlock\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x12\n\ncidr_block\x18\x02 \x01(\tB\"\n _gcp_public_cidrs_access_enabledB\'\n%_private_endpoint_enforcement_enabled\"\x1d\n\nLegacyAbac\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x96\x01\n\rNetworkPolicy\x12\x42\n\x08provider\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.NetworkPolicy.Provider\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"0\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41LICO\x10\x01\"-\n\x1aPodCIDROverprovisionConfig\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\"\xaa\x08\n\x12IPAllocationPolicy\x12\x16\n\x0euse_ip_aliases\x18\x01 \x01(\x08\x12\x19\n\x11\x63reate_subnetwork\x18\x02 \x01(\x08\x12\x17\n\x0fsubnetwork_name\x18\x03 \x01(\t\x12\x1d\n\x11\x63luster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01\x12\x1a\n\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01\x12\x1e\n\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01\x12$\n\x1c\x63luster_secondary_range_name\x18\x07 \x01(\t\x12%\n\x1dservices_secondary_range_name\x18\x08 \x01(\t\x12\x1f\n\x17\x63luster_ipv4_cidr_block\x18\t \x01(\t\x12\x1c\n\x14node_ipv4_cidr_block\x18\n \x01(\t\x12 \n\x18services_ipv4_cidr_block\x18\x0b \x01(\t\x12\x1b\n\x13\x61llow_route_overlap\x18\x0c \x01(\x08\x12\x1f\n\x13tpu_ipv4_cidr_block\x18\r \x01(\tB\x02\x18\x01\x12\x12\n\nuse_routes\x18\x0f \x01(\x08\x12J\n\nstack_type\x18\x10 \x01(\x0e\x32\x36.google.container.v1beta1.IPAllocationPolicy.StackType\x12U\n\x10ipv6_access_type\x18\x11 \x01(\x0e\x32;.google.container.v1beta1.IPAllocationPolicy.IPv6AccessType\x12[\n\x1dpod_cidr_overprovision_config\x18\x15 \x01(\x0b\x32\x34.google.container.v1beta1.PodCIDROverprovisionConfig\x12#\n\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12^\n\x1c\x61\x64\x64itional_pod_ranges_config\x18\x18 \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfigB\x03\xe0\x41\x03\x12/\n\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01\x42\x03\xe0\x41\x03\"@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIPv6AccessType\x12 \n\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\"\xc0\x03\n\x13\x42inaryAuthorization\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12U\n\x0f\x65valuation_mode\x18\x02 \x01(\x0e\x32<.google.container.v1beta1.BinaryAuthorization.EvaluationMode\x12Y\n\x0fpolicy_bindings\x18\x05 \x03(\x0b\x32;.google.container.v1beta1.BinaryAuthorization.PolicyBindingB\x03\xe0\x41\x01\x1a+\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xb4\x01\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12$\n PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\x12\x13\n\x0fPOLICY_BINDINGS\x10\x05\x12\x38\n4POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE\x10\x06\"*\n\x17PodSecurityPolicyConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"D\n\x19\x41uthenticatorGroupsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0esecurity_group\x18\x02 \x01(\t\"\x96\x01\n\x10\x43lusterTelemetry\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.container.v1beta1.ClusterTelemetry.Type\"C\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0f\n\x0bSYSTEM_ONLY\x10\x03\"\x82(\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x12initial_node_count\x18\x03 \x01(\x05\x42\x02\x18\x01\x12=\n\x0bnode_config\x18\x04 \x01(\x0b\x32$.google.container.v1beta1.NodeConfigB\x02\x18\x01\x12\x39\n\x0bmaster_auth\x18\x05 \x01(\x0b\x32$.google.container.v1beta1.MasterAuth\x12\x17\n\x0flogging_service\x18\x06 \x01(\t\x12\x1a\n\x12monitoring_service\x18\x07 \x01(\t\x12\x0f\n\x07network\x18\x08 \x01(\t\x12\x19\n\x11\x63luster_ipv4_cidr\x18\t \x01(\t\x12=\n\raddons_config\x18\n \x01(\x0b\x32&.google.container.v1beta1.AddonsConfig\x12\x12\n\nsubnetwork\x18\x0b \x01(\t\x12\x36\n\nnode_pools\x18\x0c \x03(\x0b\x32\".google.container.v1beta1.NodePool\x12\x11\n\tlocations\x18\r \x03(\t\x12\x1f\n\x17\x65nable_kubernetes_alpha\x18\x0e \x01(\x08\x12$\n\x1b\x61lpha_cluster_feature_gates\x18\xa0\x01 \x03(\t\x12I\n\x14\x65nable_k8s_beta_apis\x18\x8f\x01 \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12N\n\x0fresource_labels\x18\x0f \x03(\x0b\x32\x35.google.container.v1beta1.Cluster.ResourceLabelsEntry\x12\x19\n\x11label_fingerprint\x18\x10 \x01(\t\x12\x39\n\x0blegacy_abac\x18\x12 \x01(\x0b\x32$.google.container.v1beta1.LegacyAbac\x12?\n\x0enetwork_policy\x18\x13 \x01(\x0b\x32\'.google.container.v1beta1.NetworkPolicy\x12J\n\x14ip_allocation_policy\x18\x14 \x01(\x0b\x32,.google.container.v1beta1.IPAllocationPolicy\x12g\n!master_authorized_networks_config\x18\x16 \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12G\n\x12maintenance_policy\x18\x17 \x01(\x0b\x32+.google.container.v1beta1.MaintenancePolicy\x12K\n\x14\x62inary_authorization\x18\x18 \x01(\x0b\x32-.google.container.v1beta1.BinaryAuthorization\x12U\n\x1apod_security_policy_config\x18\x19 \x01(\x0b\x32\x31.google.container.v1beta1.PodSecurityPolicyConfig\x12\x41\n\x0b\x61utoscaling\x18\x1a \x01(\x0b\x32,.google.container.v1beta1.ClusterAutoscaling\x12?\n\x0enetwork_config\x18\x1b \x01(\x0b\x32\'.google.container.v1beta1.NetworkConfig\x12\x1b\n\x0fprivate_cluster\x18\x1c \x01(\x08\x42\x02\x18\x01\x12\"\n\x16master_ipv4_cidr_block\x18\x1d \x01(\tB\x02\x18\x01\x12P\n\x1b\x64\x65\x66\x61ult_max_pods_constraint\x18\x1e \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraint\x12Y\n\x1cresource_usage_export_config\x18! \x01(\x0b\x32\x33.google.container.v1beta1.ResourceUsageExportConfig\x12X\n\x1b\x61uthenticator_groups_config\x18\" \x01(\x0b\x32\x33.google.container.v1beta1.AuthenticatorGroupsConfig\x12N\n\x16private_cluster_config\x18% \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfig\x12R\n\x18vertical_pod_autoscaling\x18\' \x01(\x0b\x32\x30.google.container.v1beta1.VerticalPodAutoscaling\x12?\n\x0eshielded_nodes\x18( \x01(\x0b\x32\'.google.container.v1beta1.ShieldedNodes\x12\x41\n\x0frelease_channel\x18) \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12R\n\x18workload_identity_config\x18+ \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadIdentityConfig\x12M\n\x15workload_certificates\x18\x34 \x01(\x0b\x32..google.container.v1beta1.WorkloadCertificates\x12\x45\n\x11mesh_certificates\x18\x43 \x01(\x0b\x32*.google.container.v1beta1.MeshCertificates\x12J\n\x14workload_alts_config\x18\x35 \x01(\x0b\x32,.google.container.v1beta1.WorkloadALTSConfig\x12N\n\x16\x63ost_management_config\x18- \x01(\x0b\x32..google.container.v1beta1.CostManagementConfig\x12\x45\n\x11\x63luster_telemetry\x18. \x01(\x0b\x32*.google.container.v1beta1.ClusterTelemetry\x12;\n\ntpu_config\x18/ \x01(\x0b\x32#.google.container.v1beta1.TpuConfigB\x02\x18\x01\x12I\n\x13notification_config\x18\x31 \x01(\x0b\x32,.google.container.v1beta1.NotificationConfig\x12G\n\x12\x63onfidential_nodes\x18\x32 \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12P\n\x17identity_service_config\x18\x36 \x01(\x0b\x32/.google.container.v1beta1.IdentityServiceConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x65 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x15\n\x08\x65ndpoint\x18\x66 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17initial_cluster_version\x18g \x01(\t\x12#\n\x16\x63urrent_master_version\x18h \x01(\tB\x03\xe0\x41\x03\x12#\n\x14\x63urrent_node_version\x18i \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x63reate_time\x18j \x01(\tB\x03\xe0\x41\x03\x12=\n\x06status\x18k \x01(\x0e\x32(.google.container.v1beta1.Cluster.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18l \x01(\tB\x05\x18\x01\xe0\x41\x03\x12 \n\x13node_ipv4_cidr_size\x18m \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0\x41\x03\x12\"\n\x13instance_group_urls\x18o \x03(\tB\x05\x18\x01\xe0\x41\x03\x12!\n\x12\x63urrent_node_count\x18p \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x65xpire_time\x18q \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18r \x01(\tB\x03\xe0\x41\x03\x12\x16\n\nenable_tpu\x18s \x01(\x08\x42\x02\x18\x01\x12\"\n\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x05\x18\x01\xe0\x41\x03\x12I\n\x13\x64\x61tabase_encryption\x18& \x01(\x0b\x32,.google.container.v1beta1.DatabaseEncryption\x12=\n\nconditions\x18v \x03(\x0b\x32).google.container.v1beta1.StatusCondition\x12\x30\n\x06master\x18| \x01(\x0b\x32 .google.container.v1beta1.Master\x12\x37\n\tautopilot\x18\x80\x01 \x01(\x0b\x32#.google.container.v1beta1.Autopilot\x12\x10\n\x02id\x18\x81\x01 \x01(\tB\x03\xe0\x41\x03\x12L\n\x12node_pool_defaults\x18\x83\x01 \x01(\x0b\x32*.google.container.v1beta1.NodePoolDefaultsH\x00\x88\x01\x01\x12@\n\x0elogging_config\x18\x84\x01 \x01(\x0b\x32\'.google.container.v1beta1.LoggingConfig\x12\x46\n\x11monitoring_config\x18\x85\x01 \x01(\x0b\x32*.google.container.v1beta1.MonitoringConfig\x12L\n\x15node_pool_auto_config\x18\x88\x01 \x01(\x0b\x32,.google.container.v1beta1.NodePoolAutoConfig\x12I\n\x0eprotect_config\x18\x89\x01 \x01(\x0b\x32\'.google.container.v1beta1.ProtectConfigB\x02\x18\x01H\x01\x88\x01\x01\x12\x42\n\x0fpod_autoscaling\x18\x8a\x01 \x01(\x0b\x32(.google.container.v1beta1.PodAutoscaling\x12\r\n\x04\x65tag\x18\x8b\x01 \x01(\t\x12/\n\x05\x66leet\x18\x8c\x01 \x01(\x0b\x32\x1f.google.container.v1beta1.Fleet\x12Q\n\x17security_posture_config\x18\x91\x01 \x01(\x0b\x32/.google.container.v1beta1.SecurityPostureConfig\x12^\n\x1e\x63ontrol_plane_endpoints_config\x18\x92\x01 \x01(\x0b\x32\x35.google.container.v1beta1.ControlPlaneEndpointsConfig\x12\x46\n\x11\x65nterprise_config\x18\x95\x01 \x01(\x0b\x32*.google.container.v1beta1.EnterpriseConfig\x12M\n\x15secret_manager_config\x18\x96\x01 \x01(\x0b\x32-.google.container.v1beta1.SecretManagerConfig\x12U\n\x19\x63ompliance_posture_config\x18\x97\x01 \x01(\x0b\x32\x31.google.container.v1beta1.CompliancePostureConfig\x12 \n\rsatisfies_pzs\x18\x98\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12 \n\rsatisfies_pzi\x18\x99\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12W\n\x18user_managed_keys_config\x18\x9a\x01 \x01(\x0b\x32/.google.container.v1beta1.UserManagedKeysConfigH\x04\x88\x01\x01\x12N\n\x13rbac_binding_config\x18\x9c\x01 \x01(\x0b\x32+.google.container.v1beta1.RBACBindingConfigH\x05\x88\x01\x01\x12\x61\n\x1f\x61nonymous_authentication_config\x18\xa4\x01 \x01(\x0b\x32\x37.google.container.v1beta1.AnonymousAuthenticationConfig\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"w\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0f\n\x0bRECONCILING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x44\x45GRADED\x10\x06\x42\x15\n\x13_node_pool_defaultsB\x11\n\x0f_protect_configB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pziB\x1b\n\x19_user_managed_keys_configB\x16\n\x14_rbac_binding_config\"\xef\x01\n\x11RBACBindingConfig\x12;\n.enable_insecure_binding_system_unauthenticated\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n,enable_insecure_binding_system_authenticated\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x31\n/_enable_insecure_binding_system_unauthenticatedB/\n-_enable_insecure_binding_system_authenticated\"\xe9\x04\n\x15UserManagedKeysConfig\x12\x38\n\ncluster_ca\x18\n \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x39\n\x0b\x65tcd_api_ca\x18\x0b \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12:\n\x0c\x65tcd_peer_ca\x18\x0c \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12S\n\x1cservice_account_signing_keys\x18\r \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!service_account_verification_keys\x18\x0e \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12<\n\x0e\x61ggregation_ca\x18\x0f \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12X\n!control_plane_disk_encryption_key\x18\x10 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!gkeops_etcd_backup_encryption_key\x18\x11 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\x1f\n\x1d\x41nonymousAuthenticationConfig\"\xc4\x02\n\x17\x43ompliancePostureConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.CompliancePostureConfig.ModeH\x00\x88\x01\x01\x12\x62\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32\x44.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard\x1a\x38\n\x12\x43omplianceStandard\x12\x15\n\x08standard\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_standard\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\x07\n\x05_mode\"(\n\x10K8sBetaAPIConfig\x12\x14\n\x0c\x65nabled_apis\x18\x01 \x03(\t\"\xc4\x01\n\x0eWorkloadConfig\x12\x46\n\naudit_mode\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.WorkloadConfig.ModeH\x00\x88\x01\x01\"[\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x04\x12\x10\n\x08\x42\x41SELINE\x10\x02\x1a\x02\x08\x01\x12\x12\n\nRESTRICTED\x10\x03\x1a\x02\x08\x01\x42\r\n\x0b_audit_mode\"\xdb\x02\n\rProtectConfig\x12\x46\n\x0fworkload_config\x18\x01 \x01(\x0b\x32(.google.container.v1beta1.WorkloadConfigH\x00\x88\x01\x01\x12k\n\x1bworkload_vulnerability_mode\x18\x02 \x01(\x0e\x32\x41.google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityModeH\x01\x88\x01\x01\"a\n\x19WorkloadVulnerabilityMode\x12+\n\'WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x42\x12\n\x10_workload_configB\x1e\n\x1c_workload_vulnerability_mode\"\xb8\x03\n\x15SecurityPostureConfig\x12G\n\x04mode\x18\x01 \x01(\x0e\x32\x34.google.container.v1beta1.SecurityPostureConfig.ModeH\x00\x88\x01\x01\x12\x62\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32\x41.google.container.v1beta1.SecurityPostureConfig.VulnerabilityModeH\x01\x88\x01\x01\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\x42\x07\n\x05_modeB\x15\n\x13_vulnerability_mode\"^\n\x10NodePoolDefaults\x12J\n\x14node_config_defaults\x18\x01 \x01(\x0b\x32,.google.container.v1beta1.NodeConfigDefaults\"\xfb\x02\n\x12NodeConfigDefaults\x12\x39\n\x0bgcfs_config\x18\x01 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12G\n\x0elogging_config\x18\x03 \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x45\n\x11\x63ontainerd_config\x18\x04 \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12P\n\x17host_maintenance_policy\x18\x05 \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12H\n\x13node_kubelet_config\x18\x06 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\"\xb4\x02\n\x12NodePoolAutoConfig\x12;\n\x0cnetwork_tags\x18\x01 \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12L\n\x15resource_manager_tags\x18\x02 \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12H\n\x13node_kubelet_config\x18\x03 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12I\n\x11linux_node_config\x18\x04 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfigB\x03\xe0\x41\x03\"\xe4\x31\n\rClusterUpdate\x12\x1c\n\x14\x64\x65sired_node_version\x18\x04 \x01(\t\x12\"\n\x1a\x64\x65sired_monitoring_service\x18\x05 \x01(\t\x12\x45\n\x15\x64\x65sired_addons_config\x18\x06 \x01(\x0b\x32&.google.container.v1beta1.AddonsConfig\x12\x1c\n\x14\x64\x65sired_node_pool_id\x18\x07 \x01(\t\x12\x1a\n\x12\x64\x65sired_image_type\x18\x08 \x01(\t\x12T\n\x1d\x64\x65sired_node_pool_autoscaling\x18\t \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscaling\x12\x19\n\x11\x64\x65sired_locations\x18\n \x03(\t\x12o\n)desired_master_authorized_networks_config\x18\x0c \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12]\n\"desired_pod_security_policy_config\x18\x0e \x01(\x0b\x32\x31.google.container.v1beta1.PodSecurityPolicyConfig\x12Q\n\x1b\x64\x65sired_cluster_autoscaling\x18\x0f \x01(\x0b\x32,.google.container.v1beta1.ClusterAutoscaling\x12S\n\x1c\x64\x65sired_binary_authorization\x18\x10 \x01(\x0b\x32-.google.container.v1beta1.BinaryAuthorization\x12\x1f\n\x17\x64\x65sired_logging_service\x18\x13 \x01(\t\x12\x61\n$desired_resource_usage_export_config\x18\x15 \x01(\x0b\x32\x33.google.container.v1beta1.ResourceUsageExportConfig\x12Z\n desired_vertical_pod_autoscaling\x18\x16 \x01(\x0b\x32\x30.google.container.v1beta1.VerticalPodAutoscaling\x12Z\n\x1e\x64\x65sired_private_cluster_config\x18\x19 \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfigB\x02\x18\x01\x12\x61\n$desired_intra_node_visibility_config\x18\x1a \x01(\x0b\x32\x33.google.container.v1beta1.IntraNodeVisibilityConfig\x12P\n\x1b\x64\x65sired_default_snat_status\x18\x1c \x01(\x0b\x32+.google.container.v1beta1.DefaultSnatStatus\x12M\n\x19\x64\x65sired_cluster_telemetry\x18\x1e \x01(\x0b\x32*.google.container.v1beta1.ClusterTelemetry\x12I\n\x17\x64\x65sired_release_channel\x18\x1f \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12R\n\x16private_cluster_config\x18% \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfigB\x02\x18\x01\x12\x43\n\x12\x64\x65sired_tpu_config\x18& \x01(\x0b\x32#.google.container.v1beta1.TpuConfigB\x02\x18\x01\x12V\n\x1f\x64\x65sired_l4ilb_subsetting_config\x18\' \x01(\x0b\x32-.google.container.v1beta1.ILBSubsettingConfig\x12M\n\x19\x64\x65sired_datapath_provider\x18\x32 \x01(\x0e\x32*.google.container.v1beta1.DatapathProvider\x12]\n\"desired_private_ipv6_google_access\x18\x33 \x01(\x0e\x32\x31.google.container.v1beta1.PrivateIPv6GoogleAccess\x12Q\n\x1b\x64\x65sired_notification_config\x18\x37 \x01(\x0b\x32,.google.container.v1beta1.NotificationConfig\x12\x1e\n\x16\x64\x65sired_master_version\x18\x64 \x01(\t\x12\x41\n\x13\x64\x65sired_gcfs_config\x18m \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12Q\n\x1b\x64\x65sired_database_encryption\x18. \x01(\x0b\x32,.google.container.v1beta1.DatabaseEncryption\x12Z\n desired_workload_identity_config\x18/ \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadIdentityConfig\x12U\n\x1d\x64\x65sired_workload_certificates\x18= \x01(\x0b\x32..google.container.v1beta1.WorkloadCertificates\x12M\n\x19\x64\x65sired_mesh_certificates\x18\x43 \x01(\x0b\x32*.google.container.v1beta1.MeshCertificates\x12R\n\x1c\x64\x65sired_workload_alts_config\x18> \x01(\x0b\x32,.google.container.v1beta1.WorkloadALTSConfig\x12G\n\x16\x64\x65sired_shielded_nodes\x18\x30 \x01(\x0b\x32\'.google.container.v1beta1.ShieldedNodes\x12V\n\x1e\x64\x65sired_cost_management_config\x18\x31 \x01(\x0b\x32..google.container.v1beta1.CostManagementConfig\x12\x38\n\x0e\x64\x65sired_master\x18\x34 \x01(\x0b\x32 .google.container.v1beta1.Master\x12?\n\x12\x64\x65sired_dns_config\x18\x35 \x01(\x0b\x32#.google.container.v1beta1.DNSConfig\x12_\n#desired_service_external_ips_config\x18< \x01(\x0b\x32\x32.google.container.v1beta1.ServiceExternalIPsConfig\x12`\n#desired_authenticator_groups_config\x18? \x01(\x0b\x32\x33.google.container.v1beta1.AuthenticatorGroupsConfig\x12G\n\x16\x64\x65sired_logging_config\x18@ \x01(\x0b\x32\'.google.container.v1beta1.LoggingConfig\x12M\n\x19\x64\x65sired_monitoring_config\x18\x41 \x01(\x0b\x32*.google.container.v1beta1.MonitoringConfig\x12X\n\x1f\x64\x65sired_identity_service_config\x18\x42 \x01(\x0b\x32/.google.container.v1beta1.IdentityServiceConfig\x12\x30\n\x1f\x64\x65sired_enable_private_endpoint\x18G \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x31\n$desired_default_enable_private_nodes\x18H \x01(\x08H\x01\x88\x01\x01\x12\x65\n&desired_control_plane_endpoints_config\x18I \x01(\x0b\x32\x35.google.container.v1beta1.ControlPlaneEndpointsConfig\x12Y\n*desired_node_pool_auto_config_network_tags\x18n \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12P\n\x16\x64\x65sired_protect_config\x18p \x01(\x0b\x32\'.google.container.v1beta1.ProtectConfigB\x02\x18\x01H\x02\x88\x01\x01\x12I\n\x17\x64\x65sired_pod_autoscaling\x18q \x01(\x0b\x32(.google.container.v1beta1.PodAutoscaling\x12N\n\x1a\x64\x65sired_gateway_api_config\x18r \x01(\x0b\x32*.google.container.v1beta1.GatewayAPIConfig\x12\x0c\n\x04\x65tag\x18s \x01(\t\x12Y\n desired_node_pool_logging_config\x18t \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x36\n\rdesired_fleet\x18u \x01(\x0b\x32\x1f.google.container.v1beta1.Fleet\x12?\n\x12\x64\x65sired_stack_type\x18w \x01(\x0e\x32#.google.container.v1beta1.StackType\x12Y\n\x1c\x61\x64\x64itional_pod_ranges_config\x18x \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfig\x12\x61\n$removed_additional_pod_ranges_config\x18y \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfig\x12H\n\x14\x65nable_k8s_beta_apis\x18z \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12X\n\x1f\x64\x65sired_security_posture_config\x18| \x01(\x0b\x32/.google.container.v1beta1.SecurityPostureConfig\x12s\n\"desired_network_performance_config\x18} \x01(\x0b\x32G.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig\x12/\n\"desired_enable_fqdn_network_policy\x18~ \x01(\x08H\x03\x88\x01\x01\x12\x61\n(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\x0b\x32..google.container.v1beta1.WorkloadPolicyConfig\x12J\n\x15\x64\x65sired_k8s_beta_apis\x18\x83\x01 \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12Y\n\x1f\x64\x65sired_host_maintenance_policy\x18\x84\x01 \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12N\n\x19\x64\x65sired_containerd_config\x18\x86\x01 \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12-\n\x1f\x64\x65sired_enable_multi_networking\x18\x87\x01 \x01(\x08H\x04\x88\x01\x01\x12k\n3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12g\n$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e\x32\x33.google.container.v1beta1.InTransitEncryptionConfigH\x05\x88\x01\x01\x12>\n0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\x08H\x06\x88\x01\x01\x12Z\n\x1d\x64\x65sired_secret_manager_config\x18\x8b\x01 \x01(\x0b\x32-.google.container.v1beta1.SecretManagerConfigH\x07\x88\x01\x01\x12\x62\n!desired_compliance_posture_config\x18\x8c\x01 \x01(\x0b\x32\x31.google.container.v1beta1.CompliancePostureConfigH\x08\x88\x01\x01\x12Q\n\x1b\x64\x65sired_node_kubelet_config\x18\x8d\x01 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12\x62\n,desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12R\n\x18user_managed_keys_config\x18\x8f\x01 \x01(\x0b\x32/.google.container.v1beta1.UserManagedKeysConfig\x12V\n\x1b\x64\x65sired_rbac_binding_config\x18\x90\x01 \x01(\x0b\x32+.google.container.v1beta1.RBACBindingConfigH\t\x88\x01\x01\x12U\n\x19\x64\x65sired_enterprise_config\x18\x93\x01 \x01(\x0b\x32\x31.google.container.v1beta1.DesiredEnterpriseConfig\x12;\n-desired_disable_l4_lb_firewall_reconciliation\x18\x95\x01 \x01(\x08H\n\x88\x01\x01\x12\x63\n/desired_node_pool_auto_config_linux_node_config\x18\x96\x01 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12i\n\'desired_anonymous_authentication_config\x18\x9c\x01 \x01(\x0b\x32\x37.google.container.v1beta1.AnonymousAuthenticationConfigB\"\n _desired_enable_private_endpointB\'\n%_desired_default_enable_private_nodesB\x19\n\x17_desired_protect_configB%\n#_desired_enable_fqdn_network_policyB\"\n _desired_enable_multi_networkingB\'\n%_desired_in_transit_encryption_configB3\n1_desired_enable_cilium_clusterwide_network_policyB \n\x1e_desired_secret_manager_configB$\n\"_desired_compliance_posture_configB\x1e\n\x1c_desired_rbac_binding_configB0\n._desired_disable_l4_lb_firewall_reconciliation\"v\n\x19\x41\x64\x64itionalPodRangesConfig\x12\x17\n\x0fpod_range_names\x18\x01 \x03(\t\x12@\n\x0epod_range_info\x18\x02 \x03(\x0b\x32#.google.container.v1beta1.RangeInfoB\x03\xe0\x41\x03\">\n\tRangeInfo\x12\x17\n\nrange_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0butilization\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"g\n\x17\x44\x65siredEnterpriseConfig\x12L\n\x0c\x64\x65sired_tier\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTier\"\xfd\x08\n\tOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x45\n\x0eoperation_type\x18\x03 \x01(\x0e\x32(.google.container.v1beta1.Operation.TypeB\x03\xe0\x41\x03\x12?\n\x06status\x18\x04 \x01(\x0e\x32*.google.container.v1beta1.Operation.StatusB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x16\n\tself_link\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0btarget_link\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nstart_time\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_time\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x08progress\x18\x0c \x01(\x0b\x32+.google.container.v1beta1.OperationProgressB\x03\xe0\x41\x03\x12I\n\x12\x63luster_conditions\x18\r \x03(\x0b\x32).google.container.v1beta1.StatusConditionB\x02\x18\x01\x12J\n\x13nodepool_conditions\x18\x0e \x03(\x0b\x32).google.container.v1beta1.StatusConditionB\x02\x18\x01\x12!\n\x05\x65rror\x18\x0f \x01(\x0b\x32\x12.google.rpc.Status\"R\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x41\x42ORTING\x10\x04\"\xc0\x03\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43REATE_CLUSTER\x10\x01\x12\x12\n\x0e\x44\x45LETE_CLUSTER\x10\x02\x12\x12\n\x0eUPGRADE_MASTER\x10\x03\x12\x11\n\rUPGRADE_NODES\x10\x04\x12\x12\n\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n\x10\x43REATE_NODE_POOL\x10\x07\x12\x14\n\x10\x44\x45LETE_NODE_POOL\x10\x08\x12\x1c\n\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n\x11\x41UTO_REPAIR_NODES\x10\n\x12\x1a\n\x12\x41UTO_UPGRADE_NODES\x10\x0b\x1a\x02\x08\x01\x12\x12\n\nSET_LABELS\x10\x0c\x1a\x02\x08\x01\x12\x17\n\x0fSET_MASTER_AUTH\x10\r\x1a\x02\x08\x01\x12\x16\n\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\x08\x01\x12\x1e\n\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\x08\x01\x12\x12\n\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n\x15\x46LEET_FEATURE_UPGRADE\x10\x13\"\xca\x02\n\x11OperationProgress\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x06status\x18\x02 \x01(\x0e\x32*.google.container.v1beta1.Operation.Status\x12\x43\n\x07metrics\x18\x03 \x03(\x0b\x32\x32.google.container.v1beta1.OperationProgress.Metric\x12;\n\x06stages\x18\x04 \x03(\x0b\x32+.google.container.v1beta1.OperationProgress\x1ai\n\x06Metric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\tint_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\x42\x07\n\x05value\"\x89\x01\n\x14\x43reateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x37\n\x07\x63luster\x18\x03 \x01(\x0b\x32!.google.container.v1beta1.ClusterB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"c\n\x11GetClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xa4\x01\n\x14UpdateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12<\n\x06update\x18\x04 \x01(\x0b\x32\'.google.container.v1beta1.ClusterUpdateB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xa6\r\n\x15UpdateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x19\n\x0cnode_version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nimage_type\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tlocations\x18\r \x03(\t\x12R\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadMetadataConfig\x12\x0c\n\x04name\x18\x08 \x01(\t\x12L\n\x10upgrade_settings\x18\x0f \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12\x33\n\x04tags\x18\x10 \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12\x34\n\x06taints\x18\x11 \x01(\x0b\x32$.google.container.v1beta1.NodeTaints\x12\x34\n\x06labels\x18\x12 \x01(\x0b\x32$.google.container.v1beta1.NodeLabels\x12\x44\n\x11linux_node_config\x18\x13 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12\x43\n\x0ekubelet_config\x18\x14 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12H\n\x13node_network_config\x18\x15 \x01(\x0b\x32+.google.container.v1beta1.NodeNetworkConfig\x12\x39\n\x0bgcfs_config\x18\x16 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12G\n\x12\x63onfidential_nodes\x18\x17 \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12\x33\n\x05gvnic\x18\x1d \x01(\x0b\x32$.google.container.v1beta1.VirtualNIC\x12\x0c\n\x04\x65tag\x18\x1e \x01(\t\x12\x39\n\x0b\x66\x61st_socket\x18\x1f \x01(\x0b\x32$.google.container.v1beta1.FastSocket\x12G\n\x0elogging_config\x18 \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x41\n\x0fresource_labels\x18! \x01(\x0b\x32(.google.container.v1beta1.ResourceLabels\x12H\n\x13windows_node_config\x18\" \x01(\x0b\x32+.google.container.v1beta1.WindowsNodeConfig\x12\x41\n\x0c\x61\x63\x63\x65lerators\x18# \x03(\x0b\x32+.google.container.v1beta1.AcceleratorConfig\x12\x19\n\x0cmachine_type\x18$ \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18% \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isk_size_gb\x18& \x01(\x03\x42\x03\xe0\x41\x01\x12L\n\x15resource_manager_tags\x18\' \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12\x45\n\x11\x63ontainerd_config\x18( \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12R\n\x13queued_provisioning\x18* \x01(\x0b\x32\x35.google.container.v1beta1.NodePool.QueuedProvisioning\x12\x15\n\rstorage_pools\x18+ \x03(\t\x12\x33\n\x10max_run_duration\x18- \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\nflex_start\x18. \x01(\x08H\x00\x88\x01\x01\x42\r\n\x0b_flex_start\"\xd2\x01\n\x1dSetNodePoolAutoscalingRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12G\n\x0b\x61utoscaling\x18\x05 \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscalingB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x88\x01\n\x18SetLoggingServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1c\n\x0flogging_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x8e\x01\n\x1bSetMonitoringServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xac\x01\n\x16SetAddonsConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x42\n\raddons_config\x18\x04 \x01(\x0b\x32&.google.container.v1beta1.AddonsConfigB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"}\n\x13SetLocationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\tlocations\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x82\x01\n\x13UpdateMasterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1b\n\x0emaster_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xbf\x02\n\x14SetMasterAuthRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12J\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x35.google.container.v1beta1.SetMasterAuthRequest.ActionB\x03\xe0\x41\x02\x12\x39\n\x06update\x18\x05 \x01(\x0b\x32$.google.container.v1beta1.MasterAuthB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"P\n\x06\x41\x63tion\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cSET_PASSWORD\x10\x01\x12\x15\n\x11GENERATE_PASSWORD\x10\x02\x12\x10\n\x0cSET_USERNAME\x10\x03\"f\n\x14\x44\x65leteClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"O\n\x13ListClustersRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"b\n\x14ListClustersResponse\x12\x33\n\x08\x63lusters\x18\x01 \x03(\x0b\x32!.google.container.v1beta1.Cluster\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"g\n\x13GetOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"Q\n\x15ListOperationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"j\n\x16\x43\x61ncelOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"h\n\x16ListOperationsResponse\x12\x37\n\noperations\x18\x01 \x03(\x0b\x32#.google.container.v1beta1.Operation\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"P\n\x16GetServerConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"\x89\x06\n\x0cServerConfig\x12\x1f\n\x17\x64\x65\x66\x61ult_cluster_version\x18\x01 \x01(\t\x12\x1b\n\x13valid_node_versions\x18\x03 \x03(\t\x12\x1a\n\x12\x64\x65\x66\x61ult_image_type\x18\x04 \x01(\t\x12\x19\n\x11valid_image_types\x18\x05 \x03(\t\x12\x1d\n\x15valid_master_versions\x18\x06 \x03(\t\x12M\n\x08\x63hannels\x18\t \x03(\x0b\x32;.google.container.v1beta1.ServerConfig.ReleaseChannelConfig\x12\\\n\x14windows_version_maps\x18\n \x03(\x0b\x32>.google.container.v1beta1.ServerConfig.WindowsVersionMapsEntry\x1a\xd1\x02\n\x14ReleaseChannelConfig\x12\x41\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.ReleaseChannel.Channel\x12\x17\n\x0f\x64\x65\x66\x61ult_version\x18\x02 \x01(\t\x12l\n\x12\x61vailable_versions\x18\x03 \x03(\x0b\x32L.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersionB\x02\x18\x01\x12\x16\n\x0evalid_versions\x18\x04 \x03(\t\x12\x1e\n\x16upgrade_target_version\x18\x05 \x01(\t\x1a\x37\n\x10\x41vailableVersion\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t:\x02\x18\x01\x1a\x64\n\x17WindowsVersionMapsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.container.v1beta1.WindowsVersions:\x02\x38\x01\"F\n\x16\x42\x65stEffortProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x13min_provision_nodes\x18\x02 \x01(\x05\"\xcc\x01\n\x0fWindowsVersions\x12R\n\x10windows_versions\x18\x01 \x03(\x0b\x32\x38.google.container.v1beta1.WindowsVersions.WindowsVersion\x1a\x65\n\x0eWindowsVersion\x12\x12\n\nimage_type\x18\x01 \x01(\t\x12\x12\n\nos_version\x18\x02 \x01(\t\x12+\n\x10support_end_date\x18\x03 \x01(\x0b\x32\x11.google.type.Date\"\xa5\x01\n\x15\x43reateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12:\n\tnode_pool\x18\x04 \x01(\x0b\x32\".google.container.v1beta1.NodePoolB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x06 \x01(\t\"\x81\x01\n\x15\x44\x65leteNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"h\n\x14ListNodePoolsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x05 \x01(\t\"~\n\x12GetNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xa9\x04\n\x11\x42lueGreenSettings\x12\x64\n\x17standard_rollout_policy\x18\x01 \x01(\x0b\x32\x41.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicyH\x00\x12h\n\x19\x61utoscaled_rollout_policy\x18\x03 \x01(\x0b\x32\x43.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicyH\x00\x12?\n\x17node_pool_soak_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x1a\xb9\x01\n\x15StandardRolloutPolicy\x12\x1a\n\x10\x62\x61tch_percentage\x18\x01 \x01(\x02H\x00\x12\x1a\n\x10\x62\x61tch_node_count\x18\x02 \x01(\x05H\x00\x12;\n\x13\x62\x61tch_soak_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\x13\n\x11update_batch_sizeB\x16\n\x14_batch_soak_duration\x1a\x19\n\x17\x41utoscaledRolloutPolicyB\x10\n\x0erollout_policyB\x1a\n\x18_node_pool_soak_duration\"\xc1\x11\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x63onfig\x18\x02 \x01(\x0b\x32$.google.container.v1beta1.NodeConfig\x12\x1a\n\x12initial_node_count\x18\x03 \x01(\x05\x12\x11\n\tlocations\x18\r \x03(\t\x12\x43\n\x0enetwork_config\x18\x0e \x01(\x0b\x32+.google.container.v1beta1.NodeNetworkConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x65 \x01(\t\x12 \n\x13instance_group_urls\x18\x66 \x03(\tB\x03\xe0\x41\x03\x12>\n\x06status\x18g \x01(\x0e\x32).google.container.v1beta1.NodePool.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18h \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x42\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscaling\x12<\n\nmanagement\x18\x05 \x01(\x0b\x32(.google.container.v1beta1.NodeManagement\x12H\n\x13max_pods_constraint\x18\x06 \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraint\x12=\n\nconditions\x18i \x03(\x0b\x32).google.container.v1beta1.StatusCondition\x12\x1f\n\x12pod_ipv4_cidr_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12L\n\x10upgrade_settings\x18k \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12L\n\x10placement_policy\x18l \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.PlacementPolicy\x12G\n\x0bupdate_info\x18m \x01(\x0b\x32-.google.container.v1beta1.NodePool.UpdateInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18n \x01(\t\x12R\n\x13queued_provisioning\x18p \x01(\x0b\x32\x35.google.container.v1beta1.NodePool.QueuedProvisioning\x12R\n\x18\x62\x65st_effort_provisioning\x18q \x01(\x0b\x32\x30.google.container.v1beta1.BestEffortProvisioning\x1a\xfa\x01\n\x0fUpgradeSettings\x12\x11\n\tmax_surge\x18\x01 \x01(\x05\x12\x17\n\x0fmax_unavailable\x18\x02 \x01(\x05\x12G\n\x08strategy\x18\x03 \x01(\x0e\x32\x30.google.container.v1beta1.NodePoolUpdateStrategyH\x00\x88\x01\x01\x12M\n\x13\x62lue_green_settings\x18\x04 \x01(\x0b\x32+.google.container.v1beta1.BlueGreenSettingsH\x01\x88\x01\x01\x42\x0b\n\t_strategyB\x16\n\x14_blue_green_settings\x1a\xb2\x04\n\nUpdateInfo\x12T\n\x0f\x62lue_green_info\x18\x01 \x01(\x0b\x32;.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo\x1a\xcd\x03\n\rBlueGreenInfo\x12P\n\x05phase\x18\x01 \x01(\x0e\x32\x41.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase\x12 \n\x18\x62lue_instance_group_urls\x18\x02 \x03(\t\x12!\n\x19green_instance_group_urls\x18\x03 \x03(\t\x12%\n\x1d\x62lue_pool_deletion_start_time\x18\x04 \x01(\t\x12\x1a\n\x12green_pool_version\x18\x05 \x01(\t\"\xe1\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUPDATE_STARTED\x10\x01\x12\x17\n\x13\x43REATING_GREEN_POOL\x10\x02\x12\x17\n\x13\x43ORDONING_BLUE_POOL\x10\x03\x12\x1e\n\x1aWAITING_TO_DRAIN_BLUE_POOL\x10\x08\x12\x16\n\x12\x44RAINING_BLUE_POOL\x10\x04\x12\x15\n\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n\x12\x44\x45LETING_BLUE_POOL\x10\x06\x12\x14\n\x10ROLLBACK_STARTED\x10\x07\x1a\xae\x01\n\x0fPlacementPolicy\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.container.v1beta1.NodePool.PlacementPolicy.Type\x12\x14\n\x0ctpu_topology\x18\x02 \x01(\t\x12\x13\n\x0bpolicy_name\x18\x03 \x01(\t\")\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMPACT\x10\x01\x1a%\n\x12QueuedProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x16\n\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n\x0bRECONCILING\x10\x04\x12\x0c\n\x08STOPPING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\"\x82\x01\n\x0eNodeManagement\x12\x14\n\x0c\x61uto_upgrade\x18\x01 \x01(\x08\x12\x13\n\x0b\x61uto_repair\x18\x02 \x01(\x08\x12\x45\n\x0fupgrade_options\x18\n \x01(\x0b\x32,.google.container.v1beta1.AutoUpgradeOptions\"T\n\x12\x41utoUpgradeOptions\x12$\n\x17\x61uto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"j\n\x11MaintenancePolicy\x12;\n\x06window\x18\x01 \x01(\x0b\x32+.google.container.v1beta1.MaintenanceWindow\x12\x18\n\x10resource_version\x18\x03 \x01(\t\"\x8a\x03\n\x11MaintenanceWindow\x12T\n\x18\x64\x61ily_maintenance_window\x18\x02 \x01(\x0b\x32\x30.google.container.v1beta1.DailyMaintenanceWindowH\x00\x12I\n\x10recurring_window\x18\x03 \x01(\x0b\x32-.google.container.v1beta1.RecurringTimeWindowH\x00\x12\x66\n\x16maintenance_exclusions\x18\x04 \x03(\x0b\x32\x46.google.container.v1beta1.MaintenanceWindow.MaintenanceExclusionsEntry\x1a\x62\n\x1aMaintenanceExclusionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.google.container.v1beta1.TimeWindow:\x02\x38\x01\x42\x08\n\x06policy\"\xd5\x01\n\nTimeWindow\x12^\n\x1dmaintenance_exclusion_options\x18\x03 \x01(\x0b\x32\x35.google.container.v1beta1.MaintenanceExclusionOptionsH\x00\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07options\"\xb9\x01\n\x1bMaintenanceExclusionOptions\x12J\n\x05scope\x18\x01 \x01(\x0e\x32;.google.container.v1beta1.MaintenanceExclusionOptions.Scope\"N\n\x05Scope\x12\x0f\n\x0bNO_UPGRADES\x10\x00\x12\x15\n\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"_\n\x13RecurringTimeWindow\x12\x34\n\x06window\x18\x01 \x01(\x0b\x32$.google.container.v1beta1.TimeWindow\x12\x12\n\nrecurrence\x18\x02 \x01(\t\"C\n\x16\x44\x61ilyMaintenanceWindow\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x15\n\x08\x64uration\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcb\x01\n\x1cSetNodePoolManagementRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x41\n\nmanagement\x18\x05 \x01(\x0b\x32(.google.container.v1beta1.NodeManagementB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\x9b\x01\n\x16SetNodePoolSizeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x17\n\nnode_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\".\n\x1e\x43ompleteNodePoolUpgradeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9f\x01\n\x1eRollbackNodePoolUpgradeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0brespect_pdb\x18\x07 \x01(\x08\"O\n\x15ListNodePoolsResponse\x12\x36\n\nnode_pools\x18\x01 \x03(\x0b\x32\".google.container.v1beta1.NodePool\"\xbe\x03\n\x12\x43lusterAutoscaling\x12$\n\x1c\x65nable_node_autoprovisioning\x18\x01 \x01(\x08\x12@\n\x0fresource_limits\x18\x02 \x03(\x0b\x32\'.google.container.v1beta1.ResourceLimit\x12\\\n\x13\x61utoscaling_profile\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile\x12g\n#autoprovisioning_node_pool_defaults\x18\x04 \x01(\x0b\x32:.google.container.v1beta1.AutoprovisioningNodePoolDefaults\x12\"\n\x1a\x61utoprovisioning_locations\x18\x05 \x03(\t\"U\n\x12\x41utoscalingProfile\x12\x17\n\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n\x14OPTIMIZE_UTILIZATION\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\"\x87\x04\n AutoprovisioningNodePoolDefaults\x12\x14\n\x0coauth_scopes\x18\x01 \x03(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12L\n\x10upgrade_settings\x18\x03 \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12<\n\nmanagement\x18\x04 \x01(\x0b\x32(.google.container.v1beta1.NodeManagement\x12\x1c\n\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x05\x12\x11\n\tdisk_type\x18\x07 \x01(\t\x12R\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32\x30.google.container.v1beta1.ShieldedInstanceConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\t \x01(\t\x12\x12\n\nimage_type\x18\n \x01(\t\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\r \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"H\n\rResourceLimit\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x0f\n\x07minimum\x18\x02 \x01(\x03\x12\x0f\n\x07maximum\x18\x03 \x01(\x03\"\xcc\x02\n\x13NodePoolAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\x12\x17\n\x0f\x61utoprovisioned\x18\x04 \x01(\x08\x12U\n\x0flocation_policy\x18\x05 \x01(\x0e\x32<.google.container.v1beta1.NodePoolAutoscaling.LocationPolicy\x12\x1c\n\x14total_min_node_count\x18\x06 \x01(\x05\x12\x1c\n\x14total_max_node_count\x18\x07 \x01(\x05\"H\n\x0eLocationPolicy\x12\x1f\n\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"\x97\x02\n\x10SetLabelsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\\\n\x0fresource_labels\x18\x04 \x03(\x0b\x32>.google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0\x41\x02\x12\x1e\n\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x14SetLegacyAbacRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x84\x01\n\x16StartIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x1a\n\x12rotate_credentials\x18\x07 \x01(\x08\"k\n\x19\x43ompleteIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xfc\x02\n\x11\x41\x63\x63\x65leratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x12+\n\x1fmax_time_shared_clients_per_gpu\x18\x04 \x01(\x03\x42\x02\x18\x01\x12K\n\x12gpu_sharing_config\x18\x05 \x01(\x0b\x32*.google.container.v1beta1.GPUSharingConfigH\x00\x88\x01\x01\x12\x62\n\x1egpu_driver_installation_config\x18\x06 \x01(\x0b\x32\x35.google.container.v1beta1.GPUDriverInstallationConfigH\x01\x88\x01\x01\x42\x15\n\x13_gpu_sharing_configB!\n\x1f_gpu_driver_installation_config\"\x88\x02\n\x10GPUSharingConfig\x12\"\n\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03\x12`\n\x14gpu_sharing_strategy\x18\x02 \x01(\x0e\x32=.google.container.v1beta1.GPUSharingConfig.GPUSharingStrategyH\x00\x88\x01\x01\"U\n\x12GPUSharingStrategy\x12$\n GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n\x0cTIME_SHARING\x10\x01\x12\x07\n\x03MPS\x10\x02\x42\x17\n\x15_gpu_sharing_strategy\"\x89\x02\n\x1bGPUDriverInstallationConfig\x12g\n\x12gpu_driver_version\x18\x01 \x01(\x0e\x32\x46.google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersionH\x00\x88\x01\x01\"j\n\x10GPUDriverVersion\x12\"\n\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n\x15INSTALLATION_DISABLED\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\n\n\x06LATEST\x10\x03\x42\x15\n\x13_gpu_driver_version\"z\n\x17ManagedPrometheusConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12N\n\x16\x61uto_monitoring_config\x18\x02 \x01(\x0b\x32..google.container.v1beta1.AutoMonitoringConfig\"\x8e\x01\n\x14\x41utoMonitoringConfig\x12\x43\n\x05scope\x18\x01 \x01(\x0e\x32\x34.google.container.v1beta1.AutoMonitoringConfig.Scope\"1\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x08\n\x04NONE\x10\x02\"\xcb\x02\n\x16WorkloadMetadataConfig\x12X\n\rnode_metadata\x18\x01 \x01(\x0e\x32=.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadataB\x02\x18\x01\x12\x43\n\x04mode\x18\x02 \x01(\x0e\x32\x35.google.container.v1beta1.WorkloadMetadataConfig.Mode\"P\n\x0cNodeMetadata\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06SECURE\x10\x01\x12\n\n\x06\x45XPOSE\x10\x02\x12\x17\n\x13GKE_METADATA_SERVER\x10\x03\"@\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCE_METADATA\x10\x01\x12\x10\n\x0cGKE_METADATA\x10\x02\"\xaf\x01\n\x17SetNetworkPolicyRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x44\n\x0enetwork_policy\x18\x04 \x01(\x0b\x32\'.google.container.v1beta1.NetworkPolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xbe\x01\n\x1bSetMaintenancePolicyRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12L\n\x12maintenance_policy\x18\x04 \x01(\x0b\x32+.google.container.v1beta1.MaintenancePolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"+\n\x14ListLocationsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"g\n\x15ListLocationsResponse\x12\x35\n\tlocations\x18\x01 \x03(\x0b\x32\".google.container.v1beta1.Location\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x08Location\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.container.v1beta1.Location.LocationType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0brecommended\x18\x03 \x01(\x08\"C\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04ZONE\x10\x01\x12\n\n\x06REGION\x10\x02\"\xe0\x02\n\x0fStatusCondition\x12@\n\x04\x63ode\x18\x01 \x01(\x0e\x32..google.container.v1beta1.StatusCondition.CodeB\x02\x18\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12(\n\x0e\x63\x61nonical_code\x18\x03 \x01(\x0e\x32\x10.google.rpc.Code\"\xcf\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cGCE_STOCKOUT\x10\x01\x12\x1f\n\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n\x13\x43LOUD_KMS_KEY_ERROR\x10\x07\x12\x0f\n\x0b\x43\x41_EXPIRING\x10\t\x12,\n(NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS\x10\n\x1a\x02\x18\x01\"\x92\x0b\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x1c\x65nable_intra_node_visibility\x18\x05 \x01(\x08\x12H\n\x13\x64\x65\x66\x61ult_snat_status\x18\x07 \x01(\x0b\x32+.google.container.v1beta1.DefaultSnatStatus\x12\x1f\n\x17\x65nable_l4ilb_subsetting\x18\n \x01(\x08\x12\x45\n\x11\x64\x61tapath_provider\x18\x0b \x01(\x0e\x32*.google.container.v1beta1.DatapathProvider\x12U\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32\x31.google.container.v1beta1.PrivateIPv6GoogleAccess\x12\x37\n\ndns_config\x18\r \x01(\x0b\x32#.google.container.v1beta1.DNSConfig\x12W\n\x1bservice_external_ips_config\x18\x0f \x01(\x0b\x32\x32.google.container.v1beta1.ServiceExternalIPsConfig\x12\x46\n\x12gateway_api_config\x18\x10 \x01(\x0b\x32*.google.container.v1beta1.GatewayAPIConfig\x12\x1f\n\x17\x65nable_multi_networking\x18\x11 \x01(\x08\x12k\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32G.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig\x12\'\n\x1a\x65nable_fqdn_network_policy\x18\x13 \x01(\x08H\x00\x88\x01\x01\x12^\n\x1cin_transit_encryption_config\x18\x14 \x01(\x0e\x32\x33.google.container.v1beta1.InTransitEncryptionConfigH\x01\x88\x01\x01\x12\x35\n(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\x08H\x02\x88\x01\x01\x12)\n\x1c\x64\x65\x66\x61ult_enable_private_nodes\x18\x16 \x01(\x08H\x03\x88\x01\x01\x12\x32\n%disable_l4_lb_firewall_reconciliation\x18\x18 \x01(\x08H\x04\x88\x01\x01\x1a\xe3\x01\n\x1f\x43lusterNetworkPerformanceConfig\x12v\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32L.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x1d\n\x1b_enable_fqdn_network_policyB\x1f\n\x1d_in_transit_encryption_configB+\n)_enable_cilium_clusterwide_network_policyB\x1f\n\x1d_default_enable_private_nodesB(\n&_disable_l4_lb_firewall_reconciliation\"\xc5\x01\n\x10GatewayAPIConfig\x12\x43\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x32.google.container.v1beta1.GatewayAPIConfig.Channel\"l\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HANNEL_DISABLED\x10\x01\x12\x1c\n\x14\x43HANNEL_EXPERIMENTAL\x10\x03\x1a\x02\x08\x01\x12\x14\n\x10\x43HANNEL_STANDARD\x10\x04\"+\n\x18ServiceExternalIPsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"j\n\x1cListUsableSubnetworksRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"y\n\x1dListUsableSubnetworksResponse\x12?\n\x0bsubnetworks\x18\x01 \x03(\x0b\x32*.google.container.v1beta1.UsableSubnetwork\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x85\x02\n\x1eUsableSubnetworkSecondaryRange\x12\x12\n\nrange_name\x18\x01 \x01(\t\x12\x15\n\rip_cidr_range\x18\x02 \x01(\t\x12O\n\x06status\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.UsableSubnetworkSecondaryRange.Status\"g\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x12\n\x0eIN_USE_SERVICE\x10\x02\x12\x18\n\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n\x12IN_USE_MANAGED_POD\x10\x04\"\xbd\x01\n\x10UsableSubnetwork\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12U\n\x13secondary_ip_ranges\x18\x04 \x03(\x0b\x32\x38.google.container.v1beta1.UsableSubnetworkSecondaryRange\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\")\n\x16VerticalPodAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x11\x44\x65\x66\x61ultSnatStatus\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x19IntraNodeVisibilityConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"&\n\x13ILBSubsettingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x03\n\tDNSConfig\x12\x41\n\x0b\x63luster_dns\x18\x01 \x01(\x0e\x32,.google.container.v1beta1.DNSConfig.Provider\x12G\n\x11\x63luster_dns_scope\x18\x02 \x01(\x0e\x32,.google.container.v1beta1.DNSConfig.DNSScope\x12\x1a\n\x12\x63luster_dns_domain\x18\x03 \x01(\t\x12*\n\x1d\x61\x64\x64itive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n\x10PLATFORM_DEFAULT\x10\x01\x12\r\n\tCLOUD_DNS\x10\x02\x12\x0c\n\x08KUBE_DNS\x10\x03\"G\n\x08\x44NSScope\x12\x19\n\x15\x44NS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rCLUSTER_SCOPE\x10\x01\x12\r\n\tVPC_SCOPE\x10\x02\".\n\x11MaxPodsConstraint\x12\x19\n\x11max_pods_per_node\x18\x01 \x01(\x03\"j\n\x16WorkloadIdentityConfig\x12\x1e\n\x12identity_namespace\x18\x01 \x01(\tB\x02\x18\x01\x12\x15\n\rworkload_pool\x18\x02 \x01(\t\x12\x19\n\x11identity_provider\x18\x03 \x01(\t\"E\n\x12WorkloadALTSConfig\x12/\n\x0b\x65nable_alts\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"O\n\x14WorkloadCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"K\n\x10MeshCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"\xf2\x05\n\x12\x44\x61tabaseEncryption\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32\x32.google.container.v1beta1.DatabaseEncryption.State\x12Z\n\rcurrent_state\x18\x03 \x01(\x0e\x32\x39.google.container.v1beta1.DatabaseEncryption.CurrentStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x63ryption_keys\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12_\n\x15last_operation_errors\x18\x05 \x03(\x0b\x32;.google.container.v1beta1.DatabaseEncryption.OperationErrorB\x03\xe0\x41\x03\x1ah\n\x0eOperationError\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"2\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tENCRYPTED\x10\x01\x12\r\n\tDECRYPTED\x10\x02\"\xfb\x01\n\x0c\x43urrentState\x12\x1d\n\x19\x43URRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43URRENT_STATE_ENCRYPTED\x10\x07\x12\x1b\n\x17\x43URRENT_STATE_DECRYPTED\x10\x02\x12$\n CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n\x1e\x43URRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n\x1e\x43URRENT_STATE_DECRYPTION_ERROR\x10\x06\x42\x10\n\x0e_current_state\"\xf7\x02\n\x19ResourceUsageExportConfig\x12\x65\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32G.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination\x12&\n\x1e\x65nable_network_egress_metering\x18\x02 \x01(\x08\x12r\n\x1b\x63onsumption_metering_config\x18\x03 \x01(\x0b\x32M.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig\x1a)\n\x13\x42igQueryDestination\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a,\n\x19\x43onsumptionMeteringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\" \n\rShieldedNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nVirtualNIC\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nFastSocket\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x16GetOpenIDConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"\xdf\x02\n\x17GetOpenIDConfigResponse\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x1a\n\x08jwks_uri\x18\x02 \x01(\tR\x08jwks_uri\x12:\n\x18response_types_supported\x18\x03 \x03(\tR\x18response_types_supported\x12\x38\n\x17subject_types_supported\x18\x04 \x03(\tR\x17subject_types_supported\x12T\n%id_token_signing_alg_values_supported\x18\x05 \x03(\tR%id_token_signing_alg_values_supported\x12*\n\x10\x63laims_supported\x18\x06 \x03(\tR\x10\x63laims_supported\x12 \n\x0bgrant_types\x18\x07 \x03(\tR\x0bgrant_types\"\'\n\x15GetJSONWebKeysRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"r\n\x03Jwk\x12\x0b\n\x03kty\x18\x01 \x01(\t\x12\x0b\n\x03\x61lg\x18\x02 \x01(\t\x12\x0b\n\x03use\x18\x03 \x01(\t\x12\x0b\n\x03kid\x18\x04 \x01(\t\x12\t\n\x01n\x18\x05 \x01(\t\x12\t\n\x01\x65\x18\x06 \x01(\t\x12\t\n\x01x\x18\x07 \x01(\t\x12\t\n\x01y\x18\x08 \x01(\t\x12\x0b\n\x03\x63rv\x18\t \x01(\t\"E\n\x16GetJSONWebKeysResponse\x12+\n\x04keys\x18\x01 \x03(\x0b\x32\x1d.google.container.v1beta1.Jwk\"2\n\"CheckAutopilotCompatibilityRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x81\x03\n\x1b\x41utopilotCompatibilityIssue\x12\x34\n\x10last_observation\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onstraint_type\x18\x02 \x01(\t\x12]\n\x14incompatibility_type\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.AutopilotCompatibilityIssue.IssueType\x12\x10\n\x08subjects\x18\x04 \x03(\t\x12\x19\n\x11\x64ocumentation_url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"r\n\tIssueType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n\x1a\x41\x44\x44ITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"}\n#CheckAutopilotCompatibilityResponse\x12\x45\n\x06issues\x18\x01 \x03(\x0b\x32\x35.google.container.v1beta1.AutopilotCompatibilityIssue\x12\x0f\n\x07summary\x18\x02 \x01(\t\"\xa1\x01\n\x0eReleaseChannel\x12\x41\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.ReleaseChannel.Channel\"L\n\x07\x43hannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05RAPID\x10\x01\x12\x0b\n\x07REGULAR\x10\x02\x12\n\n\x06STABLE\x10\x03\x12\x0c\n\x08\x45XTENDED\x10\x04\"\'\n\x14\x43ostManagementConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"Y\n\tTpuConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x16use_service_networking\x18\x02 \x01(\x08\x12\x17\n\x0fipv4_cidr_block\x18\x03 \x01(\t:\x02\x18\x01\"\x08\n\x06Master\"\x94\x01\n\x19\x41utopilotConversionStatus\x12M\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.container.v1beta1.AutopilotConversionStatus.StateB\x03\xe0\x41\x03\"(\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44ONE\x10\x05\"\xc1\x01\n\tAutopilot\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12N\n\x16workload_policy_config\x18\x02 \x01(\x0b\x32..google.container.v1beta1.WorkloadPolicyConfig\x12S\n\x11\x63onversion_status\x18\x03 \x01(\x0b\x32\x33.google.container.v1beta1.AutopilotConversionStatusB\x03\xe0\x41\x03\"\xac\x01\n\x14WorkloadPolicyConfig\x12\x1c\n\x0f\x61llow_net_admin\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x35\n(autopilot_compatibility_auditing_enabled\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_allow_net_adminB+\n)_autopilot_compatibility_auditing_enabled\"\xd0\x03\n\x12NotificationConfig\x12\x43\n\x06pubsub\x18\x01 \x01(\x0b\x32\x33.google.container.v1beta1.NotificationConfig.PubSub\x1a\x8f\x01\n\x06PubSub\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x43\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x33.google.container.v1beta1.NotificationConfig.Filter\x1aT\n\x06\x46ilter\x12J\n\nevent_type\x18\x01 \x03(\x0e\x32\x36.google.container.v1beta1.NotificationConfig.EventType\"\x8c\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n\rUPGRADE_EVENT\x10\x02\x12\x1b\n\x17SECURITY_BULLETIN_EVENT\x10\x03\x12\x16\n\x12UPGRADE_INFO_EVENT\x10\x04\"\xf5\x01\n\x11\x43onfidentialNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12h\n\x1a\x63onfidential_instance_type\x18\x02 \x01(\x0e\x32\x44.google.container.v1beta1.ConfidentialNodes.ConfidentialInstanceType\"e\n\x18\x43onfidentialInstanceType\x12*\n&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SEV\x10\x01\x12\x0b\n\x07SEV_SNP\x10\x02\x12\x07\n\x03TDX\x10\x03\"\xe4\x01\n\x0cUpgradeEvent\x12\x44\n\rresource_type\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x38\n\x14operation_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x10\n\x08resource\x18\x06 \x01(\t\"\xc1\x06\n\x10UpgradeInfoEvent\x12\x44\n\rresource_type\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x05 \x01(\t\x12\x16\n\x0etarget_version\x18\x06 \x01(\t\x12\x10\n\x08resource\x18\x07 \x01(\t\x12\x44\n\x05state\x18\x08 \x01(\x0e\x32\x30.google.container.v1beta1.UpgradeInfoEvent.StateB\x03\xe0\x41\x03\x12\x42\n\x19standard_support_end_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x42\n\x19\x65xtended_support_end_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\x12H\n\nevent_type\x18\x0c \x01(\x0e\x32\x34.google.container.v1beta1.UpgradeInfoEvent.EventType\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06\"t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45ND_OF_SUPPORT\x10\x01\x12 \n\x1c\x43OS_MILESTONE_VERSION_UPDATE\x10\x02\x12\x15\n\x11UPGRADE_LIFECYCLE\x10\x03\x42\x1c\n\x1a_standard_support_end_timeB\x1c\n\x1a_extended_support_end_time\"\x88\x02\n\x15UpgradeAvailableEvent\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x44\n\rresource_type\x18\x02 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x41\n\x0frelease_channel\x18\x03 \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x43\n\x10windows_versions\x18\x05 \x01(\x0b\x32).google.container.v1beta1.WindowsVersions\"\xba\x02\n\x15SecurityBulletinEvent\x12\x1e\n\x16resource_type_affected\x18\x01 \x01(\t\x12\x13\n\x0b\x62ulletin_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ve_ids\x18\x03 \x03(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x14\n\x0c\x62ulletin_uri\x18\x05 \x01(\t\x12\x19\n\x11\x62rief_description\x18\x06 \x01(\t\x12!\n\x19\x61\x66\x66\x65\x63ted_supported_minors\x18\x07 \x03(\t\x12\x18\n\x10patched_versions\x18\x08 \x03(\t\x12 \n\x18suggested_upgrade_target\x18\t \x01(\t\x12\x1d\n\x15manual_steps_required\x18\n \x01(\x08\x12\x1a\n\x12mitigated_versions\x18\x0b \x03(\t\"(\n\x15IdentityServiceConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"[\n\rLoggingConfig\x12J\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32\x30.google.container.v1beta1.LoggingComponentConfig\"\xa3\x02\n\x16LoggingComponentConfig\x12U\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32:.google.container.v1beta1.LoggingComponentConfig.Component\"\xb1\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tWORKLOADS\x10\x02\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0c\n\x08KCP_SSHD\x10\x07\x12\x12\n\x0eKCP_CONNECTION\x10\x08\x12\x0b\n\x07KCP_HPA\x10\t\"*\n\x17RayClusterLoggingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xa6\x02\n\x10MonitoringConfig\x12M\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32\x33.google.container.v1beta1.MonitoringComponentConfig\x12T\n\x19managed_prometheus_config\x18\x02 \x01(\x0b\x32\x31.google.container.v1beta1.ManagedPrometheusConfig\x12m\n&advanced_datapath_observability_config\x18\x03 \x01(\x0b\x32=.google.container.v1beta1.AdvancedDatapathObservabilityConfig\"\xa3\x02\n#AdvancedDatapathObservabilityConfig\x12\x16\n\x0e\x65nable_metrics\x18\x01 \x01(\x08\x12[\n\nrelay_mode\x18\x02 \x01(\x0e\x32G.google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode\x12\x19\n\x0c\x65nable_relay\x18\x03 \x01(\x08H\x00\x88\x01\x01\"[\n\tRelayMode\x12\x1a\n\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n\x0b\x45XTERNAL_LB\x10\x04\x42\x0f\n\r_enable_relay\"-\n\x1aRayClusterMonitoringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"_\n\x15NodePoolLoggingConfig\x12\x46\n\x0evariant_config\x18\x01 \x01(\x0b\x32..google.container.v1beta1.LoggingVariantConfig\"\xa4\x01\n\x14LoggingVariantConfig\x12G\n\x07variant\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.LoggingVariantConfig.Variant\"C\n\x07Variant\x12\x17\n\x13VARIANT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x12\n\x0eMAX_THROUGHPUT\x10\x02\"\xfe\x02\n\x19MonitoringComponentConfig\x12X\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32=.google.container.v1beta1.MonitoringComponentConfig.Component\"\x86\x02\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\x11\n\tWORKLOADS\x10\x02\x1a\x02\x08\x01\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0b\n\x07STORAGE\x10\x07\x12\x07\n\x03HPA\x10\x08\x12\x07\n\x03POD\x10\t\x12\r\n\tDAEMONSET\x10\n\x12\x0e\n\nDEPLOYMENT\x10\x0b\x12\x0f\n\x0bSTATEFULSET\x10\x0c\x12\x0c\n\x08\x43\x41\x44VISOR\x10\r\x12\x0b\n\x07KUBELET\x10\x0e\x12\x08\n\x04\x44\x43GM\x10\x0f\x12\n\n\x06JOBSET\x10\x10\"\xb5\x01\n\x0ePodAutoscaling\x12M\n\x0bhpa_profile\x18\x02 \x01(\x0e\x32\x33.google.container.v1beta1.PodAutoscaling.HPAProfileH\x00\x88\x01\x01\"D\n\nHPAProfile\x12\x1b\n\x17HPA_PROFILE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0f\n\x0bPERFORMANCE\x10\x02\x42\x0e\n\x0c_hpa_profile\"N\n\x05\x46leet\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x17\n\nmembership\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0epre_registered\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\xbb\x05\n\x1b\x43ontrolPlaneEndpointsConfig\x12\x64\n\x13\x64ns_endpoint_config\x18\x01 \x01(\x0b\x32G.google.container.v1beta1.ControlPlaneEndpointsConfig.DNSEndpointConfig\x12\x64\n\x13ip_endpoints_config\x18\x03 \x01(\x0b\x32G.google.container.v1beta1.ControlPlaneEndpointsConfig.IPEndpointsConfig\x1aj\n\x11\x44NSEndpointConfig\x12\x15\n\x08\x65ndpoint\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61llow_external_traffic\x18\x03 \x01(\x08H\x00\x88\x01\x01\x42\x19\n\x17_allow_external_traffic\x1a\xe3\x02\n\x11IPEndpointsConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x65nable_public_endpoint\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\rglobal_access\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\\\n\x1a\x61uthorized_networks_config\x18\x04 \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfig\x12\x1c\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10private_endpoint\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1bprivate_endpoint_subnetwork\x18\x07 \x01(\tB\n\n\x08_enabledB\x19\n\x17_enable_public_endpointB\x10\n\x0e_global_access\"\x89\x01\n\x13ResourceManagerTags\x12\x45\n\x04tags\x18\x01 \x03(\x0b\x32\x37.google.container.v1beta1.ResourceManagerTags.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfe\x01\n\x10\x45nterpriseConfig\x12Q\n\x0c\x63luster_tier\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTierB\x03\xe0\x41\x03\x12L\n\x0c\x64\x65sired_tier\x18\x02 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTier\"I\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\"\xad\x02\n\x13SecretManagerConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12Z\n\x0frotation_config\x18\x02 \x01(\x0b\x32<.google.container.v1beta1.SecretManagerConfig.RotationConfigH\x01\x88\x01\x01\x1a\x83\x01\n\x0eRotationConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n\x11rotation_interval\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_rotation_intervalB\n\n\x08_enabledB\x12\n\x10_rotation_config\"\xa0\x01\n\x11SecondaryBootDisk\x12>\n\x04mode\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.SecondaryBootDisk.Mode\x12\x12\n\ndisk_image\x18\x02 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONTAINER_IMAGE_CACHE\x10\x01\"!\n\x1fSecondaryBootDiskUpdateStrategy\"D\n\x1e\x46\x65tchClusterUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xa4\x07\n\x12\x43lusterUpgradeInfo\x12!\n\x14minor_target_version\x18\x07 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x08 \x01(\tH\x01\x88\x01\x01\x12[\n\x13\x61uto_upgrade_status\x18\x02 \x03(\x0e\x32>.google.container.v1beta1.ClusterUpgradeInfo.AutoUpgradeStatus\x12[\n\rpaused_reason\x18\x03 \x03(\x0e\x32\x44.google.container.v1beta1.ClusterUpgradeInfo.AutoUpgradePausedReason\x12\x41\n\x0fupgrade_details\x18\x04 \x03(\x0b\x32(.google.container.v1beta1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x05 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x06 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x04\x12\x12\n\x0eUPGRADE_PAUSED\x10\x05\"\x90\x02\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x05\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x06\x12\x1d\n\x19\x43LUSTER_DISRUPTION_BUDGET\x10\x04\x12+\n\'CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE\x10\x07\x12\x11\n\rSYSTEM_CONFIG\x10\x08\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp\"\xe1\x03\n\x0eUpgradeDetails\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.container.v1beta1.UpgradeDetails.StateB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x17\n\x0finitial_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x46\n\nstart_type\x18\x06 \x01(\x0e\x32\x32.google.container.v1beta1.UpgradeDetails.StartType\"J\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\"B\n\tStartType\x12\x1a\n\x16START_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\x42\r\n\x0b_start_timeB\x0b\n\t_end_time\"E\n\x1f\x46\x65tchNodePoolUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xdb\x06\n\x13NodePoolUpgradeInfo\x12!\n\x14minor_target_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\\\n\x13\x61uto_upgrade_status\x18\x03 \x03(\x0e\x32?.google.container.v1beta1.NodePoolUpgradeInfo.AutoUpgradeStatus\x12\\\n\rpaused_reason\x18\x04 \x03(\x0e\x32\x45.google.container.v1beta1.NodePoolUpgradeInfo.AutoUpgradePausedReason\x12\x41\n\x0fupgrade_details\x18\x05 \x03(\x0b\x32(.google.container.v1beta1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x06 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x07 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x02\x12\x12\n\x0eUPGRADE_PAUSED\x10\x03\"\xc4\x01\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x02\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x03\x12\x11\n\rSYSTEM_CONFIG\x10\x04\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp*\xc6\x01\n\x17PrivateIPv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\'\n#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n\x13UpgradeResourceType\x12%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MASTER\x10\x01\x12\r\n\tNODE_POOL\x10\x02*^\n\x16NodePoolUpdateStrategy\x12)\n%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nBLUE_GREEN\x10\x02\x12\t\n\x05SURGE\x10\x03*a\n\x10\x44\x61tapathProvider\x12!\n\x1d\x44\x41TAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n\x11\x41\x44VANCED_DATAPATH\x10\x02*@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02*\x9f\x01\n\x19InTransitEncryptionConfig\x12,\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x30\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x02\x32\x95S\n\x0e\x43lusterManager\x12\xf3\x01\n\x0cListClusters\x12-.google.container.v1beta1.ListClustersRequest\x1a..google.container.v1beta1.ListClustersResponse\"\x83\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02k\x12\x31/v1beta1/{parent=projects/*/locations/*}/clustersZ6\x12\x34/v1beta1/projects/{project_id}/zones/{zone}/clusters\x12\xfa\x01\n\nGetCluster\x12+.google.container.v1beta1.GetClusterRequest\x1a!.google.container.v1beta1.Cluster\"\x9b\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02x\x12\x31/v1beta1/{name=projects/*/locations/*/clusters/*}ZC\x12\x41/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}\x12\xf8\x01\n\rCreateCluster\x12..google.container.v1beta1.CreateClusterRequest\x1a#.google.container.v1beta1.Operation\"\x91\x01\xda\x41\x17project_id,zone,cluster\x82\xd3\xe4\x93\x02q\"1/v1beta1/{parent=projects/*/locations/*}/clusters:\x01*Z9\"4/v1beta1/projects/{project_id}/zones/{zone}/clusters:\x01*\x12\x8f\x02\n\rUpdateCluster\x12..google.container.v1beta1.UpdateClusterRequest\x1a#.google.container.v1beta1.Operation\"\xa8\x01\xda\x41!project_id,zone,cluster_id,update\x82\xd3\xe4\x93\x02~\x1a\x31/v1beta1/{name=projects/*/locations/*/clusters/*}:\x01*ZF\x1a\x41/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:\x01*\x12\x9a\x02\n\x0eUpdateNodePool\x12/.google.container.v1beta1.UpdateNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xb1\x01\x82\xd3\xe4\x93\x02\xaa\x01\x1a=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:\x01*Zf\"a/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update:\x01*\x12\xbe\x02\n\x16SetNodePoolAutoscaling\x12\x37.google.container.v1beta1.SetNodePoolAutoscalingRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\x82\xd3\xe4\x93\x02\xbe\x01\"L/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling:\x01*Zk\"f/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling:\x01*\x12\xb4\x02\n\x11SetLoggingService\x12\x32.google.container.v1beta1.SetLoggingServiceRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\xda\x41*project_id,zone,cluster_id,logging_service\x82\xd3\xe4\x93\x02\x91\x01\"/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations:\x01*ZP\"K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations:\x01*\x12\xaa\x02\n\x0cUpdateMaster\x12-.google.container.v1beta1.UpdateMasterRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\xda\x41)project_id,zone,cluster_id,master_version\x82\xd3\xe4\x93\x02\x92\x01\">/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster:\x01*ZM\"H/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master:\x01*\x12\x88\x02\n\rSetMasterAuth\x12..google.container.v1beta1.SetMasterAuthRequest\x1a#.google.container.v1beta1.Operation\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"?/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth:\x01*ZT\"O/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth:\x01*\x12\x82\x02\n\rDeleteCluster\x12..google.container.v1beta1.DeleteClusterRequest\x1a#.google.container.v1beta1.Operation\"\x9b\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02x*1/v1beta1/{name=projects/*/locations/*/clusters/*}ZC*A/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}\x12\xfd\x01\n\x0eListOperations\x12/.google.container.v1beta1.ListOperationsRequest\x1a\x30.google.container.v1beta1.ListOperationsResponse\"\x87\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02o\x12\x33/v1beta1/{parent=projects/*/locations/*}/operationsZ8\x12\x36/v1beta1/projects/{project_id}/zones/{zone}/operations\x12\x88\x02\n\x0cGetOperation\x12-.google.container.v1beta1.GetOperationRequest\x1a#.google.container.v1beta1.Operation\"\xa3\x01\xda\x41\x1cproject_id,zone,operation_id\x82\xd3\xe4\x93\x02~\x12\x33/v1beta1/{name=projects/*/locations/*/operations/*}ZG\x12\x45/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}\x12\x96\x02\n\x0f\x43\x61ncelOperation\x12\x30.google.container.v1beta1.CancelOperationRequest\x1a\x16.google.protobuf.Empty\"\xb8\x01\xda\x41\x1cproject_id,zone,operation_id\x82\xd3\xe4\x93\x02\x92\x01\":/v1beta1/{name=projects/*/locations/*/operations/*}:cancel:\x01*ZQ\"L/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel:\x01*\x12\xf7\x01\n\x0fGetServerConfig\x12\x30.google.container.v1beta1.GetServerConfigRequest\x1a&.google.container.v1beta1.ServerConfig\"\x89\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02q\x12\x33/v1beta1/{name=projects/*/locations/*}/serverConfigZ:\x12\x38/v1beta1/projects/{project_id}/zones/{zone}/serverconfig\x12\xb5\x01\n\x0eGetJSONWebKeys\x12/.google.container.v1beta1.GetJSONWebKeysRequest\x1a\x30.google.container.v1beta1.GetJSONWebKeysResponse\"@\x82\xd3\xe4\x93\x02:\x12\x38/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks\x12\xa5\x02\n\rListNodePools\x12..google.container.v1beta1.ListNodePoolsRequest\x1a/.google.container.v1beta1.ListNodePoolsResponse\"\xb2\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02\x8e\x01\x12=/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePoolsZM\x12K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools\x12\xb0\x02\n\x0bGetNodePool\x12,.google.container.v1beta1.GetNodePoolRequest\x1a\".google.container.v1beta1.NodePool\"\xce\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\x9d\x01\x12=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}Z\\\x12Z/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}\x12\xab\x02\n\x0e\x43reateNodePool\x12/.google.container.v1beta1.CreateNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xc2\x01\xda\x41$project_id,zone,cluster_id,node_pool\x82\xd3\xe4\x93\x02\x94\x01\"=/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools:\x01*ZP\"K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools:\x01*\x12\xb7\x02\n\x0e\x44\x65leteNodePool\x12/.google.container.v1beta1.DeleteNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xce\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\x9d\x01*=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}Z\\*Z/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}\x12\xc5\x01\n\x17\x43ompleteNodePoolUpgrade\x12\x38.google.container.v1beta1.CompleteNodePoolUpgradeRequest\x1a\x16.google.protobuf.Empty\"X\x82\xd3\xe4\x93\x02R\"M/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade:\x01*\x12\xe1\x02\n\x17RollbackNodePoolUpgrade\x12\x38.google.container.v1beta1.RollbackNodePoolUpgradeRequest\x1a#.google.container.v1beta1.Operation\"\xe6\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\xb5\x01\"F/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback:\x01*Zh\"c/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback:\x01*\x12\xf2\x02\n\x15SetNodePoolManagement\x12\x36.google.container.v1beta1.SetNodePoolManagementRequest\x1a#.google.container.v1beta1.Operation\"\xfb\x01\xda\x41\x32project_id,zone,cluster_id,node_pool_id,management\x82\xd3\xe4\x93\x02\xbf\x01\"K/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement:\x01*Zm\"h/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement:\x01*\x12\xc4\x02\n\tSetLabels\x12*.google.container.v1beta1.SetLabelsRequest\x1a#.google.container.v1beta1.Operation\"\xe5\x01\xda\x41\n\x0b\x66\x61st_socket\x18$ \x01(\x0b\x32$.google.container.v1beta1.FastSocketH\x00\x88\x01\x01\x12Q\n\x0fresource_labels\x18% \x03(\x0b\x32\x38.google.container.v1beta1.NodeConfig.ResourceLabelsEntry\x12G\n\x0elogging_config\x18& \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12H\n\x13windows_node_config\x18\' \x01(\x0b\x32+.google.container.v1beta1.WindowsNodeConfig\x12V\n\x1blocal_nvme_ssd_block_config\x18( \x01(\x0b\x32\x31.google.container.v1beta1.LocalNvmeSsdBlockConfig\x12\x64\n\"ephemeral_storage_local_ssd_config\x18) \x01(\x0b\x32\x38.google.container.v1beta1.EphemeralStorageLocalSsdConfig\x12\x46\n\x12sole_tenant_config\x18* \x01(\x0b\x32*.google.container.v1beta1.SoleTenantConfig\x12\x45\n\x11\x63ontainerd_config\x18+ \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12P\n\x17host_maintenance_policy\x18, \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12L\n\x15resource_manager_tags\x18- \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12(\n\x1b\x65nable_confidential_storage\x18. \x01(\x08\x42\x03\xe0\x41\x01\x12I\n\x14secondary_boot_disks\x18\x30 \x03(\x0b\x32+.google.container.v1beta1.SecondaryBootDisk\x12\x15\n\rstorage_pools\x18\x31 \x03(\t\x12k\n#secondary_boot_disk_update_strategy\x18\x32 \x01(\x0b\x32\x39.google.container.v1beta1.SecondaryBootDiskUpdateStrategyH\x01\x88\x01\x01\x12\x33\n\x10max_run_duration\x18\x35 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x63\n\x19local_ssd_encryption_mode\x18\x36 \x01(\x0e\x32;.google.container.v1beta1.NodeConfig.LocalSsdEncryptionModeH\x02\x88\x01\x01\x12\\\n\x15\x65\x66\x66\x65\x63tive_cgroup_mode\x18\x37 \x01(\x0e\x32\x38.google.container.v1beta1.NodeConfig.EffectiveCgroupModeB\x03\xe0\x41\x03\x12\x17\n\nflex_start\x18\x38 \x01(\x08H\x03\x88\x01\x01\x12\x35\n\tboot_disk\x18\x39 \x01(\x0b\x32\".google.container.v1beta1.BootDisk\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"z\n\x16LocalSsdEncryptionMode\x12)\n%LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_ENCRYPTION\x10\x01\x12\x1c\n\x18\x45PHEMERAL_KEY_ENCRYPTION\x10\x02\"x\n\x13\x45\x66\x66\x65\x63tiveCgroupMode\x12%\n!EFFECTIVE_CGROUP_MODE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V1\x10\x01\x12\x1c\n\x18\x45\x46\x46\x45\x43TIVE_CGROUP_MODE_V2\x10\x02\x42\x0e\n\x0c_fast_socketB&\n$_secondary_boot_disk_update_strategyB\x1c\n\x1a_local_ssd_encryption_modeB\r\n\x0b_flex_start\"\xa9\x03\n\x17\x41\x64vancedMachineFeatures\x12\x1d\n\x10threads_per_core\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12u\n\x1bperformance_monitoring_unit\x18\x03 \x01(\x0e\x32K.google.container.v1beta1.AdvancedMachineFeatures.PerformanceMonitoringUnitH\x02\x88\x01\x01\"w\n\x19PerformanceMonitoringUnit\x12+\n\'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\x00\x12\x11\n\rARCHITECTURAL\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08\x45NHANCED\x10\x03\x42\x13\n\x11_threads_per_coreB\x1f\n\x1d_enable_nested_virtualizationB\x1e\n\x1c_performance_monitoring_unit\"\x86\x08\n\x11NodeNetworkConfig\x12\x1d\n\x10\x63reate_pod_range\x18\x04 \x01(\x08\x42\x03\xe0\x41\x04\x12\x11\n\tpod_range\x18\x05 \x01(\t\x12\x1b\n\x13pod_ipv4_cidr_block\x18\x06 \x01(\t\x12!\n\x14\x65nable_private_nodes\x18\t \x01(\x08H\x00\x88\x01\x01\x12m\n\x1anetwork_performance_config\x18\x0b \x01(\x0b\x32\x44.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfigH\x01\x88\x01\x01\x12[\n\x1dpod_cidr_overprovision_config\x18\r \x01(\x0b\x32\x34.google.container.v1beta1.PodCIDROverprovisionConfig\x12^\n\x1f\x61\x64\x64itional_node_network_configs\x18\x0e \x03(\x0b\x32\x35.google.container.v1beta1.AdditionalNodeNetworkConfig\x12\\\n\x1e\x61\x64\x64itional_pod_network_configs\x18\x0f \x03(\x0b\x32\x34.google.container.v1beta1.AdditionalPodNetworkConfig\x12\'\n\x1apod_ipv4_range_utilization\x18\x10 \x01(\x01\x42\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x13 \x01(\tB\x03\xe0\x41\x03\x1a\xfa\x02\n\x18NetworkPerformanceConfig\x12s\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32I.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x00\x88\x01\x01\x12y\n!external_ip_egress_bandwidth_tier\x18\x02 \x01(\x0e\x32I.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.TierH\x01\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB$\n\"_external_ip_egress_bandwidth_tierB\x17\n\x15_enable_private_nodesB\x1d\n\x1b_network_performance_config\"B\n\x1b\x41\x64\x64itionalNodeNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\"\xb0\x01\n\x1a\x41\x64\x64itionalPodNetworkConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1b\n\x13secondary_pod_range\x18\x02 \x01(\t\x12K\n\x11max_pods_per_node\x18\x03 \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraintH\x00\x88\x01\x01\x42\x14\n\x12_max_pods_per_node\"Y\n\x16ShieldedInstanceConfig\x12\x1a\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x12#\n\x1b\x65nable_integrity_monitoring\x18\x02 \x01(\x08\"\x8a\x01\n\rSandboxConfig\x12\x18\n\x0csandbox_type\x18\x01 \x01(\tB\x02\x18\x01\x12:\n\x04type\x18\x02 \x01(\x0e\x32,.google.container.v1beta1.SandboxConfig.Type\"#\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06GVISOR\x10\x01\"1\n\x16\x45phemeralStorageConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"2\n\x17LocalNvmeSsdBlockConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\"S\n\x1e\x45phemeralStorageLocalSsdConfig\x12\x17\n\x0flocal_ssd_count\x18\x01 \x01(\x05\x12\x18\n\x10\x64\x61ta_cache_count\x18\x02 \x01(\x05\"\x1d\n\nGcfsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xe4\x01\n\x13ReservationAffinity\x12T\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32\x32.google.container.v1beta1.ReservationAffinity.Type\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"Z\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\"\xd3\x02\n\x10SoleTenantConfig\x12P\n\x0fnode_affinities\x18\x01 \x03(\x0b\x32\x37.google.container.v1beta1.SoleTenantConfig.NodeAffinity\x12\x1f\n\rmin_node_cpus\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\xb9\x01\n\x0cNodeAffinity\x12\x0b\n\x03key\x18\x01 \x01(\t\x12R\n\x08operator\x18\x02 \x01(\x0e\x32@.google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator\x12\x0e\n\x06values\x18\x03 \x03(\t\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x10\n\x0e_min_node_cpus\"\x8b\x05\n\x10\x43ontainerdConfig\x12n\n\x1eprivate_registry_access_config\x18\x01 \x01(\x0b\x32\x46.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig\x1a\x86\x04\n\x1bPrivateRegistryAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x94\x01\n#certificate_authority_domain_config\x18\x02 \x03(\x0b\x32g.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig\x1a\xbe\x02\n CertificateAuthorityDomainConfig\x12\r\n\x05\x66qdns\x18\x01 \x03(\t\x12\xbb\x01\n%gcp_secret_manager_certificate_config\x18\x02 \x01(\x0b\x32\x89\x01.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigH\x00\x1a\x37\n!GCPSecretManagerCertificateConfig\x12\x12\n\nsecret_uri\x18\x01 \x01(\tB\x14\n\x12\x63\x65rtificate_config\"\xad\x05\n\x15HostMaintenancePolicy\x12\x66\n\x14maintenance_interval\x18\x01 \x01(\x0e\x32\x43.google.container.v1beta1.HostMaintenancePolicy.MaintenanceIntervalH\x01\x88\x01\x01\x12~\n\"opportunistic_maintenance_strategy\x18\x02 \x01(\x0b\x32P.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategyH\x00\x1a\xa0\x02\n OpportunisticMaintenanceStrategy\x12=\n\x15node_idle_time_window\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x12G\n\x1fmaintenance_availability_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x12\x1f\n\x12min_nodes_per_pool\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x18\n\x16_node_idle_time_windowB\"\n _maintenance_availability_windowB\x15\n\x13_min_nodes_per_pool\"X\n\x13MaintenanceInterval\x12$\n MAINTENANCE_INTERVAL_UNSPECIFIED\x10\x00\x12\r\n\tAS_NEEDED\x10\x01\x12\x0c\n\x08PERIODIC\x10\x02\x42\x16\n\x14maintenance_strategyB\x17\n\x15_maintenance_interval\"\xbe\x01\n\tNodeTaint\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12:\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32*.google.container.v1beta1.NodeTaint.Effect\"Y\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNO_SCHEDULE\x10\x01\x12\x16\n\x12PREFER_NO_SCHEDULE\x10\x02\x12\x0e\n\nNO_EXECUTE\x10\x03\"A\n\nNodeTaints\x12\x33\n\x06taints\x18\x01 \x03(\x0b\x32#.google.container.v1beta1.NodeTaint\"}\n\nNodeLabels\x12@\n\x06labels\x18\x01 \x03(\x0b\x32\x30.google.container.v1beta1.NodeLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x0eResourceLabels\x12\x44\n\x06labels\x18\x01 \x03(\x0b\x32\x34.google.container.v1beta1.ResourceLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x0bNetworkTags\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\xed\x01\n\nMasterAuth\x12\x14\n\x08username\x18\x01 \x01(\tB\x02\x18\x01\x12\x14\n\x08password\x18\x02 \x01(\tB\x02\x18\x01\x12T\n\x19\x63lient_certificate_config\x18\x03 \x01(\x0b\x32\x31.google.container.v1beta1.ClientCertificateConfig\x12#\n\x16\x63luster_ca_certificate\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63lient_certificate\x18\x65 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nclient_key\x18\x66 \x01(\tB\x03\xe0\x41\x03\";\n\x17\x43lientCertificateConfig\x12 \n\x18issue_client_certificate\x18\x01 \x01(\x08\"\xcc\x0b\n\x0c\x41\x64\x64onsConfig\x12H\n\x13http_load_balancing\x18\x01 \x01(\x0b\x32+.google.container.v1beta1.HttpLoadBalancing\x12V\n\x1ahorizontal_pod_autoscaling\x18\x02 \x01(\x0b\x32\x32.google.container.v1beta1.HorizontalPodAutoscaling\x12O\n\x14kubernetes_dashboard\x18\x03 \x01(\x0b\x32-.google.container.v1beta1.KubernetesDashboardB\x02\x18\x01\x12L\n\x15network_policy_config\x18\x04 \x01(\x0b\x32-.google.container.v1beta1.NetworkPolicyConfig\x12?\n\x0cistio_config\x18\x05 \x01(\x0b\x32%.google.container.v1beta1.IstioConfigB\x02\x18\x01\x12\x42\n\x10\x63loud_run_config\x18\x07 \x01(\x0b\x32(.google.container.v1beta1.CloudRunConfig\x12\x42\n\x10\x64ns_cache_config\x18\x08 \x01(\x0b\x32(.google.container.v1beta1.DnsCacheConfig\x12P\n\x17\x63onfig_connector_config\x18\n \x01(\x0b\x32/.google.container.v1beta1.ConfigConnectorConfig\x12i\n%gce_persistent_disk_csi_driver_config\x18\x0b \x01(\x0b\x32:.google.container.v1beta1.GcePersistentDiskCsiDriverConfig\x12=\n\x0bkalm_config\x18\x0c \x01(\x0b\x32$.google.container.v1beta1.KalmConfigB\x02\x18\x01\x12^\n\x1fgcp_filestore_csi_driver_config\x18\x0e \x01(\x0b\x32\x35.google.container.v1beta1.GcpFilestoreCsiDriverConfig\x12O\n\x17gke_backup_agent_config\x18\x10 \x01(\x0b\x32..google.container.v1beta1.GkeBackupAgentConfig\x12T\n\x1agcs_fuse_csi_driver_config\x18\x11 \x01(\x0b\x32\x30.google.container.v1beta1.GcsFuseCsiDriverConfig\x12K\n\x12stateful_ha_config\x18\x12 \x01(\x0b\x32*.google.container.v1beta1.StatefulHAConfigB\x03\xe0\x41\x01\x12_\n\x1fparallelstore_csi_driver_config\x18\x13 \x01(\x0b\x32\x36.google.container.v1beta1.ParallelstoreCsiDriverConfig\x12M\n\x13ray_operator_config\x18\x15 \x01(\x0b\x32+.google.container.v1beta1.RayOperatorConfigB\x03\xe0\x41\x01\x12_\n\x1fhigh_scale_checkpointing_config\x18\x16 \x01(\x0b\x32\x36.google.container.v1beta1.HighScaleCheckpointingConfig\x12Q\n\x18lustre_csi_driver_config\x18\x17 \x01(\x0b\x32/.google.container.v1beta1.LustreCsiDriverConfig\"%\n\x11HttpLoadBalancing\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x18HorizontalPodAutoscaling\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13KubernetesDashboard\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x13NetworkPolicyConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"!\n\x0e\x44nsCacheConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"!\n\nKalmConfig\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\"\'\n\x14GkeBackupAgentConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"#\n\x10StatefulHAConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x15\x43onfigConnectorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"3\n GcePersistentDiskCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\".\n\x1bGcpFilestoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\")\n\x16GcsFuseCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cParallelstoreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"/\n\x1cHighScaleCheckpointingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"K\n\x15LustreCsiDriverConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12!\n\x19\x65nable_legacy_lustre_port\x18\x03 \x01(\x08\"\xe2\x01\n\x11RayOperatorConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12Z\n\x1aray_cluster_logging_config\x18\x02 \x01(\x0b\x32\x31.google.container.v1beta1.RayClusterLoggingConfigB\x03\xe0\x41\x01\x12`\n\x1dray_cluster_monitoring_config\x18\x03 \x01(\x0b\x32\x34.google.container.v1beta1.RayClusterMonitoringConfigB\x03\xe0\x41\x01\"9\n&PrivateClusterMasterGlobalAccessConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xed\x02\n\x14PrivateClusterConfig\x12 \n\x14\x65nable_private_nodes\x18\x01 \x01(\x08\x42\x02\x18\x01\x12#\n\x17\x65nable_private_endpoint\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x1e\n\x16master_ipv4_cidr_block\x18\x03 \x01(\t\x12\x1f\n\x10private_endpoint\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x1e\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cpeering_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12i\n\x1bmaster_global_access_config\x18\x08 \x01(\x0b\x32@.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfigB\x02\x18\x01\x12\'\n\x1bprivate_endpoint_subnetwork\x18\n \x01(\tB\x02\x18\x01\"\x9f\x01\n\x0bIstioConfig\x12\x14\n\x08\x64isabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12\x45\n\x04\x61uth\x18\x02 \x01(\x0e\x32\x33.google.container.v1beta1.IstioConfig.IstioAuthModeB\x02\x18\x01\"3\n\rIstioAuthMode\x12\r\n\tAUTH_NONE\x10\x00\x12\x13\n\x0f\x41UTH_MUTUAL_TLS\x10\x01\"\xf3\x01\n\x0e\x43loudRunConfig\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12U\n\x12load_balancer_type\x18\x03 \x01(\x0e\x32\x39.google.container.v1beta1.CloudRunConfig.LoadBalancerType\"x\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLOAD_BALANCER_TYPE_EXTERNAL\x10\x01\x12\x1f\n\x1bLOAD_BALANCER_TYPE_INTERNAL\x10\x02\"\xef\x02\n\x1eMasterAuthorizedNetworksConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12W\n\x0b\x63idr_blocks\x18\x02 \x03(\x0b\x32\x42.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock\x12,\n\x1fgcp_public_cidrs_access_enabled\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x31\n$private_endpoint_enforcement_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x1a\x35\n\tCidrBlock\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x12\n\ncidr_block\x18\x02 \x01(\tB\"\n _gcp_public_cidrs_access_enabledB\'\n%_private_endpoint_enforcement_enabled\"\x1d\n\nLegacyAbac\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x96\x01\n\rNetworkPolicy\x12\x42\n\x08provider\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.NetworkPolicy.Provider\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"0\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41LICO\x10\x01\"-\n\x1aPodCIDROverprovisionConfig\x12\x0f\n\x07\x64isable\x18\x01 \x01(\x08\"\xd2\t\n\x12IPAllocationPolicy\x12\x16\n\x0euse_ip_aliases\x18\x01 \x01(\x08\x12\x19\n\x11\x63reate_subnetwork\x18\x02 \x01(\x08\x12\x17\n\x0fsubnetwork_name\x18\x03 \x01(\t\x12\x1d\n\x11\x63luster_ipv4_cidr\x18\x04 \x01(\tB\x02\x18\x01\x12\x1a\n\x0enode_ipv4_cidr\x18\x05 \x01(\tB\x02\x18\x01\x12\x1e\n\x12services_ipv4_cidr\x18\x06 \x01(\tB\x02\x18\x01\x12$\n\x1c\x63luster_secondary_range_name\x18\x07 \x01(\t\x12%\n\x1dservices_secondary_range_name\x18\x08 \x01(\t\x12\x1f\n\x17\x63luster_ipv4_cidr_block\x18\t \x01(\t\x12\x1c\n\x14node_ipv4_cidr_block\x18\n \x01(\t\x12 \n\x18services_ipv4_cidr_block\x18\x0b \x01(\t\x12\x1b\n\x13\x61llow_route_overlap\x18\x0c \x01(\x08\x12\x1f\n\x13tpu_ipv4_cidr_block\x18\r \x01(\tB\x02\x18\x01\x12\x12\n\nuse_routes\x18\x0f \x01(\x08\x12J\n\nstack_type\x18\x10 \x01(\x0e\x32\x36.google.container.v1beta1.IPAllocationPolicy.StackType\x12U\n\x10ipv6_access_type\x18\x11 \x01(\x0e\x32;.google.container.v1beta1.IPAllocationPolicy.IPv6AccessType\x12[\n\x1dpod_cidr_overprovision_config\x18\x15 \x01(\x0b\x32\x34.google.container.v1beta1.PodCIDROverprovisionConfig\x12#\n\x16subnet_ipv6_cidr_block\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18services_ipv6_cidr_block\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12^\n\x1c\x61\x64\x64itional_pod_ranges_config\x18\x18 \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfigB\x03\xe0\x41\x03\x12/\n\"default_pod_ipv4_range_utilization\x18\x19 \x01(\x01\x42\x03\xe0\x41\x03\x12]\n\x1c\x61\x64\x64itional_ip_ranges_configs\x18\x1d \x03(\x0b\x32\x32.google.container.v1beta1.AdditionalIPRangesConfigB\x03\xe0\x41\x03\x12G\n\x10\x61uto_ipam_config\x18\x1e \x01(\x0b\x32(.google.container.v1beta1.AutoIpamConfigB\x03\xe0\x41\x01\"@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIPv6AccessType\x12 \n\x1cIPV6_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\"\xc0\x03\n\x13\x42inaryAuthorization\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12U\n\x0f\x65valuation_mode\x18\x02 \x01(\x0e\x32<.google.container.v1beta1.BinaryAuthorization.EvaluationMode\x12Y\n\x0fpolicy_bindings\x18\x05 \x03(\x0b\x32;.google.container.v1beta1.BinaryAuthorization.PolicyBindingB\x03\xe0\x41\x01\x1a+\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xb4\x01\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12$\n PROJECT_SINGLETON_POLICY_ENFORCE\x10\x02\x12\x13\n\x0fPOLICY_BINDINGS\x10\x05\x12\x38\n4POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE\x10\x06\"*\n\x17PodSecurityPolicyConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"D\n\x19\x41uthenticatorGroupsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0esecurity_group\x18\x02 \x01(\t\"\x96\x01\n\x10\x43lusterTelemetry\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.container.v1beta1.ClusterTelemetry.Type\"C\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0f\n\x0bSYSTEM_ONLY\x10\x03\"\xd4(\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x12initial_node_count\x18\x03 \x01(\x05\x42\x02\x18\x01\x12=\n\x0bnode_config\x18\x04 \x01(\x0b\x32$.google.container.v1beta1.NodeConfigB\x02\x18\x01\x12\x39\n\x0bmaster_auth\x18\x05 \x01(\x0b\x32$.google.container.v1beta1.MasterAuth\x12\x17\n\x0flogging_service\x18\x06 \x01(\t\x12\x1a\n\x12monitoring_service\x18\x07 \x01(\t\x12\x0f\n\x07network\x18\x08 \x01(\t\x12\x19\n\x11\x63luster_ipv4_cidr\x18\t \x01(\t\x12=\n\raddons_config\x18\n \x01(\x0b\x32&.google.container.v1beta1.AddonsConfig\x12\x12\n\nsubnetwork\x18\x0b \x01(\t\x12\x36\n\nnode_pools\x18\x0c \x03(\x0b\x32\".google.container.v1beta1.NodePool\x12\x11\n\tlocations\x18\r \x03(\t\x12\x1f\n\x17\x65nable_kubernetes_alpha\x18\x0e \x01(\x08\x12$\n\x1b\x61lpha_cluster_feature_gates\x18\xa0\x01 \x03(\t\x12I\n\x14\x65nable_k8s_beta_apis\x18\x8f\x01 \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12N\n\x0fresource_labels\x18\x0f \x03(\x0b\x32\x35.google.container.v1beta1.Cluster.ResourceLabelsEntry\x12\x19\n\x11label_fingerprint\x18\x10 \x01(\t\x12\x39\n\x0blegacy_abac\x18\x12 \x01(\x0b\x32$.google.container.v1beta1.LegacyAbac\x12?\n\x0enetwork_policy\x18\x13 \x01(\x0b\x32\'.google.container.v1beta1.NetworkPolicy\x12J\n\x14ip_allocation_policy\x18\x14 \x01(\x0b\x32,.google.container.v1beta1.IPAllocationPolicy\x12g\n!master_authorized_networks_config\x18\x16 \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12G\n\x12maintenance_policy\x18\x17 \x01(\x0b\x32+.google.container.v1beta1.MaintenancePolicy\x12K\n\x14\x62inary_authorization\x18\x18 \x01(\x0b\x32-.google.container.v1beta1.BinaryAuthorization\x12U\n\x1apod_security_policy_config\x18\x19 \x01(\x0b\x32\x31.google.container.v1beta1.PodSecurityPolicyConfig\x12\x41\n\x0b\x61utoscaling\x18\x1a \x01(\x0b\x32,.google.container.v1beta1.ClusterAutoscaling\x12?\n\x0enetwork_config\x18\x1b \x01(\x0b\x32\'.google.container.v1beta1.NetworkConfig\x12\x1b\n\x0fprivate_cluster\x18\x1c \x01(\x08\x42\x02\x18\x01\x12\"\n\x16master_ipv4_cidr_block\x18\x1d \x01(\tB\x02\x18\x01\x12P\n\x1b\x64\x65\x66\x61ult_max_pods_constraint\x18\x1e \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraint\x12Y\n\x1cresource_usage_export_config\x18! \x01(\x0b\x32\x33.google.container.v1beta1.ResourceUsageExportConfig\x12X\n\x1b\x61uthenticator_groups_config\x18\" \x01(\x0b\x32\x33.google.container.v1beta1.AuthenticatorGroupsConfig\x12N\n\x16private_cluster_config\x18% \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfig\x12R\n\x18vertical_pod_autoscaling\x18\' \x01(\x0b\x32\x30.google.container.v1beta1.VerticalPodAutoscaling\x12?\n\x0eshielded_nodes\x18( \x01(\x0b\x32\'.google.container.v1beta1.ShieldedNodes\x12\x41\n\x0frelease_channel\x18) \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12R\n\x18workload_identity_config\x18+ \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadIdentityConfig\x12M\n\x15workload_certificates\x18\x34 \x01(\x0b\x32..google.container.v1beta1.WorkloadCertificates\x12\x45\n\x11mesh_certificates\x18\x43 \x01(\x0b\x32*.google.container.v1beta1.MeshCertificates\x12J\n\x14workload_alts_config\x18\x35 \x01(\x0b\x32,.google.container.v1beta1.WorkloadALTSConfig\x12N\n\x16\x63ost_management_config\x18- \x01(\x0b\x32..google.container.v1beta1.CostManagementConfig\x12\x45\n\x11\x63luster_telemetry\x18. \x01(\x0b\x32*.google.container.v1beta1.ClusterTelemetry\x12;\n\ntpu_config\x18/ \x01(\x0b\x32#.google.container.v1beta1.TpuConfigB\x02\x18\x01\x12I\n\x13notification_config\x18\x31 \x01(\x0b\x32,.google.container.v1beta1.NotificationConfig\x12G\n\x12\x63onfidential_nodes\x18\x32 \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12P\n\x17identity_service_config\x18\x36 \x01(\x0b\x32/.google.container.v1beta1.IdentityServiceConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x65 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x15\n\x08\x65ndpoint\x18\x66 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x17initial_cluster_version\x18g \x01(\t\x12#\n\x16\x63urrent_master_version\x18h \x01(\tB\x03\xe0\x41\x03\x12#\n\x14\x63urrent_node_version\x18i \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x63reate_time\x18j \x01(\tB\x03\xe0\x41\x03\x12=\n\x06status\x18k \x01(\x0e\x32(.google.container.v1beta1.Cluster.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18l \x01(\tB\x05\x18\x01\xe0\x41\x03\x12 \n\x13node_ipv4_cidr_size\x18m \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12services_ipv4_cidr\x18n \x01(\tB\x03\xe0\x41\x03\x12\"\n\x13instance_group_urls\x18o \x03(\tB\x05\x18\x01\xe0\x41\x03\x12!\n\x12\x63urrent_node_count\x18p \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x18\n\x0b\x65xpire_time\x18q \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18r \x01(\tB\x03\xe0\x41\x03\x12\x16\n\nenable_tpu\x18s \x01(\x08\x42\x02\x18\x01\x12\"\n\x13tpu_ipv4_cidr_block\x18t \x01(\tB\x05\x18\x01\xe0\x41\x03\x12I\n\x13\x64\x61tabase_encryption\x18& \x01(\x0b\x32,.google.container.v1beta1.DatabaseEncryption\x12=\n\nconditions\x18v \x03(\x0b\x32).google.container.v1beta1.StatusCondition\x12\x30\n\x06master\x18| \x01(\x0b\x32 .google.container.v1beta1.Master\x12\x37\n\tautopilot\x18\x80\x01 \x01(\x0b\x32#.google.container.v1beta1.Autopilot\x12\x10\n\x02id\x18\x81\x01 \x01(\tB\x03\xe0\x41\x03\x12L\n\x12node_pool_defaults\x18\x83\x01 \x01(\x0b\x32*.google.container.v1beta1.NodePoolDefaultsH\x00\x88\x01\x01\x12@\n\x0elogging_config\x18\x84\x01 \x01(\x0b\x32\'.google.container.v1beta1.LoggingConfig\x12\x46\n\x11monitoring_config\x18\x85\x01 \x01(\x0b\x32*.google.container.v1beta1.MonitoringConfig\x12L\n\x15node_pool_auto_config\x18\x88\x01 \x01(\x0b\x32,.google.container.v1beta1.NodePoolAutoConfig\x12I\n\x0eprotect_config\x18\x89\x01 \x01(\x0b\x32\'.google.container.v1beta1.ProtectConfigB\x02\x18\x01H\x01\x88\x01\x01\x12\x42\n\x0fpod_autoscaling\x18\x8a\x01 \x01(\x0b\x32(.google.container.v1beta1.PodAutoscaling\x12\r\n\x04\x65tag\x18\x8b\x01 \x01(\t\x12/\n\x05\x66leet\x18\x8c\x01 \x01(\x0b\x32\x1f.google.container.v1beta1.Fleet\x12Q\n\x17security_posture_config\x18\x91\x01 \x01(\x0b\x32/.google.container.v1beta1.SecurityPostureConfig\x12^\n\x1e\x63ontrol_plane_endpoints_config\x18\x92\x01 \x01(\x0b\x32\x35.google.container.v1beta1.ControlPlaneEndpointsConfig\x12\x46\n\x11\x65nterprise_config\x18\x95\x01 \x01(\x0b\x32*.google.container.v1beta1.EnterpriseConfig\x12M\n\x15secret_manager_config\x18\x96\x01 \x01(\x0b\x32-.google.container.v1beta1.SecretManagerConfig\x12U\n\x19\x63ompliance_posture_config\x18\x97\x01 \x01(\x0b\x32\x31.google.container.v1beta1.CompliancePostureConfig\x12 \n\rsatisfies_pzs\x18\x98\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12 \n\rsatisfies_pzi\x18\x99\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12W\n\x18user_managed_keys_config\x18\x9a\x01 \x01(\x0b\x32/.google.container.v1beta1.UserManagedKeysConfigH\x04\x88\x01\x01\x12N\n\x13rbac_binding_config\x18\x9c\x01 \x01(\x0b\x32+.google.container.v1beta1.RBACBindingConfigH\x05\x88\x01\x01\x12P\n\x17gke_auto_upgrade_config\x18\xa3\x01 \x01(\x0b\x32..google.container.v1beta1.GkeAutoUpgradeConfig\x12\x61\n\x1f\x61nonymous_authentication_config\x18\xa4\x01 \x01(\x0b\x32\x37.google.container.v1beta1.AnonymousAuthenticationConfig\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"w\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0f\n\x0bRECONCILING\x10\x03\x12\x0c\n\x08STOPPING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x44\x45GRADED\x10\x06\x42\x15\n\x13_node_pool_defaultsB\x11\n\x0f_protect_configB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pziB\x1b\n\x19_user_managed_keys_configB\x16\n\x14_rbac_binding_config\"\xef\x01\n\x11RBACBindingConfig\x12;\n.enable_insecure_binding_system_unauthenticated\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n,enable_insecure_binding_system_authenticated\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x31\n/_enable_insecure_binding_system_unauthenticatedB/\n-_enable_insecure_binding_system_authenticated\"\xe9\x04\n\x15UserManagedKeysConfig\x12\x38\n\ncluster_ca\x18\n \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x39\n\x0b\x65tcd_api_ca\x18\x0b \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12:\n\x0c\x65tcd_peer_ca\x18\x0c \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12S\n\x1cservice_account_signing_keys\x18\r \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!service_account_verification_keys\x18\x0e \x03(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12<\n\x0e\x61ggregation_ca\x18\x0f \x01(\tB$\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12X\n!control_plane_disk_encryption_key\x18\x10 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12X\n!gkeops_etcd_backup_encryption_key\x18\x11 \x01(\tB-\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\xa3\x01\n\x1d\x41nonymousAuthenticationConfig\x12J\n\x04mode\x18\x01 \x01(\x0e\x32<.google.container.v1beta1.AnonymousAuthenticationConfig.Mode\"6\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0b\n\x07LIMITED\x10\x02\"\xc4\x02\n\x17\x43ompliancePostureConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.CompliancePostureConfig.ModeH\x00\x88\x01\x01\x12\x62\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32\x44.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard\x1a\x38\n\x12\x43omplianceStandard\x12\x15\n\x08standard\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_standard\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\x07\n\x05_mode\"(\n\x10K8sBetaAPIConfig\x12\x14\n\x0c\x65nabled_apis\x18\x01 \x03(\t\"\xc4\x01\n\x0eWorkloadConfig\x12\x46\n\naudit_mode\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.WorkloadConfig.ModeH\x00\x88\x01\x01\"[\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x04\x12\x10\n\x08\x42\x41SELINE\x10\x02\x1a\x02\x08\x01\x12\x12\n\nRESTRICTED\x10\x03\x1a\x02\x08\x01\x42\r\n\x0b_audit_mode\"\xdb\x02\n\rProtectConfig\x12\x46\n\x0fworkload_config\x18\x01 \x01(\x0b\x32(.google.container.v1beta1.WorkloadConfigH\x00\x88\x01\x01\x12k\n\x1bworkload_vulnerability_mode\x18\x02 \x01(\x0e\x32\x41.google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityModeH\x01\x88\x01\x01\"a\n\x19WorkloadVulnerabilityMode\x12+\n\'WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x42\x12\n\x10_workload_configB\x1e\n\x1c_workload_vulnerability_mode\"\xb8\x03\n\x15SecurityPostureConfig\x12G\n\x04mode\x18\x01 \x01(\x0e\x32\x34.google.container.v1beta1.SecurityPostureConfig.ModeH\x00\x88\x01\x01\x12\x62\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32\x41.google.container.v1beta1.SecurityPostureConfig.VulnerabilityModeH\x01\x88\x01\x01\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\x42\x07\n\x05_modeB\x15\n\x13_vulnerability_mode\"^\n\x10NodePoolDefaults\x12J\n\x14node_config_defaults\x18\x01 \x01(\x0b\x32,.google.container.v1beta1.NodeConfigDefaults\"\xfb\x02\n\x12NodeConfigDefaults\x12\x39\n\x0bgcfs_config\x18\x01 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12G\n\x0elogging_config\x18\x03 \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x45\n\x11\x63ontainerd_config\x18\x04 \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12P\n\x17host_maintenance_policy\x18\x05 \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12H\n\x13node_kubelet_config\x18\x06 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\"\xb4\x02\n\x12NodePoolAutoConfig\x12;\n\x0cnetwork_tags\x18\x01 \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12L\n\x15resource_manager_tags\x18\x02 \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12H\n\x13node_kubelet_config\x18\x03 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12I\n\x11linux_node_config\x18\x04 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfigB\x03\xe0\x41\x03\"\xcc\x34\n\rClusterUpdate\x12\x1c\n\x14\x64\x65sired_node_version\x18\x04 \x01(\t\x12\"\n\x1a\x64\x65sired_monitoring_service\x18\x05 \x01(\t\x12\x45\n\x15\x64\x65sired_addons_config\x18\x06 \x01(\x0b\x32&.google.container.v1beta1.AddonsConfig\x12\x1c\n\x14\x64\x65sired_node_pool_id\x18\x07 \x01(\t\x12\x1a\n\x12\x64\x65sired_image_type\x18\x08 \x01(\t\x12T\n\x1d\x64\x65sired_node_pool_autoscaling\x18\t \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscaling\x12\x19\n\x11\x64\x65sired_locations\x18\n \x03(\t\x12o\n)desired_master_authorized_networks_config\x18\x0c \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfigB\x02\x18\x01\x12]\n\"desired_pod_security_policy_config\x18\x0e \x01(\x0b\x32\x31.google.container.v1beta1.PodSecurityPolicyConfig\x12Q\n\x1b\x64\x65sired_cluster_autoscaling\x18\x0f \x01(\x0b\x32,.google.container.v1beta1.ClusterAutoscaling\x12S\n\x1c\x64\x65sired_binary_authorization\x18\x10 \x01(\x0b\x32-.google.container.v1beta1.BinaryAuthorization\x12\x1f\n\x17\x64\x65sired_logging_service\x18\x13 \x01(\t\x12\x61\n$desired_resource_usage_export_config\x18\x15 \x01(\x0b\x32\x33.google.container.v1beta1.ResourceUsageExportConfig\x12Z\n desired_vertical_pod_autoscaling\x18\x16 \x01(\x0b\x32\x30.google.container.v1beta1.VerticalPodAutoscaling\x12Z\n\x1e\x64\x65sired_private_cluster_config\x18\x19 \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfigB\x02\x18\x01\x12\x61\n$desired_intra_node_visibility_config\x18\x1a \x01(\x0b\x32\x33.google.container.v1beta1.IntraNodeVisibilityConfig\x12P\n\x1b\x64\x65sired_default_snat_status\x18\x1c \x01(\x0b\x32+.google.container.v1beta1.DefaultSnatStatus\x12M\n\x19\x64\x65sired_cluster_telemetry\x18\x1e \x01(\x0b\x32*.google.container.v1beta1.ClusterTelemetry\x12I\n\x17\x64\x65sired_release_channel\x18\x1f \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12R\n\x16private_cluster_config\x18% \x01(\x0b\x32..google.container.v1beta1.PrivateClusterConfigB\x02\x18\x01\x12\x43\n\x12\x64\x65sired_tpu_config\x18& \x01(\x0b\x32#.google.container.v1beta1.TpuConfigB\x02\x18\x01\x12V\n\x1f\x64\x65sired_l4ilb_subsetting_config\x18\' \x01(\x0b\x32-.google.container.v1beta1.ILBSubsettingConfig\x12M\n\x19\x64\x65sired_datapath_provider\x18\x32 \x01(\x0e\x32*.google.container.v1beta1.DatapathProvider\x12]\n\"desired_private_ipv6_google_access\x18\x33 \x01(\x0e\x32\x31.google.container.v1beta1.PrivateIPv6GoogleAccess\x12Q\n\x1b\x64\x65sired_notification_config\x18\x37 \x01(\x0b\x32,.google.container.v1beta1.NotificationConfig\x12\x1e\n\x16\x64\x65sired_master_version\x18\x64 \x01(\t\x12\x41\n\x13\x64\x65sired_gcfs_config\x18m \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12Q\n\x1b\x64\x65sired_database_encryption\x18. \x01(\x0b\x32,.google.container.v1beta1.DatabaseEncryption\x12Z\n desired_workload_identity_config\x18/ \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadIdentityConfig\x12U\n\x1d\x64\x65sired_workload_certificates\x18= \x01(\x0b\x32..google.container.v1beta1.WorkloadCertificates\x12M\n\x19\x64\x65sired_mesh_certificates\x18\x43 \x01(\x0b\x32*.google.container.v1beta1.MeshCertificates\x12R\n\x1c\x64\x65sired_workload_alts_config\x18> \x01(\x0b\x32,.google.container.v1beta1.WorkloadALTSConfig\x12G\n\x16\x64\x65sired_shielded_nodes\x18\x30 \x01(\x0b\x32\'.google.container.v1beta1.ShieldedNodes\x12V\n\x1e\x64\x65sired_cost_management_config\x18\x31 \x01(\x0b\x32..google.container.v1beta1.CostManagementConfig\x12\x38\n\x0e\x64\x65sired_master\x18\x34 \x01(\x0b\x32 .google.container.v1beta1.Master\x12?\n\x12\x64\x65sired_dns_config\x18\x35 \x01(\x0b\x32#.google.container.v1beta1.DNSConfig\x12_\n#desired_service_external_ips_config\x18< \x01(\x0b\x32\x32.google.container.v1beta1.ServiceExternalIPsConfig\x12`\n#desired_authenticator_groups_config\x18? \x01(\x0b\x32\x33.google.container.v1beta1.AuthenticatorGroupsConfig\x12G\n\x16\x64\x65sired_logging_config\x18@ \x01(\x0b\x32\'.google.container.v1beta1.LoggingConfig\x12M\n\x19\x64\x65sired_monitoring_config\x18\x41 \x01(\x0b\x32*.google.container.v1beta1.MonitoringConfig\x12X\n\x1f\x64\x65sired_identity_service_config\x18\x42 \x01(\x0b\x32/.google.container.v1beta1.IdentityServiceConfig\x12\x30\n\x1f\x64\x65sired_enable_private_endpoint\x18G \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x31\n$desired_default_enable_private_nodes\x18H \x01(\x08H\x01\x88\x01\x01\x12\x65\n&desired_control_plane_endpoints_config\x18I \x01(\x0b\x32\x35.google.container.v1beta1.ControlPlaneEndpointsConfig\x12Y\n*desired_node_pool_auto_config_network_tags\x18n \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12P\n\x16\x64\x65sired_protect_config\x18p \x01(\x0b\x32\'.google.container.v1beta1.ProtectConfigB\x02\x18\x01H\x02\x88\x01\x01\x12I\n\x17\x64\x65sired_pod_autoscaling\x18q \x01(\x0b\x32(.google.container.v1beta1.PodAutoscaling\x12N\n\x1a\x64\x65sired_gateway_api_config\x18r \x01(\x0b\x32*.google.container.v1beta1.GatewayAPIConfig\x12\x0c\n\x04\x65tag\x18s \x01(\t\x12Y\n desired_node_pool_logging_config\x18t \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x36\n\rdesired_fleet\x18u \x01(\x0b\x32\x1f.google.container.v1beta1.Fleet\x12?\n\x12\x64\x65sired_stack_type\x18w \x01(\x0e\x32#.google.container.v1beta1.StackType\x12Y\n\x1c\x61\x64\x64itional_pod_ranges_config\x18x \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfig\x12\x61\n$removed_additional_pod_ranges_config\x18y \x01(\x0b\x32\x33.google.container.v1beta1.AdditionalPodRangesConfig\x12H\n\x14\x65nable_k8s_beta_apis\x18z \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12X\n\x1f\x64\x65sired_security_posture_config\x18| \x01(\x0b\x32/.google.container.v1beta1.SecurityPostureConfig\x12s\n\"desired_network_performance_config\x18} \x01(\x0b\x32G.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig\x12/\n\"desired_enable_fqdn_network_policy\x18~ \x01(\x08H\x03\x88\x01\x01\x12\x61\n(desired_autopilot_workload_policy_config\x18\x80\x01 \x01(\x0b\x32..google.container.v1beta1.WorkloadPolicyConfig\x12J\n\x15\x64\x65sired_k8s_beta_apis\x18\x83\x01 \x01(\x0b\x32*.google.container.v1beta1.K8sBetaAPIConfig\x12Y\n\x1f\x64\x65sired_host_maintenance_policy\x18\x84\x01 \x01(\x0b\x32/.google.container.v1beta1.HostMaintenancePolicy\x12N\n\x19\x64\x65sired_containerd_config\x18\x86\x01 \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12-\n\x1f\x64\x65sired_enable_multi_networking\x18\x87\x01 \x01(\x08H\x04\x88\x01\x01\x12k\n3desired_node_pool_auto_config_resource_manager_tags\x18\x88\x01 \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12g\n$desired_in_transit_encryption_config\x18\x89\x01 \x01(\x0e\x32\x33.google.container.v1beta1.InTransitEncryptionConfigH\x05\x88\x01\x01\x12>\n0desired_enable_cilium_clusterwide_network_policy\x18\x8a\x01 \x01(\x08H\x06\x88\x01\x01\x12Z\n\x1d\x64\x65sired_secret_manager_config\x18\x8b\x01 \x01(\x0b\x32-.google.container.v1beta1.SecretManagerConfigH\x07\x88\x01\x01\x12\x62\n!desired_compliance_posture_config\x18\x8c\x01 \x01(\x0b\x32\x31.google.container.v1beta1.CompliancePostureConfigH\x08\x88\x01\x01\x12Q\n\x1b\x64\x65sired_node_kubelet_config\x18\x8d\x01 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12\x62\n,desired_node_pool_auto_config_kubelet_config\x18\x8e\x01 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12V\n\x18user_managed_keys_config\x18\x8f\x01 \x01(\x0b\x32/.google.container.v1beta1.UserManagedKeysConfigB\x02\x18\x01\x12V\n\x1b\x64\x65sired_rbac_binding_config\x18\x90\x01 \x01(\x0b\x32+.google.container.v1beta1.RBACBindingConfigH\t\x88\x01\x01\x12g\n#desired_additional_ip_ranges_config\x18\x91\x01 \x01(\x0b\x32\x39.google.container.v1beta1.DesiredAdditionalIPRangesConfig\x12U\n\x19\x64\x65sired_enterprise_config\x18\x93\x01 \x01(\x0b\x32\x31.google.container.v1beta1.DesiredEnterpriseConfig\x12K\n\x18\x64\x65sired_auto_ipam_config\x18\x94\x01 \x01(\x0b\x32(.google.container.v1beta1.AutoIpamConfig\x12;\n-desired_disable_l4_lb_firewall_reconciliation\x18\x95\x01 \x01(\x08H\n\x88\x01\x01\x12\x63\n/desired_node_pool_auto_config_linux_node_config\x18\x96\x01 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12Z\n desired_user_managed_keys_config\x18\x98\x01 \x01(\x0b\x32/.google.container.v1beta1.UserManagedKeysConfig\x12i\n\'desired_anonymous_authentication_config\x18\x9c\x01 \x01(\x0b\x32\x37.google.container.v1beta1.AnonymousAuthenticationConfig\x12P\n\x17gke_auto_upgrade_config\x18\x9a\x01 \x01(\x0b\x32..google.container.v1beta1.GkeAutoUpgradeConfigB\"\n _desired_enable_private_endpointB\'\n%_desired_default_enable_private_nodesB\x19\n\x17_desired_protect_configB%\n#_desired_enable_fqdn_network_policyB\"\n _desired_enable_multi_networkingB\'\n%_desired_in_transit_encryption_configB3\n1_desired_enable_cilium_clusterwide_network_policyB \n\x1e_desired_secret_manager_configB$\n\"_desired_compliance_posture_configB\x1e\n\x1c_desired_rbac_binding_configB0\n._desired_disable_l4_lb_firewall_reconciliation\"v\n\x19\x41\x64\x64itionalPodRangesConfig\x12\x17\n\x0fpod_range_names\x18\x01 \x03(\t\x12@\n\x0epod_range_info\x18\x02 \x03(\x0b\x32#.google.container.v1beta1.RangeInfoB\x03\xe0\x41\x03\"L\n\x18\x41\x64\x64itionalIPRangesConfig\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x1c\n\x14pod_ipv4_range_names\x18\x02 \x03(\t\"{\n\x1f\x44\x65siredAdditionalIPRangesConfig\x12X\n\x1c\x61\x64\x64itional_ip_ranges_configs\x18\x01 \x03(\x0b\x32\x32.google.container.v1beta1.AdditionalIPRangesConfig\"\x10\n\x0e\x41utoIpamConfig\">\n\tRangeInfo\x12\x17\n\nrange_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0butilization\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"g\n\x17\x44\x65siredEnterpriseConfig\x12L\n\x0c\x64\x65sired_tier\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTier\"\xfd\x08\n\tOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x04zone\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x45\n\x0eoperation_type\x18\x03 \x01(\x0e\x32(.google.container.v1beta1.Operation.TypeB\x03\xe0\x41\x03\x12?\n\x06status\x18\x04 \x01(\x0e\x32*.google.container.v1beta1.Operation.StatusB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x16\n\tself_link\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0btarget_link\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nstart_time\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_time\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x08progress\x18\x0c \x01(\x0b\x32+.google.container.v1beta1.OperationProgressB\x03\xe0\x41\x03\x12I\n\x12\x63luster_conditions\x18\r \x03(\x0b\x32).google.container.v1beta1.StatusConditionB\x02\x18\x01\x12J\n\x13nodepool_conditions\x18\x0e \x03(\x0b\x32).google.container.v1beta1.StatusConditionB\x02\x18\x01\x12!\n\x05\x65rror\x18\x0f \x01(\x0b\x32\x12.google.rpc.Status\"R\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x41\x42ORTING\x10\x04\"\xc0\x03\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43REATE_CLUSTER\x10\x01\x12\x12\n\x0e\x44\x45LETE_CLUSTER\x10\x02\x12\x12\n\x0eUPGRADE_MASTER\x10\x03\x12\x11\n\rUPGRADE_NODES\x10\x04\x12\x12\n\x0eREPAIR_CLUSTER\x10\x05\x12\x12\n\x0eUPDATE_CLUSTER\x10\x06\x12\x14\n\x10\x43REATE_NODE_POOL\x10\x07\x12\x14\n\x10\x44\x45LETE_NODE_POOL\x10\x08\x12\x1c\n\x18SET_NODE_POOL_MANAGEMENT\x10\t\x12\x15\n\x11\x41UTO_REPAIR_NODES\x10\n\x12\x1a\n\x12\x41UTO_UPGRADE_NODES\x10\x0b\x1a\x02\x08\x01\x12\x12\n\nSET_LABELS\x10\x0c\x1a\x02\x08\x01\x12\x17\n\x0fSET_MASTER_AUTH\x10\r\x1a\x02\x08\x01\x12\x16\n\x12SET_NODE_POOL_SIZE\x10\x0e\x12\x1a\n\x12SET_NETWORK_POLICY\x10\x0f\x1a\x02\x08\x01\x12\x1e\n\x16SET_MAINTENANCE_POLICY\x10\x10\x1a\x02\x08\x01\x12\x12\n\x0eRESIZE_CLUSTER\x10\x12\x12\x19\n\x15\x46LEET_FEATURE_UPGRADE\x10\x13\"\xca\x02\n\x11OperationProgress\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x06status\x18\x02 \x01(\x0e\x32*.google.container.v1beta1.Operation.Status\x12\x43\n\x07metrics\x18\x03 \x03(\x0b\x32\x32.google.container.v1beta1.OperationProgress.Metric\x12;\n\x06stages\x18\x04 \x03(\x0b\x32+.google.container.v1beta1.OperationProgress\x1ai\n\x06Metric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\tint_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\x42\x07\n\x05value\"\x89\x01\n\x14\x43reateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x37\n\x07\x63luster\x18\x03 \x01(\x0b\x32!.google.container.v1beta1.ClusterB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x05 \x01(\t\"c\n\x11GetClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xa4\x01\n\x14UpdateClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12<\n\x06update\x18\x04 \x01(\x0b\x32\'.google.container.v1beta1.ClusterUpdateB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\xdd\r\n\x15UpdateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x19\n\x0cnode_version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nimage_type\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tlocations\x18\r \x03(\t\x12R\n\x18workload_metadata_config\x18\x0e \x01(\x0b\x32\x30.google.container.v1beta1.WorkloadMetadataConfig\x12\x0c\n\x04name\x18\x08 \x01(\t\x12L\n\x10upgrade_settings\x18\x0f \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12\x33\n\x04tags\x18\x10 \x01(\x0b\x32%.google.container.v1beta1.NetworkTags\x12\x34\n\x06taints\x18\x11 \x01(\x0b\x32$.google.container.v1beta1.NodeTaints\x12\x34\n\x06labels\x18\x12 \x01(\x0b\x32$.google.container.v1beta1.NodeLabels\x12\x44\n\x11linux_node_config\x18\x13 \x01(\x0b\x32).google.container.v1beta1.LinuxNodeConfig\x12\x43\n\x0ekubelet_config\x18\x14 \x01(\x0b\x32+.google.container.v1beta1.NodeKubeletConfig\x12H\n\x13node_network_config\x18\x15 \x01(\x0b\x32+.google.container.v1beta1.NodeNetworkConfig\x12\x39\n\x0bgcfs_config\x18\x16 \x01(\x0b\x32$.google.container.v1beta1.GcfsConfig\x12G\n\x12\x63onfidential_nodes\x18\x17 \x01(\x0b\x32+.google.container.v1beta1.ConfidentialNodes\x12\x33\n\x05gvnic\x18\x1d \x01(\x0b\x32$.google.container.v1beta1.VirtualNIC\x12\x0c\n\x04\x65tag\x18\x1e \x01(\t\x12\x39\n\x0b\x66\x61st_socket\x18\x1f \x01(\x0b\x32$.google.container.v1beta1.FastSocket\x12G\n\x0elogging_config\x18 \x01(\x0b\x32/.google.container.v1beta1.NodePoolLoggingConfig\x12\x41\n\x0fresource_labels\x18! \x01(\x0b\x32(.google.container.v1beta1.ResourceLabels\x12H\n\x13windows_node_config\x18\" \x01(\x0b\x32+.google.container.v1beta1.WindowsNodeConfig\x12\x41\n\x0c\x61\x63\x63\x65lerators\x18# \x03(\x0b\x32+.google.container.v1beta1.AcceleratorConfig\x12\x19\n\x0cmachine_type\x18$ \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18% \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isk_size_gb\x18& \x01(\x03\x42\x03\xe0\x41\x01\x12L\n\x15resource_manager_tags\x18\' \x01(\x0b\x32-.google.container.v1beta1.ResourceManagerTags\x12\x45\n\x11\x63ontainerd_config\x18( \x01(\x0b\x32*.google.container.v1beta1.ContainerdConfig\x12R\n\x13queued_provisioning\x18* \x01(\x0b\x32\x35.google.container.v1beta1.NodePool.QueuedProvisioning\x12\x15\n\rstorage_pools\x18+ \x03(\t\x12\x33\n\x10max_run_duration\x18- \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\nflex_start\x18. \x01(\x08H\x00\x88\x01\x01\x12\x35\n\tboot_disk\x18/ \x01(\x0b\x32\".google.container.v1beta1.BootDiskB\r\n\x0b_flex_start\"\xd2\x01\n\x1dSetNodePoolAutoscalingRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12G\n\x0b\x61utoscaling\x18\x05 \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscalingB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x88\x01\n\x18SetLoggingServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1c\n\x0flogging_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x8e\x01\n\x1bSetMonitoringServiceRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x12monitoring_service\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xac\x01\n\x16SetAddonsConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x42\n\raddons_config\x18\x04 \x01(\x0b\x32&.google.container.v1beta1.AddonsConfigB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"}\n\x13SetLocationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\tlocations\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x82\x01\n\x13UpdateMasterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1b\n\x0emaster_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xbf\x02\n\x14SetMasterAuthRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12J\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x35.google.container.v1beta1.SetMasterAuthRequest.ActionB\x03\xe0\x41\x02\x12\x39\n\x06update\x18\x05 \x01(\x0b\x32$.google.container.v1beta1.MasterAuthB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"P\n\x06\x41\x63tion\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cSET_PASSWORD\x10\x01\x12\x15\n\x11GENERATE_PASSWORD\x10\x02\x12\x10\n\x0cSET_USERNAME\x10\x03\"f\n\x14\x44\x65leteClusterRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"O\n\x13ListClustersRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"b\n\x14ListClustersResponse\x12\x33\n\x08\x63lusters\x18\x01 \x03(\x0b\x32!.google.container.v1beta1.Cluster\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"g\n\x13GetOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x05 \x01(\t\"Q\n\x15ListOperationsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x04 \x01(\t\"j\n\x16\x43\x61ncelOperationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"h\n\x16ListOperationsResponse\x12\x37\n\noperations\x18\x01 \x03(\x0b\x32#.google.container.v1beta1.Operation\x12\x15\n\rmissing_zones\x18\x02 \x03(\t\"P\n\x16GetServerConfigRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\"\x89\x06\n\x0cServerConfig\x12\x1f\n\x17\x64\x65\x66\x61ult_cluster_version\x18\x01 \x01(\t\x12\x1b\n\x13valid_node_versions\x18\x03 \x03(\t\x12\x1a\n\x12\x64\x65\x66\x61ult_image_type\x18\x04 \x01(\t\x12\x19\n\x11valid_image_types\x18\x05 \x03(\t\x12\x1d\n\x15valid_master_versions\x18\x06 \x03(\t\x12M\n\x08\x63hannels\x18\t \x03(\x0b\x32;.google.container.v1beta1.ServerConfig.ReleaseChannelConfig\x12\\\n\x14windows_version_maps\x18\n \x03(\x0b\x32>.google.container.v1beta1.ServerConfig.WindowsVersionMapsEntry\x1a\xd1\x02\n\x14ReleaseChannelConfig\x12\x41\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.ReleaseChannel.Channel\x12\x17\n\x0f\x64\x65\x66\x61ult_version\x18\x02 \x01(\t\x12l\n\x12\x61vailable_versions\x18\x03 \x03(\x0b\x32L.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersionB\x02\x18\x01\x12\x16\n\x0evalid_versions\x18\x04 \x03(\t\x12\x1e\n\x16upgrade_target_version\x18\x05 \x01(\t\x1a\x37\n\x10\x41vailableVersion\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t:\x02\x18\x01\x1a\x64\n\x17WindowsVersionMapsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.container.v1beta1.WindowsVersions:\x02\x38\x01\"F\n\x16\x42\x65stEffortProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x13min_provision_nodes\x18\x02 \x01(\x05\"\xcc\x01\n\x0fWindowsVersions\x12R\n\x10windows_versions\x18\x01 \x03(\x0b\x32\x38.google.container.v1beta1.WindowsVersions.WindowsVersion\x1a\x65\n\x0eWindowsVersion\x12\x12\n\nimage_type\x18\x01 \x01(\t\x12\x12\n\nos_version\x18\x02 \x01(\t\x12+\n\x10support_end_date\x18\x03 \x01(\x0b\x32\x11.google.type.Date\"\xa5\x01\n\x15\x43reateNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12:\n\tnode_pool\x18\x04 \x01(\x0b\x32\".google.container.v1beta1.NodePoolB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x06 \x01(\t\"\x81\x01\n\x15\x44\x65leteNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"h\n\x14ListNodePoolsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0e\n\x06parent\x18\x05 \x01(\t\"~\n\x12GetNodePoolRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xa9\x04\n\x11\x42lueGreenSettings\x12\x64\n\x17standard_rollout_policy\x18\x01 \x01(\x0b\x32\x41.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicyH\x00\x12h\n\x19\x61utoscaled_rollout_policy\x18\x03 \x01(\x0b\x32\x43.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicyH\x00\x12?\n\x17node_pool_soak_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x1a\xb9\x01\n\x15StandardRolloutPolicy\x12\x1a\n\x10\x62\x61tch_percentage\x18\x01 \x01(\x02H\x00\x12\x1a\n\x10\x62\x61tch_node_count\x18\x02 \x01(\x05H\x00\x12;\n\x13\x62\x61tch_soak_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\x13\n\x11update_batch_sizeB\x16\n\x14_batch_soak_duration\x1a\x19\n\x17\x41utoscaledRolloutPolicyB\x10\n\x0erollout_policyB\x1a\n\x18_node_pool_soak_duration\"\xc1\x11\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x63onfig\x18\x02 \x01(\x0b\x32$.google.container.v1beta1.NodeConfig\x12\x1a\n\x12initial_node_count\x18\x03 \x01(\x05\x12\x11\n\tlocations\x18\r \x03(\t\x12\x43\n\x0enetwork_config\x18\x0e \x01(\x0b\x32+.google.container.v1beta1.NodeNetworkConfig\x12\x16\n\tself_link\x18\x64 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x65 \x01(\t\x12 \n\x13instance_group_urls\x18\x66 \x03(\tB\x03\xe0\x41\x03\x12>\n\x06status\x18g \x01(\x0e\x32).google.container.v1beta1.NodePool.StatusB\x03\xe0\x41\x03\x12\x1d\n\x0estatus_message\x18h \x01(\tB\x05\x18\x01\xe0\x41\x03\x12\x42\n\x0b\x61utoscaling\x18\x04 \x01(\x0b\x32-.google.container.v1beta1.NodePoolAutoscaling\x12<\n\nmanagement\x18\x05 \x01(\x0b\x32(.google.container.v1beta1.NodeManagement\x12H\n\x13max_pods_constraint\x18\x06 \x01(\x0b\x32+.google.container.v1beta1.MaxPodsConstraint\x12=\n\nconditions\x18i \x03(\x0b\x32).google.container.v1beta1.StatusCondition\x12\x1f\n\x12pod_ipv4_cidr_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12L\n\x10upgrade_settings\x18k \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12L\n\x10placement_policy\x18l \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.PlacementPolicy\x12G\n\x0bupdate_info\x18m \x01(\x0b\x32-.google.container.v1beta1.NodePool.UpdateInfoB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18n \x01(\t\x12R\n\x13queued_provisioning\x18p \x01(\x0b\x32\x35.google.container.v1beta1.NodePool.QueuedProvisioning\x12R\n\x18\x62\x65st_effort_provisioning\x18q \x01(\x0b\x32\x30.google.container.v1beta1.BestEffortProvisioning\x1a\xfa\x01\n\x0fUpgradeSettings\x12\x11\n\tmax_surge\x18\x01 \x01(\x05\x12\x17\n\x0fmax_unavailable\x18\x02 \x01(\x05\x12G\n\x08strategy\x18\x03 \x01(\x0e\x32\x30.google.container.v1beta1.NodePoolUpdateStrategyH\x00\x88\x01\x01\x12M\n\x13\x62lue_green_settings\x18\x04 \x01(\x0b\x32+.google.container.v1beta1.BlueGreenSettingsH\x01\x88\x01\x01\x42\x0b\n\t_strategyB\x16\n\x14_blue_green_settings\x1a\xb2\x04\n\nUpdateInfo\x12T\n\x0f\x62lue_green_info\x18\x01 \x01(\x0b\x32;.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo\x1a\xcd\x03\n\rBlueGreenInfo\x12P\n\x05phase\x18\x01 \x01(\x0e\x32\x41.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase\x12 \n\x18\x62lue_instance_group_urls\x18\x02 \x03(\t\x12!\n\x19green_instance_group_urls\x18\x03 \x03(\t\x12%\n\x1d\x62lue_pool_deletion_start_time\x18\x04 \x01(\t\x12\x1a\n\x12green_pool_version\x18\x05 \x01(\t\"\xe1\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUPDATE_STARTED\x10\x01\x12\x17\n\x13\x43REATING_GREEN_POOL\x10\x02\x12\x17\n\x13\x43ORDONING_BLUE_POOL\x10\x03\x12\x1e\n\x1aWAITING_TO_DRAIN_BLUE_POOL\x10\x08\x12\x16\n\x12\x44RAINING_BLUE_POOL\x10\x04\x12\x15\n\x11NODE_POOL_SOAKING\x10\x05\x12\x16\n\x12\x44\x45LETING_BLUE_POOL\x10\x06\x12\x14\n\x10ROLLBACK_STARTED\x10\x07\x1a\xae\x01\n\x0fPlacementPolicy\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.container.v1beta1.NodePool.PlacementPolicy.Type\x12\x14\n\x0ctpu_topology\x18\x02 \x01(\t\x12\x13\n\x0bpolicy_name\x18\x03 \x01(\t\")\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMPACT\x10\x01\x1a%\n\x12QueuedProvisioning\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x16\n\x12RUNNING_WITH_ERROR\x10\x03\x12\x0f\n\x0bRECONCILING\x10\x04\x12\x0c\n\x08STOPPING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\"\x82\x01\n\x0eNodeManagement\x12\x14\n\x0c\x61uto_upgrade\x18\x01 \x01(\x08\x12\x13\n\x0b\x61uto_repair\x18\x02 \x01(\x08\x12\x45\n\x0fupgrade_options\x18\n \x01(\x0b\x32,.google.container.v1beta1.AutoUpgradeOptions\"T\n\x12\x41utoUpgradeOptions\x12$\n\x17\x61uto_upgrade_start_time\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\"j\n\x11MaintenancePolicy\x12;\n\x06window\x18\x01 \x01(\x0b\x32+.google.container.v1beta1.MaintenanceWindow\x12\x18\n\x10resource_version\x18\x03 \x01(\t\"\x8a\x03\n\x11MaintenanceWindow\x12T\n\x18\x64\x61ily_maintenance_window\x18\x02 \x01(\x0b\x32\x30.google.container.v1beta1.DailyMaintenanceWindowH\x00\x12I\n\x10recurring_window\x18\x03 \x01(\x0b\x32-.google.container.v1beta1.RecurringTimeWindowH\x00\x12\x66\n\x16maintenance_exclusions\x18\x04 \x03(\x0b\x32\x46.google.container.v1beta1.MaintenanceWindow.MaintenanceExclusionsEntry\x1a\x62\n\x1aMaintenanceExclusionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.google.container.v1beta1.TimeWindow:\x02\x38\x01\x42\x08\n\x06policy\"\xd5\x01\n\nTimeWindow\x12^\n\x1dmaintenance_exclusion_options\x18\x03 \x01(\x0b\x32\x35.google.container.v1beta1.MaintenanceExclusionOptionsH\x00\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07options\"\xb9\x01\n\x1bMaintenanceExclusionOptions\x12J\n\x05scope\x18\x01 \x01(\x0e\x32;.google.container.v1beta1.MaintenanceExclusionOptions.Scope\"N\n\x05Scope\x12\x0f\n\x0bNO_UPGRADES\x10\x00\x12\x15\n\x11NO_MINOR_UPGRADES\x10\x01\x12\x1d\n\x19NO_MINOR_OR_NODE_UPGRADES\x10\x02\"_\n\x13RecurringTimeWindow\x12\x34\n\x06window\x18\x01 \x01(\x0b\x32$.google.container.v1beta1.TimeWindow\x12\x12\n\nrecurrence\x18\x02 \x01(\t\"C\n\x16\x44\x61ilyMaintenanceWindow\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x15\n\x08\x64uration\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcb\x01\n\x1cSetNodePoolManagementRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x41\n\nmanagement\x18\x05 \x01(\x0b\x32(.google.container.v1beta1.NodeManagementB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\"\x9b\x01\n\x16SetNodePoolSizeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x17\n\nnode_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\".\n\x1e\x43ompleteNodePoolUpgradeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9f\x01\n\x1eRollbackNodePoolUpgradeRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x18\n\x0cnode_pool_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0brespect_pdb\x18\x07 \x01(\x08\"O\n\x15ListNodePoolsResponse\x12\x36\n\nnode_pools\x18\x01 \x03(\x0b\x32\".google.container.v1beta1.NodePool\"\x99\x04\n\x12\x43lusterAutoscaling\x12$\n\x1c\x65nable_node_autoprovisioning\x18\x01 \x01(\x08\x12@\n\x0fresource_limits\x18\x02 \x03(\x0b\x32\'.google.container.v1beta1.ResourceLimit\x12\\\n\x13\x61utoscaling_profile\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile\x12g\n#autoprovisioning_node_pool_defaults\x18\x04 \x01(\x0b\x32:.google.container.v1beta1.AutoprovisioningNodePoolDefaults\x12\"\n\x1a\x61utoprovisioning_locations\x18\x05 \x03(\t\x12Y\n\x1c\x64\x65\x66\x61ult_compute_class_config\x18\t \x01(\x0b\x32\x33.google.container.v1beta1.DefaultComputeClassConfig\"U\n\x12\x41utoscalingProfile\x12\x17\n\x13PROFILE_UNSPECIFIED\x10\x00\x12\x18\n\x14OPTIMIZE_UTILIZATION\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\"\x87\x04\n AutoprovisioningNodePoolDefaults\x12\x14\n\x0coauth_scopes\x18\x01 \x03(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12L\n\x10upgrade_settings\x18\x03 \x01(\x0b\x32\x32.google.container.v1beta1.NodePool.UpgradeSettings\x12<\n\nmanagement\x18\x04 \x01(\x0b\x32(.google.container.v1beta1.NodeManagement\x12\x1c\n\x10min_cpu_platform\x18\x05 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x05\x12\x11\n\tdisk_type\x18\x07 \x01(\t\x12R\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32\x30.google.container.v1beta1.ShieldedInstanceConfig\x12\x19\n\x11\x62oot_disk_kms_key\x18\t \x01(\t\x12\x12\n\nimage_type\x18\n \x01(\t\x12\x33\n&insecure_kubelet_readonly_port_enabled\x18\r \x01(\x08H\x00\x88\x01\x01\x42)\n\'_insecure_kubelet_readonly_port_enabled\"H\n\rResourceLimit\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x0f\n\x07minimum\x18\x02 \x01(\x03\x12\x0f\n\x07maximum\x18\x03 \x01(\x03\",\n\x19\x44\x65\x66\x61ultComputeClassConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xcc\x02\n\x13NodePoolAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0emin_node_count\x18\x02 \x01(\x05\x12\x16\n\x0emax_node_count\x18\x03 \x01(\x05\x12\x17\n\x0f\x61utoprovisioned\x18\x04 \x01(\x08\x12U\n\x0flocation_policy\x18\x05 \x01(\x0e\x32<.google.container.v1beta1.NodePoolAutoscaling.LocationPolicy\x12\x1c\n\x14total_min_node_count\x18\x06 \x01(\x05\x12\x1c\n\x14total_max_node_count\x18\x07 \x01(\x05\"H\n\x0eLocationPolicy\x12\x1f\n\x1bLOCATION_POLICY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"\x97\x02\n\x10SetLabelsRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\\\n\x0fresource_labels\x18\x04 \x03(\x0b\x32>.google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntryB\x03\xe0\x41\x02\x12\x1e\n\x11label_fingerprint\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x07 \x01(\t\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x14SetLegacyAbacRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\x84\x01\n\x16StartIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x1a\n\x12rotate_credentials\x18\x07 \x01(\x08\"k\n\x19\x43ompleteIPRotationRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xfc\x02\n\x11\x41\x63\x63\x65leratorConfig\x12\x19\n\x11\x61\x63\x63\x65lerator_count\x18\x01 \x01(\x03\x12\x18\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\t\x12\x1a\n\x12gpu_partition_size\x18\x03 \x01(\t\x12+\n\x1fmax_time_shared_clients_per_gpu\x18\x04 \x01(\x03\x42\x02\x18\x01\x12K\n\x12gpu_sharing_config\x18\x05 \x01(\x0b\x32*.google.container.v1beta1.GPUSharingConfigH\x00\x88\x01\x01\x12\x62\n\x1egpu_driver_installation_config\x18\x06 \x01(\x0b\x32\x35.google.container.v1beta1.GPUDriverInstallationConfigH\x01\x88\x01\x01\x42\x15\n\x13_gpu_sharing_configB!\n\x1f_gpu_driver_installation_config\"\x88\x02\n\x10GPUSharingConfig\x12\"\n\x1amax_shared_clients_per_gpu\x18\x01 \x01(\x03\x12`\n\x14gpu_sharing_strategy\x18\x02 \x01(\x0e\x32=.google.container.v1beta1.GPUSharingConfig.GPUSharingStrategyH\x00\x88\x01\x01\"U\n\x12GPUSharingStrategy\x12$\n GPU_SHARING_STRATEGY_UNSPECIFIED\x10\x00\x12\x10\n\x0cTIME_SHARING\x10\x01\x12\x07\n\x03MPS\x10\x02\x42\x17\n\x15_gpu_sharing_strategy\"\x89\x02\n\x1bGPUDriverInstallationConfig\x12g\n\x12gpu_driver_version\x18\x01 \x01(\x0e\x32\x46.google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersionH\x00\x88\x01\x01\"j\n\x10GPUDriverVersion\x12\"\n\x1eGPU_DRIVER_VERSION_UNSPECIFIED\x10\x00\x12\x19\n\x15INSTALLATION_DISABLED\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\n\n\x06LATEST\x10\x03\x42\x15\n\x13_gpu_driver_version\"z\n\x17ManagedPrometheusConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12N\n\x16\x61uto_monitoring_config\x18\x02 \x01(\x0b\x32..google.container.v1beta1.AutoMonitoringConfig\"\x8e\x01\n\x14\x41utoMonitoringConfig\x12\x43\n\x05scope\x18\x01 \x01(\x0e\x32\x34.google.container.v1beta1.AutoMonitoringConfig.Scope\"1\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x08\n\x04NONE\x10\x02\"\xcb\x02\n\x16WorkloadMetadataConfig\x12X\n\rnode_metadata\x18\x01 \x01(\x0e\x32=.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadataB\x02\x18\x01\x12\x43\n\x04mode\x18\x02 \x01(\x0e\x32\x35.google.container.v1beta1.WorkloadMetadataConfig.Mode\"P\n\x0cNodeMetadata\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06SECURE\x10\x01\x12\n\n\x06\x45XPOSE\x10\x02\x12\x17\n\x13GKE_METADATA_SERVER\x10\x03\"@\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGCE_METADATA\x10\x01\x12\x10\n\x0cGKE_METADATA\x10\x02\"\xaf\x01\n\x17SetNetworkPolicyRequest\x12\x16\n\nproject_id\x18\x01 \x01(\tB\x02\x18\x01\x12\x10\n\x04zone\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\ncluster_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x44\n\x0enetwork_policy\x18\x04 \x01(\x0b\x32\'.google.container.v1beta1.NetworkPolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x06 \x01(\t\"\xbe\x01\n\x1bSetMaintenancePolicyRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12L\n\x12maintenance_policy\x18\x04 \x01(\x0b\x32+.google.container.v1beta1.MaintenancePolicyB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x05 \x01(\t\"+\n\x14ListLocationsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"g\n\x15ListLocationsResponse\x12\x35\n\tlocations\x18\x01 \x03(\x0b\x32\".google.container.v1beta1.Location\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x08Location\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.container.v1beta1.Location.LocationType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0brecommended\x18\x03 \x01(\x08\"C\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04ZONE\x10\x01\x12\n\n\x06REGION\x10\x02\"\xfd\x02\n\x0fStatusCondition\x12@\n\x04\x63ode\x18\x01 \x01(\x0e\x32..google.container.v1beta1.StatusCondition.CodeB\x02\x18\x01\x12\x0f\n\x07message\x18\x02 \x01(\t\x12(\n\x0e\x63\x61nonical_code\x18\x03 \x01(\x0e\x32\x10.google.rpc.Code\"\xec\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cGCE_STOCKOUT\x10\x01\x12\x1f\n\x1bGKE_SERVICE_ACCOUNT_DELETED\x10\x02\x12\x16\n\x12GCE_QUOTA_EXCEEDED\x10\x03\x12\x13\n\x0fSET_BY_OPERATOR\x10\x04\x12\x17\n\x13\x43LOUD_KMS_KEY_ERROR\x10\x07\x12\x0f\n\x0b\x43\x41_EXPIRING\x10\t\x12,\n(NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS\x10\n\x12\x1b\n\x17\x43LOUD_KMS_KEY_DESTROYED\x10\x0b\x1a\x02\x18\x01\"\x92\x0b\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x1c\x65nable_intra_node_visibility\x18\x05 \x01(\x08\x12H\n\x13\x64\x65\x66\x61ult_snat_status\x18\x07 \x01(\x0b\x32+.google.container.v1beta1.DefaultSnatStatus\x12\x1f\n\x17\x65nable_l4ilb_subsetting\x18\n \x01(\x08\x12\x45\n\x11\x64\x61tapath_provider\x18\x0b \x01(\x0e\x32*.google.container.v1beta1.DatapathProvider\x12U\n\x1aprivate_ipv6_google_access\x18\x0c \x01(\x0e\x32\x31.google.container.v1beta1.PrivateIPv6GoogleAccess\x12\x37\n\ndns_config\x18\r \x01(\x0b\x32#.google.container.v1beta1.DNSConfig\x12W\n\x1bservice_external_ips_config\x18\x0f \x01(\x0b\x32\x32.google.container.v1beta1.ServiceExternalIPsConfig\x12\x46\n\x12gateway_api_config\x18\x10 \x01(\x0b\x32*.google.container.v1beta1.GatewayAPIConfig\x12\x1f\n\x17\x65nable_multi_networking\x18\x11 \x01(\x08\x12k\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32G.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig\x12\'\n\x1a\x65nable_fqdn_network_policy\x18\x13 \x01(\x08H\x00\x88\x01\x01\x12^\n\x1cin_transit_encryption_config\x18\x14 \x01(\x0e\x32\x33.google.container.v1beta1.InTransitEncryptionConfigH\x01\x88\x01\x01\x12\x35\n(enable_cilium_clusterwide_network_policy\x18\x15 \x01(\x08H\x02\x88\x01\x01\x12)\n\x1c\x64\x65\x66\x61ult_enable_private_nodes\x18\x16 \x01(\x08H\x03\x88\x01\x01\x12\x32\n%disable_l4_lb_firewall_reconciliation\x18\x18 \x01(\x08H\x04\x88\x01\x01\x1a\xe3\x01\n\x1f\x43lusterNetworkPerformanceConfig\x12v\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32L.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.TierH\x00\x88\x01\x01\"(\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\n\n\x06TIER_1\x10\x01\x42\x1e\n\x1c_total_egress_bandwidth_tierB\x1d\n\x1b_enable_fqdn_network_policyB\x1f\n\x1d_in_transit_encryption_configB+\n)_enable_cilium_clusterwide_network_policyB\x1f\n\x1d_default_enable_private_nodesB(\n&_disable_l4_lb_firewall_reconciliation\"\xc5\x01\n\x10GatewayAPIConfig\x12\x43\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x32.google.container.v1beta1.GatewayAPIConfig.Channel\"l\n\x07\x43hannel\x12\x17\n\x13\x43HANNEL_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43HANNEL_DISABLED\x10\x01\x12\x1c\n\x14\x43HANNEL_EXPERIMENTAL\x10\x03\x1a\x02\x08\x01\x12\x14\n\x10\x43HANNEL_STANDARD\x10\x04\"+\n\x18ServiceExternalIPsConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"j\n\x1cListUsableSubnetworksRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"y\n\x1dListUsableSubnetworksResponse\x12?\n\x0bsubnetworks\x18\x01 \x03(\x0b\x32*.google.container.v1beta1.UsableSubnetwork\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x85\x02\n\x1eUsableSubnetworkSecondaryRange\x12\x12\n\nrange_name\x18\x01 \x01(\t\x12\x15\n\rip_cidr_range\x18\x02 \x01(\t\x12O\n\x06status\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.UsableSubnetworkSecondaryRange.Status\"g\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x12\n\x0eIN_USE_SERVICE\x10\x02\x12\x18\n\x14IN_USE_SHAREABLE_POD\x10\x03\x12\x16\n\x12IN_USE_MANAGED_POD\x10\x04\"\xbd\x01\n\x10UsableSubnetwork\x12\x12\n\nsubnetwork\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12U\n\x13secondary_ip_ranges\x18\x04 \x03(\x0b\x32\x38.google.container.v1beta1.UsableSubnetworkSecondaryRange\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\")\n\x16VerticalPodAutoscaling\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x11\x44\x65\x66\x61ultSnatStatus\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\",\n\x19IntraNodeVisibilityConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"&\n\x13ILBSubsettingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x81\x03\n\tDNSConfig\x12\x41\n\x0b\x63luster_dns\x18\x01 \x01(\x0e\x32,.google.container.v1beta1.DNSConfig.Provider\x12G\n\x11\x63luster_dns_scope\x18\x02 \x01(\x0e\x32,.google.container.v1beta1.DNSConfig.DNSScope\x12\x1a\n\x12\x63luster_dns_domain\x18\x03 \x01(\t\x12*\n\x1d\x61\x64\x64itive_vpc_scope_dns_domain\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x08Provider\x12\x18\n\x14PROVIDER_UNSPECIFIED\x10\x00\x12\x14\n\x10PLATFORM_DEFAULT\x10\x01\x12\r\n\tCLOUD_DNS\x10\x02\x12\x0c\n\x08KUBE_DNS\x10\x03\"G\n\x08\x44NSScope\x12\x19\n\x15\x44NS_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rCLUSTER_SCOPE\x10\x01\x12\r\n\tVPC_SCOPE\x10\x02\".\n\x11MaxPodsConstraint\x12\x19\n\x11max_pods_per_node\x18\x01 \x01(\x03\"j\n\x16WorkloadIdentityConfig\x12\x1e\n\x12identity_namespace\x18\x01 \x01(\tB\x02\x18\x01\x12\x15\n\rworkload_pool\x18\x02 \x01(\t\x12\x19\n\x11identity_provider\x18\x03 \x01(\t\"E\n\x12WorkloadALTSConfig\x12/\n\x0b\x65nable_alts\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"O\n\x14WorkloadCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"K\n\x10MeshCertificates\x12\x37\n\x13\x65nable_certificates\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"\xf2\x05\n\x12\x44\x61tabaseEncryption\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32\x32.google.container.v1beta1.DatabaseEncryption.State\x12Z\n\rcurrent_state\x18\x03 \x01(\x0e\x32\x39.google.container.v1beta1.DatabaseEncryption.CurrentStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x63ryption_keys\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12_\n\x15last_operation_errors\x18\x05 \x03(\x0b\x32;.google.container.v1beta1.DatabaseEncryption.OperationErrorB\x03\xe0\x41\x03\x1ah\n\x0eOperationError\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"2\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tENCRYPTED\x10\x01\x12\r\n\tDECRYPTED\x10\x02\"\xfb\x01\n\x0c\x43urrentState\x12\x1d\n\x19\x43URRENT_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43URRENT_STATE_ENCRYPTED\x10\x07\x12\x1b\n\x17\x43URRENT_STATE_DECRYPTED\x10\x02\x12$\n CURRENT_STATE_ENCRYPTION_PENDING\x10\x03\x12\"\n\x1e\x43URRENT_STATE_ENCRYPTION_ERROR\x10\x04\x12$\n CURRENT_STATE_DECRYPTION_PENDING\x10\x05\x12\"\n\x1e\x43URRENT_STATE_DECRYPTION_ERROR\x10\x06\x42\x10\n\x0e_current_state\"\xf7\x02\n\x19ResourceUsageExportConfig\x12\x65\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32G.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination\x12&\n\x1e\x65nable_network_egress_metering\x18\x02 \x01(\x08\x12r\n\x1b\x63onsumption_metering_config\x18\x03 \x01(\x0b\x32M.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig\x1a)\n\x13\x42igQueryDestination\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a,\n\x19\x43onsumptionMeteringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\" \n\rShieldedNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nVirtualNIC\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\nFastSocket\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"(\n\x16GetOpenIDConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"\xdf\x02\n\x17GetOpenIDConfigResponse\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x1a\n\x08jwks_uri\x18\x02 \x01(\tR\x08jwks_uri\x12:\n\x18response_types_supported\x18\x03 \x03(\tR\x18response_types_supported\x12\x38\n\x17subject_types_supported\x18\x04 \x03(\tR\x17subject_types_supported\x12T\n%id_token_signing_alg_values_supported\x18\x05 \x03(\tR%id_token_signing_alg_values_supported\x12*\n\x10\x63laims_supported\x18\x06 \x03(\tR\x10\x63laims_supported\x12 \n\x0bgrant_types\x18\x07 \x03(\tR\x0bgrant_types\"\'\n\x15GetJSONWebKeysRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"r\n\x03Jwk\x12\x0b\n\x03kty\x18\x01 \x01(\t\x12\x0b\n\x03\x61lg\x18\x02 \x01(\t\x12\x0b\n\x03use\x18\x03 \x01(\t\x12\x0b\n\x03kid\x18\x04 \x01(\t\x12\t\n\x01n\x18\x05 \x01(\t\x12\t\n\x01\x65\x18\x06 \x01(\t\x12\t\n\x01x\x18\x07 \x01(\t\x12\t\n\x01y\x18\x08 \x01(\t\x12\x0b\n\x03\x63rv\x18\t \x01(\t\"E\n\x16GetJSONWebKeysResponse\x12+\n\x04keys\x18\x01 \x03(\x0b\x32\x1d.google.container.v1beta1.Jwk\"2\n\"CheckAutopilotCompatibilityRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x81\x03\n\x1b\x41utopilotCompatibilityIssue\x12\x34\n\x10last_observation\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onstraint_type\x18\x02 \x01(\t\x12]\n\x14incompatibility_type\x18\x03 \x01(\x0e\x32?.google.container.v1beta1.AutopilotCompatibilityIssue.IssueType\x12\x10\n\x08subjects\x18\x04 \x03(\t\x12\x19\n\x11\x64ocumentation_url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"r\n\tIssueType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fINCOMPATIBILITY\x10\x01\x12\x1e\n\x1a\x41\x44\x44ITIONAL_CONFIG_REQUIRED\x10\x02\x12\x1f\n\x1bPASSED_WITH_OPTIONAL_CONFIG\x10\x03\"}\n#CheckAutopilotCompatibilityResponse\x12\x45\n\x06issues\x18\x01 \x03(\x0b\x32\x35.google.container.v1beta1.AutopilotCompatibilityIssue\x12\x0f\n\x07summary\x18\x02 \x01(\t\"\xa1\x01\n\x0eReleaseChannel\x12\x41\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.ReleaseChannel.Channel\"L\n\x07\x43hannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05RAPID\x10\x01\x12\x0b\n\x07REGULAR\x10\x02\x12\n\n\x06STABLE\x10\x03\x12\x0c\n\x08\x45XTENDED\x10\x04\"\'\n\x14\x43ostManagementConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"Y\n\tTpuConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x16use_service_networking\x18\x02 \x01(\x08\x12\x17\n\x0fipv4_cidr_block\x18\x03 \x01(\t:\x02\x18\x01\"\x08\n\x06Master\"\x94\x01\n\x19\x41utopilotConversionStatus\x12M\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.container.v1beta1.AutopilotConversionStatus.StateB\x03\xe0\x41\x03\"(\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44ONE\x10\x05\"\xc1\x01\n\tAutopilot\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12N\n\x16workload_policy_config\x18\x02 \x01(\x0b\x32..google.container.v1beta1.WorkloadPolicyConfig\x12S\n\x11\x63onversion_status\x18\x03 \x01(\x0b\x32\x33.google.container.v1beta1.AutopilotConversionStatusB\x03\xe0\x41\x03\"\xac\x01\n\x14WorkloadPolicyConfig\x12\x1c\n\x0f\x61llow_net_admin\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x35\n(autopilot_compatibility_auditing_enabled\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_allow_net_adminB+\n)_autopilot_compatibility_auditing_enabled\"\xd0\x03\n\x12NotificationConfig\x12\x43\n\x06pubsub\x18\x01 \x01(\x0b\x32\x33.google.container.v1beta1.NotificationConfig.PubSub\x1a\x8f\x01\n\x06PubSub\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x43\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x33.google.container.v1beta1.NotificationConfig.Filter\x1aT\n\x06\x46ilter\x12J\n\nevent_type\x18\x01 \x03(\x0e\x32\x36.google.container.v1beta1.NotificationConfig.EventType\"\x8c\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17UPGRADE_AVAILABLE_EVENT\x10\x01\x12\x11\n\rUPGRADE_EVENT\x10\x02\x12\x1b\n\x17SECURITY_BULLETIN_EVENT\x10\x03\x12\x16\n\x12UPGRADE_INFO_EVENT\x10\x04\"\xf5\x01\n\x11\x43onfidentialNodes\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12h\n\x1a\x63onfidential_instance_type\x18\x02 \x01(\x0e\x32\x44.google.container.v1beta1.ConfidentialNodes.ConfidentialInstanceType\"e\n\x18\x43onfidentialInstanceType\x12*\n&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SEV\x10\x01\x12\x0b\n\x07SEV_SNP\x10\x02\x12\x07\n\x03TDX\x10\x03\"\xe4\x01\n\x0cUpgradeEvent\x12\x44\n\rresource_type\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x38\n\x14operation_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x10\n\x08resource\x18\x06 \x01(\t\"\xc1\x06\n\x10UpgradeInfoEvent\x12\x44\n\rresource_type\x18\x01 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x11\n\toperation\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63urrent_version\x18\x05 \x01(\t\x12\x16\n\x0etarget_version\x18\x06 \x01(\t\x12\x10\n\x08resource\x18\x07 \x01(\t\x12\x44\n\x05state\x18\x08 \x01(\x0e\x32\x30.google.container.v1beta1.UpgradeInfoEvent.StateB\x03\xe0\x41\x03\x12\x42\n\x19standard_support_end_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x42\n\x19\x65xtended_support_end_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\x12H\n\nevent_type\x18\x0c \x01(\x0e\x32\x34.google.container.v1beta1.UpgradeInfoEvent.EventType\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06\"t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45ND_OF_SUPPORT\x10\x01\x12 \n\x1c\x43OS_MILESTONE_VERSION_UPDATE\x10\x02\x12\x15\n\x11UPGRADE_LIFECYCLE\x10\x03\x42\x1c\n\x1a_standard_support_end_timeB\x1c\n\x1a_extended_support_end_time\"\x88\x02\n\x15UpgradeAvailableEvent\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x44\n\rresource_type\x18\x02 \x01(\x0e\x32-.google.container.v1beta1.UpgradeResourceType\x12\x41\n\x0frelease_channel\x18\x03 \x01(\x0b\x32(.google.container.v1beta1.ReleaseChannel\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x43\n\x10windows_versions\x18\x05 \x01(\x0b\x32).google.container.v1beta1.WindowsVersions\"\xba\x02\n\x15SecurityBulletinEvent\x12\x1e\n\x16resource_type_affected\x18\x01 \x01(\t\x12\x13\n\x0b\x62ulletin_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ve_ids\x18\x03 \x03(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x14\n\x0c\x62ulletin_uri\x18\x05 \x01(\t\x12\x19\n\x11\x62rief_description\x18\x06 \x01(\t\x12!\n\x19\x61\x66\x66\x65\x63ted_supported_minors\x18\x07 \x03(\t\x12\x18\n\x10patched_versions\x18\x08 \x03(\t\x12 \n\x18suggested_upgrade_target\x18\t \x01(\t\x12\x1d\n\x15manual_steps_required\x18\n \x01(\x08\x12\x1a\n\x12mitigated_versions\x18\x0b \x03(\t\"(\n\x15IdentityServiceConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"[\n\rLoggingConfig\x12J\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32\x30.google.container.v1beta1.LoggingComponentConfig\"\xa3\x02\n\x16LoggingComponentConfig\x12U\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32:.google.container.v1beta1.LoggingComponentConfig.Component\"\xb1\x01\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\r\n\tWORKLOADS\x10\x02\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0c\n\x08KCP_SSHD\x10\x07\x12\x12\n\x0eKCP_CONNECTION\x10\x08\x12\x0b\n\x07KCP_HPA\x10\t\"*\n\x17RayClusterLoggingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\xa6\x02\n\x10MonitoringConfig\x12M\n\x10\x63omponent_config\x18\x01 \x01(\x0b\x32\x33.google.container.v1beta1.MonitoringComponentConfig\x12T\n\x19managed_prometheus_config\x18\x02 \x01(\x0b\x32\x31.google.container.v1beta1.ManagedPrometheusConfig\x12m\n&advanced_datapath_observability_config\x18\x03 \x01(\x0b\x32=.google.container.v1beta1.AdvancedDatapathObservabilityConfig\"\xa3\x02\n#AdvancedDatapathObservabilityConfig\x12\x16\n\x0e\x65nable_metrics\x18\x01 \x01(\x08\x12[\n\nrelay_mode\x18\x02 \x01(\x0e\x32G.google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode\x12\x19\n\x0c\x65nable_relay\x18\x03 \x01(\x08H\x00\x88\x01\x01\"[\n\tRelayMode\x12\x1a\n\x16RELAY_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fINTERNAL_VPC_LB\x10\x03\x12\x0f\n\x0b\x45XTERNAL_LB\x10\x04\x42\x0f\n\r_enable_relay\"-\n\x1aRayClusterMonitoringConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"_\n\x15NodePoolLoggingConfig\x12\x46\n\x0evariant_config\x18\x01 \x01(\x0b\x32..google.container.v1beta1.LoggingVariantConfig\"\xa4\x01\n\x14LoggingVariantConfig\x12G\n\x07variant\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.LoggingVariantConfig.Variant\"C\n\x07Variant\x12\x17\n\x13VARIANT_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x12\n\x0eMAX_THROUGHPUT\x10\x02\"\xfe\x02\n\x19MonitoringComponentConfig\x12X\n\x11\x65nable_components\x18\x01 \x03(\x0e\x32=.google.container.v1beta1.MonitoringComponentConfig.Component\"\x86\x02\n\tComponent\x12\x19\n\x15\x43OMPONENT_UNSPECIFIED\x10\x00\x12\x15\n\x11SYSTEM_COMPONENTS\x10\x01\x12\x11\n\tWORKLOADS\x10\x02\x1a\x02\x08\x01\x12\r\n\tAPISERVER\x10\x03\x12\r\n\tSCHEDULER\x10\x04\x12\x16\n\x12\x43ONTROLLER_MANAGER\x10\x05\x12\x0b\n\x07STORAGE\x10\x07\x12\x07\n\x03HPA\x10\x08\x12\x07\n\x03POD\x10\t\x12\r\n\tDAEMONSET\x10\n\x12\x0e\n\nDEPLOYMENT\x10\x0b\x12\x0f\n\x0bSTATEFULSET\x10\x0c\x12\x0c\n\x08\x43\x41\x44VISOR\x10\r\x12\x0b\n\x07KUBELET\x10\x0e\x12\x08\n\x04\x44\x43GM\x10\x0f\x12\n\n\x06JOBSET\x10\x10\"\xb5\x01\n\x0ePodAutoscaling\x12M\n\x0bhpa_profile\x18\x02 \x01(\x0e\x32\x33.google.container.v1beta1.PodAutoscaling.HPAProfileH\x00\x88\x01\x01\"D\n\nHPAProfile\x12\x1b\n\x17HPA_PROFILE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0f\n\x0bPERFORMANCE\x10\x02\x42\x0e\n\x0c_hpa_profile\"N\n\x05\x46leet\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x17\n\nmembership\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0epre_registered\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\xbb\x05\n\x1b\x43ontrolPlaneEndpointsConfig\x12\x64\n\x13\x64ns_endpoint_config\x18\x01 \x01(\x0b\x32G.google.container.v1beta1.ControlPlaneEndpointsConfig.DNSEndpointConfig\x12\x64\n\x13ip_endpoints_config\x18\x03 \x01(\x0b\x32G.google.container.v1beta1.ControlPlaneEndpointsConfig.IPEndpointsConfig\x1aj\n\x11\x44NSEndpointConfig\x12\x15\n\x08\x65ndpoint\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61llow_external_traffic\x18\x03 \x01(\x08H\x00\x88\x01\x01\x42\x19\n\x17_allow_external_traffic\x1a\xe3\x02\n\x11IPEndpointsConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x65nable_public_endpoint\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\rglobal_access\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\\\n\x1a\x61uthorized_networks_config\x18\x04 \x01(\x0b\x32\x38.google.container.v1beta1.MasterAuthorizedNetworksConfig\x12\x1c\n\x0fpublic_endpoint\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10private_endpoint\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12#\n\x1bprivate_endpoint_subnetwork\x18\x07 \x01(\tB\n\n\x08_enabledB\x19\n\x17_enable_public_endpointB\x10\n\x0e_global_access\"\x89\x01\n\x13ResourceManagerTags\x12\x45\n\x04tags\x18\x01 \x03(\x0b\x32\x37.google.container.v1beta1.ResourceManagerTags.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfe\x01\n\x10\x45nterpriseConfig\x12Q\n\x0c\x63luster_tier\x18\x01 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTierB\x03\xe0\x41\x03\x12L\n\x0c\x64\x65sired_tier\x18\x02 \x01(\x0e\x32\x36.google.container.v1beta1.EnterpriseConfig.ClusterTier\"I\n\x0b\x43lusterTier\x12\x1c\n\x18\x43LUSTER_TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\"\xad\x02\n\x13SecretManagerConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12Z\n\x0frotation_config\x18\x02 \x01(\x0b\x32<.google.container.v1beta1.SecretManagerConfig.RotationConfigH\x01\x88\x01\x01\x1a\x83\x01\n\x0eRotationConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x39\n\x11rotation_interval\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x42\n\n\x08_enabledB\x14\n\x12_rotation_intervalB\n\n\x08_enabledB\x12\n\x10_rotation_config\"h\n\x08\x42ootDisk\x12\x11\n\tdisk_type\x18\x01 \x01(\t\x12\x0f\n\x07size_gb\x18\x02 \x01(\x03\x12\x18\n\x10provisioned_iops\x18\x03 \x01(\x03\x12\x1e\n\x16provisioned_throughput\x18\x04 \x01(\x03\"\xa0\x01\n\x11SecondaryBootDisk\x12>\n\x04mode\x18\x01 \x01(\x0e\x32\x30.google.container.v1beta1.SecondaryBootDisk.Mode\x12\x12\n\ndisk_image\x18\x02 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONTAINER_IMAGE_CACHE\x10\x01\"!\n\x1fSecondaryBootDiskUpdateStrategy\"D\n\x1e\x46\x65tchClusterUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xa4\x07\n\x12\x43lusterUpgradeInfo\x12!\n\x14minor_target_version\x18\x07 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x08 \x01(\tH\x01\x88\x01\x01\x12[\n\x13\x61uto_upgrade_status\x18\x02 \x03(\x0e\x32>.google.container.v1beta1.ClusterUpgradeInfo.AutoUpgradeStatus\x12[\n\rpaused_reason\x18\x03 \x03(\x0e\x32\x44.google.container.v1beta1.ClusterUpgradeInfo.AutoUpgradePausedReason\x12\x41\n\x0fupgrade_details\x18\x04 \x03(\x0b\x32(.google.container.v1beta1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x05 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x06 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x04\x12\x12\n\x0eUPGRADE_PAUSED\x10\x05\"\x90\x02\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x05\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x06\x12\x1d\n\x19\x43LUSTER_DISRUPTION_BUDGET\x10\x04\x12+\n\'CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE\x10\x07\x12\x11\n\rSYSTEM_CONFIG\x10\x08\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp\"\xe1\x03\n\x0eUpgradeDetails\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.container.v1beta1.UpgradeDetails.StateB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12\x17\n\x0finitial_version\x18\x04 \x01(\t\x12\x16\n\x0etarget_version\x18\x05 \x01(\t\x12\x46\n\nstart_type\x18\x06 \x01(\x0e\x32\x32.google.container.v1beta1.UpgradeDetails.StartType\"J\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\"B\n\tStartType\x12\x1a\n\x16START_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\x42\r\n\x0b_start_timeB\x0b\n\t_end_time\"E\n\x1f\x46\x65tchNodePoolUpgradeInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07version\x18\x64 \x01(\t\"\xdb\x06\n\x13NodePoolUpgradeInfo\x12!\n\x14minor_target_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14patch_target_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\\\n\x13\x61uto_upgrade_status\x18\x03 \x03(\x0e\x32?.google.container.v1beta1.NodePoolUpgradeInfo.AutoUpgradeStatus\x12\\\n\rpaused_reason\x18\x04 \x03(\x0e\x32\x45.google.container.v1beta1.NodePoolUpgradeInfo.AutoUpgradePausedReason\x12\x41\n\x0fupgrade_details\x18\x05 \x03(\x0b\x32(.google.container.v1beta1.UpgradeDetails\x12.\n!end_of_standard_support_timestamp\x18\x06 \x01(\tH\x02\x88\x01\x01\x12.\n!end_of_extended_support_timestamp\x18\x07 \x01(\tH\x03\x88\x01\x01\"Z\n\x11\x41utoUpgradeStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x18\n\x14MINOR_UPGRADE_PAUSED\x10\x02\x12\x12\n\x0eUPGRADE_PAUSED\x10\x03\"\xc4\x01\n\x17\x41utoUpgradePausedReason\x12*\n&AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12MAINTENANCE_WINDOW\x10\x01\x12%\n!MAINTENANCE_EXCLUSION_NO_UPGRADES\x10\x02\x12+\n\'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES\x10\x03\x12\x11\n\rSYSTEM_CONFIG\x10\x04\x42\x17\n\x15_minor_target_versionB\x17\n\x15_patch_target_versionB$\n\"_end_of_standard_support_timestampB$\n\"_end_of_extended_support_timestamp\"\x9e\x01\n\x14GkeAutoUpgradeConfig\x12L\n\npatch_mode\x18\x01 \x01(\x0e\x32\x38.google.container.v1beta1.GkeAutoUpgradeConfig.PatchMode\"8\n\tPatchMode\x12\x1a\n\x16PATCH_MODE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41\x43\x43\x45LERATED\x10\x01*\xc6\x01\n\x17PrivateIPv6GoogleAccess\x12*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\'\n#PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED\x10\x01\x12(\n$PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE\x10\x02\x12,\n(PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL\x10\x03*W\n\x13UpgradeResourceType\x12%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MASTER\x10\x01\x12\r\n\tNODE_POOL\x10\x02*^\n\x16NodePoolUpdateStrategy\x12)\n%NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nBLUE_GREEN\x10\x02\x12\t\n\x05SURGE\x10\x03*a\n\x10\x44\x61tapathProvider\x12!\n\x1d\x44\x41TAPATH_PROVIDER_UNSPECIFIED\x10\x00\x12\x13\n\x0fLEGACY_DATAPATH\x10\x01\x12\x15\n\x11\x41\x44VANCED_DATAPATH\x10\x02*@\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02*\x9f\x01\n\x19InTransitEncryptionConfig\x12,\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED\x10\x00\x12\"\n\x1eIN_TRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x30\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT\x10\x02\x32\x95S\n\x0e\x43lusterManager\x12\xf3\x01\n\x0cListClusters\x12-.google.container.v1beta1.ListClustersRequest\x1a..google.container.v1beta1.ListClustersResponse\"\x83\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02k\x12\x31/v1beta1/{parent=projects/*/locations/*}/clustersZ6\x12\x34/v1beta1/projects/{project_id}/zones/{zone}/clusters\x12\xfa\x01\n\nGetCluster\x12+.google.container.v1beta1.GetClusterRequest\x1a!.google.container.v1beta1.Cluster\"\x9b\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02x\x12\x31/v1beta1/{name=projects/*/locations/*/clusters/*}ZC\x12\x41/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}\x12\xf8\x01\n\rCreateCluster\x12..google.container.v1beta1.CreateClusterRequest\x1a#.google.container.v1beta1.Operation\"\x91\x01\xda\x41\x17project_id,zone,cluster\x82\xd3\xe4\x93\x02q\"1/v1beta1/{parent=projects/*/locations/*}/clusters:\x01*Z9\"4/v1beta1/projects/{project_id}/zones/{zone}/clusters:\x01*\x12\x8f\x02\n\rUpdateCluster\x12..google.container.v1beta1.UpdateClusterRequest\x1a#.google.container.v1beta1.Operation\"\xa8\x01\xda\x41!project_id,zone,cluster_id,update\x82\xd3\xe4\x93\x02~\x1a\x31/v1beta1/{name=projects/*/locations/*/clusters/*}:\x01*ZF\x1a\x41/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:\x01*\x12\x9a\x02\n\x0eUpdateNodePool\x12/.google.container.v1beta1.UpdateNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xb1\x01\x82\xd3\xe4\x93\x02\xaa\x01\x1a=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:\x01*Zf\"a/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update:\x01*\x12\xbe\x02\n\x16SetNodePoolAutoscaling\x12\x37.google.container.v1beta1.SetNodePoolAutoscalingRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\x82\xd3\xe4\x93\x02\xbe\x01\"L/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling:\x01*Zk\"f/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling:\x01*\x12\xb4\x02\n\x11SetLoggingService\x12\x32.google.container.v1beta1.SetLoggingServiceRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\xda\x41*project_id,zone,cluster_id,logging_service\x82\xd3\xe4\x93\x02\x91\x01\"/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations:\x01*ZP\"K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations:\x01*\x12\xaa\x02\n\x0cUpdateMaster\x12-.google.container.v1beta1.UpdateMasterRequest\x1a#.google.container.v1beta1.Operation\"\xc5\x01\xda\x41)project_id,zone,cluster_id,master_version\x82\xd3\xe4\x93\x02\x92\x01\">/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster:\x01*ZM\"H/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master:\x01*\x12\x88\x02\n\rSetMasterAuth\x12..google.container.v1beta1.SetMasterAuthRequest\x1a#.google.container.v1beta1.Operation\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"?/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth:\x01*ZT\"O/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth:\x01*\x12\x82\x02\n\rDeleteCluster\x12..google.container.v1beta1.DeleteClusterRequest\x1a#.google.container.v1beta1.Operation\"\x9b\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02x*1/v1beta1/{name=projects/*/locations/*/clusters/*}ZC*A/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}\x12\xfd\x01\n\x0eListOperations\x12/.google.container.v1beta1.ListOperationsRequest\x1a\x30.google.container.v1beta1.ListOperationsResponse\"\x87\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02o\x12\x33/v1beta1/{parent=projects/*/locations/*}/operationsZ8\x12\x36/v1beta1/projects/{project_id}/zones/{zone}/operations\x12\x88\x02\n\x0cGetOperation\x12-.google.container.v1beta1.GetOperationRequest\x1a#.google.container.v1beta1.Operation\"\xa3\x01\xda\x41\x1cproject_id,zone,operation_id\x82\xd3\xe4\x93\x02~\x12\x33/v1beta1/{name=projects/*/locations/*/operations/*}ZG\x12\x45/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}\x12\x96\x02\n\x0f\x43\x61ncelOperation\x12\x30.google.container.v1beta1.CancelOperationRequest\x1a\x16.google.protobuf.Empty\"\xb8\x01\xda\x41\x1cproject_id,zone,operation_id\x82\xd3\xe4\x93\x02\x92\x01\":/v1beta1/{name=projects/*/locations/*/operations/*}:cancel:\x01*ZQ\"L/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel:\x01*\x12\xf7\x01\n\x0fGetServerConfig\x12\x30.google.container.v1beta1.GetServerConfigRequest\x1a&.google.container.v1beta1.ServerConfig\"\x89\x01\xda\x41\x0fproject_id,zone\x82\xd3\xe4\x93\x02q\x12\x33/v1beta1/{name=projects/*/locations/*}/serverConfigZ:\x12\x38/v1beta1/projects/{project_id}/zones/{zone}/serverconfig\x12\xb5\x01\n\x0eGetJSONWebKeys\x12/.google.container.v1beta1.GetJSONWebKeysRequest\x1a\x30.google.container.v1beta1.GetJSONWebKeysResponse\"@\x82\xd3\xe4\x93\x02:\x12\x38/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks\x12\xa5\x02\n\rListNodePools\x12..google.container.v1beta1.ListNodePoolsRequest\x1a/.google.container.v1beta1.ListNodePoolsResponse\"\xb2\x01\xda\x41\x1aproject_id,zone,cluster_id\x82\xd3\xe4\x93\x02\x8e\x01\x12=/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePoolsZM\x12K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools\x12\xb0\x02\n\x0bGetNodePool\x12,.google.container.v1beta1.GetNodePoolRequest\x1a\".google.container.v1beta1.NodePool\"\xce\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\x9d\x01\x12=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}Z\\\x12Z/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}\x12\xab\x02\n\x0e\x43reateNodePool\x12/.google.container.v1beta1.CreateNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xc2\x01\xda\x41$project_id,zone,cluster_id,node_pool\x82\xd3\xe4\x93\x02\x94\x01\"=/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools:\x01*ZP\"K/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools:\x01*\x12\xb7\x02\n\x0e\x44\x65leteNodePool\x12/.google.container.v1beta1.DeleteNodePoolRequest\x1a#.google.container.v1beta1.Operation\"\xce\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\x9d\x01*=/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}Z\\*Z/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}\x12\xc5\x01\n\x17\x43ompleteNodePoolUpgrade\x12\x38.google.container.v1beta1.CompleteNodePoolUpgradeRequest\x1a\x16.google.protobuf.Empty\"X\x82\xd3\xe4\x93\x02R\"M/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade:\x01*\x12\xe1\x02\n\x17RollbackNodePoolUpgrade\x12\x38.google.container.v1beta1.RollbackNodePoolUpgradeRequest\x1a#.google.container.v1beta1.Operation\"\xe6\x01\xda\x41\'project_id,zone,cluster_id,node_pool_id\x82\xd3\xe4\x93\x02\xb5\x01\"F/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback:\x01*Zh\"c/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback:\x01*\x12\xf2\x02\n\x15SetNodePoolManagement\x12\x36.google.container.v1beta1.SetNodePoolManagementRequest\x1a#.google.container.v1beta1.Operation\"\xfb\x01\xda\x41\x32project_id,zone,cluster_id,node_pool_id,management\x82\xd3\xe4\x93\x02\xbf\x01\"K/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement:\x01*Zm\"h/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement:\x01*\x12\xc4\x02\n\tSetLabels\x12*.google.container.v1beta1.SetLabelsRequest\x1a#.google.container.v1beta1.Operation\"\xe5\x01\xda\x41= 100Mi and <= 50% + # of the node's memory. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_available + # @return [::String] + # Optional. Amount of storage available on filesystem that kubelet uses for + # volumes, daemon logs, etc. Defines the amount of "nodefs.available" signal + # in kubelet. Default is unset, if not specified in the kubelet config. + # Sample format: "30%". Must be >= 10%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_inodes_free + # @return [::String] + # Optional. Amount of inodes available on filesystem that kubelet uses for + # volumes, daemon logs, etc. Defines the amount of "nodefs.inodesFree" signal + # in kubelet. Default is unset, if not specified in the kubelet config. Linux + # only. It takses percentage value for now. Sample format: "30%". Must be >= + # 5% and <= 50%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_available + # @return [::String] + # Optional. Amount of storage available on filesystem that container runtime + # uses for storing images layers. If the container filesystem and image + # filesystem are not separate, then imagefs can store both image layers and + # writeable layers. Defines the amount of "imagefs.available" signal in + # kubelet. Default is unset, if not specified in the kubelet config. Sample + # format: "30%". Must be >= 15%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_inodes_free + # @return [::String] + # Optional. Amount of inodes available on filesystem that container runtime + # uses for storing images layers. Defines the amount of "imagefs.inodesFree" + # signal in kubelet. Default is unset, if not specified in the kubelet + # config. Linux only. Sample format: "30%". Must be >= 5%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] pid_available + # @return [::String] + # Optional. Amount of PID available for pod allocation. Defines the amount of + # "pid.available" signal in kubelet. Default is unset, if not specified in + # the kubelet config. Sample format: "30%". Must be >= 10%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + class EvictionSignals + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Eviction grace periods are grace periods for each eviction signal. + # @!attribute [rw] memory_available + # @return [::String] + # Optional. Grace period for eviction due to memory available signal. Sample + # format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_available + # @return [::String] + # Optional. Grace period for eviction due to nodefs available signal. Sample + # format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_inodes_free + # @return [::String] + # Optional. Grace period for eviction due to nodefs inodes free signal. + # Sample format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_available + # @return [::String] + # Optional. Grace period for eviction due to imagefs available signal. Sample + # format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_inodes_free + # @return [::String] + # Optional. Grace period for eviction due to imagefs inodes free signal. + # Sample format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] pid_available + # @return [::String] + # Optional. Grace period for eviction due to pid available signal. Sample + # format: "10s". Must be >= 0. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + class EvictionGracePeriod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Eviction minimum reclaims are the resource amounts of minimum reclaims for + # each eviction signal. + # @!attribute [rw] memory_available + # @return [::String] + # Optional. Minimum reclaim for eviction due to memory available signal. Only + # take percentage value for now. Sample format: "10%". Must be <=10%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_available + # @return [::String] + # Optional. Minimum reclaim for eviction due to nodefs available signal. Only + # take percentage value for now. Sample format: "10%". Must be <=10%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] nodefs_inodes_free + # @return [::String] + # Optional. Minimum reclaim for eviction due to nodefs inodes free signal. + # Only take percentage value for now. Sample format: "10%". Must be <=10%. + # See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_available + # @return [::String] + # Optional. Minimum reclaim for eviction due to imagefs available signal. + # Only take percentage value for now. Sample format: "10%". Must be <=10%. + # See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] imagefs_inodes_free + # @return [::String] + # Optional. Minimum reclaim for eviction due to imagefs inodes free signal. + # Only take percentage value for now. Sample format: "10%". Must be <=10%. + # See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + # @!attribute [rw] pid_available + # @return [::String] + # Optional. Minimum reclaim for eviction due to pid available signal. Only + # take percentage value for now. Sample format: "10%". Must be <=10%. See + # https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + class EvictionMinimumReclaim + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Parameters that describe the nodes in a cluster. # # GKE Autopilot clusters do not @@ -337,6 +589,7 @@ class MemoryManager # @return [::Integer] # Size of the disk attached to each node, specified in GB. # The smallest allowed disk size is 10GB. + # # If unspecified, the default disk size is 100GB. # @!attribute [rw] oauth_scopes # @return [::Array<::String>] @@ -398,8 +651,8 @@ class MemoryManager # @return [::String] # The image type to use for this node. Note that for a given image type, # the latest version of it will be used. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # The map of Kubernetes labels (key/value pairs) to be applied to each node. @@ -427,13 +680,14 @@ class MemoryManager # @!attribute [rw] preemptible # @return [::Boolean] # Whether the nodes are created as preemptible VM instances. See: - # https://cloud.google.com/compute/docs/instances/preemptible for more - # information about preemptible VM instances. + # https://cloud.google.com/compute/docs/instances/preemptible + # for more information about preemptible VM instances. # @!attribute [rw] accelerators # @return [::Array<::Google::Cloud::Container::V1beta1::AcceleratorConfig>] # A list of hardware accelerators to be attached to each node. - # See https://cloud.google.com/compute/docs/gpus for more information about - # support for GPUs. + # See + # https://cloud.google.com/compute/docs/gpus + # for more information about support for GPUs. # @!attribute [rw] sandbox_config # @return [::Google::Cloud::Container::V1beta1::SandboxConfig] # Sandbox configuration for this node. @@ -574,6 +828,9 @@ class MemoryManager # @!attribute [rw] flex_start # @return [::Boolean] # Flex Start flag for enabling Flex Start VM. + # @!attribute [rw] boot_disk + # @return [::Google::Cloud::Container::V1beta1::BootDisk] + # Boot disk configuration for the node pool. class NodeConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -658,7 +915,7 @@ class AdvancedMachineFeatures include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # Level of PMU access + # Level of PMU access. module PerformanceMonitoringUnit # PMU not enabled. PERFORMANCE_MONITORING_UNIT_UNSPECIFIED = 0 @@ -751,6 +1008,13 @@ module PerformanceMonitoringUnit # Output only. The utilization of the IPv4 range for the pod. # The ratio is Usage/[Total number of IPs in the secondary range], # Usage=numNodes*numZones*podIPsPerNode. + # @!attribute [r] subnetwork + # @return [::String] + # Output only. The subnetwork path for the node pool. + # Format: projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} + # If the cluster is associated with multiple subnetworks, the subnetwork for + # the node pool is picked based on the IP utilization during node pool + # creation and is immutable. class NodeNetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -982,6 +1246,11 @@ module Type # @!attribute [rw] node_affinities # @return [::Array<::Google::Cloud::Container::V1beta1::SoleTenantConfig::NodeAffinity>] # NodeAffinities used to match to a shared sole tenant node group. + # @!attribute [rw] min_node_cpus + # @return [::Integer] + # Optional. The minimum number of virtual CPUs this instance will consume + # when running on a sole-tenant node. This field can only be set if the node + # pool is created in a shared sole-tenant node group. class SoleTenantConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1056,7 +1325,8 @@ class CertificateAuthorityDomainConfig extend ::Google::Protobuf::MessageExts::ClassMethods # GCPSecretManagerCertificateConfig configures a secret from - # [Google Secret Manager](https://cloud.google.com/secret-manager). + # [Google Secret + # Manager](https://cloud.google.com/secret-manager). # @!attribute [rw] secret_uri # @return [::String] # Secret URI, in the form @@ -1347,6 +1617,9 @@ class ClientCertificateConfig # @!attribute [rw] high_scale_checkpointing_config # @return [::Google::Cloud::Container::V1beta1::HighScaleCheckpointingConfig] # Configuration for the High Scale Checkpointing add-on. + # @!attribute [rw] lustre_csi_driver_config + # @return [::Google::Cloud::Container::V1beta1::LustreCsiDriverConfig] + # Configuration for the Lustre CSI driver. class AddonsConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1490,6 +1763,19 @@ class HighScaleCheckpointingConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for the Lustre CSI driver. + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the Lustre CSI driver is enabled for this cluster. + # @!attribute [rw] enable_legacy_lustre_port + # @return [::Boolean] + # If set to true, the Lustre CSI driver will install Lustre kernel modules + # using port 6988. + class LustreCsiDriverConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Configuration options for the Ray Operator add-on. # @!attribute [rw] enabled # @return [::Boolean] @@ -1880,6 +2166,16 @@ class PodCIDROverprovisionConfig # Output only. The utilization of the cluster default IPv4 range for the # pod. The ratio is Usage/[Total number of IPs in the secondary range], # Usage=numNodes*numZones*podIPsPerNode. + # @!attribute [r] additional_ip_ranges_configs + # @return [::Array<::Google::Cloud::Container::V1beta1::AdditionalIPRangesConfig>] + # Output only. The additional IP ranges that are added to the cluster. + # These IP ranges can be used by new node pools to allocate node and pod IPs + # automatically. + # Each AdditionalIPRangesConfig corresponds to a single subnetwork. + # Once a range is removed it will not show up in IPAllocationPolicy. + # @!attribute [rw] auto_ipam_config + # @return [::Google::Cloud::Container::V1beta1::AutoIpamConfig] + # Optional. AutoIpamConfig contains all information related to Auto IPAM class IPAllocationPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2027,7 +2323,8 @@ module Type # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The number of nodes to create in this cluster. You must ensure that your - # Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + # Compute Engine [resource + # quota](https://cloud.google.com/compute/quotas) # is sufficient for this number of instances. You must also have available # firewall and routes quota. # For requests, this field should only be used in lieu of a @@ -2102,9 +2399,9 @@ module Type # @!attribute [rw] subnetwork # @return [::String] # The name of the Google Compute Engine - # [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which - # the cluster is connected. On output this shows the subnetwork ID instead of - # the name. + # [subnetwork](https://cloud.google.com/compute/docs/subnetworks) + # to which the cluster is connected. On output this shows the subnetwork ID + # instead of the name. # @!attribute [rw] node_pools # @return [::Array<::Google::Cloud::Container::V1beta1::NodePool>] # The node pools associated with this cluster. @@ -2113,8 +2410,8 @@ module Type # @!attribute [rw] locations # @return [::Array<::String>] # The list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. # # This field provides a default value if # [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) @@ -2267,8 +2564,9 @@ module Type # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Output only. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field is deprecated, use location instead. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field is deprecated, use location + # instead. # @!attribute [r] endpoint # @return [::String] # Output only. The IP address of this cluster's master endpoint. @@ -2437,6 +2735,9 @@ module Type # @return [::Google::Cloud::Container::V1beta1::RBACBindingConfig] # RBACBindingConfig allows user to restrict ClusterRoleBindings an # RoleBindings that can be created. + # @!attribute [rw] gke_auto_upgrade_config + # @return [::Google::Cloud::Container::V1beta1::GkeAutoUpgradeConfig] + # Configuration for GKE auto upgrades. # @!attribute [rw] anonymous_authentication_config # @return [::Google::Cloud::Container::V1beta1::AnonymousAuthenticationConfig] # Configuration for limiting anonymous access to all endpoints except the @@ -2546,9 +2847,25 @@ class UserManagedKeysConfig # AnonymousAuthenticationConfig defines the settings needed to limit endpoints # that allow anonymous authentication. + # @!attribute [rw] mode + # @return [::Google::Cloud::Container::V1beta1::AnonymousAuthenticationConfig::Mode] + # Defines the mode of limiting anonymous access in the cluster. class AnonymousAuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mode defines the mode of anonymous authentication + # allowed in the cluster. + module Mode + # Default value not specified. + MODE_UNSPECIFIED = 0 + + # Anonymous authentication is allowed for all endpoints. + ENABLED = 1 + + # Anonymous authentication is allowed for only health check endpoints. + LIMITED = 2 + end end # CompliancePostureConfig defines the settings needed to enable/disable @@ -2804,8 +3121,8 @@ class NodePoolAutoConfig # @!attribute [rw] desired_locations # @return [::Array<::String>] # The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. # # This list must always include the cluster's primary zone. # @@ -3070,15 +3387,27 @@ class NodePoolAutoConfig # The desired node kubelet config for all auto-provisioned node pools # in autopilot clusters and node auto-provisioning enabled clusters. # @!attribute [rw] user_managed_keys_config + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::Container::V1beta1::UserManagedKeysConfig] # The Custom keys configuration for the cluster. + # + # This field is deprecated. + # Use + # {::Google::Cloud::Container::V1beta1::ClusterUpdate#desired_user_managed_keys_config ClusterUpdate.desired_user_managed_keys_config} + # instead. # @!attribute [rw] desired_rbac_binding_config # @return [::Google::Cloud::Container::V1beta1::RBACBindingConfig] # RBACBindingConfig allows user to restrict ClusterRoleBindings an # RoleBindings that can be created. + # @!attribute [rw] desired_additional_ip_ranges_config + # @return [::Google::Cloud::Container::V1beta1::DesiredAdditionalIPRangesConfig] + # The desired config for additional subnetworks attached to the cluster. # @!attribute [rw] desired_enterprise_config # @return [::Google::Cloud::Container::V1beta1::DesiredEnterpriseConfig] # The desired enterprise configuration for the cluster. + # @!attribute [rw] desired_auto_ipam_config + # @return [::Google::Cloud::Container::V1beta1::AutoIpamConfig] + # AutoIpamConfig contains all information related to Auto IPAM # @!attribute [rw] desired_disable_l4_lb_firewall_reconciliation # @return [::Boolean] # Enable/Disable L4 LB VPC firewall reconciliation for the cluster. @@ -3088,10 +3417,16 @@ class NodePoolAutoConfig # in autopilot clusters and node auto-provisioning enabled clusters. # # Currently only `cgroup_mode` can be set here. + # @!attribute [rw] desired_user_managed_keys_config + # @return [::Google::Cloud::Container::V1beta1::UserManagedKeysConfig] + # The desired user managed keys config for the cluster. # @!attribute [rw] desired_anonymous_authentication_config # @return [::Google::Cloud::Container::V1beta1::AnonymousAuthenticationConfig] # Configuration for limiting anonymous access to all endpoints except the # health checks. + # @!attribute [rw] gke_auto_upgrade_config + # @return [::Google::Cloud::Container::V1beta1::GkeAutoUpgradeConfig] + # Configuration for GKE auto upgrade. class ClusterUpdate include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -3110,6 +3445,42 @@ class AdditionalPodRangesConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # AdditionalIPRangesConfig is the configuration for individual additional + # subnetwork attached to the cluster + # @!attribute [rw] subnetwork + # @return [::String] + # Name of the subnetwork. This can be the full path of the subnetwork or + # just the name. + # Example1: my-subnet + # Example2: projects/gke-project/regions/us-central1/subnetworks/my-subnet + # @!attribute [rw] pod_ipv4_range_names + # @return [::Array<::String>] + # List of secondary ranges names within this subnetwork that can be used for + # pod IPs. + # Example1: gke-pod-range1 + # Example2: gke-pod-range1,gke-pod-range2 + class AdditionalIPRangesConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DesiredAdditionalIPRangesConfig is a wrapper used for cluster update + # operation and contains multiple AdditionalIPRangesConfigs. + # @!attribute [rw] additional_ip_ranges_configs + # @return [::Array<::Google::Cloud::Container::V1beta1::AdditionalIPRangesConfig>] + # List of additional IP ranges configs where each AdditionalIPRangesConfig + # corresponds to one subnetwork's IP ranges + class DesiredAdditionalIPRangesConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AutoIpamConfig contains all information related to Auto IPAM + class AutoIpamConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # RangeInfo contains the range name and the range utilization by this cluster. # @!attribute [r] range_name # @return [::String] @@ -3140,8 +3511,9 @@ class DesiredEnterpriseConfig # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Output only. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # operation is taking place. This field is deprecated, use location instead. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the operation is taking place. This field is deprecated, use + # location instead. # @!attribute [r] operation_type # @return [::Google::Cloud::Container::V1beta1::Operation::Type] # Output only. The operation type. @@ -3417,9 +3789,9 @@ class Metric # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @!attribute [rw] cluster # @return [::Google::Cloud::Container::V1beta1::Cluster] # Required. A [cluster @@ -3444,9 +3816,9 @@ class CreateClusterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3472,9 +3844,9 @@ class GetClusterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3503,9 +3875,9 @@ class UpdateClusterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3532,15 +3904,15 @@ class UpdateClusterRequest # @!attribute [rw] image_type # @return [::String] # Required. The desired image type for the node pool. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @!attribute [rw] locations # @return [::Array<::String>] # The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # node pool's nodes should be located. Changing the locations for a node pool - # will result in nodes being either created or removed from the node pool, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the node pool's nodes should be located. Changing the locations + # for a node pool will result in nodes being either created or removed from + # the node pool, depending on whether locations are being added or removed. # @!attribute [rw] workload_metadata_config # @return [::Google::Cloud::Container::V1beta1::WorkloadMetadataConfig] # The desired workload metadata config for the node pool. @@ -3607,8 +3979,9 @@ class UpdateClusterRequest # @!attribute [rw] accelerators # @return [::Array<::Google::Cloud::Container::V1beta1::AcceleratorConfig>] # A list of hardware accelerators to be attached to each node. - # See https://cloud.google.com/compute/docs/gpus for more information about - # support for GPUs. + # See + # https://cloud.google.com/compute/docs/gpus + # for more information about support for GPUs. # @!attribute [rw] machine_type # @return [::String] # Optional. The desired machine type for nodes in the node pool. @@ -3648,6 +4021,11 @@ class UpdateClusterRequest # @!attribute [rw] flex_start # @return [::Boolean] # Flex Start flag for enabling Flex Start VM. + # @!attribute [rw] boot_disk + # @return [::Google::Cloud::Container::V1beta1::BootDisk] + # The desired boot disk config for nodes in the node pool. + # Initiates an upgrade operation that migrates the nodes in the + # node pool to the specified boot disk config. class UpdateNodePoolRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -3664,9 +4042,9 @@ class UpdateNodePoolRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3701,9 +4079,9 @@ class SetNodePoolAutoscalingRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3742,9 +4120,9 @@ class SetLoggingServiceRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3783,9 +4161,9 @@ class SetMonitoringServiceRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3815,9 +4193,9 @@ class SetAddonsConfigRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3826,10 +4204,10 @@ class SetAddonsConfigRequest # @!attribute [rw] locations # @return [::Array<::String>] # Required. The desired list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster's nodes should be located. Changing the locations a cluster is in - # will result in nodes being either created or removed from the cluster, - # depending on whether locations are being added or removed. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster's nodes should be located. Changing the locations a + # cluster is in will result in nodes being either created or removed from the + # cluster, depending on whether locations are being added or removed. # # This list must always include the cluster's primary zone. # @!attribute [rw] name @@ -3852,9 +4230,9 @@ class SetLocationsRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3892,9 +4270,9 @@ class UpdateMasterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3944,9 +4322,9 @@ module Action # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -3972,9 +4350,9 @@ class DeleteClusterRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides, or "-" for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides, or "-" for all zones. This field has been + # deprecated and replaced by the parent field. # @!attribute [rw] parent # @return [::String] # The parent (project and location) where the clusters will be listed. @@ -4010,9 +4388,9 @@ class ListClustersResponse # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] operation_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4038,9 +4416,9 @@ class GetOperationRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for, or `-` for all zones. This field has been deprecated and - # replaced by the parent field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for, or `-` for all zones. This field has been + # deprecated and replaced by the parent field. # @!attribute [rw] parent # @return [::String] # The parent (project and location) where the operations will be listed. @@ -4062,9 +4440,9 @@ class ListOperationsRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # operation resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the operation resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] operation_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4103,9 +4481,9 @@ class ListOperationsResponse # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) to return - # operations for. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # to return operations for. This field has been deprecated and replaced by + # the name field. # @!attribute [rw] name # @return [::String] # The name (project and location) of the server config to get, @@ -4239,9 +4617,9 @@ class WindowsVersion # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4271,9 +4649,9 @@ class CreateNodePoolRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4305,9 +4683,9 @@ class DeleteNodePoolRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the parent - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the parent field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4333,9 +4711,9 @@ class ListNodePoolsRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4418,14 +4796,15 @@ class AutoscaledRolloutPolicy # @!attribute [rw] initial_node_count # @return [::Integer] # The initial node count for the pool. You must ensure that your - # Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + # Compute Engine [resource + # quota](https://cloud.google.com/compute/quotas) # is sufficient for this number of instances. You must also have available # firewall and routes quota. # @!attribute [rw] locations # @return [::Array<::String>] # The list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # NodePool's nodes should be located. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the NodePool's nodes should be located. # # If this value is unspecified during node pool creation, the # [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) @@ -4899,9 +5278,9 @@ class DailyMaintenanceWindow # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4936,9 +5315,9 @@ class SetNodePoolManagementRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -4987,9 +5366,9 @@ class CompleteNodePoolUpgradeRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -5044,8 +5423,11 @@ class ListNodePoolsResponse # @!attribute [rw] autoprovisioning_locations # @return [::Array<::String>] # The list of Google Compute Engine - # [zones](https://cloud.google.com/compute/docs/zones#available) in which the - # NodePool's nodes can be created by NAP. + # [zones](https://cloud.google.com/compute/docs/zones#available) + # in which the NodePool's nodes can be created by NAP. + # @!attribute [rw] default_compute_class_config + # @return [::Google::Cloud::Container::V1beta1::DefaultComputeClassConfig] + # Default compute class is a configuration for default compute class. class ClusterAutoscaling include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -5133,8 +5515,8 @@ module AutoscalingProfile # @!attribute [rw] image_type # @return [::String] # The image type to use for NAP created node. Please see - # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - # available image types. + # https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + # for available image types. # @!attribute [rw] insecure_kubelet_readonly_port_enabled # @return [::Boolean] # DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead. @@ -5159,6 +5541,16 @@ class ResourceLimit extend ::Google::Protobuf::MessageExts::ClassMethods end + # DefaultComputeClassConfig defines default compute class + # configuration. + # @!attribute [rw] enabled + # @return [::Boolean] + # Enables default compute class. + class DefaultComputeClassConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # NodePoolAutoscaling contains information required by cluster autoscaler to # adjust the size of the node pool to the current cluster usage. # @!attribute [rw] enabled @@ -5222,9 +5614,9 @@ module LocationPolicy # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -5271,9 +5663,9 @@ class ResourceLabelsEntry # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -5303,9 +5695,9 @@ class SetLegacyAbacRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -5334,9 +5726,9 @@ class StartIPRotationRequest # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -5535,9 +5927,9 @@ module Mode # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. This field has been deprecated and replaced by the name - # field. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. This field has been deprecated and replaced + # by the name field. # @!attribute [rw] cluster_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -5563,8 +5955,8 @@ class SetNetworkPolicyRequest # @!attribute [rw] zone # @return [::String] # Required. The name of the Google Compute Engine - # [zone](https://cloud.google.com/compute/docs/zones#available) in which the - # cluster resides. + # [zone](https://cloud.google.com/compute/docs/zones#available) + # in which the cluster resides. # @!attribute [rw] cluster_id # @return [::String] # Required. The name of the cluster to update. @@ -5684,6 +6076,10 @@ module Code # Node service account is missing permissions. NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS = 10 + + # Cloud KMS key version used for etcd level encryption has been destroyed. + # This is a permanent error. + CLOUD_KMS_KEY_DESTROYED = 11 end end @@ -5697,8 +6093,8 @@ module Code # @!attribute [r] subnetwork # @return [::String] # Output only. The relative name of the Google Compute Engine - # [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the - # cluster is connected. Example: + # [subnetwork](https://cloud.google.com/compute/docs/vpc) + # to which the cluster is connected. Example: # projects/my-project/regions/us-central1/subnetworks/my-subnet # @!attribute [rw] enable_intra_node_visibility # @return [::Boolean] @@ -7183,6 +7579,25 @@ class RotationConfig end end + # BootDisk specifies the boot disk configuration for nodepools. + # @!attribute [rw] disk_type + # @return [::String] + # Disk type of the boot disk. + # (i.e. Hyperdisk-Balanced, PD-Balanced, etc.) + # @!attribute [rw] size_gb + # @return [::Integer] + # Disk size in GB. Replaces NodeConfig.disk_size_gb + # @!attribute [rw] provisioned_iops + # @return [::Integer] + # For Hyperdisk-Balanced only, the provisioned IOPS config value. + # @!attribute [rw] provisioned_throughput + # @return [::Integer] + # For Hyperdisk-Balanced only, the provisioned throughput config value. + class BootDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # SecondaryBootDisk represents a persistent disk attached to a node # with special configurations based on its mode. # @!attribute [rw] mode @@ -7437,6 +7852,29 @@ module AutoUpgradePausedReason end end + # GkeAutoUpgradeConfig is the configuration for GKE auto upgrades. + # @!attribute [rw] patch_mode + # @return [::Google::Cloud::Container::V1beta1::GkeAutoUpgradeConfig::PatchMode] + # PatchMode specifies how auto upgrade patch builds should be + # selected. + class GkeAutoUpgradeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # PatchMode specifies how auto upgrade patch builds should be + # selected. + module PatchMode + # PATCH_MODE_UNSPECIFIED defaults to using the upgrade target from the + # channel's patch upgrade targets as the upgrade target for the + # version. + PATCH_MODE_UNSPECIFIED = 0 + + # ACCELERATED denotes that the latest patch build in the channel should be + # used as the upgrade target for the version. + ACCELERATED = 1 + end + end + # PrivateIPv6GoogleAccess controls whether and how the pods can communicate # with Google Services through gRPC over IPv6. module PrivateIPv6GoogleAccess diff --git a/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb b/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb index 750f4396e8fb..68b627ce6d35 100644 --- a/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb +++ b/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb @@ -362,6 +362,7 @@ def test_update_node_pool storage_pools = ["hello world"] max_run_duration = {} flex_start = true + boot_disk = {} update_node_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :update_node_pool, name @@ -401,6 +402,7 @@ def test_update_node_pool assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["max_run_duration"] assert_equal true, request["flex_start"] assert request.has_flex_start? + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Container::V1beta1::BootDisk), request["boot_disk"] refute_nil options end @@ -411,31 +413,31 @@ def test_update_node_pool end # Use hash object - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }) do |response, operation| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start do |response, operation| + client.update_node_pool project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.update_node_pool ::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start) do |response, operation| + client.update_node_pool ::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start }, grpc_options) do |response, operation| + client.update_node_pool({ project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.update_node_pool(::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start), grpc_options) do |response, operation| + client.update_node_pool(::Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new(project_id: project_id, zone: zone, cluster_id: cluster_id, node_pool_id: node_pool_id, node_version: node_version, image_type: image_type, locations: locations, workload_metadata_config: workload_metadata_config, name: name, upgrade_settings: upgrade_settings, tags: tags, taints: taints, labels: labels, linux_node_config: linux_node_config, kubelet_config: kubelet_config, node_network_config: node_network_config, gcfs_config: gcfs_config, confidential_nodes: confidential_nodes, gvnic: gvnic, etag: etag, fast_socket: fast_socket, logging_config: logging_config, resource_labels: resource_labels, windows_node_config: windows_node_config, accelerators: accelerators, machine_type: machine_type, disk_type: disk_type, disk_size_gb: disk_size_gb, resource_manager_tags: resource_manager_tags, containerd_config: containerd_config, queued_provisioning: queued_provisioning, storage_pools: storage_pools, max_run_duration: max_run_duration, flex_start: flex_start, boot_disk: boot_disk), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end From 64f4bbdda9e6479ada13ea32e78a8d0d426194cf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 18:39:17 -0700 Subject: [PATCH 314/457] chore(main): release google-cloud-video-transcoder-v1 2.2.0 (#30703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-video-transcoder-v1 2.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-video-transcoder-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/video/transcoder/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.video.transcoder.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ddb9669963ca..45e320a0a8ae 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -807,7 +807,7 @@ "google-cloud-video-stitcher-v1+FILLER": "0.0.0", "google-cloud-video-transcoder": "2.0.1", "google-cloud-video-transcoder+FILLER": "0.0.0", - "google-cloud-video-transcoder-v1": "2.1.0", + "google-cloud-video-transcoder-v1": "2.2.0", "google-cloud-video-transcoder-v1+FILLER": "0.0.0", "google-cloud-video_intelligence": "4.0.2", "google-cloud-video_intelligence+FILLER": "0.0.0", diff --git a/google-cloud-video-transcoder-v1/CHANGELOG.md b/google-cloud-video-transcoder-v1/CHANGELOG.md index f92048619f75..593ff7afe1ba 100644 --- a/google-cloud-video-transcoder-v1/CHANGELOG.md +++ b/google-cloud-video-transcoder-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 2.2.0 (2025-07-25) + +#### Features + +* Support for filling content gaps +* Support for fmp4 container configuration + ### 2.1.0 (2025-05-12) #### Features diff --git a/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb b/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb index 456874f5cc65..3e8ab6728288 100644 --- a/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb +++ b/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module Video module Transcoder module V1 - VERSION = "2.1.0" + VERSION = "2.2.0" end end end diff --git a/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json b/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json index 749b933bb197..737a97eb49ed 100644 --- a/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json +++ b/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-video-transcoder-v1", - "version": "2.1.0", + "version": "2.2.0", "language": "RUBY", "apis": [ { From 3c5a04073eeb09903ea84fd96443fc3486a05990 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:32:49 -0700 Subject: [PATCH 315/457] chore(main): release google-cloud-build-v1 1.6.1 (#30735) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-build-v1 1.6.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-build-v1/CHANGELOG.md | 6 ++++++ google-cloud-build-v1/lib/google/cloud/build/v1/version.rb | 2 +- .../snippet_metadata_google.devtools.cloudbuild.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 45e320a0a8ae..bb1d01e05c92 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -185,7 +185,7 @@ "google-cloud-binary_authorization-v1beta1+FILLER": "0.0.0", "google-cloud-build": "1.6.1", "google-cloud-build+FILLER": "0.0.0", - "google-cloud-build-v1": "1.6.0", + "google-cloud-build-v1": "1.6.1", "google-cloud-build-v1+FILLER": "0.0.0", "google-cloud-build-v2": "0.10.0", "google-cloud-build-v2+FILLER": "0.0.0", diff --git a/google-cloud-build-v1/CHANGELOG.md b/google-cloud-build-v1/CHANGELOG.md index e7e23abcdd20..974a050e576a 100644 --- a/google-cloud-build-v1/CHANGELOG.md +++ b/google-cloud-build-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.6.1 (2025-07-28) + +#### Documentation + +* Updated Private Service Connect IP ranges when route_all_traffic is false ([#30731](https://github.com/googleapis/google-cloud-ruby/issues/30731)) + ### 1.6.0 (2025-05-12) #### Features diff --git a/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb b/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb index 80d457c41847..d1ff556e9f79 100644 --- a/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb +++ b/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Build module V1 - VERSION = "1.6.0" + VERSION = "1.6.1" end end end diff --git a/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json b/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json index d3eb7f048b1c..3c2b0ba11ad0 100644 --- a/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json +++ b/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-build-v1", - "version": "1.6.0", + "version": "1.6.1", "language": "RUBY", "apis": [ { From ce7e9660b882182d52903737c798dfa0f2e57c0e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:33:05 -0700 Subject: [PATCH 316/457] chore(main): release google-cloud-discovery_engine-v1beta 0.21.0 (#30737) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-discovery_engine-v1beta 0.21.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-discovery_engine-v1beta/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/discovery_engine/v1beta/version.rb | 2 +- ...nippet_metadata_google.cloud.discoveryengine.v1beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bb1d01e05c92..f2293afe02ef 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -331,7 +331,7 @@ "google-cloud-discovery_engine+FILLER": "0.0.0", "google-cloud-discovery_engine-v1": "2.4.0", "google-cloud-discovery_engine-v1+FILLER": "0.0.0", - "google-cloud-discovery_engine-v1beta": "0.20.1", + "google-cloud-discovery_engine-v1beta": "0.21.0", "google-cloud-discovery_engine-v1beta+FILLER": "0.0.0", "google-cloud-dlp": "1.8.2", "google-cloud-dlp+FILLER": "0.0.0", diff --git a/google-cloud-discovery_engine-v1beta/CHANGELOG.md b/google-cloud-discovery_engine-v1beta/CHANGELOG.md index 58fbb15e0b16..8947440bdba2 100644 --- a/google-cloud-discovery_engine-v1beta/CHANGELOG.md +++ b/google-cloud-discovery_engine-v1beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.21.0 (2025-07-28) + +#### Features + +* add SessionService ([#30728](https://github.com/googleapis/google-cloud-ruby/issues/30728)) + ### 0.20.1 (2025-07-15) #### Documentation diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/version.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/version.rb index cf0c78cab345..3460616d5a90 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/version.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module DiscoveryEngine module V1beta - VERSION = "0.20.1" + VERSION = "0.21.0" end end end diff --git a/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json b/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json index 3a419a1edf5f..1dbcaddd1b99 100644 --- a/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json +++ b/google-cloud-discovery_engine-v1beta/snippets/snippet_metadata_google.cloud.discoveryengine.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-discovery_engine-v1beta", - "version": "0.20.1", + "version": "0.21.0", "language": "RUBY", "apis": [ { From 66219cc274a832fef9527663c347156c93070478 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:34:06 -0700 Subject: [PATCH 317/457] chore(main): release google-cloud-secure_source_manager 2.1.0 (#30738) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-cloud-secure_source_manager/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/secure_source_manager/version.rb | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f2293afe02ef..47da4eaa6a86 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -665,7 +665,7 @@ "google-cloud-secret_manager-v1beta1+FILLER": "0.0.0", "google-cloud-secret_manager-v1beta2": "0.4.0", "google-cloud-secret_manager-v1beta2+FILLER": "0.0.0", - "google-cloud-secure_source_manager": "2.0.1", + "google-cloud-secure_source_manager": "2.1.0", "google-cloud-secure_source_manager+FILLER": "0.0.0", "google-cloud-secure_source_manager-v1": "2.1.0", "google-cloud-secure_source_manager-v1+FILLER": "0.0.0", diff --git a/google-cloud-secure_source_manager/CHANGELOG.md b/google-cloud-secure_source_manager/CHANGELOG.md index f296df5ddd48..ec81a1f042f2 100644 --- a/google-cloud-secure_source_manager/CHANGELOG.md +++ b/google-cloud-secure_source_manager/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 2.1.0 (2025-07-28) + +#### Features + +* add new UpdateRepository API +* add support for new API resources: Issues, IssueComments, PullRequests, PullRequestComments, Blobs ([#30723](https://github.com/googleapis/google-cloud-ruby/issues/30723)) + ### 2.0.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb b/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb index a6de39ccf60d..dd99e2e01f3f 100644 --- a/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb +++ b/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module SecureSourceManager - VERSION = "2.0.1" + VERSION = "2.1.0" end end end From 1d9cc0db8156718d58a9a2c3d33cc9be4addf4c7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:38:26 -0700 Subject: [PATCH 318/457] chore(main): release google-cloud-spanner-admin-database-v1 1.9.0 (#30740) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-spanner-admin-database-v1 1.9.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-spanner-admin-database-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/spanner/admin/database/v1/version.rb | 2 +- .../snippet_metadata_google.spanner.admin.database.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 47da4eaa6a86..3f214c6655dd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -719,7 +719,7 @@ "google-cloud-shell+FILLER": "0.0.0", "google-cloud-shell-v1": "1.3.0", "google-cloud-shell-v1+FILLER": "0.0.0", - "google-cloud-spanner-admin-database-v1": "1.8.0", + "google-cloud-spanner-admin-database-v1": "1.9.0", "google-cloud-spanner-admin-database-v1+FILLER": "0.0.0", "google-cloud-spanner-admin-instance-v1": "2.1.0", "google-cloud-spanner-admin-instance-v1+FILLER": "0.0.0", diff --git a/google-cloud-spanner-admin-database-v1/CHANGELOG.md b/google-cloud-spanner-admin-database-v1/CHANGELOG.md index 0dfe3d027acc..fc4f22d8b294 100644 --- a/google-cloud-spanner-admin-database-v1/CHANGELOG.md +++ b/google-cloud-spanner-admin-database-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.9.0 (2025-07-28) + +#### Features + +* proto changes for an internal api ([#30718](https://github.com/googleapis/google-cloud-ruby/issues/30718)) + ### 1.8.0 (2025-06-05) #### Features diff --git a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb index 4229d0dafa84..9736c1fcffb7 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb @@ -23,7 +23,7 @@ module Spanner module Admin module Database module V1 - VERSION = "1.8.0" + VERSION = "1.9.0" end end end diff --git a/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json b/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json index e760a8d19055..731c87f5ae44 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json +++ b/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-spanner-admin-database-v1", - "version": "1.8.0", + "version": "1.9.0", "language": "RUBY", "apis": [ { From 4e8d3e409164edb47965e487ca7553df4412e386 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:38:42 -0700 Subject: [PATCH 319/457] chore(main): release google-cloud-secure_source_manager-v1 2.2.0 (#30739) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-secure_source_manager-v1 2.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-secure_source_manager-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/secure_source_manager/v1/version.rb | 2 +- ...ippet_metadata_google.cloud.securesourcemanager.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3f214c6655dd..edc9adffee8f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -667,7 +667,7 @@ "google-cloud-secret_manager-v1beta2+FILLER": "0.0.0", "google-cloud-secure_source_manager": "2.1.0", "google-cloud-secure_source_manager+FILLER": "0.0.0", - "google-cloud-secure_source_manager-v1": "2.1.0", + "google-cloud-secure_source_manager-v1": "2.2.0", "google-cloud-secure_source_manager-v1+FILLER": "0.0.0", "google-cloud-security-private_ca": "2.0.1", "google-cloud-security-private_ca+FILLER": "0.0.0", diff --git a/google-cloud-secure_source_manager-v1/CHANGELOG.md b/google-cloud-secure_source_manager-v1/CHANGELOG.md index 069c60b5a7ae..ffe02a3d3bda 100644 --- a/google-cloud-secure_source_manager-v1/CHANGELOG.md +++ b/google-cloud-secure_source_manager-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 2.2.0 (2025-07-28) + +#### Features + +* add new UpdateRepository API +* add support for new API resources: Issues, IssueComments, PullRequests, PullRequestComments, Blobs ([#30724](https://github.com/googleapis/google-cloud-ruby/issues/30724)) + ### 2.1.0 (2025-05-12) #### Features diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb index e297fdf88280..e35bacdfe8a0 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module SecureSourceManager module V1 - VERSION = "2.1.0" + VERSION = "2.2.0" end end end diff --git a/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json b/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json index b5c0546b1878..45e1342af9f2 100644 --- a/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json +++ b/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-secure_source_manager-v1", - "version": "2.1.0", + "version": "2.2.0", "language": "RUBY", "apis": [ { From 77bd77cae10b696436c908913fc715a18858182b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:38:59 -0700 Subject: [PATCH 320/457] chore(main): release google-cloud-backupdr-v1 1.2.0 (#30734) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-backupdr-v1 1.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-backupdr-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/backupdr/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.backupdr.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index edc9adffee8f..57123d7dda38 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -105,7 +105,7 @@ "google-cloud-automl-v1beta1+FILLER": "0.0.0", "google-cloud-backupdr": "2.0.1", "google-cloud-backupdr+FILLER": "0.0.0", - "google-cloud-backupdr-v1": "1.1.0", + "google-cloud-backupdr-v1": "1.2.0", "google-cloud-backupdr-v1+FILLER": "0.0.0", "google-cloud-bare_metal_solution": "2.0.1", "google-cloud-bare_metal_solution+FILLER": "0.0.0", diff --git a/google-cloud-backupdr-v1/CHANGELOG.md b/google-cloud-backupdr-v1/CHANGELOG.md index e95b7d0faac0..97f0b8fd720e 100644 --- a/google-cloud-backupdr-v1/CHANGELOG.md +++ b/google-cloud-backupdr-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 1.2.0 (2025-07-28) + +#### Features + +* Add support for Cloud SQL backup and restore ([#30713](https://github.com/googleapis/google-cloud-ruby/issues/30713)) +* Add support for GCE Disk backup and restore + ### 1.1.0 (2025-05-12) #### Features diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb index c0062f0a359d..616649d4db0f 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module BackupDR module V1 - VERSION = "1.1.0" + VERSION = "1.2.0" end end end diff --git a/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json index 1972a91df4a7..276fc6e82ff7 100644 --- a/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json +++ b/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-backupdr-v1", - "version": "1.1.0", + "version": "1.2.0", "language": "RUBY", "apis": [ { From be39ffb04bd8669d139cc9f86a863fc9a0f13108 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:39:28 -0700 Subject: [PATCH 321/457] chore(main): release google-cloud-container-v1beta1 0.48.0 (#30736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-container-v1beta1 0.48.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-container-v1beta1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/container/v1beta1/version.rb | 2 +- .../snippet_metadata_google.container.v1beta1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 57123d7dda38..ef4a0e6b1a8a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -245,7 +245,7 @@ "google-cloud-container+FILLER": "0.0.0", "google-cloud-container-v1": "1.9.0", "google-cloud-container-v1+FILLER": "0.0.0", - "google-cloud-container-v1beta1": "0.47.0", + "google-cloud-container-v1beta1": "0.48.0", "google-cloud-container-v1beta1+FILLER": "0.0.0", "google-cloud-container_analysis": "1.5.2", "google-cloud-container_analysis+FILLER": "0.0.0", diff --git a/google-cloud-container-v1beta1/CHANGELOG.md b/google-cloud-container-v1beta1/CHANGELOG.md index 1c08b6236d68..2098f4aa84d5 100644 --- a/google-cloud-container-v1beta1/CHANGELOG.md +++ b/google-cloud-container-v1beta1/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +### 0.48.0 (2025-07-28) + +#### Features + +* A new enum `TransparentHugepageDefrag` is added +* A new enum `TransparentHugepageEnabled` is added ([#30714](https://github.com/googleapis/google-cloud-ruby/issues/30714)) + ### 0.47.0 (2025-06-05) #### Features diff --git a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/version.rb b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/version.rb index 63afd8a89411..3556bc13bd86 100644 --- a/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/version.rb +++ b/google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Container module V1beta1 - VERSION = "0.47.0" + VERSION = "0.48.0" end end end diff --git a/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json b/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json index 88ec33f7b9d0..07fcf5a06893 100644 --- a/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json +++ b/google-cloud-container-v1beta1/snippets/snippet_metadata_google.container.v1beta1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-container-v1beta1", - "version": "0.47.0", + "version": "0.48.0", "language": "RUBY", "apis": [ { From a10a43e6676eb36552645328e36e8265532c66ef Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:39:46 -0700 Subject: [PATCH 322/457] chore(main): release google-cloud-ai_platform-v1 1.19.0 (#30733) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-ai_platform-v1 1.19.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-ai_platform-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/ai_platform/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ef4a0e6b1a8a..4722f84f3b44 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -43,7 +43,7 @@ "google-cloud-advisory_notifications-v1+FILLER": "0.0.0", "google-cloud-ai_platform": "2.0.1", "google-cloud-ai_platform+FILLER": "0.0.0", - "google-cloud-ai_platform-v1": "1.18.0", + "google-cloud-ai_platform-v1": "1.19.0", "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", diff --git a/google-cloud-ai_platform-v1/CHANGELOG.md b/google-cloud-ai_platform-v1/CHANGELOG.md index 33f74c81cc66..b604fe65187a 100644 --- a/google-cloud-ai_platform-v1/CHANGELOG.md +++ b/google-cloud-ai_platform-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.19.0 (2025-07-28) + +#### Features + +* Add service_account to Reasoning Engine public protos ([#30715](https://github.com/googleapis/google-cloud-ruby/issues/30715)) + ### 1.18.0 (2025-07-15) #### Features diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb index be45e2bbcbea..f4355e2b532d 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AIPlatform module V1 - VERSION = "1.18.0" + VERSION = "1.19.0" end end end diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index 86e59d4e8aab..b816e29c96ff 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-ai_platform-v1", - "version": "1.18.0", + "version": "1.19.0", "language": "RUBY", "apis": [ { From 419d676594526c0591c3fdb6f3b3fae739dfa344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Mon, 28 Jul 2025 17:48:59 -0700 Subject: [PATCH 323/457] feat!: Change default number of concurrent streams to 1 (#30742) --- google-cloud-pubsub/MIGRATION_GUIDE.md | 2 ++ .../google/cloud/pubsub/message_listener.rb | 4 ++-- .../lib/google/cloud/pubsub/subscriber.rb | 2 +- .../cloud/pubsub/message_listener_test.rb | 4 ++-- .../cloud/pubsub/subscriber/listen_test.rb | 24 +++++++++---------- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/google-cloud-pubsub/MIGRATION_GUIDE.md b/google-cloud-pubsub/MIGRATION_GUIDE.md index 7b45f0766677..871f7f86a7b6 100644 --- a/google-cloud-pubsub/MIGRATION_GUIDE.md +++ b/google-cloud-pubsub/MIGRATION_GUIDE.md @@ -27,6 +27,8 @@ by `Topic` and `Subscription`. 4. **Auto-generated Client Exposure**: The `TopicAdmin::Client`, `SubscriptionAdmin::Client`, and `SchemaService::Client` are now directly accessible from `Google::Cloud::PubSub::Project`. +5. **Default number concurrent of streams changed to 1**: +`MessageListener` now defaults to using a single stream for receiving messages. This is a more suitable default for most applications and helps reduce the number of idle streams, especially in low-throughput scenarios. ## Admin Operations diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb index 11bf33762de2..814ed067ee7d 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb @@ -53,7 +53,7 @@ module PubSub # @attr_reader [Boolean] message_ordering Whether message ordering has # been enabled. # @attr_reader [Integer] streams The number of concurrent streams to open - # to pull messages from the subscription. Default is 2. + # to pull messages from the subscription. Default is 1. # @attr_reader [Integer] callback_threads The number of threads used to # handle the received messages. Default is 8. # @attr_reader [Integer] push_threads The number of threads to handle @@ -90,7 +90,7 @@ def initialize subscription_name, callback, deadline: nil, message_ordering: nil @error_callbacks = [] @subscription_name = subscription_name @deadline = deadline || 60 - @streams = streams || 2 + @streams = streams || 1 coerce_inventory inventory @message_ordering = message_ordering @callback_threads = Integer(threads[:callback] || 8) diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb index 16f63ae0f774..3abb7156f423 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber.rb @@ -297,7 +297,7 @@ def wait_for_messages max: 100 # the default message_ordering value for the subscription when this # argument is not provided. See {#reference?}. # @param [Integer] streams The number of concurrent streams to open to - # pull messages from the subscription. Default is 2. Optional. + # pull messages from the subscription. Default is 1. Optional. # @param [Hash, Integer] inventory The settings to control how received messages are to be handled by the # subscriber. When provided as an Integer instead of a Hash only `max_outstanding_messages` will be set. # Optional. diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/message_listener_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener_test.rb index 2dfc2623d841..f3339eb8db22 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/message_listener_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener_test.rb @@ -45,13 +45,13 @@ ) _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 100_000_000 _(listener.max_total_lease_duration).must_equal 3600 _(listener.max_duration_per_lease_extension).must_equal 0 _(listener.min_duration_per_lease_extension).must_equal 0 - _(listener.stream_inventory).must_equal({limit: 500, bytesize: 50000000, max_duration_per_lease_extension: 0, min_duration_per_lease_extension: 0, extension: 3600}) + _(listener.stream_inventory).must_equal({limit: 1000, bytesize: 100000000, max_duration_per_lease_extension: 0, min_duration_per_lease_extension: 0, extension: 3600}) _(listener.callback_threads).must_equal 8 _(listener.push_threads).must_equal 4 end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/listen_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/listen_test.rb index 4996a1875883..82a98a3d6fe9 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/listen_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/listen_test.rb @@ -28,7 +28,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 3600 @@ -42,7 +42,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 120 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 3600 @@ -70,7 +70,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 500 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 3600 @@ -84,7 +84,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 500 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 3600 @@ -98,7 +98,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 500 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 3600 @@ -112,7 +112,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 50_000 _(listener.max_total_lease_duration).must_equal 3600 @@ -126,7 +126,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 50_000 _(listener.max_total_lease_duration).must_equal 3600 @@ -140,7 +140,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 7200 @@ -154,7 +154,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 7200 @@ -168,7 +168,7 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 3600 @@ -182,11 +182,11 @@ _(listener).must_be_kind_of Google::Cloud::PubSub::MessageListener _(listener.subscription_name).must_equal subscriber.name _(listener.deadline).must_equal 60 - _(listener.streams).must_equal 2 + _(listener.streams).must_equal 1 _(listener.max_outstanding_messages).must_equal 1000 _(listener.max_outstanding_bytes).must_equal 100000000 _(listener.max_total_lease_duration).must_equal 3600 _(listener.max_duration_per_lease_extension).must_equal 0 _(listener.min_duration_per_lease_extension).must_equal 10 end -end +end \ No newline at end of file From 39b571817c38be6c1a570b1f1b10925d7888c624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Tue, 29 Jul 2025 11:35:45 -0700 Subject: [PATCH 324/457] feat!: Introduce subclasses for TopicAdmin & SubscriptionAdmin auto-generated clients (#30744) --- .../lib/google/cloud/pubsub/admin_clients.rb | 116 ++++++++++++++++++ .../lib/google/cloud/pubsub/project.rb | 4 +- .../lib/google/cloud/pubsub/service.rb | 28 +++-- .../cloud/pubsub/async_publisher_test.rb | 14 +-- .../cloud/pubsub/batch_publisher_test.rb | 14 +-- .../timed_unary_buffer_test.rb | 18 +-- .../pubsub/publisher/message_ordering_test.rb | 6 +- .../cloud/pubsub/publisher/publish_test.rb | 22 ++-- .../google/cloud/pubsub/publisher_test.rb | 12 +- .../cloud/pubsub/received_message_test.rb | 18 +-- .../test/google/cloud/pubsub/service_test.rb | 59 ++++++++- .../cloud/pubsub/subscriber/pull_test.rb | 6 +- .../cloud/pubsub/subscriber/pull_wait_test.rb | 6 +- .../google/cloud/pubsub/subscriber_test.rb | 8 +- google-cloud-pubsub/test/helper.rb | 8 +- 15 files changed, 256 insertions(+), 83 deletions(-) create mode 100644 google-cloud-pubsub/lib/google/cloud/pubsub/admin_clients.rb diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/admin_clients.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/admin_clients.rb new file mode 100644 index 000000000000..371c22f2aac1 --- /dev/null +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/admin_clients.rb @@ -0,0 +1,116 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "google/cloud/pubsub/v1/topic_admin/client" +require "google/cloud/pubsub/v1/subscription_admin/client" + +module Google + module Cloud + module PubSub + module TopicAdmin + ## + # The TopicAdmin client is used to manage topics. + # + # This client is a subclass of the auto-generated TopicAdmin client, and provides + # the same methods. However, it raises errors on data plane operations + # to prevent misuse. + # + class Client < Google::Cloud::PubSub::V1::TopicAdmin::Client + # @private + alias publish_internal publish + + ## + # The `publish` method is a data plane operation. + # + # @raise [NotImplementedError] This method is not implemented on the + # admin client. Use {Google::Cloud::PubSub::Publisher} instead. + # + def publish *args, **kwargs + raise NotImplementedError, + "The `publish` method is a data plane operation. " \ + "Use Google::Cloud::PubSub::Publisher instead." + end + end + end + + module SubscriptionAdmin + ## + # The SubscriptionAdmin client is used to manage subscriptions. + # + # This client is a subclass of the auto-generated SubscriptionAdmin client, and + # provides the same methods. However, it raises errors on data plane + # operations to prevent misuse. + # + class Client < Google::Cloud::PubSub::V1::SubscriptionAdmin::Client + # @private + alias modify_ack_deadline_internal modify_ack_deadline + # @private + alias acknowledge_internal acknowledge + # @private + alias pull_internal pull + # @private + alias streaming_pull_internal streaming_pull + + ## + # The `modify_ack_deadline` method is a data plane operation. + # + # @raise [NotImplementedError] This method is not implemented on the + # admin client. Use {Google::Cloud::PubSub::Subscriber} instead. + # + def modify_ack_deadline *args, **kwargs + raise NotImplementedError, + "The `modify_ack_deadline` method is a data plane operation. " \ + "Use Google::Cloud::PubSub::Subscriber instead." + end + + ## + # The `acknowledge` method is a data plane operation. + # + # @raise [NotImplementedError] This method is not implemented on the + # admin client. Use {Google::Cloud::PubSub::Subscriber} instead. + # + def acknowledge *args, **kwargs + raise NotImplementedError, + "The `acknowledge` method is a data plane operation. " \ + "Use Google::Cloud::PubSub::Subscriber instead." + end + + ## + # The `pull` method is a data plane operation. + # + # @raise [NotImplementedError] This method is not implemented on the + # admin client. Use {Google::Cloud::PubSub::Subscriber} instead. + # + def pull *args, **kwargs + raise NotImplementedError, + "The `pull` method is a data plane operation. " \ + "Use Google::Cloud::PubSub::Subscriber instead." + end + + ## + # The `streaming_pull` method is a data plane operation. + # + # @raise [NotImplementedError] This method is not implemented on the + # admin client. Use {Google::Cloud::PubSub::Subscriber} instead. + # + def streaming_pull *args, **kwargs + raise NotImplementedError, + "The `streaming_pull` method is a data plane operation. " \ + "Use Google::Cloud::PubSub::Subscriber instead." + end + end + end + end + end +end diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb index 5bbf7cb317cb..1bf890d7609c 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb @@ -89,7 +89,7 @@ def universe_domain ## # Retrieve a client for managing subscriptions. # - # @return [Google::Cloud::PubSub::V1::SubscriptionAdmin::Client] + # @return [Google::Cloud::PubSub::SubscriptionAdmin::Client] # def subscription_admin service.subscription_admin @@ -98,7 +98,7 @@ def subscription_admin ## # Retrieve a client for managing topics. # - # @return [Google::Cloud::PubSub::V1::TopicAdmin::Client] + # @return [Google::Cloud::PubSub::TopicAdmin::Client] # def topic_admin service.topic_admin diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb index f68ed5d5984d..af3a7a39c2cc 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb @@ -18,6 +18,7 @@ require "google/cloud/pubsub/convert" require "google/cloud/pubsub/version" require "google/cloud/pubsub/v1" +require "google/cloud/pubsub/admin_clients" require "securerandom" module Google @@ -52,7 +53,7 @@ def initialize project, credentials, host: nil, timeout: nil, universe_domain: n def subscription_admin return mocked_subscription_admin if mocked_subscription_admin - @subscription_admin ||= V1::SubscriptionAdmin::Client.new do |config| + @subscription_admin ||= SubscriptionAdmin::Client.new do |config| config.credentials = credentials if credentials override_client_config_timeouts config if timeout config.endpoint = host if host @@ -66,7 +67,7 @@ def subscription_admin def topic_admin return mocked_topic_admin if mocked_topic_admin - @topic_admin ||= V1::TopicAdmin::Client.new do |config| + @topic_admin ||= TopicAdmin::Client.new do |config| config.credentials = credentials if credentials override_client_config_timeouts config if timeout config.endpoint = host if host @@ -115,7 +116,11 @@ def schemas def publish topic, messages, compress: false request = { topic: topic_path(topic), messages: messages } compress_options = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } - compress ? (topic_admin.publish request, compress_options) : (topic_admin.publish request) + if compress + (topic_admin.publish_internal request, compress_options) + else + (topic_admin.publish_internal request) + end end ## @@ -124,27 +129,28 @@ def pull subscription, options = {} max_messages = options.fetch(:max, 100).to_i return_immediately = !(!options.fetch(:immediate, true)) - subscription_admin.pull subscription: subscription_path(subscription, options), - max_messages: max_messages, - return_immediately: return_immediately + subscription_admin.pull_internal subscription: subscription_path(subscription, options), + max_messages: max_messages, + return_immediately: return_immediately end def streaming_pull request_enum, options = {} - subscription_admin.streaming_pull request_enum, options + subscription_admin.streaming_pull_internal request_enum, options end ## # Acknowledges receipt of a message. def acknowledge subscription, *ack_ids - subscription_admin.acknowledge subscription: subscription_path(subscription), ack_ids: ack_ids + subscription_admin.acknowledge_internal subscription: subscription_path(subscription), + ack_ids: ack_ids end ## # Modifies the ack deadline for a specific message. def modify_ack_deadline subscription, ids, deadline - subscription_admin.modify_ack_deadline subscription: subscription_path(subscription), - ack_ids: Array(ids), - ack_deadline_seconds: deadline + subscription_admin.modify_ack_deadline_internal subscription: subscription_path(subscription), + ack_ids: Array(ids), + ack_deadline_seconds: deadline end # Helper methods diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher_test.rb index debb6fde7fa9..869529381b2b 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/async_publisher_test.rb @@ -416,7 +416,7 @@ expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } actual_request = nil actual_option = nil - mocked_topic_admin.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish_internal, nil do |request, option| actual_request = request actual_option = option end @@ -438,7 +438,7 @@ expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } actual_request = nil actual_option = nil - mocked_topic_admin.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish_internal, nil do |request, option| actual_request = request actual_option = option end @@ -460,7 +460,7 @@ expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} actual_request = nil actual_option = "test" - mocked_topic_admin.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish_internal, nil do |request, option| actual_request = request actual_option = option end @@ -482,7 +482,7 @@ expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } actual_request = nil actual_option = nil - mocked_topic_admin.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish_internal, nil do |request, option| actual_request = request actual_option = option end @@ -504,7 +504,7 @@ expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } actual_request = nil actual_option = nil - mocked_topic_admin.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish_internal, nil do |request, option| actual_request = request actual_option = option end @@ -525,7 +525,7 @@ expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} actual_request = nil actual_option = "test" - mocked_topic_admin.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish_internal, nil do |request, option| actual_request = request actual_option = option end @@ -545,7 +545,7 @@ expected_request = {topic: "projects/test/topics/#{topic_name}", messages: ["data"]} actual_request = nil actual_option = "test" - mocked_topic_admin.expect :publish, nil do |request, option| + mocked_topic_admin.expect :publish_internal, nil do |request, option| actual_request = request actual_option = option end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/batch_publisher_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/batch_publisher_test.rb index 7fc0c53b6c25..5b70ade22acc 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/batch_publisher_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/batch_publisher_test.rb @@ -24,7 +24,7 @@ messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*241)]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end service = pubsub.service @@ -40,7 +40,7 @@ messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*238)]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end service = pubsub.service @@ -55,7 +55,7 @@ expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"data")]} publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end service = pubsub.service @@ -71,7 +71,7 @@ messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*141)]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end service = pubsub.service @@ -87,7 +87,7 @@ messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*138)]} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end service = pubsub.service @@ -102,7 +102,7 @@ expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"data")]} publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end service = pubsub.service @@ -117,7 +117,7 @@ expected_request = {topic: "projects/test/topics/#{topic_name}", messages: [Google::Cloud::PubSub::V1::PubsubMessage.new(data:"d"*241)]} publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) - mocked_topic_admin.expect :publish, publish_res do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end service = pubsub.service diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/timed_unary_buffer_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/timed_unary_buffer_test.rb index 6eb4222cb956..40677b790f3e 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/timed_unary_buffer_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/message_listener/timed_unary_buffer_test.rb @@ -38,7 +38,7 @@ stub = StreamingPullStub.new response_groups called = false - def stub.acknowledge subscription:, ack_ids: + def stub.acknowledge_internal subscription:, ack_ids: @acknowledge_requests << [subscription, ack_ids.flatten.sort] begin raise GRPC::InvalidArgument.new "test" @@ -77,7 +77,7 @@ def stub.acknowledge subscription:, ack_ids: stub = StreamingPullStub.new response_groups called = false - def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: + def stub.modify_ack_deadline_internal subscription:, ack_ids:, ack_deadline_seconds: if @modify_ack_deadline_requests.count == 0 return @modify_ack_deadline_requests << [subscription, ack_ids.sort, ack_deadline_seconds] end @@ -120,7 +120,7 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: stub = StreamingPullStub.new response_groups called = false errors = [] - def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: + def stub.modify_ack_deadline_internal subscription:, ack_ids:, ack_deadline_seconds: if @modify_ack_deadline_requests.count == 0 return @modify_ack_deadline_requests << [subscription, ack_ids.sort, ack_deadline_seconds] end @@ -166,7 +166,7 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: stub = StreamingPullStub.new response_groups called = false errors = [] - def stub.acknowledge subscription:, ack_ids: + def stub.acknowledge_internal subscription:, ack_ids: raise StandardError.new "Test failure" end @@ -208,7 +208,7 @@ def stub.acknowledge subscription:, ack_ids: stub = StreamingPullStub.new response_groups called = false errors = [] - def stub.acknowledge subscription:, ack_ids: + def stub.acknowledge_internal subscription:, ack_ids: raise Google::Cloud::PermissionDeniedError.new "Test failure" end @@ -250,7 +250,7 @@ def stub.acknowledge subscription:, ack_ids: stub = StreamingPullStub.new response_groups called = false errors = [] - def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: + def stub.modify_ack_deadline_internal subscription:, ack_ids:, ack_deadline_seconds: if @modify_ack_deadline_requests.count == 0 return @modify_ack_deadline_requests << ["ack_ids"] end @@ -295,7 +295,7 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: stub = StreamingPullStub.new response_groups called = false errors = [] - def stub.acknowledge subscription:, ack_ids: + def stub.acknowledge_internal subscription:, ack_ids: raise Google::Cloud::FailedPreconditionError.new "Test failure" end @@ -337,7 +337,7 @@ def stub.acknowledge subscription:, ack_ids: stub = StreamingPullStub.new response_groups called = false errors = [] - def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: + def stub.modify_ack_deadline_internal subscription:, ack_ids:, ack_deadline_seconds: if @modify_ack_deadline_requests.count == 0 return @modify_ack_deadline_requests << ["ack_ids"] end @@ -468,7 +468,7 @@ def stub.modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: stub = StreamingPullStub.new response_groups called = false errors = [] - def stub.acknowledge subscription:, ack_ids: + def stub.acknowledge_internal subscription:, ack_ids: @acknowledge_requests << [subscription, ack_ids.flatten.sort] begin raise GRPC::InvalidArgument.new diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/publisher/message_ordering_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/message_ordering_test.rb index 2953e9ba8aa8..cb47afbe93a0 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/publisher/message_ordering_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/message_ordering_test.rb @@ -32,7 +32,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -52,7 +52,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -75,7 +75,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1", "msg2", "msg3"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_test.rb index 90b2cbd29594..b7482b073529 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/publisher/publish_test.rb @@ -31,7 +31,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -51,7 +51,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -72,7 +72,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -99,7 +99,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -122,7 +122,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1", "msg2", "msg3"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -152,7 +152,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -172,7 +172,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -195,7 +195,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1", "msg2", "msg3"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -221,7 +221,7 @@ it "publishes a message" do stub = Object.new - def stub.publish *args + def stub.publish_internal *args raise Google::Cloud::NotFoundError.new("not found") end pubsub.service.mocked_topic_admin = stub @@ -233,7 +233,7 @@ def stub.publish *args it "publishes a message with attributes" do stub = Object.new - def stub.publish *args + def stub.publish_internal *args raise Google::Cloud::NotFoundError.new("not found") end pubsub.service.mocked_topic_admin = stub @@ -245,7 +245,7 @@ def stub.publish *args it "publishes multiple messages with a block" do stub = Object.new - def stub.publish *args + def stub.publish_internal *args raise Google::Cloud::NotFoundError.new("not found") end pubsub.service.mocked_topic_admin = stub diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/publisher_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/publisher_test.rb index 06a79e346236..1d2533272b29 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/publisher_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/publisher_test.rb @@ -32,7 +32,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request, actual_option| + mock.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end publisher.service.mocked_topic_admin = mock @@ -53,7 +53,7 @@ mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } - mock.expect :publish, publish_res do |actual_request, actual_option| + mock.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end publisher.service.mocked_topic_admin = mock @@ -74,7 +74,7 @@ mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} expected_option = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } - mock.expect :publish, publish_res do |actual_request, actual_option| + mock.expect :publish_internal, publish_res do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_option end publisher.service.mocked_topic_admin = mock @@ -96,7 +96,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -122,7 +122,7 @@ publish_res = Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: ["msg1", "msg2"] }) mock = Minitest::Mock.new expected_request = {topic: topic_path(topic_name), messages: messages} - mock.expect :publish, publish_res do |actual_request| + mock.expect :publish_internal, publish_res do |actual_request| actual_request == expected_request end publisher.service.mocked_topic_admin = mock @@ -141,4 +141,4 @@ _(msgs.last.message_id).must_equal "msg2" _(msgs.last.attributes["format"]).must_equal "none" end -end +end \ No newline at end of file diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/received_message_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/received_message_test.rb index 03198b710c56..84d8ccb44b62 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/received_message_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/received_message_test.rb @@ -1,4 +1,4 @@ - # Copyright 2015 Google LLC +# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -82,7 +82,7 @@ it "can acknowledge" do ack_res = nil mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] + mock.expect :acknowledge_internal, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] subscriber.service.mocked_subscription_admin = mock rec_message.acknowledge! @@ -93,7 +93,7 @@ it "can ack" do ack_res = nil mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] + mock.expect :acknowledge_internal, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] subscriber.service.mocked_subscription_admin = mock rec_message.ack! @@ -104,7 +104,7 @@ it "can ack with block and returns success" do ack_res = nil mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] + mock.expect :acknowledge_internal, ack_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id] subscriber.service.mocked_subscription_admin = mock rec_message.ack! do |result| @@ -118,7 +118,7 @@ new_deadline = 42 mad_res = nil mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: new_deadline + mock.expect :modify_ack_deadline_internal, mad_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: new_deadline subscriber.service.mocked_subscription_admin = mock rec_message.modify_ack_deadline! new_deadline @@ -130,7 +130,7 @@ new_deadline = 42 mad_res = nil mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, mad_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: new_deadline + mock.expect :modify_ack_deadline_internal, mad_res, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: new_deadline subscriber.service.mocked_subscription_admin = mock rec_message.modify_ack_deadline! new_deadline do |result| @@ -142,7 +142,7 @@ it "can reject" do mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 + mock.expect :modify_ack_deadline_internal, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 subscriber.service.mocked_subscription_admin = mock rec_message.reject! @@ -152,7 +152,7 @@ it "can nack" do mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 + mock.expect :modify_ack_deadline_internal, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 subscriber.service.mocked_subscription_admin = mock rec_message.nack! @@ -162,7 +162,7 @@ it "can ignore" do mock = Minitest::Mock.new - mock.expect :modify_ack_deadline, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 + mock.expect :modify_ack_deadline_internal, nil, subscription: subscription_path(subscription_name), ack_ids: [rec_message.ack_id], ack_deadline_seconds: 0 subscriber.service.mocked_subscription_admin = mock rec_message.ignore! diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/service_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/service_test.rb index fa8c3e8750b9..8f065f4e1a8d 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/service_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/service_test.rb @@ -206,7 +206,7 @@ def logger service = Google::Cloud::PubSub::Service.new project, nil mocked_subscription_admin = Minitest::Mock.new service.mocked_subscription_admin = mocked_subscription_admin - def mocked_subscription_admin.acknowledge *args + def mocked_subscription_admin.acknowledge_internal *args raise RuntimeError.new "test" end assert_raises RuntimeError do @@ -218,7 +218,7 @@ def mocked_subscription_admin.acknowledge *args service = Google::Cloud::PubSub::Service.new project, nil mocked_subscription_admin = Minitest::Mock.new service.mocked_subscription_admin = mocked_subscription_admin - def mocked_subscription_admin.modify_ack_deadline *args + def mocked_subscription_admin.modify_ack_deadline_internal *args raise RuntimeError.new "test" end assert_raises RuntimeError do @@ -232,7 +232,7 @@ def mocked_subscription_admin.modify_ack_deadline *args service.mocked_topic_admin = mocked_topic_admin expected_request = {topic: "projects/test/topics/test", messages: "data"} expected_options = ::Gapic::CallOptions.new metadata: { "grpc-internal-encoding-request": "gzip" } - mocked_topic_admin.expect :publish, nil do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, nil do |actual_request, actual_option| actual_request == expected_request && actual_option == expected_options end service.publish "test", "data", compress: true @@ -244,7 +244,7 @@ def mocked_subscription_admin.modify_ack_deadline *args mocked_topic_admin = Minitest::Mock.new service.mocked_topic_admin = mocked_topic_admin expected_request = {topic: "projects/test/topics/test", messages: "data"} - mocked_topic_admin.expect :publish, nil do |actual_request, actual_option| + mocked_topic_admin.expect :publish_internal, nil do |actual_request, actual_option| actual_request == expected_request && actual_option.nil? end service.publish "test", "data" @@ -279,3 +279,54 @@ def assert_config_rpcs_equals expected_rpcs, expected_rpcs_count, actual_rpcs, t end end end + +describe Google::Cloud::PubSub::TopicAdmin::Client do + it "is a subclass of V1::TopicAdmin::Client" do + assert(Google::Cloud::PubSub::TopicAdmin::Client < Google::Cloud::PubSub::V1::TopicAdmin::Client) + end + + it "raises when publish is called" do + client = Google::Cloud::PubSub::TopicAdmin::Client.new do |config| + config.credentials = :this_channel_is_insecure + end + assert_raises NotImplementedError do + client.publish + end + end +end + +describe Google::Cloud::PubSub::SubscriptionAdmin::Client do + let(:client) do + Google::Cloud::PubSub::SubscriptionAdmin::Client.new do |config| + config.credentials = :this_channel_is_insecure + end + end + + it "is a subclass of V1::SubscriptionAdmin::Client" do + assert(Google::Cloud::PubSub::SubscriptionAdmin::Client < Google::Cloud::PubSub::V1::SubscriptionAdmin::Client) + end + + it "raises when modify_ack_deadline is called" do + assert_raises NotImplementedError do + client.modify_ack_deadline + end + end + + it "raises when acknowledge is called" do + assert_raises NotImplementedError do + client.acknowledge + end + end + + it "raises when pull is called" do + assert_raises NotImplementedError do + client.pull + end + end + + it "raises when streaming_pull is called" do + assert_raises NotImplementedError do + client.streaming_pull + end + end +end diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_test.rb index 9a304fe67a7a..aa5f1610195f 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_test.rb @@ -25,7 +25,7 @@ rec_message_msg = "pulled-message" pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new - mock.expect :pull, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: true + mock.expect :pull_internal, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: true subscriber.service.mocked_subscription_admin = mock rec_messages = subscriber.pull @@ -45,7 +45,7 @@ rec_message_msg = "pulled-message" pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new - mock.expect :pull, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: true + mock.expect :pull_internal, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: true subscriber.service.mocked_subscription_admin = mock rec_messages = subscriber.pull @@ -65,7 +65,7 @@ it "raises NotFoundError when pulling messages" do stub = Object.new - def stub.pull *args + def stub.pull_internal *args raise Google::Cloud::NotFoundError.new("not found") end subscriber.service.mocked_subscription_admin = stub diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_wait_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_wait_test.rb index 85176669a262..fe61340dde5a 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_wait_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber/pull_wait_test.rb @@ -25,7 +25,7 @@ rec_message_msg = "pulled-message" pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new - mock.expect :pull, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: false + mock.expect :pull_internal, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: false subscriber.service.mocked_subscription_admin = mock rec_messages = subscriber.pull immediate: false @@ -40,7 +40,7 @@ rec_message_msg = "pulled-message" pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new - mock.expect :pull, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: false + mock.expect :pull_internal, pull_res, subscription: subscription_path(sub_name), max_messages: 100, return_immediately: false subscriber.service.mocked_subscription_admin = mock rec_messages = subscriber.wait_for_messages @@ -53,7 +53,7 @@ it "will not error when a request times out with Google::Cloud::DeadlineExceededError" do stub = Object.new - def stub.pull *args + def stub.pull_internal *args raise Google::Cloud::DeadlineExceededError end subscriber.service.mocked_subscription_admin = stub diff --git a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber_test.rb b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber_test.rb index fc48203309b6..fa0e89655a05 100644 --- a/google-cloud-pubsub/test/google/cloud/pubsub/subscriber_test.rb +++ b/google-cloud-pubsub/test/google/cloud/pubsub/subscriber_test.rb @@ -33,7 +33,7 @@ rec_message_msg = "pulled-message" pull_res = Google::Cloud::PubSub::V1::PullResponse.new rec_messages_hash(rec_message_msg) mock = Minitest::Mock.new - mock.expect :pull, pull_res, subscription: subscription_path(subscription_name), max_messages: 100, return_immediately: true + mock.expect :pull_internal, pull_res, subscription: subscription_path(subscription_name), max_messages: 100, return_immediately: true subscriber.service.mocked_subscription_admin = mock rec_messages = subscriber.pull @@ -47,7 +47,7 @@ it "can acknowledge one message" do ack_res = nil mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1"] + mock.expect :acknowledge_internal, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1"] subscriber.service.mocked_subscription_admin = mock subscriber.acknowledge "ack-id-1" @@ -58,7 +58,7 @@ it "can acknowledge many messages" do ack_res = nil mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1", "ack-id-2", "ack-id-3"] + mock.expect :acknowledge_internal, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1", "ack-id-2", "ack-id-3"] subscriber.service.mocked_subscription_admin = mock subscriber.acknowledge "ack-id-1", "ack-id-2", "ack-id-3" @@ -69,7 +69,7 @@ it "can acknowledge with ack" do ack_res = nil mock = Minitest::Mock.new - mock.expect :acknowledge, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1"] + mock.expect :acknowledge_internal, ack_res, subscription: subscription_path(subscription_name), ack_ids: ["ack-id-1"] subscriber.service.mocked_subscription_admin = mock subscriber.ack "ack-id-1" diff --git a/google-cloud-pubsub/test/helper.rb b/google-cloud-pubsub/test/helper.rb index d335530f2067..e5b42464bb68 100644 --- a/google-cloud-pubsub/test/helper.rb +++ b/google-cloud-pubsub/test/helper.rb @@ -46,16 +46,16 @@ def initialize response_groups # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - def streaming_pull request, options = nil + def streaming_pull_internal request, options = nil @requests << request @responses.shift.each end - def acknowledge subscription:, ack_ids: + def acknowledge_internal subscription:, ack_ids: @acknowledge_requests << [subscription, ack_ids.flatten.sort] end - def modify_ack_deadline subscription:, ack_ids:, ack_deadline_seconds: + def modify_ack_deadline_internal subscription:, ack_ids:, ack_deadline_seconds: @modify_ack_deadline_requests << [subscription, ack_ids.sort, ack_deadline_seconds] end @@ -90,7 +90,7 @@ def initialize @messages = [] end - def publish request, options=nil + def publish_internal request, options=nil @messages << request[:messages] message_ids = Array.new(request[:messages].count) { |i| "msg#{i}" } Google::Cloud::PubSub::V1::PublishResponse.new({ message_ids: message_ids }) From 7e8b77ec1f544513d93a8a3899a4d22995a89df8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 13:51:45 -0700 Subject: [PATCH 325/457] chore(main): release google-cloud-pubsub 3.0.0 (#30663) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: André Andreassa --- .release-please-manifest.json | 2 +- google-cloud-pubsub/CHANGELOG.md | 18 ++++++++++++++++++ .../lib/google/cloud/pubsub/version.rb | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4722f84f3b44..f67bc9850665 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -605,7 +605,7 @@ "google-cloud-profiler+FILLER": "0.0.0", "google-cloud-profiler-v2": "1.3.0", "google-cloud-profiler-v2+FILLER": "0.0.0", - "google-cloud-pubsub": "2.23.0", + "google-cloud-pubsub": "3.0.0", "google-cloud-pubsub+FILLER": "0.0.0", "google-cloud-pubsub-v1": "1.11.1", "google-cloud-pubsub-v1+FILLER": "0.0.0", diff --git a/google-cloud-pubsub/CHANGELOG.md b/google-cloud-pubsub/CHANGELOG.md index 26a684b058f0..b6d44d954ac9 100644 --- a/google-cloud-pubsub/CHANGELOG.md +++ b/google-cloud-pubsub/CHANGELOG.md @@ -1,5 +1,23 @@ # Release History +### 3.0.0 (2025-07-29) + +### ⚠ BREAKING CHANGES + +* The existing resource management API has been removed and replaced with the gRPC autogenerated surface. It includes CRUDL operations for topics, subscriptions, snapshots, and schemas as well as IAM. All legacy handwritten resource management classes are now deleted and operations will be performed via the generated clients. +* Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages. +* Remove Policy and RetryPolicy in favor of auto-generated counterparts ([#30725](https://github.com/googleapis/google-cloud-ruby/issues/30725)) +* Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile) + +#### Features + +* The existing resource management API has been removed and replaced with the gRPC autogenerated surface. It includes CRUDL operations for topics, subscriptions, snapshots, and schemas as well as IAM. All legacy handwritten resource management classes are now deleted and operations will be performed via the generated clients. +* Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages. +* Introduce path helper methods for accessing resources +* Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile) +* Remove Policy and RetryPolicy in favor of auto-generated counterparts ([#30725](https://github.com/googleapis/google-cloud-ruby/issues/30725)) +* Change default number of concurrent streams to 1 ([#30742](https://github.com/googleapis/google-cloud-ruby/issues/30742)) + ### 2.23.0 (2025-07-08) #### Features diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb index c67de9a427c0..0cd5e44b0f86 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module PubSub - VERSION = "2.23.0".freeze + VERSION = "3.0.0".freeze end Pubsub = PubSub unless const_defined? :Pubsub From 5ca5770c93f0aba0b8d2fc487695350f815ed947 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:53:14 -0700 Subject: [PATCH 326/457] fix(merchant-reviews-v1beta1)!: Renamed MerchantReview#attributes field to MerchantReview#merchant_review_attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(merchant-reviews-v1beta1)!: Renamed ProductReview#attributes field to ProductReview#product_review_attributes PiperOrigin-RevId: 786648704 Source-Link: https://github.com/googleapis/googleapis/commit/dfb458ecabfe33a612c7fae239c2799cf863e4a2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/18c17a8a5c03b1c43b319f98ffd3f09f64704384 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJldmlld3MtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiIxOGMxN2E4YTVjMDNiMWM0M2IzMTlmOThmZmQzZjA5ZjY0NzA0Mzg0In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../shopping/merchant/reviews/v1beta/merchantreviews_pb.rb | 2 +- .../shopping/merchant/reviews/v1beta/productreviews_pb.rb | 2 +- .../google/shopping/merchant/reviews/v1beta/merchantreviews.rb | 2 +- .../google/shopping/merchant/reviews/v1beta/productreviews.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb index 2171a6ba247e..e736b4d0a692 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb @@ -13,7 +13,7 @@ require 'google/shopping/type/types_pb' -descriptor_data = "\n=google/shopping/merchant/reviews/v1beta/merchantreviews.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x44google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x1a google/shopping/type/types.proto\"[\n\x18GetMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"^\n\x1b\x44\x65leteMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"\x90\x01\n\x1aListMerchantReviewsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/MerchantReview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1bInsertMerchantReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0fmerchant_review\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x1bListMerchantReviewsResponse\x12Q\n\x10merchant_reviews\x18\x01 \x03(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe1\x03\n\x0eMerchantReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1f\n\x12merchant_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\nattributes\x18\x03 \x01(\x0b\x32\x41.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16merchant_review_status\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reviews.v1beta.MerchantReviewStatusB\x03\xe0\x41\x03:z\xea\x41w\n)merchantapi.googleapis.com/MerchantReview\x12)accounts/{account}/merchantReviews/{name}*\x0fmerchantReviews2\x0emerchantReview2\xc8\x07\n\x16MerchantReviewsService\x12\xd3\x01\n\x11GetMerchantReview\x12\x41.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x12\xe6\x01\n\x13ListMerchantReviews\x12\x43.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest\x1a\x44.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{parent=accounts/*}/merchantReviews\x12\xea\x01\n\x14InsertMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"S\x82\xd3\xe4\x93\x02M\":/reviews/v1beta/{parent=accounts/*}/merchantReviews:insert:\x0fmerchant_review\x12\xb8\x01\n\x14\x44\x65leteMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcf\x02\n+com.google.shopping.merchant.reviews.v1betaB\x14MerchantReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" +descriptor_data = "\n=google/shopping/merchant/reviews/v1beta/merchantreviews.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x44google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x1a google/shopping/type/types.proto\"[\n\x18GetMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"^\n\x1b\x44\x65leteMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"\x90\x01\n\x1aListMerchantReviewsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/MerchantReview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1bInsertMerchantReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0fmerchant_review\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x1bListMerchantReviewsResponse\x12Q\n\x10merchant_reviews\x18\x01 \x03(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x03\n\x0eMerchantReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1f\n\x12merchant_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12j\n\x1amerchant_review_attributes\x18\x03 \x01(\x0b\x32\x41.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16merchant_review_status\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reviews.v1beta.MerchantReviewStatusB\x03\xe0\x41\x03:z\xea\x41w\n)merchantapi.googleapis.com/MerchantReview\x12)accounts/{account}/merchantReviews/{name}*\x0fmerchantReviews2\x0emerchantReview2\xc8\x07\n\x16MerchantReviewsService\x12\xd3\x01\n\x11GetMerchantReview\x12\x41.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x12\xe6\x01\n\x13ListMerchantReviews\x12\x43.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest\x1a\x44.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{parent=accounts/*}/merchantReviews\x12\xea\x01\n\x14InsertMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"S\x82\xd3\xe4\x93\x02M\":/reviews/v1beta/{parent=accounts/*}/merchantReviews:insert:\x0fmerchant_review\x12\xb8\x01\n\x14\x44\x65leteMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcf\x02\n+com.google.shopping.merchant.reviews.v1betaB\x14MerchantReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb index d297139c98f2..191d9b40b4fd 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb @@ -13,7 +13,7 @@ require 'google/shopping/type/types_pb' -descriptor_data = "\n\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(merchantapi.googleapis.com/ProductReview\"\\\n\x1a\x44\x65leteProductReviewRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(merchantapi.googleapis.com/ProductReview\"\x8e\x01\n\x19ListProductReviewsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(merchantapi.googleapis.com/ProductReview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1aInsertProductReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\x0eproduct_review\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.reviews.v1beta.ProductReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x86\x01\n\x1aListProductReviewsResponse\x12O\n\x0fproduct_reviews\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.reviews.v1beta.ProductReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe1\x03\n\rProductReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11product_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\nattributes\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.reviews.v1beta.ProductReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12`\n\x15product_review_status\x18\x06 \x01(\x0b\x32<.google.shopping.merchant.reviews.v1beta.ProductReviewStatusB\x03\xe0\x41\x03:\x7f\xea\x41|\n(merchantapi.googleapis.com/ProductReview\x12\x31\x61\x63\x63ounts/{account}/productReviews/{productreview}*\x0eproductReviews2\rproductReview2\xb7\x07\n\x15ProductReviewsService\x12\xcf\x01\n\x10GetProductReview\x12@.google.shopping.merchant.reviews.v1beta.GetProductReviewRequest\x1a\x36.google.shopping.merchant.reviews.v1beta.ProductReview\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/reviews/v1beta/{name=accounts/*/productReviews/*}\x12\xe2\x01\n\x12ListProductReviews\x12\x42.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest\x1a\x43.google.shopping.merchant.reviews.v1beta.ListProductReviewsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/reviews/v1beta/{parent=accounts/*}/productReviews\x12\xe5\x01\n\x13InsertProductReview\x12\x43.google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest\x1a\x36.google.shopping.merchant.reviews.v1beta.ProductReview\"Q\x82\xd3\xe4\x93\x02K\"9/reviews/v1beta/{parent=accounts/*}/productReviews:insert:\x0eproduct_review\x12\xb5\x01\n\x13\x44\x65leteProductReview\x12\x43.google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/reviews/v1beta/{name=accounts/*/productReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x02\n+com.google.shopping.merchant.reviews.v1betaB\x13ProductReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" +descriptor_data = "\n\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(merchantapi.googleapis.com/ProductReview\"\\\n\x1a\x44\x65leteProductReviewRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(merchantapi.googleapis.com/ProductReview\"\x8e\x01\n\x19ListProductReviewsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(merchantapi.googleapis.com/ProductReview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1aInsertProductReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\x0eproduct_review\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.reviews.v1beta.ProductReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x86\x01\n\x1aListProductReviewsResponse\x12O\n\x0fproduct_reviews\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.reviews.v1beta.ProductReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf0\x03\n\rProductReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11product_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12h\n\x19product_review_attributes\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.reviews.v1beta.ProductReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12`\n\x15product_review_status\x18\x06 \x01(\x0b\x32<.google.shopping.merchant.reviews.v1beta.ProductReviewStatusB\x03\xe0\x41\x03:\x7f\xea\x41|\n(merchantapi.googleapis.com/ProductReview\x12\x31\x61\x63\x63ounts/{account}/productReviews/{productreview}*\x0eproductReviews2\rproductReview2\xb7\x07\n\x15ProductReviewsService\x12\xcf\x01\n\x10GetProductReview\x12@.google.shopping.merchant.reviews.v1beta.GetProductReviewRequest\x1a\x36.google.shopping.merchant.reviews.v1beta.ProductReview\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/reviews/v1beta/{name=accounts/*/productReviews/*}\x12\xe2\x01\n\x12ListProductReviews\x12\x42.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest\x1a\x43.google.shopping.merchant.reviews.v1beta.ListProductReviewsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/reviews/v1beta/{parent=accounts/*}/productReviews\x12\xe5\x01\n\x13InsertProductReview\x12\x43.google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest\x1a\x36.google.shopping.merchant.reviews.v1beta.ProductReview\"Q\x82\xd3\xe4\x93\x02K\"9/reviews/v1beta/{parent=accounts/*}/productReviews:insert:\x0eproduct_review\x12\xb5\x01\n\x13\x44\x65leteProductReview\x12\x43.google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/reviews/v1beta/{name=accounts/*/productReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x02\n+com.google.shopping.merchant.reviews.v1betaB\x13ProductReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb index df7a60dac9eb..afef23b6d2db 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb @@ -108,7 +108,7 @@ class ListMerchantReviewsResponse # @return [::String] # Required. The user provided merchant review ID to uniquely identify the # merchant review. - # @!attribute [rw] attributes + # @!attribute [rw] merchant_review_attributes # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewAttributes] # Optional. A list of merchant review attributes. # @!attribute [rw] custom_attributes diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb index da154fe64969..64fd36ae9416 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb @@ -105,7 +105,7 @@ class ListProductReviewsResponse # @return [::String] # Required. The permanent, unique identifier for the product review in the # publisher’s system. - # @!attribute [rw] attributes + # @!attribute [rw] product_review_attributes # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes] # Optional. A list of product review attributes. # @!attribute [rw] custom_attributes From 58c17cdb1c294edd45d03ff1efce715e3d05b902 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:45:03 -0700 Subject: [PATCH 327/457] docs(secure_source_manager-v1): Provided additional details on methods related to pull request comments (#30746) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 788097378 chore: regenerate gapic yaml and service yaml for privilegedaccessmanager by augmentation configs PiperOrigin-RevId: 788127000 chore: regenerate gapic yaml and service yaml for recaptchaenterprise beta by augmentation configs PiperOrigin-RevId: 788127088 chore: regenerate gapic yaml and service yaml for recaptchaenterprise by augmentation configs PiperOrigin-RevId: 788127191 chore: regenerate gapic yaml and service yaml for config by augmentation configs PiperOrigin-RevId: 788127291 chore: regenerate gapic yaml and service yaml for metastore alpha by augmentation configs PiperOrigin-RevId: 788127383 build: include all contents of the .bcr folder PiperOrigin-RevId: 788127546 PiperOrigin-RevId: 788251106 PiperOrigin-RevId: 788269006 PiperOrigin-RevId: 788536453 PiperOrigin-RevId: 788541778 build: include .bazelignore in this repository PiperOrigin-RevId: 788552876 Source-Link: https://github.com/googleapis/googleapis/commit/8e5eb7e6cb8419e11d3b1fdf7f2af022ec72c452 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c59454245fdc2b8ac829f76b4c7972e43b46c76d Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyZV9zb3VyY2VfbWFuYWdlci12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzU5NDU0MjQ1ZmRjMmI4YWM4MjlmNzZiNGM3OTcyZTQzYjQ2Yzc2ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1/secure_source_manager/client.rb | 22 +++++++++++++++---- .../v1/secure_source_manager/rest/client.rb | 22 +++++++++++++++---- .../v1/secure_source_manager_services_pb.rb | 22 +++++++++++++++---- 3 files changed, 54 insertions(+), 12 deletions(-) diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb index 0cde142708b4..7c55e04a152f 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb @@ -4223,7 +4223,11 @@ def list_pull_request_comments request, options = nil end ## - # Creates a pull request comment. + # Creates a pull request comment. This function is used to create a single + # PullRequestComment of type Comment, or a single PullRequestComment of type + # Code that's replying to another PullRequestComment of type Code. Use + # BatchCreatePullRequestComments to create multiple PullRequestComments for + # code reviews. # # @overload create_pull_request_comment(request, options = nil) # Pass arguments to `create_pull_request_comment` via a request object, either of type @@ -4515,7 +4519,11 @@ def delete_pull_request_comment request, options = nil end ## - # Batch creates pull request comments. + # Batch creates pull request comments. This function is used to create + # multiple PullRequestComments for code review. There needs to be exactly one + # PullRequestComment of type Review, and at most 100 PullRequestComments of + # type Code per request. The Postition of the code comments must be unique + # within the request. # # @overload batch_create_pull_request_comments(request, options = nil) # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type @@ -4616,7 +4624,10 @@ def batch_create_pull_request_comments request, options = nil end ## - # Resolves pull request comments. + # Resolves pull request comments. A list of PullRequestComment names must be + # provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be resolved. # # @overload resolve_pull_request_comments(request, options = nil) # Pass arguments to `resolve_pull_request_comments` via a request object, either of type @@ -4720,7 +4731,10 @@ def resolve_pull_request_comments request, options = nil end ## - # Unresolves pull request comment. + # Unresolves pull request comments. A list of PullRequestComment names must + # be provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be unresolved. # # @overload unresolve_pull_request_comments(request, options = nil) # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb index 6a910a068127..95215d231ff8 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb @@ -3931,7 +3931,11 @@ def list_pull_request_comments request, options = nil end ## - # Creates a pull request comment. + # Creates a pull request comment. This function is used to create a single + # PullRequestComment of type Comment, or a single PullRequestComment of type + # Code that's replying to another PullRequestComment of type Code. Use + # BatchCreatePullRequestComments to create multiple PullRequestComments for + # code reviews. # # @overload create_pull_request_comment(request, options = nil) # Pass arguments to `create_pull_request_comment` via a request object, either of type @@ -4202,7 +4206,11 @@ def delete_pull_request_comment request, options = nil end ## - # Batch creates pull request comments. + # Batch creates pull request comments. This function is used to create + # multiple PullRequestComments for code review. There needs to be exactly one + # PullRequestComment of type Review, and at most 100 PullRequestComments of + # type Code per request. The Postition of the code comments must be unique + # within the request. # # @overload batch_create_pull_request_comments(request, options = nil) # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type @@ -4296,7 +4304,10 @@ def batch_create_pull_request_comments request, options = nil end ## - # Resolves pull request comments. + # Resolves pull request comments. A list of PullRequestComment names must be + # provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be resolved. # # @overload resolve_pull_request_comments(request, options = nil) # Pass arguments to `resolve_pull_request_comments` via a request object, either of type @@ -4393,7 +4404,10 @@ def resolve_pull_request_comments request, options = nil end ## - # Unresolves pull request comment. + # Unresolves pull request comments. A list of PullRequestComment names must + # be provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be unresolved. # # @overload unresolve_pull_request_comments(request, options = nil) # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb index ba71d2c05854..35829e08eddd 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb @@ -124,17 +124,31 @@ class Service rpc :GetPullRequestComment, ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Google::Cloud::SecureSourceManager::V1::PullRequestComment # Lists pull request comments. rpc :ListPullRequestComments, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse - # Creates a pull request comment. + # Creates a pull request comment. This function is used to create a single + # PullRequestComment of type Comment, or a single PullRequestComment of type + # Code that's replying to another PullRequestComment of type Code. Use + # BatchCreatePullRequestComments to create multiple PullRequestComments for + # code reviews. rpc :CreatePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Google::Longrunning::Operation # Updates a pull request comment. rpc :UpdatePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Google::Longrunning::Operation # Deletes a pull request comment. rpc :DeletePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Google::Longrunning::Operation - # Batch creates pull request comments. + # Batch creates pull request comments. This function is used to create + # multiple PullRequestComments for code review. There needs to be exactly one + # PullRequestComment of type Review, and at most 100 PullRequestComments of + # type Code per request. The Postition of the code comments must be unique + # within the request. rpc :BatchCreatePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Google::Longrunning::Operation - # Resolves pull request comments. + # Resolves pull request comments. A list of PullRequestComment names must be + # provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be resolved. rpc :ResolvePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Google::Longrunning::Operation - # Unresolves pull request comment. + # Unresolves pull request comments. A list of PullRequestComment names must + # be provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be unresolved. rpc :UnresolvePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Google::Longrunning::Operation # Creates an issue comment. rpc :CreateIssueComment, ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Google::Longrunning::Operation From d156aed6e2026106fc10f56958bd8d77915700ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Tue, 5 Aug 2025 10:43:58 -0700 Subject: [PATCH 328/457] docs(pubsub): Update README.md to v3.x (#30751) --- google-cloud-pubsub/README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/google-cloud-pubsub/README.md b/google-cloud-pubsub/README.md index c56303cfaa5e..ee92f6b7b19c 100644 --- a/google-cloud-pubsub/README.md +++ b/google-cloud-pubsub/README.md @@ -28,37 +28,37 @@ pubsub = Google::Cloud::PubSub.new( credentials: "/path/to/keyfile.json" ) -# Retrieve a topic -topic = pubsub.topic "my-topic" +# Get a publisher for a topic +publisher = pubsub.publisher "my-topic" # Publish a new message -msg = topic.publish "new-message" +msg = publisher.publish "new-message" -# Retrieve a subscription -sub = pubsub.subscription "my-topic-sub" +# Get a subscriber for a subscription +subscriber = pubsub.subscriber "my-topic-sub" -# Create a subscriber to listen for available messages +# Create a listener to listen for available messages # By default, this block will be called on 8 concurrent threads. # This can be changed with the :threads option -subscriber = sub.listen do |received_message| +listener = subscriber.listen do |received_message| # process message puts "Data: #{received_message.message.data}, published at #{received_message.message.published_at}" received_message.acknowledge! end # Handle exceptions from listener -subscriber.on_error do |exception| +listener.on_error do |exception| puts "Exception: #{exception.class} #{exception.message}" end # Gracefully shut down the subscriber on program exit, blocking until # all received messages have been processed or 10 seconds have passed at_exit do - subscriber.stop!(10) + listener.stop!(10) end # Start background threads that will call the block passed to listen. -subscriber.start +listener.start # Block, letting processing threads continue in the background sleep @@ -102,8 +102,7 @@ support schedule. This library follows [Semantic Versioning](http://semver.org/). -It is currently in major version zero (0.y.z), which means that anything may -change at any time and the public API should not be considered stable. +This library is considered to be stable and will not have backwards-incompatible changes introduced in subsequent minor releases. ## Contributing From 9f32e834d514ddf62e83136edf5890db1c872096 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Tue, 15 Jul 2025 12:17:04 -0700 Subject: [PATCH 329/457] samples(pubsub): pubsub_commit_avro_schema sample --- .../samples/acceptance/schemas_test.rb | 27 +++++++++++++ .../samples/pubsub_commit_avro_schema.rb | 38 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb diff --git a/google-cloud-pubsub/samples/acceptance/schemas_test.rb b/google-cloud-pubsub/samples/acceptance/schemas_test.rb index 8548639762eb..d6249ed26e18 100644 --- a/google-cloud-pubsub/samples/acceptance/schemas_test.rb +++ b/google-cloud-pubsub/samples/acceptance/schemas_test.rb @@ -13,6 +13,7 @@ # limitations under the License. require_relative "helper" +require_relative "../pubsub_commit_avro_schema" require_relative "../pubsub_commit_proto_schema" require_relative "../pubsub_create_avro_schema" require_relative "../pubsub_create_topic_with_schema" @@ -183,6 +184,32 @@ end end end + + it "supports pubsub_commit_avro_schema & pubsub_commit_list_schema_revisions" do + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :AVRO, + definition: avsc_definition + @schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id + + rev_id = @schema.revision_id + + schema1 = nil + # pubsub_commit_avro_schema + out, _err = capture_io do + schema1 = commit_avro_schema schema_id: schema_id, avsc_file: avsc_file + end + refute_equal out, "Schema commited with revision #{rev_id}." + assert_includes out, "Schema commited with revision" + + # pubsub_list_schema_revisions + out, _err = capture_io do + list_schema_revisions schema_id: schema_id + end + + assert_includes out, schema1.revision_id + end end describe "PROTOCOL_BUFFER" do diff --git a/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb b/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb new file mode 100644 index 000000000000..eaeb5e640a31 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb @@ -0,0 +1,38 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def commit_avro_schema schema_id:, avsc_file: + # [START pubsub_commit_avro_schema] + # schema_id = "your-schema-id" + # avsc_file = "path/to/a/avsc_file.avsc" + + pubsub = Google::Cloud::Pubsub.new + + schemas = pubsub.schemas + + schema = schemas.get_schema name: pubsub.schema_path(schema_id) + + definition = File.read avsc_file + + schema.definition = definition + + result = schemas.commit_schema name: schema.name, + schema: schema + + puts "Schema commited with revision #{result.revision_id}." + result + # [END pubsub_commit_avro_schema] +end From 39c1e6cf9ae4b4774976ba895b9e549454894e14 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Tue, 15 Jul 2025 12:17:04 -0700 Subject: [PATCH 330/457] samples(pubsub): pubsub_create_proto_schema v2 upgrade and testing --- .../samples/acceptance/schemas_test.rb | 19 +++++++++++++++++-- .../samples/pubsub_create_proto_schema.rb | 10 +++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/google-cloud-pubsub/samples/acceptance/schemas_test.rb b/google-cloud-pubsub/samples/acceptance/schemas_test.rb index d6249ed26e18..377ada3ed083 100644 --- a/google-cloud-pubsub/samples/acceptance/schemas_test.rb +++ b/google-cloud-pubsub/samples/acceptance/schemas_test.rb @@ -37,6 +37,7 @@ let(:topic_admin) { pubsub.topic_admin } let(:subscription_admin) { pubsub.subscription_admin } let(:schemas) { pubsub.schemas } + let(:proto_file) { File.expand_path "data/us-states.proto", __dir__ } after do subscription_admin.delete_subscription subscription: @subscription.name if @subscription @@ -44,7 +45,7 @@ schemas.delete_schema name: @schema.name if @schema end - it "supports pubsub_create_schema, pubsub_get_schema, pubsub_list_schemas, pubsub_delete_schema" do + it "supports pubsub_create_avro_schema, pubsub_get_schema, pubsub_list_schemas, pubsub_delete_schema" do # create_avro_schema assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id} created.\n" do create_avro_schema schema_id: schema_id, avsc_file: avsc_file @@ -72,6 +73,21 @@ end end + it "supports pubsub_create_proto_schema, pubsub_get_schema" do + # create_proto_schema + assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id} created.\n" do + create_proto_schema schema_id: schema_id, proto_file: proto_file + end + @schema = schemas.get_schema name: pubsub.schema_path(schema_id) + assert @schema + assert_equal "projects/#{pubsub.project}/schemas/#{schema_id}", @schema.name + + # pubsub_get_schema + assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id} retrieved.\n" do + get_schema schema_id: schema_id + end + end + describe "AVRO" do require "avro" let(:avsc_definition) { File.read avsc_file } @@ -214,7 +230,6 @@ describe "PROTOCOL_BUFFER" do require_relative "../utilities/us-states_pb" - let(:proto_file) { File.expand_path "data/us-states.proto", __dir__ } let(:proto_definition) { File.read proto_file } let(:revision_file) { File.expand_path "data/us-states-revision.proto", __dir__ } diff --git a/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb b/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb index b79f136bf040..2b86b441ea86 100644 --- a/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb @@ -22,7 +22,15 @@ def create_proto_schema schema_id:, proto_file: pubsub = Google::Cloud::PubSub.new definition = File.read proto_file - schema = pubsub.create_schema schema_id, :protocol_buffer, definition + schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, + type: :PROTOCOL_BUFFER, + definition: definition + + schemas = pubsub.schemas + + schema = schemas.create_schema parent: pubsub.project_path, + schema: schema, + schema_id: schema_id puts "Schema #{schema.name} created." # [END pubsub_create_proto_schema] From 27c7ae0d7347b67879c0d5654407c41e823ce2da Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Tue, 15 Jul 2025 13:58:43 -0700 Subject: [PATCH 331/457] samples(pubsub): pubsub_publish_with_error v2 upgrade and testing --- google-cloud-pubsub/samples/acceptance/topics_test.rb | 3 ++- .../samples/pubsub_publish_with_error_handler.rb | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index a2e584e2a5a5..e9d33bdf3e7b 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -26,6 +26,7 @@ require_relative "../pubsub_list_topics.rb" require_relative "../pubsub_publish.rb" require_relative "../pubsub_publish_custom_attributes.rb" +require_relative "../pubsub_publish_with_error_handler.rb" require_relative "../pubsub_publish_with_ordering_keys.rb" require_relative "../pubsub_publisher_batch_settings.rb" require_relative "../pubsub_publisher_concurrency_control.rb" @@ -398,7 +399,7 @@ # publish_with_error_handler assert_output "Message published asynchronously.\n" do - publish_message_async topic_id: topic_id + publish_with_error_handler topic_id: topic_id end messages = [] diff --git a/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb b/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb index d7324f670053..6bc565e88697 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb @@ -20,16 +20,16 @@ def publish_with_error_handler topic_id: pubsub = Google::Cloud::PubSub.new - topic = pubsub.topic topic_id + publisher = pubsub.publisher topic_id begin - topic.publish_async "This is a test message." do |result| + publisher.publish_async "This is a test message." do |result| raise "Failed to publish the message." unless result.succeeded? puts "Message published asynchronously." end # Stop the async_publisher to send all queued messages immediately. - topic.async_publisher.stop.wait! + publisher.async_publisher.stop.wait! rescue StandardError => e puts "Received error while publishing: #{e.message}" end From a5295636beb67c37e5b4e7b7fa1da53ab47b8663 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Tue, 15 Jul 2025 14:09:39 -0700 Subject: [PATCH 332/457] samples(pubsub): pubsub_subscriber_error_listener v2 upgrade and testing --- .../samples/acceptance/subscriptions_test.rb | 14 ++++++++++++++ .../samples/pubsub_subscriber_error_listener.rb | 8 ++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb b/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb index 877132d4db55..cae07d51998d 100644 --- a/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb +++ b/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb @@ -22,6 +22,7 @@ require_relative "../pubsub_subscriber_flow_settings.rb" require_relative "../pubsub_subscriber_async_pull.rb" require_relative "../pubsub_subscriber_concurrency_control.rb" +require_relative "../pubsub_subscriber_error_listener.rb" require_relative "../pubsub_subscriber_sync_pull_with_lease.rb" require_relative "../pubsub_update_push_configuration.rb" require_relative "../pubsub_list_subscriptions.rb" @@ -164,6 +165,19 @@ end end + it "supports pubsub_subscriber_error_listener" do + publisher = pubsub.publisher @topic.name + publisher.publish "This is a test message." + sleep 5 + + # pubsub_subscriber_error_listener + expect_with_retry "pubsub_subscriber_error_listener" do + assert_output "Received message: This is a test message.\n" do + listen_for_messages_with_error_handler subscription_id: @subscription.name + end + end + end + it "supports pubsub_subscriber_async_pull_custom_attributes" do publisher = pubsub.publisher @topic.name publisher.publish "This is a test message.", origin: "ruby-sample" diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb b/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb index 49b39bf7a84a..352336d041ae 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb @@ -20,8 +20,8 @@ def listen_for_messages_with_error_handler subscription_id: pubsub = Google::Cloud::PubSub.new - subscription = pubsub.subscription subscription_id - subscriber = subscription.listen do |received_message| + subscriber = pubsub.subscriber subscription_id + listener = subscriber.listen do |received_message| puts "Received message: #{received_message.data}" received_message.acknowledge! end @@ -31,11 +31,11 @@ def listen_for_messages_with_error_handler subscription_id: Thread.abort_on_exception = true begin - subscriber.start + listener.start # Let the main thread sleep for 60 seconds so the thread for listening # messages does not quit sleep 60 - subscriber.stop.wait! + listener.stop.wait! rescue StandardError => e puts "Exception #{e.inspect}: #{e.message}" raise "Stopped listening for messages." From cfc588e46c483e025a82de69d8fce49e8602d7aa Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Thu, 17 Jul 2025 17:24:36 -0700 Subject: [PATCH 333/457] samples(pubsub): pubsub_get_schema_revision sample --- .../samples/acceptance/schemas_test.rb | 9 +++--- .../samples/pubsub_get_schema_revision.rb | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 google-cloud-pubsub/samples/pubsub_get_schema_revision.rb diff --git a/google-cloud-pubsub/samples/acceptance/schemas_test.rb b/google-cloud-pubsub/samples/acceptance/schemas_test.rb index 377ada3ed083..b50a6d274712 100644 --- a/google-cloud-pubsub/samples/acceptance/schemas_test.rb +++ b/google-cloud-pubsub/samples/acceptance/schemas_test.rb @@ -20,6 +20,7 @@ require_relative "../pubsub_create_proto_schema" require_relative "../pubsub_delete_schema" require_relative "../pubsub_get_schema" +require_relative "../pubsub_get_schema_revision" require_relative "../pubsub_list_schema_revisions" require_relative "../pubsub_list_schemas" require_relative "../pubsub_publish_avro_records" @@ -73,7 +74,7 @@ end end - it "supports pubsub_create_proto_schema, pubsub_get_schema" do + it "supports pubsub_create_proto_schema, pubsub_get_schema_revision" do # create_proto_schema assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id} created.\n" do create_proto_schema schema_id: schema_id, proto_file: proto_file @@ -82,9 +83,9 @@ assert @schema assert_equal "projects/#{pubsub.project}/schemas/#{schema_id}", @schema.name - # pubsub_get_schema - assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id} retrieved.\n" do - get_schema schema_id: schema_id + # pubsub_get_schema_revision + assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id}@#{@schema.revision_id} retrieved.\n" do + get_schema_revision schema_id: schema_id, revision_id: @schema.revision_id end end diff --git a/google-cloud-pubsub/samples/pubsub_get_schema_revision.rb b/google-cloud-pubsub/samples/pubsub_get_schema_revision.rb new file mode 100644 index 000000000000..2f60b16297a4 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_get_schema_revision.rb @@ -0,0 +1,30 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def get_schema_revision schema_id:, revision_id: + # [START pubsub_get_schema_revision] + # schema_id = "your-schema-id" + # revision_id = "your-revision-id" + + pubsub = Google::Cloud::Pubsub.new + + schemas = pubsub.schemas + + schema = schemas.get_schema name: pubsub.schema_path("#{schema_id}@#{revision_id}") + + puts "Schema #{schema.name} retrieved." + # [END pubsub_get_schema_revision] +end From 030b3b302e2ddd3caa39ce0a985d28af904149ea Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 13:07:05 -0700 Subject: [PATCH 334/457] samples(pubsub): pubsub_optimistic_subscribe sample --- .../samples/acceptance/subscriptions_test.rb | 24 +++++++++ .../samples/pubsub_optimistic_subscribe.rb | 49 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb diff --git a/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb b/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb index cae07d51998d..381a415f57dd 100644 --- a/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb +++ b/google-cloud-pubsub/samples/acceptance/subscriptions_test.rb @@ -17,6 +17,7 @@ require_relative "../pubsub_subscriber_exactly_once_delivery.rb" require_relative "../pubsub_create_subscription_with_exactly_once_delivery.rb" require_relative "../pubsub_create_bigquery_subscription.rb" +require_relative "../pubsub_optimistic_subscribe.rb" require_relative "../pubsub_subscriber_async_pull_custom_attributes.rb" require_relative "../pubsub_subscriber_sync_pull.rb" require_relative "../pubsub_subscriber_flow_settings.rb" @@ -281,4 +282,27 @@ ) end end + + it "supports pubsub_optimistic_subscribe" do + topic_id = @topic.name + subscription_id = random_subscription_id + publisher = pubsub.publisher @topic.name + + out, _err = capture_io do + optimistic_subscribe topic_id: topic_id, subscription_id: subscription_id + end + + assert_includes out, "Subscription #{subscription_id} does not exist." + assert_includes out, "Subscription #{subscription_id} created." + + @created_subscriptions << subscription_id + publisher.publish "This is a test message." + sleep 5 + + out, _err = capture_io do + optimistic_subscribe topic_id: topic_id, subscription_id: subscription_id + end + + assert_includes out, "Received message: This is a test message." + end end diff --git a/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb b/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb new file mode 100644 index 000000000000..1cb2339a34a7 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb @@ -0,0 +1,49 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def optimistic_subscribe topic_id:, subscription_id: + # [START pubsub_optimistic_subscribe] + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + + pubsub = Google::Cloud::Pubsub.new + + # Propagate expection from child threads to the main thread as soon as it is + # raised. Exceptions happened in the callback thread are collected in the + # callback thread pool and do not propagate to the main thread + Thread.abort_on_exception = true + + begin + subscriber = pubsub.subscriber subscription_id + listener = subscriber.listen do |received_message| + puts "Received message: #{received_message.data}" + received_message.acknowledge! + end + listener.start + # Let the main thread sleep for 60 seconds so the thread for listening + # messages does not quit + sleep 60 + listener.stop.wait! + rescue Google::Cloud::NotFoundError => e + puts "Subscription #{subscription_id} does not exist." + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id) + puts "Subscription #{subscription_id} created." + end + # [END pubsub_optimistic_subscribe] +end From 0d94638587f576b5b5c3845201fbd22f51e20898 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 13:16:04 -0700 Subject: [PATCH 335/457] samples(pubsub): pubsub_create_unwrapped_push_subscription sample --- .../samples/acceptance/topics_test.rb | 20 +++++++++- ...bsub_create_unwrapped_push_subscription.rb | 38 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 google-cloud-pubsub/samples/pubsub_create_unwrapped_push_subscription.rb diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index e9d33bdf3e7b..98f4e57821a2 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -16,6 +16,7 @@ require_relative "../pubsub_create_pull_subscription.rb" require_relative "../pubsub_create_push_subscription.rb" require_relative "../pubsub_create_topic.rb" +require_relative "../pubsub_create_unwrapped_push_subscription.rb" require_relative "../pubsub_dead_letter_create_subscription.rb" require_relative "../pubsub_dead_letter_delivery_attempt.rb" require_relative "../pubsub_dead_letter_remove.rb" @@ -190,7 +191,7 @@ endpoint = "https://#{pubsub.project}.appspot.com/push" - # pubsub_create_pull_subscription + # pubsub_create_push_subscription assert_output "Push subscription #{subscription_id} created.\n" do create_push_subscription topic_id: topic_id, subscription_id: subscription_id, endpoint: endpoint end @@ -201,6 +202,23 @@ assert_equal endpoint, @subscription.push_config.push_endpoint end + it "supports pubsub_create_unwrapped_push_subscription" do + #setup + @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) + + endpoint = "https://#{pubsub.project}.appspot.com/push" + + # pubsub_create_unwrapped_push_subscription + assert_output "Unwrapped push subscription #{subscription_id} created.\n" do + create_unwrapped_push_subscription topic_id: topic_id, subscription_id: subscription_id, endpoint: endpoint + end + + @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) + assert @subscription + assert_equal "projects/#{pubsub.project}/subscriptions/#{subscription_id}", @subscription.name + assert_equal endpoint, @subscription.push_config.push_endpoint + end + it "supports pubsub_dead_letter_create_subscription, pubsub_dead_letter_update_subscription, pubsub_dead_letter_delivery_attempt" do #setup @topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) diff --git a/google-cloud-pubsub/samples/pubsub_create_unwrapped_push_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_unwrapped_push_subscription.rb new file mode 100644 index 000000000000..16272329995a --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_create_unwrapped_push_subscription.rb @@ -0,0 +1,38 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def create_unwrapped_push_subscription topic_id:, subscription_id:, endpoint: + # [START pubsub_create_unwrapped_push_subscription] + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + # endpoint = "https://your-test-project.appspot.com/push" + + pubsub = Google::Cloud::Pubsub.new + + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + push_config: { + push_endpoint: endpoint, + no_wrapper: { + write_metadata: true + } + } + + puts "Unwrapped push subscription #{subscription_id} created." + # [END pubsub_create_unwrapped_push_subscription] +end From f57264987e8f315402010780861d3889ad471c9a Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 15:49:15 -0700 Subject: [PATCH 336/457] samples(pubsub) add locational endpoint to pubsub_subscriber_exactly_once_delivery sample --- .../samples/pubsub_subscriber_exactly_once_delivery.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb b/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb index 215ebbc73cc2..818f2eb1accc 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb @@ -18,7 +18,7 @@ def subscriber_exactly_once_delivery project_id:, subscription_id: # [START pubsub_subscriber_exactly_once] # project_id = "your-project-id" # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::PubSub.new project_id: project_id + pubsub = Google::Cloud::Pubsub.new project_id: project_id, endpoint: "us-west1-pubsub.googleapis.com:443" subscriber = pubsub.subscriber subscription_id listener = subscriber.listen do |received_message| puts "Received message: #{received_message.data}" From 447b06ad7884bcb1a98f40a18c055a689d4a9a54 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 15:35:25 -0700 Subject: [PATCH 337/457] samples(pubsub) pubsub_create_topic_with_cloud_storage_ingestion sample --- .../samples/acceptance/helper.rb | 4 ++ .../samples/acceptance/topics_test.rb | 33 +++++++++++ ...eate_topic_with_cloud_storage_ingestion.rb | 58 +++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb diff --git a/google-cloud-pubsub/samples/acceptance/helper.rb b/google-cloud-pubsub/samples/acceptance/helper.rb index 8c52b3167b1d..cb515a63726d 100644 --- a/google-cloud-pubsub/samples/acceptance/helper.rb +++ b/google-cloud-pubsub/samples/acceptance/helper.rb @@ -41,6 +41,10 @@ def random_table_id "ruby-pubsub-samples-test-table-#{SecureRandom.hex 4}" end +def random_bucket_id + "ruby-pubsub-samples-test-bucket-#{SecureRandom.hex 4}" +end + def create_table bigquery = Google::Cloud::Bigquery.new @dataset = bigquery.create_dataset random_dataset_id diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index 98f4e57821a2..78281fb4d055 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -15,6 +15,7 @@ require_relative "helper" require_relative "../pubsub_create_pull_subscription.rb" require_relative "../pubsub_create_push_subscription.rb" +require_relative "../pubsub_create_topic_with_cloud_storage_ingestion.rb" require_relative "../pubsub_create_topic.rb" require_relative "../pubsub_create_unwrapped_push_subscription.rb" require_relative "../pubsub_dead_letter_create_subscription.rb" @@ -38,6 +39,38 @@ require_relative "../pubsub_set_topic_policy.rb" require_relative "../pubsub_test_topic_permissions.rb" +describe "emulator" do + let(:pubsub) { Google::Cloud::Pubsub.new } + let(:topic_id) { random_topic_id } + let(:topic_admin) { pubsub.topic_admin } + + before do + pubsub_emulator_host = ENV["PUBSUB_EMULATOR_HOST"] + if pubsub_emulator_host.nil? + raise "PUBSUB_EMULATOR_HOST env variable must be set. Please follow instructions at https://cloud.google.com/pubsub/docs/emulator" + end + end + + after do + @topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) + assert @topic + assert_equal "projects/#{pubsub.project}/topics/#{topic_id}", @topic.name + topic_admin.delete_topic topic: @topic.name + end + + it "supports pubsub_create_topic_with_cloud_storage_ingestion" do + # pubsub_create_topic_with_cloud_storage_ingestion + assert_output "Topic with Cloud Storage Ingestion projects/#{pubsub.project}/topics/#{topic_id} created.\n" do + create_topic_with_cloud_storage_ingestion topic_id: topic_id, + bucket: random_bucket_id, + input_format: "text", + text_delimiter: "\n", + match_glob: "**.txt", + minimum_object_create_time: Google::Protobuf::Timestamp.new + end + end +end + describe "topics" do let(:pubsub) { Google::Cloud::PubSub.new } let(:role) { "roles/pubsub.publisher" } diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb new file mode 100644 index 000000000000..1aaaf2d40256 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb @@ -0,0 +1,58 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def create_topic_with_cloud_storage_ingestion topic_id:, bucket:, input_format:, text_delimiter:, match_glob:, + minimum_object_create_time: + # [START pubsub_create_topic_with_cloud_storage_ingestion] + # topic_id = "your-topic-id" + # bucket = "your-bucket-id" + # input_format = "text" + # text_delimiter = "\n" + # match_glob = "**.txt" + # minimum_object_create_time = Google::Protobuf::Timestamp.new + pubsub = Google::Cloud::Pubsub.new + + topic_admin = pubsub.topic_admin + + cloud_storage = + Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage.new bucket: bucket, + minimum_object_create_time: + minimum_object_create_time + + case input_format + when "text" + cloud_storage.text_format = + Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage::TextFormat.new delimiter: text_delimiter + when "avro" + cloud_storage.avro_format = Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage::AvroFormat.new + when "pubsub_avro" + cloud_storage.pubsub_avro_format = Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage::PubSubAvroFormat.new + else + raise "input_format must be in ('text', 'avro', 'pubsub_avro'); got value: #{input_format}" + end + + if !match_glob.nil? && !match_glob.empty? + cloud_storage.match_glob = match_glob + end + + topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), + ingestion_data_source_settings: { + cloud_storage: cloud_storage + } + + puts "Topic with Cloud Storage Ingestion #{topic.name} created." + # [END pubsub_create_topic_with_cloud_storage_ingestion] +end From a66442a81ce62f522e465fb0938438431bcb55e5 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 16:16:27 -0700 Subject: [PATCH 338/457] samples(pubsub): pubsub_create_topic_with_kinesis_ingestion sample --- .../samples/acceptance/topics_test.rb | 14 +++++++ ...sub_create_topic_with_kinesis_ingestion.rb | 40 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index 78281fb4d055..01a96f0afa58 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -16,6 +16,7 @@ require_relative "../pubsub_create_pull_subscription.rb" require_relative "../pubsub_create_push_subscription.rb" require_relative "../pubsub_create_topic_with_cloud_storage_ingestion.rb" +require_relative "../pubsub_create_topic_with_kinesis_ingestion.rb" require_relative "../pubsub_create_topic.rb" require_relative "../pubsub_create_unwrapped_push_subscription.rb" require_relative "../pubsub_dead_letter_create_subscription.rb" @@ -43,6 +44,8 @@ let(:pubsub) { Google::Cloud::Pubsub.new } let(:topic_id) { random_topic_id } let(:topic_admin) { pubsub.topic_admin } + let(:aws_role_arn) { "arn:aws:iam::111111111111:role/fake-role-name" } + let(:gcp_service_account) { "fake-service-account@project.iam.gserviceaccount.com" } before do pubsub_emulator_host = ENV["PUBSUB_EMULATOR_HOST"] @@ -69,6 +72,17 @@ minimum_object_create_time: Google::Protobuf::Timestamp.new end end + + it "supports pubsub_create_topic_with_kinesis_ingestion" do + # pubsub_create_topic_with_kinesis_ingestion + assert_output "Topic with Kinesis Ingestion projects/#{pubsub.project}/topics/#{topic_id} created.\n" do + create_topic_with_kinesis_ingestion topic_id: topic_id, + stream_arn: "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name", + consumer_arn: "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/consumer/consumer-1:1111111111", + aws_role_arn: aws_role_arn, + gcp_service_account: gcp_service_account + end + end end describe "topics" do diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb new file mode 100644 index 000000000000..072e257bf1de --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb @@ -0,0 +1,40 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def create_topic_with_kinesis_ingestion topic_id:, stream_arn:, consumer_arn:, aws_role_arn:, gcp_service_account: + # [START pubsub_create_topic_with_kinesis_ingestion] + # topic_id = "your-topic-id" + # stream_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name" + # consumer_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name/consumer/consumer-1:1111111111" + # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" + # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new + + topic_admin = pubsub.topic_admin + + topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), + ingestion_data_source_settings: { + aws_kinesis: { + stream_arn: stream_arn, + consumer_arn: consumer_arn, + aws_role_arn: aws_role_arn, + gcp_service_account: gcp_service_account + } + } + + puts "Topic with Kinesis Ingestion #{topic.name} created." + # [END pubsub_create_topic_with_kinesis_ingestion] +end From 87f8062ce7c5172367228db9c15322caac1b3c3a Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 16:25:46 -0700 Subject: [PATCH 339/457] samples(pubsub): pubsub_create_topic_with_aws_msk_ingestion sample --- .../samples/acceptance/topics_test.rb | 12 ++++++ ...sub_create_topic_with_aws_msk_ingestion.rb | 40 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index 01a96f0afa58..09f2b0807c68 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -15,6 +15,7 @@ require_relative "helper" require_relative "../pubsub_create_pull_subscription.rb" require_relative "../pubsub_create_push_subscription.rb" +require_relative "../pubsub_create_topic_with_aws_msk_ingestion.rb" require_relative "../pubsub_create_topic_with_cloud_storage_ingestion.rb" require_relative "../pubsub_create_topic_with_kinesis_ingestion.rb" require_relative "../pubsub_create_topic.rb" @@ -83,6 +84,17 @@ gcp_service_account: gcp_service_account end end + + it "supports pubsub_create_topic_with_aws_msk_ingestion" do + # pubsub_create_topic_with_aws_msk_ingestion + assert_output "Topic with Aws MSK Ingestion projects/#{pubsub.project}/topics/#{topic_id} created.\n" do + create_topic_with_aws_msk_ingestion topic_id: topic_id, + cluster_arn: "arn:aws:kafka:us-east-1:111111111111:cluster/fake-cluster-name/11111111-1111-1", + msk_topic: "fake-msk-topic-name", + aws_role_arn: aws_role_arn, + gcp_service_account: gcp_service_account + end + end end describe "topics" do diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb new file mode 100644 index 000000000000..745f8f2fbb19 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb @@ -0,0 +1,40 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def create_topic_with_aws_msk_ingestion topic_id:, cluster_arn:, msk_topic:, aws_role_arn:, gcp_service_account: + # [START pubsub_create_topic_with_aws_msk_ingestion] + # topic_id = "your-topic-id" + # cluster_arn = "arn:aws:kafka:us-east-1:111111111111:cluster/cluster-name/11111111-1111-1" + # msk_topic = "msk-topic-name" + # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" + # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new + + topic_admin = pubsub.topic_admin + + topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), + ingestion_data_source_settings: { + aws_msk: { + cluster_arn: cluster_arn, + topic: msk_topic, + aws_role_arn: aws_role_arn, + gcp_service_account: gcp_service_account + } + } + + puts "Topic with Aws MSK Ingestion #{topic.name} created." + # [END pubsub_create_topic_with_aws_msk_ingestion] +end From 105881705e33f05ead692495b4fb1667214390d5 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 17:12:17 -0700 Subject: [PATCH 340/457] samples(pubsub): pubsub_create_topic_with_azure_event_hubs_ingestion sample --- .../samples/acceptance/topics_test.rb | 15 ++++++ ...e_topic_with_azure_event_hubs_ingestion.rb | 47 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index 09f2b0807c68..b0bd7990c2eb 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -16,6 +16,7 @@ require_relative "../pubsub_create_pull_subscription.rb" require_relative "../pubsub_create_push_subscription.rb" require_relative "../pubsub_create_topic_with_aws_msk_ingestion.rb" +require_relative "../pubsub_create_topic_with_azure_event_hubs_ingestion.rb" require_relative "../pubsub_create_topic_with_cloud_storage_ingestion.rb" require_relative "../pubsub_create_topic_with_kinesis_ingestion.rb" require_relative "../pubsub_create_topic.rb" @@ -95,6 +96,20 @@ gcp_service_account: gcp_service_account end end + + it "supports pubsub_create_topic_with_azure_event_hubs_ingestion" do + # pubsub_create_topic_with_azure_event_hubs_ingestion + assert_output "Topic with Azure Event Hubs Ingestion projects/#{pubsub.project}/topics/#{topic_id} created.\n" do + create_topic_with_azure_event_hubs_ingestion topic_id: topic_id, + resource_group: "fake-resource-group", + namespace: "fake-namespace", + event_hub: "fake-event-hub", + client_id: "11111111-1111-1111-1111-11111111111", + tenant_id: "22222222-2222-2222-2222-222222222222", + subscription_id: "33333333-3333-3333-3333-333333333333", + gcp_service_account: gcp_service_account + end + end end describe "topics" do diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb new file mode 100644 index 000000000000..15c28737cc57 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb @@ -0,0 +1,47 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def create_topic_with_azure_event_hubs_ingestion topic_id:, resource_group:, namespace:, event_hub:, client_id:, + tenant_id:, subscription_id:, gcp_service_account: + # [START pubsub_create_topic_with_azure_event_hubs_ingestion] + # topic_id = "your-topic-id" + # resource_group = "resource-group" + # namespace = "namespace" + # event_hub = "event-hub" + # client_id = "11111111-1111-1111-1111-11111111111" + # tenant_id = "22222222-2222-2222-2222-222222222222" + # subscription_id = "33333333-3333-3333-3333-333333333333" + # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new + + topic_admin = pubsub.topic_admin + + topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), + ingestion_data_source_settings: { + azure_event_hubs: { + resource_group: resource_group, + namespace: namespace, + event_hub: event_hub, + client_id: client_id, + tenant_id: tenant_id, + subscription_id: subscription_id, + gcp_service_account: gcp_service_account + } + } + + puts "Topic with Azure Event Hubs Ingestion #{topic.name} created." + # [END pubsub_create_topic_with_azure_event_hubs_ingestion] +end From 9f607a962e308004a21e16654694ee991cc5116c Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 17:29:51 -0700 Subject: [PATCH 341/457] samples(pubsub): pubsub_create_topic_with_confluent_cloud_ingestion sample --- .../samples/acceptance/topics_test.rb | 13 ++++++ ...te_topic_with_confluent_cloud_ingestion.rb | 43 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index b0bd7990c2eb..16dd92b7720d 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -18,6 +18,7 @@ require_relative "../pubsub_create_topic_with_aws_msk_ingestion.rb" require_relative "../pubsub_create_topic_with_azure_event_hubs_ingestion.rb" require_relative "../pubsub_create_topic_with_cloud_storage_ingestion.rb" +require_relative "../pubsub_create_topic_with_confluent_cloud_ingestion.rb" require_relative "../pubsub_create_topic_with_kinesis_ingestion.rb" require_relative "../pubsub_create_topic.rb" require_relative "../pubsub_create_unwrapped_push_subscription.rb" @@ -110,6 +111,18 @@ gcp_service_account: gcp_service_account end end + + it "supports pubsub_create_topic_with_confluent_cloud_ingestion" do + # pubsub_create_topic_with_confluent_cloud_ingestion + assert_output "Topic with Confluent Cloud Ingestion projects/#{pubsub.project}/topics/#{topic_id} created.\n" do + create_topic_with_confluent_cloud_ingestion topic_id: topic_id, + bootstrap_server: "fake-bootstrap-server-id.us-south1.gcp.confluent.cloud:9092", + cluster_id: "fake-cluster-id", + confluent_topic: "fake-confluent-topic-name", + identity_pool_id: "fake-identity-pool-id", + gcp_service_account: gcp_service_account + end + end end describe "topics" do diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb new file mode 100644 index 000000000000..0ac79d0c47f7 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb @@ -0,0 +1,43 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def create_topic_with_confluent_cloud_ingestion topic_id:, bootstrap_server:, cluster_id:, confluent_topic:, + identity_pool_id:, gcp_service_account: + # [START pubsub_create_topic_with_confluent_cloud_ingestion] + # topic_id = "your-topic-id" + # bootstrap_server = "bootstrap-server-id.us-south1.gcp.confluent.cloud:9092" + # cluster_id = "cluster-id" + # confluent_topic = "confluent-topic-name" + # identity_pool_id = "identity-pool-id" + # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new + + topic_admin = pubsub.topic_admin + + topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), + ingestion_data_source_settings: { + confluent_cloud: { + bootstrap_server: bootstrap_server, + cluster_id: cluster_id, + topic: confluent_topic, + identity_pool_id: identity_pool_id, + gcp_service_account: gcp_service_account + } + } + + puts "Topic with Confluent Cloud Ingestion #{topic.name} created." + # [END pubsub_create_topic_with_confluent_cloud_ingestion] +end From 44bb0b447a831a982616fa62cdee097980bcc4fa Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 17:50:46 -0700 Subject: [PATCH 342/457] samples(pubsub): pubsub_update_topic_type sample --- .../samples/acceptance/topics_test.rb | 17 +++++++ .../samples/pubsub_update_topic_type.rb | 46 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_update_topic_type.rb diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index 16dd92b7720d..e8d6f14832ea 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -42,6 +42,7 @@ require_relative "../pubsub_resume_publish_with_ordering_keys.rb" require_relative "../pubsub_set_topic_policy.rb" require_relative "../pubsub_test_topic_permissions.rb" +require_relative "../pubsub_update_topic_type.rb" describe "emulator" do let(:pubsub) { Google::Cloud::Pubsub.new } @@ -123,6 +124,22 @@ gcp_service_account: gcp_service_account end end + + it "supports pubsub_create_topic, pubsub_update_topic_type" do + # pubsub_create_topic + assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do + create_topic topic_id: topic_id + end + + # pubsub_update_topic_type + assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} updated.\n" do + update_topic_type topic_id: topic_id, + stream_arn: "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name", + consumer_arn: "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/consumer/consumer-1:1111111111", + aws_role_arn: aws_role_arn, + gcp_service_account: gcp_service_account + end + end end describe "topics" do diff --git a/google-cloud-pubsub/samples/pubsub_update_topic_type.rb b/google-cloud-pubsub/samples/pubsub_update_topic_type.rb new file mode 100644 index 000000000000..5338c540f562 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_update_topic_type.rb @@ -0,0 +1,46 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def update_topic_type topic_id:, stream_arn:, consumer_arn:, aws_role_arn:, gcp_service_account: + # [START pubsub_update_topic_type] + # topic_id = "your-topic-id" + # stream_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name" + # consumer_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name/consumer/consumer-1:1111111111" + # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" + # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new + + topic_admin = pubsub.topic_admin + + ingestion_data_source_settings = Google::Cloud::PubSub::V1::IngestionDataSourceSettings.new aws_kinesis: { + stream_arn: stream_arn, + consumer_arn: consumer_arn, + aws_role_arn: aws_role_arn, + gcp_service_account: gcp_service_account + } + + topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) + + topic.ingestion_data_source_settings = ingestion_data_source_settings + + topic = topic_admin.update_topic topic: topic, + update_mask: { + paths: ["ingestion_data_source_settings"] + } + + puts "Topic #{topic.name} updated." + # [END pubsub_update_topic_type] +end From a263f6cfbca20ee36fa0d2a765fcab348d270b1a Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 18:31:02 -0700 Subject: [PATCH 343/457] samples(pubsub): pubsub_delete_schema_revision sample --- .../samples/acceptance/schemas_test.rb | 16 +++++++++- .../samples/pubsub_delete_schema_revision.rb | 30 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 google-cloud-pubsub/samples/pubsub_delete_schema_revision.rb diff --git a/google-cloud-pubsub/samples/acceptance/schemas_test.rb b/google-cloud-pubsub/samples/acceptance/schemas_test.rb index b50a6d274712..85b56f23130b 100644 --- a/google-cloud-pubsub/samples/acceptance/schemas_test.rb +++ b/google-cloud-pubsub/samples/acceptance/schemas_test.rb @@ -19,6 +19,7 @@ require_relative "../pubsub_create_topic_with_schema" require_relative "../pubsub_create_proto_schema" require_relative "../pubsub_delete_schema" +require_relative "../pubsub_delete_schema_revision" require_relative "../pubsub_get_schema" require_relative "../pubsub_get_schema_revision" require_relative "../pubsub_list_schema_revisions" @@ -39,6 +40,7 @@ let(:subscription_admin) { pubsub.subscription_admin } let(:schemas) { pubsub.schemas } let(:proto_file) { File.expand_path "data/us-states.proto", __dir__ } + let(:revision_file) { File.expand_path "data/us-states-revision.proto", __dir__ } after do subscription_admin.delete_subscription subscription: @subscription.name if @subscription @@ -74,7 +76,7 @@ end end - it "supports pubsub_create_proto_schema, pubsub_get_schema_revision" do + it "supports pubsub_create_proto_schema, pubsub_get_schema_revision, pubsub_commit_proto_schema, pubsub_delete_schema_revision" do # create_proto_schema assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id} created.\n" do create_proto_schema schema_id: schema_id, proto_file: proto_file @@ -87,6 +89,18 @@ assert_output "Schema projects/#{pubsub.project}/schemas/#{schema_id}@#{@schema.revision_id} retrieved.\n" do get_schema_revision schema_id: schema_id, revision_id: @schema.revision_id end + + # pubsub_commit_proto_schema + revised_schema = nil + out, _err = capture_io do + revised_schema = commit_proto_schema schema_id: schema_id, proto_file: revision_file + end + assert_includes out, "Schema commited with revision #{revised_schema.revision_id}." + + #pubsub_delete_schema_revision + assert_output "Schema #{schema_id}@#{revised_schema.revision_id} deleted.\n" do + delete_schema_revision schema_id: schema_id, revision_id: revised_schema.revision_id + end end describe "AVRO" do diff --git a/google-cloud-pubsub/samples/pubsub_delete_schema_revision.rb b/google-cloud-pubsub/samples/pubsub_delete_schema_revision.rb new file mode 100644 index 000000000000..7277d2a1a244 --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_delete_schema_revision.rb @@ -0,0 +1,30 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def delete_schema_revision schema_id:, revision_id: + # [START pubsub_delete_schema_revision] + # schema_id = "your-schema-id" + # revision_id = "your-revision-id" + + pubsub = Google::Cloud::Pubsub.new + + schemas = pubsub.schemas + + result = schemas.delete_schema_revision name: pubsub.schema_path("#{schema_id}@#{revision_id}") + + puts "Schema #{schema_id}@#{revision_id} deleted." + # [END pubsub_delete_schema_revision] +end From 40f296a8d38bb811572422c8269ebd6a600a8d2b Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 19:07:29 -0700 Subject: [PATCH 344/457] samples(pubsub): pubsub_create_cloud_storage_subscription sample --- .../samples/acceptance/topics_test.rb | 22 ++++++++++++ ...ubsub_create_cloud_storage_subscription.rb | 35 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 google-cloud-pubsub/samples/pubsub_create_cloud_storage_subscription.rb diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index e8d6f14832ea..fd80dc772ab7 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -13,6 +13,7 @@ # limitations under the License. require_relative "helper" +require_relative "../pubsub_create_cloud_storage_subscription.rb" require_relative "../pubsub_create_pull_subscription.rb" require_relative "../pubsub_create_push_subscription.rb" require_relative "../pubsub_create_topic_with_aws_msk_ingestion.rb" @@ -50,6 +51,7 @@ let(:topic_admin) { pubsub.topic_admin } let(:aws_role_arn) { "arn:aws:iam::111111111111:role/fake-role-name" } let(:gcp_service_account) { "fake-service-account@project.iam.gserviceaccount.com" } + let(:subscription_admin) { pubsub.subscription_admin } before do pubsub_emulator_host = ENV["PUBSUB_EMULATOR_HOST"] @@ -140,6 +142,26 @@ gcp_service_account: gcp_service_account end end + + it "supports pubsub_create_topic, pubsub_create_cloud_storage_subscription" do + # pubsub_create_topic + assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do + create_topic topic_id: topic_id + end + + subscription_id = random_subscription_id + bucket_id = random_bucket_id + + # pubsub_create_cloud_storage_subscription + assert_output "Cloud storage subscription #{subscription_id} created.\n" do + create_cloud_storage_subscription topic_id: topic_id, subscription_id: subscription_id, bucket: bucket_id + end + @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) + assert @subscription + assert_equal "projects/#{pubsub.project}/subscriptions/#{subscription_id}", @subscription.name + assert_equal bucket_id, @subscription.cloud_storage_config.bucket + subscription_admin.delete_subscription subscription: @subscription.name + end end describe "topics" do diff --git a/google-cloud-pubsub/samples/pubsub_create_cloud_storage_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_cloud_storage_subscription.rb new file mode 100644 index 000000000000..930cb2173cbc --- /dev/null +++ b/google-cloud-pubsub/samples/pubsub_create_cloud_storage_subscription.rb @@ -0,0 +1,35 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/pubsub" + +def create_cloud_storage_subscription topic_id:, subscription_id:, bucket: + # [START pubsub_create_cloud_storage_subscription] + # topic_id = "your-topic-id" + # subscription_id = "your-subscription-id" + # bucket = "your-bucket" + + pubsub = Google::Cloud::Pubsub.new + + subscription_admin = pubsub.subscription_admin + + subscription = subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + cloud_storage_config: { + bucket: bucket + } + + puts "Cloud storage subscription #{subscription_id} created." + # [END pubsub_create_cloud_storage_subscription] +end From 29972f64b7d1eda470882c8df98d82f4098dd3ec Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Wed, 23 Jul 2025 18:10:00 -0700 Subject: [PATCH 345/457] chore(pubsub): skip emulator tests if emulator host is not set --- google-cloud-pubsub/samples/acceptance/topics_test.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index fd80dc772ab7..747b0d26a669 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -54,10 +54,7 @@ let(:subscription_admin) { pubsub.subscription_admin } before do - pubsub_emulator_host = ENV["PUBSUB_EMULATOR_HOST"] - if pubsub_emulator_host.nil? - raise "PUBSUB_EMULATOR_HOST env variable must be set. Please follow instructions at https://cloud.google.com/pubsub/docs/emulator" - end + skip unless ENV["PUBSUB_EMULATOR_HOST"] end after do From cfff82fb334cdd9834d5b1f5c804045f266b0189 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Wed, 23 Jul 2025 19:11:02 -0700 Subject: [PATCH 346/457] chore(pubsub): use local variables instead of instance variables where appropriate --- .../samples/acceptance/topics_test.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/google-cloud-pubsub/samples/acceptance/topics_test.rb b/google-cloud-pubsub/samples/acceptance/topics_test.rb index 747b0d26a669..c46be2bbf773 100644 --- a/google-cloud-pubsub/samples/acceptance/topics_test.rb +++ b/google-cloud-pubsub/samples/acceptance/topics_test.rb @@ -58,10 +58,10 @@ end after do - @topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) - assert @topic - assert_equal "projects/#{pubsub.project}/topics/#{topic_id}", @topic.name - topic_admin.delete_topic topic: @topic.name + topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) + assert topic + assert_equal "projects/#{pubsub.project}/topics/#{topic_id}", topic.name + topic_admin.delete_topic topic: topic.name end it "supports pubsub_create_topic_with_cloud_storage_ingestion" do @@ -153,11 +153,11 @@ assert_output "Cloud storage subscription #{subscription_id} created.\n" do create_cloud_storage_subscription topic_id: topic_id, subscription_id: subscription_id, bucket: bucket_id end - @subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) - assert @subscription - assert_equal "projects/#{pubsub.project}/subscriptions/#{subscription_id}", @subscription.name - assert_equal bucket_id, @subscription.cloud_storage_config.bucket - subscription_admin.delete_subscription subscription: @subscription.name + subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) + assert subscription + assert_equal "projects/#{pubsub.project}/subscriptions/#{subscription_id}", subscription.name + assert_equal bucket_id, subscription.cloud_storage_config.bucket + subscription_admin.delete_subscription subscription: subscription.name end end From 012e660ac50a5e3ab0aed7340383fb606292beff Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Wed, 23 Jul 2025 19:11:36 -0700 Subject: [PATCH 347/457] chore(pubsub): Increase samples method length to 30 --- google-cloud-pubsub/samples/.rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-pubsub/samples/.rubocop.yml b/google-cloud-pubsub/samples/.rubocop.yml index f085a757a60c..28a7e55ed1dc 100644 --- a/google-cloud-pubsub/samples/.rubocop.yml +++ b/google-cloud-pubsub/samples/.rubocop.yml @@ -12,4 +12,4 @@ Lint/RescueException: Lint/UselessAssignment: Enabled: false Metrics/MethodLength: - Max: 26 + Max: 30 From 7b9070413a5100024ab2531dcfce694b8b2b3755 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Wed, 23 Jul 2025 19:12:08 -0700 Subject: [PATCH 348/457] chore(pubsub): white space changes and column restriction to 80 --- .../samples/pubsub_commit_avro_schema.rb | 4 +-- .../samples/pubsub_create_proto_schema.rb | 3 +- ...sub_create_topic_with_aws_msk_ingestion.rb | 10 ++++-- ...e_topic_with_azure_event_hubs_ingestion.rb | 10 ++++-- ...eate_topic_with_cloud_storage_ingestion.rb | 31 +++++++++++-------- ...te_topic_with_confluent_cloud_ingestion.rb | 9 ++++-- ...sub_create_topic_with_kinesis_ingestion.rb | 10 ++++-- ...bsub_create_unwrapped_push_subscription.rb | 18 +++++------ .../samples/pubsub_delete_schema_revision.rb | 4 +-- .../samples/pubsub_get_schema_revision.rb | 4 +-- .../samples/pubsub_optimistic_subscribe.rb | 6 ++-- ...pubsub_subscriber_exactly_once_delivery.rb | 5 +-- .../samples/pubsub_update_topic_type.rb | 26 +++++++++------- 13 files changed, 83 insertions(+), 57 deletions(-) diff --git a/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb b/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb index eaeb5e640a31..167c01c698cd 100644 --- a/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb @@ -20,19 +20,17 @@ def commit_avro_schema schema_id:, avsc_file: # avsc_file = "path/to/a/avsc_file.avsc" pubsub = Google::Cloud::Pubsub.new - schemas = pubsub.schemas schema = schemas.get_schema name: pubsub.schema_path(schema_id) definition = File.read avsc_file - schema.definition = definition result = schemas.commit_schema name: schema.name, schema: schema puts "Schema commited with revision #{result.revision_id}." - result # [END pubsub_commit_avro_schema] + result end diff --git a/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb b/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb index 2b86b441ea86..4fd1a055953b 100644 --- a/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb @@ -20,14 +20,13 @@ def create_proto_schema schema_id:, proto_file: # proto_file = "path/to/a/proto/file/(.proto)/formatted/in/protocol/buffers" pubsub = Google::Cloud::PubSub.new + schemas = pubsub.schemas definition = File.read proto_file schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, type: :PROTOCOL_BUFFER, definition: definition - schemas = pubsub.schemas - schema = schemas.create_schema parent: pubsub.project_path, schema: schema, schema_id: schema_id diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb index 745f8f2fbb19..a1d37e0b9598 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb @@ -14,15 +14,19 @@ require "google/cloud/pubsub" -def create_topic_with_aws_msk_ingestion topic_id:, cluster_arn:, msk_topic:, aws_role_arn:, gcp_service_account: +def create_topic_with_aws_msk_ingestion topic_id:, + cluster_arn:, + msk_topic:, + aws_role_arn:, + gcp_service_account: # [START pubsub_create_topic_with_aws_msk_ingestion] # topic_id = "your-topic-id" - # cluster_arn = "arn:aws:kafka:us-east-1:111111111111:cluster/cluster-name/11111111-1111-1" + # cluster_arn = "arn:aws:kafka:us-east-1:111111111111:" \ + # "cluster/cluster-name/11111111-1111-1" # msk_topic = "msk-topic-name" # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" pubsub = Google::Cloud::Pubsub.new - topic_admin = pubsub.topic_admin topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb index 15c28737cc57..9cb94c43f881 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb @@ -14,8 +14,14 @@ require "google/cloud/pubsub" -def create_topic_with_azure_event_hubs_ingestion topic_id:, resource_group:, namespace:, event_hub:, client_id:, - tenant_id:, subscription_id:, gcp_service_account: +def create_topic_with_azure_event_hubs_ingestion topic_id:, + resource_group:, + namespace:, + event_hub:, + client_id:, + tenant_id:, + subscription_id:, + gcp_service_account: # [START pubsub_create_topic_with_azure_event_hubs_ingestion] # topic_id = "your-topic-id" # resource_group = "resource-group" diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb index 1aaaf2d40256..35f4a61bed02 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb @@ -14,7 +14,11 @@ require "google/cloud/pubsub" -def create_topic_with_cloud_storage_ingestion topic_id:, bucket:, input_format:, text_delimiter:, match_glob:, +def create_topic_with_cloud_storage_ingestion topic_id:, + bucket:, + input_format:, + text_delimiter:, + match_glob:, minimum_object_create_time: # [START pubsub_create_topic_with_cloud_storage_ingestion] # topic_id = "your-topic-id" @@ -24,33 +28,34 @@ def create_topic_with_cloud_storage_ingestion topic_id:, bucket:, input_format:, # match_glob = "**.txt" # minimum_object_create_time = Google::Protobuf::Timestamp.new pubsub = Google::Cloud::Pubsub.new - topic_admin = pubsub.topic_admin - cloud_storage = - Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage.new bucket: bucket, - minimum_object_create_time: - minimum_object_create_time + Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage + + settings = cloud_storage.new \ + bucket: bucket, + minimum_object_create_time: minimum_object_create_time case input_format when "text" - cloud_storage.text_format = - Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage::TextFormat.new delimiter: text_delimiter + settings.text_format = cloud_storage::TextFormat.new \ + delimiter: text_delimiter when "avro" - cloud_storage.avro_format = Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage::AvroFormat.new + settings.avro_format = cloud_storage::AvroFormat.new when "pubsub_avro" - cloud_storage.pubsub_avro_format = Google::Cloud::PubSub::V1::IngestionDataSourceSettings::CloudStorage::PubSubAvroFormat.new + settings.pubsub_avro_format = cloud_storage::PubSubAvroFormat.new else - raise "input_format must be in ('text', 'avro', 'pubsub_avro'); got value: #{input_format}" + raise "input_format must be in ('text', 'avro', 'pubsub_avro');" \ + "got value: #{input_format}" end if !match_glob.nil? && !match_glob.empty? - cloud_storage.match_glob = match_glob + settings.match_glob = match_glob end topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), ingestion_data_source_settings: { - cloud_storage: cloud_storage + cloud_storage: settings } puts "Topic with Cloud Storage Ingestion #{topic.name} created." diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb index 0ac79d0c47f7..a1cf37e09104 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb @@ -14,8 +14,12 @@ require "google/cloud/pubsub" -def create_topic_with_confluent_cloud_ingestion topic_id:, bootstrap_server:, cluster_id:, confluent_topic:, - identity_pool_id:, gcp_service_account: +def create_topic_with_confluent_cloud_ingestion topic_id:, + bootstrap_server:, + cluster_id:, + confluent_topic:, + identity_pool_id:, + gcp_service_account: # [START pubsub_create_topic_with_confluent_cloud_ingestion] # topic_id = "your-topic-id" # bootstrap_server = "bootstrap-server-id.us-south1.gcp.confluent.cloud:9092" @@ -24,7 +28,6 @@ def create_topic_with_confluent_cloud_ingestion topic_id:, bootstrap_server:, cl # identity_pool_id = "identity-pool-id" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" pubsub = Google::Cloud::Pubsub.new - topic_admin = pubsub.topic_admin topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb index 072e257bf1de..94c66c620470 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb @@ -14,15 +14,19 @@ require "google/cloud/pubsub" -def create_topic_with_kinesis_ingestion topic_id:, stream_arn:, consumer_arn:, aws_role_arn:, gcp_service_account: +def create_topic_with_kinesis_ingestion topic_id:, + stream_arn:, + consumer_arn:, + aws_role_arn:, + gcp_service_account: # [START pubsub_create_topic_with_kinesis_ingestion] # topic_id = "your-topic-id" # stream_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name" - # consumer_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name/consumer/consumer-1:1111111111" + # consumer_arn = "arn:aws:kinesis:us-west-2:111111111111:" \ + # "stream/stream-name/consumer/consumer-1:1111111111" # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" pubsub = Google::Cloud::Pubsub.new - topic_admin = pubsub.topic_admin topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), diff --git a/google-cloud-pubsub/samples/pubsub_create_unwrapped_push_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_unwrapped_push_subscription.rb index 16272329995a..75a29141ef07 100644 --- a/google-cloud-pubsub/samples/pubsub_create_unwrapped_push_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_create_unwrapped_push_subscription.rb @@ -21,17 +21,17 @@ def create_unwrapped_push_subscription topic_id:, subscription_id:, endpoint: # endpoint = "https://your-test-project.appspot.com/push" pubsub = Google::Cloud::Pubsub.new - subscription_admin = pubsub.subscription_admin - subscription = subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), - topic: pubsub.topic_path(topic_id), - push_config: { - push_endpoint: endpoint, - no_wrapper: { - write_metadata: true - } - } + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + push_config: { + push_endpoint: endpoint, + no_wrapper: { + write_metadata: true + } + } puts "Unwrapped push subscription #{subscription_id} created." # [END pubsub_create_unwrapped_push_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_delete_schema_revision.rb b/google-cloud-pubsub/samples/pubsub_delete_schema_revision.rb index 7277d2a1a244..1a6b567861fb 100644 --- a/google-cloud-pubsub/samples/pubsub_delete_schema_revision.rb +++ b/google-cloud-pubsub/samples/pubsub_delete_schema_revision.rb @@ -20,10 +20,10 @@ def delete_schema_revision schema_id:, revision_id: # revision_id = "your-revision-id" pubsub = Google::Cloud::Pubsub.new - schemas = pubsub.schemas - result = schemas.delete_schema_revision name: pubsub.schema_path("#{schema_id}@#{revision_id}") + result = schemas.delete_schema_revision \ + name: pubsub.schema_path("#{schema_id}@#{revision_id}") puts "Schema #{schema_id}@#{revision_id} deleted." # [END pubsub_delete_schema_revision] diff --git a/google-cloud-pubsub/samples/pubsub_get_schema_revision.rb b/google-cloud-pubsub/samples/pubsub_get_schema_revision.rb index 2f60b16297a4..41f0acbbe8c4 100644 --- a/google-cloud-pubsub/samples/pubsub_get_schema_revision.rb +++ b/google-cloud-pubsub/samples/pubsub_get_schema_revision.rb @@ -20,10 +20,10 @@ def get_schema_revision schema_id:, revision_id: # revision_id = "your-revision-id" pubsub = Google::Cloud::Pubsub.new - schemas = pubsub.schemas - schema = schemas.get_schema name: pubsub.schema_path("#{schema_id}@#{revision_id}") + schema = schemas.get_schema \ + name: pubsub.schema_path("#{schema_id}@#{revision_id}") puts "Schema #{schema.name} retrieved." # [END pubsub_get_schema_revision] diff --git a/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb b/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb index 1cb2339a34a7..aa96d4020b03 100644 --- a/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb +++ b/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb @@ -39,10 +39,12 @@ def optimistic_subscribe topic_id:, subscription_id: listener.stop.wait! rescue Google::Cloud::NotFoundError => e puts "Subscription #{subscription_id} does not exist." + subscription_admin = pubsub.subscription_admin + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id) - subscription = subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), - topic: pubsub.topic_path(topic_id) puts "Subscription #{subscription_id} created." end # [END pubsub_optimistic_subscribe] diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb b/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb index 818f2eb1accc..689af1038655 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb @@ -18,11 +18,12 @@ def subscriber_exactly_once_delivery project_id:, subscription_id: # [START pubsub_subscriber_exactly_once] # project_id = "your-project-id" # subscription_id = "your-subscription-id" - pubsub = Google::Cloud::Pubsub.new project_id: project_id, endpoint: "us-west1-pubsub.googleapis.com:443" + pubsub = Google::Cloud::Pubsub.new \ + project_id: project_id, + endpoint: "us-west1-pubsub.googleapis.com:443" subscriber = pubsub.subscriber subscription_id listener = subscriber.listen do |received_message| puts "Received message: #{received_message.data}" - # Pass in callback to access the acknowledge result. # For subscription with Exactly once delivery disabled the result will be success always. received_message.acknowledge! do |result| diff --git a/google-cloud-pubsub/samples/pubsub_update_topic_type.rb b/google-cloud-pubsub/samples/pubsub_update_topic_type.rb index 5338c540f562..24f91fff6c5b 100644 --- a/google-cloud-pubsub/samples/pubsub_update_topic_type.rb +++ b/google-cloud-pubsub/samples/pubsub_update_topic_type.rb @@ -14,26 +14,30 @@ require "google/cloud/pubsub" -def update_topic_type topic_id:, stream_arn:, consumer_arn:, aws_role_arn:, gcp_service_account: +def update_topic_type topic_id:, + stream_arn:, + consumer_arn:, + aws_role_arn:, + gcp_service_account: # [START pubsub_update_topic_type] # topic_id = "your-topic-id" # stream_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name" - # consumer_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name/consumer/consumer-1:1111111111" + # consumer_arn = "arn:aws:kinesis:us-west-2:111111111111:" \ + # "stream/stream-name/consumer/consumer-1:1111111111" # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" pubsub = Google::Cloud::Pubsub.new - topic_admin = pubsub.topic_admin - ingestion_data_source_settings = Google::Cloud::PubSub::V1::IngestionDataSourceSettings.new aws_kinesis: { - stream_arn: stream_arn, - consumer_arn: consumer_arn, - aws_role_arn: aws_role_arn, - gcp_service_account: gcp_service_account - } - + ingestion_data_source_settings = + Google::Cloud::PubSub::V1::IngestionDataSourceSettings.new \ + aws_kinesis: { + stream_arn: stream_arn, + consumer_arn: consumer_arn, + aws_role_arn: aws_role_arn, + gcp_service_account: gcp_service_account + } topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) - topic.ingestion_data_source_settings = ingestion_data_source_settings topic = topic_admin.update_topic topic: topic, From e2723d9161f560b988218f7c146e300410585383 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 25 Jul 2025 12:40:30 -0700 Subject: [PATCH 349/457] fix(pubsub): fix flakiness in pubsub_subscribe_avro_records samples tests --- .../samples/acceptance/schemas_test.rb | 45 +++++-------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/google-cloud-pubsub/samples/acceptance/schemas_test.rb b/google-cloud-pubsub/samples/acceptance/schemas_test.rb index 85b56f23130b..713c6b29f8c2 100644 --- a/google-cloud-pubsub/samples/acceptance/schemas_test.rb +++ b/google-cloud-pubsub/samples/acceptance/schemas_test.rb @@ -109,15 +109,16 @@ let(:avro_schema) { Avro::Schema.parse avsc_definition } let(:record) { { "name" => "Alaska", "post_abbr" => "AK" } } - it "supports pubsub_create_topic_with_schema, pubsub_publish_avro_records with binary encoding" do + before do schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, type: :AVRO, definition: avsc_definition @schema = schemas.create_schema parent: pubsub.project_path, schema: schema, schema_id: schema_id + end - + it "supports pubsub_create_topic_with_schema, pubsub_publish_avro_records with binary encoding" do # pubsub_create_topic_with_schema assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :BINARY @@ -133,13 +134,6 @@ end it "supports pubsub_create_topic_with_schema, pubsub_publish_avro_records with JSON encoding" do - schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, - type: :AVRO, - definition: avsc_definition - @schema = schemas.create_schema parent: pubsub.project_path, - schema: schema, - schema_id: schema_id - # pubsub_create_topic_with_schema assert_output "Topic projects/#{pubsub.project}/topics/#{topic_id} created.\n" do create_topic_with_schema topic_id: topic_id, schema_id: schema_id, message_encoding: :JSON @@ -155,13 +149,6 @@ end it "supports pubsub_subscribe_avro_records with binary encoding" do - schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, - type: :AVRO, - definition: avsc_definition - @schema = schemas.create_schema parent: pubsub.project_path, - schema: schema, - schema_id: schema_id - schema_settings = Google::Cloud::PubSub::V1::SchemaSettings.new schema: pubsub.schema_path(schema_id), encoding: :BINARY @@ -170,30 +157,24 @@ schema_settings: schema_settings @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), - topic: @topic.name + topic: @topic.name, + ack_deadline_seconds: 60 writer = Avro::IO::DatumWriter.new avro_schema buffer = StringIO.new writer.write record, Avro::IO::BinaryEncoder.new(buffer) publisher = pubsub.publisher @topic.name publisher.publish buffer - sleep 5 # pubsub_subscribe_avro_records expect_with_retry "pubsub_subscribe_avro_records" do - assert_output "Received a binary-encoded message:\n{\"name\"=>\"Alaska\", \"post_abbr\"=>\"AK\"}\n" do + assert_output "Received a binary-encoded message:\n{\"name\" => \"Alaska\", \"post_abbr\" => \"AK\"}\n" do subscribe_avro_records subscription_id: @subscription.name, avsc_file: avsc_file end end end it "supports pubsub_subscribe_avro_records with JSON encoding" do - schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, - type: :AVRO, - definition: avsc_definition - @schema = schemas.create_schema parent: pubsub.project_path, - schema: schema, - schema_id: schema_id schema_settings = Google::Cloud::PubSub::V1::SchemaSettings.new schema: pubsub.schema_path(schema_id), encoding: :JSON @@ -202,28 +183,22 @@ schema_settings: schema_settings @subscription = subscription_admin.create_subscription name: pubsub.subscription_path(random_subscription_id), - topic: @topic.name + topic: @topic.name, + ack_deadline_seconds: 60 publisher = pubsub.publisher @topic.name publisher.publish record.to_json - sleep 5 # pubsub_subscribe_avro_records expect_with_retry "pubsub_subscribe_avro_records" do - assert_output "Received a JSON-encoded message:\n{\"name\"=>\"Alaska\", \"post_abbr\"=>\"AK\"}\n" do + assert_output "Received a JSON-encoded message:\n{\"name\" => \"Alaska\", \"post_abbr\" => \"AK\"}\n" do subscribe_avro_records subscription_id: @subscription.name, avsc_file: nil end end end it "supports pubsub_commit_avro_schema & pubsub_commit_list_schema_revisions" do - schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, - type: :AVRO, - definition: avsc_definition - @schema = schemas.create_schema parent: pubsub.project_path, - schema: schema, - schema_id: schema_id - + rev_id = @schema.revision_id schema1 = nil From 0099e9b673abad098da1b180118beab724a6b3e3 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Mon, 4 Aug 2025 16:36:01 -0700 Subject: [PATCH 350/457] fix(pubsub): removing unnecessary line breaks, adding line breaks where appropriate, and keeping all lines within 80 chars --- google-cloud-pubsub/samples/.rubocop.yml | 2 ++ .../samples/acceptance/schemas_test.rb | 10 +++++----- .../samples/pubsub_commit_avro_schema.rb | 6 ++---- .../samples/pubsub_commit_proto_schema.rb | 10 +++------- .../samples/pubsub_create_avro_schema.rb | 5 +---- .../pubsub_create_bigquery_subscription.rb | 5 +++-- ...ubsub_create_cloud_storage_subscription.rb | 12 ++++++------ .../samples/pubsub_create_proto_schema.rb | 8 ++++---- .../pubsub_create_pull_subscription.rb | 6 +++--- .../pubsub_create_push_subscription.rb | 6 +++--- ...subscription_with_exactly_once_delivery.rb | 7 ++++--- .../pubsub_create_subscription_with_filter.rb | 5 +++-- .../samples/pubsub_create_topic.rb | 1 - ...sub_create_topic_with_aws_msk_ingestion.rb | 5 +++-- ...e_topic_with_azure_event_hubs_ingestion.rb | 2 +- ...eate_topic_with_cloud_storage_ingestion.rb | 1 + ...te_topic_with_confluent_cloud_ingestion.rb | 1 + ...sub_create_topic_with_kinesis_ingestion.rb | 5 +++-- .../pubsub_create_topic_with_schema.rb | 1 - .../pubsub_dead_letter_create_subscription.rb | 12 ++++++------ .../pubsub_dead_letter_delivery_attempt.rb | 1 - .../samples/pubsub_dead_letter_remove.rb | 1 - .../pubsub_dead_letter_update_subscription.rb | 11 ++++++----- .../samples/pubsub_delete_schema.rb | 1 - .../samples/pubsub_delete_subscription.rb | 4 ++-- .../samples/pubsub_delete_topic.rb | 1 - .../samples/pubsub_detach_subscription.rb | 6 +++--- .../pubsub_enable_subscription_ordering.rb | 1 - .../samples/pubsub_get_schema.rb | 1 - .../samples/pubsub_get_subscription_policy.rb | 4 ++-- .../samples/pubsub_get_topic_policy.rb | 1 - .../samples/pubsub_list_schema_revisions.rb | 1 - .../samples/pubsub_list_schemas.rb | 1 - .../samples/pubsub_list_subscriptions.rb | 4 ++-- .../pubsub_list_topic_subscriptions.rb | 4 ++-- .../samples/pubsub_list_topics.rb | 1 - .../samples/pubsub_optimistic_subscribe.rb | 5 ++--- google-cloud-pubsub/samples/pubsub_publish.rb | 1 - .../samples/pubsub_publish_avro_records.rb | 8 ++------ .../pubsub_publish_custom_attributes.rb | 1 - .../samples/pubsub_publish_proto_messages.rb | 6 +----- .../pubsub_publish_with_error_handler.rb | 2 -- .../pubsub_publish_with_ordering_keys.rb | 1 - .../pubsub_publisher_batch_settings.rb | 2 +- .../pubsub_publisher_concurrency_control.rb | 2 +- .../samples/pubsub_publisher_flow_control.rb | 5 +++-- .../pubsub_publisher_with_compression.rb | 8 ++++---- .../samples/pubsub_quickstart_publisher.rb | 1 - ...ubsub_resume_publish_with_ordering_keys.rb | 2 +- .../samples/pubsub_set_subscription_policy.rb | 8 +++++--- .../samples/pubsub_set_topic_policy.rb | 8 +++++--- .../samples/pubsub_subscribe_avro_records.rb | 1 - .../pubsub_subscribe_proto_messages.rb | 2 +- .../samples/pubsub_subscriber_async_pull.rb | 1 - ...subscriber_async_pull_custom_attributes.rb | 1 - .../pubsub_subscriber_concurrency_control.rb | 1 - .../pubsub_subscriber_error_listener.rb | 7 ++++--- ...pubsub_subscriber_exactly_once_delivery.rb | 4 +++- .../pubsub_subscriber_flow_settings.rb | 1 - .../samples/pubsub_subscriber_sync_pull.rb | 1 - .../pubsub_subscriber_sync_pull_with_lease.rb | 11 +++++------ .../pubsub_test_subscription_permissions.rb | 13 +++++++------ .../samples/pubsub_test_topic_permissions.rb | 19 +++++++++++-------- .../pubsub_update_push_configuration.rb | 2 -- .../samples/pubsub_update_topic_type.rb | 5 +++-- .../v2samples/pubsub_commit_proto_schema.rb | 2 +- .../pubsub_subscriber_error_listener.rb | 2 +- 67 files changed, 132 insertions(+), 154 deletions(-) diff --git a/google-cloud-pubsub/samples/.rubocop.yml b/google-cloud-pubsub/samples/.rubocop.yml index 28a7e55ed1dc..e8902c3ed0dd 100644 --- a/google-cloud-pubsub/samples/.rubocop.yml +++ b/google-cloud-pubsub/samples/.rubocop.yml @@ -13,3 +13,5 @@ Lint/UselessAssignment: Enabled: false Metrics/MethodLength: Max: 30 +LineLength: + Max: 80 diff --git a/google-cloud-pubsub/samples/acceptance/schemas_test.rb b/google-cloud-pubsub/samples/acceptance/schemas_test.rb index 713c6b29f8c2..e7984ea35365 100644 --- a/google-cloud-pubsub/samples/acceptance/schemas_test.rb +++ b/google-cloud-pubsub/samples/acceptance/schemas_test.rb @@ -95,7 +95,7 @@ out, _err = capture_io do revised_schema = commit_proto_schema schema_id: schema_id, proto_file: revision_file end - assert_includes out, "Schema commited with revision #{revised_schema.revision_id}." + assert_includes out, "Schema committed with revision #{revised_schema.revision_id}." #pubsub_delete_schema_revision assert_output "Schema #{schema_id}@#{revised_schema.revision_id} deleted.\n" do @@ -206,8 +206,8 @@ out, _err = capture_io do schema1 = commit_avro_schema schema_id: schema_id, avsc_file: avsc_file end - refute_equal out, "Schema commited with revision #{rev_id}." - assert_includes out, "Schema commited with revision" + refute_equal out, "Schema committed with revision #{rev_id}." + assert_includes out, "Schema committed with revision" # pubsub_list_schema_revisions out, _err = capture_io do @@ -344,8 +344,8 @@ out, _err = capture_io do schema1 = commit_proto_schema schema_id: schema_id, proto_file: revision_file end - refute_equal out, "Schema commited with revision #{rev_id}." - assert_includes out, "Schema commited with revision" + refute_equal out, "Schema committed with revision #{rev_id}." + assert_includes out, "Schema committed with revision" # pubsub_list_schema_revisions schema2 = nil diff --git a/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb b/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb index 167c01c698cd..3783e932f1c3 100644 --- a/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_commit_avro_schema.rb @@ -23,14 +23,12 @@ def commit_avro_schema schema_id:, avsc_file: schemas = pubsub.schemas schema = schemas.get_schema name: pubsub.schema_path(schema_id) - - definition = File.read avsc_file - schema.definition = definition + schema.definition = File.read avsc_file result = schemas.commit_schema name: schema.name, schema: schema - puts "Schema commited with revision #{result.revision_id}." + puts "Schema committed with revision #{result.revision_id}." # [END pubsub_commit_avro_schema] result end diff --git a/google-cloud-pubsub/samples/pubsub_commit_proto_schema.rb b/google-cloud-pubsub/samples/pubsub_commit_proto_schema.rb index 6efcf07ecae7..797a8cd9be8e 100644 --- a/google-cloud-pubsub/samples/pubsub_commit_proto_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_commit_proto_schema.rb @@ -20,19 +20,15 @@ def commit_proto_schema schema_id:, proto_file: # proto_file = "path/to/a/proto_file.proto" pubsub = Google::Cloud::PubSub.new - schemas = pubsub.schemas schema = schemas.get_schema name: pubsub.schema_path(schema_id) - - definition = File.read proto_file - - schema.definition = definition + schema.definition = File.read proto_file result = schemas.commit_schema name: schema.name, schema: schema - puts "Schema commited with revision #{result.revision_id}." - result + puts "Schema committed with revision #{result.revision_id}." # [END pubsub_commit_proto_schema] + result end diff --git a/google-cloud-pubsub/samples/pubsub_create_avro_schema.rb b/google-cloud-pubsub/samples/pubsub_create_avro_schema.rb index bfa398c4ea50..460a6c5d9650 100644 --- a/google-cloud-pubsub/samples/pubsub_create_avro_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_create_avro_schema.rb @@ -20,16 +20,13 @@ def create_avro_schema schema_id:, avsc_file: # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" pubsub = Google::Cloud::PubSub.new - - definition = File.read avsc_file - schemas = pubsub.schemas schema = schemas.create_schema parent: pubsub.project_path, schema: { name: schema_id, type: :AVRO, - definition: definition + definition: File.read(avsc_file) }, schema_id: schema_id diff --git a/google-cloud-pubsub/samples/pubsub_create_bigquery_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_bigquery_subscription.rb index a4e042de5bb6..1b7c851ce856 100644 --- a/google-cloud-pubsub/samples/pubsub_create_bigquery_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_create_bigquery_subscription.rb @@ -18,14 +18,15 @@ # Shows how to create a BigQuery subscription where messages published # to a topic populates a BigQuery table. # -def pubsub_create_bigquery_subscription project_id:, topic_id:, subscription_id:, bigquery_table_id: +def pubsub_create_bigquery_subscription project_id:, topic_id:, + subscription_id:, bigquery_table_id: # [START pubsub_create_bigquery_subscription] # project_id = "your-project-id" # topic_id = "your-topic-id" # subscription_id = "your-subscription-id" # bigquery_table_id = "my-project:dataset-id.table-id" - pubsub = Google::Cloud::PubSub.new project_id: project_id + pubsub = Google::Cloud::PubSub.new project_id: project_id subscription_admin = pubsub.subscription_admin subscription = subscription_admin.create_subscription \ diff --git a/google-cloud-pubsub/samples/pubsub_create_cloud_storage_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_cloud_storage_subscription.rb index 930cb2173cbc..45ab2e81ba8e 100644 --- a/google-cloud-pubsub/samples/pubsub_create_cloud_storage_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_create_cloud_storage_subscription.rb @@ -21,14 +21,14 @@ def create_cloud_storage_subscription topic_id:, subscription_id:, bucket: # bucket = "your-bucket" pubsub = Google::Cloud::Pubsub.new - subscription_admin = pubsub.subscription_admin - subscription = subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), - topic: pubsub.topic_path(topic_id), - cloud_storage_config: { - bucket: bucket - } + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id), + cloud_storage_config: { + bucket: bucket + } puts "Cloud storage subscription #{subscription_id} created." # [END pubsub_create_cloud_storage_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb b/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb index 4fd1a055953b..882be56d32e3 100644 --- a/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_create_proto_schema.rb @@ -22,10 +22,10 @@ def create_proto_schema schema_id:, proto_file: pubsub = Google::Cloud::PubSub.new schemas = pubsub.schemas - definition = File.read proto_file - schema = Google::Cloud::PubSub::V1::Schema.new name: schema_id, - type: :PROTOCOL_BUFFER, - definition: definition + schema = Google::Cloud::PubSub::V1::Schema.new \ + name: schema_id, + type: :PROTOCOL_BUFFER, + definition: File.read(proto_file) schema = schemas.create_schema parent: pubsub.project_path, schema: schema, diff --git a/google-cloud-pubsub/samples/pubsub_create_pull_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_pull_subscription.rb index 0f832df1594c..e55a8f0b952c 100644 --- a/google-cloud-pubsub/samples/pubsub_create_pull_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_create_pull_subscription.rb @@ -20,11 +20,11 @@ def create_pull_subscription topic_id:, subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - subscription = subscription_admin.create_subscription name: pubsub.subscription_path(subscription_id), - topic: pubsub.topic_path(topic_id) + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path(topic_id) puts "Pull subscription #{subscription_id} created." # [END pubsub_create_pull_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_create_push_subscription.rb b/google-cloud-pubsub/samples/pubsub_create_push_subscription.rb index 2b170c6dff1a..cb73cf4adcd4 100644 --- a/google-cloud-pubsub/samples/pubsub_create_push_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_create_push_subscription.rb @@ -21,14 +21,14 @@ def create_push_subscription topic_id:, subscription_id:, endpoint: # endpoint = "https://your-test-project.appspot.com/push" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - push_config = Google::Cloud::PubSub::V1::PushConfig.new push_endpoint: endpoint subscription = subscription_admin.create_subscription \ name: pubsub.subscription_path(subscription_id), topic: pubsub.topic_path(topic_id), - push_config: push_config + push_config: { + push_endpoint: endpoint + } puts "Push subscription #{subscription_id} created." # [END pubsub_create_push_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_create_subscription_with_exactly_once_delivery.rb b/google-cloud-pubsub/samples/pubsub_create_subscription_with_exactly_once_delivery.rb index 72b112a1f569..85717166486a 100644 --- a/google-cloud-pubsub/samples/pubsub_create_subscription_with_exactly_once_delivery.rb +++ b/google-cloud-pubsub/samples/pubsub_create_subscription_with_exactly_once_delivery.rb @@ -15,14 +15,14 @@ require "google/cloud/pubsub" # Shows how to create a new subscription with exactly once delivery enabled -def create_subscription_with_exactly_once_delivery project_id:, topic_id:, subscription_id: +def create_subscription_with_exactly_once_delivery project_id:, topic_id:, + subscription_id: # [START pubsub_create_subscription_with_exactly_once_delivery] # project_id = "your-project-id" # topic_id = "your-topic-id" # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new project_id: project_id - subscription_admin = pubsub.subscription_admin subscription = subscription_admin.create_subscription \ @@ -30,6 +30,7 @@ def create_subscription_with_exactly_once_delivery project_id:, topic_id:, subsc topic: pubsub.topic_path(topic_id), enable_exactly_once_delivery: true - puts "Created subscription with exactly once delivery enabled: #{subscription_id}" + puts "Created subscription with exactly once delivery enabled: " \ + "#{subscription_id}" # [END pubsub_create_subscription_with_exactly_once_delivery] end diff --git a/google-cloud-pubsub/samples/pubsub_create_subscription_with_filter.rb b/google-cloud-pubsub/samples/pubsub_create_subscription_with_filter.rb index ef82ee01521c..d43175003aeb 100644 --- a/google-cloud-pubsub/samples/pubsub_create_subscription_with_filter.rb +++ b/google-cloud-pubsub/samples/pubsub_create_subscription_with_filter.rb @@ -15,7 +15,8 @@ require "google/cloud/pubsub" # Shows how to create a new subscription with filter for a given topic -def create_subscription_with_filter project_id:, topic_id:, subscription_id:, filter: +def create_subscription_with_filter project_id:, topic_id:, subscription_id:, + filter: # [START pubsub_create_subscription_with_filter] # project_id = "your-project-id" # topic_id = "your-topic-id" @@ -23,13 +24,13 @@ def create_subscription_with_filter project_id:, topic_id:, subscription_id:, fi # filter = "attributes.author=\"unknown\"" pubsub = Google::Cloud::PubSub.new project_id: project_id - subscription_admin = pubsub.subscription_admin subscription = subscription_admin.create_subscription \ name: pubsub.subscription_path(subscription_id), topic: pubsub.topic_path(topic_id), filter: filter + puts "Created subscription with filtering enabled: #{subscription_id}" # [END pubsub_create_subscription_with_filter] end diff --git a/google-cloud-pubsub/samples/pubsub_create_topic.rb b/google-cloud-pubsub/samples/pubsub_create_topic.rb index 1fe99401d4b3..5c683d7f43d8 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic.rb @@ -19,7 +19,6 @@ def create_topic topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin topic = topic_admin.create_topic name: pubsub.topic_path(topic_id) diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb index a1d37e0b9598..caa6dc87423e 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_aws_msk_ingestion.rb @@ -21,11 +21,12 @@ def create_topic_with_aws_msk_ingestion topic_id:, gcp_service_account: # [START pubsub_create_topic_with_aws_msk_ingestion] # topic_id = "your-topic-id" - # cluster_arn = "arn:aws:kafka:us-east-1:111111111111:" \ - # "cluster/cluster-name/11111111-1111-1" + # cluster_arn = + # "arn:aws:kafka:us-east-1:111111111111:cluster/cluster-name/11111111-1111-1" # msk_topic = "msk-topic-name" # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new topic_admin = pubsub.topic_admin diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb index 9cb94c43f881..af16739598a6 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_azure_event_hubs_ingestion.rb @@ -31,8 +31,8 @@ def create_topic_with_azure_event_hubs_ingestion topic_id:, # tenant_id = "22222222-2222-2222-2222-222222222222" # subscription_id = "33333333-3333-3333-3333-333333333333" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" - pubsub = Google::Cloud::Pubsub.new + pubsub = Google::Cloud::Pubsub.new topic_admin = pubsub.topic_admin topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb index 35f4a61bed02..810e472c72bc 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_cloud_storage_ingestion.rb @@ -27,6 +27,7 @@ def create_topic_with_cloud_storage_ingestion topic_id:, # text_delimiter = "\n" # match_glob = "**.txt" # minimum_object_create_time = Google::Protobuf::Timestamp.new + pubsub = Google::Cloud::Pubsub.new topic_admin = pubsub.topic_admin cloud_storage = diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb index a1cf37e09104..5a68db82b0cd 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_confluent_cloud_ingestion.rb @@ -27,6 +27,7 @@ def create_topic_with_confluent_cloud_ingestion topic_id:, # confluent_topic = "confluent-topic-name" # identity_pool_id = "identity-pool-id" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new topic_admin = pubsub.topic_admin diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb index 94c66c620470..74d6bc787741 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_kinesis_ingestion.rb @@ -22,10 +22,11 @@ def create_topic_with_kinesis_ingestion topic_id:, # [START pubsub_create_topic_with_kinesis_ingestion] # topic_id = "your-topic-id" # stream_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name" - # consumer_arn = "arn:aws:kinesis:us-west-2:111111111111:" \ - # "stream/stream-name/consumer/consumer-1:1111111111" + # consumer_arn = + # "arn:aws:kinesis:us-west-2:111111111111:stream/x/consumer/y:1111111111" # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new topic_admin = pubsub.topic_admin diff --git a/google-cloud-pubsub/samples/pubsub_create_topic_with_schema.rb b/google-cloud-pubsub/samples/pubsub_create_topic_with_schema.rb index c6a590d559c9..f5cb2b8fbc38 100644 --- a/google-cloud-pubsub/samples/pubsub_create_topic_with_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_create_topic_with_schema.rb @@ -22,7 +22,6 @@ def create_topic_with_schema topic_id:, schema_id:, message_encoding: # message_encoding = :BINARY pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin topic = topic_admin.create_topic name: pubsub.topic_path(topic_id), diff --git a/google-cloud-pubsub/samples/pubsub_dead_letter_create_subscription.rb b/google-cloud-pubsub/samples/pubsub_dead_letter_create_subscription.rb index e29e78c4704a..bb15ce7e979d 100644 --- a/google-cloud-pubsub/samples/pubsub_dead_letter_create_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_dead_letter_create_subscription.rb @@ -14,18 +14,16 @@ require "google/cloud/pubsub" -def dead_letter_create_subscription topic_id:, subscription_id:, dead_letter_topic_id: +def dead_letter_create_subscription topic_id:, subscription_id:, + dead_letter_topic_id: # [START pubsub_dead_letter_create_subscription] # topic_id = "your-topic-id" # subscription_id = "your-subscription-id" # dead_letter_topic_id = "your-dead-letter-topic-id" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - dl_topic_path = pubsub.topic_path dead_letter_topic_id - subscription = subscription_admin.create_subscription \ name: pubsub.subscription_path(subscription_id), topic: pubsub.topic_path(topic_id), @@ -34,7 +32,9 @@ def dead_letter_create_subscription topic_id:, subscription_id:, dead_letter_top max_delivery_attempts: 10 } - puts "Created subscription #{subscription_id} with dead letter topic #{dead_letter_topic_id}." - puts "To process dead letter messages, remember to add a subscription to your dead letter topic." + puts "Created subscription #{subscription_id} with dead letter topic " \ + "#{dead_letter_topic_id}." + puts "To process dead letter messages, remember to add a subscription to " \ + "your dead letter topic." # [END pubsub_dead_letter_create_subscription] end diff --git a/google-cloud-pubsub/samples/pubsub_dead_letter_delivery_attempt.rb b/google-cloud-pubsub/samples/pubsub_dead_letter_delivery_attempt.rb index 0cdd91e8eff7..14d903c1aba6 100644 --- a/google-cloud-pubsub/samples/pubsub_dead_letter_delivery_attempt.rb +++ b/google-cloud-pubsub/samples/pubsub_dead_letter_delivery_attempt.rb @@ -19,7 +19,6 @@ def dead_letter_delivery_attempt subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id subscriber.pull(immediate: false).each do |message| diff --git a/google-cloud-pubsub/samples/pubsub_dead_letter_remove.rb b/google-cloud-pubsub/samples/pubsub_dead_letter_remove.rb index d9c466e289e6..624bf56675fc 100644 --- a/google-cloud-pubsub/samples/pubsub_dead_letter_remove.rb +++ b/google-cloud-pubsub/samples/pubsub_dead_letter_remove.rb @@ -19,7 +19,6 @@ def dead_letter_remove subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin subscription = subscription_admin.get_subscription \ diff --git a/google-cloud-pubsub/samples/pubsub_dead_letter_update_subscription.rb b/google-cloud-pubsub/samples/pubsub_dead_letter_update_subscription.rb index d9e432cf2913..ce8c173769a5 100644 --- a/google-cloud-pubsub/samples/pubsub_dead_letter_update_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_dead_letter_update_subscription.rb @@ -18,14 +18,14 @@ def dead_letter_update_subscription subscription_id: # [START pubsub_dead_letter_update_subscription] # subscription_id = "your-subscription-id" # role = "roles/pubsub.publisher" - # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" + # service_account_email = + # "serviceAccount:account_name@project_name.iam.gserviceaccount.com" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - subscription = subscription_admin.get_subscription subscription: pubsub.subscription_path(subscription_id) - + subscription = subscription_admin.get_subscription \ + subscription: pubsub.subscription_path(subscription_id) subscription.dead_letter_policy.max_delivery_attempts = 20 subscription_admin.update_subscription subscription: subscription, @@ -33,6 +33,7 @@ def dead_letter_update_subscription subscription_id: paths: ["dead_letter_policy"] } - puts "Max delivery attempts is now #{subscription.dead_letter_policy.max_delivery_attempts}." + puts "Max delivery attempts is now " \ + "#{subscription.dead_letter_policy.max_delivery_attempts}." # [END pubsub_dead_letter_update_subscription] end diff --git a/google-cloud-pubsub/samples/pubsub_delete_schema.rb b/google-cloud-pubsub/samples/pubsub_delete_schema.rb index 9f013d3ba57e..b74c5b9d69bb 100644 --- a/google-cloud-pubsub/samples/pubsub_delete_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_delete_schema.rb @@ -19,7 +19,6 @@ def delete_schema schema_id: # schema_id = "your-schema-id" pubsub = Google::Cloud::PubSub.new - schemas = pubsub.schemas result = schemas.delete_schema name: pubsub.schema_path(schema_id) diff --git a/google-cloud-pubsub/samples/pubsub_delete_subscription.rb b/google-cloud-pubsub/samples/pubsub_delete_subscription.rb index 893d030c3701..421c8ad1d269 100644 --- a/google-cloud-pubsub/samples/pubsub_delete_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_delete_subscription.rb @@ -19,10 +19,10 @@ def delete_subscription subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - subscription_admin.delete_subscription subscription: pubsub.subscription_path(subscription_id) + subscription_admin.delete_subscription \ + subscription: pubsub.subscription_path(subscription_id) puts "Subscription #{subscription_id} deleted." # [END pubsub_delete_subscription] diff --git a/google-cloud-pubsub/samples/pubsub_delete_topic.rb b/google-cloud-pubsub/samples/pubsub_delete_topic.rb index e95a819284a5..ca549adc3711 100644 --- a/google-cloud-pubsub/samples/pubsub_delete_topic.rb +++ b/google-cloud-pubsub/samples/pubsub_delete_topic.rb @@ -19,7 +19,6 @@ def delete_topic topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin topic_admin.delete_topic topic: pubsub.topic_path(topic_id) diff --git a/google-cloud-pubsub/samples/pubsub_detach_subscription.rb b/google-cloud-pubsub/samples/pubsub_detach_subscription.rb index 4d7b7c1d227f..b81ff416a1bd 100644 --- a/google-cloud-pubsub/samples/pubsub_detach_subscription.rb +++ b/google-cloud-pubsub/samples/pubsub_detach_subscription.rb @@ -19,15 +19,15 @@ def detach_subscription subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin subscription_admin = pubsub.subscription_admin subscription_path = pubsub.subscription_path subscription_id topic_admin.detach_subscription subscription: subscription_path - sleep 120 - subscription = subscription_admin.get_subscription subscription: subscription_path + subscription = subscription_admin.get_subscription \ + subscription: subscription_path + if subscription.detached puts "Subscription is detached." else diff --git a/google-cloud-pubsub/samples/pubsub_enable_subscription_ordering.rb b/google-cloud-pubsub/samples/pubsub_enable_subscription_ordering.rb index 86969613c9f9..fef70031ddff 100644 --- a/google-cloud-pubsub/samples/pubsub_enable_subscription_ordering.rb +++ b/google-cloud-pubsub/samples/pubsub_enable_subscription_ordering.rb @@ -20,7 +20,6 @@ def enable_subscription_ordering topic_id:, subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin subscription = subscription_admin.create_subscription \ diff --git a/google-cloud-pubsub/samples/pubsub_get_schema.rb b/google-cloud-pubsub/samples/pubsub_get_schema.rb index 06702ca9f960..ea79cb670636 100644 --- a/google-cloud-pubsub/samples/pubsub_get_schema.rb +++ b/google-cloud-pubsub/samples/pubsub_get_schema.rb @@ -19,7 +19,6 @@ def get_schema schema_id: # schema_id = "your-schema-id" pubsub = Google::Cloud::PubSub.new - schemas = pubsub.schemas schema = schemas.get_schema name: pubsub.schema_path(schema_id) diff --git a/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb b/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb index c3cd3bdc42f6..59f103714a1b 100644 --- a/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb @@ -19,10 +19,10 @@ def get_subscription_policy subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - policy = pubsub.iam.get_iam_policy resource: pubsub.subscription_path(subscription_id) + policy = pubsub.iam.get_iam_policy \ + resource: pubsub.subscription_path(subscription_id) puts "Subscription policy:" puts policy.bindings.first.role diff --git a/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb b/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb index 81bf3834d7a3..bbd6e982bf84 100644 --- a/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb @@ -19,7 +19,6 @@ def get_topic_policy topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin policy = pubsub.iam.get_iam_policy resource: pubsub.topic_path(topic_id) diff --git a/google-cloud-pubsub/samples/pubsub_list_schema_revisions.rb b/google-cloud-pubsub/samples/pubsub_list_schema_revisions.rb index 35692b3081a3..75cae0d9459c 100644 --- a/google-cloud-pubsub/samples/pubsub_list_schema_revisions.rb +++ b/google-cloud-pubsub/samples/pubsub_list_schema_revisions.rb @@ -19,7 +19,6 @@ def list_schema_revisions schema_id: # schema_id = "your-schema-id" pubsub = Google::Cloud::PubSub.new - schemas = pubsub.schemas response = schemas.list_schema_revisions \ diff --git a/google-cloud-pubsub/samples/pubsub_list_schemas.rb b/google-cloud-pubsub/samples/pubsub_list_schemas.rb index 65709cbb6c8a..5e1238f72cd9 100644 --- a/google-cloud-pubsub/samples/pubsub_list_schemas.rb +++ b/google-cloud-pubsub/samples/pubsub_list_schemas.rb @@ -18,7 +18,6 @@ def list_schemas # [START pubsub_list_schemas] pubsub = Google::Cloud::PubSub.new - schema_service = pubsub.schemas schemas = schema_service.list_schemas \ diff --git a/google-cloud-pubsub/samples/pubsub_list_subscriptions.rb b/google-cloud-pubsub/samples/pubsub_list_subscriptions.rb index 8ba67134cbb4..42f7e29b931d 100644 --- a/google-cloud-pubsub/samples/pubsub_list_subscriptions.rb +++ b/google-cloud-pubsub/samples/pubsub_list_subscriptions.rb @@ -18,10 +18,10 @@ def list_subscriptions # [START pubsub_list_subscriptions] pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - subscriptions = subscription_admin.list_subscriptions project: pubsub.project_path + subscriptions = subscription_admin.list_subscriptions \ + project: pubsub.project_path puts "Subscriptions:" subscriptions.each do |subscription| diff --git a/google-cloud-pubsub/samples/pubsub_list_topic_subscriptions.rb b/google-cloud-pubsub/samples/pubsub_list_topic_subscriptions.rb index 1e463d71144d..9a9ddef541eb 100644 --- a/google-cloud-pubsub/samples/pubsub_list_topic_subscriptions.rb +++ b/google-cloud-pubsub/samples/pubsub_list_topic_subscriptions.rb @@ -19,10 +19,10 @@ def list_topic_subscriptions topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin - response = topic_admin.list_topic_subscriptions topic: pubsub.topic_path(topic_id) + response = topic_admin.list_topic_subscriptions \ + topic: pubsub.topic_path(topic_id) puts "Subscriptions in topic #{topic_id}:" response.subscriptions.each do |subscription_name| diff --git a/google-cloud-pubsub/samples/pubsub_list_topics.rb b/google-cloud-pubsub/samples/pubsub_list_topics.rb index 08ba5c4d2af6..b0433a5fb9a2 100644 --- a/google-cloud-pubsub/samples/pubsub_list_topics.rb +++ b/google-cloud-pubsub/samples/pubsub_list_topics.rb @@ -18,7 +18,6 @@ def list_topics # [START pubsub_list_topics] pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin topics = topic_admin.list_topics project: pubsub.project_path diff --git a/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb b/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb index aa96d4020b03..782c2804f379 100644 --- a/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb +++ b/google-cloud-pubsub/samples/pubsub_optimistic_subscribe.rb @@ -21,7 +21,7 @@ def optimistic_subscribe topic_id:, subscription_id: pubsub = Google::Cloud::Pubsub.new - # Propagate expection from child threads to the main thread as soon as it is + # Propagate exception from child threads to the main thread as soon as it is # raised. Exceptions happened in the callback thread are collected in the # callback thread pool and do not propagate to the main thread Thread.abort_on_exception = true @@ -40,8 +40,7 @@ def optimistic_subscribe topic_id:, subscription_id: rescue Google::Cloud::NotFoundError => e puts "Subscription #{subscription_id} does not exist." - subscription_admin = pubsub.subscription_admin - subscription = subscription_admin.create_subscription \ + subscription = pubsub.subscription_admin.create_subscription \ name: pubsub.subscription_path(subscription_id), topic: pubsub.topic_path(topic_id) diff --git a/google-cloud-pubsub/samples/pubsub_publish.rb b/google-cloud-pubsub/samples/pubsub_publish.rb index b8fe1270cada..32c8b46d3d68 100644 --- a/google-cloud-pubsub/samples/pubsub_publish.rb +++ b/google-cloud-pubsub/samples/pubsub_publish.rb @@ -19,7 +19,6 @@ def publish_message_async topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - publisher = pubsub.publisher topic_id publisher.publish_async "This is a test message." do |result| diff --git a/google-cloud-pubsub/samples/pubsub_publish_avro_records.rb b/google-cloud-pubsub/samples/pubsub_publish_avro_records.rb index 77e34420e616..2f5fffbbf212 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_avro_records.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_avro_records.rb @@ -20,17 +20,13 @@ def publish_avro_records topic_id:, avsc_file: # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin + publisher = pubsub.publisher topic_id + record = { "name" => "Alaska", "post_abbr" => "AK" } topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) - encoding = topic.schema_settings.encoding - publisher = pubsub.publisher topic_id - - record = { "name" => "Alaska", "post_abbr" => "AK" } - case encoding when :BINARY require "avro" diff --git a/google-cloud-pubsub/samples/pubsub_publish_custom_attributes.rb b/google-cloud-pubsub/samples/pubsub_publish_custom_attributes.rb index 80d686243b8d..3456f31a5a0c 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_custom_attributes.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_custom_attributes.rb @@ -19,7 +19,6 @@ def publish_message_async_with_custom_attributes topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - publisher = pubsub.publisher topic_id # Add two attributes, origin and username, to the message diff --git a/google-cloud-pubsub/samples/pubsub_publish_proto_messages.rb b/google-cloud-pubsub/samples/pubsub_publish_proto_messages.rb index 45b379b93773..92e9fe6034bd 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_proto_messages.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_proto_messages.rb @@ -20,17 +20,13 @@ def publish_proto_messages topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin - publisher = pubsub.publisher topic_id + state = Utilities::StateProto.new name: "Alaska", post_abbr: "AK" topic = topic_admin.get_topic topic: pubsub.topic_path(topic_id) - encoding = topic.schema_settings.encoding - state = Utilities::StateProto.new name: "Alaska", post_abbr: "AK" - case encoding when :BINARY publisher.publish Utilities::StateProto.encode(state) diff --git a/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb b/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb index 6bc565e88697..864d2cf8cde3 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_with_error_handler.rb @@ -19,7 +19,6 @@ def publish_with_error_handler topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - publisher = pubsub.publisher topic_id begin @@ -27,7 +26,6 @@ def publish_with_error_handler topic_id: raise "Failed to publish the message." unless result.succeeded? puts "Message published asynchronously." end - # Stop the async_publisher to send all queued messages immediately. publisher.async_publisher.stop.wait! rescue StandardError => e diff --git a/google-cloud-pubsub/samples/pubsub_publish_with_ordering_keys.rb b/google-cloud-pubsub/samples/pubsub_publish_with_ordering_keys.rb index 1d49fecd6968..ff26e5ef9043 100644 --- a/google-cloud-pubsub/samples/pubsub_publish_with_ordering_keys.rb +++ b/google-cloud-pubsub/samples/pubsub_publish_with_ordering_keys.rb @@ -19,7 +19,6 @@ def publish_ordered_messages topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - # Start sending messages in one request once the size of all queued messages # reaches 1 MB or the number of queued messages reaches 20 publisher = pubsub.publisher topic_id, async: { diff --git a/google-cloud-pubsub/samples/pubsub_publisher_batch_settings.rb b/google-cloud-pubsub/samples/pubsub_publisher_batch_settings.rb index c06b962b1f5c..828212f22aa7 100644 --- a/google-cloud-pubsub/samples/pubsub_publisher_batch_settings.rb +++ b/google-cloud-pubsub/samples/pubsub_publisher_batch_settings.rb @@ -19,13 +19,13 @@ def publish_messages_async_with_batch_settings topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - # Start sending messages in one request once the size of all queued messages # reaches 1 MB or the number of queued messages reaches 20 publisher = pubsub.publisher topic_id, async: { max_bytes: 1_000_000, max_messages: 20 } + 10.times do |i| publisher.publish_async "This is message ##{i}." end diff --git a/google-cloud-pubsub/samples/pubsub_publisher_concurrency_control.rb b/google-cloud-pubsub/samples/pubsub_publisher_concurrency_control.rb index 85cd5009a7d7..18103aefb26a 100644 --- a/google-cloud-pubsub/samples/pubsub_publisher_concurrency_control.rb +++ b/google-cloud-pubsub/samples/pubsub_publisher_concurrency_control.rb @@ -19,7 +19,6 @@ def publish_messages_async_with_concurrency_control topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - publisher = pubsub.publisher topic_id, async: { threads: { # Use exactly one thread for publishing message and exactly one thread @@ -28,6 +27,7 @@ def publish_messages_async_with_concurrency_control topic_id: callback: 1 } } + publisher.publish_async "This is a test message." do |result| raise "Failed to publish the message." unless result.succeeded? puts "Message published asynchronously." diff --git a/google-cloud-pubsub/samples/pubsub_publisher_flow_control.rb b/google-cloud-pubsub/samples/pubsub_publisher_flow_control.rb index 2fdb846b06b0..0bff2c370fa5 100644 --- a/google-cloud-pubsub/samples/pubsub_publisher_flow_control.rb +++ b/google-cloud-pubsub/samples/pubsub_publisher_flow_control.rb @@ -19,7 +19,6 @@ def publish_messages_async_with_flow_control topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - publisher = pubsub.publisher topic_id, async: { # Configure how many messages the publisher client can hold in memory # and what to do when messages exceed the limit. @@ -31,7 +30,9 @@ def publish_messages_async_with_flow_control topic_id: limit_exceeded_behavior: :block } } - # Rapidly publishing 1000 messages in a loop may be constrained by flow control. + + # Rapidly publishing 1000 messages in a loop may be constrained by flow + # control. 1000.times do |i| publisher.publish_async "message #{i}" do |result| raise "Failed to publish the message." unless result.succeeded? diff --git a/google-cloud-pubsub/samples/pubsub_publisher_with_compression.rb b/google-cloud-pubsub/samples/pubsub_publisher_with_compression.rb index 11c4ef72e254..5ee1b92324f5 100644 --- a/google-cloud-pubsub/samples/pubsub_publisher_with_compression.rb +++ b/google-cloud-pubsub/samples/pubsub_publisher_with_compression.rb @@ -24,9 +24,10 @@ def pubsub_publisher_with_compression project_id:, topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new project_id: project_id - - # Enable compression and configure the compression threshold to 10 bytes (default to 240 B). - # Publish requests of sizes > 10 B (excluding the request headers) will get compressed. + # Enable compression and configure the compression threshold to 10 bytes + # (default to 240 B). + # Publish requests of sizes > 10 B (excluding the request headers) will get + # compressed. publisher = pubsub.publisher topic_id, async: { compress: true, compression_bytes_threshold: 10 @@ -37,7 +38,6 @@ def pubsub_publisher_with_compression project_id:, topic_id: raise "Failed to publish the message." unless result.succeeded? puts "Published a compressed message of message ID: #{result.message_id}" end - # Stop the async_publisher to send all queued messages immediately. publisher.async_publisher.stop.wait! rescue StandardError => e diff --git a/google-cloud-pubsub/samples/pubsub_quickstart_publisher.rb b/google-cloud-pubsub/samples/pubsub_quickstart_publisher.rb index 236473f7eb61..3ff929f577dd 100644 --- a/google-cloud-pubsub/samples/pubsub_quickstart_publisher.rb +++ b/google-cloud-pubsub/samples/pubsub_quickstart_publisher.rb @@ -19,7 +19,6 @@ def publish_message topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - publisher = pubsub.publisher topic_id publisher.publish "This is a test message." diff --git a/google-cloud-pubsub/samples/pubsub_resume_publish_with_ordering_keys.rb b/google-cloud-pubsub/samples/pubsub_resume_publish_with_ordering_keys.rb index c20debcfc97b..25668596dada 100644 --- a/google-cloud-pubsub/samples/pubsub_resume_publish_with_ordering_keys.rb +++ b/google-cloud-pubsub/samples/pubsub_resume_publish_with_ordering_keys.rb @@ -19,13 +19,13 @@ def publish_resume_publish topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - # Start sending messages in one request once the size of all queued messages # reaches 1 MB or the number of queued messages reaches 20 publisher = pubsub.publisher topic_id, async: { max_bytes: 1_000_000, max_messages: 20 } + publisher.enable_message_ordering! 10.times do |i| publisher.publish_async "This is message ##{i}.", diff --git a/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb b/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb index e935369689c6..5e553e1aba64 100644 --- a/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb @@ -18,13 +18,15 @@ def set_subscription_policy subscription_id:, role:, service_account_email: # [START pubsub_set_subscription_policy] # subscription_id = "your-subscription-id" # role = "roles/pubsub.subscriber" - # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" + # service_account_email = + # "serviceAccount:account_name@project_name.iam.gserviceaccount.com" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - bindings = Google::Iam::V1::Binding.new role: role, members: [service_account_email] + bindings = Google::Iam::V1::Binding.new \ + role: role, + members: [service_account_email] pubsub.iam.set_iam_policy resource: pubsub.subscription_path(subscription_id), policy: { diff --git a/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb b/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb index 3e0648ae7879..cf5a59826b79 100644 --- a/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb @@ -18,13 +18,15 @@ def set_topic_policy topic_id:, role:, service_account_email: # [START pubsub_set_topic_policy] # topic_id = "your-topic-id" # role = "roles/pubsub.publisher" - # service_account_email = "serviceAccount:account_name@project_name.iam.gserviceaccount.com" + # service_account_email = + # "serviceAccount:account_name@project_name.iam.gserviceaccount.com" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin - bindings = Google::Iam::V1::Binding.new role: role, members: [service_account_email] + bindings = Google::Iam::V1::Binding.new \ + role: role, + members: [service_account_email] pubsub.iam.set_iam_policy resource: pubsub.topic_path(topic_id), policy: { diff --git a/google-cloud-pubsub/samples/pubsub_subscribe_avro_records.rb b/google-cloud-pubsub/samples/pubsub_subscribe_avro_records.rb index c13392fa5ccd..1d12fb8b6802 100644 --- a/google-cloud-pubsub/samples/pubsub_subscribe_avro_records.rb +++ b/google-cloud-pubsub/samples/pubsub_subscribe_avro_records.rb @@ -20,7 +20,6 @@ def subscribe_avro_records subscription_id:, avsc_file: # avsc_file = "path/to/an/avro/schema/file/(.avsc)/formatted/in/json" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id listener = subscriber.listen do |received_message| diff --git a/google-cloud-pubsub/samples/pubsub_subscribe_proto_messages.rb b/google-cloud-pubsub/samples/pubsub_subscribe_proto_messages.rb index 70ad55c24f6a..cdc9cfef71d9 100644 --- a/google-cloud-pubsub/samples/pubsub_subscribe_proto_messages.rb +++ b/google-cloud-pubsub/samples/pubsub_subscribe_proto_messages.rb @@ -20,8 +20,8 @@ def subscribe_proto_messages subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id + listener = subscriber.listen do |received_message| encoding = received_message.attributes["googclient_schemaencoding"] case encoding diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_async_pull.rb b/google-cloud-pubsub/samples/pubsub_subscriber_async_pull.rb index ad7d691400ad..07b1af49908f 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_async_pull.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_async_pull.rb @@ -20,7 +20,6 @@ def listen_for_messages subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id listener = subscriber.listen do |received_message| diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_async_pull_custom_attributes.rb b/google-cloud-pubsub/samples/pubsub_subscriber_async_pull_custom_attributes.rb index 6d9a7f6fc73f..d9735f8e6d8d 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_async_pull_custom_attributes.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_async_pull_custom_attributes.rb @@ -19,7 +19,6 @@ def listen_for_messages_with_custom_attributes subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id listener = subscriber.listen do |received_message| diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_concurrency_control.rb b/google-cloud-pubsub/samples/pubsub_subscriber_concurrency_control.rb index dc377a113cf5..aa6e2c5dfe22 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_concurrency_control.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_concurrency_control.rb @@ -19,7 +19,6 @@ def listen_for_messages_with_concurrency_control subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id # Use 2 threads for streaming, 4 threads for executing callbacks and 2 threads diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb b/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb index 352336d041ae..44f61913907b 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_error_listener.rb @@ -19,13 +19,14 @@ def listen_for_messages_with_error_handler subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id - listener = subscriber.listen do |received_message| + + listener = subscriber.listen do |received_message| puts "Received message: #{received_message.data}" received_message.acknowledge! end - # Propagate expection from child threads to the main thread as soon as it is + + # Propagate exception from child threads to the main thread as soon as it is # raised. Exceptions happened in the callback thread are collected in the # callback thread pool and do not propagate to the main thread Thread.abort_on_exception = true diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb b/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb index 689af1038655..b5112226d05b 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_exactly_once_delivery.rb @@ -22,10 +22,12 @@ def subscriber_exactly_once_delivery project_id:, subscription_id: project_id: project_id, endpoint: "us-west1-pubsub.googleapis.com:443" subscriber = pubsub.subscriber subscription_id + listener = subscriber.listen do |received_message| puts "Received message: #{received_message.data}" # Pass in callback to access the acknowledge result. - # For subscription with Exactly once delivery disabled the result will be success always. + # For subscription with Exactly once delivery disabled the result will be + # success always. received_message.acknowledge! do |result| puts "Acknowledge result's status: #{result.status}" end diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_flow_settings.rb b/google-cloud-pubsub/samples/pubsub_subscriber_flow_settings.rb index ea4461e9ce5e..cdc8b923a6f9 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_flow_settings.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_flow_settings.rb @@ -19,7 +19,6 @@ def listen_for_messages_with_flow_control subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id listener = subscriber.listen inventory: 10 do |received_message| diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull.rb b/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull.rb index 7cf94a80462e..8d84b6c07dbb 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull.rb @@ -19,7 +19,6 @@ def pull_messages subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id subscriber.pull(immediate: false).each do |message| diff --git a/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull_with_lease.rb b/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull_with_lease.rb index 558c11ab6f72..43aefa4cfbc2 100644 --- a/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull_with_lease.rb +++ b/google-cloud-pubsub/samples/pubsub_subscriber_sync_pull_with_lease.rb @@ -19,20 +19,18 @@ def subscriber_sync_pull_with_lease subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscriber = pubsub.subscriber subscription_id - new_ack_deadline = 30 processed = false # The subscriber pulls a specified number of messages. received_messages = subscriber.pull immediate: false, max: 1 - # Obtain the first message. message = received_messages.first - # Send the message to a non-blocking worker that starts a long-running process, such as writing - # the message to a table, which may take longer than the default 10-sec acknowledge deadline. + # Send the message to a non-blocking worker that starts a long-running + # process, such as writing the message to a table, which may take longer than + # the default 10-second acknowledge deadline. Thread.new do sleep 15 processed = true @@ -50,7 +48,8 @@ def subscriber_sync_pull_with_lease subscription_id: else # If the message has not yet been processed, reset its ack deadline. message.modify_ack_deadline! new_ack_deadline - puts "Reset ack deadline for \"#{message.data}\" for #{new_ack_deadline} seconds." + puts "Reset ack deadline for \"#{message.data}\" for " \ + "#{new_ack_deadline} seconds." end end # [END pubsub_subscriber_sync_pull_with_lease] diff --git a/google-cloud-pubsub/samples/pubsub_test_subscription_permissions.rb b/google-cloud-pubsub/samples/pubsub_test_subscription_permissions.rb index ce07816a680c..520fcb0c3eee 100644 --- a/google-cloud-pubsub/samples/pubsub_test_subscription_permissions.rb +++ b/google-cloud-pubsub/samples/pubsub_test_subscription_permissions.rb @@ -19,15 +19,16 @@ def test_subscription_permissions subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin - permissions = ["pubsub.subscriptions.consume", "pubsub.subscriptions.update"] - response = pubsub.iam.test_iam_permissions resource: pubsub.subscription_path(subscription_id), - permissions: permissions + response = pubsub.iam.test_iam_permissions \ + resource: pubsub.subscription_path(subscription_id), + permissions: permissions - puts "Permission to consume" if response.permissions.include? "pubsub.subscriptions.consume" - puts "Permission to update" if response.permissions.include? "pubsub.subscriptions.update" + puts "Permission to consume" \ + if response.permissions.include? "pubsub.subscriptions.consume" + puts "Permission to update" \ + if response.permissions.include? "pubsub.subscriptions.update" # [END pubsub_test_subscription_permissions] end diff --git a/google-cloud-pubsub/samples/pubsub_test_topic_permissions.rb b/google-cloud-pubsub/samples/pubsub_test_topic_permissions.rb index b7d204a862f3..a6abf87163a7 100644 --- a/google-cloud-pubsub/samples/pubsub_test_topic_permissions.rb +++ b/google-cloud-pubsub/samples/pubsub_test_topic_permissions.rb @@ -19,16 +19,19 @@ def test_topic_permissions topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin + permissions = ["pubsub.topics.attachSubscription", "pubsub.topics.publish", + "pubsub.topics.update"] - permissions = ["pubsub.topics.attachSubscription", "pubsub.topics.publish", "pubsub.topics.update"] - - response = pubsub.iam.test_iam_permissions resource: pubsub.topic_path(topic_id), - permissions: permissions + response = pubsub.iam.test_iam_permissions \ + resource: pubsub.topic_path(topic_id), + permissions: permissions - puts "Permission to attach subscription" if permissions.include? "pubsub.topics.attachSubscription" - puts "Permission to publish" if response.permissions.include? "pubsub.topics.publish" - puts "Permission to update" if response.permissions.include? "pubsub.topics.update" + puts "Permission to attach subscription" \ + if permissions.include? "pubsub.topics.attachSubscription" + puts "Permission to publish" \ + if response.permissions.include? "pubsub.topics.publish" + puts "Permission to update" \ + if response.permissions.include? "pubsub.topics.update" # [END pubsub_test_topic_permissions] end diff --git a/google-cloud-pubsub/samples/pubsub_update_push_configuration.rb b/google-cloud-pubsub/samples/pubsub_update_push_configuration.rb index 2e2f68674a80..af502954962c 100644 --- a/google-cloud-pubsub/samples/pubsub_update_push_configuration.rb +++ b/google-cloud-pubsub/samples/pubsub_update_push_configuration.rb @@ -20,12 +20,10 @@ def update_push_configuration subscription_id:, new_endpoint: # new_endpoint = "Endpoint where your app receives messages"" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin subscription = subscription_admin.get_subscription \ subscription: pubsub.subscription_path(subscription_id) - subscription.push_config = Google::Cloud::PubSub::V1::PushConfig.new \ push_endpoint: new_endpoint diff --git a/google-cloud-pubsub/samples/pubsub_update_topic_type.rb b/google-cloud-pubsub/samples/pubsub_update_topic_type.rb index 24f91fff6c5b..490290bb60a4 100644 --- a/google-cloud-pubsub/samples/pubsub_update_topic_type.rb +++ b/google-cloud-pubsub/samples/pubsub_update_topic_type.rb @@ -22,10 +22,11 @@ def update_topic_type topic_id:, # [START pubsub_update_topic_type] # topic_id = "your-topic-id" # stream_arn = "arn:aws:kinesis:us-west-2:111111111111:stream/stream-name" - # consumer_arn = "arn:aws:kinesis:us-west-2:111111111111:" \ - # "stream/stream-name/consumer/consumer-1:1111111111" + # consumer_arn = + # "arn:aws:kinesis:us-west-2:111111111111:stream/x/consumer/y:1111111111" # aws_role_arn = "arn:aws:iam::111111111111:role/role-name" # gcp_service_account = "service-account@project.iam.gserviceaccount.com" + pubsub = Google::Cloud::Pubsub.new topic_admin = pubsub.topic_admin diff --git a/google-cloud-pubsub/v2samples/pubsub_commit_proto_schema.rb b/google-cloud-pubsub/v2samples/pubsub_commit_proto_schema.rb index 6472f4edb433..23129c5d1fbb 100644 --- a/google-cloud-pubsub/v2samples/pubsub_commit_proto_schema.rb +++ b/google-cloud-pubsub/v2samples/pubsub_commit_proto_schema.rb @@ -26,7 +26,7 @@ def commit_proto_schema schema_id:, proto_file: result = schema.commit definition, :protocol_buffer - puts "Schema commited with revision #{result.revision_id}." + puts "Schema committed with revision #{result.revision_id}." result # [END pubsub_old_version_commit_proto_schema] end diff --git a/google-cloud-pubsub/v2samples/pubsub_subscriber_error_listener.rb b/google-cloud-pubsub/v2samples/pubsub_subscriber_error_listener.rb index 73356677057b..bc8efeac4f0a 100644 --- a/google-cloud-pubsub/v2samples/pubsub_subscriber_error_listener.rb +++ b/google-cloud-pubsub/v2samples/pubsub_subscriber_error_listener.rb @@ -25,7 +25,7 @@ def listen_for_messages_with_error_handler subscription_id: puts "Received message: #{received_message.data}" received_message.acknowledge! end - # Propagate expection from child threads to the main thread as soon as it is + # Propagate exception from child threads to the main thread as soon as it is # raised. Exceptions happened in the callback thread are collected in the # callback thread pool and do not propagate to the main thread Thread.abort_on_exception = true From a191f78092751fb63f8b9478fb0a0e741f5e2cd1 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 6 Aug 2025 00:42:10 +0200 Subject: [PATCH 351/457] chore(deps): update dependency google-apis-core to v1 (#30757) --- google-cloud-errors/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-errors/Gemfile b/google-cloud-errors/Gemfile index 05f074fa6408..67e558bf5cb8 100644 --- a/google-cloud-errors/Gemfile +++ b/google-cloud-errors/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" gemspec gem "autotest-suffix", "~> 1.1" -gem "google-apis-core", "~> 0.2" +gem "google-apis-core", ">= 0.2", "< 2" gem "google-gax", "~> 1.8" gem "google-style", "~> 1.30.1" gem "minitest", "~> 5.14" From eca51b642baacf1c431cdb9f8fa333d04bdae2d5 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Wed, 6 Aug 2025 11:42:31 -0700 Subject: [PATCH 352/457] tests(storage): Fix some new rubocop failures (#30764) --- .../lib/google/cloud/storage/bucket/acl.rb | 18 +++++++++--------- .../lib/google/cloud/storage/file/acl.rb | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket/acl.rb b/google-cloud-storage/lib/google/cloud/storage/bucket/acl.rb index ff718754122c..22f9e6d3dd92 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket/acl.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket/acl.rb @@ -352,7 +352,7 @@ def self.predefined_rule_for rule_name def auth! if_metageneration_match: nil update_predefined_acl! "authenticatedRead", if_metageneration_match: if_metageneration_match end - alias authenticatedRead! auth! + alias authenticatedRead! auth! # rubocop:disable Naming/MethodName alias auth_read! auth! alias authenticated! auth! alias authenticated_read! auth! @@ -390,7 +390,7 @@ def private! if_metageneration_match: nil def project_private! if_metageneration_match: nil update_predefined_acl! "projectPrivate", if_metageneration_match: if_metageneration_match end - alias projectPrivate! project_private! + alias projectPrivate! project_private! # rubocop:disable Naming/MethodName ## # Convenience method to apply the `publicRead` predefined ACL @@ -408,7 +408,7 @@ def project_private! if_metageneration_match: nil def public! if_metageneration_match: nil update_predefined_acl! "publicRead", if_metageneration_match: if_metageneration_match end - alias publicRead! public! + alias publicRead! public! # rubocop:disable Naming/MethodName alias public_read! public! # Convenience method to apply the `publicReadWrite` predefined ACL @@ -426,7 +426,7 @@ def public! if_metageneration_match: nil def public_write! if_metageneration_match: nil update_predefined_acl! "publicReadWrite", if_metageneration_match: if_metageneration_match end - alias publicReadWrite! public_write! + alias publicReadWrite! public_write! # rubocop:disable Naming/MethodName protected @@ -718,7 +718,7 @@ def self.predefined_rule_for rule_name def auth! if_metageneration_match: nil update_predefined_default_acl! "authenticatedRead", if_metageneration_match: if_metageneration_match end - alias authenticatedRead! auth! + alias authenticatedRead! auth! # rubocop:disable Naming/MethodName alias auth_read! auth! alias authenticated! auth! alias authenticated_read! auth! @@ -739,7 +739,7 @@ def auth! if_metageneration_match: nil def owner_full! if_metageneration_match: nil update_predefined_default_acl! "bucketOwnerFullControl", if_metageneration_match: if_metageneration_match end - alias bucketOwnerFullControl! owner_full! + alias bucketOwnerFullControl! owner_full! # rubocop:disable Naming/MethodName ## # Convenience method to apply the default `bucketOwnerRead` @@ -757,7 +757,7 @@ def owner_full! if_metageneration_match: nil def owner_read! if_metageneration_match: nil update_predefined_default_acl! "bucketOwnerRead", if_metageneration_match: if_metageneration_match end - alias bucketOwnerRead! owner_read! + alias bucketOwnerRead! owner_read! # rubocop:disable Naming/MethodName ## # Convenience method to apply the default `private` @@ -792,7 +792,7 @@ def private! if_metageneration_match: nil def project_private! if_metageneration_match: nil update_predefined_default_acl! "projectPrivate", if_metageneration_match: if_metageneration_match end - alias projectPrivate! project_private! + alias projectPrivate! project_private! # rubocop:disable Naming/MethodName ## # Convenience method to apply the default `publicRead` @@ -810,7 +810,7 @@ def project_private! if_metageneration_match: nil def public! if_metageneration_match: nil update_predefined_default_acl! "publicRead", if_metageneration_match: if_metageneration_match end - alias publicRead! public! + alias publicRead! public! # rubocop:disable Naming/MethodName alias public_read! public! protected diff --git a/google-cloud-storage/lib/google/cloud/storage/file/acl.rb b/google-cloud-storage/lib/google/cloud/storage/file/acl.rb index 250edc49cf6e..6fdd6e0a6654 100644 --- a/google-cloud-storage/lib/google/cloud/storage/file/acl.rb +++ b/google-cloud-storage/lib/google/cloud/storage/file/acl.rb @@ -335,7 +335,7 @@ def auth! generation: nil, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match end - alias authenticatedRead! auth! + alias authenticatedRead! auth! # rubocop:disable Naming/MethodName alias auth_read! auth! alias authenticated! auth! alias authenticated_read! auth! @@ -382,7 +382,7 @@ def owner_full! generation: nil, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match end - alias bucketOwnerFullControl! owner_full! + alias bucketOwnerFullControl! owner_full! # rubocop:disable Naming/MethodName ## # Convenience method to apply the `bucketOwnerRead` predefined ACL @@ -426,7 +426,7 @@ def owner_read! generation: nil, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match end - alias bucketOwnerRead! owner_read! + alias bucketOwnerRead! owner_read! # rubocop:disable Naming/MethodName ## # Convenience method to apply the `private` predefined ACL @@ -513,7 +513,7 @@ def project_private! generation: nil, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match end - alias projectPrivate! project_private! + alias projectPrivate! project_private! # rubocop:disable Naming/MethodName ## # Convenience method to apply the `publicRead` predefined ACL @@ -557,7 +557,7 @@ def public! generation: nil, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match end - alias publicRead! public! + alias publicRead! public! # rubocop:disable Naming/MethodName alias public_read! public! protected From 22ed038491bf1635aba5bcdd44842a5f0fcf3f87 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:18:52 -0700 Subject: [PATCH 353/457] feat: Initial generation of google-shopping-merchant-inventories-v1 (#30779) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 71 ++ .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++++ .../README.md | 154 ++++ .../Rakefile | 169 +++++ .../gapic_metadata.json | 57 ++ ...e-shopping-merchant-inventories-v1.gemspec | 29 + ...google-shopping-merchant-inventories-v1.rb | 21 + .../shopping/merchant/inventories/v1.rb | 48 ++ .../inventories/v1/inventories_common_pb.rb | 55 ++ .../inventories/v1/local_inventory_service.rb | 57 ++ .../v1/local_inventory_service/client.rb | 694 ++++++++++++++++++ .../v1/local_inventory_service/credentials.rb | 49 ++ .../v1/local_inventory_service/paths.rb | 71 ++ .../v1/local_inventory_service/rest.rb | 54 ++ .../v1/local_inventory_service/rest/client.rb | 647 ++++++++++++++++ .../rest/service_stub.rb | 267 +++++++ .../inventories/v1/localinventory_pb.rb | 56 ++ .../v1/localinventory_services_pb.rb | 68 ++ .../v1/regional_inventory_service.rb | 58 ++ .../v1/regional_inventory_service/client.rb | 694 ++++++++++++++++++ .../regional_inventory_service/credentials.rb | 49 ++ .../v1/regional_inventory_service/paths.rb | 71 ++ .../v1/regional_inventory_service/rest.rb | 55 ++ .../regional_inventory_service/rest/client.rb | 647 ++++++++++++++++ .../rest/service_stub.rb | 267 +++++++ .../inventories/v1/regionalinventory_pb.rb | 56 ++ .../v1/regionalinventory_services_pb.rb | 69 ++ .../shopping/merchant/inventories/v1/rest.rb | 40 + .../merchant/inventories/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++++++++++++ .../proto_docs/google/api/field_behavior.rb | 85 +++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 ++++++ .../proto_docs/google/protobuf/duration.rb | 98 +++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 ++++ .../inventories/v1/inventories_common.rb | 182 +++++ .../merchant/inventories/v1/localinventory.rb | 124 ++++ .../inventories/v1/regionalinventory.rb | 123 ++++ .../proto_docs/google/shopping/type/types.rb | 210 ++++++ .../proto_docs/google/type/interval.rb | 45 ++ .../snippets/Gemfile | 32 + .../delete_local_inventory.rb | 47 ++ .../insert_local_inventory.rb | 47 ++ .../list_local_inventories.rb | 51 ++ .../delete_regional_inventory.rb | 47 ++ .../insert_regional_inventory.rb | 47 ++ .../list_regional_inventories.rb | 51 ++ ...ogle.shopping.merchant.inventories.v1.json | 255 +++++++ .../v1/local_inventory_service_paths_test.rb | 67 ++ .../v1/local_inventory_service_rest_test.rb | 264 +++++++ .../v1/local_inventory_service_test.rb | 270 +++++++ .../regional_inventory_service_paths_test.rb | 67 ++ .../regional_inventory_service_rest_test.rb | 264 +++++++ .../v1/regional_inventory_service_test.rb | 270 +++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 68 files changed, 8667 insertions(+) create mode 100644 google-shopping-merchant-inventories-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-inventories-v1/.gitignore create mode 100644 google-shopping-merchant-inventories-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-inventories-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-inventories-v1/.rubocop.yml create mode 100644 google-shopping-merchant-inventories-v1/.toys.rb create mode 100644 google-shopping-merchant-inventories-v1/.yardopts create mode 100644 google-shopping-merchant-inventories-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-inventories-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-inventories-v1/Gemfile create mode 100644 google-shopping-merchant-inventories-v1/LICENSE.md create mode 100644 google-shopping-merchant-inventories-v1/README.md create mode 100644 google-shopping-merchant-inventories-v1/Rakefile create mode 100644 google-shopping-merchant-inventories-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec create mode 100644 google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb create mode 100644 google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb create mode 100644 google-shopping-merchant-inventories-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb create mode 100644 google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb create mode 100644 google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb create mode 100644 google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb create mode 100644 google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb create mode 100644 google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb create mode 100644 google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json create mode 100644 google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb create mode 100644 google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb create mode 100644 google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb create mode 100644 google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb create mode 100644 google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb create mode 100644 google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb create mode 100644 google-shopping-merchant-inventories-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f67bc9850665..7217601a8cf3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -919,6 +919,8 @@ "google-shopping-merchant-data_sources-v1beta+FILLER": "0.0.0", "google-shopping-merchant-inventories": "0.4.1", "google-shopping-merchant-inventories+FILLER": "0.0.0", + "google-shopping-merchant-inventories-v1": "0.0.1", + "google-shopping-merchant-inventories-v1+FILLER": "0.0.0", "google-shopping-merchant-inventories-v1beta": "0.7.0", "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution": "0.2.0", diff --git a/google-shopping-merchant-inventories-v1/.OwlBot.yaml b/google-shopping-merchant-inventories-v1/.OwlBot.yaml new file mode 100644 index 000000000000..21ed559727bd --- /dev/null +++ b/google-shopping-merchant-inventories-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/inventories/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-inventories-v1/$1 diff --git a/google-shopping-merchant-inventories-v1/.gitignore b/google-shopping-merchant-inventories-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-inventories-v1/.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/google-shopping-merchant-inventories-v1/.owlbot-manifest.json b/google-shopping-merchant-inventories-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..dbbe073cc24a --- /dev/null +++ b/google-shopping-merchant-inventories-v1/.owlbot-manifest.json @@ -0,0 +1,71 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-inventories-v1.gemspec", + "lib/google-shopping-merchant-inventories-v1.rb", + "lib/google/shopping/merchant/inventories/v1.rb", + "lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb", + "lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb", + "lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb", + "lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb", + "lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb", + "lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb", + "lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb", + "lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb", + "lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb", + "lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb", + "lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb", + "lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb", + "lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb", + "lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb", + "lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb", + "lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb", + "lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb", + "lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb", + "lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb", + "lib/google/shopping/merchant/inventories/v1/rest.rb", + "lib/google/shopping/merchant/inventories/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb", + "proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb", + "proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb", + "proto_docs/google/shopping/type/types.rb", + "proto_docs/google/type/interval.rb", + "snippets/Gemfile", + "snippets/local_inventory_service/delete_local_inventory.rb", + "snippets/local_inventory_service/insert_local_inventory.rb", + "snippets/local_inventory_service/list_local_inventories.rb", + "snippets/regional_inventory_service/delete_regional_inventory.rb", + "snippets/regional_inventory_service/insert_regional_inventory.rb", + "snippets/regional_inventory_service/list_regional_inventories.rb", + "snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json", + "test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb", + "test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb", + "test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb", + "test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb", + "test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb", + "test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-inventories-v1/.repo-metadata.json b/google-shopping-merchant-inventories-v1/.repo-metadata.json new file mode 100644 index 000000000000..e70b67d6c360 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories-v1", + "distribution_name": "google-shopping-merchant-inventories-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-inventories-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-inventories-v1/.rubocop.yml b/google-shopping-merchant-inventories-v1/.rubocop.yml new file mode 100644 index 000000000000..b0c70c43d864 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-inventories-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-inventories-v1.rb" diff --git a/google-shopping-merchant-inventories-v1/.toys.rb b/google-shopping-merchant-inventories-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-inventories-v1/.yardopts b/google-shopping-merchant-inventories-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-inventories-v1/AUTHENTICATION.md b/google-shopping-merchant-inventories-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..4f0423f13882 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-inventories-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-inventories-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/inventories/v1" + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/inventories/v1" + +::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/inventories/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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/google-shopping-merchant-inventories-v1/CHANGELOG.md b/google-shopping-merchant-inventories-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-inventories-v1/Gemfile b/google-shopping-merchant-inventories-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-inventories-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-inventories-v1/LICENSE.md b/google-shopping-merchant-inventories-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-inventories-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-inventories-v1/README.md b/google-shopping-merchant-inventories-v1/README.md new file mode 100644 index 000000000000..f220a2581837 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-inventories](https://rubygems.org/gems/google-shopping-merchant-inventories). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-inventories-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/inventories/v1" + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new +request = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new # (request fields as keyword arguments...) +response = client.list_local_inventories request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/inventories/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-inventories-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-inventories`. +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-shopping-merchant-inventories-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-inventories-v1/Rakefile b/google-shopping-merchant-inventories-v1/Rakefile new file mode 100644 index 000000000000..80e8ac9c684b --- /dev/null +++ b/google-shopping-merchant-inventories-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-inventories-v1 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/shopping/merchant/inventories/v1/local_inventory_service/credentials" + ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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-shopping-merchant-inventories-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-inventories-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-inventories-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-inventories-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-inventories-v1" + header "google-shopping-merchant-inventories-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-inventories-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-inventories-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-inventories-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-inventories-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-inventories-v1/gapic_metadata.json b/google-shopping-merchant-inventories-v1/gapic_metadata.json new file mode 100644 index 000000000000..30b7c2264d23 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/gapic_metadata.json @@ -0,0 +1,57 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.inventories.v1", + "libraryPackage": "::Google::Shopping::Merchant::Inventories::V1", + "services": { + "LocalInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client", + "rpcs": { + "ListLocalInventories": { + "methods": [ + "list_local_inventories" + ] + }, + "InsertLocalInventory": { + "methods": [ + "insert_local_inventory" + ] + }, + "DeleteLocalInventory": { + "methods": [ + "delete_local_inventory" + ] + } + } + } + } + }, + "RegionalInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client", + "rpcs": { + "ListRegionalInventories": { + "methods": [ + "list_regional_inventories" + ] + }, + "InsertRegionalInventory": { + "methods": [ + "insert_regional_inventory" + ] + }, + "DeleteRegionalInventory": { + "methods": [ + "delete_regional_inventory" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec b/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec new file mode 100644 index 000000000000..163d75af76f4 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/inventories/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-inventories-v1" + gem.version = Google::Shopping::Merchant::Inventories::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-inventories-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb b/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb new file mode 100644 index 000000000000..033648f18f92 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1" diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb new file mode 100644 index 000000000000..a8f350cfc54d --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/local_inventory_service" +require "google/shopping/merchant/inventories/v1/regional_inventory_service" +require "google/shopping/merchant/inventories/v1/version" + +module Google + module Shopping + module Merchant + module Inventories + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/inventories/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb new file mode 100644 index 000000000000..b52611885a85 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1/inventories_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n@google/shopping/merchant/inventories/v1/inventories_common.proto\x12\'google.shopping.merchant.inventories.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd2\x08\n\x18LocalInventoryAttributes\x12/\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x34\n\nsale_price\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12=\n\x19sale_price_effective_date\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12i\n\x0c\x61vailability\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.AvailabilityH\x00\x88\x01\x01\x12\x1a\n\x08quantity\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12o\n\rpickup_method\x18\x06 \x01(\x0e\x32N.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupMethodB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12i\n\npickup_sla\x18\x07 \x01(\x0e\x32K.google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupSlaB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12*\n\x18instore_product_location\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\"\x8f\x01\n\x0c\x41vailability\x12,\n(LOCAL_INVENTORY_AVAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x18\n\x14LIMITED_AVAILABILITY\x10\x02\x12\x17\n\x13ON_DISPLAY_TO_ORDER\x10\x03\x12\x10\n\x0cOUT_OF_STOCK\x10\x04\"i\n\x0cPickupMethod\x12\x1d\n\x19PICKUP_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03\x42UY\x10\x01\x12\x0b\n\x07RESERVE\x10\x02\x12\x11\n\rSHIP_TO_STORE\x10\x03\x12\x11\n\rNOT_SUPPORTED\x10\x04\"\xa7\x01\n\tPickupSla\x12\x1a\n\x16PICKUP_SLA_UNSPECIFIED\x10\x00\x12\x0c\n\x08SAME_DAY\x10\x01\x12\x0c\n\x08NEXT_DAY\x10\x02\x12\x0b\n\x07TWO_DAY\x10\x03\x12\r\n\tTHREE_DAY\x10\x04\x12\x0c\n\x08\x46OUR_DAY\x10\x05\x12\x0c\n\x08\x46IVE_DAY\x10\x06\x12\x0b\n\x07SIX_DAY\x10\x07\x12\r\n\tSEVEN_DAY\x10\x08\x12\x0e\n\nMULTI_WEEK\x10\tB\x0f\n\r_availabilityB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x1b\n\x19_instore_product_location\"\xa8\x03\n\x1bRegionalInventoryAttributes\x12/\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x34\n\nsale_price\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12=\n\x19sale_price_effective_date\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12q\n\x0c\x61vailability\x18\x04 \x01(\x0e\x32Q.google.shopping.merchant.inventories.v1.RegionalInventoryAttributes.AvailabilityB\x03\xe0\x41\x01H\x00\x88\x01\x01\"_\n\x0c\x41vailability\x12/\n+REGIONAL_INVENTORY_AVAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x42\x0f\n\r_availabilityB\x9e\x02\n+com.google.shopping.merchant.inventories.v1B\x16InventoriesCommonProtoP\x01ZScloud.google.com/go/shopping/merchant/inventories/apiv1/inventoriespb;inventoriespb\xaa\x02\'Google.Shopping.Merchant.Inventories.V1\xca\x02\'Google\\Shopping\\Merchant\\Inventories\\V1\xea\x02+Google::Shopping::Merchant::Inventories::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.type.Interval", "google/type/interval.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Inventories + module V1 + LocalInventoryAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes").msgclass + LocalInventoryAttributes::Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.Availability").enummodule + LocalInventoryAttributes::PickupMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupMethod").enummodule + LocalInventoryAttributes::PickupSla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.LocalInventoryAttributes.PickupSla").enummodule + RegionalInventoryAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventoryAttributes").msgclass + RegionalInventoryAttributes::Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventoryAttributes.Availability").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb new file mode 100644 index 000000000000..90376d2396ab --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/version" + +require "google/shopping/merchant/inventories/v1/local_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1/local_inventory_service/paths" +require "google/shopping/merchant/inventories/v1/local_inventory_service/client" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + ## + # Service to manage local inventory for products + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1/local_inventory_service" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + module LocalInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "local_inventory_service", "helpers.rb" +require "google/shopping/merchant/inventories/v1/local_inventory_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb new file mode 100644 index 000000000000..11ddd9b25494 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb @@ -0,0 +1,694 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/localinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + ## + # Client for the LocalInventoryService service. + # + # Service to manage local inventory for products + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_inventory_service_stub + + ## + # Configure the LocalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 + @local_inventory_service_stub.universe_domain + end + + ## + # Create a new LocalInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalInventoryService 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/shopping/merchant/inventories/v1/localinventory_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 + + @local_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 + ) + + @local_inventory_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 + @local_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + # + # @overload list_local_inventories(request, options = nil) + # Pass arguments to `list_local_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, ::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_local_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_local_inventories` 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 parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new + # + # # Call the list_local_inventories method. + # result = client.list_local_inventories 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::Shopping::Merchant::Inventories::V1::LocalInventory. + # p item + # end + # + def list_local_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest + + # 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_local_inventories.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::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_local_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :list_local_inventories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, 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 + + ## + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + # + # @overload insert_local_inventory(request, options = nil) + # Pass arguments to `insert_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, ::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 insert_local_inventory(parent: nil, local_inventory: nil) + # Pass arguments to `insert_local_inventory` 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 account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1::LocalInventory, ::Hash] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new + # + # # Call the insert_local_inventory method. + # result = client.insert_local_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. + # p result + # + def insert_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest + + # 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.insert_local_inventory.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::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :insert_local_inventory, 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 + + ## + # Deletes the specified `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_local_inventory(request, options = nil) + # Pass arguments to `delete_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, ::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_local_inventory(name: nil) + # Pass arguments to `delete_local_inventory` 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 name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # + # @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/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new + # + # # Call the delete_local_inventory method. + # result = client.delete_local_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest + + # 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_local_inventory.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::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :delete_local_inventory, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LocalInventoryService API. + # + # This class represents the configuration for LocalInventoryService, + # 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 + # # list_local_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 LocalInventoryService 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 `list_local_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_local_inventories + ## + # RPC-specific configuration for `insert_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_local_inventory + ## + # RPC-specific configuration for `delete_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_local_inventory + + # @private + def initialize parent_rpcs = nil + list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories + @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config + insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory + @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config + delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory + @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb new file mode 100644 index 000000000000..fb528b14376f --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + # Credentials for the LocalInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb new file mode 100644 index 000000000000..8f4a93ff3006 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + # Path helper methods for the LocalInventoryService API. + module Paths + ## + # Create a fully-qualified LocalInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # + # @param account [String] + # @param product [String] + # @param store_code [String] + # + # @return [::String] + def local_inventory_path account:, product:, store_code: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "accounts/#{account}/products/#{product}/localInventories/#{store_code}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb new file mode 100644 index 000000000000..c176d043ad62 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/version" + +require "google/shopping/merchant/inventories/v1/local_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1/local_inventory_service/paths" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + ## + # Service to manage local inventory for products + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + module LocalInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb new file mode 100644 index 000000000000..24c882500e7e --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb @@ -0,0 +1,647 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/localinventory_pb" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + module Rest + ## + # REST client for the LocalInventoryService service. + # + # Service to manage local inventory for products + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_inventory_service_stub + + ## + # Configure the LocalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 + @local_inventory_service_stub.universe_domain + end + + ## + # Create a new LocalInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalInventoryService 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 + + @local_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @local_inventory_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 + @local_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + # + # @overload list_local_inventories(request, options = nil) + # Pass arguments to `list_local_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, ::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_local_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_local_inventories` 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 parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new + # + # # Call the list_local_inventories method. + # result = client.list_local_inventories 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::Shopping::Merchant::Inventories::V1::LocalInventory. + # p item + # end + # + def list_local_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest + + # 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_local_inventories.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::Shopping::Merchant::Inventories::V1::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_local_inventories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_local_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.list_local_inventories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, "local_inventories", 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 + + ## + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + # + # @overload insert_local_inventory(request, options = nil) + # Pass arguments to `insert_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, ::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 insert_local_inventory(parent: nil, local_inventory: nil) + # Pass arguments to `insert_local_inventory` 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 account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1::LocalInventory, ::Hash] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new + # + # # Call the insert_local_inventory method. + # result = client.insert_local_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. + # p result + # + def insert_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest + + # 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.insert_local_inventory.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::Shopping::Merchant::Inventories::V1::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.insert_local_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.insert_local_inventory 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 + + ## + # Deletes the specified `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_local_inventory(request, options = nil) + # Pass arguments to `delete_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, ::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_local_inventory(name: nil) + # Pass arguments to `delete_local_inventory` 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 name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # @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/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new + # + # # Call the delete_local_inventory method. + # result = client.delete_local_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest + + # 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_local_inventory.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::Shopping::Merchant::Inventories::V1::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_local_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.delete_local_inventory 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 + + ## + # Configuration class for the LocalInventoryService REST API. + # + # This class represents the configuration for LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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 + # # list_local_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.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 = "merchantapi.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 LocalInventoryService 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 `list_local_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_local_inventories + ## + # RPC-specific configuration for `insert_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_local_inventory + ## + # RPC-specific configuration for `delete_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_local_inventory + + # @private + def initialize parent_rpcs = nil + list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories + @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config + insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory + @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config + delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory + @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..c36c4e33e726 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/localinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module LocalInventoryService + module Rest + ## + # REST service stub for the LocalInventoryService 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: true, + 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 list_local_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest] + # 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::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse] + # A result object deserialized from the server's reply + def list_local_inventories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_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_local_inventories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest] + # 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::Shopping::Merchant::Inventories::V1::LocalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # A result object deserialized from the server's reply + def insert_local_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_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: "insert_local_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.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_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest] + # 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_local_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_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_local_inventory", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_local_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest] + # 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_local_inventories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/inventories/v1/{parent}/localInventories", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_local_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/inventories/v1/{parent}/localInventories:insert", + body: "local_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest] + # 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_local_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/inventories/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb new file mode 100644 index 000000000000..8e270967f34f --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1/localinventory.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/protobuf/empty_pb' +require 'google/shopping/merchant/inventories/v1/inventories_common_pb' + + +descriptor_data = "\n] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new + # + # # Call the list_regional_inventories method. + # result = client.list_regional_inventories 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::Shopping::Merchant::Inventories::V1::RegionalInventory. + # p item + # end + # + def list_regional_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest + + # 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_regional_inventories.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::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_regional_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :list_regional_inventories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, 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 + + ## + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + # + # @overload insert_regional_inventory(request, options = nil) + # Pass arguments to `insert_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::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 insert_regional_inventory(parent: nil, regional_inventory: nil) + # Pass arguments to `insert_regional_inventory` 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 account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory, ::Hash] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new + # + # # Call the insert_regional_inventory method. + # result = client.insert_regional_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + # p result + # + def insert_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest + + # 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.insert_regional_inventory.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::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :insert_regional_inventory, 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 + + ## + # Deletes the specified `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_regional_inventory(request, options = nil) + # Pass arguments to `delete_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::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_regional_inventory(name: nil) + # Pass arguments to `delete_regional_inventory` 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 name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # @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/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new + # + # # Call the delete_regional_inventory method. + # result = client.delete_regional_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest + + # 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_regional_inventory.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::Shopping::Merchant::Inventories::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :delete_regional_inventory, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the RegionalInventoryService API. + # + # This class represents the configuration for RegionalInventoryService, + # 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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 + # # list_regional_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 RegionalInventoryService 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 `list_regional_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regional_inventories + ## + # RPC-specific configuration for `insert_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_regional_inventory + ## + # RPC-specific configuration for `delete_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_regional_inventory + + # @private + def initialize parent_rpcs = nil + list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories + @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config + insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory + @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config + delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory + @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb new file mode 100644 index 000000000000..49c2bba07f61 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + # Credentials for the RegionalInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb new file mode 100644 index 000000000000..0fd793501e88 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + # Path helper methods for the RegionalInventoryService API. + module Paths + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + ## + # Create a fully-qualified RegionalInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # @param account [String] + # @param product [String] + # @param region [String] + # + # @return [::String] + def regional_inventory_path account:, product:, region: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "accounts/#{account}/products/#{product}/regionalInventories/#{region}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb new file mode 100644 index 000000000000..6f43e460f2bc --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/version" + +require "google/shopping/merchant/inventories/v1/regional_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/paths" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + ## + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + module RegionalInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb new file mode 100644 index 000000000000..07c52e55f83c --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb @@ -0,0 +1,647 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + module Rest + ## + # REST client for the RegionalInventoryService service. + # + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regional_inventory_service_stub + + ## + # Configure the RegionalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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", "Shopping", "Merchant", "Inventories", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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 + @regional_inventory_service_stub.universe_domain + end + + ## + # Create a new RegionalInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionalInventoryService 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 + + @regional_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @regional_inventory_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 + @regional_inventory_service_stub.logger + end + + # Service calls + + ## + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + # + # @overload list_regional_inventories(request, options = nil) + # Pass arguments to `list_regional_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, ::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_regional_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regional_inventories` 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 parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new + # + # # Call the list_regional_inventories method. + # result = client.list_regional_inventories 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::Shopping::Merchant::Inventories::V1::RegionalInventory. + # p item + # end + # + def list_regional_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest + + # 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_regional_inventories.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::Shopping::Merchant::Inventories::V1::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_regional_inventories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_regional_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.list_regional_inventories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, "regional_inventories", 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 + + ## + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + # + # @overload insert_regional_inventory(request, options = nil) + # Pass arguments to `insert_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::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 insert_regional_inventory(parent: nil, regional_inventory: nil) + # Pass arguments to `insert_regional_inventory` 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 account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory, ::Hash] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new + # + # # Call the insert_regional_inventory method. + # result = client.insert_regional_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + # p result + # + def insert_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest + + # 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.insert_regional_inventory.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::Shopping::Merchant::Inventories::V1::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.insert_regional_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.insert_regional_inventory 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 + + ## + # Deletes the specified `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_regional_inventory(request, options = nil) + # Pass arguments to `delete_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::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_regional_inventory(name: nil) + # Pass arguments to `delete_regional_inventory` 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 name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # @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/shopping/merchant/inventories/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new + # + # # Call the delete_regional_inventory method. + # result = client.delete_regional_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest + + # 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_regional_inventory.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::Shopping::Merchant::Inventories::V1::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_regional_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.delete_regional_inventory 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 + + ## + # Configuration class for the RegionalInventoryService REST API. + # + # This class represents the configuration for RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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 + # # list_regional_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.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 = "merchantapi.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 RegionalInventoryService 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 `list_regional_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regional_inventories + ## + # RPC-specific configuration for `insert_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_regional_inventory + ## + # RPC-specific configuration for `delete_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_regional_inventory + + # @private + def initialize parent_rpcs = nil + list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories + @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config + insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory + @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config + delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory + @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..9b5166e0e48a --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/regionalinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + module Rest + ## + # REST service stub for the RegionalInventoryService 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: true, + 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 list_regional_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest] + # 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::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse] + # A result object deserialized from the server's reply + def list_regional_inventories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_regional_inventories_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_regional_inventories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest] + # 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::Shopping::Merchant::Inventories::V1::RegionalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # A result object deserialized from the server's reply + def insert_regional_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_regional_inventory_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: "insert_regional_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.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_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest] + # 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_regional_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_regional_inventory_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_regional_inventory", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_regional_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest] + # 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_regional_inventories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/inventories/v1/{parent}/regionalInventories", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_regional_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/inventories/v1/{parent}/regionalInventories:insert", + body: "regional_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest] + # 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_regional_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/inventories/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb new file mode 100644 index 000000000000..f9df8fcccb34 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1/regionalinventory.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/protobuf/empty_pb' +require 'google/shopping/merchant/inventories/v1/inventories_common_pb' + + +descriptor_data = "\n?google/shopping/merchant/inventories/v1/regionalinventory.proto\x12\'google.shopping.merchant.inventories.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a@google/shopping/merchant/inventories/v1/inventories_common.proto\"\xbd\x02\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\x06region\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12p\n\x1dregional_inventory_attributes\x18\t \x01(\x0b\x32\x44.google.shopping.merchant.inventories.v1.RegionalInventoryAttributesB\x03\xe0\x41\x01:u\xea\x41r\n,merchantapi.googleapis.com/RegionalInventory\x12\x42\x61\x63\x63ounts/{account}/products/{product}/regionalInventories/{region}\"\x8d\x01\n\x1eListRegionalInventoriesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x94\x01\n\x1fListRegionalInventoriesResponse\x12X\n\x14regional_inventories\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.inventories.v1.RegionalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1eInsertRegionalInventoryRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12[\n\x12regional_inventory\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.inventories.v1.RegionalInventoryB\x03\xe0\x41\x02\"d\n\x1e\x44\x65leteRegionalInventoryRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,merchantapi.googleapis.com/RegionalInventory2\xbf\x06\n\x18RegionalInventoryService\x12\x81\x02\n\x17ListRegionalInventories\x12G.google.shopping.merchant.inventories.v1.ListRegionalInventoriesRequest\x1aH.google.shopping.merchant.inventories.v1.ListRegionalInventoriesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/inventories/v1/{parent=accounts/*/products/*}/regionalInventories\x12\x85\x02\n\x17InsertRegionalInventory\x12G.google.shopping.merchant.inventories.v1.InsertRegionalInventoryRequest\x1a:.google.shopping.merchant.inventories.v1.RegionalInventory\"e\x82\xd3\xe4\x93\x02_\"I/inventories/v1/{parent=accounts/*/products/*}/regionalInventories:insert:\x12regional_inventory\x12\xcd\x01\n\x17\x44\x65leteRegionalInventory\x12G.google.shopping.merchant.inventories.v1.DeleteRegionalInventoryRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/inventories/v1/{name=accounts/*/products/*/regionalInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9e\x02\n+com.google.shopping.merchant.inventories.v1B\x16RegionalInventoryProtoP\x01ZScloud.google.com/go/shopping/merchant/inventories/apiv1/inventoriespb;inventoriespb\xaa\x02\'Google.Shopping.Merchant.Inventories.V1\xca\x02\'Google\\Shopping\\Merchant\\Inventories\\V1\xea\x02+Google::Shopping::Merchant::Inventories::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.merchant.inventories.v1.RegionalInventoryAttributes", "google/shopping/merchant/inventories/v1/inventories_common.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Inventories + module V1 + RegionalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.RegionalInventory").msgclass + ListRegionalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.ListRegionalInventoriesRequest").msgclass + ListRegionalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.ListRegionalInventoriesResponse").msgclass + InsertRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.InsertRegionalInventoryRequest").msgclass + DeleteRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.DeleteRegionalInventoryRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb new file mode 100644 index 000000000000..603f08e381ba --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb @@ -0,0 +1,69 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/inventories/v1/regionalinventory.proto for package 'Google.Shopping.Merchant.Inventories.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/regionalinventory_pb' + +module Google + module Shopping + module Merchant + module Inventories + module V1 + module RegionalInventoryService + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.inventories.v1.RegionalInventoryService' + + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + rpc :ListRegionalInventories, ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # [`region`][google.shopping.merchant.inventories.v1.RegionalInventory.region] + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + rpc :InsertRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory + # Deletes the specified `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + rpc :DeleteRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb new file mode 100644 index 000000000000..24f1d2ad1618 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/local_inventory_service/rest" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" +require "google/shopping/merchant/inventories/v1/version" + +module Google + module Shopping + module Merchant + module Inventories + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/inventories/v1/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb new file mode 100644 index 000000000000..395d3a844ab7 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Inventories + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/proto_docs/README.md b/google-shopping-merchant-inventories-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb new file mode 100644 index 000000000000..1762cada611b --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb @@ -0,0 +1,182 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Inventories + module V1 + # Local inventory attributes. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Optional. Price of the product at this store. + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Optional. Sale price of the product at this store. Mandatory if + # [`salePriceEffectiveDate`][LocalInventory.sale_price_effective_date] is + # defined. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # Optional. The `TimePeriod` of the + # sale at this store. + # @!attribute [rw] availability + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::Availability] + # [Availability](https://support.google.com/merchants/answer/3061342) of the + # product at this store. + # @!attribute [rw] quantity + # @return [::Integer] + # Optional. Quantity of the product available at this store. Must be greater + # than or equal to zero. + # @!attribute [rw] pickup_method + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::PickupMethod] + # Optional. Supported [pickup + # method](https://support.google.com/merchants/answer/3061342) for this + # product. Unless the value is `"not supported"`, this field must be + # submitted together with `pickupSla`. + # @!attribute [rw] pickup_sla + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes::PickupSla] + # Optional. Relative time period from the order date for an order for this + # product, from this store, to be ready for pickup. Must be submitted with + # `pickupMethod`. See more details + # [here](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] instore_product_location + # @return [::String] + # Optional. Location of the product inside the store. Maximum length is 20 + # bytes. + class LocalInventoryAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # [Availability](https://support.google.com/merchants/answer/3061342) of the + # product at this store. + module Availability + # Indicates that the availability is unspecified. + LOCAL_INVENTORY_AVAILABILITY_UNSPECIFIED = 0 + + # Indicates that the product is in stock. + IN_STOCK = 1 + + # Indicates that the product is out of stock. + LIMITED_AVAILABILITY = 2 + + # Indicates that the product is on display to order. + ON_DISPLAY_TO_ORDER = 3 + + # Indicates that the product is out of stock. + OUT_OF_STOCK = 4 + end + + # Supported [pickup + # method](https://support.google.com/merchants/answer/3061342) for this + # product. Unless the value is `"not supported"`, this field must be + # submitted together with `pickupSla`. + module PickupMethod + # Indicates that the pickup method is unspecified. + PICKUP_METHOD_UNSPECIFIED = 0 + + # Indicates that the pickup method is Buy. + BUY = 1 + + # Indicates that the pickup method is Reserve. + RESERVE = 2 + + # Indicates that the pickup method is Ship to store. + SHIP_TO_STORE = 3 + + # Indicates that the pickup method is not supported. + NOT_SUPPORTED = 4 + end + + # Relative time period from the order date for an order for this product, + # from this store, to be ready for pickup. Must be submitted with + # `pickupMethod`. See more details + # [here](https://support.google.com/merchants/answer/3061342). + module PickupSla + # Indicates that the pickup SLA is unspecified. + PICKUP_SLA_UNSPECIFIED = 0 + + # Indicates that the pickup SLA is same day. + SAME_DAY = 1 + + # Indicates that the pickup SLA is next day. + NEXT_DAY = 2 + + # Indicates that the pickup SLA is two days. + TWO_DAY = 3 + + # Indicates that the pickup SLA is three days. + THREE_DAY = 4 + + # Indicates that the pickup SLA is four days. + FOUR_DAY = 5 + + # Indicates that the pickup SLA is five days. + FIVE_DAY = 6 + + # Indicates that the pickup SLA is six days. + SIX_DAY = 7 + + # Indicates that the pickup SLA is seven days. + SEVEN_DAY = 8 + + # Indicates that the pickup SLA is multi-week. + MULTI_WEEK = 9 + end + end + + # Regional inventory attributes. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Optional. Price of the product in this region. + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Optional. Sale price of the product in this region. Mandatory if + # [`salePriceEffectiveDate`][RegionalInventory.sale_price_effective_date] is + # defined. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # Optional. The `TimePeriod` of the + # sale price in this region. + # @!attribute [rw] availability + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryAttributes::Availability] + # Optional. + # [Availability](https://support.google.com/merchants/answer/14644124) of the + # product in this region. + class RegionalInventoryAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # [Availability](https://support.google.com/merchants/answer/14644124) of the + # product in this region. + module Availability + # Indicates that the availability is unspecified. + REGIONAL_INVENTORY_AVAILABILITY_UNSPECIFIED = 0 + + # Indicates that the product is in stock. + IN_STOCK = 1 + + # Indicates that the product is out of stock. + OUT_OF_STOCK = 2 + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb new file mode 100644 index 000000000000..97560ee4c5c6 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Inventories + module V1 + # Local inventory information for the product. Represents in-store information + # for a specific product at the store specified by + # {::Google::Shopping::Merchant::Inventories::V1::LocalInventory#store_code `storeCode`}. + # For a list of all accepted attribute values, see the [local product inventory + # data specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the `LocalInventory` resource. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # @!attribute [r] account + # @return [::Integer] + # Output only. The account that owns the product. This field will be ignored + # if set by the client. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. Store code (the store ID from your Business Profile) + # of the physical store the product is sold in. See the [Local product + # inventory data + # specification](https://support.google.com/merchants/answer/3061342) for + # more information. + # @!attribute [rw] local_inventory_attributes + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventoryAttributes] + # Optional. A list of local inventory attributes. + class LocalInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListLocalInventories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `name` of the parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListLocalInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListLocalInventories` method. + # @!attribute [rw] local_inventories + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::LocalInventory>] + # The `LocalInventory` resources for the given product from the specified + # account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListLocalInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertLocalInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] local_inventory + # @return [::Google::Shopping::Merchant::Inventories::V1::LocalInventory] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + class InsertLocalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteLocalInventory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + class DeleteLocalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb new file mode 100644 index 000000000000..293905d17afb --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Inventories + module V1 + # Regional inventory information for the product. Represents specific + # information like price and availability for a given product in a specific + # {::Google::Shopping::Merchant::Inventories::V1::RegionalInventory#region `region`}. + # For a list of all accepted attribute values, see the [regional product + # inventory data + # specification](https://support.google.com/merchants/answer/9698880). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the `RegionalInventory` resource. + # Format: + # `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}` + # @!attribute [r] account + # @return [::Integer] + # Output only. The account that owns the product. This field will be ignored + # if set by the client. + # @!attribute [rw] region + # @return [::String] + # Required. Immutable. ID of the region for this + # `RegionalInventory` resource. See the [Regional availability and + # pricing](https://support.google.com/merchants/answer/9698880) for more + # details. + # @!attribute [rw] regional_inventory_attributes + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryAttributes] + # Optional. A list of regional inventory attributes. + class RegionalInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListRegionalInventories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `name` of the parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListRegionalInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListRegionalInventories` method. + # @!attribute [rw] regional_inventories + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::RegionalInventory>] + # The `RegionalInventory` resources for the given product from the specified + # account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRegionalInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertRegionalInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] regional_inventory + # @return [::Google::Shopping::Merchant::Inventories::V1::RegionalInventory] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + class InsertRegionalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteRegionalInventory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + class DeleteRegionalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..1de1b841fd30 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-inventories-v1/snippets/Gemfile b/google-shopping-merchant-inventories-v1/snippets/Gemfile new file mode 100644 index 000000000000..b871dbd53b5b --- /dev/null +++ b/google-shopping-merchant-inventories-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-inventories-v1", path: "../" +else + gem "google-shopping-merchant-inventories-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb new file mode 100644 index 000000000000..16a8a4ff0627 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the delete_local_inventory call in the LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory. +# +def delete_local_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new + + # Call the delete_local_inventory method. + result = client.delete_local_inventory request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync] diff --git a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb new file mode 100644 index 000000000000..368823b350fb --- /dev/null +++ b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the insert_local_inventory call in the LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory. +# +def insert_local_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new + + # Call the insert_local_inventory method. + result = client.insert_local_inventory request + + # The returned object is of type Google::Shopping::Merchant::Inventories::V1::LocalInventory. + p result +end +# [END merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync] diff --git a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb new file mode 100644 index 000000000000..535cd2a12e12 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the list_local_inventories call in the LocalInventoryService 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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories. +# +def list_local_inventories + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new + + # Call the list_local_inventories method. + result = client.list_local_inventories 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::Shopping::Merchant::Inventories::V1::LocalInventory. + p item + end +end +# [END merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync] diff --git a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb new file mode 100644 index 000000000000..47dba380df28 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the delete_regional_inventory call in the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory. +# +def delete_regional_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new + + # Call the delete_regional_inventory method. + result = client.delete_regional_inventory request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync] diff --git a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb new file mode 100644 index 000000000000..af22e485da89 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the insert_regional_inventory call in the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory. +# +def insert_regional_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new + + # Call the insert_regional_inventory method. + result = client.insert_regional_inventory request + + # The returned object is of type Google::Shopping::Merchant::Inventories::V1::RegionalInventory. + p result +end +# [END merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync] diff --git a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb new file mode 100644 index 000000000000..edfc4375fad5 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync] +require "google/shopping/merchant/inventories/v1" + +## +# Snippet for the list_regional_inventories call in the RegionalInventoryService 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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories. +# +def list_regional_inventories + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new + + # Call the list_regional_inventories method. + result = client.list_regional_inventories 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::Shopping::Merchant::Inventories::V1::RegionalInventory. + p item + end +end +# [END merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync] diff --git a/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json b/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json new file mode 100644 index 000000000000..5fbebd90967a --- /dev/null +++ b/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-inventories-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.inventories.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_LocalInventoryService_ListLocalInventories_sync", + "title": "Snippet for the list_local_inventories call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories.", + "file": "local_inventory_service/list_local_inventories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_local_inventories", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#list_local_inventories", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" + }, + "method": { + "short_name": "ListLocalInventories", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.ListLocalInventories", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LocalInventoryService_InsertLocalInventory_sync", + "title": "Snippet for the insert_local_inventory call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory.", + "file": "local_inventory_service/insert_local_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_local_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#insert_local_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1::LocalInventory", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" + }, + "method": { + "short_name": "InsertLocalInventory", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.InsertLocalInventory", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LocalInventoryService_DeleteLocalInventory_sync", + "title": "Snippet for the delete_local_inventory call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory.", + "file": "local_inventory_service/delete_local_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_local_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client#delete_local_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client" + }, + "method": { + "short_name": "DeleteLocalInventory", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService.DeleteLocalInventory", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionalInventoryService_ListRegionalInventories_sync", + "title": "Snippet for the list_regional_inventories call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories.", + "file": "regional_inventory_service/list_regional_inventories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_regional_inventories", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#list_regional_inventories", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" + }, + "method": { + "short_name": "ListRegionalInventories", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.ListRegionalInventories", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionalInventoryService_InsertRegionalInventory_sync", + "title": "Snippet for the insert_regional_inventory call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory.", + "file": "regional_inventory_service/insert_regional_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_regional_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#insert_regional_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventory", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" + }, + "method": { + "short_name": "InsertRegionalInventory", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.InsertRegionalInventory", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionalInventoryService_DeleteRegionalInventory_sync", + "title": "Snippet for the delete_regional_inventory call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory.", + "file": "regional_inventory_service/delete_regional_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_regional_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client#delete_regional_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client" + }, + "method": { + "short_name": "DeleteRegionalInventory", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService.DeleteRegionalInventory", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb new file mode 100644 index 000000000000..a3419bb06f1b --- /dev/null +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/local_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_local_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.local_inventory_path account: "value0", product: "value1", store_code: "value2" + assert_equal "accounts/value0/products/value1/localInventories/value2", path + end + end + + def test_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb new file mode 100644 index 000000000000..c5576157b036 --- /dev/null +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/localinventory_pb" +require "google/shopping/merchant/inventories/v1/local_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_list_local_inventories + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_local_inventories_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_list_local_inventories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_local_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_local_inventories parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_local_inventories ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new(parent: parent, 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_local_inventories({ parent: parent, 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new(parent: parent, 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_local_inventories_client_stub.call_count + end + end + end + + def test_insert_local_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + local_inventory = {} + + insert_local_inventory_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_insert_local_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_local_inventory_client_stub.call_count + end + end + end + + def test_delete_local_inventory + # 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_local_inventory_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::ServiceStub.stub :transcode_delete_local_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_local_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_local_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_local_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_local_inventory_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb new file mode 100644 index 000000000000..db80a897ab4c --- /dev/null +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb @@ -0,0 +1,270 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/localinventory_pb" +require "google/shopping/merchant/inventories/v1/localinventory_services_pb" +require "google/shopping/merchant/inventories/v1/local_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::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_list_local_inventories + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesResponse.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" + page_size = 42 + page_token = "hello world" + + list_local_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_local_inventories, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_local_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_local_inventories({ parent: parent, 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_local_inventories parent: parent, 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_local_inventories ::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new(parent: parent, 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_local_inventories({ parent: parent, 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_local_inventories(::Google::Shopping::Merchant::Inventories::V1::ListLocalInventoriesRequest.new(parent: parent, 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_local_inventories_client_stub.call_rpc_count + end + end + + def test_insert_local_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1::LocalInventory.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" + local_inventory = {} + + insert_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_local_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1::LocalInventory), request["local_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_local_inventory parent: parent, local_inventory: local_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_local_inventory_client_stub.call_rpc_count + end + end + + def test_delete_local_inventory + # 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_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_local_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_local_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_local_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_local_inventory({ 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_local_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteLocalInventoryRequest.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_local_inventory_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::Shopping::Merchant::Inventories::V1::LocalInventoryService::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::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb new file mode 100644 index 000000000000..4e0838879fef --- /dev/null +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/regional_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end + + def test_regional_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.regional_inventory_path account: "value0", product: "value1", region: "value2" + assert_equal "accounts/value0/products/value1/regionalInventories/value2", path + end + end +end diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb new file mode 100644 index 000000000000..7e188467e07d --- /dev/null +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1/regional_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_list_regional_inventories + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_regional_inventories_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_list_regional_inventories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_regional_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_regional_inventories parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_regional_inventories ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new(parent: parent, 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_regional_inventories({ parent: parent, 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new(parent: parent, 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_regional_inventories_client_stub.call_count + end + end + end + + def test_insert_regional_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + regional_inventory = {} + + insert_regional_inventory_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_insert_regional_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_regional_inventory_client_stub.call_count + end + end + end + + def test_delete_regional_inventory + # 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_regional_inventory_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::ServiceStub.stub :transcode_delete_regional_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_regional_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_regional_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_regional_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_regional_inventory_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb new file mode 100644 index 000000000000..df5e8a05cf3d --- /dev/null +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb @@ -0,0 +1,270 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/inventories/v1/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1/regionalinventory_services_pb" +require "google/shopping/merchant/inventories/v1/regional_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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_list_regional_inventories + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesResponse.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" + page_size = 42 + page_token = "hello world" + + list_regional_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_regional_inventories, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_regional_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_regional_inventories({ parent: parent, 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_regional_inventories parent: parent, 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_regional_inventories ::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new(parent: parent, 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_regional_inventories({ parent: parent, 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_regional_inventories(::Google::Shopping::Merchant::Inventories::V1::ListRegionalInventoriesRequest.new(parent: parent, 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_regional_inventories_client_stub.call_rpc_count + end + end + + def test_insert_regional_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory.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" + regional_inventory = {} + + insert_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_regional_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1::RegionalInventory), request["regional_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_regional_inventory_client_stub.call_rpc_count + end + end + + def test_delete_regional_inventory + # 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_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_regional_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_regional_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_regional_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_regional_inventory({ 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_regional_inventory(::Google::Shopping::Merchant::Inventories::V1::DeleteRegionalInventoryRequest.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_regional_inventory_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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::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::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-inventories-v1/test/helper.rb b/google-shopping-merchant-inventories-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-inventories-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 80c39e6e94c6..135ff757460d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1851,6 +1851,10 @@ "component": "google-shopping-merchant-inventories", "version_file": "lib/google/shopping/merchant/inventories/version.rb" }, + "google-shopping-merchant-inventories-v1": { + "component": "google-shopping-merchant-inventories-v1", + "version_file": "lib/google/shopping/merchant/inventories/v1/version.rb" + }, "google-shopping-merchant-inventories-v1beta": { "component": "google-shopping-merchant-inventories-v1beta", "version_file": "lib/google/shopping/merchant/inventories/v1beta/version.rb" From 11e07ffde40b32cc3635bc0f41066ea9d5f3bf08 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:20:03 -0700 Subject: [PATCH 354/457] feat: Initial generation of google-shopping-merchant-data_sources-v1 (#30778) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 76 ++ .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++++ .../README.md | 154 +++ .../Rakefile | 169 +++ .../gapic_metadata.json | 62 ++ ...-shopping-merchant-data_sources-v1.gemspec | 29 + ...oogle-shopping-merchant-data_sources-v1.rb | 21 + .../shopping/merchant/data_sources/v1.rb | 48 + .../data_sources/v1/data_sources_service.rb | 59 ++ .../v1/data_sources_service/client.rb | 967 ++++++++++++++++++ .../v1/data_sources_service/credentials.rb | 49 + .../v1/data_sources_service/paths.rb | 66 ++ .../v1/data_sources_service/rest.rb | 56 + .../v1/data_sources_service/rest/client.rb | 899 ++++++++++++++++ .../data_sources_service/rest/service_stub.rb | 452 ++++++++ .../data_sources/v1/file_uploads_service.rb | 57 ++ .../v1/file_uploads_service/client.rb | 467 +++++++++ .../v1/file_uploads_service/credentials.rb | 49 + .../v1/file_uploads_service/paths.rb | 54 + .../v1/file_uploads_service/rest.rb | 54 + .../v1/file_uploads_service/rest/client.rb | 434 ++++++++ .../file_uploads_service/rest/service_stub.rb | 144 +++ .../shopping/merchant/data_sources/v1/rest.rb | 40 + .../merchant/data_sources/v1/version.rb | 30 + .../merchant/datasources/v1/datasources_pb.rb | 64 ++ .../datasources/v1/datasources_services_pb.rb | 65 ++ .../datasources/v1/datasourcetypes_pb.rb | 57 ++ .../merchant/datasources/v1/fileinputs_pb.rb | 52 + .../merchant/datasources/v1/fileuploads_pb.rb | 55 + .../datasources/v1/fileuploads_services_pb.rb | 48 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 ++++ .../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 +++ .../merchant/datasources/v1/datasources.rb | 231 +++++ .../datasources/v1/datasourcetypes.rb | 298 ++++++ .../merchant/datasources/v1/fileinputs.rb | 145 +++ .../merchant/datasources/v1/fileuploads.rb | 131 +++ .../proto_docs/google/shopping/type/types.rb | 210 ++++ .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/timeofday.rb | 45 + .../snippets/Gemfile | 32 + .../create_data_source.rb | 47 + .../delete_data_source.rb | 47 + .../data_sources_service/fetch_data_source.rb | 47 + .../data_sources_service/get_data_source.rb | 47 + .../data_sources_service/list_data_sources.rb | 51 + .../update_data_source.rb | 47 + .../file_uploads_service/get_file_upload.rb | 47 + ...ogle.shopping.merchant.datasources.v1.json | 295 ++++++ .../v1/data_sources_service_paths_test.rb | 67 ++ .../v1/data_sources_service_rest_test.rb | 427 ++++++++ .../v1/data_sources_service_test.rb | 446 ++++++++ .../v1/file_uploads_service_paths_test.rb | 55 + .../v1/file_uploads_service_rest_test.rb | 153 +++ .../v1/file_uploads_service_test.rb | 143 +++ .../test/helper.rb | 25 + release-please-config.json | 4 + 73 files changed, 9667 insertions(+) create mode 100644 google-shopping-merchant-data_sources-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-data_sources-v1/.gitignore create mode 100644 google-shopping-merchant-data_sources-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-data_sources-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-data_sources-v1/.rubocop.yml create mode 100644 google-shopping-merchant-data_sources-v1/.toys.rb create mode 100644 google-shopping-merchant-data_sources-v1/.yardopts create mode 100644 google-shopping-merchant-data_sources-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-data_sources-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-data_sources-v1/Gemfile create mode 100644 google-shopping-merchant-data_sources-v1/LICENSE.md create mode 100644 google-shopping-merchant-data_sources-v1/README.md create mode 100644 google-shopping-merchant-data_sources-v1/Rakefile create mode 100644 google-shopping-merchant-data_sources-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec create mode 100644 google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb create mode 100644 google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb create mode 100644 google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb create mode 100644 google-shopping-merchant-data_sources-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb create mode 100644 google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb create mode 100644 google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb create mode 100644 google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb create mode 100644 google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb create mode 100644 google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb create mode 100644 google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb create mode 100644 google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json create mode 100644 google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb create mode 100644 google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb create mode 100644 google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb create mode 100644 google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb create mode 100644 google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb create mode 100644 google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb create mode 100644 google-shopping-merchant-data_sources-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7217601a8cf3..80e0c60d0cca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -915,6 +915,8 @@ "google-shopping-merchant-conversions-v1beta+FILLER": "0.0.0", "google-shopping-merchant-data_sources": "0.3.1", "google-shopping-merchant-data_sources+FILLER": "0.0.0", + "google-shopping-merchant-data_sources-v1": "0.0.1", + "google-shopping-merchant-data_sources-v1+FILLER": "0.0.0", "google-shopping-merchant-data_sources-v1beta": "0.6.0", "google-shopping-merchant-data_sources-v1beta+FILLER": "0.0.0", "google-shopping-merchant-inventories": "0.4.1", diff --git a/google-shopping-merchant-data_sources-v1/.OwlBot.yaml b/google-shopping-merchant-data_sources-v1/.OwlBot.yaml new file mode 100644 index 000000000000..d8b5b0d0c1d4 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/datasources/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-data_sources-v1/$1 diff --git a/google-shopping-merchant-data_sources-v1/.gitignore b/google-shopping-merchant-data_sources-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/.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/google-shopping-merchant-data_sources-v1/.owlbot-manifest.json b/google-shopping-merchant-data_sources-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..e124553fa6f6 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/.owlbot-manifest.json @@ -0,0 +1,76 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-data_sources-v1.gemspec", + "lib/google-shopping-merchant-data_sources-v1.rb", + "lib/google/shopping/merchant/data_sources/v1.rb", + "lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb", + "lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb", + "lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb", + "lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb", + "lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb", + "lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb", + "lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb", + "lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb", + "lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb", + "lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb", + "lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb", + "lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb", + "lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb", + "lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb", + "lib/google/shopping/merchant/data_sources/v1/rest.rb", + "lib/google/shopping/merchant/data_sources/v1/version.rb", + "lib/google/shopping/merchant/datasources/v1/datasources_pb.rb", + "lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb", + "lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb", + "lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb", + "lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb", + "lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/shopping/merchant/datasources/v1/datasources.rb", + "proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb", + "proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb", + "proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb", + "proto_docs/google/shopping/type/types.rb", + "proto_docs/google/type/dayofweek.rb", + "proto_docs/google/type/timeofday.rb", + "snippets/Gemfile", + "snippets/data_sources_service/create_data_source.rb", + "snippets/data_sources_service/delete_data_source.rb", + "snippets/data_sources_service/fetch_data_source.rb", + "snippets/data_sources_service/get_data_source.rb", + "snippets/data_sources_service/list_data_sources.rb", + "snippets/data_sources_service/update_data_source.rb", + "snippets/file_uploads_service/get_file_upload.rb", + "snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json", + "test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb", + "test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb", + "test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb", + "test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb", + "test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb", + "test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-data_sources-v1/.repo-metadata.json b/google-shopping-merchant-data_sources-v1/.repo-metadata.json new file mode 100644 index 000000000000..d59439bd54bd --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1", + "distribution_name": "google-shopping-merchant-data_sources-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-data_sources-v1/.rubocop.yml b/google-shopping-merchant-data_sources-v1/.rubocop.yml new file mode 100644 index 000000000000..d2d22e9da2f7 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-data_sources-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-data_sources-v1.rb" diff --git a/google-shopping-merchant-data_sources-v1/.toys.rb b/google-shopping-merchant-data_sources-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-data_sources-v1/.yardopts b/google-shopping-merchant-data_sources-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md b/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1030f16bbfcd --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-data_sources-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-data_sources-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/data_sources/v1" + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/data_sources/v1" + +::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/data_sources/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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/google-shopping-merchant-data_sources-v1/CHANGELOG.md b/google-shopping-merchant-data_sources-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-data_sources-v1/Gemfile b/google-shopping-merchant-data_sources-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-data_sources-v1/LICENSE.md b/google-shopping-merchant-data_sources-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-data_sources-v1/README.md b/google-shopping-merchant-data_sources-v1/README.md new file mode 100644 index 000000000000..0bc83ddaedcb --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-data_sources](https://rubygems.org/gems/google-shopping-merchant-data_sources). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-data_sources-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/data_sources/v1" + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new +request = ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new # (request fields as keyword arguments...) +response = client.get_data_source request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-data_sources-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/data_sources/v1" +require "logger" + +client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-data_sources-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-data_sources`. +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-shopping-merchant-data_sources-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-data_sources-v1/Rakefile b/google-shopping-merchant-data_sources-v1/Rakefile new file mode 100644 index 000000000000..2054378aebd3 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-data_sources-v1 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/shopping/merchant/data_sources/v1/data_sources_service/credentials" + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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-shopping-merchant-data_sources-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-data_sources-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-data_sources-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-data_sources-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-data_sources-v1" + header "google-shopping-merchant-data_sources-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-data_sources-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-data_sources-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-data_sources-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-data_sources-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-data_sources-v1/gapic_metadata.json b/google-shopping-merchant-data_sources-v1/gapic_metadata.json new file mode 100644 index 000000000000..b6de9c919344 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/gapic_metadata.json @@ -0,0 +1,62 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.datasources.v1", + "libraryPackage": "::Google::Shopping::Merchant::DataSources::V1", + "services": { + "DataSourcesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client", + "rpcs": { + "GetDataSource": { + "methods": [ + "get_data_source" + ] + }, + "ListDataSources": { + "methods": [ + "list_data_sources" + ] + }, + "CreateDataSource": { + "methods": [ + "create_data_source" + ] + }, + "UpdateDataSource": { + "methods": [ + "update_data_source" + ] + }, + "DeleteDataSource": { + "methods": [ + "delete_data_source" + ] + }, + "FetchDataSource": { + "methods": [ + "fetch_data_source" + ] + } + } + } + } + }, + "FileUploadsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client", + "rpcs": { + "GetFileUpload": { + "methods": [ + "get_file_upload" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec b/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec new file mode 100644 index 000000000000..da01eaad697f --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/data_sources/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-data_sources-v1" + gem.version = Google::Shopping::Merchant::DataSources::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb b/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb new file mode 100644 index 000000000000..bb2b8e50726b --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1" diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb new file mode 100644 index 000000000000..536037724b06 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1/data_sources_service" +require "google/shopping/merchant/data_sources/v1/file_uploads_service" +require "google/shopping/merchant/data_sources/v1/version" + +module Google + module Shopping + module Merchant + module DataSources + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/data_sources/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb new file mode 100644 index 000000000000..a3794aea06b4 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1/version" + +require "google/shopping/merchant/data_sources/v1/data_sources_service/credentials" +require "google/shopping/merchant/data_sources/v1/data_sources_service/paths" +require "google/shopping/merchant/data_sources/v1/data_sources_service/client" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + ## + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1/data_sources_service" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + module DataSourcesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_sources_service", "helpers.rb" +require "google/shopping/merchant/data_sources/v1/data_sources_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb new file mode 100644 index 000000000000..adbf5c98812a --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb @@ -0,0 +1,967 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/datasources_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + ## + # Client for the DataSourcesService service. + # + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_sources_service_stub + + ## + # Configure the DataSourcesService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataSourcesService clients + # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::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 + @data_sources_service_stub.universe_domain + end + + ## + # Create a new DataSourcesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataSourcesService 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/shopping/merchant/datasources/v1/datasources_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 + + @data_sources_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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 + ) + + @data_sources_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 + @data_sources_service_stub.logger + end + + # Service calls + + ## + # Retrieves the data source configuration for the given account. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::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_data_source(name: nil) + # Pass arguments to `get_data_source` 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 name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest + + # 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_data_source.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::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :get_data_source, 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 the configurations for data sources for the given account. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::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_data_sources(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_sources` 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 account to list data sources for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # 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::Shopping::Merchant::DataSources::V1::DataSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources 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::Shopping::Merchant::DataSources::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest + + # 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_data_sources.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::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, 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 + + ## + # Creates the new data source configuration for the given account. + # This method always creates a new data source. + # + # @overload create_data_source(request, options = nil) + # Pass arguments to `create_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::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_data_source(parent: nil, data_source: nil) + # Pass arguments to `create_data_source` 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 account where this data source will be created. + # Format: `accounts/{account}` + # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] + # Required. The data source to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new + # + # # Call the create_data_source method. + # result = client.create_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def create_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest + + # 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_data_source.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::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :create_data_source, 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 + + ## + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::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 update_data_source(data_source: nil, update_mask: nil) + # Pass arguments to `update_data_source` 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 data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] + # Required. The data source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + # + # For example, If you insert `updateMask=displayName` in the request, it will + # only update the `displayName` leaving all other fields untouched. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest + + # 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.update_data_source.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::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_source&.name + header_params["data_source.name"] = request.data_source.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.update_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :update_data_source, 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 + + ## + # Deletes a data source from your Merchant Center account. + # + # @overload delete_data_source(request, options = nil) + # Pass arguments to `delete_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::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_data_source(name: nil) + # Pass arguments to `delete_data_source` 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 name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @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/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new + # + # # Call the delete_data_source method. + # result = client.delete_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest + + # 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_data_source.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::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :delete_data_source, 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 + + ## + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + # + # @overload fetch_data_source(request, options = nil) + # Pass arguments to `fetch_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::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 fetch_data_source(name: nil) + # Pass arguments to `fetch_data_source` 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 name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + # + # @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/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new + # + # # Call the fetch_data_source method. + # result = client.fetch_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def fetch_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest + + # 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.fetch_data_source.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::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.call_rpc :fetch_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataSourcesService API. + # + # This class represents the configuration for DataSourcesService, + # 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::Shopping::Merchant::DataSources::V1::DataSourcesService::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 + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 DataSourcesService 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 `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `delete_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_source + ## + # RPC-specific configuration for `fetch_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source + @create_data_source = ::Gapic::Config::Method.new create_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source + @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config + fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source + @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb new file mode 100644 index 000000000000..f7a73203bbce --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + # Credentials for the DataSourcesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb new file mode 100644 index 000000000000..7d5ea6704619 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + # Path helper methods for the DataSourcesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified DataSource resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/dataSources/{datasource}` + # + # @param account [String] + # @param datasource [String] + # + # @return [::String] + def data_source_path account:, datasource: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/dataSources/#{datasource}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb new file mode 100644 index 000000000000..bb552bd0c6cf --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1/version" + +require "google/shopping/merchant/data_sources/v1/data_sources_service/credentials" +require "google/shopping/merchant/data_sources/v1/data_sources_service/paths" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/client" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + ## + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + module DataSourcesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb new file mode 100644 index 000000000000..ba954b81601d --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb @@ -0,0 +1,899 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/datasources_pb" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + module Rest + ## + # REST client for the DataSourcesService service. + # + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_sources_service_stub + + ## + # Configure the DataSourcesService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataSourcesService clients + # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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", "Shopping", "Merchant", "DataSources", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::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 + @data_sources_service_stub.universe_domain + end + + ## + # Create a new DataSourcesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataSourcesService 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 + + @data_sources_service_stub = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_sources_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 + @data_sources_service_stub.logger + end + + # Service calls + + ## + # Retrieves the data source configuration for the given account. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::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_data_source(name: nil) + # Pass arguments to `get_data_source` 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 name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest + + # 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_data_source.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::Shopping::Merchant::DataSources::V1::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_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.get_data_source 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 the configurations for data sources for the given account. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::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_data_sources(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_sources` 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 account to list data sources for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # 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::Shopping::Merchant::DataSources::V1::DataSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources 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::Shopping::Merchant::DataSources::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest + + # 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_data_sources.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::Shopping::Merchant::DataSources::V1::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_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.list_data_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, "data_sources", 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 + + ## + # Creates the new data source configuration for the given account. + # This method always creates a new data source. + # + # @overload create_data_source(request, options = nil) + # Pass arguments to `create_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::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_data_source(parent: nil, data_source: nil) + # Pass arguments to `create_data_source` 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 account where this data source will be created. + # Format: `accounts/{account}` + # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] + # Required. The data source to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new + # + # # Call the create_data_source method. + # result = client.create_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def create_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest + + # 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_data_source.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::Shopping::Merchant::DataSources::V1::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_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.create_data_source 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 + + ## + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::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 update_data_source(data_source: nil, update_mask: nil) + # Pass arguments to `update_data_source` 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 data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash] + # Required. The data source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + # + # For example, If you insert `updateMask=displayName` in the request, it will + # only update the `displayName` leaving all other fields untouched. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + # p result + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest + + # 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.update_data_source.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::Shopping::Merchant::DataSources::V1::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.update_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.update_data_source 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 + + ## + # Deletes a data source from your Merchant Center account. + # + # @overload delete_data_source(request, options = nil) + # Pass arguments to `delete_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::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_data_source(name: nil) + # Pass arguments to `delete_data_source` 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 name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + # @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/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new + # + # # Call the delete_data_source method. + # result = client.delete_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest + + # 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_data_source.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::Shopping::Merchant::DataSources::V1::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_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.delete_data_source 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 + + ## + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + # + # @overload fetch_data_source(request, options = nil) + # Pass arguments to `fetch_data_source` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::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 fetch_data_source(name: nil) + # Pass arguments to `fetch_data_source` 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 name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + # @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/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new + # + # # Call the fetch_data_source method. + # result = client.fetch_data_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def fetch_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest + + # 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.fetch_data_source.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::Shopping::Merchant::DataSources::V1::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.fetch_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_sources_service_stub.fetch_data_source 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 + + ## + # Configuration class for the DataSourcesService REST API. + # + # This class represents the configuration for DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::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 + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.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 = "merchantapi.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 DataSourcesService 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 `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `delete_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_source + ## + # RPC-specific configuration for `fetch_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source + @create_data_source = ::Gapic::Config::Method.new create_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source + @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config + fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source + @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb new file mode 100644 index 000000000000..a1002bce095a --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/datasources_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + module Rest + ## + # REST service stub for the DataSourcesService 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: true, + 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 get_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest] + # 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::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # A result object deserialized from the server's reply + def get_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_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_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.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_data_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest] + # 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::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse] + # A result object deserialized from the server's reply + def list_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_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_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest] + # 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::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # A result object deserialized from the server's reply + def create_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_source_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_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest] + # 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::Shopping::Merchant::DataSources::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # A result object deserialized from the server's reply + def update_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_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: "update_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.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_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest] + # 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_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_source_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_data_source", + 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 fetch_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest] + # 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 fetch_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_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: "fetch_data_source", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest] + # 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_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest] + # 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_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest] + # 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_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/datasources/v1/{parent}/dataSources", + body: "data_source", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/datasources/v1/{data_source.name}", + body: "data_source", + matches: [ + ["data_source.name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest] + # 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_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/datasources/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_data_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/datasources/v1/{name}:fetch", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb new file mode 100644 index 000000000000..481b718733f3 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1/version" + +require "google/shopping/merchant/data_sources/v1/file_uploads_service/credentials" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/paths" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/client" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + ## + # Service to manage data source file uploads. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/data_sources/v1/file_uploads_service" + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new + # + module FileUploadsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "file_uploads_service", "helpers.rb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb new file mode 100644 index 000000000000..e982277ea954 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb @@ -0,0 +1,467 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/fileuploads_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + ## + # Client for the FileUploadsService service. + # + # Service to manage data source file uploads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :file_uploads_service_stub + + ## + # Configure the FileUploadsService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FileUploadsService clients + # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 + @file_uploads_service_stub.universe_domain + end + + ## + # Create a new FileUploadsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FileUploadsService 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/shopping/merchant/datasources/v1/fileuploads_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 + + @file_uploads_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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 + ) + + @file_uploads_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 + @file_uploads_service_stub.logger + end + + # Service calls + + ## + # Gets the latest data source file upload. Only the `latest` alias is + # accepted for a file upload. + # + # @overload get_file_upload(request, options = nil) + # Pass arguments to `get_file_upload` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::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_file_upload(name: nil) + # Pass arguments to `get_file_upload` 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 name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new + # + # # Call the get_file_upload method. + # result = client.get_file_upload request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. + # p result + # + def get_file_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest + + # 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_file_upload.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::Shopping::Merchant::DataSources::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_file_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @file_uploads_service_stub.call_rpc :get_file_upload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the FileUploadsService API. + # + # This class represents the configuration for FileUploadsService, + # 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 + # # get_file_upload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 FileUploadsService 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 `get_file_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file_upload + + # @private + def initialize parent_rpcs = nil + get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload + @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb new file mode 100644 index 000000000000..22f673bf926d --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + # Credentials for the FileUploadsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb new file mode 100644 index 000000000000..5e18275b519b --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + # Path helper methods for the FileUploadsService API. + module Paths + ## + # Create a fully-qualified FileUpload resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}` + # + # @param account [String] + # @param datasource [String] + # @param fileupload [String] + # + # @return [::String] + def file_upload_path account:, datasource:, fileupload: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" + + "accounts/#{account}/dataSources/#{datasource}/fileUploads/#{fileupload}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb new file mode 100644 index 000000000000..8067770cba7e --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1/version" + +require "google/shopping/merchant/data_sources/v1/file_uploads_service/credentials" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/paths" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + ## + # Service to manage data source file uploads. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new + # + module FileUploadsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb new file mode 100644 index 000000000000..45d9cab0f070 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/fileuploads_pb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + module Rest + ## + # REST client for the FileUploadsService service. + # + # Service to manage data source file uploads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :file_uploads_service_stub + + ## + # Configure the FileUploadsService Client class. + # + # See {::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FileUploadsService clients + # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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", "Shopping", "Merchant", "DataSources", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 + @file_uploads_service_stub.universe_domain + end + + ## + # Create a new FileUploadsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FileUploadsService 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 + + @file_uploads_service_stub = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @file_uploads_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 + @file_uploads_service_stub.logger + end + + # Service calls + + ## + # Gets the latest data source file upload. Only the `latest` alias is + # accepted for a file upload. + # + # @overload get_file_upload(request, options = nil) + # Pass arguments to `get_file_upload` via a request object, either of type + # {::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::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_file_upload(name: nil) + # Pass arguments to `get_file_upload` 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 name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/data_sources/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new + # + # # Call the get_file_upload method. + # result = client.get_file_upload request + # + # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. + # p result + # + def get_file_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest + + # 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_file_upload.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::Shopping::Merchant::DataSources::V1::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_file_upload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_file_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @file_uploads_service_stub.get_file_upload 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 + + ## + # Configuration class for the FileUploadsService REST API. + # + # This class represents the configuration for FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::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 + # # get_file_upload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_file_upload.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 = "merchantapi.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 FileUploadsService 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 `get_file_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file_upload + + # @private + def initialize parent_rpcs = nil + get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload + @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb new file mode 100644 index 000000000000..93ab8608f1a9 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/fileuploads_pb" + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + module Rest + ## + # REST service stub for the FileUploadsService 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: true, + 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 get_file_upload REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest] + # 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::Shopping::Merchant::DataSources::V1::FileUpload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload] + # A result object deserialized from the server's reply + def get_file_upload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_file_upload_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_file_upload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.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 get_file_upload REST call + # + # @param request_pb [::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest] + # 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_file_upload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/datasources/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/dataSources/[^/]+/fileUploads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb new file mode 100644 index 000000000000..144a3d3d515f --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1/data_sources_service/rest" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" +require "google/shopping/merchant/data_sources/v1/version" + +module Google + module Shopping + module Merchant + module DataSources + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/data_sources/v1/rest" + # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb new file mode 100644 index 000000000000..3433857ddf7d --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb new file mode 100644 index 000000000000..2f7d86915eae --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1/datasources.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/datasources/v1/datasourcetypes_pb' +require 'google/shopping/merchant/datasources/v1/fileinputs_pb' + + +descriptor_data = "\n9google/shopping/merchant/datasources/v1/datasources.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a=google/shopping/merchant/datasources/v1/datasourcetypes.proto\x1a\x38google/shopping/merchant/datasources/v1/fileinputs.proto\"\xa2\t\n\nDataSource\x12h\n\x1bprimary_product_data_source\x18\x04 \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.PrimaryProductDataSourceH\x00\x12r\n supplemental_product_data_source\x18\x05 \x01(\x0b\x32\x46.google.shopping.merchant.datasources.v1.SupplementalProductDataSourceH\x00\x12h\n\x1blocal_inventory_data_source\x18\x06 \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.LocalInventoryDataSourceH\x00\x12n\n\x1eregional_inventory_data_source\x18\x07 \x01(\x0b\x32\x44.google.shopping.merchant.datasources.v1.RegionalInventoryDataSourceH\x00\x12]\n\x15promotion_data_source\x18\x08 \x01(\x0b\x32<.google.shopping.merchant.datasources.v1.PromotionDataSourceH\x00\x12\x66\n\x1aproduct_review_data_source\x18\t \x01(\x0b\x32@.google.shopping.merchant.datasources.v1.ProductReviewDataSourceH\x00\x12h\n\x1bmerchant_review_data_source\x18\x0c \x01(\x0b\x32\x41.google.shopping.merchant.datasources.v1.MerchantReviewDataSourceH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12M\n\x05input\x18\n \x01(\x0e\x32\x39.google.shopping.merchant.datasources.v1.DataSource.InputB\x03\xe0\x41\x03\x12K\n\nfile_input\x18\x0b \x01(\x0b\x32\x32.google.shopping.merchant.datasources.v1.FileInputB\x03\xe0\x41\x01\"G\n\x05Input\x12\x15\n\x11INPUT_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41PI\x10\x01\x12\x08\n\x04\x46ILE\x10\x02\x12\x06\n\x02UI\x10\x03\x12\x0c\n\x08\x41UTOFEED\x10\x04:p\xea\x41m\n%merchantapi.googleapis.com/DataSource\x12+accounts/{account}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x06\n\x04Type\"S\n\x14GetDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource\"\x88\x01\n\x16ListDataSourcesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/DataSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"}\n\x17ListDataSourcesResponse\x12I\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x17\x43reateDataSourceRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/DataSource\x12M\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSourceB\x03\xe0\x41\x02\"\x9e\x01\n\x17UpdateDataSourceRequest\x12M\n\x0b\x64\x61ta_source\x18\x01 \x01(\x0b\x32\x33.google.shopping.merchant.datasources.v1.DataSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"U\n\x16\x46\x65tchDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource\"V\n\x17\x44\x65leteDataSourceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/DataSource2\xb9\n\n\x12\x44\x61taSourcesService\x12\xc3\x01\n\rGetDataSource\x12=.google.shopping.merchant.datasources.v1.GetDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//datasources/v1/{name=accounts/*/dataSources/*}\x12\xd6\x01\n\x0fListDataSources\x12?.google.shopping.merchant.datasources.v1.ListDataSourcesRequest\x1a@.google.shopping.merchant.datasources.v1.ListDataSourcesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//datasources/v1/{parent=accounts/*}/dataSources\x12\xe4\x01\n\x10\x43reateDataSource\x12@.google.shopping.merchant.datasources.v1.CreateDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\"Y\xda\x41\x12parent,data_source\x82\xd3\xe4\x93\x02>\"//datasources/v1/{parent=accounts/*}/dataSources:\x0b\x64\x61ta_source\x12\xf5\x01\n\x10UpdateDataSource\x12@.google.shopping.merchant.datasources.v1.UpdateDataSourceRequest\x1a\x33.google.shopping.merchant.datasources.v1.DataSource\"j\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02J2;/datasources/v1/{data_source.name=accounts/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xac\x01\n\x10\x44\x65leteDataSource\x12@.google.shopping.merchant.datasources.v1.DeleteDataSourceRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//datasources/v1/{name=accounts/*/dataSources/*}\x12\xac\x01\n\x0f\x46\x65tchDataSource\x12?.google.shopping.merchant.datasources.v1.FetchDataSourceRequest\x1a\x16.google.protobuf.Empty\"@\x82\xd3\xe4\x93\x02:\"5/datasources/v1/{name=accounts/*/dataSources/*}:fetch:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xaa\x03\n+com.google.shopping.merchant.datasources.v1B\x10\x44\x61taSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41T\n%merchantapi.googleapis.com/Datasource\x12+accounts/{account}/dataSources/{datasource}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.merchant.datasources.v1.PrimaryProductDataSource", "google/shopping/merchant/datasources/v1/datasourcetypes.proto"], + ["google.shopping.merchant.datasources.v1.FileInput", "google/shopping/merchant/datasources/v1/fileinputs.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module DataSources + module V1 + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSource").msgclass + DataSource::Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSource.Input").enummodule + GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.GetDataSourceRequest").msgclass + ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ListDataSourcesRequest").msgclass + ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ListDataSourcesResponse").msgclass + CreateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.CreateDataSourceRequest").msgclass + UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.UpdateDataSourceRequest").msgclass + FetchDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FetchDataSourceRequest").msgclass + DeleteDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DeleteDataSourceRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb new file mode 100644 index 000000000000..4ba5ad987ed2 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/datasources/v1/datasources.proto for package 'Google.Shopping.Merchant.DataSources.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/datasources_pb' + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module DataSourcesService + # Service to manage primary, supplemental, inventory and other data sources. + # See more in the [Merchant + # Center](https://support.google.com/merchants/answer/7439058) help article. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.datasources.v1.DataSourcesService' + + # Retrieves the data source configuration for the given account. + rpc :GetDataSource, ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource + # Lists the configurations for data sources for the given account. + rpc :ListDataSources, ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse + # Creates the new data source configuration for the given account. + # This method always creates a new data source. + rpc :CreateDataSource, ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource + # Updates the existing data source configuration. The fields that are + # set in the update mask but not provided in the resource will be deleted. + rpc :UpdateDataSource, ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::Google::Shopping::Merchant::DataSources::V1::DataSource + # Deletes a data source from your Merchant Center account. + rpc :DeleteDataSource, ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::Google::Protobuf::Empty + # Performs the data fetch immediately (even outside fetch schedule) on a + # data source from your Merchant Center Account. If you need to call + # this method more than once per day, you should use the Products service to + # update your product data instead. + # This method only works on data sources with a file input set. + rpc :FetchDataSource, ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb new file mode 100644 index 000000000000..587fd77c5247 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1/datasourcetypes.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n=google/shopping/merchant/datasources/v1/datasourcetypes.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a google/shopping/type/types.proto\"\x9d\x06\n\x18PrimaryProductDataSource\x12\x1c\n\x0clegacy_local\x18\x0b \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x05\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12\x16\n\tcountries\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12h\n\x0c\x64\x65\x66\x61ult_rule\x18\x07 \x01(\x0b\x32M.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DefaultRuleB\x03\xe0\x41\x01\x12\"\n\x15\x63ontains_custom_rules\x18\t \x01(\x08\x42\x03\xe0\x41\x03\x12h\n\x0c\x64\x65stinations\x18\n \x03(\x0b\x32M.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DestinationB\x03\xe0\x41\x01\x1ap\n\x0b\x44\x65\x66\x61ultRule\x12\x61\n\x16take_from_data_sources\x18\x01 \x03(\x0b\x32<.google.shopping.merchant.datasources.v1.DataSourceReferenceB\x03\xe0\x41\x02\x1a\xf4\x01\n\x0b\x44\x65stination\x12\x46\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12\x62\n\x05state\x18\x02 \x01(\x0e\x32S.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"\xf8\x01\n\x1dSupplementalProductDataSource\x12\x1f\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x01\x88\x01\x01\x12k\n referencing_primary_data_sources\x18\x07 \x03(\x0b\x32<.google.shopping.merchant.datasources.v1.DataSourceReferenceB\x03\xe0\x41\x03\x42\r\n\x0b_feed_labelB\x13\n\x11_content_language\"X\n\x18LocalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"[\n\x1bRegionalInventoryDataSource\x12\x1a\n\nfeed_label\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"W\n\x13PromotionDataSource\x12\x1e\n\x0etarget_country\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\"\x19\n\x17ProductReviewDataSource\"\x1a\n\x18MerchantReviewDataSource\"\x8e\x01\n\x13\x44\x61taSourceReference\x12\x0e\n\x04self\x18\x01 \x01(\x08H\x00\x12\'\n\x18primary_data_source_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12,\n\x1dsupplemental_data_source_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x42\x10\n\x0e\x64\x61ta_source_idB\x9c\x02\n+com.google.shopping.merchant.datasources.v1B\x14\x44\x61tasourcetypesProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module DataSources + module V1 + PrimaryProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource").msgclass + PrimaryProductDataSource::DefaultRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.DefaultRule").msgclass + PrimaryProductDataSource::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination").msgclass + PrimaryProductDataSource::Destination::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State").enummodule + SupplementalProductDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.SupplementalProductDataSource").msgclass + LocalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.LocalInventoryDataSource").msgclass + RegionalInventoryDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.RegionalInventoryDataSource").msgclass + PromotionDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.PromotionDataSource").msgclass + ProductReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.ProductReviewDataSource").msgclass + MerchantReviewDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.MerchantReviewDataSource").msgclass + DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.DataSourceReference").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb new file mode 100644 index 000000000000..27bc1f695417 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1/fileinputs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/type/dayofweek_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n8google/shopping/merchant/datasources/v1/fileinputs.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\x91\x06\n\tFileInput\x12]\n\x0e\x66\x65tch_settings\x18\x01 \x01(\x0b\x32@.google.shopping.merchant.datasources.v1.FileInput.FetchSettingsB\x03\xe0\x41\x01\x12\x16\n\tfile_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12^\n\x0f\x66ile_input_type\x18\x03 \x01(\x0e\x32@.google.shopping.merchant.datasources.v1.FileInput.FileInputTypeB\x03\xe0\x41\x03\x1a\xd0\x03\n\rFetchSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x64\x61y_of_month\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x30\n\x0btime_of_day\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\x12\x30\n\x0b\x64\x61y_of_week\x18\x04 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\tfrequency\x18\x06 \x01(\x0e\x32J.google.shopping.merchant.datasources.v1.FileInput.FetchSettings.FrequencyB\x03\xe0\x41\x02\x12\x16\n\tfetch_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08username\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08password\x18\t \x01(\tB\x03\xe0\x41\x01\"h\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46REQUENCY_DAILY\x10\x01\x12\x14\n\x10\x46REQUENCY_WEEKLY\x10\x02\x12\x15\n\x11\x46REQUENCY_MONTHLY\x10\x03\"Z\n\rFileInputType\x12\x1f\n\x1b\x46ILE_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06UPLOAD\x10\x01\x12\t\n\x05\x46\x45TCH\x10\x02\x12\x11\n\rGOOGLE_SHEETS\x10\x03\x42\x97\x02\n+com.google.shopping.merchant.datasources.v1B\x0f\x46ileInputsProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.TimeOfDay", "google/type/timeofday.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module DataSources + module V1 + FileInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput").msgclass + FileInput::FetchSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FetchSettings").msgclass + FileInput::FetchSettings::Frequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FetchSettings.Frequency").enummodule + FileInput::FileInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileInput.FileInputType").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb new file mode 100644 index 000000000000..a5950191a78c --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/datasources/v1/fileuploads.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/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/shopping/merchant/datasources/v1/fileuploads.proto\x12\'google.shopping.merchant.datasources.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x06\n\nFileUpload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x62\n\x10processing_state\x18\x03 \x01(\x0e\x32\x43.google.shopping.merchant.datasources.v1.FileUpload.ProcessingStateB\x03\xe0\x41\x03\x12N\n\x06issues\x18\x04 \x03(\x0b\x32\x39.google.shopping.merchant.datasources.v1.FileUpload.IssueB\x03\xe0\x41\x03\x12\x18\n\x0bitems_total\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\ritems_created\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\ritems_updated\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0bupload_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x95\x02\n\x05Issue\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x63ode\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x63ount\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12Y\n\x08severity\x18\x05 \x01(\x0e\x32\x42.google.shopping.merchant.datasources.v1.FileUpload.Issue.SeverityB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x06 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"_\n\x0fProcessingState\x12 \n\x1cPROCESSING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03:\x8a\x01\xea\x41\x86\x01\n%merchantapi.googleapis.com/FileUpload\x12\x44\x61\x63\x63ounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}*\x0b\x66ileUploads2\nfileUpload\"S\n\x14GetFileUploadRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/FileUpload2\xb1\x02\n\x12\x46ileUploadsService\x12\xd1\x01\n\rGetFileUpload\x12=.google.shopping.merchant.datasources.v1.GetFileUploadRequest\x1a\x33.google.shopping.merchant.datasources.v1.FileUpload\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/datasources/v1/{name=accounts/*/dataSources/*/fileUploads/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x98\x02\n+com.google.shopping.merchant.datasources.v1B\x10\x46ileUploadsProtoP\x01ZScloud.google.com/go/shopping/merchant/datasources/apiv1/datasourcespb;datasourcespb\xaa\x02\'Google.Shopping.Merchant.DataSources.V1\xca\x02\'Google\\Shopping\\Merchant\\DataSources\\V1\xea\x02+Google::Shopping::Merchant::DataSources::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module DataSources + module V1 + FileUpload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload").msgclass + FileUpload::Issue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.Issue").msgclass + FileUpload::Issue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.Issue.Severity").enummodule + FileUpload::ProcessingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.FileUpload.ProcessingState").enummodule + GetFileUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.datasources.v1.GetFileUploadRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb new file mode 100644 index 000000000000..57a070591799 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/datasources/v1/fileuploads.proto for package 'Google.Shopping.Merchant.DataSources.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/fileuploads_pb' + +module Google + module Shopping + module Merchant + module DataSources + module V1 + module FileUploadsService + # Service to manage data source file uploads. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.datasources.v1.FileUploadsService' + + # Gets the latest data source file upload. Only the `latest` alias is + # accepted for a file upload. + rpc :GetFileUpload, ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, ::Google::Shopping::Merchant::DataSources::V1::FileUpload + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/README.md b/google-shopping-merchant-data_sources-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb new file mode 100644 index 000000000000..cec53633157c --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + # The [data source](/merchant/api/guides/data-sources/overview) for + # the Merchant Center account. + # @!attribute [rw] primary_product_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource] + # The [primary data + # source](https://support.google.com/merchants/answer/7439058) for local + # and online products. + # + # Note: The following fields are mutually exclusive: `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] supplemental_product_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::SupplementalProductDataSource] + # The [supplemental data + # source](https://support.google.com/merchants/answer/7439058) for local + # and online products. + # + # Note: The following fields are mutually exclusive: `supplemental_product_data_source`, `primary_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] local_inventory_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::LocalInventoryDataSource] + # The [local + # inventory](https://support.google.com/merchants/answer/7023001) data + # source. + # + # Note: The following fields are mutually exclusive: `local_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regional_inventory_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::RegionalInventoryDataSource] + # The [regional + # inventory](https://support.google.com/merchants/answer/7439058) data + # source. + # + # Note: The following fields are mutually exclusive: `regional_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] promotion_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::PromotionDataSource] + # The [promotion](https://support.google.com/merchants/answer/2906014) + # data source. + # + # Note: The following fields are mutually exclusive: `promotion_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] product_review_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::ProductReviewDataSource] + # The [product + # review](https://support.google.com/merchants/answer/7045996) + # data source. + # + # Note: The following fields are mutually exclusive: `product_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merchant_review_data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::MerchantReviewDataSource] + # The [merchant + # review](https://support.google.com/merchants/answer/7045996) + # data source. + # + # Note: The following fields are mutually exclusive: `merchant_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. The name of the data source. + # Format: + # `accounts/{account}/dataSources/{datasource}` + # @!attribute [r] data_source_id + # @return [::Integer] + # Output only. The data source id. + # @!attribute [rw] display_name + # @return [::String] + # Required. The displayed data source name in the Merchant Center UI. + # @!attribute [r] input + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource::Input] + # Output only. Determines the type of input to the data source. Based on the + # input some settings might not work. Only generic data sources can be + # created through the API. + # @!attribute [rw] file_input + # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput] + # Optional. The field is used only when data is managed through a file. + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines the type of input to the data source. Based on the input some + # settings might not be supported. + module Input + # Input unspecified. + INPUT_UNSPECIFIED = 0 + + # Represents data sources for which the data is primarily provided through + # the API. + API = 1 + + # Represents data sources for which the data is primarily provided through + # file input. Data can still be provided through the API. + FILE = 2 + + # The data source for products added directly in Merchant Center. + # + # This type of data source can not be created or updated through this API, + # only by Merchant Center UI. + # + # This type of data source is read only. + UI = 3 + + # This is also known as + # [Automated feeds](https://support.google.com/merchants/answer/12158480) + # used to automatically build your product data. This type of data source + # can be enabled or disabled through the Accounts sub-API. + AUTOFEED = 4 + end + end + + # Request message for the GetDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source to retrieve. + # Format: `accounts/{account}/dataSources/{datasource}` + class GetDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListDataSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list data sources for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data sources to return. The service may + # return fewer than this value. The maximum value is 1000; values above 1000 + # will be coerced to 1000. If unspecified, the maximum number of data sources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataSources` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataSources` + # must match the call that provided the page token. + class ListDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListDataSources method. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSource>] + # The data sources from the specified account. + # @!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 ListDataSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateDataSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this data source will be created. + # Format: `accounts/{account}` + # @!attribute [rw] data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # Required. The data source to create. + class CreateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateDataSource method. + # @!attribute [rw] data_source + # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource] + # Required. The data source resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of data source fields to be updated. + # + # Fields specified in the update mask without a value specified in the + # body will be deleted from the data source. + # + # Providing special "*" value for full data source replacement is not + # supported. + # + # For example, If you insert `updateMask=displayName` in the request, it will + # only update the `displayName` leaving all other fields untouched. + class UpdateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the FetchDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source resource to fetch. + # Format: `accounts/{account}/dataSources/{datasource}` + class FetchDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteDataSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source to delete. + # Format: `accounts/{account}/dataSources/{datasource}` + class DeleteDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb new file mode 100644 index 000000000000..adb09beeb2e9 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb @@ -0,0 +1,298 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + # The primary data source for local and online products. + # @!attribute [rw] legacy_local + # @return [::Boolean] + # Optional. Immutable. Determines whether the products of this data source + # are **only** targeting local destinations. Legacy local products are + # prefixed with `local~` in the product resource ID. For example, + # `accounts/123/products/local~en~US~sku123`. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. Immutable. The feed label that is specified on the data source + # level. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # + # `feedLabel` and `contentLanguage` must be either both set or unset for data + # sources with product content type. + # They must be set for data sources with a file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept products without that + # restriction. + # @!attribute [rw] content_language + # @return [::String] + # Optional. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + # + # `feedLabel` and `contentLanguage` must be either both set or unset. + # The fields can only be unset for data sources without file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept products without that + # restriction. + # @!attribute [rw] countries + # @return [::Array<::String>] + # Optional. The countries where the items may be displayed. Represented as a + # [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # @!attribute [rw] default_rule + # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::DefaultRule] + # Optional. Default rule management of the data source. If set, the linked + # data sources will be replaced. + # @!attribute [r] contains_custom_rules + # @return [::Boolean] + # Output only. The existing data source setup contains at least one custom + # (non-default) rule and therefore its management through the + # `default_rule_data_sources` field should be treated with caution. + # @!attribute [rw] destinations + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::Destination>] + # Optional. A list of destinations describing where products of the data + # source can be shown. + # + # When retrieving the data source, the list contains all the destinations + # that can be used for the data source, including the ones that are disabled + # for the data source but enabled for the account. + # + # Only destinations that are enabled on the account, for example through + # program participation, can be enabled on the data source. + # + # If unset, during creation, the destinations will be inherited based on the + # account level program participation. + # + # If set, during creation or update, the data source will be set only for the + # specified destinations. + # + # Updating this field requires at least one destination. + class PrimaryProductDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default rule management of the data source. + # @!attribute [rw] take_from_data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSourceReference>] + # Required. The list of data sources linked in the [default + # rule](https://support.google.com/merchants/answer/7450276). + # This list is ordered by the default rule priority of joining the data. + # It might include none or multiple references to `self` and supplemental + # data sources. + # + # The list must not be empty. + # + # To link the data source to the default rule, you need to add a + # new reference to this list (in sequential order). + # + # To unlink the data source from the default rule, you need to + # remove the given reference from this list. + # + # Changing the order of this list will result in changing the priority of + # data sources in the default rule. + # + # For example, providing the following list: [`1001`, `self`] will + # take attribute values from supplemental data source `1001`, and fallback + # to `self` if the attribute is not set in `1001`. + class DefaultRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations also known as [Marketing + # methods](https://support.google.com/merchants/answer/15130232) selections. + # @!attribute [rw] destination + # @return [::Google::Shopping::Type::Destination::DestinationEnum] + # [Marketing methods](https://support.google.com/merchants/answer/15130232) + # (also known as destination) selections. + # @!attribute [rw] state + # @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::Destination::State] + # The state of the destination. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the destination. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # Indicates that the destination is enabled. + ENABLED = 1 + + # Indicates that the destination is disabled. + DISABLED = 2 + end + end + end + + # The supplemental data source for local and online products. After creation, + # you should make sure to link the supplemental product data source into one or + # more primary product data sources. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. Immutable. The feed label that is specified on the data source + # level. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # + # `feedLabel` and `contentLanguage` must be either both set or unset for data + # sources with product content type. + # + # They must be set for data sources with a [file + # input][google.shopping.merchant.datasources.v1.FileInput]. + # The fields must be unset for data sources without [file + # input][google.shopping.merchant.datasources.v1.FileInput]. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept produts without that + # restriction. + # @!attribute [rw] content_language + # @return [::String] + # Optional. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + # + # `feedLabel` and `contentLanguage` must be either both set or unset. + # The fields can only be unset for data sources without file input. + # + # If set, the data source will only accept products matching this + # combination. If unset, the data source will accept produts without that + # restriction. + # @!attribute [r] referencing_primary_data_sources + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSourceReference>] + # Output only. The (unordered and deduplicated) list of all primary data + # sources linked to this data source in either default or custom rules. + # Supplemental data source cannot be deleted before all links are removed. + class SupplementalProductDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The local inventory data source type is only available for file inputs and + # can't be used to create API local inventory data sources. + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The feed label of the offers to which the local + # inventory is provided. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items to + # which the local inventory is provided. + class LocalInventoryDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The feed label of the offers to which the regional + # inventory is provided. + # + # Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), + # and dashes (-). + # + # See also [migration to feed + # labels](https://developers.google.com/shopping-content/guides/products/feed-labels). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items to + # which the regional inventory is provided. + class RegionalInventoryDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The promotion data source. + # @!attribute [rw] target_country + # @return [::String] + # Required. Immutable. The target country used as part of the unique + # identifier. Represented as a [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # + # Promotions are only available in selected + # [countries](https://support.google.com/merchants/answer/4588460). + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter ISO 639-1 language of the items in the + # data source. + class PromotionDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The product review data source. + class ProductReviewDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The merchant review data source. + class MerchantReviewDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data source reference can be used to manage related data sources within the + # data source service. + # @!attribute [rw] self + # @return [::Boolean] + # Self should be used to reference the primary data source itself. + # + # Note: The following fields are mutually exclusive: `self`, `primary_data_source_name`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] primary_data_source_name + # @return [::String] + # Optional. The name of the primary data source. + # Format: + # `accounts/{account}/dataSources/{datasource}` + # + # Note: The following fields are mutually exclusive: `primary_data_source_name`, `self`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] supplemental_data_source_name + # @return [::String] + # Optional. The name of the supplemental data source. + # Format: + # `accounts/{account}/dataSources/{datasource}` + # + # Note: The following fields are mutually exclusive: `supplemental_data_source_name`, `self`, `primary_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataSourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb new file mode 100644 index 000000000000..7e615f24cbdc --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + # The data specific for file data sources. This field is empty for other + # data source inputs. + # @!attribute [rw] fetch_settings + # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings] + # Optional. Fetch details to deliver the data source. It contains settings + # for `FETCH` and `GOOGLE_SHEETS` file input types. The required fields vary + # based on the frequency of fetching. + # @!attribute [rw] file_name + # @return [::String] + # Optional. The file name of the data source. Required for `UPLOAD` file + # input type. + # @!attribute [r] file_input_type + # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FileInputType] + # Output only. The type of file input. + class FileInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Fetch details to deliver the data source. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Enables or pauses the fetch schedule. + # @!attribute [rw] day_of_month + # @return [::Integer] + # Optional. The day of the month when the data source file should be + # fetched (1-31). This field can only be set for monthly frequency. + # @!attribute [rw] time_of_day + # @return [::Google::Type::TimeOfDay] + # Optional. The hour of the day when the data source file should be + # fetched. Minutes and seconds are not supported and will be ignored. + # @!attribute [rw] day_of_week + # @return [::Google::Type::DayOfWeek] + # Optional. The day of the week when the data source file should be + # fetched. This field can only be set for weekly frequency. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by + # default. For example, "America/Los_Angeles". + # @!attribute [rw] frequency + # @return [::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings::Frequency] + # Required. The frequency describing fetch schedule. + # @!attribute [rw] fetch_uri + # @return [::String] + # Optional. The URL where the data source file can be fetched. Google + # Merchant Center supports automatic scheduled uploads using the HTTP, + # HTTPS or SFTP protocols, so the value will need to be a valid link using + # one of those three protocols. Immutable for Google Sheets files. + # @!attribute [rw] username + # @return [::String] + # Optional. An optional user name for + # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. + # Used for [submitting data sources through + # SFTP](https://support.google.com/merchants/answer/13813117). + # @!attribute [rw] password + # @return [::String] + # Optional. An optional password for + # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. + # Used for [submitting data sources through + # SFTP](https://support.google.com/merchants/answer/13813117). + class FetchSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The required fields vary based on the frequency of fetching. For a + # monthly + # fetch schedule, + # `day of + # month` + # and + # [hour of + # day][https://developers.google.com/merchant/api/reference/rest/datasources_v1beta/accounts.dataSources#timeofday] + # are required. For a weekly fetch schedule, + # [day of + # week][https://developers.google.com/merchant/api/reference/rest/datasources_v1beta/accounts.dataSources#dayofweek] + # and [hour of + # day][https://developers.google.com/merchant/api/reference/rest/datasources_v1beta/accounts.dataSources#timeofday] + # are required. For a daily fetch schedule, only an [hour of + # day][https://developers.google.com/merchant/api/reference/rest/datasources_v1beta/accounts.dataSources#timeofday] + # is required. + module Frequency + # Frequency unspecified. + FREQUENCY_UNSPECIFIED = 0 + + # The fetch happens every day. + FREQUENCY_DAILY = 1 + + # The fetch happens every week. + FREQUENCY_WEEKLY = 2 + + # The fetch happens every month. + FREQUENCY_MONTHLY = 3 + end + end + + # The method of file delivery. + module FileInputType + # File input type unspecified. + FILE_INPUT_TYPE_UNSPECIFIED = 0 + + # The file is uploaded through SFTP, Google Cloud Storage or manually in + # the Merchant Center. + UPLOAD = 1 + + # The file is fetched from the configured + # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. + FETCH = 2 + + # The file is fetched from Google Sheets specified in the + # {::Google::Shopping::Merchant::DataSources::V1::FileInput::FetchSettings#fetch_uri fetch_uri}. + # However, you can't set up `GOOGLE_SHEETS` as a data source through the + # API. To add `GOOGLE_SHEETS` as a data source through the Merchant Center, + # see [Add products to Merchant + # Center](https://support.google.com/merchants/answer/12158053). + GOOGLE_SHEETS = 3 + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb new file mode 100644 index 000000000000..5af7b55a426e --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module DataSources + module V1 + # The file upload of a specific data source, that is, the result of the + # retrieval of the data source at a certain timestamp computed asynchronously + # when the data source processing is finished. Only applicable to file data + # sources. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the data source file upload. + # Format: + # `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}}` + # @!attribute [r] data_source_id + # @return [::Integer] + # Output only. The data source id. + # @!attribute [r] processing_state + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload::ProcessingState] + # Output only. The processing state of the data source. + # @!attribute [r] issues + # @return [::Array<::Google::Shopping::Merchant::DataSources::V1::FileUpload::Issue>] + # Output only. The list of issues occurring in the data source. + # @!attribute [r] items_total + # @return [::Integer] + # Output only. The number of items in the data source that were processed. + # @!attribute [r] items_created + # @return [::Integer] + # Output only. The number of items in the data source that were created. + # @!attribute [r] items_updated + # @return [::Integer] + # Output only. The number of items in the data source that were updated. + # @!attribute [r] upload_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The date at which the file of the data source was uploaded. + class FileUpload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An error occurring in the data source, like "invalid price". + # @!attribute [r] title + # @return [::String] + # Output only. The title of the issue, for example, "Item too big". + # @!attribute [r] description + # @return [::String] + # Output only. The error description, for example, "Your data source + # contains items which have too many attributes, or are too big. These + # items will be dropped". + # @!attribute [r] code + # @return [::String] + # Output only. The code of the error, for example, + # "validation/invalid_value". Returns + # "?" if the code is unknown. + # @!attribute [r] count + # @return [::Integer] + # Output only. The number of occurrences of the error in the file upload. + # @!attribute [r] severity + # @return [::Google::Shopping::Merchant::DataSources::V1::FileUpload::Issue::Severity] + # Output only. The severity of the issue. + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. Link to the documentation explaining the issue in more + # details, if available. + class Issue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity of the issue. + module Severity + # Severity unspecified. + SEVERITY_UNSPECIFIED = 0 + + # The issue is the warning. + WARNING = 1 + + # The issue is an error. + ERROR = 2 + end + end + + # The processing state of the data source. + module ProcessingState + # Processing state unspecified. + PROCESSING_STATE_UNSPECIFIED = 0 + + # The data source could not be processed or all the items had errors. + FAILED = 1 + + # The data source is being processed. + IN_PROGRESS = 2 + + # The data source was processed successfully, though some items might have + # had errors. + SUCCEEDED = 3 + end + end + + # Request message for the GetFileUploadRequest method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data source file upload to retrieve. + # Format: + # `accounts/{account}/dataSources/{datasource}/fileUploads/latest` + class GetFileUploadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..c271eea096ba --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb new file mode 100644 index 000000000000..2945a0388a91 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are [google.type.Date][google.type.Date] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] hours + # @return [::Integer] + # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + # to allow the value "24:00:00" for scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Seconds of minutes of the time. Must normally be from 0 to 59. An API may + # allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + class TimeOfDay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/snippets/Gemfile b/google-shopping-merchant-data_sources-v1/snippets/Gemfile new file mode 100644 index 000000000000..356df1bad1eb --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-data_sources-v1", path: "../" +else + gem "google-shopping-merchant-data_sources-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb new file mode 100644 index 000000000000..626fd09c922c --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the create_data_source call in the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source. +# +def create_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new + + # Call the create_data_source method. + result = client.create_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync] diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb new file mode 100644 index 000000000000..933dd99c26df --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the delete_data_source call in the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source. +# +def delete_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new + + # Call the delete_data_source method. + result = client.delete_data_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync] diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb new file mode 100644 index 000000000000..68061b159a5a --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the fetch_data_source call in the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source. +# +def fetch_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new + + # Call the fetch_data_source method. + result = client.fetch_data_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync] diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb new file mode 100644 index 000000000000..40f633f7a156 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DataSourcesService_GetDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the get_data_source call in the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source. +# +def get_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new + + # Call the get_data_source method. + result = client.get_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_GetDataSource_sync] diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb new file mode 100644 index 000000000000..8bdd83644a94 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DataSourcesService_ListDataSources_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the list_data_sources call in the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources. +# +def list_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new + + # Call the list_data_sources method. + result = client.list_data_sources 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::Shopping::Merchant::DataSources::V1::DataSource. + p item + end +end +# [END merchantapi_v1_generated_DataSourcesService_ListDataSources_sync] diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb new file mode 100644 index 000000000000..8d80e5756f62 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the update_data_source call in the DataSourcesService 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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source. +# +def update_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new + + # Call the update_data_source method. + result = client.update_data_source request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource. + p result +end +# [END merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync] diff --git a/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb b/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb new file mode 100644 index 000000000000..29bbec6581cc --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync] +require "google/shopping/merchant/data_sources/v1" + +## +# Snippet for the get_file_upload call in the FileUploadsService 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::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload. +# +def get_file_upload + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new + + # Call the get_file_upload method. + result = client.get_file_upload request + + # The returned object is of type Google::Shopping::Merchant::DataSources::V1::FileUpload. + p result +end +# [END merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync] diff --git a/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json b/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json new file mode 100644 index 000000000000..18efc22a579b --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-shopping-merchant-data_sources-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.datasources.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_GetDataSource_sync", + "title": "Snippet for the get_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source.", + "file": "data_sources_service/get_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#get_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "GetDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.GetDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_ListDataSources_sync", + "title": "Snippet for the list_data_sources call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources.", + "file": "data_sources_service/list_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_sources", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#list_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "ListDataSources", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.ListDataSources", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_CreateDataSource_sync", + "title": "Snippet for the create_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source.", + "file": "data_sources_service/create_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#create_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "CreateDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.CreateDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_UpdateDataSource_sync", + "title": "Snippet for the update_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source.", + "file": "data_sources_service/update_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#update_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::DataSource", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "UpdateDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.UpdateDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_DeleteDataSource_sync", + "title": "Snippet for the delete_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source.", + "file": "data_sources_service/delete_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#delete_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "DeleteDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.DeleteDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DataSourcesService_FetchDataSource_sync", + "title": "Snippet for the fetch_data_source call in the DataSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source.", + "file": "data_sources_service/fetch_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_data_source", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client#fetch_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client" + }, + "method": { + "short_name": "FetchDataSource", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService.FetchDataSource", + "service": { + "short_name": "DataSourcesService", + "full_name": "google.shopping.merchant.datasources.v1.DataSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_FileUploadsService_GetFileUpload_sync", + "title": "Snippet for the get_file_upload call in the FileUploadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload.", + "file": "file_uploads_service/get_file_upload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_file_upload", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client#get_file_upload", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::DataSources::V1::FileUpload", + "client": { + "short_name": "FileUploadsService::Client", + "full_name": "::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client" + }, + "method": { + "short_name": "GetFileUpload", + "full_name": "google.shopping.merchant.datasources.v1.FileUploadsService.GetFileUpload", + "service": { + "short_name": "FileUploadsService", + "full_name": "google.shopping.merchant.datasources.v1.FileUploadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb new file mode 100644 index 000000000000..ea348a692e78 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1/data_sources_service" + +class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_data_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_path account: "value0", datasource: "value1" + assert_equal "accounts/value0/dataSources/value1", path + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb new file mode 100644 index 000000000000..207d8a39fe5f --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb @@ -0,0 +1,427 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/datasources_pb" +require "google/shopping/merchant/data_sources/v1/data_sources_service/rest" + + +class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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_get_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source(::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_count + end + end + end + + def test_list_data_sources + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_data_sources_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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_sources parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_sources ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new(parent: parent, 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_data_sources({ parent: parent, 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_data_sources(::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new(parent: parent, 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_data_sources_client_stub.call_count + end + end + end + + def test_create_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_source = {} + + create_data_source_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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_create_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_source parent: parent, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_source ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_source({ parent: parent, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_source(::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_source_client_stub.call_count + end + end + end + + def test_update_data_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_source = {} + update_mask = {} + + update_data_source_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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_source data_source: data_source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_source ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_source({ data_source: data_source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_source(::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_count + end + end + end + + def test_delete_data_source + # 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_data_source_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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_delete_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_source(::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_source_client_stub.call_count + end + end + end + + def test_fetch_data_source + # 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" + + fetch_data_source_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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::ServiceStub.stub :transcode_fetch_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_data_source_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::Shopping::Merchant::DataSources::V1::DataSourcesService::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::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb new file mode 100644 index 000000000000..06ecfa6e6242 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb @@ -0,0 +1,446 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/datasources_pb" +require "google/shopping/merchant/datasources/v1/datasources_services_pb" +require "google/shopping/merchant/data_sources/v1/data_sources_service" + +class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::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_get_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.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" + + get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_source(::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.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, get_data_source_client_stub.call_rpc_count + end + end + + def test_list_data_sources + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesResponse.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" + page_size = 42 + page_token = "hello world" + + list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_sources, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_sources({ parent: parent, 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_data_sources parent: parent, 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_data_sources ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new(parent: parent, 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_data_sources({ parent: parent, 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_data_sources(::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new(parent: parent, 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_data_sources_client_stub.call_rpc_count + end + end + + def test_create_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.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" + data_source = {} + + create_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1::DataSource), request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_source({ parent: parent, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_source parent: parent, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_source ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_source({ parent: parent, data_source: data_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_source(::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new(parent: parent, data_source: data_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_source_client_stub.call_rpc_count + end + end + + def test_update_data_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::DataSource.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. + data_source = {} + update_mask = {} + + update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::DataSources::V1::DataSource), request["data_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_source({ data_source: data_source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_source data_source: data_source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_source ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_source({ data_source: data_source, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_source(::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new(data_source: data_source, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_rpc_count + end + end + + def test_delete_data_source + # 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_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_source ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_source({ 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_data_source(::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.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_data_source_client_stub.call_rpc_count + end + end + + def test_fetch_data_source + # 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" + + fetch_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_data_source, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_data_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_data_source ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_data_source(::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.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, fetch_data_source_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::Shopping::Merchant::DataSources::V1::DataSourcesService::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::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb new file mode 100644 index 000000000000..91d3bbeb46cd --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/data_sources/v1/file_uploads_service" + +class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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_file_upload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.file_upload_path account: "value0", datasource: "value1", fileupload: "value2" + assert_equal "accounts/value0/dataSources/value1/fileUploads/value2", path + end + end +end diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb new file mode 100644 index 000000000000..c38da8173039 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/fileuploads_pb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service/rest" + + +class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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_get_file_upload + # Create test objects. + client_result = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_upload_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::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::ServiceStub.stub :transcode_get_file_upload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_file_upload_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_file_upload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_file_upload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_file_upload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_file_upload_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::Shopping::Merchant::DataSources::V1::FileUploadsService::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::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb new file mode 100644 index 000000000000..dbbc3deabf48 --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/datasources/v1/fileuploads_pb" +require "google/shopping/merchant/datasources/v1/fileuploads_services_pb" +require "google/shopping/merchant/data_sources/v1/file_uploads_service" + +class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::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_get_file_upload + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::DataSources::V1::FileUpload.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" + + get_file_upload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_file_upload, name + assert_kind_of ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_file_upload_client_stub do + # Create client + client = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_file_upload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_file_upload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_file_upload ::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_file_upload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_file_upload(::Google::Shopping::Merchant::DataSources::V1::GetFileUploadRequest.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, get_file_upload_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::Shopping::Merchant::DataSources::V1::FileUploadsService::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::Shopping::Merchant::DataSources::V1::FileUploadsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-data_sources-v1/test/helper.rb b/google-shopping-merchant-data_sources-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-data_sources-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 135ff757460d..66ecd304bbf8 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1843,6 +1843,10 @@ "component": "google-shopping-merchant-data_sources", "version_file": "lib/google/shopping/merchant/data_sources/version.rb" }, + "google-shopping-merchant-data_sources-v1": { + "component": "google-shopping-merchant-data_sources-v1", + "version_file": "lib/google/shopping/merchant/data_sources/v1/version.rb" + }, "google-shopping-merchant-data_sources-v1beta": { "component": "google-shopping-merchant-data_sources-v1beta", "version_file": "lib/google/shopping/merchant/data_sources/v1beta/version.rb" From c00e9d6064ac110320f60b29478b3a7dfdbcd4d4 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:26:32 -0700 Subject: [PATCH 355/457] feat: Initial generation of google-shopping-merchant-conversions-v1 (#30777) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 55 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++++ .../README.md | 154 +++ .../Rakefile | 169 ++++ .../gapic_metadata.json | 48 + ...e-shopping-merchant-conversions-v1.gemspec | 28 + ...google-shopping-merchant-conversions-v1.rb | 21 + .../shopping/merchant/conversions/v1.rb | 47 + .../v1/conversion_sources_service.rb | 57 ++ .../v1/conversion_sources_service/client.rb | 956 ++++++++++++++++++ .../conversion_sources_service/credentials.rb | 49 + .../v1/conversion_sources_service/paths.rb | 66 ++ .../v1/conversion_sources_service/rest.rb | 54 + .../conversion_sources_service/rest/client.rb | 888 ++++++++++++++++ .../rest/service_stub.rb | 452 +++++++++ .../conversions/v1/conversionsources_pb.rb | 68 ++ .../v1/conversionsources_services_pb.rb | 62 ++ .../shopping/merchant/conversions/v1/rest.rb | 39 + .../merchant/conversions/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 +++++ .../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 +++ .../conversions/v1/conversionsources.rb | 289 ++++++ .../snippets/Gemfile | 32 + .../create_conversion_source.rb | 47 + .../delete_conversion_source.rb | 47 + .../get_conversion_source.rb | 47 + .../list_conversion_sources.rb | 51 + .../undelete_conversion_source.rb | 47 + .../update_conversion_source.rb | 47 + ...ogle.shopping.merchant.conversions.v1.json | 255 +++++ .../conversion_sources_service_paths_test.rb | 67 ++ .../conversion_sources_service_rest_test.rb | 428 ++++++++ .../v1/conversion_sources_service_test.rb | 448 ++++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 52 files changed, 6878 insertions(+) create mode 100644 google-shopping-merchant-conversions-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-conversions-v1/.gitignore create mode 100644 google-shopping-merchant-conversions-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-conversions-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-conversions-v1/.rubocop.yml create mode 100644 google-shopping-merchant-conversions-v1/.toys.rb create mode 100644 google-shopping-merchant-conversions-v1/.yardopts create mode 100644 google-shopping-merchant-conversions-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-conversions-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-conversions-v1/Gemfile create mode 100644 google-shopping-merchant-conversions-v1/LICENSE.md create mode 100644 google-shopping-merchant-conversions-v1/README.md create mode 100644 google-shopping-merchant-conversions-v1/Rakefile create mode 100644 google-shopping-merchant-conversions-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec create mode 100644 google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb create mode 100644 google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb create mode 100644 google-shopping-merchant-conversions-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb create mode 100644 google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb create mode 100644 google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb create mode 100644 google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb create mode 100644 google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb create mode 100644 google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb create mode 100644 google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json create mode 100644 google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb create mode 100644 google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb create mode 100644 google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb create mode 100644 google-shopping-merchant-conversions-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 80e0c60d0cca..e6a7af276154 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -911,6 +911,8 @@ "google-shopping-merchant-accounts-v1beta+FILLER": "0.0.0", "google-shopping-merchant-conversions": "0.2.1", "google-shopping-merchant-conversions+FILLER": "0.0.0", + "google-shopping-merchant-conversions-v1": "0.0.1", + "google-shopping-merchant-conversions-v1+FILLER": "0.0.0", "google-shopping-merchant-conversions-v1beta": "0.4.0", "google-shopping-merchant-conversions-v1beta+FILLER": "0.0.0", "google-shopping-merchant-data_sources": "0.3.1", diff --git a/google-shopping-merchant-conversions-v1/.OwlBot.yaml b/google-shopping-merchant-conversions-v1/.OwlBot.yaml new file mode 100644 index 000000000000..ce6709577ec2 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/conversions/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-conversions-v1/$1 diff --git a/google-shopping-merchant-conversions-v1/.gitignore b/google-shopping-merchant-conversions-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-conversions-v1/.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/google-shopping-merchant-conversions-v1/.owlbot-manifest.json b/google-shopping-merchant-conversions-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..748e7f6a2b7e --- /dev/null +++ b/google-shopping-merchant-conversions-v1/.owlbot-manifest.json @@ -0,0 +1,55 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-conversions-v1.gemspec", + "lib/google-shopping-merchant-conversions-v1.rb", + "lib/google/shopping/merchant/conversions/v1.rb", + "lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb", + "lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb", + "lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb", + "lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb", + "lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb", + "lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb", + "lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb", + "lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb", + "lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb", + "lib/google/shopping/merchant/conversions/v1/rest.rb", + "lib/google/shopping/merchant/conversions/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb", + "snippets/Gemfile", + "snippets/conversion_sources_service/create_conversion_source.rb", + "snippets/conversion_sources_service/delete_conversion_source.rb", + "snippets/conversion_sources_service/get_conversion_source.rb", + "snippets/conversion_sources_service/list_conversion_sources.rb", + "snippets/conversion_sources_service/undelete_conversion_source.rb", + "snippets/conversion_sources_service/update_conversion_source.rb", + "snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json", + "test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb", + "test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb", + "test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-conversions-v1/.repo-metadata.json b/google-shopping-merchant-conversions-v1/.repo-metadata.json new file mode 100644 index 000000000000..20ec393175c4 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1", + "distribution_name": "google-shopping-merchant-conversions-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-conversions-v1/.rubocop.yml b/google-shopping-merchant-conversions-v1/.rubocop.yml new file mode 100644 index 000000000000..dc26bdfd3a23 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-conversions-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-conversions-v1.rb" diff --git a/google-shopping-merchant-conversions-v1/.toys.rb b/google-shopping-merchant-conversions-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-conversions-v1/.yardopts b/google-shopping-merchant-conversions-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-conversions-v1/AUTHENTICATION.md b/google-shopping-merchant-conversions-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..6489474b1d66 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-conversions-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-conversions-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/conversions/v1" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/conversions/v1" + +::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/conversions/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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/google-shopping-merchant-conversions-v1/CHANGELOG.md b/google-shopping-merchant-conversions-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-conversions-v1/Gemfile b/google-shopping-merchant-conversions-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-conversions-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-conversions-v1/LICENSE.md b/google-shopping-merchant-conversions-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-conversions-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-conversions-v1/README.md b/google-shopping-merchant-conversions-v1/README.md new file mode 100644 index 000000000000..97b49a0c376c --- /dev/null +++ b/google-shopping-merchant-conversions-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-conversions-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/conversions/v1" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new +request = ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new # (request fields as keyword arguments...) +response = client.create_conversion_source request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/conversions/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-conversions-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-conversions`. +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-shopping-merchant-conversions-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-conversions-v1/Rakefile b/google-shopping-merchant-conversions-v1/Rakefile new file mode 100644 index 000000000000..9df3e94cb106 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-conversions-v1 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/shopping/merchant/conversions/v1/conversion_sources_service/credentials" + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-conversions-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-conversions-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-conversions-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-conversions-v1" + header "google-shopping-merchant-conversions-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-conversions-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-conversions-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-conversions-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-conversions-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-conversions-v1/gapic_metadata.json b/google-shopping-merchant-conversions-v1/gapic_metadata.json new file mode 100644 index 000000000000..c91c1680b96f --- /dev/null +++ b/google-shopping-merchant-conversions-v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.conversions.v1", + "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1", + "services": { + "ConversionSourcesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client", + "rpcs": { + "CreateConversionSource": { + "methods": [ + "create_conversion_source" + ] + }, + "UpdateConversionSource": { + "methods": [ + "update_conversion_source" + ] + }, + "DeleteConversionSource": { + "methods": [ + "delete_conversion_source" + ] + }, + "UndeleteConversionSource": { + "methods": [ + "undelete_conversion_source" + ] + }, + "GetConversionSource": { + "methods": [ + "get_conversion_source" + ] + }, + "ListConversionSources": { + "methods": [ + "list_conversion_sources" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec b/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec new file mode 100644 index 000000000000..fdd25ca92568 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/conversions/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-conversions-v1" + gem.version = Google::Shopping::Merchant::Conversions::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb b/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb new file mode 100644 index 000000000000..cd4a31efc2cc --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1" diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb new file mode 100644 index 000000000000..f4bc3897ae40 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversion_sources_service" +require "google/shopping/merchant/conversions/v1/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/conversions/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb new file mode 100644 index 000000000000..c601ef34743d --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/version" + +require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/client" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ## + # Service for managing conversion sources for a merchant account. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb new file mode 100644 index 000000000000..5eb870c0048d --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb @@ -0,0 +1,956 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + ## + # Client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1/conversionsources_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 + + @conversion_sources_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::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_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` 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 merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest + + # 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_conversion_source.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::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :create_conversion_source, 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 + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::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 update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` 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 conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest + + # 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.update_conversion_source.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::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.conversion_source&.name + header_params["conversion_source.name"] = request.conversion_source.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.update_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :update_conversion_source, 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 + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::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_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` 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 name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @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/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest + + # 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_conversion_source.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::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :delete_conversion_source, 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 + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::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 undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` 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 name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest + + # 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.undelete_conversion_source.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::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :undelete_conversion_source, 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 + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::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_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` 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 name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest + + # 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_conversion_source.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::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :get_conversion_source, 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 + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::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_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` 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 merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources 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::Shopping::Merchant::Conversions::V1::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest + + # 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_conversion_sources.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::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, 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 ConversionSourcesService API. + # + # This class represents the configuration for ConversionSourcesService, + # 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 ConversionSourcesService 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_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb new file mode 100644 index 000000000000..8e576f7418f8 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Credentials for the ConversionSourcesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb new file mode 100644 index 000000000000..494efd8f88cc --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Path helper methods for the ConversionSourcesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ConversionSource resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/conversionSources/{conversion_source}` + # + # @param account [String] + # @param conversion_source [String] + # + # @return [::String] + def conversion_source_path account:, conversion_source: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/conversionSources/#{conversion_source}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb new file mode 100644 index 000000000000..cf4f77c3738a --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/version" + +require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ## + # Service for managing conversion sources for a merchant account. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb new file mode 100644 index 000000000000..c6110348c773 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb @@ -0,0 +1,888 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + module Rest + ## + # REST client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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 + + @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::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_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` 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 merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest + + # 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_conversion_source.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::Shopping::Merchant::Conversions::V1::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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.create_conversion_source 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 + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::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 update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` 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 conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest + + # 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.update_conversion_source.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::Shopping::Merchant::Conversions::V1::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.update_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.update_conversion_source 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 + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::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_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` 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 name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @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/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest + + # 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_conversion_source.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::Shopping::Merchant::Conversions::V1::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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.delete_conversion_source 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 + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::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 undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` 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 name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest + + # 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.undelete_conversion_source.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::Shopping::Merchant::Conversions::V1::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.undelete_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.undelete_conversion_source 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 + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::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_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` 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 name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest + + # 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_conversion_source.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::Shopping::Merchant::Conversions::V1::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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.get_conversion_source 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 + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::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_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` 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 merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources 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::Shopping::Merchant::Conversions::V1::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest + + # 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_conversion_sources.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::Shopping::Merchant::Conversions::V1::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_conversion_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", 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 ConversionSourcesService REST API. + # + # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.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 = "merchantapi.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 ConversionSourcesService 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_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb new file mode 100644 index 000000000000..8ceec5b5d088 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + module Rest + ## + # REST service stub for the ConversionSourcesService 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: true, + 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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] + # 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::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def create_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_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_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] + # 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::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def update_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_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: "update_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] + # 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_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_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_conversion_source", + 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 undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] + # 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::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def undelete_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_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: "undelete_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] + # 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::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def get_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_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_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] + # 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::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] + # A result object deserialized from the server's reply + def list_conversion_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_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_conversion_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1/{parent}/conversionSources", + body: "conversion_source", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/conversions/v1/{conversion_source.name}", + body: "conversion_source", + matches: [ + ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/conversions/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undelete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1/{name}:undelete", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] + # 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_conversion_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1/{parent}/conversionSources", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb new file mode 100644 index 000000000000..e512f7599fc8 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/conversions/v1/conversionsources.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n?google/shopping/merchant/conversions/v1/conversionsources.proto\x12\'google.shopping.merchant.conversions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x06\n\x10\x43onversionSource\x12\x62\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12i\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x42.google.shopping.merchant.conversions.v1.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12S\n\x05state\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.conversions.v1.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\ncontroller\x18\x07 \x01(\x0e\x32\x44.google.shopping.merchant.conversions.v1.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xe7\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12m\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32M.google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12l\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.conversions.v1.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xaa\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12Y\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateConversionSourceRequest\x12Y\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8f\x01\n\x1dListConversionSourcesResponse\x12U\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x8e\x0c\n\x18\x43onversionSourcesService\x12\x88\x02\n\x16\x43reateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.CreateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"k\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02J\"5/conversions/v1/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xa0\x02\n\x16UpdateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"\x82\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02\\2G/conversions/v1/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xbe\x01\n\x16\x44\x65leteConversionSource\x12\x46.google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xea\x01\n\x18UndeleteConversionSource\x12H.google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"I\x82\xd3\xe4\x93\x02\x43\">/conversions/v1/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xdb\x01\n\x13GetConversionSource\x12\x43.google.shopping.merchant.conversions.v1.GetConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xee\x01\n\x15ListConversionSources\x12\x45.google.shopping.merchant.conversions.v1.ListConversionSourcesRequest\x1a\x46.google.shopping.merchant.conversions.v1.ListConversionSourcesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd9\x02\n+com.google.shopping.merchant.conversions.v1B\x16\x43onversionSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/conversions/apiv1/conversionspb;conversionspb\xaa\x02\'Google.Shopping.Merchant.Conversions.V1\xca\x02\'Google\\Shopping\\Merchant\\Conversions\\V1\xea\x02+Google::Shopping::Merchant::Conversions::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource").msgclass + ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.State").enummodule + ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.Controller").enummodule + AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings").msgclass + AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.ConversionType").msgclass + AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModel").enummodule + GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GoogleAnalyticsLink").msgclass + MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.MerchantCenterDestination").msgclass + CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.CreateConversionSourceRequest").msgclass + UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest").msgclass + DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest").msgclass + UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest").msgclass + GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GetConversionSourceRequest").msgclass + ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesRequest").msgclass + ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb new file mode 100644 index 000000000000..45549ad85a8a --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/conversions/v1/conversionsources.proto for package 'Google.Shopping.Merchant.Conversions.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversionsources_pb' + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Service for managing conversion sources for a merchant account. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.conversions.v1.ConversionSourcesService' + + # Creates a new conversion source. + rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Google::Protobuf::Empty + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Fetches a conversion source. + rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Retrieves the list of conversion sources the caller has access to. + rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb new file mode 100644 index 000000000000..61a880c91d9a --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversion_sources_service/rest" +require "google/shopping/merchant/conversions/v1/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/conversions/v1/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb new file mode 100644 index 000000000000..4857d0759409 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Conversions + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/proto_docs/README.md b/google-shopping-merchant-conversions-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb new file mode 100644 index 000000000000..1649a61e00ab --- /dev/null +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Conversions + module V1 + # Represents a conversion source owned by a Merchant account. A merchant + # account can have up to 200 conversion sources. + # @!attribute [rw] google_analytics_link + # @return [::Google::Shopping::Merchant::Conversions::V1::GoogleAnalyticsLink] + # Immutable. Conversion Source of type "Link to Google Analytics Property". + # + # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merchant_center_destination + # @return [::Google::Shopping::Merchant::Conversions::V1::MerchantCenterDestination] + # Conversion Source of type "Merchant Center Tag Destination". + # + # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Generated by the Content API upon creation of a + # new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before + # the colon represent the type of conversion source. Content after the colon + # represents the ID of the conversion source within that type. The ID of two + # different conversion sources might be the same across different types. The + # following type prefixes are supported: + # * `galk`: For GoogleAnalyticsLink sources. + # * `mcdn`: For MerchantCenterDestination sources. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::State] + # Output only. Current state of this conversion source. Can't be edited + # through the API. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when an archived conversion source becomes + # permanently deleted and is no longer available to undelete. + # @!attribute [r] controller + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::Controller] + # Output only. Controller of the conversion source. + class ConversionSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the state of a conversion source. + module State + # Conversion source has unspecified state. + STATE_UNSPECIFIED = 0 + + # Conversion source is fully functional. + ACTIVE = 1 + + # Conversion source has been archived in the last 30 days and is currently + # not functional. Can be restored using the undelete method. + ARCHIVED = 2 + + # Conversion source creation has started but not fully finished yet. + PENDING = 3 + end + + # Entity controlling the conversion source. + module Controller + # Default value. This value is unused. + CONTROLLER_UNSPECIFIED = 0 + + # Controlled by the Merchant who owns the Conversion Source. + MERCHANT = 1 + + # Controlled by the Youtube Affiliates program. + YOUTUBE_AFFILIATES = 2 + end + end + + # Represents attribution settings for conversion sources receiving + # pre-attribution data. + # @!attribute [rw] attribution_lookback_window_days + # @return [::Integer] + # Required. Lookback window (in days) used for attribution in this source. + # Supported values are `7`, `30` & `40`. + # @!attribute [rw] attribution_model + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::AttributionModel] + # Required. Attribution model. + # @!attribute [rw] conversion_type + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::ConversionType>] + # Immutable. Unordered list. List of different conversion types a conversion + # event can be classified as. A standard "purchase" type will be + # automatically created if this list is empty at creation time. + class AttributionSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message representing the type of a conversion event. + # @!attribute [r] name + # @return [::String] + # Output only. Conversion event name, as it'll be reported by the client. + # @!attribute [r] report + # @return [::Boolean] + # Output only. Option indicating if the type should be included in Merchant + # Center reporting. + class ConversionType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The attribution model used for this source. We support the same set of + # [models offered by Google Analytics + # 4](https://support.google.com/analytics/answer/10596866). + module AttributionModel + # Unspecified model. + ATTRIBUTION_MODEL_UNSPECIFIED = 0 + + # Cross-channel Last Click model. + CROSS_CHANNEL_LAST_CLICK = 1 + + # Ads-preferred Last Click model. + ADS_PREFERRED_LAST_CLICK = 2 + + # Cross-channel Data Driven model. + CROSS_CHANNEL_DATA_DRIVEN = 5 + + # Cross-channel First Click model. + CROSS_CHANNEL_FIRST_CLICK = 6 + + # Cross-channel Linear model. + CROSS_CHANNEL_LINEAR = 7 + + # Cross-channel Position Based model. + CROSS_CHANNEL_POSITION_BASED = 8 + + # Cross-channel Time Decay model. + CROSS_CHANNEL_TIME_DECAY = 9 + end + end + + # "Google Analytics Link" sources can be used to get conversion data from an + # existing Google Analytics property into the linked Merchant Center account. + # @!attribute [rw] property_id + # @return [::Integer] + # Required. Immutable. ID of the Google Analytics property the merchant is + # linked to. + # @!attribute [r] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] + # Output only. Attribution settings for the linked Google Analytics property. + # @!attribute [r] property + # @return [::String] + # Output only. Name of the Google Analytics property the merchant is linked + # to. + class GoogleAnalyticsLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # "Merchant Center Destination" sources can be used to send conversion events + # from an online store using a Google tag directly to a Merchant Center account + # where the source is created. + # @!attribute [r] destination + # @return [::String] + # Output only. Merchant Center Destination ID. + # @!attribute [rw] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] + # Required. Attribution settings used for the Merchant Center Destination. + # @!attribute [rw] display_name + # @return [::String] + # Required. Merchant-specified display name for the destination. This is the + # name that identifies the conversion source within the Merchant Center UI. + # The maximum length is 64 characters. + # @!attribute [rw] currency_code + # @return [::String] + # Required. Three-letter currency code (ISO 4217). The currency code defines + # in which currency the conversions sent to this destination will be reported + # in Merchant Center. + class MerchantCenterDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateConversionSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + class CreateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateConversionSource method. + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # Required. The new version of the conversion source data. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + class UpdateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class DeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UndeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class UndeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class GetConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListConversionSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token. + # @!attribute [rw] show_deleted + # @return [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + class ListConversionSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListConversionSources method. + # @!attribute [rw] conversion_sources + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # List of conversion sources. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to be used to fetch the next results page. + class ListConversionSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-conversions-v1/snippets/Gemfile b/google-shopping-merchant-conversions-v1/snippets/Gemfile new file mode 100644 index 000000000000..fba3696ae69b --- /dev/null +++ b/google-shopping-merchant-conversions-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-conversions-v1", path: "../" +else + gem "google-shopping-merchant-conversions-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb new file mode 100644 index 000000000000..b2fa0d3d4065 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the create_conversion_source call in the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source. +# +def create_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + + # Call the create_conversion_source method. + result = client.create_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb new file mode 100644 index 000000000000..fc019cac403d --- /dev/null +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the delete_conversion_source call in the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source. +# +def delete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + + # Call the delete_conversion_source method. + result = client.delete_conversion_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb new file mode 100644 index 000000000000..362205bbc193 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the get_conversion_source call in the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source. +# +def get_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + + # Call the get_conversion_source method. + result = client.get_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb new file mode 100644 index 000000000000..bbf5190715dd --- /dev/null +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the list_conversion_sources call in the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources. +# +def list_conversion_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + + # Call the list_conversion_sources method. + result = client.list_conversion_sources 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::Shopping::Merchant::Conversions::V1::ConversionSource. + p item + end +end +# [END merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb new file mode 100644 index 000000000000..9141cef101f7 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the undelete_conversion_source call in the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source. +# +def undelete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + + # Call the undelete_conversion_source method. + result = client.undelete_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb new file mode 100644 index 000000000000..591509a31096 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the update_conversion_source call in the ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source. +# +def update_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + + # Call the update_conversion_source method. + result = client.update_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json b/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json new file mode 100644 index 000000000000..141ac1a9a2fb --- /dev/null +++ b/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-conversions-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.conversions.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync", + "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source.", + "file": "conversion_sources_service/create_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "CreateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.CreateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync", + "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source.", + "file": "conversion_sources_service/update_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UpdateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UpdateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync", + "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source.", + "file": "conversion_sources_service/delete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "DeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.DeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync", + "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source.", + "file": "conversion_sources_service/undelete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "undelete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UndeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UndeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync", + "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source.", + "file": "conversion_sources_service/get_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "GetConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.GetConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync", + "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources.", + "file": "conversion_sources_service/list_conversion_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_conversion_sources", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "ListConversionSources", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.ListConversionSources", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb new file mode 100644 index 000000000000..36ff7b84e6cb --- /dev/null +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_conversion_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversion_source_path account: "value0", conversion_source: "value1" + assert_equal "accounts/value0/conversionSources/value1", path + end + end +end diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb new file mode 100644 index 000000000000..3b4e7504ef04 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb @@ -0,0 +1,428 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_count + end + end + end + + def test_update_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_conversion_source_client_stub.call_count + end + end + end + + def test_delete_conversion_source + # 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_conversion_source_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_conversion_source_client_stub.call_count + end + end + end + + def test_undelete_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.undelete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.undelete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.undelete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_count + end + end + end + + def test_get_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_count + end + end + end + + def test_list_conversion_sources + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_conversion_sources_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb new file mode 100644 index 000000000000..25af1d228f89 --- /dev/null +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb @@ -0,0 +1,448 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversionsources_services_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_rpc_count + end + end + + def test_update_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_conversion_source_client_stub.call_rpc_count + end + end + + def test_delete_conversion_source + # 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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_conversion_source({ 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_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.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_conversion_source_client_stub.call_rpc_count + end + end + + def test_undelete_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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" + + undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undelete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.undelete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.undelete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.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, undelete_conversion_source_client_stub.call_rpc_count + end + end + + def test_get_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.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" + + get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.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, get_conversion_source_client_stub.call_rpc_count + end + end + + def test_list_conversion_sources + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.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" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_conversion_sources, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["show_deleted"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) 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_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted 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_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) 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_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, 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_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), 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_conversion_sources_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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-conversions-v1/test/helper.rb b/google-shopping-merchant-conversions-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-conversions-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 66ecd304bbf8..55595734e54f 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1835,6 +1835,10 @@ "component": "google-shopping-merchant-conversions", "version_file": "lib/google/shopping/merchant/conversions/version.rb" }, + "google-shopping-merchant-conversions-v1": { + "component": "google-shopping-merchant-conversions-v1", + "version_file": "lib/google/shopping/merchant/conversions/v1/version.rb" + }, "google-shopping-merchant-conversions-v1beta": { "component": "google-shopping-merchant-conversions-v1beta", "version_file": "lib/google/shopping/merchant/conversions/v1beta/version.rb" From 5e469087fc95e24ce5f6f7e3542e504fb827cb1d Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:27:25 -0700 Subject: [PATCH 356/457] feat: Initial generation of google-shopping-merchant-notifications-v1 (#30776) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 54 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++++ .../README.md | 154 +++ .../Rakefile | 169 +++ .../gapic_metadata.json | 48 + ...shopping-merchant-notifications-v1.gemspec | 28 + ...ogle-shopping-merchant-notifications-v1.rb | 21 + .../shopping/merchant/notifications/v1.rb | 47 + .../v1/notifications_api_service.rb | 57 + .../v1/notifications_api_service/client.rb | 971 ++++++++++++++++++ .../notifications_api_service/credentials.rb | 49 + .../v1/notifications_api_service/paths.rb | 83 ++ .../v1/notifications_api_service/rest.rb | 54 + .../notifications_api_service/rest/client.rb | 903 ++++++++++++++++ .../rest/service_stub.rb | 451 ++++++++ .../notifications/v1/notificationsapi_pb.rb | 61 ++ .../v1/notificationsapi_services_pb.rb | 81 ++ .../merchant/notifications/v1/rest.rb | 39 + .../merchant/notifications/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 ++++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 +++++ .../notifications/v1/notificationsapi.rb | 184 ++++ .../snippets/Gemfile | 32 + .../create_notification_subscription.rb | 47 + .../delete_notification_subscription.rb | 47 + .../get_notification_subscription.rb | 47 + ...otification_subscription_health_metrics.rb | 47 + .../list_notification_subscriptions.rb | 51 + .../update_notification_subscription.rb | 47 + ...le.shopping.merchant.notifications.v1.json | 255 +++++ .../notifications_api_service_paths_test.rb | 79 ++ .../v1/notifications_api_service_rest_test.rb | 427 ++++++++ .../v1/notifications_api_service_test.rb | 446 ++++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 51 files changed, 6712 insertions(+) create mode 100644 google-shopping-merchant-notifications-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-notifications-v1/.gitignore create mode 100644 google-shopping-merchant-notifications-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-notifications-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-notifications-v1/.rubocop.yml create mode 100644 google-shopping-merchant-notifications-v1/.toys.rb create mode 100644 google-shopping-merchant-notifications-v1/.yardopts create mode 100644 google-shopping-merchant-notifications-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-notifications-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-notifications-v1/Gemfile create mode 100644 google-shopping-merchant-notifications-v1/LICENSE.md create mode 100644 google-shopping-merchant-notifications-v1/README.md create mode 100644 google-shopping-merchant-notifications-v1/Rakefile create mode 100644 google-shopping-merchant-notifications-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec create mode 100644 google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb create mode 100644 google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb create mode 100644 google-shopping-merchant-notifications-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb create mode 100644 google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb create mode 100644 google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb create mode 100644 google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb create mode 100644 google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb create mode 100644 google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb create mode 100644 google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json create mode 100644 google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb create mode 100644 google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb create mode 100644 google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb create mode 100644 google-shopping-merchant-notifications-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e6a7af276154..54c9fccaec06 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -937,6 +937,8 @@ "google-shopping-merchant-lfp-v1beta+FILLER": "0.0.0", "google-shopping-merchant-notifications": "0.2.1", "google-shopping-merchant-notifications+FILLER": "0.0.0", + "google-shopping-merchant-notifications-v1": "0.0.1", + "google-shopping-merchant-notifications-v1+FILLER": "0.0.0", "google-shopping-merchant-notifications-v1beta": "0.4.0", "google-shopping-merchant-notifications-v1beta+FILLER": "0.0.0", "google-shopping-merchant-order_tracking": "0.1.0", diff --git a/google-shopping-merchant-notifications-v1/.OwlBot.yaml b/google-shopping-merchant-notifications-v1/.OwlBot.yaml new file mode 100644 index 000000000000..95bdb81c7423 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/notifications/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-notifications-v1/$1 diff --git a/google-shopping-merchant-notifications-v1/.gitignore b/google-shopping-merchant-notifications-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-notifications-v1/.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/google-shopping-merchant-notifications-v1/.owlbot-manifest.json b/google-shopping-merchant-notifications-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..b04e17b7b93f --- /dev/null +++ b/google-shopping-merchant-notifications-v1/.owlbot-manifest.json @@ -0,0 +1,54 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-notifications-v1.gemspec", + "lib/google-shopping-merchant-notifications-v1.rb", + "lib/google/shopping/merchant/notifications/v1.rb", + "lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb", + "lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb", + "lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb", + "lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb", + "lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb", + "lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb", + "lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb", + "lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb", + "lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb", + "lib/google/shopping/merchant/notifications/v1/rest.rb", + "lib/google/shopping/merchant/notifications/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", + "proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb", + "snippets/Gemfile", + "snippets/notifications_api_service/create_notification_subscription.rb", + "snippets/notifications_api_service/delete_notification_subscription.rb", + "snippets/notifications_api_service/get_notification_subscription.rb", + "snippets/notifications_api_service/get_notification_subscription_health_metrics.rb", + "snippets/notifications_api_service/list_notification_subscriptions.rb", + "snippets/notifications_api_service/update_notification_subscription.rb", + "snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json", + "test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb", + "test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb", + "test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-notifications-v1/.repo-metadata.json b/google-shopping-merchant-notifications-v1/.repo-metadata.json new file mode 100644 index 000000000000..72fe215300e2 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications-v1", + "distribution_name": "google-shopping-merchant-notifications-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-notifications-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-notifications-v1/.rubocop.yml b/google-shopping-merchant-notifications-v1/.rubocop.yml new file mode 100644 index 000000000000..c5974b408acf --- /dev/null +++ b/google-shopping-merchant-notifications-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-notifications-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-notifications-v1.rb" diff --git a/google-shopping-merchant-notifications-v1/.toys.rb b/google-shopping-merchant-notifications-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-notifications-v1/.yardopts b/google-shopping-merchant-notifications-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-notifications-v1/AUTHENTICATION.md b/google-shopping-merchant-notifications-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..38ad4c1fb992 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-notifications-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-notifications-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/notifications/v1" + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/notifications/v1" + +::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/notifications/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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/google-shopping-merchant-notifications-v1/CHANGELOG.md b/google-shopping-merchant-notifications-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-notifications-v1/Gemfile b/google-shopping-merchant-notifications-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-notifications-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-notifications-v1/LICENSE.md b/google-shopping-merchant-notifications-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-notifications-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-notifications-v1/README.md b/google-shopping-merchant-notifications-v1/README.md new file mode 100644 index 000000000000..fb15c9466375 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-notifications](https://rubygems.org/gems/google-shopping-merchant-notifications). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-notifications-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/notifications/v1" + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new +request = ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new # (request fields as keyword arguments...) +response = client.get_notification_subscription request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/notifications/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-notifications-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-notifications`. +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-shopping-merchant-notifications-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-notifications-v1/Rakefile b/google-shopping-merchant-notifications-v1/Rakefile new file mode 100644 index 000000000000..aa33287bf818 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-notifications-v1 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/shopping/merchant/notifications/v1/notifications_api_service/credentials" + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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-shopping-merchant-notifications-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-notifications-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-notifications-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-notifications-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-notifications-v1" + header "google-shopping-merchant-notifications-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-notifications-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-notifications-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-notifications-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-notifications-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-notifications-v1/gapic_metadata.json b/google-shopping-merchant-notifications-v1/gapic_metadata.json new file mode 100644 index 000000000000..281f5890c6ac --- /dev/null +++ b/google-shopping-merchant-notifications-v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.notifications.v1", + "libraryPackage": "::Google::Shopping::Merchant::Notifications::V1", + "services": { + "NotificationsApiService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client", + "rpcs": { + "GetNotificationSubscription": { + "methods": [ + "get_notification_subscription" + ] + }, + "CreateNotificationSubscription": { + "methods": [ + "create_notification_subscription" + ] + }, + "UpdateNotificationSubscription": { + "methods": [ + "update_notification_subscription" + ] + }, + "DeleteNotificationSubscription": { + "methods": [ + "delete_notification_subscription" + ] + }, + "ListNotificationSubscriptions": { + "methods": [ + "list_notification_subscriptions" + ] + }, + "GetNotificationSubscriptionHealthMetrics": { + "methods": [ + "get_notification_subscription_health_metrics" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec b/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec new file mode 100644 index 000000000000..375e1eaae98a --- /dev/null +++ b/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/notifications/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-notifications-v1" + gem.version = Google::Shopping::Merchant::Notifications::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-notifications-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb b/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb new file mode 100644 index 000000000000..81b753c30fbb --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google-shopping-merchant-notifications-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1" diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb new file mode 100644 index 000000000000..1ebac6ba79ac --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notifications_api_service" +require "google/shopping/merchant/notifications/v1/version" + +module Google + module Shopping + module Merchant + module Notifications + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/notifications/v1" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/notifications/v1" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/notifications/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb new file mode 100644 index 000000000000..0155be9c63c8 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/version" + +require "google/shopping/merchant/notifications/v1/notifications_api_service/credentials" +require "google/shopping/merchant/notifications/v1/notifications_api_service/paths" +require "google/shopping/merchant/notifications/v1/notifications_api_service/client" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + ## + # Service to manage notification subscriptions for merchants + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/notifications/v1/notifications_api_service" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + module NotificationsApiService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "notifications_api_service", "helpers.rb" +require "google/shopping/merchant/notifications/v1/notifications_api_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb new file mode 100644 index 000000000000..0ec78d8d24bc --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb @@ -0,0 +1,971 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notificationsapi_pb" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + ## + # Client for the NotificationsApiService service. + # + # Service to manage notification subscriptions for merchants + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :notifications_api_service_stub + + ## + # Configure the NotificationsApiService Client class. + # + # See {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NotificationsApiService clients + # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 + @notifications_api_service_stub.universe_domain + end + + ## + # Create a new NotificationsApiService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NotificationsApiService 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/shopping/merchant/notifications/v1/notificationsapi_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 + + @notifications_api_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 + ) + + @notifications_api_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 + @notifications_api_service_stub.logger + end + + # Service calls + + ## + # Gets notification subscriptions for an account. + # + # @overload get_notification_subscription(request, options = nil) + # Pass arguments to `get_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::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_notification_subscription(name: nil) + # Pass arguments to `get_notification_subscription` 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 `name` of the notification subscription. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new + # + # # Call the get_notification_subscription method. + # result = client.get_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def get_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest + + # 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_notification_subscription.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::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :get_notification_subscription, 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 + + ## + # Creates a notification subscription for a business. + # For standalone or subaccounts accounts, the business can create a + # subscription for self. For MCAs, the business can create a + # subscription for all managed accounts or for a specific subaccount. + # + # We will allow the following types of notification subscriptions to exist + # together (per business as a subscriber per event type): + # + # 1. Subscription for all managed accounts + subscription for self. + # + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self. + # + # we will not allow (per business as a subscriber per event type): + # + # 1. Multiple self subscriptions. + # + # 2. Multiple "all managed accounts" subscriptions. + # + # 3. "All managed accounts" subscription and partial subscriptions at the + # same time. + # + # 4. Multiple partial subscriptions for the same target account. + # + # @overload create_notification_subscription(request, options = nil) + # Pass arguments to `create_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::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_notification_subscription(parent: nil, notification_subscription: nil) + # Pass arguments to `create_notification_subscription` 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 merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] + # Required. The notification subscription to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new + # + # # Call the create_notification_subscription method. + # result = client.create_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def create_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest + + # 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_notification_subscription.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::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :create_notification_subscription, 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 + + ## + # Updates an existing notification subscription for a merchant. + # + # @overload update_notification_subscription(request, options = nil) + # Pass arguments to `update_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::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 update_notification_subscription(notification_subscription: nil, update_mask: nil) + # Pass arguments to `update_notification_subscription` 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 notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] + # Required. The new version of the notification subscription that should be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new + # + # # Call the update_notification_subscription method. + # result = client.update_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def update_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest + + # 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.update_notification_subscription.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::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.notification_subscription&.name + header_params["notification_subscription.name"] = request.notification_subscription.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.update_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :update_notification_subscription, 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 + + ## + # Deletes a notification subscription for a merchant. + # + # @overload delete_notification_subscription(request, options = nil) + # Pass arguments to `delete_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::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_notification_subscription(name: nil) + # Pass arguments to `delete_notification_subscription` 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 name of the notification subscription to be deleted. + # + # @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/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new + # + # # Call the delete_notification_subscription method. + # result = client.delete_notification_subscription request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest + + # 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_notification_subscription.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::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :delete_notification_subscription, 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 all the notification subscriptions for a merchant. + # + # @overload list_notification_subscriptions(request, options = nil) + # Pass arguments to `list_notification_subscriptions` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::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_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_notification_subscriptions` 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 merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @param page_token [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new + # + # # Call the list_notification_subscriptions method. + # result = client.list_notification_subscriptions 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::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p item + # end + # + def list_notification_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest + + # 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_notification_subscriptions.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::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :list_notification_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, 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 + + ## + # Retrieves notification subscription health metrics for a merchant. + # We recommend calling this periodically (hourly or daily) to monitor health + # of your callback endpoint. + # + # @overload get_notification_subscription_health_metrics(request, options = nil) + # Pass arguments to `get_notification_subscription_health_metrics` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::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_notification_subscription_health_metrics(name: nil) + # Pass arguments to `get_notification_subscription_health_metrics` 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 `name` of the notification subscription for which metrics are + # retrieved. + # Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new + # + # # Call the get_notification_subscription_health_metrics method. + # result = client.get_notification_subscription_health_metrics request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. + # p result + # + def get_notification_subscription_health_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest + + # 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_notification_subscription_health_metrics.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::Shopping::Merchant::Notifications::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription_health_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_subscription_health_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :get_notification_subscription_health_metrics, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the NotificationsApiService API. + # + # This class represents the configuration for NotificationsApiService, + # 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 + # # get_notification_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 NotificationsApiService 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 `get_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription + ## + # RPC-specific configuration for `create_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_subscription + ## + # RPC-specific configuration for `update_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_subscription + ## + # RPC-specific configuration for `delete_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_subscription + ## + # RPC-specific configuration for `list_notification_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_subscriptions + ## + # RPC-specific configuration for `get_notification_subscription_health_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription_health_metrics + + # @private + def initialize parent_rpcs = nil + get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription + @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config + create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription + @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config + update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription + @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config + delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription + @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config + list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions + @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config + get_notification_subscription_health_metrics_config = parent_rpcs.get_notification_subscription_health_metrics if parent_rpcs.respond_to? :get_notification_subscription_health_metrics + @get_notification_subscription_health_metrics = ::Gapic::Config::Method.new get_notification_subscription_health_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb new file mode 100644 index 000000000000..22aa8917191d --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + # Credentials for the NotificationsApiService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb new file mode 100644 index 000000000000..9573e6e3f582 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + # Path helper methods for the NotificationsApiService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified NotificationSubscription resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # + # @param account [String] + # @param notification_subscription [String] + # + # @return [::String] + def notification_subscription_path account:, notification_subscription: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" + end + + ## + # Create a fully-qualified NotificationSubscriptionHealthMetrics resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # + # @param account [String] + # @param notification_subscription [String] + # + # @return [::String] + def notification_subscription_health_metrics_path account:, notification_subscription: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb new file mode 100644 index 000000000000..dea920b9f9ec --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/version" + +require "google/shopping/merchant/notifications/v1/notifications_api_service/credentials" +require "google/shopping/merchant/notifications/v1/notifications_api_service/paths" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/client" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + ## + # Service to manage notification subscriptions for merchants + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + module NotificationsApiService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb new file mode 100644 index 000000000000..744a95f41e4b --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb @@ -0,0 +1,903 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + module Rest + ## + # REST client for the NotificationsApiService service. + # + # Service to manage notification subscriptions for merchants + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :notifications_api_service_stub + + ## + # Configure the NotificationsApiService Client class. + # + # See {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NotificationsApiService clients + # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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", "Shopping", "Merchant", "Notifications", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 + @notifications_api_service_stub.universe_domain + end + + ## + # Create a new NotificationsApiService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NotificationsApiService 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 + + @notifications_api_service_stub = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @notifications_api_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 + @notifications_api_service_stub.logger + end + + # Service calls + + ## + # Gets notification subscriptions for an account. + # + # @overload get_notification_subscription(request, options = nil) + # Pass arguments to `get_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::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_notification_subscription(name: nil) + # Pass arguments to `get_notification_subscription` 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 `name` of the notification subscription. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new + # + # # Call the get_notification_subscription method. + # result = client.get_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def get_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest + + # 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_notification_subscription.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::Shopping::Merchant::Notifications::V1::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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.get_notification_subscription 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 + + ## + # Creates a notification subscription for a business. + # For standalone or subaccounts accounts, the business can create a + # subscription for self. For MCAs, the business can create a + # subscription for all managed accounts or for a specific subaccount. + # + # We will allow the following types of notification subscriptions to exist + # together (per business as a subscriber per event type): + # + # 1. Subscription for all managed accounts + subscription for self. + # + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self. + # + # we will not allow (per business as a subscriber per event type): + # + # 1. Multiple self subscriptions. + # + # 2. Multiple "all managed accounts" subscriptions. + # + # 3. "All managed accounts" subscription and partial subscriptions at the + # same time. + # + # 4. Multiple partial subscriptions for the same target account. + # + # @overload create_notification_subscription(request, options = nil) + # Pass arguments to `create_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::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_notification_subscription(parent: nil, notification_subscription: nil) + # Pass arguments to `create_notification_subscription` 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 merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] + # Required. The notification subscription to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new + # + # # Call the create_notification_subscription method. + # result = client.create_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def create_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest + + # 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_notification_subscription.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::Shopping::Merchant::Notifications::V1::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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.create_notification_subscription 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 + + ## + # Updates an existing notification subscription for a merchant. + # + # @overload update_notification_subscription(request, options = nil) + # Pass arguments to `update_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::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 update_notification_subscription(notification_subscription: nil, update_mask: nil) + # Pass arguments to `update_notification_subscription` 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 notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash] + # Required. The new version of the notification subscription that should be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new + # + # # Call the update_notification_subscription method. + # result = client.update_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p result + # + def update_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest + + # 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.update_notification_subscription.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::Shopping::Merchant::Notifications::V1::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.update_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.update_notification_subscription 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 + + ## + # Deletes a notification subscription for a merchant. + # + # @overload delete_notification_subscription(request, options = nil) + # Pass arguments to `delete_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::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_notification_subscription(name: nil) + # Pass arguments to `delete_notification_subscription` 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 name of the notification subscription to be deleted. + # @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/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new + # + # # Call the delete_notification_subscription method. + # result = client.delete_notification_subscription request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest + + # 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_notification_subscription.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::Shopping::Merchant::Notifications::V1::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_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.delete_notification_subscription 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 all the notification subscriptions for a merchant. + # + # @overload list_notification_subscriptions(request, options = nil) + # Pass arguments to `list_notification_subscriptions` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::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_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_notification_subscriptions` 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 merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @param page_token [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new + # + # # Call the list_notification_subscriptions method. + # result = client.list_notification_subscriptions 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::Shopping::Merchant::Notifications::V1::NotificationSubscription. + # p item + # end + # + def list_notification_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest + + # 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_notification_subscriptions.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::Shopping::Merchant::Notifications::V1::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_notification_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.list_notification_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, "notification_subscriptions", 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 + + ## + # Retrieves notification subscription health metrics for a merchant. + # We recommend calling this periodically (hourly or daily) to monitor health + # of your callback endpoint. + # + # @overload get_notification_subscription_health_metrics(request, options = nil) + # Pass arguments to `get_notification_subscription_health_metrics` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::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_notification_subscription_health_metrics(name: nil) + # Pass arguments to `get_notification_subscription_health_metrics` 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 `name` of the notification subscription for which metrics are + # retrieved. + # Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new + # + # # Call the get_notification_subscription_health_metrics method. + # result = client.get_notification_subscription_health_metrics request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. + # p result + # + def get_notification_subscription_health_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest + + # 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_notification_subscription_health_metrics.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::Shopping::Merchant::Notifications::V1::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_notification_subscription_health_metrics.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_subscription_health_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.get_notification_subscription_health_metrics 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 + + ## + # Configuration class for the NotificationsApiService REST API. + # + # This class represents the configuration for NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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 + # # get_notification_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.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 = "merchantapi.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 NotificationsApiService 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 `get_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription + ## + # RPC-specific configuration for `create_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_subscription + ## + # RPC-specific configuration for `update_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_subscription + ## + # RPC-specific configuration for `delete_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_subscription + ## + # RPC-specific configuration for `list_notification_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_subscriptions + ## + # RPC-specific configuration for `get_notification_subscription_health_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription_health_metrics + + # @private + def initialize parent_rpcs = nil + get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription + @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config + create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription + @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config + update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription + @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config + delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription + @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config + list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions + @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config + get_notification_subscription_health_metrics_config = parent_rpcs.get_notification_subscription_health_metrics if parent_rpcs.respond_to? :get_notification_subscription_health_metrics + @get_notification_subscription_health_metrics = ::Gapic::Config::Method.new get_notification_subscription_health_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb new file mode 100644 index 000000000000..04675d5001f2 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb @@ -0,0 +1,451 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notificationsapi_pb" + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + module Rest + ## + # REST service stub for the NotificationsApiService 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: true, + 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 get_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest] + # 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::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # A result object deserialized from the server's reply + def get_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_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_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest] + # 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::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # A result object deserialized from the server's reply + def create_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_subscription_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_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest] + # 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::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # A result object deserialized from the server's reply + def update_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_subscription_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: "update_notification_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest] + # 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_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_subscription_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_notification_subscription", + 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 list_notification_subscriptions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest] + # 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::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_notification_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_subscriptions_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_notification_subscriptions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.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_notification_subscription_health_metrics REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest] + # 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::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics] + # A result object deserialized from the server's reply + def get_notification_subscription_health_metrics request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_health_metrics_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_notification_subscription_health_metrics", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.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 get_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest] + # 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_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest] + # 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_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/notifications/v1/{parent}/notificationsubscriptions", + body: "notification_subscription", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/notifications/v1/{notification_subscription.name}", + body: "notification_subscription", + matches: [ + ["notification_subscription.name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest] + # 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_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/notifications/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_subscriptions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest] + # 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_notification_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1/{parent}/notificationsubscriptions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_subscription_health_metrics REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest] + # 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_notification_subscription_health_metrics_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1/{name}:getHealth", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb new file mode 100644 index 000000000000..84b1e8b6d357 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/notifications/v1/notificationsapi.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n@google/shopping/merchant/notifications/v1/notificationsapi.proto\x12)google.shopping.merchant.notifications.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"o\n\"GetNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\xe1\x01\n%CreateNotificationSubscriptionRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12k\n\x19notification_subscription\x18\x02 \x01(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscriptionB\x03\xe0\x41\x02\"\xc5\x01\n%UpdateNotificationSubscriptionRequest\x12k\n\x19notification_subscription\x18\x01 \x01(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscriptionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"r\n%DeleteNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\x9a\x01\n$ListNotificationSubscriptionsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa9\x01\n%ListNotificationSubscriptionsResponse\x12g\n\x1anotification_subscriptions\x18\x01 \x03(\x0b\x32\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe6\x03\n\x18NotificationSubscription\x12\x1e\n\x14\x61ll_managed_accounts\x18\x03 \x01(\x08H\x00\x12\x18\n\x0etarget_account\x18\x04 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12s\n\x10registered_event\x18\x02 \x01(\x0e\x32Y.google.shopping.merchant.notifications.v1.NotificationSubscription.NotificationEventType\x12\x15\n\rcall_back_uri\x18\x05 \x01(\t\"[\n\x15NotificationEventType\x12\'\n#NOTIFICATION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15PRODUCT_STATUS_CHANGE\x10\x01:\x82\x01\xea\x41\x7f\n3merchantapi.googleapis.com/NotificationSubscription\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}B\x0f\n\rinterested_in\"\x89\x01\n/GetNotificationSubscriptionHealthMetricsRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@merchantapi.googleapis.com/NotificationSubscriptionHealthMetrics\"\xcd\x02\n%NotificationSubscriptionHealthMetrics\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12#\n\x1b\x61\x63knowledged_messages_count\x18\x02 \x01(\x03\x12\"\n\x1aundelivered_messages_count\x18\x03 \x01(\x03\x12\x32\n*oldest_unacknowledged_message_waiting_time\x18\x04 \x01(\x03:\x90\x01\xea\x41\x8c\x01\n@merchantapi.googleapis.com/NotificationSubscriptionHealthMetrics\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}2\xb2\x0e\n\x17NotificationsApiService\x12\x81\x02\n\x1bGetNotificationSubscription\x12M.google.shopping.merchant.notifications.v1.GetNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/notifications/v1/{name=accounts/*/notificationsubscriptions/*}\x12\xbf\x02\n\x1e\x43reateNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.CreateNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"\x85\x01\xda\x41 parent,notification_subscription\x82\xd3\xe4\x93\x02\\\"?/notifications/v1/{parent=accounts/*}/notificationsubscriptions:\x19notification_subscription\x12\xde\x02\n\x1eUpdateNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.UpdateNotificationSubscriptionRequest\x1a\x43.google.shopping.merchant.notifications.v1.NotificationSubscription\"\xa4\x01\xda\x41%notification_subscription,update_mask\x82\xd3\xe4\x93\x02v2Y/notifications/v1/{notification_subscription.name=accounts/*/notificationsubscriptions/*}:\x19notification_subscription\x12\xda\x01\n\x1e\x44\x65leteNotificationSubscription\x12P.google.shopping.merchant.notifications.v1.DeleteNotificationSubscriptionRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/notifications/v1/{name=accounts/*/notificationsubscriptions/*}\x12\x94\x02\n\x1dListNotificationSubscriptions\x12O.google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsRequest\x1aP.google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/notifications/v1/{parent=accounts/*}/notificationsubscriptions\x12\xb2\x02\n(GetNotificationSubscriptionHealthMetrics\x12Z.google.shopping.merchant.notifications.v1.GetNotificationSubscriptionHealthMetricsRequest\x1aP.google.shopping.merchant.notifications.v1.NotificationSubscriptionHealthMetrics\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/notifications/v1/{name=accounts/*/notificationsubscriptions/*}:getHealth\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe6\x02\n-com.google.shopping.merchant.notifications.v1B\x15NotificationsApiProtoP\x01ZYcloud.google.com/go/shopping/merchant/notifications/apiv1/notificationspb;notificationspb\xaa\x02)Google.Shopping.Merchant.Notifications.V1\xca\x02)Google\\Shopping\\Merchant\\Notifications\\V1\xea\x02-Google::Shopping::Merchant::Notifications::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Notifications + module V1 + GetNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.GetNotificationSubscriptionRequest").msgclass + CreateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.CreateNotificationSubscriptionRequest").msgclass + UpdateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.UpdateNotificationSubscriptionRequest").msgclass + DeleteNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.DeleteNotificationSubscriptionRequest").msgclass + ListNotificationSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsRequest").msgclass + ListNotificationSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.ListNotificationSubscriptionsResponse").msgclass + NotificationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscription").msgclass + NotificationSubscription::NotificationEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscription.NotificationEventType").enummodule + GetNotificationSubscriptionHealthMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.GetNotificationSubscriptionHealthMetricsRequest").msgclass + NotificationSubscriptionHealthMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1.NotificationSubscriptionHealthMetrics").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb new file mode 100644 index 000000000000..cba98b6bbebc --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb @@ -0,0 +1,81 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/notifications/v1/notificationsapi.proto for package 'Google.Shopping.Merchant.Notifications.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notificationsapi_pb' + +module Google + module Shopping + module Merchant + module Notifications + module V1 + module NotificationsApiService + # Service to manage notification subscriptions for merchants + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.notifications.v1.NotificationsApiService' + + # Gets notification subscriptions for an account. + rpc :GetNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription + # Creates a notification subscription for a business. + # For standalone or subaccounts accounts, the business can create a + # subscription for self. For MCAs, the business can create a + # subscription for all managed accounts or for a specific subaccount. + # + # We will allow the following types of notification subscriptions to exist + # together (per business as a subscriber per event type): + # + # 1. Subscription for all managed accounts + subscription for self. + # + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self. + # + # we will not allow (per business as a subscriber per event type): + # + # 1. Multiple self subscriptions. + # + # 2. Multiple "all managed accounts" subscriptions. + # + # 3. "All managed accounts" subscription and partial subscriptions at the + # same time. + # + # 4. Multiple partial subscriptions for the same target account. + rpc :CreateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription + # Updates an existing notification subscription for a merchant. + rpc :UpdateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription + # Deletes a notification subscription for a merchant. + rpc :DeleteNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::Google::Protobuf::Empty + # Gets all the notification subscriptions for a merchant. + rpc :ListNotificationSubscriptions, ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse + # Retrieves notification subscription health metrics for a merchant. + # We recommend calling this periodically (hourly or daily) to monitor health + # of your callback endpoint. + rpc :GetNotificationSubscriptionHealthMetrics, ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb new file mode 100644 index 000000000000..5d7d9fd2c0ba --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notifications_api_service/rest" +require "google/shopping/merchant/notifications/v1/version" + +module Google + module Shopping + module Merchant + module Notifications + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/notifications/v1/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb new file mode 100644 index 000000000000..d5b93b867d03 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Notifications + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/proto_docs/README.md b/google-shopping-merchant-notifications-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb b/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb new file mode 100644 index 000000000000..69af06db5767 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb @@ -0,0 +1,184 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Notifications + module V1 + # Request message for the GetNotificationSubscription method. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` of the notification subscription. + class GetNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateNotificationSubscription method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @!attribute [rw] notification_subscription + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # Required. The notification subscription to create. + class CreateNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateNotificationSubscription method. + # @!attribute [rw] notification_subscription + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription] + # Required. The new version of the notification subscription that should be + # updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # List of fields being updated. + class UpdateNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteNotificationSubscription method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the notification subscription to be deleted. + class DeleteNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListNotificationSubscription method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @!attribute [rw] page_token + # @return [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + class ListNotificationSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListNotificationSubscription method. + # @!attribute [rw] notification_subscriptions + # @return [::Array<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>] + # The list of notification subscriptions requested by the merchant. + # @!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 ListNotificationSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a notification subscription owned by a Merchant account. + # @!attribute [rw] all_managed_accounts + # @return [::Boolean] + # If this value is true, the requesting account is notified of the + # specified event for all managed accounts (can be subaccounts or other + # linked accounts) including newly added accounts on a daily basis. + # + # Note: The following fields are mutually exclusive: `all_managed_accounts`, `target_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target_account + # @return [::String] + # The `name` of the account you want to receive notifications for. + # Format: `accounts/{account}` + # + # Note: The following fields are mutually exclusive: `target_account`, `all_managed_accounts`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. The `name` of the notification configuration. Generated by the + # Content API upon creation of a new `NotificationSubscription`. The + # `account` represents the merchant ID of the merchant that owns the + # configuration. Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # @!attribute [rw] registered_event + # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription::NotificationEventType] + # The event that the merchant wants to be notified about. + # @!attribute [rw] call_back_uri + # @return [::String] + # URL to be used to push the notification to the merchant. + class NotificationSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the event type that the merchant is interested in receiving + # notifications for. + module NotificationEventType + # Notifications event type is unspecified. + NOTIFICATION_EVENT_TYPE_UNSPECIFIED = 0 + + # Notification of product status changes, for example when product becomes + # disapproved. + PRODUCT_STATUS_CHANGE = 1 + end + end + + # Request for notification subscription health metrics. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` of the notification subscription for which metrics are + # retrieved. + # Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + class GetNotificationSubscriptionHealthMetricsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a notification subscription health metrics. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the notification configuration. + # Generated by the Content API upon creation of a new + # NotificationSubscription. The account represents the merchant ID of the + # merchant that owns the configuration. + # @!attribute [rw] acknowledged_messages_count + # @return [::Integer] + # The number of retained acknowledged messages for the last 24 hours + # @!attribute [rw] undelivered_messages_count + # @return [::Integer] + # The number of unacknowledged messages for the last 7 days, we will attempt + # to re-deliver the unacknowledged message later and once successfully + # delivered it will not be counted within unacknowledged messages (the number + # of unacknowledged messages should gradually decrease to zero once the issue + # is fixed). + # @!attribute [rw] oldest_unacknowledged_message_waiting_time + # @return [::Integer] + # The time since the oldest unacknowledged message was sent in seconds + class NotificationSubscriptionHealthMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-notifications-v1/snippets/Gemfile b/google-shopping-merchant-notifications-v1/snippets/Gemfile new file mode 100644 index 000000000000..bcd9b8534f4d --- /dev/null +++ b/google-shopping-merchant-notifications-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-notifications-v1", path: "../" +else + gem "google-shopping-merchant-notifications-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb new file mode 100644 index 000000000000..d618199f2fbf --- /dev/null +++ b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/create_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the create_notification_subscription call in the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription. +# +def create_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new + + # Call the create_notification_subscription method. + result = client.create_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync] diff --git a/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb new file mode 100644 index 000000000000..432a98abf21f --- /dev/null +++ b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/delete_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the delete_notification_subscription call in the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription. +# +def delete_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new + + # Call the delete_notification_subscription method. + result = client.delete_notification_subscription request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync] diff --git a/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb new file mode 100644 index 000000000000..a5bda63bda62 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the get_notification_subscription call in the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription. +# +def get_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new + + # Call the get_notification_subscription method. + result = client.get_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync] diff --git a/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb new file mode 100644 index 000000000000..1650ed2af157 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/get_notification_subscription_health_metrics.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the get_notification_subscription_health_metrics call in the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics. +# +def get_notification_subscription_health_metrics + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new + + # Call the get_notification_subscription_health_metrics method. + result = client.get_notification_subscription_health_metrics request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync] diff --git a/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb new file mode 100644 index 000000000000..cd628ffa107a --- /dev/null +++ b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/list_notification_subscriptions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the list_notification_subscriptions call in the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions. +# +def list_notification_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new + + # Call the list_notification_subscriptions method. + result = client.list_notification_subscriptions 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::Shopping::Merchant::Notifications::V1::NotificationSubscription. + p item + end +end +# [END merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync] diff --git a/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb new file mode 100644 index 000000000000..789ca447300d --- /dev/null +++ b/google-shopping-merchant-notifications-v1/snippets/notifications_api_service/update_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1" + +## +# Snippet for the update_notification_subscription call in the NotificationsApiService 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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription. +# +def update_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new + + # Call the update_notification_subscription method. + result = client.update_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription. + p result +end +# [END merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync] diff --git a/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json b/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json new file mode 100644 index 000000000000..da3479d90d3c --- /dev/null +++ b/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-notifications-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.notifications.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscription_sync", + "title": "Snippet for the get_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription.", + "file": "notifications_api_service/get_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "GetNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.GetNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_CreateNotificationSubscription_sync", + "title": "Snippet for the create_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription.", + "file": "notifications_api_service/create_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#create_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "CreateNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.CreateNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_UpdateNotificationSubscription_sync", + "title": "Snippet for the update_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription.", + "file": "notifications_api_service/update_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#update_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "UpdateNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.UpdateNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_DeleteNotificationSubscription_sync", + "title": "Snippet for the delete_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription.", + "file": "notifications_api_service/delete_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#delete_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "DeleteNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.DeleteNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_ListNotificationSubscriptions_sync", + "title": "Snippet for the list_notification_subscriptions call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions.", + "file": "notifications_api_service/list_notification_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notification_subscriptions", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#list_notification_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "ListNotificationSubscriptions", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.ListNotificationSubscriptions", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_NotificationsApiService_GetNotificationSubscriptionHealthMetrics_sync", + "title": "Snippet for the get_notification_subscription_health_metrics call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics.", + "file": "notifications_api_service/get_notification_subscription_health_metrics.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_subscription_health_metrics", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client#get_notification_subscription_health_metrics", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client" + }, + "method": { + "short_name": "GetNotificationSubscriptionHealthMetrics", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService.GetNotificationSubscriptionHealthMetrics", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb b/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb new file mode 100644 index 000000000000..2c650019c8dc --- /dev/null +++ b/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notifications_api_service" + +class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_notification_subscription_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_subscription_path account: "value0", notification_subscription: "value1" + assert_equal "accounts/value0/notificationsubscriptions/value1", path + end + end + + def test_notification_subscription_health_metrics_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_subscription_health_metrics_path account: "value0", notification_subscription: "value1" + assert_equal "accounts/value0/notificationsubscriptions/value1", path + end + end +end diff --git a/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb b/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb new file mode 100644 index 000000000000..47895c642ee3 --- /dev/null +++ b/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_rest_test.rb @@ -0,0 +1,427 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1/notifications_api_service/rest" + + +class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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_get_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_notification_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_notification_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_notification_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_subscription_client_stub.call_count + end + end + end + + def test_create_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + notification_subscription = {} + + create_notification_subscription_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_create_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_notification_subscription_client_stub.call_count + end + end + end + + def test_update_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + notification_subscription = {} + update_mask = {} + + update_notification_subscription_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_update_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_notification_subscription_client_stub.call_count + end + end + end + + def test_delete_notification_subscription + # 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_notification_subscription_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_delete_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_notification_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_notification_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_notification_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_notification_subscription_client_stub.call_count + end + end + end + + def test_list_notification_subscriptions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_notification_subscriptions_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_list_notification_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_notification_subscriptions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_notification_subscriptions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new(parent: parent, 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_notification_subscriptions({ parent: parent, 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new(parent: parent, 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_notification_subscriptions_client_stub.call_count + end + end + end + + def test_get_notification_subscription_health_metrics + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_health_metrics_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_health_metrics_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_subscription_health_metrics_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_notification_subscription_health_metrics({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_notification_subscription_health_metrics name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_notification_subscription_health_metrics ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_notification_subscription_health_metrics({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_notification_subscription_health_metrics(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_subscription_health_metrics_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb b/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb new file mode 100644 index 000000000000..7b8ecb2e81ef --- /dev/null +++ b/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb @@ -0,0 +1,446 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/notifications/v1/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1/notificationsapi_services_pb" +require "google/shopping/merchant/notifications/v1/notifications_api_service" + +class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::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_get_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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" + + get_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_notification_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_notification_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_notification_subscription({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.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, get_notification_subscription_client_stub.call_rpc_count + end + end + + def test_create_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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" + notification_subscription = {} + + create_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription), request["notification_subscription"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_notification_subscription_client_stub.call_rpc_count + end + end + + def test_update_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.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. + notification_subscription = {} + update_mask = {} + + update_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription), request["notification_subscription"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_notification_subscription_client_stub.call_rpc_count + end + end + + def test_delete_notification_subscription + # 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_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_notification_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_notification_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_notification_subscription({ 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_notification_subscription(::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.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_notification_subscription_client_stub.call_rpc_count + end + end + + def test_list_notification_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsResponse.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" + page_size = 42 + page_token = "hello world" + + list_notification_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notification_subscriptions, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_notification_subscriptions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_notification_subscriptions({ parent: parent, 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_notification_subscriptions parent: parent, 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_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new(parent: parent, 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_notification_subscriptions({ parent: parent, 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_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new(parent: parent, 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_notification_subscriptions_client_stub.call_rpc_count + end + end + + def test_get_notification_subscription_health_metrics + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.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" + + get_notification_subscription_health_metrics_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_subscription_health_metrics, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_subscription_health_metrics_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_notification_subscription_health_metrics({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_notification_subscription_health_metrics name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_notification_subscription_health_metrics ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_notification_subscription_health_metrics({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_notification_subscription_health_metrics(::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.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, get_notification_subscription_health_metrics_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::Shopping::Merchant::Notifications::V1::NotificationsApiService::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::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-notifications-v1/test/helper.rb b/google-shopping-merchant-notifications-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-notifications-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 55595734e54f..39ae937681fd 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1887,6 +1887,10 @@ "component": "google-shopping-merchant-notifications", "version_file": "lib/google/shopping/merchant/notifications/version.rb" }, + "google-shopping-merchant-notifications-v1": { + "component": "google-shopping-merchant-notifications-v1", + "version_file": "lib/google/shopping/merchant/notifications/v1/version.rb" + }, "google-shopping-merchant-notifications-v1beta": { "component": "google-shopping-merchant-notifications-v1beta", "version_file": "lib/google/shopping/merchant/notifications/v1beta/version.rb" From c85c8b364e036fd9cd408fe48ff5bce3f09de94d Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:28:13 -0700 Subject: [PATCH 357/457] feat: Initial generation of google-shopping-merchant-lfp-v1 (#30775) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + google-shopping-merchant-lfp-v1/.OwlBot.yaml | 3 + google-shopping-merchant-lfp-v1/.gitignore | 22 + .../.owlbot-manifest.json | 96 +++ .../.repo-metadata.json | 17 + google-shopping-merchant-lfp-v1/.rubocop.yml | 33 + google-shopping-merchant-lfp-v1/.toys.rb | 28 + google-shopping-merchant-lfp-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ google-shopping-merchant-lfp-v1/CHANGELOG.md | 2 + google-shopping-merchant-lfp-v1/Gemfile | 11 + google-shopping-merchant-lfp-v1/LICENSE.md | 201 +++++ google-shopping-merchant-lfp-v1/README.md | 154 ++++ google-shopping-merchant-lfp-v1/Rakefile | 169 ++++ .../gapic_metadata.json | 80 ++ .../google-shopping-merchant-lfp-v1.gemspec | 29 + .../lib/google-shopping-merchant-lfp-v1.rb | 21 + .../lib/google/shopping/merchant/lfp/v1.rb | 50 ++ .../merchant/lfp/v1/lfp_inventory_service.rb | 59 ++ .../lfp/v1/lfp_inventory_service/client.rb | 471 +++++++++++ .../v1/lfp_inventory_service/credentials.rb | 49 ++ .../lfp/v1/lfp_inventory_service/paths.rb | 70 ++ .../lfp/v1/lfp_inventory_service/rest.rb | 56 ++ .../v1/lfp_inventory_service/rest/client.rb | 438 ++++++++++ .../rest/service_stub.rb | 145 ++++ .../lfp/v1/lfp_merchant_state_service.rb | 62 ++ .../v1/lfp_merchant_state_service/client.rb | 471 +++++++++++ .../lfp_merchant_state_service/credentials.rb | 49 ++ .../v1/lfp_merchant_state_service/paths.rb | 52 ++ .../lfp/v1/lfp_merchant_state_service/rest.rb | 59 ++ .../lfp_merchant_state_service/rest/client.rb | 438 ++++++++++ .../rest/service_stub.rb | 144 ++++ .../merchant/lfp/v1/lfp_sale_service.rb | 59 ++ .../lfp/v1/lfp_sale_service/client.rb | 469 +++++++++++ .../lfp/v1/lfp_sale_service/credentials.rb | 49 ++ .../merchant/lfp/v1/lfp_sale_service/paths.rb | 52 ++ .../merchant/lfp/v1/lfp_sale_service/rest.rb | 56 ++ .../lfp/v1/lfp_sale_service/rest/client.rb | 436 ++++++++++ .../v1/lfp_sale_service/rest/service_stub.rb | 145 ++++ .../merchant/lfp/v1/lfp_store_service.rb | 59 ++ .../lfp/v1/lfp_store_service/client.rb | 771 ++++++++++++++++++ .../lfp/v1/lfp_store_service/credentials.rb | 49 ++ .../lfp/v1/lfp_store_service/paths.rb | 68 ++ .../merchant/lfp/v1/lfp_store_service/rest.rb | 56 ++ .../lfp/v1/lfp_store_service/rest/client.rb | 717 ++++++++++++++++ .../v1/lfp_store_service/rest/service_stub.rb | 328 ++++++++ .../merchant/lfp/v1/lfpinventory_pb.rb | 54 ++ .../lfp/v1/lfpinventory_services_pb.rb | 51 ++ .../merchant/lfp/v1/lfpmerchantstate_pb.rb | 56 ++ .../lfp/v1/lfpmerchantstate_services_pb.rb | 52 ++ .../shopping/merchant/lfp/v1/lfpsale_pb.rb | 55 ++ .../merchant/lfp/v1/lfpsale_services_pb.rb | 49 ++ .../shopping/merchant/lfp/v1/lfpstore_pb.rb | 56 ++ .../merchant/lfp/v1/lfpstore_services_pb.rb | 57 ++ .../google/shopping/merchant/lfp/v1/rest.rb | 42 + .../shopping/merchant/lfp/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/field_info.rb | 88 ++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 ++++++ .../proto_docs/google/protobuf/duration.rb | 98 +++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 +++ .../shopping/merchant/lfp/v1/lfpinventory.rb | 113 +++ .../merchant/lfp/v1/lfpmerchantstate.rb | 181 ++++ .../shopping/merchant/lfp/v1/lfpsale.rb | 96 +++ .../shopping/merchant/lfp/v1/lfpstore.rb | 185 +++++ .../proto_docs/google/shopping/type/types.rb | 210 +++++ .../snippets/Gemfile | 32 + .../insert_lfp_inventory.rb | 47 ++ .../get_lfp_merchant_state.rb | 47 ++ .../lfp_sale_service/insert_lfp_sale.rb | 47 ++ .../lfp_store_service/delete_lfp_store.rb | 47 ++ .../lfp_store_service/get_lfp_store.rb | 47 ++ .../lfp_store_service/insert_lfp_store.rb | 47 ++ .../lfp_store_service/list_lfp_stores.rb | 51 ++ ...adata_google.shopping.merchant.lfp.v1.json | 295 +++++++ .../v1/lfp_inventory_service_paths_test.rb | 67 ++ .../lfp/v1/lfp_inventory_service_rest_test.rb | 154 ++++ .../lfp/v1/lfp_inventory_service_test.rb | 145 ++++ .../lfp_merchant_state_service_paths_test.rb | 55 ++ .../lfp_merchant_state_service_rest_test.rb | 153 ++++ .../lfp/v1/lfp_merchant_state_service_test.rb | 143 ++++ .../lfp/v1/lfp_sale_service_paths_test.rb | 55 ++ .../lfp/v1/lfp_sale_service_rest_test.rb | 154 ++++ .../merchant/lfp/v1/lfp_sale_service_test.rb | 145 ++++ .../lfp/v1/lfp_store_service_paths_test.rb | 67 ++ .../lfp/v1/lfp_store_service_rest_test.rb | 319 ++++++++ .../merchant/lfp/v1/lfp_store_service_test.rb | 330 ++++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 93 files changed, 11899 insertions(+) create mode 100644 google-shopping-merchant-lfp-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-lfp-v1/.gitignore create mode 100644 google-shopping-merchant-lfp-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-lfp-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-lfp-v1/.rubocop.yml create mode 100644 google-shopping-merchant-lfp-v1/.toys.rb create mode 100644 google-shopping-merchant-lfp-v1/.yardopts create mode 100644 google-shopping-merchant-lfp-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-lfp-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-lfp-v1/Gemfile create mode 100644 google-shopping-merchant-lfp-v1/LICENSE.md create mode 100644 google-shopping-merchant-lfp-v1/README.md create mode 100644 google-shopping-merchant-lfp-v1/Rakefile create mode 100644 google-shopping-merchant-lfp-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec create mode 100644 google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb create mode 100644 google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb create mode 100644 google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-lfp-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb create mode 100644 google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb create mode 100644 google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb create mode 100644 google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb create mode 100644 google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb create mode 100644 google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb create mode 100644 google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb create mode 100644 google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb create mode 100644 google-shopping-merchant-lfp-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 54c9fccaec06..38d9c27f1125 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -933,6 +933,8 @@ "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", "google-shopping-merchant-lfp": "0.3.1", "google-shopping-merchant-lfp+FILLER": "0.0.0", + "google-shopping-merchant-lfp-v1": "0.0.1", + "google-shopping-merchant-lfp-v1+FILLER": "0.0.0", "google-shopping-merchant-lfp-v1beta": "0.5.0", "google-shopping-merchant-lfp-v1beta+FILLER": "0.0.0", "google-shopping-merchant-notifications": "0.2.1", diff --git a/google-shopping-merchant-lfp-v1/.OwlBot.yaml b/google-shopping-merchant-lfp-v1/.OwlBot.yaml new file mode 100644 index 000000000000..ea143520c618 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/lfp/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-lfp-v1/$1 diff --git a/google-shopping-merchant-lfp-v1/.gitignore b/google-shopping-merchant-lfp-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-lfp-v1/.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/google-shopping-merchant-lfp-v1/.owlbot-manifest.json b/google-shopping-merchant-lfp-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..a6100eee0a59 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/.owlbot-manifest.json @@ -0,0 +1,96 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-lfp-v1.gemspec", + "lib/google-shopping-merchant-lfp-v1.rb", + "lib/google/shopping/merchant/lfp/v1.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb", + "lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb", + "lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb", + "lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb", + "lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb", + "lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb", + "lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb", + "lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb", + "lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb", + "lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb", + "lib/google/shopping/merchant/lfp/v1/rest.rb", + "lib/google/shopping/merchant/lfp/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/field_info.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb", + "proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb", + "proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb", + "proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb", + "proto_docs/google/shopping/type/types.rb", + "snippets/Gemfile", + "snippets/lfp_inventory_service/insert_lfp_inventory.rb", + "snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb", + "snippets/lfp_sale_service/insert_lfp_sale.rb", + "snippets/lfp_store_service/delete_lfp_store.rb", + "snippets/lfp_store_service/get_lfp_store.rb", + "snippets/lfp_store_service/insert_lfp_store.rb", + "snippets/lfp_store_service/list_lfp_stores.rb", + "snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json", + "test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb", + "test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-lfp-v1/.repo-metadata.json b/google-shopping-merchant-lfp-v1/.repo-metadata.json new file mode 100644 index 000000000000..36b9e7c839c5 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp-v1", + "distribution_name": "google-shopping-merchant-lfp-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-lfp-v1/.rubocop.yml b/google-shopping-merchant-lfp-v1/.rubocop.yml new file mode 100644 index 000000000000..c02800f14e06 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-lfp-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-lfp-v1.rb" diff --git a/google-shopping-merchant-lfp-v1/.toys.rb b/google-shopping-merchant-lfp-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-lfp-v1/.yardopts b/google-shopping-merchant-lfp-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-lfp-v1/AUTHENTICATION.md b/google-shopping-merchant-lfp-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..9b4d87b388cb --- /dev/null +++ b/google-shopping-merchant-lfp-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-lfp-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-lfp-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/lfp/v1" + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/lfp/v1" + +::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/lfp/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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/google-shopping-merchant-lfp-v1/CHANGELOG.md b/google-shopping-merchant-lfp-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-lfp-v1/Gemfile b/google-shopping-merchant-lfp-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-lfp-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-lfp-v1/LICENSE.md b/google-shopping-merchant-lfp-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-lfp-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-lfp-v1/README.md b/google-shopping-merchant-lfp-v1/README.md new file mode 100644 index 000000000000..b1079018d953 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-lfp](https://rubygems.org/gems/google-shopping-merchant-lfp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-lfp-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/lfp/v1" + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new +request = ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new # (request fields as keyword arguments...) +response = client.insert_lfp_inventory request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/lfp/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-lfp-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-lfp`. +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-shopping-merchant-lfp-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-lfp-v1/Rakefile b/google-shopping-merchant-lfp-v1/Rakefile new file mode 100644 index 000000000000..f7ea29e49466 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-lfp-v1 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/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" + ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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-shopping-merchant-lfp-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-lfp-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-lfp-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-lfp-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-lfp-v1" + header "google-shopping-merchant-lfp-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-lfp-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-lfp-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-lfp-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-lfp-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-lfp-v1/gapic_metadata.json b/google-shopping-merchant-lfp-v1/gapic_metadata.json new file mode 100644 index 000000000000..302bd89785a3 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/gapic_metadata.json @@ -0,0 +1,80 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.lfp.v1", + "libraryPackage": "::Google::Shopping::Merchant::Lfp::V1", + "services": { + "LfpInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client", + "rpcs": { + "InsertLfpInventory": { + "methods": [ + "insert_lfp_inventory" + ] + } + } + } + } + }, + "LfpMerchantStateService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client", + "rpcs": { + "GetLfpMerchantState": { + "methods": [ + "get_lfp_merchant_state" + ] + } + } + } + } + }, + "LfpSaleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client", + "rpcs": { + "InsertLfpSale": { + "methods": [ + "insert_lfp_sale" + ] + } + } + } + } + }, + "LfpStoreService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client", + "rpcs": { + "GetLfpStore": { + "methods": [ + "get_lfp_store" + ] + }, + "InsertLfpStore": { + "methods": [ + "insert_lfp_store" + ] + }, + "DeleteLfpStore": { + "methods": [ + "delete_lfp_store" + ] + }, + "ListLfpStores": { + "methods": [ + "list_lfp_stores" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec b/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec new file mode 100644 index 000000000000..4c1dd8c48457 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/lfp/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-lfp-v1" + gem.version = Google::Shopping::Merchant::Lfp::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb b/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb new file mode 100644 index 000000000000..ce781507e10d --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1" diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb new file mode 100644 index 000000000000..2eac20fcd376 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfp_inventory_service" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" +require "google/shopping/merchant/lfp/v1/lfp_sale_service" +require "google/shopping/merchant/lfp/v1/lfp_store_service" +require "google/shopping/merchant/lfp/v1/version" + +module Google + module Shopping + module Merchant + module Lfp + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/lfp/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb new file mode 100644 index 000000000000..0289abe90c55 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/client" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1/lfp_inventory_service" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + module LfpInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_inventory_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb new file mode 100644 index 000000000000..0c9df8dcc63f --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb @@ -0,0 +1,471 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpinventory_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + ## + # Client for the LfpInventoryService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_inventory_service_stub + + ## + # Configure the LfpInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpInventoryService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + @lfp_inventory_service_stub.universe_domain + end + + ## + # Create a new LfpInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpInventoryService 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/shopping/merchant/lfp/v1/lfpinventory_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 + + @lfp_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + ) + + @lfp_inventory_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 + @lfp_inventory_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + # + # @overload insert_lfp_inventory(request, options = nil) + # Pass arguments to `insert_lfp_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::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 insert_lfp_inventory(parent: nil, lfp_inventory: nil) + # Pass arguments to `insert_lfp_inventory` 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 LFP provider account. + # Format: `accounts/{account}` + # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1::LfpInventory, ::Hash] + # Required. The inventory to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new + # + # # Call the insert_lfp_inventory method. + # result = client.insert_lfp_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. + # p result + # + def insert_lfp_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest + + # 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.insert_lfp_inventory.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::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpInventoryService API. + # + # This class represents the configuration for LfpInventoryService, + # 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + # # insert_lfp_inventory to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 LfpInventoryService 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 `insert_lfp_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_inventory + + # @private + def initialize parent_rpcs = nil + insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory + @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb new file mode 100644 index 000000000000..d2446d4ec1f8 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + # Credentials for the LfpInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb new file mode 100644 index 000000000000..75ce32220995 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + # Path helper methods for the LfpInventoryService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified LfpInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` + # + # @param account [String] + # @param target_merchant [String] + # @param store_code [String] + # @param offer [String] + # + # @return [::String] + def lfp_inventory_path account:, target_merchant:, store_code:, offer: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" + raise ::ArgumentError, "store_code cannot contain /" if store_code.to_s.include? "/" + + "accounts/#{account}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb new file mode 100644 index 000000000000..a45e999e7460 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + module LfpInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb new file mode 100644 index 000000000000..749833764193 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb @@ -0,0 +1,438 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + module Rest + ## + # REST client for the LfpInventoryService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_inventory_service_stub + + ## + # Configure the LfpInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpInventoryService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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", "Shopping", "Merchant", "Lfp", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + @lfp_inventory_service_stub.universe_domain + end + + ## + # Create a new LfpInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpInventoryService 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 + + @lfp_inventory_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_inventory_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 + @lfp_inventory_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + # + # @overload insert_lfp_inventory(request, options = nil) + # Pass arguments to `insert_lfp_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::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 insert_lfp_inventory(parent: nil, lfp_inventory: nil) + # Pass arguments to `insert_lfp_inventory` 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 LFP provider account. + # Format: `accounts/{account}` + # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1::LfpInventory, ::Hash] + # Required. The inventory to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new + # + # # Call the insert_lfp_inventory method. + # result = client.insert_lfp_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. + # p result + # + def insert_lfp_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest + + # 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.insert_lfp_inventory.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::Shopping::Merchant::Lfp::V1::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.insert_lfp_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_inventory_service_stub.insert_lfp_inventory 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 + + ## + # Configuration class for the LfpInventoryService REST API. + # + # This class represents the configuration for LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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 + # # insert_lfp_inventory to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.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 = "merchantapi.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 LfpInventoryService 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 `insert_lfp_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_inventory + + # @private + def initialize parent_rpcs = nil + insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory + @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..55353cdffec8 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpinventory_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + module Rest + ## + # REST service stub for the LfpInventoryService 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: true, + 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 insert_lfp_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest] + # 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::Shopping::Merchant::Lfp::V1::LfpInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # A result object deserialized from the server's reply + def insert_lfp_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_inventory_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: "insert_lfp_inventory", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.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 insert_lfp_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1/{parent}/lfpInventories:insert", + body: "lfp_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb new file mode 100644 index 000000000000..3befd9ad6c6b --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new + # + module LfpMerchantStateService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_merchant_state_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb new file mode 100644 index 000000000000..f4b2751c63b7 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb @@ -0,0 +1,471 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + ## + # Client for the LfpMerchantStateService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_merchant_state_service_stub + + ## + # Configure the LfpMerchantStateService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpMerchantStateService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 + @lfp_merchant_state_service_stub.universe_domain + end + + ## + # Create a new LfpMerchantStateService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpMerchantStateService 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/shopping/merchant/lfp/v1/lfpmerchantstate_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 + + @lfp_merchant_state_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 + ) + + @lfp_merchant_state_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 + @lfp_merchant_state_service_stub.logger + end + + # Service calls + + ## + # Gets the LFP state of a merchant + # + # @overload get_lfp_merchant_state(request, options = nil) + # Pass arguments to `get_lfp_merchant_state` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::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_lfp_merchant_state(name: nil) + # Pass arguments to `get_lfp_merchant_state` 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 name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For + # example, `accounts/123456/lfpMerchantStates/567890`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new + # + # # Call the get_lfp_merchant_state method. + # result = client.get_lfp_merchant_state request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. + # p result + # + def get_lfp_merchant_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest + + # 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_lfp_merchant_state.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::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_merchant_state_service_stub.call_rpc :get_lfp_merchant_state, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpMerchantStateService API. + # + # This class represents the configuration for LfpMerchantStateService, + # 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 + # # get_lfp_merchant_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 LfpMerchantStateService 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 `get_lfp_merchant_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_merchant_state + + # @private + def initialize parent_rpcs = nil + get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state + @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb new file mode 100644 index 000000000000..003e265da7be --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + # Credentials for the LfpMerchantStateService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb new file mode 100644 index 000000000000..f133a39f809b --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + # Path helper methods for the LfpMerchantStateService API. + module Paths + ## + # Create a fully-qualified LfpMerchantState resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpMerchantStates/{lfp_merchant_state}` + # + # @param account [String] + # @param lfp_merchant_state [String] + # + # @return [::String] + def lfp_merchant_state_path account:, lfp_merchant_state: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/lfpMerchantStates/#{lfp_merchant_state}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb new file mode 100644 index 000000000000..b2fccd66dcc4 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new + # + module LfpMerchantStateService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb new file mode 100644 index 000000000000..0e4568c9a8ba --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb @@ -0,0 +1,438 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + module Rest + ## + # REST client for the LfpMerchantStateService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_merchant_state_service_stub + + ## + # Configure the LfpMerchantStateService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpMerchantStateService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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", "Shopping", "Merchant", "Lfp", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 + @lfp_merchant_state_service_stub.universe_domain + end + + ## + # Create a new LfpMerchantStateService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpMerchantStateService 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 + + @lfp_merchant_state_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_merchant_state_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 + @lfp_merchant_state_service_stub.logger + end + + # Service calls + + ## + # Gets the LFP state of a merchant + # + # @overload get_lfp_merchant_state(request, options = nil) + # Pass arguments to `get_lfp_merchant_state` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::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_lfp_merchant_state(name: nil) + # Pass arguments to `get_lfp_merchant_state` 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 name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For + # example, `accounts/123456/lfpMerchantStates/567890`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new + # + # # Call the get_lfp_merchant_state method. + # result = client.get_lfp_merchant_state request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. + # p result + # + def get_lfp_merchant_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest + + # 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_lfp_merchant_state.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::Shopping::Merchant::Lfp::V1::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_lfp_merchant_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_merchant_state_service_stub.get_lfp_merchant_state 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 + + ## + # Configuration class for the LfpMerchantStateService REST API. + # + # This class represents the configuration for LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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 + # # get_lfp_merchant_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_merchant_state.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 = "merchantapi.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 LfpMerchantStateService 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 `get_lfp_merchant_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_merchant_state + + # @private + def initialize parent_rpcs = nil + get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state + @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb new file mode 100644 index 000000000000..8d88a1f89c7a --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + module Rest + ## + # REST service stub for the LfpMerchantStateService 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: true, + 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 get_lfp_merchant_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest] + # 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::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState] + # A result object deserialized from the server's reply + def get_lfp_merchant_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_merchant_state_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_lfp_merchant_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.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 get_lfp_merchant_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest] + # 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_lfp_merchant_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpMerchantStates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb new file mode 100644 index 000000000000..0bd21509ff7b --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_sale_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/client" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1/lfp_sale_service" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new + # + module LfpSaleService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_sale_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb new file mode 100644 index 000000000000..1d63d3383c62 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb @@ -0,0 +1,469 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpsale_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + ## + # Client for the LfpSaleService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_sale_service_stub + + ## + # Configure the LfpSaleService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpSaleService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + @lfp_sale_service_stub.universe_domain + end + + ## + # Create a new LfpSaleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpSaleService 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/shopping/merchant/lfp/v1/lfpsale_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 + + @lfp_sale_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + ) + + @lfp_sale_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 + @lfp_sale_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpSale` for the given merchant. + # + # @overload insert_lfp_sale(request, options = nil) + # Pass arguments to `insert_lfp_sale` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::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 insert_lfp_sale(parent: nil, lfp_sale: nil) + # Pass arguments to `insert_lfp_sale` 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 LFP provider account. + # Format: `accounts/{lfp_partner}` + # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1::LfpSale, ::Hash] + # Required. The sale to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new + # + # # Call the insert_lfp_sale method. + # result = client.insert_lfp_sale request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. + # p result + # + def insert_lfp_sale request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest + + # 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.insert_lfp_sale.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::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_sale.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpSaleService API. + # + # This class represents the configuration for LfpSaleService, + # 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + # # insert_lfp_sale to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 LfpSaleService 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 `insert_lfp_sale` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_sale + + # @private + def initialize parent_rpcs = nil + insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale + @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb new file mode 100644 index 000000000000..96c8feed2552 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + # Credentials for the LfpSaleService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb new file mode 100644 index 000000000000..5429bb79d139 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + # Path helper methods for the LfpSaleService API. + module Paths + ## + # Create a fully-qualified LfpSale resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpSales/{sale}` + # + # @param account [String] + # @param sale [String] + # + # @return [::String] + def lfp_sale_path account:, sale: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/lfpSales/#{sale}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb new file mode 100644 index 000000000000..b5fb4867996c --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_sale_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new + # + module LfpSaleService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb new file mode 100644 index 000000000000..438e3038bac5 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb @@ -0,0 +1,436 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpsale_pb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + module Rest + ## + # REST client for the LfpSaleService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_sale_service_stub + + ## + # Configure the LfpSaleService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpSaleService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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", "Shopping", "Merchant", "Lfp", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + @lfp_sale_service_stub.universe_domain + end + + ## + # Create a new LfpSaleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpSaleService 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 + + @lfp_sale_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_sale_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 + @lfp_sale_service_stub.logger + end + + # Service calls + + ## + # Inserts a `LfpSale` for the given merchant. + # + # @overload insert_lfp_sale(request, options = nil) + # Pass arguments to `insert_lfp_sale` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::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 insert_lfp_sale(parent: nil, lfp_sale: nil) + # Pass arguments to `insert_lfp_sale` 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 LFP provider account. + # Format: `accounts/{lfp_partner}` + # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1::LfpSale, ::Hash] + # Required. The sale to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new + # + # # Call the insert_lfp_sale method. + # result = client.insert_lfp_sale request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. + # p result + # + def insert_lfp_sale request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest + + # 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.insert_lfp_sale.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::Shopping::Merchant::Lfp::V1::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.insert_lfp_sale.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_sale.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_sale_service_stub.insert_lfp_sale 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 + + ## + # Configuration class for the LfpSaleService REST API. + # + # This class represents the configuration for LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::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 + # # insert_lfp_sale to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.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 = "merchantapi.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 LfpSaleService 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 `insert_lfp_sale` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_sale + + # @private + def initialize parent_rpcs = nil + insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale + @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb new file mode 100644 index 000000000000..9161529eeb5a --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpsale_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + module Rest + ## + # REST service stub for the LfpSaleService 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: true, + 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 insert_lfp_sale REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest] + # 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::Shopping::Merchant::Lfp::V1::LfpSale] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # A result object deserialized from the server's reply + def insert_lfp_sale request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_sale_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: "insert_lfp_sale", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.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 insert_lfp_sale REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_sale_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1/{parent}/lfpSales:insert", + body: "lfp_sale", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb new file mode 100644 index 000000000000..35964a9ea84a --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_store_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_store_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_store_service/client" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1/lfp_store_service" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + module LfpStoreService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_store_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_store_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb new file mode 100644 index 000000000000..91c8f95676b8 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb @@ -0,0 +1,771 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpstore_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + ## + # Client for the LfpStoreService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_store_service_stub + + ## + # Configure the LfpStoreService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpStoreService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 + @lfp_store_service_stub.universe_domain + end + + ## + # Create a new LfpStoreService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpStoreService 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/shopping/merchant/lfp/v1/lfpstore_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 + + @lfp_store_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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 + ) + + @lfp_store_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 + @lfp_store_service_stub.logger + end + + # Service calls + + ## + # Retrieves information about a store. + # + # @overload get_lfp_store(request, options = nil) + # Pass arguments to `get_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::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_lfp_store(name: nil) + # Pass arguments to `get_lfp_store` 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 name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new + # + # # Call the get_lfp_store method. + # result = client.get_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p result + # + def get_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest + + # 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_lfp_store.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::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :get_lfp_store, 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 + + ## + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + # + # @overload insert_lfp_store(request, options = nil) + # Pass arguments to `insert_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::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 insert_lfp_store(parent: nil, lfp_store: nil) + # Pass arguments to `insert_lfp_store` 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 LFP provider account + # Format: `accounts/{account}` + # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1::LfpStore, ::Hash] + # Required. The store to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new + # + # # Call the insert_lfp_store method. + # result = client.insert_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p result + # + def insert_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest + + # 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.insert_lfp_store.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::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :insert_lfp_store, 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 + + ## + # Deletes a store for a target merchant. + # + # @overload delete_lfp_store(request, options = nil) + # Pass arguments to `delete_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::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_lfp_store(name: nil) + # Pass arguments to `delete_lfp_store` 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 name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @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/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new + # + # # Call the delete_lfp_store method. + # result = client.delete_lfp_store request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest + + # 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_lfp_store.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::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :delete_lfp_store, 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 the stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + # + # @overload list_lfp_stores(request, options = nil) + # Pass arguments to `list_lfp_stores` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::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_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lfp_stores` 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 LFP partner. + # Format: `accounts/{account}` + # @param target_account [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new + # + # # Call the list_lfp_stores method. + # result = client.list_lfp_stores 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::Shopping::Merchant::Lfp::V1::LfpStore. + # p item + # end + # + def list_lfp_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest + + # 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_lfp_stores.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::Shopping::Merchant::Lfp::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lfp_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :list_lfp_stores, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, 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 LfpStoreService API. + # + # This class represents the configuration for LfpStoreService, + # 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 + # # get_lfp_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 LfpStoreService 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 `get_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_store + ## + # RPC-specific configuration for `insert_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_store + ## + # RPC-specific configuration for `delete_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lfp_store + ## + # RPC-specific configuration for `list_lfp_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lfp_stores + + # @private + def initialize parent_rpcs = nil + get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store + @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config + insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store + @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config + delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store + @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config + list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores + @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb new file mode 100644 index 000000000000..5a71813691b9 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + # Credentials for the LfpStoreService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb new file mode 100644 index 000000000000..8dd0bd421b6a --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + # Path helper methods for the LfpStoreService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified LfpStore resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @param account [String] + # @param target_merchant [String] + # @param store_code [String] + # + # @return [::String] + def lfp_store_path account:, target_merchant:, store_code: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" + + "accounts/#{account}/lfpStores/#{target_merchant}~#{store_code}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb new file mode 100644 index 000000000000..714167cd83ba --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/version" + +require "google/shopping/merchant/lfp/v1/lfp_store_service/credentials" +require "google/shopping/merchant/lfp/v1/lfp_store_service/paths" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + module LfpStoreService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb new file mode 100644 index 000000000000..d4ec135025ba --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb @@ -0,0 +1,717 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpstore_pb" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + module Rest + ## + # REST client for the LfpStoreService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_store_service_stub + + ## + # Configure the LfpStoreService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpStoreService clients + # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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", "Shopping", "Merchant", "Lfp", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 + @lfp_store_service_stub.universe_domain + end + + ## + # Create a new LfpStoreService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpStoreService 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 + + @lfp_store_service_stub = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_store_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 + @lfp_store_service_stub.logger + end + + # Service calls + + ## + # Retrieves information about a store. + # + # @overload get_lfp_store(request, options = nil) + # Pass arguments to `get_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::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_lfp_store(name: nil) + # Pass arguments to `get_lfp_store` 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 name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new + # + # # Call the get_lfp_store method. + # result = client.get_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p result + # + def get_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest + + # 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_lfp_store.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::Shopping::Merchant::Lfp::V1::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_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.get_lfp_store 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 + + ## + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + # + # @overload insert_lfp_store(request, options = nil) + # Pass arguments to `insert_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::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 insert_lfp_store(parent: nil, lfp_store: nil) + # Pass arguments to `insert_lfp_store` 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 LFP provider account + # Format: `accounts/{account}` + # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1::LfpStore, ::Hash] + # Required. The store to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new + # + # # Call the insert_lfp_store method. + # result = client.insert_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + # p result + # + def insert_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest + + # 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.insert_lfp_store.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::Shopping::Merchant::Lfp::V1::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.insert_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.insert_lfp_store 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 + + ## + # Deletes a store for a target merchant. + # + # @overload delete_lfp_store(request, options = nil) + # Pass arguments to `delete_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::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_lfp_store(name: nil) + # Pass arguments to `delete_lfp_store` 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 name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @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/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new + # + # # Call the delete_lfp_store method. + # result = client.delete_lfp_store request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest + + # 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_lfp_store.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::Shopping::Merchant::Lfp::V1::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_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.delete_lfp_store 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 the stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + # + # @overload list_lfp_stores(request, options = nil) + # Pass arguments to `list_lfp_stores` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::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_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lfp_stores` 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 LFP partner. + # Format: `accounts/{account}` + # @param target_account [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new + # + # # Call the list_lfp_stores method. + # result = client.list_lfp_stores 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::Shopping::Merchant::Lfp::V1::LfpStore. + # p item + # end + # + def list_lfp_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest + + # 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_lfp_stores.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::Shopping::Merchant::Lfp::V1::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_lfp_stores.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lfp_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.list_lfp_stores request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, "lfp_stores", 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 LfpStoreService REST API. + # + # This class represents the configuration for LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::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 + # # get_lfp_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.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 = "merchantapi.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 LfpStoreService 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 `get_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_store + ## + # RPC-specific configuration for `insert_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_store + ## + # RPC-specific configuration for `delete_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lfp_store + ## + # RPC-specific configuration for `list_lfp_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lfp_stores + + # @private + def initialize parent_rpcs = nil + get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store + @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config + insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store + @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config + delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store + @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config + list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores + @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb new file mode 100644 index 000000000000..6c90a90f7022 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpstore_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + module Rest + ## + # REST service stub for the LfpStoreService 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: true, + 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 get_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest] + # 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::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # A result object deserialized from the server's reply + def get_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_store_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_lfp_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest] + # 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::Shopping::Merchant::Lfp::V1::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # A result object deserialized from the server's reply + def insert_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_store_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: "insert_lfp_store", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.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_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest] + # 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_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lfp_store_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_lfp_store", + 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 list_lfp_stores REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest] + # 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::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse] + # A result object deserialized from the server's reply + def list_lfp_stores request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lfp_stores_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_lfp_stores", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.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 get_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest] + # 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_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1/{parent}/lfpStores:insert", + body: "lfp_store", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest] + # 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_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/lfp/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lfp_stores REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest] + # 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_lfp_stores_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1/{parent}/lfpStores", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb new file mode 100644 index 000000000000..9324a4c449ab --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1/lfpinventory.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/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n2google/shopping/merchant/lfp/v1/lfpinventory.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa2\x05\n\x0cLfpInventory\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x19\n\x0c\x61vailability\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x08quantity\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x38\n\x0f\x63ollection_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x1f\n\rpickup_method\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1c\n\npickup_sla\x18\r \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:\x95\x01\xea\x41\x91\x01\n\'merchantapi.googleapis.com/LfpInventory\x12Haccounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}*\x0elfpInventories2\x0clfpInventoryB\x07\n\x05_gtinB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\r\n\x0b_feed_label\"\xa7\x01\n\x19InsertLfpInventoryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'merchantapi.googleapis.com/LfpInventory\x12I\n\rlfp_inventory\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.lfp.v1.LfpInventoryB\x03\xe0\x41\x02\x32\xaa\x02\n\x13LfpInventoryService\x12\xc9\x01\n\x12InsertLfpInventory\x12:.google.shopping.merchant.lfp.v1.InsertLfpInventoryRequest\x1a-.google.shopping.merchant.lfp.v1.LfpInventory\"H\x82\xd3\xe4\x93\x02\x42\"1/lfp/v1/{parent=accounts/*}/lfpInventories:insert:\rlfp_inventory\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9c\x02\n#com.google.shopping.merchant.lfp.v1B\x11LfpInventoryProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Lfp + module V1 + LfpInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpInventory").msgclass + InsertLfpInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpInventoryRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb new file mode 100644 index 000000000000..209da3015936 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1/lfpinventory.proto for package 'Google.Shopping.Merchant.Lfp.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpinventory_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpInventoryService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1.LfpInventoryService' + + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + rpc :InsertLfpInventory, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpInventory + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb new file mode 100644 index 000000000000..8b8327205754 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1/lfpmerchantstate.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' + + +descriptor_data = "\n6google/shopping/merchant/lfp/v1/lfpmerchantstate.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc7\x0e\n\x10LfpMerchantState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0blinked_gbps\x18\x02 \x01(\x03\x12Z\n\x0cstore_states\x18\x03 \x03(\x0b\x32?.google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreStateB\x03\xe0\x41\x03\x12Y\n\x0finventory_stats\x18\x04 \x01(\x0b\x32@.google.shopping.merchant.lfp.v1.LfpMerchantState.InventoryStats\x12[\n\x10\x63ountry_settings\x18\x05 \x03(\x0b\x32\x41.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings\x1a\xb8\x02\n\rLfpStoreState\x12\x1a\n\nstore_code\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12o\n\x0ematching_state\x18\x02 \x01(\x0e\x32R.google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState.StoreMatchingStateB\x03\xe0\x41\x03\x12\x1b\n\x13matching_state_hint\x18\x03 \x01(\t\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02\x1a\x88\x01\n\x0eInventoryStats\x12\x19\n\x11submitted_entries\x18\x01 \x01(\x03\x12\"\n\x1asubmitted_in_stock_entries\x18\x02 \x01(\x03\x12\x1b\n\x13unsubmitted_entries\x18\x03 \x01(\x03\x12\x1a\n\x12submitted_products\x18\x04 \x01(\x03\x1a\x9c\x07\n\x0f\x43ountrySettings\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x1b\x66ree_local_listings_enabled\x18\x02 \x01(\x08\x12#\n\x1blocal_inventory_ads_enabled\x18\x03 \x01(\x08\x12~\n\x1cinventory_verification_state\x18\x04 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12q\n\x11product_page_type\x18\x05 \x01(\x0e\x32Q.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.ProductPageTypeB\x03\xe0\x41\x03\x12\x84\x01\n\"instock_serving_verification_state\x18\x06 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\x12\x83\x01\n!pickup_serving_verification_state\x18\x07 \x01(\x0e\x32S.google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationStateB\x03\xe0\x41\x03\"\xa1\x01\n\x11VerificationState\x12\"\n\x1eVERIFICATION_STATE_UNSPECIFIED\x10\x00\x12#\n\x1fVERIFICATION_STATE_NOT_APPROVED\x10\x01\x12\"\n\x1eVERIFICATION_STATE_IN_PROGRESS\x10\x02\x12\x1f\n\x1bVERIFICATION_STATE_APPROVED\x10\x03\"\x80\x01\n\x0fProductPageType\x12!\n\x1dPRODUCT_PAGE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rGOOGLE_HOSTED\x10\x01\x12\x13\n\x0fMERCHANT_HOSTED\x10\x02\x12\"\n\x1eMERCHANT_HOSTED_STORE_SPECIFIC\x10\x03:\x91\x01\xea\x41\x8d\x01\n+merchantapi.googleapis.com/LfpMerchantState\x12\x39\x61\x63\x63ounts/{account}/lfpMerchantStates/{lfp_merchant_state}*\x11lfpMerchantStates2\x10lfpMerchantState\"_\n\x1aGetLfpMerchantStateRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/LfpMerchantState2\xa8\x02\n\x17LfpMerchantStateService\x12\xc3\x01\n\x13GetLfpMerchantState\x12;.google.shopping.merchant.lfp.v1.GetLfpMerchantStateRequest\x1a\x31.google.shopping.merchant.lfp.v1.LfpMerchantState\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/lfp/v1/{name=accounts/*/lfpMerchantStates/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe5\x01\n#com.google.shopping.merchant.lfp.v1B\x15LfpMerchantStateProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Lfp + module V1 + LfpMerchantState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState").msgclass + LfpMerchantState::LfpStoreState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState").msgclass + LfpMerchantState::LfpStoreState::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.LfpStoreState.StoreMatchingState").enummodule + LfpMerchantState::InventoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.InventoryStats").msgclass + LfpMerchantState::CountrySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings").msgclass + LfpMerchantState::CountrySettings::VerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.VerificationState").enummodule + LfpMerchantState::CountrySettings::ProductPageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpMerchantState.CountrySettings.ProductPageType").enummodule + GetLfpMerchantStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.GetLfpMerchantStateRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb new file mode 100644 index 000000000000..be26c7cf8f6f --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1/lfpmerchantstate.proto for package 'Google.Shopping.Merchant.Lfp.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpMerchantStateService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to get the + # state of a merchant. + # + # For information about onboarding a retailer, see [How to onboard a + # retailer](https://support.google.com/merchants/answer/15243706). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1.LfpMerchantStateService' + + # Gets the LFP state of a merchant + rpc :GetLfpMerchantState, ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb new file mode 100644 index 000000000000..6a6512e376da --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1/lfpsale.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n-google/shopping/merchant/lfp/v1/lfpsale.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xe8\x03\n\x07LfpSale\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08offer_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\t \x01(\x03\x42\x03\xe0\x41\x02\x12\x32\n\tsale_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x1d\n\x03uid\x18\x0b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01H\x00\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01:^\xea\x41[\n\"merchantapi.googleapis.com/LfpSale\x12\"accounts/{account}/lfpSales/{sale}*\x08lfpSales2\x07lfpSaleB\x06\n\x04_uidB\r\n\x0b_feed_label\"l\n\x14InsertLfpSaleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x08lfp_sale\x18\x02 \x01(\x0b\x32(.google.shopping.merchant.lfp.v1.LfpSaleB\x03\xe0\x41\x02\x32\x8b\x02\n\x0eLfpSaleService\x12\xaf\x01\n\rInsertLfpSale\x12\x35.google.shopping.merchant.lfp.v1.InsertLfpSaleRequest\x1a(.google.shopping.merchant.lfp.v1.LfpSale\"=\x82\xd3\xe4\x93\x02\x37\"+/lfp/v1/{parent=accounts/*}/lfpSales:insert:\x08lfp_sale\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdc\x01\n#com.google.shopping.merchant.lfp.v1B\x0cLfpSaleProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Lfp + module V1 + LfpSale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpSale").msgclass + InsertLfpSaleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpSaleRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb new file mode 100644 index 000000000000..60c0eb7527b3 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1/lfpsale.proto for package 'Google.Shopping.Merchant.Lfp.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpsale_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpSaleService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1.LfpSaleService' + + # Inserts a `LfpSale` for the given merchant. + rpc :InsertLfpSale, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpSale + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb new file mode 100644 index 000000000000..d186c428a98c --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1/lfpstore.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/protobuf/empty_pb' + + +descriptor_data = "\n.google/shopping/merchant/lfp/v1/lfpstore.proto\x12\x1fgoogle.shopping.merchant.lfp.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x05\n\x08LfpStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\rstore_address\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nstore_name\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1e\n\x0cphone_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bwebsite_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1a\n\rgcid_category\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\x08place_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x0ematching_state\x18\n \x01(\x0e\x32<.google.shopping.merchant.lfp.v1.LfpStore.StoreMatchingStateB\x06\xe0\x41\x01\xe0\x41\x03\x12(\n\x13matching_state_hint\x18\x0b \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\x04\x88\x01\x01\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02:z\xea\x41w\n#merchantapi.googleapis.com/LfpStore\x12;accounts/{account}/lfpStores/{target_merchant}~{store_code}*\tlfpStores2\x08lfpStoreB\r\n\x0b_store_nameB\x0f\n\r_phone_numberB\x0e\n\x0c_website_uriB\x0b\n\t_place_idB\x16\n\x14_matching_state_hint\"O\n\x12GetLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\x97\x01\n\x15InsertLfpStoreRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x41\n\tlfp_store\x18\x02 \x01(\x0b\x32).google.shopping.merchant.lfp.v1.LfpStoreB\x03\xe0\x41\x02\"R\n\x15\x44\x65leteLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\xa1\x01\n\x14ListLfpStoresRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\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\"o\n\x15ListLfpStoresResponse\x12=\n\nlfp_stores\x18\x01 \x03(\x0b\x32).google.shopping.merchant.lfp.v1.LfpStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x9c\x06\n\x0fLfpStoreService\x12\xa3\x01\n\x0bGetLfpStore\x12\x33.google.shopping.merchant.lfp.v1.GetLfpStoreRequest\x1a).google.shopping.merchant.lfp.v1.LfpStore\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/lfp/v1/{name=accounts/*/lfpStores/*}\x12\xc7\x01\n\x0eInsertLfpStore\x12\x36.google.shopping.merchant.lfp.v1.InsertLfpStoreRequest\x1a).google.shopping.merchant.lfp.v1.LfpStore\"R\xda\x41\x10parent,lfp_store\x82\xd3\xe4\x93\x02\x39\",/lfp/v1/{parent=accounts/*}/lfpStores:insert:\tlfp_store\x12\x96\x01\n\x0e\x44\x65leteLfpStore\x12\x36.google.shopping.merchant.lfp.v1.DeleteLfpStoreRequest\x1a\x16.google.protobuf.Empty\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'*%/lfp/v1/{name=accounts/*/lfpStores/*}\x12\xb6\x01\n\rListLfpStores\x12\x35.google.shopping.merchant.lfp.v1.ListLfpStoresRequest\x1a\x36.google.shopping.merchant.lfp.v1.ListLfpStoresResponse\"6\xda\x41\x06parent\x82\xd3\xe4\x93\x02\'\x12%/lfp/v1/{parent=accounts/*}/lfpStores\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdd\x01\n#com.google.shopping.merchant.lfp.v1B\rLfpStoreProtoP\x01Z;cloud.google.com/go/shopping/merchant/lfp/apiv1/lfppb;lfppb\xaa\x02\x1fGoogle.Shopping.Merchant.Lfp.V1\xca\x02\x1fGoogle\\Shopping\\Merchant\\Lfp\\V1\xea\x02#Google::Shopping::Merchant::Lfp::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Lfp + module V1 + LfpStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpStore").msgclass + LfpStore::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.LfpStore.StoreMatchingState").enummodule + GetLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.GetLfpStoreRequest").msgclass + InsertLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.InsertLfpStoreRequest").msgclass + DeleteLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.DeleteLfpStoreRequest").msgclass + ListLfpStoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.ListLfpStoresRequest").msgclass + ListLfpStoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1.ListLfpStoresResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb new file mode 100644 index 000000000000..6155bbaea28d --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1/lfpstore.proto for package 'Google.Shopping.Merchant.Lfp.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpstore_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1 + module LfpStoreService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1.LfpStoreService' + + # Retrieves information about a store. + rpc :GetLfpStore, ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpStore + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + rpc :InsertLfpStore, ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1::LfpStore + # Deletes a store for a target merchant. + rpc :DeleteLfpStore, ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, ::Google::Protobuf::Empty + # Lists the stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + rpc :ListLfpStores, ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb new file mode 100644 index 000000000000..5fc66f98a23e --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfp_inventory_service/rest" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" +require "google/shopping/merchant/lfp/v1/version" + +module Google + module Shopping + module Merchant + module Lfp + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/lfp/v1/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb new file mode 100644 index 000000000000..a192705da46c --- /dev/null +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/proto_docs/README.md b/google-shopping-merchant-lfp-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..cea53f02d1a8 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb new file mode 100644 index 000000000000..695d341f1847 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + # Local Inventory for the merchant. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name for the `LfpInventory` resource. + # Format: + # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center ID of the merchant to submit the inventory + # for. + # @!attribute [rw] store_code + # @return [::String] + # Required. The identifier of the merchant's store. Either the store code + # inserted through `InsertLfpStore` or the store code in the Business + # Profile. + # @!attribute [rw] offer_id + # @return [::String] + # Required. Immutable. A unique identifier for the product. If both + # inventories and sales are submitted for a merchant, this id should match + # for the same product. + # + # **Note**: if the merchant sells the same product new and used, they should + # have different IDs. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country where the product is sold. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter ISO 639-1 language code for the item. + # @!attribute [rw] gtin + # @return [::String] + # Optional. The Global Trade Item Number of the product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Optional. The current price of the product. + # @!attribute [rw] availability + # @return [::String] + # Required. Availability of the product at this store. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] quantity + # @return [::Integer] + # Optional. Quantity of the product available at this store. Must be greater + # than or equal to zero. + # @!attribute [rw] collection_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when the inventory is collected. If not set, it will be + # set to the time when the inventory is submitted. + # @!attribute [rw] pickup_method + # @return [::String] + # Optional. Supported pickup method for this offer. Unless the value is "not + # supported", this field must be submitted together with `pickupSla`. For + # accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] pickup_sla + # @return [::String] + # Optional. Expected date that an order will be ready for pickup relative to + # the order date. Must be submitted together with `pickupMethod`. For + # accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] feed_label + # @return [::String] + # Optional. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. If this is not set, it will default to `regionCode`. + class LfpInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertLfpInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @!attribute [rw] lfp_inventory + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory] + # Required. The inventory to insert. + class InsertLfpInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb new file mode 100644 index 000000000000..e2dbacc31d34 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb @@ -0,0 +1,181 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + # The LFP state of a merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `LfpMerchantState` resource. Format: + # `accounts/{account}/lfpMerchantStates/{target_merchant}`. For example, + # `accounts/123456/lfpMerchantStates/567890`. + # @!attribute [rw] linked_gbps + # @return [::Integer] + # Number of [GBPs](https://www.google.com/business/) this merchant has access + # to. + # @!attribute [r] store_states + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::LfpStoreState>] + # Output only. The state per store from the specified merchant. The field + # will be absent if the merchant has no stores submitted through LFP. + # @!attribute [rw] inventory_stats + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::InventoryStats] + # The inventory statistics for the merchant. The field will be absent if the + # merchant has no inventory submitted through LFP. + # @!attribute [rw] country_settings + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings>] + # Country-specific settings for the merchant. + class LfpMerchantState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of a specific merchant's store. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. The identifier of this store. + # @!attribute [r] matching_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::LfpStoreState::StoreMatchingState] + # Output only. The store matching state. + # @!attribute [rw] matching_state_hint + # @return [::String] + # The hint of why the matching has failed (only set if matching_state is + # FAILED). + class LfpStoreState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of matching `LfpStore` to a Google Business Profile listing. + module StoreMatchingState + # Store matching state unspecified. + STORE_MATCHING_STATE_UNSPECIFIED = 0 + + # The `LfpStore` is successfully matched with a Google Business Profile + # store. + STORE_MATCHING_STATE_MATCHED = 1 + + # The `LfpStore` is not matched with a Google Business Profile store. + STORE_MATCHING_STATE_FAILED = 2 + end + end + + # The inventory statistics for a merchant. + # @!attribute [rw] submitted_entries + # @return [::Integer] + # Number of entries (understanding entry as a pair of product and store) + # that were built based on provided inventories/sales and submitted to + # Google. + # @!attribute [rw] submitted_in_stock_entries + # @return [::Integer] + # Number of submitted in stock entries. + # @!attribute [rw] unsubmitted_entries + # @return [::Integer] + # Number of entries that were built based on provided + # inventories/sales and couldn't be submitted to Google due to errors like + # missing product. + # @!attribute [rw] submitted_products + # @return [::Integer] + # Number of products from provided inventories/sales that were created from + # matches to existing online products provided by the merchant or to the + # Google catalog. + class InventoryStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Country-specific settings for the merchant. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country for which these settings are defined. + # @!attribute [rw] free_local_listings_enabled + # @return [::Boolean] + # True if this merchant has enabled free local listings in MC. + # @!attribute [rw] local_inventory_ads_enabled + # @return [::Boolean] + # True if this merchant has enabled local inventory ads in MC. + # @!attribute [r] inventory_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's inventory check. + # @!attribute [r] product_page_type + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::ProductPageType] + # Output only. The product page type selected by this merchant. + # @!attribute [r] instock_serving_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's instock serving + # feature. + # @!attribute [r] pickup_serving_verification_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState::CountrySettings::VerificationState] + # Output only. The verification state of this merchant's pickup serving + # feature. + class CountrySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible verification states for different merchant programs. + module VerificationState + # Verification state unspecified. + VERIFICATION_STATE_UNSPECIFIED = 0 + + # Verification state not approved. + VERIFICATION_STATE_NOT_APPROVED = 1 + + # Verification state in progress. + VERIFICATION_STATE_IN_PROGRESS = 2 + + # Verification state approved. + VERIFICATION_STATE_APPROVED = 3 + end + + # The possible [product page + # types](https://support.google.com/merchants/topic/15148370) for a + # merchant. + module ProductPageType + # Product page type unspecified. + PRODUCT_PAGE_TYPE_UNSPECIFIED = 0 + + # Google hosted product page. + GOOGLE_HOSTED = 1 + + # Merchant hosted product page. + MERCHANT_HOSTED = 2 + + # Merchant hosted store specific product page. + MERCHANT_HOSTED_STORE_SPECIFIC = 3 + end + end + end + + # Request message for the GetLfpMerchantState method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the state to retrieve. + # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For + # example, `accounts/123456/lfpMerchantStates/567890`. + class GetLfpMerchantStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb new file mode 100644 index 000000000000..d952fef86734 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + # A sale for the merchant. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the `LfpSale` resource. + # Format: + # `accounts/{account}/lfpSales/{sale}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center ID of the merchant to submit the sale for. + # @!attribute [rw] store_code + # @return [::String] + # Required. The identifier of the merchant's store. Either a `storeCode` + # inserted through the API or the code of the store in the Business Profile. + # @!attribute [rw] offer_id + # @return [::String] + # Required. A unique identifier for the product. If both inventories and + # sales are submitted for a merchant, this id should match for the same + # product. + # + # **Note**: if the merchant sells the same product new and used, they should + # have different IDs. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country where the product is sold. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter ISO 639-1 language code for the item. + # @!attribute [rw] gtin + # @return [::String] + # Required. The Global Trade Item Number of the sold product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Required. The unit price of the product. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The relative change of the available quantity. Negative for items + # returned. + # @!attribute [rw] sale_time + # @return [::Google::Protobuf::Timestamp] + # Required. The timestamp for the sale. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the `LfpSale`. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. If this is not set, it will default to `regionCode`. + class LfpSale + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertLfpSale method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @!attribute [rw] lfp_sale + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpSale] + # Required. The sale to insert. + class InsertLfpSaleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb new file mode 100644 index 000000000000..ffee1a2da848 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Lfp + module V1 + # A store for the merchant. This will be used to match to a store under the + # Google Business Profile of the target merchant. If a matching store can't be + # found, the inventories or sales submitted with the store code will not be + # used. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the `LfpStore` resource. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center id of the merchant to submit the store for. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. A store identifier that is unique for the target + # merchant. + # @!attribute [rw] store_address + # @return [::String] + # Required. The street address of the store. + # Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. + # @!attribute [rw] store_name + # @return [::String] + # Optional. The merchant or store name. + # @!attribute [rw] phone_number + # @return [::String] + # Optional. The store phone number in + # [E.164](https://en.wikipedia.org/wiki/E.164) format. Example: + # `+15556767888` + # @!attribute [rw] website_uri + # @return [::String] + # Optional. The website URL for the store or merchant. + # @!attribute [rw] gcid_category + # @return [::Array<::String>] + # Optional. [Google My Business category + # id](https://gcid-explorer.corp.google.com/static/gcid.html). + # @!attribute [rw] place_id + # @return [::String] + # Optional. The [Google Place + # Id](https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) + # of the store location. + # @!attribute [r] matching_state + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore::StoreMatchingState] + # Optional. Output only. The state of matching to a Google Business Profile. + # See + # {::Google::Shopping::Merchant::Lfp::V1::LfpStore#matching_state_hint matchingStateHint} + # for further details if no match is found. + # @!attribute [r] matching_state_hint + # @return [::String] + # Optional. Output only. The hint of why the matching has failed. This is + # only set when + # {::Google::Shopping::Merchant::Lfp::V1::LfpStore#matching_state matchingState}=`STORE_MATCHING_STATE_FAILED`. + # + # Possible values are: + # + # - "`linked-store-not-found`": There aren't any Google Business + # Profile stores available for matching. + # - "`store-match-not-found`": The provided `LfpStore` couldn't be matched to + # any of the connected Google Business Profile stores. Merchant Center + # account is connected correctly and stores are available on Google Business + # Profile, but the `LfpStore` location address does not match with Google + # Business Profile stores' addresses. Update the `LfpStore` address or Google + # Business Profile store address to match correctly. + # - "`store-match-unverified`": The provided `LfpStore` couldn't be matched + # to any of the connected Google Business Profile stores, as the matched + # Google Business Profile store is unverified. Go through the Google Business + # Profile verification process to match correctly. + class LfpStore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of matching `LfpStore` to a Google Business Profile. + module StoreMatchingState + # Store matching state unspecified. + STORE_MATCHING_STATE_UNSPECIFIED = 0 + + # The `LfpStore` is successfully matched with a Google Business Profile + # store. + STORE_MATCHING_STATE_MATCHED = 1 + + # The `LfpStore` is not matched with a Google Business Profile store. + STORE_MATCHING_STATE_FAILED = 2 + end + end + + # Request message for the `GetLfpStore` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + class GetLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertLfpStore method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @!attribute [rw] lfp_store + # @return [::Google::Shopping::Merchant::Lfp::V1::LfpStore] + # Required. The store to insert. + class InsertLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteLfpStore method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + class DeleteLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListLfpStores method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListLfpStoresRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListLfpStores method. + # @!attribute [rw] lfp_stores + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1::LfpStore>] + # The stores from the specified merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListLfpStoresResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-lfp-v1/snippets/Gemfile b/google-shopping-merchant-lfp-v1/snippets/Gemfile new file mode 100644 index 000000000000..87ff36c75e02 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-lfp-v1", path: "../" +else + gem "google-shopping-merchant-lfp-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb new file mode 100644 index 000000000000..658592db706b --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the insert_lfp_inventory call in the LfpInventoryService 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::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory. +# +def insert_lfp_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new + + # Call the insert_lfp_inventory method. + result = client.insert_lfp_inventory request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory. + p result +end +# [END merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync] diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb new file mode 100644 index 000000000000..3de5185c5a19 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService 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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state. +# +def get_lfp_merchant_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new + + # Call the get_lfp_merchant_state method. + result = client.get_lfp_merchant_state request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState. + p result +end +# [END merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync] diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb new file mode 100644 index 000000000000..f4898b6aff41 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the insert_lfp_sale call in the LfpSaleService 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::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale. +# +def insert_lfp_sale + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new + + # Call the insert_lfp_sale method. + result = client.insert_lfp_sale request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpSale. + p result +end +# [END merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync] diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb new file mode 100644 index 000000000000..ca30cdc09ad4 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the delete_lfp_store call in the LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store. +# +def delete_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new + + # Call the delete_lfp_store method. + result = client.delete_lfp_store request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync] diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb new file mode 100644 index 000000000000..56f84cdc0853 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the get_lfp_store call in the LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store. +# +def get_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new + + # Call the get_lfp_store method. + result = client.get_lfp_store request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + p result +end +# [END merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync] diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb new file mode 100644 index 000000000000..bbea2949bf3e --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the insert_lfp_store call in the LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store. +# +def insert_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new + + # Call the insert_lfp_store method. + result = client.insert_lfp_store request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpStore. + p result +end +# [END merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync] diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb new file mode 100644 index 000000000000..4152c36158be --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync] +require "google/shopping/merchant/lfp/v1" + +## +# Snippet for the list_lfp_stores call in the LfpStoreService 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::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores. +# +def list_lfp_stores + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new + + # Call the list_lfp_stores method. + result = client.list_lfp_stores 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::Shopping::Merchant::Lfp::V1::LfpStore. + p item + end +end +# [END merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync] diff --git a/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json b/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json new file mode 100644 index 000000000000..1a6356cc1b53 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-shopping-merchant-lfp-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.lfp.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_LfpInventoryService_InsertLfpInventory_sync", + "title": "Snippet for the insert_lfp_inventory call in the LfpInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory.", + "file": "lfp_inventory_service/insert_lfp_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_inventory", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client#insert_lfp_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpInventory", + "client": { + "short_name": "LfpInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client" + }, + "method": { + "short_name": "InsertLfpInventory", + "full_name": "google.shopping.merchant.lfp.v1.LfpInventoryService.InsertLfpInventory", + "service": { + "short_name": "LfpInventoryService", + "full_name": "google.shopping.merchant.lfp.v1.LfpInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpMerchantStateService_GetLfpMerchantState_sync", + "title": "Snippet for the get_lfp_merchant_state call in the LfpMerchantStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state.", + "file": "lfp_merchant_state_service/get_lfp_merchant_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lfp_merchant_state", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client#get_lfp_merchant_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState", + "client": { + "short_name": "LfpMerchantStateService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client" + }, + "method": { + "short_name": "GetLfpMerchantState", + "full_name": "google.shopping.merchant.lfp.v1.LfpMerchantStateService.GetLfpMerchantState", + "service": { + "short_name": "LfpMerchantStateService", + "full_name": "google.shopping.merchant.lfp.v1.LfpMerchantStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpSaleService_InsertLfpSale_sync", + "title": "Snippet for the insert_lfp_sale call in the LfpSaleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale.", + "file": "lfp_sale_service/insert_lfp_sale.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_sale", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client#insert_lfp_sale", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpSale", + "client": { + "short_name": "LfpSaleService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client" + }, + "method": { + "short_name": "InsertLfpSale", + "full_name": "google.shopping.merchant.lfp.v1.LfpSaleService.InsertLfpSale", + "service": { + "short_name": "LfpSaleService", + "full_name": "google.shopping.merchant.lfp.v1.LfpSaleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpStoreService_GetLfpStore_sync", + "title": "Snippet for the get_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store.", + "file": "lfp_store_service/get_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#get_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpStore", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" + }, + "method": { + "short_name": "GetLfpStore", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.GetLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpStoreService_InsertLfpStore_sync", + "title": "Snippet for the insert_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store.", + "file": "lfp_store_service/insert_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#insert_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::LfpStore", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" + }, + "method": { + "short_name": "InsertLfpStore", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.InsertLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpStoreService_DeleteLfpStore_sync", + "title": "Snippet for the delete_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store.", + "file": "lfp_store_service/delete_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#delete_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" + }, + "method": { + "short_name": "DeleteLfpStore", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.DeleteLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpStoreService_ListLfpStores_sync", + "title": "Snippet for the list_lfp_stores call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores.", + "file": "lfp_store_service/list_lfp_stores.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lfp_stores", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client#list_lfp_stores", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client" + }, + "method": { + "short_name": "ListLfpStores", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService.ListLfpStores", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb new file mode 100644 index 000000000000..1b912d453aef --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfp_inventory_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_lfp_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_inventory_path account: "value0", target_merchant: "value1", store_code: "value2", offer: "value3" + assert_equal "accounts/value0/lfpInventories/value1~value2~value3", path + end + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb new file mode 100644 index 000000000000..d271212a2070 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_insert_lfp_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_inventory = {} + + insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::ServiceStub.stub :transcode_insert_lfp_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb new file mode 100644 index 000000000000..34089a47e1dd --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1/lfpinventory_services_pb" +require "google/shopping/merchant/lfp/v1/lfp_inventory_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_insert_lfp_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpInventory.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" + lfp_inventory = {} + + insert_lfp_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpInventory), request["lfp_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_inventory_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::Shopping::Merchant::Lfp::V1::LfpInventoryService::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::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb new file mode 100644 index 000000000000..e628f7466ae1 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfp_merchant_state_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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_lfp_merchant_state_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_merchant_state_path account: "value0", lfp_merchant_state: "value1" + assert_equal "accounts/value0/lfpMerchantStates/value1", path + end + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb new file mode 100644 index 000000000000..a28a916a09af --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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_get_lfp_merchant_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::ServiceStub.stub :transcode_get_lfp_merchant_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lfp_merchant_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lfp_merchant_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lfp_merchant_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb new file mode 100644 index 000000000000..9afcba876650 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpmerchantstate_pb" +require "google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb" +require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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_get_lfp_merchant_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.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" + + get_lfp_merchant_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lfp_merchant_state, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lfp_merchant_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lfp_merchant_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lfp_merchant_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lfp_merchant_state ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lfp_merchant_state({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lfp_merchant_state(::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.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, get_lfp_merchant_state_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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::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::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb new file mode 100644 index 000000000000..e53832520a19 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfp_sale_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_lfp_sale_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_sale_path account: "value0", sale: "value1" + assert_equal "accounts/value0/lfpSales/value1", path + end + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb new file mode 100644 index 000000000000..e5ea1292f273 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpsale_pb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_insert_lfp_sale + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_sale = {} + + insert_lfp_sale_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::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::ServiceStub.stub :transcode_insert_lfp_sale_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_sale_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1::LfpSaleService::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::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb new file mode 100644 index 000000000000..be5fdee96488 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpsale_pb" +require "google/shopping/merchant/lfp/v1/lfpsale_services_pb" +require "google/shopping/merchant/lfp/v1/lfp_sale_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::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_insert_lfp_sale + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpSale.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" + lfp_sale = {} + + insert_lfp_sale_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_sale, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpSale), request["lfp_sale"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_sale_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_sale_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::Shopping::Merchant::Lfp::V1::LfpSaleService::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::Shopping::Merchant::Lfp::V1::LfpSaleService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb new file mode 100644 index 000000000000..29bcc6a3169d --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfp_store_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_lfp_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_store_path account: "value0", target_merchant: "value1", store_code: "value2" + assert_equal "accounts/value0/lfpStores/value1~value2", path + end + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb new file mode 100644 index 000000000000..b16d7d618996 --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb @@ -0,0 +1,319 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpstore_pb" +require "google/shopping/merchant/lfp/v1/lfp_store_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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_get_lfp_store + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_store_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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_get_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lfp_store_client_stub.call_count + end + end + end + + def test_insert_lfp_store + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_store = {} + + insert_lfp_store_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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_insert_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_store_client_stub.call_count + end + end + end + + def test_delete_lfp_store + # 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_lfp_store_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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_delete_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lfp_store_client_stub.call_count + end + end + end + + def test_list_lfp_stores + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_account = 42 + page_size = 42 + page_token = "hello world" + + list_lfp_stores_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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::ServiceStub.stub :transcode_list_lfp_stores_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lfp_stores_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1::LfpStoreService::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::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb new file mode 100644 index 000000000000..d26b7998c4eb --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/lfp/v1/lfpstore_pb" +require "google/shopping/merchant/lfp/v1/lfpstore_services_pb" +require "google/shopping/merchant/lfp/v1/lfp_store_service" + +class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::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_get_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.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" + + get_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lfp_store({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1::GetLfpStoreRequest.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, get_lfp_store_client_stub.call_rpc_count + end + end + + def test_insert_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::LfpStore.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" + lfp_store = {} + + insert_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1::LfpStore), request["lfp_store"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_store parent: parent, lfp_store: lfp_store do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_store_client_stub.call_rpc_count + end + end + + def test_delete_lfp_store + # 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_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_lfp_store({ 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_lfp_store(::Google::Shopping::Merchant::Lfp::V1::DeleteLfpStoreRequest.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_lfp_store_client_stub.call_rpc_count + end + end + + def test_list_lfp_stores + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresResponse.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" + target_account = 42 + page_size = 42 + page_token = "hello world" + + list_lfp_stores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lfp_stores, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["target_account"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lfp_stores_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores parent: parent, target_account: target_account, 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_lfp_stores ::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores({ parent: parent, target_account: target_account, 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_lfp_stores(::Google::Shopping::Merchant::Lfp::V1::ListLfpStoresRequest.new(parent: parent, target_account: target_account, 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_lfp_stores_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::Shopping::Merchant::Lfp::V1::LfpStoreService::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::Shopping::Merchant::Lfp::V1::LfpStoreService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-lfp-v1/test/helper.rb b/google-shopping-merchant-lfp-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-lfp-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 39ae937681fd..16781b8017a5 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1879,6 +1879,10 @@ "component": "google-shopping-merchant-lfp", "version_file": "lib/google/shopping/merchant/lfp/version.rb" }, + "google-shopping-merchant-lfp-v1": { + "component": "google-shopping-merchant-lfp-v1", + "version_file": "lib/google/shopping/merchant/lfp/v1/version.rb" + }, "google-shopping-merchant-lfp-v1beta": { "component": "google-shopping-merchant-lfp-v1beta", "version_file": "lib/google/shopping/merchant/lfp/v1beta/version.rb" From 7fc002fdc5aca70c278d0167d5f135c59395589e Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:31:21 -0700 Subject: [PATCH 358/457] feat: Initial generation of google-shopping-merchant-quota-v1 (#30774) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + google-shopping-merchant-quota-v1/.gitignore | 22 + .../.owlbot-manifest.json | 47 ++ .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 ++ google-shopping-merchant-quota-v1/.toys.rb | 28 + google-shopping-merchant-quota-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 +++++ .../CHANGELOG.md | 2 + google-shopping-merchant-quota-v1/Gemfile | 11 + google-shopping-merchant-quota-v1/LICENSE.md | 201 ++++++++ google-shopping-merchant-quota-v1/README.md | 154 ++++++ google-shopping-merchant-quota-v1/Rakefile | 169 +++++++ .../gapic_metadata.json | 23 + .../google-shopping-merchant-quota-v1.gemspec | 28 + .../lib/google-shopping-merchant-quota-v1.rb | 21 + .../lib/google/shopping/merchant/quota/v1.rb | 47 ++ .../shopping/merchant/quota/v1/quota_pb.rb | 52 ++ .../merchant/quota/v1/quota_service.rb | 57 +++ .../merchant/quota/v1/quota_service/client.rb | 478 ++++++++++++++++++ .../quota/v1/quota_service/credentials.rb | 49 ++ .../merchant/quota/v1/quota_service/paths.rb | 49 ++ .../merchant/quota/v1/quota_service/rest.rb | 54 ++ .../quota/v1/quota_service/rest/client.rb | 445 ++++++++++++++++ .../v1/quota_service/rest/service_stub.rb | 144 ++++++ .../merchant/quota/v1/quota_services_pb.rb | 48 ++ .../google/shopping/merchant/quota/v1/rest.rb | 39 ++ .../shopping/merchant/quota/v1/version.rb | 30 ++ .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++++++++++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++++ .../proto_docs/google/api/launch_stage.rb | 71 +++ .../proto_docs/google/api/resource.rb | 227 +++++++++ .../proto_docs/google/protobuf/duration.rb | 98 ++++ .../shopping/merchant/quota/v1/quota.rb | 108 ++++ .../snippets/Gemfile | 32 ++ .../quota_service/list_quota_groups.rb | 51 ++ ...ata_google.shopping.merchant.quota.v1.json | 55 ++ .../quota/v1/quota_service_paths_test.rb | 55 ++ .../quota/v1/quota_service_rest_test.rb | 155 ++++++ .../merchant/quota/v1/quota_service_test.rb | 152 ++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 44 files changed, 3982 insertions(+) create mode 100644 google-shopping-merchant-quota-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-quota-v1/.gitignore create mode 100644 google-shopping-merchant-quota-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-quota-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-quota-v1/.rubocop.yml create mode 100644 google-shopping-merchant-quota-v1/.toys.rb create mode 100644 google-shopping-merchant-quota-v1/.yardopts create mode 100644 google-shopping-merchant-quota-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-quota-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-quota-v1/Gemfile create mode 100644 google-shopping-merchant-quota-v1/LICENSE.md create mode 100644 google-shopping-merchant-quota-v1/README.md create mode 100644 google-shopping-merchant-quota-v1/Rakefile create mode 100644 google-shopping-merchant-quota-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec create mode 100644 google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb create mode 100644 google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb create mode 100644 google-shopping-merchant-quota-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-quota-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-quota-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-quota-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-quota-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb create mode 100644 google-shopping-merchant-quota-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb create mode 100644 google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json create mode 100644 google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb create mode 100644 google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb create mode 100644 google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb create mode 100644 google-shopping-merchant-quota-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 38d9c27f1125..548d350f1cca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -957,6 +957,8 @@ "google-shopping-merchant-promotions-v1beta+FILLER": "0.0.0", "google-shopping-merchant-quota": "0.2.1", "google-shopping-merchant-quota+FILLER": "0.0.0", + "google-shopping-merchant-quota-v1": "0.0.1", + "google-shopping-merchant-quota-v1+FILLER": "0.0.0", "google-shopping-merchant-quota-v1beta": "0.4.0", "google-shopping-merchant-quota-v1beta+FILLER": "0.0.0", "google-shopping-merchant-reports": "0.4.1", diff --git a/google-shopping-merchant-quota-v1/.OwlBot.yaml b/google-shopping-merchant-quota-v1/.OwlBot.yaml new file mode 100644 index 000000000000..c8b481dab0a0 --- /dev/null +++ b/google-shopping-merchant-quota-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/quota/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-quota-v1/$1 diff --git a/google-shopping-merchant-quota-v1/.gitignore b/google-shopping-merchant-quota-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-quota-v1/.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/google-shopping-merchant-quota-v1/.owlbot-manifest.json b/google-shopping-merchant-quota-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..ffbbddb5f0fb --- /dev/null +++ b/google-shopping-merchant-quota-v1/.owlbot-manifest.json @@ -0,0 +1,47 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-quota-v1.gemspec", + "lib/google-shopping-merchant-quota-v1.rb", + "lib/google/shopping/merchant/quota/v1.rb", + "lib/google/shopping/merchant/quota/v1/quota_pb.rb", + "lib/google/shopping/merchant/quota/v1/quota_service.rb", + "lib/google/shopping/merchant/quota/v1/quota_service/client.rb", + "lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb", + "lib/google/shopping/merchant/quota/v1/quota_service/paths.rb", + "lib/google/shopping/merchant/quota/v1/quota_service/rest.rb", + "lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb", + "lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb", + "lib/google/shopping/merchant/quota/v1/quota_services_pb.rb", + "lib/google/shopping/merchant/quota/v1/rest.rb", + "lib/google/shopping/merchant/quota/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/shopping/merchant/quota/v1/quota.rb", + "snippets/Gemfile", + "snippets/quota_service/list_quota_groups.rb", + "snippets/snippet_metadata_google.shopping.merchant.quota.v1.json", + "test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb", + "test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb", + "test/google/shopping/merchant/quota/v1/quota_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-quota-v1/.repo-metadata.json b/google-shopping-merchant-quota-v1/.repo-metadata.json new file mode 100644 index 000000000000..eb3e2f5d1eed --- /dev/null +++ b/google-shopping-merchant-quota-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-quota-v1", + "distribution_name": "google-shopping-merchant-quota-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-quota-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-quota-v1/.rubocop.yml b/google-shopping-merchant-quota-v1/.rubocop.yml new file mode 100644 index 000000000000..099a22ee1141 --- /dev/null +++ b/google-shopping-merchant-quota-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-quota-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-quota-v1.rb" diff --git a/google-shopping-merchant-quota-v1/.toys.rb b/google-shopping-merchant-quota-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-quota-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-quota-v1/.yardopts b/google-shopping-merchant-quota-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-quota-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-quota-v1/AUTHENTICATION.md b/google-shopping-merchant-quota-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..33b8588ef0fa --- /dev/null +++ b/google-shopping-merchant-quota-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-quota-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-quota-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/quota/v1" + +client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/quota/v1" + +::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::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-shopping-merchant-quota-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/quota/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::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/google-shopping-merchant-quota-v1/CHANGELOG.md b/google-shopping-merchant-quota-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-quota-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-quota-v1/Gemfile b/google-shopping-merchant-quota-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-quota-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-quota-v1/LICENSE.md b/google-shopping-merchant-quota-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-quota-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-quota-v1/README.md b/google-shopping-merchant-quota-v1/README.md new file mode 100644 index 000000000000..c6f8b83cb11c --- /dev/null +++ b/google-shopping-merchant-quota-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-quota](https://rubygems.org/gems/google-shopping-merchant-quota). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-quota-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/quota/v1" + +client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new +request = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new # (request fields as keyword arguments...) +response = client.list_quota_groups request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-quota-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/quota/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::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-shopping-merchant-quota`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-quota-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-quota`. +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-shopping-merchant-quota-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-quota-v1/Rakefile b/google-shopping-merchant-quota-v1/Rakefile new file mode 100644 index 000000000000..f22318dc5f1f --- /dev/null +++ b/google-shopping-merchant-quota-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-quota-v1 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/shopping/merchant/quota/v1/quota_service/credentials" + ::Google::Shopping::Merchant::Quota::V1::QuotaService::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-shopping-merchant-quota-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-quota-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-quota-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-quota-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-quota-v1" + header "google-shopping-merchant-quota-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-quota-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-quota-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-quota-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-quota-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-quota-v1/gapic_metadata.json b/google-shopping-merchant-quota-v1/gapic_metadata.json new file mode 100644 index 000000000000..7228148b9027 --- /dev/null +++ b/google-shopping-merchant-quota-v1/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.quota.v1", + "libraryPackage": "::Google::Shopping::Merchant::Quota::V1", + "services": { + "QuotaService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client", + "rpcs": { + "ListQuotaGroups": { + "methods": [ + "list_quota_groups" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec b/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec new file mode 100644 index 000000000000..6c3e96bdf787 --- /dev/null +++ b/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/quota/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-quota-v1" + gem.version = Google::Shopping::Merchant::Quota::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-quota-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb b/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb new file mode 100644 index 000000000000..4d1bb59491c8 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1" diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb new file mode 100644 index 000000000000..cb7c4560dcb4 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_service" +require "google/shopping/merchant/quota/v1/version" + +module Google + module Shopping + module Merchant + module Quota + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/quota/v1" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/quota/v1" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/quota/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb new file mode 100644 index 000000000000..8114efe2e035 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/quota/v1/quota.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' + + +descriptor_data = "\n-google/shopping/merchant/quota/v1/quota.proto\x12!google.shopping.merchant.quota.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12M\n\x0emethod_details\x18\x04 \x03(\x0b\x32\x30.google.shopping.merchant.quota.v1.MethodDetailsB\x03\xe0\x41\x03:f\xea\x41\x63\n%merchantapi.googleapis.com/QuotaGroup\x12!accounts/{account}/groups/{group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x88\x01\n\x16ListQuotaGroupsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/QuotaGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x17ListQuotaGroupsResponse\x12\x43\n\x0cquota_groups\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.quota.v1.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x99\x02\n\x0cQuotaService\x12\xbf\x01\n\x0fListQuotaGroups\x12\x39.google.shopping.merchant.quota.v1.ListQuotaGroupsRequest\x1a:.google.shopping.merchant.quota.v1.ListQuotaGroupsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/quota/v1/{parent=accounts/*}/quotas\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa3\x02\n%com.google.shopping.merchant.quota.v1B\nQuotaProtoP\x01ZAcloud.google.com/go/shopping/merchant/quota/apiv1/quotapb;quotapb\xaa\x02!Google.Shopping.Merchant.Quota.V1\xca\x02!Google\\Shopping\\Merchant\\Quota\\V1\xea\x02%Google::Shopping::Merchant::Quota::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Quota + module V1 + QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.QuotaGroup").msgclass + MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.MethodDetails").msgclass + ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListQuotaGroupsRequest").msgclass + ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListQuotaGroupsResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb new file mode 100644 index 000000000000..39237f002881 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/version" + +require "google/shopping/merchant/quota/v1/quota_service/credentials" +require "google/shopping/merchant/quota/v1/quota_service/paths" +require "google/shopping/merchant/quota/v1/quota_service/client" +require "google/shopping/merchant/quota/v1/quota_service/rest" + +module Google + module Shopping + module Merchant + module Quota + module V1 + ## + # Service to get method call quota information per Merchant API method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/quota/v1/quota_service" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/quota/v1/quota_service/rest" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + module QuotaService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "quota_service", "helpers.rb" +require "google/shopping/merchant/quota/v1/quota_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb new file mode 100644 index 000000000000..e0b7d226ff94 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb @@ -0,0 +1,478 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_pb" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + ## + # Client for the QuotaService service. + # + # Service to get method call quota information per Merchant API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Merchant::Quota::V1::QuotaService::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", "Shopping", "Merchant", "Quota", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 QuotaService 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::Shopping::Merchant::Quota::V1::QuotaService::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 + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService 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/shopping/merchant/quota/v1/quota_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 + + @quota_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Quota::V1::QuotaService::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 + ) + + @quota_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 + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your Merchant + # Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::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_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` 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 merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups 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::Shopping::Merchant::Quota::V1::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest + + # 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_quota_groups.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::Shopping::Merchant::Quota::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, 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 QuotaService API. + # + # This class represents the configuration for QuotaService, + # 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::Shopping::Merchant::Quota::V1::QuotaService::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 + # # list_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 QuotaService 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 `list_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb new file mode 100644 index 000000000000..792470e0e176 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Quota + module V1 + module QuotaService + # Credentials for the QuotaService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb new file mode 100644 index 000000000000..e02f7419d09d --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Quota + module V1 + module QuotaService + # Path helper methods for the QuotaService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb new file mode 100644 index 000000000000..decba3c9ec96 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/version" + +require "google/shopping/merchant/quota/v1/quota_service/credentials" +require "google/shopping/merchant/quota/v1/quota_service/paths" +require "google/shopping/merchant/quota/v1/quota_service/rest/client" + +module Google + module Shopping + module Merchant + module Quota + module V1 + ## + # Service to get method call quota information per Merchant API method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/quota/v1/quota_service/rest" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + module QuotaService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/quota/v1/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb new file mode 100644 index 000000000000..347efb3f2af5 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb @@ -0,0 +1,445 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_pb" +require "google/shopping/merchant/quota/v1/quota_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + module Rest + ## + # REST client for the QuotaService service. + # + # Service to get method call quota information per Merchant API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Merchant::Quota::V1::QuotaService::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", "Shopping", "Merchant", "Quota", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 QuotaService 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::Shopping::Merchant::Quota::V1::QuotaService::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 + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService 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 + + @quota_service_stub = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @quota_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 + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your Merchant + # Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::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_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` 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 merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups 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::Shopping::Merchant::Quota::V1::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest + + # 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_quota_groups.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::Shopping::Merchant::Quota::V1::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_quota_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.list_quota_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", 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 QuotaService REST API. + # + # This class represents the configuration for QuotaService 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::Shopping::Merchant::Quota::V1::QuotaService::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 + # # list_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.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 = "merchantapi.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 QuotaService 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 `list_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb new file mode 100644 index 000000000000..46d88e8ad73e --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_pb" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + module Rest + ## + # REST service stub for the QuotaService 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: true, + 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 list_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest] + # 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::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse] + # A result object deserialized from the server's reply + def list_quota_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_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_quota_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.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 list_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest] + # 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_quota_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/quota/v1/{parent}/quotas", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb new file mode 100644 index 000000000000..09d599f405c2 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/quota/v1/quota.proto for package 'Google.Shopping.Merchant.Quota.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_pb' + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + # Service to get method call quota information per Merchant API method. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.quota.v1.QuotaService' + + # Lists the daily call quota and usage per group for your Merchant + # Center account. + rpc :ListQuotaGroups, ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb new file mode 100644 index 000000000000..ac78198a05a8 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_service/rest" +require "google/shopping/merchant/quota/v1/version" + +module Google + module Shopping + module Merchant + module Quota + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/quota/v1/rest" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb new file mode 100644 index 000000000000..7dfdcd54fec6 --- /dev/null +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Quota + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/proto_docs/README.md b/google-shopping-merchant-quota-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-quota-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-quota-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-quota-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-quota-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-quota-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-quota-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-quota-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-quota-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-quota-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-quota-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-quota-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-quota-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-quota-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb b/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb new file mode 100644 index 000000000000..cece14964234 --- /dev/null +++ b/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Quota + module V1 + # The group information for methods in the Merchant API. The quota is shared + # between all methods in the group. Even if none of the methods within the + # group have usage the information for the group is returned. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the quota group. + # Format: accounts/\\{account}/quotas/\\{group} + # Note: There is no guarantee on the format of \\{group} + # @!attribute [r] quota_usage + # @return [::Integer] + # Output only. The current quota usage, meaning the number of calls already + # made on a given day to the methods in the group. The daily quota limits + # reset at at 12:00 PM midday UTC. + # @!attribute [r] quota_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per day for the group. + # @!attribute [r] quota_minute_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per minute for the group. + # @!attribute [r] method_details + # @return [::Array<::Google::Shopping::Merchant::Quota::V1::MethodDetails>] + # Output only. List of all methods group quota applies to. + class QuotaGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The method details per method in the Merchant API. + # @!attribute [r] method + # @return [::String] + # Output only. The name of the method for example `products.list`. + # @!attribute [r] version + # @return [::String] + # Output only. The API version that the method belongs to. + # @!attribute [r] subapi + # @return [::String] + # Output only. The sub-API that the method belongs to. + # @!attribute [r] path + # @return [::String] + # Output only. The path for the method such as + # `products/v1/productInputs.insert` + class MethodDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListQuotaGroups method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + class ListQuotaGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListMethodGroups method. + # @!attribute [rw] quota_groups + # @return [::Array<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # The methods, current quota usage and limits per each group. The quota is + # shared between all methods in the group. The groups are sorted in + # descending order based on + # {::Google::Shopping::Merchant::Quota::V1::QuotaGroup#quota_usage quota_usage}. + # @!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 ListQuotaGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-quota-v1/snippets/Gemfile b/google-shopping-merchant-quota-v1/snippets/Gemfile new file mode 100644 index 000000000000..05a3bb9683bd --- /dev/null +++ b/google-shopping-merchant-quota-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-quota-v1", path: "../" +else + gem "google-shopping-merchant-quota-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb b/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb new file mode 100644 index 000000000000..218ac75bae56 --- /dev/null +++ b/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync] +require "google/shopping/merchant/quota/v1" + +## +# Snippet for the list_quota_groups call in the QuotaService 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::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups. +# +def list_quota_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new + + # Call the list_quota_groups method. + result = client.list_quota_groups 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::Shopping::Merchant::Quota::V1::QuotaGroup. + p item + end +end +# [END merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync] diff --git a/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json b/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json new file mode 100644 index 000000000000..7d8479a1017f --- /dev/null +++ b/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-shopping-merchant-quota-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.quota.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync", + "title": "Snippet for the list_quota_groups call in the QuotaService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups.", + "file": "quota_service/list_quota_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_quota_groups", + "full_name": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse", + "client": { + "short_name": "QuotaService::Client", + "full_name": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client" + }, + "method": { + "short_name": "ListQuotaGroups", + "full_name": "google.shopping.merchant.quota.v1.QuotaService.ListQuotaGroups", + "service": { + "short_name": "QuotaService", + "full_name": "google.shopping.merchant.quota.v1.QuotaService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb b/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb new file mode 100644 index 000000000000..b14e5f140d43 --- /dev/null +++ b/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_service" + +class ::Google::Shopping::Merchant::Quota::V1::QuotaService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb b/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb new file mode 100644 index 000000000000..cebeca63e003 --- /dev/null +++ b/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_pb" +require "google/shopping/merchant/quota/v1/quota_service/rest" + + +class ::Google::Shopping::Merchant::Quota::V1::QuotaService::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_list_quota_groups + # Create test objects. + client_result = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_quota_groups_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::Shopping::Merchant::Quota::V1::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, 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_quota_groups({ parent: parent, 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_quota_groups(::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, 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_quota_groups_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::Shopping::Merchant::Quota::V1::QuotaService::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::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb b/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb new file mode 100644 index 000000000000..70d2aa05d425 --- /dev/null +++ b/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/quota/v1/quota_pb" +require "google/shopping/merchant/quota/v1/quota_services_pb" +require "google/shopping/merchant/quota/v1/quota_service" + +class ::Google::Shopping::Merchant::Quota::V1::QuotaService::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_list_quota_groups + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.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" + page_size = 42 + page_token = "hello world" + + list_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_quota_groups, name + assert_kind_of ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_quota_groups_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_quota_groups({ parent: parent, 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_quota_groups parent: parent, 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_quota_groups ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, 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_quota_groups({ parent: parent, 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_quota_groups(::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, 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_quota_groups_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::Shopping::Merchant::Quota::V1::QuotaService::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::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-quota-v1/test/helper.rb b/google-shopping-merchant-quota-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-quota-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 16781b8017a5..00449a81c87c 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1927,6 +1927,10 @@ "component": "google-shopping-merchant-quota", "version_file": "lib/google/shopping/merchant/quota/version.rb" }, + "google-shopping-merchant-quota-v1": { + "component": "google-shopping-merchant-quota-v1", + "version_file": "lib/google/shopping/merchant/quota/v1/version.rb" + }, "google-shopping-merchant-quota-v1beta": { "component": "google-shopping-merchant-quota-v1beta", "version_file": "lib/google/shopping/merchant/quota/v1beta/version.rb" From 4bb034c3df902af12da7fcdcadbdc1e708fbbf97 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Wed, 6 Aug 2025 16:32:25 -0700 Subject: [PATCH 359/457] feat(storage): Require Ruby 3.1 or later (#30765) --- google-cloud-storage/README.md | 12 ++++++------ google-cloud-storage/google-cloud-storage.gemspec | 4 ++-- .../lib/google/cloud/storage/policy/bindings.rb | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/google-cloud-storage/README.md b/google-cloud-storage/README.md index a44d970e0a62..a4fbcf84d147 100644 --- a/google-cloud-storage/README.md +++ b/google-cloud-storage/README.md @@ -60,14 +60,14 @@ Google::Apis.logger = my_logger ## Supported Ruby Versions -This library is supported on Ruby 3.0.0+. +This library is supported on Ruby 3.1+. 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. Currently, this means Ruby 3.0.0 and -later. 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. +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. ## Versioning diff --git a/google-cloud-storage/google-cloud-storage.gemspec b/google-cloud-storage/google-cloud-storage.gemspec index 58e510bdaf63..560278c9c5f9 100644 --- a/google-cloud-storage/google-cloud-storage.gemspec +++ b/google-cloud-storage/google-cloud-storage.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |gem| ["OVERVIEW.md", "AUTHENTICATION.md", "LOGGING.md", "CONTRIBUTING.md", "TROUBLESHOOTING.md", "CHANGELOG.md", "CODE_OF_CONDUCT.md", "LICENSE", ".yardopts"] gem.require_paths = ["lib"] - gem.required_ruby_version = ">= 3.0.0" + gem.required_ruby_version = ">= 3.1.0" gem.add_dependency "google-cloud-core", "~> 1.6" gem.add_dependency "google-apis-core", "~> 0.13" @@ -27,7 +27,7 @@ Gem::Specification.new do |gem| gem.add_dependency "addressable", "~> 2.8" gem.add_dependency "mini_mime", "~> 1.0" - gem.add_development_dependency "google-style", "~> 1.30.0" + gem.add_development_dependency "google-style", "~> 1.31.1" gem.add_development_dependency "minitest", "~> 5.16" gem.add_development_dependency "minitest-autotest", "~> 1.0" gem.add_development_dependency "minitest-focus", "~> 1.1" diff --git a/google-cloud-storage/lib/google/cloud/storage/policy/bindings.rb b/google-cloud-storage/lib/google/cloud/storage/policy/bindings.rb index 5401f12bc2f4..70efc66a1d1a 100644 --- a/google-cloud-storage/lib/google/cloud/storage/policy/bindings.rb +++ b/google-cloud-storage/lib/google/cloud/storage/policy/bindings.rb @@ -168,10 +168,10 @@ def remove *bindings # puts binding.role # end # - def each &block + def each(&) return enum_for :each unless block_given? - @bindings.each(&block) + @bindings.each(&) end ## From f1f6d0a850c8e76da5f03ea50ad97b7d00ad36d2 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:33:01 -0700 Subject: [PATCH 360/457] feat: Initial generation of google-shopping-merchant-accounts-v1 (#30772) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 405 +++ .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + google-shopping-merchant-accounts-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + google-shopping-merchant-accounts-v1/Gemfile | 11 + .../LICENSE.md | 201 ++ .../README.md | 154 + google-shopping-merchant-accounts-v1/Rakefile | 169 + .../gapic_metadata.json | 557 ++++ ...ogle-shopping-merchant-accounts-v1.gemspec | 29 + .../google-shopping-merchant-accounts-v1.rb | 21 + .../google/shopping/merchant/accounts/v1.rb | 68 + .../merchant/accounts/v1/accessright_pb.rb | 44 + .../accounts/v1/account_issue_service.rb | 57 + .../v1/account_issue_service/client.rb | 497 +++ .../v1/account_issue_service/credentials.rb | 49 + .../v1/account_issue_service/paths.rb | 49 + .../accounts/v1/account_issue_service/rest.rb | 54 + .../v1/account_issue_service/rest/client.rb | 464 +++ .../rest/service_stub.rb | 144 + .../v1/account_relationships_service.rb | 57 + .../account_relationships_service/client.rb | 671 ++++ .../credentials.rb | 49 + .../v1/account_relationships_service/paths.rb | 66 + .../v1/account_relationships_service/rest.rb | 54 + .../rest/client.rb | 624 ++++ .../rest/service_stub.rb | 267 ++ .../accounts/v1/account_services_service.rb | 57 + .../v1/account_services_service/client.rb | 856 +++++ .../account_services_service/credentials.rb | 49 + .../v1/account_services_service/paths.rb | 66 + .../v1/account_services_service/rest.rb | 54 + .../account_services_service/rest/client.rb | 795 +++++ .../rest/service_stub.rb | 391 +++ .../merchant/accounts/v1/accountissue_pb.rb | 55 + .../accounts/v1/accountissue_services_pb.rb | 54 + .../accounts/v1/accountrelationships_pb.rb | 55 + .../v1/accountrelationships_services_pb.rb | 52 + .../merchant/accounts/v1/accounts_pb.rb | 68 + .../merchant/accounts/v1/accounts_service.rb | 57 + .../accounts/v1/accounts_service/client.rb | 987 ++++++ .../v1/accounts_service/credentials.rb | 49 + .../accounts/v1/accounts_service/paths.rb | 66 + .../accounts/v1/accounts_service/rest.rb | 54 + .../v1/accounts_service/rest/client.rb | 935 ++++++ .../v1/accounts_service/rest/service_stub.rb | 447 +++ .../accounts/v1/accounts_services_pb.rb | 74 + .../accounts/v1/accountservices_pb.rb | 65 + .../v1/accountservices_services_pb.rb | 56 + .../accounts/v1/autofeed_settings_service.rb | 58 + .../v1/autofeed_settings_service/client.rb | 560 ++++ .../autofeed_settings_service/credentials.rb | 49 + .../v1/autofeed_settings_service/paths.rb | 49 + .../v1/autofeed_settings_service/rest.rb | 55 + .../autofeed_settings_service/rest/client.rb | 520 +++ .../rest/service_stub.rb | 206 ++ .../accounts/v1/autofeedsettings_pb.rb | 53 + .../v1/autofeedsettings_services_pb.rb | 50 + .../v1/automatic_improvements_service.rb | 59 + .../automatic_improvements_service/client.rb | 570 ++++ .../credentials.rb | 49 + .../automatic_improvements_service/paths.rb | 49 + .../v1/automatic_improvements_service/rest.rb | 56 + .../rest/client.rb | 530 ++++ .../rest/service_stub.rb | 206 ++ .../accounts/v1/automaticimprovements_pb.rb | 58 + .../v1/automaticimprovements_services_pb.rb | 51 + .../accounts/v1/business_identity_service.rb | 58 + .../v1/business_identity_service/client.rb | 572 ++++ .../business_identity_service/credentials.rb | 49 + .../v1/business_identity_service/paths.rb | 49 + .../v1/business_identity_service/rest.rb | 55 + .../business_identity_service/rest/client.rb | 532 ++++ .../rest/service_stub.rb | 206 ++ .../accounts/v1/business_info_service.rb | 57 + .../v1/business_info_service/client.rb | 568 ++++ .../v1/business_info_service/credentials.rb | 49 + .../v1/business_info_service/paths.rb | 49 + .../accounts/v1/business_info_service/rest.rb | 54 + .../v1/business_info_service/rest/client.rb | 528 ++++ .../rest/service_stub.rb | 206 ++ .../accounts/v1/businessidentity_pb.rb | 56 + .../v1/businessidentity_services_pb.rb | 51 + .../merchant/accounts/v1/businessinfo_pb.rb | 60 + .../accounts/v1/businessinfo_services_pb.rb | 50 + .../accounts/v1/checkout_settings_service.rb | 58 + .../v1/checkout_settings_service/client.rb | 757 +++++ .../checkout_settings_service/credentials.rb | 49 + .../v1/checkout_settings_service/paths.rb | 69 + .../v1/checkout_settings_service/rest.rb | 55 + .../checkout_settings_service/rest/client.rb | 703 ++++ .../rest/service_stub.rb | 329 ++ .../accounts/v1/checkoutsettings_pb.rb | 60 + .../v1/checkoutsettings_services_pb.rb | 56 + .../accounts/v1/customerservice_pb.rb | 48 + .../v1/developer_registration_service.rb | 57 + .../developer_registration_service/client.rb | 665 ++++ .../credentials.rb | 49 + .../developer_registration_service/paths.rb | 49 + .../v1/developer_registration_service/rest.rb | 54 + .../rest/client.rb | 618 ++++ .../rest/service_stub.rb | 268 ++ .../accounts/v1/developerregistration_pb.rb | 53 + .../v1/developerregistration_services_pb.rb | 56 + .../accounts/v1/email_preferences_service.rb | 57 + .../v1/email_preferences_service/client.rb | 579 ++++ .../email_preferences_service/credentials.rb | 49 + .../v1/email_preferences_service/paths.rb | 52 + .../v1/email_preferences_service/rest.rb | 54 + .../email_preferences_service/rest/client.rb | 539 ++++ .../rest/service_stub.rb | 206 ++ .../accounts/v1/emailpreferences_pb.rb | 54 + .../v1/emailpreferences_services_pb.rb | 64 + .../accounts/v1/gbp_accounts_service.rb | 60 + .../v1/gbp_accounts_service/client.rb | 585 ++++ .../v1/gbp_accounts_service/credentials.rb | 49 + .../accounts/v1/gbp_accounts_service/paths.rb | 49 + .../accounts/v1/gbp_accounts_service/rest.rb | 57 + .../v1/gbp_accounts_service/rest/client.rb | 545 ++++ .../gbp_accounts_service/rest/service_stub.rb | 206 ++ .../merchant/accounts/v1/gbpaccounts_pb.rb | 56 + .../accounts/v1/gbpaccounts_services_pb.rb | 56 + .../merchant/accounts/v1/homepage_pb.rb | 55 + .../merchant/accounts/v1/homepage_service.rb | 57 + .../accounts/v1/homepage_service/client.rb | 774 +++++ .../v1/homepage_service/credentials.rb | 49 + .../accounts/v1/homepage_service/paths.rb | 49 + .../accounts/v1/homepage_service/rest.rb | 54 + .../v1/homepage_service/rest/client.rb | 720 +++++ .../v1/homepage_service/rest/service_stub.rb | 330 ++ .../accounts/v1/homepage_services_pb.rb | 73 + .../accounts/v1/lfp_providers_service.rb | 59 + .../v1/lfp_providers_service/client.rb | 584 ++++ .../v1/lfp_providers_service/credentials.rb | 49 + .../v1/lfp_providers_service/paths.rb | 71 + .../accounts/v1/lfp_providers_service/rest.rb | 56 + .../v1/lfp_providers_service/rest/client.rb | 544 ++++ .../rest/service_stub.rb | 206 ++ .../merchant/accounts/v1/lfpproviders_pb.rb | 55 + .../accounts/v1/lfpproviders_services_pb.rb | 51 + .../v1/omnichannel_settings_service.rb | 60 + .../v1/omnichannel_settings_service/client.rb | 875 +++++ .../credentials.rb | 49 + .../v1/omnichannel_settings_service/paths.rb | 66 + .../v1/omnichannel_settings_service/rest.rb | 57 + .../rest/client.rb | 814 +++++ .../rest/service_stub.rb | 391 +++ .../accounts/v1/omnichannelsettings_pb.rb | 68 + .../v1/omnichannelsettings_services_pb.rb | 58 + .../accounts/v1/online_return_policy_pb.rb | 68 + .../v1/online_return_policy_service.rb | 61 + .../v1/online_return_policy_service/client.rb | 771 +++++ .../credentials.rb | 49 + .../v1/online_return_policy_service/paths.rb | 66 + .../v1/online_return_policy_service/rest.rb | 58 + .../rest/client.rb | 717 +++++ .../rest/service_stub.rb | 328 ++ .../v1/online_return_policy_services_pb.rb | 57 + .../accounts/v1/phoneverificationstate_pb.rb | 44 + .../merchant/accounts/v1/programs_pb.rb | 56 + .../merchant/accounts/v1/programs_service.rb | 67 + .../accounts/v1/programs_service/client.rb | 770 +++++ .../v1/programs_service/credentials.rb | 49 + .../accounts/v1/programs_service/paths.rb | 66 + .../accounts/v1/programs_service/rest.rb | 64 + .../v1/programs_service/rest/client.rb | 716 +++++ .../v1/programs_service/rest/service_stub.rb | 329 ++ .../accounts/v1/programs_services_pb.rb | 63 + .../merchant/accounts/v1/regions_pb.rb | 63 + .../merchant/accounts/v1/regions_service.rb | 61 + .../accounts/v1/regions_service/client.rb | 869 +++++ .../v1/regions_service/credentials.rb | 49 + .../accounts/v1/regions_service/paths.rb | 66 + .../accounts/v1/regions_service/rest.rb | 58 + .../v1/regions_service/rest/client.rb | 808 +++++ .../v1/regions_service/rest/service_stub.rb | 390 +++ .../accounts/v1/regions_services_pb.rb | 62 + .../shopping/merchant/accounts/v1/rest.rb | 60 + .../accounts/v1/shipping_settings_service.rb | 58 + .../v1/shipping_settings_service/client.rb | 564 ++++ .../shipping_settings_service/credentials.rb | 49 + .../v1/shipping_settings_service/paths.rb | 63 + .../v1/shipping_settings_service/rest.rb | 55 + .../shipping_settings_service/rest/client.rb | 524 +++ .../rest/service_stub.rb | 206 ++ .../accounts/v1/shippingsettings_pb.rb | 83 + .../v1/shippingsettings_services_pb.rb | 51 + ...erms_of_service_agreement_state_service.rb | 57 + .../client.rb | 563 ++++ .../credentials.rb | 49 + .../paths.rb | 66 + .../rest.rb | 54 + .../rest/client.rb | 523 +++ .../rest/service_stub.rb | 205 ++ .../accounts/v1/terms_of_service_service.rb | 57 + .../v1/terms_of_service_service/client.rb | 654 ++++ .../terms_of_service_service/credentials.rb | 49 + .../v1/terms_of_service_service/paths.rb | 63 + .../v1/terms_of_service_service/rest.rb | 54 + .../terms_of_service_service/rest/client.rb | 615 ++++ .../rest/service_stub.rb | 264 ++ .../merchant/accounts/v1/termsofservice_pb.rb | 56 + .../accounts/v1/termsofservice_services_pb.rb | 52 + .../v1/termsofserviceagreementstate_pb.rb | 56 + ...ermsofserviceagreementstate_services_pb.rb | 53 + .../accounts/v1/termsofservicekind_pb.rb | 44 + .../shopping/merchant/accounts/v1/user_pb.rb | 60 + .../merchant/accounts/v1/user_service.rb | 57 + .../accounts/v1/user_service/client.rb | 879 +++++ .../accounts/v1/user_service/credentials.rb | 49 + .../accounts/v1/user_service/paths.rb | 66 + .../merchant/accounts/v1/user_service/rest.rb | 54 + .../accounts/v1/user_service/rest/client.rb | 818 +++++ .../v1/user_service/rest/service_stub.rb | 390 +++ .../merchant/accounts/v1/user_services_pb.rb | 60 + .../shopping/merchant/accounts/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../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/wrappers.rb | 121 + .../merchant/accounts/v1/accessright.rb | 51 + .../merchant/accounts/v1/accountissue.rb | 144 + .../accounts/v1/accountrelationships.rb | 124 + .../shopping/merchant/accounts/v1/accounts.rb | 250 ++ .../merchant/accounts/v1/accountservices.rb | 288 ++ .../merchant/accounts/v1/autofeedsettings.rb | 75 + .../accounts/v1/automaticimprovements.rb | 235 ++ .../merchant/accounts/v1/businessidentity.rb | 140 + .../merchant/accounts/v1/businessinfo.rb | 91 + .../merchant/accounts/v1/checkoutsettings.rb | 187 ++ .../merchant/accounts/v1/customerservice.rb | 43 + .../accounts/v1/developerregistration.rb | 82 + .../merchant/accounts/v1/emailpreferences.rb | 87 + .../merchant/accounts/v1/gbpaccounts.rb | 123 + .../shopping/merchant/accounts/v1/homepage.rb | 106 + .../merchant/accounts/v1/lfpproviders.rb | 108 + .../accounts/v1/omnichannelsettings.rb | 336 ++ .../accounts/v1/online_return_policy.rb | 317 ++ .../accounts/v1/phoneverificationstate.rb | 40 + .../shopping/merchant/accounts/v1/programs.rb | 170 + .../shopping/merchant/accounts/v1/regions.rb | 195 ++ .../merchant/accounts/v1/shippingsettings.rb | 757 +++++ .../merchant/accounts/v1/termsofservice.rb | 118 + .../v1/termsofserviceagreementstate.rb | 136 + .../accounts/v1/termsofservicekind.rb | 37 + .../shopping/merchant/accounts/v1/user.rb | 164 + .../proto_docs/google/shopping/type/types.rb | 210 ++ .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/datetime.rb | 103 + .../proto_docs/google/type/phone_number.rb | 116 + .../proto_docs/google/type/postal_address.rb | 135 + .../snippets/Gemfile | 32 + .../list_account_issues.rb | 51 + .../get_account_relationship.rb | 47 + .../list_account_relationships.rb | 51 + .../update_account_relationship.rb | 47 + .../approve_account_service.rb | 47 + .../get_account_service.rb | 47 + .../list_account_services.rb | 51 + .../propose_account_service.rb | 47 + .../reject_account_service.rb | 47 + .../create_and_configure_account.rb | 47 + .../accounts_service/delete_account.rb | 47 + .../snippets/accounts_service/get_account.rb | 47 + .../accounts_service/list_accounts.rb | 51 + .../accounts_service/list_sub_accounts.rb | 51 + .../accounts_service/update_account.rb | 47 + .../get_autofeed_settings.rb | 47 + .../update_autofeed_settings.rb | 47 + .../get_automatic_improvements.rb | 47 + .../update_automatic_improvements.rb | 47 + .../get_business_identity.rb | 47 + .../update_business_identity.rb | 47 + .../get_business_info.rb | 47 + .../update_business_info.rb | 47 + .../create_checkout_settings.rb | 47 + .../delete_checkout_settings.rb | 47 + .../get_checkout_settings.rb | 47 + .../update_checkout_settings.rb | 47 + .../get_developer_registration.rb | 47 + .../register_gcp.rb | 47 + .../unregister_gcp.rb | 47 + .../get_email_preferences.rb | 47 + .../update_email_preferences.rb | 47 + .../gbp_accounts_service/link_gbp_account.rb | 47 + .../gbp_accounts_service/list_gbp_accounts.rb | 51 + .../homepage_service/claim_homepage.rb | 47 + .../snippets/homepage_service/get_homepage.rb | 47 + .../homepage_service/unclaim_homepage.rb | 47 + .../homepage_service/update_homepage.rb | 47 + .../find_lfp_providers.rb | 51 + .../link_lfp_provider.rb | 47 + .../create_omnichannel_setting.rb | 47 + .../get_omnichannel_setting.rb | 47 + .../list_omnichannel_settings.rb | 51 + .../request_inventory_verification.rb | 47 + .../update_omnichannel_setting.rb | 47 + .../create_online_return_policy.rb | 47 + .../delete_online_return_policy.rb | 47 + .../get_online_return_policy.rb | 47 + .../list_online_return_policies.rb | 51 + .../programs_service/disable_program.rb | 47 + .../programs_service/enable_program.rb | 47 + .../snippets/programs_service/get_program.rb | 47 + .../programs_service/list_programs.rb | 51 + .../snippets/regions_service/create_region.rb | 47 + .../snippets/regions_service/delete_region.rb | 47 + .../snippets/regions_service/get_region.rb | 47 + .../snippets/regions_service/list_regions.rb | 51 + .../snippets/regions_service/update_region.rb | 47 + .../get_shipping_settings.rb | 47 + .../insert_shipping_settings.rb | 47 + ..._google.shopping.merchant.accounts.v1.json | 2815 +++++++++++++++++ .../get_terms_of_service_agreement_state.rb | 47 + ...cation_terms_of_service_agreement_state.rb | 47 + .../accept_terms_of_service.rb | 47 + .../get_terms_of_service.rb | 47 + .../retrieve_latest_terms_of_service.rb | 47 + .../snippets/user_service/create_user.rb | 47 + .../snippets/user_service/delete_user.rb | 47 + .../snippets/user_service/get_user.rb | 47 + .../snippets/user_service/list_users.rb | 51 + .../snippets/user_service/update_user.rb | 47 + .../v1/account_issue_service_paths_test.rb | 55 + .../v1/account_issue_service_rest_test.rb | 157 + .../accounts/v1/account_issue_service_test.rb | 156 + ...ccount_relationships_service_paths_test.rb | 67 + ...account_relationships_service_rest_test.rb | 264 ++ .../v1/account_relationships_service_test.rb | 270 ++ .../v1/account_services_service_paths_test.rb | 67 + .../v1/account_services_service_rest_test.rb | 373 +++ .../v1/account_services_service_test.rb | 388 +++ .../v1/accounts_service_paths_test.rb | 67 + .../accounts/v1/accounts_service_rest_test.rb | 431 +++ .../accounts/v1/accounts_service_test.rb | 459 +++ .../autofeed_settings_service_paths_test.rb | 55 + .../v1/autofeed_settings_service_rest_test.rb | 208 ++ .../v1/autofeed_settings_service_test.rb | 203 ++ ...tomatic_improvements_service_paths_test.rb | 55 + ...utomatic_improvements_service_rest_test.rb | 208 ++ .../v1/automatic_improvements_service_test.rb | 203 ++ .../business_identity_service_paths_test.rb | 55 + .../v1/business_identity_service_rest_test.rb | 208 ++ .../v1/business_identity_service_test.rb | 203 ++ .../v1/business_info_service_paths_test.rb | 55 + .../v1/business_info_service_rest_test.rb | 208 ++ .../accounts/v1/business_info_service_test.rb | 203 ++ .../checkout_settings_service_paths_test.rb | 67 + .../v1/checkout_settings_service_rest_test.rb | 317 ++ .../v1/checkout_settings_service_test.rb | 321 ++ ...veloper_registration_service_paths_test.rb | 55 + ...eveloper_registration_service_rest_test.rb | 262 ++ .../v1/developer_registration_service_test.rb | 261 ++ .../email_preferences_service_paths_test.rb | 55 + .../v1/email_preferences_service_rest_test.rb | 208 ++ .../v1/email_preferences_service_test.rb | 203 ++ .../v1/gbp_accounts_service_paths_test.rb | 55 + .../v1/gbp_accounts_service_rest_test.rb | 210 ++ .../accounts/v1/gbp_accounts_service_test.rb | 212 ++ .../v1/homepage_service_paths_test.rb | 55 + .../accounts/v1/homepage_service_rest_test.rb | 317 ++ .../accounts/v1/homepage_service_test.rb | 321 ++ .../v1/lfp_providers_service_paths_test.rb | 67 + .../v1/lfp_providers_service_rest_test.rb | 210 ++ .../accounts/v1/lfp_providers_service_test.rb | 212 ++ ...omnichannel_settings_service_paths_test.rb | 67 + .../omnichannel_settings_service_rest_test.rb | 373 +++ .../v1/omnichannel_settings_service_test.rb | 388 +++ ...online_return_policy_service_paths_test.rb | 67 + .../online_return_policy_service_rest_test.rb | 318 ++ .../v1/online_return_policy_service_test.rb | 328 ++ .../v1/programs_service_paths_test.rb | 67 + .../accounts/v1/programs_service_rest_test.rb | 317 ++ .../accounts/v1/programs_service_test.rb | 326 ++ .../accounts/v1/regions_service_paths_test.rb | 67 + .../accounts/v1/regions_service_rest_test.rb | 374 +++ .../accounts/v1/regions_service_test.rb | 390 +++ .../shipping_settings_service_paths_test.rb | 67 + .../v1/shipping_settings_service_rest_test.rb | 208 ++ .../v1/shipping_settings_service_test.rb | 203 ++ ...vice_agreement_state_service_paths_test.rb | 67 + ...rvice_agreement_state_service_rest_test.rb | 207 ++ ...of_service_agreement_state_service_test.rb | 201 ++ .../v1/terms_of_service_service_paths_test.rb | 67 + .../v1/terms_of_service_service_rest_test.rb | 264 ++ .../v1/terms_of_service_service_test.rb | 265 ++ .../accounts/v1/user_service_paths_test.rb | 67 + .../accounts/v1/user_service_rest_test.rb | 374 +++ .../merchant/accounts/v1/user_service_test.rb | 390 +++ .../test/helper.rb | 25 + release-please-config.json | 4 + 402 files changed, 71065 insertions(+) create mode 100644 google-shopping-merchant-accounts-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-accounts-v1/.gitignore create mode 100644 google-shopping-merchant-accounts-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-accounts-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-accounts-v1/.rubocop.yml create mode 100644 google-shopping-merchant-accounts-v1/.toys.rb create mode 100644 google-shopping-merchant-accounts-v1/.yardopts create mode 100644 google-shopping-merchant-accounts-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-accounts-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-accounts-v1/Gemfile create mode 100644 google-shopping-merchant-accounts-v1/LICENSE.md create mode 100644 google-shopping-merchant-accounts-v1/README.md create mode 100644 google-shopping-merchant-accounts-v1/Rakefile create mode 100644 google-shopping-merchant-accounts-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec create mode 100644 google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/customerservice_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb create mode 100644 google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb create mode 100644 google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json create mode 100644 google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb create mode 100644 google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb create mode 100644 google-shopping-merchant-accounts-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 548d350f1cca..7aed80400fc2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -907,6 +907,8 @@ "google-shopping-css-v1+FILLER": "0.0.0", "google-shopping-merchant-accounts": "0.6.0", "google-shopping-merchant-accounts+FILLER": "0.0.0", + "google-shopping-merchant-accounts-v1": "0.0.1", + "google-shopping-merchant-accounts-v1+FILLER": "0.0.0", "google-shopping-merchant-accounts-v1beta": "0.11.0", "google-shopping-merchant-accounts-v1beta+FILLER": "0.0.0", "google-shopping-merchant-conversions": "0.2.1", diff --git a/google-shopping-merchant-accounts-v1/.OwlBot.yaml b/google-shopping-merchant-accounts-v1/.OwlBot.yaml new file mode 100644 index 000000000000..aa4305a2cef3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/accounts/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-accounts-v1/$1 diff --git a/google-shopping-merchant-accounts-v1/.gitignore b/google-shopping-merchant-accounts-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-accounts-v1/.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/google-shopping-merchant-accounts-v1/.owlbot-manifest.json b/google-shopping-merchant-accounts-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..cc001937f53f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/.owlbot-manifest.json @@ -0,0 +1,405 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-accounts-v1.gemspec", + "lib/google-shopping-merchant-accounts-v1.rb", + "lib/google/shopping/merchant/accounts/v1.rb", + "lib/google/shopping/merchant/accounts/v1/accessright_pb.rb", + "lib/google/shopping/merchant/accounts/v1/account_issue_service.rb", + "lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb", + "lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/account_services_service.rb", + "lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb", + "lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb", + "lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_pb.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_service.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb", + "lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb", + "lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb", + "lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb", + "lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb", + "lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/business_identity_service.rb", + "lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/business_info_service.rb", + "lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb", + "lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb", + "lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb", + "lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb", + "lib/google/shopping/merchant/accounts/v1/checkoutsettings_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/customerservice_pb.rb", + "lib/google/shopping/merchant/accounts/v1/developer_registration_service.rb", + "lib/google/shopping/merchant/accounts/v1/developer_registration_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb", + "lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb", + "lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb", + "lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb", + "lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb", + "lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_pb.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_service.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb", + "lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb", + "lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb", + "lib/google/shopping/merchant/accounts/v1/omnichannelsettings_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_pb.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb", + "lib/google/shopping/merchant/accounts/v1/programs_pb.rb", + "lib/google/shopping/merchant/accounts/v1/programs_service.rb", + "lib/google/shopping/merchant/accounts/v1/programs_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/regions_pb.rb", + "lib/google/shopping/merchant/accounts/v1/regions_service.rb", + "lib/google/shopping/merchant/accounts/v1/regions_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/rest.rb", + "lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb", + "lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb", + "lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb", + "lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb", + "lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb", + "lib/google/shopping/merchant/accounts/v1/user_pb.rb", + "lib/google/shopping/merchant/accounts/v1/user_service.rb", + "lib/google/shopping/merchant/accounts/v1/user_service/client.rb", + "lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb", + "lib/google/shopping/merchant/accounts/v1/user_service/paths.rb", + "lib/google/shopping/merchant/accounts/v1/user_service/rest.rb", + "lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb", + "lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb", + "lib/google/shopping/merchant/accounts/v1/user_services_pb.rb", + "lib/google/shopping/merchant/accounts/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", + "proto_docs/google/protobuf/wrappers.rb", + "proto_docs/google/shopping/merchant/accounts/v1/accessright.rb", + "proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb", + "proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb", + "proto_docs/google/shopping/merchant/accounts/v1/accounts.rb", + "proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb", + "proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb", + "proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb", + "proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb", + "proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb", + "proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb", + "proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb", + "proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb", + "proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb", + "proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb", + "proto_docs/google/shopping/merchant/accounts/v1/homepage.rb", + "proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb", + "proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb", + "proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb", + "proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb", + "proto_docs/google/shopping/merchant/accounts/v1/programs.rb", + "proto_docs/google/shopping/merchant/accounts/v1/regions.rb", + "proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb", + "proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb", + "proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb", + "proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb", + "proto_docs/google/shopping/merchant/accounts/v1/user.rb", + "proto_docs/google/shopping/type/types.rb", + "proto_docs/google/type/date.rb", + "proto_docs/google/type/datetime.rb", + "proto_docs/google/type/phone_number.rb", + "proto_docs/google/type/postal_address.rb", + "snippets/Gemfile", + "snippets/account_issue_service/list_account_issues.rb", + "snippets/account_relationships_service/get_account_relationship.rb", + "snippets/account_relationships_service/list_account_relationships.rb", + "snippets/account_relationships_service/update_account_relationship.rb", + "snippets/account_services_service/approve_account_service.rb", + "snippets/account_services_service/get_account_service.rb", + "snippets/account_services_service/list_account_services.rb", + "snippets/account_services_service/propose_account_service.rb", + "snippets/account_services_service/reject_account_service.rb", + "snippets/accounts_service/create_and_configure_account.rb", + "snippets/accounts_service/delete_account.rb", + "snippets/accounts_service/get_account.rb", + "snippets/accounts_service/list_accounts.rb", + "snippets/accounts_service/list_sub_accounts.rb", + "snippets/accounts_service/update_account.rb", + "snippets/autofeed_settings_service/get_autofeed_settings.rb", + "snippets/autofeed_settings_service/update_autofeed_settings.rb", + "snippets/automatic_improvements_service/get_automatic_improvements.rb", + "snippets/automatic_improvements_service/update_automatic_improvements.rb", + "snippets/business_identity_service/get_business_identity.rb", + "snippets/business_identity_service/update_business_identity.rb", + "snippets/business_info_service/get_business_info.rb", + "snippets/business_info_service/update_business_info.rb", + "snippets/checkout_settings_service/create_checkout_settings.rb", + "snippets/checkout_settings_service/delete_checkout_settings.rb", + "snippets/checkout_settings_service/get_checkout_settings.rb", + "snippets/checkout_settings_service/update_checkout_settings.rb", + "snippets/developer_registration_service/get_developer_registration.rb", + "snippets/developer_registration_service/register_gcp.rb", + "snippets/developer_registration_service/unregister_gcp.rb", + "snippets/email_preferences_service/get_email_preferences.rb", + "snippets/email_preferences_service/update_email_preferences.rb", + "snippets/gbp_accounts_service/link_gbp_account.rb", + "snippets/gbp_accounts_service/list_gbp_accounts.rb", + "snippets/homepage_service/claim_homepage.rb", + "snippets/homepage_service/get_homepage.rb", + "snippets/homepage_service/unclaim_homepage.rb", + "snippets/homepage_service/update_homepage.rb", + "snippets/lfp_providers_service/find_lfp_providers.rb", + "snippets/lfp_providers_service/link_lfp_provider.rb", + "snippets/omnichannel_settings_service/create_omnichannel_setting.rb", + "snippets/omnichannel_settings_service/get_omnichannel_setting.rb", + "snippets/omnichannel_settings_service/list_omnichannel_settings.rb", + "snippets/omnichannel_settings_service/request_inventory_verification.rb", + "snippets/omnichannel_settings_service/update_omnichannel_setting.rb", + "snippets/online_return_policy_service/create_online_return_policy.rb", + "snippets/online_return_policy_service/delete_online_return_policy.rb", + "snippets/online_return_policy_service/get_online_return_policy.rb", + "snippets/online_return_policy_service/list_online_return_policies.rb", + "snippets/programs_service/disable_program.rb", + "snippets/programs_service/enable_program.rb", + "snippets/programs_service/get_program.rb", + "snippets/programs_service/list_programs.rb", + "snippets/regions_service/create_region.rb", + "snippets/regions_service/delete_region.rb", + "snippets/regions_service/get_region.rb", + "snippets/regions_service/list_regions.rb", + "snippets/regions_service/update_region.rb", + "snippets/shipping_settings_service/get_shipping_settings.rb", + "snippets/shipping_settings_service/insert_shipping_settings.rb", + "snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json", + "snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", + "snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", + "snippets/terms_of_service_service/accept_terms_of_service.rb", + "snippets/terms_of_service_service/get_terms_of_service.rb", + "snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb", + "snippets/user_service/create_user.rb", + "snippets/user_service/delete_user.rb", + "snippets/user_service/get_user.rb", + "snippets/user_service/list_users.rb", + "snippets/user_service/update_user.rb", + "test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb", + "test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb", + "test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/account_services_service_test.rb", + "test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/accounts_service_test.rb", + "test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb", + "test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb", + "test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb", + "test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/business_info_service_test.rb", + "test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb", + "test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb", + "test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb", + "test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb", + "test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/homepage_service_test.rb", + "test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb", + "test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb", + "test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb", + "test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/programs_service_test.rb", + "test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/regions_service_test.rb", + "test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb", + "test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb", + "test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb", + "test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb", + "test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb", + "test/google/shopping/merchant/accounts/v1/user_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-accounts-v1/.repo-metadata.json b/google-shopping-merchant-accounts-v1/.repo-metadata.json new file mode 100644 index 000000000000..5b45e687009c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts-v1", + "distribution_name": "google-shopping-merchant-accounts-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-accounts-v1/.rubocop.yml b/google-shopping-merchant-accounts-v1/.rubocop.yml new file mode 100644 index 000000000000..ea4191fb75d1 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-accounts-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-accounts-v1.rb" diff --git a/google-shopping-merchant-accounts-v1/.toys.rb b/google-shopping-merchant-accounts-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-accounts-v1/.yardopts b/google-shopping-merchant-accounts-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-accounts-v1/AUTHENTICATION.md b/google-shopping-merchant-accounts-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..8f0d9be65324 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-accounts-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-accounts-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/accounts/v1" + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/accounts/v1" + +::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/accounts/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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/google-shopping-merchant-accounts-v1/CHANGELOG.md b/google-shopping-merchant-accounts-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-accounts-v1/Gemfile b/google-shopping-merchant-accounts-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-accounts-v1/LICENSE.md b/google-shopping-merchant-accounts-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-accounts-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-accounts-v1/README.md b/google-shopping-merchant-accounts-v1/README.md new file mode 100644 index 000000000000..e2d181aa5863 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-accounts](https://rubygems.org/gems/google-shopping-merchant-accounts). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-accounts-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/accounts/v1" + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new +request = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new # (request fields as keyword arguments...) +response = client.list_account_issues request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/accounts/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-accounts-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-accounts`. +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-shopping-merchant-accounts-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-accounts-v1/Rakefile b/google-shopping-merchant-accounts-v1/Rakefile new file mode 100644 index 000000000000..66984a3e75e3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-accounts-v1 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/shopping/merchant/accounts/v1/account_issue_service/credentials" + ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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-shopping-merchant-accounts-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-accounts-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-accounts-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-accounts-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-accounts-v1" + header "google-shopping-merchant-accounts-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-accounts-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-accounts-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-accounts-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-accounts-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-accounts-v1/gapic_metadata.json b/google-shopping-merchant-accounts-v1/gapic_metadata.json new file mode 100644 index 000000000000..509f5c5a38c8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/gapic_metadata.json @@ -0,0 +1,557 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.accounts.v1", + "libraryPackage": "::Google::Shopping::Merchant::Accounts::V1", + "services": { + "AccountIssueService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client", + "rpcs": { + "ListAccountIssues": { + "methods": [ + "list_account_issues" + ] + } + } + } + } + }, + "AccountRelationshipsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client", + "rpcs": { + "GetAccountRelationship": { + "methods": [ + "get_account_relationship" + ] + }, + "UpdateAccountRelationship": { + "methods": [ + "update_account_relationship" + ] + }, + "ListAccountRelationships": { + "methods": [ + "list_account_relationships" + ] + } + } + } + } + }, + "AccountServicesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client", + "rpcs": { + "GetAccountService": { + "methods": [ + "get_account_service" + ] + }, + "ListAccountServices": { + "methods": [ + "list_account_services" + ] + }, + "ProposeAccountService": { + "methods": [ + "propose_account_service" + ] + }, + "ApproveAccountService": { + "methods": [ + "approve_account_service" + ] + }, + "RejectAccountService": { + "methods": [ + "reject_account_service" + ] + } + } + } + } + }, + "UserService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client", + "rpcs": { + "GetUser": { + "methods": [ + "get_user" + ] + }, + "CreateUser": { + "methods": [ + "create_user" + ] + }, + "DeleteUser": { + "methods": [ + "delete_user" + ] + }, + "UpdateUser": { + "methods": [ + "update_user" + ] + }, + "ListUsers": { + "methods": [ + "list_users" + ] + } + } + } + } + }, + "AccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client", + "rpcs": { + "GetAccount": { + "methods": [ + "get_account" + ] + }, + "CreateAndConfigureAccount": { + "methods": [ + "create_and_configure_account" + ] + }, + "DeleteAccount": { + "methods": [ + "delete_account" + ] + }, + "UpdateAccount": { + "methods": [ + "update_account" + ] + }, + "ListAccounts": { + "methods": [ + "list_accounts" + ] + }, + "ListSubAccounts": { + "methods": [ + "list_sub_accounts" + ] + } + } + } + } + }, + "AutofeedSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client", + "rpcs": { + "GetAutofeedSettings": { + "methods": [ + "get_autofeed_settings" + ] + }, + "UpdateAutofeedSettings": { + "methods": [ + "update_autofeed_settings" + ] + } + } + } + } + }, + "AutomaticImprovementsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client", + "rpcs": { + "GetAutomaticImprovements": { + "methods": [ + "get_automatic_improvements" + ] + }, + "UpdateAutomaticImprovements": { + "methods": [ + "update_automatic_improvements" + ] + } + } + } + } + }, + "BusinessIdentityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client", + "rpcs": { + "GetBusinessIdentity": { + "methods": [ + "get_business_identity" + ] + }, + "UpdateBusinessIdentity": { + "methods": [ + "update_business_identity" + ] + } + } + } + } + }, + "BusinessInfoService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client", + "rpcs": { + "GetBusinessInfo": { + "methods": [ + "get_business_info" + ] + }, + "UpdateBusinessInfo": { + "methods": [ + "update_business_info" + ] + } + } + } + } + }, + "CheckoutSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client", + "rpcs": { + "GetCheckoutSettings": { + "methods": [ + "get_checkout_settings" + ] + }, + "CreateCheckoutSettings": { + "methods": [ + "create_checkout_settings" + ] + }, + "UpdateCheckoutSettings": { + "methods": [ + "update_checkout_settings" + ] + }, + "DeleteCheckoutSettings": { + "methods": [ + "delete_checkout_settings" + ] + } + } + } + } + }, + "DeveloperRegistrationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client", + "rpcs": { + "RegisterGcp": { + "methods": [ + "register_gcp" + ] + }, + "GetDeveloperRegistration": { + "methods": [ + "get_developer_registration" + ] + }, + "UnregisterGcp": { + "methods": [ + "unregister_gcp" + ] + } + } + } + } + }, + "EmailPreferencesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client", + "rpcs": { + "GetEmailPreferences": { + "methods": [ + "get_email_preferences" + ] + }, + "UpdateEmailPreferences": { + "methods": [ + "update_email_preferences" + ] + } + } + } + } + }, + "GbpAccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client", + "rpcs": { + "ListGbpAccounts": { + "methods": [ + "list_gbp_accounts" + ] + }, + "LinkGbpAccount": { + "methods": [ + "link_gbp_account" + ] + } + } + } + } + }, + "HomepageService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client", + "rpcs": { + "GetHomepage": { + "methods": [ + "get_homepage" + ] + }, + "UpdateHomepage": { + "methods": [ + "update_homepage" + ] + }, + "ClaimHomepage": { + "methods": [ + "claim_homepage" + ] + }, + "UnclaimHomepage": { + "methods": [ + "unclaim_homepage" + ] + } + } + } + } + }, + "LfpProvidersService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client", + "rpcs": { + "FindLfpProviders": { + "methods": [ + "find_lfp_providers" + ] + }, + "LinkLfpProvider": { + "methods": [ + "link_lfp_provider" + ] + } + } + } + } + }, + "OmnichannelSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client", + "rpcs": { + "GetOmnichannelSetting": { + "methods": [ + "get_omnichannel_setting" + ] + }, + "ListOmnichannelSettings": { + "methods": [ + "list_omnichannel_settings" + ] + }, + "CreateOmnichannelSetting": { + "methods": [ + "create_omnichannel_setting" + ] + }, + "UpdateOmnichannelSetting": { + "methods": [ + "update_omnichannel_setting" + ] + }, + "RequestInventoryVerification": { + "methods": [ + "request_inventory_verification" + ] + } + } + } + } + }, + "OnlineReturnPolicyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client", + "rpcs": { + "GetOnlineReturnPolicy": { + "methods": [ + "get_online_return_policy" + ] + }, + "ListOnlineReturnPolicies": { + "methods": [ + "list_online_return_policies" + ] + }, + "CreateOnlineReturnPolicy": { + "methods": [ + "create_online_return_policy" + ] + }, + "DeleteOnlineReturnPolicy": { + "methods": [ + "delete_online_return_policy" + ] + } + } + } + } + }, + "ProgramsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client", + "rpcs": { + "GetProgram": { + "methods": [ + "get_program" + ] + }, + "ListPrograms": { + "methods": [ + "list_programs" + ] + }, + "EnableProgram": { + "methods": [ + "enable_program" + ] + }, + "DisableProgram": { + "methods": [ + "disable_program" + ] + } + } + } + } + }, + "RegionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client", + "rpcs": { + "GetRegion": { + "methods": [ + "get_region" + ] + }, + "CreateRegion": { + "methods": [ + "create_region" + ] + }, + "UpdateRegion": { + "methods": [ + "update_region" + ] + }, + "DeleteRegion": { + "methods": [ + "delete_region" + ] + }, + "ListRegions": { + "methods": [ + "list_regions" + ] + } + } + } + } + }, + "ShippingSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client", + "rpcs": { + "GetShippingSettings": { + "methods": [ + "get_shipping_settings" + ] + }, + "InsertShippingSettings": { + "methods": [ + "insert_shipping_settings" + ] + } + } + } + } + }, + "TermsOfServiceAgreementStateService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client", + "rpcs": { + "GetTermsOfServiceAgreementState": { + "methods": [ + "get_terms_of_service_agreement_state" + ] + }, + "RetrieveForApplicationTermsOfServiceAgreementState": { + "methods": [ + "retrieve_for_application_terms_of_service_agreement_state" + ] + } + } + } + } + }, + "TermsOfServiceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client", + "rpcs": { + "GetTermsOfService": { + "methods": [ + "get_terms_of_service" + ] + }, + "RetrieveLatestTermsOfService": { + "methods": [ + "retrieve_latest_terms_of_service" + ] + }, + "AcceptTermsOfService": { + "methods": [ + "accept_terms_of_service" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec b/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec new file mode 100644 index 000000000000..588a8bf0177e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/accounts/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-accounts-v1" + gem.version = Google::Shopping::Merchant::Accounts::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb b/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb new file mode 100644 index 000000000000..7dc5c47ab255 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google-shopping-merchant-accounts-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1" diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb new file mode 100644 index 000000000000..02baee8a8965 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/account_issue_service" +require "google/shopping/merchant/accounts/v1/account_relationships_service" +require "google/shopping/merchant/accounts/v1/account_services_service" +require "google/shopping/merchant/accounts/v1/user_service" +require "google/shopping/merchant/accounts/v1/accounts_service" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service" +require "google/shopping/merchant/accounts/v1/business_identity_service" +require "google/shopping/merchant/accounts/v1/business_info_service" +require "google/shopping/merchant/accounts/v1/checkout_settings_service" +require "google/shopping/merchant/accounts/v1/developer_registration_service" +require "google/shopping/merchant/accounts/v1/email_preferences_service" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service" +require "google/shopping/merchant/accounts/v1/homepage_service" +require "google/shopping/merchant/accounts/v1/lfp_providers_service" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" +require "google/shopping/merchant/accounts/v1/online_return_policy_service" +require "google/shopping/merchant/accounts/v1/programs_service" +require "google/shopping/merchant/accounts/v1/regions_service" +require "google/shopping/merchant/accounts/v1/shipping_settings_service" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" +require "google/shopping/merchant/accounts/v1/terms_of_service_service" +require "google/shopping/merchant/accounts/v1/version" + +module Google + module Shopping + module Merchant + module Accounts + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/accounts/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb new file mode 100644 index 000000000000..efe38d8eb0c5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accessright_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accessright.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/shopping/merchant/accounts/v1/accessright.proto\x12$google.shopping.merchant.accounts.v1*\x81\x01\n\x0b\x41\x63\x63\x65ssRight\x12\x1c\n\x18\x41\x43\x43\x45SS_RIGHT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\r\n\tREAD_ONLY\x10\x04\x12\t\n\x05\x41\x44MIN\x10\x02\x12\x19\n\x15PERFORMANCE_REPORTING\x10\x03\x12\x11\n\rAPI_DEVELOPER\x10\x05\x42\x83\x02\n(com.google.shopping.merchant.accounts.v1B\x10\x41\x63\x63\x65ssRightProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AccessRight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccessRight").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb new file mode 100644 index 000000000000..2581b9cbec7b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_issue_service/credentials" +require "google/shopping/merchant/accounts/v1/account_issue_service/paths" +require "google/shopping/merchant/accounts/v1/account_issue_service/client" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `AccountIssueService` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/account_issue_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/account_issue_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + module AccountIssueService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_issue_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb new file mode 100644 index 000000000000..84b842434175 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/client.rb @@ -0,0 +1,497 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountissue_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + ## + # Client for the AccountIssueService service. + # + # Service to support `AccountIssueService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_issue_service_stub + + ## + # Configure the AccountIssueService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountIssueService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 + @account_issue_service_stub.universe_domain + end + + ## + # Create a new AccountIssueService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountIssueService 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/shopping/merchant/accounts/v1/accountissue_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 + + @account_issue_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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 + ) + + @account_issue_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 + @account_issue_service_stub.logger + end + + # Service calls + + ## + # Lists all account issues of a Merchant Center account. + # + # When called on a multi-client account, this method only returns issues + # belonging to that account, not its sub-accounts. To retrieve issues for + # sub-accounts, you must first call the + # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts accounts.listSubaccounts} + # method to obtain a list of sub-accounts, and then call + # `accounts.issues.list` for each sub-account individually. + # + # @overload list_account_issues(request, options = nil) + # Pass arguments to `list_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::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_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) + # Pass arguments to `list_account_issues` 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 parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 issues will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @param language_code [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new + # + # # Call the list_account_issues method. + # result = client.list_account_issues 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::Shopping::Merchant::Accounts::V1::AccountIssue. + # p item + # end + # + def list_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest + + # 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_account_issues.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_issue_service_stub.call_rpc :list_account_issues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, 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 AccountIssueService API. + # + # This class represents the configuration for AccountIssueService, + # 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 + # # list_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 AccountIssueService 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 `list_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_issues + + # @private + def initialize parent_rpcs = nil + list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues + @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb new file mode 100644 index 000000000000..eebb3eaf235e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + # Credentials for the AccountIssueService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb new file mode 100644 index 000000000000..cc174a56e33f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + # Path helper methods for the AccountIssueService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb new file mode 100644 index 000000000000..cfa6df603603 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_issue_service/credentials" +require "google/shopping/merchant/accounts/v1/account_issue_service/paths" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `AccountIssueService` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/account_issue_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + module AccountIssueService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb new file mode 100644 index 000000000000..bd63d03565a5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/client.rb @@ -0,0 +1,464 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountissue_pb" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + module Rest + ## + # REST client for the AccountIssueService service. + # + # Service to support `AccountIssueService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_issue_service_stub + + ## + # Configure the AccountIssueService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountIssueService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 + @account_issue_service_stub.universe_domain + end + + ## + # Create a new AccountIssueService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountIssueService 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 + + @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_issue_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 + @account_issue_service_stub.logger + end + + # Service calls + + ## + # Lists all account issues of a Merchant Center account. + # + # When called on a multi-client account, this method only returns issues + # belonging to that account, not its sub-accounts. To retrieve issues for + # sub-accounts, you must first call the + # {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client#list_sub_accounts accounts.listSubaccounts} + # method to obtain a list of sub-accounts, and then call + # `accounts.issues.list` for each sub-account individually. + # + # @overload list_account_issues(request, options = nil) + # Pass arguments to `list_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::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_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) + # Pass arguments to `list_account_issues` 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 parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 issues will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @param language_code [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new + # + # # Call the list_account_issues method. + # result = client.list_account_issues 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::Shopping::Merchant::Accounts::V1::AccountIssue. + # p item + # end + # + def list_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest + + # 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_account_issues.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::Shopping::Merchant::Accounts::V1::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_account_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_issue_service_stub.list_account_issues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", 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 AccountIssueService REST API. + # + # This class represents the configuration for AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::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 + # # list_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.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 = "merchantapi.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 AccountIssueService 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 `list_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_issues + + # @private + def initialize parent_rpcs = nil + list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues + @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb new file mode 100644 index 000000000000..b727a161ca01 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_issue_service/rest/service_stub.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountissue_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + module Rest + ## + # REST service stub for the AccountIssueService 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: true, + 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 list_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest] + # 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::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse] + # A result object deserialized from the server's reply + def list_account_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_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_account_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.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 list_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest] + # 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_account_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/issues", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb new file mode 100644 index 000000000000..f3966d186275 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_relationships_service/credentials" +require "google/shopping/merchant/accounts/v1/account_relationships_service/paths" +require "google/shopping/merchant/accounts/v1/account_relationships_service/client" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support AccountRelationship API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/account_relationships_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + module AccountRelationshipsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_relationships_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_relationships_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb new file mode 100644 index 000000000000..b00e2118192a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/client.rb @@ -0,0 +1,671 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountrelationships_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + ## + # Client for the AccountRelationshipsService service. + # + # Service to support AccountRelationship API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_relationships_service_stub + + ## + # Configure the AccountRelationshipsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountRelationshipsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 + @account_relationships_service_stub.universe_domain + end + + ## + # Create a new AccountRelationshipsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountRelationshipsService 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/shopping/merchant/accounts/v1/accountrelationships_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 + + @account_relationships_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 + ) + + @account_relationships_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 + @account_relationships_service_stub.logger + end + + # Service calls + + ## + # Retrieve an account relationship. + # + # @overload get_account_relationship(request, options = nil) + # Pass arguments to `get_account_relationship` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::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_account_relationship(name: nil) + # Pass arguments to `get_account_relationship` 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 resource name of the account relationship to get. + # Format: `accounts/{account}/relationships/{relationship}`. For example, + # `accounts/123456/relationships/567890`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new + # + # # Call the get_account_relationship method. + # result = client.get_account_relationship request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p result + # + def get_account_relationship request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest + + # 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_account_relationship.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account_relationship.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_relationship.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.call_rpc :get_account_relationship, 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 + + ## + # Updates the account relationship. Executing this method requires admin + # access. + # + # @overload update_account_relationship(request, options = nil) + # Pass arguments to `update_account_relationship` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::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 update_account_relationship(account_relationship: nil, update_mask: nil) + # Pass arguments to `update_account_relationship` 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 account_relationship [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship, ::Hash] + # Required. The new version of the account relationship. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_id_alias` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new + # + # # Call the update_account_relationship method. + # result = client.update_account_relationship request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p result + # + def update_account_relationship request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest + + # 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.update_account_relationship.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_relationship&.name + header_params["account_relationship.name"] = request.account_relationship.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.update_account_relationship.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account_relationship.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.call_rpc :update_account_relationship, 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 + + ## + # List account relationships for the specified account. + # + # @overload list_account_relationships(request, options = nil) + # Pass arguments to `list_account_relationships` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::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_account_relationships(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_account_relationships` 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 parent account of the account relationship to filter by. + # Format: `accounts/{account}` + # @param page_token [::String] + # Optional. The token returned by the previous `list` request. + # @param page_size [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new + # + # # Call the list_account_relationships method. + # result = client.list_account_relationships 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::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p item + # end + # + def list_account_relationships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest + + # 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_account_relationships.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_relationships.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_relationships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.call_rpc :list_account_relationships, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_relationships_service_stub, :list_account_relationships, 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 AccountRelationshipsService API. + # + # This class represents the configuration for AccountRelationshipsService, + # 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 + # # get_account_relationship to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_relationship.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_relationship.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 AccountRelationshipsService 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 `get_account_relationship` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_relationship + ## + # RPC-specific configuration for `update_account_relationship` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_relationship + ## + # RPC-specific configuration for `list_account_relationships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_relationships + + # @private + def initialize parent_rpcs = nil + get_account_relationship_config = parent_rpcs.get_account_relationship if parent_rpcs.respond_to? :get_account_relationship + @get_account_relationship = ::Gapic::Config::Method.new get_account_relationship_config + update_account_relationship_config = parent_rpcs.update_account_relationship if parent_rpcs.respond_to? :update_account_relationship + @update_account_relationship = ::Gapic::Config::Method.new update_account_relationship_config + list_account_relationships_config = parent_rpcs.list_account_relationships if parent_rpcs.respond_to? :list_account_relationships + @list_account_relationships = ::Gapic::Config::Method.new list_account_relationships_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb new file mode 100644 index 000000000000..43a2724add82 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + # Credentials for the AccountRelationshipsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb new file mode 100644 index 000000000000..90454dbdf4dd --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + # Path helper methods for the AccountRelationshipsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified AccountRelationship resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/relationships/{relationship}` + # + # @param account [String] + # @param relationship [String] + # + # @return [::String] + def account_relationship_path account:, relationship: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/relationships/#{relationship}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb new file mode 100644 index 000000000000..bc6186f077ea --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_relationships_service/credentials" +require "google/shopping/merchant/accounts/v1/account_relationships_service/paths" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support AccountRelationship API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + module AccountRelationshipsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb new file mode 100644 index 000000000000..567bfba4dfc7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/client.rb @@ -0,0 +1,624 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountrelationships_pb" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + module Rest + ## + # REST client for the AccountRelationshipsService service. + # + # Service to support AccountRelationship API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_relationships_service_stub + + ## + # Configure the AccountRelationshipsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountRelationshipsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 + @account_relationships_service_stub.universe_domain + end + + ## + # Create a new AccountRelationshipsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountRelationshipsService 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 + + @account_relationships_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_relationships_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 + @account_relationships_service_stub.logger + end + + # Service calls + + ## + # Retrieve an account relationship. + # + # @overload get_account_relationship(request, options = nil) + # Pass arguments to `get_account_relationship` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::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_account_relationship(name: nil) + # Pass arguments to `get_account_relationship` 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 resource name of the account relationship to get. + # Format: `accounts/{account}/relationships/{relationship}`. For example, + # `accounts/123456/relationships/567890`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new + # + # # Call the get_account_relationship method. + # result = client.get_account_relationship request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p result + # + def get_account_relationship request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest + + # 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_account_relationship.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::Shopping::Merchant::Accounts::V1::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_account_relationship.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_relationship.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.get_account_relationship 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 + + ## + # Updates the account relationship. Executing this method requires admin + # access. + # + # @overload update_account_relationship(request, options = nil) + # Pass arguments to `update_account_relationship` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::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 update_account_relationship(account_relationship: nil, update_mask: nil) + # Pass arguments to `update_account_relationship` 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 account_relationship [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship, ::Hash] + # Required. The new version of the account relationship. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_id_alias` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new + # + # # Call the update_account_relationship method. + # result = client.update_account_relationship request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p result + # + def update_account_relationship request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest + + # 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.update_account_relationship.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::Shopping::Merchant::Accounts::V1::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.update_account_relationship.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account_relationship.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.update_account_relationship 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 + + ## + # List account relationships for the specified account. + # + # @overload list_account_relationships(request, options = nil) + # Pass arguments to `list_account_relationships` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::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_account_relationships(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_account_relationships` 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 parent account of the account relationship to filter by. + # Format: `accounts/{account}` + # @param page_token [::String] + # Optional. The token returned by the previous `list` request. + # @param page_size [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new + # + # # Call the list_account_relationships method. + # result = client.list_account_relationships 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::Shopping::Merchant::Accounts::V1::AccountRelationship. + # p item + # end + # + def list_account_relationships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest + + # 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_account_relationships.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::Shopping::Merchant::Accounts::V1::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_account_relationships.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_relationships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_relationships_service_stub.list_account_relationships request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_relationships_service_stub, :list_account_relationships, "account_relationships", 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 AccountRelationshipsService REST API. + # + # This class represents the configuration for AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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 + # # get_account_relationship to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_relationship.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_relationship.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 = "merchantapi.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 AccountRelationshipsService 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 `get_account_relationship` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_relationship + ## + # RPC-specific configuration for `update_account_relationship` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_relationship + ## + # RPC-specific configuration for `list_account_relationships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_relationships + + # @private + def initialize parent_rpcs = nil + get_account_relationship_config = parent_rpcs.get_account_relationship if parent_rpcs.respond_to? :get_account_relationship + @get_account_relationship = ::Gapic::Config::Method.new get_account_relationship_config + update_account_relationship_config = parent_rpcs.update_account_relationship if parent_rpcs.respond_to? :update_account_relationship + @update_account_relationship = ::Gapic::Config::Method.new update_account_relationship_config + list_account_relationships_config = parent_rpcs.list_account_relationships if parent_rpcs.respond_to? :list_account_relationships + @list_account_relationships = ::Gapic::Config::Method.new list_account_relationships_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb new file mode 100644 index 000000000000..117918f2210c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_relationships_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountrelationships_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + module Rest + ## + # REST service stub for the AccountRelationshipsService 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: true, + 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 get_account_relationship REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest] + # 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::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # A result object deserialized from the server's reply + def get_account_relationship request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_relationship_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_account_relationship", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_account_relationship REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest] + # 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::Shopping::Merchant::Accounts::V1::AccountRelationship] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # A result object deserialized from the server's reply + def update_account_relationship request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_relationship_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: "update_account_relationship", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.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_account_relationships REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest] + # 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::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse] + # A result object deserialized from the server's reply + def list_account_relationships request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_relationships_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_account_relationships", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.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 get_account_relationship REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest] + # 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_account_relationship_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/relationships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account_relationship REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_account_relationship_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{account_relationship.name}", + body: "account_relationship", + matches: [ + ["account_relationship.name", %r{^accounts/[^/]+/relationships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_relationships REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest] + # 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_account_relationships_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/relationships", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb new file mode 100644 index 000000000000..c01199f22f54 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_services_service/credentials" +require "google/shopping/merchant/accounts/v1/account_services_service/paths" +require "google/shopping/merchant/accounts/v1/account_services_service/client" +require "google/shopping/merchant/accounts/v1/account_services_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support AccountService API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/account_services_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/account_services_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + module AccountServicesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_services_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_services_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb new file mode 100644 index 000000000000..4646f9405c59 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/client.rb @@ -0,0 +1,856 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountservices_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + ## + # Client for the AccountServicesService service. + # + # Service to support AccountService API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_services_service_stub + + ## + # Configure the AccountServicesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountServicesService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 + @account_services_service_stub.universe_domain + end + + ## + # Create a new AccountServicesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountServicesService 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/shopping/merchant/accounts/v1/accountservices_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 + + @account_services_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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 + ) + + @account_services_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 + @account_services_service_stub.logger + end + + # Service calls + + ## + # Retrieve an account service. + # + # @overload get_account_service(request, options = nil) + # Pass arguments to `get_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::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_account_service(name: nil) + # Pass arguments to `get_account_service` 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 resource name of the account service to get. + # Format: `accounts/{account}/services/{service}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new + # + # # Call the get_account_service method. + # result = client.get_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def get_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest + + # 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_account_service.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :get_account_service, 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 + + ## + # List account services for the specified accounts. Supports filtering. + # + # @overload list_account_services(request, options = nil) + # Pass arguments to `list_account_services` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::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_account_services(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_account_services` 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 parent account of the account service to filter by. + # Format: `accounts/{account}` + # @param page_token [::String] + # Optional. The token returned by the previous `list` request. + # @param page_size [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new + # + # # Call the list_account_services method. + # result = client.list_account_services 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::Shopping::Merchant::Accounts::V1::AccountService. + # p item + # end + # + def list_account_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest + + # 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_account_services.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :list_account_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_services_service_stub, :list_account_services, 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 + + ## + # Propose an account service. + # + # @overload propose_account_service(request, options = nil) + # Pass arguments to `propose_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::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 propose_account_service(parent: nil, provider: nil, account_service: nil) + # Pass arguments to `propose_account_service` 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 resource name of the parent account for the service. + # Format: `accounts/{account}` + # @param provider [::String] + # Required. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @param account_service [::Google::Shopping::Merchant::Accounts::V1::AccountService, ::Hash] + # Required. The account service to propose. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new + # + # # Call the propose_account_service method. + # result = client.propose_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def propose_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest + + # 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.propose_account_service.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.propose_account_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.propose_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :propose_account_service, 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 + + ## + # Approve an account service proposal. + # + # @overload approve_account_service(request, options = nil) + # Pass arguments to `approve_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::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 approve_account_service(name: nil) + # Pass arguments to `approve_account_service` 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 resource name of the account service to approve. + # Format: `accounts/{account}/services/{service}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new + # + # # Call the approve_account_service method. + # result = client.approve_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def approve_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest + + # 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.approve_account_service.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.approve_account_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.approve_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :approve_account_service, 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 + + ## + # Reject an account service (both proposed and approve services can be + # rejected). + # + # @overload reject_account_service(request, options = nil) + # Pass arguments to `reject_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::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 reject_account_service(name: nil) + # Pass arguments to `reject_account_service` 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 resource name of the account service to reject. + # Format: `accounts/{account}/services/{service}` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new + # + # # Call the reject_account_service method. + # result = client.reject_account_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def reject_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest + + # 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.reject_account_service.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.reject_account_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reject_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.call_rpc :reject_account_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccountServicesService API. + # + # This class represents the configuration for AccountServicesService, + # 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 + # # get_account_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_service.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 AccountServicesService 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 `get_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_service + ## + # RPC-specific configuration for `list_account_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_services + ## + # RPC-specific configuration for `propose_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :propose_account_service + ## + # RPC-specific configuration for `approve_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_account_service + ## + # RPC-specific configuration for `reject_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :reject_account_service + + # @private + def initialize parent_rpcs = nil + get_account_service_config = parent_rpcs.get_account_service if parent_rpcs.respond_to? :get_account_service + @get_account_service = ::Gapic::Config::Method.new get_account_service_config + list_account_services_config = parent_rpcs.list_account_services if parent_rpcs.respond_to? :list_account_services + @list_account_services = ::Gapic::Config::Method.new list_account_services_config + propose_account_service_config = parent_rpcs.propose_account_service if parent_rpcs.respond_to? :propose_account_service + @propose_account_service = ::Gapic::Config::Method.new propose_account_service_config + approve_account_service_config = parent_rpcs.approve_account_service if parent_rpcs.respond_to? :approve_account_service + @approve_account_service = ::Gapic::Config::Method.new approve_account_service_config + reject_account_service_config = parent_rpcs.reject_account_service if parent_rpcs.respond_to? :reject_account_service + @reject_account_service = ::Gapic::Config::Method.new reject_account_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb new file mode 100644 index 000000000000..4ef6ae58f3c5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + # Credentials for the AccountServicesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb new file mode 100644 index 000000000000..d5f0b599ad7d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + # Path helper methods for the AccountServicesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified AccountService resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/services/{service}` + # + # @param account [String] + # @param service [String] + # + # @return [::String] + def account_service_path account:, service: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/services/#{service}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb new file mode 100644 index 000000000000..e4b634d0994f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/account_services_service/credentials" +require "google/shopping/merchant/accounts/v1/account_services_service/paths" +require "google/shopping/merchant/accounts/v1/account_services_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support AccountService API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/account_services_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + module AccountServicesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/account_services_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb new file mode 100644 index 000000000000..b21f0151e7b6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/client.rb @@ -0,0 +1,795 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountservices_pb" +require "google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + module Rest + ## + # REST client for the AccountServicesService service. + # + # Service to support AccountService API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_services_service_stub + + ## + # Configure the AccountServicesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountServicesService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 + @account_services_service_stub.universe_domain + end + + ## + # Create a new AccountServicesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountServicesService 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 + + @account_services_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_services_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 + @account_services_service_stub.logger + end + + # Service calls + + ## + # Retrieve an account service. + # + # @overload get_account_service(request, options = nil) + # Pass arguments to `get_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::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_account_service(name: nil) + # Pass arguments to `get_account_service` 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 resource name of the account service to get. + # Format: `accounts/{account}/services/{service}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new + # + # # Call the get_account_service method. + # result = client.get_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def get_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest + + # 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_account_service.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::Shopping::Merchant::Accounts::V1::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_account_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.get_account_service 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 + + ## + # List account services for the specified accounts. Supports filtering. + # + # @overload list_account_services(request, options = nil) + # Pass arguments to `list_account_services` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::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_account_services(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_account_services` 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 parent account of the account service to filter by. + # Format: `accounts/{account}` + # @param page_token [::String] + # Optional. The token returned by the previous `list` request. + # @param page_size [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new + # + # # Call the list_account_services method. + # result = client.list_account_services 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::Shopping::Merchant::Accounts::V1::AccountService. + # p item + # end + # + def list_account_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest + + # 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_account_services.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::Shopping::Merchant::Accounts::V1::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_account_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.list_account_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_services_service_stub, :list_account_services, "account_services", 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 + + ## + # Propose an account service. + # + # @overload propose_account_service(request, options = nil) + # Pass arguments to `propose_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::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 propose_account_service(parent: nil, provider: nil, account_service: nil) + # Pass arguments to `propose_account_service` 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 resource name of the parent account for the service. + # Format: `accounts/{account}` + # @param provider [::String] + # Required. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @param account_service [::Google::Shopping::Merchant::Accounts::V1::AccountService, ::Hash] + # Required. The account service to propose. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new + # + # # Call the propose_account_service method. + # result = client.propose_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def propose_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest + + # 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.propose_account_service.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::Shopping::Merchant::Accounts::V1::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.propose_account_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.propose_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.propose_account_service 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 + + ## + # Approve an account service proposal. + # + # @overload approve_account_service(request, options = nil) + # Pass arguments to `approve_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::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 approve_account_service(name: nil) + # Pass arguments to `approve_account_service` 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 resource name of the account service to approve. + # Format: `accounts/{account}/services/{service}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new + # + # # Call the approve_account_service method. + # result = client.approve_account_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + # p result + # + def approve_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest + + # 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.approve_account_service.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::Shopping::Merchant::Accounts::V1::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.approve_account_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.approve_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.approve_account_service 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 + + ## + # Reject an account service (both proposed and approve services can be + # rejected). + # + # @overload reject_account_service(request, options = nil) + # Pass arguments to `reject_account_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::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 reject_account_service(name: nil) + # Pass arguments to `reject_account_service` 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 resource name of the account service to reject. + # Format: `accounts/{account}/services/{service}` + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new + # + # # Call the reject_account_service method. + # result = client.reject_account_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def reject_account_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest + + # 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.reject_account_service.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::Shopping::Merchant::Accounts::V1::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.reject_account_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reject_account_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_services_service_stub.reject_account_service 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 + + ## + # Configuration class for the AccountServicesService REST API. + # + # This class represents the configuration for AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::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 + # # get_account_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_service.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 = "merchantapi.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 AccountServicesService 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 `get_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_service + ## + # RPC-specific configuration for `list_account_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_services + ## + # RPC-specific configuration for `propose_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :propose_account_service + ## + # RPC-specific configuration for `approve_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_account_service + ## + # RPC-specific configuration for `reject_account_service` + # @return [::Gapic::Config::Method] + # + attr_reader :reject_account_service + + # @private + def initialize parent_rpcs = nil + get_account_service_config = parent_rpcs.get_account_service if parent_rpcs.respond_to? :get_account_service + @get_account_service = ::Gapic::Config::Method.new get_account_service_config + list_account_services_config = parent_rpcs.list_account_services if parent_rpcs.respond_to? :list_account_services + @list_account_services = ::Gapic::Config::Method.new list_account_services_config + propose_account_service_config = parent_rpcs.propose_account_service if parent_rpcs.respond_to? :propose_account_service + @propose_account_service = ::Gapic::Config::Method.new propose_account_service_config + approve_account_service_config = parent_rpcs.approve_account_service if parent_rpcs.respond_to? :approve_account_service + @approve_account_service = ::Gapic::Config::Method.new approve_account_service_config + reject_account_service_config = parent_rpcs.reject_account_service if parent_rpcs.respond_to? :reject_account_service + @reject_account_service = ::Gapic::Config::Method.new reject_account_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb new file mode 100644 index 000000000000..0fac17c4ee38 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/account_services_service/rest/service_stub.rb @@ -0,0 +1,391 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountservices_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + module Rest + ## + # REST service stub for the AccountServicesService 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: true, + 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 get_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest] + # 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::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # A result object deserialized from the server's reply + def get_account_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_service_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_account_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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_account_services REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest] + # 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::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse] + # A result object deserialized from the server's reply + def list_account_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_services_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_account_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the propose_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest] + # 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::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # A result object deserialized from the server's reply + def propose_account_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_propose_account_service_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: "propose_account_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the approve_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest] + # 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::Shopping::Merchant::Accounts::V1::AccountService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # A result object deserialized from the server's reply + def approve_account_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_approve_account_service_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: "approve_account_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the reject_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest] + # 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 reject_account_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reject_account_service_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: "reject_account_service", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the get_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest] + # 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_account_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_services REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest] + # 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_account_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/services", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the propose_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_propose_account_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/services:propose", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the approve_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_approve_account_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:approve", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reject_account_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_reject_account_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:reject", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb new file mode 100644 index 000000000000..d09b6f2932cc --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accountissue.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/shopping/type/types_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1/accountissue.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xa7\x06\n\x0c\x41\x63\x63ountIssue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12M\n\x08severity\x18\x03 \x01(\x0e\x32;.google.shopping.merchant.accounts.v1.AccountIssue.Severity\x12\x65\n\x15impacted_destinations\x18\x04 \x03(\x0b\x32\x46.google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x06 \x01(\t\x1a\xd6\x02\n\x13ImpactedDestination\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12^\n\x07impacts\x18\x02 \x03(\x0b\x32M.google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination.Impact\x1al\n\x06Impact\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12M\n\x08severity\x18\x02 \x01(\x0e\x32;.google.shopping.merchant.accounts.v1.AccountIssue.SeverityB\x14\n\x12_reporting_context\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x0e\n\nSUGGESTION\x10\x03:l\xea\x41i\n\'merchantapi.googleapis.com/AccountIssue\x12!accounts/{account}/issues/{issue}*\raccountIssues2\x0c\x61\x63\x63ountIssue\"\xbb\x01\n\x18ListAccountIssuesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListAccountIssuesResponse\x12J\n\x0e\x61\x63\x63ount_issues\x18\x01 \x03(\x0b\x32\x32.google.shopping.merchant.accounts.v1.AccountIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xaf\x02\n\x13\x41\x63\x63ountIssueService\x12\xce\x01\n\x11ListAccountIssues\x12>.google.shopping.merchant.accounts.v1.ListAccountIssuesRequest\x1a?.google.shopping.merchant.accounts.v1.ListAccountIssuesResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{parent=accounts/*}/issues\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11\x41\x63\x63ountIssueProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AccountIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue").msgclass + AccountIssue::ImpactedDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination").msgclass + AccountIssue::ImpactedDestination::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.ImpactedDestination.Impact").msgclass + AccountIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountIssue.Severity").enummodule + ListAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountIssuesRequest").msgclass + ListAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountIssuesResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb new file mode 100644 index 000000000000..9ebba518dd49 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountissue_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/accountissue.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountissue_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountIssueService + # Service to support `AccountIssueService` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AccountIssueService' + + # Lists all account issues of a Merchant Center account. + # + # When called on a multi-client account, this method only returns issues + # belonging to that account, not its sub-accounts. To retrieve issues for + # sub-accounts, you must first call the + # [accounts.listSubaccounts][google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts] + # method to obtain a list of sub-accounts, and then call + # `accounts.issues.list` for each sub-account individually. + rpc :ListAccountIssues, ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb new file mode 100644 index 000000000000..3312ac3779ff --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accountrelationships.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/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1/accountrelationships.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa7\x02\n\x13\x41\x63\x63ountRelationship\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x88\x01\x01\x12\"\n\x15provider_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x61\x63\x63ount_id_alias\x18\x04 \x01(\tB\x03\xe0\x41\x01:\x90\x01\xea\x41\x8c\x01\n.merchantapi.googleapis.com/AccountRelationship\x12/accounts/{account}/relationships/{relationship}*\x14\x61\x63\x63ountRelationships2\x13\x61\x63\x63ountRelationshipB\x0b\n\t_provider\"e\n\x1dGetAccountRelationshipRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.merchantapi.googleapis.com/AccountRelationship\"\xb6\x01\n UpdateAccountRelationshipRequest\x12\\\n\x14\x61\x63\x63ount_relationship\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.AccountRelationshipB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x8e\x01\n\x1fListAccountRelationshipsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\"\x95\x01\n ListAccountRelationshipsResponse\x12X\n\x15\x61\x63\x63ount_relationships\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.AccountRelationship\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd5\x06\n\x1b\x41\x63\x63ountRelationshipsService\x12\xd7\x01\n\x16GetAccountRelationship\x12\x43.google.shopping.merchant.accounts.v1.GetAccountRelationshipRequest\x1a\x39.google.shopping.merchant.accounts.v1.AccountRelationship\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1/{name=accounts/*/relationships/*}\x12\xa5\x02\n\x19UpdateAccountRelationship\x12\x46.google.shopping.merchant.accounts.v1.UpdateAccountRelationshipRequest\x1a\x39.google.shopping.merchant.accounts.v1.AccountRelationship\"\x84\x01\xda\x41 account_relationship,update_mask\x82\xd3\xe4\x93\x02[2C/accounts/v1/{account_relationship.name=accounts/*/relationships/*}:\x14\x61\x63\x63ount_relationship\x12\xea\x01\n\x18ListAccountRelationships\x12\x45.google.shopping.merchant.accounts.v1.ListAccountRelationshipsRequest\x1a\x46.google.shopping.merchant.accounts.v1.ListAccountRelationshipsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1/{parent=accounts/*}/relationships\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8c\x02\n(com.google.shopping.merchant.accounts.v1B\x19\x41\x63\x63ountRelationshipsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AccountRelationship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountRelationship").msgclass + GetAccountRelationshipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountRelationshipRequest").msgclass + UpdateAccountRelationshipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAccountRelationshipRequest").msgclass + ListAccountRelationshipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountRelationshipsRequest").msgclass + ListAccountRelationshipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountRelationshipsResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb new file mode 100644 index 000000000000..9ad6b131a478 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountrelationships_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/accountrelationships.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountrelationships_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountRelationshipsService + # Service to support AccountRelationship API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AccountRelationshipsService' + + # Retrieve an account relationship. + rpc :GetAccountRelationship, ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship + # Updates the account relationship. Executing this method requires admin + # access. + rpc :UpdateAccountRelationship, ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship + # List account relationships for the specified account. + rpc :ListAccountRelationships, ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb new file mode 100644 index 000000000000..356e3ff567ef --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_pb.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accounts.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1/accountservices_pb' +require 'google/shopping/merchant/accounts/v1/user_pb' +require 'google/type/datetime_pb' + + +descriptor_data = "\n3google/shopping/merchant/accounts/v1/accounts.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1/accountservices.proto\x1a/google/shopping/merchant/accounts/v1/user.proto\x1a\x1agoogle/type/datetime.proto\"\xb9\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\naccount_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\radult_content\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x19\n\x0ctest_account\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12-\n\ttime_zone\x18\x06 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02:N\xea\x41K\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}*\x08\x61\x63\x63ounts2\x07\x61\x63\x63ountB\x10\n\x0e_adult_content\"M\n\x11GetAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\"\xc2\x04\n CreateAndConfigureAccountRequest\x12\x43\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AccountB\x03\xe0\x41\x02\x12\x61\n\x04user\x18\x03 \x03(\x0b\x32N.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddUserB\x03\xe0\x41\x01\x12n\n\x07service\x18\x04 \x03(\x0b\x32X.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddAccountServiceB\x03\xe0\x41\x02\x1a^\n\x07\x41\x64\x64User\x12\x14\n\x07user_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12=\n\x04user\x18\x02 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x01\x1a\xa5\x01\n\x11\x41\x64\x64\x41\x63\x63ountService\x12W\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.AccountAggregationH\x00\x12\x1a\n\x08provider\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x0e\n\x0cservice_typeB\x0b\n\t_provider\"d\n\x14\x44\x65leteAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x91\x01\n\x14UpdateAccountRequest\x12\x43\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x13ListAccountsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListAccountsResponse\x12?\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x87\x01\n\x16ListSubAccountsRequest\x12<\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"s\n\x17ListSubAccountsResponse\x12?\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xaa\t\n\x0f\x41\x63\x63ountsService\x12\xa3\x01\n\nGetAccount\x12\x37.google.shopping.merchant.accounts.v1.GetAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/accounts/v1/{name=accounts/*}\x12\xc7\x01\n\x19\x43reateAndConfigureAccount\x12\x46.google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"3\x82\xd3\xe4\x93\x02-\"(/accounts/v1/accounts:createAndConfigure:\x01*\x12\x92\x01\n\rDeleteAccount\x12:.google.shopping.merchant.accounts.v1.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/accounts/v1/{name=accounts/*}\x12\xc9\x01\n\rUpdateAccount\x12:.google.shopping.merchant.accounts.v1.UpdateAccountRequest\x1a-.google.shopping.merchant.accounts.v1.Account\"M\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02\x31\x32&/accounts/v1/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xa4\x01\n\x0cListAccounts\x12\x39.google.shopping.merchant.accounts.v1.ListAccountsRequest\x1a:.google.shopping.merchant.accounts.v1.ListAccountsResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/accounts/v1/accounts\x12\xd5\x01\n\x0fListSubAccounts\x12<.google.shopping.merchant.accounts.v1.ListSubAccountsRequest\x1a=.google.shopping.merchant.accounts.v1.ListSubAccountsResponse\"E\xda\x41\x08provider\x82\xd3\xe4\x93\x02\x34\x12\x32/accounts/v1/{provider=accounts/*}:listSubaccounts\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rAccountsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.TimeZone", "google/type/datetime.proto"], + ["google.shopping.merchant.accounts.v1.User", "google/shopping/merchant/accounts/v1/user.proto"], + ["google.shopping.merchant.accounts.v1.AccountAggregation", "google/shopping/merchant/accounts/v1/accountservices.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Account").msgclass + GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountRequest").msgclass + CreateAndConfigureAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest").msgclass + CreateAndConfigureAccountRequest::AddUser = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddUser").msgclass + CreateAndConfigureAccountRequest::AddAccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateAndConfigureAccountRequest.AddAccountService").msgclass + DeleteAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteAccountRequest").msgclass + UpdateAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAccountRequest").msgclass + ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountsRequest").msgclass + ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountsResponse").msgclass + ListSubAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListSubAccountsRequest").msgclass + ListSubAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListSubAccountsResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb new file mode 100644 index 000000000000..70ca835bbcc6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/accounts_service/credentials" +require "google/shopping/merchant/accounts/v1/accounts_service/paths" +require "google/shopping/merchant/accounts/v1/accounts_service/client" +require "google/shopping/merchant/accounts/v1/accounts_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support Accounts API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/accounts_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + module AccountsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/accounts_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb new file mode 100644 index 000000000000..e7069ef129e1 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/client.rb @@ -0,0 +1,987 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountsService + ## + # Client for the AccountsService service. + # + # Service to support Accounts API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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/shopping/merchant/accounts/v1/accounts_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 + + @accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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 + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::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_account(name: nil) + # Pass arguments to `get_account` 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 name of the account to retrieve. + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest + + # 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_account.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :get_account, 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 + + ## + # Creates a Merchant Center account with additional configuration. Adds the + # user that makes the request as an admin for the new account. + # + # @overload create_and_configure_account(request, options = nil) + # Pass arguments to `create_and_configure_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::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_and_configure_account(account: nil, user: nil, service: nil) + # Pass arguments to `create_and_configure_account` 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 account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The account to be created. + # @param user [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, ::Hash>] + # Optional. Users to be added to the account. + # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation` and `accounts.createAndConfigure` method can be + # used to create a sub-account under an existing advanced account through + # this method. Additional `account_management` or + # `product_management` services may be provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new + # + # # Call the create_and_configure_account method. + # result = client.create_and_configure_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def create_and_configure_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest + + # 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_and_configure_account.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_and_configure_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_and_configure_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :create_and_configure_account, 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 + + ## + # Deletes the specified account regardless of its type: standalone, advanced + # account or sub-account. Deleting an advanced account leads to the deletion + # of all of its sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + # + # @overload delete_account(request, options = nil) + # Pass arguments to `delete_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::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_account(name: nil, force: nil) + # Pass arguments to `delete_account` 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 name of the account to delete. + # Format: `accounts/{account}` + # @param force [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new + # + # # Call the delete_account method. + # result = client.delete_account request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest + + # 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_account.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :delete_account, 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 + + ## + # Updates an account regardless of its type: standalone, advanced account or + # sub-account. Executing this method requires admin access. + # + # @overload update_account(request, options = nil) + # Pass arguments to `update_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::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 update_account(account: nil, update_mask: nil) + # Pass arguments to `update_account` 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 account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The new version of the account. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_name` + # - `adult_content` + # - `language_code` + # - `time_zone` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new + # + # # Call the update_account method. + # result = client.update_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def update_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest + + # 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.update_account.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account&.name + header_params["account.name"] = request.account.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.update_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :update_account, 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 + + ## + # Note: For the `accounts.list` method, quota and limits usage are charged + # for each user, and not for the Merchant Center ID or the advanced account + # ID. To list several sub-accounts, you should use the + # `accounts.listSubaccounts` method, which is more suitable for advanced + # accounts use case. + # + # @overload list_accounts(request, options = nil) + # Pass arguments to `list_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::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_accounts(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_accounts` 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 page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + # @param filter [::String] + # Optional. Returns only accounts that match the + # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax + # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new + # + # # Call the list_accounts method. + # result = client.list_accounts 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::Shopping::Merchant::Accounts::V1::Account. + # p item + # end + # + def list_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest + + # 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_accounts.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, 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 + + ## + # List all sub-accounts for a given advanced account. This is a + # convenience wrapper for the more powerful `accounts.list` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + # + # @overload list_sub_accounts(request, options = nil) + # Pass arguments to `list_sub_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::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_sub_accounts(provider: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sub_accounts` 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 provider [::String] + # Required. The aggregation service provider. + # Format: `accounts/{accountId}` + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request 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::Shopping::Merchant::Accounts::V1::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new + # + # # Call the list_sub_accounts method. + # result = client.list_sub_accounts 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::Shopping::Merchant::Accounts::V1::Account. + # p item + # end + # + def list_sub_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest + + # 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_sub_accounts.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.provider + header_params["provider"] = request.provider + 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_sub_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sub_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, 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 AccountsService API. + # + # This class represents the configuration for AccountsService, + # 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::Shopping::Merchant::Accounts::V1::AccountsService::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 + # # get_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 AccountsService 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 `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `create_and_configure_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_and_configure_account + ## + # RPC-specific configuration for `delete_account` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account + ## + # RPC-specific configuration for `update_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account + ## + # RPC-specific configuration for `list_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accounts + ## + # RPC-specific configuration for `list_sub_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sub_accounts + + # @private + def initialize parent_rpcs = nil + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account + @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config + delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account + @delete_account = ::Gapic::Config::Method.new delete_account_config + update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account + @update_account = ::Gapic::Config::Method.new update_account_config + list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts + @list_accounts = ::Gapic::Config::Method.new list_accounts_config + list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts + @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb new file mode 100644 index 000000000000..5b15db63c3cc --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AccountsService + # Credentials for the AccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb new file mode 100644 index 000000000000..46eda94feb81 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AccountsService + # Path helper methods for the AccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def user_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb new file mode 100644 index 000000000000..d1ea4a53d014 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/accounts_service/credentials" +require "google/shopping/merchant/accounts/v1/accounts_service/paths" +require "google/shopping/merchant/accounts/v1/accounts_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support Accounts API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + module AccountsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb new file mode 100644 index 000000000000..268bd1d61e63 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/client.rb @@ -0,0 +1,935 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accounts_pb" +require "google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountsService + module Rest + ## + # REST client for the AccountsService service. + # + # Service to support Accounts API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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 + + @accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::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_account(name: nil) + # Pass arguments to `get_account` 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 name of the account to retrieve. + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest + + # 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_account.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::Shopping::Merchant::Accounts::V1::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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.get_account 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 + + ## + # Creates a Merchant Center account with additional configuration. Adds the + # user that makes the request as an admin for the new account. + # + # @overload create_and_configure_account(request, options = nil) + # Pass arguments to `create_and_configure_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::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_and_configure_account(account: nil, user: nil, service: nil) + # Pass arguments to `create_and_configure_account` 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 account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The account to be created. + # @param user [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, ::Hash>] + # Optional. Users to be added to the account. + # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation` and `accounts.createAndConfigure` method can be + # used to create a sub-account under an existing advanced account through + # this method. Additional `account_management` or + # `product_management` services may be provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new + # + # # Call the create_and_configure_account method. + # result = client.create_and_configure_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def create_and_configure_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest + + # 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_and_configure_account.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::Shopping::Merchant::Accounts::V1::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_and_configure_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_and_configure_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.create_and_configure_account 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 + + ## + # Deletes the specified account regardless of its type: standalone, advanced + # account or sub-account. Deleting an advanced account leads to the deletion + # of all of its sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + # + # @overload delete_account(request, options = nil) + # Pass arguments to `delete_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::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_account(name: nil, force: nil) + # Pass arguments to `delete_account` 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 name of the account to delete. + # Format: `accounts/{account}` + # @param force [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new + # + # # Call the delete_account method. + # result = client.delete_account request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest + + # 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_account.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::Shopping::Merchant::Accounts::V1::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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.delete_account 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 + + ## + # Updates an account regardless of its type: standalone, advanced account or + # sub-account. Executing this method requires admin access. + # + # @overload update_account(request, options = nil) + # Pass arguments to `update_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::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 update_account(account: nil, update_mask: nil) + # Pass arguments to `update_account` 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 account [::Google::Shopping::Merchant::Accounts::V1::Account, ::Hash] + # Required. The new version of the account. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_name` + # - `adult_content` + # - `language_code` + # - `time_zone` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new + # + # # Call the update_account method. + # result = client.update_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + # p result + # + def update_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest + + # 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.update_account.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::Shopping::Merchant::Accounts::V1::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.update_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.update_account 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 + + ## + # Note: For the `accounts.list` method, quota and limits usage are charged + # for each user, and not for the Merchant Center ID or the advanced account + # ID. To list several sub-accounts, you should use the + # `accounts.listSubaccounts` method, which is more suitable for advanced + # accounts use case. + # + # @overload list_accounts(request, options = nil) + # Pass arguments to `list_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::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_accounts(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_accounts` 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 page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + # @param filter [::String] + # Optional. Returns only accounts that match the + # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax + # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new + # + # # Call the list_accounts method. + # result = client.list_accounts 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::Shopping::Merchant::Accounts::V1::Account. + # p item + # end + # + def list_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest + + # 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_accounts.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::Shopping::Merchant::Accounts::V1::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_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", 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 + + ## + # List all sub-accounts for a given advanced account. This is a + # convenience wrapper for the more powerful `accounts.list` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + # + # @overload list_sub_accounts(request, options = nil) + # Pass arguments to `list_sub_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::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_sub_accounts(provider: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sub_accounts` 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 provider [::String] + # Required. The aggregation service provider. + # Format: `accounts/{accountId}` + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request 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::Shopping::Merchant::Accounts::V1::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new + # + # # Call the list_sub_accounts method. + # result = client.list_sub_accounts 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::Shopping::Merchant::Accounts::V1::Account. + # p item + # end + # + def list_sub_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest + + # 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_sub_accounts.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::Shopping::Merchant::Accounts::V1::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_sub_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sub_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_sub_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", 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 AccountsService REST API. + # + # This class represents the configuration for AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::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 + # # get_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.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 = "merchantapi.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 AccountsService 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 `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `create_and_configure_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_and_configure_account + ## + # RPC-specific configuration for `delete_account` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account + ## + # RPC-specific configuration for `update_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account + ## + # RPC-specific configuration for `list_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accounts + ## + # RPC-specific configuration for `list_sub_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sub_accounts + + # @private + def initialize parent_rpcs = nil + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account + @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config + delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account + @delete_account = ::Gapic::Config::Method.new delete_account_config + update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account + @update_account = ::Gapic::Config::Method.new update_account_config + list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts + @list_accounts = ::Gapic::Config::Method.new list_accounts_config + list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts + @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..98d29df016b0 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_service/rest/service_stub.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountsService + module Rest + ## + # REST service stub for the AccountsService 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: true, + 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 get_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest] + # 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::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # A result object deserialized from the server's reply + def get_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_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_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Account.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_and_configure_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest] + # 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::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # A result object deserialized from the server's reply + def create_and_configure_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_and_configure_account_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_and_configure_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest] + # 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_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_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_account", + 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 update_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest] + # 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::Shopping::Merchant::Accounts::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # A result object deserialized from the server's reply + def update_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_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: "update_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Account.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_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest] + # 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::Shopping::Merchant::Accounts::V1::ListAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse] + # A result object deserialized from the server's reply + def list_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_accounts_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_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.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_sub_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest] + # 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::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse] + # A result object deserialized from the server's reply + def list_sub_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sub_accounts_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_sub_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.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 get_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest] + # 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_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_and_configure_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest] + # 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_and_configure_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/accounts:createAndConfigure", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest] + # 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_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{account.name}", + body: "account", + matches: [ + ["account.name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest] + # 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_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/accounts", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sub_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest] + # 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_sub_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{provider}:listSubaccounts", + matches: [ + ["provider", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb new file mode 100644 index 000000000000..ae1596b03492 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accounts_services_pb.rb @@ -0,0 +1,74 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/accounts.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accounts_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountsService + # Service to support Accounts API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AccountsService' + + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + rpc :GetAccount, ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account + # Creates a Merchant Center account with additional configuration. Adds the + # user that makes the request as an admin for the new account. + rpc :CreateAndConfigureAccount, ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account + # Deletes the specified account regardless of its type: standalone, advanced + # account or sub-account. Deleting an advanced account leads to the deletion + # of all of its sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + rpc :DeleteAccount, ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, ::Google::Protobuf::Empty + # Updates an account regardless of its type: standalone, advanced account or + # sub-account. Executing this method requires admin access. + rpc :UpdateAccount, ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::Account + # Note: For the `accounts.list` method, quota and limits usage are charged + # for each user, and not for the Merchant Center ID or the advanced account + # ID. To list several sub-accounts, you should use the + # `accounts.listSubaccounts` method, which is more suitable for advanced + # accounts use case. + rpc :ListAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse + # List all sub-accounts for a given advanced account. This is a + # convenience wrapper for the more powerful `accounts.list` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + rpc :ListSubAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb new file mode 100644 index 000000000000..8c7bc12ecfb3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/accountservices.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/protobuf/empty_pb' + + +descriptor_data = "\n:google/shopping/merchant/accounts/v1/accountservices.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xc9\x07\n\x0e\x41\x63\x63ountService\x12W\n\x13products_management\x18\x64 \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.ProductsManagementH\x00\x12Y\n\x14\x63\x61mpaigns_management\x18\x65 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.CampaignsManagementH\x00\x12U\n\x12\x61\x63\x63ount_management\x18\x66 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.AccountManagementH\x00\x12W\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32\x38.google.shopping.merchant.accounts.v1.AccountAggregationH\x00\x12`\n\x18local_listing_management\x18h \x01(\x0b\x32<.google.shopping.merchant.accounts.v1.LocalListingManagementH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\"\n\x15provider_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12G\n\thandshake\x18\x04 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1.HandshakeB\x03\xe0\x41\x03\x12X\n\nmutability\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1.AccountService.MutabilityB\x03\xe0\x41\x03\x12 \n\x13\x65xternal_account_id\x18\x06 \x01(\tB\x03\xe0\x41\x05\"D\n\nMutability\x12\x1a\n\x16MUTABILITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07MUTABLE\x10\x01\x12\r\n\tIMMUTABLE\x10\x02:v\xea\x41s\n)merchantapi.googleapis.com/AccountService\x12%accounts/{account}/services/{service}*\x0f\x61\x63\x63ountServices2\x0e\x61\x63\x63ountServiceB\x0e\n\x0cservice_typeB\x0b\n\t_provider\"[\n\x18GetAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"\x89\x01\n\x1aListAccountServicesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\"\x86\x01\n\x1bListAccountServicesResponse\x12N\n\x10\x61\x63\x63ount_services\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1.AccountService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc5\x01\n\x1cProposeAccountServiceRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x15\n\x08provider\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x0f\x61\x63\x63ount_service\x18\x04 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1.AccountServiceB\x03\xe0\x41\x02\"_\n\x1c\x41pproveAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"^\n\x1bRejectAccountServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/AccountService\"\x14\n\x12ProductsManagement\"\x15\n\x13\x43\x61mpaignsManagement\"\x13\n\x11\x41\x63\x63ountManagement\"\x14\n\x12\x41\x63\x63ountAggregation\"\x18\n\x16LocalListingManagement\"\xcd\x02\n\tHandshake\x12Z\n\x0e\x61pproval_state\x18\x01 \x01(\x0e\x32=.google.shopping.merchant.accounts.v1.Handshake.ApprovalStateB\x03\xe0\x41\x03\x12I\n\x05\x61\x63tor\x18\x02 \x01(\x0e\x32\x35.google.shopping.merchant.accounts.v1.Handshake.ActorB\x03\xe0\x41\x03\"[\n\rApprovalState\x12\x1e\n\x1a\x41PPROVAL_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0f\n\x0b\x45STABLISHED\x10\x02\x12\x0c\n\x08REJECTED\x10\x03\"<\n\x05\x41\x63tor\x12\x15\n\x11\x41\x43TOR_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x43\x43OUNT\x10\x01\x12\x0f\n\x0bOTHER_PARTY\x10\x02\x32\x85\t\n\x16\x41\x63\x63ountServicesService\x12\xc3\x01\n\x11GetAccountService\x12>.google.shopping.merchant.accounts.v1.GetAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{name=accounts/*/services/*}\x12\xd6\x01\n\x13ListAccountServices\x12@.google.shopping.merchant.accounts.v1.ListAccountServicesRequest\x1a\x41.google.shopping.merchant.accounts.v1.ListAccountServicesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{parent=accounts/*}/services\x12\xf1\x01\n\x15ProposeAccountService\x12\x42.google.shopping.merchant.accounts.v1.ProposeAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"^\xda\x41\x1fparent,provider,account_service\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{parent=accounts/*}/services:propose:\x01*\x12\xd6\x01\n\x15\x41pproveAccountService\x12\x42.google.shopping.merchant.accounts.v1.ApproveAccountServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.AccountService\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{name=accounts/*/services/*}:approve:\x01*\x12\xb5\x01\n\x14RejectAccountService\x12\x41.google.shopping.merchant.accounts.v1.RejectAccountServiceRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/accounts/v1/{name=accounts/*/services/*}:reject:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x87\x02\n(com.google.shopping.merchant.accounts.v1B\x14\x41\x63\x63ountServicesProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountService").msgclass + AccountService::Mutability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountService.Mutability").enummodule + GetAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAccountServiceRequest").msgclass + ListAccountServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountServicesRequest").msgclass + ListAccountServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListAccountServicesResponse").msgclass + ProposeAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ProposeAccountServiceRequest").msgclass + ApproveAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ApproveAccountServiceRequest").msgclass + RejectAccountServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RejectAccountServiceRequest").msgclass + ProductsManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ProductsManagement").msgclass + CampaignsManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CampaignsManagement").msgclass + AccountManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountManagement").msgclass + AccountAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AccountAggregation").msgclass + LocalListingManagement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LocalListingManagement").msgclass + Handshake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake").msgclass + Handshake::ApprovalState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake.ApprovalState").enummodule + Handshake::Actor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Handshake.Actor").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb new file mode 100644 index 000000000000..cb5e12d95b87 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/accountservices_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/accountservices.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountservices_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AccountServicesService + # Service to support AccountService API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AccountServicesService' + + # Retrieve an account service. + rpc :GetAccountService, ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService + # List account services for the specified accounts. Supports filtering. + rpc :ListAccountServices, ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse + # Propose an account service. + rpc :ProposeAccountService, ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService + # Approve an account service proposal. + rpc :ApproveAccountService, ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AccountService + # Reject an account service (both proposed and approve services can be + # rejected). + rpc :RejectAccountService, ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb new file mode 100644 index 000000000000..7c11c3c02e0c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/paths" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/client" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/autofeed_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + module AutofeedSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "autofeed_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb new file mode 100644 index 000000000000..2fb77aa9b73d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/client.rb @@ -0,0 +1,560 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/autofeedsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + ## + # Client for the AutofeedSettingsService service. + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :autofeed_settings_service_stub + + ## + # Configure the AutofeedSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutofeedSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 + @autofeed_settings_service_stub.universe_domain + end + + ## + # Create a new AutofeedSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutofeedSettingsService 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/shopping/merchant/accounts/v1/autofeedsettings_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 + + @autofeed_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 + ) + + @autofeed_settings_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 + @autofeed_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieves the autofeed settings of an account. + # + # @overload get_autofeed_settings(request, options = nil) + # Pass arguments to `get_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::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_autofeed_settings(name: nil) + # Pass arguments to `get_autofeed_settings` 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 resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new + # + # # Call the get_autofeed_settings method. + # result = client.get_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + # p result + # + def get_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest + + # 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_autofeed_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, 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 + + ## + # Updates the autofeed settings of an account. + # + # @overload update_autofeed_settings(request, options = nil) + # Pass arguments to `update_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::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 update_autofeed_settings(autofeed_settings: nil, update_mask: nil) + # Pass arguments to `update_autofeed_settings` 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 autofeed_settings [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings, ::Hash] + # Required. The new version of the autofeed setting. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new + # + # # Call the update_autofeed_settings method. + # result = client.update_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + # p result + # + def update_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest + + # 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.update_autofeed_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.autofeed_settings&.name + header_params["autofeed_settings.name"] = request.autofeed_settings.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.update_autofeed_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AutofeedSettingsService API. + # + # This class represents the configuration for AutofeedSettingsService, + # 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 + # # get_autofeed_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 AutofeedSettingsService 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 `get_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_autofeed_settings + ## + # RPC-specific configuration for `update_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_autofeed_settings + + # @private + def initialize parent_rpcs = nil + get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings + @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config + update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings + @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb new file mode 100644 index 000000000000..b87559a45ffb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + # Credentials for the AutofeedSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb new file mode 100644 index 000000000000..9b10694dbd3c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + # Path helper methods for the AutofeedSettingsService API. + module Paths + ## + # Create a fully-qualified AutofeedSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/autofeedSettings` + # + # @param account [String] + # + # @return [::String] + def autofeed_settings_path account: + "accounts/#{account}/autofeedSettings" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb new file mode 100644 index 000000000000..ac4348626898 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/paths" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + module AutofeedSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb new file mode 100644 index 000000000000..26527af23ac2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/client.rb @@ -0,0 +1,520 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + module Rest + ## + # REST client for the AutofeedSettingsService service. + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :autofeed_settings_service_stub + + ## + # Configure the AutofeedSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutofeedSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 + @autofeed_settings_service_stub.universe_domain + end + + ## + # Create a new AutofeedSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutofeedSettingsService 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 + + @autofeed_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @autofeed_settings_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 + @autofeed_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieves the autofeed settings of an account. + # + # @overload get_autofeed_settings(request, options = nil) + # Pass arguments to `get_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::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_autofeed_settings(name: nil) + # Pass arguments to `get_autofeed_settings` 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 resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new + # + # # Call the get_autofeed_settings method. + # result = client.get_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + # p result + # + def get_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest + + # 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_autofeed_settings.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::Shopping::Merchant::Accounts::V1::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_autofeed_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.get_autofeed_settings 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 + + ## + # Updates the autofeed settings of an account. + # + # @overload update_autofeed_settings(request, options = nil) + # Pass arguments to `update_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::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 update_autofeed_settings(autofeed_settings: nil, update_mask: nil) + # Pass arguments to `update_autofeed_settings` 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 autofeed_settings [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings, ::Hash] + # Required. The new version of the autofeed setting. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new + # + # # Call the update_autofeed_settings method. + # result = client.update_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + # p result + # + def update_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest + + # 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.update_autofeed_settings.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::Shopping::Merchant::Accounts::V1::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.update_autofeed_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.update_autofeed_settings 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 + + ## + # Configuration class for the AutofeedSettingsService REST API. + # + # This class represents the configuration for AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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 + # # get_autofeed_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.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 = "merchantapi.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 AutofeedSettingsService 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 `get_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_autofeed_settings + ## + # RPC-specific configuration for `update_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_autofeed_settings + + # @private + def initialize parent_rpcs = nil + get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings + @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config + update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings + @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..aa40dc8fb611 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeed_settings_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/autofeedsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + module Rest + ## + # REST service stub for the AutofeedSettingsService 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: true, + 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 get_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # A result object deserialized from the server's reply + def get_autofeed_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_autofeed_settings_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_autofeed_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # A result object deserialized from the server's reply + def update_autofeed_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_autofeed_settings_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: "update_autofeed_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.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 get_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest] + # 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_autofeed_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_autofeed_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{autofeed_settings.name}", + body: "autofeed_settings", + matches: [ + ["autofeed_settings.name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb new file mode 100644 index 000000000000..f2ffd0ac3235 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/autofeedsettings.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/protobuf/field_mask_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/autofeedsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n\x10\x41utofeedSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x65nable_products\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\x08\x65ligible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:y\xea\x41v\n+merchantapi.googleapis.com/AutofeedSettings\x12#accounts/{account}/autofeedSettings*\x10\x61utofeedSettings2\x10\x61utofeedSettings\"_\n\x1aGetAutofeedSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/AutofeedSettings\"\xad\x01\n\x1dUpdateAutofeedSettingsRequest\x12V\n\x11\x61utofeed_settings\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.AutofeedSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xca\x04\n\x17\x41utofeedSettingsService\x12\xcf\x01\n\x13GetAutofeedSettings\x12@.google.shopping.merchant.accounts.v1.GetAutofeedSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.AutofeedSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/autofeedSettings}\x12\x93\x02\n\x16UpdateAutofeedSettings\x12\x43.google.shopping.merchant.accounts.v1.UpdateAutofeedSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.AutofeedSettings\"|\xda\x41\x1d\x61utofeed_settings,update_mask\x82\xd3\xe4\x93\x02V2A/accounts/v1/{autofeed_settings.name=accounts/*/autofeedSettings}:\x11\x61utofeed_settings\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x41utofeedSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AutofeedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutofeedSettings").msgclass + GetAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAutofeedSettingsRequest").msgclass + UpdateAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAutofeedSettingsRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb new file mode 100644 index 000000000000..7bd0654dce13 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/autofeedsettings_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/autofeedsettings.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/autofeedsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutofeedSettingsService + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AutofeedSettingsService' + + # Retrieves the autofeed settings of an account. + rpc :GetAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings + # Updates the autofeed settings of an account. + rpc :UpdateAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb new file mode 100644 index 000000000000..9664b2a63a95 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/paths" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/client" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/automatic_improvements_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + module AutomaticImprovementsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "automatic_improvements_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb new file mode 100644 index 000000000000..3af2b82c1b70 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/client.rb @@ -0,0 +1,570 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/automaticimprovements_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + ## + # Client for the AutomaticImprovementsService service. + # + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :automatic_improvements_service_stub + + ## + # Configure the AutomaticImprovementsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticImprovementsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 + @automatic_improvements_service_stub.universe_domain + end + + ## + # Create a new AutomaticImprovementsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticImprovementsService 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/shopping/merchant/accounts/v1/automaticimprovements_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 + + @automatic_improvements_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 + ) + + @automatic_improvements_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 + @automatic_improvements_service_stub.logger + end + + # Service calls + + ## + # Retrieves the automatic improvements of an account. + # + # @overload get_automatic_improvements(request, options = nil) + # Pass arguments to `get_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::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_automatic_improvements(name: nil) + # Pass arguments to `get_automatic_improvements` 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 resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new + # + # # Call the get_automatic_improvements method. + # result = client.get_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + # p result + # + def get_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest + + # 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_automatic_improvements.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_automatic_improvements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.call_rpc :get_automatic_improvements, 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 + + ## + # Updates the automatic improvements of an account. + # + # @overload update_automatic_improvements(request, options = nil) + # Pass arguments to `update_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::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 update_automatic_improvements(automatic_improvements: nil, update_mask: nil) + # Pass arguments to `update_automatic_improvements` 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 automatic_improvements [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements, ::Hash] + # Required. The new version of the automatic imrovements. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new + # + # # Call the update_automatic_improvements method. + # result = client.update_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + # p result + # + def update_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest + + # 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.update_automatic_improvements.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.automatic_improvements&.name + header_params["automatic_improvements.name"] = request.automatic_improvements.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.update_automatic_improvements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.call_rpc :update_automatic_improvements, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AutomaticImprovementsService API. + # + # This class represents the configuration for AutomaticImprovementsService, + # 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 + # # get_automatic_improvements to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 AutomaticImprovementsService 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 `get_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :get_automatic_improvements + ## + # RPC-specific configuration for `update_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :update_automatic_improvements + + # @private + def initialize parent_rpcs = nil + get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements + @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config + update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements + @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb new file mode 100644 index 000000000000..e3ce69a9f9d3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + # Credentials for the AutomaticImprovementsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb new file mode 100644 index 000000000000..80c2c6af043a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + # Path helper methods for the AutomaticImprovementsService API. + module Paths + ## + # Create a fully-qualified AutomaticImprovements resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/automaticImprovements` + # + # @param account [String] + # + # @return [::String] + def automatic_improvements_path account: + "accounts/#{account}/automaticImprovements" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb new file mode 100644 index 000000000000..cdcf440f7be2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/credentials" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/paths" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + module AutomaticImprovementsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb new file mode 100644 index 000000000000..b690c6c7ac26 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/client.rb @@ -0,0 +1,530 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + module Rest + ## + # REST client for the AutomaticImprovementsService service. + # + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :automatic_improvements_service_stub + + ## + # Configure the AutomaticImprovementsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticImprovementsService clients + # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 + @automatic_improvements_service_stub.universe_domain + end + + ## + # Create a new AutomaticImprovementsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticImprovementsService 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 + + @automatic_improvements_service_stub = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @automatic_improvements_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 + @automatic_improvements_service_stub.logger + end + + # Service calls + + ## + # Retrieves the automatic improvements of an account. + # + # @overload get_automatic_improvements(request, options = nil) + # Pass arguments to `get_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::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_automatic_improvements(name: nil) + # Pass arguments to `get_automatic_improvements` 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 resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new + # + # # Call the get_automatic_improvements method. + # result = client.get_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + # p result + # + def get_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest + + # 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_automatic_improvements.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::Shopping::Merchant::Accounts::V1::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_automatic_improvements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.get_automatic_improvements 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 + + ## + # Updates the automatic improvements of an account. + # + # @overload update_automatic_improvements(request, options = nil) + # Pass arguments to `update_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::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 update_automatic_improvements(automatic_improvements: nil, update_mask: nil) + # Pass arguments to `update_automatic_improvements` 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 automatic_improvements [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements, ::Hash] + # Required. The new version of the automatic imrovements. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new + # + # # Call the update_automatic_improvements method. + # result = client.update_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + # p result + # + def update_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest + + # 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.update_automatic_improvements.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::Shopping::Merchant::Accounts::V1::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.update_automatic_improvements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.update_automatic_improvements 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 + + ## + # Configuration class for the AutomaticImprovementsService REST API. + # + # This class represents the configuration for AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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 + # # get_automatic_improvements to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.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 = "merchantapi.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 AutomaticImprovementsService 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 `get_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :get_automatic_improvements + ## + # RPC-specific configuration for `update_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :update_automatic_improvements + + # @private + def initialize parent_rpcs = nil + get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements + @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config + update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements + @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb new file mode 100644 index 000000000000..de858d8120ec --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automatic_improvements_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/automaticimprovements_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + module Rest + ## + # REST service stub for the AutomaticImprovementsService 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: true, + 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 get_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest] + # 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::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # A result object deserialized from the server's reply + def get_automatic_improvements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_automatic_improvements_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_automatic_improvements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest] + # 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::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # A result object deserialized from the server's reply + def update_automatic_improvements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_automatic_improvements_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: "update_automatic_improvements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.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 get_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest] + # 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_automatic_improvements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_automatic_improvements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{automatic_improvements.name}", + body: "automatic_improvements", + matches: [ + ["automatic_improvements.name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb new file mode 100644 index 000000000000..071e7b3ccd67 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/automaticimprovements.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/protobuf/field_mask_pb' + + +descriptor_data = "\n@google/shopping/merchant/accounts/v1/automaticimprovements.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa0\x04\n\x15\x41utomaticImprovements\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12U\n\x0citem_updates\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1.AutomaticItemUpdatesH\x00\x88\x01\x01\x12\x61\n\x12image_improvements\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.accounts.v1.AutomaticImageImprovementsH\x01\x88\x01\x01\x12g\n\x15shipping_improvements\x18\x04 \x01(\x0b\x32\x43.google.shopping.merchant.accounts.v1.AutomaticShippingImprovementsH\x02\x88\x01\x01:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/AutomaticImprovements\x12(accounts/{account}/automaticImprovements*\x15\x61utomaticImprovements2\x15\x61utomaticImprovementsB\x0f\n\r_item_updatesB\x15\n\x13_image_improvementsB\x18\n\x16_shipping_improvements\"\xa6\x05\n\x14\x41utomaticItemUpdates\x12\x86\x01\n\x1d\x61\x63\x63ount_item_updates_settings\x18\x01 \x01(\x0b\x32Z.google.shopping.merchant.accounts.v1.AutomaticItemUpdates.ItemUpdatesAccountLevelSettingsB\x03\xe0\x41\x01\x12*\n\x1d\x65\x66\x66\x65\x63tive_allow_price_updates\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x31\n$effective_allow_availability_updates\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x38\n+effective_allow_strict_availability_updates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12.\n!effective_allow_condition_updates\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xbb\x02\n\x1fItemUpdatesAccountLevelSettings\x12 \n\x13\x61llow_price_updates\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1a\x61llow_availability_updates\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n!allow_strict_availability_updates\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12$\n\x17\x61llow_condition_updates\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x16\n\x14_allow_price_updatesB\x1d\n\x1b_allow_availability_updatesB$\n\"_allow_strict_availability_updatesB\x1a\n\x18_allow_condition_updates\"\xa0\x03\n\x1a\x41utomaticImageImprovements\x12\x9d\x01\n#account_image_improvements_settings\x18\x01 \x01(\x0b\x32\x66.google.shopping.merchant.accounts.v1.AutomaticImageImprovements.ImageImprovementsAccountLevelSettingsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x39\n,effective_allow_automatic_image_improvements\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x7f\n%ImageImprovementsAccountLevelSettings\x12/\n\"allow_automatic_image_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_allow_automatic_image_improvementsB&\n$_account_image_improvements_settings\"i\n\x1d\x41utomaticShippingImprovements\x12(\n\x1b\x61llow_shipping_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1e\n\x1c_allow_shipping_improvements\"i\n\x1fGetAutomaticImprovementsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/AutomaticImprovements\"\xbc\x01\n\"UpdateAutomaticImprovementsRequest\x12`\n\x16\x61utomatic_improvements\x18\x01 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.AutomaticImprovementsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x87\x05\n\x1c\x41utomaticImprovementsService\x12\xe3\x01\n\x18GetAutomaticImprovements\x12\x45.google.shopping.merchant.accounts.v1.GetAutomaticImprovementsRequest\x1a;.google.shopping.merchant.accounts.v1.AutomaticImprovements\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/accounts/v1/{name=accounts/*/automaticImprovements}\x12\xb7\x02\n\x1bUpdateAutomaticImprovements\x12H.google.shopping.merchant.accounts.v1.UpdateAutomaticImprovementsRequest\x1a;.google.shopping.merchant.accounts.v1.AutomaticImprovements\"\x90\x01\xda\x41\"automatic_improvements,update_mask\x82\xd3\xe4\x93\x02\x65\x32K/accounts/v1/{automatic_improvements.name=accounts/*/automaticImprovements}:\x16\x61utomatic_improvements\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8d\x02\n(com.google.shopping.merchant.accounts.v1B\x1a\x41utomaticImprovementsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + AutomaticImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImprovements").msgclass + AutomaticItemUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticItemUpdates").msgclass + AutomaticItemUpdates::ItemUpdatesAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings").msgclass + AutomaticImageImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImageImprovements").msgclass + AutomaticImageImprovements::ImageImprovementsAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings").msgclass + AutomaticShippingImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AutomaticShippingImprovements").msgclass + GetAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetAutomaticImprovementsRequest").msgclass + UpdateAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateAutomaticImprovementsRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb new file mode 100644 index 000000000000..15b3bb9d0e97 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/automaticimprovements_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/automaticimprovements.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/automaticimprovements_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module AutomaticImprovementsService + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.AutomaticImprovementsService' + + # Retrieves the automatic improvements of an account. + rpc :GetAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements + # Updates the automatic improvements of an account. + rpc :UpdateAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb new file mode 100644 index 000000000000..710e7e02be44 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/business_identity_service/credentials" +require "google/shopping/merchant/accounts/v1/business_identity_service/paths" +require "google/shopping/merchant/accounts/v1/business_identity_service/client" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/business_identity_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/business_identity_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + module BusinessIdentityService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_identity_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/business_identity_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb new file mode 100644 index 000000000000..57a7c2ad637e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/client.rb @@ -0,0 +1,572 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessidentity_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + ## + # Client for the BusinessIdentityService service. + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_identity_service_stub + + ## + # Configure the BusinessIdentityService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessIdentityService clients + # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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 + @business_identity_service_stub.universe_domain + end + + ## + # Create a new BusinessIdentityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessIdentityService 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/shopping/merchant/accounts/v1/businessidentity_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 + + @business_identity_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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 + ) + + @business_identity_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 + @business_identity_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business identity of an account. + # + # @overload get_business_identity(request, options = nil) + # Pass arguments to `get_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::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_business_identity(name: nil) + # Pass arguments to `get_business_identity` 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 resource name of the business identity. + # Format: `accounts/{account}/businessIdentity`. For example, + # `accounts/123456/businessIdentity`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new + # + # # Call the get_business_identity method. + # result = client.get_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + # p result + # + def get_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest + + # 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_business_identity.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_business_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.call_rpc :get_business_identity, 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 + + ## + # Updates the business identity of an account. Executing this method requires + # admin access. + # + # @overload update_business_identity(request, options = nil) + # Pass arguments to `update_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::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 update_business_identity(business_identity: nil, update_mask: nil) + # Pass arguments to `update_business_identity` 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 business_identity [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity, ::Hash] + # Required. The new version of the business identity. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `black_owned` + # - `latino_owned` + # - `promotions_consent` + # - `small_business` + # - `veteran_owned` + # - `women_owned` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new + # + # # Call the update_business_identity method. + # result = client.update_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + # p result + # + def update_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest + + # 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.update_business_identity.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.business_identity&.name + header_params["business_identity.name"] = request.business_identity.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.update_business_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.call_rpc :update_business_identity, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BusinessIdentityService API. + # + # This class represents the configuration for BusinessIdentityService, + # 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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 + # # get_business_identity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 BusinessIdentityService 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 `get_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_identity + ## + # RPC-specific configuration for `update_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_identity + + # @private + def initialize parent_rpcs = nil + get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity + @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config + update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity + @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb new file mode 100644 index 000000000000..5dcdcca77cae --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + # Credentials for the BusinessIdentityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb new file mode 100644 index 000000000000..cd732d5e32a6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + # Path helper methods for the BusinessIdentityService API. + module Paths + ## + # Create a fully-qualified BusinessIdentity resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/businessIdentity` + # + # @param account [String] + # + # @return [::String] + def business_identity_path account: + "accounts/#{account}/businessIdentity" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb new file mode 100644 index 000000000000..c709362a3eca --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/business_identity_service/credentials" +require "google/shopping/merchant/accounts/v1/business_identity_service/paths" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/business_identity_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + module BusinessIdentityService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb new file mode 100644 index 000000000000..6ab329383fcb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/client.rb @@ -0,0 +1,532 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessidentity_pb" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + module Rest + ## + # REST client for the BusinessIdentityService service. + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_identity_service_stub + + ## + # Configure the BusinessIdentityService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessIdentityService clients + # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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 + @business_identity_service_stub.universe_domain + end + + ## + # Create a new BusinessIdentityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessIdentityService 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 + + @business_identity_service_stub = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_identity_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 + @business_identity_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business identity of an account. + # + # @overload get_business_identity(request, options = nil) + # Pass arguments to `get_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::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_business_identity(name: nil) + # Pass arguments to `get_business_identity` 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 resource name of the business identity. + # Format: `accounts/{account}/businessIdentity`. For example, + # `accounts/123456/businessIdentity`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new + # + # # Call the get_business_identity method. + # result = client.get_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + # p result + # + def get_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest + + # 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_business_identity.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::Shopping::Merchant::Accounts::V1::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_business_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.get_business_identity 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 + + ## + # Updates the business identity of an account. Executing this method requires + # admin access. + # + # @overload update_business_identity(request, options = nil) + # Pass arguments to `update_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::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 update_business_identity(business_identity: nil, update_mask: nil) + # Pass arguments to `update_business_identity` 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 business_identity [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity, ::Hash] + # Required. The new version of the business identity. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `black_owned` + # - `latino_owned` + # - `promotions_consent` + # - `small_business` + # - `veteran_owned` + # - `women_owned` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new + # + # # Call the update_business_identity method. + # result = client.update_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + # p result + # + def update_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest + + # 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.update_business_identity.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::Shopping::Merchant::Accounts::V1::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.update_business_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.update_business_identity 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 + + ## + # Configuration class for the BusinessIdentityService REST API. + # + # This class represents the configuration for BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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 + # # get_business_identity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.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 = "merchantapi.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 BusinessIdentityService 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 `get_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_identity + ## + # RPC-specific configuration for `update_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_identity + + # @private + def initialize parent_rpcs = nil + get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity + @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config + update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity + @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb new file mode 100644 index 000000000000..94360d750890 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_identity_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessidentity_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + module Rest + ## + # REST service stub for the BusinessIdentityService 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: true, + 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 get_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest] + # 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::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # A result object deserialized from the server's reply + def get_business_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_business_identity_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_business_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest] + # 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::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # A result object deserialized from the server's reply + def update_business_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_business_identity_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: "update_business_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.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 get_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest] + # 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_business_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/businessIdentity/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_business_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{business_identity.name}", + body: "business_identity", + matches: [ + ["business_identity.name", %r{^accounts/[^/]+/businessIdentity/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb new file mode 100644 index 000000000000..c44e22dc3ea8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/business_info_service/credentials" +require "google/shopping/merchant/accounts/v1/business_info_service/paths" +require "google/shopping/merchant/accounts/v1/business_info_service/client" +require "google/shopping/merchant/accounts/v1/business_info_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support business info API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/business_info_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/business_info_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + module BusinessInfoService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_info_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/business_info_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb new file mode 100644 index 000000000000..5292139ccc4d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/client.rb @@ -0,0 +1,568 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessinfo_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + ## + # Client for the BusinessInfoService service. + # + # Service to support business info API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_info_service_stub + + ## + # Configure the BusinessInfoService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessInfoService clients + # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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 + @business_info_service_stub.universe_domain + end + + ## + # Create a new BusinessInfoService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessInfoService 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/shopping/merchant/accounts/v1/businessinfo_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 + + @business_info_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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 + ) + + @business_info_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 + @business_info_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business info of an account. + # + # @overload get_business_info(request, options = nil) + # Pass arguments to `get_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::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_business_info(name: nil) + # Pass arguments to `get_business_info` 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 resource name of the business info. + # Format: `accounts/{account}/businessInfo`. For example, + # `accounts/123456/businessInfo`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new + # + # # Call the get_business_info method. + # result = client.get_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + # p result + # + def get_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest + + # 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_business_info.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_business_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.call_rpc :get_business_info, 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 + + ## + # Updates the business info of an account. Executing this method requires + # admin access. + # + # @overload update_business_info(request, options = nil) + # Pass arguments to `update_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::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 update_business_info(business_info: nil, update_mask: nil) + # Pass arguments to `update_business_info` 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 business_info [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo, ::Hash] + # Required. The new version of the business info. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `address` + # - `customer_service` + # - `korean_business_registration_number` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new + # + # # Call the update_business_info method. + # result = client.update_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + # p result + # + def update_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest + + # 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.update_business_info.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.business_info&.name + header_params["business_info.name"] = request.business_info.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.update_business_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.call_rpc :update_business_info, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BusinessInfoService API. + # + # This class represents the configuration for BusinessInfoService, + # 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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 + # # get_business_info to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 BusinessInfoService 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 `get_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_info + ## + # RPC-specific configuration for `update_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_info + + # @private + def initialize parent_rpcs = nil + get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info + @get_business_info = ::Gapic::Config::Method.new get_business_info_config + update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info + @update_business_info = ::Gapic::Config::Method.new update_business_info_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb new file mode 100644 index 000000000000..26bf48ac93e5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + # Credentials for the BusinessInfoService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb new file mode 100644 index 000000000000..e2aa52999ab3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + # Path helper methods for the BusinessInfoService API. + module Paths + ## + # Create a fully-qualified BusinessInfo resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/businessInfo` + # + # @param account [String] + # + # @return [::String] + def business_info_path account: + "accounts/#{account}/businessInfo" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb new file mode 100644 index 000000000000..2cbb7693c774 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/business_info_service/credentials" +require "google/shopping/merchant/accounts/v1/business_info_service/paths" +require "google/shopping/merchant/accounts/v1/business_info_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support business info API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/business_info_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + module BusinessInfoService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/business_info_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb new file mode 100644 index 000000000000..899abc8ce17d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/client.rb @@ -0,0 +1,528 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessinfo_pb" +require "google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + module Rest + ## + # REST client for the BusinessInfoService service. + # + # Service to support business info API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_info_service_stub + + ## + # Configure the BusinessInfoService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessInfoService clients + # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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 + @business_info_service_stub.universe_domain + end + + ## + # Create a new BusinessInfoService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessInfoService 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 + + @business_info_service_stub = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_info_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 + @business_info_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business info of an account. + # + # @overload get_business_info(request, options = nil) + # Pass arguments to `get_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::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_business_info(name: nil) + # Pass arguments to `get_business_info` 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 resource name of the business info. + # Format: `accounts/{account}/businessInfo`. For example, + # `accounts/123456/businessInfo`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new + # + # # Call the get_business_info method. + # result = client.get_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + # p result + # + def get_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest + + # 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_business_info.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::Shopping::Merchant::Accounts::V1::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_business_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.get_business_info 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 + + ## + # Updates the business info of an account. Executing this method requires + # admin access. + # + # @overload update_business_info(request, options = nil) + # Pass arguments to `update_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::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 update_business_info(business_info: nil, update_mask: nil) + # Pass arguments to `update_business_info` 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 business_info [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo, ::Hash] + # Required. The new version of the business info. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `address` + # - `customer_service` + # - `korean_business_registration_number` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new + # + # # Call the update_business_info method. + # result = client.update_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + # p result + # + def update_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest + + # 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.update_business_info.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::Shopping::Merchant::Accounts::V1::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.update_business_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.update_business_info 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 + + ## + # Configuration class for the BusinessInfoService REST API. + # + # This class represents the configuration for BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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 + # # get_business_info to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.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 = "merchantapi.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 BusinessInfoService 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 `get_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_info + ## + # RPC-specific configuration for `update_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_info + + # @private + def initialize parent_rpcs = nil + get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info + @get_business_info = ::Gapic::Config::Method.new get_business_info_config + update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info + @update_business_info = ::Gapic::Config::Method.new update_business_info_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb new file mode 100644 index 000000000000..38f07544e263 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/business_info_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessinfo_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + module Rest + ## + # REST service stub for the BusinessInfoService 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: true, + 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 get_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest] + # 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::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # A result object deserialized from the server's reply + def get_business_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_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_business_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest] + # 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::Shopping::Merchant::Accounts::V1::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # A result object deserialized from the server's reply + def update_business_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_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: "update_business_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.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 get_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest] + # 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_business_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/businessInfo/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_business_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{business_info.name}", + body: "business_info", + matches: [ + ["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb new file mode 100644 index 000000000000..eed75714d85b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/businessidentity.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/protobuf/field_mask_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/businessidentity.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x88\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12i\n\x12promotions_consent\x18\x02 \x01(\x0e\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x02\x12\x62\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x62\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x64\n\rveteran_owned\x18\x05 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x63\n\x0clatino_owned\x18\x06 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x65\n\x0esmall_business\x18\x07 \x01(\x0b\x32H.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x88\x02\n\x11IdentityAttribute\x12\x7f\n\x14identity_declaration\x18\x01 \x01(\x0e\x32\\.google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xad\x01\n\x1dUpdateBusinessIdentityRequest\x12V\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xca\x04\n\x17\x42usinessIdentityService\x12\xcf\x01\n\x13GetBusinessIdentity\x12@.google.shopping.merchant.accounts.v1.GetBusinessIdentityRequest\x1a\x36.google.shopping.merchant.accounts.v1.BusinessIdentity\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/businessIdentity}\x12\x93\x02\n\x16UpdateBusinessIdentity\x12\x43.google.shopping.merchant.accounts.v1.UpdateBusinessIdentityRequest\x1a\x36.google.shopping.merchant.accounts.v1.BusinessIdentity\"|\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02V2A/accounts/v1/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x42usinessIdentityProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity").msgclass + BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute").msgclass + BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule + BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessIdentity.PromotionsConsent").enummodule + GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetBusinessIdentityRequest").msgclass + UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateBusinessIdentityRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb new file mode 100644 index 000000000000..9f4593bf047e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessidentity_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/businessidentity.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessidentity_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessIdentityService + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.BusinessIdentityService' + + # Retrieves the business identity of an account. + rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity + # Updates the business identity of an account. Executing this method requires + # admin access. + rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb new file mode 100644 index 000000000000..74240f676666 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/businessinfo.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/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1/customerservice_pb' +require 'google/shopping/merchant/accounts/v1/phoneverificationstate_pb' +require 'google/type/phone_number_pb' +require 'google/type/postal_address_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1/businessinfo.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1/customerservice.proto\x1a\x41google/shopping/merchant/accounts/v1/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\xe3\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12h\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Y\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n#korean_business_registration_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_serviceB&\n$_korean_business_registration_number\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa1\x01\n\x19UpdateBusinessInfoRequest\x12N\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\x9a\x04\n\x13\x42usinessInfoService\x12\xbf\x01\n\x0fGetBusinessInfo\x12<.google.shopping.merchant.accounts.v1.GetBusinessInfoRequest\x1a\x32.google.shopping.merchant.accounts.v1.BusinessInfo\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/accounts/v1/{name=accounts/*/businessInfo}\x12\xf7\x01\n\x12UpdateBusinessInfo\x12?.google.shopping.merchant.accounts.v1.UpdateBusinessInfoRequest\x1a\x32.google.shopping.merchant.accounts.v1.BusinessInfo\"l\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02J29/accounts/v1/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11\x42usinessInfoProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.PostalAddress", "google/type/postal_address.proto"], + ["google.type.PhoneNumber", "google/type/phone_number.proto"], + ["google.shopping.merchant.accounts.v1.CustomerService", "google/shopping/merchant/accounts/v1/customerservice.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessInfo").msgclass + GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetBusinessInfoRequest").msgclass + UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateBusinessInfoRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb new file mode 100644 index 000000000000..8f10205cfc9d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/businessinfo_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/businessinfo.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessinfo_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module BusinessInfoService + # Service to support business info API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.BusinessInfoService' + + # Retrieves the business info of an account. + rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo + # Updates the business info of an account. Executing this method requires + # admin access. + rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb new file mode 100644 index 000000000000..6fea1e03daa2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/client" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/checkout_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb new file mode 100644 index 000000000000..d8b36f3b6726 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/client.rb @@ -0,0 +1,757 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + ## + # Client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1/checkoutsettings_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 + + @checkout_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, ::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_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` 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 name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :get_checkout_settings, 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 + + ## + # Creates `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, ::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_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` 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 merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :create_checkout_settings, 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 + + ## + # Updates `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, ::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 update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` 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 checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest + + # 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.update_checkout_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.checkout_settings&.name + header_params["checkout_settings.name"] = request.checkout_settings.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.update_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :update_checkout_settings, 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 + + ## + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, ::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_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` 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 name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CheckoutSettingsService API. + # + # This class represents the configuration for CheckoutSettingsService, + # 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 + # # get_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 CheckoutSettingsService 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 `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb new file mode 100644 index 000000000000..e13249354e9d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + # Credentials for the CheckoutSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb new file mode 100644 index 000000000000..5201d4a28d51 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + # Path helper methods for the CheckoutSettingsService API. + module Paths + ## + # Create a fully-qualified CheckoutSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}/checkoutSettings` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def checkout_settings_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}/checkoutSettings" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb new file mode 100644 index 000000000000..74740bcafeb5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb new file mode 100644 index 000000000000..f0fc016aa529 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/client.rb @@ -0,0 +1,703 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + module Rest + ## + # REST client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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 + + @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, ::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_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` 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 name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.get_checkout_settings 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 + + ## + # Creates `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, ::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_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` 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 merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.create_checkout_settings 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 + + ## + # Updates `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, ::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 update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` 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 checkout_settings [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest + + # 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.update_checkout_settings.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::Shopping::Merchant::Accounts::V1::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.update_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.update_checkout_settings 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 + + ## + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, ::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_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` 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 name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest + + # 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_checkout_settings.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::Shopping::Merchant::Accounts::V1::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.delete_checkout_settings 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 + + ## + # Configuration class for the CheckoutSettingsService REST API. + # + # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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 + # # get_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.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 = "merchantapi.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 CheckoutSettingsService 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 `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..155d7a56a067 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkout_settings_service/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module CheckoutSettingsService + module Rest + ## + # REST service stub for the CheckoutSettingsService 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: true, + 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 get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # A result object deserialized from the server's reply + def get_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_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_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # A result object deserialized from the server's reply + def create_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_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_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # A result object deserialized from the server's reply + def update_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_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: "update_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest] + # 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_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_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_checkout_settings", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/checkoutSettings", + body: "checkout_settings", + matches: [ + ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{checkout_settings.name}", + body: "checkout_settings", + matches: [ + ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb new file mode 100644 index 000000000000..782110778f17 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/checkoutsettings_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/checkoutsettings.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/checkoutsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xbc\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12V\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.CheckoutSettingsB\x03\xe0\x41\x02\"\xad\x01\n\x1dUpdateCheckoutSettingsRequest\x12V\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xcc\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12r\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12j\n\x0creview_state\x18\x04 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12V\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1.UriSettingsB\x03\xe0\x41\x03\x12|\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12t\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xb0\x08\n\x17\x43heckoutSettingsService\x12\xda\x01\n\x13GetCheckoutSettings\x12@.google.shopping.merchant.accounts.v1.GetCheckoutSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.CheckoutSettings\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/accounts/v1/{name=accounts/*/programs/*/checkoutSettings}\x12\x89\x02\n\x16\x43reateCheckoutSettings\x12\x43.google.shopping.merchant.accounts.v1.CreateCheckoutSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.CheckoutSettings\"r\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02Q\" e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a developer registration for a merchant. + # + # @overload get_developer_registration(request, options = nil) + # Pass arguments to `get_developer_registration` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::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_developer_registration(name: nil) + # Pass arguments to `get_developer_registration` 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 `name` (ID) of the developer registration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new + # + # # Call the get_developer_registration method. + # result = client.get_developer_registration request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + # p result + # + def get_developer_registration request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest + + # 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_developer_registration.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_developer_registration.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_developer_registration.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.call_rpc :get_developer_registration, 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 + + ## + # Unregister the calling GCP from the calling shopping account. Note that the + # GCP will still be able to access the API for at most 1 day from the + # unregister succussful call. + # + # @overload unregister_gcp(request, options = nil) + # Pass arguments to `unregister_gcp` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::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 unregister_gcp(name: nil) + # Pass arguments to `unregister_gcp` 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 name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new + # + # # Call the unregister_gcp method. + # result = client.unregister_gcp request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def unregister_gcp request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest + + # 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.unregister_gcp.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unregister_gcp.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unregister_gcp.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.call_rpc :unregister_gcp, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DeveloperRegistrationService API. + # + # This class represents the configuration for DeveloperRegistrationService, + # 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 + # # register_gcp to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.register_gcp.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.register_gcp.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 DeveloperRegistrationService 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 `register_gcp` + # @return [::Gapic::Config::Method] + # + attr_reader :register_gcp + ## + # RPC-specific configuration for `get_developer_registration` + # @return [::Gapic::Config::Method] + # + attr_reader :get_developer_registration + ## + # RPC-specific configuration for `unregister_gcp` + # @return [::Gapic::Config::Method] + # + attr_reader :unregister_gcp + + # @private + def initialize parent_rpcs = nil + register_gcp_config = parent_rpcs.register_gcp if parent_rpcs.respond_to? :register_gcp + @register_gcp = ::Gapic::Config::Method.new register_gcp_config + get_developer_registration_config = parent_rpcs.get_developer_registration if parent_rpcs.respond_to? :get_developer_registration + @get_developer_registration = ::Gapic::Config::Method.new get_developer_registration_config + unregister_gcp_config = parent_rpcs.unregister_gcp if parent_rpcs.respond_to? :unregister_gcp + @unregister_gcp = ::Gapic::Config::Method.new unregister_gcp_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb new file mode 100644 index 000000000000..0d6f34a33c6b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + # Credentials for the DeveloperRegistrationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb new file mode 100644 index 000000000000..d749d7f10ac3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + # Path helper methods for the DeveloperRegistrationService API. + module Paths + ## + # Create a fully-qualified DeveloperRegistration resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/developerRegistration` + # + # @param account [String] + # + # @return [::String] + def developer_registration_path account: + "accounts/#{account}/developerRegistration" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb new file mode 100644 index 000000000000..865c78b7903c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/developer_registration_service/credentials" +require "google/shopping/merchant/accounts/v1/developer_registration_service/paths" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to access Developer Registration. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + module DeveloperRegistrationService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb new file mode 100644 index 000000000000..c50cc8ba600a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/client.rb @@ -0,0 +1,618 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/developerregistration_pb" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + module Rest + ## + # REST client for the DeveloperRegistrationService service. + # + # Service to access Developer Registration. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :developer_registration_service_stub + + ## + # Configure the DeveloperRegistrationService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeveloperRegistrationService clients + # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 + @developer_registration_service_stub.universe_domain + end + + ## + # Create a new DeveloperRegistrationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeveloperRegistrationService 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 + + @developer_registration_service_stub = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @developer_registration_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 + @developer_registration_service_stub.logger + end + + # Service calls + + ## + # Registers the GCP used for the API call to the shopping account passed in + # the request. Will create a user with an "API developer" and add the + # "developer_email" as a contact with "API notifications" email preference + # on. + # + # @overload register_gcp(request, options = nil) + # Pass arguments to `register_gcp` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, ::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 register_gcp(name: nil, developer_email: nil) + # Pass arguments to `register_gcp` 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 name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + # @param developer_email [::String] + # Immutable. If the developer email provided is associated with a user in the + # merchant account provided, the user will be updated to have "API developer" + # access type and the email preference corresponding to that user will be + # updated to have the new "API notifications" preference. If the developer + # email provided is not associated with any user we will just add it as a + # contact. The email preference corresponding to that contact will have the + # new "API notifications" preference + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new + # + # # Call the register_gcp method. + # result = client.register_gcp request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + # p result + # + def register_gcp request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest + + # 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.register_gcp.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::Shopping::Merchant::Accounts::V1::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.register_gcp.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.register_gcp.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.register_gcp 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 + + ## + # Retrieves a developer registration for a merchant. + # + # @overload get_developer_registration(request, options = nil) + # Pass arguments to `get_developer_registration` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::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_developer_registration(name: nil) + # Pass arguments to `get_developer_registration` 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 `name` (ID) of the developer registration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new + # + # # Call the get_developer_registration method. + # result = client.get_developer_registration request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + # p result + # + def get_developer_registration request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest + + # 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_developer_registration.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::Shopping::Merchant::Accounts::V1::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_developer_registration.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_developer_registration.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.get_developer_registration 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 + + ## + # Unregister the calling GCP from the calling shopping account. Note that the + # GCP will still be able to access the API for at most 1 day from the + # unregister succussful call. + # + # @overload unregister_gcp(request, options = nil) + # Pass arguments to `unregister_gcp` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::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 unregister_gcp(name: nil) + # Pass arguments to `unregister_gcp` 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 name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new + # + # # Call the unregister_gcp method. + # result = client.unregister_gcp request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def unregister_gcp request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest + + # 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.unregister_gcp.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::Shopping::Merchant::Accounts::V1::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.unregister_gcp.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unregister_gcp.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_registration_service_stub.unregister_gcp 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 + + ## + # Configuration class for the DeveloperRegistrationService REST API. + # + # This class represents the configuration for DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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 + # # register_gcp to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.register_gcp.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.register_gcp.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 = "merchantapi.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 DeveloperRegistrationService 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 `register_gcp` + # @return [::Gapic::Config::Method] + # + attr_reader :register_gcp + ## + # RPC-specific configuration for `get_developer_registration` + # @return [::Gapic::Config::Method] + # + attr_reader :get_developer_registration + ## + # RPC-specific configuration for `unregister_gcp` + # @return [::Gapic::Config::Method] + # + attr_reader :unregister_gcp + + # @private + def initialize parent_rpcs = nil + register_gcp_config = parent_rpcs.register_gcp if parent_rpcs.respond_to? :register_gcp + @register_gcp = ::Gapic::Config::Method.new register_gcp_config + get_developer_registration_config = parent_rpcs.get_developer_registration if parent_rpcs.respond_to? :get_developer_registration + @get_developer_registration = ::Gapic::Config::Method.new get_developer_registration_config + unregister_gcp_config = parent_rpcs.unregister_gcp if parent_rpcs.respond_to? :unregister_gcp + @unregister_gcp = ::Gapic::Config::Method.new unregister_gcp_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb new file mode 100644 index 000000000000..5b8b4afe2bf6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developer_registration_service/rest/service_stub.rb @@ -0,0 +1,268 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/developerregistration_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + module Rest + ## + # REST service stub for the DeveloperRegistrationService 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: true, + 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 register_gcp REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest] + # 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::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # A result object deserialized from the server's reply + def register_gcp request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_register_gcp_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: "register_gcp", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.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_developer_registration REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest] + # 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::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration] + # A result object deserialized from the server's reply + def get_developer_registration request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_developer_registration_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_developer_registration", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unregister_gcp REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest] + # 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 unregister_gcp request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unregister_gcp_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: "unregister_gcp", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the register_gcp REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_register_gcp_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:registerGcp", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_developer_registration REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest] + # 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_developer_registration_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unregister_gcp REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unregister_gcp_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:unregisterGcp", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/developerRegistration/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb new file mode 100644 index 000000000000..927ed66edbee --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/developerregistration.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/protobuf/empty_pb' + + +descriptor_data = "\n@google/shopping/merchant/accounts/v1/developerregistration.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xd1\x01\n\x15\x44\x65veloperRegistration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07gcp_ids\x18\x02 \x03(\tB\x03\xe0\x41\x03:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/DeveloperRegistration\x12(accounts/{account}/developerRegistration*\x15\x64\x65veloperRegistration2\x15\x64\x65veloperRegistration\"z\n\x12RegisterGcpRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration\x12\x1c\n\x0f\x64\x65veloper_email\x18\x02 \x01(\tB\x03\xe0\x41\x05\"^\n\x14UnregisterGcpRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration\"i\n\x1fGetDeveloperRegistrationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/DeveloperRegistration2\xd6\x05\n\x1c\x44\x65veloperRegistrationService\x12\xd1\x01\n\x0bRegisterGcp\x12\x38.google.shopping.merchant.accounts.v1.RegisterGcpRequest\x1a;.google.shopping.merchant.accounts.v1.DeveloperRegistration\"K\x82\xd3\xe4\x93\x02\x45\"@/accounts/v1/{name=accounts/*/developerRegistration}:registerGcp:\x01*\x12\xe3\x01\n\x18GetDeveloperRegistration\x12\x45.google.shopping.merchant.accounts.v1.GetDeveloperRegistrationRequest\x1a;.google.shopping.merchant.accounts.v1.DeveloperRegistration\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/accounts/v1/{name=accounts/*/developerRegistration}\x12\xb2\x01\n\rUnregisterGcp\x12:.google.shopping.merchant.accounts.v1.UnregisterGcpRequest\x1a\x16.google.protobuf.Empty\"M\x82\xd3\xe4\x93\x02G\"B/accounts/v1/{name=accounts/*/developerRegistration}:unregisterGcp:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8d\x02\n(com.google.shopping.merchant.accounts.v1B\x1a\x44\x65veloperRegistrationProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + DeveloperRegistration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeveloperRegistration").msgclass + RegisterGcpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RegisterGcpRequest").msgclass + UnregisterGcpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UnregisterGcpRequest").msgclass + GetDeveloperRegistrationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetDeveloperRegistrationRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb new file mode 100644 index 000000000000..89f927425e7f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/developerregistration_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/developerregistration.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/developerregistration_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module DeveloperRegistrationService + # Service to access Developer Registration. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.DeveloperRegistrationService' + + # Registers the GCP used for the API call to the shopping account passed in + # the request. Will create a user with an "API developer" and add the + # "developer_email" as a contact with "API notifications" email preference + # on. + rpc :RegisterGcp, ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration + # Retrieves a developer registration for a merchant. + rpc :GetDeveloperRegistration, ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration + # Unregister the calling GCP from the calling shopping account. Note that the + # GCP will still be able to access the API for at most 1 day from the + # unregister succussful call. + rpc :UnregisterGcp, ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb new file mode 100644 index 000000000000..be8892273f45 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/email_preferences_service/credentials" +require "google/shopping/merchant/accounts/v1/email_preferences_service/paths" +require "google/shopping/merchant/accounts/v1/email_preferences_service/client" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support the `EmailPreferences` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/email_preferences_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + module EmailPreferencesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "email_preferences_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/email_preferences_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb new file mode 100644 index 000000000000..f237aec0b2ea --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/client.rb @@ -0,0 +1,579 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/emailpreferences_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + ## + # Client for the EmailPreferencesService service. + # + # Service to support the `EmailPreferences` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :email_preferences_service_stub + + ## + # Configure the EmailPreferencesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EmailPreferencesService clients + # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 + @email_preferences_service_stub.universe_domain + end + + ## + # Create a new EmailPreferencesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EmailPreferencesService 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/shopping/merchant/accounts/v1/emailpreferences_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 + + @email_preferences_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 + ) + + @email_preferences_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 + @email_preferences_service_stub.logger + end + + # Service calls + + ## + # Returns the email preferences for a Merchant Center account user. + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + # + # @overload get_email_preferences(request, options = nil) + # Pass arguments to `get_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::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_email_preferences(name: nil) + # Pass arguments to `get_email_preferences` 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 name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new + # + # # Call the get_email_preferences method. + # result = client.get_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + # p result + # + def get_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest + + # 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_email_preferences.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_email_preferences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.call_rpc :get_email_preferences, 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 + + ## + # Updates the email preferences for a Merchant Center account user. Advanced + # account users should specify the advanced account rather than a sub-account + # of the advanced account. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + # + # @overload update_email_preferences(request, options = nil) + # Pass arguments to `update_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::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 update_email_preferences(email_preferences: nil, update_mask: nil) + # Pass arguments to `update_email_preferences` 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 email_preferences [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences, ::Hash] + # Required. Email Preferences to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `news_and_tips` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new + # + # # Call the update_email_preferences method. + # result = client.update_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + # p result + # + def update_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest + + # 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.update_email_preferences.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.email_preferences&.name + header_params["email_preferences.name"] = request.email_preferences.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.update_email_preferences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.call_rpc :update_email_preferences, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the EmailPreferencesService API. + # + # This class represents the configuration for EmailPreferencesService, + # 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 + # # get_email_preferences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 EmailPreferencesService 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 `get_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :get_email_preferences + ## + # RPC-specific configuration for `update_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :update_email_preferences + + # @private + def initialize parent_rpcs = nil + get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences + @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config + update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences + @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb new file mode 100644 index 000000000000..df25579840a1 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + # Credentials for the EmailPreferencesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb new file mode 100644 index 000000000000..cf860da9d8f9 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + # Path helper methods for the EmailPreferencesService API. + module Paths + ## + # Create a fully-qualified EmailPreferences resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}/emailPreferences` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def email_preferences_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}/emailPreferences" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb new file mode 100644 index 000000000000..34d0cb47db6d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/email_preferences_service/credentials" +require "google/shopping/merchant/accounts/v1/email_preferences_service/paths" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support the `EmailPreferences` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + module EmailPreferencesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb new file mode 100644 index 000000000000..cea5303caaa0 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/client.rb @@ -0,0 +1,539 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + module Rest + ## + # REST client for the EmailPreferencesService service. + # + # Service to support the `EmailPreferences` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :email_preferences_service_stub + + ## + # Configure the EmailPreferencesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EmailPreferencesService clients + # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 + @email_preferences_service_stub.universe_domain + end + + ## + # Create a new EmailPreferencesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EmailPreferencesService 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 + + @email_preferences_service_stub = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @email_preferences_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 + @email_preferences_service_stub.logger + end + + # Service calls + + ## + # Returns the email preferences for a Merchant Center account user. + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + # + # @overload get_email_preferences(request, options = nil) + # Pass arguments to `get_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::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_email_preferences(name: nil) + # Pass arguments to `get_email_preferences` 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 name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new + # + # # Call the get_email_preferences method. + # result = client.get_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + # p result + # + def get_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest + + # 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_email_preferences.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::Shopping::Merchant::Accounts::V1::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_email_preferences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.get_email_preferences 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 + + ## + # Updates the email preferences for a Merchant Center account user. Advanced + # account users should specify the advanced account rather than a sub-account + # of the advanced account. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + # + # @overload update_email_preferences(request, options = nil) + # Pass arguments to `update_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::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 update_email_preferences(email_preferences: nil, update_mask: nil) + # Pass arguments to `update_email_preferences` 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 email_preferences [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences, ::Hash] + # Required. Email Preferences to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `news_and_tips` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new + # + # # Call the update_email_preferences method. + # result = client.update_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + # p result + # + def update_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest + + # 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.update_email_preferences.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::Shopping::Merchant::Accounts::V1::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.update_email_preferences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.update_email_preferences 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 + + ## + # Configuration class for the EmailPreferencesService REST API. + # + # This class represents the configuration for EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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 + # # get_email_preferences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.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 = "merchantapi.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 EmailPreferencesService 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 `get_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :get_email_preferences + ## + # RPC-specific configuration for `update_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :update_email_preferences + + # @private + def initialize parent_rpcs = nil + get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences + @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config + update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences + @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb new file mode 100644 index 000000000000..4263c1ea55ae --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/email_preferences_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/emailpreferences_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + module Rest + ## + # REST service stub for the EmailPreferencesService 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: true, + 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 get_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest] + # 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::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # A result object deserialized from the server's reply + def get_email_preferences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_email_preferences_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_email_preferences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest] + # 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::Shopping::Merchant::Accounts::V1::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # A result object deserialized from the server's reply + def update_email_preferences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_email_preferences_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: "update_email_preferences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.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 get_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest] + # 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_email_preferences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_email_preferences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{email_preferences.name}", + body: "email_preferences", + matches: [ + ["email_preferences.name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb new file mode 100644 index 000000000000..e24e83066360 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/emailpreferences.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/protobuf/field_mask_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/emailpreferences.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xe9\x02\n\x10\x45mailPreferences\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12]\n\rnews_and_tips\x18\x02 \x01(\x0e\x32\x41.google.shopping.merchant.accounts.v1.EmailPreferences.OptInStateB\x03\xe0\x41\x01\"X\n\nOptInState\x12\x1c\n\x18OPT_IN_STATE_UNSPECIFIED\x10\x00\x12\r\n\tOPTED_OUT\x10\x01\x12\x0c\n\x08OPTED_IN\x10\x02\x12\x0f\n\x0bUNCONFIRMED\x10\x03:\x88\x01\xea\x41\x84\x01\n+merchantapi.googleapis.com/EmailPreferences\x12\x31\x61\x63\x63ounts/{account}/users/{email}/emailPreferences*\x10\x65mailPreferences2\x10\x65mailPreferences\"_\n\x1aGetEmailPreferencesRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/EmailPreferences\"\xad\x01\n\x1dUpdateEmailPreferencesRequest\x12V\n\x11\x65mail_preferences\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.EmailPreferencesB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xdb\x04\n\x17\x45mailPreferencesService\x12\xd7\x01\n\x13GetEmailPreferences\x12@.google.shopping.merchant.accounts.v1.GetEmailPreferencesRequest\x1a\x36.google.shopping.merchant.accounts.v1.EmailPreferences\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/accounts/v1/{name=accounts/*/users/*/emailPreferences}\x12\x9c\x02\n\x16UpdateEmailPreferences\x12\x43.google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest\x1a\x36.google.shopping.merchant.accounts.v1.EmailPreferences\"\x84\x01\xda\x41\x1d\x65mail_preferences,update_mask\x82\xd3\xe4\x93\x02^2I/accounts/v1/{email_preferences.name=accounts/*/users/*/emailPreferences}:\x11\x65mail_preferences\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15\x45mailPreferencesProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EmailPreferences").msgclass + EmailPreferences::OptInState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EmailPreferences.OptInState").enummodule + GetEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetEmailPreferencesRequest").msgclass + UpdateEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb new file mode 100644 index 000000000000..9e7e9ebeb14e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/emailpreferences_services_pb.rb @@ -0,0 +1,64 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/emailpreferences.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/emailpreferences_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module EmailPreferencesService + # Service to support the `EmailPreferences` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.EmailPreferencesService' + + # Returns the email preferences for a Merchant Center account user. + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + rpc :GetEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences + # Updates the email preferences for a Merchant Center account user. Advanced + # account users should specify the advanced account rather than a sub-account + # of the advanced account. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + rpc :UpdateEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb new file mode 100644 index 000000000000..f591b6b84224 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/paths" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/client" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/gbp_accounts_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + module GbpAccountsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "gbp_accounts_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb new file mode 100644 index 000000000000..003075fc896b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/client.rb @@ -0,0 +1,585 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/gbpaccounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + ## + # Client for the GbpAccountsService service. + # + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gbp_accounts_service_stub + + ## + # Configure the GbpAccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GbpAccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 + @gbp_accounts_service_stub.universe_domain + end + + ## + # Create a new GbpAccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GbpAccountsService 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/shopping/merchant/accounts/v1/gbpaccounts_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 + + @gbp_accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 + ) + + @gbp_accounts_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 + @gbp_accounts_service_stub.logger + end + + # Service calls + + ## + # List the GBP accounts for a given merchant. + # + # @overload list_gbp_accounts(request, options = nil) + # Pass arguments to `list_gbp_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::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_gbp_accounts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gbp_accounts` 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 parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @param page_size [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` 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::Shopping::Merchant::Accounts::V1::GbpAccount>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new + # + # # Call the list_gbp_accounts method. + # result = client.list_gbp_accounts 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::Shopping::Merchant::Accounts::V1::GbpAccount. + # p item + # end + # + def list_gbp_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest + + # 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_gbp_accounts.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_gbp_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gbp_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.call_rpc :list_gbp_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, 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 + + ## + # Link the specified merchant to a GBP account for all countries. + # + # To run this method, you must have admin access to the Merchant Center + # account. If you don't have admin access, the request fails with the error + # message `User is not an administrator of account {ACCOUNT_ID}`. + # + # @overload link_gbp_account(request, options = nil) + # Pass arguments to `link_gbp_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::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 link_gbp_account(parent: nil, gbp_email: nil) + # Pass arguments to `link_gbp_account` 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 parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @param gbp_email [::String] + # Required. The email address of the Business Profile account. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new + # + # # Call the link_gbp_account method. + # result = client.link_gbp_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. + # p result + # + def link_gbp_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest + + # 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.link_gbp_account.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.link_gbp_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.link_gbp_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.call_rpc :link_gbp_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the GbpAccountsService API. + # + # This class represents the configuration for GbpAccountsService, + # 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 + # # list_gbp_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 GbpAccountsService 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 `list_gbp_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gbp_accounts + ## + # RPC-specific configuration for `link_gbp_account` + # @return [::Gapic::Config::Method] + # + attr_reader :link_gbp_account + + # @private + def initialize parent_rpcs = nil + list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts + @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config + link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account + @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb new file mode 100644 index 000000000000..8ec0773ae866 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + # Credentials for the GbpAccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb new file mode 100644 index 000000000000..c4117c11d62f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + # Path helper methods for the GbpAccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb new file mode 100644 index 000000000000..34c90e78e75b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/credentials" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/paths" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + module GbpAccountsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb new file mode 100644 index 000000000000..33da252f5d28 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/client.rb @@ -0,0 +1,545 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + module Rest + ## + # REST client for the GbpAccountsService service. + # + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - {::Google::Shopping::Merchant::Accounts::V1::GbpAccount GbpAccount} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gbp_accounts_service_stub + + ## + # Configure the GbpAccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GbpAccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 + @gbp_accounts_service_stub.universe_domain + end + + ## + # Create a new GbpAccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GbpAccountsService 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 + + @gbp_accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @gbp_accounts_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 + @gbp_accounts_service_stub.logger + end + + # Service calls + + ## + # List the GBP accounts for a given merchant. + # + # @overload list_gbp_accounts(request, options = nil) + # Pass arguments to `list_gbp_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::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_gbp_accounts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gbp_accounts` 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 parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @param page_size [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` 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::Shopping::Merchant::Accounts::V1::GbpAccount>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new + # + # # Call the list_gbp_accounts method. + # result = client.list_gbp_accounts 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::Shopping::Merchant::Accounts::V1::GbpAccount. + # p item + # end + # + def list_gbp_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest + + # 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_gbp_accounts.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::Shopping::Merchant::Accounts::V1::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_gbp_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gbp_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.list_gbp_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, "gbp_accounts", 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 + + ## + # Link the specified merchant to a GBP account for all countries. + # + # To run this method, you must have admin access to the Merchant Center + # account. If you don't have admin access, the request fails with the error + # message `User is not an administrator of account {ACCOUNT_ID}`. + # + # @overload link_gbp_account(request, options = nil) + # Pass arguments to `link_gbp_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::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 link_gbp_account(parent: nil, gbp_email: nil) + # Pass arguments to `link_gbp_account` 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 parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @param gbp_email [::String] + # Required. The email address of the Business Profile account. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new + # + # # Call the link_gbp_account method. + # result = client.link_gbp_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. + # p result + # + def link_gbp_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest + + # 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.link_gbp_account.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::Shopping::Merchant::Accounts::V1::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.link_gbp_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.link_gbp_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.link_gbp_account 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 + + ## + # Configuration class for the GbpAccountsService REST API. + # + # This class represents the configuration for GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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 + # # list_gbp_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.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 = "merchantapi.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 GbpAccountsService 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 `list_gbp_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gbp_accounts + ## + # RPC-specific configuration for `link_gbp_account` + # @return [::Gapic::Config::Method] + # + attr_reader :link_gbp_account + + # @private + def initialize parent_rpcs = nil + list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts + @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config + link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account + @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..8e24ecafa62e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbp_accounts_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/gbpaccounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + module Rest + ## + # REST service stub for the GbpAccountsService 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: true, + 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 list_gbp_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest] + # 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::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse] + # A result object deserialized from the server's reply + def list_gbp_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gbp_accounts_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_gbp_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the link_gbp_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest] + # 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::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse] + # A result object deserialized from the server's reply + def link_gbp_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_link_gbp_account_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: "link_gbp_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.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 list_gbp_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest] + # 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_gbp_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/gbpAccounts", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the link_gbp_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_link_gbp_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/gbpAccounts:linkGbpAccount", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb new file mode 100644 index 000000000000..aed45e291021 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/gbpaccounts.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/protobuf/empty_pb' + + +descriptor_data = "\n6google/shopping/merchant/accounts/v1/gbpaccounts.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xde\x02\n\nGbpAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x0egbp_account_id\x18\x02 \x01(\t\x12\x43\n\x04type\x18\x03 \x01(\x0e\x32\x35.google.shopping.merchant.accounts.v1.GbpAccount.Type\x12\x18\n\x10gbp_account_name\x18\x05 \x01(\t\x12\x15\n\rlisting_count\x18\x06 \x01(\x03\"<\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x14\n\x10\x42USINESS_ACCOUNT\x10\x02:q\xea\x41n\n%merchantapi.googleapis.com/GbpAccount\x12,accounts/{account}/gbpAccounts/{gbp_account}*\x0bgbpAccounts2\ngbpAccount\"\x85\x01\n\x16ListGbpAccountsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"z\n\x17ListGbpAccountsResponse\x12\x46\n\x0cgbp_accounts\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1.GbpAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x15LinkGbpAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tgbp_email\x18\x02 \x01(\tB\x03\xe0\x41\x02\"B\n\x16LinkGbpAccountResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\x8c\x04\n\x12GbpAccountsService\x12\xcd\x01\n\x0fListGbpAccounts\x12<.google.shopping.merchant.accounts.v1.ListGbpAccountsRequest\x1a=.google.shopping.merchant.accounts.v1.ListGbpAccountsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1/{parent=accounts/*}/gbpAccounts\x12\xdc\x01\n\x0eLinkGbpAccount\x12;.google.shopping.merchant.accounts.v1.LinkGbpAccountRequest\x1a<.google.shopping.merchant.accounts.v1.LinkGbpAccountResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\";/accounts/v1/{parent=accounts/*}/gbpAccounts:linkGbpAccount:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x83\x02\n(com.google.shopping.merchant.accounts.v1B\x10GbpAccountsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Empty", "google/protobuf/empty.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + GbpAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GbpAccount").msgclass + GbpAccount::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GbpAccount.Type").enummodule + ListGbpAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListGbpAccountsRequest").msgclass + ListGbpAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListGbpAccountsResponse").msgclass + LinkGbpAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkGbpAccountRequest").msgclass + LinkGbpAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkGbpAccountResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb new file mode 100644 index 000000000000..9e0265543fc6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/gbpaccounts_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/gbpaccounts.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/gbpaccounts_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module GbpAccountsService + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.GbpAccountsService' + + # List the GBP accounts for a given merchant. + rpc :ListGbpAccounts, ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse + # Link the specified merchant to a GBP account for all countries. + # + # To run this method, you must have admin access to the Merchant Center + # account. If you don't have admin access, the request fails with the error + # message `User is not an administrator of account {ACCOUNT_ID}`. + rpc :LinkGbpAccount, ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb new file mode 100644 index 000000000000..96a2e9a3fc6e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/homepage.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/protobuf/field_mask_pb' + + +descriptor_data = "\n3google/shopping/merchant/accounts/v1/homepage.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xae\x01\n\x08Homepage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07\x63laimed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:Z\xea\x41W\n#merchantapi.googleapis.com/Homepage\x12\x1b\x61\x63\x63ounts/{account}/homepage*\thomepages2\x08homepageB\x06\n\x04_uri\"O\n\x12GetHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"\x94\x01\n\x15UpdateHomepageRequest\x12\x45\n\x08homepage\x18\x01 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.HomepageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"i\n\x14\x43laimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\x12\x16\n\toverwrite\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"S\n\x16UnclaimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage2\xdd\x06\n\x0fHomepageService\x12\xaf\x01\n\x0bGetHomepage\x12\x38.google.shopping.merchant.accounts.v1.GetHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{name=accounts/*/homepage}\x12\xd8\x01\n\x0eUpdateHomepage\x12;.google.shopping.merchant.accounts.v1.UpdateHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"Y\xda\x41\x14homepage,update_mask\x82\xd3\xe4\x93\x02<20/accounts/v1/{homepage.name=accounts/*/homepage}:\x08homepage\x12\xb5\x01\n\rClaimHomepage\x12:.google.shopping.merchant.accounts.v1.ClaimHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\"8\x82\xd3\xe4\x93\x02\x32\"-/accounts/v1/{name=accounts/*/homepage}:claim:\x01*\x12\xbb\x01\n\x0fUnclaimHomepage\x12<.google.shopping.merchant.accounts.v1.UnclaimHomepageRequest\x1a..google.shopping.merchant.accounts.v1.Homepage\":\x82\xd3\xe4\x93\x02\x34\"//accounts/v1/{name=accounts/*/homepage}:unclaim:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rHomepageProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + Homepage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Homepage").msgclass + GetHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetHomepageRequest").msgclass + UpdateHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateHomepageRequest").msgclass + ClaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ClaimHomepageRequest").msgclass + UnclaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UnclaimHomepageRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb new file mode 100644 index 000000000000..15692f291136 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/homepage_service/credentials" +require "google/shopping/merchant/accounts/v1/homepage_service/paths" +require "google/shopping/merchant/accounts/v1/homepage_service/client" +require "google/shopping/merchant/accounts/v1/homepage_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support an API for a store's homepage. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/homepage_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/homepage_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + module HomepageService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "homepage_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/homepage_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb new file mode 100644 index 000000000000..b2719d07f0bb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/client.rb @@ -0,0 +1,774 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/homepage_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module HomepageService + ## + # Client for the HomepageService service. + # + # Service to support an API for a store's homepage. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :homepage_service_stub + + ## + # Configure the HomepageService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all HomepageService clients + # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::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 + @homepage_service_stub.universe_domain + end + + ## + # Create a new HomepageService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the HomepageService 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/shopping/merchant/accounts/v1/homepage_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 + + @homepage_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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 + ) + + @homepage_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 + @homepage_service_stub.logger + end + + # Service calls + + ## + # Retrieves a store's homepage. + # + # @overload get_homepage(request, options = nil) + # Pass arguments to `get_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::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_homepage(name: nil) + # Pass arguments to `get_homepage` 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 name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new + # + # # Call the get_homepage method. + # result = client.get_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def get_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest + + # 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_homepage.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :get_homepage, 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 + + ## + # Updates a store's homepage. Executing this method requires admin access. + # + # @overload update_homepage(request, options = nil) + # Pass arguments to `update_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::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 update_homepage(homepage: nil, update_mask: nil) + # Pass arguments to `update_homepage` 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 homepage [::Google::Shopping::Merchant::Accounts::V1::Homepage, ::Hash] + # Required. The new version of the homepage. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `uri` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new + # + # # Call the update_homepage method. + # result = client.update_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def update_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest + + # 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.update_homepage.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.homepage&.name + header_params["homepage.name"] = request.homepage.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.update_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :update_homepage, 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 + + ## + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the business is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. + # + # In case of failure, a canonical error message is returned: + # + # * PERMISSION_DENIED: User doesn't have the necessary permissions on this + # Merchant Center account. + # + # * FAILED_PRECONDITION: + # + # - The account is not a Merchant Center account. + # + # - Merchant Center account doesn't have a homepage. + # + # - Claiming failed (in this case the error message contains more + # details). + # + # @overload claim_homepage(request, options = nil) + # Pass arguments to `claim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::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 claim_homepage(name: nil, overwrite: nil) + # Pass arguments to `claim_homepage` 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 name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # @param overwrite [::Boolean] + # Optional. When set to `true`, this option removes any existing claim on the + # requested website from any other account to the account making the request, + # effectively replacing the previous claim. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new + # + # # Call the claim_homepage method. + # result = client.claim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def claim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest + + # 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.claim_homepage.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.claim_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.claim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :claim_homepage, 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 + + ## + # Unclaims a store's homepage. Executing this method requires admin access. + # + # @overload unclaim_homepage(request, options = nil) + # Pass arguments to `unclaim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::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 unclaim_homepage(name: nil) + # Pass arguments to `unclaim_homepage` 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 name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new + # + # # Call the unclaim_homepage method. + # result = client.unclaim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def unclaim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest + + # 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.unclaim_homepage.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unclaim_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unclaim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :unclaim_homepage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the HomepageService API. + # + # This class represents the configuration for HomepageService, + # 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::Shopping::Merchant::Accounts::V1::HomepageService::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 + # # get_homepage to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 HomepageService 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 `get_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :get_homepage + ## + # RPC-specific configuration for `update_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :update_homepage + ## + # RPC-specific configuration for `claim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :claim_homepage + ## + # RPC-specific configuration for `unclaim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :unclaim_homepage + + # @private + def initialize parent_rpcs = nil + get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage + @get_homepage = ::Gapic::Config::Method.new get_homepage_config + update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage + @update_homepage = ::Gapic::Config::Method.new update_homepage_config + claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage + @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config + unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage + @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb new file mode 100644 index 000000000000..c496baa722a3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module HomepageService + # Credentials for the HomepageService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb new file mode 100644 index 000000000000..83b5e47e96f2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module HomepageService + # Path helper methods for the HomepageService API. + module Paths + ## + # Create a fully-qualified Homepage resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/homepage` + # + # @param account [String] + # + # @return [::String] + def homepage_path account: + "accounts/#{account}/homepage" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb new file mode 100644 index 000000000000..b3c22b878ba8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/homepage_service/credentials" +require "google/shopping/merchant/accounts/v1/homepage_service/paths" +require "google/shopping/merchant/accounts/v1/homepage_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support an API for a store's homepage. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/homepage_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + module HomepageService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/homepage_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb new file mode 100644 index 000000000000..6762bb46a7b3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/client.rb @@ -0,0 +1,720 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/homepage_pb" +require "google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module HomepageService + module Rest + ## + # REST client for the HomepageService service. + # + # Service to support an API for a store's homepage. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :homepage_service_stub + + ## + # Configure the HomepageService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all HomepageService clients + # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::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 + @homepage_service_stub.universe_domain + end + + ## + # Create a new HomepageService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the HomepageService 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 + + @homepage_service_stub = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @homepage_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 + @homepage_service_stub.logger + end + + # Service calls + + ## + # Retrieves a store's homepage. + # + # @overload get_homepage(request, options = nil) + # Pass arguments to `get_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::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_homepage(name: nil) + # Pass arguments to `get_homepage` 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 name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new + # + # # Call the get_homepage method. + # result = client.get_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def get_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest + + # 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_homepage.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::Shopping::Merchant::Accounts::V1::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_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.get_homepage 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 + + ## + # Updates a store's homepage. Executing this method requires admin access. + # + # @overload update_homepage(request, options = nil) + # Pass arguments to `update_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::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 update_homepage(homepage: nil, update_mask: nil) + # Pass arguments to `update_homepage` 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 homepage [::Google::Shopping::Merchant::Accounts::V1::Homepage, ::Hash] + # Required. The new version of the homepage. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `uri` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new + # + # # Call the update_homepage method. + # result = client.update_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def update_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest + + # 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.update_homepage.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::Shopping::Merchant::Accounts::V1::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.update_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.update_homepage 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 + + ## + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the business is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. + # + # In case of failure, a canonical error message is returned: + # + # * PERMISSION_DENIED: User doesn't have the necessary permissions on this + # Merchant Center account. + # + # * FAILED_PRECONDITION: + # + # - The account is not a Merchant Center account. + # + # - Merchant Center account doesn't have a homepage. + # + # - Claiming failed (in this case the error message contains more + # details). + # + # @overload claim_homepage(request, options = nil) + # Pass arguments to `claim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::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 claim_homepage(name: nil, overwrite: nil) + # Pass arguments to `claim_homepage` 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 name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # @param overwrite [::Boolean] + # Optional. When set to `true`, this option removes any existing claim on the + # requested website from any other account to the account making the request, + # effectively replacing the previous claim. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new + # + # # Call the claim_homepage method. + # result = client.claim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def claim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest + + # 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.claim_homepage.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::Shopping::Merchant::Accounts::V1::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.claim_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.claim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.claim_homepage 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 + + ## + # Unclaims a store's homepage. Executing this method requires admin access. + # + # @overload unclaim_homepage(request, options = nil) + # Pass arguments to `unclaim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::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 unclaim_homepage(name: nil) + # Pass arguments to `unclaim_homepage` 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 name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new + # + # # Call the unclaim_homepage method. + # result = client.unclaim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + # p result + # + def unclaim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest + + # 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.unclaim_homepage.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::Shopping::Merchant::Accounts::V1::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.unclaim_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unclaim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.unclaim_homepage 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 + + ## + # Configuration class for the HomepageService REST API. + # + # This class represents the configuration for HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::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 + # # get_homepage to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.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 = "merchantapi.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 HomepageService 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 `get_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :get_homepage + ## + # RPC-specific configuration for `update_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :update_homepage + ## + # RPC-specific configuration for `claim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :claim_homepage + ## + # RPC-specific configuration for `unclaim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :unclaim_homepage + + # @private + def initialize parent_rpcs = nil + get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage + @get_homepage = ::Gapic::Config::Method.new get_homepage_config + update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage + @update_homepage = ::Gapic::Config::Method.new update_homepage_config + claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage + @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config + unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage + @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb new file mode 100644 index 000000000000..01cb60dc0c03 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_service/rest/service_stub.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/homepage_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module HomepageService + module Rest + ## + # REST service stub for the HomepageService 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: true, + 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 get_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest] + # 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::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # A result object deserialized from the server's reply + def get_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_homepage_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_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest] + # 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::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # A result object deserialized from the server's reply + def update_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_homepage_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: "update_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the claim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest] + # 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::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # A result object deserialized from the server's reply + def claim_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_claim_homepage_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: "claim_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unclaim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest] + # 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::Shopping::Merchant::Accounts::V1::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # A result object deserialized from the server's reply + def unclaim_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unclaim_homepage_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: "unclaim_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.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 get_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest] + # 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_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{homepage.name}", + body: "homepage", + matches: [ + ["homepage.name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the claim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_claim_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:claim", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unclaim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unclaim_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:unclaim", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb new file mode 100644 index 000000000000..d4a1356c4bfb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/homepage_services_pb.rb @@ -0,0 +1,73 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/homepage.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/homepage_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module HomepageService + # Service to support an API for a store's homepage. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.HomepageService' + + # Retrieves a store's homepage. + rpc :GetHomepage, ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage + # Updates a store's homepage. Executing this method requires admin access. + rpc :UpdateHomepage, ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the business is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. + # + # In case of failure, a canonical error message is returned: + # + # * PERMISSION_DENIED: User doesn't have the necessary permissions on this + # Merchant Center account. + # + # * FAILED_PRECONDITION: + # + # - The account is not a Merchant Center account. + # + # - Merchant Center account doesn't have a homepage. + # + # - Claiming failed (in this case the error message contains more + # details). + rpc :ClaimHomepage, ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage + # Unclaims a store's homepage. Executing this method requires admin access. + rpc :UnclaimHomepage, ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1::Homepage + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb new file mode 100644 index 000000000000..440ba01c7d57 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/lfp_providers_service/credentials" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/paths" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/client" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/lfp_providers_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + module LfpProvidersService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_providers_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb new file mode 100644 index 000000000000..7ff5c954ceff --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/client.rb @@ -0,0 +1,584 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/lfpproviders_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + ## + # Client for the LfpProvidersService service. + # + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_providers_service_stub + + ## + # Configure the LfpProvidersService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpProvidersService clients + # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + @lfp_providers_service_stub.universe_domain + end + + ## + # Create a new LfpProvidersService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpProvidersService 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/shopping/merchant/accounts/v1/lfpproviders_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 + + @lfp_providers_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + ) + + @lfp_providers_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 + @lfp_providers_service_stub.logger + end + + # Service calls + + ## + # Find the LFP provider candidates in a given country. + # + # @overload find_lfp_providers(request, options = nil) + # Pass arguments to `find_lfp_providers` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::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 find_lfp_providers(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `find_lfp_providers` 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 parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` 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::Shopping::Merchant::Accounts::V1::LfpProvider>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new + # + # # Call the find_lfp_providers method. + # result = client.find_lfp_providers 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::Shopping::Merchant::Accounts::V1::LfpProvider. + # p item + # end + # + def find_lfp_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest + + # 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.find_lfp_providers.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.find_lfp_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, 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 + + ## + # Link the specified merchant to a LFP provider for the specified country. + # + # @overload link_lfp_provider(request, options = nil) + # Pass arguments to `link_lfp_provider` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::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 link_lfp_provider(name: nil, external_account_id: nil) + # Pass arguments to `link_lfp_provider` 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 name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @param external_account_id [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new + # + # # Call the link_lfp_provider method. + # result = client.link_lfp_provider request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. + # p result + # + def link_lfp_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest + + # 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.link_lfp_provider.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout, + metadata: metadata, + retry_policy: @config.rpcs.link_lfp_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpProvidersService API. + # + # This class represents the configuration for LfpProvidersService, + # 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + # # find_lfp_providers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 LfpProvidersService 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 `find_lfp_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :find_lfp_providers + ## + # RPC-specific configuration for `link_lfp_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :link_lfp_provider + + # @private + def initialize parent_rpcs = nil + find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers + @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config + link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider + @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb new file mode 100644 index 000000000000..e05401fcfaeb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + # Credentials for the LfpProvidersService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb new file mode 100644 index 000000000000..761619f2fbfd --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + # Path helper methods for the LfpProvidersService API. + module Paths + ## + # Create a fully-qualified LfpProvider resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` + # + # @param account [String] + # @param omnichannel_setting [String] + # @param lfp_provider [String] + # + # @return [::String] + def lfp_provider_path account:, omnichannel_setting:, lfp_provider: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "omnichannel_setting cannot contain /" if omnichannel_setting.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}/lfpProviders/#{lfp_provider}" + end + + ## + # Create a fully-qualified OmnichannelSetting resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @param account [String] + # @param omnichannel_setting [String] + # + # @return [::String] + def omnichannel_setting_path account:, omnichannel_setting: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb new file mode 100644 index 000000000000..fe6e6193692d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/lfp_providers_service/credentials" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/paths" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + module LfpProvidersService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb new file mode 100644 index 000000000000..44792954e163 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/client.rb @@ -0,0 +1,544 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + module Rest + ## + # REST client for the LfpProvidersService service. + # + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - {::Google::Shopping::Merchant::Accounts::V1::LfpProvider LfpProvider} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_providers_service_stub + + ## + # Configure the LfpProvidersService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpProvidersService clients + # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + @lfp_providers_service_stub.universe_domain + end + + ## + # Create a new LfpProvidersService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpProvidersService 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 + + @lfp_providers_service_stub = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_providers_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 + @lfp_providers_service_stub.logger + end + + # Service calls + + ## + # Find the LFP provider candidates in a given country. + # + # @overload find_lfp_providers(request, options = nil) + # Pass arguments to `find_lfp_providers` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::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 find_lfp_providers(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `find_lfp_providers` 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 parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` 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::Shopping::Merchant::Accounts::V1::LfpProvider>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new + # + # # Call the find_lfp_providers method. + # result = client.find_lfp_providers 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::Shopping::Merchant::Accounts::V1::LfpProvider. + # p item + # end + # + def find_lfp_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest + + # 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.find_lfp_providers.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::Shopping::Merchant::Accounts::V1::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.find_lfp_providers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.find_lfp_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.find_lfp_providers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, "lfp_providers", 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 + + ## + # Link the specified merchant to a LFP provider for the specified country. + # + # @overload link_lfp_provider(request, options = nil) + # Pass arguments to `link_lfp_provider` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::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 link_lfp_provider(name: nil, external_account_id: nil) + # Pass arguments to `link_lfp_provider` 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 name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @param external_account_id [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new + # + # # Call the link_lfp_provider method. + # result = client.link_lfp_provider request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. + # p result + # + def link_lfp_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest + + # 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.link_lfp_provider.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::Shopping::Merchant::Accounts::V1::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.link_lfp_provider.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.link_lfp_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.link_lfp_provider 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 + + ## + # Configuration class for the LfpProvidersService REST API. + # + # This class represents the configuration for LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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 + # # find_lfp_providers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.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 = "merchantapi.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 LfpProvidersService 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 `find_lfp_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :find_lfp_providers + ## + # RPC-specific configuration for `link_lfp_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :link_lfp_provider + + # @private + def initialize parent_rpcs = nil + find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers + @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config + link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider + @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb new file mode 100644 index 000000000000..55681839070a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfp_providers_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/lfpproviders_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + module Rest + ## + # REST service stub for the LfpProvidersService 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: true, + 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 find_lfp_providers REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest] + # 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::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse] + # A result object deserialized from the server's reply + def find_lfp_providers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_find_lfp_providers_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: "find_lfp_providers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the link_lfp_provider REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest] + # 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::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse] + # A result object deserialized from the server's reply + def link_lfp_provider request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_link_lfp_provider_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: "link_lfp_provider", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.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 find_lfp_providers REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_find_lfp_providers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/lfpProviders:find", + matches: [ + ["parent", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the link_lfp_provider REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_link_lfp_provider_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:linkLfpProvider", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/lfpProviders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb new file mode 100644 index 000000000000..4ec10a5c7193 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/lfpproviders.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/protobuf/empty_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1/lfpproviders.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xf4\x01\n\x0bLfpProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n&merchantapi.googleapis.com/LfpProvider\x12Xaccounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}*\x0clfpProviders2\x0blfpProvider\"\x91\x01\n\x17\x46indLfpProvidersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OmnichannelSetting\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"}\n\x18\x46indLfpProvidersResponse\x12H\n\rlfp_providers\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1.LfpProvider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x16LinkLfpProviderRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&merchantapi.googleapis.com/LfpProvider\x12 \n\x13\x65xternal_account_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"C\n\x17LinkLfpProviderResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xc5\x04\n\x13LfpProvidersService\x12\xec\x01\n\x10\x46indLfpProviders\x12=.google.shopping.merchant.accounts.v1.FindLfpProvidersRequest\x1a>.google.shopping.merchant.accounts.v1.FindLfpProvidersResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/accounts/v1/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find\x12\xf5\x01\n\x0fLinkLfpProvider\x12<.google.shopping.merchant.accounts.v1.LinkLfpProviderRequest\x1a=.google.shopping.merchant.accounts.v1.LinkLfpProviderResponse\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\"S/accounts/v1/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x84\x02\n(com.google.shopping.merchant.accounts.v1B\x11LfpProvidersProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Empty", "google/protobuf/empty.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + LfpProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LfpProvider").msgclass + FindLfpProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.FindLfpProvidersRequest").msgclass + FindLfpProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.FindLfpProvidersResponse").msgclass + LinkLfpProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkLfpProviderRequest").msgclass + LinkLfpProviderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LinkLfpProviderResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb new file mode 100644 index 000000000000..777c342fa0ca --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/lfpproviders_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/lfpproviders.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/lfpproviders_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module LfpProvidersService + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.LfpProvidersService' + + # Find the LFP provider candidates in a given country. + rpc :FindLfpProviders, ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse + # Link the specified merchant to a LFP provider for the specified country. + rpc :LinkLfpProvider, ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb new file mode 100644 index 000000000000..4b446d1f3507 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/client" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + module OmnichannelSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "omnichannel_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb new file mode 100644 index 000000000000..10c4cc064e00 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/client.rb @@ -0,0 +1,875 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/omnichannelsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + ## + # Client for the OmnichannelSettingsService service. + # + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :omnichannel_settings_service_stub + + ## + # Configure the OmnichannelSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OmnichannelSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 + @omnichannel_settings_service_stub.universe_domain + end + + ## + # Create a new OmnichannelSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OmnichannelSettingsService 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/shopping/merchant/accounts/v1/omnichannelsettings_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 + + @omnichannel_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 + ) + + @omnichannel_settings_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 + @omnichannel_settings_service_stub.logger + end + + # Service calls + + ## + # Get the omnichannel settings for a given merchant. + # + # @overload get_omnichannel_setting(request, options = nil) + # Pass arguments to `get_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, ::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_omnichannel_setting(name: nil) + # Pass arguments to `get_omnichannel_setting` 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 name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new + # + # # Call the get_omnichannel_setting method. + # result = client.get_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def get_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest + + # 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_omnichannel_setting.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :get_omnichannel_setting, 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 + + ## + # List all the omnichannel settings for a given merchant. + # + # @overload list_omnichannel_settings(request, options = nil) + # Pass arguments to `list_omnichannel_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, ::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_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_omnichannel_settings` 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 parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # 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::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new + # + # # Call the list_omnichannel_settings method. + # result = client.list_omnichannel_settings 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::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p item + # end + # + def list_omnichannel_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest + + # 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_omnichannel_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :list_omnichannel_settings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, 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 + + ## + # Create the omnichannel settings for a given merchant. + # + # @overload create_omnichannel_setting(request, options = nil) + # Pass arguments to `create_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, ::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_omnichannel_setting(parent: nil, omnichannel_setting: nil) + # Pass arguments to `create_omnichannel_setting` 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 parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new + # + # # Call the create_omnichannel_setting method. + # result = client.create_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def create_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest + + # 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_omnichannel_setting.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :create_omnichannel_setting, 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 + + ## + # Update the omnichannel setting for a given merchant in a given country. + # + # @overload update_omnichannel_setting(request, options = nil) + # Pass arguments to `update_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, ::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 update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) + # Pass arguments to `update_omnichannel_setting` 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 omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new + # + # # Call the update_omnichannel_setting method. + # result = client.update_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def update_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest + + # 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.update_omnichannel_setting.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.omnichannel_setting&.name + header_params["omnichannel_setting.name"] = request.omnichannel_setting.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.update_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :update_omnichannel_setting, 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 + + ## + # Requests inventory verification for a given merchant in a given country. + # + # @overload request_inventory_verification(request, options = nil) + # Pass arguments to `request_inventory_verification` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, ::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 request_inventory_verification(name: nil) + # Pass arguments to `request_inventory_verification` 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 name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new + # + # # Call the request_inventory_verification method. + # result = client.request_inventory_verification request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. + # p result + # + def request_inventory_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest + + # 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.request_inventory_verification.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout, + metadata: metadata, + retry_policy: @config.rpcs.request_inventory_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :request_inventory_verification, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the OmnichannelSettingsService API. + # + # This class represents the configuration for OmnichannelSettingsService, + # 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 + # # get_omnichannel_setting to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 OmnichannelSettingsService 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 `get_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :get_omnichannel_setting + ## + # RPC-specific configuration for `list_omnichannel_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_omnichannel_settings + ## + # RPC-specific configuration for `create_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :create_omnichannel_setting + ## + # RPC-specific configuration for `update_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :update_omnichannel_setting + ## + # RPC-specific configuration for `request_inventory_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :request_inventory_verification + + # @private + def initialize parent_rpcs = nil + get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting + @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config + list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings + @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config + create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting + @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config + update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting + @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config + request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification + @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb new file mode 100644 index 000000000000..743f26a6151a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + # Credentials for the OmnichannelSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb new file mode 100644 index 000000000000..ac07deed4d7c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + # Path helper methods for the OmnichannelSettingsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified OmnichannelSetting resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @param account [String] + # @param omnichannel_setting [String] + # + # @return [::String] + def omnichannel_setting_path account:, omnichannel_setting: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb new file mode 100644 index 000000000000..dcde8362fc58 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/paths" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + module OmnichannelSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb new file mode 100644 index 000000000000..0a2657c326d8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/client.rb @@ -0,0 +1,814 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + module Rest + ## + # REST client for the OmnichannelSettingsService service. + # + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting OmnichannelSetting} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :omnichannel_settings_service_stub + + ## + # Configure the OmnichannelSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OmnichannelSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 + @omnichannel_settings_service_stub.universe_domain + end + + ## + # Create a new OmnichannelSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OmnichannelSettingsService 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 + + @omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @omnichannel_settings_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 + @omnichannel_settings_service_stub.logger + end + + # Service calls + + ## + # Get the omnichannel settings for a given merchant. + # + # @overload get_omnichannel_setting(request, options = nil) + # Pass arguments to `get_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, ::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_omnichannel_setting(name: nil) + # Pass arguments to `get_omnichannel_setting` 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 name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new + # + # # Call the get_omnichannel_setting method. + # result = client.get_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def get_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest + + # 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_omnichannel_setting.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::Shopping::Merchant::Accounts::V1::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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.get_omnichannel_setting 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 + + ## + # List all the omnichannel settings for a given merchant. + # + # @overload list_omnichannel_settings(request, options = nil) + # Pass arguments to `list_omnichannel_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, ::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_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_omnichannel_settings` 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 parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # 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::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new + # + # # Call the list_omnichannel_settings method. + # result = client.list_omnichannel_settings 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::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p item + # end + # + def list_omnichannel_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest + + # 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_omnichannel_settings.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::Shopping::Merchant::Accounts::V1::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_omnichannel_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", 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 + + ## + # Create the omnichannel settings for a given merchant. + # + # @overload create_omnichannel_setting(request, options = nil) + # Pass arguments to `create_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, ::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_omnichannel_setting(parent: nil, omnichannel_setting: nil) + # Pass arguments to `create_omnichannel_setting` 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 parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new + # + # # Call the create_omnichannel_setting method. + # result = client.create_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def create_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest + + # 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_omnichannel_setting.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::Shopping::Merchant::Accounts::V1::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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.create_omnichannel_setting 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 + + ## + # Update the omnichannel setting for a given merchant in a given country. + # + # @overload update_omnichannel_setting(request, options = nil) + # Pass arguments to `update_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, ::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 update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) + # Pass arguments to `update_omnichannel_setting` 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 omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new + # + # # Call the update_omnichannel_setting method. + # result = client.update_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + # p result + # + def update_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest + + # 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.update_omnichannel_setting.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::Shopping::Merchant::Accounts::V1::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.update_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.update_omnichannel_setting 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 + + ## + # Requests inventory verification for a given merchant in a given country. + # + # @overload request_inventory_verification(request, options = nil) + # Pass arguments to `request_inventory_verification` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, ::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 request_inventory_verification(name: nil) + # Pass arguments to `request_inventory_verification` 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 name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new + # + # # Call the request_inventory_verification method. + # result = client.request_inventory_verification request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. + # p result + # + def request_inventory_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest + + # 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.request_inventory_verification.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::Shopping::Merchant::Accounts::V1::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.request_inventory_verification.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.request_inventory_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.request_inventory_verification 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 + + ## + # Configuration class for the OmnichannelSettingsService REST API. + # + # This class represents the configuration for OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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 + # # get_omnichannel_setting to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.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 = "merchantapi.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 OmnichannelSettingsService 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 `get_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :get_omnichannel_setting + ## + # RPC-specific configuration for `list_omnichannel_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_omnichannel_settings + ## + # RPC-specific configuration for `create_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :create_omnichannel_setting + ## + # RPC-specific configuration for `update_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :update_omnichannel_setting + ## + # RPC-specific configuration for `request_inventory_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :request_inventory_verification + + # @private + def initialize parent_rpcs = nil + get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting + @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config + list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings + @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config + create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting + @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config + update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting + @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config + request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification + @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..ef4c5ba90cdd --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest/service_stub.rb @@ -0,0 +1,391 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/omnichannelsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OmnichannelSettingsService + module Rest + ## + # REST service stub for the OmnichannelSettingsService 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: true, + 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 get_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest] + # 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::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # A result object deserialized from the server's reply + def get_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_omnichannel_setting_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_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.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_omnichannel_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse] + # A result object deserialized from the server's reply + def list_omnichannel_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_omnichannel_settings_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_omnichannel_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest] + # 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::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # A result object deserialized from the server's reply + def create_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_omnichannel_setting_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_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest] + # 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::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # A result object deserialized from the server's reply + def update_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_omnichannel_setting_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: "update_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the request_inventory_verification REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest] + # 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::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse] + # A result object deserialized from the server's reply + def request_inventory_verification request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_request_inventory_verification_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: "request_inventory_verification", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.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 get_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest] + # 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_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_omnichannel_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest] + # 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_omnichannel_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/omnichannelSettings", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest] + # 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_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/omnichannelSettings", + body: "omnichannel_setting", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{omnichannel_setting.name}", + body: "omnichannel_setting", + matches: [ + ["omnichannel_setting.name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the request_inventory_verification REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_request_inventory_verification_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:requestInventoryVerification", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb new file mode 100644 index 000000000000..67ef90a96d12 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/omnichannelsettings_pb.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/omnichannelsettings.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/protobuf/field_mask_pb' + + +descriptor_data = "\n>google/shopping/merchant/accounts/v1/omnichannelsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xc7\x06\n\x12OmnichannelSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0bregion_code\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12W\n\x08lsf_type\x18\x0c \x01(\x0e\x32@.google.shopping.merchant.accounts.v1.OmnichannelSetting.LsfTypeB\x03\xe0\x41\x02\x12\x44\n\x08in_stock\x18\r \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.InStockB\x03\xe0\x41\x01\x12\x41\n\x06pickup\x18\x0e \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.PickupB\x03\xe0\x41\x01\x12\x44\n\x08lfp_link\x18\x05 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.LfpLinkB\x03\xe0\x41\x03\x12H\n\x03odo\x18\x06 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.OnDisplayToOrderB\x03\xe0\x41\x01\x12?\n\x05\x61\x62out\x18\x07 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.AboutB\x03\xe0\x41\x01\x12`\n\x16inventory_verification\x18\x08 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.InventoryVerificationB\x03\xe0\x41\x01\"O\n\x07LsfType\x12\x18\n\x14LSF_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05GHLSF\x10\x01\x12\x0f\n\x0bMHLSF_BASIC\x10\x02\x12\x0e\n\nMHLSF_FULL\x10\x03:\x9a\x01\xea\x41\x96\x01\n-merchantapi.googleapis.com/OmnichannelSetting\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all existing return policies for a given business. + # + # @overload list_online_return_policies(request, options = nil) + # Pass arguments to `list_online_return_policies` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::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_online_return_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_online_return_policies` 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 Merchant Center account for which to list return policies. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given business is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new + # + # # Call the list_online_return_policies method. + # result = client.list_online_return_policies 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p item + # end + # + def list_online_return_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest + + # 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_online_return_policies.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_online_return_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_online_return_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :list_online_return_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, 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 + + ## + # Creates a new return policy for a given business. + # + # @overload create_online_return_policy(request, options = nil) + # Pass arguments to `create_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::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_online_return_policy(parent: nil, online_return_policy: nil) + # Pass arguments to `create_online_return_policy` 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 Merchant Center account for which the return policy will be + # created. Format: `accounts/{account}` + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy, ::Hash] + # Required. The return policy object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new + # + # # Call the create_online_return_policy method. + # result = client.create_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p result + # + def create_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest + + # 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_online_return_policy.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :create_online_return_policy, 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 + + ## + # Deletes an existing return policy. + # + # @overload delete_online_return_policy(request, options = nil) + # Pass arguments to `delete_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::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_online_return_policy(name: nil) + # Pass arguments to `delete_online_return_policy` 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 name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new + # + # # Call the delete_online_return_policy method. + # result = client.delete_online_return_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest + + # 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_online_return_policy.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :delete_online_return_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the OnlineReturnPolicyService API. + # + # This class represents the configuration for OnlineReturnPolicyService, + # 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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 + # # get_online_return_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 OnlineReturnPolicyService 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 `get_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_online_return_policy + ## + # RPC-specific configuration for `list_online_return_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_online_return_policies + ## + # RPC-specific configuration for `create_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_online_return_policy + ## + # RPC-specific configuration for `delete_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_online_return_policy + + # @private + def initialize parent_rpcs = nil + get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy + @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config + list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies + @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config + create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy + @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config + delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy + @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb new file mode 100644 index 000000000000..755cde9f2c17 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + # Credentials for the OnlineReturnPolicyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb new file mode 100644 index 000000000000..65e3364fbe44 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + # Path helper methods for the OnlineReturnPolicyService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified OnlineReturnPolicy resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/onlineReturnPolicies/{return_policy}` + # + # @param account [String] + # @param return_policy [String] + # + # @return [::String] + def online_return_policy_path account:, return_policy: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/onlineReturnPolicies/#{return_policy}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb new file mode 100644 index 000000000000..1a825cd5294d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/online_return_policy_service/credentials" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/paths" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # The service facilitates the management of a business's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1#google.shopping.merchant.accounts.v1.OnlineReturnPolicy) + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + module OnlineReturnPolicyService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb new file mode 100644 index 000000000000..1ec2429be1f2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb @@ -0,0 +1,717 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + module Rest + ## + # REST client for the OnlineReturnPolicyService service. + # + # The service facilitates the management of a business's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1#google.shopping.merchant.accounts.v1.OnlineReturnPolicy) + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :online_return_policy_service_stub + + ## + # Configure the OnlineReturnPolicyService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OnlineReturnPolicyService clients + # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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 + @online_return_policy_service_stub.universe_domain + end + + ## + # Create a new OnlineReturnPolicyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OnlineReturnPolicyService 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 + + @online_return_policy_service_stub = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @online_return_policy_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 + @online_return_policy_service_stub.logger + end + + # Service calls + + ## + # Gets an existing return policy for a given business. + # + # @overload get_online_return_policy(request, options = nil) + # Pass arguments to `get_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, ::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_online_return_policy(name: nil) + # Pass arguments to `get_online_return_policy` 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 name of the return policy to retrieve. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new + # + # # Call the get_online_return_policy method. + # result = client.get_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p result + # + def get_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest + + # 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_online_return_policy.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::Shopping::Merchant::Accounts::V1::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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.get_online_return_policy 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 all existing return policies for a given business. + # + # @overload list_online_return_policies(request, options = nil) + # Pass arguments to `list_online_return_policies` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::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_online_return_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_online_return_policies` 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 Merchant Center account for which to list return policies. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given business is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new + # + # # Call the list_online_return_policies method. + # result = client.list_online_return_policies 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p item + # end + # + def list_online_return_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest + + # 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_online_return_policies.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::Shopping::Merchant::Accounts::V1::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_online_return_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_online_return_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.list_online_return_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, "online_return_policies", 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 + + ## + # Creates a new return policy for a given business. + # + # @overload create_online_return_policy(request, options = nil) + # Pass arguments to `create_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::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_online_return_policy(parent: nil, online_return_policy: nil) + # Pass arguments to `create_online_return_policy` 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 Merchant Center account for which the return policy will be + # created. Format: `accounts/{account}` + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy, ::Hash] + # Required. The return policy object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new + # + # # Call the create_online_return_policy method. + # result = client.create_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + # p result + # + def create_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest + + # 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_online_return_policy.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::Shopping::Merchant::Accounts::V1::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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.create_online_return_policy 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 + + ## + # Deletes an existing return policy. + # + # @overload delete_online_return_policy(request, options = nil) + # Pass arguments to `delete_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::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_online_return_policy(name: nil) + # Pass arguments to `delete_online_return_policy` 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 name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new + # + # # Call the delete_online_return_policy method. + # result = client.delete_online_return_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest + + # 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_online_return_policy.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::Shopping::Merchant::Accounts::V1::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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.delete_online_return_policy 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 + + ## + # Configuration class for the OnlineReturnPolicyService REST API. + # + # This class represents the configuration for OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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 + # # get_online_return_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.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 = "merchantapi.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 OnlineReturnPolicyService 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 `get_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_online_return_policy + ## + # RPC-specific configuration for `list_online_return_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_online_return_policies + ## + # RPC-specific configuration for `create_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_online_return_policy + ## + # RPC-specific configuration for `delete_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_online_return_policy + + # @private + def initialize parent_rpcs = nil + get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy + @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config + list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies + @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config + create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy + @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config + delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy + @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb new file mode 100644 index 000000000000..a58c1b297ce6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/service_stub.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/online_return_policy_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + module Rest + ## + # REST service stub for the OnlineReturnPolicyService 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: true, + 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 get_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest] + # 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def get_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_online_return_policy_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_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.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_online_return_policies REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest] + # 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::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse] + # A result object deserialized from the server's reply + def list_online_return_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_online_return_policies_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_online_return_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest] + # 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def create_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_online_return_policy_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_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.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_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest] + # 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_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_online_return_policy_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_online_return_policy", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the get_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest] + # 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_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_online_return_policies REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest] + # 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_online_return_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/onlineReturnPolicies", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest] + # 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_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/onlineReturnPolicies", + body: "online_return_policy", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest] + # 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_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb new file mode 100644 index 000000000000..6005cef2f948 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/online_return_policy.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/online_return_policy_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module OnlineReturnPolicyService + # The service facilitates the management of a business's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1#google.shopping.merchant.accounts.v1.OnlineReturnPolicy) + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.OnlineReturnPolicyService' + + # Gets an existing return policy for a given business. + rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy + # Lists all existing return policies for a given business. + rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse + # Creates a new return policy for a given business. + rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy + # Deletes an existing return policy. + rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb new file mode 100644 index 000000000000..12058fe35737 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/phoneverificationstate_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/phoneverificationstate.proto + +require 'google/protobuf' + + +descriptor_data = "\nAgoogle/shopping/merchant/accounts/v1/phoneverificationstate.proto\x12$google.shopping.merchant.accounts.v1*\x92\x01\n\x16PhoneVerificationState\x12(\n$PHONE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12%\n!PHONE_VERIFICATION_STATE_VERIFIED\x10\x01\x12\'\n#PHONE_VERIFICATION_STATE_UNVERIFIED\x10\x02\x42\x8e\x02\n(com.google.shopping.merchant.accounts.v1B\x1bPhoneVerificationStateProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + PhoneVerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.PhoneVerificationState").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb new file mode 100644 index 000000000000..c4070fa3dfb8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/programs.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' + + +descriptor_data = "\n3google/shopping/merchant/accounts/v1/programs.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9a\x04\n\x07Program\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12G\n\x05state\x18\x03 \x01(\x0e\x32\x33.google.shopping.merchant.accounts.v1.Program.StateB\x03\xe0\x41\x03\x12 \n\x13\x61\x63tive_region_codes\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12Z\n\x12unmet_requirements\x18\x05 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.Program.RequirementB\x03\xe0\x41\x03\x1a\x65\n\x0bRequirement\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66\x66\x65\x63ted_region_codes\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ELIGIBLE\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03:a\xea\x41^\n\"merchantapi.googleapis.com/Program\x12%accounts/{account}/programs/{program}*\x08programs2\x07program\"M\n\x11GetProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"\x82\x01\n\x13ListProgramsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Program\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListProgramsResponse\x12?\n\x08programs\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.Program\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x14\x45nableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"Q\n\x15\x44isableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program2\xd4\x06\n\x0fProgramsService\x12\xae\x01\n\nGetProgram\x12\x37.google.shopping.merchant.accounts.v1.GetProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{name=accounts/*/programs/*}\x12\xc1\x01\n\x0cListPrograms\x12\x39.google.shopping.merchant.accounts.v1.ListProgramsRequest\x1a:.google.shopping.merchant.accounts.v1.ListProgramsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/accounts/v1/{parent=accounts/*}/programs\x12\xbe\x01\n\rEnableProgram\x12:.google.shopping.merchant.accounts.v1.EnableProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/accounts/v1/{name=accounts/*/programs/*}:enable:\x01*\x12\xc1\x01\n\x0e\x44isableProgram\x12;.google.shopping.merchant.accounts.v1.DisableProgramRequest\x1a-.google.shopping.merchant.accounts.v1.Program\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1/{name=accounts/*/programs/*}:disable:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x80\x02\n(com.google.shopping.merchant.accounts.v1B\rProgramsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + Program = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program").msgclass + Program::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program.Requirement").msgclass + Program::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Program.State").enummodule + GetProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetProgramRequest").msgclass + ListProgramsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListProgramsRequest").msgclass + ListProgramsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListProgramsResponse").msgclass + EnableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.EnableProgramRequest").msgclass + DisableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DisableProgramRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb new file mode 100644 index 000000000000..9b3a9d962470 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/programs_service/credentials" +require "google/shopping/merchant/accounts/v1/programs_service/paths" +require "google/shopping/merchant/accounts/v1/programs_service/client" +require "google/shopping/merchant/accounts/v1/programs_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/programs_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/programs_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + module ProgramsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "programs_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/programs_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb new file mode 100644 index 000000000000..e801ef72c4c6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/client.rb @@ -0,0 +1,770 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/programs_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + ## + # Client for the ProgramsService service. + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programs_service_stub + + ## + # Configure the ProgramsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgramsService clients + # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 + @programs_service_stub.universe_domain + end + + ## + # Create a new ProgramsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgramsService 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/shopping/merchant/accounts/v1/programs_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 + + @programs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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 + ) + + @programs_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 + @programs_service_stub.logger + end + + # Service calls + + ## + # Retrieves the specified program for the account. + # + # @overload get_program(request, options = nil) + # Pass arguments to `get_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::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_program(name: nil) + # Pass arguments to `get_program` 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 name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}`. For example, + # `accounts/123456/programs/free-listings`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new + # + # # Call the get_program method. + # result = client.get_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def get_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest + + # 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_program.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :get_program, 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 + + ## + # Retrieves all programs for the account. + # + # @overload list_programs(request, options = nil) + # Pass arguments to `list_programs` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::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_programs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_programs` 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 account for which to retrieve all programs. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new + # + # # Call the list_programs method. + # result = client.list_programs 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::Shopping::Merchant::Accounts::V1::Program. + # p item + # end + # + def list_programs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest + + # 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_programs.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_programs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_programs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, 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 + + ## + # Enable participation in the specified program for the account. + # + # @overload enable_program(request, options = nil) + # Pass arguments to `enable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::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 enable_program(name: nil) + # Pass arguments to `enable_program` 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 name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new + # + # # Call the enable_program method. + # result = client.enable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def enable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest + + # 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.enable_program.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :enable_program, 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 + + ## + # Disable participation in the specified program for the account. + # + # @overload disable_program(request, options = nil) + # Pass arguments to `disable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::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 disable_program(name: nil) + # Pass arguments to `disable_program` 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 name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new + # + # # Call the disable_program method. + # result = client.disable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def disable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest + + # 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.disable_program.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :disable_program, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ProgramsService API. + # + # This class represents the configuration for ProgramsService, + # 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 + # # get_program to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 ProgramsService 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 `get_program` + # @return [::Gapic::Config::Method] + # + attr_reader :get_program + ## + # RPC-specific configuration for `list_programs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programs + ## + # RPC-specific configuration for `enable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_program + ## + # RPC-specific configuration for `disable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_program + + # @private + def initialize parent_rpcs = nil + get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program + @get_program = ::Gapic::Config::Method.new get_program_config + list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs + @list_programs = ::Gapic::Config::Method.new list_programs_config + enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program + @enable_program = ::Gapic::Config::Method.new enable_program_config + disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program + @disable_program = ::Gapic::Config::Method.new disable_program_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb new file mode 100644 index 000000000000..dc988246bf75 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + # Credentials for the ProgramsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb new file mode 100644 index 000000000000..eca02f23c2d3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + # Path helper methods for the ProgramsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb new file mode 100644 index 000000000000..533ec3be724c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/programs_service/credentials" +require "google/shopping/merchant/accounts/v1/programs_service/paths" +require "google/shopping/merchant/accounts/v1/programs_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/programs_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + module ProgramsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/programs_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb new file mode 100644 index 000000000000..54e2519d3b53 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/client.rb @@ -0,0 +1,716 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/programs_pb" +require "google/shopping/merchant/accounts/v1/programs_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + module Rest + ## + # REST client for the ProgramsService service. + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programs_service_stub + + ## + # Configure the ProgramsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgramsService clients + # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 + @programs_service_stub.universe_domain + end + + ## + # Create a new ProgramsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgramsService 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 + + @programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @programs_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 + @programs_service_stub.logger + end + + # Service calls + + ## + # Retrieves the specified program for the account. + # + # @overload get_program(request, options = nil) + # Pass arguments to `get_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::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_program(name: nil) + # Pass arguments to `get_program` 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 name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}`. For example, + # `accounts/123456/programs/free-listings`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new + # + # # Call the get_program method. + # result = client.get_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def get_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest + + # 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_program.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::Shopping::Merchant::Accounts::V1::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_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.get_program 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 + + ## + # Retrieves all programs for the account. + # + # @overload list_programs(request, options = nil) + # Pass arguments to `list_programs` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::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_programs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_programs` 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 account for which to retrieve all programs. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Program>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new + # + # # Call the list_programs method. + # result = client.list_programs 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::Shopping::Merchant::Accounts::V1::Program. + # p item + # end + # + def list_programs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest + + # 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_programs.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::Shopping::Merchant::Accounts::V1::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_programs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_programs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.list_programs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", 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 + + ## + # Enable participation in the specified program for the account. + # + # @overload enable_program(request, options = nil) + # Pass arguments to `enable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::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 enable_program(name: nil) + # Pass arguments to `enable_program` 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 name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new + # + # # Call the enable_program method. + # result = client.enable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def enable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest + + # 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.enable_program.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::Shopping::Merchant::Accounts::V1::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.enable_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.enable_program 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 + + ## + # Disable participation in the specified program for the account. + # + # @overload disable_program(request, options = nil) + # Pass arguments to `disable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::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 disable_program(name: nil) + # Pass arguments to `disable_program` 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 name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new + # + # # Call the disable_program method. + # result = client.disable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + # p result + # + def disable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest + + # 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.disable_program.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::Shopping::Merchant::Accounts::V1::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.disable_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.disable_program 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 + + ## + # Configuration class for the ProgramsService REST API. + # + # This class represents the configuration for ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::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 + # # get_program to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.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 = "merchantapi.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 ProgramsService 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 `get_program` + # @return [::Gapic::Config::Method] + # + attr_reader :get_program + ## + # RPC-specific configuration for `list_programs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programs + ## + # RPC-specific configuration for `enable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_program + ## + # RPC-specific configuration for `disable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_program + + # @private + def initialize parent_rpcs = nil + get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program + @get_program = ::Gapic::Config::Method.new get_program_config + list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs + @list_programs = ::Gapic::Config::Method.new list_programs_config + enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program + @enable_program = ::Gapic::Config::Method.new enable_program_config + disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program + @disable_program = ::Gapic::Config::Method.new disable_program_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb new file mode 100644 index 000000000000..9e0c6317aa89 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_service/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/programs_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + module Rest + ## + # REST service stub for the ProgramsService 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: true, + 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 get_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest] + # 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::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # A result object deserialized from the server's reply + def get_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_program_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_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Program.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_programs REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest] + # 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::Shopping::Merchant::Accounts::V1::ListProgramsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse] + # A result object deserialized from the server's reply + def list_programs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_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_programs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest] + # 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::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # A result object deserialized from the server's reply + def enable_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_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: "enable_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Program.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest] + # 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::Shopping::Merchant::Accounts::V1::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Program] + # A result object deserialized from the server's reply + def disable_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_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: "disable_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Program.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 get_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest] + # 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_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_programs REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest] + # 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_programs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/programs", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:enable", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:disable", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb new file mode 100644 index 000000000000..1c10dcc5afe4 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/programs_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/programs.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/programs_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ProgramsService + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a business's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.ProgramsService' + + # Retrieves the specified program for the account. + rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program + # Retrieves all programs for the account. + rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse + # Enable participation in the specified program for the account. + rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program + # Disable participation in the specified program for the account. + rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1::Program + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb new file mode 100644 index 000000000000..895523054065 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_pb.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/regions.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n2google/shopping/merchant/accounts/v1/regions.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xac\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x06region\x18\x03 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\"\x8e\x01\n\x13UpdateRegionRequest\x12\x41\n\x06region\x18\x01 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x13ListRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe5\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12Z\n\x10postal_code_area\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12W\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcb\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32K.google.shopping.merchant.accounts.v1.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\x81\x08\n\x0eRegionsService\x12\xaa\x01\n\tGetRegion\x12\x36.google.shopping.merchant.accounts.v1.GetRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1/{name=accounts/*/regions/*}\x12\xcb\x01\n\x0c\x43reateRegion\x12\x39.google.shopping.merchant.accounts.v1.CreateRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"R\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x32\"(/accounts/v1/{parent=accounts/*}/regions:\x06region\x12\xcd\x01\n\x0cUpdateRegion\x12\x39.google.shopping.merchant.accounts.v1.UpdateRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"T\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02\x39\x32//accounts/v1/{region.name=accounts/*/regions/*}:\x06region\x12\x9a\x01\n\x0c\x44\x65leteRegion\x12\x39.google.shopping.merchant.accounts.v1.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/accounts/v1/{name=accounts/*/regions/*}\x12\xbd\x01\n\x0bListRegions\x12\x38.google.shopping.merchant.accounts.v1.ListRegionsRequest\x1a\x39.google.shopping.merchant.accounts.v1.ListRegionsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/accounts/v1/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xff\x01\n(com.google.shopping.merchant.accounts.v1B\x0cRegionsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.BoolValue", "google/protobuf/wrappers.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetRegionRequest").msgclass + CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateRegionRequest").msgclass + UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateRegionRequest").msgclass + DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteRegionRequest").msgclass + ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListRegionsRequest").msgclass + ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListRegionsResponse").msgclass + Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region").msgclass + Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.PostalCodeArea").msgclass + Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.PostalCodeArea.PostalCodeRange").msgclass + Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region.GeoTargetArea").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb new file mode 100644 index 000000000000..85678b075772 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/regions_service/credentials" +require "google/shopping/merchant/accounts/v1/regions_service/paths" +require "google/shopping/merchant/accounts/v1/regions_service/client" +require "google/shopping/merchant/accounts/v1/regions_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/regions_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/regions_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + module RegionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "regions_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/regions_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb new file mode 100644 index 000000000000..dd4269b48e3c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb @@ -0,0 +1,869 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/regions_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module RegionsService + ## + # Client for the RegionsService service. + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regions_service_stub + + ## + # Configure the RegionsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionsService clients + # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::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 + @regions_service_stub.universe_domain + end + + ## + # Create a new RegionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionsService 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/shopping/merchant/accounts/v1/regions_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 + + @regions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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 + ) + + @regions_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 + @regions_service_stub.logger + end + + # Service calls + + ## + # Retrieves a region defined in your Merchant Center account. + # + # @overload get_region(request, options = nil) + # Pass arguments to `get_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::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_region(name: nil) + # Pass arguments to `get_region` 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 name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new + # + # # Call the get_region method. + # result = client.get_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def get_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest + + # 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_region.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :get_region, 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 + + ## + # Creates a region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload create_region(request, options = nil) + # Pass arguments to `create_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::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_region(parent: nil, region_id: nil, region: nil) + # Pass arguments to `create_region` 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 account to create a region for. + # Format: `accounts/{account}` + # @param region_id [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] + # Required. The region to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new + # + # # Call the create_region method. + # result = client.create_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def create_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest + + # 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_region.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :create_region, 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 + + ## + # Updates a region definition in your Merchant Center account. + # Executing this method requires admin access. + # + # @overload update_region(request, options = nil) + # Pass arguments to `update_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::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 update_region(region: nil, update_mask: nil) + # Pass arguments to `update_region` 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 region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] + # Required. The updated region. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new + # + # # Call the update_region method. + # result = client.update_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def update_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest + + # 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.update_region.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.region&.name + header_params["region.name"] = request.region.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.update_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :update_region, 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 + + ## + # Deletes a region definition from your Merchant Center account. Executing + # this method requires admin access. + # + # @overload delete_region(request, options = nil) + # Pass arguments to `delete_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::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_region(name: nil) + # Pass arguments to `delete_region` 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 name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new + # + # # Call the delete_region method. + # result = client.delete_region request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest + + # 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_region.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :delete_region, 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 the regions in your Merchant Center account. + # + # @overload list_regions(request, options = nil) + # Pass arguments to `list_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::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_regions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regions` 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 account to list regions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` 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::Shopping::Merchant::Accounts::V1::Region>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new + # + # # Call the list_regions method. + # result = client.list_regions 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::Shopping::Merchant::Accounts::V1::Region. + # p item + # end + # + def list_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest + + # 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_regions.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_regions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, 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 RegionsService API. + # + # This class represents the configuration for RegionsService, + # 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::Shopping::Merchant::Accounts::V1::RegionsService::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 + # # get_region to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 RegionsService 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 `get_region` + # @return [::Gapic::Config::Method] + # + attr_reader :get_region + ## + # RPC-specific configuration for `create_region` + # @return [::Gapic::Config::Method] + # + attr_reader :create_region + ## + # RPC-specific configuration for `update_region` + # @return [::Gapic::Config::Method] + # + attr_reader :update_region + ## + # RPC-specific configuration for `delete_region` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_region + ## + # RPC-specific configuration for `list_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regions + + # @private + def initialize parent_rpcs = nil + get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region + @get_region = ::Gapic::Config::Method.new get_region_config + create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region + @create_region = ::Gapic::Config::Method.new create_region_config + update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region + @update_region = ::Gapic::Config::Method.new update_region_config + delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region + @delete_region = ::Gapic::Config::Method.new delete_region_config + list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions + @list_regions = ::Gapic::Config::Method.new list_regions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb new file mode 100644 index 000000000000..a279a8c3f7fd --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module RegionsService + # Credentials for the RegionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb new file mode 100644 index 000000000000..e4f0fbeef945 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module RegionsService + # Path helper methods for the RegionsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Region resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/regions/{region}` + # + # @param account [String] + # @param region [String] + # + # @return [::String] + def region_path account:, region: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/regions/#{region}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb new file mode 100644 index 000000000000..46b633d8ddd3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/regions_service/credentials" +require "google/shopping/merchant/accounts/v1/regions_service/paths" +require "google/shopping/merchant/accounts/v1/regions_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/regions_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + module RegionsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/regions_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb new file mode 100644 index 000000000000..077f76c23c27 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb @@ -0,0 +1,808 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/regions_pb" +require "google/shopping/merchant/accounts/v1/regions_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module RegionsService + module Rest + ## + # REST client for the RegionsService service. + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - {::Google::Shopping::Merchant::Accounts::V1::Region Region} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regions_service_stub + + ## + # Configure the RegionsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionsService clients + # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::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 + @regions_service_stub.universe_domain + end + + ## + # Create a new RegionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionsService 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 + + @regions_service_stub = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @regions_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 + @regions_service_stub.logger + end + + # Service calls + + ## + # Retrieves a region defined in your Merchant Center account. + # + # @overload get_region(request, options = nil) + # Pass arguments to `get_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::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_region(name: nil) + # Pass arguments to `get_region` 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 name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new + # + # # Call the get_region method. + # result = client.get_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def get_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest + + # 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_region.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::Shopping::Merchant::Accounts::V1::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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.get_region 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 + + ## + # Creates a region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload create_region(request, options = nil) + # Pass arguments to `create_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::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_region(parent: nil, region_id: nil, region: nil) + # Pass arguments to `create_region` 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 account to create a region for. + # Format: `accounts/{account}` + # @param region_id [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @param region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] + # Required. The region to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new + # + # # Call the create_region method. + # result = client.create_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def create_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest + + # 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_region.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::Shopping::Merchant::Accounts::V1::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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.create_region 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 + + ## + # Updates a region definition in your Merchant Center account. + # Executing this method requires admin access. + # + # @overload update_region(request, options = nil) + # Pass arguments to `update_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::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 update_region(region: nil, update_mask: nil) + # Pass arguments to `update_region` 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 region [::Google::Shopping::Merchant::Accounts::V1::Region, ::Hash] + # Required. The updated region. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new + # + # # Call the update_region method. + # result = client.update_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + # p result + # + def update_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest + + # 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.update_region.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::Shopping::Merchant::Accounts::V1::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.update_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.update_region 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 + + ## + # Deletes a region definition from your Merchant Center account. Executing + # this method requires admin access. + # + # @overload delete_region(request, options = nil) + # Pass arguments to `delete_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::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_region(name: nil) + # Pass arguments to `delete_region` 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 name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new + # + # # Call the delete_region method. + # result = client.delete_region request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest + + # 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_region.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::Shopping::Merchant::Accounts::V1::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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.delete_region 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 the regions in your Merchant Center account. + # + # @overload list_regions(request, options = nil) + # Pass arguments to `list_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::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_regions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regions` 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 account to list regions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` 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::Shopping::Merchant::Accounts::V1::Region>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::Region>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new + # + # # Call the list_regions method. + # result = client.list_regions 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::Shopping::Merchant::Accounts::V1::Region. + # p item + # end + # + def list_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest + + # 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_regions.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::Shopping::Merchant::Accounts::V1::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_regions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.list_regions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @regions_service_stub, :list_regions, "regions", 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 RegionsService REST API. + # + # This class represents the configuration for RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::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 + # # get_region to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.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 = "merchantapi.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 RegionsService 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 `get_region` + # @return [::Gapic::Config::Method] + # + attr_reader :get_region + ## + # RPC-specific configuration for `create_region` + # @return [::Gapic::Config::Method] + # + attr_reader :create_region + ## + # RPC-specific configuration for `update_region` + # @return [::Gapic::Config::Method] + # + attr_reader :update_region + ## + # RPC-specific configuration for `delete_region` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_region + ## + # RPC-specific configuration for `list_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regions + + # @private + def initialize parent_rpcs = nil + get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region + @get_region = ::Gapic::Config::Method.new get_region_config + create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region + @create_region = ::Gapic::Config::Method.new create_region_config + update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region + @update_region = ::Gapic::Config::Method.new update_region_config + delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region + @delete_region = ::Gapic::Config::Method.new delete_region_config + list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions + @list_regions = ::Gapic::Config::Method.new list_regions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb new file mode 100644 index 000000000000..baa53468684d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/regions_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module RegionsService + module Rest + ## + # REST service stub for the RegionsService 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: true, + 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 get_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest] + # 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::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # A result object deserialized from the server's reply + def get_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_region_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_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Region.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest] + # 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::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # A result object deserialized from the server's reply + def create_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_region_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_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Region.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest] + # 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::Shopping::Merchant::Accounts::V1::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # A result object deserialized from the server's reply + def update_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_region_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: "update_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::Region.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest] + # 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_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_region_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_region", + 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 list_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest] + # 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::Shopping::Merchant::Accounts::V1::ListRegionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse] + # A result object deserialized from the server's reply + def list_regions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_regions_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_regions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.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 get_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest] + # 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_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest] + # 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_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/regions", + body: "region", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{region.name}", + body: "region", + matches: [ + ["region.name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest] + # 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_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest] + # 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_regions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/regions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb new file mode 100644 index 000000000000..ae05160e0f4e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/regions.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/regions_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module RegionsService + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1.Region] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.RegionsService' + + # Retrieves a region defined in your Merchant Center account. + rpc :GetRegion, ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region + # Creates a region definition in your Merchant Center account. Executing this + # method requires admin access. + rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region + # Updates a region definition in your Merchant Center account. + # Executing this method requires admin access. + rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region + # Deletes a region definition from your Merchant Center account. Executing + # this method requires admin access. + rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Google::Protobuf::Empty + # Lists the regions in your Merchant Center account. + rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb new file mode 100644 index 000000000000..18f7db800f6b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/rest.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/account_issue_service/rest" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" +require "google/shopping/merchant/accounts/v1/account_services_service/rest" +require "google/shopping/merchant/accounts/v1/user_service/rest" +require "google/shopping/merchant/accounts/v1/accounts_service/rest" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest" +require "google/shopping/merchant/accounts/v1/business_info_service/rest" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" +require "google/shopping/merchant/accounts/v1/homepage_service/rest" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" +require "google/shopping/merchant/accounts/v1/programs_service/rest" +require "google/shopping/merchant/accounts/v1/regions_service/rest" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" +require "google/shopping/merchant/accounts/v1/version" + +module Google + module Shopping + module Merchant + module Accounts + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/accounts/v1/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb new file mode 100644 index 000000000000..0fe22f35c42f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/shipping_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/paths" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/client" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to get method call shipping setting information per Merchant API + # method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/shipping_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + module ShippingSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "shipping_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb new file mode 100644 index 000000000000..a93960fefef2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/client.rb @@ -0,0 +1,564 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/shippingsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + ## + # Client for the ShippingSettingsService service. + # + # Service to get method call shipping setting information per Merchant API + # method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shipping_settings_service_stub + + ## + # Configure the ShippingSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShippingSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 + @shipping_settings_service_stub.universe_domain + end + + ## + # Create a new ShippingSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShippingSettingsService 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/shopping/merchant/accounts/v1/shippingsettings_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 + + @shipping_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 + ) + + @shipping_settings_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 + @shipping_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieve shipping setting information. + # + # @overload get_shipping_settings(request, options = nil) + # Pass arguments to `get_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::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_shipping_settings(name: nil) + # Pass arguments to `get_shipping_settings` 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 name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new + # + # # Call the get_shipping_settings method. + # result = client.get_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + # p result + # + def get_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest + + # 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_shipping_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_shipping_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.call_rpc :get_shipping_settings, 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 + + ## + # Replace the shipping setting of a business with the request shipping + # setting. Executing this method requires admin access. + # + # @overload insert_shipping_settings(request, options = nil) + # Pass arguments to `insert_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::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 insert_shipping_settings(parent: nil, shipping_setting: nil) + # Pass arguments to `insert_shipping_settings` 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 account for which this shipping setting will be inserted. If + # you are using an advanced account, you must specify the unique identifier + # of the sub-account for which you want to insert the shipping setting. + # Format: `accounts/{ACCOUNT_ID}` + # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings, ::Hash] + # Required. The new version of the account. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new + # + # # Call the insert_shipping_settings method. + # result = client.insert_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + # p result + # + def insert_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest + + # 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.insert_shipping_settings.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_shipping_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.call_rpc :insert_shipping_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ShippingSettingsService API. + # + # This class represents the configuration for ShippingSettingsService, + # 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 + # # get_shipping_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 ShippingSettingsService 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 `get_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shipping_settings + ## + # RPC-specific configuration for `insert_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_shipping_settings + + # @private + def initialize parent_rpcs = nil + get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings + @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config + insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings + @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb new file mode 100644 index 000000000000..84ad3ad44e8f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + # Credentials for the ShippingSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb new file mode 100644 index 000000000000..86fa77cd20dd --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/paths.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + # Path helper methods for the ShippingSettingsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ShippingSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/shippingSettings` + # + # @param account [String] + # + # @return [::String] + def shipping_settings_path account: + "accounts/#{account}/shippingSettings" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb new file mode 100644 index 000000000000..faebe6765273 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/shipping_settings_service/credentials" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/paths" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to get method call shipping setting information per Merchant API + # method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + module ShippingSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb new file mode 100644 index 000000000000..8a7345934724 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/client.rb @@ -0,0 +1,524 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + module Rest + ## + # REST client for the ShippingSettingsService service. + # + # Service to get method call shipping setting information per Merchant API + # method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shipping_settings_service_stub + + ## + # Configure the ShippingSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShippingSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 + @shipping_settings_service_stub.universe_domain + end + + ## + # Create a new ShippingSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShippingSettingsService 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 + + @shipping_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @shipping_settings_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 + @shipping_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieve shipping setting information. + # + # @overload get_shipping_settings(request, options = nil) + # Pass arguments to `get_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::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_shipping_settings(name: nil) + # Pass arguments to `get_shipping_settings` 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 name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new + # + # # Call the get_shipping_settings method. + # result = client.get_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + # p result + # + def get_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest + + # 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_shipping_settings.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::Shopping::Merchant::Accounts::V1::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_shipping_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.get_shipping_settings 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 + + ## + # Replace the shipping setting of a business with the request shipping + # setting. Executing this method requires admin access. + # + # @overload insert_shipping_settings(request, options = nil) + # Pass arguments to `insert_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::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 insert_shipping_settings(parent: nil, shipping_setting: nil) + # Pass arguments to `insert_shipping_settings` 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 account for which this shipping setting will be inserted. If + # you are using an advanced account, you must specify the unique identifier + # of the sub-account for which you want to insert the shipping setting. + # Format: `accounts/{ACCOUNT_ID}` + # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings, ::Hash] + # Required. The new version of the account. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new + # + # # Call the insert_shipping_settings method. + # result = client.insert_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + # p result + # + def insert_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest + + # 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.insert_shipping_settings.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::Shopping::Merchant::Accounts::V1::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.insert_shipping_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.insert_shipping_settings 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 + + ## + # Configuration class for the ShippingSettingsService REST API. + # + # This class represents the configuration for ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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 + # # get_shipping_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.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 = "merchantapi.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 ShippingSettingsService 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 `get_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shipping_settings + ## + # RPC-specific configuration for `insert_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_shipping_settings + + # @private + def initialize parent_rpcs = nil + get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings + @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config + insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings + @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..5a6504f4d73f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shipping_settings_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/shippingsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + module Rest + ## + # REST service stub for the ShippingSettingsService 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: true, + 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 get_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # A result object deserialized from the server's reply + def get_shipping_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_shipping_settings_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_shipping_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest] + # 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::Shopping::Merchant::Accounts::V1::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # A result object deserialized from the server's reply + def insert_shipping_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_shipping_settings_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: "insert_shipping_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.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 get_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest] + # 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_shipping_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/shippingSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_shipping_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/shippingSettings:insert", + body: "shipping_setting", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb new file mode 100644 index 000000000000..b238d68be5c2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_pb.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/shippingsettings.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/shopping/type/types_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1/shippingsettings.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xc3\x02\n\x10ShippingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x44\n\x08services\x18\x02 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1.ServiceB\x03\xe0\x41\x01\x12H\n\nwarehouses\x18\x03 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1.WarehouseB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x02:y\xea\x41v\n+merchantapi.googleapis.com/ShippingSettings\x12#accounts/{account}/shippingSettings*\x10shippingSettings2\x10shippingSettings\"\xaf\x10\n\x07Service\x12\x1e\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1f\n\x12\x64\x65livery_countries\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x1f\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12S\n\rdelivery_time\x18\x05 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.DeliveryTimeB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12I\n\x0brate_groups\x18\x06 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1.RateGroupB\x03\xe0\x41\x01\x12[\n\rshipment_type\x18\x07 \x01(\x0e\x32:.google.shopping.merchant.accounts.v1.Service.ShipmentTypeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x42\n\x13minimum_order_value\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12i\n\x19minimum_order_value_table\x18\t \x01(\x0b\x32<.google.shopping.merchant.accounts.v1.MinimumOrderValueTableB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12T\n\x0cstore_config\x18\n \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.Service.StoreConfigH\x07\x88\x01\x01\x12[\n\x10loyalty_programs\x18\x0b \x03(\x0b\x32<.google.shopping.merchant.accounts.v1.Service.LoyaltyProgramB\x03\xe0\x41\x01\x1a\xd2\x06\n\x0bStoreConfig\x12k\n\x12store_service_type\x18\x01 \x01(\x0e\x32J.google.shopping.merchant.accounts.v1.Service.StoreConfig.StoreServiceTypeH\x00\x88\x01\x01\x12\x18\n\x0bstore_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x62\n\rcutoff_config\x18\x03 \x01(\x0b\x32\x46.google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfigH\x01\x88\x01\x01\x12K\n\x0eservice_radius\x18\x04 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.DistanceH\x02\x88\x01\x01\x1a\xf1\x02\n\x0c\x43utoffConfig\x12v\n\x11local_cutoff_time\x18\x01 \x01(\x0b\x32V.google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig.LocalCutoffTimeH\x00\x88\x01\x01\x12%\n\x18store_close_offset_hours\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12$\n\x17no_delivery_post_cutoff\x18\x03 \x01(\x08H\x02\x88\x01\x01\x1aM\n\x0fLocalCutoffTime\x12\x11\n\x04hour\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06minute\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x14\n\x12_local_cutoff_timeB\x1b\n\x19_store_close_offset_hoursB\x1a\n\x18_no_delivery_post_cutoff\"[\n\x10StoreServiceType\x12\"\n\x1eSTORE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSELECTED_STORES\x10\x02\x42\x15\n\x13_store_service_typeB\x10\n\x0e_cutoff_configB\x11\n\x0f_service_radius\x1a\xf3\x01\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12t\n\x15loyalty_program_tiers\x18\x02 \x03(\x0b\x32P.google.shopping.merchant.accounts.v1.Service.LoyaltyProgram.LoyaltyProgramTiersB\x03\xe0\x41\x01\x1a=\n\x13LoyaltyProgramTiers\x12\x17\n\ntier_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_tier_labelB\x10\n\x0e_program_label\"e\n\x0cShipmentType\x12\x1d\n\x19SHIPMENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45LIVERY\x10\x01\x12\x12\n\x0eLOCAL_DELIVERY\x10\x02\x12\x14\n\x10\x43OLLECTION_POINT\x10\x03\x42\x0f\n\r_service_nameB\t\n\x07_activeB\x10\n\x0e_currency_codeB\x10\n\x0e_delivery_timeB\x10\n\x0e_shipment_typeB\x16\n\x14_minimum_order_valueB\x1c\n\x1a_minimum_order_value_tableB\x0f\n\r_store_config\"\xb2\x01\n\x08\x44istance\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x46\n\x04unit\x18\x02 \x01(\x0e\x32\x33.google.shopping.merchant.accounts.v1.Distance.UnitH\x01\x88\x01\x01\"7\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02\x42\x08\n\x06_valueB\x07\n\x05_unit\"\xa4\x03\n\tWarehouse\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12Q\n\x10shipping_address\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.AddressB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12X\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1.WarehouseCutoffTimeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1f\n\rhandling_days\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x03\x88\x01\x01\x12Y\n\x13\x62usiness_day_config\x18\x05 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x04\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_shipping_addressB\x0e\n\x0c_cutoff_timeB\x10\n\x0e_handling_daysB\x16\n\x14_business_day_config\"[\n\x13WarehouseCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minute\"\xf7\x01\n\x07\x41\x64\x64ress\x12\x1b\n\x0estreet_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x04\x63ity\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13\x61\x64ministrative_area\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1d\n\x0bpostal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x04\x88\x01\x01\x42\x11\n\x0f_street_addressB\x07\n\x05_cityB\x16\n\x14_administrative_areaB\x0e\n\x0c_postal_codeB\x0e\n\x0c_region_code\"\xa1\x06\n\x0c\x44\x65liveryTime\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12J\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1.CutoffTimeH\x02\x88\x01\x01\x12\x1e\n\x11min_handling_days\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_handling_days\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12S\n\x12transit_time_table\x18\x06 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1.TransitTableH\x05\x88\x01\x01\x12\x62\n\x1chandling_business_day_config\x18\x07 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x06\x88\x01\x01\x12\x61\n\x1btransit_business_day_config\x18\x08 \x01(\x0b\x32\x37.google.shopping.merchant.accounts.v1.BusinessDayConfigH\x07\x88\x01\x01\x12m\n\x1ewarehouse_based_delivery_times\x18\t \x03(\x0b\x32@.google.shopping.merchant.accounts.v1.WarehouseBasedDeliveryTimeB\x03\xe0\x41\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_daysB\x0e\n\x0c_cutoff_timeB\x14\n\x12_min_handling_daysB\x14\n\x12_max_handling_daysB\x15\n\x13_transit_time_tableB\x1f\n\x1d_handling_business_day_configB\x1e\n\x1c_transit_business_day_config\"}\n\nCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x0c\n\n_time_zone\"\xf0\x01\n\x11\x42usinessDayConfig\x12[\n\rbusiness_days\x18\x01 \x03(\x0e\x32?.google.shopping.merchant.accounts.v1.BusinessDayConfig.WeekdayB\x03\xe0\x41\x02\"~\n\x07Weekday\x12\x17\n\x13WEEKDAY_UNSPECIFIED\x10\x00\x12\n\n\x06MONDAY\x10\x01\x12\x0b\n\x07TUESDAY\x10\x02\x12\r\n\tWEDNESDAY\x10\x03\x12\x0c\n\x08THURSDAY\x10\x04\x12\n\n\x06\x46RIDAY\x10\x05\x12\x0c\n\x08SATURDAY\x10\x06\x12\n\n\x06SUNDAY\x10\x07\"\xa5\x01\n\x1aWarehouseBasedDeliveryTime\x12\x19\n\x07\x63\x61rrier\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\twarehouse\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x0c\n\n_warehouse\"\x97\x03\n\tRateGroup\x12\'\n\x1a\x61pplicable_shipping_labels\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x46\n\x0csingle_value\x18\x02 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.ValueH\x00\x88\x01\x01\x12\x44\n\nmain_table\x18\x03 \x01(\x0b\x32+.google.shopping.merchant.accounts.v1.TableH\x01\x88\x01\x01\x12\x43\n\tsubtables\x18\x04 \x03(\x0b\x32+.google.shopping.merchant.accounts.v1.TableB\x03\xe0\x41\x01\x12M\n\rcarrier_rates\x18\x05 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1.CarrierRateB\x03\xe0\x41\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0f\n\r_single_valueB\r\n\x0b_main_tableB\x07\n\x05_name\"\x9e\x02\n\x05Table\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12L\n\x0brow_headers\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.HeadersB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12J\n\x0e\x63olumn_headers\x18\x03 \x01(\x0b\x32-.google.shopping.merchant.accounts.v1.HeadersH\x02\x88\x01\x01\x12<\n\x04rows\x18\x04 \x03(\x0b\x32).google.shopping.merchant.accounts.v1.RowB\x03\xe0\x41\x02\x42\x07\n\x05_nameB\x0e\n\x0c_row_headersB\x11\n\x0f_column_headers\"\xa4\x03\n\x0cTransitTable\x12$\n\x17postal_code_group_names\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13transit_time_labels\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12T\n\x04rows\x18\x03 \x03(\x0b\x32\x41.google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRowB\x03\xe0\x41\x02\x1a\xf5\x01\n\x0eTransitTimeRow\x12g\n\x06values\x18\x01 \x03(\x0b\x32R.google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow.TransitTimeValueB\x03\xe0\x41\x02\x1az\n\x10TransitTimeValue\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_days\"\xfd\x01\n\x16MinimumOrderValueTable\x12w\n\x18store_code_set_with_movs\x18\x01 \x03(\x0b\x32P.google.shopping.merchant.accounts.v1.MinimumOrderValueTable.StoreCodeSetWithMovB\x03\xe0\x41\x02\x1aj\n\x13StoreCodeSetWithMov\x12\x18\n\x0bstore_codes\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12/\n\x05value\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x80\x02\n\x07Headers\x12\x30\n\x06prices\x18\x01 \x03(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x32\n\x07weights\x18\x02 \x03(\x0b\x32\x1c.google.shopping.type.WeightB\x03\xe0\x41\x02\x12\x1c\n\x0fnumber_of_items\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12$\n\x17postal_code_group_names\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12K\n\tlocations\x18\x05 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1.LocationIdSetB\x03\xe0\x41\x02\"*\n\rLocationIdSet\x12\x19\n\x0clocation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02\"F\n\x03Row\x12?\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32+.google.shopping.merchant.accounts.v1.ValueB\x03\xe0\x41\x02\"\xf8\x01\n\x05Value\x12\x18\n\x0bno_shipping\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x33\n\tflat_rate\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x12\x1d\n\x10price_percentage\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61rrier_rate\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08subtable\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0e\n\x0c_no_shippingB\x0c\n\n_flat_rateB\x13\n\x11_price_percentageB\x0f\n\r_carrier_rateB\x0b\n\t_subtable\"\xe0\x02\n\x0b\x43\x61rrierRate\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x19\n\x07\x63\x61rrier\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12$\n\x12origin_postal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\'\n\x15percentage_adjustment\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12>\n\x0f\x66lat_adjustment\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x15\n\x13_origin_postal_codeB\x18\n\x16_percentage_adjustmentB\x12\n\x10_flat_adjustment\"_\n\x1aGetShippingSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ShippingSettings\"\xb2\x01\n\x1dInsertShippingSettingsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12U\n\x10shipping_setting\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1.ShippingSettingsB\x03\xe0\x41\x02\x32\xa0\x04\n\x17ShippingSettingsService\x12\xcf\x01\n\x13GetShippingSettings\x12@.google.shopping.merchant.accounts.v1.GetShippingSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.ShippingSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1/{name=accounts/*/shippingSettings}\x12\xe9\x01\n\x16InsertShippingSettings\x12\x43.google.shopping.merchant.accounts.v1.InsertShippingSettingsRequest\x1a\x36.google.shopping.merchant.accounts.v1.ShippingSettings\"R\x82\xd3\xe4\x93\x02L\"8/accounts/v1/{parent=accounts/*}/shippingSettings:insert:\x10shipping_setting\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x88\x02\n(com.google.shopping.merchant.accounts.v1B\x15ShippingSettingsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ShippingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ShippingSettings").msgclass + Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service").msgclass + Service::StoreConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig").msgclass + Service::StoreConfig::CutoffConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig").msgclass + Service::StoreConfig::CutoffConfig::LocalCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.CutoffConfig.LocalCutoffTime").msgclass + Service::StoreConfig::StoreServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.StoreConfig.StoreServiceType").enummodule + Service::LoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.LoyaltyProgram").msgclass + Service::LoyaltyProgram::LoyaltyProgramTiers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.LoyaltyProgram.LoyaltyProgramTiers").msgclass + Service::ShipmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Service.ShipmentType").enummodule + Distance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Distance").msgclass + Distance::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Distance.Unit").enummodule + Warehouse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Warehouse").msgclass + WarehouseCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.WarehouseCutoffTime").msgclass + Address = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Address").msgclass + DeliveryTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeliveryTime").msgclass + CutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CutoffTime").msgclass + BusinessDayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessDayConfig").msgclass + BusinessDayConfig::Weekday = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BusinessDayConfig.Weekday").enummodule + WarehouseBasedDeliveryTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.WarehouseBasedDeliveryTime").msgclass + RateGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RateGroup").msgclass + Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Table").msgclass + TransitTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable").msgclass + TransitTable::TransitTimeRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow").msgclass + TransitTable::TransitTimeRow::TransitTimeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TransitTable.TransitTimeRow.TransitTimeValue").msgclass + MinimumOrderValueTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.MinimumOrderValueTable").msgclass + MinimumOrderValueTable::StoreCodeSetWithMov = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.MinimumOrderValueTable.StoreCodeSetWithMov").msgclass + Headers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Headers").msgclass + LocationIdSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.LocationIdSet").msgclass + Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Row").msgclass + Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Value").msgclass + CarrierRate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CarrierRate").msgclass + GetShippingSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetShippingSettingsRequest").msgclass + InsertShippingSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.InsertShippingSettingsRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb new file mode 100644 index 000000000000..ed7cab17ba49 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/shippingsettings_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/shippingsettings.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/shippingsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module ShippingSettingsService + # Service to get method call shipping setting information per Merchant API + # method. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.ShippingSettingsService' + + # Retrieve shipping setting information. + rpc :GetShippingSettings, ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings + # Replace the shipping setting of a business with the request shipping + # setting. Executing this method requires admin access. + rpc :InsertShippingSettings, ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb new file mode 100644 index 000000000000..4629c9b5b2cc --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `TermsOfServiceAgreementState` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + module TermsOfServiceAgreementStateService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "terms_of_service_agreement_state_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb new file mode 100644 index 000000000000..c7ae24489306 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/client.rb @@ -0,0 +1,563 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + ## + # Client for the TermsOfServiceAgreementStateService service. + # + # Service to support `TermsOfServiceAgreementState` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_agreement_state_service_stub + + ## + # Configure the TermsOfServiceAgreementStateService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceAgreementStateService clients + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 + @terms_of_service_agreement_state_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceAgreementStateService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceAgreementStateService 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_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 + + @terms_of_service_agreement_state_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 + ) + + @terms_of_service_agreement_state_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 + @terms_of_service_agreement_state_service_stub.logger + end + + # Service calls + + ## + # Returns the state of a terms of service agreement. + # + # @overload get_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::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_terms_of_service_agreement_state(name: nil) + # Pass arguments to `get_terms_of_service_agreement_state` 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 resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new + # + # # Call the get_terms_of_service_agreement_state method. + # result = client.get_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + # p result + # + def get_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest + + # 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_terms_of_service_agreement_state.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service_agreement_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.call_rpc :get_terms_of_service_agreement_state, 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 + + ## + # Retrieves the state of the agreement for the application terms of service. + # + # Application terms of service covers permissions related to the usage of + # data provided through Merchant Center, CSS Center, Manufacturer Center, and + # more. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::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 retrieve_for_application_terms_of_service_agreement_state(parent: nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` 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 account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + # + # # Call the retrieve_for_application_terms_of_service_agreement_state method. + # result = client.retrieve_for_application_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + # p result + # + def retrieve_for_application_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest + + # 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.retrieve_for_application_terms_of_service_agreement_state.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.call_rpc :retrieve_for_application_terms_of_service_agreement_state, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the TermsOfServiceAgreementStateService API. + # + # This class represents the configuration for TermsOfServiceAgreementStateService, + # 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 + # # get_terms_of_service_agreement_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 TermsOfServiceAgreementStateService 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 `get_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service_agreement_state + ## + # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_for_application_terms_of_service_agreement_state + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state + @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config + retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state + @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb new file mode 100644 index 000000000000..aea245ba5cd2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + # Credentials for the TermsOfServiceAgreementStateService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb new file mode 100644 index 000000000000..6cbbe17a5a11 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + # Path helper methods for the TermsOfServiceAgreementStateService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfServiceAgreementState resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # + # @param account [String] + # @param identifier [String] + # + # @return [::String] + def terms_of_service_agreement_state_path account:, identifier: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/termsOfServiceAgreementStates/#{identifier}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb new file mode 100644 index 000000000000..f44d113dd3e0 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/credentials" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/paths" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `TermsOfServiceAgreementState` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + module TermsOfServiceAgreementStateService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb new file mode 100644 index 000000000000..a389a420e840 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/client.rb @@ -0,0 +1,523 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + module Rest + ## + # REST client for the TermsOfServiceAgreementStateService service. + # + # Service to support `TermsOfServiceAgreementState` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_agreement_state_service_stub + + ## + # Configure the TermsOfServiceAgreementStateService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceAgreementStateService clients + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 + @terms_of_service_agreement_state_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceAgreementStateService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceAgreementStateService 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 + + @terms_of_service_agreement_state_service_stub = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @terms_of_service_agreement_state_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 + @terms_of_service_agreement_state_service_stub.logger + end + + # Service calls + + ## + # Returns the state of a terms of service agreement. + # + # @overload get_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::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_terms_of_service_agreement_state(name: nil) + # Pass arguments to `get_terms_of_service_agreement_state` 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 resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new + # + # # Call the get_terms_of_service_agreement_state method. + # result = client.get_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + # p result + # + def get_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest + + # 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_terms_of_service_agreement_state.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::Shopping::Merchant::Accounts::V1::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_terms_of_service_agreement_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.get_terms_of_service_agreement_state 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 + + ## + # Retrieves the state of the agreement for the application terms of service. + # + # Application terms of service covers permissions related to the usage of + # data provided through Merchant Center, CSS Center, Manufacturer Center, and + # more. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::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 retrieve_for_application_terms_of_service_agreement_state(parent: nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` 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 account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + # + # # Call the retrieve_for_application_terms_of_service_agreement_state method. + # result = client.retrieve_for_application_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + # p result + # + def retrieve_for_application_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest + + # 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.retrieve_for_application_terms_of_service_agreement_state.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::Shopping::Merchant::Accounts::V1::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.retrieve_for_application_terms_of_service_agreement_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.retrieve_for_application_terms_of_service_agreement_state 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 + + ## + # Configuration class for the TermsOfServiceAgreementStateService REST API. + # + # This class represents the configuration for TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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 + # # get_terms_of_service_agreement_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.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 = "merchantapi.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 TermsOfServiceAgreementStateService 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 `get_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service_agreement_state + ## + # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_for_application_terms_of_service_agreement_state + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state + @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config + retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state + @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb new file mode 100644 index 000000000000..976c3d63fbf9 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest/service_stub.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + module Rest + ## + # REST service stub for the TermsOfServiceAgreementStateService 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: true, + 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 get_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest] + # 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # A result object deserialized from the server's reply + def get_terms_of_service_agreement_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_agreement_state_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_terms_of_service_agreement_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_for_application_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest] + # 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # A result object deserialized from the server's reply + def retrieve_for_application_terms_of_service_agreement_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_for_application_terms_of_service_agreement_state_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: "retrieve_for_application_terms_of_service_agreement_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.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 get_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest] + # 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_terms_of_service_agreement_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_for_application_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/termsOfServiceAgreementStates:retrieveForApplication", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb new file mode 100644 index 000000000000..d113c505077f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/terms_of_service_service/credentials" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/paths" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/client" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `TermsOfService` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + module TermsOfServiceService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "terms_of_service_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb new file mode 100644 index 000000000000..b2ee35500ea1 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/client.rb @@ -0,0 +1,654 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofservice_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + ## + # Client for the TermsOfServiceService service. + # + # Service to support `TermsOfService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_service_stub + + ## + # Configure the TermsOfServiceService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceService clients + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 + @terms_of_service_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceService 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/shopping/merchant/accounts/v1/termsofservice_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 + + @terms_of_service_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 + ) + + @terms_of_service_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 + @terms_of_service_service_stub.logger + end + + # Service calls + + ## + # Retrieves the `TermsOfService` associated with the provided version. + # + # @overload get_terms_of_service(request, options = nil) + # Pass arguments to `get_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::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_terms_of_service(name: nil) + # Pass arguments to `get_terms_of_service` 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 resource name of the terms of service version. + # Format: `termsOfService/{version}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new + # + # # Call the get_terms_of_service method. + # result = client.get_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + # p result + # + def get_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest + + # 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_terms_of_service.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :get_terms_of_service, 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 + + ## + # Retrieves the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + # + # @overload retrieve_latest_terms_of_service(request, options = nil) + # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::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 retrieve_latest_terms_of_service(region_code: nil, kind: nil) + # Pass arguments to `retrieve_latest_terms_of_service` 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 region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @param kind [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new + # + # # Call the retrieve_latest_terms_of_service method. + # result = client.retrieve_latest_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + # p result + # + def retrieve_latest_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest + + # 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.retrieve_latest_terms_of_service.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.retrieve_latest_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :retrieve_latest_terms_of_service, 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 + + ## + # Accepts a `TermsOfService`. Executing this method requires admin access. + # + # @overload accept_terms_of_service(request, options = nil) + # Pass arguments to `accept_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::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 accept_terms_of_service(name: nil, account: nil, region_code: nil) + # Pass arguments to `accept_terms_of_service` 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 resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @param account [::String] + # Required. The account for which to accept the ToS. + # Format: `accounts/{account}` + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new + # + # # Call the accept_terms_of_service method. + # result = client.accept_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. + # p result + # + def accept_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest + + # 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.accept_terms_of_service.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.accept_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.accept_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :accept_terms_of_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the TermsOfServiceService API. + # + # This class represents the configuration for TermsOfServiceService, + # 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 + # # get_terms_of_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 TermsOfServiceService 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 `get_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service + ## + # RPC-specific configuration for `retrieve_latest_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_latest_terms_of_service + ## + # RPC-specific configuration for `accept_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :accept_terms_of_service + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service + @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config + retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service + @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config + accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service + @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb new file mode 100644 index 000000000000..5150bbd715e8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + # Credentials for the TermsOfServiceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb new file mode 100644 index 000000000000..b240dddbc808 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/paths.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + # Path helper methods for the TermsOfServiceService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfService resource string. + # + # The resource will be in the following format: + # + # `termsOfService/{version}` + # + # @param version [String] + # + # @return [::String] + def terms_of_service_path version: + "termsOfService/#{version}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb new file mode 100644 index 000000000000..a30b7847e8a3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/terms_of_service_service/credentials" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/paths" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support `TermsOfService` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + module TermsOfServiceService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb new file mode 100644 index 000000000000..11afc42a676f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/client.rb @@ -0,0 +1,615 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofservice_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + module Rest + ## + # REST client for the TermsOfServiceService service. + # + # Service to support `TermsOfService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_service_stub + + ## + # Configure the TermsOfServiceService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceService clients + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 + @terms_of_service_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceService 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 + + @terms_of_service_service_stub = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @terms_of_service_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 + @terms_of_service_service_stub.logger + end + + # Service calls + + ## + # Retrieves the `TermsOfService` associated with the provided version. + # + # @overload get_terms_of_service(request, options = nil) + # Pass arguments to `get_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::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_terms_of_service(name: nil) + # Pass arguments to `get_terms_of_service` 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 resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new + # + # # Call the get_terms_of_service method. + # result = client.get_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + # p result + # + def get_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest + + # 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_terms_of_service.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::Shopping::Merchant::Accounts::V1::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_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.get_terms_of_service 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 + + ## + # Retrieves the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + # + # @overload retrieve_latest_terms_of_service(request, options = nil) + # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::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 retrieve_latest_terms_of_service(region_code: nil, kind: nil) + # Pass arguments to `retrieve_latest_terms_of_service` 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 region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @param kind [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new + # + # # Call the retrieve_latest_terms_of_service method. + # result = client.retrieve_latest_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + # p result + # + def retrieve_latest_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest + + # 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.retrieve_latest_terms_of_service.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::Shopping::Merchant::Accounts::V1::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.retrieve_latest_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.retrieve_latest_terms_of_service 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 + + ## + # Accepts a `TermsOfService`. Executing this method requires admin access. + # + # @overload accept_terms_of_service(request, options = nil) + # Pass arguments to `accept_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::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 accept_terms_of_service(name: nil, account: nil, region_code: nil) + # Pass arguments to `accept_terms_of_service` 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 resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @param account [::String] + # Required. The account for which to accept the ToS. + # Format: `accounts/{account}` + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new + # + # # Call the accept_terms_of_service method. + # result = client.accept_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. + # p result + # + def accept_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest + + # 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.accept_terms_of_service.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::Shopping::Merchant::Accounts::V1::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.accept_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.accept_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.accept_terms_of_service 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 + + ## + # Configuration class for the TermsOfServiceService REST API. + # + # This class represents the configuration for TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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 + # # get_terms_of_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.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 = "merchantapi.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 TermsOfServiceService 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 `get_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service + ## + # RPC-specific configuration for `retrieve_latest_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_latest_terms_of_service + ## + # RPC-specific configuration for `accept_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :accept_terms_of_service + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service + @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config + retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service + @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config + accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service + @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb new file mode 100644 index 000000000000..e78a1079b2ab --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/terms_of_service_service/rest/service_stub.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofservice_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + module Rest + ## + # REST service stub for the TermsOfServiceService 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: true, + 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 get_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest] + # 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::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # A result object deserialized from the server's reply + def get_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_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_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_latest_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest] + # 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::Shopping::Merchant::Accounts::V1::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfService] + # A result object deserialized from the server's reply + def retrieve_latest_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_latest_terms_of_service_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: "retrieve_latest_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the accept_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest] + # 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::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse] + # A result object deserialized from the server's reply + def accept_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_accept_terms_of_service_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: "accept_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.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 get_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest] + # 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_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^termsOfService/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_latest_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_latest_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/termsOfService:retrieveLatest", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the accept_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_accept_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{name}:accept", + matches: [ + ["name", %r{^termsOfService/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb new file mode 100644 index 000000000000..df2eb83eb5ce --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/termsofservice.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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb' +require 'google/shopping/merchant/accounts/v1/termsofservicekind_pb' + + +descriptor_data = "\n9google/shopping/merchant/accounts/v1/termsofservice.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aGgoogle/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto\x1a=google/shopping/merchant/accounts/v1/termsofservicekind.proto\"\xae\x02\n\x0eTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x08\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x46\n\x04kind\x18\x03 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKind\x12\x15\n\x08\x66ile_uri\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08\x65xternal\x18\x05 \x01(\x08:H\xea\x41\x45\n)merchantapi.googleapis.com/TermsOfService\x12\x18termsOfService/{version}B\x0b\n\t_file_uri\"[\n\x18GetTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\"\x8c\x01\n#RetrieveLatestTermsOfServiceRequest\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x04kind\x18\x02 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKindB\x03\xe0\x41\x02\"\xb5\x01\n\x1b\x41\x63\x63\x65ptTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x8c\x01\n\x1c\x41\x63\x63\x65ptTermsOfServiceResponse\x12l\n terms_of_service_agreement_state\x18\x01 \x01(\x0b\x32\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState2\xd3\x05\n\x15TermsOfServiceService\x12\xbe\x01\n\x11GetTermsOfService\x12>.google.shopping.merchant.accounts.v1.GetTermsOfServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.TermsOfService\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/accounts/v1/{name=termsOfService/*}\x12\xd3\x01\n\x1cRetrieveLatestTermsOfService\x12I.google.shopping.merchant.accounts.v1.RetrieveLatestTermsOfServiceRequest\x1a\x34.google.shopping.merchant.accounts.v1.TermsOfService\"2\x82\xd3\xe4\x93\x02,\x12*/accounts/v1/termsOfService:retrieveLatest\x12\xd9\x01\n\x14\x41\x63\x63\x65ptTermsOfService\x12\x41.google.shopping.merchant.accounts.v1.AcceptTermsOfServiceRequest\x1a\x42.google.shopping.merchant.accounts.v1.AcceptTermsOfServiceResponse\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\"+/accounts/v1/{name=termsOfService/*}:accept\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x86\x02\n(com.google.shopping.merchant.accounts.v1B\x13TermsOfServiceProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState", "google/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + TermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfService").msgclass + GetTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetTermsOfServiceRequest").msgclass + RetrieveLatestTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RetrieveLatestTermsOfServiceRequest").msgclass + AcceptTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AcceptTermsOfServiceRequest").msgclass + AcceptTermsOfServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.AcceptTermsOfServiceResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb new file mode 100644 index 000000000000..baddb03d941d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservice_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/termsofservice.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofservice_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceService + # Service to support `TermsOfService` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.TermsOfServiceService' + + # Retrieves the `TermsOfService` associated with the provided version. + rpc :GetTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfService + # Retrieves the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + rpc :RetrieveLatestTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfService + # Accepts a `TermsOfService`. Executing this method requires admin access. + rpc :AcceptTermsOfService, ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb new file mode 100644 index 000000000000..e798d1f7cc7d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/termsofserviceagreementstate.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/shopping/merchant/accounts/v1/termsofservicekind_pb' +require 'google/type/date_pb' + + +descriptor_data = "\nGgoogle/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a=google/shopping/merchant/accounts/v1/termsofservicekind.proto\x1a\x16google/type/date.proto\"\x97\x04\n\x1cTermsOfServiceAgreementState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x15terms_of_service_kind\x18\x03 \x01(\x0e\x32\x38.google.shopping.merchant.accounts.v1.TermsOfServiceKindB\x03\xe0\x41\x02\x12J\n\x08\x61\x63\x63\x65pted\x18\x04 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.AcceptedB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12J\n\x08required\x18\x05 \x01(\x0b\x32..google.shopping.merchant.accounts.v1.RequiredB\x03\xe0\x41\x01H\x01\x88\x01\x01:\xb9\x01\xea\x41\xb5\x01\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\x12=accounts/{account}/termsOfServiceAgreementStates/{identifier}*\x1dtermsOfServiceAgreementStates2\x1ctermsOfServiceAgreementStateB\x0b\n\t_acceptedB\x0b\n\t_required\"\xda\x01\n\x08\x41\x63\x63\x65pted\x12K\n\x10terms_of_service\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12?\n\x0b\x61\x63\x63\x65pted_by\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x30\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_valid_until\"r\n\x08Required\x12K\n\x10terms_of_service\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x19\n\x0ctos_file_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"w\n&GetTermsOfServiceAgreementStateRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\"\x8c\x01\n9RetrieveForApplicationTermsOfServiceAgreementStateRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37merchantapi.googleapis.com/TermsOfServiceAgreementState2\xb7\x05\n#TermsOfServiceAgreementStateService\x12\x82\x02\n\x1fGetTermsOfServiceAgreementState\x12L.google.shopping.merchant.accounts.v1.GetTermsOfServiceAgreementStateRequest\x1a\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1/{name=accounts/*/termsOfServiceAgreementStates/*}\x12\xc1\x02\n2RetrieveForApplicationTermsOfServiceAgreementState\x12_.google.shopping.merchant.accounts.v1.RetrieveForApplicationTermsOfServiceAgreementStateRequest\x1a\x42.google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState\"f\xda\x41\x06parent\x82\xd3\xe4\x93\x02W\x12U/accounts/v1/{parent=accounts/*}/termsOfServiceAgreementStates:retrieveForApplication\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x94\x02\n(com.google.shopping.merchant.accounts.v1B!TermsOfServiceAgreementStateProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.Date", "google/type/date.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + TermsOfServiceAgreementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState").msgclass + Accepted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Accepted").msgclass + Required = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Required").msgclass + GetTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetTermsOfServiceAgreementStateRequest").msgclass + RetrieveForApplicationTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.RetrieveForApplicationTermsOfServiceAgreementStateRequest").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb new file mode 100644 index 000000000000..7eb81b6980b2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/termsofserviceagreementstate.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module TermsOfServiceAgreementStateService + # Service to support `TermsOfServiceAgreementState` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService' + + # Returns the state of a terms of service agreement. + rpc :GetTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState + # Retrieves the state of the agreement for the application terms of service. + # + # Application terms of service covers permissions related to the usage of + # data provided through Merchant Center, CSS Center, Manufacturer Center, and + # more. + rpc :RetrieveForApplicationTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb new file mode 100644 index 000000000000..5150eb52b8a2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/termsofservicekind_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/termsofservicekind.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/shopping/merchant/accounts/v1/termsofservicekind.proto\x12$google.shopping.merchant.accounts.v1*P\n\x12TermsOfServiceKind\x12%\n!TERMS_OF_SERVICE_KIND_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_CENTER\x10\x01\x42\x8a\x02\n(com.google.shopping.merchant.accounts.v1B\x17TermsOfServiceKindProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + TermsOfServiceKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.TermsOfServiceKind").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb new file mode 100644 index 000000000000..086ede4fbb7c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1/user.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1/accessright_pb' + + +descriptor_data = "\n/google/shopping/merchant/accounts/v1/user.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x36google/shopping/merchant/accounts/v1/accessright.proto\"\xbe\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.shopping.merchant.accounts.v1.User.StateB\x03\xe0\x41\x03\x12M\n\raccess_rights\x18\x04 \x03(\x0e\x32\x31.google.shopping.merchant.accounts.v1.AccessRightB\x03\xe0\x41\x02\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa4\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x04user\x18\x03 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x01\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x88\x01\n\x11UpdateUserRequest\x12=\n\x04user\x18\x01 \x01(\x0b\x32*.google.shopping.merchant.accounts.v1.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x11ListUsersResponse\x12\x39\n\x05users\x18\x01 \x03(\x0b\x32*.google.shopping.merchant.accounts.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcc\x07\n\x0bUserService\x12\xa2\x01\n\x07GetUser\x12\x34.google.shopping.merchant.accounts.v1.GetUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{name=accounts/*/users/*}\x12\xbd\x01\n\nCreateUser\x12\x37.google.shopping.merchant.accounts.v1.CreateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"J\xda\x41\x13parent,user,user_id\x82\xd3\xe4\x93\x02.\"&/accounts/v1/{parent=accounts/*}/users:\x04user\x12\x94\x01\n\nDeleteUser\x12\x37.google.shopping.merchant.accounts.v1.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/accounts/v1/{name=accounts/*/users/*}\x12\xbf\x01\n\nUpdateUser\x12\x37.google.shopping.merchant.accounts.v1.UpdateUserRequest\x1a*.google.shopping.merchant.accounts.v1.User\"L\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x33\x32+/accounts/v1/{user.name=accounts/*/users/*}:\x04user\x12\xb5\x01\n\tListUsers\x12\x36.google.shopping.merchant.accounts.v1.ListUsersRequest\x1a\x37.google.shopping.merchant.accounts.v1.ListUsersResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/accounts/v1/{parent=accounts/*}/users\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xfc\x01\n(com.google.shopping.merchant.accounts.v1B\tUserProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Accounts + module V1 + User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.User").msgclass + User::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.User.State").enummodule + GetUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetUserRequest").msgclass + CreateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateUserRequest").msgclass + DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteUserRequest").msgclass + UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateUserRequest").msgclass + ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListUsersRequest").msgclass + ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListUsersResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb new file mode 100644 index 000000000000..ef0a4bf1993c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/user_service/credentials" +require "google/shopping/merchant/accounts/v1/user_service/paths" +require "google/shopping/merchant/accounts/v1/user_service/client" +require "google/shopping/merchant/accounts/v1/user_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support user API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1/user_service" + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1/user_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + module UserService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "user_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1/user_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb new file mode 100644 index 000000000000..def8e696e45e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/client.rb @@ -0,0 +1,879 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/user_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module UserService + ## + # Client for the UserService service. + # + # Service to support user API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_service_stub + + ## + # Configure the UserService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::UserService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserService clients + # ::Google::Shopping::Merchant::Accounts::V1::UserService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 UserService 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::Shopping::Merchant::Accounts::V1::UserService::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 + @user_service_stub.universe_domain + end + + ## + # Create a new UserService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserService 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/shopping/merchant/accounts/v1/user_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 + + @user_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1::UserService::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 + ) + + @user_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 + @user_service_stub.logger + end + + # Service calls + + ## + # Retrieves a Merchant Center account user. + # + # @overload get_user(request, options = nil) + # Pass arguments to `get_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::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_user(name: nil) + # Pass arguments to `get_user` 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 name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new + # + # # Call the get_user method. + # result = client.get_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def get_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest + + # 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_user.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :get_user, 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 + + ## + # Creates a Merchant Center account user. Executing this method requires + # admin access. + # + # @overload create_user(request, options = nil) + # Pass arguments to `create_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::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_user(parent: nil, user_id: nil, user: nil) + # Pass arguments to `create_user` 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 resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @param user_id [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] + # Optional. The user to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new + # + # # Call the create_user method. + # result = client.create_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def create_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest + + # 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_user.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :create_user, 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 + + ## + # Deletes a Merchant Center account user. Executing this method requires + # admin access. The user to be deleted can't be the last admin user of that + # account. Also a user is protected from deletion if it + # is managed by Business Manager" + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::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_user(name: nil) + # Pass arguments to `delete_user` 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 name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + # + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest + + # 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_user.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :delete_user, 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 + + ## + # Updates a Merchant Center account user. Executing this method requires + # admin access. + # + # @overload update_user(request, options = nil) + # Pass arguments to `update_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::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 update_user(user: nil, update_mask: nil) + # Pass arguments to `update_user` 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 user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `access_rights` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new + # + # # Call the update_user method. + # result = client.update_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def update_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest + + # 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.update_user.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.user&.name + header_params["user.name"] = request.user.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.update_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :update_user, 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 all users of a Merchant Center account. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::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_users(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_users` 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 parent, which owns this collection of users. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` 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::Shopping::Merchant::Accounts::V1::User>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users 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::Shopping::Merchant::Accounts::V1::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest + + # 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_users.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::Shopping::Merchant::Accounts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_users.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :list_users, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @user_service_stub, :list_users, 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 UserService API. + # + # This class represents the configuration for UserService, + # 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::Shopping::Merchant::Accounts::V1::UserService::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 + # # get_user to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 UserService 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 `get_user` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user + ## + # RPC-specific configuration for `create_user` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `update_user` + # @return [::Gapic::Config::Method] + # + attr_reader :update_user + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + + # @private + def initialize parent_rpcs = nil + get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user + @get_user = ::Gapic::Config::Method.new get_user_config + create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user + @create_user = ::Gapic::Config::Method.new create_user_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user + @update_user = ::Gapic::Config::Method.new update_user_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb new file mode 100644 index 000000000000..a81bf27dabb3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module UserService + # Credentials for the UserService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb new file mode 100644 index 000000000000..92f5d4c503d4 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + module UserService + # Path helper methods for the UserService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def user_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb new file mode 100644 index 000000000000..653ee24a9409 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/version" + +require "google/shopping/merchant/accounts/v1/user_service/credentials" +require "google/shopping/merchant/accounts/v1/user_service/paths" +require "google/shopping/merchant/accounts/v1/user_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + ## + # Service to support user API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1/user_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + module UserService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1/user_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb new file mode 100644 index 000000000000..3fadcf2bdd9c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/client.rb @@ -0,0 +1,818 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/user_pb" +require "google/shopping/merchant/accounts/v1/user_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module UserService + module Rest + ## + # REST client for the UserService service. + # + # Service to support user API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_service_stub + + ## + # Configure the UserService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserService clients + # ::Google::Shopping::Merchant::Accounts::V1::UserService::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", "Shopping", "Merchant", "Accounts", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 UserService 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::Shopping::Merchant::Accounts::V1::UserService::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 + @user_service_stub.universe_domain + end + + ## + # Create a new UserService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserService 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 + + @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @user_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 + @user_service_stub.logger + end + + # Service calls + + ## + # Retrieves a Merchant Center account user. + # + # @overload get_user(request, options = nil) + # Pass arguments to `get_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::GetUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::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_user(name: nil) + # Pass arguments to `get_user` 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 name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new + # + # # Call the get_user method. + # result = client.get_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def get_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest + + # 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_user.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::Shopping::Merchant::Accounts::V1::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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.get_user 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 + + ## + # Creates a Merchant Center account user. Executing this method requires + # admin access. + # + # @overload create_user(request, options = nil) + # Pass arguments to `create_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::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_user(parent: nil, user_id: nil, user: nil) + # Pass arguments to `create_user` 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 resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @param user_id [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @param user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] + # Optional. The user to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new + # + # # Call the create_user method. + # result = client.create_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def create_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest + + # 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_user.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::Shopping::Merchant::Accounts::V1::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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.create_user 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 + + ## + # Deletes a Merchant Center account user. Executing this method requires + # admin access. The user to be deleted can't be the last admin user of that + # account. Also a user is protected from deletion if it + # is managed by Business Manager" + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::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_user(name: nil) + # Pass arguments to `delete_user` 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 name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + # @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/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest + + # 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_user.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::Shopping::Merchant::Accounts::V1::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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.delete_user 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 + + ## + # Updates a Merchant Center account user. Executing this method requires + # admin access. + # + # @overload update_user(request, options = nil) + # Pass arguments to `update_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::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 update_user(user: nil, update_mask: nil) + # Pass arguments to `update_user` 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 user [::Google::Shopping::Merchant::Accounts::V1::User, ::Hash] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `access_rights` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new + # + # # Call the update_user method. + # result = client.update_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + # p result + # + def update_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest + + # 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.update_user.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::Shopping::Merchant::Accounts::V1::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.update_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.update_user 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 all users of a Merchant Center account. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::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_users(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_users` 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 parent, which owns this collection of users. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` 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::Shopping::Merchant::Accounts::V1::User>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1::User>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users 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::Shopping::Merchant::Accounts::V1::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest + + # 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_users.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::Shopping::Merchant::Accounts::V1::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_users.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.list_users request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", 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 UserService REST API. + # + # This class represents the configuration for UserService 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::Shopping::Merchant::Accounts::V1::UserService::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 + # # get_user to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.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 = "merchantapi.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 UserService 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 `get_user` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user + ## + # RPC-specific configuration for `create_user` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `update_user` + # @return [::Gapic::Config::Method] + # + attr_reader :update_user + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + + # @private + def initialize parent_rpcs = nil + get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user + @get_user = ::Gapic::Config::Method.new get_user_config + create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user + @create_user = ::Gapic::Config::Method.new create_user_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user + @update_user = ::Gapic::Config::Method.new update_user_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb new file mode 100644 index 000000000000..0c6a2573241f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/user_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module UserService + module Rest + ## + # REST service stub for the UserService 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: true, + 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 get_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest] + # 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::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # A result object deserialized from the server's reply + def get_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_user_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_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest] + # 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::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # A result object deserialized from the server's reply + def create_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_user_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_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::User.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_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest] + # 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_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_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_user", + 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 update_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest] + # 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::Shopping::Merchant::Accounts::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # A result object deserialized from the server's reply + def update_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_user_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: "update_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::User.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_users REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest] + # 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::Shopping::Merchant::Accounts::V1::ListUsersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse] + # A result object deserialized from the server's reply + def list_users request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_users_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_users", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.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 get_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::GetUserRequest] + # 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_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest] + # 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_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1/{parent}/users", + body: "user", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest] + # 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_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1/{user.name}", + body: "user", + matches: [ + ["user.name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_users REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest] + # 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_users_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/users", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb new file mode 100644 index 000000000000..c4c1e9b896d5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/user_services_pb.rb @@ -0,0 +1,60 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1/user.proto for package 'Google.Shopping.Merchant.Accounts.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/user_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1 + module UserService + # Service to support user API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1.UserService' + + # Retrieves a Merchant Center account user. + rpc :GetUser, ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User + # Creates a Merchant Center account user. Executing this method requires + # admin access. + rpc :CreateUser, ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User + # Deletes a Merchant Center account user. Executing this method requires + # admin access. The user to be deleted can't be the last admin user of that + # account. Also a user is protected from deletion if it + # is managed by Business Manager" + rpc :DeleteUser, ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, ::Google::Protobuf::Empty + # Updates a Merchant Center account user. Executing this method requires + # admin access. + rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1::User + # Lists all users of a Merchant Center account. + rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb new file mode 100644 index 000000000000..6b67386a1d3d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/README.md b/google-shopping-merchant-accounts-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..54bd4318d321 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb new file mode 100644 index 000000000000..8d584947c066 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accessright.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The access right. + module AccessRight + # Default value. This value is unused. + ACCESS_RIGHT_UNSPECIFIED = 0 + + # Standard access rights. + STANDARD = 1 + + # Has access to the same read-only methods as STANDARD, but no access to + # any mutating methods. + READ_ONLY = 4 + + # Admin access rights. + ADMIN = 2 + + # Users with this right have access to performance and insights. + PERFORMANCE_REPORTING = 3 + + # Users with this right have access to Merchant API and its notifications. + # This role is only accessible to accounts that has a developer registration. + API_DEVELOPER = 5 + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb new file mode 100644 index 000000000000..b65ddd875321 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountissue.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Issues with your Merchant Center account that can impact all your products. + # For more information, see [Account-level issues in Merchant + # Center](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account issue. + # Format: `accounts/{account}/issues/{id}`. For example, + # `accounts/123456/issues/misrepresentation-of-self-or-products-unacceptable-business-practice-policy`. + # @!attribute [rw] title + # @return [::String] + # The localized title of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountIssue::Severity] + # The overall severity of the issue. + # @!attribute [rw] impacted_destinations + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue::ImpactedDestination>] + # The impact this issue has on various destinations. + # @!attribute [rw] detail + # @return [::String] + # Further localized details about the issue. + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to Merchant Center Help Center providing further information about the + # issue and how to fix it. + class AccountIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The impact of the issue on a destination. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The impacted reporting context. + # @!attribute [rw] impacts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue::ImpactedDestination::Impact>] + # The (negative) impact for various regions on the given destination. + class ImpactedDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The impact of the issue on a region. + # @!attribute [rw] region_code + # @return [::String] + # The [CLDR region code](https://cldr.unicode.org/) where this issue + # applies. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountIssue::Severity] + # The severity of the issue on the destination and region. + class Impact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # All possible issue severities. + module Severity + # The severity is unknown. + SEVERITY_UNSPECIFIED = 0 + + # The issue causes offers to not serve. + CRITICAL = 1 + + # The issue might affect offers (in the future) or might be an + # indicator of issues with offers. + ERROR = 2 + + # The issue is a suggestion for improvement. + SUGGESTION = 3 + end + end + + # Request message for the `ListAccountIssues` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 issues will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + class ListAccountIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccountIssues` method. + # @!attribute [rw] account_issues + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountIssue>] + # The issues from the specified account. + # @!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 ListAccountIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb new file mode 100644 index 000000000000..9ed39bddcbab --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountrelationships.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The `AccountRelationship` message defines a formal connection between a + # merchant's account and a service provider's account. This relationship + # enables the provider to offer specific services to the business, such as + # product management or campaign management. It specifies the access rights + # and permissions to the business's data relevant to those services. + # + # Establishing an account relationship involves linking the merchant's account + # with a provider's account. The provider could be another Google account (like + # Google Ads or Google My Business) or a third-party platform (such as Shopify + # or WooCommerce). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account relationship. + # Format: `accounts/{account}/relationships/{relationship}`. For example, + # `accounts/123456/relationships/567890`. + # @!attribute [rw] provider + # @return [::String] + # Immutable. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @!attribute [r] provider_display_name + # @return [::String] + # Output only. The human-readable display name of the provider account. + # @!attribute [rw] account_id_alias + # @return [::String] + # Optional. An optional alias you can assign to this account relationship. + # This alias acts as a convenient identifier for your own reference and + # management. It must be unique among all your account relationships with the + # same provider. + # + # For example, you might use `account_id_alias` to assign a friendly name + # to this relationship for easier identification in your systems. + class AccountRelationship + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get an account relationship. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the account relationship to get. + # Format: `accounts/{account}/relationships/{relationship}`. For example, + # `accounts/123456/relationships/567890`. + class GetAccountRelationshipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAccountRelationship` method. + # @!attribute [rw] account_relationship + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountRelationship] + # Required. The new version of the account relationship. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_id_alias` + class UpdateAccountRelationshipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list account relationships. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account of the account relationship to filter by. + # Format: `accounts/{account}` + # @!attribute [rw] page_token + # @return [::String] + # Optional. The token returned by the previous `list` request. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + class ListAccountRelationshipsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response after trying to list account relationships. + # @!attribute [rw] account_relationships + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountRelationship>] + # The account relationships that match your filter. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token. You can send the `page_token` to get the next page. + # Only included in the `list` response if there are more pages. + class ListAccountRelationshipsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb new file mode 100644 index 000000000000..c8b18e297eab --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accounts.rb @@ -0,0 +1,250 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The `Account` message represents a business's account within Shopping + # Ads. It's the primary entity for managing product data, settings, and + # interactions with Google's services and external providers. + # + # Accounts can operate as standalone entities or be part of a advanced account + # structure. In an advanced account setup the parent account manages multiple + # sub-accounts. + # + # Establishing an account involves configuring attributes like the account + # name, time zone, and language preferences. + # + # The `Account` message is the parent entity for many other resources, for + # example, `AccountRelationship`, `Homepage`, `BusinessInfo` and so on. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account. + # Format: `accounts/{account}` + # @!attribute [r] account_id + # @return [::Integer] + # Output only. The ID of the account. + # @!attribute [rw] account_name + # @return [::String] + # Required. A human-readable name of the account. See + # [store name](https://support.google.com/merchants/answer/160556) and + # [business name](https://support.google.com/merchants/answer/12159159) for + # more information. + # @!attribute [rw] adult_content + # @return [::Boolean] + # Optional. Whether this account contains adult content. + # @!attribute [r] test_account + # @return [::Boolean] + # Output only. Whether this is a test account. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Required. The time zone of the account. + # + # On writes, `time_zone` sets both the `reporting_time_zone` and the + # `display_time_zone`. + # + # For reads, `time_zone` always returns the `display_time_zone`. If + # `display_time_zone` doesn't exist for your account, `time_zone` is empty. + # + # The `version` field is not supported, won't be set in responses and will be + # silently ignored if specified in requests. + # @!attribute [rw] language_code + # @return [::String] + # Required. The account's [BCP-47 language + # code](https://tools.ietf.org/html/bcp47), such as `en-US` or `sr-Latn`. + class Account + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + class GetAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateAndConfigureAccount` method. + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # Required. The account to be created. + # @!attribute [rw] user + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser>] + # Optional. Users to be added to the account. + # @!attribute [rw] service + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation` and `accounts.createAndConfigure` method can be + # used to create a sub-account under an existing advanced account through + # this method. Additional `account_management` or + # `product_management` services may be provided. + class CreateAndConfigureAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Instruction for adding a user to the account during creation. + # @!attribute [rw] user_id + # @return [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # Optional. Details about the user to be added. At the moment, only access + # rights may be specified. + class AddUser + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional instructions to add account services during creation of the + # account. + # @!attribute [rw] account_aggregation + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountAggregation] + # The provider is an + # [aggregator](https://support.google.com/merchants/answer/188487) for + # the account. Payload for service type Account Aggregation. + # @!attribute [rw] provider + # @return [::String] + # Required. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + class AddAccountService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for the `DeleteAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + class DeleteAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAccount` method. + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1::Account] + # Required. The new version of the account. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `account_name` + # - `adult_content` + # - `language_code` + # - `time_zone` + class UpdateAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `accounts.list` method. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Returns only accounts that match the + # [filter](https://developers.google.com/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax + # reference](https://developers.google.com/merchant/api/guides/accounts/filter-syntax). + class ListAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `accounts.list` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Account>] + # The accounts matching the `ListAccountsRequest`. + # @!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 ListAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListSubAccounts` method. + # @!attribute [rw] provider + # @return [::String] + # Required. The aggregation service provider. + # Format: `accounts/{accountId}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `accounts.list` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided in the `accounts.list` + # request must match the call that provided the page token. + class ListSubAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListSubAccounts` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Account>] + # The accounts for which the given parent account is an aggregator. + # @!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 ListSubAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb new file mode 100644 index 000000000000..00b5307ffde7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/accountservices.rb @@ -0,0 +1,288 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The `AccountService` message represents a specific service that a provider + # account offers to a Merchant Center account. + # + # `AccountService` defines the permissions and capabilities granted to the + # provider, allowing for operations such as product management or campaign + # management. + # + # The lifecycle of an `AccountService` involves a proposal phase, where one + # party suggests the service, and an approval phase, where the other party + # accepts or rejects it. This handshake mechanism ensures mutual consent before + # any access is granted. This mechanism safeguards both parties by ensuring + # that access rights are granted appropriately and that both the business and + # provider are aware of the services enabled. In scenarios where a user is an + # admin of both accounts, the approval can happen automatically. + # + # The mutability of a service is also managed through `AccountService`. Some + # services might be immutable, for example, if they were established through + # other systems or APIs, and you cannot alter them through this API. + # @!attribute [rw] products_management + # @return [::Google::Shopping::Merchant::Accounts::V1::ProductsManagement] + # Service type for managing products. This allows the provider to handle + # product data on behalf of the business, including reading and writing + # product listings. It's commonly used when the provider offers inventory + # management or catalog synchronization services to keep the business's + # product information up-to-date across platforms. + # + # Note: The following fields are mutually exclusive: `products_management`, `campaigns_management`, `account_management`, `account_aggregation`, `local_listing_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] campaigns_management + # @return [::Google::Shopping::Merchant::Accounts::V1::CampaignsManagement] + # Service type for managing advertising campaigns. Grants the provider + # access to create and manage the business's ad campaigns, including + # setting up campaigns, adjusting bids, and optimizing performance. + # + # Note: The following fields are mutually exclusive: `campaigns_management`, `products_management`, `account_management`, `account_aggregation`, `local_listing_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] account_management + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountManagement] + # Service type for account management. Enables the provider to perform + # administrative actions on the business's account, such as + # configuring account settings, managing users, or updating business + # information. + # + # Note: The following fields are mutually exclusive: `account_management`, `products_management`, `campaigns_management`, `account_aggregation`, `local_listing_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] account_aggregation + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountAggregation] + # Service type for account aggregation. This enables the provider, which is + # an advanced account, to manage multiple sub-accounts (client + # accounts). Through this service, the advanced account provider can + # perform administrative and operational tasks across all linked + # sub-accounts. + # + # This is useful for agencies, aggregators, or large retailers that need + # centralized control over many Merchant Center accounts. + # + # Note: The following fields are mutually exclusive: `account_aggregation`, `products_management`, `campaigns_management`, `account_management`, `local_listing_management`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] local_listing_management + # @return [::Google::Shopping::Merchant::Accounts::V1::LocalListingManagement] + # Service type for local listings management. The business group associated + # with the external account id will be used to provide local inventory to + # this Merchant Center account. + # + # Note: The following fields are mutually exclusive: `local_listing_management`, `products_management`, `campaigns_management`, `account_management`, `account_aggregation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account service. + # Format: `accounts/{account}/services/{service}` + # @!attribute [r] provider + # @return [::String] + # Output only. The provider of the service. Either the reference to an + # account such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @!attribute [r] provider_display_name + # @return [::String] + # Output only. The human-readable display name of the provider account. + # @!attribute [r] handshake + # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake] + # Output only. Information about the state of the service in terms of + # establishing it (e.g. is it pending approval or approved). + # @!attribute [r] mutability + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService::Mutability] + # Output only. Whether the service is mutable (e.g. through Approve / Reject + # RPCs). A service that was created through another system or API might be + # immutable. + # @!attribute [rw] external_account_id + # @return [::String] + # Immutable. An optional, immutable identifier that Google uses to refer to + # this account when communicating with the provider. This should be the + # unique account ID within the provider's system (for example, your shop ID + # in Shopify). + # + # If you have multiple accounts with the same provider - for instance, + # different accounts for various regions — the `external_account_id` + # differentiates between them, ensuring accurate linking and integration + # between Google and the provider. + class AccountService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of mutability option settings a service can have. + module Mutability + # Unused default value + MUTABILITY_UNSPECIFIED = 0 + + # The service can be mutated without restrictions. + MUTABLE = 1 + + # The service is read-only and must not be mutated. + IMMUTABLE = 2 + end + end + + # Request to get an account service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the account service to get. + # Format: `accounts/{account}/services/{service}` + class GetAccountServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list account services. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account of the account service to filter by. + # Format: `accounts/{account}` + # @!attribute [rw] page_token + # @return [::String] + # Optional. The token returned by the previous `list` request. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of elements to return in the response. Use for + # paging. If no `page_size` is specified, `100` is used as the default value. + # The maximum allowed value is `1000`. + class ListAccountServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response after trying to list account services. + # @!attribute [rw] account_services + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccountService>] + # The account services that match your filter. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token. You can send the `page_token` to get the next page. + # Only included in the `list` response if there are more pages. + class ListAccountServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to propose an account service. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent account for the service. + # Format: `accounts/{account}` + # @!attribute [rw] provider + # @return [::String] + # Required. The provider of the service. Either the reference to an account + # such as `providers/123` or a well-known service provider (one of + # `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). + # @!attribute [rw] account_service + # @return [::Google::Shopping::Merchant::Accounts::V1::AccountService] + # Required. The account service to propose. + class ProposeAccountServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to approve an account service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the account service to approve. + # Format: `accounts/{account}/services/{service}` + class ApproveAccountServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to reject an account service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the account service to reject. + # Format: `accounts/{account}/services/{service}` + class RejectAccountServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ProductsManagement` payload. + class ProductsManagement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `CampaignManagement` payload. + class CampaignsManagement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `AccountManagement` payload. + class AccountManagement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `AccountAggregation` payload. + class AccountAggregation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `LocalListingManagement` payload. + class LocalListingManagement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The current status of establishing of the service. + # (for example, pending approval or approved). + # @!attribute [r] approval_state + # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake::ApprovalState] + # Output only. The approval state of this handshake. + # @!attribute [r] actor + # @return [::Google::Shopping::Merchant::Accounts::V1::Handshake::Actor] + # Output only. The most recent account to modify the account service's + # `approval_status`. + class Handshake + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The approal state of a handshake. + module ApprovalState + # Unspecified approval status. + APPROVAL_STATE_UNSPECIFIED = 0 + + # The service was proposed and is waiting to be confirmed. + PENDING = 1 + + # Both parties have confirmed the service. + ESTABLISHED = 2 + + # The service proposal was rejected. + REJECTED = 3 + end + + # The various actors that can be involved in a handshake. + module Actor + # Unspecified actor. + ACTOR_UNSPECIFIED = 0 + + # The last change was done by the account who has this service. + ACCOUNT = 1 + + # The last change was done by the other party who this service points to. + OTHER_PARTY = 2 + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb new file mode 100644 index 000000000000..0cd6c16049c7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/autofeedsettings.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to the + # [autofeed](https://support.google.com/merchants/answer/7538732) settings. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings`. + # @!attribute [rw] enable_products + # @return [::Boolean] + # Required. Enables or disables product crawling through the autofeed for the + # given account. Autofeed accounts must meet [certain + # conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), + # which can be checked through the `eligible` field. + # The account must **not** be a marketplace. + # When the autofeed is enabled for the first time, the products usually + # appear instantly. When re-enabling, it might take up to 24 hours for + # products to appear. + # @!attribute [r] eligible + # @return [::Boolean] + # Output only. Determines whether the business is eligible for being enrolled + # into an autofeed. + class AutofeedSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAutofeedSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + class GetAutofeedSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAutofeedSettings` method. + # @!attribute [rw] autofeed_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings] + # Required. The new version of the autofeed setting. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateAutofeedSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb new file mode 100644 index 000000000000..92873acf5d92 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/automaticimprovements.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to the [automatic + # improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) + # of an account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements`. + # @!attribute [rw] item_updates + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticItemUpdates] + # Turning on [item + # updates](https://support.google.com/merchants/answer/3246284) allows + # Google to automatically update items for you. When item updates are on, + # Google uses the structured data markup on the website and advanced data + # extractors to update the price and availability of the items. When the item + # updates are off, items with mismatched data aren't shown. + # This field is only updated (cleared) if provided in the update mask. + # @!attribute [rw] image_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImageImprovements] + # This improvement will attempt to automatically correct submitted images if + # they don't meet the [image + # requirements](https://support.google.com/merchants/answer/6324350), for + # example, removing overlays. If successful, the image will be replaced and + # approved. This improvement is only applied to images of disapproved offers. + # For more information see: [Automatic image + # improvements](https://support.google.com/merchants/answer/9242973) + # This field is only updated (cleared) if provided in the update mask. + # @!attribute [rw] shipping_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticShippingImprovements] + # Not available for [advanced + # accounts](https://support.google.com/merchants/answer/188487). By turning + # on [automatic shipping + # improvements](https://support.google.com/merchants/answer/10027038), you + # are allowing Google to improve the accuracy of your delivery times shown to + # shoppers using Google. More accurate delivery times, especially when + # faster, typically lead to better conversion rates. Google will improve your + # estimated delivery times based on various factors: + # * Delivery address of an order + # * Current handling time and shipping time settings + # * Estimated weekdays or business days + # * Parcel tracking data + # This field is only updated (cleared) if provided in the update mask. + class AutomaticImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Turning on [item + # updates](https://support.google.com/merchants/answer/3246284) allows + # Google to automatically update items for you. When item updates are on, + # Google uses the structured data markup on the website and advanced data + # extractors to update the price and availability of the items. When the item + # updates are off, items with mismatched data aren't shown. + # @!attribute [rw] account_item_updates_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticItemUpdates::ItemUpdatesAccountLevelSettings] + # Optional. Determines which attributes of the items should be automatically + # updated. If this field is not present and provided in the update mask, then + # the settings will be deleted. If there are no settings for subaccount, they + # are inherited from aggregator. + # @!attribute [r] effective_allow_price_updates + # @return [::Boolean] + # Output only. The effective value of allow_price_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_availability_updates + # @return [::Boolean] + # Output only. The effective value of allow_availability_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_strict_availability_updates + # @return [::Boolean] + # Output only. The effective value of + # allow_strict_availability_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_condition_updates + # @return [::Boolean] + # Output only. The effective value of allow_condition_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + class AutomaticItemUpdates + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for the Automatic Item Updates. + # @!attribute [rw] allow_price_updates + # @return [::Boolean] + # If price updates are enabled, Google always updates the active price with + # the crawled information. + # @!attribute [rw] allow_availability_updates + # @return [::Boolean] + # If availability updates are enabled, any previous availability values + # get overwritten if Google finds an out-of-stock annotation on the offer's + # page. + # If additionally `allow_strict_availability_updates` field is set to + # true, values get overwritten if Google finds an in-stock annotation on + # the offer’s page. + # @!attribute [rw] allow_strict_availability_updates + # @return [::Boolean] + # If `allow_availability_updates` is enabled, items are automatically + # updated in all your Shopping target countries. By default, availability + # updates will only be applied to items that are 'out of stock' on your + # website but 'in stock' on Shopping. Set this to true to also update items + # that are 'in stock' on your website, but 'out of stock' on Google + # Shopping. In order for this field to have an effect, you must also set + # `allow_availability_updates`. + # @!attribute [rw] allow_condition_updates + # @return [::Boolean] + # If condition updates are enabled, Google always updates item condition + # with the condition detected from the details of your product. + class ItemUpdatesAccountLevelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This improvement will attempt to automatically correct submitted images if + # they don't meet the [image + # requirements](https://support.google.com/merchants/answer/6324350), for + # example, removing overlays. If successful, the image will be replaced and + # approved. This improvement is only applied to images of disapproved offers. + # For more information see: [Automatic image + # improvements](https://support.google.com/merchants/answer/9242973) + # @!attribute [rw] account_image_improvements_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImageImprovements::ImageImprovementsAccountLevelSettings] + # Optional. Determines how the images should be automatically updated. + # If this field is not present and provided in the update mask, then the + # settings will be deleted. If there are no settings for subaccount, they are + # inherited from aggregator. + # @!attribute [r] effective_allow_automatic_image_improvements + # @return [::Boolean] + # Output only. The effective value of allow_automatic_image_improvements. + # If account_image_improvements_settings is present, then this value is the + # same. Otherwise, it represents the inherited value of the parent account. + # Read-only. + class AutomaticImageImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for the Automatic Image Improvements. + # @!attribute [rw] allow_automatic_image_improvements + # @return [::Boolean] + # Enables automatic image improvements. + class ImageImprovementsAccountLevelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Not available for [advanced + # accounts](https://support.google.com/merchants/answer/188487). By turning on + # [automatic shipping + # improvements](https://support.google.com/merchants/answer/10027038), + # you are allowing Google to improve the accuracy of your delivery times shown + # to shoppers using Google. More accurate delivery times, especially when + # faster, typically lead to better conversion rates. Google will improve your + # estimated delivery times based on various factors: + # * Delivery address of an order + # * Current handling time and shipping time settings + # * Estimated weekdays or business days + # * Parcel tracking data + # @!attribute [rw] allow_shipping_improvements + # @return [::Boolean] + # Enables automatic shipping improvements. + class AutomaticShippingImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAutomaticImprovements` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + class GetAutomaticImprovementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAutomaticImprovements` method. + # @!attribute [rw] automatic_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements] + # Required. The new version of the automatic imrovements. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + class UpdateAutomaticImprovementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb new file mode 100644 index 000000000000..0638013b2bbd --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessidentity.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to the [identity of a + # business](https://support.google.com/merchants/answer/12564247). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + # @!attribute [rw] promotions_consent + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::PromotionsConsent] + # Required. Whether the identity attributes may be used for promotions. + # @!attribute [rw] black_owned + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # black-owned. This optional field will only be available for businesses with + # the business country set to `US`. It is also not applicable for + # marketplaces or marketplace sellers. + # @!attribute [rw] women_owned + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # women-owned. This optional field will only be available for businesses with + # a business country set to `US`. It is also not applicable for marketplaces + # or marketplace sellers. + # @!attribute [rw] veteran_owned + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # veteran-owned. This optional field will only be available for businesses + # with a business country set to `US`. It is also not applicable for + # marketplaces or marketplace sellers. + # @!attribute [rw] latino_owned + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # latino-owned. This optional field will only be available for businesses + # with the business country set to `US`. It is also not applicable for + # marketplaces or marketplace sellers. + # @!attribute [rw] small_business + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as a small + # business. This optional field will only be available for businesses with a + # business country set to `US`. It is also not applicable for marketplaces. + class BusinessIdentity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All information related to an identity attribute. + # @!attribute [rw] identity_declaration + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity::IdentityAttribute::IdentityDeclaration] + # Required. The declaration of identity for this attribute. + class IdentityAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All possible settings regarding the declaration of an identity. + module IdentityDeclaration + # Default value indicating that no selection was made. + IDENTITY_DECLARATION_UNSPECIFIED = 0 + + # Indicates that the account identifies with the attribute. + SELF_IDENTIFIES_AS = 1 + + # Indicates that the account does not identify with the attribute. + DOES_NOT_SELF_IDENTIFY_AS = 2 + end + end + + # All possible settings regarding promotions related to the business + # identity. + module PromotionsConsent + # Default value indicating that no selection was made. + PROMOTIONS_CONSENT_UNSPECIFIED = 0 + + # Indicates that the account consented to having their business identity + # used for promotions. + PROMOTIONS_CONSENT_GIVEN = 1 + + # Indicates that the account did not consent to having their business + # identity used for promotions. + PROMOTIONS_CONSENT_DENIED = 2 + end + end + + # Request message for the `GetBusinessIdentity` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity`. For example, + # `accounts/123456/businessIdentity`. + class GetBusinessIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateBusinessIdentity` method. + # @!attribute [rw] business_identity + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity] + # Required. The new version of the business identity. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `black_owned` + # - `latino_owned` + # - `promotions_consent` + # - `small_business` + # - `veteran_owned` + # - `women_owned` + class UpdateBusinessIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb new file mode 100644 index 000000000000..64636f145ae1 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/businessinfo.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The `BusinessInfo` message contains essential information about a + # business. + # + # This message captures key business details such as physical address, + # customer service contacts, and region-specific identifiers. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + # @!attribute [rw] address + # @return [::Google::Type::PostalAddress] + # Optional. The address of the business. Only `region_code`, `address_lines`, + # `postal_code`, `administrative_area` and `locality` fields are supported. + # All other fields are ignored. + # @!attribute [r] phone + # @return [::Google::Type::PhoneNumber] + # Output only. The phone number of the business. + # @!attribute [r] phone_verification_state + # @return [::Google::Shopping::Merchant::Accounts::V1::PhoneVerificationState] + # Output only. The phone verification state of the business. + # @!attribute [rw] customer_service + # @return [::Google::Shopping::Merchant::Accounts::V1::CustomerService] + # Optional. The customer service of the business. + # @!attribute [rw] korean_business_registration_number + # @return [::String] + # Optional. The 10-digit [Korean business registration + # number](https://support.google.com/merchants/answer/9037766) separated with + # dashes in the format: XXX-XX-XXXXX. + class BusinessInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetBusinessInfo` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo`. For example, + # `accounts/123456/businessInfo`. + class GetBusinessInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateBusinessInfo` method. + # @!attribute [rw] business_info + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessInfo] + # Required. The new version of the business info. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `address` + # - `customer_service` + # - `korean_business_registration_number` + class UpdateBusinessInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb new file mode 100644 index 000000000000..771be153495f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/checkoutsettings.rb @@ -0,0 +1,187 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Request message for `GetCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class GetCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateCheckoutSettings` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # Required. The `CheckoutSettings` object to create. + class CreateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateCheckoutSettings` method. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + class UpdateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class DeleteCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for + # a specific merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program configuration settings. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::UriSettings] + # URI settings for cart or checkout URL. + # @!attribute [rw] eligible_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # Optional. The destinations (also known as [Marketing + # methods](https://support.google.com/merchants/answer/15130232)) to which + # the checkout program applies, valid destination values are `SHOPPING_ADS`, + # `FREE_LISTINGS` + # @!attribute [r] enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutEnrollmentState] + # Output only. Reflects the merchant enrollment state in `Checkout` program. + # @!attribute [r] review_state + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutReviewState] + # Output only. Reflects the merchant review state in `Checkout` program. + # This is set based on the data quality reviews of the URL provided by + # the merchant. + # A merchant with enrollment state + # as `ENROLLED` can be in the following review states: `IN_REVIEW`, + # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of + # `ENROLLED` before a review can begin for the merchant.For more details, + # check the help center doc. + # @!attribute [r] effective_uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1::UriSettings] + # Output only. The effective value of `uri_settings` for a given merchant. If + # account level settings are present then this value will be a copy of url + # settings. Otherwise, it will have the value of the parent account (for only + # marketplace sellers). + # @!attribute [r] effective_enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutEnrollmentState] + # Output only. The effective value of enrollment_state for a given merchant + # ID. If account level settings are present then this value will be a copy of + # the account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + # @!attribute [r] effective_review_state + # @return [::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings::CheckoutReviewState] + # Output only. The effective value of `review_state` for a given merchant ID. + # If account level settings are present then this value will be a copy of the + # account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + class CheckoutSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum indicating the enrollment state of merchant in `Checkout` + # program. + module CheckoutEnrollmentState + # Default enrollment state when enrollment state is not specified. + CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Merchant has not enrolled into the program. + INACTIVE = 1 + + # Merchant has enrolled into the program by providing either an + # account level URL or checkout URLs as part of their feed. + ENROLLED = 2 + + # Merchant has previously enrolled but opted out of the program. + OPTED_OUT = 3 + end + + # Enum indicating the review state of merchant in `Checkout` + # program. + module CheckoutReviewState + # Default review state when review state is not specified. + CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 + + # Merchant provided URLs are being reviewed for data quality issues. + IN_REVIEW = 1 + + # Merchant account has been approved. Indicates the data quality checks + # have passed. + APPROVED = 2 + + # Merchant account has been disapproved due to data quality issues. + DISAPPROVED = 3 + end + end + + # URL settings for cart or checkout URL. + # @!attribute [rw] checkout_uri_template + # @return [::String] + # Checkout URL template. When the placeholders are expanded will redirect + # the buyer to the merchant checkout page with the item in the cart. For + # more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cart_uri_template + # @return [::String] + # Cart URL template. When the placeholders are expanded will redirect the + # buyer to the cart page on the merchant website with the selected + # item in cart. For more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class UriSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb new file mode 100644 index 000000000000..3bc8022a4ecc --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/customerservice.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Customer service information. + # @!attribute [rw] uri + # @return [::String] + # Optional. The URI where customer service may be found. + # @!attribute [rw] email + # @return [::String] + # Optional. The email address where customer service may be reached. + # @!attribute [rw] phone + # @return [::Google::Type::PhoneNumber] + # Optional. The phone number where customer service may be called. + class CustomerService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb new file mode 100644 index 000000000000..8a7626869ec7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/developerregistration.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Represents a developer registration owned by a Merchant account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The `name` (ID) of the developer registration. Generated by the + # Content API upon creation of a new `DeveloperRegistration`. The `account` + # represents the merchant ID of the merchant that owns the registration. + # @!attribute [r] gcp_ids + # @return [::Array<::String>] + # Output only. The GCP ids attached to this developer registration + class DeveloperRegistration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the RegisterGCP method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + # @!attribute [rw] developer_email + # @return [::String] + # Immutable. If the developer email provided is associated with a user in the + # merchant account provided, the user will be updated to have "API developer" + # access type and the email preference corresponding to that user will be + # updated to have the new "API notifications" preference. If the developer + # email provided is not associated with any user we will just add it as a + # contact. The email preference corresponding to that contact will have the + # new "API notifications" preference + class RegisterGcpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UnregisterGCP method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the developer registration to be created for the + # merchant account that the GCP will be registered with. Format: + # `accounts/{account}/developerRegistration` + class UnregisterGcpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetDeveloperRegistration method. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` (ID) of the developer registration. + class GetDeveloperRegistrationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb new file mode 100644 index 000000000000..7a66e3de689d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/emailpreferences.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The categories of notifications the user opted into / opted out of. The email + # preferences do not include mandatory announcements as users can't opt out of + # them. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the EmailPreferences. The endpoint is only + # supported for the authenticated user. + # @!attribute [rw] news_and_tips + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences::OptInState] + # Optional. Updates on new features, tips and best practices. + class EmailPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Opt in state of the email preference. + module OptInState + # Opt-in status is not specified. + OPT_IN_STATE_UNSPECIFIED = 0 + + # User has opted out of receiving this type of email. + OPTED_OUT = 1 + + # User has opted in to receiving this type of email. + OPTED_IN = 2 + + # User has opted in to receiving this type of email and the confirmation + # email has been sent, but user has not yet confirmed the opt in (applies + # only to certain countries). + UNCONFIRMED = 3 + end + end + + # Request message for GetEmailPreferences method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + class GetEmailPreferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateEmailPreferences method. + # @!attribute [rw] email_preferences + # @return [::Google::Shopping::Merchant::Accounts::V1::EmailPreferences] + # Required. Email Preferences to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `news_and_tips` + class UpdateEmailPreferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb new file mode 100644 index 000000000000..44aad8452293 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/gbpaccounts.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to a Google Business Profile (GBP) account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the GBP account. Format: + # `accounts/{account}/gbpAccount/{gbp_account}` + # @!attribute [rw] gbp_account_id + # @return [::String] + # The id of the GBP account. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1::GbpAccount::Type] + # The type of the Business Profile. + # @!attribute [rw] gbp_account_name + # @return [::String] + # The name of the Business Profile. + # For personal accounts: Email id of the owner. + # For Business accounts: Name of the Business Account. + # @!attribute [rw] listing_count + # @return [::Integer] + # Number of listings under this account. + class GbpAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the GBP account. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The GBP account is a user account. + USER = 1 + + # The GBP account is a business account. + BUSINESS_ACCOUNT = 2 + end + end + + # Request message for the ListGbpAccounts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + class ListGbpAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListGbpAccounts method. + # @!attribute [rw] gbp_accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::GbpAccount>] + # The GBP accounts from the specified merchant in the specified country. + # @!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 ListGbpAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the LinkGbpAccount method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @!attribute [rw] gbp_email + # @return [::String] + # Required. The email address of the Business Profile account. + class LinkGbpAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the LinkGbpAccount method. + # @!attribute [rw] response + # @return [::Google::Protobuf::Empty] + # Empty response. + class LinkGbpAccountResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb new file mode 100644 index 000000000000..d72a6127add1 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/homepage.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The `Homepage` message represents a business's store homepage within the + # system. + # + # A business's homepage is the primary domain where customers interact with + # their store. + # + # The homepage can be claimed and verified as a proof of ownership and allows + # the business to unlock features that require a verified website. For more + # information, see [Understanding online store URL + # verification](//support.google.com/merchants/answer/176793). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the store's homepage. + # Format: `accounts/{account}/homepage` + # @!attribute [rw] uri + # @return [::String] + # Required. The URI (typically a URL) of the store's homepage. + # @!attribute [r] claimed + # @return [::Boolean] + # Output only. Whether the homepage is claimed. See + # https://support.google.com/merchants/answer/176793. + class Homepage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + class GetHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateHomepage` method. + # @!attribute [rw] homepage + # @return [::Google::Shopping::Merchant::Accounts::V1::Homepage] + # Required. The new version of the homepage. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `uri` + class UpdateHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ClaimHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # @!attribute [rw] overwrite + # @return [::Boolean] + # Optional. When set to `true`, this option removes any existing claim on the + # requested website from any other account to the account making the request, + # effectively replacing the previous claim. + class ClaimHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UnclaimHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + class UnclaimHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb new file mode 100644 index 000000000000..d28e8e99c1c8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/lfpproviders.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to a Local Feed Partnership (LFP) provider. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the LFP provider. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` + # @!attribute [r] region_code + # @return [::String] + # Output only. Region code defined by [CLDR](https://cldr.unicode.org/). + # @!attribute [rw] display_name + # @return [::String] + # The display name of the LFP provider. + class LfpProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the FindLfpProviders method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + class FindLfpProvidersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the FindLfpProviders method. + # @!attribute [rw] lfp_providers + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::LfpProvider>] + # The LFP providers from the specified merchant in the specified country. + # @!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 FindLfpProvidersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the LinkLfpProvider method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @!attribute [rw] external_account_id + # @return [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + class LinkLfpProviderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the LinkLfpProvider method. + # @!attribute [rw] response + # @return [::Google::Protobuf::Empty] + # Empty response. + class LinkLfpProviderResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb new file mode 100644 index 000000000000..e50129b97d96 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/omnichannelsettings.rb @@ -0,0 +1,336 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Collection of information related to the omnichannel settings of a merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the omnichannel setting. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @!attribute [rw] region_code + # @return [::String] + # Required. Immutable. Region code defined by + # [CLDR](https://cldr.unicode.org/). Must be provided in the Create method, + # and is immutable. + # @!attribute [rw] lsf_type + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting::LsfType] + # Required. The Local Store Front type for this country. + # @!attribute [rw] in_stock + # @return [::Google::Shopping::Merchant::Accounts::V1::InStock] + # Optional. The InStock URI and state for this country. + # @!attribute [rw] pickup + # @return [::Google::Shopping::Merchant::Accounts::V1::Pickup] + # Optional. The Pickup URI and state for this country. + # @!attribute [r] lfp_link + # @return [::Google::Shopping::Merchant::Accounts::V1::LfpLink] + # Output only. The established link to a LFP provider. + # @!attribute [rw] odo + # @return [::Google::Shopping::Merchant::Accounts::V1::OnDisplayToOrder] + # Optional. The On Display to Order (ODO) policy URI and state for this + # country. + # @!attribute [rw] about + # @return [::Google::Shopping::Merchant::Accounts::V1::About] + # Optional. The about page URI and state for this country. + # @!attribute [rw] inventory_verification + # @return [::Google::Shopping::Merchant::Accounts::V1::InventoryVerification] + # Optional. The inventory verification contact and state for this country. + class OmnichannelSetting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The product page experience type, which is also called the Local Store + # Front (LSF) type. Check the [HC + # article](https://support.google.com/merchants/answer/7178526) for more + # details. + module LsfType + # Default value. This value is unused. + LSF_TYPE_UNSPECIFIED = 0 + + # Google-Hosted Local Store Front. Check the [HC + # article](https://support.google.com/merchants/answer/14869424) for more + # details. + GHLSF = 1 + + # Merchant-Hosted Local Store Front Basic. Check the [HC + # article](https://support.google.com/merchants/answer/14615867) for more + # details. + MHLSF_BASIC = 2 + + # Merchant-Hosted Local Store Front Full. Check the [HC + # article](https://support.google.com/merchants/answer/14617076) for more + # details. + MHLSF_FULL = 3 + end + end + + # The state of a omnichannel setting related review process. + class ReviewState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the review process. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The review process has concluded successfully. The reviewed item is + # active. + ACTIVE = 1 + + # The review process failed. + FAILED = 2 + + # The review process is running. + RUNNING = 3 + + # The review process is waiting for the merchant to take action. + ACTION_REQUIRED = 4 + end + end + + # Collection of information related to InStock. + # @!attribute [rw] uri + # @return [::String] + # Optional. Product landing page URI. It is only used for the review of MHLSF + # in-stock serving. This URI domain should match with the business's + # homepage. Required to be empty if the lsf_type is GHLSF, and required when + # the lsf_type is MHLSF_FULL or MHLSF_BASIC. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the in-stock serving. + class InStock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to Pickup. + # @!attribute [rw] uri + # @return [::String] + # Required. Pickup product page URI. It is only used for the review of pickup + # serving. This URI domain should match with the business's homepage. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the pickup serving. + class Pickup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the LFP link. + # @!attribute [rw] lfp_provider + # @return [::String] + # Required. The resource name of the LFP provider. + # Format: `lfpProviders/{lfp_provider}` + # @!attribute [rw] external_account_id + # @return [::String] + # Required. The account ID by which this merchant is known to the LFP + # provider. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the LFP link. + class LfpLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the on display to order + # ([ODO](https://support.google.com/merchants/answer/14615056?ref_topic=15145747&sjid=6892280366904591178-NC)). + # @!attribute [rw] uri + # @return [::String] + # Required. The on display to order (ODO) policy URI. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the URI. + class OnDisplayToOrder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the about page + # ([impressum](https://support.google.com/merchants/answer/14675634?ref_topic=15145634&sjid=6892280366904591178-NC)). + # @!attribute [rw] uri + # @return [::String] + # Required. The about page URI. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the URI. + class About + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to [inventory + # verification](https://support.google.com/merchants/answer/14684499?ref_topic=15145634&sjid=6892280366904591178-NC). + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::InventoryVerification::State] + # Output only. The state of the inventory verification process. + # @!attribute [rw] contact + # @return [::String] + # Required. The name of the contact for the inventory verification process. + # @!attribute [rw] contact_email + # @return [::String] + # Required. The email address of the contact for the inventory verification + # process. + # @!attribute [r] contact_state + # @return [::Google::Shopping::Merchant::Accounts::V1::ReviewState::State] + # Output only. The state of the contact verification. + class InventoryVerification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the [inventory + # verification](https://support.google.com/merchants/answer/14684499?ref_topic=15145634&sjid=6892280366904591178-NC) + # process. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # When the merchant needs to initiate the inventory + # verification process. The next state is INACTIVE. + ACTION_REQUIRED = 1 + + # When the merchant is ready to request inventory verification. + INACTIVE = 5 + + # The inventory verification process is running. If the merchant is + # rejected, the next state is INACTIVE. + RUNNING = 2 + + # The inventory verification process succeeded. + SUCCEEDED = 3 + + # When merchant fails the inventory verification process and all attempts + # are exhausted. + SUSPENDED = 4 + end + end + + # Request message for the GetOmnichannelSettings method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + class GetOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListOmnichannelSettings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + class ListOmnichannelSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListOmnichannelSettings method. + # @!attribute [rw] omnichannel_settings + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting>] + # The omnichannel settings from the specified merchant. + # @!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 ListOmnichannelSettingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateOmnichannelSetting method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # Required. The omnichannel setting to create. + class CreateOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateOmnichannelSetting method. + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + class UpdateOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the RequestInventoryVerification method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + class RequestInventoryVerificationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the RequestInventoryVerification method. + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting] + # The omnichannel setting that was updated. + class RequestInventoryVerificationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb new file mode 100644 index 000000000000..03a2bd0648eb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/online_return_policy.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Request message for the `GetOnlineReturnPolicy` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the return policy to retrieve. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + class GetOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateOnlineReturnPolicy` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Merchant Center account for which the return policy will be + # created. Format: `accounts/{account}` + # @!attribute [rw] online_return_policy + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy] + # Required. The return policy object to create. + class CreateOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteOnlineReturnPolicy` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + class DeleteOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Merchant Center account for which to list return policies. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given business is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListOnlineReturnPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] online_return_policies + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy>] + # The retrieved return policies. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListOnlineReturnPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Online return policy](https://support.google.com/merchants/answer/10220642) + # object. This is currently used to represent return policies for ads and free + # listings programs. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `OnlineReturnPolicy` resource. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @!attribute [r] return_policy_id + # @return [::String] + # Output only. Return policy ID generated by Google. + # @!attribute [rw] label + # @return [::String] + # Optional. Immutable. This field represents the unique user-defined label of + # the return policy for the given country. It is important to note that the + # same label cannot be used in different return policies for the same + # country. If not given, policies will be automatically treated as the + # 'default' for the country. When using label, you are creating an exception + # policy in that country to assign a custom return policy to certain product + # groups, follow the instructions provided in the [Return policy label] + # (https://support.google.com/merchants/answer/9445425). The label can + # contain up to 50 characters. + # @!attribute [rw] countries + # @return [::Array<::String>] + # Required. Immutable. The countries of sale where the return policy applies. + # The values must be a valid 2 letter ISO 3166 code. + # @!attribute [rw] policy + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::Policy] + # Optional. The return policy. + # @!attribute [rw] seasonal_overrides + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::SeasonalOverride>] + # Optional. Overrides to the general policy for orders placed during a + # specific set of time intervals. + # @!attribute [rw] restocking_fee + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::RestockingFee] + # Optional. The restocking fee that applies to all return reason categories. + # This would be treated as a free restocking fee if the value is not set. + # @!attribute [rw] return_methods + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnMethod>] + # Optional. The return methods of how customers can return an item. This + # value is required to not be empty unless the type of return policy is + # noReturns. + # @!attribute [rw] item_conditions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ItemCondition>] + # Optional. The item conditions accepted for returns must not be empty unless + # the type of return policy is 'noReturns'. + # @!attribute [rw] return_shipping_fee + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnShippingFee] + # Optional. The return shipping fee. Should be set only when customer need to + # download and print the return label. + # @!attribute [rw] return_policy_uri + # @return [::String] + # Required. The return policy uri. This can used by Google to do a sanity + # check for the policy. It must be a valid URL. + # @!attribute [rw] accept_defective_only + # @return [::Boolean] + # Optional. This field specifies if business + # only accepts defective products for returns. + # @!attribute [rw] process_refund_days + # @return [::Integer] + # Optional. The field specifies the number of + # days it takes for business to process refunds. + # @!attribute [rw] accept_exchange + # @return [::Boolean] + # Optional. This field specifies if business + # allows customers to exchange products. + # @!attribute [rw] return_label_source + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnLabelSource] + # Optional. The field specifies the return + # label source. + class OnlineReturnPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The return shipping fee. This can either be a fixed fee or a boolean to + # indicate that the customer pays the actual shipping cost. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::ReturnShippingFee::Type] + # Required. Type of return shipping fee. + # @!attribute [rw] fixed_fee + # @return [::Google::Shopping::Type::Price] + # Fixed return shipping fee amount. This value is only applicable when type + # is `FIXED`. We will treat the return shipping fee as free if type is + # `FIXED` and this value is not set. + class ReturnShippingFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Return shipping fee types. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The return shipping fee is a fixed value. + FIXED = 1 + + # Customers will pay the actual return shipping fee. + CUSTOMER_PAYING_ACTUAL_FEE = 2 + end + end + + # The restocking fee. This can be a flat fee or a micro percent. + # @!attribute [rw] fixed_fee + # @return [::Google::Shopping::Type::Price] + # Fixed restocking fee. + # + # Note: The following fields are mutually exclusive: `fixed_fee`, `micro_percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] micro_percent + # @return [::Integer] + # Percent of total price in micros. 15,000,000 means 15% of the total + # price would be charged. + # + # Note: The following fields are mutually exclusive: `micro_percent`, `fixed_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RestockingFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The available policies. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy::Policy::Type] + # Policy type. + # @!attribute [rw] days + # @return [::Integer] + # The number of days items can be returned after delivery, where one day + # is defined as 24 hours after the delivery timestamp. Required for + # `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Return policy types. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The number of days within which a return is valid after delivery. + NUMBER_OF_DAYS_AFTER_DELIVERY = 1 + + # No returns. + NO_RETURNS = 2 + + # Life time returns. + LIFETIME_RETURNS = 3 + end + end + + # @!attribute [rw] return_days + # @return [::Integer] + # Number of days (from the delivery date) that the product can be + # returned. + # + # Note: The following fields are mutually exclusive: `return_days`, `return_until_date`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] return_until_date + # @return [::Google::Type::Date] + # Fixed end date until which the product can be returned. + # + # Note: The following fields are mutually exclusive: `return_until_date`, `return_days`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] label + # @return [::String] + # Required. Display name of this seasonal override in Merchant Center. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Required. Defines the date range when this seasonal override applies. + # Both start_date and end_date are inclusive. + # The dates of the seasonal overrides should not overlap. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Required. seasonal override end date (inclusive). + class SeasonalOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The available return methods. + module ReturnMethod + # Default value. This value is unused. + RETURN_METHOD_UNSPECIFIED = 0 + + # Return by mail. + BY_MAIL = 1 + + # Return in store. + IN_STORE = 2 + + # Return at a kiosk. + AT_A_KIOSK = 3 + end + + # The available item conditions. + module ItemCondition + # Default value. This value is unused. + ITEM_CONDITION_UNSPECIFIED = 0 + + # New. + NEW = 1 + + # Used. + USED = 2 + end + + # The available return label sources. + module ReturnLabelSource + # Default value. This value is unused. + RETURN_LABEL_SOURCE_UNSPECIFIED = 0 + + # Download and print. + DOWNLOAD_AND_PRINT = 1 + + # Label include in the package. + IN_THE_PACKAGE = 2 + + # Customer to provide. + CUSTOMER_RESPONSIBILITY = 3 + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb new file mode 100644 index 000000000000..999450d76638 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/phoneverificationstate.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The phone verification state. + module PhoneVerificationState + # Default value. This value is unused. + PHONE_VERIFICATION_STATE_UNSPECIFIED = 0 + + # The phone is verified. + PHONE_VERIFICATION_STATE_VERIFIED = 1 + + # The phone is unverified. + PHONE_VERIFICATION_STATE_UNVERIFIED = 2 + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb new file mode 100644 index 000000000000..13e9d5f81651 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/programs.rb @@ -0,0 +1,170 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Defines participation in a given program for the specified account. + # + # Programs provide a mechanism for adding functionality to a Merchant Center + # accounts. A typical example of this is the [Free product + # listings](https://support.google.com/merchants/answer/13889434) + # program, which enables products from a business's store to be shown across + # Google for free. + # + # The following list is the available set of program resource IDs accessible + # through the API: + # + # * `free-listings` + # * `shopping-ads` + # * `youtube-shopping-checkout` + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program. + # Format: `accounts/{account}/programs/{program}` + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. The URL of a Merchant Center help page describing the program. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::Program::State] + # Output only. The participation state of the account in the program. + # @!attribute [r] active_region_codes + # @return [::Array<::String>] + # Output only. The regions in which the account is actively participating in + # the program. Active regions are defined as those where all program + # requirements affecting the regions have been met. + # + # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is + # either a country where the program applies specifically to that country or + # `001` when the program applies globally. + # @!attribute [r] unmet_requirements + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Program::Requirement>] + # Output only. The requirements that the account has not yet satisfied that + # are affecting participation in the program. + class Program + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a requirement specified for participation in the program. + # @!attribute [r] title + # @return [::String] + # Output only. Name of the requirement. + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. The URL of a help page describing the requirement. + # @!attribute [r] affected_region_codes + # @return [::Array<::String>] + # Output only. The regions that are currently affected by this requirement + # not being met. + # + # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is + # either a country where the program applies specifically to that country + # or `001` when the program applies globally. + class Requirement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible program participation states for the account. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The account is not eligible to participate in the program. + NOT_ELIGIBLE = 1 + + # The account is eligible to participate in the program. + ELIGIBLE = 2 + + # The program is enabled for the account. + ENABLED = 3 + end + end + + # Request message for the GetProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}`. For example, + # `accounts/123456/programs/free-listings`. + class GetProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListPrograms method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the account for which to retrieve all programs. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + class ListProgramsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListPrograms method. + # @!attribute [rw] programs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Program>] + # The programs for the given account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. If this + # field is omitted, there are no subsequent pages. + class ListProgramsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the EnableProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + class EnableProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DisableProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}`. For + # example, `accounts/123456/programs/free-listings`. + class DisableProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb new file mode 100644 index 000000000000..829a50166673 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/regions.rb @@ -0,0 +1,195 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # Request message for the `GetRegion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + class GetRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateRegion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @!attribute [rw] region_id + # @return [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @!attribute [rw] region + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # Required. The region to create. + class CreateRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateRegion` method. + # @!attribute [rw] region + # @return [::Google::Shopping::Merchant::Accounts::V1::Region] + # Required. The updated region. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + class UpdateRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteRegion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + class DeleteRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListRegions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + class ListRegionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListRegions` method. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>] + # The regions from the specified business. + # @!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 ListRegionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a geographic region that you can use as a target with both the + # `RegionalInventory` and `ShippingSettings` services. You can define regions + # as collections of either postal codes or, in some countries, using predefined + # geotargets. For more information, see [Set up regions + # ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) + # for more information. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the region. + # Format: `accounts/{account}/regions/{region}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the region. + # @!attribute [rw] postal_code_area + # @return [::Google::Shopping::Merchant::Accounts::V1::Region::PostalCodeArea] + # Optional. A list of postal codes that defines the region area. + # @!attribute [rw] geotarget_area + # @return [::Google::Shopping::Merchant::Accounts::V1::Region::GeoTargetArea] + # Optional. A list of geotargets that defines the region area. + # @!attribute [r] regional_inventory_eligible + # @return [::Google::Protobuf::BoolValue] + # Output only. Indicates if the region is eligible for use in the Regional + # Inventory configuration. + # @!attribute [r] shipping_eligible + # @return [::Google::Protobuf::BoolValue] + # Output only. Indicates if the region is eligible for use in the Shipping + # Services configuration. + class Region + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of postal codes that defines the region area. + # Note: All regions defined using postal codes are accessible through the + # account's `ShippingSettings.postalCodeGroups` resource. + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # or the country the postal code group applies to. + # @!attribute [rw] postal_codes + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region::PostalCodeArea::PostalCodeRange>] + # Required. A range of postal codes. + class PostalCodeArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A range of postal codes that defines the region area. + # @!attribute [rw] begin + # @return [::String] + # Required. A postal code or a pattern of the form prefix* denoting the + # inclusive lower bound of the range defining the area. Examples values: + # `94108`, `9410*`, `9*`. + # @!attribute [rw] end + # @return [::String] + # Optional. A postal code or a pattern of the form `prefix*` denoting the + # inclusive upper bound of the range defining the area. It must have the + # same length as postalCodeRangeBegin: if postalCodeRangeBegin is a + # postal code then postalCodeRangeEnd must be a postal code too; if + # postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a + # pattern with the same prefix length. Optional: if not set, then the + # area is defined as being all the postal codes matching + # postalCodeRangeBegin. + class PostalCodeRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A list of geotargets that defines the region area. + # @!attribute [rw] geotarget_criteria_ids + # @return [::Array<::Integer>] + # Required. A non-empty list of [location + # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # They must all be of the same location type (for example, state). + class GeoTargetArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb new file mode 100644 index 000000000000..c3cc8dc91519 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/shippingsettings.rb @@ -0,0 +1,757 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The Merchant Center account's [shipping + # settings](https://support.google.com/merchants/answer/6069284). The + # `ShippingSettings` resource lets you retrieve and update the shipping + # settings of your advanced account and all its associated sub-accounts. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the shipping settings. + # Format: `accounts/{account}/shippingSettings`. For example, + # `accounts/123456/shippingSettings`. + # @!attribute [rw] services + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service>] + # Optional. The target account's list of services. + # @!attribute [rw] warehouses + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Warehouse>] + # Optional. A list of warehouses which can be referred to in `services`. + # @!attribute [rw] etag + # @return [::String] + # Required. This field helps avoid async issues. It ensures that the shipping + # setting + # data doesn't change between the `get` call and the `insert` call. The user + # should follow these steps: + # + # 1. Set the etag field as an empty string for the initial shipping setting + # creation. + # + # 2. After the initial creation, call the `get` method to obtain an etag and + # the current shipping setting data before calling `insert`. + # + # 3. Modify the shipping setting information. + # + # 4. Call the `insert` method with the shipping setting information + # and the etag obtained in step 2. + # + # 5. If the shipping setting data changes between step 2 and step 4, the + # insert request will fail because the etag changes every time the shipping + # setting data changes. In this case, the user should repeat steps 2-4 with + # the new etag. + class ShippingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping service. + # @!attribute [rw] service_name + # @return [::String] + # Required. Free-form name of the service. Must be unique within target + # account. + # @!attribute [rw] active + # @return [::Boolean] + # Required. A boolean exposing the active status of the shipping service. + # @!attribute [rw] delivery_countries + # @return [::Array<::String>] + # Required. The CLDR territory code of the countries to which the service + # applies. + # @!attribute [rw] currency_code + # @return [::String] + # Required. The CLDR code of the currency to which this service applies. Must + # match that of the prices in rate groups. + # @!attribute [rw] delivery_time + # @return [::Google::Shopping::Merchant::Accounts::V1::DeliveryTime] + # Required. Time spent in various aspects from order to the delivery of the + # product. + # @!attribute [rw] rate_groups + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::RateGroup>] + # Optional. Shipping rate group definitions. Only the last one is allowed to + # have an empty `applicable_shipping_labels`, which means "everything else". + # The other `applicable_shipping_labels` must not overlap. + # @!attribute [rw] shipment_type + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::ShipmentType] + # Optional. Type of locations this service ships orders to. + # @!attribute [rw] minimum_order_value + # @return [::Google::Shopping::Type::Price] + # Optional. Minimum order value for this service. If set, indicates that + # customers will have to spend at least this amount. All prices within a + # service must have the same currency. Cannot be set together with + # `minimum_order_value_table`. + # @!attribute [rw] minimum_order_value_table + # @return [::Google::Shopping::Merchant::Accounts::V1::MinimumOrderValueTable] + # Optional. Table of per store minimum order values for the pickup + # fulfillment type. Cannot be set together with `minimum_order_value`. + # @!attribute [rw] store_config + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig] + # A list of stores your products are delivered from. + # This is only valid for the local delivery shipment type. + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service::LoyaltyProgram>] + # Optional. Loyalty programs that this shipping service is limited to. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of stores your products are delivered from. This is only valid for + # the local delivery shipment type. + # @!attribute [rw] store_service_type + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::StoreServiceType] + # Indicates whether all stores, or selected stores, listed by this + # business provide local delivery. + # @!attribute [rw] store_codes + # @return [::Array<::String>] + # Optional. A list of store codes that provide local delivery. + # If empty, then `all_stores` must be true. + # @!attribute [rw] cutoff_config + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::CutoffConfig] + # Configs related to local delivery ends for the day. + # @!attribute [rw] service_radius + # @return [::Google::Shopping::Merchant::Accounts::V1::Distance] + # Maximum delivery radius. + # This is only required for the local delivery shipment type. + class StoreConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configs related to local delivery ends for the day. + # @!attribute [rw] local_cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1::Service::StoreConfig::CutoffConfig::LocalCutoffTime] + # Time that local delivery ends for the day. + # @!attribute [rw] store_close_offset_hours + # @return [::Integer] + # Only valid with local delivery fulfillment. Represents cutoff time + # as the number of hours before store closing. Mutually exclusive + # with `local_cutoff_time`. + # @!attribute [rw] no_delivery_post_cutoff + # @return [::Boolean] + # Businesses can opt-out of showing n+1 day local delivery when they have + # a shipping service configured to n day local delivery. For example, if + # the shipping service defines same-day delivery, and it's past the + # cut-off, setting this field to `true` results in the calculated + # shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the + # same example, setting this field to `false` results in the calculated + # shipping time being one day. This is only for local delivery. + class CutoffConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Time that local delivery ends for the day. + # @!attribute [rw] hour + # @return [::Integer] + # Hour local delivery orders must be placed by to process the same + # day. + # @!attribute [rw] minute + # @return [::Integer] + # Minute local delivery orders must be placed by to process the same + # day. + class LocalCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Indicates whether all stores, or selected stores, listed by the + # business provide local delivery. + module StoreServiceType + # Did not specify store service type. + STORE_SERVICE_TYPE_UNSPECIFIED = 0 + + # Indicates whether all stores, current and future, listed by this + # business provide local delivery. + ALL_STORES = 1 + + # Indicates that only the stores listed in `store_codes` are eligible + # for local delivery. + SELECTED_STORES = 2 + end + end + + # [Loyalty program](https://support.google.com/merchants/answer/12922446) + # provided by a business. + # @!attribute [rw] program_label + # @return [::String] + # This is the loyalty program label set in your loyalty program settings in + # Merchant Center. This sub-attribute allows Google to map your loyalty + # program to eligible offers. + # @!attribute [rw] loyalty_program_tiers + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Service::LoyaltyProgram::LoyaltyProgramTiers>] + # Optional. Loyalty program tier of this shipping service. + class LoyaltyProgram + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Subset of a business's loyalty program. + # @!attribute [rw] tier_label + # @return [::String] + # The tier label [tier_label] sub-attribute differentiates offer level + # benefits between each tier. This value is also set in your program + # settings in Merchant Center, and is required for data source changes + # even if your loyalty program only has 1 tier. + class LoyaltyProgramTiers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Shipment type of shipping service. + module ShipmentType + # This service did not specify shipment type. + SHIPMENT_TYPE_UNSPECIFIED = 0 + + # This service ships orders to an address chosen by the customer. + DELIVERY = 1 + + # This service ships orders to an address chosen by the customer. + # The order is shipped from a local store near by. + LOCAL_DELIVERY = 2 + + # This service ships orders to an address chosen by the customer. + # The order is shipped from a collection point. + COLLECTION_POINT = 3 + end + end + + # Maximum delivery radius. + # This is only required for the local delivery shipment type. + # @!attribute [rw] value + # @return [::Integer] + # Integer value of distance. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Accounts::V1::Distance::Unit] + # Unit can differ based on country, it is parameterized to include miles + # and kilometers. + class Distance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Unit can differ based on country, it is parameterized to include miles + # and kilometers. + module Unit + # Unit unspecified + UNIT_UNSPECIFIED = 0 + + # Unit in miles + MILES = 1 + + # Unit in kilometers + KILOMETERS = 2 + end + end + + # A fulfillment warehouse, which stores and handles inventory. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the warehouse. Must be unique within account. + # @!attribute [rw] shipping_address + # @return [::Google::Shopping::Merchant::Accounts::V1::Address] + # Required. Shipping address of the warehouse. + # @!attribute [rw] cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1::WarehouseCutoffTime] + # Required. The latest time of day that an order can be accepted and begin + # processing. Later orders will be processed in the next day. The time is + # based on the warehouse postal code. + # @!attribute [rw] handling_days + # @return [::Integer] + # Required. The number of days it takes for this warehouse to pack up and + # ship an item. This is on the warehouse level, but can be overridden on the + # offer level based on the attributes of an item. + # @!attribute [rw] business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] + # Business days of the warehouse. + # If not set, will be Monday to Friday by default. + class Warehouse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The latest time of day that an order can be accepted and begin processing. + # Later orders will be processed in the next day. The time is based on the + # warehouse postal code. + # @!attribute [rw] hour + # @return [::Integer] + # Required. Hour of the cutoff time until which an order has to be placed to + # be processed in the same day by the warehouse. Hour is based on the + # timezone of warehouse. + # @!attribute [rw] minute + # @return [::Integer] + # Required. Minute of the cutoff time until which an order has to be placed + # to be processed in the same day by the warehouse. Minute is based on the + # timezone of warehouse. + class WarehouseCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping address of the warehouse. + # @!attribute [rw] street_address + # @return [::String] + # Street-level part of the address. For example: `111w 31st Street`. + # @!attribute [rw] city + # @return [::String] + # Required. City, town or commune. May also include dependent localities or + # sublocalities (For example neighborhoods or suburbs). + # @!attribute [rw] administrative_area + # @return [::String] + # Required. Top-level administrative subdivision of the country. For example, + # a state like California ("CA") or a province like Quebec ("QC"). + # @!attribute [rw] postal_code + # @return [::String] + # Required. Postal code or ZIP (For example "94043"). + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR country + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # (For example "US"). + class Address + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Time spent in various aspects from order to the delivery of the product. + # @!attribute [rw] min_transit_days + # @return [::Integer] + # Minimum number of business days that is spent in transit. 0 means same + # day delivery, 1 means next day delivery. + # Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` must be set, but not both. + # @!attribute [rw] max_transit_days + # @return [::Integer] + # Maximum number of business days that is spent in transit. 0 means same + # day delivery, 1 means next day delivery. Must be greater than or equal + # to `min_transit_days`. + # @!attribute [rw] cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1::CutoffTime] + # Business days cutoff time definition. + # If not configured the cutoff time will be defaulted to 8AM PST. + # @!attribute [rw] min_handling_days + # @return [::Integer] + # Minimum number of business days spent before an order is shipped. + # 0 means same day shipped, 1 means next day shipped. + # 'min_handling_days' and 'max_handling_days' should be either set or not set + # at the same time. + # @!attribute [rw] max_handling_days + # @return [::Integer] + # Maximum number of business days spent before an order is shipped. + # 0 means same day shipped, 1 means next day shipped. + # Must be greater than or equal to `min_handling_days`. + # 'min_handling_days' and 'max_handling_days' should be either set or not set + # at the same time. + # @!attribute [rw] transit_time_table + # @return [::Google::Shopping::Merchant::Accounts::V1::TransitTable] + # Transit time table, number of business days spent in transit based on row + # and column dimensions. Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` can be set, but not both. + # @!attribute [rw] handling_business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] + # The business days during which orders can be handled. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] transit_business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig] + # The business days during which orders can be in-transit. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] warehouse_based_delivery_times + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::WarehouseBasedDeliveryTime>] + # Optional. Indicates that the delivery time should be calculated per + # warehouse (shipping origin location) based on the settings of the selected + # carrier. When set, no other transit time related field in [delivery + # time][google.shopping.merchant.accounts.v1.DeliveryTime] should + # be set. + class DeliveryTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Business days cutoff time definition. + # @!attribute [rw] hour + # @return [::Integer] + # Required. Hour of the cutoff time until which an order has to be placed to + # be processed in the same day. + # @!attribute [rw] minute + # @return [::Integer] + # Required. Minute of the cutoff time until which an order has to be placed + # to be processed in the same day. + # @!attribute [rw] time_zone + # @return [::String] + # Required. [Timezone + # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) + # For example "Europe/Zurich". + class CutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Business days of the warehouse. + # @!attribute [rw] business_days + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::BusinessDayConfig::Weekday>] + # Required. Regular business days. + # May not be empty. + class BusinessDayConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Weekday + WEEKDAY_UNSPECIFIED = 0 + + MONDAY = 1 + + TUESDAY = 2 + + WEDNESDAY = 3 + + THURSDAY = 4 + + FRIDAY = 5 + + SATURDAY = 6 + + SUNDAY = 7 + end + end + + # Indicates that the delivery time should be calculated per warehouse + # (shipping origin location) based on the settings of the selected carrier. + # When set, no other transit time related field in `delivery_time` should be + # set. + # @!attribute [rw] carrier + # @return [::String] + # Required. Carrier, such as `"UPS"` or `"Fedex"`. + # [supported + # carriers](https://support.google.com/merchants/answer/7050921#zippy=%2Ccarrier-rates-au-de-uk-and-us-only) + # @!attribute [rw] carrier_service + # @return [::String] + # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of + # the service must be in the eddSupportedServices list. + # @!attribute [rw] warehouse + # @return [::String] + # Required. Warehouse name. This should match + # {::Google::Shopping::Merchant::Accounts::V1::Warehouse warehouse}. + class WarehouseBasedDeliveryTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping rate group definitions. Only the last one is allowed to have an + # empty `applicable_shipping_labels`, which means + # "everything else". The other `applicable_shipping_labels` must + # not overlap. + # @!attribute [rw] applicable_shipping_labels + # @return [::Array<::String>] + # Required. A list of [shipping + # labels](https://support.google.com/merchants/answer/6324504) defining the + # products to which this rate group applies to. This is a disjunction: only + # one of the labels has to match for the rate group to apply. May only be + # empty for the last rate group of a service. + # @!attribute [rw] single_value + # @return [::Google::Shopping::Merchant::Accounts::V1::Value] + # The value of the rate group (For example flat rate $10). Can only be set + # if `main_table` and `subtables` are not set. + # @!attribute [rw] main_table + # @return [::Google::Shopping::Merchant::Accounts::V1::Table] + # A table defining the rate group, when `single_value` is not + # expressive enough. Can only be set if `single_value` is not + # set. + # @!attribute [rw] subtables + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Table>] + # Optional. A list of subtables referred to by `main_table`. Can only + # be set if `main_table` is set. + # @!attribute [rw] carrier_rates + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CarrierRate>] + # Optional. A list of carrier rates that can be referred to by + # `main_table` or `single_value`. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the rate group. + # If set has to be unique within shipping service. + class RateGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A table defining the rate group, when `single_value` is not + # expressive enough. + # @!attribute [rw] name + # @return [::String] + # Name of the table. Required for subtables, ignored for the main table. + # @!attribute [rw] row_headers + # @return [::Google::Shopping::Merchant::Accounts::V1::Headers] + # Required. Headers of the table's rows. + # @!attribute [rw] column_headers + # @return [::Google::Shopping::Merchant::Accounts::V1::Headers] + # Headers of the table's columns. Optional: if not set then the table has + # only one dimension. + # @!attribute [rw] rows + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Row>] + # Required. The list of rows that constitute the table. Must have the same + # length as `row_headers`. + class Table + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Transit time table, number of business days spent in transit based on row + # and column dimensions. Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` can be set, but not both. + # @!attribute [rw] postal_code_group_names + # @return [::Array<::String>] + # Required. A list of region names + # {::Google::Shopping::Merchant::Accounts::V1::Region#name Region.name} . The last + # value can be + # `"all other locations"`. Example: + # `["zone 1", "zone 2", "all other locations"]`. The referred + # postal code groups must match the delivery country of the service. + # @!attribute [rw] transit_time_labels + # @return [::Array<::String>] + # Required. A list of transit time labels. The last value can be + # `"all other labels"`. Example: + # `["food", "electronics", "all other labels"]`. + # @!attribute [rw] rows + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::TransitTable::TransitTimeRow>] + # Required. If there's only one dimension set of `postal_code_group_names` or + # `transit_time_labels`, there are multiple rows each with one value + # for that dimension. If there are two dimensions, each row corresponds to a + # `postal_code_group_names`, and columns (values) to a + # `transit_time_labels`. + class TransitTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # If there's only one dimension set of `postal_code_group_names` or + # `transit_time_labels`, there are multiple rows each with one value + # for that dimension. If there are two dimensions, each row corresponds to a + # `postal_code_group_names`, and columns (values) to a + # `transit_time_labels`. + # @!attribute [rw] values + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::TransitTable::TransitTimeRow::TransitTimeValue>] + # Required. Transit time range (min-max) in business days. + class TransitTimeRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Transit time range (min-max) in business days. + # @!attribute [rw] min_transit_days + # @return [::Integer] + # Minimum transit time range in business days. 0 means same + # day delivery, 1 means next day delivery. + # @!attribute [rw] max_transit_days + # @return [::Integer] + # Must be greater than or equal to `min_transit_days`. + class TransitTimeValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Table of per store minimum order values for the pickup fulfillment type. + # @!attribute [rw] store_code_set_with_movs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::MinimumOrderValueTable::StoreCodeSetWithMov>] + # Required. A list of store code sets sharing the same minimum order value + # (MOV). At least two sets are required and the last one must be empty, which + # signifies 'MOV for all other stores'. Each store code can only appear once + # across all the sets. All prices within a service must have the same + # currency. + class MinimumOrderValueTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of store code sets sharing the same minimum order value. At least + # two sets are required and the last one must be empty, which signifies + # 'MOV for all other stores'. + # Each store code can only appear once across all the sets. + # All prices within a service must have the same currency. + # @!attribute [rw] store_codes + # @return [::Array<::String>] + # Optional. A list of unique store codes or empty for the catch all. + # @!attribute [rw] value + # @return [::Google::Shopping::Type::Price] + # The minimum order value for the given stores. + class StoreCodeSetWithMov + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A non-empty list of row or column headers for a table. + # Exactly one of `prices`, `weights`, + # `num_items`, `postal_code_group_names`, or + # `location` must be set. + # @!attribute [rw] prices + # @return [::Array<::Google::Shopping::Type::Price>] + # Required. A list of inclusive order price upper bounds. The last price's + # value can be infinity by setting price amount_micros = -1. For example + # `[{"amount_micros": 10000000, "currency_code": "USD"}, + # \\{"amount_micros": 500000000, "currency_code": "USD"}, + # \\{"amount_micros": -1, "currency_code": "USD"}]` represents the headers + # "<= $10", "<= $500", and "> $500". All prices within a service must have + # the same currency. Must be non-empty. Must be positive except -1. Can only + # be set if all other fields are not set. + # @!attribute [rw] weights + # @return [::Array<::Google::Shopping::Type::Weight>] + # Required. A list of inclusive order weight upper bounds. The last weight's + # value can be infinity by setting price amount_micros = -1. For example + # `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, + # "unit": "kg"}, + # \\{"amount_micros": -1, "unit": "kg"}]` represents the headers + # "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have + # the same unit. Must be non-empty. Must be positive except -1. Can only be + # set if all other fields are not set. + # @!attribute [rw] number_of_items + # @return [::Array<::String>] + # Required. A list of inclusive number of items upper bounds. The last value + # can be + # `"infinity"`. For example + # `["10", "50", "infinity"]` represents the headers + # "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can + # only be set if all other fields are not set. + # @!attribute [rw] postal_code_group_names + # @return [::Array<::String>] + # Required. A list of postal group names. The last value can be + # `"all other locations"`. Example: + # `["zone 1", "zone 2", "all other locations"]`. The referred + # postal code groups must match the delivery country of the service. Must + # be non-empty. Can only be set if all other fields are not set. + # @!attribute [rw] locations + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::LocationIdSet>] + # Required. A list of location ID sets. Must be non-empty. Can only be set if + # all other fields are not set. + class Headers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of location ID sets. Must be non-empty. Can only be set if all + # other fields are not set. + # @!attribute [rw] location_ids + # @return [::Array<::String>] + # Required. A non-empty list of + # [location + # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # They must all be of the same location type (For + # example, state). + class LocationIdSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Include a list of cells. + # @!attribute [rw] cells + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Value>] + # Required. The list of cells that constitute the row. Must have the same + # length as `columnHeaders` for two-dimensional tables, a length of 1 for + # one-dimensional tables. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The single value of a rate group or the value of a rate group table's cell. + # Exactly one of `no_shipping`, `flat_rate`, + # `price_percentage`, `carrier_rateName`, + # `subtable_name` must be set. + # @!attribute [rw] no_shipping + # @return [::Boolean] + # If true, then the product can't be shipped. Must be true when set, can only + # be set if all other fields are not set. + # @!attribute [rw] flat_rate + # @return [::Google::Shopping::Type::Price] + # A flat rate. Can only be set if all other fields are not set. + # @!attribute [rw] price_percentage + # @return [::String] + # A percentage of the price represented as a number in decimal notation + # (For example, `"5.4"`). Can only be set if all other fields are not + # set. + # @!attribute [rw] carrier_rate + # @return [::String] + # The name of a carrier rate referring to a carrier rate defined in the + # same rate group. Can only be set if all other fields are not set. + # @!attribute [rw] subtable + # @return [::String] + # The name of a subtable. Can only be set in table cells (For example, not + # for single values), and only if all other fields are not set. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of carrier rates that can be referred to by + # `main_table` or `single_value`. + # Supported carrier services are defined in + # https://support.google.com/merchants/answer/12577710?ref_topic=12570808&sjid=10662598224319463032-NC#zippy=%2Cdelivery-cost-rate-type%2Ccarrier-rate-au-de-uk-and-us-only. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the carrier rate. Must be unique per rate group. + # @!attribute [rw] carrier + # @return [::String] + # Required. Carrier service, such as `"UPS"` or `"Fedex"`. + # @!attribute [rw] carrier_service + # @return [::String] + # Required. Carrier service, such as `"ground"` or `"2 days"`. + # @!attribute [rw] origin_postal_code + # @return [::String] + # Required. Shipping origin for this carrier rate. + # @!attribute [rw] percentage_adjustment + # @return [::String] + # Optional. Multiplicative shipping rate modifier as a number in decimal + # notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, + # `"-3"` decreases the rate by 3%. + # @!attribute [rw] flat_adjustment + # @return [::Google::Shopping::Type::Price] + # Optional. Additive shipping rate modifier. Can be negative. For example + # `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, + # `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the + # rate. + class CarrierRate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetShippingSetting` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsettings` + class GetShippingSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertShippingSetting` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account for which this shipping setting will be inserted. If + # you are using an advanced account, you must specify the unique identifier + # of the sub-account for which you want to insert the shipping setting. + # Format: `accounts/{ACCOUNT_ID}` + # @!attribute [rw] shipping_setting + # @return [::Google::Shopping::Merchant::Accounts::V1::ShippingSettings] + # Required. The new version of the account. + class InsertShippingSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb new file mode 100644 index 000000000000..3a9930042e74 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservice.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The `TermsOfService` message represents a specific version of the terms of + # service that merchants must accept to access certain features or services. + # For more information, see [Terms of + # Service](https://support.google.com/merchants/answer/160173). + # + # This message is important for the onboarding process, ensuring that merchants + # agree to the necessary legal agreements for using the service. Merchants can + # retrieve the latest terms of service for a given `kind` and `region` through + # `RetrieveLatestTermsOfService`, and accept them as required through + # `AcceptTermsOfService`. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @!attribute [rw] region_code + # @return [::String] + # Region code as defined by [CLDR](https://cldr.unicode.org/). This is either + # a country where the ToS applies specifically to that country or `001` when + # the same `TermsOfService` can be signed in any country. However note that + # when signing a ToS that applies globally we still expect that a specific + # country is provided (this should be merchant business country or program + # country of participation). + # @!attribute [rw] kind + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # The Kind this terms of service version applies to. + # @!attribute [rw] file_uri + # @return [::String] + # URI for terms of service file that needs to be displayed to signing users. + # @!attribute [rw] external + # @return [::Boolean] + # Whether this terms of service version is external. External terms of + # service versions can only be agreed through external processes and not + # directly by the merchant through UI or API. + class TermsOfService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetTermsOfService` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + class GetTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RetrieveLatestTermsOfService` method. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @!attribute [rw] kind + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + class RetrieveLatestTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `AcceptTermsOfService` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @!attribute [rw] account + # @return [::String] + # Required. The account for which to accept the ToS. + # Format: `accounts/{account}` + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + class AcceptTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `AcceptTermsOfService` method. + # @!attribute [rw] terms_of_service_agreement_state + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState] + # The agreement state after accepting the ToS. + class AcceptTermsOfServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb new file mode 100644 index 000000000000..798c69a46bf7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofserviceagreementstate.rb @@ -0,0 +1,136 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # This resource represents the agreement state for a given account and terms of + # service kind. + # The state is as follows: + # + # * If the business has accepted a terms of service, + # {::Google::Shopping::Merchant::Accounts::V1::Accepted `accepted`} + # will be populated, otherwise it will be empty + # * If the business must sign a terms of service, + # {::Google::Shopping::Merchant::Accounts::V1::Required `required`} + # will be populated, otherwise it will be empty. + # + # Note that both `required` and `accepted` can be present. In this case the + # `accepted` terms of services will have an expiration date set in the + # {::Google::Shopping::Merchant::Accounts::V1::Accepted#valid_until `valid_until`} + # field. The `required` terms of services need to be accepted before + # `valid_until` in order for the account to continue having a valid agreement. + # When accepting new terms of services we expect third-party providers to + # display the text associated with the given terms of service agreement (the + # url to the file containing the text is added in the Required message below as + # {::Google::Shopping::Merchant::Accounts::V1::Required#tos_file_uri `tos_file_uri`}). + # The actual acceptance of the terms of service is done by calling accept on + # the + # {::Google::Shopping::Merchant::Accounts::V1::Accepted#terms_of_service `TermsOfService`} + # resource. + # `valid_until` field. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` + # The identifier format is: + # `{[TermsOfServiceKind][google.shopping.merchant.accounts.v1.TermsOfServiceKind]}-{country}` + # For example, an identifier could be: `MERCHANT_CENTER-EU` or + # `MERCHANT_CENTER-US`. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by https://cldr.unicode.org/. This is the + # country the current state applies to. + # @!attribute [rw] terms_of_service_kind + # @return [::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceKind] + # Required. Terms of Service kind associated with the particular version. + # @!attribute [rw] accepted + # @return [::Google::Shopping::Merchant::Accounts::V1::Accepted] + # Optional. The accepted terms of service of this kind and for the associated + # region_code + # @!attribute [rw] required + # @return [::Google::Shopping::Merchant::Accounts::V1::Required] + # Optional. The required terms of service + class TermsOfServiceAgreementState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the [accepted terms of + # service](https://developers.google.com/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_center_terms_of_service). + # @!attribute [rw] terms_of_service + # @return [::String] + # Required. The accepted + # {::Google::Shopping::Merchant::Accounts::V1::TermsOfService termsOfService}. + # @!attribute [rw] accepted_by + # @return [::String] + # Required. The account where the acceptance was recorded. This can be the + # account itself or, in the case of subaccounts, the advanced account. + # @!attribute [rw] valid_until + # @return [::Google::Type::Date] + # Optional. When set, it states that the accepted `TermsOfService` is only + # valid until the end of this date (in UTC). A new one must be accepted + # before then. The information of the required `TermsOfService` is found in + # the `Required` message. + class Accepted + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the terms of service which are required to be accepted. + # @!attribute [rw] terms_of_service + # @return [::String] + # Required. The `TermsOfService` that need to be accepted. + # @!attribute [rw] tos_file_uri + # @return [::String] + # Required. Full URL to the terms of service file. This field is the same as + # `TermsOfService.file_uri`, it is added here for convenience only. + class Required + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetTermsOfServiceAgreementState` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + class GetTermsOfServiceAgreementStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RetrieveForApplicationTermsOfServiceAgreementState` + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + class RetrieveForApplicationTermsOfServiceAgreementStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb new file mode 100644 index 000000000000..116cf626f876 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/termsofservicekind.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The TermsOfService Kind. + module TermsOfServiceKind + # Default value. This value is unused. + TERMS_OF_SERVICE_KIND_UNSPECIFIED = 0 + + # Merchant Center application. + MERCHANT_CENTER = 1 + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb new file mode 100644 index 000000000000..f7dfa9160e62 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/merchant/accounts/v1/user.rb @@ -0,0 +1,164 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Accounts + module V1 + # The `User` message represents a user associated with a Merchant Center + # account. It is used to manage user permissions and access rights within the + # account. For more information, see [Frequently asked questions about people + # and access levels](//support.google.com/merchants/answer/12160472). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the user. + # Format: `accounts/{account}/user/{email}` + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1::User::State] + # Output only. The state of the user. + # @!attribute [rw] access_rights + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::AccessRight>] + # Required. The [access + # rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) + # the user has. + class User + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states of a user. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The user is pending confirmation. In this state, the user first needs to + # accept the invitation before performing other actions. + PENDING = 1 + + # The user is verified. + VERIFIED = 2 + end + end + + # Request message for the `GetUser` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + class GetUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateUser` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @!attribute [rw] user_id + # @return [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # Optional. The user to create. + class CreateUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteUser` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + class DeleteUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateUser` method. + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1::User] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `access_rights` + class UpdateUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListUsers` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + class ListUsersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListUsers` method. + # @!attribute [rw] users + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1::User>] + # The users from the specified account. + # @!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 ListUsersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..48f5db726fe4 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..3b045eb0b7d8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/type/datetime.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year is 0, the DateTime is considered not to have a specific year. month + # and day must have valid, non-zero values. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Required. Month of year. Must be from 1 to 12. + # @!attribute [rw] day + # @return [::Integer] + # Required. Day of month. Must be from 1 to 31 and valid for the year and + # month. + # @!attribute [rw] hours + # @return [::Integer] + # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API + # may choose to allow the value "24:00:00" for scenarios like business + # closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Required. Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An + # API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Required. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone, e.g. "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number, e.g. "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb new file mode 100644 index 000000000000..37f521bb656e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/type/phone_number.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # An object representing a phone number, suitable as an API wire format. + # + # This representation: + # + # - should not be used for locale-specific formatting of a phone number, such + # as "+1 (650) 253-0000 ext. 123" + # + # - is not designed for efficient storage + # - may not be suitable for dialing - specialized libraries (see references) + # should be used to parse the number for that purpose + # + # To do something meaningful with this number, such as format it for various + # use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. + # + # For instance, in Java this would be: + # + # com.google.type.PhoneNumber wireProto = + # com.google.type.PhoneNumber.newBuilder().build(); + # com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = + # PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); + # if (!wireProto.getExtension().isEmpty()) { + # phoneNumber.setExtension(wireProto.getExtension()); + # } + # + # Reference(s): + # - https://github.com/google/libphonenumber + # @!attribute [rw] e164_number + # @return [::String] + # The phone number, represented as a leading plus sign ('+'), followed by a + # phone number that uses a relaxed ITU E.164 format consisting of the + # country calling code (1 to 3 digits) and the subscriber number, with no + # additional spaces or formatting, e.g.: + # - correct: "+15552220123" + # - incorrect: "+1 (555) 222-01234 x123". + # + # The ITU E.164 format limits the latter to 12 digits, but in practice not + # all countries respect that, so we relax that restriction here. + # National-only numbers are not allowed. + # + # References: + # - https://www.itu.int/rec/T-REC-E.164-201011-I + # - https://en.wikipedia.org/wiki/E.164. + # - https://en.wikipedia.org/wiki/List_of_country_calling_codes + # + # Note: The following fields are mutually exclusive: `e164_number`, `short_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] short_code + # @return [::Google::Type::PhoneNumber::ShortCode] + # A short code. + # + # Reference(s): + # - https://en.wikipedia.org/wiki/Short_code + # + # Note: The following fields are mutually exclusive: `short_code`, `e164_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] extension + # @return [::String] + # The phone number's extension. The extension is not standardized in ITU + # recommendations, except for being defined as a series of numbers with a + # maximum length of 40 digits. Other than digits, some other dialing + # characters such as ',' (indicating a wait) or '#' may be stored here. + # + # Note that no regions currently use extensions with short codes, so this + # field is normally only set in conjunction with an E.164 number. It is held + # separately from the E.164 number to allow for short code extensions in the + # future. + class PhoneNumber + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An object representing a short code, which is a phone number that is + # typically much shorter than regular phone numbers and can be used to + # address messages in MMS and SMS systems, as well as for abbreviated dialing + # (e.g. "Text 611 to see how many minutes you have remaining on your plan."). + # + # Short codes are restricted to a region and are not internationally + # dialable, which means the same short code can exist in different regions, + # with different usage and pricing, even if those regions share the same + # country calling code (e.g. US and CA). + # @!attribute [rw] region_code + # @return [::String] + # Required. The BCP-47 region code of the location where calls to this + # short code can be made, such as "US" and "BB". + # + # Reference(s): + # - http://www.unicode.org/reports/tr35/#unicode_region_subtag + # @!attribute [rw] number + # @return [::String] + # Required. The short code digits, without a leading plus ('+') or country + # calling code, e.g. "611". + class ShortCode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb b/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb new file mode 100644 index 000000000000..dfe0d90cc9e8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/proto_docs/google/type/postal_address.rb @@ -0,0 +1,135 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a postal address, e.g. for postal delivery or payments addresses. + # Given a postal address, a postal service can deliver items to a premise, P.O. + # Box or similar. + # It is not intended to model geographical locations (roads, towns, + # mountains). + # + # In typical usage an address would be created via user input or from importing + # existing data, depending on the type of process. + # + # Advice on address input / editing: + # - Use an i18n-ready address widget such as + # https://github.com/google/libaddressinput) + # - Users should not be presented with UI elements for input or editing of + # fields outside countries where that field is used. + # + # For more guidance on how to use this schema, please see: + # https://support.google.com/business/answer/6397478 + # @!attribute [rw] revision + # @return [::Integer] + # The schema revision of the `PostalAddress`. This must be set to 0, which is + # the latest revision. + # + # All new revisions **must** be backward compatible with old revisions. + # @!attribute [rw] region_code + # @return [::String] + # Required. CLDR region code of the country/region of the address. This + # is never inferred and it is up to the user to ensure the value is + # correct. See http://cldr.unicode.org/ and + # http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + # for details. Example: "CH" for Switzerland. + # @!attribute [rw] language_code + # @return [::String] + # Optional. BCP-47 language code of the contents of this address (if + # known). This is often the UI language of the input form or is expected + # to match one of the languages used in the address' country/region, or their + # transliterated equivalents. + # This can affect formatting in certain countries, but is not critical + # to the correctness of the data and will never affect any validation or + # other non-formatting related operations. + # + # If this value is not known, it should be omitted (rather than specifying a + # possibly incorrect default). + # + # Examples: "zh-Hant", "ja", "ja-Latn", "en". + # @!attribute [rw] postal_code + # @return [::String] + # Optional. Postal code of the address. Not all countries use or require + # postal codes to be present, but where they are used, they may trigger + # additional validation with other parts of the address (e.g. state/zip + # validation in the U.S.A.). + # @!attribute [rw] sorting_code + # @return [::String] + # Optional. Additional, country-specific, sorting code. This is not used + # in most regions. Where it is used, the value is either a string like + # "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number + # alone, representing the "sector code" (Jamaica), "delivery area indicator" + # (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). + # @!attribute [rw] administrative_area + # @return [::String] + # Optional. Highest administrative subdivision which is used for postal + # addresses of a country or region. + # For example, this can be a state, a province, an oblast, or a prefecture. + # Specifically, for Spain this is the province and not the autonomous + # community (e.g. "Barcelona" and not "Catalonia"). + # Many countries don't use an administrative area in postal addresses. E.g. + # in Switzerland this should be left unpopulated. + # @!attribute [rw] locality + # @return [::String] + # Optional. Generally refers to the city/town portion of the address. + # Examples: US city, IT comune, UK post town. + # In regions of the world where localities are not well defined or do not fit + # into this structure well, leave locality empty and use address_lines. + # @!attribute [rw] sublocality + # @return [::String] + # Optional. Sublocality of the address. + # For example, this can be neighborhoods, boroughs, districts. + # @!attribute [rw] address_lines + # @return [::Array<::String>] + # Unstructured address lines describing the lower levels of an address. + # + # Because values in address_lines do not have type information and may + # sometimes contain multiple values in a single field (e.g. + # "Austin, TX"), it is important that the line order is clear. The order of + # address lines should be "envelope order" for the country/region of the + # address. In places where this can vary (e.g. Japan), address_language is + # used to make it explicit (e.g. "ja" for large-to-small ordering and + # "ja-Latn" or "en" for small-to-large). This way, the most specific line of + # an address can be selected based on the language. + # + # The minimum permitted structural representation of an address consists + # of a region_code with all remaining information placed in the + # address_lines. It would be possible to format such an address very + # approximately without geocoding, but no semantic reasoning could be + # made about any of the address components until it was at least + # partially resolved. + # + # Creating an address only containing a region_code and address_lines, and + # then geocoding is the recommended way to handle completely unstructured + # addresses (as opposed to guessing which parts of the address should be + # localities or administrative areas). + # @!attribute [rw] recipients + # @return [::Array<::String>] + # Optional. The recipient at the address. + # This field may, under certain circumstances, contain multiline information. + # For example, it might contain "care of" information. + # @!attribute [rw] organization + # @return [::String] + # Optional. The name of the organization at the address. + class PostalAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-accounts-v1/snippets/Gemfile b/google-shopping-merchant-accounts-v1/snippets/Gemfile new file mode 100644 index 000000000000..796ee91aacc8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-accounts-v1", path: "../" +else + gem "google-shopping-merchant-accounts-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb b/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb new file mode 100644 index 000000000000..03261bf900b5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_issue_service/list_account_issues.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_account_issues call in the AccountIssueService 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::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues. +# +def list_account_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new + + # Call the list_account_issues method. + result = client.list_account_issues 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::Shopping::Merchant::Accounts::V1::AccountIssue. + p item + end +end +# [END merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb b/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb new file mode 100644 index 000000000000..2483680988e2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/get_account_relationship.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_account_relationship call in the AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship. +# +def get_account_relationship + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new + + # Call the get_account_relationship method. + result = client.get_account_relationship request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + p result +end +# [END merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb b/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb new file mode 100644 index 000000000000..7e6bf4ea604e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/list_account_relationships.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_account_relationships call in the AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships. +# +def list_account_relationships + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new + + # Call the list_account_relationships method. + result = client.list_account_relationships 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::Shopping::Merchant::Accounts::V1::AccountRelationship. + p item + end +end +# [END merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb b/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb new file mode 100644 index 000000000000..55bf9311e381 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_relationships_service/update_account_relationship.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_account_relationship call in the AccountRelationshipsService 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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship. +# +def update_account_relationship + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new + + # Call the update_account_relationship method. + result = client.update_account_relationship request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountRelationship. + p result +end +# [END merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb b/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb new file mode 100644 index 000000000000..2b4bc8509a37 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_services_service/approve_account_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the approve_account_service call in the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service. +# +def approve_account_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new + + # Call the approve_account_service method. + result = client.approve_account_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + p result +end +# [END merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb b/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb new file mode 100644 index 000000000000..a3bab0b21d58 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_services_service/get_account_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountServicesService_GetAccountService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_account_service call in the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service. +# +def get_account_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new + + # Call the get_account_service method. + result = client.get_account_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + p result +end +# [END merchantapi_v1_generated_AccountServicesService_GetAccountService_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb b/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb new file mode 100644 index 000000000000..46955fb593ff --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_services_service/list_account_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_account_services call in the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services. +# +def list_account_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new + + # Call the list_account_services method. + result = client.list_account_services 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::Shopping::Merchant::Accounts::V1::AccountService. + p item + end +end +# [END merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb b/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb new file mode 100644 index 000000000000..f77511d5769e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_services_service/propose_account_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the propose_account_service call in the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service. +# +def propose_account_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new + + # Call the propose_account_service method. + result = client.propose_account_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AccountService. + p result +end +# [END merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb b/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb new file mode 100644 index 000000000000..847b8c8eb474 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/account_services_service/reject_account_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the reject_account_service call in the AccountServicesService 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::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service. +# +def reject_account_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new + + # Call the reject_account_service method. + result = client.reject_account_service request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb b/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb new file mode 100644 index 000000000000..8ec515bc43f2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/accounts_service/create_and_configure_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_and_configure_account call in the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account. +# +def create_and_configure_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new + + # Call the create_and_configure_account method. + result = client.create_and_configure_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + p result +end +# [END merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb b/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb new file mode 100644 index 000000000000..419e078e81e6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/accounts_service/delete_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountsService_DeleteAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_account call in the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account. +# +def delete_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new + + # Call the delete_account method. + result = client.delete_account request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_AccountsService_DeleteAccount_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb b/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb new file mode 100644 index 000000000000..31499a93bdd8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/accounts_service/get_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountsService_GetAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_account call in the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account. +# +def get_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new + + # Call the get_account method. + result = client.get_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + p result +end +# [END merchantapi_v1_generated_AccountsService_GetAccount_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb b/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb new file mode 100644 index 000000000000..56e2ebe7e98a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_accounts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountsService_ListAccounts_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_accounts call in the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts. +# +def list_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new + + # Call the list_accounts method. + result = client.list_accounts 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::Shopping::Merchant::Accounts::V1::Account. + p item + end +end +# [END merchantapi_v1_generated_AccountsService_ListAccounts_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb b/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb new file mode 100644 index 000000000000..be71be5b8ebc --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/accounts_service/list_sub_accounts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountsService_ListSubAccounts_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_sub_accounts call in the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts. +# +def list_sub_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new + + # Call the list_sub_accounts method. + result = client.list_sub_accounts 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::Shopping::Merchant::Accounts::V1::Account. + p item + end +end +# [END merchantapi_v1_generated_AccountsService_ListSubAccounts_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb b/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb new file mode 100644 index 000000000000..269ad98fa8b7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/accounts_service/update_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AccountsService_UpdateAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_account call in the AccountsService 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::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account. +# +def update_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new + + # Call the update_account method. + result = client.update_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Account. + p result +end +# [END merchantapi_v1_generated_AccountsService_UpdateAccount_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb b/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb new file mode 100644 index 000000000000..0aadff78d06f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/get_autofeed_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_autofeed_settings call in the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings. +# +def get_autofeed_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new + + # Call the get_autofeed_settings method. + result = client.get_autofeed_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + p result +end +# [END merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb b/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb new file mode 100644 index 000000000000..dd67ccdf432d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/autofeed_settings_service/update_autofeed_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_autofeed_settings call in the AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings. +# +def update_autofeed_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new + + # Call the update_autofeed_settings method. + result = client.update_autofeed_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutofeedSettings. + p result +end +# [END merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb b/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb new file mode 100644 index 000000000000..eee9e3d25914 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/get_automatic_improvements.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_automatic_improvements call in the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements. +# +def get_automatic_improvements + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new + + # Call the get_automatic_improvements method. + result = client.get_automatic_improvements request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + p result +end +# [END merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb b/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb new file mode 100644 index 000000000000..6103888c4e5b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/automatic_improvements_service/update_automatic_improvements.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_automatic_improvements call in the AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements. +# +def update_automatic_improvements + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new + + # Call the update_automatic_improvements method. + result = client.update_automatic_improvements request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements. + p result +end +# [END merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb b/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb new file mode 100644 index 000000000000..5ca5be4355bd --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/business_identity_service/get_business_identity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_business_identity call in the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity. +# +def get_business_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new + + # Call the get_business_identity method. + result = client.get_business_identity request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + p result +end +# [END merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb b/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb new file mode 100644 index 000000000000..d3317d6dfa8a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/business_identity_service/update_business_identity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_business_identity call in the BusinessIdentityService 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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity. +# +def update_business_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new + + # Call the update_business_identity method. + result = client.update_business_identity request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessIdentity. + p result +end +# [END merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb b/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb new file mode 100644 index 000000000000..dee0a1473694 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/business_info_service/get_business_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_business_info call in the BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info. +# +def get_business_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new + + # Call the get_business_info method. + result = client.get_business_info request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + p result +end +# [END merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb b/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb new file mode 100644 index 000000000000..9cd269cf5c42 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/business_info_service/update_business_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_business_info call in the BusinessInfoService 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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info. +# +def update_business_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new + + # Call the update_business_info method. + result = client.update_business_info request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BusinessInfo. + p result +end +# [END merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb b/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb new file mode 100644 index 000000000000..0e0aad65e6ea --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/create_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_checkout_settings call in the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings. +# +def create_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new + + # Call the create_checkout_settings method. + result = client.create_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + p result +end +# [END merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb b/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb new file mode 100644 index 000000000000..11af98126112 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/delete_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_checkout_settings call in the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings. +# +def delete_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new + + # Call the delete_checkout_settings method. + result = client.delete_checkout_settings request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb b/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb new file mode 100644 index 000000000000..b4f48d576489 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/get_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_checkout_settings call in the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings. +# +def get_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new + + # Call the get_checkout_settings method. + result = client.get_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + p result +end +# [END merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb b/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb new file mode 100644 index 000000000000..cfb080c73309 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/checkout_settings_service/update_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_checkout_settings call in the CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings. +# +def update_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new + + # Call the update_checkout_settings method. + result = client.update_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::CheckoutSettings. + p result +end +# [END merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb b/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb new file mode 100644 index 000000000000..14b5da0c1f72 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/get_developer_registration.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_developer_registration call in the DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration. +# +def get_developer_registration + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new + + # Call the get_developer_registration method. + result = client.get_developer_registration request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + p result +end +# [END merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb b/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb new file mode 100644 index 000000000000..343368c34fab --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/register_gcp.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the register_gcp call in the DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp. +# +def register_gcp + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new + + # Call the register_gcp method. + result = client.register_gcp request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration. + p result +end +# [END merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb b/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb new file mode 100644 index 000000000000..6411886b4d81 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/developer_registration_service/unregister_gcp.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the unregister_gcp call in the DeveloperRegistrationService 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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp. +# +def unregister_gcp + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new + + # Call the unregister_gcp method. + result = client.unregister_gcp request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb b/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb new file mode 100644 index 000000000000..39408acd5d69 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/get_email_preferences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_email_preferences call in the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences. +# +def get_email_preferences + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new + + # Call the get_email_preferences method. + result = client.get_email_preferences request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + p result +end +# [END merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb b/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb new file mode 100644 index 000000000000..5614180f997f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/email_preferences_service/update_email_preferences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_email_preferences call in the EmailPreferencesService 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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences. +# +def update_email_preferences + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new + + # Call the update_email_preferences method. + result = client.update_email_preferences request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::EmailPreferences. + p result +end +# [END merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb b/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb new file mode 100644 index 000000000000..df7107716f3b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/link_gbp_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the link_gbp_account call in the GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account. +# +def link_gbp_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new + + # Call the link_gbp_account method. + result = client.link_gbp_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse. + p result +end +# [END merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb b/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb new file mode 100644 index 000000000000..d5964826ff4e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/gbp_accounts_service/list_gbp_accounts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_gbp_accounts call in the GbpAccountsService 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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts. +# +def list_gbp_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new + + # Call the list_gbp_accounts method. + result = client.list_gbp_accounts 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::Shopping::Merchant::Accounts::V1::GbpAccount. + p item + end +end +# [END merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb b/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb new file mode 100644 index 000000000000..b686bdaf8ab1 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/homepage_service/claim_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_HomepageService_ClaimHomepage_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the claim_homepage call in the HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage. +# +def claim_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new + + # Call the claim_homepage method. + result = client.claim_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + p result +end +# [END merchantapi_v1_generated_HomepageService_ClaimHomepage_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb b/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb new file mode 100644 index 000000000000..643e814e3324 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/homepage_service/get_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_HomepageService_GetHomepage_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_homepage call in the HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage. +# +def get_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new + + # Call the get_homepage method. + result = client.get_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + p result +end +# [END merchantapi_v1_generated_HomepageService_GetHomepage_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb b/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb new file mode 100644 index 000000000000..7dceddb4e85d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/homepage_service/unclaim_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the unclaim_homepage call in the HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage. +# +def unclaim_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new + + # Call the unclaim_homepage method. + result = client.unclaim_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + p result +end +# [END merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb b/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb new file mode 100644 index 000000000000..f8378499a4b4 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/homepage_service/update_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_HomepageService_UpdateHomepage_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_homepage call in the HomepageService 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::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage. +# +def update_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new + + # Call the update_homepage method. + result = client.update_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Homepage. + p result +end +# [END merchantapi_v1_generated_HomepageService_UpdateHomepage_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb b/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb new file mode 100644 index 000000000000..57d906f08211 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/find_lfp_providers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the find_lfp_providers call in the LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers. +# +def find_lfp_providers + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new + + # Call the find_lfp_providers method. + result = client.find_lfp_providers 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::Shopping::Merchant::Accounts::V1::LfpProvider. + p item + end +end +# [END merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb b/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb new file mode 100644 index 000000000000..aa56365015bf --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/lfp_providers_service/link_lfp_provider.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the link_lfp_provider call in the LfpProvidersService 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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider. +# +def link_lfp_provider + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new + + # Call the link_lfp_provider method. + result = client.link_lfp_provider request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse. + p result +end +# [END merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb new file mode 100644 index 000000000000..bd61ee934c66 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/create_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting. +# +def create_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new + + # Call the create_omnichannel_setting method. + result = client.create_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + p result +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb new file mode 100644 index 000000000000..c74f528e8cda --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/get_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting. +# +def get_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new + + # Call the get_omnichannel_setting method. + result = client.get_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + p result +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb new file mode 100644 index 000000000000..4bb67c4e29bf --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/list_omnichannel_settings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings. +# +def list_omnichannel_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new + + # Call the list_omnichannel_settings method. + result = client.list_omnichannel_settings 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::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + p item + end +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb new file mode 100644 index 000000000000..25c60ccda3df --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/request_inventory_verification.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the request_inventory_verification call in the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification. +# +def request_inventory_verification + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new + + # Call the request_inventory_verification method. + result = client.request_inventory_verification request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse. + p result +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb new file mode 100644 index 000000000000..492a8841a9e8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/omnichannel_settings_service/update_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting. +# +def update_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new + + # Call the update_omnichannel_setting method. + result = client.update_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting. + p result +end +# [END merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb b/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb new file mode 100644 index 000000000000..36a28a431812 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/create_online_return_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_online_return_policy call in the OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy. +# +def create_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new + + # Call the create_online_return_policy method. + result = client.create_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb b/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb new file mode 100644 index 000000000000..191582ebd206 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/delete_online_return_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy. +# +def delete_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new + + # Call the delete_online_return_policy method. + result = client.delete_online_return_policy request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb b/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb new file mode 100644 index 000000000000..c6dbce43bff6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/get_online_return_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_online_return_policy call in the OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy. +# +def get_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new + + # Call the get_online_return_policy method. + result = client.get_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb b/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb new file mode 100644 index 000000000000..334a284e359d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/online_return_policy_service/list_online_return_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_online_return_policies call in the OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies. +# +def list_online_return_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new + + # Call the list_online_return_policies method. + result = client.list_online_return_policies 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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy. + p item + end +end +# [END merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb b/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb new file mode 100644 index 000000000000..db7fb9f7b747 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/programs_service/disable_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProgramsService_DisableProgram_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the disable_program call in the ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program. +# +def disable_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new + + # Call the disable_program method. + result = client.disable_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + p result +end +# [END merchantapi_v1_generated_ProgramsService_DisableProgram_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb b/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb new file mode 100644 index 000000000000..5eabd0a83f56 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/programs_service/enable_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProgramsService_EnableProgram_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the enable_program call in the ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program. +# +def enable_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new + + # Call the enable_program method. + result = client.enable_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + p result +end +# [END merchantapi_v1_generated_ProgramsService_EnableProgram_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb b/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb new file mode 100644 index 000000000000..8f89e0eb7ac4 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/programs_service/get_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProgramsService_GetProgram_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_program call in the ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program. +# +def get_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new + + # Call the get_program method. + result = client.get_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Program. + p result +end +# [END merchantapi_v1_generated_ProgramsService_GetProgram_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb b/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb new file mode 100644 index 000000000000..403e319beb88 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/programs_service/list_programs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProgramsService_ListPrograms_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_programs call in the ProgramsService 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::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs. +# +def list_programs + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new + + # Call the list_programs method. + result = client.list_programs 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::Shopping::Merchant::Accounts::V1::Program. + p item + end +end +# [END merchantapi_v1_generated_ProgramsService_ListPrograms_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb b/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb new file mode 100644 index 000000000000..fcae91924f7e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/regions_service/create_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_RegionsService_CreateRegion_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_region call in the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region. +# +def create_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new + + # Call the create_region method. + result = client.create_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + p result +end +# [END merchantapi_v1_generated_RegionsService_CreateRegion_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb b/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb new file mode 100644 index 000000000000..726c99f4c38c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/regions_service/delete_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_RegionsService_DeleteRegion_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_region call in the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region. +# +def delete_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new + + # Call the delete_region method. + result = client.delete_region request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_RegionsService_DeleteRegion_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb b/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb new file mode 100644 index 000000000000..f3027b1d32b8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/regions_service/get_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_RegionsService_GetRegion_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_region call in the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region. +# +def get_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new + + # Call the get_region method. + result = client.get_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + p result +end +# [END merchantapi_v1_generated_RegionsService_GetRegion_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb b/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb new file mode 100644 index 000000000000..e7c844a1ac4b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/regions_service/list_regions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_RegionsService_ListRegions_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_regions call in the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions. +# +def list_regions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new + + # Call the list_regions method. + result = client.list_regions 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::Shopping::Merchant::Accounts::V1::Region. + p item + end +end +# [END merchantapi_v1_generated_RegionsService_ListRegions_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb b/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb new file mode 100644 index 000000000000..a8e89c97fd38 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/regions_service/update_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_RegionsService_UpdateRegion_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_region call in the RegionsService 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::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region. +# +def update_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new + + # Call the update_region method. + result = client.update_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::Region. + p result +end +# [END merchantapi_v1_generated_RegionsService_UpdateRegion_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb b/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb new file mode 100644 index 000000000000..96511cbe0226 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/get_shipping_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_shipping_settings call in the ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings. +# +def get_shipping_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new + + # Call the get_shipping_settings method. + result = client.get_shipping_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + p result +end +# [END merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb b/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb new file mode 100644 index 000000000000..5dac87b325dd --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/shipping_settings_service/insert_shipping_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the insert_shipping_settings call in the ShippingSettingsService 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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings. +# +def insert_shipping_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new + + # Call the insert_shipping_settings method. + result = client.insert_shipping_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::ShippingSettings. + p result +end +# [END merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json b/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json new file mode 100644 index 000000000000..e65ae4f0649e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json @@ -0,0 +1,2815 @@ +{ + "client_library": { + "name": "google-shopping-merchant-accounts-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.accounts.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_AccountIssueService_ListAccountIssues_sync", + "title": "Snippet for the list_account_issues call in the AccountIssueService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues.", + "file": "account_issue_service/list_account_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_issues", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client#list_account_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse", + "client": { + "short_name": "AccountIssueService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client" + }, + "method": { + "short_name": "ListAccountIssues", + "full_name": "google.shopping.merchant.accounts.v1.AccountIssueService.ListAccountIssues", + "service": { + "short_name": "AccountIssueService", + "full_name": "google.shopping.merchant.accounts.v1.AccountIssueService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_GetAccountRelationship_sync", + "title": "Snippet for the get_account_relationship call in the AccountRelationshipsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship.", + "file": "account_relationships_service/get_account_relationship.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_relationship", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#get_account_relationship", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationship", + "client": { + "short_name": "AccountRelationshipsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" + }, + "method": { + "short_name": "GetAccountRelationship", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.GetAccountRelationship", + "service": { + "short_name": "AccountRelationshipsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_UpdateAccountRelationship_sync", + "title": "Snippet for the update_account_relationship call in the AccountRelationshipsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship.", + "file": "account_relationships_service/update_account_relationship.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account_relationship", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#update_account_relationship", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationship", + "client": { + "short_name": "AccountRelationshipsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" + }, + "method": { + "short_name": "UpdateAccountRelationship", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.UpdateAccountRelationship", + "service": { + "short_name": "AccountRelationshipsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountRelationshipsService_ListAccountRelationships_sync", + "title": "Snippet for the list_account_relationships call in the AccountRelationshipsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships.", + "file": "account_relationships_service/list_account_relationships.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_relationships", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client#list_account_relationships", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse", + "client": { + "short_name": "AccountRelationshipsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client" + }, + "method": { + "short_name": "ListAccountRelationships", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService.ListAccountRelationships", + "service": { + "short_name": "AccountRelationshipsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountRelationshipsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_GetAccountService_sync", + "title": "Snippet for the get_account_service call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service.", + "file": "account_services_service/get_account_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#get_account_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "GetAccountService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.GetAccountService", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_ListAccountServices_sync", + "title": "Snippet for the list_account_services call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services.", + "file": "account_services_service/list_account_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_services", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#list_account_services", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "ListAccountServices", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ListAccountServices", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_ProposeAccountService_sync", + "title": "Snippet for the propose_account_service call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service.", + "file": "account_services_service/propose_account_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "propose_account_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#propose_account_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "ProposeAccountService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ProposeAccountService", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_ApproveAccountService_sync", + "title": "Snippet for the approve_account_service call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service.", + "file": "account_services_service/approve_account_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "approve_account_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#approve_account_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AccountService", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "ApproveAccountService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.ApproveAccountService", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountServicesService_RejectAccountService_sync", + "title": "Snippet for the reject_account_service call in the AccountServicesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service.", + "file": "account_services_service/reject_account_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "reject_account_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client#reject_account_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AccountServicesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client" + }, + "method": { + "short_name": "RejectAccountService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService.RejectAccountService", + "service": { + "short_name": "AccountServicesService", + "full_name": "google.shopping.merchant.accounts.v1.AccountServicesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_GetUser_sync", + "title": "Snippet for the get_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#get_user.", + "file": "user_service/get_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#get_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "GetUser", + "full_name": "google.shopping.merchant.accounts.v1.UserService.GetUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_CreateUser_sync", + "title": "Snippet for the create_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#create_user.", + "file": "user_service/create_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#create_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "CreateUser", + "full_name": "google.shopping.merchant.accounts.v1.UserService.CreateUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_DeleteUser_sync", + "title": "Snippet for the delete_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user.", + "file": "user_service/delete_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "DeleteUser", + "full_name": "google.shopping.merchant.accounts.v1.UserService.DeleteUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_UpdateUser_sync", + "title": "Snippet for the update_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#update_user.", + "file": "user_service/update_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#update_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "UpdateUser", + "full_name": "google.shopping.merchant.accounts.v1.UserService.UpdateUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_UserService_ListUsers_sync", + "title": "Snippet for the list_users call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::UserService::Client#list_users.", + "file": "user_service/list_users.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_users", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client#list_users", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::UserService::Client" + }, + "method": { + "short_name": "ListUsers", + "full_name": "google.shopping.merchant.accounts.v1.UserService.ListUsers", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_GetAccount_sync", + "title": "Snippet for the get_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account.", + "file": "accounts_service/get_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#get_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "GetAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.GetAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_CreateAndConfigureAccount_sync", + "title": "Snippet for the create_and_configure_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account.", + "file": "accounts_service/create_and_configure_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_and_configure_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#create_and_configure_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "CreateAndConfigureAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.CreateAndConfigureAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_DeleteAccount_sync", + "title": "Snippet for the delete_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account.", + "file": "accounts_service/delete_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#delete_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "DeleteAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.DeleteAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_UpdateAccount_sync", + "title": "Snippet for the update_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account.", + "file": "accounts_service/update_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#update_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "UpdateAccount", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.UpdateAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_ListAccounts_sync", + "title": "Snippet for the list_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts.", + "file": "accounts_service/list_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "ListAccounts", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.ListAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountsService_ListSubAccounts_sync", + "title": "Snippet for the list_sub_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts.", + "file": "accounts_service/list_sub_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sub_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client#list_sub_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client" + }, + "method": { + "short_name": "ListSubAccounts", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService.ListSubAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AutofeedSettingsService_GetAutofeedSettings_sync", + "title": "Snippet for the get_autofeed_settings call in the AutofeedSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings.", + "file": "autofeed_settings_service/get_autofeed_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_autofeed_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#get_autofeed_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings", + "client": { + "short_name": "AutofeedSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client" + }, + "method": { + "short_name": "GetAutofeedSettings", + "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService.GetAutofeedSettings", + "service": { + "short_name": "AutofeedSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync", + "title": "Snippet for the update_autofeed_settings call in the AutofeedSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings.", + "file": "autofeed_settings_service/update_autofeed_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_autofeed_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client#update_autofeed_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings", + "client": { + "short_name": "AutofeedSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client" + }, + "method": { + "short_name": "UpdateAutofeedSettings", + "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService.UpdateAutofeedSettings", + "service": { + "short_name": "AutofeedSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.AutofeedSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync", + "title": "Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements.", + "file": "automatic_improvements_service/get_automatic_improvements.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_automatic_improvements", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#get_automatic_improvements", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements", + "client": { + "short_name": "AutomaticImprovementsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client" + }, + "method": { + "short_name": "GetAutomaticImprovements", + "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService.GetAutomaticImprovements", + "service": { + "short_name": "AutomaticImprovementsService", + "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync", + "title": "Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements.", + "file": "automatic_improvements_service/update_automatic_improvements.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_automatic_improvements", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client#update_automatic_improvements", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements", + "client": { + "short_name": "AutomaticImprovementsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client" + }, + "method": { + "short_name": "UpdateAutomaticImprovements", + "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService.UpdateAutomaticImprovements", + "service": { + "short_name": "AutomaticImprovementsService", + "full_name": "google.shopping.merchant.accounts.v1.AutomaticImprovementsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_BusinessIdentityService_GetBusinessIdentity_sync", + "title": "Snippet for the get_business_identity call in the BusinessIdentityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity.", + "file": "business_identity_service/get_business_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_business_identity", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#get_business_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity", + "client": { + "short_name": "BusinessIdentityService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client" + }, + "method": { + "short_name": "GetBusinessIdentity", + "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService.GetBusinessIdentity", + "service": { + "short_name": "BusinessIdentityService", + "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_BusinessIdentityService_UpdateBusinessIdentity_sync", + "title": "Snippet for the update_business_identity call in the BusinessIdentityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity.", + "file": "business_identity_service/update_business_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_business_identity", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client#update_business_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity", + "client": { + "short_name": "BusinessIdentityService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client" + }, + "method": { + "short_name": "UpdateBusinessIdentity", + "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService.UpdateBusinessIdentity", + "service": { + "short_name": "BusinessIdentityService", + "full_name": "google.shopping.merchant.accounts.v1.BusinessIdentityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_BusinessInfoService_GetBusinessInfo_sync", + "title": "Snippet for the get_business_info call in the BusinessInfoService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info.", + "file": "business_info_service/get_business_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_business_info", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#get_business_info", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfo", + "client": { + "short_name": "BusinessInfoService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client" + }, + "method": { + "short_name": "GetBusinessInfo", + "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService.GetBusinessInfo", + "service": { + "short_name": "BusinessInfoService", + "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_BusinessInfoService_UpdateBusinessInfo_sync", + "title": "Snippet for the update_business_info call in the BusinessInfoService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info.", + "file": "business_info_service/update_business_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_business_info", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client#update_business_info", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfo", + "client": { + "short_name": "BusinessInfoService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client" + }, + "method": { + "short_name": "UpdateBusinessInfo", + "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService.UpdateBusinessInfo", + "service": { + "short_name": "BusinessInfoService", + "full_name": "google.shopping.merchant.accounts.v1.BusinessInfoService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_GetCheckoutSettings_sync", + "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings.", + "file": "checkout_settings_service/get_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#get_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "GetCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.GetCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", + "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings.", + "file": "checkout_settings_service/create_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#create_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "CreateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.CreateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", + "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings.", + "file": "checkout_settings_service/update_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#update_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "UpdateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.UpdateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", + "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings.", + "file": "checkout_settings_service/delete_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client#delete_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "DeleteCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService.DeleteCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_RegisterGcp_sync", + "title": "Snippet for the register_gcp call in the DeveloperRegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp.", + "file": "developer_registration_service/register_gcp.rb", + "language": "RUBY", + "client_method": { + "short_name": "register_gcp", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#register_gcp", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration", + "client": { + "short_name": "DeveloperRegistrationService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" + }, + "method": { + "short_name": "RegisterGcp", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.RegisterGcp", + "service": { + "short_name": "DeveloperRegistrationService", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_GetDeveloperRegistration_sync", + "title": "Snippet for the get_developer_registration call in the DeveloperRegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration.", + "file": "developer_registration_service/get_developer_registration.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_developer_registration", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#get_developer_registration", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration", + "client": { + "short_name": "DeveloperRegistrationService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" + }, + "method": { + "short_name": "GetDeveloperRegistration", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.GetDeveloperRegistration", + "service": { + "short_name": "DeveloperRegistrationService", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_DeveloperRegistrationService_UnregisterGcp_sync", + "title": "Snippet for the unregister_gcp call in the DeveloperRegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp.", + "file": "developer_registration_service/unregister_gcp.rb", + "language": "RUBY", + "client_method": { + "short_name": "unregister_gcp", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client#unregister_gcp", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DeveloperRegistrationService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client" + }, + "method": { + "short_name": "UnregisterGcp", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService.UnregisterGcp", + "service": { + "short_name": "DeveloperRegistrationService", + "full_name": "google.shopping.merchant.accounts.v1.DeveloperRegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_EmailPreferencesService_GetEmailPreferences_sync", + "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences.", + "file": "email_preferences_service/get_email_preferences.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_email_preferences", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#get_email_preferences", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferences", + "client": { + "short_name": "EmailPreferencesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client" + }, + "method": { + "short_name": "GetEmailPreferences", + "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService.GetEmailPreferences", + "service": { + "short_name": "EmailPreferencesService", + "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_EmailPreferencesService_UpdateEmailPreferences_sync", + "title": "Snippet for the update_email_preferences call in the EmailPreferencesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences.", + "file": "email_preferences_service/update_email_preferences.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_email_preferences", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client#update_email_preferences", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferences", + "client": { + "short_name": "EmailPreferencesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client" + }, + "method": { + "short_name": "UpdateEmailPreferences", + "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService.UpdateEmailPreferences", + "service": { + "short_name": "EmailPreferencesService", + "full_name": "google.shopping.merchant.accounts.v1.EmailPreferencesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_GbpAccountsService_ListGbpAccounts_sync", + "title": "Snippet for the list_gbp_accounts call in the GbpAccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts.", + "file": "gbp_accounts_service/list_gbp_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gbp_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#list_gbp_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse", + "client": { + "short_name": "GbpAccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client" + }, + "method": { + "short_name": "ListGbpAccounts", + "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService.ListGbpAccounts", + "service": { + "short_name": "GbpAccountsService", + "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_GbpAccountsService_LinkGbpAccount_sync", + "title": "Snippet for the link_gbp_account call in the GbpAccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account.", + "file": "gbp_accounts_service/link_gbp_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "link_gbp_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client#link_gbp_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse", + "client": { + "short_name": "GbpAccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client" + }, + "method": { + "short_name": "LinkGbpAccount", + "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService.LinkGbpAccount", + "service": { + "short_name": "GbpAccountsService", + "full_name": "google.shopping.merchant.accounts.v1.GbpAccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_HomepageService_GetHomepage_sync", + "title": "Snippet for the get_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage.", + "file": "homepage_service/get_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#get_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" + }, + "method": { + "short_name": "GetHomepage", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService.GetHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_HomepageService_UpdateHomepage_sync", + "title": "Snippet for the update_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage.", + "file": "homepage_service/update_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#update_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" + }, + "method": { + "short_name": "UpdateHomepage", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService.UpdateHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_HomepageService_ClaimHomepage_sync", + "title": "Snippet for the claim_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage.", + "file": "homepage_service/claim_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "claim_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#claim_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" + }, + "method": { + "short_name": "ClaimHomepage", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService.ClaimHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_HomepageService_UnclaimHomepage_sync", + "title": "Snippet for the unclaim_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage.", + "file": "homepage_service/unclaim_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "unclaim_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client#unclaim_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client" + }, + "method": { + "short_name": "UnclaimHomepage", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService.UnclaimHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpProvidersService_FindLfpProviders_sync", + "title": "Snippet for the find_lfp_providers call in the LfpProvidersService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers.", + "file": "lfp_providers_service/find_lfp_providers.rb", + "language": "RUBY", + "client_method": { + "short_name": "find_lfp_providers", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#find_lfp_providers", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse", + "client": { + "short_name": "LfpProvidersService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client" + }, + "method": { + "short_name": "FindLfpProviders", + "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService.FindLfpProviders", + "service": { + "short_name": "LfpProvidersService", + "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_LfpProvidersService_LinkLfpProvider_sync", + "title": "Snippet for the link_lfp_provider call in the LfpProvidersService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider.", + "file": "lfp_providers_service/link_lfp_provider.rb", + "language": "RUBY", + "client_method": { + "short_name": "link_lfp_provider", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client#link_lfp_provider", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse", + "client": { + "short_name": "LfpProvidersService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client" + }, + "method": { + "short_name": "LinkLfpProvider", + "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService.LinkLfpProvider", + "service": { + "short_name": "LfpProvidersService", + "full_name": "google.shopping.merchant.accounts.v1.LfpProvidersService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync", + "title": "Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting.", + "file": "omnichannel_settings_service/get_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#get_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "GetOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.GetOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync", + "title": "Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings.", + "file": "omnichannel_settings_service/list_omnichannel_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_omnichannel_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#list_omnichannel_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "ListOmnichannelSettings", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.ListOmnichannelSettings", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync", + "title": "Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting.", + "file": "omnichannel_settings_service/create_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#create_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "CreateOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.CreateOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync", + "title": "Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting.", + "file": "omnichannel_settings_service/update_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#update_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "UpdateOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.UpdateOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OmnichannelSettingsService_RequestInventoryVerification_sync", + "title": "Snippet for the request_inventory_verification call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification.", + "file": "omnichannel_settings_service/request_inventory_verification.rb", + "language": "RUBY", + "client_method": { + "short_name": "request_inventory_verification", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client#request_inventory_verification", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "RequestInventoryVerification", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService.RequestInventoryVerification", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync", + "title": "Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy.", + "file": "online_return_policy_service/get_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#get_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "GetOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.GetOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync", + "title": "Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies.", + "file": "online_return_policy_service/list_online_return_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_online_return_policies", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#list_online_return_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "ListOnlineReturnPolicies", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.ListOnlineReturnPolicies", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync", + "title": "Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy.", + "file": "online_return_policy_service/create_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#create_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "CreateOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.CreateOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync", + "title": "Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy.", + "file": "online_return_policy_service/delete_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client#delete_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "DeleteOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService.DeleteOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProgramsService_GetProgram_sync", + "title": "Snippet for the get_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program.", + "file": "programs_service/get_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#get_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" + }, + "method": { + "short_name": "GetProgram", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.GetProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProgramsService_ListPrograms_sync", + "title": "Snippet for the list_programs call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs.", + "file": "programs_service/list_programs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_programs", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#list_programs", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" + }, + "method": { + "short_name": "ListPrograms", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.ListPrograms", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProgramsService_EnableProgram_sync", + "title": "Snippet for the enable_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program.", + "file": "programs_service/enable_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#enable_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" + }, + "method": { + "short_name": "EnableProgram", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.EnableProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProgramsService_DisableProgram_sync", + "title": "Snippet for the disable_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program.", + "file": "programs_service/disable_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client#disable_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client" + }, + "method": { + "short_name": "DisableProgram", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService.DisableProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_GetRegion_sync", + "title": "Snippet for the get_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region.", + "file": "regions_service/get_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#get_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "GetRegion", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.GetRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_CreateRegion_sync", + "title": "Snippet for the create_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region.", + "file": "regions_service/create_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#create_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "CreateRegion", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.CreateRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_UpdateRegion_sync", + "title": "Snippet for the update_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region.", + "file": "regions_service/update_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#update_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "UpdateRegion", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.UpdateRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_DeleteRegion_sync", + "title": "Snippet for the delete_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region.", + "file": "regions_service/delete_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#delete_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "DeleteRegion", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.DeleteRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_RegionsService_ListRegions_sync", + "title": "Snippet for the list_regions call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions.", + "file": "regions_service/list_regions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_regions", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client#list_regions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client" + }, + "method": { + "short_name": "ListRegions", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService.ListRegions", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ShippingSettingsService_GetShippingSettings_sync", + "title": "Snippet for the get_shipping_settings call in the ShippingSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings.", + "file": "shipping_settings_service/get_shipping_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_shipping_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#get_shipping_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettings", + "client": { + "short_name": "ShippingSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client" + }, + "method": { + "short_name": "GetShippingSettings", + "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService.GetShippingSettings", + "service": { + "short_name": "ShippingSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ShippingSettingsService_InsertShippingSettings_sync", + "title": "Snippet for the insert_shipping_settings call in the ShippingSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings.", + "file": "shipping_settings_service/insert_shipping_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_shipping_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client#insert_shipping_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettings", + "client": { + "short_name": "ShippingSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client" + }, + "method": { + "short_name": "InsertShippingSettings", + "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService.InsertShippingSettings", + "service": { + "short_name": "ShippingSettingsService", + "full_name": "google.shopping.merchant.accounts.v1.ShippingSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync", + "title": "Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state.", + "file": "terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_terms_of_service_agreement_state", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState", + "client": { + "short_name": "TermsOfServiceAgreementStateService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client" + }, + "method": { + "short_name": "GetTermsOfServiceAgreementState", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService.GetTermsOfServiceAgreementState", + "service": { + "short_name": "TermsOfServiceAgreementStateService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync", + "title": "Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state.", + "file": "terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_for_application_terms_of_service_agreement_state", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState", + "client": { + "short_name": "TermsOfServiceAgreementStateService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client" + }, + "method": { + "short_name": "RetrieveForApplicationTermsOfServiceAgreementState", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService.RetrieveForApplicationTermsOfServiceAgreementState", + "service": { + "short_name": "TermsOfServiceAgreementStateService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceAgreementStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync", + "title": "Snippet for the get_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service.", + "file": "terms_of_service_service/get_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfService", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" + }, + "method": { + "short_name": "GetTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.GetTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync", + "title": "Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service.", + "file": "terms_of_service_service/retrieve_latest_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_latest_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::TermsOfService", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" + }, + "method": { + "short_name": "RetrieveLatestTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.RetrieveLatestTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync", + "title": "Snippet for the accept_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service.", + "file": "terms_of_service_service/accept_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "accept_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client" + }, + "method": { + "short_name": "AcceptTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService.AcceptTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb new file mode 100644 index 000000000000..d14a0b02a073 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state. +# +def get_terms_of_service_agreement_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new + + # Call the get_terms_of_service_agreement_state method. + result = client.get_terms_of_service_agreement_state request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb new file mode 100644 index 000000000000..77dcbac3d3db --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state. +# +def retrieve_for_application_terms_of_service_agreement_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + + # Call the retrieve_for_application_terms_of_service_agreement_state method. + result = client.retrieve_for_application_terms_of_service_agreement_state request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb new file mode 100644 index 000000000000..d4b762ef01f6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/accept_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the accept_terms_of_service call in the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#accept_terms_of_service. +# +def accept_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new + + # Call the accept_terms_of_service method. + result = client.accept_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceService_AcceptTermsOfService_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb new file mode 100644 index 000000000000..29baadbaffd7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/get_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_terms_of_service call in the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#get_terms_of_service. +# +def get_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new + + # Call the get_terms_of_service method. + result = client.get_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceService_GetTermsOfService_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb new file mode 100644 index 000000000000..ea7dd621994b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService 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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client#retrieve_latest_terms_of_service. +# +def retrieve_latest_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new + + # Call the retrieve_latest_terms_of_service method. + result = client.retrieve_latest_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::TermsOfService. + p result +end +# [END merchantapi_v1_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb b/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb new file mode 100644 index 000000000000..b4b69d246d71 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/user_service/create_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_UserService_CreateUser_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the create_user call in the UserService 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::Shopping::Merchant::Accounts::V1::UserService::Client#create_user. +# +def create_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new + + # Call the create_user method. + result = client.create_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + p result +end +# [END merchantapi_v1_generated_UserService_CreateUser_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb b/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb new file mode 100644 index 000000000000..9dd709db1e60 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/user_service/delete_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_UserService_DeleteUser_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the delete_user call in the UserService 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::Shopping::Merchant::Accounts::V1::UserService::Client#delete_user. +# +def delete_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new + + # Call the delete_user method. + result = client.delete_user request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_UserService_DeleteUser_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb b/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb new file mode 100644 index 000000000000..fa86cb610e05 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/user_service/get_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_UserService_GetUser_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the get_user call in the UserService 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::Shopping::Merchant::Accounts::V1::UserService::Client#get_user. +# +def get_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new + + # Call the get_user method. + result = client.get_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + p result +end +# [END merchantapi_v1_generated_UserService_GetUser_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb b/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb new file mode 100644 index 000000000000..618d77715365 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/user_service/list_users.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_UserService_ListUsers_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the list_users call in the UserService 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::Shopping::Merchant::Accounts::V1::UserService::Client#list_users. +# +def list_users + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new + + # Call the list_users method. + result = client.list_users 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::Shopping::Merchant::Accounts::V1::User. + p item + end +end +# [END merchantapi_v1_generated_UserService_ListUsers_sync] diff --git a/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb b/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb new file mode 100644 index 000000000000..73e82da2397b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/snippets/user_service/update_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_UserService_UpdateUser_sync] +require "google/shopping/merchant/accounts/v1" + +## +# Snippet for the update_user call in the UserService 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::Shopping::Merchant::Accounts::V1::UserService::Client#update_user. +# +def update_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new + + # Call the update_user method. + result = client.update_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1::User. + p result +end +# [END merchantapi_v1_generated_UserService_UpdateUser_sync] diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb new file mode 100644 index 000000000000..1db47438c72e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/account_issue_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb new file mode 100644 index 000000000000..c369e4364bdb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_rest_test.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountissue_pb" +require "google/shopping/merchant/accounts/v1/account_issue_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_list_account_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + time_zone = "hello world" + + list_account_issues_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::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::ServiceStub.stub :transcode_list_account_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_account_issues ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_account_issues(::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1::AccountIssueService::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::Shopping::Merchant::Accounts::V1::AccountIssueService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb new file mode 100644 index 000000000000..95f59cff2cde --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountissue_pb" +require "google/shopping/merchant/accounts/v1/accountissue_services_pb" +require "google/shopping/merchant/accounts/v1/account_issue_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::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_list_account_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesResponse.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" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + time_zone = "hello world" + + list_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_issues, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) 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_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone 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_account_issues ::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) 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_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, 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_account_issues(::Google::Shopping::Merchant::Accounts::V1::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), 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_account_issues_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::Shopping::Merchant::Accounts::V1::AccountIssueService::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::Shopping::Merchant::Accounts::V1::AccountIssueService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb new file mode 100644 index 000000000000..3f6fe59dcd46 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/account_relationships_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_relationship_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_relationship_path account: "value0", relationship: "value1" + assert_equal "accounts/value0/relationships/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb new file mode 100644 index 000000000000..4dee441f1497 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountrelationships_pb" +require "google/shopping/merchant/accounts/v1/account_relationships_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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_get_account_relationship + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_relationship_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_get_account_relationship_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_relationship_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_relationship({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account_relationship name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_relationship ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_relationship({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_relationship(::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_relationship_client_stub.call_count + end + end + end + + def test_update_account_relationship + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_relationship = {} + update_mask = {} + + update_account_relationship_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_update_account_relationship_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_relationship_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account_relationship account_relationship: account_relationship, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account_relationship ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account_relationship(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_relationship_client_stub.call_count + end + end + end + + def test_list_account_relationships + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_account_relationships_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::ServiceStub.stub :transcode_list_account_relationships_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_relationships_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_relationships({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_account_relationships parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_account_relationships ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_account_relationships({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_account_relationships(::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_relationships_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb new file mode 100644 index 000000000000..5a144df4bb4a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb @@ -0,0 +1,270 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountrelationships_pb" +require "google/shopping/merchant/accounts/v1/accountrelationships_services_pb" +require "google/shopping/merchant/accounts/v1/account_relationships_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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_get_account_relationship + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.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" + + get_account_relationship_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_relationship, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_relationship_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_relationship({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account_relationship name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_relationship ::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_relationship({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_relationship(::Google::Shopping::Merchant::Accounts::V1::GetAccountRelationshipRequest.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, get_account_relationship_client_stub.call_rpc_count + end + end + + def test_update_account_relationship + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship.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. + account_relationship = {} + update_mask = {} + + update_account_relationship_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account_relationship, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AccountRelationship), request["account_relationship"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_relationship_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account_relationship account_relationship: account_relationship, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account_relationship ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_account_relationship({ account_relationship: account_relationship, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_account_relationship(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRelationshipRequest.new(account_relationship: account_relationship, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_account_relationship_client_stub.call_rpc_count + end + end + + def test_list_account_relationships + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsResponse.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" + page_token = "hello world" + page_size = 42 + + list_account_relationships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_relationships, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_relationships_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_relationships({ parent: parent, page_token: page_token, page_size: page_size }) 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_account_relationships parent: parent, page_token: page_token, page_size: page_size 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_account_relationships ::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new(parent: parent, page_token: page_token, page_size: page_size) 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_account_relationships({ parent: parent, page_token: page_token, page_size: page_size }, 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_account_relationships(::Google::Shopping::Merchant::Accounts::V1::ListAccountRelationshipsRequest.new(parent: parent, page_token: page_token, page_size: page_size), 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_account_relationships_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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::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::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb new file mode 100644 index 000000000000..7d32cca2ea84 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/account_services_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_service_path account: "value0", service: "value1" + assert_equal "accounts/value0/services/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb new file mode 100644 index 000000000000..64008185ec1d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_rest_test.rb @@ -0,0 +1,373 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountservices_pb" +require "google/shopping/merchant/accounts/v1/account_services_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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_get_account_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_get_account_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_service ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_service(::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_service_client_stub.call_count + end + end + end + + def test_list_account_services + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_account_services_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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_list_account_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_services_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_services({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_account_services parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_account_services ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_account_services({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_account_services(::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_services_client_stub.call_count + end + end + end + + def test_propose_account_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provider = "hello world" + account_service = {} + + propose_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_propose_account_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, propose_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.propose_account_service parent: parent, provider: provider, account_service: account_service do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.propose_account_service ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.propose_account_service(::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, propose_account_service_client_stub.call_count + end + end + end + + def test_approve_account_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AccountService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + approve_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_approve_account_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, approve_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.approve_account_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.approve_account_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.approve_account_service ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.approve_account_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.approve_account_service(::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, approve_account_service_client_stub.call_count + end + end + end + + def test_reject_account_service + # 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" + + reject_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::ServiceStub.stub :transcode_reject_account_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reject_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.reject_account_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.reject_account_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.reject_account_service ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.reject_account_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.reject_account_service(::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reject_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::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::Shopping::Merchant::Accounts::V1::AccountServicesService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb new file mode 100644 index 000000000000..f8a4b7a9951d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb @@ -0,0 +1,388 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accountservices_pb" +require "google/shopping/merchant/accounts/v1/accountservices_services_pb" +require "google/shopping/merchant/accounts/v1/account_services_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::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_get_account_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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" + + get_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_service ::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_service(::Google::Shopping::Merchant::Accounts::V1::GetAccountServiceRequest.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, get_account_service_client_stub.call_rpc_count + end + end + + def test_list_account_services + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesResponse.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" + page_token = "hello world" + page_size = 42 + + list_account_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_services, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_services_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_services({ parent: parent, page_token: page_token, page_size: page_size }) 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_account_services parent: parent, page_token: page_token, page_size: page_size 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_account_services ::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new(parent: parent, page_token: page_token, page_size: page_size) 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_account_services({ parent: parent, page_token: page_token, page_size: page_size }, 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_account_services(::Google::Shopping::Merchant::Accounts::V1::ListAccountServicesRequest.new(parent: parent, page_token: page_token, page_size: page_size), 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_account_services_client_stub.call_rpc_count + end + end + + def test_propose_account_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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" + provider = "hello world" + account_service = {} + + propose_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :propose_account_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["provider"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AccountService), request["account_service"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, propose_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.propose_account_service parent: parent, provider: provider, account_service: account_service do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.propose_account_service ::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.propose_account_service({ parent: parent, provider: provider, account_service: account_service }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.propose_account_service(::Google::Shopping::Merchant::Accounts::V1::ProposeAccountServiceRequest.new(parent: parent, provider: provider, account_service: account_service), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, propose_account_service_client_stub.call_rpc_count + end + end + + def test_approve_account_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AccountService.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" + + approve_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :approve_account_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, approve_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.approve_account_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.approve_account_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.approve_account_service ::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.approve_account_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.approve_account_service(::Google::Shopping::Merchant::Accounts::V1::ApproveAccountServiceRequest.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, approve_account_service_client_stub.call_rpc_count + end + end + + def test_reject_account_service + # 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" + + reject_account_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reject_account_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reject_account_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.reject_account_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.reject_account_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.reject_account_service ::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.reject_account_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.reject_account_service(::Google::Shopping::Merchant::Accounts::V1::RejectAccountServiceRequest.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, reject_account_service_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::Shopping::Merchant::Accounts::V1::AccountServicesService::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::Shopping::Merchant::Accounts::V1::AccountServicesService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb new file mode 100644 index 000000000000..77f6c9536824 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb new file mode 100644 index 000000000000..4c32e1f079b5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_rest_test.rb @@ -0,0 +1,431 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accounts_pb" +require "google/shopping/merchant/accounts/v1/accounts_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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_get_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account(::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_count + end + end + end + + def test_create_and_configure_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = {} + user = [{}] + service = [{}] + + create_and_configure_account_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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_create_and_configure_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_and_configure_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_and_configure_account({ account: account, user: user, service: service }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_and_configure_account account: account, user: user, service: service do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_and_configure_account({ account: account, user: user, service: service }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_and_configure_account_client_stub.call_count + end + end + end + + def test_delete_account + # 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" + force = true + + delete_account_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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_delete_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_account({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_account name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_account ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_account({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_account(::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_account_client_stub.call_count + end + end + end + + def test_update_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = {} + update_mask = {} + + update_account_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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_update_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account({ account: account, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account account: account, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account({ account: account, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_client_stub.call_count + end + end + end + + def test_list_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_accounts_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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts_client_stub.call_count + end + end + end + + def test_list_sub_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + provider = "hello world" + page_size = 42 + page_token = "hello world" + + list_sub_accounts_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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_sub_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sub_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1::AccountsService::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::Shopping::Merchant::Accounts::V1::AccountsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb new file mode 100644 index 000000000000..b63c9cec1291 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb @@ -0,0 +1,459 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/accounts_pb" +require "google/shopping/merchant/accounts/v1/accounts_services_pb" +require "google/shopping/merchant/accounts/v1/accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::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_get_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.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" + + get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account ::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account(::Google::Shopping::Merchant::Accounts::V1::GetAccountRequest.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, get_account_client_stub.call_rpc_count + end + end + + def test_create_and_configure_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.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. + account = {} + user = [{}] + service = [{}] + + create_and_configure_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_and_configure_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Account), request["account"] + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddUser, request["user"].first + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest::AddAccountService, request["service"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_and_configure_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_and_configure_account({ account: account, user: user, service: service }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_and_configure_account account: account, user: user, service: service do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_and_configure_account({ account: account, user: user, service: service }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1::CreateAndConfigureAccountRequest.new(account: account, user: user, service: service), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_and_configure_account_client_stub.call_rpc_count + end + end + + def test_delete_account + # 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" + force = true + + delete_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_account({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_account name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_account ::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_account({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_account(::Google::Shopping::Merchant::Accounts::V1::DeleteAccountRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_account_client_stub.call_rpc_count + end + end + + def test_update_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Account.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. + account = {} + update_mask = {} + + update_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Account), request["account"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account({ account: account, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account account: account, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account ::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_account({ account: account, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_account(::Google::Shopping::Merchant::Accounts::V1::UpdateAccountRequest.new(account: account, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_account_client_stub.call_rpc_count + end + end + + def test_list_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListAccountsResponse.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. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest, request + 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_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_accounts({ 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_accounts 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_accounts ::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts({ 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_accounts(::Google::Shopping::Merchant::Accounts::V1::ListAccountsRequest.new(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_accounts_client_stub.call_rpc_count + end + end + + def test_list_sub_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsResponse.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. + provider = "hello world" + page_size = 42 + page_token = "hello world" + + list_sub_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sub_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest, request + assert_equal "hello world", request["provider"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sub_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sub_accounts({ provider: provider, 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_sub_accounts provider: provider, 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_sub_accounts ::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts({ provider: provider, 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_sub_accounts(::Google::Shopping::Merchant::Accounts::V1::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1::AccountsService::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::Shopping::Merchant::Accounts::V1::AccountsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb new file mode 100644 index 000000000000..0a28af3c74f2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/autofeed_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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_autofeed_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.autofeed_settings_path account: "value0" + assert_equal "accounts/value0/autofeedSettings", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb new file mode 100644 index 000000000000..7745a5995c5a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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_get_autofeed_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_autofeed_settings_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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_get_autofeed_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_autofeed_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_autofeed_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_autofeed_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_autofeed_settings_client_stub.call_count + end + end + end + + def test_update_autofeed_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + autofeed_settings = {} + update_mask = {} + + update_autofeed_settings_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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_update_autofeed_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_autofeed_settings_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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb new file mode 100644 index 000000000000..a965758dde4a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1/autofeedsettings_services_pb" +require "google/shopping/merchant/accounts/v1/autofeed_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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_get_autofeed_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.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" + + get_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_autofeed_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_autofeed_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_autofeed_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_autofeed_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::GetAutofeedSettingsRequest.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, get_autofeed_settings_client_stub.call_rpc_count + end + end + + def test_update_autofeed_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings.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. + autofeed_settings = {} + update_mask = {} + + update_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_autofeed_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettings), request["autofeed_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_autofeed_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_autofeed_settings_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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb new file mode 100644 index 000000000000..e7889e9d11fb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/automatic_improvements_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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_automatic_improvements_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.automatic_improvements_path account: "value0" + assert_equal "accounts/value0/automaticImprovements", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb new file mode 100644 index 000000000000..08dc331dddce --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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_get_automatic_improvements + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_automatic_improvements_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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_get_automatic_improvements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_automatic_improvements({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_automatic_improvements name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_automatic_improvements({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_automatic_improvements_client_stub.call_count + end + end + end + + def test_update_automatic_improvements + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + automatic_improvements = {} + update_mask = {} + + update_automatic_improvements_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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_update_automatic_improvements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb new file mode 100644 index 000000000000..17fc092d1270 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1/automaticimprovements_services_pb" +require "google/shopping/merchant/accounts/v1/automatic_improvements_service" + +class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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_get_automatic_improvements + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.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" + + get_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_automatic_improvements, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_automatic_improvements({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_automatic_improvements name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_automatic_improvements({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::GetAutomaticImprovementsRequest.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, get_automatic_improvements_client_stub.call_rpc_count + end + end + + def test_update_automatic_improvements + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements.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. + automatic_improvements = {} + update_mask = {} + + update_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_automatic_improvements, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovements), request["automatic_improvements"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_automatic_improvements_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb new file mode 100644 index 000000000000..402eaa9777d3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/business_identity_service" + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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_business_identity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.business_identity_path account: "value0" + assert_equal "accounts/value0/businessIdentity", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb new file mode 100644 index 000000000000..10714422c574 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessidentity_pb" +require "google/shopping/merchant/accounts/v1/business_identity_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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_get_business_identity + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_identity_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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.stub :transcode_get_business_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_business_identity({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_business_identity name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_business_identity({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_business_identity_client_stub.call_count + end + end + end + + def test_update_business_identity + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + business_identity = {} + update_mask = {} + + update_business_identity_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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::ServiceStub.stub :transcode_update_business_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_business_identity business_identity: business_identity, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_business_identity(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb new file mode 100644 index 000000000000..4a563476aa76 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessidentity_pb" +require "google/shopping/merchant/accounts/v1/businessidentity_services_pb" +require "google/shopping/merchant/accounts/v1/business_identity_service" + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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_get_business_identity + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.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" + + get_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_business_identity, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_business_identity({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_business_identity name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_business_identity ::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_business_identity({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_business_identity(::Google::Shopping::Merchant::Accounts::V1::GetBusinessIdentityRequest.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, get_business_identity_client_stub.call_rpc_count + end + end + + def test_update_business_identity + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity.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. + business_identity = {} + update_mask = {} + + update_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_business_identity, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentity), request["business_identity"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_business_identity_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_business_identity business_identity: business_identity, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_business_identity ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_business_identity(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1::BusinessIdentityService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb new file mode 100644 index 000000000000..55db7d4ef8b4 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/business_info_service" + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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_business_info_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.business_info_path account: "value0" + assert_equal "accounts/value0/businessInfo", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb new file mode 100644 index 000000000000..f7e32dae9f68 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessinfo_pb" +require "google/shopping/merchant/accounts/v1/business_info_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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_get_business_info + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_info_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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.stub :transcode_get_business_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_business_info({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_business_info name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_business_info ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_business_info({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_business_info(::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_business_info_client_stub.call_count + end + end + end + + def test_update_business_info + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + business_info = {} + update_mask = {} + + update_business_info_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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::ServiceStub.stub :transcode_update_business_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_business_info business_info: business_info, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_business_info ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_business_info({ business_info: business_info, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_business_info(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb new file mode 100644 index 000000000000..b6ae407666be --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/businessinfo_pb" +require "google/shopping/merchant/accounts/v1/businessinfo_services_pb" +require "google/shopping/merchant/accounts/v1/business_info_service" + +class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::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_get_business_info + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.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" + + get_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_business_info, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_business_info({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_business_info name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_business_info ::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_business_info({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_business_info(::Google::Shopping::Merchant::Accounts::V1::GetBusinessInfoRequest.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, get_business_info_client_stub.call_rpc_count + end + end + + def test_update_business_info + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo.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. + business_info = {} + update_mask = {} + + update_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_business_info, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::BusinessInfo), request["business_info"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_business_info_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_business_info({ business_info: business_info, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_business_info business_info: business_info, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_business_info ::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_business_info({ business_info: business_info, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_business_info(::Google::Shopping::Merchant::Accounts::V1::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1::BusinessInfoService::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::Shopping::Merchant::Accounts::V1::BusinessInfoService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb new file mode 100644 index 000000000000..6d8bb55f3788 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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_checkout_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.checkout_settings_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1/checkoutSettings", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb new file mode 100644 index 000000000000..92a9842890e2 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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_get_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_checkout_settings_client_stub.call_count + end + end + end + + def test_create_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + checkout_settings = {} + + create_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_count + end + end + end + + def test_update_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_checkout_settings_client_stub.call_count + end + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb new file mode 100644 index 000000000000..de11f48b9ddc --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1/checkoutsettings_services_pb" +require "google/shopping/merchant/accounts/v1/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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_get_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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" + + get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_checkout_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::GetCheckoutSettingsRequest.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, get_checkout_settings_client_stub.call_rpc_count + end + end + + def test_create_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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" + checkout_settings = {} + + create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings), request["checkout_settings"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_rpc_count + end + end + + def test_update_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings.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. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettings), request["checkout_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_checkout_settings_client_stub.call_rpc_count + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_checkout_settings({ 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_checkout_settings(::Google::Shopping::Merchant::Accounts::V1::DeleteCheckoutSettingsRequest.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_checkout_settings_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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb new file mode 100644 index 000000000000..160bd8c4713a --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/developer_registration_service" + +class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_developer_registration_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.developer_registration_path account: "value0" + assert_equal "accounts/value0/developerRegistration", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb new file mode 100644 index 000000000000..0d43aa308654 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_rest_test.rb @@ -0,0 +1,262 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/developerregistration_pb" +require "google/shopping/merchant/accounts/v1/developer_registration_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_register_gcp + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + developer_email = "hello world" + + register_gcp_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_register_gcp_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, register_gcp_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.register_gcp({ name: name, developer_email: developer_email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.register_gcp name: name, developer_email: developer_email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.register_gcp ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.register_gcp({ name: name, developer_email: developer_email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.register_gcp(::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, register_gcp_client_stub.call_count + end + end + end + + def test_get_developer_registration + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_developer_registration_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_get_developer_registration_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_developer_registration_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_developer_registration({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_developer_registration name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_developer_registration ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_developer_registration({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_developer_registration(::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_developer_registration_client_stub.call_count + end + end + end + + def test_unregister_gcp + # 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" + + unregister_gcp_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::ServiceStub.stub :transcode_unregister_gcp_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unregister_gcp_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.unregister_gcp({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.unregister_gcp name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.unregister_gcp ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.unregister_gcp({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.unregister_gcp(::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unregister_gcp_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb new file mode 100644 index 000000000000..632b4b34a12f --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb @@ -0,0 +1,261 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/developerregistration_pb" +require "google/shopping/merchant/accounts/v1/developerregistration_services_pb" +require "google/shopping/merchant/accounts/v1/developer_registration_service" + +class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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_register_gcp + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.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" + developer_email = "hello world" + + register_gcp_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :register_gcp, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["developer_email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, register_gcp_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.register_gcp({ name: name, developer_email: developer_email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.register_gcp name: name, developer_email: developer_email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.register_gcp ::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.register_gcp({ name: name, developer_email: developer_email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.register_gcp(::Google::Shopping::Merchant::Accounts::V1::RegisterGcpRequest.new(name: name, developer_email: developer_email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, register_gcp_client_stub.call_rpc_count + end + end + + def test_get_developer_registration + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistration.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" + + get_developer_registration_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_developer_registration, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_developer_registration_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_developer_registration({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_developer_registration name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_developer_registration ::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_developer_registration({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_developer_registration(::Google::Shopping::Merchant::Accounts::V1::GetDeveloperRegistrationRequest.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, get_developer_registration_client_stub.call_rpc_count + end + end + + def test_unregister_gcp + # 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" + + unregister_gcp_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unregister_gcp, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unregister_gcp_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.unregister_gcp({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.unregister_gcp name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.unregister_gcp ::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.unregister_gcp({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.unregister_gcp(::Google::Shopping::Merchant::Accounts::V1::UnregisterGcpRequest.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, unregister_gcp_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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::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::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb new file mode 100644 index 000000000000..dc33d624c170 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/email_preferences_service" + +class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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_email_preferences_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.email_preferences_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1/emailPreferences", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb new file mode 100644 index 000000000000..74ff87b6e516 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1/email_preferences_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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_get_email_preferences + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_email_preferences_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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.stub :transcode_get_email_preferences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_email_preferences({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_email_preferences name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_email_preferences({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_email_preferences_client_stub.call_count + end + end + end + + def test_update_email_preferences + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + email_preferences = {} + update_mask = {} + + update_email_preferences_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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::ServiceStub.stub :transcode_update_email_preferences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb new file mode 100644 index 000000000000..1dacfd7e6900 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1/emailpreferences_services_pb" +require "google/shopping/merchant/accounts/v1/email_preferences_service" + +class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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_get_email_preferences + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.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" + + get_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_email_preferences, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_email_preferences({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_email_preferences name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_email_preferences({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1::GetEmailPreferencesRequest.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, get_email_preferences_client_stub.call_rpc_count + end + end + + def test_update_email_preferences + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences.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. + email_preferences = {} + update_mask = {} + + update_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_email_preferences, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::EmailPreferences), request["email_preferences"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_email_preferences_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1::EmailPreferencesService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb new file mode 100644 index 000000000000..b9df1480cfab --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/gbp_accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb new file mode 100644 index 000000000000..e8a005f2f375 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_rest_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_list_gbp_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_gbp_accounts_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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.stub :transcode_list_gbp_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gbp_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_gbp_accounts parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new(parent: parent, 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_gbp_accounts({ parent: parent, 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new(parent: parent, 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_gbp_accounts_client_stub.call_count + end + end + end + + def test_link_gbp_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gbp_email = "hello world" + + link_gbp_account_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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::ServiceStub.stub :transcode_link_gbp_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, link_gbp_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.link_gbp_account parent: parent, gbp_email: gbp_email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb new file mode 100644 index 000000000000..beef6408a920 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1/gbpaccounts_services_pb" +require "google/shopping/merchant/accounts/v1/gbp_accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::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_list_gbp_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsResponse.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" + page_size = 42 + page_token = "hello world" + + list_gbp_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gbp_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_gbp_accounts_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_gbp_accounts({ parent: parent, 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_gbp_accounts parent: parent, 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_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new(parent: parent, 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_gbp_accounts({ parent: parent, 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_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1::ListGbpAccountsRequest.new(parent: parent, 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_gbp_accounts_client_stub.call_rpc_count + end + end + + def test_link_gbp_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountResponse.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" + gbp_email = "hello world" + + link_gbp_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :link_gbp_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["gbp_email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, link_gbp_account_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.link_gbp_account parent: parent, gbp_email: gbp_email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.link_gbp_account({ parent: parent, gbp_email: gbp_email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, link_gbp_account_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::Shopping::Merchant::Accounts::V1::GbpAccountsService::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::Shopping::Merchant::Accounts::V1::GbpAccountsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb new file mode 100644 index 000000000000..a6fb3a4ca30c --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/homepage_service" + +class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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_homepage_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.homepage_path account: "value0" + assert_equal "accounts/value0/homepage", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb new file mode 100644 index 000000000000..7f1cf08d4bd8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/homepage_pb" +require "google/shopping/merchant/accounts/v1/homepage_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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_get_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_get_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_homepage ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_homepage(::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_homepage_client_stub.call_count + end + end + end + + def test_update_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + homepage = {} + update_mask = {} + + update_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_update_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_homepage homepage: homepage, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_homepage ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_homepage({ homepage: homepage, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_homepage(::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_homepage_client_stub.call_count + end + end + end + + def test_claim_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + overwrite = true + + claim_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_claim_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, claim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.claim_homepage({ name: name, overwrite: overwrite }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.claim_homepage name: name, overwrite: overwrite do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.claim_homepage({ name: name, overwrite: overwrite }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, claim_homepage_client_stub.call_count + end + end + end + + def test_unclaim_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + unclaim_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::ServiceStub.stub :transcode_unclaim_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unclaim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.unclaim_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.unclaim_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.unclaim_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::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::Shopping::Merchant::Accounts::V1::HomepageService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb new file mode 100644 index 000000000000..1513e4d32066 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/homepage_pb" +require "google/shopping/merchant/accounts/v1/homepage_services_pb" +require "google/shopping/merchant/accounts/v1/homepage_service" + +class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::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_get_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.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" + + get_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_homepage ::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_homepage(::Google::Shopping::Merchant::Accounts::V1::GetHomepageRequest.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, get_homepage_client_stub.call_rpc_count + end + end + + def test_update_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.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. + homepage = {} + update_mask = {} + + update_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Homepage), request["homepage"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_homepage({ homepage: homepage, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_homepage homepage: homepage, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_homepage ::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_homepage({ homepage: homepage, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_homepage(::Google::Shopping::Merchant::Accounts::V1::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_homepage_client_stub.call_rpc_count + end + end + + def test_claim_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.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" + overwrite = true + + claim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :claim_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["overwrite"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, claim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.claim_homepage({ name: name, overwrite: overwrite }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.claim_homepage name: name, overwrite: overwrite do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.claim_homepage ::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.claim_homepage({ name: name, overwrite: overwrite }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.claim_homepage(::Google::Shopping::Merchant::Accounts::V1::ClaimHomepageRequest.new(name: name, overwrite: overwrite), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, claim_homepage_client_stub.call_rpc_count + end + end + + def test_unclaim_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Homepage.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" + + unclaim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unclaim_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unclaim_homepage_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.unclaim_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.unclaim_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.unclaim_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1::UnclaimHomepageRequest.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, unclaim_homepage_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::Shopping::Merchant::Accounts::V1::HomepageService::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::Shopping::Merchant::Accounts::V1::HomepageService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb new file mode 100644 index 000000000000..76ea34ffdeb3 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/lfp_providers_service" + +class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_lfp_provider_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_provider_path account: "value0", omnichannel_setting: "value1", lfp_provider: "value2" + assert_equal "accounts/value0/omnichannelSettings/value1/lfpProviders/value2", path + end + end + + def test_omnichannel_setting_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" + assert_equal "accounts/value0/omnichannelSettings/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb new file mode 100644 index 000000000000..618ffc2ac4eb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_rest_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_find_lfp_providers + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + find_lfp_providers_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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.stub :transcode_find_lfp_providers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, find_lfp_providers_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.find_lfp_providers parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new(parent: parent, 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.find_lfp_providers({ parent: parent, 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new(parent: parent, 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, find_lfp_providers_client_stub.call_count + end + end + end + + def test_link_lfp_provider + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + external_account_id = "hello world" + + link_lfp_provider_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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::ServiceStub.stub :transcode_link_lfp_provider_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, link_lfp_provider_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.link_lfp_provider name: name, external_account_id: external_account_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.link_lfp_provider({ name: name, external_account_id: external_account_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb new file mode 100644 index 000000000000..3061c126be51 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1/lfpproviders_services_pb" +require "google/shopping/merchant/accounts/v1/lfp_providers_service" + +class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::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_find_lfp_providers + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersResponse.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" + page_size = 42 + page_token = "hello world" + + find_lfp_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :find_lfp_providers, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, find_lfp_providers_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.find_lfp_providers({ parent: parent, 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.find_lfp_providers parent: parent, 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.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new(parent: parent, 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.find_lfp_providers({ parent: parent, 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.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1::FindLfpProvidersRequest.new(parent: parent, 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, find_lfp_providers_client_stub.call_rpc_count + end + end + + def test_link_lfp_provider + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderResponse.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" + external_account_id = "hello world" + + link_lfp_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :link_lfp_provider, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["external_account_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, link_lfp_provider_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.link_lfp_provider name: name, external_account_id: external_account_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.link_lfp_provider({ name: name, external_account_id: external_account_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1::LfpProvidersService::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::Shopping::Merchant::Accounts::V1::LfpProvidersService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb new file mode 100644 index 000000000000..ae8aa4abe758 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/omnichannel_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_omnichannel_setting_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" + assert_equal "accounts/value0/omnichannelSettings/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb new file mode 100644 index 000000000000..055f69fdef8b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_rest_test.rb @@ -0,0 +1,373 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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_get_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_omnichannel_setting_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_get_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_omnichannel_setting({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_omnichannel_setting name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_omnichannel_setting({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_omnichannel_setting_client_stub.call_count + end + end + end + + def test_list_omnichannel_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_omnichannel_settings_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_list_omnichannel_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_omnichannel_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_omnichannel_settings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new(parent: parent, 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_omnichannel_settings({ parent: parent, 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new(parent: parent, 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_omnichannel_settings_client_stub.call_count + end + end + end + + def test_create_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + omnichannel_setting = {} + + create_omnichannel_setting_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_create_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_omnichannel_setting_client_stub.call_count + end + end + end + + def test_update_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + omnichannel_setting = {} + update_mask = {} + + update_omnichannel_setting_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_update_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_omnichannel_setting_client_stub.call_count + end + end + end + + def test_request_inventory_verification + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + request_inventory_verification_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_request_inventory_verification_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, request_inventory_verification_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.request_inventory_verification({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.request_inventory_verification name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.request_inventory_verification({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb new file mode 100644 index 000000000000..4afa8bc1a588 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb @@ -0,0 +1,388 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1/omnichannelsettings_services_pb" +require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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_get_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.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" + + get_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_omnichannel_setting({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_omnichannel_setting name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_omnichannel_setting({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::GetOmnichannelSettingRequest.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, get_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_list_omnichannel_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsResponse.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" + page_size = 42 + page_token = "hello world" + + list_omnichannel_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_omnichannel_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_omnichannel_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_omnichannel_settings({ parent: parent, 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_omnichannel_settings parent: parent, 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_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new(parent: parent, 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_omnichannel_settings({ parent: parent, 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_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1::ListOmnichannelSettingsRequest.new(parent: parent, 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_omnichannel_settings_client_stub.call_rpc_count + end + end + + def test_create_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.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" + omnichannel_setting = {} + + create_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting), request["omnichannel_setting"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_update_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting.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. + omnichannel_setting = {} + update_mask = {} + + update_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSetting), request["omnichannel_setting"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_omnichannel_setting_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_request_inventory_verification + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationResponse.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" + + request_inventory_verification_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :request_inventory_verification, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, request_inventory_verification_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.request_inventory_verification({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.request_inventory_verification name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.request_inventory_verification({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1::RequestInventoryVerificationRequest.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, request_inventory_verification_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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb new file mode 100644 index 000000000000..201cb70d636d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/online_return_policy_service" + +class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_online_return_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.online_return_policy_path account: "value0", return_policy: "value1" + assert_equal "accounts/value0/onlineReturnPolicies/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb new file mode 100644 index 000000000000..b24caa684035 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_rest_test.rb @@ -0,0 +1,318 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1/online_return_policy_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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_get_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_get_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_online_return_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_online_return_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_online_return_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_online_return_policy_client_stub.call_count + end + end + end + + def test_list_online_return_policies + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_online_return_policies_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_list_online_return_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_online_return_policies_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_online_return_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_online_return_policies ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new(parent: parent, 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_online_return_policies({ parent: parent, 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new(parent: parent, 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_online_return_policies_client_stub.call_count + end + end + end + + def test_create_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + online_return_policy = {} + + create_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_create_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_online_return_policy_client_stub.call_count + end + end + end + + def test_delete_online_return_policy + # 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_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_delete_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_online_return_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_online_return_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_online_return_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb new file mode 100644 index 000000000000..2f4a992854b6 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1/online_return_policy_services_pb" +require "google/shopping/merchant/accounts/v1/online_return_policy_service" + +class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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_get_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.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" + + get_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_online_return_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_online_return_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_online_return_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::GetOnlineReturnPolicyRequest.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, get_online_return_policy_client_stub.call_rpc_count + end + end + + def test_list_online_return_policies + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesResponse.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" + page_size = 42 + page_token = "hello world" + + list_online_return_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_online_return_policies, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_online_return_policies_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_online_return_policies({ parent: parent, 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_online_return_policies parent: parent, 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_online_return_policies ::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new(parent: parent, 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_online_return_policies({ parent: parent, 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_online_return_policies(::Google::Shopping::Merchant::Accounts::V1::ListOnlineReturnPoliciesRequest.new(parent: parent, 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_online_return_policies_client_stub.call_rpc_count + end + end + + def test_create_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy.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" + online_return_policy = {} + + create_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy), request["online_return_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_online_return_policy_client_stub.call_rpc_count + end + end + + def test_delete_online_return_policy + # 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_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_online_return_policy_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_online_return_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_online_return_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_online_return_policy({ 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_online_return_policy(::Google::Shopping::Merchant::Accounts::V1::DeleteOnlineReturnPolicyRequest.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_online_return_policy_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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb new file mode 100644 index 000000000000..108fc70d80f7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/programs_service" + +class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb new file mode 100644 index 000000000000..1dc65bcafab5 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/programs_pb" +require "google/shopping/merchant/accounts/v1/programs_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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_get_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_get_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_program ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_program(::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_program_client_stub.call_count + end + end + end + + def test_list_programs + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_programs_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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_list_programs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_programs_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_programs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_programs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_programs ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new(parent: parent, 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_programs({ parent: parent, 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_programs(::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new(parent: parent, 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_programs_client_stub.call_count + end + end + end + + def test_enable_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_enable_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.enable_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.enable_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.enable_program ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.enable_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.enable_program(::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_program_client_stub.call_count + end + end + end + + def test_disable_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::ServiceStub.stub :transcode_disable_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.disable_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.disable_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.disable_program ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.disable_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.disable_program(::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::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::Shopping::Merchant::Accounts::V1::ProgramsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb new file mode 100644 index 000000000000..4825eb1f6562 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb @@ -0,0 +1,326 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/programs_pb" +require "google/shopping/merchant/accounts/v1/programs_services_pb" +require "google/shopping/merchant/accounts/v1/programs_service" + +class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::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_get_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.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" + + get_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_program ::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_program(::Google::Shopping::Merchant::Accounts::V1::GetProgramRequest.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, get_program_client_stub.call_rpc_count + end + end + + def test_list_programs + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListProgramsResponse.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" + page_size = 42 + page_token = "hello world" + + list_programs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_programs, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_programs_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_programs({ parent: parent, 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_programs parent: parent, 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_programs ::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new(parent: parent, 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_programs({ parent: parent, 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_programs(::Google::Shopping::Merchant::Accounts::V1::ListProgramsRequest.new(parent: parent, 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_programs_client_stub.call_rpc_count + end + end + + def test_enable_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.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" + + enable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.enable_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.enable_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.enable_program ::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.enable_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.enable_program(::Google::Shopping::Merchant::Accounts::V1::EnableProgramRequest.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, enable_program_client_stub.call_rpc_count + end + end + + def test_disable_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Program.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" + + disable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_program_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.disable_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.disable_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.disable_program ::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.disable_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.disable_program(::Google::Shopping::Merchant::Accounts::V1::DisableProgramRequest.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, disable_program_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::Shopping::Merchant::Accounts::V1::ProgramsService::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::Shopping::Merchant::Accounts::V1::ProgramsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb new file mode 100644 index 000000000000..e61ff2bed629 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/regions_service" + +class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_region_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.region_path account: "value0", region: "value1" + assert_equal "accounts/value0/regions/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb new file mode 100644 index 000000000000..6a6f7ac6e47e --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_rest_test.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/regions_pb" +require "google/shopping/merchant/accounts/v1/regions_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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_get_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_region_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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_get_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_region({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_region name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_region ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_region({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_region(::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_region_client_stub.call_count + end + end + end + + def test_create_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + region_id = "hello world" + region = {} + + create_region_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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_create_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_region({ parent: parent, region_id: region_id, region: region }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_region parent: parent, region_id: region_id, region: region do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_region ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_region({ parent: parent, region_id: region_id, region: region }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_region(::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_region_client_stub.call_count + end + end + end + + def test_update_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + region = {} + update_mask = {} + + update_region_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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_update_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_region({ region: region, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_region region: region, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_region ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_region({ region: region, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_region(::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_region_client_stub.call_count + end + end + end + + def test_delete_region + # 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_region_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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_delete_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_region({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_region name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_region ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_region({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_region(::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_region_client_stub.call_count + end + end + end + + def test_list_regions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_regions_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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::ServiceStub.stub :transcode_list_regions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_regions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_regions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_regions ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new(parent: parent, 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_regions({ parent: parent, 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_regions(::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new(parent: parent, 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_regions_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::Shopping::Merchant::Accounts::V1::RegionsService::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::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb new file mode 100644 index 000000000000..d44f0f8fc523 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/regions_pb" +require "google/shopping/merchant/accounts/v1/regions_services_pb" +require "google/shopping/merchant/accounts/v1/regions_service" + +class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::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_get_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.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" + + get_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_region({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_region name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_region ::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_region({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_region(::Google::Shopping::Merchant::Accounts::V1::GetRegionRequest.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, get_region_client_stub.call_rpc_count + end + end + + def test_create_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.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" + region_id = "hello world" + region = {} + + create_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["region_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Region), request["region"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_region({ parent: parent, region_id: region_id, region: region }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_region parent: parent, region_id: region_id, region: region do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_region ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_region({ parent: parent, region_id: region_id, region: region }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_region(::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_region_client_stub.call_rpc_count + end + end + + def test_update_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::Region.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. + region = {} + update_mask = {} + + update_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::Region), request["region"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_region({ region: region, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_region region: region, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_region ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_region({ region: region, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_region(::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest.new(region: region, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_region_client_stub.call_rpc_count + end + end + + def test_delete_region + # 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_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_region_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_region({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_region name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_region ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_region({ 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_region(::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest.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_region_client_stub.call_rpc_count + end + end + + def test_list_regions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse.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" + page_size = 42 + page_token = "hello world" + + list_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_regions, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_regions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_regions({ parent: parent, 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_regions parent: parent, 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_regions ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new(parent: parent, 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_regions({ parent: parent, 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_regions(::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest.new(parent: parent, 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_regions_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::Shopping::Merchant::Accounts::V1::RegionsService::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::Shopping::Merchant::Accounts::V1::RegionsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb new file mode 100644 index 000000000000..6285f948eb62 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/shipping_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_shipping_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.shipping_settings_path account: "value0" + assert_equal "accounts/value0/shippingSettings", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb new file mode 100644 index 000000000000..0fc0c22210e4 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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_get_shipping_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shipping_settings_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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.stub :transcode_get_shipping_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_shipping_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_shipping_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_shipping_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_shipping_settings_client_stub.call_count + end + end + end + + def test_insert_shipping_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + shipping_setting = {} + + insert_shipping_settings_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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::ServiceStub.stub :transcode_insert_shipping_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb new file mode 100644 index 000000000000..437b6f601cda --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1/shippingsettings_services_pb" +require "google/shopping/merchant/accounts/v1/shipping_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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_get_shipping_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.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" + + get_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_shipping_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_shipping_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_shipping_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_shipping_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::GetShippingSettingsRequest.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, get_shipping_settings_client_stub.call_rpc_count + end + end + + def test_insert_shipping_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings.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" + shipping_setting = {} + + insert_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_shipping_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::ShippingSettings), request["shipping_setting"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_shipping_settings_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_shipping_settings_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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1::ShippingSettingsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb new file mode 100644 index 000000000000..5bb8bea5a6a8 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_agreement_state_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_agreement_state_path account: "value0", identifier: "value1" + assert_equal "accounts/value0/termsOfServiceAgreementStates/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb new file mode 100644 index 000000000000..1bc549ff3fbb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_rest_test.rb @@ -0,0 +1,207 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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_get_terms_of_service_agreement_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_get_terms_of_service_agreement_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_terms_of_service_agreement_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_terms_of_service_agreement_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_terms_of_service_agreement_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_count + end + end + end + + def test_retrieve_for_application_terms_of_service_agreement_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_retrieve_for_application_terms_of_service_agreement_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb new file mode 100644 index 000000000000..945ab074fc81 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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_get_terms_of_service_agreement_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.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" + + get_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_terms_of_service_agreement_state, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_terms_of_service_agreement_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_terms_of_service_agreement_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_terms_of_service_agreement_state({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceAgreementStateRequest.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, get_terms_of_service_agreement_state_client_stub.call_rpc_count + end + end + + def test_retrieve_for_application_terms_of_service_agreement_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementState.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" + + retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_for_application_terms_of_service_agreement_state, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.retrieve_for_application_terms_of_service_agreement_state parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb new file mode 100644 index 000000000000..300b12fe0410 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/terms_of_service_service" + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_path version: "value0" + assert_equal "termsOfService/value0", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb new file mode 100644 index 000000000000..61f199ee4deb --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofservice_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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_get_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_get_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_terms_of_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_terms_of_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_terms_of_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_terms_of_service_client_stub.call_count + end + end + end + + def test_retrieve_latest_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + region_code = "hello world" + kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED + + retrieve_latest_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_retrieve_latest_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_latest_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_count + end + end + end + + def test_accept_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + account = "hello world" + region_code = "hello world" + + accept_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::ServiceStub.stub :transcode_accept_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, accept_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.accept_terms_of_service name: name, account: account, region_code: region_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb new file mode 100644 index 000000000000..299943c9c8d7 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/termsofservice_pb" +require "google/shopping/merchant/accounts/v1/termsofservice_services_pb" +require "google/shopping/merchant/accounts/v1/terms_of_service_service" + +class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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_get_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.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" + + get_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_terms_of_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_terms_of_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_terms_of_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::GetTermsOfServiceRequest.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, get_terms_of_service_client_stub.call_rpc_count + end + end + + def test_retrieve_latest_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::TermsOfService.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. + region_code = "hello world" + kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED + + retrieve_latest_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_latest_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest, request + assert_equal "hello world", request["region_code"] + assert_equal :TERMS_OF_SERVICE_KIND_UNSPECIFIED, request["kind"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_latest_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_rpc_count + end + end + + def test_accept_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceResponse.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" + account = "hello world" + region_code = "hello world" + + accept_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :accept_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["account"] + assert_equal "hello world", request["region_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, accept_terms_of_service_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.accept_terms_of_service name: name, account: account, region_code: region_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.accept_terms_of_service({ name: name, account: account, region_code: region_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, accept_terms_of_service_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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1::TermsOfServiceService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb new file mode 100644 index 000000000000..39d801555f11 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/user_service" + +class ::Google::Shopping::Merchant::Accounts::V1::UserService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1", path + end + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb new file mode 100644 index 000000000000..9649198d6127 --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_rest_test.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/user_pb" +require "google/shopping/merchant/accounts/v1/user_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1::UserService::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_get_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_user_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::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_get_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_user({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_user name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_user ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_user({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_user(::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_user_client_stub.call_count + end + end + end + + def test_create_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_id = "hello world" + user = {} + + create_user_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::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_create_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_user({ parent: parent, user_id: user_id, user: user }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_user parent: parent, user_id: user_id, user: user do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_user ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_user({ parent: parent, user_id: user_id, user: user }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_user(::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_user_client_stub.call_count + end + end + end + + def test_delete_user + # 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_user_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::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_user({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_user name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_user ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_user({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_user(::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_count + end + end + end + + def test_update_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + user = {} + update_mask = {} + + update_user_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::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_update_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_user({ user: user, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_user user: user, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_user ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_user({ user: user, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_user(::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_user_client_stub.call_count + end + end + end + + def test_list_users + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_users_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::Shopping::Merchant::Accounts::V1::UserService::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_users_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_users({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_users parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_users ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new(parent: parent, 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_users({ parent: parent, 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_users(::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new(parent: parent, 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_users_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::Shopping::Merchant::Accounts::V1::UserService::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::Shopping::Merchant::Accounts::V1::UserService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb new file mode 100644 index 000000000000..02939760495b --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/accounts/v1/user_pb" +require "google/shopping/merchant/accounts/v1/user_services_pb" +require "google/shopping/merchant/accounts/v1/user_service" + +class ::Google::Shopping::Merchant::Accounts::V1::UserService::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_get_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.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" + + get_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_user({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_user name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_user ::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_user({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_user(::Google::Shopping::Merchant::Accounts::V1::GetUserRequest.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, get_user_client_stub.call_rpc_count + end + end + + def test_create_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.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" + user_id = "hello world" + user = {} + + create_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["user_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::User), request["user"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_user({ parent: parent, user_id: user_id, user: user }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_user parent: parent, user_id: user_id, user: user do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_user ::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_user({ parent: parent, user_id: user_id, user: user }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_user(::Google::Shopping::Merchant::Accounts::V1::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_user_client_stub.call_rpc_count + end + end + + def test_delete_user + # 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_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_user({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_user name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_user ::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_user({ 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_user(::Google::Shopping::Merchant::Accounts::V1::DeleteUserRequest.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_user_client_stub.call_rpc_count + end + end + + def test_update_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::User.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. + user = {} + update_mask = {} + + update_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1::User), request["user"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_user_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_user({ user: user, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_user user: user, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_user ::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_user({ user: user, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_user(::Google::Shopping::Merchant::Accounts::V1::UpdateUserRequest.new(user: user, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_user_client_stub.call_rpc_count + end + end + + def test_list_users + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1::ListUsersResponse.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" + page_size = 42 + page_token = "hello world" + + list_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_users, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_users_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Accounts::V1::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_users({ parent: parent, 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_users parent: parent, 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_users ::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new(parent: parent, 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_users({ parent: parent, 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_users(::Google::Shopping::Merchant::Accounts::V1::ListUsersRequest.new(parent: parent, 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_users_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::Shopping::Merchant::Accounts::V1::UserService::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::Shopping::Merchant::Accounts::V1::UserService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-accounts-v1/test/helper.rb b/google-shopping-merchant-accounts-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-accounts-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 00449a81c87c..a743c6011fa7 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1827,6 +1827,10 @@ "component": "google-shopping-merchant-accounts", "version_file": "lib/google/shopping/merchant/accounts/version.rb" }, + "google-shopping-merchant-accounts-v1": { + "component": "google-shopping-merchant-accounts-v1", + "version_file": "lib/google/shopping/merchant/accounts/v1/version.rb" + }, "google-shopping-merchant-accounts-v1beta": { "component": "google-shopping-merchant-accounts-v1beta", "version_file": "lib/google/shopping/merchant/accounts/v1beta/version.rb" From 734b7deb44b11eab6c523e910fa269cb03aac0a0 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:33:41 -0700 Subject: [PATCH 361/457] feat: Initial generation of google-shopping-merchant-promotions-v1 (#30771) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 54 ++ .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++++ .../README.md | 154 ++++ .../Rakefile | 169 +++++ .../gapic_metadata.json | 33 + ...le-shopping-merchant-promotions-v1.gemspec | 29 + .../google-shopping-merchant-promotions-v1.rb | 21 + .../google/shopping/merchant/promotions/v1.rb | 47 ++ .../promotions/v1/promotions_common_pb.rb | 62 ++ .../merchant/promotions/v1/promotions_pb.rb | 57 ++ .../promotions/v1/promotions_service.rb | 57 ++ .../v1/promotions_service/client.rb | 684 ++++++++++++++++++ .../v1/promotions_service/credentials.rb | 49 ++ .../promotions/v1/promotions_service/paths.rb | 52 ++ .../promotions/v1/promotions_service/rest.rb | 54 ++ .../v1/promotions_service/rest/client.rb | 637 ++++++++++++++++ .../promotions_service/rest/service_stub.rb | 267 +++++++ .../promotions/v1/promotions_services_pb.rb | 60 ++ .../shopping/merchant/promotions/v1/rest.rb | 39 + .../merchant/promotions/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++++++++++++ .../proto_docs/google/api/field_behavior.rb | 85 +++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 ++++++ .../proto_docs/google/protobuf/duration.rb | 98 +++ .../proto_docs/google/protobuf/timestamp.rb | 127 ++++ .../merchant/promotions/v1/promotions.rb | 176 +++++ .../promotions/v1/promotions_common.rb | 446 ++++++++++++ .../proto_docs/google/shopping/type/types.rb | 210 ++++++ .../proto_docs/google/type/interval.rb | 45 ++ .../snippets/Gemfile | 32 + .../promotions_service/get_promotion.rb | 47 ++ .../promotions_service/insert_promotion.rb | 47 ++ .../promotions_service/list_promotions.rb | 51 ++ ...oogle.shopping.merchant.promotions.v1.json | 135 ++++ .../v1/promotions_service_paths_test.rb | 55 ++ .../v1/promotions_service_rest_test.rb | 265 +++++++ .../promotions/v1/promotions_service_test.rb | 272 +++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 51 files changed, 5903 insertions(+) create mode 100644 google-shopping-merchant-promotions-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-promotions-v1/.gitignore create mode 100644 google-shopping-merchant-promotions-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-promotions-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-promotions-v1/.rubocop.yml create mode 100644 google-shopping-merchant-promotions-v1/.toys.rb create mode 100644 google-shopping-merchant-promotions-v1/.yardopts create mode 100644 google-shopping-merchant-promotions-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-promotions-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-promotions-v1/Gemfile create mode 100644 google-shopping-merchant-promotions-v1/LICENSE.md create mode 100644 google-shopping-merchant-promotions-v1/README.md create mode 100644 google-shopping-merchant-promotions-v1/Rakefile create mode 100644 google-shopping-merchant-promotions-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec create mode 100644 google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb create mode 100644 google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb create mode 100644 google-shopping-merchant-promotions-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb create mode 100644 google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb create mode 100644 google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb create mode 100644 google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json create mode 100644 google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb create mode 100644 google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb create mode 100644 google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb create mode 100644 google-shopping-merchant-promotions-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7aed80400fc2..b03f39227469 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -955,6 +955,8 @@ "google-shopping-merchant-products-v1beta+FILLER": "0.0.0", "google-shopping-merchant-promotions": "0.2.1", "google-shopping-merchant-promotions+FILLER": "0.0.0", + "google-shopping-merchant-promotions-v1": "0.0.1", + "google-shopping-merchant-promotions-v1+FILLER": "0.0.0", "google-shopping-merchant-promotions-v1beta": "0.4.0", "google-shopping-merchant-promotions-v1beta+FILLER": "0.0.0", "google-shopping-merchant-quota": "0.2.1", diff --git a/google-shopping-merchant-promotions-v1/.OwlBot.yaml b/google-shopping-merchant-promotions-v1/.OwlBot.yaml new file mode 100644 index 000000000000..8d6f1964f632 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/promotions/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-promotions-v1/$1 diff --git a/google-shopping-merchant-promotions-v1/.gitignore b/google-shopping-merchant-promotions-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-promotions-v1/.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/google-shopping-merchant-promotions-v1/.owlbot-manifest.json b/google-shopping-merchant-promotions-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..4e8cdea1bd1c --- /dev/null +++ b/google-shopping-merchant-promotions-v1/.owlbot-manifest.json @@ -0,0 +1,54 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-promotions-v1.gemspec", + "lib/google-shopping-merchant-promotions-v1.rb", + "lib/google/shopping/merchant/promotions/v1.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_pb.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_service.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb", + "lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb", + "lib/google/shopping/merchant/promotions/v1/rest.rb", + "lib/google/shopping/merchant/promotions/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/shopping/merchant/promotions/v1/promotions.rb", + "proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb", + "proto_docs/google/shopping/type/types.rb", + "proto_docs/google/type/interval.rb", + "snippets/Gemfile", + "snippets/promotions_service/get_promotion.rb", + "snippets/promotions_service/insert_promotion.rb", + "snippets/promotions_service/list_promotions.rb", + "snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json", + "test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb", + "test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb", + "test/google/shopping/merchant/promotions/v1/promotions_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-promotions-v1/.repo-metadata.json b/google-shopping-merchant-promotions-v1/.repo-metadata.json new file mode 100644 index 000000000000..84693936bf05 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-promotions-v1", + "distribution_name": "google-shopping-merchant-promotions-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-promotions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-promotions-v1/.rubocop.yml b/google-shopping-merchant-promotions-v1/.rubocop.yml new file mode 100644 index 000000000000..2b674ecd7332 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-promotions-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-promotions-v1.rb" diff --git a/google-shopping-merchant-promotions-v1/.toys.rb b/google-shopping-merchant-promotions-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-promotions-v1/.yardopts b/google-shopping-merchant-promotions-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-promotions-v1/AUTHENTICATION.md b/google-shopping-merchant-promotions-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..24ed851eb83d --- /dev/null +++ b/google-shopping-merchant-promotions-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-promotions-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-promotions-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/promotions/v1" + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/promotions/v1" + +::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-shopping-merchant-promotions-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/promotions/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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/google-shopping-merchant-promotions-v1/CHANGELOG.md b/google-shopping-merchant-promotions-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-promotions-v1/Gemfile b/google-shopping-merchant-promotions-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-promotions-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-promotions-v1/LICENSE.md b/google-shopping-merchant-promotions-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-promotions-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-promotions-v1/README.md b/google-shopping-merchant-promotions-v1/README.md new file mode 100644 index 000000000000..96acad648b8f --- /dev/null +++ b/google-shopping-merchant-promotions-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-promotions](https://rubygems.org/gems/google-shopping-merchant-promotions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-promotions-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/promotions/v1" + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new +request = ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new # (request fields as keyword arguments...) +response = client.insert_promotion request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-promotions-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/promotions/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-shopping-merchant-promotions`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-promotions-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-promotions`. +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-shopping-merchant-promotions-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-promotions-v1/Rakefile b/google-shopping-merchant-promotions-v1/Rakefile new file mode 100644 index 000000000000..b09874dc29fb --- /dev/null +++ b/google-shopping-merchant-promotions-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-promotions-v1 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/shopping/merchant/promotions/v1/promotions_service/credentials" + ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-shopping-merchant-promotions-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-promotions-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-promotions-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-promotions-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-promotions-v1" + header "google-shopping-merchant-promotions-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-promotions-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-promotions-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-promotions-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-promotions-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-promotions-v1/gapic_metadata.json b/google-shopping-merchant-promotions-v1/gapic_metadata.json new file mode 100644 index 000000000000..314936333345 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.promotions.v1", + "libraryPackage": "::Google::Shopping::Merchant::Promotions::V1", + "services": { + "PromotionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client", + "rpcs": { + "InsertPromotion": { + "methods": [ + "insert_promotion" + ] + }, + "GetPromotion": { + "methods": [ + "get_promotion" + ] + }, + "ListPromotions": { + "methods": [ + "list_promotions" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec b/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec new file mode 100644 index 000000000000..f06ece6662ce --- /dev/null +++ b/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/promotions/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-promotions-v1" + gem.version = Google::Shopping::Merchant::Promotions::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-promotions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb b/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb new file mode 100644 index 000000000000..61e45c3b1a94 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1" diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb new file mode 100644 index 000000000000..9d796242bfc9 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_service" +require "google/shopping/merchant/promotions/v1/version" + +module Google + module Shopping + module Merchant + module Promotions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/promotions/v1" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/promotions/v1" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/promotions/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb new file mode 100644 index 000000000000..53d74bf5dca8 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/promotions/v1/promotions_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n>google/shopping/merchant/promotions/v1/promotions_common.proto\x12&google.shopping.merchant.promotions.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xc5\x0b\n\nAttributes\x12`\n\x15product_applicability\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.promotions.v1.ProductApplicabilityB\x03\xe0\x41\x02\x12J\n\noffer_type\x18\x02 \x01(\x0e\x32\x31.google.shopping.merchant.promotions.v1.OfferTypeB\x03\xe0\x41\x02\x12$\n\x17generic_redemption_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nlong_title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12W\n\x11\x63oupon_value_type\x18\x05 \x01(\x0e\x32\x37.google.shopping.merchant.promotions.v1.CouponValueTypeB\x03\xe0\x41\x02\x12V\n\x16promotion_destinations\x18\x06 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x02\x12\x1e\n\x11item_id_inclusion\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_inclusion\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_inclusion\x18\t \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_inclusion\x18\n \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11item_id_exclusion\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_exclusion\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_exclusion\x18\r \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_exclusion\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x41\n\x17minimum_purchase_amount\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12&\n\x19minimum_purchase_quantity\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1b\n\x0elimit_quantity\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01\x12\x35\n\x0blimit_value\x18\x12 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x18\n\x0bpercent_off\x18\x13 \x01(\x03\x42\x03\xe0\x41\x01\x12:\n\x10money_off_amount\x18\x14 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12)\n\x1cget_this_quantity_discounted\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01\x12\x39\n\x0f\x66ree_gift_value\x18\x16 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\"\n\x15\x66ree_gift_description\x18\x17 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ree_gift_item_id\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x1fpromotion_effective_time_period\x18\x19 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x41\n\x1dpromotion_display_time_period\x18\x1a \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\\\n\x13store_applicability\x18\x1c \x01(\x0e\x32:.google.shopping.merchant.promotions.v1.StoreApplicabilityB\x03\xe0\x41\x01\x12\"\n\x15store_codes_inclusion\x18\x1d \x03(\tB\x03\xe0\x41\x01\x12\"\n\x15store_codes_exclusion\x18\x1e \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rpromotion_url\x18\x1f \x01(\tB\x03\xe0\x41\x01\"\x81\t\n\x0fPromotionStatus\x12l\n\x14\x64\x65stination_statuses\x18\x01 \x03(\x0b\x32I.google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatusB\x03\xe0\x41\x03\x12\x66\n\x11item_level_issues\x18\x02 \x03(\x0b\x32\x46.google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssueB\x03\xe0\x41\x03\x12\x36\n\rcreation_date\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_date\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\xc4\x02\n\x11\x44\x65stinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x64\n\x06status\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus.StateB\x03\xe0\x41\x03\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\x12\x08\n\x04LIVE\x10\x03\x12\x0b\n\x07STOPPED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x12\x0b\n\x07PENDING\x10\x06\x1a\xdd\x03\n\x0eItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x66\n\x08severity\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61pplicable_countries\x18\t \x03(\tB\x03\xe0\x41\x03\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03*f\n\x14ProductApplicability\x12%\n!PRODUCT_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LL_PRODUCTS\x10\x01\x12\x15\n\x11SPECIFIC_PRODUCTS\x10\x02*^\n\x12StoreApplicability\x12#\n\x1fSTORE_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSPECIFIC_STORES\x10\x02*F\n\tOfferType\x12\x1a\n\x16OFFER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NO_CODE\x10\x01\x12\x10\n\x0cGENERIC_CODE\x10\x02*Q\n\x11RedemptionChannel\x12\"\n\x1eREDEMPTION_CHANNEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STORE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\xd9\x02\n\x0f\x43ouponValueType\x12!\n\x1d\x43OUPON_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tMONEY_OFF\x10\x01\x12\x0f\n\x0bPERCENT_OFF\x10\x02\x12\x19\n\x15\x42UY_M_GET_N_MONEY_OFF\x10\x03\x12\x1b\n\x17\x42UY_M_GET_N_PERCENT_OFF\x10\x04\x12\x17\n\x13\x42UY_M_GET_MONEY_OFF\x10\x05\x12\x19\n\x15\x42UY_M_GET_PERCENT_OFF\x10\x06\x12\r\n\tFREE_GIFT\x10\x07\x12\x18\n\x14\x46REE_GIFT_WITH_VALUE\x10\x08\x12\x1a\n\x16\x46REE_GIFT_WITH_ITEM_ID\x10\t\x12\x1a\n\x16\x46REE_SHIPPING_STANDARD\x10\n\x12\x1b\n\x17\x46REE_SHIPPING_OVERNIGHT\x10\x0b\x12\x19\n\x15\x46REE_SHIPPING_TWO_DAY\x10\x0c\x42\x96\x02\n*com.google.shopping.merchant.promotions.v1B\x15PromotionsCommonProtoP\x01ZPcloud.google.com/go/shopping/merchant/promotions/apiv1/promotionspb;promotionspb\xaa\x02&Google.Shopping.Merchant.Promotions.V1\xca\x02&Google\\Shopping\\Merchant\\Promotions\\V1\xea\x02*Google::Shopping::Merchant::Promotions::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.type.Interval", "google/type/interval.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Promotions + module V1 + Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.Attributes").msgclass + PromotionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus").msgclass + PromotionStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus").msgclass + PromotionStatus::DestinationStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus.State").enummodule + PromotionStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue").msgclass + PromotionStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue.Severity").enummodule + ProductApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ProductApplicability").enummodule + StoreApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.StoreApplicability").enummodule + OfferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.OfferType").enummodule + RedemptionChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.RedemptionChannel").enummodule + CouponValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.CouponValueType").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb new file mode 100644 index 000000000000..4867a2a16fa2 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/promotions/v1/promotions.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/shopping/merchant/promotions/v1/promotions_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n7google/shopping/merchant/promotions/v1/promotions.proto\x12&google.shopping.merchant.promotions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a>google/shopping/merchant/promotions/v1/promotions_common.proto\x1a google/shopping/type/types.proto\"\xf9\x04\n\tPromotion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0cpromotion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0etarget_country\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x12redemption_channel\x18\x05 \x03(\x0e\x32\x39.google.shopping.merchant.promotions.v1.RedemptionChannelB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12K\n\nattributes\x18\x07 \x01(\x0b\x32\x32.google.shopping.merchant.promotions.v1.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12V\n\x10promotion_status\x18\t \x01(\x0b\x32\x37.google.shopping.merchant.promotions.v1.PromotionStatusB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01:k\xea\x41h\n$merchantapi.googleapis.com/Promotion\x12)accounts/{account}/promotions/{promotion}*\npromotions2\tpromotionB\x11\n\x0f_version_number\"\x92\x01\n\x16InsertPromotionRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\tpromotion\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.promotions.v1.PromotionB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Q\n\x13GetPromotionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$merchantapi.googleapis.com/Promotion\"]\n\x15ListPromotionsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"x\n\x16ListPromotionsResponse\x12\x45\n\npromotions\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.promotions.v1.Promotion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xb5\x05\n\x11PromotionsService\x12\xc5\x01\n\x0fInsertPromotion\x12>.google.shopping.merchant.promotions.v1.InsertPromotionRequest\x1a\x31.google.shopping.merchant.promotions.v1.Promotion\"?\x82\xd3\xe4\x93\x02\x39\"4/promotions/v1/{parent=accounts/*}/promotions:insert:\x01*\x12\xbc\x01\n\x0cGetPromotion\x12;.google.shopping.merchant.promotions.v1.GetPromotionRequest\x1a\x31.google.shopping.merchant.promotions.v1.Promotion\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/promotions/v1/{name=accounts/*/promotions/*}\x12\xcf\x01\n\x0eListPromotions\x12=.google.shopping.merchant.promotions.v1.ListPromotionsRequest\x1a>.google.shopping.merchant.promotions.v1.ListPromotionsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/promotions/v1/{parent=accounts/*}/promotions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcb\x02\n*com.google.shopping.merchant.promotions.v1B\x0fPromotionsProtoP\x01ZPcloud.google.com/go/shopping/merchant/promotions/apiv1/promotionspb;promotionspb\xaa\x02&Google.Shopping.Merchant.Promotions.V1\xca\x02&Google\\Shopping\\Merchant\\Promotions\\V1\xea\x02*Google::Shopping::Merchant::Promotions::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.merchant.promotions.v1.Attributes", "google/shopping/merchant/promotions/v1/promotions_common.proto"], + ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Promotions + module V1 + Promotion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.Promotion").msgclass + InsertPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.InsertPromotionRequest").msgclass + GetPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.GetPromotionRequest").msgclass + ListPromotionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ListPromotionsRequest").msgclass + ListPromotionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ListPromotionsResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb new file mode 100644 index 000000000000..c156a1de1a94 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/version" + +require "google/shopping/merchant/promotions/v1/promotions_service/credentials" +require "google/shopping/merchant/promotions/v1/promotions_service/paths" +require "google/shopping/merchant/promotions/v1/promotions_service/client" +require "google/shopping/merchant/promotions/v1/promotions_service/rest" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + ## + # Service to manage promotions for products. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/promotions/v1/promotions_service" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/promotions/v1/promotions_service/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + module PromotionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "promotions_service", "helpers.rb" +require "google/shopping/merchant/promotions/v1/promotions_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb new file mode 100644 index 000000000000..91dc65ec30b6 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb @@ -0,0 +1,684 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_pb" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + ## + # Client for the PromotionsService service. + # + # Service to manage promotions for products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :promotions_service_stub + + ## + # Configure the PromotionsService Client class. + # + # See {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PromotionsService clients + # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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", "Shopping", "Merchant", "Promotions", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 PromotionsService 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::Shopping::Merchant::Promotions::V1::PromotionsService::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 + @promotions_service_stub.universe_domain + end + + ## + # Create a new PromotionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PromotionsService 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/shopping/merchant/promotions/v1/promotions_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 + + @promotions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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 + ) + + @promotions_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 + @promotions_service_stub.logger + end + + # Service calls + + ## + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + # + # @overload insert_promotion(request, options = nil) + # Pass arguments to `insert_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::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 insert_promotion(parent: nil, promotion: nil, data_source: nil) + # Pass arguments to `insert_promotion` 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 account where the promotion will be inserted. + # Format: accounts/\\{account} + # @param promotion [::Google::Shopping::Merchant::Promotions::V1::Promotion, ::Hash] + # Required. The promotion to insert. + # @param data_source [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new + # + # # Call the insert_promotion method. + # result = client.insert_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + # p result + # + def insert_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest + + # 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.insert_promotion.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::Shopping::Merchant::Promotions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_promotion.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :insert_promotion, 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 + + ## + # Retrieves the promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + # + # @overload get_promotion(request, options = nil) + # Pass arguments to `get_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::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_promotion(name: nil) + # Pass arguments to `get_promotion` 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 name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new + # + # # Call the get_promotion method. + # result = client.get_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + # p result + # + def get_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest + + # 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_promotion.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::Shopping::Merchant::Promotions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_promotion.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :get_promotion, 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 the promotions in your Merchant Center account. The + # response might contain fewer items than specified by `pageSize`. Rely on + # `pageToken` to determine if there are more items to be requested. + # + # After inserting or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + # + # @overload list_promotions(request, options = nil) + # Pass arguments to `list_promotions` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::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_promotions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_promotions` 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 account to list processed promotions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of promotions to return. The service may + # return fewer than this value. The maximum value is 250; values above 250 + # will be coerced to 250. If unspecified, the maximum number of promotions + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPromotions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPromotions` 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::Shopping::Merchant::Promotions::V1::Promotion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1::Promotion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new + # + # # Call the list_promotions method. + # result = client.list_promotions 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::Shopping::Merchant::Promotions::V1::Promotion. + # p item + # end + # + def list_promotions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest + + # 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_promotions.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::Shopping::Merchant::Promotions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_promotions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_promotions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :list_promotions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @promotions_service_stub, :list_promotions, 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 PromotionsService API. + # + # This class represents the configuration for PromotionsService, + # 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::Shopping::Merchant::Promotions::V1::PromotionsService::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 + # # insert_promotion to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 PromotionsService 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 `insert_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_promotion + ## + # RPC-specific configuration for `get_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :get_promotion + ## + # RPC-specific configuration for `list_promotions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_promotions + + # @private + def initialize parent_rpcs = nil + insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion + @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config + get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion + @get_promotion = ::Gapic::Config::Method.new get_promotion_config + list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions + @list_promotions = ::Gapic::Config::Method.new list_promotions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb new file mode 100644 index 000000000000..85d174c3ebf1 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + # Credentials for the PromotionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb new file mode 100644 index 000000000000..aa61830b2295 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + # Path helper methods for the PromotionsService API. + module Paths + ## + # Create a fully-qualified Promotion resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/promotions/{promotion}` + # + # @param account [String] + # @param promotion [String] + # + # @return [::String] + def promotion_path account:, promotion: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/promotions/#{promotion}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb new file mode 100644 index 000000000000..01f9f743295b --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/version" + +require "google/shopping/merchant/promotions/v1/promotions_service/credentials" +require "google/shopping/merchant/promotions/v1/promotions_service/paths" +require "google/shopping/merchant/promotions/v1/promotions_service/rest/client" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + ## + # Service to manage promotions for products. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/promotions/v1/promotions_service/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + module PromotionsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/promotions/v1/promotions_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb new file mode 100644 index 000000000000..a33c82a407f1 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb @@ -0,0 +1,637 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_pb" +require "google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + module Rest + ## + # REST client for the PromotionsService service. + # + # Service to manage promotions for products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :promotions_service_stub + + ## + # Configure the PromotionsService Client class. + # + # See {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PromotionsService clients + # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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", "Shopping", "Merchant", "Promotions", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 PromotionsService 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::Shopping::Merchant::Promotions::V1::PromotionsService::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 + @promotions_service_stub.universe_domain + end + + ## + # Create a new PromotionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PromotionsService 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 + + @promotions_service_stub = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @promotions_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 + @promotions_service_stub.logger + end + + # Service calls + + ## + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + # + # @overload insert_promotion(request, options = nil) + # Pass arguments to `insert_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::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 insert_promotion(parent: nil, promotion: nil, data_source: nil) + # Pass arguments to `insert_promotion` 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 account where the promotion will be inserted. + # Format: accounts/\\{account} + # @param promotion [::Google::Shopping::Merchant::Promotions::V1::Promotion, ::Hash] + # Required. The promotion to insert. + # @param data_source [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new + # + # # Call the insert_promotion method. + # result = client.insert_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + # p result + # + def insert_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest + + # 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.insert_promotion.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::Shopping::Merchant::Promotions::V1::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.insert_promotion.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.insert_promotion 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 + + ## + # Retrieves the promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + # + # @overload get_promotion(request, options = nil) + # Pass arguments to `get_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::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_promotion(name: nil) + # Pass arguments to `get_promotion` 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 name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new + # + # # Call the get_promotion method. + # result = client.get_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + # p result + # + def get_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest + + # 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_promotion.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::Shopping::Merchant::Promotions::V1::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_promotion.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.get_promotion 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 the promotions in your Merchant Center account. The + # response might contain fewer items than specified by `pageSize`. Rely on + # `pageToken` to determine if there are more items to be requested. + # + # After inserting or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + # + # @overload list_promotions(request, options = nil) + # Pass arguments to `list_promotions` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::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_promotions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_promotions` 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 account to list processed promotions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of promotions to return. The service may + # return fewer than this value. The maximum value is 250; values above 250 + # will be coerced to 250. If unspecified, the maximum number of promotions + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPromotions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPromotions` 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::Shopping::Merchant::Promotions::V1::Promotion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1::Promotion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new + # + # # Call the list_promotions method. + # result = client.list_promotions 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::Shopping::Merchant::Promotions::V1::Promotion. + # p item + # end + # + def list_promotions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest + + # 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_promotions.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::Shopping::Merchant::Promotions::V1::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_promotions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_promotions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.list_promotions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @promotions_service_stub, :list_promotions, "promotions", 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 PromotionsService REST API. + # + # This class represents the configuration for PromotionsService 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::Shopping::Merchant::Promotions::V1::PromotionsService::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 + # # insert_promotion to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.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 = "merchantapi.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 PromotionsService 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 `insert_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_promotion + ## + # RPC-specific configuration for `get_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :get_promotion + ## + # RPC-specific configuration for `list_promotions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_promotions + + # @private + def initialize parent_rpcs = nil + insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion + @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config + get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion + @get_promotion = ::Gapic::Config::Method.new get_promotion_config + list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions + @list_promotions = ::Gapic::Config::Method.new list_promotions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb new file mode 100644 index 000000000000..c01adffdb20a --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_pb" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + module Rest + ## + # REST service stub for the PromotionsService 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: true, + 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 insert_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest] + # 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::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # A result object deserialized from the server's reply + def insert_promotion request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_promotion_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: "insert_promotion", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.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_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest] + # 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::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # A result object deserialized from the server's reply + def get_promotion request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_promotion_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_promotion", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.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_promotions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest] + # 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::Shopping::Merchant::Promotions::V1::ListPromotionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse] + # A result object deserialized from the server's reply + def list_promotions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_promotions_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_promotions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.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 insert_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_promotion_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/promotions/v1/{parent}/promotions:insert", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest] + # 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_promotion_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/promotions/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/promotions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_promotions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest] + # 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_promotions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/promotions/v1/{parent}/promotions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb new file mode 100644 index 000000000000..31e15dab4727 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb @@ -0,0 +1,60 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/promotions/v1/promotions.proto for package 'Google.Shopping.Merchant.Promotions.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_pb' + +module Google + module Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + # Service to manage promotions for products. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.promotions.v1.PromotionsService' + + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + rpc :InsertPromotion, ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1::Promotion + # Retrieves the promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + rpc :GetPromotion, ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1::Promotion + # Lists the promotions in your Merchant Center account. The + # response might contain fewer items than specified by `pageSize`. Rely on + # `pageToken` to determine if there are more items to be requested. + # + # After inserting or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + rpc :ListPromotions, ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb new file mode 100644 index 000000000000..4890984b3dc7 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_service/rest" +require "google/shopping/merchant/promotions/v1/version" + +module Google + module Shopping + module Merchant + module Promotions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/promotions/v1/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb new file mode 100644 index 000000000000..0105c5570796 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Promotions + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/proto_docs/README.md b/google-shopping-merchant-promotions-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb new file mode 100644 index 000000000000..e3eed7518497 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb @@ -0,0 +1,176 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Promotions + module V1 + # Represents a promotion. See the following articles for more details. + # + # Required promotion input attributes to pass data validation checks are + # primarily defined below: + # + # * [Promotions data + # specification](https://support.google.com/merchants/answer/2906014) + # * [Local promotions data + # specification](https://support.google.com/merchants/answer/10146130) + # + # After inserting, updating a promotion input, it may take several minutes + # before the final promotion can be retrieved. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the promotion. + # Format: `accounts/{account}/promotions/{promotion}` + # @!attribute [rw] promotion_id + # @return [::String] + # Required. The user provided promotion ID to uniquely identify the + # promotion. Follow [minimum + # requirements](https://support.google.com/merchants/answer/7050148?ref_topic=7322920&sjid=871860036916537104-NC#minimum_requirements) + # to prevent promotion disapprovals. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the + # promotion. + # + # Promotions is only for [selected + # languages](https://support.google.com/merchants/answer/4588281?ref_topic=6396150&sjid=18314938579342094533-NC#option3&zippy=). + # @!attribute [rw] target_country + # @return [::String] + # Required. The target country used as part of the unique identifier. + # Represented as a [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # + # Promotions are only available in selected + # countries, [Free Listings and Shopping + # ads](https://support.google.com/merchants/answer/4588460) [Local Inventory + # ads](https://support.google.com/merchants/answer/10146326) + # @!attribute [rw] redemption_channel + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::RedemptionChannel>] + # Required. [Redemption + # channel](https://support.google.com/merchants/answer/13837674?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. At least one channel is required. + # @!attribute [r] data_source + # @return [::String] + # Output only. The primary data source of the promotion. + # @!attribute [rw] attributes + # @return [::Google::Shopping::Merchant::Promotions::V1::Attributes] + # Optional. A list of promotion attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. It can also be + # used for submitting any attribute of the data specification in its generic + # form (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API. + # @!attribute [r] promotion_status + # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus] + # Output only. The [status of a + # promotion](https://support.google.com/merchants/answer/3398326?ref_topic=7322924&sjid=5155774230887277618-NC), + # data validation issues, that is, information about a promotion computed + # asynchronously. + # @!attribute [rw] version_number + # @return [::Integer] + # Optional. Represents the existing version (freshness) of the promotion, + # which can be used to preserve the right order when multiple updates are + # done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing promotion. Re-insertion (for + # example, promotion refresh after 30 days) can be performed with the current + # `version_number`. + # + # If the operation is prevented, the aborted exception will be + # thrown. + class Promotion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertPromotion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where the promotion will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] promotion + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # Required. The promotion to insert. + # @!attribute [rw] data_source + # @return [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + class InsertPromotionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetPromotion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + class GetPromotionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListPromotions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list processed promotions for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of promotions to return. The service may + # return fewer than this value. The maximum value is 250; values above 250 + # will be coerced to 250. If unspecified, the maximum number of promotions + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListPromotions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPromotions` must + # match the call that provided the page token. + class ListPromotionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListPromotions` method. + # @!attribute [rw] promotions + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::Promotion>] + # The processed promotions from the specified account. + # @!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 ListPromotionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb new file mode 100644 index 000000000000..8a3be1a8f574 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb @@ -0,0 +1,446 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Promotions + module V1 + # Attributes. + # @!attribute [rw] product_applicability + # @return [::Google::Shopping::Merchant::Promotions::V1::ProductApplicability] + # Required. Applicability of the promotion to either all products or + # [only specific + # products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC). + # @!attribute [rw] offer_type + # @return [::Google::Shopping::Merchant::Promotions::V1::OfferType] + # Required. + # [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC) + # of the promotion. Use this attribute to indicate whether or not customers + # need a coupon code to redeem your promotion. + # @!attribute [rw] generic_redemption_code + # @return [::String] + # Optional. Generic redemption code for the promotion. To be used with the + # `offerType` field and must meet the [minimum + # requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] long_title + # @return [::String] + # Required. [Long + # title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] coupon_value_type + # @return [::Google::Shopping::Merchant::Promotions::V1::CouponValueType] + # Required. The [coupon value type] + # (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC) + # attribute to signal the type of promotion that you are running. Depending + # on type of the selected coupon value [some attributes are + # required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920). + # @!attribute [rw] promotion_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # Required. The list of destinations (also known as [Marketing + # methods](https://support.google.com/merchants/answer/15130232)) where the + # promotion applies to. If you don't specify a destination by including a + # supported value in your data source, your promotion will display in + # Shopping ads and free listings by default. + # + # You may have previously submitted the following values as destinations for + # your products: Shopping Actions, Surfaces across Google, Local surfaces + # across Google. To represent these values use `FREE_LISTINGS`, + # `FREE_LOCAL_LISTINGS`, `LOCAL_INVENTORY_ADS`. For more details see + # [Promotion + # destination](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC) + # @!attribute [rw] item_id_inclusion + # @return [::Array<::String>] + # Optional. Product filter by [item + # ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] brand_inclusion + # @return [::Array<::String>] + # Optional. Product filter by brand for the promotion. The product filter + # attributes only applies when the products eligible for promotion product + # applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_group_id_inclusion + # @return [::Array<::String>] + # Optional. Product filter by item group ID for the promotion. The product + # filter attributes only applies when the products eligible for promotion + # product applicability [product_applicability] attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] product_type_inclusion + # @return [::Array<::String>] + # Optional. Product filter by product type for the promotion. The product + # filter attributes only applies when the products eligible for promotion + # product applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_id_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [item ID + # exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] brand_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [brand + # exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_group_id_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [item group + # ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC). + # The product filter attributes only applies when the products eligible for + # promotion product applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # exclusion for the promotion. + # @!attribute [rw] product_type_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [product type + # exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] minimum_purchase_amount + # @return [::Google::Shopping::Type::Price] + # Optional. [Minimum purchase + # amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] minimum_purchase_quantity + # @return [::Integer] + # @!attribute [rw] limit_quantity + # @return [::Integer] + # Optional. [Maximum purchase + # quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] limit_value + # @return [::Google::Shopping::Type::Price] + # Optional. [Maximum product + # price](https://support.google.com/merchants/answer/2906014) for + # promotion. + # @!attribute [rw] percent_off + # @return [::Integer] + # Optional. The [percentage + # discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC) + # offered in the promotion. + # @!attribute [rw] money_off_amount + # @return [::Google::Shopping::Type::Price] + # Optional. The [money off + # amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC) + # offered in the promotion. + # @!attribute [rw] get_this_quantity_discounted + # @return [::Integer] + # Optional. The number of items discounted in the promotion. The attribute is + # set when `couponValueType` is equal to `buy_m_get_n_money_off` or + # `buy_m_get_n_percent_off`. + # @!attribute [rw] free_gift_value + # @return [::Google::Shopping::Type::Price] + # Optional. [Free gift + # value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] free_gift_description + # @return [::String] + # Optional. [Free gift + # description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] free_gift_item_id + # @return [::String] + # Optional. [Free gift item + # ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] promotion_effective_time_period + # @return [::Google::Type::Interval] + # Required. `TimePeriod` representation of the promotion's effective dates. + # This attribute specifies that the promotion can be tested on your online + # store during this time period. + # @!attribute [rw] promotion_display_time_period + # @return [::Google::Type::Interval] + # Optional. `TimePeriod` representation of the promotion's display dates. + # This attribute specifies the date and time frame when the promotion will be + # live on Google.com and Shopping ads. If the display time period for + # promotion `promotion_display_time_period` attribute is not specified, the + # promotion effective time period `promotion_effective_time_period` + # determines the date and time frame when the promotion will be live on + # Google.com and Shopping ads. + # @!attribute [rw] store_applicability + # @return [::Google::Shopping::Merchant::Promotions::V1::StoreApplicability] + # Optional. Whether the promotion applies to [all stores, or only specified + # stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC). + # Local Inventory ads promotions throw an error if no store applicability is + # included. An `INVALID_ARGUMENT` error is thrown if `store_applicability` is + # set to `ALL_STORES` and `store_codes_inclusion` or `score_code_exclusion` + # is set to a value. + # @!attribute [rw] store_codes_inclusion + # @return [::Array<::String>] + # Optional. [Store codes to + # include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The store filter attributes only applies when the + # `store_applicability` attribute is set to + # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). + # + # Store code (the store ID from + # your Business Profile) of the physical store the product is sold in. See + # the [Local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) for + # more information. + # @!attribute [rw] store_codes_exclusion + # @return [::Array<::String>] + # Optional. [Store codes to + # exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The store filter attributes only applies when the + # `store_applicability` attribute is set to + # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] promotion_url + # @return [::String] + # Optional. URL to the page on the merchant's site where the promotion shows. + # Local Inventory ads promotions throw an error if no `promotion_url` is + # included. URL is used to confirm that the promotion is valid and can be + # redeemed. + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of the promotion. + # @!attribute [r] destination_statuses + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::DestinationStatus>] + # Output only. The intended destinations for the promotion. + # @!attribute [r] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::ItemLevelIssue>] + # Output only. A list of issues associated with the promotion. + # @!attribute [r] creation_date + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the promotion has been created + # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, + # and offset, for example `2020-01-02T09:00:00+01:00` or + # `2020-01-02T09:00:00Z` + # @!attribute [r] last_update_date + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the promotion status has been last updated + # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, + # and offset, for example `2020-01-02T09:00:00+01:00` or + # `2020-01-02T09:00:00Z` + class PromotionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The status for the specified destination. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The name of the promotion destination. + # @!attribute [r] status + # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::DestinationStatus::State] + # Output only. The status for the specified destination. + class DestinationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The current state of the promotion. + module State + # Unknown promotion state. + STATE_UNSPECIFIED = 0 + + # The promotion is under review. + IN_REVIEW = 1 + + # The promotion is disapproved. + REJECTED = 2 + + # The promotion is approved and active. + LIVE = 3 + + # The promotion is stopped by merchant. + STOPPED = 4 + + # The promotion is no longer active. + EXPIRED = 5 + + # The promotion is not stopped, and all reviews are approved, but the + # active date is in the future. + PENDING = 6 + end + end + + # The issue associated with the promotion. + # @!attribute [r] code + # @return [::String] + # Output only. The error code of the issue. + # @!attribute [r] severity + # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::ItemLevelIssue::Severity] + # Output only. How this issue affects serving of the promotion. + # @!attribute [r] resolution + # @return [::String] + # Output only. Whether the issue can be resolved by the merchant. + # @!attribute [r] attribute + # @return [::String] + # Output only. The attribute's name, if the issue is caused by a single + # attribute. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The destination the issue applies to. + # @!attribute [r] description + # @return [::String] + # Output only. A short issue description in English. + # @!attribute [r] detail + # @return [::String] + # Output only. A detailed issue description in English. + # @!attribute [r] documentation + # @return [::String] + # Output only. The URL of a web page to help with resolving this issue. + # @!attribute [r] applicable_countries + # @return [::Array<::String>] + # Output only. List of country codes (ISO 3166-1 alpha-2) where issue + # applies to the offer. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity of the issue. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the promotion. + NOT_IMPACTED = 1 + + # The promotion is demoted and most likely have limited performance + # in search results + DEMOTED = 2 + + # Issue disapproves the promotion. + DISAPPROVED = 3 + end + end + end + + # Which product or list of products the promotion applies to. + module ProductApplicability + # Which products the promotion applies to is unknown. + PRODUCT_APPLICABILITY_UNSPECIFIED = 0 + + # Applicable to all products. + ALL_PRODUCTS = 1 + + # Applicable to only a single product or list of products. + SPECIFIC_PRODUCTS = 2 + end + + # Store codes or list of store codes the promotion applies to. Only for + # Local inventory ads promotions. + module StoreApplicability + # Which store codes the promotion applies to is unknown. + STORE_APPLICABILITY_UNSPECIFIED = 0 + + # Promotion applies to all stores. + ALL_STORES = 1 + + # Promotion applies to only the specified stores. + SPECIFIC_STORES = 2 + end + + # Offer type of a promotion. + module OfferType + # Unknown offer type. + OFFER_TYPE_UNSPECIFIED = 0 + + # Offer type without a code. + NO_CODE = 1 + + # Offer type with a code. Generic redemption code for the promotion is + # required when `offerType` = `GENERIC_CODE`. + GENERIC_CODE = 2 + end + + # Channel of a promotion. + module RedemptionChannel + # Indicates that the channel is unspecified. + REDEMPTION_CHANNEL_UNSPECIFIED = 0 + + # Indicates that the channel is in store. + # This is same as `local` channel used for `products`. + IN_STORE = 1 + + # Indicates that the channel is online. + ONLINE = 2 + end + + # [Coupon value + # type](https://support.google.com/merchants/answer/13861986) + # of a promotion. + module CouponValueType + # Indicates that the coupon value type is unspecified. + COUPON_VALUE_TYPE_UNSPECIFIED = 0 + + # Money off coupon value type. + MONEY_OFF = 1 + + # Percent off coupon value type. + PERCENT_OFF = 2 + + # Buy M quantity, get N money off coupon value type. + # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be + # present. `money_off_amount` must also be present. + BUY_M_GET_N_MONEY_OFF = 3 + + # Buy M quantity, get N percent off coupon value type. + # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be + # present. `percent_off_percentage` must also be present. + BUY_M_GET_N_PERCENT_OFF = 4 + + # Buy M quantity, get money off. `minimum_purchase_quantity` and + # `money_off_amount` must be present. + BUY_M_GET_MONEY_OFF = 5 + + # Buy M quantity, get money off. `minimum_purchase_quantity` and + # `percent_off_percentage` must be present. + BUY_M_GET_PERCENT_OFF = 6 + + # Free gift with description only. + FREE_GIFT = 7 + + # Free gift with monetary value. + FREE_GIFT_WITH_VALUE = 8 + + # Free gift with item ID. + FREE_GIFT_WITH_ITEM_ID = 9 + + # Standard free shipping coupon value type. Only available for online + # promotions. + FREE_SHIPPING_STANDARD = 10 + + # Overnight free shipping coupon value type. Only available for online + # promotions. + FREE_SHIPPING_OVERNIGHT = 11 + + # Two day free shipping coupon value type. Only available for online + # promotions. + FREE_SHIPPING_TWO_DAY = 12 + end + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..1de1b841fd30 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-promotions-v1/snippets/Gemfile b/google-shopping-merchant-promotions-v1/snippets/Gemfile new file mode 100644 index 000000000000..8c6e64adc783 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-promotions-v1", path: "../" +else + gem "google-shopping-merchant-promotions-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb b/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb new file mode 100644 index 000000000000..06bf905924e3 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_PromotionsService_GetPromotion_sync] +require "google/shopping/merchant/promotions/v1" + +## +# Snippet for the get_promotion call in the PromotionsService 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::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion. +# +def get_promotion + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new + + # Call the get_promotion method. + result = client.get_promotion request + + # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + p result +end +# [END merchantapi_v1_generated_PromotionsService_GetPromotion_sync] diff --git a/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb b/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb new file mode 100644 index 000000000000..3bff4aa70bf9 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_PromotionsService_InsertPromotion_sync] +require "google/shopping/merchant/promotions/v1" + +## +# Snippet for the insert_promotion call in the PromotionsService 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::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion. +# +def insert_promotion + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new + + # Call the insert_promotion method. + result = client.insert_promotion request + + # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + p result +end +# [END merchantapi_v1_generated_PromotionsService_InsertPromotion_sync] diff --git a/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb b/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb new file mode 100644 index 000000000000..b8d4843cdcc2 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_PromotionsService_ListPromotions_sync] +require "google/shopping/merchant/promotions/v1" + +## +# Snippet for the list_promotions call in the PromotionsService 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::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions. +# +def list_promotions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new + + # Call the list_promotions method. + result = client.list_promotions 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::Shopping::Merchant::Promotions::V1::Promotion. + p item + end +end +# [END merchantapi_v1_generated_PromotionsService_ListPromotions_sync] diff --git a/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json b/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json new file mode 100644 index 000000000000..a8848c79a929 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-shopping-merchant-promotions-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.promotions.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_PromotionsService_InsertPromotion_sync", + "title": "Snippet for the insert_promotion call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion.", + "file": "promotions_service/insert_promotion.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_promotion", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1::Promotion", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" + }, + "method": { + "short_name": "InsertPromotion", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.InsertPromotion", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_PromotionsService_GetPromotion_sync", + "title": "Snippet for the get_promotion call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion.", + "file": "promotions_service/get_promotion.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_promotion", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1::Promotion", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" + }, + "method": { + "short_name": "GetPromotion", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.GetPromotion", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_PromotionsService_ListPromotions_sync", + "title": "Snippet for the list_promotions call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions.", + "file": "promotions_service/list_promotions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_promotions", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" + }, + "method": { + "short_name": "ListPromotions", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.ListPromotions", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb new file mode 100644 index 000000000000..66d279c73850 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_service" + +class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_promotion_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.promotion_path account: "value0", promotion: "value1" + assert_equal "accounts/value0/promotions/value1", path + end + end +end diff --git a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb new file mode 100644 index 000000000000..6d832fa35790 --- /dev/null +++ b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_pb" +require "google/shopping/merchant/promotions/v1/promotions_service/rest" + + +class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_insert_promotion + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + promotion = {} + data_source = "hello world" + + insert_promotion_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::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_insert_promotion_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_promotion_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_promotion ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_promotion(::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_promotion_client_stub.call_count + end + end + end + + def test_get_promotion + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_promotion_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::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_get_promotion_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_promotion_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_promotion({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_promotion name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_promotion ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_promotion({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_promotion(::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_promotion_client_stub.call_count + end + end + end + + def test_list_promotions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_promotions_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::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_list_promotions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_promotions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_promotions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_promotions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_promotions ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new(parent: parent, 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_promotions({ parent: parent, 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_promotions(::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new(parent: parent, 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_promotions_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::Shopping::Merchant::Promotions::V1::PromotionsService::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::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb new file mode 100644 index 000000000000..4782ccfcfdfe --- /dev/null +++ b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb @@ -0,0 +1,272 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/promotions/v1/promotions_pb" +require "google/shopping/merchant/promotions/v1/promotions_services_pb" +require "google/shopping/merchant/promotions/v1/promotions_service" + +class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_insert_promotion + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1::Promotion.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" + promotion = {} + data_source = "hello world" + + insert_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_promotion, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Promotions::V1::Promotion), request["promotion"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_promotion_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_promotion ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_promotion(::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_promotion_client_stub.call_rpc_count + end + end + + def test_get_promotion + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1::Promotion.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" + + get_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_promotion, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_promotion_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_promotion({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_promotion name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_promotion ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_promotion({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_promotion(::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.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, get_promotion_client_stub.call_rpc_count + end + end + + def test_list_promotions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.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" + page_size = 42 + page_token = "hello world" + + list_promotions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_promotions, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_promotions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_promotions({ parent: parent, 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_promotions parent: parent, 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_promotions ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new(parent: parent, 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_promotions({ parent: parent, 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_promotions(::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new(parent: parent, 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_promotions_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::Shopping::Merchant::Promotions::V1::PromotionsService::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::Shopping::Merchant::Promotions::V1::PromotionsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-promotions-v1/test/helper.rb b/google-shopping-merchant-promotions-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-promotions-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index a743c6011fa7..88778f8dbb64 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1923,6 +1923,10 @@ "component": "google-shopping-merchant-promotions", "version_file": "lib/google/shopping/merchant/promotions/version.rb" }, + "google-shopping-merchant-promotions-v1": { + "component": "google-shopping-merchant-promotions-v1", + "version_file": "lib/google/shopping/merchant/promotions/v1/version.rb" + }, "google-shopping-merchant-promotions-v1beta": { "component": "google-shopping-merchant-promotions-v1beta", "version_file": "lib/google/shopping/merchant/promotions/v1beta/version.rb" From 867b52870993db72807de8d33f1536ddfdf18645 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:34:12 -0700 Subject: [PATCH 362/457] feat: Initial generation of google-shopping-merchant-issue_resolution-v1 (#30770) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 64 ++ .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++++ .../README.md | 154 +++ .../Rakefile | 169 ++++ .../gapic_metadata.json | 47 + ...pping-merchant-issue_resolution-v1.gemspec | 29 + ...e-shopping-merchant-issue_resolution-v1.rb | 21 + .../shopping/merchant/issue_resolution/v1.rb | 48 + .../v1/aggregate_product_statuses_service.rb | 57 ++ .../client.rb | 491 +++++++++ .../credentials.rb | 49 + .../paths.rb | 49 + .../rest.rb | 54 + .../rest/client.rb | 458 +++++++++ .../rest/service_stub.rb | 144 +++ .../v1/issue_resolution_service.rb | 58 ++ .../v1/issue_resolution_service/client.rb | 692 +++++++++++++ .../issue_resolution_service/credentials.rb | 49 + .../v1/issue_resolution_service/paths.rb | 66 ++ .../v1/issue_resolution_service/rest.rb | 55 + .../issue_resolution_service/rest/client.rb | 645 ++++++++++++ .../rest/service_stub.rb | 269 +++++ .../merchant/issue_resolution/v1/rest.rb | 40 + .../merchant/issue_resolution/v1/version.rb | 30 + .../v1/aggregateproductstatuses_pb.rb | 56 ++ .../aggregateproductstatuses_services_pb.rb | 50 + .../issueresolution/v1/issueresolution_pb.rb | 87 ++ .../v1/issueresolution_services_pb.rb | 66 ++ .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 +++++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../v1/aggregateproductstatuses.rb | 173 ++++ .../issueresolution/v1/issueresolution.rb | 952 ++++++++++++++++++ .../proto_docs/google/shopping/type/types.rb | 210 ++++ .../snippets/Gemfile | 32 + .../list_aggregate_product_statuses.rb | 51 + .../render_account_issues.rb | 47 + .../render_product_issues.rb | 47 + .../trigger_action.rb | 47 + ....shopping.merchant.issueresolution.v1.json | 175 ++++ ...ate_product_statuses_service_paths_test.rb | 55 + ...gate_product_statuses_service_rest_test.rb | 156 +++ ...aggregate_product_statuses_service_test.rb | 154 +++ .../v1/issue_resolution_service_paths_test.rb | 67 ++ .../v1/issue_resolution_service_rest_test.rb | 269 +++++ .../v1/issue_resolution_service_test.rb | 275 +++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 61 files changed, 8147 insertions(+) create mode 100644 google-shopping-merchant-issue_resolution-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-issue_resolution-v1/.gitignore create mode 100644 google-shopping-merchant-issue_resolution-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-issue_resolution-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-issue_resolution-v1/.rubocop.yml create mode 100644 google-shopping-merchant-issue_resolution-v1/.toys.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/.yardopts create mode 100644 google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-issue_resolution-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-issue_resolution-v1/Gemfile create mode 100644 google-shopping-merchant-issue_resolution-v1/LICENSE.md create mode 100644 google-shopping-merchant-issue_resolution-v1/README.md create mode 100644 google-shopping-merchant-issue_resolution-v1/Rakefile create mode 100644 google-shopping-merchant-issue_resolution-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json create mode 100644 google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb create mode 100644 google-shopping-merchant-issue_resolution-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b03f39227469..c59299d8b70a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -931,6 +931,8 @@ "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution": "0.2.0", "google-shopping-merchant-issue_resolution+FILLER": "0.0.0", + "google-shopping-merchant-issue_resolution-v1": "0.0.1", + "google-shopping-merchant-issue_resolution-v1+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution-v1beta": "0.2.0", "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", "google-shopping-merchant-lfp": "0.3.1", diff --git a/google-shopping-merchant-issue_resolution-v1/.OwlBot.yaml b/google-shopping-merchant-issue_resolution-v1/.OwlBot.yaml new file mode 100644 index 000000000000..fc98128a8777 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/issueresolution/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-issue_resolution-v1/$1 diff --git a/google-shopping-merchant-issue_resolution-v1/.gitignore b/google-shopping-merchant-issue_resolution-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/.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/google-shopping-merchant-issue_resolution-v1/.owlbot-manifest.json b/google-shopping-merchant-issue_resolution-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..abcaf1ae11f0 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/.owlbot-manifest.json @@ -0,0 +1,64 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-issue_resolution-v1.gemspec", + "lib/google-shopping-merchant-issue_resolution-v1.rb", + "lib/google/shopping/merchant/issue_resolution/v1.rb", + "lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb", + "lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb", + "lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb", + "lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb", + "lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb", + "lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb", + "lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb", + "lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb", + "lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb", + "lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb", + "lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb", + "lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb", + "lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb", + "lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb", + "lib/google/shopping/merchant/issue_resolution/v1/rest.rb", + "lib/google/shopping/merchant/issue_resolution/v1/version.rb", + "lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb", + "lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb", + "lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb", + "lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb", + "proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb", + "proto_docs/google/shopping/type/types.rb", + "snippets/Gemfile", + "snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb", + "snippets/issue_resolution_service/render_account_issues.rb", + "snippets/issue_resolution_service/render_product_issues.rb", + "snippets/issue_resolution_service/trigger_action.rb", + "snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json", + "test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb", + "test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb", + "test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb", + "test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb", + "test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb", + "test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json b/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json new file mode 100644 index 000000000000..da9940c8e517 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1", + "distribution_name": "google-shopping-merchant-issue_resolution-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-issue_resolution-v1/.rubocop.yml b/google-shopping-merchant-issue_resolution-v1/.rubocop.yml new file mode 100644 index 000000000000..a2db5e5debad --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-issue_resolution-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-issue_resolution-v1.rb" diff --git a/google-shopping-merchant-issue_resolution-v1/.toys.rb b/google-shopping-merchant-issue_resolution-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1/.yardopts b/google-shopping-merchant-issue_resolution-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md b/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..749157ece9a1 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-issue_resolution-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-issue_resolution-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/issue_resolution/v1" + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/issue_resolution/v1" + +::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/issue_resolution/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md b/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-issue_resolution-v1/Gemfile b/google-shopping-merchant-issue_resolution-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-issue_resolution-v1/LICENSE.md b/google-shopping-merchant-issue_resolution-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-issue_resolution-v1/README.md b/google-shopping-merchant-issue_resolution-v1/README.md new file mode 100644 index 000000000000..5bd7d1dc69b9 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-issue_resolution](https://rubygems.org/gems/google-shopping-merchant-issue_resolution). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-issue_resolution-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/issue_resolution/v1" + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new +request = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new # (request fields as keyword arguments...) +response = client.list_aggregate_product_statuses request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-issue_resolution-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/issue_resolution/v1" +require "logger" + +client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-issue_resolution-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-issue_resolution`. +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-shopping-merchant-issue_resolution-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-issue_resolution-v1/Rakefile b/google-shopping-merchant-issue_resolution-v1/Rakefile new file mode 100644 index 000000000000..135d467e999c --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-issue_resolution-v1 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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" + ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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-shopping-merchant-issue_resolution-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-issue_resolution-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-issue_resolution-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-issue_resolution-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-issue_resolution-v1" + header "google-shopping-merchant-issue_resolution-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-issue_resolution-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-issue_resolution-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-issue_resolution-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-issue_resolution-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-issue_resolution-v1/gapic_metadata.json b/google-shopping-merchant-issue_resolution-v1/gapic_metadata.json new file mode 100644 index 000000000000..8437b573864b --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/gapic_metadata.json @@ -0,0 +1,47 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.issueresolution.v1", + "libraryPackage": "::Google::Shopping::Merchant::IssueResolution::V1", + "services": { + "AggregateProductStatusesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client", + "rpcs": { + "ListAggregateProductStatuses": { + "methods": [ + "list_aggregate_product_statuses" + ] + } + } + } + } + }, + "IssueResolutionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client", + "rpcs": { + "RenderAccountIssues": { + "methods": [ + "render_account_issues" + ] + }, + "RenderProductIssues": { + "methods": [ + "render_product_issues" + ] + }, + "TriggerAction": { + "methods": [ + "trigger_action" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec b/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec new file mode 100644 index 000000000000..959c0f001437 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/issue_resolution/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-issue_resolution-v1" + gem.version = Google::Shopping::Merchant::IssueResolution::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb b/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb new file mode 100644 index 000000000000..61decea9e1d9 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google-shopping-merchant-issue_resolution-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1" diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb new file mode 100644 index 000000000000..0982d4898037 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" +require "google/shopping/merchant/issue_resolution/v1/version" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb new file mode 100644 index 000000000000..4abdd701d7ad --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1/version" + +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ## + # Service to manage aggregate product statuses. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + module AggregateProductStatusesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "aggregate_product_statuses_service", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb new file mode 100644 index 000000000000..d3fdc081e57c --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/client.rb @@ -0,0 +1,491 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + ## + # Client for the AggregateProductStatusesService service. + # + # Service to manage aggregate product statuses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aggregate_product_statuses_service_stub + + ## + # Configure the AggregateProductStatusesService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AggregateProductStatusesService clients + # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 + @aggregate_product_statuses_service_stub.universe_domain + end + + ## + # Create a new AggregateProductStatusesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AggregateProductStatusesService 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_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 + + @aggregate_product_statuses_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 + ) + + @aggregate_product_statuses_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 + @aggregate_product_statuses_service_stub.logger + end + + # Service calls + + ## + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + # + # @overload list_aggregate_product_statuses(request, options = nil) + # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::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_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_aggregate_product_statuses` 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 account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new + # + # # Call the list_aggregate_product_statuses method. + # result = client.list_aggregate_product_statuses 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. + # p item + # end + # + def list_aggregate_product_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest + + # 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_aggregate_product_statuses.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::Shopping::Merchant::IssueResolution::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aggregate_product_statuses_service_stub.call_rpc :list_aggregate_product_statuses, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, 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 AggregateProductStatusesService API. + # + # This class represents the configuration for AggregateProductStatusesService, + # 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 + # # list_aggregate_product_statuses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 AggregateProductStatusesService 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 `list_aggregate_product_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aggregate_product_statuses + + # @private + def initialize parent_rpcs = nil + list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses + @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb new file mode 100644 index 000000000000..fb867576e05b --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + # Credentials for the AggregateProductStatusesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb new file mode 100644 index 000000000000..0c1c66164562 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + # Path helper methods for the AggregateProductStatusesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb new file mode 100644 index 000000000000..de57ee3c656f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1/version" + +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ## + # Service to manage aggregate product statuses. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + module AggregateProductStatusesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb new file mode 100644 index 000000000000..29ba91009d8d --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb @@ -0,0 +1,458 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + module Rest + ## + # REST client for the AggregateProductStatusesService service. + # + # Service to manage aggregate product statuses. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aggregate_product_statuses_service_stub + + ## + # Configure the AggregateProductStatusesService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AggregateProductStatusesService clients + # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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", "Shopping", "Merchant", "IssueResolution", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 + @aggregate_product_statuses_service_stub.universe_domain + end + + ## + # Create a new AggregateProductStatusesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AggregateProductStatusesService 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 + + @aggregate_product_statuses_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @aggregate_product_statuses_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 + @aggregate_product_statuses_service_stub.logger + end + + # Service calls + + ## + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + # + # @overload list_aggregate_product_statuses(request, options = nil) + # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::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_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_aggregate_product_statuses` 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 account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new + # + # # Call the list_aggregate_product_statuses method. + # result = client.list_aggregate_product_statuses 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. + # p item + # end + # + def list_aggregate_product_statuses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest + + # 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_aggregate_product_statuses.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::Shopping::Merchant::IssueResolution::V1::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_aggregate_product_statuses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aggregate_product_statuses_service_stub.list_aggregate_product_statuses request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, "aggregate_product_statuses", 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 AggregateProductStatusesService REST API. + # + # This class represents the configuration for AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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 + # # list_aggregate_product_statuses to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_aggregate_product_statuses.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 = "merchantapi.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 AggregateProductStatusesService 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 `list_aggregate_product_statuses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aggregate_product_statuses + + # @private + def initialize parent_rpcs = nil + list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses + @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb new file mode 100644 index 000000000000..cd408e47882e --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + module Rest + ## + # REST service stub for the AggregateProductStatusesService 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: true, + 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 list_aggregate_product_statuses REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest] + # 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::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse] + # A result object deserialized from the server's reply + def list_aggregate_product_statuses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_aggregate_product_statuses_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_aggregate_product_statuses", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.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 list_aggregate_product_statuses REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest] + # 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_aggregate_product_statuses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/issueresolution/v1/{parent}/aggregateProductStatuses", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb new file mode 100644 index 000000000000..23b892e685eb --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1/version" + +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ## + # Service to provide an issue resolution content for account issues and product + # issues. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + module IssueResolutionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "issue_resolution_service", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb new file mode 100644 index 000000000000..c4f910c9e6d5 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb @@ -0,0 +1,692 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/issueresolution_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + ## + # Client for the IssueResolutionService service. + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :issue_resolution_service_stub + + ## + # Configure the IssueResolutionService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IssueResolutionService clients + # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + @issue_resolution_service_stub.universe_domain + end + + ## + # Create a new IssueResolutionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IssueResolutionService 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/shopping/merchant/issueresolution/v1/issueresolution_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 + + @issue_resolution_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + ) + + @issue_resolution_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 + @issue_resolution_service_stub.logger + end + + # Service calls + + ## + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_account_issues(request, options = nil) + # Pass arguments to `render_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::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 render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_account_issues` 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 account to fetch issues for. + # Format: `accounts/{account}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new + # + # # Call the render_account_issues method. + # result = client.render_account_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. + # p result + # + def render_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest + + # 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.render_account_issues.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::Shopping::Merchant::IssueResolution::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.render_account_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.render_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :render_account_issues, 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 + + ## + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_product_issues(request, options = nil) + # Pass arguments to `render_product_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::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 render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_product_issues` 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 name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new + # + # # Call the render_product_issues method. + # result = client.render_product_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. + # p result + # + def render_product_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest + + # 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.render_product_issues.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::Shopping::Merchant::IssueResolution::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.render_product_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.render_product_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :render_product_issues, 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 + + ## + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Ids} for all + # problematic field together with translated, human readable error messages + # that can be shown to the user. + # + # @overload trigger_action(request, options = nil) + # Pass arguments to `trigger_action` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::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 trigger_action(name: nil, payload: nil, language_code: nil) + # Pass arguments to `trigger_action` 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 business's account that is triggering the action. + # Format: `accounts/{account}` + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload, ::Hash] + # Required. The payload for the triggered action. + # @param language_code [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new + # + # # Call the trigger_action method. + # result = client.trigger_action request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. + # p result + # + def trigger_action request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest + + # 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.trigger_action.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::Shopping::Merchant::IssueResolution::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.trigger_action.timeout, + metadata: metadata, + retry_policy: @config.rpcs.trigger_action.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.call_rpc :trigger_action, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the IssueResolutionService API. + # + # This class represents the configuration for IssueResolutionService, + # 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + # # render_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 IssueResolutionService 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 `render_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_account_issues + ## + # RPC-specific configuration for `render_product_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_product_issues + ## + # RPC-specific configuration for `trigger_action` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_action + + # @private + def initialize parent_rpcs = nil + render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues + @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config + render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues + @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config + trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action + @trigger_action = ::Gapic::Config::Method.new trigger_action_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb new file mode 100644 index 000000000000..c114c7011f94 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + # Credentials for the IssueResolutionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb new file mode 100644 index 000000000000..4919bc168570 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + # Path helper methods for the IssueResolutionService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb new file mode 100644 index 000000000000..0a7399e9530e --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1/version" + +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ## + # Service to provide an issue resolution content for account issues and product + # issues. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + module IssueResolutionService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb new file mode 100644 index 000000000000..58a5cec3093f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb @@ -0,0 +1,645 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + module Rest + ## + # REST client for the IssueResolutionService service. + # + # Service to provide an issue resolution content for account issues and product + # issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :issue_resolution_service_stub + + ## + # Configure the IssueResolutionService Client class. + # + # See {::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IssueResolutionService clients + # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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", "Shopping", "Merchant", "IssueResolution", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + @issue_resolution_service_stub.universe_domain + end + + ## + # Create a new IssueResolutionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IssueResolutionService 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 + + @issue_resolution_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @issue_resolution_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 + @issue_resolution_service_stub.logger + end + + # Service calls + + ## + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_account_issues(request, options = nil) + # Pass arguments to `render_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::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 render_account_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_account_issues` 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 account to fetch issues for. + # Format: `accounts/{account}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new + # + # # Call the render_account_issues method. + # result = client.render_account_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. + # p result + # + def render_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest + + # 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.render_account_issues.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::Shopping::Merchant::IssueResolution::V1::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.render_account_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.render_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.render_account_issues 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 + + ## + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + # + # @overload render_product_issues(request, options = nil) + # Pass arguments to `render_product_issues` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::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 render_product_issues(name: nil, language_code: nil, time_zone: nil, payload: nil) + # Pass arguments to `render_product_issues` 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 name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @param language_code [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload, ::Hash] + # Optional. The payload for configuring how the content should be rendered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new + # + # # Call the render_product_issues method. + # result = client.render_product_issues request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. + # p result + # + def render_product_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest + + # 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.render_product_issues.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::Shopping::Merchant::IssueResolution::V1::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.render_product_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.render_product_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.render_product_issues 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 + + ## + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Ids} for all + # problematic field together with translated, human readable error messages + # that can be shown to the user. + # + # @overload trigger_action(request, options = nil) + # Pass arguments to `trigger_action` via a request object, either of type + # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::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 trigger_action(name: nil, payload: nil, language_code: nil) + # Pass arguments to `trigger_action` 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 business's account that is triggering the action. + # Format: `accounts/{account}` + # @param payload [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload, ::Hash] + # Required. The payload for the triggered action. + # @param language_code [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/issue_resolution/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new + # + # # Call the trigger_action method. + # result = client.trigger_action request + # + # # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. + # p result + # + def trigger_action request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest + + # 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.trigger_action.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::Shopping::Merchant::IssueResolution::V1::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.trigger_action.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.trigger_action.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @issue_resolution_service_stub.trigger_action 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 + + ## + # Configuration class for the IssueResolutionService REST API. + # + # This class represents the configuration for IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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 + # # render_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.render_account_issues.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 = "merchantapi.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 IssueResolutionService 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 `render_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_account_issues + ## + # RPC-specific configuration for `render_product_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :render_product_issues + ## + # RPC-specific configuration for `trigger_action` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_action + + # @private + def initialize parent_rpcs = nil + render_account_issues_config = parent_rpcs.render_account_issues if parent_rpcs.respond_to? :render_account_issues + @render_account_issues = ::Gapic::Config::Method.new render_account_issues_config + render_product_issues_config = parent_rpcs.render_product_issues if parent_rpcs.respond_to? :render_product_issues + @render_product_issues = ::Gapic::Config::Method.new render_product_issues_config + trigger_action_config = parent_rpcs.trigger_action if parent_rpcs.respond_to? :trigger_action + @trigger_action = ::Gapic::Config::Method.new trigger_action_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb new file mode 100644 index 000000000000..c6b2ad826b87 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/issueresolution_pb" + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + module Rest + ## + # REST service stub for the IssueResolutionService 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: true, + 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 render_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest] + # 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::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse] + # A result object deserialized from the server's reply + def render_account_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_render_account_issues_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: "render_account_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the render_product_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest] + # 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::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse] + # A result object deserialized from the server's reply + def render_product_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_render_product_issues_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: "render_product_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the trigger_action REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest] + # 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::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse] + # A result object deserialized from the server's reply + def trigger_action request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_trigger_action_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: "trigger_action", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.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 render_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_render_account_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1/{name}:renderaccountissues", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the render_product_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_render_product_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1/{name}:renderproductissues", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the trigger_action REST call + # + # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_trigger_action_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/issueresolution/v1/{name}:triggeraction", + body: "payload", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb new file mode 100644 index 000000000000..30b9d2c0f5e0 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" +require "google/shopping/merchant/issue_resolution/v1/version" + +module Google + module Shopping + module Merchant + module IssueResolution + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/issue_resolution/v1/rest" + # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb new file mode 100644 index 000000000000..5bd61fc0a9cd --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb new file mode 100644 index 000000000000..a3728bb33c99 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.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/shopping/type/types_pb' + + +descriptor_data = "\nJgoogle/shopping/merchant/issueresolution/v1/aggregateproductstatuses.proto\x12+google.shopping.merchant.issueresolution.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb6\x01\n#ListAggregateProductStatusesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31merchantapi.googleapis.com/AggregateProductStatus\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n$ListAggregateProductStatusesResponse\x12g\n\x1a\x61ggregate_product_statuses\x18\x01 \x03(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.AggregateProductStatus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x94\t\n\x16\x41ggregateProductStatus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12V\n\x11reporting_context\x18\x03 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12X\n\x05stats\x18\x05 \x01(\x0b\x32I.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.Stats\x12m\n\x11item_level_issues\x18\x06 \x03(\x0b\x32R.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue\x1ag\n\x05Stats\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\x03\x12\x15\n\rpending_count\x18\x02 \x01(\x03\x12\x19\n\x11\x64isapproved_count\x18\x03 \x01(\x03\x12\x16\n\x0e\x65xpiring_count\x18\x04 \x01(\x03\x1a\x97\x04\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12m\n\x08severity\x18\x02 \x01(\x0e\x32[.google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Severity\x12q\n\nresolution\x18\x03 \x01(\x0e\x32].google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Resolution\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x08 \x01(\t\x12\x15\n\rproduct_count\x18\t \x01(\x03\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"U\n\nResolution\x12\x1a\n\x16RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02:\xb1\x01\xea\x41\xad\x01\n1merchantapi.googleapis.com/AggregateProductStatus\x12\x46\x61\x63\x63ounts/{account}/aggregateProductStatuses/{aggregate_product_status}*\x18\x61ggregateProductStatuses2\x16\x61ggregateProductStatus2\x83\x03\n\x1f\x41ggregateProductStatusesService\x12\x96\x02\n\x1cListAggregateProductStatuses\x12P.google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesRequest\x1aQ.google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xc1\x02\n/com.google.shopping.merchant.issueresolution.v1B\x1d\x41ggregateProductStatusesProtoP\x01Z_cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb;issueresolutionpb\xaa\x02+Google.Shopping.Merchant.IssueResolution.V1\xca\x02+Google\\Shopping\\Merchant\\IssueResolution\\V1\xea\x02/Google::Shopping::Merchant::IssueResolution::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + ListAggregateProductStatusesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesRequest").msgclass + ListAggregateProductStatusesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ListAggregateProductStatusesResponse").msgclass + AggregateProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus").msgclass + AggregateProductStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.Stats").msgclass + AggregateProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue").msgclass + AggregateProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Severity").enummodule + AggregateProductStatus::ItemLevelIssue::Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.AggregateProductStatus.ItemLevelIssue.Resolution").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb new file mode 100644 index 000000000000..8f9d9d4b5389 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.proto for package 'Google.Shopping.Merchant.IssueResolution.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb' + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module AggregateProductStatusesService + # Service to manage aggregate product statuses. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService' + + # Lists the `AggregateProductStatuses` resources for your merchant account. + # The response might contain fewer items than specified by `pageSize`. + # If `pageToken` was returned in previous request, it can be used to obtain + # additional results. + rpc :ListAggregateProductStatuses, ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb new file mode 100644 index 000000000000..169b15b8a91d --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/issueresolution/v1/issueresolution.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' + + +descriptor_data = "\nAgoogle/shopping/merchant/issueresolution/v1/issueresolution.proto\x12+google.shopping.merchant.issueresolution.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"r\n\x1bRenderAccountIssuesResponse\x12S\n\x0frendered_issues\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.RenderedIssue\"\xe9\x01\n\x1aRenderAccountIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12]\n\x07payload\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xa3\x02\n\x1aRenderIssuesRequestPayload\x12\\\n\x0e\x63ontent_option\x18\x01 \x01(\x0e\x32:.google.shopping.merchant.issueresolution.v1.ContentOptionB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12w\n\x18user_input_action_option\x18\x02 \x01(\x0e\x32K.google.shopping.merchant.issueresolution.v1.UserInputActionRenderingOptionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x11\n\x0f_content_optionB\x1b\n\x19_user_input_action_option\"r\n\x1bRenderProductIssuesResponse\x12S\n\x0frendered_issues\x18\x01 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.RenderedIssue\"\xe9\x01\n\x1aRenderProductIssuesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12]\n\x07payload\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayloadB\x03\xe0\x41\x01\"\xad\x02\n\rRenderedIssue\x12\x1d\n\x13prerendered_content\x18\x03 \x01(\tH\x00\x12\x35\n+prerendered_out_of_court_dispute_settlement\x18\x05 \x01(\tH\x01\x12\r\n\x05title\x18\x01 \x01(\t\x12\x43\n\x06impact\x18\x02 \x01(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.Impact\x12\x44\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.ActionB\t\n\x07\x63ontentB!\n\x1fout_of_court_dispute_settlement\"\xb3\x01\n\x06Impact\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12G\n\x08severity\x18\x02 \x01(\x0e\x32\x35.google.shopping.merchant.issueresolution.v1.Severity\x12J\n\nbreakdowns\x18\x03 \x03(\x0b\x32\x36.google.shopping.merchant.issueresolution.v1.Breakdown\"\x92\x01\n\tBreakdown\x12N\n\x07regions\x18\x01 \x03(\x0b\x32=.google.shopping.merchant.issueresolution.v1.Breakdown.Region\x12\x0f\n\x07\x64\x65tails\x18\x04 \x03(\t\x1a$\n\x06Region\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xc6\x04\n\x06\x41\x63tion\x12\x61\n\x15\x62uiltin_simple_action\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.issueresolution.v1.BuiltInSimpleActionH\x00\x12V\n\x0f\x65xternal_action\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.issueresolution.v1.ExternalActionH\x00\x12h\n\x19\x62uiltin_user_input_action\x18\x07 \x01(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.BuiltInUserInputActionH\x00\x12\x14\n\x0c\x62utton_label\x18\x04 \x01(\t\x12\x14\n\x0cis_available\x18\x05 \x01(\x08\x12K\n\x07reasons\x18\x06 \x03(\x0b\x32:.google.shopping.merchant.issueresolution.v1.Action.Reason\x1a\x93\x01\n\x06Reason\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x13\n\x06\x64\x65tail\x18\x02 \x01(\tH\x00\x88\x01\x01\x12M\n\x06\x61\x63tion\x18\x03 \x01(\x0b\x32\x33.google.shopping.merchant.issueresolution.v1.ActionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_detailB\t\n\x07_actionB\x08\n\x06\x61\x63tion\"\x90\x05\n\x13\x42uiltInSimpleAction\x12\x66\n\x04type\x18\x01 \x01(\x0e\x32X.google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.BuiltInSimpleActionType\x12\x1b\n\x0e\x61ttribute_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12s\n\x12\x61\x64\x64itional_content\x18\x03 \x01(\x0b\x32R.google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.AdditionalContentH\x01\x88\x01\x01\x1a\x36\n\x11\x41\x64\x64itionalContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x12\n\nparagraphs\x18\x02 \x03(\t\"\x9c\x02\n\x17\x42uiltInSimpleActionType\x12+\n\'BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cVERIFY_PHONE\x10\x01\x12\x11\n\rCLAIM_WEBSITE\x10\x02\x12\x10\n\x0c\x41\x44\x44_PRODUCTS\x10\x03\x12\x14\n\x10\x41\x44\x44_CONTACT_INFO\x10\x04\x12\x14\n\x10LINK_ADS_ACCOUNT\x10\x05\x12$\n ADD_BUSINESS_REGISTRATION_NUMBER\x10\x06\x12\x17\n\x13\x45\x44IT_ITEM_ATTRIBUTE\x10\x07\x12\x15\n\x11\x46IX_ACCOUNT_ISSUE\x10\x08\x12\x1b\n\x17SHOW_ADDITIONAL_CONTENT\x10\tB\x11\n\x0f_attribute_codeB\x15\n\x13_additional_content\"x\n\x16\x42uiltInUserInputAction\x12\x16\n\x0e\x61\x63tion_context\x18\x01 \x01(\t\x12\x46\n\x05\x66lows\x18\x03 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.ActionFlow\"\xf7\x02\n\nActionFlow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12G\n\x06inputs\x18\x03 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputField\x12\x14\n\x0c\x64ialog_title\x18\x04 \x01(\t\x12Y\n\x0e\x64ialog_message\x18\x07 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltipH\x00\x88\x01\x01\x12Q\n\x0e\x64ialog_callout\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.issueresolution.v1.CalloutH\x01\x88\x01\x01\x12\x1b\n\x13\x64ialog_button_label\x18\t \x01(\tB\x11\n\x0f_dialog_messageB\x11\n\x0f_dialog_callout\"\x92\t\n\nInputField\x12W\n\ntext_input\x18\x04 \x01(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1.InputField.TextInputH\x00\x12[\n\x0c\x63hoice_input\x18\x05 \x01(\x0b\x32\x43.google.shopping.merchant.issueresolution.v1.InputField.ChoiceInputH\x00\x12_\n\x0e\x63heckbox_input\x18\x06 \x01(\x0b\x32\x45.google.shopping.merchant.issueresolution.v1.InputField.CheckboxInputH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12K\n\x05label\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\x12\x10\n\x08required\x18\x03 \x01(\x08\x1a\x8d\x03\n\tTextInput\x12]\n\x04type\x18\x01 \x01(\x0e\x32O.google.shopping.merchant.issueresolution.v1.InputField.TextInput.TextInputType\x12Z\n\x0f\x61\x64\x64itional_info\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltipH\x00\x88\x01\x01\x12\x18\n\x0b\x66ormat_info\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\naria_label\x18\x04 \x01(\tH\x02\x88\x01\x01\"_\n\rTextInputType\x12\x1f\n\x1bTEXT_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12GENERIC_SHORT_TEXT\x10\x01\x12\x15\n\x11GENERIC_LONG_TEXT\x10\x02\x42\x12\n\x10_additional_infoB\x0e\n\x0c_format_infoB\r\n\x0b_aria_label\x1a\xd1\x02\n\x0b\x43hoiceInput\x12\x66\n\x07options\x18\x01 \x03(\x0b\x32U.google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput.ChoiceInputOption\x1a\xd9\x01\n\x11\x43hoiceInputOption\x12\n\n\x02id\x18\x01 \x01(\t\x12K\n\x05label\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\x12V\n\x10\x61\x64\x64itional_input\x18\x03 \x01(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputFieldH\x00\x88\x01\x01\x42\x13\n\x11_additional_input\x1a\x0f\n\rCheckboxInputB\r\n\x0bvalue_input\"\x9e\x02\n\x0fTextWithTooltip\x12\x16\n\x0csimple_value\x18\x01 \x01(\tH\x00\x12\x1e\n\x14simple_tooltip_value\x18\x02 \x01(\tH\x01\x12i\n\x12tooltip_icon_style\x18\x03 \x01(\x0e\x32M.google.shopping.merchant.issueresolution.v1.TextWithTooltip.TooltipIconStyle\"N\n\x10TooltipIconStyle\x12\"\n\x1eTOOLTIP_ICON_STYLE_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0c\n\x08QUESTION\x10\x02\x42\x07\n\x05valueB\x0f\n\rtooltip_value\"\x92\x02\n\x07\x43\x61llout\x12Y\n\nstyle_hint\x18\x01 \x01(\x0e\x32\x45.google.shopping.merchant.issueresolution.v1.Callout.CalloutStyleHint\x12R\n\x0c\x66ull_message\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.issueresolution.v1.TextWithTooltip\"X\n\x10\x43\x61lloutStyleHint\x12\"\n\x1e\x43\x41LLOUT_STYLE_HINT_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03\"\xdb\x02\n\x0e\x45xternalAction\x12\\\n\x04type\x18\x01 \x01(\x0e\x32N.google.shopping.merchant.issueresolution.v1.ExternalAction.ExternalActionType\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xdd\x01\n\x12\x45xternalActionType\x12$\n EXTERNAL_ACTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER\x10\x01\x12+\n\'REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER\x10\x02\x12\x1f\n\x1bLEGAL_APPEAL_IN_HELP_CENTER\x10\x03\x12&\n\"VERIFY_IDENTITY_IN_MERCHANT_CENTER\x10\x04\"\xc5\x01\n\x14TriggerActionRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12W\n\x07payload\x18\x02 \x01(\x0b\x32\x41.google.shopping.merchant.issueresolution.v1.TriggerActionPayloadB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x14TriggerActionPayload\x12\x1b\n\x0e\x61\x63tion_context\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\x0c\x61\x63tion_input\x18\x02 \x01(\x0b\x32\x38.google.shopping.merchant.issueresolution.v1.ActionInputB\x03\xe0\x41\x02\"(\n\x15TriggerActionResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"~\n\x0b\x41\x63tionInput\x12\x1b\n\x0e\x61\x63tion_flow_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x0cinput_values\x18\x02 \x03(\x0b\x32\x37.google.shopping.merchant.issueresolution.v1.InputValueB\x03\xe0\x41\x02\"\xf3\x03\n\nInputValue\x12\x62\n\x10text_input_value\x18\x02 \x01(\x0b\x32\x46.google.shopping.merchant.issueresolution.v1.InputValue.TextInputValueH\x00\x12\x66\n\x12\x63hoice_input_value\x18\x03 \x01(\x0b\x32H.google.shopping.merchant.issueresolution.v1.InputValue.ChoiceInputValueH\x00\x12j\n\x14\x63heckbox_input_value\x18\x04 \x01(\x0b\x32J.google.shopping.merchant.issueresolution.v1.InputValue.CheckboxInputValueH\x00\x12\x1b\n\x0einput_field_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a$\n\x0eTextInputValue\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x37\n\x10\x43hoiceInputValue\x12#\n\x16\x63hoice_input_option_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a(\n\x12\x43heckboxInputValue\x12\x12\n\x05value\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x42\x07\n\x05value*F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03*F\n\rContentOption\x12\x1e\n\x1a\x43ONTENT_OPTION_UNSPECIFIED\x10\x00\x12\x15\n\x11PRE_RENDERED_HTML\x10\x01*\x96\x01\n\x1eUserInputActionRenderingOption\x12\x32\n.USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bREDIRECT_TO_MERCHANT_CENTER\x10\x01\x12\x1f\n\x1b\x42UILT_IN_USER_INPUT_ACTIONS\x10\x02\x32\xce\x06\n\x16IssueResolutionService\x12\xfb\x01\n\x13RenderAccountIssues\x12G.google.shopping.merchant.issueresolution.v1.RenderAccountIssuesRequest\x1aH.google.shopping.merchant.issueresolution.v1.RenderAccountIssuesResponse\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"9/issueresolution/v1/{name=accounts/*}:renderaccountissues:\x07payload\x12\x86\x02\n\x13RenderProductIssues\x12G.google.shopping.merchant.issueresolution.v1.RenderProductIssuesRequest\x1aH.google.shopping.merchant.issueresolution.v1.RenderProductIssuesResponse\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\"D/issueresolution/v1/{name=accounts/*/products/*}:renderproductissues:\x07payload\x12\xe3\x01\n\rTriggerAction\x12\x41.google.shopping.merchant.issueresolution.v1.TriggerActionRequest\x1a\x42.google.shopping.merchant.issueresolution.v1.TriggerActionResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"3/issueresolution/v1/{name=accounts/*}:triggeraction:\x07payload\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xc1\x03\n/com.google.shopping.merchant.issueresolution.v1B\x14IssueResolutionProtoP\x01Z_cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb;issueresolutionpb\xaa\x02+Google.Shopping.Merchant.IssueResolution.V1\xca\x02+Google\\Shopping\\Merchant\\IssueResolution\\V1\xea\x02/Google::Shopping::Merchant::IssueResolution::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + RenderAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderAccountIssuesResponse").msgclass + RenderAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderAccountIssuesRequest").msgclass + RenderIssuesRequestPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderIssuesRequestPayload").msgclass + RenderProductIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderProductIssuesResponse").msgclass + RenderProductIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderProductIssuesRequest").msgclass + RenderedIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.RenderedIssue").msgclass + Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Impact").msgclass + Breakdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Breakdown").msgclass + Breakdown::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Breakdown.Region").msgclass + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Action").msgclass + Action::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Action.Reason").msgclass + BuiltInSimpleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction").msgclass + BuiltInSimpleAction::AdditionalContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.AdditionalContent").msgclass + BuiltInSimpleAction::BuiltInSimpleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.BuiltInSimpleActionType").enummodule + BuiltInUserInputAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.BuiltInUserInputAction").msgclass + ActionFlow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ActionFlow").msgclass + InputField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField").msgclass + InputField::TextInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.TextInput").msgclass + InputField::TextInput::TextInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.TextInput.TextInputType").enummodule + InputField::ChoiceInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput").msgclass + InputField::ChoiceInput::ChoiceInputOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput.ChoiceInputOption").msgclass + InputField::CheckboxInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput").msgclass + TextWithTooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TextWithTooltip").msgclass + TextWithTooltip::TooltipIconStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TextWithTooltip.TooltipIconStyle").enummodule + Callout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Callout").msgclass + Callout::CalloutStyleHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Callout.CalloutStyleHint").enummodule + ExternalAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ExternalAction").msgclass + ExternalAction::ExternalActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ExternalAction.ExternalActionType").enummodule + TriggerActionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionRequest").msgclass + TriggerActionPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionPayload").msgclass + TriggerActionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.TriggerActionResponse").msgclass + ActionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ActionInput").msgclass + InputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue").msgclass + InputValue::TextInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.TextInputValue").msgclass + InputValue::ChoiceInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.ChoiceInputValue").msgclass + InputValue::CheckboxInputValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.InputValue.CheckboxInputValue").msgclass + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.Severity").enummodule + ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.ContentOption").enummodule + UserInputActionRenderingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.issueresolution.v1.UserInputActionRenderingOption").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb new file mode 100644 index 000000000000..7daf1f8def84 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/issueresolution/v1/issueresolution.proto for package 'Google.Shopping.Merchant.IssueResolution.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/issueresolution_pb' + +module Google + module Shopping + module Merchant + module IssueResolution + module V1 + module IssueResolutionService + # Service to provide an issue resolution content for account issues and product + # issues. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.issueresolution.v1.IssueResolutionService' + + # Provide a list of business's account issues with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + rpc :RenderAccountIssues, ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse + # Provide a list of issues for business's product with an issue resolution + # content and available actions. This content and actions are meant to be + # rendered and shown in third-party applications. + rpc :RenderProductIssues, ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse + # Start an action. The action can be requested by a business in + # third-party application. Before the business can request the action, the + # third-party application needs to show them action specific content and + # display a user input form. + # + # The action can be successfully started only once all `required` inputs are + # provided. If any `required` input is missing, or invalid value was + # provided, the service will return 400 error. Validation errors will contain + # [Ids][google.shopping.merchant.issueresolution.v1.InputField.id] for all + # problematic field together with translated, human readable error messages + # that can be shown to the user. + rpc :TriggerAction, ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md b/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb new file mode 100644 index 000000000000..d4e87330881e --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb @@ -0,0 +1,173 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1 + # Request message for the `ListAggregateProductStatuses` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list aggregate product statuses for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of aggregate product statuses to return. The + # service may return fewer than this value. If unspecified, at most 25 + # aggregate product statuses are returned. The maximum value is 250; values + # above 250 are coerced to 250. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListAggregateProductStatuses` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAggregateProductStatuses` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the aggregate product statuses. + # Filtering is only supported by the `reporting_context` and `country` field. + # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. + class ListAggregateProductStatusesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAggregateProductStatuses` method. + # @!attribute [rw] aggregate_product_statuses + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>] + # The `AggregateProductStatuses` resources for the given account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAggregateProductStatusesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregate product statuses for a given reporting context and country. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `AggregateProductStatuses` resource. + # Format: + # `accounts/{account}/aggregateProductStatuses/{aggregateProductStatuses}` + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The reporting context of the aggregate product statuses. + # @!attribute [rw] country + # @return [::String] + # The country of the aggregate product statuses. Represented as a + # [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + # @!attribute [rw] stats + # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::Stats] + # Products statistics for the given reporting context and country. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue>] + # The product issues that affect the given reporting context and country. + class AggregateProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Products statistics. + # @!attribute [rw] active_count + # @return [::Integer] + # The number of products that are active. + # @!attribute [rw] pending_count + # @return [::Integer] + # The number of products that are pending. + # @!attribute [rw] disapproved_count + # @return [::Integer] + # The number of products that are disapproved. + # @!attribute [rw] expiring_count + # @return [::Integer] + # The number of products that are expiring. + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the product status. + # @!attribute [rw] code + # @return [::String] + # The error code of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue::Severity] + # How this issue affects serving of the offer. + # @!attribute [rw] resolution + # @return [::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus::ItemLevelIssue::Resolution] + # Whether the issue can be resolved by the merchant. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] description + # @return [::String] + # A short issue description in English. + # @!attribute [rw] detail + # @return [::String] + # A detailed issue description in English. + # @!attribute [rw] documentation_uri + # @return [::String] + # The URL of a web page to help with resolving this issue. + # @!attribute [rw] product_count + # @return [::Integer] + # The number of products affected by this issue. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How the issue affects the serving of the product. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the product. + NOT_IMPACTED = 1 + + # The product is demoted and most likely have limited performance + # in search results + DEMOTED = 2 + + # Issue disapproves the product. + DISAPPROVED = 3 + end + + # How the issue can be resolved. + module Resolution + # Not specified. + RESOLUTION_UNSPECIFIED = 0 + + # The issue can be resolved by the merchant. + MERCHANT_ACTION = 1 + + # The issue will be resolved auomatically. + PENDING_PROCESSING = 2 + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb new file mode 100644 index 000000000000..7bf3feaf5fe6 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb @@ -0,0 +1,952 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module IssueResolution + module V1 + # Response containing an issue resolution content and actions for listed + # account issues. + # @!attribute [rw] rendered_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue>] + # List of account issues for a given account. + # + # This list can be shown with compressed, expandable items. In the compressed + # form, the title and impact should be shown for each issue. Once the issue + # is expanded, the detailed + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#prerendered_content content} + # and available + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#actions actions} + # should be rendered. + class RenderAccountIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to provide issue resolution content and actions for business's + # account issues. + # @!attribute [rw] name + # @return [::String] + # Required. The account to fetch issues for. + # Format: `accounts/{account}` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize issue resolution content. If not set, the result will + # be in default language `en-US`. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload] + # Optional. The payload for configuring how the content should be rendered. + class RenderAccountIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload for configuring how the content should be rendered. + # @!attribute [rw] content_option + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ContentOption] + # Optional. How the detailed content should be returned. Default option is to + # return the content as a pre-rendered HTML text. + # @!attribute [rw] user_input_action_option + # @return [::Google::Shopping::Merchant::IssueResolution::V1::UserInputActionRenderingOption] + # Optional. How actions with user input form should be handled. If not + # provided, actions will be returned as links that points the business to + # Merchant Center where they can request the action. + class RenderIssuesRequestPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response containing an issue resolution content and actions for listed + # product issues. + # @!attribute [rw] rendered_issues + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue>] + # List of issues for a given product. + # + # This list can be shown with compressed, expandable items. In the compressed + # form, the + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#title title} + # and + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#impact impact} + # should be shown for each issue. Once the issue is expanded, the detailed + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#prerendered_content content} + # and available + # {::Google::Shopping::Merchant::IssueResolution::V1::RenderedIssue#actions actions} + # should be rendered. + class RenderProductIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to provide an issue resolution content and actions for product issues + # of business's product. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product to fetch issues for. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language + # code used to localize an issue resolution content. If not set, the result + # will be in default language `en-US`. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in an issue resolution content. For example + # 'America/Los_Angeles'. If not set, results will use as a default UTC. + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload] + # Optional. The payload for configuring how the content should be rendered. + class RenderProductIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An issue affecting specific business or their product. + # @!attribute [rw] prerendered_content + # @return [::String] + # Details of the issue as a pre-rendered HTML. HTML elements contain CSS + # classes that can be used to customize the style of the content. + # + # Always sanitize the HTML before embedding it directly to your + # application. The sanitizer needs to allow basic HTML tags, such as: + # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, + # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). + # + # CSS classes: + # + # * `issue-detail` - top level container for the detail of the issue + # * `callout-banners` - section of the `issue-detail` with callout banners + # * `callout-banner` - single callout banner, inside `callout-banners` + # * `callout-banner-info` - callout with important information (default) + # * `callout-banner-warning` - callout with a warning + # * `callout-banner-error` - callout informing about an error (most severe) + # * `issue-content` - section of the `issue-detail`, contains multiple + # `content-element` + # * `content-element` - content element such as a list, link or paragraph, + # inside `issue-content` + # * `root-causes` - unordered list with items describing root causes of the + # issue, inside `issue-content` + # * `root-causes-intro` - intro text before the `root-causes` list, inside + # `issue-content` + # * `segment` - section of the text, `span` inside paragraph + # * `segment-attribute` - section of the text that represents a product + # attribute, for example 'image\_link' + # * `segment-literal` - section of the text that contains a special value, + # for example '0-1000 kg' + # * `segment-bold` - section of the text that should be rendered as bold + # * `segment-italic` - section of the text that should be rendered as + # italic + # * `tooltip` - used on paragraphs that should be rendered with a tooltip. + # A section of the text in such a paragraph will have a class + # `tooltip-text` and is intended to be shown in a mouse over dialog. If the + # style is not used, the `tooltip-text` section would be shown on a new + # line, after the main part of the text. + # * `tooltip-text` - marks a section of the text within a `tooltip`, that + # is intended to be shown in a mouse over dialog. + # * `tooltip-icon` - marks a section of the text within a `tooltip`, that + # can be replaced with a tooltip icon, for example '?' or 'i'. By default, + # this section contains a `br` tag, that is separating the main text and + # the tooltip text when the style is not used. + # * `tooltip-style-question` - the tooltip shows helpful information, + # can use the '?' as an icon. + # * `tooltip-style-info` - the tooltip adds additional information fitting + # to the context, can use the 'i' as an icon. + # * `content-moderation` - marks the paragraph that explains how the issue + # was identified. + # * `new-element` - Present for new elements added to the pre-rendered + # content in the future. To make sure that a new content element does not + # break your style, you can hide everything with this class. + # @!attribute [rw] prerendered_out_of_court_dispute_settlement + # @return [::String] + # Pre-rendered HTML that contains a link to the external location where the + # ODS can be requested and instructions for how to request it. HTML + # elements contain CSS classes that can be used to customize the style of + # this snippet. + # + # Always sanitize the HTML before embedding it directly to your + # application. The sanitizer needs to allow basic HTML tags, such as: + # `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, + # you can use [DOMPurify](https://www.npmjs.com/package/dompurify). + # + # CSS classes: + # + # * `ods-section`* - wrapper around the out-of-court dispute resolution + # section + # * `ods-description`* - intro text for the out-of-court dispute + # resolution. It may contain multiple segments and a link. + # * `ods-param`* - wrapper around the header-value pair for parameters that + # the business may need to provide during the ODS process. + # * `ods-routing-id`* - ods param for the Routing ID. + # * `ods-reference-id`* - ods param for the Routing ID. + # * `ods-param-header`* - header for the ODS parameter + # * `ods-param-value`* - value of the ODS parameter. This value should be + # rendered in a way that it is easy for the user to identify and copy. + # * `segment` - section of the text, `span` inside paragraph + # * `segment-attribute` - section of the text that represents a product + # attribute, for example 'image\_link' + # * `segment-literal` - section of the text that contains a special value, + # for example '0-1000 kg' + # * `segment-bold` - section of the text that should be rendered as bold + # * `segment-italic` - section of the text that should be rendered as + # italic + # * `tooltip` - used on paragraphs that should be rendered with a tooltip. + # A section of the text in such a paragraph will have a class + # `tooltip-text` and is intended to be shown in a mouse over dialog. If the + # style is not used, the `tooltip-text` section would be shown on a new + # line, after the main part of the text. + # * `tooltip-text` - marks a section of the text within a `tooltip`, that + # is intended to be shown in a mouse over dialog. + # * `tooltip-icon` - marks a section of the text within a `tooltip`, that + # can be replaced with a tooltip icon, for example '?' or 'i'. By default, + # this section contains a `br` tag, that is separating the main text and + # the tooltip text when the style is not used. + # * `tooltip-style-question` - the tooltip shows helpful information, + # can use the '?' as an icon. + # * `tooltip-style-info` - the tooltip adds additional information fitting + # to the context, can use the 'i' as an icon. + # @!attribute [rw] title + # @return [::String] + # Title of the issue. + # @!attribute [rw] impact + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Impact] + # Clarifies the severity of the issue. + # + # The [summarizing + # message][google.shopping.merchant.issueresolution.v1.Impact.message], if + # present, should be shown right under the title for each issue. It helps + # business to quickly understand the impact of the issue. + # + # The detailed + # {::Google::Shopping::Merchant::IssueResolution::V1::Impact#breakdowns breakdown} + # helps the business to fully understand the impact of the issue. It can be + # rendered as dialog that opens when the business mouse over the summarized + # impact statement. + # + # Issues with different + # {::Google::Shopping::Merchant::IssueResolution::V1::Impact#severity severity} can + # be styled differently. They may use a different color or icon to signal the + # difference between `ERROR`, `WARNING` and `INFO`. + # @!attribute [rw] actions + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Action>] + # A list of actionable steps that can be executed to solve the issue. An + # example is requesting a re-review or providing arguments when business + # disagrees with the issue. + # + # Actions that are supported in (your) third-party application can be + # rendered as buttons and should be available to the business when they + # expand the issue. + class RenderedIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Overall impact of the issue. + # @!attribute [rw] message + # @return [::String] + # Optional. Message summarizing the overall impact of the issue. If present, + # it should be rendered to the business. For example: "Disapproves 90k offers + # in 25 countries" + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Severity] + # The severity of the issue. + # @!attribute [rw] breakdowns + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Breakdown>] + # Detailed impact breakdown. Explains the types of restriction the issue has + # in different shopping destinations and territory. If present, it should be + # rendered to the business. Can be shown as a mouse over dropdown or a + # dialog. Each breakdown item represents a group of regions with the same + # impact details. + class Impact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A detailed impact breakdown for a group of regions where the impact of the + # issue on different shopping destinations is the same. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Breakdown::Region>] + # Lists of regions. Should be rendered as a title for this group of details. + # The full list should be shown to the business. If the list is too long, it + # is recommended to make it expandable. + # @!attribute [rw] details + # @return [::Array<::String>] + # Human readable, localized description of issue's effect on different + # targets. Should be rendered as a list. + # + # For example: + # + # * "Products not showing in ads" + # * "Products not showing organically" + class Breakdown + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Region with code and localized name. + # @!attribute [rw] code + # @return [::String] + # The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # @!attribute [rw] name + # @return [::String] + # The localized name of the region. + # For region with code='001' the value is 'All countries' or the equivalent + # in other languages. + class Region + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An actionable step that can be executed to solve the issue. + # @!attribute [rw] builtin_simple_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction] + # Action implemented and performed in (your) third-party application. The + # application should point the business to the place, where they can access + # the corresponding functionality or provide instructions, if the specific + # functionality is not available. + # + # Note: The following fields are mutually exclusive: `builtin_simple_action`, `external_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] external_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ExternalAction] + # Action that is implemented and performed outside of (your) third-party + # application. The application needs to redirect the business to the + # external location where they can perform the action. + # + # Note: The following fields are mutually exclusive: `external_action`, `builtin_simple_action`, `builtin_user_input_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] builtin_user_input_action + # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInUserInputAction] + # Action implemented and performed in (your) third-party application. + # The application needs to show an additional content and input form to the + # business as specified for given action. They can trigger the action only + # when they provided all required inputs. + # + # Note: The following fields are mutually exclusive: `builtin_user_input_action`, `builtin_simple_action`, `external_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] button_label + # @return [::String] + # Label of the action button. + # @!attribute [rw] is_available + # @return [::Boolean] + # Controlling whether the button is active or disabled. The value is 'false' + # when the action was already requested or is not available. If the action is + # not available then a + # {::Google::Shopping::Merchant::IssueResolution::V1::Action#reasons reason} will + # be present. If (your) third-party application shows a disabled button for + # action that is not available, then it should also show reasons. + # @!attribute [rw] reasons + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::Action::Reason>] + # List of reasons why the action is not available. The list of reasons is + # empty if the action is available. If there is only one reason, it can be + # displayed next to the disabled button. If there are more reasons, all of + # them should be displayed, for example in a pop-up dialog. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single reason why the action is not available. + # @!attribute [rw] message + # @return [::String] + # Messages summarizing the reason, why the action is not available. + # For example: "Review requested on Jan 03. Review requests can take a few + # days to complete." + # @!attribute [rw] detail + # @return [::String] + # Detailed explanation of the reason. Should be displayed as a hint if + # present. + # @!attribute [rw] action + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Action] + # Optional. An action that needs to be performed to solve the problem + # represented by this reason. This action will always be available. Should + # be rendered as a link or button next to the summarizing message. + # + # For example, the review may be available only once the business configure + # all required attributes. In such a situation this action can be a link to + # the form, where they can fill the missing attribute to unblock the main + # action. + class Reason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Action that is implemented and performed in (your) third-party application. + # Represents various functionality that is expected to be available to business + # and will help them with resolving the issue. The application should point the + # business to the place, where they can access the corresponding functionality. + # If the functionality is not supported, it is recommended to explain the + # situation to the business and provide them with instructions how to solve the + # issue. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction::BuiltInSimpleActionType] + # The type of action that represents a functionality that is expected to be + # available in third-party application. + # @!attribute [rw] attribute_code + # @return [::String] + # The attribute that needs to be updated. Present when the + # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#type type} + # is `EDIT_ITEM_ATTRIBUTE`. + # + # This field contains a code for attribute, represented in snake_case. You + # can find a list of product's attributes, with their codes + # [here](https://support.google.com/merchants/answer/7052112). + # @!attribute [rw] additional_content + # @return [::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction::AdditionalContent] + # Long text from an external source that should be available to the business. + # Present when the + # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#type type} + # is `SHOW_ADDITIONAL_CONTENT`. + class BuiltInSimpleAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Long text from external source. + # @!attribute [rw] title + # @return [::String] + # Title of the additional content; + # @!attribute [rw] paragraphs + # @return [::Array<::String>] + # Long text organized into paragraphs. + class AdditionalContent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum specifying the type of action in third-party application. + module BuiltInSimpleActionType + # Default value. Will never be provided by the API. + BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED = 0 + + # Redirect the business to the part of your application where they can + # verify their phone. + VERIFY_PHONE = 1 + + # Redirect the business to the part of your application where they can + # claim their website. + CLAIM_WEBSITE = 2 + + # Redirect the business to the part of your application where they can add + # products. + ADD_PRODUCTS = 3 + + # Open a form where the business can edit their contact information. + ADD_CONTACT_INFO = 4 + + # Redirect the business to the part of your application where they can link + # ads account. + LINK_ADS_ACCOUNT = 5 + + # Open a form where the business can add their business registration + # number. + ADD_BUSINESS_REGISTRATION_NUMBER = 6 + + # Open a form where the business can edit an attribute. The attribute that + # needs to be updated is specified in + # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInSimpleAction#attribute_code attribute_code} + # field of the action. + EDIT_ITEM_ATTRIBUTE = 7 + + # Redirect the business from the product issues to the diagnostic page with + # their account issues in your application. + # + # This action will be returned only for product issues that are caused by + # an account issue and thus the business should resolve the problem on the + # account level. + FIX_ACCOUNT_ISSUE = 8 + + # Show [additional + # content][google.shopping.merchant.issueresolution.v1.BuiltInSimpleAction.additional_content] + # to the business. + # + # This action will be used for example to deliver a justification from + # national authority. + SHOW_ADDITIONAL_CONTENT = 9 + end + end + + # Action that is implemented and performed in (your) third-party application. + # The application needs to show an additional content and input form to the + # business. They can start the action only when they provided all required + # inputs. The application will request processing of the action by calling the + # [triggeraction + # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1beta/issueresolution/triggeraction). + # @!attribute [rw] action_context + # @return [::String] + # Contains the action's context that must be included as part of the + # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload#action_context TriggerActionPayload.action_context} + # in + # {::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest#payload TriggerActionRequest.payload} + # to call the `triggeraction` method. The content should be treated as opaque + # and must not be modified. + # @!attribute [rw] flows + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::ActionFlow>] + # Actions may provide multiple different flows. Business selects one that + # fits best to their intent. Selecting the flow is the first step in user's + # interaction with the action. It affects what input fields will be available + # and required and also how the request will be processed. + class BuiltInUserInputAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Flow that can be selected for an action. When a business selects a flow, + # application should open a dialog with more information and input form. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the selected action flow. + # @!attribute [rw] label + # @return [::String] + # Text value describing the intent for the action flow. It can be used as an + # input label if business needs to pick one of multiple flows. For example: + # "I disagree with the issue" + # @!attribute [rw] inputs + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputField>] + # A list of input fields. + # @!attribute [rw] dialog_title + # @return [::String] + # Title of the request dialog. For example: "Before you request a review" + # @!attribute [rw] dialog_message + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # Message displayed in the request dialog. For example: "Make sure you've + # fixed all your country-specific issues. If not, you may have to wait 7 days + # to request another review". There may be an more information to be shown in + # a tooltip. + # @!attribute [rw] dialog_callout + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Callout] + # Important message to be highlighted in the request dialog. For example: + # "You can only request a review for disagreeing with this issue once. If + # it's not approved, you'll need to fix the issue and wait a few days before + # you can request another review." + # @!attribute [rw] dialog_button_label + # @return [::String] + # Label for the button to trigger the action from the action dialog. For + # example: "Request review" + class ActionFlow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input field that needs to be available to the business. If the field is + # marked as required, then a value needs to be provided for a successful + # processing of the request. + # @!attribute [rw] text_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::TextInput] + # Input field to provide text information. + # Corresponds to the [html input + # type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) + # or [html + # textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + # + # Note: The following fields are mutually exclusive: `text_input`, `choice_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] choice_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::ChoiceInput] + # Input field to select one of the offered choices. + # Corresponds to the [html input + # type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). + # + # Note: The following fields are mutually exclusive: `choice_input`, `text_input`, `checkbox_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] checkbox_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::CheckboxInput] + # Input field to provide a boolean value. + # Corresponds to the [html input + # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + # + # Note: The following fields are mutually exclusive: `checkbox_input`, `text_input`, `choice_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the given input field. + # @!attribute [rw] label + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # Input field label. There may be more information to be shown in a tooltip. + # @!attribute [rw] required + # @return [::Boolean] + # Whether the field is required. The action button needs to stay disabled + # till values for all required fields are provided. + class InputField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Text input allows the business to provide a text value. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField::TextInput::TextInputType] + # Type of the text input + # @!attribute [rw] additional_info + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # Additional info regarding the field to be displayed to the business. For + # example, warning to not include personal identifiable information. There + # may be more information to be shown in a tooltip. + # @!attribute [rw] format_info + # @return [::String] + # Information about the required format. If present, it should be shown + # close to the input field to help the business to provide a correct value. + # For example: "VAT numbers should be in a format similar to SK9999999999" + # @!attribute [rw] aria_label + # @return [::String] + # Text to be used as the + # [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the + # input. + class TextInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of the text input and how it should be rendered. + module TextInputType + # Default value. Will never be provided by the API. + TEXT_INPUT_TYPE_UNSPECIFIED = 0 + + # Used when a short text is expected. The field can be rendered as a + # [text + # field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text). + GENERIC_SHORT_TEXT = 1 + + # Used when a longer text is expected. The field should be rendered as a + # [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + GENERIC_LONG_TEXT = 2 + end + end + + # Choice input allows the business to select one of the offered choices. Some + # choices may be linked to additional input fields that should be displayed + # under or next to the choice option. The value for the additional input + # field needs to be provided only when the specific choice is selected by the + # the business. For example, additional input field can be hidden or disabled + # until the business selects the specific choice. + # @!attribute [rw] options + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputField::ChoiceInput::ChoiceInputOption>] + # A list of choices. Only one option can be selected. + class ChoiceInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A choice that the business can select. + # @!attribute [rw] id + # @return [::String] + # Not for display but need to be sent back for the selected choice + # option. + # @!attribute [rw] label + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # Short description of the choice option. There may be more information + # to be shown as a tooltip. + # @!attribute [rw] additional_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputField] + # Input that should be displayed when this option is selected. + # The additional input will not contain a `ChoiceInput`. + class ChoiceInputOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Checkbox input allows the business to provide a boolean value. Corresponds + # to the [html input + # type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + # + # If the business checks the box, the input value for the field is `true`, + # otherwise it is `false`. + # + # This type of input is often used as a confirmation that the business + # completed required steps before they are allowed to start the action. In + # such a case, the input field is marked as + # {::Google::Shopping::Merchant::IssueResolution::V1::InputField#required required} + # and the button to trigger the action should stay disabled until the + # business checks the box. + class CheckboxInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Block of text that may contain a tooltip with more information. + # @!attribute [rw] simple_value + # @return [::String] + # Value of the message as a simple text. + # @!attribute [rw] simple_tooltip_value + # @return [::String] + # Value of the tooltip as a simple text. + # @!attribute [rw] tooltip_icon_style + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip::TooltipIconStyle] + # The suggested type of an icon for tooltip, if a tooltip is present. + class TextWithTooltip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of an icon that is being used to display a + # corresponding tooltip in the Merchant Center. + module TooltipIconStyle + # Default value. Will never be provided by the API. + TOOLTIP_ICON_STYLE_UNSPECIFIED = 0 + + # Used when the tooltip adds additional information to the context, + # the 'i' can be used as an icon. + INFO = 1 + + # Used when the tooltip shows helpful information, the '?' can be used as + # an icon. + QUESTION = 2 + end + end + + # An important message that should be highlighted. Usually displayed as a + # banner. + # @!attribute [rw] style_hint + # @return [::Google::Shopping::Merchant::IssueResolution::V1::Callout::CalloutStyleHint] + # Can be used to render messages with different severity in different styles. + # Snippets off all types contain important information that should be + # displayed to the business. + # @!attribute [rw] full_message + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TextWithTooltip] + # A full message that needs to be shown to the business. + class Callout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the suggested style, how the message should be rendered. + module CalloutStyleHint + # Default value. Will never be provided by the API. + CALLOUT_STYLE_HINT_UNSPECIFIED = 0 + + # The most important type of information highlighting problems, like an + # unsuccessful outcome of previously requested actions. + ERROR = 1 + + # Information warning about pending problems, risks or deadlines. + WARNING = 2 + + # Default severity for important information like pending status of + # previously requested action or cooldown for re-review. + INFO = 3 + end + end + + # Action that is implemented and performed outside of the third-party + # application. It should redirect the business to the provided URL of an + # external system where they can perform the action. For example to request a + # review in the Merchant Center. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ExternalAction::ExternalActionType] + # The type of external action. + # @!attribute [rw] uri + # @return [::String] + # URL to external system, for example Merchant Center, where the business can + # perform the action. + class ExternalAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum specifying the type of action that requires to redirect the business + # to an external location. + module ExternalActionType + # Default value. Will never be provided by the API. + EXTERNAL_ACTION_TYPE_UNSPECIFIED = 0 + + # Redirect to Merchant Center where the business can request a review for + # issue related to their product. + REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER = 1 + + # Redirect to Merchant Center where the business can request a review for + # issue related to their account. + REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER = 2 + + # Redirect to the form in Help Center where the business can request a + # legal appeal for the issue. + LEGAL_APPEAL_IN_HELP_CENTER = 3 + + # Redirect to Merchant Center where the business can perform identity + # verification. + VERIFY_IDENTITY_IN_MERCHANT_CENTER = 4 + end + end + + # Request to start the selected action + # @!attribute [rw] name + # @return [::String] + # Required. The business's account that is triggering the action. + # Format: `accounts/{account}` + # @!attribute [rw] payload + # @return [::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload] + # Required. The payload for the triggered action. + # @!attribute [rw] language_code + # @return [::String] + # Optional. Language code [IETF BCP 47 + # syntax](https://tools.ietf.org/html/bcp47) used to localize the response. + # If not set, the result will be in default language `en-US`. + class TriggerActionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload for the triggered action. + # @!attribute [rw] action_context + # @return [::String] + # Required. The + # {::Google::Shopping::Merchant::IssueResolution::V1::BuiltInUserInputAction#action_context context} + # from the selected action. The value is obtained from rendered issues and + # needs to be sent back to identify the + # {::Google::Shopping::Merchant::IssueResolution::V1::Action#builtin_user_input_action action} + # that is being triggered. + # @!attribute [rw] action_input + # @return [::Google::Shopping::Merchant::IssueResolution::V1::ActionInput] + # Required. Input provided by the business. + class TriggerActionPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response informing about the started action. + # @!attribute [rw] message + # @return [::String] + # The message for the business. + class TriggerActionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input provided by the business. + # @!attribute [rw] action_flow_id + # @return [::String] + # Required. {::Google::Shopping::Merchant::IssueResolution::V1::ActionFlow#id Id} + # of the selected action flow. + # @!attribute [rw] input_values + # @return [::Array<::Google::Shopping::Merchant::IssueResolution::V1::InputValue>] + # Required. Values for input fields. + class ActionInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input provided by the business for input field. + # @!attribute [rw] text_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::TextInputValue] + # Value for [text + # input][google.shopping.merchant.issueresolution.v1.InputField.TextInput] + # field. + # + # Note: The following fields are mutually exclusive: `text_input_value`, `choice_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] choice_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::ChoiceInputValue] + # Value for [choice + # input][google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput] + # field. + # + # Note: The following fields are mutually exclusive: `choice_input_value`, `text_input_value`, `checkbox_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] checkbox_input_value + # @return [::Google::Shopping::Merchant::IssueResolution::V1::InputValue::CheckboxInputValue] + # Value for [checkbox + # input][google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput] + # field. + # + # Note: The following fields are mutually exclusive: `checkbox_input_value`, `text_input_value`, `choice_input_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_field_id + # @return [::String] + # Required. {::Google::Shopping::Merchant::IssueResolution::V1::InputField#id Id} + # of the corresponding input field. + class InputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value for [text + # input][google.shopping.merchant.issueresolution.v1.InputField.TextInput] + # field. + # @!attribute [rw] value + # @return [::String] + # Required. Text provided by the business. + class TextInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Value for [choice + # input][google.shopping.merchant.issueresolution.v1.InputField.ChoiceInput] + # field. + # @!attribute [rw] choice_input_option_id + # @return [::String] + # Required. [Id][InputField.ChoiceInput.id] of the option that was selected + # by the business. + class ChoiceInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Value for [checkbox + # input][google.shopping.merchant.issueresolution.v1.InputField.CheckboxInput] + # field. + # @!attribute [rw] value + # @return [::Boolean] + # Required. True if the business checked the box field. False otherwise. + class CheckboxInputValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Enum specifying the severity of the issue. + module Severity + # Default value. Will never be provided by the API. + SEVERITY_UNSPECIFIED = 0 + + # Causes either an account suspension or an item disapproval. Errors should + # be resolved as soon as possible to ensure items are eligible to appear in + # results again. + ERROR = 1 + + # Warnings can negatively impact the performance of ads and can lead to item + # or account suspensions in the future unless the issue is resolved. + WARNING = 2 + + # Infos are suggested optimizations to increase data quality. Resolving these + # issues is recommended, but not required. + INFO = 3 + end + + # Enum specifying how is the content returned. + module ContentOption + # Default value. Will never be provided by the API. + CONTENT_OPTION_UNSPECIFIED = 0 + + # Returns the detail of the issue as a pre-rendered HTML text. + PRE_RENDERED_HTML = 1 + end + + # Enum specifying how actions with user input forms, such as requesting + # re-review, are handled. + module UserInputActionRenderingOption + # Default value. Will never be provided by the API. + USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED = 0 + + # Actions that require user input are represented only as links that points + # the business to Merchant Center where they can request the action. Provides + # easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`. + REDIRECT_TO_MERCHANT_CENTER = 1 + + # Returns content and input form definition for each complex action. Your + # application needs to display this content and input form to the business + # before they can request processing of the action. To start the action, your + # application needs to call the `triggeraction` method. + BUILT_IN_USER_INPUT_ACTIONS = 2 + end + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile b/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile new file mode 100644 index 000000000000..88047ebc50c5 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-issue_resolution-v1", path: "../" +else + gem "google-shopping-merchant-issue_resolution-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb b/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb new file mode 100644 index 000000000000..cf632f03b951 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/snippets/aggregate_product_statuses_service/list_aggregate_product_statuses.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] +require "google/shopping/merchant/issue_resolution/v1" + +## +# Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses. +# +def list_aggregate_product_statuses + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new + + # Call the list_aggregate_product_statuses method. + result = client.list_aggregate_product_statuses 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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus. + p item + end +end +# [END merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync] diff --git a/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb b/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb new file mode 100644 index 000000000000..278f08fd6faf --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_account_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync] +require "google/shopping/merchant/issue_resolution/v1" + +## +# Snippet for the render_account_issues call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues. +# +def render_account_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new + + # Call the render_account_issues method. + result = client.render_account_issues request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse. + p result +end +# [END merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync] diff --git a/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb b/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb new file mode 100644 index 000000000000..7d43d97212fa --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/render_product_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync] +require "google/shopping/merchant/issue_resolution/v1" + +## +# Snippet for the render_product_issues call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues. +# +def render_product_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new + + # Call the render_product_issues method. + result = client.render_product_issues request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse. + p result +end +# [END merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync] diff --git a/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb b/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb new file mode 100644 index 000000000000..d9e91031f453 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/snippets/issue_resolution_service/trigger_action.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync] +require "google/shopping/merchant/issue_resolution/v1" + +## +# Snippet for the trigger_action call in the IssueResolutionService 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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action. +# +def trigger_action + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new + + # Call the trigger_action method. + result = client.trigger_action request + + # The returned object is of type Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse. + p result +end +# [END merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync] diff --git a/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json b/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json new file mode 100644 index 000000000000..6a707c6d46ec --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-shopping-merchant-issue_resolution-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.issueresolution.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_AggregateProductStatusesService_ListAggregateProductStatuses_sync", + "title": "Snippet for the list_aggregate_product_statuses call in the AggregateProductStatusesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses.", + "file": "aggregate_product_statuses_service/list_aggregate_product_statuses.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_aggregate_product_statuses", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client#list_aggregate_product_statuses", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse", + "client": { + "short_name": "AggregateProductStatusesService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client" + }, + "method": { + "short_name": "ListAggregateProductStatuses", + "full_name": "google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService.ListAggregateProductStatuses", + "service": { + "short_name": "AggregateProductStatusesService", + "full_name": "google.shopping.merchant.issueresolution.v1.AggregateProductStatusesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_IssueResolutionService_RenderAccountIssues_sync", + "title": "Snippet for the render_account_issues call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues.", + "file": "issue_resolution_service/render_account_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "render_account_issues", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_account_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" + }, + "method": { + "short_name": "RenderAccountIssues", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.RenderAccountIssues", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_IssueResolutionService_RenderProductIssues_sync", + "title": "Snippet for the render_product_issues call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues.", + "file": "issue_resolution_service/render_product_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "render_product_issues", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#render_product_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" + }, + "method": { + "short_name": "RenderProductIssues", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.RenderProductIssues", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_IssueResolutionService_TriggerAction_sync", + "title": "Snippet for the trigger_action call in the IssueResolutionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action.", + "file": "issue_resolution_service/trigger_action.rb", + "language": "RUBY", + "client_method": { + "short_name": "trigger_action", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client#trigger_action", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse", + "client": { + "short_name": "IssueResolutionService::Client", + "full_name": "::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client" + }, + "method": { + "short_name": "TriggerAction", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService.TriggerAction", + "service": { + "short_name": "IssueResolutionService", + "full_name": "google.shopping.merchant.issueresolution.v1.IssueResolutionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb new file mode 100644 index 000000000000..fc6a5fe61d1e --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb new file mode 100644 index 000000000000..e930a4f7b718 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_rest_test.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest" + + +class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_list_aggregate_product_statuses + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::ServiceStub.stub :transcode_list_aggregate_product_statuses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_aggregate_product_statuses_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_aggregate_product_statuses({ parent: parent, 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_aggregate_product_statuses parent: parent, 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new(parent: parent, 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_aggregate_product_statuses({ parent: parent, 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new(parent: parent, 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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb new file mode 100644 index 000000000000..3c58c0768605 --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" +require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb" +require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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_list_aggregate_product_statuses + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_aggregate_product_statuses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_aggregate_product_statuses, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, request + assert_equal "hello world", request["parent"] + 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_aggregate_product_statuses_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_aggregate_product_statuses({ parent: parent, 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_aggregate_product_statuses parent: parent, 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_aggregate_product_statuses ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new(parent: parent, 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_aggregate_product_statuses({ parent: parent, 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_aggregate_product_statuses(::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new(parent: parent, 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_aggregate_product_statuses_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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb new file mode 100644 index 000000000000..85ca6af75e3f --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issue_resolution/v1/issue_resolution_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb new file mode 100644 index 000000000000..e18e4250d8ef --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_rest_test.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/issueresolution_pb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest" + + +class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_render_account_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_account_issues_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_account_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, render_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, render_account_issues_client_stub.call_count + end + end + end + + def test_render_product_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_product_issues_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_render_product_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, render_product_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, render_product_issues_client_stub.call_count + end + end + end + + def test_trigger_action + # Create test objects. + client_result = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + language_code = "hello world" + + trigger_action_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::ServiceStub.stub :transcode_trigger_action_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, trigger_action_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.trigger_action name: name, payload: payload, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.trigger_action({ name: name, payload: payload, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb new file mode 100644 index 000000000000..13dba636731d --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb @@ -0,0 +1,275 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/issueresolution/v1/issueresolution_pb" +require "google/shopping/merchant/issueresolution/v1/issueresolution_services_pb" +require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" + +class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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_render_account_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesResponse.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" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :render_account_issues, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, render_account_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.render_account_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.render_account_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.render_account_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.render_account_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderAccountIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, render_account_issues_client_stub.call_rpc_count + end + end + + def test_render_product_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesResponse.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" + language_code = "hello world" + time_zone = "hello world" + payload = {} + + render_product_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :render_product_issues, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["time_zone"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::RenderIssuesRequestPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, render_product_issues_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.render_product_issues name: name, language_code: language_code, time_zone: time_zone, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.render_product_issues ::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.render_product_issues({ name: name, language_code: language_code, time_zone: time_zone, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.render_product_issues(::Google::Shopping::Merchant::IssueResolution::V1::RenderProductIssuesRequest.new(name: name, language_code: language_code, time_zone: time_zone, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, render_product_issues_client_stub.call_rpc_count + end + end + + def test_trigger_action + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionResponse.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" + payload = {} + language_code = "hello world" + + trigger_action_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :trigger_action, name + assert_kind_of ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionPayload), request["payload"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, trigger_action_client_stub do + # Create client + client = ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.trigger_action({ name: name, payload: payload, language_code: language_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.trigger_action name: name, payload: payload, language_code: language_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.trigger_action ::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.trigger_action({ name: name, payload: payload, language_code: language_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.trigger_action(::Google::Shopping::Merchant::IssueResolution::V1::TriggerActionRequest.new(name: name, payload: payload, language_code: language_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, trigger_action_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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::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::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-issue_resolution-v1/test/helper.rb b/google-shopping-merchant-issue_resolution-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-issue_resolution-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 88778f8dbb64..d58ffdae8ff4 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1875,6 +1875,10 @@ "component": "google-shopping-merchant-issue_resolution", "version_file": "lib/google/shopping/merchant/issue_resolution/version.rb" }, + "google-shopping-merchant-issue_resolution-v1": { + "component": "google-shopping-merchant-issue_resolution-v1", + "version_file": "lib/google/shopping/merchant/issue_resolution/v1/version.rb" + }, "google-shopping-merchant-issue_resolution-v1beta": { "component": "google-shopping-merchant-issue_resolution-v1beta", "version_file": "lib/google/shopping/merchant/issue_resolution/v1beta/version.rb" From cce085f88203ac5c33a0f74d6f9c1e80151f619a Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:34:39 -0700 Subject: [PATCH 363/457] feat: Initial generation of google-shopping-merchant-products-v1 (#30769) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 71 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + google-shopping-merchant-products-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + google-shopping-merchant-products-v1/Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 154 ++ google-shopping-merchant-products-v1/Rakefile | 169 +++ .../gapic_metadata.json | 52 + ...ogle-shopping-merchant-products-v1.gemspec | 29 + .../google-shopping-merchant-products-v1.rb | 21 + .../google/shopping/merchant/products/v1.rb | 48 + .../products/v1/product_inputs_service.rb | 57 + .../v1/product_inputs_service/client.rb | 715 +++++++++ .../v1/product_inputs_service/credentials.rb | 49 + .../v1/product_inputs_service/paths.rb | 66 + .../v1/product_inputs_service/rest.rb | 54 + .../v1/product_inputs_service/rest/client.rb | 668 +++++++++ .../rest/service_stub.rb | 268 ++++ .../merchant/products/v1/productinputs_pb.rb | 59 + .../products/v1/productinputs_services_pb.rb | 69 + .../products/v1/products_common_pb.rb | 91 ++ .../merchant/products/v1/products_pb.rb | 56 + .../merchant/products/v1/products_service.rb | 57 + .../products/v1/products_service/client.rb | 591 ++++++++ .../v1/products_service/credentials.rb | 49 + .../products/v1/products_service/paths.rb | 66 + .../products/v1/products_service/rest.rb | 54 + .../v1/products_service/rest/client.rb | 551 +++++++ .../v1/products_service/rest/service_stub.rb | 205 +++ .../products/v1/products_services_pb.rb | 57 + .../shopping/merchant/products/v1/rest.rb | 40 + .../shopping/merchant/products/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 +++ .../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 ++ .../merchant/products/v1/productinputs.rb | 221 +++ .../shopping/merchant/products/v1/products.rb | 175 +++ .../merchant/products/v1/products_common.rb | 1303 +++++++++++++++++ .../proto_docs/google/shopping/type/types.rb | 210 +++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../delete_product_input.rb | 47 + .../insert_product_input.rb | 47 + .../update_product_input.rb | 47 + .../snippets/products_service/get_product.rb | 47 + .../products_service/list_products.rb | 51 + ..._google.shopping.merchant.products.v1.json | 215 +++ .../v1/product_inputs_service_paths_test.rb | 67 + .../v1/product_inputs_service_rest_test.rb | 266 ++++ .../v1/product_inputs_service_test.rb | 269 ++++ .../v1/products_service_paths_test.rb | 67 + .../products/v1/products_service_rest_test.rb | 209 +++ .../products/v1/products_service_test.rb | 210 +++ .../test/helper.rb | 25 + release-please-config.json | 4 + 68 files changed, 9754 insertions(+) create mode 100644 google-shopping-merchant-products-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-products-v1/.gitignore create mode 100644 google-shopping-merchant-products-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-products-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-products-v1/.rubocop.yml create mode 100644 google-shopping-merchant-products-v1/.toys.rb create mode 100644 google-shopping-merchant-products-v1/.yardopts create mode 100644 google-shopping-merchant-products-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-products-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-products-v1/Gemfile create mode 100644 google-shopping-merchant-products-v1/LICENSE.md create mode 100644 google-shopping-merchant-products-v1/README.md create mode 100644 google-shopping-merchant-products-v1/Rakefile create mode 100644 google-shopping-merchant-products-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec create mode 100644 google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_common_pb.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb create mode 100644 google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb create mode 100644 google-shopping-merchant-products-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb create mode 100644 google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb create mode 100644 google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb create mode 100644 google-shopping-merchant-products-v1/snippets/products_service/get_product.rb create mode 100644 google-shopping-merchant-products-v1/snippets/products_service/list_products.rb create mode 100644 google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json create mode 100644 google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb create mode 100644 google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb create mode 100644 google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb create mode 100644 google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb create mode 100644 google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb create mode 100644 google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb create mode 100644 google-shopping-merchant-products-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c59299d8b70a..e18c285328e5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -953,6 +953,8 @@ "google-shopping-merchant-order_tracking-v1beta+FILLER": "0.0.0", "google-shopping-merchant-products": "0.2.2", "google-shopping-merchant-products+FILLER": "0.0.0", + "google-shopping-merchant-products-v1": "0.0.1", + "google-shopping-merchant-products-v1+FILLER": "0.0.0", "google-shopping-merchant-products-v1beta": "0.7.0", "google-shopping-merchant-products-v1beta+FILLER": "0.0.0", "google-shopping-merchant-promotions": "0.2.1", diff --git a/google-shopping-merchant-products-v1/.OwlBot.yaml b/google-shopping-merchant-products-v1/.OwlBot.yaml new file mode 100644 index 000000000000..5299fa7e0a0e --- /dev/null +++ b/google-shopping-merchant-products-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/products/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-products-v1/$1 diff --git a/google-shopping-merchant-products-v1/.gitignore b/google-shopping-merchant-products-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-products-v1/.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/google-shopping-merchant-products-v1/.owlbot-manifest.json b/google-shopping-merchant-products-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..b02e813bd877 --- /dev/null +++ b/google-shopping-merchant-products-v1/.owlbot-manifest.json @@ -0,0 +1,71 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-products-v1.gemspec", + "lib/google-shopping-merchant-products-v1.rb", + "lib/google/shopping/merchant/products/v1.rb", + "lib/google/shopping/merchant/products/v1/product_inputs_service.rb", + "lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb", + "lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb", + "lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb", + "lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb", + "lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb", + "lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb", + "lib/google/shopping/merchant/products/v1/productinputs_pb.rb", + "lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb", + "lib/google/shopping/merchant/products/v1/products_common_pb.rb", + "lib/google/shopping/merchant/products/v1/products_pb.rb", + "lib/google/shopping/merchant/products/v1/products_service.rb", + "lib/google/shopping/merchant/products/v1/products_service/client.rb", + "lib/google/shopping/merchant/products/v1/products_service/credentials.rb", + "lib/google/shopping/merchant/products/v1/products_service/paths.rb", + "lib/google/shopping/merchant/products/v1/products_service/rest.rb", + "lib/google/shopping/merchant/products/v1/products_service/rest/client.rb", + "lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb", + "lib/google/shopping/merchant/products/v1/products_services_pb.rb", + "lib/google/shopping/merchant/products/v1/rest.rb", + "lib/google/shopping/merchant/products/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/shopping/merchant/products/v1/productinputs.rb", + "proto_docs/google/shopping/merchant/products/v1/products.rb", + "proto_docs/google/shopping/merchant/products/v1/products_common.rb", + "proto_docs/google/shopping/type/types.rb", + "proto_docs/google/type/interval.rb", + "snippets/Gemfile", + "snippets/product_inputs_service/delete_product_input.rb", + "snippets/product_inputs_service/insert_product_input.rb", + "snippets/product_inputs_service/update_product_input.rb", + "snippets/products_service/get_product.rb", + "snippets/products_service/list_products.rb", + "snippets/snippet_metadata_google.shopping.merchant.products.v1.json", + "test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb", + "test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb", + "test/google/shopping/merchant/products/v1/product_inputs_service_test.rb", + "test/google/shopping/merchant/products/v1/products_service_paths_test.rb", + "test/google/shopping/merchant/products/v1/products_service_rest_test.rb", + "test/google/shopping/merchant/products/v1/products_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-products-v1/.repo-metadata.json b/google-shopping-merchant-products-v1/.repo-metadata.json new file mode 100644 index 000000000000..6ce690bfd0d1 --- /dev/null +++ b/google-shopping-merchant-products-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-products-v1", + "distribution_name": "google-shopping-merchant-products-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-products-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-products-v1/.rubocop.yml b/google-shopping-merchant-products-v1/.rubocop.yml new file mode 100644 index 000000000000..91f3efe88e94 --- /dev/null +++ b/google-shopping-merchant-products-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-products-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-products-v1.rb" diff --git a/google-shopping-merchant-products-v1/.toys.rb b/google-shopping-merchant-products-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-products-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-products-v1/.yardopts b/google-shopping-merchant-products-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-products-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-products-v1/AUTHENTICATION.md b/google-shopping-merchant-products-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..48d9c7121a41 --- /dev/null +++ b/google-shopping-merchant-products-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-products-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-products-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/products/v1" + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/products/v1" + +::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-shopping-merchant-products-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/products/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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/google-shopping-merchant-products-v1/CHANGELOG.md b/google-shopping-merchant-products-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-products-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-products-v1/Gemfile b/google-shopping-merchant-products-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-products-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-products-v1/LICENSE.md b/google-shopping-merchant-products-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-products-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-products-v1/README.md b/google-shopping-merchant-products-v1/README.md new file mode 100644 index 000000000000..0129c84f4416 --- /dev/null +++ b/google-shopping-merchant-products-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-products](https://rubygems.org/gems/google-shopping-merchant-products). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-products-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/products/v1" + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new +request = ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new # (request fields as keyword arguments...) +response = client.insert_product_input request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-products-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/products/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-shopping-merchant-products`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-products-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-products`. +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-shopping-merchant-products-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-products-v1/Rakefile b/google-shopping-merchant-products-v1/Rakefile new file mode 100644 index 000000000000..27f7a1ed0d49 --- /dev/null +++ b/google-shopping-merchant-products-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-products-v1 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/shopping/merchant/products/v1/product_inputs_service/credentials" + ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-shopping-merchant-products-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-products-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-products-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-products-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-products-v1" + header "google-shopping-merchant-products-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-products-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-products-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-products-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-products-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-products-v1/gapic_metadata.json b/google-shopping-merchant-products-v1/gapic_metadata.json new file mode 100644 index 000000000000..9fedefc193f1 --- /dev/null +++ b/google-shopping-merchant-products-v1/gapic_metadata.json @@ -0,0 +1,52 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.products.v1", + "libraryPackage": "::Google::Shopping::Merchant::Products::V1", + "services": { + "ProductInputsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client", + "rpcs": { + "InsertProductInput": { + "methods": [ + "insert_product_input" + ] + }, + "UpdateProductInput": { + "methods": [ + "update_product_input" + ] + }, + "DeleteProductInput": { + "methods": [ + "delete_product_input" + ] + } + } + } + } + }, + "ProductsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client", + "rpcs": { + "GetProduct": { + "methods": [ + "get_product" + ] + }, + "ListProducts": { + "methods": [ + "list_products" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec b/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec new file mode 100644 index 000000000000..50c1dd6fd4f9 --- /dev/null +++ b/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/products/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-products-v1" + gem.version = Google::Shopping::Merchant::Products::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-products-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb b/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb new file mode 100644 index 000000000000..c0b65c435a5e --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1" diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb new file mode 100644 index 000000000000..86b7ca5bc6b0 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/product_inputs_service" +require "google/shopping/merchant/products/v1/products_service" +require "google/shopping/merchant/products/v1/version" + +module Google + module Shopping + module Merchant + module Products + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/products/v1" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/products/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb new file mode 100644 index 000000000000..83fca16e8a8d --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/version" + +require "google/shopping/merchant/products/v1/product_inputs_service/credentials" +require "google/shopping/merchant/products/v1/product_inputs_service/paths" +require "google/shopping/merchant/products/v1/product_inputs_service/client" +require "google/shopping/merchant/products/v1/product_inputs_service/rest" + +module Google + module Shopping + module Merchant + module Products + module V1 + ## + # Service to use ProductInput resource. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1/product_inputs_service" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/products/v1/product_inputs_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + module ProductInputsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "product_inputs_service", "helpers.rb" +require "google/shopping/merchant/products/v1/product_inputs_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb new file mode 100644 index 000000000000..3faf14115ef9 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb @@ -0,0 +1,715 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/productinputs_pb" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductInputsService + ## + # Client for the ProductInputsService service. + # + # Service to use ProductInput resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_inputs_service_stub + + ## + # Configure the ProductInputsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductInputsService clients + # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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", "Shopping", "Merchant", "Products", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ProductInputsService 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::Shopping::Merchant::Products::V1::ProductInputsService::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 + @product_inputs_service_stub.universe_domain + end + + ## + # Create a new ProductInputsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductInputsService 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/shopping/merchant/products/v1/productinputs_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 + + @product_inputs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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 + ) + + @product_inputs_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 + @product_inputs_service_stub.logger + end + + # Service calls + + ## + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/overview#upload-product-input). You + # must have a products [data + # source](/merchant/api/guides/data-sources/overview) to be able to insert a + # product. The unique identifier of the data source is passed as a query + # parameter in the request URL. + # + # If a product input with the same contentLanguage, offerId, and dataSource + # already exists, then the product input inserted by this method replaces + # that entry. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload insert_product_input(request, options = nil) + # Pass arguments to `insert_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, ::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 insert_product_input(parent: nil, product_input: nil, data_source: nil) + # Pass arguments to `insert_product_input` 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 account where this product will be inserted. + # Format: `accounts/{account}` + # @param product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] + # Required. The product input to insert. + # @param data_source [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new + # + # # Call the insert_product_input method. + # result = client.insert_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + # p result + # + def insert_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest + + # 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.insert_product_input.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::Shopping::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :insert_product_input, 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 + + ## + # Updates the existing product input in your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload update_product_input(request, options = nil) + # Pass arguments to `update_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, ::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 update_product_input(product_input: nil, update_mask: nil, data_source: nil) + # Pass arguments to `update_product_input` 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 product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full product replacement is not supported. + # @param data_source [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new + # + # # Call the update_product_input method. + # result = client.update_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + # p result + # + def update_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest + + # 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.update_product_input.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::Shopping::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.product_input&.name + header_params["product_input.name"] = request.product_input.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.update_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :update_product_input, 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 + + ## + # Deletes a product input from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload delete_product_input(request, options = nil) + # Pass arguments to `delete_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, ::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_product_input(name: nil, data_source: nil) + # Pass arguments to `delete_product_input` 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 name of the product input resource to delete. + # Format: `accounts/{account}/productInputs/{product}` + # where the last section `product` consists of: + # `content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/productInputs/en~US~sku123`. + # @param data_source [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @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/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new + # + # # Call the delete_product_input method. + # result = client.delete_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest + + # 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_product_input.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::Shopping::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :delete_product_input, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ProductInputsService API. + # + # This class represents the configuration for ProductInputsService, + # 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::Shopping::Merchant::Products::V1::ProductInputsService::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 + # # insert_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_product_input.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 ProductInputsService 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 `insert_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_product_input + ## + # RPC-specific configuration for `update_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_input + ## + # RPC-specific configuration for `delete_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_input + + # @private + def initialize parent_rpcs = nil + insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input + @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config + update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input + @update_product_input = ::Gapic::Config::Method.new update_product_input_config + delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input + @delete_product_input = ::Gapic::Config::Method.new delete_product_input_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb new file mode 100644 index 000000000000..64f26287de14 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Products + module V1 + module ProductInputsService + # Credentials for the ProductInputsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb new file mode 100644 index 000000000000..8578ef15e26c --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Products + module V1 + module ProductInputsService + # Path helper methods for the ProductInputsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ProductInput resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/productInputs/{productinput}` + # + # @param account [String] + # @param productinput [String] + # + # @return [::String] + def product_input_path account:, productinput: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/productInputs/#{productinput}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb new file mode 100644 index 000000000000..708dd3f0d8ce --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/version" + +require "google/shopping/merchant/products/v1/product_inputs_service/credentials" +require "google/shopping/merchant/products/v1/product_inputs_service/paths" +require "google/shopping/merchant/products/v1/product_inputs_service/rest/client" + +module Google + module Shopping + module Merchant + module Products + module V1 + ## + # Service to use ProductInput resource. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/products/v1/product_inputs_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + module ProductInputsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/products/v1/product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb new file mode 100644 index 000000000000..4a4c2eee3bb8 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb @@ -0,0 +1,668 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/productinputs_pb" +require "google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductInputsService + module Rest + ## + # REST client for the ProductInputsService service. + # + # Service to use ProductInput resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_inputs_service_stub + + ## + # Configure the ProductInputsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductInputsService clients + # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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", "Shopping", "Merchant", "Products", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ProductInputsService 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::Shopping::Merchant::Products::V1::ProductInputsService::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 + @product_inputs_service_stub.universe_domain + end + + ## + # Create a new ProductInputsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductInputsService 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 + + @product_inputs_service_stub = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @product_inputs_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 + @product_inputs_service_stub.logger + end + + # Service calls + + ## + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/overview#upload-product-input). You + # must have a products [data + # source](/merchant/api/guides/data-sources/overview) to be able to insert a + # product. The unique identifier of the data source is passed as a query + # parameter in the request URL. + # + # If a product input with the same contentLanguage, offerId, and dataSource + # already exists, then the product input inserted by this method replaces + # that entry. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload insert_product_input(request, options = nil) + # Pass arguments to `insert_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, ::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 insert_product_input(parent: nil, product_input: nil, data_source: nil) + # Pass arguments to `insert_product_input` 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 account where this product will be inserted. + # Format: `accounts/{account}` + # @param product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] + # Required. The product input to insert. + # @param data_source [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new + # + # # Call the insert_product_input method. + # result = client.insert_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + # p result + # + def insert_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest + + # 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.insert_product_input.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::Shopping::Merchant::Products::V1::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.insert_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.insert_product_input 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 + + ## + # Updates the existing product input in your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload update_product_input(request, options = nil) + # Pass arguments to `update_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, ::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 update_product_input(product_input: nil, update_mask: nil, data_source: nil) + # Pass arguments to `update_product_input` 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 product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full product replacement is not supported. + # @param data_source [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new + # + # # Call the update_product_input method. + # result = client.update_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + # p result + # + def update_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest + + # 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.update_product_input.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::Shopping::Merchant::Products::V1::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.update_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.update_product_input 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 + + ## + # Deletes a product input from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload delete_product_input(request, options = nil) + # Pass arguments to `delete_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, ::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_product_input(name: nil, data_source: nil) + # Pass arguments to `delete_product_input` 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 name of the product input resource to delete. + # Format: `accounts/{account}/productInputs/{product}` + # where the last section `product` consists of: + # `content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/productInputs/en~US~sku123`. + # @param data_source [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @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/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new + # + # # Call the delete_product_input method. + # result = client.delete_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest + + # 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_product_input.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::Shopping::Merchant::Products::V1::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_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.delete_product_input 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 + + ## + # Configuration class for the ProductInputsService REST API. + # + # This class represents the configuration for ProductInputsService 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::Shopping::Merchant::Products::V1::ProductInputsService::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 + # # insert_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_product_input.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 = "merchantapi.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 ProductInputsService 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 `insert_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_product_input + ## + # RPC-specific configuration for `update_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_input + ## + # RPC-specific configuration for `delete_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_input + + # @private + def initialize parent_rpcs = nil + insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input + @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config + update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input + @update_product_input = ::Gapic::Config::Method.new update_product_input_config + delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input + @delete_product_input = ::Gapic::Config::Method.new delete_product_input_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb new file mode 100644 index 000000000000..7abcce600808 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb @@ -0,0 +1,268 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/productinputs_pb" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductInputsService + module Rest + ## + # REST service stub for the ProductInputsService 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: true, + 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 insert_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest] + # 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::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # A result object deserialized from the server's reply + def insert_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_product_input_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: "insert_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1::ProductInput.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest] + # 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::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # A result object deserialized from the server's reply + def update_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_product_input_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: "update_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1::ProductInput.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_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest] + # 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_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_input_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_product_input", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the insert_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/products/v1/{parent}/productInputs:insert", + body: "product_input", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/products/v1/{product_input.name}", + body: "product_input", + matches: [ + ["product_input.name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest] + # 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_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/products/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb new file mode 100644 index 000000000000..31bc17eed31c --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/products/v1/productinputs.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/products/v1/products_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n8google/shopping/merchant/products/v1/productinputs.proto\x12$google.shopping.merchant.products.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/products/v1/products_common.proto\x1a google/shopping/type/types.proto\"\xff\x03\n\x0cProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07product\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0clegacy_local\x18\n \x01(\x08\x42\x03\xe0\x41\x05\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12 \n\x10\x63ontent_language\x18\x05 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\nfeed_label\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12#\n\x0eversion_number\x18\x07 \x01(\x03\x42\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12X\n\x12product_attributes\x18\x0b \x01(\x0b\x32\x37.google.shopping.merchant.products.v1.ProductAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01:z\xea\x41w\n\'merchantapi.googleapis.com/ProductInput\x12/accounts/{account}/productInputs/{productinput}*\rproductInputs2\x0cproductInputB\x11\n\x0f_version_number\"\xc1\x01\n\x19InsertProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12N\n\rproduct_input\x18\x02 \x01(\x0b\x32\x32.google.shopping.merchant.products.v1.ProductInputB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbb\x01\n\x19UpdateProductInputRequest\x12N\n\rproduct_input\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.products.v1.ProductInputB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"t\n\x19\x44\x65leteProductInputRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/ProductInput\x12\x18\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\xe5\x05\n\x14ProductInputsService\x12\xd7\x01\n\x12InsertProductInput\x12?.google.shopping.merchant.products.v1.InsertProductInputRequest\x1a\x32.google.shopping.merchant.products.v1.ProductInput\"L\x82\xd3\xe4\x93\x02\x46\"5/products/v1/{parent=accounts/*}/productInputs:insert:\rproduct_input\x12\xfa\x01\n\x12UpdateProductInput\x12?.google.shopping.merchant.products.v1.UpdateProductInputRequest\x1a\x32.google.shopping.merchant.products.v1.ProductInput\"o\xda\x41\x19product_input,update_mask\x82\xd3\xe4\x93\x02M2 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12L\n\x0fproduct_details\x18? \x03(\x0b\x32\x33.google.shopping.merchant.products.v1.ProductDetail\x12\x1a\n\x12product_highlights\x18@ \x03(\t\x12\x1b\n\x0e\x64isplay_ads_id\x18\x41 \x01(\tH!\x88\x01\x01\x12\x1f\n\x17\x64isplay_ads_similar_ids\x18\x42 \x03(\t\x12\x1e\n\x11\x64isplay_ads_title\x18\x43 \x01(\tH\"\x88\x01\x01\x12\x1d\n\x10\x64isplay_ads_link\x18\x44 \x01(\tH#\x88\x01\x01\x12\x1e\n\x11\x64isplay_ads_value\x18\x45 \x01(\x01H$\x88\x01\x01\x12\x15\n\rpromotion_ids\x18\x46 \x03(\t\x12N\n\rpickup_method\x18P \x01(\x0e\x32\x32.google.shopping.merchant.products.v1.PickupMethodH%\x88\x01\x01\x12H\n\npickup_sla\x18Q \x01(\x0e\x32/.google.shopping.merchant.products.v1.PickupSlaH&\x88\x01\x01\x12\x1a\n\rlink_template\x18R \x01(\tH\'\x88\x01\x01\x12!\n\x14mobile_link_template\x18S \x01(\tH(\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18G \x01(\tH)\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18H \x01(\tH*\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18I \x01(\tH+\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18J \x01(\tH,\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18K \x01(\tH-\x88\x01\x01\x12P\n\x15included_destinations\x18L \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12P\n\x15\x65xcluded_destinations\x18M \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12\'\n\x1fshopping_ads_excluded_countries\x18N \x03(\t\x12\x1f\n\x12\x65xternal_seller_id\x18\x01 \x01(\tH.\x88\x01\x01\x12?\n\x05pause\x18\r \x01(\x0e\x32+.google.shopping.merchant.products.v1.PauseH/\x88\x01\x01\x12\x1d\n\x15lifestyle_image_links\x18\x0e \x03(\t\x12q\n\"cloud_export_additional_properties\x18T \x03(\x0b\x32\x45.google.shopping.merchant.products.v1.CloudExportAdditionalProperties\x12 \n\x12virtual_model_link\x18\x82\x01 \x01(\tH0\x88\x01\x01\x12R\n\x0e\x63\x65rtifications\x18{ \x03(\x0b\x32:.google.shopping.merchant.products.v1.ProductCertification\x12U\n\x10structured_title\x18\x84\x01 \x01(\x0b\x32\x35.google.shopping.merchant.products.v1.StructuredTitleH1\x88\x01\x01\x12\x61\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32;.google.shopping.merchant.products.v1.StructuredDescriptionH2\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.Price\x12h\n\x19sustainability_incentives\x18\x8a\x01 \x03(\x0b\x32\x44.google.shopping.merchant.products.v1.ProductSustainabilityIncentiveB\x14\n\x12_identifier_existsB\x0c\n\n_is_bundleB\x08\n\x06_titleB\x0e\n\x0c_descriptionB\x07\n\x05_linkB\x0e\n\x0c_mobile_linkB\x11\n\x0f_canonical_linkB\r\n\x0b_image_linkB\x08\n\x06_adultB\x0c\n\n_age_groupB\x0f\n\r_availabilityB\x08\n\x06_brandB\x08\n\x06_colorB\x0c\n\n_conditionB\t\n\x07_genderB\x1a\n\x18_google_product_categoryB\x10\n\x0e_item_group_idB\x0b\n\t_materialB\x06\n\x04_mpnB\n\n\x08_patternB\x1a\n\x18_sell_on_google_quantityB\x14\n\x12_max_handling_timeB\x14\n\x12_min_handling_timeB\x11\n\x0f_shipping_labelB\x15\n\x13_transit_time_labelB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x1a\n\x18_energy_efficiency_classB\x1e\n\x1c_min_energy_efficiency_classB\x1e\n\x1c_max_energy_efficiency_classB\x0c\n\n_multipackB\x0f\n\r_ads_groupingB\x0f\n\r_ads_redirectB\x11\n\x0f_display_ads_idB\x14\n\x12_display_ads_titleB\x13\n\x11_display_ads_linkB\x14\n\x12_display_ads_valueB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x10\n\x0e_link_templateB\x17\n\x15_mobile_link_templateB\x11\n\x0f_custom_label_0B\x11\n\x0f_custom_label_1B\x11\n\x0f_custom_label_2B\x11\n\x0f_custom_label_3B\x11\n\x0f_custom_label_4B\x15\n\x13_external_seller_idB\x08\n\x06_pauseB\x15\n\x13_virtual_model_linkB\x13\n\x11_structured_titleB\x19\n\x17_structured_description\"-\n\x0eShippingWeight\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"0\n\x11ShippingDimension\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"5\n\x16UnitPricingBaseMeasure\x12\r\n\x05value\x18\x01 \x01(\x03\x12\x0c\n\x04unit\x18\x02 \x01(\t\"1\n\x12UnitPricingMeasure\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"\xa0\x01\n\x10SubscriptionCost\x12H\n\x06period\x18\x01 \x01(\x0e\x32\x38.google.shopping.merchant.products.v1.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\xf4\x01\n\x12ProductInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x35\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x12J\n\x0b\x63redit_type\x18\x04 \x01(\x0e\x32\x30.google.shopping.merchant.products.v1.CreditTypeH\x01\x88\x01\x01\x42\x0e\n\x0c_downpaymentB\x0e\n\x0c_credit_type\"B\n\rLoyaltyPoints\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cpoints_value\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\"\xc1\x03\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12?\n\x1bmember_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\x1e\n\x1c_member_price_effective_dateB\x11\n\x0f_shipping_label\"\x83\x03\n\x08Shipping\x12*\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x1b\n\x13location_group_name\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\x12\x1e\n\x11min_handling_time\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x10min_transit_time\x18\n \x01(\x03H\x02\x88\x01\x01\x12\x1d\n\x10max_transit_time\x18\x0b \x01(\x03H\x03\x88\x01\x01\x42\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x13\n\x11_min_transit_timeB\x13\n\x11_max_transit_time\"\x88\x01\n\x15\x46reeShippingThreshold\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0fprice_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x42\n\n\x08_countryB\x12\n\x10_price_threshold\"V\n\rProductDetail\x12\x14\n\x0csection_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x02 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x03 \x01(\t\"\xf9\x02\n\x14ProductCertification\x12\x62\n\x17\x63\x65rtification_authority\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.products.v1.CertificationAuthorityH\x00\x88\x01\x01\x12X\n\x12\x63\x65rtification_name\x18\x02 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.CertificationNameH\x01\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x63\x65rtification_value\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x1a\n\x18_certification_authorityB\x15\n\x13_certification_nameB\x15\n\x13_certification_codeB\x16\n\x14_certification_value\"\xa6\x01\n\x0fStructuredTitle\x12Y\n\x13\x64igital_source_type\x18\x01 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.DigitalSourceTypeH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"\xac\x01\n\x15StructuredDescription\x12Y\n\x13\x64igital_source_type\x18\x01 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.DigitalSourceTypeH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"9\n\x10ProductDimension\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"6\n\rProductWeight\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x07\n\rProductStatus\x12\x63\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32\x45.google.shopping.merchant.products.v1.ProductStatus.DestinationStatus\x12]\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x42.google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue\x12\x31\n\rcreation_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16google_expiration_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xc1\x01\n\x11\x44\x65stinationStatus\x12V\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x19\n\x11pending_countries\x18\x03 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x04 \x03(\t\x1a\xac\x03\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12]\n\x08severity\x18\x02 \x01(\x0e\x32K.google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue.Severity\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12V\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x15\n\rdocumentation\x18\x08 \x01(\t\x12\x1c\n\x14\x61pplicable_countries\x18\t \x03(\t\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03\"\xa5\x02\n\x1f\x43loudExportAdditionalProperties\x12\x1a\n\rproperty_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ntext_value\x18\x02 \x03(\t\x12\x17\n\nbool_value\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x11\n\tint_value\x18\x04 \x03(\x03\x12\x13\n\x0b\x66loat_value\x18\x05 \x03(\x02\x12\x16\n\tmin_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12\x16\n\tmax_value\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12\x16\n\tunit_code\x18\x08 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_property_nameB\r\n\x0b_bool_valueB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0c\n\n_unit_code\"\x9d\x02\n\x1eProductSustainabilityIncentive\x12-\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x14\n\npercentage\x18\x03 \x01(\x01H\x00\x12\\\n\x04type\x18\x01 \x01(\x0e\x32I.google.shopping.merchant.products.v1.ProductSustainabilityIncentive.TypeH\x01\x88\x01\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rEV_TAX_CREDIT\x10\x01\x12\x15\n\x11\x45V_PRICE_DISCOUNT\x10\x02\x42\x07\n\x05valueB\x07\n\x05_type\"\xb4\x01\n\x12\x41utomatedDiscounts\x12\x30\n\x0bprior_price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12<\n\x17prior_price_progressive\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12.\n\tgad_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price*N\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02*`\n\x08\x41geGroup\x12\x19\n\x15\x41GE_GROUP_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44ULT\x10\x01\x12\x08\n\x04KIDS\x10\x02\x12\x0b\n\x07TODDLER\x10\x03\x12\n\n\x06INFANT\x10\x04\x12\x0b\n\x07NEWBORN\x10\x05*\x83\x01\n\x0c\x41vailability\x12\x1c\n\x18\x41VAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x12\x0c\n\x08PREORDER\x10\x03\x12\x18\n\x14LIMITED_AVAILABILITY\x10\x04\x12\r\n\tBACKORDER\x10\x05*J\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x08\n\x04USED\x10\x02\x12\x0f\n\x0bREFURBISHED\x10\x03*B\n\x06Gender\x12\x16\n\x12GENDER_UNSPECIFIED\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\n\n\x06UNISEX\x10\x03*A\n\nCreditType\x12\x1b\n\x17\x43REDIT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\t\n\x05LEASE\x10\x02*\x82\x01\n\nSizeSystem\x12\x1b\n\x17SIZE_SYSTEM_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41U\x10\x01\x12\x06\n\x02\x42R\x10\x02\x12\x06\n\x02\x43N\x10\x03\x12\x06\n\x02\x44\x45\x10\x04\x12\x06\n\x02\x45U\x10\x05\x12\x06\n\x02\x46R\x10\x06\x12\x06\n\x02IT\x10\x07\x12\x06\n\x02JP\x10\x08\x12\x07\n\x03MEX\x10\t\x12\x06\n\x02UK\x10\n\x12\x06\n\x02US\x10\x0b*j\n\x08SizeType\x12\x19\n\x15SIZE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07REGULAR\x10\x01\x12\n\n\x06PETITE\x10\x02\x12\r\n\tMATERNITY\x10\x03\x12\x07\n\x03\x42IG\x10\x04\x12\x08\n\x04TALL\x10\x05\x12\x08\n\x04PLUS\x10\x06*\x8c\x01\n\x15\x45nergyEfficiencyClass\x12\'\n#ENERGY_EFFICIENCY_CLASS_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41PPP\x10\x01\x12\x07\n\x03\x41PP\x10\x02\x12\x06\n\x02\x41P\x10\x03\x12\x05\n\x01\x41\x10\x04\x12\x05\n\x01\x42\x10\x05\x12\x05\n\x01\x43\x10\x06\x12\x05\n\x01\x44\x10\x07\x12\x05\n\x01\x45\x10\x08\x12\x05\n\x01\x46\x10\t\x12\x05\n\x01G\x10\n*i\n\x0cPickupMethod\x12\x1d\n\x19PICKUP_METHOD_UNSPECIFIED\x10\x00\x12\x11\n\rNOT_SUPPORTED\x10\x01\x12\x07\n\x03\x42UY\x10\x02\x12\x0b\n\x07RESERVE\x10\x03\x12\x11\n\rSHIP_TO_STORE\x10\x04*\x98\x01\n\tPickupSla\x12\x1a\n\x16PICKUP_SLA_UNSPECIFIED\x10\x00\x12\x0c\n\x08SAME_DAY\x10\x01\x12\x0c\n\x08NEXT_DAY\x10\x02\x12\x0b\n\x07TWO_DAY\x10\x03\x12\r\n\tTHREE_DAY\x10\x04\x12\x0c\n\x08\x46OUR_DAY\x10\x05\x12\x0c\n\x08\x46IVE_DAY\x10\x06\x12\x0b\n\x07SIX_DAY\x10\x07\x12\x0e\n\nMULTI_WEEK\x10\x08*0\n\x05Pause\x12\x15\n\x11PAUSE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44S\x10\x01\x12\x07\n\x03\x41LL\x10\x02*g\n\x16\x43\x65rtificationAuthority\x12\'\n#CERTIFICATION_AUTHORITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44\x45ME\x10\x01\x12\x08\n\x04\x42MWK\x10\x02\x12\x07\n\x03\x45PA\x10\x03\x12\x06\n\x02\x45\x43\x10\x04*\xd5\x01\n\x11\x43\x65rtificationName\x12\"\n\x1e\x43\x45RTIFICATION_NAME_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45NERGY_STAR\x10\x01\x12\x1e\n\x1a\x45NERGY_STAR_MOST_EFFICIENT\x10\x02\x12\t\n\x05\x45PREL\x10\x03\x12\x0f\n\x0b\x45U_ECOLABEL\x10\x04\x12\x1d\n\x19VEHICLE_ENERGY_EFFICIENCY\x10\x05\x12\x30\n,VEHICLE_ENERGY_EFFICIENCY_DISCHARGED_BATTERY\x10\x06*d\n\x11\x44igitalSourceType\x12#\n\x1f\x44IGITAL_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19TRAINED_ALGORITHMIC_MEDIA\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x42\x86\x02\n(com.google.shopping.merchant.products.v1B\x13ProductsCommonProtoP\x01ZJcloud.google.com/go/shopping/merchant/products/apiv1/productspb;productspb\xaa\x02$Google.Shopping.Merchant.Products.V1\xca\x02$Google\\Shopping\\Merchant\\Products\\V1\xea\x02(Google::Shopping::Merchant::Products::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.type.Interval", "google/type/interval.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Products + module V1 + ProductAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes").msgclass + ShippingWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ShippingWeight").msgclass + ShippingDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ShippingDimension").msgclass + UnitPricingBaseMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.UnitPricingBaseMeasure").msgclass + UnitPricingMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.UnitPricingMeasure").msgclass + SubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SubscriptionCost").msgclass + ProductInstallment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductInstallment").msgclass + LoyaltyPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.LoyaltyPoints").msgclass + LoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.LoyaltyProgram").msgclass + Shipping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Shipping").msgclass + FreeShippingThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.FreeShippingThreshold").msgclass + ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductDetail").msgclass + ProductCertification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductCertification").msgclass + StructuredTitle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.StructuredTitle").msgclass + StructuredDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.StructuredDescription").msgclass + ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductDimension").msgclass + ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductWeight").msgclass + ProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus").msgclass + ProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.DestinationStatus").msgclass + ProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue").msgclass + ProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue.Severity").enummodule + CloudExportAdditionalProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CloudExportAdditionalProperties").msgclass + ProductSustainabilityIncentive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductSustainabilityIncentive").msgclass + ProductSustainabilityIncentive::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductSustainabilityIncentive.Type").enummodule + AutomatedDiscounts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.AutomatedDiscounts").msgclass + SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SubscriptionPeriod").enummodule + AgeGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.AgeGroup").enummodule + Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Availability").enummodule + Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Condition").enummodule + Gender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Gender").enummodule + CreditType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CreditType").enummodule + SizeSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SizeSystem").enummodule + SizeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SizeType").enummodule + EnergyEfficiencyClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.EnergyEfficiencyClass").enummodule + PickupMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.PickupMethod").enummodule + PickupSla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.PickupSla").enummodule + Pause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Pause").enummodule + CertificationAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CertificationAuthority").enummodule + CertificationName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CertificationName").enummodule + DigitalSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.DigitalSourceType").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb new file mode 100644 index 000000000000..55b148053371 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/products/v1/products.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/shopping/merchant/products/v1/products_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n3google/shopping/merchant/products/v1/products.proto\x12$google.shopping.merchant.products.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a:google/shopping/merchant/products/v1/products_common.proto\x1a google/shopping/type/types.proto\"\xef\x04\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0clegacy_local\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12\x15\n\x08offer_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12X\n\x12product_attributes\x18\r \x01(\x0b\x32\x37.google.shopping.merchant.products.v1.ProductAttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12P\n\x0eproduct_status\x18\n \x01(\x0b\x32\x33.google.shopping.merchant.products.v1.ProductStatusB\x03\xe0\x41\x03\x12Z\n\x13\x61utomated_discounts\x18\x0c \x01(\x0b\x32\x38.google.shopping.merchant.products.v1.AutomatedDiscountsB\x03\xe0\x41\x03:N\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}B\x11\n\x0f_version_number\"M\n\x11GetProductRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\"x\n\x13ListProductsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"p\n\x14ListProductsResponse\x12?\n\x08products\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.products.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcf\x03\n\x0fProductsService\x12\xae\x01\n\nGetProduct\x12\x37.google.shopping.merchant.products.v1.GetProductRequest\x1a-.google.shopping.merchant.products.v1.Product\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/products/v1/{name=accounts/*/products/*}\x12\xc1\x01\n\x0cListProducts\x12\x39.google.shopping.merchant.products.v1.ListProductsRequest\x1a:.google.shopping.merchant.products.v1.ListProductsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/products/v1/{parent=accounts/*}/products\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xbb\x02\n(com.google.shopping.merchant.products.v1B\rProductsProtoP\x01ZJcloud.google.com/go/shopping/merchant/products/apiv1/productspb;productspb\xaa\x02$Google.Shopping.Merchant.Products.V1\xca\x02$Google\\Shopping\\Merchant\\Products\\V1\xea\x02(Google::Shopping::Merchant::Products::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.merchant.products.v1.ProductAttributes", "google/shopping/merchant/products/v1/products_common.proto"], + ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Products + module V1 + Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Product").msgclass + GetProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.GetProductRequest").msgclass + ListProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ListProductsRequest").msgclass + ListProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ListProductsResponse").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb new file mode 100644 index 000000000000..466073d80977 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/version" + +require "google/shopping/merchant/products/v1/products_service/credentials" +require "google/shopping/merchant/products/v1/products_service/paths" +require "google/shopping/merchant/products/v1/products_service/client" +require "google/shopping/merchant/products/v1/products_service/rest" + +module Google + module Shopping + module Merchant + module Products + module V1 + ## + # Service to use Product resource. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1/products_service" + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/products/v1/products_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + module ProductsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "products_service", "helpers.rb" +require "google/shopping/merchant/products/v1/products_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb new file mode 100644 index 000000000000..cb9bad03e992 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb @@ -0,0 +1,591 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/products_pb" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductsService + ## + # Client for the ProductsService service. + # + # Service to use Product resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :products_service_stub + + ## + # Configure the ProductsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1::ProductsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductsService clients + # ::Google::Shopping::Merchant::Products::V1::ProductsService::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", "Shopping", "Merchant", "Products", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ProductsService 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::Shopping::Merchant::Products::V1::ProductsService::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 + @products_service_stub.universe_domain + end + + ## + # Create a new ProductsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductsService 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/shopping/merchant/products/v1/products_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 + + @products_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Products::V1::ProductsService::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 + ) + + @products_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 + @products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed product from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + # + # @overload get_product(request, options = nil) + # Pass arguments to `get_product` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::GetProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::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_product(name: nil) + # Pass arguments to `get_product` 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 name of the product to retrieve. + # Format: + # `accounts/{account}/products/{product}` where the last + # section `product` consists of: + # `content_language~feed_label~offer_id` + # example for product name is `accounts/123/products/en~US~sku123`. A legacy + # local product name would be `accounts/123/products/local~en~US~sku123`. + # Note: For calls to the v1beta version, the `product` section consists + # of: `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/products/online~en~US~sku123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1::Product] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1::Product] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. + # p result + # + def get_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::GetProductRequest + + # 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_product.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::Shopping::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.call_rpc :get_product, 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 the processed products in your Merchant Center account. The response + # might contain fewer items than specified by `pageSize`. Rely on `pageToken` + # to determine if there are more items to be requested. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the updated processed product can be retrieved. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::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_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products` 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 account to list processed products for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of products to return. The service may return fewer than + # this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # If unspecified, the default page size of 25 products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` 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::Shopping::Merchant::Products::V1::Product>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Products::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products 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::Shopping::Merchant::Products::V1::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::ListProductsRequest + + # 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_products.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::Shopping::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.call_rpc :list_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @products_service_stub, :list_products, 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 ProductsService API. + # + # This class represents the configuration for ProductsService, + # 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::Shopping::Merchant::Products::V1::ProductsService::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 + # # get_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_product.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 ProductsService 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 `get_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + + # @private + def initialize parent_rpcs = nil + get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product + @get_product = ::Gapic::Config::Method.new get_product_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb new file mode 100644 index 000000000000..d9805cf55bf4 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Products + module V1 + module ProductsService + # Credentials for the ProductsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb new file mode 100644 index 000000000000..227587be92ca --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Products + module V1 + module ProductsService + # Path helper methods for the ProductsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb new file mode 100644 index 000000000000..5b635928b496 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/version" + +require "google/shopping/merchant/products/v1/products_service/credentials" +require "google/shopping/merchant/products/v1/products_service/paths" +require "google/shopping/merchant/products/v1/products_service/rest/client" + +module Google + module Shopping + module Merchant + module Products + module V1 + ## + # Service to use Product resource. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/products/v1/products_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + module ProductsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/products/v1/products_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb new file mode 100644 index 000000000000..d494e4ba7aa6 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb @@ -0,0 +1,551 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/products_pb" +require "google/shopping/merchant/products/v1/products_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductsService + module Rest + ## + # REST client for the ProductsService service. + # + # Service to use Product resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :products_service_stub + + ## + # Configure the ProductsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductsService clients + # ::Google::Shopping::Merchant::Products::V1::ProductsService::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", "Shopping", "Merchant", "Products", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ProductsService 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::Shopping::Merchant::Products::V1::ProductsService::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 + @products_service_stub.universe_domain + end + + ## + # Create a new ProductsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductsService 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 + + @products_service_stub = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @products_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 + @products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed product from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + # + # @overload get_product(request, options = nil) + # Pass arguments to `get_product` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::GetProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::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_product(name: nil) + # Pass arguments to `get_product` 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 name of the product to retrieve. + # Format: + # `accounts/{account}/products/{product}` where the last + # section `product` consists of: + # `content_language~feed_label~offer_id` + # example for product name is `accounts/123/products/en~US~sku123`. A legacy + # local product name would be `accounts/123/products/local~en~US~sku123`. + # Note: For calls to the v1beta version, the `product` section consists + # of: `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/products/online~en~US~sku123`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::Product] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. + # p result + # + def get_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::GetProductRequest + + # 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_product.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::Shopping::Merchant::Products::V1::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_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.get_product 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 the processed products in your Merchant Center account. The response + # might contain fewer items than specified by `pageSize`. Rely on `pageToken` + # to determine if there are more items to be requested. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the updated processed product can be retrieved. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::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_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products` 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 account to list processed products for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of products to return. The service may return fewer than + # this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # If unspecified, the default page size of 25 products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` 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::Shopping::Merchant::Products::V1::Product>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Products::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products 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::Shopping::Merchant::Products::V1::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::ListProductsRequest + + # 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_products.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::Shopping::Merchant::Products::V1::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_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.list_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @products_service_stub, :list_products, "products", 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 ProductsService REST API. + # + # This class represents the configuration for ProductsService 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::Shopping::Merchant::Products::V1::ProductsService::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 + # # get_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_product.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 = "merchantapi.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 ProductsService 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 `get_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + + # @private + def initialize parent_rpcs = nil + get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product + @get_product = ::Gapic::Config::Method.new get_product_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb new file mode 100644 index 000000000000..619edc9bdca9 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/products_pb" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductsService + module Rest + ## + # REST service stub for the ProductsService 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: true, + 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 get_product REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::GetProductRequest] + # 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::Shopping::Merchant::Products::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::Product] + # A result object deserialized from the server's reply + def get_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_product_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_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1::Product.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_products REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::ListProductsRequest] + # 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::Shopping::Merchant::Products::V1::ListProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ListProductsResponse] + # A result object deserialized from the server's reply + def list_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_products_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_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.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 get_product REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::GetProductRequest] + # 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_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/products/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_products REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::ListProductsRequest] + # 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_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/products/v1/{parent}/products", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb new file mode 100644 index 000000000000..003ea01a4f13 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/products/v1/products.proto for package 'Google.Shopping.Merchant.Products.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/products_pb' + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductsService + # Service to use Product resource. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.products.v1.ProductsService' + + # Retrieves the processed product from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + rpc :GetProduct, ::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::Google::Shopping::Merchant::Products::V1::Product + # Lists the processed products in your Merchant Center account. The response + # might contain fewer items than specified by `pageSize`. Rely on `pageToken` + # to determine if there are more items to be requested. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the updated processed product can be retrieved. + rpc :ListProducts, ::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::Google::Shopping::Merchant::Products::V1::ListProductsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb new file mode 100644 index 000000000000..d52eb9db3502 --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/product_inputs_service/rest" +require "google/shopping/merchant/products/v1/products_service/rest" +require "google/shopping/merchant/products/v1/version" + +module Google + module Shopping + module Merchant + module Products + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/products/v1/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb new file mode 100644 index 000000000000..2c32986410fd --- /dev/null +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Products + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/proto_docs/README.md b/google-shopping-merchant-products-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb new file mode 100644 index 000000000000..07e92738ebbe --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb @@ -0,0 +1,221 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Products + module V1 + # This resource represents input data you submit for a product, not the + # processed product that you see in Merchant Center, in Shopping ads, or + # across Google surfaces. Product inputs, rules and supplemental data source + # data are combined to create the processed + # {::Google::Shopping::Merchant::Products::V1::Product Product}. For more + # information, see [Manage products](/merchant/api/guides/products/overview). + # + # Required product input attributes to pass data validation checks are + # primarily defined in the [Products Data + # Specification](https://support.google.com/merchants/answer/188494). + # + # The following attributes are required: + # {::Google::Shopping::Merchant::Products::V1::Product#feed_label feedLabel}, + # {::Google::Shopping::Merchant::Products::V1::Product#content_language contentLanguage} + # and {::Google::Shopping::Merchant::Products::V1::Product#offer_id offerId}. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # All fields in the product input and its sub-messages match the English name + # of their corresponding attribute in the [Products Data + # Specification](https://support.google.com/merchants/answer/188494) with + # [some exceptions](https://support.google.com/merchants/answer/7052112). + # The following reference documentation lists the field names in the + # **camelCase** casing style while the Products Data Specification lists the + # names in the **snake_case** casing style. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the product input. + # Format: `accounts/{account}/productInputs/{productinput}` + # where the last section `productinput` consists of: + # `content_language~feed_label~offer_id` + # example for product input name is + # `accounts/123/productInputs/en~US~sku123`. A legacy local product input + # name would be `accounts/123/productInputs/local~en~US~sku123`. + # Note: For calls to the v1beta version, the `productInput` section consists + # of: `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/productInputs/online~en~US~sku123`. + # @!attribute [r] product + # @return [::String] + # Output only. The name of the processed product. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] legacy_local + # @return [::Boolean] + # Immutable. Determines whether the product is **only** targeting + # local destinations and whether the product name should be distinguished + # with a `local~` prefix. For example, + # `accounts/123/productInputs/local~en~US~sku123`. If a product that is not + # `legacy_local` is already targeting local destinations, + # creating a `legacy_local` product with an otherwise matching name will + # fail. + # @!attribute [rw] offer_id + # @return [::String] + # Required. Immutable. Your unique identifier for the product. This is the + # same for the product input and processed product. Leading and trailing + # whitespaces are stripped and multiple whitespaces are replaced by a single + # whitespace upon submission. See the [products data + # specification](https://support.google.com/merchants/answer/188494#id) for + # details. + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the + # product. + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The feed label that lets you categorize and identify + # your products. The maximum allowed characters are 20, and the supported + # characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must + # not include any spaces. For more information, see [Using feed + # labels](//support.google.com/merchants/answer/14994087). + # @!attribute [rw] version_number + # @return [::Integer] + # Optional. Immutable. Represents the existing version (freshness) of the + # product, which can be used to preserve the right order when multiple + # updates are done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing product. Re-insertion (for + # example, product refresh after 30 days) can be performed with the current + # `version_number`. + # + # Only supported for insertions into primary data sources. + # Do not set this field for updates. + # Do not set this field for insertions into supplemental data sources. + # + # If the operation is prevented, the aborted exception will be + # thrown. + # @!attribute [rw] product_attributes + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes] + # Optional. A list of strongly-typed product attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. It can also be + # used for submitting any attribute of the data specification in its generic + # form (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API. + # Maximum allowed number of characters for each + # custom attribute is 10240 (represents sum of characters for name and + # value). Maximum 2500 custom attributes can be set per product, with total + # size of 102.4kB. Underscores in custom attribute names are replaced by + # spaces upon insertion. + class ProductInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertProductInput method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this product will be inserted. + # Format: `accounts/{account}` + # @!attribute [rw] product_input + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # Required. The product input to insert. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class InsertProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateProductInput method. + # The product (primary input) must exist for the update to succeed. + # If the update is for a primary product input, the existing primary product + # input must be from the same data source. + # @!attribute [rw] product_input + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full product replacement is not supported. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class UpdateProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteProductInput method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product input resource to delete. + # Format: `accounts/{account}/productInputs/{product}` + # where the last section `product` consists of: + # `content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/productInputs/en~US~sku123`. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class DeleteProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb new file mode 100644 index 000000000000..b0de85efa19d --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Products + module V1 + # The processed product, built from multiple [product + # inputs][google.shopping.merchant.products.v1main.ProductInput] + # after applying rules and supplemental data sources. This processed product + # matches what is shown in your Merchant Center account. Each product is built + # from exactly one primary data source product input, and multiple supplemental + # data source inputs. After inserting, updating, or deleting a product input, + # it may take several minutes before the updated processed product can be + # retrieved. + # + # All fields in the processed product and its sub-messages match the name of + # their corresponding attribute in the [Product data + # specification](https://support.google.com/merchants/answer/7052112) with some + # exceptions. + # @!attribute [rw] name + # @return [::String] + # The name of the product. + # Format: + # `accounts/{account}/products/{product}` where the last + # section `product` consists of: + # `content_language~feed_label~offer_id` + # example for product name is `accounts/123/products/en~US~sku123`. A legacy + # local product name would be `accounts/123/products/local~en~US~sku123`. + # Note: For calls to the v1beta version, the `product` section consists + # of: `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/products/online~en~US~sku123`. + # @!attribute [r] legacy_local + # @return [::Boolean] + # Output only. Determines whether the product is **only** targeting + # local destinations and whether the product name should be distinguished + # with a `local~` prefix. For example, + # `accounts/123/products/local~en~US~sku123`. + # @!attribute [r] offer_id + # @return [::String] + # Output only. Your unique identifier for the product. This is the same for + # the product input and processed product. Leading and trailing whitespaces + # are stripped and multiple whitespaces are replaced by a single whitespace + # upon submission. See the [product data + # specification](https://support.google.com/merchants/answer/188494#id) for + # details. + # @!attribute [r] content_language + # @return [::String] + # Output only. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the + # product. + # @!attribute [r] feed_label + # @return [::String] + # Output only. The feed label lets you categorize and identify your products. + # The maximum allowed characters is 20 and the supported characters are`A-Z`, + # `0-9`, hyphen and underscore. The feed label must not include any spaces. + # For more information, see [Using feed + # labels](//support.google.com/merchants/answer/14994087) + # @!attribute [r] data_source + # @return [::String] + # Output only. The primary data source of the product. + # @!attribute [r] version_number + # @return [::Integer] + # Output only. Represents the existing version (freshness) of the product, + # which can be used to preserve the right order when multiple updates are + # done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing product. Re-insertion (for + # example, product refresh after 30 days) can be performed with the current + # `version_number`. + # + # Only supported for insertions into primary data sources. + # + # If the operation is prevented, the aborted exception will be + # thrown. + # @!attribute [r] product_attributes + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes] + # Output only. A list of strongly-typed product attributes. + # @!attribute [r] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Output only. A list of custom (merchant-provided) attributes. It can also + # be used to submit any attribute of the data specification in its generic + # form (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API, such as additional attributes used for Buy on Google. + # @!attribute [r] product_status + # @return [::Google::Shopping::Merchant::Products::V1::ProductStatus] + # Output only. The status of a product, data validation issues, that is, + # information about a product computed asynchronously. + # @!attribute [r] automated_discounts + # @return [::Google::Shopping::Merchant::Products::V1::AutomatedDiscounts] + # Output only. The automated discounts information for the product. + class Product + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetProduct method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product to retrieve. + # Format: + # `accounts/{account}/products/{product}` where the last + # section `product` consists of: + # `content_language~feed_label~offer_id` + # example for product name is `accounts/123/products/en~US~sku123`. A legacy + # local product name would be `accounts/123/products/local~en~US~sku123`. + # Note: For calls to the v1beta version, the `product` section consists + # of: `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/products/online~en~US~sku123`. + class GetProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListProducts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list processed products for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of products to return. The service may return fewer than + # this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # If unspecified, the default page size of 25 products will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` must + # match the call that provided the page token. + class ListProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListProducts method. + # @!attribute [rw] products + # @return [::Array<::Google::Shopping::Merchant::Products::V1::Product>] + # The processed products from the specified account. These are your processed + # products after applying rules and supplemental data sources. + # @!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 ListProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb new file mode 100644 index 000000000000..ba9c32aa73a4 --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb @@ -0,0 +1,1303 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Products + module V1 + # Product attributes. + # @!attribute [rw] identifier_exists + # @return [::Boolean] + # Set this value to false when the item does not have unique product + # identifiers appropriate to its category, such as GTIN, MPN, and brand. + # Defaults to true, if not provided. + # @!attribute [rw] is_bundle + # @return [::Boolean] + # Whether the item is a business-defined sub-API. A [sub-API] + # (https://support.google.com/merchants/answer/6324449) is a custom + # grouping of different products sold by a business for a single price. + # @!attribute [rw] title + # @return [::String] + # Title of the item. + # @!attribute [rw] description + # @return [::String] + # Description of the item. + # @!attribute [rw] link + # @return [::String] + # URL directly linking to your item's page on your online store. + # @!attribute [rw] mobile_link + # @return [::String] + # URL for the mobile-optimized version of your item's landing page. + # @!attribute [rw] canonical_link + # @return [::String] + # URL for the canonical version of your item's landing page. + # @!attribute [rw] image_link + # @return [::String] + # URL of an image of the item. + # @!attribute [rw] additional_image_links + # @return [::Array<::String>] + # Additional URLs of images of the item. + # @!attribute [rw] expiration_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item should expire, as specified upon insertion, in + # [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. The actual + # expiration date is exposed in `productstatuses` as + # [googleExpirationDate](https://support.google.com/merchants/answer/6324499) + # and might be earlier if `expirationDate` is too far in the future. + # @!attribute [rw] disclosure_date + # @return [::Google::Protobuf::Timestamp] + # The date time when an offer becomes visible in search results across + # Google’s YouTube surfaces, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # See [Disclosure date](https://support.google.com/merchants/answer/13034208) + # for more information. + # @!attribute [rw] adult + # @return [::Boolean] + # Set to true if the item is targeted towards adults. + # @!attribute [rw] age_group + # @return [::Google::Shopping::Merchant::Products::V1::AgeGroup] + # Target [age group](https://support.google.com/merchants/answer/6324463) of + # the item. + # @!attribute [rw] availability + # @return [::Google::Shopping::Merchant::Products::V1::Availability] + # [Availability](https://support.google.com/merchants/answer/6324448) status + # of the item. + # @!attribute [rw] availability_date + # @return [::Google::Protobuf::Timestamp] + # The day a pre-ordered product becomes available for delivery, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] brand + # @return [::String] + # [Brand](https://support.google.com/merchants/answer/6324351) of the item. + # For example, "Google". + # @!attribute [rw] color + # @return [::String] + # [Color](https://support.google.com/merchants/answer/6324487) of the item. + # For example, "red". + # @!attribute [rw] condition + # @return [::Google::Shopping::Merchant::Products::V1::Condition] + # [Condition](https://support.google.com/merchants/answer/6324469) or state + # of the item. + # @!attribute [rw] gender + # @return [::Google::Shopping::Merchant::Products::V1::Gender] + # Target [gender](https://support.google.com/merchants/answer/6324479) of the + # item. + # @!attribute [rw] google_product_category + # @return [::String] + # Google's category of the item (see [Google product + # taxonomy](https://support.google.com/merchants/answer/1705911)). When + # querying products, this field will contain the user provided value. There + # is currently no way to get back the auto assigned google product + # categories through the API. + # @!attribute [rw] gtins + # @return [::Array<::String>] + # Global Trade Item Numbers + # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the + # item. + # You can provide up to 10 GTINs. + # @!attribute [rw] item_group_id + # @return [::String] + # Shared identifier for all variants of the same product. + # @!attribute [rw] material + # @return [::String] + # The [material](https://support.google.com/merchants/answer/6324410) of + # which the item is made. For example, "Leather" or "Cotton". + # @!attribute [rw] mpn + # @return [::String] + # Manufacturer Part Number + # ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the + # item. + # @!attribute [rw] pattern + # @return [::String] + # The item's [pattern](https://support.google.com/merchants/answer/6324483). + # For example, polka dots. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Price of the item. + # @!attribute [rw] maximum_retail_price + # @return [::Google::Shopping::Type::Price] + # Maximum retail price (MRP) of the item. Applicable to India only. + # @!attribute [rw] installment + # @return [::Google::Shopping::Merchant::Products::V1::ProductInstallment] + # Number and amount of installments to pay for an item. + # @!attribute [rw] subscription_cost + # @return [::Google::Shopping::Merchant::Products::V1::SubscriptionCost] + # Number of periods (months or years) and amount of payment per period + # for an item with an associated subscription contract. + # @!attribute [rw] loyalty_points + # @return [::Google::Shopping::Merchant::Products::V1::LoyaltyPoints] + # Loyalty points that users receive after purchasing the item. Japan only. + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Products::V1::LoyaltyProgram>] + # A list of loyalty program information that is used to surface loyalty + # benefits (for example, better pricing, points, etc) to the user of this + # item. + # @!attribute [rw] product_types + # @return [::Array<::String>] + # Categories of the item (formatted as in [product data + # specification](https://support.google.com/merchants/answer/7052112#product_category)). + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Advertised sale price of the item. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # Date range during which the item is on sale, see [product data + # specification](https://support.google.com/merchants/answer/7052112#price_and_availability). + # @!attribute [rw] sell_on_google_quantity + # @return [::Integer] + # The quantity of the product that is available for selling on Google. + # Supported only for online products. + # @!attribute [rw] product_height + # @return [::Google::Shopping::Merchant::Products::V1::ProductDimension] + # The height of the product in the units provided. The value must be + # between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_length + # @return [::Google::Shopping::Merchant::Products::V1::ProductDimension] + # The length of the product in the units provided. The value must be + # between 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_width + # @return [::Google::Shopping::Merchant::Products::V1::ProductDimension] + # The width of the product in the units provided. The value must be between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_weight + # @return [::Google::Shopping::Merchant::Products::V1::ProductWeight] + # The weight of the product in the units provided. The value must be + # between 0 (exclusive) and 2000 (inclusive). + # @!attribute [rw] shipping + # @return [::Array<::Google::Shopping::Merchant::Products::V1::Shipping>] + # Shipping rules. + # @!attribute [rw] free_shipping_threshold + # @return [::Array<::Google::Shopping::Merchant::Products::V1::FreeShippingThreshold>] + # Conditions to be met for a product to have free shipping. + # @!attribute [rw] shipping_weight + # @return [::Google::Shopping::Merchant::Products::V1::ShippingWeight] + # Weight of the item for shipping. + # @!attribute [rw] shipping_length + # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] + # Length of the item for shipping. + # @!attribute [rw] shipping_width + # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] + # Width of the item for shipping. + # @!attribute [rw] shipping_height + # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] + # Height of the item for shipping. + # @!attribute [rw] max_handling_time + # @return [::Integer] + # Maximal product handling time (in business days). + # @!attribute [rw] min_handling_time + # @return [::Integer] + # Minimal product handling time (in business days). + # @!attribute [rw] shipping_label + # @return [::String] + # The shipping label of the product, used to group product in account-level + # shipping rules. + # @!attribute [rw] transit_time_label + # @return [::String] + # The transit time label of the product, used to group product in + # account-level transit time tables. + # @!attribute [rw] size + # @return [::String] + # Size of the item. Only one value is allowed. For variants with different + # sizes, insert a separate product for each size with the same + # `itemGroupId` value, see + # [Size](https://support.google.com/merchants/answer/6324492). + # @!attribute [rw] size_system + # @return [::Google::Shopping::Merchant::Products::V1::SizeSystem] + # System in which the size is specified. Recommended for apparel items. + # For more information, see + # [Size system](https://support.google.com/merchants/answer/6324502). + # @!attribute [rw] size_types + # @return [::Array<::Google::Shopping::Merchant::Products::V1::SizeType>] + # The cut of the item. It can be used to represent combined size types for + # apparel items. Maximum two of size types can be provided, see + # [Size type](https://support.google.com/merchants/answer/6324497). + # @!attribute [rw] energy_efficiency_class + # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] + # The [energy efficiency + # class](https://support.google.com/merchants/answer/7562785) as defined in + # EU directive 2010/30/EU. + # @!attribute [rw] min_energy_efficiency_class + # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] + # The [energy efficiency + # class](https://support.google.com/merchants/answer/7562785) as defined in + # EU directive 2010/30/EU. + # @!attribute [rw] max_energy_efficiency_class + # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] + # The [energy efficiency + # class](https://support.google.com/merchants/answer/7562785) as defined in + # EU directive 2010/30/EU. + # @!attribute [rw] unit_pricing_measure + # @return [::Google::Shopping::Merchant::Products::V1::UnitPricingMeasure] + # The measure and dimension of an item. + # @!attribute [rw] unit_pricing_base_measure + # @return [::Google::Shopping::Merchant::Products::V1::UnitPricingBaseMeasure] + # The preference of the denominator of the unit price. + # @!attribute [rw] multipack + # @return [::Integer] + # The number of identical products in a business-defined multipack. + # @!attribute [rw] ads_grouping + # @return [::String] + # Used to group items in an arbitrary way. Only for CPA%, discouraged + # otherwise. For more information, see + # [Display ads + # attribute](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] ads_labels + # @return [::Array<::String>] + # Similar to ads_grouping, but only works on CPC. + # @!attribute [rw] ads_redirect + # @return [::String] + # Allows advertisers to override the item URL when the product is shown + # within the context of Product ads. + # @!attribute [rw] cost_of_goods_sold + # @return [::Google::Shopping::Type::Price] + # Cost of goods sold. Used for gross profit reporting. + # @!attribute [rw] product_details + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductDetail>] + # Technical specification or additional product details. + # @!attribute [rw] product_highlights + # @return [::Array<::String>] + # Bullet points describing the most relevant [product + # highlights](https://support.google.com/merchants/answer/9216100). + # @!attribute [rw] display_ads_id + # @return [::String] + # An identifier for an item for dynamic remarketing campaigns. + # @!attribute [rw] display_ads_similar_ids + # @return [::Array<::String>] + # Advertiser-specified recommendations. For more information, see + # [Display ads attribute + # specification](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] display_ads_title + # @return [::String] + # Title of an item for dynamic remarketing campaigns. + # @!attribute [rw] display_ads_link + # @return [::String] + # URL directly to your item's landing page for dynamic remarketing + # campaigns. + # @!attribute [rw] display_ads_value + # @return [::Float] + # Offer margin for dynamic remarketing campaigns. For more information, see + # [Display ads + # attribute](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] promotion_ids + # @return [::Array<::String>] + # The unique ID of a promotion. + # @!attribute [rw] pickup_method + # @return [::Google::Shopping::Merchant::Products::V1::PickupMethod] + # The [pickup](https://support.google.com/merchants/answer/14634021) option + # for the item. + # @!attribute [rw] pickup_sla + # @return [::Google::Shopping::Merchant::Products::V1::PickupSla] + # Item store pickup timeline. For more information, see + # [Pickup SLA](https://support.google.com/merchants/answer/14635400). + # @!attribute [rw] link_template + # @return [::String] + # [Link template](https://support.google.com/merchants/answer/13871172) for + # business hosted local storefront. + # @!attribute [rw] mobile_link_template + # @return [::String] + # [Link template](https://support.google.com/merchants/answer/13870216) for + # business hosted local storefront optimized for mobile + # devices. + # @!attribute [rw] custom_label_0 + # @return [::String] + # [Custom label 0](https://support.google.com/merchants/answer/6324473) for + # custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_1 + # @return [::String] + # [Custom label 1](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_2 + # @return [::String] + # [Custom label 2](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_3 + # @return [::String] + # [Custom label 3](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_4 + # @return [::String] + # [Custom label 4](https://support.google.com/merchants/answer/6324473) for + # custom grouping of items in a Shopping campaign. + # @!attribute [rw] included_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # The list of destinations to include for this target (corresponds to + # checked check boxes in Merchant Center). Default destinations are always + # included unless provided in `excludedDestinations`. + # + # For more information, see + # [Included + # destination](https://support.google.com/merchants/answer/7501026). + # + # Note: We recommend setting destinations on datasources level for most use + # cases. Use this field within products to only setup exceptions. + # @!attribute [rw] excluded_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # The list of destinations to exclude for this target (corresponds to + # unchecked check boxes in Merchant Center). + # + # For more information, see + # [Excluded + # destination](https://support.google.com/merchants/answer/6324486). + # + # Note: We recommend setting destinations on datasources level for most use + # cases. Use this field within products to only setup exceptions. + # @!attribute [rw] shopping_ads_excluded_countries + # @return [::Array<::String>] + # List of country codes [(ISO 3166-1 + # alpha-2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to exclude the + # offer from Shopping Ads destination. Countries from this list are removed + # from countries configured in data source settings. + # @!attribute [rw] external_seller_id + # @return [::String] + # Required for multi-seller accounts. Use this attribute if you're a + # marketplace uploading products for various sellers to your multi-seller + # account. + # @!attribute [rw] pause + # @return [::Google::Shopping::Merchant::Products::V1::Pause] + # Publication of this item will be temporarily + # [paused](https://support.google.com/merchants/answer/11909930). + # @!attribute [rw] lifestyle_image_links + # @return [::Array<::String>] + # Additional URLs of lifestyle images of the item, used to explicitly + # identify images that showcase your item in a real-world context. See the + # [Help Center article](https://support.google.com/merchants/answer/9103186) + # for more information. + # @!attribute [rw] cloud_export_additional_properties + # @return [::Array<::Google::Shopping::Merchant::Products::V1::CloudExportAdditionalProperties>] + # Extra fields to export to the Cloud Retail program. + # @!attribute [rw] virtual_model_link + # @return [::String] + # URL of the 3D image of the item. See the + # [Help Center article](https://support.google.com/merchants/answer/13674896) + # for more information. + # @!attribute [rw] certifications + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductCertification>] + # Product Certifications, for example for energy efficiency labeling of + # products recorded in the [EU EPREL](https://eprel.ec.europa.eu/screen/home) + # database. See the [Help + # Center](https://support.google.com/merchants/answer/13528839) + # article for more information. + # @!attribute [rw] structured_title + # @return [::Google::Shopping::Merchant::Products::V1::StructuredTitle] + # Structured title, for algorithmically (AI)-generated titles. + # @!attribute [rw] structured_description + # @return [::Google::Shopping::Merchant::Products::V1::StructuredDescription] + # Structured description, for algorithmically (AI)-generated descriptions. + # @!attribute [rw] auto_pricing_min_price + # @return [::Google::Shopping::Type::Price] + # A safeguard in the [automated discounts] + # (https://support.google.com/merchants/answer/10295759) and + # "Dynamic Promotions" + # (https://support.google.com/merchants/answer/13949249) projects, + # ensuring that discounts on business offers do not fall below this value, + # thereby preserving the offer's value and profitability. + # @!attribute [rw] sustainability_incentives + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductSustainabilityIncentive>] + # The list of sustainability incentive programs. + class ProductAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ShippingWeight of the product. + # @!attribute [rw] value + # @return [::Float] + # The weight of the product used to calculate the shipping cost of the + # item. + # @!attribute [rw] unit + # @return [::String] + # The unit of value. + class ShippingWeight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ShippingDimension of the product. + # @!attribute [rw] value + # @return [::Float] + # The dimension of the product used to calculate the shipping cost of the + # item. + # @!attribute [rw] unit + # @return [::String] + # The unit of value. + class ShippingDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The UnitPricingBaseMeasure of the product. + # @!attribute [rw] value + # @return [::Integer] + # The denominator of the unit price. + # @!attribute [rw] unit + # @return [::String] + # The unit of the denominator. + class UnitPricingBaseMeasure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The UnitPricingMeasure of the product. + # @!attribute [rw] value + # @return [::Float] + # The measure of an item. + # @!attribute [rw] unit + # @return [::String] + # The unit of the measure. + class UnitPricingMeasure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The SubscriptionCost of the product. + # @!attribute [rw] period + # @return [::Google::Shopping::Merchant::Products::V1::SubscriptionPeriod] + # The type of subscription period. + # Supported values are: + # * "`month`" + # * "`year`" + # @!attribute [rw] period_length + # @return [::Integer] + # The number of subscription periods the buyer has to pay. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The amount the buyer has to pay per subscription period. + class SubscriptionCost + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents installment. + # @!attribute [rw] months + # @return [::Integer] + # The number of installments the buyer has to pay. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The amount the buyer has to pay per month. + # @!attribute [rw] downpayment + # @return [::Google::Shopping::Type::Price] + # The up-front down payment amount the buyer has to pay. + # @!attribute [rw] credit_type + # @return [::Google::Shopping::Merchant::Products::V1::CreditType] + # Type of installment payments. + class ProductInstallment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents loyalty points. + # @!attribute [rw] name + # @return [::String] + # Name of loyalty points program. It is recommended to limit the name to + # 12 full-width characters or 24 Roman characters. + # @!attribute [rw] points_value + # @return [::Integer] + # The retailer's loyalty points in absolute value. + # @!attribute [rw] ratio + # @return [::Float] + # The ratio of a point when converted to currency. Google assumes currency + # based on Merchant Center settings. If ratio is left out, it defaults to + # 1.0. + class LoyaltyPoints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents loyalty program. + # @!attribute [rw] program_label + # @return [::String] + # The label of the loyalty program. This is an internal label that uniquely + # identifies the relationship between a business entity and a loyalty + # program entity. The label must be provided so that the system can associate + # the assets below (for example, price and points) with a business. The + # corresponding program must be linked to the Merchant Center account. + # @!attribute [rw] tier_label + # @return [::String] + # The label of the tier within the loyalty program. + # Must match one of the labels within the program. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # The price for members of the given tier, that is, the instant discount + # price. Must be smaller or equal to the regular price. + # @!attribute [rw] cashback_for_future_use + # @return [::Google::Shopping::Type::Price] + # The cashback that can be used for future purchases. + # @!attribute [rw] loyalty_points + # @return [::Integer] + # The amount of loyalty points earned on a purchase. + # @!attribute [rw] member_price_effective_date + # @return [::Google::Type::Interval] + # A date range during which the item is eligible for member price. If not + # specified, the member price is always applicable. The date range is + # represented by a pair of ISO 8601 dates separated by a space, + # comma, or slash. + # @!attribute [rw] shipping_label + # @return [::String] + # The label of the shipping benefit. If the field has value, this offer has + # loyalty shipping benefit. If the field value isn't provided, the item is + # not eligible for loyalty shipping for the given loyalty tier. + class LoyaltyProgram + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Shipping of the product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Fixed shipping price, represented as a number. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] region + # @return [::String] + # The geographic region to which a shipping rate applies. + # See [region](https://support.google.com/merchants/answer/6324484) for more + # information. + # @!attribute [rw] service + # @return [::String] + # A free-form description of the service class or delivery speed. + # @!attribute [rw] location_id + # @return [::Integer] + # The numeric ID of a location that the shipping rate applies to as + # defined in the [AdWords + # API](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # @!attribute [rw] location_group_name + # @return [::String] + # The location where the shipping is applicable, represented by a + # location group name. + # @!attribute [rw] postal_code + # @return [::String] + # The postal code range that the shipping rate applies to, represented by + # a postal code, a postal code prefix followed by a * wildcard, a range + # between two postal codes or two postal code prefixes of equal length. + # @!attribute [rw] min_handling_time + # @return [::Integer] + # Minimum handling time (inclusive) between when the order is received and + # shipped in business days. 0 means that the order is shipped on the same + # day as it is received if it happens before the cut-off time. + # {::Google::Shopping::Merchant::Products::V1::Shipping#min_handling_time minHandlingTime} + # can only be present together with + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime}; + # but it is not required if + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} + # is present. + # @!attribute [rw] max_handling_time + # @return [::Integer] + # Maximum handling time (inclusive) between when the order is received and + # shipped in business days. 0 means that the order is shipped on the same + # day as it is received if it happens before the cut-off time. Both + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} + # and + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} + # are required if providing shipping speeds. + # {::Google::Shopping::Merchant::Products::V1::Shipping#min_handling_time minHandlingTime} + # is optional if + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} + # is present. + # @!attribute [rw] min_transit_time + # @return [::Integer] + # Minimum transit time (inclusive) between when the order has shipped and + # when it is delivered in business days. 0 means that the order is + # delivered on the same day as it ships. + # {::Google::Shopping::Merchant::Products::V1::Shipping#min_transit_time minTransitTime} + # can only be present together with + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime}; + # but it is not required if + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} + # is present. + # @!attribute [rw] max_transit_time + # @return [::Integer] + # Maximum transit time (inclusive) between when the order has shipped and + # when it is delivered in business days. 0 means that the order is + # delivered on the same day as it ships. Both + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} + # and + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} + # are required if providing shipping speeds. + # {::Google::Shopping::Merchant::Products::V1::Shipping#min_transit_time minTransitTime} + # is optional if + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} + # is present. + class Shipping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Conditions to be met for a product to have free shipping. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] price_threshold + # @return [::Google::Shopping::Type::Price] + # The minimum product price for the shipping cost to become free. Represented + # as a number. + class FreeShippingThreshold + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The product details. + # @!attribute [rw] section_name + # @return [::String] + # The section header used to group a set of product details. + # @!attribute [rw] attribute_name + # @return [::String] + # The name of the product detail. + # @!attribute [rw] attribute_value + # @return [::String] + # The value of the product detail. + class ProductDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Product + # [certification](https://support.google.com/merchants/answer/13528839), + # initially introduced for EU energy efficiency labeling compliance using the + # EU EPREL database. + # @!attribute [rw] certification_authority + # @return [::Google::Shopping::Merchant::Products::V1::CertificationAuthority] + # The certification authority. + # @!attribute [rw] certification_name + # @return [::Google::Shopping::Merchant::Products::V1::CertificationName] + # The name of the certification. + # @!attribute [rw] certification_code + # @return [::String] + # The certification code. + # Maximum length is 2000 characters. + # @!attribute [rw] certification_value + # @return [::String] + # The certification value (also known as class, level or grade), for + # example "A+", "C", "gold". Maximum length is 2000 characters. + class ProductCertification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured title, for algorithmically (AI)-generated titles. + # @!attribute [rw] digital_source_type + # @return [::Google::Shopping::Merchant::Products::V1::DigitalSourceType] + # The digital source type. + # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). + # @!attribute [rw] content + # @return [::String] + # The title text + # Maximum length is 150 characters + class StructuredTitle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured description, for algorithmically (AI)-generated descriptions. + # @!attribute [rw] digital_source_type + # @return [::Google::Shopping::Merchant::Products::V1::DigitalSourceType] + # The digital source type. + # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). + # @!attribute [rw] content + # @return [::String] + # The description text + # Maximum length is 5000 characters + class StructuredDescription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dimension of the product. + # @!attribute [rw] value + # @return [::Float] + # Required. The dimension value represented as a number. The value can have a + # maximum precision of four decimal places. + # @!attribute [rw] unit + # @return [::String] + # Required. The dimension units. + # Acceptable values are: + # * "`in`" + # * "`cm`" + class ProductDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The weight of the product. + # @!attribute [rw] value + # @return [::Float] + # Required. The weight represented as a number. The weight can have a maximum + # precision of four decimal places. + # @!attribute [rw] unit + # @return [::String] + # Required. The weight unit. + # Acceptable values are: + # * "`g`" + # * "`kg`" + # * "`oz`" + # * "`lb`" + class ProductWeight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of a product, data validation issues, that is, information about + # a product computed asynchronously. + # @!attribute [rw] destination_statuses + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductStatus::DestinationStatus>] + # The intended destinations for the product. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductStatus::ItemLevelIssue>] + # A list of all issues associated with the product. + # @!attribute [rw] creation_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item has been created, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] last_update_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item has been last updated, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] google_expiration_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item expires, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + class ProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination status of the product status. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The name of the reporting context. + # @!attribute [rw] approved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer is approved. + # @!attribute [rw] pending_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer is pending + # approval. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer is + # disapproved. + class DestinationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the product status. + # @!attribute [rw] code + # @return [::String] + # The error code of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Products::V1::ProductStatus::ItemLevelIssue::Severity] + # How this issue affects serving of the offer. + # @!attribute [rw] resolution + # @return [::String] + # Whether the issue can be resolved by the business. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The reporting context the issue applies to. + # @!attribute [rw] description + # @return [::String] + # A short issue description in English. + # @!attribute [rw] detail + # @return [::String] + # A detailed issue description in English. + # @!attribute [rw] documentation + # @return [::String] + # The URL of a web page to help with resolving this issue. + # @!attribute [rw] applicable_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where issue applies to the + # offer. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How the issue affects the serving of the product. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the product. + NOT_IMPACTED = 1 + + # The product is demoted and most likely have limited performance + # in search results + DEMOTED = 2 + + # Issue disapproves the product. + DISAPPROVED = 3 + end + end + end + + # Product property for the Cloud Retail API. + # For example, properties for a TV product could be "Screen-Resolution" or + # "Screen-Size". + # @!attribute [rw] property_name + # @return [::String] + # Name of the given property. For example, + # "Screen-Resolution" for a TV product. Maximum string size is 256 + # characters. + # @!attribute [rw] text_value + # @return [::Array<::String>] + # Text value of the given property. For example, + # "8K(UHD)" could be a text value for a TV product. Maximum + # repeatedness of this value is 400. Values are stored in an arbitrary but + # consistent order. Maximum string size is 256 characters. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Boolean value of the given property. For example for a TV product, + # "True" or "False" if the screen is UHD. + # @!attribute [rw] int_value + # @return [::Array<::Integer>] + # Integer values of the given property. For example, 1080 for a TV + # product's Screen Resolution. Maximum repeatedness of this value + # is 400. Values are stored in an arbitrary but consistent order. + # @!attribute [rw] float_value + # @return [::Array<::Float>] + # Float values of the given property. For example for a TV product + # 1.2345. Maximum repeatedness of this value is 400. Values + # are stored in an arbitrary but consistent order. + # @!attribute [rw] min_value + # @return [::Float] + # Minimum float value of the given property. For example for a TV + # product 1.00. + # @!attribute [rw] max_value + # @return [::Float] + # Maximum float value of the given property. For example for a TV + # product 100.00. + # @!attribute [rw] unit_code + # @return [::String] + # Unit of the given property. For example, "Pixels" for a TV product. Maximum + # string size is 256B. + class CloudExportAdditionalProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information regarding sustainability-related incentive programs such as + # rebates or tax relief. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The fixed amount of the incentive. + # + # Note: The following fields are mutually exclusive: `amount`, `percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] percentage + # @return [::Float] + # The percentage of the sale price that the incentive is applied to. + # + # Note: The following fields are mutually exclusive: `percentage`, `amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Products::V1::ProductSustainabilityIncentive::Type] + # Sustainability incentive program. + class ProductSustainabilityIncentive + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of supported sustainability incentive programs. + module Type + # Unspecified or unknown sustainability incentive type. + TYPE_UNSPECIFIED = 0 + + # Program offering tax liability reductions for electric vehicles and, in + # some countries, plug-in hybrids. These reductions can be based on a + # specific amount or a percentage of the sale price. + EV_TAX_CREDIT = 1 + + # A subsidy program, often called an environmental bonus, provides a + # purchase grant for electric vehicles and, in some countries, plug-in + # hybrids. The grant amount may be a fixed sum or a percentage of the sale + # price. + EV_PRICE_DISCOUNT = 2 + end + end + + # Information regarding Automated Discounts. + # @!attribute [rw] prior_price + # @return [::Google::Shopping::Type::Price] + # The price prior to the application of the first price reduction. + # Absent if the information about the prior price of the product is not + # available. + # @!attribute [rw] prior_price_progressive + # @return [::Google::Shopping::Type::Price] + # The price prior to the application of consecutive price reductions. + # Absent if the information about the prior price of the product is not + # available. + # @!attribute [rw] gad_price + # @return [::Google::Shopping::Type::Price] + # The current sale price for products with a price optimized using Google + # Automated Discounts (GAD). Absent if the information about the GAD_price of + # the product is not available. + class AutomatedDiscounts + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The subscription period of the product. + module SubscriptionPeriod + # Indicates that the subscription period is unspecified. + SUBSCRIPTION_PERIOD_UNSPECIFIED = 0 + + # Indicates that the subscription period is month. + MONTH = 1 + + # Indicates that the subscription period is year. + YEAR = 2 + end + + # Target [age group](https://support.google.com/merchants/answer/6324463) of + # the item. + module AgeGroup + # Age group is not specified. + AGE_GROUP_UNSPECIFIED = 0 + + # Teens or older. + ADULT = 1 + + # 5-13 years old. + KIDS = 2 + + # 1-5 years old. + TODDLER = 3 + + # 3-12 months old. + INFANT = 4 + + # 0-3 months old. + NEWBORN = 5 + end + + # [Availability](https://support.google.com/merchants/answer/6324448) status + # of the item. + module Availability + # Availability is not specified. + AVAILABILITY_UNSPECIFIED = 0 + + # In stock. + IN_STOCK = 1 + + # Out of stock. + OUT_OF_STOCK = 2 + + # Pre-order. + PREORDER = 3 + + # Limited availability. + LIMITED_AVAILABILITY = 4 + + # Backorder. + BACKORDER = 5 + end + + # [Condition](https://support.google.com/merchants/answer/6324469) or state + # of the item. + module Condition + # Default value. This value is unused. + CONDITION_UNSPECIFIED = 0 + + # Brand new, original, unopened packaging. + NEW = 1 + + # Previously used, original packaging opened or missing. + USED = 2 + + # Professionally restored to working order, comes with a warranty, may or + # may not have the original packaging. + REFURBISHED = 3 + end + + # Target [gender](https://support.google.com/merchants/answer/6324479) of the + # item. + module Gender + # Gender is not specified. + GENDER_UNSPECIFIED = 0 + + # Male. + MALE = 1 + + # Female. + FEMALE = 2 + + # Unisex. + UNISEX = 3 + end + + # Type of installment payments. + module CreditType + # Default value. This value is unused. + CREDIT_TYPE_UNSPECIFIED = 0 + + # Finance. + FINANCE = 1 + + # Lease. + LEASE = 2 + end + + # System in which the size is specified. Recommended for apparel items. + # For more information, see + # [Size system](https://support.google.com/merchants/answer/6324502). + module SizeSystem + # Unspecified size system. + SIZE_SYSTEM_UNSPECIFIED = 0 + + # AU. + AU = 1 + + # BR. + BR = 2 + + # CN. + CN = 3 + + # DE. + DE = 4 + + # EU. + EU = 5 + + # FR. + FR = 6 + + # IT. + IT = 7 + + # JP. + JP = 8 + + # MEX. + MEX = 9 + + # UK. + UK = 10 + + # US. + US = 11 + end + + # The cut of the item. It can be used to represent combined size types for + # apparel items. Maximum two of size types can be provided, see + # [Size type](https://support.google.com/merchants/answer/6324497). + module SizeType + # The size type is not specified. + SIZE_TYPE_UNSPECIFIED = 0 + + # Regular size. + REGULAR = 1 + + # Petite size. + PETITE = 2 + + # Maternity size. + MATERNITY = 3 + + # Big size. + BIG = 4 + + # Tall size. + TALL = 5 + + # Plus size. + PLUS = 6 + end + + # The [energy efficiency + # class](https://support.google.com/merchants/answer/7562785) as defined in EU + # directive 2010/30/EU. + module EnergyEfficiencyClass + # The energy efficiency class is unspecified. + ENERGY_EFFICIENCY_CLASS_UNSPECIFIED = 0 + + # A+++. + APPP = 1 + + # A++. + APP = 2 + + # A+. + AP = 3 + + # A. + A = 4 + + # B. + B = 5 + + # C. + C = 6 + + # D. + D = 7 + + # E. + E = 8 + + # F. + F = 9 + + # G. + G = 10 + end + + # The [pickup](https://support.google.com/merchants/answer/14634021) option + # for the item. + module PickupMethod + # Pickup method is not specified. + PICKUP_METHOD_UNSPECIFIED = 0 + + # The item is not available for store pickup. + NOT_SUPPORTED = 1 + + # The entire transaction occurs online. + BUY = 2 + + # The item is reserved online and the transaction occurs in-store. + RESERVE = 3 + + # The item is purchased online and shipped to a local store for the customer + # to pick up. + SHIP_TO_STORE = 4 + end + + # Item store pickup timeline. For more information, see + # [Pickup SLA](https://support.google.com/merchants/answer/14635400). + module PickupSla + # Pickup SLA is not specified. + PICKUP_SLA_UNSPECIFIED = 0 + + # Indicates that the product is available for pickup the same day that the + # order is placed, subject to cut off times. + SAME_DAY = 1 + + # Indicates that the product is available for pickup the following day that + # the order is placed. + NEXT_DAY = 2 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 2 days. + TWO_DAY = 3 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 3 days. + THREE_DAY = 4 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 4 days + FOUR_DAY = 5 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 5 days. + FIVE_DAY = 6 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 6 days. + SIX_DAY = 7 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in one week or more. + MULTI_WEEK = 8 + end + + # Publication of this item will be temporarily + # [paused](https://support.google.com/merchants/answer/11909930). + module Pause + # The pause is unspecified. + PAUSE_UNSPECIFIED = 0 + + # You’re currently pausing your product for all ads locations (including + # Shopping Ads, Display Ads, and local inventory ads). + ADS = 1 + + # You’re currently pausing your product for all Shopping locations + # (including Shopping Ads, Display Ads, local inventory ads, Buy on Google, + # and free listings). + ALL = 2 + end + + # The certification authority. + module CertificationAuthority + # Certification authority is not specified. + CERTIFICATION_AUTHORITY_UNSPECIFIED = 0 + + # For the French CO2 emissions class for vehicles. + ADEME = 1 + + # For the German CO2 emissions classes for vehicles. + BMWK = 2 + + # Environment Protection Agency. + EPA = 3 + + # European Commission for energy labels in the EU. + EC = 4 + end + + # The name of the certification. + module CertificationName + # Certification name is not specified. + CERTIFICATION_NAME_UNSPECIFIED = 0 + + # Energy Star. + ENERGY_STAR = 1 + + # Energy Star Most Efficient. + ENERGY_STAR_MOST_EFFICIENT = 2 + + # Represents energy efficiency certifications in the EU European + # Registry for Energy Labeling (EPREL) database. + EPREL = 3 + + # EU Ecolabel. + EU_ECOLABEL = 4 + + # The overall CO2 class of a vehicle + VEHICLE_ENERGY_EFFICIENCY = 5 + + # For the CO2 class of a vehicle with a discharged battery. + VEHICLE_ENERGY_EFFICIENCY_DISCHARGED_BATTERY = 6 + end + + # The digital source type. + # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). + module DigitalSourceType + # Digital source type is unspecified. + DIGITAL_SOURCE_TYPE_UNSPECIFIED = 0 + + # Text created algorithmically using a model derived from sampled + # content. + TRAINED_ALGORITHMIC_MEDIA = 1 + + # Text NOT created algorithmically using a model derived from sampled + # content (the default) + DEFAULT = 2 + end + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb b/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..1de1b841fd30 --- /dev/null +++ b/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-products-v1/snippets/Gemfile b/google-shopping-merchant-products-v1/snippets/Gemfile new file mode 100644 index 000000000000..a26cd0262526 --- /dev/null +++ b/google-shopping-merchant-products-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-products-v1", path: "../" +else + gem "google-shopping-merchant-products-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb b/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb new file mode 100644 index 000000000000..c6549f27042e --- /dev/null +++ b/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the delete_product_input call in the ProductInputsService 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::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input. +# +def delete_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new + + # Call the delete_product_input method. + result = client.delete_product_input request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync] diff --git a/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb b/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb new file mode 100644 index 000000000000..9d02c70d5d28 --- /dev/null +++ b/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the insert_product_input call in the ProductInputsService 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::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input. +# +def insert_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new + + # Call the insert_product_input method. + result = client.insert_product_input request + + # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + p result +end +# [END merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync] diff --git a/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb b/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb new file mode 100644 index 000000000000..fb43f144c6ec --- /dev/null +++ b/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the update_product_input call in the ProductInputsService 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::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input. +# +def update_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new + + # Call the update_product_input method. + result = client.update_product_input request + + # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + p result +end +# [END merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync] diff --git a/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb b/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb new file mode 100644 index 000000000000..1837087a0b6a --- /dev/null +++ b/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProductsService_GetProduct_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the get_product call in the ProductsService 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::Shopping::Merchant::Products::V1::ProductsService::Client#get_product. +# +def get_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new + + # Call the get_product method. + result = client.get_product request + + # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. + p result +end +# [END merchantapi_v1_generated_ProductsService_GetProduct_sync] diff --git a/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb b/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb new file mode 100644 index 000000000000..7d1c214d9304 --- /dev/null +++ b/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ProductsService_ListProducts_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the list_products call in the ProductsService 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::Shopping::Merchant::Products::V1::ProductsService::Client#list_products. +# +def list_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new + + # Call the list_products method. + result = client.list_products 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::Shopping::Merchant::Products::V1::Product. + p item + end +end +# [END merchantapi_v1_generated_ProductsService_ListProducts_sync] diff --git a/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json b/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json new file mode 100644 index 000000000000..18fb7a47b809 --- /dev/null +++ b/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-shopping-merchant-products-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.products.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync", + "title": "Snippet for the insert_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input.", + "file": "product_inputs_service/insert_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1::ProductInput", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" + }, + "method": { + "short_name": "InsertProductInput", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService.InsertProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync", + "title": "Snippet for the update_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input.", + "file": "product_inputs_service/update_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1::ProductInput", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" + }, + "method": { + "short_name": "UpdateProductInput", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService.UpdateProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync", + "title": "Snippet for the delete_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input.", + "file": "product_inputs_service/delete_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" + }, + "method": { + "short_name": "DeleteProductInput", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService.DeleteProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProductsService_GetProduct_sync", + "title": "Snippet for the get_product call in the ProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductsService::Client#get_product.", + "file": "products_service/get_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_product", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client#get_product", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::GetProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1::Product", + "client": { + "short_name": "ProductsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client" + }, + "method": { + "short_name": "GetProduct", + "full_name": "google.shopping.merchant.products.v1.ProductsService.GetProduct", + "service": { + "short_name": "ProductsService", + "full_name": "google.shopping.merchant.products.v1.ProductsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProductsService_ListProducts_sync", + "title": "Snippet for the list_products call in the ProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductsService::Client#list_products.", + "file": "products_service/list_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_products", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client#list_products", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::ListProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1::ListProductsResponse", + "client": { + "short_name": "ProductsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client" + }, + "method": { + "short_name": "ListProducts", + "full_name": "google.shopping.merchant.products.v1.ProductsService.ListProducts", + "service": { + "short_name": "ProductsService", + "full_name": "google.shopping.merchant.products.v1.ProductsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb new file mode 100644 index 000000000000..08569a6317e8 --- /dev/null +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/product_inputs_service" + +class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_product_input_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_input_path account: "value0", productinput: "value1" + assert_equal "accounts/value0/productInputs/value1", path + end + end +end diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb new file mode 100644 index 000000000000..c4d72c5f72f4 --- /dev/null +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb @@ -0,0 +1,266 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/productinputs_pb" +require "google/shopping/merchant/products/v1/product_inputs_service/rest" + + +class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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_insert_product_input + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1::ProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_input = {} + data_source = "hello world" + + insert_product_input_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::Shopping::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_insert_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_product_input_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_product_input ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_product_input(::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_product_input_client_stub.call_count + end + end + end + + def test_update_product_input + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1::ProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + product_input = {} + update_mask = {} + data_source = "hello world" + + update_product_input_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::Shopping::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_update_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_product_input_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_product_input ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_product_input(::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_product_input_client_stub.call_count + end + end + end + + def test_delete_product_input + # 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" + data_source = "hello world" + + delete_product_input_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::Shopping::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_delete_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_product_input_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_product_input({ name: name, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_product_input name: name, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_product_input ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_product_input({ name: name, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_product_input(::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_product_input_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::Shopping::Merchant::Products::V1::ProductInputsService::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::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb new file mode 100644 index 000000000000..9ec2b72a2ddd --- /dev/null +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/productinputs_pb" +require "google/shopping/merchant/products/v1/productinputs_services_pb" +require "google/shopping/merchant/products/v1/product_inputs_service" + +class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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_insert_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1::ProductInput.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" + product_input = {} + data_source = "hello world" + + insert_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1::ProductInput), request["product_input"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_product_input_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_product_input ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_product_input(::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_product_input_client_stub.call_rpc_count + end + end + + def test_update_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1::ProductInput.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. + product_input = {} + update_mask = {} + data_source = "hello world" + + update_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1::ProductInput), request["product_input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_product_input_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_product_input ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_product_input(::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_product_input_client_stub.call_rpc_count + end + end + + def test_delete_product_input + # 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" + data_source = "hello world" + + delete_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_product_input_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_product_input({ name: name, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_product_input name: name, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_product_input ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_product_input({ name: name, data_source: data_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_product_input(::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_product_input_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::Shopping::Merchant::Products::V1::ProductInputsService::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::Shopping::Merchant::Products::V1::ProductInputsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb new file mode 100644 index 000000000000..2a297d86802a --- /dev/null +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/products_service" + +class ::Google::Shopping::Merchant::Products::V1::ProductsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb new file mode 100644 index 000000000000..c9986da2ce8d --- /dev/null +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb @@ -0,0 +1,209 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/products_pb" +require "google/shopping/merchant/products/v1/products_service/rest" + + +class ::Google::Shopping::Merchant::Products::V1::ProductsService::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_get_product + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1::Product.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_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::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.stub :transcode_get_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_product_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_product ::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_product(::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_product_client_stub.call_count + end + end + end + + def test_list_products + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_products_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::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_products_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_products ::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, 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_products({ parent: parent, 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_products(::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, 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_products_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::Shopping::Merchant::Products::V1::ProductsService::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::Shopping::Merchant::Products::V1::ProductsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb new file mode 100644 index 000000000000..ccec00216f98 --- /dev/null +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/products/v1/products_pb" +require "google/shopping/merchant/products/v1/products_services_pb" +require "google/shopping/merchant/products/v1/products_service" + +class ::Google::Shopping::Merchant::Products::V1::ProductsService::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_get_product + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1::Product.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" + + get_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_product, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::GetProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_product_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_product ::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_product({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_product(::Google::Shopping::Merchant::Products::V1::GetProductRequest.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, get_product_client_stub.call_rpc_count + end + end + + def test_list_products + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.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" + page_size = 42 + page_token = "hello world" + + list_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_products, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::ListProductsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_products_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_products({ parent: parent, 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_products parent: parent, 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_products ::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, 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_products({ parent: parent, 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_products(::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, 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_products_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::Shopping::Merchant::Products::V1::ProductsService::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::Shopping::Merchant::Products::V1::ProductsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-products-v1/test/helper.rb b/google-shopping-merchant-products-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-products-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index d58ffdae8ff4..38e538ecbdfe 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1919,6 +1919,10 @@ "component": "google-shopping-merchant-products", "version_file": "lib/google/shopping/merchant/products/version.rb" }, + "google-shopping-merchant-products-v1": { + "component": "google-shopping-merchant-products-v1", + "version_file": "lib/google/shopping/merchant/products/v1/version.rb" + }, "google-shopping-merchant-products-v1beta": { "component": "google-shopping-merchant-products-v1beta", "version_file": "lib/google/shopping/merchant/products/v1beta/version.rb" From ed8fb112459653fe0c08442999a5c6fa723ac793 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:35:09 -0700 Subject: [PATCH 364/457] feat: Initial generation of google-shopping-merchant-order_tracking-v1 (#30768) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 49 ++ .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 ++ .../.toys.rb | 28 ++ .../.yardopts | 12 + .../AUTHENTICATION.md | 122 +++++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++++++++ .../README.md | 154 ++++++ .../Rakefile | 169 +++++++ .../gapic_metadata.json | 23 + ...hopping-merchant-order_tracking-v1.gemspec | 29 ++ ...gle-shopping-merchant-order_tracking-v1.rb | 21 + .../shopping/merchant/order_tracking/v1.rb | 47 ++ .../v1/order_tracking_signals_service.rb | 57 +++ .../order_tracking_signals_service/client.rb | 467 +++++++++++++++++ .../credentials.rb | 49 ++ .../order_tracking_signals_service/paths.rb | 49 ++ .../v1/order_tracking_signals_service/rest.rb | 54 ++ .../rest/client.rb | 434 ++++++++++++++++ .../rest/service_stub.rb | 145 ++++++ .../merchant/order_tracking/v1/rest.rb | 39 ++ .../merchant/order_tracking/v1/version.rb | 30 ++ .../v1/order_tracking_signals_pb.rb | 58 +++ .../v1/order_tracking_signals_services_pb.rb | 47 ++ .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++++++++++++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++++ .../proto_docs/google/api/launch_stage.rb | 71 +++ .../proto_docs/google/api/resource.rb | 227 +++++++++ .../proto_docs/google/protobuf/duration.rb | 98 ++++ .../v1/order_tracking_signals.rb | 211 ++++++++ .../proto_docs/google/shopping/type/types.rb | 210 ++++++++ .../proto_docs/google/type/datetime.rb | 103 ++++ .../snippets/Gemfile | 32 ++ .../create_order_tracking_signal.rb | 47 ++ ...le.shopping.merchant.ordertracking.v1.json | 55 ++ ...der_tracking_signals_service_paths_test.rb | 55 ++ ...rder_tracking_signals_service_rest_test.rb | 155 ++++++ .../v1/order_tracking_signals_service_test.rb | 147 ++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 46 files changed, 4376 insertions(+) create mode 100644 google-shopping-merchant-order_tracking-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-order_tracking-v1/.gitignore create mode 100644 google-shopping-merchant-order_tracking-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-order_tracking-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-order_tracking-v1/.rubocop.yml create mode 100644 google-shopping-merchant-order_tracking-v1/.toys.rb create mode 100644 google-shopping-merchant-order_tracking-v1/.yardopts create mode 100644 google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-order_tracking-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-order_tracking-v1/Gemfile create mode 100644 google-shopping-merchant-order_tracking-v1/LICENSE.md create mode 100644 google-shopping-merchant-order_tracking-v1/README.md create mode 100644 google-shopping-merchant-order_tracking-v1/Rakefile create mode 100644 google-shopping-merchant-order_tracking-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb create mode 100644 google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb create mode 100644 google-shopping-merchant-order_tracking-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb create mode 100644 google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json create mode 100644 google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb create mode 100644 google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb create mode 100644 google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb create mode 100644 google-shopping-merchant-order_tracking-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e18c285328e5..3f98788a7092 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -949,6 +949,8 @@ "google-shopping-merchant-notifications-v1beta+FILLER": "0.0.0", "google-shopping-merchant-order_tracking": "0.1.0", "google-shopping-merchant-order_tracking+FILLER": "0.0.0", + "google-shopping-merchant-order_tracking-v1": "0.0.1", + "google-shopping-merchant-order_tracking-v1+FILLER": "0.0.0", "google-shopping-merchant-order_tracking-v1beta": "0.1.0", "google-shopping-merchant-order_tracking-v1beta+FILLER": "0.0.0", "google-shopping-merchant-products": "0.2.2", diff --git a/google-shopping-merchant-order_tracking-v1/.OwlBot.yaml b/google-shopping-merchant-order_tracking-v1/.OwlBot.yaml new file mode 100644 index 000000000000..077a99df7028 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/ordertracking/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-order_tracking-v1/$1 diff --git a/google-shopping-merchant-order_tracking-v1/.gitignore b/google-shopping-merchant-order_tracking-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/.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/google-shopping-merchant-order_tracking-v1/.owlbot-manifest.json b/google-shopping-merchant-order_tracking-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..68ec18ea526e --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/.owlbot-manifest.json @@ -0,0 +1,49 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-order_tracking-v1.gemspec", + "lib/google-shopping-merchant-order_tracking-v1.rb", + "lib/google/shopping/merchant/order_tracking/v1.rb", + "lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb", + "lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb", + "lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb", + "lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb", + "lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb", + "lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb", + "lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb", + "lib/google/shopping/merchant/order_tracking/v1/rest.rb", + "lib/google/shopping/merchant/order_tracking/v1/version.rb", + "lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb", + "lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb", + "proto_docs/google/shopping/type/types.rb", + "proto_docs/google/type/datetime.rb", + "snippets/Gemfile", + "snippets/order_tracking_signals_service/create_order_tracking_signal.rb", + "snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json", + "test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb", + "test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb", + "test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-order_tracking-v1/.repo-metadata.json b/google-shopping-merchant-order_tracking-v1/.repo-metadata.json new file mode 100644 index 000000000000..5bc02602e046 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-order_tracking-v1", + "distribution_name": "google-shopping-merchant-order_tracking-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-order_tracking-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-order_tracking-v1/.rubocop.yml b/google-shopping-merchant-order_tracking-v1/.rubocop.yml new file mode 100644 index 000000000000..447f86ce1016 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-order_tracking-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-order_tracking-v1.rb" diff --git a/google-shopping-merchant-order_tracking-v1/.toys.rb b/google-shopping-merchant-order_tracking-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-order_tracking-v1/.yardopts b/google-shopping-merchant-order_tracking-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md b/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..bb5fcaedaf7c --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-order_tracking-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-order_tracking-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/order_tracking/v1" + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/order_tracking/v1" + +::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-shopping-merchant-order_tracking-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/order_tracking/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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/google-shopping-merchant-order_tracking-v1/CHANGELOG.md b/google-shopping-merchant-order_tracking-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-order_tracking-v1/Gemfile b/google-shopping-merchant-order_tracking-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-order_tracking-v1/LICENSE.md b/google-shopping-merchant-order_tracking-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-order_tracking-v1/README.md b/google-shopping-merchant-order_tracking-v1/README.md new file mode 100644 index 000000000000..bc08156536ed --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-order_tracking](https://rubygems.org/gems/google-shopping-merchant-order_tracking). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-order_tracking-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/order_tracking/v1" + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new +request = ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new # (request fields as keyword arguments...) +response = client.create_order_tracking_signal request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-order_tracking-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/order_tracking/v1" +require "logger" + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-shopping-merchant-order_tracking`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-order_tracking-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-order_tracking`. +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-shopping-merchant-order_tracking-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-order_tracking-v1/Rakefile b/google-shopping-merchant-order_tracking-v1/Rakefile new file mode 100644 index 000000000000..5ced34440a63 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-order_tracking-v1 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/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials" + ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-shopping-merchant-order_tracking-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-order_tracking-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-order_tracking-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-order_tracking-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-order_tracking-v1" + header "google-shopping-merchant-order_tracking-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-order_tracking-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-order_tracking-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-order_tracking-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-order_tracking-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-order_tracking-v1/gapic_metadata.json b/google-shopping-merchant-order_tracking-v1/gapic_metadata.json new file mode 100644 index 000000000000..3046a917de44 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.ordertracking.v1", + "libraryPackage": "::Google::Shopping::Merchant::OrderTracking::V1", + "services": { + "OrderTrackingSignalsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client", + "rpcs": { + "CreateOrderTrackingSignal": { + "methods": [ + "create_order_tracking_signal" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec b/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec new file mode 100644 index 000000000000..b75afc115aa3 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/order_tracking/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-order_tracking-v1" + gem.version = Google::Shopping::Merchant::OrderTracking::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-order_tracking-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb b/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb new file mode 100644 index 000000000000..d300421ed9ca --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/order_tracking/v1" diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb new file mode 100644 index 000000000000..8015f4364175 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/order_tracking/v1/order_tracking_signals_service" +require "google/shopping/merchant/order_tracking/v1/version" + +module Google + module Shopping + module Merchant + module OrderTracking + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/order_tracking/v1" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/order_tracking/v1" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/order_tracking/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb new file mode 100644 index 000000000000..2459432908c5 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/order_tracking/v1/version" + +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + ## + # Service to serve order tracking signals public API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + module OrderTrackingSignalsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "order_tracking_signals_service", "helpers.rb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb new file mode 100644 index 000000000000..e423c4442e95 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb @@ -0,0 +1,467 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + ## + # Client for the OrderTrackingSignalsService service. + # + # Service to serve order tracking signals public API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :order_tracking_signals_service_stub + + ## + # Configure the OrderTrackingSignalsService Client class. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrderTrackingSignalsService clients + # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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", "Shopping", "Merchant", "OrderTracking", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 OrderTrackingSignalsService 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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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 + @order_tracking_signals_service_stub.universe_domain + end + + ## + # Create a new OrderTrackingSignalsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrderTrackingSignalsService 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/shopping/merchant/ordertracking/v1/order_tracking_signals_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 + + @order_tracking_signals_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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 + ) + + @order_tracking_signals_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 + @order_tracking_signals_service_stub.logger + end + + # Service calls + + ## + # Creates new order tracking signal. + # + # @overload create_order_tracking_signal(request, options = nil) + # Pass arguments to `create_order_tracking_signal` via a request object, either of type + # {::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::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_order_tracking_signal(parent: nil, order_tracking_signal: nil) + # Pass arguments to `create_order_tracking_signal` 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 account of the business for which the order signal is + # created. Format: accounts/\\{account} + # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal, ::Hash] + # Required. The order signal to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/order_tracking/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new + # + # # Call the create_order_tracking_signal method. + # result = client.create_order_tracking_signal request + # + # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. + # p result + # + def create_order_tracking_signal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest + + # 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_order_tracking_signal.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::Shopping::Merchant::OrderTracking::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @order_tracking_signals_service_stub.call_rpc :create_order_tracking_signal, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the OrderTrackingSignalsService API. + # + # This class represents the configuration for OrderTrackingSignalsService, + # 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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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_order_tracking_signal to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 OrderTrackingSignalsService 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_order_tracking_signal` + # @return [::Gapic::Config::Method] + # + attr_reader :create_order_tracking_signal + + # @private + def initialize parent_rpcs = nil + create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal + @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb new file mode 100644 index 000000000000..a42fc1fb5aa5 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + # Credentials for the OrderTrackingSignalsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb new file mode 100644 index 000000000000..fccc749330d7 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + # Path helper methods for the OrderTrackingSignalsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb new file mode 100644 index 000000000000..f0d74e26c35c --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/order_tracking/v1/version" + +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + ## + # Service to serve order tracking signals public API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + module OrderTrackingSignalsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb new file mode 100644 index 000000000000..67f4ae51e398 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + module Rest + ## + # REST client for the OrderTrackingSignalsService service. + # + # Service to serve order tracking signals public API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :order_tracking_signals_service_stub + + ## + # Configure the OrderTrackingSignalsService Client class. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrderTrackingSignalsService clients + # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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", "Shopping", "Merchant", "OrderTracking", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 OrderTrackingSignalsService 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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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 + @order_tracking_signals_service_stub.universe_domain + end + + ## + # Create a new OrderTrackingSignalsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrderTrackingSignalsService 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 + + @order_tracking_signals_service_stub = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @order_tracking_signals_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 + @order_tracking_signals_service_stub.logger + end + + # Service calls + + ## + # Creates new order tracking signal. + # + # @overload create_order_tracking_signal(request, options = nil) + # Pass arguments to `create_order_tracking_signal` via a request object, either of type + # {::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::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_order_tracking_signal(parent: nil, order_tracking_signal: nil) + # Pass arguments to `create_order_tracking_signal` 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 account of the business for which the order signal is + # created. Format: accounts/\\{account} + # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal, ::Hash] + # Required. The order signal to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/order_tracking/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new + # + # # Call the create_order_tracking_signal method. + # result = client.create_order_tracking_signal request + # + # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. + # p result + # + def create_order_tracking_signal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest + + # 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_order_tracking_signal.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::Shopping::Merchant::OrderTracking::V1::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_order_tracking_signal.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @order_tracking_signals_service_stub.create_order_tracking_signal 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 + + ## + # Configuration class for the OrderTrackingSignalsService REST API. + # + # This class represents the configuration for OrderTrackingSignalsService 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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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_order_tracking_signal to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.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 = "merchantapi.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 OrderTrackingSignalsService 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_order_tracking_signal` + # @return [::Gapic::Config::Method] + # + attr_reader :create_order_tracking_signal + + # @private + def initialize parent_rpcs = nil + create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal + @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb new file mode 100644 index 000000000000..4fe58896050e --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + module Rest + ## + # REST service stub for the OrderTrackingSignalsService 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: true, + 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_order_tracking_signal REST call + # + # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest] + # 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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # A result object deserialized from the server's reply + def create_order_tracking_signal request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_order_tracking_signal_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_order_tracking_signal", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.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_order_tracking_signal REST call + # + # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest] + # 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_order_tracking_signal_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/ordertracking/v1/{parent}/orderTrackingSignals", + body: "order_tracking_signal", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb new file mode 100644 index 000000000000..9b88024497cd --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" +require "google/shopping/merchant/order_tracking/v1/version" + +module Google + module Shopping + module Merchant + module OrderTracking + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/order_tracking/v1/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb new file mode 100644 index 000000000000..1910d6bb1a13 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module OrderTracking + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb new file mode 100644 index 000000000000..412d6c202d94 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/ordertracking/v1/order_tracking_signals.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/shopping/type/types_pb' +require 'google/type/datetime_pb' + + +descriptor_data = "\nFgoogle/shopping/merchant/ordertracking/v1/order_tracking_signals.proto\x12)google.shopping.merchant.ordertracking.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/datetime.proto\"\xe9\x01\n CreateOrderTrackingSignalRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12%\n\x18order_tracking_signal_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x15order_tracking_signal\x18\x03 \x01(\x0b\x32>.google.shopping.merchant.ordertracking.v1.OrderTrackingSignalB\x03\xe0\x41\x02\"\xd3\x0c\n\x13OrderTrackingSignal\x12%\n\x18order_tracking_signal_id\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bmerchant_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\x12order_created_time\x18\x01 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x02\x12\x15\n\x08order_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12g\n\rshipping_info\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfoB\x03\xe0\x41\x02\x12g\n\nline_items\x18\x04 \x03(\x0b\x32N.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.LineItemDetailsB\x03\xe0\x41\x02\x12\x7f\n\x1ashipment_line_item_mapping\x18\x05 \x03(\x0b\x32V.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShipmentLineItemMappingB\x03\xe0\x41\x01\x12\x44\n\x15\x63ustomer_shipping_fee\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x14\x64\x65livery_postal_code\x18\t \x01(\tB\x03\xe0\x41\x01\x12!\n\x14\x64\x65livery_region_code\x18\n \x01(\tB\x03\xe0\x41\x01\x1a\xf0\x04\n\x0cShippingInfo\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0btracking_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63\x61rrier\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63\x61rrier_service\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x0cshipped_time\x18\x05 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x42\n\x1e\x65\x61rliest_delivery_promise_time\x18\x06 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12@\n\x1clatest_delivery_promise_time\x18\x07 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x38\n\x14\x61\x63tual_delivery_time\x18\x08 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12w\n\x0fshipping_status\x18\t \x01(\x0e\x32Y.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo.ShippingStateB\x03\xe0\x41\x02\x12\x1f\n\x12origin_postal_code\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12origin_region_code\x18\x0b \x01(\tB\x03\xe0\x41\x02\"K\n\rShippingState\x12\x1e\n\x1aSHIPPING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SHIPPED\x10\x01\x12\r\n\tDELIVERED\x10\x02\x1a\xd8\x01\n\x0fLineItemDetails\x12\x19\n\x0cline_item_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05gtins\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x10\n\x03mpn\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\rproduct_title\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x62rand\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x15\n\x08quantity\x18\x07 \x01(\x03\x42\x03\xe0\x41\x02\x42\x10\n\x0e_product_titleB\x08\n\x06_brand\x1a\x65\n\x17ShipmentLineItemMapping\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cline_item_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\x42\x18\n\x16_customer_shipping_fee2\x8e\x03\n\x1bOrderTrackingSignalsService\x12\xa5\x02\n\x19\x43reateOrderTrackingSignal\x12K.google.shopping.merchant.ordertracking.v1.CreateOrderTrackingSignalRequest\x1a>.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal\"{\xda\x41\x1fparent,order_tracking_signal_id\x82\xd3\xe4\x93\x02S\":/ordertracking/v1/{parent=accounts/*}/orderTrackingSignals:\x15order_tracking_signal\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xea\x02\n-com.google.shopping.merchant.ordertracking.v1B\x19OrderTrackingSignalsProtoP\x01ZYcloud.google.com/go/shopping/merchant/ordertracking/apiv1/ordertrackingpb;ordertrackingpb\xaa\x02)Google.Shopping.Merchant.OrderTracking.V1\xca\x02)Google\\Shopping\\Merchant\\OrderTracking\\V1\xea\x02-Google::Shopping::Merchant::OrderTracking::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.DateTime", "google/type/datetime.proto"], + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + CreateOrderTrackingSignalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.CreateOrderTrackingSignalRequest").msgclass + OrderTrackingSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal").msgclass + OrderTrackingSignal::ShippingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo").msgclass + OrderTrackingSignal::ShippingInfo::ShippingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo.ShippingState").enummodule + OrderTrackingSignal::LineItemDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.LineItemDetails").msgclass + OrderTrackingSignal::ShipmentLineItemMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShipmentLineItemMapping").msgclass + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb new file mode 100644 index 000000000000..25994a1c1613 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/ordertracking/v1/order_tracking_signals.proto for package 'Google.Shopping.Merchant.OrderTracking.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/ordertracking/v1/order_tracking_signals_pb' + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + # Service to serve order tracking signals public API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService' + + # Creates new order tracking signal. + rpc :CreateOrderTrackingSignal, ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/proto_docs/README.md b/google-shopping-merchant-order_tracking-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-order_tracking-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb new file mode 100644 index 000000000000..37ae81c39f53 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb @@ -0,0 +1,211 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module OrderTracking + module V1 + # Signals only can be created but not updated. + # Businesses need to call this API only when the order is completely shipped. + # Creates new order signal. + # @!attribute [rw] parent + # @return [::String] + # Required. The account of the business for which the order signal is + # created. Format: accounts/\\{account} + # @!attribute [r] order_tracking_signal_id + # @return [::String] + # Output only. The ID that uniquely identifies this order tracking signal. + # @!attribute [rw] order_tracking_signal + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # Required. The order signal to be created. + class CreateOrderTrackingSignalRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a business trade from which signals are extracted, such as + # shipping. + # @!attribute [r] order_tracking_signal_id + # @return [::Integer] + # Output only. The ID that uniquely identifies this order tracking signal. + # @!attribute [rw] merchant_id + # @return [::Integer] + # Optional. The Google Merchant Center ID of this order tracking signal. This + # value is optional. If left unset, the caller's Merchant Center ID is used. + # You must request access in order to provide data on behalf of another + # business. For more information, see [Submitting Order Tracking + # Signals](/shopping-content/guides/order-tracking-signals). + # @!attribute [rw] order_created_time + # @return [::Google::Type::DateTime] + # Required. The time when the order was created on the businesses side. + # Include the year and timezone string, if available. + # @!attribute [rw] order_id + # @return [::String] + # Required. The ID of the order on the businesses side. This field will be + # hashed in returned OrderTrackingSignal creation response. + # @!attribute [rw] shipping_info + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShippingInfo>] + # Required. The shipping information for the order. + # @!attribute [rw] line_items + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::LineItemDetails>] + # Required. Information about line items in the order. + # @!attribute [rw] shipment_line_item_mapping + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShipmentLineItemMapping>] + # Optional. The mapping of the line items to the shipment information. + # @!attribute [rw] customer_shipping_fee + # @return [::Google::Shopping::Type::Price] + # Optional. The shipping fee of the order; + # this value should be set to zero in the case of free shipping. + # @!attribute [rw] delivery_postal_code + # @return [::String] + # Optional. The delivery postal code, as a continuous string without spaces + # or dashes, for example "95016". This field will be anonymized in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] delivery_region_code + # @return [::String] + # Optional. The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for + # the shipping destination. + class OrderTrackingSignal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The shipping information for the order. + # @!attribute [rw] shipment_id + # @return [::String] + # Required. The shipment ID. This field will be hashed in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] tracking_id + # @return [::String] + # Optional. The tracking ID of the shipment. This field is required if one + # of the following fields is absent: earliest_delivery_promise_time, + # latest_delivery_promise_time, and actual_delivery_time. + # @!attribute [rw] carrier + # @return [::String] + # Optional. The name of the shipping carrier for the delivery. This field + # is required if one of the following fields is absent: + # earliest_delivery_promise_time, latest_delivery_promise_time, + # and actual_delivery_time. + # @!attribute [rw] carrier_service + # @return [::String] + # Optional. The service type for fulfillment, such as GROUND, FIRST_CLASS, + # etc. + # @!attribute [rw] shipped_time + # @return [::Google::Type::DateTime] + # Optional. The time when the shipment was shipped. + # Include the year and timezone string, if available. + # @!attribute [rw] earliest_delivery_promise_time + # @return [::Google::Type::DateTime] + # Optional. The earliest delivery promised time. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] latest_delivery_promise_time + # @return [::Google::Type::DateTime] + # Optional. The latest delivery promised time. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] actual_delivery_time + # @return [::Google::Type::DateTime] + # Optional. The time when the shipment was actually delivered. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] shipping_status + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShippingInfo::ShippingState] + # Required. The status of the shipment. + # @!attribute [rw] origin_postal_code + # @return [::String] + # Required. The origin postal code, as a continuous string without spaces + # or dashes, for example "95016". This field will be anonymized in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] origin_region_code + # @return [::String] + # Required. The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for + # the shipping origin. + class ShippingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The current status of the shipments. + module ShippingState + # The shipping status is not known to business. + SHIPPING_STATE_UNSPECIFIED = 0 + + # All items are shipped. + SHIPPED = 1 + + # The shipment is already delivered. + DELIVERED = 2 + end + end + + # The line items of the order. + # @!attribute [rw] line_item_id + # @return [::String] + # Required. The ID for this line item. + # @!attribute [rw] product_id + # @return [::String] + # Required. The Content API REST ID of the product, in the + # form channel:contentLanguage:targetCountry:offerId. + # @!attribute [rw] gtins + # @return [::Array<::String>] + # Optional. The Global Trade Item Numbers. + # @!attribute [rw] mpn + # @return [::String] + # Optional. The manufacturer part number. + # @!attribute [rw] product_title + # @return [::String] + # Optional. Plain text title of this product. + # @!attribute [rw] brand + # @return [::String] + # Optional. Brand of the product. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The quantity of the line item in the order. + class LineItemDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents how many items are in the shipment for the given shipment_id + # and line_item_id. + # @!attribute [rw] shipment_id + # @return [::String] + # Required. The shipment ID. This field will be hashed in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] line_item_id + # @return [::String] + # Required. The line item ID. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The line item quantity in the shipment. + class ShipmentLineItemMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..3b045eb0b7d8 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year is 0, the DateTime is considered not to have a specific year. month + # and day must have valid, non-zero values. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Required. Month of year. Must be from 1 to 12. + # @!attribute [rw] day + # @return [::Integer] + # Required. Day of month. Must be from 1 to 31 and valid for the year and + # month. + # @!attribute [rw] hours + # @return [::Integer] + # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API + # may choose to allow the value "24:00:00" for scenarios like business + # closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Required. Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An + # API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Required. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone, e.g. "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number, e.g. "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/snippets/Gemfile b/google-shopping-merchant-order_tracking-v1/snippets/Gemfile new file mode 100644 index 000000000000..72e88812038e --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-order_tracking-v1", path: "../" +else + gem "google-shopping-merchant-order_tracking-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb b/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb new file mode 100644 index 000000000000..e39f0b2817e2 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] +require "google/shopping/merchant/order_tracking/v1" + +## +# Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService 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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal. +# +def create_order_tracking_signal + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new + + # Call the create_order_tracking_signal method. + result = client.create_order_tracking_signal request + + # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. + p result +end +# [END merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] diff --git a/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json b/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json new file mode 100644 index 000000000000..f52a48a047c9 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-shopping-merchant-order_tracking-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.ordertracking.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync", + "title": "Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal.", + "file": "order_tracking_signals_service/create_order_tracking_signal.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_order_tracking_signal", + "full_name": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal", + "client": { + "short_name": "OrderTrackingSignalsService::Client", + "full_name": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client" + }, + "method": { + "short_name": "CreateOrderTrackingSignal", + "full_name": "google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService.CreateOrderTrackingSignal", + "service": { + "short_name": "OrderTrackingSignalsService", + "full_name": "google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb b/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb new file mode 100644 index 000000000000..3a8642651407 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/order_tracking/v1/order_tracking_signals_service" + +class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb b/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb new file mode 100644 index 000000000000..c72a6c2c8bf8 --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" + + +class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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_order_tracking_signal + # Create test objects. + client_result = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + order_tracking_signal_id = "hello world" + order_tracking_signal = {} + + create_order_tracking_signal_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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::ServiceStub.stub :transcode_create_order_tracking_signal_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_order_tracking_signal_client_stub do + # Create client + client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_order_tracking_signal_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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb b/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb new file mode 100644 index 000000000000..62eb5d67a64c --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" +require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service" + +class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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_order_tracking_signal + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.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" + order_tracking_signal_id = "hello world" + order_tracking_signal = {} + + create_order_tracking_signal_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_order_tracking_signal, name + assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["order_tracking_signal_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal), request["order_tracking_signal"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_order_tracking_signal_client_stub do + # Create client + client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_order_tracking_signal_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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-order_tracking-v1/test/helper.rb b/google-shopping-merchant-order_tracking-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-order_tracking-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 38e538ecbdfe..3b34abd04e00 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1911,6 +1911,10 @@ "component": "google-shopping-merchant-order_tracking", "version_file": "lib/google/shopping/merchant/order_tracking/version.rb" }, + "google-shopping-merchant-order_tracking-v1": { + "component": "google-shopping-merchant-order_tracking-v1", + "version_file": "lib/google/shopping/merchant/order_tracking/v1/version.rb" + }, "google-shopping-merchant-order_tracking-v1beta": { "component": "google-shopping-merchant-order_tracking-v1beta", "version_file": "lib/google/shopping/merchant/order_tracking/v1beta/version.rb" From 8798c554a9fdfec89cfde4b2a3b8ba2199b0c710 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:37:20 -0700 Subject: [PATCH 365/457] feat: Initial generation of google-shopping-merchant-reports-v1 (#30767) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 48 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + google-shopping-merchant-reports-v1/.toys.rb | 28 + google-shopping-merchant-reports-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + google-shopping-merchant-reports-v1/Gemfile | 11 + .../LICENSE.md | 201 +++ google-shopping-merchant-reports-v1/README.md | 154 ++ google-shopping-merchant-reports-v1/Rakefile | 169 +++ .../gapic_metadata.json | 23 + ...oogle-shopping-merchant-reports-v1.gemspec | 29 + .../google-shopping-merchant-reports-v1.rb | 21 + .../google/shopping/merchant/reports/v1.rb | 47 + .../merchant/reports/v1/report_service.rb | 57 + .../reports/v1/report_service/client.rb | 487 +++++++ .../reports/v1/report_service/credentials.rb | 49 + .../reports/v1/report_service/rest.rb | 54 + .../reports/v1/report_service/rest/client.rb | 454 ++++++ .../v1/report_service/rest/service_stub.rb | 145 ++ .../merchant/reports/v1/reports_pb.rb | 86 ++ .../reports/v1/reports_services_pb.rb | 50 + .../shopping/merchant/reports/v1/rest.rb | 39 + .../shopping/merchant/reports/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 +++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 ++ .../shopping/merchant/reports/v1/reports.rb | 1292 +++++++++++++++++ .../proto_docs/google/shopping/type/types.rb | 210 +++ .../proto_docs/google/type/date.rb | 53 + .../snippets/Gemfile | 32 + .../snippets/report_service/search.rb | 51 + ...a_google.shopping.merchant.reports.v1.json | 55 + .../reports/v1/report_service_rest_test.rb | 156 ++ .../reports/v1/report_service_test.rb | 154 ++ .../test/helper.rb | 25 + release-please-config.json | 4 + 45 files changed, 5512 insertions(+) create mode 100644 google-shopping-merchant-reports-v1/.OwlBot.yaml create mode 100644 google-shopping-merchant-reports-v1/.gitignore create mode 100644 google-shopping-merchant-reports-v1/.owlbot-manifest.json create mode 100644 google-shopping-merchant-reports-v1/.repo-metadata.json create mode 100644 google-shopping-merchant-reports-v1/.rubocop.yml create mode 100644 google-shopping-merchant-reports-v1/.toys.rb create mode 100644 google-shopping-merchant-reports-v1/.yardopts create mode 100644 google-shopping-merchant-reports-v1/AUTHENTICATION.md create mode 100644 google-shopping-merchant-reports-v1/CHANGELOG.md create mode 100644 google-shopping-merchant-reports-v1/Gemfile create mode 100644 google-shopping-merchant-reports-v1/LICENSE.md create mode 100644 google-shopping-merchant-reports-v1/README.md create mode 100644 google-shopping-merchant-reports-v1/Rakefile create mode 100644 google-shopping-merchant-reports-v1/gapic_metadata.json create mode 100644 google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec create mode 100644 google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb create mode 100644 google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/README.md create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb create mode 100644 google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb create mode 100644 google-shopping-merchant-reports-v1/snippets/Gemfile create mode 100644 google-shopping-merchant-reports-v1/snippets/report_service/search.rb create mode 100644 google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json create mode 100644 google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb create mode 100644 google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb create mode 100644 google-shopping-merchant-reports-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3f98788a7092..62bc7f2a38d3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -973,6 +973,8 @@ "google-shopping-merchant-quota-v1beta+FILLER": "0.0.0", "google-shopping-merchant-reports": "0.4.1", "google-shopping-merchant-reports+FILLER": "0.0.0", + "google-shopping-merchant-reports-v1": "0.0.1", + "google-shopping-merchant-reports-v1+FILLER": "0.0.0", "google-shopping-merchant-reports-v1beta": "0.9.0", "google-shopping-merchant-reports-v1beta+FILLER": "0.0.0", "google-shopping-merchant-reviews": "0.2.1", diff --git a/google-shopping-merchant-reports-v1/.OwlBot.yaml b/google-shopping-merchant-reports-v1/.OwlBot.yaml new file mode 100644 index 000000000000..8b0b27e7d638 --- /dev/null +++ b/google-shopping-merchant-reports-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/shopping/merchant/reports/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-shopping-merchant-reports-v1/$1 diff --git a/google-shopping-merchant-reports-v1/.gitignore b/google-shopping-merchant-reports-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-shopping-merchant-reports-v1/.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/google-shopping-merchant-reports-v1/.owlbot-manifest.json b/google-shopping-merchant-reports-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..8d66dedfb01d --- /dev/null +++ b/google-shopping-merchant-reports-v1/.owlbot-manifest.json @@ -0,0 +1,48 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-shopping-merchant-reports-v1.gemspec", + "lib/google-shopping-merchant-reports-v1.rb", + "lib/google/shopping/merchant/reports/v1.rb", + "lib/google/shopping/merchant/reports/v1/report_service.rb", + "lib/google/shopping/merchant/reports/v1/report_service/client.rb", + "lib/google/shopping/merchant/reports/v1/report_service/credentials.rb", + "lib/google/shopping/merchant/reports/v1/report_service/rest.rb", + "lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb", + "lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb", + "lib/google/shopping/merchant/reports/v1/reports_pb.rb", + "lib/google/shopping/merchant/reports/v1/reports_services_pb.rb", + "lib/google/shopping/merchant/reports/v1/rest.rb", + "lib/google/shopping/merchant/reports/v1/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/shopping/merchant/reports/v1/reports.rb", + "proto_docs/google/shopping/type/types.rb", + "proto_docs/google/type/date.rb", + "snippets/Gemfile", + "snippets/report_service/search.rb", + "snippets/snippet_metadata_google.shopping.merchant.reports.v1.json", + "test/google/shopping/merchant/reports/v1/report_service_rest_test.rb", + "test/google/shopping/merchant/reports/v1/report_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-shopping-merchant-reports-v1/.repo-metadata.json b/google-shopping-merchant-reports-v1/.repo-metadata.json new file mode 100644 index 000000000000..ddd4ab3ed6bb --- /dev/null +++ b/google-shopping-merchant-reports-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-reports-v1", + "distribution_name": "google-shopping-merchant-reports-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-reports-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/google-shopping-merchant-reports-v1/.rubocop.yml b/google-shopping-merchant-reports-v1/.rubocop.yml new file mode 100644 index 000000000000..1f311a84c068 --- /dev/null +++ b/google-shopping-merchant-reports-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-reports-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-reports-v1.rb" diff --git a/google-shopping-merchant-reports-v1/.toys.rb b/google-shopping-merchant-reports-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-shopping-merchant-reports-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-reports-v1/.yardopts b/google-shopping-merchant-reports-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/google-shopping-merchant-reports-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-shopping-merchant-reports-v1/AUTHENTICATION.md b/google-shopping-merchant-reports-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..e793e61f8914 --- /dev/null +++ b/google-shopping-merchant-reports-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-reports-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-reports-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/reports/v1" + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/reports/v1" + +::Google::Shopping::Merchant::Reports::V1::ReportService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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-shopping-merchant-reports-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/reports/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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/google-shopping-merchant-reports-v1/CHANGELOG.md b/google-shopping-merchant-reports-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-shopping-merchant-reports-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-shopping-merchant-reports-v1/Gemfile b/google-shopping-merchant-reports-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-shopping-merchant-reports-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-shopping-merchant-reports-v1/LICENSE.md b/google-shopping-merchant-reports-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-shopping-merchant-reports-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-shopping-merchant-reports-v1/README.md b/google-shopping-merchant-reports-v1/README.md new file mode 100644 index 000000000000..e7ebc0e8d197 --- /dev/null +++ b/google-shopping-merchant-reports-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-reports](https://rubygems.org/gems/google-shopping-merchant-reports). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-reports-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/reports/v1" + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new +request = ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new # (request fields as keyword arguments...) +response = client.search request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reports-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/reports/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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-shopping-merchant-reports`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-reports-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-reports`. +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-shopping-merchant-reports-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-shopping-merchant-reports-v1/Rakefile b/google-shopping-merchant-reports-v1/Rakefile new file mode 100644 index 000000000000..d70463f645c3 --- /dev/null +++ b/google-shopping-merchant-reports-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-reports-v1 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/shopping/merchant/reports/v1/report_service/credentials" + ::Google::Shopping::Merchant::Reports::V1::ReportService::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-shopping-merchant-reports-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-reports-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-reports-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-reports-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-reports-v1" + header "google-shopping-merchant-reports-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-reports-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-reports-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-reports-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-reports-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-shopping-merchant-reports-v1/gapic_metadata.json b/google-shopping-merchant-reports-v1/gapic_metadata.json new file mode 100644 index 000000000000..d3bc0f3e8851 --- /dev/null +++ b/google-shopping-merchant-reports-v1/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.reports.v1", + "libraryPackage": "::Google::Shopping::Merchant::Reports::V1", + "services": { + "ReportService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client", + "rpcs": { + "Search": { + "methods": [ + "search" + ] + } + } + } + } + } + } +} diff --git a/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec b/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec new file mode 100644 index 000000000000..1b54ee3f5f89 --- /dev/null +++ b/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/reports/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-reports-v1" + gem.version = Google::Shopping::Merchant::Reports::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-reports-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb b/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb new file mode 100644 index 000000000000..f4d340b5c4d4 --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1" diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb new file mode 100644 index 000000000000..f68956aa290f --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/report_service" +require "google/shopping/merchant/reports/v1/version" + +module Google + module Shopping + module Merchant + module Reports + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/reports/v1" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/reports/v1" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/reports/v1/_helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb new file mode 100644 index 000000000000..a844a34ef579 --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/version" + +require "google/shopping/merchant/reports/v1/report_service/credentials" +require "google/shopping/merchant/reports/v1/report_service/client" +require "google/shopping/merchant/reports/v1/report_service/rest" + +module Google + module Shopping + module Merchant + module Reports + module V1 + ## + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/reports/v1/report_service" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/reports/v1/report_service/rest" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + module ReportService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "report_service", "helpers.rb" +require "google/shopping/merchant/reports/v1/report_service/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb new file mode 100644 index 000000000000..cddebf35000b --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb @@ -0,0 +1,487 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/reports_pb" + +module Google + module Shopping + module Merchant + module Reports + module V1 + module ReportService + ## + # Client for the ReportService service. + # + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :report_service_stub + + ## + # Configure the ReportService Client class. + # + # See {::Google::Shopping::Merchant::Reports::V1::ReportService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReportService clients + # ::Google::Shopping::Merchant::Reports::V1::ReportService::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", "Shopping", "Merchant", "Reports", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ReportService 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::Shopping::Merchant::Reports::V1::ReportService::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 + @report_service_stub.universe_domain + end + + ## + # Create a new ReportService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReportService 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/shopping/merchant/reports/v1/reports_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 + + @report_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Reports::V1::ReportService::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 + ) + + @report_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 + @report_service_stub.logger + end + + # Service calls + + ## + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + # + # @overload search(request, options = nil) + # Pass arguments to `search` via a request object, either of type + # {::Google::Shopping::Merchant::Reports::V1::SearchRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::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 search(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search` 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. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @param query [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the [Query Language + # guide](/merchant/api/guides/reports/query-language). For the full list of + # available tables and fields, see the [Available + # fields](/merchant/api/reference/rest/reports_v1/accounts.reports). + # @param page_size [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 5000 are coerced to 5000. + # @param page_token [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reports/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new + # + # # Call the search method. + # result = client.search 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::Shopping::Merchant::Reports::V1::ReportRow. + # p item + # end + # + def search request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1::SearchRequest + + # 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.search.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::Shopping::Merchant::Reports::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @report_service_stub.call_rpc :search, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @report_service_stub, :search, 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 ReportService API. + # + # This class represents the configuration for ReportService, + # 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::Shopping::Merchant::Reports::V1::ReportService::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 + # # search to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "merchantapi.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 ReportService 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 `search` + # @return [::Gapic::Config::Method] + # + attr_reader :search + + # @private + def initialize parent_rpcs = nil + search_config = parent_rpcs.search if parent_rpcs.respond_to? :search + @search = ::Gapic::Config::Method.new search_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb new file mode 100644 index 000000000000..ad267483c398 --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Reports + module V1 + module ReportService + # Credentials for the ReportService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb new file mode 100644 index 000000000000..633c7aa46095 --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/version" + +require "google/shopping/merchant/reports/v1/report_service/credentials" +require "google/shopping/merchant/reports/v1/report_service/rest/client" + +module Google + module Shopping + module Merchant + module Reports + module V1 + ## + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/reports/v1/report_service/rest" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + module ReportService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/reports/v1/report_service/rest/helpers" if ::File.file? helper_path diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb new file mode 100644 index 000000000000..a560ae580509 --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb @@ -0,0 +1,454 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/reports_pb" +require "google/shopping/merchant/reports/v1/report_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Reports + module V1 + module ReportService + module Rest + ## + # REST client for the ReportService service. + # + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :report_service_stub + + ## + # Configure the ReportService Client class. + # + # See {::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReportService clients + # ::Google::Shopping::Merchant::Reports::V1::ReportService::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", "Shopping", "Merchant", "Reports", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.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 ReportService 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::Shopping::Merchant::Reports::V1::ReportService::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 + @report_service_stub.universe_domain + end + + ## + # Create a new ReportService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReportService 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 + + @report_service_stub = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @report_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 + @report_service_stub.logger + end + + # Service calls + + ## + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + # + # @overload search(request, options = nil) + # Pass arguments to `search` via a request object, either of type + # {::Google::Shopping::Merchant::Reports::V1::SearchRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::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 search(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search` 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. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @param query [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the [Query Language + # guide](/merchant/api/guides/reports/query-language). For the full list of + # available tables and fields, see the [Available + # fields](/merchant/api/reference/rest/reports_v1/accounts.reports). + # @param page_size [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 5000 are coerced to 5000. + # @param page_token [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reports/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new + # + # # Call the search method. + # result = client.search 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::Shopping::Merchant::Reports::V1::ReportRow. + # p item + # end + # + def search request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1::SearchRequest + + # 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.search.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::Shopping::Merchant::Reports::V1::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.search.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @report_service_stub.search request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @report_service_stub, :search, "results", 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 ReportService REST API. + # + # This class represents the configuration for ReportService 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::Shopping::Merchant::Reports::V1::ReportService::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 + # # search to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search.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 = "merchantapi.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 ReportService 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 `search` + # @return [::Gapic::Config::Method] + # + attr_reader :search + + # @private + def initialize parent_rpcs = nil + search_config = parent_rpcs.search if parent_rpcs.respond_to? :search + @search = ::Gapic::Config::Method.new search_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb new file mode 100644 index 000000000000..774675d5616e --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/reports_pb" + +module Google + module Shopping + module Merchant + module Reports + module V1 + module ReportService + module Rest + ## + # REST service stub for the ReportService 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: true, + 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 search REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reports::V1::SearchRequest] + # 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::Shopping::Merchant::Reports::V1::SearchResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reports::V1::SearchResponse] + # A result object deserialized from the server's reply + def search request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_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: "search", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.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 search REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reports::V1::SearchRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/reports/v1/{parent}/reports:search", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb new file mode 100644 index 000000000000..b7738010705c --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/reports/v1/reports.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' +require 'google/type/date_pb' + + +descriptor_data = "\n1google/shopping/merchant/reports/v1/reports.proto\x12#google.shopping.merchant.reports.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x16google/type/date.proto\"i\n\rSearchRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\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\"j\n\x0eSearchResponse\x12?\n\x07results\x18\x01 \x03(\x0b\x32..google.shopping.merchant.reports.v1.ReportRow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x08\n\tReportRow\x12]\n\x18product_performance_view\x18\x01 \x01(\x0b\x32;.google.shopping.merchant.reports.v1.ProductPerformanceView\x12\x64\n\x1cnon_product_performance_view\x18\x07 \x01(\x0b\x32>.google.shopping.merchant.reports.v1.NonProductPerformanceView\x12\x46\n\x0cproduct_view\x18\x02 \x01(\x0b\x32\x30.google.shopping.merchant.reports.v1.ProductView\x12p\n\"price_competitiveness_product_view\x18\x03 \x01(\x0b\x32\x44.google.shopping.merchant.reports.v1.PriceCompetitivenessProductView\x12\x62\n\x1bprice_insights_product_view\x18\x04 \x01(\x0b\x32=.google.shopping.merchant.reports.v1.PriceInsightsProductView\x12m\n!best_sellers_product_cluster_view\x18\x05 \x01(\x0b\x32\x42.google.shopping.merchant.reports.v1.BestSellersProductClusterView\x12Z\n\x17\x62\x65st_sellers_brand_view\x18\x06 \x01(\x0b\x32\x39.google.shopping.merchant.reports.v1.BestSellersBrandView\x12x\n&competitive_visibility_competitor_view\x18\x08 \x01(\x0b\x32H.google.shopping.merchant.reports.v1.CompetitiveVisibilityCompetitorView\x12{\n(competitive_visibility_top_merchant_view\x18\t \x01(\x0b\x32I.google.shopping.merchant.reports.v1.CompetitiveVisibilityTopMerchantView\x12v\n%competitive_visibility_benchmark_view\x18\n \x01(\x0b\x32G.google.shopping.merchant.reports.v1.CompetitiveVisibilityBenchmarkView\"\xbd\n\n\x16ProductPerformanceView\x12g\n\x10marketing_method\x18\x01 \x01(\x0e\x32H.google.shopping.merchant.reports.v1.MarketingMethod.MarketingMethodEnumH\x00\x88\x01\x01\x12\x1f\n\x04\x64\x61te\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x03 \x01(\x0b\x32\x11.google.type.Date\x12\"\n\x15\x63ustomer_country_code\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08offer_id\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\r \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0e \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0f \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x10 \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x11 \x01(\tH\x0e\x88\x01\x01\x12\x1a\n\rcustom_label0\x18\x12 \x01(\tH\x0f\x88\x01\x01\x12\x1a\n\rcustom_label1\x18\x13 \x01(\tH\x10\x88\x01\x01\x12\x1a\n\rcustom_label2\x18\x14 \x01(\tH\x11\x88\x01\x01\x12\x1a\n\rcustom_label3\x18\x15 \x01(\tH\x12\x88\x01\x01\x12\x1a\n\rcustom_label4\x18\x16 \x01(\tH\x13\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x17 \x01(\x03H\x14\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x18 \x01(\x03H\x15\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x19 \x01(\x01H\x16\x88\x01\x01\x12\x18\n\x0b\x63onversions\x18\x1a \x01(\x01H\x17\x88\x01\x01\x12\x35\n\x10\x63onversion_value\x18\x1b \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1c\n\x0f\x63onversion_rate\x18\x1c \x01(\x01H\x18\x88\x01\x01\x42\x13\n\x11_marketing_methodB\x18\n\x16_customer_country_codeB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x10\n\x0e_custom_label0B\x10\n\x0e_custom_label1B\x10\n\x0e_custom_label2B\x10\n\x0e_custom_label3B\x10\n\x0e_custom_label4B\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rateB\x0e\n\x0c_conversionsB\x12\n\x10_conversion_rate\"\xa2\x17\n\x0bProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12?\n\x07\x63hannel\x18\x1c \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumH\x01\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nfeed_label\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08offer_id\x18\x04 \x01(\tH\x04\x88\x01\x01\x12\x12\n\x05title\x18\x05 \x01(\tH\x05\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x07 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x08 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\t \x01(\tH\t\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\n \x01(\tH\n\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0b \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0c \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\r \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0e \x01(\tH\x0e\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0f \x01(\tH\x0f\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x10 \x01(\tH\x10\x88\x01\x01\x12*\n\x05price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x16\n\tcondition\x18\x12 \x01(\tH\x11\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\x12\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x14 \x01(\tH\x13\x88\x01\x01\x12\x0c\n\x04gtin\x18\x15 \x03(\t\x12\x1a\n\ritem_group_id\x18\x16 \x01(\tH\x14\x88\x01\x01\x12\x1b\n\x0ethumbnail_link\x18\x17 \x01(\tH\x15\x88\x01\x01\x12\x31\n\rcreation_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x0f\x65xpiration_date\x18\x19 \x01(\x0b\x32\x11.google.type.Date\x12\x83\x01\n#aggregated_reporting_context_status\x18\x1a \x01(\x0e\x32Q.google.shopping.merchant.reports.v1.ProductView.AggregatedReportingContextStatusH\x16\x88\x01\x01\x12O\n\x0bitem_issues\x18\x1b \x03(\x0b\x32:.google.shopping.merchant.reports.v1.ProductView.ItemIssue\x12X\n\x0f\x63lick_potential\x18\x1d \x01(\x0e\x32?.google.shopping.merchant.reports.v1.ProductView.ClickPotential\x12!\n\x14\x63lick_potential_rank\x18\x1e \x01(\x03H\x17\x88\x01\x01\x1a\x9f\t\n\tItemIssue\x12V\n\x04type\x18\x01 \x01(\x0b\x32H.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueType\x12^\n\x08severity\x18\x02 \x01(\x0b\x32L.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity\x12g\n\nresolution\x18\x03 \x01(\x0e\x32N.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueResolutionH\x00\x88\x01\x01\x1a\x65\n\rItemIssueType\x12\x11\n\x04\x63ode\x18\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x13\x63\x61nonical_attribute\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\x16\n\x14_canonical_attribute\x1a\x8f\x05\n\x11ItemIssueSeverity\x12\x95\x01\n\x1eseverity_per_reporting_context\x18\x01 \x03(\x0b\x32m.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext\x12\x86\x01\n\x13\x61ggregated_severity\x18\x02 \x01(\x0e\x32\x64.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverityH\x00\x88\x01\x01\x1a\xcf\x01\n IssueSeverityPerReportingContext\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x1d\n\x15\x64isapproved_countries\x18\x02 \x03(\t\x12\x19\n\x11\x64\x65moted_countries\x18\x03 \x03(\tB\x14\n\x12_reporting_context\"o\n\x17\x41ggregatedIssueSeverity\x12)\n%AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44ISAPPROVED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\x42\x16\n\x14_aggregated_severity\"i\n\x13ItemIssueResolution\x12%\n!ITEM_ISSUE_RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02\x42\r\n\x0b_resolution\"\xa9\x01\n AggregatedReportingContextStatus\x12\x33\n/AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED\x10\x00\x12\x1f\n\x1bNOT_ELIGIBLE_OR_DISAPPROVED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x14\n\x10\x45LIGIBLE_LIMITED\x10\x03\x12\x0c\n\x08\x45LIGIBLE\x10\x04\"P\n\x0e\x43lickPotential\x12\x1f\n\x1b\x43LICK_POTENTIAL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\n\n\x08_channelB\x10\n\x0e_language_codeB\r\n\x0b_feed_labelB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x0c\n\n_conditionB\x0f\n\r_availabilityB\x11\n\x0f_shipping_labelB\x10\n\x0e_item_group_idB\x11\n\x0f_thumbnail_linkB&\n$_aggregated_reporting_context_statusB\x17\n\x15_click_potential_rank\"\x81\x06\n\x1fPriceCompetitivenessProductView\x12 \n\x13report_country_code\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08offer_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05title\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\t \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0e \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0f \x01(\tH\x0e\x88\x01\x01\x12*\n\x05price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0f\x62\x65nchmark_price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x16\n\x14_report_country_codeB\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5\"\x83\t\n\x18PriceInsightsProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08offer_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\t \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0e \x01(\tH\r\x88\x01\x01\x12*\n\x05price\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0fsuggested_price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x32\n%predicted_impressions_change_fraction\x18\x11 \x01(\x01H\x0e\x88\x01\x01\x12-\n predicted_clicks_change_fraction\x18\x12 \x01(\x01H\x0f\x88\x01\x01\x12\x32\n%predicted_conversions_change_fraction\x18\x13 \x01(\x01H\x10\x88\x01\x01\x12\x62\n\reffectiveness\x18\x16 \x01(\x0e\x32K.google.shopping.merchant.reports.v1.PriceInsightsProductView.Effectiveness\"M\n\rEffectiveness\x12\x1d\n\x19\x45\x46\x46\x45\x43TIVENESS_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B(\n&_predicted_impressions_change_fractionB#\n!_predicted_clicks_change_fractionB(\n&_predicted_conversions_change_fraction\"\xd7\x0b\n\x1d\x42\x65stSellersProductClusterView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12m\n\x12report_granularity\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\t\x88\x01\x01\x12\x15\n\rvariant_gtins\x18\r \x03(\t\x12q\n\x10inventory_status\x18\x0e \x01(\x0e\x32R.google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatusH\n\x88\x01\x01\x12w\n\x16\x62rand_inventory_status\x18\x0f \x01(\x0e\x32R.google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatusH\x0b\x88\x01\x01\x12\x11\n\x04rank\x18\x10 \x01(\x03H\x0c\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x11 \x01(\x03H\r\x88\x01\x01\x12\x64\n\x0frelative_demand\x18\x12 \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x0e\x88\x01\x01\x12m\n\x18previous_relative_demand\x18\x13 \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x0f\x88\x01\x01\x12\x7f\n\x16relative_demand_change\x18\x14 \x01(\x0e\x32Z.google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x10\x88\x01\x01\"i\n\x0fInventoryStatus\x12 \n\x1cINVENTORY_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x12\x14\n\x10NOT_IN_INVENTORY\x10\x03\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x13\n\x11_inventory_statusB\x19\n\x17_brand_inventory_statusB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xc0\x06\n\x14\x42\x65stSellersBrandView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12m\n\x12report_granularity\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x04\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x08 \x01(\x03H\x05\x88\x01\x01\x12\x64\n\x0frelative_demand\x18\t \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x06\x88\x01\x01\x12m\n\x18previous_relative_demand\x18\n \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x07\x88\x01\x01\x12\x7f\n\x16relative_demand_change\x18\x0b \x01(\x0e\x32Z.google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x08\x88\x01\x01\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_brandB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xdf\x01\n\x19NonProductPerformanceView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x63licks\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x04 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x05 \x01(\x01H\x02\x88\x01\x01\x42\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rate\"\xfc\x04\n#CompetitiveVisibilityCompetitorView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x06 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x12 \n\x13relative_visibility\x18\x0b \x01(\x01H\t\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rateB\x16\n\x14_relative_visibility\"\xc3\x04\n$CompetitiveVisibilityTopMerchantView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x06 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rate\"\xd3\x03\n\"CompetitiveVisibilityBenchmarkView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12 \n\x13report_country_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x04 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x02\x88\x01\x01\x12)\n\x1cyour_domain_visibility_trend\x18\x05 \x01(\x01H\x03\x88\x01\x01\x12\x30\n#category_benchmark_visibility_trend\x18\x06 \x01(\x01H\x04\x88\x01\x01\x42\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x1f\n\x1d_your_domain_visibility_trendB&\n$_category_benchmark_visibility_trend\"e\n\x0fMarketingMethod\"R\n\x13MarketingMethodEnum\x12%\n!MARKETING_METHOD_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\"n\n\x11ReportGranularity\"Y\n\x15ReportGranularityEnum\x12\'\n#REPORT_GRANULARITY_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06WEEKLY\x10\x01\x12\x0b\n\x07MONTHLY\x10\x02\"\x88\x01\n\x0eRelativeDemand\"v\n\x12RelativeDemandEnum\x12$\n RELATIVE_DEMAND_ENUM_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERY_LOW\x10\n\x12\x07\n\x03LOW\x10\x14\x12\n\n\x06MEDIUM\x10\x1e\x12\x08\n\x04HIGH\x10(\x12\r\n\tVERY_HIGH\x10\x32\"\x8d\x01\n\x18RelativeDemandChangeType\"q\n\x1cRelativeDemandChangeTypeEnum\x12\x30\n,RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06SINKER\x10\x01\x12\x08\n\x04\x46LAT\x10\x02\x12\t\n\x05RISER\x10\x03\"h\n\rTrafficSource\"W\n\x11TrafficSourceEnum\x12#\n\x1fTRAFFIC_SOURCE_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\x12\x07\n\x03\x41LL\x10\x03\x32\x90\x02\n\rReportService\x12\xb5\x01\n\x06Search\x12\x32.google.shopping.merchant.reports.v1.SearchRequest\x1a\x33.google.shopping.merchant.reports.v1.SearchResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\"./reports/v1/{parent=accounts/*}/reports:search:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xf8\x01\n\'com.google.shopping.merchant.reports.v1B\x0cReportsProtoP\x01ZGcloud.google.com/go/shopping/merchant/reports/apiv1/reportspb;reportspb\xaa\x02#Google.Shopping.Merchant.Reports.V1\xca\x02#Google\\Shopping\\Merchant\\Reports\\V1\xea\x02\'Google::Shopping::Merchant::Reports::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.Date", "google/type/date.proto"], + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Reports + module V1 + SearchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.SearchRequest").msgclass + SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.SearchResponse").msgclass + ReportRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportRow").msgclass + ProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductPerformanceView").msgclass + ProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView").msgclass + ProductView::ItemIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue").msgclass + ProductView::ItemIssue::ItemIssueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueType").msgclass + ProductView::ItemIssue::ItemIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity").msgclass + ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext").msgclass + ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverity").enummodule + ProductView::ItemIssue::ItemIssueResolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueResolution").enummodule + ProductView::AggregatedReportingContextStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.AggregatedReportingContextStatus").enummodule + ProductView::ClickPotential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ClickPotential").enummodule + PriceCompetitivenessProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceCompetitivenessProductView").msgclass + PriceInsightsProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceInsightsProductView").msgclass + PriceInsightsProductView::Effectiveness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceInsightsProductView.Effectiveness").enummodule + BestSellersProductClusterView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersProductClusterView").msgclass + BestSellersProductClusterView::InventoryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatus").enummodule + BestSellersBrandView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersBrandView").msgclass + NonProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.NonProductPerformanceView").msgclass + CompetitiveVisibilityCompetitorView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityCompetitorView").msgclass + CompetitiveVisibilityTopMerchantView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityTopMerchantView").msgclass + CompetitiveVisibilityBenchmarkView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityBenchmarkView").msgclass + MarketingMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.MarketingMethod").msgclass + MarketingMethod::MarketingMethodEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.MarketingMethod.MarketingMethodEnum").enummodule + ReportGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportGranularity").msgclass + ReportGranularity::ReportGranularityEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnum").enummodule + RelativeDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemand").msgclass + RelativeDemand::RelativeDemandEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnum").enummodule + RelativeDemandChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemandChangeType").msgclass + RelativeDemandChangeType::RelativeDemandChangeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnum").enummodule + TrafficSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.TrafficSource").msgclass + TrafficSource::TrafficSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnum").enummodule + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb new file mode 100644 index 000000000000..c00c192cbb54 --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/reports/v1/reports.proto for package 'Google.Shopping.Merchant.Reports.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/reports_pb' + +module Google + module Shopping + module Merchant + module Reports + module V1 + module ReportService + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.reports.v1.ReportService' + + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + rpc :Search, ::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::Google::Shopping::Merchant::Reports::V1::SearchResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb new file mode 100644 index 000000000000..a00d66112047 --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/report_service/rest" +require "google/shopping/merchant/reports/v1/version" + +module Google + module Shopping + module Merchant + module Reports + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/reports/v1/rest" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb new file mode 100644 index 000000000000..24f171733a67 --- /dev/null +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Reports + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/proto_docs/README.md b/google-shopping-merchant-reports-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb b/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb new file mode 100644 index 000000000000..33d7855b2199 --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb @@ -0,0 +1,1292 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Merchant + module Reports + module V1 + # Request message for the `ReportService.Search` method. + # @!attribute [rw] parent + # @return [::String] + # Required. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @!attribute [rw] query + # @return [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the [Query Language + # guide](/merchant/api/guides/reports/query-language). For the full list of + # available tables and fields, see the [Available + # fields](/merchant/api/reference/rest/reports_v1/accounts.reports). + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 5000 are coerced to 5000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + class SearchRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ReportService.Search` method. + # @!attribute [rw] results + # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # Rows that matched the search query. + # @!attribute [rw] next_page_token + # @return [::String] + # Token which can be sent as `page_token` to retrieve the next page. If + # omitted, there are no subsequent pages. + class SearchResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result row returned from the search query. + # + # Only the message corresponding to the queried table is populated in the + # response. Within the populated message, only the fields requested explicitly + # in the query are populated. + # @!attribute [rw] product_performance_view + # @return [::Google::Shopping::Merchant::Reports::V1::ProductPerformanceView] + # Fields available for query in `product_performance_view` table. + # @!attribute [rw] non_product_performance_view + # @return [::Google::Shopping::Merchant::Reports::V1::NonProductPerformanceView] + # Fields available for query in `non_product_performance_view` table. + # @!attribute [rw] product_view + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView] + # Fields available for query in `product_view` table. + # @!attribute [rw] price_competitiveness_product_view + # @return [::Google::Shopping::Merchant::Reports::V1::PriceCompetitivenessProductView] + # Fields available for query in `price_competitiveness_product_view` table. + # @!attribute [rw] price_insights_product_view + # @return [::Google::Shopping::Merchant::Reports::V1::PriceInsightsProductView] + # Fields available for query in `price_insights_product_view` table. + # @!attribute [rw] best_sellers_product_cluster_view + # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView] + # Fields available for query in `best_sellers_product_cluster_view` table. + # @!attribute [rw] best_sellers_brand_view + # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersBrandView] + # Fields available for query in `best_sellers_brand_view` table. + # @!attribute [rw] competitive_visibility_competitor_view + # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityCompetitorView] + # Fields available for query in `competitive_visibility_competitor_view` + # table. + # @!attribute [rw] competitive_visibility_top_merchant_view + # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityTopMerchantView] + # Fields available for query in `competitive_visibility_top_merchant_view` + # table. + # @!attribute [rw] competitive_visibility_benchmark_view + # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityBenchmarkView] + # Fields available for query in `competitive_visibility_benchmark_view` + # table. + class ReportRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `product_performance_view` table. + # + # Product performance data for your account, including performance metrics (for + # example, `clicks`) and dimensions according to which performance metrics are + # segmented (for example, `offer_id`). Values of product dimensions, such as + # `offer_id`, reflect the state of a product at the time of the impression. + # + # Segment fields cannot be selected in queries without also selecting at least + # one metric field. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] marketing_method + # @return [::Google::Shopping::Merchant::Reports::V1::MarketingMethod::MarketingMethodEnum] + # Marketing method to which metrics apply. Segment. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date in the merchant timezone to which metrics apply. Segment. + # + # Condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] week + # @return [::Google::Type::Date] + # First day of the week (Monday) of the metrics date in the merchant + # timezone. Segment. + # @!attribute [rw] customer_country_code + # @return [::String] + # Code of the country where the customer is located at the time of the event. + # Represented in the ISO 3166 format. Segment. + # + # If the customer country cannot be determined, a special 'ZZ' code is + # returned. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. Segment. + # @!attribute [rw] title + # @return [::String] + # Title of the product. Segment. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. Segment. + # @!attribute [rw] category_l1 + # @return [::String] + # [Product category (1st + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l2 + # @return [::String] + # [Product category (2nd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l3 + # @return [::String] + # [Product category (3rd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l4 + # @return [::String] + # [Product category (4th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l5 + # @return [::String] + # [Product category (5th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] product_type_l1 + # @return [::String] + # [Product type (1st + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l2 + # @return [::String] + # [Product type (2nd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l3 + # @return [::String] + # [Product type (3rd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l4 + # @return [::String] + # [Product type (4th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l5 + # @return [::String] + # [Product type (5th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] custom_label0 + # @return [::String] + # Custom label 0 for custom grouping of products. Segment. + # @!attribute [rw] custom_label1 + # @return [::String] + # Custom label 1 for custom grouping of products. Segment. + # @!attribute [rw] custom_label2 + # @return [::String] + # Custom label 2 for custom grouping of products. Segment. + # @!attribute [rw] custom_label3 + # @return [::String] + # Custom label 3 for custom grouping of products. Segment. + # @!attribute [rw] custom_label4 + # @return [::String] + # Custom label 4 for custom grouping of products. Segment. + # @!attribute [rw] clicks + # @return [::Integer] + # Number of clicks. Metric. + # @!attribute [rw] impressions + # @return [::Integer] + # Number of times merchant's products are shown. Metric. + # @!attribute [rw] click_through_rate + # @return [::Float] + # Click-through rate - the number of clicks merchant's products receive + # (clicks) divided by the number of times the products are shown + # (impressions). Metric. + # @!attribute [rw] conversions + # @return [::Float] + # Number of conversions attributed to the product, reported on the conversion + # date. Depending on the attribution model, a conversion might be distributed + # across multiple clicks, where each click gets its own credit assigned. This + # metric is a sum of all such credits. Metric. + # + # Available only for the `FREE` traffic source. + # @!attribute [rw] conversion_value + # @return [::Google::Shopping::Type::Price] + # Value of conversions attributed to the product, reported on the conversion + # date. Metric. + # + # Available only for the `FREE` traffic source. + # @!attribute [rw] conversion_rate + # @return [::Float] + # Number of conversions divided by the number of clicks, reported on the + # impression date. Metric. + # + # Available only for the `FREE` traffic source. + class ProductPerformanceView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `product_view` table. + # + # Products in the current inventory. Products in this table are the same as in + # Products sub-API but not all product attributes from Products sub-API are + # available for query in this table. In contrast to Products sub-API, this + # table allows to filter the returned list of products by product attributes. + # To retrieve a single product by `id` or list all products, Products sub-API + # should be used. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate + # on products take this as their `name` parameter. + # + # Required in the `SELECT` clause. + # @!attribute [rw] channel + # @return [::Google::Shopping::Type::Channel::ChannelEnum] + # Channel of the product. Can be `ONLINE` or `LOCAL`. + # @!attribute [rw] language_code + # @return [::String] + # Language code of the product in BCP 47 format. + # @!attribute [rw] feed_label + # @return [::String] + # Feed label of the product. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Product price. Absent if the information about the price of the product is + # not available. + # @!attribute [rw] condition + # @return [::String] + # [Condition](https://support.google.com/merchants/answer/6324469) of the + # product. + # @!attribute [rw] availability + # @return [::String] + # [Availability](https://support.google.com/merchants/answer/6324448) of the + # product. + # @!attribute [rw] shipping_label + # @return [::String] + # Normalized [shipping + # label](https://support.google.com/merchants/answer/6324504) specified in + # the data source. + # @!attribute [rw] gtin + # @return [::Array<::String>] + # List of Global Trade Item Numbers (GTINs) of the product. + # @!attribute [rw] item_group_id + # @return [::String] + # Item group id provided by the merchant for grouping variants together. + # @!attribute [rw] thumbnail_link + # @return [::String] + # Link to the processed image of the product, hosted on the Google + # infrastructure. + # @!attribute [rw] creation_time + # @return [::Google::Protobuf::Timestamp] + # The time the merchant created the product in timestamp seconds. + # @!attribute [rw] expiration_date + # @return [::Google::Type::Date] + # Expiration date for the product, specified on insertion. + # @!attribute [rw] aggregated_reporting_context_status + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::AggregatedReportingContextStatus] + # Aggregated status. + # @!attribute [rw] item_issues + # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue>] + # List of item issues for the product. + # + # **This field cannot be used for sorting the results.** + # + # **Only selected attributes of this field (for example, + # `item_issues.severity.aggregated_severity`) can be used for filtering the + # results.** + # @!attribute [rw] click_potential + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ClickPotential] + # Estimated performance potential compared to highest performing products of + # the merchant. + # @!attribute [rw] click_potential_rank + # @return [::Integer] + # Rank of the product based on its click potential. A product with + # `click_potential_rank` 1 has the highest click potential among the + # merchant's products that fulfill the search query conditions. + class ProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Item issue associated with the product. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueType] + # Item issue type. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity] + # Item issue severity. + # @!attribute [rw] resolution + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueResolution] + # Item issue resolution. + class ItemIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Issue type. + # @!attribute [rw] code + # @return [::String] + # Error code of the issue, equivalent to the `code` of [Product + # issues](https://developers.google.com/shopping-content/guides/product-issues). + # @!attribute [rw] canonical_attribute + # @return [::String] + # Canonical attribute name for attribute-specific issues. + class ItemIssueType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How the issue affects the serving of the product. + # @!attribute [rw] severity_per_reporting_context + # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext>] + # Issue severity per reporting context. + # @!attribute [rw] aggregated_severity + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity] + # Aggregated severity of the issue for all reporting contexts it affects. + # + # **This field can be used for filtering the results.** + class ItemIssueSeverity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Issue severity per reporting context. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Reporting context the issue applies to. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of disapproved countries in the reporting context, represented + # in ISO 3166 format. + # @!attribute [rw] demoted_countries + # @return [::Array<::String>] + # List of demoted countries in the reporting context, represented in + # ISO 3166 format. + class IssueSeverityPerReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Issue severity aggregated for all reporting contexts. + module AggregatedIssueSeverity + # Not specified. + AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED = 0 + + # Issue disapproves the product in at least one reporting context. + DISAPPROVED = 1 + + # Issue demotes the product in all reporting contexts it affects. + DEMOTED = 2 + + # Issue resolution is `PENDING_PROCESSING`. + PENDING = 3 + end + end + + # How to resolve the issue. + module ItemIssueResolution + # Not specified. + ITEM_ISSUE_RESOLUTION_UNSPECIFIED = 0 + + # The merchant has to fix the issue. + MERCHANT_ACTION = 1 + + # The issue will be resolved automatically (for example, image crawl) or + # through a Google review. No merchant action is required now. Resolution + # might lead to another issue (for example, if crawl fails). + PENDING_PROCESSING = 2 + end + end + + # Status of the product aggregated for all reporting contexts. + # + # Here's an example of how the aggregated status is computed: + # + # Free listings | Shopping ads | Status + # --------------|--------------|------------------------------ + # Approved | Approved | ELIGIBLE + # Approved | Pending | ELIGIBLE + # Approved | Disapproved | ELIGIBLE_LIMITED + # Pending | Pending | PENDING + # Disapproved | Disapproved | NOT_ELIGIBLE_OR_DISAPPROVED + module AggregatedReportingContextStatus + # Not specified. + AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0 + + # Product is not eligible or is disapproved for all reporting contexts. + NOT_ELIGIBLE_OR_DISAPPROVED = 1 + + # Product's status is pending in all reporting contexts. + PENDING = 2 + + # Product is eligible for some (but not all) reporting contexts. + ELIGIBLE_LIMITED = 3 + + # Product is eligible for all reporting contexts. + ELIGIBLE = 4 + end + + # A product's [click + # potential](https://support.google.com/merchants/answer/188488) estimates + # its performance potential compared to highest performing products of the + # merchant. Click potential of a product helps merchants to prioritize which + # products to fix and helps them understand how products are performing + # against their potential. + module ClickPotential + # Unknown predicted clicks impact. + CLICK_POTENTIAL_UNSPECIFIED = 0 + + # Potential to receive a low number of clicks compared to the highest + # performing products of the merchant. + LOW = 1 + + # Potential to receive a moderate number of clicks compared to the highest + # performing products of the merchant. + MEDIUM = 2 + + # Potential to receive a similar number of clicks as the highest performing + # products of the merchant. + HIGH = 3 + end + end + + # Fields available for query in `price_competitiveness_product_view` table. + # + # [Price competitiveness](https://support.google.com/merchants/answer/9626903) + # report. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_country_code + # @return [::String] + # Country of the price benchmark. Represented in the ISO 3166 format. + # + # Required in the `SELECT` clause. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the + # `product_view` table. + # + # Required in the `SELECT` clause. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Current price of the product. + # @!attribute [rw] benchmark_price + # @return [::Google::Shopping::Type::Price] + # Latest available price benchmark for the product's catalog in the benchmark + # country. + class PriceCompetitivenessProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `price_insights_product_view` table. + # + # [Price insights](https://support.google.com/merchants/answer/11916926) + # report. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the + # `product_view` table. + # + # Required in the `SELECT` clause. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Current price of the product. + # @!attribute [rw] suggested_price + # @return [::Google::Shopping::Type::Price] + # Latest suggested price for the product. + # @!attribute [rw] predicted_impressions_change_fraction + # @return [::Float] + # Predicted change in impressions as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in impressions. + # @!attribute [rw] predicted_clicks_change_fraction + # @return [::Float] + # Predicted change in clicks as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in clicks. + # @!attribute [rw] predicted_conversions_change_fraction + # @return [::Float] + # Predicted change in conversions as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in conversions). + # @!attribute [rw] effectiveness + # @return [::Google::Shopping::Merchant::Reports::V1::PriceInsightsProductView::Effectiveness] + # The predicted effectiveness of applying the price suggestion, bucketed. + class PriceInsightsProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Predicted effectiveness bucket. + # + # Effectiveness indicates which products would benefit most from price + # changes. This rating takes into consideration the performance boost + # predicted by adjusting the sale price and the difference between your + # current price and the suggested price. Price suggestions with `HIGH` + # effectiveness are predicted to drive the largest increase in performance. + module Effectiveness + # Effectiveness is unknown. + EFFECTIVENESS_UNSPECIFIED = 0 + + # Effectiveness is low. + LOW = 1 + + # Effectiveness is medium. + MEDIUM = 2 + + # Effectiveness is high. + HIGH = 3 + end + end + + # Fields available for query in `best_sellers_product_cluster_view` table. + # + # [Best sellers](https://support.google.com/merchants/answer/9488679) report + # with top product clusters. A product cluster is a grouping for different + # offers and variants that represent the same product, for example, Google + # Pixel 7. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_date + # @return [::Google::Type::Date] + # Report date. The value of this field can only be one of the following: + # + # * The first day of the week (Monday) for weekly reports, + # * The first day of the month for monthly reports. + # + # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is + # not specified in the query, the latest available weekly or monthly report + # is returned. + # @!attribute [rw] report_granularity + # @return [::Google::Shopping::Merchant::Reports::V1::ReportGranularity::ReportGranularityEnum] + # Granularity of the report. The ranking can be done over a week or a month + # timeframe. + # + # Required in the `SELECT` clause. Condition on `report_granularity` is + # required in the `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where the ranking is calculated. Represented in the ISO 3166 + # format. + # + # Required in the `SELECT` clause. Condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the ranking for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. If a `WHERE` condition on + # `report_category_id` is not specified in the query, rankings for all + # top-level categories are returned. + # @!attribute [rw] title + # @return [::String] + # Title of the product cluster. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product cluster. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] variant_gtins + # @return [::Array<::String>] + # GTINs of example variants of the product cluster. + # @!attribute [rw] inventory_status + # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView::InventoryStatus] + # Whether the product cluster is `IN_STOCK` in your product data source in at + # least one of the countries, `OUT_OF_STOCK` in your product data source in + # all countries, or `NOT_IN_INVENTORY` at all. + # + # The field doesn't take the Best sellers report country filter into account. + # @!attribute [rw] brand_inventory_status + # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView::InventoryStatus] + # Whether there is at least one product of the brand currently `IN_STOCK` in + # your product data source in at least one of the countries, all products are + # `OUT_OF_STOCK` in your product data source in all countries, or + # `NOT_IN_INVENTORY`. + # + # The field doesn't take the Best sellers report country filter into account. + # @!attribute [rw] rank + # @return [::Integer] + # Popularity of the product cluster on Ads and organic surfaces, in the + # selected category and country, based on the estimated number of units sold. + # @!attribute [rw] previous_rank + # @return [::Integer] + # Popularity rank in the previous week or month. + # @!attribute [rw] relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the product cluster with the highest + # popularity rank in the same category and country. + # @!attribute [rw] previous_relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the product cluster with the highest + # popularity rank in the same category and country in the previous week or + # month. + # @!attribute [rw] relative_demand_change + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] + # Change in the estimated demand. Whether it rose, sank or remained flat. + class BestSellersProductClusterView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Status of the product cluster or brand in your inventory. + module InventoryStatus + # Not specified. + INVENTORY_STATUS_UNSPECIFIED = 0 + + # You have a product for this product cluster or brand in stock. + IN_STOCK = 1 + + # You have a product for this product cluster or brand in inventory but it + # is currently out of stock. + OUT_OF_STOCK = 2 + + # You do not have a product for this product cluster or brand in inventory. + NOT_IN_INVENTORY = 3 + end + end + + # Fields available for query in `best_sellers_brand_view` table. + # + # [Best sellers](https://support.google.com/merchants/answer/9488679) report + # with top brands. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_date + # @return [::Google::Type::Date] + # Report date. The value of this field can only be one of the following: + # + # * The first day of the week (Monday) for weekly reports, + # * The first day of the month for monthly reports. + # + # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is + # not specified in the query, the latest available weekly or monthly report + # is returned. + # @!attribute [rw] report_granularity + # @return [::Google::Shopping::Merchant::Reports::V1::ReportGranularity::ReportGranularityEnum] + # Granularity of the report. The ranking can be done over a week or a month + # timeframe. + # + # Required in the `SELECT` clause. Condition on `report_granularity` is + # required in the `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where the ranking is calculated. Represented in the ISO 3166 + # format. + # + # Required in the `SELECT` clause. Condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the ranking for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. If a `WHERE` condition on + # `report_category_id` is not specified in the query, rankings for all + # top-level categories are returned. + # @!attribute [rw] brand + # @return [::String] + # Name of the brand. + # @!attribute [rw] rank + # @return [::Integer] + # Popularity of the brand on Ads and organic surfaces, in the selected + # category and country, based on the estimated number of units sold. + # @!attribute [rw] previous_rank + # @return [::Integer] + # Popularity rank in the previous week or month. + # @!attribute [rw] relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the brand with the highest popularity rank + # in the same category and country. + # @!attribute [rw] previous_relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the brand with the highest popularity rank + # in the same category and country in the previous week or month. + # @!attribute [rw] relative_demand_change + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] + # Change in the estimated demand. Whether it rose, sank or remained flat. + class BestSellersBrandView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `non_product_performance_view` table. + # + # Performance data on images and online store links leading to your non-product + # pages. This includes performance metrics (for example, `clicks`) + # and dimensions according to which performance metrics are segmented (for + # example, `date`). + # + # Segment fields cannot be selected in queries without also selecting at least + # one metric field. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date in the merchant timezone to which metrics apply. Segment. + # + # Condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] week + # @return [::Google::Type::Date] + # First day of the week (Monday) of the metrics date in the merchant + # timezone. Segment. + # @!attribute [rw] clicks + # @return [::Integer] + # Number of clicks on images and online store links leading to your + # non-product pages. Metric. + # @!attribute [rw] impressions + # @return [::Integer] + # Number of times images and online store links leading to your non-product + # pages were shown. Metric. + # @!attribute [rw] click_through_rate + # @return [::Float] + # Click-through rate - the number of clicks (`clicks`) divided by the number + # of impressions (`impressions`) of images and online store links leading to + # your non-product pages. Metric. + class NonProductPerformanceView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_competitor_view` table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # businesses with similar visibility. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # A condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] domain + # @return [::String] + # Domain of your competitor or your domain, if 'is_your_domain' is true. + # + # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' + # clause. + # @!attribute [rw] is_your_domain + # @return [::Boolean] + # True if this row contains data for your domain. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] rank + # @return [::Integer] + # Position of the domain in the similar businesses ranking for the selected + # keys (`date`, `report_category_id`, `report_country_code`, + # `traffic_source`) based on impressions. 1 is the highest. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] ads_organic_ratio + # @return [::Float] + # [Ads / organic ratio] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) + # shows how often the domain receives impressions from Shopping ads compared + # to organic traffic. The number is rounded and bucketed. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] page_overlap_rate + # @return [::Float] + # [Page overlap rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) + # shows how frequently competing retailers’ offers are shown together with + # your offers on the same page. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] higher_position_rate + # @return [::Float] + # [Higher position rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) + # shows how often a competitor’s offer got placed in a higher position on the + # page than your offer. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] relative_visibility + # @return [::Float] + # [Relative visibility] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Crelative-visibility) + # shows how often your competitors’ offers are shown compared to your offers. + # In other words, this is the number of displayed impressions of a competitor + # retailer divided by the number of your displayed impressions during a + # selected time range for a selected product category and country. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityCompetitorView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_top_merchant_view` + # table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # business with highest visibility. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # Cannot be selected in the `SELECT` clause. A condition on `date` is + # required in the `WHERE` clause. + # @!attribute [rw] domain + # @return [::String] + # Domain of your competitor or your domain, if 'is_your_domain' is true. + # + # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' + # clause. + # @!attribute [rw] is_your_domain + # @return [::Boolean] + # True if this row contains data for your domain. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] rank + # @return [::Integer] + # Position of the domain in the top merchants ranking for the selected keys + # (`date`, `report_category_id`, `report_country_code`, `traffic_source`) + # based on impressions. 1 is the highest. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] ads_organic_ratio + # @return [::Float] + # [Ads / organic ratio] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) + # shows how often the domain receives impressions from Shopping ads compared + # to organic traffic. The number is rounded and bucketed. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] page_overlap_rate + # @return [::Float] + # [Page overlap rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) + # shows how frequently competing retailers’ offers are shown together with + # your offers on the same page. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] higher_position_rate + # @return [::Float] + # [Higher position rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) + # shows how often a competitor’s offer got placed in a higher position on the + # page than your offer. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityTopMerchantView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_benchmark_view` table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # the category benchmark. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # Required in the `SELECT` clause. A condition on `date` is required in the + # `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] your_domain_visibility_trend + # @return [::Float] + # Change in visibility based on impressions for your domain with respect to + # the start of the selected time range (or first day with non-zero + # impressions). + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] category_benchmark_visibility_trend + # @return [::Float] + # Change in visibility based on impressions with respect to the start of the + # selected time range (or first day with non-zero impressions) for a + # combined set of merchants with highest visibility approximating the + # market. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityBenchmarkView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Marketing method used to promote your products on Google (organic versus + # ads). + class MarketingMethod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Marketing method values. + module MarketingMethodEnum + # Not specified. + MARKETING_METHOD_ENUM_UNSPECIFIED = 0 + + # Organic marketing. + ORGANIC = 1 + + # Ads-based marketing. + ADS = 2 + end + end + + # Granularity of the Best sellers report. Best sellers reports are computed + # over a week and a month timeframe. + class ReportGranularity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Report granularity values. + module ReportGranularityEnum + # Not specified. + REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0 + + # Report is computed over a week timeframe. + WEEKLY = 1 + + # Report is computed over a month timeframe. + MONTHLY = 2 + end + end + + # Relative demand of a product cluster or brand in the Best sellers report. + class RelativeDemand + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Relative demand values. + module RelativeDemandEnum + # Not specified. + RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0 + + # Demand is 0-5% of the demand of the highest ranked product cluster or + # brand. + VERY_LOW = 10 + + # Demand is 6-10% of the demand of the highest ranked product cluster or + # brand. + LOW = 20 + + # Demand is 11-20% of the demand of the highest ranked product cluster or + # brand. + MEDIUM = 30 + + # Demand is 21-50% of the demand of the highest ranked product cluster or + # brand. + HIGH = 40 + + # Demand is 51-100% of the demand of the highest ranked product cluster or + # brand. + VERY_HIGH = 50 + end + end + + # Relative demand of a product cluster or brand in the Best sellers report + # compared to the previous time period. + class RelativeDemandChangeType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Relative demand change type values. + module RelativeDemandChangeTypeEnum + # Not specified. + RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0 + + # Relative demand is lower than the previous time period. + SINKER = 1 + + # Relative demand is equal to the previous time period. + FLAT = 2 + + # Relative demand is higher than the previous time period. + RISER = 3 + end + end + + # Traffic source of impressions in the Competitive visibility report. + class TrafficSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Traffic source values. + module TrafficSourceEnum + # Not specified. + TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0 + + # Organic traffic. + ORGANIC = 1 + + # Traffic from ads. + ADS = 2 + + # Organic and ads traffic. + ALL = 3 + end + end + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..d106b030fe79 --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb b/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..48f5db726fe4 --- /dev/null +++ b/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-shopping-merchant-reports-v1/snippets/Gemfile b/google-shopping-merchant-reports-v1/snippets/Gemfile new file mode 100644 index 000000000000..e4774bac377a --- /dev/null +++ b/google-shopping-merchant-reports-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-shopping-merchant-reports-v1", path: "../" +else + gem "google-shopping-merchant-reports-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-shopping-merchant-reports-v1/snippets/report_service/search.rb b/google-shopping-merchant-reports-v1/snippets/report_service/search.rb new file mode 100644 index 000000000000..d4a1de602870 --- /dev/null +++ b/google-shopping-merchant-reports-v1/snippets/report_service/search.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 merchantapi_v1_generated_ReportService_Search_sync] +require "google/shopping/merchant/reports/v1" + +## +# Snippet for the search call in the ReportService 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::Shopping::Merchant::Reports::V1::ReportService::Client#search. +# +def search + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new + + # Call the search method. + result = client.search 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::Shopping::Merchant::Reports::V1::ReportRow. + p item + end +end +# [END merchantapi_v1_generated_ReportService_Search_sync] diff --git a/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json b/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json new file mode 100644 index 000000000000..7585e5455b25 --- /dev/null +++ b/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-shopping-merchant-reports-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.reports.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_ReportService_Search_sync", + "title": "Snippet for the search call in the ReportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reports::V1::ReportService::Client#search.", + "file": "report_service/search.rb", + "language": "RUBY", + "client_method": { + "short_name": "search", + "full_name": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client#search", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reports::V1::SearchRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reports::V1::SearchResponse", + "client": { + "short_name": "ReportService::Client", + "full_name": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client" + }, + "method": { + "short_name": "Search", + "full_name": "google.shopping.merchant.reports.v1.ReportService.Search", + "service": { + "short_name": "ReportService", + "full_name": "google.shopping.merchant.reports.v1.ReportService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb new file mode 100644 index 000000000000..ed806a09af42 --- /dev/null +++ b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/reports_pb" +require "google/shopping/merchant/reports/v1/report_service/rest" + + +class ::Google::Shopping::Merchant::Reports::V1::ReportService::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_search + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_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::Shopping::Merchant::Reports::V1::ReportService::Rest::ServiceStub.stub :transcode_search_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, 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.search({ parent: parent, query: query, 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.search(::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, 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, search_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::Shopping::Merchant::Reports::V1::ReportService::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::Shopping::Merchant::Reports::V1::ReportService::Rest::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb new file mode 100644 index 000000000000..76e0d3cde1b2 --- /dev/null +++ b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/shopping/merchant/reports/v1/reports_pb" +require "google/shopping/merchant/reports/v1/reports_services_pb" +require "google/shopping/merchant/reports/v1/report_service" + +class ::Google::Shopping::Merchant::Reports::V1::ReportService::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_search + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.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" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search, name + assert_kind_of ::Google::Shopping::Merchant::Reports::V1::SearchRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search({ parent: parent, query: query, 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.search parent: parent, query: query, 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.search ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, 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.search({ parent: parent, query: query, 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.search(::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, 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, search_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::Shopping::Merchant::Reports::V1::ReportService::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::Shopping::Merchant::Reports::V1::ReportService::Client::Configuration, config + end +end diff --git a/google-shopping-merchant-reports-v1/test/helper.rb b/google-shopping-merchant-reports-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-shopping-merchant-reports-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 3b34abd04e00..841eb77b62c7 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1959,6 +1959,10 @@ "component": "google-shopping-merchant-reports", "version_file": "lib/google/shopping/merchant/reports/version.rb" }, + "google-shopping-merchant-reports-v1": { + "component": "google-shopping-merchant-reports-v1", + "version_file": "lib/google/shopping/merchant/reports/v1/version.rb" + }, "google-shopping-merchant-reports-v1beta": { "component": "google-shopping-merchant-reports-v1beta", "version_file": "lib/google/shopping/merchant/reports/v1beta/version.rb" From 60b26f89a48edbf548bd246144cd8a2cfce80647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Wed, 6 Aug 2025 16:46:57 -0700 Subject: [PATCH 366/457] chore(storage): Migrate to google-cloud-pubsub v3.x (#30773) --- google-cloud-storage/OVERVIEW.md | 21 +++++++++++++------ .../storage/bucket_notification_test.rb | 21 +++++++++++++------ .../storage/bucket_requester_pays_test.rb | 21 +++++++++++++------ .../samples/acceptance/notification_test.rb | 21 ++++++++++++------- 4 files changed, 59 insertions(+), 25 deletions(-) diff --git a/google-cloud-storage/OVERVIEW.md b/google-cloud-storage/OVERVIEW.md index b44c090a7755..3f876a0f89d5 100644 --- a/google-cloud-storage/OVERVIEW.md +++ b/google-cloud-storage/OVERVIEW.md @@ -531,14 +531,23 @@ created and owns the topic.) require "google/cloud/pubsub" require "google/cloud/storage" -pubsub = Google::Cloud::Pubsub.new +pubsub = Google::Cloud::PubSub.new storage = Google::Cloud::Storage.new -topic = pubsub.create_topic "my-topic" -topic.policy do |p| - p.add "roles/pubsub.publisher", - "serviceAccount:#{storage.service_account_email}" -end +topic_admin = pubsub.topic_admin +topic_path = pubsub.topic_path "my-topic" +topic = topic_admin.create_topic name: topic_path + +policy = { + bindings: [ + { + role: "roles/pubsub.publisher", + members: ["serviceAccount:#{storage.service_account_email}"] + } + ] +} + +pubsub.iam.set_iam_policy resource: topic_path, policy: policy bucket = storage.bucket "my-bucket" diff --git a/google-cloud-storage/acceptance/storage/bucket_notification_test.rb b/google-cloud-storage/acceptance/storage/bucket_notification_test.rb index a2c94590cbb6..77a5b3759dd3 100644 --- a/google-cloud-storage/acceptance/storage/bucket_notification_test.rb +++ b/google-cloud-storage/acceptance/storage/bucket_notification_test.rb @@ -29,11 +29,21 @@ let(:payload) { "NONE" } it "creates a Pub/Sub subscription notification" do + pubsub = Google::Cloud::PubSub.new + topic_admin = pubsub.topic_admin + topic = nil begin - topic = Google::Cloud.pubsub.create_topic topic_name - topic.policy do |p| - p.add "roles/pubsub.publisher", project_email - end + topic = topic_admin.create_topic name: pubsub.topic_path(topic_name) + + policy = { + bindings: [ + { + role: "roles/pubsub.publisher", + members: [project_email] + } + ] + } + pubsub.iam.set_iam_policy resource: topic.name, policy: policy notification = bucket.create_notification topic.name, custom_attrs: custom_attrs, event_types: event_types, @@ -63,8 +73,7 @@ fresh_notification.delete ensure bucket.notifications.map(&:delete) - post_topic = Google::Cloud.pubsub.topic "#{prefix}_bucket_notification_topic" - post_topic.delete if post_topic # Assume no subscriptions to clean up. + topic_admin.delete_topic topic: topic.name if topic end end end diff --git a/google-cloud-storage/acceptance/storage/bucket_requester_pays_test.rb b/google-cloud-storage/acceptance/storage/bucket_requester_pays_test.rb index c0fef010a0b7..a596df61736b 100644 --- a/google-cloud-storage/acceptance/storage/bucket_requester_pays_test.rb +++ b/google-cloud-storage/acceptance/storage/bucket_requester_pays_test.rb @@ -122,11 +122,21 @@ end it "creates a Pub/Sub subscription notification" do + pubsub = Google::Cloud::PubSub.new + topic_admin = pubsub.topic_admin + topic = nil begin - topic = Google::Cloud.pubsub.create_topic topic_name - topic.policy do |p| - p.add "roles/pubsub.publisher", project_email - end + topic = topic_admin.create_topic name: pubsub.topic_path(topic_name) + + policy = { + bindings: [ + { + role: "roles/pubsub.publisher", + members: [project_email] + } + ] + } + pubsub.iam.set_iam_policy resource: topic.name, policy: policy notification = bucket.create_notification topic.name, custom_attrs: custom_attrs, event_types: event_types, @@ -156,8 +166,7 @@ fresh_notification.delete ensure bucket.notifications.map(&:delete) - post_topic = Google::Cloud.pubsub.topic "#{prefix}_bucket_notification_topic" - post_topic.delete if post_topic # Assume no subscriptions to clean up. + topic_admin.delete_topic topic: topic.name if topic end end diff --git a/google-cloud-storage/samples/acceptance/notification_test.rb b/google-cloud-storage/samples/acceptance/notification_test.rb index dd8d432cba23..4c94d0126c44 100644 --- a/google-cloud-storage/samples/acceptance/notification_test.rb +++ b/google-cloud-storage/samples/acceptance/notification_test.rb @@ -26,17 +26,24 @@ before :all do @bucket = create_bucket_helper random_bucket_name - pubsub = Google::Cloud::Pubsub.new - @topic = pubsub.create_topic random_topic_name - topic.policy do |p| - p.add "roles/pubsub.publisher", - "serviceAccount:#{storage_client.service_account_email}" - end + pubsub = Google::Cloud::PubSub.new + @topic_admin = pubsub.topic_admin + @topic = @topic_admin.create_topic name: pubsub.topic_path(random_topic_name) + + policy = { + bindings: [ + { + role: "roles/pubsub.publisher", + members: ["serviceAccount:#{storage_client.service_account_email}"] + } + ] + } + pubsub.iam.set_iam_policy resource: @topic.name, policy: policy end after :all do delete_bucket_helper @bucket.name - topic.delete + @topic_admin.delete_topic topic: @topic.name if @topic end describe "Notification Lifecycle" do From c6af2ddd8b889db8c3a278a637d73ffb180d0227 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 09:30:35 -0700 Subject: [PATCH 367/457] chore(main): release google-cloud-pubsub 3.0.1 (#30763) --- .release-please-manifest.json | 2 +- google-cloud-pubsub/CHANGELOG.md | 6 ++++++ google-cloud-pubsub/lib/google/cloud/pubsub/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 62bc7f2a38d3..b096fc9a52e3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -605,7 +605,7 @@ "google-cloud-profiler+FILLER": "0.0.0", "google-cloud-profiler-v2": "1.3.0", "google-cloud-profiler-v2+FILLER": "0.0.0", - "google-cloud-pubsub": "3.0.0", + "google-cloud-pubsub": "3.0.1", "google-cloud-pubsub+FILLER": "0.0.0", "google-cloud-pubsub-v1": "1.11.1", "google-cloud-pubsub-v1+FILLER": "0.0.0", diff --git a/google-cloud-pubsub/CHANGELOG.md b/google-cloud-pubsub/CHANGELOG.md index b6d44d954ac9..53e859473cb6 100644 --- a/google-cloud-pubsub/CHANGELOG.md +++ b/google-cloud-pubsub/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 3.0.1 (2025-08-07) + +#### Documentation + +* Update README.md to v3.x ([#30751](https://github.com/googleapis/google-cloud-ruby/issues/30751)) + ### 3.0.0 (2025-07-29) ### ⚠ BREAKING CHANGES diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb index 0cd5e44b0f86..cd2f7dfc1019 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module PubSub - VERSION = "3.0.0".freeze + VERSION = "3.0.1".freeze end Pubsub = PubSub unless const_defined? :Pubsub From fc540d29da948cdd3109f56de14de32408b326ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Thu, 7 Aug 2025 09:31:27 -0700 Subject: [PATCH 368/457] chore(bigtable): Address conformance test failures (#30754) NoRetry_OutOfOrderError Retry_LastScannerRow --- .../conformance/known_failures.txt | 36 +++++- .../conformance/test_proxy/test_proxy.rb | 4 +- .../google/cloud/bigtable/chunk_processor.rb | 23 +++- .../lib/google/cloud/bigtable/rows_reader.rb | 4 + .../cloud/bigtable/table/read_rows_test.rb | 105 ++++++++++++++++++ 5 files changed, 162 insertions(+), 10 deletions(-) diff --git a/google-cloud-bigtable/conformance/known_failures.txt b/google-cloud-bigtable/conformance/known_failures.txt index b27c732442ca..730f7077f226 100644 --- a/google-cloud-bigtable/conformance/known_failures.txt +++ b/google-cloud-bigtable/conformance/known_failures.txt @@ -1,7 +1,41 @@ TestCheckAndMutateRow_Generic_CloseClient TestCheckAndMutateRow_Generic_DeadlineExceeded +TestExecuteQuery_BatchesTest +TestExecuteQuery_ChecksumMismatch +TestExecuteQuery_ChunkingTest +TestExecuteQuery_CloseClient +TestExecuteQuery_ConcurrentRequests TestExecuteQuery_EmptyResponse +TestExecuteQuery_ExecuteQueryRespectsDeadline +TestExecuteQuery_FailsOnEmptyMetadata +TestExecuteQuery_FailsOnExecuteQueryMetadata +TestExecuteQuery_FailsOnInvalidType +TestExecuteQuery_FailsOnNotEnoughData +TestExecuteQuery_FailsOnNotEnoughDataWithCompleteRows +TestExecuteQuery_FailsOnStructMissingField +TestExecuteQuery_FailsOnSuccesfulStreamWithNoToken +TestExecuteQuery_FailsOnTypeMismatch +TestExecuteQuery_FailsOnTypeMismatchWithinArray +TestExecuteQuery_FailsOnTypeMismatchWithinMap +TestExecuteQuery_FailsOnTypeMismatchWithinStruct +TestExecuteQuery_HeadersAreSet +TestExecuteQuery_MapAllowsDuplicateKey +TestExecuteQuery_NestedNullsTest +TestExecuteQuery_NullsTest +TestExecuteQuery_PlanRefresh +TestExecuteQuery_PrepareQueryRespectsDeadline +TestExecuteQuery_QueryParams +TestExecuteQuery_RetryTest_ErrorAfterFinalData +TestExecuteQuery_RetryTest_FirstResponse +TestExecuteQuery_RetryTest_MidStream +TestExecuteQuery_RetryTest_ResetCompleteBatch +TestExecuteQuery_RetryTest_ResetPartialBatch +TestExecuteQuery_RetryTest_TokenWithoutData +TestExecuteQuery_RetryTest_WithPlanRefresh TestExecuteQuery_SingleSimpleRow +TestExecuteQuery_StructWithDuplicateColumnNames +TestExecuteQuery_StructWithNoColumnNames +TestExecuteQuery_TypesTest TestMutateRow_Generic_DeadlineExceeded TestMutateRow_Generic_CloseClient TestMutateRows_Generic_DeadlineExceeded @@ -15,10 +49,8 @@ TestReadRow_Generic_DeadlineExceeded TestReadRow_Generic_CloseClient TestReadRow_Retry_WithRoutingCookie TestReadRow_Retry_WithRetryInfo -TestReadRows_NoRetry_OutOfOrderError TestReadRows_NoRetry_OutOfOrderError_Reverse TestReadRows_ReverseScans_FeatureFlag_Enabled -TestReadRows_Retry_LastScannedRow TestReadRows_Retry_LastScannedRow_Reverse TestReadRows_Generic_CloseClient TestReadRows_Generic_DeadlineExceeded diff --git a/google-cloud-bigtable/conformance/test_proxy/test_proxy.rb b/google-cloud-bigtable/conformance/test_proxy/test_proxy.rb index e8e489297a01..29f0023de1ef 100644 --- a/google-cloud-bigtable/conformance/test_proxy/test_proxy.rb +++ b/google-cloud-bigtable/conformance/test_proxy/test_proxy.rb @@ -223,8 +223,8 @@ def read_rows req, _call end rescue Google::Cloud::Error => e LOGGER.info "ReadRows failed: Caught #{e}" - Google::Bigtable::Testproxy::RowResult.new( - status: make_status(e.code) + Google::Bigtable::Testproxy::RowsResult.new( + status: make_status(e.code, e.message) ) end # rubocop:enable Metrics/AbcSize diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/chunk_processor.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/chunk_processor.rb index 6072f6ad2d2b..d5394e9ef227 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/chunk_processor.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/chunk_processor.rb @@ -94,12 +94,23 @@ def validate_reset_row # or if family name or column qualifier are empty # def validate_new_row - raise_if row.key, "A new row cannot have existing state" - raise_if chunk.row_key.empty?, "A row key must be set" - raise_if chunk.reset_row, "A new row cannot be reset" - raise_if last_key == chunk.row_key, "A commit happened but the same key followed" - raise_if chunk.family_name.nil?, "A family must be set" - raise_if chunk.qualifier.nil?, "A column qualifier must be set" + validations = [ + [row.key, "A new row cannot have existing state"], + [chunk.row_key.empty?, "A row key must be set"], + [chunk.reset_row, "A new row cannot be reset"], + [last_key == chunk.row_key, "A commit happened but the same key followed"], + [ + last_key && chunk.row_key < last_key, + "Out of order row key, must be strictly increasing. " \ + "New key: '#{chunk.row_key}', Previous key: '#{last_key}'" + ], + [chunk.family_name.nil?, "A family must be set"], + [chunk.qualifier.nil?, "A column qualifier must be set"] + ] + + validations.each do |condition, message| + raise_if condition, message + end end ## diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/rows_reader.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/rows_reader.rb index 08d3f27fd82d..769d9a03de71 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/rows_reader.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/rows_reader.rb @@ -92,6 +92,10 @@ def read rows: nil, filter: nil, rows_limit: nil yield row @rows_count += 1 end + + if res.last_scanned_row_key && !res.last_scanned_row_key.empty? + @chunk_processor.last_key = res.last_scanned_row_key + end end @chunk_processor.validate_last_row_complete diff --git a/google-cloud-bigtable/test/google/cloud/bigtable/table/read_rows_test.rb b/google-cloud-bigtable/test/google/cloud/bigtable/table/read_rows_test.rb index 4be78ba89ff7..8799ea1d940b 100644 --- a/google-cloud-bigtable/test/google/cloud/bigtable/table/read_rows_test.rb +++ b/google-cloud-bigtable/test/google/cloud/bigtable/table/read_rows_test.rb @@ -434,4 +434,109 @@ def mock.read_rows _args _(rows.length).must_equal 1 _(rows.first).must_equal expected_row end + + it "reports an error if the client detects that the server sent row keys out of order" do + mock = Minitest::Mock.new + bigtable.service.mocked_client = mock + table = bigtable.table(instance_id, table_id) + + chunks = [ + Google::Cloud::Bigtable::V2::ReadRowsResponse::CellChunk.new( + row_key: "row-2", + family_name: Google::Protobuf::StringValue.new(value: "cf"), + qualifier: Google::Protobuf::BytesValue.new(value: "cq"), + value: "v", + commit_row: true + ), + Google::Cloud::Bigtable::V2::ReadRowsResponse::CellChunk.new( + row_key: "row-1", # Out of order + family_name: Google::Protobuf::StringValue.new(value: "cf"), + qualifier: Google::Protobuf::BytesValue.new(value: "cq"), + value: "v", + commit_row: true + ) + ] + responses = [ + Google::Cloud::Bigtable::V2::ReadRowsResponse.new(chunks: [chunks[0]]), + Google::Cloud::Bigtable::V2::ReadRowsResponse.new(chunks: [chunks[1]]) + ] + + mock.expect :read_rows, responses, + table_name: table_path(instance_id, table_id), + rows: Google::Cloud::Bigtable::V2::RowSet.new(row_ranges: [Google::Cloud::Bigtable::V2::RowRange.new]), + filter: nil, + rows_limit: nil, + app_profile_id: nil + + err = assert_raises Google::Cloud::Error do + table.read_rows.to_a + end + _(err.message).must_match /Out of order row key/ + end + + it "resumes a read from the last scanned row key after a retryable error" do + mock = Minitest::Mock.new + bigtable.service.mocked_client = mock + table = bigtable.table(instance_id, table_id) + + first_mock_responses = [ + Google::Cloud::Bigtable::V2::ReadRowsResponse.new(last_scanned_row_key: ""), + "error" + ] + first_mock_itr = OpenStruct.new(read_response: first_mock_responses) + def first_mock_itr.each + self.read_response.each do |res| + raise GRPC::DeadlineExceeded, "Deadline exceeded" if res == "error" + yield res + end + end + + second_mock_responses = [ + Google::Cloud::Bigtable::V2::ReadRowsResponse.new(last_scanned_row_key: "row-a"), + "error" + ] + second_mock_itr = OpenStruct.new(read_response: second_mock_responses) + def second_mock_itr.each + self.read_response.each do |res| + raise GRPC::DeadlineExceeded, "Deadline exceeded" if res == "error" + yield res + end + end + + final_chunk = Google::Cloud::Bigtable::V2::ReadRowsResponse::CellChunk.new( + row_key: "row-b", + family_name: Google::Protobuf::StringValue.new(value: "cf"), + qualifier: Google::Protobuf::BytesValue.new(value: "cq"), + value: "v", + commit_row: true + ) + final_response = [Google::Cloud::Bigtable::V2::ReadRowsResponse.new(chunks: [final_chunk])] + + mock.expect :read_rows, first_mock_itr, + table_name: table_path(instance_id, table_id), + rows: Google::Cloud::Bigtable::V2::RowSet.new(row_ranges: [Google::Cloud::Bigtable::V2::RowRange.new]), + filter: nil, + rows_limit: nil, + app_profile_id: nil + + mock.expect :read_rows, second_mock_itr, + table_name: table_path(instance_id, table_id), + rows: Google::Cloud::Bigtable::V2::RowSet.new(row_ranges: [Google::Cloud::Bigtable::V2::RowRange.new]), + filter: nil, + rows_limit: nil, + app_profile_id: nil + + mock.expect :read_rows, final_response, + table_name: table_path(instance_id, table_id), + rows: Google::Cloud::Bigtable::V2::RowSet.new( + row_ranges: [Google::Cloud::Bigtable::V2::RowRange.new(start_key_open: "row-a")] + ), + filter: nil, + rows_limit: nil, + app_profile_id: nil + + rows = table.read_rows.to_a + _(rows.map(&:key)).must_equal ["row-b"] + mock.verify + end end From ffd6d67d65fd1d2a27ab95f70ccfdcf333f561ed Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:13:19 -0700 Subject: [PATCH 369/457] feat: Initial generation of google-apps-events-subscriptions-v1beta (#30758) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 64 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 154 +++ .../Rakefile | 169 +++ .../gapic_metadata.json | 48 + ...e-apps-events-subscriptions-v1beta.gemspec | 28 + ...google-apps-events-subscriptions-v1beta.rb | 21 + .../apps/events/subscriptions/v1beta.rb | 47 + .../apps/events/subscriptions/v1beta/rest.rb | 39 + .../v1beta/subscription_resource_pb.rb | 59 + .../v1beta/subscriptions_service.rb | 58 + .../v1beta/subscriptions_service/client.rb | 1077 +++++++++++++++++ .../subscriptions_service/credentials.rb | 63 + .../subscriptions_service/operations.rb | 815 +++++++++++++ .../v1beta/subscriptions_service/paths.rb | 80 ++ .../v1beta/subscriptions_service/rest.rb | 55 + .../subscriptions_service/rest/client.rb | 1025 ++++++++++++++++ .../subscriptions_service/rest/operations.rb | 916 ++++++++++++++ .../rest/service_stub.rb | 448 +++++++ .../v1beta/subscriptions_service_pb.rb | 65 + .../subscriptions_service_services_pb.rb | 75 ++ .../events/subscriptions/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/field_info.rb | 88 ++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 ++++ .../v1beta/subscription_resource.rb | 257 ++++ .../v1beta/subscriptions_service.rb | 217 ++++ .../google/longrunning/operations.rb | 173 +++ .../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/status.rb | 48 + .../snippets/Gemfile | 32 + ...ogle.apps.events.subscriptions.v1beta.json | 255 ++++ .../create_subscription.rb | 54 + .../delete_subscription.rb | 54 + .../subscriptions_service/get_subscription.rb | 47 + .../list_subscriptions.rb | 51 + .../reactivate_subscription.rb | 54 + .../update_subscription.rb | 54 + .../subscriptions_service_operations_test.rb | 398 ++++++ .../subscriptions_service_paths_test.rb | 79 ++ .../v1beta/subscriptions_service_rest_test.rb | 431 +++++++ .../v1beta/subscriptions_service_test.rb | 488 ++++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 61 files changed, 10091 insertions(+) create mode 100644 google-apps-events-subscriptions-v1beta/.OwlBot.yaml create mode 100644 google-apps-events-subscriptions-v1beta/.gitignore create mode 100644 google-apps-events-subscriptions-v1beta/.owlbot-manifest.json create mode 100644 google-apps-events-subscriptions-v1beta/.repo-metadata.json create mode 100644 google-apps-events-subscriptions-v1beta/.rubocop.yml create mode 100644 google-apps-events-subscriptions-v1beta/.toys.rb create mode 100644 google-apps-events-subscriptions-v1beta/.yardopts create mode 100644 google-apps-events-subscriptions-v1beta/AUTHENTICATION.md create mode 100644 google-apps-events-subscriptions-v1beta/CHANGELOG.md create mode 100644 google-apps-events-subscriptions-v1beta/Gemfile create mode 100644 google-apps-events-subscriptions-v1beta/LICENSE.md create mode 100644 google-apps-events-subscriptions-v1beta/README.md create mode 100644 google-apps-events-subscriptions-v1beta/Rakefile create mode 100644 google-apps-events-subscriptions-v1beta/gapic_metadata.json create mode 100644 google-apps-events-subscriptions-v1beta/google-apps-events-subscriptions-v1beta.gemspec create mode 100644 google-apps-events-subscriptions-v1beta/lib/google-apps-events-subscriptions-v1beta.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/rest.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscription_resource_pb.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/client.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/credentials.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/operations.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/paths.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/client.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/operations.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/service_stub.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service_pb.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service_services_pb.rb create mode 100644 google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/version.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/README.md create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/api/client.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/api/field_info.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/api/resource.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/apps/events/subscriptions/v1beta/subscriptions_service.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/longrunning/operations.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-apps-events-subscriptions-v1beta/proto_docs/google/rpc/status.rb create mode 100644 google-apps-events-subscriptions-v1beta/snippets/Gemfile create mode 100644 google-apps-events-subscriptions-v1beta/snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json create mode 100644 google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/create_subscription.rb create mode 100644 google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/delete_subscription.rb create mode 100644 google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/get_subscription.rb create mode 100644 google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/list_subscriptions.rb create mode 100644 google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/reactivate_subscription.rb create mode 100644 google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/update_subscription.rb create mode 100644 google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_operations_test.rb create mode 100644 google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_paths_test.rb create mode 100644 google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_rest_test.rb create mode 100644 google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb create mode 100644 google-apps-events-subscriptions-v1beta/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b096fc9a52e3..fabd1c70ad55 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -23,6 +23,8 @@ "google-apps-events-subscriptions+FILLER": "0.0.0", "google-apps-events-subscriptions-v1": "0.4.0", "google-apps-events-subscriptions-v1+FILLER": "0.0.0", + "google-apps-events-subscriptions-v1beta": "0.0.1", + "google-apps-events-subscriptions-v1beta+FILLER": "0.0.0", "google-apps-meet": "1.1.1", "google-apps-meet+FILLER": "0.0.0", "google-apps-meet-v2": "0.5.0", diff --git a/google-apps-events-subscriptions-v1beta/.OwlBot.yaml b/google-apps-events-subscriptions-v1beta/.OwlBot.yaml new file mode 100644 index 000000000000..123da06e4c83 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/apps/events/subscriptions/v1beta/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-apps-events-subscriptions-v1beta/$1 diff --git a/google-apps-events-subscriptions-v1beta/.gitignore b/google-apps-events-subscriptions-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/.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/google-apps-events-subscriptions-v1beta/.owlbot-manifest.json b/google-apps-events-subscriptions-v1beta/.owlbot-manifest.json new file mode 100644 index 000000000000..7a029919b93c --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/.owlbot-manifest.json @@ -0,0 +1,64 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-apps-events-subscriptions-v1beta.gemspec", + "lib/google-apps-events-subscriptions-v1beta.rb", + "lib/google/apps/events/subscriptions/v1beta.rb", + "lib/google/apps/events/subscriptions/v1beta/rest.rb", + "lib/google/apps/events/subscriptions/v1beta/subscription_resource_pb.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service/client.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service/credentials.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service/operations.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service/paths.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/client.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/operations.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/service_stub.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service_pb.rb", + "lib/google/apps/events/subscriptions/v1beta/subscriptions_service_services_pb.rb", + "lib/google/apps/events/subscriptions/v1beta/version.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/field_info.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb", + "proto_docs/google/apps/events/subscriptions/v1beta/subscriptions_service.rb", + "proto_docs/google/longrunning/operations.rb", + "proto_docs/google/protobuf/any.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/rpc/status.rb", + "snippets/Gemfile", + "snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json", + "snippets/subscriptions_service/create_subscription.rb", + "snippets/subscriptions_service/delete_subscription.rb", + "snippets/subscriptions_service/get_subscription.rb", + "snippets/subscriptions_service/list_subscriptions.rb", + "snippets/subscriptions_service/reactivate_subscription.rb", + "snippets/subscriptions_service/update_subscription.rb", + "test/google/apps/events/subscriptions/v1beta/subscriptions_service_operations_test.rb", + "test/google/apps/events/subscriptions/v1beta/subscriptions_service_paths_test.rb", + "test/google/apps/events/subscriptions/v1beta/subscriptions_service_rest_test.rb", + "test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-apps-events-subscriptions-v1beta/.repo-metadata.json b/google-apps-events-subscriptions-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..a6e3acb4a90c --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "workspaceevents.googleapis.com", + "api_shortname": "workspaceevents", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-apps-events-subscriptions-v1beta/latest", + "distribution_name": "google-apps-events-subscriptions-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "workspaceevents", + "name_pretty": "Google Workspace Events V1BETA API", + "product_documentation": "https://developers.google.com/workspace/events", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications. Note that google-apps-events-subscriptions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-apps-events-subscriptions instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/workspace/events", + "library_type": "GAPIC_AUTO" +} diff --git a/google-apps-events-subscriptions-v1beta/.rubocop.yml b/google-apps-events-subscriptions-v1beta/.rubocop.yml new file mode 100644 index 000000000000..b5ddbbc73198 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-apps-events-subscriptions-v1beta.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-apps-events-subscriptions-v1beta.rb" diff --git a/google-apps-events-subscriptions-v1beta/.toys.rb b/google-apps-events-subscriptions-v1beta/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/.yardopts b/google-apps-events-subscriptions-v1beta/.yardopts new file mode 100644 index 000000000000..b3eb092b7b5f --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Google Workspace Events V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-apps-events-subscriptions-v1beta/AUTHENTICATION.md b/google-apps-events-subscriptions-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..0a47e094287d --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-apps-events-subscriptions-v1beta 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-apps-events-subscriptions-v1beta 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/apps/events/subscriptions/v1beta" + +client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/apps/events/subscriptions/v1beta" + +::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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-apps-events-subscriptions-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/apps/events/subscriptions/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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/google-apps-events-subscriptions-v1beta/CHANGELOG.md b/google-apps-events-subscriptions-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-apps-events-subscriptions-v1beta/Gemfile b/google-apps-events-subscriptions-v1beta/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-apps-events-subscriptions-v1beta/LICENSE.md b/google-apps-events-subscriptions-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/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/google-apps-events-subscriptions-v1beta/README.md b/google-apps-events-subscriptions-v1beta/README.md new file mode 100644 index 000000000000..990472018625 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Google Workspace Events V1BETA API + +The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications. + +The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Google Workspace Events V1BETA API. Most users should consider using +the main client gem, +[google-apps-events-subscriptions](https://rubygems.org/gems/google-apps-events-subscriptions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-apps-events-subscriptions-v1beta +``` + +## 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/workspaceevents.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/apps/events/subscriptions/v1beta" + +client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new +request = ::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest.new # (request fields as keyword arguments...) +response = client.create_subscription request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-apps-events-subscriptions-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/workspace/events) +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/apps/events/subscriptions/v1beta" +require "logger" + +client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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-apps-events-subscriptions`, +and lower-level _versioned_ client libraries with names such as +`google-apps-events-subscriptions-v1beta`. +_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-apps-events-subscriptions`. +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-apps-events-subscriptions-v1beta`. + +### 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/google-apps-events-subscriptions-v1beta/Rakefile b/google-apps-events-subscriptions-v1beta/Rakefile new file mode 100644 index 000000000000..467836a9aa2c --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-apps-events-subscriptions-v1beta 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/apps/events/subscriptions/v1beta/subscriptions_service/credentials" + ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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-apps-events-subscriptions-v1beta 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-apps-events-subscriptions-v1beta 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-apps-events-subscriptions-v1beta 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-apps-events-subscriptions-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-apps-events-subscriptions-v1beta" + header "google-apps-events-subscriptions-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-apps-events-subscriptions-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-apps-events-subscriptions-v1beta 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-apps-events-subscriptions-v1beta 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-apps-events-subscriptions-v1beta 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/google-apps-events-subscriptions-v1beta/gapic_metadata.json b/google-apps-events-subscriptions-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..ca90001ea141 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.apps.events.subscriptions.v1beta", + "libraryPackage": "::Google::Apps::Events::Subscriptions::V1beta", + "services": { + "SubscriptionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client", + "rpcs": { + "CreateSubscription": { + "methods": [ + "create_subscription" + ] + }, + "DeleteSubscription": { + "methods": [ + "delete_subscription" + ] + }, + "GetSubscription": { + "methods": [ + "get_subscription" + ] + }, + "ListSubscriptions": { + "methods": [ + "list_subscriptions" + ] + }, + "UpdateSubscription": { + "methods": [ + "update_subscription" + ] + }, + "ReactivateSubscription": { + "methods": [ + "reactivate_subscription" + ] + } + } + } + } + } + } +} diff --git a/google-apps-events-subscriptions-v1beta/google-apps-events-subscriptions-v1beta.gemspec b/google-apps-events-subscriptions-v1beta/google-apps-events-subscriptions-v1beta.gemspec new file mode 100644 index 000000000000..fb29126080dc --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/google-apps-events-subscriptions-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/apps/events/subscriptions/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-apps-events-subscriptions-v1beta" + gem.version = Google::Apps::Events::Subscriptions::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications. Note that google-apps-events-subscriptions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-apps-events-subscriptions instead. See the readme for more details." + gem.summary = "The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google-apps-events-subscriptions-v1beta.rb b/google-apps-events-subscriptions-v1beta/lib/google-apps-events-subscriptions-v1beta.rb new file mode 100644 index 000000000000..fd6127e44b21 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google-apps-events-subscriptions-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta" diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta.rb new file mode 100644 index 000000000000..cf3c424b0c18 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service" +require "google/apps/events/subscriptions/v1beta/version" + +module Google + module Apps + module Events + module Subscriptions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/apps/events/subscriptions/v1beta" + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/apps/events/subscriptions/v1beta" + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/apps/events/subscriptions/v1beta/_helpers" if ::File.file? helper_path diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/rest.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/rest.rb new file mode 100644 index 000000000000..6667ff4cc049 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service/rest" +require "google/apps/events/subscriptions/v1beta/version" + +module Google + module Apps + module Events + module Subscriptions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/apps/events/subscriptions/v1beta/rest" + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscription_resource_pb.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscription_resource_pb.rb new file mode 100644 index 000000000000..7ea44f2e5b45 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscription_resource_pb.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/apps/events/subscriptions/v1beta/subscription_resource.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nCgoogle/apps/events/subscriptions/v1beta/subscription_resource.proto\x12\'google.apps.events.subscriptions.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfd\n\n\x0cSubscription\x12`\n\rdrive_options\x18\x14 \x01(\x0b\x32\x42.google.apps.events.subscriptions.v1beta.Subscription.DriveOptionsB\x03\xe0\x41\x01H\x00\x12\x36\n\x0b\x65xpire_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x07H\x01\x12-\n\x03ttl\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04H\x01\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12%\n\x0ftarget_resource\x18\x04 \x01(\tB\x0c\xe0\x41\x05\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x1b\n\x0b\x65vent_types\x18\x05 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x06\x12U\n\x0fpayload_options\x18\x06 \x01(\x0b\x32\x37.google.apps.events.subscriptions.v1beta.PayloadOptionsB\x03\xe0\x41\x01\x12\x64\n\x15notification_endpoint\x18\x07 \x01(\x0b\x32=.google.apps.events.subscriptions.v1beta.NotificationEndpointB\x06\xe0\x41\x02\xe0\x41\x05\x12O\n\x05state\x18\x08 \x01(\x0e\x32;.google.apps.events.subscriptions.v1beta.Subscription.StateB\x03\xe0\x41\x03\x12_\n\x11suspension_reason\x18\x12 \x01(\x0e\x32?.google.apps.events.subscriptions.v1beta.Subscription.ErrorTypeB\x03\xe0\x41\x03\x12<\n\tauthority\x18\n \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudidentity.googleapis.com/User\x12\x34\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x11 \x01(\tB\x03\xe0\x41\x01\x1a\x33\n\x0c\x44riveOptions\x12#\n\x13include_descendants\x18\x01 \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x05\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUSPENDED\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\"\xd9\x01\n\tErrorType\x12\x1a\n\x16\x45RROR_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12USER_SCOPE_REVOKED\x10\x01\x12\x14\n\x10RESOURCE_DELETED\x10\x02\x12\x1e\n\x1aUSER_AUTHORIZATION_FAILURE\x10\x03\x12\x1e\n\x1a\x45NDPOINT_PERMISSION_DENIED\x10\x04\x12\x16\n\x12\x45NDPOINT_NOT_FOUND\x10\x06\x12\x1f\n\x1b\x45NDPOINT_RESOURCE_EXHAUSTED\x10\x07\x12\t\n\x05OTHER\x10\x05:n\xea\x41k\n+workspaceevents.googleapis.com/Subscription\x12\x1csubscriptions/{subscription}*\rsubscriptions2\x0csubscriptionR\x01\x01\x42\x16\n\x14subscription_optionsB\x0c\n\nexpiration\"d\n\x0ePayloadOptions\x12\x1d\n\x10include_resource\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x33\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"_\n\x14NotificationEndpoint\x12;\n\x0cpubsub_topic\x18\x01 \x01(\tB#\xe0\x41\x05\xfa\x41\x1d\n\x1bpubsub.googleapis.com/TopicH\x00\x42\n\n\x08\x65ndpointB\x9c\x03\n+com.google.apps.events.subscriptions.v1betaB\x19SubscriptionResourceProtoP\x01ZWcloud.google.com/go/apps/events/subscriptions/apiv1beta/subscriptionspb;subscriptionspb\xaa\x02\'Google.Apps.Events.Subscriptions.V1Beta\xca\x02\'Google\\Apps\\Events\\Subscriptions\\V1beta\xea\x02+Google::Apps::Events::Subscriptions::V1beta\xea\x41\x31\n!cloudidentity.googleapis.com/User\x12\x0cusers/{user}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Apps + module Events + module Subscriptions + module V1beta + Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.Subscription").msgclass + Subscription::DriveOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.Subscription.DriveOptions").msgclass + Subscription::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.Subscription.State").enummodule + Subscription::ErrorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.Subscription.ErrorType").enummodule + PayloadOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.PayloadOptions").msgclass + NotificationEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.NotificationEndpoint").msgclass + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service.rb new file mode 100644 index 000000000000..4b595d9b28fd --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/version" + +require "google/apps/events/subscriptions/v1beta/subscriptions_service/credentials" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/paths" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/operations" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/client" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/rest" + +module Google + module Apps + module Events + module Subscriptions + module V1beta + ## + # A service that manages subscriptions to Google Workspace events. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/apps/events/subscriptions/v1beta/subscriptions_service" + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/apps/events/subscriptions/v1beta/subscriptions_service/rest" + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + module SubscriptionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "subscriptions_service", "helpers.rb" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/helpers" if ::File.file? helper_path diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/client.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/client.rb new file mode 100644 index 000000000000..2cc54cad5d69 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/client.rb @@ -0,0 +1,1077 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service_pb" + +module Google + module Apps + module Events + module Subscriptions + module V1beta + module SubscriptionsService + ## + # Client for the SubscriptionsService service. + # + # A service that manages subscriptions to Google Workspace events. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workspaceevents.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :subscriptions_service_stub + + ## + # Configure the SubscriptionsService Client class. + # + # See {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SubscriptionsService clients + # ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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", "Apps", "Events", "Subscriptions", "V1beta"] + 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_subscription.timeout = 60.0 + + default_config.rpcs.delete_subscription.timeout = 60.0 + + default_config.rpcs.get_subscription.timeout = 60.0 + default_config.rpcs.get_subscription.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_subscriptions.timeout = 60.0 + default_config.rpcs.list_subscriptions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_subscription.timeout = 60.0 + + default_config.rpcs.reactivate_subscription.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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 + @subscriptions_service_stub.universe_domain + end + + ## + # Create a new SubscriptionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SubscriptionsService 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/apps/events/subscriptions/v1beta/subscriptions_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @subscriptions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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 + ) + + @subscriptions_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @subscriptions_service_stub.logger + end + + # Service calls + + ## + # Creates a Google Workspace subscription. To learn how to use this + # method, see [Create a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/create-subscription). + # + # @overload create_subscription(request, options = nil) + # Pass arguments to `create_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest, ::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_subscription(subscription: nil, validate_only: nil) + # Pass arguments to `create_subscription` 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 subscription [::Google::Apps::Events::Subscriptions::V1beta::Subscription, ::Hash] + # Required. The subscription resource to create. + # @param validate_only [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # create the subscription. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest.new + # + # # Call the create_subscription method. + # result = client.create_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest + + # 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_subscription.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::Apps::Events::Subscriptions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.call_rpc :create_subscription, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Google Workspace subscription. + # To learn how to use this method, see [Delete a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/delete-subscription). + # + # @overload delete_subscription(request, options = nil) + # Pass arguments to `delete_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest, ::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_subscription(name: nil, validate_only: nil, allow_missing: nil, etag: nil) + # Pass arguments to `delete_subscription` 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. Resource name of the subscription to delete. + # + # Format: `subscriptions/{subscription}` + # @param validate_only [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # delete the subscription. + # @param allow_missing [::Boolean] + # Optional. If set to `true` and the subscription isn't found, the request + # succeeds but doesn't delete the subscription. + # @param etag [::String] + # Optional. Etag of the subscription. + # + # If present, it must match with the server's etag. Otherwise, request + # fails with the status `ABORTED`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest.new + # + # # Call the delete_subscription method. + # result = client.delete_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest + + # 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_subscription.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::Apps::Events::Subscriptions::V1beta::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_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.call_rpc :delete_subscription, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a Google Workspace subscription. To learn how to use + # this method, see [Get details about a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/get-subscription). + # + # @overload get_subscription(request, options = nil) + # Pass arguments to `get_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest, ::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_subscription(name: nil) + # Pass arguments to `get_subscription` 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. Resource name of the subscription. + # + # Format: `subscriptions/{subscription}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Apps::Events::Subscriptions::V1beta::Subscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Apps::Events::Subscriptions::V1beta::Subscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest.new + # + # # Call the get_subscription method. + # result = client.get_subscription request + # + # # The returned object is of type Google::Apps::Events::Subscriptions::V1beta::Subscription. + # p result + # + def get_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest + + # 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_subscription.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::Apps::Events::Subscriptions::V1beta::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_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.call_rpc :get_subscription, 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 Google Workspace subscriptions. To learn how to use this method, see + # [List Google Workspace + # subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions). + # + # @overload list_subscriptions(request, options = nil) + # Pass arguments to `list_subscriptions` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest, ::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_subscriptions(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_subscriptions` 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 page_size [::Integer] + # Optional. The maximum number of subscriptions to return. The service might + # return fewer than this value. + # + # If unspecified or set to `0`, up to 50 subscriptions are returned. + # + # The maximum value is 100. If you specify a value more than 100, the system + # only returns 100 subscriptions. + # @param page_token [::String] + # Optional. A page token, received from a previous list subscriptions call. + # Provide this parameter to retrieve the subsequent page. + # + # When paginating, the filter value should match the call that provided the + # page token. Passing a different value might lead to unexpected results. + # @param filter [::String] + # Required. A query filter. + # + # You can filter subscriptions by event type (`event_types`) + # and target resource (`target_resource`). + # + # You must specify at least one event type in your query. To filter for + # multiple event types, use the `OR` operator. + # + # To filter by both event type and target resource, use the `AND` operator + # and specify the full resource name, such as + # `//chat.googleapis.com/spaces/{space}`. + # + # For example, the following queries are valid: + # + # ``` + # event_types:"google.workspace.chat.membership.v1.updated" OR + # event_types:"google.workspace.chat.message.v1.created" + # + # event_types:"google.workspace.chat.message.v1.created" AND + # target_resource="//chat.googleapis.com/spaces/\\{space}" + # + # ( event_types:"google.workspace.chat.membership.v1.updated" OR + # event_types:"google.workspace.chat.message.v1.created" ) AND + # target_resource="//chat.googleapis.com/spaces/\\{space}" + # ``` + # + # The server rejects invalid queries with an `INVALID_ARGUMENT` + # error. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Events::Subscriptions::V1beta::Subscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Apps::Events::Subscriptions::V1beta::Subscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest.new + # + # # Call the list_subscriptions method. + # result = client.list_subscriptions 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::Apps::Events::Subscriptions::V1beta::Subscription. + # p item + # end + # + def list_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest + + # 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_subscriptions.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::Apps::Events::Subscriptions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.call_rpc :list_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @subscriptions_service_stub, :list_subscriptions, 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 + + ## + # Updates or renews a Google Workspace subscription. To learn how to use this + # method, see [Update or renew a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/update-subscription). + # + # @overload update_subscription(request, options = nil) + # Pass arguments to `update_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest, ::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 update_subscription(subscription: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_subscription` 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 subscription [::Google::Apps::Events::Subscriptions::V1beta::Subscription, ::Hash] + # Required. The subscription to update. + # + # The subscription's `name` field is used to identify the subscription to + # update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The field to update. If omitted, updates any fields included in + # the request. + # + # You can update one of the following fields in a subscription: + # + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#expire_time `expire_time`}: The timestamp when the + # subscription expires. + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#ttl `ttl`}: The + # time-to-live (TTL) or duration of the + # subscription. + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#event_types `event_types`}: The list of event types to + # receive about the target resource. + # + # To fully replace the subscription (the equivalent of `PUT`), use `*`. Any + # omitted fields are updated with empty values. + # @param validate_only [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # update the subscription. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest.new + # + # # Call the update_subscription method. + # result = client.update_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest + + # 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.update_subscription.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::Apps::Events::Subscriptions::V1beta::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.subscription&.name + header_params["subscription.name"] = request.subscription.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.update_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.call_rpc :update_subscription, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reactivates a suspended Google Workspace subscription. + # + # This method resets your subscription's `State` field to `ACTIVE`. Before + # you use this method, you must fix the error that suspended the + # subscription. This method will ignore or reject any subscription that + # isn't currently in a suspended state. To learn how to use this method, see + # [Reactivate a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription). + # + # @overload reactivate_subscription(request, options = nil) + # Pass arguments to `reactivate_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest, ::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 reactivate_subscription(name: nil) + # Pass arguments to `reactivate_subscription` 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. Resource name of the subscription. + # + # Format: `subscriptions/{subscription}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest.new + # + # # Call the reactivate_subscription method. + # result = client.reactivate_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def reactivate_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest + + # 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.reactivate_subscription.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::Apps::Events::Subscriptions::V1beta::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.reactivate_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reactivate_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.call_rpc :reactivate_subscription, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 SubscriptionsService API. + # + # This class represents the configuration for SubscriptionsService, + # 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_subscription.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "workspaceevents.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 SubscriptionsService 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_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_subscription + ## + # RPC-specific configuration for `delete_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_subscription + ## + # RPC-specific configuration for `get_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_subscription + ## + # RPC-specific configuration for `list_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subscriptions + ## + # RPC-specific configuration for `update_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_subscription + ## + # RPC-specific configuration for `reactivate_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :reactivate_subscription + + # @private + def initialize parent_rpcs = nil + create_subscription_config = parent_rpcs.create_subscription if parent_rpcs.respond_to? :create_subscription + @create_subscription = ::Gapic::Config::Method.new create_subscription_config + delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription + @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config + get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription + @get_subscription = ::Gapic::Config::Method.new get_subscription_config + list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions + @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config + update_subscription_config = parent_rpcs.update_subscription if parent_rpcs.respond_to? :update_subscription + @update_subscription = ::Gapic::Config::Method.new update_subscription_config + reactivate_subscription_config = parent_rpcs.reactivate_subscription if parent_rpcs.respond_to? :reactivate_subscription + @reactivate_subscription = ::Gapic::Config::Method.new reactivate_subscription_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/credentials.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/credentials.rb new file mode 100644 index 000000000000..8df39673f1cf --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/credentials.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Apps + module Events + module Subscriptions + module V1beta + module SubscriptionsService + # Credentials for the SubscriptionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly", + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.metadata", + "https://www.googleapis.com/auth/drive.metadata.readonly", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly" + ] + 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/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/operations.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/operations.rb new file mode 100644 index 000000000000..d4524f3b943f --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/operations.rb @@ -0,0 +1,815 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Apps + module Events + module Subscriptions + module V1beta + module SubscriptionsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workspaceevents.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SubscriptionsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SubscriptionsService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::Apps::Events::Subscriptions::V1beta::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.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::Apps::Events::Subscriptions::V1beta::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_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::Apps::Events::Subscriptions::V1beta::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_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::Apps::Events::Subscriptions::V1beta::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.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::Apps::Events::Subscriptions::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "workspaceevents.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/paths.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/paths.rb new file mode 100644 index 000000000000..ec0a916e8b3a --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/paths.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Apps + module Events + module Subscriptions + module V1beta + module SubscriptionsService + # Path helper methods for the SubscriptionsService API. + module Paths + ## + # Create a fully-qualified Subscription resource string. + # + # The resource will be in the following format: + # + # `subscriptions/{subscription}` + # + # @param subscription [String] + # + # @return [::String] + def subscription_path subscription: + "subscriptions/#{subscription}" + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `users/{user}` + # + # @param user [String] + # + # @return [::String] + def user_path user: + "users/#{user}" + end + + extend self + end + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest.rb new file mode 100644 index 000000000000..38399bf4a31b --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/version" + +require "google/apps/events/subscriptions/v1beta/subscriptions_service/credentials" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/paths" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/rest/operations" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/rest/client" + +module Google + module Apps + module Events + module Subscriptions + module V1beta + ## + # A service that manages subscriptions to Google Workspace events. + # + # To load this service and instantiate a REST client: + # + # require "google/apps/events/subscriptions/v1beta/subscriptions_service/rest" + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + module SubscriptionsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/rest/helpers" if ::File.file? helper_path diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/client.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/client.rb new file mode 100644 index 000000000000..76b5ea7d9fec --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/client.rb @@ -0,0 +1,1025 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service_pb" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/rest/service_stub" + +module Google + module Apps + module Events + module Subscriptions + module V1beta + module SubscriptionsService + module Rest + ## + # REST client for the SubscriptionsService service. + # + # A service that manages subscriptions to Google Workspace events. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workspaceevents.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :subscriptions_service_stub + + ## + # Configure the SubscriptionsService Client class. + # + # See {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SubscriptionsService clients + # ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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", "Apps", "Events", "Subscriptions", "V1beta"] + 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_subscription.timeout = 60.0 + + default_config.rpcs.delete_subscription.timeout = 60.0 + + default_config.rpcs.get_subscription.timeout = 60.0 + default_config.rpcs.get_subscription.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_subscriptions.timeout = 60.0 + default_config.rpcs.list_subscriptions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_subscription.timeout = 60.0 + + default_config.rpcs.reactivate_subscription.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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 + @subscriptions_service_stub.universe_domain + end + + ## + # Create a new SubscriptionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SubscriptionsService 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 + + @operations_client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @subscriptions_service_stub = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @subscriptions_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @subscriptions_service_stub.logger + end + + # Service calls + + ## + # Creates a Google Workspace subscription. To learn how to use this + # method, see [Create a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/create-subscription). + # + # @overload create_subscription(request, options = nil) + # Pass arguments to `create_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest, ::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_subscription(subscription: nil, validate_only: nil) + # Pass arguments to `create_subscription` 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 subscription [::Google::Apps::Events::Subscriptions::V1beta::Subscription, ::Hash] + # Required. The subscription resource to create. + # @param validate_only [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # create the subscription. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest.new + # + # # Call the create_subscription method. + # result = client.create_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest + + # 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_subscription.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::Apps::Events::Subscriptions::V1beta::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_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.create_subscription request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Google Workspace subscription. + # To learn how to use this method, see [Delete a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/delete-subscription). + # + # @overload delete_subscription(request, options = nil) + # Pass arguments to `delete_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest, ::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_subscription(name: nil, validate_only: nil, allow_missing: nil, etag: nil) + # Pass arguments to `delete_subscription` 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. Resource name of the subscription to delete. + # + # Format: `subscriptions/{subscription}` + # @param validate_only [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # delete the subscription. + # @param allow_missing [::Boolean] + # Optional. If set to `true` and the subscription isn't found, the request + # succeeds but doesn't delete the subscription. + # @param etag [::String] + # Optional. Etag of the subscription. + # + # If present, it must match with the server's etag. Otherwise, request + # fails with the status `ABORTED`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest.new + # + # # Call the delete_subscription method. + # result = client.delete_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest + + # 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_subscription.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::Apps::Events::Subscriptions::V1beta::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_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.delete_subscription request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a Google Workspace subscription. To learn how to use + # this method, see [Get details about a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/get-subscription). + # + # @overload get_subscription(request, options = nil) + # Pass arguments to `get_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest, ::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_subscription(name: nil) + # Pass arguments to `get_subscription` 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. Resource name of the subscription. + # + # Format: `subscriptions/{subscription}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Apps::Events::Subscriptions::V1beta::Subscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Apps::Events::Subscriptions::V1beta::Subscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest.new + # + # # Call the get_subscription method. + # result = client.get_subscription request + # + # # The returned object is of type Google::Apps::Events::Subscriptions::V1beta::Subscription. + # p result + # + def get_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest + + # 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_subscription.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::Apps::Events::Subscriptions::V1beta::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_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.get_subscription 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 Google Workspace subscriptions. To learn how to use this method, see + # [List Google Workspace + # subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions). + # + # @overload list_subscriptions(request, options = nil) + # Pass arguments to `list_subscriptions` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest, ::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_subscriptions(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_subscriptions` 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 page_size [::Integer] + # Optional. The maximum number of subscriptions to return. The service might + # return fewer than this value. + # + # If unspecified or set to `0`, up to 50 subscriptions are returned. + # + # The maximum value is 100. If you specify a value more than 100, the system + # only returns 100 subscriptions. + # @param page_token [::String] + # Optional. A page token, received from a previous list subscriptions call. + # Provide this parameter to retrieve the subsequent page. + # + # When paginating, the filter value should match the call that provided the + # page token. Passing a different value might lead to unexpected results. + # @param filter [::String] + # Required. A query filter. + # + # You can filter subscriptions by event type (`event_types`) + # and target resource (`target_resource`). + # + # You must specify at least one event type in your query. To filter for + # multiple event types, use the `OR` operator. + # + # To filter by both event type and target resource, use the `AND` operator + # and specify the full resource name, such as + # `//chat.googleapis.com/spaces/{space}`. + # + # For example, the following queries are valid: + # + # ``` + # event_types:"google.workspace.chat.membership.v1.updated" OR + # event_types:"google.workspace.chat.message.v1.created" + # + # event_types:"google.workspace.chat.message.v1.created" AND + # target_resource="//chat.googleapis.com/spaces/\\{space}" + # + # ( event_types:"google.workspace.chat.membership.v1.updated" OR + # event_types:"google.workspace.chat.message.v1.created" ) AND + # target_resource="//chat.googleapis.com/spaces/\\{space}" + # ``` + # + # The server rejects invalid queries with an `INVALID_ARGUMENT` + # error. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Events::Subscriptions::V1beta::Subscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Apps::Events::Subscriptions::V1beta::Subscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest.new + # + # # Call the list_subscriptions method. + # result = client.list_subscriptions 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::Apps::Events::Subscriptions::V1beta::Subscription. + # p item + # end + # + def list_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest + + # 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_subscriptions.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::Apps::Events::Subscriptions::V1beta::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_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.list_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @subscriptions_service_stub, :list_subscriptions, "subscriptions", 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 + + ## + # Updates or renews a Google Workspace subscription. To learn how to use this + # method, see [Update or renew a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/update-subscription). + # + # @overload update_subscription(request, options = nil) + # Pass arguments to `update_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest, ::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 update_subscription(subscription: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_subscription` 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 subscription [::Google::Apps::Events::Subscriptions::V1beta::Subscription, ::Hash] + # Required. The subscription to update. + # + # The subscription's `name` field is used to identify the subscription to + # update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The field to update. If omitted, updates any fields included in + # the request. + # + # You can update one of the following fields in a subscription: + # + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#expire_time `expire_time`}: The timestamp when the + # subscription expires. + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#ttl `ttl`}: The + # time-to-live (TTL) or duration of the + # subscription. + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#event_types `event_types`}: The list of event types to + # receive about the target resource. + # + # To fully replace the subscription (the equivalent of `PUT`), use `*`. Any + # omitted fields are updated with empty values. + # @param validate_only [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # update the subscription. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest.new + # + # # Call the update_subscription method. + # result = client.update_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest + + # 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.update_subscription.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::Apps::Events::Subscriptions::V1beta::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.update_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.update_subscription request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reactivates a suspended Google Workspace subscription. + # + # This method resets your subscription's `State` field to `ACTIVE`. Before + # you use this method, you must fix the error that suspended the + # subscription. This method will ignore or reject any subscription that + # isn't currently in a suspended state. To learn how to use this method, see + # [Reactivate a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription). + # + # @overload reactivate_subscription(request, options = nil) + # Pass arguments to `reactivate_subscription` via a request object, either of type + # {::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest, ::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 reactivate_subscription(name: nil) + # Pass arguments to `reactivate_subscription` 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. Resource name of the subscription. + # + # Format: `subscriptions/{subscription}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/apps/events/subscriptions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest.new + # + # # Call the reactivate_subscription method. + # result = client.reactivate_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def reactivate_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest + + # 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.reactivate_subscription.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::Apps::Events::Subscriptions::V1beta::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.reactivate_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reactivate_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @subscriptions_service_stub.reactivate_subscription request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 SubscriptionsService REST API. + # + # This class represents the configuration for SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_subscription.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 = "workspaceevents.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 SubscriptionsService 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_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_subscription + ## + # RPC-specific configuration for `delete_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_subscription + ## + # RPC-specific configuration for `get_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_subscription + ## + # RPC-specific configuration for `list_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subscriptions + ## + # RPC-specific configuration for `update_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_subscription + ## + # RPC-specific configuration for `reactivate_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :reactivate_subscription + + # @private + def initialize parent_rpcs = nil + create_subscription_config = parent_rpcs.create_subscription if parent_rpcs.respond_to? :create_subscription + @create_subscription = ::Gapic::Config::Method.new create_subscription_config + delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription + @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config + get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription + @get_subscription = ::Gapic::Config::Method.new get_subscription_config + list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions + @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config + update_subscription_config = parent_rpcs.update_subscription if parent_rpcs.respond_to? :update_subscription + @update_subscription = ::Gapic::Config::Method.new update_subscription_config + reactivate_subscription_config = parent_rpcs.reactivate_subscription if parent_rpcs.respond_to? :reactivate_subscription + @reactivate_subscription = ::Gapic::Config::Method.new reactivate_subscription_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/operations.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/operations.rb new file mode 100644 index 000000000000..f29ea59648e1 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/operations.rb @@ -0,0 +1,916 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Apps + module Events + module Subscriptions + module V1beta + module SubscriptionsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workspaceevents.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SubscriptionsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SubscriptionsService Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::Apps::Events::Subscriptions::V1beta::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::Apps::Events::Subscriptions::V1beta::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::Apps::Events::Subscriptions::V1beta::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::Apps::Events::Subscriptions::V1beta::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "workspaceevents.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/service_stub.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/service_stub.rb new file mode 100644 index 000000000000..fce0a366c9fb --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service/rest/service_stub.rb @@ -0,0 +1,448 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service_pb" + +module Google + module Apps + module Events + module Subscriptions + module V1beta + module SubscriptionsService + module Rest + ## + # REST service stub for the SubscriptionsService 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: true, + 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_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_subscription_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_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_subscription_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_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest] + # 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::Apps::Events::Subscriptions::V1beta::Subscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Apps::Events::Subscriptions::V1beta::Subscription] + # A result object deserialized from the server's reply + def get_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_subscription_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_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Apps::Events::Subscriptions::V1beta::Subscription.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_subscriptions REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest] + # 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::Apps::Events::Subscriptions::V1beta::ListSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_subscriptions_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_subscriptions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_subscription_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: "update_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the reactivate_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def reactivate_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reactivate_subscription_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: "reactivate_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest] + # 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_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/subscriptions", + body: "subscription", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest] + # 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_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest] + # 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_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_subscriptions REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest] + # 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_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/subscriptions", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{subscription.name}", + body: "subscription", + matches: [ + ["subscription.name", %r{^subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reactivate_subscription REST call + # + # @param request_pb [::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_reactivate_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:reactivate", + body: "*", + matches: [ + ["name", %r{^subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service_pb.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service_pb.rb new file mode 100644 index 000000000000..cddd9ffa2a9c --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/apps/events/subscriptions/v1beta/subscriptions_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/apps/events/subscriptions/v1beta/subscription_resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nCgoogle/apps/events/subscriptions/v1beta/subscriptions_service.proto\x12\'google.apps.events.subscriptions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x43google/apps/events/subscriptions/v1beta/subscription_resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x89\x01\n\x19\x43reateSubscriptionRequest\x12P\n\x0csubscription\x18\x01 \x01(\x0b\x32\x35.google.apps.events.subscriptions.v1beta.SubscriptionB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa9\x01\n\x19\x44\x65leteSubscriptionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workspaceevents.googleapis.com/Subscription\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"[\n\x16GetSubscriptionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workspaceevents.googleapis.com/Subscription\"\xbf\x01\n\x19UpdateSubscriptionRequest\x12P\n\x0csubscription\x18\x01 \x01(\x0b\x32\x35.google.apps.events.subscriptions.v1beta.SubscriptionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"b\n\x1dReactivateSubscriptionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workspaceevents.googleapis.com/Subscription\"`\n\x18ListSubscriptionsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x82\x01\n\x19ListSubscriptionsResponse\x12L\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x35.google.apps.events.subscriptions.v1beta.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1c\n\x1aUpdateSubscriptionMetadata\"\x1c\n\x1a\x43reateSubscriptionMetadata\"\x1c\n\x1a\x44\x65leteSubscriptionMetadata\" \n\x1eReactivateSubscriptionMetadata2\xf5\x10\n\x14SubscriptionsService\x12\xe0\x01\n\x12\x43reateSubscription\x12\x42.google.apps.events.subscriptions.v1beta.CreateSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41*\n\x0cSubscription\x12\x1a\x43reateSubscriptionMetadata\xda\x41\x0csubscription\x82\xd3\xe4\x93\x02%\"\x15/v1beta/subscriptions:\x0csubscription\x12\xdc\x01\n\x12\x44\x65leteSubscription\x12\x42.google.apps.events.subscriptions.v1beta.DeleteSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"c\xca\x41\x33\n\x15google.protobuf.Empty\x12\x1a\x44\x65leteSubscriptionMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1beta/{name=subscriptions/*}\x12\xb8\x01\n\x0fGetSubscription\x12?.google.apps.events.subscriptions.v1beta.GetSubscriptionRequest\x1a\x35.google.apps.events.subscriptions.v1beta.Subscription\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1beta/{name=subscriptions/*}\x12\xc2\x01\n\x11ListSubscriptions\x12\x41.google.apps.events.subscriptions.v1beta.ListSubscriptionsRequest\x1a\x42.google.apps.events.subscriptions.v1beta.ListSubscriptionsResponse\"&\xda\x41\x06\x66ilter\x82\xd3\xe4\x93\x02\x17\x12\x15/v1beta/subscriptions\x12\x83\x02\n\x12UpdateSubscription\x12\x42.google.apps.events.subscriptions.v1beta.UpdateSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41*\n\x0cSubscription\x12\x1aUpdateSubscriptionMetadata\xda\x41\x18subscription,update_mask\x82\xd3\xe4\x93\x02;2+/v1beta/{subscription.name=subscriptions/*}:\x0csubscription\x12\xed\x01\n\x16ReactivateSubscription\x12\x46.google.apps.events.subscriptions.v1beta.ReactivateSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41.\n\x0cSubscription\x12\x1eReactivateSubscriptionMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.\")/v1beta/{name=subscriptions/*}:reactivate:\x01*\x1a\xa4\x06\xca\x41\x1eworkspaceevents.googleapis.com\xd2\x41\xff\x05https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.file,https://www.googleapis.com/auth/drive.metadata,https://www.googleapis.com/auth/drive.metadata.readonly,https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/meetings.space.created,https://www.googleapis.com/auth/meetings.space.readonlyB\xa5\x02\n+com.google.apps.events.subscriptions.v1betaB\x19SubscriptionsServiceProtoP\x01ZWcloud.google.com/go/apps/events/subscriptions/apiv1beta/subscriptionspb;subscriptionspb\xaa\x02\'Google.Apps.Events.Subscriptions.V1Beta\xca\x02\'Google\\Apps\\Events\\Subscriptions\\V1beta\xea\x02+Google::Apps::Events::Subscriptions::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.apps.events.subscriptions.v1beta.Subscription", "google/apps/events/subscriptions/v1beta/subscription_resource.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Apps + module Events + module Subscriptions + module V1beta + CreateSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.CreateSubscriptionRequest").msgclass + DeleteSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.DeleteSubscriptionRequest").msgclass + GetSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.GetSubscriptionRequest").msgclass + UpdateSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.UpdateSubscriptionRequest").msgclass + ReactivateSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.ReactivateSubscriptionRequest").msgclass + ListSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.ListSubscriptionsRequest").msgclass + ListSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.ListSubscriptionsResponse").msgclass + UpdateSubscriptionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.UpdateSubscriptionMetadata").msgclass + CreateSubscriptionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.CreateSubscriptionMetadata").msgclass + DeleteSubscriptionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.DeleteSubscriptionMetadata").msgclass + ReactivateSubscriptionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.apps.events.subscriptions.v1beta.ReactivateSubscriptionMetadata").msgclass + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service_services_pb.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service_services_pb.rb new file mode 100644 index 000000000000..2aabb77d0ed9 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/subscriptions_service_services_pb.rb @@ -0,0 +1,75 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/apps/events/subscriptions/v1beta/subscriptions_service.proto for package 'Google.Apps.Events.Subscriptions.V1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service_pb' + +module Google + module Apps + module Events + module Subscriptions + module V1beta + module SubscriptionsService + # A service that manages subscriptions to Google Workspace events. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.apps.events.subscriptions.v1beta.SubscriptionsService' + + # Creates a Google Workspace subscription. To learn how to use this + # method, see [Create a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/create-subscription). + # + rpc :CreateSubscription, ::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest, ::Google::Longrunning::Operation + # Deletes a Google Workspace subscription. + # To learn how to use this method, see [Delete a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/delete-subscription). + rpc :DeleteSubscription, ::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest, ::Google::Longrunning::Operation + # Gets details about a Google Workspace subscription. To learn how to use + # this method, see [Get details about a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/get-subscription). + rpc :GetSubscription, ::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest, ::Google::Apps::Events::Subscriptions::V1beta::Subscription + # Lists Google Workspace subscriptions. To learn how to use this method, see + # [List Google Workspace + # subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions). + rpc :ListSubscriptions, ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest, ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsResponse + # Updates or renews a Google Workspace subscription. To learn how to use this + # method, see [Update or renew a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/update-subscription). + rpc :UpdateSubscription, ::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest, ::Google::Longrunning::Operation + # Reactivates a suspended Google Workspace subscription. + # + # This method resets your subscription's `State` field to `ACTIVE`. Before + # you use this method, you must fix the error that suspended the + # subscription. This method will ignore or reject any subscription that + # isn't currently in a suspended state. To learn how to use this method, see + # [Reactivate a Google Workspace + # subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription). + rpc :ReactivateSubscription, ::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/version.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/version.rb new file mode 100644 index 000000000000..de3c4fd98857 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Apps + module Events + module Subscriptions + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/proto_docs/README.md b/google-apps-events-subscriptions-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..cbc3e24621e8 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Google Workspace Events V1BETA 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/google-apps-events-subscriptions-v1beta/proto_docs/google/api/client.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-apps-events-subscriptions-v1beta/proto_docs/google/api/field_behavior.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/proto_docs/google/api/field_info.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..cea53f02d1a8 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/proto_docs/google/api/launch_stage.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/proto_docs/google/api/resource.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb new file mode 100644 index 000000000000..61202386c28c --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb @@ -0,0 +1,257 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Apps + module Events + module Subscriptions + module V1beta + # A subscription to receive events about a Google Workspace resource. To learn + # more about subscriptions, see the [Google Workspace Events API + # overview](https://developers.google.com/workspace/events). + # @!attribute [rw] drive_options + # @return [::Google::Apps::Events::Subscriptions::V1beta::Subscription::DriveOptions] + # Optional. Features that are supported only for subscriptions on Drive + # resources. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Non-empty default. The timestamp in UTC when the subscription expires. + # Always displayed on output, regardless of what was used on input. + # + # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ttl + # @return [::Google::Protobuf::Duration] + # Input only. The time-to-live (TTL) or duration for the subscription. If + # unspecified or set to `0`, uses the maximum possible duration. + # + # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the subscription. + # + # Format: `subscriptions/{subscription}` + # @!attribute [r] uid + # @return [::String] + # Output only. System-assigned unique identifier for the subscription. + # @!attribute [rw] target_resource + # @return [::String] + # Required. Immutable. The Google Workspace resource that's monitored for + # events, formatted as the [full resource + # name](https://google.aip.dev/122#full-resource-names). To learn about + # target resources and the events that they support, see [Supported Google + # Workspace + # events](https://developers.google.com/workspace/events#supported-events). + # + # A user can only authorize your app to create one subscription for a given + # target resource. If your app tries to create another subscription with the + # same user credentials, the request returns an `ALREADY_EXISTS` error. + # @!attribute [rw] event_types + # @return [::Array<::String>] + # Required. Unordered list. Input for creating a subscription. Otherwise, + # output only. One or more types of events to receive about the target + # resource. Formatted according to the CloudEvents specification. + # + # The supported event types depend on the target resource of your + # subscription. For details, see [Supported Google Workspace + # events](https://developers.google.com/workspace/events/guides#supported-events). + # + # By default, you also receive events about the [lifecycle of your + # subscription](https://developers.google.com/workspace/events/guides/events-lifecycle). + # You don't need to specify lifecycle events for this field. + # + # If you specify an event type that doesn't exist for the target resource, + # the request returns an HTTP `400 Bad Request` status code. + # @!attribute [rw] payload_options + # @return [::Google::Apps::Events::Subscriptions::V1beta::PayloadOptions] + # Optional. Options about what data to include in the event payload. Only + # supported for Google Chat events. + # @!attribute [rw] notification_endpoint + # @return [::Google::Apps::Events::Subscriptions::V1beta::NotificationEndpoint] + # Required. Immutable. The endpoint where the subscription delivers events, + # such as a Pub/Sub topic. + # @!attribute [r] state + # @return [::Google::Apps::Events::Subscriptions::V1beta::Subscription::State] + # Output only. The state of the subscription. Determines whether the + # subscription can receive events and deliver them to the notification + # endpoint. + # @!attribute [r] suspension_reason + # @return [::Google::Apps::Events::Subscriptions::V1beta::Subscription::ErrorType] + # Output only. The error that suspended the subscription. + # + # To reactivate the subscription, resolve the error and call the + # {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#reactivate_subscription `ReactivateSubscription`} + # method. + # @!attribute [r] authority + # @return [::String] + # Output only. The user who authorized the creation of the subscription. + # + # Format: `users/{user}` + # + # For Google Workspace users, the `{user}` value is the + # [`user.id`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) + # field from the Directory API. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the subscription is created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time that the subscription is updated. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. If `true`, the subscription is in the process of being + # updated. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and might be sent on update requests to ensure the client has + # an up-to-date value before proceeding. + class Subscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional supported options for serving Drive events. + # @!attribute [rw] include_descendants + # @return [::Boolean] + # Optional. Immutable. Whether to include all the descendant Drive files in + # the list of events. If false, the subscription will be created for the + # single file/drive that is specified as the + # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}. + # + # This flag can be used when the + # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`} + # is either a + # [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives) + # or a [Drive + # file](https://developers.google.com/drive/api/reference/rest/v3/files) + # that has mimeType set to `application/vnd.google-apps.folder`. + class DriveOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible states for the subscription. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The subscription is active and can receive and deliver events to its + # notification endpoint. + ACTIVE = 1 + + # The subscription is unable to receive events due to an error. + # To identify the error, see the + # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`} + # field. + SUSPENDED = 2 + + # The subscription is deleted. + DELETED = 3 + end + + # Possible errors for a subscription. + module ErrorType + # Default value. This value is unused. + ERROR_TYPE_UNSPECIFIED = 0 + + # The authorizing user has revoked the grant of one or more OAuth scopes. + # To learn more about authorization for Google Workspace, see [Configure + # the OAuth consent + # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes). + USER_SCOPE_REVOKED = 1 + + # The target resource for the subscription no longer exists. + RESOURCE_DELETED = 2 + + # The user that authorized the creation of the subscription no longer has + # access to the subscription's target resource. + USER_AUTHORIZATION_FAILURE = 3 + + # The Google Workspace application doesn't have access to deliver + # events to your subscription's notification endpoint. + ENDPOINT_PERMISSION_DENIED = 4 + + # The subscription's notification endpoint doesn't exist, or the endpoint + # can't be found in the Google Cloud project where you created the + # subscription. + ENDPOINT_NOT_FOUND = 6 + + # The subscription's notification endpoint failed to receive events due to + # insufficient quota or reaching rate limiting. + ENDPOINT_RESOURCE_EXHAUSTED = 7 + + # An unidentified error has occurred. + OTHER = 5 + end + end + + # Options about what data to include in the event payload. Only supported for + # Google Chat events. + # @!attribute [rw] include_resource + # @return [::Boolean] + # Optional. Whether the event payload includes data about the resource that + # changed. For example, for an event where a Google Chat message was created, + # whether the payload contains data about the + # [`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) + # resource. If false, the event payload only includes the name of the changed + # resource. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. If `include_resource` is set to `true`, the list of fields to + # include in the event payload. Separate fields with a comma. For example, to + # include a Google Chat message's sender and create time, enter + # `message.sender,message.createTime`. If omitted, the payload includes all + # fields for the resource. + # + # If you specify a field that doesn't exist for the resource, the system + # ignores the field. + class PayloadOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The endpoint where the subscription delivers events. + # @!attribute [rw] pubsub_topic + # @return [::String] + # Immutable. The Pub/Sub topic that receives events for the subscription. + # + # Format: `projects/{project}/topics/{topic}` + # + # + # You must create the topic in the same Google Cloud project where + # you create this subscription. + # + # Note: The Workspace Events API uses [ordering + # keys](https://cloud.google.com/pubsub/docs/ordering) for the benefit of + # sequential events. If the Cloud Pub/Sub topic has a [message storage + # policy](https://cloud.google.com/pubsub/docs/resource-location-restriction#exceptions) + # configured to exclude the nearest Google Cloud region, publishing events + # with ordering keys will fail. + # + # When the topic receives events, the events are encoded as Pub/Sub + # messages. For details, see the [Google Cloud Pub/Sub Protocol Binding for + # CloudEvents](https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md). + class NotificationEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/proto_docs/google/apps/events/subscriptions/v1beta/subscriptions_service.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/apps/events/subscriptions/v1beta/subscriptions_service.rb new file mode 100644 index 000000000000..757bb02b6ce7 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/apps/events/subscriptions/v1beta/subscriptions_service.rb @@ -0,0 +1,217 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Apps + module Events + module Subscriptions + module V1beta + # The request message for + # {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#create_subscription SubscriptionsService.CreateSubscription}. + # @!attribute [rw] subscription + # @return [::Google::Apps::Events::Subscriptions::V1beta::Subscription] + # Required. The subscription resource to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # create the subscription. + class CreateSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#delete_subscription SubscriptionsService.DeleteSubscription}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription to delete. + # + # Format: `subscriptions/{subscription}` + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # delete the subscription. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to `true` and the subscription isn't found, the request + # succeeds but doesn't delete the subscription. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag of the subscription. + # + # If present, it must match with the server's etag. Otherwise, request + # fails with the status `ABORTED`. + class DeleteSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#get_subscription SubscriptionsService.GetSubscription}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription. + # + # Format: `subscriptions/{subscription}` + class GetSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#update_subscription SubscriptionsService.UpdateSubscription}. + # @!attribute [rw] subscription + # @return [::Google::Apps::Events::Subscriptions::V1beta::Subscription] + # Required. The subscription to update. + # + # The subscription's `name` field is used to identify the subscription to + # update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The field to update. If omitted, updates any fields included in + # the request. + # + # You can update one of the following fields in a subscription: + # + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#expire_time `expire_time`}: The timestamp when the + # subscription expires. + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#ttl `ttl`}: The + # time-to-live (TTL) or duration of the + # subscription. + # * {::Google::Apps::Events::Subscriptions::V1beta::Subscription#event_types `event_types`}: The list of event types to + # receive about the target resource. + # + # To fully replace the subscription (the equivalent of `PUT`), use `*`. Any + # omitted fields are updated with empty values. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set to `true`, validates and previews the request, but doesn't + # update the subscription. + class UpdateSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#reactivate_subscription SubscriptionsService.ReactivateSubscription}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription. + # + # Format: `subscriptions/{subscription}` + class ReactivateSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#list_subscriptions SubscriptionsService.ListSubscriptions}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of subscriptions to return. The service might + # return fewer than this value. + # + # If unspecified or set to `0`, up to 50 subscriptions are returned. + # + # The maximum value is 100. If you specify a value more than 100, the system + # only returns 100 subscriptions. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous list subscriptions call. + # Provide this parameter to retrieve the subsequent page. + # + # When paginating, the filter value should match the call that provided the + # page token. Passing a different value might lead to unexpected results. + # @!attribute [rw] filter + # @return [::String] + # Required. A query filter. + # + # You can filter subscriptions by event type (`event_types`) + # and target resource (`target_resource`). + # + # You must specify at least one event type in your query. To filter for + # multiple event types, use the `OR` operator. + # + # To filter by both event type and target resource, use the `AND` operator + # and specify the full resource name, such as + # `//chat.googleapis.com/spaces/{space}`. + # + # For example, the following queries are valid: + # + # ``` + # event_types:"google.workspace.chat.membership.v1.updated" OR + # event_types:"google.workspace.chat.message.v1.created" + # + # event_types:"google.workspace.chat.message.v1.created" AND + # target_resource="//chat.googleapis.com/spaces/\\{space}" + # + # ( event_types:"google.workspace.chat.membership.v1.updated" OR + # event_types:"google.workspace.chat.message.v1.created" ) AND + # target_resource="//chat.googleapis.com/spaces/\\{space}" + # ``` + # + # The server rejects invalid queries with an `INVALID_ARGUMENT` + # error. + class ListSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#list_subscriptions SubscriptionsService.ListSubscriptions}. + # @!attribute [rw] subscriptions + # @return [::Array<::Google::Apps::Events::Subscriptions::V1beta::Subscription>] + # List of subscriptions. + # @!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 ListSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for UpdateSubscription LRO. + class UpdateSubscriptionMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for CreateSubscription LRO. + class CreateSubscriptionMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for DeleteSubscription LRO. + class DeleteSubscriptionMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for ReactivateSubscription LRO. + class ReactivateSubscriptionMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/proto_docs/google/longrunning/operations.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..977abe95a483 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,173 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/any.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..9e9bdbb09ea4 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/duration.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/empty.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-apps-events-subscriptions-v1beta/proto_docs/google/rpc/status.rb b/google-apps-events-subscriptions-v1beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..3f61f95b2587 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/snippets/Gemfile b/google-apps-events-subscriptions-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..ef651bbab329 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-apps-events-subscriptions-v1beta", path: "../" +else + gem "google-apps-events-subscriptions-v1beta" +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/google-apps-events-subscriptions-v1beta/snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json b/google-apps-events-subscriptions-v1beta/snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json new file mode 100644 index 000000000000..6fcb317d7f7e --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-apps-events-subscriptions-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.apps.events.subscriptions.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "workspaceevents_v1beta_generated_SubscriptionsService_CreateSubscription_sync", + "title": "Snippet for the create_subscription call in the SubscriptionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#create_subscription.", + "file": "subscriptions_service/create_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_subscription", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#create_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SubscriptionsService::Client", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client" + }, + "method": { + "short_name": "CreateSubscription", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService.CreateSubscription", + "service": { + "short_name": "SubscriptionsService", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workspaceevents_v1beta_generated_SubscriptionsService_DeleteSubscription_sync", + "title": "Snippet for the delete_subscription call in the SubscriptionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#delete_subscription.", + "file": "subscriptions_service/delete_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_subscription", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#delete_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SubscriptionsService::Client", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client" + }, + "method": { + "short_name": "DeleteSubscription", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService.DeleteSubscription", + "service": { + "short_name": "SubscriptionsService", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workspaceevents_v1beta_generated_SubscriptionsService_GetSubscription_sync", + "title": "Snippet for the get_subscription call in the SubscriptionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#get_subscription.", + "file": "subscriptions_service/get_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_subscription", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#get_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Apps::Events::Subscriptions::V1beta::Subscription", + "client": { + "short_name": "SubscriptionsService::Client", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client" + }, + "method": { + "short_name": "GetSubscription", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService.GetSubscription", + "service": { + "short_name": "SubscriptionsService", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workspaceevents_v1beta_generated_SubscriptionsService_ListSubscriptions_sync", + "title": "Snippet for the list_subscriptions call in the SubscriptionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#list_subscriptions.", + "file": "subscriptions_service/list_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_subscriptions", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#list_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsResponse", + "client": { + "short_name": "SubscriptionsService::Client", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client" + }, + "method": { + "short_name": "ListSubscriptions", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService.ListSubscriptions", + "service": { + "short_name": "SubscriptionsService", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workspaceevents_v1beta_generated_SubscriptionsService_UpdateSubscription_sync", + "title": "Snippet for the update_subscription call in the SubscriptionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#update_subscription.", + "file": "subscriptions_service/update_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_subscription", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#update_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SubscriptionsService::Client", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client" + }, + "method": { + "short_name": "UpdateSubscription", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService.UpdateSubscription", + "service": { + "short_name": "SubscriptionsService", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workspaceevents_v1beta_generated_SubscriptionsService_ReactivateSubscription_sync", + "title": "Snippet for the reactivate_subscription call in the SubscriptionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#reactivate_subscription.", + "file": "subscriptions_service/reactivate_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "reactivate_subscription", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#reactivate_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SubscriptionsService::Client", + "full_name": "::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client" + }, + "method": { + "short_name": "ReactivateSubscription", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService.ReactivateSubscription", + "service": { + "short_name": "SubscriptionsService", + "full_name": "google.apps.events.subscriptions.v1beta.SubscriptionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/create_subscription.rb b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/create_subscription.rb new file mode 100644 index 000000000000..cb0f490b9125 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/create_subscription.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 workspaceevents_v1beta_generated_SubscriptionsService_CreateSubscription_sync] +require "google/apps/events/subscriptions/v1beta" + +## +# Snippet for the create_subscription call in the SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#create_subscription. +# +def create_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest.new + + # Call the create_subscription method. + result = client.create_subscription request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workspaceevents_v1beta_generated_SubscriptionsService_CreateSubscription_sync] diff --git a/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/delete_subscription.rb b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/delete_subscription.rb new file mode 100644 index 000000000000..ab8720399140 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/delete_subscription.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 workspaceevents_v1beta_generated_SubscriptionsService_DeleteSubscription_sync] +require "google/apps/events/subscriptions/v1beta" + +## +# Snippet for the delete_subscription call in the SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#delete_subscription. +# +def delete_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest.new + + # Call the delete_subscription method. + result = client.delete_subscription request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workspaceevents_v1beta_generated_SubscriptionsService_DeleteSubscription_sync] diff --git a/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/get_subscription.rb b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/get_subscription.rb new file mode 100644 index 000000000000..93530e8d6ab5 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/get_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 workspaceevents_v1beta_generated_SubscriptionsService_GetSubscription_sync] +require "google/apps/events/subscriptions/v1beta" + +## +# Snippet for the get_subscription call in the SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#get_subscription. +# +def get_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest.new + + # Call the get_subscription method. + result = client.get_subscription request + + # The returned object is of type Google::Apps::Events::Subscriptions::V1beta::Subscription. + p result +end +# [END workspaceevents_v1beta_generated_SubscriptionsService_GetSubscription_sync] diff --git a/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/list_subscriptions.rb b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/list_subscriptions.rb new file mode 100644 index 000000000000..4f61c05a72a8 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/list_subscriptions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 workspaceevents_v1beta_generated_SubscriptionsService_ListSubscriptions_sync] +require "google/apps/events/subscriptions/v1beta" + +## +# Snippet for the list_subscriptions call in the SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#list_subscriptions. +# +def list_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest.new + + # Call the list_subscriptions method. + result = client.list_subscriptions 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::Apps::Events::Subscriptions::V1beta::Subscription. + p item + end +end +# [END workspaceevents_v1beta_generated_SubscriptionsService_ListSubscriptions_sync] diff --git a/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/reactivate_subscription.rb b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/reactivate_subscription.rb new file mode 100644 index 000000000000..64709312066c --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/reactivate_subscription.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 workspaceevents_v1beta_generated_SubscriptionsService_ReactivateSubscription_sync] +require "google/apps/events/subscriptions/v1beta" + +## +# Snippet for the reactivate_subscription call in the SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#reactivate_subscription. +# +def reactivate_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest.new + + # Call the reactivate_subscription method. + result = client.reactivate_subscription request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workspaceevents_v1beta_generated_SubscriptionsService_ReactivateSubscription_sync] diff --git a/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/update_subscription.rb b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/update_subscription.rb new file mode 100644 index 000000000000..378ad56e7caa --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/snippets/subscriptions_service/update_subscription.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 workspaceevents_v1beta_generated_SubscriptionsService_UpdateSubscription_sync] +require "google/apps/events/subscriptions/v1beta" + +## +# Snippet for the update_subscription call in the SubscriptionsService 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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client#update_subscription. +# +def update_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest.new + + # Call the update_subscription method. + result = client.update_subscription request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workspaceevents_v1beta_generated_SubscriptionsService_UpdateSubscription_sync] diff --git a/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_operations_test.rb b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_operations_test.rb new file mode 100644 index 000000000000..96f995852277 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service_pb" +require "google/apps/events/subscriptions/v1beta/subscriptions_service_services_pb" +require "google/apps/events/subscriptions/v1beta/subscriptions_service" + +class ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations.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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations::Configuration, config + end +end diff --git a/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_paths_test.rb b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_paths_test.rb new file mode 100644 index 000000000000..b5ea40bba597 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service" + +class ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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_subscription_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.subscription_path subscription: "value0" + assert_equal "subscriptions/value0", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path user: "value0" + assert_equal "users/value0", path + end + end +end diff --git a/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_rest_test.rb b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_rest_test.rb new file mode 100644 index 000000000000..b3e2c1d6c5ec --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_rest_test.rb @@ -0,0 +1,431 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service_pb" +require "google/apps/events/subscriptions/v1beta/subscriptions_service/rest" + + +class ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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_subscription + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + subscription = {} + validate_only = true + + create_subscription_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::ServiceStub.stub :transcode_create_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_subscription({ subscription: subscription, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_subscription subscription: subscription, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_subscription ::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest.new(subscription: subscription, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_subscription({ subscription: subscription, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_subscription(::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest.new(subscription: subscription, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_subscription_client_stub.call_count + end + end + end + + def test_delete_subscription + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + allow_missing = true + etag = "hello world" + + delete_subscription_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::ServiceStub.stub :transcode_delete_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_subscription({ name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_subscription name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_subscription ::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest.new(name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_subscription({ name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_subscription(::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest.new(name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_subscription_client_stub.call_count + end + end + end + + def test_get_subscription + # Create test objects. + client_result = ::Google::Apps::Events::Subscriptions::V1beta::Subscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_subscription_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::ServiceStub.stub :transcode_get_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_subscription ::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_subscription(::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_subscription_client_stub.call_count + end + end + end + + def test_list_subscriptions + # Create test objects. + client_result = ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_subscriptions_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::ServiceStub.stub :transcode_list_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_subscriptions_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_subscriptions({ 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_subscriptions 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_subscriptions ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest.new(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_subscriptions({ 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_subscriptions(::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest.new(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_subscriptions_client_stub.call_count + end + end + end + + def test_update_subscription + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + subscription = {} + update_mask = {} + validate_only = true + + update_subscription_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::ServiceStub.stub :transcode_update_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_subscription({ subscription: subscription, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_subscription subscription: subscription, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_subscription ::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest.new(subscription: subscription, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_subscription({ subscription: subscription, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_subscription(::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest.new(subscription: subscription, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_subscription_client_stub.call_count + end + end + end + + def test_reactivate_subscription + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + reactivate_subscription_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::ServiceStub.stub :transcode_reactivate_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reactivate_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.reactivate_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.reactivate_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.reactivate_subscription ::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.reactivate_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.reactivate_subscription(::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reactivate_subscription_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Rest::Client::Configuration, config + end +end diff --git a/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb new file mode 100644 index 000000000000..f671b2542b52 --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/apps/events/subscriptions/v1beta/subscriptions_service_pb" +require "google/apps/events/subscriptions/v1beta/subscriptions_service_services_pb" +require "google/apps/events/subscriptions/v1beta/subscriptions_service" + +class ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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_subscription + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + subscription = {} + validate_only = true + + create_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_subscription, name + assert_kind_of ::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Apps::Events::Subscriptions::V1beta::Subscription), request["subscription"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_subscription({ subscription: subscription, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_subscription subscription: subscription, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_subscription ::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest.new(subscription: subscription, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_subscription({ subscription: subscription, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_subscription(::Google::Apps::Events::Subscriptions::V1beta::CreateSubscriptionRequest.new(subscription: subscription, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_subscription_client_stub.call_rpc_count + end + end + + def test_delete_subscription + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + validate_only = true + allow_missing = true + etag = "hello world" + + delete_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_subscription, name + assert_kind_of ::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_subscription({ name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_subscription name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_subscription ::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest.new(name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_subscription({ name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_subscription(::Google::Apps::Events::Subscriptions::V1beta::DeleteSubscriptionRequest.new(name: name, validate_only: validate_only, allow_missing: allow_missing, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_subscription_client_stub.call_rpc_count + end + end + + def test_get_subscription + # Create GRPC objects. + grpc_response = ::Google::Apps::Events::Subscriptions::V1beta::Subscription.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" + + get_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_subscription, name + assert_kind_of ::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_subscription ::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_subscription({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_subscription(::Google::Apps::Events::Subscriptions::V1beta::GetSubscriptionRequest.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, get_subscription_client_stub.call_rpc_count + end + end + + def test_list_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsResponse.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. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_subscriptions, name + assert_kind_of ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest, request + 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_subscriptions_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_subscriptions({ 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_subscriptions 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_subscriptions ::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest.new(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_subscriptions({ 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_subscriptions(::Google::Apps::Events::Subscriptions::V1beta::ListSubscriptionsRequest.new(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_subscriptions_client_stub.call_rpc_count + end + end + + def test_update_subscription + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + subscription = {} + update_mask = {} + validate_only = true + + update_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_subscription, name + assert_kind_of ::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Apps::Events::Subscriptions::V1beta::Subscription), request["subscription"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_subscription({ subscription: subscription, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_subscription subscription: subscription, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_subscription ::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest.new(subscription: subscription, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_subscription({ subscription: subscription, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_subscription(::Google::Apps::Events::Subscriptions::V1beta::UpdateSubscriptionRequest.new(subscription: subscription, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_subscription_client_stub.call_rpc_count + end + end + + def test_reactivate_subscription + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + reactivate_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reactivate_subscription, name + assert_kind_of ::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reactivate_subscription_client_stub do + # Create client + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.reactivate_subscription({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.reactivate_subscription name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.reactivate_subscription ::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.reactivate_subscription({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.reactivate_subscription(::Google::Apps::Events::Subscriptions::V1beta::ReactivateSubscriptionRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, reactivate_subscription_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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::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::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::Operations, client.operations_client + end +end diff --git a/google-apps-events-subscriptions-v1beta/test/helper.rb b/google-apps-events-subscriptions-v1beta/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-apps-events-subscriptions-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 841eb77b62c7..9b1946662d3d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -59,6 +59,10 @@ "component": "google-apps-events-subscriptions-v1", "version_file": "lib/google/apps/events/subscriptions/v1/version.rb" }, + "google-apps-events-subscriptions-v1beta": { + "component": "google-apps-events-subscriptions-v1beta", + "version_file": "lib/google/apps/events/subscriptions/v1beta/version.rb" + }, "google-apps-meet": { "component": "google-apps-meet", "version_file": "lib/google/apps/meet/version.rb" From dcf3344e1c5a867028db55e0f0d553805462febc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 14:19:27 -0700 Subject: [PATCH 370/457] chore(main): release google-cloud-firestore 3.1.0 (#30491) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-cloud-firestore/CHANGELOG.md | 8 ++++++++ .../lib/google/cloud/firestore/version.rb | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fabd1c70ad55..9da0c5af597c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -387,7 +387,7 @@ "google-cloud-financial_services+FILLER": "0.0.0", "google-cloud-financial_services-v1": "0.2.0", "google-cloud-financial_services-v1+FILLER": "0.0.0", - "google-cloud-firestore": "3.0.0", + "google-cloud-firestore": "3.1.0", "google-cloud-firestore+FILLER": "0.0.0", "google-cloud-firestore-admin": "0.5.1", "google-cloud-firestore-admin+FILLER": "0.0.0", diff --git a/google-cloud-firestore/CHANGELOG.md b/google-cloud-firestore/CHANGELOG.md index d2912d3650ca..d8245a8bc1b8 100644 --- a/google-cloud-firestore/CHANGELOG.md +++ b/google-cloud-firestore/CHANGELOG.md @@ -1,5 +1,13 @@ # Release History +### 3.1.0 (2025-08-07) + +#### Features + +* add AggregateQuery explanation features for RubyFirestore ([#30484](https://github.com/googleapis/google-cloud-ruby/issues/30484)) +* add Query explanation features for Ruby Firestore ([#29469](https://github.com/googleapis/google-cloud-ruby/issues/29469)) +* update routing headers to new format ([#30481](https://github.com/googleapis/google-cloud-ruby/issues/30481)) + ### 3.0.0 (2025-03-10) ### ⚠ BREAKING CHANGES diff --git a/google-cloud-firestore/lib/google/cloud/firestore/version.rb b/google-cloud-firestore/lib/google/cloud/firestore/version.rb index 65e4be3f3eda..b0f1d1928491 100644 --- a/google-cloud-firestore/lib/google/cloud/firestore/version.rb +++ b/google-cloud-firestore/lib/google/cloud/firestore/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Firestore - VERSION = "3.0.0".freeze + VERSION = "3.1.0".freeze end end end From 2682b6e929ed5c473f352b02c028a30cd198dc20 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:23:02 -0700 Subject: [PATCH 371/457] chore(main): release google-shopping-merchant-accounts-v1 0.1.0 (#30786) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-accounts-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-shopping-merchant-accounts-v1/.repo-metadata.json | 2 +- google-shopping-merchant-accounts-v1/CHANGELOG.md | 9 ++++++++- .../lib/google/shopping/merchant/accounts/v1/version.rb | 2 +- ...et_metadata_google.shopping.merchant.accounts.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9da0c5af597c..05bf5cb72c76 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -909,7 +909,7 @@ "google-shopping-css-v1+FILLER": "0.0.0", "google-shopping-merchant-accounts": "0.6.0", "google-shopping-merchant-accounts+FILLER": "0.0.0", - "google-shopping-merchant-accounts-v1": "0.0.1", + "google-shopping-merchant-accounts-v1": "0.1.0", "google-shopping-merchant-accounts-v1+FILLER": "0.0.0", "google-shopping-merchant-accounts-v1beta": "0.11.0", "google-shopping-merchant-accounts-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-accounts-v1/.repo-metadata.json b/google-shopping-merchant-accounts-v1/.repo-metadata.json index 5b45e687009c..f2741a2b6a32 100644 --- a/google-shopping-merchant-accounts-v1/.repo-metadata.json +++ b/google-shopping-merchant-accounts-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", diff --git a/google-shopping-merchant-accounts-v1/CHANGELOG.md b/google-shopping-merchant-accounts-v1/CHANGELOG.md index f88957a62ba2..a67f8d974183 100644 --- a/google-shopping-merchant-accounts-v1/CHANGELOG.md +++ b/google-shopping-merchant-accounts-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-accounts-v1 ([#30772](https://github.com/googleapis/google-cloud-ruby/issues/30772)) + +## Release History diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb index 6b67386a1d3d..0a038e3846df 100644 --- a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Accounts module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json b/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json index e65ae4f0649e..33c0999a7a4b 100644 --- a/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json +++ b/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-accounts-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 0012df8385ac6da326c32a6ecaf1073dc47da04e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:23:23 -0700 Subject: [PATCH 372/457] chore(main): release google-shopping-merchant-conversions-v1 0.1.0 (#30787) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-conversions-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-shopping-merchant-conversions-v1/CHANGELOG.md | 9 ++++++++- .../google/shopping/merchant/conversions/v1/version.rb | 2 +- ...metadata_google.shopping.merchant.conversions.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 05bf5cb72c76..44bdb43d2824 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -915,7 +915,7 @@ "google-shopping-merchant-accounts-v1beta+FILLER": "0.0.0", "google-shopping-merchant-conversions": "0.2.1", "google-shopping-merchant-conversions+FILLER": "0.0.0", - "google-shopping-merchant-conversions-v1": "0.0.1", + "google-shopping-merchant-conversions-v1": "0.1.0", "google-shopping-merchant-conversions-v1+FILLER": "0.0.0", "google-shopping-merchant-conversions-v1beta": "0.4.0", "google-shopping-merchant-conversions-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-conversions-v1/.repo-metadata.json b/google-shopping-merchant-conversions-v1/.repo-metadata.json index 20ec393175c4..1b416cc17c6f 100644 --- a/google-shopping-merchant-conversions-v1/.repo-metadata.json +++ b/google-shopping-merchant-conversions-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", diff --git a/google-shopping-merchant-conversions-v1/CHANGELOG.md b/google-shopping-merchant-conversions-v1/CHANGELOG.md index f88957a62ba2..98ff7160a1e1 100644 --- a/google-shopping-merchant-conversions-v1/CHANGELOG.md +++ b/google-shopping-merchant-conversions-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-conversions-v1 ([#30777](https://github.com/googleapis/google-cloud-ruby/issues/30777)) + +## Release History diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb index 4857d0759409..0ab421c439d1 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Conversions module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json b/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json index 141ac1a9a2fb..08e3c0af922e 100644 --- a/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json +++ b/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-conversions-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 4b355e97d77dc15b0c0fe27f14ffe03da735aa49 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:24:16 -0700 Subject: [PATCH 373/457] chore(main): release google-shopping-merchant-data_sources-v1 0.1.0 (#30788) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-data_sources-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-shopping-merchant-data_sources-v1/CHANGELOG.md | 9 ++++++++- .../google/shopping/merchant/data_sources/v1/version.rb | 2 +- ...metadata_google.shopping.merchant.datasources.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 44bdb43d2824..a627bd99b446 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -921,7 +921,7 @@ "google-shopping-merchant-conversions-v1beta+FILLER": "0.0.0", "google-shopping-merchant-data_sources": "0.3.1", "google-shopping-merchant-data_sources+FILLER": "0.0.0", - "google-shopping-merchant-data_sources-v1": "0.0.1", + "google-shopping-merchant-data_sources-v1": "0.1.0", "google-shopping-merchant-data_sources-v1+FILLER": "0.0.0", "google-shopping-merchant-data_sources-v1beta": "0.6.0", "google-shopping-merchant-data_sources-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-data_sources-v1/.repo-metadata.json b/google-shopping-merchant-data_sources-v1/.repo-metadata.json index d59439bd54bd..805bc726016f 100644 --- a/google-shopping-merchant-data_sources-v1/.repo-metadata.json +++ b/google-shopping-merchant-data_sources-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-data_sources-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-data_sources instead. See the readme for more details.", diff --git a/google-shopping-merchant-data_sources-v1/CHANGELOG.md b/google-shopping-merchant-data_sources-v1/CHANGELOG.md index f88957a62ba2..1327501fe59a 100644 --- a/google-shopping-merchant-data_sources-v1/CHANGELOG.md +++ b/google-shopping-merchant-data_sources-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-data_sources-v1 ([#30778](https://github.com/googleapis/google-cloud-ruby/issues/30778)) + +## Release History diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb index 3433857ddf7d..f1658986f09a 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module DataSources module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json b/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json index 18efc22a579b..ecd85c864661 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json +++ b/google-shopping-merchant-data_sources-v1/snippets/snippet_metadata_google.shopping.merchant.datasources.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-data_sources-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 941e6457dc9d7c1e340a6eb16f1f303ffac60cd2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:28:15 -0700 Subject: [PATCH 374/457] chore(main): release google-shopping-merchant-inventories-v1 0.1.0 (#30789) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-inventories-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-shopping-merchant-inventories-v1/CHANGELOG.md | 9 ++++++++- .../google/shopping/merchant/inventories/v1/version.rb | 2 +- ...metadata_google.shopping.merchant.inventories.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a627bd99b446..a51604f16f69 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -927,7 +927,7 @@ "google-shopping-merchant-data_sources-v1beta+FILLER": "0.0.0", "google-shopping-merchant-inventories": "0.4.1", "google-shopping-merchant-inventories+FILLER": "0.0.0", - "google-shopping-merchant-inventories-v1": "0.0.1", + "google-shopping-merchant-inventories-v1": "0.1.0", "google-shopping-merchant-inventories-v1+FILLER": "0.0.0", "google-shopping-merchant-inventories-v1beta": "0.7.0", "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-inventories-v1/.repo-metadata.json b/google-shopping-merchant-inventories-v1/.repo-metadata.json index e70b67d6c360..46a7901c7caa 100644 --- a/google-shopping-merchant-inventories-v1/.repo-metadata.json +++ b/google-shopping-merchant-inventories-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-inventories-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details.", diff --git a/google-shopping-merchant-inventories-v1/CHANGELOG.md b/google-shopping-merchant-inventories-v1/CHANGELOG.md index f88957a62ba2..2b23880a74bd 100644 --- a/google-shopping-merchant-inventories-v1/CHANGELOG.md +++ b/google-shopping-merchant-inventories-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-inventories-v1 ([#30779](https://github.com/googleapis/google-cloud-ruby/issues/30779)) + +## Release History diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb index 395d3a844ab7..041403fe7bb5 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Inventories module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json b/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json index 5fbebd90967a..597b16d9cdd4 100644 --- a/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json +++ b/google-shopping-merchant-inventories-v1/snippets/snippet_metadata_google.shopping.merchant.inventories.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-inventories-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 87b6a7990cdcb53d53ae8d7e5b1a609d1ee8ebc0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:28:49 -0700 Subject: [PATCH 375/457] chore(main): release google-shopping-merchant-issue_resolution-v1 0.1.0 (#30790) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-issue_resolution-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- .../CHANGELOG.md | 9 ++++++++- .../shopping/merchant/issue_resolution/v1/version.rb | 2 +- ...data_google.shopping.merchant.issueresolution.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a51604f16f69..f7b4700041a3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -933,7 +933,7 @@ "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution": "0.2.0", "google-shopping-merchant-issue_resolution+FILLER": "0.0.0", - "google-shopping-merchant-issue_resolution-v1": "0.0.1", + "google-shopping-merchant-issue_resolution-v1": "0.1.0", "google-shopping-merchant-issue_resolution-v1+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution-v1beta": "0.2.0", "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json b/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json index da9940c8e517..46dfebd19b44 100644 --- a/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json +++ b/google-shopping-merchant-issue_resolution-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-issue_resolution-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-issue_resolution instead. See the readme for more details.", diff --git a/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md b/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md index f88957a62ba2..913ae17ca045 100644 --- a/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md +++ b/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-issue_resolution-v1 ([#30770](https://github.com/googleapis/google-cloud-ruby/issues/30770)) + +## Release History diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb index 5bd61fc0a9cd..75970409d182 100644 --- a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module IssueResolution module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json b/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json index 6a707c6d46ec..6e22dd7b1681 100644 --- a/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json +++ b/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-issue_resolution-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From b398da081d088da27305af7a04bcd2a3bbbd2e57 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:29:25 -0700 Subject: [PATCH 376/457] chore(main): release google-shopping-merchant-lfp-v1 0.1.0 (#30791) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-lfp-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-shopping-merchant-lfp-v1/.repo-metadata.json | 2 +- google-shopping-merchant-lfp-v1/CHANGELOG.md | 9 ++++++++- .../lib/google/shopping/merchant/lfp/v1/version.rb | 2 +- ...snippet_metadata_google.shopping.merchant.lfp.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7b4700041a3..e09a3c5c97d4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -939,7 +939,7 @@ "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", "google-shopping-merchant-lfp": "0.3.1", "google-shopping-merchant-lfp+FILLER": "0.0.0", - "google-shopping-merchant-lfp-v1": "0.0.1", + "google-shopping-merchant-lfp-v1": "0.1.0", "google-shopping-merchant-lfp-v1+FILLER": "0.0.0", "google-shopping-merchant-lfp-v1beta": "0.5.0", "google-shopping-merchant-lfp-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-lfp-v1/.repo-metadata.json b/google-shopping-merchant-lfp-v1/.repo-metadata.json index 36b9e7c839c5..4feaca7f9247 100644 --- a/google-shopping-merchant-lfp-v1/.repo-metadata.json +++ b/google-shopping-merchant-lfp-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-lfp-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details.", diff --git a/google-shopping-merchant-lfp-v1/CHANGELOG.md b/google-shopping-merchant-lfp-v1/CHANGELOG.md index f88957a62ba2..d6b6880cef46 100644 --- a/google-shopping-merchant-lfp-v1/CHANGELOG.md +++ b/google-shopping-merchant-lfp-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-lfp-v1 ([#30775](https://github.com/googleapis/google-cloud-ruby/issues/30775)) + +## Release History diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb index a192705da46c..df846222c6be 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Lfp module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json b/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json index 1a6356cc1b53..14c86ea36f41 100644 --- a/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json +++ b/google-shopping-merchant-lfp-v1/snippets/snippet_metadata_google.shopping.merchant.lfp.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-lfp-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From f420245e5c440e601828bba3ddfa3a0cc0d1ee0d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:20:44 -0700 Subject: [PATCH 377/457] chore(main): release google-shopping-merchant-notifications-v1 0.1.0 (#30792) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-notifications-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-shopping-merchant-notifications-v1/CHANGELOG.md | 9 ++++++++- .../google/shopping/merchant/notifications/v1/version.rb | 2 +- ...tadata_google.shopping.merchant.notifications.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e09a3c5c97d4..b27aa4bf9382 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -945,7 +945,7 @@ "google-shopping-merchant-lfp-v1beta+FILLER": "0.0.0", "google-shopping-merchant-notifications": "0.2.1", "google-shopping-merchant-notifications+FILLER": "0.0.0", - "google-shopping-merchant-notifications-v1": "0.0.1", + "google-shopping-merchant-notifications-v1": "0.1.0", "google-shopping-merchant-notifications-v1+FILLER": "0.0.0", "google-shopping-merchant-notifications-v1beta": "0.4.0", "google-shopping-merchant-notifications-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-notifications-v1/.repo-metadata.json b/google-shopping-merchant-notifications-v1/.repo-metadata.json index 72fe215300e2..a08df4fd40a9 100644 --- a/google-shopping-merchant-notifications-v1/.repo-metadata.json +++ b/google-shopping-merchant-notifications-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-notifications-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details.", diff --git a/google-shopping-merchant-notifications-v1/CHANGELOG.md b/google-shopping-merchant-notifications-v1/CHANGELOG.md index f88957a62ba2..3ccbf23d0e9d 100644 --- a/google-shopping-merchant-notifications-v1/CHANGELOG.md +++ b/google-shopping-merchant-notifications-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-notifications-v1 ([#30776](https://github.com/googleapis/google-cloud-ruby/issues/30776)) + +## Release History diff --git a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb index d5b93b867d03..ec18fc97de90 100644 --- a/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb +++ b/google-shopping-merchant-notifications-v1/lib/google/shopping/merchant/notifications/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Notifications module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json b/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json index da3479d90d3c..9c83d40d813f 100644 --- a/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json +++ b/google-shopping-merchant-notifications-v1/snippets/snippet_metadata_google.shopping.merchant.notifications.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-notifications-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From a900296e032e058eeb88f868ec4cd5cb20a46de7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:21:17 -0700 Subject: [PATCH 378/457] chore(main): release google-shopping-merchant-order_tracking-v1 0.1.0 (#30793) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-order_tracking-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-shopping-merchant-order_tracking-v1/CHANGELOG.md | 9 ++++++++- .../shopping/merchant/order_tracking/v1/version.rb | 2 +- ...tadata_google.shopping.merchant.ordertracking.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b27aa4bf9382..5ef479686ec1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -951,7 +951,7 @@ "google-shopping-merchant-notifications-v1beta+FILLER": "0.0.0", "google-shopping-merchant-order_tracking": "0.1.0", "google-shopping-merchant-order_tracking+FILLER": "0.0.0", - "google-shopping-merchant-order_tracking-v1": "0.0.1", + "google-shopping-merchant-order_tracking-v1": "0.1.0", "google-shopping-merchant-order_tracking-v1+FILLER": "0.0.0", "google-shopping-merchant-order_tracking-v1beta": "0.1.0", "google-shopping-merchant-order_tracking-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-order_tracking-v1/.repo-metadata.json b/google-shopping-merchant-order_tracking-v1/.repo-metadata.json index 5bc02602e046..eedfa6f4c6bd 100644 --- a/google-shopping-merchant-order_tracking-v1/.repo-metadata.json +++ b/google-shopping-merchant-order_tracking-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-order_tracking-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking instead. See the readme for more details.", diff --git a/google-shopping-merchant-order_tracking-v1/CHANGELOG.md b/google-shopping-merchant-order_tracking-v1/CHANGELOG.md index f88957a62ba2..4ada880c619c 100644 --- a/google-shopping-merchant-order_tracking-v1/CHANGELOG.md +++ b/google-shopping-merchant-order_tracking-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-order_tracking-v1 ([#30768](https://github.com/googleapis/google-cloud-ruby/issues/30768)) + +## Release History diff --git a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb index 1910d6bb1a13..00e20fc48e3e 100644 --- a/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb +++ b/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module OrderTracking module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json b/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json index f52a48a047c9..62c222bab09e 100644 --- a/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json +++ b/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-order_tracking-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From b457a12100877f53cb83ed96c1109fa02998b92f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:22:21 -0700 Subject: [PATCH 379/457] chore(main): release google-shopping-merchant-products-v1 0.1.0 (#30794) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-products-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-shopping-merchant-products-v1/.repo-metadata.json | 2 +- google-shopping-merchant-products-v1/CHANGELOG.md | 9 ++++++++- .../lib/google/shopping/merchant/products/v1/version.rb | 2 +- ...et_metadata_google.shopping.merchant.products.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5ef479686ec1..6c6443d7d10b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -957,7 +957,7 @@ "google-shopping-merchant-order_tracking-v1beta+FILLER": "0.0.0", "google-shopping-merchant-products": "0.2.2", "google-shopping-merchant-products+FILLER": "0.0.0", - "google-shopping-merchant-products-v1": "0.0.1", + "google-shopping-merchant-products-v1": "0.1.0", "google-shopping-merchant-products-v1+FILLER": "0.0.0", "google-shopping-merchant-products-v1beta": "0.7.0", "google-shopping-merchant-products-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-products-v1/.repo-metadata.json b/google-shopping-merchant-products-v1/.repo-metadata.json index 6ce690bfd0d1..dc48ee9ececc 100644 --- a/google-shopping-merchant-products-v1/.repo-metadata.json +++ b/google-shopping-merchant-products-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-products-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products instead. See the readme for more details.", diff --git a/google-shopping-merchant-products-v1/CHANGELOG.md b/google-shopping-merchant-products-v1/CHANGELOG.md index f88957a62ba2..bc240c081b85 100644 --- a/google-shopping-merchant-products-v1/CHANGELOG.md +++ b/google-shopping-merchant-products-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-products-v1 ([#30769](https://github.com/googleapis/google-cloud-ruby/issues/30769)) + +## Release History diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb index 2c32986410fd..e282f952a6cc 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Products module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json b/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json index 18fb7a47b809..61243fb5d637 100644 --- a/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json +++ b/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-products-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 3fe9fce3a1942967c7590ff52c77176757902ff9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:22:53 -0700 Subject: [PATCH 380/457] chore(main): release google-shopping-merchant-promotions-v1 0.1.0 (#30795) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-promotions-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-shopping-merchant-promotions-v1/CHANGELOG.md | 9 ++++++++- .../google/shopping/merchant/promotions/v1/version.rb | 2 +- ..._metadata_google.shopping.merchant.promotions.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6c6443d7d10b..1a5276c2311d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -963,7 +963,7 @@ "google-shopping-merchant-products-v1beta+FILLER": "0.0.0", "google-shopping-merchant-promotions": "0.2.1", "google-shopping-merchant-promotions+FILLER": "0.0.0", - "google-shopping-merchant-promotions-v1": "0.0.1", + "google-shopping-merchant-promotions-v1": "0.1.0", "google-shopping-merchant-promotions-v1+FILLER": "0.0.0", "google-shopping-merchant-promotions-v1beta": "0.4.0", "google-shopping-merchant-promotions-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-promotions-v1/.repo-metadata.json b/google-shopping-merchant-promotions-v1/.repo-metadata.json index 84693936bf05..15b6961bdf74 100644 --- a/google-shopping-merchant-promotions-v1/.repo-metadata.json +++ b/google-shopping-merchant-promotions-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-promotions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions instead. See the readme for more details.", diff --git a/google-shopping-merchant-promotions-v1/CHANGELOG.md b/google-shopping-merchant-promotions-v1/CHANGELOG.md index f88957a62ba2..0120b6de9fff 100644 --- a/google-shopping-merchant-promotions-v1/CHANGELOG.md +++ b/google-shopping-merchant-promotions-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-promotions-v1 ([#30771](https://github.com/googleapis/google-cloud-ruby/issues/30771)) + +## Release History diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb index 0105c5570796..df9dd663ea6f 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Promotions module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json b/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json index a8848c79a929..a651a098d5f3 100644 --- a/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json +++ b/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-promotions-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 429358a6989b2f67a409dd32e2abc1fb261b6813 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:23:33 -0700 Subject: [PATCH 381/457] chore(main): release google-shopping-merchant-quota-v1 0.1.0 (#30796) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-quota-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-shopping-merchant-quota-v1/.repo-metadata.json | 2 +- google-shopping-merchant-quota-v1/CHANGELOG.md | 9 ++++++++- .../lib/google/shopping/merchant/quota/v1/version.rb | 2 +- ...ippet_metadata_google.shopping.merchant.quota.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1a5276c2311d..aa81c2d5de66 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -969,7 +969,7 @@ "google-shopping-merchant-promotions-v1beta+FILLER": "0.0.0", "google-shopping-merchant-quota": "0.2.1", "google-shopping-merchant-quota+FILLER": "0.0.0", - "google-shopping-merchant-quota-v1": "0.0.1", + "google-shopping-merchant-quota-v1": "0.1.0", "google-shopping-merchant-quota-v1+FILLER": "0.0.0", "google-shopping-merchant-quota-v1beta": "0.4.0", "google-shopping-merchant-quota-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-quota-v1/.repo-metadata.json b/google-shopping-merchant-quota-v1/.repo-metadata.json index eb3e2f5d1eed..b0f8e6088855 100644 --- a/google-shopping-merchant-quota-v1/.repo-metadata.json +++ b/google-shopping-merchant-quota-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-quota-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota instead. See the readme for more details.", diff --git a/google-shopping-merchant-quota-v1/CHANGELOG.md b/google-shopping-merchant-quota-v1/CHANGELOG.md index f88957a62ba2..7f84017d9c54 100644 --- a/google-shopping-merchant-quota-v1/CHANGELOG.md +++ b/google-shopping-merchant-quota-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-quota-v1 ([#30774](https://github.com/googleapis/google-cloud-ruby/issues/30774)) + +## Release History diff --git a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb index 7dfdcd54fec6..3227c35728a4 100644 --- a/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb +++ b/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Quota module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json b/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json index 7d8479a1017f..8804089e12ae 100644 --- a/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json +++ b/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-quota-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From cdda15898ad1fb4163ba52c9f611723d2d107f5a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:24:04 -0700 Subject: [PATCH 382/457] chore(main): release google-shopping-merchant-reports-v1 0.1.0 (#30797) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-reports-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-shopping-merchant-reports-v1/.repo-metadata.json | 2 +- google-shopping-merchant-reports-v1/CHANGELOG.md | 9 ++++++++- .../lib/google/shopping/merchant/reports/v1/version.rb | 2 +- ...pet_metadata_google.shopping.merchant.reports.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aa81c2d5de66..d8a476d6d033 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -975,7 +975,7 @@ "google-shopping-merchant-quota-v1beta+FILLER": "0.0.0", "google-shopping-merchant-reports": "0.4.1", "google-shopping-merchant-reports+FILLER": "0.0.0", - "google-shopping-merchant-reports-v1": "0.0.1", + "google-shopping-merchant-reports-v1": "0.1.0", "google-shopping-merchant-reports-v1+FILLER": "0.0.0", "google-shopping-merchant-reports-v1beta": "0.9.0", "google-shopping-merchant-reports-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-reports-v1/.repo-metadata.json b/google-shopping-merchant-reports-v1/.repo-metadata.json index ddd4ab3ed6bb..13fe7623bc3d 100644 --- a/google-shopping-merchant-reports-v1/.repo-metadata.json +++ b/google-shopping-merchant-reports-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "merchantapi", "name_pretty": "Merchant V1 API", "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-reports-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports instead. See the readme for more details.", diff --git a/google-shopping-merchant-reports-v1/CHANGELOG.md b/google-shopping-merchant-reports-v1/CHANGELOG.md index f88957a62ba2..1163d0785dd0 100644 --- a/google-shopping-merchant-reports-v1/CHANGELOG.md +++ b/google-shopping-merchant-reports-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-07) + +#### Features + +* Initial generation of google-shopping-merchant-reports-v1 ([#30767](https://github.com/googleapis/google-cloud-ruby/issues/30767)) + +## Release History diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb index 24f171733a67..a65c736b8ce5 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Reports module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json b/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json index 7585e5455b25..2479b0c117a1 100644 --- a/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json +++ b/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-reports-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 9bbe5cc11ebed255bfbdb46f8e884903576c7ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Fri, 8 Aug 2025 10:07:40 -0700 Subject: [PATCH 383/457] fix(pubsub): Initialize topic_admin by default for the IAM client (#30780) --- google-cloud-pubsub/acceptance/pubsub/service_test.rb | 1 - google-cloud-pubsub/lib/google/cloud/pubsub/service.rb | 2 +- google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb | 1 - google-cloud-pubsub/samples/pubsub_get_topic_policy.rb | 1 - google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb | 1 - google-cloud-pubsub/samples/pubsub_set_topic_policy.rb | 1 - 6 files changed, 1 insertion(+), 6 deletions(-) diff --git a/google-cloud-pubsub/acceptance/pubsub/service_test.rb b/google-cloud-pubsub/acceptance/pubsub/service_test.rb index fe569f334881..46684d16b09b 100644 --- a/google-cloud-pubsub/acceptance/pubsub/service_test.rb +++ b/google-cloud-pubsub/acceptance/pubsub/service_test.rb @@ -74,7 +74,6 @@ it "configures the V1::IAMPolicy::Client" do _(pubsub.project_id).wont_be :empty? - _topic_admin = pubsub.topic_admin config = pubsub.iam.configure _(config).must_be_kind_of Google::Iam::V1::IAMPolicy::Client::Configuration _(config.timeout).must_equal timeout diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb index af3a7a39c2cc..344205c0bab3 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb @@ -82,7 +82,7 @@ def topic_admin def iam return mocked_iam if mocked_iam @iam ||= begin - iam = (@topic_admin || @subscription_admin || @schemas).iam_policy_client + iam = (@topic_admin || @subscription_admin || @schemas || topic_admin).iam_policy_client iam.configure do |config| override_client_config_timeouts config if timeout config.lib_name = "gccl" diff --git a/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb b/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb index 59f103714a1b..c48f94e50252 100644 --- a/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_get_subscription_policy.rb @@ -19,7 +19,6 @@ def get_subscription_policy subscription_id: # subscription_id = "your-subscription-id" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin policy = pubsub.iam.get_iam_policy \ resource: pubsub.subscription_path(subscription_id) diff --git a/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb b/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb index bbd6e982bf84..6f51fc28d27d 100644 --- a/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_get_topic_policy.rb @@ -19,7 +19,6 @@ def get_topic_policy topic_id: # topic_id = "your-topic-id" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin policy = pubsub.iam.get_iam_policy resource: pubsub.topic_path(topic_id) diff --git a/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb b/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb index 5e553e1aba64..f1a06de064c4 100644 --- a/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_set_subscription_policy.rb @@ -22,7 +22,6 @@ def set_subscription_policy subscription_id:, role:, service_account_email: # "serviceAccount:account_name@project_name.iam.gserviceaccount.com" pubsub = Google::Cloud::PubSub.new - subscription_admin = pubsub.subscription_admin bindings = Google::Iam::V1::Binding.new \ role: role, diff --git a/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb b/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb index cf5a59826b79..96ededc9c240 100644 --- a/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb +++ b/google-cloud-pubsub/samples/pubsub_set_topic_policy.rb @@ -22,7 +22,6 @@ def set_topic_policy topic_id:, role:, service_account_email: # "serviceAccount:account_name@project_name.iam.gserviceaccount.com" pubsub = Google::Cloud::PubSub.new - topic_admin = pubsub.topic_admin bindings = Google::Iam::V1::Binding.new \ role: role, From 46534499cbb987f056639f5b2cb59bc250fbe53e Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Fri, 8 Aug 2025 11:30:03 -0700 Subject: [PATCH 384/457] feat(storage): Support for using Faraday for HTTP requests (#30759) --- google-cloud-storage/google-cloud-storage.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage/google-cloud-storage.gemspec b/google-cloud-storage/google-cloud-storage.gemspec index 560278c9c5f9..98f959552aee 100644 --- a/google-cloud-storage/google-cloud-storage.gemspec +++ b/google-cloud-storage/google-cloud-storage.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1.0" gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-apis-core", "~> 0.13" + gem.add_dependency "google-apis-core", ">= 0.18", "< 2" gem.add_dependency "google-apis-iamcredentials_v1", "~> 0.18" gem.add_dependency "google-apis-storage_v1", ">= 0.42" gem.add_dependency "googleauth", "~> 1.9" From 005d66c8d04184aa2da715259a2e6e02cd434b75 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Fri, 8 Aug 2025 11:30:22 -0700 Subject: [PATCH 385/457] feat(bigquery): Support for using Faraday for HTTP requests (#30760) --- google-cloud-bigquery/google-cloud-bigquery.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigquery/google-cloud-bigquery.gemspec b/google-cloud-bigquery/google-cloud-bigquery.gemspec index da2c6c6419be..147d10ba7696 100644 --- a/google-cloud-bigquery/google-cloud-bigquery.gemspec +++ b/google-cloud-bigquery/google-cloud-bigquery.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |gem| gem.add_dependency "bigdecimal", "~> 3.0" gem.add_dependency "concurrent-ruby", "~> 1.0" gem.add_dependency "google-apis-bigquery_v2", "~> 0.71" - gem.add_dependency "google-apis-core", "~> 0.13" + gem.add_dependency "google-apis-core", ">= 0.18", "< 2" gem.add_dependency "googleauth", "~> 1.9" gem.add_dependency "google-cloud-core", "~> 1.6" gem.add_dependency "mini_mime", "~> 1.0" From e45aa84a95f2c0a728d8fc31fc8c2a2a89e746a5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 10:34:44 -0700 Subject: [PATCH 386/457] feat: add `service_uri` field to CloudRunRevisionEndpoint (#30810) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 793279699 Source-Link: https://github.com/googleapis/googleapis/commit/f4902d9b4168b4d1b162f5c5bcf149086579fa26 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e941f68a6584a755e5cf1028f96a2182dec0bdc1 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfbWFuYWdlbWVudC12MS8uT3dsQm90LnlhbWwiLCJoIjoiZTk0MWY2OGE2NTg0YTc1NWU1Y2YxMDI4Zjk2YTIxODJkZWMwYmRjMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../networkmanagement/v1/connectivity_test_pb.rb | 2 +- .../cloud/networkmanagement/v1/connectivity_test.rb | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb b/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb index bc6509988971..c8bd9684e578 100644 --- a/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb +++ b/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb @@ -11,7 +11,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n9google/cloud/networkmanagement/v1/connectivity_test.proto\x12!google.cloud.networkmanagement.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/networkmanagement/v1/trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xae\x07\n\x10\x43onnectivityTest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12@\n\x06source\x18\x03 \x01(\x0b\x32+.google.cloud.networkmanagement.v1.EndpointB\x03\xe0\x41\x02\x12\x45\n\x0b\x64\x65stination\x18\x04 \x01(\x0b\x32+.google.cloud.networkmanagement.v1.EndpointB\x03\xe0\x41\x02\x12\x10\n\x08protocol\x18\x05 \x01(\t\x12\x18\n\x10related_projects\x18\x06 \x03(\t\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12O\n\x06labels\x18\x08 \x03(\x0b\x32?.google.cloud.networkmanagement.v1.ConnectivityTest.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x14reachability_details\x18\x0c \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ReachabilityDetailsB\x03\xe0\x41\x03\x12O\n\x0fprobing_details\x18\x0e \x01(\x0b\x32\x31.google.cloud.networkmanagement.v1.ProbingDetailsB\x03\xe0\x41\x03\x12\x12\n\nround_trip\x18\x0f \x01(\x08\x12`\n\x1breturn_reachability_details\x18\x10 \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ReachabilityDetailsB\x03\xe0\x41\x03\x12\x1e\n\x16\x62ypass_firewall_checks\x18\x11 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n1networkmanagement.googleapis.com/ConnectivityTest\x12.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation\x1a)\n\x0c\x45\x64geLocation\x12\x19\n\x11metropolitan_area\x18\x01 \x01(\t\"\x80\x01\n\rProbingResult\x12\x1e\n\x1aPROBING_RESULT_UNSPECIFIED\x10\x00\x12\r\n\tREACHABLE\x10\x01\x12\x0f\n\x0bUNREACHABLE\x10\x02\x12\x1d\n\x19REACHABILITY_INCONSISTENT\x10\x03\x12\x10\n\x0cUNDETERMINED\x10\x04\"g\n\x11ProbingAbortCause\x12#\n\x1fPROBING_ABORT_CAUSE_UNSPECIFIED\x10\x00\x12\x15\n\x11PERMISSION_DENIED\x10\x01\x12\x16\n\x12NO_SOURCE_LOCATION\x10\x02\x42\xfd\x01\n%com.google.cloud.networkmanagement.v1B\x0eTestOuterClassP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::V1b\x06proto3" +descriptor_data = "\n9google/cloud/networkmanagement/v1/connectivity_test.proto\x12!google.cloud.networkmanagement.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/networkmanagement/v1/trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xae\x07\n\x10\x43onnectivityTest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12@\n\x06source\x18\x03 \x01(\x0b\x32+.google.cloud.networkmanagement.v1.EndpointB\x03\xe0\x41\x02\x12\x45\n\x0b\x64\x65stination\x18\x04 \x01(\x0b\x32+.google.cloud.networkmanagement.v1.EndpointB\x03\xe0\x41\x02\x12\x10\n\x08protocol\x18\x05 \x01(\t\x12\x18\n\x10related_projects\x18\x06 \x03(\t\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12O\n\x06labels\x18\x08 \x03(\x0b\x32?.google.cloud.networkmanagement.v1.ConnectivityTest.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x14reachability_details\x18\x0c \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ReachabilityDetailsB\x03\xe0\x41\x03\x12O\n\x0fprobing_details\x18\x0e \x01(\x0b\x32\x31.google.cloud.networkmanagement.v1.ProbingDetailsB\x03\xe0\x41\x03\x12\x12\n\nround_trip\x18\x0f \x01(\x08\x12`\n\x1breturn_reachability_details\x18\x10 \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ReachabilityDetailsB\x03\xe0\x41\x03\x12\x1e\n\x16\x62ypass_firewall_checks\x18\x11 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n1networkmanagement.googleapis.com/ConnectivityTest\x12.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation\x1a)\n\x0c\x45\x64geLocation\x12\x19\n\x11metropolitan_area\x18\x01 \x01(\t\"\x80\x01\n\rProbingResult\x12\x1e\n\x1aPROBING_RESULT_UNSPECIFIED\x10\x00\x12\r\n\tREACHABLE\x10\x01\x12\x0f\n\x0bUNREACHABLE\x10\x02\x12\x1d\n\x19REACHABILITY_INCONSISTENT\x10\x03\x12\x10\n\x0cUNDETERMINED\x10\x04\"g\n\x11ProbingAbortCause\x12#\n\x1fPROBING_ABORT_CAUSE_UNSPECIFIED\x10\x00\x12\x15\n\x11PERMISSION_DENIED\x10\x01\x12\x16\n\x12NO_SOURCE_LOCATION\x10\x02\x42\xfd\x01\n%com.google.cloud.networkmanagement.v1B\x0eTestOuterClassP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb b/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb index 01b5e4dd0082..3c549bf505f9 100644 --- a/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb +++ b/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb @@ -125,8 +125,8 @@ class LabelsEntry # used for protocol forwarding, Private Service Connect and other network # services to provide forwarding information in the control plane. Applicable # only to destination endpoint. Format: - # projects/\\{project}/global/forwardingRules/\\{id} or - # projects/\\{project}/regions/\\{region}/forwardingRules/\\{id} + # `projects/{project}/global/forwardingRules/{id}` or + # `projects/{project}/regions/{region}/forwardingRules/{id}` # @!attribute [r] forwarding_rule_target # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::ForwardingRuleTarget] # Output only. Specifies the type of the target of the forwarding rule. @@ -221,7 +221,12 @@ class AppEngineVersionEndpoint # A [Cloud Run](https://cloud.google.com/run) # [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) # URI. The format is: - # projects/\\{project}/locations/\\{location}/revisions/\\{revision} + # `projects/{project}/locations/{location}/revisions/{revision}` + # @!attribute [r] service_uri + # @return [::String] + # Output only. The URI of the Cloud Run service that the revision belongs + # to. The format is: + # `projects/{project}/locations/{location}/services/{service}` class CloudRunRevisionEndpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From 43d694b9fd2e0103de16ab723acaf0f577f08aef Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 10:38:23 -0700 Subject: [PATCH 387/457] feat: A new message `GetAttachmentRequest` and `GetComment` is added (#30806) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 792747515 Source-Link: https://github.com/googleapis/googleapis/commit/1dfb2b3934226758e72104cba6f34413a91df8a8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/466335a355419b5e3fbb0eefcf5b68c138e51d0a Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN1cHBvcnQtdjJiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI0NjYzMzVhMzU1NDE5YjVlM2ZiYjBlZWZjZjViNjhjMTM4ZTUxZDBhIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 2 + .../gapic_metadata.json | 10 ++ .../support/v2beta/attachment_service_pb.rb | 3 +- .../v2beta/attachment_service_services_pb.rb | 2 + .../v2beta/case_attachment_service/client.rb | 92 +++++++++++++++++++ .../v2beta/case_attachment_service/paths.rb | 43 +++++++++ .../case_attachment_service/rest/client.rb | 85 +++++++++++++++++ .../rest/service_stub.rb | 61 ++++++++++++ .../support/v2beta/comment_service/client.rb | 92 +++++++++++++++++++ .../v2beta/comment_service/rest/client.rb | 85 +++++++++++++++++ .../comment_service/rest/service_stub.rb | 61 ++++++++++++ .../support/v2beta/comment_service_pb.rb | 3 +- .../v2beta/comment_service_services_pb.rb | 2 + .../support/v2beta/attachment_service.rb | 9 ++ .../cloud/support/v2beta/comment_service.rb | 9 ++ .../case_attachment_service/get_attachment.rb | 47 ++++++++++ .../snippets/comment_service/get_comment.rb | 47 ++++++++++ ..._metadata_google.cloud.support.v2beta.json | 80 ++++++++++++++++ .../case_attachment_service_paths_test.rb | 15 +++ .../case_attachment_service_rest_test.rb | 54 +++++++++++ .../v2beta/case_attachment_service_test.rb | 58 ++++++++++++ .../v2beta/comment_service_rest_test.rb | 54 +++++++++++ .../support/v2beta/comment_service_test.rb | 58 ++++++++++++ 23 files changed, 970 insertions(+), 2 deletions(-) create mode 100644 google-cloud-support-v2beta/snippets/case_attachment_service/get_attachment.rb create mode 100644 google-cloud-support-v2beta/snippets/comment_service/get_comment.rb diff --git a/google-cloud-support-v2beta/.owlbot-manifest.json b/google-cloud-support-v2beta/.owlbot-manifest.json index 3641dadd1b42..7afddbb0eb82 100644 --- a/google-cloud-support-v2beta/.owlbot-manifest.json +++ b/google-cloud-support-v2beta/.owlbot-manifest.json @@ -82,6 +82,7 @@ "proto_docs/google/protobuf/field_mask.rb", "proto_docs/google/protobuf/timestamp.rb", "snippets/Gemfile", + "snippets/case_attachment_service/get_attachment.rb", "snippets/case_attachment_service/list_attachments.rb", "snippets/case_service/close_case.rb", "snippets/case_service/create_case.rb", @@ -92,6 +93,7 @@ "snippets/case_service/search_cases.rb", "snippets/case_service/update_case.rb", "snippets/comment_service/create_comment.rb", + "snippets/comment_service/get_comment.rb", "snippets/comment_service/list_comments.rb", "snippets/feed_service/show_feed.rb", "snippets/snippet_metadata_google.cloud.support.v2beta.json", diff --git a/google-cloud-support-v2beta/gapic_metadata.json b/google-cloud-support-v2beta/gapic_metadata.json index 716d3dc76c65..f0433f8ac593 100644 --- a/google-cloud-support-v2beta/gapic_metadata.json +++ b/google-cloud-support-v2beta/gapic_metadata.json @@ -14,6 +14,11 @@ "methods": [ "list_attachments" ] + }, + "GetAttachment": { + "methods": [ + "get_attachment" + ] } } } @@ -82,6 +87,11 @@ "methods": [ "create_comment" ] + }, + "GetComment": { + "methods": [ + "get_comment" + ] } } } diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_pb.rb index ca6827767f0e..1e3b6c541ed9 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_pb.rb @@ -11,7 +11,7 @@ require 'google/cloud/support/v2beta/attachment_pb' -descriptor_data = "\n4google/cloud/support/v2beta/attachment_service.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/support/v2beta/attachment.proto\"y\n\x16ListAttachmentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"p\n\x17ListAttachmentsResponse\x12<\n\x0b\x61ttachments\x18\x01 \x03(\x0b\x32\'.google.cloud.support.v2beta.Attachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe1\x02\n\x15\x43\x61seAttachmentService\x12\xf6\x01\n\x0fListAttachments\x12\x33.google.cloud.support.v2beta.ListAttachmentsRequest\x1a\x34.google.cloud.support.v2beta.ListAttachmentsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2beta/{parent=projects/*/cases/*}/attachmentsZ6\x12\x34/v2beta/{parent=organizations/*/cases/*}/attachments\x1aO\xca\x41\x1b\x63loudsupport.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1f\x63om.google.cloud.support.v2betaB\x16\x41ttachmentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3" +descriptor_data = "\n4google/cloud/support/v2beta/attachment_service.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/support/v2beta/attachment.proto\"y\n\x16ListAttachmentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"T\n\x14GetAttachmentRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&cloudsupport.googleapis.com/Attachment\"p\n\x17ListAttachmentsResponse\x12<\n\x0b\x61ttachments\x18\x01 \x03(\x0b\x32\'.google.cloud.support.v2beta.Attachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x88\x04\n\x15\x43\x61seAttachmentService\x12\xf6\x01\n\x0fListAttachments\x12\x33.google.cloud.support.v2beta.ListAttachmentsRequest\x1a\x34.google.cloud.support.v2beta.ListAttachmentsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2beta/{parent=projects/*/cases/*}/attachmentsZ6\x12\x34/v2beta/{parent=organizations/*/cases/*}/attachments\x12\xa4\x01\n\rGetAttachment\x12\x31.google.cloud.support.v2beta.GetAttachmentRequest\x1a\'.google.cloud.support.v2beta.Attachment\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v2beta/{name=*/*/cases/*/attachments/*}\x1aO\xca\x41\x1b\x63loudsupport.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1f\x63om.google.cloud.support.v2betaB\x16\x41ttachmentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -43,6 +43,7 @@ module Cloud module Support module V2beta ListAttachmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.ListAttachmentsRequest").msgclass + GetAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.GetAttachmentRequest").msgclass ListAttachmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.ListAttachmentsResponse").msgclass end end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb index 1020cb8d6b3c..0ae5d1782758 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb @@ -35,6 +35,8 @@ class Service # List all the attachments associated with a support case. rpc :ListAttachments, ::Google::Cloud::Support::V2beta::ListAttachmentsRequest, ::Google::Cloud::Support::V2beta::ListAttachmentsResponse + # Retrieve an attachment. + rpc :GetAttachment, ::Google::Cloud::Support::V2beta::GetAttachmentRequest, ::Google::Cloud::Support::V2beta::Attachment end Stub = Service.rpc_stub_class diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/client.rb index 3bc90415b67b..3ef701576ee3 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/client.rb @@ -291,6 +291,91 @@ def list_attachments request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Retrieve an attachment. + # + # @overload get_attachment(request, options = nil) + # Pass arguments to `get_attachment` via a request object, either of type + # {::Google::Cloud::Support::V2beta::GetAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Support::V2beta::GetAttachmentRequest, ::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_attachment(name: nil) + # Pass arguments to `get_attachment` 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 name of the attachment to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Support::V2beta::Attachment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Support::V2beta::Attachment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/support/v2beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Support::V2beta::GetAttachmentRequest.new + # + # # Call the get_attachment method. + # result = client.get_attachment request + # + # # The returned object is of type Google::Cloud::Support::V2beta::Attachment. + # p result + # + def get_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::GetAttachmentRequest + + # 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_attachment.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::Support::V2beta::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_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @case_attachment_service_stub.call_rpc :get_attachment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the CaseAttachmentService API. # @@ -462,11 +547,18 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :list_attachments + ## + # RPC-specific configuration for `get_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attachment # @private def initialize parent_rpcs = nil list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments @list_attachments = ::Gapic::Config::Method.new list_attachments_config + get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment + @get_attachment = ::Gapic::Config::Method.new get_attachment_config yield self if block_given? end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/paths.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/paths.rb index abf8e233fc56..1e8ec14afe69 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/paths.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/paths.rb @@ -24,6 +24,49 @@ module V2beta module CaseAttachmentService # Path helper methods for the CaseAttachmentService API. module Paths + ## + # Create a fully-qualified Attachment resource string. + # + # @overload attachment_path(organization:, case:, attachment_id:) + # The resource will be in the following format: + # + # `organizations/{organization}/cases/{case}/attachments/{attachment_id}` + # + # @param organization [String] + # @param case [String] + # @param attachment_id [String] + # + # @overload attachment_path(project:, case:, attachment_id:) + # The resource will be in the following format: + # + # `projects/{project}/cases/{case}/attachments/{attachment_id}` + # + # @param project [String] + # @param case [String] + # @param attachment_id [String] + # + # @return [::String] + def attachment_path **args + resources = { + "attachment_id:case:organization" => (proc do |organization:, case:, attachment_id:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "case cannot contain /" if binding.local_variable_get(:case).to_s.include? "/" + + "organizations/#{organization}/cases/#{binding.local_variable_get :case}/attachments/#{attachment_id}" + end), + "attachment_id:case:project" => (proc do |project:, case:, attachment_id:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "case cannot contain /" if binding.local_variable_get(:case).to_s.include? "/" + + "projects/#{project}/cases/#{binding.local_variable_get :case}/attachments/#{attachment_id}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + ## # Create a fully-qualified Case resource string. # diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb index 4c84ab06df6c..4fc661b8888d 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb @@ -277,6 +277,84 @@ def list_attachments request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Retrieve an attachment. + # + # @overload get_attachment(request, options = nil) + # Pass arguments to `get_attachment` via a request object, either of type + # {::Google::Cloud::Support::V2beta::GetAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Support::V2beta::GetAttachmentRequest, ::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_attachment(name: nil) + # Pass arguments to `get_attachment` 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 name of the attachment to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Support::V2beta::Attachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Support::V2beta::Attachment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/support/v2beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Support::V2beta::CaseAttachmentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Support::V2beta::GetAttachmentRequest.new + # + # # Call the get_attachment method. + # result = client.get_attachment request + # + # # The returned object is of type Google::Cloud::Support::V2beta::Attachment. + # p result + # + def get_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::GetAttachmentRequest + + # 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_attachment.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::Support::V2beta::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_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @case_attachment_service_stub.get_attachment 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 + ## # Configuration class for the CaseAttachmentService REST API. # @@ -428,11 +506,18 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :list_attachments + ## + # RPC-specific configuration for `get_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attachment # @private def initialize parent_rpcs = nil list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments @list_attachments = ::Gapic::Config::Method.new list_attachments_config + get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment + @get_attachment = ::Gapic::Config::Method.new get_attachment_config yield self if block_given? end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/service_stub.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/service_stub.rb index ab997622efc3..4170e5935363 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/service_stub.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/case_attachment_service/rest/service_stub.rb @@ -113,6 +113,46 @@ def list_attachments request_pb, options = nil end end + ## + # Baseline implementation for the get_attachment REST call + # + # @param request_pb [::Google::Cloud::Support::V2beta::GetAttachmentRequest] + # 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::Support::V2beta::Attachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Support::V2beta::Attachment] + # A result object deserialized from the server's reply + def get_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_attachment_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_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Support::V2beta::Attachment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -140,6 +180,27 @@ def self.transcode_list_attachments_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the get_attachment REST call + # + # @param request_pb [::Google::Cloud::Support::V2beta::GetAttachmentRequest] + # 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_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta/{name}", + matches: [ + ["name", %r{^[^/]+/[^/]+/cases/[^/]+/attachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/client.rb index 7952abac780e..0958aab8a72e 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/client.rb @@ -375,6 +375,91 @@ def create_comment request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Retrieve a comment. + # + # @overload get_comment(request, options = nil) + # Pass arguments to `get_comment` via a request object, either of type + # {::Google::Cloud::Support::V2beta::GetCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Support::V2beta::GetCommentRequest, ::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_comment(name: nil) + # Pass arguments to `get_comment` 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 name of the comment to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Support::V2beta::Comment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Support::V2beta::Comment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/support/v2beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Support::V2beta::CommentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Support::V2beta::GetCommentRequest.new + # + # # Call the get_comment method. + # result = client.get_comment request + # + # # The returned object is of type Google::Cloud::Support::V2beta::Comment. + # p result + # + def get_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::GetCommentRequest + + # 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_comment.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::Support::V2beta::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_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @comment_service_stub.call_rpc :get_comment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the CommentService API. # @@ -551,6 +636,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :create_comment + ## + # RPC-specific configuration for `get_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_comment # @private def initialize parent_rpcs = nil @@ -558,6 +648,8 @@ def initialize parent_rpcs = nil @list_comments = ::Gapic::Config::Method.new list_comments_config create_comment_config = parent_rpcs.create_comment if parent_rpcs.respond_to? :create_comment @create_comment = ::Gapic::Config::Method.new create_comment_config + get_comment_config = parent_rpcs.get_comment if parent_rpcs.respond_to? :get_comment + @get_comment = ::Gapic::Config::Method.new get_comment_config yield self if block_given? end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/client.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/client.rb index c9b2c01e5c17..9c7f7e356816 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/client.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/client.rb @@ -354,6 +354,84 @@ def create_comment request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Retrieve a comment. + # + # @overload get_comment(request, options = nil) + # Pass arguments to `get_comment` via a request object, either of type + # {::Google::Cloud::Support::V2beta::GetCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Support::V2beta::GetCommentRequest, ::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_comment(name: nil) + # Pass arguments to `get_comment` 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 name of the comment to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Support::V2beta::Comment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Support::V2beta::Comment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/support/v2beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Support::V2beta::CommentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Support::V2beta::GetCommentRequest.new + # + # # Call the get_comment method. + # result = client.get_comment request + # + # # The returned object is of type Google::Cloud::Support::V2beta::Comment. + # p result + # + def get_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::GetCommentRequest + + # 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_comment.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::Support::V2beta::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_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @comment_service_stub.get_comment 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 + ## # Configuration class for the CommentService REST API. # @@ -510,6 +588,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :create_comment + ## + # RPC-specific configuration for `get_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_comment # @private def initialize parent_rpcs = nil @@ -517,6 +600,8 @@ def initialize parent_rpcs = nil @list_comments = ::Gapic::Config::Method.new list_comments_config create_comment_config = parent_rpcs.create_comment if parent_rpcs.respond_to? :create_comment @create_comment = ::Gapic::Config::Method.new create_comment_config + get_comment_config = parent_rpcs.get_comment if parent_rpcs.respond_to? :get_comment + @get_comment = ::Gapic::Config::Method.new get_comment_config yield self if block_given? end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/service_stub.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/service_stub.rb index 7ffd0e6ceaad..76392252affd 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/service_stub.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service/rest/service_stub.rb @@ -153,6 +153,46 @@ def create_comment request_pb, options = nil end end + ## + # Baseline implementation for the get_comment REST call + # + # @param request_pb [::Google::Cloud::Support::V2beta::GetCommentRequest] + # 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::Support::V2beta::Comment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Support::V2beta::Comment] + # A result object deserialized from the server's reply + def get_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_comment_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_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Support::V2beta::Comment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -210,6 +250,27 @@ def self.transcode_create_comment_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the get_comment REST call + # + # @param request_pb [::Google::Cloud::Support::V2beta::GetCommentRequest] + # 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_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta/{name}", + matches: [ + ["name", %r{^[^/]+/[^/]+/cases/[^/]+/comments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_pb.rb index 4bb748b6383f..b3541a47e08d 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_pb.rb @@ -11,7 +11,7 @@ require 'google/cloud/support/v2beta/comment_pb' -descriptor_data = "\n1google/cloud/support/v2beta/comment_service.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/support/v2beta/comment.proto\"v\n\x13ListCommentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\"g\n\x14ListCommentsResponse\x12\x36\n\x08\x63omments\x18\x01 \x03(\x0b\x32$.google.cloud.support.v2beta.Comment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n\x14\x43reateCommentRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12:\n\x07\x63omment\x18\x02 \x01(\x0b\x32$.google.cloud.support.v2beta.CommentB\x03\xe0\x41\x02\x32\xc5\x04\n\x0e\x43ommentService\x12\xe7\x01\n\x0cListComments\x12\x30.google.cloud.support.v2beta.ListCommentsRequest\x1a\x31.google.cloud.support.v2beta.ListCommentsResponse\"r\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x63\x12,/v2beta/{parent=projects/*/cases/*}/commentsZ3\x12\x31/v2beta/{parent=organizations/*/cases/*}/comments\x12\xf7\x01\n\rCreateComment\x12\x31.google.cloud.support.v2beta.CreateCommentRequest\x1a$.google.cloud.support.v2beta.Comment\"\x8c\x01\xda\x41\x0eparent,comment\x82\xd3\xe4\x93\x02u\",/v2beta/{parent=projects/*/cases/*}/comments:\x07\x63ommentZ<\"1/v2beta/{parent=organizations/*/cases/*}/comments:\x07\x63omment\x1aO\xca\x41\x1b\x63loudsupport.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd0\x01\n\x1f\x63om.google.cloud.support.v2betaB\x13\x43ommentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3" +descriptor_data = "\n1google/cloud/support/v2beta/comment_service.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/support/v2beta/comment.proto\"v\n\x13ListCommentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\"g\n\x14ListCommentsResponse\x12\x36\n\x08\x63omments\x18\x01 \x03(\x0b\x32$.google.cloud.support.v2beta.Comment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n\x14\x43reateCommentRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12:\n\x07\x63omment\x18\x02 \x01(\x0b\x32$.google.cloud.support.v2beta.CommentB\x03\xe0\x41\x02\"N\n\x11GetCommentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#cloudsupport.googleapis.com/Comment2\xe0\x05\n\x0e\x43ommentService\x12\xe7\x01\n\x0cListComments\x12\x30.google.cloud.support.v2beta.ListCommentsRequest\x1a\x31.google.cloud.support.v2beta.ListCommentsResponse\"r\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x63\x12,/v2beta/{parent=projects/*/cases/*}/commentsZ3\x12\x31/v2beta/{parent=organizations/*/cases/*}/comments\x12\xf7\x01\n\rCreateComment\x12\x31.google.cloud.support.v2beta.CreateCommentRequest\x1a$.google.cloud.support.v2beta.Comment\"\x8c\x01\xda\x41\x0eparent,comment\x82\xd3\xe4\x93\x02u\",/v2beta/{parent=projects/*/cases/*}/comments:\x07\x63ommentZ<\"1/v2beta/{parent=organizations/*/cases/*}/comments:\x07\x63omment\x12\x98\x01\n\nGetComment\x12..google.cloud.support.v2beta.GetCommentRequest\x1a$.google.cloud.support.v2beta.Comment\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/v2beta/{name=*/*/cases/*/comments/*}\x1aO\xca\x41\x1b\x63loudsupport.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd0\x01\n\x1f\x63om.google.cloud.support.v2betaB\x13\x43ommentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -45,6 +45,7 @@ module V2beta ListCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.ListCommentsRequest").msgclass ListCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.ListCommentsResponse").msgclass CreateCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.CreateCommentRequest").msgclass + GetCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.GetCommentRequest").msgclass end end end diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_services_pb.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_services_pb.rb index 4e6b09604018..4976737f327f 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_services_pb.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/comment_service_services_pb.rb @@ -39,6 +39,8 @@ class Service # # The comment must have the following fields set: `body`. rpc :CreateComment, ::Google::Cloud::Support::V2beta::CreateCommentRequest, ::Google::Cloud::Support::V2beta::Comment + # Retrieve a comment. + rpc :GetComment, ::Google::Cloud::Support::V2beta::GetCommentRequest, ::Google::Cloud::Support::V2beta::Comment end Stub = Service.rpc_stub_class diff --git a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/attachment_service.rb b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/attachment_service.rb index 9ff1a2206190..56d381a9a8ff 100644 --- a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/attachment_service.rb +++ b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/attachment_service.rb @@ -44,6 +44,15 @@ class ListAttachmentsRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request for getting an attachment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the attachment to get. + class GetAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The response message for the ListAttachments endpoint. # @!attribute [rw] attachments # @return [::Array<::Google::Cloud::Support::V2beta::Attachment>] diff --git a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/comment_service.rb b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/comment_service.rb index 81ecc031ce46..30b6405c8c35 100644 --- a/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/comment_service.rb +++ b/google-cloud-support-v2beta/proto_docs/google/cloud/support/v2beta/comment_service.rb @@ -62,6 +62,15 @@ class CreateCommentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # The request message for the GetComment endpoint. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the comment to retrieve. + class GetCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-support-v2beta/snippets/case_attachment_service/get_attachment.rb b/google-cloud-support-v2beta/snippets/case_attachment_service/get_attachment.rb new file mode 100644 index 000000000000..ddfde3af7346 --- /dev/null +++ b/google-cloud-support-v2beta/snippets/case_attachment_service/get_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 cloudsupport_v2beta_generated_CaseAttachmentService_GetAttachment_sync] +require "google/cloud/support/v2beta" + +## +# Snippet for the get_attachment call in the CaseAttachmentService 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::Support::V2beta::CaseAttachmentService::Client#get_attachment. +# +def get_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Support::V2beta::GetAttachmentRequest.new + + # Call the get_attachment method. + result = client.get_attachment request + + # The returned object is of type Google::Cloud::Support::V2beta::Attachment. + p result +end +# [END cloudsupport_v2beta_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/google-cloud-support-v2beta/snippets/comment_service/get_comment.rb b/google-cloud-support-v2beta/snippets/comment_service/get_comment.rb new file mode 100644 index 000000000000..1c227cac7308 --- /dev/null +++ b/google-cloud-support-v2beta/snippets/comment_service/get_comment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 cloudsupport_v2beta_generated_CommentService_GetComment_sync] +require "google/cloud/support/v2beta" + +## +# Snippet for the get_comment call in the CommentService 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::Support::V2beta::CommentService::Client#get_comment. +# +def get_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Support::V2beta::CommentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Support::V2beta::GetCommentRequest.new + + # Call the get_comment method. + result = client.get_comment request + + # The returned object is of type Google::Cloud::Support::V2beta::Comment. + p result +end +# [END cloudsupport_v2beta_generated_CommentService_GetComment_sync] diff --git a/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json b/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json index 8a07180f0705..7aea90458c04 100644 --- a/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json +++ b/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json @@ -51,6 +51,46 @@ } ] }, + { + "region_tag": "cloudsupport_v2beta_generated_CaseAttachmentService_GetAttachment_sync", + "title": "Snippet for the get_attachment call in the CaseAttachmentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Support::V2beta::CaseAttachmentService::Client#get_attachment.", + "file": "case_attachment_service/get_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_attachment", + "full_name": "::Google::Cloud::Support::V2beta::CaseAttachmentService::Client#get_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Support::V2beta::GetAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Support::V2beta::Attachment", + "client": { + "short_name": "CaseAttachmentService::Client", + "full_name": "::Google::Cloud::Support::V2beta::CaseAttachmentService::Client" + }, + "method": { + "short_name": "GetAttachment", + "full_name": "google.cloud.support.v2beta.CaseAttachmentService.GetAttachment", + "service": { + "short_name": "CaseAttachmentService", + "full_name": "google.cloud.support.v2beta.CaseAttachmentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "cloudsupport_v2beta_generated_CaseService_GetCase_sync", "title": "Snippet for the get_case call in the CaseService service", @@ -451,6 +491,46 @@ } ] }, + { + "region_tag": "cloudsupport_v2beta_generated_CommentService_GetComment_sync", + "title": "Snippet for the get_comment call in the CommentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Support::V2beta::CommentService::Client#get_comment.", + "file": "comment_service/get_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_comment", + "full_name": "::Google::Cloud::Support::V2beta::CommentService::Client#get_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Support::V2beta::GetCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Support::V2beta::Comment", + "client": { + "short_name": "CommentService::Client", + "full_name": "::Google::Cloud::Support::V2beta::CommentService::Client" + }, + "method": { + "short_name": "GetComment", + "full_name": "google.cloud.support.v2beta.CommentService.GetComment", + "service": { + "short_name": "CommentService", + "full_name": "google.cloud.support.v2beta.CommentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "cloudsupport_v2beta_generated_FeedService_ShowFeed_sync", "title": "Snippet for the show_feed call in the FeedService service", diff --git a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_paths_test.rb b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_paths_test.rb index 6268c50de51a..e22aa43d0e2f 100644 --- a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_paths_test.rb +++ b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_paths_test.rb @@ -41,6 +41,21 @@ def logger end end + def test_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.attachment_path organization: "value0", case: "value1", attachment_id: "value2" + assert_equal "organizations/value0/cases/value1/attachments/value2", path + + path = client.attachment_path project: "value0", case: "value1", attachment_id: "value2" + assert_equal "projects/value0/cases/value1/attachments/value2", path + end + end + def test_case_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_rest_test.rb b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_rest_test.rb index 7ea5c27b761c..08db2c273105 100644 --- a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_rest_test.rb +++ b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_rest_test.rb @@ -134,6 +134,60 @@ def test_list_attachments end end + def test_get_attachment + # Create test objects. + client_result = ::Google::Cloud::Support::V2beta::Attachment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attachment_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::Support::V2beta::CaseAttachmentService::Rest::ServiceStub.stub :transcode_get_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_attachment_client_stub do + # Create client + client = ::Google::Cloud::Support::V2beta::CaseAttachmentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_attachment ::Google::Cloud::Support::V2beta::GetAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_attachment(::Google::Cloud::Support::V2beta::GetAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_attachment_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_test.rb b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_test.rb index b8c5a454498c..3ededd3b6ad9 100644 --- a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_test.rb +++ b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/case_attachment_service_test.rb @@ -131,6 +131,64 @@ def test_list_attachments end end + def test_get_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Support::V2beta::Attachment.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" + + get_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_attachment, name + assert_kind_of ::Google::Cloud::Support::V2beta::GetAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_attachment_client_stub do + # Create client + client = ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_attachment ::Google::Cloud::Support::V2beta::GetAttachmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_attachment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_attachment(::Google::Cloud::Support::V2beta::GetAttachmentRequest.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, get_attachment_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/comment_service_rest_test.rb b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/comment_service_rest_test.rb index 35227bf4fd0e..52eb7fa2e405 100644 --- a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/comment_service_rest_test.rb +++ b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/comment_service_rest_test.rb @@ -189,6 +189,60 @@ def test_create_comment end end + def test_get_comment + # Create test objects. + client_result = ::Google::Cloud::Support::V2beta::Comment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_comment_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::Support::V2beta::CommentService::Rest::ServiceStub.stub :transcode_get_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_comment_client_stub do + # Create client + client = ::Google::Cloud::Support::V2beta::CommentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_comment ::Google::Cloud::Support::V2beta::GetCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_comment(::Google::Cloud::Support::V2beta::GetCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_comment_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/comment_service_test.rb b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/comment_service_test.rb index 8028cfb19836..8df62c86b85a 100644 --- a/google-cloud-support-v2beta/test/google/cloud/support/v2beta/comment_service_test.rb +++ b/google-cloud-support-v2beta/test/google/cloud/support/v2beta/comment_service_test.rb @@ -191,6 +191,64 @@ def test_create_comment end end + def test_get_comment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Support::V2beta::Comment.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" + + get_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_comment, name + assert_kind_of ::Google::Cloud::Support::V2beta::GetCommentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_comment_client_stub do + # Create client + client = ::Google::Cloud::Support::V2beta::CommentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_comment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_comment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_comment ::Google::Cloud::Support::V2beta::GetCommentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_comment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_comment(::Google::Cloud::Support::V2beta::GetCommentRequest.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, get_comment_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From f6b9e82272c7584c1060158dab966f0ad25e44f3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 10:40:21 -0700 Subject: [PATCH 388/457] feat: Add new field `salesforce_org` to message `DiscoverConnectionProfileRequest` (#30799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: Add new field `mongodb_cluster` to message `DiscoverConnectionProfileRequest` feat: Add new field `validate_only` to message `CreatePrivateConnectionRequest` feat: Add new field `psc_interface_config` to message `PrivateConnection` feat: Add new field for server certificate to message `OracleSslConfig` feat: Add new field for server certificate to message `PostgresqlSslConfig` feat: Add new field `mongodb_profile` to message `ConnectionProfile` feat: Add new field `project_id` to message `BigQueryDestinationConfig` PiperOrigin-RevId: 792073655 Source-Link: https://github.com/googleapis/googleapis/commit/ee5d4f3dfdf9ac08c3e6807054e5408da88f2bb7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/89d4236515e10b4f7b7ec2b8f9813057c6924803 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0tdjEvLk93bEJvdC55YW1sIiwiaCI6Ijg5ZDQyMzY1MTVlMTBiNGY3YjdlYzJiOGY5ODEzMDU3YzY5MjQ4MDMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../cloud/datastream/v1/datastream/client.rb | 24 +- .../cloud/datastream/v1/datastream/paths.rb | 19 ++ .../datastream/v1/datastream/rest/client.rb | 24 +- .../cloud/datastream/v1/datastream_pb.rb | 2 +- .../datastream/v1/datastream_resources_pb.rb | 14 +- .../google/cloud/datastream/v1/datastream.rb | 41 ++- .../datastream/v1/datastream_resources.rb | 278 ++++++++++++++++-- .../datastream/v1/datastream_paths_test.rb | 12 + .../datastream/v1/datastream_rest_test.rb | 11 +- .../cloud/datastream/v1/datastream_test.rb | 12 +- 10 files changed, 383 insertions(+), 54 deletions(-) diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/client.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/client.rb index b3bfb4fb9e71..68fbae01cd7a 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/client.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/client.rb @@ -805,7 +805,7 @@ def delete_connection_profile request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil, postgresql_rdbms: nil, sql_server_rdbms: nil) + # @overload discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil, postgresql_rdbms: nil, sql_server_rdbms: nil, salesforce_org: nil, mongodb_cluster: nil) # Pass arguments to `discover_connection_profile` 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). @@ -833,19 +833,27 @@ def delete_connection_profile request, options = nil # @param oracle_rdbms [::Google::Cloud::Datastream::V1::OracleRdbms, ::Hash] # Oracle RDBMS to enrich with child data objects and metadata. # - # Note: The following parameters are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # Note: The following parameters are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mysql_rdbms [::Google::Cloud::Datastream::V1::MysqlRdbms, ::Hash] # MySQL RDBMS to enrich with child data objects and metadata. # - # Note: The following parameters are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # Note: The following parameters are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param postgresql_rdbms [::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash] # PostgreSQL RDBMS to enrich with child data objects and metadata. # - # Note: The following parameters are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # Note: The following parameters are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_server_rdbms [::Google::Cloud::Datastream::V1::SqlServerRdbms, ::Hash] # SQLServer RDBMS to enrich with child data objects and metadata. # - # Note: The following parameters are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # Note: The following parameters are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `salesforce_org`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param salesforce_org [::Google::Cloud::Datastream::V1::SalesforceOrg, ::Hash] + # Salesforce organization to enrich with child data objects and metadata. + # + # Note: The following parameters are mutually exclusive: `salesforce_org`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param mongodb_cluster [::Google::Cloud::Datastream::V1::MongodbCluster, ::Hash] + # MongoDB cluster to enrich with child data objects and metadata. + # + # Note: The following parameters are mutually exclusive: `mongodb_cluster`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse] @@ -2096,7 +2104,7 @@ def fetch_static_ips request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, force: nil) + # @overload create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, force: nil, validate_only: nil) # Pass arguments to `create_private_connection` 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). @@ -2123,6 +2131,10 @@ def fetch_static_ips request, options = nil # not supported (00000000-0000-0000-0000-000000000000). # @param force [::Boolean] # Optional. If set to true, will skip validations. + # @param validate_only [::Boolean] + # Optional. When supplied with PSC Interface config, will get/create the + # tenant project required for the customer to allow list and won't actually + # create the private connection. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/paths.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/paths.rb index 0ec91335963f..97f3addb5583 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/paths.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/paths.rb @@ -60,6 +60,25 @@ def location_path project:, location: "projects/#{project}/locations/#{location}" end + ## + # Create a fully-qualified NetworkAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/networkAttachments/{network_attachment}` + # + # @param project [String] + # @param region [String] + # @param network_attachment [String] + # + # @return [::String] + def network_attachment_path project:, region:, network_attachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/networkAttachments/#{network_attachment}" + end + ## # Create a fully-qualified Networks resource string. # diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/rest/client.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/rest/client.rb index d93fd8a32fbb..14a228903303 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/rest/client.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream/rest/client.rb @@ -764,7 +764,7 @@ def delete_connection_profile request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil, postgresql_rdbms: nil, sql_server_rdbms: nil) + # @overload discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil, postgresql_rdbms: nil, sql_server_rdbms: nil, salesforce_org: nil, mongodb_cluster: nil) # Pass arguments to `discover_connection_profile` 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). @@ -792,19 +792,27 @@ def delete_connection_profile request, options = nil # @param oracle_rdbms [::Google::Cloud::Datastream::V1::OracleRdbms, ::Hash] # Oracle RDBMS to enrich with child data objects and metadata. # - # Note: The following parameters are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # Note: The following parameters are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param mysql_rdbms [::Google::Cloud::Datastream::V1::MysqlRdbms, ::Hash] # MySQL RDBMS to enrich with child data objects and metadata. # - # Note: The following parameters are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # Note: The following parameters are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param postgresql_rdbms [::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash] # PostgreSQL RDBMS to enrich with child data objects and metadata. # - # Note: The following parameters are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # Note: The following parameters are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @param sql_server_rdbms [::Google::Cloud::Datastream::V1::SqlServerRdbms, ::Hash] # SQLServer RDBMS to enrich with child data objects and metadata. # - # Note: The following parameters are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # Note: The following parameters are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `salesforce_org`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param salesforce_org [::Google::Cloud::Datastream::V1::SalesforceOrg, ::Hash] + # Salesforce organization to enrich with child data objects and metadata. + # + # Note: The following parameters are mutually exclusive: `salesforce_org`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `mongodb_cluster`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param mongodb_cluster [::Google::Cloud::Datastream::V1::MongodbCluster, ::Hash] + # MongoDB cluster to enrich with child data objects and metadata. + # + # Note: The following parameters are mutually exclusive: `mongodb_cluster`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1964,7 +1972,7 @@ def fetch_static_ips request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, force: nil) + # @overload create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, force: nil, validate_only: nil) # Pass arguments to `create_private_connection` 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). @@ -1991,6 +1999,10 @@ def fetch_static_ips request, options = nil # not supported (00000000-0000-0000-0000-000000000000). # @param force [::Boolean] # Optional. If set to true, will skip validations. + # @param validate_only [::Boolean] + # Optional. When supplied with PSC Interface config, will get/create the + # tenant project required for the customer to allow list and won't actually + # create the private connection. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream_pb.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream_pb.rb index 09bc903a85ba..86dd44712a20 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream_pb.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n+google/cloud/datastream/v1/datastream.proto\x12\x1agoogle.cloud.datastream.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/datastream/v1/datastream_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x04\n DiscoverConnectionProfileRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/ConnectionProfile\x12L\n\x12\x63onnection_profile\x18\xc8\x01 \x01(\x0b\x32-.google.cloud.datastream.v1.ConnectionProfileH\x00\x12\"\n\x17\x63onnection_profile_name\x18\xc9\x01 \x01(\tH\x00\x12\x18\n\x0e\x66ull_hierarchy\x18\x03 \x01(\x08H\x01\x12\x19\n\x0fhierarchy_depth\x18\x04 \x01(\x05H\x01\x12?\n\x0coracle_rdbms\x18\x64 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbmsH\x02\x12=\n\x0bmysql_rdbms\x18\x65 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbmsH\x02\x12G\n\x10postgresql_rdbms\x18\x66 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbmsH\x02\x12\x46\n\x10sql_server_rdbms\x18g \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbmsH\x02\x42\x08\n\x06targetB\x0b\n\thierarchyB\r\n\x0b\x64\x61ta_object\"\xc3\x02\n!DiscoverConnectionProfileResponse\x12?\n\x0coracle_rdbms\x18\x64 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbmsH\x00\x12=\n\x0bmysql_rdbms\x18\x65 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbmsH\x00\x12G\n\x10postgresql_rdbms\x18\x66 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbmsH\x00\x12\x46\n\x10sql_server_rdbms\x18g \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbmsH\x00\x42\r\n\x0b\x64\x61ta_object\"w\n\x15\x46\x65tchStaticIpsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"E\n\x16\x46\x65tchStaticIpsResponse\x12\x12\n\nstatic_ips\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x1dListConnectionProfilesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/ConnectionProfile\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x9a\x01\n\x1eListConnectionProfilesResponse\x12J\n\x13\x63onnection_profiles\x18\x01 \x03(\x0b\x32-.google.cloud.datastream.v1.ConnectionProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"`\n\x1bGetConnectionProfileRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/ConnectionProfile\"\xa2\x02\n\x1e\x43reateConnectionProfileRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/ConnectionProfile\x12\"\n\x15\x63onnection_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x12\x63onnection_profile\x18\x03 \x01(\x0b\x32-.google.cloud.datastream.v1.ConnectionProfileB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xef\x01\n\x1eUpdateConnectionProfileRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12N\n\x12\x63onnection_profile\x18\x02 \x01(\x0b\x32-.google.cloud.datastream.v1.ConnectionProfileB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"|\n\x1e\x44\x65leteConnectionProfileRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/ConnectionProfile\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x12ListStreamsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 datastream.googleapis.com/Stream\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"x\n\x13ListStreamsResponse\x12\x33\n\x07streams\x18\x01 \x03(\x0b\x32\".google.cloud.datastream.v1.Stream\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"J\n\x10GetStreamRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n datastream.googleapis.com/Stream\"\xe9\x01\n\x13\x43reateStreamRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 datastream.googleapis.com/Stream\x12\x16\n\tstream_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x06stream\x18\x03 \x01(\x0b\x32\".google.cloud.datastream.v1.StreamB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xcd\x01\n\x13UpdateStreamRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x37\n\x06stream\x18\x02 \x01(\x0b\x32\".google.cloud.datastream.v1.StreamB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x13\x44\x65leteStreamRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n datastream.googleapis.com/Stream\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n\x10RunStreamRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n datastream.googleapis.com/Stream\x12\x42\n\x0c\x63\x64\x63_strategy\x18\x02 \x01(\x0b\x32\'.google.cloud.datastream.v1.CdcStrategyB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x16GetStreamObjectRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&datastream.googleapis.com/StreamObject\"\xb0\x01\n\x19LookupStreamObjectRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n datastream.googleapis.com/Stream\x12Y\n\x18source_object_identifier\x18\x02 \x01(\x0b\x32\x32.google.cloud.datastream.v1.SourceObjectIdentifierB\x03\xe0\x41\x02\"Y\n\x17StartBackfillJobRequest\x12>\n\x06object\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&datastream.googleapis.com/StreamObject\"T\n\x18StartBackfillJobResponse\x12\x38\n\x06object\x18\x01 \x01(\x0b\x32(.google.cloud.datastream.v1.StreamObject\"X\n\x16StopBackfillJobRequest\x12>\n\x06object\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&datastream.googleapis.com/StreamObject\"S\n\x17StopBackfillJobResponse\x12\x38\n\x06object\x18\x01 \x01(\x0b\x32(.google.cloud.datastream.v1.StreamObject\"\x81\x01\n\x18ListStreamObjectsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&datastream.googleapis.com/StreamObject\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"v\n\x19ListStreamObjectsResponse\x12@\n\x0estream_objects\x18\x01 \x03(\x0b\x32(.google.cloud.datastream.v1.StreamObject\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12L\n\x11validation_result\x18\x08 \x01(\x0b\x32,.google.cloud.datastream.v1.ValidationResultB\x03\xe0\x41\x03\"\x86\x02\n\x1e\x43reatePrivateConnectionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/PrivateConnection\x12\"\n\x15private_connection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x12private_connection\x18\x03 \x01(\x0b\x32-.google.cloud.datastream.v1.PrivateConnectionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xad\x01\n\x1dListPrivateConnectionsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/PrivateConnection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x9a\x01\n\x1eListPrivateConnectionsResponse\x12J\n\x13private_connections\x18\x01 \x03(\x0b\x32-.google.cloud.datastream.v1.PrivateConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x90\x01\n\x1e\x44\x65letePrivateConnectionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/PrivateConnection\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"`\n\x1bGetPrivateConnectionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/PrivateConnection\"\xb4\x01\n\x12\x43reateRouteRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64\x61tastream.googleapis.com/Route\x12\x15\n\x08route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x05route\x18\x03 \x01(\x0b\x32!.google.cloud.datastream.v1.RouteB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n\x11ListRoutesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64\x61tastream.googleapis.com/Route\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"u\n\x12ListRoutesResponse\x12\x31\n\x06routes\x18\x01 \x03(\x0b\x32!.google.cloud.datastream.v1.Route\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x12\x44\x65leteRouteRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61tastream.googleapis.com/Route\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"H\n\x0fGetRouteRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61tastream.googleapis.com/Route2\xb2,\n\nDatastream\x12\xd8\x01\n\x16ListConnectionProfiles\x12\x39.google.cloud.datastream.v1.ListConnectionProfilesRequest\x1a:.google.cloud.datastream.v1.ListConnectionProfilesResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/connectionProfiles\x12\xc5\x01\n\x14GetConnectionProfile\x12\x37.google.cloud.datastream.v1.GetConnectionProfileRequest\x1a-.google.cloud.datastream.v1.ConnectionProfile\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/connectionProfiles/*}\x12\xa4\x02\n\x17\x43reateConnectionProfile\x12:.google.cloud.datastream.v1.CreateConnectionProfileRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41&\n\x11\x43onnectionProfile\x12\x11OperationMetadata\xda\x41/parent,connection_profile,connection_profile_id\x82\xd3\xe4\x93\x02L\"6/v1/{parent=projects/*/locations/*}/connectionProfiles:\x12\x63onnection_profile\x12\xa6\x02\n\x17UpdateConnectionProfile\x12:.google.cloud.datastream.v1.UpdateConnectionProfileRequest\x1a\x1d.google.longrunning.Operation\"\xaf\x01\xca\x41&\n\x11\x43onnectionProfile\x12\x11OperationMetadata\xda\x41\x1e\x63onnection_profile,update_mask\x82\xd3\xe4\x93\x02_2I/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}:\x12\x63onnection_profile\x12\xe8\x01\n\x17\x44\x65leteConnectionProfile\x12:.google.cloud.datastream.v1.DeleteConnectionProfileRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/connectionProfiles/*}\x12\xe4\x01\n\x19\x44iscoverConnectionProfile\x12<.google.cloud.datastream.v1.DiscoverConnectionProfileRequest\x1a=.google.cloud.datastream.v1.DiscoverConnectionProfileResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{parent=projects/*/locations/*}/connectionProfiles:discover:\x01*\x12\xac\x01\n\x0bListStreams\x12..google.cloud.datastream.v1.ListStreamsRequest\x1a/.google.cloud.datastream.v1.ListStreamsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/streams\x12\x99\x01\n\tGetStream\x12,.google.cloud.datastream.v1.GetStreamRequest\x1a\".google.cloud.datastream.v1.Stream\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/streams/*}\x12\xd3\x01\n\x0c\x43reateStream\x12/.google.cloud.datastream.v1.CreateStreamRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x1b\n\x06Stream\x12\x11OperationMetadata\xda\x41\x17parent,stream,stream_id\x82\xd3\xe4\x93\x02\x35\"+/v1/{parent=projects/*/locations/*}/streams:\x06stream\x12\xd5\x01\n\x0cUpdateStream\x12/.google.cloud.datastream.v1.UpdateStreamRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06Stream\x12\x11OperationMetadata\xda\x41\x12stream,update_mask\x82\xd3\xe4\x93\x02<22/v1/{stream.name=projects/*/locations/*/streams/*}:\x06stream\x12\xc7\x01\n\x0c\x44\x65leteStream\x12/.google.cloud.datastream.v1.DeleteStreamRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/streams/*}\x12\xb2\x01\n\tRunStream\x12,.google.cloud.datastream.v1.RunStreamRequest\x1a\x1d.google.longrunning.Operation\"X\xca\x41\x1b\n\x06Stream\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/streams/*}:run:\x01*\x12\xb5\x01\n\x0fGetStreamObject\x12\x32.google.cloud.datastream.v1.GetStreamObjectRequest\x1a(.google.cloud.datastream.v1.StreamObject\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/streams/*/objects/*}\x12\xbe\x01\n\x12LookupStreamObject\x12\x35.google.cloud.datastream.v1.LookupStreamObjectRequest\x1a(.google.cloud.datastream.v1.StreamObject\"G\x82\xd3\xe4\x93\x02\x41\"cloud.google.com/go/datastream/apiv1/datastreampb;datastreampb\xaa\x02\x1aGoogle.Cloud.Datastream.V1\xca\x02\x1aGoogle\\Cloud\\Datastream\\V1\xea\x02\x1dGoogle::Cloud::Datastream::V1b\x06proto3" +descriptor_data = "\n+google/cloud/datastream/v1/datastream.proto\x12\x1agoogle.cloud.datastream.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/datastream/v1/datastream_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd1\x05\n DiscoverConnectionProfileRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/ConnectionProfile\x12L\n\x12\x63onnection_profile\x18\xc8\x01 \x01(\x0b\x32-.google.cloud.datastream.v1.ConnectionProfileH\x00\x12\"\n\x17\x63onnection_profile_name\x18\xc9\x01 \x01(\tH\x00\x12\x18\n\x0e\x66ull_hierarchy\x18\x03 \x01(\x08H\x01\x12\x19\n\x0fhierarchy_depth\x18\x04 \x01(\x05H\x01\x12?\n\x0coracle_rdbms\x18\x64 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbmsH\x02\x12=\n\x0bmysql_rdbms\x18\x65 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbmsH\x02\x12G\n\x10postgresql_rdbms\x18\x66 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbmsH\x02\x12\x46\n\x10sql_server_rdbms\x18g \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbmsH\x02\x12\x43\n\x0esalesforce_org\x18h \x01(\x0b\x32).google.cloud.datastream.v1.SalesforceOrgH\x02\x12\x45\n\x0fmongodb_cluster\x18i \x01(\x0b\x32*.google.cloud.datastream.v1.MongodbClusterH\x02\x42\x08\n\x06targetB\x0b\n\thierarchyB\r\n\x0b\x64\x61ta_object\"\xcf\x03\n!DiscoverConnectionProfileResponse\x12?\n\x0coracle_rdbms\x18\x64 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbmsH\x00\x12=\n\x0bmysql_rdbms\x18\x65 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbmsH\x00\x12G\n\x10postgresql_rdbms\x18\x66 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbmsH\x00\x12\x46\n\x10sql_server_rdbms\x18g \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbmsH\x00\x12\x43\n\x0esalesforce_org\x18h \x01(\x0b\x32).google.cloud.datastream.v1.SalesforceOrgH\x00\x12\x45\n\x0fmongodb_cluster\x18i \x01(\x0b\x32*.google.cloud.datastream.v1.MongodbClusterH\x00\x42\r\n\x0b\x64\x61ta_object\"w\n\x15\x46\x65tchStaticIpsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"E\n\x16\x46\x65tchStaticIpsResponse\x12\x12\n\nstatic_ips\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x1dListConnectionProfilesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/ConnectionProfile\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x9a\x01\n\x1eListConnectionProfilesResponse\x12J\n\x13\x63onnection_profiles\x18\x01 \x03(\x0b\x32-.google.cloud.datastream.v1.ConnectionProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"`\n\x1bGetConnectionProfileRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/ConnectionProfile\"\xa2\x02\n\x1e\x43reateConnectionProfileRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/ConnectionProfile\x12\"\n\x15\x63onnection_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x12\x63onnection_profile\x18\x03 \x01(\x0b\x32-.google.cloud.datastream.v1.ConnectionProfileB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xef\x01\n\x1eUpdateConnectionProfileRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12N\n\x12\x63onnection_profile\x18\x02 \x01(\x0b\x32-.google.cloud.datastream.v1.ConnectionProfileB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"|\n\x1e\x44\x65leteConnectionProfileRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/ConnectionProfile\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x12ListStreamsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 datastream.googleapis.com/Stream\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"x\n\x13ListStreamsResponse\x12\x33\n\x07streams\x18\x01 \x03(\x0b\x32\".google.cloud.datastream.v1.Stream\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"J\n\x10GetStreamRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n datastream.googleapis.com/Stream\"\xe9\x01\n\x13\x43reateStreamRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 datastream.googleapis.com/Stream\x12\x16\n\tstream_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x06stream\x18\x03 \x01(\x0b\x32\".google.cloud.datastream.v1.StreamB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xcd\x01\n\x13UpdateStreamRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x37\n\x06stream\x18\x02 \x01(\x0b\x32\".google.cloud.datastream.v1.StreamB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x13\x44\x65leteStreamRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n datastream.googleapis.com/Stream\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n\x10RunStreamRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n datastream.googleapis.com/Stream\x12\x42\n\x0c\x63\x64\x63_strategy\x18\x02 \x01(\x0b\x32\'.google.cloud.datastream.v1.CdcStrategyB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x16GetStreamObjectRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&datastream.googleapis.com/StreamObject\"\xb0\x01\n\x19LookupStreamObjectRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n datastream.googleapis.com/Stream\x12Y\n\x18source_object_identifier\x18\x02 \x01(\x0b\x32\x32.google.cloud.datastream.v1.SourceObjectIdentifierB\x03\xe0\x41\x02\"Y\n\x17StartBackfillJobRequest\x12>\n\x06object\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&datastream.googleapis.com/StreamObject\"T\n\x18StartBackfillJobResponse\x12\x38\n\x06object\x18\x01 \x01(\x0b\x32(.google.cloud.datastream.v1.StreamObject\"X\n\x16StopBackfillJobRequest\x12>\n\x06object\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&datastream.googleapis.com/StreamObject\"S\n\x17StopBackfillJobResponse\x12\x38\n\x06object\x18\x01 \x01(\x0b\x32(.google.cloud.datastream.v1.StreamObject\"\x81\x01\n\x18ListStreamObjectsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&datastream.googleapis.com/StreamObject\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"v\n\x19ListStreamObjectsResponse\x12@\n\x0estream_objects\x18\x01 \x03(\x0b\x32(.google.cloud.datastream.v1.StreamObject\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12L\n\x11validation_result\x18\x08 \x01(\x0b\x32,.google.cloud.datastream.v1.ValidationResultB\x03\xe0\x41\x03\"\xa2\x02\n\x1e\x43reatePrivateConnectionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/PrivateConnection\x12\"\n\x15private_connection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x12private_connection\x18\x03 \x01(\x0b\x32-.google.cloud.datastream.v1.PrivateConnectionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\"\xad\x01\n\x1dListPrivateConnectionsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+datastream.googleapis.com/PrivateConnection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x9a\x01\n\x1eListPrivateConnectionsResponse\x12J\n\x13private_connections\x18\x01 \x03(\x0b\x32-.google.cloud.datastream.v1.PrivateConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x90\x01\n\x1e\x44\x65letePrivateConnectionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/PrivateConnection\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"`\n\x1bGetPrivateConnectionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/PrivateConnection\"\xb4\x01\n\x12\x43reateRouteRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64\x61tastream.googleapis.com/Route\x12\x15\n\x08route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x05route\x18\x03 \x01(\x0b\x32!.google.cloud.datastream.v1.RouteB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n\x11ListRoutesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64\x61tastream.googleapis.com/Route\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"u\n\x12ListRoutesResponse\x12\x31\n\x06routes\x18\x01 \x03(\x0b\x32!.google.cloud.datastream.v1.Route\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x12\x44\x65leteRouteRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61tastream.googleapis.com/Route\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"H\n\x0fGetRouteRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61tastream.googleapis.com/Route2\xb2,\n\nDatastream\x12\xd8\x01\n\x16ListConnectionProfiles\x12\x39.google.cloud.datastream.v1.ListConnectionProfilesRequest\x1a:.google.cloud.datastream.v1.ListConnectionProfilesResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/connectionProfiles\x12\xc5\x01\n\x14GetConnectionProfile\x12\x37.google.cloud.datastream.v1.GetConnectionProfileRequest\x1a-.google.cloud.datastream.v1.ConnectionProfile\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/connectionProfiles/*}\x12\xa4\x02\n\x17\x43reateConnectionProfile\x12:.google.cloud.datastream.v1.CreateConnectionProfileRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41&\n\x11\x43onnectionProfile\x12\x11OperationMetadata\xda\x41/parent,connection_profile,connection_profile_id\x82\xd3\xe4\x93\x02L\"6/v1/{parent=projects/*/locations/*}/connectionProfiles:\x12\x63onnection_profile\x12\xa6\x02\n\x17UpdateConnectionProfile\x12:.google.cloud.datastream.v1.UpdateConnectionProfileRequest\x1a\x1d.google.longrunning.Operation\"\xaf\x01\xca\x41&\n\x11\x43onnectionProfile\x12\x11OperationMetadata\xda\x41\x1e\x63onnection_profile,update_mask\x82\xd3\xe4\x93\x02_2I/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}:\x12\x63onnection_profile\x12\xe8\x01\n\x17\x44\x65leteConnectionProfile\x12:.google.cloud.datastream.v1.DeleteConnectionProfileRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/connectionProfiles/*}\x12\xe4\x01\n\x19\x44iscoverConnectionProfile\x12<.google.cloud.datastream.v1.DiscoverConnectionProfileRequest\x1a=.google.cloud.datastream.v1.DiscoverConnectionProfileResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{parent=projects/*/locations/*}/connectionProfiles:discover:\x01*\x12\xac\x01\n\x0bListStreams\x12..google.cloud.datastream.v1.ListStreamsRequest\x1a/.google.cloud.datastream.v1.ListStreamsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/streams\x12\x99\x01\n\tGetStream\x12,.google.cloud.datastream.v1.GetStreamRequest\x1a\".google.cloud.datastream.v1.Stream\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/streams/*}\x12\xd3\x01\n\x0c\x43reateStream\x12/.google.cloud.datastream.v1.CreateStreamRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x1b\n\x06Stream\x12\x11OperationMetadata\xda\x41\x17parent,stream,stream_id\x82\xd3\xe4\x93\x02\x35\"+/v1/{parent=projects/*/locations/*}/streams:\x06stream\x12\xd5\x01\n\x0cUpdateStream\x12/.google.cloud.datastream.v1.UpdateStreamRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06Stream\x12\x11OperationMetadata\xda\x41\x12stream,update_mask\x82\xd3\xe4\x93\x02<22/v1/{stream.name=projects/*/locations/*/streams/*}:\x06stream\x12\xc7\x01\n\x0c\x44\x65leteStream\x12/.google.cloud.datastream.v1.DeleteStreamRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/streams/*}\x12\xb2\x01\n\tRunStream\x12,.google.cloud.datastream.v1.RunStreamRequest\x1a\x1d.google.longrunning.Operation\"X\xca\x41\x1b\n\x06Stream\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/streams/*}:run:\x01*\x12\xb5\x01\n\x0fGetStreamObject\x12\x32.google.cloud.datastream.v1.GetStreamObjectRequest\x1a(.google.cloud.datastream.v1.StreamObject\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/streams/*/objects/*}\x12\xbe\x01\n\x12LookupStreamObject\x12\x35.google.cloud.datastream.v1.LookupStreamObjectRequest\x1a(.google.cloud.datastream.v1.StreamObject\"G\x82\xd3\xe4\x93\x02\x41\"cloud.google.com/go/datastream/apiv1/datastreampb;datastreampb\xaa\x02\x1aGoogle.Cloud.Datastream.V1\xca\x02\x1aGoogle\\Cloud\\Datastream\\V1\xea\x02\x1dGoogle::Cloud::Datastream::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream_resources_pb.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream_resources_pb.rb index 36a11ccb137a..7901dac79034 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream_resources_pb.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/datastream_resources_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n5google/cloud/datastream/v1/datastream_resources.proto\x12\x1agoogle.cloud.datastream.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x03\n\rOracleProfile\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x61tabase_service\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x62\n\x15\x63onnection_attributes\x18\x06 \x03(\x0b\x32\x43.google.cloud.datastream.v1.OracleProfile.ConnectionAttributesEntry\x12K\n\x11oracle_ssl_config\x18\x07 \x01(\x0b\x32+.google.cloud.datastream.v1.OracleSslConfigB\x03\xe0\x41\x01\x12K\n\x11oracle_asm_config\x18\x08 \x01(\x0b\x32+.google.cloud.datastream.v1.OracleAsmConfigB\x03\xe0\x41\x01\x12+\n\x1esecret_manager_stored_password\x18\t \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x43onnectionAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa5\x03\n\x0fOracleAsmConfig\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sm_service\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12i\n\x15\x63onnection_attributes\x18\x06 \x03(\x0b\x32\x45.google.cloud.datastream.v1.OracleAsmConfig.ConnectionAttributesEntryB\x03\xe0\x41\x01\x12K\n\x11oracle_ssl_config\x18\x07 \x01(\x0b\x32+.google.cloud.datastream.v1.OracleSslConfigB\x03\xe0\x41\x01\x12+\n\x1esecret_manager_stored_password\x18\x08 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x43onnectionAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd1\x01\n\x0cMysqlProfile\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08password\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x04\x12>\n\nssl_config\x18\x05 \x01(\x0b\x32*.google.cloud.datastream.v1.MysqlSslConfig\x12+\n\x1esecret_manager_stored_password\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xf4\x01\n\x11PostgresqlProfile\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x61tabase\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12+\n\x1esecret_manager_stored_password\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12H\n\nssl_config\x18\x07 \x01(\x0b\x32/.google.cloud.datastream.v1.PostgresqlSslConfigB\x03\xe0\x41\x01\"\xa9\x01\n\x10SqlServerProfile\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x61tabase\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12+\n\x1esecret_manager_stored_password\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xbe\x04\n\x11SalesforceProfile\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x10user_credentials\x18\x02 \x01(\x0b\x32=.google.cloud.datastream.v1.SalesforceProfile.UserCredentialsH\x00\x12j\n\x19oauth2_client_credentials\x18\x03 \x01(\x0b\x32\x45.google.cloud.datastream.v1.SalesforceProfile.Oauth2ClientCredentialsH\x00\x1a\xbc\x01\n\x0fUserCredentials\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0esecurity_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12+\n\x1esecret_manager_stored_password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x31\n$secret_manager_stored_security_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x7f\n\x17Oauth2ClientCredentials\x12\x16\n\tclient_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rclient_secret\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x30\n#secret_manager_stored_client_secret\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\r\n\x0b\x63redentials\"4\n\nGcsProfile\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\troot_path\x18\x02 \x01(\t\"\x11\n\x0f\x42igQueryProfile\"\x1d\n\x1bStaticServiceIpConnectivity\"\xa8\x01\n\x1c\x46orwardSshTunnelConnectivity\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12\x17\n\x08password\x18\x64 \x01(\tB\x03\xe0\x41\x04H\x00\x12\x1a\n\x0bprivate_key\x18\x65 \x01(\tB\x03\xe0\x41\x04H\x00\x42\x17\n\x15\x61uthentication_method\"]\n\x10VpcPeeringConfig\x12\x34\n\x03vpc\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ompute.googleapis.com/Networks\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc9\x06\n\x11PrivateConnection\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.datastream.v1.PrivateConnection.LabelsEntry\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12G\n\x05state\x18\x06 \x01(\x0e\x32\x33.google.cloud.datastream.v1.PrivateConnection.StateB\x03\xe0\x41\x03\x12\x35\n\x05\x65rror\x18\x07 \x01(\x0b\x32!.google.cloud.datastream.v1.ErrorB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzs\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1f\n\rsatisfies_pzi\x18\t \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12H\n\x12vpc_peering_config\x18\x64 \x01(\x0b\x32,.google.cloud.datastream.v1.VpcPeeringConfig\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"i\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x14\n\x10\x46\x41ILED_TO_DELETE\x10\x05:\x81\x01\xea\x41~\n+datastream.googleapis.com/PrivateConnection\x12Oprojects/{project}/locations/{location}/privateConnections/{private_connection}B\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"f\n\x13PrivateConnectivity\x12O\n\x12private_connection\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/PrivateConnection\"\xd6\x03\n\x05Route\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06labels\x18\x04 \x03(\x0b\x32-.google.cloud.datastream.v1.Route.LabelsEntry\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x64\x65stination_address\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x10\x64\x65stination_port\x18\x07 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x85\x01\xea\x41\x81\x01\n\x1f\x64\x61tastream.googleapis.com/Route\x12^projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}\"\xd0\x01\n\x0eMysqlSslConfig\x12\x1a\n\nclient_key\x18\x01 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12\x1b\n\x0e\x63lient_key_set\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\"\n\x12\x63lient_certificate\x18\x03 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12#\n\x16\x63lient_certificate_set\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1b\n\x0e\x63\x61_certificate\x18\x05 \x01(\tB\x03\xe0\x41\x04\x12\x1f\n\x12\x63\x61_certificate_set\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\"O\n\x0fOracleSslConfig\x12\x1b\n\x0e\x63\x61_certificate\x18\x01 \x01(\tB\x03\xe0\x41\x04\x12\x1f\n\x12\x63\x61_certificate_set\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\xba\x03\n\x13PostgresqlSslConfig\x12\x61\n\x13server_verification\x18\x01 \x01(\x0b\x32\x42.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerificationH\x00\x12u\n\x1eserver_and_client_verification\x18\x02 \x01(\x0b\x32K.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerificationH\x00\x1a\x34\n\x12ServerVerification\x12\x1e\n\x0e\x63\x61_certificate\x18\x01 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x02\x1a}\n\x1bServerAndClientVerification\x12\"\n\x12\x63lient_certificate\x18\x01 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x02\x12\x1a\n\nclient_key\x18\x02 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x0e\x63\x61_certificate\x18\x03 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x02\x42\x14\n\x12\x65ncryption_setting\"\xba\n\n\x11\x43onnectionProfile\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.datastream.v1.ConnectionProfile.LabelsEntry\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\rsatisfies_pzs\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1f\n\rsatisfies_pzi\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x43\n\x0eoracle_profile\x18\x64 \x01(\x0b\x32).google.cloud.datastream.v1.OracleProfileH\x00\x12=\n\x0bgcs_profile\x18\x65 \x01(\x0b\x32&.google.cloud.datastream.v1.GcsProfileH\x00\x12\x41\n\rmysql_profile\x18\x66 \x01(\x0b\x32(.google.cloud.datastream.v1.MysqlProfileH\x00\x12G\n\x10\x62igquery_profile\x18g \x01(\x0b\x32+.google.cloud.datastream.v1.BigQueryProfileH\x00\x12K\n\x12postgresql_profile\x18h \x01(\x0b\x32-.google.cloud.datastream.v1.PostgresqlProfileH\x00\x12J\n\x12sql_server_profile\x18i \x01(\x0b\x32,.google.cloud.datastream.v1.SqlServerProfileH\x00\x12K\n\x12salesforce_profile\x18k \x01(\x0b\x32-.google.cloud.datastream.v1.SalesforceProfileH\x00\x12\x62\n\x1estatic_service_ip_connectivity\x18\xc8\x01 \x01(\x0b\x32\x37.google.cloud.datastream.v1.StaticServiceIpConnectivityH\x01\x12]\n\x18\x66orward_ssh_connectivity\x18\xc9\x01 \x01(\x0b\x32\x38.google.cloud.datastream.v1.ForwardSshTunnelConnectivityH\x01\x12P\n\x14private_connectivity\x18\xca\x01 \x01(\x0b\x32/.google.cloud.datastream.v1.PrivateConnectivityH\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x81\x01\xea\x41~\n+datastream.googleapis.com/ConnectionProfile\x12Oprojects/{project}/locations/{location}/connectionProfiles/{connection_profile}B\t\n\x07profileB\x0e\n\x0c\x63onnectivityB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xb6\x01\n\x0cOracleColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12\x11\n\tprecision\x18\x04 \x01(\x05\x12\r\n\x05scale\x18\x05 \x01(\x05\x12\x10\n\x08\x65ncoding\x18\x06 \x01(\t\x12\x13\n\x0bprimary_key\x18\x07 \x01(\x08\x12\x10\n\x08nullable\x18\x08 \x01(\x08\x12\x18\n\x10ordinal_position\x18\t \x01(\x05\"^\n\x0bOracleTable\x12\r\n\x05table\x18\x01 \x01(\t\x12@\n\x0eoracle_columns\x18\x02 \x03(\x0b\x32(.google.cloud.datastream.v1.OracleColumn\"^\n\x0cOracleSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12>\n\roracle_tables\x18\x02 \x03(\x0b\x32\'.google.cloud.datastream.v1.OracleTable\"O\n\x0bOracleRdbms\x12@\n\x0eoracle_schemas\x18\x01 \x03(\x0b\x32(.google.cloud.datastream.v1.OracleSchema\"\xbb\x08\n\x12OracleSourceConfig\x12@\n\x0finclude_objects\x18\x01 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbms\x12@\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbms\x12 \n\x18max_concurrent_cdc_tasks\x18\x03 \x01(\x05\x12%\n\x1dmax_concurrent_backfill_tasks\x18\x04 \x01(\x05\x12]\n\x12\x64rop_large_objects\x18\x64 \x01(\x0b\x32?.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjectsH\x00\x12\x61\n\x14stream_large_objects\x18\x66 \x01(\x0b\x32\x41.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjectsH\x00\x12L\n\tlog_miner\x18g \x01(\x0b\x32\x37.google.cloud.datastream.v1.OracleSourceConfig.LogMinerH\x01\x12[\n\x11\x62inary_log_parser\x18h \x01(\x0b\x32>.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParserH\x01\x1a\x12\n\x10\x44ropLargeObjects\x1a\x14\n\x12StreamLargeObjects\x1a\n\n\x08LogMiner\x1a\x8c\x03\n\x0f\x42inaryLogParser\x12{\n\x1aoracle_asm_log_file_access\x18\x01 \x01(\x0b\x32U.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccessH\x00\x12q\n\x14log_file_directories\x18\x02 \x01(\x0b\x32Q.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectoriesH\x00\x1a\x18\n\x16OracleAsmLogFileAccess\x1a\\\n\x12LogFileDirectories\x12!\n\x14online_log_directory\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x16\x61rchived_log_directory\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0flog_file_accessB\x18\n\x16large_objects_handlingB\x0c\n\ncdc_method\"\xa8\x01\n\x10PostgresqlColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12\x11\n\tprecision\x18\x04 \x01(\x05\x12\r\n\x05scale\x18\x05 \x01(\x05\x12\x13\n\x0bprimary_key\x18\x07 \x01(\x08\x12\x10\n\x08nullable\x18\x08 \x01(\x08\x12\x18\n\x10ordinal_position\x18\t \x01(\x05\"j\n\x0fPostgresqlTable\x12\r\n\x05table\x18\x01 \x01(\t\x12H\n\x12postgresql_columns\x18\x02 \x03(\x0b\x32,.google.cloud.datastream.v1.PostgresqlColumn\"j\n\x10PostgresqlSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12\x46\n\x11postgresql_tables\x18\x02 \x03(\x0b\x32+.google.cloud.datastream.v1.PostgresqlTable\"[\n\x0fPostgresqlRdbms\x12H\n\x12postgresql_schemas\x18\x01 \x03(\x0b\x32,.google.cloud.datastream.v1.PostgresqlSchema\"\x87\x02\n\x16PostgresqlSourceConfig\x12\x44\n\x0finclude_objects\x18\x01 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbms\x12\x44\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbms\x12 \n\x10replication_slot\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bpublication\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12%\n\x1dmax_concurrent_backfill_tasks\x18\x05 \x01(\x05\"\xa7\x01\n\x0fSqlServerColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12\x11\n\tprecision\x18\x04 \x01(\x05\x12\r\n\x05scale\x18\x05 \x01(\x05\x12\x13\n\x0bprimary_key\x18\x06 \x01(\x08\x12\x10\n\x08nullable\x18\x07 \x01(\x08\x12\x18\n\x10ordinal_position\x18\x08 \x01(\x05\"]\n\x0eSqlServerTable\x12\r\n\x05table\x18\x01 \x01(\t\x12<\n\x07\x63olumns\x18\x02 \x03(\x0b\x32+.google.cloud.datastream.v1.SqlServerColumn\"]\n\x0fSqlServerSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12:\n\x06tables\x18\x02 \x03(\x0b\x32*.google.cloud.datastream.v1.SqlServerTable\"N\n\x0eSqlServerRdbms\x12<\n\x07schemas\x18\x01 \x03(\x0b\x32+.google.cloud.datastream.v1.SqlServerSchema\"\x96\x03\n\x15SqlServerSourceConfig\x12\x43\n\x0finclude_objects\x18\x01 \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbms\x12\x43\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbms\x12 \n\x18max_concurrent_cdc_tasks\x18\x03 \x01(\x05\x12%\n\x1dmax_concurrent_backfill_tasks\x18\x04 \x01(\x05\x12P\n\x10transaction_logs\x18\x65 \x01(\x0b\x32\x34.google.cloud.datastream.v1.SqlServerTransactionLogsH\x00\x12J\n\rchange_tables\x18\x66 \x01(\x0b\x32\x31.google.cloud.datastream.v1.SqlServerChangeTablesH\x00\x42\x0c\n\ncdc_method\"\x1a\n\x18SqlServerTransactionLogs\"\x17\n\x15SqlServerChangeTables\"\xb6\x01\n\x0bMysqlColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12\x11\n\tcollation\x18\x04 \x01(\t\x12\x13\n\x0bprimary_key\x18\x05 \x01(\x08\x12\x10\n\x08nullable\x18\x06 \x01(\x08\x12\x18\n\x10ordinal_position\x18\x07 \x01(\x05\x12\x11\n\tprecision\x18\x08 \x01(\x05\x12\r\n\x05scale\x18\t \x01(\x05\"[\n\nMysqlTable\x12\r\n\x05table\x18\x01 \x01(\t\x12>\n\rmysql_columns\x18\x02 \x03(\x0b\x32\'.google.cloud.datastream.v1.MysqlColumn\"_\n\rMysqlDatabase\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12<\n\x0cmysql_tables\x18\x02 \x03(\x0b\x32&.google.cloud.datastream.v1.MysqlTable\"P\n\nMysqlRdbms\x12\x42\n\x0fmysql_databases\x18\x01 \x03(\x0b\x32).google.cloud.datastream.v1.MysqlDatabase\"\xad\x03\n\x11MysqlSourceConfig\x12?\n\x0finclude_objects\x18\x01 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbms\x12?\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbms\x12 \n\x18max_concurrent_cdc_tasks\x18\x03 \x01(\x05\x12%\n\x1dmax_concurrent_backfill_tasks\x18\x04 \x01(\x05\x12^\n\x13\x62inary_log_position\x18\x65 \x01(\x0b\x32?.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPositionH\x00\x12\x42\n\x04gtid\x18\x66 \x01(\x0b\x32\x32.google.cloud.datastream.v1.MysqlSourceConfig.GtidH\x00\x1a\x13\n\x11\x42inaryLogPosition\x1a\x06\n\x04GtidB\x0c\n\ncdc_method\"\xda\x01\n\x16SalesforceSourceConfig\x12\x42\n\x0finclude_objects\x18\x01 \x01(\x0b\x32).google.cloud.datastream.v1.SalesforceOrg\x12\x42\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32).google.cloud.datastream.v1.SalesforceOrg\x12\x38\n\x10polling_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\"N\n\rSalesforceOrg\x12=\n\x07objects\x18\x01 \x03(\x0b\x32,.google.cloud.datastream.v1.SalesforceObject\"d\n\x10SalesforceObject\x12\x13\n\x0bobject_name\x18\x01 \x01(\t\x12;\n\x06\x66ields\x18\x02 \x03(\x0b\x32+.google.cloud.datastream.v1.SalesforceField\"D\n\x0fSalesforceField\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x10\n\x08nillable\x18\x03 \x01(\x08\"\xa3\x04\n\x0cSourceConfig\x12V\n\x19source_connection_profile\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/ConnectionProfile\x12N\n\x14oracle_source_config\x18\x64 \x01(\x0b\x32..google.cloud.datastream.v1.OracleSourceConfigH\x00\x12L\n\x13mysql_source_config\x18\x65 \x01(\x0b\x32-.google.cloud.datastream.v1.MysqlSourceConfigH\x00\x12V\n\x18postgresql_source_config\x18\x66 \x01(\x0b\x32\x32.google.cloud.datastream.v1.PostgresqlSourceConfigH\x00\x12U\n\x18sql_server_source_config\x18g \x01(\x0b\x32\x31.google.cloud.datastream.v1.SqlServerSourceConfigH\x00\x12V\n\x18salesforce_source_config\x18h \x01(\x0b\x32\x32.google.cloud.datastream.v1.SalesforceSourceConfigH\x00\x42\x16\n\x14source_stream_config\"\x10\n\x0e\x41vroFileFormat\"\xef\x02\n\x0eJsonFileFormat\x12W\n\x12schema_file_format\x18\x01 \x01(\x0e\x32;.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat\x12O\n\x0b\x63ompression\x18\x02 \x01(\x0e\x32:.google.cloud.datastream.v1.JsonFileFormat.JsonCompression\"`\n\x10SchemaFileFormat\x12\"\n\x1eSCHEMA_FILE_FORMAT_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_SCHEMA_FILE\x10\x01\x12\x14\n\x10\x41VRO_SCHEMA_FILE\x10\x02\"Q\n\x0fJsonCompression\x12 \n\x1cJSON_COMPRESSION_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_COMPRESSION\x10\x01\x12\x08\n\x04GZIP\x10\x02\"\x98\x02\n\x14GcsDestinationConfig\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x18\n\x10\x66ile_rotation_mb\x18\x02 \x01(\x05\x12\x39\n\x16\x66ile_rotation_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x46\n\x10\x61vro_file_format\x18\x64 \x01(\x0b\x32*.google.cloud.datastream.v1.AvroFileFormatH\x00\x12\x46\n\x10json_file_format\x18\x65 \x01(\x0b\x32*.google.cloud.datastream.v1.JsonFileFormatH\x00\x42\r\n\x0b\x66ile_format\"\x9f\n\n\x19\x42igQueryDestinationConfig\x12k\n\x15single_target_dataset\x18\xc9\x01 \x01(\x0b\x32I.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDatasetH\x00\x12s\n\x19source_hierarchy_datasets\x18\xca\x01 \x01(\x0b\x32M.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasetsH\x00\x12\x32\n\x0e\x64\x61ta_freshness\x18\xac\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12Z\n\x0b\x62lmt_config\x18\x01 \x01(\x0b\x32@.google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfigB\x03\xe0\x41\x01\x12M\n\x05merge\x18\xad\x02 \x01(\x0b\x32;.google.cloud.datastream.v1.BigQueryDestinationConfig.MergeH\x01\x12X\n\x0b\x61ppend_only\x18\xae\x02 \x01(\x0b\x32@.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnlyH\x01\x1a)\n\x13SingleTargetDataset\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a\xed\x01\n\x17SourceHierarchyDatasets\x12w\n\x10\x64\x61taset_template\x18\x02 \x01(\x0b\x32].google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate\x1aY\n\x0f\x44\x61tasetTemplate\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x11\x64\x61taset_id_prefix\x18\x02 \x01(\t\x12\x14\n\x0ckms_key_name\x18\x03 \x01(\t\x1a\x94\x03\n\nBlmtConfig\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\troot_path\x18\x02 \x01(\t\x12\x1c\n\x0f\x63onnection_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x0b\x66ile_format\x18\x04 \x01(\x0e\x32K.google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig.FileFormatB\x03\xe0\x41\x02\x12g\n\x0ctable_format\x18\x05 \x01(\x0e\x32L.google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig.TableFormatB\x03\xe0\x41\x02\"6\n\nFileFormat\x12\x1b\n\x17\x46ILE_FORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\"8\n\x0bTableFormat\x12\x1c\n\x18TABLE_FORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07ICEBERG\x10\x01\x1a\x0c\n\nAppendOnly\x1a\x07\n\x05MergeB\x10\n\x0e\x64\x61taset_configB\x0c\n\nwrite_mode\"\xbf\x02\n\x11\x44\x65stinationConfig\x12[\n\x1e\x64\x65stination_connection_profile\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/ConnectionProfile\x12R\n\x16gcs_destination_config\x18\x64 \x01(\x0b\x32\x30.google.cloud.datastream.v1.GcsDestinationConfigH\x00\x12\\\n\x1b\x62igquery_destination_config\x18\x65 \x01(\x0b\x32\x35.google.cloud.datastream.v1.BigQueryDestinationConfigH\x00\x42\x1b\n\x19\x64\x65stination_stream_config\"\x9c\r\n\x06Stream\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x06labels\x18\x04 \x03(\x0b\x32..google.cloud.datastream.v1.Stream.LabelsEntry\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\rsource_config\x18\x06 \x01(\x0b\x32(.google.cloud.datastream.v1.SourceConfigB\x03\xe0\x41\x02\x12N\n\x12\x64\x65stination_config\x18\x07 \x01(\x0b\x32-.google.cloud.datastream.v1.DestinationConfigB\x03\xe0\x41\x02\x12\x37\n\x05state\x18\x08 \x01(\x0e\x32(.google.cloud.datastream.v1.Stream.State\x12N\n\x0c\x62\x61\x63kfill_all\x18\x65 \x01(\x0b\x32\x36.google.cloud.datastream.v1.Stream.BackfillAllStrategyH\x00\x12P\n\rbackfill_none\x18\x66 \x01(\x0b\x32\x37.google.cloud.datastream.v1.Stream.BackfillNoneStrategyH\x00\x12\x36\n\x06\x65rrors\x18\t \x03(\x0b\x32!.google.cloud.datastream.v1.ErrorB\x03\xe0\x41\x03\x12\x31\n\x1f\x63ustomer_managed_encryption_key\x18\n \x01(\tB\x03\xe0\x41\x05H\x01\x88\x01\x01\x12;\n\x12last_recovery_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzs\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1f\n\rsatisfies_pzi\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x1a\xb8\x03\n\x13\x42\x61\x63kfillAllStrategy\x12J\n\x17oracle_excluded_objects\x18\x01 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbmsH\x00\x12H\n\x16mysql_excluded_objects\x18\x02 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbmsH\x00\x12R\n\x1bpostgresql_excluded_objects\x18\x03 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbmsH\x00\x12Q\n\x1bsql_server_excluded_objects\x18\x04 \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbmsH\x00\x12P\n\x1bsalesforce_excluded_objects\x18\x05 \x01(\x0b\x32).google.cloud.datastream.v1.SalesforceOrgH\x00\x42\x12\n\x10\x65xcluded_objects\x1a\x16\n\x14\x42\x61\x63kfillNoneStrategy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x99\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNOT_STARTED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\x0f\n\x0bMAINTENANCE\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x16\n\x12\x46\x41ILED_PERMANENTLY\x10\x06\x12\x0c\n\x08STARTING\x10\x07\x12\x0c\n\x08\x44RAINING\x10\x08:_\xea\x41\\\n datastream.googleapis.com/Stream\x12\x38projects/{project}/locations/{location}/streams/{stream}B\x13\n\x11\x62\x61\x63kfill_strategyB\"\n _customer_managed_encryption_keyB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xe5\x03\n\x0cStreamObject\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x06\x65rrors\x18\x06 \x03(\x0b\x32!.google.cloud.datastream.v1.ErrorB\x03\xe0\x41\x03\x12=\n\x0c\x62\x61\x63kfill_job\x18\x07 \x01(\x0b\x32\'.google.cloud.datastream.v1.BackfillJob\x12I\n\rsource_object\x18\x08 \x01(\x0b\x32\x32.google.cloud.datastream.v1.SourceObjectIdentifier:v\xea\x41s\n&datastream.googleapis.com/StreamObject\x12Iprojects/{project}/locations/{location}/streams/{stream}/objects/{object}\"\x96\x07\n\x16SourceObjectIdentifier\x12\x66\n\x11oracle_identifier\x18\x01 \x01(\x0b\x32I.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifierH\x00\x12\x64\n\x10mysql_identifier\x18\x02 \x01(\x0b\x32H.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifierH\x00\x12n\n\x15postgresql_identifier\x18\x03 \x01(\x0b\x32M.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifierH\x00\x12m\n\x15sql_server_identifier\x18\x04 \x01(\x0b\x32L.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifierH\x00\x12n\n\x15salesforce_identifier\x18\x05 \x01(\x0b\x32M.google.cloud.datastream.v1.SourceObjectIdentifier.SalesforceObjectIdentifierH\x00\x1a\x41\n\x16OracleObjectIdentifier\x12\x13\n\x06schema\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x45\n\x1aPostgresqlObjectIdentifier\x12\x13\n\x06schema\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x42\n\x15MysqlObjectIdentifier\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x44\n\x19SqlServerObjectIdentifier\x12\x13\n\x06schema\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x36\n\x1aSalesforceObjectIdentifier\x12\x18\n\x0bobject_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x13\n\x11source_identifier\"\xff\x03\n\x0b\x42\x61\x63kfillJob\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32-.google.cloud.datastream.v1.BackfillJob.StateB\x03\xe0\x41\x03\x12@\n\x07trigger\x18\x02 \x01(\x0e\x32/.google.cloud.datastream.v1.BackfillJob.Trigger\x12\x38\n\x0flast_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\x06\x65rrors\x18\x05 \x03(\x0b\x32!.google.cloud.datastream.v1.ErrorB\x03\xe0\x41\x03\"\x81\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNOT_STARTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\x12\x0b\n\x07STOPPED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\r\n\tCOMPLETED\x10\x06\x12\x0f\n\x0bUNSUPPORTED\x10\x07\"=\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\"\xdd\x01\n\x05\x45rror\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x12\n\nerror_uuid\x18\x02 \x01(\t\x12\x0f\n\x07message\x18\x03 \x01(\t\x12.\n\nerror_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\x07\x64\x65tails\x18\x05 \x03(\x0b\x32..google.cloud.datastream.v1.Error.DetailsEntry\x1a.\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"O\n\x10ValidationResult\x12;\n\x0bvalidations\x18\x01 \x03(\x0b\x32&.google.cloud.datastream.v1.Validation\"\x88\x02\n\nValidation\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12@\n\x05state\x18\x02 \x01(\x0e\x32,.google.cloud.datastream.v1.Validation.StateB\x03\xe0\x41\x03\x12>\n\x07message\x18\x03 \x03(\x0b\x32-.google.cloud.datastream.v1.ValidationMessage\x12\x0c\n\x04\x63ode\x18\x04 \x01(\t\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_EXECUTED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\n\n\x06PASSED\x10\x03\x12\x0b\n\x07WARNING\x10\x04\"\xae\x02\n\x11ValidationMessage\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x42\n\x05level\x18\x02 \x01(\x0e\x32\x33.google.cloud.datastream.v1.ValidationMessage.Level\x12M\n\x08metadata\x18\x03 \x03(\x0b\x32;.google.cloud.datastream.v1.ValidationMessage.MetadataEntry\x12\x0c\n\x04\x63ode\x18\x04 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"6\n\x05Level\x12\x15\n\x11LEVEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\x80\x06\n\x0b\x43\x64\x63Strategy\x12j\n\x1amost_recent_start_position\x18\x65 \x01(\x0b\x32?.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPositionB\x03\xe0\x41\x01H\x00\x12p\n\x1dnext_available_start_position\x18\x66 \x01(\x0b\x32\x42.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPositionB\x03\xe0\x41\x01H\x00\x12\x65\n\x17specific_start_position\x18g \x01(\x0b\x32=.google.cloud.datastream.v1.CdcStrategy.SpecificStartPositionB\x03\xe0\x41\x01H\x00\x1a\x19\n\x17MostRecentStartPosition\x1a\x1c\n\x1aNextAvailableStartPosition\x1a\xe0\x02\n\x15SpecificStartPosition\x12J\n\x12mysql_log_position\x18\x65 \x01(\x0b\x32,.google.cloud.datastream.v1.MysqlLogPositionH\x00\x12L\n\x13oracle_scn_position\x18\x66 \x01(\x0b\x32-.google.cloud.datastream.v1.OracleScnPositionH\x00\x12S\n\x17sql_server_lsn_position\x18g \x01(\x0b\x32\x30.google.cloud.datastream.v1.SqlServerLsnPositionH\x00\x12L\n\x13mysql_gtid_position\x18h \x01(\x0b\x32-.google.cloud.datastream.v1.MysqlGtidPositionH\x00\x42\n\n\x08positionB\x10\n\x0estart_position\"(\n\x14SqlServerLsnPosition\x12\x10\n\x03lsn\x18\x01 \x01(\tB\x03\xe0\x41\x02\"%\n\x11OracleScnPosition\x12\x10\n\x03scn\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\"Z\n\x10MysqlLogPosition\x12\x15\n\x08log_file\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0clog_position\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0f\n\r_log_position\"*\n\x11MysqlGtidPosition\x12\x15\n\x08gtid_set\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xa8\x02\n\x1e\x63om.google.cloud.datastream.v1B\x18\x44\x61tastreamResourcesProtoP\x01Z>cloud.google.com/go/datastream/apiv1/datastreampb;datastreampb\xaa\x02\x1aGoogle.Cloud.Datastream.V1\xca\x02\x1aGoogle\\Cloud\\Datastream\\V1\xea\x02\x1dGoogle::Cloud::Datastream::V1\xea\x41O\n\x1f\x63ompute.googleapis.com/Networks\x12,projects/{project}/global/networks/{network}b\x06proto3" +descriptor_data = "\n5google/cloud/datastream/v1/datastream_resources.proto\x12\x1agoogle.cloud.datastream.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x03\n\rOracleProfile\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x61tabase_service\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x62\n\x15\x63onnection_attributes\x18\x06 \x03(\x0b\x32\x43.google.cloud.datastream.v1.OracleProfile.ConnectionAttributesEntry\x12K\n\x11oracle_ssl_config\x18\x07 \x01(\x0b\x32+.google.cloud.datastream.v1.OracleSslConfigB\x03\xe0\x41\x01\x12K\n\x11oracle_asm_config\x18\x08 \x01(\x0b\x32+.google.cloud.datastream.v1.OracleAsmConfigB\x03\xe0\x41\x01\x12+\n\x1esecret_manager_stored_password\x18\t \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x43onnectionAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa5\x03\n\x0fOracleAsmConfig\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sm_service\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12i\n\x15\x63onnection_attributes\x18\x06 \x03(\x0b\x32\x45.google.cloud.datastream.v1.OracleAsmConfig.ConnectionAttributesEntryB\x03\xe0\x41\x01\x12K\n\x11oracle_ssl_config\x18\x07 \x01(\x0b\x32+.google.cloud.datastream.v1.OracleSslConfigB\x03\xe0\x41\x01\x12+\n\x1esecret_manager_stored_password\x18\x08 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x43onnectionAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd1\x01\n\x0cMysqlProfile\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08password\x18\x04 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x04\x12>\n\nssl_config\x18\x05 \x01(\x0b\x32*.google.cloud.datastream.v1.MysqlSslConfig\x12+\n\x1esecret_manager_stored_password\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xf4\x01\n\x11PostgresqlProfile\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x61tabase\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12+\n\x1esecret_manager_stored_password\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12H\n\nssl_config\x18\x07 \x01(\x0b\x32/.google.cloud.datastream.v1.PostgresqlSslConfigB\x03\xe0\x41\x01\"\xa9\x01\n\x10SqlServerProfile\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x61tabase\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12+\n\x1esecret_manager_stored_password\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xbe\x04\n\x11SalesforceProfile\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x10user_credentials\x18\x02 \x01(\x0b\x32=.google.cloud.datastream.v1.SalesforceProfile.UserCredentialsH\x00\x12j\n\x19oauth2_client_credentials\x18\x03 \x01(\x0b\x32\x45.google.cloud.datastream.v1.SalesforceProfile.Oauth2ClientCredentialsH\x00\x1a\xbc\x01\n\x0fUserCredentials\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0esecurity_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12+\n\x1esecret_manager_stored_password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x31\n$secret_manager_stored_security_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x7f\n\x17Oauth2ClientCredentials\x12\x16\n\tclient_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rclient_secret\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x30\n#secret_manager_stored_client_secret\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\r\n\x0b\x63redentials\"\xdd\x03\n\x0eMongodbProfile\x12\x44\n\x0ehost_addresses\x18\x01 \x03(\x0b\x32\'.google.cloud.datastream.v1.HostAddressB\x03\xe0\x41\x02\x12\x18\n\x0breplica_set\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12+\n\x1esecret_manager_stored_password\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\nssl_config\x18\x06 \x01(\x0b\x32,.google.cloud.datastream.v1.MongodbSslConfigB\x03\xe0\x41\x01\x12P\n\x15srv_connection_format\x18\x65 \x01(\x0b\x32/.google.cloud.datastream.v1.SrvConnectionFormatH\x00\x12Z\n\x1astandard_connection_format\x18\x66 \x01(\x0b\x32\x34.google.cloud.datastream.v1.StandardConnectionFormatH\x00\x42\x1b\n\x19mongodb_connection_format\"7\n\x0bHostAddress\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"\x15\n\x13SrvConnectionFormat\":\n\x18StandardConnectionFormat\x12\x1e\n\x11\x64irect_connection\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"4\n\nGcsProfile\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\troot_path\x18\x02 \x01(\t\"\x11\n\x0f\x42igQueryProfile\"\x1d\n\x1bStaticServiceIpConnectivity\"\xa8\x01\n\x1c\x46orwardSshTunnelConnectivity\x12\x15\n\x08hostname\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12\x17\n\x08password\x18\x64 \x01(\tB\x03\xe0\x41\x04H\x00\x12\x1a\n\x0bprivate_key\x18\x65 \x01(\tB\x03\xe0\x41\x04H\x00\x42\x17\n\x15\x61uthentication_method\"]\n\x10VpcPeeringConfig\x12\x34\n\x03vpc\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ompute.googleapis.com/Networks\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x02\"b\n\x12PscInterfaceConfig\x12L\n\x12network_attachment\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachment\"\x97\x07\n\x11PrivateConnection\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.datastream.v1.PrivateConnection.LabelsEntry\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12G\n\x05state\x18\x06 \x01(\x0e\x32\x33.google.cloud.datastream.v1.PrivateConnection.StateB\x03\xe0\x41\x03\x12\x35\n\x05\x65rror\x18\x07 \x01(\x0b\x32!.google.cloud.datastream.v1.ErrorB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzs\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1f\n\rsatisfies_pzi\x18\t \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12H\n\x12vpc_peering_config\x18\x64 \x01(\x0b\x32,.google.cloud.datastream.v1.VpcPeeringConfig\x12L\n\x14psc_interface_config\x18\x65 \x01(\x0b\x32..google.cloud.datastream.v1.PscInterfaceConfig\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"i\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x14\n\x10\x46\x41ILED_TO_DELETE\x10\x05:\x81\x01\xea\x41~\n+datastream.googleapis.com/PrivateConnection\x12Oprojects/{project}/locations/{location}/privateConnections/{private_connection}B\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"f\n\x13PrivateConnectivity\x12O\n\x12private_connection\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/PrivateConnection\"\xd6\x03\n\x05Route\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06labels\x18\x04 \x03(\x0b\x32-.google.cloud.datastream.v1.Route.LabelsEntry\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x64\x65stination_address\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x10\x64\x65stination_port\x18\x07 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x85\x01\xea\x41\x81\x01\n\x1f\x64\x61tastream.googleapis.com/Route\x12^projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}\"\x87\x02\n\x10MongodbSslConfig\x12\x1a\n\nclient_key\x18\x01 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12\x1b\n\x0e\x63lient_key_set\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\"\n\x12\x63lient_certificate\x18\x03 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12#\n\x16\x63lient_certificate_set\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1e\n\x0e\x63\x61_certificate\x18\x05 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12\x1f\n\x12\x63\x61_certificate_set\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x30\n secret_manager_stored_client_key\x18\x07 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\"\xd0\x01\n\x0eMysqlSslConfig\x12\x1a\n\nclient_key\x18\x01 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12\x1b\n\x0e\x63lient_key_set\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\"\n\x12\x63lient_certificate\x18\x03 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12#\n\x16\x63lient_certificate_set\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1b\n\x0e\x63\x61_certificate\x18\x05 \x01(\tB\x03\xe0\x41\x04\x12\x1f\n\x12\x63\x61_certificate_set\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\"\x83\x01\n\x0fOracleSslConfig\x12\x1b\n\x0e\x63\x61_certificate\x18\x01 \x01(\tB\x03\xe0\x41\x04\x12\x1f\n\x12\x63\x61_certificate_set\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x32\n%server_certificate_distinguished_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8f\x04\n\x13PostgresqlSslConfig\x12\x61\n\x13server_verification\x18\x01 \x01(\x0b\x32\x42.google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerificationH\x00\x12u\n\x1eserver_and_client_verification\x18\x02 \x01(\x0b\x32K.google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerificationH\x00\x1a^\n\x12ServerVerification\x12\x1e\n\x0e\x63\x61_certificate\x18\x01 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x02\x12(\n\x1bserver_certificate_hostname\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xa7\x01\n\x1bServerAndClientVerification\x12\"\n\x12\x63lient_certificate\x18\x01 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x02\x12\x1a\n\nclient_key\x18\x02 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x0e\x63\x61_certificate\x18\x03 \x01(\tB\x06\xe0\x41\x04\xe0\x41\x02\x12(\n\x1bserver_certificate_hostname\x18\x05 \x01(\tB\x03\xe0\x41\x01\x42\x14\n\x12\x65ncryption_setting\"\x81\x0b\n\x11\x43onnectionProfile\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.datastream.v1.ConnectionProfile.LabelsEntry\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\rsatisfies_pzs\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1f\n\rsatisfies_pzi\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x43\n\x0eoracle_profile\x18\x64 \x01(\x0b\x32).google.cloud.datastream.v1.OracleProfileH\x00\x12=\n\x0bgcs_profile\x18\x65 \x01(\x0b\x32&.google.cloud.datastream.v1.GcsProfileH\x00\x12\x41\n\rmysql_profile\x18\x66 \x01(\x0b\x32(.google.cloud.datastream.v1.MysqlProfileH\x00\x12G\n\x10\x62igquery_profile\x18g \x01(\x0b\x32+.google.cloud.datastream.v1.BigQueryProfileH\x00\x12K\n\x12postgresql_profile\x18h \x01(\x0b\x32-.google.cloud.datastream.v1.PostgresqlProfileH\x00\x12J\n\x12sql_server_profile\x18i \x01(\x0b\x32,.google.cloud.datastream.v1.SqlServerProfileH\x00\x12K\n\x12salesforce_profile\x18k \x01(\x0b\x32-.google.cloud.datastream.v1.SalesforceProfileH\x00\x12\x45\n\x0fmongodb_profile\x18l \x01(\x0b\x32*.google.cloud.datastream.v1.MongodbProfileH\x00\x12\x62\n\x1estatic_service_ip_connectivity\x18\xc8\x01 \x01(\x0b\x32\x37.google.cloud.datastream.v1.StaticServiceIpConnectivityH\x01\x12]\n\x18\x66orward_ssh_connectivity\x18\xc9\x01 \x01(\x0b\x32\x38.google.cloud.datastream.v1.ForwardSshTunnelConnectivityH\x01\x12P\n\x14private_connectivity\x18\xca\x01 \x01(\x0b\x32/.google.cloud.datastream.v1.PrivateConnectivityH\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x81\x01\xea\x41~\n+datastream.googleapis.com/ConnectionProfile\x12Oprojects/{project}/locations/{location}/connectionProfiles/{connection_profile}B\t\n\x07profileB\x0e\n\x0c\x63onnectivityB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xb6\x01\n\x0cOracleColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12\x11\n\tprecision\x18\x04 \x01(\x05\x12\r\n\x05scale\x18\x05 \x01(\x05\x12\x10\n\x08\x65ncoding\x18\x06 \x01(\t\x12\x13\n\x0bprimary_key\x18\x07 \x01(\x08\x12\x10\n\x08nullable\x18\x08 \x01(\x08\x12\x18\n\x10ordinal_position\x18\t \x01(\x05\"^\n\x0bOracleTable\x12\r\n\x05table\x18\x01 \x01(\t\x12@\n\x0eoracle_columns\x18\x02 \x03(\x0b\x32(.google.cloud.datastream.v1.OracleColumn\"^\n\x0cOracleSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12>\n\roracle_tables\x18\x02 \x03(\x0b\x32\'.google.cloud.datastream.v1.OracleTable\"O\n\x0bOracleRdbms\x12@\n\x0eoracle_schemas\x18\x01 \x03(\x0b\x32(.google.cloud.datastream.v1.OracleSchema\"\xbb\x08\n\x12OracleSourceConfig\x12@\n\x0finclude_objects\x18\x01 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbms\x12@\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbms\x12 \n\x18max_concurrent_cdc_tasks\x18\x03 \x01(\x05\x12%\n\x1dmax_concurrent_backfill_tasks\x18\x04 \x01(\x05\x12]\n\x12\x64rop_large_objects\x18\x64 \x01(\x0b\x32?.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjectsH\x00\x12\x61\n\x14stream_large_objects\x18\x66 \x01(\x0b\x32\x41.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjectsH\x00\x12L\n\tlog_miner\x18g \x01(\x0b\x32\x37.google.cloud.datastream.v1.OracleSourceConfig.LogMinerH\x01\x12[\n\x11\x62inary_log_parser\x18h \x01(\x0b\x32>.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParserH\x01\x1a\x12\n\x10\x44ropLargeObjects\x1a\x14\n\x12StreamLargeObjects\x1a\n\n\x08LogMiner\x1a\x8c\x03\n\x0f\x42inaryLogParser\x12{\n\x1aoracle_asm_log_file_access\x18\x01 \x01(\x0b\x32U.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccessH\x00\x12q\n\x14log_file_directories\x18\x02 \x01(\x0b\x32Q.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectoriesH\x00\x1a\x18\n\x16OracleAsmLogFileAccess\x1a\\\n\x12LogFileDirectories\x12!\n\x14online_log_directory\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x16\x61rchived_log_directory\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0flog_file_accessB\x18\n\x16large_objects_handlingB\x0c\n\ncdc_method\"\xa8\x01\n\x10PostgresqlColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12\x11\n\tprecision\x18\x04 \x01(\x05\x12\r\n\x05scale\x18\x05 \x01(\x05\x12\x13\n\x0bprimary_key\x18\x07 \x01(\x08\x12\x10\n\x08nullable\x18\x08 \x01(\x08\x12\x18\n\x10ordinal_position\x18\t \x01(\x05\"j\n\x0fPostgresqlTable\x12\r\n\x05table\x18\x01 \x01(\t\x12H\n\x12postgresql_columns\x18\x02 \x03(\x0b\x32,.google.cloud.datastream.v1.PostgresqlColumn\"j\n\x10PostgresqlSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12\x46\n\x11postgresql_tables\x18\x02 \x03(\x0b\x32+.google.cloud.datastream.v1.PostgresqlTable\"[\n\x0fPostgresqlRdbms\x12H\n\x12postgresql_schemas\x18\x01 \x03(\x0b\x32,.google.cloud.datastream.v1.PostgresqlSchema\"\x87\x02\n\x16PostgresqlSourceConfig\x12\x44\n\x0finclude_objects\x18\x01 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbms\x12\x44\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbms\x12 \n\x10replication_slot\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bpublication\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12%\n\x1dmax_concurrent_backfill_tasks\x18\x05 \x01(\x05\"\xa7\x01\n\x0fSqlServerColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12\x11\n\tprecision\x18\x04 \x01(\x05\x12\r\n\x05scale\x18\x05 \x01(\x05\x12\x13\n\x0bprimary_key\x18\x06 \x01(\x08\x12\x10\n\x08nullable\x18\x07 \x01(\x08\x12\x18\n\x10ordinal_position\x18\x08 \x01(\x05\"]\n\x0eSqlServerTable\x12\r\n\x05table\x18\x01 \x01(\t\x12<\n\x07\x63olumns\x18\x02 \x03(\x0b\x32+.google.cloud.datastream.v1.SqlServerColumn\"]\n\x0fSqlServerSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12:\n\x06tables\x18\x02 \x03(\x0b\x32*.google.cloud.datastream.v1.SqlServerTable\"N\n\x0eSqlServerRdbms\x12<\n\x07schemas\x18\x01 \x03(\x0b\x32+.google.cloud.datastream.v1.SqlServerSchema\"\x96\x03\n\x15SqlServerSourceConfig\x12\x43\n\x0finclude_objects\x18\x01 \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbms\x12\x43\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbms\x12 \n\x18max_concurrent_cdc_tasks\x18\x03 \x01(\x05\x12%\n\x1dmax_concurrent_backfill_tasks\x18\x04 \x01(\x05\x12P\n\x10transaction_logs\x18\x65 \x01(\x0b\x32\x34.google.cloud.datastream.v1.SqlServerTransactionLogsH\x00\x12J\n\rchange_tables\x18\x66 \x01(\x0b\x32\x31.google.cloud.datastream.v1.SqlServerChangeTablesH\x00\x42\x0c\n\ncdc_method\"\x1a\n\x18SqlServerTransactionLogs\"\x17\n\x15SqlServerChangeTables\"\xb6\x01\n\x0bMysqlColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12\x11\n\tcollation\x18\x04 \x01(\t\x12\x13\n\x0bprimary_key\x18\x05 \x01(\x08\x12\x10\n\x08nullable\x18\x06 \x01(\x08\x12\x18\n\x10ordinal_position\x18\x07 \x01(\x05\x12\x11\n\tprecision\x18\x08 \x01(\x05\x12\r\n\x05scale\x18\t \x01(\x05\"[\n\nMysqlTable\x12\r\n\x05table\x18\x01 \x01(\t\x12>\n\rmysql_columns\x18\x02 \x03(\x0b\x32\'.google.cloud.datastream.v1.MysqlColumn\"_\n\rMysqlDatabase\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12<\n\x0cmysql_tables\x18\x02 \x03(\x0b\x32&.google.cloud.datastream.v1.MysqlTable\"P\n\nMysqlRdbms\x12\x42\n\x0fmysql_databases\x18\x01 \x03(\x0b\x32).google.cloud.datastream.v1.MysqlDatabase\"\xad\x03\n\x11MysqlSourceConfig\x12?\n\x0finclude_objects\x18\x01 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbms\x12?\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbms\x12 \n\x18max_concurrent_cdc_tasks\x18\x03 \x01(\x05\x12%\n\x1dmax_concurrent_backfill_tasks\x18\x04 \x01(\x05\x12^\n\x13\x62inary_log_position\x18\x65 \x01(\x0b\x32?.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPositionH\x00\x12\x42\n\x04gtid\x18\x66 \x01(\x0b\x32\x32.google.cloud.datastream.v1.MysqlSourceConfig.GtidH\x00\x1a\x13\n\x11\x42inaryLogPosition\x1a\x06\n\x04GtidB\x0c\n\ncdc_method\"\xda\x01\n\x16SalesforceSourceConfig\x12\x42\n\x0finclude_objects\x18\x01 \x01(\x0b\x32).google.cloud.datastream.v1.SalesforceOrg\x12\x42\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32).google.cloud.datastream.v1.SalesforceOrg\x12\x38\n\x10polling_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\"N\n\rSalesforceOrg\x12=\n\x07objects\x18\x01 \x03(\x0b\x32,.google.cloud.datastream.v1.SalesforceObject\"d\n\x10SalesforceObject\x12\x13\n\x0bobject_name\x18\x01 \x01(\t\x12;\n\x06\x66ields\x18\x02 \x03(\x0b\x32+.google.cloud.datastream.v1.SalesforceField\"D\n\x0fSalesforceField\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x10\n\x08nillable\x18\x03 \x01(\x08\"\xcb\x01\n\x13MongodbSourceConfig\x12\x43\n\x0finclude_objects\x18\x01 \x01(\x0b\x32*.google.cloud.datastream.v1.MongodbCluster\x12\x43\n\x0f\x65xclude_objects\x18\x02 \x01(\x0b\x32*.google.cloud.datastream.v1.MongodbCluster\x12*\n\x1dmax_concurrent_backfill_tasks\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"P\n\x0eMongodbCluster\x12>\n\tdatabases\x18\x01 \x03(\x0b\x32+.google.cloud.datastream.v1.MongodbDatabase\"g\n\x0fMongodbDatabase\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x42\n\x0b\x63ollections\x18\x02 \x03(\x0b\x32-.google.cloud.datastream.v1.MongodbCollection\"a\n\x11MongodbCollection\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x38\n\x06\x66ields\x18\x02 \x03(\x0b\x32(.google.cloud.datastream.v1.MongodbField\"\x1d\n\x0cMongodbField\x12\r\n\x05\x66ield\x18\x01 \x01(\t\"\xf5\x04\n\x0cSourceConfig\x12V\n\x19source_connection_profile\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/ConnectionProfile\x12N\n\x14oracle_source_config\x18\x64 \x01(\x0b\x32..google.cloud.datastream.v1.OracleSourceConfigH\x00\x12L\n\x13mysql_source_config\x18\x65 \x01(\x0b\x32-.google.cloud.datastream.v1.MysqlSourceConfigH\x00\x12V\n\x18postgresql_source_config\x18\x66 \x01(\x0b\x32\x32.google.cloud.datastream.v1.PostgresqlSourceConfigH\x00\x12U\n\x18sql_server_source_config\x18g \x01(\x0b\x32\x31.google.cloud.datastream.v1.SqlServerSourceConfigH\x00\x12V\n\x18salesforce_source_config\x18h \x01(\x0b\x32\x32.google.cloud.datastream.v1.SalesforceSourceConfigH\x00\x12P\n\x15mongodb_source_config\x18i \x01(\x0b\x32/.google.cloud.datastream.v1.MongodbSourceConfigH\x00\x42\x16\n\x14source_stream_config\"\x10\n\x0e\x41vroFileFormat\"\xef\x02\n\x0eJsonFileFormat\x12W\n\x12schema_file_format\x18\x01 \x01(\x0e\x32;.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat\x12O\n\x0b\x63ompression\x18\x02 \x01(\x0e\x32:.google.cloud.datastream.v1.JsonFileFormat.JsonCompression\"`\n\x10SchemaFileFormat\x12\"\n\x1eSCHEMA_FILE_FORMAT_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_SCHEMA_FILE\x10\x01\x12\x14\n\x10\x41VRO_SCHEMA_FILE\x10\x02\"Q\n\x0fJsonCompression\x12 \n\x1cJSON_COMPRESSION_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_COMPRESSION\x10\x01\x12\x08\n\x04GZIP\x10\x02\"\x98\x02\n\x14GcsDestinationConfig\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x18\n\x10\x66ile_rotation_mb\x18\x02 \x01(\x05\x12\x39\n\x16\x66ile_rotation_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x46\n\x10\x61vro_file_format\x18\x64 \x01(\x0b\x32*.google.cloud.datastream.v1.AvroFileFormatH\x00\x12\x46\n\x10json_file_format\x18\x65 \x01(\x0b\x32*.google.cloud.datastream.v1.JsonFileFormatH\x00\x42\r\n\x0b\x66ile_format\"\xcc\n\n\x19\x42igQueryDestinationConfig\x12k\n\x15single_target_dataset\x18\xc9\x01 \x01(\x0b\x32I.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDatasetH\x00\x12s\n\x19source_hierarchy_datasets\x18\xca\x01 \x01(\x0b\x32M.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasetsH\x00\x12\x32\n\x0e\x64\x61ta_freshness\x18\xac\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12Z\n\x0b\x62lmt_config\x18\x01 \x01(\x0b\x32@.google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfigB\x03\xe0\x41\x01\x12M\n\x05merge\x18\xad\x02 \x01(\x0b\x32;.google.cloud.datastream.v1.BigQueryDestinationConfig.MergeH\x01\x12X\n\x0b\x61ppend_only\x18\xae\x02 \x01(\x0b\x32@.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnlyH\x01\x1a)\n\x13SingleTargetDataset\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x1a\x9a\x02\n\x17SourceHierarchyDatasets\x12w\n\x10\x64\x61taset_template\x18\x02 \x01(\x0b\x32].google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate\x12\x1c\n\nproject_id\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1aY\n\x0f\x44\x61tasetTemplate\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x11\x64\x61taset_id_prefix\x18\x02 \x01(\t\x12\x14\n\x0ckms_key_name\x18\x03 \x01(\tB\r\n\x0b_project_id\x1a\x94\x03\n\nBlmtConfig\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\troot_path\x18\x02 \x01(\t\x12\x1c\n\x0f\x63onnection_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x0b\x66ile_format\x18\x04 \x01(\x0e\x32K.google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig.FileFormatB\x03\xe0\x41\x02\x12g\n\x0ctable_format\x18\x05 \x01(\x0e\x32L.google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig.TableFormatB\x03\xe0\x41\x02\"6\n\nFileFormat\x12\x1b\n\x17\x46ILE_FORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\"8\n\x0bTableFormat\x12\x1c\n\x18TABLE_FORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07ICEBERG\x10\x01\x1a\x0c\n\nAppendOnly\x1a\x07\n\x05MergeB\x10\n\x0e\x64\x61taset_configB\x0c\n\nwrite_mode\"\xbf\x02\n\x11\x44\x65stinationConfig\x12[\n\x1e\x64\x65stination_connection_profile\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+datastream.googleapis.com/ConnectionProfile\x12R\n\x16gcs_destination_config\x18\x64 \x01(\x0b\x32\x30.google.cloud.datastream.v1.GcsDestinationConfigH\x00\x12\\\n\x1b\x62igquery_destination_config\x18\x65 \x01(\x0b\x32\x35.google.cloud.datastream.v1.BigQueryDestinationConfigH\x00\x42\x1b\n\x19\x64\x65stination_stream_config\"\xec\r\n\x06Stream\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x06labels\x18\x04 \x03(\x0b\x32..google.cloud.datastream.v1.Stream.LabelsEntry\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\rsource_config\x18\x06 \x01(\x0b\x32(.google.cloud.datastream.v1.SourceConfigB\x03\xe0\x41\x02\x12N\n\x12\x64\x65stination_config\x18\x07 \x01(\x0b\x32-.google.cloud.datastream.v1.DestinationConfigB\x03\xe0\x41\x02\x12\x37\n\x05state\x18\x08 \x01(\x0e\x32(.google.cloud.datastream.v1.Stream.State\x12N\n\x0c\x62\x61\x63kfill_all\x18\x65 \x01(\x0b\x32\x36.google.cloud.datastream.v1.Stream.BackfillAllStrategyH\x00\x12P\n\rbackfill_none\x18\x66 \x01(\x0b\x32\x37.google.cloud.datastream.v1.Stream.BackfillNoneStrategyH\x00\x12\x36\n\x06\x65rrors\x18\t \x03(\x0b\x32!.google.cloud.datastream.v1.ErrorB\x03\xe0\x41\x03\x12\x31\n\x1f\x63ustomer_managed_encryption_key\x18\n \x01(\tB\x03\xe0\x41\x05H\x01\x88\x01\x01\x12;\n\x12last_recovery_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzs\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1f\n\rsatisfies_pzi\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x1a\x88\x04\n\x13\x42\x61\x63kfillAllStrategy\x12J\n\x17oracle_excluded_objects\x18\x01 \x01(\x0b\x32\'.google.cloud.datastream.v1.OracleRdbmsH\x00\x12H\n\x16mysql_excluded_objects\x18\x02 \x01(\x0b\x32&.google.cloud.datastream.v1.MysqlRdbmsH\x00\x12R\n\x1bpostgresql_excluded_objects\x18\x03 \x01(\x0b\x32+.google.cloud.datastream.v1.PostgresqlRdbmsH\x00\x12Q\n\x1bsql_server_excluded_objects\x18\x04 \x01(\x0b\x32*.google.cloud.datastream.v1.SqlServerRdbmsH\x00\x12P\n\x1bsalesforce_excluded_objects\x18\x05 \x01(\x0b\x32).google.cloud.datastream.v1.SalesforceOrgH\x00\x12N\n\x18mongodb_excluded_objects\x18\x06 \x01(\x0b\x32*.google.cloud.datastream.v1.MongodbClusterH\x00\x42\x12\n\x10\x65xcluded_objects\x1a\x16\n\x14\x42\x61\x63kfillNoneStrategy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x99\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNOT_STARTED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\x0f\n\x0bMAINTENANCE\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x16\n\x12\x46\x41ILED_PERMANENTLY\x10\x06\x12\x0c\n\x08STARTING\x10\x07\x12\x0c\n\x08\x44RAINING\x10\x08:_\xea\x41\\\n datastream.googleapis.com/Stream\x12\x38projects/{project}/locations/{location}/streams/{stream}B\x13\n\x11\x62\x61\x63kfill_strategyB\"\n _customer_managed_encryption_keyB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xe5\x03\n\x0cStreamObject\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x06\x65rrors\x18\x06 \x03(\x0b\x32!.google.cloud.datastream.v1.ErrorB\x03\xe0\x41\x03\x12=\n\x0c\x62\x61\x63kfill_job\x18\x07 \x01(\x0b\x32\'.google.cloud.datastream.v1.BackfillJob\x12I\n\rsource_object\x18\x08 \x01(\x0b\x32\x32.google.cloud.datastream.v1.SourceObjectIdentifier:v\xea\x41s\n&datastream.googleapis.com/StreamObject\x12Iprojects/{project}/locations/{location}/streams/{stream}/objects/{object}\"\xcb\x08\n\x16SourceObjectIdentifier\x12\x66\n\x11oracle_identifier\x18\x01 \x01(\x0b\x32I.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifierH\x00\x12\x64\n\x10mysql_identifier\x18\x02 \x01(\x0b\x32H.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifierH\x00\x12n\n\x15postgresql_identifier\x18\x03 \x01(\x0b\x32M.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifierH\x00\x12m\n\x15sql_server_identifier\x18\x04 \x01(\x0b\x32L.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifierH\x00\x12n\n\x15salesforce_identifier\x18\x05 \x01(\x0b\x32M.google.cloud.datastream.v1.SourceObjectIdentifier.SalesforceObjectIdentifierH\x00\x12h\n\x12mongodb_identifier\x18\x06 \x01(\x0b\x32J.google.cloud.datastream.v1.SourceObjectIdentifier.MongodbObjectIdentifierH\x00\x1a\x41\n\x16OracleObjectIdentifier\x12\x13\n\x06schema\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x45\n\x1aPostgresqlObjectIdentifier\x12\x13\n\x06schema\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x42\n\x15MysqlObjectIdentifier\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x44\n\x19SqlServerObjectIdentifier\x12\x13\n\x06schema\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x36\n\x1aSalesforceObjectIdentifier\x12\x18\n\x0bobject_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1aI\n\x17MongodbObjectIdentifier\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncollection\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x13\n\x11source_identifier\"\xff\x03\n\x0b\x42\x61\x63kfillJob\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32-.google.cloud.datastream.v1.BackfillJob.StateB\x03\xe0\x41\x03\x12@\n\x07trigger\x18\x02 \x01(\x0e\x32/.google.cloud.datastream.v1.BackfillJob.Trigger\x12\x38\n\x0flast_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\x06\x65rrors\x18\x05 \x03(\x0b\x32!.google.cloud.datastream.v1.ErrorB\x03\xe0\x41\x03\"\x81\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNOT_STARTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\x12\x0b\n\x07STOPPED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\r\n\tCOMPLETED\x10\x06\x12\x0f\n\x0bUNSUPPORTED\x10\x07\"=\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\"\xdd\x01\n\x05\x45rror\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x12\n\nerror_uuid\x18\x02 \x01(\t\x12\x0f\n\x07message\x18\x03 \x01(\t\x12.\n\nerror_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\x07\x64\x65tails\x18\x05 \x03(\x0b\x32..google.cloud.datastream.v1.Error.DetailsEntry\x1a.\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"O\n\x10ValidationResult\x12;\n\x0bvalidations\x18\x01 \x03(\x0b\x32&.google.cloud.datastream.v1.Validation\"\x88\x02\n\nValidation\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12@\n\x05state\x18\x02 \x01(\x0e\x32,.google.cloud.datastream.v1.Validation.StateB\x03\xe0\x41\x03\x12>\n\x07message\x18\x03 \x03(\x0b\x32-.google.cloud.datastream.v1.ValidationMessage\x12\x0c\n\x04\x63ode\x18\x04 \x01(\t\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_EXECUTED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\n\n\x06PASSED\x10\x03\x12\x0b\n\x07WARNING\x10\x04\"\xae\x02\n\x11ValidationMessage\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x42\n\x05level\x18\x02 \x01(\x0e\x32\x33.google.cloud.datastream.v1.ValidationMessage.Level\x12M\n\x08metadata\x18\x03 \x03(\x0b\x32;.google.cloud.datastream.v1.ValidationMessage.MetadataEntry\x12\x0c\n\x04\x63ode\x18\x04 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"6\n\x05Level\x12\x15\n\x11LEVEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\x80\x06\n\x0b\x43\x64\x63Strategy\x12j\n\x1amost_recent_start_position\x18\x65 \x01(\x0b\x32?.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPositionB\x03\xe0\x41\x01H\x00\x12p\n\x1dnext_available_start_position\x18\x66 \x01(\x0b\x32\x42.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPositionB\x03\xe0\x41\x01H\x00\x12\x65\n\x17specific_start_position\x18g \x01(\x0b\x32=.google.cloud.datastream.v1.CdcStrategy.SpecificStartPositionB\x03\xe0\x41\x01H\x00\x1a\x19\n\x17MostRecentStartPosition\x1a\x1c\n\x1aNextAvailableStartPosition\x1a\xe0\x02\n\x15SpecificStartPosition\x12J\n\x12mysql_log_position\x18\x65 \x01(\x0b\x32,.google.cloud.datastream.v1.MysqlLogPositionH\x00\x12L\n\x13oracle_scn_position\x18\x66 \x01(\x0b\x32-.google.cloud.datastream.v1.OracleScnPositionH\x00\x12S\n\x17sql_server_lsn_position\x18g \x01(\x0b\x32\x30.google.cloud.datastream.v1.SqlServerLsnPositionH\x00\x12L\n\x13mysql_gtid_position\x18h \x01(\x0b\x32-.google.cloud.datastream.v1.MysqlGtidPositionH\x00\x42\n\n\x08positionB\x10\n\x0estart_position\"(\n\x14SqlServerLsnPosition\x12\x10\n\x03lsn\x18\x01 \x01(\tB\x03\xe0\x41\x02\"%\n\x11OracleScnPosition\x12\x10\n\x03scn\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\"Z\n\x10MysqlLogPosition\x12\x15\n\x08log_file\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0clog_position\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0f\n\r_log_position\"*\n\x11MysqlGtidPosition\x12\x15\n\x08gtid_set\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xa2\x03\n\x1e\x63om.google.cloud.datastream.v1B\x18\x44\x61tastreamResourcesProtoP\x01Z>cloud.google.com/go/datastream/apiv1/datastreampb;datastreampb\xaa\x02\x1aGoogle.Cloud.Datastream.V1\xca\x02\x1aGoogle\\Cloud\\Datastream\\V1\xea\x02\x1dGoogle::Cloud::Datastream::V1\xea\x41O\n\x1f\x63ompute.googleapis.com/Networks\x12,projects/{project}/global/networks/{network}\xea\x41w\n(compute.googleapis.com/NetworkAttachment\x12Kprojects/{project}/regions/{region}/networkAttachments/{network_attachment}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -50,15 +50,21 @@ module V1 SalesforceProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SalesforceProfile").msgclass SalesforceProfile::UserCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SalesforceProfile.UserCredentials").msgclass SalesforceProfile::Oauth2ClientCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SalesforceProfile.Oauth2ClientCredentials").msgclass + MongodbProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.MongodbProfile").msgclass + HostAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.HostAddress").msgclass + SrvConnectionFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SrvConnectionFormat").msgclass + StandardConnectionFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.StandardConnectionFormat").msgclass GcsProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.GcsProfile").msgclass BigQueryProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.BigQueryProfile").msgclass StaticServiceIpConnectivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.StaticServiceIpConnectivity").msgclass ForwardSshTunnelConnectivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.ForwardSshTunnelConnectivity").msgclass VpcPeeringConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.VpcPeeringConfig").msgclass + PscInterfaceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.PscInterfaceConfig").msgclass PrivateConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.PrivateConnection").msgclass PrivateConnection::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.PrivateConnection.State").enummodule PrivateConnectivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.PrivateConnectivity").msgclass Route = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.Route").msgclass + MongodbSslConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.MongodbSslConfig").msgclass MysqlSslConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.MysqlSslConfig").msgclass OracleSslConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.OracleSslConfig").msgclass PostgresqlSslConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.PostgresqlSslConfig").msgclass @@ -99,6 +105,11 @@ module V1 SalesforceOrg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SalesforceOrg").msgclass SalesforceObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SalesforceObject").msgclass SalesforceField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SalesforceField").msgclass + MongodbSourceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.MongodbSourceConfig").msgclass + MongodbCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.MongodbCluster").msgclass + MongodbDatabase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.MongodbDatabase").msgclass + MongodbCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.MongodbCollection").msgclass + MongodbField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.MongodbField").msgclass SourceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SourceConfig").msgclass AvroFileFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.AvroFileFormat").msgclass JsonFileFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.JsonFileFormat").msgclass @@ -126,6 +137,7 @@ module V1 SourceObjectIdentifier::MysqlObjectIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier").msgclass SourceObjectIdentifier::SqlServerObjectIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier").msgclass SourceObjectIdentifier::SalesforceObjectIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SourceObjectIdentifier.SalesforceObjectIdentifier").msgclass + SourceObjectIdentifier::MongodbObjectIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.SourceObjectIdentifier.MongodbObjectIdentifier").msgclass BackfillJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.BackfillJob").msgclass BackfillJob::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.BackfillJob.State").enummodule BackfillJob::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.datastream.v1.BackfillJob.Trigger").enummodule diff --git a/google-cloud-datastream-v1/proto_docs/google/cloud/datastream/v1/datastream.rb b/google-cloud-datastream-v1/proto_docs/google/cloud/datastream/v1/datastream.rb index 81ab8a6605c9..75b72342f0f2 100644 --- a/google-cloud-datastream-v1/proto_docs/google/cloud/datastream/v1/datastream.rb +++ b/google-cloud-datastream-v1/proto_docs/google/cloud/datastream/v1/datastream.rb @@ -51,22 +51,32 @@ module V1 # @return [::Google::Cloud::Datastream::V1::OracleRdbms] # Oracle RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. 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: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mysql_rdbms # @return [::Google::Cloud::Datastream::V1::MysqlRdbms] # MySQL RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. 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: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] postgresql_rdbms # @return [::Google::Cloud::Datastream::V1::PostgresqlRdbms] # PostgreSQL RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. 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: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] sql_server_rdbms # @return [::Google::Cloud::Datastream::V1::SqlServerRdbms] # SQLServer RDBMS to enrich with child data objects and metadata. # - # Note: The following fields are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. 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: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `salesforce_org`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] salesforce_org + # @return [::Google::Cloud::Datastream::V1::SalesforceOrg] + # Salesforce organization to enrich with child data objects and metadata. + # + # Note: The following fields are mutually exclusive: `salesforce_org`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mongodb_cluster + # @return [::Google::Cloud::Datastream::V1::MongodbCluster] + # MongoDB cluster to enrich with child data objects and metadata. + # + # Note: The following fields are mutually exclusive: `mongodb_cluster`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`. If a field in that set is populated, all other fields in the set will automatically be cleared. class DiscoverConnectionProfileRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -77,22 +87,32 @@ class DiscoverConnectionProfileRequest # @return [::Google::Cloud::Datastream::V1::OracleRdbms] # Enriched Oracle RDBMS object. # - # Note: The following fields are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. 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: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mysql_rdbms # @return [::Google::Cloud::Datastream::V1::MysqlRdbms] # Enriched MySQL RDBMS object. # - # Note: The following fields are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. 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: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] postgresql_rdbms # @return [::Google::Cloud::Datastream::V1::PostgresqlRdbms] # Enriched PostgreSQL RDBMS object. # - # Note: The following fields are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. 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: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`, `salesforce_org`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] sql_server_rdbms # @return [::Google::Cloud::Datastream::V1::SqlServerRdbms] # Enriched SQLServer RDBMS object. # - # Note: The following fields are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. 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: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `salesforce_org`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] salesforce_org + # @return [::Google::Cloud::Datastream::V1::SalesforceOrg] + # Enriched Salesforce organization. + # + # Note: The following fields are mutually exclusive: `salesforce_org`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `mongodb_cluster`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mongodb_cluster + # @return [::Google::Cloud::Datastream::V1::MongodbCluster] + # Enriched MongoDB cluster. + # + # Note: The following fields are mutually exclusive: `mongodb_cluster`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`, `salesforce_org`. If a field in that set is populated, all other fields in the set will automatically be cleared. class DiscoverConnectionProfileResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -604,6 +624,11 @@ class OperationMetadata # @!attribute [rw] force # @return [::Boolean] # Optional. If set to true, will skip validations. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. When supplied with PSC Interface config, will get/create the + # tenant project required for the customer to allow list and won't actually + # create the private connection. class CreatePrivateConnectionRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-datastream-v1/proto_docs/google/cloud/datastream/v1/datastream_resources.rb b/google-cloud-datastream-v1/proto_docs/google/cloud/datastream/v1/datastream_resources.rb index bf96bb15ddb0..d2564c66231b 100644 --- a/google-cloud-datastream-v1/proto_docs/google/cloud/datastream/v1/datastream_resources.rb +++ b/google-cloud-datastream-v1/proto_docs/google/cloud/datastream/v1/datastream_resources.rb @@ -256,6 +256,77 @@ class Oauth2ClientCredentials end end + # MongoDB profile. + # @!attribute [rw] host_addresses + # @return [::Array<::Google::Cloud::Datastream::V1::HostAddress>] + # Required. List of host addresses for a MongoDB cluster. + # For SRV connection format, this list must contain exactly one DNS host + # without a port. For Standard connection format, this list must contain all + # the required hosts in the cluster with their respective ports. + # @!attribute [rw] replica_set + # @return [::String] + # Optional. Name of the replica set. Only needed for self hosted replica set + # type MongoDB cluster. For SRV connection format, this field must be empty. + # For Standard connection format, this field must be specified. + # @!attribute [rw] username + # @return [::String] + # Required. Username for the MongoDB connection. + # @!attribute [rw] password + # @return [::String] + # Optional. Password for the MongoDB connection. Mutually exclusive with the + # `secret_manager_stored_password` field. + # @!attribute [rw] secret_manager_stored_password + # @return [::String] + # Optional. A reference to a Secret Manager resource name storing the + # SQLServer connection password. Mutually exclusive with the `password` + # field. + # @!attribute [rw] ssl_config + # @return [::Google::Cloud::Datastream::V1::MongodbSslConfig] + # Optional. SSL configuration for the MongoDB connection. + # @!attribute [rw] srv_connection_format + # @return [::Google::Cloud::Datastream::V1::SrvConnectionFormat] + # Srv connection format. + # + # Note: The following fields are mutually exclusive: `srv_connection_format`, `standard_connection_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] standard_connection_format + # @return [::Google::Cloud::Datastream::V1::StandardConnectionFormat] + # Standard connection format. + # + # Note: The following fields are mutually exclusive: `standard_connection_format`, `srv_connection_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MongodbProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A HostAddress represents a transport end point, which is the combination + # of an IP address or hostname and a port number. + # @!attribute [rw] hostname + # @return [::String] + # Required. Hostname for the connection. + # @!attribute [rw] port + # @return [::Integer] + # Optional. Port for the connection. + class HostAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Srv connection format. + class SrvConnectionFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Standard connection format. + # @!attribute [rw] direct_connection + # @return [::Boolean] + # Optional. Specifies whether the client connects directly to the host[:port] + # in the connection URI. + class StandardConnectionFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Cloud Storage bucket profile. # @!attribute [rw] bucket # @return [::String] @@ -321,6 +392,18 @@ class VpcPeeringConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # The PSC Interface configuration is used to create PSC Interface between + # Datastream and the consumer's PSC. + # @!attribute [rw] network_attachment + # @return [::String] + # Required. Fully qualified name of the Network Attachment that Datastream + # will connect to. Format: + # `projects/{project}/regions/{region}/networkAttachments/{name}` + class PscInterfaceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The PrivateConnection resource is used to establish private connectivity # between Datastream and a customer's network. # @!attribute [r] name @@ -354,6 +437,9 @@ class VpcPeeringConfig # @!attribute [rw] vpc_peering_config # @return [::Google::Cloud::Datastream::V1::VpcPeeringConfig] # VPC Peering Config. + # @!attribute [rw] psc_interface_config + # @return [::Google::Cloud::Datastream::V1::PscInterfaceConfig] + # PSC Interface Config. class PrivateConnection include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -436,6 +522,42 @@ class LabelsEntry end end + # MongoDB SSL configuration information. + # @!attribute [rw] client_key + # @return [::String] + # Optional. Input only. PEM-encoded private key associated with the Client + # Certificate. If this field is used then the 'client_certificate' and the + # 'ca_certificate' fields are mandatory. + # @!attribute [r] client_key_set + # @return [::Boolean] + # Output only. Indicates whether the client_key field is set. + # @!attribute [rw] client_certificate + # @return [::String] + # Optional. Input only. PEM-encoded certificate that will be used by the + # replica to authenticate against the source database server. If this field + # is used then the 'client_key' and the 'ca_certificate' fields are + # mandatory. + # @!attribute [r] client_certificate_set + # @return [::Boolean] + # Output only. Indicates whether the client_certificate field is set. + # @!attribute [rw] ca_certificate + # @return [::String] + # Optional. Input only. PEM-encoded certificate of the CA that signed the + # source database server's certificate. + # @!attribute [r] ca_certificate_set + # @return [::Boolean] + # Output only. Indicates whether the ca_certificate field is set. + # @!attribute [rw] secret_manager_stored_client_key + # @return [::String] + # Optional. Input only. A reference to a Secret Manager resource name storing + # the PEM-encoded private key associated with the Client Certificate. If this + # field is used then the 'client_certificate' and the 'ca_certificate' fields + # are mandatory. Mutually exclusive with the `client_key` field. + class MongodbSslConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # MySQL SSL configuration information. # @!attribute [rw] client_key # @return [::String] @@ -475,6 +597,13 @@ class MysqlSslConfig # @return [::Boolean] # Output only. Indicates whether the ca_certificate field has been set for # this Connection-Profile. + # @!attribute [rw] server_certificate_distinguished_name + # @return [::String] + # Optional. The distinguished name (DN) mentioned in the server + # certificate. This corresponds to SSL_SERVER_CERT_DN sqlnet parameter. + # Refer + # https://docs.oracle.com/en/database/oracle/oracle-database/19/netrf/local-naming-parameters-in-tns-ora-file.html#GUID-70AB0695-A9AA-4A94-B141-4C605236EEB7 + # If this field is not provided, the DN matching is not enforced. class OracleSslConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -504,6 +633,11 @@ class PostgresqlSslConfig # @!attribute [rw] ca_certificate # @return [::String] # Required. Input only. PEM-encoded server root CA certificate. + # @!attribute [rw] server_certificate_hostname + # @return [::String] + # Optional. The hostname mentioned in the Subject or SAN extension of the + # server certificate. If this field is not provided, the hostname in the + # server certificate is not validated. class ServerVerification include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -530,6 +664,11 @@ class ServerVerification # @!attribute [rw] ca_certificate # @return [::String] # Required. Input only. PEM-encoded server root CA certificate. + # @!attribute [rw] server_certificate_hostname + # @return [::String] + # Optional. The hostname mentioned in the Subject or SAN extension of the + # server certificate. If this field is not provided, the hostname in the + # server certificate is not validated. class ServerAndClientVerification include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -563,37 +702,42 @@ class ServerAndClientVerification # @return [::Google::Cloud::Datastream::V1::OracleProfile] # Oracle ConnectionProfile configuration. # - # Note: The following fields are mutually exclusive: `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`. 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: `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`, `mongodb_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] gcs_profile # @return [::Google::Cloud::Datastream::V1::GcsProfile] # Cloud Storage ConnectionProfile configuration. # - # Note: The following fields are mutually exclusive: `gcs_profile`, `oracle_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`. 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: `gcs_profile`, `oracle_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`, `mongodb_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mysql_profile # @return [::Google::Cloud::Datastream::V1::MysqlProfile] # MySQL ConnectionProfile configuration. # - # Note: The following fields are mutually exclusive: `mysql_profile`, `oracle_profile`, `gcs_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`. 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: `mysql_profile`, `oracle_profile`, `gcs_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`, `mongodb_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bigquery_profile # @return [::Google::Cloud::Datastream::V1::BigQueryProfile] # BigQuery Connection Profile configuration. # - # Note: The following fields are mutually exclusive: `bigquery_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`. 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: `bigquery_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`, `mongodb_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] postgresql_profile # @return [::Google::Cloud::Datastream::V1::PostgresqlProfile] # PostgreSQL Connection Profile configuration. # - # Note: The following fields are mutually exclusive: `postgresql_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `sql_server_profile`, `salesforce_profile`. 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: `postgresql_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `sql_server_profile`, `salesforce_profile`, `mongodb_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] sql_server_profile # @return [::Google::Cloud::Datastream::V1::SqlServerProfile] # SQLServer Connection Profile configuration. # - # Note: The following fields are mutually exclusive: `sql_server_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `salesforce_profile`. 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: `sql_server_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `salesforce_profile`, `mongodb_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] salesforce_profile # @return [::Google::Cloud::Datastream::V1::SalesforceProfile] # Salesforce Connection Profile configuration. # - # Note: The following fields are mutually exclusive: `salesforce_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`. 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: `salesforce_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`, `mongodb_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mongodb_profile + # @return [::Google::Cloud::Datastream::V1::MongodbProfile] + # MongoDB Connection Profile configuration. + # + # Note: The following fields are mutually exclusive: `mongodb_profile`, `oracle_profile`, `gcs_profile`, `mysql_profile`, `bigquery_profile`, `postgresql_profile`, `sql_server_profile`, `salesforce_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] static_service_ip_connectivity # @return [::Google::Cloud::Datastream::V1::StaticServiceIpConnectivity] # Static Service IP connectivity. @@ -1146,6 +1290,65 @@ class SalesforceField extend ::Google::Protobuf::MessageExts::ClassMethods end + # MongoDB source configuration. + # @!attribute [rw] include_objects + # @return [::Google::Cloud::Datastream::V1::MongodbCluster] + # MongoDB collections to include in the stream. + # @!attribute [rw] exclude_objects + # @return [::Google::Cloud::Datastream::V1::MongodbCluster] + # MongoDB collections to exclude from the stream. + # @!attribute [rw] max_concurrent_backfill_tasks + # @return [::Integer] + # Optional. Maximum number of concurrent backfill tasks. The number should be + # non-negative and less than or equal to 50. If not set (or set to 0), the + # system's default value is used + class MongodbSourceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MongoDB Cluster structure. + # @!attribute [rw] databases + # @return [::Array<::Google::Cloud::Datastream::V1::MongodbDatabase>] + # MongoDB databases in the cluster. + class MongodbCluster + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MongoDB Database. + # @!attribute [rw] database + # @return [::String] + # Database name. + # @!attribute [rw] collections + # @return [::Array<::Google::Cloud::Datastream::V1::MongodbCollection>] + # Collections in the database. + class MongodbDatabase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MongoDB Collection. + # @!attribute [rw] collection + # @return [::String] + # Collection name. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Datastream::V1::MongodbField>] + # Fields in the collection. + class MongodbCollection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MongoDB Field. + # @!attribute [rw] field + # @return [::String] + # Field name. + class MongodbField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The configuration of the stream source. # @!attribute [rw] source_connection_profile # @return [::String] @@ -1155,27 +1358,32 @@ class SalesforceField # @return [::Google::Cloud::Datastream::V1::OracleSourceConfig] # Oracle data source configuration. # - # Note: The following fields are mutually exclusive: `oracle_source_config`, `mysql_source_config`, `postgresql_source_config`, `sql_server_source_config`, `salesforce_source_config`. 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: `oracle_source_config`, `mysql_source_config`, `postgresql_source_config`, `sql_server_source_config`, `salesforce_source_config`, `mongodb_source_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mysql_source_config # @return [::Google::Cloud::Datastream::V1::MysqlSourceConfig] # MySQL data source configuration. # - # Note: The following fields are mutually exclusive: `mysql_source_config`, `oracle_source_config`, `postgresql_source_config`, `sql_server_source_config`, `salesforce_source_config`. 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: `mysql_source_config`, `oracle_source_config`, `postgresql_source_config`, `sql_server_source_config`, `salesforce_source_config`, `mongodb_source_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] postgresql_source_config # @return [::Google::Cloud::Datastream::V1::PostgresqlSourceConfig] # PostgreSQL data source configuration. # - # Note: The following fields are mutually exclusive: `postgresql_source_config`, `oracle_source_config`, `mysql_source_config`, `sql_server_source_config`, `salesforce_source_config`. 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: `postgresql_source_config`, `oracle_source_config`, `mysql_source_config`, `sql_server_source_config`, `salesforce_source_config`, `mongodb_source_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] sql_server_source_config # @return [::Google::Cloud::Datastream::V1::SqlServerSourceConfig] # SQLServer data source configuration. # - # Note: The following fields are mutually exclusive: `sql_server_source_config`, `oracle_source_config`, `mysql_source_config`, `postgresql_source_config`, `salesforce_source_config`. 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: `sql_server_source_config`, `oracle_source_config`, `mysql_source_config`, `postgresql_source_config`, `salesforce_source_config`, `mongodb_source_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] salesforce_source_config # @return [::Google::Cloud::Datastream::V1::SalesforceSourceConfig] # Salesforce data source configuration. # - # Note: The following fields are mutually exclusive: `salesforce_source_config`, `oracle_source_config`, `mysql_source_config`, `postgresql_source_config`, `sql_server_source_config`. 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: `salesforce_source_config`, `oracle_source_config`, `mysql_source_config`, `postgresql_source_config`, `sql_server_source_config`, `mongodb_source_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mongodb_source_config + # @return [::Google::Cloud::Datastream::V1::MongodbSourceConfig] + # MongoDB data source configuration. + # + # Note: The following fields are mutually exclusive: `mongodb_source_config`, `oracle_source_config`, `mysql_source_config`, `postgresql_source_config`, `sql_server_source_config`, `salesforce_source_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SourceConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1300,6 +1508,10 @@ class SingleTargetDataset # @!attribute [rw] dataset_template # @return [::Google::Cloud::Datastream::V1::BigQueryDestinationConfig::SourceHierarchyDatasets::DatasetTemplate] # The dataset template to use for dynamic dataset creation. + # @!attribute [rw] project_id + # @return [::String] + # Optional. The project id of the BigQuery dataset. If not specified, the + # project will be inferred from the stream resource. class SourceHierarchyDatasets include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1470,27 +1682,32 @@ class Stream # @return [::Google::Cloud::Datastream::V1::OracleRdbms] # Oracle data source objects to avoid backfilling. # - # Note: The following fields are mutually exclusive: `oracle_excluded_objects`, `mysql_excluded_objects`, `postgresql_excluded_objects`, `sql_server_excluded_objects`, `salesforce_excluded_objects`. 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: `oracle_excluded_objects`, `mysql_excluded_objects`, `postgresql_excluded_objects`, `sql_server_excluded_objects`, `salesforce_excluded_objects`, `mongodb_excluded_objects`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mysql_excluded_objects # @return [::Google::Cloud::Datastream::V1::MysqlRdbms] # MySQL data source objects to avoid backfilling. # - # Note: The following fields are mutually exclusive: `mysql_excluded_objects`, `oracle_excluded_objects`, `postgresql_excluded_objects`, `sql_server_excluded_objects`, `salesforce_excluded_objects`. 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: `mysql_excluded_objects`, `oracle_excluded_objects`, `postgresql_excluded_objects`, `sql_server_excluded_objects`, `salesforce_excluded_objects`, `mongodb_excluded_objects`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] postgresql_excluded_objects # @return [::Google::Cloud::Datastream::V1::PostgresqlRdbms] # PostgreSQL data source objects to avoid backfilling. # - # Note: The following fields are mutually exclusive: `postgresql_excluded_objects`, `oracle_excluded_objects`, `mysql_excluded_objects`, `sql_server_excluded_objects`, `salesforce_excluded_objects`. 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: `postgresql_excluded_objects`, `oracle_excluded_objects`, `mysql_excluded_objects`, `sql_server_excluded_objects`, `salesforce_excluded_objects`, `mongodb_excluded_objects`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] sql_server_excluded_objects # @return [::Google::Cloud::Datastream::V1::SqlServerRdbms] # SQLServer data source objects to avoid backfilling # - # Note: The following fields are mutually exclusive: `sql_server_excluded_objects`, `oracle_excluded_objects`, `mysql_excluded_objects`, `postgresql_excluded_objects`, `salesforce_excluded_objects`. 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: `sql_server_excluded_objects`, `oracle_excluded_objects`, `mysql_excluded_objects`, `postgresql_excluded_objects`, `salesforce_excluded_objects`, `mongodb_excluded_objects`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] salesforce_excluded_objects # @return [::Google::Cloud::Datastream::V1::SalesforceOrg] # Salesforce data source objects to avoid backfilling # - # Note: The following fields are mutually exclusive: `salesforce_excluded_objects`, `oracle_excluded_objects`, `mysql_excluded_objects`, `postgresql_excluded_objects`, `sql_server_excluded_objects`. 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: `salesforce_excluded_objects`, `oracle_excluded_objects`, `mysql_excluded_objects`, `postgresql_excluded_objects`, `sql_server_excluded_objects`, `mongodb_excluded_objects`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mongodb_excluded_objects + # @return [::Google::Cloud::Datastream::V1::MongodbCluster] + # MongoDB data source objects to avoid backfilling + # + # Note: The following fields are mutually exclusive: `mongodb_excluded_objects`, `oracle_excluded_objects`, `mysql_excluded_objects`, `postgresql_excluded_objects`, `sql_server_excluded_objects`, `salesforce_excluded_objects`. If a field in that set is populated, all other fields in the set will automatically be cleared. class BackfillAllStrategy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1578,27 +1795,32 @@ class StreamObject # @return [::Google::Cloud::Datastream::V1::SourceObjectIdentifier::OracleObjectIdentifier] # Oracle data source object identifier. # - # Note: The following fields are mutually exclusive: `oracle_identifier`, `mysql_identifier`, `postgresql_identifier`, `sql_server_identifier`, `salesforce_identifier`. 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: `oracle_identifier`, `mysql_identifier`, `postgresql_identifier`, `sql_server_identifier`, `salesforce_identifier`, `mongodb_identifier`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mysql_identifier # @return [::Google::Cloud::Datastream::V1::SourceObjectIdentifier::MysqlObjectIdentifier] # Mysql data source object identifier. # - # Note: The following fields are mutually exclusive: `mysql_identifier`, `oracle_identifier`, `postgresql_identifier`, `sql_server_identifier`, `salesforce_identifier`. 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: `mysql_identifier`, `oracle_identifier`, `postgresql_identifier`, `sql_server_identifier`, `salesforce_identifier`, `mongodb_identifier`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] postgresql_identifier # @return [::Google::Cloud::Datastream::V1::SourceObjectIdentifier::PostgresqlObjectIdentifier] # PostgreSQL data source object identifier. # - # Note: The following fields are mutually exclusive: `postgresql_identifier`, `oracle_identifier`, `mysql_identifier`, `sql_server_identifier`, `salesforce_identifier`. 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: `postgresql_identifier`, `oracle_identifier`, `mysql_identifier`, `sql_server_identifier`, `salesforce_identifier`, `mongodb_identifier`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] sql_server_identifier # @return [::Google::Cloud::Datastream::V1::SourceObjectIdentifier::SqlServerObjectIdentifier] # SQLServer data source object identifier. # - # Note: The following fields are mutually exclusive: `sql_server_identifier`, `oracle_identifier`, `mysql_identifier`, `postgresql_identifier`, `salesforce_identifier`. 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: `sql_server_identifier`, `oracle_identifier`, `mysql_identifier`, `postgresql_identifier`, `salesforce_identifier`, `mongodb_identifier`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] salesforce_identifier # @return [::Google::Cloud::Datastream::V1::SourceObjectIdentifier::SalesforceObjectIdentifier] # Salesforce data source object identifier. # - # Note: The following fields are mutually exclusive: `salesforce_identifier`, `oracle_identifier`, `mysql_identifier`, `postgresql_identifier`, `sql_server_identifier`. 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: `salesforce_identifier`, `oracle_identifier`, `mysql_identifier`, `postgresql_identifier`, `sql_server_identifier`, `mongodb_identifier`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mongodb_identifier + # @return [::Google::Cloud::Datastream::V1::SourceObjectIdentifier::MongodbObjectIdentifier] + # MongoDB data source object identifier. + # + # Note: The following fields are mutually exclusive: `mongodb_identifier`, `oracle_identifier`, `mysql_identifier`, `postgresql_identifier`, `sql_server_identifier`, `salesforce_identifier`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SourceObjectIdentifier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1659,6 +1881,18 @@ class SalesforceObjectIdentifier include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # MongoDB data source object identifier. + # @!attribute [rw] database + # @return [::String] + # Required. The database name. + # @!attribute [rw] collection + # @return [::String] + # Required. The collection name. + class MongodbObjectIdentifier + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # Represents a backfill job on a specific stream object. diff --git a/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_paths_test.rb b/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_paths_test.rb index 2a5bf9a1b0d5..78a727fb5c19 100644 --- a/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_paths_test.rb +++ b/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_paths_test.rb @@ -65,6 +65,18 @@ def test_location_path end end + def test_network_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Datastream::V1::Datastream::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_attachment_path project: "value0", region: "value1", network_attachment: "value2" + assert_equal "projects/value0/regions/value1/networkAttachments/value2", path + end + end + def test_networks_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_rest_test.rb b/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_rest_test.rb index 01b5930c9243..fb1d42c25f3a 100644 --- a/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_rest_test.rb +++ b/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_rest_test.rb @@ -1101,6 +1101,7 @@ def test_create_private_connection private_connection = {} request_id = "hello world" force = true + validate_only = true create_private_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1116,27 +1117,27 @@ def test_create_private_connection end # Use hash object - client.create_private_connection({ parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force }) do |_result, response| + client.create_private_connection({ parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.create_private_connection parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force do |_result, response| + client.create_private_connection parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.create_private_connection ::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new(parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force) do |_result, response| + client.create_private_connection ::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new(parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.create_private_connection({ parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force }, call_options) do |_result, response| + client.create_private_connection({ parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.create_private_connection(::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new(parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force), call_options) do |_result, response| + client.create_private_connection(::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new(parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_test.rb b/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_test.rb index aeb0f748903a..c9f467b0d696 100644 --- a/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_test.rb +++ b/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_test.rb @@ -1250,6 +1250,7 @@ def test_create_private_connection private_connection = {} request_id = "hello world" force = true + validate_only = true create_private_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :create_private_connection, name @@ -1259,6 +1260,7 @@ def test_create_private_connection assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Datastream::V1::PrivateConnection), request["private_connection"] assert_equal "hello world", request["request_id"] assert_equal true, request["force"] + assert_equal true, request["validate_only"] refute_nil options end @@ -1269,35 +1271,35 @@ def test_create_private_connection end # Use hash object - client.create_private_connection({ parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force }) do |response, operation| + client.create_private_connection({ parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.create_private_connection parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force do |response, operation| + client.create_private_connection parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.create_private_connection ::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new(parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force) do |response, operation| + client.create_private_connection ::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new(parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.create_private_connection({ parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force }, grpc_options) do |response, operation| + client.create_private_connection({ parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.create_private_connection(::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new(parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force), grpc_options) do |response, operation| + client.create_private_connection(::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new(parent: parent, private_connection_id: private_connection_id, private_connection: private_connection, request_id: request_id, force: force, validate_only: validate_only), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation From 5c83142f41a2321b6bd85f02020c6212310f6b75 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 12:34:55 -0700 Subject: [PATCH 389/457] feat: Addition of app auth support for chat api (#30748) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs: Update reference documentation PiperOrigin-RevId: 788882030 Source-Link: https://github.com/googleapis/googleapis/commit/f6801ce4e1df0541abb8d1e996cb36363c41fb8d Source-Link: https://github.com/googleapis/googleapis-gen/commit/34024b594c3714ed6a411805007fc4d6244ea632 Copy-Tag: eyJwIjoiZ29vZ2xlLWFwcHMtY2hhdC12MS8uT3dsQm90LnlhbWwiLCJoIjoiMzQwMjRiNTk0YzM3MTRlZDZhNDExODA1MDA3ZmM0ZDYyNDRlYTYzMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../apps/chat/v1/chat_service/client.rb | 411 +++++++++++++++--- .../apps/chat/v1/chat_service/credentials.rb | 4 + .../apps/chat/v1/chat_service/rest/client.rb | 411 +++++++++++++++--- .../lib/google/chat/v1/chat_service_pb.rb | 2 +- .../chat/v1/chat_service_services_pb.rb | 397 ++++++++++++++--- .../lib/google/chat/v1/space_pb.rb | 2 +- .../lib/google/chat/v1/user_pb.rb | 3 +- .../google/chat/v1/deletion_metadata.rb | 20 +- .../proto_docs/google/chat/v1/membership.rb | 12 +- .../google/chat/v1/slash_command.rb | 4 +- .../proto_docs/google/chat/v1/space.rb | 40 +- .../proto_docs/google/chat/v1/space_setup.rb | 2 +- 12 files changed, 1104 insertions(+), 204 deletions(-) diff --git a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb index 2c9dd185ad29..3c062b2c13ca 100644 --- a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb +++ b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb @@ -363,10 +363,21 @@ def logger # Creates a message in a Google Chat space. For an example, see [Send a # message](https://developers.google.com/workspace/chat/create-messages). # - # The `create()` method requires either [user + # Supports the following types of + # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + # + # - [App + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` + # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # or [app - # authentication](https://developers.google.com/workspace/chat/authorize-import). + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages.create` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # # Chat attributes the message sender differently depending on the type of # authentication that you use in your request. # @@ -527,7 +538,13 @@ def create_message request, options = nil # messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # @overload list_messages(request, options = nil) # Pass arguments to `list_messages` via a request object, either of type @@ -705,11 +722,23 @@ def list_messages request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.memberships` (requires + # [administrator approval](https://support.google.com/a?p=chat-app-auth)) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.admin.memberships` # # @overload list_memberships(request, options = nil) # Pass arguments to `list_memberships` via a request object, either of type @@ -897,11 +926,21 @@ def list_memberships request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.memberships` (requires + # [administrator approval](https://support.google.com/a?p=chat-app-auth)) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.admin.memberships` # # @overload get_membership(request, options = nil) # Pass arguments to `get_membership` via a request object, either of type @@ -1018,9 +1057,14 @@ def get_membership request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` # # Note: Might return a message from a blocked member or space. # @@ -1126,9 +1170,15 @@ def get_message request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When using app authentication, requests can only update messages # created by the calling Chat app. @@ -1248,9 +1298,15 @@ def update_message request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When using app authentication, requests can only delete messages # created by the calling Chat app. @@ -1359,8 +1415,13 @@ def delete_message request, options = nil # For an example, see # [Get metadata about a message # attachment](https://developers.google.com/workspace/chat/get-media-attachments). + # # Requires [app - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.bot` # # @overload get_attachment(request, options = nil) # Pass arguments to `get_attachment` via a request object, either of type @@ -1451,7 +1512,13 @@ def get_attachment request, options = nil # attachment](https://developers.google.com/workspace/chat/upload-media-attachments). # # Requires user - # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.create` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # You can upload attachments up to 200 MB. Certain file types aren't # supported. For details, see [File types blocked by Google @@ -1553,9 +1620,14 @@ def upload_attachment request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` # # To list all named spaces by Google Workspace organization, use the # [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) @@ -1681,7 +1753,13 @@ def list_spaces request, options = nil # # Requires [user # authentication with administrator - # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges). + # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) + # and one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # # In the request, set `use_admin_access` to `true`. # # @overload search_spaces(request, options = nil) @@ -1895,11 +1973,29 @@ def search_spaces request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.spaces` with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # + # App authentication has the following limitations: + # + # - `space.access_settings` is only populated when using the + # `chat.app.spaces` scope. + # - `space.predefind_permission_settings` and `space.permission_settings` are + # only populated when using the `chat.app.spaces` scope, and only for + # spaces the app created. # # @overload get_space(request, options = nil) # Pass arguments to `get_space` via a request object, either of type @@ -1996,28 +2092,49 @@ def get_space request, options = nil end ## - # Creates a space with no members. Can be used to create a named space, or a + # Creates a space. Can be used to create a named space, or a # group chat in `Import mode`. For an example, see [Create a # space](https://developers.google.com/workspace/chat/create-spaces). # - # If you receive the error message `ALREADY_EXISTS` when creating - # a space, try a different `displayName`. An existing space within - # the Google Workspace organization might already use this display name. - # # Supports the following types of # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.app.spaces.create` + # - `https://www.googleapis.com/auth/chat.app.spaces` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.create` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When authenticating as an app, the `space.customer` field must be set in # the request. # + # When authenticating as an app, the Chat app is added as a member of the + # space. However, unlike human authentication, the Chat app is not added as a + # space manager. By default, the Chat app can be removed from the space by + # all space members. To allow only space managers to remove the app from a + # space, set `space.permission_settings.manage_apps` to `managers_allowed`. + # + # Space membership upon creation depends on whether the space is created in + # `Import mode`: + # + # * **Import mode:** No members are created. + # * **All other modes:** The calling user is added as a member. This is: + # * The app itself when using app authentication. + # * The human user when using user authentication. + # + # If you receive the error message `ALREADY_EXISTS` when creating + # a space, try a different `displayName`. An existing space within + # the Google Workspace organization might already use this display name. + # # @overload create_space(request, options = nil) # Pass arguments to `create_space` via a request object, either of type # {::Google::Apps::Chat::V1::CreateSpaceRequest} or an equivalent Hash. @@ -2161,7 +2278,12 @@ def create_space request, options = nil # might already use this display name. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.spaces.create` + # - `https://www.googleapis.com/auth/chat.spaces` # # @overload set_up_space(request, options = nil) # Pass arguments to `set_up_space` via a request object, either of type @@ -2213,7 +2335,7 @@ def create_space request, options = nil # Optional. The Google Chat users or groups to invite to join the space. Omit # the calling user, as they are added automatically. # - # The set currently allows up to 20 memberships (in addition to the caller). + # The set currently allows up to 49 memberships (in addition to the caller). # # For human membership, the `Membership.member` field must contain a `user` # with `name` populated (format: `users/{user}`) and `type` set to @@ -2311,12 +2433,26 @@ def set_up_space request, options = nil # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.app.spaces` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # + # App authentication has the following limitations: + # + # - To update either `space.predefined_permission_settings` or + # `space.permission_settings`, the app must be the space creator. + # - Updating the `space.access_settings.audience` is not supported for app + # authentication. # # @overload update_space(request, options = nil) # Pass arguments to `update_space` via a request object, either of type @@ -2489,13 +2625,22 @@ def update_space request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) and the + # authorization scope: + # - `https://www.googleapis.com/auth/chat.app.delete` (only in + # spaces the app created) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.delete` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.delete` # # @overload delete_space(request, options = nil) # Pass arguments to `delete_space` via a request object, either of type @@ -2596,9 +2741,14 @@ def delete_space request, options = nil # [import process](https://developers.google.com/workspace/chat/import-data) # for the specified space and makes it visible to users. # - # Requires [app - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # and domain-wide delegation. For more information, see [Authorize Google + # Requires [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # and domain-wide delegation with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.import` + # + # For more information, see [Authorize Google # Chat apps to import # data](https://developers.google.com/workspace/chat/authorize-import). # @@ -2702,14 +2852,19 @@ def complete_import_space request, options = nil # returns the direct message space between the specified user and the # authenticated user. # - # // Supports the following types of + # Supports the following types of # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` # # @overload find_direct_message(request, options = nil) # Pass arguments to `find_direct_message` via a request object, either of type @@ -2811,21 +2966,35 @@ def find_direct_message request, options = nil # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and the authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.memberships.app` (to add the + # calling app to the space) + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` + # + # App authentication is not supported for the following use cases: + # + # - Inviting users external to the Workspace organization that owns the + # space. + # - Adding a Google Group to a space. + # - Adding a Chat app to a space. # # For example usage, see: # # - [Invite or add a user to a # space](https://developers.google.com/workspace/chat/create-members#create-user-membership). - # # - [Invite or add a Google Group to a # space](https://developers.google.com/workspace/chat/create-members#create-group-membership). - # # - [Add the Chat app to a # space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). # @@ -2866,8 +3035,6 @@ def find_direct_message request, options = nil # - When [authenticating as an # app](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), # the `chat.app.memberships` authorization scope is required. - # Authenticating as an app is available in [Developer - # Preview](https://developers.google.com/workspace/preview). # # - Set `user.type` to `HUMAN`, and set `user.name` with format # `users/{user}`, where `{user}` can be the email address for the user. For @@ -2975,13 +3142,22 @@ def create_membership request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) and the + # authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` (only in + # spaces the app created) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` # # @overload update_membership(request, options = nil) # Pass arguments to `update_membership` via a request object, either of type @@ -3094,12 +3270,31 @@ def update_membership request, options = nil # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and the authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.memberships.app` (to remove + # the calling app from the space) + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` + # + # App authentication is not supported for the following use cases: + # + # - Removing a Google Group from a space. + # - Removing a Chat app from a space. + # + # To delete memberships for space managers, the requester + # must be a space manager. If you're using [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # the Chat app must be the space creator. # # @overload delete_membership(request, options = nil) # Pass arguments to `delete_membership` via a request object, either of type @@ -3121,9 +3316,13 @@ def update_membership request, options = nil # human users' or their own memberships. Chat apps can't delete other apps' # memberships. # - # When deleting a human membership, requires the `chat.memberships` scope and - # `spaces/{space}/members/{member}` format. You can use the email as an - # alias for `{member}`. For example, + # When deleting a human membership, requires the `chat.memberships` scope + # with [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # or the `chat.memberships.app` scope with [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # and the `spaces/{space}/members/{member}` format. + # You can use the email as an alias for `{member}`. For example, # `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the # email of the Google Chat user. # @@ -3214,7 +3413,14 @@ def delete_membership request, options = nil # message](https://developers.google.com/workspace/chat/create-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions.create` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # @overload create_reaction(request, options = nil) # Pass arguments to `create_reaction` via a request object, either of type @@ -3308,7 +3514,14 @@ def create_reaction request, options = nil # message](https://developers.google.com/workspace/chat/list-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` # # @overload list_reactions(request, options = nil) # Pass arguments to `list_reactions` via a request object, either of type @@ -3462,7 +3675,13 @@ def list_reactions request, options = nil # reaction](https://developers.google.com/workspace/chat/delete-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # @overload delete_reaction(request, options = nil) # Pass arguments to `delete_reaction` via a request object, either of type @@ -3559,7 +3778,11 @@ def delete_reaction request, options = nil # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis` # # @overload create_custom_emoji(request, options = nil) # Pass arguments to `create_custom_emoji` via a request object, either of type @@ -3646,7 +3869,12 @@ def create_custom_emoji request, options = nil # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis.readonly` + # - `https://www.googleapis.com/auth/chat.customemojis` # # @overload get_custom_emoji(request, options = nil) # Pass arguments to `get_custom_emoji` via a request object, either of type @@ -3747,7 +3975,12 @@ def get_custom_emoji request, options = nil # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis.readonly` + # - `https://www.googleapis.com/auth/chat.customemojis` # # @overload list_custom_emojis(request, options = nil) # Pass arguments to `list_custom_emojis` via a request object, either of type @@ -3870,7 +4103,11 @@ def list_custom_emojis request, options = nil # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis` # # @overload delete_custom_emoji(request, options = nil) # Pass arguments to `delete_custom_emoji` via a request object, either of type @@ -3967,7 +4204,12 @@ def delete_custom_emoji request, options = nil # state](https://developers.google.com/workspace/chat/get-space-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate.readonly` + # - `https://www.googleapis.com/auth/chat.users.readstate` # # @overload get_space_read_state(request, options = nil) # Pass arguments to `get_space_read_state` via a request object, either of type @@ -4071,7 +4313,11 @@ def get_space_read_state request, options = nil # state](https://developers.google.com/workspace/chat/update-space-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate` # # @overload update_space_read_state(request, options = nil) # Pass arguments to `update_space_read_state` via a request object, either of type @@ -4190,7 +4436,12 @@ def update_space_read_state request, options = nil # state](https://developers.google.com/workspace/chat/get-thread-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate.readonly` + # - `https://www.googleapis.com/auth/chat.users.readstate` # # @overload get_thread_read_state(request, options = nil) # Pass arguments to `get_thread_read_state` via a request object, either of type @@ -4301,7 +4552,20 @@ def get_thread_read_state request, options = nil # object of the Space event data for this request. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with an [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) + # appropriate for reading the requested data: + # + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # # To get an event, the authenticated user must be a member of the space. # # For an example, see [Get details about an @@ -4402,7 +4666,20 @@ def get_space_event request, options = nil # `Membership` resource. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with an [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) + # appropriate for reading the requested data: + # + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # # To list events, the authenticated user must be a member of the space. # # For an example, see [List events from a Google Chat @@ -4571,7 +4848,11 @@ def list_space_events request, options = nil # setting](https://developers.google.com/workspace/chat/get-space-notification-setting). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.spacesettings` # # @overload get_space_notification_setting(request, options = nil) # Pass arguments to `get_space_notification_setting` via a request object, either of type @@ -4666,7 +4947,11 @@ def get_space_notification_setting request, options = nil # setting](https://developers.google.com/workspace/chat/update-space-notification-setting). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.spacesettings` # # @overload update_space_notification_setting(request, options = nil) # Pass arguments to `update_space_notification_setting` via a request object, either of type diff --git a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/credentials.rb b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/credentials.rb index e25cfaaf9cac..15f1620457b5 100644 --- a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/credentials.rb +++ b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/credentials.rb @@ -31,6 +31,10 @@ class Credentials < ::Google::Auth::Credentials "https://www.googleapis.com/auth/chat.admin.memberships.readonly", "https://www.googleapis.com/auth/chat.admin.spaces", "https://www.googleapis.com/auth/chat.admin.spaces.readonly", + "https://www.googleapis.com/auth/chat.app.delete", + "https://www.googleapis.com/auth/chat.app.memberships", + "https://www.googleapis.com/auth/chat.app.spaces", + "https://www.googleapis.com/auth/chat.app.spaces.create", "https://www.googleapis.com/auth/chat.bot", "https://www.googleapis.com/auth/chat.customemojis", "https://www.googleapis.com/auth/chat.customemojis.readonly", diff --git a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb index 660622744850..108738915c28 100644 --- a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb +++ b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb @@ -356,10 +356,21 @@ def logger # Creates a message in a Google Chat space. For an example, see [Send a # message](https://developers.google.com/workspace/chat/create-messages). # - # The `create()` method requires either [user + # Supports the following types of + # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + # + # - [App + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` + # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # or [app - # authentication](https://developers.google.com/workspace/chat/authorize-import). + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages.create` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # # Chat attributes the message sender differently depending on the type of # authentication that you use in your request. # @@ -513,7 +524,13 @@ def create_message request, options = nil # messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # @overload list_messages(request, options = nil) # Pass arguments to `list_messages` via a request object, either of type @@ -684,11 +701,23 @@ def list_messages request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.memberships` (requires + # [administrator approval](https://support.google.com/a?p=chat-app-auth)) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.admin.memberships` # # @overload list_memberships(request, options = nil) # Pass arguments to `list_memberships` via a request object, either of type @@ -869,11 +898,21 @@ def list_memberships request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.memberships` (requires + # [administrator approval](https://support.google.com/a?p=chat-app-auth)) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.admin.memberships` # # @overload get_membership(request, options = nil) # Pass arguments to `get_membership` via a request object, either of type @@ -983,9 +1022,14 @@ def get_membership request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` # # Note: Might return a message from a blocked member or space. # @@ -1084,9 +1128,15 @@ def get_message request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When using app authentication, requests can only update messages # created by the calling Chat app. @@ -1199,9 +1249,15 @@ def update_message request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When using app authentication, requests can only delete messages # created by the calling Chat app. @@ -1303,8 +1359,13 @@ def delete_message request, options = nil # For an example, see # [Get metadata about a message # attachment](https://developers.google.com/workspace/chat/get-media-attachments). + # # Requires [app - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.bot` # # @overload get_attachment(request, options = nil) # Pass arguments to `get_attachment` via a request object, either of type @@ -1388,7 +1449,13 @@ def get_attachment request, options = nil # attachment](https://developers.google.com/workspace/chat/upload-media-attachments). # # Requires user - # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.create` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # You can upload attachments up to 200 MB. Certain file types aren't # supported. For details, see [File types blocked by Google @@ -1483,9 +1550,14 @@ def upload_attachment request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` # # To list all named spaces by Google Workspace organization, use the # [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) @@ -1612,7 +1684,13 @@ def list_spaces request, options = nil # # Requires [user # authentication with administrator - # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges). + # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) + # and one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # # In the request, set `use_admin_access` to `true`. # # @overload search_spaces(request, options = nil) @@ -1827,11 +1905,29 @@ def search_spaces request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.spaces` with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # + # App authentication has the following limitations: + # + # - `space.access_settings` is only populated when using the + # `chat.app.spaces` scope. + # - `space.predefind_permission_settings` and `space.permission_settings` are + # only populated when using the `chat.app.spaces` scope, and only for + # spaces the app created. # # @overload get_space(request, options = nil) # Pass arguments to `get_space` via a request object, either of type @@ -1921,28 +2017,49 @@ def get_space request, options = nil end ## - # Creates a space with no members. Can be used to create a named space, or a + # Creates a space. Can be used to create a named space, or a # group chat in `Import mode`. For an example, see [Create a # space](https://developers.google.com/workspace/chat/create-spaces). # - # If you receive the error message `ALREADY_EXISTS` when creating - # a space, try a different `displayName`. An existing space within - # the Google Workspace organization might already use this display name. - # # Supports the following types of # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.app.spaces.create` + # - `https://www.googleapis.com/auth/chat.app.spaces` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.create` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When authenticating as an app, the `space.customer` field must be set in # the request. # + # When authenticating as an app, the Chat app is added as a member of the + # space. However, unlike human authentication, the Chat app is not added as a + # space manager. By default, the Chat app can be removed from the space by + # all space members. To allow only space managers to remove the app from a + # space, set `space.permission_settings.manage_apps` to `managers_allowed`. + # + # Space membership upon creation depends on whether the space is created in + # `Import mode`: + # + # * **Import mode:** No members are created. + # * **All other modes:** The calling user is added as a member. This is: + # * The app itself when using app authentication. + # * The human user when using user authentication. + # + # If you receive the error message `ALREADY_EXISTS` when creating + # a space, try a different `displayName`. An existing space within + # the Google Workspace organization might already use this display name. + # # @overload create_space(request, options = nil) # Pass arguments to `create_space` via a request object, either of type # {::Google::Apps::Chat::V1::CreateSpaceRequest} or an equivalent Hash. @@ -2087,7 +2204,12 @@ def create_space request, options = nil # might already use this display name. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.spaces.create` + # - `https://www.googleapis.com/auth/chat.spaces` # # @overload set_up_space(request, options = nil) # Pass arguments to `set_up_space` via a request object, either of type @@ -2139,7 +2261,7 @@ def create_space request, options = nil # Optional. The Google Chat users or groups to invite to join the space. Omit # the calling user, as they are added automatically. # - # The set currently allows up to 20 memberships (in addition to the caller). + # The set currently allows up to 49 memberships (in addition to the caller). # # For human membership, the `Membership.member` field must contain a `user` # with `name` populated (format: `users/{user}`) and `type` set to @@ -2238,12 +2360,26 @@ def set_up_space request, options = nil # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.app.spaces` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # + # App authentication has the following limitations: + # + # - To update either `space.predefined_permission_settings` or + # `space.permission_settings`, the app must be the space creator. + # - Updating the `space.access_settings.audience` is not supported for app + # authentication. # # @overload update_space(request, options = nil) # Pass arguments to `update_space` via a request object, either of type @@ -2409,13 +2545,22 @@ def update_space request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) and the + # authorization scope: + # - `https://www.googleapis.com/auth/chat.app.delete` (only in + # spaces the app created) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.delete` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.delete` # # @overload delete_space(request, options = nil) # Pass arguments to `delete_space` via a request object, either of type @@ -2509,9 +2654,14 @@ def delete_space request, options = nil # [import process](https://developers.google.com/workspace/chat/import-data) # for the specified space and makes it visible to users. # - # Requires [app - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # and domain-wide delegation. For more information, see [Authorize Google + # Requires [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # and domain-wide delegation with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.import` + # + # For more information, see [Authorize Google # Chat apps to import # data](https://developers.google.com/workspace/chat/authorize-import). # @@ -2608,14 +2758,19 @@ def complete_import_space request, options = nil # returns the direct message space between the specified user and the # authenticated user. # - # // Supports the following types of + # Supports the following types of # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` # # @overload find_direct_message(request, options = nil) # Pass arguments to `find_direct_message` via a request object, either of type @@ -2718,21 +2873,35 @@ def find_direct_message request, options = nil # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and the authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.memberships.app` (to add the + # calling app to the space) + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` + # + # App authentication is not supported for the following use cases: + # + # - Inviting users external to the Workspace organization that owns the + # space. + # - Adding a Google Group to a space. + # - Adding a Chat app to a space. # # For example usage, see: # # - [Invite or add a user to a # space](https://developers.google.com/workspace/chat/create-members#create-user-membership). - # # - [Invite or add a Google Group to a # space](https://developers.google.com/workspace/chat/create-members#create-group-membership). - # # - [Add the Chat app to a # space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). # @@ -2773,8 +2942,6 @@ def find_direct_message request, options = nil # - When [authenticating as an # app](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), # the `chat.app.memberships` authorization scope is required. - # Authenticating as an app is available in [Developer - # Preview](https://developers.google.com/workspace/preview). # # - Set `user.type` to `HUMAN`, and set `user.name` with format # `users/{user}`, where `{user}` can be the email address for the user. For @@ -2875,13 +3042,22 @@ def create_membership request, options = nil # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) and the + # authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` (only in + # spaces the app created) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` # # @overload update_membership(request, options = nil) # Pass arguments to `update_membership` via a request object, either of type @@ -2987,12 +3163,31 @@ def update_membership request, options = nil # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and the authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.memberships.app` (to remove + # the calling app from the space) + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` + # + # App authentication is not supported for the following use cases: + # + # - Removing a Google Group from a space. + # - Removing a Chat app from a space. + # + # To delete memberships for space managers, the requester + # must be a space manager. If you're using [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # the Chat app must be the space creator. # # @overload delete_membership(request, options = nil) # Pass arguments to `delete_membership` via a request object, either of type @@ -3014,9 +3209,13 @@ def update_membership request, options = nil # human users' or their own memberships. Chat apps can't delete other apps' # memberships. # - # When deleting a human membership, requires the `chat.memberships` scope and - # `spaces/{space}/members/{member}` format. You can use the email as an - # alias for `{member}`. For example, + # When deleting a human membership, requires the `chat.memberships` scope + # with [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # or the `chat.memberships.app` scope with [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # and the `spaces/{space}/members/{member}` format. + # You can use the email as an alias for `{member}`. For example, # `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the # email of the Google Chat user. # @@ -3100,7 +3299,14 @@ def delete_membership request, options = nil # message](https://developers.google.com/workspace/chat/create-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions.create` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # @overload create_reaction(request, options = nil) # Pass arguments to `create_reaction` via a request object, either of type @@ -3187,7 +3393,14 @@ def create_reaction request, options = nil # message](https://developers.google.com/workspace/chat/list-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` # # @overload list_reactions(request, options = nil) # Pass arguments to `list_reactions` via a request object, either of type @@ -3334,7 +3547,13 @@ def list_reactions request, options = nil # reaction](https://developers.google.com/workspace/chat/delete-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # @overload delete_reaction(request, options = nil) # Pass arguments to `delete_reaction` via a request object, either of type @@ -3424,7 +3643,11 @@ def delete_reaction request, options = nil # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis` # # @overload create_custom_emoji(request, options = nil) # Pass arguments to `create_custom_emoji` via a request object, either of type @@ -3512,7 +3735,12 @@ def create_custom_emoji request, options = nil # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis.readonly` + # - `https://www.googleapis.com/auth/chat.customemojis` # # @overload get_custom_emoji(request, options = nil) # Pass arguments to `get_custom_emoji` via a request object, either of type @@ -3606,7 +3834,12 @@ def get_custom_emoji request, options = nil # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis.readonly` + # - `https://www.googleapis.com/auth/chat.customemojis` # # @overload list_custom_emojis(request, options = nil) # Pass arguments to `list_custom_emojis` via a request object, either of type @@ -3730,7 +3963,11 @@ def list_custom_emojis request, options = nil # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis` # # @overload delete_custom_emoji(request, options = nil) # Pass arguments to `delete_custom_emoji` via a request object, either of type @@ -3820,7 +4057,12 @@ def delete_custom_emoji request, options = nil # state](https://developers.google.com/workspace/chat/get-space-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate.readonly` + # - `https://www.googleapis.com/auth/chat.users.readstate` # # @overload get_space_read_state(request, options = nil) # Pass arguments to `get_space_read_state` via a request object, either of type @@ -3917,7 +4159,11 @@ def get_space_read_state request, options = nil # state](https://developers.google.com/workspace/chat/update-space-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate` # # @overload update_space_read_state(request, options = nil) # Pass arguments to `update_space_read_state` via a request object, either of type @@ -4029,7 +4275,12 @@ def update_space_read_state request, options = nil # state](https://developers.google.com/workspace/chat/get-thread-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate.readonly` + # - `https://www.googleapis.com/auth/chat.users.readstate` # # @overload get_thread_read_state(request, options = nil) # Pass arguments to `get_thread_read_state` via a request object, either of type @@ -4133,7 +4384,20 @@ def get_thread_read_state request, options = nil # object of the Space event data for this request. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with an [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) + # appropriate for reading the requested data: + # + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # # To get an event, the authenticated user must be a member of the space. # # For an example, see [Get details about an @@ -4227,7 +4491,20 @@ def get_space_event request, options = nil # `Membership` resource. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with an [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) + # appropriate for reading the requested data: + # + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # # To list events, the authenticated user must be a member of the space. # # For an example, see [List events from a Google Chat @@ -4389,7 +4666,11 @@ def list_space_events request, options = nil # setting](https://developers.google.com/workspace/chat/get-space-notification-setting). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.spacesettings` # # @overload get_space_notification_setting(request, options = nil) # Pass arguments to `get_space_notification_setting` via a request object, either of type @@ -4477,7 +4758,11 @@ def get_space_notification_setting request, options = nil # setting](https://developers.google.com/workspace/chat/update-space-notification-setting). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.spacesettings` # # @overload update_space_notification_setting(request, options = nil) # Pass arguments to `update_space_notification_setting` via a request object, either of type diff --git a/google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb b/google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb index 631c1b6cf1e4..62e0f65a3362 100644 --- a/google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb +++ b/google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb @@ -19,7 +19,7 @@ require 'google/protobuf/empty_pb' -descriptor_data = "\n!google/chat/v1/chat_service.proto\x12\x0egoogle.chat.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x1fgoogle/chat/v1/membership.proto\x1a\x1cgoogle/chat/v1/message.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.proto\x1a/google/chat/v1/space_notification_setting.proto\x1a%google/chat/v1/space_read_state.proto\x1a google/chat/v1/space_setup.proto\x1a&google/chat/v1/thread_read_state.proto\x1a\x1bgoogle/protobuf/empty.proto2\xb9\x33\n\x0b\x43hatService\x12\x9b\x01\n\rCreateMessage\x12$.google.chat.v1.CreateMessageRequest\x1a\x17.google.chat.v1.Message\"K\xda\x41\x19parent,message,message_id\x82\xd3\xe4\x93\x02)\"\x1e/v1/{parent=spaces/*}/messages:\x07message\x12\x8a\x01\n\x0cListMessages\x12#.google.chat.v1.ListMessagesRequest\x1a$.google.chat.v1.ListMessagesResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=spaces/*}/messages\x12\x92\x01\n\x0fListMemberships\x12&.google.chat.v1.ListMembershipsRequest\x1a\'.google.chat.v1.ListMembershipsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=spaces/*}/members\x12\x7f\n\rGetMembership\x12$.google.chat.v1.GetMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=spaces/*/members/*}\x12w\n\nGetMessage\x12!.google.chat.v1.GetMessageRequest\x1a\x17.google.chat.v1.Message\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=spaces/*/messages/*}\x12\xd1\x01\n\rUpdateMessage\x12$.google.chat.v1.UpdateMessageRequest\x1a\x17.google.chat.v1.Message\"\x80\x01\xda\x41\x13message,update_mask\x82\xd3\xe4\x93\x02\x64\x1a&/v1/{message.name=spaces/*/messages/*}:\x07messageZ12&/v1/{message.name=spaces/*/messages/*}:\x07message\x12|\n\rDeleteMessage\x12$.google.chat.v1.DeleteMessageRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=spaces/*/messages/*}\x12\x8e\x01\n\rGetAttachment\x12$.google.chat.v1.GetAttachmentRequest\x1a\x1a.google.chat.v1.Attachment\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=spaces/*/messages/*/attachments/*}\x12\x9a\x01\n\x10UploadAttachment\x12\'.google.chat.v1.UploadAttachmentRequest\x1a(.google.chat.v1.UploadAttachmentResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1/{parent=spaces/*}/attachments:upload:\x01*\x12j\n\nListSpaces\x12!.google.chat.v1.ListSpacesRequest\x1a\".google.chat.v1.ListSpacesResponse\"\x15\xda\x41\x00\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/spaces\x12w\n\x0cSearchSpaces\x12#.google.chat.v1.SearchSpacesRequest\x1a$.google.chat.v1.SearchSpacesResponse\"\x1c\xda\x41\x00\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/spaces:search\x12\x66\n\x08GetSpace\x12\x1f.google.chat.v1.GetSpaceRequest\x1a\x15.google.chat.v1.Space\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/{name=spaces/*}\x12k\n\x0b\x43reateSpace\x12\".google.chat.v1.CreateSpaceRequest\x1a\x15.google.chat.v1.Space\"!\xda\x41\x05space\x82\xd3\xe4\x93\x02\x13\"\n/v1/spaces:\x05space\x12\x63\n\nSetUpSpace\x12!.google.chat.v1.SetUpSpaceRequest\x1a\x15.google.chat.v1.Space\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/spaces:setup:\x01*\x12\x86\x01\n\x0bUpdateSpace\x12\".google.chat.v1.UpdateSpaceRequest\x1a\x15.google.chat.v1.Space\"<\xda\x41\x11space,update_mask\x82\xd3\xe4\x93\x02\"2\x19/v1/{space.name=spaces/*}:\x05space\x12m\n\x0b\x44\x65leteSpace\x12\".google.chat.v1.DeleteSpaceRequest\x1a\x16.google.protobuf.Empty\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15*\x13/v1/{name=spaces/*}\x12\x9d\x01\n\x13\x43ompleteImportSpace\x12*.google.chat.v1.CompleteImportSpaceRequest\x1a+.google.chat.v1.CompleteImportSpaceResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=spaces/*}:completeImport:\x01*\x12z\n\x11\x46indDirectMessage\x12(.google.chat.v1.FindDirectMessageRequest\x1a\x15.google.chat.v1.Space\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/spaces:findDirectMessage\x12\x9e\x01\n\x10\x43reateMembership\x12\'.google.chat.v1.CreateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"E\xda\x41\x11parent,membership\x82\xd3\xe4\x93\x02+\"\x1d/v1/{parent=spaces/*}/members:\nmembership\x12\xae\x01\n\x10UpdateMembership\x12\'.google.chat.v1.UpdateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"U\xda\x41\x16membership,update_mask\x82\xd3\xe4\x93\x02\x36\x32(/v1/{membership.name=spaces/*/members/*}:\nmembership\x12\x85\x01\n\x10\x44\x65leteMembership\x12\'.google.chat.v1.DeleteMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=spaces/*/members/*}\x12\xa1\x01\n\x0e\x43reateReaction\x12%.google.chat.v1.CreateReactionRequest\x1a\x18.google.chat.v1.Reaction\"N\xda\x41\x0fparent,reaction\x82\xd3\xe4\x93\x02\x36\"*/v1/{parent=spaces/*/messages/*}/reactions:\x08reaction\x12\x99\x01\n\rListReactions\x12$.google.chat.v1.ListReactionsRequest\x1a%.google.chat.v1.ListReactionsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=spaces/*/messages/*}/reactions\x12\x8a\x01\n\x0e\x44\x65leteReaction\x12%.google.chat.v1.DeleteReactionRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=spaces/*/messages/*/reactions/*}\x12\x91\x01\n\x11\x43reateCustomEmoji\x12(.google.chat.v1.CreateCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"5\xda\x41\x0c\x63ustom_emoji\x82\xd3\xe4\x93\x02 \"\x10/v1/customEmojis:\x0c\x63ustom_emoji\x12~\n\x0eGetCustomEmoji\x12%.google.chat.v1.GetCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=customEmojis/*}\x12\x82\x01\n\x10ListCustomEmojis\x12\'.google.chat.v1.ListCustomEmojisRequest\x1a(.google.chat.v1.ListCustomEmojisResponse\"\x1b\xda\x41\x00\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/customEmojis\x12\x7f\n\x11\x44\x65leteCustomEmoji\x12(.google.chat.v1.DeleteCustomEmojiRequest\x1a\x16.google.protobuf.Empty\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v1/{name=customEmojis/*}\x12\x98\x01\n\x11GetSpaceReadState\x12(.google.chat.v1.GetSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=users/*/spaces/*/spaceReadState}\x12\xd9\x01\n\x14UpdateSpaceReadState\x12+.google.chat.v1.UpdateSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"t\xda\x41\x1cspace_read_state,update_mask\x82\xd3\xe4\x93\x02O2;/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}:\x10space_read_state\x12\xa6\x01\n\x12GetThreadReadState\x12).google.chat.v1.GetThreadReadStateRequest\x1a\x1f.google.chat.v1.ThreadReadState\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=users/*/spaces/*/threads/*/threadReadState}\x12\x83\x01\n\rGetSpaceEvent\x12$.google.chat.v1.GetSpaceEventRequest\x1a\x1a.google.chat.v1.SpaceEvent\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=spaces/*/spaceEvents/*}\x12\x9d\x01\n\x0fListSpaceEvents\x12&.google.chat.v1.ListSpaceEventsRequest\x1a\'.google.chat.v1.ListSpaceEventsResponse\"9\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=spaces/*}/spaceEvents\x12\xc0\x01\n\x1bGetSpaceNotificationSetting\x12\x32.google.chat.v1.GetSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=users/*/spaces/*/spaceNotificationSetting}\x12\xa0\x02\n\x1eUpdateSpaceNotificationSetting\x12\x35.google.chat.v1.UpdateSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"\x9c\x01\xda\x41&space_notification_setting,update_mask\x82\xd3\xe4\x93\x02m2O/v1/{space_notification_setting.name=users/*/spaces/*/spaceNotificationSetting}:\x1aspace_notification_setting\x1a\xcf\n\xca\x41\x13\x63hat.googleapis.com\xd2\x41\xb5\nhttps://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly,https://www.googleapis.com/auth/chat.users.spacesettingsB\xa9\x01\n\x12\x63om.google.chat.v1B\x10\x43hatServiceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" +descriptor_data = "\n!google/chat/v1/chat_service.proto\x12\x0egoogle.chat.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x1fgoogle/chat/v1/membership.proto\x1a\x1cgoogle/chat/v1/message.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.proto\x1a/google/chat/v1/space_notification_setting.proto\x1a%google/chat/v1/space_read_state.proto\x1a google/chat/v1/space_setup.proto\x1a&google/chat/v1/thread_read_state.proto\x1a\x1bgoogle/protobuf/empty.proto2\x85\x35\n\x0b\x43hatService\x12\x9b\x01\n\rCreateMessage\x12$.google.chat.v1.CreateMessageRequest\x1a\x17.google.chat.v1.Message\"K\xda\x41\x19parent,message,message_id\x82\xd3\xe4\x93\x02)\"\x1e/v1/{parent=spaces/*}/messages:\x07message\x12\x8a\x01\n\x0cListMessages\x12#.google.chat.v1.ListMessagesRequest\x1a$.google.chat.v1.ListMessagesResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=spaces/*}/messages\x12\x92\x01\n\x0fListMemberships\x12&.google.chat.v1.ListMembershipsRequest\x1a\'.google.chat.v1.ListMembershipsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=spaces/*}/members\x12\x7f\n\rGetMembership\x12$.google.chat.v1.GetMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=spaces/*/members/*}\x12w\n\nGetMessage\x12!.google.chat.v1.GetMessageRequest\x1a\x17.google.chat.v1.Message\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=spaces/*/messages/*}\x12\xd1\x01\n\rUpdateMessage\x12$.google.chat.v1.UpdateMessageRequest\x1a\x17.google.chat.v1.Message\"\x80\x01\xda\x41\x13message,update_mask\x82\xd3\xe4\x93\x02\x64\x1a&/v1/{message.name=spaces/*/messages/*}:\x07messageZ12&/v1/{message.name=spaces/*/messages/*}:\x07message\x12|\n\rDeleteMessage\x12$.google.chat.v1.DeleteMessageRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=spaces/*/messages/*}\x12\x8e\x01\n\rGetAttachment\x12$.google.chat.v1.GetAttachmentRequest\x1a\x1a.google.chat.v1.Attachment\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=spaces/*/messages/*/attachments/*}\x12\x9a\x01\n\x10UploadAttachment\x12\'.google.chat.v1.UploadAttachmentRequest\x1a(.google.chat.v1.UploadAttachmentResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1/{parent=spaces/*}/attachments:upload:\x01*\x12j\n\nListSpaces\x12!.google.chat.v1.ListSpacesRequest\x1a\".google.chat.v1.ListSpacesResponse\"\x15\xda\x41\x00\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/spaces\x12w\n\x0cSearchSpaces\x12#.google.chat.v1.SearchSpacesRequest\x1a$.google.chat.v1.SearchSpacesResponse\"\x1c\xda\x41\x00\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/spaces:search\x12\x66\n\x08GetSpace\x12\x1f.google.chat.v1.GetSpaceRequest\x1a\x15.google.chat.v1.Space\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/{name=spaces/*}\x12k\n\x0b\x43reateSpace\x12\".google.chat.v1.CreateSpaceRequest\x1a\x15.google.chat.v1.Space\"!\xda\x41\x05space\x82\xd3\xe4\x93\x02\x13\"\n/v1/spaces:\x05space\x12\x63\n\nSetUpSpace\x12!.google.chat.v1.SetUpSpaceRequest\x1a\x15.google.chat.v1.Space\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/spaces:setup:\x01*\x12\x86\x01\n\x0bUpdateSpace\x12\".google.chat.v1.UpdateSpaceRequest\x1a\x15.google.chat.v1.Space\"<\xda\x41\x11space,update_mask\x82\xd3\xe4\x93\x02\"2\x19/v1/{space.name=spaces/*}:\x05space\x12m\n\x0b\x44\x65leteSpace\x12\".google.chat.v1.DeleteSpaceRequest\x1a\x16.google.protobuf.Empty\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15*\x13/v1/{name=spaces/*}\x12\x9d\x01\n\x13\x43ompleteImportSpace\x12*.google.chat.v1.CompleteImportSpaceRequest\x1a+.google.chat.v1.CompleteImportSpaceResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=spaces/*}:completeImport:\x01*\x12z\n\x11\x46indDirectMessage\x12(.google.chat.v1.FindDirectMessageRequest\x1a\x15.google.chat.v1.Space\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/spaces:findDirectMessage\x12\x9e\x01\n\x10\x43reateMembership\x12\'.google.chat.v1.CreateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"E\xda\x41\x11parent,membership\x82\xd3\xe4\x93\x02+\"\x1d/v1/{parent=spaces/*}/members:\nmembership\x12\xae\x01\n\x10UpdateMembership\x12\'.google.chat.v1.UpdateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"U\xda\x41\x16membership,update_mask\x82\xd3\xe4\x93\x02\x36\x32(/v1/{membership.name=spaces/*/members/*}:\nmembership\x12\x85\x01\n\x10\x44\x65leteMembership\x12\'.google.chat.v1.DeleteMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=spaces/*/members/*}\x12\xa1\x01\n\x0e\x43reateReaction\x12%.google.chat.v1.CreateReactionRequest\x1a\x18.google.chat.v1.Reaction\"N\xda\x41\x0fparent,reaction\x82\xd3\xe4\x93\x02\x36\"*/v1/{parent=spaces/*/messages/*}/reactions:\x08reaction\x12\x99\x01\n\rListReactions\x12$.google.chat.v1.ListReactionsRequest\x1a%.google.chat.v1.ListReactionsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=spaces/*/messages/*}/reactions\x12\x8a\x01\n\x0e\x44\x65leteReaction\x12%.google.chat.v1.DeleteReactionRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=spaces/*/messages/*/reactions/*}\x12\x91\x01\n\x11\x43reateCustomEmoji\x12(.google.chat.v1.CreateCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"5\xda\x41\x0c\x63ustom_emoji\x82\xd3\xe4\x93\x02 \"\x10/v1/customEmojis:\x0c\x63ustom_emoji\x12~\n\x0eGetCustomEmoji\x12%.google.chat.v1.GetCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=customEmojis/*}\x12\x82\x01\n\x10ListCustomEmojis\x12\'.google.chat.v1.ListCustomEmojisRequest\x1a(.google.chat.v1.ListCustomEmojisResponse\"\x1b\xda\x41\x00\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/customEmojis\x12\x7f\n\x11\x44\x65leteCustomEmoji\x12(.google.chat.v1.DeleteCustomEmojiRequest\x1a\x16.google.protobuf.Empty\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v1/{name=customEmojis/*}\x12\x98\x01\n\x11GetSpaceReadState\x12(.google.chat.v1.GetSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=users/*/spaces/*/spaceReadState}\x12\xd9\x01\n\x14UpdateSpaceReadState\x12+.google.chat.v1.UpdateSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"t\xda\x41\x1cspace_read_state,update_mask\x82\xd3\xe4\x93\x02O2;/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}:\x10space_read_state\x12\xa6\x01\n\x12GetThreadReadState\x12).google.chat.v1.GetThreadReadStateRequest\x1a\x1f.google.chat.v1.ThreadReadState\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=users/*/spaces/*/threads/*/threadReadState}\x12\x83\x01\n\rGetSpaceEvent\x12$.google.chat.v1.GetSpaceEventRequest\x1a\x1a.google.chat.v1.SpaceEvent\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=spaces/*/spaceEvents/*}\x12\x9d\x01\n\x0fListSpaceEvents\x12&.google.chat.v1.ListSpaceEventsRequest\x1a\'.google.chat.v1.ListSpaceEventsResponse\"9\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=spaces/*}/spaceEvents\x12\xc0\x01\n\x1bGetSpaceNotificationSetting\x12\x32.google.chat.v1.GetSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=users/*/spaces/*/spaceNotificationSetting}\x12\xa0\x02\n\x1eUpdateSpaceNotificationSetting\x12\x35.google.chat.v1.UpdateSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"\x9c\x01\xda\x41&space_notification_setting,update_mask\x82\xd3\xe4\x93\x02m2O/v1/{space_notification_setting.name=users/*/spaces/*/spaceNotificationSetting}:\x1aspace_notification_setting\x1a\x9b\x0c\xca\x41\x13\x63hat.googleapis.com\xd2\x41\x81\x0chttps://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.app.delete,https://www.googleapis.com/auth/chat.app.memberships,https://www.googleapis.com/auth/chat.app.spaces,https://www.googleapis.com/auth/chat.app.spaces.create,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly,https://www.googleapis.com/auth/chat.users.spacesettingsB\xa9\x01\n\x12\x63om.google.chat.v1B\x10\x43hatServiceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-apps-chat-v1/lib/google/chat/v1/chat_service_services_pb.rb b/google-apps-chat-v1/lib/google/chat/v1/chat_service_services_pb.rb index c1f9c1c8becd..636d86ceba01 100644 --- a/google-apps-chat-v1/lib/google/chat/v1/chat_service_services_pb.rb +++ b/google-apps-chat-v1/lib/google/chat/v1/chat_service_services_pb.rb @@ -37,10 +37,21 @@ class Service # Creates a message in a Google Chat space. For an example, see [Send a # message](https://developers.google.com/workspace/chat/create-messages). # - # The `create()` method requires either [user + # Supports the following types of + # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + # + # - [App + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` + # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # or [app - # authentication](https://developers.google.com/workspace/chat/authorize-import). + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages.create` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # # Chat attributes the message sender differently depending on the type of # authentication that you use in your request. # @@ -77,7 +88,13 @@ class Service # messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) rpc :ListMessages, ::Google::Apps::Chat::V1::ListMessagesRequest, ::Google::Apps::Chat::V1::ListMessagesResponse # Lists memberships in a space. For an example, see [List users and Google # Chat apps in a @@ -96,11 +113,23 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.memberships` (requires + # [administrator approval](https://support.google.com/a?p=chat-app-auth)) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.admin.memberships` rpc :ListMemberships, ::Google::Apps::Chat::V1::ListMembershipsRequest, ::Google::Apps::Chat::V1::ListMembershipsResponse # Returns details about a membership. For an example, see # [Get details about a user's or Google Chat app's @@ -111,11 +140,21 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.memberships` (requires + # [administrator approval](https://support.google.com/a?p=chat-app-auth)) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.admin.memberships` rpc :GetMembership, ::Google::Apps::Chat::V1::GetMembershipRequest, ::Google::Apps::Chat::V1::Membership # Returns details about a message. # For an example, see [Get details about a @@ -126,9 +165,14 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` # # Note: Might return a message from a blocked member or space. rpc :GetMessage, ::Google::Apps::Chat::V1::GetMessageRequest, ::Google::Apps::Chat::V1::Message @@ -144,9 +188,15 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When using app authentication, requests can only update messages # created by the calling Chat app. @@ -160,9 +210,15 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When using app authentication, requests can only delete messages # created by the calling Chat app. @@ -173,15 +229,26 @@ class Service # For an example, see # [Get metadata about a message # attachment](https://developers.google.com/workspace/chat/get-media-attachments). + # # Requires [app - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.bot` rpc :GetAttachment, ::Google::Apps::Chat::V1::GetAttachmentRequest, ::Google::Apps::Chat::V1::Attachment # Uploads an attachment. For an example, see # [Upload media as a file # attachment](https://developers.google.com/workspace/chat/upload-media-attachments). # # Requires user - # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.create` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) # # You can upload attachments up to 200 MB. Certain file types aren't # supported. For details, see [File types blocked by Google @@ -197,9 +264,14 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` # # To list all named spaces by Google Workspace organization, use the # [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) @@ -210,7 +282,13 @@ class Service # # Requires [user # authentication with administrator - # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges). + # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) + # and one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # # In the request, set `use_admin_access` to `true`. rpc :SearchSpaces, ::Google::Apps::Chat::V1::SearchSpacesRequest, ::Google::Apps::Chat::V1::SearchSpacesResponse # Returns details about a space. For an example, see @@ -222,33 +300,72 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.bot` + # - `https://www.googleapis.com/auth/chat.app.spaces` with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # one of the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # + # App authentication has the following limitations: + # + # - `space.access_settings` is only populated when using the + # `chat.app.spaces` scope. + # - `space.predefind_permission_settings` and `space.permission_settings` are + # only populated when using the `chat.app.spaces` scope, and only for + # spaces the app created. rpc :GetSpace, ::Google::Apps::Chat::V1::GetSpaceRequest, ::Google::Apps::Chat::V1::Space - # Creates a space with no members. Can be used to create a named space, or a + # Creates a space. Can be used to create a named space, or a # group chat in `Import mode`. For an example, see [Create a # space](https://developers.google.com/workspace/chat/create-spaces). # - # If you receive the error message `ALREADY_EXISTS` when creating - # a space, try a different `displayName`. An existing space within - # the Google Workspace organization might already use this display name. - # # Supports the following types of # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.app.spaces.create` + # - `https://www.googleapis.com/auth/chat.app.spaces` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.create` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) # # When authenticating as an app, the `space.customer` field must be set in # the request. + # + # When authenticating as an app, the Chat app is added as a member of the + # space. However, unlike human authentication, the Chat app is not added as a + # space manager. By default, the Chat app can be removed from the space by + # all space members. To allow only space managers to remove the app from a + # space, set `space.permission_settings.manage_apps` to `managers_allowed`. + # + # Space membership upon creation depends on whether the space is created in + # `Import mode`: + # + # * **Import mode:** No members are created. + # * **All other modes:** The calling user is added as a member. This is: + # * The app itself when using app authentication. + # * The human user when using user authentication. + # + # If you receive the error message `ALREADY_EXISTS` when creating + # a space, try a different `displayName`. An existing space within + # the Google Workspace organization might already use this display name. rpc :CreateSpace, ::Google::Apps::Chat::V1::CreateSpaceRequest, ::Google::Apps::Chat::V1::Space # Creates a space and adds specified users to it. The calling user is # automatically added to the space, and shouldn't be specified as a @@ -301,7 +418,12 @@ class Service # might already use this display name. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.spaces.create` + # - `https://www.googleapis.com/auth/chat.spaces` rpc :SetUpSpace, ::Google::Apps::Chat::V1::SetUpSpaceRequest, ::Google::Apps::Chat::V1::Space # Updates a space. For an example, see # [Update a @@ -317,12 +439,26 @@ class Service # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.app.spaces` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scopes is used: + # - `https://www.googleapis.com/auth/chat.admin.spaces` + # + # App authentication has the following limitations: + # + # - To update either `space.predefined_permission_settings` or + # `space.permission_settings`, the app must be the space creator. + # - Updating the `space.access_settings.audience` is not supported for app + # authentication. rpc :UpdateSpace, ::Google::Apps::Chat::V1::UpdateSpaceRequest, ::Google::Apps::Chat::V1::Space # Deletes a named space. Always performs a cascading delete, which means # that the space's child resources—like messages posted in the space and @@ -335,21 +471,35 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) and the + # authorization scope: + # - `https://www.googleapis.com/auth/chat.app.delete` (only in + # spaces the app created) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.delete` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.delete` rpc :DeleteSpace, ::Google::Apps::Chat::V1::DeleteSpaceRequest, ::Google::Protobuf::Empty # Completes the # [import process](https://developers.google.com/workspace/chat/import-data) # for the specified space and makes it visible to users. # - # Requires [app - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # and domain-wide delegation. For more information, see [Authorize Google + # Requires [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # and domain-wide delegation with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.import` + # + # For more information, see [Authorize Google # Chat apps to import # data](https://developers.google.com/workspace/chat/authorize-import). rpc :CompleteImportSpace, ::Google::Apps::Chat::V1::CompleteImportSpaceRequest, ::Google::Apps::Chat::V1::CompleteImportSpaceResponse @@ -368,14 +518,19 @@ class Service # returns the direct message space between the specified user and the # authenticated user. # - # // Supports the following types of + # Supports the following types of # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with the authorization scope: + # - `https://www.googleapis.com/auth/chat.bot` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` rpc :FindDirectMessage, ::Google::Apps::Chat::V1::FindDirectMessageRequest, ::Google::Apps::Chat::V1::Space # Creates a membership for the calling Chat app, a user, or a Google Group. # Creating memberships for other Chat apps isn't supported. @@ -390,21 +545,35 @@ class Service # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and the authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.memberships.app` (to add the + # calling app to the space) + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` + # + # App authentication is not supported for the following use cases: + # + # - Inviting users external to the Workspace organization that owns the + # space. + # - Adding a Google Group to a space. + # - Adding a Chat app to a space. # # For example usage, see: # # - [Invite or add a user to a # space](https://developers.google.com/workspace/chat/create-members#create-user-membership). - # # - [Invite or add a Google Group to a # space](https://developers.google.com/workspace/chat/create-members#create-group-membership). - # # - [Add the Chat app to a # space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). rpc :CreateMembership, ::Google::Apps::Chat::V1::CreateMembershipRequest, ::Google::Apps::Chat::V1::Membership @@ -416,13 +585,22 @@ class Service # # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) and the + # authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` (only in + # spaces the app created) # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` rpc :UpdateMembership, ::Google::Apps::Chat::V1::UpdateMembershipRequest, ::Google::Apps::Chat::V1::Membership # Deletes a membership. For an example, see # [Remove a user or a Google Chat app from a @@ -434,33 +612,72 @@ class Service # - [App # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator approval](https://support.google.com/a?p=chat-app-auth) - # in [Developer Preview](https://developers.google.com/workspace/preview) + # and the authorization scope: + # - `https://www.googleapis.com/auth/chat.app.memberships` # # - [User # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # You can authenticate and authorize this method with administrator - # privileges by setting the `use_admin_access` field in the request. + # with one of the following authorization scopes: + # - `https://www.googleapis.com/auth/chat.memberships` + # - `https://www.googleapis.com/auth/chat.memberships.app` (to remove + # the calling app from the space) + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces + # only) + # - User authentication grants administrator privileges when an + # administrator account authenticates, `use_admin_access` is `true`, and + # the following authorization scope is used: + # - `https://www.googleapis.com/auth/chat.admin.memberships` + # + # App authentication is not supported for the following use cases: + # + # - Removing a Google Group from a space. + # - Removing a Chat app from a space. + # + # To delete memberships for space managers, the requester + # must be a space manager. If you're using [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # the Chat app must be the space creator. rpc :DeleteMembership, ::Google::Apps::Chat::V1::DeleteMembershipRequest, ::Google::Apps::Chat::V1::Membership # Creates a reaction and adds it to a message. For an example, see # [Add a reaction to a # message](https://developers.google.com/workspace/chat/create-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions.create` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) rpc :CreateReaction, ::Google::Apps::Chat::V1::CreateReactionRequest, ::Google::Apps::Chat::V1::Reaction # Lists reactions to a message. For an example, see # [List reactions for a # message](https://developers.google.com/workspace/chat/list-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` rpc :ListReactions, ::Google::Apps::Chat::V1::ListReactionsRequest, ::Google::Apps::Chat::V1::ListReactionsResponse # Deletes a reaction to a message. For an example, see # [Delete a # reaction](https://developers.google.com/workspace/chat/delete-reactions). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) rpc :DeleteReaction, ::Google::Apps::Chat::V1::DeleteReactionRequest, ::Google::Protobuf::Empty # Creates a custom emoji. # @@ -472,7 +689,11 @@ class Service # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis` rpc :CreateCustomEmoji, ::Google::Apps::Chat::V1::CreateCustomEmojiRequest, ::Google::Apps::Chat::V1::CustomEmoji # Returns details about a custom emoji. # @@ -484,7 +705,12 @@ class Service # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis.readonly` + # - `https://www.googleapis.com/auth/chat.customemojis` rpc :GetCustomEmoji, ::Google::Apps::Chat::V1::GetCustomEmojiRequest, ::Google::Apps::Chat::V1::CustomEmoji # Lists custom emojis visible to the authenticated user. # @@ -496,7 +722,12 @@ class Service # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis.readonly` + # - `https://www.googleapis.com/auth/chat.customemojis` rpc :ListCustomEmojis, ::Google::Apps::Chat::V1::ListCustomEmojisRequest, ::Google::Apps::Chat::V1::ListCustomEmojisResponse # Deletes a custom emoji. By default, users can only delete custom emoji they # created. [Emoji managers](https://support.google.com/a/answer/12850085) @@ -512,7 +743,11 @@ class Service # permissions](https://support.google.com/a/answer/12850085). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.customemojis` rpc :DeleteCustomEmoji, ::Google::Apps::Chat::V1::DeleteCustomEmojiRequest, ::Google::Protobuf::Empty # Returns details about a user's read state within a space, used to identify # read and unread messages. For an example, see [Get details about a user's @@ -520,14 +755,23 @@ class Service # state](https://developers.google.com/workspace/chat/get-space-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate.readonly` + # - `https://www.googleapis.com/auth/chat.users.readstate` rpc :GetSpaceReadState, ::Google::Apps::Chat::V1::GetSpaceReadStateRequest, ::Google::Apps::Chat::V1::SpaceReadState # Updates a user's read state within a space, used to identify read and # unread messages. For an example, see [Update a user's space read # state](https://developers.google.com/workspace/chat/update-space-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate` rpc :UpdateSpaceReadState, ::Google::Apps::Chat::V1::UpdateSpaceReadStateRequest, ::Google::Apps::Chat::V1::SpaceReadState # Returns details about a user's read state within a thread, used to identify # read and unread messages. For an example, see [Get details about a user's @@ -535,7 +779,12 @@ class Service # state](https://developers.google.com/workspace/chat/get-thread-read-state). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.readstate.readonly` + # - `https://www.googleapis.com/auth/chat.users.readstate` rpc :GetThreadReadState, ::Google::Apps::Chat::V1::GetThreadReadStateRequest, ::Google::Apps::Chat::V1::ThreadReadState # Returns an event from a Google Chat space. The [event # payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) @@ -548,7 +797,20 @@ class Service # object of the Space event data for this request. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with an [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) + # appropriate for reading the requested data: + # + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # # To get an event, the authenticated user must be a member of the space. # # For an example, see [Get details about an @@ -564,7 +826,20 @@ class Service # `Membership` resource. # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with an [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) + # appropriate for reading the requested data: + # + # - `https://www.googleapis.com/auth/chat.spaces.readonly` + # - `https://www.googleapis.com/auth/chat.spaces` + # - `https://www.googleapis.com/auth/chat.messages.readonly` + # - `https://www.googleapis.com/auth/chat.messages` + # - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` + # - `https://www.googleapis.com/auth/chat.messages.reactions` + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # # To list events, the authenticated user must be a member of the space. # # For an example, see [List events from a Google Chat @@ -575,14 +850,22 @@ class Service # setting](https://developers.google.com/workspace/chat/get-space-notification-setting). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.spacesettings` rpc :GetSpaceNotificationSetting, ::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest, ::Google::Apps::Chat::V1::SpaceNotificationSetting # Updates the space notification setting. For an example, see [Update # the caller's space notification # setting](https://developers.google.com/workspace/chat/update-space-notification-setting). # # Requires [user - # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with the [authorization + # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.users.spacesettings` rpc :UpdateSpaceNotificationSetting, ::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest, ::Google::Apps::Chat::V1::SpaceNotificationSetting end diff --git a/google-apps-chat-v1/lib/google/chat/v1/space_pb.rb b/google-apps-chat-v1/lib/google/chat/v1/space_pb.rb index c2636de396da..c9d33ed92869 100644 --- a/google-apps-chat-v1/lib/google/chat/v1/space_pb.rb +++ b/google-apps-chat-v1/lib/google/chat/v1/space_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n\x1agoogle/chat/v1/space.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/chat/v1/history_state.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\x15\n\x05Space\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12/\n\x04type\x18\x02 \x01(\x0e\x32\x1a.google.chat.v1.Space.TypeB\x05\x18\x01\xe0\x41\x03\x12\x38\n\nspace_type\x18\n \x01(\x0e\x32\x1f.google.chat.v1.Space.SpaceTypeB\x03\xe0\x41\x01\x12\x1f\n\x12single_user_bot_dm\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\x08threaded\x18\x05 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x15\x65xternal_user_allowed\x18\x08 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x01\x12M\n\x15space_threading_state\x18\t \x01(\x0e\x32).google.chat.v1.Space.SpaceThreadingStateB\x03\xe0\x41\x03\x12>\n\rspace_details\x18\x0b \x01(\x0b\x32\".google.chat.v1.Space.SpaceDetailsB\x03\xe0\x41\x01\x12>\n\x13space_history_state\x18\r \x01(\x0e\x32\x1c.google.chat.v1.HistoryStateB\x03\xe0\x41\x01\x12\x18\n\x0bimport_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x05\xe0\x41\x01\x12\x39\n\x10last_active_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0f\x61\x64min_installed\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12\x44\n\x10membership_count\x18\x14 \x01(\x0b\x32%.google.chat.v1.Space.MembershipCountB\x03\xe0\x41\x03\x12\x42\n\x0f\x61\x63\x63\x65ss_settings\x18\x17 \x01(\x0b\x32$.google.chat.v1.Space.AccessSettingsB\x03\xe0\x41\x01\x12\x16\n\tspace_uri\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x1epredefined_permission_settings\x18\x1a \x01(\x0e\x32\x32.google.chat.v1.Space.PredefinedPermissionSettingsB\x06\xe0\x41\x04\xe0\x41\x01H\x00\x12L\n\x13permission_settings\x18\x1b \x01(\x0b\x32(.google.chat.v1.Space.PermissionSettingsB\x03\xe0\x41\x01H\x00\x12@\n\x17import_mode_expire_time\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x41\n\x0cSpaceDetails\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nguidelines\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a_\n\x0fMembershipCount\x12+\n\x1ejoined_direct_human_user_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12joined_group_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x1a\xc0\x01\n\x0e\x41\x63\x63\x65ssSettings\x12K\n\x0c\x61\x63\x63\x65ss_state\x18\x01 \x01(\x0e\x32\x30.google.chat.v1.Space.AccessSettings.AccessStateB\x03\xe0\x41\x03\x12\x15\n\x08\x61udience\x18\x03 \x01(\tB\x03\xe0\x41\x01\"J\n\x0b\x41\x63\x63\x65ssState\x12\x1c\n\x18\x41\x43\x43\x45SS_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\x10\n\x0c\x44ISCOVERABLE\x10\x02\x1a\xa8\x06\n\x12PermissionSettings\x12T\n\x19manage_members_and_groups\x18\x01 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x14modify_space_details\x18\x02 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12I\n\x0etoggle_history\x18\x03 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12M\n\x12use_at_mention_all\x18\x04 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x46\n\x0bmanage_apps\x18\x05 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12J\n\x0fmanage_webhooks\x18\x06 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12H\n\rpost_messages\x18\x07 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12I\n\x0ereply_messages\x18\x08 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x07\x88\x01\x01\x42\x1c\n\x1a_manage_members_and_groupsB\x17\n\x15_modify_space_detailsB\x11\n\x0f_toggle_historyB\x15\n\x13_use_at_mention_allB\x0e\n\x0c_manage_appsB\x12\n\x10_manage_webhooksB\x10\n\x0e_post_messagesB\x11\n\x0f_reply_messages\x1aP\n\x11PermissionSetting\x12\x1d\n\x10managers_allowed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0fmembers_allowed\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\".\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04ROOM\x10\x01\x12\x06\n\x02\x44M\x10\x02\"V\n\tSpaceType\x12\x1a\n\x16SPACE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nGROUP_CHAT\x10\x02\x12\x12\n\x0e\x44IRECT_MESSAGE\x10\x03\"\x82\x01\n\x13SpaceThreadingState\x12%\n!SPACE_THREADING_STATE_UNSPECIFIED\x10\x00\x12\x15\n\x11THREADED_MESSAGES\x10\x02\x12\x14\n\x10GROUPED_MESSAGES\x10\x03\x12\x17\n\x13UNTHREADED_MESSAGES\x10\x04\"\x7f\n\x1cPredefinedPermissionSettings\x12.\n*PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\n\x13\x43OLLABORATION_SPACE\x10\x01\x12\x16\n\x12\x41NNOUNCEMENT_SPACE\x10\x02:.\xea\x41+\n\x19\x63hat.googleapis.com/Space\x12\x0espaces/{space}B\x1b\n\x19space_permission_settings\"X\n\x12\x43reateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Y\n\x11ListSpacesRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"T\n\x12ListSpacesResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x0fGetSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1d\n\x10use_admin_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"-\n\x18\x46indDirectMessageRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x12UpdateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1d\n\x10use_admin_access\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x81\x01\n\x13SearchSpacesRequest\x12\x18\n\x10use_admin_access\x18\x01 \x01(\x08\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x12\n\x05query\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"j\n\x14SearchSpacesResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"d\n\x12\x44\x65leteSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1d\n\x10use_admin_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x1a\x43ompleteImportSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\"C\n\x1b\x43ompleteImportSpaceResponse\x12$\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\xa3\x01\n\x12\x63om.google.chat.v1B\nSpaceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" +descriptor_data = "\n\x1agoogle/chat/v1/space.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/chat/v1/history_state.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xff\x15\n\x05Space\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12/\n\x04type\x18\x02 \x01(\x0e\x32\x1a.google.chat.v1.Space.TypeB\x05\x18\x01\xe0\x41\x03\x12\x38\n\nspace_type\x18\n \x01(\x0e\x32\x1f.google.chat.v1.Space.SpaceTypeB\x03\xe0\x41\x01\x12\x1f\n\x12single_user_bot_dm\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\x08threaded\x18\x05 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x15\x65xternal_user_allowed\x18\x08 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x01\x12M\n\x15space_threading_state\x18\t \x01(\x0e\x32).google.chat.v1.Space.SpaceThreadingStateB\x03\xe0\x41\x03\x12>\n\rspace_details\x18\x0b \x01(\x0b\x32\".google.chat.v1.Space.SpaceDetailsB\x03\xe0\x41\x01\x12>\n\x13space_history_state\x18\r \x01(\x0e\x32\x1c.google.chat.v1.HistoryStateB\x03\xe0\x41\x01\x12\x18\n\x0bimport_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x05\xe0\x41\x01\x12\x39\n\x10last_active_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0f\x61\x64min_installed\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12\x44\n\x10membership_count\x18\x14 \x01(\x0b\x32%.google.chat.v1.Space.MembershipCountB\x03\xe0\x41\x03\x12\x42\n\x0f\x61\x63\x63\x65ss_settings\x18\x17 \x01(\x0b\x32$.google.chat.v1.Space.AccessSettingsB\x03\xe0\x41\x01\x12\x1d\n\x08\x63ustomer\x18\x18 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\tspace_uri\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x1epredefined_permission_settings\x18\x1a \x01(\x0e\x32\x32.google.chat.v1.Space.PredefinedPermissionSettingsB\x06\xe0\x41\x04\xe0\x41\x01H\x00\x12L\n\x13permission_settings\x18\x1b \x01(\x0b\x32(.google.chat.v1.Space.PermissionSettingsB\x03\xe0\x41\x01H\x00\x12@\n\x17import_mode_expire_time\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x41\n\x0cSpaceDetails\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nguidelines\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a_\n\x0fMembershipCount\x12+\n\x1ejoined_direct_human_user_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12joined_group_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x1a\xc0\x01\n\x0e\x41\x63\x63\x65ssSettings\x12K\n\x0c\x61\x63\x63\x65ss_state\x18\x01 \x01(\x0e\x32\x30.google.chat.v1.Space.AccessSettings.AccessStateB\x03\xe0\x41\x03\x12\x15\n\x08\x61udience\x18\x03 \x01(\tB\x03\xe0\x41\x01\"J\n\x0b\x41\x63\x63\x65ssState\x12\x1c\n\x18\x41\x43\x43\x45SS_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\x10\n\x0c\x44ISCOVERABLE\x10\x02\x1a\xa8\x06\n\x12PermissionSettings\x12T\n\x19manage_members_and_groups\x18\x01 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x14modify_space_details\x18\x02 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12I\n\x0etoggle_history\x18\x03 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12M\n\x12use_at_mention_all\x18\x04 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x46\n\x0bmanage_apps\x18\x05 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12J\n\x0fmanage_webhooks\x18\x06 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12H\n\rpost_messages\x18\x07 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12I\n\x0ereply_messages\x18\x08 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x07\x88\x01\x01\x42\x1c\n\x1a_manage_members_and_groupsB\x17\n\x15_modify_space_detailsB\x11\n\x0f_toggle_historyB\x15\n\x13_use_at_mention_allB\x0e\n\x0c_manage_appsB\x12\n\x10_manage_webhooksB\x10\n\x0e_post_messagesB\x11\n\x0f_reply_messages\x1aP\n\x11PermissionSetting\x12\x1d\n\x10managers_allowed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0fmembers_allowed\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\".\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04ROOM\x10\x01\x12\x06\n\x02\x44M\x10\x02\"V\n\tSpaceType\x12\x1a\n\x16SPACE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nGROUP_CHAT\x10\x02\x12\x12\n\x0e\x44IRECT_MESSAGE\x10\x03\"\x82\x01\n\x13SpaceThreadingState\x12%\n!SPACE_THREADING_STATE_UNSPECIFIED\x10\x00\x12\x15\n\x11THREADED_MESSAGES\x10\x02\x12\x14\n\x10GROUPED_MESSAGES\x10\x03\x12\x17\n\x13UNTHREADED_MESSAGES\x10\x04\"\x7f\n\x1cPredefinedPermissionSettings\x12.\n*PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\n\x13\x43OLLABORATION_SPACE\x10\x01\x12\x16\n\x12\x41NNOUNCEMENT_SPACE\x10\x02:.\xea\x41+\n\x19\x63hat.googleapis.com/Space\x12\x0espaces/{space}B\x1b\n\x19space_permission_settingsB\x0b\n\t_customer\"X\n\x12\x43reateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Y\n\x11ListSpacesRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"T\n\x12ListSpacesResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x0fGetSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1d\n\x10use_admin_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"-\n\x18\x46indDirectMessageRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x12UpdateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1d\n\x10use_admin_access\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x81\x01\n\x13SearchSpacesRequest\x12\x18\n\x10use_admin_access\x18\x01 \x01(\x08\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x12\n\x05query\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"j\n\x14SearchSpacesResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"d\n\x12\x44\x65leteSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1d\n\x10use_admin_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x1a\x43ompleteImportSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\"C\n\x1b\x43ompleteImportSpaceResponse\x12$\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\xa3\x01\n\x12\x63om.google.chat.v1B\nSpaceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-apps-chat-v1/lib/google/chat/v1/user_pb.rb b/google-apps-chat-v1/lib/google/chat/v1/user_pb.rb index 71c7741f1e61..fa2ddd65d483 100644 --- a/google-apps-chat-v1/lib/google/chat/v1/user_pb.rb +++ b/google-apps-chat-v1/lib/google/chat/v1/user_pb.rb @@ -5,10 +5,9 @@ require 'google/protobuf' require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -descriptor_data = "\n\x19google/chat/v1/user.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb8\x01\n\x04User\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\tdomain_id\x18\x06 \x01(\t\x12\'\n\x04type\x18\x05 \x01(\x0e\x32\x19.google.chat.v1.User.Type\x12\x19\n\x0cis_anonymous\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\"0\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05HUMAN\x10\x01\x12\x07\n\x03\x42OT\x10\x02\x42\xa2\x01\n\x12\x63om.google.chat.v1B\tUserProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" +descriptor_data = "\n\x19google/chat/v1/user.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xb8\x01\n\x04User\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\tdomain_id\x18\x06 \x01(\t\x12\'\n\x04type\x18\x05 \x01(\x0e\x32\x19.google.chat.v1.User.Type\x12\x19\n\x0cis_anonymous\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\"0\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05HUMAN\x10\x01\x12\x07\n\x03\x42OT\x10\x02\x42\xa2\x01\n\x12\x63om.google.chat.v1B\tUserProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/deletion_metadata.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/deletion_metadata.rb index 802d7851b5fa..ce49215eb49c 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/deletion_metadata.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/deletion_metadata.rb @@ -31,7 +31,9 @@ class DeletionMetadata extend ::Google::Protobuf::MessageExts::ClassMethods # Who deleted the message and how it was deleted. More values may be added in - # the future. + # the future. See [Edit or delete a message in Google + # Chat](https://support.google.com/chat/answer/7653281) for details on when + # messages can be deleted. module DeletionType # This value is unused. DELETION_TYPE_UNSPECIFIED = 0 @@ -39,23 +41,27 @@ module DeletionType # User deleted their own message. CREATOR = 1 - # The space owner deleted the message. + # A space manager deleted the message. SPACE_OWNER = 2 - # A Google Workspace admin deleted the message. + # A Google Workspace administrator deleted the message. Administrators can + # delete any message in the space, including messages sent by any space + # member or Chat app. ADMIN = 3 # A Chat app deleted its own message when it expired. APP_MESSAGE_EXPIRY = 4 - # A Chat app deleted the message on behalf of the user. + # A Chat app deleted the message on behalf of the creator (using user + # authentication). CREATOR_VIA_APP = 5 - # A Chat app deleted the message on behalf of the space owner. + # A Chat app deleted the message on behalf of a space manager (using user + # authentication). SPACE_OWNER_VIA_APP = 6 - # A member of the space deleted the message. Human users can delete - # messages sent by apps. + # A member of the space deleted the message. Users can delete messages sent + # by apps. SPACE_MEMBER = 7 end end diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/membership.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/membership.rb index dfcf4879c656..f1f2b8e9a66e 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/membership.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/membership.rb @@ -133,8 +133,6 @@ module MembershipRole # - When [authenticating as an # app](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), # the `chat.app.memberships` authorization scope is required. - # Authenticating as an app is available in [Developer - # Preview](https://developers.google.com/workspace/preview). # # - Set `user.type` to `HUMAN`, and set `user.name` with format # `users/{user}`, where `{user}` can be the email address for the user. For @@ -359,9 +357,13 @@ class GetMembershipRequest # human users' or their own memberships. Chat apps can't delete other apps' # memberships. # - # When deleting a human membership, requires the `chat.memberships` scope and - # `spaces/{space}/members/{member}` format. You can use the email as an - # alias for `{member}`. For example, + # When deleting a human membership, requires the `chat.memberships` scope + # with [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # or the `chat.memberships.app` scope with [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # and the `spaces/{space}/members/{member}` format. + # You can use the email as an alias for `{member}`. For example, # `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the # email of the Google Chat user. # diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/slash_command.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/slash_command.rb index e4ef3eda2a61..2cfa70fa7727 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/slash_command.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/slash_command.rb @@ -21,12 +21,12 @@ module Google module Apps module Chat module V1 - # A [slash + # Metadata about a [slash # command](https://developers.google.com/workspace/chat/commands) in # Google Chat. # @!attribute [rw] command_id # @return [::Integer] - # The ID of the slash command invoked. + # The ID of the slash command. class SlashCommand include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/space.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/space.rb index 86ef073c65b6..40b85a017966 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/space.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/space.rb @@ -124,6 +124,20 @@ module V1 # Optional. Specifies the [access # setting](https://support.google.com/chat/answer/11971020) of the space. # Only populated when the `space_type` is `SPACE`. + # @!attribute [rw] customer + # @return [::String] + # Optional. Immutable. The customer id of the domain of the space. + # Required only when creating a space with [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # and `SpaceType` is `SPACE`, otherwise should not be set. + # + # In the format `customers/{customer}`, where `customer` is the `id` from the + # [Admin SDK customer resource]( + # https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). + # Private apps can also use the `customers/my_customer` alias to create + # the space in the same Google Workspace organization as the app. + # + # For DMs, this field isn't populated. # @!attribute [r] space_uri # @return [::String] # Output only. The URI for a user to access the space. @@ -134,6 +148,17 @@ module V1 # created. After you create the space, settings are populated in the # `PermissionSettings` field. # + # Setting predefined permission settings supports: + # + # - [App + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) with the + # `chat.app.spaces` or `chat.app.spaces.create` scopes. + # + # - [User + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # # Note: The following fields are mutually exclusive: `predefined_permission_settings`, `permission_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] permission_settings # @return [::Google::Apps::Chat::V1::Space::PermissionSettings] @@ -141,6 +166,18 @@ module V1 # updating exact space permission settings, where existing permission # settings are replaced. Output lists current permission settings. # + # Reading and updating permission settings supports: + # + # - [App + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # with [administrator + # approval](https://support.google.com/a?p=chat-app-auth) with the + # `chat.app.spaces` scope. Only populated and settable when the Chat app + # created the space. + # + # - [User + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # # Note: The following fields are mutually exclusive: `permission_settings`, `predefined_permission_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] import_mode_expire_time # @return [::Google::Protobuf::Timestamp] @@ -214,8 +251,7 @@ class MembershipCount # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) # with [administrator # approval](https://support.google.com/a?p=chat-app-auth) - # with the `chat.app.spaces` scope in [Developer - # Preview](https://developers.google.com/workspace/preview). + # with the `chat.app.spaces` scope. # # This field is not populated when using the `chat.bot` scope with [app # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/space_setup.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/space_setup.rb index 1fca1b246cef..74fa1a0ad8df 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/space_setup.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/space_setup.rb @@ -60,7 +60,7 @@ module V1 # Optional. The Google Chat users or groups to invite to join the space. Omit # the calling user, as they are added automatically. # - # The set currently allows up to 20 memberships (in addition to the caller). + # The set currently allows up to 49 memberships (in addition to the caller). # # For human membership, the `Membership.member` field must contain a `user` # with `name` populated (format: `users/{user}`) and `type` set to From 9064fae3f1317e425a00e87bc2b863cdd916a89f Mon Sep 17 00:00:00 2001 From: Charlotte Y <38296042+cy-yun@users.noreply.github.com> Date: Mon, 11 Aug 2025 12:55:59 -0700 Subject: [PATCH 390/457] feat(BigQuery): add data governance type to routine (#30732) --- .../lib/google/cloud/bigquery/routine.rb | 77 +++++++++++++++++++ .../cloud/bigquery/dataset/routine_test.rb | 3 +- .../bigquery/routine/partial/routine_test.rb | 20 +++++ .../routine/reference/routine_test.rb | 21 +++++ .../bigquery/routine/resource/routine_test.rb | 22 ++++++ google-cloud-bigquery/test/helper.rb | 4 +- 6 files changed, 145 insertions(+), 2 deletions(-) diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/routine.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/routine.rb index f6a2ba34cb53..8b74902e3db3 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/routine.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/routine.rb @@ -690,6 +690,59 @@ def determinism_level_not_deterministic? @gapi.determinism_level == "NOT_DETERMINISTIC" end + ## + # The data governance type of the routine. Optional. + # + # If set to `DATA_MASKING`, the function is validated and made + # available as a masking function. For more information, see [Create custom + # masking routines](https://cloud.google.com/bigquery/docs/user-defined-functions#custom-mask). + # + # @return [String, nil] The data governance type, or `nil` if not set or the object is a reference + # (see {#reference?}). + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # routine = dataset.routine "my_routine" + # + # routine.data_governance_type #=> "DATA_MASKING" + # + # @!group Attributes + # + def data_governance_type + return nil if reference? + ensure_full_data! + @gapi.data_governance_type + end + + ## + # Updates the data governance type of the routine. Optional. + # + # If set to `DATA_MASKING`, the function is validated and made + # available as a masking function. For more information, see [Create custom + # masking routines](https://cloud.google.com/bigquery/docs/user-defined-functions#custom-mask). + # + # @param [String, nil] new_data_governance_type The new data governance type. `nil` to unset. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # routine = dataset.routine "my_routine" + # + # routine.data_governance_type = "DATA_MASKING" + # + # @!group Attributes + # + def data_governance_type= new_data_governance_type + ensure_full_data! + @gapi.data_governance_type = new_data_governance_type + update_gapi! + end + ## # Updates the routine with changes made in the given block in a single update request. The following attributes # may be set: {Updater#routine_type=}, {Updater#language=}, {Updater#arguments=}, {Updater#return_type=}, @@ -1198,6 +1251,30 @@ def determinism_level= new_determinism_level @gapi.determinism_level = new_determinism_level end + ## + # Updates the data governance type of the routine. Optional. + # + # If set to `DATA_MASKING`, the function is validated and made + # available as a masking function. For more information, see [Create custom + # masking routines](https://cloud.google.com/bigquery/docs/user-defined-functions#custom-mask). + # + # @param [String, nil] new_data_governance_type The new data governance type. `nil` to unset. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # routine = dataset.routine "my_routine" + # + # routine.data_governance_type = "DATA_MASKING" + # + # @!group Attributes + # + def data_governance_type= new_data_governance_type + @gapi.data_governance_type = new_data_governance_type + end + def update raise "not implemented in #{self.class}" end diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset/routine_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset/routine_test.rb index 3675dfd6d289..67c5ed270373 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset/routine_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset/routine_test.rb @@ -22,7 +22,7 @@ let(:routine_id) { "my-routine-id" } let(:routine_hash) { random_routine_hash dataset_id, routine_id, determinism_level: "DETERMINISTIC" } let(:routine_gapi) { Google::Apis::BigqueryV2::Routine.from_json routine_hash.to_json } - let(:routine_insert_hash) { random_routine_hash dataset_id, routine_id, etag: nil, creation_time: nil, last_modified_time: nil, determinism_level: "DETERMINISTIC" } + let(:routine_insert_hash) { random_routine_hash dataset_id, routine_id, etag: nil, creation_time: nil, last_modified_time: nil, determinism_level: "DETERMINISTIC", data_governance_type: "DATA_MASKING" } let(:routine_insert_gapi) { Google::Apis::BigqueryV2::Routine.from_json routine_insert_hash.to_json } it "creates a routine" do @@ -87,6 +87,7 @@ r.body = "x * 3" r.description = "This is my routine" r.determinism_level = "DETERMINISTIC" + r.data_governance_type = "DATA_MASKING" expect { r.update }.must_raise RuntimeError expect { r.delete }.must_raise RuntimeError expect { r.reload! }.must_raise RuntimeError diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/routine/partial/routine_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/routine/partial/routine_test.rb index b4f99baef0c1..9ddaee1f234c 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/routine/partial/routine_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/routine/partial/routine_test.rb @@ -75,6 +75,7 @@ let(:new_body) { "x * 4" } let(:new_description) { "This is my updated routine" } let(:new_determinism_level) { "NOT_DETERMINISTIC" } + let(:new_data_governance_type) { "DATA_MASKING" } let(:routine_partial_hash) { random_routine_partial_hash dataset, routine_id } let(:routine_partial_gapi) { Google::Apis::BigqueryV2::Routine.from_json routine_partial_hash.to_json } let(:routine_hash) { random_routine_hash dataset, routine_id } @@ -313,6 +314,22 @@ _(routine.determinism_level_not_deterministic?).must_equal true end + it "updates its data_governance_type" do + mock = Minitest::Mock.new + mock.expect :get_routine, routine_gapi, [routine.project_id, routine.dataset_id, routine.routine_id] + updated_routine_gapi = routine_gapi.dup + updated_routine_gapi.data_governance_type = new_data_governance_type + mock.expect :update_routine, updated_routine_gapi, + [project, dataset, routine_id, updated_routine_gapi], options: { header: { "If-Match" => etag } } + routine.service.mocked_service = mock + + routine.data_governance_type = new_data_governance_type + + mock.verify + + _(routine.data_governance_type).must_equal new_data_governance_type + end + it "updates its attributes in a block" do mock = Minitest::Mock.new mock.expect :get_routine, routine_gapi, [routine.project_id, routine.dataset_id, routine.routine_id] @@ -325,6 +342,7 @@ updated_routine_gapi.definition_body = new_body updated_routine_gapi.description = new_description updated_routine_gapi.determinism_level = new_determinism_level + updated_routine_gapi.data_governance_type = new_data_governance_type mock.expect :update_routine, updated_routine_gapi, [project, dataset, routine_id, updated_routine_gapi], options: { header: { "If-Match" => etag } } routine.service.mocked_service = mock @@ -338,6 +356,7 @@ r.description = new_description r.body = new_body r.determinism_level = new_determinism_level + r.data_governance_type = new_data_governance_type end mock.verify @@ -352,6 +371,7 @@ _(routine.determinism_level).must_equal new_determinism_level _(routine.determinism_level_deterministic?).must_equal false _(routine.determinism_level_not_deterministic?).must_equal true + _(routine.data_governance_type).must_equal new_data_governance_type end it "skips update when no updates are made in a block" do diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/routine/reference/routine_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/routine/reference/routine_test.rb index 4bb8fca0f667..cbadac6354f7 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/routine/reference/routine_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/routine/reference/routine_test.rb @@ -74,6 +74,7 @@ let(:new_body) { "x * 4" } let(:new_description) { "This is my updated routine" } let(:new_determinism_level) { "NOT_DETERMINISTIC" } + let(:new_data_governance_type) { "DATA_MASKING" } let(:routine_hash) { random_routine_hash dataset, routine_id } let(:routine_gapi) { Google::Apis::BigqueryV2::Routine.from_json routine_hash.to_json } let(:routine) { Google::Cloud::Bigquery::Routine.new_reference project, dataset, routine_id, bigquery.service } @@ -98,6 +99,7 @@ _(routine.body).must_be_nil _(routine.description).must_be_nil _(routine.determinism_level).must_be_nil + _(routine.data_governance_type).must_be_nil end it "can test its existence" do @@ -315,6 +317,22 @@ _(routine.determinism_level_not_deterministic?).must_equal true end + it "updates its data_governance_type" do + mock = Minitest::Mock.new + mock.expect :get_routine, routine_gapi, [routine.project_id, routine.dataset_id, routine.routine_id] + updated_routine_gapi = routine_gapi.dup + updated_routine_gapi.data_governance_type = new_data_governance_type + mock.expect :update_routine, updated_routine_gapi, + [project, dataset, routine_id, updated_routine_gapi], options: { header: { "If-Match" => etag } } + routine.service.mocked_service = mock + + routine.data_governance_type = new_data_governance_type + + mock.verify + + _(routine.data_governance_type).must_equal new_data_governance_type + end + it "updates its attributes in a block" do mock = Minitest::Mock.new mock.expect :get_routine, routine_gapi, [routine.project_id, routine.dataset_id, routine.routine_id] @@ -327,6 +345,7 @@ updated_routine_gapi.definition_body = new_body updated_routine_gapi.description = new_description updated_routine_gapi.determinism_level = new_determinism_level + updated_routine_gapi.data_governance_type = new_data_governance_type mock.expect :update_routine, updated_routine_gapi, [project, dataset, routine_id, updated_routine_gapi], options: { header: { "If-Match" => etag } } routine.service.mocked_service = mock @@ -340,6 +359,7 @@ r.body = new_body r.description = new_description r.determinism_level = new_determinism_level + r.data_governance_type = new_data_governance_type end mock.verify @@ -354,6 +374,7 @@ _(routine.determinism_level).must_equal new_determinism_level _(routine.determinism_level_deterministic?).must_equal false _(routine.determinism_level_not_deterministic?).must_equal true + _(routine.data_governance_type).must_equal new_data_governance_type end it "skips update when no updates are made in a block" do diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/routine/resource/routine_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/routine/resource/routine_test.rb index 5752938c1b95..92d7c54c383f 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/routine/resource/routine_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/routine/resource/routine_test.rb @@ -67,6 +67,7 @@ let(:new_body) { "x * 4" } let(:new_description) { "This is my updated routine" } let(:new_determinism_level) { "NOT_DETERMINISTIC" } + let(:new_data_governance_type) { "DATA_MASKING" } let(:routine_hash) { random_routine_hash dataset, routine_id, determinism_level: determinism_level } let(:routine_gapi) { Google::Apis::BigqueryV2::Routine.from_json routine_hash.to_json } let(:routine) { Google::Cloud::Bigquery::Routine.from_gapi routine_gapi, bigquery.service } @@ -137,6 +138,7 @@ _(routine.determinism_level).must_equal determinism_level _(routine.determinism_level_deterministic?).must_equal true _(routine.determinism_level_not_deterministic?).must_equal false + _(routine.data_governance_type).must_be_nil end it "can test its existence" do @@ -356,6 +358,23 @@ _(routine.determinism_level_not_deterministic?).must_equal true end + it "updates its data_governance_type" do + _(routine.data_governance_type).must_be_nil + mock = Minitest::Mock.new + updated_routine_gapi = routine_gapi.dup + updated_routine_gapi.data_governance_type = new_data_governance_type + mock.expect :update_routine, updated_routine_gapi, + [project, dataset, routine_id, updated_routine_gapi], options: { header: { "If-Match" => etag } } + routine.service.mocked_service = mock + + routine.data_governance_type = new_data_governance_type + + mock.verify + + _(routine.data_governance_type).must_equal new_data_governance_type + end + + it "updates its attributes in a block" do _(routine.description).must_equal description _(routine.determinism_level).must_equal determinism_level @@ -372,6 +391,7 @@ updated_routine_gapi.definition_body = new_body updated_routine_gapi.description = new_description updated_routine_gapi.determinism_level = new_determinism_level + updated_routine_gapi.data_governance_type = new_data_governance_type mock.expect :update_routine, updated_routine_gapi, [project, dataset, routine_id, updated_routine_gapi], options: { header: { "If-Match" => etag } } routine.service.mocked_service = mock @@ -385,6 +405,7 @@ r.body = new_body r.description = new_description r.determinism_level = new_determinism_level + r.data_governance_type = new_data_governance_type end mock.verify @@ -399,6 +420,7 @@ _(routine.determinism_level).must_equal new_determinism_level _(routine.determinism_level_deterministic?).must_equal false _(routine.determinism_level_not_deterministic?).must_equal true + _(routine.data_governance_type).must_equal new_data_governance_type end it "skips update when no updates are made in a block" do diff --git a/google-cloud-bigquery/test/helper.rb b/google-cloud-bigquery/test/helper.rb index 4060899129d5..4cf75d164d21 100644 --- a/google-cloud-bigquery/test/helper.rb +++ b/google-cloud-bigquery/test/helper.rb @@ -592,7 +592,8 @@ def random_routine_hash dataset, description: "This is my routine", creation_time: time_millis, last_modified_time: time_millis, - determinism_level: nil + determinism_level: nil, + data_governance_type: nil id ||= "my_routine" h = { @@ -650,6 +651,7 @@ def random_routine_hash dataset, h[:etag] = etag if etag h[:creationTime] = creation_time if creation_time h[:lastModifiedTime] = last_modified_time if last_modified_time + h[:dataGovernanceType] = data_governance_type if data_governance_type h end From 18041ee895bcf96dc2571945161b3fffafe4d960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Mon, 11 Aug 2025 14:30:23 -0700 Subject: [PATCH 391/457] fix(bigtable): Fix mutate rows logic to handle errors (#30766) --- .../conformance/known_failures.txt | 3 - .../lib/google/cloud/bigtable/rows_mutator.rb | 63 ++++++++++++++----- .../lib/google/cloud/bigtable/service.rb | 15 +++-- .../cloud/bigtable/table/mutate_rows_test.rb | 25 ++++++-- 4 files changed, 72 insertions(+), 34 deletions(-) diff --git a/google-cloud-bigtable/conformance/known_failures.txt b/google-cloud-bigtable/conformance/known_failures.txt index 730f7077f226..50c9fa926e70 100644 --- a/google-cloud-bigtable/conformance/known_failures.txt +++ b/google-cloud-bigtable/conformance/known_failures.txt @@ -39,10 +39,7 @@ TestExecuteQuery_TypesTest TestMutateRow_Generic_DeadlineExceeded TestMutateRow_Generic_CloseClient TestMutateRows_Generic_DeadlineExceeded -TestMutateRows_Retry_ExponentialBackoff TestMutateRows_Generic_CloseClient -TestMutateRows_Retry_WithRoutingCookie -TestMutateRows_Retry_WithRetryInfo TestReadModifyWriteRow_Generic_CloseClient TestReadModifyWriteRow_Generic_DeadlineExceeded TestReadRow_Generic_DeadlineExceeded diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/rows_mutator.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/rows_mutator.rb index ece62559c103..7c42749c950a 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/rows_mutator.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/rows_mutator.rb @@ -39,6 +39,10 @@ class RowsMutator RETRY_LIMIT = 3 # @private + # The prefix for routing cookies. Used to dynamically find cookie + # headers in metadata. + COOKIE_KEY_PREFIX = "x-goog-cbt-cookie" + # # Creates a mutate rows instance. # @@ -57,18 +61,20 @@ def initialize table, entries # def apply_mutations @req_entries = @entries.map(&:to_grpc) - statuses = mutate_rows @req_entries + statuses, delay, cookies = mutate_rows @req_entries - # Collects retryable mutations indices. indices = statuses.each_with_object [] do |e, r| r << e.index if @entries[e.index].retryable? && RETRYABLE_CODES[e.status.code] end return statuses if indices.empty? - (RETRY_LIMIT - 1).times do + RETRY_LIMIT.times do break if indices.empty? - indices = retry_entries statuses, indices + + sleep delay if delay + + indices, delay, cookies = retry_entries statuses, indices, cookies end statuses @@ -80,13 +86,35 @@ def apply_mutations # Mutates rows. # # @param entries [Array] - # @return [Array] + # @param cookies [Hash] + # @return [Array, Float|nil, Hash] # - def mutate_rows entries - response = @table.service.mutate_rows @table.path, entries, app_profile_id: @table.app_profile_id - response.each_with_object [] do |res, statuses| - statuses.concat res.entries + def mutate_rows entries, cookies = {} + call_options = Gapic::CallOptions.new(metadata: cookies) unless cookies.empty? + + response = @table.service.mutate_rows( + @table.path, + entries, + app_profile_id: @table.app_profile_id, + call_options: call_options + ) + [response.flat_map(&:entries), nil, cookies] + rescue GRPC::BadStatus => e + info = e.status_details.find { |d| d.is_a? Google::Rpc::RetryInfo } + delay = if info&.retry_delay + info.retry_delay.seconds + (info.retry_delay.nanos / 1_000_000_000.0) + end + + cookies.merge!(e.metadata.select { |k, _| k.start_with? COOKIE_KEY_PREFIX }) + + status = Google::Rpc::Status.new code: e.code, message: e.message + statuses = entries.map.with_index do |_, i| + Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry.new( + index: i, + status: status + ) end + [statuses, delay, cookies] end ## @@ -94,18 +122,19 @@ def mutate_rows entries # # @param statuses [Array] # @param indices [Array] - # Retry entries position mapping list - # @return [Array] - # New list of failed entries positions + # @param cookies [Hash] + # @return [Array, Float|nil, Hash] # - def retry_entries statuses, indices + def retry_entries statuses, indices, cookies entries = indices.map { |i| @req_entries[i] } - retry_statuses = mutate_rows entries + retry_statuses, delay, cookies = mutate_rows entries, cookies - retry_statuses.each_with_object [] do |e, next_indices| - next_indices << indices[e.index] if RETRYABLE_CODES[e.status.code] - statuses[indices[e.index]].status = e.status + next_indices = retry_statuses.each_with_object [] do |e, list| + next_index = indices[e.index] + statuses[next_index].status = e.status + list << next_index if RETRYABLE_CODES[e.status.code] end + [next_indices, delay, cookies] end end end diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/service.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/service.rb index 077671441aca..16bf5058e1c4 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/service.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/service.rb @@ -689,14 +689,13 @@ def mutate_row table_name, row_key, mutations, app_profile_id: nil ) end - def mutate_rows table_name, entries, app_profile_id: nil - client(table_name, app_profile_id).mutate_rows( - **{ - table_name: table_name, - app_profile_id: app_profile_id, - entries: entries - }.compact - ) + def mutate_rows table_name, entries, app_profile_id: nil, call_options: nil + request = { + table_name: table_name, + app_profile_id: app_profile_id, + entries: entries + }.compact + client(table_name, app_profile_id).mutate_rows request, call_options end def check_and_mutate_row table_name, diff --git a/google-cloud-bigtable/test/google/cloud/bigtable/table/mutate_rows_test.rb b/google-cloud-bigtable/test/google/cloud/bigtable/table/mutate_rows_test.rb index bea5b084f85e..bdfeffecddeb 100644 --- a/google-cloud-bigtable/test/google/cloud/bigtable/table/mutate_rows_test.rb +++ b/google-cloud-bigtable/test/google/cloud/bigtable/table/mutate_rows_test.rb @@ -65,10 +65,12 @@ }] ) - mock.expect :mutate_rows, [res], + req = { table_name: table_path(instance_id, table_id), entries: [mutation_entry_grpc], app_profile_id: app_profile_id + } + mock.expect :mutate_rows, [res], [req, nil] entry = Google::Cloud::Bigtable::MutationEntry.new(row_key) entry.set_cell(family, qualifier, cell_value, timestamp: timestamp) @@ -100,7 +102,12 @@ }] ) mock = Minitest::Mock.new - mock.expect :mutate_rows, [res], table_name: table_path(instance_id, table_id), entries: [entry], app_profile_id: app_profile_id + req = { + table_name: table_path(instance_id, table_id), + app_profile_id: app_profile_id, + entries: [entry] + } + mock.expect :mutate_rows, [res], [req, nil] bigtable.service.mocked_client = mock @@ -119,11 +126,12 @@ mock.verify end - it "retry for failed mutation with 3 times" do + it "retries a failed mutation 3 times" do req_entries = req_entries_grpc retry_entries = [ req_entries, [req_entries.last], + [req_entries.last], [req_entries.last] ] @@ -135,6 +143,9 @@ [ { index: 0, status: { code: Google::Rpc::Code::DEADLINE_EXCEEDED, message: "failed" }} ], + [ + { index: 0, status: { code: Google::Rpc::Code::DEADLINE_EXCEEDED, message: "failed" }} + ], [ { index: 0, status: { code: Google::Rpc::Code::DEADLINE_EXCEEDED, message: "failed" }} ] @@ -152,10 +163,11 @@ req_retry_entries: retry_entries, req_retry_response: retry_responses ) - def mock.mutate_rows request + def mock.mutate_rows request, call_options t._(request[:table_name]).must_equal expected_table_path t._(request[:entries]).must_equal req_retry_entries[self.retry_count] t._(request[:app_profile_id]).must_equal expected_req_app_profile_id + t.assert_kind_of Gapic::CallOptions, call_options if call_options res = req_retry_response[self.retry_count] self.retry_count += 1 @@ -171,7 +183,7 @@ def mock.mutate_rows request end responses = table.mutate_rows(mutation_entries) - _(mock.retry_count).must_equal 3 + _(mock.retry_count).must_equal 4 _(responses.length).must_equal 2 _(responses[0].index).must_equal 0 _(responses[0].status.code).must_equal Google::Rpc::Code::OK @@ -219,10 +231,11 @@ def mock.mutate_rows request req_retry_entries: retry_entries, req_retry_response: retry_responses ) - def mock.mutate_rows request + def mock.mutate_rows request, call_options t._(request[:table_name]).must_equal expected_table_path t._(request[:entries]).must_equal req_retry_entries[self.retry_count] t._(request[:app_profile_id]).must_equal expected_req_app_profile_id + t.assert_kind_of Gapic::CallOptions, call_options if call_options res = req_retry_response[self.retry_count] self.retry_count += 1 From e634dcfcbe8d955693333137b062589097f27d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Mon, 11 Aug 2025 15:15:30 -0700 Subject: [PATCH 392/457] docs: Fix subscriber snippet in OVERVIEW.md (#30813) --- google-cloud-pubsub/OVERVIEW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-pubsub/OVERVIEW.md b/google-cloud-pubsub/OVERVIEW.md index 3b184ca1d5a8..13d2da170f04 100644 --- a/google-cloud-pubsub/OVERVIEW.md +++ b/google-cloud-pubsub/OVERVIEW.md @@ -201,7 +201,7 @@ end require "google/cloud/pubsub" pubsub = Google::Cloud::PubSub.new project_id: "my-project-id" -publisher = pubsub.subscriber "my-topic-subscription" +subscriber = pubsub.subscriber "my-topic-subscription" ``` From 638b7a2db94386dfb30b91ae680339ccd1ebd6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Mon, 11 Aug 2025 15:39:33 -0700 Subject: [PATCH 393/457] feat(bigquery): Add table resource tags support (#30804) Co-authored-by: Yoshi Automation Bot --- .../lib/google/cloud/bigquery/table.rb | 71 +++++++++++++++++++ .../bigquery/table_reference_update_test.rb | 21 ++++++ .../test/google/cloud/bigquery/table_test.rb | 8 ++- .../cloud/bigquery/table_update_test.rb | 20 ++++++ 4 files changed, 119 insertions(+), 1 deletion(-) diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/table.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/table.rb index 4418903d1018..2df72b127c42 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/table.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/table.rb @@ -1017,6 +1017,77 @@ def labels= labels patch_gapi! :labels end + ## + # The resource tags associated with this table. Tag keys are globally unique. + # + # @see https://cloud.google.com/iam/docs/tags-access-control#definitions + # For additional information on tags. + # + # The returned hash is frozen and changes are not allowed. Use + # {#resource_tags=} to replace the entire hash. + # + # @return [Hash, nil] A hash containing key/value pairs. + # + # * The key is the namespaced friendly name of the tag key, e.g. + # "12345/environment" where 12345 is the ID of the parent organization + # or project resource for this tag key. + # * The value is the friendly short name of the tag value, e.g. "production". + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # table = dataset.table "my_table" + # + # resource_tags = table.resource_tags + # resource_tags["12345/environment"] #=> "production" + # + # @!group Attributes + # + def resource_tags + return nil if reference? + m = @gapi.resource_tags + m = m.to_h if m.respond_to? :to_h + m.dup.freeze + end + + ## + # Updates the resource tags associated with this table. Tag keys are globally + # unique. + # + # @see https://cloud.google.com/iam/docs/tags-access-control#definitions + # For additional information on tags. + # + # If the table is not a full resource representation (see + # {#resource_full?}), the full representation will be retrieved before + # the update to comply with ETag-based optimistic concurrency control. + # + # @param [Hash] resource_tags A hash containing key/value + # pairs. + # + # * The key is the namespaced friendly name of the tag key, e.g. + # "12345/environment" where 12345 is the ID of the parent organization + # or project resource for this tag key. + # * The value is the friendly short name of the tag value, e.g. "production". + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # table = dataset.table "my_table" + # + # table.resource_tags = { "12345/environment" => "production" } + # + # @!group Attributes + # + def resource_tags= resource_tags + reload! unless resource_full? + @gapi.resource_tags = resource_tags + patch_gapi! :resource_tags + end + ## # Returns the table's schema. If the table is not a view (See {#view?}), # this method can also be used to set, replace, or add to the schema by diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/table_reference_update_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/table_reference_update_test.rb index 58b8cb8b05b9..861e6bb71f74 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/table_reference_update_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/table_reference_update_test.rb @@ -218,6 +218,27 @@ mock.verify end + it "updates its resource_tags" do + new_resource_tags = { "bar" => "baz" } + + mock = Minitest::Mock.new + bigquery.service.mocked_service = mock + table_hash = random_table_hash dataset_id, table_id, table_name, description + table_hash["resourceTags"] = new_resource_tags + request_table_gapi = Google::Apis::BigqueryV2::Table.new resource_tags: new_resource_tags, etag: etag + mock.expect :get_table, return_table(table_hash), [project, dataset_id, table_id], **patch_table_args + mock.expect :patch_table, return_table(table_hash), + [project, dataset_id, table_id, request_table_gapi], options: {header: {"If-Match" => etag}} + table.service.mocked_service = mock + + _(table.resource_tags).must_be_nil + + table.resource_tags = new_resource_tags + + _(table.resource_tags).must_equal new_resource_tags + mock.verify + end + def return_table table_hash Google::Apis::BigqueryV2::Table.from_json(table_hash.to_json) end diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/table_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/table_test.rb index 0c539023eb24..391f1804caf3 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/table_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/table_test.rb @@ -25,11 +25,15 @@ let(:location_code) { "US" } let(:labels) { { "foo" => "bar" } } let(:kms_key) { "path/to/encryption_key_name" } + let(:resource_tags) { { "bar" => "baz" } } let(:gapi_encrypt_config) { Google::Apis::BigqueryV2::EncryptionConfiguration.new kms_key_name: kms_key } let(:gapi_encrypt_config) { Google::Apis::BigqueryV2::EncryptionConfiguration.new kms_key_name: kms_key } let(:api_url) { "http://googleapi/bigquery/v2/projects/#{project}/datasets/#{dataset}/tables/#{table_id}" } let(:table_hash) { random_table_hash dataset, table_id, table_name, description } - let(:table_gapi) { Google::Apis::BigqueryV2::Table.from_json(table_hash.to_json).tap { |t| t.encryption_configuration = gapi_encrypt_config } } + let(:table_gapi) { Google::Apis::BigqueryV2::Table.from_json(table_hash.to_json).tap do |t| + t.encryption_configuration = gapi_encrypt_config + t.resource_tags = resource_tags + end } let(:table) { Google::Cloud::Bigquery::Table.from_gapi table_gapi, bigquery.service } let(:clone_table) { Google::Cloud::Bigquery::Table.from_gapi random_clone_gapi(dataset), bigquery.service } let(:snapshot_table) { Google::Cloud::Bigquery::Table.from_gapi random_snapshot_gapi(dataset), bigquery.service } @@ -65,6 +69,8 @@ _(table.encryption).must_be_kind_of Google::Cloud::Bigquery::EncryptionConfiguration _(table.encryption.kms_key).must_equal kms_key _(table.encryption).must_be :frozen? + _(table.resource_tags).must_equal resource_tags + _(table.resource_tags).must_be :frozen? end it "knows its fully-qualified ID" do diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/table_update_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/table_update_test.rb index fa3be871b98a..ad003bc283aa 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/table_update_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/table_update_test.rb @@ -370,6 +370,26 @@ mock.verify end + it "updates its resource_tags" do + new_resource_tags = { "bar" => "baz" } + + mock = Minitest::Mock.new + bigquery.service.mocked_service = mock + table_hash = random_table_hash dataset_id, table_id, table_name, description + table_hash["resourceTags"] = new_resource_tags + request_table_gapi = Google::Apis::BigqueryV2::Table.new resource_tags: new_resource_tags, etag: etag + mock.expect :patch_table, return_table(table_hash), + [project, dataset_id, table_id, request_table_gapi], options: {header: {"If-Match" => etag}} + table.service.mocked_service = mock + + assert_empty table.resource_tags + + table.resource_tags = new_resource_tags + + _(table.resource_tags).must_equal new_resource_tags + mock.verify + end + def return_table table_hash Google::Apis::BigqueryV2::Table.from_json(table_hash.to_json) end From b1dedf3edfd51899f7dae69f0aef5dd0400aaa7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Andreassa?= Date: Mon, 11 Aug 2025 16:34:04 -0700 Subject: [PATCH 394/457] fix(container_analysis): Update google-cloud-pubsub dependency to v3.x (#30814) Co-authored-by: Yoshi Automation Bot --- .../samples/Gemfile | 2 +- .../samples/acceptance/sample_test.rb | 13 ++++++++--- .../samples/sample.rb | 22 ++++++++++++------- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/google-cloud-container_analysis/samples/Gemfile b/google-cloud-container_analysis/samples/Gemfile index db9fb9378e1b..13e9b66b7e85 100644 --- a/google-cloud-container_analysis/samples/Gemfile +++ b/google-cloud-container_analysis/samples/Gemfile @@ -22,7 +22,7 @@ gem "google-cloud-container_analysis", path: master ? "../../google-cloud-contai gem "google-cloud-container_analysis-v1", path: master ? "../../google-cloud-container_analysis-v1" : nil gem "grafeas-v1", path: master ? "../../grafeas-v1" : nil -gem "google-cloud-pubsub", "~> 2.0" +gem "google-cloud-pubsub", "~> 3.0" group :test do gem "google-style", "~> 1.25.1" diff --git a/google-cloud-container_analysis/samples/acceptance/sample_test.rb b/google-cloud-container_analysis/samples/acceptance/sample_test.rb index 5fc73a72ef12..8f283279be97 100644 --- a/google-cloud-container_analysis/samples/acceptance/sample_test.rb +++ b/google-cloud-container_analysis/samples/acceptance/sample_test.rb @@ -125,10 +125,16 @@ def new_note_id it "runs occurrence_pubsub" do # create topic if needed - pubsub = Google::Cloud::Pubsub.new project: @project_id + pubsub = Google::Cloud::PubSub.new project_id: @project_id topic_name = "container-analysis-occurrences-v1" - topic = pubsub.topic topic_name - pubsub.create_topic topic_name unless topic&.exists? + topic_admin = pubsub.topic_admin + topic_path = pubsub.topic_path topic_name + topic = + begin + topic_admin.get_topic topic: topic_path + rescue Google::Cloud::NotFoundError + topic_admin.create_topic name: topic_path + end try = 0 count = -1 @@ -172,6 +178,7 @@ def new_note_id count = t2[:output] end _(count).must_be :>=, total_num + topic_admin.delete_topic topic: topic.name if topic end it "runs poll_discovery_finished" do diff --git a/google-cloud-container_analysis/samples/sample.rb b/google-cloud-container_analysis/samples/sample.rb index c8820a2a32da..fb89c32aab8c 100644 --- a/google-cloud-container_analysis/samples/sample.rb +++ b/google-cloud-container_analysis/samples/sample.rb @@ -219,22 +219,28 @@ def occurrence_pubsub subscription_id:, timeout_seconds:, project_id: require "google/cloud/pubsub" - pubsub = Google::Cloud::Pubsub.new project: project_id - topic = pubsub.topic "container-analysis-occurrences-v1" - subscription = topic.subscribe subscription_id + pubsub = Google::Cloud::PubSub.new project_id: project_id + subscription_admin = pubsub.subscription_admin + subscription = subscription_admin.create_subscription \ + name: pubsub.subscription_path(subscription_id), + topic: pubsub.topic_path("container-analysis-occurrences-v1") + subscriber = pubsub.subscriber subscription.name count = 0 - subscriber = subscription.listen do |received_message| + listener = subscriber.listen do |received_message| count += 1 # Process incoming occurrence here puts "Message #{count}: #{received_message.data}" received_message.acknowledge! end - subscriber.start - # Wait for incomming occurrences + + listener.start + # Wait for incoming occurrences sleep timeout_seconds - subscriber.stop.wait! - subscription.delete + listener.stop.wait! + + subscription_admin.delete_subscription subscription: subscription.name + # Print and return the total number of Pub/Sub messages received puts "Total Messages Received: #{count}" count From dde4a45c995aec67f721bfdff51c943336a0ae2b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 17:33:54 -0700 Subject: [PATCH 395/457] feat: Add highest_upgradable_cve_severity field to Vulnerability report (#30807) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs: A comment for field `update_time` in message `.google.cloud.osconfig.v1.VulnerabilityReport` is changed docs: A comment for field `filter` in message `.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest` is changed PiperOrigin-RevId: 792763000 Source-Link: https://github.com/googleapis/googleapis/commit/eef0d65ed2dcf69de78bd773478d0de7436a4bc7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8a589cac61da0b6dfd4bd0da98eb40c3769f9dad Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2NvbmZpZy12MS8uT3dsQm90LnlhbWwiLCJoIjoiOGE1ODljYWM2MWRhMGI2ZGZkNGJkMGRhOThlYjQwYzM3NjlmOWRhZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1/os_config_zonal_service/client.rb | 18 +++++- .../v1/os_config_zonal_service/rest/client.rb | 18 +++++- .../cloud/osconfig/v1/vulnerability_pb.rb | 3 +- .../google/cloud/osconfig/v1/vulnerability.rb | 55 +++++++++++++++++-- 4 files changed, 85 insertions(+), 9 deletions(-) diff --git a/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/os_config_zonal_service/client.rb b/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/os_config_zonal_service/client.rb index 20b320f2cba2..5ca6d98d7c67 100644 --- a/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/os_config_zonal_service/client.rb +++ b/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/os_config_zonal_service/client.rb @@ -1359,8 +1359,22 @@ def get_vulnerability_report request, options = nil # `ListVulnerabilityReports` that indicates where this listing # should continue from. # @param filter [::String] - # If provided, this field specifies the criteria that must be met by a - # `vulnerabilityReport` API resource to be included in the response. + # This field supports filtering by the severity level for the vulnerability. + # For a list of severity levels, see [Severity levels for + # vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-overview#severity_levels_for_vulnerabilities). + # + # The filter field follows the rules described in the + # [AIP-160](https://google.aip.dev/160) guidelines as follows: + # + # + **Filter for a specific severity type**: you can list reports that + # contain + # vulnerabilities that are classified as medium by specifying + # `vulnerabilities.details.severity:MEDIUM`. + # + # + **Filter for a range of severities** : you can list reports that have + # vulnerabilities that are classified as critical or high by specifying + # `vulnerabilities.details.severity:HIGH OR + # vulnerabilities.details.severity:CRITICAL` # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::VulnerabilityReport>] diff --git a/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/client.rb b/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/client.rb index 51444a29cebb..364493b62693 100644 --- a/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/client.rb +++ b/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/client.rb @@ -1275,8 +1275,22 @@ def get_vulnerability_report request, options = nil # `ListVulnerabilityReports` that indicates where this listing # should continue from. # @param filter [::String] - # If provided, this field specifies the criteria that must be met by a - # `vulnerabilityReport` API resource to be included in the response. + # This field supports filtering by the severity level for the vulnerability. + # For a list of severity levels, see [Severity levels for + # vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-overview#severity_levels_for_vulnerabilities). + # + # The filter field follows the rules described in the + # [AIP-160](https://google.aip.dev/160) guidelines as follows: + # + # + **Filter for a specific severity type**: you can list reports that + # contain + # vulnerabilities that are classified as medium by specifying + # `vulnerabilities.details.severity:MEDIUM`. + # + # + **Filter for a range of severities** : you can list reports that have + # vulnerabilities that are classified as critical or high by specifying + # `vulnerabilities.details.severity:HIGH OR + # vulnerabilities.details.severity:CRITICAL` # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::VulnerabilityReport>] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-os_config-v1/lib/google/cloud/osconfig/v1/vulnerability_pb.rb b/google-cloud-os_config-v1/lib/google/cloud/osconfig/v1/vulnerability_pb.rb index 1ceb303cbded..bad6eb3320e7 100644 --- a/google-cloud-os_config-v1/lib/google/cloud/osconfig/v1/vulnerability_pb.rb +++ b/google-cloud-os_config-v1/lib/google/cloud/osconfig/v1/vulnerability_pb.rb @@ -9,7 +9,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/osconfig/v1/vulnerability.proto\x12\x18google.cloud.osconfig.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc3\x08\n\x13VulnerabilityReport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12Y\n\x0fvulnerabilities\x18\x02 \x03(\x0b\x32;.google.cloud.osconfig.v1.VulnerabilityReport.VulnerabilityB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x82\x06\n\rVulnerability\x12T\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32\x43.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details\x12(\n\x1cinstalled_inventory_item_ids\x18\x02 \x03(\tB\x02\x18\x01\x12(\n\x1c\x61vailable_inventory_item_ids\x18\x03 \x03(\tB\x02\x18\x01\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12O\n\x05items\x18\x06 \x03(\x0b\x32@.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item\x1a\x94\x02\n\x07\x44\x65tails\x12\x0b\n\x03\x63ve\x18\x01 \x01(\t\x12\x15\n\rcvss_v2_score\x18\x02 \x01(\x02\x12\x31\n\x07\x63vss_v3\x18\x03 \x01(\x0b\x32 .google.cloud.osconfig.v1.CVSSv3\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x61\n\nreferences\x18\x06 \x03(\x0b\x32M.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference\x1a(\n\tReference\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x1a}\n\x04Item\x12#\n\x1binstalled_inventory_item_id\x18\x01 \x01(\t\x12#\n\x1b\x61vailable_inventory_item_id\x18\x02 \x01(\t\x12\x15\n\rfixed_cpe_uri\x18\x03 \x01(\t\x12\x14\n\x0cupstream_fix\x18\x04 \x01(\t:\x82\x01\xea\x41\x7f\n+osconfig.googleapis.com/VulnerabilityReport\x12Pprojects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport\"b\n\x1dGetVulnerabilityReportRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+osconfig.googleapis.com/VulnerabilityReport\"\x91\x01\n\x1fListVulnerabilityReportsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ompute.googleapis.com/Instance\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x89\x01\n ListVulnerabilityReportsResponse\x12L\n\x15vulnerability_reports\x18\x01 \x03(\x0b\x32-.google.cloud.osconfig.v1.VulnerabilityReport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb5\n\n\x06\x43VSSv3\x12\x12\n\nbase_score\x18\x01 \x01(\x02\x12\x1c\n\x14\x65xploitability_score\x18\x02 \x01(\x02\x12\x14\n\x0cimpact_score\x18\x03 \x01(\x02\x12\x44\n\rattack_vector\x18\x05 \x01(\x0e\x32-.google.cloud.osconfig.v1.CVSSv3.AttackVector\x12L\n\x11\x61ttack_complexity\x18\x06 \x01(\x0e\x32\x31.google.cloud.osconfig.v1.CVSSv3.AttackComplexity\x12P\n\x13privileges_required\x18\x07 \x01(\x0e\x32\x33.google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired\x12J\n\x10user_interaction\x18\x08 \x01(\x0e\x32\x30.google.cloud.osconfig.v1.CVSSv3.UserInteraction\x12\x35\n\x05scope\x18\t \x01(\x0e\x32&.google.cloud.osconfig.v1.CVSSv3.Scope\x12G\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32\'.google.cloud.osconfig.v1.CVSSv3.Impact\x12\x41\n\x10integrity_impact\x18\x0b \x01(\x0e\x32\'.google.cloud.osconfig.v1.CVSSv3.Impact\x12\x44\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32\'.google.cloud.osconfig.v1.CVSSv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\x42\xc2\x01\n\x1c\x63om.google.cloud.osconfig.v1B\x12VulnerabilityProtoP\x01Z8cloud.google.com/go/osconfig/apiv1/osconfigpb;osconfigpb\xaa\x02\x18Google.Cloud.OsConfig.V1\xca\x02\x18Google\\Cloud\\OsConfig\\V1\xea\x02\x1bGoogle::Cloud::OsConfig::V1b\x06proto3" +descriptor_data = "\n,google/cloud/osconfig/v1/vulnerability.proto\x12\x18google.cloud.osconfig.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\n\n\x13VulnerabilityReport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12Y\n\x0fvulnerabilities\x18\x02 \x03(\x0b\x32;.google.cloud.osconfig.v1.VulnerabilityReport.VulnerabilityB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12v\n\x1fhighest_upgradable_cve_severity\x18\x04 \x01(\x0e\x32H.google.cloud.osconfig.v1.VulnerabilityReport.VulnerabilitySeverityLevelB\x03\xe0\x41\x03\x1a\x82\x06\n\rVulnerability\x12T\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32\x43.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details\x12(\n\x1cinstalled_inventory_item_ids\x18\x02 \x03(\tB\x02\x18\x01\x12(\n\x1c\x61vailable_inventory_item_ids\x18\x03 \x03(\tB\x02\x18\x01\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12O\n\x05items\x18\x06 \x03(\x0b\x32@.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item\x1a\x94\x02\n\x07\x44\x65tails\x12\x0b\n\x03\x63ve\x18\x01 \x01(\t\x12\x15\n\rcvss_v2_score\x18\x02 \x01(\x02\x12\x31\n\x07\x63vss_v3\x18\x03 \x01(\x0b\x32 .google.cloud.osconfig.v1.CVSSv3\x12\x10\n\x08severity\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x61\n\nreferences\x18\x06 \x03(\x0b\x32M.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference\x1a(\n\tReference\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x1a}\n\x04Item\x12#\n\x1binstalled_inventory_item_id\x18\x01 \x01(\t\x12#\n\x1b\x61vailable_inventory_item_id\x18\x02 \x01(\t\x12\x15\n\rfixed_cpe_uri\x18\x03 \x01(\t\x12\x14\n\x0cupstream_fix\x18\x04 \x01(\t\"\x8e\x01\n\x1aVulnerabilitySeverityLevel\x12,\n(VULNERABILITY_SEVERITY_LEVEL_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0b\n\x07MINIMAL\x10\x02\x12\x07\n\x03LOW\x10\x03\x12\n\n\x06MEDIUM\x10\x04\x12\x08\n\x04HIGH\x10\x05\x12\x0c\n\x08\x43RITICAL\x10\x06:\x82\x01\xea\x41\x7f\n+osconfig.googleapis.com/VulnerabilityReport\x12Pprojects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport\"b\n\x1dGetVulnerabilityReportRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+osconfig.googleapis.com/VulnerabilityReport\"\x91\x01\n\x1fListVulnerabilityReportsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ompute.googleapis.com/Instance\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x89\x01\n ListVulnerabilityReportsResponse\x12L\n\x15vulnerability_reports\x18\x01 \x03(\x0b\x32-.google.cloud.osconfig.v1.VulnerabilityReport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb5\n\n\x06\x43VSSv3\x12\x12\n\nbase_score\x18\x01 \x01(\x02\x12\x1c\n\x14\x65xploitability_score\x18\x02 \x01(\x02\x12\x14\n\x0cimpact_score\x18\x03 \x01(\x02\x12\x44\n\rattack_vector\x18\x05 \x01(\x0e\x32-.google.cloud.osconfig.v1.CVSSv3.AttackVector\x12L\n\x11\x61ttack_complexity\x18\x06 \x01(\x0e\x32\x31.google.cloud.osconfig.v1.CVSSv3.AttackComplexity\x12P\n\x13privileges_required\x18\x07 \x01(\x0e\x32\x33.google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired\x12J\n\x10user_interaction\x18\x08 \x01(\x0e\x32\x30.google.cloud.osconfig.v1.CVSSv3.UserInteraction\x12\x35\n\x05scope\x18\t \x01(\x0e\x32&.google.cloud.osconfig.v1.CVSSv3.Scope\x12G\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32\'.google.cloud.osconfig.v1.CVSSv3.Impact\x12\x41\n\x10integrity_impact\x18\x0b \x01(\x0e\x32\'.google.cloud.osconfig.v1.CVSSv3.Impact\x12\x44\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32\'.google.cloud.osconfig.v1.CVSSv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\x42\xc2\x01\n\x1c\x63om.google.cloud.osconfig.v1B\x12VulnerabilityProtoP\x01Z8cloud.google.com/go/osconfig/apiv1/osconfigpb;osconfigpb\xaa\x02\x18Google.Cloud.OsConfig.V1\xca\x02\x18Google\\Cloud\\OsConfig\\V1\xea\x02\x1bGoogle::Cloud::OsConfig::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -45,6 +45,7 @@ module V1 VulnerabilityReport::Vulnerability::Details = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details").msgclass VulnerabilityReport::Vulnerability::Details::Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference").msgclass VulnerabilityReport::Vulnerability::Item = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item").msgclass + VulnerabilityReport::VulnerabilitySeverityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.VulnerabilityReport.VulnerabilitySeverityLevel").enummodule GetVulnerabilityReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.GetVulnerabilityReportRequest").msgclass ListVulnerabilityReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.ListVulnerabilityReportsRequest").msgclass ListVulnerabilityReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.ListVulnerabilityReportsResponse").msgclass diff --git a/google-cloud-os_config-v1/proto_docs/google/cloud/osconfig/v1/vulnerability.rb b/google-cloud-os_config-v1/proto_docs/google/cloud/osconfig/v1/vulnerability.rb index c29f6f01c17b..f4b7d02836db 100644 --- a/google-cloud-os_config-v1/proto_docs/google/cloud/osconfig/v1/vulnerability.rb +++ b/google-cloud-os_config-v1/proto_docs/google/cloud/osconfig/v1/vulnerability.rb @@ -37,8 +37,12 @@ module V1 # Output only. List of vulnerabilities affecting the VM. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp for when the last vulnerability report was generated for the - # VM. + # Output only. The timestamp for when the last vulnerability report was + # generated for the VM. + # @!attribute [r] highest_upgradable_cve_severity + # @return [::Google::Cloud::OsConfig::V1::VulnerabilityReport::VulnerabilitySeverityLevel] + # Output only. Highest level of severity among all the upgradable + # vulnerabilities with CVEs attached. class VulnerabilityReport include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -147,6 +151,35 @@ class Item extend ::Google::Protobuf::MessageExts::ClassMethods end end + + # Severity levels for vulnerabilities. + module VulnerabilitySeverityLevel + # Default SeverityLevel. This value is unused. + VULNERABILITY_SEVERITY_LEVEL_UNSPECIFIED = 0 + + # Vulnerability has no severity level. + NONE = 1 + + # Vulnerability severity level is minimal. This is level below the low + # severity level. + MINIMAL = 2 + + # Vulnerability severity level is low. This is level below the medium + # severity level. + LOW = 3 + + # Vulnerability severity level is medium. This is level below the high + # severity level. + MEDIUM = 4 + + # Vulnerability severity level is high. This is level below the critical + # severity level. + HIGH = 5 + + # Vulnerability severity level is critical. This is the highest severity + # level. + CRITICAL = 6 + end end # A request message for getting the vulnerability report for the specified VM. @@ -184,8 +217,22 @@ class GetVulnerabilityReportRequest # should continue from. # @!attribute [rw] filter # @return [::String] - # If provided, this field specifies the criteria that must be met by a - # `vulnerabilityReport` API resource to be included in the response. + # This field supports filtering by the severity level for the vulnerability. + # For a list of severity levels, see [Severity levels for + # vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-overview#severity_levels_for_vulnerabilities). + # + # The filter field follows the rules described in the + # [AIP-160](https://google.aip.dev/160) guidelines as follows: + # + # + **Filter for a specific severity type**: you can list reports that + # contain + # vulnerabilities that are classified as medium by specifying + # `vulnerabilities.details.severity:MEDIUM`. + # + # + **Filter for a range of severities** : you can list reports that have + # vulnerabilities that are classified as critical or high by specifying + # `vulnerabilities.details.severity:HIGH OR + # vulnerabilities.details.severity:CRITICAL` class ListVulnerabilityReportsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods From 495714f8f657d06440371728fc24489e766b5a5f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 17:48:07 -0700 Subject: [PATCH 396/457] chore(main): release google-shopping-merchant-reviews-v1beta 0.5.0 (#30752) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-reviews-v1beta 0.5.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-shopping-merchant-reviews-v1beta/CHANGELOG.md | 10 ++++++++++ .../google/shopping/merchant/reviews/v1beta/version.rb | 2 +- ...tadata_google.shopping.merchant.reviews.v1beta.json | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d8a476d6d033..1e3cb6f62317 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -981,7 +981,7 @@ "google-shopping-merchant-reports-v1beta+FILLER": "0.0.0", "google-shopping-merchant-reviews": "0.2.1", "google-shopping-merchant-reviews+FILLER": "0.0.0", - "google-shopping-merchant-reviews-v1beta": "0.4.0", + "google-shopping-merchant-reviews-v1beta": "0.5.0", "google-shopping-merchant-reviews-v1beta+FILLER": "0.0.0", "grafeas": "1.5.2", "grafeas+FILLER": "0.0.0", diff --git a/google-shopping-merchant-reviews-v1beta/CHANGELOG.md b/google-shopping-merchant-reviews-v1beta/CHANGELOG.md index ccebda404044..c1fb99b5351e 100644 --- a/google-shopping-merchant-reviews-v1beta/CHANGELOG.md +++ b/google-shopping-merchant-reviews-v1beta/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +### 0.5.0 (2025-08-11) + +### ⚠ BREAKING CHANGES + +* Renamed MerchantReview#attributes field to MerchantReview#merchant_review_attributes + +#### Bug Fixes + +* Renamed MerchantReview#attributes field to MerchantReview#merchant_review_attributes + ### 0.4.0 (2025-07-15) #### Features diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb index f6e77406491d..b485f22b9172 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Reviews module V1beta - VERSION = "0.4.0" + VERSION = "0.5.0" end end end diff --git a/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json b/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json index f17dd59cba2f..904ae2aa800e 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json +++ b/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-reviews-v1beta", - "version": "0.4.0", + "version": "0.5.0", "language": "RUBY", "apis": [ { From 6fdd2434fb68cc68b5dfa73d720f1a8928e823cb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 18:29:11 -0700 Subject: [PATCH 397/457] fix(bigtable-v2): Fixed routing headers when there is an authorized view (#30741) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 787999707 Source-Link: https://github.com/googleapis/googleapis/commit/6588689155df35bb46974c477505990f0034f569 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a9a7b2e2891738c75d9610986c8bdc6419c3576 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiI2YTlhN2IyZTI4OTE3MzhjNzVkOTYxMDk4NmM4YmRjNjQxOWMzNTc2In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: Add ReadRows/SampleRowKeys bindings for materialized views PiperOrigin-RevId: 793800781 Source-Link: https://github.com/googleapis/googleapis/commit/fe06a492944dc3a8360ed5b426942d34631eeca7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c4550f60725dc4c07adfe68cee0ac72eb4a5b1bb Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJjNDU1MGY2MDcyNWRjNGMwN2FkZmU2OGNlZTBhYzcyZWI0YTViMWJiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/bigtable/v2/bigtable_pb.rb | 2 +- .../cloud/bigtable/v2/bigtable/client.rb | 68 +++++++++++++------ 2 files changed, 47 insertions(+), 23 deletions(-) diff --git a/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb b/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb index ad08f5d9caf1..f853c1b086ee 100644 --- a/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb +++ b/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb @@ -18,7 +18,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n!google/bigtable/v2/bigtable.proto\x12\x12google.bigtable.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1dgoogle/bigtable/v2/data.proto\x1a&google/bigtable/v2/request_stats.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xcc\x04\n\x0fReadRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x0b \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x05 \x01(\t\x12(\n\x04rows\x18\x02 \x01(\x0b\x32\x1a.google.bigtable.v2.RowSet\x12-\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x12\n\nrows_limit\x18\x04 \x01(\x03\x12P\n\x12request_stats_view\x18\x06 \x01(\x0e\x32\x34.google.bigtable.v2.ReadRowsRequest.RequestStatsView\x12\x10\n\x08reversed\x18\x07 \x01(\x08\"f\n\x10RequestStatsView\x12\"\n\x1eREQUEST_STATS_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12REQUEST_STATS_NONE\x10\x01\x12\x16\n\x12REQUEST_STATS_FULL\x10\x02\"\xb1\x03\n\x10ReadRowsResponse\x12>\n\x06\x63hunks\x18\x01 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12\x1c\n\x14last_scanned_row_key\x18\x02 \x01(\x0c\x12\x37\n\rrequest_stats\x18\x03 \x01(\x0b\x32 .google.bigtable.v2.RequestStats\x1a\x85\x02\n\tCellChunk\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x31\n\x0b\x66\x61mily_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12.\n\tqualifier\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\x0e\n\x06labels\x18\x05 \x03(\t\x12\r\n\x05value\x18\x06 \x01(\x0c\x12\x12\n\nvalue_size\x18\x07 \x01(\x05\x12\x13\n\treset_row\x18\x08 \x01(\x08H\x00\x12\x14\n\ncommit_row\x18\t \x01(\x08H\x00\x42\x0c\n\nrow_status\"\x98\x02\n\x14SampleRowKeysRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x05 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\">\n\x15SampleRowKeysResponse\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\"\xbf\x02\n\x10MutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x34\n\tmutations\x18\x03 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x08 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\x13\n\x11MutateRowResponse\"\x88\x03\n\x11MutateRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x03 \x01(\t\x12\x41\n\x07\x65ntries\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.MutateRowsRequest.EntryB\x03\xe0\x41\x02\x1a\x84\x01\n\x05\x45ntry\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x34\n\tmutations\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x03 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\xe4\x01\n\x12MutateRowsResponse\x12=\n\x07\x65ntries\x18\x01 \x03(\x0b\x32,.google.bigtable.v2.MutateRowsResponse.Entry\x12?\n\x0frate_limit_info\x18\x03 \x01(\x0b\x32!.google.bigtable.v2.RateLimitInfoH\x00\x88\x01\x01\x1a:\n\x05\x45ntry\x12\r\n\x05index\x18\x01 \x01(\x03\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x12\n\x10_rate_limit_info\"J\n\rRateLimitInfo\x12)\n\x06period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\x01\"\x81\x03\n\x18\x43heckAndMutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x07 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x37\n\x10predicate_filter\x18\x06 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x34\n\x0etrue_mutations\x18\x04 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\x12\x35\n\x0f\x66\x61lse_mutations\x18\x05 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\"6\n\x19\x43heckAndMutateRowResponse\x12\x19\n\x11predicate_matched\x18\x01 \x01(\x08\"i\n\x12PingAndWarmRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"\x15\n\x13PingAndWarmResponse\"\x99\x02\n\x19ReadModifyWriteRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12;\n\x05rules\x18\x03 \x03(\x0b\x32\'.google.bigtable.v2.ReadModifyWriteRuleB\x03\xe0\x41\x02\"B\n\x1aReadModifyWriteRowResponse\x12$\n\x03row\x18\x01 \x01(\x0b\x32\x17.google.bigtable.v2.Row\"\x86\x01\n,GenerateInitialChangeStreamPartitionsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"g\n-GenerateInitialChangeStreamPartitionsResponse\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\"\x9b\x03\n\x17ReadChangeStreamRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\x12\x36\n\tpartition\x18\x03 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\x30\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12K\n\x13\x63ontinuation_tokens\x18\x06 \x01(\x0b\x32,.google.bigtable.v2.StreamContinuationTokensH\x00\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12heartbeat_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\n\nstart_from\"\xa9\n\n\x18ReadChangeStreamResponse\x12N\n\x0b\x64\x61ta_change\x18\x01 \x01(\x0b\x32\x37.google.bigtable.v2.ReadChangeStreamResponse.DataChangeH\x00\x12K\n\theartbeat\x18\x02 \x01(\x0b\x32\x36.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatH\x00\x12P\n\x0c\x63lose_stream\x18\x03 \x01(\x0b\x32\x38.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamH\x00\x1a\xf4\x01\n\rMutationChunk\x12X\n\nchunk_info\x18\x01 \x01(\x0b\x32\x44.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\x12.\n\x08mutation\x18\x02 \x01(\x0b\x32\x1c.google.bigtable.v2.Mutation\x1aY\n\tChunkInfo\x12\x1a\n\x12\x63hunked_value_size\x18\x01 \x01(\x05\x12\x1c\n\x14\x63hunked_value_offset\x18\x02 \x01(\x05\x12\x12\n\nlast_chunk\x18\x03 \x01(\x08\x1a\xc6\x03\n\nDataChange\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\x12\x19\n\x11source_cluster_id\x18\x02 \x01(\t\x12\x0f\n\x07row_key\x18\x03 \x01(\x0c\x12\x34\n\x10\x63ommit_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntiebreaker\x18\x05 \x01(\x05\x12J\n\x06\x63hunks\x18\x06 \x03(\x0b\x32:.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\r\n\x05token\x18\t \x01(\t\x12;\n\x17\x65stimated_low_watermark\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x16\n\x12GARBAGE_COLLECTION\x10\x02\x12\x10\n\x0c\x43ONTINUATION\x10\x03\x1a\x91\x01\n\tHeartbeat\x12G\n\x12\x63ontinuation_token\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x17\x65stimated_low_watermark\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb8\x01\n\x0b\x43loseStream\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x13\x63ontinuation_tokens\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x0enew_partitions\x18\x03 \x03(\x0b\x32#.google.bigtable.v2.StreamPartitionB\x0f\n\rstream_record\"\xa1\x03\n\x13\x45xecuteQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x05query\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\x0eprepared_query\x18\t \x01(\x0c\x12;\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatB\x02\x18\x01H\x00\x12\x19\n\x0cresume_token\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x06params\x18\x07 \x03(\x0b\x32\x33.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\x03\xe0\x41\x02\x1aH\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x96\x01\n\x14\x45xecuteQueryResponse\x12\x39\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadataH\x00\x12\x37\n\x07results\x18\x02 \x01(\x0b\x32$.google.bigtable.v2.PartialResultSetH\x00\x42\n\n\x08response\"\xf4\x02\n\x13PrepareQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatH\x00\x12Q\n\x0bparam_types\x18\x06 \x03(\x0b\x32\x37.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\x03\xe0\x41\x02\x1aK\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x98\x01\n\x14PrepareQueryResponse\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadata\x12\x16\n\x0eprepared_query\x18\x02 \x01(\x0c\x12/\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xc9&\n\x08\x42igtable\x12\xdb\x03\n\x08ReadRows\x12#.google.bigtable.v2.ReadRowsRequest\x1a$.google.bigtable.v2.ReadRowsResponse\"\x81\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9a\x01\"9/v2/{table_name=projects/*/instances/*/tables/*}:readRows:\x01*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xee\x03\n\rSampleRowKeys\x12(.google.bigtable.v2.SampleRowKeysRequest\x1a).google.bigtable.v2.SampleRowKeysResponse\"\x85\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\x12>/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\x12Z/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\x82\x04\n\tMutateRow\x12$.google.bigtable.v2.MutateRowRequest\x1a%.google.bigtable.v2.MutateRowResponse\"\xa7\x03\xda\x41\x1ctable_name,row_key,mutations\xda\x41+table_name,row_key,mutations,app_profile_id\x82\xd3\xe4\x93\x02\x9c\x01\":/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow:\x01*Z[\"V/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xf5\x03\n\nMutateRows\x12%.google.bigtable.v2.MutateRowsRequest\x1a&.google.bigtable.v2.MutateRowsResponse\"\x95\x03\xda\x41\x12table_name,entries\xda\x41!table_name,entries,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\";/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows:\x01*Z\\\"W/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}0\x01\x12\xf6\x04\n\x11\x43heckAndMutateRow\x12,.google.bigtable.v2.CheckAndMutateRowRequest\x1a-.google.bigtable.v2.CheckAndMutateRowResponse\"\x83\x04\xda\x41\x42table_name,row_key,predicate_filter,true_mutations,false_mutations\xda\x41Qtable_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id\x82\xd3\xe4\x93\x02\xac\x01\"B/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\x01*Zc\"^/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xee\x01\n\x0bPingAndWarm\x12&.google.bigtable.v2.PingAndWarmRequest\x1a\'.google.bigtable.v2.PingAndWarmResponse\"\x8d\x01\xda\x41\x04name\xda\x41\x13name,app_profile_id\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/instances/*}:ping:\x01*\x8a\xd3\xe4\x93\x02\x39\x12%\n\x04name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xa7\x04\n\x12ReadModifyWriteRow\x12-.google.bigtable.v2.ReadModifyWriteRowRequest\x1a..google.bigtable.v2.ReadModifyWriteRowResponse\"\xb1\x03\xda\x41\x18table_name,row_key,rules\xda\x41\'table_name,row_key,rules,app_profile_id\x82\xd3\xe4\x93\x02\xae\x01\"C/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow:\x01*Zd\"_/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\x01*\x8a\xd3\xe4\x93\x02\xb0\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12`\n\x14\x61uthorized_view_name\x12H{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}\x12\xbb\x02\n%GenerateInitialChangeStreamPartitions\x12@.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest\x1a\x41.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\x8a\x01\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02[\"V/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions:\x01*0\x01\x12\xe6\x01\n\x10ReadChangeStream\x12+.google.bigtable.v2.ReadChangeStreamRequest\x1a,.google.bigtable.v2.ReadChangeStreamResponse\"u\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x46\"A/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream:\x01*0\x01\x12\xa9\x02\n\x0cPrepareQuery\x12\'.google.bigtable.v2.PrepareQueryRequest\x1a(.google.bigtable.v2.PrepareQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:prepareQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xab\x02\n\x0c\x45xecuteQuery\x12\'.google.bigtable.v2.ExecuteQueryRequest\x1a(.google.bigtable.v2.ExecuteQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id0\x01\x1a\xdb\x02\xca\x41\x17\x62igtable.googleapis.com\xd2\x41\xbd\x02https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf5\x04\n\x16\x63om.google.bigtable.v2B\rBigtableProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\xea\x41\x87\x01\n+bigtableadmin.googleapis.com/AuthorizedView\x12Xprojects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}\xea\x41~\n-bigtableadmin.googleapis.com/MaterializedView\x12Mprojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\x06proto3" +descriptor_data = "\n!google/bigtable/v2/bigtable.proto\x12\x12google.bigtable.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1dgoogle/bigtable/v2/data.proto\x1a&google/bigtable/v2/request_stats.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xcc\x04\n\x0fReadRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x0b \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x05 \x01(\t\x12(\n\x04rows\x18\x02 \x01(\x0b\x32\x1a.google.bigtable.v2.RowSet\x12-\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x12\n\nrows_limit\x18\x04 \x01(\x03\x12P\n\x12request_stats_view\x18\x06 \x01(\x0e\x32\x34.google.bigtable.v2.ReadRowsRequest.RequestStatsView\x12\x10\n\x08reversed\x18\x07 \x01(\x08\"f\n\x10RequestStatsView\x12\"\n\x1eREQUEST_STATS_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12REQUEST_STATS_NONE\x10\x01\x12\x16\n\x12REQUEST_STATS_FULL\x10\x02\"\xb1\x03\n\x10ReadRowsResponse\x12>\n\x06\x63hunks\x18\x01 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12\x1c\n\x14last_scanned_row_key\x18\x02 \x01(\x0c\x12\x37\n\rrequest_stats\x18\x03 \x01(\x0b\x32 .google.bigtable.v2.RequestStats\x1a\x85\x02\n\tCellChunk\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x31\n\x0b\x66\x61mily_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12.\n\tqualifier\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\x0e\n\x06labels\x18\x05 \x03(\t\x12\r\n\x05value\x18\x06 \x01(\x0c\x12\x12\n\nvalue_size\x18\x07 \x01(\x05\x12\x13\n\treset_row\x18\x08 \x01(\x08H\x00\x12\x14\n\ncommit_row\x18\t \x01(\x08H\x00\x42\x0c\n\nrow_status\"\x98\x02\n\x14SampleRowKeysRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x05 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\">\n\x15SampleRowKeysResponse\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\"\xbf\x02\n\x10MutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x34\n\tmutations\x18\x03 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x08 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\x13\n\x11MutateRowResponse\"\x88\x03\n\x11MutateRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x03 \x01(\t\x12\x41\n\x07\x65ntries\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.MutateRowsRequest.EntryB\x03\xe0\x41\x02\x1a\x84\x01\n\x05\x45ntry\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x34\n\tmutations\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x03 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\xe4\x01\n\x12MutateRowsResponse\x12=\n\x07\x65ntries\x18\x01 \x03(\x0b\x32,.google.bigtable.v2.MutateRowsResponse.Entry\x12?\n\x0frate_limit_info\x18\x03 \x01(\x0b\x32!.google.bigtable.v2.RateLimitInfoH\x00\x88\x01\x01\x1a:\n\x05\x45ntry\x12\r\n\x05index\x18\x01 \x01(\x03\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x12\n\x10_rate_limit_info\"J\n\rRateLimitInfo\x12)\n\x06period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\x01\"\x81\x03\n\x18\x43heckAndMutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x07 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x37\n\x10predicate_filter\x18\x06 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x34\n\x0etrue_mutations\x18\x04 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\x12\x35\n\x0f\x66\x61lse_mutations\x18\x05 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\"6\n\x19\x43heckAndMutateRowResponse\x12\x19\n\x11predicate_matched\x18\x01 \x01(\x08\"i\n\x12PingAndWarmRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"\x15\n\x13PingAndWarmResponse\"\x99\x02\n\x19ReadModifyWriteRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12;\n\x05rules\x18\x03 \x03(\x0b\x32\'.google.bigtable.v2.ReadModifyWriteRuleB\x03\xe0\x41\x02\"B\n\x1aReadModifyWriteRowResponse\x12$\n\x03row\x18\x01 \x01(\x0b\x32\x17.google.bigtable.v2.Row\"\x86\x01\n,GenerateInitialChangeStreamPartitionsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"g\n-GenerateInitialChangeStreamPartitionsResponse\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\"\x9b\x03\n\x17ReadChangeStreamRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\x12\x36\n\tpartition\x18\x03 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\x30\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12K\n\x13\x63ontinuation_tokens\x18\x06 \x01(\x0b\x32,.google.bigtable.v2.StreamContinuationTokensH\x00\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12heartbeat_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\n\nstart_from\"\xa9\n\n\x18ReadChangeStreamResponse\x12N\n\x0b\x64\x61ta_change\x18\x01 \x01(\x0b\x32\x37.google.bigtable.v2.ReadChangeStreamResponse.DataChangeH\x00\x12K\n\theartbeat\x18\x02 \x01(\x0b\x32\x36.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatH\x00\x12P\n\x0c\x63lose_stream\x18\x03 \x01(\x0b\x32\x38.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamH\x00\x1a\xf4\x01\n\rMutationChunk\x12X\n\nchunk_info\x18\x01 \x01(\x0b\x32\x44.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\x12.\n\x08mutation\x18\x02 \x01(\x0b\x32\x1c.google.bigtable.v2.Mutation\x1aY\n\tChunkInfo\x12\x1a\n\x12\x63hunked_value_size\x18\x01 \x01(\x05\x12\x1c\n\x14\x63hunked_value_offset\x18\x02 \x01(\x05\x12\x12\n\nlast_chunk\x18\x03 \x01(\x08\x1a\xc6\x03\n\nDataChange\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\x12\x19\n\x11source_cluster_id\x18\x02 \x01(\t\x12\x0f\n\x07row_key\x18\x03 \x01(\x0c\x12\x34\n\x10\x63ommit_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntiebreaker\x18\x05 \x01(\x05\x12J\n\x06\x63hunks\x18\x06 \x03(\x0b\x32:.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\r\n\x05token\x18\t \x01(\t\x12;\n\x17\x65stimated_low_watermark\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x16\n\x12GARBAGE_COLLECTION\x10\x02\x12\x10\n\x0c\x43ONTINUATION\x10\x03\x1a\x91\x01\n\tHeartbeat\x12G\n\x12\x63ontinuation_token\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x17\x65stimated_low_watermark\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb8\x01\n\x0b\x43loseStream\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x13\x63ontinuation_tokens\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x0enew_partitions\x18\x03 \x03(\x0b\x32#.google.bigtable.v2.StreamPartitionB\x0f\n\rstream_record\"\xa1\x03\n\x13\x45xecuteQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x05query\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\x0eprepared_query\x18\t \x01(\x0c\x12;\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatB\x02\x18\x01H\x00\x12\x19\n\x0cresume_token\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x06params\x18\x07 \x03(\x0b\x32\x33.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\x03\xe0\x41\x02\x1aH\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x96\x01\n\x14\x45xecuteQueryResponse\x12\x39\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadataH\x00\x12\x37\n\x07results\x18\x02 \x01(\x0b\x32$.google.bigtable.v2.PartialResultSetH\x00\x42\n\n\x08response\"\xf4\x02\n\x13PrepareQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatH\x00\x12Q\n\x0bparam_types\x18\x06 \x03(\x0b\x32\x37.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\x03\xe0\x41\x02\x1aK\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x98\x01\n\x14PrepareQueryResponse\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadata\x12\x16\n\x0eprepared_query\x18\x02 \x01(\x0c\x12/\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xdb\'\n\x08\x42igtable\x12\xd5\x04\n\x08ReadRows\x12#.google.bigtable.v2.ReadRowsRequest\x1a$.google.bigtable.v2.ReadRowsResponse\"\xfb\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\xf1\x01\"9/v2/{table_name=projects/*/instances/*/tables/*}:readRows:\x01*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\x01*ZU\"P/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:readRows:\x01*\x8a\xd3\xe4\x93\x02\xd3\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12:\n\x16materialized_view_name\x12 {name=projects/*/instances/*}/**0\x01\x12\xea\x04\n\rSampleRowKeys\x12(.google.bigtable.v2.SampleRowKeysRequest\x1a).google.bigtable.v2.SampleRowKeysResponse\"\x81\x04\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\xf7\x01\x12>/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\x12Z/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeysZW\x12U/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:sampleRowKeys\x8a\xd3\xe4\x93\x02\xd3\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12:\n\x16materialized_view_name\x12 {name=projects/*/instances/*}/**0\x01\x12\xe9\x03\n\tMutateRow\x12$.google.bigtable.v2.MutateRowRequest\x1a%.google.bigtable.v2.MutateRowResponse\"\x8e\x03\xda\x41\x1ctable_name,row_key,mutations\xda\x41+table_name,row_key,mutations,app_profile_id\x82\xd3\xe4\x93\x02\x9c\x01\":/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow:\x01*Z[\"V/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xdc\x03\n\nMutateRows\x12%.google.bigtable.v2.MutateRowsRequest\x1a&.google.bigtable.v2.MutateRowsResponse\"\xfc\x02\xda\x41\x12table_name,entries\xda\x41!table_name,entries,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\";/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows:\x01*Z\\\"W/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**0\x01\x12\xdd\x04\n\x11\x43heckAndMutateRow\x12,.google.bigtable.v2.CheckAndMutateRowRequest\x1a-.google.bigtable.v2.CheckAndMutateRowResponse\"\xea\x03\xda\x41\x42table_name,row_key,predicate_filter,true_mutations,false_mutations\xda\x41Qtable_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id\x82\xd3\xe4\x93\x02\xac\x01\"B/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\x01*Zc\"^/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xee\x01\n\x0bPingAndWarm\x12&.google.bigtable.v2.PingAndWarmRequest\x1a\'.google.bigtable.v2.PingAndWarmResponse\"\x8d\x01\xda\x41\x04name\xda\x41\x13name,app_profile_id\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/instances/*}:ping:\x01*\x8a\xd3\xe4\x93\x02\x39\x12%\n\x04name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\x8e\x04\n\x12ReadModifyWriteRow\x12-.google.bigtable.v2.ReadModifyWriteRowRequest\x1a..google.bigtable.v2.ReadModifyWriteRowResponse\"\x98\x03\xda\x41\x18table_name,row_key,rules\xda\x41\'table_name,row_key,rules,app_profile_id\x82\xd3\xe4\x93\x02\xae\x01\"C/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow:\x01*Zd\"_/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xbb\x02\n%GenerateInitialChangeStreamPartitions\x12@.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest\x1a\x41.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\x8a\x01\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02[\"V/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions:\x01*0\x01\x12\xe6\x01\n\x10ReadChangeStream\x12+.google.bigtable.v2.ReadChangeStreamRequest\x1a,.google.bigtable.v2.ReadChangeStreamResponse\"u\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x46\"A/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream:\x01*0\x01\x12\xa9\x02\n\x0cPrepareQuery\x12\'.google.bigtable.v2.PrepareQueryRequest\x1a(.google.bigtable.v2.PrepareQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:prepareQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xab\x02\n\x0c\x45xecuteQuery\x12\'.google.bigtable.v2.ExecuteQueryRequest\x1a(.google.bigtable.v2.ExecuteQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id0\x01\x1a\xdb\x02\xca\x41\x17\x62igtable.googleapis.com\xd2\x41\xbd\x02https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf5\x04\n\x16\x63om.google.bigtable.v2B\rBigtableProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\xea\x41\x87\x01\n+bigtableadmin.googleapis.com/AuthorizedView\x12Xprojects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}\xea\x41~\n-bigtableadmin.googleapis.com/MaterializedView\x12Mprojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb index 8592e905a84a..e916dbc07482 100644 --- a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb +++ b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb @@ -321,12 +321,20 @@ def read_rows request, options = nil %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) header_params["table_name"] = request.table_name end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end if request.app_profile_id && !request.app_profile_id.empty? header_params["app_profile_id"] = request.app_profile_id end - if request.authorized_view_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}.match?(request.authorized_view_name) - header_params["authorized_view_name"] = request.authorized_view_name + if request.materialized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+)(?:/.*)?$}.match request.materialized_view_name + if regex_match + header_params["name"] = regex_match["name".to_s] + end end request_params_header = URI.encode_www_form header_params @@ -437,12 +445,20 @@ def sample_row_keys request, options = nil %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) header_params["table_name"] = request.table_name end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end if request.app_profile_id && !request.app_profile_id.empty? header_params["app_profile_id"] = request.app_profile_id end - if request.authorized_view_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}.match?(request.authorized_view_name) - header_params["authorized_view_name"] = request.authorized_view_name + if request.materialized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+)(?:/.*)?$}.match request.materialized_view_name + if regex_match + header_params["name"] = regex_match["name".to_s] + end end request_params_header = URI.encode_www_form header_params @@ -553,13 +569,15 @@ def mutate_row request, options = nil %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) header_params["table_name"] = request.table_name end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end if request.app_profile_id && !request.app_profile_id.empty? header_params["app_profile_id"] = request.app_profile_id end - if request.authorized_view_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}.match?(request.authorized_view_name) - header_params["authorized_view_name"] = request.authorized_view_name - end request_params_header = URI.encode_www_form header_params metadata[:"x-goog-request-params"] ||= request_params_header @@ -670,13 +688,15 @@ def mutate_rows request, options = nil %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) header_params["table_name"] = request.table_name end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end if request.app_profile_id && !request.app_profile_id.empty? header_params["app_profile_id"] = request.app_profile_id end - if request.authorized_view_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}.match?(request.authorized_view_name) - header_params["authorized_view_name"] = request.authorized_view_name - end request_params_header = URI.encode_www_form header_params metadata[:"x-goog-request-params"] ||= request_params_header @@ -796,13 +816,15 @@ def check_and_mutate_row request, options = nil %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) header_params["table_name"] = request.table_name end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end if request.app_profile_id && !request.app_profile_id.empty? header_params["app_profile_id"] = request.app_profile_id end - if request.authorized_view_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}.match?(request.authorized_view_name) - header_params["authorized_view_name"] = request.authorized_view_name - end request_params_header = URI.encode_www_form header_params metadata[:"x-goog-request-params"] ||= request_params_header @@ -1009,13 +1031,15 @@ def read_modify_write_row request, options = nil %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) header_params["table_name"] = request.table_name end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end if request.app_profile_id && !request.app_profile_id.empty? header_params["app_profile_id"] = request.app_profile_id end - if request.authorized_view_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}.match?(request.authorized_view_name) - header_params["authorized_view_name"] = request.authorized_view_name - end request_params_header = URI.encode_www_form header_params metadata[:"x-goog-request-params"] ||= request_params_header From 4293e176ca46730d7cfc499a72783ee1e174200a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:03:12 -0700 Subject: [PATCH 398/457] chore(main): release google-cloud-support-v2beta 0.2.0 (#30821) --- .release-please-manifest.json | 2 +- google-cloud-support-v2beta/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/support/v2beta/version.rb | 2 +- .../snippet_metadata_google.cloud.support.v2beta.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1e3cb6f62317..48f1534a5fb7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -757,7 +757,7 @@ "google-cloud-support+FILLER": "0.0.0", "google-cloud-support-v2": "1.4.1", "google-cloud-support-v2+FILLER": "0.0.0", - "google-cloud-support-v2beta": "0.1.1", + "google-cloud-support-v2beta": "0.2.0", "google-cloud-support-v2beta+FILLER": "0.0.0", "google-cloud-talent": "2.0.2", "google-cloud-talent+FILLER": "0.0.0", diff --git a/google-cloud-support-v2beta/CHANGELOG.md b/google-cloud-support-v2beta/CHANGELOG.md index 2c7ae2ceb502..eddde2d17ef9 100644 --- a/google-cloud-support-v2beta/CHANGELOG.md +++ b/google-cloud-support-v2beta/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.2.0 (2025-08-12) + +#### Features + +* A new message `GetAttachmentRequest` and `GetComment` is added ([#30806](https://github.com/googleapis/google-cloud-ruby/issues/30806)) + ### 0.1.1 (2025-05-27) #### Documentation diff --git a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/version.rb b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/version.rb index dcef78e77fe0..a0fbc57e33d8 100644 --- a/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/version.rb +++ b/google-cloud-support-v2beta/lib/google/cloud/support/v2beta/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Support module V2beta - VERSION = "0.1.1" + VERSION = "0.2.0" end end end diff --git a/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json b/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json index 7aea90458c04..7fb4c63b6ae6 100644 --- a/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json +++ b/google-cloud-support-v2beta/snippets/snippet_metadata_google.cloud.support.v2beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-support-v2beta", - "version": "0.1.1", + "version": "0.2.0", "language": "RUBY", "apis": [ { From 7bb560fc4bfbaca7c139fc6ddce23a5c193d243f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:03:41 -0700 Subject: [PATCH 399/457] chore(main): release google-cloud-os_config-v1 1.4.0 (#30820) --- .release-please-manifest.json | 2 +- google-cloud-os_config-v1/CHANGELOG.md | 9 +++++++++ .../lib/google/cloud/os_config/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.osconfig.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 48f1534a5fb7..4fba35664fcc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -561,7 +561,7 @@ "google-cloud-org_policy-v2+FILLER": "0.0.0", "google-cloud-os_config": "1.7.1", "google-cloud-os_config+FILLER": "0.0.0", - "google-cloud-os_config-v1": "1.3.0", + "google-cloud-os_config-v1": "1.4.0", "google-cloud-os_config-v1+FILLER": "0.0.0", "google-cloud-os_config-v1alpha": "0.12.0", "google-cloud-os_config-v1alpha+FILLER": "0.0.0", diff --git a/google-cloud-os_config-v1/CHANGELOG.md b/google-cloud-os_config-v1/CHANGELOG.md index 006c5fdfb67a..03524ae0af6d 100644 --- a/google-cloud-os_config-v1/CHANGELOG.md +++ b/google-cloud-os_config-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +### 1.4.0 (2025-08-12) + +#### Features + +* Add highest_upgradable_cve_severity field to Vulnerability report ([#30807](https://github.com/googleapis/google-cloud-ruby/issues/30807)) +#### Documentation + +* A comment for field `update_time` in message `.google.cloud.osconfig.v1.VulnerabilityReport` is changed + ### 1.3.0 (2025-05-12) #### Features diff --git a/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/version.rb b/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/version.rb index abcbe526cd1e..d7e81f10f598 100644 --- a/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/version.rb +++ b/google-cloud-os_config-v1/lib/google/cloud/os_config/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module OsConfig module V1 - VERSION = "1.3.0" + VERSION = "1.4.0" end end end diff --git a/google-cloud-os_config-v1/snippets/snippet_metadata_google.cloud.osconfig.v1.json b/google-cloud-os_config-v1/snippets/snippet_metadata_google.cloud.osconfig.v1.json index 0003b4eb4c5a..23ed259677be 100644 --- a/google-cloud-os_config-v1/snippets/snippet_metadata_google.cloud.osconfig.v1.json +++ b/google-cloud-os_config-v1/snippets/snippet_metadata_google.cloud.osconfig.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-os_config-v1", - "version": "1.3.0", + "version": "1.4.0", "language": "RUBY", "apis": [ { From f6081338b68b3b64cc0c3afc7ae81df0b16de2a4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:04:09 -0700 Subject: [PATCH 400/457] chore(main): release google-cloud-network_management-v1 2.3.0 (#30819) --- .release-please-manifest.json | 2 +- google-cloud-network_management-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/network_management/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.networkmanagement.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4fba35664fcc..4e116454a02f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -525,7 +525,7 @@ "google-cloud-network_connectivity-v1alpha1+FILLER": "0.0.0", "google-cloud-network_management": "2.0.1", "google-cloud-network_management+FILLER": "0.0.0", - "google-cloud-network_management-v1": "2.2.0", + "google-cloud-network_management-v1": "2.3.0", "google-cloud-network_management-v1+FILLER": "0.0.0", "google-cloud-network_security": "1.1.1", "google-cloud-network_security+FILLER": "0.0.0", diff --git a/google-cloud-network_management-v1/CHANGELOG.md b/google-cloud-network_management-v1/CHANGELOG.md index 2aa881c88a62..45b854108fd8 100644 --- a/google-cloud-network_management-v1/CHANGELOG.md +++ b/google-cloud-network_management-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.3.0 (2025-08-12) + +#### Features + +* add `service_uri` field to CloudRunRevisionEndpoint ([#30810](https://github.com/googleapis/google-cloud-ruby/issues/30810)) + ### 2.2.0 (2025-05-12) #### Features diff --git a/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb b/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb index a4dd59995d71..131dc960b28e 100644 --- a/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb +++ b/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module NetworkManagement module V1 - VERSION = "2.2.0" + VERSION = "2.3.0" end end end diff --git a/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json b/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json index d20553f93d5e..36caf08ece22 100644 --- a/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json +++ b/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-network_management-v1", - "version": "2.2.0", + "version": "2.3.0", "language": "RUBY", "apis": [ { From b9ddfa23afb5e5b18c9c73fe2e0b462ca8f4493f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:04:43 -0700 Subject: [PATCH 401/457] chore(main): release google-cloud-pubsub 3.0.2 (#30809) --- .release-please-manifest.json | 2 +- google-cloud-pubsub/CHANGELOG.md | 9 +++++++++ google-cloud-pubsub/lib/google/cloud/pubsub/version.rb | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4e116454a02f..8f31c968519a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -607,7 +607,7 @@ "google-cloud-profiler+FILLER": "0.0.0", "google-cloud-profiler-v2": "1.3.0", "google-cloud-profiler-v2+FILLER": "0.0.0", - "google-cloud-pubsub": "3.0.1", + "google-cloud-pubsub": "3.0.2", "google-cloud-pubsub+FILLER": "0.0.0", "google-cloud-pubsub-v1": "1.11.1", "google-cloud-pubsub-v1+FILLER": "0.0.0", diff --git a/google-cloud-pubsub/CHANGELOG.md b/google-cloud-pubsub/CHANGELOG.md index 53e859473cb6..db98b4ff2f50 100644 --- a/google-cloud-pubsub/CHANGELOG.md +++ b/google-cloud-pubsub/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +### 3.0.2 (2025-08-12) + +#### Bug Fixes + +* Initialize topic_admin by default for the IAM client ([#30780](https://github.com/googleapis/google-cloud-ruby/issues/30780)) +#### Documentation + +* Fix subscriber snippet in OVERVIEW.md ([#30813](https://github.com/googleapis/google-cloud-ruby/issues/30813)) + ### 3.0.1 (2025-08-07) #### Documentation diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb index cd2f7dfc1019..8a941ad8ef9b 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module PubSub - VERSION = "3.0.1".freeze + VERSION = "3.0.2".freeze end Pubsub = PubSub unless const_defined? :Pubsub From a4da85fb8bffa80eb636f2d5daf05bc65b06049d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:05:19 -0700 Subject: [PATCH 402/457] chore(main): release google-cloud-datastream-v1 1.3.0 (#30818) --- .release-please-manifest.json | 2 +- google-cloud-datastream-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/datastream/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.datastream.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8f31c968519a..f42ca9458450 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -305,7 +305,7 @@ "google-cloud-datastore-v1+FILLER": "0.0.0", "google-cloud-datastream": "2.0.1", "google-cloud-datastream+FILLER": "0.0.0", - "google-cloud-datastream-v1": "1.2.1", + "google-cloud-datastream-v1": "1.3.0", "google-cloud-datastream-v1+FILLER": "0.0.0", "google-cloud-datastream-v1alpha1": "0.11.1", "google-cloud-datastream-v1alpha1+FILLER": "0.0.0", diff --git a/google-cloud-datastream-v1/CHANGELOG.md b/google-cloud-datastream-v1/CHANGELOG.md index 86a69241abeb..fa03eade595a 100644 --- a/google-cloud-datastream-v1/CHANGELOG.md +++ b/google-cloud-datastream-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 1.3.0 (2025-08-12) + +#### Features + +* Add new field `mongodb_cluster` to message `DiscoverConnectionProfileRequest` +* Add new field `salesforce_org` to message `DiscoverConnectionProfileRequest` ([#30799](https://github.com/googleapis/google-cloud-ruby/issues/30799)) + ### 1.2.1 (2025-07-15) #### Documentation diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/version.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/version.rb index 458cf59ff9be..e39395a922ab 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/version.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Datastream module V1 - VERSION = "1.2.1" + VERSION = "1.3.0" end end end diff --git a/google-cloud-datastream-v1/snippets/snippet_metadata_google.cloud.datastream.v1.json b/google-cloud-datastream-v1/snippets/snippet_metadata_google.cloud.datastream.v1.json index 83f1b1c95f69..d8cf9284bd0d 100644 --- a/google-cloud-datastream-v1/snippets/snippet_metadata_google.cloud.datastream.v1.json +++ b/google-cloud-datastream-v1/snippets/snippet_metadata_google.cloud.datastream.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-datastream-v1", - "version": "1.2.1", + "version": "1.3.0", "language": "RUBY", "apis": [ { From 41c44ed53b7e512a3861c6ae49b68ab42c8f1229 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:05:47 -0700 Subject: [PATCH 403/457] chore(main): release google-cloud-container_analysis 1.5.3 (#30817) --- .release-please-manifest.json | 2 +- google-cloud-container_analysis/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/container_analysis/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f42ca9458450..5ca520f84ce0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -249,7 +249,7 @@ "google-cloud-container-v1+FILLER": "0.0.0", "google-cloud-container-v1beta1": "0.48.0", "google-cloud-container-v1beta1+FILLER": "0.0.0", - "google-cloud-container_analysis": "1.5.2", + "google-cloud-container_analysis": "1.5.3", "google-cloud-container_analysis+FILLER": "0.0.0", "google-cloud-container_analysis-v1": "1.4.0", "google-cloud-container_analysis-v1+FILLER": "0.0.0", diff --git a/google-cloud-container_analysis/CHANGELOG.md b/google-cloud-container_analysis/CHANGELOG.md index 78b2631c677a..293226b716db 100644 --- a/google-cloud-container_analysis/CHANGELOG.md +++ b/google-cloud-container_analysis/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.5.3 (2025-08-12) + +#### Bug Fixes + +* Update google-cloud-pubsub dependency to v3.x ([#30814](https://github.com/googleapis/google-cloud-ruby/issues/30814)) + ### 1.5.2 (2025-05-27) #### Documentation diff --git a/google-cloud-container_analysis/lib/google/cloud/container_analysis/version.rb b/google-cloud-container_analysis/lib/google/cloud/container_analysis/version.rb index 0c4426833689..1d9bb63fc5ac 100644 --- a/google-cloud-container_analysis/lib/google/cloud/container_analysis/version.rb +++ b/google-cloud-container_analysis/lib/google/cloud/container_analysis/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module ContainerAnalysis - VERSION = "1.5.2" + VERSION = "1.5.3" end end end From a82eef33973d9a2315b2cba4cf98e351f0269fb8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:06:11 -0700 Subject: [PATCH 404/457] chore(main): release google-cloud-bigtable 2.12.1 (#30816) --- .release-please-manifest.json | 2 +- google-cloud-bigtable/CHANGELOG.md | 6 ++++++ google-cloud-bigtable/lib/google/cloud/bigtable/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5ca520f84ce0..c61545c58e06 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -163,7 +163,7 @@ "google-cloud-bigquery-storage+FILLER": "0.0.0", "google-cloud-bigquery-storage-v1": "1.4.0", "google-cloud-bigquery-storage-v1+FILLER": "0.0.0", - "google-cloud-bigtable": "2.12.0", + "google-cloud-bigtable": "2.12.1", "google-cloud-bigtable+FILLER": "0.0.0", "google-cloud-bigtable-admin-v2": "1.12.0", "google-cloud-bigtable-admin-v2+FILLER": "0.0.0", diff --git a/google-cloud-bigtable/CHANGELOG.md b/google-cloud-bigtable/CHANGELOG.md index dfa6762a0ea4..c9fd6ae57cfc 100644 --- a/google-cloud-bigtable/CHANGELOG.md +++ b/google-cloud-bigtable/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 2.12.1 (2025-08-12) + +#### Bug Fixes + +* Fix mutate rows logic to handle errors ([#30766](https://github.com/googleapis/google-cloud-ruby/issues/30766)) + ### 2.12.0 (2025-02-25) #### Features diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/version.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/version.rb index 836bbf6c93fd..9e6e6dd68835 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/version.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Bigtable - VERSION = "2.12.0".freeze + VERSION = "2.12.1".freeze end end end From fec04b31c3585c065d56e80bab13aacc54308f52 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:08:31 -0700 Subject: [PATCH 405/457] chore(main): release google-apps-chat-v1 0.14.0 (#30815) --- .release-please-manifest.json | 2 +- google-apps-chat-v1/CHANGELOG.md | 9 +++++++++ google-apps-chat-v1/lib/google/apps/chat/v1/version.rb | 2 +- .../snippets/snippet_metadata_google.chat.v1.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c61545c58e06..993c64e4ce7d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -17,7 +17,7 @@ "google-analytics-data-v1beta+FILLER": "0.0.0", "google-apps-chat": "1.1.1", "google-apps-chat+FILLER": "0.0.0", - "google-apps-chat-v1": "0.13.0", + "google-apps-chat-v1": "0.14.0", "google-apps-chat-v1+FILLER": "0.0.0", "google-apps-events-subscriptions": "1.1.1", "google-apps-events-subscriptions+FILLER": "0.0.0", diff --git a/google-apps-chat-v1/CHANGELOG.md b/google-apps-chat-v1/CHANGELOG.md index f25f66217d22..8d4859d469fd 100644 --- a/google-apps-chat-v1/CHANGELOG.md +++ b/google-apps-chat-v1/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### 0.14.0 (2025-08-12) + +#### Features + +* Addition of app auth support for chat api ([#30748](https://github.com/googleapis/google-cloud-ruby/issues/30748)) +#### Documentation + +* Update reference documentation + ### 0.13.0 (2025-07-24) #### Features diff --git a/google-apps-chat-v1/lib/google/apps/chat/v1/version.rb b/google-apps-chat-v1/lib/google/apps/chat/v1/version.rb index e39ad79b5286..c4539f70574d 100644 --- a/google-apps-chat-v1/lib/google/apps/chat/v1/version.rb +++ b/google-apps-chat-v1/lib/google/apps/chat/v1/version.rb @@ -21,7 +21,7 @@ module Google module Apps module Chat module V1 - VERSION = "0.13.0" + VERSION = "0.14.0" end end end diff --git a/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json b/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json index 12b3dbf11d1d..4ba50896faa3 100644 --- a/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json +++ b/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-apps-chat-v1", - "version": "0.13.0", + "version": "0.14.0", "language": "RUBY", "apis": [ { From 5cbdc9d38472b582e61d557de6dd6bbcb6100f7f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:10:05 -0700 Subject: [PATCH 406/457] chore(main): release google-cloud-bigquery 1.53.0 (#30808) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-cloud-bigquery/CHANGELOG.md | 8 ++++++++ .../lib/google/cloud/bigquery/version.rb | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 993c64e4ce7d..5aa6f2d29904 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -127,7 +127,7 @@ "google-cloud-beyond_corp-app_gateways-v1+FILLER": "0.0.0", "google-cloud-beyond_corp-client_gateways-v1": "0.8.0", "google-cloud-beyond_corp-client_gateways-v1+FILLER": "0.0.0", - "google-cloud-bigquery": "1.52.1", + "google-cloud-bigquery": "1.53.0", "google-cloud-bigquery+FILLER": "0.0.0", "google-cloud-bigquery-analytics_hub": "1.3.1", "google-cloud-bigquery-analytics_hub+FILLER": "0.0.0", diff --git a/google-cloud-bigquery/CHANGELOG.md b/google-cloud-bigquery/CHANGELOG.md index 6f543554b8a8..0942eac85461 100644 --- a/google-cloud-bigquery/CHANGELOG.md +++ b/google-cloud-bigquery/CHANGELOG.md @@ -1,5 +1,13 @@ # Release History +### 1.53.0 (2025-08-12) + +#### Features + +* add data governance type to routine ([#30732](https://github.com/googleapis/google-cloud-ruby/issues/30732)) +* Add table resource tags support ([#30804](https://github.com/googleapis/google-cloud-ruby/issues/30804)) +* Support for using Faraday for HTTP requests ([#30760](https://github.com/googleapis/google-cloud-ruby/issues/30760)) + ### 1.52.1 (2025-04-25) #### Documentation diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/version.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/version.rb index 7ff4016964bd..6cbda3db6de9 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/version.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Bigquery - VERSION = "1.52.1".freeze + VERSION = "1.53.0".freeze end end end From 4e0b1fcb59147535867a86fccf888ea593446549 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:42:11 -0700 Subject: [PATCH 407/457] feat: Initial generation of google-cloud-config_delivery-v1 (#30761) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + google-cloud-config_delivery-v1/.OwlBot.yaml | 3 + google-cloud-config_delivery-v1/.gitignore | 22 + .../.owlbot-manifest.json | 82 + .../.repo-metadata.json | 17 + google-cloud-config_delivery-v1/.rubocop.yml | 33 + google-cloud-config_delivery-v1/.toys.rb | 28 + google-cloud-config_delivery-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + google-cloud-config_delivery-v1/CHANGELOG.md | 2 + google-cloud-config_delivery-v1/Gemfile | 11 + google-cloud-config_delivery-v1/LICENSE.md | 201 + google-cloud-config_delivery-v1/README.md | 154 + google-cloud-config_delivery-v1/Rakefile | 169 + .../gapic_metadata.json | 143 + .../google-cloud-config_delivery-v1.gemspec | 29 + .../lib/google-cloud-config_delivery-v1.rb | 21 + .../lib/google/cloud/config_delivery/v1.rb | 45 + .../config_delivery/v1/bindings_override.rb | 102 + .../config_delivery/v1/config_delivery.rb | 57 + .../v1/config_delivery/client.rb | 3222 +++++++++++++++++ .../v1/config_delivery/credentials.rb | 47 + .../v1/config_delivery/operations.rb | 813 +++++ .../v1/config_delivery/paths.rb | 188 + .../v1/config_delivery/rest.rb | 55 + .../v1/config_delivery/rest/client.rb | 3029 ++++++++++++++++ .../v1/config_delivery/rest/operations.rb | 914 +++++ .../v1/config_delivery/rest/service_stub.rb | 1617 +++++++++ .../google/cloud/config_delivery/v1/rest.rb | 38 + .../cloud/config_delivery/v1/version.rb | 28 + .../configdelivery/v1/config_delivery_pb.rb | 115 + .../v1/config_delivery_services_pb.rb | 95 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../configdelivery/v1/config_delivery.rb | 1384 +++++++ .../google/longrunning/operations.rb | 173 + .../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/status.rb | 48 + .../snippets/Gemfile | 32 + .../snippets/config_delivery/abort_rollout.rb | 54 + .../config_delivery/create_fleet_package.rb | 54 + .../config_delivery/create_release.rb | 54 + .../config_delivery/create_resource_bundle.rb | 54 + .../config_delivery/create_variant.rb | 54 + .../config_delivery/delete_fleet_package.rb | 54 + .../config_delivery/delete_release.rb | 54 + .../config_delivery/delete_resource_bundle.rb | 54 + .../config_delivery/delete_variant.rb | 54 + .../config_delivery/get_fleet_package.rb | 47 + .../snippets/config_delivery/get_release.rb | 47 + .../config_delivery/get_resource_bundle.rb | 47 + .../snippets/config_delivery/get_rollout.rb | 47 + .../snippets/config_delivery/get_variant.rb | 47 + .../config_delivery/list_fleet_packages.rb | 51 + .../snippets/config_delivery/list_releases.rb | 51 + .../config_delivery/list_resource_bundles.rb | 51 + .../snippets/config_delivery/list_rollouts.rb | 51 + .../snippets/config_delivery/list_variants.rb | 51 + .../config_delivery/resume_rollout.rb | 54 + .../config_delivery/suspend_rollout.rb | 54 + .../config_delivery/update_fleet_package.rb | 54 + .../config_delivery/update_release.rb | 54 + .../config_delivery/update_resource_bundle.rb | 54 + .../config_delivery/update_variant.rb | 54 + ...tadata_google.cloud.configdelivery.v1.json | 1015 ++++++ .../v1/config_delivery_operations_test.rb | 398 ++ .../v1/config_delivery_paths_test.rb | 139 + .../v1/config_delivery_rest_test.rb | 1500 ++++++++ .../v1/config_delivery_test.rb | 1751 +++++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 79 files changed, 20766 insertions(+) create mode 100644 google-cloud-config_delivery-v1/.OwlBot.yaml create mode 100644 google-cloud-config_delivery-v1/.gitignore create mode 100644 google-cloud-config_delivery-v1/.owlbot-manifest.json create mode 100644 google-cloud-config_delivery-v1/.repo-metadata.json create mode 100644 google-cloud-config_delivery-v1/.rubocop.yml create mode 100644 google-cloud-config_delivery-v1/.toys.rb create mode 100644 google-cloud-config_delivery-v1/.yardopts create mode 100644 google-cloud-config_delivery-v1/AUTHENTICATION.md create mode 100644 google-cloud-config_delivery-v1/CHANGELOG.md create mode 100644 google-cloud-config_delivery-v1/Gemfile create mode 100644 google-cloud-config_delivery-v1/LICENSE.md create mode 100644 google-cloud-config_delivery-v1/README.md create mode 100644 google-cloud-config_delivery-v1/Rakefile create mode 100644 google-cloud-config_delivery-v1/gapic_metadata.json create mode 100644 google-cloud-config_delivery-v1/google-cloud-config_delivery-v1.gemspec create mode 100644 google-cloud-config_delivery-v1/lib/google-cloud-config_delivery-v1.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/bindings_override.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/client.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/credentials.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/operations.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/paths.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/client.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/operations.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/service_stub.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/rest.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/version.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/configdelivery/v1/config_delivery_pb.rb create mode 100644 google-cloud-config_delivery-v1/lib/google/cloud/configdelivery/v1/config_delivery_services_pb.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/README.md create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/api/client.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/api/field_info.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/api/resource.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/cloud/configdelivery/v1/config_delivery.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/longrunning/operations.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/protobuf/any.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 google-cloud-config_delivery-v1/proto_docs/google/rpc/status.rb create mode 100644 google-cloud-config_delivery-v1/snippets/Gemfile create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/abort_rollout.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/create_fleet_package.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/create_release.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/create_resource_bundle.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/create_variant.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/delete_fleet_package.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/delete_release.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/delete_resource_bundle.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/delete_variant.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/get_fleet_package.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/get_release.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/get_resource_bundle.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/get_rollout.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/get_variant.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/list_fleet_packages.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/list_releases.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/list_resource_bundles.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/list_rollouts.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/list_variants.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/resume_rollout.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/suspend_rollout.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/update_fleet_package.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/update_release.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/update_resource_bundle.rb create mode 100644 google-cloud-config_delivery-v1/snippets/config_delivery/update_variant.rb create mode 100644 google-cloud-config_delivery-v1/snippets/snippet_metadata_google.cloud.configdelivery.v1.json create mode 100644 google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_operations_test.rb create mode 100644 google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_paths_test.rb create mode 100644 google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_rest_test.rb create mode 100644 google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_test.rb create mode 100644 google-cloud-config_delivery-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5aa6f2d29904..a99f1cd05a6e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -231,6 +231,8 @@ "google-cloud-confidential_computing+FILLER": "0.0.0", "google-cloud-confidential_computing-v1": "1.6.1", "google-cloud-confidential_computing-v1+FILLER": "0.0.0", + "google-cloud-config_delivery-v1": "0.0.1", + "google-cloud-config_delivery-v1+FILLER": "0.0.0", "google-cloud-config_service": "2.0.1", "google-cloud-config_service+FILLER": "0.0.0", "google-cloud-config_service-v1": "2.2.0", diff --git a/google-cloud-config_delivery-v1/.OwlBot.yaml b/google-cloud-config_delivery-v1/.OwlBot.yaml new file mode 100644 index 000000000000..c2b9b39e97a2 --- /dev/null +++ b/google-cloud-config_delivery-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/cloud/configdelivery/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-cloud-config_delivery-v1/$1 diff --git a/google-cloud-config_delivery-v1/.gitignore b/google-cloud-config_delivery-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-cloud-config_delivery-v1/.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/google-cloud-config_delivery-v1/.owlbot-manifest.json b/google-cloud-config_delivery-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..815789f9263f --- /dev/null +++ b/google-cloud-config_delivery-v1/.owlbot-manifest.json @@ -0,0 +1,82 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-cloud-config_delivery-v1.gemspec", + "lib/google-cloud-config_delivery-v1.rb", + "lib/google/cloud/config_delivery/v1.rb", + "lib/google/cloud/config_delivery/v1/bindings_override.rb", + "lib/google/cloud/config_delivery/v1/config_delivery.rb", + "lib/google/cloud/config_delivery/v1/config_delivery/client.rb", + "lib/google/cloud/config_delivery/v1/config_delivery/credentials.rb", + "lib/google/cloud/config_delivery/v1/config_delivery/operations.rb", + "lib/google/cloud/config_delivery/v1/config_delivery/paths.rb", + "lib/google/cloud/config_delivery/v1/config_delivery/rest.rb", + "lib/google/cloud/config_delivery/v1/config_delivery/rest/client.rb", + "lib/google/cloud/config_delivery/v1/config_delivery/rest/operations.rb", + "lib/google/cloud/config_delivery/v1/config_delivery/rest/service_stub.rb", + "lib/google/cloud/config_delivery/v1/rest.rb", + "lib/google/cloud/config_delivery/v1/version.rb", + "lib/google/cloud/configdelivery/v1/config_delivery_pb.rb", + "lib/google/cloud/configdelivery/v1/config_delivery_services_pb.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/field_info.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/configdelivery/v1/config_delivery.rb", + "proto_docs/google/longrunning/operations.rb", + "proto_docs/google/protobuf/any.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", + "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/rpc/status.rb", + "snippets/Gemfile", + "snippets/config_delivery/abort_rollout.rb", + "snippets/config_delivery/create_fleet_package.rb", + "snippets/config_delivery/create_release.rb", + "snippets/config_delivery/create_resource_bundle.rb", + "snippets/config_delivery/create_variant.rb", + "snippets/config_delivery/delete_fleet_package.rb", + "snippets/config_delivery/delete_release.rb", + "snippets/config_delivery/delete_resource_bundle.rb", + "snippets/config_delivery/delete_variant.rb", + "snippets/config_delivery/get_fleet_package.rb", + "snippets/config_delivery/get_release.rb", + "snippets/config_delivery/get_resource_bundle.rb", + "snippets/config_delivery/get_rollout.rb", + "snippets/config_delivery/get_variant.rb", + "snippets/config_delivery/list_fleet_packages.rb", + "snippets/config_delivery/list_releases.rb", + "snippets/config_delivery/list_resource_bundles.rb", + "snippets/config_delivery/list_rollouts.rb", + "snippets/config_delivery/list_variants.rb", + "snippets/config_delivery/resume_rollout.rb", + "snippets/config_delivery/suspend_rollout.rb", + "snippets/config_delivery/update_fleet_package.rb", + "snippets/config_delivery/update_release.rb", + "snippets/config_delivery/update_resource_bundle.rb", + "snippets/config_delivery/update_variant.rb", + "snippets/snippet_metadata_google.cloud.configdelivery.v1.json", + "test/google/cloud/config_delivery/v1/config_delivery_operations_test.rb", + "test/google/cloud/config_delivery/v1/config_delivery_paths_test.rb", + "test/google/cloud/config_delivery/v1/config_delivery_rest_test.rb", + "test/google/cloud/config_delivery/v1/config_delivery_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-cloud-config_delivery-v1/.repo-metadata.json b/google-cloud-config_delivery-v1/.repo-metadata.json new file mode 100644 index 000000000000..d0b212787a57 --- /dev/null +++ b/google-cloud-config_delivery-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "configdelivery.googleapis.com", + "api_shortname": "configdelivery", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-config_delivery-v1/latest", + "distribution_name": "google-cloud-config_delivery-v1", + "is_cloud": true, + "language": "ruby", + "name": "configdelivery", + "name_pretty": "Config Delivery V1 API", + "product_documentation": "https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/concepts/fleet-packages", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "ConfigDelivery service manages the deployment of kubernetes configuration to a fleet of kubernetes clusters. Note that google-cloud-config_delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-config_delivery instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/concepts/fleet-packages", + "library_type": "GAPIC_AUTO" +} diff --git a/google-cloud-config_delivery-v1/.rubocop.yml b/google-cloud-config_delivery-v1/.rubocop.yml new file mode 100644 index 000000000000..6378a92c0636 --- /dev/null +++ b/google-cloud-config_delivery-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-config_delivery-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-config_delivery-v1.rb" diff --git a/google-cloud-config_delivery-v1/.toys.rb b/google-cloud-config_delivery-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-cloud-config_delivery-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/.yardopts b/google-cloud-config_delivery-v1/.yardopts new file mode 100644 index 000000000000..671575e939f2 --- /dev/null +++ b/google-cloud-config_delivery-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Config Delivery V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-cloud-config_delivery-v1/AUTHENTICATION.md b/google-cloud-config_delivery-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..8f40ba2195ee --- /dev/null +++ b/google-cloud-config_delivery-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-config_delivery-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-config_delivery-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/config_delivery/v1" + +client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/config_delivery/v1" + +::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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-config_delivery-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/config_delivery/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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/google-cloud-config_delivery-v1/CHANGELOG.md b/google-cloud-config_delivery-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-cloud-config_delivery-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-cloud-config_delivery-v1/Gemfile b/google-cloud-config_delivery-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-cloud-config_delivery-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-cloud-config_delivery-v1/LICENSE.md b/google-cloud-config_delivery-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-cloud-config_delivery-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-cloud-config_delivery-v1/README.md b/google-cloud-config_delivery-v1/README.md new file mode 100644 index 000000000000..c6123dea1dba --- /dev/null +++ b/google-cloud-config_delivery-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Config Delivery V1 API + +ConfigDelivery service manages the deployment of kubernetes configuration to a fleet of kubernetes clusters. + +ConfigDelivery service manages the deployment of kubernetes configuration to a fleet of kubernetes clusters. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Config Delivery V1 API. Most users should consider using +the main client gem, +[google-cloud-config_delivery](https://rubygems.org/gems/google-cloud-config_delivery). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-config_delivery-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/configdelivery.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/config_delivery/v1" + +client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new +request = ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new # (request fields as keyword arguments...) +response = client.list_resource_bundles request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-config_delivery-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/concepts/fleet-packages) +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/config_delivery/v1" +require "logger" + +client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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-config_delivery`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-config_delivery-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-config_delivery`. +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-config_delivery-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-cloud-config_delivery-v1/Rakefile b/google-cloud-config_delivery-v1/Rakefile new file mode 100644 index 000000000000..72eb1db13ee9 --- /dev/null +++ b/google-cloud-config_delivery-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-config_delivery-v1 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/config_delivery/v1/config_delivery/credentials" + ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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-config_delivery-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-config_delivery-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-config_delivery-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-config_delivery-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-config_delivery-v1" + header "google-cloud-config_delivery-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-config_delivery-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-config_delivery-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-config_delivery-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-config_delivery-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-cloud-config_delivery-v1/gapic_metadata.json b/google-cloud-config_delivery-v1/gapic_metadata.json new file mode 100644 index 000000000000..fbda6e85a74f --- /dev/null +++ b/google-cloud-config_delivery-v1/gapic_metadata.json @@ -0,0 +1,143 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.configdelivery.v1", + "libraryPackage": "::Google::Cloud::ConfigDelivery::V1", + "services": { + "ConfigDelivery": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client", + "rpcs": { + "ListResourceBundles": { + "methods": [ + "list_resource_bundles" + ] + }, + "GetResourceBundle": { + "methods": [ + "get_resource_bundle" + ] + }, + "CreateResourceBundle": { + "methods": [ + "create_resource_bundle" + ] + }, + "UpdateResourceBundle": { + "methods": [ + "update_resource_bundle" + ] + }, + "DeleteResourceBundle": { + "methods": [ + "delete_resource_bundle" + ] + }, + "ListFleetPackages": { + "methods": [ + "list_fleet_packages" + ] + }, + "GetFleetPackage": { + "methods": [ + "get_fleet_package" + ] + }, + "CreateFleetPackage": { + "methods": [ + "create_fleet_package" + ] + }, + "UpdateFleetPackage": { + "methods": [ + "update_fleet_package" + ] + }, + "DeleteFleetPackage": { + "methods": [ + "delete_fleet_package" + ] + }, + "ListReleases": { + "methods": [ + "list_releases" + ] + }, + "GetRelease": { + "methods": [ + "get_release" + ] + }, + "CreateRelease": { + "methods": [ + "create_release" + ] + }, + "UpdateRelease": { + "methods": [ + "update_release" + ] + }, + "DeleteRelease": { + "methods": [ + "delete_release" + ] + }, + "ListVariants": { + "methods": [ + "list_variants" + ] + }, + "GetVariant": { + "methods": [ + "get_variant" + ] + }, + "CreateVariant": { + "methods": [ + "create_variant" + ] + }, + "UpdateVariant": { + "methods": [ + "update_variant" + ] + }, + "DeleteVariant": { + "methods": [ + "delete_variant" + ] + }, + "ListRollouts": { + "methods": [ + "list_rollouts" + ] + }, + "GetRollout": { + "methods": [ + "get_rollout" + ] + }, + "SuspendRollout": { + "methods": [ + "suspend_rollout" + ] + }, + "ResumeRollout": { + "methods": [ + "resume_rollout" + ] + }, + "AbortRollout": { + "methods": [ + "abort_rollout" + ] + } + } + } + } + } + } +} diff --git a/google-cloud-config_delivery-v1/google-cloud-config_delivery-v1.gemspec b/google-cloud-config_delivery-v1/google-cloud-config_delivery-v1.gemspec new file mode 100644 index 000000000000..d32d6ffe934a --- /dev/null +++ b/google-cloud-config_delivery-v1/google-cloud-config_delivery-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/config_delivery/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-config_delivery-v1" + gem.version = Google::Cloud::ConfigDelivery::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "ConfigDelivery service manages the deployment of kubernetes configuration to a fleet of kubernetes clusters. Note that google-cloud-config_delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-config_delivery instead. See the readme for more details." + gem.summary = "ConfigDelivery service manages the deployment of kubernetes configuration to a fleet of kubernetes clusters." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/google-cloud-config_delivery-v1/lib/google-cloud-config_delivery-v1.rb b/google-cloud-config_delivery-v1/lib/google-cloud-config_delivery-v1.rb new file mode 100644 index 000000000000..be783aed4c66 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google-cloud-config_delivery-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config_delivery/v1" diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1.rb new file mode 100644 index 000000000000..03a08b3268da --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config_delivery/v1/config_delivery" +require "google/cloud/config_delivery/v1/version" + +module Google + module Cloud + module ConfigDelivery + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/config_delivery/v1" + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/config_delivery/v1" + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/config_delivery/v1/_helpers" if ::File.file? helper_path diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/bindings_override.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/bindings_override.rb new file mode 100644 index 000000000000..04627bbf382a --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/bindings_override.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" + +module Google + module Cloud + module ConfigDelivery + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/config_delivery/v1/rest" + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ConfigDelivery"] + 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 = Configuration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + + ## + # @private + # Configuration class for the google.cloud.configdelivery.v1 package. + # + # This class contains common configuration for all services + # of the google.cloud.configdelivery.v1 package. + # + # This configuration is for internal use of the client library classes, + # and it is not intended that the end-users will read or change it. + # + class Configuration + extend ::Gapic::Config + + # @private + # Overrides for http bindings for the RPC of the mixins for this package. + # Services in this package should use these when creating clients for the mixin services. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + end + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery.rb new file mode 100644 index 000000000000..e92420794170 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config_delivery/v1/version" + +require "google/cloud/config_delivery/v1/config_delivery/credentials" +require "google/cloud/config_delivery/v1/config_delivery/paths" +require "google/cloud/config_delivery/v1/config_delivery/operations" +require "google/cloud/config_delivery/v1/config_delivery/client" +require "google/cloud/config_delivery/v1/config_delivery/rest" + +module Google + module Cloud + module ConfigDelivery + module V1 + ## + # ConfigDelivery service manages the deployment of kubernetes configuration to + # a fleet of kubernetes clusters. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/config_delivery/v1/config_delivery" + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/config_delivery/v1/config_delivery/rest" + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + module ConfigDelivery + end + end + end + end +end + +helper_path = ::File.join __dir__, "config_delivery", "helpers.rb" +require "google/cloud/config_delivery/v1/config_delivery/helpers" if ::File.file? helper_path diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/client.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/client.rb new file mode 100644 index 000000000000..3e54cae63354 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/client.rb @@ -0,0 +1,3222 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/configdelivery/v1/config_delivery_pb" +require "google/cloud/location" + +module Google + module Cloud + module ConfigDelivery + module V1 + module ConfigDelivery + ## + # Client for the ConfigDelivery service. + # + # ConfigDelivery service manages the deployment of kubernetes configuration to + # a fleet of kubernetes clusters. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "configdelivery.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :config_delivery_stub + + ## + # Configure the ConfigDelivery Client class. + # + # See {::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConfigDelivery clients + # ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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", "ConfigDelivery", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_resource_bundles.timeout = 60.0 + default_config.rpcs.list_resource_bundles.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_resource_bundle.timeout = 60.0 + default_config.rpcs.get_resource_bundle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_resource_bundle.timeout = 60.0 + + default_config.rpcs.update_resource_bundle.timeout = 60.0 + + default_config.rpcs.delete_resource_bundle.timeout = 60.0 + + default_config.rpcs.list_fleet_packages.timeout = 60.0 + default_config.rpcs.list_fleet_packages.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_fleet_package.timeout = 60.0 + default_config.rpcs.get_fleet_package.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_fleet_package.timeout = 60.0 + + default_config.rpcs.update_fleet_package.timeout = 60.0 + + default_config.rpcs.delete_fleet_package.timeout = 60.0 + + default_config.rpcs.list_releases.timeout = 60.0 + default_config.rpcs.list_releases.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_release.timeout = 60.0 + default_config.rpcs.get_release.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_release.timeout = 60.0 + + default_config.rpcs.update_release.timeout = 60.0 + + default_config.rpcs.delete_release.timeout = 60.0 + + default_config.rpcs.list_variants.timeout = 60.0 + default_config.rpcs.list_variants.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_variant.timeout = 60.0 + default_config.rpcs.get_variant.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_variant.timeout = 60.0 + + default_config.rpcs.update_variant.timeout = 60.0 + + default_config.rpcs.delete_variant.timeout = 60.0 + + default_config.rpcs.list_rollouts.timeout = 60.0 + default_config.rpcs.list_rollouts.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_rollout.timeout = 60.0 + default_config.rpcs.get_rollout.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.suspend_rollout.timeout = 60.0 + + default_config.rpcs.resume_rollout.timeout = 60.0 + + default_config.rpcs.abort_rollout.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::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 + @config_delivery_stub.universe_domain + end + + ## + # Create a new ConfigDelivery client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConfigDelivery 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/configdelivery/v1/config_delivery_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @config_delivery_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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 + ) + + @config_delivery_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config_delivery_stub.endpoint + config.universe_domain = @config_delivery_stub.universe_domain + config.logger = @config_delivery_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @config_delivery_stub.logger + end + + # Service calls + + ## + # Lists ResourceBundles in a given project and location. + # + # @overload list_resource_bundles(request, options = nil) + # Pass arguments to `list_resource_bundles` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest, ::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_resource_bundles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_bundles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListResourceBundlesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::ResourceBundle>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::ResourceBundle>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new + # + # # Call the list_resource_bundles method. + # result = client.list_resource_bundles 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::ConfigDelivery::V1::ResourceBundle. + # p item + # end + # + def list_resource_bundles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest + + # 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_resource_bundles.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_resource_bundles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_bundles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :list_resource_bundles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_delivery_stub, :list_resource_bundles, 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 + + ## + # Gets details of a single ResourceBundle. + # + # @overload get_resource_bundle(request, options = nil) + # Pass arguments to `get_resource_bundle` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest, ::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_resource_bundle(name: nil) + # Pass arguments to `get_resource_bundle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ConfigDelivery::V1::ResourceBundle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest.new + # + # # Call the get_resource_bundle method. + # result = client.get_resource_bundle request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::ResourceBundle. + # p result + # + def get_resource_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest + + # 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_resource_bundle.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_resource_bundle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_resource_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :get_resource_bundle, 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 + + ## + # Creates a new ResourceBundle in a given project and location. + # + # @overload create_resource_bundle(request, options = nil) + # Pass arguments to `create_resource_bundle` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest, ::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_resource_bundle(parent: nil, resource_bundle_id: nil, resource_bundle: nil, request_id: nil) + # Pass arguments to `create_resource_bundle` 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. Value for parent. + # @param resource_bundle_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # resource_bundle_id from the method_signature of Create RPC + # @param resource_bundle [::Google::Cloud::ConfigDelivery::V1::ResourceBundle, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest.new + # + # # Call the create_resource_bundle method. + # result = client.create_resource_bundle request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_resource_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest + + # 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_resource_bundle.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_resource_bundle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_resource_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :create_resource_bundle, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single ResourceBundle. + # + # @overload update_resource_bundle(request, options = nil) + # Pass arguments to `update_resource_bundle` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest, ::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 update_resource_bundle(update_mask: nil, resource_bundle: nil, request_id: nil) + # Pass arguments to `update_resource_bundle` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # ResourceBundle resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param resource_bundle [::Google::Cloud::ConfigDelivery::V1::ResourceBundle, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest.new + # + # # Call the update_resource_bundle method. + # result = client.update_resource_bundle request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_resource_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest + + # 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.update_resource_bundle.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_bundle&.name + header_params["resource_bundle.name"] = request.resource_bundle.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.update_resource_bundle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_resource_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :update_resource_bundle, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 single ResourceBundle. + # + # @overload delete_resource_bundle(request, options = nil) + # Pass arguments to `delete_resource_bundle` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest, ::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_resource_bundle(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_resource_bundle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any releases of this resource bundle will also be + # deleted. (Otherwise, the request will only work if the resource bundle has + # no releases.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest.new + # + # # Call the delete_resource_bundle method. + # result = client.delete_resource_bundle request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_resource_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest + + # 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_resource_bundle.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_resource_bundle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_resource_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :delete_resource_bundle, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists FleetPackages in a given project and location. + # + # @overload list_fleet_packages(request, options = nil) + # Pass arguments to `list_fleet_packages` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest, ::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_fleet_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_fleet_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListFleetPackagesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::FleetPackage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::FleetPackage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest.new + # + # # Call the list_fleet_packages method. + # result = client.list_fleet_packages 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::ConfigDelivery::V1::FleetPackage. + # p item + # end + # + def list_fleet_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest + + # 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_fleet_packages.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_fleet_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_fleet_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :list_fleet_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_delivery_stub, :list_fleet_packages, 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 + + ## + # Gets details of a single FleetPackage. + # + # @overload get_fleet_package(request, options = nil) + # Pass arguments to `get_fleet_package` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest, ::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_fleet_package(name: nil) + # Pass arguments to `get_fleet_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ConfigDelivery::V1::FleetPackage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest.new + # + # # Call the get_fleet_package method. + # result = client.get_fleet_package request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::FleetPackage. + # p result + # + def get_fleet_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest + + # 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_fleet_package.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_fleet_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_fleet_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :get_fleet_package, 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 + + ## + # Creates a new FleetPackage in a given project and location. + # + # @overload create_fleet_package(request, options = nil) + # Pass arguments to `create_fleet_package` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest, ::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_fleet_package(parent: nil, fleet_package_id: nil, fleet_package: nil, request_id: nil) + # Pass arguments to `create_fleet_package` 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. Value for parent. + # @param fleet_package_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # fleet_package_id from the method_signature of Create RPC + # @param fleet_package [::Google::Cloud::ConfigDelivery::V1::FleetPackage, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest.new + # + # # Call the create_fleet_package method. + # result = client.create_fleet_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_fleet_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest + + # 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_fleet_package.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_fleet_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_fleet_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :create_fleet_package, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single FleetPackage. + # + # @overload update_fleet_package(request, options = nil) + # Pass arguments to `update_fleet_package` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest, ::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 update_fleet_package(update_mask: nil, fleet_package: nil, request_id: nil) + # Pass arguments to `update_fleet_package` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # FleetPackage resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param fleet_package [::Google::Cloud::ConfigDelivery::V1::FleetPackage, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest.new + # + # # Call the update_fleet_package method. + # result = client.update_fleet_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_fleet_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest + + # 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.update_fleet_package.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.fleet_package&.name + header_params["fleet_package.name"] = request.fleet_package.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.update_fleet_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_fleet_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :update_fleet_package, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 single FleetPackage. + # + # @overload delete_fleet_package(request, options = nil) + # Pass arguments to `delete_fleet_package` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest, ::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_fleet_package(name: nil, request_id: nil, force: nil, allow_missing: nil) + # Pass arguments to `delete_fleet_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any rollouts for this FleetPackage will also be + # deleted. (Otherwise, the request will only work if the fleet package has no + # rollouts.) + # @param allow_missing [::Boolean] + # Optional. If set to true, then deleting an already deleted or non existing + # FleetPackage will succeed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest.new + # + # # Call the delete_fleet_package method. + # result = client.delete_fleet_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_fleet_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest + + # 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_fleet_package.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_fleet_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_fleet_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :delete_fleet_package, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Releases in a given project and location. + # + # @overload list_releases(request, options = nil) + # Pass arguments to `list_releases` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest, ::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_releases(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_releases` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListReleasesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Release>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Release>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListReleasesRequest.new + # + # # Call the list_releases method. + # result = client.list_releases 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::ConfigDelivery::V1::Release. + # p item + # end + # + def list_releases request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest + + # 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_releases.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_releases.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_releases.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :list_releases, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_delivery_stub, :list_releases, 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 + + ## + # Gets details of a single Release. + # + # @overload get_release(request, options = nil) + # Pass arguments to `get_release` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest, ::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_release(name: nil) + # Pass arguments to `get_release` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ConfigDelivery::V1::Release] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Release] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetReleaseRequest.new + # + # # Call the get_release method. + # result = client.get_release request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Release. + # p result + # + def get_release request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest + + # 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_release.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_release.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_release.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :get_release, 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 + + ## + # Creates a new Release in a given project, location and resource bundle. + # + # @overload create_release(request, options = nil) + # Pass arguments to `create_release` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest, ::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_release(parent: nil, release_id: nil, release: nil, request_id: nil) + # Pass arguments to `create_release` 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. Value for parent. + # @param release_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # release_id from the method_signature of Create RPC + # @param release [::Google::Cloud::ConfigDelivery::V1::Release, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest.new + # + # # Call the create_release method. + # result = client.create_release request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_release request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest + + # 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_release.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_release.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_release.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :create_release, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Release. + # + # @overload update_release(request, options = nil) + # Pass arguments to `update_release` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest, ::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 update_release(update_mask: nil, release: nil, request_id: nil) + # Pass arguments to `update_release` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Release resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param release [::Google::Cloud::ConfigDelivery::V1::Release, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest.new + # + # # Call the update_release method. + # result = client.update_release request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_release request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest + + # 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.update_release.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.release&.name + header_params["release.name"] = request.release.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.update_release.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_release.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :update_release, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 single Release. + # + # @overload delete_release(request, options = nil) + # Pass arguments to `delete_release` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest, ::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_release(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_release` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any variants of this release will also be + # deleted. (Otherwise, the request will only work if the release has no + # variants.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest.new + # + # # Call the delete_release method. + # result = client.delete_release request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_release request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest + + # 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_release.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_release.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_release.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :delete_release, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Variants in a given project and location. + # + # @overload list_variants(request, options = nil) + # Pass arguments to `list_variants` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest, ::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_variants(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_variants` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListVariantsRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Variant>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Variant>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListVariantsRequest.new + # + # # Call the list_variants method. + # result = client.list_variants 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::ConfigDelivery::V1::Variant. + # p item + # end + # + def list_variants request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest + + # 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_variants.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_variants.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_variants.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :list_variants, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_delivery_stub, :list_variants, 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 + + ## + # Gets details of a single Variant. + # + # @overload get_variant(request, options = nil) + # Pass arguments to `get_variant` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetVariantRequest, ::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_variant(name: nil) + # Pass arguments to `get_variant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ConfigDelivery::V1::Variant] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Variant] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetVariantRequest.new + # + # # Call the get_variant method. + # result = client.get_variant request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Variant. + # p result + # + def get_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetVariantRequest + + # 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_variant.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_variant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :get_variant, 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 + + ## + # Creates a new Variant in a given project, location, resource bundle, and + # release. + # + # @overload create_variant(request, options = nil) + # Pass arguments to `create_variant` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest, ::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_variant(parent: nil, variant_id: nil, variant: nil, request_id: nil) + # Pass arguments to `create_variant` 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. Value for parent. + # @param variant_id [::String] + # Required. Id of the requesting object + # @param variant [::Google::Cloud::ConfigDelivery::V1::Variant, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::CreateVariantRequest.new + # + # # Call the create_variant method. + # result = client.create_variant request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest + + # 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_variant.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_variant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :create_variant, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Variant. + # + # @overload update_variant(request, options = nil) + # Pass arguments to `update_variant` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest, ::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 update_variant(update_mask: nil, variant: nil, request_id: nil) + # Pass arguments to `update_variant` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Variant resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param variant [::Google::Cloud::ConfigDelivery::V1::Variant, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest.new + # + # # Call the update_variant method. + # result = client.update_variant request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest + + # 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.update_variant.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.variant&.name + header_params["variant.name"] = request.variant.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.update_variant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :update_variant, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 single Variant. + # + # @overload delete_variant(request, options = nil) + # Pass arguments to `delete_variant` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest, ::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_variant(name: nil, request_id: nil) + # Pass arguments to `delete_variant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest.new + # + # # Call the delete_variant method. + # result = client.delete_variant request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest + + # 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_variant.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_variant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :delete_variant, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Rollouts in a given project, location, and Fleet Package. + # + # @overload list_rollouts(request, options = nil) + # Pass arguments to `list_rollouts` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest, ::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_rollouts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_rollouts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListRolloutsRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Rollout>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Rollout>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest.new + # + # # Call the list_rollouts method. + # result = client.list_rollouts 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::ConfigDelivery::V1::Rollout. + # p item + # end + # + def list_rollouts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest + + # 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_rollouts.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_rollouts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rollouts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :list_rollouts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_delivery_stub, :list_rollouts, 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 + + ## + # Gets details of a single Rollout. + # + # @overload get_rollout(request, options = nil) + # Pass arguments to `get_rollout` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest, ::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_rollout(name: nil) + # Pass arguments to `get_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ConfigDelivery::V1::Rollout] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Rollout] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetRolloutRequest.new + # + # # Call the get_rollout method. + # result = client.get_rollout request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Rollout. + # p result + # + def get_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest + + # 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_rollout.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_rollout.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :get_rollout, 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 + + ## + # Suspend a Rollout. + # + # @overload suspend_rollout(request, options = nil) + # Pass arguments to `suspend_rollout` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest, ::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 suspend_rollout(name: nil, reason: nil) + # Pass arguments to `suspend_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the Rollout. + # @param reason [::String] + # Optional. Reason for suspension. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest.new + # + # # Call the suspend_rollout method. + # result = client.suspend_rollout request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def suspend_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest + + # 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.suspend_rollout.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.suspend_rollout.timeout, + metadata: metadata, + retry_policy: @config.rpcs.suspend_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :suspend_rollout, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resume a Rollout. + # + # @overload resume_rollout(request, options = nil) + # Pass arguments to `resume_rollout` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest, ::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 resume_rollout(name: nil, reason: nil) + # Pass arguments to `resume_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the Rollout. + # @param reason [::String] + # Optional. Reason for resuming the rollout. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest.new + # + # # Call the resume_rollout method. + # result = client.resume_rollout request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resume_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest + + # 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.resume_rollout.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resume_rollout.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resume_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :resume_rollout, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Abort a Rollout. + # + # @overload abort_rollout(request, options = nil) + # Pass arguments to `abort_rollout` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest, ::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 abort_rollout(name: nil, reason: nil) + # Pass arguments to `abort_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the Rollout. + # @param reason [::String] + # Optional. Reason for aborting. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest.new + # + # # Call the abort_rollout method. + # result = client.abort_rollout request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def abort_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest + + # 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.abort_rollout.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.abort_rollout.timeout, + metadata: metadata, + retry_policy: @config.rpcs.abort_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.call_rpc :abort_rollout, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 ConfigDelivery API. + # + # This class represents the configuration for ConfigDelivery, + # 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::ConfigDelivery::V1::ConfigDelivery::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 + # # list_resource_bundles to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_bundles.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_bundles.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "configdelivery.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 ConfigDelivery 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 `list_resource_bundles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_bundles + ## + # RPC-specific configuration for `get_resource_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_bundle + ## + # RPC-specific configuration for `create_resource_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_resource_bundle + ## + # RPC-specific configuration for `update_resource_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_bundle + ## + # RPC-specific configuration for `delete_resource_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_bundle + ## + # RPC-specific configuration for `list_fleet_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_fleet_packages + ## + # RPC-specific configuration for `get_fleet_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_fleet_package + ## + # RPC-specific configuration for `create_fleet_package` + # @return [::Gapic::Config::Method] + # + attr_reader :create_fleet_package + ## + # RPC-specific configuration for `update_fleet_package` + # @return [::Gapic::Config::Method] + # + attr_reader :update_fleet_package + ## + # RPC-specific configuration for `delete_fleet_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_fleet_package + ## + # RPC-specific configuration for `list_releases` + # @return [::Gapic::Config::Method] + # + attr_reader :list_releases + ## + # RPC-specific configuration for `get_release` + # @return [::Gapic::Config::Method] + # + attr_reader :get_release + ## + # RPC-specific configuration for `create_release` + # @return [::Gapic::Config::Method] + # + attr_reader :create_release + ## + # RPC-specific configuration for `update_release` + # @return [::Gapic::Config::Method] + # + attr_reader :update_release + ## + # RPC-specific configuration for `delete_release` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_release + ## + # RPC-specific configuration for `list_variants` + # @return [::Gapic::Config::Method] + # + attr_reader :list_variants + ## + # RPC-specific configuration for `get_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :get_variant + ## + # RPC-specific configuration for `create_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :create_variant + ## + # RPC-specific configuration for `update_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :update_variant + ## + # RPC-specific configuration for `delete_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_variant + ## + # RPC-specific configuration for `list_rollouts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rollouts + ## + # RPC-specific configuration for `get_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rollout + ## + # RPC-specific configuration for `suspend_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :suspend_rollout + ## + # RPC-specific configuration for `resume_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :resume_rollout + ## + # RPC-specific configuration for `abort_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :abort_rollout + + # @private + def initialize parent_rpcs = nil + list_resource_bundles_config = parent_rpcs.list_resource_bundles if parent_rpcs.respond_to? :list_resource_bundles + @list_resource_bundles = ::Gapic::Config::Method.new list_resource_bundles_config + get_resource_bundle_config = parent_rpcs.get_resource_bundle if parent_rpcs.respond_to? :get_resource_bundle + @get_resource_bundle = ::Gapic::Config::Method.new get_resource_bundle_config + create_resource_bundle_config = parent_rpcs.create_resource_bundle if parent_rpcs.respond_to? :create_resource_bundle + @create_resource_bundle = ::Gapic::Config::Method.new create_resource_bundle_config + update_resource_bundle_config = parent_rpcs.update_resource_bundle if parent_rpcs.respond_to? :update_resource_bundle + @update_resource_bundle = ::Gapic::Config::Method.new update_resource_bundle_config + delete_resource_bundle_config = parent_rpcs.delete_resource_bundle if parent_rpcs.respond_to? :delete_resource_bundle + @delete_resource_bundle = ::Gapic::Config::Method.new delete_resource_bundle_config + list_fleet_packages_config = parent_rpcs.list_fleet_packages if parent_rpcs.respond_to? :list_fleet_packages + @list_fleet_packages = ::Gapic::Config::Method.new list_fleet_packages_config + get_fleet_package_config = parent_rpcs.get_fleet_package if parent_rpcs.respond_to? :get_fleet_package + @get_fleet_package = ::Gapic::Config::Method.new get_fleet_package_config + create_fleet_package_config = parent_rpcs.create_fleet_package if parent_rpcs.respond_to? :create_fleet_package + @create_fleet_package = ::Gapic::Config::Method.new create_fleet_package_config + update_fleet_package_config = parent_rpcs.update_fleet_package if parent_rpcs.respond_to? :update_fleet_package + @update_fleet_package = ::Gapic::Config::Method.new update_fleet_package_config + delete_fleet_package_config = parent_rpcs.delete_fleet_package if parent_rpcs.respond_to? :delete_fleet_package + @delete_fleet_package = ::Gapic::Config::Method.new delete_fleet_package_config + list_releases_config = parent_rpcs.list_releases if parent_rpcs.respond_to? :list_releases + @list_releases = ::Gapic::Config::Method.new list_releases_config + get_release_config = parent_rpcs.get_release if parent_rpcs.respond_to? :get_release + @get_release = ::Gapic::Config::Method.new get_release_config + create_release_config = parent_rpcs.create_release if parent_rpcs.respond_to? :create_release + @create_release = ::Gapic::Config::Method.new create_release_config + update_release_config = parent_rpcs.update_release if parent_rpcs.respond_to? :update_release + @update_release = ::Gapic::Config::Method.new update_release_config + delete_release_config = parent_rpcs.delete_release if parent_rpcs.respond_to? :delete_release + @delete_release = ::Gapic::Config::Method.new delete_release_config + list_variants_config = parent_rpcs.list_variants if parent_rpcs.respond_to? :list_variants + @list_variants = ::Gapic::Config::Method.new list_variants_config + get_variant_config = parent_rpcs.get_variant if parent_rpcs.respond_to? :get_variant + @get_variant = ::Gapic::Config::Method.new get_variant_config + create_variant_config = parent_rpcs.create_variant if parent_rpcs.respond_to? :create_variant + @create_variant = ::Gapic::Config::Method.new create_variant_config + update_variant_config = parent_rpcs.update_variant if parent_rpcs.respond_to? :update_variant + @update_variant = ::Gapic::Config::Method.new update_variant_config + delete_variant_config = parent_rpcs.delete_variant if parent_rpcs.respond_to? :delete_variant + @delete_variant = ::Gapic::Config::Method.new delete_variant_config + list_rollouts_config = parent_rpcs.list_rollouts if parent_rpcs.respond_to? :list_rollouts + @list_rollouts = ::Gapic::Config::Method.new list_rollouts_config + get_rollout_config = parent_rpcs.get_rollout if parent_rpcs.respond_to? :get_rollout + @get_rollout = ::Gapic::Config::Method.new get_rollout_config + suspend_rollout_config = parent_rpcs.suspend_rollout if parent_rpcs.respond_to? :suspend_rollout + @suspend_rollout = ::Gapic::Config::Method.new suspend_rollout_config + resume_rollout_config = parent_rpcs.resume_rollout if parent_rpcs.respond_to? :resume_rollout + @resume_rollout = ::Gapic::Config::Method.new resume_rollout_config + abort_rollout_config = parent_rpcs.abort_rollout if parent_rpcs.respond_to? :abort_rollout + @abort_rollout = ::Gapic::Config::Method.new abort_rollout_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/credentials.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/credentials.rb new file mode 100644 index 000000000000..2afa7c40eab0 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ConfigDelivery + module V1 + module ConfigDelivery + # Credentials for the ConfigDelivery 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 diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/operations.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/operations.rb new file mode 100644 index 000000000000..8c9531da3478 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/operations.rb @@ -0,0 +1,813 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module ConfigDelivery + module V1 + module ConfigDelivery + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "configdelivery.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ConfigDelivery Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ConfigDelivery Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::ConfigDelivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "configdelivery.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/paths.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/paths.rb new file mode 100644 index 000000000000..7bfbb4c79e77 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/paths.rb @@ -0,0 +1,188 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ConfigDelivery + module V1 + module ConfigDelivery + # Path helper methods for the ConfigDelivery API. + module Paths + ## + # Create a fully-qualified FleetPackage resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/fleetPackages/{fleet_package}` + # + # @param project [String] + # @param location [String] + # @param fleet_package [String] + # + # @return [::String] + def fleet_package_path project:, location:, fleet_package: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/fleetPackages/#{fleet_package}" + end + + ## + # 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 Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Release resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}` + # + # @param project [String] + # @param location [String] + # @param resource_bundle [String] + # @param release [String] + # + # @return [::String] + def release_path project:, location:, resource_bundle:, release: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "resource_bundle cannot contain /" if resource_bundle.to_s.include? "/" + + "projects/#{project}/locations/#{location}/resourceBundles/#{resource_bundle}/releases/#{release}" + end + + ## + # Create a fully-qualified Repository resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # @param repository [String] + # + # @return [::String] + def repository_path project:, location:, connection:, repository: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}/repositories/#{repository}" + end + + ## + # Create a fully-qualified ResourceBundle resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/resourceBundles/{resource_bundle}` + # + # @param project [String] + # @param location [String] + # @param resource_bundle [String] + # + # @return [::String] + def resource_bundle_path project:, location:, resource_bundle: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/resourceBundles/#{resource_bundle}" + end + + ## + # Create a fully-qualified Rollout resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/fleetPackages/{fleet_package}/rollouts/{rollout}` + # + # @param project [String] + # @param location [String] + # @param fleet_package [String] + # @param rollout [String] + # + # @return [::String] + def rollout_path project:, location:, fleet_package:, rollout: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "fleet_package cannot contain /" if fleet_package.to_s.include? "/" + + "projects/#{project}/locations/#{location}/fleetPackages/#{fleet_package}/rollouts/#{rollout}" + end + + ## + # Create a fully-qualified Variant resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}` + # + # @param project [String] + # @param location [String] + # @param resource_bundle [String] + # @param release [String] + # @param variant [String] + # + # @return [::String] + def variant_path project:, location:, resource_bundle:, release:, variant: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "resource_bundle cannot contain /" if resource_bundle.to_s.include? "/" + raise ::ArgumentError, "release cannot contain /" if release.to_s.include? "/" + + "projects/#{project}/locations/#{location}/resourceBundles/#{resource_bundle}/releases/#{release}/variants/#{variant}" + end + + extend self + end + end + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest.rb new file mode 100644 index 000000000000..88b6d64d47c1 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config_delivery/v1/version" +require "google/cloud/config_delivery/v1/bindings_override" + +require "google/cloud/config_delivery/v1/config_delivery/credentials" +require "google/cloud/config_delivery/v1/config_delivery/paths" +require "google/cloud/config_delivery/v1/config_delivery/rest/operations" +require "google/cloud/config_delivery/v1/config_delivery/rest/client" + +module Google + module Cloud + module ConfigDelivery + module V1 + ## + # ConfigDelivery service manages the deployment of kubernetes configuration to + # a fleet of kubernetes clusters. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/config_delivery/v1/config_delivery/rest" + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + module ConfigDelivery + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/config_delivery/v1/config_delivery/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/client.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/client.rb new file mode 100644 index 000000000000..99e5bb78932c --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/client.rb @@ -0,0 +1,3029 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/configdelivery/v1/config_delivery_pb" +require "google/cloud/config_delivery/v1/config_delivery/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ConfigDelivery + module V1 + module ConfigDelivery + module Rest + ## + # REST client for the ConfigDelivery service. + # + # ConfigDelivery service manages the deployment of kubernetes configuration to + # a fleet of kubernetes clusters. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "configdelivery.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :config_delivery_stub + + ## + # Configure the ConfigDelivery Client class. + # + # See {::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConfigDelivery clients + # ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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", "ConfigDelivery", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_resource_bundles.timeout = 60.0 + default_config.rpcs.list_resource_bundles.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_resource_bundle.timeout = 60.0 + default_config.rpcs.get_resource_bundle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_resource_bundle.timeout = 60.0 + + default_config.rpcs.update_resource_bundle.timeout = 60.0 + + default_config.rpcs.delete_resource_bundle.timeout = 60.0 + + default_config.rpcs.list_fleet_packages.timeout = 60.0 + default_config.rpcs.list_fleet_packages.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_fleet_package.timeout = 60.0 + default_config.rpcs.get_fleet_package.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_fleet_package.timeout = 60.0 + + default_config.rpcs.update_fleet_package.timeout = 60.0 + + default_config.rpcs.delete_fleet_package.timeout = 60.0 + + default_config.rpcs.list_releases.timeout = 60.0 + default_config.rpcs.list_releases.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_release.timeout = 60.0 + default_config.rpcs.get_release.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_release.timeout = 60.0 + + default_config.rpcs.update_release.timeout = 60.0 + + default_config.rpcs.delete_release.timeout = 60.0 + + default_config.rpcs.list_variants.timeout = 60.0 + default_config.rpcs.list_variants.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_variant.timeout = 60.0 + default_config.rpcs.get_variant.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_variant.timeout = 60.0 + + default_config.rpcs.update_variant.timeout = 60.0 + + default_config.rpcs.delete_variant.timeout = 60.0 + + default_config.rpcs.list_rollouts.timeout = 60.0 + default_config.rpcs.list_rollouts.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_rollout.timeout = 60.0 + default_config.rpcs.get_rollout.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.suspend_rollout.timeout = 60.0 + + default_config.rpcs.resume_rollout.timeout = 60.0 + + default_config.rpcs.abort_rollout.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::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 + @config_delivery_stub.universe_domain + end + + ## + # Create a new ConfigDelivery REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConfigDelivery 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 + + @operations_client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @config_delivery_stub = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @config_delivery_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config_delivery_stub.endpoint + config.universe_domain = @config_delivery_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @config_delivery_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @config_delivery_stub.logger + end + + # Service calls + + ## + # Lists ResourceBundles in a given project and location. + # + # @overload list_resource_bundles(request, options = nil) + # Pass arguments to `list_resource_bundles` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest, ::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_resource_bundles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_bundles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListResourceBundlesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::ResourceBundle>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::ResourceBundle>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new + # + # # Call the list_resource_bundles method. + # result = client.list_resource_bundles 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::ConfigDelivery::V1::ResourceBundle. + # p item + # end + # + def list_resource_bundles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest + + # 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_resource_bundles.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::ConfigDelivery::V1::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_resource_bundles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_bundles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.list_resource_bundles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_resource_bundles, "resource_bundles", 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 + + ## + # Gets details of a single ResourceBundle. + # + # @overload get_resource_bundle(request, options = nil) + # Pass arguments to `get_resource_bundle` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest, ::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_resource_bundle(name: nil) + # Pass arguments to `get_resource_bundle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::ResourceBundle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest.new + # + # # Call the get_resource_bundle method. + # result = client.get_resource_bundle request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::ResourceBundle. + # p result + # + def get_resource_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest + + # 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_resource_bundle.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::ConfigDelivery::V1::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_resource_bundle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_resource_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.get_resource_bundle 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 + + ## + # Creates a new ResourceBundle in a given project and location. + # + # @overload create_resource_bundle(request, options = nil) + # Pass arguments to `create_resource_bundle` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest, ::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_resource_bundle(parent: nil, resource_bundle_id: nil, resource_bundle: nil, request_id: nil) + # Pass arguments to `create_resource_bundle` 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. Value for parent. + # @param resource_bundle_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # resource_bundle_id from the method_signature of Create RPC + # @param resource_bundle [::Google::Cloud::ConfigDelivery::V1::ResourceBundle, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest.new + # + # # Call the create_resource_bundle method. + # result = client.create_resource_bundle request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_resource_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest + + # 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_resource_bundle.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::ConfigDelivery::V1::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_resource_bundle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_resource_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.create_resource_bundle request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single ResourceBundle. + # + # @overload update_resource_bundle(request, options = nil) + # Pass arguments to `update_resource_bundle` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest, ::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 update_resource_bundle(update_mask: nil, resource_bundle: nil, request_id: nil) + # Pass arguments to `update_resource_bundle` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # ResourceBundle resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param resource_bundle [::Google::Cloud::ConfigDelivery::V1::ResourceBundle, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest.new + # + # # Call the update_resource_bundle method. + # result = client.update_resource_bundle request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_resource_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest + + # 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.update_resource_bundle.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::ConfigDelivery::V1::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.update_resource_bundle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_resource_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.update_resource_bundle request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single ResourceBundle. + # + # @overload delete_resource_bundle(request, options = nil) + # Pass arguments to `delete_resource_bundle` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest, ::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_resource_bundle(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_resource_bundle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any releases of this resource bundle will also be + # deleted. (Otherwise, the request will only work if the resource bundle has + # no releases.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest.new + # + # # Call the delete_resource_bundle method. + # result = client.delete_resource_bundle request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_resource_bundle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest + + # 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_resource_bundle.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::ConfigDelivery::V1::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_resource_bundle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_resource_bundle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.delete_resource_bundle request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists FleetPackages in a given project and location. + # + # @overload list_fleet_packages(request, options = nil) + # Pass arguments to `list_fleet_packages` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest, ::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_fleet_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_fleet_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListFleetPackagesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::FleetPackage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::FleetPackage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest.new + # + # # Call the list_fleet_packages method. + # result = client.list_fleet_packages 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::ConfigDelivery::V1::FleetPackage. + # p item + # end + # + def list_fleet_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest + + # 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_fleet_packages.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::ConfigDelivery::V1::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_fleet_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_fleet_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.list_fleet_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_fleet_packages, "fleet_packages", 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 + + ## + # Gets details of a single FleetPackage. + # + # @overload get_fleet_package(request, options = nil) + # Pass arguments to `get_fleet_package` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest, ::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_fleet_package(name: nil) + # Pass arguments to `get_fleet_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::FleetPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest.new + # + # # Call the get_fleet_package method. + # result = client.get_fleet_package request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::FleetPackage. + # p result + # + def get_fleet_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest + + # 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_fleet_package.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::ConfigDelivery::V1::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_fleet_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_fleet_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.get_fleet_package 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 + + ## + # Creates a new FleetPackage in a given project and location. + # + # @overload create_fleet_package(request, options = nil) + # Pass arguments to `create_fleet_package` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest, ::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_fleet_package(parent: nil, fleet_package_id: nil, fleet_package: nil, request_id: nil) + # Pass arguments to `create_fleet_package` 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. Value for parent. + # @param fleet_package_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # fleet_package_id from the method_signature of Create RPC + # @param fleet_package [::Google::Cloud::ConfigDelivery::V1::FleetPackage, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest.new + # + # # Call the create_fleet_package method. + # result = client.create_fleet_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_fleet_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest + + # 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_fleet_package.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::ConfigDelivery::V1::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_fleet_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_fleet_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.create_fleet_package request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single FleetPackage. + # + # @overload update_fleet_package(request, options = nil) + # Pass arguments to `update_fleet_package` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest, ::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 update_fleet_package(update_mask: nil, fleet_package: nil, request_id: nil) + # Pass arguments to `update_fleet_package` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # FleetPackage resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param fleet_package [::Google::Cloud::ConfigDelivery::V1::FleetPackage, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest.new + # + # # Call the update_fleet_package method. + # result = client.update_fleet_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_fleet_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest + + # 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.update_fleet_package.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::ConfigDelivery::V1::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.update_fleet_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_fleet_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.update_fleet_package request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single FleetPackage. + # + # @overload delete_fleet_package(request, options = nil) + # Pass arguments to `delete_fleet_package` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest, ::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_fleet_package(name: nil, request_id: nil, force: nil, allow_missing: nil) + # Pass arguments to `delete_fleet_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any rollouts for this FleetPackage will also be + # deleted. (Otherwise, the request will only work if the fleet package has no + # rollouts.) + # @param allow_missing [::Boolean] + # Optional. If set to true, then deleting an already deleted or non existing + # FleetPackage will succeed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest.new + # + # # Call the delete_fleet_package method. + # result = client.delete_fleet_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_fleet_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest + + # 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_fleet_package.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::ConfigDelivery::V1::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_fleet_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_fleet_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.delete_fleet_package request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Releases in a given project and location. + # + # @overload list_releases(request, options = nil) + # Pass arguments to `list_releases` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest, ::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_releases(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_releases` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListReleasesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Release>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Release>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListReleasesRequest.new + # + # # Call the list_releases method. + # result = client.list_releases 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::ConfigDelivery::V1::Release. + # p item + # end + # + def list_releases request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest + + # 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_releases.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::ConfigDelivery::V1::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_releases.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_releases.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.list_releases request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_releases, "releases", 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 + + ## + # Gets details of a single Release. + # + # @overload get_release(request, options = nil) + # Pass arguments to `get_release` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest, ::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_release(name: nil) + # Pass arguments to `get_release` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::Release] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Release] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetReleaseRequest.new + # + # # Call the get_release method. + # result = client.get_release request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Release. + # p result + # + def get_release request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest + + # 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_release.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::ConfigDelivery::V1::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_release.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_release.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.get_release 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 + + ## + # Creates a new Release in a given project, location and resource bundle. + # + # @overload create_release(request, options = nil) + # Pass arguments to `create_release` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest, ::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_release(parent: nil, release_id: nil, release: nil, request_id: nil) + # Pass arguments to `create_release` 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. Value for parent. + # @param release_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # release_id from the method_signature of Create RPC + # @param release [::Google::Cloud::ConfigDelivery::V1::Release, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest.new + # + # # Call the create_release method. + # result = client.create_release request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_release request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest + + # 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_release.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::ConfigDelivery::V1::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_release.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_release.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.create_release request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Release. + # + # @overload update_release(request, options = nil) + # Pass arguments to `update_release` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest, ::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 update_release(update_mask: nil, release: nil, request_id: nil) + # Pass arguments to `update_release` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Release resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param release [::Google::Cloud::ConfigDelivery::V1::Release, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest.new + # + # # Call the update_release method. + # result = client.update_release request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_release request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest + + # 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.update_release.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::ConfigDelivery::V1::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.update_release.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_release.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.update_release request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single Release. + # + # @overload delete_release(request, options = nil) + # Pass arguments to `delete_release` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest, ::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_release(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_release` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any variants of this release will also be + # deleted. (Otherwise, the request will only work if the release has no + # variants.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest.new + # + # # Call the delete_release method. + # result = client.delete_release request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_release request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest + + # 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_release.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::ConfigDelivery::V1::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_release.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_release.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.delete_release request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Variants in a given project and location. + # + # @overload list_variants(request, options = nil) + # Pass arguments to `list_variants` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest, ::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_variants(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_variants` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListVariantsRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Variant>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Variant>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListVariantsRequest.new + # + # # Call the list_variants method. + # result = client.list_variants 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::ConfigDelivery::V1::Variant. + # p item + # end + # + def list_variants request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest + + # 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_variants.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::ConfigDelivery::V1::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_variants.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_variants.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.list_variants request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_variants, "variants", 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 + + ## + # Gets details of a single Variant. + # + # @overload get_variant(request, options = nil) + # Pass arguments to `get_variant` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetVariantRequest, ::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_variant(name: nil) + # Pass arguments to `get_variant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::Variant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Variant] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetVariantRequest.new + # + # # Call the get_variant method. + # result = client.get_variant request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Variant. + # p result + # + def get_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetVariantRequest + + # 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_variant.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::ConfigDelivery::V1::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_variant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.get_variant 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 + + ## + # Creates a new Variant in a given project, location, resource bundle, and + # release. + # + # @overload create_variant(request, options = nil) + # Pass arguments to `create_variant` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest, ::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_variant(parent: nil, variant_id: nil, variant: nil, request_id: nil) + # Pass arguments to `create_variant` 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. Value for parent. + # @param variant_id [::String] + # Required. Id of the requesting object + # @param variant [::Google::Cloud::ConfigDelivery::V1::Variant, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::CreateVariantRequest.new + # + # # Call the create_variant method. + # result = client.create_variant request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest + + # 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_variant.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::ConfigDelivery::V1::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_variant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.create_variant request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Variant. + # + # @overload update_variant(request, options = nil) + # Pass arguments to `update_variant` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest, ::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 update_variant(update_mask: nil, variant: nil, request_id: nil) + # Pass arguments to `update_variant` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Variant resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param variant [::Google::Cloud::ConfigDelivery::V1::Variant, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest.new + # + # # Call the update_variant method. + # result = client.update_variant request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest + + # 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.update_variant.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::ConfigDelivery::V1::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.update_variant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.update_variant request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single Variant. + # + # @overload delete_variant(request, options = nil) + # Pass arguments to `delete_variant` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest, ::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_variant(name: nil, request_id: nil) + # Pass arguments to `delete_variant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest.new + # + # # Call the delete_variant method. + # result = client.delete_variant request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest + + # 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_variant.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::ConfigDelivery::V1::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_variant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.delete_variant request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Rollouts in a given project, location, and Fleet Package. + # + # @overload list_rollouts(request, options = nil) + # Pass arguments to `list_rollouts` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest, ::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_rollouts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_rollouts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListRolloutsRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Rollout>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Rollout>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest.new + # + # # Call the list_rollouts method. + # result = client.list_rollouts 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::ConfigDelivery::V1::Rollout. + # p item + # end + # + def list_rollouts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest + + # 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_rollouts.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::ConfigDelivery::V1::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_rollouts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rollouts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.list_rollouts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_rollouts, "rollouts", 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 + + ## + # Gets details of a single Rollout. + # + # @overload get_rollout(request, options = nil) + # Pass arguments to `get_rollout` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest, ::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_rollout(name: nil) + # Pass arguments to `get_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::Rollout] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Rollout] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::GetRolloutRequest.new + # + # # Call the get_rollout method. + # result = client.get_rollout request + # + # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Rollout. + # p result + # + def get_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest + + # 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_rollout.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::ConfigDelivery::V1::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_rollout.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.get_rollout 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 + + ## + # Suspend a Rollout. + # + # @overload suspend_rollout(request, options = nil) + # Pass arguments to `suspend_rollout` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest, ::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 suspend_rollout(name: nil, reason: nil) + # Pass arguments to `suspend_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the Rollout. + # @param reason [::String] + # Optional. Reason for suspension. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest.new + # + # # Call the suspend_rollout method. + # result = client.suspend_rollout request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def suspend_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest + + # 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.suspend_rollout.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::ConfigDelivery::V1::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.suspend_rollout.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.suspend_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.suspend_rollout request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resume a Rollout. + # + # @overload resume_rollout(request, options = nil) + # Pass arguments to `resume_rollout` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest, ::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 resume_rollout(name: nil, reason: nil) + # Pass arguments to `resume_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the Rollout. + # @param reason [::String] + # Optional. Reason for resuming the rollout. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest.new + # + # # Call the resume_rollout method. + # result = client.resume_rollout request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resume_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest + + # 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.resume_rollout.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::ConfigDelivery::V1::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.resume_rollout.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resume_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.resume_rollout request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Abort a Rollout. + # + # @overload abort_rollout(request, options = nil) + # Pass arguments to `abort_rollout` via a request object, either of type + # {::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest, ::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 abort_rollout(name: nil, reason: nil) + # Pass arguments to `abort_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the Rollout. + # @param reason [::String] + # Optional. Reason for aborting. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/config_delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest.new + # + # # Call the abort_rollout method. + # result = client.abort_rollout request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def abort_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest + + # 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.abort_rollout.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::ConfigDelivery::V1::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.abort_rollout.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.abort_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_delivery_stub.abort_rollout request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 ConfigDelivery REST API. + # + # This class represents the configuration for ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::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 + # # list_resource_bundles to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_bundles.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_bundles.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 = "configdelivery.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, 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 ConfigDelivery 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 `list_resource_bundles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_bundles + ## + # RPC-specific configuration for `get_resource_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_bundle + ## + # RPC-specific configuration for `create_resource_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_resource_bundle + ## + # RPC-specific configuration for `update_resource_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_bundle + ## + # RPC-specific configuration for `delete_resource_bundle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_bundle + ## + # RPC-specific configuration for `list_fleet_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_fleet_packages + ## + # RPC-specific configuration for `get_fleet_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_fleet_package + ## + # RPC-specific configuration for `create_fleet_package` + # @return [::Gapic::Config::Method] + # + attr_reader :create_fleet_package + ## + # RPC-specific configuration for `update_fleet_package` + # @return [::Gapic::Config::Method] + # + attr_reader :update_fleet_package + ## + # RPC-specific configuration for `delete_fleet_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_fleet_package + ## + # RPC-specific configuration for `list_releases` + # @return [::Gapic::Config::Method] + # + attr_reader :list_releases + ## + # RPC-specific configuration for `get_release` + # @return [::Gapic::Config::Method] + # + attr_reader :get_release + ## + # RPC-specific configuration for `create_release` + # @return [::Gapic::Config::Method] + # + attr_reader :create_release + ## + # RPC-specific configuration for `update_release` + # @return [::Gapic::Config::Method] + # + attr_reader :update_release + ## + # RPC-specific configuration for `delete_release` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_release + ## + # RPC-specific configuration for `list_variants` + # @return [::Gapic::Config::Method] + # + attr_reader :list_variants + ## + # RPC-specific configuration for `get_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :get_variant + ## + # RPC-specific configuration for `create_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :create_variant + ## + # RPC-specific configuration for `update_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :update_variant + ## + # RPC-specific configuration for `delete_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_variant + ## + # RPC-specific configuration for `list_rollouts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rollouts + ## + # RPC-specific configuration for `get_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rollout + ## + # RPC-specific configuration for `suspend_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :suspend_rollout + ## + # RPC-specific configuration for `resume_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :resume_rollout + ## + # RPC-specific configuration for `abort_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :abort_rollout + + # @private + def initialize parent_rpcs = nil + list_resource_bundles_config = parent_rpcs.list_resource_bundles if parent_rpcs.respond_to? :list_resource_bundles + @list_resource_bundles = ::Gapic::Config::Method.new list_resource_bundles_config + get_resource_bundle_config = parent_rpcs.get_resource_bundle if parent_rpcs.respond_to? :get_resource_bundle + @get_resource_bundle = ::Gapic::Config::Method.new get_resource_bundle_config + create_resource_bundle_config = parent_rpcs.create_resource_bundle if parent_rpcs.respond_to? :create_resource_bundle + @create_resource_bundle = ::Gapic::Config::Method.new create_resource_bundle_config + update_resource_bundle_config = parent_rpcs.update_resource_bundle if parent_rpcs.respond_to? :update_resource_bundle + @update_resource_bundle = ::Gapic::Config::Method.new update_resource_bundle_config + delete_resource_bundle_config = parent_rpcs.delete_resource_bundle if parent_rpcs.respond_to? :delete_resource_bundle + @delete_resource_bundle = ::Gapic::Config::Method.new delete_resource_bundle_config + list_fleet_packages_config = parent_rpcs.list_fleet_packages if parent_rpcs.respond_to? :list_fleet_packages + @list_fleet_packages = ::Gapic::Config::Method.new list_fleet_packages_config + get_fleet_package_config = parent_rpcs.get_fleet_package if parent_rpcs.respond_to? :get_fleet_package + @get_fleet_package = ::Gapic::Config::Method.new get_fleet_package_config + create_fleet_package_config = parent_rpcs.create_fleet_package if parent_rpcs.respond_to? :create_fleet_package + @create_fleet_package = ::Gapic::Config::Method.new create_fleet_package_config + update_fleet_package_config = parent_rpcs.update_fleet_package if parent_rpcs.respond_to? :update_fleet_package + @update_fleet_package = ::Gapic::Config::Method.new update_fleet_package_config + delete_fleet_package_config = parent_rpcs.delete_fleet_package if parent_rpcs.respond_to? :delete_fleet_package + @delete_fleet_package = ::Gapic::Config::Method.new delete_fleet_package_config + list_releases_config = parent_rpcs.list_releases if parent_rpcs.respond_to? :list_releases + @list_releases = ::Gapic::Config::Method.new list_releases_config + get_release_config = parent_rpcs.get_release if parent_rpcs.respond_to? :get_release + @get_release = ::Gapic::Config::Method.new get_release_config + create_release_config = parent_rpcs.create_release if parent_rpcs.respond_to? :create_release + @create_release = ::Gapic::Config::Method.new create_release_config + update_release_config = parent_rpcs.update_release if parent_rpcs.respond_to? :update_release + @update_release = ::Gapic::Config::Method.new update_release_config + delete_release_config = parent_rpcs.delete_release if parent_rpcs.respond_to? :delete_release + @delete_release = ::Gapic::Config::Method.new delete_release_config + list_variants_config = parent_rpcs.list_variants if parent_rpcs.respond_to? :list_variants + @list_variants = ::Gapic::Config::Method.new list_variants_config + get_variant_config = parent_rpcs.get_variant if parent_rpcs.respond_to? :get_variant + @get_variant = ::Gapic::Config::Method.new get_variant_config + create_variant_config = parent_rpcs.create_variant if parent_rpcs.respond_to? :create_variant + @create_variant = ::Gapic::Config::Method.new create_variant_config + update_variant_config = parent_rpcs.update_variant if parent_rpcs.respond_to? :update_variant + @update_variant = ::Gapic::Config::Method.new update_variant_config + delete_variant_config = parent_rpcs.delete_variant if parent_rpcs.respond_to? :delete_variant + @delete_variant = ::Gapic::Config::Method.new delete_variant_config + list_rollouts_config = parent_rpcs.list_rollouts if parent_rpcs.respond_to? :list_rollouts + @list_rollouts = ::Gapic::Config::Method.new list_rollouts_config + get_rollout_config = parent_rpcs.get_rollout if parent_rpcs.respond_to? :get_rollout + @get_rollout = ::Gapic::Config::Method.new get_rollout_config + suspend_rollout_config = parent_rpcs.suspend_rollout if parent_rpcs.respond_to? :suspend_rollout + @suspend_rollout = ::Gapic::Config::Method.new suspend_rollout_config + resume_rollout_config = parent_rpcs.resume_rollout if parent_rpcs.respond_to? :resume_rollout + @resume_rollout = ::Gapic::Config::Method.new resume_rollout_config + abort_rollout_config = parent_rpcs.abort_rollout if parent_rpcs.respond_to? :abort_rollout + @abort_rollout = ::Gapic::Config::Method.new abort_rollout_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/operations.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/operations.rb new file mode 100644 index 000000000000..afb3ffe8a7e3 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/operations.rb @@ -0,0 +1,914 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Cloud + module ConfigDelivery + module V1 + module ConfigDelivery + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "configdelivery.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ConfigDelivery Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ConfigDelivery Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::ConfigDelivery::V1::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::ConfigDelivery::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::ConfigDelivery::V1::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::ConfigDelivery::V1::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "configdelivery.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/service_stub.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/service_stub.rb new file mode 100644 index 000000000000..a46783e769a7 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/config_delivery/rest/service_stub.rb @@ -0,0 +1,1617 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/configdelivery/v1/config_delivery_pb" + +module Google + module Cloud + module ConfigDelivery + module V1 + module ConfigDelivery + module Rest + ## + # REST service stub for the ConfigDelivery 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: true, + 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 list_resource_bundles REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest] + # 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::ConfigDelivery::V1::ListResourceBundlesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesResponse] + # A result object deserialized from the server's reply + def list_resource_bundles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_bundles_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_resource_bundles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesResponse.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_resource_bundle REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest] + # 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::ConfigDelivery::V1::ResourceBundle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundle] + # A result object deserialized from the server's reply + def get_resource_bundle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_bundle_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_resource_bundle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::ResourceBundle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_resource_bundle REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_resource_bundle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_resource_bundle_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_resource_bundle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_resource_bundle REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_resource_bundle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_resource_bundle_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: "update_resource_bundle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_resource_bundle REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_resource_bundle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_resource_bundle_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_resource_bundle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_fleet_packages REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest] + # 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::ConfigDelivery::V1::ListFleetPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesResponse] + # A result object deserialized from the server's reply + def list_fleet_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_fleet_packages_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_fleet_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesResponse.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_fleet_package REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest] + # 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::ConfigDelivery::V1::FleetPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage] + # A result object deserialized from the server's reply + def get_fleet_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_fleet_package_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_fleet_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::FleetPackage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_fleet_package REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_fleet_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_fleet_package_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_fleet_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_fleet_package REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_fleet_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_fleet_package_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: "update_fleet_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_fleet_package REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_fleet_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_fleet_package_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_fleet_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_releases REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest] + # 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::ConfigDelivery::V1::ListReleasesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::ListReleasesResponse] + # A result object deserialized from the server's reply + def list_releases request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_releases_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_releases", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::ListReleasesResponse.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_release REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest] + # 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::ConfigDelivery::V1::Release] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Release] + # A result object deserialized from the server's reply + def get_release request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_release_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_release", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::Release.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_release REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_release request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_release_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_release", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_release REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_release request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_release_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: "update_release", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_release REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_release request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_release_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_release", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_variants REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest] + # 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::ConfigDelivery::V1::ListVariantsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::ListVariantsResponse] + # A result object deserialized from the server's reply + def list_variants request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_variants_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_variants", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::ListVariantsResponse.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_variant REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetVariantRequest] + # 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::ConfigDelivery::V1::Variant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Variant] + # A result object deserialized from the server's reply + def get_variant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_variant_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_variant", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::Variant.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_variant REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_variant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_variant_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_variant", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_variant REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_variant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_variant_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: "update_variant", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_variant REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_variant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_variant_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_variant", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_rollouts REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest] + # 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::ConfigDelivery::V1::ListRolloutsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::ListRolloutsResponse] + # A result object deserialized from the server's reply + def list_rollouts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rollouts_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_rollouts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::ListRolloutsResponse.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_rollout REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest] + # 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::ConfigDelivery::V1::Rollout] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ConfigDelivery::V1::Rollout] + # A result object deserialized from the server's reply + def get_rollout request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rollout_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_rollout", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ConfigDelivery::V1::Rollout.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the suspend_rollout REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def suspend_rollout request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_suspend_rollout_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: "suspend_rollout", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resume_rollout REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def resume_rollout request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resume_rollout_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: "resume_rollout", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the abort_rollout REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def abort_rollout request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_abort_rollout_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: "abort_rollout", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 list_resource_bundles REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest] + # 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_resource_bundles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceBundles", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_resource_bundle REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest] + # 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_resource_bundle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_resource_bundle REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest] + # 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_resource_bundle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/resourceBundles", + body: "resource_bundle", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_resource_bundle REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_resource_bundle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{resource_bundle.name}", + body: "resource_bundle", + matches: [ + ["resource_bundle.name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_resource_bundle REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest] + # 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_resource_bundle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_fleet_packages REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest] + # 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_fleet_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/fleetPackages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_fleet_package REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest] + # 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_fleet_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleetPackages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_fleet_package REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest] + # 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_fleet_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/fleetPackages", + body: "fleet_package", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_fleet_package REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_fleet_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{fleet_package.name}", + body: "fleet_package", + matches: [ + ["fleet_package.name", %r{^projects/[^/]+/locations/[^/]+/fleetPackages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_fleet_package REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest] + # 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_fleet_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleetPackages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_releases REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest] + # 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_releases_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/releases", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_release REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest] + # 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_release_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/releases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_release REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest] + # 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_release_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/releases", + body: "release", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_release REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_release_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{release.name}", + body: "release", + matches: [ + ["release.name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/releases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_release REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest] + # 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_release_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/releases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_variants REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest] + # 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_variants_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/variants", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/releases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_variant REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetVariantRequest] + # 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_variant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/releases/[^/]+/variants/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_variant REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest] + # 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_variant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/variants", + body: "variant", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/releases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_variant REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_variant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{variant.name}", + body: "variant", + matches: [ + ["variant.name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/releases/[^/]+/variants/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_variant REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest] + # 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_variant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/resourceBundles/[^/]+/releases/[^/]+/variants/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rollouts REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest] + # 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_rollouts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rollouts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/fleetPackages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rollout REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest] + # 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_rollout_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleetPackages/[^/]+/rollouts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the suspend_rollout REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_suspend_rollout_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:suspend", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleetPackages/[^/]+/rollouts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the resume_rollout REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resume_rollout_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:resume", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleetPackages/[^/]+/rollouts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the abort_rollout REST call + # + # @param request_pb [::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_abort_rollout_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:abort", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleetPackages/[^/]+/rollouts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/rest.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/rest.rb new file mode 100644 index 000000000000..9a08cdab19be --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config_delivery/v1/config_delivery/rest" +require "google/cloud/config_delivery/v1/bindings_override" +require "google/cloud/config_delivery/v1/version" + +module Google + module Cloud + module ConfigDelivery + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/config_delivery/v1/rest" + # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/version.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/version.rb new file mode 100644 index 000000000000..00a6e0b4e353 --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ConfigDelivery + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/configdelivery/v1/config_delivery_pb.rb b/google-cloud-config_delivery-v1/lib/google/cloud/configdelivery/v1/config_delivery_pb.rb new file mode 100644 index 000000000000..f81d83d2979a --- /dev/null +++ b/google-cloud-config_delivery-v1/lib/google/cloud/configdelivery/v1/config_delivery_pb.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/configdelivery/v1/config_delivery.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/configdelivery/v1/config_delivery.proto\x12\x1egoogle.cloud.configdelivery.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x03\n\x0eResourceBundle\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x06labels\x18\x04 \x03(\x0b\x32:.google.cloud.configdelivery.v1.ResourceBundle.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9e\x01\xea\x41\x9a\x01\n,configdelivery.googleapis.com/ResourceBundle\x12Iprojects/{project}/locations/{location}/resourceBundles/{resource_bundle}*\x0fresourceBundles2\x0eresourceBundle\"\xbf\x01\n\x1aListResourceBundlesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,configdelivery.googleapis.com/ResourceBundle\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n\x1bListResourceBundlesResponse\x12H\n\x10resource_bundles\x18\x01 \x03(\x0b\x32..google.cloud.configdelivery.v1.ResourceBundle\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"^\n\x18GetResourceBundleRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,configdelivery.googleapis.com/ResourceBundle\"\xf3\x01\n\x1b\x43reateResourceBundleRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,configdelivery.googleapis.com/ResourceBundle\x12\x1f\n\x12resource_bundle_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12L\n\x0fresource_bundle\x18\x03 \x01(\x0b\x32..google.cloud.configdelivery.v1.ResourceBundleB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc2\x01\n\x1bUpdateResourceBundleRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12L\n\x0fresource_bundle\x18\x02 \x01(\x0b\x32..google.cloud.configdelivery.v1.ResourceBundleB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x96\x01\n\x1b\x44\x65leteResourceBundleRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,configdelivery.googleapis.com/ResourceBundle\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xd8\r\n\x0c\x46leetPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.configdelivery.v1.FleetPackage.LabelsEntryB\x03\xe0\x41\x01\x12j\n\x18resource_bundle_selector\x18\x05 \x01(\x0b\x32\x43.google.cloud.configdelivery.v1.FleetPackage.ResourceBundleSelectorB\x03\xe0\x41\x02\x12H\n\x06target\x18\t \x01(\x0b\x32\x33.google.cloud.configdelivery.v1.FleetPackage.TargetB\x03\xe0\x41\x01\x12N\n\x10rollout_strategy\x18\n \x01(\x0b\x32/.google.cloud.configdelivery.v1.RolloutStrategyB\x03\xe0\x41\x01\x12[\n\x10variant_selector\x18\x0b \x01(\x0b\x32<.google.cloud.configdelivery.v1.FleetPackage.VariantSelectorB\x03\xe0\x41\x02\x12\x43\n\x04info\x18\r \x01(\x0b\x32\x30.google.cloud.configdelivery.v1.FleetPackageInfoB\x03\xe0\x41\x03\x12\x63\n\x1b\x64\x65letion_propagation_policy\x18\x0f \x01(\x0e\x32\x39.google.cloud.configdelivery.v1.DeletionPropagationPolicyB\x03\xe0\x41\x01\x12\x46\n\x05state\x18\x10 \x01(\x0e\x32\x32.google.cloud.configdelivery.v1.FleetPackage.StateB\x03\xe0\x41\x01\x1a\xe2\x01\n\x16ResourceBundleSelector\x12Y\n\x0fresource_bundle\x18\x01 \x01(\x0b\x32>.google.cloud.configdelivery.v1.FleetPackage.ResourceBundleTagH\x00\x12\x63\n\x16\x63loud_build_repository\x18\x03 \x01(\x0b\x32\x41.google.cloud.configdelivery.v1.FleetPackage.CloudBuildRepositoryH\x00\x42\x08\n\x06source\x1ai\n\x11ResourceBundleTag\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,configdelivery.googleapis.com/ResourceBundle\x12\x10\n\x03tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xc2\x01\n\x14\x43loudBuildRepository\x12\x1f\n\x10variants_pattern\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03tag\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x02\x42\n\n\x08variants\x1aJ\n\x06Target\x12\x36\n\x05\x66leet\x18\x01 \x01(\x0b\x32%.google.cloud.configdelivery.v1.FleetH\x00\x42\x08\n\x06target\x1a\x43\n\x0fVariantSelector\x12$\n\x15variant_name_template\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x42\n\n\x08strategy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUSPENDED\x10\x02:\x94\x01\xea\x41\x90\x01\n*configdelivery.googleapis.com/FleetPackage\x12\x45projects/{project}/locations/{location}/fleetPackages/{fleet_package}*\rfleetPackages2\x0c\x66leetPackage\"\x97\x03\n\x10\x46leetPackageInfo\x12\x45\n\x0e\x61\x63tive_rollout\x18\x01 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%configdelivery.googleapis.com/Rollout\x12M\n\x16last_completed_rollout\x18\x02 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%configdelivery.googleapis.com/Rollout\x12M\n\x05state\x18\x03 \x01(\x0e\x32\x36.google.cloud.configdelivery.v1.FleetPackageInfo.StateB\x06\xe0\x41\x03\xe0\x41\x01\x12I\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x31.google.cloud.configdelivery.v1.FleetPackageErrorB\x06\xe0\x41\x03\xe0\x41\x01\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUSPENDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"/\n\x11\x46leetPackageError\x12\x1a\n\rerror_message\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xae\x05\n\x0b\x43lusterInfo\x12<\n\nmembership\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n gkehub.googleapis.com/Membership\x12R\n\x07\x64\x65sired\x18\x02 \x01(\x0b\x32<.google.cloud.configdelivery.v1.ResourceBundleDeploymentInfoB\x03\xe0\x41\x03\x12R\n\x07initial\x18\x03 \x01(\x0b\x32<.google.cloud.configdelivery.v1.ResourceBundleDeploymentInfoB\x03\xe0\x41\x03\x12R\n\x07\x63urrent\x18\x04 \x01(\x0b\x32<.google.cloud.configdelivery.v1.ResourceBundleDeploymentInfoB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x05 \x01(\x0e\x32\x31.google.cloud.configdelivery.v1.ClusterInfo.StateB\x03\xe0\x41\x03\x12\x18\n\x08messages\x18\x06 \x03(\tB\x06\xe0\x41\x06\xe0\x41\x03\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x9b\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07WAITING\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\x0b\n\x07STALLED\x10\x03\x12\r\n\tCOMPLETED\x10\x04\x12\x0b\n\x07\x41\x42ORTED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\t\n\x05\x45RROR\x10\x07\x12\r\n\tUNCHANGED\x10\x08\x12\x0b\n\x07SKIPPED\x10\t\"\xa2\x03\n\x1cResourceBundleDeploymentInfo\x12>\n\x07release\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%configdelivery.googleapis.com/Release\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07variant\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12_\n\nsync_state\x18\x04 \x01(\x0e\x32\x46.google.cloud.configdelivery.v1.ResourceBundleDeploymentInfo.SyncStateB\x03\xe0\x41\x03\x12\x18\n\x08messages\x18\x05 \x03(\tB\x06\xe0\x41\x03\xe0\x41\x06\"\x9a\x01\n\tSyncState\x12\x1a\n\x16SYNC_STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bRECONCILING\x10\x01\x12\x0b\n\x07STALLED\x10\x02\x12\n\n\x06SYNCED\x10\x03\x12\x0b\n\x07PENDING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x14\n\x10\x44\x45LETION_PENDING\x10\x06\x12\x0c\n\x08\x44\x45LETING\x10\x07\x12\x0b\n\x07\x44\x45LETED\x10\x08\"\xc0\x02\n\x05\x46leet\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12J\n\x08selector\x18\x02 \x01(\x0b\x32\x33.google.cloud.configdelivery.v1.Fleet.LabelSelectorB\x03\xe0\x41\x01\x1a\xa4\x01\n\rLabelSelector\x12_\n\x0cmatch_labels\x18\x01 \x03(\x0b\x32\x44.google.cloud.configdelivery.v1.Fleet.LabelSelector.MatchLabelsEntryB\x03\xe0\x41\x01\x1a\x32\n\x10MatchLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x13\n\x11\x41llAtOnceStrategy\".\n\x0fRollingStrategy\x12\x1b\n\x0emax_concurrent\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\"\xab\x01\n\x0fRolloutStrategy\x12H\n\x0b\x61ll_at_once\x18\x01 \x01(\x0b\x32\x31.google.cloud.configdelivery.v1.AllAtOnceStrategyH\x00\x12\x42\n\x07rolling\x18\x02 \x01(\x0b\x32/.google.cloud.configdelivery.v1.RollingStrategyH\x00\x42\n\n\x08strategy\"\xd3\x01\n\x13RolloutStrategyInfo\x12Z\n\x19\x61ll_at_once_strategy_info\x18\x01 \x01(\x0b\x32\x35.google.cloud.configdelivery.v1.AllAtOnceStrategyInfoH\x00\x12T\n\x15rolling_strategy_info\x18\x02 \x01(\x0b\x32\x33.google.cloud.configdelivery.v1.RollingStrategyInfoH\x00\x42\n\n\x08strategy\"[\n\x15\x41llAtOnceStrategyInfo\x12\x42\n\x08\x63lusters\x18\x01 \x03(\x0b\x32+.google.cloud.configdelivery.v1.ClusterInfoB\x03\xe0\x41\x06\"Y\n\x13RollingStrategyInfo\x12\x42\n\x08\x63lusters\x18\x01 \x03(\x0b\x32+.google.cloud.configdelivery.v1.ClusterInfoB\x03\xe0\x41\x06\"\xbb\x01\n\x18ListFleetPackagesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*configdelivery.googleapis.com/FleetPackage\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x19ListFleetPackagesResponse\x12\x44\n\x0e\x66leet_packages\x18\x01 \x03(\x0b\x32,.google.cloud.configdelivery.v1.FleetPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"Z\n\x16GetFleetPackageRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*configdelivery.googleapis.com/FleetPackage\"\xe9\x01\n\x19\x43reateFleetPackageRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*configdelivery.googleapis.com/FleetPackage\x12\x1d\n\x10\x66leet_package_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\rfleet_package\x18\x03 \x01(\x0b\x32,.google.cloud.configdelivery.v1.FleetPackageB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xbc\x01\n\x19UpdateFleetPackageRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12H\n\rfleet_package\x18\x02 \x01(\x0b\x32,.google.cloud.configdelivery.v1.FleetPackageB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xae\x01\n\x19\x44\x65leteFleetPackageRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*configdelivery.googleapis.com/FleetPackage\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xba\x05\n\x07Release\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x06labels\x18\x04 \x03(\x0b\x32\x33.google.cloud.configdelivery.v1.Release.LabelsEntryB\x03\xe0\x41\x01\x12I\n\tlifecycle\x18\x05 \x01(\x0e\x32\x31.google.cloud.configdelivery.v1.Release.LifecycleB\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x0cpublish_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x04info\x18\t \x01(\x0b\x32+.google.cloud.configdelivery.v1.ReleaseInfoB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"@\n\tLifecycle\x12\x19\n\x15LIFECYCLE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\r\n\tPUBLISHED\x10\x02:\x9c\x01\xea\x41\x98\x01\n%configdelivery.googleapis.com/Release\x12\\projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}*\x08releases2\x07release\"\xd1\x03\n\x07Variant\x12H\n\x06labels\x18\x01 \x03(\x0b\x32\x33.google.cloud.configdelivery.v1.Variant.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\tresources\x18\x02 \x03(\tB\t\xe0\x41\x02\xe0\x41\x06\xe0\x41\x04\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaf\x01\xea\x41\xab\x01\n%configdelivery.googleapis.com/Variant\x12oprojects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}*\x08variants2\x07variant\"\xb1\x01\n\x13ListVariantsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%configdelivery.googleapis.com/Variant\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x14ListVariantsResponse\x12\x39\n\x08variants\x18\x01 \x03(\x0b\x32\'.google.cloud.configdelivery.v1.Variant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"P\n\x11GetVariantRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%configdelivery.googleapis.com/Variant\"\xce\x01\n\x14\x43reateVariantRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%configdelivery.googleapis.com/Variant\x12\x17\n\nvariant_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x07variant\x18\x03 \x01(\x0b\x32\'.google.cloud.configdelivery.v1.VariantB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xac\x01\n\x14UpdateVariantRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12=\n\x07variant\x18\x02 \x01(\x0b\x32\'.google.cloud.configdelivery.v1.VariantB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"t\n\x14\x44\x65leteVariantRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%configdelivery.googleapis.com/Variant\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd4\x01\n\x0bReleaseInfo\x12\x1b\n\x0eoci_image_path\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12k\n\x17variant_oci_image_paths\x18\x02 \x03(\x0b\x32\x45.google.cloud.configdelivery.v1.ReleaseInfo.VariantOciImagePathsEntryB\x03\xe0\x41\x01\x1a;\n\x19VariantOciImagePathsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb1\x01\n\x13ListReleasesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%configdelivery.googleapis.com/Release\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x14ListReleasesResponse\x12\x39\n\x08releases\x18\x01 \x03(\x0b\x32\'.google.cloud.configdelivery.v1.Release\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"P\n\x11GetReleaseRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%configdelivery.googleapis.com/Release\"\xce\x01\n\x14\x43reateReleaseRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%configdelivery.googleapis.com/Release\x12\x17\n\nrelease_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x07release\x18\x03 \x01(\x0b\x32\'.google.cloud.configdelivery.v1.ReleaseB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xac\x01\n\x14UpdateReleaseRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12=\n\x07release\x18\x02 \x01(\x0b\x32\'.google.cloud.configdelivery.v1.ReleaseB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x88\x01\n\x14\x44\x65leteReleaseRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%configdelivery.googleapis.com/Release\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x13ListRolloutsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%configdelivery.googleapis.com/Rollout\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x14ListRolloutsResponse\x12\x39\n\x08rollouts\x18\x01 \x03(\x0b\x32\'.google.cloud.configdelivery.v1.Rollout\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"P\n\x11GetRolloutRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%configdelivery.googleapis.com/Rollout\"\xb2\x03\n\x0bRolloutInfo\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x31.google.cloud.configdelivery.v1.RolloutInfo.StateB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12W\n\x15rollout_strategy_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.configdelivery.v1.RolloutStrategyInfoB\x03\xe0\x41\x03\"\x84\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tCOMPLETED\x10\x01\x12\r\n\tSUSPENDED\x10\x02\x12\x0b\n\x07\x41\x42ORTED\x10\x03\x12\x0f\n\x0bIN_PROGRESS\x10\x05\x12\x0b\n\x07STALLED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x12\x0c\n\x08\x41\x42ORTING\x10\x08\"\xc6\x04\n\x07Rollout\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12;\n\x07release\x18\x02 \x01(\tB*\xfa\x41\'\n%configdelivery.googleapis.com/Release\x12I\n\x10rollout_strategy\x18\x04 \x01(\x0b\x32/.google.cloud.configdelivery.v1.RolloutStrategy\x12\x39\n\x04info\x18\x05 \x01(\x0b\x32+.google.cloud.configdelivery.v1.RolloutInfo\x12^\n\x1b\x64\x65letion_propagation_policy\x18\x07 \x01(\x0e\x32\x39.google.cloud.configdelivery.v1.DeletionPropagationPolicy\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x98\x01\xea\x41\x94\x01\n%configdelivery.googleapis.com/Rollout\x12Xprojects/{project}/locations/{location}/fleetPackages/{fleet_package}/rollouts/{rollout}*\x08rollouts2\x07rollout\"i\n\x15SuspendRolloutRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%configdelivery.googleapis.com/Rollout\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\"h\n\x14ResumeRolloutRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%configdelivery.googleapis.com/Rollout\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\"g\n\x13\x41\x62ortRolloutRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%configdelivery.googleapis.com/Rollout\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01*d\n\x19\x44\x65letionPropagationPolicy\x12+\n\'DELETION_PROPAGATION_POLICY_UNSPECIFIED\x10\x00\x12\x0e\n\nFOREGROUND\x10\x01\x12\n\n\x06ORPHAN\x10\x02\x32\x89-\n\x0e\x43onfigDelivery\x12\xd4\x01\n\x13ListResourceBundles\x12:.google.cloud.configdelivery.v1.ListResourceBundlesRequest\x1a;.google.cloud.configdelivery.v1.ListResourceBundlesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/resourceBundles\x12\xc1\x01\n\x11GetResourceBundle\x12\x38.google.cloud.configdelivery.v1.GetResourceBundleRequest\x1a..google.cloud.configdelivery.v1.ResourceBundle\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/resourceBundles/*}\x12\x93\x02\n\x14\x43reateResourceBundle\x12;.google.cloud.configdelivery.v1.CreateResourceBundleRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0eResourceBundle\x12\x11OperationMetadata\xda\x41)parent,resource_bundle,resource_bundle_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/resourceBundles:\x0fresource_bundle\x12\x95\x02\n\x14UpdateResourceBundle\x12;.google.cloud.configdelivery.v1.UpdateResourceBundleRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0eResourceBundle\x12\x11OperationMetadata\xda\x41\x1bresource_bundle,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{resource_bundle.name=projects/*/locations/*/resourceBundles/*}:\x0fresource_bundle\x12\xe3\x01\n\x14\x44\x65leteResourceBundle\x12;.google.cloud.configdelivery.v1.DeleteResourceBundleRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/resourceBundles/*}\x12\xcc\x01\n\x11ListFleetPackages\x12\x38.google.cloud.configdelivery.v1.ListFleetPackagesRequest\x1a\x39.google.cloud.configdelivery.v1.ListFleetPackagesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/fleetPackages\x12\xb9\x01\n\x0fGetFleetPackage\x12\x36.google.cloud.configdelivery.v1.GetFleetPackageRequest\x1a,.google.cloud.configdelivery.v1.FleetPackage\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/fleetPackages/*}\x12\x85\x02\n\x12\x43reateFleetPackage\x12\x39.google.cloud.configdelivery.v1.CreateFleetPackageRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41!\n\x0c\x46leetPackage\x12\x11OperationMetadata\xda\x41%parent,fleet_package,fleet_package_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/fleetPackages:\rfleet_package\x12\x87\x02\n\x12UpdateFleetPackage\x12\x39.google.cloud.configdelivery.v1.UpdateFleetPackageRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41!\n\x0c\x46leetPackage\x12\x11OperationMetadata\xda\x41\x19\x66leet_package,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{fleet_package.name=projects/*/locations/*/fleetPackages/*}:\rfleet_package\x12\xdd\x01\n\x12\x44\x65leteFleetPackage\x12\x39.google.cloud.configdelivery.v1.DeleteFleetPackageRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/fleetPackages/*}\x12\xca\x01\n\x0cListReleases\x12\x33.google.cloud.configdelivery.v1.ListReleasesRequest\x1a\x34.google.cloud.configdelivery.v1.ListReleasesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/resourceBundles/*}/releases\x12\xb7\x01\n\nGetRelease\x12\x31.google.cloud.configdelivery.v1.GetReleaseRequest\x1a\'.google.cloud.configdelivery.v1.Release\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/resourceBundles/*/releases/*}\x12\xf1\x01\n\rCreateRelease\x12\x34.google.cloud.configdelivery.v1.CreateReleaseRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1c\n\x07Release\x12\x11OperationMetadata\xda\x41\x19parent,release,release_id\x82\xd3\xe4\x93\x02I\">/v1/{parent=projects/*/locations/*/resourceBundles/*}/releases:\x07release\x12\xf3\x01\n\rUpdateRelease\x12\x34.google.cloud.configdelivery.v1.UpdateReleaseRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1c\n\x07Release\x12\x11OperationMetadata\xda\x41\x13release,update_mask\x82\xd3\xe4\x93\x02Q2F/v1/{release.name=projects/*/locations/*/resourceBundles/*/releases/*}:\x07release\x12\xe0\x01\n\rDeleteRelease\x12\x34.google.cloud.configdelivery.v1.DeleteReleaseRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/resourceBundles/*/releases/*}\x12\xd5\x01\n\x0cListVariants\x12\x33.google.cloud.configdelivery.v1.ListVariantsRequest\x1a\x34.google.cloud.configdelivery.v1.ListVariantsResponse\"Z\xda\x41\x06parent\x82\xd3\xe4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/resourceBundles/*/releases/*}/variants\x12\xc2\x01\n\nGetVariant\x12\x31.google.cloud.configdelivery.v1.GetVariantRequest\x1a\'.google.cloud.configdelivery.v1.Variant\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/resourceBundles/*/releases/*/variants/*}\x12\xfc\x01\n\rCreateVariant\x12\x34.google.cloud.configdelivery.v1.CreateVariantRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41\x1c\n\x07Variant\x12\x11OperationMetadata\xda\x41\x19parent,variant,variant_id\x82\xd3\xe4\x93\x02T\"I/v1/{parent=projects/*/locations/*/resourceBundles/*/releases/*}/variants:\x07variant\x12\xfe\x01\n\rUpdateVariant\x12\x34.google.cloud.configdelivery.v1.UpdateVariantRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41\x1c\n\x07Variant\x12\x11OperationMetadata\xda\x41\x13variant,update_mask\x82\xd3\xe4\x93\x02\\2Q/v1/{variant.name=projects/*/locations/*/resourceBundles/*/releases/*/variants/*}:\x07variant\x12\xec\x01\n\rDeleteVariant\x12\x34.google.cloud.configdelivery.v1.DeleteVariantRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02K*I/v1/{name=projects/*/locations/*/resourceBundles/*/releases/*/variants/*}\x12\xc8\x01\n\x0cListRollouts\x12\x33.google.cloud.configdelivery.v1.ListRolloutsRequest\x1a\x34.google.cloud.configdelivery.v1.ListRolloutsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12] + # 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-cloud-config_delivery-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-config_delivery-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/proto_docs/google/api/field_info.rb b/google-cloud-config_delivery-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..cea53f02d1a8 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-config_delivery-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-config_delivery-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/proto_docs/google/api/resource.rb b/google-cloud-config_delivery-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/proto_docs/google/cloud/configdelivery/v1/config_delivery.rb b/google-cloud-config_delivery-v1/proto_docs/google/cloud/configdelivery/v1/config_delivery.rb new file mode 100644 index 000000000000..aa077c294715 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/cloud/configdelivery/v1/config_delivery.rb @@ -0,0 +1,1384 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ConfigDelivery + module V1 + # ResourceBundle represent a collection of kubernetes configuration resources. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the `ResourceBundle`. Format is + # `projects/{project}/locations/{location}/resourceBundle + # /[a-z][a-z0-9\-]\\{0,62}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time `ResourceBundle` was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time `ResourceBundle` was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels as key value pairs. + # @!attribute [rw] description + # @return [::String] + # Optional. Human readable description of the `ResourceBundle`. + class ResourceBundle + 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 + + # Message for requesting list of ResourceBundles. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListResourceBundlesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListResourceBundlesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing ResourceBundles. + # @!attribute [rw] resource_bundles + # @return [::Array<::Google::Cloud::ConfigDelivery::V1::ResourceBundle>] + # The list of ResourceBundle. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListResourceBundlesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a ResourceBundle. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetResourceBundleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a ResourceBundle. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] resource_bundle_id + # @return [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # resource_bundle_id from the method_signature of Create RPC + # @!attribute [rw] resource_bundle + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundle] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateResourceBundleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a ResourceBundle + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # ResourceBundle resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] resource_bundle + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundle] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateResourceBundleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a ResourceBundle + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any releases of this resource bundle will also be + # deleted. (Otherwise, the request will only work if the resource bundle has + # no releases.) + class DeleteResourceBundleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `FleetPackage` resource in the Config Delivery API. + # + # A `FleetPackage` defines a package through which kubernetes + # configuration is deployed to a fleet of kubernetes clusters. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the `FleetPackage`. Format is + # `projects/{project}/locations/{location}/fleetPackages/{fleetPackage}`. + # The `fleetPackage` component must match + # `[a-z][a-z0-9\-]{0,62}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which the `FleetPackage` was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Most recent time at which the `FleetPackage` was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels are attributes that can be set and used by both the + # user and by Config Delivery. Labels must meet the following constraints: + # + # * Keys and values can contain only lowercase letters, numeric characters, + # underscores, and dashes. + # * All characters must use UTF-8 encoding, and international characters are + # allowed. + # * Keys must start with a lowercase letter or international character. + # * Each resource is limited to a maximum of 64 labels. + # + # Both keys and values are additionally constrained to be <= 128 bytes. + # @!attribute [rw] resource_bundle_selector + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage::ResourceBundleSelector] + # Required. Information specifying the source of kubernetes configuration to + # deploy. + # @!attribute [rw] target + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage::Target] + # Optional. Configuration to select target clusters to deploy kubernetes + # configuration to. + # @!attribute [rw] rollout_strategy + # @return [::Google::Cloud::ConfigDelivery::V1::RolloutStrategy] + # Optional. The strategy to use to deploy kubernetes configuration to + # clusters. + # @!attribute [rw] variant_selector + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage::VariantSelector] + # Required. Information specifying how to map a `ResourceBundle` variant to a + # target cluster. + # @!attribute [r] info + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackageInfo] + # Output only. Information containing the rollout status of the + # `FleetPackage` across all the target clusters. + # @!attribute [rw] deletion_propagation_policy + # @return [::Google::Cloud::ConfigDelivery::V1::DeletionPropagationPolicy] + # Optional. Information around how to handle kubernetes resources at the + # target clusters when the `FleetPackage` is deleted. + # @!attribute [rw] state + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage::State] + # Optional. The desired state of the fleet package. + class FleetPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information specifying the source of kubernetes configuration to deploy. + # @!attribute [rw] resource_bundle + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage::ResourceBundleTag] + # Information specifying `ResourceBundle`. + # + # Note: The following fields are mutually exclusive: `resource_bundle`, `cloud_build_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_build_repository + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage::CloudBuildRepository] + # Information specifying `CloudBuildRepository`. + # + # Note: The following fields are mutually exclusive: `cloud_build_repository`, `resource_bundle`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ResourceBundleSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ResourceBundleTag contains the information to refer to a release for a + # `ResourceBundle`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the `ResourceBundle`. + # Format is projects/\\{p}/locations/\\{l}/resourceBundles/\\{r}. + # @!attribute [rw] tag + # @return [::String] + # Required. Tag refers to a version of the release in a `ResourceBundle`. + # This is a Git tag in the semantic version format `vX.Y.Z`. + class ResourceBundleTag + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudBuildRepository contains information about fetching Kubernetes + # configuration from a `CloudBuildRepository`. + # @!attribute [rw] variants_pattern + # @return [::String] + # Optional. variants_pattern is a glob pattern that will be used to find + # variants in the repository. Examples: `variants/*.yaml`, `us-*` + # @!attribute [rw] name + # @return [::String] + # Required. Name of the cloud build repository. + # Format is projects/\\{p}/locations/\\{l}/connections/\\{c}/repositories/\\{r}. + # @!attribute [rw] path + # @return [::String] + # Optional. path to the directory or file within the repository that + # contains the kubernetes configuration. If unspecified, path is assumed to + # the top level root directory of the repository. + # @!attribute [rw] tag + # @return [::String] + # Required. git tag of the underlying git repository. + # The git tag must be in the semantic version format `vX.Y.Z`. + # @!attribute [rw] service_account + # @return [::String] + # Required. Google service account to use in CloudBuild triggers to fetch + # and store kubernetes configuration. + class CloudBuildRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The target defines different ways to target set of kubernetes clusters. + # @!attribute [rw] fleet + # @return [::Google::Cloud::ConfigDelivery::V1::Fleet] + # The GKE fleet information. + class Target + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # VariantSelector contains information for selecting a variant in + # `ResourceBundle` to deploy to a target cluster. + # @!attribute [rw] variant_name_template + # @return [::String] + # Required. variant_name_template is a template that can refer to + # variables containing cluster membership metadata such as location, + # name, and labels to generate the name of the variant for a target + # cluster. The variable syntax is similar to the unix shell variables. + # + # Available variables are `${membership.name}`, `${membership.location}`, + # `${membership.project}` and `${membership.labels['label_name']}`. + # + # If you want to deploy a specific variant, say "default" to all the + # clusters, you can use "default" (string without any variables) as + # the variant_name_template. + class VariantSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State indicates the desired state for the fleet package. + # Unspecified value is equivalent to `ACTIVE`. If state is set to + # `SUSPENDED`, active rollout (if any) will continue but no new rollouts will + # be scheduled. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # `FleetPackage` is intended to be active. + ACTIVE = 1 + + # `FleetPackage` is intended to be suspended. + SUSPENDED = 2 + end + end + + # FleetPackageInfo represents the status of the `FleetPackage` across all the + # target clusters. + # @!attribute [rw] active_rollout + # @return [::String] + # Optional. The active rollout, if any. Format is + # `projects/{project}/locations/{location}/fleetPackages/{fleet_package}/rollouts/{rollout}`. + # @!attribute [rw] last_completed_rollout + # @return [::String] + # Optional. The last completed rollout, if any. Format is + # `projects/{project}/locations/{location}/fleetPackages/{fleet_package}/rollouts/{rollout}`. + # @!attribute [r] state + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackageInfo::State] + # Optional. Output only. The current state of the `FleetPackage`. + # @!attribute [r] errors + # @return [::Array<::Google::Cloud::ConfigDelivery::V1::FleetPackageError>] + # Optional. Output only. Errors encountered during configuration deployment + # (if any). + class FleetPackageInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible values for the `FleetPackage` state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # `FleetPackage` is active. + ACTIVE = 1 + + # `FleetPackage` is suspended. + SUSPENDED = 2 + + # `FleetPackage` has failed to reconcile. + FAILED = 3 + + # `FleetPackage` is being deleted. + DELETING = 4 + end + end + + # Information representing an error encountered during rolling out + # configurations. + # @!attribute [rw] error_message + # @return [::String] + # Optional. A description of the error. + class FleetPackageError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ClusterInfo represents status of a resource bundle rollout for a cluster. + # @!attribute [r] membership + # @return [::String] + # Output only. gkehub membership of target cluster + # @!attribute [r] desired + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundleDeploymentInfo] + # Output only. Desired state for the resource bundle. + # @!attribute [r] initial + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundleDeploymentInfo] + # Output only. Initial state of the resource bundle prior to the deployment. + # @!attribute [r] current + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundleDeploymentInfo] + # Output only. Current state of the resource bundle. + # @!attribute [r] state + # @return [::Google::Cloud::ConfigDelivery::V1::ClusterInfo::State] + # Output only. State of the rollout for the cluster. + # @!attribute [r] messages + # @return [::Array<::String>] + # Output only. Unordered list. Messages convey additional information related + # to the deployment. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when reconciliation starts. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when reconciliation ends. + class ClusterInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the rollout for the cluster. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Waiting state. + WAITING = 1 + + # In progress state. + IN_PROGRESS = 2 + + # Stalled state. + STALLED = 3 + + # Completed state. + COMPLETED = 4 + + # Aborted state. + ABORTED = 5 + + # Cancelled state. + CANCELLED = 6 + + # Error state. + ERROR = 7 + + # Unchanged state. + UNCHANGED = 8 + + # Skipped state. + SKIPPED = 9 + end + end + + # ResourceBundleDeploymentInfo represents the status of a resource bundle + # deployment. + # @!attribute [r] release + # @return [::String] + # Output only. Refers to a `ResourceBundle` release. + # @!attribute [r] version + # @return [::String] + # Output only. Refers to a version of the `ResourceBundle` release. + # @!attribute [r] variant + # @return [::String] + # Output only. Refers to a variant in a `ResourceBundle` release. + # @!attribute [r] sync_state + # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundleDeploymentInfo::SyncState] + # Output only. Synchronization state of the `ResourceBundle` deployment. + # @!attribute [r] messages + # @return [::Array<::String>] + # Output only. Unordered list. Messages contains information related to the + # `ResourceBundle` deployment. For example, in case of an error, indicate the + # reason for the error. In case of a pending deployment, reason for why the + # deployment of new release is pending. + class ResourceBundleDeploymentInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Synchronization state of the resource bundle deployment. + module SyncState + # Unspecified state. + SYNC_STATE_UNSPECIFIED = 0 + + # Reconciling state. + RECONCILING = 1 + + # Stalled state. + STALLED = 2 + + # Synced state. + SYNCED = 3 + + # Pending state. + PENDING = 4 + + # Error state. + ERROR = 5 + + # Deletion pending state. + DELETION_PENDING = 6 + + # Deleting state. + DELETING = 7 + + # Deleted state. + DELETED = 8 + end + end + + # The fleet where the `FleetPackage` should be deployed. + # @!attribute [rw] project + # @return [::String] + # Required. The host project for the GKE fleet. Format is + # `projects/{project}`. + # @!attribute [rw] selector + # @return [::Google::Cloud::ConfigDelivery::V1::Fleet::LabelSelector] + # Optional. selector allows targeting a subset of fleet members using their + # labels. + class Fleet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A label selector is a label query over a set of resources. An empty label + # selector matches all objects. + # @!attribute [rw] match_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. match_labels is a map of \\{key,value} pairs. Each \\{key,value} + # pair must match an existing label key and value exactly in order to + # satisfy the match. + class LabelSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MatchLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # AllAtOnceStrategy causes all clusters to be updated concurrently. + class AllAtOnceStrategy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RollingStrategy causes a specified number of clusters to be updated + # concurrently until all clusters are updated. + # @!attribute [rw] max_concurrent + # @return [::Integer] + # Optional. Maximum number of clusters to update the resource bundle on + # concurrently. + class RollingStrategy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RolloutStrategy defines different ways to rollout a resource bundle across + # a set of clusters. + # @!attribute [rw] all_at_once + # @return [::Google::Cloud::ConfigDelivery::V1::AllAtOnceStrategy] + # AllAtOnceStrategy causes all clusters to be updated concurrently. + # + # Note: The following fields are mutually exclusive: `all_at_once`, `rolling`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] rolling + # @return [::Google::Cloud::ConfigDelivery::V1::RollingStrategy] + # RollingStrategy causes a specified number of clusters to be updated + # concurrently until all clusters are updated. + # + # Note: The following fields are mutually exclusive: `rolling`, `all_at_once`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RolloutStrategy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RolloutStrategyInfo represents the status of execution of different types of + # rollout strategies. Only the field corresponding to the rollout strategy + # specified at the rollout resource will be populated. + # @!attribute [rw] all_at_once_strategy_info + # @return [::Google::Cloud::ConfigDelivery::V1::AllAtOnceStrategyInfo] + # AllAtOnceStrategyInfo represents the status of AllAtOnce rollout strategy + # execution. + # + # Note: The following fields are mutually exclusive: `all_at_once_strategy_info`, `rolling_strategy_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] rolling_strategy_info + # @return [::Google::Cloud::ConfigDelivery::V1::RollingStrategyInfo] + # RollingStrategyInfo represents the status of Rolling rollout strategy + # execution. + # + # Note: The following fields are mutually exclusive: `rolling_strategy_info`, `all_at_once_strategy_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RolloutStrategyInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AllAtOnceStrategyInfo represents the status of execution of AllAtOnce rollout + # strategy. + # @!attribute [rw] clusters + # @return [::Array<::Google::Cloud::ConfigDelivery::V1::ClusterInfo>] + # Unordered list. resource bundle's deployment status for all targeted + # clusters. + class AllAtOnceStrategyInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RollingStrategyInfo represents the status of execution of Rolling rollout + # strategy. + # @!attribute [rw] clusters + # @return [::Array<::Google::Cloud::ConfigDelivery::V1::ClusterInfo>] + # Unordered list. resource bundle's deployment status for all targeted + # clusters. + class RollingStrategyInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of FleetPackage. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListFleetPackagesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListFleetPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing FleetPackage + # @!attribute [rw] fleet_packages + # @return [::Array<::Google::Cloud::ConfigDelivery::V1::FleetPackage>] + # The list of FleetPackage + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListFleetPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a FleetPackage + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetFleetPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a FleetPackage + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] fleet_package_id + # @return [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # fleet_package_id from the method_signature of Create RPC + # @!attribute [rw] fleet_package + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateFleetPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a FleetPackage + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # FleetPackage resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] fleet_package + # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateFleetPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a FleetPackage + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any rollouts for this FleetPackage will also be + # deleted. (Otherwise, the request will only work if the fleet package has no + # rollouts.) + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, then deleting an already deleted or non existing + # FleetPackage will succeed. + class DeleteFleetPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `Release` represents a versioned release containing kubernetes manifests. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the Release. Format is + # `projects/{project}/locations/location}/resourceBundles/{resource_bundle}/release/[a-z][a-z0-9\-]{0,62}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time `Release` was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time `Release` was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels as key value pairs. + # @!attribute [rw] lifecycle + # @return [::Google::Cloud::ConfigDelivery::V1::Release::Lifecycle] + # Optional. lifecycle of the `Release`. + # @!attribute [rw] version + # @return [::String] + # Required. version of the `Release`. This must be v... + # @!attribute [r] publish_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `Release` was published. + # @!attribute [rw] info + # @return [::Google::Cloud::ConfigDelivery::V1::ReleaseInfo] + # Optional. `ResourceBundle` Release extra information e.g., artifact + # registry image path. + class Release + 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 + + # Lifecycle indicates the state of the `Release`. A published release is + # immutable. + module Lifecycle + # indicates lifecycle has not been specified. + LIFECYCLE_UNSPECIFIED = 0 + + # indicates that the `Release` is being edited. + DRAFT = 1 + + # indicates that the `Release` is now published (or released) and + # immutable. + PUBLISHED = 2 + end + end + + # Variant represents the content of a `ResourceBundle` variant. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. labels to represent any metadata associated with the variant. + # @!attribute [rw] resources + # @return [::Array<::String>] + # Required. Input only. Unordered list. resources contain the kubernetes + # manifests (YAMLs) for this variant. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name follows format of + # projects/\\{project}/locations/\\{location}/resourceBundles/\\{resource_bundle}/releases/\\{release}/variants/\\{variant} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create time stamp + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update time stamp + class Variant + 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 + + # Message for requesting list of Variants. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListVariantsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListVariantsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Variants + # @!attribute [rw] variants + # @return [::Array<::Google::Cloud::ConfigDelivery::V1::Variant>] + # The list of Variants + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListVariantsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Variant + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetVariantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a Variant + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] variant_id + # @return [::String] + # Required. Id of the requesting object + # @!attribute [rw] variant + # @return [::Google::Cloud::ConfigDelivery::V1::Variant] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateVariantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a Variant + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Variant resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] variant + # @return [::Google::Cloud::ConfigDelivery::V1::Variant] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateVariantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a Variant + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteVariantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReleaseInfo contains extra information about the `ResourceBundle` release + # e.g., link to an artifact registry OCI image. + # @!attribute [r] oci_image_path + # @return [::String] + # Output only. path to the oci image the service uploads to on a `Release` + # creation. + # @!attribute [rw] variant_oci_image_paths + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. per-variant paths to the oci images the service uploads on + # package release creation + class ReleaseInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class VariantOciImagePathsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for requesting list of Releases. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListReleasesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListReleasesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Releases + # @!attribute [rw] releases + # @return [::Array<::Google::Cloud::ConfigDelivery::V1::Release>] + # The list of Releases + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListReleasesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Release + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetReleaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a Release + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] release_id + # @return [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # release_id from the method_signature of Create RPC + # @!attribute [rw] release + # @return [::Google::Cloud::ConfigDelivery::V1::Release] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateReleaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a Release + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Release resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] release + # @return [::Google::Cloud::ConfigDelivery::V1::Release] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateReleaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a Release + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any variants of this release will also be + # deleted. (Otherwise, the request will only work if the release has no + # variants.) + class DeleteReleaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of Rollouts + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListRolloutsRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListRolloutsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Rollouts + # @!attribute [rw] rollouts + # @return [::Array<::Google::Cloud::ConfigDelivery::V1::Rollout>] + # The list of Rollouts + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListRolloutsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Rollout + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetRolloutRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RolloutInfo represents the state of the `FleetPackage` at all the + # clusters the rollout is targeting. + # @!attribute [r] state + # @return [::Google::Cloud::ConfigDelivery::V1::RolloutInfo::State] + # Output only. state contains the overall status of the Rollout. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the rollout started. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the rollout completed. + # @!attribute [r] message + # @return [::String] + # Output only. Message containing additional information related to the + # rollout. + # @!attribute [r] rollout_strategy_info + # @return [::Google::Cloud::ConfigDelivery::V1::RolloutStrategyInfo] + # Output only. Rollout strategy info represents the status of execution of + # rollout strategy. + class RolloutInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the rollout + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Rollout completed. + COMPLETED = 1 + + # Rollout suspended. + SUSPENDED = 2 + + # Rollout aborted. + ABORTED = 3 + + # Rollout in progress. + IN_PROGRESS = 5 + + # Rollout stalled. + STALLED = 6 + + # Rollout cancelled. + CANCELLED = 7 + + # Rollout aborting. + ABORTING = 8 + end + end + + # Rollout resource represents an instance of `FleetPackage` rollout operation + # across a fleet. This is a system generated resource and will be read only for + # end-users. It will be primarily used by the service to process the changes in + # the `FleetPackage` and other changes in the environment. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the Rollout. Format is + # `projects/{project}/locations/{location}/fleetPackages/{fleet_package}/rollouts/[a-z][a-z0-9\-]{0,62}`. + # @!attribute [rw] release + # @return [::String] + # Reference to the `Release` being rolled out. + # @!attribute [rw] rollout_strategy + # @return [::Google::Cloud::ConfigDelivery::V1::RolloutStrategy] + # Rollout strategy for rolling out `FleetPackage` to clusters. + # @!attribute [rw] info + # @return [::Google::Cloud::ConfigDelivery::V1::RolloutInfo] + # Current details of the rollout. + # @!attribute [rw] deletion_propagation_policy + # @return [::Google::Cloud::ConfigDelivery::V1::DeletionPropagationPolicy] + # Deletion propagation policy of the rollout. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the rollout was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the rollout was most recently updated. + class Rollout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for suspending a rollout. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the Rollout. + # @!attribute [rw] reason + # @return [::String] + # Optional. Reason for suspension. + class SuspendRolloutRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for resuming a rollout. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the Rollout. + # @!attribute [rw] reason + # @return [::String] + # Optional. Reason for resuming the rollout. + class ResumeRolloutRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for aborting a rollout. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the Rollout. + # @!attribute [rw] reason + # @return [::String] + # Optional. Reason for aborting. + class AbortRolloutRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deletion Propagation Policy determines what happens to the underlying + # Kubernetes resources on a cluster when the `FleetPackage` managing + # those resources no longer targets the cluster or is deleted. + module DeletionPropagationPolicy + # Unspecified deletion propagation policy. Defaults to FOREGROUND. + DELETION_PROPAGATION_POLICY_UNSPECIFIED = 0 + + # Foreground deletion propagation policy. Any resources synced to the cluster + # will be deleted. + FOREGROUND = 1 + + # Orphan deletion propagation policy. Any resources synced to the cluster + # will be abandoned. + ORPHAN = 2 + end + end + end + end +end diff --git a/google-cloud-config_delivery-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-config_delivery-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..977abe95a483 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,173 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-config_delivery-v1/proto_docs/google/protobuf/any.rb b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..9e9bdbb09ea4 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery-v1/proto_docs/google/rpc/status.rb b/google-cloud-config_delivery-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..3f61f95b2587 --- /dev/null +++ b/google-cloud-config_delivery-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-config_delivery-v1/snippets/Gemfile b/google-cloud-config_delivery-v1/snippets/Gemfile new file mode 100644 index 000000000000..25ac941d5e20 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-config_delivery-v1", path: "../" +else + gem "google-cloud-config_delivery-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/abort_rollout.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/abort_rollout.rb new file mode 100644 index 000000000000..5337409ffa82 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/abort_rollout.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_AbortRollout_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the abort_rollout call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#abort_rollout. +# +def abort_rollout + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest.new + + # Call the abort_rollout method. + result = client.abort_rollout request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_AbortRollout_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/create_fleet_package.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/create_fleet_package.rb new file mode 100644 index 000000000000..bc17ce3b07a8 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/create_fleet_package.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_CreateFleetPackage_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the create_fleet_package call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#create_fleet_package. +# +def create_fleet_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest.new + + # Call the create_fleet_package method. + result = client.create_fleet_package request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_CreateFleetPackage_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/create_release.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/create_release.rb new file mode 100644 index 000000000000..1122abe865ff --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/create_release.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_CreateRelease_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the create_release call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#create_release. +# +def create_release + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest.new + + # Call the create_release method. + result = client.create_release request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_CreateRelease_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/create_resource_bundle.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/create_resource_bundle.rb new file mode 100644 index 000000000000..651884984598 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/create_resource_bundle.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_CreateResourceBundle_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the create_resource_bundle call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#create_resource_bundle. +# +def create_resource_bundle + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest.new + + # Call the create_resource_bundle method. + result = client.create_resource_bundle request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_CreateResourceBundle_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/create_variant.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/create_variant.rb new file mode 100644 index 000000000000..dee06018bfe4 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/create_variant.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_CreateVariant_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the create_variant call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#create_variant. +# +def create_variant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::CreateVariantRequest.new + + # Call the create_variant method. + result = client.create_variant request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_CreateVariant_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/delete_fleet_package.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/delete_fleet_package.rb new file mode 100644 index 000000000000..5656d6cb077e --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/delete_fleet_package.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_DeleteFleetPackage_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the delete_fleet_package call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#delete_fleet_package. +# +def delete_fleet_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest.new + + # Call the delete_fleet_package method. + result = client.delete_fleet_package request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_DeleteFleetPackage_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/delete_release.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/delete_release.rb new file mode 100644 index 000000000000..5a9496baeda8 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/delete_release.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_DeleteRelease_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the delete_release call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#delete_release. +# +def delete_release + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest.new + + # Call the delete_release method. + result = client.delete_release request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_DeleteRelease_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/delete_resource_bundle.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/delete_resource_bundle.rb new file mode 100644 index 000000000000..7dc1e2685994 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/delete_resource_bundle.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_DeleteResourceBundle_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the delete_resource_bundle call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#delete_resource_bundle. +# +def delete_resource_bundle + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest.new + + # Call the delete_resource_bundle method. + result = client.delete_resource_bundle request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_DeleteResourceBundle_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/delete_variant.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/delete_variant.rb new file mode 100644 index 000000000000..6038236c9bc3 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/delete_variant.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_DeleteVariant_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the delete_variant call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#delete_variant. +# +def delete_variant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest.new + + # Call the delete_variant method. + result = client.delete_variant request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_DeleteVariant_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/get_fleet_package.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/get_fleet_package.rb new file mode 100644 index 000000000000..5e0ba31105f4 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/get_fleet_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_GetFleetPackage_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the get_fleet_package call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#get_fleet_package. +# +def get_fleet_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest.new + + # Call the get_fleet_package method. + result = client.get_fleet_package request + + # The returned object is of type Google::Cloud::ConfigDelivery::V1::FleetPackage. + p result +end +# [END configdelivery_v1_generated_ConfigDelivery_GetFleetPackage_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/get_release.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/get_release.rb new file mode 100644 index 000000000000..95b1f6b469da --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/get_release.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_GetRelease_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the get_release call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#get_release. +# +def get_release + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::GetReleaseRequest.new + + # Call the get_release method. + result = client.get_release request + + # The returned object is of type Google::Cloud::ConfigDelivery::V1::Release. + p result +end +# [END configdelivery_v1_generated_ConfigDelivery_GetRelease_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/get_resource_bundle.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/get_resource_bundle.rb new file mode 100644 index 000000000000..93f2e3510fc9 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/get_resource_bundle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_GetResourceBundle_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the get_resource_bundle call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#get_resource_bundle. +# +def get_resource_bundle + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest.new + + # Call the get_resource_bundle method. + result = client.get_resource_bundle request + + # The returned object is of type Google::Cloud::ConfigDelivery::V1::ResourceBundle. + p result +end +# [END configdelivery_v1_generated_ConfigDelivery_GetResourceBundle_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/get_rollout.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/get_rollout.rb new file mode 100644 index 000000000000..e39f8905da15 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/get_rollout.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_GetRollout_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the get_rollout call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#get_rollout. +# +def get_rollout + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::GetRolloutRequest.new + + # Call the get_rollout method. + result = client.get_rollout request + + # The returned object is of type Google::Cloud::ConfigDelivery::V1::Rollout. + p result +end +# [END configdelivery_v1_generated_ConfigDelivery_GetRollout_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/get_variant.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/get_variant.rb new file mode 100644 index 000000000000..76927f2a233c --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/get_variant.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_GetVariant_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the get_variant call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#get_variant. +# +def get_variant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::GetVariantRequest.new + + # Call the get_variant method. + result = client.get_variant request + + # The returned object is of type Google::Cloud::ConfigDelivery::V1::Variant. + p result +end +# [END configdelivery_v1_generated_ConfigDelivery_GetVariant_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/list_fleet_packages.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/list_fleet_packages.rb new file mode 100644 index 000000000000..46b0b2c89375 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/list_fleet_packages.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_ListFleetPackages_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the list_fleet_packages call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#list_fleet_packages. +# +def list_fleet_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest.new + + # Call the list_fleet_packages method. + result = client.list_fleet_packages 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::ConfigDelivery::V1::FleetPackage. + p item + end +end +# [END configdelivery_v1_generated_ConfigDelivery_ListFleetPackages_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/list_releases.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/list_releases.rb new file mode 100644 index 000000000000..304cef715f3c --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/list_releases.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_ListReleases_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the list_releases call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#list_releases. +# +def list_releases + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::ListReleasesRequest.new + + # Call the list_releases method. + result = client.list_releases 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::ConfigDelivery::V1::Release. + p item + end +end +# [END configdelivery_v1_generated_ConfigDelivery_ListReleases_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/list_resource_bundles.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/list_resource_bundles.rb new file mode 100644 index 000000000000..0d04ccb9d5c6 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/list_resource_bundles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_ListResourceBundles_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the list_resource_bundles call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#list_resource_bundles. +# +def list_resource_bundles + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new + + # Call the list_resource_bundles method. + result = client.list_resource_bundles 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::ConfigDelivery::V1::ResourceBundle. + p item + end +end +# [END configdelivery_v1_generated_ConfigDelivery_ListResourceBundles_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/list_rollouts.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/list_rollouts.rb new file mode 100644 index 000000000000..7c781ba04215 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/list_rollouts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_ListRollouts_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the list_rollouts call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#list_rollouts. +# +def list_rollouts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest.new + + # Call the list_rollouts method. + result = client.list_rollouts 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::ConfigDelivery::V1::Rollout. + p item + end +end +# [END configdelivery_v1_generated_ConfigDelivery_ListRollouts_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/list_variants.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/list_variants.rb new file mode 100644 index 000000000000..2dad35fec468 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/list_variants.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_ListVariants_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the list_variants call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#list_variants. +# +def list_variants + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::ListVariantsRequest.new + + # Call the list_variants method. + result = client.list_variants 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::ConfigDelivery::V1::Variant. + p item + end +end +# [END configdelivery_v1_generated_ConfigDelivery_ListVariants_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/resume_rollout.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/resume_rollout.rb new file mode 100644 index 000000000000..216189b3b559 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/resume_rollout.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_ResumeRollout_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the resume_rollout call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#resume_rollout. +# +def resume_rollout + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest.new + + # Call the resume_rollout method. + result = client.resume_rollout request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_ResumeRollout_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/suspend_rollout.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/suspend_rollout.rb new file mode 100644 index 000000000000..56eb62bc8893 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/suspend_rollout.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_SuspendRollout_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the suspend_rollout call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#suspend_rollout. +# +def suspend_rollout + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest.new + + # Call the suspend_rollout method. + result = client.suspend_rollout request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_SuspendRollout_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/update_fleet_package.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/update_fleet_package.rb new file mode 100644 index 000000000000..3934b9ecb520 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/update_fleet_package.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_UpdateFleetPackage_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the update_fleet_package call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#update_fleet_package. +# +def update_fleet_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest.new + + # Call the update_fleet_package method. + result = client.update_fleet_package request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_UpdateFleetPackage_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/update_release.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/update_release.rb new file mode 100644 index 000000000000..1d6c2bb25783 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/update_release.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_UpdateRelease_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the update_release call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#update_release. +# +def update_release + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest.new + + # Call the update_release method. + result = client.update_release request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_UpdateRelease_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/update_resource_bundle.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/update_resource_bundle.rb new file mode 100644 index 000000000000..fa761c3aba3a --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/update_resource_bundle.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_UpdateResourceBundle_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the update_resource_bundle call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#update_resource_bundle. +# +def update_resource_bundle + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest.new + + # Call the update_resource_bundle method. + result = client.update_resource_bundle request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_UpdateResourceBundle_sync] diff --git a/google-cloud-config_delivery-v1/snippets/config_delivery/update_variant.rb b/google-cloud-config_delivery-v1/snippets/config_delivery/update_variant.rb new file mode 100644 index 000000000000..89de3f59aaea --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/config_delivery/update_variant.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 configdelivery_v1_generated_ConfigDelivery_UpdateVariant_sync] +require "google/cloud/config_delivery/v1" + +## +# Snippet for the update_variant call in the ConfigDelivery 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::ConfigDelivery::V1::ConfigDelivery::Client#update_variant. +# +def update_variant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest.new + + # Call the update_variant method. + result = client.update_variant request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END configdelivery_v1_generated_ConfigDelivery_UpdateVariant_sync] diff --git a/google-cloud-config_delivery-v1/snippets/snippet_metadata_google.cloud.configdelivery.v1.json b/google-cloud-config_delivery-v1/snippets/snippet_metadata_google.cloud.configdelivery.v1.json new file mode 100644 index 000000000000..e4be63ba57e7 --- /dev/null +++ b/google-cloud-config_delivery-v1/snippets/snippet_metadata_google.cloud.configdelivery.v1.json @@ -0,0 +1,1015 @@ +{ + "client_library": { + "name": "google-cloud-config_delivery-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.configdelivery.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_ListResourceBundles_sync", + "title": "Snippet for the list_resource_bundles call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_resource_bundles.", + "file": "config_delivery/list_resource_bundles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_bundles", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_resource_bundles", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesResponse", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "ListResourceBundles", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.ListResourceBundles", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_GetResourceBundle_sync", + "title": "Snippet for the get_resource_bundle call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_resource_bundle.", + "file": "config_delivery/get_resource_bundle.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_resource_bundle", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_resource_bundle", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::ResourceBundle", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "GetResourceBundle", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.GetResourceBundle", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_CreateResourceBundle_sync", + "title": "Snippet for the create_resource_bundle call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#create_resource_bundle.", + "file": "config_delivery/create_resource_bundle.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_resource_bundle", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#create_resource_bundle", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "CreateResourceBundle", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.CreateResourceBundle", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_UpdateResourceBundle_sync", + "title": "Snippet for the update_resource_bundle call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#update_resource_bundle.", + "file": "config_delivery/update_resource_bundle.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_resource_bundle", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#update_resource_bundle", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "UpdateResourceBundle", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.UpdateResourceBundle", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_DeleteResourceBundle_sync", + "title": "Snippet for the delete_resource_bundle call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#delete_resource_bundle.", + "file": "config_delivery/delete_resource_bundle.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_resource_bundle", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#delete_resource_bundle", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "DeleteResourceBundle", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.DeleteResourceBundle", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_ListFleetPackages_sync", + "title": "Snippet for the list_fleet_packages call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_fleet_packages.", + "file": "config_delivery/list_fleet_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_fleet_packages", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_fleet_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesResponse", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "ListFleetPackages", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.ListFleetPackages", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_GetFleetPackage_sync", + "title": "Snippet for the get_fleet_package call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_fleet_package.", + "file": "config_delivery/get_fleet_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_fleet_package", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_fleet_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::FleetPackage", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "GetFleetPackage", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.GetFleetPackage", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_CreateFleetPackage_sync", + "title": "Snippet for the create_fleet_package call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#create_fleet_package.", + "file": "config_delivery/create_fleet_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_fleet_package", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#create_fleet_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "CreateFleetPackage", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.CreateFleetPackage", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_UpdateFleetPackage_sync", + "title": "Snippet for the update_fleet_package call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#update_fleet_package.", + "file": "config_delivery/update_fleet_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_fleet_package", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#update_fleet_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "UpdateFleetPackage", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.UpdateFleetPackage", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_DeleteFleetPackage_sync", + "title": "Snippet for the delete_fleet_package call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#delete_fleet_package.", + "file": "config_delivery/delete_fleet_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_fleet_package", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#delete_fleet_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "DeleteFleetPackage", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.DeleteFleetPackage", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_ListReleases_sync", + "title": "Snippet for the list_releases call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_releases.", + "file": "config_delivery/list_releases.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_releases", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_releases", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::ListReleasesResponse", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "ListReleases", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.ListReleases", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_GetRelease_sync", + "title": "Snippet for the get_release call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_release.", + "file": "config_delivery/get_release.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_release", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_release", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::Release", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "GetRelease", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.GetRelease", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_CreateRelease_sync", + "title": "Snippet for the create_release call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#create_release.", + "file": "config_delivery/create_release.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_release", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#create_release", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "CreateRelease", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.CreateRelease", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_UpdateRelease_sync", + "title": "Snippet for the update_release call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#update_release.", + "file": "config_delivery/update_release.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_release", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#update_release", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "UpdateRelease", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.UpdateRelease", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_DeleteRelease_sync", + "title": "Snippet for the delete_release call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#delete_release.", + "file": "config_delivery/delete_release.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_release", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#delete_release", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "DeleteRelease", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.DeleteRelease", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_ListVariants_sync", + "title": "Snippet for the list_variants call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_variants.", + "file": "config_delivery/list_variants.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_variants", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_variants", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::ListVariantsResponse", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "ListVariants", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.ListVariants", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_GetVariant_sync", + "title": "Snippet for the get_variant call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_variant.", + "file": "config_delivery/get_variant.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_variant", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_variant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::GetVariantRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::Variant", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "GetVariant", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.GetVariant", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_CreateVariant_sync", + "title": "Snippet for the create_variant call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#create_variant.", + "file": "config_delivery/create_variant.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_variant", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#create_variant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "CreateVariant", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.CreateVariant", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_UpdateVariant_sync", + "title": "Snippet for the update_variant call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#update_variant.", + "file": "config_delivery/update_variant.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_variant", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#update_variant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "UpdateVariant", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.UpdateVariant", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_DeleteVariant_sync", + "title": "Snippet for the delete_variant call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#delete_variant.", + "file": "config_delivery/delete_variant.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_variant", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#delete_variant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "DeleteVariant", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.DeleteVariant", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_ListRollouts_sync", + "title": "Snippet for the list_rollouts call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_rollouts.", + "file": "config_delivery/list_rollouts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rollouts", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#list_rollouts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::ListRolloutsResponse", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "ListRollouts", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.ListRollouts", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_GetRollout_sync", + "title": "Snippet for the get_rollout call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_rollout.", + "file": "config_delivery/get_rollout.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rollout", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#get_rollout", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ConfigDelivery::V1::Rollout", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "GetRollout", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.GetRollout", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_SuspendRollout_sync", + "title": "Snippet for the suspend_rollout call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#suspend_rollout.", + "file": "config_delivery/suspend_rollout.rb", + "language": "RUBY", + "client_method": { + "short_name": "suspend_rollout", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#suspend_rollout", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "SuspendRollout", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.SuspendRollout", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_ResumeRollout_sync", + "title": "Snippet for the resume_rollout call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#resume_rollout.", + "file": "config_delivery/resume_rollout.rb", + "language": "RUBY", + "client_method": { + "short_name": "resume_rollout", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#resume_rollout", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "ResumeRollout", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.ResumeRollout", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "configdelivery_v1_generated_ConfigDelivery_AbortRollout_sync", + "title": "Snippet for the abort_rollout call in the ConfigDelivery service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#abort_rollout.", + "file": "config_delivery/abort_rollout.rb", + "language": "RUBY", + "client_method": { + "short_name": "abort_rollout", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client#abort_rollout", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ConfigDelivery::Client", + "full_name": "::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client" + }, + "method": { + "short_name": "AbortRollout", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery.AbortRollout", + "service": { + "short_name": "ConfigDelivery", + "full_name": "google.cloud.configdelivery.v1.ConfigDelivery" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_operations_test.rb b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_operations_test.rb new file mode 100644 index 000000000000..9f87d843728b --- /dev/null +++ b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/configdelivery/v1/config_delivery_pb" +require "google/cloud/configdelivery/v1/config_delivery_services_pb" +require "google/cloud/config_delivery/v1/config_delivery" + +class ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::ConfigDelivery::V1::ConfigDelivery::Operations.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::ConfigDelivery::V1::ConfigDelivery::Operations::Configuration, config + end +end diff --git a/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_paths_test.rb b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_paths_test.rb new file mode 100644 index 000000000000..b86c82e6ff52 --- /dev/null +++ b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_paths_test.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config_delivery/v1/config_delivery" + +class ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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_fleet_package_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.fleet_package_path project: "value0", location: "value1", fleet_package: "value2" + assert_equal "projects/value0/locations/value1/fleetPackages/value2", path + 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::ConfigDelivery::V1::ConfigDelivery::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_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_release_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.release_path project: "value0", location: "value1", resource_bundle: "value2", release: "value3" + assert_equal "projects/value0/locations/value1/resourceBundles/value2/releases/value3", path + end + end + + def test_repository_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.repository_path project: "value0", location: "value1", connection: "value2", repository: "value3" + assert_equal "projects/value0/locations/value1/connections/value2/repositories/value3", path + end + end + + def test_resource_bundle_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.resource_bundle_path project: "value0", location: "value1", resource_bundle: "value2" + assert_equal "projects/value0/locations/value1/resourceBundles/value2", path + end + end + + def test_rollout_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rollout_path project: "value0", location: "value1", fleet_package: "value2", rollout: "value3" + assert_equal "projects/value0/locations/value1/fleetPackages/value2/rollouts/value3", path + end + end + + def test_variant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.variant_path project: "value0", location: "value1", resource_bundle: "value2", release: "value3", variant: "value4" + assert_equal "projects/value0/locations/value1/resourceBundles/value2/releases/value3/variants/value4", path + end + end +end diff --git a/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_rest_test.rb b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_rest_test.rb new file mode 100644 index 000000000000..761f90a85deb --- /dev/null +++ b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_rest_test.rb @@ -0,0 +1,1500 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/configdelivery/v1/config_delivery_pb" +require "google/cloud/config_delivery/v1/config_delivery/rest" + + +class ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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_list_resource_bundles + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_bundles_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_list_resource_bundles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_bundles_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_resource_bundles({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_resource_bundles parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_resource_bundles ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_resource_bundles({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_resource_bundles(::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_bundles_client_stub.call_count + end + end + end + + def test_get_resource_bundle + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::ResourceBundle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_bundle_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_get_resource_bundle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_resource_bundle_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_resource_bundle({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_resource_bundle name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_resource_bundle ::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_resource_bundle({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_resource_bundle(::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_resource_bundle_client_stub.call_count + end + end + end + + def test_create_resource_bundle + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_bundle_id = "hello world" + resource_bundle = {} + request_id = "hello world" + + create_resource_bundle_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_create_resource_bundle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_resource_bundle_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_resource_bundle({ parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_resource_bundle parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_resource_bundle ::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest.new(parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_resource_bundle({ parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_resource_bundle(::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest.new(parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_resource_bundle_client_stub.call_count + end + end + end + + def test_update_resource_bundle + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + resource_bundle = {} + request_id = "hello world" + + update_resource_bundle_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_update_resource_bundle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_resource_bundle_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_resource_bundle({ update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_resource_bundle update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_resource_bundle ::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest.new(update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_resource_bundle({ update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_resource_bundle(::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest.new(update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_resource_bundle_client_stub.call_count + end + end + end + + def test_delete_resource_bundle + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + + delete_resource_bundle_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_delete_resource_bundle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_resource_bundle_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_resource_bundle({ name: name, request_id: request_id, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_resource_bundle name: name, request_id: request_id, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_resource_bundle ::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest.new(name: name, request_id: request_id, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_resource_bundle({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_resource_bundle(::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_resource_bundle_client_stub.call_count + end + end + end + + def test_list_fleet_packages + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_fleet_packages_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_list_fleet_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_fleet_packages_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_fleet_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_fleet_packages parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_fleet_packages ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_fleet_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_fleet_packages(::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_fleet_packages_client_stub.call_count + end + end + end + + def test_get_fleet_package + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::FleetPackage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_fleet_package_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_get_fleet_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_fleet_package_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_fleet_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_fleet_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_fleet_package ::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_fleet_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_fleet_package(::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_fleet_package_client_stub.call_count + end + end + end + + def test_create_fleet_package + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + fleet_package_id = "hello world" + fleet_package = {} + request_id = "hello world" + + create_fleet_package_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_create_fleet_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_fleet_package_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_fleet_package({ parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_fleet_package parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_fleet_package ::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest.new(parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_fleet_package({ parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_fleet_package(::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest.new(parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_fleet_package_client_stub.call_count + end + end + end + + def test_update_fleet_package + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + fleet_package = {} + request_id = "hello world" + + update_fleet_package_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_update_fleet_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_fleet_package_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_fleet_package({ update_mask: update_mask, fleet_package: fleet_package, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_fleet_package update_mask: update_mask, fleet_package: fleet_package, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_fleet_package ::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest.new(update_mask: update_mask, fleet_package: fleet_package, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_fleet_package({ update_mask: update_mask, fleet_package: fleet_package, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_fleet_package(::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest.new(update_mask: update_mask, fleet_package: fleet_package, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_fleet_package_client_stub.call_count + end + end + end + + def test_delete_fleet_package + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + allow_missing = true + + delete_fleet_package_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_delete_fleet_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_fleet_package_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_fleet_package({ name: name, request_id: request_id, force: force, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_fleet_package name: name, request_id: request_id, force: force, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_fleet_package ::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest.new(name: name, request_id: request_id, force: force, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_fleet_package({ name: name, request_id: request_id, force: force, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_fleet_package(::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest.new(name: name, request_id: request_id, force: force, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_fleet_package_client_stub.call_count + end + end + end + + def test_list_releases + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::ListReleasesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_releases_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_list_releases_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_releases_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_releases({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_releases parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_releases ::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_releases({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_releases(::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_releases_client_stub.call_count + end + end + end + + def test_get_release + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::Release.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_release_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_get_release_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_release_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_release({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_release name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_release ::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_release({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_release(::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_release_client_stub.call_count + end + end + end + + def test_create_release + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + release_id = "hello world" + release = {} + request_id = "hello world" + + create_release_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_create_release_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_release_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_release({ parent: parent, release_id: release_id, release: release, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_release parent: parent, release_id: release_id, release: release, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_release ::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest.new(parent: parent, release_id: release_id, release: release, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_release({ parent: parent, release_id: release_id, release: release, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_release(::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest.new(parent: parent, release_id: release_id, release: release, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_release_client_stub.call_count + end + end + end + + def test_update_release + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + release = {} + request_id = "hello world" + + update_release_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_update_release_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_release_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_release({ update_mask: update_mask, release: release, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_release update_mask: update_mask, release: release, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_release ::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest.new(update_mask: update_mask, release: release, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_release({ update_mask: update_mask, release: release, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_release(::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest.new(update_mask: update_mask, release: release, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_release_client_stub.call_count + end + end + end + + def test_delete_release + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + + delete_release_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_delete_release_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_release_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_release({ name: name, request_id: request_id, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_release name: name, request_id: request_id, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_release ::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest.new(name: name, request_id: request_id, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_release({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_release(::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_release_client_stub.call_count + end + end + end + + def test_list_variants + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::ListVariantsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_variants_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_list_variants_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_variants_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_variants({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_variants parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_variants ::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_variants({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_variants(::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_variants_client_stub.call_count + end + end + end + + def test_get_variant + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::Variant.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_variant_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_get_variant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_variant_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_variant({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_variant name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_variant ::Google::Cloud::ConfigDelivery::V1::GetVariantRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_variant({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_variant(::Google::Cloud::ConfigDelivery::V1::GetVariantRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_variant_client_stub.call_count + end + end + end + + def test_create_variant + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + variant_id = "hello world" + variant = {} + request_id = "hello world" + + create_variant_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_create_variant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_variant_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_variant({ parent: parent, variant_id: variant_id, variant: variant, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_variant parent: parent, variant_id: variant_id, variant: variant, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_variant ::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest.new(parent: parent, variant_id: variant_id, variant: variant, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_variant({ parent: parent, variant_id: variant_id, variant: variant, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_variant(::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest.new(parent: parent, variant_id: variant_id, variant: variant, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_variant_client_stub.call_count + end + end + end + + def test_update_variant + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + variant = {} + request_id = "hello world" + + update_variant_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_update_variant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_variant_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_variant({ update_mask: update_mask, variant: variant, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_variant update_mask: update_mask, variant: variant, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_variant ::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest.new(update_mask: update_mask, variant: variant, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_variant({ update_mask: update_mask, variant: variant, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_variant(::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest.new(update_mask: update_mask, variant: variant, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_variant_client_stub.call_count + end + end + end + + def test_delete_variant + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_variant_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_delete_variant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_variant_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_variant({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_variant name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_variant ::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_variant({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_variant(::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_variant_client_stub.call_count + end + end + end + + def test_list_rollouts + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::ListRolloutsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_rollouts_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_list_rollouts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rollouts_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rollouts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rollouts parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rollouts ::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rollouts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rollouts(::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rollouts_client_stub.call_count + end + end + end + + def test_get_rollout + # Create test objects. + client_result = ::Google::Cloud::ConfigDelivery::V1::Rollout.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rollout_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_get_rollout_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rollout_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rollout({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rollout name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rollout ::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rollout({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rollout(::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rollout_client_stub.call_count + end + end + end + + def test_suspend_rollout + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = "hello world" + + suspend_rollout_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_suspend_rollout_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, suspend_rollout_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.suspend_rollout({ name: name, reason: reason }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.suspend_rollout name: name, reason: reason do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.suspend_rollout ::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest.new(name: name, reason: reason) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.suspend_rollout({ name: name, reason: reason }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.suspend_rollout(::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest.new(name: name, reason: reason), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, suspend_rollout_client_stub.call_count + end + end + end + + def test_resume_rollout + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = "hello world" + + resume_rollout_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_resume_rollout_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resume_rollout_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.resume_rollout({ name: name, reason: reason }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.resume_rollout name: name, reason: reason do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.resume_rollout ::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest.new(name: name, reason: reason) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.resume_rollout({ name: name, reason: reason }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.resume_rollout(::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest.new(name: name, reason: reason), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resume_rollout_client_stub.call_count + end + end + end + + def test_abort_rollout + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = "hello world" + + abort_rollout_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::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.stub :transcode_abort_rollout_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, abort_rollout_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.abort_rollout({ name: name, reason: reason }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.abort_rollout name: name, reason: reason do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.abort_rollout ::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest.new(name: name, reason: reason) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.abort_rollout({ name: name, reason: reason }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.abort_rollout(::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest.new(name: name, reason: reason), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, abort_rollout_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::ConfigDelivery::V1::ConfigDelivery::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::ConfigDelivery::V1::ConfigDelivery::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_test.rb b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_test.rb new file mode 100644 index 000000000000..e4f78ca46494 --- /dev/null +++ b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_test.rb @@ -0,0 +1,1751 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/configdelivery/v1/config_delivery_pb" +require "google/cloud/configdelivery/v1/config_delivery_services_pb" +require "google/cloud/config_delivery/v1/config_delivery" + +class ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::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_list_resource_bundles + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_bundles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_bundles, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_bundles_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_resource_bundles({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_resource_bundles parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_resource_bundles ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_resource_bundles({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_resource_bundles(::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_resource_bundles_client_stub.call_rpc_count + end + end + + def test_get_resource_bundle + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::ResourceBundle.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" + + get_resource_bundle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_resource_bundle, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_resource_bundle_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_resource_bundle({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_resource_bundle name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_resource_bundle ::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_resource_bundle({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_resource_bundle(::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest.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, get_resource_bundle_client_stub.call_rpc_count + end + end + + def test_create_resource_bundle + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + resource_bundle_id = "hello world" + resource_bundle = {} + request_id = "hello world" + + create_resource_bundle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_resource_bundle, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_bundle_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ConfigDelivery::V1::ResourceBundle), request["resource_bundle"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_resource_bundle_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_resource_bundle({ parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_resource_bundle parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_resource_bundle ::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest.new(parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_resource_bundle({ parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_resource_bundle(::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest.new(parent: parent, resource_bundle_id: resource_bundle_id, resource_bundle: resource_bundle, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_resource_bundle_client_stub.call_rpc_count + end + end + + def test_update_resource_bundle + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + resource_bundle = {} + request_id = "hello world" + + update_resource_bundle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_resource_bundle, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ConfigDelivery::V1::ResourceBundle), request["resource_bundle"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_resource_bundle_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_resource_bundle({ update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_resource_bundle update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_resource_bundle ::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest.new(update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_resource_bundle({ update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_resource_bundle(::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest.new(update_mask: update_mask, resource_bundle: resource_bundle, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_resource_bundle_client_stub.call_rpc_count + end + end + + def test_delete_resource_bundle + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + force = true + + delete_resource_bundle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_resource_bundle, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_resource_bundle_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_resource_bundle({ name: name, request_id: request_id, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_resource_bundle name: name, request_id: request_id, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_resource_bundle ::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest.new(name: name, request_id: request_id, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_resource_bundle({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_resource_bundle(::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_resource_bundle_client_stub.call_rpc_count + end + end + + def test_list_fleet_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_fleet_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_fleet_packages, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_fleet_packages_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_fleet_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_fleet_packages parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_fleet_packages ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_fleet_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_fleet_packages(::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_fleet_packages_client_stub.call_rpc_count + end + end + + def test_get_fleet_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::FleetPackage.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" + + get_fleet_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_fleet_package, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_fleet_package_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_fleet_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_fleet_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_fleet_package ::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_fleet_package({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_fleet_package(::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest.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, get_fleet_package_client_stub.call_rpc_count + end + end + + def test_create_fleet_package + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + fleet_package_id = "hello world" + fleet_package = {} + request_id = "hello world" + + create_fleet_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_fleet_package, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["fleet_package_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ConfigDelivery::V1::FleetPackage), request["fleet_package"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_fleet_package_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_fleet_package({ parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_fleet_package parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_fleet_package ::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest.new(parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_fleet_package({ parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_fleet_package(::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest.new(parent: parent, fleet_package_id: fleet_package_id, fleet_package: fleet_package, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_fleet_package_client_stub.call_rpc_count + end + end + + def test_update_fleet_package + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + fleet_package = {} + request_id = "hello world" + + update_fleet_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_fleet_package, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ConfigDelivery::V1::FleetPackage), request["fleet_package"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_fleet_package_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_fleet_package({ update_mask: update_mask, fleet_package: fleet_package, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_fleet_package update_mask: update_mask, fleet_package: fleet_package, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_fleet_package ::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest.new(update_mask: update_mask, fleet_package: fleet_package, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_fleet_package({ update_mask: update_mask, fleet_package: fleet_package, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_fleet_package(::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest.new(update_mask: update_mask, fleet_package: fleet_package, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_fleet_package_client_stub.call_rpc_count + end + end + + def test_delete_fleet_package + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + force = true + allow_missing = true + + delete_fleet_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_fleet_package, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_fleet_package_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_fleet_package({ name: name, request_id: request_id, force: force, allow_missing: allow_missing }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_fleet_package name: name, request_id: request_id, force: force, allow_missing: allow_missing do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_fleet_package ::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest.new(name: name, request_id: request_id, force: force, allow_missing: allow_missing) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_fleet_package({ name: name, request_id: request_id, force: force, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_fleet_package(::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest.new(name: name, request_id: request_id, force: force, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_fleet_package_client_stub.call_rpc_count + end + end + + def test_list_releases + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::ListReleasesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_releases_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_releases, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_releases_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_releases({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_releases parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_releases ::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_releases({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_releases(::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_releases_client_stub.call_rpc_count + end + end + + def test_get_release + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::Release.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" + + get_release_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_release, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_release_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_release({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_release name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_release ::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_release({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_release(::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest.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, get_release_client_stub.call_rpc_count + end + end + + def test_create_release + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + release_id = "hello world" + release = {} + request_id = "hello world" + + create_release_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_release, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["release_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ConfigDelivery::V1::Release), request["release"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_release_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_release({ parent: parent, release_id: release_id, release: release, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_release parent: parent, release_id: release_id, release: release, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_release ::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest.new(parent: parent, release_id: release_id, release: release, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_release({ parent: parent, release_id: release_id, release: release, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_release(::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest.new(parent: parent, release_id: release_id, release: release, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_release_client_stub.call_rpc_count + end + end + + def test_update_release + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + release = {} + request_id = "hello world" + + update_release_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_release, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ConfigDelivery::V1::Release), request["release"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_release_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_release({ update_mask: update_mask, release: release, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_release update_mask: update_mask, release: release, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_release ::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest.new(update_mask: update_mask, release: release, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_release({ update_mask: update_mask, release: release, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_release(::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest.new(update_mask: update_mask, release: release, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_release_client_stub.call_rpc_count + end + end + + def test_delete_release + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + force = true + + delete_release_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_release, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_release_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_release({ name: name, request_id: request_id, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_release name: name, request_id: request_id, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_release ::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest.new(name: name, request_id: request_id, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_release({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_release(::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_release_client_stub.call_rpc_count + end + end + + def test_list_variants + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::ListVariantsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_variants_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_variants, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_variants_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_variants({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_variants parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_variants ::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_variants({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_variants(::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_variants_client_stub.call_rpc_count + end + end + + def test_get_variant + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::Variant.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" + + get_variant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_variant, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::GetVariantRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_variant_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_variant({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_variant name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_variant ::Google::Cloud::ConfigDelivery::V1::GetVariantRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_variant({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_variant(::Google::Cloud::ConfigDelivery::V1::GetVariantRequest.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, get_variant_client_stub.call_rpc_count + end + end + + def test_create_variant + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + variant_id = "hello world" + variant = {} + request_id = "hello world" + + create_variant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_variant, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["variant_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ConfigDelivery::V1::Variant), request["variant"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_variant_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_variant({ parent: parent, variant_id: variant_id, variant: variant, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_variant parent: parent, variant_id: variant_id, variant: variant, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_variant ::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest.new(parent: parent, variant_id: variant_id, variant: variant, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_variant({ parent: parent, variant_id: variant_id, variant: variant, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_variant(::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest.new(parent: parent, variant_id: variant_id, variant: variant, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_variant_client_stub.call_rpc_count + end + end + + def test_update_variant + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + variant = {} + request_id = "hello world" + + update_variant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_variant, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ConfigDelivery::V1::Variant), request["variant"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_variant_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_variant({ update_mask: update_mask, variant: variant, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_variant update_mask: update_mask, variant: variant, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_variant ::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest.new(update_mask: update_mask, variant: variant, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_variant({ update_mask: update_mask, variant: variant, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_variant(::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest.new(update_mask: update_mask, variant: variant, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_variant_client_stub.call_rpc_count + end + end + + def test_delete_variant + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + + delete_variant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_variant, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_variant_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_variant({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_variant name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_variant ::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_variant({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_variant(::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_variant_client_stub.call_rpc_count + end + end + + def test_list_rollouts + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::ListRolloutsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_rollouts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rollouts, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rollouts_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rollouts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) 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_rollouts parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by 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_rollouts ::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) 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_rollouts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, 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_rollouts(::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), 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_rollouts_client_stub.call_rpc_count + end + end + + def test_get_rollout + # Create GRPC objects. + grpc_response = ::Google::Cloud::ConfigDelivery::V1::Rollout.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" + + get_rollout_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rollout, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rollout_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rollout({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rollout name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rollout ::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rollout({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_rollout(::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest.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, get_rollout_client_stub.call_rpc_count + end + end + + def test_suspend_rollout + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + reason = "hello world" + + suspend_rollout_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :suspend_rollout, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["reason"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, suspend_rollout_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.suspend_rollout({ name: name, reason: reason }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.suspend_rollout name: name, reason: reason do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.suspend_rollout ::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest.new(name: name, reason: reason) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.suspend_rollout({ name: name, reason: reason }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.suspend_rollout(::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest.new(name: name, reason: reason), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, suspend_rollout_client_stub.call_rpc_count + end + end + + def test_resume_rollout + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + reason = "hello world" + + resume_rollout_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resume_rollout, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["reason"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resume_rollout_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.resume_rollout({ name: name, reason: reason }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.resume_rollout name: name, reason: reason do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.resume_rollout ::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest.new(name: name, reason: reason) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.resume_rollout({ name: name, reason: reason }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.resume_rollout(::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest.new(name: name, reason: reason), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resume_rollout_client_stub.call_rpc_count + end + end + + def test_abort_rollout + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + reason = "hello world" + + abort_rollout_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :abort_rollout, name + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["reason"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, abort_rollout_client_stub do + # Create client + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.abort_rollout({ name: name, reason: reason }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.abort_rollout name: name, reason: reason do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.abort_rollout ::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest.new(name: name, reason: reason) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.abort_rollout({ name: name, reason: reason }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.abort_rollout(::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest.new(name: name, reason: reason), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, abort_rollout_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::ConfigDelivery::V1::ConfigDelivery::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::ConfigDelivery::V1::ConfigDelivery::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Operations, client.operations_client + end +end diff --git a/google-cloud-config_delivery-v1/test/helper.rb b/google-cloud-config_delivery-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-cloud-config_delivery-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index 9b1946662d3d..e86392f062d0 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -475,6 +475,10 @@ "component": "google-cloud-confidential_computing-v1", "version_file": "lib/google/cloud/confidential_computing/v1/version.rb" }, + "google-cloud-config_delivery-v1": { + "component": "google-cloud-config_delivery-v1", + "version_file": "lib/google/cloud/config_delivery/v1/version.rb" + }, "google-cloud-config_service": { "component": "google-cloud-config_service", "version_file": "lib/google/cloud/config_service/version.rb" From 581e2847791b957424e72903ecce6a380382485a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 11:01:03 -0700 Subject: [PATCH 408/457] chore(main): release google-apps-events-subscriptions-v1beta 0.1.0 (#30805) --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-apps-events-subscriptions-v1beta/CHANGELOG.md | 9 ++++++++- .../google/apps/events/subscriptions/v1beta/version.rb | 2 +- ...metadata_google.apps.events.subscriptions.v1beta.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a99f1cd05a6e..857219ee1f9f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -23,7 +23,7 @@ "google-apps-events-subscriptions+FILLER": "0.0.0", "google-apps-events-subscriptions-v1": "0.4.0", "google-apps-events-subscriptions-v1+FILLER": "0.0.0", - "google-apps-events-subscriptions-v1beta": "0.0.1", + "google-apps-events-subscriptions-v1beta": "0.1.0", "google-apps-events-subscriptions-v1beta+FILLER": "0.0.0", "google-apps-meet": "1.1.1", "google-apps-meet+FILLER": "0.0.0", diff --git a/google-apps-events-subscriptions-v1beta/.repo-metadata.json b/google-apps-events-subscriptions-v1beta/.repo-metadata.json index a6e3acb4a90c..610c2cf24627 100644 --- a/google-apps-events-subscriptions-v1beta/.repo-metadata.json +++ b/google-apps-events-subscriptions-v1beta/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "workspaceevents", "name_pretty": "Google Workspace Events V1BETA API", "product_documentation": "https://developers.google.com/workspace/events", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications. Note that google-apps-events-subscriptions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-apps-events-subscriptions instead. See the readme for more details.", diff --git a/google-apps-events-subscriptions-v1beta/CHANGELOG.md b/google-apps-events-subscriptions-v1beta/CHANGELOG.md index f88957a62ba2..ecbaf4acf913 100644 --- a/google-apps-events-subscriptions-v1beta/CHANGELOG.md +++ b/google-apps-events-subscriptions-v1beta/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-12) + +#### Features + +* Initial generation of google-apps-events-subscriptions-v1beta ([#30758](https://github.com/googleapis/google-cloud-ruby/issues/30758)) + +## Release History diff --git a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/version.rb b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/version.rb index de3c4fd98857..3186e845bad7 100644 --- a/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/version.rb +++ b/google-apps-events-subscriptions-v1beta/lib/google/apps/events/subscriptions/v1beta/version.rb @@ -22,7 +22,7 @@ module Apps module Events module Subscriptions module V1beta - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-apps-events-subscriptions-v1beta/snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json b/google-apps-events-subscriptions-v1beta/snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json index 6fcb317d7f7e..a66299119230 100644 --- a/google-apps-events-subscriptions-v1beta/snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json +++ b/google-apps-events-subscriptions-v1beta/snippets/snippet_metadata_google.apps.events.subscriptions.v1beta.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-apps-events-subscriptions-v1beta", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 483018632f6306b926d663736b5fc0997c6cc088 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 11:20:05 -0700 Subject: [PATCH 409/457] chore(main): release google-cloud-secure_source_manager-v1 2.2.1 (#30756) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-secure_source_manager-v1 2.2.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-secure_source_manager-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/secure_source_manager/v1/version.rb | 2 +- ...nippet_metadata_google.cloud.securesourcemanager.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 857219ee1f9f..cfd7b2e47b30 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -671,7 +671,7 @@ "google-cloud-secret_manager-v1beta2+FILLER": "0.0.0", "google-cloud-secure_source_manager": "2.1.0", "google-cloud-secure_source_manager+FILLER": "0.0.0", - "google-cloud-secure_source_manager-v1": "2.2.0", + "google-cloud-secure_source_manager-v1": "2.2.1", "google-cloud-secure_source_manager-v1+FILLER": "0.0.0", "google-cloud-security-private_ca": "2.0.1", "google-cloud-security-private_ca+FILLER": "0.0.0", diff --git a/google-cloud-secure_source_manager-v1/CHANGELOG.md b/google-cloud-secure_source_manager-v1/CHANGELOG.md index ffe02a3d3bda..41b839cd671a 100644 --- a/google-cloud-secure_source_manager-v1/CHANGELOG.md +++ b/google-cloud-secure_source_manager-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.2.1 (2025-08-12) + +#### Documentation + +* Provided additional details on methods related to pull request comments ([#30746](https://github.com/googleapis/google-cloud-ruby/issues/30746)) + ### 2.2.0 (2025-07-28) #### Features diff --git a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb index e35bacdfe8a0..b8bb693bf25d 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module SecureSourceManager module V1 - VERSION = "2.2.0" + VERSION = "2.2.1" end end end diff --git a/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json b/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json index 45e1342af9f2..b5c9339abf25 100644 --- a/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json +++ b/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-secure_source_manager-v1", - "version": "2.2.0", + "version": "2.2.1", "language": "RUBY", "apis": [ { From 164ee0095b5da956334fea937050a61dad1826b2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 14:07:01 -0700 Subject: [PATCH 410/457] feat: add Firestore CloneDatabase support (#30753) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 789807783 Source-Link: https://github.com/googleapis/googleapis/commit/3d37c58ad2a4e72ff051aa329eb30d9f658e1b66 Source-Link: https://github.com/googleapis/googleapis-gen/commit/66d3f2f3aa57d242534a1f3726b598f64ba69fcb Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpcmVzdG9yZS1hZG1pbi12MS8uT3dsQm90LnlhbWwiLCJoIjoiNjZkM2YyZjNhYTU3ZDI0MjUzNGExZjM3MjZiNTk4ZjY0YmE2OWZjYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 4 + .../gapic_metadata.json | 5 + .../admin/v1/firestore_admin/client.rb | 156 ++++++ .../admin/v1/firestore_admin/rest/client.rb | 140 ++++++ .../v1/firestore_admin/rest/service_stub.rb | 62 +++ .../firestore/admin/v1/firestore_admin_pb.rb | 6 +- .../admin/v1/firestore_admin_services_pb.rb | 18 + .../google/firestore/admin/v1/operation_pb.rb | 5 +- .../google/firestore/admin/v1/snapshot_pb.rb | 49 ++ .../proto_docs/google/api/routing.rb | 459 ++++++++++++++++++ .../firestore/admin/v1/firestore_admin.rb | 51 ++ .../google/firestore/admin/v1/operation.rb | 25 + .../google/firestore/admin/v1/snapshot.rb | 48 ++ .../firestore_admin/clone_database.rb | 54 +++ ...et_metadata_google.firestore.admin.v1.json | 40 ++ .../admin/v1/firestore_admin_rest_test.rb | 58 +++ .../admin/v1/firestore_admin_test.rb | 71 +++ 17 files changed, 1249 insertions(+), 2 deletions(-) create mode 100644 google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb create mode 100644 google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb create mode 100644 google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb create mode 100644 google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb diff --git a/google-cloud-firestore-admin-v1/.owlbot-manifest.json b/google-cloud-firestore-admin-v1/.owlbot-manifest.json index c45fb915c774..559e4a3f8936 100644 --- a/google-cloud-firestore-admin-v1/.owlbot-manifest.json +++ b/google-cloud-firestore-admin-v1/.owlbot-manifest.json @@ -35,12 +35,14 @@ "lib/google/firestore/admin/v1/location_pb.rb", "lib/google/firestore/admin/v1/operation_pb.rb", "lib/google/firestore/admin/v1/schedule_pb.rb", + "lib/google/firestore/admin/v1/snapshot_pb.rb", "lib/google/firestore/admin/v1/user_creds_pb.rb", "proto_docs/README.md", "proto_docs/google/api/client.rb", "proto_docs/google/api/field_behavior.rb", "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", + "proto_docs/google/api/routing.rb", "proto_docs/google/firestore/admin/v1/backup.rb", "proto_docs/google/firestore/admin/v1/database.rb", "proto_docs/google/firestore/admin/v1/field.rb", @@ -49,6 +51,7 @@ "proto_docs/google/firestore/admin/v1/location.rb", "proto_docs/google/firestore/admin/v1/operation.rb", "proto_docs/google/firestore/admin/v1/schedule.rb", + "proto_docs/google/firestore/admin/v1/snapshot.rb", "proto_docs/google/firestore/admin/v1/user_creds.rb", "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", @@ -60,6 +63,7 @@ "proto_docs/google/type/dayofweek.rb", "snippets/Gemfile", "snippets/firestore_admin/bulk_delete_documents.rb", + "snippets/firestore_admin/clone_database.rb", "snippets/firestore_admin/create_backup_schedule.rb", "snippets/firestore_admin/create_database.rb", "snippets/firestore_admin/create_index.rb", diff --git a/google-cloud-firestore-admin-v1/gapic_metadata.json b/google-cloud-firestore-admin-v1/gapic_metadata.json index 562a0b3e7ff0..b3ac64250ccf 100644 --- a/google-cloud-firestore-admin-v1/gapic_metadata.json +++ b/google-cloud-firestore-admin-v1/gapic_metadata.json @@ -164,6 +164,11 @@ "methods": [ "delete_backup_schedule" ] + }, + "CloneDatabase": { + "methods": [ + "clone_database" + ] } } } diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb index d8601c8675ae..e751fcce9352 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb @@ -138,6 +138,8 @@ def self.configure default_config.rpcs.restore_database.timeout = 120.0 + default_config.rpcs.clone_database.timeout = 120.0 + default_config end yield @configure if block_given? @@ -3276,6 +3278,153 @@ def delete_backup_schedule request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Creates a new database by cloning an existing one. + # + # The new database must be in the same cloud region or multi-region location + # as the existing database. This behaves similar to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database FirestoreAdmin.CreateDatabase} + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # database. + # + # The {::Google::Longrunning::Operation long-running operation} can be used to + # track the progress of the clone, with the Operation's + # {::Google::Longrunning::Operation#metadata metadata} field type being the + # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseMetadata CloneDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} type is the + # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the clone was + # successful. The new database is not readable or writeable until the LRO has + # completed. + # + # @overload clone_database(request, options = nil) + # Pass arguments to `clone_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::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 clone_database(parent: nil, database_id: nil, pitr_snapshot: nil, encryption_config: nil, tags: nil) + # Pass arguments to `clone_database` 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 to clone the database in. Format is + # `projects/{project_id}`. + # @param database_id [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @param pitr_snapshot [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot, ::Hash] + # Required. Specification of the PITR data to clone from. The source database + # must exist. + # + # The cloned database will be created in the same location as the source + # database. + # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] + # Optional. Encryption configuration for the cloned database. + # + # If this field is not specified, the cloned database will use + # the same encryption configuration as the source database, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @param tags [::Hash{::String => ::String}] + # Optional. Immutable. Tags to be bound to the cloned database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new + # + # # Call the clone_database method. + # result = client.clone_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def clone_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest + + # 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.clone_database.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::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.pitr_snapshot&.database + regex_match = %r{^projects/(?[^/]+)(?:/.*)?$}.match request.pitr_snapshot.database + if regex_match + header_params["project_id"] = regex_match["project_id".to_s] + end + end + if request.pitr_snapshot&.database + regex_match = %r{^projects/[^/]+/databases/(?[^/]+)(?:/.*)?$}.match request.pitr_snapshot.database + if regex_match + header_params["database_id"] = regex_match["database_id".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.clone_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.clone_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :clone_database, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 FirestoreAdmin API. # @@ -3597,6 +3746,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule + ## + # RPC-specific configuration for `clone_database` + # @return [::Gapic::Config::Method] + # + attr_reader :clone_database # @private def initialize parent_rpcs = nil @@ -3662,6 +3816,8 @@ def initialize parent_rpcs = nil @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config + clone_database_config = parent_rpcs.clone_database if parent_rpcs.respond_to? :clone_database + @clone_database = ::Gapic::Config::Method.new clone_database_config yield self if block_given? end diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb index e167aee024f8..6fb605458391 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb @@ -140,6 +140,8 @@ def self.configure default_config.rpcs.restore_database.timeout = 120.0 + default_config.rpcs.clone_database.timeout = 120.0 + default_config end yield @configure if block_given? @@ -3052,6 +3054,137 @@ def delete_backup_schedule request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Creates a new database by cloning an existing one. + # + # The new database must be in the same cloud region or multi-region location + # as the existing database. This behaves similar to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#create_database FirestoreAdmin.CreateDatabase} + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # database. + # + # The {::Google::Longrunning::Operation long-running operation} can be used to + # track the progress of the clone, with the Operation's + # {::Google::Longrunning::Operation#metadata metadata} field type being the + # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseMetadata CloneDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} type is the + # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the clone was + # successful. The new database is not readable or writeable until the LRO has + # completed. + # + # @overload clone_database(request, options = nil) + # Pass arguments to `clone_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::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 clone_database(parent: nil, database_id: nil, pitr_snapshot: nil, encryption_config: nil, tags: nil) + # Pass arguments to `clone_database` 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 to clone the database in. Format is + # `projects/{project_id}`. + # @param database_id [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @param pitr_snapshot [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot, ::Hash] + # Required. Specification of the PITR data to clone from. The source database + # must exist. + # + # The cloned database will be created in the same location as the source + # database. + # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] + # Optional. Encryption configuration for the cloned database. + # + # If this field is not specified, the cloned database will use + # the same encryption configuration as the source database, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @param tags [::Hash{::String => ::String}] + # Optional. Immutable. Tags to be bound to the cloned database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new + # + # # Call the clone_database method. + # result = client.clone_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def clone_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest + + # 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.clone_database.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::Firestore::Admin::V1::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.clone_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.clone_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.clone_database request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 FirestoreAdmin REST API. # @@ -3353,6 +3486,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_backup_schedule + ## + # RPC-specific configuration for `clone_database` + # @return [::Gapic::Config::Method] + # + attr_reader :clone_database # @private def initialize parent_rpcs = nil @@ -3418,6 +3556,8 @@ def initialize parent_rpcs = nil @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config + clone_database_config = parent_rpcs.clone_database if parent_rpcs.respond_to? :clone_database + @clone_database = ::Gapic::Config::Method.new clone_database_config yield self if block_given? end diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb index 18d7ffef7733..e58fd57003ab 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb @@ -1314,6 +1314,46 @@ def delete_backup_schedule request_pb, options = nil end end + ## + # Baseline implementation for the clone_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def clone_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_clone_database_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: "clone_database", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -1978,6 +2018,28 @@ def self.transcode_delete_backup_schedule_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the clone_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_clone_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/databases:clone", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb index fdcf65e66a55..571d8d96b27f 100644 --- a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb +++ b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb @@ -8,12 +8,14 @@ require 'google/api/client_pb' require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/api/routing_pb' require 'google/firestore/admin/v1/backup_pb' require 'google/firestore/admin/v1/database_pb' require 'google/firestore/admin/v1/field_pb' require 'google/firestore/admin/v1/index_pb' require 'google/firestore/admin/v1/operation_pb' require 'google/firestore/admin/v1/schedule_pb' +require 'google/firestore/admin/v1/snapshot_pb' require 'google/firestore/admin/v1/user_creds_pb' require 'google/longrunning/operations_pb' require 'google/protobuf/empty_pb' @@ -21,7 +23,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/firestore/admin/v1/backup.proto\x1a(google/firestore/admin/v1/database.proto\x1a%google/firestore/admin/v1/field.proto\x1a%google/firestore/admin/v1/index.proto\x1a)google/firestore/admin/v1/operation.proto\x1a(google/firestore/admin/v1/schedule.proto\x1a*google/firestore/admin/v1/user_creds.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"g\n\x14ListDatabasesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"\xa8\x01\n\x15\x43reateDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12:\n\x08\x64\x61tabase\x18\x02 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x18\n\x16\x43reateDatabaseMetadata\"d\n\x15ListDatabasesResponse\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.google.firestore.admin.v1.Database\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"\x84\x01\n\x15UpdateDatabaseRequest\x12:\n\x08\x64\x61tabase\x18\x01 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x18\n\x16UpdateDatabaseMetadata\"^\n\x15\x44\x65leteDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x18\n\x16\x44\x65leteDatabaseMetadata\"\xaf\x01\n\x16\x43reateUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\x12=\n\nuser_creds\x18\x02 \x01(\x0b\x32$.google.firestore.admin.v1.UserCredsB\x03\xe0\x41\x02\x12\x1a\n\ruser_creds_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x14ListUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\"Q\n\x15ListUserCredsResponse\x12\x38\n\nuser_creds\x18\x01 \x03(\x0b\x32$.google.firestore.admin.v1.UserCreds\"R\n\x16\x45nableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"S\n\x17\x44isableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"T\n\x18ResetUserPasswordRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x16\x44\x65leteUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"\xa1\x01\n\x1b\x43reateBackupScheduleRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x02 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\"Y\n\x18GetBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x97\x01\n\x1bUpdateBackupScheduleRequest\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x01 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"W\n\x1aListBackupSchedulesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"b\n\x1bListBackupSchedulesResponse\x12\x43\n\x10\x62\x61\x63kup_schedules\x18\x01 \x03(\x0b\x32).google.firestore.admin.v1.BackupSchedule\"\\\n\x1b\x44\x65leteBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x8c\x01\n\x12\x43reateIndexRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x34\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.IndexB\x03\xe0\x41\x02\"\x8d\x01\n\x12ListIndexesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"J\n\x12\x44\x65leteIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"{\n\x12UpdateFieldRequest\x12\x34\n\x05\x66ield\x18\x01 \x01(\x0b\x32 .google.firestore.admin.v1.FieldB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x0fGetFieldRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Field\"\x8c\x01\n\x11ListFieldsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x12ListFieldsResponse\x12\x30\n\x06\x66ields\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Field\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x01\n\x16\x45xportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\x12\x31\n\rsnapshot_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9a\x01\n\x16ImportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\"\x8e\x01\n\x1a\x42ulkDeleteDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x1b\n\x0e\x63ollection_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rnamespace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x1d\n\x1b\x42ulkDeleteDocumentsResponse\"I\n\x10GetBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"_\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"^\n\x13ListBackupsResponse\x12\x32\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32!.google.firestore.admin.v1.Backup\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x13\x44\x65leteBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"\xfc\x02\n\x16RestoreDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x06\x62\x61\x63kup\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12T\n\x11\x65ncryption_config\x18\t \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x12Q\n\x04tags\x18\n \x03(\x0b\x32;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xe0\x41\x05\xe0\x41\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xc1/\n\x0e\x46irestoreAdmin\x12\xdb\x01\n\x0b\x43reateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1f\n\x05Index\x12\x16IndexOperationMetadata\xda\x41\x0cparent,index\x82\xd3\xe4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xbd\x01\n\x0bListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1a..google.firestore.admin.v1.ListIndexesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xa7\x01\n\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1a .google.firestore.admin.v1.Index\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa3\x01\n\x0b\x44\x65leteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa6\x01\n\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1a .google.firestore.admin.v1.Field\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xd9\x01\n\x0bUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41\x1f\n\x05\x46ield\x12\x16\x46ieldOperationMetadata\xda\x41\x05\x66ield\x82\xd3\xe4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05\x66ield\x12\xb9\x01\n\nListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1a-.google.firestore.admin.v1.ListFieldsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xdd\x01\n\x0f\x45xportDocuments\x12\x31.google.firestore.admin.v1.ExportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x32\n\x17\x45xportDocumentsResponse\x12\x17\x45xportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xdb\x01\n\x0fImportDocuments\x12\x31.google.firestore.admin.v1.ImportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xf2\x01\n\x13\x42ulkDeleteDocuments\x12\x35.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41:\n\x1b\x42ulkDeleteDocumentsResponse\x12\x1b\x42ulkDeleteDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xd9\x01\n\x0e\x43reateDatabase\x12\x30.google.firestore.admin.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x43reateDatabaseMetadata\xda\x41\x1bparent,database,database_id\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08\x64\x61tabase\x12\x93\x01\n\x0bGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1a#.google.firestore.admin.v1.Database\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xa6\x01\n\rListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1a\x30.google.firestore.admin.v1.ListDatabasesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xdb\x01\n\x0eUpdateDatabase\x12\x30.google.firestore.admin.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x36\x32*/v1/{database.name=projects/*/databases/*}:\x08\x64\x61tabase\x12\xb8\x01\n\x0e\x44\x65leteDatabase\x12\x30.google.firestore.admin.v1.DeleteDatabaseRequest\x1a\x1d.google.longrunning.Operation\"U\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x44\x65leteDatabaseMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xcf\x01\n\x0f\x43reateUserCreds\x12\x31.google.firestore.admin.v1.CreateUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"c\xda\x41\x1fparent,user_creds,user_creds_id\x82\xd3\xe4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\nuser_creds\x12\xa2\x01\n\x0cGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xb2\x01\n\rListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1a\x30.google.firestore.admin.v1.ListUserCredsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xb2\x01\n\x0f\x45nableUserCreds\x12\x31.google.firestore.admin.v1.EnableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xb5\x01\n\x10\x44isableUserCreds\x12\x32.google.firestore.admin.v1.DisableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xbd\x01\n\x11ResetUserPassword\x12\x33.google.firestore.admin.v1.ResetUserPasswordRequest\x1a$.google.firestore.admin.v1.UserCreds\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9a\x01\n\x0f\x44\x65leteUserCreds\x12\x31.google.firestore.admin.v1.DeleteUserCredsRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\n\tGetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1a!.google.firestore.admin.v1.Backup\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xaa\x01\n\x0bListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1a..google.firestore.admin.v1.ListBackupsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\n\x0c\x44\x65leteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xbf\x01\n\x0fRestoreDatabase\x12\x31.google.firestore.admin.v1.RestoreDatabaseRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41#\n\x08\x44\x61tabase\x12\x17RestoreDatabaseMetadata\x82\xd3\xe4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xe0\x01\n\x14\x43reateBackupSchedule\x12\x36.google.firestore.admin.v1.CreateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"e\xda\x41\x16parent,backup_schedule\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xb7\x01\n\x11GetBackupSchedule\x12\x33.google.firestore.admin.v1.GetBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xca\x01\n\x13ListBackupSchedules\x12\x35.google.firestore.admin.v1.ListBackupSchedulesRequest\x1a\x36.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xf5\x01\n\x14UpdateBackupSchedule\x12\x36.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"z\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xaa\x01\n\x14\x44\x65leteBackupSchedule\x12\x36.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xa5\x03\n\x1d\x63om.google.firestore.admin.v1B\x13\x46irestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41L\n!firestore.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41q\n(firestore.googleapis.com/CollectionGroup\x12\x45projects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3" +descriptor_data = "\n/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a&google/firestore/admin/v1/backup.proto\x1a(google/firestore/admin/v1/database.proto\x1a%google/firestore/admin/v1/field.proto\x1a%google/firestore/admin/v1/index.proto\x1a)google/firestore/admin/v1/operation.proto\x1a(google/firestore/admin/v1/schedule.proto\x1a(google/firestore/admin/v1/snapshot.proto\x1a*google/firestore/admin/v1/user_creds.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"g\n\x14ListDatabasesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"\xa8\x01\n\x15\x43reateDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12:\n\x08\x64\x61tabase\x18\x02 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x18\n\x16\x43reateDatabaseMetadata\"d\n\x15ListDatabasesResponse\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.google.firestore.admin.v1.Database\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"\x84\x01\n\x15UpdateDatabaseRequest\x12:\n\x08\x64\x61tabase\x18\x01 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x18\n\x16UpdateDatabaseMetadata\"^\n\x15\x44\x65leteDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x18\n\x16\x44\x65leteDatabaseMetadata\"\xaf\x01\n\x16\x43reateUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\x12=\n\nuser_creds\x18\x02 \x01(\x0b\x32$.google.firestore.admin.v1.UserCredsB\x03\xe0\x41\x02\x12\x1a\n\ruser_creds_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x14ListUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\"Q\n\x15ListUserCredsResponse\x12\x38\n\nuser_creds\x18\x01 \x03(\x0b\x32$.google.firestore.admin.v1.UserCreds\"R\n\x16\x45nableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"S\n\x17\x44isableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"T\n\x18ResetUserPasswordRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x16\x44\x65leteUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"\xa1\x01\n\x1b\x43reateBackupScheduleRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x02 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\"Y\n\x18GetBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x97\x01\n\x1bUpdateBackupScheduleRequest\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x01 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"W\n\x1aListBackupSchedulesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"b\n\x1bListBackupSchedulesResponse\x12\x43\n\x10\x62\x61\x63kup_schedules\x18\x01 \x03(\x0b\x32).google.firestore.admin.v1.BackupSchedule\"\\\n\x1b\x44\x65leteBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x8c\x01\n\x12\x43reateIndexRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x34\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.IndexB\x03\xe0\x41\x02\"\x8d\x01\n\x12ListIndexesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"J\n\x12\x44\x65leteIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"{\n\x12UpdateFieldRequest\x12\x34\n\x05\x66ield\x18\x01 \x01(\x0b\x32 .google.firestore.admin.v1.FieldB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x0fGetFieldRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Field\"\x8c\x01\n\x11ListFieldsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x12ListFieldsResponse\x12\x30\n\x06\x66ields\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Field\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x01\n\x16\x45xportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\x12\x31\n\rsnapshot_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9a\x01\n\x16ImportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\"\x8e\x01\n\x1a\x42ulkDeleteDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x1b\n\x0e\x63ollection_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rnamespace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x1d\n\x1b\x42ulkDeleteDocumentsResponse\"I\n\x10GetBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"_\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"^\n\x13ListBackupsResponse\x12\x32\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32!.google.firestore.admin.v1.Backup\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x13\x44\x65leteBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"\xfc\x02\n\x16RestoreDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x06\x62\x61\x63kup\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12T\n\x11\x65ncryption_config\x18\t \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x12Q\n\x04tags\x18\n \x03(\x0b\x32;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xe0\x41\x05\xe0\x41\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x84\x03\n\x14\x43loneDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\rpitr_snapshot\x18\x06 \x01(\x0b\x32\'.google.firestore.admin.v1.PitrSnapshotB\x03\xe0\x41\x02\x12T\n\x11\x65ncryption_config\x18\x04 \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x12O\n\x04tags\x18\x05 \x03(\x0b\x32\x39.google.firestore.admin.v1.CloneDatabaseRequest.TagsEntryB\x06\xe0\x41\x05\xe0\x41\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xfb\x31\n\x0e\x46irestoreAdmin\x12\xdb\x01\n\x0b\x43reateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1f\n\x05Index\x12\x16IndexOperationMetadata\xda\x41\x0cparent,index\x82\xd3\xe4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xbd\x01\n\x0bListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1a..google.firestore.admin.v1.ListIndexesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xa7\x01\n\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1a .google.firestore.admin.v1.Index\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa3\x01\n\x0b\x44\x65leteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa6\x01\n\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1a .google.firestore.admin.v1.Field\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xd9\x01\n\x0bUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41\x1f\n\x05\x46ield\x12\x16\x46ieldOperationMetadata\xda\x41\x05\x66ield\x82\xd3\xe4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05\x66ield\x12\xb9\x01\n\nListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1a-.google.firestore.admin.v1.ListFieldsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xdd\x01\n\x0f\x45xportDocuments\x12\x31.google.firestore.admin.v1.ExportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x32\n\x17\x45xportDocumentsResponse\x12\x17\x45xportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xdb\x01\n\x0fImportDocuments\x12\x31.google.firestore.admin.v1.ImportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xf2\x01\n\x13\x42ulkDeleteDocuments\x12\x35.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41:\n\x1b\x42ulkDeleteDocumentsResponse\x12\x1b\x42ulkDeleteDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xd9\x01\n\x0e\x43reateDatabase\x12\x30.google.firestore.admin.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x43reateDatabaseMetadata\xda\x41\x1bparent,database,database_id\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08\x64\x61tabase\x12\x93\x01\n\x0bGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1a#.google.firestore.admin.v1.Database\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xa6\x01\n\rListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1a\x30.google.firestore.admin.v1.ListDatabasesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xdb\x01\n\x0eUpdateDatabase\x12\x30.google.firestore.admin.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x36\x32*/v1/{database.name=projects/*/databases/*}:\x08\x64\x61tabase\x12\xb8\x01\n\x0e\x44\x65leteDatabase\x12\x30.google.firestore.admin.v1.DeleteDatabaseRequest\x1a\x1d.google.longrunning.Operation\"U\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x44\x65leteDatabaseMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xcf\x01\n\x0f\x43reateUserCreds\x12\x31.google.firestore.admin.v1.CreateUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"c\xda\x41\x1fparent,user_creds,user_creds_id\x82\xd3\xe4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\nuser_creds\x12\xa2\x01\n\x0cGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xb2\x01\n\rListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1a\x30.google.firestore.admin.v1.ListUserCredsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xb2\x01\n\x0f\x45nableUserCreds\x12\x31.google.firestore.admin.v1.EnableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xb5\x01\n\x10\x44isableUserCreds\x12\x32.google.firestore.admin.v1.DisableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xbd\x01\n\x11ResetUserPassword\x12\x33.google.firestore.admin.v1.ResetUserPasswordRequest\x1a$.google.firestore.admin.v1.UserCreds\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9a\x01\n\x0f\x44\x65leteUserCreds\x12\x31.google.firestore.admin.v1.DeleteUserCredsRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\n\tGetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1a!.google.firestore.admin.v1.Backup\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xaa\x01\n\x0bListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1a..google.firestore.admin.v1.ListBackupsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\n\x0c\x44\x65leteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xbf\x01\n\x0fRestoreDatabase\x12\x31.google.firestore.admin.v1.RestoreDatabaseRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41#\n\x08\x44\x61tabase\x12\x17RestoreDatabaseMetadata\x82\xd3\xe4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xe0\x01\n\x14\x43reateBackupSchedule\x12\x36.google.firestore.admin.v1.CreateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"e\xda\x41\x16parent,backup_schedule\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xb7\x01\n\x11GetBackupSchedule\x12\x33.google.firestore.admin.v1.GetBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xca\x01\n\x13ListBackupSchedules\x12\x35.google.firestore.admin.v1.ListBackupSchedulesRequest\x1a\x36.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xf5\x01\n\x14UpdateBackupSchedule\x12\x36.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"z\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xaa\x01\n\x14\x44\x65leteBackupSchedule\x12\x36.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xb7\x02\n\rCloneDatabase\x12/.google.firestore.admin.v1.CloneDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41!\n\x08\x44\x61tabase\x12\x15\x43loneDatabaseMetadata\x82\xd3\xe4\x93\x02,\"\'/v1/{parent=projects/*}/databases:clone:\x01*\x8a\xd3\xe4\x93\x02y\x12\x34\n\x16pitr_snapshot.database\x12\x1aprojects/{project_id=*}/**\x12\x41\n\x16pitr_snapshot.database\x12\'projects/*/databases/{database_id=*}/**\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xa5\x03\n\x1d\x63om.google.firestore.admin.v1B\x13\x46irestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41L\n!firestore.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41q\n(firestore.googleapis.com/CollectionGroup\x12\x45projects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -44,6 +46,7 @@ ["google.firestore.admin.v1.Field", "google/firestore/admin/v1/field.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.firestore.admin.v1.Backup", "google/firestore/admin/v1/backup.proto"], + ["google.firestore.admin.v1.PitrSnapshot", "google/firestore/admin/v1/snapshot.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -101,6 +104,7 @@ module V1 ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupsResponse").msgclass DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteBackupRequest").msgclass RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.RestoreDatabaseRequest").msgclass + CloneDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CloneDatabaseRequest").msgclass end end end diff --git a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb index 1500d1dd5d3a..0096a9c9b1c2 100644 --- a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +++ b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb @@ -191,6 +191,24 @@ class Service rpc :UpdateBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, ::Google::Cloud::Firestore::Admin::V1::BackupSchedule # Deletes a backup schedule. rpc :DeleteBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, ::Google::Protobuf::Empty + # Creates a new database by cloning an existing one. + # + # The new database must be in the same cloud region or multi-region location + # as the existing database. This behaves similar to + # [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # database. + # + # The [long-running operation][google.longrunning.Operation] can be used to + # track the progress of the clone, with the Operation's + # [metadata][google.longrunning.Operation.metadata] field type being the + # [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. + # The [response][google.longrunning.Operation.response] type is the + # [Database][google.firestore.admin.v1.Database] if the clone was + # successful. The new database is not readable or writeable until the LRO has + # completed. + rpc :CloneDatabase, ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class diff --git a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb index f08c9f4556c9..604a6a498bc4 100644 --- a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb +++ b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb @@ -6,10 +6,11 @@ require 'google/api/resource_pb' require 'google/firestore/admin/v1/index_pb' +require 'google/firestore/admin/v1/snapshot_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1a\x19google/api/resource.proto\x1a%google/firestore/admin/v1/index.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x02\n\x16IndexOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05index\x18\x03 \x01(\t\x12\x38\n\x05state\x18\x04 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\x99\x07\n\x16\x46ieldOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05\x66ield\x18\x03 \x01(\t\x12_\n\x13index_config_deltas\x18\x04 \x03(\x0b\x32\x42.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x12\x38\n\x05state\x18\x05 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x07 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12Z\n\x10ttl_config_delta\x18\x08 \x01(\x0b\x32@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1a\xe7\x01\n\x10IndexConfigDelta\x12\x62\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.Index\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x1a\xb2\x01\n\x0eTtlConfigDelta\x12`\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\"\xb6\x03\n\x17\x45xportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\x12\x31\n\rsnapshot_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x82\x03\n\x17ImportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\"\x9f\x03\n\x1b\x42ulkDeleteDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x15\n\rnamespace_ids\x18\x07 \x03(\t\x12\x31\n\rsnapshot_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"4\n\x17\x45xportDocumentsResponse\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\"\xed\x02\n\x17RestoreDatabaseMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12\x38\n\x08\x64\x61tabase\x18\x04 \x01(\tB&\xfa\x41#\n!firestore.googleapis.com/Database\x12\x34\n\x06\x62\x61\x63kup\x18\x05 \x01(\tB$\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12@\n\x13progress_percentage\x18\x08 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\":\n\x08Progress\x12\x16\n\x0e\x65stimated_work\x18\x01 \x01(\x03\x12\x16\n\x0e\x63ompleted_work\x18\x02 \x01(\x03*\x9e\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nPROCESSING\x10\x02\x12\x0e\n\nCANCELLING\x10\x03\x12\x0e\n\nFINALIZING\x10\x04\x12\x0e\n\nSUCCESSFUL\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x42\xdd\x01\n\x1d\x63om.google.firestore.admin.v1B\x0eOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" +descriptor_data = "\n)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1a\x19google/api/resource.proto\x1a%google/firestore/admin/v1/index.proto\x1a(google/firestore/admin/v1/snapshot.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x02\n\x16IndexOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05index\x18\x03 \x01(\t\x12\x38\n\x05state\x18\x04 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\x99\x07\n\x16\x46ieldOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05\x66ield\x18\x03 \x01(\t\x12_\n\x13index_config_deltas\x18\x04 \x03(\x0b\x32\x42.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x12\x38\n\x05state\x18\x05 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x07 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12Z\n\x10ttl_config_delta\x18\x08 \x01(\x0b\x32@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1a\xe7\x01\n\x10IndexConfigDelta\x12\x62\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.Index\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x1a\xb2\x01\n\x0eTtlConfigDelta\x12`\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\"\xb6\x03\n\x17\x45xportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\x12\x31\n\rsnapshot_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x82\x03\n\x17ImportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\"\x9f\x03\n\x1b\x42ulkDeleteDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x15\n\rnamespace_ids\x18\x07 \x03(\t\x12\x31\n\rsnapshot_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"4\n\x17\x45xportDocumentsResponse\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\"\xed\x02\n\x17RestoreDatabaseMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12\x38\n\x08\x64\x61tabase\x18\x04 \x01(\tB&\xfa\x41#\n!firestore.googleapis.com/Database\x12\x34\n\x06\x62\x61\x63kup\x18\x05 \x01(\tB$\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12@\n\x13progress_percentage\x18\x08 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\xf5\x02\n\x15\x43loneDatabaseMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12\x38\n\x08\x64\x61tabase\x18\x04 \x01(\tB&\xfa\x41#\n!firestore.googleapis.com/Database\x12>\n\rpitr_snapshot\x18\x07 \x01(\x0b\x32\'.google.firestore.admin.v1.PitrSnapshot\x12@\n\x13progress_percentage\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\":\n\x08Progress\x12\x16\n\x0e\x65stimated_work\x18\x01 \x01(\x03\x12\x16\n\x0e\x63ompleted_work\x18\x02 \x01(\x03*\x9e\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nPROCESSING\x10\x02\x12\x0e\n\nCANCELLING\x10\x03\x12\x0e\n\nFINALIZING\x10\x04\x12\x0e\n\nSUCCESSFUL\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x42\xdd\x01\n\x1d\x63om.google.firestore.admin.v1B\x0eOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -26,6 +27,7 @@ imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"], + ["google.firestore.admin.v1.PitrSnapshot", "google/firestore/admin/v1/snapshot.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -53,6 +55,7 @@ module V1 BulkDeleteDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BulkDeleteDocumentsMetadata").msgclass ExportDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsResponse").msgclass RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.RestoreDatabaseMetadata").msgclass + CloneDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CloneDatabaseMetadata").msgclass Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Progress").msgclass OperationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.OperationState").enummodule end diff --git a/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb new file mode 100644 index 000000000000..edea876f8875 --- /dev/null +++ b/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/snapshot.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/firestore/admin/v1/snapshot.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x0cPitrSnapshot\x12;\n\x08\x64\x61tabase\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x19\n\x0c\x64\x61tabase_uid\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x03\x12\x36\n\rsnapshot_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x42\xe0\x01\n\x1d\x63om.google.firestore.admin.v1B\x11PitrSnapshotProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + PitrSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.PitrSnapshot").msgclass + end + end + end + end +end diff --git a/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb b/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..0986795fa1e6 --- /dev/null +++ b/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb @@ -0,0 +1,459 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/
` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. Every key + # and value must be percent-encoded, and joined together in the format of + # `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb index 73786068aa54..2f712c505a59 100644 --- a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb +++ b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb @@ -688,6 +688,57 @@ class TagsEntry extend ::Google::Protobuf::MessageExts::ClassMethods end end + + # The request message for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database FirestoreAdmin.CloneDatabase}. + # @!attribute [rw] parent + # @return [::String] + # Required. The project to clone the database in. Format is + # `projects/{project_id}`. + # @!attribute [rw] database_id + # @return [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @!attribute [rw] pitr_snapshot + # @return [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot] + # Required. Specification of the PITR data to clone from. The source database + # must exist. + # + # The cloned database will be created in the same location as the source + # database. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig] + # Optional. Encryption configuration for the cloned database. + # + # If this field is not specified, the cloned database will use + # the same encryption configuration as the source database, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Immutable. Tags to be bound to the cloned database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + class CloneDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end end end end diff --git a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb index 204d2705ba0a..e8a7cb5c5daf 100644 --- a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb +++ b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb @@ -275,6 +275,31 @@ class RestoreDatabaseMetadata extend ::Google::Protobuf::MessageExts::ClassMethods end + # Metadata for the {::Google::Longrunning::Operation long-running operation} from + # the [CloneDatabase][google.firestore.admin.v1.CloneDatabase] request. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time the clone was started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the clone finished, unset for ongoing clones. + # @!attribute [rw] operation_state + # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] + # The operation state of the clone. + # @!attribute [rw] database + # @return [::String] + # The name of the database being cloned to. + # @!attribute [rw] pitr_snapshot + # @return [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot] + # The snapshot from which this database was cloned. + # @!attribute [rw] progress_percentage + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # How far along the clone is as an estimated percentage of remaining time. + class CloneDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Describes the progress of the operation. # Unit of work is generic and must be interpreted based on where # {::Google::Cloud::Firestore::Admin::V1::Progress Progress} is used. diff --git a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb new file mode 100644 index 000000000000..85900dc77c54 --- /dev/null +++ b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Firestore + module Admin + module V1 + # A consistent snapshot of a database at a specific point in time. + # A PITR (Point-in-time recovery) snapshot with previous versions of a + # database's data is available for every minute up to the associated database's + # data retention period. If the PITR feature is enabled, the retention period + # is 7 days; otherwise, it is one hour. + # @!attribute [rw] database + # @return [::String] + # Required. The name of the database that this was a snapshot of. Format: + # `projects/{project}/databases/{database}`. + # @!attribute [r] database_uid + # @return [::String] + # Output only. Public UUID of the database the snapshot was associated with. + # @!attribute [rw] snapshot_time + # @return [::Google::Protobuf::Timestamp] + # Required. Snapshot time of the database. + class PitrSnapshot + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb b/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb new file mode 100644 index 000000000000..9821a8295179 --- /dev/null +++ b/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the clone_database call in the FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database. +# +def clone_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new + + # Call the clone_database method. + result = client.clone_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] diff --git a/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json b/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json index 9ab17f0e9245..ad778f43c8ae 100644 --- a/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json +++ b/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json @@ -1250,6 +1250,46 @@ "type": "FULL" } ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync", + "title": "Snippet for the clone_database call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database.", + "file": "firestore_admin/clone_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "clone_database", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "CloneDatabase", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.CloneDatabase", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb index 8a259caa7d22..dae181a009b4 100644 --- a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb +++ b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb @@ -1783,6 +1783,64 @@ def test_delete_backup_schedule end end + def test_clone_database + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + database_id = "hello world" + pitr_snapshot = {} + encryption_config = {} + tags = {} + + clone_database_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::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_clone_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, clone_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.clone_database parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.clone_database ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.clone_database(::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, clone_database_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb index 27829c905732..bb0ac14d41e1 100644 --- a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb +++ b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb @@ -1979,6 +1979,77 @@ def test_delete_backup_schedule end end + def test_clone_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + database_id = "hello world" + pitr_snapshot = {} + encryption_config = {} + tags = {} + + clone_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :clone_database, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["database_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::PitrSnapshot), request["pitr_snapshot"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig), request["encryption_config"] + assert_equal({}, request["tags"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, clone_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.clone_database parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.clone_database ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.clone_database(::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, clone_database_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure From 5eb9066f82257e7f86ca8dc0c4928c0965238726 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 14:07:33 -0700 Subject: [PATCH 411/457] feat: Introducing new Grant states for Withdrawal operation (#30750) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Introducing new Grant states for Withdrawal operation PiperOrigin-RevId: 789206965 Source-Link: https://github.com/googleapis/googleapis/commit/fb0d2d75cadbe06b2ab06baf7239f279d907fc7c Source-Link: https://github.com/googleapis/googleapis-gen/commit/fc7a38c3b7fb08d37a613f22954343dc30443832 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXByaXZpbGVnZWRfYWNjZXNzX21hbmFnZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImZjN2EzOGMzYjdmYjA4ZDM3YTYxM2YyMjk1NDM0M2RjMzA0NDM4MzIifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1/privilegedaccessmanager_pb.rb | 3 +- .../v1/privilegedaccessmanager.rb | 37 ++++++++++++++----- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/google-cloud-privileged_access_manager-v1/lib/google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager_pb.rb b/google-cloud-privileged_access_manager-v1/lib/google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager_pb.rb index 47f5fc9e93a2..a05367d9f2af 100644 --- a/google-cloud-privileged_access_manager-v1/lib/google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager_pb.rb +++ b/google-cloud-privileged_access_manager-v1/lib/google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager_pb.rb @@ -15,7 +15,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\nEgoogle/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.proto\x12\'google.cloud.privilegedaccessmanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"j\n\x1c\x43heckOnboardingStatusRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32privilegedaccessmanager.googleapis.com/Entitlement\"\xe3\x02\n\x1d\x43heckOnboardingStatusResponse\x12\x17\n\x0fservice_account\x18\x01 \x01(\t\x12`\n\x08\x66indings\x18\x02 \x03(\x0b\x32N.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusResponse.Finding\x1a\xc6\x01\n\x07\x46inding\x12{\n\x11iam_access_denied\x18\x01 \x01(\x0b\x32^.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusResponse.Finding.IAMAccessDeniedH\x00\x1a.\n\x0fIAMAccessDenied\x12\x1b\n\x13missing_permissions\x18\x01 \x03(\tB\x0e\n\x0c\x66inding_type\"\xfd\x0c\n\x0b\x45ntitlement\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12X\n\x0e\x65ligible_users\x18\x05 \x03(\x0b\x32;.google.cloud.privilegedaccessmanager.v1.AccessControlEntryB\x03\xe0\x41\x01\x12Y\n\x11\x61pproval_workflow\x18\x06 \x01(\x0b\x32\x39.google.cloud.privilegedaccessmanager.v1.ApprovalWorkflowB\x03\xe0\x41\x01\x12T\n\x11privileged_access\x18\x07 \x01(\x0b\x32\x39.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess\x12<\n\x14max_request_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12N\n\x05state\x18\t \x01(\x0e\x32:.google.cloud.privilegedaccessmanager.v1.Entitlement.StateB\x03\xe0\x41\x03\x12~\n\x1erequester_justification_config\x18\n \x01(\x0b\x32Q.google.cloud.privilegedaccessmanager.v1.Entitlement.RequesterJustificationConfigB\x03\xe0\x41\x02\x12\x80\x01\n\x1f\x61\x64\x64itional_notification_targets\x18\x0b \x01(\x0b\x32R.google.cloud.privilegedaccessmanager.v1.Entitlement.AdditionalNotificationTargetsB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x0c \x01(\t\x1a\xc5\x02\n\x1cRequesterJustificationConfig\x12w\n\rnot_mandatory\x18\x01 \x01(\x0b\x32^.google.cloud.privilegedaccessmanager.v1.Entitlement.RequesterJustificationConfig.NotMandatoryH\x00\x12v\n\x0cunstructured\x18\x02 \x01(\x0b\x32^.google.cloud.privilegedaccessmanager.v1.Entitlement.RequesterJustificationConfig.UnstructuredH\x00\x1a\x0e\n\x0cNotMandatory\x1a\x0e\n\x0cUnstructuredB\x14\n\x12justification_type\x1am\n\x1d\x41\x64\x64itionalNotificationTargets\x12#\n\x16\x61\x64min_email_recipients\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\'\n\x1arequester_email_recipients\x18\x02 \x03(\tB\x03\xe0\x41\x01\"d\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xa7\x02\xea\x41\xa3\x02\n2privilegedaccessmanager.googleapis.com/Entitlement\x12\x42projects/{project}/locations/{location}/entitlements/{entitlement}\x12@folders/{folder}/locations/{location}/entitlements/{entitlement}\x12Lorganizations/{organization}/locations/{location}/entitlements/{entitlement}*\x0c\x65ntitlements2\x0b\x65ntitlement\"-\n\x12\x41\x63\x63\x65ssControlEntry\x12\x17\n\nprincipals\x18\x01 \x03(\tB\x03\xe0\x41\x01\"}\n\x10\x41pprovalWorkflow\x12T\n\x10manual_approvals\x18\x01 \x01(\x0b\x32\x38.google.cloud.privilegedaccessmanager.v1.ManualApprovalsH\x00\x42\x13\n\x11\x61pproval_workflow\"\xb6\x02\n\x0fManualApprovals\x12+\n\x1erequire_approver_justification\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12Q\n\x05steps\x18\x02 \x03(\x0b\x32=.google.cloud.privilegedaccessmanager.v1.ManualApprovals.StepB\x03\xe0\x41\x01\x1a\xa2\x01\n\x04Step\x12S\n\tapprovers\x18\x01 \x03(\x0b\x32;.google.cloud.privilegedaccessmanager.v1.AccessControlEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x61pprovals_needed\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12&\n\x19\x61pprover_email_recipients\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\xfc\x02\n\x10PrivilegedAccess\x12`\n\x0egcp_iam_access\x18\x01 \x01(\x0b\x32\x46.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess.GcpIamAccessH\x00\x1a\xf6\x01\n\x0cGcpIamAccess\x12\x1a\n\rresource_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12n\n\rrole_bindings\x18\x04 \x03(\x0b\x32R.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess.GcpIamAccess.RoleBindingB\x03\xe0\x41\x02\x1a\x43\n\x0bRoleBinding\x12\x11\n\x04role\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14\x63ondition_expression\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\r\n\x0b\x61\x63\x63\x65ss_type\"\xc2\x01\n\x17ListEntitlementsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32privilegedaccessmanager.googleapis.com/Entitlement\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x18ListEntitlementsResponse\x12J\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32\x34.google.cloud.privilegedaccessmanager.v1.Entitlement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x84\x03\n\x19SearchEntitlementsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32privilegedaccessmanager.googleapis.com/Entitlement\x12t\n\x12\x63\x61ller_access_type\x18\x02 \x01(\x0e\x32S.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest.CallerAccessTypeB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"_\n\x10\x43\x61llerAccessType\x12\"\n\x1e\x43\x41LLER_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fGRANT_REQUESTER\x10\x01\x12\x12\n\x0eGRANT_APPROVER\x10\x02\"\x81\x01\n\x1aSearchEntitlementsResponse\x12J\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32\x34.google.cloud.privilegedaccessmanager.v1.Entitlement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x15GetEntitlementRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privilegedaccessmanager.googleapis.com/Entitlement\"\xec\x01\n\x18\x43reateEntitlementRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32privilegedaccessmanager.googleapis.com/Entitlement\x12\x1b\n\x0e\x65ntitlement_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x0b\x65ntitlement\x18\x03 \x01(\x0b\x32\x34.google.cloud.privilegedaccessmanager.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x91\x01\n\x18\x44\x65leteEntitlementRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privilegedaccessmanager.googleapis.com/Entitlement\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa0\x01\n\x18UpdateEntitlementRequest\x12N\n\x0b\x65ntitlement\x18\x01 \x01(\x0b\x32\x34.google.cloud.privilegedaccessmanager.v1.EntitlementB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xcb\x16\n\x05Grant\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\trequester\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12:\n\x12requested_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12R\n\rjustification\x18\x06 \x01(\x0b\x32\x36.google.cloud.privilegedaccessmanager.v1.JustificationB\x03\xe0\x41\x01\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.privilegedaccessmanager.v1.Grant.StateB\x03\xe0\x41\x03\x12N\n\x08timeline\x18\x08 \x01(\x0b\x32\x37.google.cloud.privilegedaccessmanager.v1.Grant.TimelineB\x03\xe0\x41\x03\x12Y\n\x11privileged_access\x18\t \x01(\x0b\x32\x39.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessB\x03\xe0\x41\x03\x12S\n\x0b\x61udit_trail\x18\n \x01(\x0b\x32\x39.google.cloud.privilegedaccessmanager.v1.Grant.AuditTrailB\x03\xe0\x41\x03\x12(\n\x1b\x61\x64\x64itional_email_recipients\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12 \n\x13\x65xternally_modified\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x1a\xff\x0b\n\x08Timeline\x12R\n\x06\x65vents\x18\x01 \x03(\x0b\x32=.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.EventB\x03\xe0\x41\x03\x1a\x9e\x0b\n\x05\x45vent\x12\\\n\trequested\x18\x02 \x01(\x0b\x32G.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.RequestedH\x00\x12Z\n\x08\x61pproved\x18\x03 \x01(\x0b\x32\x46.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ApprovedH\x00\x12V\n\x06\x64\x65nied\x18\x04 \x01(\x0b\x32\x44.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.DeniedH\x00\x12X\n\x07revoked\x18\x05 \x01(\x0b\x32\x45.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.RevokedH\x00\x12\\\n\tscheduled\x18\x06 \x01(\x0b\x32G.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ScheduledH\x00\x12\\\n\tactivated\x18\x07 \x01(\x0b\x32G.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ActivatedH\x00\x12k\n\x11\x61\x63tivation_failed\x18\x08 \x01(\x0b\x32N.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ActivationFailedH\x00\x12X\n\x07\x65xpired\x18\n \x01(\x0b\x32\x45.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ExpiredH\x00\x12T\n\x05\x65nded\x18\x0b \x01(\x0b\x32\x43.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.EndedH\x00\x12o\n\x13\x65xternally_modified\x18\x0c \x01(\x0b\x32P.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ExternallyModifiedH\x00\x12\x33\n\nevent_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x41\n\tRequested\x12\x34\n\x0b\x65xpire_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x33\n\x08\x41pproved\x12\x13\n\x06reason\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x61\x63tor\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x31\n\x06\x44\x65nied\x12\x13\n\x06reason\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x61\x63tor\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x07Revoked\x12\x13\n\x06reason\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x61\x63tor\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1aO\n\tScheduled\x12\x42\n\x19scheduled_activation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x0b\n\tActivated\x1a:\n\x10\x41\x63tivationFailed\x12&\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\t\n\x07\x45xpired\x1a\x07\n\x05\x45nded\x1a\x14\n\x12\x45xternallyModifiedB\x07\n\x05\x65vent\x1a\x85\x01\n\nAuditTrail\x12:\n\x11\x61\x63\x63\x65ss_grant_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x12\x61\x63\x63\x65ss_remove_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xb5\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41PPROVAL_AWAITED\x10\x01\x12\n\n\x06\x44\x45NIED\x10\x03\x12\r\n\tSCHEDULED\x10\x04\x12\x0e\n\nACTIVATING\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06\x12\x15\n\x11\x41\x43TIVATION_FAILED\x10\x07\x12\x0b\n\x07\x45XPIRED\x10\x08\x12\x0c\n\x08REVOKING\x10\t\x12\x0b\n\x07REVOKED\x10\n\x12\t\n\x05\x45NDED\x10\x0b:\xc2\x02\xea\x41\xbe\x02\n,privilegedaccessmanager.googleapis.com/Grant\x12Qprojects/{project}/locations/{location}/entitlements/{entitlement}/grants/{grant}\x12Ofolders/{folder}/locations/{location}/entitlements/{entitlement}/grants/{grant}\x12[organizations/{organization}/locations/{location}/entitlements/{entitlement}/grants/{grant}*\x06grants2\x05grant\"F\n\rJustification\x12$\n\x1aunstructured_justification\x18\x01 \x01(\tH\x00\x42\x0f\n\rjustification\"\xb6\x01\n\x11ListGrantsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,privilegedaccessmanager.googleapis.com/Grant\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x12ListGrantsResponse\x12>\n\x06grants\x18\x01 \x03(\x0b\x32..google.cloud.privilegedaccessmanager.v1.Grant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x90\x03\n\x13SearchGrantsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,privilegedaccessmanager.googleapis.com/Grant\x12u\n\x13\x63\x61ller_relationship\x18\x02 \x01(\x0e\x32S.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest.CallerRelationshipTypeB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"v\n\x16\x43\x61llerRelationshipType\x12(\n$CALLER_RELATIONSHIP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bHAD_CREATED\x10\x01\x12\x0f\n\x0b\x43\x41N_APPROVE\x10\x02\x12\x10\n\x0cHAD_APPROVED\x10\x03\"o\n\x14SearchGrantsResponse\x12>\n\x06grants\x18\x01 \x03(\x0b\x32..google.cloud.privilegedaccessmanager.v1.Grant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"U\n\x0fGetGrantRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privilegedaccessmanager.googleapis.com/Grant\"n\n\x13\x41pproveGrantRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privilegedaccessmanager.googleapis.com/Grant\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\"k\n\x10\x44\x65nyGrantRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privilegedaccessmanager.googleapis.com/Grant\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x12RevokeGrantRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privilegedaccessmanager.googleapis.com/Grant\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb7\x01\n\x12\x43reateGrantRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,privilegedaccessmanager.googleapis.com/Grant\x12\x42\n\x05grant\x18\x02 \x01(\x0b\x32..google.cloud.privilegedaccessmanager.v1.GrantB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xc1\'\n\x17PrivilegedAccessManager\x12\xe9\x02\n\x15\x43heckOnboardingStatus\x12\x45.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusRequest\x1a\x46.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusResponse\"\xc0\x01\x82\xd3\xe4\x93\x02\xb9\x01\x12\x39/v1/{parent=projects/*/locations/*}:checkOnboardingStatusZ@\x12>/v1/{parent=organizations/*/locations/*}:checkOnboardingStatusZ:\x12\x38/v1/{parent=folders/*/locations/*}:checkOnboardingStatus\x12\xc8\x02\n\x10ListEntitlements\x12@.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest\x1a\x41.google.cloud.privilegedaccessmanager.v1.ListEntitlementsResponse\"\xae\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9e\x01\x12\x30/v1/{parent=projects/*/locations/*}/entitlementsZ7\x12\x35/v1/{parent=organizations/*/locations/*}/entitlementsZ1\x12//v1/{parent=folders/*/locations/*}/entitlements\x12\xda\x02\n\x12SearchEntitlements\x12\x42.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest\x1a\x43.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsResponse\"\xba\x01\x82\xd3\xe4\x93\x02\xb3\x01\x12\x37/v1/{parent=projects/*/locations/*}/entitlements:searchZ>\x12.google.cloud.privilegedaccessmanager.v1.GetEntitlementRequest\x1a\x34.google.cloud.privilegedaccessmanager.v1.Entitlement\"\xac\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9e\x01\x12\x30/v1/{name=projects/*/locations/*/entitlements/*}Z7\x12\x35/v1/{name=organizations/*/locations/*/entitlements/*}Z1\x12//v1/{name=folders/*/locations/*/entitlements/*}\x12\x8b\x03\n\x11\x43reateEntitlement\x12\x41.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest\x1a\x1d.google.longrunning.Operation\"\x93\x02\xca\x41 \n\x0b\x45ntitlement\x12\x11OperationMetadata\xda\x41!parent,entitlement,entitlement_id\x82\xd3\xe4\x93\x02\xc5\x01\"0/v1/{parent=projects/*/locations/*}/entitlements:\x0b\x65ntitlementZD\"5/v1/{parent=organizations/*/locations/*}/entitlements:\x0b\x65ntitlementZ>\"//v1/{parent=folders/*/locations/*}/entitlements:\x0b\x65ntitlement\x12\xc7\x02\n\x11\x44\x65leteEntitlement\x12\x41.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest\x1a\x1d.google.longrunning.Operation\"\xcf\x01\xca\x41 \n\x0b\x45ntitlement\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9e\x01*0/v1/{name=projects/*/locations/*/entitlements/*}Z7*5/v1/{name=organizations/*/locations/*/entitlements/*}Z1*//v1/{name=folders/*/locations/*/entitlements/*}\x12\xa5\x03\n\x11UpdateEntitlement\x12\x41.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest\x1a\x1d.google.longrunning.Operation\"\xad\x02\xca\x41 \n\x0b\x45ntitlement\x12\x11OperationMetadata\xda\x41\x17\x65ntitlement,update_mask\x82\xd3\xe4\x93\x02\xe9\x01\x32/v1/{parent=organizations/*/locations/*/entitlements/*}/grantsZ:\x12\x38/v1/{parent=folders/*/locations/*/entitlements/*}/grants\x12\xe3\x02\n\x0cSearchGrants\x12<.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest\x1a=.google.cloud.privilegedaccessmanager.v1.SearchGrantsResponse\"\xd5\x01\x82\xd3\xe4\x93\x02\xce\x01\x12@/v1/{parent=projects/*/locations/*/entitlements/*}/grants:searchZG\x12\x45/v1/{parent=organizations/*/locations/*/entitlements/*}/grants:searchZA\x12?/v1/{parent=folders/*/locations/*/entitlements/*}/grants:search\x12\xbe\x02\n\x08GetGrant\x12\x38.google.cloud.privilegedaccessmanager.v1.GetGrantRequest\x1a..google.cloud.privilegedaccessmanager.v1.Grant\"\xc7\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb9\x01\x12\x39/v1/{name=projects/*/locations/*/entitlements/*/grants/*}Z@\x12>/v1/{name=organizations/*/locations/*/entitlements/*/grants/*}Z:\x12\x38/v1/{name=folders/*/locations/*/entitlements/*/grants/*}\x12\xe1\x02\n\x0b\x43reateGrant\x12;.google.cloud.privilegedaccessmanager.v1.CreateGrantRequest\x1a..google.cloud.privilegedaccessmanager.v1.Grant\"\xe4\x01\xda\x41\x0cparent,grant\x82\xd3\xe4\x93\x02\xce\x01\"9/v1/{parent=projects/*/locations/*/entitlements/*}/grants:\x05grantZG\">/v1/{parent=organizations/*/locations/*/entitlements/*}/grants:\x05grantZA\"8/v1/{parent=folders/*/locations/*/entitlements/*}/grants:\x05grant\x12\xe0\x02\n\x0c\x41pproveGrant\x12<.google.cloud.privilegedaccessmanager.v1.ApproveGrantRequest\x1a..google.cloud.privilegedaccessmanager.v1.Grant\"\xe1\x01\x82\xd3\xe4\x93\x02\xda\x01\"A/v1/{name=projects/*/locations/*/entitlements/*/grants/*}:approve:\x01*ZK\"F/v1/{name=organizations/*/locations/*/entitlements/*/grants/*}:approve:\x01*ZE\"@/v1/{name=folders/*/locations/*/entitlements/*/grants/*}:approve:\x01*\x12\xd1\x02\n\tDenyGrant\x12\x39.google.cloud.privilegedaccessmanager.v1.DenyGrantRequest\x1a..google.cloud.privilegedaccessmanager.v1.Grant\"\xd8\x01\x82\xd3\xe4\x93\x02\xd1\x01\">/v1/{name=projects/*/locations/*/entitlements/*/grants/*}:deny:\x01*ZH\"C/v1/{name=organizations/*/locations/*/entitlements/*/grants/*}:deny:\x01*ZB\"=/v1/{name=folders/*/locations/*/entitlements/*/grants/*}:deny:\x01*\x12\xe7\x02\n\x0bRevokeGrant\x12;.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest\x1a\x1d.google.longrunning.Operation\"\xfb\x01\xca\x41\x1a\n\x05Grant\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\xd7\x01\"@/v1/{name=projects/*/locations/*/entitlements/*/grants/*}:revoke:\x01*ZJ\"E/v1/{name=organizations/*/locations/*/entitlements/*/grants/*}:revoke:\x01*ZD\"?/v1/{name=folders/*/locations/*/entitlements/*/grants/*}:revoke:\x01*\x1aZ\xca\x41&privilegedaccessmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x04\n+com.google.cloud.privilegedaccessmanager.v1B\x1cPrivilegedAccessManagerProtoP\x01Zecloud.google.com/go/privilegedaccessmanager/apiv1/privilegedaccessmanagerpb;privilegedaccessmanagerpb\xaa\x02\'Google.Cloud.PrivilegedAccessManager.V1\xca\x02\'Google\\Cloud\\PrivilegedAccessManager\\V1\xea\x02*Google::Cloud::PrivilegedAccessManager::V1\xea\x41p\n;privilegedaccessmanager.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41^\n5privilegedaccessmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" +descriptor_data = "\nEgoogle/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.proto\x12\'google.cloud.privilegedaccessmanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"j\n\x1c\x43heckOnboardingStatusRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32privilegedaccessmanager.googleapis.com/Entitlement\"\xe3\x02\n\x1d\x43heckOnboardingStatusResponse\x12\x17\n\x0fservice_account\x18\x01 \x01(\t\x12`\n\x08\x66indings\x18\x02 \x03(\x0b\x32N.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusResponse.Finding\x1a\xc6\x01\n\x07\x46inding\x12{\n\x11iam_access_denied\x18\x01 \x01(\x0b\x32^.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusResponse.Finding.IAMAccessDeniedH\x00\x1a.\n\x0fIAMAccessDenied\x12\x1b\n\x13missing_permissions\x18\x01 \x03(\tB\x0e\n\x0c\x66inding_type\"\xfd\x0c\n\x0b\x45ntitlement\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12X\n\x0e\x65ligible_users\x18\x05 \x03(\x0b\x32;.google.cloud.privilegedaccessmanager.v1.AccessControlEntryB\x03\xe0\x41\x01\x12Y\n\x11\x61pproval_workflow\x18\x06 \x01(\x0b\x32\x39.google.cloud.privilegedaccessmanager.v1.ApprovalWorkflowB\x03\xe0\x41\x01\x12T\n\x11privileged_access\x18\x07 \x01(\x0b\x32\x39.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess\x12<\n\x14max_request_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12N\n\x05state\x18\t \x01(\x0e\x32:.google.cloud.privilegedaccessmanager.v1.Entitlement.StateB\x03\xe0\x41\x03\x12~\n\x1erequester_justification_config\x18\n \x01(\x0b\x32Q.google.cloud.privilegedaccessmanager.v1.Entitlement.RequesterJustificationConfigB\x03\xe0\x41\x02\x12\x80\x01\n\x1f\x61\x64\x64itional_notification_targets\x18\x0b \x01(\x0b\x32R.google.cloud.privilegedaccessmanager.v1.Entitlement.AdditionalNotificationTargetsB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x0c \x01(\t\x1a\xc5\x02\n\x1cRequesterJustificationConfig\x12w\n\rnot_mandatory\x18\x01 \x01(\x0b\x32^.google.cloud.privilegedaccessmanager.v1.Entitlement.RequesterJustificationConfig.NotMandatoryH\x00\x12v\n\x0cunstructured\x18\x02 \x01(\x0b\x32^.google.cloud.privilegedaccessmanager.v1.Entitlement.RequesterJustificationConfig.UnstructuredH\x00\x1a\x0e\n\x0cNotMandatory\x1a\x0e\n\x0cUnstructuredB\x14\n\x12justification_type\x1am\n\x1d\x41\x64\x64itionalNotificationTargets\x12#\n\x16\x61\x64min_email_recipients\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\'\n\x1arequester_email_recipients\x18\x02 \x03(\tB\x03\xe0\x41\x01\"d\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xa7\x02\xea\x41\xa3\x02\n2privilegedaccessmanager.googleapis.com/Entitlement\x12\x42projects/{project}/locations/{location}/entitlements/{entitlement}\x12@folders/{folder}/locations/{location}/entitlements/{entitlement}\x12Lorganizations/{organization}/locations/{location}/entitlements/{entitlement}*\x0c\x65ntitlements2\x0b\x65ntitlement\"-\n\x12\x41\x63\x63\x65ssControlEntry\x12\x17\n\nprincipals\x18\x01 \x03(\tB\x03\xe0\x41\x01\"}\n\x10\x41pprovalWorkflow\x12T\n\x10manual_approvals\x18\x01 \x01(\x0b\x32\x38.google.cloud.privilegedaccessmanager.v1.ManualApprovalsH\x00\x42\x13\n\x11\x61pproval_workflow\"\xb6\x02\n\x0fManualApprovals\x12+\n\x1erequire_approver_justification\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12Q\n\x05steps\x18\x02 \x03(\x0b\x32=.google.cloud.privilegedaccessmanager.v1.ManualApprovals.StepB\x03\xe0\x41\x01\x1a\xa2\x01\n\x04Step\x12S\n\tapprovers\x18\x01 \x03(\x0b\x32;.google.cloud.privilegedaccessmanager.v1.AccessControlEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x61pprovals_needed\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12&\n\x19\x61pprover_email_recipients\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\xfc\x02\n\x10PrivilegedAccess\x12`\n\x0egcp_iam_access\x18\x01 \x01(\x0b\x32\x46.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess.GcpIamAccessH\x00\x1a\xf6\x01\n\x0cGcpIamAccess\x12\x1a\n\rresource_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12n\n\rrole_bindings\x18\x04 \x03(\x0b\x32R.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess.GcpIamAccess.RoleBindingB\x03\xe0\x41\x02\x1a\x43\n\x0bRoleBinding\x12\x11\n\x04role\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14\x63ondition_expression\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\r\n\x0b\x61\x63\x63\x65ss_type\"\xc2\x01\n\x17ListEntitlementsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32privilegedaccessmanager.googleapis.com/Entitlement\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x18ListEntitlementsResponse\x12J\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32\x34.google.cloud.privilegedaccessmanager.v1.Entitlement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x84\x03\n\x19SearchEntitlementsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32privilegedaccessmanager.googleapis.com/Entitlement\x12t\n\x12\x63\x61ller_access_type\x18\x02 \x01(\x0e\x32S.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest.CallerAccessTypeB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"_\n\x10\x43\x61llerAccessType\x12\"\n\x1e\x43\x41LLER_ACCESS_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fGRANT_REQUESTER\x10\x01\x12\x12\n\x0eGRANT_APPROVER\x10\x02\"\x81\x01\n\x1aSearchEntitlementsResponse\x12J\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32\x34.google.cloud.privilegedaccessmanager.v1.Entitlement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x15GetEntitlementRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privilegedaccessmanager.googleapis.com/Entitlement\"\xec\x01\n\x18\x43reateEntitlementRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32privilegedaccessmanager.googleapis.com/Entitlement\x12\x1b\n\x0e\x65ntitlement_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x0b\x65ntitlement\x18\x03 \x01(\x0b\x32\x34.google.cloud.privilegedaccessmanager.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x91\x01\n\x18\x44\x65leteEntitlementRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privilegedaccessmanager.googleapis.com/Entitlement\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa0\x01\n\x18UpdateEntitlementRequest\x12N\n\x0b\x65ntitlement\x18\x01 \x01(\x0b\x32\x34.google.cloud.privilegedaccessmanager.v1.EntitlementB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xd6\x17\n\x05Grant\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\trequester\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12:\n\x12requested_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12R\n\rjustification\x18\x06 \x01(\x0b\x32\x36.google.cloud.privilegedaccessmanager.v1.JustificationB\x03\xe0\x41\x01\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.privilegedaccessmanager.v1.Grant.StateB\x03\xe0\x41\x03\x12N\n\x08timeline\x18\x08 \x01(\x0b\x32\x37.google.cloud.privilegedaccessmanager.v1.Grant.TimelineB\x03\xe0\x41\x03\x12Y\n\x11privileged_access\x18\t \x01(\x0b\x32\x39.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessB\x03\xe0\x41\x03\x12S\n\x0b\x61udit_trail\x18\n \x01(\x0b\x32\x39.google.cloud.privilegedaccessmanager.v1.Grant.AuditTrailB\x03\xe0\x41\x03\x12(\n\x1b\x61\x64\x64itional_email_recipients\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12 \n\x13\x65xternally_modified\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x1a\xea\x0c\n\x08Timeline\x12R\n\x06\x65vents\x18\x01 \x03(\x0b\x32=.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.EventB\x03\xe0\x41\x03\x1a\x89\x0c\n\x05\x45vent\x12\\\n\trequested\x18\x02 \x01(\x0b\x32G.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.RequestedH\x00\x12Z\n\x08\x61pproved\x18\x03 \x01(\x0b\x32\x46.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ApprovedH\x00\x12V\n\x06\x64\x65nied\x18\x04 \x01(\x0b\x32\x44.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.DeniedH\x00\x12X\n\x07revoked\x18\x05 \x01(\x0b\x32\x45.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.RevokedH\x00\x12\\\n\tscheduled\x18\x06 \x01(\x0b\x32G.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ScheduledH\x00\x12\\\n\tactivated\x18\x07 \x01(\x0b\x32G.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ActivatedH\x00\x12k\n\x11\x61\x63tivation_failed\x18\x08 \x01(\x0b\x32N.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ActivationFailedH\x00\x12X\n\x07\x65xpired\x18\n \x01(\x0b\x32\x45.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ExpiredH\x00\x12T\n\x05\x65nded\x18\x0b \x01(\x0b\x32\x43.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.EndedH\x00\x12o\n\x13\x65xternally_modified\x18\x0c \x01(\x0b\x32P.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ExternallyModifiedH\x00\x12\\\n\twithdrawn\x18\r \x01(\x0b\x32G.google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.WithdrawnH\x00\x12\x33\n\nevent_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x41\n\tRequested\x12\x34\n\x0b\x65xpire_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x33\n\x08\x41pproved\x12\x13\n\x06reason\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x61\x63tor\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x31\n\x06\x44\x65nied\x12\x13\n\x06reason\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x61\x63tor\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x07Revoked\x12\x13\n\x06reason\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x61\x63tor\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x0b\n\tWithdrawn\x1aO\n\tScheduled\x12\x42\n\x19scheduled_activation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x0b\n\tActivated\x1a:\n\x10\x41\x63tivationFailed\x12&\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\t\n\x07\x45xpired\x1a\x07\n\x05\x45nded\x1a\x14\n\x12\x45xternallyModifiedB\x07\n\x05\x65vent\x1a\x85\x01\n\nAuditTrail\x12:\n\x11\x61\x63\x63\x65ss_grant_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x12\x61\x63\x63\x65ss_remove_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xd5\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41PPROVAL_AWAITED\x10\x01\x12\n\n\x06\x44\x45NIED\x10\x03\x12\r\n\tSCHEDULED\x10\x04\x12\x0e\n\nACTIVATING\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06\x12\x15\n\x11\x41\x43TIVATION_FAILED\x10\x07\x12\x0b\n\x07\x45XPIRED\x10\x08\x12\x0c\n\x08REVOKING\x10\t\x12\x0b\n\x07REVOKED\x10\n\x12\t\n\x05\x45NDED\x10\x0b\x12\x0f\n\x0bWITHDRAWING\x10\x0c\x12\r\n\tWITHDRAWN\x10\r:\xc2\x02\xea\x41\xbe\x02\n,privilegedaccessmanager.googleapis.com/Grant\x12Qprojects/{project}/locations/{location}/entitlements/{entitlement}/grants/{grant}\x12Ofolders/{folder}/locations/{location}/entitlements/{entitlement}/grants/{grant}\x12[organizations/{organization}/locations/{location}/entitlements/{entitlement}/grants/{grant}*\x06grants2\x05grant\"F\n\rJustification\x12$\n\x1aunstructured_justification\x18\x01 \x01(\tH\x00\x42\x0f\n\rjustification\"\xb6\x01\n\x11ListGrantsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,privilegedaccessmanager.googleapis.com/Grant\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x12ListGrantsResponse\x12>\n\x06grants\x18\x01 \x03(\x0b\x32..google.cloud.privilegedaccessmanager.v1.Grant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x90\x03\n\x13SearchGrantsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,privilegedaccessmanager.googleapis.com/Grant\x12u\n\x13\x63\x61ller_relationship\x18\x02 \x01(\x0e\x32S.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest.CallerRelationshipTypeB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"v\n\x16\x43\x61llerRelationshipType\x12(\n$CALLER_RELATIONSHIP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bHAD_CREATED\x10\x01\x12\x0f\n\x0b\x43\x41N_APPROVE\x10\x02\x12\x10\n\x0cHAD_APPROVED\x10\x03\"o\n\x14SearchGrantsResponse\x12>\n\x06grants\x18\x01 \x03(\x0b\x32..google.cloud.privilegedaccessmanager.v1.Grant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"U\n\x0fGetGrantRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privilegedaccessmanager.googleapis.com/Grant\"n\n\x13\x41pproveGrantRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privilegedaccessmanager.googleapis.com/Grant\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\"k\n\x10\x44\x65nyGrantRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privilegedaccessmanager.googleapis.com/Grant\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x12RevokeGrantRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privilegedaccessmanager.googleapis.com/Grant\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb7\x01\n\x12\x43reateGrantRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,privilegedaccessmanager.googleapis.com/Grant\x12\x42\n\x05grant\x18\x02 \x01(\x0b\x32..google.cloud.privilegedaccessmanager.v1.GrantB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xc1\'\n\x17PrivilegedAccessManager\x12\xe9\x02\n\x15\x43heckOnboardingStatus\x12\x45.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusRequest\x1a\x46.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusResponse\"\xc0\x01\x82\xd3\xe4\x93\x02\xb9\x01\x12\x39/v1/{parent=projects/*/locations/*}:checkOnboardingStatusZ@\x12>/v1/{parent=organizations/*/locations/*}:checkOnboardingStatusZ:\x12\x38/v1/{parent=folders/*/locations/*}:checkOnboardingStatus\x12\xc8\x02\n\x10ListEntitlements\x12@.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest\x1a\x41.google.cloud.privilegedaccessmanager.v1.ListEntitlementsResponse\"\xae\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9e\x01\x12\x30/v1/{parent=projects/*/locations/*}/entitlementsZ7\x12\x35/v1/{parent=organizations/*/locations/*}/entitlementsZ1\x12//v1/{parent=folders/*/locations/*}/entitlements\x12\xda\x02\n\x12SearchEntitlements\x12\x42.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest\x1a\x43.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsResponse\"\xba\x01\x82\xd3\xe4\x93\x02\xb3\x01\x12\x37/v1/{parent=projects/*/locations/*}/entitlements:searchZ>\x12.google.cloud.privilegedaccessmanager.v1.GetEntitlementRequest\x1a\x34.google.cloud.privilegedaccessmanager.v1.Entitlement\"\xac\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9e\x01\x12\x30/v1/{name=projects/*/locations/*/entitlements/*}Z7\x12\x35/v1/{name=organizations/*/locations/*/entitlements/*}Z1\x12//v1/{name=folders/*/locations/*/entitlements/*}\x12\x8b\x03\n\x11\x43reateEntitlement\x12\x41.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest\x1a\x1d.google.longrunning.Operation\"\x93\x02\xca\x41 \n\x0b\x45ntitlement\x12\x11OperationMetadata\xda\x41!parent,entitlement,entitlement_id\x82\xd3\xe4\x93\x02\xc5\x01\"0/v1/{parent=projects/*/locations/*}/entitlements:\x0b\x65ntitlementZD\"5/v1/{parent=organizations/*/locations/*}/entitlements:\x0b\x65ntitlementZ>\"//v1/{parent=folders/*/locations/*}/entitlements:\x0b\x65ntitlement\x12\xc7\x02\n\x11\x44\x65leteEntitlement\x12\x41.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest\x1a\x1d.google.longrunning.Operation\"\xcf\x01\xca\x41 \n\x0b\x45ntitlement\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9e\x01*0/v1/{name=projects/*/locations/*/entitlements/*}Z7*5/v1/{name=organizations/*/locations/*/entitlements/*}Z1*//v1/{name=folders/*/locations/*/entitlements/*}\x12\xa5\x03\n\x11UpdateEntitlement\x12\x41.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest\x1a\x1d.google.longrunning.Operation\"\xad\x02\xca\x41 \n\x0b\x45ntitlement\x12\x11OperationMetadata\xda\x41\x17\x65ntitlement,update_mask\x82\xd3\xe4\x93\x02\xe9\x01\x32/v1/{parent=organizations/*/locations/*/entitlements/*}/grantsZ:\x12\x38/v1/{parent=folders/*/locations/*/entitlements/*}/grants\x12\xe3\x02\n\x0cSearchGrants\x12<.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest\x1a=.google.cloud.privilegedaccessmanager.v1.SearchGrantsResponse\"\xd5\x01\x82\xd3\xe4\x93\x02\xce\x01\x12@/v1/{parent=projects/*/locations/*/entitlements/*}/grants:searchZG\x12\x45/v1/{parent=organizations/*/locations/*/entitlements/*}/grants:searchZA\x12?/v1/{parent=folders/*/locations/*/entitlements/*}/grants:search\x12\xbe\x02\n\x08GetGrant\x12\x38.google.cloud.privilegedaccessmanager.v1.GetGrantRequest\x1a..google.cloud.privilegedaccessmanager.v1.Grant\"\xc7\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb9\x01\x12\x39/v1/{name=projects/*/locations/*/entitlements/*/grants/*}Z@\x12>/v1/{name=organizations/*/locations/*/entitlements/*/grants/*}Z:\x12\x38/v1/{name=folders/*/locations/*/entitlements/*/grants/*}\x12\xe1\x02\n\x0b\x43reateGrant\x12;.google.cloud.privilegedaccessmanager.v1.CreateGrantRequest\x1a..google.cloud.privilegedaccessmanager.v1.Grant\"\xe4\x01\xda\x41\x0cparent,grant\x82\xd3\xe4\x93\x02\xce\x01\"9/v1/{parent=projects/*/locations/*/entitlements/*}/grants:\x05grantZG\">/v1/{parent=organizations/*/locations/*/entitlements/*}/grants:\x05grantZA\"8/v1/{parent=folders/*/locations/*/entitlements/*}/grants:\x05grant\x12\xe0\x02\n\x0c\x41pproveGrant\x12<.google.cloud.privilegedaccessmanager.v1.ApproveGrantRequest\x1a..google.cloud.privilegedaccessmanager.v1.Grant\"\xe1\x01\x82\xd3\xe4\x93\x02\xda\x01\"A/v1/{name=projects/*/locations/*/entitlements/*/grants/*}:approve:\x01*ZK\"F/v1/{name=organizations/*/locations/*/entitlements/*/grants/*}:approve:\x01*ZE\"@/v1/{name=folders/*/locations/*/entitlements/*/grants/*}:approve:\x01*\x12\xd1\x02\n\tDenyGrant\x12\x39.google.cloud.privilegedaccessmanager.v1.DenyGrantRequest\x1a..google.cloud.privilegedaccessmanager.v1.Grant\"\xd8\x01\x82\xd3\xe4\x93\x02\xd1\x01\">/v1/{name=projects/*/locations/*/entitlements/*/grants/*}:deny:\x01*ZH\"C/v1/{name=organizations/*/locations/*/entitlements/*/grants/*}:deny:\x01*ZB\"=/v1/{name=folders/*/locations/*/entitlements/*/grants/*}:deny:\x01*\x12\xe7\x02\n\x0bRevokeGrant\x12;.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest\x1a\x1d.google.longrunning.Operation\"\xfb\x01\xca\x41\x1a\n\x05Grant\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\xd7\x01\"@/v1/{name=projects/*/locations/*/entitlements/*/grants/*}:revoke:\x01*ZJ\"E/v1/{name=organizations/*/locations/*/entitlements/*/grants/*}:revoke:\x01*ZD\"?/v1/{name=folders/*/locations/*/entitlements/*/grants/*}:revoke:\x01*\x1aZ\xca\x41&privilegedaccessmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x04\n+com.google.cloud.privilegedaccessmanager.v1B\x1cPrivilegedAccessManagerProtoP\x01Zecloud.google.com/go/privilegedaccessmanager/apiv1/privilegedaccessmanagerpb;privilegedaccessmanagerpb\xaa\x02\'Google.Cloud.PrivilegedAccessManager.V1\xca\x02\'Google\\Cloud\\PrivilegedAccessManager\\V1\xea\x02*Google::Cloud::PrivilegedAccessManager::V1\xea\x41p\n;privilegedaccessmanager.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41^\n5privilegedaccessmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -82,6 +82,7 @@ module V1 Grant::Timeline::Event::Approved = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.Approved").msgclass Grant::Timeline::Event::Denied = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.Denied").msgclass Grant::Timeline::Event::Revoked = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.Revoked").msgclass + Grant::Timeline::Event::Withdrawn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.Withdrawn").msgclass Grant::Timeline::Event::Scheduled = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.Scheduled").msgclass Grant::Timeline::Event::Activated = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.Activated").msgclass Grant::Timeline::Event::ActivationFailed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.privilegedaccessmanager.v1.Grant.Timeline.Event.ActivationFailed").msgclass diff --git a/google-cloud-privileged_access_manager-v1/proto_docs/google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.rb b/google-cloud-privileged_access_manager-v1/proto_docs/google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.rb index 3d23f8a79c55..f89c66d30945 100644 --- a/google-cloud-privileged_access_manager-v1/proto_docs/google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.rb +++ b/google-cloud-privileged_access_manager-v1/proto_docs/google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.rb @@ -568,54 +568,59 @@ class Timeline # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Requested] # The grant was requested. # - # Note: The following fields are mutually exclusive: `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`. 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: `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] approved # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Approved] # The grant was approved. # - # Note: The following fields are mutually exclusive: `approved`, `requested`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`. 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: `approved`, `requested`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] denied # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Denied] # The grant was denied. # - # Note: The following fields are mutually exclusive: `denied`, `requested`, `approved`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`. 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: `denied`, `requested`, `approved`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] revoked # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Revoked] # The grant was revoked. # - # Note: The following fields are mutually exclusive: `revoked`, `requested`, `approved`, `denied`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`. 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: `revoked`, `requested`, `approved`, `denied`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] scheduled # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Scheduled] # The grant has been scheduled to give access. # - # Note: The following fields are mutually exclusive: `scheduled`, `requested`, `approved`, `denied`, `revoked`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`. 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: `scheduled`, `requested`, `approved`, `denied`, `revoked`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] activated # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Activated] # The grant was successfully activated to give access. # - # Note: The following fields are mutually exclusive: `activated`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activation_failed`, `expired`, `ended`, `externally_modified`. 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: `activated`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activation_failed`, `expired`, `ended`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] activation_failed # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::ActivationFailed] # There was a non-retriable error while trying to give access. # - # Note: The following fields are mutually exclusive: `activation_failed`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `expired`, `ended`, `externally_modified`. 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: `activation_failed`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `expired`, `ended`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] expired # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Expired] # The approval workflow did not complete in the necessary duration, # and so the grant is expired. # - # Note: The following fields are mutually exclusive: `expired`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `ended`, `externally_modified`. 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: `expired`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `ended`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] ended # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Ended] # Access given by the grant ended automatically as the approved # duration was over. # - # Note: The following fields are mutually exclusive: `ended`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `externally_modified`. 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: `ended`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `externally_modified`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] externally_modified # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::ExternallyModified] # The policy bindings made by grant have been modified outside of PAM. # - # Note: The following fields are mutually exclusive: `externally_modified`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`. 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: `externally_modified`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `withdrawn`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] withdrawn + # @return [::Google::Cloud::PrivilegedAccessManager::V1::Grant::Timeline::Event::Withdrawn] + # The grant was withdrawn. + # + # Note: The following fields are mutually exclusive: `withdrawn`, `requested`, `approved`, `denied`, `revoked`, `scheduled`, `activated`, `activation_failed`, `expired`, `ended`, `externally_modified`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] event_time # @return [::Google::Protobuf::Timestamp] # Output only. The time (as recorded at server) when this event occurred. @@ -671,6 +676,12 @@ class Revoked extend ::Google::Protobuf::MessageExts::ClassMethods end + # An event representing that the grant was withdrawn. + class Withdrawn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # An event representing that the grant has been scheduled to be # activated later. # @!attribute [r] scheduled_activation_time @@ -773,6 +784,12 @@ module State # System took back access as the requested duration was over. This is a # terminal state. ENDED = 11 + + # Access is being withdrawn. + WITHDRAWING = 12 + + # Grant was withdrawn by the grant owner. This is a terminal state. + WITHDRAWN = 13 end end From 8c1f4a76d0f39960185447d725f7f27b484b52df Mon Sep 17 00:00:00 2001 From: Charlotte Y <38296042+cy-yun@users.noreply.github.com> Date: Tue, 12 Aug 2025 15:36:49 -0700 Subject: [PATCH 412/457] feat(BigQuery): load job external table options (#30743) * feat(BigQuery): add time_zone, time_format, timestamp_format, date_format, datetime_format, null_markers, and source_column_match to LoadJob * feat(BigQuery): add time_zone, time_format, timestamp_format, date_format, and datetime_format to ExternalDataSource * feat(BigQuery): add null_markers, null_marker, and source_column_match to CsvSource --- .../cloud/bigquery/external/csv_source.rb | 171 ++++++++++++++ .../cloud/bigquery/external/data_source.rb | 216 ++++++++++++++++++ .../lib/google/cloud/bigquery/load_job.rb | 167 ++++++++++++++ .../bigquery/external_csv_source_test.rb | 64 ++++++ .../bigquery/external_data_souce_test.rb | 103 ++++++++- .../google/cloud/bigquery/load_job_test.rb | 16 +- 6 files changed, 735 insertions(+), 2 deletions(-) diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/external/csv_source.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/external/csv_source.rb index 0dcd0fe0084b..3adc2decdd73 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/external/csv_source.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/external/csv_source.rb @@ -367,6 +367,177 @@ def skip_leading_rows= row_count @gapi.csv_options.skip_leading_rows = row_count end + ## + # Specifies a string that represents a null value in a CSV file. For + # example, if you specify `\N`, BigQuery interprets `\N` as a null value when + # querying a CSV file. The default value is the empty string. If you set this + # property to a custom value, BigQuery throws an error if an empty string is + # present for all data types except for STRING and BYTE. For STRING and BYTE + # columns, BigQuery interprets the empty string as an empty value. + # + # @return [String, nil] The null marker string. `nil` if not set. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # csv_url = "gs://bucket/path/to/data.csv" + # csv_table = bigquery.external csv_url do |csv| + # csv.null_marker = "\N" + # end + # + # csv_table.null_marker #=> "\N" + # + def null_marker + @gapi.csv_options.null_marker + end + + ## + # Sets a string that represents a null value in a CSV file. For + # example, if you specify `\N`, BigQuery interprets `\N` as a null value when + # querying a CSV file. The default value is the empty string. If you set this + # property to a custom value, BigQuery throws an error if an empty string is + # present for all data types except for STRING and BYTE. For STRING and BYTE + # columns, BigQuery interprets the empty string as an empty value. + # + # @param [String, nil] null_marker The null marker string. `nil` to unset. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # csv_url = "gs://bucket/path/to/data.csv" + # csv_table = bigquery.external csv_url do |csv| + # csv.null_marker = "\N" + # end + # + # csv_table.null_marker #=> "\N" + # + def null_marker= null_marker + frozen_check! + @gapi.csv_options.null_marker = null_marker + end + + ## + # The list of strings represented as SQL NULL value in a CSV file. + # null_marker and null_markers can't be set at the same time. If null_marker is + # set, null_markers has to be not set. If null_markers is set, null_marker has + # to be not set. If both null_marker and null_markers are set at the same time, + # a user error would be thrown. Any strings listed in null_markers, including + # empty string would be interpreted as SQL NULL. This applies to all column + # types. + # + # @return [Array] The array of null marker strings. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # csv_url = "gs://bucket/path/to/data.csv" + # csv_table = bigquery.external csv_url do |csv| + # csv.null_markers = ["\N", "NULL"] + # end + # + # csv_table.null_markers #=> ["\N", "NULL"] + # + def null_markers + @gapi.csv_options.null_markers || [] + end + + ## + # Sets the list of strings represented as SQL NULL value in a CSV file. + # null_marker and null_markers can't be set at the same time. If null_marker is + # set, null_markers has to be not set. If null_markers is set, null_marker has + # to be not set. If both null_marker and null_markers are set at the same time, + # a user error would be thrown. Any strings listed in null_markers, including + # empty string would be interpreted as SQL NULL. This applies to all column + # types. + # + # @param [Array] null_markers The array of null marker strings. + # + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # csv_url = "gs://bucket/path/to/data.csv" + # csv_table = bigquery.external csv_url do |csv| + # csv.null_markers = ["\N", "NULL"] + # end + # + # csv_table.null_markers #=> ["\N", "NULL"] + # + def null_markers= null_markers + frozen_check! + @gapi.csv_options.null_markers = null_markers + end + + # Controls the strategy used to match loaded columns to the schema. + # If not set, a sensible default is chosen based on how the schema is + # provided. If autodetect is used, then columns are matched by name. + # Otherwise, columns are matched by position. This is done to keep the + # behavior backward-compatible. + # + # Acceptable values are: + # - `POSITION`: matches by position. Assumes columns are ordered the + # same way as the schema. + # - `NAME`: matches by name. Reads the header row as column names and + # reorders columns to match the schema. + # + # @return [String, nil] The source column match value. `nil` if not set. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # csv_url = "gs://bucket/path/to/data.csv" + # csv_table = bigquery.external csv_url do |csv| + # csv.source_column_match = "NAME" + # end + # + # csv_table.source_column_match #=> "NAME" + # + def source_column_match + @gapi.csv_options.source_column_match + end + + # Sets the strategy used to match loaded columns to the schema. + # If not set, a sensible default is chosen based on how the schema is + # provided. If autodetect is used, then columns are matched by name. + # Otherwise, columns are matched by position. This is done to keep the + # behavior backward-compatible. Optional. + # + # Acceptable values are: + # - `POSITION`: matches by position. Assumes columns are ordered the + # same way as the schema. + # - `NAME`: matches by name. Reads the header row as column names and + # reorders columns to match the schema. + # + # @param [String, nil] source_column_match The new source column match value. `nil` to unset. + # + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # csv_url = "gs://bucket/path/to/data.csv" + # csv_table = bigquery.external csv_url do |csv| + # csv.source_column_match = "NAME" + # end + # + # csv_table.source_column_match #=> "NAME" + # + def source_column_match= source_column_match + frozen_check! + @gapi.csv_options.source_column_match = source_column_match + end + ## # The schema for the data. # diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/external/data_source.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/external/data_source.rb index 957b7b980cf4..0e289b8ece24 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/external/data_source.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/external/data_source.rb @@ -744,6 +744,222 @@ def hive_partitioning_source_uri_prefix= source_uri_prefix @gapi.hive_partitioning_options.source_uri_prefix = source_uri_prefix end + ## + # Time zone used when parsing timestamp values that do not have specific + # time zone information (e.g. `2024-04-20 12:34:56`). The expected format + # is an IANA timezone string (e.g. `America/Los_Angeles`). + # + # @return [String, nil] The IANA time zone name. `nil` if not set. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.time_zone = "America/Los_Angeles" + # end + # + # external_data.time_zone #=> "America/Los_Angeles" + # + def time_zone + @gapi.time_zone + end + + ## + # Sets the time zone used when parsing timestamp values that do not have + # specific time zone information (e.g. `2024-04-20 12:34:56`). The expected + # format is an IANA timezone string (e.g. `America/Los_Angeles`). + # + # @param [String, nil] time_zone The IANA time zone name. `nil` to unset. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.time_zone = "America/Los_Angeles" + # end + # + # external_data.time_zone #=> "America/Los_Angeles" + # + def time_zone= time_zone + frozen_check! + @gapi.time_zone = time_zone + end + + ## + # Format used to parse TIME values. Supports C-style and SQL-style values. + # + # @return [String, nil] The time format pattern. `nil` if not set. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.time_format = "%H:%M:%S" + # end + # + # external_data.time_format #=> "%H:%M:%S" + # + def time_format + @gapi.time_format + end + + ## + # Sets the format used to parse TIME values. Supports C-style and SQL-style + # values. + # + # @param [String, nil] time_format The time format pattern. `nil` if not set. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.time_format = "%H:%M:%S" + # end + # + # external_data.time_format #=> "%H:%M:%S" + # + def time_format= time_format + frozen_check! + @gapi.time_format = time_format + end + + ## + # Format used to parse TIMESTAMP values. Supports C-style and SQL-style + # values. + # + # @return [String, nil] The timestamp format pattern. `nil` if not set. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.timestamp_format = "%Y-%m-%d %H:%M:%S.%f %z" + # end + # + # external_data.timestamp_format #=> "%Y-%m-%d %H:%M:%S.%f %z" + # + def timestamp_format + @gapi.timestamp_format + end + + ## + # Sets the format used to parse TIMESTAMP values. Supports C-style and SQL-style + # values. + # + # @param [String, nil] timestamp_format The timestamp format pattern. `nil` to unset. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.timestamp_format = "%Y-%m-%d %H:%M:%S.%f %z" + # end + # + # external_data.timestamp_format #=> "%Y-%m-%d %H:%M:%S.%f %z" + # + def timestamp_format= timestamp_format + frozen_check! + @gapi.timestamp_format = timestamp_format + end + + ## + # Format used to parse DATETIME values. Supports C-style and SQL-style + # values. + # + # @return [String, nil] The datetime format pattern. `nil` if not set. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.datetime_format = "%Y-%m-%d %H:%M:%S" + # end + # + # external_data.datetime_format #=> "%Y-%m-%d %H:%M:%S" + # + def datetime_format + @gapi.datetime_format + end + + ## + # Sets the format used to parse DATETIME values. Supports C-style and SQL-style + # values. + # + # @param [String, nil] datetime_format The datetime format pattern. `nil` to unset. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.datetime_format = "%Y-%m-%d %H:%M:%S" + # end + # + # external_data.datetime_format #=> "%Y-%m-%d %H:%M:%S" + # + def datetime_format= datetime_format + frozen_check! + @gapi.datetime_format = datetime_format + end + + ## + # Format used to parse DATE values. Supports C-style and SQL-style + # values. + # + # @return [String, nil] The date format pattern. `nil` if not set. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.date_format = "%Y-%m-%d" + # end + # + # external_data.date_format #=> "%Y-%m-%d" + # + def date_format + @gapi.date_format + end + + ## + # Sets the format used to parse DATE values. Supports C-style and SQL-style + # values. + # + # @param [String, nil] date_format The date format pattern. `nil` to unset. + # + # @example + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # + # external_data = bigquery.external "gs://bucket/path/to/data.csv" do |ext| + # ext.date_format = "%Y-%m-%d" + # end + # + # external_data.date_format #=> "%Y-%m-%d" + # + def date_format= date_format + frozen_check! + @gapi.date_format = date_format + end + ## # @private Google API Client object. def to_gapi diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/load_job.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/load_job.rb index e0098b8adf07..9abb9fa86233 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/load_job.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/load_job.rb @@ -652,6 +652,90 @@ def clustering_fields @gapi.configuration.load.clustering.fields if clustering? end + ## + # Format used to parse DATE values. Supports C-style and SQL-style + # values. + # + # @return [String, nil] The date format pattern, such as + # `%Y-%m-%d`. `nil` if not set. + def date_format + @gapi.configuration.load.date_format + end + + ## + # Format used to parse DATETIME values. Supports C-style and SQL-style + # values. + # + # @return [String, nil] The datetime format pattern, such as + # `%Y-%m-%d %H:%M:%S`. `nil` if not set. + def datetime_format + @gapi.configuration.load.datetime_format + end + + ## + # Format used to parse TIME values. Supports C-style and SQL-style + # values. + # + # @return [String, nil] The time format pattern, such as + # `%H:%M:%S`. `nil` if not set. + def time_format + @gapi.configuration.load.time_format + end + + ## + # Format used to parse TIMESTAMP values. Supports C-style and SQL-style + # values. + # + # @return [String, nil] The timestamp format pattern, such as + # `%Y-%m-%d %H:%M:%S.%f %z`. `nil` if not set. + def timestamp_format + @gapi.configuration.load.timestamp_format + end + + ## + # A list of strings represented as SQL NULL value in a CSV file. + # null_marker and null_markers can't be set at the same time. If null_marker + # is set, null_markers has to be not set. If null_markers is set, null_marker + # has to be not set. If both null_marker and null_markers are set at the same + # time, a user error would be thrown. Any strings listed in null_markers, + # including empty string would be interpreted as SQL NULL. This applies to all + # column types. + # + # @return [Array] The array of null marker strings. + def null_markers + @gapi.configuration.load.null_markers || [] + end + + ## + # Controls the strategy used to match loaded columns to the schema. If + # not set, a sensible default is chosen based on how the schema is provided. + # If autodetect is used, then columns are matched by name. Otherwise, + # columns are matched by position. This is done to keep the behavior + # backward-compatible. + # + # Acceptable values are: + # * `POSITION` - matches by position. This assumes that the columns are + # ordered the same way as the schema. + # * `NAME` - matches by name. This reads the header row as column names + # and reorders columns to match the field names in the schema. + # + # @return [String, nil] The source column match strategy, such as + # `POSITION`. `nil` if not set. + def source_column_match + @gapi.configuration.load.source_column_match + end + + ## + # Time zone used when parsing timestamp values that do not have specific + # time zone information (e.g. `2024-04-20 12:34:56`). The expected format + # is an IANA timezone string (e.g. `America/Los_Angeles`). + # + # @return [String, nil] The IANA time zone name, such as + # `America/Los_Angeles`. `nil` if not set. + def time_zone + @gapi.configuration.load.time_zone + end + ## # Yielded to a block to accumulate changes for a patch request. class Updater < LoadJob @@ -2585,6 +2669,89 @@ def clustering_fields= fields @gapi.configuration.load.clustering.fields = fields end + ## + # Sets the format used to parse DATE values. Supports C-style and SQL-style + # values. + # + # @param [String, nil] date_format The date format pattern, such as + # `%Y-%m-%d`. `nil` to unset. + def date_format= date_format + @gapi.configuration.load.update! date_format: date_format + end + + ## + # Sets the format used to parse DATETIME values. Supports C-style and SQL-style + # values. + # + # @param [String, nil] datetime_format The datetime format pattern, such as + # `%Y-%m-%d %H:%M:%S`. `nil` to unset. + def datetime_format= datetime_format + @gapi.configuration.load.update! datetime_format: datetime_format + end + + ## + # Sets the format used to parse TIME values. Supports C-style and SQL-style + # values. + # + # @param [String, nil] time_format The time format pattern, such as + # `%H:%M:%S`. `nil` to unset. + def time_format= time_format + @gapi.configuration.load.update! time_format: time_format + end + + ## + # Sets the format used to parse TIMESTAMP values. Supports C-style and SQL-style + # values. + # + # @param [String, nil] timestamp_format The timestamp format pattern, such as + # `%Y-%m-%d %H:%M:%S.%f %z`. `nil` to unset. + def timestamp_format= timestamp_format + @gapi.configuration.load.update! timestamp_format: timestamp_format + end + + ## + # Sets the list of strings represented as SQL NULL value in a CSV file. + # null_marker and null_markers can't be set at the same time. If null_marker is + # set, null_markers has to be not set. If null_markers is set, null_marker has + # to be not set. If both null_marker and null_markers are set at the same time, + # a user error would be thrown. Any strings listed in null_markers, including + # empty string would be interpreted as SQL NULL. This applies to all column + # types. + # + # @param [Array] null_markers The array of null marker strings. + def null_markers= null_markers + @gapi.configuration.load.update! null_markers: null_markers + end + + # Sets the strategy used to match loaded columns to the schema. + # If not set, a sensible default is chosen based on how the schema is + # provided. If autodetect is used, then columns are matched by name. + # Otherwise, columns are matched by position. This is done to keep the + # behavior backward-compatible. + # + # Acceptable values are: + # - `POSITION`: matches by position. Assumes columns are ordered the + # same way as the schema. + # - `NAME`: matches by name. Reads the header row as column names and + # reorders columns to match the schema. + # + # @param [String, nil] source_column_match The new source column match value. + # `nil` to unset. + def source_column_match= source_column_match + @gapi.configuration.load.update! source_column_match: source_column_match + end + + ## + # Sets the time zone used when parsing timestamp values that do not have + # specific time zone information (e.g. `2024-04-20 12:34:56`). The expected + # format is an IANA timezone string (e.g. `America/Los_Angeles`). + # + # @param [String, nil] time_zone The IANA time zone name, such as + # `America/Los_Angeles`. `nil` to unset. + def time_zone= time_zone + @gapi.configuration.load.update! time_zone: time_zone + end + def cancel raise "not implemented in #{self.class}" end diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/external_csv_source_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/external_csv_source_test.rb index 395d9c405425..732c374c999b 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/external_csv_source_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/external_csv_source_test.rb @@ -182,6 +182,70 @@ _(table.to_gapi.to_h).must_equal table_gapi.to_h end + it "sets source_column_match" do + table = Google::Cloud::Bigquery::External::CsvSource.new.tap do |e| + e.gapi.source_uris = ["gs://my-bucket/path/to/file.csv"] + e.gapi.source_format = "CSV" + end + table_gapi = Google::Apis::BigqueryV2::ExternalDataConfiguration.new( + source_uris: ["gs://my-bucket/path/to/file.csv"], + source_format: "CSV", + csv_options: Google::Apis::BigqueryV2::CsvOptions.new( + source_column_match: "POSITION" + ) + ) + _(table.source_column_match).must_be :nil? + + table.source_column_match = "POSITION" + + _(table.source_column_match).must_equal "POSITION" + + _(table.to_gapi.to_h).must_equal table_gapi.to_h + end + + it "sets null_markers" do + table = Google::Cloud::Bigquery::External::CsvSource.new.tap do |e| + e.gapi.source_uris = ["gs://my-bucket/path/to/file.csv"] + e.gapi.source_format = "CSV" + end + table_gapi = Google::Apis::BigqueryV2::ExternalDataConfiguration.new( + source_uris: ["gs://my-bucket/path/to/file.csv"], + source_format: "CSV", + csv_options: Google::Apis::BigqueryV2::CsvOptions.new( + null_markers: ["NULL"] + ) + ) + _(table.null_markers).must_equal [] + + table.null_markers = ["NULL"] + + _(table.null_markers).must_equal ["NULL"] + + _(table.to_gapi.to_h).must_equal table_gapi.to_h + end + + it "sets null_marker" do + table = Google::Cloud::Bigquery::External::CsvSource.new.tap do |e| + e.gapi.source_uris = ["gs://my-bucket/path/to/file.csv"] + e.gapi.source_format = "CSV" + end + table_gapi = Google::Apis::BigqueryV2::ExternalDataConfiguration.new( + source_uris: ["gs://my-bucket/path/to/file.csv"], + source_format: "CSV", + csv_options: Google::Apis::BigqueryV2::CsvOptions.new( + null_marker: "NULL" + ) + ) + _(table.null_marker).must_be :nil? + + table.null_marker = "NULL" + + _(table.null_marker).must_equal "NULL" + + _(table.to_gapi.to_h).must_equal table_gapi.to_h + end + + it "sets schema using block" do table = Google::Cloud::Bigquery::External::CsvSource.new.tap do |e| e.gapi.source_uris = ["gs://my-bucket/path/to/file.csv"] diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/external_data_souce_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/external_data_souce_test.rb index 1f6bf323c365..9067b0384a37 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/external_data_souce_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/external_data_souce_test.rb @@ -118,4 +118,105 @@ _(table.to_gapi.to_h).must_equal table_gapi.to_h end -end + + it "sets time_zone" do + table = Google::Cloud::Bigquery::External::DataSource.new.tap do |e| + e.gapi.source_uris = ["gs://my-bucket/path/to/*.avro"] + e.gapi.source_format = "AVRO" + end + table_gapi = Google::Apis::BigqueryV2::ExternalDataConfiguration.new( + source_uris: ["gs://my-bucket/path/to/*.avro"], + source_format: "AVRO", + time_zone: "America/Los_Angeles" + ) + + _(table.time_zone).must_be :nil? + + table.time_zone = "America/Los_Angeles" + + _(table.time_zone).must_equal "America/Los_Angeles" + + _(table.to_gapi.to_h).must_equal table_gapi.to_h + end + + it "sets time_format" do + table = Google::Cloud::Bigquery::External::DataSource.new.tap do |e| + e.gapi.source_uris = ["gs://my-bucket/path/to/*.avro"] + e.gapi.source_format = "AVRO" + end + table_gapi = Google::Apis::BigqueryV2::ExternalDataConfiguration.new( + source_uris: ["gs://my-bucket/path/to/*.avro"], + source_format: "AVRO", + time_format: "%H:%M:%S" + ) + + _(table.time_format).must_be :nil? + + table.time_format = "%H:%M:%S" + + _(table.time_format).must_equal "%H:%M:%S" + + _(table.to_gapi.to_h).must_equal table_gapi.to_h + end + + it "sets timestamp_format" do + table = Google::Cloud::Bigquery::External::DataSource.new.tap do |e| + e.gapi.source_uris = ["gs://my-bucket/path/to/*.avro"] + e.gapi.source_format = "AVRO" + end + table_gapi = Google::Apis::BigqueryV2::ExternalDataConfiguration.new( + source_uris: ["gs://my-bucket/path/to/*.avro"], + source_format: "AVRO", + timestamp_format: "%Y-%m-%d %H:%M:%S.%f %z" + ) + + _(table.timestamp_format).must_be :nil? + + table.timestamp_format = "%Y-%m-%d %H:%M:%S.%f %z" + + _(table.timestamp_format).must_equal "%Y-%m-%d %H:%M:%S.%f %z" + + _(table.to_gapi.to_h).must_equal table_gapi.to_h + end + + it "sets datetime_format" do + table = Google::Cloud::Bigquery::External::DataSource.new.tap do |e| + e.gapi.source_uris = ["gs://my-bucket/path/to/*.avro"] + e.gapi.source_format = "AVRO" + end + table_gapi = Google::Apis::BigqueryV2::ExternalDataConfiguration.new( + source_uris: ["gs://my-bucket/path/to/*.avro"], + source_format: "AVRO", + datetime_format: "%Y-%m-%d %H:%M:%S.%f %z" + ) + + _(table.datetime_format).must_be :nil? + + table.datetime_format = "%Y-%m-%d %H:%M:%S.%f %z" + + _(table.datetime_format).must_equal "%Y-%m-%d %H:%M:%S.%f %z" + + _(table.to_gapi.to_h).must_equal table_gapi.to_h + end + + it "sets date_format" do + table = Google::Cloud::Bigquery::External::DataSource.new.tap do |e| + e.gapi.source_uris = ["gs://my-bucket/path/to/*.avro"] + e.gapi.source_format = "AVRO" + end + table_gapi = Google::Apis::BigqueryV2::ExternalDataConfiguration.new( + source_uris: ["gs://my-bucket/path/to/*.avro"], + source_format: "AVRO", + date_format: "%Y-%m-%d" + ) + + _(table.date_format).must_be :nil? + + table.date_format = "%Y-%m-%d" + + _(table.date_format).must_equal "%Y-%m-%d" + + _(table.to_gapi.to_h).must_equal table_gapi.to_h + end + +end \ No newline at end of file diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/load_job_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/load_job_test.rb index 3140c18303c9..176b1c499490 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/load_job_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/load_job_test.rb @@ -107,6 +107,13 @@ _(job).wont_be :backup? _(job).must_be :allow_jagged_rows? _(job).must_be :ignore_unknown_values? + _(job.date_format).must_equal "%Y-%m-%d" + _(job.time_format).must_equal "%H:%M:%S" + _(job.datetime_format).must_equal "%Y-%m-%d %H:%M:%S" + _(job.timestamp_format).must_equal "%Y-%m-%d %H:%M:%S.%f %z" + _(job.null_markers).must_equal ["NULL", "nil"] + _(job.source_column_match).must_equal "POSITION" + _(job.time_zone).must_equal "America/Los_Angeles" end it "knows its statistics data" do @@ -175,7 +182,14 @@ def load_job_hash "autodetect" => true, "sourceFormat" => "NEWLINE_DELIMITED_JSON", "allowJaggedRows" => true, - "ignoreUnknownValues" => true + "ignoreUnknownValues" => true, + "dateFormat" => "%Y-%m-%d", + "timeFormat" => "%H:%M:%S", + "datetimeFormat" => "%Y-%m-%d %H:%M:%S", + "timestampFormat" => "%Y-%m-%d %H:%M:%S.%f %z", + "nullMarkers" => ["NULL", "nil"], + "sourceColumnMatch" => "POSITION", + "timeZone" => "America/Los_Angeles", } hash["statistics"]["load"] = { "inputFiles" => "3", # String per google/google-api-ruby-client#439 From dd2a5950f1661e05c2130ee12e34eb53ea239f14 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 12:56:58 -0700 Subject: [PATCH 413/457] feat(ai_platform-v1): Support for the feature_view_direct_write RPC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(ai_platform-v1): Support for using the Model Armor service when generating content feat(ai_platform-v1): Support for grounding chunk from Google Maps feat(ai_platform-v1): Support for deployment stage feat(ai_platform-v1): Support for embedding metadataw for a datapoint feat(ai_platform-v1): Support for logging errors related to datapoint upserts feat(ai_platform-v1): Support for a user ID for an uploaded model feat(ai_platform-v1): Support for specifying endpoint ID feat(ai_platform-v1): Support for instance and resource limits in a deployment spec feat(ai_platform-v1): Support for container concurrency in a deployment spec feat(ai_platform-v1): Support for customer-managed encryption key spec for a ReasoningEngine feat(ai_platform-v1): Support for Google Maps in a model feat(ai_platform-v1): Support for excluding domains from search results feat(ai_platform-v1): Added dedicated_endpoint_disabled flag and deprecated dedicated_endpoint_enabled feat(ai_platform-v1): RetrievedContext now includes the full name for the referenced Vertex AI Search document fix(ai_platform-v1): Removed thought and thought_signature from the mutual exclusion list under Part PiperOrigin-RevId: 788957149 Source-Link: https://github.com/googleapis/googleapis/commit/2d4fbff6d1f8e97ff077b49f8a4bc8ac663dc5d3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fc4a4a09957b8e0808bbe70cebc4d30dfccb10f4 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJmYzRhNGEwOTk1N2I4ZTA4MDhiYmU3MGNlYmM0ZDMwZGZjY2IxMGY0In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 789091292 Source-Link: https://github.com/googleapis/googleapis/commit/abf48aa1ce2a5b93f97055b215c1ac8087ead2ef Source-Link: https://github.com/googleapis/googleapis-gen/commit/06f6925ade7d8d0ebd29137ee3be24532ed88d37 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIwNmY2OTI1YWRlN2Q4ZDBlYmQyOTEzN2VlM2JlMjQ1MzJlZDg4ZDM3In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 789150946 Source-Link: https://github.com/googleapis/googleapis/commit/0e31cfedb652681c5f4ff3d803f75c5b30f3a9cc Source-Link: https://github.com/googleapis/googleapis-gen/commit/3d4256dc9e3c7ea85260f5bca6e9a6aa8d37c575 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIzZDQyNTZkYzllM2M3ZWE4NTI2MGY1YmNhNmU5YTZhYThkMzdjNTc1In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 790759548 Source-Link: https://github.com/googleapis/googleapis/commit/ebcf3f532da40475bc1e7a6ad34d31c6c32004fa Source-Link: https://github.com/googleapis/googleapis-gen/commit/3d1ac34266128a0e8d7176270d4e369a86908334 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIzZDFhYzM0MjY2MTI4YTBlOGQ3MTc2MjcwZDRlMzY5YTg2OTA4MzM0In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 790786891 Source-Link: https://github.com/googleapis/googleapis/commit/5d7a4a607c368f9c718c432626dc39b8cb8c3543 Source-Link: https://github.com/googleapis/googleapis-gen/commit/97ad4f647ddedd2bed51c80a7a68ae9a372d8bba Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI5N2FkNGY2NDdkZGVkZDJiZWQ1MWM4MGE3YTY4YWU5YTM3MmQ4YmJhIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 790824087 Source-Link: https://github.com/googleapis/googleapis/commit/d2dbcdb9a4f33b8bbfa890a25236b2301dd26c94 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5dd29a4eeb24d5ec86b93e245d88a10161654d11 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI1ZGQyOWE0ZWViMjRkNWVjODZiOTNlMjQ1ZDg4YTEwMTYxNjU0ZDExIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 790876671 Source-Link: https://github.com/googleapis/googleapis/commit/8c74a4f9ad52cfd7a7d1f6427fa0a0511377a395 Source-Link: https://github.com/googleapis/googleapis-gen/commit/43879fbaa7fe9f74b65ab25a737d51529f107f72 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI0Mzg3OWZiYWE3ZmU5Zjc0YjY1YWIyNWE3MzdkNTE1MjlmMTA3ZjcyIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 792213276 Source-Link: https://github.com/googleapis/googleapis/commit/e58f8133fb635cbaa0ca8e2f14bf7ef489559ec9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/70b047fb25cce65077ba42b1f81942013c857361 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI3MGIwNDdmYjI1Y2NlNjUwNzdiYTQyYjFmODE5NDIwMTNjODU3MzYxIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 792745180 Source-Link: https://github.com/googleapis/googleapis/commit/85f7aecabe1da39d3377ab87135ea21c9169a6ea Source-Link: https://github.com/googleapis/googleapis-gen/commit/d68782f69bd428937f9bdc38cfc327e1457a85bf Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkNjg3ODJmNjliZDQyODkzN2Y5YmRjMzhjZmMzMjdlMTQ1N2E4NWJmIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 793753394 Source-Link: https://github.com/googleapis/googleapis/commit/6d24fdd2b02e45deaddb3fa477b105a690bb08f9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e8c2681df57b0039d377437b78278f078e1bbe2b Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJlOGMyNjgxZGY1N2IwMDM5ZDM3NzQzN2I3ODI3OGYwNzhlMWJiZTJiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 793795027 Source-Link: https://github.com/googleapis/googleapis/commit/54236ee27615601824c1387f716cd57bb6823ad0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/51de9fee43e5f20fbc41b1211a625792caa5f503 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI1MWRlOWZlZTQzZTVmMjBmYmM0MWIxMjExYTYyNTc5MmNhYTVmNTAzIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md PiperOrigin-RevId: 794602136 Source-Link: https://github.com/googleapis/googleapis/commit/8fe8f9f460fe5dd1df95057659d2520ceca3c9c6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b5e8446f80b043a194469995bf42f248f5d504c4 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiNWU4NDQ2ZjgwYjA0M2ExOTQ0Njk5OTViZjQyZjI0OGY1ZDUwNGM0In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../.owlbot-manifest.json | 3 + .../gapic_metadata.json | 5 ++ .../ai_platform/v1/endpoint_service/client.rb | 8 +- .../v1/endpoint_service/rest/client.rb | 8 +- .../v1/feature_online_store_service/client.rb | 87 ++++++++++++++++++ .../v1/featurestore_service/client.rb | 1 - .../v1/featurestore_service/rest/client.rb | 1 - .../v1/prediction_service/client.rb | 10 ++- .../v1/prediction_service/paths.rb | 19 ++++ .../v1/prediction_service/rest/client.rb | 10 ++- .../v1/reasoning_engine_service/paths.rb | 19 ++++ .../aiplatform/v1/accelerator_type_pb.rb | 2 +- .../google/cloud/aiplatform/v1/content_pb.rb | 5 +- .../aiplatform/v1/deployment_stage_pb.rb | 42 +++++++++ .../aiplatform/v1/endpoint_service_pb.rb | 3 +- .../v1/endpoint_service_services_pb.rb | 6 +- .../v1/feature_online_store_service_pb.rb | 11 ++- ...eature_online_store_service_services_pb.rb | 4 + .../cloud/aiplatform/v1/index_endpoint_pb.rb | 2 +- .../google/cloud/aiplatform/v1/index_pb.rb | 2 +- .../aiplatform/v1/model_garden_service_pb.rb | 2 +- .../aiplatform/v1/prediction_service_pb.rb | 2 +- .../aiplatform/v1/reasoning_engine_pb.rb | 6 +- .../lib/google/cloud/aiplatform/v1/tool_pb.rb | 3 +- .../cloud/aiplatform/v1/accelerator_type.rb | 3 + .../google/cloud/aiplatform/v1/content.rb | 72 ++++++++++++--- .../cloud/aiplatform/v1/deployment_stage.rb | 56 ++++++++++++ .../cloud/aiplatform/v1/endpoint_service.rb | 9 ++ .../v1/feature_online_store_service.rb | 81 +++++++++++++++++ .../v1/featurestore_online_service.rb | 8 +- .../aiplatform/v1/featurestore_service.rb | 1 - .../google/cloud/aiplatform/v1/index.rb | 3 + .../cloud/aiplatform/v1/index_endpoint.rb | 12 +++ .../aiplatform/v1/model_garden_service.rb | 51 +++++++++-- .../cloud/aiplatform/v1/prediction_service.rb | 7 ++ .../cloud/aiplatform/v1/reasoning_engine.rb | 47 +++++++++- .../google/cloud/aiplatform/v1/tool.rb | 19 ++++ .../feature_view_direct_write.rb | 56 ++++++++++++ ...t_metadata_google.cloud.aiplatform.v1.json | 40 +++++++++ .../v1/feature_online_store_service_test.rb | 90 +++++++++++++++++++ .../v1/prediction_service_paths_test.rb | 12 +++ .../v1/prediction_service_rest_test.rb | 22 ++--- .../ai_platform/v1/prediction_service_test.rb | 24 ++--- .../v1/reasoning_engine_service_paths_test.rb | 12 +++ 44 files changed, 818 insertions(+), 68 deletions(-) create mode 100644 google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/deployment_stage_pb.rb create mode 100644 google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/deployment_stage.rb create mode 100644 google-cloud-ai_platform-v1/snippets/feature_online_store_service/feature_view_direct_write.rb diff --git a/google-cloud-ai_platform-v1/.owlbot-manifest.json b/google-cloud-ai_platform-v1/.owlbot-manifest.json index ffe3ca7e99b2..ea69e6401a77 100644 --- a/google-cloud-ai_platform-v1/.owlbot-manifest.json +++ b/google-cloud-ai_platform-v1/.owlbot-manifest.json @@ -310,6 +310,7 @@ "lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb", "lib/google/cloud/aiplatform/v1/deployment_resource_pool_service_pb.rb", "lib/google/cloud/aiplatform/v1/deployment_resource_pool_service_services_pb.rb", + "lib/google/cloud/aiplatform/v1/deployment_stage_pb.rb", "lib/google/cloud/aiplatform/v1/encryption_spec_pb.rb", "lib/google/cloud/aiplatform/v1/endpoint_pb.rb", "lib/google/cloud/aiplatform/v1/endpoint_service_pb.rb", @@ -465,6 +466,7 @@ "proto_docs/google/cloud/aiplatform/v1/deployed_model_ref.rb", "proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb", "proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool_service.rb", + "proto_docs/google/cloud/aiplatform/v1/deployment_stage.rb", "proto_docs/google/cloud/aiplatform/v1/encryption_spec.rb", "proto_docs/google/cloud/aiplatform/v1/endpoint.rb", "proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb", @@ -663,6 +665,7 @@ "snippets/feature_online_store_admin_service/sync_feature_view.rb", "snippets/feature_online_store_admin_service/update_feature_online_store.rb", "snippets/feature_online_store_admin_service/update_feature_view.rb", + "snippets/feature_online_store_service/feature_view_direct_write.rb", "snippets/feature_online_store_service/fetch_feature_values.rb", "snippets/feature_online_store_service/search_nearest_entities.rb", "snippets/feature_registry_service/batch_create_features.rb", diff --git a/google-cloud-ai_platform-v1/gapic_metadata.json b/google-cloud-ai_platform-v1/gapic_metadata.json index fa3e4857248f..d359867b2fda 100644 --- a/google-cloud-ai_platform-v1/gapic_metadata.json +++ b/google-cloud-ai_platform-v1/gapic_metadata.json @@ -328,6 +328,11 @@ "methods": [ "search_nearest_entities" ] + }, + "FeatureViewDirectWrite": { + "methods": [ + "feature_view_direct_write" + ] } } } diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb index cdc6265334e6..f5c77e8352ea 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb @@ -1066,9 +1066,9 @@ def undeploy_model request, options = nil ## # Updates an existing deployed model. Updatable fields include - # `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, - # `disable_container_logging` (v1 only), and `enable_container_logging` - # (v1beta1 only). + # `min_replica_count`, `max_replica_count`, `required_replica_count`, + # `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and + # `enable_container_logging` (v1beta1 only). # # @overload mutate_deployed_model(request, options = nil) # Pass arguments to `mutate_deployed_model` via a request object, either of type @@ -1099,6 +1099,8 @@ def undeploy_model request, options = nil # * `max_replica_count` in either # {::Google::Cloud::AIPlatform::V1::DedicatedResources DedicatedResources} or # {::Google::Cloud::AIPlatform::V1::AutomaticResources AutomaticResources} + # * `required_replica_count` in + # {::Google::Cloud::AIPlatform::V1::DedicatedResources DedicatedResources} # * {::Google::Cloud::AIPlatform::V1::DedicatedResources#autoscaling_metric_specs autoscaling_metric_specs} # * `disable_container_logging` (v1 only) # * `enable_container_logging` (v1beta1 only) diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb index 75d8cc5cf8bd..cb01d73fdfc8 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb @@ -1005,9 +1005,9 @@ def undeploy_model request, options = nil ## # Updates an existing deployed model. Updatable fields include - # `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, - # `disable_container_logging` (v1 only), and `enable_container_logging` - # (v1beta1 only). + # `min_replica_count`, `max_replica_count`, `required_replica_count`, + # `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and + # `enable_container_logging` (v1beta1 only). # # @overload mutate_deployed_model(request, options = nil) # Pass arguments to `mutate_deployed_model` via a request object, either of type @@ -1038,6 +1038,8 @@ def undeploy_model request, options = nil # * `max_replica_count` in either # {::Google::Cloud::AIPlatform::V1::DedicatedResources DedicatedResources} or # {::Google::Cloud::AIPlatform::V1::AutomaticResources AutomaticResources} + # * `required_replica_count` in + # {::Google::Cloud::AIPlatform::V1::DedicatedResources DedicatedResources} # * {::Google::Cloud::AIPlatform::V1::DedicatedResources#autoscaling_metric_specs autoscaling_metric_specs} # * `disable_container_logging` (v1 only) # * `enable_container_logging` (v1beta1 only) diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb index 8aa397258860..b6f0dae311d9 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb @@ -402,6 +402,86 @@ def search_nearest_entities request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Bidirectional streaming RPC to directly write to feature values in a + # feature view. Requests may not have a one-to-one mapping to responses and + # responses may be returned out-of-order to reduce latency. + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest, ::Hash>] + # An enumerable of {::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ai_platform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the feature_view_direct_write method to start streaming. + # output = client.feature_view_direct_write input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest.new + # input << Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse + # output.each do |current_response| + # p current_response + # end + # + def feature_view_direct_write request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest + end + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.feature_view_direct_write.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::AIPlatform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.feature_view_direct_write.timeout, + metadata: metadata, + retry_policy: @config.rpcs.feature_view_direct_write.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @feature_online_store_service_stub.call_rpc :feature_view_direct_write, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the FeatureOnlineStoreService API. # @@ -578,6 +658,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :search_nearest_entities + ## + # RPC-specific configuration for `feature_view_direct_write` + # @return [::Gapic::Config::Method] + # + attr_reader :feature_view_direct_write # @private def initialize parent_rpcs = nil @@ -585,6 +670,8 @@ def initialize parent_rpcs = nil @fetch_feature_values = ::Gapic::Config::Method.new fetch_feature_values_config search_nearest_entities_config = parent_rpcs.search_nearest_entities if parent_rpcs.respond_to? :search_nearest_entities @search_nearest_entities = ::Gapic::Config::Method.new search_nearest_entities_config + feature_view_direct_write_config = parent_rpcs.feature_view_direct_write if parent_rpcs.respond_to? :feature_view_direct_write + @feature_view_direct_write = ::Gapic::Config::Method.new feature_view_direct_write_config yield self if block_given? end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb index a5eab2d6340c..6b6cce2761b7 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb @@ -2545,7 +2545,6 @@ def delete_feature_values request, options = nil # containing the substring `foo` and description containing the substring # `bar`. # - # # Besides field queries, the following exact-match filters are # supported. The exact-match filters do not support wildcards. Unlike # field-restricted queries, exact-match filters are case-sensitive. diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb index 70b96c76da81..47cf49d21338 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb @@ -2400,7 +2400,6 @@ def delete_feature_values request, options = nil # containing the substring `foo` and description containing the substring # `bar`. # - # # Besides field queries, the following exact-match filters are # supported. The exact-match filters do not support wildcards. Unlike # field-restricted queries, exact-match filters are case-sensitive. diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/client.rb index 5aa485b185d3..329b31602d0c 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/client.rb @@ -1262,7 +1262,7 @@ def explain request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil) + # @overload generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, model_armor_config: nil, generation_config: nil) # Pass arguments to `generate_content` 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). @@ -1313,6 +1313,9 @@ def explain request, options = nil # @param safety_settings [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting, ::Hash>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. + # @param model_armor_config [::Google::Cloud::AIPlatform::V1::ModelArmorConfig, ::Hash] + # Optional. Settings for prompt and response sanitization using the Model + # Armor service. If supplied, safety_settings must not be supplied. # @param generation_config [::Google::Cloud::AIPlatform::V1::GenerationConfig, ::Hash] # Optional. Generation config. # @@ -1393,7 +1396,7 @@ def generate_content request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil) + # @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, model_armor_config: nil, generation_config: nil) # Pass arguments to `stream_generate_content` 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). @@ -1444,6 +1447,9 @@ def generate_content request, options = nil # @param safety_settings [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting, ::Hash>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. + # @param model_armor_config [::Google::Cloud::AIPlatform::V1::ModelArmorConfig, ::Hash] + # Optional. Settings for prompt and response sanitization using the Model + # Armor service. If supplied, safety_settings must not be supplied. # @param generation_config [::Google::Cloud::AIPlatform::V1::GenerationConfig, ::Hash] # Optional. Generation config. # diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb index 22b16a8e84a3..c76059a35b45 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb @@ -107,6 +107,25 @@ def rag_corpus_path project:, location:, rag_corpus: "projects/#{project}/locations/#{location}/ragCorpora/#{rag_corpus}" end + ## + # Create a fully-qualified Template resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/templates/{template}` + # + # @param project [String] + # @param location [String] + # @param template [String] + # + # @return [::String] + def template_path project:, location:, template: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/templates/#{template}" + end + extend self end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb index 23233618813e..65bb2ba6be10 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb @@ -897,7 +897,7 @@ def explain request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil) + # @overload generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, model_armor_config: nil, generation_config: nil) # Pass arguments to `generate_content` 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). @@ -948,6 +948,9 @@ def explain request, options = nil # @param safety_settings [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting, ::Hash>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. + # @param model_armor_config [::Google::Cloud::AIPlatform::V1::ModelArmorConfig, ::Hash] + # Optional. Settings for prompt and response sanitization using the Model + # Armor service. If supplied, safety_settings must not be supplied. # @param generation_config [::Google::Cloud::AIPlatform::V1::GenerationConfig, ::Hash] # Optional. Generation config. # @yield [result, operation] Access the result along with the TransportOperation object @@ -1021,7 +1024,7 @@ def generate_content request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil) + # @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, model_armor_config: nil, generation_config: nil) # Pass arguments to `stream_generate_content` 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). @@ -1072,6 +1075,9 @@ def generate_content request, options = nil # @param safety_settings [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting, ::Hash>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. + # @param model_armor_config [::Google::Cloud::AIPlatform::V1::ModelArmorConfig, ::Hash] + # Optional. Settings for prompt and response sanitization using the Model + # Armor service. If supplied, safety_settings must not be supplied. # @param generation_config [::Google::Cloud::AIPlatform::V1::GenerationConfig, ::Hash] # Optional. Generation config. # @return [::Enumerable<::Google::Cloud::AIPlatform::V1::GenerateContentResponse>] diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/reasoning_engine_service/paths.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/reasoning_engine_service/paths.rb index b1fda620a119..aed8a3950402 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/reasoning_engine_service/paths.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/reasoning_engine_service/paths.rb @@ -41,6 +41,25 @@ def location_path project:, location: "projects/#{project}/locations/#{location}" end + ## + # Create a fully-qualified NetworkAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` + # + # @param project [String] + # @param region [String] + # @param networkattachment [String] + # + # @return [::String] + def network_attachment_path project:, region:, networkattachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" + end + ## # Create a fully-qualified ReasoningEngine resource string. # diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb index 180e28991491..6be87f5999a2 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb @@ -5,7 +5,7 @@ require 'google/protobuf' -descriptor_data = "\n1google/cloud/aiplatform/v1/accelerator_type.proto\x12\x1agoogle.cloud.aiplatform.v1*\xf6\x02\n\x0f\x41\x63\x63\x65leratorType\x12 \n\x1c\x41\x43\x43\x45LERATOR_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10NVIDIA_TESLA_K80\x10\x01\x1a\x02\x08\x01\x12\x15\n\x11NVIDIA_TESLA_P100\x10\x02\x12\x15\n\x11NVIDIA_TESLA_V100\x10\x03\x12\x13\n\x0fNVIDIA_TESLA_P4\x10\x04\x12\x13\n\x0fNVIDIA_TESLA_T4\x10\x05\x12\x15\n\x11NVIDIA_TESLA_A100\x10\x08\x12\x14\n\x10NVIDIA_A100_80GB\x10\t\x12\r\n\tNVIDIA_L4\x10\x0b\x12\x14\n\x10NVIDIA_H100_80GB\x10\r\x12\x19\n\x15NVIDIA_H100_MEGA_80GB\x10\x0e\x12\x15\n\x11NVIDIA_H200_141GB\x10\x0f\x12\x0f\n\x0bNVIDIA_B200\x10\x10\x12\n\n\x06TPU_V2\x10\x06\x12\n\n\x06TPU_V3\x10\x07\x12\x0e\n\nTPU_V4_POD\x10\n\x12\x12\n\x0eTPU_V5_LITEPOD\x10\x0c\x42\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14\x41\x63\x63\x65leratorTypeProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n1google/cloud/aiplatform/v1/accelerator_type.proto\x12\x1agoogle.cloud.aiplatform.v1*\x88\x03\n\x0f\x41\x63\x63\x65leratorType\x12 \n\x1c\x41\x43\x43\x45LERATOR_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10NVIDIA_TESLA_K80\x10\x01\x1a\x02\x08\x01\x12\x15\n\x11NVIDIA_TESLA_P100\x10\x02\x12\x15\n\x11NVIDIA_TESLA_V100\x10\x03\x12\x13\n\x0fNVIDIA_TESLA_P4\x10\x04\x12\x13\n\x0fNVIDIA_TESLA_T4\x10\x05\x12\x15\n\x11NVIDIA_TESLA_A100\x10\x08\x12\x14\n\x10NVIDIA_A100_80GB\x10\t\x12\r\n\tNVIDIA_L4\x10\x0b\x12\x14\n\x10NVIDIA_H100_80GB\x10\r\x12\x19\n\x15NVIDIA_H100_MEGA_80GB\x10\x0e\x12\x15\n\x11NVIDIA_H200_141GB\x10\x0f\x12\x0f\n\x0bNVIDIA_B200\x10\x10\x12\x10\n\x0cNVIDIA_GB200\x10\x11\x12\n\n\x06TPU_V2\x10\x06\x12\n\n\x06TPU_V3\x10\x07\x12\x0e\n\nTPU_V4_POD\x10\n\x12\x12\n\x0eTPU_V5_LITEPOD\x10\x0c\x42\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14\x41\x63\x63\x65leratorTypeProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb index baa8a32d3253..dfde46bbfb8f 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb @@ -5,6 +5,7 @@ require 'google/protobuf' require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' require 'google/cloud/aiplatform/v1/openapi_pb' require 'google/cloud/aiplatform/v1/tool_pb' require 'google/cloud/aiplatform/v1/vertex_rag_data_pb' @@ -13,7 +14,7 @@ require 'google/type/date_pb' -descriptor_data = "\n(google/cloud/aiplatform/v1/content.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a\x30google/cloud/aiplatform/v1/vertex_rag_data.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16google/type/date.proto\"R\n\x07\x43ontent\x12\x11\n\x04role\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x05parts\x18\x02 \x03(\x0b\x32 .google.cloud.aiplatform.v1.PartB\x03\xe0\x41\x02\"\xec\x04\n\x04Part\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12<\n\x0binline_data\x18\x02 \x01(\x0b\x32 .google.cloud.aiplatform.v1.BlobB\x03\xe0\x41\x01H\x00\x12>\n\tfile_data\x18\x03 \x01(\x0b\x32$.google.cloud.aiplatform.v1.FileDataB\x03\xe0\x41\x01H\x00\x12\x46\n\rfunction_call\x18\x05 \x01(\x0b\x32(.google.cloud.aiplatform.v1.FunctionCallB\x03\xe0\x41\x01H\x00\x12N\n\x11\x66unction_response\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.FunctionResponseB\x03\xe0\x41\x01H\x00\x12J\n\x0f\x65xecutable_code\x18\x08 \x01(\x0b\x32*.google.cloud.aiplatform.v1.ExecutableCodeB\x03\xe0\x41\x01H\x00\x12U\n\x15\x63ode_execution_result\x18\t \x01(\x0b\x32/.google.cloud.aiplatform.v1.CodeExecutionResultB\x03\xe0\x41\x01H\x00\x12\x16\n\x07thought\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12 \n\x11thought_signature\x18\x0b \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12H\n\x0evideo_metadata\x18\x04 \x01(\x0b\x32).google.cloud.aiplatform.v1.VideoMetadataB\x03\xe0\x41\x01H\x01\x42\x06\n\x04\x64\x61taB\n\n\x08metadata\"1\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"9\n\x08\x46ileData\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x66ile_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"y\n\rVideoMetadata\x12\x34\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x32\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xf8\x0c\n\x10GenerationConfig\x12\x1d\n\x0btemperature\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05top_p\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x17\n\x05top_k\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12!\n\x0f\x63\x61ndidate_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12#\n\x11max_output_tokens\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\x0estop_sequences\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12#\n\x11response_logprobs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x1a\n\x08logprobs\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\"\n\x10presence_penalty\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12#\n\x11\x66requency_penalty\x18\t \x01(\x02\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x16\n\x04seed\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\t\x88\x01\x01\x12\x1f\n\x12response_mime_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fresponse_schema\x18\x10 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x14response_json_schema\x18\x1c \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\\\n\x0erouting_config\x18\x11 \x01(\x0b\x32:.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfigB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12Y\n\x0fthinking_config\x18\x19 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfigB\x03\xe0\x41\x01\x1a\xc2\x04\n\rRoutingConfig\x12_\n\tauto_mode\x18\x01 \x01(\x0b\x32J.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingModeH\x00\x12\x63\n\x0bmanual_mode\x18\x02 \x01(\x0b\x32L.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingModeH\x00\x1a\x9b\x02\n\x0f\x41utoRoutingMode\x12\x88\x01\n\x18model_routing_preference\x18\x01 \x01(\x0e\x32\x61.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreferenceH\x00\x88\x01\x01\"`\n\x16ModelRoutingPreference\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x16\n\x12PRIORITIZE_QUALITY\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\x12\x13\n\x0fPRIORITIZE_COST\x10\x03\x42\x1b\n\x19_model_routing_preference\x1a;\n\x11ManualRoutingMode\x12\x17\n\nmodel_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0erouting_config\x1a\x80\x01\n\x0eThinkingConfig\x12\"\n\x10include_thoughts\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0fthinking_budget\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_include_thoughtsB\x12\n\x10_thinking_budgetB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x12\n\x10_candidate_countB\x14\n\x12_max_output_tokensB\x14\n\x12_response_logprobsB\x0b\n\t_logprobsB\x13\n\x11_presence_penaltyB\x14\n\x12_frequency_penaltyB\x07\n\x05_seedB\x12\n\x10_response_schemaB\x17\n\x15_response_json_schemaB\x11\n\x0f_routing_config\"\xeb\x03\n\rSafetySetting\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x02\x12T\n\tthreshold\x18\x02 \x01(\x0e\x32<.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThresholdB\x03\xe0\x41\x02\x12N\n\x06method\x18\x04 \x01(\x0e\x32\x39.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethodB\x03\xe0\x41\x01\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\"S\n\x0fHarmBlockMethod\x12!\n\x1dHARM_BLOCK_METHOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08SEVERITY\x10\x01\x12\x0f\n\x0bPROBABILITY\x10\x02\"\xbf\x04\n\x0cSafetyRating\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x03\x12R\n\x0bprobability\x18\x02 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.SafetyRating.HarmProbabilityB\x03\xe0\x41\x03\x12\x1e\n\x11probability_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\x12L\n\x08severity\x18\x06 \x01(\x0e\x32\x35.google.cloud.aiplatform.v1.SafetyRating.HarmSeverityB\x03\xe0\x41\x03\x12\x1b\n\x0eseverity_score\x18\x07 \x01(\x02\x42\x03\xe0\x41\x03\x12\x14\n\x07\x62locked\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"b\n\x0fHarmProbability\x12 \n\x1cHARM_PROBABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nNEGLIGIBLE\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\x94\x01\n\x0cHarmSeverity\x12\x1d\n\x19HARM_SEVERITY_UNSPECIFIED\x10\x00\x12\x1c\n\x18HARM_SEVERITY_NEGLIGIBLE\x10\x01\x12\x15\n\x11HARM_SEVERITY_LOW\x10\x02\x12\x18\n\x14HARM_SEVERITY_MEDIUM\x10\x03\x12\x16\n\x12HARM_SEVERITY_HIGH\x10\x04\"P\n\x10\x43itationMetadata\x12<\n\tcitations\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.CitationB\x03\xe0\x41\x03\"\xaa\x01\n\x08\x43itation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07license\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x30\n\x10publication_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\"\xcf\x06\n\tCandidate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x39\n\x07\x63ontent\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x03\x12\x12\n\x05score\x18\x08 \x01(\x01\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61vg_logprobs\x18\t \x01(\x01\x42\x03\xe0\x41\x03\x12H\n\x0flogprobs_result\x18\n \x01(\x0b\x32*.google.cloud.aiplatform.v1.LogprobsResultB\x03\xe0\x41\x03\x12N\n\rfinish_reason\x18\x03 \x01(\x0e\x32\x32.google.cloud.aiplatform.v1.Candidate.FinishReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x04 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12 \n\x0e\x66inish_message\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12L\n\x11\x63itation_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.CitationMetadataB\x03\xe0\x41\x03\x12N\n\x12grounding_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GroundingMetadataB\x03\xe0\x41\x03\x12Q\n\x14url_context_metadata\x18\x0b \x01(\x0b\x32..google.cloud.aiplatform.v1.UrlContextMetadataB\x03\xe0\x41\x03\"\xbc\x01\n\x0c\x46inishReason\x12\x1d\n\x19\x46INISH_REASON_UNSPECIFIED\x10\x00\x12\x08\n\x04STOP\x10\x01\x12\x0e\n\nMAX_TOKENS\x10\x02\x12\n\n\x06SAFETY\x10\x03\x12\x0e\n\nRECITATION\x10\x04\x12\t\n\x05OTHER\x10\x05\x12\r\n\tBLOCKLIST\x10\x06\x12\x16\n\x12PROHIBITED_CONTENT\x10\x07\x12\x08\n\x04SPII\x10\x08\x12\x1b\n\x17MALFORMED_FUNCTION_CALL\x10\tB\x11\n\x0f_finish_message\"X\n\x12UrlContextMetadata\x12\x42\n\x0curl_metadata\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.UrlMetadataB\x03\xe0\x41\x03\"\xfc\x01\n\x0bUrlMetadata\x12\x15\n\rretrieved_url\x18\x01 \x01(\t\x12X\n\x14url_retrieval_status\x18\x02 \x01(\x0e\x32:.google.cloud.aiplatform.v1.UrlMetadata.UrlRetrievalStatus\"|\n\x12UrlRetrievalStatus\x12$\n URL_RETRIEVAL_STATUS_UNSPECIFIED\x10\x00\x12 \n\x1cURL_RETRIEVAL_STATUS_SUCCESS\x10\x01\x12\x1e\n\x1aURL_RETRIEVAL_STATUS_ERROR\x10\x02\"\x8f\x03\n\x0eLogprobsResult\x12P\n\x0etop_candidates\x18\x01 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.LogprobsResult.TopCandidates\x12O\n\x11\x63hosen_candidates\x18\x02 \x03(\x0b\x32\x34.google.cloud.aiplatform.v1.LogprobsResult.Candidate\x1a\x7f\n\tCandidate\x12\x12\n\x05token\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08token_id\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0flog_probability\x18\x02 \x01(\x02H\x02\x88\x01\x01\x42\x08\n\x06_tokenB\x0b\n\t_token_idB\x12\n\x10_log_probability\x1aY\n\rTopCandidates\x12H\n\ncandidates\x18\x01 \x03(\x0b\x32\x34.google.cloud.aiplatform.v1.LogprobsResult.Candidate\"g\n\x07Segment\x12\x17\n\npart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xad\x03\n\x0eGroundingChunk\x12=\n\x03web\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.GroundingChunk.WebH\x00\x12X\n\x11retrieved_context\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GroundingChunk.RetrievedContextH\x00\x1a=\n\x03Web\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_title\x1a\xb4\x01\n\x10RetrievedContext\x12\x39\n\trag_chunk\x18\x04 \x01(\x0b\x32$.google.cloud.aiplatform.v1.RagChunkH\x00\x12\x10\n\x03uri\x18\x01 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04text\x18\x03 \x01(\tH\x03\x88\x01\x01\x42\x11\n\x0f\x63ontext_detailsB\x06\n\x04_uriB\x08\n\x06_titleB\x07\n\x05_textB\x0c\n\nchunk_type\"\x95\x01\n\x10GroundingSupport\x12\x39\n\x07segment\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.SegmentH\x00\x88\x01\x01\x12\x1f\n\x17grounding_chunk_indices\x18\x02 \x03(\x05\x12\x19\n\x11\x63onfidence_scores\x18\x03 \x03(\x02\x42\n\n\x08_segment\"\xa3\x03\n\x11GroundingMetadata\x12\x1f\n\x12web_search_queries\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12R\n\x12search_entry_point\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.SearchEntryPointB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x10grounding_chunks\x18\x05 \x03(\x0b\x32*.google.cloud.aiplatform.v1.GroundingChunk\x12M\n\x12grounding_supports\x18\x06 \x03(\x0b\x32,.google.cloud.aiplatform.v1.GroundingSupportB\x03\xe0\x41\x01\x12V\n\x12retrieval_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.RetrievalMetadataB\x06\xe0\x41\x01\xe0\x41\x03H\x01\x88\x01\x01\x42\x15\n\x13_search_entry_pointB\x15\n\x13_retrieval_metadata\"H\n\x10SearchEntryPoint\x12\x1d\n\x10rendered_content\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08sdk_blob\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\"G\n\x11RetrievalMetadata\x12\x32\n%google_search_dynamic_retrieval_score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\"a\n\x12ModalityTokenCount\x12\x36\n\x08modality\x18\x01 \x01(\x0e\x32$.google.cloud.aiplatform.v1.Modality\x12\x13\n\x0btoken_count\x18\x02 \x01(\x05*\xdb\x01\n\x0cHarmCategory\x12\x1d\n\x19HARM_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19HARM_CATEGORY_HATE_SPEECH\x10\x01\x12#\n\x1fHARM_CATEGORY_DANGEROUS_CONTENT\x10\x02\x12\x1c\n\x18HARM_CATEGORY_HARASSMENT\x10\x03\x12#\n\x1fHARM_CATEGORY_SEXUALLY_EXPLICIT\x10\x04\x12%\n\x1dHARM_CATEGORY_CIVIC_INTEGRITY\x10\x05\x1a\x02\x08\x01*]\n\x08Modality\x12\x18\n\x14MODALITY_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05IMAGE\x10\x02\x12\t\n\x05VIDEO\x10\x03\x12\t\n\x05\x41UDIO\x10\x04\x12\x0c\n\x08\x44OCUMENT\x10\x05\x42\xca\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0c\x43ontentProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n(google/cloud/aiplatform/v1/content.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a\x30google/cloud/aiplatform/v1/vertex_rag_data.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16google/type/date.proto\"R\n\x07\x43ontent\x12\x11\n\x04role\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x05parts\x18\x02 \x03(\x0b\x32 .google.cloud.aiplatform.v1.PartB\x03\xe0\x41\x02\"\xe8\x04\n\x04Part\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12<\n\x0binline_data\x18\x02 \x01(\x0b\x32 .google.cloud.aiplatform.v1.BlobB\x03\xe0\x41\x01H\x00\x12>\n\tfile_data\x18\x03 \x01(\x0b\x32$.google.cloud.aiplatform.v1.FileDataB\x03\xe0\x41\x01H\x00\x12\x46\n\rfunction_call\x18\x05 \x01(\x0b\x32(.google.cloud.aiplatform.v1.FunctionCallB\x03\xe0\x41\x01H\x00\x12N\n\x11\x66unction_response\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.FunctionResponseB\x03\xe0\x41\x01H\x00\x12J\n\x0f\x65xecutable_code\x18\x08 \x01(\x0b\x32*.google.cloud.aiplatform.v1.ExecutableCodeB\x03\xe0\x41\x01H\x00\x12U\n\x15\x63ode_execution_result\x18\t \x01(\x0b\x32/.google.cloud.aiplatform.v1.CodeExecutionResultB\x03\xe0\x41\x01H\x00\x12\x14\n\x07thought\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11thought_signature\x18\x0b \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x0evideo_metadata\x18\x04 \x01(\x0b\x32).google.cloud.aiplatform.v1.VideoMetadataB\x03\xe0\x41\x01H\x01\x42\x06\n\x04\x64\x61taB\n\n\x08metadata\"1\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"9\n\x08\x46ileData\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x66ile_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"y\n\rVideoMetadata\x12\x34\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x32\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xf8\x0c\n\x10GenerationConfig\x12\x1d\n\x0btemperature\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05top_p\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x17\n\x05top_k\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12!\n\x0f\x63\x61ndidate_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12#\n\x11max_output_tokens\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\x0estop_sequences\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12#\n\x11response_logprobs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x1a\n\x08logprobs\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\"\n\x10presence_penalty\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12#\n\x11\x66requency_penalty\x18\t \x01(\x02\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x16\n\x04seed\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\t\x88\x01\x01\x12\x1f\n\x12response_mime_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fresponse_schema\x18\x10 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x14response_json_schema\x18\x1c \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\\\n\x0erouting_config\x18\x11 \x01(\x0b\x32:.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfigB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12Y\n\x0fthinking_config\x18\x19 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfigB\x03\xe0\x41\x01\x1a\xc2\x04\n\rRoutingConfig\x12_\n\tauto_mode\x18\x01 \x01(\x0b\x32J.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingModeH\x00\x12\x63\n\x0bmanual_mode\x18\x02 \x01(\x0b\x32L.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingModeH\x00\x1a\x9b\x02\n\x0f\x41utoRoutingMode\x12\x88\x01\n\x18model_routing_preference\x18\x01 \x01(\x0e\x32\x61.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreferenceH\x00\x88\x01\x01\"`\n\x16ModelRoutingPreference\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x16\n\x12PRIORITIZE_QUALITY\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\x12\x13\n\x0fPRIORITIZE_COST\x10\x03\x42\x1b\n\x19_model_routing_preference\x1a;\n\x11ManualRoutingMode\x12\x17\n\nmodel_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0erouting_config\x1a\x80\x01\n\x0eThinkingConfig\x12\"\n\x10include_thoughts\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0fthinking_budget\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_include_thoughtsB\x12\n\x10_thinking_budgetB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x12\n\x10_candidate_countB\x14\n\x12_max_output_tokensB\x14\n\x12_response_logprobsB\x0b\n\t_logprobsB\x13\n\x11_presence_penaltyB\x14\n\x12_frequency_penaltyB\x07\n\x05_seedB\x12\n\x10_response_schemaB\x17\n\x15_response_json_schemaB\x11\n\x0f_routing_config\"\xeb\x03\n\rSafetySetting\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x02\x12T\n\tthreshold\x18\x02 \x01(\x0e\x32<.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThresholdB\x03\xe0\x41\x02\x12N\n\x06method\x18\x04 \x01(\x0e\x32\x39.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethodB\x03\xe0\x41\x01\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\"S\n\x0fHarmBlockMethod\x12!\n\x1dHARM_BLOCK_METHOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08SEVERITY\x10\x01\x12\x0f\n\x0bPROBABILITY\x10\x02\"\xbf\x04\n\x0cSafetyRating\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x03\x12R\n\x0bprobability\x18\x02 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.SafetyRating.HarmProbabilityB\x03\xe0\x41\x03\x12\x1e\n\x11probability_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\x12L\n\x08severity\x18\x06 \x01(\x0e\x32\x35.google.cloud.aiplatform.v1.SafetyRating.HarmSeverityB\x03\xe0\x41\x03\x12\x1b\n\x0eseverity_score\x18\x07 \x01(\x02\x42\x03\xe0\x41\x03\x12\x14\n\x07\x62locked\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"b\n\x0fHarmProbability\x12 \n\x1cHARM_PROBABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nNEGLIGIBLE\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\x94\x01\n\x0cHarmSeverity\x12\x1d\n\x19HARM_SEVERITY_UNSPECIFIED\x10\x00\x12\x1c\n\x18HARM_SEVERITY_NEGLIGIBLE\x10\x01\x12\x15\n\x11HARM_SEVERITY_LOW\x10\x02\x12\x18\n\x14HARM_SEVERITY_MEDIUM\x10\x03\x12\x16\n\x12HARM_SEVERITY_HIGH\x10\x04\"P\n\x10\x43itationMetadata\x12<\n\tcitations\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.CitationB\x03\xe0\x41\x03\"\xaa\x01\n\x08\x43itation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07license\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x30\n\x10publication_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\"\xe0\x06\n\tCandidate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x39\n\x07\x63ontent\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x03\x12\x12\n\x05score\x18\x08 \x01(\x01\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61vg_logprobs\x18\t \x01(\x01\x42\x03\xe0\x41\x03\x12H\n\x0flogprobs_result\x18\n \x01(\x0b\x32*.google.cloud.aiplatform.v1.LogprobsResultB\x03\xe0\x41\x03\x12N\n\rfinish_reason\x18\x03 \x01(\x0e\x32\x32.google.cloud.aiplatform.v1.Candidate.FinishReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x04 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12 \n\x0e\x66inish_message\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12L\n\x11\x63itation_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.CitationMetadataB\x03\xe0\x41\x03\x12N\n\x12grounding_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GroundingMetadataB\x03\xe0\x41\x03\x12Q\n\x14url_context_metadata\x18\x0b \x01(\x0b\x32..google.cloud.aiplatform.v1.UrlContextMetadataB\x03\xe0\x41\x03\"\xcd\x01\n\x0c\x46inishReason\x12\x1d\n\x19\x46INISH_REASON_UNSPECIFIED\x10\x00\x12\x08\n\x04STOP\x10\x01\x12\x0e\n\nMAX_TOKENS\x10\x02\x12\n\n\x06SAFETY\x10\x03\x12\x0e\n\nRECITATION\x10\x04\x12\t\n\x05OTHER\x10\x05\x12\r\n\tBLOCKLIST\x10\x06\x12\x16\n\x12PROHIBITED_CONTENT\x10\x07\x12\x08\n\x04SPII\x10\x08\x12\x1b\n\x17MALFORMED_FUNCTION_CALL\x10\t\x12\x0f\n\x0bMODEL_ARMOR\x10\nB\x11\n\x0f_finish_message\"X\n\x12UrlContextMetadata\x12\x42\n\x0curl_metadata\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.UrlMetadataB\x03\xe0\x41\x03\"\xfc\x01\n\x0bUrlMetadata\x12\x15\n\rretrieved_url\x18\x01 \x01(\t\x12X\n\x14url_retrieval_status\x18\x02 \x01(\x0e\x32:.google.cloud.aiplatform.v1.UrlMetadata.UrlRetrievalStatus\"|\n\x12UrlRetrievalStatus\x12$\n URL_RETRIEVAL_STATUS_UNSPECIFIED\x10\x00\x12 \n\x1cURL_RETRIEVAL_STATUS_SUCCESS\x10\x01\x12\x1e\n\x1aURL_RETRIEVAL_STATUS_ERROR\x10\x02\"\x8f\x03\n\x0eLogprobsResult\x12P\n\x0etop_candidates\x18\x01 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.LogprobsResult.TopCandidates\x12O\n\x11\x63hosen_candidates\x18\x02 \x03(\x0b\x32\x34.google.cloud.aiplatform.v1.LogprobsResult.Candidate\x1a\x7f\n\tCandidate\x12\x12\n\x05token\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08token_id\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0flog_probability\x18\x02 \x01(\x02H\x02\x88\x01\x01\x42\x08\n\x06_tokenB\x0b\n\t_token_idB\x12\n\x10_log_probability\x1aY\n\rTopCandidates\x12H\n\ncandidates\x18\x01 \x03(\x0b\x32\x34.google.cloud.aiplatform.v1.LogprobsResult.Candidate\"g\n\x07Segment\x12\x17\n\npart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xa1\x05\n\x0eGroundingChunk\x12=\n\x03web\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.GroundingChunk.WebH\x00\x12X\n\x11retrieved_context\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GroundingChunk.RetrievedContextH\x00\x12?\n\x04maps\x18\x03 \x01(\x0b\x32/.google.cloud.aiplatform.v1.GroundingChunk.MapsH\x00\x1a=\n\x03Web\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_title\x1a\xe7\x01\n\x10RetrievedContext\x12\x39\n\trag_chunk\x18\x04 \x01(\x0b\x32$.google.cloud.aiplatform.v1.RagChunkH\x00\x12\x10\n\x03uri\x18\x01 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04text\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x1f\n\rdocument_name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x42\x11\n\x0f\x63ontext_detailsB\x06\n\x04_uriB\x08\n\x06_titleB\x07\n\x05_textB\x10\n\x0e_document_name\x1a~\n\x04Maps\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04text\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x08place_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_titleB\x07\n\x05_textB\x0b\n\t_place_idB\x0c\n\nchunk_type\"\x95\x01\n\x10GroundingSupport\x12\x39\n\x07segment\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.SegmentH\x00\x88\x01\x01\x12\x1f\n\x17grounding_chunk_indices\x18\x02 \x03(\x05\x12\x19\n\x11\x63onfidence_scores\x18\x03 \x03(\x02\x42\n\n\x08_segment\"\xff\x03\n\x11GroundingMetadata\x12\x1f\n\x12web_search_queries\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12R\n\x12search_entry_point\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.SearchEntryPointB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x10grounding_chunks\x18\x05 \x03(\x0b\x32*.google.cloud.aiplatform.v1.GroundingChunk\x12M\n\x12grounding_supports\x18\x06 \x03(\x0b\x32,.google.cloud.aiplatform.v1.GroundingSupportB\x03\xe0\x41\x01\x12V\n\x12retrieval_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.RetrievalMetadataB\x06\xe0\x41\x01\xe0\x41\x03H\x01\x88\x01\x01\x12\x35\n google_maps_widget_context_token\x18\x08 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\x02\x88\x01\x01\x42\x15\n\x13_search_entry_pointB\x15\n\x13_retrieval_metadataB#\n!_google_maps_widget_context_token\"H\n\x10SearchEntryPoint\x12\x1d\n\x10rendered_content\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08sdk_blob\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\"G\n\x11RetrievalMetadata\x12\x32\n%google_search_dynamic_retrieval_score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\"\xa8\x01\n\x10ModelArmorConfig\x12H\n\x14prompt_template_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"modelarmor.googleapis.com/Template\x12J\n\x16response_template_name\x18\x02 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"modelarmor.googleapis.com/Template\"a\n\x12ModalityTokenCount\x12\x36\n\x08modality\x18\x01 \x01(\x0e\x32$.google.cloud.aiplatform.v1.Modality\x12\x13\n\x0btoken_count\x18\x02 \x01(\x05*\xdb\x01\n\x0cHarmCategory\x12\x1d\n\x19HARM_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19HARM_CATEGORY_HATE_SPEECH\x10\x01\x12#\n\x1fHARM_CATEGORY_DANGEROUS_CONTENT\x10\x02\x12\x1c\n\x18HARM_CATEGORY_HARASSMENT\x10\x03\x12#\n\x1fHARM_CATEGORY_SEXUALLY_EXPLICIT\x10\x04\x12%\n\x1dHARM_CATEGORY_CIVIC_INTEGRITY\x10\x05\x1a\x02\x08\x01*]\n\x08Modality\x12\x18\n\x14MODALITY_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05IMAGE\x10\x02\x12\t\n\x05VIDEO\x10\x03\x12\t\n\x05\x41UDIO\x10\x04\x12\x0c\n\x08\x44OCUMENT\x10\x05\x42\xaf\x02\n\x1e\x63om.google.cloud.aiplatform.v1B\x0c\x43ontentProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1\xea\x41\x62\n\"modelarmor.googleapis.com/Template\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/endpoints\x12\xca\x01\n\x0eUpdateEndpoint\x12\x31.google.cloud.aiplatform.v1.UpdateEndpointRequest\x1a$.google.cloud.aiplatform.v1.Endpoint\"_\xda\x41\x14\x65ndpoint,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:\x08\x65ndpoint\x12\xfc\x01\n\x19UpdateEndpointLongRunning\x12<.google.cloud.aiplatform.v1.UpdateEndpointLongRunningRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41+\n\x08\x45ndpoint\x12\x1fUpdateEndpointOperationMetadata\xda\x41\x08\x65ndpoint\x82\xd3\xe4\x93\x02\x42\"=/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:update:\x01*\x12\xd3\x01\n\x0e\x44\x65leteEndpoint\x12\x31.google.cloud.aiplatform.v1.DeleteEndpointRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/endpoints/*}\x12\x85\x02\n\x0b\x44\x65ployModel\x12..google.cloud.aiplatform.v1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41\x33\n\x13\x44\x65ployModelResponse\x12\x1c\x44\x65ployModelOperationMetadata\xda\x41%endpoint,deployed_model,traffic_split\x82\xd3\xe4\x93\x02\x42\"=/v1/{endpoint=projects/*/locations/*/endpoints/*}:deployModel:\x01*\x12\x92\x02\n\rUndeployModel\x12\x30.google.cloud.aiplatform.v1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"\xaf\x01\xca\x41\x37\n\x15UndeployModelResponse\x12\x1eUndeployModelOperationMetadata\xda\x41(endpoint,deployed_model_id,traffic_split\x82\xd3\xe4\x93\x02\x44\"?/v1/{endpoint=projects/*/locations/*/endpoints/*}:undeployModel:\x01*\x12\xab\x02\n\x13MutateDeployedModel\x12\x36.google.cloud.aiplatform.v1.MutateDeployedModelRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41\x43\n\x1bMutateDeployedModelResponse\x12$MutateDeployedModelOperationMetadata\xda\x41#endpoint,deployed_model,update_mask\x82\xd3\xe4\x93\x02J\"E/v1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel:\x01*\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14\x45ndpointServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n1google/cloud/aiplatform/v1/endpoint_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/aiplatform/v1/deployment_stage.proto\x1a)google/cloud/aiplatform/v1/endpoint.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa9\x01\n\x15\x43reateEndpointRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12;\n\x08\x65ndpoint\x18\x02 \x01(\x0b\x32$.google.cloud.aiplatform.v1.EndpointB\x03\xe0\x41\x02\x12\x18\n\x0b\x65ndpoint_id\x18\x04 \x01(\tB\x03\xe0\x41\x05\"\xbd\x01\n\x1f\x43reateEndpointOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12J\n\x10\x64\x65ployment_stage\x18\x02 \x01(\x0e\x32+.google.cloud.aiplatform.v1.DeploymentStageB\x03\xe0\x41\x03\"N\n\x12GetEndpointRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\"\xdd\x01\n\x14ListEndpointsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\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\x32\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x10\n\x08order_by\x18\x06 \x01(\t\"i\n\x15ListEndpointsResponse\x12\x37\n\tendpoints\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.Endpoint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x15UpdateEndpointRequest\x12;\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32$.google.cloud.aiplatform.v1.EndpointB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n UpdateEndpointLongRunningRequest\x12;\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32$.google.cloud.aiplatform.v1.EndpointB\x03\xe0\x41\x02\"q\n\x1fUpdateEndpointOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"Q\n\x15\x44\x65leteEndpointRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\"\xa8\x02\n\x12\x44\x65ployModelRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x46\n\x0e\x64\x65ployed_model\x18\x02 \x01(\x0b\x32).google.cloud.aiplatform.v1.DeployedModelB\x03\xe0\x41\x02\x12W\n\rtraffic_split\x18\x03 \x03(\x0b\x32@.google.cloud.aiplatform.v1.DeployModelRequest.TrafficSplitEntry\x1a\x33\n\x11TrafficSplitEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"X\n\x13\x44\x65ployModelResponse\x12\x41\n\x0e\x64\x65ployed_model\x18\x01 \x01(\x0b\x32).google.cloud.aiplatform.v1.DeployedModel\"\xba\x01\n\x1c\x44\x65ployModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12J\n\x10\x64\x65ployment_stage\x18\x02 \x01(\x0e\x32+.google.cloud.aiplatform.v1.DeploymentStageB\x03\xe0\x41\x03\"\x84\x02\n\x14UndeployModelRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x1e\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\rtraffic_split\x18\x03 \x03(\x0b\x32\x42.google.cloud.aiplatform.v1.UndeployModelRequest.TrafficSplitEntry\x1a\x33\n\x11TrafficSplitEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"\x17\n\x15UndeployModelResponse\"p\n\x1eUndeployModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"\xd8\x01\n\x1aMutateDeployedModelRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x46\n\x0e\x64\x65ployed_model\x18\x02 \x01(\x0b\x32).google.cloud.aiplatform.v1.DeployedModelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"`\n\x1bMutateDeployedModelResponse\x12\x41\n\x0e\x64\x65ployed_model\x18\x01 \x01(\x0b\x32).google.cloud.aiplatform.v1.DeployedModel\"v\n$MutateDeployedModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata2\xad\x11\n\x0f\x45ndpointService\x12\x82\x02\n\x0e\x43reateEndpoint\x12\x31.google.cloud.aiplatform.v1.CreateEndpointRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41+\n\x08\x45ndpoint\x12\x1f\x43reateEndpointOperationMetadata\xda\x41\x0fparent,endpoint\xda\x41\x1bparent,endpoint,endpoint_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/endpoints:\x08\x65ndpoint\x12\xa1\x01\n\x0bGetEndpoint\x12..google.cloud.aiplatform.v1.GetEndpointRequest\x1a$.google.cloud.aiplatform.v1.Endpoint\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/endpoints/*}\x12\xb4\x01\n\rListEndpoints\x12\x30.google.cloud.aiplatform.v1.ListEndpointsRequest\x1a\x31.google.cloud.aiplatform.v1.ListEndpointsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/endpoints\x12\xca\x01\n\x0eUpdateEndpoint\x12\x31.google.cloud.aiplatform.v1.UpdateEndpointRequest\x1a$.google.cloud.aiplatform.v1.Endpoint\"_\xda\x41\x14\x65ndpoint,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:\x08\x65ndpoint\x12\xfc\x01\n\x19UpdateEndpointLongRunning\x12<.google.cloud.aiplatform.v1.UpdateEndpointLongRunningRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41+\n\x08\x45ndpoint\x12\x1fUpdateEndpointOperationMetadata\xda\x41\x08\x65ndpoint\x82\xd3\xe4\x93\x02\x42\"=/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:update:\x01*\x12\xd3\x01\n\x0e\x44\x65leteEndpoint\x12\x31.google.cloud.aiplatform.v1.DeleteEndpointRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/endpoints/*}\x12\x85\x02\n\x0b\x44\x65ployModel\x12..google.cloud.aiplatform.v1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41\x33\n\x13\x44\x65ployModelResponse\x12\x1c\x44\x65ployModelOperationMetadata\xda\x41%endpoint,deployed_model,traffic_split\x82\xd3\xe4\x93\x02\x42\"=/v1/{endpoint=projects/*/locations/*/endpoints/*}:deployModel:\x01*\x12\x92\x02\n\rUndeployModel\x12\x30.google.cloud.aiplatform.v1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"\xaf\x01\xca\x41\x37\n\x15UndeployModelResponse\x12\x1eUndeployModelOperationMetadata\xda\x41(endpoint,deployed_model_id,traffic_split\x82\xd3\xe4\x93\x02\x44\"?/v1/{endpoint=projects/*/locations/*/endpoints/*}:undeployModel:\x01*\x12\xab\x02\n\x13MutateDeployedModel\x12\x36.google.cloud.aiplatform.v1.MutateDeployedModelRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41\x43\n\x1bMutateDeployedModelResponse\x12$MutateDeployedModelOperationMetadata\xda\x41#endpoint,deployed_model,update_mask\x82\xd3\xe4\x93\x02J\"E/v1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel:\x01*\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14\x45ndpointServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/endpoint_service_services_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/endpoint_service_services_pb.rb index fa3b1b56f12c..9136dd8eb1e6 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/endpoint_service_services_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/endpoint_service_services_pb.rb @@ -51,9 +51,9 @@ class Service # freeing all resources it's using. rpc :UndeployModel, ::Google::Cloud::AIPlatform::V1::UndeployModelRequest, ::Google::Longrunning::Operation # Updates an existing deployed model. Updatable fields include - # `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, - # `disable_container_logging` (v1 only), and `enable_container_logging` - # (v1beta1 only). + # `min_replica_count`, `max_replica_count`, `required_replica_count`, + # `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and + # `enable_container_logging` (v1beta1 only). rpc :MutateDeployedModel, ::Google::Cloud::AIPlatform::V1::MutateDeployedModelRequest, ::Google::Longrunning::Operation end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb index bada08f6835b..5bdd1b8f26ed 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb @@ -10,9 +10,11 @@ require 'google/api/resource_pb' require 'google/cloud/aiplatform/v1/featurestore_online_service_pb' require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' -descriptor_data = "\n=google/cloud/aiplatform/v1/feature_online_store_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilterB\x03\xe0\x41\x01\x12\x32\n%per_crowding_attribute_neighbor_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12T\n\nparameters\x18\x07 \x01(\x0b\x32;.google.cloud.aiplatform.v1.NearestNeighborQuery.ParametersB\x03\xe0\x41\x01\x1a\x1f\n\tEmbedding\x12\x12\n\x05value\x18\x01 \x03(\x02\x42\x03\xe0\x41\x01\x1aV\n\x0cStringFilter\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61llow_tokens\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65ny_tokens\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1a\xcf\x02\n\rNumericFilter\x12\x13\n\tvalue_int\x18\x02 \x01(\x03H\x00\x12\x15\n\x0bvalue_float\x18\x03 \x01(\x02H\x00\x12\x16\n\x0cvalue_double\x18\x04 \x01(\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12]\n\x02op\x18\x05 \x01(\x0e\x32G.google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\"x\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04LESS\x10\x01\x12\x0e\n\nLESS_EQUAL\x10\x02\x12\t\n\x05\x45QUAL\x10\x03\x12\x11\n\rGREATER_EQUAL\x10\x04\x12\x0b\n\x07GREATER\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x42\x07\n\x05ValueB\x05\n\x03_op\x1a\x63\n\nParameters\x12,\n\x1f\x61pproximate_neighbor_candidates\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\'\n\x1aleaf_nodes_search_fraction\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\x42\n\n\x08instance\"\xca\x01\n\x1cSearchNearestEntitiesRequest\x12\x43\n\x0c\x66\x65\x61ture_view\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%aiplatform.googleapis.com/FeatureView\x12\x44\n\x05query\x18\x02 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.NearestNeighborQueryB\x03\xe0\x41\x02\x12\x1f\n\x12return_full_entity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xe1\x01\n\x10NearestNeighbors\x12H\n\tneighbors\x18\x01 \x03(\x0b\x32\x35.google.cloud.aiplatform.v1.NearestNeighbors.Neighbor\x1a\x82\x01\n\x08Neighbor\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x10\n\x08\x64istance\x18\x02 \x01(\x01\x12Q\n\x11\x65ntity_key_values\x18\x03 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.FetchFeatureValuesResponse\"h\n\x1dSearchNearestEntitiesResponse\x12G\n\x11nearest_neighbors\x18\x01 \x01(\x0b\x32,.google.cloud.aiplatform.v1.NearestNeighbors*b\n\x15\x46\x65\x61tureViewDataFormat\x12(\n$FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED\x10\x00\x12\r\n\tKEY_VALUE\x10\x01\x12\x10\n\x0cPROTO_STRUCT\x10\x02\x32\xf8\x04\n\x19\x46\x65\x61tureOnlineStoreService\x12\x8b\x02\n\x12\x46\x65tchFeatureValues\x12\x35.google.cloud.aiplatform.v1.FetchFeatureValuesRequest\x1a\x36.google.cloud.aiplatform.v1.FetchFeatureValuesResponse\"\x85\x01\xda\x41\x16\x66\x65\x61ture_view, data_key\x82\xd3\xe4\x93\x02\x66\"a/v1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:fetchFeatureValues:\x01*\x12\xfd\x01\n\x15SearchNearestEntities\x12\x38.google.cloud.aiplatform.v1.SearchNearestEntitiesRequest\x1a\x39.google.cloud.aiplatform.v1.SearchNearestEntitiesResponse\"o\x82\xd3\xe4\x93\x02i\"d/v1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:searchNearestEntities:\x01*\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdc\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x1e\x46\x65\x61tureOnlineStoreServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n=google/cloud/aiplatform/v1/feature_online_store_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilterB\x03\xe0\x41\x01\x12\x32\n%per_crowding_attribute_neighbor_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12T\n\nparameters\x18\x07 \x01(\x0b\x32;.google.cloud.aiplatform.v1.NearestNeighborQuery.ParametersB\x03\xe0\x41\x01\x1a\x1f\n\tEmbedding\x12\x12\n\x05value\x18\x01 \x03(\x02\x42\x03\xe0\x41\x01\x1aV\n\x0cStringFilter\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x61llow_tokens\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65ny_tokens\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1a\xcf\x02\n\rNumericFilter\x12\x13\n\tvalue_int\x18\x02 \x01(\x03H\x00\x12\x15\n\x0bvalue_float\x18\x03 \x01(\x02H\x00\x12\x16\n\x0cvalue_double\x18\x04 \x01(\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12]\n\x02op\x18\x05 \x01(\x0e\x32G.google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\"x\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04LESS\x10\x01\x12\x0e\n\nLESS_EQUAL\x10\x02\x12\t\n\x05\x45QUAL\x10\x03\x12\x11\n\rGREATER_EQUAL\x10\x04\x12\x0b\n\x07GREATER\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x42\x07\n\x05ValueB\x05\n\x03_op\x1a\x63\n\nParameters\x12,\n\x1f\x61pproximate_neighbor_candidates\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\'\n\x1aleaf_nodes_search_fraction\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\x42\n\n\x08instance\"\xca\x01\n\x1cSearchNearestEntitiesRequest\x12\x43\n\x0c\x66\x65\x61ture_view\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%aiplatform.googleapis.com/FeatureView\x12\x44\n\x05query\x18\x02 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.NearestNeighborQueryB\x03\xe0\x41\x02\x12\x1f\n\x12return_full_entity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xe1\x01\n\x10NearestNeighbors\x12H\n\tneighbors\x18\x01 \x03(\x0b\x32\x35.google.cloud.aiplatform.v1.NearestNeighbors.Neighbor\x1a\x82\x01\n\x08Neighbor\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x10\n\x08\x64istance\x18\x02 \x01(\x01\x12Q\n\x11\x65ntity_key_values\x18\x03 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.FetchFeatureValuesResponse\"h\n\x1dSearchNearestEntitiesResponse\x12G\n\x11nearest_neighbors\x18\x01 \x01(\x0b\x32,.google.cloud.aiplatform.v1.NearestNeighbors\"\x8b\x04\n\x1d\x46\x65\x61tureViewDirectWriteRequest\x12@\n\x0c\x66\x65\x61ture_view\x18\x01 \x01(\tB*\xfa\x41\'\n%aiplatform.googleapis.com/FeatureView\x12{\n\x1b\x64\x61ta_key_and_feature_values\x18\x02 \x03(\x0b\x32Q.google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest.DataKeyAndFeatureValuesB\x03\xe0\x41\x02\x1a\xaa\x02\n\x17\x44\x61taKeyAndFeatureValues\x12@\n\x08\x64\x61ta_key\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.FeatureViewDataKey\x12k\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32Y.google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest.DataKeyAndFeatureValues.Feature\x1a`\n\x07\x46\x65\x61ture\x12\x39\n\x05value\x18\x03 \x01(\x0b\x32(.google.cloud.aiplatform.v1.FeatureValueH\x00\x12\x0c\n\x04name\x18\x01 \x01(\tB\x0c\n\ndata_oneof\"\xb8\x02\n\x1e\x46\x65\x61tureViewDirectWriteResponse\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x61\n\x0fwrite_responses\x18\x02 \x03(\x0b\x32H.google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse\x1a\x8e\x01\n\rWriteResponse\x12@\n\x08\x64\x61ta_key\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.FeatureViewDataKey\x12;\n\x17online_store_write_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp*b\n\x15\x46\x65\x61tureViewDataFormat\x12(\n$FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED\x10\x00\x12\r\n\tKEY_VALUE\x10\x01\x12\x10\n\x0cPROTO_STRUCT\x10\x02\x32\xf5\x06\n\x19\x46\x65\x61tureOnlineStoreService\x12\x8b\x02\n\x12\x46\x65tchFeatureValues\x12\x35.google.cloud.aiplatform.v1.FetchFeatureValuesRequest\x1a\x36.google.cloud.aiplatform.v1.FetchFeatureValuesResponse\"\x85\x01\xda\x41\x16\x66\x65\x61ture_view, data_key\x82\xd3\xe4\x93\x02\x66\"a/v1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:fetchFeatureValues:\x01*\x12\xfd\x01\n\x15SearchNearestEntities\x12\x38.google.cloud.aiplatform.v1.SearchNearestEntitiesRequest\x1a\x39.google.cloud.aiplatform.v1.SearchNearestEntitiesResponse\"o\x82\xd3\xe4\x93\x02i\"d/v1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:searchNearestEntities:\x01*\x12\xfa\x01\n\x16\x46\x65\x61tureViewDirectWrite\x12\x39.google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest\x1a:.google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse\"e\x82\xd3\xe4\x93\x02_\"Z/v1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:directWrite:\x01*(\x01\x30\x01\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdc\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x1e\x46\x65\x61tureOnlineStoreServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -29,6 +31,8 @@ imports = [ ["google.protobuf.Struct", "google/protobuf/struct.proto"], ["google.cloud.aiplatform.v1.FeatureValue", "google/cloud/aiplatform/v1/featurestore_online_service.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor @@ -60,6 +64,11 @@ module V1 NearestNeighbors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.NearestNeighbors").msgclass NearestNeighbors::Neighbor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.NearestNeighbors.Neighbor").msgclass SearchNearestEntitiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.SearchNearestEntitiesResponse").msgclass + FeatureViewDirectWriteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest").msgclass + FeatureViewDirectWriteRequest::DataKeyAndFeatureValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest.DataKeyAndFeatureValues").msgclass + FeatureViewDirectWriteRequest::DataKeyAndFeatureValues::Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest.DataKeyAndFeatureValues.Feature").msgclass + FeatureViewDirectWriteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse").msgclass + FeatureViewDirectWriteResponse::WriteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse").msgclass FeatureViewDataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FeatureViewDataFormat").enummodule end end diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/feature_online_store_service_services_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/feature_online_store_service_services_pb.rb index 59b62cbeb6f9..16e0f0a47c9f 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/feature_online_store_service_services_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/feature_online_store_service_services_pb.rb @@ -39,6 +39,10 @@ class Service # Search only works for indexable feature view; if a feature view isn't # indexable, returns Invalid argument response. rpc :SearchNearestEntities, ::Google::Cloud::AIPlatform::V1::SearchNearestEntitiesRequest, ::Google::Cloud::AIPlatform::V1::SearchNearestEntitiesResponse + # Bidirectional streaming RPC to directly write to feature values in a + # feature view. Requests may not have a one-to-one mapping to responses and + # responses may be returned out-of-order to reduce latency. + rpc :FeatureViewDirectWrite, stream(::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest), stream(::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse) end Stub = Service.rpc_stub_class diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb index 9babe9814159..b1d2a0817bb0 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb @@ -12,7 +12,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n/google/cloud/aiplatform/v1/index_endpoint.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x07\n\rIndexEndpoint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12H\n\x10\x64\x65ployed_indexes\x18\x04 \x03(\x0b\x32).google.cloud.aiplatform.v1.DeployedIndexB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x05 \x01(\t\x12\x45\n\x06labels\x18\x06 \x03(\x0b\x32\x35.google.cloud.aiplatform.v1.IndexEndpoint.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x07network\x18\t \x01(\tB\x03\xe0\x41\x01\x12-\n\x1e\x65nable_private_service_connect\x18\n \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x64\n\x1eprivate_service_connect_config\x18\x0c \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.PrivateServiceConnectConfigB\x03\xe0\x41\x01\x12$\n\x17public_endpoint_enabled\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1bpublic_endpoint_domain_name\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12H\n\x0f\x65ncryption_spec\x18\x0f \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x03\xe0\x41\x05\x12\x1a\n\rsatisfies_pzs\x18\x11 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:u\xea\x41r\n\'aiplatform.googleapis.com/IndexEndpoint\x12Gprojects/{project}/locations/{location}/indexEndpoints/{index_endpoint}\"\xed\x05\n\rDeployedIndex\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x05index\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Index\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x11private_endpoints\x18\x05 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.IndexPrivateEndpointsB\x03\xe0\x41\x03\x12\x38\n\x0findex_sync_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x13\x61utomatic_resources\x18\x07 \x01(\x0b\x32..google.cloud.aiplatform.v1.AutomaticResourcesB\x03\xe0\x41\x01\x12P\n\x13\x64\x65\x64icated_resources\x18\x10 \x01(\x0b\x32..google.cloud.aiplatform.v1.DedicatedResourcesB\x03\xe0\x41\x01\x12\"\n\x15\x65nable_access_logging\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\\\n\x1a\x64\x65ployed_index_auth_config\x18\t \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.DeployedIndexAuthConfigB\x03\xe0\x41\x01\x12\x1f\n\x12reserved_ip_ranges\x18\n \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65ployment_group\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12T\n\x16psc_automation_configs\x18\x13 \x03(\x0b\x32/.google.cloud.aiplatform.v1.PSCAutomationConfigB\x03\xe0\x41\x01\"\xae\x01\n\x17\x44\x65ployedIndexAuthConfig\x12W\n\rauth_provider\x18\x01 \x01(\x0b\x32@.google.cloud.aiplatform.v1.DeployedIndexAuthConfig.AuthProvider\x1a:\n\x0c\x41uthProvider\x12\x11\n\taudiences\x18\x01 \x03(\t\x12\x17\n\x0f\x61llowed_issuers\x18\x02 \x03(\t\"\xb2\x01\n\x15IndexPrivateEndpoints\x12\x1f\n\x12match_grpc_address\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12service_attachment\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x17psc_automated_endpoints\x18\x03 \x03(\x0b\x32\x31.google.cloud.aiplatform.v1.PscAutomatedEndpointsB\x03\xe0\x41\x03\x42\xd0\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x12IndexEndpointProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n/google/cloud/aiplatform/v1/index_endpoint.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x07\n\rIndexEndpoint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12H\n\x10\x64\x65ployed_indexes\x18\x04 \x03(\x0b\x32).google.cloud.aiplatform.v1.DeployedIndexB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x05 \x01(\t\x12\x45\n\x06labels\x18\x06 \x03(\x0b\x32\x35.google.cloud.aiplatform.v1.IndexEndpoint.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x07network\x18\t \x01(\tB\x03\xe0\x41\x01\x12-\n\x1e\x65nable_private_service_connect\x18\n \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x64\n\x1eprivate_service_connect_config\x18\x0c \x01(\x0b\x32\x37.google.cloud.aiplatform.v1.PrivateServiceConnectConfigB\x03\xe0\x41\x01\x12$\n\x17public_endpoint_enabled\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1bpublic_endpoint_domain_name\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12H\n\x0f\x65ncryption_spec\x18\x0f \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x03\xe0\x41\x05\x12\x1a\n\rsatisfies_pzs\x18\x11 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:u\xea\x41r\n\'aiplatform.googleapis.com/IndexEndpoint\x12Gprojects/{project}/locations/{location}/indexEndpoints/{index_endpoint}\"\x9b\x06\n\rDeployedIndex\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x05index\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Index\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x11private_endpoints\x18\x05 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.IndexPrivateEndpointsB\x03\xe0\x41\x03\x12\x38\n\x0findex_sync_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x13\x61utomatic_resources\x18\x07 \x01(\x0b\x32..google.cloud.aiplatform.v1.AutomaticResourcesB\x03\xe0\x41\x01\x12P\n\x13\x64\x65\x64icated_resources\x18\x10 \x01(\x0b\x32..google.cloud.aiplatform.v1.DedicatedResourcesB\x03\xe0\x41\x01\x12\"\n\x15\x65nable_access_logging\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x65nable_datapoint_upsert_logging\x18\x14 \x01(\x08\x42\x03\xe0\x41\x01\x12\\\n\x1a\x64\x65ployed_index_auth_config\x18\t \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.DeployedIndexAuthConfigB\x03\xe0\x41\x01\x12\x1f\n\x12reserved_ip_ranges\x18\n \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65ployment_group\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12T\n\x16psc_automation_configs\x18\x13 \x03(\x0b\x32/.google.cloud.aiplatform.v1.PSCAutomationConfigB\x03\xe0\x41\x01\"\xae\x01\n\x17\x44\x65ployedIndexAuthConfig\x12W\n\rauth_provider\x18\x01 \x01(\x0b\x32@.google.cloud.aiplatform.v1.DeployedIndexAuthConfig.AuthProvider\x1a:\n\x0c\x41uthProvider\x12\x11\n\taudiences\x18\x01 \x03(\t\x12\x17\n\x0f\x61llowed_issuers\x18\x02 \x03(\t\"\xb2\x01\n\x15IndexPrivateEndpoints\x12\x1f\n\x12match_grpc_address\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12service_attachment\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x17psc_automated_endpoints\x18\x03 \x03(\x0b\x32\x31.google.cloud.aiplatform.v1.PscAutomatedEndpointsB\x03\xe0\x41\x03\x42\xd0\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x12IndexEndpointProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/index_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/index_pb.rb index 8168d9dadb25..2faec49ad43b 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/index_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/index_pb.rb @@ -12,7 +12,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n&google/cloud/aiplatform/v1/index.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/aiplatform/v1/deployed_index_ref.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa4\x07\n\x05Index\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12 \n\x13metadata_schema_uri\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12(\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.Value\x12K\n\x10\x64\x65ployed_indexes\x18\x07 \x03(\x0b\x32,.google.cloud.aiplatform.v1.DeployedIndexRefB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12=\n\x06labels\x18\t \x03(\x0b\x32-.google.cloud.aiplatform.v1.Index.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x0bindex_stats\x18\x0e \x01(\x0b\x32&.google.cloud.aiplatform.v1.IndexStatsB\x03\xe0\x41\x03\x12U\n\x13index_update_method\x18\x10 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.Index.IndexUpdateMethodB\x03\xe0\x41\x05\x12H\n\x0f\x65ncryption_spec\x18\x11 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x03\xe0\x41\x05\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x11IndexUpdateMethod\x12#\n\x1fINDEX_UPDATE_METHOD_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x42\x41TCH_UPDATE\x10\x01\x12\x11\n\rSTREAM_UPDATE\x10\x02:]\xea\x41Z\n\x1f\x61iplatform.googleapis.com/Index\x12\x37projects/{project}/locations/{location}/indexes/{index}\"\x9f\x07\n\x0eIndexDatapoint\x12\x19\n\x0c\x64\x61tapoint_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0e\x66\x65\x61ture_vector\x18\x02 \x03(\x02\x42\x03\xe0\x41\x02\x12Y\n\x10sparse_embedding\x18\x07 \x01(\x0b\x32:.google.cloud.aiplatform.v1.IndexDatapoint.SparseEmbeddingB\x03\xe0\x41\x01\x12N\n\trestricts\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionB\x03\xe0\x41\x01\x12]\n\x11numeric_restricts\x18\x06 \x03(\x0b\x32=.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionB\x03\xe0\x41\x01\x12Q\n\x0c\x63rowding_tag\x18\x05 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagB\x03\xe0\x41\x01\x1a?\n\x0fSparseEmbedding\x12\x13\n\x06values\x18\x01 \x03(\x02\x42\x03\xe0\x41\x02\x12\x17\n\ndimensions\x18\x02 \x03(\x03\x42\x03\xe0\x41\x02\x1aG\n\x0bRestriction\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\nallow_list\x18\x02 \x03(\t\x12\x11\n\tdeny_list\x18\x03 \x03(\t\x1a\xc2\x02\n\x12NumericRestriction\x12\x13\n\tvalue_int\x18\x02 \x01(\x03H\x00\x12\x15\n\x0bvalue_float\x18\x03 \x01(\x02H\x00\x12\x16\n\x0cvalue_double\x18\x04 \x01(\x01H\x00\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12R\n\x02op\x18\x05 \x01(\x0e\x32\x46.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator\"x\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04LESS\x10\x01\x12\x0e\n\nLESS_EQUAL\x10\x02\x12\t\n\x05\x45QUAL\x10\x03\x12\x11\n\rGREATER_EQUAL\x10\x04\x12\x0b\n\x07GREATER\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x42\x07\n\x05Value\x1a)\n\x0b\x43rowdingTag\x12\x1a\n\x12\x63rowding_attribute\x18\x01 \x01(\t\"f\n\nIndexStats\x12\x1a\n\rvectors_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12!\n\x14sparse_vectors_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0cshards_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x42\xc8\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\nIndexProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n&google/cloud/aiplatform/v1/index.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/aiplatform/v1/deployed_index_ref.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa4\x07\n\x05Index\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12 \n\x13metadata_schema_uri\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12(\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.Value\x12K\n\x10\x64\x65ployed_indexes\x18\x07 \x03(\x0b\x32,.google.cloud.aiplatform.v1.DeployedIndexRefB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12=\n\x06labels\x18\t \x03(\x0b\x32-.google.cloud.aiplatform.v1.Index.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x0bindex_stats\x18\x0e \x01(\x0b\x32&.google.cloud.aiplatform.v1.IndexStatsB\x03\xe0\x41\x03\x12U\n\x13index_update_method\x18\x10 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.Index.IndexUpdateMethodB\x03\xe0\x41\x05\x12H\n\x0f\x65ncryption_spec\x18\x11 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x03\xe0\x41\x05\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x11IndexUpdateMethod\x12#\n\x1fINDEX_UPDATE_METHOD_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x42\x41TCH_UPDATE\x10\x01\x12\x11\n\rSTREAM_UPDATE\x10\x02:]\xea\x41Z\n\x1f\x61iplatform.googleapis.com/Index\x12\x37projects/{project}/locations/{location}/indexes/{index}\"\xd9\x07\n\x0eIndexDatapoint\x12\x19\n\x0c\x64\x61tapoint_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0e\x66\x65\x61ture_vector\x18\x02 \x03(\x02\x42\x03\xe0\x41\x02\x12Y\n\x10sparse_embedding\x18\x07 \x01(\x0b\x32:.google.cloud.aiplatform.v1.IndexDatapoint.SparseEmbeddingB\x03\xe0\x41\x01\x12N\n\trestricts\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionB\x03\xe0\x41\x01\x12]\n\x11numeric_restricts\x18\x06 \x03(\x0b\x32=.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestrictionB\x03\xe0\x41\x01\x12Q\n\x0c\x63rowding_tag\x18\x05 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagB\x03\xe0\x41\x01\x12\x38\n\x12\x65mbedding_metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a?\n\x0fSparseEmbedding\x12\x13\n\x06values\x18\x01 \x03(\x02\x42\x03\xe0\x41\x02\x12\x17\n\ndimensions\x18\x02 \x03(\x03\x42\x03\xe0\x41\x02\x1aG\n\x0bRestriction\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\nallow_list\x18\x02 \x03(\t\x12\x11\n\tdeny_list\x18\x03 \x03(\t\x1a\xc2\x02\n\x12NumericRestriction\x12\x13\n\tvalue_int\x18\x02 \x01(\x03H\x00\x12\x15\n\x0bvalue_float\x18\x03 \x01(\x02H\x00\x12\x16\n\x0cvalue_double\x18\x04 \x01(\x01H\x00\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12R\n\x02op\x18\x05 \x01(\x0e\x32\x46.google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator\"x\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04LESS\x10\x01\x12\x0e\n\nLESS_EQUAL\x10\x02\x12\t\n\x05\x45QUAL\x10\x03\x12\x11\n\rGREATER_EQUAL\x10\x04\x12\x0b\n\x07GREATER\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x42\x07\n\x05Value\x1a)\n\x0b\x43rowdingTag\x12\x1a\n\x12\x63rowding_attribute\x18\x01 \x01(\t\"f\n\nIndexStats\x12\x1a\n\rvectors_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12!\n\x14sparse_vectors_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0cshards_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x42\xc8\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\nIndexProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb index d96c99f57cd7..ece66f204693 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb @@ -15,7 +15,7 @@ require 'google/longrunning/operations_pb' -descriptor_data = "\n5google/cloud/aiplatform/v1/model_garden_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a&google/cloud/aiplatform/v1/model.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a\x30google/cloud/aiplatform/v1/publisher_model.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x18GetPublisherModelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x04view\x18\x03 \x01(\x0e\x32..google.cloud.aiplatform.v1.PublisherModelViewB\x03\xe0\x41\x01\x12\"\n\x15is_hugging_face_model\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12hugging_face_token\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xb2\x08\n\rDeployRequest\x12M\n\x14publisher_model_name\x18\x01 \x01(\tB-\xfa\x41*\n(aiplatform.googleapis.com/PublisherModelH\x00\x12\x1f\n\x15hugging_face_model_id\x18\x02 \x01(\tH\x00\x12>\n\x0b\x64\x65stination\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12P\n\x0cmodel_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.DeployRequest.ModelConfigB\x03\xe0\x41\x01\x12V\n\x0f\x65ndpoint_config\x18\x06 \x01(\x0b\x32\x38.google.cloud.aiplatform.v1.DeployRequest.EndpointConfigB\x03\xe0\x41\x01\x12R\n\rdeploy_config\x18\x07 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.DeployRequest.DeployConfigB\x03\xe0\x41\x01\x1a\xe6\x01\n\x0bModelConfig\x12\x18\n\x0b\x61\x63\x63\x65pt_eula\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19hugging_face_access_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\'\n\x1ahugging_face_cache_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0e\x63ontainer_spec\x18\x05 \x01(\x0b\x32..google.cloud.aiplatform.v1.ModelContainerSpecB\x03\xe0\x41\x01\x1a]\n\x0e\x45ndpointConfig\x12\"\n\x15\x65ndpoint_display_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\'\n\x1a\x64\x65\x64icated_endpoint_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x9d\x02\n\x0c\x44\x65ployConfig\x12P\n\x13\x64\x65\x64icated_resources\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.DedicatedResourcesB\x03\xe0\x41\x01\x12 \n\x13\x66\x61st_tryout_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x64\n\rsystem_labels\x18\x03 \x03(\x0b\x32H.google.cloud.aiplatform.v1.DeployRequest.DeployConfig.SystemLabelsEntryB\x03\xe0\x41\x01\x1a\x33\n\x11SystemLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tartifacts\"\xd1\x01\n\x0e\x44\x65ployResponse\x12I\n\x0fpublisher_model\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12<\n\x08\x65ndpoint\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"\xa8\x02\n\x17\x44\x65ployOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12I\n\x0fpublisher_model\x18\x02 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12>\n\x0b\x64\x65stination\x18\x03 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0eproject_number\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08model_id\x18\x05 \x01(\tB\x03\xe0\x41\x03*\xa1\x01\n\x12PublisherModelView\x12$\n PUBLISHER_MODEL_VIEW_UNSPECIFIED\x10\x00\x12\x1e\n\x1aPUBLISHER_MODEL_VIEW_BASIC\x10\x01\x12\x1d\n\x19PUBLISHER_MODEL_VIEW_FULL\x10\x02\x12&\n\"PUBLISHER_MODEL_VERSION_VIEW_BASIC\x10\x03\x32\xc9\x03\n\x12ModelGardenService\x12\xa6\x01\n\x11GetPublisherModel\x12\x34.google.cloud.aiplatform.v1.GetPublisherModelRequest\x1a*.google.cloud.aiplatform.v1.PublisherModel\"/\xda\x41\x04name\x82\xd3\xe4\x93\x02\"\x12 /v1/{name=publishers/*/models/*}\x12\xba\x01\n\x06\x44\x65ploy\x12).google.cloud.aiplatform.v1.DeployRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41)\n\x0e\x44\x65ployResponse\x12\x17\x44\x65ployOperationMetadata\x82\xd3\xe4\x93\x02\x34\"//v1/{destination=projects/*/locations/*}:deploy:\x01*\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x17ModelGardenServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n5google/cloud/aiplatform/v1/model_garden_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/aiplatform/v1/machine_resources.proto\x1a&google/cloud/aiplatform/v1/model.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a\x30google/cloud/aiplatform/v1/publisher_model.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x18GetPublisherModelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x04view\x18\x03 \x01(\x0e\x32..google.cloud.aiplatform.v1.PublisherModelViewB\x03\xe0\x41\x01\x12\"\n\x15is_hugging_face_model\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12hugging_face_token\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9d\t\n\rDeployRequest\x12M\n\x14publisher_model_name\x18\x01 \x01(\tB-\xfa\x41*\n(aiplatform.googleapis.com/PublisherModelH\x00\x12\x1f\n\x15hugging_face_model_id\x18\x02 \x01(\tH\x00\x12>\n\x0b\x64\x65stination\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12P\n\x0cmodel_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.DeployRequest.ModelConfigB\x03\xe0\x41\x01\x12V\n\x0f\x65ndpoint_config\x18\x06 \x01(\x0b\x32\x38.google.cloud.aiplatform.v1.DeployRequest.EndpointConfigB\x03\xe0\x41\x01\x12R\n\rdeploy_config\x18\x07 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.DeployRequest.DeployConfigB\x03\xe0\x41\x01\x1a\x82\x02\n\x0bModelConfig\x12\x18\n\x0b\x61\x63\x63\x65pt_eula\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19hugging_face_access_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\'\n\x1ahugging_face_cache_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0e\x63ontainer_spec\x18\x05 \x01(\x0b\x32..google.cloud.aiplatform.v1.ModelContainerSpecB\x03\xe0\x41\x01\x12\x1a\n\rmodel_user_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\xab\x01\n\x0e\x45ndpointConfig\x12\"\n\x15\x65ndpoint_display_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12)\n\x1a\x64\x65\x64icated_endpoint_enabled\x18\x02 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12(\n\x1b\x64\x65\x64icated_endpoint_disabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x10\x65ndpoint_user_id\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x1a\x9d\x02\n\x0c\x44\x65ployConfig\x12P\n\x13\x64\x65\x64icated_resources\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.DedicatedResourcesB\x03\xe0\x41\x01\x12 \n\x13\x66\x61st_tryout_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x64\n\rsystem_labels\x18\x03 \x03(\x0b\x32H.google.cloud.aiplatform.v1.DeployRequest.DeployConfig.SystemLabelsEntryB\x03\xe0\x41\x01\x1a\x33\n\x11SystemLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tartifacts\"\xd1\x01\n\x0e\x44\x65ployResponse\x12I\n\x0fpublisher_model\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12<\n\x08\x65ndpoint\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"\xa8\x02\n\x17\x44\x65ployOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12I\n\x0fpublisher_model\x18\x02 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(aiplatform.googleapis.com/PublisherModel\x12>\n\x0b\x64\x65stination\x18\x03 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0eproject_number\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08model_id\x18\x05 \x01(\tB\x03\xe0\x41\x03*\xa1\x01\n\x12PublisherModelView\x12$\n PUBLISHER_MODEL_VIEW_UNSPECIFIED\x10\x00\x12\x1e\n\x1aPUBLISHER_MODEL_VIEW_BASIC\x10\x01\x12\x1d\n\x19PUBLISHER_MODEL_VIEW_FULL\x10\x02\x12&\n\"PUBLISHER_MODEL_VERSION_VIEW_BASIC\x10\x03\x32\xc9\x03\n\x12ModelGardenService\x12\xa6\x01\n\x11GetPublisherModel\x12\x34.google.cloud.aiplatform.v1.GetPublisherModelRequest\x1a*.google.cloud.aiplatform.v1.PublisherModel\"/\xda\x41\x04name\x82\xd3\xe4\x93\x02\"\x12 /v1/{name=publishers/*/models/*}\x12\xba\x01\n\x06\x44\x65ploy\x12).google.cloud.aiplatform.v1.DeployRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41)\n\x0e\x44\x65ployResponse\x12\x17\x44\x65ployOperationMetadata\x82\xd3\xe4\x93\x02\x34\"//v1/{destination=projects/*/locations/*}:deploy:\x01*\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x17ModelGardenServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb index 4e37bf0b02e2..8dbfd3020f26 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb @@ -17,7 +17,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n3google/cloud/aiplatform/v1/prediction_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/content.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a&google/cloud/aiplatform/v1/types.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaa\x01\n\x0ePredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\"\x80\x02\n\x0fPredictResponse\x12+\n\x0bpredictions\x18\x01 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12-\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\"z\n\x11RawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\x80\x01\n\x17StreamRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\xc0\x01\n\x14\x44irectPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x84\x01\n\x15\x44irectPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"{\n\x17\x44irectRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\x0c\"*\n\x18\x44irectRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\xd0\x01\n\x1aStreamDirectPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x37\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.TensorB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.TensorB\x03\xe0\x41\x01\"\x8a\x01\n\x1bStreamDirectPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x8b\x01\n\x1dStreamDirectRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x18\n\x0bmethod_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05input\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\"0\n\x1eStreamDirectRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\xc3\x01\n\x17StreamingPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x87\x01\n\x18StreamingPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"~\n\x1aStreamingRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\x0c\"-\n\x1bStreamingRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\x9d\x02\n\x0e\x45xplainRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x12V\n\x19\x65xplanation_spec_override\x18\x05 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.ExplanationSpecOverride\x12\x19\n\x11\x64\x65ployed_model_id\x18\x03 \x01(\t\"\x98\x01\n\x0f\x45xplainResponse\x12=\n\x0c\x65xplanations\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.Explanation\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12+\n\x0bpredictions\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xd3\x03\n\x12\x43ountTokensRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x12\n\x05model\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12:\n\x08\x63ontents\x18\x04 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01\x12I\n\x12system_instruction\x18\x05 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x34\n\x05tools\x18\x06 \x03(\x0b\x32 .google.cloud.aiplatform.v1.ToolB\x03\xe0\x41\x01\x12Q\n\x11generation_config\x18\x07 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x15\n\x13_system_instructionB\x14\n\x12_generation_config\"\xa2\x01\n\x13\x43ountTokensResponse\x12\x14\n\x0ctotal_tokens\x18\x01 \x01(\x05\x12!\n\x19total_billable_characters\x18\x02 \x01(\x05\x12R\n\x15prompt_tokens_details\x18\x03 \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\"\xa6\x05\n\x16GenerateContentRequest\x12\x12\n\x05model\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12:\n\x08\x63ontents\x18\x02 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x02\x12I\n\x12system_instruction\x18\x08 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12G\n\x0e\x63\x61\x63hed_content\x18\t \x01(\tB/\xe0\x41\x01\xfa\x41)\n\'aiplatform.googleapis.com/CachedContent\x12\x34\n\x05tools\x18\x06 \x03(\x0b\x32 .google.cloud.aiplatform.v1.ToolB\x03\xe0\x41\x01\x12@\n\x0btool_config\x18\x07 \x01(\x0b\x32&.google.cloud.aiplatform.v1.ToolConfigB\x03\xe0\x41\x01\x12S\n\x06labels\x18\n \x03(\x0b\x32>.google.cloud.aiplatform.v1.GenerateContentRequest.LabelsEntryB\x03\xe0\x41\x01\x12G\n\x0fsafety_settings\x18\x03 \x03(\x0b\x32).google.cloud.aiplatform.v1.SafetySettingB\x03\xe0\x41\x01\x12L\n\x11generation_config\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x15\n\x13_system_instruction\"\x8f\t\n\x17GenerateContentResponse\x12>\n\ncandidates\x18\x02 \x03(\x0b\x32%.google.cloud.aiplatform.v1.CandidateB\x03\xe0\x41\x03\x12\x1a\n\rmodel_version\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0bresponse_id\x18\r \x01(\tB\x03\xe0\x41\x03\x12`\n\x0fprompt_feedback\x18\x03 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedbackB\x03\xe0\x41\x03\x12Y\n\x0eusage_metadata\x18\x04 \x01(\x0b\x32\x41.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata\x1a\xd6\x02\n\x0ePromptFeedback\x12k\n\x0c\x62lock_reason\x18\x01 \x01(\x0e\x32P.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x02 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12!\n\x14\x62lock_reason_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\"m\n\rBlockedReason\x12\x1e\n\x1a\x42LOCKED_REASON_UNSPECIFIED\x10\x00\x12\n\n\x06SAFETY\x10\x01\x12\t\n\x05OTHER\x10\x02\x12\r\n\tBLOCKLIST\x10\x03\x12\x16\n\x12PROHIBITED_CONTENT\x10\x04\x1a\xb1\x03\n\rUsageMetadata\x12\x1a\n\x12prompt_token_count\x18\x01 \x01(\x05\x12\x1e\n\x16\x63\x61ndidates_token_count\x18\x02 \x01(\x05\x12!\n\x14thoughts_token_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x11total_token_count\x18\x03 \x01(\x05\x12\'\n\x1a\x63\x61\x63hed_content_token_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12R\n\x15prompt_tokens_details\x18\t \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12Q\n\x14\x63\x61\x63he_tokens_details\x18\n \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12V\n\x19\x63\x61ndidates_tokens_details\x18\x0b \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x32\xf2\x19\n\x11PredictionService\x12\x94\x02\n\x07Predict\x12*.google.cloud.aiplatform.v1.PredictRequest\x1a+.google.cloud.aiplatform.v1.PredictResponse\"\xaf\x01\xda\x41\x1d\x65ndpoint,instances,parameters\x82\xd3\xe4\x93\x02\x88\x01\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict:\x01*ZH\"C/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict:\x01*\x12\xfe\x01\n\nRawPredict\x12-.google.cloud.aiplatform.v1.RawPredictRequest\x1a\x14.google.api.HttpBody\"\xaa\x01\xda\x41\x12\x65ndpoint,http_body\x82\xd3\xe4\x93\x02\x8e\x01\"\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain:\x01*\x12\x8d\x03\n\x0fGenerateContent\x12\x32.google.cloud.aiplatform.v1.GenerateContentRequest\x1a\x33.google.cloud.aiplatform.v1.GenerateContentResponse\"\x90\x02\xda\x41\x0emodel,contents\x82\xd3\xe4\x93\x02\xf8\x01\">/v1/{model=projects/*/locations/*/endpoints/*}:generateContent:\x01*ZM\"H/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent:\x01*Z,\"\'/v1/{model=endpoints/*}:generateContent:\x01*Z6\"1/v1/{model=publishers/*/models/*}:generateContent:\x01*\x12\xad\x03\n\x15StreamGenerateContent\x12\x32.google.cloud.aiplatform.v1.GenerateContentRequest\x1a\x33.google.cloud.aiplatform.v1.GenerateContentResponse\"\xa8\x02\xda\x41\x0emodel,contents\x82\xd3\xe4\x93\x02\x90\x02\"D/v1/{model=projects/*/locations/*/endpoints/*}:streamGenerateContent:\x01*ZS\"N/v1/{model=projects/*/locations/*/publishers/*/models/*}:streamGenerateContent:\x01*Z2\"-/v1/{model=endpoints/*}:streamGenerateContent:\x01*Z<\"7/v1/{model=publishers/*/models/*}:streamGenerateContent:\x01*0\x01\x1a\x86\x01\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xd4\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x16PredictionServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n3google/cloud/aiplatform/v1/prediction_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/content.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a&google/cloud/aiplatform/v1/types.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaa\x01\n\x0ePredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\"\x80\x02\n\x0fPredictResponse\x12+\n\x0bpredictions\x18\x01 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12-\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\"z\n\x11RawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\x80\x01\n\x17StreamRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\xc0\x01\n\x14\x44irectPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x84\x01\n\x15\x44irectPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"{\n\x17\x44irectRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\x0c\"*\n\x18\x44irectRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\xd0\x01\n\x1aStreamDirectPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x37\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.TensorB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.TensorB\x03\xe0\x41\x01\"\x8a\x01\n\x1bStreamDirectPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x8b\x01\n\x1dStreamDirectRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x18\n\x0bmethod_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05input\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\"0\n\x1eStreamDirectRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\xc3\x01\n\x17StreamingPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x87\x01\n\x18StreamingPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"~\n\x1aStreamingRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\x0c\"-\n\x1bStreamingRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\x9d\x02\n\x0e\x45xplainRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x12V\n\x19\x65xplanation_spec_override\x18\x05 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.ExplanationSpecOverride\x12\x19\n\x11\x64\x65ployed_model_id\x18\x03 \x01(\t\"\x98\x01\n\x0f\x45xplainResponse\x12=\n\x0c\x65xplanations\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.Explanation\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12+\n\x0bpredictions\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xd3\x03\n\x12\x43ountTokensRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x12\n\x05model\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12:\n\x08\x63ontents\x18\x04 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01\x12I\n\x12system_instruction\x18\x05 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x34\n\x05tools\x18\x06 \x03(\x0b\x32 .google.cloud.aiplatform.v1.ToolB\x03\xe0\x41\x01\x12Q\n\x11generation_config\x18\x07 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x15\n\x13_system_instructionB\x14\n\x12_generation_config\"\xa2\x01\n\x13\x43ountTokensResponse\x12\x14\n\x0ctotal_tokens\x18\x01 \x01(\x05\x12!\n\x19total_billable_characters\x18\x02 \x01(\x05\x12R\n\x15prompt_tokens_details\x18\x03 \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\"\xf5\x05\n\x16GenerateContentRequest\x12\x12\n\x05model\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12:\n\x08\x63ontents\x18\x02 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x02\x12I\n\x12system_instruction\x18\x08 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12G\n\x0e\x63\x61\x63hed_content\x18\t \x01(\tB/\xe0\x41\x01\xfa\x41)\n\'aiplatform.googleapis.com/CachedContent\x12\x34\n\x05tools\x18\x06 \x03(\x0b\x32 .google.cloud.aiplatform.v1.ToolB\x03\xe0\x41\x01\x12@\n\x0btool_config\x18\x07 \x01(\x0b\x32&.google.cloud.aiplatform.v1.ToolConfigB\x03\xe0\x41\x01\x12S\n\x06labels\x18\n \x03(\x0b\x32>.google.cloud.aiplatform.v1.GenerateContentRequest.LabelsEntryB\x03\xe0\x41\x01\x12G\n\x0fsafety_settings\x18\x03 \x03(\x0b\x32).google.cloud.aiplatform.v1.SafetySettingB\x03\xe0\x41\x01\x12M\n\x12model_armor_config\x18\x0b \x01(\x0b\x32,.google.cloud.aiplatform.v1.ModelArmorConfigB\x03\xe0\x41\x01\x12L\n\x11generation_config\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x15\n\x13_system_instruction\"\xa0\t\n\x17GenerateContentResponse\x12>\n\ncandidates\x18\x02 \x03(\x0b\x32%.google.cloud.aiplatform.v1.CandidateB\x03\xe0\x41\x03\x12\x1a\n\rmodel_version\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0bresponse_id\x18\r \x01(\tB\x03\xe0\x41\x03\x12`\n\x0fprompt_feedback\x18\x03 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedbackB\x03\xe0\x41\x03\x12Y\n\x0eusage_metadata\x18\x04 \x01(\x0b\x32\x41.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata\x1a\xe7\x02\n\x0ePromptFeedback\x12k\n\x0c\x62lock_reason\x18\x01 \x01(\x0e\x32P.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x02 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12!\n\x14\x62lock_reason_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\"~\n\rBlockedReason\x12\x1e\n\x1a\x42LOCKED_REASON_UNSPECIFIED\x10\x00\x12\n\n\x06SAFETY\x10\x01\x12\t\n\x05OTHER\x10\x02\x12\r\n\tBLOCKLIST\x10\x03\x12\x16\n\x12PROHIBITED_CONTENT\x10\x04\x12\x0f\n\x0bMODEL_ARMOR\x10\x05\x1a\xb1\x03\n\rUsageMetadata\x12\x1a\n\x12prompt_token_count\x18\x01 \x01(\x05\x12\x1e\n\x16\x63\x61ndidates_token_count\x18\x02 \x01(\x05\x12!\n\x14thoughts_token_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x11total_token_count\x18\x03 \x01(\x05\x12\'\n\x1a\x63\x61\x63hed_content_token_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12R\n\x15prompt_tokens_details\x18\t \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12Q\n\x14\x63\x61\x63he_tokens_details\x18\n \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12V\n\x19\x63\x61ndidates_tokens_details\x18\x0b \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x32\xf2\x19\n\x11PredictionService\x12\x94\x02\n\x07Predict\x12*.google.cloud.aiplatform.v1.PredictRequest\x1a+.google.cloud.aiplatform.v1.PredictResponse\"\xaf\x01\xda\x41\x1d\x65ndpoint,instances,parameters\x82\xd3\xe4\x93\x02\x88\x01\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict:\x01*ZH\"C/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict:\x01*\x12\xfe\x01\n\nRawPredict\x12-.google.cloud.aiplatform.v1.RawPredictRequest\x1a\x14.google.api.HttpBody\"\xaa\x01\xda\x41\x12\x65ndpoint,http_body\x82\xd3\xe4\x93\x02\x8e\x01\"\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain:\x01*\x12\x8d\x03\n\x0fGenerateContent\x12\x32.google.cloud.aiplatform.v1.GenerateContentRequest\x1a\x33.google.cloud.aiplatform.v1.GenerateContentResponse\"\x90\x02\xda\x41\x0emodel,contents\x82\xd3\xe4\x93\x02\xf8\x01\">/v1/{model=projects/*/locations/*/endpoints/*}:generateContent:\x01*ZM\"H/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent:\x01*Z,\"\'/v1/{model=endpoints/*}:generateContent:\x01*Z6\"1/v1/{model=publishers/*/models/*}:generateContent:\x01*\x12\xad\x03\n\x15StreamGenerateContent\x12\x32.google.cloud.aiplatform.v1.GenerateContentRequest\x1a\x33.google.cloud.aiplatform.v1.GenerateContentResponse\"\xa8\x02\xda\x41\x0emodel,contents\x82\xd3\xe4\x93\x02\x90\x02\"D/v1/{model=projects/*/locations/*/endpoints/*}:streamGenerateContent:\x01*ZS\"N/v1/{model=projects/*/locations/*/publishers/*/models/*}:streamGenerateContent:\x01*Z2\"-/v1/{model=endpoints/*}:streamGenerateContent:\x01*Z<\"7/v1/{model=publishers/*/models/*}:streamGenerateContent:\x01*0\x01\x1a\x86\x01\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xd4\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x16PredictionServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb index 084700a89adb..e4259101070b 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb @@ -6,12 +6,14 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/cloud/aiplatform/v1/encryption_spec_pb' require 'google/cloud/aiplatform/v1/env_var_pb' +require 'google/cloud/aiplatform/v1/service_networking_pb' require 'google/protobuf/struct_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n1google/cloud/aiplatform/v1/reasoning_engine.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x04\n\x13ReasoningEngineSpec\x12!\n\x0fservice_account\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x0cpackage_spec\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.ReasoningEngineSpec.PackageSpecB\x03\xe0\x41\x01\x12\\\n\x0f\x64\x65ployment_spec\x18\x04 \x01(\x0b\x32>.google.cloud.aiplatform.v1.ReasoningEngineSpec.DeploymentSpecB\x03\xe0\x41\x01\x12\x33\n\rclass_methods\x18\x03 \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61gent_framework\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x98\x01\n\x0bPackageSpec\x12\"\n\x15pickle_object_gcs_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x64\x65pendency_files_gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14requirements_gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0epython_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x89\x01\n\x0e\x44\x65ploymentSpec\x12\x34\n\x03\x65nv\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVarB\x03\xe0\x41\x01\x12\x41\n\nsecret_env\x18\x02 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SecretEnvVarB\x03\xe0\x41\x01\x42\x12\n\x10_service_account\"\xbe\x03\n\x0fReasoningEngine\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04spec\x18\x03 \x01(\x0b\x32/.google.cloud.aiplatform.v1.ReasoningEngineSpecB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x01:\x9f\x01\xea\x41\x9b\x01\n)aiplatform.googleapis.com/ReasoningEngine\x12Kprojects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}*\x10reasoningEngines2\x0freasoningEngineB\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14ReasoningEngineProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n1google/cloud/aiplatform/v1/reasoning_engine.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a(google/cloud/aiplatform/v1/env_var.proto\x1a\x33google/cloud/aiplatform/v1/service_networking.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x08\n\x13ReasoningEngineSpec\x12!\n\x0fservice_account\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x0cpackage_spec\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.ReasoningEngineSpec.PackageSpecB\x03\xe0\x41\x01\x12\\\n\x0f\x64\x65ployment_spec\x18\x04 \x01(\x0b\x32>.google.cloud.aiplatform.v1.ReasoningEngineSpec.DeploymentSpecB\x03\xe0\x41\x01\x12\x33\n\rclass_methods\x18\x03 \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61gent_framework\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x98\x01\n\x0bPackageSpec\x12\"\n\x15pickle_object_gcs_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x64\x65pendency_files_gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14requirements_gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0epython_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\xae\x04\n\x0e\x44\x65ploymentSpec\x12\x34\n\x03\x65nv\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.EnvVarB\x03\xe0\x41\x01\x12\x41\n\nsecret_env\x18\x02 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SecretEnvVarB\x03\xe0\x41\x01\x12Q\n\x14psc_interface_config\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.PscInterfaceConfigB\x03\xe0\x41\x01\x12\x1f\n\rmin_instances\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1f\n\rmax_instances\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12p\n\x0fresource_limits\x18\x07 \x03(\x0b\x32R.google.cloud.aiplatform.v1.ReasoningEngineSpec.DeploymentSpec.ResourceLimitsEntryB\x03\xe0\x41\x01\x12\'\n\x15\x63ontainer_concurrency\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x1a\x35\n\x13ResourceLimitsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e_min_instancesB\x10\n\x0e_max_instancesB\x18\n\x16_container_concurrencyB\x12\n\x10_service_account\"\x83\x04\n\x0fReasoningEngine\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04spec\x18\x03 \x01(\x0b\x32/.google.cloud.aiplatform.v1.ReasoningEngineSpecB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0f\x65ncryption_spec\x18\x0b \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec:\x9f\x01\xea\x41\x9b\x01\n)aiplatform.googleapis.com/ReasoningEngine\x12Kprojects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}*\x10reasoningEngines2\x0freasoningEngineB\xd2\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x14ReasoningEngineProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -28,7 +30,9 @@ imports = [ ["google.protobuf.Struct", "google/protobuf/struct.proto"], ["google.cloud.aiplatform.v1.EnvVar", "google/cloud/aiplatform/v1/env_var.proto"], + ["google.cloud.aiplatform.v1.PscInterfaceConfig", "google/cloud/aiplatform/v1/service_networking.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.aiplatform.v1.EncryptionSpec", "google/cloud/aiplatform/v1/encryption_spec.proto"], ] imports.each do |type_name, expected_filename| import_file = pool.lookup(type_name).file_descriptor diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb index 2694c4996b30..dd0b5c74c6e0 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/tool_pb.rb @@ -11,7 +11,7 @@ require 'google/type/latlng_pb' -descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\xb5\x06\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x12@\n\x0burl_context\x18\x08 \x01(\x0b\x32&.google.cloud.aiplatform.v1.UrlContextB\x03\xe0\x41\x01\x12G\n\x0c\x63omputer_use\x18\x0b \x01(\x0b\x32,.google.cloud.aiplatform.v1.Tool.ComputerUseB\x03\xe0\x41\x01\x1a\x0e\n\x0cGoogleSearch\x1a\x0f\n\rCodeExecution\x1a\xa6\x01\n\x0b\x43omputerUse\x12R\n\x0b\x65nvironment\x18\x01 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.Tool.ComputerUse.EnvironmentB\x03\xe0\x41\x02\"C\n\x0b\x45nvironment\x12\x1b\n\x17\x45NVIRONMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13\x45NVIRONMENT_BROWSER\x10\x01\"\x0c\n\nUrlContext\"\xb2\x02\n\x13\x46unctionDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12;\n\x16parameters_json_schema\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x14response_json_schema\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"U\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"\xfa\x01\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmax_results\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12R\n\x10\x64\x61ta_store_specs\x18\x05 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec\x1a\x38\n\rDataStoreSpec\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"\x15\n\x13\x45nterpriseWebSearch\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\x95\x07\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12@\n\x0bgoogle_maps\x18\x05 \x01(\x0b\x32&.google.cloud.aiplatform.v1.GoogleMapsB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x12@\n\x0burl_context\x18\x08 \x01(\x0b\x32&.google.cloud.aiplatform.v1.UrlContextB\x03\xe0\x41\x01\x12G\n\x0c\x63omputer_use\x18\x0b \x01(\x0b\x32,.google.cloud.aiplatform.v1.Tool.ComputerUseB\x03\xe0\x41\x01\x1a,\n\x0cGoogleSearch\x12\x1c\n\x0f\x65xclude_domains\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1a\x0f\n\rCodeExecution\x1a\xa6\x01\n\x0b\x43omputerUse\x12R\n\x0b\x65nvironment\x18\x01 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.Tool.ComputerUse.EnvironmentB\x03\xe0\x41\x02\"C\n\x0b\x45nvironment\x12\x1b\n\x17\x45NVIRONMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13\x45NVIRONMENT_BROWSER\x10\x01\"\x0c\n\nUrlContext\"\xb2\x02\n\x13\x46unctionDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12;\n\x16parameters_json_schema\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x14response_json_schema\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"U\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"\xfa\x01\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmax_results\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12R\n\x10\x64\x61ta_store_specs\x18\x05 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec\x1a\x38\n\rDataStoreSpec\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"\x0c\n\nGoogleMaps\"3\n\x13\x45nterpriseWebSearch\x12\x1c\n\x0f\x65xclude_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -63,6 +63,7 @@ module V1 VertexAISearch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.VertexAISearch").msgclass VertexAISearch::DataStoreSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec").msgclass GoogleSearchRetrieval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GoogleSearchRetrieval").msgclass + GoogleMaps = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GoogleMaps").msgclass EnterpriseWebSearch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.EnterpriseWebSearch").msgclass DynamicRetrievalConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DynamicRetrievalConfig").msgclass DynamicRetrievalConfig::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode").enummodule diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb index f625c9c28fa6..43698ba8be48 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb @@ -64,6 +64,9 @@ module AcceleratorType # Nvidia B200 GPU. NVIDIA_B200 = 16 + # Nvidia GB200 GPU. + NVIDIA_GB200 = 17 + # TPU v2. TPU_V2 = 6 diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb index 00b5ae4b3a43..0b6f0c3f69e0 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb @@ -52,24 +52,24 @@ class Content # @return [::String] # Optional. Text part (can be code). # - # Note: The following fields are mutually exclusive: `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. 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: `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] inline_data # @return [::Google::Cloud::AIPlatform::V1::Blob] # Optional. Inlined bytes data. # - # Note: The following fields are mutually exclusive: `inline_data`, `text`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. 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: `inline_data`, `text`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] file_data # @return [::Google::Cloud::AIPlatform::V1::FileData] # Optional. URI based data. # - # Note: The following fields are mutually exclusive: `file_data`, `text`, `inline_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. 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: `file_data`, `text`, `inline_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] function_call # @return [::Google::Cloud::AIPlatform::V1::FunctionCall] # Optional. A predicted [FunctionCall] returned from the model that # contains a string representing the [FunctionDeclaration.name] with the # parameters and their values. # - # Note: The following fields are mutually exclusive: `function_call`, `text`, `inline_data`, `file_data`, `function_response`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. 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: `function_call`, `text`, `inline_data`, `file_data`, `function_response`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] function_response # @return [::Google::Cloud::AIPlatform::V1::FunctionResponse] # Optional. The result output of a [FunctionCall] that contains a string @@ -77,28 +77,24 @@ class Content # containing any output from the function call. It is used as context to # the model. # - # Note: The following fields are mutually exclusive: `function_response`, `text`, `inline_data`, `file_data`, `function_call`, `executable_code`, `code_execution_result`, `thought`, `thought_signature`. 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: `function_response`, `text`, `inline_data`, `file_data`, `function_call`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] executable_code # @return [::Google::Cloud::AIPlatform::V1::ExecutableCode] # Optional. Code generated by the model that is meant to be executed. # - # Note: The following fields are mutually exclusive: `executable_code`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `code_execution_result`, `thought`, `thought_signature`. 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: `executable_code`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] code_execution_result # @return [::Google::Cloud::AIPlatform::V1::CodeExecutionResult] # Optional. Result of executing the [ExecutableCode]. # - # Note: The following fields are mutually exclusive: `code_execution_result`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `thought`, `thought_signature`. 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: `code_execution_result`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] thought # @return [::Boolean] # Indicates if the part is thought from the model. - # - # Note: The following fields are mutually exclusive: `thought`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] thought_signature # @return [::String] # An opaque signature for the thought so it can be reused in subsequent # requests. - # - # Note: The following fields are mutually exclusive: `thought_signature`, `text`, `inline_data`, `file_data`, `function_call`, `function_response`, `executable_code`, `code_execution_result`, `thought`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] video_metadata # @return [::Google::Cloud::AIPlatform::V1::VideoMetadata] # Optional. Video metadata. The metadata should only be specified while the @@ -539,6 +535,9 @@ module FinishReason # The function call generated by the model is invalid. MALFORMED_FUNCTION_CALL = 9 + + # The model response was blocked by Model Armor. + MODEL_ARMOR = 10 end end @@ -637,12 +636,17 @@ class Segment # @return [::Google::Cloud::AIPlatform::V1::GroundingChunk::Web] # Grounding chunk from the web. # - # Note: The following fields are mutually exclusive: `web`, `retrieved_context`. 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: `web`, `retrieved_context`, `maps`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] retrieved_context # @return [::Google::Cloud::AIPlatform::V1::GroundingChunk::RetrievedContext] # Grounding chunk from context retrieved by the retrieval tools. # - # Note: The following fields are mutually exclusive: `retrieved_context`, `web`. 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: `retrieved_context`, `web`, `maps`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] maps + # @return [::Google::Cloud::AIPlatform::V1::GroundingChunk::Maps] + # Grounding chunk from Google Maps. + # + # Note: The following fields are mutually exclusive: `maps`, `web`, `retrieved_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. class GroundingChunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -673,10 +677,33 @@ class Web # @!attribute [rw] text # @return [::String] # Text of the attribution. + # @!attribute [r] document_name + # @return [::String] + # Output only. The full document name for the referenced Vertex AI Search + # document. class RetrievedContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Chunk from Google Maps. + # @!attribute [rw] uri + # @return [::String] + # URI reference of the chunk. + # @!attribute [rw] title + # @return [::String] + # Title of the chunk. + # @!attribute [rw] text + # @return [::String] + # Text of the chunk. + # @!attribute [rw] place_id + # @return [::String] + # This Place's resource name, in `places/{place_id}` format. Can be used + # to look up the Place. + class Maps + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # Grounding support. @@ -715,6 +742,11 @@ class GroundingSupport # @!attribute [r] retrieval_metadata # @return [::Google::Cloud::AIPlatform::V1::RetrievalMetadata] # Optional. Output only. Retrieval metadata. + # @!attribute [r] google_maps_widget_context_token + # @return [::String] + # Optional. Output only. Resource name of the Google Maps widget context + # token to be used with the PlacesContextElement widget to render contextual + # data. This is populated only for Google Maps grounding. class GroundingMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -747,6 +779,20 @@ class RetrievalMetadata extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for Model Armor integrations of prompt and responses. + # @!attribute [rw] prompt_template_name + # @return [::String] + # Optional. The name of the Model Armor template to use for prompt + # sanitization. + # @!attribute [rw] response_template_name + # @return [::String] + # Optional. The name of the Model Armor template to use for response + # sanitization. + class ModelArmorConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Represents token counting info for a single modality. # @!attribute [rw] modality # @return [::Google::Cloud::AIPlatform::V1::Modality] diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/deployment_stage.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/deployment_stage.rb new file mode 100644 index 000000000000..c703df142067 --- /dev/null +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/deployment_stage.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 AIPlatform + module V1 + # Stage field indicating the current progress of a deployment. + module DeploymentStage + # Default value. This value is unused. + DEPLOYMENT_STAGE_UNSPECIFIED = 0 + + # The deployment is initializing and setting up the environment. + STARTING_DEPLOYMENT = 5 + + # The deployment is preparing the model assets. + PREPARING_MODEL = 6 + + # The deployment is creating the underlying serving cluster. + CREATING_SERVING_CLUSTER = 7 + + # The deployment is adding nodes to the serving cluster. + ADDING_NODES_TO_CLUSTER = 8 + + # The deployment is getting the container image for the model server. + GETTING_CONTAINER_IMAGE = 9 + + # The deployment is starting the model server. + STARTING_MODEL_SERVER = 3 + + # The deployment is performing finalization steps. + FINISHING_UP = 4 + + # The deployment has terminated. + DEPLOYMENT_TERMINATED = 10 + end + end + end + end +end diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb index f0338c246c39..add3c39f7032 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb @@ -56,6 +56,10 @@ class CreateEndpointRequest # @!attribute [rw] generic_metadata # @return [::Google::Cloud::AIPlatform::V1::GenericOperationMetadata] # The operation generic information. + # @!attribute [r] deployment_stage + # @return [::Google::Cloud::AIPlatform::V1::DeploymentStage] + # Output only. The deployment stage of the model. Only populated if this + # CreateEndpoint request deploys a model at the same time. class CreateEndpointOperationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -252,6 +256,9 @@ class DeployModelResponse # @!attribute [rw] generic_metadata # @return [::Google::Cloud::AIPlatform::V1::GenericOperationMetadata] # The operation generic information. + # @!attribute [r] deployment_stage + # @return [::Google::Cloud::AIPlatform::V1::DeploymentStage] + # Output only. The deployment stage of the model. class DeployModelOperationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -325,6 +332,8 @@ class UndeployModelOperationMetadata # * `max_replica_count` in either # {::Google::Cloud::AIPlatform::V1::DedicatedResources DedicatedResources} or # {::Google::Cloud::AIPlatform::V1::AutomaticResources AutomaticResources} + # * `required_replica_count` in + # {::Google::Cloud::AIPlatform::V1::DedicatedResources DedicatedResources} # * {::Google::Cloud::AIPlatform::V1::DedicatedResources#autoscaling_metric_specs autoscaling_metric_specs} # * `disable_container_logging` (v1 only) # * `enable_container_logging` (v1beta1 only) diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb index 3b1e8670173c..fc62dfc209f6 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb @@ -315,6 +315,87 @@ class SearchNearestEntitiesResponse extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for + # {::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client#feature_view_direct_write FeatureOnlineStoreService.FeatureViewDirectWrite}. + # @!attribute [rw] feature_view + # @return [::String] + # FeatureView resource format + # `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}` + # @!attribute [rw] data_key_and_feature_values + # @return [::Array<::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest::DataKeyAndFeatureValues>] + # Required. The data keys and associated feature values. + class FeatureViewDirectWriteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A data key and associated feature values to write to the feature view. + # @!attribute [rw] data_key + # @return [::Google::Cloud::AIPlatform::V1::FeatureViewDataKey] + # The data key. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest::DataKeyAndFeatureValues::Feature>] + # List of features to write. + class DataKeyAndFeatureValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Feature name & value pair. + # @!attribute [rw] value + # @return [::Google::Cloud::AIPlatform::V1::FeatureValue] + # Feature value. A user provided timestamp may be set in the + # `FeatureValue.metadata.generate_time` field. + # @!attribute [rw] name + # @return [::String] + # Feature short name. + class Feature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Response message for + # {::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client#feature_view_direct_write FeatureOnlineStoreService.FeatureViewDirectWrite}. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Response status for the keys listed in + # {::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse#write_responses FeatureViewDirectWriteResponse.write_responses}. + # + # The error only applies to the + # listed data keys - the stream will remain open for further + # [FeatureOnlineStoreService.FeatureViewDirectWriteRequest][] requests. + # + # Partial failures (e.g. if the first 10 keys of a request fail, but the + # rest succeed) from a single request may result in multiple responses - + # there will be one response for the successful request keys and one response + # for the failing request keys. + # @!attribute [rw] write_responses + # @return [::Array<::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse::WriteResponse>] + # Details about write for each key. If status is not OK, + # {::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse::WriteResponse#data_key WriteResponse.data_key} + # will have the key with error, but + # {::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse::WriteResponse#online_store_write_time WriteResponse.online_store_write_time} + # will not be present. + class FeatureViewDirectWriteResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details about the write for each key. + # @!attribute [rw] data_key + # @return [::Google::Cloud::AIPlatform::V1::FeatureViewDataKey] + # What key is this write response associated with. + # @!attribute [rw] online_store_write_time + # @return [::Google::Protobuf::Timestamp] + # When the feature values were written to the online store. + # If + # {::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse#status FeatureViewDirectWriteResponse.status} + # is not OK, this field is not populated. + class WriteResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # Format of the data in the Feature View. module FeatureViewDataFormat # Not set. Will be treated as the KeyValue format. diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb index 4c7902a9d83e..52e0bb84cc2d 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb @@ -261,9 +261,11 @@ class FeatureValue # Feature generation timestamp. Typically, it is provided by user at # feature ingestion time. If not, feature store # will use the system timestamp when the data is ingested into feature - # store. For streaming ingestion, the time, aligned by days, must be no - # older than five years (1825 days) and no later than one year (366 days) - # in the future. + # store. + # + # Legacy Feature Store: For streaming ingestion, the time, aligned by days, + # must be no older than five years (1825 days) and no later than one year + # (366 days) in the future. class Metadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb index abe54083a95f..03403f505466 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb @@ -880,7 +880,6 @@ class ListFeaturesResponse # containing the substring `foo` and description containing the substring # `bar`. # - # # Besides field queries, the following exact-match filters are # supported. The exact-match filters do not support wildcards. Unlike # field-restricted queries, exact-match filters are case-sensitive. diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/index.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/index.rb index 9876b8a964d3..9042b01111b8 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/index.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/index.rb @@ -152,6 +152,9 @@ module IndexUpdateMethod # @return [::Google::Cloud::AIPlatform::V1::IndexDatapoint::CrowdingTag] # Optional. CrowdingTag of the datapoint, the number of neighbors to return # in each crowding can be configured during query. + # @!attribute [rw] embedding_metadata + # @return [::Google::Protobuf::Struct] + # Optional. The key-value map of additional metadata for the datapoint. class IndexDatapoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb index 93db4e3bed35..84e55ceedde6 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb @@ -208,6 +208,18 @@ class LabelsEntry # Note that logs may incur a cost, especially if the deployed # index receives a high queries per second rate (QPS). # Estimate your costs before enabling this option. + # @!attribute [rw] enable_datapoint_upsert_logging + # @return [::Boolean] + # Optional. If true, logs to Cloud Logging errors relating to datapoint + # upserts. + # + # Under normal operation conditions, these log entries should be very rare. + # However, if incompatible datapoint updates are being uploaded to an index, + # a high volume of log entries may be generated in a short period of time. + # + # Note that logs may incur a cost, especially if the deployed index receives + # a high volume of datapoint upserts. Estimate your costs before enabling + # this option. # @!attribute [rw] deployed_index_auth_config # @return [::Google::Cloud::AIPlatform::V1::DeployedIndexAuthConfig] # Optional. If set, the authentication is enabled for the private endpoint. diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb index 27a18d19aace..2a93f05f806c 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb @@ -105,6 +105,15 @@ class DeployRequest # @return [::Google::Cloud::AIPlatform::V1::ModelContainerSpec] # Optional. The specification of the container that is to be used when # deploying. If not set, the default container spec will be used. + # @!attribute [rw] model_user_id + # @return [::String] + # Optional. The ID to use for the uploaded Model, which will become the + # final component of the model resource name. When not provided, Vertex AI + # will generate a value for this ID. When Model Registry model is provided, + # this field will be ignored. + # + # This value may be up to 63 characters, and valid characters are + # `[a-z0-9_-]`. The first character cannot be a number or hyphen. class ModelConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -116,13 +125,45 @@ class ModelConfig # Optional. The user-specified display name of the endpoint. If not set, a # default name will be used. # @!attribute [rw] dedicated_endpoint_enabled + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] - # Optional. If true, the endpoint will be exposed through a dedicated - # DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS - # will be isolated from other users' traffic and will have better - # performance and reliability. Note: Once you enabled dedicated endpoint, - # you won't be able to send request to the shared DNS + # Optional. Deprecated. Use dedicated_endpoint_disabled instead. + # If true, the endpoint will be exposed through a + # dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the + # dedicated DNS will be isolated from other users' traffic and will have + # better performance and reliability. Note: Once you enabled dedicated + # endpoint, you won't be able to send request to the shared DNS # \\{region}-aiplatform.googleapis.com. The limitations will be removed soon. + # @!attribute [rw] dedicated_endpoint_disabled + # @return [::Boolean] + # Optional. By default, if dedicated endpoint is enabled, the endpoint will + # be exposed through a dedicated DNS [Endpoint.dedicated_endpoint_dns]. + # Your request to the dedicated DNS will be isolated from other users' + # traffic and will have better performance and reliability. Note: Once you + # enabled dedicated endpoint, you won't be able to send request to the + # shared DNS \\{region}-aiplatform.googleapis.com. The limitations will be + # removed soon. + # + # If this field is set to true, the dedicated endpoint will be disabled + # and the deployed model will be exposed through the shared DNS + # \\{region}-aiplatform.googleapis.com. + # @!attribute [rw] endpoint_user_id + # @return [::String] + # Optional. Immutable. The ID to use for endpoint, which will become the + # final component of the endpoint resource name. If not provided, Vertex AI + # will generate a value for this ID. + # + # If the first character is a letter, this value may be up to 63 + # characters, and valid characters are `[a-z0-9-]`. The last character must + # be a letter or number. + # + # If the first character is a number, this value may be up to 9 characters, + # and valid characters are `[0-9]` with no leading zeros. + # + # When using HTTP/JSON, this field is populated + # based on a query string argument, such as `?endpoint_id=12345`. This is + # the fallback for fields that are not included in either the URI or the + # body. class EndpointConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb index d49a04e5ae09..e36936dd4d51 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb @@ -534,6 +534,10 @@ class CountTokensResponse # @return [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. + # @!attribute [rw] model_armor_config + # @return [::Google::Cloud::AIPlatform::V1::ModelArmorConfig] + # Optional. Settings for prompt and response sanitization using the Model + # Armor service. If supplied, safety_settings must not be supplied. # @!attribute [rw] generation_config # @return [::Google::Cloud::AIPlatform::V1::GenerationConfig] # Optional. Generation config. @@ -608,6 +612,9 @@ module BlockedReason # Candidates blocked due to prohibited content. PROHIBITED_CONTENT = 4 + + # The user prompt was blocked by Model Armor. + MODEL_ARMOR = 5 end end diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb index 6f0405e90907..fa8947bba9ba 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb @@ -45,7 +45,8 @@ module V1 # @!attribute [rw] agent_framework # @return [::String] # Optional. The OSS agent framework used to develop the agent. - # Currently supported values: "langchain", "langgraph", "ag2", "custom". + # Currently supported values: "google-adk", "langchain", "langgraph", "ag2", + # "llama-index", "custom". class ReasoningEngineSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -82,9 +83,46 @@ class PackageSpec # To use this feature, add 'Secret Manager Secret Accessor' role # (roles/secretmanager.secretAccessor) to AI Platform Reasoning Engine # Service Agent. + # @!attribute [rw] psc_interface_config + # @return [::Google::Cloud::AIPlatform::V1::PscInterfaceConfig] + # Optional. Configuration for PSC-I. + # @!attribute [rw] min_instances + # @return [::Integer] + # Optional. The minimum number of application instances that will be kept + # running at all times. Defaults to 1. Range: [0, 10]. + # @!attribute [rw] max_instances + # @return [::Integer] + # Optional. The maximum number of application instances that can be + # launched to handle increased traffic. Defaults to 100. Range: [1, 1000]. + # + # If VPC-SC or PSC-I is enabled, the acceptable range is [1, 100]. + # @!attribute [rw] resource_limits + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource limits for each container. Only 'cpu' and 'memory' + # keys are supported. Defaults to \\{"cpu": "4", "memory": "4Gi"}. + # + # * The only supported values for CPU are '1', '2', '4', '6' and '8'. For + # more information, go to + # https://cloud.google.com/run/docs/configuring/cpu. + # * The only supported values for memory are '1Gi', '2Gi', ... '32 Gi'. + # * For required cpu on different memory values, go to + # https://cloud.google.com/run/docs/configuring/memory-limits + # @!attribute [rw] container_concurrency + # @return [::Integer] + # Optional. Concurrency for each container and agent server. Recommended + # value: 2 * cpu + 1. Defaults to 9. class DeploymentSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceLimitsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end @@ -93,6 +131,8 @@ class DeploymentSpec # @!attribute [rw] name # @return [::String] # Identifier. The resource name of the ReasoningEngine. + # Format: + # `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` # @!attribute [rw] display_name # @return [::String] # Required. The display name of the ReasoningEngine. @@ -112,6 +152,11 @@ class DeploymentSpec # @return [::String] # Optional. Used to perform consistent read-modify-write updates. If not set, # a blind "overwrite" update happens. + # @!attribute [rw] encryption_spec + # @return [::Google::Cloud::AIPlatform::V1::EncryptionSpec] + # Customer-managed encryption key spec for a ReasoningEngine. If set, this + # ReasoningEngine and all sub-resources of this ReasoningEngine will be + # secured by this key. class ReasoningEngine include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb index 7d02063bd9ee..1459b338a899 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/tool.rb @@ -53,6 +53,10 @@ module V1 # @return [::Google::Cloud::AIPlatform::V1::GoogleSearchRetrieval] # Optional. GoogleSearchRetrieval tool type. # Specialized retrieval tool that is powered by Google search. + # @!attribute [rw] google_maps + # @return [::Google::Cloud::AIPlatform::V1::GoogleMaps] + # Optional. GoogleMaps tool type. + # Tool to support Google Maps in Model. # @!attribute [rw] enterprise_web_search # @return [::Google::Cloud::AIPlatform::V1::EnterpriseWebSearch] # Optional. Tool to support searching public web data, powered by Vertex AI @@ -75,6 +79,11 @@ class Tool # GoogleSearch tool type. # Tool to support Google Search in Model. Powered by Google. + # @!attribute [rw] exclude_domains + # @return [::Array<::String>] + # Optional. List of domains to be excluded from the search results. + # The default limit is 2000 domains. + # Example: ["amazon.com", "facebook.com"]. class GoogleSearch include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -393,8 +402,18 @@ class GoogleSearchRetrieval extend ::Google::Protobuf::MessageExts::ClassMethods end + # Tool to retrieve public maps data for grounding, powered by Google. + class GoogleMaps + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Tool to search public web data, powered by Vertex AI Search and Sec4 # compliance. + # @!attribute [rw] exclude_domains + # @return [::Array<::String>] + # Optional. List of domains to be excluded from the search results. + # The default limit is 2000 domains. class EnterpriseWebSearch include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/snippets/feature_online_store_service/feature_view_direct_write.rb b/google-cloud-ai_platform-v1/snippets/feature_online_store_service/feature_view_direct_write.rb new file mode 100644 index 000000000000..9c7de60b9238 --- /dev/null +++ b/google-cloud-ai_platform-v1/snippets/feature_online_store_service/feature_view_direct_write.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 aiplatform_v1_generated_FeatureOnlineStoreService_FeatureViewDirectWrite_sync] +require "google/cloud/ai_platform/v1" + +## +# Snippet for the feature_view_direct_write call in the FeatureOnlineStoreService 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::AIPlatform::V1::FeatureOnlineStoreService::Client#feature_view_direct_write. +# +def feature_view_direct_write + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the feature_view_direct_write method to start streaming. + output = client.feature_view_direct_write input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest.new + input << Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse + output.each do |current_response| + p current_response + end +end +# [END aiplatform_v1_generated_FeatureOnlineStoreService_FeatureViewDirectWrite_sync] diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index b816e29c96ff..23ce038764dc 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -2131,6 +2131,46 @@ } ] }, + { + "region_tag": "aiplatform_v1_generated_FeatureOnlineStoreService_FeatureViewDirectWrite_sync", + "title": "Snippet for the feature_view_direct_write call in the FeatureOnlineStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client#feature_view_direct_write.", + "file": "feature_online_store_service/feature_view_direct_write.rb", + "language": "RUBY", + "client_method": { + "short_name": "feature_view_direct_write", + "full_name": "::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client#feature_view_direct_write", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse", + "client": { + "short_name": "FeatureOnlineStoreService::Client", + "full_name": "::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client" + }, + "method": { + "short_name": "FeatureViewDirectWrite", + "full_name": "google.cloud.aiplatform.v1.FeatureOnlineStoreService.FeatureViewDirectWrite", + "service": { + "short_name": "FeatureOnlineStoreService", + "full_name": "google.cloud.aiplatform.v1.FeatureOnlineStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, { "region_tag": "aiplatform_v1_generated_FeaturestoreService_CreateFeaturestore_sync", "title": "Snippet for the create_featurestore call in the FeaturestoreService service", diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_service_test.rb index 1f3e14d17340..4fd466b2d319 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_service_test.rb @@ -188,6 +188,96 @@ def test_search_nearest_entities end end + def test_feature_view_direct_write + # Create GRPC objects. + grpc_response = ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a bidi streaming method. + feature_view = "hello world" + data_key_and_feature_values = [{}] + + feature_view_direct_write_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :feature_view_direct_write, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, feature_view_direct_write_client_stub do + # Create client + client = ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { feature_view: feature_view, data_key_and_feature_values: data_key_and_feature_values } + request_proto = ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest.new feature_view: feature_view, data_key_and_feature_values: data_key_and_feature_values + enum_input = [request_hash, request_proto].to_enum + client.feature_view_direct_write enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { feature_view: feature_view, data_key_and_feature_values: data_key_and_feature_values } + request_proto = ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest.new feature_view: feature_view, data_key_and_feature_values: data_key_and_feature_values + stream_input = Gapic::StreamInput.new + client.feature_view_direct_write stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { feature_view: feature_view, data_key_and_feature_values: data_key_and_feature_values } + request_proto = ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest.new feature_view: feature_view, data_key_and_feature_values: data_key_and_feature_values + enum_input = [request_hash, request_proto].to_enum + client.feature_view_direct_write enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { feature_view: feature_view, data_key_and_feature_values: data_key_and_feature_values } + request_proto = ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest.new feature_view: feature_view, data_key_and_feature_values: data_key_and_feature_values + stream_input = Gapic::StreamInput.new + client.feature_view_direct_write stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, feature_view_direct_write_client_stub.call_rpc_count + feature_view_direct_write_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest, r + assert_equal "hello world", r["feature_view"] + assert_kind_of ::Google::Cloud::AIPlatform::V1::FeatureViewDirectWriteRequest::DataKeyAndFeatureValues, r["data_key_and_feature_values"].first + end + end + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_paths_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_paths_test.rb index 24d4d8823201..9236495df772 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_paths_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_paths_test.rb @@ -79,4 +79,16 @@ def test_rag_corpus_path assert_equal "projects/value0/locations/value1/ragCorpora/value2", path end end + + def test_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AIPlatform::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.template_path project: "value0", location: "value1", template: "value2" + assert_equal "projects/value0/locations/value1/templates/value2", path + end + end end diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_rest_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_rest_test.rb index 1b65746e7b15..437362681810 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_rest_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_rest_test.rb @@ -486,6 +486,7 @@ def test_generate_content tool_config = {} labels = {} safety_settings = [{}] + model_armor_config = {} generation_config = {} generate_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| @@ -502,27 +503,27 @@ def test_generate_content end # Use hash object - client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }) do |_result, response| + client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.generate_content model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config do |_result, response| + client.generate_content model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config) do |_result, response| + client.generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }, call_options) do |_result, response| + client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config), call_options) do |_result, response| + client.generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -548,6 +549,7 @@ def test_stream_generate_content tool_config = {} labels = {} safety_settings = [{}] + model_armor_config = {} generation_config = {} stream_generate_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| @@ -564,27 +566,27 @@ def test_stream_generate_content end # Use hash object - client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }) do |_result, response| + client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config }) do |_result, response| assert_equal http_response, response.underlying_op end.first # Use named arguments - client.stream_generate_content model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config do |_result, response| + client.stream_generate_content model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config do |_result, response| assert_equal http_response, response.underlying_op end.first # Use protobuf object - client.stream_generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config) do |_result, response| + client.stream_generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config) do |_result, response| assert_equal http_response, response.underlying_op end.first # Use hash object with options - client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }, call_options) do |_result, response| + client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end.first # Use protobuf object with options - client.stream_generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config), call_options) do |_result, response| + client.stream_generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config), call_options) do |_result, response| assert_equal http_response, response.underlying_op end.first diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb index 47aa3e11a07c..1fbdda8ab6ce 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb @@ -912,6 +912,7 @@ def test_generate_content tool_config = {} labels = {} safety_settings = [{}] + model_armor_config = {} generation_config = {} generate_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| @@ -926,6 +927,7 @@ def test_generate_content assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::ToolConfig), request["tool_config"] assert_equal({}, request["labels"].to_h) assert_kind_of ::Google::Cloud::AIPlatform::V1::SafetySetting, request["safety_settings"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::ModelArmorConfig), request["model_armor_config"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::GenerationConfig), request["generation_config"] refute_nil options end @@ -937,31 +939,31 @@ def test_generate_content end # Use hash object - client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }) do |response, operation| + client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.generate_content model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config do |response, operation| + client.generate_content model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config) do |response, operation| + client.generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }, grpc_options) do |response, operation| + client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config), grpc_options) do |response, operation| + client.generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end @@ -987,6 +989,7 @@ def test_stream_generate_content tool_config = {} labels = {} safety_settings = [{}] + model_armor_config = {} generation_config = {} stream_generate_content_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| @@ -1001,6 +1004,7 @@ def test_stream_generate_content assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::ToolConfig), request["tool_config"] assert_equal({}, request["labels"].to_h) assert_kind_of ::Google::Cloud::AIPlatform::V1::SafetySetting, request["safety_settings"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::ModelArmorConfig), request["model_armor_config"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::GenerationConfig), request["generation_config"] refute_nil options end @@ -1012,7 +1016,7 @@ def test_stream_generate_content end # Use hash object - client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }) do |response, operation| + client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config }) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r @@ -1021,7 +1025,7 @@ def test_stream_generate_content end # Use named arguments - client.stream_generate_content model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config do |response, operation| + client.stream_generate_content model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r @@ -1030,7 +1034,7 @@ def test_stream_generate_content end # Use protobuf object - client.stream_generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config) do |response, operation| + client.stream_generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r @@ -1039,7 +1043,7 @@ def test_stream_generate_content end # Use hash object with options - client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }, grpc_options) do |response, operation| + client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config }, grpc_options) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r @@ -1048,7 +1052,7 @@ def test_stream_generate_content end # Use protobuf object with options - client.stream_generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config), grpc_options) do |response, operation| + client.stream_generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, cached_content: cached_content, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, model_armor_config: model_armor_config, generation_config: generation_config), grpc_options) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_service_paths_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_service_paths_test.rb index 70c5e2ad23a1..c045a6b2cde2 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_service_paths_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_service_paths_test.rb @@ -53,6 +53,18 @@ def test_location_path end end + def test_network_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" + assert_equal "projects/value0/regions/value1/networkAttachments/value2", path + end + end + def test_reasoning_engine_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do From fba45b4490dff1f45b64bb03700b320d2deace1c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 12:59:25 -0700 Subject: [PATCH 414/457] feat(run-v2): Support for worker pools (#30802) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 792236244 Source-Link: https://github.com/googleapis/googleapis/commit/0998e045cf83a1307ceb158e3da304bdaff5bb3a Source-Link: https://github.com/googleapis/googleapis-gen/commit/dd4d74cec8de2dff661f048ddc83782bbdb6c0dc Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJ1bi12Mi8uT3dsQm90LnlhbWwiLCJoIjoiZGQ0ZDc0Y2VjOGRlMmRmZjY2MWYwNDhkZGM4Mzc4MmJiZGI2YzBkYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- google-cloud-run-v2/.owlbot-manifest.json | 28 + google-cloud-run-v2/gapic_metadata.json | 49 + .../lib/google/cloud/run/v2.rb | 1 + .../lib/google/cloud/run/v2/build_pb.rb | 2 +- .../lib/google/cloud/run/v2/builds/paths.rb | 4 +- .../google/cloud/run/v2/instance_split_pb.rb | 46 + .../lib/google/cloud/run/v2/rest.rb | 1 + .../lib/google/cloud/run/v2/revision_pb.rb | 2 +- .../run/v2/revisions/rest/service_stub.rb | 21 + .../lib/google/cloud/run/v2/services/paths.rb | 38 +- .../google/cloud/run/v2/vendor_settings_pb.rb | 3 +- .../lib/google/cloud/run/v2/worker_pool_pb.rb | 70 + .../v2/worker_pool_revision_template_pb.rb | 51 + .../cloud/run/v2/worker_pool_services_pb.rb | 63 + .../lib/google/cloud/run/v2/worker_pools.rb | 56 + .../cloud/run/v2/worker_pools/client.rb | 1258 +++++++++++++++++ .../cloud/run/v2/worker_pools/credentials.rb | 47 + .../cloud/run/v2/worker_pools/operations.rb | 821 +++++++++++ .../google/cloud/run/v2/worker_pools/paths.rb | 218 +++ .../google/cloud/run/v2/worker_pools/rest.rb | 53 + .../cloud/run/v2/worker_pools/rest/client.rb | 1161 +++++++++++++++ .../run/v2/worker_pools/rest/operations.rb | 1082 ++++++++++++++ .../run/v2/worker_pools/rest/service_stub.rb | 573 ++++++++ .../google/cloud/run/v2/instance_split.rb | 71 + .../google/cloud/run/v2/vendor_settings.rb | 9 + .../google/cloud/run/v2/worker_pool.rb | 351 +++++ .../run/v2/worker_pool_revision_template.rb | 117 ++ .../snippet_metadata_google.cloud.run.v2.json | 320 +++++ .../worker_pools/create_worker_pool.rb | 54 + .../worker_pools/delete_worker_pool.rb | 54 + .../snippets/worker_pools/get_iam_policy.rb | 47 + .../snippets/worker_pools/get_worker_pool.rb | 47 + .../worker_pools/list_worker_pools.rb | 51 + .../snippets/worker_pools/set_iam_policy.rb | 47 + .../worker_pools/test_iam_permissions.rb | 47 + .../worker_pools/update_worker_pool.rb | 54 + .../google/cloud/run/v2/builds_paths_test.rb | 4 +- .../cloud/run/v2/services_paths_test.rb | 24 +- .../run/v2/worker_pools_operations_test.rb | 398 ++++++ .../cloud/run/v2/worker_pools_paths_test.rb | 154 ++ .../cloud/run/v2/worker_pools_rest_test.rb | 547 +++++++ .../google/cloud/run/v2/worker_pools_test.rb | 615 ++++++++ 42 files changed, 8621 insertions(+), 38 deletions(-) create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/instance_split_pb.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_pb.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_revision_template_pb.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_services_pb.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/client.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/credentials.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/operations.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/paths.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/client.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/operations.rb create mode 100644 google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/service_stub.rb create mode 100644 google-cloud-run-v2/proto_docs/google/cloud/run/v2/instance_split.rb create mode 100644 google-cloud-run-v2/proto_docs/google/cloud/run/v2/worker_pool.rb create mode 100644 google-cloud-run-v2/proto_docs/google/cloud/run/v2/worker_pool_revision_template.rb create mode 100644 google-cloud-run-v2/snippets/worker_pools/create_worker_pool.rb create mode 100644 google-cloud-run-v2/snippets/worker_pools/delete_worker_pool.rb create mode 100644 google-cloud-run-v2/snippets/worker_pools/get_iam_policy.rb create mode 100644 google-cloud-run-v2/snippets/worker_pools/get_worker_pool.rb create mode 100644 google-cloud-run-v2/snippets/worker_pools/list_worker_pools.rb create mode 100644 google-cloud-run-v2/snippets/worker_pools/set_iam_policy.rb create mode 100644 google-cloud-run-v2/snippets/worker_pools/test_iam_permissions.rb create mode 100644 google-cloud-run-v2/snippets/worker_pools/update_worker_pool.rb create mode 100644 google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_operations_test.rb create mode 100644 google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_paths_test.rb create mode 100644 google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_rest_test.rb create mode 100644 google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_test.rb diff --git a/google-cloud-run-v2/.owlbot-manifest.json b/google-cloud-run-v2/.owlbot-manifest.json index 03fa4d469226..af90040798d5 100644 --- a/google-cloud-run-v2/.owlbot-manifest.json +++ b/google-cloud-run-v2/.owlbot-manifest.json @@ -37,6 +37,7 @@ "lib/google/cloud/run/v2/executions/rest/client.rb", "lib/google/cloud/run/v2/executions/rest/operations.rb", "lib/google/cloud/run/v2/executions/rest/service_stub.rb", + "lib/google/cloud/run/v2/instance_split_pb.rb", "lib/google/cloud/run/v2/job_pb.rb", "lib/google/cloud/run/v2/job_services_pb.rb", "lib/google/cloud/run/v2/jobs.rb", @@ -87,6 +88,18 @@ "lib/google/cloud/run/v2/traffic_target_pb.rb", "lib/google/cloud/run/v2/vendor_settings_pb.rb", "lib/google/cloud/run/v2/version.rb", + "lib/google/cloud/run/v2/worker_pool_pb.rb", + "lib/google/cloud/run/v2/worker_pool_revision_template_pb.rb", + "lib/google/cloud/run/v2/worker_pool_services_pb.rb", + "lib/google/cloud/run/v2/worker_pools.rb", + "lib/google/cloud/run/v2/worker_pools/client.rb", + "lib/google/cloud/run/v2/worker_pools/credentials.rb", + "lib/google/cloud/run/v2/worker_pools/operations.rb", + "lib/google/cloud/run/v2/worker_pools/paths.rb", + "lib/google/cloud/run/v2/worker_pools/rest.rb", + "lib/google/cloud/run/v2/worker_pools/rest/client.rb", + "lib/google/cloud/run/v2/worker_pools/rest/operations.rb", + "lib/google/cloud/run/v2/worker_pools/rest/service_stub.rb", "proto_docs/README.md", "proto_docs/google/api/client.rb", "proto_docs/google/api/field_behavior.rb", @@ -97,6 +110,7 @@ "proto_docs/google/cloud/run/v2/condition.rb", "proto_docs/google/cloud/run/v2/execution.rb", "proto_docs/google/cloud/run/v2/execution_template.rb", + "proto_docs/google/cloud/run/v2/instance_split.rb", "proto_docs/google/cloud/run/v2/job.rb", "proto_docs/google/cloud/run/v2/k8s.min.rb", "proto_docs/google/cloud/run/v2/revision.rb", @@ -107,6 +121,8 @@ "proto_docs/google/cloud/run/v2/task_template.rb", "proto_docs/google/cloud/run/v2/traffic_target.rb", "proto_docs/google/cloud/run/v2/vendor_settings.rb", + "proto_docs/google/cloud/run/v2/worker_pool.rb", + "proto_docs/google/cloud/run/v2/worker_pool_revision_template.rb", "proto_docs/google/iam/v1/iam_policy.rb", "proto_docs/google/iam/v1/options.rb", "proto_docs/google/iam/v1/policy.rb", @@ -147,6 +163,14 @@ "snippets/snippet_metadata_google.cloud.run.v2.json", "snippets/tasks/get_task.rb", "snippets/tasks/list_tasks.rb", + "snippets/worker_pools/create_worker_pool.rb", + "snippets/worker_pools/delete_worker_pool.rb", + "snippets/worker_pools/get_iam_policy.rb", + "snippets/worker_pools/get_worker_pool.rb", + "snippets/worker_pools/list_worker_pools.rb", + "snippets/worker_pools/set_iam_policy.rb", + "snippets/worker_pools/test_iam_permissions.rb", + "snippets/worker_pools/update_worker_pool.rb", "test/google/cloud/run/v2/builds_paths_test.rb", "test/google/cloud/run/v2/builds_rest_test.rb", "test/google/cloud/run/v2/builds_test.rb", @@ -169,6 +193,10 @@ "test/google/cloud/run/v2/tasks_paths_test.rb", "test/google/cloud/run/v2/tasks_rest_test.rb", "test/google/cloud/run/v2/tasks_test.rb", + "test/google/cloud/run/v2/worker_pools_operations_test.rb", + "test/google/cloud/run/v2/worker_pools_paths_test.rb", + "test/google/cloud/run/v2/worker_pools_rest_test.rb", + "test/google/cloud/run/v2/worker_pools_test.rb", "test/helper.rb" ], "static": [ diff --git a/google-cloud-run-v2/gapic_metadata.json b/google-cloud-run-v2/gapic_metadata.json index 7b36705509e2..b23ee14f4b77 100644 --- a/google-cloud-run-v2/gapic_metadata.json +++ b/google-cloud-run-v2/gapic_metadata.json @@ -193,6 +193,55 @@ } } } + }, + "WorkerPools": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Run::V2::WorkerPools::Client", + "rpcs": { + "CreateWorkerPool": { + "methods": [ + "create_worker_pool" + ] + }, + "GetWorkerPool": { + "methods": [ + "get_worker_pool" + ] + }, + "ListWorkerPools": { + "methods": [ + "list_worker_pools" + ] + }, + "UpdateWorkerPool": { + "methods": [ + "update_worker_pool" + ] + }, + "DeleteWorkerPool": { + "methods": [ + "delete_worker_pool" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } } } } diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2.rb b/google-cloud-run-v2/lib/google/cloud/run/v2.rb index 7449e800f812..718d3f076530 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2.rb @@ -22,6 +22,7 @@ require "google/cloud/run/v2/revisions" require "google/cloud/run/v2/services" require "google/cloud/run/v2/tasks" +require "google/cloud/run/v2/worker_pools" require "google/cloud/run/v2/version" module Google diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/build_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/build_pb.rb index c845cc892d6c..f94c322b8450 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/build_pb.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/build_pb.rb @@ -11,7 +11,7 @@ require 'google/longrunning/operations_pb' -descriptor_data = "\n\x1fgoogle/cloud/run/v2/build.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\"\xba\x06\n\x12SubmitBuildRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x0estorage_source\x18\x02 \x01(\x0b\x32\".google.cloud.run.v2.StorageSourceB\x03\xe0\x41\x02H\x00\x12\x16\n\timage_uri\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12R\n\x0f\x62uildpack_build\x18\x04 \x01(\x0b\x32\x37.google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuildH\x01\x12K\n\x0c\x64ocker_build\x18\x05 \x01(\x0b\x32\x33.google.cloud.run.v2.SubmitBuildRequest.DockerBuildH\x01\x12\x1c\n\x0fservice_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0bworker_pool\x18\x07 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12\x11\n\x04tags\x18\x08 \x03(\tB\x03\xe0\x41\x01\x1a\r\n\x0b\x44ockerBuild\x1a\xf7\x02\n\x0f\x42uildpacksBuild\x12\x13\n\x07runtime\x18\x01 \x01(\tB\x02\x18\x01\x12\x1c\n\x0f\x66unction_target\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63\x61\x63he_image_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nbase_image\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12u\n\x15\x65nvironment_variables\x18\x05 \x03(\x0b\x32Q.google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild.EnvironmentVariablesEntryB\x03\xe0\x41\x01\x12%\n\x18\x65nable_automatic_updates\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12project_descriptor\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06sourceB\x0c\n\nbuild_type\"\x81\x01\n\x13SubmitBuildResponse\x12\x36\n\x0f\x62uild_operation\x18\x01 \x01(\x0b\x32\x1d.google.longrunning.Operation\x12\x16\n\x0e\x62\x61se_image_uri\x18\x02 \x01(\t\x12\x1a\n\x12\x62\x61se_image_warning\x18\x03 \x01(\t\"R\n\rStorageSource\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06object\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x32\xf1\x01\n\x06\x42uilds\x12\x9e\x01\n\x0bSubmitBuild\x12\'.google.cloud.run.v2.SubmitBuildRequest\x1a(.google.cloud.run.v2.SubmitBuildResponse\"<\x82\xd3\xe4\x93\x02\x36\"1/v2/{parent=projects/*/locations/*}/builds:submit:\x01*\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbe\x01\n\x17\x63om.google.cloud.run.v2B\nBuildProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpb\xea\x41i\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}b\x06proto3" +descriptor_data = "\n\x1fgoogle/cloud/run/v2/build.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\"\xbf\x06\n\x12SubmitBuildRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x0estorage_source\x18\x02 \x01(\x0b\x32\".google.cloud.run.v2.StorageSourceB\x03\xe0\x41\x02H\x00\x12\x16\n\timage_uri\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12R\n\x0f\x62uildpack_build\x18\x04 \x01(\x0b\x32\x37.google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuildH\x01\x12K\n\x0c\x64ocker_build\x18\x05 \x01(\x0b\x32\x33.google.cloud.run.v2.SubmitBuildRequest.DockerBuildH\x01\x12\x1c\n\x0fservice_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x0bworker_pool\x18\x07 \x01(\tB1\xe0\x41\x01\xfa\x41+\n)cloudbuild.googleapis.com/BuildWorkerPool\x12\x11\n\x04tags\x18\x08 \x03(\tB\x03\xe0\x41\x01\x1a\r\n\x0b\x44ockerBuild\x1a\xf7\x02\n\x0f\x42uildpacksBuild\x12\x13\n\x07runtime\x18\x01 \x01(\tB\x02\x18\x01\x12\x1c\n\x0f\x66unction_target\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63\x61\x63he_image_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nbase_image\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12u\n\x15\x65nvironment_variables\x18\x05 \x03(\x0b\x32Q.google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild.EnvironmentVariablesEntryB\x03\xe0\x41\x01\x12%\n\x18\x65nable_automatic_updates\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12project_descriptor\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06sourceB\x0c\n\nbuild_type\"\x81\x01\n\x13SubmitBuildResponse\x12\x36\n\x0f\x62uild_operation\x18\x01 \x01(\x0b\x32\x1d.google.longrunning.Operation\x12\x16\n\x0e\x62\x61se_image_uri\x18\x02 \x01(\t\x12\x1a\n\x12\x62\x61se_image_warning\x18\x03 \x01(\t\"R\n\rStorageSource\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06object\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x32\xf1\x01\n\x06\x42uilds\x12\x9e\x01\n\x0bSubmitBuild\x12\'.google.cloud.run.v2.SubmitBuildRequest\x1a(.google.cloud.run.v2.SubmitBuildResponse\"<\x82\xd3\xe4\x93\x02\x36\"1/v2/{parent=projects/*/locations/*}/builds:submit:\x01*\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc3\x01\n\x17\x63om.google.cloud.run.v2B\nBuildProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpb\xea\x41n\n)cloudbuild.googleapis.com/BuildWorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/builds/paths.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/builds/paths.rb index bf5e16a3f888..6df70c05de67 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/builds/paths.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/builds/paths.rb @@ -25,7 +25,7 @@ module Builds # Path helper methods for the Builds API. module Paths ## - # Create a fully-qualified WorkerPool resource string. + # Create a fully-qualified BuildWorkerPool resource string. # # The resource will be in the following format: # @@ -36,7 +36,7 @@ module Paths # @param worker_pool [String] # # @return [::String] - def worker_pool_path project:, location:, worker_pool: + def build_worker_pool_path project:, location:, worker_pool: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/instance_split_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/instance_split_pb.rb new file mode 100644 index 000000000000..cbab910bac72 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/instance_split_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/run/v2/instance_split.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n(google/cloud/run/v2/instance_split.proto\x12\x13google.cloud.run.v2\x1a\x19google/api/resource.proto\"\x94\x01\n\rInstanceSplit\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.cloud.run.v2.InstanceSplitAllocationType\x12\x32\n\x08revision\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1brun.googleapis.com/Revision\x12\x0f\n\x07percent\x18\x03 \x01(\x05\"\x9a\x01\n\x13InstanceSplitStatus\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.cloud.run.v2.InstanceSplitAllocationType\x12\x32\n\x08revision\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1brun.googleapis.com/Revision\x12\x0f\n\x07percent\x18\x03 \x01(\x05*\xa5\x01\n\x1bInstanceSplitAllocationType\x12.\n*INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED\x10\x00\x12)\n%INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST\x10\x01\x12+\n\'INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION\x10\x02\x42Z\n\x17\x63om.google.cloud.run.v2B\x12InstanceSplitProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Run + module V2 + InstanceSplit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.InstanceSplit").msgclass + InstanceSplitStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.InstanceSplitStatus").msgclass + InstanceSplitAllocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.InstanceSplitAllocationType").enummodule + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/rest.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/rest.rb index 554087cb47b1..7aae9b1ed55b 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/rest.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/rest.rb @@ -22,6 +22,7 @@ require "google/cloud/run/v2/revisions/rest" require "google/cloud/run/v2/services/rest" require "google/cloud/run/v2/tasks/rest" +require "google/cloud/run/v2/worker_pools/rest" require "google/cloud/run/v2/version" module Google diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/revision_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/revision_pb.rb index 53dd7e135165..2a9bfc88586c 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/revision_pb.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/revision_pb.rb @@ -19,7 +19,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n\"google/cloud/run/v2/revision.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a#google/cloud/run/v2/condition.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a google/cloud/run/v2/status.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"G\n\x12GetRevisionRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1brun.googleapis.com/Revision\"\x88\x01\n\x14ListRevisionsRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1brun.googleapis.com/Revision\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"b\n\x15ListRevisionsResponse\x12\x30\n\trevisions\x18\x01 \x03(\x0b\x32\x1d.google.cloud.run.v2.Revision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x15\x44\x65leteRevisionRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1brun.googleapis.com/Revision\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\xcb\x0e\n\x08Revision\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12>\n\x06labels\x18\x04 \x03(\x0b\x32).google.cloud.run.v2.Revision.LabelsEntryB\x03\xe0\x41\x03\x12H\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32..google.cloud.run.v2.Revision.AnnotationsEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x0claunch_stage\x18\n \x01(\x0e\x32\x17.google.api.LaunchStage\x12\x33\n\x07service\x18\x0b \x01(\tB\"\xe0\x41\x03\xfa\x41\x1c\n\x1arun.googleapis.com/Service\x12\x35\n\x07scaling\x18\x0c \x01(\x0b\x32$.google.cloud.run.v2.RevisionScaling\x12\x32\n\nvpc_access\x18\r \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccess\x12(\n max_instance_request_concurrency\x18\" \x01(\x05\x12*\n\x07timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fservice_account\x18\x10 \x01(\t\x12\x32\n\ncontainers\x18\x11 \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12,\n\x07volumes\x18\x12 \x03(\x0b\x32\x1b.google.cloud.run.v2.Volume\x12H\n\x15\x65xecution_environment\x18\x14 \x01(\x0e\x32).google.cloud.run.v2.ExecutionEnvironment\x12>\n\x0e\x65ncryption_key\x18\x15 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x36\n\x0cservice_mesh\x18\x16 \x01(\x0b\x32 .google.cloud.run.v2.ServiceMesh\x12\\\n encryption_key_revocation_action\x18\x17 \x01(\x0e\x32\x32.google.cloud.run.v2.EncryptionKeyRevocationAction\x12\x43\n encryption_key_shutdown_duration\x18\x18 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x0breconciling\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x1f \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12 \n\x13observed_generation\x18 \x01(\x03\x42\x03\xe0\x41\x03\x12\x14\n\x07log_uri\x18! \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18% \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x10session_affinity\x18& \x01(\x08\x12G\n\x0escaling_status\x18\' \x01(\x0b\x32*.google.cloud.run.v2.RevisionScalingStatusB\x03\xe0\x41\x03\x12\x38\n\rnode_selector\x18( \x01(\x0b\x32!.google.cloud.run.v2.NodeSelector\x12\x32\n\x1dgpu_zonal_redundancy_disabled\x18\x30 \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x03H\x00\x88\x01\x01\x12\x14\n\x07\x63reator\x18\x31 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1brun.googleapis.com/Revision\x12Oprojects/{project}/locations/{location}/services/{service}/revisions/{revision}R\x01\x01\x42 \n\x1e_gpu_zonal_redundancy_disabled2\x85\x06\n\tRevisions\x12\xd2\x01\n\x0bGetRevision\x12\'.google.cloud.run.v2.GetRevisionRequest\x1a\x1d.google.cloud.run.v2.Revision\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/locations/*/services/*/revisions/*}\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\x12\xe7\x01\n\rListRevisions\x12).google.cloud.run.v2.ListRevisionsRequest\x1a*.google.cloud.run.v2.ListRevisionsResponse\"\x7f\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/locations/*/services/*}/revisions\x8a\xd3\xe4\x93\x02\x30\x12.\n\x06parent\x12$projects/*/locations/{location=*}/**\x12\xf0\x01\n\x0e\x44\x65leteRevision\x12*.google.cloud.run.v2.DeleteRevisionRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x14\n\x08Revision\x12\x08Revision\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v2/{name=projects/*/locations/*/services/*/revisions/*}\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBU\n\x17\x63om.google.cloud.run.v2B\rRevisionProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" +descriptor_data = "\n\"google/cloud/run/v2/revision.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a#google/cloud/run/v2/condition.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a google/cloud/run/v2/status.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"G\n\x12GetRevisionRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1brun.googleapis.com/Revision\"\x88\x01\n\x14ListRevisionsRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1brun.googleapis.com/Revision\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"b\n\x15ListRevisionsResponse\x12\x30\n\trevisions\x18\x01 \x03(\x0b\x32\x1d.google.cloud.run.v2.Revision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x15\x44\x65leteRevisionRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1brun.googleapis.com/Revision\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\xcb\x0e\n\x08Revision\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12>\n\x06labels\x18\x04 \x03(\x0b\x32).google.cloud.run.v2.Revision.LabelsEntryB\x03\xe0\x41\x03\x12H\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32..google.cloud.run.v2.Revision.AnnotationsEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x0claunch_stage\x18\n \x01(\x0e\x32\x17.google.api.LaunchStage\x12\x33\n\x07service\x18\x0b \x01(\tB\"\xe0\x41\x03\xfa\x41\x1c\n\x1arun.googleapis.com/Service\x12\x35\n\x07scaling\x18\x0c \x01(\x0b\x32$.google.cloud.run.v2.RevisionScaling\x12\x32\n\nvpc_access\x18\r \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccess\x12(\n max_instance_request_concurrency\x18\" \x01(\x05\x12*\n\x07timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fservice_account\x18\x10 \x01(\t\x12\x32\n\ncontainers\x18\x11 \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12,\n\x07volumes\x18\x12 \x03(\x0b\x32\x1b.google.cloud.run.v2.Volume\x12H\n\x15\x65xecution_environment\x18\x14 \x01(\x0e\x32).google.cloud.run.v2.ExecutionEnvironment\x12>\n\x0e\x65ncryption_key\x18\x15 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x36\n\x0cservice_mesh\x18\x16 \x01(\x0b\x32 .google.cloud.run.v2.ServiceMesh\x12\\\n encryption_key_revocation_action\x18\x17 \x01(\x0e\x32\x32.google.cloud.run.v2.EncryptionKeyRevocationAction\x12\x43\n encryption_key_shutdown_duration\x18\x18 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x0breconciling\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x1f \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12 \n\x13observed_generation\x18 \x01(\x03\x42\x03\xe0\x41\x03\x12\x14\n\x07log_uri\x18! \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18% \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x10session_affinity\x18& \x01(\x08\x12G\n\x0escaling_status\x18\' \x01(\x0b\x32*.google.cloud.run.v2.RevisionScalingStatusB\x03\xe0\x41\x03\x12\x38\n\rnode_selector\x18( \x01(\x0b\x32!.google.cloud.run.v2.NodeSelector\x12\x32\n\x1dgpu_zonal_redundancy_disabled\x18\x30 \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x03H\x00\x88\x01\x01\x12\x14\n\x07\x63reator\x18\x31 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1brun.googleapis.com/Revision\x12Oprojects/{project}/locations/{location}/services/{service}/revisions/{revision}R\x01\x01\x42 \n\x1e_gpu_zonal_redundancy_disabled2\xc4\x07\n\tRevisions\x12\x92\x02\n\x0bGetRevision\x12\'.google.cloud.run.v2.GetRevisionRequest\x1a\x1d.google.cloud.run.v2.Revision\"\xba\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02y\x12\x38/v2/{name=projects/*/locations/*/services/*/revisions/*}Z=\x12;/v2/{name=projects/*/locations/*/workerPools/*/revisions/*}\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\x12\xa7\x02\n\rListRevisions\x12).google.cloud.run.v2.ListRevisionsRequest\x1a*.google.cloud.run.v2.ListRevisionsResponse\"\xbe\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12\x38/v2/{parent=projects/*/locations/*/services/*}/revisionsZ=\x12;/v2/{parent=projects/*/locations/*/workerPools/*}/revisions\x8a\xd3\xe4\x93\x02\x30\x12.\n\x06parent\x12$projects/*/locations/{location=*}/**\x12\xaf\x02\n\x0e\x44\x65leteRevision\x12*.google.cloud.run.v2.DeleteRevisionRequest\x1a\x1d.google.longrunning.Operation\"\xd1\x01\xca\x41\x14\n\x08Revision\x12\x08Revision\xda\x41\x04name\x82\xd3\xe4\x93\x02y*8/v2/{name=projects/*/locations/*/services/*/revisions/*}Z=*;/v2/{name=projects/*/locations/*/workerPools/*/revisions/*}\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBU\n\x17\x63om.google.cloud.run.v2B\rRevisionProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/revisions/rest/service_stub.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/revisions/rest/service_stub.rb index 03de8818f6e8..f9f300efce61 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/revisions/rest/service_stub.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/revisions/rest/service_stub.rb @@ -211,6 +211,13 @@ def self.transcode_get_revision_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/revisions/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/revisions/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -232,6 +239,13 @@ def self.transcode_list_revisions_request request_pb ["parent", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/revisions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -253,6 +267,13 @@ def self.transcode_delete_revision_request request_pb ["name", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/revisions/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/revisions/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/services/paths.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/services/paths.rb index ab8a0b0b438b..9057ea32a444 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/services/paths.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/services/paths.rb @@ -43,6 +43,25 @@ def build_path project:, location:, build: "projects/#{project}/locations/#{location}/builds/#{build}" end + ## + # Create a fully-qualified BuildWorkerPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workerPools/{worker_pool}` + # + # @param project [String] + # @param location [String] + # @param worker_pool [String] + # + # @return [::String] + def build_worker_pool_path project:, location:, worker_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workerPools/#{worker_pool}" + end + ## # Create a fully-qualified Connector resource string. # @@ -228,25 +247,6 @@ def service_path project:, location:, service: "projects/#{project}/locations/#{location}/services/#{service}" end - ## - # Create a fully-qualified WorkerPool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workerPools/{worker_pool}` - # - # @param project [String] - # @param location [String] - # @param worker_pool [String] - # - # @return [::String] - def worker_pool_path project:, location:, worker_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workerPools/#{worker_pool}" - end - extend self end end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/vendor_settings_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/vendor_settings_pb.rb index 93ac50f17866..54c33cc5ca4c 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/vendor_settings_pb.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/vendor_settings_pb.rb @@ -8,7 +8,7 @@ require 'google/api/resource_pb' -descriptor_data = "\n)google/cloud/run/v2/vendor_settings.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x81\x03\n\tVpcAccess\x12:\n\tconnector\x18\x01 \x01(\tB\'\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\x12=\n\x06\x65gress\x18\x02 \x01(\x0e\x32(.google.cloud.run.v2.VpcAccess.VpcEgressB\x03\xe0\x41\x01\x12P\n\x12network_interfaces\x18\x03 \x03(\x0b\x32/.google.cloud.run.v2.VpcAccess.NetworkInterfaceB\x03\xe0\x41\x01\x1aT\n\x10NetworkInterface\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x03 \x03(\tB\x03\xe0\x41\x01\"Q\n\tVpcEgress\x12\x1a\n\x16VPC_EGRESS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x01\x12\x17\n\x13PRIVATE_RANGES_ONLY\x10\x02\"\xb0\x01\n\x13\x42inaryAuthorization\x12\x1a\n\x0buse_default\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12\x43\n\x06policy\x18\x03 \x01(\tB1\xe0\x41\x01\xfa\x41+\n)binaryauthorization.googleapis.com/PolicyH\x00\x12%\n\x18\x62reakglass_justification\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0f\x62inauthz_method\"S\n\x0fRevisionScaling\x12\x1f\n\x12min_instance_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1f\n\x12max_instance_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"E\n\x0bServiceMesh\x12\x36\n\x04mesh\x18\x01 \x01(\tB(\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\x88\x02\n\x0eServiceScaling\x12\x1f\n\x12min_instance_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x0cscaling_mode\x18\x03 \x01(\x0e\x32/.google.cloud.run.v2.ServiceScaling.ScalingModeB\x03\xe0\x41\x01\x12\'\n\x15manual_instance_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\"F\n\x0bScalingMode\x12\x1c\n\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\x42\x18\n\x16_manual_instance_count\"(\n\x0cNodeSelector\x12\x18\n\x0b\x61\x63\x63\x65lerator\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xd1\x03\n\x0b\x42uildConfig\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\x0fsource_location\x18\x02 \x01(\t\x12\x1c\n\x0f\x66unction_target\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nbase_image\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x65nable_automatic_updates\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x41\n\x0bworker_pool\x18\x07 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12^\n\x15\x65nvironment_variables\x18\x08 \x03(\x0b\x32:.google.cloud.run.v2.BuildConfig.EnvironmentVariablesEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\t \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*\xb3\x01\n\x0eIngressTraffic\x12\x1f\n\x1bINGRESS_TRAFFIC_UNSPECIFIED\x10\x00\x12\x17\n\x13INGRESS_TRAFFIC_ALL\x10\x01\x12!\n\x1dINGRESS_TRAFFIC_INTERNAL_ONLY\x10\x02\x12*\n&INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER\x10\x03\x12\x18\n\x14INGRESS_TRAFFIC_NONE\x10\x04*}\n\x14\x45xecutionEnvironment\x12%\n!EXECUTION_ENVIRONMENT_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x45XECUTION_ENVIRONMENT_GEN1\x10\x01\x12\x1e\n\x1a\x45XECUTION_ENVIRONMENT_GEN2\x10\x02*p\n\x1d\x45ncryptionKeyRevocationAction\x12\x30\n,ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPREVENT_NEW\x10\x01\x12\x0c\n\x08SHUTDOWN\x10\x02\x42\xfc\x02\n\x17\x63om.google.cloud.run.v2B\x13VendorSettingsProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpb\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\xea\x41\\\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}\xea\x41Y\n\x1f\x63loudbuild.googleapis.com/Build\x12\x36projects/{project}/locations/{location}/builds/{build}b\x06proto3" +descriptor_data = "\n)google/cloud/run/v2/vendor_settings.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x81\x03\n\tVpcAccess\x12:\n\tconnector\x18\x01 \x01(\tB\'\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\x12=\n\x06\x65gress\x18\x02 \x01(\x0e\x32(.google.cloud.run.v2.VpcAccess.VpcEgressB\x03\xe0\x41\x01\x12P\n\x12network_interfaces\x18\x03 \x03(\x0b\x32/.google.cloud.run.v2.VpcAccess.NetworkInterfaceB\x03\xe0\x41\x01\x1aT\n\x10NetworkInterface\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x03 \x03(\tB\x03\xe0\x41\x01\"Q\n\tVpcEgress\x12\x1a\n\x16VPC_EGRESS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x01\x12\x17\n\x13PRIVATE_RANGES_ONLY\x10\x02\"\xb0\x01\n\x13\x42inaryAuthorization\x12\x1a\n\x0buse_default\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12\x43\n\x06policy\x18\x03 \x01(\tB1\xe0\x41\x01\xfa\x41+\n)binaryauthorization.googleapis.com/PolicyH\x00\x12%\n\x18\x62reakglass_justification\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0f\x62inauthz_method\"S\n\x0fRevisionScaling\x12\x1f\n\x12min_instance_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1f\n\x12max_instance_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"E\n\x0bServiceMesh\x12\x36\n\x04mesh\x18\x01 \x01(\tB(\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\x88\x02\n\x0eServiceScaling\x12\x1f\n\x12min_instance_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x0cscaling_mode\x18\x03 \x01(\x0e\x32/.google.cloud.run.v2.ServiceScaling.ScalingModeB\x03\xe0\x41\x01\x12\'\n\x15manual_instance_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\"F\n\x0bScalingMode\x12\x1c\n\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\x42\x18\n\x16_manual_instance_count\"V\n\x11WorkerPoolScaling\x12\'\n\x15manual_instance_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x18\n\x16_manual_instance_count\"(\n\x0cNodeSelector\x12\x18\n\x0b\x61\x63\x63\x65lerator\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xd6\x03\n\x0b\x42uildConfig\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\x0fsource_location\x18\x02 \x01(\t\x12\x1c\n\x0f\x66unction_target\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nbase_image\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x65nable_automatic_updates\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x46\n\x0bworker_pool\x18\x07 \x01(\tB1\xe0\x41\x01\xfa\x41+\n)cloudbuild.googleapis.com/BuildWorkerPool\x12^\n\x15\x65nvironment_variables\x18\x08 \x03(\x0b\x32:.google.cloud.run.v2.BuildConfig.EnvironmentVariablesEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\t \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*\xb3\x01\n\x0eIngressTraffic\x12\x1f\n\x1bINGRESS_TRAFFIC_UNSPECIFIED\x10\x00\x12\x17\n\x13INGRESS_TRAFFIC_ALL\x10\x01\x12!\n\x1dINGRESS_TRAFFIC_INTERNAL_ONLY\x10\x02\x12*\n&INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER\x10\x03\x12\x18\n\x14INGRESS_TRAFFIC_NONE\x10\x04*}\n\x14\x45xecutionEnvironment\x12%\n!EXECUTION_ENVIRONMENT_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x45XECUTION_ENVIRONMENT_GEN1\x10\x01\x12\x1e\n\x1a\x45XECUTION_ENVIRONMENT_GEN2\x10\x02*p\n\x1d\x45ncryptionKeyRevocationAction\x12\x30\n,ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPREVENT_NEW\x10\x01\x12\x0c\n\x08SHUTDOWN\x10\x02\x42\xfc\x02\n\x17\x63om.google.cloud.run.v2B\x13VendorSettingsProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpb\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\xea\x41\\\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}\xea\x41Y\n\x1f\x63loudbuild.googleapis.com/Build\x12\x36projects/{project}/locations/{location}/builds/{build}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -46,6 +46,7 @@ module V2 ServiceMesh = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ServiceMesh").msgclass ServiceScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ServiceScaling").msgclass ServiceScaling::ScalingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ServiceScaling.ScalingMode").enummodule + WorkerPoolScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.WorkerPoolScaling").msgclass NodeSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.NodeSelector").msgclass BuildConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.BuildConfig").msgclass IngressTraffic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.IngressTraffic").enummodule diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_pb.rb new file mode 100644 index 000000000000..c5dd0306fee1 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_pb.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/run/v2/worker_pool.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/launch_stage_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/cloud/run/v2/condition_pb' +require 'google/cloud/run/v2/instance_split_pb' +require 'google/cloud/run/v2/vendor_settings_pb' +require 'google/cloud/run/v2/worker_pool_revision_template_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n%google/cloud/run/v2/worker_pool.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a#google/cloud/run/v2/condition.proto\x1a(google/cloud/run/v2/instance_split.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x37google/cloud/run/v2/worker_pool_revision_template.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\x17\x43reateWorkerPoolRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1drun.googleapis.com/WorkerPool\x12\x39\n\x0bworker_pool\x18\x02 \x01(\x0b\x32\x1f.google.cloud.run.v2.WorkerPoolB\x03\xe0\x41\x02\x12\x1b\n\x0eworker_pool_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe3\x01\n\x17UpdateWorkerPoolRequest\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x39\n\x0bworker_pool\x18\x01 \x01(\x0b\x32\x1f.google.cloud.run.v2.WorkerPoolB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x66orce_new_revision\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x8c\x01\n\x16ListWorkerPoolsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1drun.googleapis.com/WorkerPool\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"i\n\x17ListWorkerPoolsResponse\x12\x35\n\x0cworker_pools\x18\x01 \x03(\x0b\x32\x1f.google.cloud.run.v2.WorkerPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetWorkerPoolRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1drun.googleapis.com/WorkerPool\"x\n\x17\x44\x65leteWorkerPoolRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1drun.googleapis.com/WorkerPool\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\xa3\x0c\n\nWorkerPool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12@\n\x06labels\x18\x05 \x03(\x0b\x32+.google.cloud.run.v2.WorkerPool.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32\x30.google.cloud.run.v2.WorkerPool.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x07\x63reator\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rlast_modifier\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06\x63lient\x18\r \x01(\t\x12\x16\n\x0e\x63lient_version\x18\x0e \x01(\t\x12\x32\n\x0claunch_stage\x18\x10 \x01(\x0e\x32\x17.google.api.LaunchStageB\x03\xe0\x41\x01\x12K\n\x14\x62inary_authorization\x18\x11 \x01(\x0b\x32(.google.cloud.run.v2.BinaryAuthorizationB\x03\xe0\x41\x01\x12\x46\n\x08template\x18\x12 \x01(\x0b\x32/.google.cloud.run.v2.WorkerPoolRevisionTemplateB\x03\xe0\x41\x02\x12@\n\x0finstance_splits\x18\x1a \x03(\x0b\x32\".google.cloud.run.v2.InstanceSplitB\x03\xe0\x41\x01\x12<\n\x07scaling\x18\x14 \x01(\x0b\x32&.google.cloud.run.v2.WorkerPoolScalingB\x03\xe0\x41\x01\x12 \n\x13observed_generation\x18\x1e \x01(\x03\x42\x03\xe0\x41\x03\x12?\n\x12terminal_condition\x18\x1f \x01(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12\x37\n\nconditions\x18 \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12\x42\n\x15latest_ready_revision\x18! \x01(\tB#\xe0\x41\x03\xfa\x41\x1d\n\x1brun.googleapis.com/Revision\x12\x44\n\x17latest_created_revision\x18\" \x01(\tB#\xe0\x41\x03\xfa\x41\x1d\n\x1brun.googleapis.com/Revision\x12N\n\x17instance_split_statuses\x18\x1b \x03(\x0b\x32(.google.cloud.run.v2.InstanceSplitStatusB\x03\xe0\x41\x03\x12\x18\n\x10\x63ustom_audiences\x18% \x03(\t\x12\x1a\n\rsatisfies_pzs\x18& \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x62 \x01(\x08\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x81\x01\xea\x41~\n\x1drun.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}*\x0bworkerPools2\nworkerPoolR\x01\x01\x32\xbe\x0e\n\x0bWorkerPools\x12\x98\x02\n\x10\x43reateWorkerPool\x12,.google.cloud.run.v2.CreateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41\x18\n\nWorkerPool\x12\nWorkerPool\xda\x41!parent,worker_pool,worker_pool_id\x82\xd3\xe4\x93\x02>\"//v2/{parent=projects/*/locations/*}/workerPools:\x0bworker_pool\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xcf\x01\n\rGetWorkerPool\x12).google.cloud.run.v2.GetWorkerPoolRequest\x1a\x1f.google.cloud.run.v2.WorkerPool\"r\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\x12\xe1\x01\n\x0fListWorkerPools\x12+.google.cloud.run.v2.ListWorkerPoolsRequest\x1a,.google.cloud.run.v2.ListWorkerPoolsResponse\"s\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2/{parent=projects/*/locations/*}/workerPools\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xb5\x02\n\x10UpdateWorkerPool\x12,.google.cloud.run.v2.UpdateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xd3\x01\xca\x41\x18\n\nWorkerPool\x12\nWorkerPool\xda\x41\x0bworker_pool\xda\x41\x17worker_pool,update_mask\x82\xd3\xe4\x93\x02J2;/v2/{worker_pool.name=projects/*/locations/*/workerPools/*}:\x0bworker_pool\x8a\xd3\xe4\x93\x02:\x12\x38\n\x10worker_pool.name\x12$projects/*/locations/{location=*}/**\x12\xef\x01\n\x10\x44\x65leteWorkerPool\x12,.google.cloud.run.v2.DeleteWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x18\n\nWorkerPool\x12\nWorkerPool\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\x12\x93\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"H\x82\xd3\xe4\x93\x02\x42\x12@/v2/{resource=projects/*/locations/*/workerPools/*}:getIamPolicy\x12\x96\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"K\x82\xd3\xe4\x93\x02\x45\"@/v2/{resource=projects/*/locations/*/workerPools/*}:setIamPolicy:\x01*\x12\xbc\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"Q\x82\xd3\xe4\x93\x02K\"F/v2/{resource=projects/*/locations/*/workerPools/*}:testIamPermissions:\x01*\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBW\n\x17\x63om.google.cloud.run.v2B\x0fWorkerPoolProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.run.v2.BinaryAuthorization", "google/cloud/run/v2/vendor_settings.proto"], + ["google.cloud.run.v2.WorkerPoolRevisionTemplate", "google/cloud/run/v2/worker_pool_revision_template.proto"], + ["google.cloud.run.v2.InstanceSplit", "google/cloud/run/v2/instance_split.proto"], + ["google.cloud.run.v2.Condition", "google/cloud/run/v2/condition.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Run + module V2 + CreateWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.CreateWorkerPoolRequest").msgclass + UpdateWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.UpdateWorkerPoolRequest").msgclass + ListWorkerPoolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ListWorkerPoolsRequest").msgclass + ListWorkerPoolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ListWorkerPoolsResponse").msgclass + GetWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.GetWorkerPoolRequest").msgclass + DeleteWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.DeleteWorkerPoolRequest").msgclass + WorkerPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.WorkerPool").msgclass + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_revision_template_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_revision_template_pb.rb new file mode 100644 index 000000000000..692bcf2b7471 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_revision_template_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/run/v2/worker_pool_revision_template.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/run/v2/k8s.min_pb' +require 'google/cloud/run/v2/vendor_settings_pb' +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n7google/cloud/run/v2/worker_pool_revision_template.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\"\x8b\x07\n\x1aWorkerPoolRevisionTemplate\x12\x35\n\x08revision\x18\x01 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1brun.googleapis.com/Revision\x12P\n\x06labels\x18\x02 \x03(\x0b\x32;.google.cloud.run.v2.WorkerPoolRevisionTemplate.LabelsEntryB\x03\xe0\x41\x01\x12Z\n\x0b\x61nnotations\x18\x03 \x03(\x0b\x32@.google.cloud.run.v2.WorkerPoolRevisionTemplate.AnnotationsEntryB\x03\xe0\x41\x01\x12\x37\n\nvpc_access\x18\x04 \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccessB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\ncontainers\x18\x06 \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12\x31\n\x07volumes\x18\x07 \x03(\x0b\x32\x1b.google.cloud.run.v2.VolumeB\x03\xe0\x41\x01\x12>\n\x0e\x65ncryption_key\x18\x08 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12;\n\x0cservice_mesh\x18\t \x01(\x0b\x32 .google.cloud.run.v2.ServiceMeshB\x03\xe0\x41\x01\x12\x61\n encryption_key_revocation_action\x18\n \x01(\x0e\x32\x32.google.cloud.run.v2.EncryptionKeyRevocationActionB\x03\xe0\x41\x01\x12H\n encryption_key_shutdown_duration\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12=\n\rnode_selector\x18\r \x01(\x0b\x32!.google.cloud.run.v2.NodeSelectorB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42g\n\x17\x63om.google.cloud.run.v2B\x1fWorkerPoolRevisionTemplateProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.run.v2.VpcAccess", "google/cloud/run/v2/vendor_settings.proto"], + ["google.cloud.run.v2.Container", "google/cloud/run/v2/k8s.min.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Run + module V2 + WorkerPoolRevisionTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.WorkerPoolRevisionTemplate").msgclass + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_services_pb.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_services_pb.rb new file mode 100644 index 000000000000..b73bf12a7b0b --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pool_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/run/v2/worker_pool.proto for package 'google.cloud.run.v2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/worker_pool_pb' + +module Google + module Cloud + module Run + module V2 + module WorkerPools + # Cloud Run WorkerPool Control Plane API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.run.v2.WorkerPools' + + # Creates a new WorkerPool in a given project and location. + rpc :CreateWorkerPool, ::Google::Cloud::Run::V2::CreateWorkerPoolRequest, ::Google::Longrunning::Operation + # Gets information about a WorkerPool. + rpc :GetWorkerPool, ::Google::Cloud::Run::V2::GetWorkerPoolRequest, ::Google::Cloud::Run::V2::WorkerPool + # Lists WorkerPools. Results are sorted by creation time, descending. + rpc :ListWorkerPools, ::Google::Cloud::Run::V2::ListWorkerPoolsRequest, ::Google::Cloud::Run::V2::ListWorkerPoolsResponse + # Updates a WorkerPool. + rpc :UpdateWorkerPool, ::Google::Cloud::Run::V2::UpdateWorkerPoolRequest, ::Google::Longrunning::Operation + # Deletes a WorkerPool. + rpc :DeleteWorkerPool, ::Google::Cloud::Run::V2::DeleteWorkerPoolRequest, ::Google::Longrunning::Operation + # Gets the IAM Access Control policy currently in effect for the given + # Cloud Run WorkerPool. This result does not include any inherited policies. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the IAM Access control policy for the specified WorkerPool. Overwrites + # any existing policy. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that a caller has on the specified Project. + # + # There are no permissions required for making this API call. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools.rb new file mode 100644 index 000000000000..c9ec88747651 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/version" + +require "google/cloud/run/v2/worker_pools/credentials" +require "google/cloud/run/v2/worker_pools/paths" +require "google/cloud/run/v2/worker_pools/operations" +require "google/cloud/run/v2/worker_pools/client" +require "google/cloud/run/v2/worker_pools/rest" + +module Google + module Cloud + module Run + module V2 + ## + # Cloud Run WorkerPool Control Plane API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/run/v2/worker_pools" + # client = ::Google::Cloud::Run::V2::WorkerPools::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/run/v2/worker_pools/rest" + # client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + module WorkerPools + end + end + end + end +end + +helper_path = ::File.join __dir__, "worker_pools", "helpers.rb" +require "google/cloud/run/v2/worker_pools/helpers" if ::File.file? helper_path diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/client.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/client.rb new file mode 100644 index 000000000000..c04e5a001392 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/client.rb @@ -0,0 +1,1258 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/worker_pool_pb" +require "google/cloud/location" + +module Google + module Cloud + module Run + module V2 + module WorkerPools + ## + # Client for the WorkerPools service. + # + # Cloud Run WorkerPool Control Plane API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "run.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :worker_pools_stub + + ## + # Configure the WorkerPools Client class. + # + # See {::Google::Cloud::Run::V2::WorkerPools::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WorkerPools clients + # ::Google::Cloud::Run::V2::WorkerPools::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", "Run", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the WorkerPools 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::Run::V2::WorkerPools::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 + @worker_pools_stub.universe_domain + end + + ## + # Create a new WorkerPools client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WorkerPools 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/run/v2/worker_pool_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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @worker_pools_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Run::V2::WorkerPools::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 + ) + + @worker_pools_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @worker_pools_stub.endpoint + config.universe_domain = @worker_pools_stub.universe_domain + config.logger = @worker_pools_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Run::V2::WorkerPools::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @worker_pools_stub.logger + end + + # Service calls + + ## + # Creates a new WorkerPool in a given project and location. + # + # @overload create_worker_pool(request, options = nil) + # Pass arguments to `create_worker_pool` via a request object, either of type + # {::Google::Cloud::Run::V2::CreateWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::CreateWorkerPoolRequest, ::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_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil) + # Pass arguments to `create_worker_pool` 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 location and project in which this worker pool should be + # created. Format: `projects/{project}/locations/{location}`, where + # `{project}` can be project id or number. Only lowercase characters, digits, + # and hyphens. + # @param worker_pool [::Google::Cloud::Run::V2::WorkerPool, ::Hash] + # Required. The WorkerPool instance to create. + # @param worker_pool_id [::String] + # Required. The unique identifier for the WorkerPool. It must begin with + # letter, and cannot end with hyphen; must contain fewer than 50 characters. + # The name of the worker pool becomes + # `{parent}/workerPools/{worker_pool_id}`. + # @param validate_only [::Boolean] + # Optional. Indicates that the request should be validated and default values + # populated, without persisting the request or creating any resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::CreateWorkerPoolRequest.new + # + # # Call the create_worker_pool method. + # result = client.create_worker_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::CreateWorkerPoolRequest + + # 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_worker_pool.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::Run::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_worker_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.call_rpc :create_worker_pool, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a WorkerPool. + # + # @overload get_worker_pool(request, options = nil) + # Pass arguments to `get_worker_pool` via a request object, either of type + # {::Google::Cloud::Run::V2::GetWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::GetWorkerPoolRequest, ::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_worker_pool(name: nil) + # Pass arguments to `get_worker_pool` 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 full name of the WorkerPool. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + # `{project}` can be project id or number. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Run::V2::WorkerPool] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Run::V2::WorkerPool] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::GetWorkerPoolRequest.new + # + # # Call the get_worker_pool method. + # result = client.get_worker_pool request + # + # # The returned object is of type Google::Cloud::Run::V2::WorkerPool. + # p result + # + def get_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::GetWorkerPoolRequest + + # 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_worker_pool.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::Run::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)(?:/.*)?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_worker_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.call_rpc :get_worker_pool, 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 WorkerPools. Results are sorted by creation time, descending. + # + # @overload list_worker_pools(request, options = nil) + # Pass arguments to `list_worker_pools` via a request object, either of type + # {::Google::Cloud::Run::V2::ListWorkerPoolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::ListWorkerPoolsRequest, ::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_worker_pools(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_worker_pools` 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 location and project to list resources on. + # Location must be a valid Google Cloud region, and cannot be the "-" + # wildcard. Format: `projects/{project}/locations/{location}`, where + # `{project}` can be project id or number. + # @param page_size [::Integer] + # Maximum number of WorkerPools to return in this call. + # @param page_token [::String] + # A page token received from a previous call to ListWorkerPools. + # All other parameters must match. + # @param show_deleted [::Boolean] + # If true, returns deleted (but unexpired) resources along with active ones. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Run::V2::WorkerPool>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Run::V2::WorkerPool>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::ListWorkerPoolsRequest.new + # + # # Call the list_worker_pools method. + # result = client.list_worker_pools 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::Run::V2::WorkerPool. + # p item + # end + # + def list_worker_pools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::ListWorkerPoolsRequest + + # 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_worker_pools.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::Run::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_worker_pools.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_worker_pools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.call_rpc :list_worker_pools, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @worker_pools_stub, :list_worker_pools, 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 + + ## + # Updates a WorkerPool. + # + # @overload update_worker_pool(request, options = nil) + # Pass arguments to `update_worker_pool` via a request object, either of type + # {::Google::Cloud::Run::V2::UpdateWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::UpdateWorkerPoolRequest, ::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 update_worker_pool(update_mask: nil, worker_pool: nil, validate_only: nil, allow_missing: nil, force_new_revision: nil) + # Pass arguments to `update_worker_pool` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be updated. + # @param worker_pool [::Google::Cloud::Run::V2::WorkerPool, ::Hash] + # Required. The WorkerPool to be updated. + # @param validate_only [::Boolean] + # Optional. Indicates that the request should be validated and default values + # populated, without persisting the request or updating any resources. + # @param allow_missing [::Boolean] + # Optional. If set to true, and if the WorkerPool does not exist, it will + # create a new one. The caller must have 'run.workerpools.create' permissions + # if this is set to true and the WorkerPool does not exist. + # @param force_new_revision [::Boolean] + # Optional. If set to true, a new revision will be created from the template + # even if the system doesn't detect any changes from the previously deployed + # revision. + # + # This may be useful for cases where the underlying resources need to be + # recreated or reinitialized. For example if the image is specified by label, + # but the underlying image digest has changed) or if the container performs + # deployment initialization work that needs to be performed again. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::UpdateWorkerPoolRequest.new + # + # # Call the update_worker_pool method. + # result = client.update_worker_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::UpdateWorkerPoolRequest + + # 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.update_worker_pool.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::Run::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.worker_pool&.name + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)(?:/.*)?$}.match request.worker_pool.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_worker_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.call_rpc :update_worker_pool, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 WorkerPool. + # + # @overload delete_worker_pool(request, options = nil) + # Pass arguments to `delete_worker_pool` via a request object, either of type + # {::Google::Cloud::Run::V2::DeleteWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::DeleteWorkerPoolRequest, ::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_worker_pool(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_worker_pool` 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 full name of the WorkerPool. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + # `{project}` can be project id or number. + # @param validate_only [::Boolean] + # Optional. Indicates that the request should be validated without actually + # deleting any resources. + # @param etag [::String] + # A system-generated fingerprint for this version of the + # resource. May be used to detect modification conflict during updates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::DeleteWorkerPoolRequest.new + # + # # Call the delete_worker_pool method. + # result = client.delete_worker_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::DeleteWorkerPoolRequest + + # 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_worker_pool.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::Run::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)(?:/.*)?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_worker_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.call_rpc :delete_worker_pool, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM Access Control policy currently in effect for the given + # Cloud Run WorkerPool. This result does not include any inherited policies. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` 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 resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # 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_iam_policy.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::Run::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.resource + header_params["resource"] = request.resource + 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_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.call_rpc :get_iam_policy, 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 + + ## + # Sets the IAM Access control policy for the specified WorkerPool. Overwrites + # any existing policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::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 set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` 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 resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # 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.set_iam_policy.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::Run::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.resource + header_params["resource"] = request.resource + 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.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.call_rpc :set_iam_policy, 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 + + ## + # Returns permissions that a caller has on the specified Project. + # + # There are no permissions required for making this API call. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::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 test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` 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 resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # 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.test_iam_permissions.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::Run::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.resource + header_params["resource"] = request.resource + 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.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the WorkerPools API. + # + # This class represents the configuration for WorkerPools, + # 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::Run::V2::WorkerPools::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_worker_pool to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Run::V2::WorkerPools::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_worker_pool.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_worker_pool.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "run.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 WorkerPools 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_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :create_worker_pool + ## + # RPC-specific configuration for `get_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_worker_pool + ## + # RPC-specific configuration for `list_worker_pools` + # @return [::Gapic::Config::Method] + # + attr_reader :list_worker_pools + ## + # RPC-specific configuration for `update_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_worker_pool + ## + # RPC-specific configuration for `delete_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_worker_pool + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_worker_pool_config = parent_rpcs.create_worker_pool if parent_rpcs.respond_to? :create_worker_pool + @create_worker_pool = ::Gapic::Config::Method.new create_worker_pool_config + get_worker_pool_config = parent_rpcs.get_worker_pool if parent_rpcs.respond_to? :get_worker_pool + @get_worker_pool = ::Gapic::Config::Method.new get_worker_pool_config + list_worker_pools_config = parent_rpcs.list_worker_pools if parent_rpcs.respond_to? :list_worker_pools + @list_worker_pools = ::Gapic::Config::Method.new list_worker_pools_config + update_worker_pool_config = parent_rpcs.update_worker_pool if parent_rpcs.respond_to? :update_worker_pool + @update_worker_pool = ::Gapic::Config::Method.new update_worker_pool_config + delete_worker_pool_config = parent_rpcs.delete_worker_pool if parent_rpcs.respond_to? :delete_worker_pool + @delete_worker_pool = ::Gapic::Config::Method.new delete_worker_pool_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/credentials.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/credentials.rb new file mode 100644 index 000000000000..9ea3e6d2af85 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Run + module V2 + module WorkerPools + # Credentials for the WorkerPools 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 diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/operations.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/operations.rb new file mode 100644 index 000000000000..3e336198f842 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/operations.rb @@ -0,0 +1,821 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Run + module V2 + module WorkerPools + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "run.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the WorkerPools Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the WorkerPools Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::Run::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.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::Run::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_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::Run::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_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::Run::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.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::Run::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.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "run.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/paths.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/paths.rb new file mode 100644 index 000000000000..285ded96af54 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/paths.rb @@ -0,0 +1,218 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Run + module V2 + module WorkerPools + # Path helper methods for the WorkerPools API. + module Paths + ## + # Create a fully-qualified Connector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connectors/{connector}` + # + # @param project [String] + # @param location [String] + # @param connector [String] + # + # @return [::String] + def connector_path project:, location:, connector: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connectors/#{connector}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # 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 Mesh resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/meshes/{mesh}` + # + # @param project [String] + # @param location [String] + # @param mesh [String] + # + # @return [::String] + def mesh_path project:, location:, mesh: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/meshes/#{mesh}" + end + + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/policy` + # + # @param project [String] + # + # @overload policy_path(location:) + # The resource will be in the following format: + # + # `locations/{location}/policy` + # + # @param location [String] + # + # @return [::String] + def policy_path **args + resources = { + "project" => (proc do |project:| + "projects/#{project}/policy" + end), + "location" => (proc do |location:| + "locations/#{location}/policy" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Revision resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/services/{service}/revisions/{revision}` + # + # @param project [String] + # @param location [String] + # @param service [String] + # @param revision [String] + # + # @return [::String] + def revision_path project:, location:, service:, revision: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" + + "projects/#{project}/locations/#{location}/services/#{service}/revisions/#{revision}" + end + + ## + # Create a fully-qualified Secret resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}` + # + # @param project [String] + # @param secret [String] + # + # @return [::String] + def secret_path project:, secret: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}" + end + + ## + # Create a fully-qualified SecretVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{version}` + # + # @param project [String] + # @param secret [String] + # @param version [String] + # + # @return [::String] + def secret_version_path project:, secret:, version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{version}" + end + + ## + # Create a fully-qualified WorkerPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workerPools/{worker_pool}` + # + # @param project [String] + # @param location [String] + # @param worker_pool [String] + # + # @return [::String] + def worker_pool_path project:, location:, worker_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workerPools/#{worker_pool}" + end + + extend self + end + end + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest.rb new file mode 100644 index 000000000000..39c034839cbd --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/version" + +require "google/cloud/run/v2/worker_pools/credentials" +require "google/cloud/run/v2/worker_pools/paths" +require "google/cloud/run/v2/worker_pools/rest/operations" +require "google/cloud/run/v2/worker_pools/rest/client" + +module Google + module Cloud + module Run + module V2 + ## + # Cloud Run WorkerPool Control Plane API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/run/v2/worker_pools/rest" + # client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + module WorkerPools + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/run/v2/worker_pools/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/client.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/client.rb new file mode 100644 index 000000000000..00d6d393fe2c --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/client.rb @@ -0,0 +1,1161 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/worker_pool_pb" +require "google/cloud/run/v2/worker_pools/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Run + module V2 + module WorkerPools + module Rest + ## + # REST client for the WorkerPools service. + # + # Cloud Run WorkerPool Control Plane API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "run.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :worker_pools_stub + + ## + # Configure the WorkerPools Client class. + # + # See {::Google::Cloud::Run::V2::WorkerPools::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WorkerPools clients + # ::Google::Cloud::Run::V2::WorkerPools::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", "Run", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the WorkerPools 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::Run::V2::WorkerPools::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 + @worker_pools_stub.universe_domain + end + + ## + # Create a new WorkerPools REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WorkerPools 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 + + @operations_client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @worker_pools_stub = ::Google::Cloud::Run::V2::WorkerPools::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @worker_pools_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @worker_pools_stub.endpoint + config.universe_domain = @worker_pools_stub.universe_domain + config.logger = @worker_pools_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Run::V2::WorkerPools::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @worker_pools_stub.logger + end + + # Service calls + + ## + # Creates a new WorkerPool in a given project and location. + # + # @overload create_worker_pool(request, options = nil) + # Pass arguments to `create_worker_pool` via a request object, either of type + # {::Google::Cloud::Run::V2::CreateWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::CreateWorkerPoolRequest, ::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_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil) + # Pass arguments to `create_worker_pool` 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 location and project in which this worker pool should be + # created. Format: `projects/{project}/locations/{location}`, where + # `{project}` can be project id or number. Only lowercase characters, digits, + # and hyphens. + # @param worker_pool [::Google::Cloud::Run::V2::WorkerPool, ::Hash] + # Required. The WorkerPool instance to create. + # @param worker_pool_id [::String] + # Required. The unique identifier for the WorkerPool. It must begin with + # letter, and cannot end with hyphen; must contain fewer than 50 characters. + # The name of the worker pool becomes + # `{parent}/workerPools/{worker_pool_id}`. + # @param validate_only [::Boolean] + # Optional. Indicates that the request should be validated and default values + # populated, without persisting the request or creating any resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::CreateWorkerPoolRequest.new + # + # # Call the create_worker_pool method. + # result = client.create_worker_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::CreateWorkerPoolRequest + + # 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_worker_pool.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::Run::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_worker_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.create_worker_pool request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a WorkerPool. + # + # @overload get_worker_pool(request, options = nil) + # Pass arguments to `get_worker_pool` via a request object, either of type + # {::Google::Cloud::Run::V2::GetWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::GetWorkerPoolRequest, ::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_worker_pool(name: nil) + # Pass arguments to `get_worker_pool` 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 full name of the WorkerPool. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + # `{project}` can be project id or number. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Run::V2::WorkerPool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Run::V2::WorkerPool] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::GetWorkerPoolRequest.new + # + # # Call the get_worker_pool method. + # result = client.get_worker_pool request + # + # # The returned object is of type Google::Cloud::Run::V2::WorkerPool. + # p result + # + def get_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::GetWorkerPoolRequest + + # 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_worker_pool.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::Run::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_worker_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.get_worker_pool 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 WorkerPools. Results are sorted by creation time, descending. + # + # @overload list_worker_pools(request, options = nil) + # Pass arguments to `list_worker_pools` via a request object, either of type + # {::Google::Cloud::Run::V2::ListWorkerPoolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::ListWorkerPoolsRequest, ::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_worker_pools(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_worker_pools` 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 location and project to list resources on. + # Location must be a valid Google Cloud region, and cannot be the "-" + # wildcard. Format: `projects/{project}/locations/{location}`, where + # `{project}` can be project id or number. + # @param page_size [::Integer] + # Maximum number of WorkerPools to return in this call. + # @param page_token [::String] + # A page token received from a previous call to ListWorkerPools. + # All other parameters must match. + # @param show_deleted [::Boolean] + # If true, returns deleted (but unexpired) resources along with active ones. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Run::V2::WorkerPool>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Run::V2::WorkerPool>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::ListWorkerPoolsRequest.new + # + # # Call the list_worker_pools method. + # result = client.list_worker_pools 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::Run::V2::WorkerPool. + # p item + # end + # + def list_worker_pools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::ListWorkerPoolsRequest + + # 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_worker_pools.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::Run::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_worker_pools.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_worker_pools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.list_worker_pools request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @worker_pools_stub, :list_worker_pools, "worker_pools", 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 + + ## + # Updates a WorkerPool. + # + # @overload update_worker_pool(request, options = nil) + # Pass arguments to `update_worker_pool` via a request object, either of type + # {::Google::Cloud::Run::V2::UpdateWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::UpdateWorkerPoolRequest, ::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 update_worker_pool(update_mask: nil, worker_pool: nil, validate_only: nil, allow_missing: nil, force_new_revision: nil) + # Pass arguments to `update_worker_pool` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be updated. + # @param worker_pool [::Google::Cloud::Run::V2::WorkerPool, ::Hash] + # Required. The WorkerPool to be updated. + # @param validate_only [::Boolean] + # Optional. Indicates that the request should be validated and default values + # populated, without persisting the request or updating any resources. + # @param allow_missing [::Boolean] + # Optional. If set to true, and if the WorkerPool does not exist, it will + # create a new one. The caller must have 'run.workerpools.create' permissions + # if this is set to true and the WorkerPool does not exist. + # @param force_new_revision [::Boolean] + # Optional. If set to true, a new revision will be created from the template + # even if the system doesn't detect any changes from the previously deployed + # revision. + # + # This may be useful for cases where the underlying resources need to be + # recreated or reinitialized. For example if the image is specified by label, + # but the underlying image digest has changed) or if the container performs + # deployment initialization work that needs to be performed again. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::UpdateWorkerPoolRequest.new + # + # # Call the update_worker_pool method. + # result = client.update_worker_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::UpdateWorkerPoolRequest + + # 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.update_worker_pool.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::Run::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.update_worker_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.update_worker_pool request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 WorkerPool. + # + # @overload delete_worker_pool(request, options = nil) + # Pass arguments to `delete_worker_pool` via a request object, either of type + # {::Google::Cloud::Run::V2::DeleteWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Run::V2::DeleteWorkerPoolRequest, ::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_worker_pool(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_worker_pool` 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 full name of the WorkerPool. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + # `{project}` can be project id or number. + # @param validate_only [::Boolean] + # Optional. Indicates that the request should be validated without actually + # deleting any resources. + # @param etag [::String] + # A system-generated fingerprint for this version of the + # resource. May be used to detect modification conflict during updates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Run::V2::DeleteWorkerPoolRequest.new + # + # # Call the delete_worker_pool method. + # result = client.delete_worker_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::DeleteWorkerPoolRequest + + # 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_worker_pool.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::Run::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_worker_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.delete_worker_pool request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM Access Control policy currently in effect for the given + # Cloud Run WorkerPool. This result does not include any inherited policies. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` 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 resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # 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_iam_policy.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::Run::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_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.get_iam_policy 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 + + ## + # Sets the IAM Access control policy for the specified WorkerPool. Overwrites + # any existing policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::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 set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` 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 resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # 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.set_iam_policy.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::Run::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.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.set_iam_policy 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 + + ## + # Returns permissions that a caller has on the specified Project. + # + # There are no permissions required for making this API call. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::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 test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` 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 resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/run/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Run::V2::WorkerPools::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # 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.test_iam_permissions.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::Run::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.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @worker_pools_stub.test_iam_permissions 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 + + ## + # Configuration class for the WorkerPools REST API. + # + # This class represents the configuration for WorkerPools 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::Run::V2::WorkerPools::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_worker_pool to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_worker_pool.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_worker_pool.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 = "run.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 WorkerPools 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_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :create_worker_pool + ## + # RPC-specific configuration for `get_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_worker_pool + ## + # RPC-specific configuration for `list_worker_pools` + # @return [::Gapic::Config::Method] + # + attr_reader :list_worker_pools + ## + # RPC-specific configuration for `update_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_worker_pool + ## + # RPC-specific configuration for `delete_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_worker_pool + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_worker_pool_config = parent_rpcs.create_worker_pool if parent_rpcs.respond_to? :create_worker_pool + @create_worker_pool = ::Gapic::Config::Method.new create_worker_pool_config + get_worker_pool_config = parent_rpcs.get_worker_pool if parent_rpcs.respond_to? :get_worker_pool + @get_worker_pool = ::Gapic::Config::Method.new get_worker_pool_config + list_worker_pools_config = parent_rpcs.list_worker_pools if parent_rpcs.respond_to? :list_worker_pools + @list_worker_pools = ::Gapic::Config::Method.new list_worker_pools_config + update_worker_pool_config = parent_rpcs.update_worker_pool if parent_rpcs.respond_to? :update_worker_pool + @update_worker_pool = ::Gapic::Config::Method.new update_worker_pool_config + delete_worker_pool_config = parent_rpcs.delete_worker_pool if parent_rpcs.respond_to? :delete_worker_pool + @delete_worker_pool = ::Gapic::Config::Method.new delete_worker_pool_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/operations.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/operations.rb new file mode 100644 index 000000000000..abfe742001bb --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/operations.rb @@ -0,0 +1,1082 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/operation" + +module Google + module Cloud + module Run + module V2 + module WorkerPools + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "run.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the WorkerPools Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the WorkerPools Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::Run::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_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", 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 + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::Run::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::Run::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_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::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 cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # 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.cancel_operation.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::Run::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.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::Run::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.wait_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.wait_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::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 + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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 = "run.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 Operations 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 `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + 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 cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", + 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 wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_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: "wait_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:wait", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/service_stub.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/service_stub.rb new file mode 100644 index 000000000000..384be067e1d0 --- /dev/null +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/worker_pools/rest/service_stub.rb @@ -0,0 +1,573 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/worker_pool_pb" + +module Google + module Cloud + module Run + module V2 + module WorkerPools + module Rest + ## + # REST service stub for the WorkerPools 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: true, + 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_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Run::V2::CreateWorkerPoolRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_worker_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_worker_pool_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_worker_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Run::V2::GetWorkerPoolRequest] + # 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::Run::V2::WorkerPool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Run::V2::WorkerPool] + # A result object deserialized from the server's reply + def get_worker_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_worker_pool_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_worker_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Run::V2::WorkerPool.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_worker_pools REST call + # + # @param request_pb [::Google::Cloud::Run::V2::ListWorkerPoolsRequest] + # 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::Run::V2::ListWorkerPoolsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Run::V2::ListWorkerPoolsResponse] + # A result object deserialized from the server's reply + def list_worker_pools request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_worker_pools_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_worker_pools", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Run::V2::ListWorkerPoolsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Run::V2::UpdateWorkerPoolRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_worker_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_worker_pool_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: "update_worker_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Run::V2::DeleteWorkerPoolRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_worker_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_worker_pool_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_worker_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_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_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # 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::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_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: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # 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::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.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_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Run::V2::CreateWorkerPoolRequest] + # 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_worker_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/workerPools", + body: "worker_pool", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Run::V2::GetWorkerPoolRequest] + # 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_worker_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_worker_pools REST call + # + # @param request_pb [::Google::Cloud::Run::V2::ListWorkerPoolsRequest] + # 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_worker_pools_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/workerPools", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Run::V2::UpdateWorkerPoolRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_worker_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{worker_pool.name}", + body: "worker_pool", + matches: [ + ["worker_pool.name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Run::V2::DeleteWorkerPoolRequest] + # 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_worker_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/instance_split.rb b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/instance_split.rb new file mode 100644 index 000000000000..ee5d5145b712 --- /dev/null +++ b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/instance_split.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Run + module V2 + # Holds a single instance split entry for the Worker. Allocations can be done + # to a specific Revision name, or pointing to the latest Ready Revision. + # @!attribute [rw] type + # @return [::Google::Cloud::Run::V2::InstanceSplitAllocationType] + # The allocation type for this instance split. + # @!attribute [rw] revision + # @return [::String] + # Revision to which to assign this portion of instances, if split allocation + # is by revision. + # @!attribute [rw] percent + # @return [::Integer] + # Specifies percent of the instance split to this Revision. + # This defaults to zero if unspecified. + class InstanceSplit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the observed state of a single `InstanceSplit` entry. + # @!attribute [rw] type + # @return [::Google::Cloud::Run::V2::InstanceSplitAllocationType] + # The allocation type for this instance split. + # @!attribute [rw] revision + # @return [::String] + # Revision to which this instance split is assigned. + # @!attribute [rw] percent + # @return [::Integer] + # Specifies percent of the instance split to this Revision. + class InstanceSplitStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of instance split allocation. + module InstanceSplitAllocationType + # Unspecified instance allocation type. + INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED = 0 + + # Allocates instances to the Service's latest ready Revision. + INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST = 1 + + # Allocates instances to a Revision by name. + INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION = 2 + end + end + end + end +end diff --git a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/vendor_settings.rb b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/vendor_settings.rb index 049dc39d55c7..ad6c5e54bd6d 100644 --- a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/vendor_settings.rb +++ b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/vendor_settings.rb @@ -163,6 +163,15 @@ module ScalingMode end end + # Worker pool scaling settings. + # @!attribute [rw] manual_instance_count + # @return [::Integer] + # Optional. The total number of instances in manual scaling mode. + class WorkerPoolScaling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Hardware constraints configuration. # @!attribute [rw] accelerator # @return [::String] diff --git a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/worker_pool.rb b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/worker_pool.rb new file mode 100644 index 000000000000..6d3399601f02 --- /dev/null +++ b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/worker_pool.rb @@ -0,0 +1,351 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Run + module V2 + # Request message for creating a WorkerPool. + # @!attribute [rw] parent + # @return [::String] + # Required. The location and project in which this worker pool should be + # created. Format: `projects/{project}/locations/{location}`, where + # `{project}` can be project id or number. Only lowercase characters, digits, + # and hyphens. + # @!attribute [rw] worker_pool + # @return [::Google::Cloud::Run::V2::WorkerPool] + # Required. The WorkerPool instance to create. + # @!attribute [rw] worker_pool_id + # @return [::String] + # Required. The unique identifier for the WorkerPool. It must begin with + # letter, and cannot end with hyphen; must contain fewer than 50 characters. + # The name of the worker pool becomes + # `{parent}/workerPools/{worker_pool_id}`. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Indicates that the request should be validated and default values + # populated, without persisting the request or creating any resources. + class CreateWorkerPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a worker pool. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be updated. + # @!attribute [rw] worker_pool + # @return [::Google::Cloud::Run::V2::WorkerPool] + # Required. The WorkerPool to be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Indicates that the request should be validated and default values + # populated, without persisting the request or updating any resources. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and if the WorkerPool does not exist, it will + # create a new one. The caller must have 'run.workerpools.create' permissions + # if this is set to true and the WorkerPool does not exist. + # @!attribute [rw] force_new_revision + # @return [::Boolean] + # Optional. If set to true, a new revision will be created from the template + # even if the system doesn't detect any changes from the previously deployed + # revision. + # + # This may be useful for cases where the underlying resources need to be + # recreated or reinitialized. For example if the image is specified by label, + # but the underlying image digest has changed) or if the container performs + # deployment initialization work that needs to be performed again. + class UpdateWorkerPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for retrieving a list of WorkerPools. + # @!attribute [rw] parent + # @return [::String] + # Required. The location and project to list resources on. + # Location must be a valid Google Cloud region, and cannot be the "-" + # wildcard. Format: `projects/{project}/locations/{location}`, where + # `{project}` can be project id or number. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of WorkerPools to return in this call. + # @!attribute [rw] page_token + # @return [::String] + # A page token received from a previous call to ListWorkerPools. + # All other parameters must match. + # @!attribute [rw] show_deleted + # @return [::Boolean] + # If true, returns deleted (but unexpired) resources along with active ones. + class ListWorkerPoolsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing a list of WorkerPools. + # @!attribute [rw] worker_pools + # @return [::Array<::Google::Cloud::Run::V2::WorkerPool>] + # The resulting list of WorkerPools. + # @!attribute [rw] next_page_token + # @return [::String] + # A token indicating there are more items than page_size. Use it in the next + # ListWorkerPools request to continue. + class ListWorkerPoolsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for obtaining a WorkerPool by its full name. + # @!attribute [rw] name + # @return [::String] + # Required. The full name of the WorkerPool. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + # `{project}` can be project id or number. + class GetWorkerPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a WorkerPool by its full name. + # @!attribute [rw] name + # @return [::String] + # Required. The full name of the WorkerPool. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + # `{project}` can be project id or number. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Indicates that the request should be validated without actually + # deleting any resources. + # @!attribute [rw] etag + # @return [::String] + # A system-generated fingerprint for this version of the + # resource. May be used to detect modification conflict during updates. + class DeleteWorkerPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # WorkerPool acts as a top-level container that manages a set of + # configurations and revision templates which implement a pull-based workload. + # WorkerPool exists to provide a singular abstraction which can be access + # controlled, reasoned about, and which encapsulates software lifecycle + # decisions such as rollout policy and team resource ownership. + # @!attribute [rw] name + # @return [::String] + # The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, + # this field is ignored, and instead composed from + # CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. + # + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_id}` + # @!attribute [rw] description + # @return [::String] + # User-provided description of the WorkerPool. This field currently has a + # 512-character limit. + # @!attribute [r] uid + # @return [::String] + # Output only. Server assigned unique identifier for the trigger. The value + # is a UUID4 string and guaranteed to remain unchanged until the resource is + # deleted. + # @!attribute [r] generation + # @return [::Integer] + # Output only. A number that monotonically increases every time the user + # modifies the desired state. + # Please note that unlike v1, this is an int64 value. As with most Google + # APIs, its JSON representation will be a `string` instead of an `integer`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Unstructured key value map that can be used to organize and + # categorize objects. User-provided labels are shared with Google's billing + # system, so they can be used to filter, or break down billing charges by + # team, component, environment, state, etc. For more information, visit + # https://cloud.google.com/resource-manager/docs/creating-managing-labels or + # https://cloud.google.com/run/docs/configuring/labels. + # + # Cloud Run API v2 does not support labels with `run.googleapis.com`, + # `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + # namespaces, and they will be rejected. All system labels in v1 now have a + # corresponding field in v2 WorkerPool. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Unstructured key value map that may be set by external tools to + # store and arbitrary metadata. They are not queryable and should be + # preserved when modifying objects. + # + # Cloud Run API v2 does not support annotations with `run.googleapis.com`, + # `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + # namespaces, and they will be rejected in new resources. All system + # annotations in v1 now have a corresponding field in v2 WorkerPool. + # + #

This field follows Kubernetes + # annotations' namespacing, limits, and rules. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The deletion time. It is only populated as a response to a + # Delete request. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. For a deleted resource, the time after which it will be + # permamently deleted. + # @!attribute [r] creator + # @return [::String] + # Output only. Email address of the authenticated creator. + # @!attribute [r] last_modifier + # @return [::String] + # Output only. Email address of the last authenticated modifier. + # @!attribute [rw] client + # @return [::String] + # Arbitrary identifier for the API client. + # @!attribute [rw] client_version + # @return [::String] + # Arbitrary version identifier for the API client. + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Optional. The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + # Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + # is assumed. + # Set the launch stage to a preview stage on input to allow use of preview + # features in that stage. On read (or output), describes whether the + # resource uses preview features. + # + # For example, if ALPHA is provided as input, but only BETA and GA-level + # features are used, this field will be BETA on output. + # @!attribute [rw] binary_authorization + # @return [::Google::Cloud::Run::V2::BinaryAuthorization] + # Optional. Settings for the Binary Authorization feature. + # @!attribute [rw] template + # @return [::Google::Cloud::Run::V2::WorkerPoolRevisionTemplate] + # Required. The template used to create revisions for this WorkerPool. + # @!attribute [rw] instance_splits + # @return [::Array<::Google::Cloud::Run::V2::InstanceSplit>] + # Optional. Specifies how to distribute instances over a collection of + # Revisions belonging to the WorkerPool. If instance split is empty or not + # provided, defaults to 100% instances assigned to the latest `Ready` + # Revision. + # @!attribute [rw] scaling + # @return [::Google::Cloud::Run::V2::WorkerPoolScaling] + # Optional. Specifies worker-pool-level scaling settings + # @!attribute [r] observed_generation + # @return [::Integer] + # Output only. The generation of this WorkerPool currently serving traffic. + # See comments in `reconciling` for additional information on reconciliation + # process in Cloud Run. Please note that unlike v1, this is an int64 value. + # As with most Google APIs, its JSON representation will be a `string` + # instead of an `integer`. + # @!attribute [r] terminal_condition + # @return [::Google::Cloud::Run::V2::Condition] + # Output only. The Condition of this WorkerPool, containing its readiness + # status, and detailed error information in case it did not reach a serving + # state. See comments in `reconciling` for additional information on + # reconciliation process in Cloud Run. + # @!attribute [r] conditions + # @return [::Array<::Google::Cloud::Run::V2::Condition>] + # Output only. The Conditions of all other associated sub-resources. They + # contain additional diagnostics information in case the WorkerPool does not + # reach its Serving state. See comments in `reconciling` for additional + # information on reconciliation process in Cloud Run. + # @!attribute [r] latest_ready_revision + # @return [::String] + # Output only. Name of the latest revision that is serving traffic. See + # comments in `reconciling` for additional information on reconciliation + # process in Cloud Run. + # @!attribute [r] latest_created_revision + # @return [::String] + # Output only. Name of the last created revision. See comments in + # `reconciling` for additional information on reconciliation process in Cloud + # Run. + # @!attribute [r] instance_split_statuses + # @return [::Array<::Google::Cloud::Run::V2::InstanceSplitStatus>] + # Output only. Detailed status information for corresponding instance splits. + # See comments in `reconciling` for additional information on reconciliation + # process in Cloud Run. + # @!attribute [rw] custom_audiences + # @return [::Array<::String>] + # One or more custom audiences that you want this worker pool to support. + # Specify each custom audience as the full URL in a string. The custom + # audiences are encoded in the token and used to authenticate requests. For + # more information, see + # https://cloud.google.com/run/docs/configuring/custom-audiences. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Returns true if the WorkerPool is currently being acted upon + # by the system to bring it into the desired state. + # + # When a new WorkerPool is created, or an existing one is updated, Cloud Run + # will asynchronously perform all necessary steps to bring the WorkerPool to + # the desired serving state. This process is called reconciliation. While + # reconciliation is in process, `observed_generation`, + # `latest_ready_revison`, `traffic_statuses`, and `uri` will have transient + # values that might mismatch the intended state: Once reconciliation is over + # (and this field is false), there are two possible outcomes: reconciliation + # succeeded and the serving state matches the WorkerPool, or there was an + # error, and reconciliation failed. This state can be found in + # `terminal_condition.state`. + # + # If reconciliation succeeded, the following fields will match: `traffic` and + # `traffic_statuses`, `observed_generation` and `generation`, + # `latest_ready_revision` and `latest_created_revision`. + # + # If reconciliation failed, `traffic_statuses`, `observed_generation`, and + # `latest_ready_revision` will have the state of the last serving revision, + # or empty for newly created WorkerPools. Additional information on the + # failure can be found in `terminal_condition` and `conditions`. + # @!attribute [r] etag + # @return [::String] + # Output only. A system-generated fingerprint for this version of the + # resource. May be used to detect modification conflict during updates. + class WorkerPool + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-cloud-run-v2/proto_docs/google/cloud/run/v2/worker_pool_revision_template.rb b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/worker_pool_revision_template.rb new file mode 100644 index 000000000000..00c828579860 --- /dev/null +++ b/google-cloud-run-v2/proto_docs/google/cloud/run/v2/worker_pool_revision_template.rb @@ -0,0 +1,117 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Run + module V2 + # WorkerPoolRevisionTemplate describes the data a worker pool revision should + # have when created from a template. + # @!attribute [rw] revision + # @return [::String] + # Optional. The unique name for the revision. If this field is omitted, it + # will be automatically generated based on the WorkerPool name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Unstructured key value map that can be used to organize and + # categorize objects. User-provided labels are shared with Google's billing + # system, so they can be used to filter, or break down billing charges by + # team, component, environment, state, etc. For more information, visit + # https://cloud.google.com/resource-manager/docs/creating-managing-labels or + # https://cloud.google.com/run/docs/configuring/labels. + # + # Cloud Run API v2 does not support labels with `run.googleapis.com`, + # `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + # namespaces, and they will be rejected. All system labels in v1 now have a + # corresponding field in v2 WorkerPoolRevisionTemplate. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Unstructured key value map that may be set by external tools to + # store and arbitrary metadata. They are not queryable and should be + # preserved when modifying objects. + # + # Cloud Run API v2 does not support annotations with `run.googleapis.com`, + # `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + # namespaces, and they will be rejected. All system annotations in v1 now + # have a corresponding field in v2 WorkerPoolRevisionTemplate. + # + # This field follows Kubernetes annotations' namespacing, limits, and + # rules. + # @!attribute [rw] vpc_access + # @return [::Google::Cloud::Run::V2::VpcAccess] + # Optional. VPC Access configuration to use for this Revision. For more + # information, visit + # https://cloud.google.com/run/docs/configuring/connecting-vpc. + # @!attribute [rw] service_account + # @return [::String] + # Optional. Email address of the IAM service account associated with the + # revision of the service. The service account represents the identity of the + # running revision, and determines what permissions the revision has. If not + # provided, the revision will use the project's default service account. + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::Run::V2::Container>] + # Holds list of the containers that defines the unit of execution for this + # Revision. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::Run::V2::Volume>] + # Optional. A list of Volumes to make available to containers. + # @!attribute [rw] encryption_key + # @return [::String] + # A reference to a customer managed encryption key (CMEK) to use to encrypt + # this container image. For more information, go to + # https://cloud.google.com/run/docs/securing/using-cmek + # @!attribute [rw] service_mesh + # @return [::Google::Cloud::Run::V2::ServiceMesh] + # Optional. Enables service mesh connectivity. + # @!attribute [rw] encryption_key_revocation_action + # @return [::Google::Cloud::Run::V2::EncryptionKeyRevocationAction] + # Optional. The action to take if the encryption key is revoked. + # @!attribute [rw] encryption_key_shutdown_duration + # @return [::Google::Protobuf::Duration] + # Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + # before shutting down all instances. The minimum increment is 1 hour. + # @!attribute [rw] node_selector + # @return [::Google::Cloud::Run::V2::NodeSelector] + # Optional. The node selector for the revision template. + class WorkerPoolRevisionTemplate + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json b/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json index 3b8ac3fb00d2..1a0bdcd82068 100644 --- a/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json +++ b/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json @@ -1090,6 +1090,326 @@ "type": "FULL" } ] + }, + { + "region_tag": "run_v2_generated_WorkerPools_CreateWorkerPool_sync", + "title": "Snippet for the create_worker_pool call in the WorkerPools service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Run::V2::WorkerPools::Client#create_worker_pool.", + "file": "worker_pools/create_worker_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_worker_pool", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client#create_worker_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Run::V2::CreateWorkerPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WorkerPools::Client", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client" + }, + "method": { + "short_name": "CreateWorkerPool", + "full_name": "google.cloud.run.v2.WorkerPools.CreateWorkerPool", + "service": { + "short_name": "WorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "run_v2_generated_WorkerPools_GetWorkerPool_sync", + "title": "Snippet for the get_worker_pool call in the WorkerPools service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Run::V2::WorkerPools::Client#get_worker_pool.", + "file": "worker_pools/get_worker_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_worker_pool", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client#get_worker_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Run::V2::GetWorkerPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Run::V2::WorkerPool", + "client": { + "short_name": "WorkerPools::Client", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client" + }, + "method": { + "short_name": "GetWorkerPool", + "full_name": "google.cloud.run.v2.WorkerPools.GetWorkerPool", + "service": { + "short_name": "WorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "run_v2_generated_WorkerPools_ListWorkerPools_sync", + "title": "Snippet for the list_worker_pools call in the WorkerPools service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Run::V2::WorkerPools::Client#list_worker_pools.", + "file": "worker_pools/list_worker_pools.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_worker_pools", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client#list_worker_pools", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Run::V2::ListWorkerPoolsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Run::V2::ListWorkerPoolsResponse", + "client": { + "short_name": "WorkerPools::Client", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client" + }, + "method": { + "short_name": "ListWorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools.ListWorkerPools", + "service": { + "short_name": "WorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "run_v2_generated_WorkerPools_UpdateWorkerPool_sync", + "title": "Snippet for the update_worker_pool call in the WorkerPools service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Run::V2::WorkerPools::Client#update_worker_pool.", + "file": "worker_pools/update_worker_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_worker_pool", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client#update_worker_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Run::V2::UpdateWorkerPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WorkerPools::Client", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client" + }, + "method": { + "short_name": "UpdateWorkerPool", + "full_name": "google.cloud.run.v2.WorkerPools.UpdateWorkerPool", + "service": { + "short_name": "WorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "run_v2_generated_WorkerPools_DeleteWorkerPool_sync", + "title": "Snippet for the delete_worker_pool call in the WorkerPools service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Run::V2::WorkerPools::Client#delete_worker_pool.", + "file": "worker_pools/delete_worker_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_worker_pool", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client#delete_worker_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Run::V2::DeleteWorkerPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WorkerPools::Client", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client" + }, + "method": { + "short_name": "DeleteWorkerPool", + "full_name": "google.cloud.run.v2.WorkerPools.DeleteWorkerPool", + "service": { + "short_name": "WorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "run_v2_generated_WorkerPools_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the WorkerPools service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Run::V2::WorkerPools::Client#get_iam_policy.", + "file": "worker_pools/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "WorkerPools::Client", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.run.v2.WorkerPools.GetIamPolicy", + "service": { + "short_name": "WorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "run_v2_generated_WorkerPools_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the WorkerPools service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Run::V2::WorkerPools::Client#set_iam_policy.", + "file": "worker_pools/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "WorkerPools::Client", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.run.v2.WorkerPools.SetIamPolicy", + "service": { + "short_name": "WorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "run_v2_generated_WorkerPools_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the WorkerPools service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Run::V2::WorkerPools::Client#test_iam_permissions.", + "file": "worker_pools/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "WorkerPools::Client", + "full_name": "::Google::Cloud::Run::V2::WorkerPools::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.run.v2.WorkerPools.TestIamPermissions", + "service": { + "short_name": "WorkerPools", + "full_name": "google.cloud.run.v2.WorkerPools" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-run-v2/snippets/worker_pools/create_worker_pool.rb b/google-cloud-run-v2/snippets/worker_pools/create_worker_pool.rb new file mode 100644 index 000000000000..03df8903c61d --- /dev/null +++ b/google-cloud-run-v2/snippets/worker_pools/create_worker_pool.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 run_v2_generated_WorkerPools_CreateWorkerPool_sync] +require "google/cloud/run/v2" + +## +# Snippet for the create_worker_pool call in the WorkerPools 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::Run::V2::WorkerPools::Client#create_worker_pool. +# +def create_worker_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Run::V2::WorkerPools::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Run::V2::CreateWorkerPoolRequest.new + + # Call the create_worker_pool method. + result = client.create_worker_pool request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END run_v2_generated_WorkerPools_CreateWorkerPool_sync] diff --git a/google-cloud-run-v2/snippets/worker_pools/delete_worker_pool.rb b/google-cloud-run-v2/snippets/worker_pools/delete_worker_pool.rb new file mode 100644 index 000000000000..32f026646de2 --- /dev/null +++ b/google-cloud-run-v2/snippets/worker_pools/delete_worker_pool.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 run_v2_generated_WorkerPools_DeleteWorkerPool_sync] +require "google/cloud/run/v2" + +## +# Snippet for the delete_worker_pool call in the WorkerPools 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::Run::V2::WorkerPools::Client#delete_worker_pool. +# +def delete_worker_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Run::V2::WorkerPools::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Run::V2::DeleteWorkerPoolRequest.new + + # Call the delete_worker_pool method. + result = client.delete_worker_pool request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END run_v2_generated_WorkerPools_DeleteWorkerPool_sync] diff --git a/google-cloud-run-v2/snippets/worker_pools/get_iam_policy.rb b/google-cloud-run-v2/snippets/worker_pools/get_iam_policy.rb new file mode 100644 index 000000000000..d4ad1998e329 --- /dev/null +++ b/google-cloud-run-v2/snippets/worker_pools/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 run_v2_generated_WorkerPools_GetIamPolicy_sync] +require "google/cloud/run/v2" + +## +# Snippet for the get_iam_policy call in the WorkerPools 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::Run::V2::WorkerPools::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Run::V2::WorkerPools::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END run_v2_generated_WorkerPools_GetIamPolicy_sync] diff --git a/google-cloud-run-v2/snippets/worker_pools/get_worker_pool.rb b/google-cloud-run-v2/snippets/worker_pools/get_worker_pool.rb new file mode 100644 index 000000000000..314bd3bd4124 --- /dev/null +++ b/google-cloud-run-v2/snippets/worker_pools/get_worker_pool.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 run_v2_generated_WorkerPools_GetWorkerPool_sync] +require "google/cloud/run/v2" + +## +# Snippet for the get_worker_pool call in the WorkerPools 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::Run::V2::WorkerPools::Client#get_worker_pool. +# +def get_worker_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Run::V2::WorkerPools::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Run::V2::GetWorkerPoolRequest.new + + # Call the get_worker_pool method. + result = client.get_worker_pool request + + # The returned object is of type Google::Cloud::Run::V2::WorkerPool. + p result +end +# [END run_v2_generated_WorkerPools_GetWorkerPool_sync] diff --git a/google-cloud-run-v2/snippets/worker_pools/list_worker_pools.rb b/google-cloud-run-v2/snippets/worker_pools/list_worker_pools.rb new file mode 100644 index 000000000000..7076b6137a58 --- /dev/null +++ b/google-cloud-run-v2/snippets/worker_pools/list_worker_pools.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 run_v2_generated_WorkerPools_ListWorkerPools_sync] +require "google/cloud/run/v2" + +## +# Snippet for the list_worker_pools call in the WorkerPools 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::Run::V2::WorkerPools::Client#list_worker_pools. +# +def list_worker_pools + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Run::V2::WorkerPools::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Run::V2::ListWorkerPoolsRequest.new + + # Call the list_worker_pools method. + result = client.list_worker_pools 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::Run::V2::WorkerPool. + p item + end +end +# [END run_v2_generated_WorkerPools_ListWorkerPools_sync] diff --git a/google-cloud-run-v2/snippets/worker_pools/set_iam_policy.rb b/google-cloud-run-v2/snippets/worker_pools/set_iam_policy.rb new file mode 100644 index 000000000000..b0cf0310892b --- /dev/null +++ b/google-cloud-run-v2/snippets/worker_pools/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 run_v2_generated_WorkerPools_SetIamPolicy_sync] +require "google/cloud/run/v2" + +## +# Snippet for the set_iam_policy call in the WorkerPools 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::Run::V2::WorkerPools::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Run::V2::WorkerPools::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END run_v2_generated_WorkerPools_SetIamPolicy_sync] diff --git a/google-cloud-run-v2/snippets/worker_pools/test_iam_permissions.rb b/google-cloud-run-v2/snippets/worker_pools/test_iam_permissions.rb new file mode 100644 index 000000000000..92b71ea20515 --- /dev/null +++ b/google-cloud-run-v2/snippets/worker_pools/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 run_v2_generated_WorkerPools_TestIamPermissions_sync] +require "google/cloud/run/v2" + +## +# Snippet for the test_iam_permissions call in the WorkerPools 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::Run::V2::WorkerPools::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Run::V2::WorkerPools::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END run_v2_generated_WorkerPools_TestIamPermissions_sync] diff --git a/google-cloud-run-v2/snippets/worker_pools/update_worker_pool.rb b/google-cloud-run-v2/snippets/worker_pools/update_worker_pool.rb new file mode 100644 index 000000000000..7de1359afdd8 --- /dev/null +++ b/google-cloud-run-v2/snippets/worker_pools/update_worker_pool.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 run_v2_generated_WorkerPools_UpdateWorkerPool_sync] +require "google/cloud/run/v2" + +## +# Snippet for the update_worker_pool call in the WorkerPools 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::Run::V2::WorkerPools::Client#update_worker_pool. +# +def update_worker_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Run::V2::WorkerPools::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Run::V2::UpdateWorkerPoolRequest.new + + # Call the update_worker_pool method. + result = client.update_worker_pool request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END run_v2_generated_WorkerPools_UpdateWorkerPool_sync] diff --git a/google-cloud-run-v2/test/google/cloud/run/v2/builds_paths_test.rb b/google-cloud-run-v2/test/google/cloud/run/v2/builds_paths_test.rb index 0cd016d3290a..a9b325a5e858 100644 --- a/google-cloud-run-v2/test/google/cloud/run/v2/builds_paths_test.rb +++ b/google-cloud-run-v2/test/google/cloud/run/v2/builds_paths_test.rb @@ -41,14 +41,14 @@ def logger end end - def test_worker_pool_path + def test_build_worker_pool_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do client = ::Google::Cloud::Run::V2::Builds::Client.new do |config| config.credentials = grpc_channel end - path = client.worker_pool_path project: "value0", location: "value1", worker_pool: "value2" + path = client.build_worker_pool_path project: "value0", location: "value1", worker_pool: "value2" assert_equal "projects/value0/locations/value1/workerPools/value2", path end end diff --git a/google-cloud-run-v2/test/google/cloud/run/v2/services_paths_test.rb b/google-cloud-run-v2/test/google/cloud/run/v2/services_paths_test.rb index b03be73c19a0..9a1f55fb6651 100644 --- a/google-cloud-run-v2/test/google/cloud/run/v2/services_paths_test.rb +++ b/google-cloud-run-v2/test/google/cloud/run/v2/services_paths_test.rb @@ -53,6 +53,18 @@ def test_build_path end end + def test_build_worker_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::Services::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.build_worker_pool_path project: "value0", location: "value1", worker_pool: "value2" + assert_equal "projects/value0/locations/value1/workerPools/value2", path + end + end + def test_connector_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -163,16 +175,4 @@ def test_service_path assert_equal "projects/value0/locations/value1/services/value2", path end end - - def test_worker_pool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Run::V2::Services::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.worker_pool_path project: "value0", location: "value1", worker_pool: "value2" - assert_equal "projects/value0/locations/value1/workerPools/value2", path - end - end end diff --git a/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_operations_test.rb b/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_operations_test.rb new file mode 100644 index 000000000000..d75a38e0f127 --- /dev/null +++ b/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_operations_test.rb @@ -0,0 +1,398 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/worker_pool_pb" +require "google/cloud/run/v2/worker_pool_services_pb" +require "google/cloud/run/v2/worker_pools" + +class ::Google::Cloud::Run::V2::WorkerPools::OperationsTest < 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_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, 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_operations name: name, filter: filter, 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_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations({ name: name, filter: filter, 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_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ 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_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::Run::V2::WorkerPools::Operations.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::Run::V2::WorkerPools::Operations::Configuration, config + end +end diff --git a/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_paths_test.rb b/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_paths_test.rb new file mode 100644 index 000000000000..38d1f9c3ca31 --- /dev/null +++ b/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_paths_test.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/worker_pools" + +class ::Google::Cloud::Run::V2::WorkerPools::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_connector_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connector_path project: "value0", location: "value1", connector: "value2" + assert_equal "projects/value0/locations/value1/connectors/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + 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::Run::V2::WorkerPools::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_mesh_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.mesh_path project: "value0", location: "value1", mesh: "value2" + assert_equal "projects/value0/locations/value1/meshes/value2", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0" + assert_equal "projects/value0/policy", path + + path = client.policy_path location: "value0" + assert_equal "locations/value0/policy", path + end + end + + def test_revision_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.revision_path project: "value0", location: "value1", service: "value2", revision: "value3" + assert_equal "projects/value0/locations/value1/services/value2/revisions/value3", path + end + end + + def test_secret_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_path project: "value0", secret: "value1" + assert_equal "projects/value0/secrets/value1", path + end + end + + def test_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + end + end + + def test_worker_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.worker_pool_path project: "value0", location: "value1", worker_pool: "value2" + assert_equal "projects/value0/locations/value1/workerPools/value2", path + end + end +end diff --git a/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_rest_test.rb b/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_rest_test.rb new file mode 100644 index 000000000000..40777cf76bd0 --- /dev/null +++ b/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_rest_test.rb @@ -0,0 +1,547 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/worker_pool_pb" +require "google/cloud/run/v2/worker_pools/rest" + + +class ::Google::Cloud::Run::V2::WorkerPools::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_worker_pool + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + worker_pool = {} + worker_pool_id = "hello world" + validate_only = true + + create_worker_pool_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::Run::V2::WorkerPools::Rest::ServiceStub.stub :transcode_create_worker_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_worker_pool parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_worker_pool ::Google::Cloud::Run::V2::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_worker_pool(::Google::Cloud::Run::V2::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_worker_pool_client_stub.call_count + end + end + end + + def test_get_worker_pool + # Create test objects. + client_result = ::Google::Cloud::Run::V2::WorkerPool.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_worker_pool_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::Run::V2::WorkerPools::Rest::ServiceStub.stub :transcode_get_worker_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_worker_pool({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_worker_pool name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_worker_pool ::Google::Cloud::Run::V2::GetWorkerPoolRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_worker_pool({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_worker_pool(::Google::Cloud::Run::V2::GetWorkerPoolRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_worker_pool_client_stub.call_count + end + end + end + + def test_list_worker_pools + # Create test objects. + client_result = ::Google::Cloud::Run::V2::ListWorkerPoolsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_worker_pools_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::Run::V2::WorkerPools::Rest::ServiceStub.stub :transcode_list_worker_pools_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_worker_pools_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_worker_pools({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_worker_pools parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_worker_pools ::Google::Cloud::Run::V2::ListWorkerPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_worker_pools({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_worker_pools(::Google::Cloud::Run::V2::ListWorkerPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_worker_pools_client_stub.call_count + end + end + end + + def test_update_worker_pool + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + worker_pool = {} + validate_only = true + allow_missing = true + force_new_revision = true + + update_worker_pool_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::Run::V2::WorkerPools::Rest::ServiceStub.stub :transcode_update_worker_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_worker_pool({ update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_worker_pool update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_worker_pool ::Google::Cloud::Run::V2::UpdateWorkerPoolRequest.new(update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_worker_pool({ update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_worker_pool(::Google::Cloud::Run::V2::UpdateWorkerPoolRequest.new(update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_worker_pool_client_stub.call_count + end + end + end + + def test_delete_worker_pool + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + + delete_worker_pool_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::Run::V2::WorkerPools::Rest::ServiceStub.stub :transcode_delete_worker_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_worker_pool({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_worker_pool name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_worker_pool ::Google::Cloud::Run::V2::DeleteWorkerPoolRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_worker_pool({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_worker_pool(::Google::Cloud::Run::V2::DeleteWorkerPoolRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_worker_pool_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_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::Run::V2::WorkerPools::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_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::Run::V2::WorkerPools::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_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::Run::V2::WorkerPools::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_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::Run::V2::WorkerPools::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::Run::V2::WorkerPools::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_test.rb b/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_test.rb new file mode 100644 index 000000000000..8a6bb595cbee --- /dev/null +++ b/google-cloud-run-v2/test/google/cloud/run/v2/worker_pools_test.rb @@ -0,0 +1,615 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/run/v2/worker_pool_pb" +require "google/cloud/run/v2/worker_pool_services_pb" +require "google/cloud/run/v2/worker_pools" + +class ::Google::Cloud::Run::V2::WorkerPools::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_worker_pool + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + worker_pool = {} + worker_pool_id = "hello world" + validate_only = true + + create_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_worker_pool, name + assert_kind_of ::Google::Cloud::Run::V2::CreateWorkerPoolRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Run::V2::WorkerPool), request["worker_pool"] + assert_equal "hello world", request["worker_pool_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_worker_pool parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_worker_pool ::Google::Cloud::Run::V2::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_worker_pool(::Google::Cloud::Run::V2::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_worker_pool_client_stub.call_rpc_count + end + end + + def test_get_worker_pool + # Create GRPC objects. + grpc_response = ::Google::Cloud::Run::V2::WorkerPool.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" + + get_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_worker_pool, name + assert_kind_of ::Google::Cloud::Run::V2::GetWorkerPoolRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_worker_pool({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_worker_pool name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_worker_pool ::Google::Cloud::Run::V2::GetWorkerPoolRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_worker_pool({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_worker_pool(::Google::Cloud::Run::V2::GetWorkerPoolRequest.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, get_worker_pool_client_stub.call_rpc_count + end + end + + def test_list_worker_pools + # Create GRPC objects. + grpc_response = ::Google::Cloud::Run::V2::ListWorkerPoolsResponse.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" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_worker_pools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_worker_pools, name + assert_kind_of ::Google::Cloud::Run::V2::ListWorkerPoolsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["show_deleted"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_worker_pools_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_worker_pools({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) 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_worker_pools parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted 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_worker_pools ::Google::Cloud::Run::V2::ListWorkerPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) 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_worker_pools({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, 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_worker_pools(::Google::Cloud::Run::V2::ListWorkerPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), 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_worker_pools_client_stub.call_rpc_count + end + end + + def test_update_worker_pool + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + update_mask = {} + worker_pool = {} + validate_only = true + allow_missing = true + force_new_revision = true + + update_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_worker_pool, name + assert_kind_of ::Google::Cloud::Run::V2::UpdateWorkerPoolRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Run::V2::WorkerPool), request["worker_pool"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + assert_equal true, request["force_new_revision"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_worker_pool({ update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_worker_pool update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_worker_pool ::Google::Cloud::Run::V2::UpdateWorkerPoolRequest.new(update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_worker_pool({ update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_worker_pool(::Google::Cloud::Run::V2::UpdateWorkerPoolRequest.new(update_mask: update_mask, worker_pool: worker_pool, validate_only: validate_only, allow_missing: allow_missing, force_new_revision: force_new_revision), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_worker_pool_client_stub.call_rpc_count + end + end + + def test_delete_worker_pool + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + validate_only = true + etag = "hello world" + + delete_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_worker_pool, name + assert_kind_of ::Google::Cloud::Run::V2::DeleteWorkerPoolRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_worker_pool({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_worker_pool name: name, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_worker_pool ::Google::Cloud::Run::V2::DeleteWorkerPoolRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_worker_pool({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_worker_pool(::Google::Cloud::Run::V2::DeleteWorkerPoolRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_worker_pool_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.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. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.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. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_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::Run::V2::WorkerPools::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::Run::V2::WorkerPools::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Run::V2::WorkerPools::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Run::V2::WorkerPools::Operations, client.operations_client + end +end From 36ec0775a3ac427496b010ccb9344828e9a9b961 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 13:00:07 -0700 Subject: [PATCH 415/457] feat(run): Support for worker pools (#30803) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 792236244 Source-Link: https://github.com/googleapis/googleapis/commit/0998e045cf83a1307ceb158e3da304bdaff5bb3a Source-Link: https://github.com/googleapis/googleapis-gen/commit/dd4d74cec8de2dff661f048ddc83782bbdb6c0dc Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJ1bi1jbGllbnQvLk93bEJvdC55YW1sIiwiaCI6ImRkNGQ3NGNlYzhkZTJkZmY2NjFmMDQ4ZGRjODM3ODJiYmRiNmMwZGMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/run.rb | 70 +++++++++++++++++++ .../test/google/cloud/run/client_test.rb | 21 ++++++ 2 files changed, 91 insertions(+) diff --git a/google-cloud-run-client/lib/google/cloud/run.rb b/google-cloud-run-client/lib/google/cloud/run.rb index 6624b0e7842a..fb43d8f5c763 100644 --- a/google-cloud-run-client/lib/google/cloud/run.rb +++ b/google-cloud-run-client/lib/google/cloud/run.rb @@ -465,6 +465,76 @@ def self.tasks_available? version: :v2, transport: :grpc false end + ## + # Create a new client object for WorkerPools. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::WorkerPools::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-WorkerPools-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the WorkerPools service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the WorkerPools service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.worker_pools_available?}. + # + # ## About WorkerPools + # + # Cloud Run WorkerPool Control Plane API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.worker_pools version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:WorkerPools) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the WorkerPools service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.worker_pools}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the WorkerPools service, + # or if the versioned client gem needs an update to support the WorkerPools service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.worker_pools_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :WorkerPools + service_module = service_module.const_get :WorkerPools + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + ## # Configure the google-cloud-run-client library. # diff --git a/google-cloud-run-client/test/google/cloud/run/client_test.rb b/google-cloud-run-client/test/google/cloud/run/client_test.rb index a91ea1597976..c2abb973be68 100644 --- a/google-cloud-run-client/test/google/cloud/run/client_test.rb +++ b/google-cloud-run-client/test/google/cloud/run/client_test.rb @@ -166,4 +166,25 @@ def test_tasks_rest assert_kind_of Google::Cloud::Run::V2::Tasks::Rest::Client, client end end + + def test_worker_pools_grpc + skip unless Google::Cloud::Run.worker_pools_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.worker_pools transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::WorkerPools::Client, client + end + end + + def test_worker_pools_rest + skip unless Google::Cloud::Run.worker_pools_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.worker_pools transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::WorkerPools::Rest::Client, client + end + end end From 542063400971f4c17bd30a6ac130e1ff2b17e859 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 13:03:53 -0700 Subject: [PATCH 416/457] chore(gke_hub-v1): Trivial reformats (#30823) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 794274090 Source-Link: https://github.com/googleapis/googleapis/commit/2c21d712f77cd07a95f2b3647a0192d8c07e7e2e Source-Link: https://github.com/googleapis/googleapis-gen/commit/e5b6e64f400d94c3eb5cadd7f3eb8d9bc15def7b Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9odWItdjEvLk93bEJvdC55YW1sIiwiaCI6ImU1YjZlNjRmNDAwZDk0YzNlYjVjYWRkN2YzZWI4ZDliYzE1ZGVmN2IifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../lib/google/cloud/gke_hub/v1/gke_hub/client.rb | 8 ++++---- .../google/cloud/gke_hub/v1/gke_hub/rest/client.rb | 8 ++++---- .../lib/google/cloud/gkehub/v1/service_pb.rb | 3 +-- .../proto_docs/google/cloud/gkehub/v1/service.rb | 13 +++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb index 299eae39df90..7f8cd1378694 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb @@ -362,8 +362,8 @@ def list_memberships request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent (project and location) where the Features will be listed. - # Specified in the format `projects/*/locations/*`. + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # When requesting a 'page' of resources, `page_size` specifies number of # resources to return. If unspecified or set to 0, all resources will @@ -779,8 +779,8 @@ def create_membership request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent (project and location) where the Feature will be created. - # Specified in the format `projects/*/locations/*`. + # Required. The parent (project and location) where the Feature will be + # created. Specified in the format `projects/*/locations/*`. # @param feature_id [::String] # The ID of the feature to create. # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb index 8e693848a663..d9932b083356 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb @@ -348,8 +348,8 @@ def list_memberships request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent (project and location) where the Features will be listed. - # Specified in the format `projects/*/locations/*`. + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # When requesting a 'page' of resources, `page_size` specifies number of # resources to return. If unspecified or set to 0, all resources will @@ -737,8 +737,8 @@ def create_membership request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent (project and location) where the Feature will be created. - # Specified in the format `projects/*/locations/*`. + # Required. The parent (project and location) where the Feature will be + # created. Specified in the format `projects/*/locations/*`. # @param feature_id [::String] # The ID of the feature to create. # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb index 0fefe1b6ef40..9582a68880e8 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb @@ -11,12 +11,11 @@ require 'google/cloud/gkehub/v1/feature_pb' require 'google/cloud/gkehub/v1/membership_pb' require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n$google/cloud/gkehub/v1/service.proto\x12\x16google.cloud.gkehub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/gkehub/v1/feature.proto\x1a\'google/cloud/gkehub/v1/membership.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x01\n\x16ListMembershipsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"~\n\x17ListMembershipsResponse\x12\x35\n\tresources\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x14GetMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\"\xc3\x01\n\x17\x43reateMembershipRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x1a\n\rmembership_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n\x17\x44\x65leteMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xdb\x01\n\x17UpdateMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf2\x01\n\x1eGenerateConnectManifestRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x16\n\tnamespace\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05proxy\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nis_upgrade\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08registry\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19image_pull_secret_content\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\"a\n\x1fGenerateConnectManifestResponse\x12>\n\x08manifest\x18\x01 \x03(\x0b\x32,.google.cloud.gkehub.v1.ConnectAgentResource\"X\n\x14\x43onnectAgentResource\x12.\n\x04type\x18\x01 \x01(\x0b\x32 .google.cloud.gkehub.v1.TypeMeta\x12\x10\n\x08manifest\x18\x02 \x01(\t\"-\n\x08TypeMeta\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x02 \x01(\t\"\x92\x01\n\x13ListFeaturesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"c\n\x14ListFeaturesResponse\x12\x32\n\tresources\x18\x01 \x03(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\"\xa5\x01\n\x14\x43reateFeatureRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x12\n\nfeature_id\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"p\n\x14\x44\x65leteFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc0\x01\n\x14UpdateFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\xf9\x01\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xf0\x11\n\x06GkeHub\x12\xb4\x01\n\x0fListMemberships\x12..google.cloud.gkehub.v1.ListMembershipsRequest\x1a/.google.cloud.gkehub.v1.ListMembershipsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/memberships\x12\xa8\x01\n\x0cListFeatures\x12+.google.cloud.gkehub.v1.ListFeaturesRequest\x1a,.google.cloud.gkehub.v1.ListFeaturesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/features\x12\xa1\x01\n\rGetMembership\x12,.google.cloud.gkehub.v1.GetMembershipRequest\x1a\".google.cloud.gkehub.v1.Membership\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/memberships/*}\x12\x95\x01\n\nGetFeature\x12).google.cloud.gkehub.v1.GetFeatureRequest\x1a\x1f.google.cloud.gkehub.v1.Feature\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/features/*}\x12\xe8\x01\n\x10\x43reateMembership\x12/.google.cloud.gkehub.v1.CreateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x1dparent,resource,membership_id\x82\xd3\xe4\x93\x02;\"//v1/{parent=projects/*/locations/*}/memberships:\x08resource\x12\xd8\x01\n\rCreateFeature\x12,.google.cloud.gkehub.v1.CreateFeatureRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x1aparent,resource,feature_id\x82\xd3\xe4\x93\x02\x38\",/v1/{parent=projects/*/locations/*}/features:\x08resource\x12\xcf\x01\n\x10\x44\x65leteMembership\x12/.google.cloud.gkehub.v1.DeleteMembershipRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/memberships/*}\x12\xc6\x01\n\rDeleteFeature\x12,.google.cloud.gkehub.v1.DeleteFeatureRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/features/*}\x12\xe3\x01\n\x10UpdateMembership\x12/.google.cloud.gkehub.v1.UpdateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02;2//v1/{name=projects/*/locations/*/memberships/*}:\x08resource\x12\xd7\x01\n\rUpdateFeature\x12,.google.cloud.gkehub.v1.UpdateFeatureRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02\x38\x32,/v1/{name=projects/*/locations/*/features/*}:\x08resource\x12\xdb\x01\n\x17GenerateConnectManifest\x12\x36.google.cloud.gkehub.v1.GenerateConnectManifestRequest\x1a\x37.google.cloud.gkehub.v1.GenerateConnectManifestResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest\x1aI\xca\x41\x15gkehub.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0cServiceProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" +descriptor_data = "\n$google/cloud/gkehub/v1/service.proto\x12\x16google.cloud.gkehub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/gkehub/v1/feature.proto\x1a\'google/cloud/gkehub/v1/membership.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x01\n\x16ListMembershipsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"~\n\x17ListMembershipsResponse\x12\x35\n\tresources\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x14GetMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\"\xc3\x01\n\x17\x43reateMembershipRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x1a\n\rmembership_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n\x17\x44\x65leteMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xdb\x01\n\x17UpdateMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf2\x01\n\x1eGenerateConnectManifestRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x16\n\tnamespace\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05proxy\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nis_upgrade\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08registry\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19image_pull_secret_content\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\"a\n\x1fGenerateConnectManifestResponse\x12>\n\x08manifest\x18\x01 \x03(\x0b\x32,.google.cloud.gkehub.v1.ConnectAgentResource\"X\n\x14\x43onnectAgentResource\x12.\n\x04type\x18\x01 \x01(\x0b\x32 .google.cloud.gkehub.v1.TypeMeta\x12\x10\n\x08manifest\x18\x02 \x01(\t\"-\n\x08TypeMeta\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x02 \x01(\t\"\x92\x01\n\x13ListFeaturesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"c\n\x14ListFeaturesResponse\x12\x32\n\tresources\x18\x01 \x03(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\"\xa5\x01\n\x14\x43reateFeatureRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x12\n\nfeature_id\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"p\n\x14\x44\x65leteFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc0\x01\n\x14UpdateFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\xf9\x01\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xf0\x11\n\x06GkeHub\x12\xb4\x01\n\x0fListMemberships\x12..google.cloud.gkehub.v1.ListMembershipsRequest\x1a/.google.cloud.gkehub.v1.ListMembershipsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/memberships\x12\xa8\x01\n\x0cListFeatures\x12+.google.cloud.gkehub.v1.ListFeaturesRequest\x1a,.google.cloud.gkehub.v1.ListFeaturesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/features\x12\xa1\x01\n\rGetMembership\x12,.google.cloud.gkehub.v1.GetMembershipRequest\x1a\".google.cloud.gkehub.v1.Membership\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/memberships/*}\x12\x95\x01\n\nGetFeature\x12).google.cloud.gkehub.v1.GetFeatureRequest\x1a\x1f.google.cloud.gkehub.v1.Feature\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/features/*}\x12\xe8\x01\n\x10\x43reateMembership\x12/.google.cloud.gkehub.v1.CreateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x1dparent,resource,membership_id\x82\xd3\xe4\x93\x02;\"//v1/{parent=projects/*/locations/*}/memberships:\x08resource\x12\xd8\x01\n\rCreateFeature\x12,.google.cloud.gkehub.v1.CreateFeatureRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x1aparent,resource,feature_id\x82\xd3\xe4\x93\x02\x38\",/v1/{parent=projects/*/locations/*}/features:\x08resource\x12\xcf\x01\n\x10\x44\x65leteMembership\x12/.google.cloud.gkehub.v1.DeleteMembershipRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/memberships/*}\x12\xc6\x01\n\rDeleteFeature\x12,.google.cloud.gkehub.v1.DeleteFeatureRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/features/*}\x12\xe3\x01\n\x10UpdateMembership\x12/.google.cloud.gkehub.v1.UpdateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02;2//v1/{name=projects/*/locations/*/memberships/*}:\x08resource\x12\xd7\x01\n\rUpdateFeature\x12,.google.cloud.gkehub.v1.UpdateFeatureRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02\x38\x32,/v1/{name=projects/*/locations/*/features/*}:\x08resource\x12\xdb\x01\n\x17GenerateConnectManifest\x12\x36.google.cloud.gkehub.v1.GenerateConnectManifestRequest\x1a\x37.google.cloud.gkehub.v1.GenerateConnectManifestResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest\x1aI\xca\x41\x15gkehub.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0cServiceProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb b/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb index 8efb2715a6b7..e2d4f9ce6337 100644 --- a/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb +++ b/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb @@ -284,8 +284,8 @@ class TypeMeta # Request message for `GkeHub.ListFeatures` method. # @!attribute [rw] parent # @return [::String] - # Required. The parent (project and location) where the Features will be listed. - # Specified in the format `projects/*/locations/*`. + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # When requesting a 'page' of resources, `page_size` specifies number of @@ -350,8 +350,8 @@ class GetFeatureRequest # Request message for the `GkeHub.CreateFeature` method. # @!attribute [rw] parent # @return [::String] - # Required. The parent (project and location) where the Feature will be created. - # Specified in the format `projects/*/locations/*`. + # Required. The parent (project and location) where the Feature will be + # created. Specified in the format `projects/*/locations/*`. # @!attribute [rw] feature_id # @return [::String] # The ID of the feature to create. @@ -466,8 +466,9 @@ class UpdateFeatureRequest # @return [::Boolean] # Output only. Identifies whether the user has requested cancellation # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. # @!attribute [r] api_version # @return [::String] # Output only. API version used to start the operation. From eb0b0e4522433113723fb4978767075721326e48 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 13:05:07 -0700 Subject: [PATCH 417/457] docs(merchant-issue_resolution-v1): Fixed an API documentation link (#30828) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 794497663 Source-Link: https://github.com/googleapis/googleapis/commit/9555af8837ea25052fdd66914f0f338fed266d65 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb814fa46583e216e60bef49e34bad4262eafc72 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWlzc3VlX3Jlc29sdXRpb24tdjEvLk93bEJvdC55YW1sIiwiaCI6ImViODE0ZmE0NjU4M2UyMTZlNjBiZWY0OWUzNGJhZDQyNjJlYWZjNzIifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../shopping/merchant/issueresolution/v1/issueresolution.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb index 7bf3feaf5fe6..3280353b83ba 100644 --- a/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb +++ b/google-shopping-merchant-issue_resolution-v1/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb @@ -490,7 +490,7 @@ module BuiltInSimpleActionType # business. They can start the action only when they provided all required # inputs. The application will request processing of the action by calling the # [triggeraction - # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1beta/issueresolution/triggeraction). + # method](https://developers.google.com/merchant/api/reference/rest/issueresolution_v1/issueresolution/triggeraction). # @!attribute [rw] action_context # @return [::String] # Contains the action's context that must be included as part of the From 912312d2c466252bc01f6b7648c781ab021a2862 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 13 Aug 2025 22:05:47 +0200 Subject: [PATCH 418/457] chore(deps): update actions/checkout action to v5 (#30811) --- .github/workflows/bump-version.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/conformance.yaml | 2 +- .github/workflows/delete-library.yml | 2 +- .github/workflows/new-library.yml | 2 +- .github/workflows/owlbot.yml | 2 +- .github/workflows/release-please-now.yml | 2 +- .../storage-retry-conformance-test-against-emulator.yaml | 2 +- .github/workflows/tombstone-library.yml | 2 +- .github/workflows/update-pr.yml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 8eb859bbb74f..52699eea5737 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -20,7 +20,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Ruby 3.3 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b583db287bf..408f80a6331a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4dd5ca74858e..4f02481b660e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml index a46da0ee9f0d..496ce75465b7 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/conformance.yaml @@ -23,7 +23,7 @@ jobs: '3.4', ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby_version }} diff --git a/.github/workflows/delete-library.yml b/.github/workflows/delete-library.yml index 71ea5d6b4d6b..f2abd2e5f023 100644 --- a/.github/workflows/delete-library.yml +++ b/.github/workflows/delete-library.yml @@ -18,7 +18,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Ruby 3.4 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/new-library.yml b/.github/workflows/new-library.yml index c62235419282..7640626ca6f6 100644 --- a/.github/workflows/new-library.yml +++ b/.github/workflows/new-library.yml @@ -15,7 +15,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Ruby 3.3 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/owlbot.yml b/.github/workflows/owlbot.yml index ec6a36deb4ec..05915abf40a4 100644 --- a/.github/workflows/owlbot.yml +++ b/.github/workflows/owlbot.yml @@ -18,7 +18,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Ruby 3.3 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/release-please-now.yml b/.github/workflows/release-please-now.yml index a1de74b94e9a..2c2bb852fb19 100644 --- a/.github/workflows/release-please-now.yml +++ b/.github/workflows/release-please-now.yml @@ -21,7 +21,7 @@ jobs: pull-requests: write steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Ruby 3.3 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/storage-retry-conformance-test-against-emulator.yaml b/.github/workflows/storage-retry-conformance-test-against-emulator.yaml index 29fa9f134fca..f53b19170d10 100644 --- a/.github/workflows/storage-retry-conformance-test-against-emulator.yaml +++ b/.github/workflows/storage-retry-conformance-test-against-emulator.yaml @@ -23,7 +23,7 @@ jobs: - 9000:9000 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.3' diff --git a/.github/workflows/tombstone-library.yml b/.github/workflows/tombstone-library.yml index 292f02bf1f92..571194f6e182 100644 --- a/.github/workflows/tombstone-library.yml +++ b/.github/workflows/tombstone-library.yml @@ -18,7 +18,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Ruby 3.4 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/update-pr.yml b/.github/workflows/update-pr.yml index fe70542fac66..ff00a779ddbb 100644 --- a/.github/workflows/update-pr.yml +++ b/.github/workflows/update-pr.yml @@ -22,7 +22,7 @@ jobs: pull-requests: read steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Ruby 3.3 uses: ruby/setup-ruby@v1 with: From 274d427a990d36002e9b1941c78760dd201cefc2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:12:31 -0700 Subject: [PATCH 419/457] docs(shopping-merchant-accounts-v1): Fixed cross-reference links for OnlineReturnPolicy (#30832) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PiperOrigin-RevId: 794909405 Source-Link: https://github.com/googleapis/googleapis/commit/997100bfdcd7fe6dab9a1c90abce320f06f780be Source-Link: https://github.com/googleapis/googleapis-gen/commit/536644ec8a7fcdcede154f146d6c0341b0397891 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI1MzY2NDRlYzhhN2ZjZGNlZGUxNTRmMTQ2ZDZjMDM0MWIwMzk3ODkxIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../merchant/accounts/v1/online_return_policy_service.rb | 2 +- .../merchant/accounts/v1/online_return_policy_service/client.rb | 2 +- .../merchant/accounts/v1/online_return_policy_service/rest.rb | 2 +- .../accounts/v1/online_return_policy_service/rest/client.rb | 2 +- .../merchant/accounts/v1/online_return_policy_services_pb.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb index 3d751253de14..f1a59c1ef1da 100644 --- a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service.rb @@ -37,7 +37,7 @@ module V1 # configuration, encompassing return policies for both ads and free listings # ## programs. This API defines the following resource model: # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1#google.shopping.merchant.accounts.v1.OnlineReturnPolicy) + # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy OnlineReturnPolicy} # # @example Load this service and instantiate a gRPC client # diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb index 47abf30b45d6..e5efaa145c9b 100644 --- a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/client.rb @@ -32,7 +32,7 @@ module OnlineReturnPolicyService # configuration, encompassing return policies for both ads and free listings # ## programs. This API defines the following resource model: # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1#google.shopping.merchant.accounts.v1.OnlineReturnPolicy) + # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy OnlineReturnPolicy} # class Client # @private diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb index 1a825cd5294d..90b159d9dbbf 100644 --- a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest.rb @@ -36,7 +36,7 @@ module V1 # configuration, encompassing return policies for both ads and free listings # ## programs. This API defines the following resource model: # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1#google.shopping.merchant.accounts.v1.OnlineReturnPolicy) + # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy OnlineReturnPolicy} # # To load this service and instantiate a REST client: # diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb index 1ec2429be1f2..ff4950e833a8 100644 --- a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_service/rest/client.rb @@ -34,7 +34,7 @@ module Rest # configuration, encompassing return policies for both ads and free listings # ## programs. This API defines the following resource model: # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1#google.shopping.merchant.accounts.v1.OnlineReturnPolicy) + # {::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicy OnlineReturnPolicy} # class Client # @private diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb index 6005cef2f948..633b435af978 100644 --- a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/online_return_policy_services_pb.rb @@ -29,7 +29,7 @@ module OnlineReturnPolicyService # configuration, encompassing return policies for both ads and free listings # ## programs. This API defines the following resource model: # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1#google.shopping.merchant.accounts.v1.OnlineReturnPolicy) + # [OnlineReturnPolicy][google.shopping.merchant.accounts.v1.OnlineReturnPolicy] class Service include ::GRPC::GenericService From 4081d5c98958f970640dcfabba1163c6f9b47e3a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 14:42:10 -0700 Subject: [PATCH 420/457] chore: use HTTP binding configuration class from new gapic-common --- .../google-shopping-merchant-products-v1beta.gemspec | 2 +- .../merchant/products/v1beta/product_inputs_service_test.rb | 1 - .../shopping/merchant/products/v1beta/products_service_test.rb | 1 - .../google-shopping-merchant-promotions-v1.gemspec | 2 +- .../shopping/merchant/promotions/v1/promotions_service_test.rb | 1 - .../google-shopping-merchant-promotions-v1beta.gemspec | 2 +- .../merchant/promotions/v1beta/promotions_service_test.rb | 1 - .../google-shopping-merchant-quota-v1.gemspec | 2 +- .../google/shopping/merchant/quota/v1/quota_service_test.rb | 1 - .../google-shopping-merchant-quota-v1beta.gemspec | 2 +- .../google/shopping/merchant/quota/v1beta/quota_service_test.rb | 1 - .../google-shopping-merchant-reports-v1.gemspec | 2 +- .../google/shopping/merchant/reports/v1/report_service_test.rb | 1 - .../google-shopping-merchant-reports-v1beta.gemspec | 2 +- .../shopping/merchant/reports/v1beta/report_service_test.rb | 1 - .../google-shopping-merchant-reviews-v1beta.gemspec | 2 +- .../merchant/reviews/v1beta/merchant_reviews_service_test.rb | 1 - .../merchant/reviews/v1beta/product_reviews_service_test.rb | 1 - grafeas-v1/grafeas-v1.gemspec | 2 +- grafeas-v1/test/grafeas/v1/grafeas_test.rb | 1 - 20 files changed, 9 insertions(+), 20 deletions(-) diff --git a/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec b/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec index 93a5e822fcc5..46b56422fbfa 100644 --- a/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec +++ b/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb index 50d979418159..ebc49ae42f86 100644 --- a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb +++ b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/products/v1beta/productinputs_pb" -require "google/shopping/merchant/products/v1beta/productinputs_services_pb" require "google/shopping/merchant/products/v1beta/product_inputs_service" class ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb index b6d2d4f50738..fafdafcdf7bb 100644 --- a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb +++ b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/products/v1beta/products_pb" -require "google/shopping/merchant/products/v1beta/products_services_pb" require "google/shopping/merchant/products/v1beta/products_service" class ::Google::Shopping::Merchant::Products::V1beta::ProductsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec b/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec index f06ece6662ce..26daf042e5bf 100644 --- a/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec +++ b/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb index 4782ccfcfdfe..be352f966c89 100644 --- a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb +++ b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/promotions/v1/promotions_pb" -require "google/shopping/merchant/promotions/v1/promotions_services_pb" require "google/shopping/merchant/promotions/v1/promotions_service" class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec b/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec index f2025134e55a..84712af8cf7f 100644 --- a/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec +++ b/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb b/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb index ef51f5e3b198..ef5681648d92 100644 --- a/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb +++ b/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/promotions/v1beta/promotions_pb" -require "google/shopping/merchant/promotions/v1beta/promotions_services_pb" require "google/shopping/merchant/promotions/v1beta/promotions_service" class ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec b/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec index 6c3e96bdf787..e76499f4324c 100644 --- a/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec +++ b/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb b/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb index 70d2aa05d425..fbae3dc194a2 100644 --- a/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb +++ b/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/quota/v1/quota_pb" -require "google/shopping/merchant/quota/v1/quota_services_pb" require "google/shopping/merchant/quota/v1/quota_service" class ::Google::Shopping::Merchant::Quota::V1::QuotaService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec b/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec index 2b0ba35031b0..5c36fab6e1da 100644 --- a/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec +++ b/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb b/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb index 2dd265b2ffcd..47e8a3d39626 100644 --- a/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb +++ b/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/quota/v1beta/quota_pb" -require "google/shopping/merchant/quota/v1beta/quota_services_pb" require "google/shopping/merchant/quota/v1beta/quota_service" class ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec b/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec index 1b54ee3f5f89..5334cc9c4bd3 100644 --- a/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec +++ b/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb index 76e0d3cde1b2..c23de20690d2 100644 --- a/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb +++ b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/reports/v1/reports_pb" -require "google/shopping/merchant/reports/v1/reports_services_pb" require "google/shopping/merchant/reports/v1/report_service" class ::Google::Shopping::Merchant::Reports::V1::ReportService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec b/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec index e21df97e92dd..44b2f2f3b8f6 100644 --- a/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec +++ b/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb b/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb index 16f65032503b..0841693c4a3e 100644 --- a/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb +++ b/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/reports/v1beta/reports_pb" -require "google/shopping/merchant/reports/v1beta/reports_services_pb" require "google/shopping/merchant/reports/v1beta/report_service" class ::Google::Shopping::Merchant::Reports::V1beta::ReportService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec b/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec index 34b04535f24c..4fc06b70ad9e 100644 --- a/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec +++ b/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb index 9f88d3fec6e1..b087da3c91ae 100644 --- a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb +++ b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/reviews/v1beta/merchantreviews_pb" -require "google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb" require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service" class ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb index cfb4596f73b1..514c65625588 100644 --- a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb +++ b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/reviews/v1beta/productreviews_pb" -require "google/shopping/merchant/reviews/v1beta/productreviews_services_pb" require "google/shopping/merchant/reviews/v1beta/product_reviews_service" class ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::ClientTest < Minitest::Test diff --git a/grafeas-v1/grafeas-v1.gemspec b/grafeas-v1/grafeas-v1.gemspec index 7d2883ac15f9..87389e07938c 100644 --- a/grafeas-v1/grafeas-v1.gemspec +++ b/grafeas-v1/grafeas-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/grafeas-v1/test/grafeas/v1/grafeas_test.rb b/grafeas-v1/test/grafeas/v1/grafeas_test.rb index 47b285d95f5d..e833d6b527b6 100644 --- a/grafeas-v1/test/grafeas/v1/grafeas_test.rb +++ b/grafeas-v1/test/grafeas/v1/grafeas_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "grafeas/v1/grafeas_pb" -require "grafeas/v1/grafeas_services_pb" require "grafeas/v1/grafeas" class ::Grafeas::V1::Grafeas::ClientTest < Minitest::Test From 049e9b7623806148ebd7434fd8ba4931eaa7cc88 Mon Sep 17 00:00:00 2001 From: Charlotte Y <38296042+cy-yun@users.noreply.github.com> Date: Thu, 14 Aug 2025 14:43:58 -0700 Subject: [PATCH 421/457] feat(BigQuery): Add support for format_options_use_int64_timestamp (#30755) --- .../acceptance/bigquery/bigquery_test.rb | 16 ++++ .../lib/google/cloud/bigquery/convert.rb | 11 ++- .../lib/google/cloud/bigquery/data.rb | 12 ++- .../lib/google/cloud/bigquery/dataset.rb | 5 +- .../lib/google/cloud/bigquery/project.rb | 6 +- .../lib/google/cloud/bigquery/query_job.rb | 13 +-- .../lib/google/cloud/bigquery/service.rb | 12 ++- .../lib/google/cloud/bigquery/table.rb | 9 +- .../google/cloud/bigquery/convert_test.rb | 79 +++++++++++++++++ .../test/google/cloud/bigquery/data_test.rb | 68 +++++++-------- .../bigquery/dataset_query_external_test.rb | 4 +- .../dataset_query_named_params_test.rb | 80 +++++++++--------- .../dataset_query_positional_params_test.rb | 80 +++++++++--------- .../cloud/bigquery/dataset_query_test.rb | 12 +-- .../bigquery/project_query_external_test.rb | 4 +- .../project_query_named_params_test.rb | 84 +++++++++---------- .../project_query_positional_params_test.rb | 80 +++++++++--------- .../cloud/bigquery/project_query_test.rb | 30 +++---- .../cloud/bigquery/query_job_data_test.rb | 56 ++++++------- .../cloud/bigquery/table_reference_test.rb | 2 +- google-cloud-bigquery/test/helper.rb | 4 +- 21 files changed, 397 insertions(+), 270 deletions(-) diff --git a/google-cloud-bigquery/acceptance/bigquery/bigquery_test.rb b/google-cloud-bigquery/acceptance/bigquery/bigquery_test.rb index 5f8b12ac202e..007ae62eb938 100644 --- a/google-cloud-bigquery/acceptance/bigquery/bigquery_test.rb +++ b/google-cloud-bigquery/acceptance/bigquery/bigquery_test.rb @@ -311,4 +311,20 @@ data = bigquery.query "SELECT * FROM #{dataset_id}.temp_table;", session_id: session_id _(data.count).must_equal 6 end + + it "tests timestamp queries" do + query_string = "SELECT * FROM UNNEST(GENERATE_TIMESTAMP_ARRAY(" \ + "'2099-10-01 00:00:00.123456', " \ + "'2099-10-01 00:10:00.123456', INTERVAL 1 MINUTE))" \ + " AS dob" + + int64_data = bigquery.query query_string, format_options_use_int64_timestamp: true + float_data = bigquery.query query_string, format_options_use_int64_timestamp: false + _(int64_data.class).must_equal Google::Cloud::Bigquery::Data + _(float_data.class).must_equal Google::Cloud::Bigquery::Data + _(int64_data).must_equal float_data + int64_data.each do |row| + _(row[:dob]).must_be_kind_of ::Time + end + end end diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/convert.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/convert.rb index df6312c2eb64..f33fdfb616c2 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/convert.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/convert.rb @@ -60,6 +60,10 @@ def self.format_row row, fields end end + def self.is_int? value + /\A\s*[-+]?\d+\s*\z/.match? value.to_s + end + # rubocop:disable all def self.format_value value, field @@ -96,7 +100,12 @@ def self.format_value value, field elsif field.type == "BYTES" StringIO.new Base64.decode64 value[:v] elsif field.type == "TIMESTAMP" - ::Time.at Float(value[:v]) + if is_int?(value[:v]) + # Convert microseconds to seconds + ::Time.at Rational(Integer(value[:v]), 1_000_000) + else + ::Time.at Rational(value[:v]) + end elsif field.type == "TIME" Bigquery::Time.new value[:v] elsif field.type == "DATETIME" diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/data.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/data.rb index 145809f3a122..61ae92c8a7df 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/data.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/data.rb @@ -66,6 +66,10 @@ class Data < DelegateClass(::Array) # @private The query Job gapi object, or nil if from Table#data. attr_accessor :job_gapi + ## + # @private Whether to output timestamp as usec int64. + attr_accessor :format_options_use_int64_timestamp + # @private def initialize arr = [] @service = nil @@ -473,8 +477,9 @@ def next data_json = service.list_tabledata \ @table_gapi.table_reference.dataset_id, @table_gapi.table_reference.table_id, - token: token - self.class.from_gapi_json data_json, @table_gapi, job_gapi, @service + token: token, + format_options_use_int64_timestamp: @format_options_use_int64_timestamp + self.class.from_gapi_json data_json, @table_gapi, job_gapi, @service, @format_options_use_int64_timestamp end ## @@ -549,7 +554,7 @@ def all request_limit: nil, &block ## # @private New Data from a response object. - def self.from_gapi_json gapi_json, table_gapi, job_gapi, service + def self.from_gapi_json gapi_json, table_gapi, job_gapi, service, format_options_use_int64_timestamp rows = gapi_json[:rows] || [] rows = Convert.format_rows rows, table_gapi.schema.fields unless rows.empty? @@ -558,6 +563,7 @@ def self.from_gapi_json gapi_json, table_gapi, job_gapi, service data.gapi_json = gapi_json data.job_gapi = job_gapi data.service = service + data.format_options_use_int64_timestamp = format_options_use_int64_timestamp data end diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb index 06e0e9156a81..e7529f2ed786 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb @@ -1710,6 +1710,8 @@ def query_job query, # `flatten` is false. Optional. The default value is false. # @param [String] session_id The ID of an existing session. See the # `create_session` param in {#query_job} and {Job#session_id}. + # @param [Boolean] format_options_use_int64_timestamp Output timestamp + # as usec int64. Default is true. # @yield [job] a job configuration object # @yieldparam [Google::Cloud::Bigquery::QueryJob::Updater] job a job # configuration object for setting additional options for the query. @@ -1864,6 +1866,7 @@ def query query, standard_sql: nil, legacy_sql: nil, session_id: nil, + format_options_use_int64_timestamp: true, &block job = query_job query, params: params, @@ -1877,7 +1880,7 @@ def query query, job.wait_until_done! ensure_job_succeeded! job - job.data max: max + job.data max: max, format_options_use_int64_timestamp: format_options_use_int64_timestamp end ## diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb index 4afce66213c8..b7a144323033 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb @@ -783,6 +783,9 @@ def query_job query, # `flatten` is false. Optional. The default value is false. # @param [String] session_id The ID of an existing session. See the # `create_session` param in {#query_job} and {Job#session_id}. + # @param [Boolean] format_options_use_int64_timestamp Output timestamp + # as usec int64. Default is true. + # # @yield [job] a job configuration object # @yieldparam [Google::Cloud::Bigquery::QueryJob::Updater] job a job # configuration object for setting additional options for the query. @@ -929,6 +932,7 @@ def query query, standard_sql: nil, legacy_sql: nil, session_id: nil, + format_options_use_int64_timestamp: true, &block job = query_job query, params: params, @@ -953,7 +957,7 @@ def query query, end end - job.data max: max + job.data max: max, format_options_use_int64_timestamp: format_options_use_int64_timestamp end ## diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/query_job.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/query_job.rb index 683c846d5f96..0dca517e5184 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/query_job.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/query_job.rb @@ -723,6 +723,8 @@ def wait_until_done! # identifying the result set. # @param [Integer] max Maximum number of results to return. # @param [Integer] start Zero-based index of the starting row to read. + # @param [Boolean] format_options_use_int64_timestamp Output timestamp + # as usec int64. Default is true. # # @return [Google::Cloud::Bigquery::Data] An object providing access to # data read from the destination table for the job. @@ -745,20 +747,21 @@ def wait_until_done! # # Retrieve the next page of results # data = data.next if data.next? # - def data token: nil, max: nil, start: nil + def data token: nil, max: nil, start: nil, format_options_use_int64_timestamp: true return nil unless done? - return Data.from_gapi_json({ rows: [] }, nil, @gapi, service) if dryrun? + return Data.from_gapi_json({ rows: [] }, nil, @gapi, service, format_options_use_int64_timestamp) if dryrun? if ddl? || dml? || !ensure_schema! data_hash = { totalRows: nil, rows: [] } - return Data.from_gapi_json data_hash, nil, @gapi, service + return Data.from_gapi_json data_hash, nil, @gapi, service, format_options_use_int64_timestamp end data_hash = service.list_tabledata destination_table_dataset_id, destination_table_table_id, token: token, max: max, - start: start - Data.from_gapi_json data_hash, destination_table_gapi, @gapi, service + start: start, + format_options_use_int64_timestamp: format_options_use_int64_timestamp + Data.from_gapi_json data_hash, destination_table_gapi, @gapi, service, format_options_use_int64_timestamp end alias query_results data diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/service.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/service.rb index cdd95ccaf018..5af40429b0af 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/service.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/service.rb @@ -244,7 +244,8 @@ def delete_table dataset_id, table_id ## # Retrieves data from the table. - def list_tabledata dataset_id, table_id, max: nil, token: nil, start: nil + def list_tabledata dataset_id, table_id, max: nil, token: nil, start: nil, + format_options_use_int64_timestamp: nil # The list operation is considered idempotent execute backoff: true do json_txt = service.list_table_data \ @@ -252,7 +253,8 @@ def list_tabledata dataset_id, table_id, max: nil, token: nil, start: nil max_results: max, page_token: token, start_index: start, - options: { skip_deserialization: true } + options: { skip_deserialization: true }, + format_options_use_int64_timestamp: format_options_use_int64_timestamp JSON.parse json_txt, symbolize_names: true end end @@ -456,7 +458,8 @@ def delete_job job_id, location: nil ## # Returns the query data for the job - def job_query_results job_id, location: nil, max: nil, token: nil, start: nil, timeout: nil + def job_query_results job_id, location: nil, max: nil, token: nil, + start: nil, timeout: nil, format_options_use_int64_timestamp: nil # The get operation is considered idempotent execute backoff: true do service.get_job_query_results @project, job_id, @@ -464,7 +467,8 @@ def job_query_results job_id, location: nil, max: nil, token: nil, start: nil, t max_results: max, page_token: token, start_index: start, - timeout_ms: timeout + timeout_ms: timeout, + format_options_use_int64_timestamp: format_options_use_int64_timestamp end end diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/table.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/table.rb index 2df72b127c42..4a458b0d92cb 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/table.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/table.rb @@ -1701,6 +1701,8 @@ def test_iam_permissions *permissions # # @param [Integer] max Maximum number of results to return. # @param [Integer] start Zero-based index of the starting row to read. + # @param [Boolean] format_options_use_int64_timestamp Output timestamp + # as usec int64. Default is true. # # @return [Google::Cloud::Bigquery::Data] # @@ -1735,11 +1737,12 @@ def test_iam_permissions *permissions # # @!group Data # - def data token: nil, max: nil, start: nil + def data token: nil, max: nil, start: nil, format_options_use_int64_timestamp: true ensure_service! reload! unless resource_full? - data_json = service.list_tabledata dataset_id, table_id, token: token, max: max, start: start - Data.from_gapi_json data_json, gapi, nil, service + data_json = service.list_tabledata dataset_id, table_id, token: token, max: max, start: start, +format_options_use_int64_timestamp: format_options_use_int64_timestamp + Data.from_gapi_json data_json, gapi, nil, service, format_options_use_int64_timestamp end ## diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/convert_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/convert_test.rb index 3b07e79784c6..6bf86cb114bc 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/convert_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/convert_test.rb @@ -62,5 +62,84 @@ _(f).must_be_kind_of ::Float _(f).must_be :nan? end + + it "converts int timestamps correctly" do + timestamp_type = Google::Apis::BigqueryV2::TableFieldSchema.new(type: "TIMESTAMP") + + t = Google::Cloud::Bigquery::Convert.format_value({ v: "2340923121090009" }, timestamp_type) + _(t).must_be_kind_of ::Time + _(t).must_equal Time.parse("2044-03-07 00:25:21.090009 UTC") + + t = Google::Cloud::Bigquery::Convert.format_value({ v: "1153597991234501" }, timestamp_type) + _(t).must_be_kind_of ::Time + _(t).must_equal Time.parse("2006-07-22 19:53:11.234501 UTC") + + t = Google::Cloud::Bigquery::Convert.format_value({ v: "-3094578602833888" }, timestamp_type) + _(t).must_be_kind_of ::Time + _(t).must_equal Time.parse("1871-12-09 02:49:57.166112 UTC") + end + + it "converts float timestamps correctly" do + timestamp_type = Google::Apis::BigqueryV2::TableFieldSchema.new(type: "TIMESTAMP") + + t = Google::Cloud::Bigquery::Convert.format_value({ v: "2340923121.090009" }, timestamp_type) + _(t).must_be_kind_of ::Time + _(t).must_equal Time.parse("2044-03-07 00:25:21.090009 UTC") + + t = Google::Cloud::Bigquery::Convert.format_value({ v: "1153597991.234501" }, timestamp_type) + _(t).must_be_kind_of ::Time + _(t).must_equal Time.parse("2006-07-22 19:53:11.234501 UTC") + + t = Google::Cloud::Bigquery::Convert.format_value({ v: "-3094578602.833888" }, timestamp_type) + _(t).must_be_kind_of ::Time + _(t).must_equal Time.parse("1871-12-09 02:49:57.166112 UTC") + end + end + + describe :is_int? do + it 'returns true for positive integers' do + expect(Google::Cloud::Bigquery::Convert.is_int?(123)).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(45)).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(0)).must_equal true + end + + it 'returns true for negative integers' do + expect(Google::Cloud::Bigquery::Convert.is_int?(-987)).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(-1)).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(-0)).must_equal true + end + + it 'returns true for integers with a plus sign' do + expect(Google::Cloud::Bigquery::Convert.is_int?(+123)).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(+0)).must_equal true + end + + it 'returns true for integers with leading and trailing whitespace' do + expect(Google::Cloud::Bigquery::Convert.is_int?(" 123 ")).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(" 45 ")).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(" -987 \t\n")).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(" +1 ")).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?(" \t 0\n")).must_equal true + end + + it 'returns false for non-integers' do + expect(Google::Cloud::Bigquery::Convert.is_int?("abc")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?("12.34")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?(12.34)).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?("12 3")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?("++12")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?(" - ")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?("-")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?("+")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?(nil)).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?("")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?(" ")).must_equal false + expect(Google::Cloud::Bigquery::Convert.is_int?(" - 0 ")).must_equal false + end + + it 'returns true for numbers as strings' do + expect(Google::Cloud::Bigquery::Convert.is_int?("123")).must_equal true + expect(Google::Cloud::Bigquery::Convert.is_int?("-123")).must_equal true + end end end diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/data_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/data_test.rb index 7de9a9226252..4a254ec031a0 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/data_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/data_test.rb @@ -28,7 +28,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data mock.verify @@ -57,7 +57,7 @@ _(data[1][:pi]).must_be :nil? _(data[1][:active]).must_equal false _(data[1][:avatar]).must_be :nil? - _(data[1][:started_at]).must_be :nil? + _(data[1][:started_at]).must_equal Time.parse("2016-12-25 13:00:00 UTC") _(data[1][:duration]).must_equal Google::Cloud::Bigquery::Time.new("04:32:10.555555") _(data[1][:target_end]).must_be :nil? _(data[1][:birthday]).must_be :nil? @@ -80,7 +80,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data mock.verify @@ -105,7 +105,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data mock.verify @@ -127,7 +127,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, nil_table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true nil_data = table.data mock.verify @@ -167,7 +167,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, nested_table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true nested_data = nested_table.data mock.verify @@ -212,7 +212,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, nested_table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true nested_data = nested_table.data mock.verify @@ -228,10 +228,10 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data1 = table.data @@ -248,10 +248,10 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi(token: nil).to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data1 = table.data @@ -270,10 +270,10 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi(token: nil).to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data.all.to_a @@ -287,10 +287,10 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi(token: nil).to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data @@ -303,10 +303,10 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, - table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + table_data_gapi(token: nil).to_json, + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data.all.take(5) @@ -320,10 +320,10 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data.all(request_limit: 1).to_a @@ -337,7 +337,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: 3, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: 3, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data max: 3 _(data.class).must_equal Google::Cloud::Bigquery::Data @@ -348,7 +348,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: 25, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: 25, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data start: 25 mock.verify @@ -361,7 +361,7 @@ it "knows its DDL ALTER_TABLE statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "ALTER_TABLE" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "ALTER_TABLE" _(data.ddl?).must_equal true @@ -370,7 +370,7 @@ it "knows its DDL CREATE_MODEL statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "CREATE_MODEL" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "CREATE_MODEL" _(data.ddl?).must_equal true @@ -379,7 +379,7 @@ it "knows its DDL CREATE_TABLE statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "CREATE_TABLE" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "CREATE_TABLE" _(data.ddl?).must_equal true @@ -388,7 +388,7 @@ it "knows its DDL CREATE_TABLE_AS_SELECT statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "CREATE_TABLE_AS_SELECT" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "CREATE_TABLE_AS_SELECT" _(data.ddl?).must_equal true @@ -397,7 +397,7 @@ it "knows its DDL CREATE_VIEW statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "CREATE_VIEW" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "CREATE_VIEW" _(data.ddl?).must_equal true @@ -406,7 +406,7 @@ it "knows its DDL DROP_MODEL statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "DROP_MODEL" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "DROP_MODEL" _(data.ddl?).must_equal true @@ -415,7 +415,7 @@ it "knows its DDL DROP_TABLE statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "DROP_TABLE" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "DROP_TABLE" _(data.ddl?).must_equal true @@ -424,7 +424,7 @@ it "knows its DDL DROP_VIEW statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "DROP_VIEW" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "DROP_VIEW" _(data.ddl?).must_equal true @@ -433,7 +433,7 @@ it "knows its DML INSERT statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "INSERT" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "INSERT" _(data.ddl?).must_equal false @@ -442,7 +442,7 @@ it "knows its DML UPDATE statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "UPDATE" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "UPDATE" _(data.ddl?).must_equal false @@ -451,7 +451,7 @@ it "knows its DML MERGE statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "MERGE" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "MERGE" _(data.ddl?).must_equal false @@ -460,7 +460,7 @@ it "knows its DML DELETE statement type" do gapi = query_job_resp_gapi "query is ignored", statement_type: "DELETE" - data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil + data = Google::Cloud::Bigquery::Data.from_gapi_json data_hash, nil, gapi, nil, true _(data.statement_type).must_equal "DELETE" _(data.ddl?).must_equal false diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_external_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_external_test.rb index 0e9374347fdd..cf730d5de906 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_external_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_external_test.rb @@ -39,10 +39,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true external_csv = dataset.external "gs://my-bucket/path/to/file.csv" data = dataset.query query, external: { my_csv: external_csv } diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_named_params_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_named_params_test.rb index 1abb33e5abe1..4b0f80284407 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_named_params_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_named_params_test.rb @@ -43,10 +43,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE name = @name", params: { name: "Testy McTesterson" } mock.verify @@ -75,10 +75,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE age > @age", params: { age: 35 } mock.verify @@ -107,10 +107,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE age > @age", params: { age: "35" }, types: { age: :INT64 } mock.verify @@ -139,10 +139,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE score > @score", params: { score: 90.0 } mock.verify @@ -171,10 +171,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE pi = @pi", params: { pi: BigDecimal("3.141592654") } mock.verify @@ -203,10 +203,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE my_bignumeric = @my_bignumeric", params: { my_bignumeric: BigDecimal("123456798.98765432100001") }, @@ -237,10 +237,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE active = @active", params: { active: true } mock.verify @@ -269,10 +269,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE active = @active", params: { active: false } mock.verify @@ -303,10 +303,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE create_date = @day", params: { day: today } mock.verify @@ -337,10 +337,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE update_datetime < @when", params: { when: now } mock.verify @@ -371,10 +371,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE update_timestamp < @when", params: { when: now } mock.verify @@ -405,10 +405,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE create_time = @time", params: { time: timeofday } mock.verify @@ -439,10 +439,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE avatar = @file", params: { file: file } mock.verify @@ -473,10 +473,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE avatar = @file", params: { file: file } mock.verify @@ -559,10 +559,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE name = @name" + " AND age > @age" + @@ -611,10 +611,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE name IN @names", params: { names: %w{name1 name2 name3} } mock.verify @@ -653,10 +653,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE my_bignumeric IN @my_params", params: { my_params: [param_1, param_2, param_3] }, @@ -694,10 +694,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE age IN @ages", params: { ages: ["1", "2", "3"] }, types: { ages: [:INT64] } mock.verify @@ -745,10 +745,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE meta = @meta", params: { meta: { name: "Testy McTesterson", age: 42, active: false, score: 98.7 } } mock.verify @@ -784,10 +784,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE meta = @meta", params: { meta: { age: "42" } }, types: { meta: { age: :INT64 } } mock.verify diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_positional_params_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_positional_params_test.rb index e4572123ab4d..03fd2b000829 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_positional_params_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_positional_params_test.rb @@ -42,10 +42,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE name = ?", params: ["Testy McTesterson"] @@ -74,10 +74,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE age > ?", params: [35] mock.verify @@ -105,10 +105,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE age > ?", params: ["35"], types: [:INT64] mock.verify @@ -136,10 +136,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE score > ?", params: [90.0] mock.verify @@ -167,10 +167,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE pi = ?", params: [BigDecimal("3.141592654")] mock.verify @@ -198,10 +198,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE my_bignumeric = ?", params: [BigDecimal("123456798.98765432100001")], @@ -231,10 +231,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE active = ?", params: [true] mock.verify @@ -262,10 +262,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE active = ?", params: [false] mock.verify @@ -295,10 +295,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE create_date = ?", params: [today] mock.verify @@ -328,10 +328,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE update_datetime < ?", params: [now] mock.verify @@ -361,10 +361,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE update_timestamp < ?", params: [now] mock.verify @@ -394,10 +394,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE create_time = ?", params: [timeofday] mock.verify @@ -427,10 +427,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE avatar = ?", params: [file] mock.verify @@ -460,10 +460,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE avatar = ?", params: [file] mock.verify @@ -539,10 +539,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE name = ?" + " AND age > ?" + @@ -585,10 +585,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE name IN ?", params: [%w{name1 name2 name3}] mock.verify @@ -626,10 +626,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE my_bignumeric IN ?", params: [[param_1, param_2, param_3]], types: [[:BIGNUMERIC]] mock.verify @@ -664,10 +664,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE age IN ?", params: [["1","2","3"]], types: [[:INT64]] mock.verify @@ -714,10 +714,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE meta = ?", params: [{name: "Testy McTesterson", age: 42, active: false, score: 98.7}] mock.verify @@ -752,10 +752,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query "#{query} WHERE meta = ?", params: [{ age: "42" }], types: [{ age: :INT64 }] mock.verify diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_test.rb index bc98f72e584f..fe6ba69eb392 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_query_test.rb @@ -32,10 +32,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query query _(data.class).must_equal Google::Cloud::Bigquery::Data @@ -52,10 +52,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query query, session_id: session_id _(data.class).must_equal Google::Cloud::Bigquery::Data @@ -75,10 +75,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = dataset.query query _(data.class).must_equal Google::Cloud::Bigquery::Data diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/project_query_external_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/project_query_external_test.rb index 5426b12cda0d..c998e3e74d61 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/project_query_external_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/project_query_external_test.rb @@ -38,10 +38,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true external_csv = bigquery.external "gs://my-bucket/path/to/file.csv" data = bigquery.query query, external: { my_csv: external_csv } diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/project_query_named_params_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/project_query_named_params_test.rb index 4ec0d37965f7..05c06476b396 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/project_query_named_params_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/project_query_named_params_test.rb @@ -46,10 +46,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE name = @name", params: { name: "Testy McTesterson" } mock.verify @@ -78,10 +78,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE age > @age", params: { age: 35 } mock.verify @@ -110,10 +110,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE age > @age", params: { age: "35" }, types: { age: :INT64 } mock.verify @@ -142,10 +142,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE score > @score", params: { score: 90.0 } mock.verify @@ -174,10 +174,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE pi = @pi", params: { pi: BigDecimal("3.141592654") } mock.verify @@ -206,10 +206,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE my_bignumeric = @my_bignumeric", params: { my_bignumeric: BigDecimal("123456798.98765432100001") }, @@ -240,10 +240,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE active = @active", params: { active: true } mock.verify @@ -272,10 +272,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE active = @active", params: { active: false } mock.verify @@ -306,10 +306,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE create_date = @day", params: { day: today } mock.verify @@ -340,10 +340,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE update_datetime < @when", params: { when: now } mock.verify @@ -374,10 +374,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE update_timestamp < @when", params: { when: now } mock.verify @@ -408,10 +408,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE create_time = @time", params: { time: timeofday } mock.verify @@ -442,10 +442,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE avatar = @file", params: { file: file } mock.verify @@ -476,10 +476,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE avatar = @file", params: { file: file } mock.verify @@ -562,10 +562,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE name = @name" + " AND age > @age" + @@ -614,10 +614,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE name IN @names", params: { names: %w{name1 name2 name3} } mock.verify @@ -656,10 +656,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE my_bignumeric IN @my_params", params: { my_params: [param_1, param_2, param_3] }, @@ -697,10 +697,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE age IN @ages", params: { ages: ["1", "2", "3"] }, types: { ages: [:INT64] } mock.verify @@ -748,10 +748,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE meta = @meta", params: { meta: { name: "Testy McTesterson", age: 42, active: false, score: 98.7 } } mock.verify @@ -787,10 +787,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE meta = @meta", params: { meta: { age: "42" } }, types: { meta: { age: :INT64 } } mock.verify @@ -846,10 +846,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE my_structs IN @my_structs", params: { my_structs: [{ name: "Testy McTesterson", age: 42, active: false, score: 98.7 }] }, diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/project_query_positional_params_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/project_query_positional_params_test.rb index 626b7c9e992c..daa6f5f70317 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/project_query_positional_params_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/project_query_positional_params_test.rb @@ -46,10 +46,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE name = ?", params: ["Testy McTesterson"] mock.verify @@ -77,10 +77,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE age > ?", params: [35] mock.verify @@ -108,10 +108,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE age > ?", params: ["35"], types: [:INT64] mock.verify @@ -139,10 +139,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE score > ?", params: [90.0] mock.verify @@ -170,10 +170,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE pi = ?", params: [BigDecimal("3.141592654")] mock.verify @@ -201,10 +201,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE my_bignumeric = ?", params: [BigDecimal("123456798.98765432100001")], @@ -234,10 +234,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE active = ?", params: [true] mock.verify @@ -265,10 +265,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE active = ?", params: [false] mock.verify @@ -298,10 +298,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE create_date = ?", params: [today] mock.verify @@ -331,10 +331,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE update_datetime < ?", params: [now] mock.verify @@ -364,10 +364,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE update_timestamp < ?", params: [now] mock.verify @@ -397,10 +397,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE create_time = ?", params: [timeofday] mock.verify @@ -430,10 +430,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE avatar = ?", params: [file] mock.verify @@ -463,10 +463,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE avatar = ?", params: [file] mock.verify @@ -542,10 +542,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE name = ?" + " AND age > ?" + @@ -588,10 +588,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE name IN ?", params: [%w{name1 name2 name3}] mock.verify @@ -629,10 +629,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE my_bignumeric IN ?", params: [[param_1, param_2, param_3]], types: [[:BIGNUMERIC]] mock.verify @@ -667,10 +667,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE age IN ?", params: [["1","2","3"]], types: [[:INT64]] mock.verify @@ -717,10 +717,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE meta = ?", params: [{name: "Testy McTesterson", age: 42, active: false, score: 98.7}] mock.verify @@ -755,10 +755,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query "#{query} WHERE meta = ?", params: [{ age: "42" }], types: [{ age: :INT64 }] mock.verify diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/project_query_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/project_query_test.rb index 222be7196435..42c60f67c1be 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/project_query_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/project_query_test.rb @@ -39,10 +39,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query query mock.verify @@ -205,13 +205,13 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query query # data.must_be_kind_of Google::Cloud::Bigquery::Data @@ -234,10 +234,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: 42, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: 42, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query query, max: 42 _(data.class).must_equal Google::Cloud::Bigquery::Data @@ -256,10 +256,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query query, dataset: "some_random_dataset" _(data.class).must_equal Google::Cloud::Bigquery::Data @@ -278,10 +278,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query query, dataset: "some_random_dataset", project: "some_random_project" @@ -300,10 +300,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query query, cache: false @@ -320,10 +320,10 @@ mock.expect :insert_job, query_job_resp_gapi(query, job_id: job_id), [project, job_gapi] mock.expect :get_job_query_results, query_data_gapi, - [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, "target_dataset_id", "target_table_id"], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = bigquery.query query, session_id: session_id _(data.class).must_equal Google::Cloud::Bigquery::Data diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/query_job_data_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/query_job_data_test.rb index 8a5f403990ab..dbd3a34b0050 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/query_job_data_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/query_job_data_test.rb @@ -26,10 +26,10 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true _(job).must_be :done? data = job.data @@ -59,7 +59,7 @@ _(data[1][:pi]).must_be :nil? _(data[1][:active]).must_equal false _(data[1][:avatar]).must_be :nil? - _(data[1][:started_at]).must_be :nil? + _(data[1][:started_at]).must_equal Time.parse("2016-12-25 13:00:00 UTC") _(data[1][:duration]).must_equal Google::Cloud::Bigquery::Time.new("04:32:10.555555") _(data[1][:target_end]).must_be :nil? _(data[1][:birthday]).must_be :nil? @@ -82,7 +82,7 @@ bigquery.service.mocked_service = mock mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true job.instance_variable_set :@destination_schema_gapi, query_data_gapi.schema @@ -114,7 +114,7 @@ _(data[1][:pi]).must_be :nil? _(data[1][:active]).must_equal false _(data[1][:avatar]).must_be :nil? - _(data[1][:started_at]).must_be :nil? + _(data[1][:started_at]).must_equal Time.parse("2016-12-25 13:00:00 UTC") _(data[1][:duration]).must_equal Google::Cloud::Bigquery::Time.new("04:32:10.555555") _(data[1][:target_end]).must_be :nil? _(data[1][:birthday]).must_be :nil? @@ -137,13 +137,13 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data1 = job.data @@ -160,13 +160,13 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi(token: nil).to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data1 = job.data @@ -185,13 +185,13 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi(token: nil).to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = job.data.all.to_a @@ -205,13 +205,13 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi(token: nil).to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = job.data @@ -224,13 +224,13 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = job.data.all.take(5) @@ -244,13 +244,13 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: "token1234567890", start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = job.data.all(request_limit: 1).to_a @@ -264,10 +264,10 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: 3, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: 3, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = job.data max: 3 _(data.class).must_equal Google::Cloud::Bigquery::Data @@ -278,10 +278,10 @@ bigquery.service.mocked_service = mock mock.expect :get_job_query_results, query_data_gapi, - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: 25, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: 25, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = job.data start: 25 mock.verify @@ -307,7 +307,7 @@ } mock.expect :get_job_query_results, Google::Apis::BigqueryV2::QueryResponse.from_json(query_hash.to_json), - [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil + [project, job.job_id], location: "US", max_results: 0, page_token: nil, start_index: nil, timeout_ms: nil, format_options_use_int64_timestamp: nil data = job.data start: 25 mock.verify diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/table_reference_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/table_reference_test.rb index d0edfa5ad17a..8e90a6d85c06 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/table_reference_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/table_reference_test.rb @@ -205,7 +205,7 @@ mock.expect :get_table, table_gapi, [table.project_id, table.dataset_id, table.table_id], **patch_table_args mock.expect :list_table_data, table_data_gapi.to_json, - [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true} + [project, dataset_id, table_id], max_results: nil, page_token: nil, start_index: nil, options: {skip_deserialization: true}, format_options_use_int64_timestamp: true data = table.data mock.verify diff --git a/google-cloud-bigquery/test/helper.rb b/google-cloud-bigquery/test/helper.rb index 4cf75d164d21..831da5b7ea6a 100644 --- a/google-cloud-bigquery/test/helper.rb +++ b/google-cloud-bigquery/test/helper.rb @@ -208,7 +208,7 @@ def random_data_rows { "v" => "3.141592654" }, { "v" => "true" }, { "v" => "aW1hZ2UgZGF0YQ==" }, - { "v" => "1482670800.0" }, + { "v" => "1482670800000000" }, { "v" => "04:00:00" }, { "v" => "2017-01-01 00:00:00" }, { "v" => "1968-10-20" }, @@ -225,7 +225,7 @@ def random_data_rows { "v" => nil }, { "v" => "false" }, { "v" => nil }, - { "v" => nil }, + { "v" => "1482670800.0" }, { "v" => "04:32:10.555555" }, { "v" => nil }, { "v" => nil }, From bdd3d7ef803902e02a6f3d0721436687f9a1d9f7 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Thu, 14 Aug 2025 14:48:43 -0700 Subject: [PATCH 422/457] feat: Initial generation of google-cloud-managed_kafka-schema_registry-v1 (#30852) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 + .../.owlbot-manifest.json | 79 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++ .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 153 + ...d-managed_kafka-schema_registry-v1.gemspec | 29 + ...-cloud-managed_kafka-schema_registry-v1.rb | 21 + .../cloud/managed_kafka/schema_registry/v1.rb | 47 + .../schema_registry/v1/bindings_override.rb | 77 + .../v1/managed_schema_registry.rb | 105 + .../v1/managed_schema_registry/client.rb | 3110 +++++++++++++++++ .../v1/managed_schema_registry/credentials.rb | 49 + .../v1/managed_schema_registry/paths.rb | 424 +++ .../v1/managed_schema_registry/rest.rb | 103 + .../v1/managed_schema_registry/rest/client.rb | 2903 +++++++++++++++ .../rest/service_stub.rb | 1888 ++++++++++ .../managed_kafka/schema_registry/v1/rest.rb | 40 + .../schema_registry/v1/version.rb | 30 + .../schemaregistry/v1/schema_registry_pb.rb | 80 + .../v1/schema_registry_resources_pb.rb | 57 + .../v1/schema_registry_services_pb.rb | 160 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/httpbody.rb | 80 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../schemaregistry/v1/schema_registry.rb | 488 +++ .../v1/schema_registry_resources.rb | 236 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../snippets/Gemfile | 32 + .../check_compatibility.rb | 47 + .../create_schema_registry.rb | 47 + .../managed_schema_registry/create_version.rb | 47 + .../delete_schema_config.rb | 47 + .../delete_schema_mode.rb | 47 + .../delete_schema_registry.rb | 47 + .../managed_schema_registry/delete_subject.rb | 47 + .../managed_schema_registry/delete_version.rb | 47 + .../managed_schema_registry/get_context.rb | 47 + .../managed_schema_registry/get_raw_schema.rb | 47 + .../get_raw_schema_version.rb | 47 + .../managed_schema_registry/get_schema.rb | 47 + .../get_schema_config.rb | 47 + .../get_schema_mode.rb | 47 + .../get_schema_registry.rb | 47 + .../managed_schema_registry/get_version.rb | 47 + .../managed_schema_registry/list_contexts.rb | 47 + .../list_referenced_schemas.rb | 47 + .../list_schema_registries.rb | 47 + .../list_schema_types.rb | 47 + .../list_schema_versions.rb | 47 + .../managed_schema_registry/list_subjects.rb | 47 + .../list_subjects_by_schema_id.rb | 47 + .../managed_schema_registry/list_versions.rb | 47 + .../managed_schema_registry/lookup_version.rb | 47 + .../update_schema_config.rb | 47 + .../update_schema_mode.rb | 47 + ....cloud.managedkafka.schemaregistry.v1.json | 1095 ++++++ .../v1/managed_schema_registry_paths_test.rb | 160 + .../v1/managed_schema_registry_rest_test.rb | 1591 +++++++++ .../v1/managed_schema_registry_test.rb | 1743 +++++++++ .../test/helper.rb | 25 + release-please-config.json | 4 + 76 files changed, 17990 insertions(+) create mode 100644 google-cloud-managed_kafka-schema_registry-v1/.OwlBot.yaml create mode 100644 google-cloud-managed_kafka-schema_registry-v1/.gitignore create mode 100644 google-cloud-managed_kafka-schema_registry-v1/.owlbot-manifest.json create mode 100644 google-cloud-managed_kafka-schema_registry-v1/.repo-metadata.json create mode 100644 google-cloud-managed_kafka-schema_registry-v1/.rubocop.yml create mode 100644 google-cloud-managed_kafka-schema_registry-v1/.toys.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/.yardopts create mode 100644 google-cloud-managed_kafka-schema_registry-v1/AUTHENTICATION.md create mode 100644 google-cloud-managed_kafka-schema_registry-v1/CHANGELOG.md create mode 100644 google-cloud-managed_kafka-schema_registry-v1/Gemfile create mode 100644 google-cloud-managed_kafka-schema_registry-v1/LICENSE.md create mode 100644 google-cloud-managed_kafka-schema_registry-v1/README.md create mode 100644 google-cloud-managed_kafka-schema_registry-v1/Rakefile create mode 100644 google-cloud-managed_kafka-schema_registry-v1/gapic_metadata.json create mode 100644 google-cloud-managed_kafka-schema_registry-v1/google-cloud-managed_kafka-schema_registry-v1.gemspec create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google-cloud-managed_kafka-schema_registry-v1.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/bindings_override.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/credentials.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/paths.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/service_stub.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/rest.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/version.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_pb.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources_pb.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_services_pb.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/README.md create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/client.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/field_behavior.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/httpbody.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/launch_stage.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/resource.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/any.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/duration.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/empty.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/Gemfile create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/check_compatibility.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/create_schema_registry.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/create_version.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_config.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_mode.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_registry.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_subject.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_version.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_context.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_raw_schema.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_raw_schema_version.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_config.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_mode.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_registry.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_version.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_contexts.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_referenced_schemas.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_registries.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_types.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_versions.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_subjects.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_subjects_by_schema_id.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_versions.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/lookup_version.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/update_schema_config.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/update_schema_mode.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json create mode 100644 google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_paths_test.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_rest_test.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_test.rb create mode 100644 google-cloud-managed_kafka-schema_registry-v1/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cfd7b2e47b30..d1d8f87d8ed3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -479,6 +479,8 @@ "google-cloud-managed_identities-v1+FILLER": "0.0.0", "google-cloud-managed_kafka": "2.1.1", "google-cloud-managed_kafka+FILLER": "0.0.0", + "google-cloud-managed_kafka-schema_registry-v1": "0.0.1", + "google-cloud-managed_kafka-schema_registry-v1+FILLER": "0.0.0", "google-cloud-managed_kafka-v1": "1.4.0", "google-cloud-managed_kafka-v1+FILLER": "0.0.0", "google-cloud-media_translation": "0.6.1", diff --git a/google-cloud-managed_kafka-schema_registry-v1/.OwlBot.yaml b/google-cloud-managed_kafka-schema_registry-v1/.OwlBot.yaml new file mode 100644 index 000000000000..f9ef0f92d210 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/cloud/managedkafka/schemaregistry/v1/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-cloud-managed_kafka-schema_registry-v1/$1 diff --git a/google-cloud-managed_kafka-schema_registry-v1/.gitignore b/google-cloud-managed_kafka-schema_registry-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/.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/google-cloud-managed_kafka-schema_registry-v1/.owlbot-manifest.json b/google-cloud-managed_kafka-schema_registry-v1/.owlbot-manifest.json new file mode 100644 index 000000000000..4bcf0078724d --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/.owlbot-manifest.json @@ -0,0 +1,79 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "gapic_metadata.json", + "google-cloud-managed_kafka-schema_registry-v1.gemspec", + "lib/google-cloud-managed_kafka-schema_registry-v1.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/bindings_override.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/credentials.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/paths.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/service_stub.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/rest.rb", + "lib/google/cloud/managed_kafka/schema_registry/v1/version.rb", + "lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_pb.rb", + "lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources_pb.rb", + "lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_services_pb.rb", + "proto_docs/README.md", + "proto_docs/google/api/client.rb", + "proto_docs/google/api/field_behavior.rb", + "proto_docs/google/api/httpbody.rb", + "proto_docs/google/api/launch_stage.rb", + "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry.rb", + "proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.rb", + "proto_docs/google/protobuf/any.rb", + "proto_docs/google/protobuf/duration.rb", + "proto_docs/google/protobuf/empty.rb", + "snippets/Gemfile", + "snippets/managed_schema_registry/check_compatibility.rb", + "snippets/managed_schema_registry/create_schema_registry.rb", + "snippets/managed_schema_registry/create_version.rb", + "snippets/managed_schema_registry/delete_schema_config.rb", + "snippets/managed_schema_registry/delete_schema_mode.rb", + "snippets/managed_schema_registry/delete_schema_registry.rb", + "snippets/managed_schema_registry/delete_subject.rb", + "snippets/managed_schema_registry/delete_version.rb", + "snippets/managed_schema_registry/get_context.rb", + "snippets/managed_schema_registry/get_raw_schema.rb", + "snippets/managed_schema_registry/get_raw_schema_version.rb", + "snippets/managed_schema_registry/get_schema.rb", + "snippets/managed_schema_registry/get_schema_config.rb", + "snippets/managed_schema_registry/get_schema_mode.rb", + "snippets/managed_schema_registry/get_schema_registry.rb", + "snippets/managed_schema_registry/get_version.rb", + "snippets/managed_schema_registry/list_contexts.rb", + "snippets/managed_schema_registry/list_referenced_schemas.rb", + "snippets/managed_schema_registry/list_schema_registries.rb", + "snippets/managed_schema_registry/list_schema_types.rb", + "snippets/managed_schema_registry/list_schema_versions.rb", + "snippets/managed_schema_registry/list_subjects.rb", + "snippets/managed_schema_registry/list_subjects_by_schema_id.rb", + "snippets/managed_schema_registry/list_versions.rb", + "snippets/managed_schema_registry/lookup_version.rb", + "snippets/managed_schema_registry/update_schema_config.rb", + "snippets/managed_schema_registry/update_schema_mode.rb", + "snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json", + "test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_paths_test.rb", + "test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_rest_test.rb", + "test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-cloud-managed_kafka-schema_registry-v1/.repo-metadata.json b/google-cloud-managed_kafka-schema_registry-v1/.repo-metadata.json new file mode 100644 index 000000000000..55ab94da3010 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "managedkafka.googleapis.com", + "api_shortname": "managedkafka", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-managed_kafka-schema_registry-v1/latest", + "distribution_name": "google-cloud-managed_kafka-schema_registry-v1", + "is_cloud": true, + "language": "ruby", + "name": "managedkafka", + "name_pretty": "Managed Service for Apache Kafka V1 API", + "product_documentation": "https://cloud.google.com/managed-service-for-apache-kafka/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Manage Apache Kafka clusters and resources. Note that google-cloud-managed_kafka-schema_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-managed_kafka-schema_registry instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/managed-service-for-apache-kafka/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/google-cloud-managed_kafka-schema_registry-v1/.rubocop.yml b/google-cloud-managed_kafka-schema_registry-v1/.rubocop.yml new file mode 100644 index 000000000000..90b522129ec2 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-managed_kafka-schema_registry-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-managed_kafka-schema_registry-v1.rb" diff --git a/google-cloud-managed_kafka-schema_registry-v1/.toys.rb b/google-cloud-managed_kafka-schema_registry-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-managed_kafka-schema_registry-v1/.yardopts b/google-cloud-managed_kafka-schema_registry-v1/.yardopts new file mode 100644 index 000000000000..ea8b175acd26 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Managed Service for Apache Kafka V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/google-cloud-managed_kafka-schema_registry-v1/AUTHENTICATION.md b/google-cloud-managed_kafka-schema_registry-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..93aa6c55f3aa --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-managed_kafka-schema_registry-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-managed_kafka-schema_registry-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/managed_kafka/schema_registry/v1" + +client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/managed_kafka/schema_registry/v1" + +::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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-managed_kafka-schema_registry-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/managed_kafka/schema_registry/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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/google-cloud-managed_kafka-schema_registry-v1/CHANGELOG.md b/google-cloud-managed_kafka-schema_registry-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-cloud-managed_kafka-schema_registry-v1/Gemfile b/google-cloud-managed_kafka-schema_registry-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-cloud-managed_kafka-schema_registry-v1/LICENSE.md b/google-cloud-managed_kafka-schema_registry-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-cloud-managed_kafka-schema_registry-v1/README.md b/google-cloud-managed_kafka-schema_registry-v1/README.md new file mode 100644 index 000000000000..3b915fa7e0e3 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Managed Service for Apache Kafka V1 API + +Manage Apache Kafka clusters and resources. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Managed Service for Apache Kafka V1 API. Most users should consider using +the main client gem, +[google-cloud-managed_kafka-schema_registry](https://rubygems.org/gems/google-cloud-managed_kafka-schema_registry). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-managed_kafka-schema_registry-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/managedkafka.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/managed_kafka/schema_registry/v1" + +client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new +request = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest.new # (request fields as keyword arguments...) +response = client.get_schema_registry request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-managed_kafka-schema_registry-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/managed-service-for-apache-kafka/docs) +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/managed_kafka/schema_registry/v1" +require "logger" + +client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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-managed_kafka-schema_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-managed_kafka-schema_registry-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-managed_kafka-schema_registry`. +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-managed_kafka-schema_registry-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-cloud-managed_kafka-schema_registry-v1/Rakefile b/google-cloud-managed_kafka-schema_registry-v1/Rakefile new file mode 100644 index 000000000000..5a29c782321d --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-managed_kafka-schema_registry-v1 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/managed_kafka/schema_registry/v1/managed_schema_registry/credentials" + ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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-managed_kafka-schema_registry-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-managed_kafka-schema_registry-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-managed_kafka-schema_registry-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-managed_kafka-schema_registry-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-managed_kafka-schema_registry-v1" + header "google-cloud-managed_kafka-schema_registry-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-managed_kafka-schema_registry-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-managed_kafka-schema_registry-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-managed_kafka-schema_registry-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-managed_kafka-schema_registry-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/gapic_metadata.json b/google-cloud-managed_kafka-schema_registry-v1/gapic_metadata.json new file mode 100644 index 000000000000..5eab1500ba5c --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/gapic_metadata.json @@ -0,0 +1,153 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.managedkafka.schemaregistry.v1", + "libraryPackage": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1", + "services": { + "ManagedSchemaRegistry": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client", + "rpcs": { + "GetSchemaRegistry": { + "methods": [ + "get_schema_registry" + ] + }, + "ListSchemaRegistries": { + "methods": [ + "list_schema_registries" + ] + }, + "CreateSchemaRegistry": { + "methods": [ + "create_schema_registry" + ] + }, + "DeleteSchemaRegistry": { + "methods": [ + "delete_schema_registry" + ] + }, + "GetContext": { + "methods": [ + "get_context" + ] + }, + "ListContexts": { + "methods": [ + "list_contexts" + ] + }, + "GetSchema": { + "methods": [ + "get_schema" + ] + }, + "GetRawSchema": { + "methods": [ + "get_raw_schema" + ] + }, + "ListSchemaVersions": { + "methods": [ + "list_schema_versions" + ] + }, + "ListSchemaTypes": { + "methods": [ + "list_schema_types" + ] + }, + "ListSubjects": { + "methods": [ + "list_subjects" + ] + }, + "ListSubjectsBySchemaId": { + "methods": [ + "list_subjects_by_schema_id" + ] + }, + "DeleteSubject": { + "methods": [ + "delete_subject" + ] + }, + "LookupVersion": { + "methods": [ + "lookup_version" + ] + }, + "GetVersion": { + "methods": [ + "get_version" + ] + }, + "GetRawSchemaVersion": { + "methods": [ + "get_raw_schema_version" + ] + }, + "ListVersions": { + "methods": [ + "list_versions" + ] + }, + "CreateVersion": { + "methods": [ + "create_version" + ] + }, + "DeleteVersion": { + "methods": [ + "delete_version" + ] + }, + "ListReferencedSchemas": { + "methods": [ + "list_referenced_schemas" + ] + }, + "CheckCompatibility": { + "methods": [ + "check_compatibility" + ] + }, + "GetSchemaConfig": { + "methods": [ + "get_schema_config" + ] + }, + "UpdateSchemaConfig": { + "methods": [ + "update_schema_config" + ] + }, + "DeleteSchemaConfig": { + "methods": [ + "delete_schema_config" + ] + }, + "GetSchemaMode": { + "methods": [ + "get_schema_mode" + ] + }, + "UpdateSchemaMode": { + "methods": [ + "update_schema_mode" + ] + }, + "DeleteSchemaMode": { + "methods": [ + "delete_schema_mode" + ] + } + } + } + } + } + } +} diff --git a/google-cloud-managed_kafka-schema_registry-v1/google-cloud-managed_kafka-schema_registry-v1.gemspec b/google-cloud-managed_kafka-schema_registry-v1/google-cloud-managed_kafka-schema_registry-v1.gemspec new file mode 100644 index 000000000000..b8481441a1d4 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/google-cloud-managed_kafka-schema_registry-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/managed_kafka/schema_registry/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-managed_kafka-schema_registry-v1" + gem.version = Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Manage Apache Kafka clusters and resources. Note that google-cloud-managed_kafka-schema_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-managed_kafka-schema_registry instead. See the readme for more details." + gem.summary = "Manage Apache Kafka clusters and resources." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.1" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google-cloud-managed_kafka-schema_registry-v1.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google-cloud-managed_kafka-schema_registry-v1.rb new file mode 100644 index 000000000000..f06fa5a08bc9 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google-cloud-managed_kafka-schema_registry-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managed_kafka/schema_registry/v1" diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1.rb new file mode 100644 index 000000000000..69702ab2bd1f --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managed_kafka/schema_registry/v1/managed_schema_registry" +require "google/cloud/managed_kafka/schema_registry/v1/version" + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/managed_kafka/schema_registry/v1" + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/managed_kafka/schema_registry/v1" + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/managed_kafka/schema_registry/v1/_helpers" if ::File.file? helper_path diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/bindings_override.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/bindings_override.rb new file mode 100644 index 000000000000..74b46cd8ea79 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/bindings_override.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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" + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/managed_kafka/schema_registry/v1/rest" + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ManagedKafka", "SchemaRegistry"] + 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 = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry.rb new file mode 100644 index 000000000000..018d0001db3e --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managed_kafka/schema_registry/v1/version" + +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/credentials" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/paths" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest" + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + module V1 + ## + # SchemaRegistry is a service that allows users to manage schemas for their + # Kafka clusters. It provides APIs to register, list, and delete schemas, as + # well as to get the schema for a given schema id or a given version id under a + # subject, to update the global or subject-specific compatibility mode, and to + # check the compatibility of a schema against a subject or a version. The main + # resource hierarchy is as follows: + # + # * SchemaRegistry + # * SchemaRegistry/Context + # * SchemaRegistry/Context/Schema + # * SchemaRegistry/Context/Subject + # * SchemaRegistry/Context/Subject/Version + # * SchemaRegistry/Config + # * SchemaRegistry/Mode + # + # **SchemaRegistry** is the root resource to represent a schema registry + # instance. A customer can have multiple schema registry instances in a + # project. + # + # **Context** is a context resource that represents a group of + # schemas, subjects and versions. A schema registry instance can have multiple + # contexts and always has a 'default' context. Contexts are independent of each + # other. Context is optional and if not specified, it falls back to the + # 'default' context. + # + # **Schema** is a schema resource that represents a unique schema in a context + # of a schema registry instance. Each schema has a unique schema id, and can be + # referenced by a version of a subject. + # + # **Subject** refers to the name under which the schema is registered. A + # typical subject is the Kafka topic name. A schema registry instance can have + # multiple subjects. + # + # **Version** represents a version of a subject. A subject can have multiple + # versions. Creation of new version of a subject is guarded by the + # compatibility mode configured globally or for the subject specifically. + # + # **Config** represents a config at global level cross all registry + # instances or at subject level. Currently, only compatibility is supported in + # config. + # + # **Mode** represents the mode of a schema registry or a specific subject. + # Three modes are supported: + # * READONLY: The schema registry is in read-only mode, no write operations + # allowed.. + # * READWRITE: The schema registry is in read-write mode, which allows limited + # write operations on the schema. + # * IMPORT: The schema registry is in import mode, which allows more editing + # operations on the schema for data importing purposes. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry" + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest" + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + module ManagedSchemaRegistry + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "managed_schema_registry", "helpers.rb" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/helpers" if ::File.file? helper_path diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb new file mode 100644 index 000000000000..03e9d662db76 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb @@ -0,0 +1,3110 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managedkafka/schemaregistry/v1/schema_registry_pb" +require "google/cloud/location" + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + module V1 + module ManagedSchemaRegistry + ## + # Client for the ManagedSchemaRegistry service. + # + # SchemaRegistry is a service that allows users to manage schemas for their + # Kafka clusters. It provides APIs to register, list, and delete schemas, as + # well as to get the schema for a given schema id or a given version id under a + # subject, to update the global or subject-specific compatibility mode, and to + # check the compatibility of a schema against a subject or a version. The main + # resource hierarchy is as follows: + # + # * SchemaRegistry + # * SchemaRegistry/Context + # * SchemaRegistry/Context/Schema + # * SchemaRegistry/Context/Subject + # * SchemaRegistry/Context/Subject/Version + # * SchemaRegistry/Config + # * SchemaRegistry/Mode + # + # **SchemaRegistry** is the root resource to represent a schema registry + # instance. A customer can have multiple schema registry instances in a + # project. + # + # **Context** is a context resource that represents a group of + # schemas, subjects and versions. A schema registry instance can have multiple + # contexts and always has a 'default' context. Contexts are independent of each + # other. Context is optional and if not specified, it falls back to the + # 'default' context. + # + # **Schema** is a schema resource that represents a unique schema in a context + # of a schema registry instance. Each schema has a unique schema id, and can be + # referenced by a version of a subject. + # + # **Subject** refers to the name under which the schema is registered. A + # typical subject is the Kafka topic name. A schema registry instance can have + # multiple subjects. + # + # **Version** represents a version of a subject. A subject can have multiple + # versions. Creation of new version of a subject is guarded by the + # compatibility mode configured globally or for the subject specifically. + # + # **Config** represents a config at global level cross all registry + # instances or at subject level. Currently, only compatibility is supported in + # config. + # + # **Mode** represents the mode of a schema registry or a specific subject. + # Three modes are supported: + # * READONLY: The schema registry is in read-only mode, no write operations + # allowed.. + # * READWRITE: The schema registry is in read-write mode, which allows limited + # write operations on the schema. + # * IMPORT: The schema registry is in import mode, which allows more editing + # operations on the schema for data importing purposes. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "managedkafka.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :managed_schema_registry_stub + + ## + # Configure the ManagedSchemaRegistry Client class. + # + # See {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ManagedSchemaRegistry clients + # ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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", "ManagedKafka", "SchemaRegistry", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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 + @managed_schema_registry_stub.universe_domain + end + + ## + # Create a new ManagedSchemaRegistry client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ManagedSchemaRegistry 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/managedkafka/schemaregistry/v1/schema_registry_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 + + @managed_schema_registry_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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 + ) + + @managed_schema_registry_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @managed_schema_registry_stub.endpoint + config.universe_domain = @managed_schema_registry_stub.universe_domain + config.logger = @managed_schema_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @managed_schema_registry_stub.logger + end + + # Service calls + + ## + # Get the schema registry instance. + # + # @overload get_schema_registry(request, options = nil) + # Pass arguments to `get_schema_registry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest, ::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_schema_registry(name: nil) + # Pass arguments to `get_schema_registry` 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 name of the schema registry instance to return. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest.new + # + # # Call the get_schema_registry method. + # result = client.get_schema_registry request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry. + # p result + # + def get_schema_registry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest + + # 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_schema_registry.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_schema_registry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_schema_registry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :get_schema_registry, 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 + + ## + # List schema registries. + # + # @overload list_schema_registries(request, options = nil) + # Pass arguments to `list_schema_registries` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest, ::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_schema_registries(parent: nil) + # Pass arguments to `list_schema_registries` 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 parent whose schema registry instances are to be listed. + # Structured like: `projects/{project}/locations/{location}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest.new + # + # # Call the list_schema_registries method. + # result = client.list_schema_registries request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse. + # p result + # + def list_schema_registries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest + + # 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_schema_registries.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_schema_registries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_schema_registries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :list_schema_registries, 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 + + ## + # Create a schema registry instance. + # + # @overload create_schema_registry(request, options = nil) + # Pass arguments to `create_schema_registry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest, ::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_schema_registry(parent: nil, schema_registry_id: nil, schema_registry: nil) + # Pass arguments to `create_schema_registry` 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 parent whose schema registry instance is to be created. + # Structured like: `projects/{project}/locations/{location}` + # @param schema_registry_id [::String] + # Required. The schema registry instance ID to use for this schema registry. + # The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores + # (-). The maximum length is 63 characters. + # The ID must not start with a number. + # @param schema_registry [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry, ::Hash] + # Required. The schema registry instance to create. + # The name field is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest.new + # + # # Call the create_schema_registry method. + # result = client.create_schema_registry request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry. + # p result + # + def create_schema_registry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest + + # 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_schema_registry.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_schema_registry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_schema_registry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :create_schema_registry, 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 + + ## + # Delete a schema registry instance. + # + # @overload delete_schema_registry(request, options = nil) + # Pass arguments to `delete_schema_registry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest, ::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_schema_registry(name: nil) + # Pass arguments to `delete_schema_registry` 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 name of the schema registry instance to delete. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # + # @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/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest.new + # + # # Call the delete_schema_registry method. + # result = client.delete_schema_registry request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_schema_registry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest + + # 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_schema_registry.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_schema_registry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_schema_registry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :delete_schema_registry, 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 + + ## + # Get the context. + # + # @overload get_context(request, options = nil) + # Pass arguments to `get_context` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest, ::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_context(name: nil) + # Pass arguments to `get_context` 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 name of the context to return. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest.new + # + # # Call the get_context method. + # result = client.get_context request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context. + # p result + # + def get_context request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest + + # 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_context.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_context.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_context.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :get_context, 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 + + ## + # List contexts for a schema registry. + # + # @overload list_contexts(request, options = nil) + # Pass arguments to `list_contexts` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest, ::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_contexts(parent: nil) + # Pass arguments to `list_contexts` 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 parent of the contexts. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest.new + # + # # Call the list_contexts method. + # result = client.list_contexts request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_contexts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest + + # 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_contexts.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_contexts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_contexts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :list_contexts, 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 + + ## + # Get the schema for the given schema id. + # + # @overload get_schema(request, options = nil) + # Pass arguments to `get_schema` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest, ::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_schema(name: nil, subject: nil) + # Pass arguments to `get_schema` 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 name of the schema to return. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # @param subject [::String] + # Optional. Used to limit the search for the schema ID to a specific subject, + # otherwise the schema ID will be searched for in all subjects in the given + # specified context. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new + # + # # Call the get_schema method. + # result = client.get_schema request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema. + # p result + # + def get_schema request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest + + # 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_schema.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_schema.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_schema.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :get_schema, 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 + + ## + # Get the schema string for the given schema id. + # The response will be the schema string. + # + # @overload get_raw_schema(request, options = nil) + # Pass arguments to `get_raw_schema` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest, ::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_raw_schema(name: nil, subject: nil) + # Pass arguments to `get_raw_schema` 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 name of the schema to return. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # @param subject [::String] + # Optional. Used to limit the search for the schema ID to a specific subject, + # otherwise the schema ID will be searched for in all subjects in the given + # specified context. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new + # + # # Call the get_raw_schema method. + # result = client.get_raw_schema request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def get_raw_schema request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest + + # 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_raw_schema.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_raw_schema.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_raw_schema.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :get_raw_schema, 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 + + ## + # List the schema versions for the given schema id. + # The response will be an array of subject-version pairs as: + # [\\{"subject":"subject1", "version":1}, \\{"subject":"subject2", "version":2}]. + # + # @overload list_schema_versions(request, options = nil) + # Pass arguments to `list_schema_versions` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest, ::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_schema_versions(parent: nil, subject: nil, deleted: nil) + # Pass arguments to `list_schema_versions` 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 schema whose schema versions are to be listed. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + # @param subject [::String] + # Optional. The subject to filter the subjects by. + # @param deleted [::Boolean] + # Optional. If true, the response will include soft-deleted versions of the + # schema, even if the subject is soft-deleted. The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest.new + # + # # Call the list_schema_versions method. + # result = client.list_schema_versions request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_schema_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest + + # 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_schema_versions.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_schema_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_schema_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :list_schema_versions, 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 + + ## + # List the supported schema types. + # The response will be an array of schema types. + # + # @overload list_schema_types(request, options = nil) + # Pass arguments to `list_schema_types` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest, ::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_schema_types(parent: nil) + # Pass arguments to `list_schema_types` 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 parent schema registry whose schema types are to be listed. + # Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest.new + # + # # Call the list_schema_types method. + # result = client.list_schema_types request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_schema_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest + + # 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_schema_types.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_schema_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_schema_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :list_schema_types, 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 + + ## + # List subjects in the schema registry. + # The response will be an array of subject names. + # + # @overload list_subjects(request, options = nil) + # Pass arguments to `list_subjects` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest, ::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_subjects(parent: nil, subject_prefix: nil, deleted: nil) + # Pass arguments to `list_subjects` 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 parent schema registry/context whose subjects are to be + # listed. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + # @param subject_prefix [::String] + # Optional. The context to filter the subjects by, in the format of + # `:.{context}:`. If unset, all subjects in the registry are returned. Set to + # empty string or add as + # '?subjectPrefix=' at the end of this request to list subjects in the + # default context. + # @param deleted [::Boolean] + # Optional. If true, the response will include soft-deleted subjects. The + # default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest.new + # + # # Call the list_subjects method. + # result = client.list_subjects request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_subjects request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest + + # 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_subjects.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_subjects.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_subjects.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :list_subjects, 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 + + ## + # List subjects which reference a particular schema id. + # The response will be an array of subject names. + # + # @overload list_subjects_by_schema_id(request, options = nil) + # Pass arguments to `list_subjects_by_schema_id` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest, ::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_subjects_by_schema_id(parent: nil, subject: nil, deleted: nil) + # Pass arguments to `list_subjects_by_schema_id` 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 schema resource whose associated subjects are to be listed. + # Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + # @param subject [::String] + # Optional. The subject to filter the subjects by. + # @param deleted [::Boolean] + # Optional. If true, the response will include soft-deleted subjects. The + # default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest.new + # + # # Call the list_subjects_by_schema_id method. + # result = client.list_subjects_by_schema_id request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_subjects_by_schema_id request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest + + # 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_subjects_by_schema_id.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_subjects_by_schema_id.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_subjects_by_schema_id.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :list_subjects_by_schema_id, 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 + + ## + # Delete a subject. + # The response will be an array of versions of the deleted subject. + # + # @overload delete_subject(request, options = nil) + # Pass arguments to `delete_subject` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest, ::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_subject(name: nil, permanent: nil) + # Pass arguments to `delete_subject` 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 name of the subject to delete. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @param permanent [::Boolean] + # Optional. If true, the subject and all associated metadata including the + # schema ID will be deleted permanently. Otherwise, only the subject is + # soft-deleted. The default is false. Soft-deleted subjects can still be + # searched in ListSubjects API call with deleted=true query parameter. A + # soft-delete of a subject must be performed before a hard-delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest.new + # + # # Call the delete_subject method. + # result = client.delete_subject request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def delete_subject request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest + + # 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_subject.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_subject.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_subject.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :delete_subject, 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 + + ## + # Lookup a schema under the specified subject. + # + # @overload lookup_version(request, options = nil) + # Pass arguments to `lookup_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest, ::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 lookup_version(parent: nil, schema_type: nil, schema: nil, references: nil, normalize: nil, deleted: nil) + # Pass arguments to `lookup_version` 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 subject to lookup the schema in. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @param schema_type [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The schema type of the schema. + # @param schema [::String] + # Required. The schema payload + # @param references [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, ::Hash>] + # Optional. The schema references used by the schema. + # @param normalize [::Boolean] + # Optional. If true, the schema will be normalized before being looked up. + # The default is false. + # @param deleted [::Boolean] + # Optional. If true, soft-deleted versions will be included in lookup, no + # matter if the subject is active or soft-deleted. If false, soft-deleted + # versions will be excluded. The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest.new + # + # # Call the lookup_version method. + # result = client.lookup_version request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion. + # p result + # + def lookup_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest + + # 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.lookup_version.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :lookup_version, 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 + + ## + # Get a versioned schema (schema with subject/version) of a subject. + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest, ::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_version(name: nil, deleted: nil) + # Pass arguments to `get_version` 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 name of the subject to return versions. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @param deleted [::Boolean] + # Optional. If true, no matter if the subject/version is soft-deleted or not, + # it returns the version details. If false, it returns NOT_FOUND error if the + # subject/version is soft-deleted. The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest + + # 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_version.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :get_version, 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 + + ## + # Get the schema string only for a version of a subject. + # The response will be the schema string. + # + # @overload get_raw_schema_version(request, options = nil) + # Pass arguments to `get_raw_schema_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest, ::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_raw_schema_version(name: nil, deleted: nil) + # Pass arguments to `get_raw_schema_version` 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 name of the subject to return versions. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @param deleted [::Boolean] + # Optional. If true, no matter if the subject/version is soft-deleted or not, + # it returns the version details. If false, it returns NOT_FOUND error if the + # subject/version is soft-deleted. The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new + # + # # Call the get_raw_schema_version method. + # result = client.get_raw_schema_version request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def get_raw_schema_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest + + # 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_raw_schema_version.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_raw_schema_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_raw_schema_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :get_raw_schema_version, 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 + + ## + # Get all versions of a subject. + # The response will be an array of versions of the subject. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest, ::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_versions(parent: nil, deleted: nil) + # Pass arguments to `list_versions` 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 subject whose versions are to be listed. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @param deleted [::Boolean] + # Optional. If true, the response will include soft-deleted versions of an + # active or soft-deleted subject. The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_versions request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest + + # 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_versions.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :list_versions, 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 + + ## + # Register a new version under a given subject with the given schema. + # + # @overload create_version(request, options = nil) + # Pass arguments to `create_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest, ::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_version(parent: nil, version: nil, id: nil, schema_type: nil, schema: nil, references: nil, normalize: nil) + # Pass arguments to `create_version` 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 subject to create the version for. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @param version [::Integer] + # Optional. The version to create. It is optional. If not specified, the + # version will be created with the max version ID of the subject increased + # by 1. If the version ID is specified, it will be used as the new version ID + # and must not be used by an existing version of the subject. + # @param id [::Integer] + # Optional. The schema ID of the schema. If not specified, the schema ID will + # be generated by the server. If the schema ID is specified, it must not be + # used by an existing schema that is different from the schema to be created. + # @param schema_type [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The type of the schema. It is optional. If not specified, the + # schema type will be AVRO. + # @param schema [::String] + # Required. The schema payload + # @param references [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, ::Hash>] + # Optional. The schema references used by the schema. + # @param normalize [::Boolean] + # Optional. If true, the schema will be normalized before being stored. The + # default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest.new + # + # # Call the create_version method. + # result = client.create_version request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse. + # p result + # + def create_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest + + # 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_version.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :create_version, 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 + + ## + # Delete a version of a subject. + # The response will be the deleted version id. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest, ::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_version(name: nil, permanent: nil) + # Pass arguments to `delete_version` 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 name of the subject version to delete. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @param permanent [::Boolean] + # Optional. If true, both the version and the referenced schema ID will be + # permanently deleted. The default is false. If false, the version will be + # deleted but the schema ID will be retained. Soft-deleted versions can still + # be searched in ListVersions API call with deleted=true query parameter. A + # soft-delete of a version must be performed before a hard-delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def delete_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest + + # 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_version.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :delete_version, 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 + + ## + # Get a list of IDs of schemas that reference the schema with the given + # subject and version. + # + # @overload list_referenced_schemas(request, options = nil) + # Pass arguments to `list_referenced_schemas` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest, ::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_referenced_schemas(parent: nil) + # Pass arguments to `list_referenced_schemas` 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 version to list referenced by. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest.new + # + # # Call the list_referenced_schemas method. + # result = client.list_referenced_schemas request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_referenced_schemas request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest + + # 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_referenced_schemas.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_referenced_schemas.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_referenced_schemas.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :list_referenced_schemas, 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 + + ## + # Check compatibility of a schema with all versions or a specific version of + # a subject. + # + # @overload check_compatibility(request, options = nil) + # Pass arguments to `check_compatibility` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest, ::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 check_compatibility(name: nil, schema_type: nil, schema: nil, references: nil, verbose: nil) + # Pass arguments to `check_compatibility` 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 name of the resource to check compatibility for. The format + # is either of following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/compatibility/subjects/*/versions: Check compatibility with one or + # more versions of the specified subject. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/compatibility/subjects/\\{subject}/versions/\\{version}: Check + # compatibility with a specific version of the subject. + # @param schema_type [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The schema type of the schema. + # @param schema [::String] + # Required. The schema payload + # @param references [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, ::Hash>] + # Optional. The schema references used by the schema. + # @param verbose [::Boolean] + # Optional. If true, the response will contain the compatibility check result + # with reasons for failed checks. The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest.new + # + # # Call the check_compatibility method. + # result = client.check_compatibility request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse. + # p result + # + def check_compatibility request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest + + # 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.check_compatibility.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.check_compatibility.timeout, + metadata: metadata, + retry_policy: @config.rpcs.check_compatibility.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :check_compatibility, 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 + + ## + # Get schema config at global level or for a subject. + # + # @overload get_schema_config(request, options = nil) + # Pass arguments to `get_schema_config` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest, ::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_schema_config(name: nil, default_to_global: nil) + # Pass arguments to `get_schema_config` 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 resource name to get the config for. It can be either of + # following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config: Get config at global level. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject}: Get config for a specific subject. + # @param default_to_global [::Boolean] + # Optional. If true, the config will fall back to the config at the global + # level if no subject level config is found. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest.new + # + # # Call the get_schema_config method. + # result = client.get_schema_config request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + # p result + # + def get_schema_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest + + # 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_schema_config.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_schema_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_schema_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :get_schema_config, 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 + + ## + # Update config at global level or for a subject. + # Creates a SchemaSubject-level SchemaConfig if it does not exist. + # + # @overload update_schema_config(request, options = nil) + # Pass arguments to `update_schema_config` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest, ::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 update_schema_config(name: nil, compatibility: nil, normalize: nil) + # Pass arguments to `update_schema_config` 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 resource name to update the config for. It can be either of + # following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config: Update config at global level. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject}: Update config for a specific subject. + # @param compatibility [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig::CompatibilityType] + # Required. The compatibility type of the schemas. + # Cannot be unset for a SchemaRegistry-level SchemaConfig. + # If unset on a SchemaSubject-level SchemaConfig, removes the compatibility + # field for the SchemaConfig. + # @param normalize [::Boolean] + # Optional. If true, the schema will be normalized before being stored or + # looked up. The default is false. Cannot be unset for a SchemaRegistry-level + # SchemaConfig. If unset on a SchemaSubject-level SchemaConfig, removes the + # normalize field for the SchemaConfig. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest.new + # + # # Call the update_schema_config method. + # result = client.update_schema_config request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + # p result + # + def update_schema_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest + + # 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.update_schema_config.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_schema_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_schema_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :update_schema_config, 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 + + ## + # Delete schema config for a subject. + # + # @overload delete_schema_config(request, options = nil) + # Pass arguments to `delete_schema_config` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest, ::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_schema_config(name: nil) + # Pass arguments to `delete_schema_config` 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 resource name of subject to delete the config for. The format + # is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest.new + # + # # Call the delete_schema_config method. + # result = client.delete_schema_config request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + # p result + # + def delete_schema_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest + + # 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_schema_config.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_schema_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_schema_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :delete_schema_config, 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 + + ## + # Get mode at global level or for a subject. + # + # @overload get_schema_mode(request, options = nil) + # Pass arguments to `get_schema_mode` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest, ::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_schema_mode(name: nil) + # Pass arguments to `get_schema_mode` 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 resource name of the mode. The format is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject}: mode for a schema registry, or + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject}: mode for a specific subject in a specific context + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest.new + # + # # Call the get_schema_mode method. + # result = client.get_schema_mode request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + # p result + # + def get_schema_mode request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest + + # 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_schema_mode.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_schema_mode.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_schema_mode.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :get_schema_mode, 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 + + ## + # Update mode at global level or for a subject. + # + # @overload update_schema_mode(request, options = nil) + # Pass arguments to `update_schema_mode` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest, ::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 update_schema_mode(name: nil, mode: nil) + # Pass arguments to `update_schema_mode` 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 resource name of the mode. The format is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject}: mode for a schema registry, or + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject}: mode for a specific subject in a specific context + # @param mode [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode::ModeType] + # Required. The mode type. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest.new + # + # # Call the update_schema_mode method. + # result = client.update_schema_mode request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + # p result + # + def update_schema_mode request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest + + # 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.update_schema_mode.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_schema_mode.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_schema_mode.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :update_schema_mode, 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 + + ## + # Delete schema mode for a subject. + # + # @overload delete_schema_mode(request, options = nil) + # Pass arguments to `delete_schema_mode` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest, ::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_schema_mode(name: nil) + # Pass arguments to `delete_schema_mode` 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 resource name of subject to delete the mode for. The format + # is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject} + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest.new + # + # # Call the delete_schema_mode method. + # result = client.delete_schema_mode request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + # p result + # + def delete_schema_mode request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest + + # 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_schema_mode.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::ManagedKafka::SchemaRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_schema_mode.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_schema_mode.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.call_rpc :delete_schema_mode, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ManagedSchemaRegistry API. + # + # This class represents the configuration for ManagedSchemaRegistry, + # 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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 + # # get_schema_registry to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_schema_registry.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_schema_registry.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)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`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] 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 = "managedkafka.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 ManagedSchemaRegistry 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 `get_schema_registry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema_registry + ## + # RPC-specific configuration for `list_schema_registries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_schema_registries + ## + # RPC-specific configuration for `create_schema_registry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_schema_registry + ## + # RPC-specific configuration for `delete_schema_registry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_schema_registry + ## + # RPC-specific configuration for `get_context` + # @return [::Gapic::Config::Method] + # + attr_reader :get_context + ## + # RPC-specific configuration for `list_contexts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_contexts + ## + # RPC-specific configuration for `get_schema` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema + ## + # RPC-specific configuration for `get_raw_schema` + # @return [::Gapic::Config::Method] + # + attr_reader :get_raw_schema + ## + # RPC-specific configuration for `list_schema_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_schema_versions + ## + # RPC-specific configuration for `list_schema_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_schema_types + ## + # RPC-specific configuration for `list_subjects` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subjects + ## + # RPC-specific configuration for `list_subjects_by_schema_id` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subjects_by_schema_id + ## + # RPC-specific configuration for `delete_subject` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_subject + ## + # RPC-specific configuration for `lookup_version` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_version + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `get_raw_schema_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_raw_schema_version + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `create_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `list_referenced_schemas` + # @return [::Gapic::Config::Method] + # + attr_reader :list_referenced_schemas + ## + # RPC-specific configuration for `check_compatibility` + # @return [::Gapic::Config::Method] + # + attr_reader :check_compatibility + ## + # RPC-specific configuration for `get_schema_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema_config + ## + # RPC-specific configuration for `update_schema_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_schema_config + ## + # RPC-specific configuration for `delete_schema_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_schema_config + ## + # RPC-specific configuration for `get_schema_mode` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema_mode + ## + # RPC-specific configuration for `update_schema_mode` + # @return [::Gapic::Config::Method] + # + attr_reader :update_schema_mode + ## + # RPC-specific configuration for `delete_schema_mode` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_schema_mode + + # @private + def initialize parent_rpcs = nil + get_schema_registry_config = parent_rpcs.get_schema_registry if parent_rpcs.respond_to? :get_schema_registry + @get_schema_registry = ::Gapic::Config::Method.new get_schema_registry_config + list_schema_registries_config = parent_rpcs.list_schema_registries if parent_rpcs.respond_to? :list_schema_registries + @list_schema_registries = ::Gapic::Config::Method.new list_schema_registries_config + create_schema_registry_config = parent_rpcs.create_schema_registry if parent_rpcs.respond_to? :create_schema_registry + @create_schema_registry = ::Gapic::Config::Method.new create_schema_registry_config + delete_schema_registry_config = parent_rpcs.delete_schema_registry if parent_rpcs.respond_to? :delete_schema_registry + @delete_schema_registry = ::Gapic::Config::Method.new delete_schema_registry_config + get_context_config = parent_rpcs.get_context if parent_rpcs.respond_to? :get_context + @get_context = ::Gapic::Config::Method.new get_context_config + list_contexts_config = parent_rpcs.list_contexts if parent_rpcs.respond_to? :list_contexts + @list_contexts = ::Gapic::Config::Method.new list_contexts_config + get_schema_config = parent_rpcs.get_schema if parent_rpcs.respond_to? :get_schema + @get_schema = ::Gapic::Config::Method.new get_schema_config + get_raw_schema_config = parent_rpcs.get_raw_schema if parent_rpcs.respond_to? :get_raw_schema + @get_raw_schema = ::Gapic::Config::Method.new get_raw_schema_config + list_schema_versions_config = parent_rpcs.list_schema_versions if parent_rpcs.respond_to? :list_schema_versions + @list_schema_versions = ::Gapic::Config::Method.new list_schema_versions_config + list_schema_types_config = parent_rpcs.list_schema_types if parent_rpcs.respond_to? :list_schema_types + @list_schema_types = ::Gapic::Config::Method.new list_schema_types_config + list_subjects_config = parent_rpcs.list_subjects if parent_rpcs.respond_to? :list_subjects + @list_subjects = ::Gapic::Config::Method.new list_subjects_config + list_subjects_by_schema_id_config = parent_rpcs.list_subjects_by_schema_id if parent_rpcs.respond_to? :list_subjects_by_schema_id + @list_subjects_by_schema_id = ::Gapic::Config::Method.new list_subjects_by_schema_id_config + delete_subject_config = parent_rpcs.delete_subject if parent_rpcs.respond_to? :delete_subject + @delete_subject = ::Gapic::Config::Method.new delete_subject_config + lookup_version_config = parent_rpcs.lookup_version if parent_rpcs.respond_to? :lookup_version + @lookup_version = ::Gapic::Config::Method.new lookup_version_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + get_raw_schema_version_config = parent_rpcs.get_raw_schema_version if parent_rpcs.respond_to? :get_raw_schema_version + @get_raw_schema_version = ::Gapic::Config::Method.new get_raw_schema_version_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + create_version_config = parent_rpcs.create_version if parent_rpcs.respond_to? :create_version + @create_version = ::Gapic::Config::Method.new create_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + list_referenced_schemas_config = parent_rpcs.list_referenced_schemas if parent_rpcs.respond_to? :list_referenced_schemas + @list_referenced_schemas = ::Gapic::Config::Method.new list_referenced_schemas_config + check_compatibility_config = parent_rpcs.check_compatibility if parent_rpcs.respond_to? :check_compatibility + @check_compatibility = ::Gapic::Config::Method.new check_compatibility_config + get_schema_config_config = parent_rpcs.get_schema_config if parent_rpcs.respond_to? :get_schema_config + @get_schema_config = ::Gapic::Config::Method.new get_schema_config_config + update_schema_config_config = parent_rpcs.update_schema_config if parent_rpcs.respond_to? :update_schema_config + @update_schema_config = ::Gapic::Config::Method.new update_schema_config_config + delete_schema_config_config = parent_rpcs.delete_schema_config if parent_rpcs.respond_to? :delete_schema_config + @delete_schema_config = ::Gapic::Config::Method.new delete_schema_config_config + get_schema_mode_config = parent_rpcs.get_schema_mode if parent_rpcs.respond_to? :get_schema_mode + @get_schema_mode = ::Gapic::Config::Method.new get_schema_mode_config + update_schema_mode_config = parent_rpcs.update_schema_mode if parent_rpcs.respond_to? :update_schema_mode + @update_schema_mode = ::Gapic::Config::Method.new update_schema_mode_config + delete_schema_mode_config = parent_rpcs.delete_schema_mode if parent_rpcs.respond_to? :delete_schema_mode + @delete_schema_mode = ::Gapic::Config::Method.new delete_schema_mode_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/credentials.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/credentials.rb new file mode 100644 index 000000000000..59204d14b2f1 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ManagedKafka + module SchemaRegistry + module V1 + module ManagedSchemaRegistry + # Credentials for the ManagedSchemaRegistry 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/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/paths.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/paths.rb new file mode 100644 index 000000000000..5789576b6ce8 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/paths.rb @@ -0,0 +1,424 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ManagedKafka + module SchemaRegistry + module V1 + module ManagedSchemaRegistry + # Path helper methods for the ManagedSchemaRegistry API. + module Paths + ## + # Create a fully-qualified Schema resource string. + # + # @overload schema_path(project:, location:, schema_registry:, schema:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param schema [String] + # + # @overload schema_path(project:, location:, schema_registry:, context:, schema:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # @param schema [String] + # + # @return [::String] + def schema_path **args + resources = { + "location:project:schema:schema_registry" => (proc do |project:, location:, schema_registry:, schema:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/schemas/ids/#{schema}" + end), + "context:location:project:schema:schema_registry" => (proc do |project:, location:, schema_registry:, context:, schema:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + raise ::ArgumentError, "context cannot contain /" if context.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}/schemas/ids/#{schema}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SchemaConfig resource string. + # + # @overload schema_config_path(project:, location:, schema_registry:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # + # @overload schema_config_path(project:, location:, schema_registry:, subject:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param subject [String] + # + # @overload schema_config_path(project:, location:, schema_registry:, context:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/config` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # + # @overload schema_config_path(project:, location:, schema_registry:, context:, subject:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/config/{subject}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # @param subject [String] + # + # @return [::String] + def schema_config_path **args + resources = { + "location:project:schema_registry" => (proc do |project:, location:, schema_registry:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/config" + end), + "location:project:schema_registry:subject" => (proc do |project:, location:, schema_registry:, subject:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/config/#{subject}" + end), + "context:location:project:schema_registry" => (proc do |project:, location:, schema_registry:, context:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}/config" + end), + "context:location:project:schema_registry:subject" => (proc do |project:, location:, schema_registry:, context:, subject:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + raise ::ArgumentError, "context cannot contain /" if context.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}/config/#{subject}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SchemaContext resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # + # @return [::String] + def schema_context_path project:, location:, schema_registry:, context: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}" + end + + ## + # Create a fully-qualified SchemaMode resource string. + # + # @overload schema_mode_path(project:, location:, schema_registry:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # + # @overload schema_mode_path(project:, location:, schema_registry:, subject:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param subject [String] + # + # @overload schema_mode_path(project:, location:, schema_registry:, context:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # + # @overload schema_mode_path(project:, location:, schema_registry:, context:, subject:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # @param subject [String] + # + # @return [::String] + def schema_mode_path **args + resources = { + "location:project:schema_registry" => (proc do |project:, location:, schema_registry:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/mode" + end), + "location:project:schema_registry:subject" => (proc do |project:, location:, schema_registry:, subject:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/mode/#{subject}" + end), + "context:location:project:schema_registry" => (proc do |project:, location:, schema_registry:, context:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}/mode" + end), + "context:location:project:schema_registry:subject" => (proc do |project:, location:, schema_registry:, context:, subject:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + raise ::ArgumentError, "context cannot contain /" if context.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}/mode/#{subject}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SchemaRegistry resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # + # @return [::String] + def schema_registry_path project:, location:, schema_registry: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}" + end + + ## + # Create a fully-qualified SchemaSubject resource string. + # + # @overload schema_subject_path(project:, location:, schema_registry:, subject:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param subject [String] + # + # @overload schema_subject_path(project:, location:, schema_registry:, context:, subject:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # @param subject [String] + # + # @return [::String] + def schema_subject_path **args + resources = { + "location:project:schema_registry:subject" => (proc do |project:, location:, schema_registry:, subject:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/subjects/#{subject}" + end), + "context:location:project:schema_registry:subject" => (proc do |project:, location:, schema_registry:, context:, subject:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + raise ::ArgumentError, "context cannot contain /" if context.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}/subjects/#{subject}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SchemaVersion resource string. + # + # @overload schema_version_path(project:, location:, schema_registry:, subject:, version:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param subject [String] + # @param version [String] + # + # @overload schema_version_path(project:, location:, schema_registry:, context:, subject:, version:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # @param subject [String] + # @param version [String] + # + # @overload schema_version_path(project:, location:, schema_registry:, subject:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param subject [String] + # + # @overload schema_version_path(project:, location:, schema_registry:, context:, subject:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/compatibility/subjects/{subject}/versions` + # + # @param project [String] + # @param location [String] + # @param schema_registry [String] + # @param context [String] + # @param subject [String] + # + # @return [::String] + def schema_version_path **args + resources = { + "location:project:schema_registry:subject:version" => (proc do |project:, location:, schema_registry:, subject:, version:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + raise ::ArgumentError, "subject cannot contain /" if subject.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/subjects/#{subject}/versions/#{version}" + end), + "context:location:project:schema_registry:subject:version" => (proc do |project:, location:, schema_registry:, context:, subject:, version:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + raise ::ArgumentError, "context cannot contain /" if context.to_s.include? "/" + raise ::ArgumentError, "subject cannot contain /" if subject.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}/subjects/#{subject}/versions/#{version}" + end), + "location:project:schema_registry:subject" => (proc do |project:, location:, schema_registry:, subject:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/compatibility/subjects/#{subject}/versions" + end), + "context:location:project:schema_registry:subject" => (proc do |project:, location:, schema_registry:, context:, subject:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "schema_registry cannot contain /" if schema_registry.to_s.include? "/" + raise ::ArgumentError, "context cannot contain /" if context.to_s.include? "/" + + "projects/#{project}/locations/#{location}/schemaRegistries/#{schema_registry}/contexts/#{context}/compatibility/subjects/#{subject}/versions" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest.rb new file mode 100644 index 000000000000..79e1ee54bb39 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managed_kafka/schema_registry/v1/version" +require "google/cloud/managed_kafka/schema_registry/v1/bindings_override" + +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/credentials" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/paths" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client" + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + module V1 + ## + # SchemaRegistry is a service that allows users to manage schemas for their + # Kafka clusters. It provides APIs to register, list, and delete schemas, as + # well as to get the schema for a given schema id or a given version id under a + # subject, to update the global or subject-specific compatibility mode, and to + # check the compatibility of a schema against a subject or a version. The main + # resource hierarchy is as follows: + # + # * SchemaRegistry + # * SchemaRegistry/Context + # * SchemaRegistry/Context/Schema + # * SchemaRegistry/Context/Subject + # * SchemaRegistry/Context/Subject/Version + # * SchemaRegistry/Config + # * SchemaRegistry/Mode + # + # **SchemaRegistry** is the root resource to represent a schema registry + # instance. A customer can have multiple schema registry instances in a + # project. + # + # **Context** is a context resource that represents a group of + # schemas, subjects and versions. A schema registry instance can have multiple + # contexts and always has a 'default' context. Contexts are independent of each + # other. Context is optional and if not specified, it falls back to the + # 'default' context. + # + # **Schema** is a schema resource that represents a unique schema in a context + # of a schema registry instance. Each schema has a unique schema id, and can be + # referenced by a version of a subject. + # + # **Subject** refers to the name under which the schema is registered. A + # typical subject is the Kafka topic name. A schema registry instance can have + # multiple subjects. + # + # **Version** represents a version of a subject. A subject can have multiple + # versions. Creation of new version of a subject is guarded by the + # compatibility mode configured globally or for the subject specifically. + # + # **Config** represents a config at global level cross all registry + # instances or at subject level. Currently, only compatibility is supported in + # config. + # + # **Mode** represents the mode of a schema registry or a specific subject. + # Three modes are supported: + # * READONLY: The schema registry is in read-only mode, no write operations + # allowed.. + # * READWRITE: The schema registry is in read-write mode, which allows limited + # write operations on the schema. + # * IMPORT: The schema registry is in import mode, which allows more editing + # operations on the schema for data importing purposes. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest" + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + module ManagedSchemaRegistry + # 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/managed_kafka/schema_registry/v1/managed_schema_registry/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb new file mode 100644 index 000000000000..7f7638ed7e6f --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb @@ -0,0 +1,2903 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managedkafka/schemaregistry/v1/schema_registry_pb" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + module V1 + module ManagedSchemaRegistry + module Rest + ## + # REST client for the ManagedSchemaRegistry service. + # + # SchemaRegistry is a service that allows users to manage schemas for their + # Kafka clusters. It provides APIs to register, list, and delete schemas, as + # well as to get the schema for a given schema id or a given version id under a + # subject, to update the global or subject-specific compatibility mode, and to + # check the compatibility of a schema against a subject or a version. The main + # resource hierarchy is as follows: + # + # * SchemaRegistry + # * SchemaRegistry/Context + # * SchemaRegistry/Context/Schema + # * SchemaRegistry/Context/Subject + # * SchemaRegistry/Context/Subject/Version + # * SchemaRegistry/Config + # * SchemaRegistry/Mode + # + # **SchemaRegistry** is the root resource to represent a schema registry + # instance. A customer can have multiple schema registry instances in a + # project. + # + # **Context** is a context resource that represents a group of + # schemas, subjects and versions. A schema registry instance can have multiple + # contexts and always has a 'default' context. Contexts are independent of each + # other. Context is optional and if not specified, it falls back to the + # 'default' context. + # + # **Schema** is a schema resource that represents a unique schema in a context + # of a schema registry instance. Each schema has a unique schema id, and can be + # referenced by a version of a subject. + # + # **Subject** refers to the name under which the schema is registered. A + # typical subject is the Kafka topic name. A schema registry instance can have + # multiple subjects. + # + # **Version** represents a version of a subject. A subject can have multiple + # versions. Creation of new version of a subject is guarded by the + # compatibility mode configured globally or for the subject specifically. + # + # **Config** represents a config at global level cross all registry + # instances or at subject level. Currently, only compatibility is supported in + # config. + # + # **Mode** represents the mode of a schema registry or a specific subject. + # Three modes are supported: + # * READONLY: The schema registry is in read-only mode, no write operations + # allowed.. + # * READWRITE: The schema registry is in read-write mode, which allows limited + # write operations on the schema. + # * IMPORT: The schema registry is in import mode, which allows more editing + # operations on the schema for data importing purposes. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "managedkafka.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :managed_schema_registry_stub + + ## + # Configure the ManagedSchemaRegistry Client class. + # + # See {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ManagedSchemaRegistry clients + # ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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", "ManagedKafka", "SchemaRegistry", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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 + @managed_schema_registry_stub.universe_domain + end + + ## + # Create a new ManagedSchemaRegistry REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ManagedSchemaRegistry 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 + + @managed_schema_registry_stub = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @managed_schema_registry_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @managed_schema_registry_stub.endpoint + config.universe_domain = @managed_schema_registry_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @managed_schema_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @managed_schema_registry_stub.logger + end + + # Service calls + + ## + # Get the schema registry instance. + # + # @overload get_schema_registry(request, options = nil) + # Pass arguments to `get_schema_registry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest, ::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_schema_registry(name: nil) + # Pass arguments to `get_schema_registry` 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 name of the schema registry instance to return. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest.new + # + # # Call the get_schema_registry method. + # result = client.get_schema_registry request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry. + # p result + # + def get_schema_registry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest + + # 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_schema_registry.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::ManagedKafka::SchemaRegistry::V1::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_schema_registry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_schema_registry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.get_schema_registry 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 + + ## + # List schema registries. + # + # @overload list_schema_registries(request, options = nil) + # Pass arguments to `list_schema_registries` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest, ::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_schema_registries(parent: nil) + # Pass arguments to `list_schema_registries` 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 parent whose schema registry instances are to be listed. + # Structured like: `projects/{project}/locations/{location}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest.new + # + # # Call the list_schema_registries method. + # result = client.list_schema_registries request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse. + # p result + # + def list_schema_registries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest + + # 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_schema_registries.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::ManagedKafka::SchemaRegistry::V1::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_schema_registries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_schema_registries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.list_schema_registries 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 + + ## + # Create a schema registry instance. + # + # @overload create_schema_registry(request, options = nil) + # Pass arguments to `create_schema_registry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest, ::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_schema_registry(parent: nil, schema_registry_id: nil, schema_registry: nil) + # Pass arguments to `create_schema_registry` 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 parent whose schema registry instance is to be created. + # Structured like: `projects/{project}/locations/{location}` + # @param schema_registry_id [::String] + # Required. The schema registry instance ID to use for this schema registry. + # The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores + # (-). The maximum length is 63 characters. + # The ID must not start with a number. + # @param schema_registry [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry, ::Hash] + # Required. The schema registry instance to create. + # The name field is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest.new + # + # # Call the create_schema_registry method. + # result = client.create_schema_registry request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry. + # p result + # + def create_schema_registry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest + + # 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_schema_registry.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::ManagedKafka::SchemaRegistry::V1::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_schema_registry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_schema_registry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.create_schema_registry 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 + + ## + # Delete a schema registry instance. + # + # @overload delete_schema_registry(request, options = nil) + # Pass arguments to `delete_schema_registry` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest, ::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_schema_registry(name: nil) + # Pass arguments to `delete_schema_registry` 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 name of the schema registry instance to delete. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # @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/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest.new + # + # # Call the delete_schema_registry method. + # result = client.delete_schema_registry request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_schema_registry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest + + # 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_schema_registry.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::ManagedKafka::SchemaRegistry::V1::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_schema_registry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_schema_registry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.delete_schema_registry 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 + + ## + # Get the context. + # + # @overload get_context(request, options = nil) + # Pass arguments to `get_context` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest, ::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_context(name: nil) + # Pass arguments to `get_context` 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 name of the context to return. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest.new + # + # # Call the get_context method. + # result = client.get_context request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context. + # p result + # + def get_context request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest + + # 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_context.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::ManagedKafka::SchemaRegistry::V1::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_context.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_context.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.get_context 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 + + ## + # List contexts for a schema registry. + # + # @overload list_contexts(request, options = nil) + # Pass arguments to `list_contexts` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest, ::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_contexts(parent: nil) + # Pass arguments to `list_contexts` 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 parent of the contexts. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest.new + # + # # Call the list_contexts method. + # result = client.list_contexts request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_contexts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest + + # 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_contexts.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::ManagedKafka::SchemaRegistry::V1::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_contexts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_contexts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.list_contexts 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 + + ## + # Get the schema for the given schema id. + # + # @overload get_schema(request, options = nil) + # Pass arguments to `get_schema` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest, ::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_schema(name: nil, subject: nil) + # Pass arguments to `get_schema` 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 name of the schema to return. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # @param subject [::String] + # Optional. Used to limit the search for the schema ID to a specific subject, + # otherwise the schema ID will be searched for in all subjects in the given + # specified context. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new + # + # # Call the get_schema method. + # result = client.get_schema request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema. + # p result + # + def get_schema request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest + + # 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_schema.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::ManagedKafka::SchemaRegistry::V1::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_schema.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_schema.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.get_schema 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 + + ## + # Get the schema string for the given schema id. + # The response will be the schema string. + # + # @overload get_raw_schema(request, options = nil) + # Pass arguments to `get_raw_schema` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest, ::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_raw_schema(name: nil, subject: nil) + # Pass arguments to `get_raw_schema` 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 name of the schema to return. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # @param subject [::String] + # Optional. Used to limit the search for the schema ID to a specific subject, + # otherwise the schema ID will be searched for in all subjects in the given + # specified context. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new + # + # # Call the get_raw_schema method. + # result = client.get_raw_schema request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def get_raw_schema request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest + + # 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_raw_schema.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::ManagedKafka::SchemaRegistry::V1::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_raw_schema.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_raw_schema.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.get_raw_schema 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 + + ## + # List the schema versions for the given schema id. + # The response will be an array of subject-version pairs as: + # [\\{"subject":"subject1", "version":1}, \\{"subject":"subject2", "version":2}]. + # + # @overload list_schema_versions(request, options = nil) + # Pass arguments to `list_schema_versions` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest, ::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_schema_versions(parent: nil, subject: nil, deleted: nil) + # Pass arguments to `list_schema_versions` 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 schema whose schema versions are to be listed. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + # @param subject [::String] + # Optional. The subject to filter the subjects by. + # @param deleted [::Boolean] + # Optional. If true, the response will include soft-deleted versions of the + # schema, even if the subject is soft-deleted. The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest.new + # + # # Call the list_schema_versions method. + # result = client.list_schema_versions request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_schema_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest + + # 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_schema_versions.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::ManagedKafka::SchemaRegistry::V1::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_schema_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_schema_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.list_schema_versions 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 + + ## + # List the supported schema types. + # The response will be an array of schema types. + # + # @overload list_schema_types(request, options = nil) + # Pass arguments to `list_schema_types` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest, ::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_schema_types(parent: nil) + # Pass arguments to `list_schema_types` 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 parent schema registry whose schema types are to be listed. + # Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest.new + # + # # Call the list_schema_types method. + # result = client.list_schema_types request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_schema_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest + + # 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_schema_types.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::ManagedKafka::SchemaRegistry::V1::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_schema_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_schema_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.list_schema_types 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 + + ## + # List subjects in the schema registry. + # The response will be an array of subject names. + # + # @overload list_subjects(request, options = nil) + # Pass arguments to `list_subjects` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest, ::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_subjects(parent: nil, subject_prefix: nil, deleted: nil) + # Pass arguments to `list_subjects` 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 parent schema registry/context whose subjects are to be + # listed. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + # @param subject_prefix [::String] + # Optional. The context to filter the subjects by, in the format of + # `:.{context}:`. If unset, all subjects in the registry are returned. Set to + # empty string or add as + # '?subjectPrefix=' at the end of this request to list subjects in the + # default context. + # @param deleted [::Boolean] + # Optional. If true, the response will include soft-deleted subjects. The + # default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest.new + # + # # Call the list_subjects method. + # result = client.list_subjects request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_subjects request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest + + # 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_subjects.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::ManagedKafka::SchemaRegistry::V1::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_subjects.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_subjects.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.list_subjects 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 + + ## + # List subjects which reference a particular schema id. + # The response will be an array of subject names. + # + # @overload list_subjects_by_schema_id(request, options = nil) + # Pass arguments to `list_subjects_by_schema_id` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest, ::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_subjects_by_schema_id(parent: nil, subject: nil, deleted: nil) + # Pass arguments to `list_subjects_by_schema_id` 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 schema resource whose associated subjects are to be listed. + # Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + # @param subject [::String] + # Optional. The subject to filter the subjects by. + # @param deleted [::Boolean] + # Optional. If true, the response will include soft-deleted subjects. The + # default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest.new + # + # # Call the list_subjects_by_schema_id method. + # result = client.list_subjects_by_schema_id request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_subjects_by_schema_id request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest + + # 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_subjects_by_schema_id.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::ManagedKafka::SchemaRegistry::V1::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_subjects_by_schema_id.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_subjects_by_schema_id.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.list_subjects_by_schema_id 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 + + ## + # Delete a subject. + # The response will be an array of versions of the deleted subject. + # + # @overload delete_subject(request, options = nil) + # Pass arguments to `delete_subject` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest, ::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_subject(name: nil, permanent: nil) + # Pass arguments to `delete_subject` 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 name of the subject to delete. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @param permanent [::Boolean] + # Optional. If true, the subject and all associated metadata including the + # schema ID will be deleted permanently. Otherwise, only the subject is + # soft-deleted. The default is false. Soft-deleted subjects can still be + # searched in ListSubjects API call with deleted=true query parameter. A + # soft-delete of a subject must be performed before a hard-delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest.new + # + # # Call the delete_subject method. + # result = client.delete_subject request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def delete_subject request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest + + # 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_subject.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::ManagedKafka::SchemaRegistry::V1::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_subject.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_subject.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.delete_subject 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 + + ## + # Lookup a schema under the specified subject. + # + # @overload lookup_version(request, options = nil) + # Pass arguments to `lookup_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest, ::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 lookup_version(parent: nil, schema_type: nil, schema: nil, references: nil, normalize: nil, deleted: nil) + # Pass arguments to `lookup_version` 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 subject to lookup the schema in. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @param schema_type [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The schema type of the schema. + # @param schema [::String] + # Required. The schema payload + # @param references [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, ::Hash>] + # Optional. The schema references used by the schema. + # @param normalize [::Boolean] + # Optional. If true, the schema will be normalized before being looked up. + # The default is false. + # @param deleted [::Boolean] + # Optional. If true, soft-deleted versions will be included in lookup, no + # matter if the subject is active or soft-deleted. If false, soft-deleted + # versions will be excluded. The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest.new + # + # # Call the lookup_version method. + # result = client.lookup_version request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion. + # p result + # + def lookup_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest + + # 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.lookup_version.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::ManagedKafka::SchemaRegistry::V1::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.lookup_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.lookup_version 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 + + ## + # Get a versioned schema (schema with subject/version) of a subject. + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest, ::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_version(name: nil, deleted: nil) + # Pass arguments to `get_version` 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 name of the subject to return versions. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @param deleted [::Boolean] + # Optional. If true, no matter if the subject/version is soft-deleted or not, + # it returns the version details. If false, it returns NOT_FOUND error if the + # subject/version is soft-deleted. The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest + + # 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_version.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::ManagedKafka::SchemaRegistry::V1::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_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.get_version 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 + + ## + # Get the schema string only for a version of a subject. + # The response will be the schema string. + # + # @overload get_raw_schema_version(request, options = nil) + # Pass arguments to `get_raw_schema_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest, ::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_raw_schema_version(name: nil, deleted: nil) + # Pass arguments to `get_raw_schema_version` 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 name of the subject to return versions. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @param deleted [::Boolean] + # Optional. If true, no matter if the subject/version is soft-deleted or not, + # it returns the version details. If false, it returns NOT_FOUND error if the + # subject/version is soft-deleted. The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new + # + # # Call the get_raw_schema_version method. + # result = client.get_raw_schema_version request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def get_raw_schema_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest + + # 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_raw_schema_version.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::ManagedKafka::SchemaRegistry::V1::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_raw_schema_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_raw_schema_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.get_raw_schema_version 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 + + ## + # Get all versions of a subject. + # The response will be an array of versions of the subject. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest, ::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_versions(parent: nil, deleted: nil) + # Pass arguments to `list_versions` 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 subject whose versions are to be listed. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @param deleted [::Boolean] + # Optional. If true, the response will include soft-deleted versions of an + # active or soft-deleted subject. The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_versions request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest + + # 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_versions.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::ManagedKafka::SchemaRegistry::V1::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_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.list_versions 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 + + ## + # Register a new version under a given subject with the given schema. + # + # @overload create_version(request, options = nil) + # Pass arguments to `create_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest, ::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_version(parent: nil, version: nil, id: nil, schema_type: nil, schema: nil, references: nil, normalize: nil) + # Pass arguments to `create_version` 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 subject to create the version for. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @param version [::Integer] + # Optional. The version to create. It is optional. If not specified, the + # version will be created with the max version ID of the subject increased + # by 1. If the version ID is specified, it will be used as the new version ID + # and must not be used by an existing version of the subject. + # @param id [::Integer] + # Optional. The schema ID of the schema. If not specified, the schema ID will + # be generated by the server. If the schema ID is specified, it must not be + # used by an existing schema that is different from the schema to be created. + # @param schema_type [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The type of the schema. It is optional. If not specified, the + # schema type will be AVRO. + # @param schema [::String] + # Required. The schema payload + # @param references [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, ::Hash>] + # Optional. The schema references used by the schema. + # @param normalize [::Boolean] + # Optional. If true, the schema will be normalized before being stored. The + # default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest.new + # + # # Call the create_version method. + # result = client.create_version request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse. + # p result + # + def create_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest + + # 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_version.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::ManagedKafka::SchemaRegistry::V1::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_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.create_version 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 + + ## + # Delete a version of a subject. + # The response will be the deleted version id. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest, ::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_version(name: nil, permanent: nil) + # Pass arguments to `delete_version` 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 name of the subject version to delete. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @param permanent [::Boolean] + # Optional. If true, both the version and the referenced schema ID will be + # permanently deleted. The default is false. If false, the version will be + # deleted but the schema ID will be retained. Soft-deleted versions can still + # be searched in ListVersions API call with deleted=true query parameter. A + # soft-delete of a version must be performed before a hard-delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def delete_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest + + # 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_version.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::ManagedKafka::SchemaRegistry::V1::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_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.delete_version 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 + + ## + # Get a list of IDs of schemas that reference the schema with the given + # subject and version. + # + # @overload list_referenced_schemas(request, options = nil) + # Pass arguments to `list_referenced_schemas` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest, ::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_referenced_schemas(parent: nil) + # Pass arguments to `list_referenced_schemas` 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 version to list referenced by. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest.new + # + # # Call the list_referenced_schemas method. + # result = client.list_referenced_schemas request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def list_referenced_schemas request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest + + # 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_referenced_schemas.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::ManagedKafka::SchemaRegistry::V1::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_referenced_schemas.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_referenced_schemas.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.list_referenced_schemas 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 + + ## + # Check compatibility of a schema with all versions or a specific version of + # a subject. + # + # @overload check_compatibility(request, options = nil) + # Pass arguments to `check_compatibility` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest, ::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 check_compatibility(name: nil, schema_type: nil, schema: nil, references: nil, verbose: nil) + # Pass arguments to `check_compatibility` 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 name of the resource to check compatibility for. The format + # is either of following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/compatibility/subjects/*/versions: Check compatibility with one or + # more versions of the specified subject. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/compatibility/subjects/\\{subject}/versions/\\{version}: Check + # compatibility with a specific version of the subject. + # @param schema_type [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The schema type of the schema. + # @param schema [::String] + # Required. The schema payload + # @param references [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, ::Hash>] + # Optional. The schema references used by the schema. + # @param verbose [::Boolean] + # Optional. If true, the response will contain the compatibility check result + # with reasons for failed checks. The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest.new + # + # # Call the check_compatibility method. + # result = client.check_compatibility request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse. + # p result + # + def check_compatibility request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest + + # 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.check_compatibility.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::ManagedKafka::SchemaRegistry::V1::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.check_compatibility.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.check_compatibility.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.check_compatibility 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 + + ## + # Get schema config at global level or for a subject. + # + # @overload get_schema_config(request, options = nil) + # Pass arguments to `get_schema_config` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest, ::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_schema_config(name: nil, default_to_global: nil) + # Pass arguments to `get_schema_config` 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 resource name to get the config for. It can be either of + # following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config: Get config at global level. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject}: Get config for a specific subject. + # @param default_to_global [::Boolean] + # Optional. If true, the config will fall back to the config at the global + # level if no subject level config is found. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest.new + # + # # Call the get_schema_config method. + # result = client.get_schema_config request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + # p result + # + def get_schema_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest + + # 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_schema_config.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::ManagedKafka::SchemaRegistry::V1::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_schema_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_schema_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.get_schema_config 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 + + ## + # Update config at global level or for a subject. + # Creates a SchemaSubject-level SchemaConfig if it does not exist. + # + # @overload update_schema_config(request, options = nil) + # Pass arguments to `update_schema_config` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest, ::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 update_schema_config(name: nil, compatibility: nil, normalize: nil) + # Pass arguments to `update_schema_config` 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 resource name to update the config for. It can be either of + # following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config: Update config at global level. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject}: Update config for a specific subject. + # @param compatibility [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig::CompatibilityType] + # Required. The compatibility type of the schemas. + # Cannot be unset for a SchemaRegistry-level SchemaConfig. + # If unset on a SchemaSubject-level SchemaConfig, removes the compatibility + # field for the SchemaConfig. + # @param normalize [::Boolean] + # Optional. If true, the schema will be normalized before being stored or + # looked up. The default is false. Cannot be unset for a SchemaRegistry-level + # SchemaConfig. If unset on a SchemaSubject-level SchemaConfig, removes the + # normalize field for the SchemaConfig. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest.new + # + # # Call the update_schema_config method. + # result = client.update_schema_config request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + # p result + # + def update_schema_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest + + # 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.update_schema_config.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::ManagedKafka::SchemaRegistry::V1::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.update_schema_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_schema_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.update_schema_config 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 + + ## + # Delete schema config for a subject. + # + # @overload delete_schema_config(request, options = nil) + # Pass arguments to `delete_schema_config` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest, ::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_schema_config(name: nil) + # Pass arguments to `delete_schema_config` 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 resource name of subject to delete the config for. The format + # is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest.new + # + # # Call the delete_schema_config method. + # result = client.delete_schema_config request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + # p result + # + def delete_schema_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest + + # 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_schema_config.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::ManagedKafka::SchemaRegistry::V1::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_schema_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_schema_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.delete_schema_config 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 + + ## + # Get mode at global level or for a subject. + # + # @overload get_schema_mode(request, options = nil) + # Pass arguments to `get_schema_mode` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest, ::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_schema_mode(name: nil) + # Pass arguments to `get_schema_mode` 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 resource name of the mode. The format is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject}: mode for a schema registry, or + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject}: mode for a specific subject in a specific context + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest.new + # + # # Call the get_schema_mode method. + # result = client.get_schema_mode request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + # p result + # + def get_schema_mode request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest + + # 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_schema_mode.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::ManagedKafka::SchemaRegistry::V1::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_schema_mode.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_schema_mode.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.get_schema_mode 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 + + ## + # Update mode at global level or for a subject. + # + # @overload update_schema_mode(request, options = nil) + # Pass arguments to `update_schema_mode` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest, ::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 update_schema_mode(name: nil, mode: nil) + # Pass arguments to `update_schema_mode` 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 resource name of the mode. The format is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject}: mode for a schema registry, or + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject}: mode for a specific subject in a specific context + # @param mode [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode::ModeType] + # Required. The mode type. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest.new + # + # # Call the update_schema_mode method. + # result = client.update_schema_mode request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + # p result + # + def update_schema_mode request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest + + # 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.update_schema_mode.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::ManagedKafka::SchemaRegistry::V1::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.update_schema_mode.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_schema_mode.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.update_schema_mode 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 + + ## + # Delete schema mode for a subject. + # + # @overload delete_schema_mode(request, options = nil) + # Pass arguments to `delete_schema_mode` via a request object, either of type + # {::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest, ::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_schema_mode(name: nil) + # Pass arguments to `delete_schema_mode` 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 resource name of subject to delete the mode for. The format + # is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject} + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/managed_kafka/schema_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest.new + # + # # Call the delete_schema_mode method. + # result = client.delete_schema_mode request + # + # # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + # p result + # + def delete_schema_mode request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest + + # 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_schema_mode.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::ManagedKafka::SchemaRegistry::V1::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_schema_mode.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_schema_mode.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @managed_schema_registry_stub.delete_schema_mode 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 + + ## + # Configuration class for the ManagedSchemaRegistry REST API. + # + # This class represents the configuration for ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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 + # # get_schema_registry to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_schema_registry.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_schema_registry.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 = "managedkafka.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, 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 ManagedSchemaRegistry 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 `get_schema_registry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema_registry + ## + # RPC-specific configuration for `list_schema_registries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_schema_registries + ## + # RPC-specific configuration for `create_schema_registry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_schema_registry + ## + # RPC-specific configuration for `delete_schema_registry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_schema_registry + ## + # RPC-specific configuration for `get_context` + # @return [::Gapic::Config::Method] + # + attr_reader :get_context + ## + # RPC-specific configuration for `list_contexts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_contexts + ## + # RPC-specific configuration for `get_schema` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema + ## + # RPC-specific configuration for `get_raw_schema` + # @return [::Gapic::Config::Method] + # + attr_reader :get_raw_schema + ## + # RPC-specific configuration for `list_schema_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_schema_versions + ## + # RPC-specific configuration for `list_schema_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_schema_types + ## + # RPC-specific configuration for `list_subjects` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subjects + ## + # RPC-specific configuration for `list_subjects_by_schema_id` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subjects_by_schema_id + ## + # RPC-specific configuration for `delete_subject` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_subject + ## + # RPC-specific configuration for `lookup_version` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_version + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `get_raw_schema_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_raw_schema_version + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `create_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `list_referenced_schemas` + # @return [::Gapic::Config::Method] + # + attr_reader :list_referenced_schemas + ## + # RPC-specific configuration for `check_compatibility` + # @return [::Gapic::Config::Method] + # + attr_reader :check_compatibility + ## + # RPC-specific configuration for `get_schema_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema_config + ## + # RPC-specific configuration for `update_schema_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_schema_config + ## + # RPC-specific configuration for `delete_schema_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_schema_config + ## + # RPC-specific configuration for `get_schema_mode` + # @return [::Gapic::Config::Method] + # + attr_reader :get_schema_mode + ## + # RPC-specific configuration for `update_schema_mode` + # @return [::Gapic::Config::Method] + # + attr_reader :update_schema_mode + ## + # RPC-specific configuration for `delete_schema_mode` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_schema_mode + + # @private + def initialize parent_rpcs = nil + get_schema_registry_config = parent_rpcs.get_schema_registry if parent_rpcs.respond_to? :get_schema_registry + @get_schema_registry = ::Gapic::Config::Method.new get_schema_registry_config + list_schema_registries_config = parent_rpcs.list_schema_registries if parent_rpcs.respond_to? :list_schema_registries + @list_schema_registries = ::Gapic::Config::Method.new list_schema_registries_config + create_schema_registry_config = parent_rpcs.create_schema_registry if parent_rpcs.respond_to? :create_schema_registry + @create_schema_registry = ::Gapic::Config::Method.new create_schema_registry_config + delete_schema_registry_config = parent_rpcs.delete_schema_registry if parent_rpcs.respond_to? :delete_schema_registry + @delete_schema_registry = ::Gapic::Config::Method.new delete_schema_registry_config + get_context_config = parent_rpcs.get_context if parent_rpcs.respond_to? :get_context + @get_context = ::Gapic::Config::Method.new get_context_config + list_contexts_config = parent_rpcs.list_contexts if parent_rpcs.respond_to? :list_contexts + @list_contexts = ::Gapic::Config::Method.new list_contexts_config + get_schema_config = parent_rpcs.get_schema if parent_rpcs.respond_to? :get_schema + @get_schema = ::Gapic::Config::Method.new get_schema_config + get_raw_schema_config = parent_rpcs.get_raw_schema if parent_rpcs.respond_to? :get_raw_schema + @get_raw_schema = ::Gapic::Config::Method.new get_raw_schema_config + list_schema_versions_config = parent_rpcs.list_schema_versions if parent_rpcs.respond_to? :list_schema_versions + @list_schema_versions = ::Gapic::Config::Method.new list_schema_versions_config + list_schema_types_config = parent_rpcs.list_schema_types if parent_rpcs.respond_to? :list_schema_types + @list_schema_types = ::Gapic::Config::Method.new list_schema_types_config + list_subjects_config = parent_rpcs.list_subjects if parent_rpcs.respond_to? :list_subjects + @list_subjects = ::Gapic::Config::Method.new list_subjects_config + list_subjects_by_schema_id_config = parent_rpcs.list_subjects_by_schema_id if parent_rpcs.respond_to? :list_subjects_by_schema_id + @list_subjects_by_schema_id = ::Gapic::Config::Method.new list_subjects_by_schema_id_config + delete_subject_config = parent_rpcs.delete_subject if parent_rpcs.respond_to? :delete_subject + @delete_subject = ::Gapic::Config::Method.new delete_subject_config + lookup_version_config = parent_rpcs.lookup_version if parent_rpcs.respond_to? :lookup_version + @lookup_version = ::Gapic::Config::Method.new lookup_version_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + get_raw_schema_version_config = parent_rpcs.get_raw_schema_version if parent_rpcs.respond_to? :get_raw_schema_version + @get_raw_schema_version = ::Gapic::Config::Method.new get_raw_schema_version_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + create_version_config = parent_rpcs.create_version if parent_rpcs.respond_to? :create_version + @create_version = ::Gapic::Config::Method.new create_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + list_referenced_schemas_config = parent_rpcs.list_referenced_schemas if parent_rpcs.respond_to? :list_referenced_schemas + @list_referenced_schemas = ::Gapic::Config::Method.new list_referenced_schemas_config + check_compatibility_config = parent_rpcs.check_compatibility if parent_rpcs.respond_to? :check_compatibility + @check_compatibility = ::Gapic::Config::Method.new check_compatibility_config + get_schema_config_config = parent_rpcs.get_schema_config if parent_rpcs.respond_to? :get_schema_config + @get_schema_config = ::Gapic::Config::Method.new get_schema_config_config + update_schema_config_config = parent_rpcs.update_schema_config if parent_rpcs.respond_to? :update_schema_config + @update_schema_config = ::Gapic::Config::Method.new update_schema_config_config + delete_schema_config_config = parent_rpcs.delete_schema_config if parent_rpcs.respond_to? :delete_schema_config + @delete_schema_config = ::Gapic::Config::Method.new delete_schema_config_config + get_schema_mode_config = parent_rpcs.get_schema_mode if parent_rpcs.respond_to? :get_schema_mode + @get_schema_mode = ::Gapic::Config::Method.new get_schema_mode_config + update_schema_mode_config = parent_rpcs.update_schema_mode if parent_rpcs.respond_to? :update_schema_mode + @update_schema_mode = ::Gapic::Config::Method.new update_schema_mode_config + delete_schema_mode_config = parent_rpcs.delete_schema_mode if parent_rpcs.respond_to? :delete_schema_mode + @delete_schema_mode = ::Gapic::Config::Method.new delete_schema_mode_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/service_stub.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/service_stub.rb new file mode 100644 index 000000000000..50c327da92da --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/service_stub.rb @@ -0,0 +1,1888 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managedkafka/schemaregistry/v1/schema_registry_pb" + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + module V1 + module ManagedSchemaRegistry + module Rest + ## + # REST service stub for the ManagedSchemaRegistry 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: true, + 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 get_schema_registry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # A result object deserialized from the server's reply + def get_schema_registry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_schema_registry_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_schema_registry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry.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_schema_registries REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest] + # 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::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse] + # A result object deserialized from the server's reply + def list_schema_registries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_schema_registries_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_schema_registries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_schema_registry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # A result object deserialized from the server's reply + def create_schema_registry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_schema_registry_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_schema_registry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry.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_schema_registry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest] + # 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_schema_registry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_schema_registry_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_schema_registry", + 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_context REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest] + # 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::ManagedKafka::SchemaRegistry::V1::Context] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context] + # A result object deserialized from the server's reply + def get_context request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_context_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_context", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context.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_contexts REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def list_contexts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_contexts_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_contexts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_schema REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest] + # 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::ManagedKafka::SchemaRegistry::V1::Schema] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema] + # A result object deserialized from the server's reply + def get_schema request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_schema_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_schema", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema.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_raw_schema REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def get_raw_schema request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_raw_schema_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_raw_schema", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_schema_versions REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def list_schema_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_schema_versions_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_schema_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_schema_types REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def list_schema_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_schema_types_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_schema_types", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_subjects REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def list_subjects request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_subjects_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_subjects", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_subjects_by_schema_id REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def list_subjects_by_schema_id request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_subjects_by_schema_id_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_subjects_by_schema_id", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_subject REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def delete_subject request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_subject_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_subject", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the lookup_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # A result object deserialized from the server's reply + def lookup_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_version_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: "lookup_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion.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_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion] + # A result object deserialized from the server's reply + def get_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_version_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_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion.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_raw_schema_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def get_raw_schema_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_raw_schema_version_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_raw_schema_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_versions REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def list_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_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_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest] + # 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::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse] + # A result object deserialized from the server's reply + def create_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_version_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_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse.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_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def delete_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_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_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_referenced_schemas REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest] + # 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::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def list_referenced_schemas request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_referenced_schemas_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_referenced_schemas", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the check_compatibility REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest] + # 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::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse] + # A result object deserialized from the server's reply + def check_compatibility request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_check_compatibility_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: "check_compatibility", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse.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_schema_config REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # A result object deserialized from the server's reply + def get_schema_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_schema_config_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_schema_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_schema_config REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # A result object deserialized from the server's reply + def update_schema_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_schema_config_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: "update_schema_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.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_schema_config REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig] + # A result object deserialized from the server's reply + def delete_schema_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_schema_config_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_schema_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.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_schema_mode REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # A result object deserialized from the server's reply + def get_schema_mode request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_schema_mode_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_schema_mode", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_schema_mode REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # A result object deserialized from the server's reply + def update_schema_mode request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_schema_mode_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: "update_schema_mode", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.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_schema_mode REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest] + # 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::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode] + # A result object deserialized from the server's reply + def delete_schema_mode request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_schema_mode_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_schema_mode", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.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 get_schema_registry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest] + # 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_schema_registry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_schema_registries REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest] + # 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_schema_registries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/schemaRegistries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_schema_registry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest] + # 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_schema_registry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/schemaRegistries", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_schema_registry REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest] + # 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_schema_registry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_context REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest] + # 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_context_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_contexts REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest] + # 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_contexts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/contexts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_schema REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest] + # 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_schema_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/schemas(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/schemas(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_raw_schema REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest] + # 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_raw_schema_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/schema", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/schemas(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/schema", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/schemas(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_schema_versions REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest] + # 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_schema_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/schemas(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/schemas(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_schema_types REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest] + # 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_schema_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/schemas/types", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/schemas/types", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_subjects REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest] + # 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_subjects_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/subjects", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/subjects", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_subjects_by_schema_id REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest] + # 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_subjects_by_schema_id_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/subjects", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/schemas(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/subjects", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/schemas(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_subject REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest] + # 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_subject_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/subjects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/subjects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/subjects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/subjects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest] + # 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_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/subjects/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/subjects/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_raw_schema_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest] + # 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_raw_schema_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/schema", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/subjects/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/schema", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/subjects/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_versions REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest] + # 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_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/subjects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/subjects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest] + # 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_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/versions", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/subjects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/versions", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/subjects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_version REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest] + # 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_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/subjects/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/subjects/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_referenced_schemas REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest] + # 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_referenced_schemas_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/referencedby", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/subjects/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/referencedby", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/subjects/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the check_compatibility REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_check_compatibility_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/compatibility(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/compatibility(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_schema_config REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest] + # 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_schema_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/config(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/config(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_schema_config REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_schema_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/config(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/config(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_schema_config REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest] + # 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_schema_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/config(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/config(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_schema_mode REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest] + # 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_schema_mode_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/mode(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/mode(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_schema_mode REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_schema_mode_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/mode(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/mode(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_schema_mode REST call + # + # @param request_pb [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest] + # 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_schema_mode_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/mode(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/schemaRegistries/[^/]+/contexts/[^/]+/mode(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/rest.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/rest.rb new file mode 100644 index 000000000000..28052a5fb1dd --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managed_kafka/schema_registry/v1/managed_schema_registry/rest" +require "google/cloud/managed_kafka/schema_registry/v1/bindings_override" +require "google/cloud/managed_kafka/schema_registry/v1/version" + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/managed_kafka/schema_registry/v1/rest" + # client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/version.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/version.rb new file mode 100644 index 000000000000..6ddca6849dba --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ManagedKafka + module SchemaRegistry + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_pb.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_pb.rb new file mode 100644 index 000000000000..2de95e32b56d --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_pb.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/httpbody_pb' +require 'google/api/resource_pb' +require 'google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\nAgoogle/cloud/managedkafka/schemaregistry/v1/schema_registry.proto\x12+google.cloud.managedkafka.schemaregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1aKgoogle/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"\\\n\x18GetSchemaRegistryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*managedkafka.googleapis.com/SchemaRegistry\"8\n\x1bListSchemaRegistriesRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\"v\n\x1cListSchemaRegistriesResponse\x12V\n\x11schema_registries\x18\x01 \x03(\x0b\x32;.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry\"\xb4\x01\n\x1b\x43reateSchemaRegistryRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x1f\n\x12schema_registry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x0fschema_registry\x18\x03 \x01(\x0b\x32;.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistryB\x03\xe0\x41\x02\"_\n\x1b\x44\x65leteSchemaRegistryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*managedkafka.googleapis.com/SchemaRegistry\"T\n\x11GetContextRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/SchemaContext\"Y\n\x13ListContextsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*managedkafka.googleapis.com/SchemaRegistry\"s\n\x10GetSchemaRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"managedkafka.googleapis.com/Schema\x12\x19\n\x07subject\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\n\n\x08_subject\"3\n\x16ListSchemaTypesRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\"\xa5\x01\n\x19ListSchemaVersionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"managedkafka.googleapis.com/Schema\x12\x19\n\x07subject\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x19\n\x07\x64\x65leted\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_subjectB\n\n\x08_deleted\"\x8c\x01\n\x13ListSubjectsRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12 \n\x0esubject_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x19\n\x07\x64\x65leted\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x11\n\x0f_subject_prefixB\n\n\x08_deleted\"\x88\x01\n\x1dListSubjectsBySchemaIdRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x19\n\x07subject\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x19\n\x07\x64\x65leted\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_subjectB\n\n\x08_deleted\"\x7f\n\x13ListVersionsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/SchemaSubject\x12\x19\n\x07\x64\x65leted\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\n\n\x08_deleted\"\x82\x01\n\x14\x44\x65leteSubjectRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/SchemaSubject\x12\x1b\n\tpermanent\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_permanent\"{\n\x11GetVersionRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/SchemaVersion\x12\x19\n\x07\x64\x65leted\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\n\n\x08_deleted\"\xaa\x03\n\x14\x43reateVersionRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/SchemaSubject\x12\x19\n\x07version\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x14\n\x02id\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12]\n\x0bschema_type\x18\x04 \x01(\x0e\x32>.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaTypeB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x13\n\x06schema\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\\\n\nreferences\x18\x06 \x03(\x0b\x32\x43.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReferenceB\x03\xe0\x41\x01\x12\x1b\n\tnormalize\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\n\n\x08_versionB\x05\n\x03_idB\x0e\n\x0c_schema_typeB\x0c\n\n_normalize\"#\n\x15\x43reateVersionResponse\x12\n\n\x02id\x18\x01 \x01(\x05\"\x8d\x03\n\x14LookupVersionRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/SchemaSubject\x12]\n\x0bschema_type\x18\x02 \x01(\x0e\x32>.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06schema\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\\\n\nreferences\x18\x04 \x03(\x0b\x32\x43.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReferenceB\x03\xe0\x41\x01\x12\x1b\n\tnormalize\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x19\n\x07\x64\x65leted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0e\n\x0c_schema_typeB\x0c\n\n_normalizeB\n\n\x08_deleted\"\x82\x01\n\x14\x44\x65leteVersionRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/SchemaVersion\x12\x1b\n\tpermanent\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_permanent\"a\n\x1cListReferencedSchemasRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)managedkafka.googleapis.com/SchemaVersion\"\xbd\x02\n\x19\x43heckCompatibilityRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12]\n\x0bschema_type\x18\x02 \x01(\x0e\x32>.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06schema\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\\\n\nreferences\x18\x04 \x03(\x0b\x32\x43.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReferenceB\x03\xe0\x41\x01\x12\x19\n\x07verbose\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_schema_typeB\n\n\x08_verbose\"T\n\x1a\x43heckCompatibilityResponse\x12$\n\ris_compatible\x18\x01 \x01(\x08R\ris_compatible\x12\x10\n\x08messages\x18\x02 \x03(\t\"\x93\x01\n\x16GetSchemaConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(managedkafka.googleapis.com/SchemaConfig\x12#\n\x11\x64\x65\x66\x61ult_to_global\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x14\n\x12_default_to_global\"\x86\x02\n\x19UpdateSchemaConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(managedkafka.googleapis.com/SchemaConfig\x12l\n\rcompatibility\x18\x02 \x01(\x0e\x32K.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityTypeB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1b\n\tnormalize\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_compatibilityB\x0c\n\n_normalize\"[\n\x19\x44\x65leteSchemaConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(managedkafka.googleapis.com/SchemaConfig\"T\n\x14GetSchemaModeRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&managedkafka.googleapis.com/SchemaMode\"\xac\x01\n\x17UpdateSchemaModeRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&managedkafka.googleapis.com/SchemaMode\x12S\n\x04mode\x18\x02 \x01(\x0e\x32@.google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeTypeB\x03\xe0\x41\x02\"W\n\x17\x44\x65leteSchemaModeRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&managedkafka.googleapis.com/SchemaMode2\xf0=\n\x15ManagedSchemaRegistry\x12\xdc\x01\n\x11GetSchemaRegistry\x12\x45.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest\x1a;.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/schemaRegistries/*}\x12\xf2\x01\n\x14ListSchemaRegistries\x12H.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest\x1aI.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/schemaRegistries\x12\xf7\x01\n\x14\x43reateSchemaRegistry\x12H.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest\x1a;.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry\"X\xda\x41\x16parent,schema_registry\x82\xd3\xe4\x93\x02\x39\"4/v1/{parent=projects/*/locations/*}/schemaRegistries:\x01*\x12\xbd\x01\n\x14\x44\x65leteSchemaRegistry\x12H.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest\x1a\x16.google.protobuf.Empty\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/schemaRegistries/*}\x12\xd2\x01\n\nGetContext\x12>.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest\x1a\x34.google.cloud.managedkafka.schemaregistry.v1.Context\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*}\x12\xb8\x01\n\x0cListContexts\x12@.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest\x1a\x14.google.api.HttpBody\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/schemaRegistries/*}/contexts\x12\x9f\x02\n\tGetSchema\x12=.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest\x1a\x33.google.cloud.managedkafka.schemaregistry.v1.Schema\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12?/v1/{name=projects/*/locations/*/schemaRegistries/*/schemas/**}ZL\x12J/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}\x12\x91\x02\n\x0cGetRawSchema\x12=.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest\x1a\x14.google.api.HttpBody\"\xab\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9d\x01\x12\x46/v1/{name=projects/*/locations/*/schemaRegistries/*/schemas/**}/schemaZS\x12Q/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/schema\x12\xaa\x02\n\x12ListSchemaVersions\x12\x46.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest\x1a\x14.google.api.HttpBody\"\xb5\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa5\x01\x12J/v1/{parent=projects/*/locations/*/schemaRegistries/*/schemas/**}/versionsZW\x12U/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/versions\x12\x98\x02\n\x0fListSchemaTypes\x12\x43.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest\x1a\x14.google.api.HttpBody\"\xa9\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x99\x01\x12\x44/v1/{parent=projects/*/locations/*/schemaRegistries/*}/schemas/typesZQ\x12O/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*}/schemas/types\x12\x9f\x02\n\x0cListSubjects\x12@.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest\x1a\x14.google.api.HttpBody\"\xb6\x01\xda\x41\x1dparent,subject_prefix,deleted\x82\xd3\xe4\x93\x02\x8f\x01\x12?/v1/{parent=projects/*/locations/*/schemaRegistries/*}/subjectsZL\x12J/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*}/subjects\x12\xc2\x02\n\x16ListSubjectsBySchemaId\x12J.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest\x1a\x14.google.api.HttpBody\"\xc5\x01\xda\x41\x16parent,subject,deleted\x82\xd3\xe4\x93\x02\xa5\x01\x12J/v1/{parent=projects/*/locations/*/schemaRegistries/*/schemas/**}/subjectsZW\x12U/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/subjects\x12\x88\x02\n\rDeleteSubject\x12\x41.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest\x1a\x14.google.api.HttpBody\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01*?/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*}ZL*J/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}\x12\xc1\x02\n\rLookupVersion\x12\x41.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest\x1a:.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion\"\xb0\x01\xda\x41\rparent,schema\x82\xd3\xe4\x93\x02\x99\x01\"A/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}:\x01*ZQ\"L/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}:\x01*\x12\xbe\x02\n\nGetVersion\x12>.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest\x1a:.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion\"\xb3\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa5\x01\x12J/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}ZW\x12U/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}\x12\xaf\x02\n\x13GetRawSchemaVersion\x12>.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest\x1a\x14.google.api.HttpBody\"\xc1\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb3\x01\x12Q/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}/schemaZ^\x12\\/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}/schema\x12\x9e\x02\n\x0cListVersions\x12@.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest\x1a\x14.google.api.HttpBody\"\xb5\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa5\x01\x12J/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}/versionsZW\x12U/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}/versions\x12\x87\x03\n\rCreateVersion\x12\x41.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest\x1a\x42.google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse\"\xee\x01\xda\x41\x39parent,version,id,schema_type,schema,references,normalize\x82\xd3\xe4\x93\x02\xab\x01\"J/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}/versions:\x01*ZZ\"U/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}/versions:\x01*\x12\x9e\x02\n\rDeleteVersion\x12\x41.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest\x1a\x14.google.api.HttpBody\"\xb3\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa5\x01*J/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}ZW*U/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}\x12\xce\x02\n\x15ListReferencedSchemas\x12I.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest\x1a\x14.google.api.HttpBody\"\xd3\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xc3\x01\x12Y/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}/referencedbyZf\x12\x64/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}/referencedby\x12\xde\x02\n\x12\x43heckCompatibility\x12\x46.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest\x1aG.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse\"\xb6\x01\xda\x41\x0bname,schema\x82\xd3\xe4\x93\x02\xa1\x01\"E/v1/{name=projects/*/locations/*/schemaRegistries/*/compatibility/**}:\x01*ZU\"P/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/compatibility/**}:\x01*\x12\xaf\x02\n\x0fGetSchemaConfig\x12\x43.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest\x1a\x39.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig\"\x9b\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8d\x01\x12>/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}ZK\x12I/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}\x12\xc9\x02\n\x12UpdateSchemaConfig\x12\x46.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest\x1a\x39.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig\"\xaf\x01\xda\x41\x12name,compatibility\x82\xd3\xe4\x93\x02\x93\x01\x1a>/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}:\x01*ZN\x1aI/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}:\x01*\x12\xb5\x02\n\x12\x44\x65leteSchemaConfig\x12\x46.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest\x1a\x39.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig\"\x9b\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8d\x01*>/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}ZK*I/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}\x12\xa5\x02\n\rGetSchemaMode\x12\x41.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest\x1a\x37.google.cloud.managedkafka.schemaregistry.v1.SchemaMode\"\x97\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x89\x01\x12.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaTypeB\x03\xe0\x41\x01\x12\x1e\n\x0eschema_payload\x18\x02 \x01(\tR\x06schema\x12\\\n\nreferences\x18\x03 \x03(\x0b\x32\x43.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReferenceB\x03\xe0\x41\x01\x1aP\n\x0fSchemaReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07subject\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07version\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"K\n\nSchemaType\x12\x1b\n\x17SCHEMA_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41VRO\x10\x01\x12\x08\n\x04JSON\x10\x02\x12\x0c\n\x08PROTOBUF\x10\x03:\x8e\x02\xea\x41\x8a\x02\n\"managedkafka.googleapis.com/Schema\x12_projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}\x12rprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}*\x07schemas2\x06schema\"\xfd\x02\n\rSchemaSubject\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x43\n\x08versions\x18\x03 \x03(\tB1\xe0\x41\x01\xfa\x41+\n)managedkafka.googleapis.com/SchemaVersion:\x93\x02\xea\x41\x8f\x02\n)managedkafka.googleapis.com/SchemaSubject\x12]projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}\x12pprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}*\x08subjects2\x07subject\"\x91\t\n\rSchemaVersion\x12\x14\n\x07subject\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\nversion_id\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02R\x07version\x12\x1a\n\tschema_id\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02R\x02id\x12X\n\x0bschema_type\x18\x04 \x01(\x0e\x32>.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaTypeB\x03\xe0\x41\x01\x12#\n\x0eschema_payload\x18\x05 \x01(\tB\x03\xe0\x41\x02R\x06schema\x12\\\n\nreferences\x18\x06 \x03(\x0b\x32\x43.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReferenceB\x03\xe0\x41\x01:\xce\x06\xea\x41\xca\x06\n)managedkafka.googleapis.com/SchemaVersion\x12pprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}\x12\x83\x01projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}\x12tprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions\x12\x87\x01projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/compatibility/subjects/{subject}/versions\x12~projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions/{version}\x12\x91\x01projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/compatibility/subjects/{subject}/versions/{version}*\x08versions2\x07version\"\xa0\x06\n\x0cSchemaConfig\x12l\n\rcompatibility\x18\x01 \x01(\x0e\x32K.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityTypeB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1b\n\tnormalize\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x12\n\x05\x61lias\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x11\x43ompatibilityType\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08\x42\x41\x43KWARD\x10\x01\x12\x17\n\x13\x42\x41\x43KWARD_TRANSITIVE\x10\x02\x12\x0b\n\x07\x46ORWARD\x10\x03\x12\x16\n\x12\x46ORWARD_TRANSITIVE\x10\x04\x12\x08\n\x04\x46ULL\x10\x05\x12\x13\n\x0f\x46ULL_TRANSITIVE\x10\x06:\xc5\x03\xea\x41\xc1\x03\n(managedkafka.googleapis.com/SchemaConfig\x12Qprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config\x12[projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}\x12\x64projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/config\x12nprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/config/{subject}*\x07\x63onfigs2\x06\x63onfigB\x10\n\x0e_compatibilityB\x0c\n\n_normalize\"\xda\x04\n\nSchemaMode\x12S\n\x04mode\x18\x01 \x01(\x0e\x32@.google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeTypeB\x03\xe0\x41\x02\"=\n\x08ModeType\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08READONLY\x10\x01\x12\r\n\tREADWRITE\x10\x02\x12\n\n\x06IMPORT\x10\x03:\xb7\x03\xea\x41\xb3\x03\n&managedkafka.googleapis.com/SchemaMode\x12Oprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode\x12Yprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}\x12\x62projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode\x12lprojects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}*\x05modes2\x04modeB\xb8\x02\n/com.google.cloud.managedkafka.schemaregistry.v1B\x1cSchemaRegistryResourcesProtoP\x01ZWcloud.google.com/go/managedkafka/schemaregistry/apiv1/schemaregistrypb;schemaregistrypb\xaa\x02+Google.Cloud.ManagedKafka.SchemaRegistry.V1\xca\x02+Google\\Cloud\\ManagedKafka\\SchemaRegistry\\V1\xea\x02/Google::Cloud::ManagedKafka::SchemaRegistry::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + module V1 + SchemaRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry").msgclass + Context = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.Context").msgclass + Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.Schema").msgclass + Schema::SchemaReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference").msgclass + Schema::SchemaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType").enummodule + SchemaSubject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.SchemaSubject").msgclass + SchemaVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.SchemaVersion").msgclass + SchemaConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.SchemaConfig").msgclass + SchemaConfig::CompatibilityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType").enummodule + SchemaMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.SchemaMode").msgclass + SchemaMode::ModeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType").enummodule + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_services_pb.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_services_pb.rb new file mode 100644 index 000000000000..35d65b4dade6 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managedkafka/schemaregistry/v1/schema_registry_services_pb.rb @@ -0,0 +1,160 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto for package 'Google.Cloud.ManagedKafka.SchemaRegistry.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managedkafka/schemaregistry/v1/schema_registry_pb' + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + module V1 + module ManagedSchemaRegistry + # SchemaRegistry is a service that allows users to manage schemas for their + # Kafka clusters. It provides APIs to register, list, and delete schemas, as + # well as to get the schema for a given schema id or a given version id under a + # subject, to update the global or subject-specific compatibility mode, and to + # check the compatibility of a schema against a subject or a version. The main + # resource hierarchy is as follows: + # + # * SchemaRegistry + # * SchemaRegistry/Context + # * SchemaRegistry/Context/Schema + # * SchemaRegistry/Context/Subject + # * SchemaRegistry/Context/Subject/Version + # * SchemaRegistry/Config + # * SchemaRegistry/Mode + # + # **SchemaRegistry** is the root resource to represent a schema registry + # instance. A customer can have multiple schema registry instances in a + # project. + # + # **Context** is a context resource that represents a group of + # schemas, subjects and versions. A schema registry instance can have multiple + # contexts and always has a 'default' context. Contexts are independent of each + # other. Context is optional and if not specified, it falls back to the + # 'default' context. + # + # **Schema** is a schema resource that represents a unique schema in a context + # of a schema registry instance. Each schema has a unique schema id, and can be + # referenced by a version of a subject. + # + # **Subject** refers to the name under which the schema is registered. A + # typical subject is the Kafka topic name. A schema registry instance can have + # multiple subjects. + # + # **Version** represents a version of a subject. A subject can have multiple + # versions. Creation of new version of a subject is guarded by the + # compatibility mode configured globally or for the subject specifically. + # + # **Config** represents a config at global level cross all registry + # instances or at subject level. Currently, only compatibility is supported in + # config. + # + # **Mode** represents the mode of a schema registry or a specific subject. + # Three modes are supported: + # * READONLY: The schema registry is in read-only mode, no write operations + # allowed.. + # * READWRITE: The schema registry is in read-write mode, which allows limited + # write operations on the schema. + # * IMPORT: The schema registry is in import mode, which allows more editing + # operations on the schema for data importing purposes. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry' + + # Get the schema registry instance. + rpc :GetSchemaRegistry, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry + # List schema registries. + rpc :ListSchemaRegistries, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse + # Create a schema registry instance. + rpc :CreateSchemaRegistry, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry + # Delete a schema registry instance. + rpc :DeleteSchemaRegistry, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest, ::Google::Protobuf::Empty + # Get the context. + rpc :GetContext, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context + # List contexts for a schema registry. + rpc :ListContexts, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest, ::Google::Api::HttpBody + # Get the schema for the given schema id. + rpc :GetSchema, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema + # Get the schema string for the given schema id. + # The response will be the schema string. + rpc :GetRawSchema, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest, ::Google::Api::HttpBody + # List the schema versions for the given schema id. + # The response will be an array of subject-version pairs as: + # [{"subject":"subject1", "version":1}, {"subject":"subject2", "version":2}]. + rpc :ListSchemaVersions, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest, ::Google::Api::HttpBody + # List the supported schema types. + # The response will be an array of schema types. + rpc :ListSchemaTypes, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest, ::Google::Api::HttpBody + # List subjects in the schema registry. + # The response will be an array of subject names. + rpc :ListSubjects, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest, ::Google::Api::HttpBody + # List subjects which reference a particular schema id. + # The response will be an array of subject names. + rpc :ListSubjectsBySchemaId, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest, ::Google::Api::HttpBody + # Delete a subject. + # The response will be an array of versions of the deleted subject. + rpc :DeleteSubject, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest, ::Google::Api::HttpBody + # Lookup a schema under the specified subject. + rpc :LookupVersion, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion + # Get a versioned schema (schema with subject/version) of a subject. + rpc :GetVersion, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion + # Get the schema string only for a version of a subject. + # The response will be the schema string. + rpc :GetRawSchemaVersion, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest, ::Google::Api::HttpBody + # Get all versions of a subject. + # The response will be an array of versions of the subject. + rpc :ListVersions, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest, ::Google::Api::HttpBody + # Register a new version under a given subject with the given schema. + rpc :CreateVersion, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse + # Delete a version of a subject. + # The response will be the deleted version id. + rpc :DeleteVersion, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest, ::Google::Api::HttpBody + # Get a list of IDs of schemas that reference the schema with the given + # subject and version. + rpc :ListReferencedSchemas, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest, ::Google::Api::HttpBody + # Check compatibility of a schema with all versions or a specific version of + # a subject. + rpc :CheckCompatibility, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse + # Get schema config at global level or for a subject. + rpc :GetSchemaConfig, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig + # Update config at global level or for a subject. + # Creates a SchemaSubject-level SchemaConfig if it does not exist. + rpc :UpdateSchemaConfig, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig + # Delete schema config for a subject. + rpc :DeleteSchemaConfig, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig + # Get mode at global level or for a subject. + rpc :GetSchemaMode, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode + # Update mode at global level or for a subject. + rpc :UpdateSchemaMode, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode + # Delete schema mode for a subject. + rpc :DeleteSchemaMode, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest, ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/proto_docs/README.md b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/README.md new file mode 100644 index 000000000000..7ca58cf4d70b --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Managed Service for Apache Kafka V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/client.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/httpbody.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/httpbody.rb new file mode 100644 index 000000000000..13b2379bcaf6 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/httpbody.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 + # Message that represents an arbitrary HTTP body. It should only be used for + # payload formats that can't be represented as JSON, such as raw binary or + # an HTML page. + # + # + # This message can be used both in streaming and non-streaming API methods in + # the request as well as the response. + # + # It can be used as a top-level request field, which is convenient if one + # wants to extract parameters from either the URL or HTTP template into the + # request fields and also want access to the raw HTTP body. + # + # Example: + # + # message GetResourceRequest { + # // A unique request id. + # string request_id = 1; + # + # // The raw HTTP body is bound to this field. + # google.api.HttpBody http_body = 2; + # + # } + # + # service ResourceService { + # rpc GetResource(GetResourceRequest) + # returns (google.api.HttpBody); + # rpc UpdateResource(google.api.HttpBody) + # returns (google.protobuf.Empty); + # + # } + # + # Example with streaming methods: + # + # service CaldavService { + # rpc GetCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # rpc UpdateCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # + # } + # + # Use of this type only changes how the request and response bodies are + # handled, all other features will continue to work unchanged. + # @!attribute [rw] content_type + # @return [::String] + # The HTTP Content-Type header value specifying the content type of the body. + # @!attribute [rw] data + # @return [::String] + # The HTTP request/response body as raw binary. + # @!attribute [rw] extensions + # @return [::Array<::Google::Protobuf::Any>] + # Application specific response metadata. Must be set in the first response + # for streaming APIs. + class HttpBody + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/resource.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry.rb new file mode 100644 index 000000000000..86021f5a5540 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ManagedKafka + module SchemaRegistry + module V1 + # Request for GetSchemaRegistry. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the schema registry instance to return. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + class GetSchemaRegistryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListSchemaRegistries. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent whose schema registry instances are to be listed. + # Structured like: `projects/{project}/locations/{location}` + class ListSchemaRegistriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListSchemaRegistries. + # @!attribute [rw] schema_registries + # @return [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry>] + # The schema registry instances. + class ListSchemaRegistriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a schema registry instance. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent whose schema registry instance is to be created. + # Structured like: `projects/{project}/locations/{location}` + # @!attribute [rw] schema_registry_id + # @return [::String] + # Required. The schema registry instance ID to use for this schema registry. + # The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores + # (-). The maximum length is 63 characters. + # The ID must not start with a number. + # @!attribute [rw] schema_registry + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry] + # Required. The schema registry instance to create. + # The name field is ignored. + class CreateSchemaRegistryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteSchemaRegistry. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the schema registry instance to delete. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + class DeleteSchemaRegistryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetContext + # @!attribute [rw] name + # @return [::String] + # Required. The name of the context to return. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + class GetContextRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListContexts. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the contexts. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + class ListContextsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetSchema. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the schema to return. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # @!attribute [rw] subject + # @return [::String] + # Optional. Used to limit the search for the schema ID to a specific subject, + # otherwise the schema ID will be searched for in all subjects in the given + # specified context. + class GetSchemaRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListSchemaTypes. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent schema registry whose schema types are to be listed. + # Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + class ListSchemaTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListSchemaVersions. + # @!attribute [rw] parent + # @return [::String] + # Required. The schema whose schema versions are to be listed. Structured + # like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + # @!attribute [rw] subject + # @return [::String] + # Optional. The subject to filter the subjects by. + # @!attribute [rw] deleted + # @return [::Boolean] + # Optional. If true, the response will include soft-deleted versions of the + # schema, even if the subject is soft-deleted. The default is false. + class ListSchemaVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for listing subjects. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent schema registry/context whose subjects are to be + # listed. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + # @!attribute [rw] subject_prefix + # @return [::String] + # Optional. The context to filter the subjects by, in the format of + # `:.{context}:`. If unset, all subjects in the registry are returned. Set to + # empty string or add as + # '?subjectPrefix=' at the end of this request to list subjects in the + # default context. + # @!attribute [rw] deleted + # @return [::Boolean] + # Optional. If true, the response will include soft-deleted subjects. The + # default is false. + class ListSubjectsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for listing subjects. + # @!attribute [rw] parent + # @return [::String] + # Required. The schema resource whose associated subjects are to be listed. + # Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + # @!attribute [rw] subject + # @return [::String] + # Optional. The subject to filter the subjects by. + # @!attribute [rw] deleted + # @return [::Boolean] + # Optional. If true, the response will include soft-deleted subjects. The + # default is false. + class ListSubjectsBySchemaIdRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetVersions. + # @!attribute [rw] parent + # @return [::String] + # Required. The subject whose versions are to be listed. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @!attribute [rw] deleted + # @return [::Boolean] + # Optional. If true, the response will include soft-deleted versions of an + # active or soft-deleted subject. The default is false. + class ListVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteSubject. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the subject to delete. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @!attribute [rw] permanent + # @return [::Boolean] + # Optional. If true, the subject and all associated metadata including the + # schema ID will be deleted permanently. Otherwise, only the subject is + # soft-deleted. The default is false. Soft-deleted subjects can still be + # searched in ListSubjects API call with deleted=true query parameter. A + # soft-delete of a subject must be performed before a hard-delete. + class DeleteSubjectRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetVersion. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the subject to return versions. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @!attribute [rw] deleted + # @return [::Boolean] + # Optional. If true, no matter if the subject/version is soft-deleted or not, + # it returns the version details. If false, it returns NOT_FOUND error if the + # subject/version is soft-deleted. The default is false. + class GetVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateVersion. + # @!attribute [rw] parent + # @return [::String] + # Required. The subject to create the version for. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @!attribute [rw] version + # @return [::Integer] + # Optional. The version to create. It is optional. If not specified, the + # version will be created with the max version ID of the subject increased + # by 1. If the version ID is specified, it will be used as the new version ID + # and must not be used by an existing version of the subject. + # @!attribute [rw] id + # @return [::Integer] + # Optional. The schema ID of the schema. If not specified, the schema ID will + # be generated by the server. If the schema ID is specified, it must not be + # used by an existing schema that is different from the schema to be created. + # @!attribute [rw] schema_type + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The type of the schema. It is optional. If not specified, the + # schema type will be AVRO. + # @!attribute [rw] schema + # @return [::String] + # Required. The schema payload + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference>] + # Optional. The schema references used by the schema. + # @!attribute [rw] normalize + # @return [::Boolean] + # Optional. If true, the schema will be normalized before being stored. The + # default is false. + class CreateVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for CreateVersion. + # @!attribute [rw] id + # @return [::Integer] + # The unique identifier of the schema created. + class CreateVersionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for LookupVersion. + # @!attribute [rw] parent + # @return [::String] + # Required. The subject to lookup the schema in. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # @!attribute [rw] schema_type + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The schema type of the schema. + # @!attribute [rw] schema + # @return [::String] + # Required. The schema payload + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference>] + # Optional. The schema references used by the schema. + # @!attribute [rw] normalize + # @return [::Boolean] + # Optional. If true, the schema will be normalized before being looked up. + # The default is false. + # @!attribute [rw] deleted + # @return [::Boolean] + # Optional. If true, soft-deleted versions will be included in lookup, no + # matter if the subject is active or soft-deleted. If false, soft-deleted + # versions will be excluded. The default is false. + class LookupVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteVersion. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the subject version to delete. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + # @!attribute [rw] permanent + # @return [::Boolean] + # Optional. If true, both the version and the referenced schema ID will be + # permanently deleted. The default is false. If false, the version will be + # deleted but the schema ID will be retained. Soft-deleted versions can still + # be searched in ListVersions API call with deleted=true query parameter. A + # soft-delete of a version must be performed before a hard-delete. + class DeleteVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListReferencedSchemas. + # @!attribute [rw] parent + # @return [::String] + # Required. The version to list referenced by. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + class ListReferencedSchemasRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CheckCompatibility. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the resource to check compatibility for. The format + # is either of following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/compatibility/subjects/*/versions: Check compatibility with one or + # more versions of the specified subject. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/compatibility/subjects/\\{subject}/versions/\\{version}: Check + # compatibility with a specific version of the subject. + # @!attribute [rw] schema_type + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The schema type of the schema. + # @!attribute [rw] schema + # @return [::String] + # Required. The schema payload + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference>] + # Optional. The schema references used by the schema. + # @!attribute [rw] verbose + # @return [::Boolean] + # Optional. If true, the response will contain the compatibility check result + # with reasons for failed checks. The default is false. + class CheckCompatibilityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for CheckCompatibility. + # @!attribute [rw] is_compatible + # @return [::Boolean] + # The compatibility check result. If true, the schema is compatible with the + # resource. + # @!attribute [rw] messages + # @return [::Array<::String>] + # Failure reasons if verbose = true. + class CheckCompatibilityResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting config. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name to get the config for. It can be either of + # following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config: Get config at global level. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject}: Get config for a specific subject. + # @!attribute [rw] default_to_global + # @return [::Boolean] + # Optional. If true, the config will fall back to the config at the global + # level if no subject level config is found. + class GetSchemaConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating schema config. + # On a SchemaSubject-level SchemaConfig, an unset field will be removed from + # the SchemaConfig. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name to update the config for. It can be either of + # following: + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config: Update config at global level. + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject}: Update config for a specific subject. + # @!attribute [rw] compatibility + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig::CompatibilityType] + # Required. The compatibility type of the schemas. + # Cannot be unset for a SchemaRegistry-level SchemaConfig. + # If unset on a SchemaSubject-level SchemaConfig, removes the compatibility + # field for the SchemaConfig. + # @!attribute [rw] normalize + # @return [::Boolean] + # Optional. If true, the schema will be normalized before being stored or + # looked up. The default is false. Cannot be unset for a SchemaRegistry-level + # SchemaConfig. If unset on a SchemaSubject-level SchemaConfig, removes the + # normalize field for the SchemaConfig. + class UpdateSchemaConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting schema config. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of subject to delete the config for. The format + # is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/config/\\{subject} + class DeleteSchemaConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting schema registry or subject mode. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the mode. The format is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject}: mode for a schema registry, or + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject}: mode for a specific subject in a specific context + class GetSchemaModeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating schema registry or subject mode. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the mode. The format is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject}: mode for a schema registry, or + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject}: mode for a specific subject in a specific context + # @!attribute [rw] mode + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode::ModeType] + # Required. The mode type. + class UpdateSchemaModeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting schema mode. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of subject to delete the mode for. The format + # is + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/mode/\\{subject} + # * projects/\\{project}/locations/\\{location}/schemaRegistries/\\{schema_registry}/contexts/\\{context}/mode/\\{subject} + class DeleteSchemaModeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.rb new file mode 100644 index 000000000000..851549234a40 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.rb @@ -0,0 +1,236 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ManagedKafka + module SchemaRegistry + module V1 + # SchemaRegistry is a schema registry instance. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the schema registry instance. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + # The instance name \\{schema_registry} can contain the following: + # * Up to 255 characters. + # * Letters (uppercase or lowercase), numbers, and underscores. + # @!attribute [r] contexts + # @return [::Array<::String>] + # Output only. The contexts of the schema registry instance. + class SchemaRegistry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Context represents an independent schema grouping in a schema registry + # instance. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the context. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + # The context name \\{context} can contain the following: + # * Up to 255 characters. + # * Allowed characters: letters (uppercase or lowercase), numbers, and the + # following special characters: `.`, `-`, `_`, `+`, `%`, and `~`. + # @!attribute [rw] subjects + # @return [::Array<::String>] + # Optional. The subjects of the context. + class Context + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Schema for a Kafka message. + # @!attribute [rw] schema_type + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The schema type of the schema. + # @!attribute [rw] schema_payload + # @return [::String] + # The schema payload. + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference>] + # Optional. The schema references used by the schema. + class Schema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # SchemaReference is a reference to a schema. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the reference. + # @!attribute [rw] subject + # @return [::String] + # Required. The subject of the reference. + # @!attribute [rw] version + # @return [::Integer] + # Required. The version of the reference. + class SchemaReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Schema types. + module SchemaType + # No schema type. The default will be AVRO. + SCHEMA_TYPE_UNSPECIFIED = 0 + + # Avro schema type. + AVRO = 1 + + # JSON schema type. + JSON = 2 + + # Protobuf schema type. + PROTOBUF = 3 + end + end + + # Subject defines the evolution scope of schemas as a holder of schema + # versions. + # @!attribute [rw] name + # @return [::String] + # The name of the subject. Structured like: + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + # or + # `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + # + # Subject name \\{subject} can contain the following: + # * Up to 255 UTF-8 bytes. + # * Allowed characters: letters (uppercase or lowercase), numbers, and the + # following special characters: `.`, `-`, `_`, `+`, `%`, and `~`. + # @!attribute [rw] versions + # @return [::Array<::String>] + # The versions of the subject. + class SchemaSubject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Version of a schema. + # @!attribute [rw] subject + # @return [::String] + # Required. The subject of the version. + # @!attribute [rw] version_id + # @return [::Integer] + # Required. The version ID + # @!attribute [rw] schema_id + # @return [::Integer] + # Required. The schema ID. + # @!attribute [rw] schema_type + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaType] + # Optional. The schema type of the schema. + # @!attribute [rw] schema_payload + # @return [::String] + # Required. The schema payload. + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference>] + # Optional. The schema references used by the schema. + class SchemaVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SchemaConfig represents configuration for a schema registry or a specific + # subject. + # @!attribute [rw] compatibility + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig::CompatibilityType] + # Required. The compatibility type of the schema. + # The default value is BACKWARD. + # If unset in a SchemaSubject-level SchemaConfig, defaults to the global + # value. If unset in a SchemaRegistry-level SchemaConfig, reverts to the + # default value. + # @!attribute [rw] normalize + # @return [::Boolean] + # Optional. If true, the schema will be normalized before being stored or + # looked up. The default is false. If unset in a SchemaSubject-level + # SchemaConfig, the global value will be used. If unset in a + # SchemaRegistry-level SchemaConfig, reverts to the default value. + # @!attribute [rw] alias + # @return [::String] + # Optional. The subject to which this subject is an alias of. Only applicable + # for subject config. + class SchemaConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Compatibility type of the schemas. + module CompatibilityType + # No compatibility check. + NONE = 0 + + # Backwards compatible with the most recent version. + BACKWARD = 1 + + # Backwards compatible with all previous versions. + BACKWARD_TRANSITIVE = 2 + + # Forwards compatible with the most recent version. + FORWARD = 3 + + # Forwards compatible with all previous versions. + FORWARD_TRANSITIVE = 4 + + # Backwards and forwards compatible with the most recent version. + FULL = 5 + + # Backwards and forwards compatible with all previous versions. + FULL_TRANSITIVE = 6 + end + end + + # SchemaMode represents the mode of a schema registry or a specific subject. + # Four modes are supported: + # * NONE: deprecated. This was the default mode for a subject, but now the + # default is unset (which means use the global schema registry setting) + # * READONLY: The schema registry is in read-only mode. + # * READWRITE: The schema registry is in read-write mode, which allows limited + # write operations on the schema. + # * IMPORT: The schema registry is in import mode, which allows more editing + # operations on the schema for data importing purposes. + # @!attribute [rw] mode + # @return [::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode::ModeType] + # Required. The mode type of a schema registry (READWRITE by default) or of a + # subject (unset by default, which means use the global schema registry + # setting). + class SchemaMode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mode type of the schemas or subjects. + module ModeType + # The default / unset value. + # The subject mode is NONE/unset by default, which means use the global + # schema registry mode. This should not be used for setting the mode. + NONE = 0 + + # READONLY mode. + READONLY = 1 + + # READWRITE mode. + READWRITE = 2 + + # IMPORT mode. + IMPORT = 3 + end + end + end + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/any.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..9e9bdbb09ea4 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-managed_kafka-schema_registry-v1/snippets/Gemfile b/google-cloud-managed_kafka-schema_registry-v1/snippets/Gemfile new file mode 100644 index 000000000000..d6bc01caca4e --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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-managed_kafka-schema_registry-v1", path: "../" +else + gem "google-cloud-managed_kafka-schema_registry-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/check_compatibility.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/check_compatibility.rb new file mode 100644 index 000000000000..4b8757217272 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/check_compatibility.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_CheckCompatibility_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the check_compatibility call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#check_compatibility. +# +def check_compatibility + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest.new + + # Call the check_compatibility method. + result = client.check_compatibility request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_CheckCompatibility_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/create_schema_registry.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/create_schema_registry.rb new file mode 100644 index 000000000000..d61cc6a5362c --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/create_schema_registry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_CreateSchemaRegistry_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the create_schema_registry call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#create_schema_registry. +# +def create_schema_registry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest.new + + # Call the create_schema_registry method. + result = client.create_schema_registry request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_CreateSchemaRegistry_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/create_version.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/create_version.rb new file mode 100644 index 000000000000..9c97eee588a4 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/create_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_CreateVersion_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the create_version call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#create_version. +# +def create_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest.new + + # Call the create_version method. + result = client.create_version request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_CreateVersion_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_config.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_config.rb new file mode 100644 index 000000000000..746047e2a6f2 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaConfig_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the delete_schema_config call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_config. +# +def delete_schema_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest.new + + # Call the delete_schema_config method. + result = client.delete_schema_config request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaConfig_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_mode.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_mode.rb new file mode 100644 index 000000000000..1eecd9c038bf --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_mode.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaMode_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the delete_schema_mode call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_mode. +# +def delete_schema_mode + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest.new + + # Call the delete_schema_mode method. + result = client.delete_schema_mode request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaMode_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_registry.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_registry.rb new file mode 100644 index 000000000000..e433b2b39365 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_schema_registry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaRegistry_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the delete_schema_registry call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_registry. +# +def delete_schema_registry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest.new + + # Call the delete_schema_registry method. + result = client.delete_schema_registry request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaRegistry_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_subject.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_subject.rb new file mode 100644 index 000000000000..341599c9efdf --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_subject.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSubject_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the delete_subject call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_subject. +# +def delete_subject + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest.new + + # Call the delete_subject method. + result = client.delete_subject request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSubject_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_version.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_version.rb new file mode 100644 index 000000000000..255c7277112b --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/delete_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_DeleteVersion_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the delete_version call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_version. +# +def delete_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest.new + + # Call the delete_version method. + result = client.delete_version request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteVersion_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_context.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_context.rb new file mode 100644 index 000000000000..3bb6b9684f93 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_context.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_GetContext_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the get_context call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_context. +# +def get_context + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest.new + + # Call the get_context method. + result = client.get_context request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_GetContext_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_raw_schema.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_raw_schema.rb new file mode 100644 index 000000000000..74e9f2be11f5 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_raw_schema.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchema_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the get_raw_schema call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_raw_schema. +# +def get_raw_schema + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new + + # Call the get_raw_schema method. + result = client.get_raw_schema request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchema_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_raw_schema_version.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_raw_schema_version.rb new file mode 100644 index 000000000000..4409f30ddf0f --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_raw_schema_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchemaVersion_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the get_raw_schema_version call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_raw_schema_version. +# +def get_raw_schema_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new + + # Call the get_raw_schema_version method. + result = client.get_raw_schema_version request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchemaVersion_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema.rb new file mode 100644 index 000000000000..a6e1c2a0eaa3 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_GetSchema_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the get_schema call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema. +# +def get_schema + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new + + # Call the get_schema method. + result = client.get_schema request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_GetSchema_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_config.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_config.rb new file mode 100644 index 000000000000..9b49e179a9de --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaConfig_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the get_schema_config call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_config. +# +def get_schema_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest.new + + # Call the get_schema_config method. + result = client.get_schema_config request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaConfig_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_mode.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_mode.rb new file mode 100644 index 000000000000..84476e4dc109 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_mode.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaMode_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the get_schema_mode call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_mode. +# +def get_schema_mode + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest.new + + # Call the get_schema_mode method. + result = client.get_schema_mode request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaMode_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_registry.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_registry.rb new file mode 100644 index 000000000000..8db5f112a953 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_schema_registry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaRegistry_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the get_schema_registry call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_registry. +# +def get_schema_registry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest.new + + # Call the get_schema_registry method. + result = client.get_schema_registry request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaRegistry_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_version.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_version.rb new file mode 100644 index 000000000000..d8174763cd06 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/get_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_GetVersion_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the get_version call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_version. +# +def get_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new + + # Call the get_version method. + result = client.get_version request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_GetVersion_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_contexts.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_contexts.rb new file mode 100644 index 000000000000..f1438ea5ef0a --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_contexts.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListContexts_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the list_contexts call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_contexts. +# +def list_contexts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest.new + + # Call the list_contexts method. + result = client.list_contexts request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_ListContexts_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_referenced_schemas.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_referenced_schemas.rb new file mode 100644 index 000000000000..af911fa6d594 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_referenced_schemas.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListReferencedSchemas_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the list_referenced_schemas call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_referenced_schemas. +# +def list_referenced_schemas + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest.new + + # Call the list_referenced_schemas method. + result = client.list_referenced_schemas request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_ListReferencedSchemas_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_registries.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_registries.rb new file mode 100644 index 000000000000..336b3a235224 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_registries.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaRegistries_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the list_schema_registries call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_registries. +# +def list_schema_registries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest.new + + # Call the list_schema_registries method. + result = client.list_schema_registries request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaRegistries_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_types.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_types.rb new file mode 100644 index 000000000000..eca5e1f3b552 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_types.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaTypes_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the list_schema_types call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_types. +# +def list_schema_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest.new + + # Call the list_schema_types method. + result = client.list_schema_types request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaTypes_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_versions.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_versions.rb new file mode 100644 index 000000000000..2678419035aa --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_schema_versions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaVersions_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the list_schema_versions call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_versions. +# +def list_schema_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest.new + + # Call the list_schema_versions method. + result = client.list_schema_versions request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaVersions_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_subjects.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_subjects.rb new file mode 100644 index 000000000000..6292eb882cb1 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_subjects.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjects_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the list_subjects call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_subjects. +# +def list_subjects + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest.new + + # Call the list_subjects method. + result = client.list_subjects request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjects_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_subjects_by_schema_id.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_subjects_by_schema_id.rb new file mode 100644 index 000000000000..4f027f73c55c --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_subjects_by_schema_id.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjectsBySchemaId_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the list_subjects_by_schema_id call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_subjects_by_schema_id. +# +def list_subjects_by_schema_id + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest.new + + # Call the list_subjects_by_schema_id method. + result = client.list_subjects_by_schema_id request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjectsBySchemaId_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_versions.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_versions.rb new file mode 100644 index 000000000000..21502c4ea19f --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/list_versions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListVersions_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the list_versions call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_versions. +# +def list_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest.new + + # Call the list_versions method. + result = client.list_versions request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_ListVersions_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/lookup_version.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/lookup_version.rb new file mode 100644 index 000000000000..7d94c9d1988f --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/lookup_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_LookupVersion_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the lookup_version call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#lookup_version. +# +def lookup_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest.new + + # Call the lookup_version method. + result = client.lookup_version request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_LookupVersion_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/update_schema_config.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/update_schema_config.rb new file mode 100644 index 000000000000..08025d41b1f7 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/update_schema_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaConfig_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the update_schema_config call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#update_schema_config. +# +def update_schema_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest.new + + # Call the update_schema_config method. + result = client.update_schema_config request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaConfig_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/update_schema_mode.rb b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/update_schema_mode.rb new file mode 100644 index 000000000000..46ba6492dc46 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/managed_schema_registry/update_schema_mode.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaMode_sync] +require "google/cloud/managed_kafka/schema_registry/v1" + +## +# Snippet for the update_schema_mode call in the ManagedSchemaRegistry 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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#update_schema_mode. +# +def update_schema_mode + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest.new + + # Call the update_schema_mode method. + result = client.update_schema_mode request + + # The returned object is of type Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode. + p result +end +# [END managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaMode_sync] diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json b/google-cloud-managed_kafka-schema_registry-v1/snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json new file mode 100644 index 000000000000..35025013b455 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json @@ -0,0 +1,1095 @@ +{ + "client_library": { + "name": "google-cloud-managed_kafka-schema_registry-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.managedkafka.schemaregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaRegistry_sync", + "title": "Snippet for the get_schema_registry call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_registry.", + "file": "managed_schema_registry/get_schema_registry.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_schema_registry", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_registry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "GetSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaRegistry", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaRegistries_sync", + "title": "Snippet for the list_schema_registries call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_registries.", + "file": "managed_schema_registry/list_schema_registries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_schema_registries", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_registries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "ListSchemaRegistries", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaRegistries", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_CreateSchemaRegistry_sync", + "title": "Snippet for the create_schema_registry call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#create_schema_registry.", + "file": "managed_schema_registry/create_schema_registry.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_schema_registry", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#create_schema_registry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "CreateSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateSchemaRegistry", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaRegistry_sync", + "title": "Snippet for the delete_schema_registry call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_registry.", + "file": "managed_schema_registry/delete_schema_registry.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_schema_registry", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_registry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "DeleteSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaRegistry", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetContext_sync", + "title": "Snippet for the get_context call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_context.", + "file": "managed_schema_registry/get_context.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_context", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_context", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "GetContext", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetContext", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListContexts_sync", + "title": "Snippet for the list_contexts call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_contexts.", + "file": "managed_schema_registry/list_contexts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_contexts", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_contexts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "ListContexts", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListContexts", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetSchema_sync", + "title": "Snippet for the get_schema call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema.", + "file": "managed_schema_registry/get_schema.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_schema", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "GetSchema", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchema", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchema_sync", + "title": "Snippet for the get_raw_schema call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_raw_schema.", + "file": "managed_schema_registry/get_raw_schema.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_raw_schema", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_raw_schema", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "GetRawSchema", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchema", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaVersions_sync", + "title": "Snippet for the list_schema_versions call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_versions.", + "file": "managed_schema_registry/list_schema_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_schema_versions", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "ListSchemaVersions", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaVersions", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaTypes_sync", + "title": "Snippet for the list_schema_types call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_types.", + "file": "managed_schema_registry/list_schema_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_schema_types", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_schema_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "ListSchemaTypes", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaTypes", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjects_sync", + "title": "Snippet for the list_subjects call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_subjects.", + "file": "managed_schema_registry/list_subjects.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_subjects", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_subjects", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "ListSubjects", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjects", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjectsBySchemaId_sync", + "title": "Snippet for the list_subjects_by_schema_id call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_subjects_by_schema_id.", + "file": "managed_schema_registry/list_subjects_by_schema_id.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_subjects_by_schema_id", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_subjects_by_schema_id", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "ListSubjectsBySchemaId", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjectsBySchemaId", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSubject_sync", + "title": "Snippet for the delete_subject call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_subject.", + "file": "managed_schema_registry/delete_subject.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_subject", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_subject", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "DeleteSubject", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSubject", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_LookupVersion_sync", + "title": "Snippet for the lookup_version call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#lookup_version.", + "file": "managed_schema_registry/lookup_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_version", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#lookup_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "LookupVersion", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.LookupVersion", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetVersion_sync", + "title": "Snippet for the get_version call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_version.", + "file": "managed_schema_registry/get_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_version", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "GetVersion", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetVersion", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchemaVersion_sync", + "title": "Snippet for the get_raw_schema_version call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_raw_schema_version.", + "file": "managed_schema_registry/get_raw_schema_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_raw_schema_version", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_raw_schema_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "GetRawSchemaVersion", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchemaVersion", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListVersions_sync", + "title": "Snippet for the list_versions call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_versions.", + "file": "managed_schema_registry/list_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_versions", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "ListVersions", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListVersions", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_CreateVersion_sync", + "title": "Snippet for the create_version call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#create_version.", + "file": "managed_schema_registry/create_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_version", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#create_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "CreateVersion", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateVersion", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteVersion_sync", + "title": "Snippet for the delete_version call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_version.", + "file": "managed_schema_registry/delete_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_version", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "DeleteVersion", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteVersion", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListReferencedSchemas_sync", + "title": "Snippet for the list_referenced_schemas call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_referenced_schemas.", + "file": "managed_schema_registry/list_referenced_schemas.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_referenced_schemas", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#list_referenced_schemas", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "ListReferencedSchemas", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListReferencedSchemas", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_CheckCompatibility_sync", + "title": "Snippet for the check_compatibility call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#check_compatibility.", + "file": "managed_schema_registry/check_compatibility.rb", + "language": "RUBY", + "client_method": { + "short_name": "check_compatibility", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#check_compatibility", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "CheckCompatibility", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CheckCompatibility", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaConfig_sync", + "title": "Snippet for the get_schema_config call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_config.", + "file": "managed_schema_registry/get_schema_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_schema_config", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "GetSchemaConfig", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaConfig", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaConfig_sync", + "title": "Snippet for the update_schema_config call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#update_schema_config.", + "file": "managed_schema_registry/update_schema_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_schema_config", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#update_schema_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "UpdateSchemaConfig", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaConfig", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaConfig_sync", + "title": "Snippet for the delete_schema_config call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_config.", + "file": "managed_schema_registry/delete_schema_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_schema_config", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "DeleteSchemaConfig", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaConfig", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaMode_sync", + "title": "Snippet for the get_schema_mode call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_mode.", + "file": "managed_schema_registry/get_schema_mode.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_schema_mode", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#get_schema_mode", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "GetSchemaMode", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaMode", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaMode_sync", + "title": "Snippet for the update_schema_mode call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#update_schema_mode.", + "file": "managed_schema_registry/update_schema_mode.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_schema_mode", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#update_schema_mode", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "UpdateSchemaMode", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaMode", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaMode_sync", + "title": "Snippet for the delete_schema_mode call in the ManagedSchemaRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_mode.", + "file": "managed_schema_registry/delete_schema_mode.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_schema_mode", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client#delete_schema_mode", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode", + "client": { + "short_name": "ManagedSchemaRegistry::Client", + "full_name": "::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client" + }, + "method": { + "short_name": "DeleteSchemaMode", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaMode", + "service": { + "short_name": "ManagedSchemaRegistry", + "full_name": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_paths_test.rb b/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_paths_test.rb new file mode 100644 index 000000000000..a6f1ccc7bda7 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_paths_test.rb @@ -0,0 +1,160 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managed_kafka/schema_registry/v1/managed_schema_registry" + +class ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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_schema_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.schema_path project: "value0", location: "value1", schema_registry: "value2", schema: "value3" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/schemas/ids/value3", path + + path = client.schema_path project: "value0", location: "value1", schema_registry: "value2", context: "value3", schema: "value4" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3/schemas/ids/value4", path + end + end + + def test_schema_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.schema_config_path project: "value0", location: "value1", schema_registry: "value2" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/config", path + + path = client.schema_config_path project: "value0", location: "value1", schema_registry: "value2", subject: "value3" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/config/value3", path + + path = client.schema_config_path project: "value0", location: "value1", schema_registry: "value2", context: "value3" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3/config", path + + path = client.schema_config_path project: "value0", location: "value1", schema_registry: "value2", context: "value3", subject: "value4" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3/config/value4", path + end + end + + def test_schema_context_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.schema_context_path project: "value0", location: "value1", schema_registry: "value2", context: "value3" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3", path + end + end + + def test_schema_mode_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.schema_mode_path project: "value0", location: "value1", schema_registry: "value2" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/mode", path + + path = client.schema_mode_path project: "value0", location: "value1", schema_registry: "value2", subject: "value3" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/mode/value3", path + + path = client.schema_mode_path project: "value0", location: "value1", schema_registry: "value2", context: "value3" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3/mode", path + + path = client.schema_mode_path project: "value0", location: "value1", schema_registry: "value2", context: "value3", subject: "value4" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3/mode/value4", path + end + end + + def test_schema_registry_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.schema_registry_path project: "value0", location: "value1", schema_registry: "value2" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2", path + end + end + + def test_schema_subject_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.schema_subject_path project: "value0", location: "value1", schema_registry: "value2", subject: "value3" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/subjects/value3", path + + path = client.schema_subject_path project: "value0", location: "value1", schema_registry: "value2", context: "value3", subject: "value4" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3/subjects/value4", path + end + end + + def test_schema_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.schema_version_path project: "value0", location: "value1", schema_registry: "value2", subject: "value3", version: "value4" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/subjects/value3/versions/value4", path + + path = client.schema_version_path project: "value0", location: "value1", schema_registry: "value2", context: "value3", subject: "value4", version: "value5" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3/subjects/value4/versions/value5", path + + path = client.schema_version_path project: "value0", location: "value1", schema_registry: "value2", subject: "value3" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/compatibility/subjects/value3/versions", path + + path = client.schema_version_path project: "value0", location: "value1", schema_registry: "value2", context: "value3", subject: "value4" + assert_equal "projects/value0/locations/value1/schemaRegistries/value2/contexts/value3/compatibility/subjects/value4/versions", path + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_rest_test.rb b/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_rest_test.rb new file mode 100644 index 000000000000..8999055d16c2 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_rest_test.rb @@ -0,0 +1,1591 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managedkafka/schemaregistry/v1/schema_registry_pb" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest" + + +class ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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_get_schema_registry + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_schema_registry_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_get_schema_registry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_schema_registry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_schema_registry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_schema_registry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_schema_registry ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_schema_registry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_schema_registry(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_schema_registry_client_stub.call_count + end + end + end + + def test_list_schema_registries + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_schema_registries_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_list_schema_registries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_schema_registries_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_schema_registries({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_schema_registries parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_schema_registries ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_schema_registries({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_schema_registries(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_schema_registries_client_stub.call_count + end + end + end + + def test_create_schema_registry + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + schema_registry_id = "hello world" + schema_registry = {} + + create_schema_registry_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_create_schema_registry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_schema_registry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_schema_registry({ parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_schema_registry parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_schema_registry ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest.new(parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_schema_registry({ parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_schema_registry(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest.new(parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_schema_registry_client_stub.call_count + end + end + end + + def test_delete_schema_registry + # 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_schema_registry_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_delete_schema_registry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_schema_registry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_schema_registry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_schema_registry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_schema_registry ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_schema_registry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_schema_registry(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_schema_registry_client_stub.call_count + end + end + end + + def test_get_context + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_context_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_get_context_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_context_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_context({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_context name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_context ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_context({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_context(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_context_client_stub.call_count + end + end + end + + def test_list_contexts + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_contexts_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_list_contexts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_contexts_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_contexts({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_contexts parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_contexts ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_contexts({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_contexts(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_contexts_client_stub.call_count + end + end + end + + def test_get_schema + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + subject = "hello world" + + get_schema_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_get_schema_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_schema_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_schema({ name: name, subject: subject }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_schema name: name, subject: subject do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_schema ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new(name: name, subject: subject) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_schema({ name: name, subject: subject }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_schema(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new(name: name, subject: subject), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_schema_client_stub.call_count + end + end + end + + def test_get_raw_schema + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + subject = "hello world" + + get_raw_schema_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_get_raw_schema_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_raw_schema_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_raw_schema({ name: name, subject: subject }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_raw_schema name: name, subject: subject do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_raw_schema ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new(name: name, subject: subject) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_raw_schema({ name: name, subject: subject }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_raw_schema(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new(name: name, subject: subject), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_raw_schema_client_stub.call_count + end + end + end + + def test_list_schema_versions + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + subject = "hello world" + deleted = true + + list_schema_versions_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_list_schema_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_schema_versions_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_schema_versions({ parent: parent, subject: subject, deleted: deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_schema_versions parent: parent, subject: subject, deleted: deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_schema_versions ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest.new(parent: parent, subject: subject, deleted: deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_schema_versions({ parent: parent, subject: subject, deleted: deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_schema_versions(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest.new(parent: parent, subject: subject, deleted: deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_schema_versions_client_stub.call_count + end + end + end + + def test_list_schema_types + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_schema_types_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_list_schema_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_schema_types_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_schema_types({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_schema_types parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_schema_types ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_schema_types({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_schema_types(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_schema_types_client_stub.call_count + end + end + end + + def test_list_subjects + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + subject_prefix = "hello world" + deleted = true + + list_subjects_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_list_subjects_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_subjects_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_subjects({ parent: parent, subject_prefix: subject_prefix, deleted: deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_subjects parent: parent, subject_prefix: subject_prefix, deleted: deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_subjects ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest.new(parent: parent, subject_prefix: subject_prefix, deleted: deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_subjects({ parent: parent, subject_prefix: subject_prefix, deleted: deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_subjects(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest.new(parent: parent, subject_prefix: subject_prefix, deleted: deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_subjects_client_stub.call_count + end + end + end + + def test_list_subjects_by_schema_id + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + subject = "hello world" + deleted = true + + list_subjects_by_schema_id_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_list_subjects_by_schema_id_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_subjects_by_schema_id_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_subjects_by_schema_id({ parent: parent, subject: subject, deleted: deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_subjects_by_schema_id parent: parent, subject: subject, deleted: deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_subjects_by_schema_id ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest.new(parent: parent, subject: subject, deleted: deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_subjects_by_schema_id({ parent: parent, subject: subject, deleted: deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_subjects_by_schema_id(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest.new(parent: parent, subject: subject, deleted: deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_subjects_by_schema_id_client_stub.call_count + end + end + end + + def test_delete_subject + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + permanent = true + + delete_subject_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_delete_subject_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_subject_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_subject({ name: name, permanent: permanent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_subject name: name, permanent: permanent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_subject ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest.new(name: name, permanent: permanent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_subject({ name: name, permanent: permanent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_subject(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest.new(name: name, permanent: permanent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_subject_client_stub.call_count + end + end + end + + def test_lookup_version + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + schema_type = :SCHEMA_TYPE_UNSPECIFIED + schema = "hello world" + references = [{}] + normalize = true + deleted = true + + lookup_version_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_lookup_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lookup_version({ parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_version parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest.new(parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_version({ parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest.new(parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_version_client_stub.call_count + end + end + end + + def test_get_version + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + deleted = true + + get_version_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_version({ name: name, deleted: deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_version name: name, deleted: deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new(name: name, deleted: deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_version({ name: name, deleted: deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new(name: name, deleted: deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_count + end + end + end + + def test_get_raw_schema_version + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + deleted = true + + get_raw_schema_version_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_get_raw_schema_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_raw_schema_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_raw_schema_version({ name: name, deleted: deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_raw_schema_version name: name, deleted: deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_raw_schema_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new(name: name, deleted: deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_raw_schema_version({ name: name, deleted: deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_raw_schema_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new(name: name, deleted: deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_raw_schema_version_client_stub.call_count + end + end + end + + def test_list_versions + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + deleted = true + + list_versions_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_versions({ parent: parent, deleted: deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_versions parent: parent, deleted: deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_versions ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest.new(parent: parent, deleted: deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_versions({ parent: parent, deleted: deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_versions(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest.new(parent: parent, deleted: deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_count + end + end + end + + def test_create_version + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + version = 42 + id = 42 + schema_type = :SCHEMA_TYPE_UNSPECIFIED + schema = "hello world" + references = [{}] + normalize = true + + create_version_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_create_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_version({ parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_version parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest.new(parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_version({ parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest.new(parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_version_client_stub.call_count + end + end + end + + def test_delete_version + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + permanent = true + + delete_version_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_version({ name: name, permanent: permanent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_version name: name, permanent: permanent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest.new(name: name, permanent: permanent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_version({ name: name, permanent: permanent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest.new(name: name, permanent: permanent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_count + end + end + end + + def test_list_referenced_schemas + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_referenced_schemas_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_list_referenced_schemas_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_referenced_schemas_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_referenced_schemas({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_referenced_schemas parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_referenced_schemas ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_referenced_schemas({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_referenced_schemas(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_referenced_schemas_client_stub.call_count + end + end + end + + def test_check_compatibility + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + schema_type = :SCHEMA_TYPE_UNSPECIFIED + schema = "hello world" + references = [{}] + verbose = true + + check_compatibility_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_check_compatibility_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, check_compatibility_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.check_compatibility({ name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.check_compatibility name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.check_compatibility ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest.new(name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.check_compatibility({ name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.check_compatibility(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest.new(name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, check_compatibility_client_stub.call_count + end + end + end + + def test_get_schema_config + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + default_to_global = true + + get_schema_config_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_get_schema_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_schema_config_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_schema_config({ name: name, default_to_global: default_to_global }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_schema_config name: name, default_to_global: default_to_global do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_schema_config ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest.new(name: name, default_to_global: default_to_global) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_schema_config({ name: name, default_to_global: default_to_global }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_schema_config(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest.new(name: name, default_to_global: default_to_global), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_schema_config_client_stub.call_count + end + end + end + + def test_update_schema_config + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + compatibility = :NONE + normalize = true + + update_schema_config_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_update_schema_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_schema_config_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_schema_config({ name: name, compatibility: compatibility, normalize: normalize }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_schema_config name: name, compatibility: compatibility, normalize: normalize do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_schema_config ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest.new(name: name, compatibility: compatibility, normalize: normalize) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_schema_config({ name: name, compatibility: compatibility, normalize: normalize }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_schema_config(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest.new(name: name, compatibility: compatibility, normalize: normalize), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_schema_config_client_stub.call_count + end + end + end + + def test_delete_schema_config + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_schema_config_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_delete_schema_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_schema_config_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_schema_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_schema_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_schema_config ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_schema_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_schema_config(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_schema_config_client_stub.call_count + end + end + end + + def test_get_schema_mode + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_schema_mode_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_get_schema_mode_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_schema_mode_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_schema_mode({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_schema_mode name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_schema_mode ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_schema_mode({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_schema_mode(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_schema_mode_client_stub.call_count + end + end + end + + def test_update_schema_mode + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mode = :NONE + + update_schema_mode_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_update_schema_mode_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_schema_mode_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_schema_mode({ name: name, mode: mode }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_schema_mode name: name, mode: mode do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_schema_mode ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest.new(name: name, mode: mode) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_schema_mode({ name: name, mode: mode }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_schema_mode(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest.new(name: name, mode: mode), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_schema_mode_client_stub.call_count + end + end + end + + def test_delete_schema_mode + # Create test objects. + client_result = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_schema_mode_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.stub :transcode_delete_schema_mode_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_schema_mode_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_schema_mode({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_schema_mode name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_schema_mode ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_schema_mode({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_schema_mode(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_schema_mode_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_test.rb b/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_test.rb new file mode 100644 index 000000000000..a0c8a4ce0b5f --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/test/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry_test.rb @@ -0,0 +1,1743 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managedkafka/schemaregistry/v1/schema_registry_pb" +require "google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry" + +class ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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_get_schema_registry + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry.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" + + get_schema_registry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_schema_registry, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_schema_registry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_schema_registry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_schema_registry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_schema_registry ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_schema_registry({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_schema_registry(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest.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, get_schema_registry_client_stub.call_rpc_count + end + end + + def test_list_schema_registries + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse.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" + + list_schema_registries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_schema_registries, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_schema_registries_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_schema_registries({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_schema_registries parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_schema_registries ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_schema_registries({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_schema_registries(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_schema_registries_client_stub.call_rpc_count + end + end + + def test_create_schema_registry + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry.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" + schema_registry_id = "hello world" + schema_registry = {} + + create_schema_registry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_schema_registry, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["schema_registry_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry), request["schema_registry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_schema_registry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_schema_registry({ parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_schema_registry parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_schema_registry ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest.new(parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_schema_registry({ parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_schema_registry(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest.new(parent: parent, schema_registry_id: schema_registry_id, schema_registry: schema_registry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_schema_registry_client_stub.call_rpc_count + end + end + + def test_delete_schema_registry + # 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_schema_registry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_schema_registry, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_schema_registry_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_schema_registry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_schema_registry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_schema_registry ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_schema_registry({ 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_schema_registry(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest.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_schema_registry_client_stub.call_rpc_count + end + end + + def test_get_context + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context.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" + + get_context_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_context, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_context_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_context({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_context name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_context ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_context({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_context(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest.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, get_context_client_stub.call_rpc_count + end + end + + def test_list_contexts + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + + list_contexts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_contexts, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_contexts_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_contexts({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_contexts parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_contexts ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_contexts({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_contexts(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_contexts_client_stub.call_rpc_count + end + end + + def test_get_schema + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema.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" + subject = "hello world" + + get_schema_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_schema, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["subject"] + assert request.has_subject? + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_schema_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_schema({ name: name, subject: subject }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_schema name: name, subject: subject do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_schema ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new(name: name, subject: subject) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_schema({ name: name, subject: subject }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_schema(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new(name: name, subject: subject), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_schema_client_stub.call_rpc_count + end + end + + def test_get_raw_schema + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + subject = "hello world" + + get_raw_schema_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_raw_schema, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["subject"] + assert request.has_subject? + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_raw_schema_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_raw_schema({ name: name, subject: subject }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_raw_schema name: name, subject: subject do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_raw_schema ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new(name: name, subject: subject) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_raw_schema({ name: name, subject: subject }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_raw_schema(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest.new(name: name, subject: subject), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_raw_schema_client_stub.call_rpc_count + end + end + + def test_list_schema_versions + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + subject = "hello world" + deleted = true + + list_schema_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_schema_versions, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["subject"] + assert request.has_subject? + assert_equal true, request["deleted"] + assert request.has_deleted? + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_schema_versions_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_schema_versions({ parent: parent, subject: subject, deleted: deleted }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_schema_versions parent: parent, subject: subject, deleted: deleted do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_schema_versions ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest.new(parent: parent, subject: subject, deleted: deleted) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_schema_versions({ parent: parent, subject: subject, deleted: deleted }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_schema_versions(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest.new(parent: parent, subject: subject, deleted: deleted), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_schema_versions_client_stub.call_rpc_count + end + end + + def test_list_schema_types + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + + list_schema_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_schema_types, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_schema_types_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_schema_types({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_schema_types parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_schema_types ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_schema_types({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_schema_types(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_schema_types_client_stub.call_rpc_count + end + end + + def test_list_subjects + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + subject_prefix = "hello world" + deleted = true + + list_subjects_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_subjects, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["subject_prefix"] + assert request.has_subject_prefix? + assert_equal true, request["deleted"] + assert request.has_deleted? + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_subjects_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_subjects({ parent: parent, subject_prefix: subject_prefix, deleted: deleted }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_subjects parent: parent, subject_prefix: subject_prefix, deleted: deleted do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_subjects ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest.new(parent: parent, subject_prefix: subject_prefix, deleted: deleted) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_subjects({ parent: parent, subject_prefix: subject_prefix, deleted: deleted }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_subjects(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest.new(parent: parent, subject_prefix: subject_prefix, deleted: deleted), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_subjects_client_stub.call_rpc_count + end + end + + def test_list_subjects_by_schema_id + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + subject = "hello world" + deleted = true + + list_subjects_by_schema_id_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_subjects_by_schema_id, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["subject"] + assert request.has_subject? + assert_equal true, request["deleted"] + assert request.has_deleted? + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_subjects_by_schema_id_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_subjects_by_schema_id({ parent: parent, subject: subject, deleted: deleted }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_subjects_by_schema_id parent: parent, subject: subject, deleted: deleted do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_subjects_by_schema_id ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest.new(parent: parent, subject: subject, deleted: deleted) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_subjects_by_schema_id({ parent: parent, subject: subject, deleted: deleted }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_subjects_by_schema_id(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest.new(parent: parent, subject: subject, deleted: deleted), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_subjects_by_schema_id_client_stub.call_rpc_count + end + end + + def test_delete_subject + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + permanent = true + + delete_subject_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_subject, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["permanent"] + assert request.has_permanent? + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_subject_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_subject({ name: name, permanent: permanent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_subject name: name, permanent: permanent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_subject ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest.new(name: name, permanent: permanent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_subject({ name: name, permanent: permanent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_subject(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest.new(name: name, permanent: permanent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_subject_client_stub.call_rpc_count + end + end + + def test_lookup_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion.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" + schema_type = :SCHEMA_TYPE_UNSPECIFIED + schema = "hello world" + references = [{}] + normalize = true + deleted = true + + lookup_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_version, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal :SCHEMA_TYPE_UNSPECIFIED, request["schema_type"] + assert request.has_schema_type? + assert_equal "hello world", request["schema"] + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, request["references"].first + assert_equal true, request["normalize"] + assert request.has_normalize? + assert_equal true, request["deleted"] + assert request.has_deleted? + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lookup_version({ parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_version parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest.new(parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_version({ parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest.new(parent: parent, schema_type: schema_type, schema: schema, references: references, normalize: normalize, deleted: deleted), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_version_client_stub.call_rpc_count + end + end + + def test_get_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion.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" + deleted = true + + get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_version, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["deleted"] + assert request.has_deleted? + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_version({ name: name, deleted: deleted }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_version name: name, deleted: deleted do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new(name: name, deleted: deleted) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_version({ name: name, deleted: deleted }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new(name: name, deleted: deleted), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_rpc_count + end + end + + def test_get_raw_schema_version + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + deleted = true + + get_raw_schema_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_raw_schema_version, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["deleted"] + assert request.has_deleted? + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_raw_schema_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_raw_schema_version({ name: name, deleted: deleted }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_raw_schema_version name: name, deleted: deleted do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_raw_schema_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new(name: name, deleted: deleted) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_raw_schema_version({ name: name, deleted: deleted }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_raw_schema_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest.new(name: name, deleted: deleted), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_raw_schema_version_client_stub.call_rpc_count + end + end + + def test_list_versions + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + deleted = true + + list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_versions, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal true, request["deleted"] + assert request.has_deleted? + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_versions_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_versions({ parent: parent, deleted: deleted }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_versions parent: parent, deleted: deleted do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_versions ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest.new(parent: parent, deleted: deleted) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_versions({ parent: parent, deleted: deleted }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_versions(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest.new(parent: parent, deleted: deleted), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_rpc_count + end + end + + def test_create_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse.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" + version = 42 + id = 42 + schema_type = :SCHEMA_TYPE_UNSPECIFIED + schema = "hello world" + references = [{}] + normalize = true + + create_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_version, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["version"] + assert request.has_version? + assert_equal 42, request["id"] + assert request.has_id? + assert_equal :SCHEMA_TYPE_UNSPECIFIED, request["schema_type"] + assert request.has_schema_type? + assert_equal "hello world", request["schema"] + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, request["references"].first + assert_equal true, request["normalize"] + assert request.has_normalize? + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_version({ parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_version parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest.new(parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_version({ parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest.new(parent: parent, version: version, id: id, schema_type: schema_type, schema: schema, references: references, normalize: normalize), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_version_client_stub.call_rpc_count + end + end + + def test_delete_version + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + permanent = true + + delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_version, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["permanent"] + assert request.has_permanent? + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_version_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_version({ name: name, permanent: permanent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_version name: name, permanent: permanent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_version ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest.new(name: name, permanent: permanent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_version({ name: name, permanent: permanent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_version(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest.new(name: name, permanent: permanent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_rpc_count + end + end + + def test_list_referenced_schemas + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.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" + + list_referenced_schemas_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_referenced_schemas, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_referenced_schemas_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_referenced_schemas({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_referenced_schemas parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_referenced_schemas ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_referenced_schemas({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_referenced_schemas(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_referenced_schemas_client_stub.call_rpc_count + end + end + + def test_check_compatibility + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse.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" + schema_type = :SCHEMA_TYPE_UNSPECIFIED + schema = "hello world" + references = [{}] + verbose = true + + check_compatibility_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :check_compatibility, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest, request + assert_equal "hello world", request["name"] + assert_equal :SCHEMA_TYPE_UNSPECIFIED, request["schema_type"] + assert request.has_schema_type? + assert_equal "hello world", request["schema"] + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema::SchemaReference, request["references"].first + assert_equal true, request["verbose"] + assert request.has_verbose? + refute_nil options + end + + Gapic::ServiceStub.stub :new, check_compatibility_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.check_compatibility({ name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.check_compatibility name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.check_compatibility ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest.new(name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.check_compatibility({ name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.check_compatibility(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest.new(name: name, schema_type: schema_type, schema: schema, references: references, verbose: verbose), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, check_compatibility_client_stub.call_rpc_count + end + end + + def test_get_schema_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.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" + default_to_global = true + + get_schema_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_schema_config, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["default_to_global"] + assert request.has_default_to_global? + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_schema_config_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_schema_config({ name: name, default_to_global: default_to_global }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_schema_config name: name, default_to_global: default_to_global do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_schema_config ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest.new(name: name, default_to_global: default_to_global) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_schema_config({ name: name, default_to_global: default_to_global }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_schema_config(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest.new(name: name, default_to_global: default_to_global), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_schema_config_client_stub.call_rpc_count + end + end + + def test_update_schema_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.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" + compatibility = :NONE + normalize = true + + update_schema_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_schema_config, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal :NONE, request["compatibility"] + assert request.has_compatibility? + assert_equal true, request["normalize"] + assert request.has_normalize? + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_schema_config_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_schema_config({ name: name, compatibility: compatibility, normalize: normalize }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_schema_config name: name, compatibility: compatibility, normalize: normalize do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_schema_config ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest.new(name: name, compatibility: compatibility, normalize: normalize) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_schema_config({ name: name, compatibility: compatibility, normalize: normalize }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_schema_config(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest.new(name: name, compatibility: compatibility, normalize: normalize), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_schema_config_client_stub.call_rpc_count + end + end + + def test_delete_schema_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig.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_schema_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_schema_config, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_schema_config_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_schema_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_schema_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_schema_config ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_schema_config({ 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_schema_config(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest.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_schema_config_client_stub.call_rpc_count + end + end + + def test_get_schema_mode + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.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" + + get_schema_mode_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_schema_mode, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_schema_mode_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_schema_mode({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_schema_mode name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_schema_mode ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_schema_mode({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_schema_mode(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest.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, get_schema_mode_client_stub.call_rpc_count + end + end + + def test_update_schema_mode + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.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" + mode = :NONE + + update_schema_mode_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_schema_mode, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest, request + assert_equal "hello world", request["name"] + assert_equal :NONE, request["mode"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_schema_mode_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_schema_mode({ name: name, mode: mode }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_schema_mode name: name, mode: mode do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_schema_mode ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest.new(name: name, mode: mode) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_schema_mode({ name: name, mode: mode }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_schema_mode(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest.new(name: name, mode: mode), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_schema_mode_client_stub.call_rpc_count + end + end + + def test_delete_schema_mode + # Create GRPC objects. + grpc_response = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode.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_schema_mode_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_schema_mode, name + assert_kind_of ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_schema_mode_client_stub do + # Create client + client = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_schema_mode({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_schema_mode name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_schema_mode ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_schema_mode({ 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_schema_mode(::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest.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_schema_mode_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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client::Configuration, config + end +end diff --git a/google-cloud-managed_kafka-schema_registry-v1/test/helper.rb b/google-cloud-managed_kafka-schema_registry-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index e86392f062d0..fd447e1dc7a9 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -971,6 +971,10 @@ "component": "google-cloud-managed_kafka", "version_file": "lib/google/cloud/managed_kafka/version.rb" }, + "google-cloud-managed_kafka-schema_registry-v1": { + "component": "google-cloud-managed_kafka-schema_registry-v1", + "version_file": "lib/google/cloud/managed_kafka/schema_registry/v1/version.rb" + }, "google-cloud-managed_kafka-v1": { "component": "google-cloud-managed_kafka-v1", "version_file": "lib/google/cloud/managed_kafka/v1/version.rb" From 345fd0eb44ea6481e8ac1cb502fb4377300b3084 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 14:50:23 -0700 Subject: [PATCH 423/457] chore(main): release google-cloud-config_delivery-v1 0.1.0 (#30825) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-config_delivery-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-config_delivery-v1/.repo-metadata.json | 2 +- google-cloud-config_delivery-v1/CHANGELOG.md | 9 ++++++++- .../lib/google/cloud/config_delivery/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.configdelivery.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d1d8f87d8ed3..35df3a5027ec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -231,7 +231,7 @@ "google-cloud-confidential_computing+FILLER": "0.0.0", "google-cloud-confidential_computing-v1": "1.6.1", "google-cloud-confidential_computing-v1+FILLER": "0.0.0", - "google-cloud-config_delivery-v1": "0.0.1", + "google-cloud-config_delivery-v1": "0.1.0", "google-cloud-config_delivery-v1+FILLER": "0.0.0", "google-cloud-config_service": "2.0.1", "google-cloud-config_service+FILLER": "0.0.0", diff --git a/google-cloud-config_delivery-v1/.repo-metadata.json b/google-cloud-config_delivery-v1/.repo-metadata.json index d0b212787a57..408f9d560dc6 100644 --- a/google-cloud-config_delivery-v1/.repo-metadata.json +++ b/google-cloud-config_delivery-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "configdelivery", "name_pretty": "Config Delivery V1 API", "product_documentation": "https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/concepts/fleet-packages", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "ConfigDelivery service manages the deployment of kubernetes configuration to a fleet of kubernetes clusters. Note that google-cloud-config_delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-config_delivery instead. See the readme for more details.", diff --git a/google-cloud-config_delivery-v1/CHANGELOG.md b/google-cloud-config_delivery-v1/CHANGELOG.md index f88957a62ba2..aea12df83949 100644 --- a/google-cloud-config_delivery-v1/CHANGELOG.md +++ b/google-cloud-config_delivery-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-14) + +#### Features + +* Initial generation of google-cloud-config_delivery-v1 ([#30761](https://github.com/googleapis/google-cloud-ruby/issues/30761)) + +## Release History diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/version.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/version.rb index 00a6e0b4e353..31cf6cbf488b 100644 --- a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/version.rb +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module ConfigDelivery module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-cloud-config_delivery-v1/snippets/snippet_metadata_google.cloud.configdelivery.v1.json b/google-cloud-config_delivery-v1/snippets/snippet_metadata_google.cloud.configdelivery.v1.json index e4be63ba57e7..84813f65930d 100644 --- a/google-cloud-config_delivery-v1/snippets/snippet_metadata_google.cloud.configdelivery.v1.json +++ b/google-cloud-config_delivery-v1/snippets/snippet_metadata_google.cloud.configdelivery.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-config_delivery-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 0f802127c6f8a845697df9ba9474ce28ea9396f9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 14:54:36 -0700 Subject: [PATCH 424/457] chore(main): release google-cloud-firestore-admin-v1 1.7.0 (#30826) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-firestore-admin-v1 1.7.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-firestore-admin-v1/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/firestore/admin/v1/version.rb | 2 +- .../snippet_metadata_google.firestore.admin.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 35df3a5027ec..df164247f609 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -393,7 +393,7 @@ "google-cloud-firestore+FILLER": "0.0.0", "google-cloud-firestore-admin": "0.5.1", "google-cloud-firestore-admin+FILLER": "0.0.0", - "google-cloud-firestore-admin-v1": "1.6.0", + "google-cloud-firestore-admin-v1": "1.7.0", "google-cloud-firestore-admin-v1+FILLER": "0.0.0", "google-cloud-firestore-v1": "2.1.1", "google-cloud-firestore-v1+FILLER": "0.0.0", diff --git a/google-cloud-firestore-admin-v1/CHANGELOG.md b/google-cloud-firestore-admin-v1/CHANGELOG.md index d09498b902c8..fb7da1c4efe8 100644 --- a/google-cloud-firestore-admin-v1/CHANGELOG.md +++ b/google-cloud-firestore-admin-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +### 1.7.0 (2025-08-14) + +#### Features + +* add Firestore CloneDatabase support ([#30753](https://github.com/googleapis/google-cloud-ruby/issues/30753)) + ### 1.6.0 (2025-07-17) #### Features diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb index 1ca89f6a809d..1eafff722b86 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module Firestore module Admin module V1 - VERSION = "1.6.0" + VERSION = "1.7.0" end end end diff --git a/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json b/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json index ad778f43c8ae..f14b9bb4b2f4 100644 --- a/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json +++ b/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-firestore-admin-v1", - "version": "1.6.0", + "version": "1.7.0", "language": "RUBY", "apis": [ { From d2290cb9c34f5884c0c64b86f66787f2e1b35a55 Mon Sep 17 00:00:00 2001 From: Charlotte Y <38296042+cy-yun@users.noreply.github.com> Date: Thu, 14 Aug 2025 16:15:42 -0700 Subject: [PATCH 425/457] chore(BigQuery): Fix flakey acceptance test - sets, updates and removes policy tags for a field (#30856) --- .../acceptance/bigquery/table_policy_tag_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigquery/acceptance/bigquery/table_policy_tag_test.rb b/google-cloud-bigquery/acceptance/bigquery/table_policy_tag_test.rb index f5475eddc790..51187ca37b2e 100644 --- a/google-cloud-bigquery/acceptance/bigquery/table_policy_tag_test.rb +++ b/google-cloud-bigquery/acceptance/bigquery/table_policy_tag_test.rb @@ -47,7 +47,7 @@ taxonomy_id = nil begin taxonomy = Google::Cloud::DataCatalog::V1::Taxonomy.new( - display_name: "google-cloud-ruby bigquery testing taxonomy", + display_name: "google-cloud-ruby bigquery testing taxonomy #{SecureRandom.hex(4)}", description: "Taxonomy created for google-cloud-ruby acceptance tests", activated_policy_types: [:FINE_GRAINED_ACCESS_CONTROL] ) From 36c2334216da2a4aa393fe24bb22572c1e126833 Mon Sep 17 00:00:00 2001 From: Charlotte Y <38296042+cy-yun@users.noreply.github.com> Date: Thu, 14 Aug 2025 18:56:22 -0700 Subject: [PATCH 426/457] chore(BigQuery): Add missing unit tests for null_markers, source_column_match, time_zone, timestamp_format, time_format, date_format, and datetime_format in Load Job and Load Job Updater (#30858) --- .../google/cloud/bigquery/load_job_test.rb | 7 ++ .../cloud/bigquery/load_job_updater_test.rb | 77 +++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/load_job_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/load_job_test.rb index 176b1c499490..c738c1490b8e 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/load_job_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/load_job_test.rb @@ -90,6 +90,13 @@ _(job_defaults).wont_be :backup? _(job_defaults).wont_be :allow_jagged_rows? _(job_defaults).wont_be :ignore_unknown_values? + _(job_defaults.date_format).must_be :nil? + _(job_defaults.time_format).must_be :nil? + _(job_defaults.datetime_format).must_be :nil? + _(job_defaults.timestamp_format).must_be :nil? + _(job_defaults.null_markers).must_equal [] + _(job_defaults.source_column_match).must_be :nil? + _(job_defaults.time_zone).must_be :nil? end it "knows its full attributes" do diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/load_job_updater_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/load_job_updater_test.rb index 9025c3c0e4f4..ddcd046521e5 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/load_job_updater_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/load_job_updater_test.rb @@ -109,4 +109,81 @@ def new_updater job_gapi = updater.to_gapi _(job_gapi.configuration.load.write_disposition).must_equal "SOME_NEW_UNSUPPORTED_DISPOSITION" end + + it "can set null_markers" do + updater = new_updater + updater.null_markers = ["", "NULL"] + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.null_markers).must_equal ["", "NULL"] + + updater.null_markers = nil + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.null_markers).must_be :nil? + end + + it "can set source_column_match" do + updater = new_updater + updater.source_column_match = "POSITION" + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.source_column_match).must_equal "POSITION" + + updater.source_column_match = nil + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.source_column_match).must_be :nil? + end + + it "can set time_zone" do + updater = new_updater + updater.time_zone = "America/Los_Angeles" + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.time_zone).must_equal "America/Los_Angeles" + + updater.time_zone = nil + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.time_zone).must_be :nil? + end + + it "can set timestamp_format" do + updater = new_updater + updater.timestamp_format = "%Y-%m-%d %H:%M:%S.%f %z" + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.timestamp_format).must_equal "%Y-%m-%d %H:%M:%S.%f %z" + + updater.timestamp_format = nil + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.timestamp_format).must_be :nil? + end + + it "can set time_format" do + updater = new_updater + updater.time_format = "%H:%M:%S" + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.time_format).must_equal "%H:%M:%S" + + updater.time_format = nil + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.time_format).must_be :nil? + end + + it "can set date_format" do + updater = new_updater + updater.date_format = "%Y-%m-%d" + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.date_format).must_equal "%Y-%m-%d" + + updater.date_format = nil + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.date_format).must_be :nil? + end + + it "can set datetime_format" do + updater = new_updater + updater.datetime_format = "%Y-%m-%d %H:%M:%S" + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.datetime_format).must_equal "%Y-%m-%d %H:%M:%S" + + updater.datetime_format = nil + job_gapi = updater.to_gapi + _(job_gapi.configuration.load.datetime_format).must_be :nil? + end end \ No newline at end of file From 5441e0dd248a3e5470d37a3e4188b672e1b9db8d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:18:45 -0700 Subject: [PATCH 427/457] chore(main): release google-shopping-merchant-accounts-v1 0.1.1 (#30861) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-accounts-v1 0.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-shopping-merchant-accounts-v1/CHANGELOG.md | 6 ++++++ .../lib/google/shopping/merchant/accounts/v1/version.rb | 2 +- ...ippet_metadata_google.shopping.merchant.accounts.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index df164247f609..cea516bf681e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -913,7 +913,7 @@ "google-shopping-css-v1+FILLER": "0.0.0", "google-shopping-merchant-accounts": "0.6.0", "google-shopping-merchant-accounts+FILLER": "0.0.0", - "google-shopping-merchant-accounts-v1": "0.1.0", + "google-shopping-merchant-accounts-v1": "0.1.1", "google-shopping-merchant-accounts-v1+FILLER": "0.0.0", "google-shopping-merchant-accounts-v1beta": "0.11.0", "google-shopping-merchant-accounts-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-accounts-v1/CHANGELOG.md b/google-shopping-merchant-accounts-v1/CHANGELOG.md index a67f8d974183..c90f127798cf 100644 --- a/google-shopping-merchant-accounts-v1/CHANGELOG.md +++ b/google-shopping-merchant-accounts-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.1.1 (2025-08-15) + +#### Documentation + +* Fixed cross-reference links for OnlineReturnPolicy ([#30832](https://github.com/googleapis/google-cloud-ruby/issues/30832)) + ### 0.1.0 (2025-08-07) #### Features diff --git a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb index 0a038e3846df..f8aa3ba1bb5c 100644 --- a/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb +++ b/google-shopping-merchant-accounts-v1/lib/google/shopping/merchant/accounts/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module Accounts module V1 - VERSION = "0.1.0" + VERSION = "0.1.1" end end end diff --git a/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json b/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json index 33c0999a7a4b..db196d5f2897 100644 --- a/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json +++ b/google-shopping-merchant-accounts-v1/snippets/snippet_metadata_google.shopping.merchant.accounts.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-accounts-v1", - "version": "0.1.0", + "version": "0.1.1", "language": "RUBY", "apis": [ { From 94378525db67b98605066b44fe5fb20904609647 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:19:10 -0700 Subject: [PATCH 428/457] chore(main): release google-cloud-managed_kafka-schema_registry-v1 0.1.0 (#30860) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-managed_kafka-schema_registry-v1 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- .../CHANGELOG.md | 9 ++++++++- .../cloud/managed_kafka/schema_registry/v1/version.rb | 2 +- ...data_google.cloud.managedkafka.schemaregistry.v1.json | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cea516bf681e..6e32b8fba8b3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -479,7 +479,7 @@ "google-cloud-managed_identities-v1+FILLER": "0.0.0", "google-cloud-managed_kafka": "2.1.1", "google-cloud-managed_kafka+FILLER": "0.0.0", - "google-cloud-managed_kafka-schema_registry-v1": "0.0.1", + "google-cloud-managed_kafka-schema_registry-v1": "0.1.0", "google-cloud-managed_kafka-schema_registry-v1+FILLER": "0.0.0", "google-cloud-managed_kafka-v1": "1.4.0", "google-cloud-managed_kafka-v1+FILLER": "0.0.0", diff --git a/google-cloud-managed_kafka-schema_registry-v1/.repo-metadata.json b/google-cloud-managed_kafka-schema_registry-v1/.repo-metadata.json index 55ab94da3010..1e0097e5c4ac 100644 --- a/google-cloud-managed_kafka-schema_registry-v1/.repo-metadata.json +++ b/google-cloud-managed_kafka-schema_registry-v1/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "managedkafka", "name_pretty": "Managed Service for Apache Kafka V1 API", "product_documentation": "https://cloud.google.com/managed-service-for-apache-kafka/docs", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Manage Apache Kafka clusters and resources. Note that google-cloud-managed_kafka-schema_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-managed_kafka-schema_registry instead. See the readme for more details.", diff --git a/google-cloud-managed_kafka-schema_registry-v1/CHANGELOG.md b/google-cloud-managed_kafka-schema_registry-v1/CHANGELOG.md index f88957a62ba2..efe0d7c3100d 100644 --- a/google-cloud-managed_kafka-schema_registry-v1/CHANGELOG.md +++ b/google-cloud-managed_kafka-schema_registry-v1/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-15) + +#### Features + +* Initial generation of google-cloud-managed_kafka-schema_registry-v1 ([#30852](https://github.com/googleapis/google-cloud-ruby/issues/30852)) + +## Release History diff --git a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/version.rb b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/version.rb index 6ddca6849dba..216df118a111 100644 --- a/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/version.rb +++ b/google-cloud-managed_kafka-schema_registry-v1/lib/google/cloud/managed_kafka/schema_registry/v1/version.rb @@ -22,7 +22,7 @@ module Cloud module ManagedKafka module SchemaRegistry module V1 - VERSION = "0.0.1" + VERSION = "0.1.0" end end end diff --git a/google-cloud-managed_kafka-schema_registry-v1/snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json b/google-cloud-managed_kafka-schema_registry-v1/snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json index 35025013b455..9c032d4da2ea 100644 --- a/google-cloud-managed_kafka-schema_registry-v1/snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json +++ b/google-cloud-managed_kafka-schema_registry-v1/snippets/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-managed_kafka-schema_registry-v1", - "version": "", + "version": "0.1.0", "language": "RUBY", "apis": [ { From 44e93e02e049e076a17fa5f4d7a893f4eb427905 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:19:34 -0700 Subject: [PATCH 429/457] chore(main): release google-shopping-merchant-issue_resolution-v1 0.1.1 (#30836) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-shopping-merchant-issue_resolution-v1 0.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-shopping-merchant-issue_resolution-v1/CHANGELOG.md | 6 ++++++ .../google/shopping/merchant/issue_resolution/v1/version.rb | 2 +- ...etadata_google.shopping.merchant.issueresolution.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6e32b8fba8b3..7fb2ea504807 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -937,7 +937,7 @@ "google-shopping-merchant-inventories-v1beta+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution": "0.2.0", "google-shopping-merchant-issue_resolution+FILLER": "0.0.0", - "google-shopping-merchant-issue_resolution-v1": "0.1.0", + "google-shopping-merchant-issue_resolution-v1": "0.1.1", "google-shopping-merchant-issue_resolution-v1+FILLER": "0.0.0", "google-shopping-merchant-issue_resolution-v1beta": "0.2.0", "google-shopping-merchant-issue_resolution-v1beta+FILLER": "0.0.0", diff --git a/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md b/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md index 913ae17ca045..112aebe4635e 100644 --- a/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md +++ b/google-shopping-merchant-issue_resolution-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.1.1 (2025-08-15) + +#### Documentation + +* Fixed an API documentation link ([#30828](https://github.com/googleapis/google-cloud-ruby/issues/30828)) + ### 0.1.0 (2025-08-07) #### Features diff --git a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb index 75970409d182..8fe8628e0a88 100644 --- a/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb +++ b/google-shopping-merchant-issue_resolution-v1/lib/google/shopping/merchant/issue_resolution/v1/version.rb @@ -22,7 +22,7 @@ module Shopping module Merchant module IssueResolution module V1 - VERSION = "0.1.0" + VERSION = "0.1.1" end end end diff --git a/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json b/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json index 6e22dd7b1681..f4a62d35adb4 100644 --- a/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json +++ b/google-shopping-merchant-issue_resolution-v1/snippets/snippet_metadata_google.shopping.merchant.issueresolution.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-shopping-merchant-issue_resolution-v1", - "version": "0.1.0", + "version": "0.1.1", "language": "RUBY", "apis": [ { From 1b337caefefb240015731e6b1a600c62916f5627 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:19:56 -0700 Subject: [PATCH 430/457] chore(main): release google-cloud-run-v2 0.26.0 (#30835) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-run-v2 0.26.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-run-v2/CHANGELOG.md | 6 ++++++ google-cloud-run-v2/lib/google/cloud/run/v2/version.rb | 2 +- .../snippets/snippet_metadata_google.cloud.run.v2.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7fb2ea504807..69b8c9ed3b0c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -655,7 +655,7 @@ "google-cloud-retail-v2+FILLER": "0.0.0", "google-cloud-run-client": "1.4.1", "google-cloud-run-client+FILLER": "0.0.0", - "google-cloud-run-v2": "0.25.0", + "google-cloud-run-v2": "0.26.0", "google-cloud-run-v2+FILLER": "0.0.0", "google-cloud-scheduler": "3.0.2", "google-cloud-scheduler+FILLER": "0.0.0", diff --git a/google-cloud-run-v2/CHANGELOG.md b/google-cloud-run-v2/CHANGELOG.md index f50edf5e2932..d981414ea75a 100644 --- a/google-cloud-run-v2/CHANGELOG.md +++ b/google-cloud-run-v2/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.26.0 (2025-08-15) + +#### Features + +* Support for worker pools ([#30802](https://github.com/googleapis/google-cloud-ruby/issues/30802)) + ### 0.25.0 (2025-07-17) #### Features diff --git a/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb b/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb index fc990d1ab8e0..4b82d559f822 100644 --- a/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb +++ b/google-cloud-run-v2/lib/google/cloud/run/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Run module V2 - VERSION = "0.25.0" + VERSION = "0.26.0" end end end diff --git a/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json b/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json index 1a0bdcd82068..05933cd6a221 100644 --- a/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json +++ b/google-cloud-run-v2/snippets/snippet_metadata_google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-run-v2", - "version": "0.25.0", + "version": "0.26.0", "language": "RUBY", "apis": [ { From 268ed2fb8679c7693ff163994d862fa3ba2e00db Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:21:21 -0700 Subject: [PATCH 431/457] chore(main): release google-cloud-run-client 1.5.0 (#30834) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-cloud-run-client/CHANGELOG.md | 6 ++++++ .../lib/google/cloud/run/client/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 69b8c9ed3b0c..498507dbeb20 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -653,7 +653,7 @@ "google-cloud-retail+FILLER": "0.0.0", "google-cloud-retail-v2": "2.3.0", "google-cloud-retail-v2+FILLER": "0.0.0", - "google-cloud-run-client": "1.4.1", + "google-cloud-run-client": "1.5.0", "google-cloud-run-client+FILLER": "0.0.0", "google-cloud-run-v2": "0.26.0", "google-cloud-run-v2+FILLER": "0.0.0", diff --git a/google-cloud-run-client/CHANGELOG.md b/google-cloud-run-client/CHANGELOG.md index 93f2e97b9dee..e06a6cdea867 100644 --- a/google-cloud-run-client/CHANGELOG.md +++ b/google-cloud-run-client/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.5.0 (2025-08-15) + +#### Features + +* Support for worker pools ([#30803](https://github.com/googleapis/google-cloud-ruby/issues/30803)) + ### 1.4.1 (2025-04-29) #### Bug Fixes diff --git a/google-cloud-run-client/lib/google/cloud/run/client/version.rb b/google-cloud-run-client/lib/google/cloud/run/client/version.rb index d09364ff7ee5..2b996090cb98 100644 --- a/google-cloud-run-client/lib/google/cloud/run/client/version.rb +++ b/google-cloud-run-client/lib/google/cloud/run/client/version.rb @@ -18,7 +18,7 @@ module Google module Cloud module Run module Client - VERSION = "1.4.1" + VERSION = "1.5.0" end end end From ac3634f3b1b124a24e244ae6cfab915919926b8a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:21:40 -0700 Subject: [PATCH 432/457] chore(main): release google-cloud-ai_platform-v1 1.20.0 (#30833) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-ai_platform-v1 1.20.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-ai_platform-v1/CHANGELOG.md | 7 +++++++ .../lib/google/cloud/ai_platform/v1/version.rb | 2 +- .../snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 498507dbeb20..31dccd241815 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -45,7 +45,7 @@ "google-cloud-advisory_notifications-v1+FILLER": "0.0.0", "google-cloud-ai_platform": "2.0.1", "google-cloud-ai_platform+FILLER": "0.0.0", - "google-cloud-ai_platform-v1": "1.19.0", + "google-cloud-ai_platform-v1": "1.20.0", "google-cloud-ai_platform-v1+FILLER": "0.0.0", "google-cloud-alloy_db": "2.1.0", "google-cloud-alloy_db+FILLER": "0.0.0", diff --git a/google-cloud-ai_platform-v1/CHANGELOG.md b/google-cloud-ai_platform-v1/CHANGELOG.md index b604fe65187a..527e23a31c45 100644 --- a/google-cloud-ai_platform-v1/CHANGELOG.md +++ b/google-cloud-ai_platform-v1/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### 1.20.0 (2025-08-15) + +#### Features + +* Support for the feature_view_direct_write RPC +* Support for using the Model Armor service when generating content + ### 1.19.0 (2025-07-28) #### Features diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb index f4355e2b532d..26109aed5ac9 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module AIPlatform module V1 - VERSION = "1.19.0" + VERSION = "1.20.0" end end end diff --git a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json index 23ce038764dc..f2503543f1c4 100644 --- a/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/google-cloud-ai_platform-v1/snippets/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-ai_platform-v1", - "version": "1.19.0", + "version": "1.20.0", "language": "RUBY", "apis": [ { From e7e8d4a4ecb6e3bcca19df5b5408888f41bd8dcb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:28:24 -0700 Subject: [PATCH 433/457] chore(main): release google-cloud-privileged_access_manager-v1 1.2.0 (#30827) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-privileged_access_manager-v1 1.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-privileged_access_manager-v1/CHANGELOG.md | 6 ++++++ .../google/cloud/privileged_access_manager/v1/version.rb | 2 +- ...et_metadata_google.cloud.privilegedaccessmanager.v1.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 31dccd241815..4c54dd8cc05b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -605,7 +605,7 @@ "google-cloud-private_catalog-v1beta1+FILLER": "0.0.0", "google-cloud-privileged_access_manager": "1.0.1", "google-cloud-privileged_access_manager+FILLER": "0.0.0", - "google-cloud-privileged_access_manager-v1": "1.1.0", + "google-cloud-privileged_access_manager-v1": "1.2.0", "google-cloud-privileged_access_manager-v1+FILLER": "0.0.0", "google-cloud-profiler": "1.5.1", "google-cloud-profiler+FILLER": "0.0.0", diff --git a/google-cloud-privileged_access_manager-v1/CHANGELOG.md b/google-cloud-privileged_access_manager-v1/CHANGELOG.md index 352b53d42f87..31c28f4b4854 100644 --- a/google-cloud-privileged_access_manager-v1/CHANGELOG.md +++ b/google-cloud-privileged_access_manager-v1/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.2.0 (2025-08-15) + +#### Features + +* Introducing new Grant states for Withdrawal operation ([#30750](https://github.com/googleapis/google-cloud-ruby/issues/30750)) + ### 1.1.0 (2025-05-12) #### Features diff --git a/google-cloud-privileged_access_manager-v1/lib/google/cloud/privileged_access_manager/v1/version.rb b/google-cloud-privileged_access_manager-v1/lib/google/cloud/privileged_access_manager/v1/version.rb index 28a7b0d5e1df..f71585082d00 100644 --- a/google-cloud-privileged_access_manager-v1/lib/google/cloud/privileged_access_manager/v1/version.rb +++ b/google-cloud-privileged_access_manager-v1/lib/google/cloud/privileged_access_manager/v1/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module PrivilegedAccessManager module V1 - VERSION = "1.1.0" + VERSION = "1.2.0" end end end diff --git a/google-cloud-privileged_access_manager-v1/snippets/snippet_metadata_google.cloud.privilegedaccessmanager.v1.json b/google-cloud-privileged_access_manager-v1/snippets/snippet_metadata_google.cloud.privilegedaccessmanager.v1.json index 88fe57123c8b..6bfb77c12beb 100644 --- a/google-cloud-privileged_access_manager-v1/snippets/snippet_metadata_google.cloud.privilegedaccessmanager.v1.json +++ b/google-cloud-privileged_access_manager-v1/snippets/snippet_metadata_google.cloud.privilegedaccessmanager.v1.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-privileged_access_manager-v1", - "version": "1.1.0", + "version": "1.2.0", "language": "RUBY", "apis": [ { From e083d1e9b572fa84815740a9a3f813fe6eb7e091 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:29:14 -0700 Subject: [PATCH 434/457] chore(main): release google-cloud-storage 1.57.0 (#30785) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-cloud-storage/CHANGELOG.md | 7 +++++++ google-cloud-storage/lib/google/cloud/storage/version.rb | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4c54dd8cc05b..9cf28fc02786 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -739,7 +739,7 @@ "google-cloud-speech-v1p1beta1+FILLER": "0.0.0", "google-cloud-speech-v2": "1.2.1", "google-cloud-speech-v2+FILLER": "0.0.0", - "google-cloud-storage": "1.56.0", + "google-cloud-storage": "1.57.0", "google-cloud-storage+FILLER": "0.0.0", "google-cloud-storage-control": "1.1.1", "google-cloud-storage-control+FILLER": "0.0.0", diff --git a/google-cloud-storage/CHANGELOG.md b/google-cloud-storage/CHANGELOG.md index 4e9bc12f9085..de967377b084 100644 --- a/google-cloud-storage/CHANGELOG.md +++ b/google-cloud-storage/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +### 1.57.0 (2025-08-15) + +#### Features + +* Require Ruby 3.1 or later ([#30765](https://github.com/googleapis/google-cloud-ruby/issues/30765)) +* Support for using Faraday for HTTP requests ([#30759](https://github.com/googleapis/google-cloud-ruby/issues/30759)) + ### 1.56.0 (2025-04-21) #### Features diff --git a/google-cloud-storage/lib/google/cloud/storage/version.rb b/google-cloud-storage/lib/google/cloud/storage/version.rb index b4858451538a..43e72d9d06f4 100644 --- a/google-cloud-storage/lib/google/cloud/storage/version.rb +++ b/google-cloud-storage/lib/google/cloud/storage/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Storage - VERSION = "1.56.0".freeze + VERSION = "1.57.0".freeze end end end From 7902d02ec926b9527bf03ccf0b9ce58a8dcab316 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:29:50 -0700 Subject: [PATCH 435/457] chore(main): release google-cloud-bigquery 1.54.0 (#30824) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- google-cloud-bigquery/CHANGELOG.md | 7 +++++++ google-cloud-bigquery/lib/google/cloud/bigquery/version.rb | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9cf28fc02786..c22fe3131b8e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -127,7 +127,7 @@ "google-cloud-beyond_corp-app_gateways-v1+FILLER": "0.0.0", "google-cloud-beyond_corp-client_gateways-v1": "0.8.0", "google-cloud-beyond_corp-client_gateways-v1+FILLER": "0.0.0", - "google-cloud-bigquery": "1.53.0", + "google-cloud-bigquery": "1.54.0", "google-cloud-bigquery+FILLER": "0.0.0", "google-cloud-bigquery-analytics_hub": "1.3.1", "google-cloud-bigquery-analytics_hub+FILLER": "0.0.0", diff --git a/google-cloud-bigquery/CHANGELOG.md b/google-cloud-bigquery/CHANGELOG.md index 0942eac85461..e52cc4ca3560 100644 --- a/google-cloud-bigquery/CHANGELOG.md +++ b/google-cloud-bigquery/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +### 1.54.0 (2025-08-15) + +#### Features + +* Add support for format_options_use_int64_timestamp ([#30755](https://github.com/googleapis/google-cloud-ruby/issues/30755)) +* load job external table options ([#30743](https://github.com/googleapis/google-cloud-ruby/issues/30743)) + ### 1.53.0 (2025-08-12) #### Features diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/version.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/version.rb index 6cbda3db6de9..4fd6c20e3123 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/version.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/version.rb @@ -16,7 +16,7 @@ module Google module Cloud module Bigquery - VERSION = "1.53.0".freeze + VERSION = "1.54.0".freeze end end end From 497d2c2a952b3b2e4c41b5ae0a69fab84b0a1e58 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:00:40 -0700 Subject: [PATCH 436/457] feat: Initial generation of google-cloud-config_delivery (#30865) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + google-cloud-config_delivery/.OwlBot.yaml | 3 + google-cloud-config_delivery/.gitignore | 22 ++ .../.owlbot-manifest.json | 25 +++ .../.repo-metadata.json | 13 ++ google-cloud-config_delivery/.rubocop.yml | 39 ++++ google-cloud-config_delivery/.toys.rb | 28 +++ google-cloud-config_delivery/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++++++++++ google-cloud-config_delivery/CHANGELOG.md | 2 + google-cloud-config_delivery/Gemfile | 28 +++ google-cloud-config_delivery/LICENSE.md | 201 ++++++++++++++++++ google-cloud-config_delivery/README.md | 130 +++++++++++ google-cloud-config_delivery/Rakefile | 169 +++++++++++++++ .../google-cloud-config_delivery.gemspec | 27 +++ .../lib/google-cloud-config_delivery.rb | 19 ++ .../lib/google/cloud/config_delivery.rb | 148 +++++++++++++ .../google/cloud/config_delivery/version.rb | 26 +++ .../cloud/config_delivery/client_test.rb | 53 +++++ .../cloud/config_delivery/version_test.rb | 26 +++ google-cloud-config_delivery/test/helper.rb | 25 +++ release-please-config.json | 4 + 22 files changed, 1123 insertions(+) create mode 100644 google-cloud-config_delivery/.OwlBot.yaml create mode 100644 google-cloud-config_delivery/.gitignore create mode 100644 google-cloud-config_delivery/.owlbot-manifest.json create mode 100644 google-cloud-config_delivery/.repo-metadata.json create mode 100644 google-cloud-config_delivery/.rubocop.yml create mode 100644 google-cloud-config_delivery/.toys.rb create mode 100644 google-cloud-config_delivery/.yardopts create mode 100644 google-cloud-config_delivery/AUTHENTICATION.md create mode 100644 google-cloud-config_delivery/CHANGELOG.md create mode 100644 google-cloud-config_delivery/Gemfile create mode 100644 google-cloud-config_delivery/LICENSE.md create mode 100644 google-cloud-config_delivery/README.md create mode 100644 google-cloud-config_delivery/Rakefile create mode 100644 google-cloud-config_delivery/google-cloud-config_delivery.gemspec create mode 100644 google-cloud-config_delivery/lib/google-cloud-config_delivery.rb create mode 100644 google-cloud-config_delivery/lib/google/cloud/config_delivery.rb create mode 100644 google-cloud-config_delivery/lib/google/cloud/config_delivery/version.rb create mode 100644 google-cloud-config_delivery/test/google/cloud/config_delivery/client_test.rb create mode 100644 google-cloud-config_delivery/test/google/cloud/config_delivery/version_test.rb create mode 100644 google-cloud-config_delivery/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c22fe3131b8e..98d6fcf446ad 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -231,6 +231,8 @@ "google-cloud-confidential_computing+FILLER": "0.0.0", "google-cloud-confidential_computing-v1": "1.6.1", "google-cloud-confidential_computing-v1+FILLER": "0.0.0", + "google-cloud-config_delivery": "0.0.1", + "google-cloud-config_delivery+FILLER": "0.0.0", "google-cloud-config_delivery-v1": "0.1.0", "google-cloud-config_delivery-v1+FILLER": "0.0.0", "google-cloud-config_service": "2.0.1", diff --git a/google-cloud-config_delivery/.OwlBot.yaml b/google-cloud-config_delivery/.OwlBot.yaml new file mode 100644 index 000000000000..90946ccb3100 --- /dev/null +++ b/google-cloud-config_delivery/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/cloud/configdelivery/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-cloud-config_delivery/$1 diff --git a/google-cloud-config_delivery/.gitignore b/google-cloud-config_delivery/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-cloud-config_delivery/.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/google-cloud-config_delivery/.owlbot-manifest.json b/google-cloud-config_delivery/.owlbot-manifest.json new file mode 100644 index 000000000000..c9c06dc96283 --- /dev/null +++ b/google-cloud-config_delivery/.owlbot-manifest.json @@ -0,0 +1,25 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "google-cloud-config_delivery.gemspec", + "lib/google-cloud-config_delivery.rb", + "lib/google/cloud/config_delivery.rb", + "lib/google/cloud/config_delivery/version.rb", + "test/google/cloud/config_delivery/client_test.rb", + "test/google/cloud/config_delivery/version_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-cloud-config_delivery/.repo-metadata.json b/google-cloud-config_delivery/.repo-metadata.json new file mode 100644 index 000000000000..98d090aae198 --- /dev/null +++ b/google-cloud-config_delivery/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "api_shortname": "unknown", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-config_delivery/latest", + "distribution_name": "google-cloud-config_delivery", + "is_cloud": true, + "language": "ruby", + "name_pretty": "Google Cloud ConfigDelivery API", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-config_delivery is the official client library for the Google Cloud ConfigDelivery API.", + "library_type": "GAPIC_MANUAL" +} diff --git a/google-cloud-config_delivery/.rubocop.yml b/google-cloud-config_delivery/.rubocop.yml new file mode 100644 index 000000000000..c1bd8b8aa9be --- /dev/null +++ b/google-cloud-config_delivery/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-config_delivery.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-config_delivery.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/google-cloud-config_delivery/.toys.rb b/google-cloud-config_delivery/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-cloud-config_delivery/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-config_delivery/.yardopts b/google-cloud-config_delivery/.yardopts new file mode 100644 index 000000000000..46852b48e529 --- /dev/null +++ b/google-cloud-config_delivery/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Google Cloud ConfigDelivery API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/google-cloud-config_delivery/AUTHENTICATION.md b/google-cloud-config_delivery/AUTHENTICATION.md new file mode 100644 index 000000000000..9b05d6a7892d --- /dev/null +++ b/google-cloud-config_delivery/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-config_delivery 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-config_delivery 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/config_delivery" + +client = Google::Cloud::ConfigDelivery.config_delivery do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/config_delivery" + +Google::Cloud::ConfigDelivery.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::ConfigDelivery.config_delivery +``` + +### 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-config_delivery +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/config_delivery" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::ConfigDelivery.config_delivery +``` + +### 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/google-cloud-config_delivery/CHANGELOG.md b/google-cloud-config_delivery/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-cloud-config_delivery/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-cloud-config_delivery/Gemfile b/google-cloud-config_delivery/Gemfile new file mode 100644 index 000000000000..53cd33ed076c --- /dev/null +++ b/google-cloud-config_delivery/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-config_delivery-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-config_delivery.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-cloud-config_delivery/LICENSE.md b/google-cloud-config_delivery/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-cloud-config_delivery/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/google-cloud-config_delivery/README.md b/google-cloud-config_delivery/README.md new file mode 100644 index 000000000000..567a3c4501ac --- /dev/null +++ b/google-cloud-config_delivery/README.md @@ -0,0 +1,130 @@ +# Ruby Client for the Google Cloud ConfigDelivery API + +API Client library for the Google Cloud ConfigDelivery API + +google-cloud-config_delivery is the official client library for the Google Cloud ConfigDelivery API. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-config_delivery-v*`. +The gem `google-cloud-config_delivery` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-config_delivery/latest) +for this library, google-cloud-config_delivery, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-config_delivery-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-config_delivery-v1/latest). + +## Quick Start + +``` +$ gem install google-cloud-config_delivery +``` + +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. [Set up authentication.](AUTHENTICATION.md) + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-config_delivery-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-config_delivery-v1/latest). + +## 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-config_delivery`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-config_delivery-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-config_delivery`. +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-config_delivery-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-cloud-config_delivery/Rakefile b/google-cloud-config_delivery/Rakefile new file mode 100644 index 000000000000..a79c71fd28ca --- /dev/null +++ b/google-cloud-config_delivery/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 = true +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-config_delivery 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/config_delivery/v1alpha/config_delivery/credentials" + ::Google::Cloud::ConfigDelivery::V1alpha::ConfigDelivery::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-config_delivery 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-config_delivery 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-config_delivery 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-config_delivery gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-config_delivery" + header "google-cloud-config_delivery rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-config_delivery yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-config_delivery 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-config_delivery 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-config_delivery 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/google-cloud-config_delivery/google-cloud-config_delivery.gemspec b/google-cloud-config_delivery/google-cloud-config_delivery.gemspec new file mode 100644 index 000000000000..06965c8fcfc9 --- /dev/null +++ b/google-cloud-config_delivery/google-cloud-config_delivery.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/config_delivery/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-config_delivery" + gem.version = Google::Cloud::ConfigDelivery::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-config_delivery is the official client library for the Google Cloud ConfigDelivery API." + gem.summary = "API Client library for the Google Cloud ConfigDelivery API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-config_delivery-v1", ">= 0.0", "< 2.a" + gem.add_dependency "google-cloud-core", "~> 1.6" +end diff --git a/google-cloud-config_delivery/lib/google-cloud-config_delivery.rb b/google-cloud-config_delivery/lib/google-cloud-config_delivery.rb new file mode 100644 index 000000000000..62068f210f97 --- /dev/null +++ b/google-cloud-config_delivery/lib/google-cloud-config_delivery.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config_delivery" unless defined? Google::Cloud::ConfigDelivery::VERSION diff --git a/google-cloud-config_delivery/lib/google/cloud/config_delivery.rb b/google-cloud-config_delivery/lib/google/cloud/config_delivery.rb new file mode 100644 index 000000000000..2936da937523 --- /dev/null +++ b/google-cloud-config_delivery/lib/google/cloud/config_delivery.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/config_delivery/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :config_delivery do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module ConfigDelivery + ## + # Create a new client object for ConfigDelivery. + # + # By default, this returns an instance of + # [Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-config_delivery-v1/latest/Google-Cloud-ConfigDelivery-V1-ConfigDelivery-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ConfigDelivery service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the ConfigDelivery service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ConfigDelivery.config_delivery_available?}. + # + # ## About ConfigDelivery + # + # ConfigDelivery service manages the deployment of kubernetes configuration to + # a fleet of kubernetes clusters. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.config_delivery version: :v1, &block + require "google/cloud/config_delivery/#{version.to_s.downcase}" + + package_name = Google::Cloud::ConfigDelivery + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ConfigDelivery.const_get(package_name).const_get(:ConfigDelivery) + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ConfigDelivery service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ConfigDelivery.config_delivery}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ConfigDelivery service, + # or if the versioned client gem needs an update to support the ConfigDelivery service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.config_delivery_available? version: :v1 + require "google/cloud/config_delivery/#{version.to_s.downcase}" + package_name = Google::Cloud::ConfigDelivery + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ConfigDelivery.const_get package_name + return false unless service_module.const_defined? :ConfigDelivery + service_module = service_module.const_get :ConfigDelivery + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-config_delivery library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.config_delivery if block_given? + + ::Google::Cloud.configure.config_delivery + end + end + end +end + +helper_path = ::File.join __dir__, "config_delivery", "helpers.rb" +require "google/cloud/config_delivery/helpers" if ::File.file? helper_path diff --git a/google-cloud-config_delivery/lib/google/cloud/config_delivery/version.rb b/google-cloud-config_delivery/lib/google/cloud/config_delivery/version.rb new file mode 100644 index 000000000000..36e15eef2b1d --- /dev/null +++ b/google-cloud-config_delivery/lib/google/cloud/config_delivery/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ConfigDelivery + VERSION = "0.0.1" + end + end +end diff --git a/google-cloud-config_delivery/test/google/cloud/config_delivery/client_test.rb b/google-cloud-config_delivery/test/google/cloud/config_delivery/client_test.rb new file mode 100644 index 000000000000..3f04edd148ec --- /dev/null +++ b/google-cloud-config_delivery/test/google/cloud/config_delivery/client_test.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/config_delivery" +require "gapic/common" +require "gapic/grpc" + +class Google::Cloud::ConfigDelivery::ClientConstructionMinitest < 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_config_delivery_grpc + skip unless Google::Cloud::ConfigDelivery.config_delivery_available? + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ConfigDelivery.config_delivery do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Client, client + end + end +end diff --git a/google-cloud-config_delivery/test/google/cloud/config_delivery/version_test.rb b/google-cloud-config_delivery/test/google/cloud/config_delivery/version_test.rb new file mode 100644 index 000000000000..7110292ceabf --- /dev/null +++ b/google-cloud-config_delivery/test/google/cloud/config_delivery/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/config_delivery/version" + +class Google::Cloud::ConfigDelivery::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::ConfigDelivery::VERSION + end +end diff --git a/google-cloud-config_delivery/test/helper.rb b/google-cloud-config_delivery/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-cloud-config_delivery/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index fd447e1dc7a9..ccc03eee3493 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -475,6 +475,10 @@ "component": "google-cloud-confidential_computing-v1", "version_file": "lib/google/cloud/confidential_computing/v1/version.rb" }, + "google-cloud-config_delivery": { + "component": "google-cloud-config_delivery", + "version_file": "lib/google/cloud/config_delivery/version.rb" + }, "google-cloud-config_delivery-v1": { "component": "google-cloud-config_delivery-v1", "version_file": "lib/google/cloud/config_delivery/v1/version.rb" From 69255ddc76ed6f3254380e9e0e8484b2d2b4cdbc Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:01:43 -0700 Subject: [PATCH 437/457] feat: Initial generation of google-cloud-managed_kafka-schema_registry (#30866) Co-authored-by: Yoshi Automation Bot --- .release-please-manifest.json | 2 + .../.OwlBot.yaml | 3 + .../.gitignore | 22 ++ .../.owlbot-manifest.json | 25 +++ .../.repo-metadata.json | 17 ++ .../.rubocop.yml | 39 ++++ .../.toys.rb | 28 +++ .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++++++++++ .../CHANGELOG.md | 2 + .../Gemfile | 28 +++ .../LICENSE.md | 201 +++++++++++++++++ .../README.md | 133 +++++++++++ .../Rakefile | 169 ++++++++++++++ ...loud-managed_kafka-schema_registry.gemspec | 27 +++ ...gle-cloud-managed_kafka-schema_registry.rb | 19 ++ .../cloud/managed_kafka/schema_registry.rb | 206 ++++++++++++++++++ .../managed_kafka/schema_registry/version.rb | 28 +++ .../schema_registry/client_test.rb | 64 ++++++ .../schema_registry/version_test.rb | 26 +++ .../test/helper.rb | 25 +++ release-please-config.json | 4 + 22 files changed, 1201 insertions(+) create mode 100644 google-cloud-managed_kafka-schema_registry/.OwlBot.yaml create mode 100644 google-cloud-managed_kafka-schema_registry/.gitignore create mode 100644 google-cloud-managed_kafka-schema_registry/.owlbot-manifest.json create mode 100644 google-cloud-managed_kafka-schema_registry/.repo-metadata.json create mode 100644 google-cloud-managed_kafka-schema_registry/.rubocop.yml create mode 100644 google-cloud-managed_kafka-schema_registry/.toys.rb create mode 100644 google-cloud-managed_kafka-schema_registry/.yardopts create mode 100644 google-cloud-managed_kafka-schema_registry/AUTHENTICATION.md create mode 100644 google-cloud-managed_kafka-schema_registry/CHANGELOG.md create mode 100644 google-cloud-managed_kafka-schema_registry/Gemfile create mode 100644 google-cloud-managed_kafka-schema_registry/LICENSE.md create mode 100644 google-cloud-managed_kafka-schema_registry/README.md create mode 100644 google-cloud-managed_kafka-schema_registry/Rakefile create mode 100644 google-cloud-managed_kafka-schema_registry/google-cloud-managed_kafka-schema_registry.gemspec create mode 100644 google-cloud-managed_kafka-schema_registry/lib/google-cloud-managed_kafka-schema_registry.rb create mode 100644 google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry.rb create mode 100644 google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry/version.rb create mode 100644 google-cloud-managed_kafka-schema_registry/test/google/cloud/managed_kafka/schema_registry/client_test.rb create mode 100644 google-cloud-managed_kafka-schema_registry/test/google/cloud/managed_kafka/schema_registry/version_test.rb create mode 100644 google-cloud-managed_kafka-schema_registry/test/helper.rb diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 98d6fcf446ad..c6d04efb8cfa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -481,6 +481,8 @@ "google-cloud-managed_identities-v1+FILLER": "0.0.0", "google-cloud-managed_kafka": "2.1.1", "google-cloud-managed_kafka+FILLER": "0.0.0", + "google-cloud-managed_kafka-schema_registry": "0.0.1", + "google-cloud-managed_kafka-schema_registry+FILLER": "0.0.0", "google-cloud-managed_kafka-schema_registry-v1": "0.1.0", "google-cloud-managed_kafka-schema_registry-v1+FILLER": "0.0.0", "google-cloud-managed_kafka-v1": "1.4.0", diff --git a/google-cloud-managed_kafka-schema_registry/.OwlBot.yaml b/google-cloud-managed_kafka-schema_registry/.OwlBot.yaml new file mode 100644 index 000000000000..0e38d4e6479e --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/.OwlBot.yaml @@ -0,0 +1,3 @@ +deep-copy-regex: + - source: /google/cloud/managedkafka/schemaregistry/[^/]+-ruby/(.*) + dest: /owl-bot-staging/google-cloud-managed_kafka-schema_registry/$1 diff --git a/google-cloud-managed_kafka-schema_registry/.gitignore b/google-cloud-managed_kafka-schema_registry/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/.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/google-cloud-managed_kafka-schema_registry/.owlbot-manifest.json b/google-cloud-managed_kafka-schema_registry/.owlbot-manifest.json new file mode 100644 index 000000000000..b076e106452e --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/.owlbot-manifest.json @@ -0,0 +1,25 @@ +{ + "generated": [ + ".gitignore", + ".repo-metadata.json", + ".rubocop.yml", + ".toys.rb", + ".yardopts", + "AUTHENTICATION.md", + "CHANGELOG.md", + "Gemfile", + "LICENSE.md", + "README.md", + "Rakefile", + "google-cloud-managed_kafka-schema_registry.gemspec", + "lib/google-cloud-managed_kafka-schema_registry.rb", + "lib/google/cloud/managed_kafka/schema_registry.rb", + "lib/google/cloud/managed_kafka/schema_registry/version.rb", + "test/google/cloud/managed_kafka/schema_registry/client_test.rb", + "test/google/cloud/managed_kafka/schema_registry/version_test.rb", + "test/helper.rb" + ], + "static": [ + ".OwlBot.yaml" + ] +} diff --git a/google-cloud-managed_kafka-schema_registry/.repo-metadata.json b/google-cloud-managed_kafka-schema_registry/.repo-metadata.json new file mode 100644 index 000000000000..8871039b7407 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "managedkafka.googleapis.com", + "api_shortname": "managedkafka", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-managed_kafka-schema_registry/latest", + "distribution_name": "google-cloud-managed_kafka-schema_registry", + "is_cloud": true, + "language": "ruby", + "name": "managedkafka", + "name_pretty": "Managed Service for Apache Kafka API", + "product_documentation": "https://cloud.google.com/managed-service-for-apache-kafka/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Manage Apache Kafka clusters and resources.", + "ruby-cloud-product-url": "https://cloud.google.com/managed-service-for-apache-kafka/docs", + "library_type": "GAPIC_MANUAL" +} diff --git a/google-cloud-managed_kafka-schema_registry/.rubocop.yml b/google-cloud-managed_kafka-schema_registry/.rubocop.yml new file mode 100644 index 000000000000..6d1b92c2fc62 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-managed_kafka-schema_registry.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-managed_kafka-schema_registry.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/google-cloud-managed_kafka-schema_registry/.toys.rb b/google-cloud-managed_kafka-schema_registry/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/google-cloud-managed_kafka-schema_registry/.yardopts b/google-cloud-managed_kafka-schema_registry/.yardopts new file mode 100644 index 000000000000..e4ab77b24836 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Managed Service for Apache Kafka API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/google-cloud-managed_kafka-schema_registry/AUTHENTICATION.md b/google-cloud-managed_kafka-schema_registry/AUTHENTICATION.md new file mode 100644 index 000000000000..017ea794fd7c --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-managed_kafka-schema_registry 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-managed_kafka-schema_registry 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/managed_kafka/schema_registry" + +client = Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/managed_kafka/schema_registry" + +Google::Cloud::ManagedKafka::SchemaRegistry.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry +``` + +### 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-managed_kafka-schema_registry +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/managed_kafka/schema_registry" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry +``` + +### 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/google-cloud-managed_kafka-schema_registry/CHANGELOG.md b/google-cloud-managed_kafka-schema_registry/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/google-cloud-managed_kafka-schema_registry/Gemfile b/google-cloud-managed_kafka-schema_registry/Gemfile new file mode 100644 index 000000000000..52ee3e5c0202 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-managed_kafka-schema_registry-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-managed_kafka-schema_registry.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/google-cloud-managed_kafka-schema_registry/LICENSE.md b/google-cloud-managed_kafka-schema_registry/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/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/google-cloud-managed_kafka-schema_registry/README.md b/google-cloud-managed_kafka-schema_registry/README.md new file mode 100644 index 000000000000..cd96518872ab --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/README.md @@ -0,0 +1,133 @@ +# Ruby Client for the Managed Service for Apache Kafka API + +Manage Apache Kafka clusters and resources. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-managed_kafka-schema_registry-v*`. +The gem `google-cloud-managed_kafka-schema_registry` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-managed_kafka-schema_registry/latest) +for this library, google-cloud-managed_kafka-schema_registry, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-managed_kafka-schema_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-managed_kafka-schema_registry-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/managed-service-for-apache-kafka/docs) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-managed_kafka-schema_registry +``` + +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/managedkafka.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-managed_kafka-schema_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-managed_kafka-schema_registry-v1/latest). + +## 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-managed_kafka-schema_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-managed_kafka-schema_registry-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-managed_kafka-schema_registry`. +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-managed_kafka-schema_registry-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/google-cloud-managed_kafka-schema_registry/Rakefile b/google-cloud-managed_kafka-schema_registry/Rakefile new file mode 100644 index 000000000000..dc2e6b70fcd6 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 = true +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-managed_kafka-schema_registry 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/managed_kafka/schema_registry/v1/managed_schema_registry/credentials" + ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::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-managed_kafka-schema_registry 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-managed_kafka-schema_registry 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-managed_kafka-schema_registry 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-managed_kafka-schema_registry gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-managed_kafka-schema_registry" + header "google-cloud-managed_kafka-schema_registry rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-managed_kafka-schema_registry yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-managed_kafka-schema_registry 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-managed_kafka-schema_registry 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-managed_kafka-schema_registry 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/google-cloud-managed_kafka-schema_registry/google-cloud-managed_kafka-schema_registry.gemspec b/google-cloud-managed_kafka-schema_registry/google-cloud-managed_kafka-schema_registry.gemspec new file mode 100644 index 000000000000..89bd7095f886 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/google-cloud-managed_kafka-schema_registry.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/managed_kafka/schema_registry/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-managed_kafka-schema_registry" + gem.version = Google::Cloud::ManagedKafka::SchemaRegistry::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Manage Apache Kafka clusters and resources." + gem.summary = "Manage Apache Kafka clusters and resources." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-managed_kafka-schema_registry-v1", ">= 0.0", "< 2.a" +end diff --git a/google-cloud-managed_kafka-schema_registry/lib/google-cloud-managed_kafka-schema_registry.rb b/google-cloud-managed_kafka-schema_registry/lib/google-cloud-managed_kafka-schema_registry.rb new file mode 100644 index 000000000000..0d616d52672d --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/lib/google-cloud-managed_kafka-schema_registry.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/managed_kafka/schema_registry" unless defined? Google::Cloud::ManagedKafka::SchemaRegistry::VERSION diff --git a/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry.rb b/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry.rb new file mode 100644 index 000000000000..83df98597b66 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/managed_kafka/schema_registry/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :managed_kafka_schema_registry do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module ManagedKafka + module SchemaRegistry + ## + # Create a new client object for ManagedSchemaRegistry. + # + # By default, this returns an instance of + # [Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-managed_kafka-schema_registry-v1/latest/Google-Cloud-ManagedKafka-SchemaRegistry-V1-ManagedSchemaRegistry-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ManagedSchemaRegistry service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ManagedSchemaRegistry service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry_available?}. + # + # ## About ManagedSchemaRegistry + # + # SchemaRegistry is a service that allows users to manage schemas for their + # Kafka clusters. It provides APIs to register, list, and delete schemas, as + # well as to get the schema for a given schema id or a given version id under a + # subject, to update the global or subject-specific compatibility mode, and to + # check the compatibility of a schema against a subject or a version. The main + # resource hierarchy is as follows: + # + # * SchemaRegistry + # * SchemaRegistry/Context + # * SchemaRegistry/Context/Schema + # * SchemaRegistry/Context/Subject + # * SchemaRegistry/Context/Subject/Version + # * SchemaRegistry/Config + # * SchemaRegistry/Mode + # + # **SchemaRegistry** is the root resource to represent a schema registry + # instance. A customer can have multiple schema registry instances in a + # project. + # + # **Context** is a context resource that represents a group of + # schemas, subjects and versions. A schema registry instance can have multiple + # contexts and always has a 'default' context. Contexts are independent of each + # other. Context is optional and if not specified, it falls back to the + # 'default' context. + # + # **Schema** is a schema resource that represents a unique schema in a context + # of a schema registry instance. Each schema has a unique schema id, and can be + # referenced by a version of a subject. + # + # **Subject** refers to the name under which the schema is registered. A + # typical subject is the Kafka topic name. A schema registry instance can have + # multiple subjects. + # + # **Version** represents a version of a subject. A subject can have multiple + # versions. Creation of new version of a subject is guarded by the + # compatibility mode configured globally or for the subject specifically. + # + # **Config** represents a config at global level cross all registry + # instances or at subject level. Currently, only compatibility is supported in + # config. + # + # **Mode** represents the mode of a schema registry or a specific subject. + # Three modes are supported: + # * READONLY: The schema registry is in read-only mode, no write operations + # allowed.. + # * READWRITE: The schema registry is in read-write mode, which allows limited + # write operations on the schema. + # * IMPORT: The schema registry is in import mode, which allows more editing + # operations on the schema for data importing purposes. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.managed_schema_registry version: :v1, transport: :grpc, &block + require "google/cloud/managed_kafka/schema_registry/#{version.to_s.downcase}" + + package_name = Google::Cloud::ManagedKafka::SchemaRegistry + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ManagedKafka::SchemaRegistry.const_get(package_name).const_get(:ManagedSchemaRegistry) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ManagedSchemaRegistry service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ManagedSchemaRegistry service, + # or if the versioned client gem needs an update to support the ManagedSchemaRegistry service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.managed_schema_registry_available? version: :v1, transport: :grpc + require "google/cloud/managed_kafka/schema_registry/#{version.to_s.downcase}" + package_name = Google::Cloud::ManagedKafka::SchemaRegistry + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ManagedKafka::SchemaRegistry.const_get package_name + return false unless service_module.const_defined? :ManagedSchemaRegistry + service_module = service_module.const_get :ManagedSchemaRegistry + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-managed_kafka-schema_registry library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.managed_kafka_schema_registry if block_given? + + ::Google::Cloud.configure.managed_kafka_schema_registry + end + end + end + end +end + +helper_path = ::File.join __dir__, "schema_registry", "helpers.rb" +require "google/cloud/managed_kafka/schema_registry/helpers" if ::File.file? helper_path diff --git a/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry/version.rb b/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry/version.rb new file mode 100644 index 000000000000..0a0dfaac4633 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 ManagedKafka + module SchemaRegistry + VERSION = "0.0.1" + end + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry/test/google/cloud/managed_kafka/schema_registry/client_test.rb b/google-cloud-managed_kafka-schema_registry/test/google/cloud/managed_kafka/schema_registry/client_test.rb new file mode 100644 index 000000000000..5cbec45a51e9 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/test/google/cloud/managed_kafka/schema_registry/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/managed_kafka/schema_registry" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::ManagedKafka::SchemaRegistry::ClientConstructionMinitest < 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_managed_schema_registry_grpc + skip unless Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client, client + end + end + + def test_managed_schema_registry_rest + skip unless Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ManagedKafka::SchemaRegistry.managed_schema_registry transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client, client + end + end +end diff --git a/google-cloud-managed_kafka-schema_registry/test/google/cloud/managed_kafka/schema_registry/version_test.rb b/google-cloud-managed_kafka-schema_registry/test/google/cloud/managed_kafka/schema_registry/version_test.rb new file mode 100644 index 000000000000..045347189b17 --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/test/google/cloud/managed_kafka/schema_registry/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 "google/cloud/managed_kafka/schema_registry/version" + +class Google::Cloud::ManagedKafka::SchemaRegistry::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::ManagedKafka::SchemaRegistry::VERSION + end +end diff --git a/google-cloud-managed_kafka-schema_registry/test/helper.rb b/google-cloud-managed_kafka-schema_registry/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/google-cloud-managed_kafka-schema_registry/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/rg" + +require "grpc" + +require "ostruct" diff --git a/release-please-config.json b/release-please-config.json index ccc03eee3493..b274f1b574f1 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -975,6 +975,10 @@ "component": "google-cloud-managed_kafka", "version_file": "lib/google/cloud/managed_kafka/version.rb" }, + "google-cloud-managed_kafka-schema_registry": { + "component": "google-cloud-managed_kafka-schema_registry", + "version_file": "lib/google/cloud/managed_kafka/schema_registry/version.rb" + }, "google-cloud-managed_kafka-schema_registry-v1": { "component": "google-cloud-managed_kafka-schema_registry-v1", "version_file": "lib/google/cloud/managed_kafka/schema_registry/v1/version.rb" From 682f39ee305d7a6854054aa6a1af7030af57be0a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:02:29 -0700 Subject: [PATCH 438/457] chore(main): release google-cloud-bigtable-v2 1.9.0 (#30720) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-bigtable-v2 1.9.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-bigtable-v2/CHANGELOG.md | 14 ++++++++++++++ .../lib/google/cloud/bigtable/v2/version.rb | 2 +- .../snippet_metadata_google.bigtable.v2.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c6d04efb8cfa..5bf9854476bd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -167,7 +167,7 @@ "google-cloud-bigtable+FILLER": "0.0.0", "google-cloud-bigtable-admin-v2": "1.12.0", "google-cloud-bigtable-admin-v2+FILLER": "0.0.0", - "google-cloud-bigtable-v2": "1.8.0", + "google-cloud-bigtable-v2": "1.9.0", "google-cloud-bigtable-v2+FILLER": "0.0.0", "google-cloud-billing": "1.6.1", "google-cloud-billing+FILLER": "0.0.0", diff --git a/google-cloud-bigtable-v2/CHANGELOG.md b/google-cloud-bigtable-v2/CHANGELOG.md index ccc485724fb8..541260f5e99e 100644 --- a/google-cloud-bigtable-v2/CHANGELOG.md +++ b/google-cloud-bigtable-v2/CHANGELOG.md @@ -1,5 +1,19 @@ # Release History +### 1.9.0 (2025-08-18) + +#### Features + +* add Idempotency to Cloud Bigtable MutateRowsRequest API ([#30709](https://github.com/googleapis/google-cloud-ruby/issues/30709)) +* Publish Proto and Enum types to CBT data API ([#30726](https://github.com/googleapis/google-cloud-ruby/issues/30726)) +#### Bug Fixes + +* Fixed routing headers when there is an authorized view ([#30741](https://github.com/googleapis/google-cloud-ruby/issues/30741)) +#### Documentation + +* Minor comment update for field `idempotency` in message `.google.bigtable.v2.MutateRowRequest` +* Sync generated comments from the API Protos + ### 1.8.0 (2025-07-15) #### Features diff --git a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb index dace23aed05c..75572c73d4f4 100644 --- a/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb +++ b/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module Bigtable module V2 - VERSION = "1.8.0" + VERSION = "1.9.0" end end end diff --git a/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json b/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json index 76fd1b04ba07..970e284e95e3 100644 --- a/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json +++ b/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-cloud-bigtable-v2", - "version": "1.8.0", + "version": "1.9.0", "language": "RUBY", "apis": [ { From c12f6353689f2369d4668e88ac52c25be3bf1a4b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:04:40 -0700 Subject: [PATCH 439/457] feat: Added config options for derived fields and signature detection. Some annotation changes changes to mark fields explicitly output only (no changes in semantics just readability) (#30864) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added config options for derived fields and signature detection. Some annotation changes changes to mark fields explicitly output only (no changes in semantics just readability) docs: A comment for field `document_schema` in message `.google.cloud.documentai.v1.ProcessorVersion` is changed to describe as output only. docs: A comment for field `create_time` in message `.google.cloud.documentai.v1.ProcessorVersion` is changed to describe as output only. docs: A comment for field `latest_evaluation` in message `.google.cloud.documentai.v1.ProcessorVersion` is changed to describe as output only. docs: A comment for field `kms_key_name` in message `.google.cloud.documentai.v1.ProcessorVersion` is changed to describe as output only. docs: A comment for field `kms_key_version_name` in message `.google.cloud.documentai.v1.ProcessorVersion` is changed to describe as output only. docs: A comment for field `deprecation_info` in message `.google.cloud.documentai.v1.ProcessorVersion` is changed to describe as output only. docs: A comment for field `create_time` in message `.google.cloud.documentai.v1.Processor` is changed to describe as output only. PiperOrigin-RevId: 795630471 Source-Link: https://github.com/googleapis/googleapis/commit/6429996ce986ef871bcfbb5d7389ed5efebe803b Source-Link: https://github.com/googleapis/googleapis-gen/commit/b727e271c55b985927a0ac9642d9c520376e0cff Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRvY3VtZW50X2FpLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiNzI3ZTI3MWM1NWI5ODU5MjdhMGFjOTY0MmQ5YzUyMDM3NmUwY2ZmIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-cloud-document_ai-v1.gemspec | 2 +- .../cloud/document_ai/v1/bindings_override.rb | 31 ++--------------- .../google/cloud/documentai/v1/document_pb.rb | 3 +- .../cloud/documentai/v1/document_schema_pb.rb | 3 +- .../cloud/documentai/v1/evaluation_pb.rb | 3 +- .../cloud/documentai/v1/processor_pb.rb | 2 +- .../google/cloud/documentai/v1/document.rb | 34 +++++++++++++++---- .../cloud/documentai/v1/document_schema.rb | 17 ++++++++++ .../google/cloud/documentai/v1/processor.rb | 30 ++++++++-------- .../v1/document_processor_service_test.rb | 1 - 10 files changed, 70 insertions(+), 56 deletions(-) diff --git a/google-cloud-document_ai-v1/google-cloud-document_ai-v1.gemspec b/google-cloud-document_ai-v1/google-cloud-document_ai-v1.gemspec index 528575afa083..8d983a647a14 100644 --- a/google-cloud-document_ai-v1/google-cloud-document_ai-v1.gemspec +++ b/google-cloud-document_ai-v1/google-cloud-document_ai-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/bindings_override.rb b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/bindings_override.rb index 1b502648fcd5..12bd8888d579 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/bindings_override.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -85,33 +85,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.documentai.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.documentai.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/document_pb.rb b/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/document_pb.rb index e3b17ad050c6..4847a13d1a89 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/document_pb.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/document_pb.rb @@ -16,7 +16,7 @@ require 'google/type/postal_address_pb' -descriptor_data = "\n)google/cloud/documentai/v1/document.proto\x12\x1agoogle.cloud.documentai.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/documentai/v1/barcode.proto\x1a)google/cloud/documentai/v1/geometry.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/datetime.proto\x1a\x17google/type/money.proto\x1a google/type/postal_address.proto\"\x94Y\n\x08\x44ocument\x12\x12\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x12\n\x05\x64ocid\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0btext_styles\x18\x05 \x03(\x0b\x32*.google.cloud.documentai.v1.Document.StyleB\x02\x18\x01\x12\x38\n\x05pages\x18\x06 \x03(\x0b\x32).google.cloud.documentai.v1.Document.Page\x12=\n\x08\x65ntities\x18\x07 \x03(\x0b\x32+.google.cloud.documentai.v1.Document.Entity\x12M\n\x10\x65ntity_relations\x18\x08 \x03(\x0b\x32\x33.google.cloud.documentai.v1.Document.EntityRelation\x12\x45\n\x0ctext_changes\x18\x0e \x03(\x0b\x32/.google.cloud.documentai.v1.Document.TextChange\x12\x42\n\nshard_info\x18\t \x01(\x0b\x32..google.cloud.documentai.v1.Document.ShardInfo\x12!\n\x05\x65rror\x18\n \x01(\x0b\x32\x12.google.rpc.Status\x12@\n\trevisions\x18\r \x03(\x0b\x32-.google.cloud.documentai.v1.Document.Revision\x12L\n\x0f\x64ocument_layout\x18\x11 \x01(\x0b\x32\x33.google.cloud.documentai.v1.Document.DocumentLayout\x12N\n\x10\x63hunked_document\x18\x12 \x01(\x0b\x32\x34.google.cloud.documentai.v1.Document.ChunkedDocument\x1aJ\n\tShardInfo\x12\x13\n\x0bshard_index\x18\x01 \x01(\x03\x12\x13\n\x0bshard_count\x18\x02 \x01(\x03\x12\x13\n\x0btext_offset\x18\x03 \x01(\x03\x1a\xe5\x02\n\x05Style\x12\x44\n\x0btext_anchor\x18\x01 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.TextAnchor\x12!\n\x05\x63olor\x18\x02 \x01(\x0b\x32\x12.google.type.Color\x12,\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\x0b\x32\x12.google.type.Color\x12\x13\n\x0b\x66ont_weight\x18\x04 \x01(\t\x12\x12\n\ntext_style\x18\x05 \x01(\t\x12\x17\n\x0ftext_decoration\x18\x06 \x01(\t\x12\x46\n\tfont_size\x18\x07 \x01(\x0b\x32\x33.google.cloud.documentai.v1.Document.Style.FontSize\x12\x13\n\x0b\x66ont_family\x18\x08 \x01(\t\x1a&\n\x08\x46ontSize\x12\x0c\n\x04size\x18\x01 \x01(\x02\x12\x0c\n\x04unit\x18\x02 \x01(\t\x1a\xc2)\n\x04Page\x12\x13\n\x0bpage_number\x18\x01 \x01(\x05\x12>\n\x05image\x18\r \x01(\x0b\x32/.google.cloud.documentai.v1.Document.Page.Image\x12\x44\n\ntransforms\x18\x0e \x03(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Matrix\x12\x46\n\tdimension\x18\x02 \x01(\x0b\x32\x33.google.cloud.documentai.v1.Document.Page.Dimension\x12@\n\x06layout\x18\x03 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x04 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12?\n\x06\x62locks\x18\x05 \x03(\x0b\x32/.google.cloud.documentai.v1.Document.Page.Block\x12G\n\nparagraphs\x18\x06 \x03(\x0b\x32\x33.google.cloud.documentai.v1.Document.Page.Paragraph\x12=\n\x05lines\x18\x07 \x03(\x0b\x32..google.cloud.documentai.v1.Document.Page.Line\x12?\n\x06tokens\x18\x08 \x03(\x0b\x32/.google.cloud.documentai.v1.Document.Page.Token\x12P\n\x0fvisual_elements\x18\t \x03(\x0b\x32\x37.google.cloud.documentai.v1.Document.Page.VisualElement\x12?\n\x06tables\x18\n \x03(\x0b\x32/.google.cloud.documentai.v1.Document.Page.Table\x12H\n\x0b\x66orm_fields\x18\x0b \x03(\x0b\x32\x33.google.cloud.documentai.v1.Document.Page.FormField\x12\x41\n\x07symbols\x18\x0c \x03(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Symbol\x12T\n\x11\x64\x65tected_barcodes\x18\x0f \x03(\x0b\x32\x39.google.cloud.documentai.v1.Document.Page.DetectedBarcode\x12Z\n\x14image_quality_scores\x18\x11 \x01(\x0b\x32<.google.cloud.documentai.v1.Document.Page.ImageQualityScores\x12G\n\nprovenance\x18\x10 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\x38\n\tDimension\x12\r\n\x05width\x18\x01 \x01(\x02\x12\x0e\n\x06height\x18\x02 \x01(\x02\x12\x0c\n\x04unit\x18\x03 \x01(\t\x1aJ\n\x05Image\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\x1a@\n\x06Matrix\x12\x0c\n\x04rows\x18\x01 \x01(\x05\x12\x0c\n\x04\x63ols\x18\x02 \x01(\x05\x12\x0c\n\x04type\x18\x03 \x01(\x05\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x1a\xdd\x02\n\x06Layout\x12\x44\n\x0btext_anchor\x18\x01 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.TextAnchor\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12?\n\rbounding_poly\x18\x03 \x01(\x0b\x32(.google.cloud.documentai.v1.BoundingPoly\x12Q\n\x0borientation\x18\x04 \x01(\x0e\x32<.google.cloud.documentai.v1.Document.Page.Layout.Orientation\"e\n\x0bOrientation\x12\x1b\n\x17ORIENTATION_UNSPECIFIED\x10\x00\x12\x0b\n\x07PAGE_UP\x10\x01\x12\x0e\n\nPAGE_RIGHT\x10\x02\x12\r\n\tPAGE_DOWN\x10\x03\x12\r\n\tPAGE_LEFT\x10\x04\x1a\xea\x01\n\x05\x42lock\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x02 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x03 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\xee\x01\n\tParagraph\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x02 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x03 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\xe9\x01\n\x04Line\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x02 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x03 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\x9e\x07\n\x05Token\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12U\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32=.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak\x12V\n\x12\x64\x65tected_languages\x18\x03 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x04 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x12M\n\nstyle_info\x18\x05 \x01(\x0b\x32\x39.google.cloud.documentai.v1.Document.Page.Token.StyleInfo\x1a\xa6\x01\n\rDetectedBreak\x12P\n\x04type\x18\x01 \x01(\x0e\x32\x42.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nWIDE_SPACE\x10\x02\x12\n\n\x06HYPHEN\x10\x03\x1a\xe2\x02\n\tStyleInfo\x12\x11\n\tfont_size\x18\x01 \x01(\x05\x12\x17\n\x0fpixel_font_size\x18\x02 \x01(\x01\x12\x16\n\x0eletter_spacing\x18\x03 \x01(\x01\x12\x11\n\tfont_type\x18\x04 \x01(\t\x12\x0c\n\x04\x62old\x18\x05 \x01(\x08\x12\x0e\n\x06italic\x18\x06 \x01(\x08\x12\x12\n\nunderlined\x18\x07 \x01(\x08\x12\x11\n\tstrikeout\x18\x08 \x01(\x08\x12\x11\n\tsubscript\x18\t \x01(\x08\x12\x13\n\x0bsuperscript\x18\n \x01(\x08\x12\x11\n\tsmallcaps\x18\x0b \x01(\x08\x12\x13\n\x0b\x66ont_weight\x18\x0c \x01(\x05\x12\x13\n\x0bhandwritten\x18\r \x01(\x08\x12&\n\ntext_color\x18\x0e \x01(\x0b\x32\x12.google.type.Color\x12,\n\x10\x62\x61\x63kground_color\x18\x0f \x01(\x0b\x32\x12.google.type.Color\x1a\xa2\x01\n\x06Symbol\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x02 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1a\xb7\x01\n\rVisualElement\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12\x0c\n\x04type\x18\x02 \x01(\t\x12V\n\x12\x64\x65tected_languages\x18\x03 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1a\xa8\x05\n\x05Table\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12M\n\x0bheader_rows\x18\x02 \x03(\x0b\x32\x38.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12K\n\tbody_rows\x18\x03 \x03(\x0b\x32\x38.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12V\n\x12\x64\x65tected_languages\x18\x04 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x05 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1aT\n\x08TableRow\x12H\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32\x39.google.cloud.documentai.v1.Document.Page.Table.TableCell\x1a\xc9\x01\n\tTableCell\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12\x10\n\x08row_span\x18\x02 \x01(\x05\x12\x10\n\x08\x63ol_span\x18\x03 \x01(\x05\x12V\n\x12\x64\x65tected_languages\x18\x04 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1a\xe6\x03\n\tFormField\x12\x44\n\nfield_name\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12\x45\n\x0b\x66ield_value\x18\x02 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12[\n\x17name_detected_languages\x18\x03 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\\\n\x18value_detected_languages\x18\x04 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\x12\n\nvalue_type\x18\x05 \x01(\t\x12\x1a\n\x12\x63orrected_key_text\x18\x06 \x01(\t\x12\x1c\n\x14\x63orrected_value_text\x18\x07 \x01(\t\x12\x43\n\nprovenance\x18\x08 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.Provenance\x1a\x89\x01\n\x0f\x44\x65tectedBarcode\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12\x34\n\x07\x62\x61rcode\x18\x02 \x01(\x0b\x32#.google.cloud.documentai.v1.Barcode\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xc6\x01\n\x12ImageQualityScores\x12\x15\n\rquality_score\x18\x01 \x01(\x02\x12\x65\n\x10\x64\x65tected_defects\x18\x02 \x03(\x0b\x32K.google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect\x1a\x32\n\x0e\x44\x65tectedDefect\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xd0\x06\n\x06\x45ntity\x12I\n\x0btext_anchor\x18\x01 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.TextAnchorB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cmention_text\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmention_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nconfidence\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\x12I\n\x0bpage_anchor\x18\x06 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.PageAnchorB\x03\xe0\x41\x01\x12\x0f\n\x02id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12Z\n\x10normalized_value\x18\t \x01(\x0b\x32;.google.cloud.documentai.v1.Document.Entity.NormalizedValueB\x03\xe0\x41\x01\x12\x44\n\nproperties\x18\n \x03(\x0b\x32+.google.cloud.documentai.v1.Document.EntityB\x03\xe0\x41\x01\x12H\n\nprovenance\x18\x0b \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x03\xe0\x41\x01\x12\x15\n\x08redacted\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a\xbb\x02\n\x0fNormalizedValue\x12)\n\x0bmoney_value\x18\x02 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12\'\n\ndate_value\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x12/\n\x0e\x64\x61tetime_value\x18\x04 \x01(\x0b\x32\x15.google.type.DateTimeH\x00\x12\x33\n\raddress_value\x18\x05 \x01(\x0b\x32\x1a.google.type.PostalAddressH\x00\x12\x17\n\rboolean_value\x18\x06 \x01(\x08H\x00\x12\x17\n\rinteger_value\x18\x07 \x01(\x05H\x00\x12\x15\n\x0b\x66loat_value\x18\x08 \x01(\x02H\x00\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x12\n\x10structured_value\x1aI\n\x0e\x45ntityRelation\x12\x12\n\nsubject_id\x18\x01 \x01(\t\x12\x11\n\tobject_id\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x1a\xa8\x01\n\nTextAnchor\x12R\n\rtext_segments\x18\x01 \x03(\x0b\x32;.google.cloud.documentai.v1.Document.TextAnchor.TextSegment\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a\x35\n\x0bTextSegment\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x1a\xd8\x03\n\nPageAnchor\x12J\n\tpage_refs\x18\x01 \x03(\x0b\x32\x37.google.cloud.documentai.v1.Document.PageAnchor.PageRef\x1a\xfd\x02\n\x07PageRef\x12\x11\n\x04page\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\\\n\x0blayout_type\x18\x02 \x01(\x0e\x32\x42.google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutTypeB\x03\xe0\x41\x01\x12\x18\n\tlayout_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x44\n\rbounding_poly\x18\x04 \x01(\x0b\x32(.google.cloud.documentai.v1.BoundingPolyB\x03\xe0\x41\x01\x12\x17\n\nconfidence\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\"\x87\x01\n\nLayoutType\x12\x1b\n\x17LAYOUT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x42LOCK\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x08\n\x04LINE\x10\x03\x12\t\n\x05TOKEN\x10\x04\x12\x12\n\x0eVISUAL_ELEMENT\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x0e\n\nFORM_FIELD\x10\x07\x1a\xa8\x03\n\nProvenance\x12\x14\n\x08revision\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x0e\n\x02id\x18\x02 \x01(\x05\x42\x02\x18\x01\x12G\n\x07parents\x18\x03 \x03(\x0b\x32\x36.google.cloud.documentai.v1.Document.Provenance.Parent\x12K\n\x04type\x18\x04 \x01(\x0e\x32=.google.cloud.documentai.v1.Document.Provenance.OperationType\x1a\x39\n\x06Parent\x12\x10\n\x08revision\x18\x01 \x01(\x05\x12\r\n\x05index\x18\x03 \x01(\x05\x12\x0e\n\x02id\x18\x02 \x01(\x05\x42\x02\x18\x01\"\xa2\x01\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x12\n\n\x06UPDATE\x10\x07\x12\x0b\n\x07REPLACE\x10\x03\x12\x16\n\x0e\x45VAL_REQUESTED\x10\x04\x1a\x02\x08\x01\x12\x15\n\rEVAL_APPROVED\x10\x05\x1a\x02\x08\x01\x12\x14\n\x0c\x45VAL_SKIPPED\x10\x06\x1a\x02\x08\x01\x1a\xa5\x02\n\x08Revision\x12\x0f\n\x05\x61gent\x18\x04 \x01(\tH\x00\x12\x13\n\tprocessor\x18\x05 \x01(\tH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\x06parent\x18\x02 \x03(\x05\x42\x02\x18\x01\x12\x12\n\nparent_ids\x18\x07 \x03(\t\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12O\n\x0chuman_review\x18\x06 \x01(\x0b\x32\x39.google.cloud.documentai.v1.Document.Revision.HumanReview\x1a\x33\n\x0bHumanReview\x12\r\n\x05state\x18\x01 \x01(\t\x12\x15\n\rstate_message\x18\x02 \x01(\tB\x08\n\x06source\x1a\xb1\x01\n\nTextChange\x12\x44\n\x0btext_anchor\x18\x01 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.TextAnchor\x12\x14\n\x0c\x63hanged_text\x18\x02 \x01(\t\x12G\n\nprovenance\x18\x03 \x03(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\xdd\x0c\n\x0e\x44ocumentLayout\x12W\n\x06\x62locks\x18\x01 \x03(\x0b\x32G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1a\xf1\x0b\n\x13\x44ocumentLayoutBlock\x12m\n\ntext_block\x18\x02 \x01(\x0b\x32W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlockH\x00\x12o\n\x0btable_block\x18\x03 \x01(\x0b\x32X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlockH\x00\x12m\n\nlist_block\x18\x04 \x01(\x0b\x32W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlockH\x00\x12\x10\n\x08\x62lock_id\x18\x01 \x01(\t\x12i\n\tpage_span\x18\x05 \x01(\x0b\x32V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan\x12>\n\x0c\x62ounding_box\x18\x06 \x01(\x0b\x32(.google.cloud.documentai.v1.BoundingPoly\x1a\x36\n\x0eLayoutPageSpan\x12\x12\n\npage_start\x18\x01 \x01(\x05\x12\x10\n\x08page_end\x18\x02 \x01(\x05\x1a\x86\x01\n\x0fLayoutTextBlock\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12W\n\x06\x62locks\x18\x03 \x03(\x0b\x32G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1a\xfb\x01\n\x10LayoutTableBlock\x12k\n\x0bheader_rows\x18\x01 \x03(\x0b\x32V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12i\n\tbody_rows\x18\x02 \x03(\x0b\x32V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12\x0f\n\x07\x63\x61ption\x18\x03 \x01(\t\x1ax\n\x0eLayoutTableRow\x12\x66\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell\x1a\x8e\x01\n\x0fLayoutTableCell\x12W\n\x06\x62locks\x18\x01 \x03(\x0b\x32G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12\x10\n\x08row_span\x18\x02 \x01(\x05\x12\x10\n\x08\x63ol_span\x18\x03 \x01(\x05\x1a\x8e\x01\n\x0fLayoutListBlock\x12m\n\x0clist_entries\x18\x01 \x03(\x0b\x32W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry\x12\x0c\n\x04type\x18\x02 \x01(\t\x1aj\n\x0fLayoutListEntry\x12W\n\x06\x62locks\x18\x01 \x03(\x0b\x32G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockB\x07\n\x05\x62lock\x1a\xf8\x05\n\x0f\x43hunkedDocument\x12J\n\x06\x63hunks\x18\x01 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk\x1a\x98\x05\n\x05\x43hunk\x12\x10\n\x08\x63hunk_id\x18\x01 \x01(\t\x12\x18\n\x10source_block_ids\x18\x02 \x03(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12[\n\tpage_span\x18\x04 \x01(\x0b\x32H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x12`\n\x0cpage_headers\x18\x05 \x03(\x0b\x32J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader\x12`\n\x0cpage_footers\x18\x06 \x03(\x0b\x32J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter\x1a\x35\n\rChunkPageSpan\x12\x12\n\npage_start\x18\x01 \x01(\x05\x12\x10\n\x08page_end\x18\x02 \x01(\x05\x1a|\n\x0f\x43hunkPageHeader\x12\x0c\n\x04text\x18\x01 \x01(\t\x12[\n\tpage_span\x18\x02 \x01(\x0b\x32H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1a|\n\x0f\x43hunkPageFooter\x12\x0c\n\x04text\x18\x01 \x01(\t\x12[\n\tpage_span\x18\x02 \x01(\x0b\x32H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanB\x08\n\x06sourceB\xcb\x01\n\x1e\x63om.google.cloud.documentai.v1B\rDocumentProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3" +descriptor_data = "\n)google/cloud/documentai/v1/document.proto\x12\x1agoogle.cloud.documentai.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/documentai/v1/barcode.proto\x1a)google/cloud/documentai/v1/geometry.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/datetime.proto\x1a\x17google/type/money.proto\x1a google/type/postal_address.proto\"\xb3Z\n\x08\x44ocument\x12\x12\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x12\n\x05\x64ocid\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0btext_styles\x18\x05 \x03(\x0b\x32*.google.cloud.documentai.v1.Document.StyleB\x02\x18\x01\x12\x38\n\x05pages\x18\x06 \x03(\x0b\x32).google.cloud.documentai.v1.Document.Page\x12=\n\x08\x65ntities\x18\x07 \x03(\x0b\x32+.google.cloud.documentai.v1.Document.Entity\x12M\n\x10\x65ntity_relations\x18\x08 \x03(\x0b\x32\x33.google.cloud.documentai.v1.Document.EntityRelation\x12\x45\n\x0ctext_changes\x18\x0e \x03(\x0b\x32/.google.cloud.documentai.v1.Document.TextChange\x12\x42\n\nshard_info\x18\t \x01(\x0b\x32..google.cloud.documentai.v1.Document.ShardInfo\x12!\n\x05\x65rror\x18\n \x01(\x0b\x32\x12.google.rpc.Status\x12@\n\trevisions\x18\r \x03(\x0b\x32-.google.cloud.documentai.v1.Document.Revision\x12L\n\x0f\x64ocument_layout\x18\x11 \x01(\x0b\x32\x33.google.cloud.documentai.v1.Document.DocumentLayout\x12N\n\x10\x63hunked_document\x18\x12 \x01(\x0b\x32\x34.google.cloud.documentai.v1.Document.ChunkedDocument\x1aJ\n\tShardInfo\x12\x13\n\x0bshard_index\x18\x01 \x01(\x03\x12\x13\n\x0bshard_count\x18\x02 \x01(\x03\x12\x13\n\x0btext_offset\x18\x03 \x01(\x03\x1a\xe5\x02\n\x05Style\x12\x44\n\x0btext_anchor\x18\x01 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.TextAnchor\x12!\n\x05\x63olor\x18\x02 \x01(\x0b\x32\x12.google.type.Color\x12,\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\x0b\x32\x12.google.type.Color\x12\x13\n\x0b\x66ont_weight\x18\x04 \x01(\t\x12\x12\n\ntext_style\x18\x05 \x01(\t\x12\x17\n\x0ftext_decoration\x18\x06 \x01(\t\x12\x46\n\tfont_size\x18\x07 \x01(\x0b\x32\x33.google.cloud.documentai.v1.Document.Style.FontSize\x12\x13\n\x0b\x66ont_family\x18\x08 \x01(\t\x1a&\n\x08\x46ontSize\x12\x0c\n\x04size\x18\x01 \x01(\x02\x12\x0c\n\x04unit\x18\x02 \x01(\t\x1a\xc2)\n\x04Page\x12\x13\n\x0bpage_number\x18\x01 \x01(\x05\x12>\n\x05image\x18\r \x01(\x0b\x32/.google.cloud.documentai.v1.Document.Page.Image\x12\x44\n\ntransforms\x18\x0e \x03(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Matrix\x12\x46\n\tdimension\x18\x02 \x01(\x0b\x32\x33.google.cloud.documentai.v1.Document.Page.Dimension\x12@\n\x06layout\x18\x03 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x04 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12?\n\x06\x62locks\x18\x05 \x03(\x0b\x32/.google.cloud.documentai.v1.Document.Page.Block\x12G\n\nparagraphs\x18\x06 \x03(\x0b\x32\x33.google.cloud.documentai.v1.Document.Page.Paragraph\x12=\n\x05lines\x18\x07 \x03(\x0b\x32..google.cloud.documentai.v1.Document.Page.Line\x12?\n\x06tokens\x18\x08 \x03(\x0b\x32/.google.cloud.documentai.v1.Document.Page.Token\x12P\n\x0fvisual_elements\x18\t \x03(\x0b\x32\x37.google.cloud.documentai.v1.Document.Page.VisualElement\x12?\n\x06tables\x18\n \x03(\x0b\x32/.google.cloud.documentai.v1.Document.Page.Table\x12H\n\x0b\x66orm_fields\x18\x0b \x03(\x0b\x32\x33.google.cloud.documentai.v1.Document.Page.FormField\x12\x41\n\x07symbols\x18\x0c \x03(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Symbol\x12T\n\x11\x64\x65tected_barcodes\x18\x0f \x03(\x0b\x32\x39.google.cloud.documentai.v1.Document.Page.DetectedBarcode\x12Z\n\x14image_quality_scores\x18\x11 \x01(\x0b\x32<.google.cloud.documentai.v1.Document.Page.ImageQualityScores\x12G\n\nprovenance\x18\x10 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\x38\n\tDimension\x12\r\n\x05width\x18\x01 \x01(\x02\x12\x0e\n\x06height\x18\x02 \x01(\x02\x12\x0c\n\x04unit\x18\x03 \x01(\t\x1aJ\n\x05Image\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\x1a@\n\x06Matrix\x12\x0c\n\x04rows\x18\x01 \x01(\x05\x12\x0c\n\x04\x63ols\x18\x02 \x01(\x05\x12\x0c\n\x04type\x18\x03 \x01(\x05\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x1a\xdd\x02\n\x06Layout\x12\x44\n\x0btext_anchor\x18\x01 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.TextAnchor\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12?\n\rbounding_poly\x18\x03 \x01(\x0b\x32(.google.cloud.documentai.v1.BoundingPoly\x12Q\n\x0borientation\x18\x04 \x01(\x0e\x32<.google.cloud.documentai.v1.Document.Page.Layout.Orientation\"e\n\x0bOrientation\x12\x1b\n\x17ORIENTATION_UNSPECIFIED\x10\x00\x12\x0b\n\x07PAGE_UP\x10\x01\x12\x0e\n\nPAGE_RIGHT\x10\x02\x12\r\n\tPAGE_DOWN\x10\x03\x12\r\n\tPAGE_LEFT\x10\x04\x1a\xea\x01\n\x05\x42lock\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x02 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x03 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\xee\x01\n\tParagraph\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x02 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x03 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\xe9\x01\n\x04Line\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x02 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x03 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\x9e\x07\n\x05Token\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12U\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32=.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak\x12V\n\x12\x64\x65tected_languages\x18\x03 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x04 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x12M\n\nstyle_info\x18\x05 \x01(\x0b\x32\x39.google.cloud.documentai.v1.Document.Page.Token.StyleInfo\x1a\xa6\x01\n\rDetectedBreak\x12P\n\x04type\x18\x01 \x01(\x0e\x32\x42.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nWIDE_SPACE\x10\x02\x12\n\n\x06HYPHEN\x10\x03\x1a\xe2\x02\n\tStyleInfo\x12\x11\n\tfont_size\x18\x01 \x01(\x05\x12\x17\n\x0fpixel_font_size\x18\x02 \x01(\x01\x12\x16\n\x0eletter_spacing\x18\x03 \x01(\x01\x12\x11\n\tfont_type\x18\x04 \x01(\t\x12\x0c\n\x04\x62old\x18\x05 \x01(\x08\x12\x0e\n\x06italic\x18\x06 \x01(\x08\x12\x12\n\nunderlined\x18\x07 \x01(\x08\x12\x11\n\tstrikeout\x18\x08 \x01(\x08\x12\x11\n\tsubscript\x18\t \x01(\x08\x12\x13\n\x0bsuperscript\x18\n \x01(\x08\x12\x11\n\tsmallcaps\x18\x0b \x01(\x08\x12\x13\n\x0b\x66ont_weight\x18\x0c \x01(\x05\x12\x13\n\x0bhandwritten\x18\r \x01(\x08\x12&\n\ntext_color\x18\x0e \x01(\x0b\x32\x12.google.type.Color\x12,\n\x10\x62\x61\x63kground_color\x18\x0f \x01(\x0b\x32\x12.google.type.Color\x1a\xa2\x01\n\x06Symbol\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12V\n\x12\x64\x65tected_languages\x18\x02 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1a\xb7\x01\n\rVisualElement\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12\x0c\n\x04type\x18\x02 \x01(\t\x12V\n\x12\x64\x65tected_languages\x18\x03 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1a\xa8\x05\n\x05Table\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12M\n\x0bheader_rows\x18\x02 \x03(\x0b\x32\x38.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12K\n\tbody_rows\x18\x03 \x03(\x0b\x32\x38.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12V\n\x12\x64\x65tected_languages\x18\x04 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\n\nprovenance\x18\x05 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1aT\n\x08TableRow\x12H\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32\x39.google.cloud.documentai.v1.Document.Page.Table.TableCell\x1a\xc9\x01\n\tTableCell\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12\x10\n\x08row_span\x18\x02 \x01(\x05\x12\x10\n\x08\x63ol_span\x18\x03 \x01(\x05\x12V\n\x12\x64\x65tected_languages\x18\x04 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1a\xe6\x03\n\tFormField\x12\x44\n\nfield_name\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12\x45\n\x0b\x66ield_value\x18\x02 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12[\n\x17name_detected_languages\x18\x03 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\\\n\x18value_detected_languages\x18\x04 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\x12\n\nvalue_type\x18\x05 \x01(\t\x12\x1a\n\x12\x63orrected_key_text\x18\x06 \x01(\t\x12\x1c\n\x14\x63orrected_value_text\x18\x07 \x01(\t\x12\x43\n\nprovenance\x18\x08 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.Provenance\x1a\x89\x01\n\x0f\x44\x65tectedBarcode\x12@\n\x06layout\x18\x01 \x01(\x0b\x32\x30.google.cloud.documentai.v1.Document.Page.Layout\x12\x34\n\x07\x62\x61rcode\x18\x02 \x01(\x0b\x32#.google.cloud.documentai.v1.Barcode\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xc6\x01\n\x12ImageQualityScores\x12\x15\n\rquality_score\x18\x01 \x01(\x02\x12\x65\n\x10\x64\x65tected_defects\x18\x02 \x03(\x0b\x32K.google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect\x1a\x32\n\x0e\x44\x65tectedDefect\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xef\x07\n\x06\x45ntity\x12I\n\x0btext_anchor\x18\x01 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.TextAnchorB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cmention_text\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmention_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nconfidence\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\x12I\n\x0bpage_anchor\x18\x06 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.PageAnchorB\x03\xe0\x41\x01\x12\x0f\n\x02id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12Z\n\x10normalized_value\x18\t \x01(\x0b\x32;.google.cloud.documentai.v1.Document.Entity.NormalizedValueB\x03\xe0\x41\x01\x12\x44\n\nproperties\x18\n \x03(\x0b\x32+.google.cloud.documentai.v1.Document.EntityB\x03\xe0\x41\x01\x12H\n\nprovenance\x18\x0b \x01(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x03\xe0\x41\x01\x12\x15\n\x08redacted\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x06method\x18\x0f \x01(\x0e\x32\x32.google.cloud.documentai.v1.Document.Entity.MethodB\x03\xe0\x41\x01\x1a\xd6\x02\n\x0fNormalizedValue\x12)\n\x0bmoney_value\x18\x02 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12\'\n\ndate_value\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x12/\n\x0e\x64\x61tetime_value\x18\x04 \x01(\x0b\x32\x15.google.type.DateTimeH\x00\x12\x33\n\raddress_value\x18\x05 \x01(\x0b\x32\x1a.google.type.PostalAddressH\x00\x12\x17\n\rboolean_value\x18\x06 \x01(\x08H\x00\x12\x17\n\rinteger_value\x18\x07 \x01(\x05H\x00\x12\x15\n\x0b\x66loat_value\x18\x08 \x01(\x02H\x00\x12\x19\n\x0fsignature_value\x18\n \x01(\x08H\x00\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x12\n\x10structured_value\"9\n\x06Method\x12\x16\n\x12METHOD_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45XTRACT\x10\x01\x12\n\n\x06\x44\x45RIVE\x10\x02\x1aI\n\x0e\x45ntityRelation\x12\x12\n\nsubject_id\x18\x01 \x01(\t\x12\x11\n\tobject_id\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x1a\xa8\x01\n\nTextAnchor\x12R\n\rtext_segments\x18\x01 \x03(\x0b\x32;.google.cloud.documentai.v1.Document.TextAnchor.TextSegment\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x1a\x35\n\x0bTextSegment\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x1a\xd8\x03\n\nPageAnchor\x12J\n\tpage_refs\x18\x01 \x03(\x0b\x32\x37.google.cloud.documentai.v1.Document.PageAnchor.PageRef\x1a\xfd\x02\n\x07PageRef\x12\x11\n\x04page\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\\\n\x0blayout_type\x18\x02 \x01(\x0e\x32\x42.google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutTypeB\x03\xe0\x41\x01\x12\x18\n\tlayout_id\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x44\n\rbounding_poly\x18\x04 \x01(\x0b\x32(.google.cloud.documentai.v1.BoundingPolyB\x03\xe0\x41\x01\x12\x17\n\nconfidence\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\"\x87\x01\n\nLayoutType\x12\x1b\n\x17LAYOUT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x42LOCK\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x08\n\x04LINE\x10\x03\x12\t\n\x05TOKEN\x10\x04\x12\x12\n\x0eVISUAL_ELEMENT\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x0e\n\nFORM_FIELD\x10\x07\x1a\xa8\x03\n\nProvenance\x12\x14\n\x08revision\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x0e\n\x02id\x18\x02 \x01(\x05\x42\x02\x18\x01\x12G\n\x07parents\x18\x03 \x03(\x0b\x32\x36.google.cloud.documentai.v1.Document.Provenance.Parent\x12K\n\x04type\x18\x04 \x01(\x0e\x32=.google.cloud.documentai.v1.Document.Provenance.OperationType\x1a\x39\n\x06Parent\x12\x10\n\x08revision\x18\x01 \x01(\x05\x12\r\n\x05index\x18\x03 \x01(\x05\x12\x0e\n\x02id\x18\x02 \x01(\x05\x42\x02\x18\x01\"\xa2\x01\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x12\n\n\x06UPDATE\x10\x07\x12\x0b\n\x07REPLACE\x10\x03\x12\x16\n\x0e\x45VAL_REQUESTED\x10\x04\x1a\x02\x08\x01\x12\x15\n\rEVAL_APPROVED\x10\x05\x1a\x02\x08\x01\x12\x14\n\x0c\x45VAL_SKIPPED\x10\x06\x1a\x02\x08\x01\x1a\xa5\x02\n\x08Revision\x12\x0f\n\x05\x61gent\x18\x04 \x01(\tH\x00\x12\x13\n\tprocessor\x18\x05 \x01(\tH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\x06parent\x18\x02 \x03(\x05\x42\x02\x18\x01\x12\x12\n\nparent_ids\x18\x07 \x03(\t\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12O\n\x0chuman_review\x18\x06 \x01(\x0b\x32\x39.google.cloud.documentai.v1.Document.Revision.HumanReview\x1a\x33\n\x0bHumanReview\x12\r\n\x05state\x18\x01 \x01(\t\x12\x15\n\rstate_message\x18\x02 \x01(\tB\x08\n\x06source\x1a\xb1\x01\n\nTextChange\x12\x44\n\x0btext_anchor\x18\x01 \x01(\x0b\x32/.google.cloud.documentai.v1.Document.TextAnchor\x12\x14\n\x0c\x63hanged_text\x18\x02 \x01(\t\x12G\n\nprovenance\x18\x03 \x03(\x0b\x32/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1a\xdd\x0c\n\x0e\x44ocumentLayout\x12W\n\x06\x62locks\x18\x01 \x03(\x0b\x32G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1a\xf1\x0b\n\x13\x44ocumentLayoutBlock\x12m\n\ntext_block\x18\x02 \x01(\x0b\x32W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlockH\x00\x12o\n\x0btable_block\x18\x03 \x01(\x0b\x32X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlockH\x00\x12m\n\nlist_block\x18\x04 \x01(\x0b\x32W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlockH\x00\x12\x10\n\x08\x62lock_id\x18\x01 \x01(\t\x12i\n\tpage_span\x18\x05 \x01(\x0b\x32V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan\x12>\n\x0c\x62ounding_box\x18\x06 \x01(\x0b\x32(.google.cloud.documentai.v1.BoundingPoly\x1a\x36\n\x0eLayoutPageSpan\x12\x12\n\npage_start\x18\x01 \x01(\x05\x12\x10\n\x08page_end\x18\x02 \x01(\x05\x1a\x86\x01\n\x0fLayoutTextBlock\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12W\n\x06\x62locks\x18\x03 \x03(\x0b\x32G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1a\xfb\x01\n\x10LayoutTableBlock\x12k\n\x0bheader_rows\x18\x01 \x03(\x0b\x32V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12i\n\tbody_rows\x18\x02 \x03(\x0b\x32V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12\x0f\n\x07\x63\x61ption\x18\x03 \x01(\t\x1ax\n\x0eLayoutTableRow\x12\x66\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell\x1a\x8e\x01\n\x0fLayoutTableCell\x12W\n\x06\x62locks\x18\x01 \x03(\x0b\x32G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12\x10\n\x08row_span\x18\x02 \x01(\x05\x12\x10\n\x08\x63ol_span\x18\x03 \x01(\x05\x1a\x8e\x01\n\x0fLayoutListBlock\x12m\n\x0clist_entries\x18\x01 \x03(\x0b\x32W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry\x12\x0c\n\x04type\x18\x02 \x01(\t\x1aj\n\x0fLayoutListEntry\x12W\n\x06\x62locks\x18\x01 \x03(\x0b\x32G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockB\x07\n\x05\x62lock\x1a\xf8\x05\n\x0f\x43hunkedDocument\x12J\n\x06\x63hunks\x18\x01 \x03(\x0b\x32:.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk\x1a\x98\x05\n\x05\x43hunk\x12\x10\n\x08\x63hunk_id\x18\x01 \x01(\t\x12\x18\n\x10source_block_ids\x18\x02 \x03(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12[\n\tpage_span\x18\x04 \x01(\x0b\x32H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x12`\n\x0cpage_headers\x18\x05 \x03(\x0b\x32J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader\x12`\n\x0cpage_footers\x18\x06 \x03(\x0b\x32J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter\x1a\x35\n\rChunkPageSpan\x12\x12\n\npage_start\x18\x01 \x01(\x05\x12\x10\n\x08page_end\x18\x02 \x01(\x05\x1a|\n\x0f\x43hunkPageHeader\x12\x0c\n\x04text\x18\x01 \x01(\t\x12[\n\tpage_span\x18\x02 \x01(\x0b\x32H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1a|\n\x0f\x43hunkPageFooter\x12\x0c\n\x04text\x18\x01 \x01(\t\x12[\n\tpage_span\x18\x02 \x01(\x0b\x32H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanB\x08\n\x06sourceB\xcb\x01\n\x1e\x63om.google.cloud.documentai.v1B\rDocumentProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -84,6 +84,7 @@ module V1 Document::Page::ImageQualityScores::DetectedDefect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect").msgclass Document::Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Entity").msgclass Document::Entity::NormalizedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Entity.NormalizedValue").msgclass + Document::Entity::Method = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Entity.Method").enummodule Document::EntityRelation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.EntityRelation").msgclass Document::TextAnchor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.TextAnchor").msgclass Document::TextAnchor::TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.TextAnchor.TextSegment").msgclass diff --git a/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/document_schema_pb.rb b/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/document_schema_pb.rb index 3a5ac4ed0443..05d468871544 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/document_schema_pb.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/document_schema_pb.rb @@ -5,7 +5,7 @@ require 'google/protobuf' -descriptor_data = "\n0google/cloud/documentai/v1/document_schema.proto\x12\x1agoogle.cloud.documentai.v1\"\xbd\x07\n\x0e\x44ocumentSchema\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12K\n\x0c\x65ntity_types\x18\x03 \x03(\x0b\x32\x35.google.cloud.documentai.v1.DocumentSchema.EntityType\x12\x45\n\x08metadata\x18\x04 \x01(\x0b\x32\x33.google.cloud.documentai.v1.DocumentSchema.Metadata\x1a\xd4\x04\n\nEntityType\x12W\n\x0b\x65num_values\x18\x0e \x01(\x0b\x32@.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValuesH\x00\x12\x14\n\x0c\x64isplay_name\x18\r \x01(\t\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nbase_types\x18\x02 \x03(\t\x12R\n\nproperties\x18\x06 \x03(\x0b\x32>.google.cloud.documentai.v1.DocumentSchema.EntityType.Property\x1a\x1c\n\nEnumValues\x12\x0e\n\x06values\x18\x01 \x03(\t\x1a\xb2\x02\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x12\n\nvalue_type\x18\x02 \x01(\t\x12\x66\n\x0foccurrence_type\x18\x03 \x01(\x0e\x32M.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType\"\x85\x01\n\x0eOccurrenceType\x12\x1f\n\x1bOCCURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rOPTIONAL_ONCE\x10\x01\x12\x15\n\x11OPTIONAL_MULTIPLE\x10\x02\x12\x11\n\rREQUIRED_ONCE\x10\x03\x12\x15\n\x11REQUIRED_MULTIPLE\x10\x04\x42\x0e\n\x0cvalue_source\x1a\x94\x01\n\x08Metadata\x12\x19\n\x11\x64ocument_splitter\x18\x01 \x01(\x08\x12&\n\x1e\x64ocument_allow_multiple_labels\x18\x02 \x01(\x08\x12%\n\x1dprefixed_naming_on_properties\x18\x06 \x01(\x08\x12\x1e\n\x16skip_naming_validation\x18\x07 \x01(\x08\x42\xd6\x01\n\x1e\x63om.google.cloud.documentai.v1B\x18\x44ocumentAiDocumentSchemaP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3" +descriptor_data = "\n0google/cloud/documentai/v1/document_schema.proto\x12\x1agoogle.cloud.documentai.v1\"\xcf\x08\n\x0e\x44ocumentSchema\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12K\n\x0c\x65ntity_types\x18\x03 \x03(\x0b\x32\x35.google.cloud.documentai.v1.DocumentSchema.EntityType\x12\x45\n\x08metadata\x18\x04 \x01(\x0b\x32\x33.google.cloud.documentai.v1.DocumentSchema.Metadata\x1a\xe6\x05\n\nEntityType\x12W\n\x0b\x65num_values\x18\x0e \x01(\x0b\x32@.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValuesH\x00\x12\x14\n\x0c\x64isplay_name\x18\r \x01(\t\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nbase_types\x18\x02 \x03(\t\x12R\n\nproperties\x18\x06 \x03(\x0b\x32>.google.cloud.documentai.v1.DocumentSchema.EntityType.Property\x1a\x1c\n\nEnumValues\x12\x0e\n\x06values\x18\x01 \x03(\t\x1a\xc4\x03\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x12\n\nvalue_type\x18\x02 \x01(\t\x12\x66\n\x0foccurrence_type\x18\x03 \x01(\x0e\x32M.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType\x12U\n\x06method\x18\x08 \x01(\x0e\x32\x45.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method\"\x85\x01\n\x0eOccurrenceType\x12\x1f\n\x1bOCCURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rOPTIONAL_ONCE\x10\x01\x12\x15\n\x11OPTIONAL_MULTIPLE\x10\x02\x12\x11\n\rREQUIRED_ONCE\x10\x03\x12\x15\n\x11REQUIRED_MULTIPLE\x10\x04\"9\n\x06Method\x12\x16\n\x12METHOD_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45XTRACT\x10\x01\x12\n\n\x06\x44\x45RIVE\x10\x02\x42\x0e\n\x0cvalue_source\x1a\x94\x01\n\x08Metadata\x12\x19\n\x11\x64ocument_splitter\x18\x01 \x01(\x08\x12&\n\x1e\x64ocument_allow_multiple_labels\x18\x02 \x01(\x08\x12%\n\x1dprefixed_naming_on_properties\x18\x06 \x01(\x08\x12\x1e\n\x16skip_naming_validation\x18\x07 \x01(\x08\x42\xd6\x01\n\x1e\x63om.google.cloud.documentai.v1B\x18\x44ocumentAiDocumentSchemaP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -40,6 +40,7 @@ module V1 DocumentSchema::EntityType::EnumValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues").msgclass DocumentSchema::EntityType::Property = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.EntityType.Property").msgclass DocumentSchema::EntityType::Property::OccurrenceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType").enummodule + DocumentSchema::EntityType::Property::Method = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method").enummodule DocumentSchema::Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.Metadata").msgclass end end diff --git a/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/evaluation_pb.rb b/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/evaluation_pb.rb index 55093729c028..a644b9ea65e1 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/evaluation_pb.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/evaluation_pb.rb @@ -4,11 +4,12 @@ require 'google/protobuf' +require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n+google/cloud/documentai/v1/evaluation.proto\x12\x1agoogle.cloud.documentai.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x02\n\x13\x45valuationReference\x12\x11\n\toperation\x18\x01 \x01(\t\x12=\n\nevaluation\x18\x02 \x01(\tB)\xfa\x41&\n$documentai.googleapis.com/Evaluation\x12I\n\x11\x61ggregate_metrics\x18\x04 \x01(\x0b\x32..google.cloud.documentai.v1.Evaluation.Metrics\x12O\n\x17\x61ggregate_metrics_exact\x18\x05 \x01(\x0b\x32..google.cloud.documentai.v1.Evaluation.Metrics\"\xe5\r\n\nEvaluation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12J\n\x11\x64ocument_counters\x18\x05 \x01(\x0b\x32/.google.cloud.documentai.v1.Evaluation.Counters\x12[\n\x14\x61ll_entities_metrics\x18\x03 \x01(\x0b\x32=.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics\x12Q\n\x0e\x65ntity_metrics\x18\x04 \x03(\x0b\x32\x39.google.cloud.documentai.v1.Evaluation.EntityMetricsEntry\x12\x14\n\x0ckms_key_name\x18\x06 \x01(\t\x12\x1c\n\x14kms_key_version_name\x18\x07 \x01(\t\x1a\x8d\x01\n\x08\x43ounters\x12\x1d\n\x15input_documents_count\x18\x01 \x01(\x05\x12\x1f\n\x17invalid_documents_count\x18\x02 \x01(\x05\x12\x1e\n\x16\x66\x61iled_documents_count\x18\x03 \x01(\x05\x12!\n\x19\x65valuated_documents_count\x18\x04 \x01(\x05\x1a\xcd\x02\n\x07Metrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12#\n\x1bpredicted_occurrences_count\x18\x04 \x01(\x05\x12&\n\x1eground_truth_occurrences_count\x18\x05 \x01(\x05\x12 \n\x18predicted_document_count\x18\n \x01(\x05\x12#\n\x1bground_truth_document_count\x18\x0b \x01(\x05\x12\x1c\n\x14true_positives_count\x18\x06 \x01(\x05\x12\x1d\n\x15\x66\x61lse_positives_count\x18\x07 \x01(\x05\x12\x1d\n\x15\x66\x61lse_negatives_count\x18\x08 \x01(\x05\x12\x1d\n\x15total_documents_count\x18\t \x01(\x05\x1as\n\x16\x43onfidenceLevelMetrics\x12\x18\n\x10\x63onfidence_level\x18\x01 \x01(\x02\x12?\n\x07metrics\x18\x02 \x01(\x0b\x32..google.cloud.documentai.v1.Evaluation.Metrics\x1a\xf1\x03\n\x16MultiConfidenceMetrics\x12_\n\x18\x63onfidence_level_metrics\x18\x01 \x03(\x0b\x32=.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics\x12\x65\n\x1e\x63onfidence_level_metrics_exact\x18\x04 \x03(\x0b\x32=.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics\x12\r\n\x05\x61uprc\x18\x02 \x01(\x02\x12#\n\x1b\x65stimated_calibration_error\x18\x03 \x01(\x02\x12\x13\n\x0b\x61uprc_exact\x18\x05 \x01(\x02\x12)\n!estimated_calibration_error_exact\x18\x06 \x01(\x02\x12_\n\x0cmetrics_type\x18\x07 \x01(\x0e\x32I.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType\":\n\x0bMetricsType\x12\x1c\n\x18METRICS_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAGGREGATE\x10\x01\x1as\n\x12\x45ntityMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12L\n\x05value\x18\x02 \x01(\x0b\x32=.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics:\x02\x38\x01:\xa9\x01\xea\x41\xa5\x01\n$documentai.googleapis.com/Evaluation\x12}projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}B\xd2\x01\n\x1e\x63om.google.cloud.documentai.v1B\x14\x44ocumentAiEvaluationP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3" +descriptor_data = "\n+google/cloud/documentai/v1/evaluation.proto\x12\x1agoogle.cloud.documentai.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x02\n\x13\x45valuationReference\x12\x11\n\toperation\x18\x01 \x01(\t\x12=\n\nevaluation\x18\x02 \x01(\tB)\xfa\x41&\n$documentai.googleapis.com/Evaluation\x12I\n\x11\x61ggregate_metrics\x18\x04 \x01(\x0b\x32..google.cloud.documentai.v1.Evaluation.Metrics\x12O\n\x17\x61ggregate_metrics_exact\x18\x05 \x01(\x0b\x32..google.cloud.documentai.v1.Evaluation.Metrics\"\xe5\r\n\nEvaluation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12J\n\x11\x64ocument_counters\x18\x05 \x01(\x0b\x32/.google.cloud.documentai.v1.Evaluation.Counters\x12[\n\x14\x61ll_entities_metrics\x18\x03 \x01(\x0b\x32=.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics\x12Q\n\x0e\x65ntity_metrics\x18\x04 \x03(\x0b\x32\x39.google.cloud.documentai.v1.Evaluation.EntityMetricsEntry\x12\x14\n\x0ckms_key_name\x18\x06 \x01(\t\x12\x1c\n\x14kms_key_version_name\x18\x07 \x01(\t\x1a\x8d\x01\n\x08\x43ounters\x12\x1d\n\x15input_documents_count\x18\x01 \x01(\x05\x12\x1f\n\x17invalid_documents_count\x18\x02 \x01(\x05\x12\x1e\n\x16\x66\x61iled_documents_count\x18\x03 \x01(\x05\x12!\n\x19\x65valuated_documents_count\x18\x04 \x01(\x05\x1a\xcd\x02\n\x07Metrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12#\n\x1bpredicted_occurrences_count\x18\x04 \x01(\x05\x12&\n\x1eground_truth_occurrences_count\x18\x05 \x01(\x05\x12 \n\x18predicted_document_count\x18\n \x01(\x05\x12#\n\x1bground_truth_document_count\x18\x0b \x01(\x05\x12\x1c\n\x14true_positives_count\x18\x06 \x01(\x05\x12\x1d\n\x15\x66\x61lse_positives_count\x18\x07 \x01(\x05\x12\x1d\n\x15\x66\x61lse_negatives_count\x18\x08 \x01(\x05\x12\x1d\n\x15total_documents_count\x18\t \x01(\x05\x1as\n\x16\x43onfidenceLevelMetrics\x12\x18\n\x10\x63onfidence_level\x18\x01 \x01(\x02\x12?\n\x07metrics\x18\x02 \x01(\x0b\x32..google.cloud.documentai.v1.Evaluation.Metrics\x1a\xf1\x03\n\x16MultiConfidenceMetrics\x12_\n\x18\x63onfidence_level_metrics\x18\x01 \x03(\x0b\x32=.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics\x12\x65\n\x1e\x63onfidence_level_metrics_exact\x18\x04 \x03(\x0b\x32=.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics\x12\r\n\x05\x61uprc\x18\x02 \x01(\x02\x12#\n\x1b\x65stimated_calibration_error\x18\x03 \x01(\x02\x12\x13\n\x0b\x61uprc_exact\x18\x05 \x01(\x02\x12)\n!estimated_calibration_error_exact\x18\x06 \x01(\x02\x12_\n\x0cmetrics_type\x18\x07 \x01(\x0e\x32I.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType\":\n\x0bMetricsType\x12\x1c\n\x18METRICS_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAGGREGATE\x10\x01\x1as\n\x12\x45ntityMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12L\n\x05value\x18\x02 \x01(\x0b\x32=.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics:\x02\x38\x01:\xa9\x01\xea\x41\xa5\x01\n$documentai.googleapis.com/Evaluation\x12}projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}B\xd2\x01\n\x1e\x63om.google.cloud.documentai.v1B\x14\x44ocumentAiEvaluationP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/processor_pb.rb b/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/processor_pb.rb index a2b5d77f7447..8b682a0b17d1 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/processor_pb.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/documentai/v1/processor_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n*google/cloud/documentai/v1/processor.proto\x12\x1agoogle.cloud.documentai.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/documentai/v1/document_schema.proto\x1a+google/cloud/documentai/v1/evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8b\x0f\n\x10ProcessorVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x43\n\x0f\x64ocument_schema\x18\x0c \x01(\x0b\x32*.google.cloud.documentai.v1.DocumentSchema\x12\x46\n\x05state\x18\x06 \x01(\x0e\x32\x32.google.cloud.documentai.v1.ProcessorVersion.StateB\x03\xe0\x41\x03\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12J\n\x11latest_evaluation\x18\x08 \x01(\x0b\x32/.google.cloud.documentai.v1.EvaluationReference\x12\x14\n\x0ckms_key_name\x18\t \x01(\t\x12\x1c\n\x14kms_key_version_name\x18\n \x01(\t\x12\x1b\n\x0egoogle_managed\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12V\n\x10\x64\x65precation_info\x18\r \x01(\x0b\x32<.google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo\x12O\n\nmodel_type\x18\x0f \x01(\x0e\x32\x36.google.cloud.documentai.v1.ProcessorVersion.ModelTypeB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x11 \x01(\x08\x42\x03\xe0\x41\x03\x12[\n\x11gen_ai_model_info\x18\x12 \x01(\x0b\x32;.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfoB\x03\xe0\x41\x03\x1a\x9f\x01\n\x0f\x44\x65precationInfo\x12\x34\n\x10\x64\x65precation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12V\n\x1dreplacement_processor_version\x18\x02 \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\x1a\x88\x05\n\x0eGenAiModelInfo\x12|\n\x1c\x66oundation_gen_ai_model_info\x18\x01 \x01(\x0b\x32T.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfoH\x00\x12t\n\x18\x63ustom_gen_ai_model_info\x18\x02 \x01(\x0b\x32P.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfoH\x00\x1a[\n\x18\x46oundationGenAiModelInfo\x12\x1a\n\x12\x66inetuning_allowed\x18\x01 \x01(\x08\x12#\n\x1bmin_train_labeled_documents\x18\x02 \x01(\x05\x1a\x96\x02\n\x14\x43ustomGenAiModelInfo\x12{\n\x11\x63ustom_model_type\x18\x01 \x01(\x0e\x32`.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType\x12!\n\x19\x62\x61se_processor_version_id\x18\x02 \x01(\t\"^\n\x0f\x43ustomModelType\x12!\n\x1d\x43USTOM_MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14VERSIONED_FOUNDATION\x10\x01\x12\x0e\n\nFINE_TUNED\x10\x02\x42\x0c\n\nmodel_info\"\x93\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\r\n\tDEPLOYING\x10\x02\x12\x0e\n\nUNDEPLOYED\x10\x03\x12\x0f\n\x0bUNDEPLOYING\x10\x04\x12\x0c\n\x08\x43REATING\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07\x12\r\n\tIMPORTING\x10\x08\"Y\n\tModelType\x12\x1a\n\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15MODEL_TYPE_GENERATIVE\x10\x01\x12\x15\n\x11MODEL_TYPE_CUSTOM\x10\x02:\x96\x01\xea\x41\x92\x01\n*documentai.googleapis.com/ProcessorVersion\x12\x64projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}\"r\n\x15ProcessorVersionAlias\x12\r\n\x05\x61lias\x18\x01 \x01(\t\x12J\n\x11processor_version\x18\x02 \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\"\xc0\x05\n\tProcessor\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12?\n\x05state\x18\x04 \x01(\x0e\x32+.google.cloud.documentai.v1.Processor.StateB\x03\xe0\x41\x03\x12R\n\x19\x64\x65\x66\x61ult_processor_version\x18\t \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\x12Y\n\x19processor_version_aliases\x18\n \x03(\x0b\x32\x31.google.cloud.documentai.v1.ProcessorVersionAliasB\x03\xe0\x41\x03\x12 \n\x10process_endpoint\x18\x06 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x12\x1a\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\r \x01(\x08\x42\x03\xe0\x41\x03\"~\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\x0c\n\x08\x45NABLING\x10\x03\x12\r\n\tDISABLING\x10\x04\x12\x0c\n\x08\x43REATING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0c\n\x08\x44\x45LETING\x10\x07:h\xea\x41\x65\n#documentai.googleapis.com/Processor\x12>projects/{project}/locations/{location}/processors/{processor}B\xd1\x01\n\x1e\x63om.google.cloud.documentai.v1B\x13\x44ocumentAiProcessorP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3" +descriptor_data = "\n*google/cloud/documentai/v1/processor.proto\x12\x1agoogle.cloud.documentai.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/documentai/v1/document_schema.proto\x1a+google/cloud/documentai/v1/evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa9\x0f\n\x10ProcessorVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12H\n\x0f\x64ocument_schema\x18\x0c \x01(\x0b\x32*.google.cloud.documentai.v1.DocumentSchemaB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x06 \x01(\x0e\x32\x32.google.cloud.documentai.v1.ProcessorVersion.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x11latest_evaluation\x18\x08 \x01(\x0b\x32/.google.cloud.documentai.v1.EvaluationReferenceB\x03\xe0\x41\x03\x12\x19\n\x0ckms_key_name\x18\t \x01(\tB\x03\xe0\x41\x03\x12!\n\x14kms_key_version_name\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0egoogle_managed\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12[\n\x10\x64\x65precation_info\x18\r \x01(\x0b\x32<.google.cloud.documentai.v1.ProcessorVersion.DeprecationInfoB\x03\xe0\x41\x03\x12O\n\nmodel_type\x18\x0f \x01(\x0e\x32\x36.google.cloud.documentai.v1.ProcessorVersion.ModelTypeB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x11 \x01(\x08\x42\x03\xe0\x41\x03\x12[\n\x11gen_ai_model_info\x18\x12 \x01(\x0b\x32;.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfoB\x03\xe0\x41\x03\x1a\x9f\x01\n\x0f\x44\x65precationInfo\x12\x34\n\x10\x64\x65precation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12V\n\x1dreplacement_processor_version\x18\x02 \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\x1a\x88\x05\n\x0eGenAiModelInfo\x12|\n\x1c\x66oundation_gen_ai_model_info\x18\x01 \x01(\x0b\x32T.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfoH\x00\x12t\n\x18\x63ustom_gen_ai_model_info\x18\x02 \x01(\x0b\x32P.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfoH\x00\x1a[\n\x18\x46oundationGenAiModelInfo\x12\x1a\n\x12\x66inetuning_allowed\x18\x01 \x01(\x08\x12#\n\x1bmin_train_labeled_documents\x18\x02 \x01(\x05\x1a\x96\x02\n\x14\x43ustomGenAiModelInfo\x12{\n\x11\x63ustom_model_type\x18\x01 \x01(\x0e\x32`.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType\x12!\n\x19\x62\x61se_processor_version_id\x18\x02 \x01(\t\"^\n\x0f\x43ustomModelType\x12!\n\x1d\x43USTOM_MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14VERSIONED_FOUNDATION\x10\x01\x12\x0e\n\nFINE_TUNED\x10\x02\x42\x0c\n\nmodel_info\"\x93\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\r\n\tDEPLOYING\x10\x02\x12\x0e\n\nUNDEPLOYED\x10\x03\x12\x0f\n\x0bUNDEPLOYING\x10\x04\x12\x0c\n\x08\x43REATING\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07\x12\r\n\tIMPORTING\x10\x08\"Y\n\tModelType\x12\x1a\n\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15MODEL_TYPE_GENERATIVE\x10\x01\x12\x15\n\x11MODEL_TYPE_CUSTOM\x10\x02:\x96\x01\xea\x41\x92\x01\n*documentai.googleapis.com/ProcessorVersion\x12\x64projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}\"r\n\x15ProcessorVersionAlias\x12\r\n\x05\x61lias\x18\x01 \x01(\t\x12J\n\x11processor_version\x18\x02 \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\"\xc5\x05\n\tProcessor\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12?\n\x05state\x18\x04 \x01(\x0e\x32+.google.cloud.documentai.v1.Processor.StateB\x03\xe0\x41\x03\x12R\n\x19\x64\x65\x66\x61ult_processor_version\x18\t \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\x12Y\n\x19processor_version_aliases\x18\n \x03(\x0b\x32\x31.google.cloud.documentai.v1.ProcessorVersionAliasB\x03\xe0\x41\x03\x12 \n\x10process_endpoint\x18\x06 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x12\x1a\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\r \x01(\x08\x42\x03\xe0\x41\x03\"~\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\x0c\n\x08\x45NABLING\x10\x03\x12\r\n\tDISABLING\x10\x04\x12\x0c\n\x08\x43REATING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0c\n\x08\x44\x45LETING\x10\x07:h\xea\x41\x65\n#documentai.googleapis.com/Processor\x12>projects/{project}/locations/{location}/processors/{processor}B\xd1\x01\n\x1e\x63om.google.cloud.documentai.v1B\x13\x44ocumentAiProcessorP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/document.rb b/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/document.rb index 8bcf5f58cab8..d60491bd220c 100644 --- a/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/document.rb +++ b/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/document.rb @@ -724,6 +724,9 @@ class DetectedDefect # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. + # @!attribute [rw] method + # @return [::Google::Cloud::DocumentAI::V1::Document::Entity::Method] + # Optional. Specifies how the entity's value is obtained. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -734,41 +737,44 @@ class Entity # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # - # Note: The following fields are mutually exclusive: `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`. 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: `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`, `signature_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # - # Note: The following fields are mutually exclusive: `date_value`, `money_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`. 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: `date_value`, `money_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`, `signature_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # - # Note: The following fields are mutually exclusive: `datetime_value`, `money_value`, `date_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`. 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: `datetime_value`, `money_value`, `date_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`, `signature_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # - # Note: The following fields are mutually exclusive: `address_value`, `money_value`, `date_value`, `datetime_value`, `boolean_value`, `integer_value`, `float_value`. 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: `address_value`, `money_value`, `date_value`, `datetime_value`, `boolean_value`, `integer_value`, `float_value`, `signature_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # - # Note: The following fields are mutually exclusive: `boolean_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `integer_value`, `float_value`. 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: `boolean_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `integer_value`, `float_value`, `signature_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # - # Note: The following fields are mutually exclusive: `integer_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `float_value`. 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: `integer_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `float_value`, `signature_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] float_value # @return [::Float] # Float value. # - # Note: The following fields are mutually exclusive: `float_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`. 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: `float_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`, `signature_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] signature_value + # @return [::Boolean] + # Note: The following fields are mutually exclusive: `signature_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. @@ -786,6 +792,20 @@ class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Specifies how the entity's value is obtained. + module Method + # When the method is not specified, it should be treated as `EXTRACT`. + METHOD_UNSPECIFIED = 0 + + # The entity's value is directly extracted as-is from the document + # text. + EXTRACT = 1 + + # The entity's value is derived through inference and is not + # necessarily an exact text extraction from the document. + DERIVE = 2 + end end # Relationship between diff --git a/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/document_schema.rb b/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/document_schema.rb index 9a3c90df34e7..91bc6b8c8910 100644 --- a/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/document_schema.rb +++ b/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/document_schema.rb @@ -102,6 +102,9 @@ class EnumValues # @return [::Google::Cloud::DocumentAI::V1::DocumentSchema::EntityType::Property::OccurrenceType] # Occurrence type limits the number of instances an entity type appears # in the document. + # @!attribute [rw] method + # @return [::Google::Cloud::DocumentAI::V1::DocumentSchema::EntityType::Property::Method] + # Specifies how the entity's value is obtained. class Property include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -133,6 +136,20 @@ module OccurrenceType # The entity type will appear once or more times. REQUIRED_MULTIPLE = 4 end + + # Specifies how the entity's value is obtained from the document. + module Method + # Unspecified method. It defaults to `EXTRACT`. + METHOD_UNSPECIFIED = 0 + + # The entity's value is directly extracted as-is from the document + # text. + EXTRACT = 1 + + # The entity's value is derived through inference and is not + # necessarily an exact text extraction from the document. + DERIVE = 2 + end end end diff --git a/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/processor.rb b/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/processor.rb index 0c9c35ed2025..64d5baa531ca 100644 --- a/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/processor.rb +++ b/google-cloud-document_ai-v1/proto_docs/google/cloud/documentai/v1/processor.rb @@ -33,30 +33,32 @@ module V1 # @!attribute [rw] display_name # @return [::String] # The display name of the processor version. - # @!attribute [rw] document_schema + # @!attribute [r] document_schema # @return [::Google::Cloud::DocumentAI::V1::DocumentSchema] - # The schema of the processor version. Describes the output. + # Output only. The schema of the processor version. Describes the output. # @!attribute [r] state # @return [::Google::Cloud::DocumentAI::V1::ProcessorVersion::State] # Output only. The state of the processor version. - # @!attribute [rw] create_time + # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] - # The time the processor version was created. - # @!attribute [rw] latest_evaluation + # Output only. The time the processor version was created. + # @!attribute [r] latest_evaluation # @return [::Google::Cloud::DocumentAI::V1::EvaluationReference] - # The most recently invoked evaluation for the processor version. - # @!attribute [rw] kms_key_name + # Output only. The most recently invoked evaluation for the processor + # version. + # @!attribute [r] kms_key_name # @return [::String] - # The KMS key name used for encryption. - # @!attribute [rw] kms_key_version_name + # Output only. The KMS key name used for encryption. + # @!attribute [r] kms_key_version_name # @return [::String] - # The KMS key version with which data is encrypted. + # Output only. The KMS key version with which data is encrypted. # @!attribute [r] google_managed # @return [::Boolean] # Output only. Denotes that this `ProcessorVersion` is managed by Google. - # @!attribute [rw] deprecation_info + # @!attribute [r] deprecation_info # @return [::Google::Cloud::DocumentAI::V1::ProcessorVersion::DeprecationInfo] - # If set, information about the eventual deprecation of this version. + # Output only. If set, information about the eventual deprecation of this + # version. # @!attribute [r] model_type # @return [::Google::Cloud::DocumentAI::V1::ProcessorVersion::ModelType] # Output only. The model type of this processor version. @@ -223,9 +225,9 @@ class ProcessorVersionAlias # @return [::String] # Output only. Immutable. The http endpoint that can be called to invoke # processing. - # @!attribute [rw] create_time + # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] - # The time the processor was created. + # Output only. The time the processor was created. # @!attribute [rw] kms_key_name # @return [::String] # The [KMS key](https://cloud.google.com/security-key-management) used for diff --git a/google-cloud-document_ai-v1/test/google/cloud/document_ai/v1/document_processor_service_test.rb b/google-cloud-document_ai-v1/test/google/cloud/document_ai/v1/document_processor_service_test.rb index 64d0bcd5300f..c4673c081a0e 100644 --- a/google-cloud-document_ai-v1/test/google/cloud/document_ai/v1/document_processor_service_test.rb +++ b/google-cloud-document_ai-v1/test/google/cloud/document_ai/v1/document_processor_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/documentai/v1/document_processor_service_pb" -require "google/cloud/documentai/v1/document_processor_service_services_pb" require "google/cloud/document_ai/v1/document_processor_service" class ::Google::Cloud::DocumentAI::V1::DocumentProcessorService::ClientTest < Minitest::Test From fd9daccb5792a46703dd1153d62a337bc98b5ed9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:05:34 -0700 Subject: [PATCH 440/457] feat: Add Reservation.max_slots field to Reservation proto, indicating the total max number of slots this reservation can use up to (#30863) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add Reservation.max_slots field to Reservation proto, indicating the total max number of slots this reservation can use up to feat: Add Reservation.scaling_mode field and its corresponding enum message ScalingMode. This field should be used together with Reservation.max_slots PiperOrigin-RevId: 795606766 Source-Link: https://github.com/googleapis/googleapis/commit/6388d14fd59978c4ffd72d324a2f4feab143f487 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9fc20ac07dd1d4e1c31c5b56bc10c9fd33c55f90 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXJlc2VydmF0aW9uLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI5ZmMyMGFjMDdkZDFkNGUxYzMxYzViNTZiYzEwYzlmZDMzYzU1ZjkwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../README.md | 2 +- ...ogle-cloud-bigquery-reservation-v1.gemspec | 4 +- .../bigquery/reservation/v1/reservation_pb.rb | 3 +- .../bigquery/reservation/v1/reservation.rb | 102 ++++++++++++++++++ .../v1/reservation_service_test.rb | 1 - 5 files changed, 107 insertions(+), 5 deletions(-) diff --git a/google-cloud-bigquery-reservation-v1/README.md b/google-cloud-bigquery-reservation-v1/README.md index d905027f90af..38259ede0f03 100644 --- a/google-cloud-bigquery-reservation-v1/README.md +++ b/google-cloud-bigquery-reservation-v1/README.md @@ -1,6 +1,6 @@ # Ruby Client for the BigQuery Reservation V1 API -A service to modify your BigQuery flat-rate reservations. +A service to modify your BigQuery reservations. The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. diff --git a/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec b/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec index 7f14320383cd..72621422ff0d 100644 --- a/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec +++ b/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |gem| gem.authors = ["Google LLC"] gem.email = "googleapis-packages@google.com" gem.description = "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details." - gem.summary = "A service to modify your BigQuery flat-rate reservations." + gem.summary = "A service to modify your BigQuery reservations." gem.homepage = "https://github.com/googleapis/google-cloud-ruby" gem.license = "Apache-2.0" @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb index 92dda070b02c..53aa043d80c4 100644 --- a/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb +++ b/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb @@ -14,7 +14,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n6google/cloud/bigquery/reservation/v1/reservation.proto\x12$google.cloud.bigquery.reservation.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xad\x08\n\x0bReservation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rslot_capacity\x18\x02 \x01(\x03\x12\x19\n\x11ignore_idle_slots\x18\x04 \x01(\x08\x12N\n\tautoscale\x18\x07 \x01(\x0b\x32;.google.cloud.bigquery.reservation.v1.Reservation.Autoscale\x12\x13\n\x0b\x63oncurrency\x18\x10 \x01(\x03\x12\x36\n\rcreation_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x16multi_region_auxiliary\x18\x0e \x01(\x08\x12>\n\x07\x65\x64ition\x18\x11 \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.Edition\x12\x43\n\x10primary_location\x18\x12 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x45\n\x12secondary_location\x18\x13 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!locations.googleapis.com/Location\x12L\n\x19original_primary_location\x18\x14 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x64\n\x12replication_status\x18\x18 \x01(\x0b\x32\x43.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xe0\x41\x03\x1a:\n\tAutoscale\x12\x1a\n\rcurrent_slots\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\tmax_slots\x18\x02 \x01(\x03\x1a\xb5\x01\n\x11ReplicationStatus\x12&\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x38\n\x0flast_error_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x15last_replication_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:w\xea\x41t\n.bigqueryreservation.googleapis.com/Reservation\x12\x42projects/{project}/locations/{location}/reservations/{reservation}\"\x92\x08\n\x12\x43\x61pacityCommitment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nslot_count\x18\x02 \x01(\x03\x12U\n\x04plan\x18\x03 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xe0\x41\x03\x12>\n\x15\x63ommitment_start_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13\x63ommitment_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12/\n\x0e\x66\x61ilure_status\x18\x07 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12]\n\x0crenewal_plan\x18\x08 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan\x12\x1e\n\x16multi_region_auxiliary\x18\n \x01(\x08\x12>\n\x07\x65\x64ition\x18\x0c \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.Edition\x12\x19\n\x0cis_flat_rate\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\"\xca\x01\n\x0e\x43ommitmentPlan\x12\x1f\n\x1b\x43OMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46LEX\x10\x03\x12\x16\n\x0e\x46LEX_FLAT_RATE\x10\x07\x1a\x02\x08\x01\x12\r\n\x05TRIAL\x10\x05\x1a\x02\x08\x01\x12\x0b\n\x07MONTHLY\x10\x02\x12\x19\n\x11MONTHLY_FLAT_RATE\x10\x08\x1a\x02\x08\x01\x12\n\n\x06\x41NNUAL\x10\x04\x12\x18\n\x10\x41NNUAL_FLAT_RATE\x10\t\x1a\x02\x08\x01\x12\x0e\n\nTHREE_YEAR\x10\n\x12\x08\n\x04NONE\x10\x06\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03:\x8e\x01\xea\x41\x8a\x01\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xc2\x01\n\x18\x43reateReservationRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\n\x0ereservation_id\x18\x02 \x01(\t\x12\x46\n\x0breservation\x18\x03 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\n\x17ListReservationsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"|\n\x18ListReservationsResponse\x12G\n\x0creservations\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x15GetReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"`\n\x18\x44\x65leteReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\n\x18UpdateReservationRequest\x12\x46\n\x0breservation\x18\x01 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"b\n\x1a\x46\x61iloverReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"\x95\x02\n\x1f\x43reateCapacityCommitmentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12U\n\x13\x63\x61pacity_commitment\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\n$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1e\n\x16\x63\x61pacity_commitment_id\x18\x05 \x01(\t\"\x96\x01\n\x1eListCapacityCommitmentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x92\x01\n\x1fListCapacityCommitmentsResponse\x12V\n\x14\x63\x61pacity_commitments\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x1cGetCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\"}\n\x1f\x44\x65leteCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"\xa9\x01\n\x1fUpdateCapacityCommitmentRequest\x12U\n\x13\x63\x61pacity_commitment\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x81\x01\n\x1eSplitCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\n\nslot_count\x18\x02 \x01(\x03\"\xb4\x01\n\x1fSplitCapacityCommitmentResponse\x12G\n\x05\x66irst\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\n\x06second\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\x8e\x01\n\x1fMergeCapacityCommitmentsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x1f\n\x17\x63\x61pacity_commitment_ids\x18\x02 \x03(\t\"\xc5\x04\n\nAssignment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08\x61ssignee\x18\x04 \x01(\t\x12J\n\x08job_type\x18\x03 \x01(\x0e\x32\x38.google.cloud.bigquery.reservation.v1.Assignment.JobType\x12J\n\x05state\x18\x06 \x01(\x0e\x32\x36.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_gemini_in_bigquery\x18\n \x01(\x08\x42\x03\xe0\x41\x01\"m\n\x07JobType\x12\x18\n\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08PIPELINE\x10\x01\x12\t\n\x05QUERY\x10\x02\x12\x0f\n\x0bML_EXTERNAL\x10\x03\x12\x0e\n\nBACKGROUND\x10\x04\x12\x0e\n\nCONTINUOUS\x10\x06\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:\xa9\x01\xea\x41\xa5\x01\n-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0b\x61ssignments2\nassignment\"\xbd\x01\n\x17\x43reateAssignmentRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x44\n\nassignment\x18\x02 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\n\rassignment_id\x18\x04 \x01(\t\"\x86\x01\n\x16ListAssignmentsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17\x44\x65leteAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\"\x8b\x01\n\x18SearchAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8e\x01\n\x1bSearchAllAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"{\n\x19SearchAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"~\n\x1cSearchAllAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbf\x01\n\x15MoveAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\x12J\n\x0e\x64\x65stination_id\x18\x03 \x01(\tB2\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\n\rassignment_id\x18\x05 \x01(\t\"\x90\x01\n\x17UpdateAssignmentRequest\x12\x44\n\nassignment\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"J\n\x0eTableReference\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x12\n\ndataset_id\x18\x02 \x01(\t\x12\x10\n\x08table_id\x18\x03 \x01(\t\"\x9f\x02\n\rBiReservation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0c\n\x04size\x18\x04 \x01(\x03\x12N\n\x10preferred_tables\x18\x05 \x03(\x0b\x32\x34.google.cloud.bigquery.reservation.v1.TableReference:l\xea\x41i\n0bigqueryreservation.googleapis.com/BiReservation\x12\x35projects/{project}/locations/{location}/biReservation\"a\n\x17GetBiReservationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0bigqueryreservation.googleapis.com/BiReservation\"\x9a\x01\n\x1aUpdateBiReservationRequest\x12K\n\x0e\x62i_reservation\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.reservation.v1.BiReservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*U\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x03\x32\x9f)\n\x12ReservationService\x12\xf1\x01\n\x11\x43reateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"i\xda\x41!parent,reservation,reservation_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0breservation\x12\xd4\x01\n\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1a>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/reservations\x12\xc1\x01\n\x0eGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/reservations/*}\x12\xac\x01\n\x11\x44\x65leteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xf3\x01\n\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"k\xda\x41\x17reservation,update_mask\x82\xd3\xe4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\nassignment\x12\xdf\x01\n\x0fListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1a=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xb8\x01\n\x10\x44\x65leteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xe5\x01\n\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1a?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xee\x01\n\x14SearchAllAssignments\x12\x41.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1a\x42.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xe5\x01\n\x0eMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"d\xda\x41\x13name,destination_id\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xfb\x01\n\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"v\xda\x41\x16\x61ssignment,update_mask\x82\xd3\xe4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\nassignment\x12\xc6\x01\n\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\n\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\"s\xda\x41\x1a\x62i_reservation,update_mask\x82\xd3\xe4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0e\x62i_reservation\x1a\x7f\xca\x41\"bigqueryreservation.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xd8\x01\n(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xaa\x02$Google.Cloud.BigQuery.Reservation.V1\xca\x02$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" +descriptor_data = "\n6google/cloud/bigquery/reservation/v1/reservation.proto\x12$google.cloud.bigquery.reservation.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x97\n\n\x0bReservation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rslot_capacity\x18\x02 \x01(\x03\x12\x19\n\x11ignore_idle_slots\x18\x04 \x01(\x08\x12N\n\tautoscale\x18\x07 \x01(\x0b\x32;.google.cloud.bigquery.reservation.v1.Reservation.Autoscale\x12\x13\n\x0b\x63oncurrency\x18\x10 \x01(\x03\x12\x36\n\rcreation_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x16multi_region_auxiliary\x18\x0e \x01(\x08\x12>\n\x07\x65\x64ition\x18\x11 \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.Edition\x12\x43\n\x10primary_location\x18\x12 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x45\n\x12secondary_location\x18\x13 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!locations.googleapis.com/Location\x12L\n\x19original_primary_location\x18\x14 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\tmax_slots\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12X\n\x0cscaling_mode\x18\x16 \x01(\x0e\x32=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xe0\x41\x01\x12\x64\n\x12replication_status\x18\x18 \x01(\x0b\x32\x43.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xe0\x41\x03\x1a:\n\tAutoscale\x12\x1a\n\rcurrent_slots\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\tmax_slots\x18\x02 \x01(\x03\x1a\xb5\x01\n\x11ReplicationStatus\x12&\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x38\n\x0flast_error_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x15last_replication_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"c\n\x0bScalingMode\x12\x1c\n\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41UTOSCALE_ONLY\x10\x01\x12\x13\n\x0fIDLE_SLOTS_ONLY\x10\x02\x12\r\n\tALL_SLOTS\x10\x03:w\xea\x41t\n.bigqueryreservation.googleapis.com/Reservation\x12\x42projects/{project}/locations/{location}/reservations/{reservation}B\x0c\n\n_max_slots\"\x92\x08\n\x12\x43\x61pacityCommitment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nslot_count\x18\x02 \x01(\x03\x12U\n\x04plan\x18\x03 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xe0\x41\x03\x12>\n\x15\x63ommitment_start_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13\x63ommitment_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12/\n\x0e\x66\x61ilure_status\x18\x07 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12]\n\x0crenewal_plan\x18\x08 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan\x12\x1e\n\x16multi_region_auxiliary\x18\n \x01(\x08\x12>\n\x07\x65\x64ition\x18\x0c \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.Edition\x12\x19\n\x0cis_flat_rate\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\"\xca\x01\n\x0e\x43ommitmentPlan\x12\x1f\n\x1b\x43OMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46LEX\x10\x03\x12\x16\n\x0e\x46LEX_FLAT_RATE\x10\x07\x1a\x02\x08\x01\x12\r\n\x05TRIAL\x10\x05\x1a\x02\x08\x01\x12\x0b\n\x07MONTHLY\x10\x02\x12\x19\n\x11MONTHLY_FLAT_RATE\x10\x08\x1a\x02\x08\x01\x12\n\n\x06\x41NNUAL\x10\x04\x12\x18\n\x10\x41NNUAL_FLAT_RATE\x10\t\x1a\x02\x08\x01\x12\x0e\n\nTHREE_YEAR\x10\n\x12\x08\n\x04NONE\x10\x06\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03:\x8e\x01\xea\x41\x8a\x01\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xc2\x01\n\x18\x43reateReservationRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\n\x0ereservation_id\x18\x02 \x01(\t\x12\x46\n\x0breservation\x18\x03 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\n\x17ListReservationsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"|\n\x18ListReservationsResponse\x12G\n\x0creservations\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x15GetReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"`\n\x18\x44\x65leteReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\n\x18UpdateReservationRequest\x12\x46\n\x0breservation\x18\x01 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"b\n\x1a\x46\x61iloverReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"\x95\x02\n\x1f\x43reateCapacityCommitmentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12U\n\x13\x63\x61pacity_commitment\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\n$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1e\n\x16\x63\x61pacity_commitment_id\x18\x05 \x01(\t\"\x96\x01\n\x1eListCapacityCommitmentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x92\x01\n\x1fListCapacityCommitmentsResponse\x12V\n\x14\x63\x61pacity_commitments\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x1cGetCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\"}\n\x1f\x44\x65leteCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"\xa9\x01\n\x1fUpdateCapacityCommitmentRequest\x12U\n\x13\x63\x61pacity_commitment\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x81\x01\n\x1eSplitCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\n\nslot_count\x18\x02 \x01(\x03\"\xb4\x01\n\x1fSplitCapacityCommitmentResponse\x12G\n\x05\x66irst\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\n\x06second\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\x8e\x01\n\x1fMergeCapacityCommitmentsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x1f\n\x17\x63\x61pacity_commitment_ids\x18\x02 \x03(\t\"\xc5\x04\n\nAssignment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08\x61ssignee\x18\x04 \x01(\t\x12J\n\x08job_type\x18\x03 \x01(\x0e\x32\x38.google.cloud.bigquery.reservation.v1.Assignment.JobType\x12J\n\x05state\x18\x06 \x01(\x0e\x32\x36.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_gemini_in_bigquery\x18\n \x01(\x08\x42\x03\xe0\x41\x01\"m\n\x07JobType\x12\x18\n\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08PIPELINE\x10\x01\x12\t\n\x05QUERY\x10\x02\x12\x0f\n\x0bML_EXTERNAL\x10\x03\x12\x0e\n\nBACKGROUND\x10\x04\x12\x0e\n\nCONTINUOUS\x10\x06\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:\xa9\x01\xea\x41\xa5\x01\n-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0b\x61ssignments2\nassignment\"\xbd\x01\n\x17\x43reateAssignmentRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x44\n\nassignment\x18\x02 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\n\rassignment_id\x18\x04 \x01(\t\"\x86\x01\n\x16ListAssignmentsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17\x44\x65leteAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\"\x8b\x01\n\x18SearchAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8e\x01\n\x1bSearchAllAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"{\n\x19SearchAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"~\n\x1cSearchAllAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbf\x01\n\x15MoveAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\x12J\n\x0e\x64\x65stination_id\x18\x03 \x01(\tB2\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\n\rassignment_id\x18\x05 \x01(\t\"\x90\x01\n\x17UpdateAssignmentRequest\x12\x44\n\nassignment\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"J\n\x0eTableReference\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x12\n\ndataset_id\x18\x02 \x01(\t\x12\x10\n\x08table_id\x18\x03 \x01(\t\"\x9f\x02\n\rBiReservation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0c\n\x04size\x18\x04 \x01(\x03\x12N\n\x10preferred_tables\x18\x05 \x03(\x0b\x32\x34.google.cloud.bigquery.reservation.v1.TableReference:l\xea\x41i\n0bigqueryreservation.googleapis.com/BiReservation\x12\x35projects/{project}/locations/{location}/biReservation\"a\n\x17GetBiReservationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0bigqueryreservation.googleapis.com/BiReservation\"\x9a\x01\n\x1aUpdateBiReservationRequest\x12K\n\x0e\x62i_reservation\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.reservation.v1.BiReservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*U\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x03\x32\x9f)\n\x12ReservationService\x12\xf1\x01\n\x11\x43reateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"i\xda\x41!parent,reservation,reservation_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0breservation\x12\xd4\x01\n\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1a>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/reservations\x12\xc1\x01\n\x0eGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/reservations/*}\x12\xac\x01\n\x11\x44\x65leteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xf3\x01\n\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"k\xda\x41\x17reservation,update_mask\x82\xd3\xe4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\nassignment\x12\xdf\x01\n\x0fListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1a=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xb8\x01\n\x10\x44\x65leteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xe5\x01\n\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1a?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xee\x01\n\x14SearchAllAssignments\x12\x41.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1a\x42.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xe5\x01\n\x0eMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"d\xda\x41\x13name,destination_id\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xfb\x01\n\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"v\xda\x41\x16\x61ssignment,update_mask\x82\xd3\xe4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\nassignment\x12\xc6\x01\n\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\n\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\"s\xda\x41\x1a\x62i_reservation,update_mask\x82\xd3\xe4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0e\x62i_reservation\x1a\x7f\xca\x41\"bigqueryreservation.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xd8\x01\n(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xaa\x02$Google.Cloud.BigQuery.Reservation.V1\xca\x02$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -51,6 +51,7 @@ module V1 Reservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation").msgclass Reservation::Autoscale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.Autoscale").msgclass Reservation::ReplicationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus").msgclass + Reservation::ScalingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ScalingMode").enummodule CapacityCommitment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment").msgclass CapacityCommitment::CommitmentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan").enummodule CapacityCommitment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.State").enummodule diff --git a/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb index 6ebfd949c815..6cdf4ce5c536 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb +++ b/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb @@ -102,6 +102,52 @@ module V1 # Output only. The location where the reservation was originally created. # This is set only during the failover reservation's creation. All billing # charges for the failover reservation will be applied to this location. + # @!attribute [rw] max_slots + # @return [::Integer] + # Optional. The overall max slots for the reservation, covering slot_capacity + # (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. + # If present, the reservation won't use more than the specified number of + # slots, even if there is demand and supply (from idle slots). + # NOTE: capping a reservation's idle slot usage is best effort and its + # usage may exceed the max_slots value. However, in terms of + # autoscale.current_slots (which accounts for the additional added slots), it + # will never exceed the max_slots - baseline. + # + # + # This field must be set together with the scaling_mode enum value. + # + # If the max_slots and scaling_mode are set, the autoscale or + # autoscale.max_slots field must be unset. However, the + # autoscale field may still be in the output. The autopscale.max_slots will + # always show as 0 and the autoscaler.current_slots will represent the + # current slots from autoscaler excluding idle slots. + # For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, + # then in the output, the autoscaler.max_slots will be 0 and the + # autoscaler.current_slots may be any value between 0 and 1000. + # + # If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 + # and idle slots usage is 200, then in the output, the autoscaler.max_slots + # will be 0 and the autoscaler.current_slots will not be higher than 700. + # + # If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the + # output, the autoscaler field will be null. + # + # If the max_slots and scaling_mode are set, then the ignore_idle_slots field + # must be aligned with the scaling_mode enum value.(See details in + # ScalingMode comments). + # + # Please note, the max_slots is for user to manage the part of slots greater + # than the baseline. Therefore, we don't allow users to set max_slots smaller + # or equal to the baseline as it will not be meaningful. If the field is + # present and slot_capacity>=max_slots. + # + # Please note that if max_slots is set to 0, we will treat it as unset. + # Customers can set max_slots to 0 and set scaling_mode to + # SCALING_MODE_UNSPECIFIED to disable the max_slots feature. + # @!attribute [rw] scaling_mode + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ScalingMode] + # Optional. The scaling mode for the reservation. + # If the field is present but max_slots is not present. # @!attribute [r] replication_status # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ReplicationStatus] # Output only. The Disaster Recovery(DR) replication status of the @@ -151,6 +197,62 @@ class ReplicationStatus include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # The scaling mode for the reservation. This enum determines how the + # reservation scales up and down. + module ScalingMode + # Default value of ScalingMode. + SCALING_MODE_UNSPECIFIED = 0 + + # The reservation will scale up only using slots from autoscaling. It will + # not use any idle slots even if there may be some available. The upper + # limit that autoscaling can scale up to will be max_slots - baseline. + # For example, if max_slots is 1000, baseline is 200 and customer sets + # ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 + # slots and no idle slots will be used. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # true. + AUTOSCALE_ONLY = 1 + + # The reservation will scale up using only idle slots contributed by + # other reservations or from unassigned commitments. If no idle slots are + # available it will not scale up further. If the idle slots which it is + # using are reclaimed by the contributing reservation(s) it may be forced + # to scale down. The max idle slots the reservation can be max_slots - + # baseline capacity. For example, if max_slots is 1000, baseline is 200 and + # customer sets ScalingMode to IDLE_SLOTS_ONLY, + # 1. if there are 1000 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline and 800 idle + # slots. + # 2. if there are 500 idle slots available in other reservations, the + # reservation will scale up to 700 slots with 200 baseline and 300 idle + # slots. + # Please note, in this mode, the reservation might not be able to scale up + # to max_slots. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # false. + IDLE_SLOTS_ONLY = 2 + + # The reservation will scale up using all slots available to it. It will + # use idle slots contributed by other reservations or from unassigned + # commitments first. If no idle slots are available it will scale up using + # autoscaling. For example, if max_slots is 1000, baseline is 200 and + # customer sets ScalingMode to ALL_SLOTS, + # 1. if there are 800 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline and 800 idle + # slots. + # 2. if there are 500 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline, 500 idle + # slots and 300 autoscaling slots. + # 3. if there are no idle slots available in other reservations, it will + # scale up to 1000 slots with 200 baseline and 800 autoscaling slots. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # false. + ALL_SLOTS = 3 + end end # Capacity commitment is a way to purchase compute capacity for BigQuery jobs diff --git a/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb b/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb index 630de3df7530..85443b8881c6 100644 --- a/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb +++ b/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/reservation/v1/reservation_pb" -require "google/cloud/bigquery/reservation/v1/reservation_services_pb" require "google/cloud/bigquery/reservation/v1/reservation_service" class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::ClientTest < Minitest::Test From 9cb5828ee0947929476814475e952642eac714e8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:06:14 -0700 Subject: [PATCH 441/457] feat: Add option to enable nested virtualization if available (#30862) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add option to enable nested virtualization if available docs: Update comments for `machine_type` and `disk_size_gb` PiperOrigin-RevId: 795519165 Source-Link: https://github.com/googleapis/googleapis/commit/185c73c1298818a3092ae10bb9f5af1e55b93729 Source-Link: https://github.com/googleapis/googleapis-gen/commit/762fafde4610933b54854488bfaf5f5d08d306e5 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJ1aWxkLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI3NjJmYWZkZTQ2MTA5MzNiNTQ4NTQ0ODhiZmFmNWY1ZDA4ZDMwNmU1In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- google-cloud-build-v1/google-cloud-build-v1.gemspec | 2 +- .../lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb | 2 +- .../google/devtools/cloudbuild/v1/cloudbuild.rb | 8 ++++++-- .../test/google/cloud/build/v1/cloud_build_test.rb | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/google-cloud-build-v1/google-cloud-build-v1.gemspec b/google-cloud-build-v1/google-cloud-build-v1.gemspec index bb66d4f06792..42df8a458f0f 100644 --- a/google-cloud-build-v1/google-cloud-build-v1.gemspec +++ b/google-cloud-build-v1/google-cloud-build-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb b/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb index 6c9e43419b81..4742d95d702e 100644 --- a/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb +++ b/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb @@ -17,7 +17,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n.google/devtools/cloudbuild/v1/cloudbuild.proto\x12\x1dgoogle.devtools.cloudbuild.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"q\n\x11RetryBuildRequest\x12\x32\n\x04name\x18\x03 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc0\x01\n\x16RunBuildTriggerRequest\x12\x39\n\x04name\x18\x04 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\"\xea\x01\n\rStorageSource\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x0e\n\x06object\x18\x02 \x01(\t\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x12W\n\x0esource_fetcher\x18\x05 \x01(\x0e\x32:.google.devtools.cloudbuild.v1.StorageSource.SourceFetcherB\x03\xe0\x41\x01\"L\n\rSourceFetcher\x12\x1e\n\x1aSOURCE_FETCHER_UNSPECIFIED\x10\x00\x12\n\n\x06GSUTIL\x10\x01\x12\x0f\n\x0bGCS_FETCHER\x10\x02\"7\n\tGitSource\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0b\n\x03\x64ir\x18\x05 \x01(\t\x12\x10\n\x08revision\x18\x06 \x01(\t\"\xae\x02\n\nRepoSource\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\t\x12\x15\n\x0b\x62ranch_name\x18\x03 \x01(\tH\x00\x12\x12\n\x08tag_name\x18\x04 \x01(\tH\x00\x12\x14\n\ncommit_sha\x18\x05 \x01(\tH\x00\x12\x0b\n\x03\x64ir\x18\x07 \x01(\t\x12\x14\n\x0cinvert_regex\x18\x08 \x01(\x08\x12S\n\rsubstitutions\x18\t \x03(\x0b\x32<.google.devtools.cloudbuild.v1.RepoSource.SubstitutionsEntry\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08revision\"K\n\x15StorageSourceManifest\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x0e\n\x06object\x18\x02 \x01(\t\x12\x12\n\ngeneration\x18\x03 \x01(\x03\"\xb5\x02\n\x06Source\x12\x46\n\x0estorage_source\x18\x02 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSourceH\x00\x12@\n\x0brepo_source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSourceH\x00\x12>\n\ngit_source\x18\x05 \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitSourceH\x00\x12W\n\x17storage_source_manifest\x18\x08 \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.StorageSourceManifestH\x00\x42\x08\n\x06source\"m\n\nBuiltImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64igest\x18\x03 \x01(\t\x12\x41\n\x0bpush_timing\x18\x04 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xa7\x01\n\x15UploadedPythonPackage\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xa7\x01\n\x15UploadedMavenArtifact\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xa2\x01\n\x10UploadedGoModule\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xa4\x01\n\x12UploadedNpmPackage\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xc5\x04\n\tBuildStep\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t\x12\x12\n\nentrypoint\x18\x07 \x01(\t\x12\x12\n\nsecret_env\x18\x08 \x03(\t\x12\x36\n\x07volumes\x18\t \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12<\n\x06timing\x18\n \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12\x41\n\x0bpull_timing\x18\r \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12*\n\x07timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\x06status\x18\x0c \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.StatusB\x03\xe0\x41\x03\x12\x15\n\rallow_failure\x18\x0e \x01(\x08\x12\x16\n\texit_code\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x10\x61llow_exit_codes\x18\x12 \x03(\x05\x12\x0e\n\x06script\x18\x13 \x01(\t\x12\"\n\x15\x61utomap_substitutions\x18\x14 \x01(\x08H\x00\x88\x01\x01\x42\x18\n\x16_automap_substitutions\"$\n\x06Volume\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\xa0\x04\n\x07Results\x12\x39\n\x06images\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.BuiltImage\x12\x19\n\x11\x62uild_step_images\x18\x03 \x03(\t\x12\x19\n\x11\x61rtifact_manifest\x18\x04 \x01(\t\x12\x15\n\rnum_artifacts\x18\x05 \x01(\x03\x12\x1a\n\x12\x62uild_step_outputs\x18\x06 \x03(\x0c\x12@\n\x0f\x61rtifact_timing\x18\x07 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan\x12M\n\x0fpython_packages\x18\x08 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.UploadedPythonPackage\x12M\n\x0fmaven_artifacts\x18\t \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.UploadedMavenArtifact\x12H\n\ngo_modules\x18\n \x03(\x0b\x32/.google.devtools.cloudbuild.v1.UploadedGoModuleB\x03\xe0\x41\x01\x12G\n\x0cnpm_packages\x18\x0c \x03(\x0b\x32\x31.google.devtools.cloudbuild.v1.UploadedNpmPackage\"`\n\x0e\x41rtifactResult\x12\x10\n\x08location\x18\x01 \x01(\t\x12<\n\tfile_hash\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\"\xba\x13\n\x05\x42uild\x12\x11\n\x04name\x18- \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12@\n\x06status\x18\x02 \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.StatusB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x18 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x06source\x18\x03 \x01(\x0b\x32%.google.devtools.cloudbuild.v1.Source\x12\x37\n\x05steps\x18\x0b \x03(\x0b\x32(.google.devtools.cloudbuild.v1.BuildStep\x12<\n\x07results\x18\n \x01(\x0b\x32&.google.devtools.cloudbuild.v1.ResultsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x66inish_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x07timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06images\x18\r \x03(\t\x12,\n\tqueue_ttl\x18( \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\tartifacts\x18% \x01(\x0b\x32(.google.devtools.cloudbuild.v1.Artifacts\x12\x13\n\x0blogs_bucket\x18\x13 \x01(\t\x12O\n\x11source_provenance\x18\x15 \x01(\x0b\x32/.google.devtools.cloudbuild.v1.SourceProvenanceB\x03\xe0\x41\x03\x12\x1d\n\x10\x62uild_trigger_id\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12<\n\x07options\x18\x17 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildOptions\x12\x14\n\x07log_url\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12N\n\rsubstitutions\x18\x1d \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.Build.SubstitutionsEntry\x12\x0c\n\x04tags\x18\x1f \x03(\t\x12\x36\n\x07secrets\x18 \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Secret\x12\x45\n\x06timing\x18! \x03(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.TimingEntryB\x03\xe0\x41\x03\x12\x43\n\x08\x61pproval\x18, \x01(\x0b\x32,.google.devtools.cloudbuild.v1.BuildApprovalB\x03\xe0\x41\x03\x12?\n\x0fservice_account\x18* \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x41\n\x11\x61vailable_secrets\x18/ \x01(\x0b\x32&.google.devtools.cloudbuild.v1.Secrets\x12\x43\n\x08warnings\x18\x31 \x03(\x0b\x32,.google.devtools.cloudbuild.v1.Build.WarningB\x03\xe0\x41\x03\x12\x41\n\ngit_config\x18\x30 \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitConfigB\x03\xe0\x41\x01\x12K\n\x0c\x66\x61ilure_info\x18\x33 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.FailureInfoB\x03\xe0\x41\x03\x12\x44\n\x0c\x64\x65pendencies\x18\x38 \x03(\x0b\x32).google.devtools.cloudbuild.v1.DependencyB\x03\xe0\x41\x01\x1a\xa8\x01\n\x07Warning\x12\x0c\n\x04text\x18\x01 \x01(\t\x12G\n\x08priority\x18\x02 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.Build.Warning.Priority\"F\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x41LERT\x10\x03\x1a\x9e\x02\n\x0b\x46\x61ilureInfo\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"\xb2\x01\n\x0b\x46\x61ilureType\x12\x1c\n\x18\x46\x41ILURE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPUSH_FAILED\x10\x01\x12\x18\n\x14PUSH_IMAGE_NOT_FOUND\x10\x02\x12\x17\n\x13PUSH_NOT_AUTHORIZED\x10\x03\x12\x13\n\x0fLOGGING_FAILURE\x10\x04\x12\x13\n\x0fUSER_BUILD_STEP\x10\x05\x12\x17\n\x13\x46\x45TCH_SOURCE_FAILED\x10\x06\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aV\n\x0bTimingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan:\x02\x38\x01\"\x99\x01\n\x06Status\x12\x12\n\x0eSTATUS_UNKNOWN\x10\x00\x12\x0b\n\x07PENDING\x10\n\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07WORKING\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\x0b\n\x07\x46\x41ILURE\x10\x04\x12\x12\n\x0eINTERNAL_ERROR\x10\x05\x12\x0b\n\x07TIMEOUT\x10\x06\x12\r\n\tCANCELLED\x10\x07\x12\x0b\n\x07\x45XPIRED\x10\t:\x8f\x01\xea\x41\x8b\x01\n\x1f\x63loudbuild.googleapis.com/Build\x12!projects/{project}/builds/{build}\x12\x36projects/{project}/locations/{location}/builds/{build}*\x06\x62uilds2\x05\x62uild\"\xd5\x03\n\nDependency\x12\x0f\n\x05\x65mpty\x18\x01 \x01(\x08H\x00\x12S\n\ngit_source\x18\x02 \x01(\x0b\x32=.google.devtools.cloudbuild.v1.Dependency.GitSourceDependencyH\x00\x1a\xd1\x01\n\x13GitSourceDependency\x12V\n\nrepository\x18\x01 \x01(\x0b\x32=.google.devtools.cloudbuild.v1.Dependency.GitSourceRepositoryB\x03\xe0\x41\x02\x12\x15\n\x08revision\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12recurse_submodules\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x64\x65pth\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tdest_path\x18\x05 \x01(\tB\x03\xe0\x41\x02\x1a\x85\x01\n\x13GitSourceRepository\x12\r\n\x03url\x18\x01 \x01(\tH\x00\x12S\n\x11\x64\x65veloper_connect\x18\x02 \x01(\tB6\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLinkH\x00\x42\n\n\x08repotypeB\x05\n\x03\x64\x65p\"\xb0\x01\n\tGitConfig\x12\x41\n\x04http\x18\x01 \x01(\x0b\x32\x33.google.devtools.cloudbuild.v1.GitConfig.HttpConfig\x1a`\n\nHttpConfig\x12R\n\x19proxy_secret_version_name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xaa\x07\n\tArtifacts\x12\x0e\n\x06images\x18\x01 \x03(\t\x12I\n\x07objects\x18\x02 \x01(\x0b\x32\x38.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects\x12O\n\x0fmaven_artifacts\x18\x03 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact\x12J\n\ngo_modules\x18\x04 \x03(\x0b\x32\x31.google.devtools.cloudbuild.v1.Artifacts.GoModuleB\x03\xe0\x41\x01\x12O\n\x0fpython_packages\x18\x05 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v1.Artifacts.PythonPackage\x12I\n\x0cnpm_packages\x18\x06 \x03(\x0b\x32\x33.google.devtools.cloudbuild.v1.Artifacts.NpmPackage\x1ap\n\x0f\x41rtifactObjects\x12\x10\n\x08location\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12<\n\x06timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x1ai\n\rMavenArtifact\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x13\n\x0b\x61rtifact_id\x18\x03 \x01(\t\x12\x10\n\x08group_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x1a\xbf\x01\n\x08GoModule\x12\x1c\n\x0frepository_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13repository_location\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15repository_project_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsource_path\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmodule_path\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0emodule_version\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\x32\n\rPythonPackage\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x1a\x36\n\nNpmPackage\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x14\n\x0cpackage_path\x18\x02 \x01(\t\"h\n\x08TimeSpan\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"M\n\x16\x42uildOperationMetadata\x12\x33\n\x05\x62uild\x18\x01 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.Build\"\xc3\x03\n\x10SourceProvenance\x12M\n\x17resolved_storage_source\x18\x03 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSource\x12G\n\x14resolved_repo_source\x18\x06 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12^\n resolved_storage_source_manifest\x18\t \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.StorageSourceManifest\x12Y\n\x0b\x66ile_hashes\x18\x04 \x03(\x0b\x32?.google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntryB\x03\xe0\x41\x03\x1a\\\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes:\x02\x38\x01\"D\n\nFileHashes\x12\x36\n\tfile_hash\x18\x01 \x03(\x0b\x32#.google.devtools.cloudbuild.v1.Hash\"\x9a\x01\n\x04Hash\x12:\n\x04type\x18\x01 \x01(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\"G\n\x08HashType\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\x12\x10\n\x0cGO_MODULE_H1\x10\x03\x12\n\n\x06SHA512\x10\x04\"\x92\x01\n\x07Secrets\x12J\n\x0esecret_manager\x18\x01 \x03(\x0b\x32\x32.google.devtools.cloudbuild.v1.SecretManagerSecret\x12;\n\x06inline\x18\x02 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.InlineSecret\"\xc5\x01\n\x0cInlineSecret\x12<\n\x0ckms_key_name\x18\x01 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12H\n\x07\x65nv_map\x18\x02 \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.InlineSecret.EnvMapEntry\x1a-\n\x0b\x45nvMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"i\n\x13SecretManagerSecret\x12\x45\n\x0cversion_name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x0b\n\x03\x65nv\x18\x02 \x01(\t\"\x9a\x01\n\x06Secret\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\x12H\n\nsecret_env\x18\x03 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.Secret.SecretEnvEntry\x1a\x30\n\x0eSecretEnvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\x9d\x01\n\x12\x43reateBuildRequest\x12\x34\n\x06parent\x18\x04 \x01(\tB$\xfa\x41!\x12\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05\x62uild\x18\x02 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildB\x03\xe0\x41\x02\"o\n\x0fGetBuildRequest\x12\x32\n\x04name\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x99\x01\n\x11ListBuildsRequest\x12\x34\n\x06parent\x18\t \x01(\tB$\xfa\x41!\x12\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t\"c\n\x12ListBuildsResponse\x12\x34\n\x06\x62uilds\x18\x01 \x03(\x0b\x32$.google.devtools.cloudbuild.v1.Build\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"r\n\x12\x43\x61ncelBuildRequest\x12\x32\n\x04name\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"p\n\x13\x41pproveBuildRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0f\x61pproval_result\x18\x02 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalResult\"\xb7\x02\n\rBuildApproval\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.devtools.cloudbuild.v1.BuildApproval.StateB\x03\xe0\x41\x03\x12\x42\n\x06\x63onfig\x18\x02 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalConfigB\x03\xe0\x41\x03\x12\x42\n\x06result\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalResultB\x03\xe0\x41\x03\"V\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0c\n\x08REJECTED\x10\x03\x12\r\n\tCANCELLED\x10\x05\"+\n\x0e\x41pprovalConfig\x12\x19\n\x11\x61pproval_required\x18\x01 \x01(\x08\"\xa0\x02\n\x0e\x41pprovalResult\x12\x1d\n\x10\x61pprover_account\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rapproval_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x08\x64\x65\x63ision\x18\x04 \x01(\x0e\x32\x36.google.devtools.cloudbuild.v1.ApprovalResult.DecisionB\x03\xe0\x41\x02\x12\x14\n\x07\x63omment\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03url\x18\x06 \x01(\tB\x03\xe0\x41\x01\"@\n\x08\x44\x65\x63ision\x12\x18\n\x14\x44\x45\x43ISION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41PPROVED\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\"\xae\x02\n\rGitRepoSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12?\n\nrepository\x18\x06 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/RepositoryH\x00\x12\x0b\n\x03ref\x18\x02 \x01(\t\x12H\n\trepo_type\x18\x03 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.GitFileSource.RepoType\x12Y\n\x18github_enterprise_config\x18\x04 \x01(\tB5\xfa\x41\x32\n0cloudbuild.googleapis.com/GithubEnterpriseConfigH\x01\x42\x08\n\x06sourceB\x13\n\x11\x65nterprise_config\"\xa7\x03\n\rGitFileSource\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12?\n\nrepository\x18\x07 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/RepositoryH\x00\x12H\n\trepo_type\x18\x03 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.GitFileSource.RepoType\x12\x10\n\x08revision\x18\x04 \x01(\t\x12Y\n\x18github_enterprise_config\x18\x05 \x01(\tB5\xfa\x41\x32\n0cloudbuild.googleapis.com/GithubEnterpriseConfigH\x01\"d\n\x08RepoType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x1d\n\x19\x43LOUD_SOURCE_REPOSITORIES\x10\x01\x12\n\n\x06GITHUB\x10\x02\x12\x14\n\x10\x42ITBUCKET_SERVER\x10\x03\x12\n\n\x06GITLAB\x10\x04\x42\x08\n\x06sourceB\x13\n\x11\x65nterprise_config\"\xd2\t\n\x0c\x42uildTrigger\x12\x15\n\rresource_name\x18\" \x01(\t\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\n \x01(\t\x12\x0c\n\x04name\x18\x15 \x01(\t\x12\x0c\n\x04tags\x18\x13 \x03(\t\x12\x43\n\x10trigger_template\x18\x07 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12\x41\n\x06github\x18\r \x01(\x0b\x32\x31.google.devtools.cloudbuild.v1.GitHubEventsConfig\x12\x42\n\rpubsub_config\x18\x1d \x01(\x0b\x32+.google.devtools.cloudbuild.v1.PubsubConfig\x12\x44\n\x0ewebhook_config\x18\x1f \x01(\x0b\x32,.google.devtools.cloudbuild.v1.WebhookConfig\x12\x14\n\nautodetect\x18\x12 \x01(\x08H\x00\x12\x35\n\x05\x62uild\x18\x04 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildH\x00\x12\x12\n\x08\x66ilename\x18\x08 \x01(\tH\x00\x12G\n\x0fgit_file_source\x18\x18 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.GitFileSourceH\x00\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12U\n\rsubstitutions\x18\x0b \x03(\x0b\x32>.google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry\x12\x15\n\rignored_files\x18\x0f \x03(\t\x12\x16\n\x0eincluded_files\x18\x10 \x03(\t\x12\x13\n\x06\x66ilter\x18\x1e \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fsource_to_build\x18\x1a \x01(\x0b\x32,.google.devtools.cloudbuild.v1.GitRepoSource\x12?\n\x0fservice_account\x18! \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12U\n\x17repository_event_config\x18\' \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.RepositoryEventConfig\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa2\x01\xea\x41\x9e\x01\n&cloudbuild.googleapis.com/BuildTrigger\x12%projects/{project}/triggers/{trigger}\x12:projects/{project}/locations/{location}/triggers/{trigger}*\x08triggers2\x07triggerB\x10\n\x0e\x62uild_template\"\xb5\x03\n\x15RepositoryEventConfig\x12=\n\nrepository\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x61\n\x0frepository_type\x18\x02 \x01(\x0e\x32\x43.google.devtools.cloudbuild.v1.RepositoryEventConfig.RepositoryTypeB\x03\xe0\x41\x03\x12H\n\x0cpull_request\x18\x03 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x04 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\"k\n\x0eRepositoryType\x12\x1f\n\x1bREPOSITORY_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\x15\n\x11GITHUB_ENTERPRISE\x10\x02\x12\x15\n\x11GITLAB_ENTERPRISE\x10\x03\x42\x08\n\x06\x66ilter\"\xdc\x01\n\x12GitHubEventsConfig\x12\x1b\n\x0finstallation_id\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x0c\n\x04name\x18\x07 \x01(\t\x12H\n\x0cpull_request\x18\x04 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x05 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\x42\x07\n\x05\x65vent\"\xff\x02\n\x0cPubsubConfig\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x45\n\x15service_account_email\x18\x03 \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12@\n\x05state\x18\x04 \x01(\x0e\x32\x31.google.devtools.cloudbuild.v1.PubsubConfig.State\"s\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x18\n\x14SUBSCRIPTION_DELETED\x10\x02\x12\x11\n\rTOPIC_DELETED\x10\x03\x12\x1e\n\x1aSUBSCRIPTION_MISCONFIGURED\x10\x04\"\xe3\x01\n\rWebhookConfig\x12\x44\n\x06secret\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x12\x41\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.devtools.cloudbuild.v1.WebhookConfig.State\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x12\n\x0eSECRET_DELETED\x10\x02\x42\r\n\x0b\x61uth_method\"\x94\x02\n\x11PullRequestFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12X\n\x0f\x63omment_control\x18\x05 \x01(\x0e\x32?.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl\x12\x14\n\x0cinvert_regex\x18\x06 \x01(\x08\"r\n\x0e\x43ommentControl\x12\x15\n\x11\x43OMMENTS_DISABLED\x10\x00\x12\x14\n\x10\x43OMMENTS_ENABLED\x10\x01\x12\x33\n/COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY\x10\x02\x42\t\n\x07git_ref\"N\n\nPushFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12\r\n\x03tag\x18\x03 \x01(\tH\x00\x12\x14\n\x0cinvert_regex\x18\x04 \x01(\x08\x42\t\n\x07git_ref\"\xb4\x01\n\x19\x43reateBuildTriggerRequest\x12;\n\x06parent\x18\x03 \x01(\tB+\xfa\x41(\x12&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x02 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02\"\x85\x01\n\x16GetBuildTriggerRequest\x12\x39\n\x04name\x18\x03 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n\x18ListBuildTriggersRequest\x12;\n\x06parent\x18\x04 \x01(\tB+\xfa\x41(\x12&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x19ListBuildTriggersResponse\x12=\n\x08triggers\x18\x01 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x88\x01\n\x19\x44\x65leteBuildTriggerRequest\x12\x39\n\x04name\x18\x03 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc1\x01\n\x19UpdateBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x03 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa2\x0c\n\x0c\x42uildOptions\x12L\n\x16source_provenance_hash\x18\x01 \x03(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12Y\n\x17requested_verify_option\x18\x02 \x01(\x0e\x32\x38.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption\x12M\n\x0cmachine_type\x18\x03 \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.MachineType\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x03\x12[\n\x13substitution_option\x18\x04 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption\x12\x1d\n\x15\x64ynamic_substitutions\x18\x11 \x01(\x08\x12\x1d\n\x15\x61utomap_substitutions\x18\x16 \x01(\x08\x12\\\n\x14log_streaming_option\x18\x05 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption\x12\x17\n\x0bworker_pool\x18\x07 \x01(\tB\x02\x18\x01\x12I\n\x04pool\x18\x13 \x01(\x0b\x32\x36.google.devtools.cloudbuild.v1.BuildOptions.PoolOptionB\x03\xe0\x41\x01\x12H\n\x07logging\x18\x0b \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode\x12\x0b\n\x03\x65nv\x18\x0c \x03(\t\x12\x12\n\nsecret_env\x18\r \x03(\t\x12\x36\n\x07volumes\x18\x0e \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12p\n\x1c\x64\x65\x66\x61ult_logs_bucket_behavior\x18\x15 \x01(\x0e\x32\x45.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehaviorB\x03\xe0\x41\x01\x12&\n\x19\x65nable_structured_logging\x18\x17 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\nPoolOption\x12\x37\n\x04name\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\".\n\x0cVerifyOption\x12\x10\n\x0cNOT_VERIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01\"w\n\x0bMachineType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cN1_HIGHCPU_8\x10\x01\x12\x11\n\rN1_HIGHCPU_32\x10\x02\x12\x10\n\x0c\x45\x32_HIGHCPU_8\x10\x05\x12\x11\n\rE2_HIGHCPU_32\x10\x06\x12\r\n\tE2_MEDIUM\x10\x07\"5\n\x12SubstitutionOption\x12\x0e\n\nMUST_MATCH\x10\x00\x12\x0f\n\x0b\x41LLOW_LOOSE\x10\x01\"G\n\x12LogStreamingOption\x12\x12\n\x0eSTREAM_DEFAULT\x10\x00\x12\r\n\tSTREAM_ON\x10\x01\x12\x0e\n\nSTREAM_OFF\x10\x02\"|\n\x0bLoggingMode\x12\x17\n\x13LOGGING_UNSPECIFIED\x10\x00\x12\n\n\x06LEGACY\x10\x01\x12\x0c\n\x08GCS_ONLY\x10\x02\x12\x18\n\x10STACKDRIVER_ONLY\x10\x03\x1a\x02\x08\x01\x12\x16\n\x12\x43LOUD_LOGGING_ONLY\x10\x05\x12\x08\n\x04NONE\x10\x04\"|\n\x19\x44\x65\x66\x61ultLogsBucketBehavior\x12,\n(DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x1e\n\x1aREGIONAL_USER_OWNED_BUCKET\x10\x01\x12\x11\n\rLEGACY_BUCKET\x10\x02\"\x85\x01\n\x1cReceiveTriggerWebhookRequest\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\"\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x14.google.api.HttpBody\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x0f\n\x07trigger\x18\x03 \x01(\t\x12\x0e\n\x06secret\x18\x04 \x01(\t\"\x1f\n\x1dReceiveTriggerWebhookResponse\"\x89\x04\n\x16GitHubEnterpriseConfig\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x08host_url\x18\x03 \x01(\t\x12\x13\n\x06\x61pp_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0bwebhook_key\x18\x08 \x01(\t\x12>\n\x0epeered_network\x18\t \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12G\n\x07secrets\x18\n \x01(\x0b\x32\x36.google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x13\n\x06ssl_ca\x18\x0c \x01(\tB\x03\xe0\x41\x01:\xb5\x01\xea\x41\xb1\x01\n0cloudbuild.googleapis.com/GithubEnterpriseConfig\x12\x33projects/{project}/githubEnterpriseConfigs/{config}\x12Hprojects/{project}/locations/{location}/githubEnterpriseConfigs/{config}\"\xed\x02\n\x17GitHubEnterpriseSecrets\x12Q\n\x18private_key_version_name\x18\x05 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12T\n\x1bwebhook_secret_version_name\x18\x06 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12R\n\x19oauth_secret_version_name\x18\x07 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12U\n\x1coauth_client_id_version_name\x18\x08 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x96\x06\n\nWorkerPool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12O\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32:.google.devtools.cloudbuild.v1.WorkerPool.AnnotationsEntry\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x05state\x18\x08 \x01(\x0e\x32/.google.devtools.cloudbuild.v1.WorkerPool.StateB\x03\xe0\x41\x03\x12T\n\x16private_pool_v1_config\x18\x0c \x01(\x0b\x32\x32.google.devtools.cloudbuild.v1.PrivatePoolV1ConfigH\x00\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x89\x01\xea\x41\x85\x01\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}*\x0bworkerPools2\nworkerPoolR\x01\x01\x42\x08\n\x06\x63onfig\"\xe3\x06\n\x13PrivatePoolV1Config\x12V\n\rworker_config\x18\x01 \x01(\x0b\x32?.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig\x12X\n\x0enetwork_config\x18\x02 \x01(\x0b\x32@.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig\x12n\n\x17private_service_connect\x18\x05 \x01(\x0b\x32H.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnectB\x03\xe0\x41\x05\x1a:\n\x0cWorkerConfig\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x03\x1a\xb6\x02\n\rNetworkConfig\x12\x41\n\x0epeered_network\x18\x01 \x01(\tB)\xe0\x41\x05\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x64\n\regress_option\x18\x02 \x01(\x0e\x32M.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption\x12$\n\x17peered_network_ip_range\x18\x03 \x01(\tB\x03\xe0\x41\x05\"V\n\x0c\x45gressOption\x12\x1d\n\x19\x45GRESS_OPTION_UNSPECIFIED\x10\x00\x12\x14\n\x10NO_PUBLIC_EGRESS\x10\x01\x12\x11\n\rPUBLIC_EGRESS\x10\x02\x1a\xb4\x01\n\x15PrivateServiceConnect\x12O\n\x12network_attachment\x18\x01 \x01(\tB3\xe0\x41\x05\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachment\x12*\n\x1apublic_ip_address_disabled\x18\x02 \x01(\x08\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11route_all_traffic\x18\x03 \x01(\x08\x42\x03\xe0\x41\x05\"\xd0\x01\n\x17\x43reateWorkerPoolRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x0bworker_pool\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPoolB\x03\xe0\x41\x02\x12\x1e\n\x0eworker_pool_id\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"R\n\x14GetWorkerPoolRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\"\x96\x01\n\x17\x44\x65leteWorkerPoolRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xa6\x01\n\x17UpdateWorkerPoolRequest\x12\x43\n\x0bworker_pool\x18\x01 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPoolB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"z\n\x16ListWorkerPoolsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x17ListWorkerPoolsResponse\x12?\n\x0cworker_pools\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n!CreateWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc7\x01\n!UpdateWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc7\x01\n!DeleteWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xa1+\n\nCloudBuild\x12\xae\x02\n\x0b\x43reateBuild\x12\x31.google.devtools.cloudbuild.v1.CreateBuildRequest\x1a\x1d.google.longrunning.Operation\"\xcc\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x10project_id,build\x82\xd3\xe4\x93\x02^\" /v1/projects/{project_id}/builds:\x05\x62uildZ3\"*/v1/{parent=projects/*/locations/*}/builds:\x05\x62uild\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x88\x02\n\x08GetBuild\x12..google.devtools.cloudbuild.v1.GetBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build\"\xa5\x01\xda\x41\rproject_id,id\x82\xd3\xe4\x93\x02U\x12%/v1/projects/{project_id}/builds/{id}Z,\x12*/v1/{name=projects/*/locations/*/builds/*}\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\x91\x02\n\nListBuilds\x12\x30.google.devtools.cloudbuild.v1.ListBuildsRequest\x1a\x31.google.devtools.cloudbuild.v1.ListBuildsResponse\"\x9d\x01\xda\x41\x11project_id,filter\x82\xd3\xe4\x93\x02P\x12 /v1/projects/{project_id}/buildsZ,\x12*/v1/{parent=projects/*/locations/*}/builds\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xa2\x02\n\x0b\x43\x61ncelBuild\x12\x31.google.devtools.cloudbuild.v1.CancelBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build\"\xb9\x01\xda\x41\rproject_id,id\x82\xd3\xe4\x93\x02i\",/v1/projects/{project_id}/builds/{id}:cancel:\x01*Z6\"1/v1/{name=projects/*/locations/*/builds/*}:cancel:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xb9\x02\n\nRetryBuild\x12\x30.google.devtools.cloudbuild.v1.RetryBuildRequest\x1a\x1d.google.longrunning.Operation\"\xd9\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\rproject_id,id\x82\xd3\xe4\x93\x02g\"+/v1/projects/{project_id}/builds/{id}:retry:\x01*Z5\"0/v1/{name=projects/*/locations/*/builds/*}:retry:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xc1\x02\n\x0c\x41pproveBuild\x12\x32.google.devtools.cloudbuild.v1.ApproveBuildRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x14name,approval_result\x82\xd3\xe4\x93\x02\x64\"&/v1/{name=projects/*/builds/*}:approve:\x01*Z7\"2/v1/{name=projects/*/locations/*/builds/*}:approve:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xb2\x02\n\x12\x43reateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xb4\x01\xda\x41\x12project_id,trigger\x82\xd3\xe4\x93\x02\x66\"\"/v1/projects/{project_id}/triggers:\x07triggerZ7\",/v1/{parent=projects/*/locations/*}/triggers:\x07trigger\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xb3\x02\n\x0fGetBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.GetBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xbb\x01\xda\x41\x15project_id,trigger_id\x82\xd3\xe4\x93\x02\x61\x12//v1/projects/{project_id}/triggers/{trigger_id}Z.\x12,/v1/{name=projects/*/locations/*/triggers/*}\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\xa3\x02\n\x11ListBuildTriggers\x12\x37.google.devtools.cloudbuild.v1.ListBuildTriggersRequest\x1a\x38.google.devtools.cloudbuild.v1.ListBuildTriggersResponse\"\x9a\x01\xda\x41\nproject_id\x82\xd3\xe4\x93\x02T\x12\"/v1/projects/{project_id}/triggersZ.\x12,/v1/{parent=projects/*/locations/*}/triggers\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xa4\x02\n\x12\x44\x65leteBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest\x1a\x16.google.protobuf.Empty\"\xbb\x01\xda\x41\x15project_id,trigger_id\x82\xd3\xe4\x93\x02\x61*//v1/projects/{project_id}/triggers/{trigger_id}Z.*,/v1/{name=projects/*/locations/*/triggers/*}\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\xf6\x02\n\x12UpdateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xf8\x01\xda\x41\x1dproject_id,trigger_id,trigger\x82\xd3\xe4\x93\x02\x84\x01\x32//v1/projects/{project_id}/triggers/{trigger_id}:\x07triggerZH2=/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}:\x07trigger\x8a\xd3\xe4\x93\x02G\x12\x45\n\x15trigger.resource_name\x12,projects/*/locations/{location=*}/triggers/*\x12\xe1\x02\n\x0fRunBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.RunBuildTriggerRequest\x1a\x1d.google.longrunning.Operation\"\xf7\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x1cproject_id,trigger_id,source\x82\xd3\xe4\x93\x02t\"3/v1/projects/{project_id}/triggers/{trigger_id}:run:\x06sourceZ5\"0/v1/{name=projects/*/locations/*/triggers/*}:run:\x01*\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\x95\x02\n\x15ReceiveTriggerWebhook\x12;.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest\x1a<.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse\"\x80\x01\x82\xd3\xe4\x93\x02z\"4/v1/projects/{project_id}/triggers/{trigger}:webhook:\x04\x62odyZ<\"4/v1/{name=projects/*/locations/*/triggers/*}:webhook:\x04\x62ody\x12\xb9\x02\n\x10\x43reateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xcd\x01\xca\x41/\n\nWorkerPool\x12!CreateWorkerPoolOperationMetadata\xda\x41!parent,worker_pool,worker_pool_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/workerPools:\x0bworker_pool\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xee\x01\n\rGetWorkerPool\x12\x33.google.devtools.cloudbuild.v1.GetWorkerPoolRequest\x1a).google.devtools.cloudbuild.v1.WorkerPool\"}\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02\x39\x12\x37\n\x04name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xa6\x02\n\x10\x44\x65leteWorkerPool\x12\x36.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xba\x01\xca\x41:\n\x15google.protobuf.Empty\x12!DeleteWorkerPoolOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02\x39\x12\x37\n\x04name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xd3\x02\n\x10UpdateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xe7\x01\xca\x41/\n\nWorkerPool\x12!UpdateWorkerPoolOperationMetadata\xda\x41\x17worker_pool,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{worker_pool.name=projects/*/locations/*/workerPools/*}:\x0bworker_pool\x8a\xd3\xe4\x93\x02\x45\x12\x43\n\x10worker_pool.name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xf5\x01\n\x0fListWorkerPools\x12\x35.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest\x1a\x36.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse\"s\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/workerPools\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x1aM\xca\x41\x19\x63loudbuild.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\n\n\x18\x63om.google.cloudbuild.v1P\x01ZAcloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb;cloudbuildpb\xa2\x02\x03GCB\xaa\x02\x1aGoogle.Cloud.CloudBuild.V1\xca\x02\x15Google\\Cloud\\Build\\V1\xea\x02\x18Google::Cloud::Build::V1\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41J\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41\x66\n gkehub.googleapis.com/Membership\x12\x42projects/{project}/locations/{location}/memberships/{cluster_name}\xea\x41p\n!cloudkms.googleapis.com/CryptoKey\x12Kprojects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}\xea\x41U\n\"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41v\n(compute.googleapis.com/NetworkAttachment\x12Jprojects/{project}/regions/{region}/networkAttachments/{networkattachment}\xea\x41\x9e\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}\xea\x41\x82\x01\n$cloudbuild.googleapis.com/Repository\x12Zprojects/{project}/locations/{location}/connections/{connection}/repositories/{repository}b\x06proto3" +descriptor_data = "\n.google/devtools/cloudbuild/v1/cloudbuild.proto\x12\x1dgoogle.devtools.cloudbuild.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"q\n\x11RetryBuildRequest\x12\x32\n\x04name\x18\x03 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc0\x01\n\x16RunBuildTriggerRequest\x12\x39\n\x04name\x18\x04 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\"\xea\x01\n\rStorageSource\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x0e\n\x06object\x18\x02 \x01(\t\x12\x12\n\ngeneration\x18\x03 \x01(\x03\x12W\n\x0esource_fetcher\x18\x05 \x01(\x0e\x32:.google.devtools.cloudbuild.v1.StorageSource.SourceFetcherB\x03\xe0\x41\x01\"L\n\rSourceFetcher\x12\x1e\n\x1aSOURCE_FETCHER_UNSPECIFIED\x10\x00\x12\n\n\x06GSUTIL\x10\x01\x12\x0f\n\x0bGCS_FETCHER\x10\x02\"7\n\tGitSource\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0b\n\x03\x64ir\x18\x05 \x01(\t\x12\x10\n\x08revision\x18\x06 \x01(\t\"\xae\x02\n\nRepoSource\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\t\x12\x15\n\x0b\x62ranch_name\x18\x03 \x01(\tH\x00\x12\x12\n\x08tag_name\x18\x04 \x01(\tH\x00\x12\x14\n\ncommit_sha\x18\x05 \x01(\tH\x00\x12\x0b\n\x03\x64ir\x18\x07 \x01(\t\x12\x14\n\x0cinvert_regex\x18\x08 \x01(\x08\x12S\n\rsubstitutions\x18\t \x03(\x0b\x32<.google.devtools.cloudbuild.v1.RepoSource.SubstitutionsEntry\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08revision\"K\n\x15StorageSourceManifest\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x0e\n\x06object\x18\x02 \x01(\t\x12\x12\n\ngeneration\x18\x03 \x01(\x03\"\xb5\x02\n\x06Source\x12\x46\n\x0estorage_source\x18\x02 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSourceH\x00\x12@\n\x0brepo_source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSourceH\x00\x12>\n\ngit_source\x18\x05 \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitSourceH\x00\x12W\n\x17storage_source_manifest\x18\x08 \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.StorageSourceManifestH\x00\x42\x08\n\x06source\"m\n\nBuiltImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64igest\x18\x03 \x01(\t\x12\x41\n\x0bpush_timing\x18\x04 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xa7\x01\n\x15UploadedPythonPackage\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xa7\x01\n\x15UploadedMavenArtifact\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xa2\x01\n\x10UploadedGoModule\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xa4\x01\n\x12UploadedNpmPackage\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\"\xc5\x04\n\tBuildStep\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t\x12\x12\n\nentrypoint\x18\x07 \x01(\t\x12\x12\n\nsecret_env\x18\x08 \x03(\t\x12\x36\n\x07volumes\x18\t \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12<\n\x06timing\x18\n \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12\x41\n\x0bpull_timing\x18\r \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12*\n\x07timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\x06status\x18\x0c \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.StatusB\x03\xe0\x41\x03\x12\x15\n\rallow_failure\x18\x0e \x01(\x08\x12\x16\n\texit_code\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x10\x61llow_exit_codes\x18\x12 \x03(\x05\x12\x0e\n\x06script\x18\x13 \x01(\t\x12\"\n\x15\x61utomap_substitutions\x18\x14 \x01(\x08H\x00\x88\x01\x01\x42\x18\n\x16_automap_substitutions\"$\n\x06Volume\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\xa0\x04\n\x07Results\x12\x39\n\x06images\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.BuiltImage\x12\x19\n\x11\x62uild_step_images\x18\x03 \x03(\t\x12\x19\n\x11\x61rtifact_manifest\x18\x04 \x01(\t\x12\x15\n\rnum_artifacts\x18\x05 \x01(\x03\x12\x1a\n\x12\x62uild_step_outputs\x18\x06 \x03(\x0c\x12@\n\x0f\x61rtifact_timing\x18\x07 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan\x12M\n\x0fpython_packages\x18\x08 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.UploadedPythonPackage\x12M\n\x0fmaven_artifacts\x18\t \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.UploadedMavenArtifact\x12H\n\ngo_modules\x18\n \x03(\x0b\x32/.google.devtools.cloudbuild.v1.UploadedGoModuleB\x03\xe0\x41\x01\x12G\n\x0cnpm_packages\x18\x0c \x03(\x0b\x32\x31.google.devtools.cloudbuild.v1.UploadedNpmPackage\"`\n\x0e\x41rtifactResult\x12\x10\n\x08location\x18\x01 \x01(\t\x12<\n\tfile_hash\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\"\xba\x13\n\x05\x42uild\x12\x11\n\x04name\x18- \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12@\n\x06status\x18\x02 \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.StatusB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x18 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x06source\x18\x03 \x01(\x0b\x32%.google.devtools.cloudbuild.v1.Source\x12\x37\n\x05steps\x18\x0b \x03(\x0b\x32(.google.devtools.cloudbuild.v1.BuildStep\x12<\n\x07results\x18\n \x01(\x0b\x32&.google.devtools.cloudbuild.v1.ResultsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x66inish_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x07timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06images\x18\r \x03(\t\x12,\n\tqueue_ttl\x18( \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\tartifacts\x18% \x01(\x0b\x32(.google.devtools.cloudbuild.v1.Artifacts\x12\x13\n\x0blogs_bucket\x18\x13 \x01(\t\x12O\n\x11source_provenance\x18\x15 \x01(\x0b\x32/.google.devtools.cloudbuild.v1.SourceProvenanceB\x03\xe0\x41\x03\x12\x1d\n\x10\x62uild_trigger_id\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12<\n\x07options\x18\x17 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildOptions\x12\x14\n\x07log_url\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12N\n\rsubstitutions\x18\x1d \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.Build.SubstitutionsEntry\x12\x0c\n\x04tags\x18\x1f \x03(\t\x12\x36\n\x07secrets\x18 \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Secret\x12\x45\n\x06timing\x18! \x03(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.TimingEntryB\x03\xe0\x41\x03\x12\x43\n\x08\x61pproval\x18, \x01(\x0b\x32,.google.devtools.cloudbuild.v1.BuildApprovalB\x03\xe0\x41\x03\x12?\n\x0fservice_account\x18* \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x41\n\x11\x61vailable_secrets\x18/ \x01(\x0b\x32&.google.devtools.cloudbuild.v1.Secrets\x12\x43\n\x08warnings\x18\x31 \x03(\x0b\x32,.google.devtools.cloudbuild.v1.Build.WarningB\x03\xe0\x41\x03\x12\x41\n\ngit_config\x18\x30 \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitConfigB\x03\xe0\x41\x01\x12K\n\x0c\x66\x61ilure_info\x18\x33 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.FailureInfoB\x03\xe0\x41\x03\x12\x44\n\x0c\x64\x65pendencies\x18\x38 \x03(\x0b\x32).google.devtools.cloudbuild.v1.DependencyB\x03\xe0\x41\x01\x1a\xa8\x01\n\x07Warning\x12\x0c\n\x04text\x18\x01 \x01(\t\x12G\n\x08priority\x18\x02 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.Build.Warning.Priority\"F\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x41LERT\x10\x03\x1a\x9e\x02\n\x0b\x46\x61ilureInfo\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"\xb2\x01\n\x0b\x46\x61ilureType\x12\x1c\n\x18\x46\x41ILURE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPUSH_FAILED\x10\x01\x12\x18\n\x14PUSH_IMAGE_NOT_FOUND\x10\x02\x12\x17\n\x13PUSH_NOT_AUTHORIZED\x10\x03\x12\x13\n\x0fLOGGING_FAILURE\x10\x04\x12\x13\n\x0fUSER_BUILD_STEP\x10\x05\x12\x17\n\x13\x46\x45TCH_SOURCE_FAILED\x10\x06\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aV\n\x0bTimingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan:\x02\x38\x01\"\x99\x01\n\x06Status\x12\x12\n\x0eSTATUS_UNKNOWN\x10\x00\x12\x0b\n\x07PENDING\x10\n\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07WORKING\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\x0b\n\x07\x46\x41ILURE\x10\x04\x12\x12\n\x0eINTERNAL_ERROR\x10\x05\x12\x0b\n\x07TIMEOUT\x10\x06\x12\r\n\tCANCELLED\x10\x07\x12\x0b\n\x07\x45XPIRED\x10\t:\x8f\x01\xea\x41\x8b\x01\n\x1f\x63loudbuild.googleapis.com/Build\x12!projects/{project}/builds/{build}\x12\x36projects/{project}/locations/{location}/builds/{build}*\x06\x62uilds2\x05\x62uild\"\xd5\x03\n\nDependency\x12\x0f\n\x05\x65mpty\x18\x01 \x01(\x08H\x00\x12S\n\ngit_source\x18\x02 \x01(\x0b\x32=.google.devtools.cloudbuild.v1.Dependency.GitSourceDependencyH\x00\x1a\xd1\x01\n\x13GitSourceDependency\x12V\n\nrepository\x18\x01 \x01(\x0b\x32=.google.devtools.cloudbuild.v1.Dependency.GitSourceRepositoryB\x03\xe0\x41\x02\x12\x15\n\x08revision\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12recurse_submodules\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x64\x65pth\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tdest_path\x18\x05 \x01(\tB\x03\xe0\x41\x02\x1a\x85\x01\n\x13GitSourceRepository\x12\r\n\x03url\x18\x01 \x01(\tH\x00\x12S\n\x11\x64\x65veloper_connect\x18\x02 \x01(\tB6\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLinkH\x00\x42\n\n\x08repotypeB\x05\n\x03\x64\x65p\"\xb0\x01\n\tGitConfig\x12\x41\n\x04http\x18\x01 \x01(\x0b\x32\x33.google.devtools.cloudbuild.v1.GitConfig.HttpConfig\x1a`\n\nHttpConfig\x12R\n\x19proxy_secret_version_name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xaa\x07\n\tArtifacts\x12\x0e\n\x06images\x18\x01 \x03(\t\x12I\n\x07objects\x18\x02 \x01(\x0b\x32\x38.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects\x12O\n\x0fmaven_artifacts\x18\x03 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact\x12J\n\ngo_modules\x18\x04 \x03(\x0b\x32\x31.google.devtools.cloudbuild.v1.Artifacts.GoModuleB\x03\xe0\x41\x01\x12O\n\x0fpython_packages\x18\x05 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v1.Artifacts.PythonPackage\x12I\n\x0cnpm_packages\x18\x06 \x03(\x0b\x32\x33.google.devtools.cloudbuild.v1.Artifacts.NpmPackage\x1ap\n\x0f\x41rtifactObjects\x12\x10\n\x08location\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12<\n\x06timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x1ai\n\rMavenArtifact\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x13\n\x0b\x61rtifact_id\x18\x03 \x01(\t\x12\x10\n\x08group_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x1a\xbf\x01\n\x08GoModule\x12\x1c\n\x0frepository_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13repository_location\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15repository_project_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsource_path\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmodule_path\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0emodule_version\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\x32\n\rPythonPackage\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x1a\x36\n\nNpmPackage\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x14\n\x0cpackage_path\x18\x02 \x01(\t\"h\n\x08TimeSpan\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"M\n\x16\x42uildOperationMetadata\x12\x33\n\x05\x62uild\x18\x01 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.Build\"\xc3\x03\n\x10SourceProvenance\x12M\n\x17resolved_storage_source\x18\x03 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSource\x12G\n\x14resolved_repo_source\x18\x06 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12^\n resolved_storage_source_manifest\x18\t \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.StorageSourceManifest\x12Y\n\x0b\x66ile_hashes\x18\x04 \x03(\x0b\x32?.google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntryB\x03\xe0\x41\x03\x1a\\\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes:\x02\x38\x01\"D\n\nFileHashes\x12\x36\n\tfile_hash\x18\x01 \x03(\x0b\x32#.google.devtools.cloudbuild.v1.Hash\"\x9a\x01\n\x04Hash\x12:\n\x04type\x18\x01 \x01(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\"G\n\x08HashType\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\x12\x10\n\x0cGO_MODULE_H1\x10\x03\x12\n\n\x06SHA512\x10\x04\"\x92\x01\n\x07Secrets\x12J\n\x0esecret_manager\x18\x01 \x03(\x0b\x32\x32.google.devtools.cloudbuild.v1.SecretManagerSecret\x12;\n\x06inline\x18\x02 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.InlineSecret\"\xc5\x01\n\x0cInlineSecret\x12<\n\x0ckms_key_name\x18\x01 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12H\n\x07\x65nv_map\x18\x02 \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.InlineSecret.EnvMapEntry\x1a-\n\x0b\x45nvMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"i\n\x13SecretManagerSecret\x12\x45\n\x0cversion_name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x0b\n\x03\x65nv\x18\x02 \x01(\t\"\x9a\x01\n\x06Secret\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\x12H\n\nsecret_env\x18\x03 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.Secret.SecretEnvEntry\x1a\x30\n\x0eSecretEnvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\x9d\x01\n\x12\x43reateBuildRequest\x12\x34\n\x06parent\x18\x04 \x01(\tB$\xfa\x41!\x12\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05\x62uild\x18\x02 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildB\x03\xe0\x41\x02\"o\n\x0fGetBuildRequest\x12\x32\n\x04name\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x99\x01\n\x11ListBuildsRequest\x12\x34\n\x06parent\x18\t \x01(\tB$\xfa\x41!\x12\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t\"c\n\x12ListBuildsResponse\x12\x34\n\x06\x62uilds\x18\x01 \x03(\x0b\x32$.google.devtools.cloudbuild.v1.Build\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"r\n\x12\x43\x61ncelBuildRequest\x12\x32\n\x04name\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"p\n\x13\x41pproveBuildRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0f\x61pproval_result\x18\x02 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalResult\"\xb7\x02\n\rBuildApproval\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.devtools.cloudbuild.v1.BuildApproval.StateB\x03\xe0\x41\x03\x12\x42\n\x06\x63onfig\x18\x02 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalConfigB\x03\xe0\x41\x03\x12\x42\n\x06result\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalResultB\x03\xe0\x41\x03\"V\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0c\n\x08REJECTED\x10\x03\x12\r\n\tCANCELLED\x10\x05\"+\n\x0e\x41pprovalConfig\x12\x19\n\x11\x61pproval_required\x18\x01 \x01(\x08\"\xa0\x02\n\x0e\x41pprovalResult\x12\x1d\n\x10\x61pprover_account\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rapproval_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x08\x64\x65\x63ision\x18\x04 \x01(\x0e\x32\x36.google.devtools.cloudbuild.v1.ApprovalResult.DecisionB\x03\xe0\x41\x02\x12\x14\n\x07\x63omment\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03url\x18\x06 \x01(\tB\x03\xe0\x41\x01\"@\n\x08\x44\x65\x63ision\x12\x18\n\x14\x44\x45\x43ISION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41PPROVED\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\"\xae\x02\n\rGitRepoSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12?\n\nrepository\x18\x06 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/RepositoryH\x00\x12\x0b\n\x03ref\x18\x02 \x01(\t\x12H\n\trepo_type\x18\x03 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.GitFileSource.RepoType\x12Y\n\x18github_enterprise_config\x18\x04 \x01(\tB5\xfa\x41\x32\n0cloudbuild.googleapis.com/GithubEnterpriseConfigH\x01\x42\x08\n\x06sourceB\x13\n\x11\x65nterprise_config\"\xa7\x03\n\rGitFileSource\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12?\n\nrepository\x18\x07 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/RepositoryH\x00\x12H\n\trepo_type\x18\x03 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.GitFileSource.RepoType\x12\x10\n\x08revision\x18\x04 \x01(\t\x12Y\n\x18github_enterprise_config\x18\x05 \x01(\tB5\xfa\x41\x32\n0cloudbuild.googleapis.com/GithubEnterpriseConfigH\x01\"d\n\x08RepoType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x1d\n\x19\x43LOUD_SOURCE_REPOSITORIES\x10\x01\x12\n\n\x06GITHUB\x10\x02\x12\x14\n\x10\x42ITBUCKET_SERVER\x10\x03\x12\n\n\x06GITLAB\x10\x04\x42\x08\n\x06sourceB\x13\n\x11\x65nterprise_config\"\xd2\t\n\x0c\x42uildTrigger\x12\x15\n\rresource_name\x18\" \x01(\t\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\n \x01(\t\x12\x0c\n\x04name\x18\x15 \x01(\t\x12\x0c\n\x04tags\x18\x13 \x03(\t\x12\x43\n\x10trigger_template\x18\x07 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12\x41\n\x06github\x18\r \x01(\x0b\x32\x31.google.devtools.cloudbuild.v1.GitHubEventsConfig\x12\x42\n\rpubsub_config\x18\x1d \x01(\x0b\x32+.google.devtools.cloudbuild.v1.PubsubConfig\x12\x44\n\x0ewebhook_config\x18\x1f \x01(\x0b\x32,.google.devtools.cloudbuild.v1.WebhookConfig\x12\x14\n\nautodetect\x18\x12 \x01(\x08H\x00\x12\x35\n\x05\x62uild\x18\x04 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildH\x00\x12\x12\n\x08\x66ilename\x18\x08 \x01(\tH\x00\x12G\n\x0fgit_file_source\x18\x18 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.GitFileSourceH\x00\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12U\n\rsubstitutions\x18\x0b \x03(\x0b\x32>.google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry\x12\x15\n\rignored_files\x18\x0f \x03(\t\x12\x16\n\x0eincluded_files\x18\x10 \x03(\t\x12\x13\n\x06\x66ilter\x18\x1e \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fsource_to_build\x18\x1a \x01(\x0b\x32,.google.devtools.cloudbuild.v1.GitRepoSource\x12?\n\x0fservice_account\x18! \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12U\n\x17repository_event_config\x18\' \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.RepositoryEventConfig\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa2\x01\xea\x41\x9e\x01\n&cloudbuild.googleapis.com/BuildTrigger\x12%projects/{project}/triggers/{trigger}\x12:projects/{project}/locations/{location}/triggers/{trigger}*\x08triggers2\x07triggerB\x10\n\x0e\x62uild_template\"\xb5\x03\n\x15RepositoryEventConfig\x12=\n\nrepository\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x61\n\x0frepository_type\x18\x02 \x01(\x0e\x32\x43.google.devtools.cloudbuild.v1.RepositoryEventConfig.RepositoryTypeB\x03\xe0\x41\x03\x12H\n\x0cpull_request\x18\x03 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x04 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\"k\n\x0eRepositoryType\x12\x1f\n\x1bREPOSITORY_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\x15\n\x11GITHUB_ENTERPRISE\x10\x02\x12\x15\n\x11GITLAB_ENTERPRISE\x10\x03\x42\x08\n\x06\x66ilter\"\xdc\x01\n\x12GitHubEventsConfig\x12\x1b\n\x0finstallation_id\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x0c\n\x04name\x18\x07 \x01(\t\x12H\n\x0cpull_request\x18\x04 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x05 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\x42\x07\n\x05\x65vent\"\xff\x02\n\x0cPubsubConfig\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x45\n\x15service_account_email\x18\x03 \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12@\n\x05state\x18\x04 \x01(\x0e\x32\x31.google.devtools.cloudbuild.v1.PubsubConfig.State\"s\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x18\n\x14SUBSCRIPTION_DELETED\x10\x02\x12\x11\n\rTOPIC_DELETED\x10\x03\x12\x1e\n\x1aSUBSCRIPTION_MISCONFIGURED\x10\x04\"\xe3\x01\n\rWebhookConfig\x12\x44\n\x06secret\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x12\x41\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.devtools.cloudbuild.v1.WebhookConfig.State\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x12\n\x0eSECRET_DELETED\x10\x02\x42\r\n\x0b\x61uth_method\"\x94\x02\n\x11PullRequestFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12X\n\x0f\x63omment_control\x18\x05 \x01(\x0e\x32?.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl\x12\x14\n\x0cinvert_regex\x18\x06 \x01(\x08\"r\n\x0e\x43ommentControl\x12\x15\n\x11\x43OMMENTS_DISABLED\x10\x00\x12\x14\n\x10\x43OMMENTS_ENABLED\x10\x01\x12\x33\n/COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY\x10\x02\x42\t\n\x07git_ref\"N\n\nPushFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12\r\n\x03tag\x18\x03 \x01(\tH\x00\x12\x14\n\x0cinvert_regex\x18\x04 \x01(\x08\x42\t\n\x07git_ref\"\xb4\x01\n\x19\x43reateBuildTriggerRequest\x12;\n\x06parent\x18\x03 \x01(\tB+\xfa\x41(\x12&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x02 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02\"\x85\x01\n\x16GetBuildTriggerRequest\x12\x39\n\x04name\x18\x03 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n\x18ListBuildTriggersRequest\x12;\n\x06parent\x18\x04 \x01(\tB+\xfa\x41(\x12&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x19ListBuildTriggersResponse\x12=\n\x08triggers\x18\x01 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x88\x01\n\x19\x44\x65leteBuildTriggerRequest\x12\x39\n\x04name\x18\x03 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc1\x01\n\x19UpdateBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x03 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa2\x0c\n\x0c\x42uildOptions\x12L\n\x16source_provenance_hash\x18\x01 \x03(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12Y\n\x17requested_verify_option\x18\x02 \x01(\x0e\x32\x38.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption\x12M\n\x0cmachine_type\x18\x03 \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.MachineType\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x03\x12[\n\x13substitution_option\x18\x04 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption\x12\x1d\n\x15\x64ynamic_substitutions\x18\x11 \x01(\x08\x12\x1d\n\x15\x61utomap_substitutions\x18\x16 \x01(\x08\x12\\\n\x14log_streaming_option\x18\x05 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption\x12\x17\n\x0bworker_pool\x18\x07 \x01(\tB\x02\x18\x01\x12I\n\x04pool\x18\x13 \x01(\x0b\x32\x36.google.devtools.cloudbuild.v1.BuildOptions.PoolOptionB\x03\xe0\x41\x01\x12H\n\x07logging\x18\x0b \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode\x12\x0b\n\x03\x65nv\x18\x0c \x03(\t\x12\x12\n\nsecret_env\x18\r \x03(\t\x12\x36\n\x07volumes\x18\x0e \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12p\n\x1c\x64\x65\x66\x61ult_logs_bucket_behavior\x18\x15 \x01(\x0e\x32\x45.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehaviorB\x03\xe0\x41\x01\x12&\n\x19\x65nable_structured_logging\x18\x17 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\nPoolOption\x12\x37\n\x04name\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\".\n\x0cVerifyOption\x12\x10\n\x0cNOT_VERIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01\"w\n\x0bMachineType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cN1_HIGHCPU_8\x10\x01\x12\x11\n\rN1_HIGHCPU_32\x10\x02\x12\x10\n\x0c\x45\x32_HIGHCPU_8\x10\x05\x12\x11\n\rE2_HIGHCPU_32\x10\x06\x12\r\n\tE2_MEDIUM\x10\x07\"5\n\x12SubstitutionOption\x12\x0e\n\nMUST_MATCH\x10\x00\x12\x0f\n\x0b\x41LLOW_LOOSE\x10\x01\"G\n\x12LogStreamingOption\x12\x12\n\x0eSTREAM_DEFAULT\x10\x00\x12\r\n\tSTREAM_ON\x10\x01\x12\x0e\n\nSTREAM_OFF\x10\x02\"|\n\x0bLoggingMode\x12\x17\n\x13LOGGING_UNSPECIFIED\x10\x00\x12\n\n\x06LEGACY\x10\x01\x12\x0c\n\x08GCS_ONLY\x10\x02\x12\x18\n\x10STACKDRIVER_ONLY\x10\x03\x1a\x02\x08\x01\x12\x16\n\x12\x43LOUD_LOGGING_ONLY\x10\x05\x12\x08\n\x04NONE\x10\x04\"|\n\x19\x44\x65\x66\x61ultLogsBucketBehavior\x12,\n(DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x1e\n\x1aREGIONAL_USER_OWNED_BUCKET\x10\x01\x12\x11\n\rLEGACY_BUCKET\x10\x02\"\x85\x01\n\x1cReceiveTriggerWebhookRequest\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\"\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x14.google.api.HttpBody\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x0f\n\x07trigger\x18\x03 \x01(\t\x12\x0e\n\x06secret\x18\x04 \x01(\t\"\x1f\n\x1dReceiveTriggerWebhookResponse\"\x89\x04\n\x16GitHubEnterpriseConfig\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x08host_url\x18\x03 \x01(\t\x12\x13\n\x06\x61pp_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0bwebhook_key\x18\x08 \x01(\t\x12>\n\x0epeered_network\x18\t \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12G\n\x07secrets\x18\n \x01(\x0b\x32\x36.google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x13\n\x06ssl_ca\x18\x0c \x01(\tB\x03\xe0\x41\x01:\xb5\x01\xea\x41\xb1\x01\n0cloudbuild.googleapis.com/GithubEnterpriseConfig\x12\x33projects/{project}/githubEnterpriseConfigs/{config}\x12Hprojects/{project}/locations/{location}/githubEnterpriseConfigs/{config}\"\xed\x02\n\x17GitHubEnterpriseSecrets\x12Q\n\x18private_key_version_name\x18\x05 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12T\n\x1bwebhook_secret_version_name\x18\x06 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12R\n\x19oauth_secret_version_name\x18\x07 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12U\n\x1coauth_client_id_version_name\x18\x08 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x96\x06\n\nWorkerPool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12O\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32:.google.devtools.cloudbuild.v1.WorkerPool.AnnotationsEntry\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x05state\x18\x08 \x01(\x0e\x32/.google.devtools.cloudbuild.v1.WorkerPool.StateB\x03\xe0\x41\x03\x12T\n\x16private_pool_v1_config\x18\x0c \x01(\x0b\x32\x32.google.devtools.cloudbuild.v1.PrivatePoolV1ConfigH\x00\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x89\x01\xea\x41\x85\x01\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}*\x0bworkerPools2\nworkerPoolR\x01\x01\x42\x08\n\x06\x63onfig\"\xba\x07\n\x13PrivatePoolV1Config\x12V\n\rworker_config\x18\x01 \x01(\x0b\x32?.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig\x12X\n\x0enetwork_config\x18\x02 \x01(\x0b\x32@.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig\x12n\n\x17private_service_connect\x18\x05 \x01(\x0b\x32H.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnectB\x03\xe0\x41\x05\x1a\x90\x01\n\x0cWorkerConfig\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x03\x12.\n\x1c\x65nable_nested_virtualization\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualization\x1a\xb6\x02\n\rNetworkConfig\x12\x41\n\x0epeered_network\x18\x01 \x01(\tB)\xe0\x41\x05\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x64\n\regress_option\x18\x02 \x01(\x0e\x32M.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption\x12$\n\x17peered_network_ip_range\x18\x03 \x01(\tB\x03\xe0\x41\x05\"V\n\x0c\x45gressOption\x12\x1d\n\x19\x45GRESS_OPTION_UNSPECIFIED\x10\x00\x12\x14\n\x10NO_PUBLIC_EGRESS\x10\x01\x12\x11\n\rPUBLIC_EGRESS\x10\x02\x1a\xb4\x01\n\x15PrivateServiceConnect\x12O\n\x12network_attachment\x18\x01 \x01(\tB3\xe0\x41\x05\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachment\x12*\n\x1apublic_ip_address_disabled\x18\x02 \x01(\x08\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11route_all_traffic\x18\x03 \x01(\x08\x42\x03\xe0\x41\x05\"\xd0\x01\n\x17\x43reateWorkerPoolRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x0bworker_pool\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPoolB\x03\xe0\x41\x02\x12\x1e\n\x0eworker_pool_id\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"R\n\x14GetWorkerPoolRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\"\x96\x01\n\x17\x44\x65leteWorkerPoolRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xa6\x01\n\x17UpdateWorkerPoolRequest\x12\x43\n\x0bworker_pool\x18\x01 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPoolB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"z\n\x16ListWorkerPoolsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x17ListWorkerPoolsResponse\x12?\n\x0cworker_pools\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n!CreateWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc7\x01\n!UpdateWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc7\x01\n!DeleteWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xa1+\n\nCloudBuild\x12\xae\x02\n\x0b\x43reateBuild\x12\x31.google.devtools.cloudbuild.v1.CreateBuildRequest\x1a\x1d.google.longrunning.Operation\"\xcc\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x10project_id,build\x82\xd3\xe4\x93\x02^\" /v1/projects/{project_id}/builds:\x05\x62uildZ3\"*/v1/{parent=projects/*/locations/*}/builds:\x05\x62uild\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x88\x02\n\x08GetBuild\x12..google.devtools.cloudbuild.v1.GetBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build\"\xa5\x01\xda\x41\rproject_id,id\x82\xd3\xe4\x93\x02U\x12%/v1/projects/{project_id}/builds/{id}Z,\x12*/v1/{name=projects/*/locations/*/builds/*}\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\x91\x02\n\nListBuilds\x12\x30.google.devtools.cloudbuild.v1.ListBuildsRequest\x1a\x31.google.devtools.cloudbuild.v1.ListBuildsResponse\"\x9d\x01\xda\x41\x11project_id,filter\x82\xd3\xe4\x93\x02P\x12 /v1/projects/{project_id}/buildsZ,\x12*/v1/{parent=projects/*/locations/*}/builds\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xa2\x02\n\x0b\x43\x61ncelBuild\x12\x31.google.devtools.cloudbuild.v1.CancelBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build\"\xb9\x01\xda\x41\rproject_id,id\x82\xd3\xe4\x93\x02i\",/v1/projects/{project_id}/builds/{id}:cancel:\x01*Z6\"1/v1/{name=projects/*/locations/*/builds/*}:cancel:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xb9\x02\n\nRetryBuild\x12\x30.google.devtools.cloudbuild.v1.RetryBuildRequest\x1a\x1d.google.longrunning.Operation\"\xd9\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\rproject_id,id\x82\xd3\xe4\x93\x02g\"+/v1/projects/{project_id}/builds/{id}:retry:\x01*Z5\"0/v1/{name=projects/*/locations/*/builds/*}:retry:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xc1\x02\n\x0c\x41pproveBuild\x12\x32.google.devtools.cloudbuild.v1.ApproveBuildRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x14name,approval_result\x82\xd3\xe4\x93\x02\x64\"&/v1/{name=projects/*/builds/*}:approve:\x01*Z7\"2/v1/{name=projects/*/locations/*/builds/*}:approve:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xb2\x02\n\x12\x43reateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xb4\x01\xda\x41\x12project_id,trigger\x82\xd3\xe4\x93\x02\x66\"\"/v1/projects/{project_id}/triggers:\x07triggerZ7\",/v1/{parent=projects/*/locations/*}/triggers:\x07trigger\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xb3\x02\n\x0fGetBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.GetBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xbb\x01\xda\x41\x15project_id,trigger_id\x82\xd3\xe4\x93\x02\x61\x12//v1/projects/{project_id}/triggers/{trigger_id}Z.\x12,/v1/{name=projects/*/locations/*/triggers/*}\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\xa3\x02\n\x11ListBuildTriggers\x12\x37.google.devtools.cloudbuild.v1.ListBuildTriggersRequest\x1a\x38.google.devtools.cloudbuild.v1.ListBuildTriggersResponse\"\x9a\x01\xda\x41\nproject_id\x82\xd3\xe4\x93\x02T\x12\"/v1/projects/{project_id}/triggersZ.\x12,/v1/{parent=projects/*/locations/*}/triggers\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xa4\x02\n\x12\x44\x65leteBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest\x1a\x16.google.protobuf.Empty\"\xbb\x01\xda\x41\x15project_id,trigger_id\x82\xd3\xe4\x93\x02\x61*//v1/projects/{project_id}/triggers/{trigger_id}Z.*,/v1/{name=projects/*/locations/*/triggers/*}\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\xf6\x02\n\x12UpdateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xf8\x01\xda\x41\x1dproject_id,trigger_id,trigger\x82\xd3\xe4\x93\x02\x84\x01\x32//v1/projects/{project_id}/triggers/{trigger_id}:\x07triggerZH2=/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}:\x07trigger\x8a\xd3\xe4\x93\x02G\x12\x45\n\x15trigger.resource_name\x12,projects/*/locations/{location=*}/triggers/*\x12\xe1\x02\n\x0fRunBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.RunBuildTriggerRequest\x1a\x1d.google.longrunning.Operation\"\xf7\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x1cproject_id,trigger_id,source\x82\xd3\xe4\x93\x02t\"3/v1/projects/{project_id}/triggers/{trigger_id}:run:\x06sourceZ5\"0/v1/{name=projects/*/locations/*/triggers/*}:run:\x01*\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\x95\x02\n\x15ReceiveTriggerWebhook\x12;.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest\x1a<.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse\"\x80\x01\x82\xd3\xe4\x93\x02z\"4/v1/projects/{project_id}/triggers/{trigger}:webhook:\x04\x62odyZ<\"4/v1/{name=projects/*/locations/*/triggers/*}:webhook:\x04\x62ody\x12\xb9\x02\n\x10\x43reateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xcd\x01\xca\x41/\n\nWorkerPool\x12!CreateWorkerPoolOperationMetadata\xda\x41!parent,worker_pool,worker_pool_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/workerPools:\x0bworker_pool\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xee\x01\n\rGetWorkerPool\x12\x33.google.devtools.cloudbuild.v1.GetWorkerPoolRequest\x1a).google.devtools.cloudbuild.v1.WorkerPool\"}\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02\x39\x12\x37\n\x04name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xa6\x02\n\x10\x44\x65leteWorkerPool\x12\x36.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xba\x01\xca\x41:\n\x15google.protobuf.Empty\x12!DeleteWorkerPoolOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02\x39\x12\x37\n\x04name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xd3\x02\n\x10UpdateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xe7\x01\xca\x41/\n\nWorkerPool\x12!UpdateWorkerPoolOperationMetadata\xda\x41\x17worker_pool,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{worker_pool.name=projects/*/locations/*/workerPools/*}:\x0bworker_pool\x8a\xd3\xe4\x93\x02\x45\x12\x43\n\x10worker_pool.name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xf5\x01\n\x0fListWorkerPools\x12\x35.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest\x1a\x36.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse\"s\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/workerPools\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x1aM\xca\x41\x19\x63loudbuild.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\n\n\x18\x63om.google.cloudbuild.v1P\x01ZAcloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb;cloudbuildpb\xa2\x02\x03GCB\xaa\x02\x1aGoogle.Cloud.CloudBuild.V1\xca\x02\x15Google\\Cloud\\Build\\V1\xea\x02\x18Google::Cloud::Build::V1\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41J\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41\x66\n gkehub.googleapis.com/Membership\x12\x42projects/{project}/locations/{location}/memberships/{cluster_name}\xea\x41p\n!cloudkms.googleapis.com/CryptoKey\x12Kprojects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}\xea\x41U\n\"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41v\n(compute.googleapis.com/NetworkAttachment\x12Jprojects/{project}/regions/{region}/networkAttachments/{networkattachment}\xea\x41\x9e\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}\xea\x41\x82\x01\n$cloudbuild.googleapis.com/Repository\x12Zprojects/{project}/locations/{location}/connections/{connection}/repositories/{repository}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb b/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb index a8187731ffb2..05aa2b74b0f5 100644 --- a/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb +++ b/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb @@ -2406,7 +2406,7 @@ class PrivatePoolV1Config # the pool. # @!attribute [rw] machine_type # @return [::String] - # Machine type of a worker, such as `e2-medium`. + # Optional. Machine type of a worker, such as `e2-medium`. # See [Worker pool config # file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). # If left blank, Cloud Build will use a sensible default. @@ -2415,8 +2415,12 @@ class PrivatePoolV1Config # Size of the disk attached to the worker, in GB. # See [Worker pool config # file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). - # Specify a value of up to 2000. If `0` is specified, Cloud Build will use + # Specify a value of up to 4000. If `0` is specified, Cloud Build will use # a standard disk size. + # @!attribute [rw] enable_nested_virtualization + # @return [::Boolean] + # Optional. Enable nested virtualization on the worker, if supported by the + # machine type. By default, nested virtualization is disabled. class WorkerConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb b/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb index b9006ac6481f..24ce9ece3552 100644 --- a/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb +++ b/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/cloudbuild/v1/cloudbuild_pb" -require "google/devtools/cloudbuild/v1/cloudbuild_services_pb" require "google/cloud/build/v1/cloud_build" class ::Google::Cloud::Build::V1::CloudBuild::ClientTest < Minitest::Test From 242674d701b8d3b6149bff47fa57016f0d2f8176 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:20:35 -0700 Subject: [PATCH 442/457] chore: use HTTP binding configuration class from new gapic-common (#30838) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWFkcy1hZF9tYW5hZ2VyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWFkcy1tYXJrZXRpbmdfcGxhdGZvcm0tYWRtaW4tdjFhbHBoYS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWFuYWx5dGljcy1hZG1pbi12MWFscGhhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWFuYWx5dGljcy1kYXRhLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWFwcHMtY2hhdC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWFwcHMtZXZlbnRzLXN1YnNjcmlwdGlvbnMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWFwcHMtZXZlbnRzLXN1YnNjcmlwdGlvbnMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWFwcHMtbWVldC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWFwcHMtbWVldC12MmJldGEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWFyZWExMjAtdGFibGVzLXYxYWxwaGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFjY2Vzc19hcHByb3ZhbC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFkdmlzb3J5X25vdGlmaWNhdGlvbnMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFpX3BsYXRmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFsbG95X2RiLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFsbG95X2RiLXYxYWxwaGEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFsbG95X2RiLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwaV9nYXRld2F5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwaV9odWItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwaV9rZXlzLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwaWdlZV9jb25uZWN0LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-ads-ad_manager-v1.gemspec | 2 +- ...s-marketing_platform-admin-v1alpha.gemspec | 2 +- .../marketingplatform_admin_service_test.rb | 1 - .../google-analytics-admin-v1alpha.gemspec | 2 +- .../v1alpha/analytics_admin_service_test.rb | 1 - .../google-analytics-data-v1beta.gemspec | 2 +- .../data/v1beta/analytics_data_test.rb | 1 - .../google-apps-chat-v1.gemspec | 2 +- .../google/apps/chat/v1/chat_service_test.rb | 1 - ...oogle-apps-events-subscriptions-v1.gemspec | 2 +- .../v1/subscriptions_service_test.rb | 1 - ...e-apps-events-subscriptions-v1beta.gemspec | 2 +- .../v1beta/subscriptions_service_test.rb | 1 - .../google-apps-meet-v2.gemspec | 2 +- .../v2/conference_records_service_test.rb | 1 - .../apps/meet/v2/spaces_service_test.rb | 1 - .../google-apps-meet-v2beta.gemspec | 2 +- .../v2beta/conference_records_service_test.rb | 1 - .../apps/meet/v2beta/spaces_service_test.rb | 1 - .../google-area120-tables-v1alpha1.gemspec | 2 +- .../tables/v1alpha1/tables_service_test.rb | 1 - .../google-cloud-access_approval-v1.gemspec | 2 +- .../v1/access_approval_test.rb | 1 - ...le-cloud-advisory_notifications-v1.gemspec | 2 +- .../v1/advisory_notifications_service_test.rb | 1 - .../google-cloud-ai_platform-v1.gemspec | 2 +- .../cloud/ai_platform/v1/bindings_override.rb | 31 ++----------------- .../ai_platform/v1/dataset_service_test.rb | 1 - .../deployment_resource_pool_service_test.rb | 1 - .../ai_platform/v1/endpoint_service_test.rb | 1 - .../ai_platform/v1/evaluation_service_test.rb | 1 - ...feature_online_store_admin_service_test.rb | 1 - .../v1/feature_online_store_service_test.rb | 1 - .../v1/feature_registry_service_test.rb | 1 - ...eaturestore_online_serving_service_test.rb | 1 - .../v1/featurestore_service_test.rb | 1 - .../v1/gen_ai_cache_service_test.rb | 1 - .../v1/gen_ai_tuning_service_test.rb | 1 - .../v1/index_endpoint_service_test.rb | 1 - .../ai_platform/v1/index_service_test.rb | 1 - .../cloud/ai_platform/v1/job_service_test.rb | 1 - .../v1/llm_utility_service_test.rb | 1 - .../ai_platform/v1/match_service_test.rb | 1 - .../ai_platform/v1/metadata_service_test.rb | 1 - .../ai_platform/v1/migration_service_test.rb | 1 - .../v1/model_garden_service_test.rb | 1 - .../ai_platform/v1/model_service_test.rb | 1 - .../ai_platform/v1/notebook_service_test.rb | 1 - .../v1/persistent_resource_service_test.rb | 1 - .../ai_platform/v1/pipeline_service_test.rb | 1 - .../ai_platform/v1/prediction_service_test.rb | 1 - ...reasoning_engine_execution_service_test.rb | 1 - .../v1/reasoning_engine_service_test.rb | 1 - .../ai_platform/v1/schedule_service_test.rb | 1 - .../v1/specialist_pool_service_test.rb | 1 - .../v1/tensorboard_service_test.rb | 1 - .../v1/vertex_rag_data_service_test.rb | 1 - .../ai_platform/v1/vertex_rag_service_test.rb | 1 - .../ai_platform/v1/vizier_service_test.rb | 1 - .../google-cloud-alloy_db-v1.gemspec | 2 +- .../cloud/alloy_db/v1/bindings_override.rb | 31 ++----------------- .../cloud/alloy_db/v1/alloy_db_admin_test.rb | 1 - .../v1/alloy_db_cloud_sql_admin_test.rb | 1 - .../google-cloud-alloy_db-v1alpha.gemspec | 2 +- .../alloy_db/v1alpha/bindings_override.rb | 31 ++----------------- .../alloy_db/v1alpha/alloy_db_admin_test.rb | 1 - .../v1alpha/alloy_db_cloud_sql_admin_test.rb | 1 - .../google-cloud-alloy_db-v1beta.gemspec | 2 +- .../alloy_db/v1beta/bindings_override.rb | 31 ++----------------- .../alloy_db/v1beta/alloy_db_admin_test.rb | 1 - .../v1beta/alloy_db_cloud_sql_admin_test.rb | 1 - .../google-cloud-api_gateway-v1.gemspec | 2 +- .../v1/api_gateway_service_test.rb | 1 - .../google-cloud-api_hub-v1.gemspec | 2 +- .../cloud/api_hub/v1/bindings_override.rb | 31 ++----------------- .../google-cloud-api_keys-v2.gemspec | 2 +- .../google/cloud/api_keys/v2/api_keys_test.rb | 1 - .../google-cloud-apigee_connect-v1.gemspec | 2 +- .../v1/connection_service_test.rb | 1 - .../cloud/apigee_connect/v1/tether_test.rb | 1 - 80 files changed, 30 insertions(+), 220 deletions(-) diff --git a/google-ads-ad_manager-v1/google-ads-ad_manager-v1.gemspec b/google-ads-ad_manager-v1/google-ads-ad_manager-v1.gemspec index d85d9cadef2e..2e294e551b05 100644 --- a/google-ads-ad_manager-v1/google-ads-ad_manager-v1.gemspec +++ b/google-ads-ad_manager-v1/google-ads-ad_manager-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-ads-marketing_platform-admin-v1alpha/google-ads-marketing_platform-admin-v1alpha.gemspec b/google-ads-marketing_platform-admin-v1alpha/google-ads-marketing_platform-admin-v1alpha.gemspec index 9368e9c00835..5d06c9ded5f8 100644 --- a/google-ads-marketing_platform-admin-v1alpha/google-ads-marketing_platform-admin-v1alpha.gemspec +++ b/google-ads-marketing_platform-admin-v1alpha/google-ads-marketing_platform-admin-v1alpha.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-ads-marketing_platform-admin-v1alpha/test/google/ads/marketing_platform/admin/v1alpha/marketingplatform_admin_service_test.rb b/google-ads-marketing_platform-admin-v1alpha/test/google/ads/marketing_platform/admin/v1alpha/marketingplatform_admin_service_test.rb index 2f4ebfeacf3f..2581904db135 100644 --- a/google-ads-marketing_platform-admin-v1alpha/test/google/ads/marketing_platform/admin/v1alpha/marketingplatform_admin_service_test.rb +++ b/google-ads-marketing_platform-admin-v1alpha/test/google/ads/marketing_platform/admin/v1alpha/marketingplatform_admin_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/marketingplatform/admin/v1alpha/marketingplatform_admin_pb" -require "google/marketingplatform/admin/v1alpha/marketingplatform_admin_services_pb" require "google/ads/marketing_platform/admin/v1alpha/marketingplatform_admin_service" class ::Google::Ads::MarketingPlatform::Admin::V1alpha::MarketingplatformAdminService::ClientTest < Minitest::Test diff --git a/google-analytics-admin-v1alpha/google-analytics-admin-v1alpha.gemspec b/google-analytics-admin-v1alpha/google-analytics-admin-v1alpha.gemspec index dc7dd39ccf69..a2f426517ce6 100644 --- a/google-analytics-admin-v1alpha/google-analytics-admin-v1alpha.gemspec +++ b/google-analytics-admin-v1alpha/google-analytics-admin-v1alpha.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_test.rb b/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_test.rb index f1f2ca950f38..33405ee3b532 100644 --- a/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_test.rb +++ b/google-analytics-admin-v1alpha/test/google/analytics/admin/v1alpha/analytics_admin_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/analytics/admin/v1alpha/analytics_admin_pb" -require "google/analytics/admin/v1alpha/analytics_admin_services_pb" require "google/analytics/admin/v1alpha/analytics_admin_service" class ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::ClientTest < Minitest::Test diff --git a/google-analytics-data-v1beta/google-analytics-data-v1beta.gemspec b/google-analytics-data-v1beta/google-analytics-data-v1beta.gemspec index cf9742da46a3..fed2d9ee34f7 100644 --- a/google-analytics-data-v1beta/google-analytics-data-v1beta.gemspec +++ b/google-analytics-data-v1beta/google-analytics-data-v1beta.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-analytics-data-v1beta/test/google/analytics/data/v1beta/analytics_data_test.rb b/google-analytics-data-v1beta/test/google/analytics/data/v1beta/analytics_data_test.rb index f24c15d3147b..e9a62bbec105 100644 --- a/google-analytics-data-v1beta/test/google/analytics/data/v1beta/analytics_data_test.rb +++ b/google-analytics-data-v1beta/test/google/analytics/data/v1beta/analytics_data_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/analytics/data/v1beta/analytics_data_api_pb" -require "google/analytics/data/v1beta/analytics_data_api_services_pb" require "google/analytics/data/v1beta/analytics_data" class ::Google::Analytics::Data::V1beta::AnalyticsData::ClientTest < Minitest::Test diff --git a/google-apps-chat-v1/google-apps-chat-v1.gemspec b/google-apps-chat-v1/google-apps-chat-v1.gemspec index 77a9aa5b4514..b1ce8d7a2aca 100644 --- a/google-apps-chat-v1/google-apps-chat-v1.gemspec +++ b/google-apps-chat-v1/google-apps-chat-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-apps-card-v1", "> 0.0", "< 2.a" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_test.rb b/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_test.rb index 1f3fb4fbbc47..d382934aaeed 100644 --- a/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_test.rb +++ b/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/chat/v1/chat_service_pb" -require "google/chat/v1/chat_service_services_pb" require "google/apps/chat/v1/chat_service" class ::Google::Apps::Chat::V1::ChatService::ClientTest < Minitest::Test diff --git a/google-apps-events-subscriptions-v1/google-apps-events-subscriptions-v1.gemspec b/google-apps-events-subscriptions-v1/google-apps-events-subscriptions-v1.gemspec index 24e925f52ce0..95dcca303871 100644 --- a/google-apps-events-subscriptions-v1/google-apps-events-subscriptions-v1.gemspec +++ b/google-apps-events-subscriptions-v1/google-apps-events-subscriptions-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-apps-events-subscriptions-v1/test/google/apps/events/subscriptions/v1/subscriptions_service_test.rb b/google-apps-events-subscriptions-v1/test/google/apps/events/subscriptions/v1/subscriptions_service_test.rb index 721984937699..1fa960b86973 100644 --- a/google-apps-events-subscriptions-v1/test/google/apps/events/subscriptions/v1/subscriptions_service_test.rb +++ b/google-apps-events-subscriptions-v1/test/google/apps/events/subscriptions/v1/subscriptions_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/apps/events/subscriptions/v1/subscriptions_service_pb" -require "google/apps/events/subscriptions/v1/subscriptions_service_services_pb" require "google/apps/events/subscriptions/v1/subscriptions_service" class ::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::ClientTest < Minitest::Test diff --git a/google-apps-events-subscriptions-v1beta/google-apps-events-subscriptions-v1beta.gemspec b/google-apps-events-subscriptions-v1beta/google-apps-events-subscriptions-v1beta.gemspec index fb29126080dc..e0defaf0c7b8 100644 --- a/google-apps-events-subscriptions-v1beta/google-apps-events-subscriptions-v1beta.gemspec +++ b/google-apps-events-subscriptions-v1beta/google-apps-events-subscriptions-v1beta.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb index f671b2542b52..bbdbbb657223 100644 --- a/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb +++ b/google-apps-events-subscriptions-v1beta/test/google/apps/events/subscriptions/v1beta/subscriptions_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/apps/events/subscriptions/v1beta/subscriptions_service_pb" -require "google/apps/events/subscriptions/v1beta/subscriptions_service_services_pb" require "google/apps/events/subscriptions/v1beta/subscriptions_service" class ::Google::Apps::Events::Subscriptions::V1beta::SubscriptionsService::ClientTest < Minitest::Test diff --git a/google-apps-meet-v2/google-apps-meet-v2.gemspec b/google-apps-meet-v2/google-apps-meet-v2.gemspec index 6d069455228a..f8080ae8570a 100644 --- a/google-apps-meet-v2/google-apps-meet-v2.gemspec +++ b/google-apps-meet-v2/google-apps-meet-v2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-apps-meet-v2/test/google/apps/meet/v2/conference_records_service_test.rb b/google-apps-meet-v2/test/google/apps/meet/v2/conference_records_service_test.rb index 437efa34b099..5ef476a11284 100644 --- a/google-apps-meet-v2/test/google/apps/meet/v2/conference_records_service_test.rb +++ b/google-apps-meet-v2/test/google/apps/meet/v2/conference_records_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/apps/meet/v2/service_pb" -require "google/apps/meet/v2/service_services_pb" require "google/apps/meet/v2/conference_records_service" class ::Google::Apps::Meet::V2::ConferenceRecordsService::ClientTest < Minitest::Test diff --git a/google-apps-meet-v2/test/google/apps/meet/v2/spaces_service_test.rb b/google-apps-meet-v2/test/google/apps/meet/v2/spaces_service_test.rb index 310092af6331..1623f071c9cd 100644 --- a/google-apps-meet-v2/test/google/apps/meet/v2/spaces_service_test.rb +++ b/google-apps-meet-v2/test/google/apps/meet/v2/spaces_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/apps/meet/v2/service_pb" -require "google/apps/meet/v2/service_services_pb" require "google/apps/meet/v2/spaces_service" class ::Google::Apps::Meet::V2::SpacesService::ClientTest < Minitest::Test diff --git a/google-apps-meet-v2beta/google-apps-meet-v2beta.gemspec b/google-apps-meet-v2beta/google-apps-meet-v2beta.gemspec index 975eb0b02617..412f5fad0e2c 100644 --- a/google-apps-meet-v2beta/google-apps-meet-v2beta.gemspec +++ b/google-apps-meet-v2beta/google-apps-meet-v2beta.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-apps-meet-v2beta/test/google/apps/meet/v2beta/conference_records_service_test.rb b/google-apps-meet-v2beta/test/google/apps/meet/v2beta/conference_records_service_test.rb index 7007338722df..25035899a298 100644 --- a/google-apps-meet-v2beta/test/google/apps/meet/v2beta/conference_records_service_test.rb +++ b/google-apps-meet-v2beta/test/google/apps/meet/v2beta/conference_records_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/apps/meet/v2beta/service_pb" -require "google/apps/meet/v2beta/service_services_pb" require "google/apps/meet/v2beta/conference_records_service" class ::Google::Apps::Meet::V2beta::ConferenceRecordsService::ClientTest < Minitest::Test diff --git a/google-apps-meet-v2beta/test/google/apps/meet/v2beta/spaces_service_test.rb b/google-apps-meet-v2beta/test/google/apps/meet/v2beta/spaces_service_test.rb index b90406243058..fb9caa3f5b3b 100644 --- a/google-apps-meet-v2beta/test/google/apps/meet/v2beta/spaces_service_test.rb +++ b/google-apps-meet-v2beta/test/google/apps/meet/v2beta/spaces_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/apps/meet/v2beta/service_pb" -require "google/apps/meet/v2beta/service_services_pb" require "google/apps/meet/v2beta/spaces_service" class ::Google::Apps::Meet::V2beta::SpacesService::ClientTest < Minitest::Test diff --git a/google-area120-tables-v1alpha1/google-area120-tables-v1alpha1.gemspec b/google-area120-tables-v1alpha1/google-area120-tables-v1alpha1.gemspec index ade963bc3a7e..c4bc8a279e64 100644 --- a/google-area120-tables-v1alpha1/google-area120-tables-v1alpha1.gemspec +++ b/google-area120-tables-v1alpha1/google-area120-tables-v1alpha1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-area120-tables-v1alpha1/test/google/area120/tables/v1alpha1/tables_service_test.rb b/google-area120-tables-v1alpha1/test/google/area120/tables/v1alpha1/tables_service_test.rb index 431a4a5353ca..bdd5aed9b4b2 100644 --- a/google-area120-tables-v1alpha1/test/google/area120/tables/v1alpha1/tables_service_test.rb +++ b/google-area120-tables-v1alpha1/test/google/area120/tables/v1alpha1/tables_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/area120/tables/v1alpha1/tables_pb" -require "google/area120/tables/v1alpha1/tables_services_pb" require "google/area120/tables/v1alpha1/tables_service" class ::Google::Area120::Tables::V1alpha1::TablesService::ClientTest < Minitest::Test diff --git a/google-cloud-access_approval-v1/google-cloud-access_approval-v1.gemspec b/google-cloud-access_approval-v1/google-cloud-access_approval-v1.gemspec index 785f9631a45d..fa3eb958f463 100644 --- a/google-cloud-access_approval-v1/google-cloud-access_approval-v1.gemspec +++ b/google-cloud-access_approval-v1/google-cloud-access_approval-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-access_approval-v1/test/google/cloud/access_approval/v1/access_approval_test.rb b/google-cloud-access_approval-v1/test/google/cloud/access_approval/v1/access_approval_test.rb index 3b5982e6f207..d808947fdab2 100644 --- a/google-cloud-access_approval-v1/test/google/cloud/access_approval/v1/access_approval_test.rb +++ b/google-cloud-access_approval-v1/test/google/cloud/access_approval/v1/access_approval_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/accessapproval/v1/accessapproval_pb" -require "google/cloud/accessapproval/v1/accessapproval_services_pb" require "google/cloud/access_approval/v1/access_approval" class ::Google::Cloud::AccessApproval::V1::AccessApproval::ClientTest < Minitest::Test diff --git a/google-cloud-advisory_notifications-v1/google-cloud-advisory_notifications-v1.gemspec b/google-cloud-advisory_notifications-v1/google-cloud-advisory_notifications-v1.gemspec index 69a84d3adaee..fdd7048dc2e7 100644 --- a/google-cloud-advisory_notifications-v1/google-cloud-advisory_notifications-v1.gemspec +++ b/google-cloud-advisory_notifications-v1/google-cloud-advisory_notifications-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-advisory_notifications-v1/test/google/cloud/advisory_notifications/v1/advisory_notifications_service_test.rb b/google-cloud-advisory_notifications-v1/test/google/cloud/advisory_notifications/v1/advisory_notifications_service_test.rb index 0d14124b0bbe..7492d73916f1 100644 --- a/google-cloud-advisory_notifications-v1/test/google/cloud/advisory_notifications/v1/advisory_notifications_service_test.rb +++ b/google-cloud-advisory_notifications-v1/test/google/cloud/advisory_notifications/v1/advisory_notifications_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/advisorynotifications/v1/service_pb" -require "google/cloud/advisorynotifications/v1/service_services_pb" require "google/cloud/advisory_notifications/v1/advisory_notifications_service" class ::Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/google-cloud-ai_platform-v1.gemspec b/google-cloud-ai_platform-v1/google-cloud-ai_platform-v1.gemspec index b45c57a49416..e9b2fce36543 100644 --- a/google-cloud-ai_platform-v1/google-cloud-ai_platform-v1.gemspec +++ b/google-cloud-ai_platform-v1/google-cloud-ai_platform-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/bindings_override.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/bindings_override.rb index 67b65a4722c1..15f5ecbbdd27 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/bindings_override.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -438,33 +438,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.aiplatform.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.aiplatform.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/dataset_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/dataset_service_test.rb index 977cb2559f45..59007ed195e7 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/dataset_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/dataset_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/dataset_service_pb" -require "google/cloud/aiplatform/v1/dataset_service_services_pb" require "google/cloud/ai_platform/v1/dataset_service" class ::Google::Cloud::AIPlatform::V1::DatasetService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/deployment_resource_pool_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/deployment_resource_pool_service_test.rb index f662a6f75563..4ff8321115bc 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/deployment_resource_pool_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/deployment_resource_pool_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/deployment_resource_pool_service_pb" -require "google/cloud/aiplatform/v1/deployment_resource_pool_service_services_pb" require "google/cloud/ai_platform/v1/deployment_resource_pool_service" class ::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/endpoint_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/endpoint_service_test.rb index 6c2697c3a743..b02253e250aa 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/endpoint_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/endpoint_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/endpoint_service_pb" -require "google/cloud/aiplatform/v1/endpoint_service_services_pb" require "google/cloud/ai_platform/v1/endpoint_service" class ::Google::Cloud::AIPlatform::V1::EndpointService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/evaluation_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/evaluation_service_test.rb index efc0d2054798..987a745b76b1 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/evaluation_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/evaluation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/evaluation_service_pb" -require "google/cloud/aiplatform/v1/evaluation_service_services_pb" require "google/cloud/ai_platform/v1/evaluation_service" class ::Google::Cloud::AIPlatform::V1::EvaluationService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_admin_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_admin_service_test.rb index 8cb58e2c9f36..f4ae21a011eb 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_admin_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_admin_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/feature_online_store_admin_service_pb" -require "google/cloud/aiplatform/v1/feature_online_store_admin_service_services_pb" require "google/cloud/ai_platform/v1/feature_online_store_admin_service" class ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreAdminService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_service_test.rb index 4fd466b2d319..56e61fac84f8 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_online_store_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/feature_online_store_service_pb" -require "google/cloud/aiplatform/v1/feature_online_store_service_services_pb" require "google/cloud/ai_platform/v1/feature_online_store_service" class ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_registry_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_registry_service_test.rb index 5118b86615af..5afe3c252a71 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_registry_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/feature_registry_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/feature_registry_service_pb" -require "google/cloud/aiplatform/v1/feature_registry_service_services_pb" require "google/cloud/ai_platform/v1/feature_registry_service" class ::Google::Cloud::AIPlatform::V1::FeatureRegistryService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/featurestore_online_serving_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/featurestore_online_serving_service_test.rb index a61004b0a051..b195921c6a4e 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/featurestore_online_serving_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/featurestore_online_serving_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/featurestore_online_service_pb" -require "google/cloud/aiplatform/v1/featurestore_online_service_services_pb" require "google/cloud/ai_platform/v1/featurestore_online_serving_service" class ::Google::Cloud::AIPlatform::V1::FeaturestoreOnlineServingService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/featurestore_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/featurestore_service_test.rb index 62743acc1ff7..ceccd302c4ca 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/featurestore_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/featurestore_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/featurestore_service_pb" -require "google/cloud/aiplatform/v1/featurestore_service_services_pb" require "google/cloud/ai_platform/v1/featurestore_service" class ::Google::Cloud::AIPlatform::V1::FeaturestoreService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/gen_ai_cache_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/gen_ai_cache_service_test.rb index 1ebfda342178..d24dc9c44f1f 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/gen_ai_cache_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/gen_ai_cache_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/gen_ai_cache_service_pb" -require "google/cloud/aiplatform/v1/gen_ai_cache_service_services_pb" require "google/cloud/ai_platform/v1/gen_ai_cache_service" class ::Google::Cloud::AIPlatform::V1::GenAiCacheService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/gen_ai_tuning_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/gen_ai_tuning_service_test.rb index 7abcdb956910..8a393b56ecfd 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/gen_ai_tuning_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/gen_ai_tuning_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/genai_tuning_service_pb" -require "google/cloud/aiplatform/v1/genai_tuning_service_services_pb" require "google/cloud/ai_platform/v1/gen_ai_tuning_service" class ::Google::Cloud::AIPlatform::V1::GenAiTuningService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/index_endpoint_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/index_endpoint_service_test.rb index c6b763e1f38f..677d41c035fb 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/index_endpoint_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/index_endpoint_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/index_endpoint_service_pb" -require "google/cloud/aiplatform/v1/index_endpoint_service_services_pb" require "google/cloud/ai_platform/v1/index_endpoint_service" class ::Google::Cloud::AIPlatform::V1::IndexEndpointService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/index_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/index_service_test.rb index 41c5baf0108c..08d0a0a8f1fa 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/index_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/index_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/index_service_pb" -require "google/cloud/aiplatform/v1/index_service_services_pb" require "google/cloud/ai_platform/v1/index_service" class ::Google::Cloud::AIPlatform::V1::IndexService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/job_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/job_service_test.rb index 571f3887e9c6..9ab1c486fb0c 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/job_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/job_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/job_service_pb" -require "google/cloud/aiplatform/v1/job_service_services_pb" require "google/cloud/ai_platform/v1/job_service" class ::Google::Cloud::AIPlatform::V1::JobService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_test.rb index ead03bd29eb2..91e735910c4d 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/llm_utility_service_pb" -require "google/cloud/aiplatform/v1/llm_utility_service_services_pb" require "google/cloud/ai_platform/v1/llm_utility_service" class ::Google::Cloud::AIPlatform::V1::LlmUtilityService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/match_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/match_service_test.rb index aec85a5091d7..c7019908a98c 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/match_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/match_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/match_service_pb" -require "google/cloud/aiplatform/v1/match_service_services_pb" require "google/cloud/ai_platform/v1/match_service" class ::Google::Cloud::AIPlatform::V1::MatchService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/metadata_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/metadata_service_test.rb index bc78707ca6c0..8488dd6bf48f 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/metadata_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/metadata_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/metadata_service_pb" -require "google/cloud/aiplatform/v1/metadata_service_services_pb" require "google/cloud/ai_platform/v1/metadata_service" class ::Google::Cloud::AIPlatform::V1::MetadataService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/migration_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/migration_service_test.rb index e90558614197..a80db4193e47 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/migration_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/migration_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/migration_service_pb" -require "google/cloud/aiplatform/v1/migration_service_services_pb" require "google/cloud/ai_platform/v1/migration_service" class ::Google::Cloud::AIPlatform::V1::MigrationService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_test.rb index cd2bfac66f64..bfd88a528749 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_garden_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/model_garden_service_pb" -require "google/cloud/aiplatform/v1/model_garden_service_services_pb" require "google/cloud/ai_platform/v1/model_garden_service" class ::Google::Cloud::AIPlatform::V1::ModelGardenService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_test.rb index 5aee1706529b..2f310a22d819 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/model_service_pb" -require "google/cloud/aiplatform/v1/model_service_services_pb" require "google/cloud/ai_platform/v1/model_service" class ::Google::Cloud::AIPlatform::V1::ModelService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/notebook_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/notebook_service_test.rb index 17883f25acb8..5941c82ccd4b 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/notebook_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/notebook_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/notebook_service_pb" -require "google/cloud/aiplatform/v1/notebook_service_services_pb" require "google/cloud/ai_platform/v1/notebook_service" class ::Google::Cloud::AIPlatform::V1::NotebookService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/persistent_resource_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/persistent_resource_service_test.rb index 8befeba38a3b..0d4f3eda0a9d 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/persistent_resource_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/persistent_resource_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/persistent_resource_service_pb" -require "google/cloud/aiplatform/v1/persistent_resource_service_services_pb" require "google/cloud/ai_platform/v1/persistent_resource_service" class ::Google::Cloud::AIPlatform::V1::PersistentResourceService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/pipeline_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/pipeline_service_test.rb index a489638a7071..5014ea586151 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/pipeline_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/pipeline_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/pipeline_service_pb" -require "google/cloud/aiplatform/v1/pipeline_service_services_pb" require "google/cloud/ai_platform/v1/pipeline_service" class ::Google::Cloud::AIPlatform::V1::PipelineService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb index 1fbdda8ab6ce..0aaa86e9e369 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/prediction_service_pb" -require "google/cloud/aiplatform/v1/prediction_service_services_pb" require "google/cloud/ai_platform/v1/prediction_service" class ::Google::Cloud::AIPlatform::V1::PredictionService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_execution_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_execution_service_test.rb index af4e50acdd1e..5ed2c2ff77ff 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_execution_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_execution_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/reasoning_engine_execution_service_pb" -require "google/cloud/aiplatform/v1/reasoning_engine_execution_service_services_pb" require "google/cloud/ai_platform/v1/reasoning_engine_execution_service" class ::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_service_test.rb index 186acf9d057c..df4e9c76a412 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/reasoning_engine_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/reasoning_engine_service_pb" -require "google/cloud/aiplatform/v1/reasoning_engine_service_services_pb" require "google/cloud/ai_platform/v1/reasoning_engine_service" class ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/schedule_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/schedule_service_test.rb index ad057606356d..dcdc578603e2 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/schedule_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/schedule_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/schedule_service_pb" -require "google/cloud/aiplatform/v1/schedule_service_services_pb" require "google/cloud/ai_platform/v1/schedule_service" class ::Google::Cloud::AIPlatform::V1::ScheduleService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/specialist_pool_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/specialist_pool_service_test.rb index 0e10b13cdf5a..71189dcdf43e 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/specialist_pool_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/specialist_pool_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/specialist_pool_service_pb" -require "google/cloud/aiplatform/v1/specialist_pool_service_services_pb" require "google/cloud/ai_platform/v1/specialist_pool_service" class ::Google::Cloud::AIPlatform::V1::SpecialistPoolService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/tensorboard_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/tensorboard_service_test.rb index 40a541a190ed..64e87981fc6a 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/tensorboard_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/tensorboard_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/tensorboard_service_pb" -require "google/cloud/aiplatform/v1/tensorboard_service_services_pb" require "google/cloud/ai_platform/v1/tensorboard_service" class ::Google::Cloud::AIPlatform::V1::TensorboardService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_test.rb index bad229607d22..7d9915951309 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_data_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/vertex_rag_data_service_pb" -require "google/cloud/aiplatform/v1/vertex_rag_data_service_services_pb" require "google/cloud/ai_platform/v1/vertex_rag_data_service" class ::Google::Cloud::AIPlatform::V1::VertexRagDataService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_service_test.rb index 3fbcbe4bbee4..7388da0c430d 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vertex_rag_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/vertex_rag_service_pb" -require "google/cloud/aiplatform/v1/vertex_rag_service_services_pb" require "google/cloud/ai_platform/v1/vertex_rag_service" class ::Google::Cloud::AIPlatform::V1::VertexRagService::ClientTest < Minitest::Test diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vizier_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vizier_service_test.rb index 348237a986d2..a61389d66c82 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vizier_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/vizier_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/aiplatform/v1/vizier_service_pb" -require "google/cloud/aiplatform/v1/vizier_service_services_pb" require "google/cloud/ai_platform/v1/vizier_service" class ::Google::Cloud::AIPlatform::V1::VizierService::ClientTest < Minitest::Test diff --git a/google-cloud-alloy_db-v1/google-cloud-alloy_db-v1.gemspec b/google-cloud-alloy_db-v1/google-cloud-alloy_db-v1.gemspec index 147c56dfcaa3..7b58dba80e98 100644 --- a/google-cloud-alloy_db-v1/google-cloud-alloy_db-v1.gemspec +++ b/google-cloud-alloy_db-v1/google-cloud-alloy_db-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/bindings_override.rb b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/bindings_override.rb index a31df9880ff6..2f341777563f 100644 --- a/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/bindings_override.rb +++ b/google-cloud-alloy_db-v1/lib/google/cloud/alloy_db/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.alloydb.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.alloydb.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-alloy_db-v1/test/google/cloud/alloy_db/v1/alloy_db_admin_test.rb b/google-cloud-alloy_db-v1/test/google/cloud/alloy_db/v1/alloy_db_admin_test.rb index 363783d7292e..f47b201219ea 100644 --- a/google-cloud-alloy_db-v1/test/google/cloud/alloy_db/v1/alloy_db_admin_test.rb +++ b/google-cloud-alloy_db-v1/test/google/cloud/alloy_db/v1/alloy_db_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/alloydb/v1/service_pb" -require "google/cloud/alloydb/v1/service_services_pb" require "google/cloud/alloy_db/v1/alloy_db_admin" class ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-alloy_db-v1/test/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin_test.rb b/google-cloud-alloy_db-v1/test/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin_test.rb index 031585f0b481..593563a0b24b 100644 --- a/google-cloud-alloy_db-v1/test/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin_test.rb +++ b/google-cloud-alloy_db-v1/test/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/alloydb/v1/csql_service_pb" -require "google/cloud/alloydb/v1/csql_service_services_pb" require "google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin" class ::Google::Cloud::AlloyDB::V1::AlloyDBCloudSQLAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-alloy_db-v1alpha/google-cloud-alloy_db-v1alpha.gemspec b/google-cloud-alloy_db-v1alpha/google-cloud-alloy_db-v1alpha.gemspec index 92c9aba66464..910b2a03bb47 100644 --- a/google-cloud-alloy_db-v1alpha/google-cloud-alloy_db-v1alpha.gemspec +++ b/google-cloud-alloy_db-v1alpha/google-cloud-alloy_db-v1alpha.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/bindings_override.rb b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/bindings_override.rb index 118498bbf03a..0654005cfdb8 100644 --- a/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/bindings_override.rb +++ b/google-cloud-alloy_db-v1alpha/lib/google/cloud/alloy_db/v1alpha/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.alloydb.v1alpha package. - # - # This class contains common configuration for all services - # of the google.cloud.alloydb.v1alpha package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-alloy_db-v1alpha/test/google/cloud/alloy_db/v1alpha/alloy_db_admin_test.rb b/google-cloud-alloy_db-v1alpha/test/google/cloud/alloy_db/v1alpha/alloy_db_admin_test.rb index 720af0b6cdbe..3cffae071de2 100644 --- a/google-cloud-alloy_db-v1alpha/test/google/cloud/alloy_db/v1alpha/alloy_db_admin_test.rb +++ b/google-cloud-alloy_db-v1alpha/test/google/cloud/alloy_db/v1alpha/alloy_db_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/alloydb/v1alpha/service_pb" -require "google/cloud/alloydb/v1alpha/service_services_pb" require "google/cloud/alloy_db/v1alpha/alloy_db_admin" class ::Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-alloy_db-v1alpha/test/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin_test.rb b/google-cloud-alloy_db-v1alpha/test/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin_test.rb index 2191f8769366..bd2fe5902b85 100644 --- a/google-cloud-alloy_db-v1alpha/test/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin_test.rb +++ b/google-cloud-alloy_db-v1alpha/test/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/alloydb/v1alpha/csql_service_pb" -require "google/cloud/alloydb/v1alpha/csql_service_services_pb" require "google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin" class ::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-alloy_db-v1beta/google-cloud-alloy_db-v1beta.gemspec b/google-cloud-alloy_db-v1beta/google-cloud-alloy_db-v1beta.gemspec index 932e884c55d4..cfbe06cfe740 100644 --- a/google-cloud-alloy_db-v1beta/google-cloud-alloy_db-v1beta.gemspec +++ b/google-cloud-alloy_db-v1beta/google-cloud-alloy_db-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/bindings_override.rb b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/bindings_override.rb index 00925195dfa5..cf77c7e1d613 100644 --- a/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/bindings_override.rb +++ b/google-cloud-alloy_db-v1beta/lib/google/cloud/alloy_db/v1beta/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.alloydb.v1beta package. - # - # This class contains common configuration for all services - # of the google.cloud.alloydb.v1beta package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-alloy_db-v1beta/test/google/cloud/alloy_db/v1beta/alloy_db_admin_test.rb b/google-cloud-alloy_db-v1beta/test/google/cloud/alloy_db/v1beta/alloy_db_admin_test.rb index a37e70b372f5..b9483756bbd1 100644 --- a/google-cloud-alloy_db-v1beta/test/google/cloud/alloy_db/v1beta/alloy_db_admin_test.rb +++ b/google-cloud-alloy_db-v1beta/test/google/cloud/alloy_db/v1beta/alloy_db_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/alloydb/v1beta/service_pb" -require "google/cloud/alloydb/v1beta/service_services_pb" require "google/cloud/alloy_db/v1beta/alloy_db_admin" class ::Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-alloy_db-v1beta/test/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin_test.rb b/google-cloud-alloy_db-v1beta/test/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin_test.rb index 0bc6f56d2d6d..71427a786dfb 100644 --- a/google-cloud-alloy_db-v1beta/test/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin_test.rb +++ b/google-cloud-alloy_db-v1beta/test/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/alloydb/v1beta/csql_service_pb" -require "google/cloud/alloydb/v1beta/csql_service_services_pb" require "google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin" class ::Google::Cloud::AlloyDB::V1beta::AlloyDBCloudSQLAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-api_gateway-v1/google-cloud-api_gateway-v1.gemspec b/google-cloud-api_gateway-v1/google-cloud-api_gateway-v1.gemspec index 8ded40e6b7cf..26e96c95668b 100644 --- a/google-cloud-api_gateway-v1/google-cloud-api_gateway-v1.gemspec +++ b/google-cloud-api_gateway-v1/google-cloud-api_gateway-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-api_gateway-v1/test/google/cloud/api_gateway/v1/api_gateway_service_test.rb b/google-cloud-api_gateway-v1/test/google/cloud/api_gateway/v1/api_gateway_service_test.rb index e0ab2cea7dcb..f2d4bad7e64a 100644 --- a/google-cloud-api_gateway-v1/test/google/cloud/api_gateway/v1/api_gateway_service_test.rb +++ b/google-cloud-api_gateway-v1/test/google/cloud/api_gateway/v1/api_gateway_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/apigateway/v1/apigateway_service_pb" -require "google/cloud/apigateway/v1/apigateway_service_services_pb" require "google/cloud/api_gateway/v1/api_gateway_service" class ::Google::Cloud::ApiGateway::V1::ApiGatewayService::ClientTest < Minitest::Test diff --git a/google-cloud-api_hub-v1/google-cloud-api_hub-v1.gemspec b/google-cloud-api_hub-v1/google-cloud-api_hub-v1.gemspec index a6c735f17992..83d58e39457b 100644 --- a/google-cloud-api_hub-v1/google-cloud-api_hub-v1.gemspec +++ b/google-cloud-api_hub-v1/google-cloud-api_hub-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-api_hub-v1/lib/google/cloud/api_hub/v1/bindings_override.rb b/google-cloud-api_hub-v1/lib/google/cloud/api_hub/v1/bindings_override.rb index ce5e8cb7fcfa..8020a87e832b 100644 --- a/google-cloud-api_hub-v1/lib/google/cloud/api_hub/v1/bindings_override.rb +++ b/google-cloud-api_hub-v1/lib/google/cloud/api_hub/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.apihub.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.apihub.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-api_keys-v2/google-cloud-api_keys-v2.gemspec b/google-cloud-api_keys-v2/google-cloud-api_keys-v2.gemspec index 2de691ceec0d..ded156a3ff09 100644 --- a/google-cloud-api_keys-v2/google-cloud-api_keys-v2.gemspec +++ b/google-cloud-api_keys-v2/google-cloud-api_keys-v2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-api_keys-v2/test/google/cloud/api_keys/v2/api_keys_test.rb b/google-cloud-api_keys-v2/test/google/cloud/api_keys/v2/api_keys_test.rb index 4625d6dfda85..a687b7bb890a 100644 --- a/google-cloud-api_keys-v2/test/google/cloud/api_keys/v2/api_keys_test.rb +++ b/google-cloud-api_keys-v2/test/google/cloud/api_keys/v2/api_keys_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/api/apikeys/v2/apikeys_pb" -require "google/api/apikeys/v2/apikeys_services_pb" require "google/cloud/api_keys/v2/api_keys" class ::Google::Cloud::ApiKeys::V2::ApiKeys::ClientTest < Minitest::Test diff --git a/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec b/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec index ee5528f8c72d..c287504d74f1 100644 --- a/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec +++ b/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb b/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb index c1b7c211d676..b7c40f0c7802 100644 --- a/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb +++ b/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/apigeeconnect/v1/connection_pb" -require "google/cloud/apigeeconnect/v1/connection_services_pb" require "google/cloud/apigee_connect/v1/connection_service" class ::Google::Cloud::ApigeeConnect::V1::ConnectionService::ClientTest < Minitest::Test diff --git a/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb b/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb index d33e5641b13c..c990d979b529 100644 --- a/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb +++ b/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/apigeeconnect/v1/tether_pb" -require "google/cloud/apigeeconnect/v1/tether_services_pb" require "google/cloud/apigee_connect/v1/tether" class ::Google::Cloud::ApigeeConnect::V1::Tether::ClientTest < Minitest::Test From bf2b4f6ad52d58a307a55be7106b4a18fd052701 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:38:19 -0700 Subject: [PATCH 443/457] fix!: return type for a number of `list` and `list_` methods is changed to `::Gapic::Rest::PagedEnumerable` (#30628) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: re-enable Ruby generation for compute/DIREGAPIC (#1067) Source-Link: https://github.com/googleapis/googleapis/commit/e66a2db9b07400a0aaa6b4f7c7e29d39aeb948f3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/239226c0d65b8be229ddc24e8420d5db022016a4 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbXB1dGUtdjEvLk93bEJvdC55YW1sIiwiaCI6IjIzOTIyNmMwZDY1YjhiZTIyOWRkYzI0ZTg0MjBkNWRiMDIyMDE2YTQifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Update Compute Engine v1 API to revision 20250708 (#1073) Source-Link: https://github.com/googleapis/googleapis/commit/2ef62ea9b24d3ef8b432363661b8a267af576c43 Source-Link: https://github.com/googleapis/googleapis-gen/commit/35d446ab5ee77120bfd8d98498d28883add17a50 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbXB1dGUtdjEvLk93bEJvdC55YW1sIiwiaCI6IjM1ZDQ0NmFiNWVlNzcxMjBiZmQ4ZDk4NDk4ZDI4ODgzYWRkMTdhNTAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Update Compute Engine v1 API to revision 20250717 (#1074) Source-Link: https://github.com/googleapis/googleapis/commit/6764f0e25f7009fe696a5b4feabfe8ea4932faf4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6c2b3c1d534ab61b3ad11900e4feaa793b556223 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbXB1dGUtdjEvLk93bEJvdC55YW1sIiwiaCI6IjZjMmIzYzFkNTM0YWI2MWIzYWQxMTkwMGU0ZmVhYTc5M2I1NTYyMjMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Update Compute Engine v1 API to revision 20250728 (#1081) Source-Link: https://github.com/googleapis/googleapis/commit/23f1b4c82e4f090c013afbba0a323cdb22af8823 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9a939e78e4ba975d80b481ce955915d7c22c73fa Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbXB1dGUtdjEvLk93bEJvdC55YW1sIiwiaCI6IjlhOTM5ZTc4ZTRiYTk3NWQ4MGI0ODFjZTk1NTkxNWQ3YzIyYzczZmEifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Update Compute Engine v1 API to revision 20250729 (#1085) Source-Link: https://github.com/googleapis/googleapis/commit/a386edb638dffe9b8e58e9054f4f2ff0dacd0509 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5c37fde0c87bce9e7fd399851163b376c5a57314 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbXB1dGUtdjEvLk93bEJvdC55YW1sIiwiaCI6IjVjMzdmZGUwYzg3YmNlOWU3ZmQzOTk4NTExNjNiMzc2YzVhNTczMTQifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbXB1dGUtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- google-cloud-compute-v1/.owlbot-manifest.json | 18 + google-cloud-compute-v1/Gemfile | 2 +- .../google-cloud-compute-v1.gemspec | 2 +- .../lib/google/cloud/compute/v1.rb | 3 + .../lib/google/cloud/compute/v1/compute_pb.rb | 127 +- .../cloud/compute/v1/disks/rest/client.rb | 105 + .../compute/v1/disks/rest/service_stub.rb | 63 + .../rest/client.rb | 4 +- .../v1/interconnect_attachment_groups.rb | 47 + .../credentials.rb | 52 + .../v1/interconnect_attachment_groups/rest.rb | 51 + .../rest/client.rb | 1218 +++++++++ .../rest/service_stub.rb | 641 +++++ .../cloud/compute/v1/interconnect_groups.rb | 47 + .../v1/interconnect_groups/credentials.rb | 52 + .../compute/v1/interconnect_groups/rest.rb | 51 + .../v1/interconnect_groups/rest/client.rb | 1318 ++++++++++ .../interconnect_groups/rest/service_stub.rb | 704 +++++ .../cloud/compute/v1/licenses/rest/client.rb | 104 + .../compute/v1/licenses/rest/service_stub.rb | 63 + .../v1/network_profiles/rest/client.rb | 6 +- .../cloud/compute/v1/networks/rest/client.rb | 102 + .../compute/v1/networks/rest/service_stub.rb | 63 + .../v1/reservation_blocks/rest/client.rb | 5 +- .../compute/v1/reservation_sub_blocks.rb | 47 + .../v1/reservation_sub_blocks/credentials.rb | 52 + .../compute/v1/reservation_sub_blocks/rest.rb | 51 + .../v1/reservation_sub_blocks/rest/client.rb | 659 +++++ .../rest/service_stub.rb | 272 ++ .../lib/google/cloud/compute/v1/rest.rb | 3 + .../cloud/compute/v1/routers/rest/client.rb | 12 +- .../compute/v1/storage_pools/rest/client.rb | 12 +- .../compute/v1/subnetworks/rest/client.rb | 4 +- .../google/cloud/compute/v1/compute.rb | 2329 ++++++++++++++++- .../cloud/compute/v1/disks_rest_test.rb | 58 + ...nterconnect_attachment_groups_rest_test.rb | 606 +++++ .../v1/interconnect_groups_rest_test.rb | 662 +++++ .../cloud/compute/v1/licenses_rest_test.rb | 58 + .../cloud/compute/v1/networks_rest_test.rb | 57 + .../v1/reservation_blocks_rest_test.rb | 11 +- .../v1/reservation_sub_blocks_rest_test.rb | 275 ++ .../cloud/compute/v1/subnetworks_rest_test.rb | 11 +- 42 files changed, 9935 insertions(+), 92 deletions(-) create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/credentials.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/service_stub.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/credentials.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest/service_stub.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/credentials.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb create mode 100644 google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb create mode 100644 google-cloud-compute-v1/test/google/cloud/compute/v1/interconnect_attachment_groups_rest_test.rb create mode 100644 google-cloud-compute-v1/test/google/cloud/compute/v1/interconnect_groups_rest_test.rb create mode 100644 google-cloud-compute-v1/test/google/cloud/compute/v1/reservation_sub_blocks_rest_test.rb diff --git a/google-cloud-compute-v1/.owlbot-manifest.json b/google-cloud-compute-v1/.owlbot-manifest.json index 89926c820e20..045990a8b2fe 100644 --- a/google-cloud-compute-v1/.owlbot-manifest.json +++ b/google-cloud-compute-v1/.owlbot-manifest.json @@ -152,11 +152,21 @@ "lib/google/cloud/compute/v1/instant_snapshots/rest.rb", "lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb", "lib/google/cloud/compute/v1/instant_snapshots/rest/service_stub.rb", + "lib/google/cloud/compute/v1/interconnect_attachment_groups.rb", + "lib/google/cloud/compute/v1/interconnect_attachment_groups/credentials.rb", + "lib/google/cloud/compute/v1/interconnect_attachment_groups/rest.rb", + "lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb", + "lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/service_stub.rb", "lib/google/cloud/compute/v1/interconnect_attachments.rb", "lib/google/cloud/compute/v1/interconnect_attachments/credentials.rb", "lib/google/cloud/compute/v1/interconnect_attachments/rest.rb", "lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb", "lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb", + "lib/google/cloud/compute/v1/interconnect_groups.rb", + "lib/google/cloud/compute/v1/interconnect_groups/credentials.rb", + "lib/google/cloud/compute/v1/interconnect_groups/rest.rb", + "lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb", + "lib/google/cloud/compute/v1/interconnect_groups/rest/service_stub.rb", "lib/google/cloud/compute/v1/interconnect_locations.rb", "lib/google/cloud/compute/v1/interconnect_locations/credentials.rb", "lib/google/cloud/compute/v1/interconnect_locations/rest.rb", @@ -388,6 +398,11 @@ "lib/google/cloud/compute/v1/reservation_blocks/rest.rb", "lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb", "lib/google/cloud/compute/v1/reservation_blocks/rest/service_stub.rb", + "lib/google/cloud/compute/v1/reservation_sub_blocks.rb", + "lib/google/cloud/compute/v1/reservation_sub_blocks/credentials.rb", + "lib/google/cloud/compute/v1/reservation_sub_blocks/rest.rb", + "lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb", + "lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb", "lib/google/cloud/compute/v1/reservations.rb", "lib/google/cloud/compute/v1/reservations/credentials.rb", "lib/google/cloud/compute/v1/reservations/rest.rb", @@ -557,7 +572,9 @@ "test/google/cloud/compute/v1/instance_templates_rest_test.rb", "test/google/cloud/compute/v1/instances_rest_test.rb", "test/google/cloud/compute/v1/instant_snapshots_rest_test.rb", + "test/google/cloud/compute/v1/interconnect_attachment_groups_rest_test.rb", "test/google/cloud/compute/v1/interconnect_attachments_rest_test.rb", + "test/google/cloud/compute/v1/interconnect_groups_rest_test.rb", "test/google/cloud/compute/v1/interconnect_locations_rest_test.rb", "test/google/cloud/compute/v1/interconnect_remote_locations_rest_test.rb", "test/google/cloud/compute/v1/interconnects_rest_test.rb", @@ -604,6 +621,7 @@ "test/google/cloud/compute/v1/region_zones_rest_test.rb", "test/google/cloud/compute/v1/regions_rest_test.rb", "test/google/cloud/compute/v1/reservation_blocks_rest_test.rb", + "test/google/cloud/compute/v1/reservation_sub_blocks_rest_test.rb", "test/google/cloud/compute/v1/reservations_rest_test.rb", "test/google/cloud/compute/v1/resource_policies_rest_test.rb", "test/google/cloud/compute/v1/routers_rest_test.rb", diff --git a/google-cloud-compute-v1/Gemfile b/google-cloud-compute-v1/Gemfile index d1825e41a44f..6442df18fa2f 100644 --- a/google-cloud-compute-v1/Gemfile +++ b/google-cloud-compute-v1/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.0" +gem "google-style", "~> 1.31.1" gem "minitest", "~> 5.22" gem "minitest-focus", "~> 1.4" gem "minitest-rg", "~> 5.3" diff --git a/google-cloud-compute-v1/google-cloud-compute-v1.gemspec b/google-cloud-compute-v1/google-cloud-compute-v1.gemspec index a78bc813d2b2..bbe02ede56e2 100644 --- a/google-cloud-compute-v1/google-cloud-compute-v1.gemspec +++ b/google-cloud-compute-v1/google-cloud-compute-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-common", "~> 1.0" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1.rb index c6fd0f8a7f7e..ec6044655b49 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1.rb @@ -43,7 +43,9 @@ require "google/cloud/compute/v1/instance_templates" require "google/cloud/compute/v1/instances" require "google/cloud/compute/v1/instant_snapshots" +require "google/cloud/compute/v1/interconnect_attachment_groups" require "google/cloud/compute/v1/interconnect_attachments" +require "google/cloud/compute/v1/interconnect_groups" require "google/cloud/compute/v1/interconnect_locations" require "google/cloud/compute/v1/interconnect_remote_locations" require "google/cloud/compute/v1/interconnects" @@ -90,6 +92,7 @@ require "google/cloud/compute/v1/region_zones" require "google/cloud/compute/v1/regions" require "google/cloud/compute/v1/reservation_blocks" +require "google/cloud/compute/v1/reservation_sub_blocks" require "google/cloud/compute/v1/reservations" require "google/cloud/compute/v1/resource_policies" require "google/cloud/compute/v1/routers" diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/compute_pb.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/compute_pb.rb index e2da54e40021..a13585906c29 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/compute_pb.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/compute_pb.rb @@ -12,7 +12,7 @@ require 'google/protobuf/any_pb' -descriptor_data = "\n%google/cloud/compute/v1/compute.proto\x12\x17google.cloud.compute.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/extended_operations.proto\x1a\x19google/protobuf/any.proto\"\xda\x01\n\x0e\x41WSV4Signature\x12\x1b\n\naccess_key\x18\x84\xe2\xcc\xdf\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\raccess_key_id\x18\xb6\xe4\xd9\x8b\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x61\x63\x63\x65ss_key_version\x18\x9d\xe1\xa2& \x01(\tH\x02\x88\x01\x01\x12\x1d\n\rorigin_region\x18\xad\xfc\xc0~ \x01(\tH\x03\x88\x01\x01\x42\r\n\x0b_access_keyB\x10\n\x0e_access_key_idB\x15\n\x13_access_key_versionB\x10\n\x0e_origin_region\"\xd5\x02\n+AbandonInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x92\x01\n:instance_group_managers_abandon_instances_request_resource\x18\xf8\xf9\x83\x99\x01 \x01(\x0b\x32\x45.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xec\x02\n1AbandonInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9f\x01\nAregion_instance_group_managers_abandon_instances_request_resource\x18\xa3\xd2\xf7\xe8\x01 \x01(\x0b\x32K.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x84\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x11\x61\x63\x63\x65lerator_count\x18\xbb\xb4\xdf\xf0\x01 \x01(\x05H\x00\x88\x01\x01\x12 \n\x10\x61\x63\x63\x65lerator_type\x18\x8e\xe1\xe8\x41 \x01(\tH\x01\x88\x01\x01\x42\x14\n\x12_accelerator_countB\x13\n\x11_accelerator_type\"\xbd\x03\n\x0f\x41\x63\x63\x65leratorType\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12*\n\x1amaximum_cards_per_instance\x18\xd2\xfa\xe5} \x01(\x05H\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x08\x88\x01\x01\x42\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x1d\n\x1b_maximum_cards_per_instanceB\x07\n\x05_nameB\x0c\n\n_self_linkB\x07\n\x05_zone\"\xce\x03\n\x1d\x41\x63\x63\x65leratorTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.AcceleratorTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.AcceleratorTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x02\n\x13\x41\x63\x63\x65leratorTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.AcceleratorType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xac\x01\n\x1a\x41\x63\x63\x65leratorTypesScopedList\x12G\n\x11\x61\x63\x63\x65lerator_types\x18\xa5\xc3\xaf\xf8\x01 \x03(\x0b\x32(.google.cloud.compute.v1.AcceleratorType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x98\x01\n\x0c\x41\x63\x63\x65lerators\x12(\n\x17guest_accelerator_count\x18\x94\xd7\xb8\xe4\x01 \x01(\x05H\x00\x88\x01\x01\x12\'\n\x16guest_accelerator_type\x18\x95\xa0\xdf\x8b\x01 \x01(\tH\x01\x88\x01\x01\x42\x1a\n\x18_guest_accelerator_countB\x19\n\x17_guest_accelerator_type\"\xc6\x05\n\x0c\x41\x63\x63\x65ssConfig\x12\x1e\n\rexternal_ipv6\x18\xdb\xd3\x81\xfe\x01 \x01(\tH\x00\x88\x01\x01\x12,\n\x1b\x65xternal_ipv6_prefix_length\x18\xcf\xfb\xfc\xca\x01 \x01(\x05H\x01\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07nat_i_p\x18\xfc\xeb\x8b\x38 \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x0cnetwork_tier\x18\xd3\xba\xdb\xf6\x01 \x01(\tH\x05\x88\x01\x01\x12\'\n\x16public_ptr_domain_name\x18\xff\xd6\xfb\x96\x01 \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x07\x88\x01\x01\x12\x1f\n\x0eset_public_ptr\x18\x95\xc0\xe6\xf9\x01 \x01(\x08H\x08\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\t\x88\x01\x01\"\x8f\x01\n\x0bNetworkTier\x12\x1a\n\x16UNDEFINED_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"E\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x12\n\x0b\x44IRECT_IPV6\x10\x9d\xb1\x8c\x02\x12\x15\n\x0eONE_TO_ONE_NAT\x10\xdd\xba\x8c(B\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_nat_i_pB\x0f\n\r_network_tierB\x19\n\x17_public_ptr_domain_nameB\x12\n\x10_security_policyB\x11\n\x0f_set_public_ptrB\x07\n\x05_type\"\x99\x02\n\x1e\x41\x64\x64\x41\x63\x63\x65ssConfigInstanceRequest\x12N\n\x16\x61\x63\x63\x65ss_config_resource\x18\x90\xff\xf6\xb8\x01 \x01(\x0b\x32%.google.cloud.compute.v1.AccessConfigB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xab\x02\n#AddAssociationFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12h\n$firewall_policy_association_resource\x18\xba\xb8\xe1{ \x01(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociationB\x03\xe0\x41\x02\x12,\n\x1creplace_existing_association\x18\xf8\xb0\xf5\x63 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x1f\n\x1d_replace_existing_associationB\r\n\x0b_request_id\"\xd5\x02\n*AddAssociationNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12h\n$firewall_policy_association_resource\x18\xba\xb8\xe1{ \x01(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociationB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12,\n\x1creplace_existing_association\x18\xf8\xb0\xf5\x63 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x1f\n\x1d_replace_existing_associationB\r\n\x0b_request_id\"\xfc\x02\n0AddAssociationRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12h\n$firewall_policy_association_resource\x18\xba\xb8\xe1{ \x01(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociationB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12,\n\x1creplace_existing_association\x18\xf8\xb0\xf5\x63 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x1f\n\x1d_replace_existing_associationB\r\n\x0b_request_id\"\xa9\x02\n\x1f\x41\x64\x64HealthCheckTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12z\n.target_pools_add_health_check_request_resource\x18\xa4\xba\xc5\x80\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x9f\x02\n\x1c\x41\x64\x64InstanceTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12s\n*target_pools_add_instance_request_resource\x18\xf4\xd3\xbb\xcc\x01 \x01(\x0b\x32\x36.google.cloud.compute.v1.TargetPoolsAddInstanceRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xaa\x02\n AddInstancesInstanceGroupRequest\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12{\n.instance_groups_add_instances_request_resource\x18\xde\xba\xac\xd8\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InstanceGroupsAddInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x8e\x02\n\x18\x41\x64\x64NodesNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12j\n&node_groups_add_nodes_request_resource\x18\xb8\xd6\xcb> \x01(\x0b\x32\x32.google.cloud.compute.v1.NodeGroupsAddNodesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xdf\x02\n2AddPacketMirroringRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\x0cmax_priority\x18\x9f\xac\x97\x9d\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0cmin_priority\x18\xf1\x81\xb4\x7f \x01(\x05H\x01\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x02\x88\x01\x01\x42\x0f\n\r_max_priorityB\x0f\n\r_min_priorityB\r\n\x0b_request_id\"\xed\x01\n\x18\x41\x64\x64PeeringNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12j\n%networks_add_peering_request_resource\x18\xb5\x8d\xb3\xb9\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.NetworksAddPeeringRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9a\x02\n\x1e\x41\x64\x64ResourcePoliciesDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12w\n,disks_add_resource_policies_request_resource\x18\xa3\xf8\xde\xec\x01 \x01(\x0b\x32\x38.google.cloud.compute.v1.DisksAddResourcePoliciesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xaa\x02\n\"AddResourcePoliciesInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x7f\n0instances_add_resource_policies_request_resource\x18\x9b\xd6\xab\xe9\x01 \x01(\x0b\x32<.google.cloud.compute.v1.InstancesAddResourcePoliciesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb2\x02\n$AddResourcePoliciesRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x84\x01\n3region_disks_add_resource_policies_request_resource\x18\x8e\xff\xc1\x87\x01 \x01(\x0b\x32>.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc7\x01\n\x1c\x41\x64\x64RuleFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd0\x02\n#AddRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\x0cmax_priority\x18\x9f\xac\x97\x9d\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0cmin_priority\x18\xf1\x81\xb4\x7f \x01(\x05H\x01\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x02\x88\x01\x01\x42\x0f\n\r_max_priorityB\x0f\n\r_min_priorityB\r\n\x0b_request_id\"\xf7\x02\n)AddRuleRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\x0cmax_priority\x18\x9f\xac\x97\x9d\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0cmin_priority\x18\xf1\x81\xb4\x7f \x01(\x05H\x01\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x02\x88\x01\x01\x42\x0f\n\r_max_priorityB\x0f\n\r_min_priorityB\r\n\x0b_request_id\"\x97\x02\n\"AddRuleRegionSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dsecurity_policy_rule_resource\x18\xc3\xba\x82\xc0\x01 \x01(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_validate_only\"\xf0\x01\n\x1c\x41\x64\x64RuleSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dsecurity_policy_rule_resource\x18\xc3\xba\x82\xc0\x01 \x01(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_validate_only\"\xe4\x01\n#AddSignedUrlKeyBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12O\n\x17signed_url_key_resource\x18\x81\xa3\x9b\xda\x01 \x01(\x0b\x32%.google.cloud.compute.v1.SignedUrlKeyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe7\x01\n$AddSignedUrlKeyBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12O\n\x17signed_url_key_resource\x18\x81\xa3\x9b\xda\x01 \x01(\x0b\x32%.google.cloud.compute.v1.SignedUrlKeyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe6\x0c\n\x07\x41\x64\x64ress\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0c\x61\x64\x64ress_type\x18\xa5\x89\x84~ \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x1b\n\nip_version\x18\xc0\xf3\xd2\x8c\x01 \x01(\tH\x05\x88\x01\x01\x12\"\n\x12ipv6_endpoint_type\x18\xcc\xfe\xbe. \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x08\x88\x01\x01\x12@\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32,.google.cloud.compute.v1.Address.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\n\x88\x01\x01\x12\x1d\n\x0cnetwork_tier\x18\xd3\xba\xdb\xf6\x01 \x01(\tH\x0b\x88\x01\x01\x12\x1e\n\rprefix_length\x18\xb3\xba\xa3\xd8\x01 \x01(\x05H\x0c\x88\x01\x01\x12\x18\n\x07purpose\x18\x9e\xfa\xef\x96\x01 \x01(\tH\r\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0e\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0f\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x10\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x11\x88\x01\x01\x12\x10\n\x05users\x18\x88\x9c\x9a\x35 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"e\n\x0b\x41\x64\x64ressType\x12\x1a\n\x16UNDEFINED_ADDRESS_TYPE\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12\x17\n\x10UNSPECIFIED_TYPE\x10\xe2\xee\xdb\x19\"[\n\tIpVersion\x12\x18\n\x14UNDEFINED_IP_VERSION\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\x12\x1a\n\x13UNSPECIFIED_VERSION\x10\x90\xcf\xb5\n\"K\n\x10Ipv6EndpointType\x12 \n\x1cUNDEFINED_IPV6_ENDPOINT_TYPE\x10\x00\x12\x0c\n\x05NETLB\x10\xb3\x97\xaf#\x12\x07\n\x02VM\x10\xb7\x15\"\x8f\x01\n\x0bNetworkTier\x12\x1a\n\x16UNDEFINED_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"\xe2\x01\n\x07Purpose\x12\x15\n\x11UNDEFINED_PURPOSE\x10\x00\x12\x14\n\x0c\x44NS_RESOLVER\x10\xfc\xdc\x83\xe3\x01\x12\x13\n\x0cGCE_ENDPOINT\x10\xab\xc4\xf5m\x12\x1a\n\x12IPSEC_INTERCONNECT\x10\x83\xd2\xaa\xa2\x01\x12\x0f\n\x08NAT_AUTO\x10\xad\xb4\x85N\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x12\n\nSERVERLESS\x10\xdc\xc6\xfd\x80\x01\x12\x1f\n\x17SHARED_LOADBALANCER_VIP\x10\xd4\xd3\xb3\x8c\x01\x12\x13\n\x0bVPC_PEERING\x10\xaa\xf3\x8e\xbf\x01\"R\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\r\n\x06IN_USE\x10\xcd\xce\xa5\x08\x12\x10\n\x08RESERVED\x10\xa8\xf6\x8d\xce\x01\x12\x11\n\tRESERVING\x10\xd9\xf4\xaf\xf5\x01\x42\n\n\x08_addressB\x0f\n\r_address_typeB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\r\n\x0b_ip_versionB\x15\n\x13_ipv6_endpoint_typeB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\n\n\x08_networkB\x0f\n\r_network_tierB\x10\n\x0e_prefix_lengthB\n\n\x08_purposeB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_statusB\r\n\x0b_subnetwork\"\xb7\x03\n\x15\x41\x64\x64ressAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12K\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x39.google.cloud.compute.v1.AddressAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aZ\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.compute.v1.AddressesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x9f\x02\n\x0b\x41\x64\x64ressList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x32\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32 .google.cloud.compute.v1.Address\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x95\x01\n\x13\x41\x64\x64ressesScopedList\x12\x37\n\taddresses\x18\xa2\xf7\x81\xa1\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Address\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xcd\x04\n\x17\x41\x64vancedMachineFeatures\x12,\n\x1c\x65nable_nested_virtualization\x18\x85\xcb\xf7\x07 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x16\x65nable_uefi_networking\x18\xa4\xb1\xbf\x9f\x01 \x01(\x08H\x01\x88\x01\x01\x12,\n\x1bperformance_monitoring_unit\x18\x8c\xc2\xb9\xfe\x01 \x01(\tH\x02\x88\x01\x01\x12!\n\x10threads_per_core\x18\xd7\xda\x91\xa8\x01 \x01(\x05H\x03\x88\x01\x01\x12\x1b\n\nturbo_mode\x18\xa4\x8e\xba\xce\x01 \x01(\tH\x04\x88\x01\x01\x12\"\n\x12visible_core_count\x18\xdc\xf4\x8f\\ \x01(\x05H\x05\x88\x01\x01\"\xb1\x01\n\x19PerformanceMonitoringUnit\x12)\n%UNDEFINED_PERFORMANCE_MONITORING_UNIT\x10\x00\x12\x14\n\rARCHITECTURAL\x10\xdd\xb1\xfbI\x12\x10\n\x08\x45NHANCED\x10\xf6\x86\xb2\xe3\x01\x12/\n\'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\xc4\xf8\xd4\xcc\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x19\n\x17_enable_uefi_networkingB\x1e\n\x1c_performance_monitoring_unitB\x13\n\x11_threads_per_coreB\r\n\x0b_turbo_modeB\x15\n\x13_visible_core_count\"\xa7\x03\n%AggregatedListAcceleratorTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa0\x03\n\x1e\x41ggregatedListAddressesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListAutoscalersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa6\x03\n$AggregatedListBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa0\x03\n\x1e\x41ggregatedListDiskTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\x9c\x03\n\x1a\x41ggregatedListDisksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa6\x03\n$AggregatedListForwardingRulesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListGlobalOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa3\x03\n!AggregatedListHealthChecksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xac\x03\n*AggregatedListInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa5\x03\n#AggregatedListInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa8\x03\n&AggregatedListInstanceTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa0\x03\n\x1e\x41ggregatedListInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListInstantSnapshotsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xae\x03\n,AggregatedListInterconnectAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa3\x03\n!AggregatedListMachineTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa9\x03\n\'AggregatedListNetworkAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xb2\x03\n0AggregatedListNetworkEdgeSecurityServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xac\x03\n*AggregatedListNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xae\x03\n,AggregatedListNetworkFirewallPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa1\x03\n\x1f\x41ggregatedListNodeGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa4\x03\n\"AggregatedListNodeTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa0\x03\n\x1e\x41ggregatedListNodeTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListPacketMirroringsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xae\x03\n,AggregatedListPublicDelegatedPrefixesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa8\x03\n&AggregatedListRegionCommitmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa3\x03\n!AggregatedListReservationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListResourcePoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\x9e\x03\n\x1c\x41ggregatedListRoutersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListSecurityPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa9\x03\n\'AggregatedListServiceAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa6\x03\n$AggregatedListSslCertificatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListStoragePoolTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa3\x03\n!AggregatedListStoragePoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListSubnetworksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa8\x03\n&AggregatedListTargetHttpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa9\x03\n\'AggregatedListTargetHttpsProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa6\x03\n$AggregatedListTargetInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListTargetPoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListTargetTcpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa8\x03\n&AggregatedListTargetVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\x9e\x03\n\x1c\x41ggregatedListUrlMapsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa1\x03\n\x1f\x41ggregatedListVpnTunnelsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\x81\x01\n\x0c\x41liasIpRange\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x00\x88\x01\x01\x12&\n\x15subnetwork_range_name\x18\xbe\xb2\x81\xb9\x01 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\x92\x06\n\x1e\x41llocationAggregateReservation\x12i\n\x10in_use_resources\x18\xd3\xf7\x83\xc3\x01 \x03(\x0b\x32K.google.cloud.compute.v1.AllocationAggregateReservationReservedResourceInfo\x12j\n\x12reserved_resources\x18\xce\xe3\xd5\x65 \x03(\x0b\x32K.google.cloud.compute.v1.AllocationAggregateReservationReservedResourceInfo\x12\x19\n\tvm_family\x18\xec\xbb\xce; \x01(\tH\x00\x88\x01\x01\x12\x1e\n\rworkload_type\x18\x82\xfe\xb0\x82\x01 \x01(\tH\x01\x88\x01\x01\"\xdd\x02\n\x08VmFamily\x12\x17\n\x13UNDEFINED_VM_FAMILY\x10\x00\x12%\n\x1eVM_FAMILY_CLOUD_TPU_DEVICE_CT3\x10\xfc\x8d\xb7\x14\x12+\n$VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L\x10\xe3\x82\xc1\x33\x12/\n(VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP\x10\xf3\xd6\xf5\x08\x12/\n\'VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E\x10\x95\xc9\x9c\xbe\x01\x12*\n\"VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P\x10\xb8\xd1\xda\xf6\x01\x12*\n\"VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P\x10\xd7\xd1\xda\xf6\x01\x12*\n\"VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P\x10\xf6\xd1\xda\xf6\x01\"^\n\x0cWorkloadType\x12\x1b\n\x17UNDEFINED_WORKLOAD_TYPE\x10\x00\x12\x0c\n\x05\x42\x41TCH\x10\x9a\xbe\x83\x1e\x12\x0e\n\x07SERVING\x10\xec\xa7\xbd\x08\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x0c\n\n_vm_familyB\x10\n\x0e_workload_type\"\xba\x01\n2AllocationAggregateReservationReservedResourceInfo\x12t\n\x0b\x61\x63\x63\x65lerator\x18\xeb\xc4\xab\xca\x01 \x01(\x0b\x32V.google.cloud.compute.v1.AllocationAggregateReservationReservedResourceInfoAcceleratorH\x00\x88\x01\x01\x42\x0e\n\x0c_accelerator\"\xb0\x01\n=AllocationAggregateReservationReservedResourceInfoAccelerator\x12\"\n\x11\x61\x63\x63\x65lerator_count\x18\xbb\xb4\xdf\xf0\x01 \x01(\x05H\x00\x88\x01\x01\x12 \n\x10\x61\x63\x63\x65lerator_type\x18\x8e\xe1\xe8\x41 \x01(\tH\x01\x88\x01\x01\x42\x14\n\x12_accelerator_countB\x13\n\x11_accelerator_type\"\xe8\x01\n\"AllocationReservationSharingPolicy\x12#\n\x12service_share_type\x18\xe4\x8e\xab\xf5\x01 \x01(\tH\x00\x88\x01\x01\"\x85\x01\n\x10ServiceShareType\x12 \n\x1cUNDEFINED_SERVICE_SHARE_TYPE\x10\x00\x12\x11\n\tALLOW_ALL\x10\xeb\xb6\xe0\xe2\x01\x12\x14\n\x0c\x44ISALLOW_ALL\x10\xbd\xdd\xba\x84\x01\x12&\n\x1eSERVICE_SHARE_TYPE_UNSPECIFIED\x10\xfc\xa5\x88\x85\x01\x42\x15\n\x13_service_share_type\"\xe1\x02\n\x18\x41llocationResourceStatus\x12\'\n\x17reservation_block_count\x18\xea\xd5\x95M \x01(\x05H\x00\x88\x01\x01\x12W\n\x17reservation_maintenance\x18\xa0\x86\xb5\xa2\x01 \x01(\x0b\x32-.google.cloud.compute.v1.GroupMaintenanceInfoH\x01\x88\x01\x01\x12o\n\x17specific_sku_allocation\x18\xef\xff\xc8] \x01(\x0b\x32\x46.google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocationH\x02\x88\x01\x01\x42\x1a\n\x18_reservation_block_countB\x1a\n\x18_reservation_maintenanceB\x1a\n\x18_specific_sku_allocation\"\xa5\x02\n-AllocationResourceStatusSpecificSKUAllocation\x12+\n\x1bsource_instance_template_id\x18\xfa\xef\x82\x35 \x01(\tH\x00\x88\x01\x01\x12r\n\x0cutilizations\x18\x91\xad\xf6\xbf\x01 \x03(\x0b\x32X.google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation.UtilizationsEntry\x1a\x33\n\x11UtilizationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x42\x1e\n\x1c_source_instance_template_id\"\xe2\x01\nFAllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\tinterface\x18\xb9\xda\xd5\xef\x01 \x01(\tH\x01\x88\x01\x01\">\n\tInterface\x12\x17\n\x13UNDEFINED_INTERFACE\x10\x00\x12\x0b\n\x04NVME\x10\xe0\x82\x93\x01\x12\x0b\n\x04SCSI\x10\xa6\x81\x9b\x01\x42\x0f\n\r_disk_size_gbB\x0c\n\n_interface\"\x97\x03\n9AllocationSpecificSKUAllocationReservedInstanceProperties\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\x12v\n\nlocal_ssds\x18\xc3\x8e\xd3m \x03(\x0b\x32_.google.cloud.compute.v1.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk\x12\x1e\n\rlocation_hint\x18\xd1\x81\x92\xa7\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x01\x88\x01\x01\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_location_hintB\x0f\n\r_machine_typeB\x13\n\x11_min_cpu_platform\"\xfe\x02\n AllocationSpecificSKUReservation\x12\x1e\n\rassured_count\x18\xcd\xf8\x8a\x86\x01 \x01(\x03H\x00\x88\x01\x01\x12\x15\n\x05\x63ount\x18\x8f\xa2\x9d- \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x0cin_use_count\x18\xbd\xab\xa6\xeb\x01 \x01(\x03H\x02\x88\x01\x01\x12w\n\x13instance_properties\x18\x9d\x9e\xd8\x66 \x01(\x0b\x32R.google.cloud.compute.v1.AllocationSpecificSKUAllocationReservedInstancePropertiesH\x03\x88\x01\x01\x12)\n\x18source_instance_template\x18\xc0\xc3\xc1\x9e\x01 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_assured_countB\x08\n\x06_countB\x0f\n\r_in_use_countB\x16\n\x14_instance_propertiesB\x1b\n\x19_source_instance_template\"K\n\x07\x41llowed\x12\x1d\n\x0cI_p_protocol\x18\xbd\xf6\xde\xe8\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05ports\x18\x92\xf0\xf9\x32 \x03(\tB\x0f\n\r_I_p_protocol\"\xa0\x01\n&AnnouncePublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbf\x01\n%AnnouncePublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa8\x02\n2ApplyUpdatesToInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x89\x01\n6instance_group_managers_apply_updates_request_resource\x18\xd3\xf6\xce{ \x01(\x0b\x32\x41.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zone\"\xbf\x02\n8ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x96\x01\n=region_instance_group_managers_apply_updates_request_resource\x18\xfe\xe9\xad$ \x01(\x0b\x32G.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequestB\x03\xe0\x41\x02\"\x9e\x02\n\x19\x41ttachDiskInstanceRequest\x12M\n\x16\x61ttached_disk_resource\x18\x95\x92\x9a+ \x01(\x0b\x32%.google.cloud.compute.v1.AttachedDiskB\x03\xe0\x41\x02\x12\x1c\n\x0c\x66orce_attach\x18\x99\xa4\x89\x44 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x0f\n\r_force_attachB\r\n\x0b_request_id\"\xcf\x02\n7AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest\x12\x9c\x01\n@global_network_endpoint_groups_attach_endpoints_request_resource\x18\xeb\xa1\xd1\x0e \x01(\x0b\x32J.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequestB\x03\xe0\x41\x02\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x02\n1AttachNetworkEndpointsNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x8e\x01\n9network_endpoint_groups_attach_endpoints_request_resource\x18\x87\xb5 \x01(\x0b\x32\x44.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf1\x02\n7AttachNetworkEndpointsRegionNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_network_endpoint_groups_attach_endpoints_request_resource\x18\xfc\xf9\xdd\x9f\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionNetworkEndpointGroupsAttachEndpointsRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xdc\n\n\x0c\x41ttachedDisk\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\x08H\x01\x88\x01\x01\x12\x14\n\x04\x62oot\x18\xf2\xf5\xb8\x01 \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tH\x03\x88\x01\x01\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x04\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x05\x88\x01\x01\x12\x1c\n\x0c\x66orce_attach\x18\x99\xa4\x89\x44 \x01(\x08H\x06\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x15\n\x05index\x18\xd2\xd1\xec/ \x01(\x05H\x07\x88\x01\x01\x12X\n\x11initialize_params\x18\x95\x92\xb8\x08 \x01(\x0b\x32\x35.google.cloud.compute.v1.AttachedDiskInitializeParamsH\x08\x88\x01\x01\x12\x1a\n\tinterface\x18\xb9\xda\xd5\xef\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0bsaved_state\x18\xd9\xa9\xa1\xc4\x01 \x01(\tH\x0c\x88\x01\x01\x12\\\n\x1fshielded_instance_initial_state\x18\x83\xc4\xdc[ \x01(\x0b\x32+.google.cloud.compute.v1.InitialStateConfigH\r\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x0e\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x0f\x88\x01\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\">\n\tInterface\x12\x17\n\x13UNDEFINED_INTERFACE\x10\x00\x12\x0b\n\x04NVME\x10\xe0\x82\x93\x01\x12\x0b\n\x04SCSI\x10\xa6\x81\x9b\x01\"?\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x10\n\tREAD_ONLY\x10\xb5\x99\xec+\x12\x11\n\nREAD_WRITE\x10\xd6\x97\xe4R\"_\n\nSavedState\x12\x19\n\x15UNDEFINED_SAVED_STATE\x10\x00\x12$\n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\xcf\xbf\xca\xba\x01\x12\x10\n\tPRESERVED\x10\xf8\xd6\x98y\"?\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x12\n\nPERSISTENT\x10\x97\xf5\xd5\xdb\x01\x12\x0f\n\x07SCRATCH\x10\xda\xfd\xf0\xec\x01\x42\x0f\n\r_architectureB\x0e\n\x0c_auto_deleteB\x07\n\x05_bootB\x0e\n\x0c_device_nameB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0f\n\r_force_attachB\x08\n\x06_indexB\x14\n\x12_initialize_paramsB\x0c\n\n_interfaceB\x07\n\x05_kindB\x07\n\x05_modeB\x0e\n\x0c_saved_stateB\"\n _shielded_instance_initial_stateB\t\n\x07_sourceB\x07\n\x05_type\"\x8f\x0c\n\x1c\x41ttachedDiskInitializeParams\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\tdisk_name\x18\xed\xbf\xa0, \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x03\x88\x01\x01\x12\x19\n\tdisk_type\x18\x9c\xe9\xac, \x01(\tH\x04\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x05\x88\x01\x01\x12U\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x41.google.cloud.compute.v1.AttachedDiskInitializeParams.LabelsEntry\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12 \n\x10on_update_action\x18\x8c\xd8\xc4` \x01(\tH\x06\x88\x01\x01\x12 \n\x10provisioned_iops\x18\xd4\xbd\x87Y \x01(\x03H\x07\x88\x01\x01\x12\'\n\x16provisioned_throughput\x18\x95\xbe\x88\xfb\x01 \x01(\x03H\x08\x88\x01\x01\x12\x18\n\rreplica_zones\x18\x80\xb8\x8c\x17 \x03(\t\x12q\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32N.google.cloud.compute.v1.AttachedDiskInitializeParams.ResourceManagerTagsEntry\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\t\x88\x01\x01\x12\\\n\x1bsource_image_encryption_key\x18\xab\x91\xf5\xb5\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\n\x88\x01\x01\x12\x1f\n\x0fsource_snapshot\x18\xe8\x9a\x8e< \x01(\tH\x0b\x88\x01\x01\x12_\n\x1esource_snapshot_encryption_key\x18\xda\x8e\xe7\x90\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x0c\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tH\r\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"\x8a\x01\n\x0eOnUpdateAction\x12\x1e\n\x1aUNDEFINED_ON_UPDATE_ACTION\x10\x00\x12\x15\n\rRECREATE_DISK\x10\xed\x9d\xf6\xeb\x01\x12\'\n\x1fRECREATE_DISK_IF_SOURCE_CHANGED\x10\x80\x8a\xea\xbd\x01\x12\x18\n\x11USE_EXISTING_DISK\x10\xf9\xe5\xf9nB\x0f\n\r_architectureB\x0e\n\x0c_descriptionB\x0c\n\n_disk_nameB\x0f\n\r_disk_size_gbB\x0c\n\n_disk_typeB\x1e\n\x1c_enable_confidential_computeB\x13\n\x11_on_update_actionB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x0f\n\r_source_imageB\x1e\n\x1c_source_image_encryption_keyB\x12\n\x10_source_snapshotB!\n\x1f_source_snapshot_encryption_keyB\x0f\n\r_storage_pool\"\x98\x01\n\x0b\x41uditConfig\x12\x46\n\x11\x61udit_log_configs\x18\x92\xea\xf2\xe8\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.AuditLogConfig\x12\x1b\n\x10\x65xempted_members\x18\x98\xdd\xf5n \x03(\t\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_service\"\x94\x02\n\x0e\x41uditLogConfig\x12\x1b\n\x10\x65xempted_members\x18\x98\xdd\xf5n \x03(\t\x12\'\n\x17ignore_child_exemptions\x18\x9a\x8f\xb9! \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x08log_type\x18\xd5\x9e\x9c\xc0\x01 \x01(\tH\x01\x88\x01\x01\"x\n\x07LogType\x12\x16\n\x12UNDEFINED_LOG_TYPE\x10\x00\x12\x11\n\nADMIN_READ\x10\xa6\xc9\xbe=\x12\x11\n\tDATA_READ\x10\x8b\xba\xc5\x91\x01\x12\x12\n\nDATA_WRITE\x10\xea\x85\x9b\xa2\x01\x12\x1b\n\x14LOG_TYPE_UNSPECIFIED\x10\xcd\xca\xd7IB\x1a\n\x18_ignore_child_exemptionsB\x0b\n\t_log_type\"\x9d\x07\n\nAutoscaler\x12N\n\x12\x61utoscaling_policy\x18\xd9\xe0\xeai \x01(\x0b\x32*.google.cloud.compute.v1.AutoscalingPolicyH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12 \n\x10recommended_size\x18\xe5\xf6\xfdz \x01(\x05H\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x63\n\x17scaling_schedule_status\x18\xe2\xab\x97\xde\x01 \x03(\x0b\x32>.google.cloud.compute.v1.Autoscaler.ScalingScheduleStatusEntry\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\t\x88\x01\x01\x12L\n\x0estatus_details\x18\xf5\xad\xa1\xad\x01 \x03(\x0b\x32\x30.google.cloud.compute.v1.AutoscalerStatusDetails\x12\x16\n\x06target\x18\x91\xe3\xf9[ \x01(\tH\n\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0b\x88\x01\x01\x1al\n\x1aScalingScheduleStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.ScalingScheduleStatus:\x02\x38\x01\"^\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0c\n\x05\x45RROR\x10\xe8\xb3\xcb\x1f\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x42\x15\n\x13_autoscaling_policyB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x13\n\x11_recommended_sizeB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_statusB\t\n\x07_targetB\x07\n\x05_zone\"\xbf\x03\n\x18\x41utoscalerAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.AutoscalerAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.AutoscalersScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0e\x41utoscalerList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.Autoscaler\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xcb\x06\n\x17\x41utoscalerStatusDetails\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x01\x88\x01\x01\"\xea\x05\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x1f\n\x17\x41LL_INSTANCES_UNHEALTHY\x10\xe5\x90\x8d\xc1\x01\x12%\n\x1e\x42\x41\x43KEND_SERVICE_DOES_NOT_EXIST\x10\x9a\x9a\xa3[\x12 \n\x1a\x43\x41PPED_AT_MAX_NUM_REPLICAS\x10\xd9\xd3\x1f\x12,\n$CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE\x10\xb3\xb4\xee\x9c\x01\x12\x1c\n\x15\x43USTOM_METRIC_INVALID\x10\xd6\xb9\xbd\x61\x12\x15\n\x0eMIN_EQUALS_MAX\x10\xf1\x99\xac\x01\x12(\n!MISSING_CUSTOM_METRIC_DATA_POINTS\x10\xde\xa9\x9f-\x12*\n\"MISSING_LOAD_BALANCING_DATA_POINTS\x10\xd2\xa8\x8f\xf3\x01\x12\x0f\n\x08MODE_OFF\x10\xb3\x91\xa4N\x12\x1a\n\x13MODE_ONLY_SCALE_OUT\x10\xe2\xb7\xea\x01\x12\x13\n\x0cMODE_ONLY_UP\x10\xf2\xda\x92\x30\x12$\n\x1dMORE_THAN_ONE_BACKEND_SERVICE\x10\xdd\xcb\xb8H\x12\"\n\x1aNOT_ENOUGH_QUOTA_AVAILABLE\x10\xbf\xaf\x9b\xc0\x01\x12 \n\x18REGION_RESOURCE_STOCKOUT\x10\xfe\xc9\x88\xfc\x01\x12$\n\x1dSCALING_TARGET_DOES_NOT_EXIST\x10\x9b\x93\xbd:\x12\x36\n/SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX\x10\xc2\xeb\xfa\r\x12\x34\n,SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN\x10\xb5\xc6\xf5\xbd\x01\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\x12\x39\n1UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION\x10\xd1\x96\xe1\x9d\x01\x12\x1d\n\x16ZONE_RESOURCE_STOCKOUT\x10\xb6\xcf\x9d\x64\x42\n\n\x08_messageB\x07\n\x05_type\"\x9c\x01\n\x15\x41utoscalersScopedList\x12<\n\x0b\x61utoscalers\x18\xfc\xb8\x8c\xde\x01 \x03(\x0b\x32#.google.cloud.compute.v1.Autoscaler\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xe9\x07\n\x11\x41utoscalingPolicy\x12$\n\x14\x63ool_down_period_sec\x18\x9a\x87\xad\x33 \x01(\x05H\x00\x88\x01\x01\x12Z\n\x0f\x63pu_utilization\x18\x8b\xa4\xe3\xb5\x01 \x01(\x0b\x32\x38.google.cloud.compute.v1.AutoscalingPolicyCpuUtilizationH\x01\x88\x01\x01\x12h\n\x1a\x63ustom_metric_utilizations\x18\xf2\xfd\xf6> \x03(\x0b\x32\x41.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization\x12o\n\x1aload_balancing_utilization\x18\xe3\xd1\xf5\xcc\x01 \x01(\x0b\x32\x42.google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilizationH\x02\x88\x01\x01\x12 \n\x10max_num_replicas\x18\xcf\x94\xdc\x1d \x01(\x05H\x03\x88\x01\x01\x12!\n\x10min_num_replicas\x18\xa1\xf8\xa1\xff\x01 \x01(\x05H\x04\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x05\x88\x01\x01\x12[\n\x10scale_in_control\x18\xd8\xbc\xce\xfb\x01 \x01(\x0b\x32\x38.google.cloud.compute.v1.AutoscalingPolicyScaleInControlH\x06\x88\x01\x01\x12_\n\x11scaling_schedules\x18\x84\xf4\xbc\xa9\x01 \x03(\x0b\x32@.google.cloud.compute.v1.AutoscalingPolicy.ScalingSchedulesEntry\x1ar\n\x15ScalingSchedulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.compute.v1.AutoscalingPolicyScalingSchedule:\x02\x38\x01\"V\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\t\n\x03OFF\x10\xcf\xe2\x04\x12\x07\n\x02ON\x10\xdf\x13\x12\x15\n\x0eONLY_SCALE_OUT\x10\xc6\xf3\xe8H\x12\x0f\n\x07ONLY_UP\x10\x8e\xd0\xfc\xe3\x01\x42\x17\n\x15_cool_down_period_secB\x12\n\x10_cpu_utilizationB\x1d\n\x1b_load_balancing_utilizationB\x13\n\x11_max_num_replicasB\x13\n\x11_min_num_replicasB\x07\n\x05_modeB\x13\n\x11_scale_in_control\"\xf6\x01\n\x1f\x41utoscalingPolicyCpuUtilization\x12\"\n\x11predictive_method\x18\xc1\x97\x89\xba\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12utilization_target\x18\xce\xec\xf9\x66 \x01(\x01H\x01\x88\x01\x01\"^\n\x10PredictiveMethod\x12\x1f\n\x1bUNDEFINED_PREDICTIVE_METHOD\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x1c\n\x15OPTIMIZE_AVAILABILITY\x10\xfd\xe6\xc5\x05\x42\x14\n\x12_predictive_methodB\x15\n\x13_utilization_target\"\xbf\x03\n(AutoscalingPolicyCustomMetricUtilization\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x06metric\x18\xb0\xeb\x97\xfe\x01 \x01(\tH\x01\x88\x01\x01\x12+\n\x1asingle_instance_assignment\x18\xc0\xcc\xd8\xf0\x01 \x01(\x01H\x02\x88\x01\x01\x12\"\n\x12utilization_target\x18\xce\xec\xf9\x66 \x01(\x01H\x03\x88\x01\x01\x12(\n\x17utilization_target_type\x18\x8b\xa5\x9a\xa2\x01 \x01(\tH\x04\x88\x01\x01\"~\n\x15UtilizationTargetType\x12%\n!UNDEFINED_UTILIZATION_TARGET_TYPE\x10\x00\x12\x17\n\x10\x44\x45LTA_PER_MINUTE\x10\x9d\xbd\xd8)\x12\x17\n\x10\x44\x45LTA_PER_SECOND\x10\xfd\xf9\xd6y\x12\x0c\n\x05GAUGE\x10\xd9\xb1\x9d B\t\n\x07_filterB\t\n\x07_metricB\x1d\n\x1b_single_instance_assignmentB\x15\n\x13_utilization_targetB\x1a\n\x18_utilization_target_type\"f\n)AutoscalingPolicyLoadBalancingUtilization\x12\"\n\x12utilization_target\x18\xce\xec\xf9\x66 \x01(\x01H\x00\x88\x01\x01\x42\x15\n\x13_utilization_target\"\xc2\x01\n\x1f\x41utoscalingPolicyScaleInControl\x12O\n\x16max_scaled_in_replicas\x18\xeb\xd5\x95V \x01(\x0b\x32\'.google.cloud.compute.v1.FixedOrPercentH\x00\x88\x01\x01\x12\x1f\n\x0ftime_window_sec\x18\xb4\x80\xae\x11 \x01(\x05H\x01\x88\x01\x01\x42\x19\n\x17_max_scaled_in_replicasB\x12\n\x10_time_window_sec\"\xba\x02\n AutoscalingPolicyScalingSchedule\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x08\x64isabled\x18\xfc\xf4\x98\x81\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1c\n\x0c\x64uration_sec\x18\xa6\x9e\xa1\x65 \x01(\x05H\x02\x88\x01\x01\x12&\n\x15min_required_replicas\x18\xae\x9d\xa5\xae\x01 \x01(\x05H\x03\x88\x01\x01\x12\x19\n\x08schedule\x18\x97\xa5\x9a\xb3\x01 \x01(\tH\x04\x88\x01\x01\x12\x19\n\ttime_zone\x18\xde\x83\xc9\x11 \x01(\tH\x05\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x0b\n\t_disabledB\x0f\n\r_duration_secB\x18\n\x16_min_required_replicasB\x0b\n\t_scheduleB\x0c\n\n_time_zone\"\xf6\x07\n\x07\x42\x61\x63kend\x12\x1f\n\x0e\x62\x61lancing_mode\x18\x89\xcb\x96\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x0f\x63\x61pacity_scaler\x18\x8d\xc7\xd4\x96\x01 \x01(\x02H\x01\x88\x01\x01\x12H\n\x0e\x63ustom_metrics\x18\xf5\xe3\xe3\xcc\x01 \x03(\x0b\x32,.google.cloud.compute.v1.BackendCustomMetric\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08\x66\x61ilover\x18\xf2\xa9\x9d\x42 \x01(\x08H\x03\x88\x01\x01\x12\x15\n\x05group\x18\xff\xec\x83/ \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x0fmax_connections\x18\xfa\xd5\xe1\x34 \x01(\x05H\x05\x88\x01\x01\x12,\n\x1cmax_connections_per_endpoint\x18\x9c\xe7\xb6g \x01(\x05H\x06\x88\x01\x01\x12,\n\x1cmax_connections_per_instance\x18\x9c\xd5\xf4\x31 \x01(\x05H\x07\x88\x01\x01\x12\x19\n\x08max_rate\x18\xdb\xbd\xc8\xc2\x01 \x01(\x05H\x08\x88\x01\x01\x12%\n\x15max_rate_per_endpoint\x18\xdb\xaa\xf4= \x01(\x02H\t\x88\x01\x01\x12%\n\x15max_rate_per_instance\x18\xdb\x98\xb2\x08 \x01(\x02H\n\x88\x01\x01\x12\x1f\n\x0fmax_utilization\x18\xc7\xf7\xd4\x46 \x01(\x02H\x0b\x88\x01\x01\x12\x1a\n\npreference\x18\xdb\xf9\xf2G \x01(\tH\x0c\x88\x01\x01\"y\n\rBalancingMode\x12\x1c\n\x18UNDEFINED_BALANCING_MODE\x10\x00\x12\x11\n\nCONNECTION\x10\xde\xd5\xb9u\x12\x16\n\x0e\x43USTOM_METRICS\x10\xd5\xe3\x8d\x9e\x01\x12\x0b\n\x04RATE\x10\xe0\x89\x99\x01\x12\x12\n\x0bUTILIZATION\x10\x82\x84\xefJ\"i\n\nPreference\x12\x18\n\x14UNDEFINED_PREFERENCE\x10\x00\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\x12\x1e\n\x16PREFERENCE_UNSPECIFIED\x10\xb3\xeb\xce\xec\x01\x12\x11\n\tPREFERRED\x10\xe1\xb8\xdc\xc7\x01\x42\x11\n\x0f_balancing_modeB\x12\n\x10_capacity_scalerB\x0e\n\x0c_descriptionB\x0b\n\t_failoverB\x08\n\x06_groupB\x12\n\x10_max_connectionsB\x1f\n\x1d_max_connections_per_endpointB\x1f\n\x1d_max_connections_per_instanceB\x0b\n\t_max_rateB\x18\n\x16_max_rate_per_endpointB\x18\n\x16_max_rate_per_instanceB\x12\n\x10_max_utilizationB\r\n\x0b_preference\"\xe4\x05\n\rBackendBucket\x12\x1c\n\x0b\x62ucket_name\x18\xc0\x97\x9e\x87\x01 \x01(\tH\x00\x88\x01\x01\x12K\n\ncdn_policy\x18\x84\x8b\x84\x66 \x01(\x0b\x32/.google.cloud.compute.v1.BackendBucketCdnPolicyH\x01\x88\x01\x01\x12 \n\x10\x63ompression_mode\x18\xdc\x91\xc6- \x01(\tH\x02\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x03\x88\x01\x01\x12#\n\x17\x63ustom_response_headers\x18\x96\xc1\xe5\xb8\x01 \x03(\t\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12$\n\x14\x65\x64ge_security_policy\x18\x8f\xd9\xc8\x13 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\nenable_cdn\x18\xf1\xb6\xf5\x86\x01 \x01(\x08H\x06\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12\x41\n\x07used_by\x18\x99\xa0\xd2\xb9\x01 \x03(\x0b\x32,.google.cloud.compute.v1.BackendBucketUsedBy\"U\n\x0f\x43ompressionMode\x12\x1e\n\x1aUNDEFINED_COMPRESSION_MODE\x10\x00\x12\x10\n\tAUTOMATIC\x10\x8b\x84\xe9N\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_cdn_policyB\x13\n\x11_compression_modeB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x17\n\x15_edge_security_policyB\r\n\x0b_enable_cdnB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_self_link\"\xca\x07\n\x16\x42\x61\x63kendBucketCdnPolicy\x12v\n\x1f\x62ypass_cache_on_request_headers\x18\xca\xbd\xeb\xe7\x01 \x03(\x0b\x32I.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader\x12_\n\x10\x63\x61\x63he_key_policy\x18\xef\xd7\xf8K \x01(\x0b\x32=.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicyH\x00\x88\x01\x01\x12\x1a\n\ncache_mode\x18\xc0\xc8\xe2\r \x01(\tH\x01\x88\x01\x01\x12\x1a\n\nclient_ttl\x18\xf8\x8e\xec\r \x01(\x05H\x02\x88\x01\x01\x12\x1b\n\x0b\x64\x65\x66\x61ult_ttl\x18\xee\xfd\xe6/ \x01(\x05H\x03\x88\x01\x01\x12\x18\n\x07max_ttl\x18\x91\x89\xd5\x92\x01 \x01(\x05H\x04\x88\x01\x01\x12!\n\x10negative_caching\x18\xb5\xc3\xa2\xa0\x01 \x01(\x08H\x05\x88\x01\x01\x12h\n\x17negative_caching_policy\x18\xfc\xb5\x8aJ \x03(\x0b\x32\x44.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy\x12#\n\x12request_coalescing\x18\xd4\x84\x88\xfe\x01 \x01(\x08H\x06\x88\x01\x01\x12!\n\x11serve_while_stale\x18\xdb\xf7\xedp \x01(\x05H\x07\x88\x01\x01\x12-\n\x1csigned_url_cache_max_age_sec\x18\xc6\xa8\xb9\x80\x01 \x01(\x03H\x08\x88\x01\x01\x12 \n\x14signed_url_key_names\x18\xb5\xed\xa7\xb1\x01 \x03(\t\"\x8f\x01\n\tCacheMode\x12\x18\n\x14UNDEFINED_CACHE_MODE\x10\x00\x12\x18\n\x10\x43\x41\x43HE_ALL_STATIC\x10\xe9\x97\xa5\xa9\x01\x12\x17\n\x0f\x46ORCE_CACHE_ALL\x10\xb0\xdd\xe0\xe7\x01\x12\x1a\n\x12INVALID_CACHE_MODE\x10\xc8\xb7\xe8\xb5\x01\x12\x19\n\x12USE_ORIGIN_HEADERS\x10\xa5\x92\xb4\x1a\x42\x13\n\x11_cache_key_policyB\r\n\x0b_cache_modeB\r\n\x0b_client_ttlB\x0e\n\x0c_default_ttlB\n\n\x08_max_ttlB\x13\n\x11_negative_cachingB\x15\n\x13_request_coalescingB\x14\n\x12_serve_while_staleB\x1f\n\x1d_signed_url_cache_max_age_sec\"_\n0BackendBucketCdnPolicyBypassCacheOnRequestHeader\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_header_name\"j\n$BackendBucketCdnPolicyCacheKeyPolicy\x12\x1f\n\x14include_http_headers\x18\x86\xfa\x97\x01 \x03(\t\x12!\n\x16query_string_whitelist\x18\xb0\xd8\x81\x19 \x03(\t\"h\n+BackendBucketCdnPolicyNegativeCachingPolicy\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x03ttl\x18\xec\x83\x07 \x01(\x05H\x01\x88\x01\x01\x42\x07\n\x05_codeB\x06\n\x04_ttl\"\xab\x02\n\x11\x42\x61\x63kendBucketList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x38\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32&.google.cloud.compute.v1.BackendBucket\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\">\n\x13\x42\x61\x63kendBucketUsedBy\x12\x19\n\treference\x18\xcb\xfe\xec\x46 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_reference\"\x8f\x01\n\x13\x42\x61\x63kendCustomMetric\x12\x18\n\x07\x64ry_run\x18\xf7\xc3\xb6\x9a\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1f\n\x0fmax_utilization\x18\xc7\xf7\xd4\x46 \x01(\x02H\x01\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x02\x88\x01\x01\x42\n\n\x08_dry_runB\x12\n\x10_max_utilizationB\x07\n\x05_name\"\x92$\n\x0e\x42\x61\x63kendService\x12(\n\x17\x61\x66\x66inity_cookie_ttl_sec\x18\x9a\xe9\xb6\xb0\x01 \x01(\x05H\x00\x88\x01\x01\x12\x36\n\x08\x62\x61\x63kends\x18\xdf\x98\xcb\xf3\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Backend\x12L\n\ncdn_policy\x18\x84\x8b\x84\x66 \x01(\x0b\x32\x30.google.cloud.compute.v1.BackendServiceCdnPolicyH\x01\x88\x01\x01\x12K\n\x10\x63ircuit_breakers\x18\x9d\xc7\xf4\xc8\x01 \x01(\x0b\x32(.google.cloud.compute.v1.CircuitBreakersH\x02\x88\x01\x01\x12 \n\x10\x63ompression_mode\x18\xdc\x91\xc6- \x01(\tH\x03\x88\x01\x01\x12Q\n\x13\x63onnection_draining\x18\xab\x8e\xef\xdb\x01 \x01(\x0b\x32+.google.cloud.compute.v1.ConnectionDrainingH\x04\x88\x01\x01\x12k\n\x1a\x63onnection_tracking_policy\x18\xd9\xe0\xd4\x44 \x01(\x0b\x32?.google.cloud.compute.v1.BackendServiceConnectionTrackingPolicyH\x05\x88\x01\x01\x12[\n\x0f\x63onsistent_hash\x18\x9b\xa5\x37 \x01(\x0b\x32;.google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsH\x06\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x07\x88\x01\x01\x12O\n\x0e\x63ustom_metrics\x18\xf5\xe3\xe3\xcc\x01 \x03(\x0b\x32\x33.google.cloud.compute.v1.BackendServiceCustomMetric\x12!\n\x16\x63ustom_request_headers\x18\x88\xd2\xab\r \x03(\t\x12#\n\x17\x63ustom_response_headers\x18\x96\xc1\xe5\xb8\x01 \x03(\t\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x08\x88\x01\x01\x12$\n\x14\x65\x64ge_security_policy\x18\x8f\xd9\xc8\x13 \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0c\x65nable_c_d_n\x18\xbb\xc7\xc7w \x01(\x08H\n\x88\x01\x01\x12\x30\n external_managed_migration_state\x18\xcc\x8f\xf6\x1f \x01(\tH\x0b\x88\x01\x01\x12>\n-external_managed_migration_testing_percentage\x18\xce\x81\xef\xf1\x01 \x01(\x02H\x0c\x88\x01\x01\x12V\n\x0f\x66\x61ilover_policy\x18\x9f\xf2\xb0\x32 \x01(\x0b\x32\x35.google.cloud.compute.v1.BackendServiceFailoverPolicyH\r\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x0e\x88\x01\x01\x12K\n\tha_policy\x18\xb8\xf6\xf2\xf7\x01 \x01(\x0b\x32/.google.cloud.compute.v1.BackendServiceHAPolicyH\x0f\x88\x01\x01\x12\x19\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\t\x12>\n\x03iap\x18\xd8\xac\x06 \x01(\x0b\x32*.google.cloud.compute.v1.BackendServiceIAPH\x10\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x11\x88\x01\x01\x12+\n\x1bip_address_selection_policy\x18\xc8\xb0\x80% \x01(\tH\x12\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x13\x88\x01\x01\x12&\n\x15load_balancing_scheme\x18\xc4\x8c\xc2\xad\x01 \x01(\tH\x14\x88\x01\x01\x12i\n\x14locality_lb_policies\x18\x9d\xf2\x9c\x43 \x03(\x0b\x32H.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfig\x12\"\n\x12locality_lb_policy\x18\xbf\xf8\xd5> \x01(\tH\x15\x88\x01\x01\x12M\n\nlog_config\x18\x9d\xd1\xc1\xa7\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.BackendServiceLogConfigH\x16\x88\x01\x01\x12\x46\n\x13max_stream_duration\x18\x98\xa5\xa5\x1d \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x17\x88\x01\x01\x12L\n\tmetadatas\x18\xa4\xd6\x87\x04 \x03(\x0b\x32\x36.google.cloud.compute.v1.BackendService.MetadatasEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x18\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x19\x88\x01\x01\x12M\n\x11outlier_detection\x18\xbe\xcc\x8c\xa9\x01 \x01(\x0b\x32).google.cloud.compute.v1.OutlierDetectionH\x1a\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x1b\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x1c\x88\x01\x01\x12\x18\n\x08protocol\x18\x98\x9d\xaa( \x01(\tH\x1d\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x1e\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x1f\x88\x01\x01\x12M\n\x11security_settings\x18\xc2\xbc\x9e\xe4\x01 \x01(\x0b\x32).google.cloud.compute.v1.SecuritySettingsH \x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH!\x88\x01\x01\x12\x1b\n\x10service_bindings\x18\xd8\x91\xd9? \x03(\t\x12!\n\x11service_lb_policy\x18\x91\x8e\x9d- \x01(\tH\"\x88\x01\x01\x12!\n\x10session_affinity\x18\xb1\xc1\x99\xdd\x01 \x01(\tH#\x88\x01\x01\x12\x61\n\x1estrong_session_affinity_cookie\x18\x8a\xa8\xcaq \x01(\x0b\x32\x31.google.cloud.compute.v1.BackendServiceHttpCookieH$\x88\x01\x01\x12@\n\nsubsetting\x18\x90\x90\xdb\xd6\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SubsettingH%\x88\x01\x01\x12\x1b\n\x0btimeout_sec\x18\xf3\xc0\x92& \x01(\x05H&\x88\x01\x01\x12\x42\n\x07used_by\x18\x99\xa0\xd2\xb9\x01 \x03(\x0b\x32-.google.cloud.compute.v1.BackendServiceUsedBy\x1a\x30\n\x0eMetadatasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"U\n\x0f\x43ompressionMode\x12\x1e\n\x1aUNDEFINED_COMPRESSION_MODE\x10\x00\x12\x10\n\tAUTOMATIC\x10\x8b\x84\xe9N\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\"\x95\x01\n\x1d\x45xternalManagedMigrationState\x12.\n*UNDEFINED_EXTERNAL_MANAGED_MIGRATION_STATE\x10\x00\x12\x0f\n\x07PREPARE\x10\xe7\xb1\xc6\xbe\x01\x12\x17\n\x10TEST_ALL_TRAFFIC\x10\xf2\xa1\x82&\x12\x1a\n\x12TEST_BY_PERCENTAGE\x10\x95\x8d\xfc\xf4\x01\"\xae\x01\n\x18IpAddressSelectionPolicy\x12)\n%UNDEFINED_IP_ADDRESS_SELECTION_POLICY\x10\x00\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%\x12.\n\'IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED\x10\xe0\x8b\xa2\x11\x12\x13\n\x0bPREFER_IPV6\x10\xd6\x85\xeb\xc2\x01\"\xd5\x01\n\x13LoadBalancingScheme\x12#\n\x1fUNDEFINED_LOAD_BALANCING_SCHEME\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x18\n\x10\x45XTERNAL_MANAGED\x10\x8b\xb6\x92\xf4\x01\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12\x17\n\x10INTERNAL_MANAGED\x10\xfd\xd7\xe7\x11\x12\x1c\n\x15INTERNAL_SELF_MANAGED\x10\xce\x97\xd1p\x12%\n\x1dINVALID_LOAD_BALANCING_SCHEME\x10\xfc\x93\xa6\x83\x01\"\xfc\x01\n\x10LocalityLbPolicy\x12 \n\x1cUNDEFINED_LOCALITY_LB_POLICY\x10\x00\x12\x19\n\x11INVALID_LB_POLICY\x10\xb3\xe7\x95\x9a\x01\x12\x14\n\rLEAST_REQUEST\x10\xf9\xc4\x9c\x16\x12\r\n\x06MAGLEV\x10\xea\x97\xea\x38\x12\x1b\n\x14ORIGINAL_DESTINATION\x10\x80\xfd\xa5O\x12\r\n\x06RANDOM\x10\xc3\xb1\x97}\x12\x11\n\tRING_HASH\x10\xbd\xdb\xaf\xce\x01\x12\x12\n\x0bROUND_ROBIN\x10\xf9\x86\xb1I\x12\x16\n\x0fWEIGHTED_MAGLEV\x10\x92\xe0\xc7y\x12\x1b\n\x14WEIGHTED_ROUND_ROBIN\x10\xd1\xf0\xd4\x02\"\x8e\x01\n\x08Protocol\x12\x16\n\x12UNDEFINED_PROTOCOL\x10\x00\x12\x0b\n\x04GRPC\x10\x9e\x88\x86\x01\x12\x0b\n\x04HTTP\x10\x88\x81\x88\x01\x12\x0c\n\x05HTTP2\x10\xaa\xa1\xf8 \x12\x0c\n\x05HTTPS\x10\xcb\xa1\xf8 \x12\t\n\x03SSL\x10\xec\x83\x05\x12\t\n\x03TCP\x10\xc1\x87\x05\x12\t\n\x03UDP\x10\xa1\x8f\x05\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\"\x8b\x02\n\x0fSessionAffinity\x12\x1e\n\x1aUNDEFINED_SESSION_AFFINITY\x10\x00\x12\x11\n\tCLIENT_IP\x10\x9b\xdc\xe9\xa4\x01\x12\x1f\n\x18\x43LIENT_IP_NO_DESTINATION\x10\x94\x9a\xcd\x32\x12\x1b\n\x14\x43LIENT_IP_PORT_PROTO\x10\xae\xf2\xdci\x12\x16\n\x0f\x43LIENT_IP_PROTO\x10\xa4\xc5\x89\x0c\x12\x18\n\x10GENERATED_COOKIE\x10\xb4\xce\xca\xb0\x01\x12\x13\n\x0cHEADER_FIELD\x10\xa8\x89\xdc_\x12\x13\n\x0bHTTP_COOKIE\x10\xfb\xa3\x83\xec\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x1e\n\x16STRONG_COOKIE_AFFINITY\x10\xfb\xdd\x93\xd1\x01\x42\x1a\n\x18_affinity_cookie_ttl_secB\r\n\x0b_cdn_policyB\x13\n\x11_circuit_breakersB\x13\n\x11_compression_modeB\x16\n\x14_connection_drainingB\x1d\n\x1b_connection_tracking_policyB\x12\n\x10_consistent_hashB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x17\n\x15_edge_security_policyB\x0f\n\r_enable_c_d_nB#\n!_external_managed_migration_stateB0\n._external_managed_migration_testing_percentageB\x12\n\x10_failover_policyB\x0e\n\x0c_fingerprintB\x0c\n\n_ha_policyB\x06\n\x04_iapB\x05\n\x03_idB\x1e\n\x1c_ip_address_selection_policyB\x07\n\x05_kindB\x18\n\x16_load_balancing_schemeB\x15\n\x13_locality_lb_policyB\r\n\x0b_log_configB\x16\n\x14_max_stream_durationB\x07\n\x05_nameB\n\n\x08_networkB\x14\n\x12_outlier_detectionB\x07\n\x05_portB\x0c\n\n_port_nameB\x0b\n\t_protocolB\t\n\x07_regionB\x12\n\x10_security_policyB\x14\n\x12_security_settingsB\x0c\n\n_self_linkB\x14\n\x12_service_lb_policyB\x13\n\x11_session_affinityB!\n\x1f_strong_session_affinity_cookieB\r\n\x0b_subsettingB\x0e\n\x0c_timeout_sec\"\xcb\x03\n\x1c\x42\x61\x63kendServiceAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.BackendServiceAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a`\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.BackendServicesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb7\x07\n\x17\x42\x61\x63kendServiceCdnPolicy\x12w\n\x1f\x62ypass_cache_on_request_headers\x18\xca\xbd\xeb\xe7\x01 \x03(\x0b\x32J.google.cloud.compute.v1.BackendServiceCdnPolicyBypassCacheOnRequestHeader\x12I\n\x10\x63\x61\x63he_key_policy\x18\xef\xd7\xf8K \x01(\x0b\x32\'.google.cloud.compute.v1.CacheKeyPolicyH\x00\x88\x01\x01\x12\x1a\n\ncache_mode\x18\xc0\xc8\xe2\r \x01(\tH\x01\x88\x01\x01\x12\x1a\n\nclient_ttl\x18\xf8\x8e\xec\r \x01(\x05H\x02\x88\x01\x01\x12\x1b\n\x0b\x64\x65\x66\x61ult_ttl\x18\xee\xfd\xe6/ \x01(\x05H\x03\x88\x01\x01\x12\x18\n\x07max_ttl\x18\x91\x89\xd5\x92\x01 \x01(\x05H\x04\x88\x01\x01\x12!\n\x10negative_caching\x18\xb5\xc3\xa2\xa0\x01 \x01(\x08H\x05\x88\x01\x01\x12i\n\x17negative_caching_policy\x18\xfc\xb5\x8aJ \x03(\x0b\x32\x45.google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy\x12#\n\x12request_coalescing\x18\xd4\x84\x88\xfe\x01 \x01(\x08H\x06\x88\x01\x01\x12!\n\x11serve_while_stale\x18\xdb\xf7\xedp \x01(\x05H\x07\x88\x01\x01\x12-\n\x1csigned_url_cache_max_age_sec\x18\xc6\xa8\xb9\x80\x01 \x01(\x03H\x08\x88\x01\x01\x12 \n\x14signed_url_key_names\x18\xb5\xed\xa7\xb1\x01 \x03(\t\"\x8f\x01\n\tCacheMode\x12\x18\n\x14UNDEFINED_CACHE_MODE\x10\x00\x12\x18\n\x10\x43\x41\x43HE_ALL_STATIC\x10\xe9\x97\xa5\xa9\x01\x12\x17\n\x0f\x46ORCE_CACHE_ALL\x10\xb0\xdd\xe0\xe7\x01\x12\x1a\n\x12INVALID_CACHE_MODE\x10\xc8\xb7\xe8\xb5\x01\x12\x19\n\x12USE_ORIGIN_HEADERS\x10\xa5\x92\xb4\x1a\x42\x13\n\x11_cache_key_policyB\r\n\x0b_cache_modeB\r\n\x0b_client_ttlB\x0e\n\x0c_default_ttlB\n\n\x08_max_ttlB\x13\n\x11_negative_cachingB\x15\n\x13_request_coalescingB\x14\n\x12_serve_while_staleB\x1f\n\x1d_signed_url_cache_max_age_sec\"`\n1BackendServiceCdnPolicyBypassCacheOnRequestHeader\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_header_name\"i\n,BackendServiceCdnPolicyNegativeCachingPolicy\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x03ttl\x18\xec\x83\x07 \x01(\x05H\x01\x88\x01\x01\x42\x07\n\x05_codeB\x06\n\x04_ttl\"\xeb\x04\n&BackendServiceConnectionTrackingPolicy\x12<\n,connection_persistence_on_unhealthy_backends\x18\xf9\x91\xd8H \x01(\tH\x00\x88\x01\x01\x12&\n\x16\x65nable_strong_affinity\x18\x94\xe6\xd9\x0b \x01(\x08H\x01\x88\x01\x01\x12 \n\x10idle_timeout_sec\x18\x88\xc1\xf4\x0b \x01(\x05H\x02\x88\x01\x01\x12\x1d\n\rtracking_mode\x18\xab\xdc\xf5< \x01(\tH\x03\x88\x01\x01\"\xb0\x01\n(ConnectionPersistenceOnUnhealthyBackends\x12:\n6UNDEFINED_CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS\x10\x00\x12\x15\n\x0e\x41LWAYS_PERSIST\x10\x84\xe7\xa7\x12\x12\x1b\n\x14\x44\x45\x46\x41ULT_FOR_PROTOCOL\x10\xcc\xa5\xa2\x45\x12\x14\n\rNEVER_PERSIST\x10\xe1\xa5\x8e\x42\"t\n\x0cTrackingMode\x12\x1b\n\x17UNDEFINED_TRACKING_MODE\x10\x00\x12\x1c\n\x15INVALID_TRACKING_MODE\x10\xc3\x83\xbd\x17\x12\x15\n\x0ePER_CONNECTION\x10\xe0\xf6\xcd(\x12\x12\n\x0bPER_SESSION\x10\xb4\xba\xeaVB/\n-_connection_persistence_on_unhealthy_backendsB\x19\n\x17_enable_strong_affinityB\x13\n\x11_idle_timeout_secB\x10\n\x0e_tracking_mode\"a\n\x1a\x42\x61\x63kendServiceCustomMetric\x12\x18\n\x07\x64ry_run\x18\xf7\xc3\xb6\x9a\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_dry_runB\x07\n\x05_name\"\xf9\x01\n\x1c\x42\x61\x63kendServiceFailoverPolicy\x12\x34\n$disable_connection_drain_on_failover\x18\xe1\xcc\xedV \x01(\x08H\x00\x88\x01\x01\x12)\n\x19\x64rop_traffic_if_unhealthy\x18\x94\xcd\xc5\x35 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x0e\x66\x61ilover_ratio\x18\xfe\x94\xb4\x65 \x01(\x02H\x02\x88\x01\x01\x42\'\n%_disable_connection_drain_on_failoverB\x1c\n\x1a_drop_traffic_if_unhealthyB\x11\n\x0f_failover_ratio\"\x8d\x02\n\x19\x42\x61\x63kendServiceGroupHealth\x12[\n\x0b\x61nnotations\x18\xa4\xf6\xb5\x35 \x03(\x0b\x32\x43.google.cloud.compute.v1.BackendServiceGroupHealth.AnnotationsEntry\x12@\n\rhealth_status\x18\xb5\xd6\xba\xb5\x01 \x03(\x0b\x32%.google.cloud.compute.v1.HealthStatus\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05_kind\"\x97\x01\n\x16\x42\x61\x63kendServiceHAPolicy\x12\x1d\n\rfast_i_p_move\x18\xd9\xbe\x94j \x01(\tH\x00\x88\x01\x01\"L\n\nFastIPMove\x12\x1b\n\x17UNDEFINED_FAST_I_P_MOVE\x10\x00\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0f\n\x07GARP_RA\x10\xb6\x86\xbb\xfb\x01\x42\x10\n\x0e_fast_i_p_move\"\x97\x01\n\x18\x42\x61\x63kendServiceHttpCookie\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x01\x88\x01\x01\x12\x35\n\x03ttl\x18\xec\x83\x07 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x07\n\x05_pathB\x06\n\x04_ttl\"\xfb\x01\n\x11\x42\x61\x63kendServiceIAP\x12\x16\n\x07\x65nabled\x18\xc1\x96> \x01(\x08H\x00\x88\x01\x01\x12!\n\x10oauth2_client_id\x18\xcb\x8e\xde\x95\x01 \x01(\tH\x01\x88\x01\x01\x12$\n\x14oauth2_client_secret\x18\xe0\xe1\xa8\x18 \x01(\tH\x02\x88\x01\x01\x12+\n\x1boauth2_client_secret_sha256\x18\xe6\x8c\xeb\x35 \x01(\tH\x03\x88\x01\x01\x42\n\n\x08_enabledB\x13\n\x11_oauth2_client_idB\x17\n\x15_oauth2_client_secretB\x1e\n\x1c_oauth2_client_secret_sha256\"\xad\x02\n\x12\x42\x61\x63kendServiceList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.BackendService\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb3\x02\n\x18\x42\x61\x63kendServiceListUsable\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.BackendService\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x02\n/BackendServiceLocalityLoadBalancingPolicyConfig\x12s\n\rcustom_policy\x18\xc0\x8b\xa6\x02 \x01(\x0b\x32T.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicyH\x00\x88\x01\x01\x12\x66\n\x06policy\x18\xb2\xca\xb6+ \x01(\x0b\x32N.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigPolicyH\x01\x88\x01\x01\x42\x10\n\x0e_custom_policyB\t\n\x07_policy\"{\n;BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy\x12\x14\n\x04\x64\x61ta\x18\xaa\xdf\xbb\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_dataB\x07\n\x05_name\"\xbb\x02\n5BackendServiceLocalityLoadBalancingPolicyConfigPolicy\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\"\xe2\x01\n\x04Name\x12\x12\n\x0eUNDEFINED_NAME\x10\x00\x12\x19\n\x11INVALID_LB_POLICY\x10\xb3\xe7\x95\x9a\x01\x12\x14\n\rLEAST_REQUEST\x10\xf9\xc4\x9c\x16\x12\r\n\x06MAGLEV\x10\xea\x97\xea\x38\x12\x1b\n\x14ORIGINAL_DESTINATION\x10\x80\xfd\xa5O\x12\r\n\x06RANDOM\x10\xc3\xb1\x97}\x12\x11\n\tRING_HASH\x10\xbd\xdb\xaf\xce\x01\x12\x12\n\x0bROUND_ROBIN\x10\xf9\x86\xb1I\x12\x16\n\x0fWEIGHTED_MAGLEV\x10\x92\xe0\xc7y\x12\x1b\n\x14WEIGHTED_ROUND_ROBIN\x10\xd1\xf0\xd4\x02\x42\x07\n\x05_name\"\xb0\x02\n\x17\x42\x61\x63kendServiceLogConfig\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1b\n\x0foptional_fields\x18\xf8\xc8\x86\xfc\x01 \x03(\t\x12\x1d\n\roptional_mode\x18\xa2\x86\xaf= \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0bsample_rate\x18\xd5\x94\x86I \x01(\x02H\x02\x88\x01\x01\"v\n\x0cOptionalMode\x12\x1b\n\x17UNDEFINED_OPTIONAL_MODE\x10\x00\x12\x0e\n\x06\x43USTOM\x10\xf1\xfe\xa5\xb9\x01\x12\x1b\n\x14\x45XCLUDE_ALL_OPTIONAL\x10\xc3\xdd\xb4P\x12\x1c\n\x14INCLUDE_ALL_OPTIONAL\x10\xb5\xed\xb2\xff\x01\x42\t\n\x07_enableB\x10\n\x0e_optional_modeB\x0e\n\x0c_sample_rate\"O\n\x17\x42\x61\x63kendServiceReference\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_backend_service\"?\n\x14\x42\x61\x63kendServiceUsedBy\x12\x19\n\treference\x18\xcb\xfe\xec\x46 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_reference\"\xa9\x01\n\x19\x42\x61\x63kendServicesScopedList\x12\x45\n\x10\x62\x61\x63kend_services\x18\xa9\xc3\xa1\xb9\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.BackendService\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xe7\t\n\tBfdPacket\x12&\n\x16\x61uthentication_present\x18\xf4\x93\xc4\x32 \x01(\x08H\x00\x88\x01\x01\x12)\n\x19\x63ontrol_plane_independent\x18\xb5\xaf\xde\x1d \x01(\x08H\x01\x88\x01\x01\x12\x17\n\x06\x64\x65mand\x18\xcb\xd4\x9b\x83\x01 \x01(\x08H\x02\x88\x01\x01\x12\x1a\n\ndiagnostic\x18\xa7\xb7\xf3\x1d \x01(\tH\x03\x88\x01\x01\x12\x15\n\x05\x66inal\x18\xf6\x82\xbb. \x01(\x08H\x04\x88\x01\x01\x12\x17\n\x06length\x18\xe6\xf5\xb8\xf0\x01 \x01(\rH\x05\x88\x01\x01\x12\'\n\x17min_echo_rx_interval_ms\x18\xd4\xf5\xb1. \x01(\rH\x06\x88\x01\x01\x12#\n\x12min_rx_interval_ms\x18\xf4\xd0\xfb\xdc\x01 \x01(\rH\x07\x88\x01\x01\x12#\n\x12min_tx_interval_ms\x18\xb2\xf7\xe9\xfa\x01 \x01(\rH\x08\x88\x01\x01\x12\x1a\n\nmultiplier\x18\xc1\xfb\x9d[ \x01(\rH\t\x88\x01\x01\x12\x1a\n\nmultipoint\x18\xf7\xb7\xa3[ \x01(\x08H\n\x88\x01\x01\x12 \n\x10my_discriminator\x18\xc9\x92\xc7$ \x01(\rH\x0b\x88\x01\x01\x12\x14\n\x04poll\x18\xbf\xaf\xd2\x01 \x01(\x08H\x0c\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\r\x88\x01\x01\x12\x18\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\rH\x0e\x88\x01\x01\x12#\n\x12your_discriminator\x18\x90\xe7\xef\xf5\x01 \x01(\rH\x0f\x88\x01\x01\"\xde\x02\n\nDiagnostic\x12\x18\n\x14UNDEFINED_DIAGNOSTIC\x10\x00\x12\x1c\n\x15\x41\x44MINISTRATIVELY_DOWN\x10\xa6\x8e\x83:\x12\x1d\n\x16\x43ONCATENATED_PATH_DOWN\x10\x8c\xa9\xbe\x0c\x12%\n\x1e\x43ONTROL_DETECTION_TIME_EXPIRED\x10\xef\xf8\xcc@\x12\x1d\n\x16\x44IAGNOSTIC_UNSPECIFIED\x10\xff\x84\x80\x1c\x12\x1b\n\x14\x45\x43HO_FUNCTION_FAILED\x10\xea\xd8\x9di\x12\x1d\n\x16\x46ORWARDING_PLANE_RESET\x10\xaa\xae\xb3\t\x12&\n\x1eNEIGHBOR_SIGNALED_SESSION_DOWN\x10\xb6\xfe\xb8\xb2\x01\x12\x14\n\rNO_DIAGNOSTIC\x10\xe5\xc1\x8cj\x12\x11\n\tPATH_DOWN\x10\xfc\x90\xc9\x8a\x01\x12&\n\x1eREVERSE_CONCATENATED_PATH_DOWN\x10\xa9\xb5\xc8\xe4\x01\"m\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x11\n\nADMIN_DOWN\x10\xb2\xdf\xa5=\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x0b\n\x04INIT\x10\x90\xba\x89\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x07\n\x02UP\x10\x9b\x15\x42\x19\n\x17_authentication_presentB\x1c\n\x1a_control_plane_independentB\t\n\x07_demandB\r\n\x0b_diagnosticB\x08\n\x06_finalB\t\n\x07_lengthB\x1a\n\x18_min_echo_rx_interval_msB\x15\n\x13_min_rx_interval_msB\x15\n\x13_min_tx_interval_msB\r\n\x0b_multiplierB\r\n\x0b_multipointB\x13\n\x11_my_discriminatorB\x07\n\x05_pollB\x08\n\x06_stateB\n\n\x08_versionB\x15\n\x13_your_discriminator\"\xec\n\n\tBfdStatus\x12/\n\x1f\x62\x66\x64_session_initialization_mode\x18\x9a\x9f\x83h \x01(\tH\x00\x88\x01\x01\x12/\n\x1e\x63onfig_update_timestamp_micros\x18\xb1\x80\x81\xda\x01 \x01(\x03H\x01\x88\x01\x01\x12U\n\x15\x63ontrol_packet_counts\x18\xf9\xd2\x9b? \x01(\x0b\x32..google.cloud.compute.v1.BfdStatusPacketCountsH\x02\x88\x01\x01\x12N\n\x18\x63ontrol_packet_intervals\x18\xf9\xe7\xe6\xee\x01 \x03(\x0b\x32(.google.cloud.compute.v1.PacketIntervals\x12!\n\x10local_diagnostic\x18\xfb\xa1\x90\xdd\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0blocal_state\x18\xbd\x95\x92G \x01(\tH\x04\x88\x01\x01\x12\x37\n\'negotiated_local_control_tx_interval_ms\x18\x94\xd1\xb0\n \x01(\rH\x05\x88\x01\x01\x12>\n\trx_packet\x18\xa1\x81\xeb\xf0\x01 \x01(\x0b\x32\".google.cloud.compute.v1.BfdPacketH\x06\x88\x01\x01\x12=\n\ttx_packet\x18\xa3\xbd\x8e\x35 \x01(\x0b\x32\".google.cloud.compute.v1.BfdPacketH\x07\x88\x01\x01\x12\x19\n\tuptime_ms\x18\xdd\xda\xe5; \x01(\x03H\x08\x88\x01\x01\"\x80\x01\n\x1c\x42\x66\x64SessionInitializationMode\x12-\n)UNDEFINED_BFD_SESSION_INITIALIZATION_MODE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0f\n\x07PASSIVE\x10\x87\xf6\xd7\xdc\x01\"\xe9\x02\n\x0fLocalDiagnostic\x12\x1e\n\x1aUNDEFINED_LOCAL_DIAGNOSTIC\x10\x00\x12\x1c\n\x15\x41\x44MINISTRATIVELY_DOWN\x10\xa6\x8e\x83:\x12\x1d\n\x16\x43ONCATENATED_PATH_DOWN\x10\x8c\xa9\xbe\x0c\x12%\n\x1e\x43ONTROL_DETECTION_TIME_EXPIRED\x10\xef\xf8\xcc@\x12\x1d\n\x16\x44IAGNOSTIC_UNSPECIFIED\x10\xff\x84\x80\x1c\x12\x1b\n\x14\x45\x43HO_FUNCTION_FAILED\x10\xea\xd8\x9di\x12\x1d\n\x16\x46ORWARDING_PLANE_RESET\x10\xaa\xae\xb3\t\x12&\n\x1eNEIGHBOR_SIGNALED_SESSION_DOWN\x10\xb6\xfe\xb8\xb2\x01\x12\x14\n\rNO_DIAGNOSTIC\x10\xe5\xc1\x8cj\x12\x11\n\tPATH_DOWN\x10\xfc\x90\xc9\x8a\x01\x12&\n\x1eREVERSE_CONCATENATED_PATH_DOWN\x10\xa9\xb5\xc8\xe4\x01\"x\n\nLocalState\x12\x19\n\x15UNDEFINED_LOCAL_STATE\x10\x00\x12\x11\n\nADMIN_DOWN\x10\xb2\xdf\xa5=\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x0b\n\x04INIT\x10\x90\xba\x89\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x07\n\x02UP\x10\x9b\x15\x42\"\n _bfd_session_initialization_modeB!\n\x1f_config_update_timestamp_microsB\x18\n\x16_control_packet_countsB\x13\n\x11_local_diagnosticB\x0e\n\x0c_local_stateB*\n(_negotiated_local_control_tx_interval_msB\x0c\n\n_rx_packetB\x0c\n\n_tx_packetB\x0c\n\n_uptime_ms\"\xcd\x01\n\x15\x42\x66\x64StatusPacketCounts\x12\x16\n\x06num_rx\x18\x9f\xa3\xe3\x12 \x01(\rH\x00\x88\x01\x01\x12 \n\x0fnum_rx_rejected\x18\x9e\xae\xff\x85\x01 \x01(\rH\x01\x88\x01\x01\x12\"\n\x11num_rx_successful\x18\xba\x8a\x91\xd9\x01 \x01(\rH\x02\x88\x01\x01\x12\x16\n\x06num_tx\x18\xdd\xa3\xe3\x12 \x01(\rH\x03\x88\x01\x01\x42\t\n\x07_num_rxB\x12\n\x10_num_rx_rejectedB\x14\n\x12_num_rx_successfulB\t\n\x07_num_tx\"\x81\x03\n\x08\x42gpRoute\x12<\n\x08\x61s_paths\x18\xa1\xc5\xcc\x41 \x03(\x0b\x32\'.google.cloud.compute.v1.BgpRouteAsPath\x12\x16\n\x0b\x63ommunities\x18\xc7\xd4\xe2Y \x03(\t\x12\x61\n\x0b\x64\x65stination\x18\x8e\x88\x99V \x01(\x0b\x32\x44.google.cloud.compute.v1.BgpRouteNetworkLayerReachabilityInformationH\x00\x88\x01\x01\x12\x12\n\x03med\x18\xcc\xcb\x06 \x01(\rH\x01\x88\x01\x01\x12\x16\n\x06origin\x18\xa6\xde\x86\x1f \x01(\tH\x02\x88\x01\x01\"m\n\x06Origin\x12\x14\n\x10UNDEFINED_ORIGIN\x10\x00\x12\x16\n\x0e\x42GP_ORIGIN_EGP\x10\xe9\xce\xd6\xb4\x01\x12\x16\n\x0e\x42GP_ORIGIN_IGP\x10\xed\xec\xd6\xb4\x01\x12\x1d\n\x15\x42GP_ORIGIN_INCOMPLETE\x10\x83\x93\xf7\xd7\x01\x42\x0e\n\x0c_destinationB\x06\n\x04_medB\t\n\x07_origin\"\x95\x01\n\x0e\x42gpRouteAsPath\x12\x0f\n\x04\x61sns\x18\xf7\xaa\xb7\x01 \x03(\x05\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x00\x88\x01\x01\"S\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x1d\n\x15\x41S_PATH_TYPE_SEQUENCE\x10\xb9\xf3\x84\xad\x01\x12\x18\n\x10\x41S_PATH_TYPE_SET\x10\xca\xa6\xa4\x90\x01\x42\x07\n\x05_type\"v\n+BgpRouteNetworkLayerReachabilityInformation\x12\x18\n\x07path_id\x18\xf5\xbe\xcd\x86\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\x06prefix\x18\x92\xe5\xd2, \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_path_idB\t\n\x07_prefix\"\xb1\x01\n\x07\x42inding\x12\x1b\n\nbinding_id\x18\x95\xf2\xa9\xd2\x01 \x01(\tH\x00\x88\x01\x01\x12\x38\n\tcondition\x18\x9b\xda\xa5\x65 \x01(\x0b\x32\x1d.google.cloud.compute.v1.ExprH\x01\x88\x01\x01\x12\x13\n\x07members\x18\x99\x92\xbb\xc4\x01 \x03(\t\x12\x14\n\x04role\x18\xf6\x80\xd6\x01 \x01(\tH\x02\x88\x01\x01\x42\r\n\x0b_binding_idB\x0c\n\n_conditionB\x07\n\x05_role\"\xe8\x01\n\x15\x42ulkInsertDiskRequest\x12\x64\n\"bulk_insert_disk_resource_resource\x18\xd6\xf9\x97\x8a\x01 \x01(\x0b\x32/.google.cloud.compute.v1.BulkInsertDiskResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"m\n\x16\x42ulkInsertDiskResource\x12/\n\x1fsource_consistency_group_policy\x18\xdd\xa2\xad\t \x01(\tH\x00\x88\x01\x01\x42\"\n _source_consistency_group_policy\"\xf3\x01\n\x19\x42ulkInsertInstanceRequest\x12k\n&bulk_insert_instance_resource_resource\x18\xce\xc2\xe0\x13 \x01(\x0b\x32\x33.google.cloud.compute.v1.BulkInsertInstanceResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa5\x05\n\x1a\x42ulkInsertInstanceResource\x12\x15\n\x05\x63ount\x18\x8f\xa2\x9d- \x01(\x03H\x00\x88\x01\x01\x12P\n\x13instance_properties\x18\x9d\x9e\xd8\x66 \x01(\x0b\x32+.google.cloud.compute.v1.InstancePropertiesH\x01\x88\x01\x01\x12I\n\x0flocation_policy\x18\xfc\xb9\x87\xde\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.LocationPolicyH\x02\x88\x01\x01\x12\x1a\n\tmin_count\x18\xe2\xa9\xbf\xf9\x01 \x01(\x03H\x03\x88\x01\x01\x12\x1d\n\x0cname_pattern\x18\xdc\xa3\xa9\xc5\x01 \x01(\tH\x04\x88\x01\x01\x12r\n\x17per_instance_properties\x18\xfb\xb9\xde\x33 \x03(\x0b\x32N.google.cloud.compute.v1.BulkInsertInstanceResource.PerInstancePropertiesEntry\x12)\n\x18source_instance_template\x18\xc0\xc3\xc1\x9e\x01 \x01(\tH\x05\x88\x01\x01\x1a\x86\x01\n\x1aPerInstancePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12W\n\x05value\x18\x02 \x01(\x0b\x32H.google.cloud.compute.v1.BulkInsertInstanceResourcePerInstanceProperties:\x02\x38\x01\x42\x08\n\x06_countB\x16\n\x14_instance_propertiesB\x12\n\x10_location_policyB\x0c\n\n_min_countB\x0f\n\r_name_patternB\x1b\n\x19_source_instance_template\"w\n/BulkInsertInstanceResourcePerInstanceProperties\x12\x18\n\x08hostname\x18\xb3\xb8\x85q \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_hostnameB\x07\n\x05_name\"\x9c\x03\n\x19\x42ulkInsertOperationStatus\x12!\n\x10\x63reated_vm_count\x18\xfe\xa9\xa2\xbd\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x10\x64\x65leted_vm_count\x18\xed\xd5\xca\x81\x01 \x01(\x05H\x01\x88\x01\x01\x12)\n\x19\x66\x61iled_to_create_vm_count\x18\xe8\xbd\xeb\x1b \x01(\x05H\x02\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x03\x88\x01\x01\x12 \n\x0ftarget_vm_count\x18\xf5\xa0\x92\xfe\x01 \x01(\x05H\x04\x88\x01\x01\"m\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x0b\n\x04\x44ONE\x10\x82\xb7\x80\x01\x12\x13\n\x0cROLLING_BACK\x10\xc1\x9d\xd9{\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\x13\n\x11_created_vm_countB\x13\n\x11_deleted_vm_countB\x1c\n\x1a_failed_to_create_vm_countB\t\n\x07_statusB\x12\n\x10_target_vm_count\"\xf2\x01\n\x1b\x42ulkInsertRegionDiskRequest\x12\x64\n\"bulk_insert_disk_resource_resource\x18\xd6\xf9\x97\x8a\x01 \x01(\x0b\x32/.google.cloud.compute.v1.BulkInsertDiskResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xfd\x01\n\x1f\x42ulkInsertRegionInstanceRequest\x12k\n&bulk_insert_instance_resource_resource\x18\xce\xc2\xe0\x13 \x01(\x0b\x32\x33.google.cloud.compute.v1.BulkInsertInstanceResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"l\n\x15\x43\x61\x63heInvalidationRule\x12\x15\n\ncache_tags\x18\xb6\xbd\xee\r \x03(\t\x12\x14\n\x04host\x18\xa8\xeb\xc3\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_hostB\x07\n\x05_path\"\xc2\x02\n\x0e\x43\x61\x63heKeyPolicy\x12\x1d\n\x0cinclude_host\x18\xdf\x85\x94\xe8\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1f\n\x14include_http_headers\x18\x86\xfa\x97\x01 \x03(\t\x12 \n\x15include_named_cookies\x18\xb2\xb0\xd1) \x03(\t\x12!\n\x10include_protocol\x18\xcf\xd0\xdc\x90\x01 \x01(\x08H\x01\x88\x01\x01\x12%\n\x14include_query_string\x18\x9f\xf3\x84\xe2\x01 \x01(\x08H\x02\x88\x01\x01\x12\"\n\x16query_string_blacklist\x18\x86\xaa\xa1\xa9\x01 \x03(\t\x12!\n\x16query_string_whitelist\x18\xb0\xd8\x81\x19 \x03(\tB\x0f\n\r_include_hostB\x13\n\x11_include_protocolB\x17\n\x15_include_query_string\"\xe3\x01\n.CancelInstanceGroupManagerResizeRequestRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0eresize_request\x18\x84\x84\xb9g \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb0\x02\n\x0f\x43ircuitBreakers\x12\x1f\n\x0fmax_connections\x18\xfa\xd5\xe1\x34 \x01(\x05H\x00\x88\x01\x01\x12%\n\x14max_pending_requests\x18\xe7\xa5\x8a\xb3\x01 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0cmax_requests\x18\xbf\xf8\xb2\r \x01(\x05H\x02\x88\x01\x01\x12,\n\x1bmax_requests_per_connection\x18\xc0\x96\xb8\xac\x01 \x01(\x05H\x03\x88\x01\x01\x12\x1b\n\x0bmax_retries\x18\xeb\xa2\xbe\x1a \x01(\x05H\x04\x88\x01\x01\x42\x12\n\x10_max_connectionsB\x17\n\x15_max_pending_requestsB\x0f\n\r_max_requestsB\x1e\n\x1c_max_requests_per_connectionB\x0e\n\x0c_max_retries\"\xb1\x01\n\x1f\x43loneRulesFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12&\n\x16source_firewall_policy\x18\xad\xda\xf6\x0b \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x19\n\x17_source_firewall_policy\"\xdb\x01\n&CloneRulesNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12&\n\x16source_firewall_policy\x18\xad\xda\xf6\x0b \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x19\n\x17_source_firewall_policy\"\x82\x02\n,CloneRulesRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12&\n\x16source_firewall_policy\x18\xad\xda\xf6\x0b \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x19\n\x17_source_firewall_policy\"\x8d\x12\n\nCommitment\x12\x1b\n\nauto_renew\x18\xfd\x97\xa4\xec\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08\x63\x61tegory\x18\xfe\xf9\x8a\x18 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12$\n\x14\x63ustom_end_timestamp\x18\xe4\xb4\xd6V \x01(\tH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12\x1e\n\rend_timestamp\x18\xb2\xad\x9a\xdf\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x15\x65xisting_reservations\x18\xdb\x88\x8c\xeb\x01 \x03(\t\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12U\n\x10license_resource\x18\xcc\xd4\xea\xd0\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.LicenseResourceCommitmentH\x08\x88\x01\x01\x12#\n\x18merge_source_commitments\x18\xc1\xaa\xd8Y \x03(\t\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04plan\x18\xa9\x96\xd2\x01 \x01(\tH\n\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12>\n\x0creservations\x18\xa7\xec\xcc\xbe\x01 \x03(\x0b\x32$.google.cloud.compute.v1.Reservation\x12R\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x31.google.cloud.compute.v1.CommitmentResourceStatusH\x0c\x88\x01\x01\x12\x41\n\tresources\x18\xa5\xfc\xb2N \x03(\x0b\x32+.google.cloud.compute.v1.ResourceCommitment\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12(\n\x17split_source_commitment\x18\xd4\xb7\xfd\xbf\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1f\n\x0fstart_timestamp\x18\xf9\xaa\xf1\' \x01(\tH\x0f\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x10\x88\x01\x01\x12\x1f\n\x0estatus_message\x18\xba\xc9\xe9\x8d\x01 \x01(\tH\x11\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x12\x88\x01\x01\"b\n\x08\x43\x61tegory\x12\x16\n\x12UNDEFINED_CATEGORY\x10\x00\x12\x1c\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\xd6\xba\xe6\xf2\x01\x12\x0f\n\x07LICENSE\x10\xa1\xa0\xf0\xa5\x01\x12\x0f\n\x07MACHINE\x10\xa7\xa0\xf3\xdf\x01\"Y\n\x04Plan\x12\x12\n\x0eUNDEFINED_PLAN\x10\x00\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x17\n\x10THIRTY_SIX_MONTH\x10\x86\xb5\xfd~\x12\x13\n\x0cTWELVE_MONTH\x10\xba\x9a\xc4R\"z\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\tCANCELLED\x10\xb1\xf2\x80\x14\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x0f\n\x07\x45XPIRED\x10\x85\xe6\x88\xe6\x01\x12\x15\n\x0eNOT_YET_ACTIVE\x10\xe9\xe2\xe9\t\"\xc3\x06\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x1d\n\x15\x41\x43\x43\x45LERATOR_OPTIMIZED\x10\x93\xd0\xf5\x85\x01\x12\x1f\n\x18\x41\x43\x43\x45LERATOR_OPTIMIZED_A3\x10\xbe\xcf\xceK\x12$\n\x1d\x41\x43\x43\x45LERATOR_OPTIMIZED_A3_MEGA\x10\xd3\x88\xd1J\x12%\n\x1e\x41\x43\x43\x45LERATOR_OPTIMIZED_A3_ULTRA\x10\xcb\xc7\xa1\r\x12\x1f\n\x18\x41\x43\x43\x45LERATOR_OPTIMIZED_A4\x10\xbf\xcf\xceK\x12\x18\n\x11\x43OMPUTE_OPTIMIZED\x10\xdf\xed\xc0K\x12\x1d\n\x15\x43OMPUTE_OPTIMIZED_C2D\x10\xf5\xc0\xdf\xb6\x01\x12\x1c\n\x14\x43OMPUTE_OPTIMIZED_C3\x10\xb0\xab\x8b\xcc\x01\x12\x1d\n\x15\x43OMPUTE_OPTIMIZED_C3D\x10\x94\xc1\xdf\xb6\x01\x12\x1c\n\x14\x43OMPUTE_OPTIMIZED_H3\x10\xcb\xac\x8b\xcc\x01\x12\x17\n\x0fGENERAL_PURPOSE\x10\x87\xf9\xf9\x8e\x01\x12\x1a\n\x12GENERAL_PURPOSE_C4\x10\x89\x9e\xfb\x8f\x01\x12\x1a\n\x13GENERAL_PURPOSE_C4A\x10\xd8\xa4\xecn\x12\x1a\n\x12GENERAL_PURPOSE_E2\x10\xc5\x9e\xfb\x8f\x01\x12\x1a\n\x12GENERAL_PURPOSE_N2\x10\xdc\xa0\xfb\x8f\x01\x12\x1a\n\x13GENERAL_PURPOSE_N2D\x10\xe8\xf6\xecn\x12\x1a\n\x12GENERAL_PURPOSE_N4\x10\xde\xa0\xfb\x8f\x01\x12\x1a\n\x13GENERAL_PURPOSE_T2D\x10\xee\xa3\xedn\x12\x19\n\x12GRAPHICS_OPTIMIZED\x10\xd3\xf8\xd4 \x12\x18\n\x10MEMORY_OPTIMIZED\x10\xc9\xee\xac\x86\x01\x12\x1b\n\x13MEMORY_OPTIMIZED_M3\x10\xbc\x8c\xe0\x83\x01\x12\x1b\n\x13MEMORY_OPTIMIZED_M4\x10\xbd\x8c\xe0\x83\x01\x12\x1f\n\x18MEMORY_OPTIMIZED_X4_16TB\x10\xe0\xef\xa6W\x12\x1f\n\x18MEMORY_OPTIMIZED_X4_24TB\x10\xbd\xc9\xa8W\x12\x1f\n\x18MEMORY_OPTIMIZED_X4_32TB\x10\x9a\xa3\xaaW\x12\x1c\n\x14STORAGE_OPTIMIZED_Z3\x10\xb5\xd9\x87\x97\x01\x12\x18\n\x10TYPE_UNSPECIFIED\x10\x92\xfb\xdb\xd0\x01\x42\r\n\x0b_auto_renewB\x0b\n\t_categoryB\x15\n\x13_creation_timestampB\x17\n\x15_custom_end_timestampB\x0e\n\x0c_descriptionB\x10\n\x0e_end_timestampB\x05\n\x03_idB\x07\n\x05_kindB\x13\n\x11_license_resourceB\x07\n\x05_nameB\x07\n\x05_planB\t\n\x07_regionB\x12\n\x10_resource_statusB\x0c\n\n_self_linkB\x1a\n\x18_split_source_commitmentB\x12\n\x10_start_timestampB\t\n\x07_statusB\x11\n\x0f_status_messageB\x07\n\x05_type\"\xbf\x03\n\x18\x43ommitmentAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.CommitmentAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.CommitmentsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0e\x43ommitmentList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.Commitment\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"|\n\x18\x43ommitmentResourceStatus\x12\x36\n%custom_term_eligibility_end_timestamp\x18\xfb\xab\xc7\xad\x01 \x01(\tH\x00\x88\x01\x01\x42(\n&_custom_term_eligibility_end_timestamp\"\x9c\x01\n\x15\x43ommitmentsScopedList\x12<\n\x0b\x63ommitments\x18\xfe\xaf\xf2\xd6\x01 \x03(\x0b\x32#.google.cloud.compute.v1.Commitment\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xd0\x02\n\x1a\x43onfidentialInstanceConfig\x12*\n\x1a\x63onfidential_instance_type\x18\xad\x8c\xde\x14 \x01(\tH\x00\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x01\x88\x01\x01\"\x99\x01\n\x18\x43onfidentialInstanceType\x12(\n$UNDEFINED_CONFIDENTIAL_INSTANCE_TYPE\x10\x00\x12-\n&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x85\xb0\xec\x36\x12\t\n\x03SEV\x10\xc4\x80\x05\x12\x0e\n\x07SEV_SNP\x10\xda\xdd\xaf\n\x12\t\n\x03TDX\x10\xe8\x87\x05\x42\x1d\n\x1b_confidential_instance_typeB\x1e\n\x1c_enable_confidential_compute\"S\n\x12\x43onnectionDraining\x12$\n\x14\x64raining_timeout_sec\x18\x9e\xd5\xack \x01(\x05H\x00\x88\x01\x01\x42\x17\n\x15_draining_timeout_sec\"\x88\x02\n\"ConsistentHashLoadBalancerSettings\x12\x62\n\x0bhttp_cookie\x18\xfb\xab\x97\x03 \x01(\x0b\x32\x45.google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookieH\x00\x88\x01\x01\x12 \n\x10http_header_name\x18\xc6\xf7\xfao \x01(\tH\x01\x88\x01\x01\x12!\n\x11minimum_ring_size\x18\xbf\xbb\xe1o \x01(\x03H\x02\x88\x01\x01\x42\x0e\n\x0c_http_cookieB\x13\n\x11_http_header_nameB\x14\n\x12_minimum_ring_size\"\xab\x01\n,ConsistentHashLoadBalancerSettingsHttpCookie\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x01\x88\x01\x01\x12\x35\n\x03ttl\x18\xec\x83\x07 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x07\n\x05_pathB\x06\n\x04_ttl\"\x9e\x02\n\nCorsPolicy\x12\"\n\x11\x61llow_credentials\x18\x86\xfe\xbd\xe5\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\rallow_headers\x18\x90\xc1\xc5\x15 \x03(\t\x12\x18\n\rallow_methods\x18\xbc\xf9\xf8\x61 \x03(\t\x12\x1f\n\x14\x61llow_origin_regexes\x18\xd2\x8d\xda\x66 \x03(\t\x12\x18\n\rallow_origins\x18\x97\xce\xf8\\ \x03(\t\x12\x19\n\x08\x64isabled\x18\xfc\xf4\x98\x81\x01 \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0e\x65xpose_headers\x18\x8b\xcc\x88v \x03(\t\x12\x18\n\x07max_age\x18\xa4\xf7\xd3\x92\x01 \x01(\x05H\x02\x88\x01\x01\x42\x14\n\x12_allow_credentialsB\x0b\n\t_disabledB\n\n\x08_max_age\"\xd1\x02\n*CreateInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n9instance_group_managers_create_instances_request_resource\x18\x93\xfa\xda\x0b \x01(\x0b\x32\x44.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe9\x02\n0CreateInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_instance_group_managers_create_instances_request_resource\x18\x88\xbf\x98\xab\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x91\x02\n\x19\x43reateSnapshotDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0bguest_flush\x18\xdd\x93\xec\xb7\x01 \x01(\x08H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x45\n\x11snapshot_resource\x18\xa9\xb8\xc1\xe5\x01 \x01(\x0b\x32!.google.cloud.compute.v1.SnapshotB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x0e\n\x0c_guest_flushB\r\n\x0b_request_id\"\xed\x01\n\x1f\x43reateSnapshotRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x45\n\x11snapshot_resource\x18\xa9\xb8\xc1\xe5\x01 \x01(\x0b\x32!.google.cloud.compute.v1.SnapshotB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb8\x01\n\x19\x43ustomErrorResponsePolicy\x12j\n\x14\x65rror_response_rules\x18\x90\xad\xfc\x06 \x03(\x0b\x32I.google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule\x12\x1d\n\rerror_service\x18\xfe\xee\xa6N \x01(\tH\x00\x88\x01\x01\x42\x10\n\x0e_error_service\"\xb6\x01\n0CustomErrorResponsePolicyCustomErrorResponseRule\x12\x1f\n\x14match_response_codes\x18\xe2\x88\x87\x32 \x03(\t\x12\'\n\x16override_response_code\x18\xf8\xd7\xf0\xfc\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x01\x88\x01\x01\x42\x19\n\x17_override_response_codeB\x07\n\x05_path\"\x8f\x02\n\x15\x43ustomerEncryptionKey\x12\x1d\n\x0ckms_key_name\x18\x99\xeb\xfb\xe6\x01 \x01(\tH\x00\x88\x01\x01\x12\'\n\x17kms_key_service_account\x18\xd5\xc5\x90\x64 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x07raw_key\x18\xc8\xe3\x98\xd6\x01 \x01(\tH\x02\x88\x01\x01\x12\"\n\x11rsa_encrypted_key\x18\xa5\xc3\xfc\x9f\x01 \x01(\tH\x03\x88\x01\x01\x12\x16\n\x06sha256\x18\xa7\xec\x8eQ \x01(\tH\x04\x88\x01\x01\x42\x0f\n\r_kms_key_nameB\x1a\n\x18_kms_key_service_accountB\n\n\x08_raw_keyB\x14\n\x12_rsa_encrypted_keyB\t\n\x07_sha256\"\xb5\x01\n\"CustomerEncryptionKeyProtectedDisk\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x00\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_disk_encryption_keyB\t\n\x07_source\"C\n\x04\x44\x61ta\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"\xeb\x01\n!DeleteAccessConfigInstanceRequest\x12\x1d\n\raccess_config\x18\xfd\xe4\xde\" \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x9f\x01\n\x14\x44\x65leteAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa1\x01\n\x17\x44\x65leteAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x8a\x01\n\x1a\x44\x65leteBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x8d\x01\n\x1b\x44\x65leteBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x94\x01\n\x11\x44\x65leteDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x95\x01\n\x1f\x44\x65leteExternalVpnGatewayRequest\x12$\n\x14\x65xternal_vpn_gateway\x18\x85\xd7\xb3\x34 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"j\n\x1b\x44\x65leteFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x80\x01\n\x15\x44\x65leteFirewallRequest\x12\x19\n\x08\x66irewall\x18\x80\xfa\xd5\xf3\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xae\x01\n\x1b\x44\x65leteForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x84\x01\n\x1a\x44\x65leteGlobalAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x93\x01\n!DeleteGlobalForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa0\x01\n\'DeleteGlobalNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"R\n\x1c\x44\x65leteGlobalOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"\x1f\n\x1d\x44\x65leteGlobalOperationResponse\"o\n(DeleteGlobalOrganizationOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_parent_id\"+\n)DeleteGlobalOrganizationOperationResponse\"\xa2\x01\n)DeleteGlobalPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x87\x01\n\x18\x44\x65leteHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"y\n\x12\x44\x65leteImageRequest\x12\x15\n\x05image\x18\xdb\xd2\xea/ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb6\x01\n!DeleteInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe3\x01\n.DeleteInstanceGroupManagerResizeRequestRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0eresize_request\x18\x84\x84\xb9g \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa7\x01\n\x1a\x44\x65leteInstanceGroupRequest\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x9c\x01\n\x15\x44\x65leteInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x91\x01\n\x1d\x44\x65leteInstanceTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd1\x02\n*DeleteInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n9instance_group_managers_delete_instances_request_resource\x18\x84\xc6\xadO \x01(\x0b\x32\x44.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe9\x02\n0DeleteInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_instance_group_managers_delete_instances_request_resource\x18\xf9\x8a\xeb\xee\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xac\x01\n\x1c\x44\x65leteInstantSnapshotRequest\x12!\n\x10instant_snapshot\x18\xe2\xdc\xdf\xba\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xbe\x01\n#DeleteInterconnectAttachmentRequest\x12(\n\x17interconnect_attachment\x18\xf4\x8a\xf7\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x87\x01\n\x19\x44\x65leteInterconnectRequest\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"}\n\x14\x44\x65leteLicenseRequest\x12\x17\n\x07license\x18\xc1\x88\xc2O \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x88\x01\n\x19\x44\x65leteMachineImageRequest\x12\x1d\n\rmachine_image\x18\xe3\xfe\xfe \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb3\x01\n\x1e\x44\x65leteNetworkAttachmentRequest\x12\"\n\x12network_attachment\x18\xd4\x97\x8fk \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc7\x01\n\'DeleteNetworkEdgeSecurityServiceRequest\x12-\n\x1dnetwork_edge_security_service\x18\xa7\x9f\xefJ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb7\x01\n!DeleteNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x94\x01\n\"DeleteNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"}\n\x14\x44\x65leteNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa0\x01\n\x16\x44\x65leteNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xaa\x01\n\x19\x44\x65leteNodeTemplateRequest\x12\x1e\n\rnode_template\x18\x97\xe4\x8b\x9a\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x97\x02\n\x1b\x44\x65leteNodesNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12p\n)node_groups_delete_nodes_request_resource\x18\x92\xd7\xb3W \x01(\x0b\x32\x35.google.cloud.compute.v1.NodeGroupsDeleteNodesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xaf\x01\n\x1c\x44\x65letePacketMirroringRequest\x12 \n\x10packet_mirroring\x18\xcc\xb9\xd1\n \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbc\x02\n3DeletePerInstanceConfigsInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x9c\x01\n@instance_group_managers_delete_per_instance_configs_req_resource\x18\xa0\xea\xe8\xac\x01 \x01(\x0b\x32I.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReqB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zone\"\xc6\x02\n9DeletePerInstanceConfigsRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9c\x01\nAregion_instance_group_manager_delete_instance_config_req_resource\x18\x85\x9b- \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReqB\x03\xe0\x41\x02\"\x9e\x01\n$DeletePublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbd\x01\n#DeletePublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xab\x01\n\x1d\x44\x65leteRegionAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb4\x01\n!DeleteRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9e\x01\n\x17\x44\x65leteRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xae\x01\n\x1e\x44\x65leteRegionHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbd\x01\n%DeleteRegionHealthCheckServiceRequest\x12%\n\x14health_check_service\x18\xdb\x9b\xdd\xc2\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc0\x01\n\'DeleteRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb8\x01\n#DeleteRegionInstanceTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb6\x01\n\"DeleteRegionInstantSnapshotRequest\x12!\n\x10instant_snapshot\x18\xe2\xdc\xdf\xba\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc1\x01\n\'DeleteRegionNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbb\x01\n(DeleteRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc0\x01\n\'DeleteRegionNotificationEndpointRequest\x12&\n\x15notification_endpoint\x18\xe9\xbc\xd6\xb3\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"j\n\x1c\x44\x65leteRegionOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"\x1f\n\x1d\x44\x65leteRegionOperationResponse\"\xb3\x01\n!DeleteRegionSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb3\x01\n!DeleteRegionSslCertificateRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fssl_certificate\x18\xe4\xd7\x92\x16 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xaa\x01\n\x1c\x44\x65leteRegionSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb6\x01\n\"DeleteRegionTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb8\x01\n#DeleteRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb5\x01\n!DeleteRegionTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa4\x01\n\x19\x44\x65leteRegionUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa2\x01\n\x18\x44\x65leteReservationRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xad\x01\n\x1b\x44\x65leteResourcePolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fresource_policy\x18\x83\xa5\xf7K \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xca\x01\n\x1e\x44\x65leteRoutePolicyRouterRequest\x12\x16\n\x06policy\x18\xb2\xca\xb6+ \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_policyB\r\n\x0b_request_id\"y\n\x12\x44\x65leteRouteRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05route\x18\xc9\xe4\xea\x33 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x9c\x01\n\x13\x44\x65leteRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8c\x01\n\x1b\x44\x65leteSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb4\x01\n\x1e\x44\x65leteServiceAttachmentRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12#\n\x12service_attachment\x18\xed\xa9\xd0\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb1\x01\n&DeleteSignedUrlKeyBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08key_name\x18\xeb\xf0\xee\xee\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb4\x01\n\'DeleteSignedUrlKeyBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08key_name\x18\xeb\xf0\xee\xee\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x80\x01\n\x15\x44\x65leteSnapshotRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x08snapshot\x18\xc4\xab\xeb\x87\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8c\x01\n\x1b\x44\x65leteSslCertificateRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fssl_certificate\x18\xe4\xd7\x92\x16 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x83\x01\n\x16\x44\x65leteSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa4\x01\n\x18\x44\x65leteStoragePoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa5\x01\n\x17\x44\x65leteSubnetworkRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8f\x01\n\x1c\x44\x65leteTargetGrpcProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_grpc_proxy\x18\xfb\xb4\xb2\x02 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8f\x01\n\x1c\x44\x65leteTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x91\x01\n\x1d\x44\x65leteTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xaa\x01\n\x1b\x44\x65leteTargetInstanceRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12 \n\x0ftarget_instance\x18\x83\x8f\x96\x8a\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa5\x01\n\x17\x44\x65leteTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8e\x01\n\x1b\x44\x65leteTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8e\x01\n\x1b\x44\x65leteTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb3\x01\n\x1d\x44\x65leteTargetVpnGatewayRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12#\n\x12target_vpn_gateway\x18\xcb\x80\xf6\xfd\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"}\n\x13\x44\x65leteUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa6\x01\n\x17\x44\x65leteVpnGatewayRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bvpn_gateway\x18\xf9\x83\xf6\xc1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa3\x01\n\x16\x44\x65leteVpnTunnelRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\nvpn_tunnel\x18\x93\x94\xca\x44 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"f\n\x1a\x44\x65leteZoneOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\x1d\n\x1b\x44\x65leteZoneOperationResponse\"J\n\x06\x44\x65nied\x12\x1d\n\x0cI_p_protocol\x18\xbd\xf6\xde\xe8\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05ports\x18\x92\xf0\xf9\x32 \x03(\tB\x0f\n\r_I_p_protocol\"\xd6\x01\n\x15\x44\x65precateImageRequest\x12X\n\x1b\x64\x65precation_status_resource\x18\xf0\x89\xe5\x9e\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusB\x03\xe0\x41\x02\x12\x15\n\x05image\x18\xdb\xd2\xea/ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbf\x02\n\x11\x44\x65precationStatus\x12\x18\n\x07\x64\x65leted\x18\x99\xe0\xa8\xe3\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x08obsolete\x18\x99\x8b\xc5\xaa\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0breplacement\x18\x92\x9c\xbd\xcd\x01 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x04\x88\x01\x01\"a\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x07\x44\x45LETED\x10\xf9\xf7\xd6\x39\x12\x12\n\nDEPRECATED\x10\xb3\xa3\xf9\xdc\x01\x12\x0f\n\x08OBSOLETE\x10\x99\xeb\xdc\x1f\x42\n\n\x08_deletedB\r\n\x0b_deprecatedB\x0b\n\t_obsoleteB\x0e\n\x0c_replacementB\x08\n\x06_state\"\xbd\x01\n\x19\x44\x65tachDiskInstanceRequest\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcf\x02\n7DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest\x12\x9c\x01\n@global_network_endpoint_groups_detach_endpoints_request_resource\x18\xdd\x8d\x9f\x04 \x01(\x0b\x32J.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequestB\x03\xe0\x41\x02\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xda\x02\n1DetachNetworkEndpointsNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x90\x01\n9network_endpoint_groups_detach_endpoints_request_resource\x18\xf9\xa0\xee\xf5\x01 \x01(\x0b\x32\x44.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf1\x02\n7DetachNetworkEndpointsRegionNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_network_endpoint_groups_detach_endpoints_request_resource\x18\xee\xe5\xab\x95\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionNetworkEndpointGroupsDetachEndpointsRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"l\n\x1c\x44isableXpnHostProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xec\x01\n DisableXpnResourceProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12z\n.projects_disable_xpn_resource_request_resource\x18\xaa\xd4\xdc\x63 \x01(\x0b\x32:.google.cloud.compute.v1.ProjectsDisableXpnResourceRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xcf\x1a\n\x04\x44isk\x12\x1b\n\x0b\x61\x63\x63\x65ss_mode\x18\x9e\xf7\xcf\x13 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x01\x88\x01\x01\x12Q\n\x12\x61sync_primary_disk\x18\x9d\xf5\x89V \x01(\x0b\x32-.google.cloud.compute.v1.DiskAsyncReplicationH\x02\x88\x01\x01\x12Y\n\x15\x61sync_secondary_disks\x18\xa8\xe8\xfd\x99\x01 \x03(\x0b\x32\x36.google.cloud.compute.v1.Disk.AsyncSecondaryDisksEntry\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x05\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x06\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\t\x88\x01\x01\x12=\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32).google.cloud.compute.v1.Disk.LabelsEntry\x12%\n\x15last_attach_timestamp\x18\xa5\x9c\x8d\x14 \x01(\tH\n\x88\x01\x01\x12%\n\x15last_detach_timestamp\x18\xf3\xdb\xf6\x1a \x01(\tH\x0b\x88\x01\x01\x12\x18\n\rlicense_codes\x18\xa8\x85\xd8\x15 \x03(\x03\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x1e\n\rlocation_hint\x18\xd1\x81\x92\xa7\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\r\x88\x01\x01\x12\x18\n\x07options\x18\x9e\x8d\x9a\xac\x01 \x01(\tH\x0e\x88\x01\x01\x12;\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32#.google.cloud.compute.v1.DiskParamsH\x0f\x88\x01\x01\x12*\n\x19physical_block_size_bytes\x18\x87\xa0\xa3\xc8\x01 \x01(\x03H\x10\x88\x01\x01\x12 \n\x10provisioned_iops\x18\xd4\xbd\x87Y \x01(\x03H\x11\x88\x01\x01\x12\'\n\x16provisioned_throughput\x18\x95\xbe\x88\xfb\x01 \x01(\x03H\x12\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x13\x88\x01\x01\x12\x18\n\rreplica_zones\x18\x80\xb8\x8c\x17 \x03(\t\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12L\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32+.google.cloud.compute.v1.DiskResourceStatusH\x14\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x15\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x16\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x17\x88\x01\x01\x12\x18\n\x07size_gb\x18\xd9\x8b\x80\xec\x01 \x01(\x03H\x18\x88\x01\x01\x12/\n\x1fsource_consistency_group_policy\x18\xdd\xa2\xad\t \x01(\tH\x19\x88\x01\x01\x12\x32\n\"source_consistency_group_policy_id\x18\xbd\x8e\xcb\x7f \x01(\tH\x1a\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x1b\x88\x01\x01\x12\x1f\n\x0esource_disk_id\x18\xd9\xcd\xc9\xd8\x01 \x01(\tH\x1c\x88\x01\x01\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\x1d\x88\x01\x01\x12\\\n\x1bsource_image_encryption_key\x18\xab\x91\xf5\xb5\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x1e\x88\x01\x01\x12\x1f\n\x0fsource_image_id\x18\xa3\xfc\xb0\x1a \x01(\tH\x1f\x88\x01\x01\x12\'\n\x17source_instant_snapshot\x18\x86\x84\xc3h \x01(\tH \x88\x01\x01\x12+\n\x1asource_instant_snapshot_id\x18\xf4\xd3\x90\x89\x01 \x01(\tH!\x88\x01\x01\x12\x1f\n\x0fsource_snapshot\x18\xe8\x9a\x8e< \x01(\tH\"\x88\x01\x01\x12_\n\x1esource_snapshot_encryption_key\x18\xda\x8e\xe7\x90\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH#\x88\x01\x01\x12\"\n\x12source_snapshot_id\x18\xd2\x96\x98/ \x01(\tH$\x88\x01\x01\x12%\n\x15source_storage_object\x18\xa7\xb4\x90o \x01(\tH%\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH&\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tH\'\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH(\x88\x01\x01\x12\x10\n\x05users\x18\x88\x9c\x9a\x35 \x03(\t\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH)\x88\x01\x01\x1am\n\x18\x41syncSecondaryDisksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.compute.v1.DiskAsyncReplicationList:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"q\n\nAccessMode\x12\x19\n\x15UNDEFINED_ACCESS_MODE\x10\x00\x12\x15\n\x0eREAD_ONLY_MANY\x10\xa9\xa7\xa1\x1e\x12\x17\n\x0fREAD_WRITE_MANY\x10\xa8\xc2\x86\xe9\x01\x12\x18\n\x11READ_WRITE_SINGLE\x10\xd1\x99\xae/\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"\x88\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x11\n\tRESTORING\x10\xab\xa7\xe2\xc0\x01\x12\x13\n\x0bUNAVAILABLE\x10\xb0\xd8\xa5\xc5\x01\x42\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x15\n\x13_async_primary_diskB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x16\n\x14_disk_encryption_keyB\x1e\n\x1c_enable_confidential_computeB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x18\n\x16_last_attach_timestampB\x18\n\x16_last_detach_timestampB\x10\n\x0e_location_hintB\x07\n\x05_nameB\n\n\x08_optionsB\t\n\x07_paramsB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\t\n\x07_regionB\x12\n\x10_resource_statusB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\n\n\x08_size_gbB\"\n _source_consistency_group_policyB%\n#_source_consistency_group_policy_idB\x0e\n\x0c_source_diskB\x11\n\x0f_source_disk_idB\x0f\n\r_source_imageB\x1e\n\x1c_source_image_encryption_keyB\x12\n\x10_source_image_idB\x1a\n\x18_source_instant_snapshotB\x1d\n\x1b_source_instant_snapshot_idB\x12\n\x10_source_snapshotB!\n\x1f_source_snapshot_encryption_keyB\x15\n\x13_source_snapshot_idB\x18\n\x16_source_storage_objectB\t\n\x07_statusB\x0f\n\r_storage_poolB\x07\n\x05_typeB\x07\n\x05_zone\"\xad\x03\n\x12\x44iskAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12H\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x36.google.cloud.compute.v1.DiskAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aV\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.google.cloud.compute.v1.DisksScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xed\x01\n\x14\x44iskAsyncReplication\x12\'\n\x18\x63onsistency_group_policy\x18\xb9\xc3y \x01(\tH\x00\x88\x01\x01\x12+\n\x1b\x63onsistency_group_policy_id\x18\xe1\x92\xbe| \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tH\x02\x88\x01\x01\x12\x17\n\x07\x64isk_id\x18\xfd\xc5\x8a\x1d \x01(\tH\x03\x88\x01\x01\x42\x1b\n\x19_consistency_group_policyB\x1e\n\x1c_consistency_group_policy_idB\x07\n\x05_diskB\n\n\x08_disk_id\"\x8c\x01\n\x18\x44iskAsyncReplicationList\x12U\n\x16\x61sync_replication_disk\x18\x93\xcb\xc3n \x01(\x0b\x32-.google.cloud.compute.v1.DiskAsyncReplicationH\x00\x88\x01\x01\x42\x19\n\x17_async_replication_disk\"\xa4\x03\n\x17\x44iskInstantiationConfig\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0c\x63ustom_image\x18\x8d\xfe\xe5W \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tH\x02\x88\x01\x01\x12!\n\x10instantiate_from\x18\xdf\x9f\xca\xbb\x01 \x01(\tH\x03\x88\x01\x01\"\xc6\x01\n\x0fInstantiateFrom\x12\x1e\n\x1aUNDEFINED_INSTANTIATE_FROM\x10\x00\x12\x18\n\x10\x41TTACH_READ_ONLY\x10\xbb\xae\xfe\xf4\x01\x12\x0c\n\x05\x42LANK\x10\xb4\xb2\x96\x1e\x12\x13\n\x0c\x43USTOM_IMAGE\x10\xed\xf5\xcd]\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\x12\x15\n\x0e\x44O_NOT_INCLUDE\x10\xc8\x82\xd9\x31\x12\x13\n\x0cSOURCE_IMAGE\x10\x97\xe0\xee\x1d\x12\x1a\n\x13SOURCE_IMAGE_FAMILY\x10\x8c\xc9\xd2$B\x0e\n\x0c_auto_deleteB\x0f\n\r_custom_imageB\x0e\n\x0c_device_nameB\x13\n\x11_instantiate_from\"\x99\x02\n\x08\x44iskList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12/\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1d.google.cloud.compute.v1.Disk\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"u\n\x0f\x44iskMoveRequest\x12 \n\x10\x64\x65stination_zone\x18\xbd\xe2\xef> \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_disk\x18\x8b\xcf\xe2\x1d \x01(\tH\x01\x88\x01\x01\x42\x13\n\x11_destination_zoneB\x0e\n\x0c_target_disk\"\xa9\x01\n\nDiskParams\x12_\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32<.google.cloud.compute.v1.DiskParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfa\x02\n\x12\x44iskResourceStatus\x12\x65\n\x12\x61sync_primary_disk\x18\x9d\xf5\x89V \x01(\x0b\x32\x41.google.cloud.compute.v1.DiskResourceStatusAsyncReplicationStatusH\x00\x88\x01\x01\x12g\n\x15\x61sync_secondary_disks\x18\xa8\xe8\xfd\x99\x01 \x03(\x0b\x32\x44.google.cloud.compute.v1.DiskResourceStatus.AsyncSecondaryDisksEntry\x1a}\n\x18\x41syncSecondaryDisksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12P\n\x05value\x18\x02 \x01(\x0b\x32\x41.google.cloud.compute.v1.DiskResourceStatusAsyncReplicationStatus:\x02\x38\x01\x42\x15\n\x13_async_primary_disk\"\xda\x01\n(DiskResourceStatusAsyncReplicationStatus\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x00\x88\x01\x01\"\x8c\x01\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x07\x43REATED\x10\xc8\x95\xe8@\x12\x10\n\x08STARTING\x10\xc0\xa0\x8b\xe9\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x42\x08\n\x06_state\"\x84\x04\n\x08\x44iskType\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12%\n\x14\x64\x65\x66\x61ult_disk_size_gb\x18\xf5\xa4\x85\x81\x01 \x01(\x03H\x01\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12 \n\x0fvalid_disk_size\x18\xe0\x89\xc5\xeb\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\n\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x17\n\x15_default_disk_size_gbB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x0c\n\n_self_linkB\x12\n\x10_valid_disk_sizeB\x07\n\x05_zone\"\xb9\x03\n\x16\x44iskTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12L\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32:.google.cloud.compute.v1.DiskTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aZ\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.compute.v1.DiskTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa1\x02\n\x0c\x44iskTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.DiskType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x96\x01\n\x13\x44iskTypesScopedList\x12\x38\n\ndisk_types\x18\xd7\xbe\xed^ \x03(\x0b\x32!.google.cloud.compute.v1.DiskType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"?\n\x1f\x44isksAddResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"B\n\"DisksRemoveResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\":\n\x12\x44isksResizeRequest\x12\x18\n\x07size_gb\x18\xd9\x8b\x80\xec\x01 \x01(\x03H\x00\x88\x01\x01\x42\n\n\x08_size_gb\"\x89\x01\n\x0f\x44isksScopedList\x12/\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32\x1d.google.cloud.compute.v1.Disk\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"b\n!DisksStartAsyncReplicationRequest\x12$\n\x14\x61sync_secondary_disk\x18\xab\x83\xe3> \x01(\tH\x00\x88\x01\x01\x42\x17\n\x15_async_secondary_disk\"]\n&DisksStopGroupAsyncReplicationResource\x12\x1f\n\x0fresource_policy\x18\x83\xa5\xf7K \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_resource_policy\"B\n\rDisplayDevice\x12\x1e\n\x0e\x65nable_display\x18\x86\xe4\xe6\x06 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x81\x02\n\x12\x44istributionPolicy\x12\x1d\n\x0ctarget_shape\x18\xf3\xe6\xbb\xa1\x01 \x01(\tH\x00\x88\x01\x01\x12N\n\x05zones\x18\xc7\xa4\xad\x37 \x03(\x0b\x32<.google.cloud.compute.v1.DistributionPolicyZoneConfiguration\"k\n\x0bTargetShape\x12\x1a\n\x16UNDEFINED_TARGET_SHAPE\x10\x00\x12\t\n\x03\x41NY\x10\xcc\xfb\x03\x12\x16\n\x0f\x41NY_SINGLE_ZONE\x10\xd0\xa6\x91\x1d\x12\x10\n\x08\x42\x41LANCED\x10\x88\xba\xad\xdf\x01\x12\x0b\n\x04\x45VEN\x10\x9a\xd2\x82\x01\x42\x0f\n\r_target_shape\"D\n#DistributionPolicyZoneConfiguration\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_zone\"Q\n\x08\x44uration\x12\x15\n\x05nanos\x18\xbf\xb8\xef\x31 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x07seconds\x18\xff\x94\xb5\xab\x01 \x01(\x03H\x01\x88\x01\x01\x42\x08\n\x06_nanosB\n\n\x08_seconds\"k\n\x1b\x45nableXpnHostProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xea\x01\n\x1f\x45nableXpnResourceProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12y\n-projects_enable_xpn_resource_request_resource\x18\xaf\xd0\x9b\xc9\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.ProjectsEnableXpnResourceRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"<\n\x05\x45rror\x12\x33\n\x06\x65rrors\x18\xeb\xde\xd5\x96\x01 \x03(\x0b\x32\x1f.google.cloud.compute.v1.Errors\"\xd7\x02\n\x0c\x45rrorDetails\x12>\n\nerror_info\x18\x85\xa1\x85\x0c \x01(\x0b\x32\".google.cloud.compute.v1.ErrorInfoH\x00\x88\x01\x01\x12\x33\n\x04help\x18\xc1\x9e\xc3\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.HelpH\x01\x88\x01\x01\x12M\n\x11localized_message\x18\xc3\xfe\xf2\xc0\x01 \x01(\x0b\x32).google.cloud.compute.v1.LocalizedMessageH\x02\x88\x01\x01\x12\x46\n\nquota_info\x18\x95\xd4\xe4, \x01(\x0b\x32*.google.cloud.compute.v1.QuotaExceededInfoH\x03\x88\x01\x01\x42\r\n\x0b_error_infoB\x07\n\x05_helpB\x14\n\x12_localized_messageB\r\n\x0b_quota_info\"\xcd\x01\n\tErrorInfo\x12\x17\n\x06\x64omain\x18\xc4\xa9\xcf\x87\x01 \x01(\tH\x00\x88\x01\x01\x12G\n\tmetadatas\x18\xa4\xd6\x87\x04 \x03(\x0b\x32\x31.google.cloud.compute.v1.ErrorInfo.MetadatasEntry\x12\x16\n\x06reason\x18\xc4\xa4\x96\x42 \x01(\tH\x01\x88\x01\x01\x1a\x30\n\x0eMetadatasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_domainB\t\n\x07_reason\"\xb7\x01\n\x06\x45rrors\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\rerror_details\x18\x8b\xc6\xfb\x82\x01 \x03(\x0b\x32%.google.cloud.compute.v1.ErrorDetails\x12\x19\n\x08location\x18\xb5\xbf\xbe\x8a\x01 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_codeB\x0b\n\t_locationB\n\n\x08_message\"\xdd\x02\n\x15\x45xchangedPeeringRoute\x12\x1b\n\ndest_range\x18\xe0\xb2\xea\xb5\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08imported\x18\x84\xd6\xcc\x36 \x01(\x08H\x01\x88\x01\x01\x12\x1f\n\x0fnext_hop_region\x18\xf6\xc0\xb9: \x01(\tH\x02\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\rH\x03\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x04\x88\x01\x01\"u\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x1d\n\x15\x44YNAMIC_PEERING_ROUTE\x10\xaa\x80\x82\xe0\x01\x12\x1c\n\x14STATIC_PEERING_ROUTE\x10\xb9\xc0\xde\xe1\x01\x12\x1c\n\x14SUBNET_PEERING_ROUTE\x10\xe8\x8d\x8d\xde\x01\x42\r\n\x0b_dest_rangeB\x0b\n\t_importedB\x12\n\x10_next_hop_regionB\x0b\n\t_priorityB\x07\n\x05_type\"\xbc\x02\n\x1a\x45xchangedPeeringRoutesList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12@\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32..google.cloud.compute.v1.ExchangedPeeringRoute\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb3\x02\n\"ExpandIpCidrRangeSubnetworkRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x80\x01\n1subnetworks_expand_ip_cidr_range_request_resource\x18\xde\xd0\xba\xe3\x01 \x01(\x0b\x32<.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa9\x01\n\x04\x45xpr\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nexpression\x18\x98\xa5\xee\xa7\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x08location\x18\xb5\xbf\xbe\x8a\x01 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x05title\x18\xd8\xc4\xd0\x34 \x01(\tH\x03\x88\x01\x01\x42\x0e\n\x0c_descriptionB\r\n\x0b_expressionB\x0b\n\t_locationB\x08\n\x06_title\"\xc8\x05\n\x12\x45xternalVpnGateway\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12K\n\ninterfaces\x18\xda\xf4\xe0\x05 \x03(\x0b\x32\x34.google.cloud.compute.v1.ExternalVpnGatewayInterface\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x04\x88\x01\x01\x12K\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x37.google.cloud.compute.v1.ExternalVpnGateway.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12 \n\x0fredundancy_type\x18\x9c\xce\xb7\x81\x01 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8f\x01\n\x0eRedundancyType\x12\x1d\n\x19UNDEFINED_REDUNDANCY_TYPE\x10\x00\x12\x1b\n\x13\x46OUR_IPS_REDUNDANCY\x10\xe9\xd2\xff\xf7\x01\x12%\n\x1eSINGLE_IP_INTERNALLY_REDUNDANT\x10\xf9\xc1\xed?\x12\x1a\n\x12TWO_IPS_REDUNDANCY\x10\xa3\xf7\x82\xaf\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\x12\n\x10_redundancy_typeB\x0c\n\n_self_link\"\x92\x01\n\x1b\x45xternalVpnGatewayInterface\x12\x10\n\x02id\x18\x9b\x1a \x01(\rH\x00\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x02\x88\x01\x01\x42\x05\n\x03_idB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_address\"\xd4\x02\n\x16\x45xternalVpnGatewayList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12=\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32+.google.cloud.compute.v1.ExternalVpnGateway\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb2\x01\n\x11\x46ileContentBuffer\x12\x18\n\x07\x63ontent\x18\xf9\xe8\xdc\xc5\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tfile_type\x18\x9d\xc0\xad\x8c\x01 \x01(\tH\x01\x88\x01\x01\"M\n\x08\x46ileType\x12\x17\n\x13UNDEFINED_FILE_TYPE\x10\x00\x12\t\n\x03\x42IN\x10\xe7\x81\x04\x12\x10\n\tUNDEFINED\x10\xb0\xe2\xdd\x41\x12\x0b\n\x04X509\x10\xa6\x9b\xa3\x01\x42\n\n\x08_contentB\x0c\n\n_file_type\"\xd0\x06\n\x08\x46irewall\x12\x34\n\x07\x61llowed\x18\xa8\x83\xb8M \x03(\x0b\x32 .google.cloud.compute.v1.Allowed\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x33\n\x06\x64\x65nied\x18\x9b\xf7\x9d\x83\x01 \x03(\x0b\x32\x1f.google.cloud.compute.v1.Denied\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x12\x64\x65stination_ranges\x18\xa7\xb8\xe2\x91\x01 \x03(\t\x12\x19\n\tdirection\x18\xff\x8e\x80\x35 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x08\x64isabled\x18\xfc\xf4\x98\x81\x01 \x01(\x08H\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12G\n\nlog_config\x18\x9d\xd1\xc1\xa7\x01 \x01(\x0b\x32*.google.cloud.compute.v1.FirewallLogConfigH\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x08\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\t\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12\x18\n\rsource_ranges\x18\xfa\xfe\xb4_ \x03(\t\x12\"\n\x17source_service_accounts\x18\xd4\xeb\x8e\x32 \x03(\t\x12\x17\n\x0bsource_tags\x18\xbd\xbb\xd1\xd7\x01 \x03(\t\x12#\n\x17target_service_accounts\x18\x9e\x8e\x9c\xda\x01 \x03(\t\x12\x16\n\x0btarget_tags\x18\x87\x9c\xff\x1d \x03(\t\"E\n\tDirection\x12\x17\n\x13UNDEFINED_DIRECTION\x10\x00\x12\x0e\n\x06\x45GRESS\x10\xf5\xf6\xb4\xce\x01\x12\x0f\n\x07INGRESS\x10\x95\xfd\xbe\xf6\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0c\n\n_directionB\x0b\n\t_disabledB\x05\n\x03_idB\x07\n\x05_kindB\r\n\x0b_log_configB\x07\n\x05_nameB\n\n\x08_networkB\x0b\n\t_priorityB\x0c\n\n_self_link\"\xa1\x02\n\x0c\x46irewallList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.Firewall\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbd\x01\n\x11\x46irewallLogConfig\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08metadata\x18\xaf\xf6\xb5) \x01(\tH\x01\x88\x01\x01\"]\n\x08Metadata\x12\x16\n\x12UNDEFINED_METADATA\x10\x00\x12\x1c\n\x14\x45XCLUDE_ALL_METADATA\x10\x92\xbd\xc1\x9f\x01\x12\x1b\n\x14INCLUDE_ALL_METADATA\x10\x84\xcd\xbfNB\t\n\x07_enableB\x0b\n\t_metadata\"\x97\x01\n(FirewallPoliciesListAssociationsResponse\x12L\n\x0c\x61ssociations\x18\x92\xe8\xca\xf2\x01 \x03(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_kind\"\xab\x01\n\x1a\x46irewallPoliciesScopedList\x12\x46\n\x11\x66irewall_policies\x18\xaf\x8b\x95\xbb\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x97\x06\n\x0e\x46irewallPolicy\x12L\n\x0c\x61ssociations\x18\x92\xe8\xca\xf2\x01 \x03(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociation\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0c\x64isplay_name\x18\xe8\x87\x91\x02 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12O\n\x16packet_mirroring_rules\x18\xc4\xff\xc0\xfd\x01 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x16\n\x06parent\x18\xaa\x91\xac% \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12!\n\x10rule_tuple_count\x18\x95\xc2\x96\xb9\x01 \x01(\x05H\t\x88\x01\x01\x12=\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x0b\x88\x01\x01\x12\x1b\n\nshort_name\x18\xee\xb8\xd0\xea\x01 \x01(\tH\x0c\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0f\n\r_display_nameB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_parentB\t\n\x07_regionB\x13\n\x11_rule_tuple_countB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\r\n\x0b_short_name\"\x8a\x02\n\x19\x46irewallPolicyAssociation\x12!\n\x11\x61ttachment_target\x18\xad\xb0\xe8S \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0c\x64isplay_name\x18\xe8\x87\x91\x02 \x01(\tH\x01\x88\x01\x01\x12#\n\x12\x66irewall_policy_id\x18\xc9\xbd\xaa\xaa\x01 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nshort_name\x18\xee\xb8\xd0\xea\x01 \x01(\tH\x04\x88\x01\x01\x42\x14\n\x12_attachment_targetB\x0f\n\r_display_nameB\x15\n\x13_firewall_policy_idB\x07\n\x05_nameB\r\n\x0b_short_name\"\x83\x02\n\x12\x46irewallPolicyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x03\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\n\n\x08_warning\"\xb7\x06\n\x12\x46irewallPolicyRule\x12\x16\n\x06\x61\x63tion\x18\xb6\xfc\xbdY \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\tdirection\x18\xff\x8e\x80\x35 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x08\x64isabled\x18\xfc\xf4\x98\x81\x01 \x01(\x08H\x03\x88\x01\x01\x12\x1f\n\x0e\x65nable_logging\x18\xa3\xc9\xed\x8c\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12I\n\x05match\x18\xc5\xb3\xb7\x31 \x01(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyRuleMatcherH\x06\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x07\x88\x01\x01\x12\x19\n\trule_name\x18\xee\xb3\xae\x1a \x01(\tH\x08\x88\x01\x01\x12!\n\x10rule_tuple_count\x18\x95\xc2\x96\xb9\x01 \x01(\x05H\t\x88\x01\x01\x12&\n\x16security_profile_group\x18\xaa\xb3\xf3\x62 \x01(\tH\n\x88\x01\x01\x12\x1c\n\x10target_resources\x18\xf7\xd1\xf0\xfb\x01 \x03(\t\x12T\n\x12target_secure_tags\x18\xb3\xc4\x9c\xdf\x01 \x03(\x0b\x32\x34.google.cloud.compute.v1.FirewallPolicyRuleSecureTag\x12#\n\x17target_service_accounts\x18\x9e\x8e\x9c\xda\x01 \x03(\t\x12\x1b\n\x0btls_inspect\x18\xd0\xbd\xda\x14 \x01(\x08H\x0b\x88\x01\x01\"E\n\tDirection\x12\x17\n\x13UNDEFINED_DIRECTION\x10\x00\x12\x0e\n\x06\x45GRESS\x10\xf5\xf6\xb4\xce\x01\x12\x0f\n\x07INGRESS\x10\x95\xfd\xbe\xf6\x01\x42\t\n\x07_actionB\x0e\n\x0c_descriptionB\x0c\n\n_directionB\x0b\n\t_disabledB\x11\n\x0f_enable_loggingB\x07\n\x05_kindB\x08\n\x06_matchB\x0b\n\t_priorityB\x0c\n\n_rule_nameB\x13\n\x11_rule_tuple_countB\x19\n\x17_security_profile_groupB\x0e\n\x0c_tls_inspect\"\xf8\x03\n\x19\x46irewallPolicyRuleMatcher\x12\x1f\n\x13\x64\x65st_address_groups\x18\xbc\xef\xc2\xdf\x01 \x03(\t\x12\x16\n\ndest_fqdns\x18\xa1\xc1\xe2\xb0\x01 \x03(\t\x12\x1a\n\x0e\x64\x65st_ip_ranges\x18\x91\xd7\xee\xa0\x01 \x03(\t\x12\x1c\n\x11\x64\x65st_region_codes\x18\x98\xab\xf9^ \x03(\t\x12$\n\x19\x64\x65st_threat_intelligences\x18\xac\xf3\x95\x39 \x03(\t\x12Z\n\x0elayer4_configs\x18\xb5\xdc\x8e\xb2\x01 \x03(\x0b\x32>.google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config\x12\x1e\n\x12src_address_groups\x18\xba\x98\x8d\xd0\x01 \x03(\t\x12\x15\n\tsrc_fqdns\x18\xe3\xcc\xed\xcf\x01 \x03(\t\x12\x19\n\rsrc_ip_ranges\x18\xd3\x80\x87\xce\x01 \x03(\t\x12\x1b\n\x10src_region_codes\x18\x96\xe3\x9f/ \x03(\t\x12Q\n\x0fsrc_secure_tags\x18\x86\x94\xce\xf2\x01 \x03(\x0b\x32\x34.google.cloud.compute.v1.FirewallPolicyRuleSecureTag\x12$\n\x18src_threat_intelligences\x18\xaa\xef\xa8\x9a\x01 \x03(\t\"g\n%FirewallPolicyRuleMatcherLayer4Config\x12\x1c\n\x0bip_protocol\x18\xb0\x9d\xfa\xe2\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05ports\x18\x92\xf0\xf9\x32 \x03(\tB\x0e\n\x0c_ip_protocol\"\xa2\x01\n\x1b\x46irewallPolicyRuleSecureTag\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x01\x88\x01\x01\"C\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\tEFFECTIVE\x10\x87\xf3\xb8t\x12\x13\n\x0bINEFFECTIVE\x10\x82\xd4\x96\x91\x01\x42\x07\n\x05_nameB\x08\n\x06_state\"\x83\x01\n\x0e\x46ixedOrPercent\x12\x1b\n\ncalculated\x18\xbe\xd3\x8d\xe1\x01 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x05\x66ixed\x18\xf4\xce\xbb. \x01(\x05H\x01\x88\x01\x01\x12\x18\n\x07percent\x18\xc5\xc8\xa1\xbc\x01 \x01(\x05H\x02\x88\x01\x01\x42\r\n\x0b_calculatedB\x08\n\x06_fixedB\n\n\x08_percent\"\x9e\x14\n\x0e\x46orwardingRule\x12\x1b\n\x0bI_p_address\x18\xaf\x8d\xbf\x14 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0cI_p_protocol\x18\xbd\xf6\xde\xe8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\tall_ports\x18\xf4\xaf\xa3\xd4\x01 \x01(\x08H\x02\x88\x01\x01\x12$\n\x13\x61llow_global_access\x18\x8a\xc6\x91\xee\x01 \x01(\x08H\x03\x88\x01\x01\x12\'\n\x17\x61llow_psc_global_access\x18\xcb\x85\xd1} \x01(\x08H\x04\x88\x01\x01\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tH\x05\x88\x01\x01\x12%\n\x14\x62\x61se_forwarding_rule\x18\x90\xdb\xa3\xfa\x01 \x01(\tH\x06\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x07\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x08\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\t\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\n\x88\x01\x01\x12\x1d\n\rip_collection\x18\xb6\x91\xa8T \x01(\tH\x0b\x88\x01\x01\x12\x1b\n\nip_version\x18\xc0\xf3\xd2\x8c\x01 \x01(\tH\x0c\x88\x01\x01\x12&\n\x16is_mirroring_collector\x18\xfc\xe0\xee\x38 \x01(\x08H\r\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x0e\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x0f\x88\x01\x01\x12G\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x33.google.cloud.compute.v1.ForwardingRule.LabelsEntry\x12&\n\x15load_balancing_scheme\x18\xc4\x8c\xc2\xad\x01 \x01(\tH\x10\x88\x01\x01\x12\x45\n\x10metadata_filters\x18\xeb\xcd\xcc\xdd\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.MetadataFilter\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x11\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x12\x88\x01\x01\x12\x1d\n\x0cnetwork_tier\x18\xd3\xba\xdb\xf6\x01 \x01(\tH\x13\x88\x01\x01\x12$\n\x14no_automate_dns_zone\x18\xaf\xd1\xe3\x1e \x01(\x08H\x14\x88\x01\x01\x12\x1a\n\nport_range\x18\xff\x9f\xdcg \x01(\tH\x15\x88\x01\x01\x12\x10\n\x05ports\x18\x92\xf0\xf9\x32 \x03(\t\x12\"\n\x11psc_connection_id\x18\xdd\xa5\xa3\x8b\x01 \x01(\x04H\x16\x88\x01\x01\x12%\n\x15psc_connection_status\x18\xb4\xc9\xe7W \x01(\tH\x17\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x18\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x19\x88\x01\x01\x12o\n\x1fservice_directory_registrations\x18\xfe\xb1\xccj \x03(\x0b\x32\x43.google.cloud.compute.v1.ForwardingRuleServiceDirectoryRegistration\x12\x1e\n\rservice_label\x18\xea\x99\xec\xc6\x01 \x01(\tH\x1a\x88\x01\x01\x12\x1d\n\x0cservice_name\x18\xd5\xab\xcd\xab\x01 \x01(\tH\x1b\x88\x01\x01\x12\x1b\n\x10source_ip_ranges\x18\xca\xa3\x99\x35 \x03(\t\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x1c\x88\x01\x01\x12\x16\n\x06target\x18\x91\xe3\xf9[ \x01(\tH\x1d\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x88\x01\n\x0eIPProtocolEnum\x12\x1f\n\x1bUNDEFINED_I_P_PROTOCOL_ENUM\x10\x00\x12\x07\n\x02\x41H\x10\xa7\x10\x12\t\n\x03\x45SP\x10\xe2\x9a\x04\x12\x0b\n\x04ICMP\x10\xbd\xe8\x88\x01\x12\x11\n\nL3_DEFAULT\x10\xc9\xf6\xfa\x16\x12\x0b\n\x04SCTP\x10\xcc\x81\x9b\x01\x12\t\n\x03TCP\x10\xc1\x87\x05\x12\t\n\x03UDP\x10\xa1\x8f\x05\"[\n\tIpVersion\x12\x18\n\x14UNDEFINED_IP_VERSION\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\x12\x1a\n\x13UNSPECIFIED_VERSION\x10\x90\xcf\xb5\n\"\xbf\x01\n\x13LoadBalancingScheme\x12#\n\x1fUNDEFINED_LOAD_BALANCING_SCHEME\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x18\n\x10\x45XTERNAL_MANAGED\x10\x8b\xb6\x92\xf4\x01\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12\x17\n\x10INTERNAL_MANAGED\x10\xfd\xd7\xe7\x11\x12\x1c\n\x15INTERNAL_SELF_MANAGED\x10\xce\x97\xd1p\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\"\x8f\x01\n\x0bNetworkTier\x12\x1a\n\x16UNDEFINED_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"\xb0\x01\n\x13PscConnectionStatus\x12#\n\x1fUNDEFINED_PSC_CONNECTION_STATUS\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x12\x17\n\x0fNEEDS_ATTENTION\x10\xbc\x8b\xa2\xa4\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\x0e\n\x0c_I_p_addressB\x0f\n\r_I_p_protocolB\x0c\n\n_all_portsB\x16\n\x14_allow_global_accessB\x1a\n\x18_allow_psc_global_accessB\x12\n\x10_backend_serviceB\x17\n\x15_base_forwarding_ruleB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x10\n\x0e_ip_collectionB\r\n\x0b_ip_versionB\x19\n\x17_is_mirroring_collectorB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x18\n\x16_load_balancing_schemeB\x07\n\x05_nameB\n\n\x08_networkB\x0f\n\r_network_tierB\x17\n\x15_no_automate_dns_zoneB\r\n\x0b_port_rangeB\x14\n\x12_psc_connection_idB\x18\n\x16_psc_connection_statusB\t\n\x07_regionB\x0c\n\n_self_linkB\x10\n\x0e_service_labelB\x0f\n\r_service_nameB\r\n\x0b_subnetworkB\t\n\x07_target\"\xcb\x03\n\x1c\x46orwardingRuleAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.ForwardingRuleAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a`\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.ForwardingRulesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x02\n\x12\x46orwardingRuleList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.ForwardingRule\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"O\n\x17\x46orwardingRuleReference\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_forwarding_rule\"\xc2\x01\n*ForwardingRuleServiceDirectoryRegistration\x12\x19\n\tnamespace\x18\xdb\xaa\x8dU \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x01\x88\x01\x01\x12(\n\x18service_directory_region\x18\xd0\xba\xa6# \x01(\tH\x02\x88\x01\x01\x42\x0c\n\n_namespaceB\n\n\x08_serviceB\x1b\n\x19_service_directory_region\"\xa9\x01\n\x19\x46orwardingRulesScopedList\x12\x45\n\x10\x66orwarding_rules\x18\xb5\x9a\xcc\x96\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.ForwardingRule\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xcd\x02\n\x0fGRPCHealthCheck\x12!\n\x11grpc_service_name\x18\xd6\xa8\x8d\x41 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x01\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x02\x88\x01\x01\x12\"\n\x12port_specification\x18\xc5\xeb\xcc\x18 \x01(\tH\x03\x88\x01\x01\"~\n\x11PortSpecification\x12 \n\x1cUNDEFINED_PORT_SPECIFICATION\x10\x00\x12\x15\n\x0eUSE_FIXED_PORT\x10\xe4\x88\xdbZ\x12\x16\n\x0eUSE_NAMED_PORT\x10\xbf\xcf\xc7\xa6\x01\x12\x18\n\x10USE_SERVING_PORT\x10\xcc\xd1\xf5\xac\x01\x42\x14\n\x12_grpc_service_nameB\x07\n\x05_portB\x0c\n\n_port_nameB\x15\n\x13_port_specification\"l\n\x19GetAcceleratorTypeRequest\x12 \n\x10\x61\x63\x63\x65lerator_type\x18\x8e\xe1\xe8\x41 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"^\n\x11GetAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"f\n#GetAssociationFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\x86\x01\n*GetAssociationNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x42\x07\n\x05_name\"\xa4\x01\n0GetAssociationRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x42\x07\n\x05_name\"b\n\x14GetAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"R\n\x17GetBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"U\n\x18GetBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"Z\n!GetDiagnosticsInterconnectRequest\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"U\n\x0eGetDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"^\n\x12GetDiskTypeRequest\x12\x19\n\tdisk_type\x18\x9c\xe9\xac, \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\x93\x01\n$GetEffectiveFirewallsInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"W\n#GetEffectiveFirewallsNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"\x83\x01\n7GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"]\n\x1cGetExternalVpnGatewayRequest\x12$\n\x14\x65xternal_vpn_gateway\x18\x85\xd7\xb3\x34 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"<\n\x18GetFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\"H\n\x12GetFirewallRequest\x12\x19\n\x08\x66irewall\x18\x80\xfa\xd5\xf3\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"m\n\x18GetForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"M\n\x19GetFromFamilyImageRequest\x12\x17\n\x06\x66\x61mily\x18\xe4\xb6\xe1\x9c\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"L\n\x17GetGlobalAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"[\n\x1eGetGlobalForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"h\n$GetGlobalNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"V\n\x19GetGlobalOperationRequest\x12 \n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\n\xe0\x41\x02\xfaG\x04name\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"s\n%GetGlobalOrganizationOperationRequest\x12 \n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\n\xe0\x41\x02\xfaG\x04name\x12\x1a\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_parent_id\"j\n&GetGlobalPublicDelegatedPrefixeRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\"\xc7\x01\n!GetGuestAttributesInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\nquery_path\x18\xbc\x82\xe1\xaf\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cvariable_key\x18\x9c\x84\xb0N \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_query_pathB\x0f\n\r_variable_key\"\xbf\x01\n\x1eGetHealthBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x62\n!resource_group_reference_resource\x18\xd3\xfe\xed\x35 \x01(\x0b\x32/.google.cloud.compute.v1.ResourceGroupReferenceB\x03\xe0\x41\x02\"O\n\x15GetHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"\xdd\x01\n$GetHealthRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x62\n!resource_group_reference_resource\x18\xd3\xfe\xed\x35 \x01(\x0b\x32/.google.cloud.compute.v1.ResourceGroupReferenceB\x03\xe0\x41\x02\"\xc4\x01\n\x1aGetHealthTargetPoolRequest\x12X\n\x1binstance_reference_resource\x18\xec\xe4\xd6\x8b\x01 \x01(\x0b\x32*.google.cloud.compute.v1.InstanceReferenceB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\"\xad\x01\n GetIamPolicyBackendBucketRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xae\x01\n!GetIamPolicyBackendServiceRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xba\x01\n\x17GetIamPolicyDiskRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\x95\x01\n!GetIamPolicyFirewallPolicyRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xa5\x01\n\x18GetIamPolicyImageRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xbe\x01\n\x1bGetIamPolicyInstanceRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xb0\x01\n#GetIamPolicyInstanceTemplateRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc5\x01\n\"GetIamPolicyInstantSnapshotRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xa7\x01\n\x1aGetIamPolicyLicenseRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xac\x01\n\x1fGetIamPolicyMachineImageRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc9\x01\n$GetIamPolicyNetworkAttachmentRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xb5\x01\n(GetIamPolicyNetworkFirewallPolicyRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xbf\x01\n\x1cGetIamPolicyNodeGroupRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc4\x01\n\x1fGetIamPolicyNodeTemplateRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xcc\x01\n\'GetIamPolicyRegionBackendServiceRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc2\x01\n\x1dGetIamPolicyRegionDiskRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xcd\x01\n(GetIamPolicyRegionInstantSnapshotRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xd3\x01\n.GetIamPolicyRegionNetworkFirewallPolicyRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc1\x01\n\x1eGetIamPolicyReservationRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc6\x01\n!GetIamPolicyResourcePolicyRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc9\x01\n$GetIamPolicyServiceAttachmentRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xa8\x01\n\x1bGetIamPolicySnapshotRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc1\x01\n\x1eGetIamPolicyStoragePoolRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"\xc2\x01\n\x1dGetIamPolicySubnetworkRequest\x12\x31\n options_requested_policy_version\x18\xbd\xfc\x85\xee\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x42#\n!_options_requested_policy_version\"c\n\x19GetImageFamilyViewRequest\x12\x17\n\x06\x66\x61mily\x18\xe4\xb6\xe1\x9c\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"A\n\x0fGetImageRequest\x12\x15\n\x05image\x18\xdb\xd2\xea/ \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"w\n\x1eGetInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xa4\x01\n+GetInstanceGroupManagerResizeRequestRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0eresize_request\x18\x84\x84\xb9g \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"h\n\x17GetInstanceGroupRequest\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"]\n\x12GetInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"J\n\x19GetInstanceSettingRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"Y\n\x1aGetInstanceTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"m\n\x19GetInstantSnapshotRequest\x12!\n\x10instant_snapshot\x18\xe2\xdc\xdf\xba\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"}\n GetInterconnectAttachmentRequest\x12(\n\x17interconnect_attachment\x18\xf4\x8a\xf7\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"a\n\x1eGetInterconnectLocationRequest\x12&\n\x15interconnect_location\x18\xc6\xd8\xdb\xea\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"n\n$GetInterconnectRemoteLocationRequest\x12-\n\x1cinterconnect_remote_location\x18\xdd\xcb\xad\x8a\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"O\n\x16GetInterconnectRequest\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"M\n\x15GetLicenseCodeRequest\x12\x1b\n\x0clicense_code\x18\xab\xc6Y \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"E\n\x11GetLicenseRequest\x12\x17\n\x07license\x18\xc1\x88\xc2O \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"P\n\x16GetMachineImageRequest\x12\x1d\n\rmachine_image\x18\xe3\xfe\xfe \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"d\n\x15GetMachineTypeRequest\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"[\n\"GetMacsecConfigInterconnectRequest\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"\x8c\x01\n\x19GetNatIpInfoRouterRequest\x12\x19\n\x08nat_name\x18\xe9\xad\xf8\xca\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_nat_name\"\xf9\x02\n\x1fGetNatMappingInfoRoutersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x19\n\x08nat_name\x18\xe9\xad\xf8\xca\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_nat_nameB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"r\n\x1bGetNetworkAttachmentRequest\x12\"\n\x12network_attachment\x18\xd4\x97\x8fk \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"\x86\x01\n$GetNetworkEdgeSecurityServiceRequest\x12-\n\x1dnetwork_edge_security_service\x18\xa7\x9f\xefJ \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"x\n\x1eGetNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\\\n\x1fGetNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"T\n\x18GetNetworkProfileRequest\x12\x1f\n\x0fnetwork_profile\x18\x98\xf9\xc5R \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"E\n\x11GetNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"a\n\x13GetNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"i\n\x16GetNodeTemplateRequest\x12\x1e\n\rnode_template\x18\x97\xe4\x8b\x9a\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"_\n\x12GetNodeTypeRequest\x12\x1a\n\tnode_type\x18\xd7\x96\x90\xde\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"n\n\x19GetPacketMirroringRequest\x12 \n\x10packet_mirroring\x18\xcc\xb9\xd1\n \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n2GetPacketMirroringRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\",\n\x11GetProjectRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"f\n!GetPublicAdvertisedPrefixeRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\"|\n GetPublicDelegatedPrefixeRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"j\n\x1aGetRegionAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"s\n\x1eGetRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"j\n\x1aGetRegionCommitmentRequest\x12\x1b\n\ncommitment\x18\x95\x96\xf3\xe5\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"]\n\x14GetRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"f\n\x18GetRegionDiskTypeRequest\x12\x19\n\tdisk_type\x18\x9c\xe9\xac, \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"m\n\x1bGetRegionHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"|\n\"GetRegionHealthCheckServiceRequest\x12%\n\x14health_check_service\x18\xdb\x9b\xdd\xc2\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"\x7f\n$GetRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"p\n\x1dGetRegionInstanceGroupRequest\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"w\n GetRegionInstanceTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"u\n\x1fGetRegionInstantSnapshotRequest\x12!\n\x10instant_snapshot\x18\xe2\xdc\xdf\xba\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"\x80\x01\n$GetRegionNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"z\n%GetRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"\x7f\n$GetRegionNotificationEndpointRequest\x12&\n\x15notification_endpoint\x18\xe9\xbc\xd6\xb3\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"n\n\x19GetRegionOperationRequest\x12 \n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\n\xe0\x41\x02\xfaG\x04name\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"C\n\x10GetRegionRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"r\n\x1eGetRegionSecurityPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\"r\n\x1eGetRegionSslCertificateRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x0fssl_certificate\x18\xe4\xd7\x92\x16 \x01(\tB\x03\xe0\x41\x02\"i\n\x19GetRegionSslPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\"u\n\x1fGetRegionTargetHttpProxyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\"w\n GetRegionTargetHttpsProxyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\"t\n\x1eGetRegionTargetTcpProxyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\"c\n\x16GetRegionUrlMapRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\"\x8c\x01\n\x1aGetReservationBlockRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11reservation_block\x18\xda\xc4\x89\xfe\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"c\n\x15GetReservationRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"l\n\x18GetResourcePolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x0fresource_policy\x18\x83\xa5\xf7K \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x1bGetRoutePolicyRouterRequest\x12\x16\n\x06policy\x18\xb2\xca\xb6+ \x01(\tH\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_policy\"A\n\x0fGetRouteRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x05route\x18\xc9\xe4\xea\x33 \x01(\tB\x03\xe0\x41\x02\"[\n\x10GetRouterRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\"g\n\x1cGetRouterStatusRouterRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\"h\n\x1cGetRuleFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x42\x0b\n\t_priority\"\x88\x01\n#GetRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\"\xa6\x01\n)GetRuleRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\"\x9e\x01\n\"GetRuleRegionSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\"\x80\x01\n\x1cGetRuleSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\"g\n\x1cGetScreenshotInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"T\n\x18GetSecurityPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\"\xad\x01\n\"GetSerialPortOutputInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x05start\x18\xe2\x88\xab\x34 \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\x07\n\x05_portB\x08\n\x06_start\"s\n\x1bGetServiceAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12#\n\x12service_attachment\x18\xed\xa9\xd0\xa1\x01 \x01(\tB\x03\xe0\x41\x02\"u\n*GetShieldedInstanceIdentityInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"H\n\x12GetSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08snapshot\x18\xc4\xab\xeb\x87\x01 \x01(\tB\x03\xe0\x41\x02\"4\n\x19GetSnapshotSettingRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"T\n\x18GetSslCertificateRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x0fssl_certificate\x18\xe4\xd7\x92\x16 \x01(\tB\x03\xe0\x41\x02\"K\n\x13GetSslPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\"k\n\x1aGetStatusVpnGatewayRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0bvpn_gateway\x18\xf9\x83\xf6\xc1\x01 \x01(\tB\x03\xe0\x41\x02\"e\n\x15GetStoragePoolRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"n\n\x19GetStoragePoolTypeRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11storage_pool_type\x18\xb9\x81\xb0\x88\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"d\n\x14GetSubnetworkRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tB\x03\xe0\x41\x02\"W\n\x19GetTargetGrpcProxyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12!\n\x11target_grpc_proxy\x18\xfb\xb4\xb2\x02 \x01(\tB\x03\xe0\x41\x02\"W\n\x19GetTargetHttpProxyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\"Y\n\x1aGetTargetHttpsProxyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\"k\n\x18GetTargetInstanceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12 \n\x0ftarget_instance\x18\x83\x8f\x96\x8a\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"d\n\x14GetTargetPoolRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\"V\n\x18GetTargetSslProxyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\"V\n\x18GetTargetTcpProxyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\"r\n\x1aGetTargetVpnGatewayRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12#\n\x12target_vpn_gateway\x18\xcb\x80\xf6\xfd\x01 \x01(\tB\x03\xe0\x41\x02\"E\n\x10GetUrlMapRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\"e\n\x14GetVpnGatewayRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0bvpn_gateway\x18\xf9\x83\xf6\xc1\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x13GetVpnTunnelRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nvpn_tunnel\x18\x93\x94\xca\x44 \x01(\tB\x03\xe0\x41\x02\"3\n\x18GetXpnHostProjectRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"\xa0\x02\n\x1eGetXpnResourcesProjectsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"j\n\x17GetZoneOperationRequest\x12 \n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\n\xe0\x41\x02\xfaG\x04name\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"?\n\x0eGetZoneRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\x88\x01\n\x1aGlobalAddressesMoveRequest\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12$\n\x13\x64\x65stination_address\x18\xc3\xb1\x9e\xb1\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x16\n\x14_destination_address\"{\n1GlobalNetworkEndpointGroupsAttachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"{\n1GlobalNetworkEndpointGroupsDetachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"\xbf\x01\n\"GlobalOrganizationSetPolicyRequest\x12\x36\n\x08\x62indings\x18\x8e\xc5\xa4\xc0\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Binding\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06policy\x18\xb2\xca\xb6+ \x01(\x0b\x32\x1f.google.cloud.compute.v1.PolicyH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_policy\"\xd1\x01\n\x16GlobalSetLabelsRequest\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x00\x88\x01\x01\x12O\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32;.google.cloud.compute.v1.GlobalSetLabelsRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_label_fingerprint\"\xb3\x01\n\x16GlobalSetPolicyRequest\x12\x36\n\x08\x62indings\x18\x8e\xc5\xa4\xc0\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Binding\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06policy\x18\xb2\xca\xb6+ \x01(\x0b\x32\x1f.google.cloud.compute.v1.PolicyH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_policy\"\xda\x03\n\x14GroupMaintenanceInfo\x12)\n\x19maintenance_ongoing_count\x18\x9f\xb6\xe6h \x01(\x05H\x00\x88\x01\x01\x12)\n\x19maintenance_pending_count\x18\xbb\xb0\xdbK \x01(\x05H\x01\x88\x01\x01\x12\x1f\n\x0fscheduling_type\x18\x85\xfe\xa4_ \x01(\tH\x02\x88\x01\x01\x12Y\n\x1aupcoming_group_maintenance\x18\xf0\xc9\xcd\xbb\x01 \x01(\x0b\x32,.google.cloud.compute.v1.UpcomingMaintenanceH\x03\x88\x01\x01\"\x80\x01\n\x0eSchedulingType\x12\x1d\n\x19UNDEFINED_SCHEDULING_TYPE\x10\x00\x12\x0f\n\x07GROUPED\x10\xbe\xd6\xa3\xe2\x01\x12*\n\"GROUP_MAINTENANCE_TYPE_UNSPECIFIED\x10\xbe\xf6\x9d\xd5\x01\x12\x12\n\x0bINDEPENDENT\x10\xda\x96\xc8.google.cloud.compute.v1.HealthChecksAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a]\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.HealthChecksScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa0\x01\n\x16HealthChecksScopedList\x12?\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\x0b\x32$.google.cloud.compute.v1.HealthCheck\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xf2\x06\n\x0cHealthStatus\x12N\n\x0b\x61nnotations\x18\xa4\xf6\xb5\x35 \x03(\x0b\x32\x36.google.cloud.compute.v1.HealthStatus.AnnotationsEntry\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x66orwarding_rule_ip\x18\x88\xac\x91R \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0chealth_state\x18\xee\xe9\xbf\x9a\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x11ipv6_health_state\x18\xc6\x80\xe0Z \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x07\x88\x01\x01\x12\x17\n\x06weight\x18\xf8\x84\xc5\x86\x01 \x01(\tH\x08\x88\x01\x01\x12\x1d\n\x0cweight_error\x18\x81\xfb\x92\xf9\x01 \x01(\tH\t\x88\x01\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"M\n\x0bHealthState\x12\x1a\n\x16UNDEFINED_HEALTH_STATE\x10\x00\x12\x0f\n\x07HEALTHY\x10\xfd\xaa\xdb\xd1\x01\x12\x11\n\tUNHEALTHY\x10\xc4\xb9\xad\xdc\x01\"2\n\x0fIpv6HealthState\x12\x1f\n\x1bUNDEFINED_IPV6_HEALTH_STATE\x10\x00\"\x8a\x01\n\x0bWeightError\x12\x1a\n\x16UNDEFINED_WEIGHT_ERROR\x10\x00\x12\x16\n\x0eINVALID_WEIGHT\x10\xe0\x8b\xfb\xb6\x01\x12\x16\n\x0eMISSING_WEIGHT\x10\x91\x97\x8f\xb7\x01\x12\x1a\n\x12UNAVAILABLE_WEIGHT\x10\xe7\xe2\xc6\xd1\x01\x12\x13\n\x0bWEIGHT_NONE\x10\x9f\xe9\xc9\xef\x01\x42\x12\n\x10_forwarding_ruleB\x15\n\x13_forwarding_rule_ipB\x0f\n\r_health_stateB\x0b\n\t_instanceB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x14\n\x12_ipv6_health_stateB\x07\n\x05_portB\t\n\x07_weightB\x0f\n\r_weight_error\"\xd4\x05\n\x1eHealthStatusForNetworkEndpoint\x12R\n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.BackendServiceReferenceH\x00\x88\x01\x01\x12R\n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.ForwardingRuleReferenceH\x01\x88\x01\x01\x12L\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\x0b\x32-.google.cloud.compute.v1.HealthCheckReferenceH\x02\x88\x01\x01\x12[\n\x14health_check_service\x18\xdb\x9b\xdd\xc2\x01 \x01(\x0b\x32\x34.google.cloud.compute.v1.HealthCheckServiceReferenceH\x03\x88\x01\x01\x12\x1d\n\x0chealth_state\x18\xee\xe9\xbf\x9a\x01 \x01(\tH\x04\x88\x01\x01\x12!\n\x11ipv6_health_state\x18\xc6\x80\xe0Z \x01(\tH\x05\x88\x01\x01\"p\n\x0bHealthState\x12\x1a\n\x16UNDEFINED_HEALTH_STATE\x10\x00\x12\x10\n\x08\x44RAINING\x10\xea\xd5\x8c\xe5\x01\x12\x0f\n\x07HEALTHY\x10\xfd\xaa\xdb\xd1\x01\x12\x11\n\tUNHEALTHY\x10\xc4\xb9\xad\xdc\x01\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\"2\n\x0fIpv6HealthState\x12\x1f\n\x1bUNDEFINED_IPV6_HEALTH_STATE\x10\x00\x42\x12\n\x10_backend_serviceB\x12\n\x10_forwarding_ruleB\x0f\n\r_health_checkB\x17\n\x15_health_check_serviceB\x0f\n\r_health_stateB\x14\n\x12_ipv6_health_state\";\n\x04Help\x12\x33\n\x05links\x18\xb9\x9f\x8d\x31 \x03(\x0b\x32!.google.cloud.compute.v1.HelpLink\"T\n\x08HelpLink\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x06\n\x04_url\"z\n\x08HostRule\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05hosts\x18\xcb\xff\xb6/ \x03(\t\x12\x1d\n\x0cpath_matcher\x18\x98\xbe\x8a\xa1\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x0f\n\r_path_matcher\"i\n\x0eHttpFaultAbort\x12\x1c\n\x0bhttp_status\x18\x89\xb7\xce\xdf\x01 \x01(\rH\x00\x88\x01\x01\x12\x1a\n\npercentage\x18\x9a\xe5\xb7H \x01(\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_http_statusB\r\n\x0b_percentage\"\x8c\x01\n\x0eHttpFaultDelay\x12?\n\x0b\x66ixed_delay\x18\xf8\xb9\x96\x97\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x00\x88\x01\x01\x12\x1a\n\npercentage\x18\x9a\xe5\xb7H \x01(\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_fixed_delayB\r\n\x0b_percentage\"\xa8\x01\n\x12HttpFaultInjection\x12>\n\x05\x61\x62ort\x18\xb0\xc6\x94, \x01(\x0b\x32\'.google.cloud.compute.v1.HttpFaultAbortH\x00\x88\x01\x01\x12>\n\x05\x64\x65lay\x18\x83\xf3\xc2- \x01(\x0b\x32\'.google.cloud.compute.v1.HttpFaultDelayH\x01\x88\x01\x01\x42\x08\n\x06_abortB\x08\n\x06_delay\"\xfc\x01\n\x10HttpHeaderAction\x12L\n\x16request_headers_to_add\x18\xe6\xae\xb1\" \x03(\x0b\x32).google.cloud.compute.v1.HttpHeaderOption\x12$\n\x19request_headers_to_remove\x18\x9f\xcf\x93h \x03(\t\x12M\n\x17response_headers_to_add\x18\xf4\xb6\xa9\x0f \x03(\x0b\x32).google.cloud.compute.v1.HttpHeaderOption\x12%\n\x1aresponse_headers_to_remove\x18\xd1\x81\xfb# \x03(\t\"\xb0\x03\n\x0fHttpHeaderMatch\x12\x1c\n\x0b\x65xact_match\x18\x85\x99\x9c\xda\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0cinvert_match\x18\x9c\xc8\xfa\xee\x01 \x01(\x08H\x02\x88\x01\x01\x12\x1c\n\x0cprefix_match\x18\xd8\xf3\xfcz \x01(\tH\x03\x88\x01\x01\x12\x1d\n\rpresent_match\x18\xc1\xfa\x93 \x01(\x08H\x04\x88\x01\x01\x12\x45\n\x0brange_match\x18\xc3\xa8\xaf. \x01(\x0b\x32(.google.cloud.compute.v1.Int64RangeMatchH\x05\x88\x01\x01\x12\x1b\n\x0bregex_match\x18\xcd\xb7\x9a\x33 \x01(\tH\x06\x88\x01\x01\x12\x1d\n\x0csuffix_match\x18\xd7\xe6\xae\xcb\x01 \x01(\tH\x07\x88\x01\x01\x42\x0e\n\x0c_exact_matchB\x0e\n\x0c_header_nameB\x0f\n\r_invert_matchB\x0f\n\r_prefix_matchB\x10\n\x0e_present_matchB\x0e\n\x0c_range_matchB\x0e\n\x0c_regex_matchB\x0f\n\r_suffix_match\"\x93\x01\n\x10HttpHeaderOption\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cheader_value\x18\xbf\xf2\xeb` \x01(\tH\x01\x88\x01\x01\x12\x17\n\x07replace\x18\xb4\xe5\xf2\t \x01(\x08H\x02\x88\x01\x01\x42\x0e\n\x0c_header_nameB\x0f\n\r_header_valueB\n\n\x08_replace\"\xc4\x01\n\x17HttpQueryParameterMatch\x12\x1c\n\x0b\x65xact_match\x18\x85\x99\x9c\xda\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rpresent_match\x18\xc1\xfa\x93 \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\x0bregex_match\x18\xcd\xb7\x9a\x33 \x01(\tH\x03\x88\x01\x01\x42\x0e\n\x0c_exact_matchB\x07\n\x05_nameB\x10\n\x0e_present_matchB\x0e\n\x0c_regex_match\"\x8c\x04\n\x12HttpRedirectAction\x12\x1d\n\rhost_redirect\x18\x93\xa1\x9c\x33 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0ehttps_redirect\x18\xb0\xf1\x97Q \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\rpath_redirect\x18\xb6\xbd\xee\x81\x01 \x01(\tH\x02\x88\x01\x01\x12 \n\x0fprefix_redirect\x18\xe9\xf5\xe0\xd4\x01 \x01(\tH\x03\x88\x01\x01\x12\'\n\x16redirect_response_code\x18\x88\xd8\x9e\xd0\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0bstrip_query\x18\xe1\x99\xf7\x18 \x01(\x08H\x05\x88\x01\x01\"\xb8\x01\n\x14RedirectResponseCode\x12$\n UNDEFINED_REDIRECT_RESPONSE_CODE\x10\x00\x12\x0c\n\x05\x46OUND\x10\xe2\xbe\xfe\x1f\x12!\n\x19MOVED_PERMANENTLY_DEFAULT\x10\xd1\x99\xb2\xb8\x01\x12\x1a\n\x12PERMANENT_REDIRECT\x10\xed\xe8\x93\xb6\x01\x12\x11\n\tSEE_OTHER\x10\xe4\xef\xaf\xd4\x01\x12\x1a\n\x12TEMPORARY_REDIRECT\x10\xaa\xe4\xb7\xe9\x01\x42\x10\n\x0e_host_redirectB\x11\n\x0f_https_redirectB\x10\n\x0e_path_redirectB\x12\n\x10_prefix_redirectB\x19\n\x17_redirect_response_codeB\x0e\n\x0c_strip_query\"\xb4\x01\n\x0fHttpRetryPolicy\x12\x1b\n\x0bnum_retries\x18\x8d\xab\x81x \x01(\rH\x00\x88\x01\x01\x12\x43\n\x0fper_try_timeout\x18\xbb\xad\xc4\x85\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x01\x88\x01\x01\x12\x1b\n\x10retry_conditions\x18\xaf\xe1\xde\r \x03(\tB\x0e\n\x0c_num_retriesB\x12\n\x10_per_try_timeout\"\xf1\x05\n\x0fHttpRouteAction\x12\x41\n\x0b\x63ors_policy\x18\x84\xcc\x9d\xbe\x01 \x01(\x0b\x32#.google.cloud.compute.v1.CorsPolicyH\x00\x88\x01\x01\x12T\n\x16\x66\x61ult_injection_policy\x18\x97\x94\xea\xc4\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpFaultInjectionH\x01\x88\x01\x01\x12\x46\n\x13max_stream_duration\x18\x98\xa5\xa5\x1d \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x02\x88\x01\x01\x12S\n\x15request_mirror_policy\x18\x82\xe0\xffh \x01(\x0b\x32,.google.cloud.compute.v1.RequestMirrorPolicyH\x03\x88\x01\x01\x12\x46\n\x0cretry_policy\x18\xa9\xe5\x8a\x1b \x01(\x0b\x32(.google.cloud.compute.v1.HttpRetryPolicyH\x04\x88\x01\x01\x12;\n\x07timeout\x18\xe1\x9a\xbd\x8d\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x05\x88\x01\x01\x12\x41\n\x0burl_rewrite\x18\xbc\xfd\xaa\x82\x01 \x01(\x0b\x32#.google.cloud.compute.v1.UrlRewriteH\x06\x88\x01\x01\x12V\n\x19weighted_backend_services\x18\xd1\xc7\xda\xa0\x01 \x03(\x0b\x32/.google.cloud.compute.v1.WeightedBackendServiceB\x0e\n\x0c_cors_policyB\x19\n\x17_fault_injection_policyB\x16\n\x14_max_stream_durationB\x18\n\x16_request_mirror_policyB\x0f\n\r_retry_policyB\n\n\x08_timeoutB\x0e\n\x0c_url_rewrite\"\xe8\x04\n\rHttpRouteRule\x12`\n\x1c\x63ustom_error_response_policy\x18\xeb\xf8\xda` \x01(\x0b\x32\x32.google.cloud.compute.v1.CustomErrorResponsePolicyH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12I\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32).google.cloud.compute.v1.HttpHeaderActionH\x02\x88\x01\x01\x12\x44\n\x0bmatch_rules\x18\xfd\xbb\xb1\xb3\x01 \x03(\x0b\x32+.google.cloud.compute.v1.HttpRouteRuleMatch\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x03\x88\x01\x01\x12G\n\x0croute_action\x18\xec\xa9\xb9\xca\x01 \x01(\x0b\x32(.google.cloud.compute.v1.HttpRouteActionH\x04\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x05\x88\x01\x01\x12J\n\x0curl_redirect\x18\xac\xa1\x98\xc1\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpRedirectActionH\x06\x88\x01\x01\x42\x1f\n\x1d_custom_error_response_policyB\x0e\n\x0c_descriptionB\x10\n\x0e_header_actionB\x0b\n\t_priorityB\x0f\n\r_route_actionB\n\n\x08_serviceB\x0f\n\r_url_redirect\"\xf5\x03\n\x12HttpRouteRuleMatch\x12\x1f\n\x0f\x66ull_path_match\x18\xdb\x89\xaa\x66 \x01(\tH\x00\x88\x01\x01\x12\x44\n\x0eheader_matches\x18\x81\xeb\xc8\xac\x01 \x03(\x0b\x32(.google.cloud.compute.v1.HttpHeaderMatch\x12\x1c\n\x0bignore_case\x18\xfd\x92\xb4\xdd\x01 \x01(\x08H\x01\x88\x01\x01\x12\x45\n\x10metadata_filters\x18\xeb\xcd\xcc\xdd\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.MetadataFilter\x12$\n\x13path_template_match\x18\x9a\xc2\xb3\x8b\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0cprefix_match\x18\xd8\xf3\xfcz \x01(\tH\x03\x88\x01\x01\x12U\n\x17query_parameter_matches\x18\xe6\x95\xbe\x88\x01 \x03(\x0b\x32\x30.google.cloud.compute.v1.HttpQueryParameterMatch\x12\x1b\n\x0bregex_match\x18\xcd\xb7\x9a\x33 \x01(\tH\x04\x88\x01\x01\x42\x12\n\x10_full_path_matchB\x0e\n\x0c_ignore_caseB\x16\n\x14_path_template_matchB\x0f\n\r_prefix_matchB\x0e\n\x0c_regex_match\"\xb9\x12\n\x05Image\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12\x61rchive_size_bytes\x18\xca\x8c\xdc\xb5\x01 \x01(\x03H\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x05\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x06\x88\x01\x01\x12\x17\n\x06\x66\x61mily\x18\xe4\xb6\xe1\x9c\x01 \x01(\tH\x07\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x08\x88\x01\x01\x12U\n\x14image_encryption_key\x18\x87\xce\xfb\xb4\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x0b\x88\x01\x01\x12>\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32*.google.cloud.compute.v1.Image.LabelsEntry\x12\x18\n\rlicense_codes\x18\xa8\x85\xd8\x15 \x03(\x03\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0c\x88\x01\x01\x12;\n\x08raw_disk\x18\xd4\xce\xf3\xef\x01 \x01(\x0b\x32 .google.cloud.compute.v1.RawDiskH\r\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x0e\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x0f\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x10\x88\x01\x01\x12\\\n\x1fshielded_instance_initial_state\x18\x83\xc4\xdc[ \x01(\x0b\x32+.google.cloud.compute.v1.InitialStateConfigH\x11\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x12\x88\x01\x01\x12[\n\x1asource_disk_encryption_key\x18\xe1\xa0\xb8\xfd\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x13\x88\x01\x01\x12\x1f\n\x0esource_disk_id\x18\xd9\xcd\xc9\xd8\x01 \x01(\tH\x14\x88\x01\x01\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\x15\x88\x01\x01\x12\\\n\x1bsource_image_encryption_key\x18\xab\x91\xf5\xb5\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x16\x88\x01\x01\x12\x1f\n\x0fsource_image_id\x18\xa3\xfc\xb0\x1a \x01(\tH\x17\x88\x01\x01\x12\x1f\n\x0fsource_snapshot\x18\xe8\x9a\x8e< \x01(\tH\x18\x88\x01\x01\x12_\n\x1esource_snapshot_encryption_key\x18\xda\x8e\xe7\x90\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x19\x88\x01\x01\x12\"\n\x12source_snapshot_id\x18\xd2\x96\x98/ \x01(\tH\x1a\x88\x01\x01\x12\x1c\n\x0bsource_type\x18\xde\xf1\xd2\xd7\x01 \x01(\tH\x1b\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x1c\x88\x01\x01\x12\x1d\n\x11storage_locations\x18\x9a\xed\xb3\x9c\x01 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"2\n\nSourceType\x12\x19\n\x15UNDEFINED_SOURCE_TYPE\x10\x00\x12\t\n\x03RAW\x10\x88\xf8\x04\"^\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x0f\n\r_architectureB\x15\n\x13_archive_size_bytesB\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x0f\n\r_disk_size_gbB\x1e\n\x1c_enable_confidential_computeB\t\n\x07_familyB\x05\n\x03_idB\x17\n\x15_image_encryption_keyB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\x0b\n\t_raw_diskB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\"\n _shielded_instance_initial_stateB\x0e\n\x0c_source_diskB\x1d\n\x1b_source_disk_encryption_keyB\x11\n\x0f_source_disk_idB\x0f\n\r_source_imageB\x1e\n\x1c_source_image_encryption_keyB\x12\n\x10_source_image_idB\x12\n\x10_source_snapshotB!\n\x1f_source_snapshot_encryption_keyB\x15\n\x13_source_snapshot_idB\x0e\n\x0c_source_typeB\t\n\x07_status\"R\n\x0fImageFamilyView\x12\x35\n\x05image\x18\xdb\xd2\xea/ \x01(\x0b\x32\x1e.google.cloud.compute.v1.ImageH\x00\x88\x01\x01\x42\x08\n\x06_image\"\x9b\x02\n\tImageList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x30\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1e.google.cloud.compute.v1.Image\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8e\x02\n\x12InitialStateConfig\x12\x39\n\x03\x64\x62s\x18\xb5\x87\x06 \x03(\x0b\x32*.google.cloud.compute.v1.FileContentBuffer\x12;\n\x04\x64\x62xs\x18\xf9\xe7\xbb\x01 \x03(\x0b\x32*.google.cloud.compute.v1.FileContentBuffer\x12;\n\x04keks\x18\xc2\xd8\xc8\x01 \x03(\x0b\x32*.google.cloud.compute.v1.FileContentBuffer\x12<\n\x02pk\x18\xfb\x1b \x01(\x0b\x32*.google.cloud.compute.v1.FileContentBufferH\x00\x88\x01\x01\x42\x05\n\x03_pk\"\xca\x01\n\x14InsertAddressRequest\x12\x43\n\x10\x61\x64\x64ress_resource\x18\xf9\x97\xde\xe6\x01 \x01(\x0b\x32 .google.cloud.compute.v1.AddressB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xce\x01\n\x17InsertAutoscalerRequest\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xbc\x01\n\x1aInsertBackendBucketRequest\x12P\n\x17\x62\x61\x63kend_bucket_resource\x18\x98\xce\xc7\xb5\x01 \x01(\x0b\x32&.google.cloud.compute.v1.BackendBucketB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbf\x01\n\x1bInsertBackendServiceRequest\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xeb\x01\n\x11InsertDiskRequest\x12<\n\rdisk_resource\x18\xf0\xd0\xab\x0c \x01(\x0b\x32\x1d.google.cloud.compute.v1.DiskB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x0f\n\r_source_image\"\xcc\x01\n\x1fInsertExternalVpnGatewayRequest\x12[\n\x1d\x65xternal_vpn_gateway_resource\x18\x88\xdf\x90\xe8\x01 \x01(\x0b\x32+.google.cloud.compute.v1.ExternalVpnGatewayB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc4\x01\n\x1bInsertFirewallPolicyRequest\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12&\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tB\x0f\xe0\x41\x02\xf2G\tparent_id\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xab\x01\n\x15InsertFirewallRequest\x12\x44\n\x11\x66irewall_resource\x18\xed\xb0\xe0\x13 \x01(\x0b\x32!.google.cloud.compute.v1.FirewallB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe0\x01\n\x1bInsertForwardingRuleRequest\x12R\n\x18\x66orwarding_rule_resource\x18\xaf\xc0\xd0\x8f\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.ForwardingRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xaf\x01\n\x1aInsertGlobalAddressRequest\x12\x43\n\x10\x61\x64\x64ress_resource\x18\xf9\x97\xde\xe6\x01 \x01(\x0b\x32 .google.cloud.compute.v1.AddressB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc5\x01\n!InsertGlobalForwardingRuleRequest\x12R\n\x18\x66orwarding_rule_resource\x18\xaf\xc0\xd0\x8f\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.ForwardingRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x01\n\'InsertGlobalNetworkEndpointGroupRequest\x12_\n\x1fnetwork_endpoint_group_resource\x18\xa7\xcd\xdb\xfa\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xdb\x01\n)InsertGlobalPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12`\n public_delegated_prefix_resource\x18\x85\xf8\xd8\x16 \x01(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefixB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb5\x01\n\x18InsertHealthCheckRequest\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd2\x01\n\x12InsertImageRequest\x12\x1c\n\x0c\x66orce_create\x18\xd0\x89\xa4^ \x01(\x08H\x00\x88\x01\x01\x12?\n\x0eimage_resource\x18\xf2\xc4\xfe\xb0\x01 \x01(\x0b\x32\x1e.google.cloud.compute.v1.ImageB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0f\n\r_force_createB\r\n\x0b_request_id\"\xee\x01\n!InsertInstanceGroupManagerRequest\x12^\n\x1finstance_group_manager_resource\x18\x8a\x8a\xbe| \x01(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManagerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xc0\x02\n.InsertInstanceGroupManagerResizeRequestRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12{\n.instance_group_manager_resize_request_resource\x18\xed\xbe\xb5\xdf\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InstanceGroupManagerResizeRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd9\x01\n\x1aInsertInstanceGroupRequest\x12P\n\x17instance_group_resource\x18\xb8\xb5\xd5\x88\x01 \x01(\x0b\x32&.google.cloud.compute.v1.InstanceGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcf\x02\n\x15InsertInstanceRequest\x12\x44\n\x11instance_resource\x18\xf8\xf0\xfe\x66 \x01(\x0b\x32!.google.cloud.compute.v1.InstanceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12)\n\x18source_instance_template\x18\xc0\xc3\xc1\x9e\x01 \x01(\tH\x01\x88\x01\x01\x12$\n\x14source_machine_image\x18\xbf\xdc\xb0\n \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x1b\n\x19_source_instance_templateB\x17\n\x15_source_machine_image\"\xc4\x01\n\x1dInsertInstanceTemplateRequest\x12U\n\x1ainstance_template_resource\x18\x89\xea\x8b\x05 \x01(\x0b\x32).google.cloud.compute.v1.InstanceTemplateB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xdf\x01\n\x1cInsertInstantSnapshotRequest\x12T\n\x19instant_snapshot_resource\x18\xcb\xaa\x88\xb7\x01 \x01(\x0b\x32(.google.cloud.compute.v1.InstantSnapshotB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa8\x02\n#InsertInterconnectAttachmentRequest\x12\x61\n interconnect_attachment_resource\x18\xf9\xa4\xa0\x65 \x01(\x0b\x32/.google.cloud.compute.v1.InterconnectAttachmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x10\n\x0e_validate_only\"\xb8\x01\n\x19InsertInterconnectRequest\x12M\n\x15interconnect_resource\x18\x9f\xa1\xcc\xbd\x01 \x01(\x0b\x32%.google.cloud.compute.v1.InterconnectB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa9\x01\n\x14InsertLicenseRequest\x12\x43\n\x10license_resource\x18\xcc\xd4\xea\xd0\x01 \x01(\x0b\x32 .google.cloud.compute.v1.LicenseB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xee\x01\n\x19InsertMachineImageRequest\x12M\n\x16machine_image_resource\x18\xea\xaa\xfb\x1c \x01(\x0b\x32%.google.cloud.compute.v1.MachineImageB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12 \n\x0fsource_instance\x18\xb9\x98\xfd\xbc\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x12\n\x10_source_instance\"\xe8\x01\n\x1eInsertNetworkAttachmentRequest\x12W\n\x1bnetwork_attachment_resource\x18\x99\xf0\xcc\x64 \x01(\x0b\x32*.google.cloud.compute.v1.NetworkAttachmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb7\x02\n\'InsertNetworkEdgeSecurityServiceRequest\x12l\n&network_edge_security_service_resource\x18\xa6\xa3\xdb\xe3\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.NetworkEdgeSecurityServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x10\n\x0e_validate_only\"\xef\x01\n!InsertNetworkEndpointGroupRequest\x12_\n\x1fnetwork_endpoint_group_resource\x18\xa7\xcd\xdb\xfa\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xc6\x01\n\"InsertNetworkFirewallPolicyRequest\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa8\x01\n\x14InsertNetworkRequest\x12\x42\n\x10network_resource\x18\xff\xdd\x9c: \x01(\x0b\x32 .google.cloud.compute.v1.NetworkB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf1\x01\n\x16InsertNodeGroupRequest\x12\"\n\x12initial_node_count\x18\xed\xc8\xa7\" \x01(\x05\x42\x03\xe0\x41\x02\x12H\n\x13node_group_resource\x18\xab\xb3\xfa\xf0\x01 \x01(\x0b\x32\".google.cloud.compute.v1.NodeGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd9\x01\n\x19InsertNodeTemplateRequest\x12M\n\x16node_template_resource\x18\xb6\xda\xdd< \x01(\x0b\x32%.google.cloud.compute.v1.NodeTemplateB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe3\x01\n\x1cInsertPacketMirroringRequest\x12T\n\x19packet_mirroring_resource\x18\xa1\xfc\xa8\xeb\x01 \x01(\x0b\x32(.google.cloud.compute.v1.PacketMirroringB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x01\n$InsertPublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x62\n!public_advertised_prefix_resource\x18\x8f\xd7\xb2o \x01(\x0b\x32/.google.cloud.compute.v1.PublicAdvertisedPrefixB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf6\x01\n#InsertPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12`\n public_delegated_prefix_resource\x18\x85\xf8\xd8\x16 \x01(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefixB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x01\n\x1dInsertRegionAutoscalerRequest\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe6\x01\n!InsertRegionBackendServiceRequest\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x01\n\x1dInsertRegionCommitmentRequest\x12H\n\x13\x63ommitment_resource\x18\xf8\xa3\xbbt \x01(\x0b\x32#.google.cloud.compute.v1.CommitmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf5\x01\n\x17InsertRegionDiskRequest\x12<\n\rdisk_resource\x18\xf0\xd0\xab\x0c \x01(\x0b\x32\x1d.google.cloud.compute.v1.DiskB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0f\n\r_source_image\"\xdc\x01\n\x1eInsertRegionHealthCheckRequest\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf3\x01\n%InsertRegionHealthCheckServiceRequest\x12[\n\x1dhealth_check_service_resource\x18\xf2\x9b\xd0\xe3\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HealthCheckServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf8\x01\n\'InsertRegionInstanceGroupManagerRequest\x12^\n\x1finstance_group_manager_resource\x18\x8a\x8a\xbe| \x01(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManagerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xeb\x01\n#InsertRegionInstanceTemplateRequest\x12U\n\x1ainstance_template_resource\x18\x89\xea\x8b\x05 \x01(\x0b\x32).google.cloud.compute.v1.InstanceTemplateB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe9\x01\n\"InsertRegionInstantSnapshotRequest\x12T\n\x19instant_snapshot_resource\x18\xcb\xaa\x88\xb7\x01 \x01(\x0b\x32(.google.cloud.compute.v1.InstantSnapshotB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf9\x01\n\'InsertRegionNetworkEndpointGroupRequest\x12_\n\x1fnetwork_endpoint_group_resource\x18\xa7\xcd\xdb\xfa\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xed\x01\n(InsertRegionNetworkFirewallPolicyRequest\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf8\x01\n\'InsertRegionNotificationEndpointRequest\x12^\n\x1enotification_endpoint_resource\x18\xa4\xfa\xb1\xa1\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NotificationEndpointB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x96\x02\n!InsertRegionSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18security_policy_resource\x18\xfc\xaa\x89g \x01(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicyB\x03\xe0\x41\x02\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x10\n\x0e_validate_only\"\xe5\x01\n!InsertRegionSslCertificateRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18ssl_certificate_resource\x18\x89\xd4\x95V \x01(\x0b\x32\'.google.cloud.compute.v1.SslCertificateB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd7\x01\n\x1cInsertRegionSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12H\n\x13ssl_policy_resource\x18\xc8\x88\x8a\x83\x01 \x01(\x0b\x32\".google.cloud.compute.v1.SslPolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe9\x01\n\"InsertRegionTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12T\n\x1atarget_http_proxy_resource\x18\xa8\xaf\xe3\x0b \x01(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xed\x01\n#InsertRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12W\n\x1btarget_https_proxy_resource\x18\x81\xad\xe4\xce\x01 \x01(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe6\x01\n!InsertRegionTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12R\n\x19target_tcp_proxy_resource\x18\xcb\xf0\xc9\x45 \x01(\x0b\x32\'.google.cloud.compute.v1.TargetTcpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xcd\x01\n\x19InsertRegionUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd2\x01\n\x18InsertReservationRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12K\n\x14reservation_resource\x18\xa1\xee\xf4\x87\x01 \x01(\x0b\x32$.google.cloud.compute.v1.ReservationB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xdf\x01\n\x1bInsertResourcePolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18resource_policy_resource\x18\xca\x8c\xd1$ \x01(\x0b\x32\'.google.cloud.compute.v1.ResourcePolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa2\x01\n\x12InsertRouteRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12>\n\x0eroute_resource\x18\xc4\x8a\xbfk \x01(\x0b\x32\x1e.google.cloud.compute.v1.RouteB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xc6\x01\n\x13InsertRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12@\n\x0frouter_resource\x18\xc4\x80\x82J \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xef\x01\n\x1bInsertSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18security_policy_resource\x18\xfc\xaa\x89g \x01(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicyB\x03\xe0\x41\x02\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x10\n\x0e_validate_only\"\xe9\x01\n\x1eInsertServiceAttachmentRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12X\n\x1bservice_attachment_resource\x18\xa0\xb6\xc4\xe1\x01 \x01(\x0b\x32*.google.cloud.compute.v1.ServiceAttachmentB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xac\x01\n\x15InsertSnapshotRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x45\n\x11snapshot_resource\x18\xa9\xb8\xc1\xe5\x01 \x01(\x0b\x32!.google.cloud.compute.v1.SnapshotB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbe\x01\n\x1bInsertSslCertificateRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18ssl_certificate_resource\x18\x89\xd4\x95V \x01(\x0b\x32\'.google.cloud.compute.v1.SslCertificateB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb0\x01\n\x16InsertSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12H\n\x13ssl_policy_resource\x18\xc8\x88\x8a\x83\x01 \x01(\x0b\x32\".google.cloud.compute.v1.SslPolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd2\x01\n\x18InsertStoragePoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12K\n\x15storage_pool_resource\x18\x8d\xbc\xf9J \x01(\x0b\x32$.google.cloud.compute.v1.StoragePoolB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd2\x01\n\x17InsertSubnetworkRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12H\n\x13subnetwork_resource\x18\xbf\xda\x91\x14 \x01(\x0b\x32#.google.cloud.compute.v1.SubnetworkB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xc3\x01\n\x1cInsertTargetGrpcProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12U\n\x1atarget_grpc_proxy_resource\x18\xd2\xea\xeb\x9c\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetGrpcProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xc2\x01\n\x1cInsertTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12T\n\x1atarget_http_proxy_resource\x18\xa8\xaf\xe3\x0b \x01(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xc6\x01\n\x1dInsertTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12W\n\x1btarget_https_proxy_resource\x18\x81\xad\xe4\xce\x01 \x01(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xdc\x01\n\x1bInsertTargetInstanceRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12R\n\x18target_instance_resource\x18\xca\xe2\xa0\xcd\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.TargetInstanceB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd3\x01\n\x17InsertTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12I\n\x14target_pool_resource\x18\xa3\xdd\xa5\x30 \x01(\x0b\x32#.google.cloud.compute.v1.TargetPoolB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbf\x01\n\x1bInsertTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12R\n\x19target_ssl_proxy_resource\x18\xc0\xfd\xdb\x43 \x01(\x0b\x32\'.google.cloud.compute.v1.TargetSslProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbf\x01\n\x1bInsertTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12R\n\x19target_tcp_proxy_resource\x18\xcb\xf0\xc9\x45 \x01(\x0b\x32\'.google.cloud.compute.v1.TargetTcpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe5\x01\n\x1dInsertTargetVpnGatewayRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12U\n\x1btarget_vpn_gateway_resource\x18\x82\xb3\x1e \x01(\x0b\x32).google.cloud.compute.v1.TargetVpnGatewayB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa6\x01\n\x13InsertUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd3\x01\n\x17InsertVpnGatewayRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12I\n\x14vpn_gateway_resource\x18\x94\xb7\x8eW \x01(\x0b\x32#.google.cloud.compute.v1.VpnGatewayB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd0\x01\n\x16InsertVpnTunnelRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12G\n\x13vpn_tunnel_resource\x18\xba\xa1\xb4) \x01(\x0b\x32\".google.cloud.compute.v1.VpnTunnelB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe7\x1d\n\x08Instance\x12\\\n\x19\x61\x64vanced_machine_features\x18\xb2\xe7\xaa\xc3\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.AdvancedMachineFeaturesH\x00\x88\x01\x01\x12\x1f\n\x0e\x63\x61n_ip_forward\x18\xfc\x86\x84\xdf\x01 \x01(\x08H\x01\x88\x01\x01\x12\x62\n\x1c\x63onfidential_instance_config\x18\xf5\x92\xfa\xe9\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.ConfidentialInstanceConfigH\x02\x88\x01\x01\x12\x1d\n\x0c\x63pu_platform\x18\xaa\xea\xd1\xc3\x01 \x01(\tH\x03\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x04\x88\x01\x01\x12$\n\x13\x64\x65letion_protection\x18\xea\xff\xb2\xda\x01 \x01(\x08H\x05\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x06\x88\x01\x01\x12\x37\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32%.google.cloud.compute.v1.AttachedDisk\x12\x46\n\x0e\x64isplay_device\x18\xf3\x88\xbc{ \x01(\x0b\x32&.google.cloud.compute.v1.DisplayDeviceH\x07\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x08\x88\x01\x01\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\x12\x18\n\x08hostname\x18\xb3\xb8\x85q \x01(\tH\t\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\n\x88\x01\x01\x12W\n\x17instance_encryption_key\x18\x8d\xc1\xef\x1e \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x0b\x88\x01\x01\x12*\n\x1akey_revocation_action_type\x18\xe2\xdc\xc0p \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\r\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x0e\x88\x01\x01\x12\x41\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32-.google.cloud.compute.v1.Instance.LabelsEntry\x12%\n\x14last_start_timestamp\x18\xd0\xa3\xd1\xd3\x01 \x01(\tH\x0f\x88\x01\x01\x12$\n\x13last_stop_timestamp\x18\xe2\xdb\xec\xc4\x01 \x01(\tH\x10\x88\x01\x01\x12)\n\x18last_suspended_timestamp\x18\x89\xa9\xf1\xa9\x01 \x01(\tH\x11\x88\x01\x01\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x12\x88\x01\x01\x12;\n\x08metadata\x18\xaf\xf6\xb5) \x01(\x0b\x32!.google.cloud.compute.v1.MetadataH\x13\x88\x01\x01\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x14\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x15\x88\x01\x01\x12H\n\x12network_interfaces\x18\x8b\xda\x92\x19 \x03(\x0b\x32).google.cloud.compute.v1.NetworkInterface\x12^\n\x1anetwork_performance_config\x18\xe2\x97\xf8\xbd\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.NetworkPerformanceConfigH\x16\x88\x01\x01\x12?\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32\'.google.cloud.compute.v1.InstanceParamsH\x17\x88\x01\x01\x12*\n\x1aprivate_ipv6_google_access\x18\x8e\xcc\x82\x17 \x01(\tH\x18\x88\x01\x01\x12R\n\x14reservation_affinity\x18\xbb\xb8\xa2K \x01(\x0b\x32,.google.cloud.compute.v1.ReservationAffinityH\x19\x88\x01\x01\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12H\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\'.google.cloud.compute.v1.ResourceStatusH\x1a\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x1b\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x1c\x88\x01\x01\x12@\n\nscheduling\x18\x94\xcb\xb1\xb8\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SchedulingH\x1d\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x1e\x88\x01\x01\x12\x45\n\x10service_accounts\x18\xb0\xc4\xab\x84\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.ServiceAccount\x12Y\n\x18shielded_instance_config\x18\xb5\x8b\x91\x06 \x01(\x0b\x32/.google.cloud.compute.v1.ShieldedInstanceConfigH\x1f\x88\x01\x01\x12l\n\"shielded_instance_integrity_policy\x18\x97\xa2\x87N \x01(\x0b\x32\x38.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicyH \x88\x01\x01\x12$\n\x14source_machine_image\x18\xbf\xdc\xb0\n \x01(\tH!\x88\x01\x01\x12\x63\n#source_machine_image_encryption_key\x18\xa3\xfb\xf9[ \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\"\x88\x01\x01\x12 \n\x10start_restricted\x18\xd8\xd0\xfd: \x01(\x08H#\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH$\x88\x01\x01\x12\x1f\n\x0estatus_message\x18\xba\xc9\xe9\x8d\x01 \x01(\tH%\x88\x01\x01\x12\x33\n\x04tags\x18\x99\xe8\xd8\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.TagsH&\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\'\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8d\x01\n\x17KeyRevocationActionType\x12(\n$UNDEFINED_KEY_REVOCATION_ACTION_TYPE\x10\x00\x12.\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\xda\x91\xde\xde\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x0b\n\x04STOP\x10\x82\x80\x9c\x01\"\xc0\x01\n\x17PrivateIpv6GoogleAccess\x12(\n$UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS\x10\x00\x12-\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\xba\xca\x89\xcc\x01\x12+\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\xd7\xfa\xb6\x89\x01\x12\x1f\n\x17INHERIT_FROM_SUBNETWORK\x10\xbf\xa8\xec\xfc\x01\"\xdc\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x16\n\x0e\x44\x45PROVISIONING\x10\xee\x93\xc4\xcc\x01\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x11\n\tREPAIRING\x10\x95\x82\x95\xc5\x01\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x12\x0f\n\x07STAGING\x10\x9b\xc8\xc6\xcd\x01\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x12\x10\n\tSUSPENDED\x10\xbb\xbb\xb6\x18\x12\x12\n\nSUSPENDING\x10\xa6\xd4\x98\xf5\x01\x12\x11\n\nTERMINATED\x10\xa3\xf4\x9bwB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x0f\n\r_cpu_platformB\x15\n\x13_creation_timestampB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0e\n\x0c_fingerprintB\x0b\n\t_hostnameB\x05\n\x03_idB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x17\n\x15_last_start_timestampB\x16\n\x14_last_stop_timestampB\x1b\n\x19_last_suspended_timestampB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x07\n\x05_nameB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x17\n\x15_reservation_affinityB\x12\n\x10_resource_statusB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\r\n\x0b_schedulingB\x0c\n\n_self_linkB\x1b\n\x19_shielded_instance_configB%\n#_shielded_instance_integrity_policyB\x17\n\x15_source_machine_imageB&\n$_source_machine_image_encryption_keyB\x13\n\x11_start_restrictedB\t\n\x07_statusB\x11\n\x0f_status_messageB\x07\n\x05_tagsB\x07\n\x05_zone\"\xb9\x03\n\x16InstanceAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12L\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32:.google.cloud.compute.v1.InstanceAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aZ\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.compute.v1.InstancesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa9\x01\n\x17InstanceConsumptionData\x12R\n\x10\x63onsumption_info\x18\xd2\xe5\xe4\x45 \x01(\x0b\x32\x30.google.cloud.compute.v1.InstanceConsumptionInfoH\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x01\x88\x01\x01\x42\x13\n\x11_consumption_infoB\x0b\n\t_instance\"\xd0\x01\n\x17InstanceConsumptionInfo\x12\x1b\n\nguest_cpus\x18\xd2\xcb\xc8\xbb\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x0clocal_ssd_gb\x18\xca\x88\xff\x9c\x01 \x01(\x05H\x01\x88\x01\x01\x12\x19\n\tmemory_mb\x18\x93\x93\xa8\x37 \x01(\x05H\x02\x88\x01\x01\x12\x1e\n\rmin_node_cpus\x18\xbb\xa4\xa2\x97\x01 \x01(\x05H\x03\x88\x01\x01\x42\r\n\x0b_guest_cpusB\x0f\n\r_local_ssd_gbB\x0c\n\n_memory_mbB\x10\n\x0e_min_node_cpus\"\x95\x04\n\rInstanceGroup\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPort\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04size\x18\x81\xc0\xd7\x01 \x01(\x05H\t\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\n\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0b\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_linkB\x07\n\x05_sizeB\r\n\x0b_subnetworkB\x07\n\x05_zone\"\xc8\x03\n\x1bInstanceGroupAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12Q\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32?.google.cloud.compute.v1.InstanceGroupAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a_\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.compute.v1.InstanceGroupsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x02\n\x11InstanceGroupList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x38\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32&.google.cloud.compute.v1.InstanceGroup\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xfd\x12\n\x14InstanceGroupManager\x12\x65\n\x14\x61ll_instances_config\x18\x81\xae\xd8\x35 \x01(\x0b\x32?.google.cloud.compute.v1.InstanceGroupManagerAllInstancesConfigH\x00\x88\x01\x01\x12\x61\n\x15\x61uto_healing_policies\x18\x85\xe7\xe8\xd9\x01 \x03(\x0b\x32>.google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy\x12#\n\x12\x62\x61se_instance_name\x18\x87\x96\xc5\xb9\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\\\n\x0f\x63urrent_actions\x18\xb7\xc8\x9cN \x01(\x0b\x32;.google.cloud.compute.v1.InstanceGroupManagerActionsSummaryH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12Q\n\x13\x64istribution_policy\x18\xcd\xee\xf2\xfe\x01 \x01(\x0b\x32+.google.cloud.compute.v1.DistributionPolicyH\x05\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x06\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12s\n\x1binstance_flexibility_policy\x18\x82\x8e\xec\x0c \x01(\x0b\x32\x46.google.cloud.compute.v1.InstanceGroupManagerInstanceFlexibilityPolicyH\x08\x88\x01\x01\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tH\t\x88\x01\x01\x12p\n\x19instance_lifecycle_policy\x18\x91\xb4\xcd\xd5\x01 \x01(\x0b\x32\x44.google.cloud.compute.v1.InstanceGroupManagerInstanceLifecyclePolicyH\n\x88\x01\x01\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x0b\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x0c\x88\x01\x01\x12/\n\x1elist_managed_instances_results\x18\xb4\xa4\x95\x8d\x01 \x01(\tH\r\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0e\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPort\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0f\x88\x01\x01\x12`\n\x11resource_policies\x18\xe1\x9c\xcc\n \x01(\x0b\x32=.google.cloud.compute.v1.InstanceGroupManagerResourcePoliciesH\x10\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x11\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x12\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x13\x88\x01\x01\x12[\n\x0estandby_policy\x18\x84\x86\x8e\xee\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InstanceGroupManagerStandbyPolicyH\x14\x88\x01\x01\x12H\n\x0fstateful_policy\x18\x85\xc3\xd5\x16 \x01(\x0b\x32\'.google.cloud.compute.v1.StatefulPolicyH\x15\x88\x01\x01\x12K\n\x06status\x18\xf2\x9f\xb7V \x01(\x0b\x32\x33.google.cloud.compute.v1.InstanceGroupManagerStatusH\x16\x88\x01\x01\x12\x18\n\x0ctarget_pools\x18\xa9\x9f\xa0\xa0\x01 \x03(\t\x12\x1b\n\x0btarget_size\x18\xef\xf3\xfd\x1d \x01(\x05H\x17\x88\x01\x01\x12#\n\x13target_stopped_size\x18\xa1\xd6\x93\x01 \x01(\x05H\x18\x88\x01\x01\x12&\n\x15target_suspended_size\x18\xd3\x88\xf4\x92\x01 \x01(\x05H\x19\x88\x01\x01\x12X\n\rupdate_policy\x18\xe8\xca\xeaS \x01(\x0b\x32\x39.google.cloud.compute.v1.InstanceGroupManagerUpdatePolicyH\x1a\x88\x01\x01\x12I\n\x08versions\x18\x9b\xfd\xb9M \x03(\x0b\x32\x34.google.cloud.compute.v1.InstanceGroupManagerVersion\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x1b\x88\x01\x01\"n\n\x1bListManagedInstancesResults\x12,\n(UNDEFINED_LIST_MANAGED_INSTANCES_RESULTS\x10\x00\x12\x0f\n\x08PAGELESS\x10\xa8\xa9\xac\x0f\x12\x10\n\tPAGINATED\x10\xad\x85\x95\x13\x42\x17\n\x15_all_instances_configB\x15\n\x13_base_instance_nameB\x15\n\x13_creation_timestampB\x12\n\x10_current_actionsB\x0e\n\x0c_descriptionB\x16\n\x14_distribution_policyB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x1e\n\x1c_instance_flexibility_policyB\x11\n\x0f_instance_groupB\x1c\n\x1a_instance_lifecycle_policyB\x14\n\x12_instance_templateB\x07\n\x05_kindB!\n\x1f_list_managed_instances_resultsB\x07\n\x05_nameB\t\n\x07_regionB\x14\n\x12_resource_policiesB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x11\n\x0f_standby_policyB\x12\n\x10_stateful_policyB\t\n\x07_statusB\x0e\n\x0c_target_sizeB\x16\n\x14_target_stopped_sizeB\x18\n\x16_target_suspended_sizeB\x10\n\x0e_update_policyB\x07\n\x05_zone\"\xd3\x04\n\"InstanceGroupManagerActionsSummary\x12\x1b\n\nabandoning\x18\xcd\xf2\xe8\xd1\x01 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x08\x63reating\x18\xb9\xdd\x85\x64 \x01(\x05H\x01\x88\x01\x01\x12)\n\x18\x63reating_without_retries\x18\xc9\xf6\xb1\xb0\x01 \x01(\x05H\x02\x88\x01\x01\x12\x19\n\x08\x64\x65leting\x18\xa8\xc7\xef\x86\x01 \x01(\x05H\x03\x88\x01\x01\x12\x14\n\x04none\x18\xb8\xde\xce\x01 \x01(\x05H\x04\x88\x01\x01\x12\x1b\n\nrecreating\x18\xec\xb3\xd6\xa1\x01 \x01(\x05H\x05\x88\x01\x01\x12\x1a\n\nrefreshing\x18\xa7\xa6\xc5\x66 \x01(\x05H\x06\x88\x01\x01\x12\x1b\n\nrestarting\x18\xf3\x96\xc4\xb1\x01 \x01(\x05H\x07\x88\x01\x01\x12\x18\n\x08resuming\x18\xaa\x9b\xf2_ \x01(\x05H\x08\x88\x01\x01\x12\x18\n\x08starting\x18\xc0\xc0\xf3s \x01(\x05H\t\x88\x01\x01\x12\x18\n\x08stopping\x18\xf4\xf0\x8a\x32 \x01(\x05H\n\x88\x01\x01\x12\x1a\n\nsuspending\x18\xa6\xfc\xf0\r \x01(\x05H\x0b\x88\x01\x01\x12\x1a\n\tverifying\x18\xc9\xa1\xac\xd7\x01 \x01(\x05H\x0c\x88\x01\x01\x42\r\n\x0b_abandoningB\x0b\n\t_creatingB\x1b\n\x19_creating_without_retriesB\x0b\n\t_deletingB\x07\n\x05_noneB\r\n\x0b_recreatingB\r\n\x0b_refreshingB\r\n\x0b_restartingB\x0b\n\t_resumingB\x0b\n\t_startingB\x0b\n\t_stoppingB\r\n\x0b_suspendingB\x0c\n\n_verifying\"\xdd\x03\n\"InstanceGroupManagerAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12X\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x46.google.cloud.compute.v1.InstanceGroupManagerAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x66\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.compute.v1.InstanceGroupManagersScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x85\x01\n&InstanceGroupManagerAllInstancesConfig\x12L\n\nproperties\x18\xb3\x9a\xb6\x46 \x01(\x0b\x32\x30.google.cloud.compute.v1.InstancePropertiesPatchH\x00\x88\x01\x01\x42\r\n\x0b_properties\"\x90\x01\n%InstanceGroupManagerAutoHealingPolicy\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x11initial_delay_sec\x18\xda\xf0\xc0} \x01(\x05H\x01\x88\x01\x01\x42\x0f\n\r_health_checkB\x14\n\x12_initial_delay_sec\"\xc4\x02\n-InstanceGroupManagerInstanceFlexibilityPolicy\x12~\n\x13instance_selections\x18\xd1\x84\xf9\n \x03(\x0b\x32^.google.cloud.compute.v1.InstanceGroupManagerInstanceFlexibilityPolicy.InstanceSelectionsEntry\x1a\x92\x01\n\x17InstanceSelectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x66\n\x05value\x18\x02 \x01(\x0b\x32W.google.cloud.compute.v1.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection:\x02\x38\x01\"y\n>InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection\x12\x18\n\rmachine_types\x18\x81\xdd\x81& \x03(\t\x12\x14\n\x04rank\x18\xac\x98\xd5\x01 \x01(\x05H\x00\x88\x01\x01\x42\x07\n\x05_rank\"\xf1\x02\n+InstanceGroupManagerInstanceLifecyclePolicy\x12)\n\x19\x64\x65\x66\x61ult_action_on_failure\x18\xd5\xc4\xa2\x1d \x01(\tH\x00\x88\x01\x01\x12\'\n\x16\x66orce_update_on_repair\x18\xcb\xf9\xf2\xa9\x01 \x01(\tH\x01\x88\x01\x01\"d\n\x16\x44\x65\x66\x61ultActionOnFailure\x12\'\n#UNDEFINED_DEFAULT_ACTION_ON_FAILURE\x10\x00\x12\x12\n\nDO_NOTHING\x10\xf9\xcf\x99\xd7\x01\x12\r\n\x06REPAIR\x10\x8d\xa7\xfc~\"O\n\x13\x46orceUpdateOnRepair\x12$\n UNDEFINED_FORCE_UPDATE_ON_REPAIR\x10\x00\x12\x07\n\x02NO\x10\xc1\x13\x12\t\n\x03YES\x10\xc7\xad\x05\x42\x1c\n\x1a_default_action_on_failureB\x19\n\x17_force_update_on_repair\"\xb9\x02\n\x18InstanceGroupManagerList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManager\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8d\x06\n!InstanceGroupManagerResizeRequest\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x04\x88\x01\x01\x12I\n\x16requested_run_duration\x18\xf9\x8b\xd9n \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x05\x88\x01\x01\x12\x1a\n\tresize_by\x18\xc2\xcf\xc0\xfe\x01 \x01(\x05H\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x08\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\t\x88\x01\x01\x12X\n\x06status\x18\xf2\x9f\xb7V \x01(\x0b\x32@.google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatusH\n\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0b\x88\x01\x01\"\x8f\x01\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x10\n\tCANCELLED\x10\xb1\xf2\x80\x14\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x11\n\tSUCCEEDED\x10\xc1\xa4\xdb\xf3\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x19\n\x17_requested_run_durationB\x0c\n\n_resize_byB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x08\n\x06_stateB\t\n\x07_statusB\x07\n\x05_zone\"\xe7\x01\n\'InstanceGroupManagerResizeRequestStatus\x12\x35\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x1e.google.cloud.compute.v1.ErrorH\x00\x88\x01\x01\x12j\n\x0clast_attempt\x18\xa4\xac\xa8\xcf\x01 \x01(\x0b\x32K.google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatusLastAttemptH\x01\x88\x01\x01\x42\x08\n\x06_errorB\x0f\n\r_last_attempt\"u\n2InstanceGroupManagerResizeRequestStatusLastAttempt\x12\x35\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x1e.google.cloud.compute.v1.ErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xdc\x02\n.InstanceGroupManagerResizeRequestsListResponse\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12L\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32:.google.cloud.compute.v1.InstanceGroupManagerResizeRequest\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"[\n$InstanceGroupManagerResourcePolicies\x12\x1f\n\x0fworkload_policy\x18\xfa\x85\xda\x36 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_workload_policy\"\xbc\x01\n!InstanceGroupManagerStandbyPolicy\x12!\n\x11initial_delay_sec\x18\xda\xf0\xc0} \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x01\x88\x01\x01\"?\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\r\n\x06MANUAL\x10\xc6\xb7\xf7\x38\x12\x14\n\x0eSCALE_OUT_POOL\x10\x82\xe4&B\x14\n\x12_initial_delay_secB\x07\n\x05_mode\"\xd1\x03\n\x1aInstanceGroupManagerStatus\x12k\n\x14\x61ll_instances_config\x18\x81\xae\xd8\x35 \x01(\x0b\x32\x45.google.cloud.compute.v1.InstanceGroupManagerStatusAllInstancesConfigH\x00\x88\x01\x01\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\tis_stable\x18\xf0\xef\xd8\x33 \x01(\x08H\x02\x88\x01\x01\x12U\n\x08stateful\x18\xcc\xe6\xc8t \x01(\x0b\x32;.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulH\x03\x88\x01\x01\x12\x61\n\x0eversion_target\x18\xd8\xdd\xfe\x89\x01 \x01(\x0b\x32@.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTargetH\x04\x88\x01\x01\x42\x17\n\x15_all_instances_configB\r\n\x0b_autoscalerB\x0c\n\n_is_stableB\x0b\n\t_statefulB\x11\n\x0f_version_target\"\x8e\x01\n,InstanceGroupManagerStatusAllInstancesConfig\x12 \n\x10\x63urrent_revision\x18\xe1\x87\xa5\x12 \x01(\tH\x00\x88\x01\x01\x12\x19\n\teffective\x18\xa7\xd3\xd8\x43 \x01(\x08H\x01\x88\x01\x01\x42\x13\n\x11_current_revisionB\x0c\n\n_effective\"\xf0\x01\n\"InstanceGroupManagerStatusStateful\x12#\n\x13has_stateful_config\x18\xf0\xe7\xd6\x34 \x01(\x08H\x00\x88\x01\x01\x12t\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x01(\x0b\x32M.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigsH\x01\x88\x01\x01\x42\x16\n\x14_has_stateful_configB\x17\n\x15_per_instance_configs\"h\n4InstanceGroupManagerStatusStatefulPerInstanceConfigs\x12\x1e\n\rall_effective\x18\x89\x91\xa7\xf6\x01 \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_all_effective\"U\n\'InstanceGroupManagerStatusVersionTarget\x12\x1b\n\nis_reached\x18\xbd\xfe\xc8\xce\x01 \x01(\x08H\x00\x88\x01\x01\x42\r\n\x0b_is_reached\"\xdc\x06\n InstanceGroupManagerUpdatePolicy\x12-\n\x1cinstance_redistribution_type\x18\x98\xdf\xc4\x8b\x01 \x01(\tH\x00\x88\x01\x01\x12\x43\n\tmax_surge\x18\x93\xc9\xa3\x90\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FixedOrPercentH\x01\x88\x01\x01\x12I\n\x0fmax_unavailable\x18\xf5\xcb\x8b\xc1\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FixedOrPercentH\x02\x88\x01\x01\x12\x1f\n\x0eminimal_action\x18\x94\x8d\x82\x81\x01 \x01(\tH\x03\x88\x01\x01\x12.\n\x1emost_disruptive_allowed_action\x18\x8d\xce\xc2\x1f \x01(\tH\x04\x88\x01\x01\x12#\n\x12replacement_method\x18\xae\xcf\x9f\xf1\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x06\x88\x01\x01\"H\n\x1aInstanceRedistributionType\x12*\n&UNDEFINED_INSTANCE_REDISTRIBUTION_TYPE\x10\x00\"-\n\rMinimalAction\x12\x1c\n\x18UNDEFINED_MINIMAL_ACTION\x10\x00\"K\n\x1bMostDisruptiveAllowedAction\x12,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION\x10\x00\"[\n\x11ReplacementMethod\x12 \n\x1cUNDEFINED_REPLACEMENT_METHOD\x10\x00\x12\x10\n\x08RECREATE\x10\xef\xd9\x9b\xf9\x01\x12\x12\n\nSUBSTITUTE\x10\x9a\xa1\xfa\x85\x01\"1\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x15\n\rOPPORTUNISTIC\x10\xe9\xb7\xe8\xcc\x01\x42\x1f\n\x1d_instance_redistribution_typeB\x0c\n\n_max_surgeB\x12\n\x10_max_unavailableB\x11\n\x0f_minimal_actionB!\n\x1f_most_disruptive_allowed_actionB\x15\n\x13_replacement_methodB\x07\n\x05_type\"\xcc\x01\n\x1bInstanceGroupManagerVersion\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12\x44\n\x0btarget_size\x18\xef\xf3\xfd\x1d \x01(\x0b\x32\'.google.cloud.compute.v1.FixedOrPercentH\x02\x88\x01\x01\x42\x14\n\x12_instance_templateB\x07\n\x05_nameB\x0e\n\x0c_target_size\"D\n,InstanceGroupManagersAbandonInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"\xf5\x02\n(InstanceGroupManagersApplyUpdatesRequest\x12\x1e\n\rall_instances\x18\xe0\xba\xbe\xc0\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x1f\n\x0eminimal_action\x18\x94\x8d\x82\x81\x01 \x01(\tH\x01\x88\x01\x01\x12.\n\x1emost_disruptive_allowed_action\x18\x8d\xce\xc2\x1f \x01(\tH\x02\x88\x01\x01\"-\n\rMinimalAction\x12\x1c\n\x18UNDEFINED_MINIMAL_ACTION\x10\x00\"K\n\x1bMostDisruptiveAllowedAction\x12,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION\x10\x00\x42\x10\n\x0e_all_instancesB\x11\n\x0f_minimal_actionB!\n\x1f_most_disruptive_allowed_action\"o\n+InstanceGroupManagersCreateInstancesRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"\x9e\x01\n+InstanceGroupManagersDeleteInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x32\n\"skip_instances_on_validation_error\x18\xa1\xf6\xaf\x13 \x01(\x08H\x00\x88\x01\x01\x42%\n#_skip_instances_on_validation_error\"D\n0InstanceGroupManagersDeletePerInstanceConfigsReq\x12\x10\n\x05names\x18\xc8\xae\xef\x31 \x03(\t\"\xa4\x01\n\'InstanceGroupManagersListErrorsResponse\x12\x44\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x32.google.cloud.compute.v1.InstanceManagedByIgmError\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_next_page_token\"\xb1\x01\n1InstanceGroupManagersListManagedInstancesResponse\x12G\n\x11managed_instances\x18\xde\x9b\xa9\xa0\x01 \x03(\x0b\x32(.google.cloud.compute.v1.ManagedInstance\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_next_page_token\"\xeb\x01\n/InstanceGroupManagersListPerInstanceConfigsResp\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x01\x88\x01\x01\x42\x12\n\x10_next_page_tokenB\n\n\x08_warning\"\x7f\n/InstanceGroupManagersPatchPerInstanceConfigsReq\x12L\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"E\n-InstanceGroupManagersRecreateInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"C\n+InstanceGroupManagersResumeInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"\xbb\x01\n\x1fInstanceGroupManagersScopedList\x12Q\n\x17instance_group_managers\x18\x90\xfa\x89\x66 \x03(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManager\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"k\n/InstanceGroupManagersSetInstanceTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x00\x88\x01\x01\x42\x14\n\x12_instance_template\"s\n*InstanceGroupManagersSetTargetPoolsRequest\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0ctarget_pools\x18\xa9\x9f\xa0\xa0\x01 \x03(\tB\x0e\n\x0c_fingerprint\"B\n*InstanceGroupManagersStartInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"l\n)InstanceGroupManagersStopInstancesRequest\x12\x1a\n\nforce_stop\x18\xd6\xa1\xa1@ \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\tB\r\n\x0b_force_stop\"u\n,InstanceGroupManagersSuspendInstancesRequest\x12\x1d\n\rforce_suspend\x18\xe8\xed\x96\r \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\tB\x10\n\x0e_force_suspend\"\x80\x01\n0InstanceGroupManagersUpdatePerInstanceConfigsReq\x12L\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"e\n!InstanceGroupsAddInstancesRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.InstanceReference\"\xbe\x02\n\x1bInstanceGroupsListInstances\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x41\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32/.google.cloud.compute.v1.InstanceWithNamedPorts\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa1\x01\n\"InstanceGroupsListInstancesRequest\x12\x1e\n\x0einstance_state\x18\xe7\xf0\xfc+ \x01(\tH\x00\x88\x01\x01\"H\n\rInstanceState\x12\x1c\n\x18UNDEFINED_INSTANCE_STATE\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x42\x11\n\x0f_instance_state\"h\n$InstanceGroupsRemoveInstancesRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.InstanceReference\"\xa6\x01\n\x18InstanceGroupsScopedList\x12\x43\n\x0finstance_groups\x18\xbe\xc1\xdf\xae\x01 \x03(\x0b\x32&.google.cloud.compute.v1.InstanceGroup\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x8e\x01\n\"InstanceGroupsSetNamedPortsRequest\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPortB\x0e\n\x0c_fingerprint\"\xa1\x02\n\x0cInstanceList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.Instance\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x02\n\x15InstanceListReferrers\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x34\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\".google.cloud.compute.v1.Reference\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbc\x02\n\x19InstanceManagedByIgmError\x12]\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x46.google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceErrorH\x00\x88\x01\x01\x12q\n\x17instance_action_details\x18\xa3\xfc\xab\x8b\x01 \x01(\x0b\x32G.google.cloud.compute.v1.InstanceManagedByIgmErrorInstanceActionDetailsH\x01\x88\x01\x01\x12\x19\n\ttimestamp\x18\x96\xd2\xa4\x1a \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_errorB\x1a\n\x18_instance_action_detailsB\x0c\n\n_timestamp\"\xf0\x03\n.InstanceManagedByIgmErrorInstanceActionDetails\x12\x16\n\x06\x61\x63tion\x18\xb6\xfc\xbdY \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x01\x88\x01\x01\x12I\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\x0b\x32/.google.cloud.compute.v1.ManagedInstanceVersionH\x02\x88\x01\x01\"\x9c\x02\n\x06\x41\x63tion\x12\x14\n\x10UNDEFINED_ACTION\x10\x00\x12\x12\n\nABANDONING\x10\xcd\xca\x90\xb9\x01\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12 \n\x18\x43REATING_WITHOUT_RETRIES\x10\x89\xc6\xbe\xcc\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x12\n\nRECREATING\x10\xec\x8b\xfe\x88\x01\x12\x11\n\nREFRESHING\x10\xa7\xfe\xecM\x12\x12\n\nRESTARTING\x10\xf3\xee\xeb\x98\x01\x12\x10\n\x08RESUMING\x10\xaa\xfb\x89\xd5\x01\x12\x10\n\x08STARTING\x10\xc0\xa0\x8b\xe9\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x12\x12\n\nSUSPENDING\x10\xa6\xd4\x98\xf5\x01\x12\x10\n\tVERIFYING\x10\xa9\xc1\x8c\x08\x42\t\n\x07_actionB\x0b\n\t_instanceB\n\n\x08_version\"t\n-InstanceManagedByIgmErrorManagedInstanceError\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\n\n\x08_message\"\x82\x01\n\x13InstanceMoveRequest\x12 \n\x10\x64\x65stination_zone\x18\xbd\xe2\xef> \x01(\tH\x00\x88\x01\x01\x12 \n\x0ftarget_instance\x18\x83\x8f\x96\x8a\x01 \x01(\tH\x01\x88\x01\x01\x42\x13\n\x11_destination_zoneB\x12\n\x10_target_instance\"\xb1\x01\n\x0eInstanceParams\x12\x63\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32@.google.cloud.compute.v1.InstanceParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd8\x10\n\x12InstanceProperties\x12\\\n\x19\x61\x64vanced_machine_features\x18\xb2\xe7\xaa\xc3\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.AdvancedMachineFeaturesH\x00\x88\x01\x01\x12\x1f\n\x0e\x63\x61n_ip_forward\x18\xfc\x86\x84\xdf\x01 \x01(\x08H\x01\x88\x01\x01\x12\x62\n\x1c\x63onfidential_instance_config\x18\xf5\x92\xfa\xe9\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.ConfidentialInstanceConfigH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x37\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32%.google.cloud.compute.v1.AttachedDisk\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\x12*\n\x1akey_revocation_action_type\x18\xe2\xdc\xc0p \x01(\tH\x04\x88\x01\x01\x12K\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x37.google.cloud.compute.v1.InstanceProperties.LabelsEntry\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x05\x88\x01\x01\x12;\n\x08metadata\x18\xaf\xf6\xb5) \x01(\x0b\x32!.google.cloud.compute.v1.MetadataH\x06\x88\x01\x01\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x07\x88\x01\x01\x12H\n\x12network_interfaces\x18\x8b\xda\x92\x19 \x03(\x0b\x32).google.cloud.compute.v1.NetworkInterface\x12^\n\x1anetwork_performance_config\x18\xe2\x97\xf8\xbd\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.NetworkPerformanceConfigH\x08\x88\x01\x01\x12*\n\x1aprivate_ipv6_google_access\x18\x8e\xcc\x82\x17 \x01(\tH\t\x88\x01\x01\x12R\n\x14reservation_affinity\x18\xbb\xb8\xa2K \x01(\x0b\x32,.google.cloud.compute.v1.ReservationAffinityH\n\x88\x01\x01\x12g\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32\x44.google.cloud.compute.v1.InstanceProperties.ResourceManagerTagsEntry\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12@\n\nscheduling\x18\x94\xcb\xb1\xb8\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SchedulingH\x0b\x88\x01\x01\x12\x45\n\x10service_accounts\x18\xb0\xc4\xab\x84\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.ServiceAccount\x12Y\n\x18shielded_instance_config\x18\xb5\x8b\x91\x06 \x01(\x0b\x32/.google.cloud.compute.v1.ShieldedInstanceConfigH\x0c\x88\x01\x01\x12\x33\n\x04tags\x18\x99\xe8\xd8\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.TagsH\r\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8d\x01\n\x17KeyRevocationActionType\x12(\n$UNDEFINED_KEY_REVOCATION_ACTION_TYPE\x10\x00\x12.\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\xda\x91\xde\xde\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x0b\n\x04STOP\x10\x82\x80\x9c\x01\"\xc0\x01\n\x17PrivateIpv6GoogleAccess\x12(\n$UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS\x10\x00\x12-\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\xba\xca\x89\xcc\x01\x12+\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\xd7\xfa\xb6\x89\x01\x12\x1f\n\x17INHERIT_FROM_SUBNETWORK\x10\xbf\xa8\xec\xfc\x01\x42\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x0e\n\x0c_descriptionB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\x1d\n\x1b_private_ipv6_google_accessB\x17\n\x15_reservation_affinityB\r\n\x0b_schedulingB\x1b\n\x19_shielded_instance_configB\x07\n\x05_tags\"\xa0\x02\n\x17InstancePropertiesPatch\x12P\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32<.google.cloud.compute.v1.InstancePropertiesPatch.LabelsEntry\x12S\n\x08metadata\x18\xaf\xf6\xb5) \x03(\x0b\x32>.google.cloud.compute.v1.InstancePropertiesPatch.MetadataEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x11InstanceReference\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_instance\"\xd7\x01\n\x10InstanceSettings\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12K\n\x08metadata\x18\xaf\xf6\xb5) \x01(\x0b\x32\x31.google.cloud.compute.v1.InstanceSettingsMetadataH\x02\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x03\x88\x01\x01\x42\x0e\n\x0c_fingerprintB\x07\n\x05_kindB\x0b\n\t_metadataB\x07\n\x05_zone\"\xb7\x01\n\x18InstanceSettingsMetadata\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.InstanceSettingsMetadata.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x1a,\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05_kind\"\x9f\x04\n\x10InstanceTemplate\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x04\x88\x01\x01\x12G\n\nproperties\x18\xb3\x9a\xb6\x46 \x01(\x0b\x32+.google.cloud.compute.v1.InstancePropertiesH\x05\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12 \n\x0fsource_instance\x18\xb9\x98\xfd\xbc\x01 \x01(\tH\x08\x88\x01\x01\x12U\n\x16source_instance_params\x18\xcc\xd0\xc4@ \x01(\x0b\x32-.google.cloud.compute.v1.SourceInstanceParamsH\t\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_propertiesB\t\n\x07_regionB\x0c\n\n_self_linkB\x12\n\x10_source_instanceB\x19\n\x17_source_instance_params\"\xb8\x03\n\x1eInstanceTemplateAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12T\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x42.google.cloud.compute.v1.InstanceTemplateAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x62\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.compute.v1.InstanceTemplatesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb1\x02\n\x14InstanceTemplateList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.InstanceTemplate\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x01\n\x1bInstanceTemplatesScopedList\x12I\n\x12instance_templates\x18\x8f\xb8\xa5\xdb\x01 \x03(\x0b\x32).google.cloud.compute.v1.InstanceTemplate\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xfe\x02\n\x16InstanceWithNamedPorts\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x00\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPort\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x01\x88\x01\x01\"\xdc\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x16\n\x0e\x44\x45PROVISIONING\x10\xee\x93\xc4\xcc\x01\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x11\n\tREPAIRING\x10\x95\x82\x95\xc5\x01\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x12\x0f\n\x07STAGING\x10\x9b\xc8\xc6\xcd\x01\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x12\x10\n\tSUSPENDED\x10\xbb\xbb\xb6\x18\x12\x12\n\nSUSPENDING\x10\xa6\xd4\x98\xf5\x01\x12\x11\n\nTERMINATED\x10\xa3\xf4\x9bwB\x0b\n\t_instanceB\t\n\x07_status\"C\n#InstancesAddResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"\x8a\x02\n$InstancesBulkInsertOperationMetadata\x12t\n\x13per_location_status\x18\x9a\xe9\x84P \x03(\x0b\x32T.google.cloud.compute.v1.InstancesBulkInsertOperationMetadata.PerLocationStatusEntry\x1al\n\x16PerLocationStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.BulkInsertOperationStatus:\x02\x38\x01\"\xd8\x01\n&InstancesGetEffectiveFirewallsResponse\x12t\n\x10\x66irewall_policys\x18\xc2\xca\xfc\xc3\x01 \x03(\x0b\x32V.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x38\n\tfirewalls\x18\xf3\xc6\xe8\x81\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Firewall\"\xac\x04\n=InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x1c\n\x0c\x64isplay_name\x18\xe8\x87\x91\x02 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12O\n\x16packet_mirroring_rules\x18\xc4\xff\xc0\xfd\x01 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x02\x88\x01\x01\x12=\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x1b\n\nshort_name\x18\xee\xb8\xd0\xea\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x04\x88\x01\x01\"\x99\x01\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\tHIERARCHY\x10\x95\xc4\xaa!\x12\x0f\n\x07NETWORK\x10\x8e\xcc\xb3\xc5\x01\x12\x17\n\x10NETWORK_REGIONAL\x10\xb0\xe2\xfdZ\x12\x14\n\rSYSTEM_GLOBAL\x10\xb3\x97\xd4\x1c\x12\x16\n\x0fSYSTEM_REGIONAL\x10\xaf\x8c\x92M\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x0f\n\r_display_nameB\x07\n\x05_nameB\x0b\n\t_priorityB\r\n\x0b_short_nameB\x07\n\x05_type\"F\n&InstancesRemoveResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"\xc8\x02\n\"InstancesReportHostAsFaultyRequest\x12#\n\x13\x64isruption_schedule\x18\x83\xc5\xdb- \x01(\tH\x00\x88\x01\x01\x12`\n\rfault_reasons\x18\x92\xab\x91P \x03(\x0b\x32\x46.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason\"\x82\x01\n\x12\x44isruptionSchedule\x12!\n\x1dUNDEFINED_DISRUPTION_SCHEDULE\x10\x00\x12\'\n\x1f\x44ISRUPTION_SCHEDULE_UNSPECIFIED\x10\xdb\xee\xc8\x9e\x01\x12\x0e\n\x06\x46UTURE\x10\xc3\x83\xa2\xe2\x01\x12\x10\n\tIMMEDIATE\x10\x91\x8f\xf3HB\x16\n\x14_disruption_schedule\"\x9b\x02\n-InstancesReportHostAsFaultyRequestFaultReason\x12\x19\n\x08\x62\x65havior\x18\xd2\xe4\xba\xd0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\"\x93\x01\n\x08\x42\x65havior\x12\x16\n\x12UNDEFINED_BEHAVIOR\x10\x00\x12\x1b\n\x14\x42\x45HAVIOR_UNSPECIFIED\x10\xaa\xe9\xf0(\x12\x12\n\x0bPERFORMANCE\x10\x90\xc8\xda@\x12\x1d\n\x16SILENT_DATA_CORRUPTION\x10\xa6\xf5\x8c\x35\x12\x1f\n\x17UNRECOVERABLE_GPU_ERROR\x10\x9b\x92\xb7\xad\x01\x42\x0b\n\t_behaviorB\x0e\n\x0c_description\"\x95\x01\n\x13InstancesScopedList\x12\x37\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32!.google.cloud.compute.v1.Instance\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xd7\x01\n\x19InstancesSetLabelsRequest\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x00\x88\x01\x01\x12R\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32>.google.cloud.compute.v1.InstancesSetLabelsRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_label_fingerprint\"q\n#InstancesSetMachineResourcesRequest\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\"O\n\x1eInstancesSetMachineTypeRequest\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_machine_type\"Z\n!InstancesSetMinCpuPlatformRequest\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_min_cpu_platform\"h\n\x17InstancesSetNameRequest\x12\x1d\n\x0c\x63urrent_name\x18\x91\xf3\xab\xbc\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x0f\n\r_current_nameB\x07\n\x05_name\"w\n!InstancesSetSecurityPolicyRequest\x12\x1d\n\x12network_interfaces\x18\x8b\xda\x92\x19 \x03(\t\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_security_policy\"W\n!InstancesSetServiceAccountRequest\x12\x15\n\x05\x65mail\x18\x9c\x97\x89. \x01(\tH\x00\x88\x01\x01\x12\x11\n\x06scopes\x18\x9f\x99\x92O \x03(\tB\x08\n\x06_email\"w\n&InstancesStartWithEncryptionKeyRequest\x12M\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32;.google.cloud.compute.v1.CustomerEncryptionKeyProtectedDisk\"\xc1\t\n\x0fInstantSnapshot\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x06\x88\x01\x01\x12H\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x34.google.cloud.compute.v1.InstantSnapshot.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12W\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x36.google.cloud.compute.v1.InstantSnapshotResourceStatusH\t\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\n\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1f\n\x0esource_disk_id\x18\xd9\xcd\xc9\xd8\x01 \x01(\tH\x0f\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x10\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x11\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"u\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x13\n\x0bUNAVAILABLE\x10\xb0\xd8\xa5\xc5\x01\x42\x0f\n\r_architectureB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0f\n\r_disk_size_gbB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\t\n\x07_regionB\x12\n\x10_resource_statusB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x0e\n\x0c_source_diskB\x11\n\x0f_source_disk_idB\t\n\x07_statusB\x07\n\x05_zone\"\xce\x03\n\x1dInstantSnapshotAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.InstantSnapshotAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.InstantSnapshotsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x02\n\x13InstantSnapshotList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.InstantSnapshot\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"[\n\x1dInstantSnapshotResourceStatus\x12#\n\x12storage_size_bytes\x18\xf1\x8d\xe6\xb8\x01 \x01(\x03H\x00\x88\x01\x01\x42\x15\n\x13_storage_size_bytes\"\xac\x01\n\x1aInstantSnapshotsScopedList\x12G\n\x11instant_snapshots\x18\xd1\xbc\x97\x9d\x01 \x03(\x0b\x32(.google.cloud.compute.v1.InstantSnapshot\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"h\n\x0fInt64RangeMatch\x12\x1a\n\trange_end\x18\xd9\x95\xe0\x99\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1b\n\x0brange_start\x18\xe0\xfd\xa2\x31 \x01(\x03H\x01\x88\x01\x01\x42\x0c\n\n_range_endB\x0e\n\x0c_range_start\"\xe0\x10\n\x0cInterconnect\x12\x1e\n\radmin_enabled\x18\xd1\xec\xc1\xd4\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1e\n\x12\x61vailable_features\x18\xf3\xb9\xd6\xec\x01 \x03(\t\x12J\n\rcircuit_infos\x18\xaf\x83\xcdN \x03(\x0b\x32\x30.google.cloud.compute.v1.InterconnectCircuitInfo\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rcustomer_name\x18\xcc\xdc\xdf\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12T\n\x10\x65xpected_outages\x18\x9b\xea\x8e~ \x03(\x0b\x32\x37.google.cloud.compute.v1.InterconnectOutageNotification\x12\"\n\x11google_ip_address\x18\xa2\x85\xa5\xd3\x01 \x01(\tH\x04\x88\x01\x01\x12$\n\x13google_reference_id\x18\xd5\xb5\x8a\xff\x01 \x01(\tH\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12$\n\x18interconnect_attachments\x18\xff\xd2\xeb\xca\x01 \x03(\t\x12\"\n\x11interconnect_type\x18\xcb\x98\xd3\xf5\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\t\x88\x01\x01\x12\x45\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x31.google.cloud.compute.v1.Interconnect.LabelsEntry\x12\x1a\n\tlink_type\x18\xdf\x88\xbe\xf9\x01 \x01(\tH\n\x88\x01\x01\x12\x19\n\x08location\x18\xb5\xbf\xbe\x8a\x01 \x01(\tH\x0b\x88\x01\x01\x12\x44\n\x06macsec\x18\xa2\xc1\x97\xfc\x01 \x01(\x0b\x32+.google.cloud.compute.v1.InterconnectMacsecH\x0c\x88\x01\x01\x12\x1e\n\x0emacsec_enabled\x18\xa4\xa1\xcd\\ \x01(\x08H\r\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0e\x88\x01\x01\x12!\n\x11noc_contact_email\x18\x80\xf8\xda\x06 \x01(\tH\x0f\x88\x01\x01\x12\"\n\x12operational_status\x18\xff\xb1\xf0_ \x01(\tH\x10\x88\x01\x01\x12\x1f\n\x0fpeer_ip_address\x18\xd9\x97\x87\x63 \x01(\tH\x11\x88\x01\x01\x12\'\n\x16provisioned_link_count\x18\xf5\xd2\xf6\xc3\x01 \x01(\x05H\x12\x88\x01\x01\x12 \n\x0fremote_location\x18\x8e\x8f\xd7\x9a\x01 \x01(\tH\x13\x88\x01\x01\x12\x1e\n\x12requested_features\x18\xee\xf3\xf7\xdb\x01 \x03(\t\x12$\n\x14requested_link_count\x18\xfb\xdb\xbd\x15 \x01(\x05H\x14\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x15\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x16\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x17\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x11\x41vailableFeatures\x12 \n\x1cUNDEFINED_AVAILABLE_FEATURES\x10\x00\"j\n\x10InterconnectType\x12\x1f\n\x1bUNDEFINED_INTERCONNECT_TYPE\x10\x00\x12\x10\n\tDEDICATED\x10\xcf\x9b\x9c{\x12\x12\n\nIT_PRIVATE\x10\xcf\x8c\x88\xa0\x01\x12\x0f\n\x07PARTNER\x10\xa8\xd1\xa1\xdc\x01\"\x8d\x01\n\x08LinkType\x12\x17\n\x13UNDEFINED_LINK_TYPE\x10\x00\x12\"\n\x1aLINK_TYPE_ETHERNET_100G_LR\x10\xe7\xf2\x81\xa1\x01\x12 \n\x19LINK_TYPE_ETHERNET_10G_LR\x10\xa5\xb9\xf1p\x12\"\n\x1bLINK_TYPE_ETHERNET_400G_LR4\x10\xca\xf4\xc8<\"`\n\x11OperationalStatus\x12 \n\x1cUNDEFINED_OPERATIONAL_STATUS\x10\x00\x12\x10\n\tOS_ACTIVE\x10\xc1\xfb\xc8\x1a\x12\x17\n\x10OS_UNPROVISIONED\x10\xc0\xc1\xaar\"5\n\x11RequestedFeatures\x12 \n\x1cUNDEFINED_REQUESTED_FEATURES\x10\x00\"C\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x15\n\rUNPROVISIONED\x10\xdb\xc7\xd7\xf6\x01\x42\x10\n\x0e_admin_enabledB\x15\n\x13_creation_timestampB\x10\n\x0e_customer_nameB\x0e\n\x0c_descriptionB\x14\n\x12_google_ip_addressB\x16\n\x14_google_reference_idB\x05\n\x03_idB\x14\n\x12_interconnect_typeB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x0c\n\n_link_typeB\x0b\n\t_locationB\t\n\x07_macsecB\x11\n\x0f_macsec_enabledB\x07\n\x05_nameB\x14\n\x12_noc_contact_emailB\x15\n\x13_operational_statusB\x12\n\x10_peer_ip_addressB\x19\n\x17_provisioned_link_countB\x12\n\x10_remote_locationB\x17\n\x15_requested_link_countB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x08\n\x06_state\"\xdc\x19\n\x16InterconnectAttachment\x12\x1e\n\radmin_enabled\x18\xd1\xec\xc1\xd4\x01 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\tbandwidth\x18\xb1\x81\xd3V \x01(\tH\x01\x88\x01\x01\x12!\n\x16\x63\x61ndidate_ipv6_subnets\x18\x9a\x8f\xda! \x03(\t\x12\x1c\n\x11\x63\x61ndidate_subnets\x18\xfa\xe3\xb4q \x03(\t\x12(\n\x17\x63loud_router_ip_address\x18\x88\x88\x85\x89\x01 \x01(\tH\x02\x88\x01\x01\x12*\n\x19\x63loud_router_ipv6_address\x18\xc8\x93\xbf\xd7\x01 \x01(\tH\x03\x88\x01\x01\x12/\n\x1e\x63loud_router_ipv6_interface_id\x18\x8d\xc9\xc8\xf8\x01 \x01(\tH\x04\x88\x01\x01\x12r\n\x19\x63onfiguration_constraints\x18\xed\xf0\xd6U \x01(\x0b\x32G.google.cloud.compute.v1.InterconnectAttachmentConfigurationConstraintsH\x05\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x06\x88\x01\x01\x12+\n\x1a\x63ustomer_router_ip_address\x18\xf1\xda\xc4\x9e\x01 \x01(\tH\x07\x88\x01\x01\x12-\n\x1c\x63ustomer_router_ipv6_address\x18\xf1\xf9\xab\x8a\x01 \x01(\tH\x08\x88\x01\x01\x12\x32\n!customer_router_ipv6_interface_id\x18\x84\x86\xd6\xb5\x01 \x01(\tH\t\x88\x01\x01\x12!\n\x11\x64\x61taplane_version\x18\x8b\xad\xd3\x10 \x01(\x05H\n\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x0b\x88\x01\x01\x12(\n\x18\x65\x64ge_availability_domain\x18\xa6\x95\xff! \x01(\tH\x0c\x88\x01\x01\x12\x1a\n\nencryption\x18\x83\x9f\xdc. \x01(\tH\r\x88\x01\x01\x12$\n\x13google_reference_id\x18\xd5\xb5\x8a\xff\x01 \x01(\tH\x0e\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x0f\x88\x01\x01\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tH\x10\x88\x01\x01\x12$\n\x18ipsec_internal_addresses\x18\xb5\xf2\xb0\xc2\x01 \x03(\t\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x11\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x12\x88\x01\x01\x12O\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32;.google.cloud.compute.v1.InterconnectAttachment.LabelsEntry\x12\x12\n\x03mtu\x18\xae\xcf\x06 \x01(\x05H\x13\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x14\x88\x01\x01\x12\"\n\x12operational_status\x18\xff\xb1\xf0_ \x01(\tH\x15\x88\x01\x01\x12\x1c\n\x0bpairing_key\x18\xe8\xf0\xd4\xd1\x01 \x01(\tH\x16\x88\x01\x01\x12\x1c\n\x0bpartner_asn\x18\x85\xc5\xf7\xd0\x01 \x01(\x03H\x17\x88\x01\x01\x12`\n\x10partner_metadata\x18\xc6\xe1\xb6\x1f \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectAttachmentPartnerMetadataH\x18\x88\x01\x01\x12\x65\n\x19private_interconnect_info\x18\x83\xec\x91q \x01(\x0b\x32:.google.cloud.compute.v1.InterconnectAttachmentPrivateInfoH\x19\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x1a\x88\x01\x01\x12\x1f\n\x0eremote_service\x18\xbc\xff\xf2\xba\x01 \x01(\tH\x1b\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tH\x1c\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x1d\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x1e\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\x1f\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH \x88\x01\x01\x12\x1e\n\rsubnet_length\x18\x88\xc4\xb7\x85\x01 \x01(\x05H!\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\"\x88\x01\x01\x12\x1d\n\rvlan_tag8021q\x18\x9c\xe8\x97\x39 \x01(\x05H#\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfe\x01\n\tBandwidth\x12\x17\n\x13UNDEFINED_BANDWIDTH\x10\x00\x12\x0f\n\x08\x42PS_100G\x10\xb0\x95\xd0\x17\x12\x0f\n\x08\x42PS_100M\x10\xb6\x95\xd0\x17\x12\x0f\n\x07\x42PS_10G\x10\x8e\x89\xf2\x84\x01\x12\x0e\n\x06\x42PS_1G\x10\xf0\xad\xb9\xa9\x01\x12\x0f\n\x08\x42PS_200M\x10\x95\xfe\xd1\x17\x12\x0f\n\x07\x42PS_20G\x10\xcf\x90\xf2\x84\x01\x12\x0e\n\x06\x42PS_2G\x10\x8f\xae\xb9\xa9\x01\x12\x0f\n\x08\x42PS_300M\x10\xf4\xe6\xd3\x17\x12\x0f\n\x08\x42PS_400M\x10\xd3\xcf\xd5\x17\x12\x0f\n\x08\x42PS_500M\x10\xb2\xb8\xd7\x17\x12\x0f\n\x07\x42PS_50G\x10\x92\xa7\xf2\x84\x01\x12\x0f\n\x07\x42PS_50M\x10\x98\xa7\xf2\x84\x01\x12\x0e\n\x06\x42PS_5G\x10\xec\xae\xb9\xa9\x01\"\x9f\x01\n\x16\x45\x64geAvailabilityDomain\x12&\n\"UNDEFINED_EDGE_AVAILABILITY_DOMAIN\x10\x00\x12\x1d\n\x15\x41VAILABILITY_DOMAIN_1\x10\xda\xfb\xd6\xa6\x01\x12\x1d\n\x15\x41VAILABILITY_DOMAIN_2\x10\xdb\xfb\xd6\xa6\x01\x12\x1f\n\x17\x41VAILABILITY_DOMAIN_ANY\x10\xb5\xea\xf7\xb2\x01\"A\n\nEncryption\x12\x18\n\x14UNDEFINED_ENCRYPTION\x10\x00\x12\x0c\n\x05IPSEC\x10\xaa\xa3\xa9!\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\"`\n\x11OperationalStatus\x12 \n\x1cUNDEFINED_OPERATIONAL_STATUS\x10\x00\x12\x10\n\tOS_ACTIVE\x10\xc1\xfb\xc8\x1a\x12\x17\n\x10OS_UNPROVISIONED\x10\xc0\xc1\xaar\"I\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\"\xc2\x01\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x07\x44\x45\x46UNCT\x10\xaf\xbc\xa1\x37\x12 \n\x18PARTNER_REQUEST_RECEIVED\x10\xe8\xf0\xf2\xf4\x01\x12\x17\n\x10PENDING_CUSTOMER\x10\xa6\x83\xefO\x12\x17\n\x0fPENDING_PARTNER\x10\xe0\xfb\xfa\xb8\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x15\n\rUNPROVISIONED\x10\xdb\xc7\xd7\xf6\x01\"W\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\tDEDICATED\x10\xcf\x9b\x9c{\x12\x0f\n\x07PARTNER\x10\xa8\xd1\xa1\xdc\x01\x12\x18\n\x10PARTNER_PROVIDER\x10\xa8\xf7\xb7\xe6\x01\x42\x10\n\x0e_admin_enabledB\x0c\n\n_bandwidthB\x1a\n\x18_cloud_router_ip_addressB\x1c\n\x1a_cloud_router_ipv6_addressB!\n\x1f_cloud_router_ipv6_interface_idB\x1c\n\x1a_configuration_constraintsB\x15\n\x13_creation_timestampB\x1d\n\x1b_customer_router_ip_addressB\x1f\n\x1d_customer_router_ipv6_addressB$\n\"_customer_router_ipv6_interface_idB\x14\n\x12_dataplane_versionB\x0e\n\x0c_descriptionB\x1b\n\x19_edge_availability_domainB\r\n\x0b_encryptionB\x16\n\x14_google_reference_idB\x05\n\x03_idB\x0f\n\r_interconnectB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x06\n\x04_mtuB\x07\n\x05_nameB\x15\n\x13_operational_statusB\x0e\n\x0c_pairing_keyB\x0e\n\x0c_partner_asnB\x13\n\x11_partner_metadataB\x1c\n\x1a_private_interconnect_infoB\t\n\x07_regionB\x11\n\x0f_remote_serviceB\t\n\x07_routerB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\r\n\x0b_stack_typeB\x08\n\x06_stateB\x10\n\x0e_subnet_lengthB\x07\n\x05_typeB\x10\n\x0e_vlan_tag8021q\"\xe3\x03\n$InterconnectAttachmentAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12Z\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32H.google.cloud.compute.v1.InterconnectAttachmentAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1ah\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12I\n\x05value\x18\x02 \x01(\x0b\x32:.google.cloud.compute.v1.InterconnectAttachmentsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb3\x02\n.InterconnectAttachmentConfigurationConstraints\x12\x18\n\x07\x62gp_md5\x18\x8a\xe8\xf3\xb1\x01 \x01(\tH\x00\x88\x01\x01\x12w\n\x13\x62gp_peer_asn_ranges\x18\x82\xbb\xf9\xe2\x01 \x03(\x0b\x32V.google.cloud.compute.v1.InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange\"b\n\x06\x42gpMd5\x12\x15\n\x11UNDEFINED_BGP_MD5\x10\x00\x12\x14\n\x0cMD5_OPTIONAL\x10\x81\xa2\xe0\xfd\x01\x12\x13\n\x0cMD5_REQUIRED\x10\xc0\xe2\xfbg\x12\x16\n\x0fMD5_UNSUPPORTED\x10\xd4\xe1\xbb)B\n\n\x08_bgp_md5\"w\n=InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange\x12\x12\n\x03max\x18\xe4\xca\x06 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x03min\x18\xd2\xcc\x06 \x01(\rH\x01\x88\x01\x01\x42\x06\n\x04_maxB\x06\n\x04_min\"\xbd\x02\n\x1aInterconnectAttachmentList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x41\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32/.google.cloud.compute.v1.InterconnectAttachment\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbc\x01\n%InterconnectAttachmentPartnerMetadata\x12\"\n\x11interconnect_name\x18\x9c\xef\xc6\xf5\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cpartner_name\x18\xa2\xa7\x90M \x01(\tH\x01\x88\x01\x01\x12\x1b\n\nportal_url\x18\x9c\xce\xad\x80\x01 \x01(\tH\x02\x88\x01\x01\x42\x14\n\x12_interconnect_nameB\x0f\n\r_partner_nameB\r\n\x0b_portal_url\"K\n!InterconnectAttachmentPrivateInfo\x12\x19\n\x08tag8021q\x18\xc0\xd1\xce\x81\x01 \x01(\rH\x00\x88\x01\x01\x42\x0b\n\t_tag8021q\"\xc1\x01\n!InterconnectAttachmentsScopedList\x12U\n\x18interconnect_attachments\x18\xff\xd2\xeb\xca\x01 \x03(\x0b\x32/.google.cloud.compute.v1.InterconnectAttachment\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xc5\x01\n\x17InterconnectCircuitInfo\x12\"\n\x12\x63ustomer_demarc_id\x18\x93\x8c\xdc\r \x01(\tH\x00\x88\x01\x01\x12!\n\x11google_circuit_id\x18\xf7\x8d\xf8| \x01(\tH\x01\x88\x01\x01\x12!\n\x10google_demarc_id\x18\xae\xdd\xdb\xd5\x01 \x01(\tH\x02\x88\x01\x01\x42\x15\n\x13_customer_demarc_idB\x14\n\x12_google_circuit_idB\x13\n\x11_google_demarc_id\"\x95\x05\n\x17InterconnectDiagnostics\x12P\n\narp_caches\x18\x91\xd6\xd8\xc5\x01 \x03(\x0b\x32\x38.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry\x12(\n\x17\x62undle_aggregation_type\x18\x94\xc9\xb2\xcf\x01 \x01(\tH\x00\x88\x01\x01\x12)\n\x19\x62undle_operational_status\x18\xdc\x97\xe0\x32 \x01(\tH\x01\x88\x01\x01\x12L\n\x05links\x18\xb9\x9f\x8d\x31 \x03(\x0b\x32:.google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus\x12\x1c\n\x0bmac_address\x18\x84\xd2\xc8\x9e\x01 \x01(\tH\x02\x88\x01\x01\"\x8a\x01\n\x15\x42undleAggregationType\x12%\n!UNDEFINED_BUNDLE_AGGREGATION_TYPE\x10\x00\x12#\n\x1c\x42UNDLE_AGGREGATION_TYPE_LACP\x10\xcd\xa2\x9e\r\x12%\n\x1e\x42UNDLE_AGGREGATION_TYPE_STATIC\x10\xd9\x98\x95\x18\"\x8f\x01\n\x17\x42undleOperationalStatus\x12\'\n#UNDEFINED_BUNDLE_OPERATIONAL_STATUS\x10\x00\x12&\n\x1e\x42UNDLE_OPERATIONAL_STATUS_DOWN\x10\x85\xae\xb4\xd8\x01\x12#\n\x1c\x42UNDLE_OPERATIONAL_STATUS_UP\x10\xbe\x83\xf9LB\x1a\n\x18_bundle_aggregation_typeB\x1c\n\x1a_bundle_operational_statusB\x0e\n\x0c_mac_address\"{\n\x1fInterconnectDiagnosticsARPEntry\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bmac_address\x18\x84\xd2\xc8\x9e\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_ip_addressB\x0e\n\x0c_mac_address\"\xfa\x01\n%InterconnectDiagnosticsLinkLACPStatus\x12 \n\x10google_system_id\x18\xa5\x85\xbf+ \x01(\tH\x00\x88\x01\x01\x12#\n\x12neighbor_system_id\x18\x9e\x98\xf9\xa3\x01 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x02\x88\x01\x01\"=\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0f\n\x08\x44\x45TACHED\x10\xf2\xf6\xa1gB\x13\n\x11_google_system_idB\x15\n\x13_neighbor_system_idB\x08\n\x06_state\"\xe3\x01\n\'InterconnectDiagnosticsLinkOpticalPower\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\x02H\x01\x88\x01\x01\"v\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x12\n\nHIGH_ALARM\x10\xd4\xf2\xcd\x91\x01\x12\x13\n\x0cHIGH_WARNING\x10\xdf\xeb\xafi\x12\x11\n\tLOW_ALARM\x10\xe6\xaa\xff\x96\x01\x12\x13\n\x0bLOW_WARNING\x10\xf1\xaa\xc6\xa1\x01\x12\x07\n\x02OK\x10\xdc\x13\x42\x08\n\x06_stateB\x08\n\x06_value\"\xf1\x06\n!InterconnectDiagnosticsLinkStatus\x12P\n\narp_caches\x18\x91\xd6\xd8\xc5\x01 \x03(\x0b\x32\x38.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry\x12\x1a\n\ncircuit_id\x18\xb1\xfa\xafk \x01(\tH\x00\x88\x01\x01\x12\x1c\n\rgoogle_demarc\x18\x8c\x8f\x03 \x01(\tH\x01\x88\x01\x01\x12\\\n\x0blacp_status\x18\xaf\xc4\x9e\xac\x01 \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectDiagnosticsLinkLACPStatusH\x02\x88\x01\x01\x12U\n\x06macsec\x18\xa2\xc1\x97\xfc\x01 \x01(\x0b\x32<.google.cloud.compute.v1.InterconnectDiagnosticsMacsecStatusH\x03\x88\x01\x01\x12\"\n\x12operational_status\x18\xff\xb1\xf0_ \x01(\tH\x04\x88\x01\x01\x12i\n\x17receiving_optical_power\x18\xdf\xad\xd8t \x01(\x0b\x32@.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPowerH\x05\x88\x01\x01\x12m\n\x1atransmitting_optical_power\x18\x9d\xba\x89\xdb\x01 \x01(\x0b\x32@.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPowerH\x06\x88\x01\x01\"\x7f\n\x11OperationalStatus\x12 \n\x1cUNDEFINED_OPERATIONAL_STATUS\x10\x00\x12$\n\x1cLINK_OPERATIONAL_STATUS_DOWN\x10\xfd\xe4\xa6\x86\x01\x12\"\n\x1aLINK_OPERATIONAL_STATUS_UP\x10\xb6\xb6\xed\x91\x01\x42\r\n\x0b_circuit_idB\x10\n\x0e_google_demarcB\x0e\n\x0c_lacp_statusB\t\n\x07_macsecB\x15\n\x13_operational_statusB\x1a\n\x18_receiving_optical_powerB\x1d\n\x1b_transmitting_optical_power\"n\n#InterconnectDiagnosticsMacsecStatus\x12\x12\n\x03\x63kn\x18\x86\x82\x06 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0boperational\x18\xd2\xc7\xec= \x01(\x08H\x01\x88\x01\x01\x42\x06\n\x04_cknB\x0e\n\x0c_operational\"\xa9\x02\n\x10InterconnectList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x37\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32%.google.cloud.compute.v1.Interconnect\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xfa\n\n\x14InterconnectLocation\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x11\x61vailability_zone\x18\x90\xd0\xc7K \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x12\x61vailable_features\x18\xf3\xb9\xd6\xec\x01 \x03(\t\x12 \n\x14\x61vailable_link_types\x18\xaa\xd6\xf9\xf2\x01 \x03(\t\x12\x14\n\x04\x63ity\x18\xeb\xb2\xba\x01 \x01(\tH\x02\x88\x01\x01\x12\x19\n\tcontinent\x18\xb4\xdb\xd0? \x01(\tH\x03\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\"\n\x11\x66\x61\x63ility_provider\x18\x8d\xa0\xa6\xfe\x01 \x01(\tH\x06\x88\x01\x01\x12-\n\x1d\x66\x61\x63ility_provider_facility_id\x18\x85\xbe\xce) \x01(\tH\x07\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x08\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12&\n\x15peeringdb_facility_id\x18\xb6\xba\xed\xff\x01 \x01(\tH\x0b\x88\x01\x01\x12Q\n\x0cregion_infos\x18\xfa\xe8\xee\x94\x01 \x03(\x0b\x32\x37.google.cloud.compute.v1.InterconnectLocationRegionInfo\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0csupports_pzs\x18\xee\xf6\x85( \x01(\x08H\x0e\x88\x01\x01\"H\n\x11\x41vailableFeatures\x12 \n\x1cUNDEFINED_AVAILABLE_FEATURES\x10\x00\x12\x11\n\tIF_MACSEC\x10\x84\xfc\xfa\xbc\x01\"\xa2\x01\n\x12\x41vailableLinkTypes\x12\"\n\x1eUNDEFINED_AVAILABLE_LINK_TYPES\x10\x00\x12\"\n\x1aLINK_TYPE_ETHERNET_100G_LR\x10\xe7\xf2\x81\xa1\x01\x12 \n\x19LINK_TYPE_ETHERNET_10G_LR\x10\xa5\xb9\xf1p\x12\"\n\x1bLINK_TYPE_ETHERNET_400G_LR4\x10\xca\xf4\xc8<\"\xea\x01\n\tContinent\x12\x17\n\x13UNDEFINED_CONTINENT\x10\x00\x12\x0e\n\x06\x41\x46RICA\x10\xfa\x9c\xaf\x97\x01\x12\x0f\n\x08\x41SIA_PAC\x10\xfd\xf6\x8e\x39\x12\x0f\n\x08\x43_AFRICA\x10\xf6\x93\xaa\"\x12\x12\n\nC_ASIA_PAC\x10\xf9\x8f\x86\xde\x01\x12\x0f\n\x08\x43_EUROPE\x10\x9e\xca\xc5_\x12\x17\n\x0f\x43_NORTH_AMERICA\x10\x98\x9b\xbb\x83\x01\x12\x17\n\x0f\x43_SOUTH_AMERICA\x10\xe0\x8c\xb0\xbd\x01\x12\x0e\n\x06\x45UROPE\x10\xa2\xd3\xca\xd4\x01\x12\x15\n\rNORTH_AMERICA\x10\x94\xd9\xd0\xd5\x01\x12\x14\n\rSOUTH_AMERICA\x10\xdc\xca\xc5\x0f\"A\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x11\n\tAVAILABLE\x10\xa9\xb5\xe6\xd2\x01\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x42\n\n\x08_addressB\x14\n\x12_availability_zoneB\x07\n\x05_cityB\x0c\n\n_continentB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x14\n\x12_facility_providerB \n\x1e_facility_provider_facility_idB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x18\n\x16_peeringdb_facility_idB\x0c\n\n_self_linkB\t\n\x07_statusB\x0f\n\r_supports_pzs\"\xb9\x02\n\x18InterconnectLocationList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.InterconnectLocation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xba\x02\n\x1eInterconnectLocationRegionInfo\x12 \n\x0f\x65xpected_rtt_ms\x18\xfa\x83\xbe\xc9\x01 \x01(\x03H\x00\x88\x01\x01\x12!\n\x11location_presence\x18\xc5\x94\xb4\x30 \x01(\tH\x01\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x02\x88\x01\x01\"\x85\x01\n\x10LocationPresence\x12\x1f\n\x1bUNDEFINED_LOCATION_PRESENCE\x10\x00\x12\x0e\n\x06GLOBAL\x10\xa3\xef\xef\xeb\x01\x12\x14\n\x0cLOCAL_REGION\x10\xe8\xec\xb5\xc0\x01\x12\x11\n\tLP_GLOBAL\x10\xbe\xdd\xeb\xcc\x01\x12\x17\n\x0fLP_LOCAL_REGION\x10\xc3\xda\xfd\xe8\x01\x42\x12\n\x10_expected_rtt_msB\x14\n\x12_location_presenceB\t\n\x07_region\"\x94\x01\n\x12InterconnectMacsec\x12\x1a\n\tfail_open\x18\xcb\x95\xfb\xfd\x01 \x01(\x08H\x00\x88\x01\x01\x12T\n\x0fpre_shared_keys\x18\xf2\xcb\xb5\xc8\x01 \x03(\x0b\x32\x37.google.cloud.compute.v1.InterconnectMacsecPreSharedKeyB\x0c\n\n_fail_open\"v\n\x18InterconnectMacsecConfig\x12Z\n\x0fpre_shared_keys\x18\xf2\xcb\xb5\xc8\x01 \x03(\x0b\x32=.google.cloud.compute.v1.InterconnectMacsecConfigPreSharedKey\"\xa8\x01\n$InterconnectMacsecConfigPreSharedKey\x12\x12\n\x03\x63\x61k\x18\xcd\xff\x05 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03\x63kn\x18\x86\x82\x06 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x03\x88\x01\x01\x42\x06\n\x04_cakB\x06\n\x04_cknB\x07\n\x05_nameB\r\n\x0b_start_time\"j\n\x1eInterconnectMacsecPreSharedKey\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\r\n\x0b_start_time\"\x85\x05\n\x1eInterconnectOutageNotification\x12\x1c\n\x11\x61\x66\x66\x65\x63ted_circuits\x18\x95\xfe\xdeT \x03(\t\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08\x65nd_time\x18\xb1\xa7\xe7\x36 \x01(\x03H\x01\x88\x01\x01\x12\x1b\n\nissue_type\x18\xe0\xfd\xa0\xb0\x01 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x03\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x04\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\x03H\x05\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x06\x88\x01\x01\"w\n\tIssueType\x12\x18\n\x14UNDEFINED_ISSUE_TYPE\x10\x00\x12\x10\n\tIT_OUTAGE\x10\x85\xe1\xe8S\x12\x18\n\x11IT_PARTIAL_OUTAGE\x10\xa3\xca\xf5+\x12\r\n\x06OUTAGE\x10\xf1\xa5\x8f]\x12\x15\n\x0ePARTIAL_OUTAGE\x10\x8f\xb7\x8f\x46\"C\n\x06Source\x12\x14\n\x10UNDEFINED_SOURCE\x10\x00\x12\x0e\n\x06GOOGLE\x10\xb9\xa4\x99\xed\x01\x12\x13\n\x0bNSRC_GOOGLE\x10\xe2\xff\xba\xf3\x01\"x\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\tCANCELLED\x10\xb1\xf2\x80\x14\x12\x11\n\tCOMPLETED\x10\xab\x8c\xe4\x93\x01\x12\x10\n\tNS_ACTIVE\x10\xc0\x9d\xb7x\x12\x13\n\x0bNS_CANCELED\x10\xd3\x93\xc7\xf1\x01\x42\x0e\n\x0c_descriptionB\x0b\n\t_end_timeB\r\n\x0b_issue_typeB\x07\n\x05_nameB\t\n\x07_sourceB\r\n\x0b_start_timeB\x08\n\x06_state\"\xcb\x0b\n\x1aInterconnectRemoteLocation\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tH\x00\x88\x01\x01\x12~\n$attachment_configuration_constraints\x18\xd1\xe8\xeb\x9b\x01 \x01(\x0b\x32G.google.cloud.compute.v1.InterconnectAttachmentConfigurationConstraintsH\x01\x88\x01\x01\x12\x14\n\x04\x63ity\x18\xeb\xb2\xba\x01 \x01(\tH\x02\x88\x01\x01\x12[\n\x0b\x63onstraints\x18\xb6\xcc\xee\x01 \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectRemoteLocationConstraintsH\x03\x88\x01\x01\x12\x19\n\tcontinent\x18\xb4\xdb\xd0? \x01(\tH\x04\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x06\x88\x01\x01\x12\"\n\x11\x66\x61\x63ility_provider\x18\x8d\xa0\xa6\xfe\x01 \x01(\tH\x07\x88\x01\x01\x12-\n\x1d\x66\x61\x63ility_provider_facility_id\x18\x85\xbe\xce) \x01(\tH\x08\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12\x14\n\x04lacp\x18\xa2\xa1\xca\x01 \x01(\tH\x0b\x88\x01\x01\x12$\n\x14max_lag_size100_gbps\x18\xb5\xff\xf6t \x01(\x05H\x0c\x88\x01\x01\x12$\n\x13max_lag_size10_gbps\x18\x95\xe6\x98\x8c\x01 \x01(\x05H\r\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0e\x88\x01\x01\x12&\n\x15peeringdb_facility_id\x18\xb6\xba\xed\xff\x01 \x01(\tH\x0f\x88\x01\x01\x12j\n\x15permitted_connections\x18\xae\xb3\xe5\xd2\x01 \x03(\x0b\x32G.google.cloud.compute.v1.InterconnectRemoteLocationPermittedConnections\x12\x1f\n\x0eremote_service\x18\xbc\xff\xf2\xba\x01 \x01(\tH\x10\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x11\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x12\x88\x01\x01\"\x82\x01\n\tContinent\x12\x17\n\x13UNDEFINED_CONTINENT\x10\x00\x12\x0e\n\x06\x41\x46RICA\x10\xfa\x9c\xaf\x97\x01\x12\x0f\n\x08\x41SIA_PAC\x10\xfd\xf6\x8e\x39\x12\x0e\n\x06\x45UROPE\x10\xa2\xd3\xca\xd4\x01\x12\x15\n\rNORTH_AMERICA\x10\x94\xd9\xd0\xd5\x01\x12\x14\n\rSOUTH_AMERICA\x10\xdc\xca\xc5\x0f\"K\n\x04Lacp\x12\x12\n\x0eUNDEFINED_LACP\x10\x00\x12\x16\n\x0eLACP_SUPPORTED\x10\xb1\x8a\xf6\xa1\x01\x12\x17\n\x10LACP_UNSUPPORTED\x10\xf8\xf3\x9e\x61\"A\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x11\n\tAVAILABLE\x10\xa9\xb5\xe6\xd2\x01\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x42\n\n\x08_addressB\'\n%_attachment_configuration_constraintsB\x07\n\x05_cityB\x0e\n\x0c_constraintsB\x0c\n\n_continentB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x14\n\x12_facility_providerB \n\x1e_facility_provider_facility_idB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_lacpB\x17\n\x15_max_lag_size100_gbpsB\x16\n\x14_max_lag_size10_gbpsB\x07\n\x05_nameB\x18\n\x16_peeringdb_facility_idB\x11\n\x0f_remote_serviceB\x0c\n\n_self_linkB\t\n\x07_status\"\xc5\x04\n%InterconnectRemoteLocationConstraints\x12*\n\x19port_pair_remote_location\x18\xa7\xb2\xbc\xec\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0eport_pair_vlan\x18\xea\xf2\x83\xe4\x01 \x01(\tH\x01\x88\x01\x01\x12t\n\x13subnet_length_range\x18\xc6\xb0\xfbW \x01(\x0b\x32O.google.cloud.compute.v1.InterconnectRemoteLocationConstraintsSubnetLengthRangeH\x02\x88\x01\x01\"\x9c\x01\n\x16PortPairRemoteLocation\x12\'\n#UNDEFINED_PORT_PAIR_REMOTE_LOCATION\x10\x00\x12)\n\"PORT_PAIR_MATCHING_REMOTE_LOCATION\x10\xd3\x8b\xec\x62\x12.\n\'PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION\x10\xa5\xaa\xf3\x1c\"q\n\x0cPortPairVlan\x12\x1c\n\x18UNDEFINED_PORT_PAIR_VLAN\x10\x00\x12\x1e\n\x17PORT_PAIR_MATCHING_VLAN\x10\xbe\xe8\xacw\x12#\n\x1cPORT_PAIR_UNCONSTRAINED_VLAN\x10\xac\x88\xc7SB\x1c\n\x1a_port_pair_remote_locationB\x11\n\x0f_port_pair_vlanB\x16\n\x14_subnet_length_range\"p\n6InterconnectRemoteLocationConstraintsSubnetLengthRange\x12\x12\n\x03max\x18\xe4\xca\x06 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x03min\x18\xd2\xcc\x06 \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04_maxB\x06\n\x04_min\"\xc5\x02\n\x1eInterconnectRemoteLocationList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x45\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x33.google.cloud.compute.v1.InterconnectRemoteLocation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"r\n.InterconnectRemoteLocationPermittedConnections\x12&\n\x15interconnect_location\x18\xc6\xd8\xdb\xea\x01 \x01(\tH\x00\x88\x01\x01\x42\x18\n\x16_interconnect_location\"z\n#InterconnectsGetDiagnosticsResponse\x12H\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32\x30.google.cloud.compute.v1.InterconnectDiagnosticsH\x00\x88\x01\x01\x42\t\n\x07_result\"\x9b\x01\n$InterconnectsGetMacsecConfigResponse\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12I\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32\x31.google.cloud.compute.v1.InterconnectMacsecConfigH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_result\"\xe9\x01\n\x1cInvalidateCacheUrlMapRequest\x12\x61\n cache_invalidation_rule_resource\x18\xad\xc3\x93\x95\x01 \x01(\x0b\x32..google.cloud.compute.v1.CacheInvalidationRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"D\n\x05Items\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"\xfd\x03\n\x07License\x12 \n\x0f\x63harges_use_fee\x18\xce\xa1\xca\xb1\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0clicense_code\x18\xab\xc6Y \x01(\x04H\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12[\n\x15resource_requirements\x18\xa1\xb2\x97\x66 \x01(\x0b\x32\x34.google.cloud.compute.v1.LicenseResourceRequirementsH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0ctransferable\x18\xc5\xbf\x89\x02 \x01(\x08H\t\x88\x01\x01\x42\x12\n\x10_charges_use_feeB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x0f\n\r_license_codeB\x07\n\x05_nameB\x18\n\x16_resource_requirementsB\x0c\n\n_self_linkB\x0f\n\r_transferable\"\x94\x04\n\x0bLicenseCode\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12J\n\rlicense_alias\x18\xd2\x91\xe2\x14 \x03(\x0b\x32\x30.google.cloud.compute.v1.LicenseCodeLicenseAlias\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x04\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x05\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x06\x88\x01\x01\x12\x1c\n\x0ctransferable\x18\xc5\xbf\x89\x02 \x01(\x08H\x07\x88\x01\x01\"\x7f\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0e\n\x07\x45NABLED\x10\xa1\xae\xecV\x12\x11\n\nRESTRICTED\x10\xdb\xe8\xdb|\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x11\n\nTERMINATED\x10\xa3\xf4\x9bwB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_self_linkB\x08\n\x06_stateB\x0f\n\r_transferable\"q\n\x17LicenseCodeLicenseAlias\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x0c\n\n_self_link\"\x9c\x01\n\x19LicenseResourceCommitment\x12\x16\n\x06\x61mount\x18\xd8\xa0\xe9] \x01(\x03H\x00\x88\x01\x01\x12!\n\x11\x63ores_per_license\x18\x94\xc8\xbe\x0f \x01(\tH\x01\x88\x01\x01\x12\x17\n\x07license\x18\xc1\x88\xc2O \x01(\tH\x02\x88\x01\x01\x42\t\n\x07_amountB\x14\n\x12_cores_per_licenseB\n\n\x08_license\"\x8d\x01\n\x1bLicenseResourceRequirements\x12$\n\x13min_guest_cpu_count\x18\xa4\xd4\xf4\xe3\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1e\n\rmin_memory_mb\x18\xe6\xd7\xd9\xf0\x01 \x01(\x05H\x01\x88\x01\x01\x42\x16\n\x14_min_guest_cpu_countB\x10\n\x0e_min_memory_mb\"\x89\x02\n\x14LicensesListResponse\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x32\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32 .google.cloud.compute.v1.License\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x01\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x02\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x03\x88\x01\x01\x42\x05\n\x03_idB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb3\x02\n\x1bListAcceleratorTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xae\x02\n\x14ListAddressesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"]\n%ListAssociationsFirewallPolicyRequest\x12 \n\x0ftarget_resource\x18\xfc\xed\xea\xde\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_target_resource\"\xae\x02\n\x16ListAutoscalersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc7\x02\n-ListAvailableFeaturesRegionSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa9\x02\n\'ListAvailableFeaturesSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9b\x02\n\x19ListBackendBucketsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9c\x02\n\x1aListBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x8b\x06\n\x1bListBgpRoutesRoutersRequest\x12\x1e\n\x0e\x61\x64\x64ress_family\x18\x8f\xc4\xecR \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x64\x65stination_prefix\x18\xe3\xbf\xe9} \x01(\tH\x01\x88\x01\x01\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x03\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x04\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04peer\x18\xe2\xe2\xd1\x01 \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x0epolicy_applied\x18\xf0\xd4\xf8\xb4\x01 \x01(\x08H\x07\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x08\x88\x01\x01\x12\x1b\n\nroute_type\x18\xf0\xb6\x9e\xb3\x01 \x01(\tH\t\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\"f\n\rAddressFamily\x12\x1c\n\x18UNDEFINED_ADDRESS_FAMILY\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\x12\x1d\n\x16UNSPECIFIED_IP_VERSION\x10\xc8\xe7\xe3\"\"g\n\tRouteType\x12\x18\n\x14UNDEFINED_ROUTE_TYPE\x10\x00\x12\x11\n\nADVERTISED\x10\x9d\x92\xd7\t\x12\x0e\n\x07LEARNED\x10\xc3\xcb\xc9n\x12\x1d\n\x16UNSPECIFIED_ROUTE_TYPE\x10\xb8\xd3\xa4vB\x11\n\x0f_address_familyB\x15\n\x13_destination_prefixB\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x07\n\x05_peerB\x11\n\x0f_policy_appliedB\x19\n\x17_return_partial_successB\r\n\x0b_route_type\"\xac\x02\n\x14ListDiskTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa8\x02\n\x10ListDisksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd3\x02\n\x1cListDisksStoragePoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xe6\x02\n&ListErrorsInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xee\x02\n,ListErrorsRegionInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa0\x02\n\x1eListExternalVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xae\x02\n\x1bListFirewallPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tH\x04\x88\x01\x01\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x0c\n\n_parent_idB\x19\n\x17_return_partial_success\"\x96\x02\n\x14ListFirewallsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb4\x02\n\x1aListForwardingRulesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9c\x02\n\x1aListGlobalAddressesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa2\x02\n ListGlobalForwardingRulesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa8\x02\n&ListGlobalNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9d\x02\n\x1bListGlobalOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xba\x02\n\'ListGlobalOrganizationOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tH\x04\x88\x01\x01\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x0c\n\n_parent_idB\x19\n\x17_return_partial_success\"\xaa\x02\n(ListGlobalPublicDelegatedPrefixesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x99\x02\n\x17ListHealthChecksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x93\x02\n\x11ListImagesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xed\x02\n-ListInstanceGroupManagerResizeRequestsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb8\x02\n ListInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb1\x02\n\x19ListInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9e\x02\n\x1cListInstanceTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd9\x03\n\"ListInstancesInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12}\n/instance_groups_list_instances_request_resource\x18\x9f\xa8\x8c\xe3\x01 \x01(\x0b\x32;.google.cloud.compute.v1.InstanceGroupsListInstancesRequestB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xee\x03\n(ListInstancesRegionInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x89\x01\n6region_instance_groups_list_instances_request_resource\x18\xd4\xa9\x80\x17 \x01(\x0b\x32\x41.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequestB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xac\x02\n\x14ListInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb3\x02\n\x1bListInstantSnapshotsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbc\x02\n\"ListInterconnectAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa2\x02\n ListInterconnectLocationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa8\x02\n&ListInterconnectRemoteLocationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9a\x02\n\x18ListInterconnectsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x95\x02\n\x13ListLicensesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9a\x02\n\x18ListMachineImagesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xaf\x02\n\x17ListMachineTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xf0\x02\n0ListManagedInstancesInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xf8\x02\n6ListManagedInstancesRegionInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb7\x02\n\x1dListNetworkAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb8\x02\n ListNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xe1\x02\n6ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xff\x03\n0ListNetworkEndpointsNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x8b\x01\n7network_endpoint_groups_list_endpoints_request_resource\x18\x8e\x98\xaf\x1c \x01(\x0b\x32\x42.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequestB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xf9\x02\n6ListNetworkEndpointsRegionNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa4\x02\n\"ListNetworkFirewallPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9c\x02\n\x1aListNetworkProfilesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x95\x02\n\x13ListNetworksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xad\x02\n\x15ListNodeGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb2\x02\n\x18ListNodeTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xac\x02\n\x14ListNodeTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xcf\x02\n\x1aListNodesNodeGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb5\x02\n\x1bListPacketMirroringsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x80\x04\n ListPeeringRoutesNetworksRequest\x12\x19\n\tdirection\x18\xff\x8e\x80\x35 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0cpeering_name\x18\xaa\xd0\x80w \x01(\tH\x05\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x07\x88\x01\x01\"H\n\tDirection\x12\x17\n\x13UNDEFINED_DIRECTION\x10\x00\x12\x10\n\x08INCOMING\x10\xa6\xd0\xb7\xa1\x01\x12\x10\n\x08OUTGOING\x10\xec\xc6\xcc\x92\x01\x42\x0c\n\n_directionB\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x0f\n\r_peering_nameB\t\n\x07_regionB\x19\n\x17_return_partial_success\"\xf2\x02\n2ListPerInstanceConfigsInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xfa\x02\n8ListPerInstanceConfigsRegionInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb8\x02\n6ListPreconfiguredExpressionSetsSecurityPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa5\x02\n#ListPublicAdvertisedPrefixesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbc\x02\n\"ListPublicDelegatedPrefixesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xcf\x02\n\x1dListReferrersInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb6\x02\n\x1cListRegionAutoscalersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xba\x02\n ListRegionBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb6\x02\n\x1cListRegionCommitmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb4\x02\n\x1aListRegionDiskTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListRegionDisksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbe\x02\n$ListRegionHealthCheckServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb7\x02\n\x1dListRegionHealthChecksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc0\x02\n&ListRegionInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb9\x02\n\x1fListRegionInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbc\x02\n\"ListRegionInstanceTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbb\x02\n!ListRegionInstantSnapshotsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc0\x02\n&ListRegionNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc2\x02\n(ListRegionNetworkFirewallPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc0\x02\n&ListRegionNotificationEndpointsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb5\x02\n\x1bListRegionOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbb\x02\n!ListRegionSecurityPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xba\x02\n ListRegionSslCertificatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb6\x02\n\x1cListRegionSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbc\x02\n\"ListRegionTargetHttpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbd\x02\n#ListRegionTargetHttpsProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbb\x02\n!ListRegionTargetTcpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb2\x02\n\x18ListRegionUrlMapsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListRegionZonesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x94\x02\n\x12ListRegionsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd1\x02\n\x1cListReservationBlocksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xaf\x02\n\x17ListReservationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb5\x02\n\x1bListResourcePoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd1\x02\n\x1fListRoutePoliciesRoutersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xac\x02\n\x12ListRoutersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x93\x02\n\x11ListRoutesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9d\x02\n\x1bListSecurityPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb7\x02\n\x1dListServiceAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x96\x02\n\x14ListSnapshotsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9c\x02\n\x1aListSslCertificatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x98\x02\n\x16ListSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb3\x02\n\x1bListStoragePoolTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xaf\x02\n\x17ListStoragePoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListSubnetworksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9e\x02\n\x1cListTargetGrpcProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9e\x02\n\x1cListTargetHttpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9f\x02\n\x1dListTargetHttpsProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb2\x02\n\x1aListTargetInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListTargetPoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9d\x02\n\x1bListTargetSslProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9d\x02\n\x1bListTargetTcpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb6\x02\n\x1cListTargetVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x94\x02\n\x12ListUrlMapsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa2\x02\n ListUsableBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc0\x02\n&ListUsableRegionBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9e\x02\n\x1cListUsableSubnetworksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xaf\x02\n\x15ListVpnTunnelsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x8d\x03\n\x1bListXpnHostsProjectsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12n\n(projects_list_xpn_hosts_request_resource\x18\x97\xd0\xceq \x01(\x0b\x32\x34.google.cloud.compute.v1.ProjectsListXpnHostsRequestB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb1\x02\n\x19ListZoneOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x92\x02\n\x10ListZonesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x8f\x01\n\tLocalDisk\x12\x1a\n\ndisk_count\x18\xed\xaf\x9dW \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x05H\x01\x88\x01\x01\x12\x19\n\tdisk_type\x18\x9c\xe9\xac, \x01(\tH\x02\x88\x01\x01\x42\r\n\x0b_disk_countB\x0f\n\r_disk_size_gbB\x0c\n\n_disk_type\"\\\n\x10LocalizedMessage\x12\x17\n\x06locale\x18\xda\x9c\xd8\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_localeB\n\n\x08_message\"\xd2\x02\n\x0eLocationPolicy\x12M\n\tlocations\x18\xde\xae\x91\xc5\x01 \x03(\x0b\x32\x36.google.cloud.compute.v1.LocationPolicy.LocationsEntry\x12\x1d\n\x0ctarget_shape\x18\xf3\xe6\xbb\xa1\x01 \x01(\tH\x00\x88\x01\x01\x1a\x61\n\x0eLocationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.LocationPolicyLocation:\x02\x38\x01\"^\n\x0bTargetShape\x12\x1a\n\x16UNDEFINED_TARGET_SHAPE\x10\x00\x12\t\n\x03\x41NY\x10\xcc\xfb\x03\x12\x16\n\x0f\x41NY_SINGLE_ZONE\x10\xd0\xa6\x91\x1d\x12\x10\n\x08\x42\x41LANCED\x10\x88\xba\xad\xdf\x01\x42\x0f\n\r_target_shape\"\x8e\x02\n\x16LocationPolicyLocation\x12W\n\x0b\x63onstraints\x18\xb6\xcc\xee\x01 \x01(\x0b\x32:.google.cloud.compute.v1.LocationPolicyLocationConstraintsH\x00\x88\x01\x01\x12\x1a\n\npreference\x18\xdb\xf9\xf2G \x01(\tH\x01\x88\x01\x01\"`\n\nPreference\x12\x18\n\x14UNDEFINED_PREFERENCE\x10\x00\x12\x0c\n\x05\x41LLOW\x10\xa9\xd6\xde\x1d\x12\n\n\x04\x44\x45NY\x10\x8c\xec\x7f\x12\x1e\n\x16PREFERENCE_UNSPECIFIED\x10\xb3\xeb\xce\xec\x01\x42\x0e\n\x0c_constraintsB\r\n\x0b_preference\"M\n!LocationPolicyLocationConstraints\x12\x1a\n\tmax_count\x18\xf4\xfc\x92\x89\x01 \x01(\x05H\x00\x88\x01\x01\x42\x0c\n\n_max_count\"\xe4\n\n\x0cMachineImage\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bguest_flush\x18\xdd\x93\xec\xb7\x01 \x01(\x08H\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12P\n\x13instance_properties\x18\x9d\x9e\xd8\x66 \x01(\x0b\x32+.google.cloud.compute.v1.InstancePropertiesH\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x06\x88\x01\x01\x12\x45\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x31.google.cloud.compute.v1.MachineImage.LabelsEntry\x12]\n\x1cmachine_image_encryption_key\x18\xff\xff\xe7\xfb\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\t\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\n\x88\x01\x01\x12;\n\x0bsaved_disks\x18\xbe\xed\xc0\xbd\x01 \x03(\x0b\x32\".google.cloud.compute.v1.SavedDisk\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0b\x88\x01\x01\x12Y\n\x1bsource_disk_encryption_keys\x18\xb2\xf8\xcf\xb0\x01 \x03(\x0b\x32\x30.google.cloud.compute.v1.SourceDiskEncryptionKey\x12 \n\x0fsource_instance\x18\xb9\x98\xfd\xbc\x01 \x01(\tH\x0c\x88\x01\x01\x12^\n\x1asource_instance_properties\x18\xf9\xd1\xcb\xe2\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.SourceInstancePropertiesH\r\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0e\x88\x01\x01\x12\x1d\n\x11storage_locations\x18\x9a\xed\xb3\x9c\x01 \x03(\t\x12#\n\x13total_storage_bytes\x18\xec\x87\x84\' \x01(\x03H\x0f\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"s\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x10\n\tUPLOADING\x10\xa1\x9c\xcd\x7f\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_guest_flushB\x05\n\x03_idB\x16\n\x14_instance_propertiesB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x1f\n\x1d_machine_image_encryption_keyB\x07\n\x05_nameB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x12\n\x10_source_instanceB\x1d\n\x1b_source_instance_propertiesB\t\n\x07_statusB\x16\n\x14_total_storage_bytes\"\xa9\x02\n\x10MachineImageList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x37\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32%.google.cloud.compute.v1.MachineImage\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe6\x07\n\x0bMachineType\x12?\n\x0c\x61\x63\x63\x65lerators\x18\xe8\xd6\xc5\x80\x01 \x03(\x0b\x32%.google.cloud.compute.v1.Accelerators\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nguest_cpus\x18\xd2\xcb\xc8\xbb\x01 \x01(\x05H\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x1e\n\x0eimage_space_gb\x18\x98\xf2\xf5# \x01(\x05H\x06\x88\x01\x01\x12\x1e\n\ris_shared_cpu\x18\x83\xda\xcf\xf8\x01 \x01(\x08H\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12)\n\x18maximum_persistent_disks\x18\x8d\xf6\xce\xec\x01 \x01(\x05H\t\x88\x01\x01\x12\x30\n maximum_persistent_disks_size_gb\x18\xa7\x95\xc8I \x01(\x03H\n\x88\x01\x01\x12\x19\n\tmemory_mb\x18\x93\x93\xa8\x37 \x01(\x05H\x0b\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0c\x88\x01\x01\x12@\n\rscratch_disks\x18\xf1\xb1\xa0\xe5\x01 \x03(\x0b\x32%.google.cloud.compute.v1.ScratchDisks\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0e\x88\x01\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\x42\x0f\n\r_architectureB\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\r\n\x0b_guest_cpusB\x05\n\x03_idB\x11\n\x0f_image_space_gbB\x10\n\x0e_is_shared_cpuB\x07\n\x05_kindB\x1b\n\x19_maximum_persistent_disksB#\n!_maximum_persistent_disks_size_gbB\x0c\n\n_memory_mbB\x07\n\x05_nameB\x0c\n\n_self_linkB\x07\n\x05_zone\"\xc2\x03\n\x19MachineTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12O\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32=.google.cloud.compute.v1.MachineTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a]\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.MachineTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa7\x02\n\x0fMachineTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x36\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32$.google.cloud.compute.v1.MachineType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x9f\x01\n\x16MachineTypesScopedList\x12>\n\rmachine_types\x18\x81\xdd\x81& \x03(\x0b\x32$.google.cloud.compute.v1.MachineType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xf2\n\n\x0fManagedInstance\x12\x1e\n\x0e\x63urrent_action\x18\xbc\xa7\x8dU \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x01\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x02\x88\x01\x01\x12S\n\x0finstance_health\x18\xc6\x92\xbc\xb6\x01 \x03(\x0b\x32\x36.google.cloud.compute.v1.ManagedInstanceInstanceHealth\x12\x1f\n\x0finstance_status\x18\xdc\xad\x9fS \x01(\tH\x03\x88\x01\x01\x12R\n\x0clast_attempt\x18\xa4\xac\xa8\xcf\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.ManagedInstanceLastAttemptH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12T\n\x1bpreserved_state_from_config\x18\xe2\xeb\x85/ \x01(\x0b\x32\'.google.cloud.compute.v1.PreservedStateH\x06\x88\x01\x01\x12U\n\x1bpreserved_state_from_policy\x18\xd2\xaf\xbe\xe0\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.PreservedStateH\x07\x88\x01\x01\x12{\n\"properties_from_flexibility_policy\x18\xc1\xc5\x94J \x01(\x0b\x32G.google.cloud.compute.v1.ManagedInstancePropertiesFromFlexibilityPolicyH\x08\x88\x01\x01\x12I\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\x0b\x32/.google.cloud.compute.v1.ManagedInstanceVersionH\t\x88\x01\x01\"\x85\x02\n\rCurrentAction\x12\x1c\n\x18UNDEFINED_CURRENT_ACTION\x10\x00\x12\x12\n\nABANDONING\x10\xcd\xca\x90\xb9\x01\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12 \n\x18\x43REATING_WITHOUT_RETRIES\x10\x89\xc6\xbe\xcc\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x12\n\nRECREATING\x10\xec\x8b\xfe\x88\x01\x12\x11\n\nREFRESHING\x10\xa7\xfe\xecM\x12\x12\n\nRESTARTING\x10\xf3\xee\xeb\x98\x01\x12\x10\n\x08RESUMING\x10\xaa\xfb\x89\xd5\x01\x12\x10\n\x08STARTING\x10\xc0\xa0\x8b\xe9\x01\x12\x10\n\tVERIFYING\x10\xa9\xc1\x8c\x08\"\xed\x01\n\x0eInstanceStatus\x12\x1d\n\x19UNDEFINED_INSTANCE_STATUS\x10\x00\x12\x16\n\x0e\x44\x45PROVISIONING\x10\xee\x93\xc4\xcc\x01\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x11\n\tREPAIRING\x10\x95\x82\x95\xc5\x01\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x12\x0f\n\x07STAGING\x10\x9b\xc8\xc6\xcd\x01\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x12\x10\n\tSUSPENDED\x10\xbb\xbb\xb6\x18\x12\x12\n\nSUSPENDING\x10\xa6\xd4\x98\xf5\x01\x12\x11\n\nTERMINATED\x10\xa3\xf4\x9bwB\x11\n\x0f_current_actionB\x05\n\x03_idB\x0b\n\t_instanceB\x12\n\x10_instance_statusB\x0f\n\r_last_attemptB\x07\n\x05_nameB\x1e\n\x1c_preserved_state_from_configB\x1e\n\x1c_preserved_state_from_policyB%\n#_properties_from_flexibility_policyB\n\n\x08_version\"\xa6\x02\n\x1dManagedInstanceInstanceHealth\x12&\n\x15\x64\x65tailed_health_state\x18\x9d\xd0\xb4\xf3\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tH\x01\x88\x01\x01\"\x92\x01\n\x13\x44\x65tailedHealthState\x12#\n\x1fUNDEFINED_DETAILED_HEALTH_STATE\x10\x00\x12\x10\n\x08\x44RAINING\x10\xea\xd5\x8c\xe5\x01\x12\x0f\n\x07HEALTHY\x10\xfd\xaa\xdb\xd1\x01\x12\x0f\n\x07TIMEOUT\x10\xc1\xb2\xeb\xe3\x01\x12\x11\n\tUNHEALTHY\x10\xc4\xb9\xad\xdc\x01\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\x42\x18\n\x16_detailed_health_stateB\x0f\n\r_health_check\"{\n\x1aManagedInstanceLastAttempt\x12R\n\x06\x65rrors\x18\xeb\xde\xd5\x96\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.ManagedInstanceLastAttemptErrorsH\x00\x88\x01\x01\x42\t\n\x07_errors\"W\n ManagedInstanceLastAttemptErrors\x12\x33\n\x06\x65rrors\x18\xeb\xde\xd5\x96\x01 \x03(\x0b\x32\x1f.google.cloud.compute.v1.Errors\"_\n.ManagedInstancePropertiesFromFlexibilityPolicy\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_machine_type\"q\n\x16ManagedInstanceVersion\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x14\n\x12_instance_templateB\x07\n\x05_name\"\x88\x01\n\x08Metadata\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x30\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1e.google.cloud.compute.v1.Items\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_fingerprintB\x07\n\x05_kind\"\x8f\x02\n\x0eMetadataFilter\x12L\n\rfilter_labels\x18\xa6\xf5\xe8\x92\x01 \x03(\x0b\x32\x31.google.cloud.compute.v1.MetadataFilterLabelMatch\x12%\n\x15\x66ilter_match_criteria\x18\xc0\xd0\xb6r \x01(\tH\x00\x88\x01\x01\"n\n\x13\x46ilterMatchCriteria\x12#\n\x1fUNDEFINED_FILTER_MATCH_CRITERIA\x10\x00\x12\x10\n\tMATCH_ALL\x10\xe7\xe7\x92V\x12\x10\n\tMATCH_ANY\x10\xb2\xe8\x92V\x12\x0e\n\x07NOT_SET\x10\xb6\x99\x84NB\x18\n\x16_filter_match_criteria\"Z\n\x18MetadataFilterLabelMatch\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\x08\n\x06_value\"\x8b\x02\n\x12MoveAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12l\n®ion_addresses_move_request_resource\x18\xc4\xb0\x88\xc3\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.RegionAddressesMoveRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbd\x01\n\x16MoveDiskProjectRequest\x12U\n\x1a\x64isk_move_request_resource\x18\xca\xc2\xa0\x95\x01 \x01(\x0b\x32(.google.cloud.compute.v1.DiskMoveRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x90\x01\n\x19MoveFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12&\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tB\x0f\xe0\x41\x02\xf2G\tparent_id\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf0\x01\n\x18MoveGlobalAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12l\n&global_addresses_move_request_resource\x18\xf3\xf1\xb1\x90\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.GlobalAddressesMoveRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc9\x01\n\x1aMoveInstanceProjectRequest\x12]\n\x1einstance_move_request_resource\x18\xc2\xbc\xce\x94\x01 \x01(\x0b\x32,.google.cloud.compute.v1.InstanceMoveRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"I\n\tNamedPort\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x01\x88\x01\x01\x42\x07\n\x05_nameB\x07\n\x05_port\"\x88\x01\n\tNatIpInfo\x12S\n\x14nat_ip_info_mappings\x18\x9c\x80\x8es \x03(\x0b\x32\x32.google.cloud.compute.v1.NatIpInfoNatIpInfoMapping\x12\x19\n\x08nat_name\x18\xe9\xad\xf8\xca\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_nat_name\"\xf2\x01\n\x19NatIpInfoNatIpInfoMapping\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06nat_ip\x18\x85\xd2\x88\n \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05usage\x18\xa1\xfb\x99\x35 \x01(\tH\x02\x88\x01\x01\"5\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\n\n\x04\x41UTO\x10\xaf\xab{\x12\r\n\x06MANUAL\x10\xc6\xb7\xf7\x38\";\n\x05Usage\x12\x13\n\x0fUNDEFINED_USAGE\x10\x00\x12\r\n\x06IN_USE\x10\xcd\xce\xa5\x08\x12\x0e\n\x06UNUSED\x10\xd6\xf3\xfb\xab\x01\x42\x07\n\x05_modeB\t\n\x07_nat_ipB\x08\n\x06_usage\"J\n\x11NatIpInfoResponse\x12\x35\n\x06result\x18\x9d\x90\xb7\x42 \x03(\x0b\x32\".google.cloud.compute.v1.NatIpInfo\"\xa2\t\n\x07Network\x12\x1b\n\x0bI_pv4_range\x18\xb6\xb0\x9f\x1c \x01(\tH\x00\x88\x01\x01\x12\'\n\x17\x61uto_create_subnetworks\x18\x92\xc8\x92z \x01(\x08H\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12)\n\x18\x65nable_ula_internal_ipv6\x18\x98\x8f\x88\xca\x01 \x01(\x08H\x04\x88\x01\x01\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tH\x05\x88\x01\x01\x12\x1d\n\rgateway_i_pv4\x18\xdd\xd8\x99U \x01(\tH\x06\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12$\n\x13internal_ipv6_range\x18\xa7\xcf\xa6\x84\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\t\x88\x01\x01\x12\x12\n\x03mtu\x18\xae\xcf\x06 \x01(\x05H\n\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0b\x88\x01\x01\x12\x39\n)network_firewall_policy_enforcement_order\x18\xd0\x82\x8d\x03 \x01(\tH\x0c\x88\x01\x01\x12\x1f\n\x0fnetwork_profile\x18\x98\xf9\xc5R \x01(\tH\r\x88\x01\x01\x12<\n\x08peerings\x18\xb3\xaa\xa9! \x03(\x0b\x32\'.google.cloud.compute.v1.NetworkPeering\x12N\n\x0erouting_config\x18\xdb\xa9\xd3\xf9\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NetworkRoutingConfigH\x0e\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0f\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x10\x88\x01\x01\x12\x17\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\t\"\xa0\x01\n%NetworkFirewallPolicyEnforcementOrder\x12\x37\n3UNDEFINED_NETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDER\x10\x00\x12\x1d\n\x16\x41\x46TER_CLASSIC_FIREWALL\x10\xd0\xfc\xdaI\x12\x1f\n\x17\x42\x45\x46ORE_CLASSIC_FIREWALL\x10\xed\xed\xb1\xa1\x01\x42\x0e\n\x0c_I_pv4_rangeB\x1a\n\x18_auto_create_subnetworksB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x1b\n\x19_enable_ula_internal_ipv6B\x12\n\x10_firewall_policyB\x10\n\x0e_gateway_i_pv4B\x05\n\x03_idB\x16\n\x14_internal_ipv6_rangeB\x07\n\x05_kindB\x06\n\x04_mtuB\x07\n\x05_nameB,\n*_network_firewall_policy_enforcement_orderB\x12\n\x10_network_profileB\x11\n\x0f_routing_configB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_id\"\xa7\x06\n\x11NetworkAttachment\x12]\n\x14\x63onnection_endpoints\x18\xdd\xa2\xbe\x9b\x01 \x03(\x0b\x32;.google.cloud.compute.v1.NetworkAttachmentConnectedEndpoint\x12&\n\x15\x63onnection_preference\x18\xdc\xf9\xa4\x88\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12 \n\x15producer_accept_lists\x18\xab\x9a\xda` \x03(\t\x12 \n\x15producer_reject_lists\x18\x82\xfd\xfa\x01 \x03(\t\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\n\x88\x01\x01\x12\x17\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\t\"|\n\x14\x43onnectionPreference\x12#\n\x1fUNDEFINED_CONNECTION_PREFERENCE\x10\x00\x12\x17\n\x10\x41\x43\x43\x45PT_AUTOMATIC\x10\x94\xf7\xf0#\x12\x15\n\rACCEPT_MANUAL\x10\xdd\xed\xf1\xb1\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x42\x18\n\x16_connection_preferenceB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_id\"\xbb\x03\n\x1fNetworkAttachmentAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12U\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x43.google.cloud.compute.v1.NetworkAttachmentAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x63\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.google.cloud.compute.v1.NetworkAttachmentsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x87\x04\n\"NetworkAttachmentConnectedEndpoint\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x11project_id_or_num\x18\xa8\x8a\xe5\xa6\x01 \x01(\tH\x02\x88\x01\x01\x12#\n\x18secondary_ip_cidr_ranges\x18\x94\xb2\xf0\x37 \x03(\t\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x04\x88\x01\x01\x12&\n\x15subnetwork_cidr_range\x18\xa3\xdb\xdf\xb6\x01 \x01(\tH\x05\x88\x01\x01\"\x94\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x12\x17\n\x0fNEEDS_ATTENTION\x10\xbc\x8b\xa2\xa4\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x14\n\x12_project_id_or_numB\t\n\x07_statusB\r\n\x0b_subnetworkB\x18\n\x16_subnetwork_cidr_range\"\xb3\x02\n\x15NetworkAttachmentList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.NetworkAttachment\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb2\x01\n\x1cNetworkAttachmentsScopedList\x12K\n\x13network_attachments\x18\x9f\xde\xd6\xf8\x01 \x03(\x0b\x32*.google.cloud.compute.v1.NetworkAttachment\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xc4\x03\n\x1aNetworkEdgeSecurityService\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\t\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x12\n\x10_security_policyB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_id\"\x8e\x04\n(NetworkEdgeSecurityServiceAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12^\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32L.google.cloud.compute.v1.NetworkEdgeSecurityServiceAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1al\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xce\x01\n%NetworkEdgeSecurityServicesScopedList\x12^\n\x1enetwork_edge_security_services\x18\xac\xcb\xf8\x10 \x03(\x0b\x32\x33.google.cloud.compute.v1.NetworkEdgeSecurityService\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x9e\x03\n\x0fNetworkEndpoint\x12Q\n\x0b\x61nnotations\x18\xa4\xf6\xb5\x35 \x03(\x0b\x32\x39.google.cloud.compute.v1.NetworkEndpoint.AnnotationsEntry\x12\'\n\x17\x63lient_destination_port\x18\x86\x88\x82; \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x04\x66qdn\x18\x95\xa5\xc0\x01 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x03\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x05\x88\x01\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1a\n\x18_client_destination_portB\x07\n\x05_fqdnB\x0b\n\t_instanceB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x07\n\x05_port\"\x89\x0b\n\x14NetworkEndpointGroup\x12V\n\x0b\x61nnotations\x18\xa4\xf6\xb5\x35 \x03(\x0b\x32>.google.cloud.compute.v1.NetworkEndpointGroup.AnnotationsEntry\x12S\n\napp_engine\x18\xa0\x8c\xc0\xa2\x01 \x01(\x0b\x32\x36.google.cloud.compute.v1.NetworkEndpointGroupAppEngineH\x00\x88\x01\x01\x12[\n\x0e\x63loud_function\x18\xa2\xe5\xf3\xf7\x01 \x01(\x0b\x32:.google.cloud.compute.v1.NetworkEndpointGroupCloudFunctionH\x01\x88\x01\x01\x12P\n\tcloud_run\x18\x81\xcb\xfa\x34 \x01(\x0b\x32\x35.google.cloud.compute.v1.NetworkEndpointGroupCloudRunH\x02\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x03\x88\x01\x01\x12\x1d\n\x0c\x64\x65\x66\x61ult_port\x18\xbf\xf7\xf0\xc9\x01 \x01(\x05H\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\t\x88\x01\x01\x12%\n\x15network_endpoint_type\x18\xd3\xc6\xb4\x38 \x01(\tH\n\x88\x01\x01\x12N\n\x08psc_data\x18\xc9\xdb\xa6\" \x01(\x0b\x32\x34.google.cloud.compute.v1.NetworkEndpointGroupPscDataH\x0b\x88\x01\x01\x12#\n\x12psc_target_service\x18\xe6\xc2\xaa\x80\x01 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\r\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0e\x88\x01\x01\x12\x14\n\x04size\x18\x81\xc0\xd7\x01 \x01(\x05H\x0f\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x10\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x11\x88\x01\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x02\n\x13NetworkEndpointType\x12#\n\x1fUNDEFINED_NETWORK_ENDPOINT_TYPE\x10\x00\x12\x11\n\tGCE_VM_IP\x10\xd9\xed\xd0\xbf\x01\x12\x16\n\x0eGCE_VM_IP_PORT\x10\xa7\xe4\xa5\xef\x01\x12\x18\n\x11GCE_VM_IP_PORTMAP\x10\xb5\xe3\xf0\n\x12\x1a\n\x12INTERNET_FQDN_PORT\x10\xed\xd0\xdb\xc0\x01\x12\x18\n\x10INTERNET_IP_PORT\x10\x9b\xdb\xe5\xe3\x01\x12\x1f\n\x17NON_GCP_PRIVATE_IP_PORT\x10\xe0\x93\xb7\xa0\x01\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x12\n\nSERVERLESS\x10\xdc\xc6\xfd\x80\x01\x42\r\n\x0b_app_engineB\x11\n\x0f_cloud_functionB\x0c\n\n_cloud_runB\x15\n\x13_creation_timestampB\x0f\n\r_default_portB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\x18\n\x16_network_endpoint_typeB\x0b\n\t_psc_dataB\x15\n\x13_psc_target_serviceB\t\n\x07_regionB\x0c\n\n_self_linkB\x07\n\x05_sizeB\r\n\x0b_subnetworkB\x07\n\x05_zone\"\xdd\x03\n\"NetworkEndpointGroupAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12X\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x46.google.cloud.compute.v1.NetworkEndpointGroupAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x66\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.compute.v1.NetworkEndpointGroupsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x92\x01\n\x1dNetworkEndpointGroupAppEngine\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08url_mask\x18\xbc\x8f\xa4\x31 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\tH\x02\x88\x01\x01\x42\n\n\x08_serviceB\x0b\n\t_url_maskB\n\n\x08_version\"r\n!NetworkEndpointGroupCloudFunction\x12\x19\n\x08\x66unction\x18\xd8\xe7\xbd\x92\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08url_mask\x18\xbc\x8f\xa4\x31 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_functionB\x0b\n\t_url_mask\"\x87\x01\n\x1cNetworkEndpointGroupCloudRun\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03tag\x18\x9a\xff\x06 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x08url_mask\x18\xbc\x8f\xa4\x31 \x01(\tH\x02\x88\x01\x01\x42\n\n\x08_serviceB\x06\n\x04_tagB\x0b\n\t_url_mask\"\xb9\x02\n\x18NetworkEndpointGroupList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroup\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbd\x03\n\x1bNetworkEndpointGroupPscData\x12%\n\x14\x63onsumer_psc_address\x18\xac\xad\xeb\xd7\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\rproducer_port\x18\x8e\xda\xc1\xc3\x01 \x01(\x05H\x01\x88\x01\x01\x12\"\n\x11psc_connection_id\x18\xdd\xa5\xa3\x8b\x01 \x01(\x04H\x02\x88\x01\x01\x12%\n\x15psc_connection_status\x18\xb4\xc9\xe7W \x01(\tH\x03\x88\x01\x01\"\xb0\x01\n\x13PscConnectionStatus\x12#\n\x1fUNDEFINED_PSC_CONNECTION_STATUS\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x12\x17\n\x0fNEEDS_ATTENTION\x10\xbc\x8b\xa2\xa4\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\x17\n\x15_consumer_psc_addressB\x10\n\x0e_producer_portB\x14\n\x12_psc_connection_idB\x18\n\x16_psc_connection_status\"u\n+NetworkEndpointGroupsAttachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"u\n+NetworkEndpointGroupsDetachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"\xa4\x01\n)NetworkEndpointGroupsListEndpointsRequest\x12\x1e\n\rhealth_status\x18\xb5\xd6\xba\xb5\x01 \x01(\tH\x00\x88\x01\x01\"E\n\x0cHealthStatus\x12\x1b\n\x17UNDEFINED_HEALTH_STATUS\x10\x00\x12\x0b\n\x04SHOW\x10\xfd\xa5\x9b\x01\x12\x0b\n\x04SKIP\x10\xff\xba\x9b\x01\x42\x10\n\x0e_health_status\"\xab\x02\n)NetworkEndpointGroupsListNetworkEndpoints\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12J\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x38.google.cloud.compute.v1.NetworkEndpointWithHealthStatus\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x03\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\n\n\x08_warning\"\xbb\x01\n\x1fNetworkEndpointGroupsScopedList\x12Q\n\x17network_endpoint_groups\x18\xad\x97\xff\r \x03(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroup\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xcf\x01\n\x1fNetworkEndpointWithHealthStatus\x12K\n\x07healths\x18\x97\x93\xad{ \x03(\x0b\x32\x37.google.cloud.compute.v1.HealthStatusForNetworkEndpoint\x12J\n\x10network_endpoint\x18\x86\x91\x8a\x1b \x01(\x0b\x32(.google.cloud.compute.v1.NetworkEndpointH\x00\x88\x01\x01\x42\x13\n\x11_network_endpoint\"\xda\x03\n#NetworkFirewallPolicyAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12Y\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32G.google.cloud.compute.v1.NetworkFirewallPolicyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.FirewallPoliciesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbd\t\n\x10NetworkInterface\x12@\n\x0e\x61\x63\x63\x65ss_configs\x18\x96\xbb\xfa\x34 \x03(\x0b\x32%.google.cloud.compute.v1.AccessConfig\x12\x41\n\x0f\x61lias_ip_ranges\x18\xbf\x83\xdcN \x03(\x0b\x32%.google.cloud.compute.v1.AliasIpRange\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12+\n\x1binternal_ipv6_prefix_length\x18\x9d\x83\x99\x61 \x01(\x05H\x01\x88\x01\x01\x12\x46\n\x13ipv6_access_configs\x18\xee\xe5\xc4\xe6\x01 \x03(\x0b\x32%.google.cloud.compute.v1.AccessConfig\x12!\n\x10ipv6_access_type\x18\xdd\xf5\xd1\xf0\x01 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x06\x88\x01\x01\x12\"\n\x12network_attachment\x18\xd4\x97\x8fk \x01(\tH\x07\x88\x01\x01\x12\x1b\n\x0bnetwork_i_p\x18\x89\xb1\xe5\x62 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x08nic_type\x18\x91\xc6\xc2\x1c \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0bqueue_count\x18\xe1\xf8\x97\xf0\x01 \x01(\x05H\n\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\x0b\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x0c\x88\x01\x01\"y\n\x0eIpv6AccessType\x12\x1e\n\x1aUNDEFINED_IPV6_ACCESS_TYPE\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12$\n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\xa5\xf6\xa4\x95\x01\"\x89\x01\n\x07NicType\x12\x16\n\x12UNDEFINED_NIC_TYPE\x10\x00\x12\x0c\n\x05GVNIC\x10\x99\x95\xc3 \x12\x0b\n\x04IDPF\x10\xd1\xf0\x88\x01\x12\x0c\n\x05IRDMA\x10\x8f\x86\xac!\x12\x0c\n\x05MRDMA\x10\x93\xc2\x8d#\x12\x1b\n\x14UNSPECIFIED_NIC_TYPE\x10\xd9\xbe\x92 \x12\x12\n\nVIRTIO_NET\x10\xd9\xb6\xcb\xd7\x01\"{\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%\x12\x1e\n\x16UNSPECIFIED_STACK_TYPE\x10\xd9\xd1\x91\x8e\x01\x42\x0e\n\x0c_fingerprintB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x13\n\x11_ipv6_access_typeB\x0f\n\r_ipv6_addressB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\x15\n\x13_network_attachmentB\x0e\n\x0c_network_i_pB\x0b\n\t_nic_typeB\x0e\n\x0c_queue_countB\r\n\x0b_stack_typeB\r\n\x0b_subnetwork\"\x9f\x02\n\x0bNetworkList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x32\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32 .google.cloud.compute.v1.Network\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xba\x06\n\x0eNetworkPeering\x12\"\n\x12\x61uto_create_routes\x18\xdd\xe2\xb2\x1b \x01(\x08H\x00\x88\x01\x01\x12&\n\x16\x65xchange_subnet_routes\x18\xd0\xca\xc6\x0c \x01(\x08H\x01\x88\x01\x01\x12$\n\x14\x65xport_custom_routes\x18\x8d\xa5\xdf\x1c \x01(\x08H\x02\x88\x01\x01\x12\x33\n#export_subnet_routes_with_public_ip\x18\xe2\xea\xd9. \x01(\x08H\x03\x88\x01\x01\x12$\n\x14import_custom_routes\x18\xbe\xf1\xb3^ \x01(\x08H\x04\x88\x01\x01\x12\x33\n#import_subnet_routes_with_public_ip\x18\x91\x8e\xf0\x06 \x01(\x08H\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12\x18\n\x08peer_mtu\x18\xd1\x8e\x97! \x01(\x05H\x08\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\t\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\n\x88\x01\x01\x12\x1d\n\rstate_details\x18\x94\xf9\xc8- \x01(\tH\x0b\x88\x01\x01\"I\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\">\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08INACTIVE\x10\xeb\x98\xf9\x80\x01\x42\x15\n\x13_auto_create_routesB\x19\n\x17_exchange_subnet_routesB\x17\n\x15_export_custom_routesB&\n$_export_subnet_routes_with_public_ipB\x17\n\x15_import_custom_routesB&\n$_import_subnet_routes_with_public_ipB\x07\n\x05_nameB\n\n\x08_networkB\x0b\n\t_peer_mtuB\r\n\x0b_stack_typeB\x08\n\x06_stateB\x10\n\x0e_state_details\"\xce\x01\n\x18NetworkPerformanceConfig\x12+\n\x1btotal_egress_bandwidth_tier\x18\xff\x9f\x85> \x01(\tH\x00\x88\x01\x01\"e\n\x18TotalEgressBandwidthTier\x12)\n%UNDEFINED_TOTAL_EGRESS_BANDWIDTH_TIER\x10\x00\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\x12\x0e\n\x06TIER_1\x10\x94\xca\xf1\x9b\x01\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\x8a\x04\n\x0eNetworkProfile\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12P\n\x08\x66\x65\x61tures\x18\xbd\xc8\xb3u \x01(\x0b\x32\x36.google.cloud.compute.v1.NetworkProfileNetworkFeaturesH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12J\n\x08location\x18\xb5\xbf\xbe\x8a\x01 \x01(\x0b\x32/.google.cloud.compute.v1.NetworkProfileLocationH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\t\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0b\n\t_featuresB\x05\n\x03_idB\x07\n\x05_kindB\x0b\n\t_locationB\x07\n\x05_nameB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x07\n\x05_zone\"\x92\x01\n\x16NetworkProfileLocation\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05scope\x18\xd4\xfc\x8c\x34 \x01(\tH\x01\x88\x01\x01\"8\n\x05Scope\x12\x13\n\x0fUNDEFINED_SCOPE\x10\x00\x12\r\n\x06REGION\x10\xf4\xb5\xec~\x12\x0b\n\x04ZONE\x10\xac\xb7\xa8\x01\x42\x07\n\x05_nameB\x08\n\x06_scope\"\xfe(\n\x1dNetworkProfileNetworkFeatures\x12\x1c\n\x10\x61\x64\x64ress_purposes\x18\x80\xde\xbd\xce\x01 \x03(\t\x12&\n\x15\x61llow_alias_ip_ranges\x18\xc9\x91\xb1\xda\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16\x61llow_auto_mode_subnet\x18\x9f\x82\xc9H \x01(\tH\x01\x88\x01\x01\x12\'\n\x17\x61llow_class_d_firewalls\x18\x9b\xe3\xe0> \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0f\x61llow_cloud_nat\x18\xa1\xd5\xc1y \x01(\tH\x03\x88\x01\x01\x12#\n\x12\x61llow_cloud_router\x18\xc9\xcb\x8d\xd7\x01 \x01(\tH\x04\x88\x01\x01\x12,\n\x1c\x61llow_default_nic_attachment\x18\xae\xee\xda\x19 \x01(\tH\x05\x88\x01\x01\x12(\n\x18\x61llow_external_ip_access\x18\xbe\xb9\xdc> \x01(\tH\x06\x88\x01\x01\x12#\n\x12\x61llow_interconnect\x18\xc4\x93\xe1\x85\x01 \x01(\tH\x07\x88\x01\x01\x12$\n\x13\x61llow_ip_forwarding\x18\x9f\xdd\xe8\xee\x01 \x01(\tH\x08\x88\x01\x01\x12$\n\x14\x61llow_load_balancing\x18\xb6\x98\xc1j \x01(\tH\t\x88\x01\x01\x12/\n\x1f\x61llow_multi_nic_in_same_network\x18\xfc\xb4\x8a* \x01(\tH\n\x88\x01\x01\x12\x1a\n\tallow_ncc\x18\xd8\xde\xc6\xb1\x01 \x01(\tH\x0b\x88\x01\x01\x12\'\n\x17\x61llow_network_migration\x18\x87\xa7\x9fr \x01(\tH\x0c\x88\x01\x01\x12\'\n\x16\x61llow_packet_mirroring\x18\x82\xee\x9f\xf4\x01 \x01(\tH\r\x88\x01\x01\x12,\n\x1b\x61llow_private_google_access\x18\xf8\xff\xd5\xb2\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1a\n\tallow_psc\x18\xca\xf1\xc6\xb1\x01 \x01(\tH\x0f\x88\x01\x01\x12*\n\x1a\x61llow_same_network_unicast\x18\xfb\xa8\xf1O \x01(\tH\x10\x88\x01\x01\x12#\n\x13\x61llow_static_routes\x18\xc5\x9f\xabX \x01(\tH\x11\x88\x01\x01\x12$\n\x14\x61llow_sub_interfaces\x18\xef\xb2\xf0u \x01(\tH\x12\x88\x01\x01\x12!\n\x11\x61llow_vpc_peering\x18\xf4\xcb\x83\x37 \x01(\tH\x13\x88\x01\x01\x12\x1a\n\tallow_vpn\x18\xfe\x9d\xc7\xb1\x01 \x01(\tH\x14\x88\x01\x01\x12\x1a\n\x0finterface_types\x18\xf3\xb3\xaaK \x03(\t\x12\x1b\n\x0fsubnet_purposes\x18\xb7\x9b\xd8\x8f\x01 \x03(\t\x12\x1e\n\x12subnet_stack_types\x18\xa0\xec\xb7\xf8\x01 \x03(\t\x12\x1f\n\x13subnetwork_purposes\x18\xc6\xa0\xf1\xfb\x01 \x03(\t\x12\"\n\x16subnetwork_stack_types\x18\xb1\xea\xa5\xd0\x01 \x03(\t\x12\x17\n\x07unicast\x18\xaf\x90\x91w \x01(\tH\x15\x88\x01\x01\"\xf3\x01\n\x0f\x41\x64\x64ressPurposes\x12\x1e\n\x1aUNDEFINED_ADDRESS_PURPOSES\x10\x00\x12\x14\n\x0c\x44NS_RESOLVER\x10\xfc\xdc\x83\xe3\x01\x12\x13\n\x0cGCE_ENDPOINT\x10\xab\xc4\xf5m\x12\x1a\n\x12IPSEC_INTERCONNECT\x10\x83\xd2\xaa\xa2\x01\x12\x0f\n\x08NAT_AUTO\x10\xad\xb4\x85N\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x12\n\nSERVERLESS\x10\xdc\xc6\xfd\x80\x01\x12\x1f\n\x17SHARED_LOADBALANCER_VIP\x10\xd4\xd3\xb3\x8c\x01\x12\x13\n\x0bVPC_PEERING\x10\xaa\xf3\x8e\xbf\x01\"{\n\x12\x41llowAliasIpRanges\x12#\n\x1fUNDEFINED_ALLOW_ALIAS_IP_RANGES\x10\x00\x12\x1f\n\x17\x41LIAS_IP_RANGES_ALLOWED\x10\xe8\x9d\xd5\xdd\x01\x12\x1f\n\x17\x41LIAS_IP_RANGES_BLOCKED\x10\xac\xde\x80\x86\x01\"~\n\x13\x41llowAutoModeSubnet\x12$\n UNDEFINED_ALLOW_AUTO_MODE_SUBNET\x10\x00\x12 \n\x18\x41UTO_MODE_SUBNET_ALLOWED\x10\xb2\xac\xbb\xba\x01\x12\x1f\n\x18\x41UTO_MODE_SUBNET_BLOCKED\x10\xf6\xec\xe6\x62\"\x82\x01\n\x14\x41llowClassDFirewalls\x12%\n!UNDEFINED_ALLOW_CLASS_D_FIREWALLS\x10\x00\x12!\n\x19\x43LASS_D_FIREWALLS_ALLOWED\x10\xfa\xcf\x85\xa6\x01\x12 \n\x19\x43LASS_D_FIREWALLS_BLOCKED\x10\xbe\x90\xb1N\"b\n\rAllowCloudNat\x12\x1d\n\x19UNDEFINED_ALLOW_CLOUD_NAT\x10\x00\x12\x18\n\x11\x43LOUD_NAT_ALLOWED\x10\xa0\xba\xa2u\x12\x18\n\x11\x43LOUD_NAT_BLOCKED\x10\xe4\xfa\xcd\x1d\"o\n\x10\x41llowCloudRouter\x12 \n\x1cUNDEFINED_ALLOW_CLOUD_ROUTER\x10\x00\x12\x1c\n\x14\x43LOUD_ROUTER_ALLOWED\x10\xfc\xc3\x9d\xae\x01\x12\x1b\n\x14\x43LOUD_ROUTER_BLOCKED\x10\xc0\x84\xc9V\"\x96\x01\n\x19\x41llowDefaultNicAttachment\x12*\n&UNDEFINED_ALLOW_DEFAULT_NIC_ATTACHMENT\x10\x00\x12%\n\x1e\x44\x45\x46\x41ULT_NIC_ATTACHMENT_ALLOWED\x10\x81\x9c\xc2\x05\x12&\n\x1e\x44\x45\x46\x41ULT_NIC_ATTACHMENT_BLOCKED\x10\xc5\xdc\xed\xad\x01\"\x86\x01\n\x15\x41llowExternalIpAccess\x12&\n\"UNDEFINED_ALLOW_EXTERNAL_IP_ACCESS\x10\x00\x12!\n\x1a\x45XTERNAL_IP_ACCESS_ALLOWED\x10\xd1\x98\x9d\x34\x12\"\n\x1a\x45XTERNAL_IP_ACCESS_BLOCKED\x10\x95\xd9\xc8\xdc\x01\"p\n\x11\x41llowInterconnect\x12 \n\x1cUNDEFINED_ALLOW_INTERCONNECT\x10\x00\x12\x1b\n\x14INTERCONNECT_ALLOWED\x10\xd7\xa5\xd3M\x12\x1c\n\x14INTERCONNECT_BLOCKED\x10\x9b\xe6\xfe\xf5\x01\"s\n\x11\x41llowIpForwarding\x12!\n\x1dUNDEFINED_ALLOW_IP_FORWARDING\x10\x00\x12\x1c\n\x15IP_FORWARDING_ALLOWED\x10\xde\xd8\xe1H\x12\x1d\n\x15IP_FORWARDING_BLOCKED\x10\xa2\x99\x8d\xf1\x01\"w\n\x12\x41llowLoadBalancing\x12\"\n\x1eUNDEFINED_ALLOW_LOAD_BALANCING\x10\x00\x12\x1d\n\x16LOAD_BALANCING_ALLOWED\x10\xa9\xf1\xc5\r\x12\x1e\n\x16LOAD_BALANCING_BLOCKED\x10\xed\xb1\xf1\xb5\x01\"\xa1\x01\n\x1a\x41llowMultiNicInSameNetwork\x12-\n)UNDEFINED_ALLOW_MULTI_NIC_IN_SAME_NETWORK\x10\x00\x12)\n!MULTI_NIC_IN_SAME_NETWORK_ALLOWED\x10\xdb\xfb\x96\xda\x01\x12)\n!MULTI_NIC_IN_SAME_NETWORK_BLOCKED\x10\x9f\xbc\xc2\x82\x01\"M\n\x08\x41llowNcc\x12\x17\n\x13UNDEFINED_ALLOW_NCC\x10\x00\x12\x13\n\x0bNCC_ALLOWED\x10\xf7\xa6\xe5\xde\x01\x12\x13\n\x0bNCC_BLOCKED\x10\xbb\xe7\x90\x87\x01\"\x83\x01\n\x15\x41llowNetworkMigration\x12%\n!UNDEFINED_ALLOW_NETWORK_MIGRATION\x10\x00\x12 \n\x19NETWORK_MIGRATION_ALLOWED\x10\x86\xa4\xee\x06\x12!\n\x19NETWORK_MIGRATION_BLOCKED\x10\xca\xe4\x99\xaf\x01\"\x7f\n\x14\x41llowPacketMirroring\x12$\n UNDEFINED_ALLOW_PACKET_MIRRORING\x10\x00\x12\x1f\n\x18PACKET_MIRRORING_ALLOWED\x10\xf5\xd1\x88,\x12 \n\x18PACKET_MIRRORING_BLOCKED\x10\xb9\x92\xb4\xd4\x01\"\x91\x01\n\x18\x41llowPrivateGoogleAccess\x12)\n%UNDEFINED_ALLOW_PRIVATE_GOOGLE_ACCESS\x10\x00\x12$\n\x1dPRIVATE_GOOGLE_ACCESS_ALLOWED\x10\x97\xe5\xa3i\x12$\n\x1dPRIVATE_GOOGLE_ACCESS_BLOCKED\x10\xdb\xa5\xcf\x11\"L\n\x08\x41llowPsc\x12\x17\n\x13UNDEFINED_ALLOW_PSC\x10\x00\x12\x12\n\x0bPSC_ALLOWED\x10\xe9\x95\xe7Q\x12\x13\n\x0bPSC_BLOCKED\x10\xad\xd6\x92\xfa\x01\"\x8e\x01\n\x17\x41llowSameNetworkUnicast\x12(\n$UNDEFINED_ALLOW_SAME_NETWORK_UNICAST\x10\x00\x12#\n\x1cSAME_NETWORK_UNICAST_ALLOWED\x10\xce\xa8\x95L\x12$\n\x1cSAME_NETWORK_UNICAST_BLOCKED\x10\x92\xe9\xc0\xf4\x01\"s\n\x11\x41llowStaticRoutes\x12!\n\x1dUNDEFINED_ALLOW_STATIC_ROUTES\x10\x00\x12\x1d\n\x15STATIC_ROUTES_ALLOWED\x10\x84\xaf\x86\xc3\x01\x12\x1c\n\x15STATIC_ROUTES_BLOCKED\x10\xc8\xef\xb1k\"u\n\x12\x41llowSubInterfaces\x12\"\n\x1eUNDEFINED_ALLOW_SUB_INTERFACES\x10\x00\x12\x1c\n\x15SUBINTERFACES_ALLOWED\x10\xc3\xb5\xd5K\x12\x1d\n\x15SUBINTERFACES_BLOCKED\x10\x87\xf6\x80\xf4\x01\"j\n\x0f\x41llowVpcPeering\x12\x1f\n\x1bUNDEFINED_ALLOW_VPC_PEERING\x10\x00\x12\x1a\n\x13VPC_PEERING_ALLOWED\x10\xf3\xc7\xd6|\x12\x1a\n\x13VPC_PEERING_BLOCKED\x10\xb7\x88\x82%\"L\n\x08\x41llowVpn\x12\x17\n\x13UNDEFINED_ALLOW_VPN\x10\x00\x12\x12\n\x0bVPN_ALLOWED\x10\x9d\xda\xa9M\x12\x13\n\x0bVPN_BLOCKED\x10\xe1\x9a\xd5\xf5\x01\"\x97\x01\n\x0eInterfaceTypes\x12\x1d\n\x19UNDEFINED_INTERFACE_TYPES\x10\x00\x12\x0c\n\x05GVNIC\x10\x99\x95\xc3 \x12\x0b\n\x04IDPF\x10\xd1\xf0\x88\x01\x12\x0c\n\x05IRDMA\x10\x8f\x86\xac!\x12\x0c\n\x05MRDMA\x10\x93\xc2\x8d#\x12\x1b\n\x14UNSPECIFIED_NIC_TYPE\x10\xd9\xbe\x92 \x12\x12\n\nVIRTIO_NET\x10\xd9\xb6\xcb\xd7\x01\"w\n\x0eSubnetPurposes\x12\x1d\n\x19UNDEFINED_SUBNET_PURPOSES\x10\x00\x12&\n\x1eSUBNET_PURPOSE_CUSTOM_HARDWARE\x10\xd3\xdd\x82\x87\x01\x12\x1e\n\x16SUBNET_PURPOSE_PRIVATE\x10\xc0\xec\xe8\xc0\x01\"\xa0\x01\n\x10SubnetStackTypes\x12 \n\x1cUNDEFINED_SUBNET_STACK_TYPES\x10\x00\x12\"\n\x1bSUBNET_STACK_TYPE_IPV4_IPV6\x10\x95\x97\xe2\x13\x12\"\n\x1bSUBNET_STACK_TYPE_IPV4_ONLY\x10\xba\xfa\xec\x13\x12\"\n\x1bSUBNET_STACK_TYPE_IPV6_ONLY\x10\xf8\xdc\x93/\"\xef\x01\n\x12SubnetworkPurposes\x12!\n\x1dUNDEFINED_SUBNETWORK_PURPOSES\x10\x00\x12\x1b\n\x14GLOBAL_MANAGED_PROXY\x10\xf2\xcb\xe0p\x12#\n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\xd9\xb6\xcev\x12\x16\n\x0ePEER_MIGRATION\x10\x91\xaa\xc7\xea\x01\x12\x0f\n\x07PRIVATE\x10\xe3\xe2\xb2\xc0\x01\x12\x13\n\x0bPRIVATE_NAT\x10\xa5\xc8\xae\xaf\x01\x12\x17\n\x10PRIVATE_RFC_1918\x10\xdb\xfe\xc5y\x12\x1d\n\x16REGIONAL_MANAGED_PROXY\x10\xee\xb6\xfdH\"r\n\x14SubnetworkStackTypes\x12$\n UNDEFINED_SUBNETWORK_STACK_TYPES\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%\"J\n\x07Unicast\x12\x15\n\x11UNDEFINED_UNICAST\x10\x00\x12\x13\n\x0bUNICAST_SDN\x10\xed\xc7\x96\xb5\x01\x12\x13\n\x0bUNICAST_ULL\x10\xe5\xd8\x96\xb5\x01\x42\x18\n\x16_allow_alias_ip_rangesB\x19\n\x17_allow_auto_mode_subnetB\x1a\n\x18_allow_class_d_firewallsB\x12\n\x10_allow_cloud_natB\x15\n\x13_allow_cloud_routerB\x1f\n\x1d_allow_default_nic_attachmentB\x1b\n\x19_allow_external_ip_accessB\x15\n\x13_allow_interconnectB\x16\n\x14_allow_ip_forwardingB\x17\n\x15_allow_load_balancingB\"\n _allow_multi_nic_in_same_networkB\x0c\n\n_allow_nccB\x1a\n\x18_allow_network_migrationB\x19\n\x17_allow_packet_mirroringB\x1e\n\x1c_allow_private_google_accessB\x0c\n\n_allow_pscB\x1d\n\x1b_allow_same_network_unicastB\x16\n\x14_allow_static_routesB\x17\n\x15_allow_sub_interfacesB\x14\n\x12_allow_vpc_peeringB\x0c\n\n_allow_vpnB\n\n\x08_unicast\"\xee\x02\n\x1bNetworkProfilesListResponse\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.NetworkProfile\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xae\x06\n\x14NetworkRoutingConfig\x12&\n\x16\x62gp_always_compare_med\x18\xb6\xe2\xce\x65 \x01(\x08H\x00\x88\x01\x01\x12-\n\x1c\x62gp_best_path_selection_mode\x18\xe9\xfb\xc5\x97\x01 \x01(\tH\x01\x88\x01\x01\x12&\n\x15\x62gp_inter_region_cost\x18\xe1\xf9\xae\xdc\x01 \x01(\tH\x02\x88\x01\x01\x12\x30\n effective_bgp_always_compare_med\x18\xce\xf5\xad\x66 \x01(\x08H\x03\x88\x01\x01\x12/\n\x1f\x65\x66\x66\x65\x63tive_bgp_inter_region_cost\x18\xc9\xc0\xa1X \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x0crouting_mode\x18\xfc\xba\xc8\xe2\x01 \x01(\tH\x05\x88\x01\x01\"g\n\x18\x42gpBestPathSelectionMode\x12*\n&UNDEFINED_BGP_BEST_PATH_SELECTION_MODE\x10\x00\x12\r\n\x06LEGACY\x10\xc9\xcf\xf7,\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\"b\n\x12\x42gpInterRegionCost\x12#\n\x1fUNDEFINED_BGP_INTER_REGION_COST\x10\x00\x12\x17\n\x0f\x41\x44\x44_COST_TO_MED\x10\xdc\xe7\xf6\xe9\x01\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\"L\n\x1b\x45\x66\x66\x65\x63tiveBgpInterRegionCost\x12-\n)UNDEFINED_EFFECTIVE_BGP_INTER_REGION_COST\x10\x00\"J\n\x0bRoutingMode\x12\x1a\n\x16UNDEFINED_ROUTING_MODE\x10\x00\x12\x0e\n\x06GLOBAL\x10\xa3\xef\xef\xeb\x01\x12\x0f\n\x08REGIONAL\x10\x9f\xec\x80,B\x19\n\x17_bgp_always_compare_medB\x1f\n\x1d_bgp_best_path_selection_modeB\x18\n\x16_bgp_inter_region_costB#\n!_effective_bgp_always_compare_medB\"\n _effective_bgp_inter_region_costB\x0f\n\r_routing_mode\"\x84\x02\n\x19NetworksAddPeeringRequest\x12\"\n\x12\x61uto_create_routes\x18\xdd\xe2\xb2\x1b \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12I\n\x0fnetwork_peering\x18\xaf\x8c\xec\x9c\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.NetworkPeeringH\x02\x88\x01\x01\x12\x1d\n\x0cpeer_network\x18\xd1\xe0\xdb\xee\x01 \x01(\tH\x03\x88\x01\x01\x42\x15\n\x13_auto_create_routesB\x07\n\x05_nameB\x12\n\x10_network_peeringB\x0f\n\r_peer_network\"\xd6\x01\n%NetworksGetEffectiveFirewallsResponse\x12s\n\x10\x66irewall_policys\x18\xc2\xca\xfc\xc3\x01 \x03(\x0b\x32U.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x38\n\tfirewalls\x18\xf3\xc6\xe8\x81\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Firewall\"\xf3\x03\n.google.cloud.compute.v1.NodeTemplateAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a^\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.compute.v1.NodeTemplatesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa9\x02\n\x10NodeTemplateList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x37\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32%.google.cloud.compute.v1.NodeTemplate\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8e\x01\n\x1fNodeTemplateNodeTypeFlexibility\x12\x14\n\x04\x63pus\x18\xcb\xe7\xba\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tlocal_ssd\x18\xb0\xbe\xbc\xc1\x01 \x01(\tH\x01\x88\x01\x01\x12\x17\n\x06memory\x18\x81\xfa\x8a\xfe\x01 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_cpusB\x0c\n\n_local_ssdB\t\n\x07_memory\"\xa3\x01\n\x17NodeTemplatesScopedList\x12\x41\n\x0enode_templates\x18\xbc\xa2\xed\xa8\x01 \x03(\x0b\x32%.google.cloud.compute.v1.NodeTemplate\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xc6\x04\n\x08NodeType\x12\x1d\n\x0c\x63pu_platform\x18\xaa\xea\xd1\xc3\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nguest_cpus\x18\xd2\xcb\xc8\xbb\x01 \x01(\x05H\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12\x1d\n\x0clocal_ssd_gb\x18\xca\x88\xff\x9c\x01 \x01(\x05H\x07\x88\x01\x01\x12\x18\n\x07max_vms\x18\xc1\x96\xd5\x92\x01 \x01(\x05H\x08\x88\x01\x01\x12\x19\n\tmemory_mb\x18\x93\x93\xa8\x37 \x01(\x05H\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0b\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0c\x88\x01\x01\x42\x0f\n\r_cpu_platformB\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\r\n\x0b_guest_cpusB\x05\n\x03_idB\x07\n\x05_kindB\x0f\n\r_local_ssd_gbB\n\n\x08_max_vmsB\x0c\n\n_memory_mbB\x07\n\x05_nameB\x0c\n\n_self_linkB\x07\n\x05_zone\"\xb9\x03\n\x16NodeTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12L\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32:.google.cloud.compute.v1.NodeTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aZ\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.compute.v1.NodeTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa1\x02\n\x0cNodeTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.NodeType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x97\x01\n\x13NodeTypesScopedList\x12\x39\n\nnode_types\x18\xfc\xbf\xf5\xe5\x01 \x03(\x0b\x32!.google.cloud.compute.v1.NodeType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x90\x03\n\x14NotificationEndpoint\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12Y\n\rgrpc_settings\x18\xa4\xc6\xc0\xd9\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.NotificationEndpointGrpcSettingsH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x10\n\x0e_grpc_settingsB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x0c\n\n_self_link\"\xb7\x02\n NotificationEndpointGrpcSettings\x12\x1a\n\tauthority\x18\xc3\x8e\xd0\xbf\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08\x65ndpoint\x18\x95\xbb\x9c> \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0cpayload_name\x18\x9c\xb5\x9c\x8f\x01 \x01(\tH\x02\x88\x01\x01\x12\x43\n\x0fresend_interval\x18\xc9\xb8\x88\xe4\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x03\x88\x01\x01\x12\"\n\x12retry_duration_sec\x18\xdd\xce\x94\x37 \x01(\rH\x04\x88\x01\x01\x42\x0c\n\n_authorityB\x0b\n\t_endpointB\x0f\n\r_payload_nameB\x12\n\x10_resend_intervalB\x15\n\x13_retry_duration_sec\"\xb9\x02\n\x18NotificationEndpointList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.NotificationEndpoint\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbd\x0c\n\tOperation\x12$\n\x13\x63lient_operation_id\x18\xe7\x8d\xde\x8d\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08\x65nd_time\x18\xb1\xa7\xe7\x36 \x01(\tH\x03\x88\x01\x01\x12\x35\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x1e.google.cloud.compute.v1.ErrorH\x04\x88\x01\x01\x12\'\n\x12http_error_message\x18\xd9\xfa\xc8` \x01(\tB\x03\xe8G\x04H\x05\x88\x01\x01\x12,\n\x16http_error_status_code\x18\xec\x84\xf8\x94\x01 \x01(\x05\x42\x03\xe8G\x03H\x06\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12\x1c\n\x0binsert_time\x18\x93\xa9\xe8\xce\x01 \x01(\tH\x08\x88\x01\x01\x12w\n(instances_bulk_insert_operation_metadata\x18\xc1\x86\xc1* \x01(\x0b\x32=.google.cloud.compute.v1.InstancesBulkInsertOperationMetadataH\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12\x19\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tB\x03\xe8G\x01H\x0b\x88\x01\x01\x12\"\n\x12operation_group_id\x18\xb3\xed\x93\x13 \x01(\tH\x0c\x88\x01\x01\x12\x1e\n\x0eoperation_type\x18\x92\xf6\xdaT \x01(\tH\r\x88\x01\x01\x12\x18\n\x08progress\x18\xad\x84\xd3\" \x01(\x05H\x0e\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0f\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x10\x88\x01\x01\x12\x85\x01\n/set_common_instance_metadata_operation_metadata\x18\xe4\xad\xea\xe9\x01 \x01(\x0b\x32\x43.google.cloud.compute.v1.SetCommonInstanceMetadataOperationMetadataH\x11\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x12\x88\x01\x01\x12\x46\n\x06status\x18\xf2\x9f\xb7V \x01(\x0e\x32).google.cloud.compute.v1.Operation.StatusB\x03\xe8G\x02H\x13\x88\x01\x01\x12\x1f\n\x0estatus_message\x18\xba\xc9\xe9\x8d\x01 \x01(\tH\x14\x88\x01\x01\x12\x19\n\ttarget_id\x18\x89\x95\x8d{ \x01(\x04H\x15\x88\x01\x01\x12\x1b\n\x0btarget_link\x18\xe8\x93\xf1\x1d \x01(\tH\x16\x88\x01\x01\x12\x14\n\x04user\x18\xcb\xd7\xdb\x01 \x01(\tH\x17\x88\x01\x01\x12\x37\n\x08warnings\x18\xd7\x88\xc1\xed\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Warnings\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x18\x88\x01\x01\"K\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0b\n\x04\x44ONE\x10\x82\xb7\x80\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x42\x16\n\x14_client_operation_idB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0b\n\t_end_timeB\x08\n\x06_errorB\x15\n\x13_http_error_messageB\x19\n\x17_http_error_status_codeB\x05\n\x03_idB\x0e\n\x0c_insert_timeB+\n)_instances_bulk_insert_operation_metadataB\x07\n\x05_kindB\x07\n\x05_nameB\x15\n\x13_operation_group_idB\x11\n\x0f_operation_typeB\x0b\n\t_progressB\t\n\x07_regionB\x0c\n\n_self_linkB2\n0_set_common_instance_metadata_operation_metadataB\r\n\x0b_start_timeB\t\n\x07_statusB\x11\n\x0f_status_messageB\x0c\n\n_target_idB\x0e\n\x0c_target_linkB\x07\n\x05_userB\x07\n\x05_zone\"\xbc\x03\n\x17OperationAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12M\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32;.google.cloud.compute.v1.OperationAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a[\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.compute.v1.OperationsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa3\x02\n\rOperationList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x34\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\".google.cloud.compute.v1.Operation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x98\x01\n\x14OperationsScopedList\x12\x39\n\noperations\x18\xec\xaf\xff\x01 \x03(\x0b\x32\".google.cloud.compute.v1.Operation\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xda\x06\n\x10OutlierDetection\x12\x45\n\x12\x62\x61se_ejection_time\x18\x87\xd7\xcf& \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x00\x88\x01\x01\x12#\n\x12\x63onsecutive_errors\x18\xa0\xb3\xd0\xb8\x01 \x01(\x05H\x01\x88\x01\x01\x12,\n\x1b\x63onsecutive_gateway_failure\x18\xfa\xb7\x8a\xc7\x01 \x01(\x05H\x02\x88\x01\x01\x12,\n\x1c\x65nforcing_consecutive_errors\x18\xc0\xd3\xd0\x65 \x01(\x05H\x03\x88\x01\x01\x12\x36\n%enforcing_consecutive_gateway_failure\x18\xda\xdf\x8a\xbc\x01 \x01(\x05H\x04\x88\x01\x01\x12&\n\x16\x65nforcing_success_rate\x18\xbc\xef\xdf\\ \x01(\x05H\x05\x88\x01\x01\x12;\n\x08interval\x18\xc5\xc9\xff\x0f \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x06\x88\x01\x01\x12$\n\x14max_ejection_percent\x18\x98\xa6\xe5\x08 \x01(\x05H\x07\x88\x01\x01\x12+\n\x1asuccess_rate_minimum_hosts\x18\xf7\xa1\xda\xfa\x01 \x01(\x05H\x08\x88\x01\x01\x12,\n\x1bsuccess_rate_request_volume\x18\xcd\xeb\x98\x86\x01 \x01(\x05H\t\x88\x01\x01\x12)\n\x19success_rate_stdev_factor\x18\x9d\x83\xa9S \x01(\x05H\n\x88\x01\x01\x42\x15\n\x13_base_ejection_timeB\x15\n\x13_consecutive_errorsB\x1e\n\x1c_consecutive_gateway_failureB\x1f\n\x1d_enforcing_consecutive_errorsB(\n&_enforcing_consecutive_gateway_failureB\x19\n\x17_enforcing_success_rateB\x0b\n\t_intervalB\x17\n\x15_max_ejection_percentB\x1d\n\x1b_success_rate_minimum_hostsB\x1e\n\x1c_success_rate_request_volumeB\x1c\n\x1a_success_rate_stdev_factor\"\xc6\x03\n\x0fPacketIntervals\x12\x16\n\x06\x61vg_ms\x18\xb3\xdc\xd4\x61 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x08\x64uration\x18\x94\x9b\x91J \x01(\tH\x01\x88\x01\x01\x12\x17\n\x06max_ms\x18\xe1\xc4\xbc\xfc\x01 \x01(\x03H\x02\x88\x01\x01\x12\x17\n\x06min_ms\x18\xb3\xa5\xed\xff\x01 \x01(\x03H\x03\x88\x01\x01\x12\x1d\n\rnum_intervals\x18\xd5\xd5\xecX \x01(\x03H\x04\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x05\x88\x01\x01\"g\n\x08\x44uration\x12\x16\n\x12UNDEFINED_DURATION\x10\x00\x12\x1c\n\x14\x44URATION_UNSPECIFIED\x10\xec\xf9\xa3\xfc\x01\x12\x0b\n\x04HOUR\x10\xe4\xdb\x87\x01\x12\t\n\x03MAX\x10\xc4\xd2\x04\x12\r\n\x06MINUTE\x10\x94\xb4\xba<\"h\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\x08LOOPBACK\x10\x8b\x93\xeb\xa9\x01\x12\x0e\n\x07RECEIVE\x10\xc3\xfd\xb7Z\x12\x10\n\x08TRANSMIT\x10\xb0\x85\xfb\xd7\x01\x12\x18\n\x10TYPE_UNSPECIFIED\x10\x92\xfb\xdb\xd0\x01\x42\t\n\x07_avg_msB\x0b\n\t_durationB\t\n\x07_max_msB\t\n\x07_min_msB\x10\n\x0e_num_intervalsB\x07\n\x05_type\"\xba\x06\n\x0fPacketMirroring\x12Z\n\rcollector_ilb\x18\xed\x89\xb6\xcb\x01 \x01(\x0b\x32:.google.cloud.compute.v1.PacketMirroringForwardingRuleInfoH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\tH\x03\x88\x01\x01\x12G\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\x0b\x32..google.cloud.compute.v1.PacketMirroringFilterH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12`\n\x12mirrored_resources\x18\xc4\x9f\xc2; \x01(\x0b\x32<.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12L\n\x07network\x18\xae\xb4\x85o \x01(\x0b\x32\x33.google.cloud.compute.v1.PacketMirroringNetworkInfoH\t\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\rH\n\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\"9\n\x06\x45nable\x12\x14\n\x10UNDEFINED_ENABLE\x10\x00\x12\x0c\n\x05\x46\x41LSE\x10\x83\xc2\xe4\x1f\x12\x0b\n\x04TRUE\x10\x8e\xdb\x9d\x01\x42\x10\n\x0e_collector_ilbB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\t\n\x07_enableB\t\n\x07_filterB\x05\n\x03_idB\x07\n\x05_kindB\x15\n\x13_mirrored_resourcesB\x07\n\x05_nameB\n\n\x08_networkB\x0b\n\t_priorityB\t\n\x07_regionB\x0c\n\n_self_link\"\xce\x03\n\x1dPacketMirroringAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.PacketMirroringAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.PacketMirroringsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xc6\x01\n\x15PacketMirroringFilter\x12\x18\n\rI_p_protocols\x18\xd6\xd9\xfe. \x03(\t\x12\x17\n\x0b\x63idr_ranges\x18\x81\x94\xd3\xe8\x01 \x03(\t\x12\x19\n\tdirection\x18\xff\x8e\x80\x35 \x01(\tH\x00\x88\x01\x01\"Q\n\tDirection\x12\x17\n\x13UNDEFINED_DIRECTION\x10\x00\x12\n\n\x04\x42OTH\x10\x81\xe7|\x12\x0e\n\x06\x45GRESS\x10\xf5\xf6\xb4\xce\x01\x12\x0f\n\x07INGRESS\x10\x95\xfd\xbe\xf6\x01\x42\x0c\n\n_direction\"q\n!PacketMirroringForwardingRuleInfo\x12\x1e\n\rcanonical_url\x18\xa4\xff\xa3\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_canonical_urlB\x06\n\x04_url\"\xaf\x02\n\x13PacketMirroringList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.PacketMirroring\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xf7\x01\n#PacketMirroringMirroredResourceInfo\x12^\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32H.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo\x12_\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\x0b\x32\x46.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo\x12\x0f\n\x04tags\x18\x99\xe8\xd8\x01 \x03(\t\"\x7f\n/PacketMirroringMirroredResourceInfoInstanceInfo\x12\x1e\n\rcanonical_url\x18\xa4\xff\xa3\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_canonical_urlB\x06\n\x04_url\"}\n-PacketMirroringMirroredResourceInfoSubnetInfo\x12\x1e\n\rcanonical_url\x18\xa4\xff\xa3\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_canonical_urlB\x06\n\x04_url\"j\n\x1aPacketMirroringNetworkInfo\x12\x1e\n\rcanonical_url\x18\xa4\xff\xa3\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_canonical_urlB\x06\n\x04_url\"\xab\x01\n\x1aPacketMirroringsScopedList\x12\x46\n\x11packet_mirrorings\x18\xa7\xfa\xdcI \x03(\x0b\x32(.google.cloud.compute.v1.PacketMirroring\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xf9\x01\n\x16PatchAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x00\x88\x01\x01\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_autoscalerB\r\n\x0b_request_id\"\xdb\x01\n\x19PatchBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12P\n\x17\x62\x61\x63kend_bucket_resource\x18\x98\xce\xc7\xb5\x01 \x01(\x0b\x32&.google.cloud.compute.v1.BackendBucketB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe0\x01\n\x1aPatchBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbd\x01\n\x1aPatchFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc5\x01\n\x14PatchFirewallRequest\x12\x19\n\x08\x66irewall\x18\x80\xfa\xd5\xf3\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x11\x66irewall_resource\x18\xed\xb0\xe0\x13 \x01(\x0b\x32!.google.cloud.compute.v1.FirewallB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x81\x02\n\x1aPatchForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66orwarding_rule_resource\x18\xaf\xc0\xd0\x8f\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.ForwardingRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe6\x01\n PatchGlobalForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66orwarding_rule_resource\x18\xaf\xc0\xd0\x8f\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.ForwardingRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x83\x02\n(PatchGlobalPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12`\n public_delegated_prefix_resource\x18\x85\xf8\xd8\x16 \x01(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefixB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd3\x01\n\x17PatchHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb9\x01\n\x11PatchImageRequest\x12\x15\n\x05image\x18\xdb\xd2\xea/ \x01(\tB\x03\xe0\x41\x02\x12?\n\x0eimage_resource\x18\xf2\xc4\xfe\xb0\x01 \x01(\x0b\x32\x1e.google.cloud.compute.v1.ImageB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x95\x02\n PatchInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12^\n\x1finstance_group_manager_resource\x18\x8a\x8a\xbe| \x01(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManagerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x8e\x02\n\x1bPatchInstanceSettingRequest\x12V\n\x1ainstance_settings_resource\x18\x80\xa7\xce\x8a\x01 \x01(\x0b\x32).google.cloud.compute.v1.InstanceSettingsB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xa0\x02\n\"PatchInterconnectAttachmentRequest\x12(\n\x17interconnect_attachment\x18\xf4\x8a\xf7\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x61\n interconnect_attachment_resource\x18\xf9\xa4\xa0\x65 \x01(\x0b\x32/.google.cloud.compute.v1.InterconnectAttachmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd5\x01\n\x18PatchInterconnectRequest\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tB\x03\xe0\x41\x02\x12M\n\x15interconnect_resource\x18\x9f\xa1\xcc\xbd\x01 \x01(\x0b\x32%.google.cloud.compute.v1.InterconnectB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x8b\x02\n\x1dPatchNetworkAttachmentRequest\x12\"\n\x12network_attachment\x18\xd4\x97\x8fk \x01(\tB\x03\xe0\x41\x02\x12W\n\x1bnetwork_attachment_resource\x18\x99\xf0\xcc\x64 \x01(\x0b\x32*.google.cloud.compute.v1.NetworkAttachmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x83\x03\n&PatchNetworkEdgeSecurityServiceRequest\x12-\n\x1dnetwork_edge_security_service\x18\xa7\x9f\xefJ \x01(\tB\x03\xe0\x41\x02\x12l\n&network_edge_security_service_resource\x18\xa6\xa3\xdb\xe3\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.NetworkEdgeSecurityServiceB\x03\xe0\x41\x02\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xe7\x01\n!PatchNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc0\x01\n\x13PatchNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x10network_resource\x18\xff\xdd\x9c: \x01(\x0b\x32 .google.cloud.compute.v1.NetworkB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe9\x01\n\x15PatchNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13node_group_resource\x18\xab\xb3\xfa\xf0\x01 \x01(\x0b\x32\".google.cloud.compute.v1.NodeGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x84\x02\n\x1bPatchPacketMirroringRequest\x12 \n\x10packet_mirroring\x18\xcc\xb9\xd1\n \x01(\tB\x03\xe0\x41\x02\x12T\n\x19packet_mirroring_resource\x18\xa1\xfc\xa8\xeb\x01 \x01(\x0b\x32(.google.cloud.compute.v1.PacketMirroringB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xaa\x02\n4PatchPacketMirroringRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xe4\x02\n2PatchPerInstanceConfigsInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x9a\x01\n?instance_group_managers_patch_per_instance_configs_req_resource\x18\xff\x9b\x88\xaa\x01 \x01(\x0b\x32H.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReqB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xef\x02\n8PatchPerInstanceConfigsRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9b\x01\n@region_instance_group_manager_patch_instance_config_req_resource\x18\xca\xcd\xa1^ \x01(\x0b\x32I.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReqB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x81\x02\n#PatchPublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\x12\x62\n!public_advertised_prefix_resource\x18\x8f\xd7\xb2o \x01(\x0b\x32/.google.cloud.compute.v1.PublicAdvertisedPrefixB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9e\x02\n\"PatchPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12`\n public_delegated_prefix_resource\x18\x85\xf8\xd8\x16 \x01(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefixB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x83\x02\n\x1cPatchRegionAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x00\x88\x01\x01\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_autoscalerB\r\n\x0b_request_id\"\x87\x02\n PatchRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xfa\x01\n\x1dPatchRegionHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x99\x02\n$PatchRegionHealthCheckServiceRequest\x12%\n\x14health_check_service\x18\xdb\x9b\xdd\xc2\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dhealth_check_service_resource\x18\xf2\x9b\xd0\xe3\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HealthCheckServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9f\x02\n&PatchRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12^\n\x1finstance_group_manager_resource\x18\x8a\x8a\xbe| \x01(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManagerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x8e\x02\n\'PatchRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb3\x02\n PatchRegionSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12Q\n\x18security_policy_resource\x18\xfc\xaa\x89g \x01(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicyB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xf3\x01\n\x1bPatchRegionSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13ssl_policy_resource\x18\xc8\x88\x8a\x83\x01 \x01(\x0b\x32\".google.cloud.compute.v1.SslPolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x90\x02\n\"PatchRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x12W\n\x1btarget_https_proxy_resource\x18\x81\xad\xe4\xce\x01 \x01(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe6\x01\n\x18PatchRegionUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xad\x02\n\x1aPatchResourcePolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fresource_policy\x18\x83\xa5\xf7K \x01(\tB\x03\xe0\x41\x02\x12Q\n\x18resource_policy_resource\x18\xca\x8c\xd1$ \x01(\x0b\x32\'.google.cloud.compute.v1.ResourcePolicyB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xf3\x01\n\x1dPatchRoutePolicyRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12K\n\x15route_policy_resource\x18\x85\xbd\xb5\x37 \x01(\x0b\x32$.google.cloud.compute.v1.RoutePolicyB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xdd\x01\n\x12PatchRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0frouter_resource\x18\xc4\x80\x82J \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf1\x01\n\x1ePatchRuleFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\x9b\x02\n%PatchRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xc2\x02\n+PatchRuleRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xef\x02\n$PatchRuleRegionSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dsecurity_policy_rule_resource\x18\xc3\xba\x82\xc0\x01 \x01(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRuleB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x02\x88\x01\x01\x42\x0b\n\t_priorityB\x0e\n\x0c_update_maskB\x10\n\x0e_validate_only\"\xc8\x02\n\x1ePatchRuleSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dsecurity_policy_rule_resource\x18\xc3\xba\x82\xc0\x01 \x01(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRuleB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x02\x88\x01\x01\x42\x0b\n\t_priorityB\x0e\n\x0c_update_maskB\x10\n\x0e_validate_only\"\x8c\x02\n\x1aPatchSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12Q\n\x18security_policy_resource\x18\xfc\xaa\x89g \x01(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicyB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\x8d\x02\n\x1dPatchServiceAttachmentRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12#\n\x12service_attachment\x18\xed\xa9\xd0\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x12X\n\x1bservice_attachment_resource\x18\xa0\xb6\xc4\xe1\x01 \x01(\x0b\x32*.google.cloud.compute.v1.ServiceAttachmentB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf1\x01\n\x1bPatchSnapshotSettingRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12V\n\x1asnapshot_settings_resource\x18\xef\x8d\xc6\xaa\x01 \x01(\x0b\x32).google.cloud.compute.v1.SnapshotSettingsB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xcc\x01\n\x15PatchSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13ssl_policy_resource\x18\xc8\x88\x8a\x83\x01 \x01(\x0b\x32\".google.cloud.compute.v1.SslPolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb0\x02\n\x16PatchSubnetworkRequest\x12&\n\x15\x64rain_timeout_seconds\x18\xda\xda\xc8\xaa\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13subnetwork_resource\x18\xbf\xda\x91\x14 \x01(\x0b\x32#.google.cloud.compute.v1.SubnetworkB\x03\xe0\x41\x02\x42\x18\n\x16_drain_timeout_secondsB\r\n\x0b_request_id\"\xe5\x01\n\x1bPatchTargetGrpcProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_grpc_proxy\x18\xfb\xb4\xb2\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1atarget_grpc_proxy_resource\x18\xd2\xea\xeb\x9c\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetGrpcProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe4\x01\n\x1bPatchTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x12T\n\x1atarget_http_proxy_resource\x18\xa8\xaf\xe3\x0b \x01(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe9\x01\n\x1cPatchTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x12W\n\x1btarget_https_proxy_resource\x18\x81\xad\xe4\xce\x01 \x01(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbf\x01\n\x12PatchUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd2\x05\n\x0bPathMatcher\x12h\n$default_custom_error_response_policy\x18\xa9\x8b\xe0& \x01(\x0b\x32\x32.google.cloud.compute.v1.CustomErrorResponsePolicyH\x00\x88\x01\x01\x12O\n\x14\x64\x65\x66\x61ult_route_action\x18\xaa\xb4\xd7\xb4\x01 \x01(\x0b\x32(.google.cloud.compute.v1.HttpRouteActionH\x01\x88\x01\x01\x12 \n\x0f\x64\x65\x66\x61ult_service\x18\xb7\xe5\xc5\xb0\x01 \x01(\tH\x02\x88\x01\x01\x12R\n\x14\x64\x65\x66\x61ult_url_redirect\x18\xea\xab\xb6\xab\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpRedirectActionH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12I\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32).google.cloud.compute.v1.HttpHeaderActionH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x38\n\npath_rules\x18\xdd\xc0\xe6\x31 \x03(\x0b\x32!.google.cloud.compute.v1.PathRule\x12?\n\x0broute_rules\x18\x81\x87\xb7\xb3\x01 \x03(\x0b\x32&.google.cloud.compute.v1.HttpRouteRuleB\'\n%_default_custom_error_response_policyB\x17\n\x15_default_route_actionB\x12\n\x10_default_serviceB\x17\n\x15_default_url_redirectB\x0e\n\x0c_descriptionB\x10\n\x0e_header_actionB\x07\n\x05_name\"\xfc\x02\n\x08PathRule\x12`\n\x1c\x63ustom_error_response_policy\x18\xeb\xf8\xda` \x01(\x0b\x32\x32.google.cloud.compute.v1.CustomErrorResponsePolicyH\x00\x88\x01\x01\x12\x10\n\x05paths\x18\xee\xc1\xe0\x32 \x03(\t\x12G\n\x0croute_action\x18\xec\xa9\xb9\xca\x01 \x01(\x0b\x32(.google.cloud.compute.v1.HttpRouteActionH\x01\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x02\x88\x01\x01\x12J\n\x0curl_redirect\x18\xac\xa1\x98\xc1\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpRedirectActionH\x03\x88\x01\x01\x42\x1f\n\x1d_custom_error_response_policyB\x0f\n\r_route_actionB\n\n\x08_serviceB\x0f\n\r_url_redirect\"\xf3\x02\n\x11PerInstanceConfig\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12H\n\x0fpreserved_state\x18\xaa\xe2\xa0\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.PreservedStateH\x02\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x03\x88\x01\x01\"\x90\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x41PPLYING\x10\xb4\xcb\xec\xa7\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x10\n\tEFFECTIVE\x10\x87\xf3\xb8t\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x11\n\tUNAPPLIED\x10\xa4\x87\xe1\xe6\x01\x12\x1a\n\x12UNAPPLIED_DELETION\x10\x89\xb4\xda\x95\x01\x42\x0e\n\x0c_fingerprintB\x07\n\x05_nameB\x12\n\x10_preserved_stateB\t\n\x07_status\"\xa8\x01\n!PerformMaintenanceInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xac\x02\n\"PerformMaintenanceNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12~\n0node_groups_perform_maintenance_request_resource\x18\xd6\xb8\xaeX \x01(\x0b\x32<.google.cloud.compute.v1.NodeGroupsPerformMaintenanceRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe9\x02\n)PerformMaintenanceReservationBlockRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11reservation_block\x18\xda\xc4\x89\xfe\x01 \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n8reservations_blocks_perform_maintenance_request_resource\x18\x89\xa9\xd4\xe7\x01 \x01(\x0b\x32\x44.google.cloud.compute.v1.ReservationsBlocksPerformMaintenanceRequestB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb2\x02\n$PerformMaintenanceReservationRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\x81\x01\n1reservations_perform_maintenance_request_resource\x18\xa0\xf5\x94\x0e \x01(\x0b\x32>.google.cloud.compute.v1.ReservationsPerformMaintenanceRequestB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf0\x01\n\x06Policy\x12?\n\raudit_configs\x18\x8d\xba\xb8\x9c\x01 \x03(\x0b\x32$.google.cloud.compute.v1.AuditConfig\x12\x36\n\x08\x62indings\x18\x8e\xc5\xa4\xc0\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Binding\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tiam_owned\x18\xbb\xb0\xec\xd6\x01 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\x05H\x02\x88\x01\x01\x42\x07\n\x05_etagB\x0c\n\n_iam_ownedB\n\n\x08_version\"]\n\x13PreconfiguredWafSet\x12\x46\n\x0f\x65xpression_sets\x18\x98\xab\x83\xe2\x01 \x03(\x0b\x32).google.cloud.compute.v1.WafExpressionSet\"\xbe\x05\n\x0ePreservedState\x12\x44\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32\x32.google.cloud.compute.v1.PreservedState.DisksEntry\x12S\n\rexternal_i_ps\x18\x8d\xd3\x80\xfe\x01 \x03(\x0b\x32\x38.google.cloud.compute.v1.PreservedState.ExternalIPsEntry\x12R\n\rinternal_i_ps\x18\xdb\x9b\xef\x66 \x03(\x0b\x32\x38.google.cloud.compute.v1.PreservedState.InternalIPsEntry\x12J\n\x08metadata\x18\xaf\xf6\xb5) \x03(\x0b\x32\x35.google.cloud.compute.v1.PreservedState.MetadataEntry\x1a\x62\n\nDisksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.compute.v1.PreservedStatePreservedDisk:\x02\x38\x01\x1am\n\x10\x45xternalIPsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.compute.v1.PreservedStatePreservedNetworkIp:\x02\x38\x01\x1am\n\x10InternalIPsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.compute.v1.PreservedStatePreservedNetworkIp:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xac\x02\n\x1bPreservedStatePreservedDisk\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x01\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x02\x88\x01\x01\"\\\n\nAutoDelete\x12\x19\n\x15UNDEFINED_AUTO_DELETE\x10\x00\x12\x0c\n\x05NEVER\x10\xec\xa4\xaf#\x12%\n\x1eON_PERMANENT_INSTANCE_DELETION\x10\xe7\xe0\xd2-\"?\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x10\n\tREAD_ONLY\x10\xb5\x99\xec+\x12\x11\n\nREAD_WRITE\x10\xd6\x97\xe4RB\x0e\n\x0c_auto_deleteB\x07\n\x05_modeB\t\n\x07_source\"\x9e\x02\n PreservedStatePreservedNetworkIp\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\tH\x00\x88\x01\x01\x12_\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\x0b\x32\x42.google.cloud.compute.v1.PreservedStatePreservedNetworkIpIpAddressH\x01\x88\x01\x01\"\\\n\nAutoDelete\x12\x19\n\x15UNDEFINED_AUTO_DELETE\x10\x00\x12\x0c\n\x05NEVER\x10\xec\xa4\xaf#\x12%\n\x1eON_PERMANENT_INSTANCE_DELETION\x10\xe7\xe0\xd2-B\x0e\n\x0c_auto_deleteB\r\n\x0b_ip_address\"v\n)PreservedStatePreservedNetworkIpIpAddress\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x07literal\x18\xaf\xc1\x80W \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_addressB\n\n\x08_literal\"\xa1\x01\n\x14PreviewRouterRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0frouter_resource\x18\xc4\x80\x82J \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterB\x03\xe0\x41\x02\"\xea\n\n\x07Project\x12 \n\x10\x63loud_armor_tier\x18\xac\x9a\x8e\x02 \x01(\tH\x00\x88\x01\x01\x12K\n\x18\x63ommon_instance_metadata\x18\xc5\xfc\xcbX \x01(\x0b\x32!.google.cloud.compute.v1.MetadataH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12%\n\x14\x64\x65\x66\x61ult_network_tier\x18\x91\xc5\xf9\xe0\x01 \x01(\tH\x03\x88\x01\x01\x12(\n\x17\x64\x65\x66\x61ult_service_account\x18\xa5\xf9\xb7\x8e\x01 \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x10\x65nabled_features\x18\xfb\xc6\xd2\xdf\x01 \x03(\t\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x31\n\x06quotas\x18\xfb\xa1\xe2; \x03(\x0b\x32\x1e.google.cloud.compute.v1.Quota\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12T\n\x15usage_export_location\x18\xc2\xb2\xdc\xa5\x01 \x01(\x0b\x32,.google.cloud.compute.v1.UsageExportLocationH\n\x88\x01\x01\x12\x1e\n\x0evm_dns_setting\x18\xb2\xa7\x88\x1c \x01(\tH\x0b\x88\x01\x01\x12\"\n\x12xpn_project_status\x18\xc1\xcd\xf5l \x01(\tH\x0c\x88\x01\x01\"~\n\x0e\x43loudArmorTier\x12\x1e\n\x1aUNDEFINED_CLOUD_ARMOR_TIER\x10\x00\x12\x1b\n\x14\x43\x41_ENTERPRISE_ANNUAL\x10\xdc\xf5\xeeh\x12\x1b\n\x13\x43\x41_ENTERPRISE_PAYGO\x10\xd3\xa5\xa1\xd8\x01\x12\x12\n\x0b\x43\x41_STANDARD\x10\xfe\x82\xa3\x06\"\x9e\x01\n\x12\x44\x65\x66\x61ultNetworkTier\x12\"\n\x1eUNDEFINED_DEFAULT_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"\x92\x01\n\x0cVmDnsSetting\x12\x1c\n\x18UNDEFINED_VM_DNS_SETTING\x10\x00\x12\x16\n\x0eGLOBAL_DEFAULT\x10\x85\xdb\xda\xa4\x01\x12!\n\x1aUNSPECIFIED_VM_DNS_SETTING\x10\x9a\xbb\x82\x11\x12\x15\n\rZONAL_DEFAULT\x10\x86\xfd\xd9\xaf\x01\x12\x12\n\nZONAL_ONLY\x10\xe7\xba\xc3\xf8\x01\"i\n\x10XpnProjectStatus\x12 \n\x1cUNDEFINED_XPN_PROJECT_STATUS\x10\x00\x12\x0b\n\x04HOST\x10\xa8\xdb\x87\x01\x12&\n\x1eUNSPECIFIED_XPN_PROJECT_STATUS\x10\xa9\xfa\xa7\xa2\x01\x42\x13\n\x11_cloud_armor_tierB\x1b\n\x19_common_instance_metadataB\x15\n\x13_creation_timestampB\x17\n\x15_default_network_tierB\x1a\n\x18_default_service_accountB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_self_linkB\x18\n\x16_usage_export_locationB\x11\n\x0f_vm_dns_settingB\x15\n\x13_xpn_project_status\"z\n!ProjectsDisableXpnResourceRequest\x12\x44\n\x0cxpn_resource\x18\xb7\x93\xcd? \x01(\x0b\x32&.google.cloud.compute.v1.XpnResourceIdH\x00\x88\x01\x01\x42\x0f\n\r_xpn_resource\"y\n ProjectsEnableXpnResourceRequest\x12\x44\n\x0cxpn_resource\x18\xb7\x93\xcd? \x01(\x0b\x32&.google.cloud.compute.v1.XpnResourceIdH\x00\x88\x01\x01\x42\x0f\n\r_xpn_resource\"\xab\x01\n\x17ProjectsGetXpnResources\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x01\x88\x01\x01\x12<\n\tresources\x18\xa5\xfc\xb2N \x03(\x0b\x32&.google.cloud.compute.v1.XpnResourceIdB\x07\n\x05_kindB\x12\n\x10_next_page_token\"L\n\x1bProjectsListXpnHostsRequest\x12\x1c\n\x0corganization\x18\xb3\xda\x93\x32 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_organization\"\xd9\x01\n ProjectsSetCloudArmorTierRequest\x12 \n\x10\x63loud_armor_tier\x18\xac\x9a\x8e\x02 \x01(\tH\x00\x88\x01\x01\"~\n\x0e\x43loudArmorTier\x12\x1e\n\x1aUNDEFINED_CLOUD_ARMOR_TIER\x10\x00\x12\x1b\n\x14\x43\x41_ENTERPRISE_ANNUAL\x10\xdc\xf5\xeeh\x12\x1b\n\x13\x43\x41_ENTERPRISE_PAYGO\x10\xd3\xa5\xa1\xd8\x01\x12\x12\n\x0b\x43\x41_STANDARD\x10\xfe\x82\xa3\x06\x42\x13\n\x11_cloud_armor_tier\"\xe8\x01\n$ProjectsSetDefaultNetworkTierRequest\x12\x1d\n\x0cnetwork_tier\x18\xd3\xba\xdb\xf6\x01 \x01(\tH\x00\x88\x01\x01\"\x8f\x01\n\x0bNetworkTier\x12\x1a\n\x16UNDEFINED_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\x42\x0f\n\r_network_tier\"\x96\t\n\x16PublicAdvertisedPrefix\x12!\n\x11\x62yoip_api_version\x18\x93\xb3\xc9M \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12#\n\x13\x64ns_verification_ip\x18\xb5\x95\xf6r \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tpdp_scope\x18\xd1\xca\xfe\xf9\x01 \x01(\tH\t\x88\x01\x01\x12j\n\x18public_delegated_prefixs\x18\x8b\xbe\x85\xcb\x01 \x03(\x0b\x32\x44.google.cloud.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12\x1e\n\rshared_secret\x18\xca\xa7\x8f\xb6\x01 \x01(\tH\x0b\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0c\x88\x01\x01\"D\n\x0f\x42yoipApiVersion\x12\x1f\n\x1bUNDEFINED_BYOIP_API_VERSION\x10\x00\x12\x07\n\x02V1\x10\x9b\x15\x12\x07\n\x02V2\x10\x9c\x15\"a\n\x08PdpScope\x12\x17\n\x13UNDEFINED_PDP_SCOPE\x10\x00\x12\x0e\n\x06GLOBAL\x10\xa3\xef\xef\xeb\x01\x12\x1b\n\x13GLOBAL_AND_REGIONAL\x10\xc3\xb5\xd4\x97\x01\x12\x0f\n\x08REGIONAL\x10\x9f\xec\x80,\"\xa9\x02\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x1c\n\x15\x41NNOUNCED_TO_INTERNET\x10\xc1\xfe\xe8T\x12\x0f\n\x07INITIAL\x10\xa4\xc6\xb3\xf7\x01\x12%\n\x1dPREFIX_CONFIGURATION_COMPLETE\x10\xcf\x95\xa7\xe5\x01\x12(\n PREFIX_CONFIGURATION_IN_PROGRESS\x10\xb1\xf5\xc0\xb4\x01\x12\"\n\x1aPREFIX_REMOVAL_IN_PROGRESS\x10\xe7\xf5\xcc\x87\x01\x12\x16\n\x0ePTR_CONFIGURED\x10\xcf\xb0\xed\xf4\x01\x12\x18\n\x11READY_TO_ANNOUNCE\x10\xf1\xb1\xe9\x1e\x12!\n\x19REVERSE_DNS_LOOKUP_FAILED\x10\xaf\xbb\x83\x8d\x01\x12\x10\n\tVALIDATED\x10\xee\xb3\xc8\x1f\x42\x14\n\x12_byoip_api_versionB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x16\n\x14_dns_verification_ipB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x10\n\x0e_ip_cidr_rangeB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_pdp_scopeB\x0c\n\n_self_linkB\x10\n\x0e_shared_secretB\t\n\x07_status\"\xbd\x02\n\x1aPublicAdvertisedPrefixList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x41\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32/.google.cloud.compute.v1.PublicAdvertisedPrefix\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xde\x01\n+PublicAdvertisedPrefixPublicDelegatedPrefix\x12\x18\n\x08ip_range\x18\xa5\xe0\x97\x45 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tH\x02\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x03\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x04\x88\x01\x01\x42\x0b\n\t_ip_rangeB\x07\n\x05_nameB\n\n\x08_projectB\t\n\x07_regionB\t\n\x07_status\"\xa3\t\n\x15PublicDelegatedPrefix\x12)\n\x19\x61llocatable_prefix_length\x18\xb6\xb6\xa9\x12 \x01(\x05H\x00\x88\x01\x01\x12!\n\x11\x62yoip_api_version\x18\x93\xb3\xc9M \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x06\x88\x01\x01\x12\"\n\x11is_live_migration\x18\xf0\x9f\x87\xf4\x01 \x01(\x08H\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12\x1d\n\rparent_prefix\x18\xc7\xe7\xa1\x07 \x01(\tH\x0b\x88\x01\x01\x12o\n\x1cpublic_delegated_sub_prefixs\x18\x8c\xfe\x8bZ \x03(\x0b\x32\x46.google.cloud.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0c\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0e\x88\x01\x01\"D\n\x0f\x42yoipApiVersion\x12\x1f\n\x1bUNDEFINED_BYOIP_API_VERSION\x10\x00\x12\x07\n\x02V1\x10\x9b\x15\x12\x07\n\x02V2\x10\x9c\x15\"\x87\x01\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x11\n\nDELEGATION\x10\xa8\xb2\xfa}\x12.\n&EXTERNAL_IPV6_FORWARDING_RULE_CREATION\x10\xc4\xe1\x8d\xbe\x01\x12(\n!EXTERNAL_IPV6_SUBNETWORK_CREATION\x10\xcc\x9f\x97\x1d\"\xae\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x11\n\tANNOUNCED\x10\xfb\x91\x8c\xae\x01\x12\x1b\n\x13\x41NNOUNCED_TO_GOOGLE\x10\xb9\xb4\xf3\xd8\x01\x12\x1c\n\x15\x41NNOUNCED_TO_INTERNET\x10\xc1\xfe\xe8T\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x14\n\x0cINITIALIZING\x10\xcd\xd8\x98\x92\x01\x12\x18\n\x11READY_TO_ANNOUNCE\x10\xf1\xb1\xe9\x1e\x42\x1c\n\x1a_allocatable_prefix_lengthB\x14\n\x12_byoip_api_versionB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x10\n\x0e_ip_cidr_rangeB\x14\n\x12_is_live_migrationB\x07\n\x05_kindB\x07\n\x05_modeB\x07\n\x05_nameB\x10\n\x0e_parent_prefixB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_status\"\xe1\x03\n#PublicDelegatedPrefixAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12Y\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32G.google.cloud.compute.v1.PublicDelegatedPrefixAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1ah\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12I\n\x05value\x18\x02 \x01(\x0b\x32:.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbb\x02\n\x19PublicDelegatedPrefixList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12@\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefix\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8d\x05\n-PublicDelegatedPrefixPublicDelegatedSubPrefix\x12)\n\x19\x61llocatable_prefix_length\x18\xb6\xb6\xa9\x12 \x01(\x05H\x00\x88\x01\x01\x12\"\n\x11\x64\x65legatee_project\x18\xda\x8a\xe9\xc5\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nis_address\x18\xdf\x8b\x92\xa8\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x08\x88\x01\x01\"\x87\x01\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x11\n\nDELEGATION\x10\xa8\xb2\xfa}\x12.\n&EXTERNAL_IPV6_FORWARDING_RULE_CREATION\x10\xc4\xe1\x8d\xbe\x01\x12(\n!EXTERNAL_IPV6_SUBNETWORK_CREATION\x10\xcc\x9f\x97\x1d\"@\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08INACTIVE\x10\xeb\x98\xf9\x80\x01\x42\x1c\n\x1a_allocatable_prefix_lengthB\x14\n\x12_delegatee_projectB\x0e\n\x0c_descriptionB\x10\n\x0e_ip_cidr_rangeB\r\n\x0b_is_addressB\x07\n\x05_modeB\x07\n\x05_nameB\t\n\x07_regionB\t\n\x07_status\"\xc1\x01\n!PublicDelegatedPrefixesScopedList\x12U\n\x19public_delegated_prefixes\x18\x96\x82\xaa\x96\x01 \x03(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefix\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xe6(\n\x05Quota\x12\x15\n\x05limit\x18\xbb\x97\x8d\x31 \x01(\x01H\x00\x88\x01\x01\x12\x17\n\x06metric\x18\xb0\xeb\x97\xfe\x01 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05owner\x18\xb3\xe5\xcf\x32 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x05usage\x18\xa1\xfb\x99\x35 \x01(\x01H\x03\x88\x01\x01\"\xd5\'\n\x06Metric\x12\x14\n\x10UNDEFINED_METRIC\x10\x00\x12\x0e\n\x07\x41\x32_CPUS\x10\xb9\xfe\x86I\x12\x16\n\x0f\x41\x46\x46INITY_GROUPS\x10\xcb\xa9\xd2\x33\x12\x13\n\x0b\x41UTOSCALERS\x10\xdc\xe0\xda\xe0\x01\x12\x16\n\x0f\x42\x41\x43KEND_BUCKETS\x10\xde\x89\xd0\x41\x12\x18\n\x10\x42\x41\x43KEND_SERVICES\x10\xc9\xc3\xc8\x80\x01\x12\x10\n\x08\x43\x32\x44_CPUS\x10\xf5\xff\xa8\xf2\x01\x12\x0f\n\x07\x43\x32_CPUS\x10\xbb\xeb\xb8\x97\x01\x12\x0f\n\x07\x43\x33_CPUS\x10\xda\x9c\x8c\xa5\x01\x12\x13\n\x0b\x43OMMITMENTS\x10\xde\xd7\xc0\xd9\x01\x12\x18\n\x11\x43OMMITTED_A2_CPUS\x10\xd6\xa2\xa5\x1c\x12\x1a\n\x12\x43OMMITTED_C2D_CPUS\x10\xf8\xe2\xd3\x86\x01\x12\x18\n\x11\x43OMMITTED_C2_CPUS\x10\xd8\x8f\xd7j\x12\x18\n\x11\x43OMMITTED_C3_CPUS\x10\xf7\xc0\xaax\x12\x16\n\x0e\x43OMMITTED_CPUS\x10\xce\xad\xb6\x8b\x01\x12\x19\n\x11\x43OMMITTED_E2_CPUS\x10\xda\xfc\x88\xb9\x01\x12\x1a\n\x12\x43OMMITTED_LICENSES\x10\xd5\xcb\xc2\xaa\x01\x12$\n\x1c\x43OMMITTED_LOCAL_SSD_TOTAL_GB\x10\x88\xec\x86\x93\x01\x12\x17\n\x11\x43OMMITTED_M3_CPUS\x10\x81\xe2#\x12\'\n\x1f\x43OMMITTED_MEMORY_OPTIMIZED_CPUS\x10\xde\xdc\x99\xe9\x01\x12\x19\n\x12\x43OMMITTED_N2A_CPUS\x10\xb0\xaa\x8d\x13\x12\x19\n\x12\x43OMMITTED_N2D_CPUS\x10\x8d\xbe\x87<\x12\x19\n\x11\x43OMMITTED_N2_CPUS\x10\xa3\xa7\xe9\x99\x01\x12\'\n\x1f\x43OMMITTED_NVIDIA_A100_80GB_GPUS\x10\xa5\x9f\xb4\xdd\x01\x12\"\n\x1a\x43OMMITTED_NVIDIA_A100_GPUS\x10\x95\xfd\x98\xb3\x01\x12!\n\x1a\x43OMMITTED_NVIDIA_H100_GPUS\x10\x9c\x8f\x95\"\x12 \n\x19\x43OMMITTED_NVIDIA_K80_GPUS\x10\xa4\xb6\xeb\x01\x12\x1f\n\x18\x43OMMITTED_NVIDIA_L4_GPUS\x10\xfd\xd3\x91\t\x12!\n\x1a\x43OMMITTED_NVIDIA_P100_GPUS\x10\xa4\xff\xa2\x33\x12 \n\x18\x43OMMITTED_NVIDIA_P4_GPUS\x10\x81\xae\xf5\xa5\x01\x12\x1f\n\x18\x43OMMITTED_NVIDIA_T4_GPUS\x10\x85\x88\xd9\x42\x12 \n\x1a\x43OMMITTED_NVIDIA_V100_GPUS\x10\xaa\xb3\r\x12\x1a\n\x12\x43OMMITTED_T2A_CPUS\x10\xea\xc4\xa9\x8d\x01\x12\x1a\n\x12\x43OMMITTED_T2D_CPUS\x10\xc7\xd8\xa3\xb6\x01\x12\x18\n\x11\x43OMMITTED_Z3_CPUS\x10\xce\xe6\xe7}\x12\n\n\x04\x43PUS\x10\xcb\xd7~\x12\x18\n\x10\x43PUS_ALL_REGIONS\x10\xad\x91\xc6\xe0\x01\x12\x16\n\x0e\x44ISKS_TOTAL_GB\x10\x9f\x97\xc9\xa8\x01\x12\x0f\n\x07\x45\x32_CPUS\x10\xbd\xd8\xea\xe5\x01\x12(\n!EXTERNAL_MANAGED_FORWARDING_RULES\x10\xc9\xbf\xf3G\x12,\n$EXTERNAL_NETWORK_LB_FORWARDING_RULES\x10\x99\xad\xbd\xb2\x01\x12)\n\"EXTERNAL_PROTOCOL_FORWARDING_RULES\x10\xe8\xb8\xa2\x1e\x12\x1d\n\x15\x45XTERNAL_VPN_GATEWAYS\x10\xae\xbb\xf5\x81\x01\x12\x11\n\tFIREWALLS\x10\xd3\xe6\xc8\xb2\x01\x12\x18\n\x10\x46ORWARDING_RULES\x10\x95\x82\xa8\xce\x01\x12/\n(GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES\x10\xe1\xad\xbcN\x12\x30\n(GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES\x10\xad\xec\x9b\x9c\x01\x12\x31\n)GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES\x10\xa9\xd9\xed\xbe\x01\x12 \n\x19GLOBAL_INTERNAL_ADDRESSES\x10\x9c\xc5\xb0\x14\x12/\n(GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES\x10\xaf\x90\xaez\x12\x39\n1GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES\x10\xd4\xde\xa1\x9a\x01\x12\x17\n\x10GPUS_ALL_REGIONS\x10\xa9\x80\xe4\x12\x12\x14\n\x0cHDB_TOTAL_GB\x10\xaf\xc2\xa1\x98\x01\x12\x16\n\x0eHDB_TOTAL_IOPS\x10\xfd\xe9\xd7\x93\x01\x12\x1b\n\x14HDB_TOTAL_THROUGHPUT\x10\xfe\xcc\x80\n\x12\x15\n\rHEALTH_CHECKS\x10\xae\xaf\xfc\x89\x01\x12\r\n\x06IMAGES\x10\xf8\xec\xb5\x07\x12\x10\n\tINSTANCES\x10\xde\x9c\xd0>\x12\x17\n\x0fINSTANCE_GROUPS\x10\xbe\xc9\xdb\xa9\x01\x12\x1e\n\x17INSTANCE_GROUP_MANAGERS\x10\xb0\xa2\xc5\x30\x12\x19\n\x12INSTANCE_TEMPLATES\x10\xef\xb7\xedk\x12\x15\n\rINTERCONNECTS\x10\x85\x8b\xfe\xc5\x01\x12*\n#INTERCONNECT_ATTACHMENTS_PER_REGION\x10\xd6\xd6\xa3L\x12+\n#INTERCONNECT_ATTACHMENTS_TOTAL_MBPS\x10\xf3\xba\xd9\xca\x01\x12\x1f\n\x17INTERCONNECT_TOTAL_GBPS\x10\xaa\xf1\x87\x88\x01\x12\x19\n\x12INTERNAL_ADDRESSES\x10\x80\xe9\xae^\x12\x31\n*INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES\x10\x84\xe9\x85\x7f\x12\x19\n\x12IN_PLACE_SNAPSHOTS\x10\x9d\x9d\x96H\x12\x18\n\x10IN_USE_ADDRESSES\x10\x90\xe2\xdf\xbf\x01\x12\x1e\n\x17IN_USE_BACKUP_SCHEDULES\x10\x91\x92\xd1\x0f\x12!\n\x19IN_USE_SNAPSHOT_SCHEDULES\x10\x93\xcc\xac\xdc\x01\x12\x1a\n\x12LOCAL_SSD_TOTAL_GB\x10\xc5\x98\xe3\x9d\x01\x12\x0e\n\x07M1_CPUS\x10\xa6\xdb\xde\x11\x12\x0e\n\x07M2_CPUS\x10\xc5\x8c\xb2\x1f\x12\x0e\n\x07M3_CPUS\x10\xe4\xbd\x85-\x12\x16\n\x0eMACHINE_IMAGES\x10\x90\xf3\x91\xd5\x01\x12\x0f\n\x08N2A_CPUS\x10\xad\xc7\xe2~\x12\x10\n\x08N2D_CPUS\x10\x8a\xdb\xdc\xa7\x01\x12\x0f\n\x07N2_CPUS\x10\x86\x83\xcb\xc6\x01\x12\x10\n\x08NETWORKS\x10\x85\xb8\xbf\xe7\x01\x12\x1a\n\x13NETWORK_ATTACHMENTS\x10\xdf\xfd\x87G\x12\x1e\n\x17NETWORK_ENDPOINT_GROUPS\x10\x8d\xb7\xda\x30\x12 \n\x19NETWORK_FIREWALL_POLICIES\x10\xbe\xdb\x9b\x30\x12*\n#NET_LB_SECURITY_POLICIES_PER_REGION\x10\xad\xfd\xa4K\x12/\n\'NET_LB_SECURITY_POLICY_RULES_PER_REGION\x10\xb3\x88\xe6\xa9\x01\x12\x39\n1NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION\x10\xf0\xe8\xb4\x94\x01\x12\x12\n\x0bNODE_GROUPS\x10\xb1\xfd\xde\x0b\x12\x16\n\x0eNODE_TEMPLATES\x10\x9c\xb2\xb9\xe2\x01\x12\x1d\n\x15NVIDIA_A100_80GB_GPUS\x10\xc8\xe8\xc7\x88\x01\x12\x18\n\x10NVIDIA_A100_GPUS\x10\x92\x80\xdf\xf0\x01\x12\x16\n\x0fNVIDIA_K80_GPUS\x10\x87\xec\x92N\x12\x16\n\x0eNVIDIA_L4_GPUS\x10\xba\xcd\xc8\xea\x01\x12\x17\n\x10NVIDIA_P100_GPUS\x10\xa1\x82\xe9p\x12\x1b\n\x14NVIDIA_P100_VWS_GPUS\x10\x8e\xdd\x83\x66\x12\x16\n\x0eNVIDIA_P4_GPUS\x10\xbe\xa7\xac\x87\x01\x12\x1a\n\x12NVIDIA_P4_VWS_GPUS\x10\xab\xd5\xf4\xfb\x01\x12\x15\n\x0eNVIDIA_T4_GPUS\x10\xc2\x81\x90$\x12\x1a\n\x12NVIDIA_T4_VWS_GPUS\x10\xaf\xeb\xbf\x98\x01\x12\x17\n\x10NVIDIA_V100_GPUS\x10\xa7\xb6\xd3=\x12\x18\n\x11PACKET_MIRRORINGS\x10\xa7\xea\xb6\x07\x12(\n!PD_EXTREME_TOTAL_PROVISIONED_IOPS\x10\xed\xd6\x97!\x12\x17\n\x10PREEMPTIBLE_CPUS\x10\xc9\x8d\xe3w\x12\x1f\n\x18PREEMPTIBLE_LOCAL_SSD_GB\x10\x88\x93\xaf|\x12(\n!PREEMPTIBLE_NVIDIA_A100_80GB_GPUS\x10\x8a\xea\xb9H\x12#\n\x1cPREEMPTIBLE_NVIDIA_A100_GPUS\x10\x90\x9c\xe9 \x12$\n\x1cPREEMPTIBLE_NVIDIA_H100_GPUS\x10\x97\xae\xe5\x8f\x01\x12#\n\x1bPREEMPTIBLE_NVIDIA_K80_GPUS\x10\xc9\xe0\xe5\xb2\x01\x12!\n\x1aPREEMPTIBLE_NVIDIA_L4_GPUS\x10\xb8\xb8\xf0/\x12$\n\x1cPREEMPTIBLE_NVIDIA_P100_GPUS\x10\x9f\x9e\xf3\xa0\x01\x12(\n PREEMPTIBLE_NVIDIA_P100_VWS_GPUS\x10\x8c\x9b\xc1\x95\x01\x12\"\n\x1aPREEMPTIBLE_NVIDIA_P4_GPUS\x10\xbc\x92\xd4\xcc\x01\x12%\n\x1ePREEMPTIBLE_NVIDIA_P4_VWS_GPUS\x10\xa9\xe2\xd0x\x12!\n\x1aPREEMPTIBLE_NVIDIA_T4_GPUS\x10\xc0\xec\xb7i\x12%\n\x1ePREEMPTIBLE_NVIDIA_T4_VWS_GPUS\x10\xad\xf8\x9b\x15\x12#\n\x1cPREEMPTIBLE_NVIDIA_V100_GPUS\x10\xa5\xd2\xddm\x12%\n\x1ePREEMPTIBLE_TPU_LITE_DEVICE_V5\x10\xfb\x91\x8cS\x12\'\n PREEMPTIBLE_TPU_LITE_PODSLICE_V5\x10\xc4\x91\xc5\x35\x12#\n\x1bPREEMPTIBLE_TPU_PODSLICE_V4\x10\x8c\xfc\xf4\xca\x01\x12=\n6PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK\x10\x83\x93\x9dn\x12\'\n PSC_INTERNAL_LB_FORWARDING_RULES\x10\xfb\xa2\xcbP\x12\"\n\x1aPUBLIC_ADVERTISED_PREFIXES\x10\xcc\xa1\xe2\xe0\x01\x12!\n\x19PUBLIC_DELEGATED_PREFIXES\x10\xb6\x92\xf3\xfd\x01\x12\x1b\n\x14REGIONAL_AUTOSCALERS\x10\xbc\x9c\x80\x0e\x12\x31\n*REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES\x10\xdd\xec\x82\x02\x12\x35\n-REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES\x10\xed\xea\xa5\xc3\x01\x12\'\n REGIONAL_INSTANCE_GROUP_MANAGERS\x10\x90\xbe\xf3\x11\x12,\n%REGIONAL_INTERNAL_LB_BACKEND_SERVICES\x10\x90\xee\xe5\x41\x12\x31\n*REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES\x10\xab\xcf\xf4-\x12;\n3REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES\x10\xd8\xf6\xb1\xe6\x01\x12\x13\n\x0cRESERVATIONS\x10\xa7\xbc\xc8\x0f\x12\x18\n\x11RESOURCE_POLICIES\x10\xe1\x9c\x84(\x12\x0f\n\x07ROUTERS\x10\xaa\xbc\x8b\xeb\x01\x12\x0e\n\x06ROUTES\x10\xca\x96\xba\x83\x01\x12\x18\n\x11SECURITY_POLICIES\x10\xef\xa6\xafZ\x12#\n\x1cSECURITY_POLICIES_PER_REGION\x10\xc6\xa6\xe0v\x12\x31\n)SECURITY_POLICY_ADVANCED_RULES_PER_REGION\x10\xad\xe7\xa5\xb1\x01\x12#\n\x1bSECURITY_POLICY_CEVAL_RULES\x10\xc9\xa7\xc0\xe0\x01\x12\x1c\n\x15SECURITY_POLICY_RULES\x10\xa9\xd4\x87\x61\x12\'\n SECURITY_POLICY_RULES_PER_REGION\x10\xcc\xc8\xa9<\x12\x1b\n\x13SERVICE_ATTACHMENTS\x10\xe6\xb1\xeb\xe0\x01\x12\x11\n\tSNAPSHOTS\x10\x8f\xe6\xdf\xa3\x01\x12\x13\n\x0cSSD_TOTAL_GB\x10\xd1\xaf\x8fM\x12\x18\n\x10SSL_CERTIFICATES\x10\xaf\x82\xb6\xb4\x01\x12\x14\n\x0cSSL_POLICIES\x10\xc3\xf4\xc0\xf9\x01\x12\x17\n\x10STATIC_ADDRESSES\x10\xf1\xad\xd2,\x12\x1e\n\x16STATIC_BYOIP_ADDRESSES\x10\xf1\x8a\xc2\x83\x01\x12+\n#STATIC_EXTERNAL_IPV6_ADDRESS_RANGES\x10\x96\xe1\x9d\xe1\x01\x12\x13\n\x0bSUBNETWORKS\x10\xa5\xfc\xf3\xc8\x01\x12\x10\n\x08T2A_CPUS\x10\xe7\xe1\xfe\xf8\x01\x12\x0f\n\x08T2D_CPUS\x10\xc4\xf5\xf8!\x12\x1b\n\x14TARGET_HTTPS_PROXIES\x10\xca\xcb\xd6h\x12\x1a\n\x13TARGET_HTTP_PROXIES\x10\xa3\xf5\xa0N\x12\x18\n\x10TARGET_INSTANCES\x10\xb0\xda\xd5\x87\x01\x12\x14\n\x0cTARGET_POOLS\x10\x89\x97\x88\xa6\x01\x12\x19\n\x12TARGET_SSL_PROXIES\x10\xeb\xe4\xf5K\x12\x19\n\x12TARGET_TCP_PROXIES\x10\xc0\x9e\xf3V\x12\x1a\n\x13TARGET_VPN_GATEWAYS\x10\xa8\xbb\xe3#\x12\x1a\n\x12TPU_LITE_DEVICE_V5\x10\xfd\x84\xb0\xd6\x01\x12\x1b\n\x14TPU_LITE_PODSLICE_V5\x10\xc6\xd3\x87\x06\x12\x16\n\x0fTPU_PODSLICE_V4\x10\xca\x87\xa2\x66\x12\x10\n\x08URL_MAPS\x10\x87\xcf\xc7\xb4\x01\x12.\n\'VARIABLE_IPV6_PUBLIC_DELEGATED_PREFIXES\x10\xa1\xf6\x9c=\x12\x13\n\x0cVPN_GATEWAYS\x10\xba\x8b\xfe\x10\x12\x12\n\x0bVPN_TUNNELS\x10\x80\xd1\xdf\x31\x12\x1b\n\x14XPN_SERVICE_PROJECTS\x10\xad\x87\xb2-B\x08\n\x06_limitB\t\n\x07_metricB\x08\n\x06_ownerB\x08\n\x06_usage\"\xe0\x03\n\x11QuotaExceededInfo\x12R\n\ndimensions\x18\xcd\xff\xc8\xc5\x01 \x03(\x0b\x32:.google.cloud.compute.v1.QuotaExceededInfo.DimensionsEntry\x12\x1d\n\x0c\x66uture_limit\x18\xbf\xbc\xda\xd9\x01 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x05limit\x18\xbb\x97\x8d\x31 \x01(\x01H\x01\x88\x01\x01\x12\x1b\n\nlimit_name\x18\x8f\x89\xf0\xbd\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0bmetric_name\x18\xba\x97\xb9\xc3\x01 \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x0erollout_status\x18\xc0\xe4\x96\xe3\x01 \x01(\tH\x04\x88\x01\x01\x1a\x31\n\x0f\x44imensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"e\n\rRolloutStatus\x12\x1c\n\x18UNDEFINED_ROLLOUT_STATUS\x10\x00\x12\x13\n\x0bIN_PROGRESS\x10\x87\xa8\xdd\xdf\x01\x12!\n\x1aROLLOUT_STATUS_UNSPECIFIED\x10\xb8\xd7\xe7\x0c\x42\x0f\n\r_future_limitB\x08\n\x06_limitB\r\n\x0b_limit_nameB\x0e\n\x0c_metric_nameB\x11\n\x0f_rollout_status\"\x88\t\n\x12QuotaStatusWarning\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x04\x64\x61ta\x18\xaa\xdf\xbb\x01 \x03(\x0b\x32\x1d.google.cloud.compute.v1.Data\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\"\xfc\x07\n\x04\x43ode\x12\x12\n\x0eUNDEFINED_CODE\x10\x00\x12\x15\n\x0e\x43LEANUP_FAILED\x10\xd8\x8c\xd6G\x12 \n\x18\x44\x45PRECATED_RESOURCE_USED\x10\xc2\xdf\xeb\xba\x01\x12\x1c\n\x14\x44\x45PRECATED_TYPE_USED\x10\x96\xa4\x9e\xa5\x01\x12(\n DISK_SIZE_LARGER_THAN_IMAGE_SIZE\x10\x97\x81\x95\xb0\x01\x12\x1e\n\x16\x45XPERIMENTAL_TYPE_USED\x10\x8b\x8e\xc1\xd7\x01\x12\x1b\n\x14\x45XTERNAL_API_WARNING\x10\xc3\xbf\xdaS\x12\x1d\n\x15\x46IELD_VALUE_OVERRIDEN\x10\xaf\xb6\x99\x9d\x01\x12#\n\x1bINJECTED_KERNELS_DEPRECATED\x10\x8b\xd9\x82\xc7\x01\x12\x34\n,INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB\x10\xce\x9b\xbc\xbf\x01\x12 \n\x18LARGE_DEPLOYMENT_WARNING\x10\xa6\xe7\xc8\xe5\x01\x12!\n\x1aLIST_OVERHEAD_QUOTA_EXCEED\x10\xc5\xb0\xda\x16\x12\x1f\n\x17MISSING_TYPE_DEPENDENCY\x10\xf7\xf8\xa2\xa4\x01\x12%\n\x1dNEXT_HOP_ADDRESS_NOT_ASSIGNED\x10\x87\xa5\xfa\x9a\x01\x12\"\n\x1aNEXT_HOP_CANNOT_IP_FORWARD\x10\xe7\xea\xe7\xb6\x01\x12.\n\'NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE\x10\x92\xe8\xfc\x45\x12#\n\x1bNEXT_HOP_INSTANCE_NOT_FOUND\x10\xce\xcc\xaf\xdd\x01\x12\'\n NEXT_HOP_INSTANCE_NOT_ON_NETWORK\x10\xc2\xe8\x9dt\x12\x1c\n\x14NEXT_HOP_NOT_RUNNING\x10\xb1\xcf\xf0\xc6\x01\x12\x19\n\x12NOT_CRITICAL_ERROR\x10\xd4\xa8\xb7\x32\x12\x19\n\x12NO_RESULTS_ON_PAGE\x10\x88\xa6\xa9\x0e\x12\x16\n\x0fPARTIAL_SUCCESS\x10\x85\xae\x87\x13\x12\x1e\n\x16QUOTA_INFO_UNAVAILABLE\x10\xa6\xd2\x8c\x91\x01\x12\x1d\n\x16REQUIRED_TOS_AGREEMENT\x10\x83\xce\xe4\x01\x12\x31\n)RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING\x10\xc1\xf4\xed\xec\x01\x12\x1b\n\x14RESOURCE_NOT_DELETED\x10\xbc\xb7\xb2P\x12!\n\x19SCHEMA_VALIDATION_IGNORED\x10\xca\xd4\x9f\x83\x01\x12(\n!SINGLE_INSTANCE_PROPERTY_TEMPLATE\x10\xd1\x89\xf8\x7f\x12\x1d\n\x15UNDECLARED_PROPERTIES\x10\x9f\x86\x9b\xba\x01\x12\x12\n\x0bUNREACHABLE\x10\xb4\xbd\xad\x06\x42\x07\n\x05_codeB\n\n\x08_message\"\xcc\x01\n\x07RawDisk\x12\x1f\n\x0e\x63ontainer_type\x18\xb8\xc8\x82\x98\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\rsha1_checksum\x18\xbd\x94\xf8\x95\x01 \x01(\tH\x01\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x02\x88\x01\x01\"8\n\rContainerType\x12\x1c\n\x18UNDEFINED_CONTAINER_TYPE\x10\x00\x12\t\n\x03TAR\x10\x85\x87\x05\x42\x11\n\x0f_container_typeB\x10\n\x0e_sha1_checksumB\t\n\x07_source\"\xd7\x02\n,RecreateInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x93\x01\n;instance_group_managers_recreate_instances_request_resource\x18\x80\xc2\x9a\n \x01(\x0b\x32\x46.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xdb\x02\n2RecreateInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x8d\x01\n8region_instance_group_managers_recreate_request_resource\x18\x94\xfc\xc4Q \x01(\x0b\x32\x43.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa8\x01\n\tReference\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0ereference_type\x18\xae\xbf\x83v \x01(\tH\x01\x88\x01\x01\x12\x19\n\x08referrer\x18\x9f\xf8\xb9\xa7\x01 \x01(\tH\x02\x88\x01\x01\x12\x16\n\x06target\x18\x91\xe3\xf9[ \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_kindB\x11\n\x0f_reference_typeB\x0b\n\t_referrerB\t\n\x07_target\"\x84\x05\n\x06Region\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12R\n\x14quota_status_warning\x18\xf6\x89\xba\x90\x01 \x01(\x0b\x32+.google.cloud.compute.v1.QuotaStatusWarningH\x06\x88\x01\x01\x12\x31\n\x06quotas\x18\xfb\xa1\xe2; \x03(\x0b\x32\x1e.google.cloud.compute.v1.Quota\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0csupports_pzs\x18\xee\xf6\x85( \x01(\x08H\t\x88\x01\x01\x12\x10\n\x05zones\x18\xc7\xa4\xad\x37 \x03(\t\"4\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x07\n\x02UP\x10\x9b\x15\x42\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x17\n\x15_quota_status_warningB\x0c\n\n_self_linkB\t\n\x07_statusB\x0f\n\r_supports_pzs\"\x88\x01\n\x1aRegionAddressesMoveRequest\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12$\n\x13\x64\x65stination_address\x18\xc3\xb1\x9e\xb1\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x16\n\x14_destination_address\"\xab\x02\n\x14RegionAutoscalerList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.Autoscaler\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa7\x02\n\x12RegionDiskTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.DiskType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"E\n%RegionDisksAddResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"H\n(RegionDisksRemoveResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"@\n\x18RegionDisksResizeRequest\x12\x18\n\x07size_gb\x18\xd9\x8b\x80\xec\x01 \x01(\x03H\x00\x88\x01\x01\x42\n\n\x08_size_gb\"h\n\'RegionDisksStartAsyncReplicationRequest\x12$\n\x14\x61sync_secondary_disk\x18\xab\x83\xe3> \x01(\tH\x00\x88\x01\x01\x42\x17\n\x15_async_secondary_disk\"\xb1\x02\n\x17RegionInstanceGroupList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x38\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32&.google.cloud.compute.v1.InstanceGroup\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"E\n1RegionInstanceGroupManagerDeleteInstanceConfigReq\x12\x10\n\x05names\x18\xc8\xae\xef\x31 \x03(\t\"\xbf\x02\n\x1eRegionInstanceGroupManagerList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManager\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x80\x01\n0RegionInstanceGroupManagerPatchInstanceConfigReq\x12L\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"\x81\x01\n1RegionInstanceGroupManagerUpdateInstanceConfigReq\x12L\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"J\n2RegionInstanceGroupManagersAbandonInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"\xfb\x02\n.RegionInstanceGroupManagersApplyUpdatesRequest\x12\x1e\n\rall_instances\x18\xe0\xba\xbe\xc0\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x1f\n\x0eminimal_action\x18\x94\x8d\x82\x81\x01 \x01(\tH\x01\x88\x01\x01\x12.\n\x1emost_disruptive_allowed_action\x18\x8d\xce\xc2\x1f \x01(\tH\x02\x88\x01\x01\"-\n\rMinimalAction\x12\x1c\n\x18UNDEFINED_MINIMAL_ACTION\x10\x00\"K\n\x1bMostDisruptiveAllowedAction\x12,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION\x10\x00\x42\x10\n\x0e_all_instancesB\x11\n\x0f_minimal_actionB!\n\x1f_most_disruptive_allowed_action\"u\n1RegionInstanceGroupManagersCreateInstancesRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"\xa4\x01\n1RegionInstanceGroupManagersDeleteInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x32\n\"skip_instances_on_validation_error\x18\xa1\xf6\xaf\x13 \x01(\x08H\x00\x88\x01\x01\x42%\n#_skip_instances_on_validation_error\"\xaa\x01\n-RegionInstanceGroupManagersListErrorsResponse\x12\x44\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x32.google.cloud.compute.v1.InstanceManagedByIgmError\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_next_page_token\"\xee\x01\n2RegionInstanceGroupManagersListInstanceConfigsResp\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x01\x88\x01\x01\x42\x12\n\x10_next_page_tokenB\n\n\x08_warning\"\xb0\x01\n0RegionInstanceGroupManagersListInstancesResponse\x12G\n\x11managed_instances\x18\xde\x9b\xa9\xa0\x01 \x03(\x0b\x32(.google.cloud.compute.v1.ManagedInstance\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_next_page_token\"B\n*RegionInstanceGroupManagersRecreateRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"I\n1RegionInstanceGroupManagersResumeInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"y\n0RegionInstanceGroupManagersSetTargetPoolsRequest\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0ctarget_pools\x18\xa9\x9f\xa0\xa0\x01 \x03(\tB\x0e\n\x0c_fingerprint\"i\n-RegionInstanceGroupManagersSetTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x00\x88\x01\x01\x42\x14\n\x12_instance_template\"H\n0RegionInstanceGroupManagersStartInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"r\n/RegionInstanceGroupManagersStopInstancesRequest\x12\x1a\n\nforce_stop\x18\xd6\xa1\xa1@ \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\tB\r\n\x0b_force_stop\"{\n2RegionInstanceGroupManagersSuspendInstancesRequest\x12\x1d\n\rforce_suspend\x18\xe8\xed\x96\r \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\tB\x10\n\x0e_force_suspend\"\xc4\x02\n!RegionInstanceGroupsListInstances\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x41\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32/.google.cloud.compute.v1.InstanceWithNamedPorts\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xd0\x01\n(RegionInstanceGroupsListInstancesRequest\x12\x1e\n\x0einstance_state\x18\xe7\xf0\xfc+ \x01(\tH\x00\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x01\x88\x01\x01\"H\n\rInstanceState\x12\x1c\n\x18UNDEFINED_INSTANCE_STATE\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x42\x11\n\x0f_instance_stateB\x0c\n\n_port_name\"\x94\x01\n(RegionInstanceGroupsSetNamedPortsRequest\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPortB\x0e\n\x0c_fingerprint\"\x9d\x02\n\nRegionList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x31\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1f.google.cloud.compute.v1.Region\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"{\n1RegionNetworkEndpointGroupsAttachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"{\n1RegionNetworkEndpointGroupsDetachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"\x81\x02\n:RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse\x12\x88\x01\n\x10\x66irewall_policys\x18\xc2\xca\xfc\xc3\x01 \x03(\x0b\x32j.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x38\n\tfirewalls\x18\xf3\xc6\xe8\x81\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Firewall\"\x94\x04\nQRegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x1c\n\x0c\x64isplay_name\x18\xe8\x87\x91\x02 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12O\n\x16packet_mirroring_rules\x18\xc4\xff\xc0\xfd\x01 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x02\x88\x01\x01\x12=\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x03\x88\x01\x01\"\x99\x01\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\tHIERARCHY\x10\x95\xc4\xaa!\x12\x0f\n\x07NETWORK\x10\x8e\xcc\xb3\xc5\x01\x12\x17\n\x10NETWORK_REGIONAL\x10\xb0\xe2\xfdZ\x12\x14\n\rSYSTEM_GLOBAL\x10\xb3\x97\xd4\x1c\x12\x16\n\x0fSYSTEM_REGIONAL\x10\xaf\x8c\x92M\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x0f\n\r_display_nameB\x07\n\x05_nameB\x0b\n\t_priorityB\x07\n\x05_type\"\xd1\x01\n\x16RegionSetLabelsRequest\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x00\x88\x01\x01\x12O\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32;.google.cloud.compute.v1.RegionSetLabelsRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_label_fingerprint\"\xb3\x01\n\x16RegionSetPolicyRequest\x12\x36\n\x08\x62indings\x18\x8e\xc5\xa4\xc0\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Binding\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06policy\x18\xb2\xca\xb6+ \x01(\x0b\x32\x1f.google.cloud.compute.v1.PolicyH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_policy\"Q\n1RegionTargetHttpsProxiesSetSslCertificatesRequest\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\"f\n\x1cRegionUrlMapsValidateRequest\x12\x39\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapH\x00\x88\x01\x01\x42\x0b\n\t_resource\"\x94\x01\n&RemoveAssociationFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\r\n\x0b_request_id\"\xbe\x01\n-RemoveAssociationNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\r\n\x0b_request_id\"\xe5\x01\n3RemoveAssociationRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\r\n\x0b_request_id\"\xb3\x02\n\"RemoveHealthCheckTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12\x80\x01\n1target_pools_remove_health_check_request_resource\x18\xb3\xe7\xb6\x91\x01 \x01(\x0b\x32<.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa7\x02\n\x1fRemoveInstanceTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12x\n-target_pools_remove_instance_request_resource\x18\x83\xc0\x8b\x0e \x01(\x0b\x32\x39.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb4\x02\n#RemoveInstancesInstanceGroupRequest\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12\x81\x01\n1instance_groups_remove_instances_request_resource\x18\xb9\xd1\xb7\xba\x01 \x01(\x0b\x32=.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcf\x01\n5RemovePacketMirroringRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xf6\x01\n\x1bRemovePeeringNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12p\n(networks_remove_peering_request_resource\x18\xfe\xdb\xe9\xc8\x01 \x01(\x0b\x32\x35.google.cloud.compute.v1.NetworksRemovePeeringRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa3\x02\n!RemoveResourcePoliciesDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12}\n/disks_remove_resource_policies_request_resource\x18\xee\xc1\xa1\xd0\x01 \x01(\x0b\x32;.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb3\x02\n%RemoveResourcePoliciesInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x84\x01\n3instances_remove_resource_policies_request_resource\x18\xf6\xdd\xbc\x17 \x01(\x0b\x32?.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xba\x02\n\'RemoveResourcePoliciesRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x89\x01\n6region_disks_remove_resource_policies_request_resource\x18\xa3\xc3\x95\x04 \x01(\x0b\x32\x41.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x96\x01\n\x1fRemoveRuleFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xc0\x01\n&RemoveRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xe7\x01\n,RemoveRuleRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xb4\x01\n%RemoveRuleRegionSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\"\x8d\x01\n\x1fRemoveRuleSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\"\xa8\x02\n!ReportHostAsFaultyInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12~\n0instances_report_host_as_faulty_request_resource\x18\xa6\x94\xcd\xeb\x01 \x01(\x0b\x32;.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"K\n\x13RequestMirrorPolicy\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_backend_service\"\xea\x0b\n\x0bReservation\x12_\n\x15\x61ggregate_reservation\x18\xcc\xf2\x83\x8b\x01 \x01(\x0b\x32\x37.google.cloud.compute.v1.AllocationAggregateReservationH\x00\x88\x01\x01\x12\x1b\n\ncommitment\x18\x95\x96\xf3\xe5\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12 \n\x0f\x64\x65ployment_type\x18\xf4\x80\x96\xbd\x01 \x01(\tH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12\x1e\n\x12linked_commitments\x18\xd8\xfd\xc8\xe0\x01 \x03(\t\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12g\n\x1areservation_sharing_policy\x18\xc8\xb5\x9b\x62 \x01(\x0b\x32;.google.cloud.compute.v1.AllocationReservationSharingPolicyH\x08\x88\x01\x01\x12X\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\x0b\x32:.google.cloud.compute.v1.Reservation.ResourcePoliciesEntry\x12R\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x31.google.cloud.compute.v1.AllocationResourceStatusH\t\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\n\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0b\x88\x01\x01\x12\x46\n\x0eshare_settings\x18\x83\x91\x94\x7f \x01(\x0b\x32&.google.cloud.compute.v1.ShareSettingsH\x0c\x88\x01\x01\x12`\n\x14specific_reservation\x18\xbf\xa0\x89\xc1\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.AllocationSpecificSKUReservationH\r\x88\x01\x01\x12-\n\x1dspecific_reservation_required\x18\x9f\xc7\x83l \x01(\x08H\x0e\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0f\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x10\x88\x01\x01\x1a\x37\n\x15ResourcePoliciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"a\n\x0e\x44\x65ploymentType\x12\x1d\n\x19UNDEFINED_DEPLOYMENT_TYPE\x10\x00\x12\x0c\n\x05\x44\x45NSE\x10\xff\x95\xfb\x1e\x12\"\n\x1b\x44\x45PLOYMENT_TYPE_UNSPECIFIED\x10\xcc\xf7\xfdo\"s\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x10\n\x08UPDATING\x10\xc6\xee\xec\xeb\x01\x42\x18\n\x16_aggregate_reservationB\r\n\x0b_commitmentB\x15\n\x13_creation_timestampB\x12\n\x10_deployment_typeB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x1d\n\x1b_reservation_sharing_policyB\x12\n\x10_resource_statusB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x11\n\x0f_share_settingsB\x17\n\x15_specific_reservationB \n\x1e_specific_reservation_requiredB\t\n\x07_statusB\x07\n\x05_zone\"\xb0\x02\n\x13ReservationAffinity\x12)\n\x18\x63onsume_reservation_type\x18\xb0\xc3\xb3\x8f\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x06values\x18\xa2\xba\x96w \x03(\t\"\xa1\x01\n\x16\x43onsumeReservationType\x12&\n\"UNDEFINED_CONSUME_RESERVATION_TYPE\x10\x00\x12\x16\n\x0f\x41NY_RESERVATION\x10\xb9\xc3\xaf_\x12\x15\n\x0eNO_RESERVATION\x10\xae\xcc\xdeP\x12\x1b\n\x14SPECIFIC_RESERVATION\x10\x9f\xa8\xcfm\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x1b\n\x19_consume_reservation_typeB\x06\n\x04_key\"\xc2\x03\n\x19ReservationAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12O\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32=.google.cloud.compute.v1.ReservationAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a]\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.ReservationsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe7\x05\n\x10ReservationBlock\x12\x15\n\x05\x63ount\x18\x8f\xa2\x9d- \x01(\x05H\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x1d\n\x0cin_use_count\x18\xbd\xab\xa6\xeb\x01 \x01(\x05H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12]\n\x11physical_topology\x18\xd7\xa9\xb4\x85\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.ReservationBlockPhysicalTopologyH\x06\x88\x01\x01\x12W\n\x17reservation_maintenance\x18\xa0\x86\xb5\xa2\x01 \x01(\x0b\x32-.google.cloud.compute.v1.GroupMaintenanceInfoH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\t\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\n\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0b\x88\x01\x01\"a\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x08\n\x06_countB\x15\n\x13_creation_timestampB\x05\n\x03_idB\x0f\n\r_in_use_countB\x07\n\x05_kindB\x07\n\x05_nameB\x14\n\x12_physical_topologyB\x1a\n\x18_reservation_maintenanceB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\t\n\x07_statusB\x07\n\x05_zone\"i\n ReservationBlockPhysicalTopology\x12\x15\n\x05\x62lock\x18\x8d\x89\xdf, \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07\x63luster\x18\xfa\xa3\xec\x9f\x01 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_cluster\"p\n\x1cReservationBlocksGetResponse\x12\x43\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32).google.cloud.compute.v1.ReservationBlockH\x00\x88\x01\x01\x42\x0b\n\t_resource\"\xba\x02\n\x1dReservationBlocksListResponse\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.ReservationBlock\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa7\x02\n\x0fReservationList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x36\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32$.google.cloud.compute.v1.Reservation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xfa\x01\n+ReservationsBlocksPerformMaintenanceRequest\x12!\n\x11maintenance_scope\x18\xa8\xf4\x8a\x43 \x01(\tH\x00\x88\x01\x01\"\x91\x01\n\x10MaintenanceScope\x12\x1f\n\x1bUNDEFINED_MAINTENANCE_SCOPE\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12$\n\x1dMAINTENANCE_SCOPE_UNSPECIFIED\x10\xc0\x9e\xcb%\x12\x13\n\x0bRUNNING_VMS\x10\xdc\xeb\xbc\xff\x01\x12\x16\n\x0fUNUSED_CAPACITY\x10\x83\xda\xb7\x65\x42\x14\n\x12_maintenance_scope\"\xf4\x01\n%ReservationsPerformMaintenanceRequest\x12!\n\x11maintenance_scope\x18\xa8\xf4\x8a\x43 \x01(\tH\x00\x88\x01\x01\"\x91\x01\n\x10MaintenanceScope\x12\x1f\n\x1bUNDEFINED_MAINTENANCE_SCOPE\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12$\n\x1dMAINTENANCE_SCOPE_UNSPECIFIED\x10\xc0\x9e\xcb%\x12\x13\n\x0bRUNNING_VMS\x10\xdc\xeb\xbc\xff\x01\x12\x16\n\x0fUNUSED_CAPACITY\x10\x83\xda\xb7\x65\x42\x14\n\x12_maintenance_scope\"V\n\x19ReservationsResizeRequest\x12\"\n\x12specific_sku_count\x18\xa0\xe9\xcf\x06 \x01(\x03H\x00\x88\x01\x01\x42\x15\n\x13_specific_sku_count\"\x9f\x01\n\x16ReservationsScopedList\x12>\n\x0creservations\x18\xa7\xec\xcc\xbe\x01 \x03(\x0b\x32$.google.cloud.compute.v1.Reservation\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x9b\x01\n\x14ResetInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf0\x01\n\x11ResizeDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x64isks_resize_request_resource\x18\xa0\xc2\xab% \x01(\x0b\x32+.google.cloud.compute.v1.DisksResizeRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcc\x01\n!ResizeInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04size\x18\x81\xc0\xd7\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x88\x02\n\x17ResizeRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12h\n$region_disks_resize_request_resource\x18\x95\xaa\xfc\xd4\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.RegionDisksResizeRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd6\x01\n\'ResizeRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04size\x18\x81\xc0\xd7\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8d\x02\n\x18ResizeReservationRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12i\n$reservations_resize_request_resource\x18\xd1\xdb\xce\xb9\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.ReservationsResizeRequestB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x82\x02\n\x12ResourceCommitment\x12 \n\x10\x61\x63\x63\x65lerator_type\x18\x8e\xe1\xe8\x41 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06\x61mount\x18\xd8\xa0\xe9] \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x02\x88\x01\x01\"s\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x13\n\x0b\x41\x43\x43\x45LERATOR\x10\xcb\xec\xf9\xcc\x01\x12\x11\n\tLOCAL_SSD\x10\xf0\xf5\xd6\xf2\x01\x12\r\n\x06MEMORY\x10\x81\xe2\xd6:\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x12\x0b\n\x04VCPU\x10\xf2\xba\xa0\x01\x42\x13\n\x11_accelerator_typeB\t\n\x07_amountB\x07\n\x05_type\"9\n\x16ResourceGroupReference\x12\x15\n\x05group\x18\xff\xec\x83/ \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_group\"\xaa\x01\n\x1aResourcePoliciesScopedList\x12\x45\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\x0b\x32\'.google.cloud.compute.v1.ResourcePolicy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xc2\x08\n\x0eResourcePolicy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12q\n\x1d\x64isk_consistency_group_policy\x18\x9b\x84\xf2\xe1\x01 \x01(\x0b\x32\x41.google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicyH\x02\x88\x01\x01\x12\x63\n\x16group_placement_policy\x18\x8c\x9b\x9b\x05 \x01(\x0b\x32;.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicyH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12h\n\x18instance_schedule_policy\x18\xb0\xd0\xb9\xa4\x01 \x01(\x0b\x32=.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyH\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12V\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x35.google.cloud.compute.v1.ResourcePolicyResourceStatusH\t\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12g\n\x18snapshot_schedule_policy\x18\xdf\xd6\x81h \x01(\x0b\x32=.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyH\x0b\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0c\x88\x01\x01\"r\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0f\n\x07\x45XPIRED\x10\x85\xe6\x88\xe6\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB \n\x1e_disk_consistency_group_policyB\x19\n\x17_group_placement_policyB\x05\n\x03_idB\x1b\n\x19_instance_schedule_policyB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x12\n\x10_resource_statusB\x0c\n\n_self_linkB\x1b\n\x19_snapshot_schedule_policyB\t\n\x07_status\"\xeb\x03\n\x1cResourcePolicyAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.ResourcePolicyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.ResourcePoliciesScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x9e\x01\n\x18ResourcePolicyDailyCycle\x12\x1e\n\rdays_in_cycle\x18\xb4\x98\xaa\xb0\x01 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x08\x64uration\x18\x94\x9b\x91J \x01(\tH\x01\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_days_in_cycleB\x0b\n\t_durationB\r\n\x0b_start_time\"*\n(ResourcePolicyDiskConsistencyGroupPolicy\"\xa0\x02\n\"ResourcePolicyGroupPlacementPolicy\x12)\n\x19\x61vailability_domain_count\x18\xb8\x8c\xf8\x05 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0b\x63ollocation\x18\xb5\xc2\xde\xf3\x01 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x08vm_count\x18\x87\xbb\xd6| \x01(\x05H\x02\x88\x01\x01\"\\\n\x0b\x43ollocation\x12\x19\n\x15UNDEFINED_COLLOCATION\x10\x00\x12\x11\n\nCOLLOCATED\x10\xd2\xab\x9e\x31\x12\x1f\n\x17UNSPECIFIED_COLLOCATION\x10\xed\x8f\xb3\xdd\x01\x42\x1c\n\x1a_availability_domain_countB\x0e\n\x0c_collocationB\x0b\n\t_vm_count\"\xa1\x01\n\x19ResourcePolicyHourlyCycle\x12\x18\n\x08\x64uration\x18\x94\x9b\x91J \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0ehours_in_cycle\x18\xfc\x88\x97\xfb\x01 \x01(\x05H\x01\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_durationB\x11\n\x0f_hours_in_cycleB\r\n\x0b_start_time\"\xae\x03\n$ResourcePolicyInstanceSchedulePolicy\x12\x1f\n\x0f\x65xpiration_time\x18\xdd\xac\xe8m \x01(\tH\x00\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x01\x88\x01\x01\x12\x19\n\ttime_zone\x18\xde\x83\xc9\x11 \x01(\tH\x02\x88\x01\x01\x12h\n\x11vm_start_schedule\x18\xdc\x90\xbc\x08 \x01(\x0b\x32\x45.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyScheduleH\x03\x88\x01\x01\x12h\n\x10vm_stop_schedule\x18\xac\xe5\x9f\xcb\x01 \x01(\x0b\x32\x45.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyScheduleH\x04\x88\x01\x01\x42\x12\n\x10_expiration_timeB\r\n\x0b_start_timeB\x0c\n\n_time_zoneB\x14\n\x12_vm_start_scheduleB\x13\n\x11_vm_stop_schedule\"V\n,ResourcePolicyInstanceSchedulePolicySchedule\x12\x19\n\x08schedule\x18\x97\xa5\x9a\xb3\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_schedule\"\xcc\x02\n\x12ResourcePolicyList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.ResourcePolicy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb9\x01\n\x1cResourcePolicyResourceStatus\x12|\n\x18instance_schedule_policy\x18\xb0\xd0\xb9\xa4\x01 \x01(\x0b\x32Q.google.cloud.compute.v1.ResourcePolicyResourceStatusInstanceSchedulePolicyStatusH\x00\x88\x01\x01\x42\x1b\n\x19_instance_schedule_policy\"\xb6\x01\n8ResourcePolicyResourceStatusInstanceSchedulePolicyStatus\x12$\n\x13last_run_start_time\x18\x87\xef\xc1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12$\n\x13next_run_start_time\x18\x8a\xb3\xf8\x97\x01 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_last_run_start_timeB\x16\n\x14_next_run_start_time\"\xa8\x03\n$ResourcePolicySnapshotSchedulePolicy\x12n\n\x10retention_policy\x18\xf3\xca\xdc \x01(\x0b\x32L.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicyH\x00\x88\x01\x01\x12`\n\x08schedule\x18\x97\xa5\x9a\xb3\x01 \x01(\x0b\x32\x45.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyScheduleH\x01\x88\x01\x01\x12t\n\x13snapshot_properties\x18\x8e\x95\xb2X \x01(\x0b\x32O.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesH\x02\x88\x01\x01\x42\x13\n\x11_retention_policyB\x0b\n\t_scheduleB\x16\n\x14_snapshot_properties\"\xd5\x02\n3ResourcePolicySnapshotSchedulePolicyRetentionPolicy\x12#\n\x12max_retention_days\x18\x93\xc2\xd1\x9a\x01 \x01(\x05H\x00\x88\x01\x01\x12&\n\x15on_source_disk_delete\x18\xc9\xcd\xc2\x99\x01 \x01(\tH\x01\x88\x01\x01\"\x9f\x01\n\x12OnSourceDiskDelete\x12#\n\x1fUNDEFINED_ON_SOURCE_DISK_DELETE\x10\x00\x12\x1e\n\x16\x41PPLY_RETENTION_POLICY\x10\xe4\x94\x92\xff\x01\x12\x1a\n\x13KEEP_AUTO_SNAPSHOTS\x10\xf9\xc8\xbb{\x12(\n!UNSPECIFIED_ON_SOURCE_DISK_DELETE\x10\xa1\xff\x83rB\x15\n\x13_max_retention_daysB\x18\n\x16_on_source_disk_delete\"\xe7\x02\n,ResourcePolicySnapshotSchedulePolicySchedule\x12Q\n\x0e\x64\x61ily_schedule\x18\xfd\xe3\x8a) \x01(\x0b\x32\x31.google.cloud.compute.v1.ResourcePolicyDailyCycleH\x00\x88\x01\x01\x12S\n\x0fhourly_schedule\x18\xa5\xb1\xa3\x12 \x01(\x0b\x32\x32.google.cloud.compute.v1.ResourcePolicyHourlyCycleH\x01\x88\x01\x01\x12T\n\x0fweekly_schedule\x18\x95\x89\xb9\xab\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.ResourcePolicyWeeklyCycleH\x02\x88\x01\x01\x42\x11\n\x0f_daily_scheduleB\x12\n\x10_hourly_scheduleB\x12\n\x10_weekly_schedule\"\xd0\x02\n6ResourcePolicySnapshotSchedulePolicySnapshotProperties\x12\x1a\n\nchain_name\x18\xc9\xda\xdd \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bguest_flush\x18\xdd\x93\xec\xb7\x01 \x01(\x08H\x01\x88\x01\x01\x12o\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32[.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties.LabelsEntry\x12\x1d\n\x11storage_locations\x18\x9a\xed\xb3\x9c\x01 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b_chain_nameB\x0e\n\x0c_guest_flush\"q\n\x19ResourcePolicyWeeklyCycle\x12T\n\x0c\x64\x61y_of_weeks\x18\xda\x9f\xfbz \x03(\x0b\x32;.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek\"\xb4\x02\n\"ResourcePolicyWeeklyCycleDayOfWeek\x12\x12\n\x03\x64\x61y\x18\x9c\x87\x06 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08\x64uration\x18\x94\x9b\x91J \x01(\tH\x01\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x02\x88\x01\x01\"\x9f\x01\n\x03\x44\x61y\x12\x11\n\rUNDEFINED_DAY\x10\x00\x12\x0e\n\x06\x46RIDAY\x10\xdf\xf2\xe3\xe0\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\r\n\x06MONDAY\x10\x90\xca\x8b?\x12\x10\n\x08SATURDAY\x10\xb9\x8f\x87\x85\x01\x12\x0e\n\x06SUNDAY\x10\xd0\x8b\xd2\x93\x01\x12\x0f\n\x08THURSDAY\x10\xda\xb3\xe6\x62\x12\x0f\n\x07TUESDAY\x10\xad\xec\xa9\x84\x01\x12\x11\n\tWEDNESDAY\x10\xb6\xce\x9e\xc9\x01\x42\x06\n\x04_dayB\x0b\n\t_durationB\r\n\x0b_start_time\"\x8f\x03\n\x0eResourceStatus\x12\x1e\n\rphysical_host\x18\x90\xf8\xb6\xdd\x01 \x01(\tH\x00\x88\x01\x01\x12\x64\n\x16physical_host_topology\x18\xbe\x93\xaf\xba\x01 \x01(\x0b\x32;.google.cloud.compute.v1.ResourceStatusPhysicalHostTopologyH\x01\x88\x01\x01\x12N\n\nscheduling\x18\x94\xcb\xb1\xb8\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.ResourceStatusSchedulingH\x02\x88\x01\x01\x12R\n\x14upcoming_maintenance\x18\xf0\xa0\xb4l \x01(\x0b\x32,.google.cloud.compute.v1.UpcomingMaintenanceH\x03\x88\x01\x01\x42\x10\n\x0e_physical_hostB\x19\n\x17_physical_host_topologyB\r\n\x0b_schedulingB\x17\n\x15_upcoming_maintenance\"\xb1\x01\n\"ResourceStatusPhysicalHostTopology\x12\x15\n\x05\x62lock\x18\x8d\x89\xdf, \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07\x63luster\x18\xfa\xa3\xec\x9f\x01 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04host\x18\xa8\xeb\xc3\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08subblock\x18\xcd\xdc\xcb! \x01(\tH\x03\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_clusterB\x07\n\x05_hostB\x0b\n\t_subblock\"W\n\x18ResourceStatusScheduling\x12#\n\x13\x61vailability_domain\x18\xa8\xa0\xb4x \x01(\x05H\x00\x88\x01\x01\x42\x16\n\x14_availability_domain\"\x9c\x01\n\x15ResumeInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd1\x02\n*ResumeInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n9instance_group_managers_resume_instances_request_resource\x18\xc2\xbe\xc2= \x01(\x0b\x32\x44.google.cloud.compute.v1.InstanceGroupManagersResumeInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe9\x02\n0ResumeInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_instance_group_managers_resume_instances_request_resource\x18\xb7\x83\x80\xdd\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagersResumeInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xcd\x0b\n\x05Route\x12\x39\n\x08\x61s_paths\x18\xa1\xc5\xcc\x41 \x03(\x0b\x32$.google.cloud.compute.v1.RouteAsPath\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\ndest_range\x18\xe0\xb2\xea\xb5\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x06\x88\x01\x01\x12!\n\x10next_hop_gateway\x18\x82\xfa\xec\xb3\x01 \x01(\tH\x07\x88\x01\x01\x12\x1c\n\x0cnext_hop_hub\x18\xb3\xb5\xde^ \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0cnext_hop_ilb\x18\xdd\xba\xde^ \x01(\tH\t\x88\x01\x01\x12\"\n\x11next_hop_instance\x18\x97\xeb\xd1\xbb\x01 \x01(\tH\n\x88\x01\x01\x12*\n\x1anext_hop_inter_region_cost\x18\x93\xe9\xd3\x0b \x01(\rH\x0b\x88\x01\x01\x12\x1b\n\x0bnext_hop_ip\x18\xa9\xaf\xcd\x34 \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0cnext_hop_med\x18\x8a\xd7\xde^ \x01(\rH\r\x88\x01\x01\x12 \n\x10next_hop_network\x18\xec\xa1\x89} \x01(\tH\x0e\x88\x01\x01\x12\x1f\n\x0fnext_hop_origin\x18\xa8\xd1\x9f\x17 \x01(\tH\x0f\x88\x01\x01\x12!\n\x10next_hop_peering\x18\xfe\x93\xe4\xc4\x01 \x01(\tH\x10\x88\x01\x01\x12$\n\x13next_hop_vpn_tunnel\x18\x95\xe5\xf0\xf7\x01 \x01(\tH\x11\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\rH\x12\x88\x01\x01\x12\x1d\n\x0croute_status\x18\xa8\xcd\xb2\xc7\x01 \x01(\tH\x13\x88\x01\x01\x12\x1b\n\nroute_type\x18\xf0\xb6\x9e\xb3\x01 \x01(\tH\x14\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x15\x88\x01\x01\x12\x0f\n\x04tags\x18\x99\xe8\xd8\x01 \x03(\t\x12\x37\n\x08warnings\x18\xd7\x88\xc1\xed\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Warnings\"W\n\rNextHopOrigin\x12\x1d\n\x19UNDEFINED_NEXT_HOP_ORIGIN\x10\x00\x12\t\n\x03\x45GP\x10\xee\x97\x04\x12\t\n\x03IGP\x10\xf2\xb5\x04\x12\x11\n\nINCOMPLETE\x10\xde\xea\xd8\x05\"l\n\x0bRouteStatus\x12\x1a\n\x16UNDEFINED_ROUTE_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0f\n\x07\x44ROPPED\x10\xa0\xe7\xcf\xec\x01\x12\x10\n\x08INACTIVE\x10\xeb\x98\xf9\x80\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\"`\n\tRouteType\x12\x18\n\x14UNDEFINED_ROUTE_TYPE\x10\x00\x12\t\n\x03\x42GP\x10\xab\x81\x04\x12\x0e\n\x06STATIC\x10\xee\x84\x83\x93\x01\x12\x0e\n\x06SUBNET\x10\xdd\xee\xbc\x93\x01\x12\x0e\n\x07TRANSIT\x10\xb3\x83\xc6YB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\r\n\x0b_dest_rangeB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\x13\n\x11_next_hop_gatewayB\x0f\n\r_next_hop_hubB\x0f\n\r_next_hop_ilbB\x14\n\x12_next_hop_instanceB\x1d\n\x1b_next_hop_inter_region_costB\x0e\n\x0c_next_hop_ipB\x0f\n\r_next_hop_medB\x13\n\x11_next_hop_networkB\x12\n\x10_next_hop_originB\x13\n\x11_next_hop_peeringB\x16\n\x14_next_hop_vpn_tunnelB\x0b\n\t_priorityB\x0f\n\r_route_statusB\r\n\x0b_route_typeB\x0c\n\n_self_link\"\xe7\x01\n\x0bRouteAsPath\x12\x13\n\x08\x61s_lists\x18\xc8\xca\xf9? \x03(\r\x12\"\n\x11path_segment_type\x18\xa0\xb5\xeb\xf4\x01 \x01(\tH\x00\x88\x01\x01\"\x88\x01\n\x0fPathSegmentType\x12\x1f\n\x1bUNDEFINED_PATH_SEGMENT_TYPE\x10\x00\x12\x19\n\x12\x41S_CONFED_SEQUENCE\x10\xb0\x8f\xf7i\x12\x15\n\rAS_CONFED_SET\x10\xf3\xcd\xad\xb2\x01\x12\x12\n\x0b\x41S_SEQUENCE\x10\xae\xd2\xf2\x32\x12\x0e\n\x06\x41S_SET\x10\xb5\x9d\xa4\x9d\x01\x42\x14\n\x12_path_segment_type\"\x9b\x02\n\tRouteList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x30\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1e.google.cloud.compute.v1.Route\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xc8\x02\n\x0bRoutePolicy\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x02\x88\x01\x01\x12@\n\x05terms\x18\x87\x93\xc9\x34 \x03(\x0b\x32..google.cloud.compute.v1.RoutePolicyPolicyTerm\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x03\x88\x01\x01\"^\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12 \n\x18ROUTE_POLICY_TYPE_EXPORT\x10\xa2\xcd\xe0\x8b\x01\x12 \n\x18ROUTE_POLICY_TYPE_IMPORT\x10\x93\x8d\xc2\xbd\x01\x42\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x07\n\x05_nameB\x07\n\x05_type\"\xb3\x01\n\x15RoutePolicyPolicyTerm\x12\x32\n\x07\x61\x63tions\x18\xfd\x91\x81\xd6\x01 \x03(\x0b\x32\x1d.google.cloud.compute.v1.Expr\x12\x34\n\x05match\x18\xc5\xb3\xb7\x31 \x01(\x0b\x32\x1d.google.cloud.compute.v1.ExprH\x00\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x01\x88\x01\x01\x42\x08\n\x06_matchB\x0b\n\t_priority\"\xda\x05\n\x06Router\x12\x36\n\x03\x62gp\x18\xcb\xf9\x05 \x01(\x0b\x32\".google.cloud.compute.v1.RouterBgpH\x00\x88\x01\x01\x12=\n\tbgp_peers\x18\xdd\xad\xee\xd7\x01 \x03(\x0b\x32&.google.cloud.compute.v1.RouterBgpPeer\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12.\n\x1d\x65ncrypted_interconnect_router\x18\x9f\xa2\x8c\x8e\x01 \x01(\x08H\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12?\n\ninterfaces\x18\xda\xf4\xe0\x05 \x03(\x0b\x32(.google.cloud.compute.v1.RouterInterface\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12W\n\x17md5_authentication_keys\x18\x9a\xae\xf1! \x03(\x0b\x32\x33.google.cloud.compute.v1.RouterMd5AuthenticationKey\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x33\n\x04nats\x18\xf2\xf6\xcd\x01 \x03(\x0b\x32\".google.cloud.compute.v1.RouterNat\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x42\x06\n\x04_bgpB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB \n\x1e_encrypted_interconnect_routerB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_link\"h\n\x17RouterAdvertisedIpRange\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05range\x18\xbd\xf2\xd0\x33 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x08\n\x06_range\"\xb3\x03\n\x14RouterAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12J\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x38.google.cloud.compute.v1.RouterAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aX\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.google.cloud.compute.v1.RoutersScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xd8\x03\n\tRouterBgp\x12\x1f\n\x0e\x61\x64vertise_mode\x18\xbb\x95\xeb\x94\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x11\x61\x64vertised_groups\x18\xb6\xde\x85\n \x03(\t\x12Q\n\x14\x61\x64vertised_ip_ranges\x18\xcc\xd8\xf3\x10 \x03(\x0b\x32\x30.google.cloud.compute.v1.RouterAdvertisedIpRange\x12\x12\n\x03\x61sn\x18\xfc\xf4\x05 \x01(\rH\x01\x88\x01\x01\x12!\n\x10identifier_range\x18\xa7\xcc\x95\xef\x01 \x01(\tH\x02\x88\x01\x01\x12#\n\x12keepalive_interval\x18\xbc\xe5\xfc\x83\x01 \x01(\rH\x03\x88\x01\x01\"M\n\rAdvertiseMode\x12\x1c\n\x18UNDEFINED_ADVERTISE_MODE\x10\x00\x12\x0e\n\x06\x43USTOM\x10\xf1\xfe\xa5\xb9\x01\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\"G\n\x10\x41\x64vertisedGroups\x12\x1f\n\x1bUNDEFINED_ADVERTISED_GROUPS\x10\x00\x12\x12\n\x0b\x41LL_SUBNETS\x10\xd8\x8f\xdd\x01\x42\x11\n\x0f_advertise_modeB\x06\n\x04_asnB\x13\n\x11_identifier_rangeB\x15\n\x13_keepalive_interval\"\xa5\r\n\rRouterBgpPeer\x12\x1f\n\x0e\x61\x64vertise_mode\x18\xbb\x95\xeb\x94\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x11\x61\x64vertised_groups\x18\xb6\xde\x85\n \x03(\t\x12Q\n\x14\x61\x64vertised_ip_ranges\x18\xcc\xd8\xf3\x10 \x03(\x0b\x32\x30.google.cloud.compute.v1.RouterAdvertisedIpRange\x12)\n\x19\x61\x64vertised_route_priority\x18\xbc\x9c\xf6X \x01(\rH\x01\x88\x01\x01\x12=\n\x03\x62\x66\x64\x18\xa0\xf9\x05 \x01(\x0b\x32).google.cloud.compute.v1.RouterBgpPeerBfdH\x02\x88\x01\x01\x12`\n\x18\x63ustom_learned_ip_ranges\x18\xc4\x88\xc4\xe5\x01 \x03(\x0b\x32:.google.cloud.compute.v1.RouterBgpPeerCustomLearnedIpRange\x12.\n\x1d\x63ustom_learned_route_priority\x18\xc4\xe2\xc6\x9d\x01 \x01(\x05H\x03\x88\x01\x01\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0b\x65nable_ipv4\x18\xa1\xf6\xc3V \x01(\x08H\x05\x88\x01\x01\x12\x1b\n\x0b\x65nable_ipv6\x18\xa3\xf6\xc3V \x01(\x08H\x06\x88\x01\x01\x12\x1a\n\x0f\x65xport_policies\x18\xfb\xf2\xf7? \x03(\t\x12\x1b\n\x0fimport_policies\x18\xaa\xf1\x8f\xd7\x01 \x03(\t\x12\x1f\n\x0einterface_name\x18\xd1\xc3\xe4\xd0\x01 \x01(\tH\x07\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x08\x88\x01\x01\x12$\n\x14ipv4_nexthop_address\x18\xd1\x8d\xdc\x02 \x01(\tH\t\x88\x01\x01\x12$\n\x14ipv6_nexthop_address\x18\xd3\x85\xab\r \x01(\tH\n\x88\x01\x01\x12\x1f\n\x0fmanagement_type\x18\xb6\x83\xeaR \x01(\tH\x0b\x88\x01\x01\x12,\n\x1bmd5_authentication_key_name\x18\x91\xbd\x83\x86\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\r\x88\x01\x01\x12\x18\n\x08peer_asn\x18\x9f\xb4\x96! \x01(\rH\x0e\x88\x01\x01\x12\x1f\n\x0fpeer_ip_address\x18\xd9\x97\x87\x63 \x01(\tH\x0f\x88\x01\x01\x12*\n\x19peer_ipv4_nexthop_address\x18\x8e\x83\xdf\xdf\x01 \x01(\tH\x10\x88\x01\x01\x12*\n\x19peer_ipv6_nexthop_address\x18\x90\xfb\xad\xea\x01 \x01(\tH\x11\x88\x01\x01\x12*\n\x19router_appliance_instance\x18\x9d\xc7\xa7\xdf\x01 \x01(\tH\x12\x88\x01\x01\"M\n\rAdvertiseMode\x12\x1c\n\x18UNDEFINED_ADVERTISE_MODE\x10\x00\x12\x0e\n\x06\x43USTOM\x10\xf1\xfe\xa5\xb9\x01\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\"G\n\x10\x41\x64vertisedGroups\x12\x1f\n\x1bUNDEFINED_ADVERTISED_GROUPS\x10\x00\x12\x12\n\x0b\x41LL_SUBNETS\x10\xd8\x8f\xdd\x01\"9\n\x06\x45nable\x12\x14\n\x10UNDEFINED_ENABLE\x10\x00\x12\x0c\n\x05\x46\x41LSE\x10\x83\xc2\xe4\x1f\x12\x0b\n\x04TRUE\x10\x8e\xdb\x9d\x01\"g\n\x0eManagementType\x12\x1d\n\x19UNDEFINED_MANAGEMENT_TYPE\x10\x00\x12\x1d\n\x15MANAGED_BY_ATTACHMENT\x10\xcb\xd2\xea\xda\x01\x12\x17\n\x0fMANAGED_BY_USER\x10\xf3\x8b\xa6\x97\x01\x42\x11\n\x0f_advertise_modeB\x1c\n\x1a_advertised_route_priorityB\x06\n\x04_bfdB \n\x1e_custom_learned_route_priorityB\t\n\x07_enableB\x0e\n\x0c_enable_ipv4B\x0e\n\x0c_enable_ipv6B\x11\n\x0f_interface_nameB\r\n\x0b_ip_addressB\x17\n\x15_ipv4_nexthop_addressB\x17\n\x15_ipv6_nexthop_addressB\x12\n\x10_management_typeB\x1e\n\x1c_md5_authentication_key_nameB\x07\n\x05_nameB\x0b\n\t_peer_asnB\x12\n\x10_peer_ip_addressB\x1c\n\x1a_peer_ipv4_nexthop_addressB\x1c\n\x1a_peer_ipv6_nexthop_addressB\x1c\n\x1a_router_appliance_instance\"\x86\x03\n\x10RouterBgpPeerBfd\x12$\n\x14min_receive_interval\x18\xee\xb9\x94Y \x01(\rH\x00\x88\x01\x01\x12&\n\x15min_transmit_interval\x18\xc7\xd1\xc2\xf9\x01 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\nmultiplier\x18\xc1\xfb\x9d[ \x01(\rH\x02\x88\x01\x01\x12+\n\x1bsession_initialization_mode\x18\xb9\x8d\xc3\x32 \x01(\tH\x03\x88\x01\x01\"y\n\x19SessionInitializationMode\x12)\n%UNDEFINED_SESSION_INITIALIZATION_MODE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0f\n\x07PASSIVE\x10\x87\xf6\xd7\xdc\x01\x42\x17\n\x15_min_receive_intervalB\x18\n\x16_min_transmit_intervalB\r\n\x0b_multiplierB\x1e\n\x1c_session_initialization_mode\"D\n!RouterBgpPeerCustomLearnedIpRange\x12\x15\n\x05range\x18\xbd\xf2\xd0\x33 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_range\"\x95\x05\n\x0fRouterInterface\x12\x18\n\x08ip_range\x18\xa5\xe0\x97\x45 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nip_version\x18\xc0\xf3\xd2\x8c\x01 \x01(\tH\x01\x88\x01\x01\x12/\n\x1elinked_interconnect_attachment\x18\xce\xea\xf7\xee\x01 \x01(\tH\x02\x88\x01\x01\x12\"\n\x11linked_vpn_tunnel\x18\xf9\xbf\xfe\xa7\x01 \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x0fmanagement_type\x18\xb6\x83\xeaR \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\"\n\x12private_ip_address\x18\x98\xd2\x8b\x30 \x01(\tH\x06\x88\x01\x01\x12$\n\x13redundant_interface\x18\xe7\xe8\xbc\xf9\x01 \x01(\tH\x07\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x08\x88\x01\x01\"?\n\tIpVersion\x12\x18\n\x14UNDEFINED_IP_VERSION\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\"g\n\x0eManagementType\x12\x1d\n\x19UNDEFINED_MANAGEMENT_TYPE\x10\x00\x12\x1d\n\x15MANAGED_BY_ATTACHMENT\x10\xcb\xd2\xea\xda\x01\x12\x17\n\x0fMANAGED_BY_USER\x10\xf3\x8b\xa6\x97\x01\x42\x0b\n\t_ip_rangeB\r\n\x0b_ip_versionB!\n\x1f_linked_interconnect_attachmentB\x14\n\x12_linked_vpn_tunnelB\x12\n\x10_management_typeB\x07\n\x05_nameB\x15\n\x13_private_ip_addressB\x16\n\x14_redundant_interfaceB\r\n\x0b_subnetwork\"\x9d\x02\n\nRouterList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x31\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1f.google.cloud.compute.v1.Router\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"W\n\x1aRouterMd5AuthenticationKey\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\x07\n\x05_name\"\xb5\x11\n\tRouterNat\x12\"\n\x11\x61uto_network_tier\x18\xe3\xbb\xd1\x80\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\rdrain_nat_ips\x18\xc7\xc1\xae\xf0\x01 \x03(\t\x12/\n\x1e\x65nable_dynamic_port_allocation\x18\xa2\x99\xdd\xfd\x01 \x01(\x08H\x01\x88\x01\x01\x12\x33\n#enable_endpoint_independent_mapping\x18\x9b\x89\xdb{ \x01(\x08H\x02\x88\x01\x01\x12\x1a\n\x0e\x65ndpoint_types\x18\xcf\xaa\xd6\xef\x01 \x03(\t\x12%\n\x15icmp_idle_timeout_sec\x18\xca\xd0\xde\x01 \x01(\x05H\x03\x88\x01\x01\x12H\n\nlog_config\x18\x9d\xd1\xc1\xa7\x01 \x01(\x0b\x32+.google.cloud.compute.v1.RouterNatLogConfigH\x04\x88\x01\x01\x12 \n\x10max_ports_per_vm\x18\xe1\xc9\x9ew \x01(\x05H\x05\x88\x01\x01\x12 \n\x10min_ports_per_vm\x18\xb3\xad\xe4X \x01(\x05H\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12Q\n\x11nat64_subnetworks\x18\xa5\xfb\xa8\x1e \x03(\x0b\x32\x33.google.cloud.compute.v1.RouterNatSubnetworkToNat64\x12\'\n\x16nat_ip_allocate_option\x18\xfd\xb8\xf4\xcc\x01 \x01(\tH\x08\x88\x01\x01\x12\x12\n\x07nat_ips\x18\x8e\xf0\x8b\x38 \x03(\t\x12\x38\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32&.google.cloud.compute.v1.RouterNatRule\x12\x32\n\"source_subnetwork_ip_ranges_to_nat\x18\xdb\xef\xa1x \x01(\tH\t\x88\x01\x01\x12\x34\n$source_subnetwork_ip_ranges_to_nat64\x18\xd9\xe7\xa7v \x01(\tH\n\x88\x01\x01\x12J\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\x0b\x32\x31.google.cloud.compute.v1.RouterNatSubnetworkToNat\x12\x30\n tcp_established_idle_timeout_sec\x18\xed\xeb\xb0j \x01(\x05H\x0b\x88\x01\x01\x12*\n\x19tcp_time_wait_timeout_sec\x18\xfd\xbb\xf3\xf4\x01 \x01(\x05H\x0c\x88\x01\x01\x12/\n\x1ftcp_transitory_idle_timeout_sec\x18\xa6\xfb\xe1\x61 \x01(\x05H\r\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x0e\x88\x01\x01\x12$\n\x14udp_idle_timeout_sec\x18\xc6\xb2\xfa\x1e \x01(\x05H\x0f\x88\x01\x01\"\x98\x01\n\x0f\x41utoNetworkTier\x12\x1f\n\x1bUNDEFINED_AUTO_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"\x88\x01\n\rEndpointTypes\x12\x1c\n\x18UNDEFINED_ENDPOINT_TYPES\x10\x00\x12&\n\x1e\x45NDPOINT_TYPE_MANAGED_PROXY_LB\x10\x82\xba\xb6\xd1\x01\x12\x18\n\x11\x45NDPOINT_TYPE_SWG\x10\xc8\xce\xfdK\x12\x17\n\x10\x45NDPOINT_TYPE_VM\x10\xb2\xea\x9c\x1b\"a\n\x13NatIpAllocateOption\x12$\n UNDEFINED_NAT_IP_ALLOCATE_OPTION\x10\x00\x12\x10\n\tAUTO_ONLY\x10\xbc\xe0\xf8V\x12\x12\n\x0bMANUAL_ONLY\x10\x85\xc1\xc9|\"\xc2\x01\n\x1dSourceSubnetworkIpRangesToNat\x12\x30\n,UNDEFINED_SOURCE_SUBNETWORK_IP_RANGES_TO_NAT\x10\x00\x12$\n\x1d\x41LL_SUBNETWORKS_ALL_IP_RANGES\x10\xd8\x93\xe8U\x12,\n%ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES\x10\xbb\xc3\xbeX\x12\x1b\n\x13LIST_OF_SUBNETWORKS\x10\xfe\xa2\xe4\xf6\x01\"\x95\x01\n\x1fSourceSubnetworkIpRangesToNat64\x12\x32\n.UNDEFINED_SOURCE_SUBNETWORK_IP_RANGES_TO_NAT64\x10\x00\x12\x1c\n\x14\x41LL_IPV6_SUBNETWORKS\x10\xeb\xcd\xf3\xa2\x01\x12 \n\x18LIST_OF_IPV6_SUBNETWORKS\x10\xb4\x98\xbc\xf8\x01\":\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x0f\n\x07PRIVATE\x10\xe3\xe2\xb2\xc0\x01\x12\r\n\x06PUBLIC\x10\xe9\xcc\xc2jB\x14\n\x12_auto_network_tierB!\n\x1f_enable_dynamic_port_allocationB&\n$_enable_endpoint_independent_mappingB\x18\n\x16_icmp_idle_timeout_secB\r\n\x0b_log_configB\x13\n\x11_max_ports_per_vmB\x13\n\x11_min_ports_per_vmB\x07\n\x05_nameB\x19\n\x17_nat_ip_allocate_optionB%\n#_source_subnetwork_ip_ranges_to_natB\'\n%_source_subnetwork_ip_ranges_to_nat64B#\n!_tcp_established_idle_timeout_secB\x1c\n\x1a_tcp_time_wait_timeout_secB\"\n _tcp_transitory_idle_timeout_secB\x07\n\x05_typeB\x17\n\x15_udp_idle_timeout_sec\"\xb7\x01\n\x12RouterNatLogConfig\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x00\x88\x01\x01\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x01\x88\x01\x01\"Y\n\x06\x46ilter\x12\x14\n\x10UNDEFINED_FILTER\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12\x13\n\x0b\x45RRORS_ONLY\x10\x80\xb0\xcf\x92\x01\x12\x19\n\x11TRANSLATIONS_ONLY\x10\xe9\xc3\xaa\xaa\x01\x42\t\n\x07_enableB\t\n\x07_filter\"\xdd\x01\n\rRouterNatRule\x12\x44\n\x06\x61\x63tion\x18\xb6\xfc\xbdY \x01(\x0b\x32,.google.cloud.compute.v1.RouterNatRuleActionH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05match\x18\xc5\xb3\xb7\x31 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0brule_number\x18\xec\xdb\x9a\xff\x01 \x01(\rH\x03\x88\x01\x01\x42\t\n\x07_actionB\x0e\n\x0c_descriptionB\x08\n\x06_matchB\x0e\n\x0c_rule_number\"\xa2\x01\n\x13RouterNatRuleAction\x12 \n\x15source_nat_active_ips\x18\xf5\xbb\xa8\x64 \x03(\t\x12#\n\x18source_nat_active_ranges\x18\xed\xd0\xeeZ \x03(\t\x12 \n\x14source_nat_drain_ips\x18\xa3\xc5\xc1\xa2\x01 \x03(\t\x12\"\n\x17source_nat_drain_ranges\x18\xff\xf9\xb7( \x03(\t\"\x96\x02\n\x18RouterNatSubnetworkToNat\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x18secondary_ip_range_names\x18\xd9\xc1\x84~ \x03(\t\x12#\n\x17source_ip_ranges_to_nat\x18\xf2\xca\x94\xb9\x01 \x03(\t\"\x90\x01\n\x13SourceIpRangesToNat\x12%\n!UNDEFINED_SOURCE_IP_RANGES_TO_NAT\x10\x00\x12\x14\n\rALL_IP_RANGES\x10\xb0\xaf\xfd\x10\x12\"\n\x1bLIST_OF_SECONDARY_IP_RANGES\x10\x9c\xb4\xd8[\x12\x18\n\x10PRIMARY_IP_RANGE\x10\xc2\x93\xd6\x8d\x01\x42\x07\n\x05_name\";\n\x1aRouterNatSubnetworkToNat64\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xc6\x02\n\x0cRouterStatus\x12\x37\n\x0b\x62\x65st_routes\x18\x85\xac\xdf\xbc\x01 \x03(\x0b\x32\x1e.google.cloud.compute.v1.Route\x12\x41\n\x16\x62\x65st_routes_for_router\x18\xf9\xfb\xf6\x38 \x03(\x0b\x32\x1e.google.cloud.compute.v1.Route\x12N\n\x0f\x62gp_peer_status\x18\xfb\xd7\x95h \x03(\x0b\x32\x32.google.cloud.compute.v1.RouterStatusBgpPeerStatus\x12\x45\n\nnat_status\x18\xd0\x99\x8b\x1e \x03(\x0b\x32..google.cloud.compute.v1.RouterStatusNatStatus\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_network\"\xe9\n\n\x19RouterStatusBgpPeerStatus\x12=\n\x11\x61\x64vertised_routes\x18\xac\xd9\xfc\x9e\x01 \x03(\x0b\x32\x1e.google.cloud.compute.v1.Route\x12?\n\nbfd_status\x18\xf1\xb8\xd3\xbc\x01 \x01(\x0b\x32\".google.cloud.compute.v1.BfdStatusH\x00\x88\x01\x01\x12\x1b\n\x0b\x65nable_ipv4\x18\xa1\xf6\xc3V \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0b\x65nable_ipv6\x18\xa3\xf6\xc3V \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x03\x88\x01\x01\x12$\n\x14ipv4_nexthop_address\x18\xd1\x8d\xdc\x02 \x01(\tH\x04\x88\x01\x01\x12$\n\x14ipv6_nexthop_address\x18\xd3\x85\xab\r \x01(\tH\x05\x88\x01\x01\x12\"\n\x11linked_vpn_tunnel\x18\xf9\xbf\xfe\xa7\x01 \x01(\tH\x06\x88\x01\x01\x12!\n\x10md5_auth_enabled\x18\xcb\x91\x90\xd7\x01 \x01(\x08H\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\"\n\x12num_learned_routes\x18\xff\xd5\xcb@ \x01(\rH\t\x88\x01\x01\x12\x1f\n\x0fpeer_ip_address\x18\xd9\x97\x87\x63 \x01(\tH\n\x88\x01\x01\x12*\n\x19peer_ipv4_nexthop_address\x18\x8e\x83\xdf\xdf\x01 \x01(\tH\x0b\x88\x01\x01\x12*\n\x19peer_ipv6_nexthop_address\x18\x90\xfb\xad\xea\x01 \x01(\tH\x0c\x88\x01\x01\x12*\n\x19router_appliance_instance\x18\x9d\xc7\xa7\xdf\x01 \x01(\tH\r\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x0e\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0f\x88\x01\x01\x12\x1e\n\rstatus_reason\x18\xb1\x96\xb5\xa3\x01 \x01(\tH\x10\x88\x01\x01\x12\x16\n\x06uptime\x18\xe8\xb7\x9ep \x01(\tH\x11\x88\x01\x01\x12\x1e\n\x0euptime_seconds\x18\xa8\xca\xf8\x31 \x01(\tH\x12\x88\x01\x01\"E\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\x12\x07\n\x02UP\x10\x9b\x15\"\xc6\x01\n\x0cStatusReason\x12\x1b\n\x17UNDEFINED_STATUS_REASON\x10\x00\x12)\n!IPV4_PEER_ON_IPV6_ONLY_CONNECTION\x10\x96\xbb\xef\xcf\x01\x12)\n!IPV6_PEER_ON_IPV4_ONLY_CONNECTION\x10\xd2\xf1\x85\xd0\x01\x12 \n\x19MD5_AUTH_INTERNAL_PROBLEM\x10\xb3\x91\xfd\x42\x12!\n\x19STATUS_REASON_UNSPECIFIED\x10\x89\x8e\x84\xbc\x01\x42\r\n\x0b_bfd_statusB\x0e\n\x0c_enable_ipv4B\x0e\n\x0c_enable_ipv6B\r\n\x0b_ip_addressB\x17\n\x15_ipv4_nexthop_addressB\x17\n\x15_ipv6_nexthop_addressB\x14\n\x12_linked_vpn_tunnelB\x13\n\x11_md5_auth_enabledB\x07\n\x05_nameB\x15\n\x13_num_learned_routesB\x12\n\x10_peer_ip_addressB\x1c\n\x1a_peer_ipv4_nexthop_addressB\x1c\n\x1a_peer_ipv6_nexthop_addressB\x1c\n\x1a_router_appliance_instanceB\x08\n\x06_stateB\t\n\x07_statusB\x10\n\x0e_status_reasonB\t\n\x07_uptimeB\x11\n\x0f_uptime_seconds\"\xf7\x03\n\x15RouterStatusNatStatus\x12\"\n\x16\x61uto_allocated_nat_ips\x18\x86\xb4\xc8\xf3\x01 \x03(\t\x12(\n\x1c\x64rain_auto_allocated_nat_ips\x18\xad\x90\xb7\x93\x01 \x03(\t\x12(\n\x1c\x64rain_user_allocated_nat_ips\x18\xc9\x8e\xc8\x91\x01 \x03(\t\x12)\n\x18min_extra_nat_ips_needed\x18\xe2\xe9\xb5\xae\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12\x33\n\"num_vm_endpoints_with_nat_mappings\x18\xec\xb6\xa8\xf4\x01 \x01(\x05H\x02\x88\x01\x01\x12S\n\x0brule_status\x18\x95\xc5\xee\x42 \x03(\x0b\x32;.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus\x12*\n\x1fuser_allocated_nat_ip_resources\x18\xd7\xe9\xba\x65 \x03(\t\x12\"\n\x16user_allocated_nat_ips\x18\xa2\xb2\xd9\xf1\x01 \x03(\tB\x1b\n\x19_min_extra_nat_ips_neededB\x07\n\x05_nameB%\n#_num_vm_endpoints_with_nat_mappings\"\xa4\x02\n\"RouterStatusNatStatusNatRuleStatus\x12\x19\n\x0e\x61\x63tive_nat_ips\x18\xd5\xef\xb6\x63 \x03(\t\x12\x19\n\rdrain_nat_ips\x18\xc7\xc1\xae\xf0\x01 \x03(\t\x12%\n\x14min_extra_ips_needed\x18\x84\xca\xa9\xa8\x01 \x01(\x05H\x00\x88\x01\x01\x12\x33\n\"num_vm_endpoints_with_nat_mappings\x18\xec\xb6\xa8\xf4\x01 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0brule_number\x18\xec\xdb\x9a\xff\x01 \x01(\x05H\x02\x88\x01\x01\x42\x17\n\x15_min_extra_ips_neededB%\n#_num_vm_endpoints_with_nat_mappingsB\x0e\n\x0c_rule_number\"\x7f\n\x14RouterStatusResponse\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x12=\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32%.google.cloud.compute.v1.RouterStatusH\x01\x88\x01\x01\x42\x07\n\x05_kindB\t\n\x07_result\"l\n\x1dRoutersGetRoutePolicyResponse\x12>\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32$.google.cloud.compute.v1.RoutePolicyH\x00\x88\x01\x01\x42\x0b\n\t_resource\"\xe2\x02\n\x14RoutersListBgpRoutes\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x34\n\x06result\x18\x9d\x90\xb7\x42 \x03(\x0b\x32!.google.cloud.compute.v1.BgpRoute\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe9\x02\n\x18RoutersListRoutePolicies\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x37\n\x06result\x18\x9d\x90\xb7\x42 \x03(\x0b\x32$.google.cloud.compute.v1.RoutePolicy\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"`\n\x16RoutersPreviewResponse\x12\x39\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterH\x00\x88\x01\x01\x42\x0b\n\t_resource\"\x90\x01\n\x11RoutersScopedList\x12\x34\n\x07routers\x18\xca\xa4\xdd\x94\x01 \x03(\x0b\x32\x1f.google.cloud.compute.v1.Router\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xd8\x03\n\x0eSSLHealthCheck\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x00\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12port_specification\x18\xc5\xeb\xcc\x18 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07request\x18\x8f\xe5\xbb\n \x01(\tH\x04\x88\x01\x01\x12\x18\n\x08response\x18\xc1\xa8\xdc] \x01(\tH\x05\x88\x01\x01\"~\n\x11PortSpecification\x12 \n\x1cUNDEFINED_PORT_SPECIFICATION\x10\x00\x12\x15\n\x0eUSE_FIXED_PORT\x10\xe4\x88\xdbZ\x12\x16\n\x0eUSE_NAMED_PORT\x10\xbf\xcf\xc7\xa6\x01\x12\x18\n\x10USE_SERVING_PORT\x10\xcc\xd1\xf5\xac\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x07\n\x05_portB\x0c\n\n_port_nameB\x15\n\x13_port_specificationB\x0f\n\r_proxy_headerB\n\n\x08_requestB\x0b\n\t_response\"\x8f\x08\n\x11SavedAttachedDisk\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x04\x62oot\x18\xf2\xf5\xb8\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tH\x02\x88\x01\x01\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x03\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x04\x88\x01\x01\x12\x19\n\tdisk_type\x18\x9c\xe9\xac, \x01(\tH\x05\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x15\n\x05index\x18\xd2\xd1\xec/ \x01(\x05H\x06\x88\x01\x01\x12\x1a\n\tinterface\x18\xb9\xda\xd5\xef\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\t\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\n\x88\x01\x01\x12\x1e\n\rstorage_bytes\x18\xa7\xbb\xbd\xca\x01 \x01(\x03H\x0b\x88\x01\x01\x12%\n\x14storage_bytes_status\x18\x8a\xab\x80\xea\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\r\x88\x01\x01\">\n\tInterface\x12\x17\n\x13UNDEFINED_INTERFACE\x10\x00\x12\x0b\n\x04NVME\x10\xe0\x82\x93\x01\x12\x0b\n\x04SCSI\x10\xa6\x81\x9b\x01\"?\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x10\n\tREAD_ONLY\x10\xb5\x99\xec+\x12\x11\n\nREAD_WRITE\x10\xd6\x97\xe4R\"]\n\x12StorageBytesStatus\x12\"\n\x1eUNDEFINED_STORAGE_BYTES_STATUS\x10\x00\x12\x10\n\x08UPDATING\x10\xc6\xee\xec\xeb\x01\x12\x11\n\nUP_TO_DATE\x10\xce\xa2\xa7\x30\"?\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x12\n\nPERSISTENT\x10\x97\xf5\xd5\xdb\x01\x12\x0f\n\x07SCRATCH\x10\xda\xfd\xf0\xec\x01\x42\x0e\n\x0c_auto_deleteB\x07\n\x05_bootB\x0e\n\x0c_device_nameB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0c\n\n_disk_typeB\x08\n\x06_indexB\x0c\n\n_interfaceB\x07\n\x05_kindB\x07\n\x05_modeB\t\n\x07_sourceB\x10\n\x0e_storage_bytesB\x17\n\x15_storage_bytes_statusB\x07\n\x05_type\"\xc5\x03\n\tSavedDisk\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\rstorage_bytes\x18\xa7\xbb\xbd\xca\x01 \x01(\x03H\x03\x88\x01\x01\x12%\n\x14storage_bytes_status\x18\x8a\xab\x80\xea\x01 \x01(\tH\x04\x88\x01\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"]\n\x12StorageBytesStatus\x12\"\n\x1eUNDEFINED_STORAGE_BYTES_STATUS\x10\x00\x12\x10\n\x08UPDATING\x10\xc6\xee\xec\xeb\x01\x12\x11\n\nUP_TO_DATE\x10\xce\xa2\xa7\x30\x42\x0f\n\r_architectureB\x07\n\x05_kindB\x0e\n\x0c_source_diskB\x10\n\x0e_storage_bytesB\x17\n\x15_storage_bytes_status\"\x81\x02\n\x15ScalingScheduleStatus\x12\x1f\n\x0flast_start_time\x18\xd3\xbb\xbc\x10 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fnext_start_time\x18\xd6\xf2\xb0. \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x02\x88\x01\x01\"]\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0f\n\x08OBSOLETE\x10\x99\xeb\xdc\x1f\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x12\n\x10_last_start_timeB\x12\n\x10_next_start_timeB\x08\n\x06_state\"\xd5\n\n\nScheduling\x12\"\n\x11\x61utomatic_restart\x18\xfb\xb7\xa4\xa7\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x13\x61vailability_domain\x18\xa8\xa0\xb4x \x01(\x05H\x01\x88\x01\x01\x12+\n\x1ahost_error_timeout_seconds\x18\x93\xdc\xd9\xc2\x01 \x01(\x05H\x02\x88\x01\x01\x12+\n\x1binstance_termination_action\x18\xbb\xff\x99\x33 \x01(\tH\x03\x88\x01\x01\x12M\n\x1alocal_ssd_recovery_timeout\x18\xe6\xaf\xe6\x7f \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x04\x88\x01\x01\x12\x1e\n\rlocation_hint\x18\xd1\x81\x92\xa7\x01 \x01(\tH\x05\x88\x01\x01\x12\x44\n\x10max_run_duration\x18\xc3\xaf\xb8\xcd\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x06\x88\x01\x01\x12\x1e\n\rmin_node_cpus\x18\xbb\xa4\xa2\x97\x01 \x01(\x05H\x07\x88\x01\x01\x12L\n\x0fnode_affinities\x18\xa3\x84\x9a\xdc\x01 \x03(\x0b\x32/.google.cloud.compute.v1.SchedulingNodeAffinity\x12#\n\x13on_host_maintenance\x18\xdc\xf2\xe7\x1e \x01(\tH\x08\x88\x01\x01\x12\x61\n\x17on_instance_stop_action\x18\xc9\x8d\xd5\xfc\x01 \x01(\x0b\x32\x37.google.cloud.compute.v1.SchedulingOnInstanceStopActionH\t\x88\x01\x01\x12\x1c\n\x0bpreemptible\x18\xa1\xe5\xcb\x9a\x01 \x01(\x08H\n\x88\x01\x01\x12!\n\x12provisioning_model\x18\xd7\x96\x1e \x01(\tH\x0b\x88\x01\x01\x12!\n\x10termination_time\x18\xa8\x8e\x90\xcc\x01 \x01(\tH\x0c\x88\x01\x01\"\x93\x01\n\x19InstanceTerminationAction\x12)\n%UNDEFINED_INSTANCE_TERMINATION_ACTION\x10\x00\x12\x0e\n\x06\x44\x45LETE\x10\xab\xf3\xe5\xbf\x01\x12.\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\xb3\xc1\xa9,\x12\x0b\n\x04STOP\x10\x82\x80\x9c\x01\"Y\n\x11OnHostMaintenance\x12!\n\x1dUNDEFINED_ON_HOST_MAINTENANCE\x10\x00\x12\x0e\n\x07MIGRATE\x10\x8b\xc3\x81O\x12\x11\n\tTERMINATE\x10\xc1\x9c\xcb\xfb\x01\"o\n\x11ProvisioningModel\x12 \n\x1cUNDEFINED_PROVISIONING_MODEL\x10\x00\x12\x19\n\x11RESERVATION_BOUND\x10\x8b\x96\xfc\x8b\x01\x12\x0b\n\x04SPOT\x10\x82\xe2\x9b\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x42\x14\n\x12_automatic_restartB\x16\n\x14_availability_domainB\x1d\n\x1b_host_error_timeout_secondsB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeoutB\x10\n\x0e_location_hintB\x13\n\x11_max_run_durationB\x10\n\x0e_min_node_cpusB\x16\n\x14_on_host_maintenanceB\x1a\n\x18_on_instance_stop_actionB\x0e\n\x0c_preemptibleB\x15\n\x13_provisioning_modelB\x13\n\x11_termination_time\"\xc7\x01\n\x16SchedulingNodeAffinity\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08operator\x18\xa4\xd1\xa8\x11 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x06values\x18\xa2\xba\x96w \x03(\t\"W\n\x08Operator\x12\x16\n\x12UNDEFINED_OPERATOR\x10\x00\x12\x07\n\x02IN\x10\xa5\x12\x12\r\n\x06NOT_IN\x10\xb1\xbc\xebL\x12\x1b\n\x14OPERATOR_UNSPECIFIED\x10\xfc\xff\xba=B\x06\n\x04_keyB\x0b\n\t_operator\"Z\n\x1eSchedulingOnInstanceStopAction\x12\"\n\x11\x64iscard_local_ssd\x18\xcf\xe9\xad\x98\x01 \x01(\x08H\x00\x88\x01\x01\x42\x14\n\x12_discard_local_ssd\"3\n\x0cScratchDisks\x12\x17\n\x07\x64isk_gb\x18\xbd\xc5\x8a\x1d \x01(\x05H\x00\x88\x01\x01\x42\n\n\x08_disk_gb\"S\n\nScreenshot\x12\x19\n\x08\x63ontents\x18\x9a\xb6\xbd\xf1\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_contentsB\x07\n\x05_kind\"\xef\x03\n\x1eSecurityPoliciesAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12T\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x42.google.cloud.compute.v1.SecurityPoliciesAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.SecurityPoliciesScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbf\x01\n7SecurityPoliciesListPreconfiguredExpressionSetsResponse\x12\x62\n\x1dpreconfigured_expression_sets\x18\xfa\x8c\xd7\xff\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.SecurityPoliciesWafConfigH\x00\x88\x01\x01\x42 \n\x1e_preconfigured_expression_sets\"\xaa\x01\n\x1aSecurityPoliciesScopedList\x12\x45\n\x11security_policies\x18\xef\xa6\xf7< \x03(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"r\n\x19SecurityPoliciesWafConfig\x12G\n\twaf_rules\x18\xd4\xc3\xdb# \x01(\x0b\x32,.google.cloud.compute.v1.PreconfiguredWafSetH\x00\x88\x01\x01\x42\x0c\n\n_waf_rules\"\xaf\n\n\x0eSecurityPolicy\x12k\n\x1a\x61\x64\x61ptive_protection_config\x18\xdf\xfb\xd1G \x01(\x0b\x32?.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigH\x00\x88\x01\x01\x12\x66\n\x17\x61\x64vanced_options_config\x18\xc0\xd3\x9d\xd6\x01 \x01(\x0b\x32<.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x63\n\x16\x64\x64os_protection_config\x18\xcd\x84\xff\x17 \x01(\x0b\x32;.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfigH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x08\x88\x01\x01\x12G\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x33.google.cloud.compute.v1.SecurityPolicy.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12h\n\x18recaptcha_options_config\x18\xdb\xd4\xbd\xf7\x01 \x01(\x0b\x32=.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfigH\n\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12=\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRule\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\r\x88\x01\x01\x12W\n\x13user_defined_fields\x18\xa3\x89\xc0\r \x03(\x0b\x32\x37.google.cloud.compute.v1.SecurityPolicyUserDefinedField\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"d\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x12\n\x0b\x43LOUD_ARMOR\x10\xf5\x9c\xa4|\x12\x17\n\x10\x43LOUD_ARMOR_EDGE\x10\xc7\xa2\xc7w\x12\x1b\n\x13\x43LOUD_ARMOR_NETWORK\x10\xc4\xac\xf9\xe8\x01\x42\x1d\n\x1b_adaptive_protection_configB\x1a\n\x18_advanced_options_configB\x15\n\x13_creation_timestampB\x19\n\x17_ddos_protection_configB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\x1b\n\x19_recaptcha_options_configB\t\n\x07_regionB\x0c\n\n_self_linkB\x07\n\x05_type\"\xcd\x01\n&SecurityPolicyAdaptiveProtectionConfig\x12\x83\x01\n\x1alayer7_ddos_defense_config\x18\xa3\xd9\xc3\xd0\x01 \x01(\x0b\x32V.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigH\x00\x88\x01\x01\x42\x1d\n\x1b_layer7_ddos_defense_config\"\xf3\x02\n=SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x00\x88\x01\x01\x12 \n\x0frule_visibility\x18\xb5\xd8\x90\xd8\x01 \x01(\tH\x01\x88\x01\x01\x12\x83\x01\n\x11threshold_configs\x18\x9d\xab\xe3\x1c \x03(\x0b\x32\x65.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig\"R\n\x0eRuleVisibility\x12\x1d\n\x19UNDEFINED_RULE_VISIBILITY\x10\x00\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x42\t\n\x07_enableB\x12\n\x10_rule_visibility\"\xd1\x06\nLSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig\x12\x30\n auto_deploy_confidence_threshold\x18\xbe\xed\x99( \x01(\x02H\x00\x88\x01\x01\x12*\n\x1a\x61uto_deploy_expiration_sec\x18\x89\xb5\x9a! \x01(\x05H\x01\x88\x01\x01\x12\x38\n\'auto_deploy_impacted_baseline_threshold\x18\xc3\x9c\xb9\x8b\x01 \x01(\x02H\x02\x88\x01\x01\x12+\n\x1a\x61uto_deploy_load_threshold\x18\x9a\xa0\x82\xf9\x01 \x01(\x02H\x03\x88\x01\x01\x12\'\n\x16\x64\x65tection_absolute_qps\x18\xe6\xfd\xd7\xb6\x01 \x01(\x02H\x04\x88\x01\x01\x12)\n\x18\x64\x65tection_load_threshold\x18\xcc\xca\xa3\xcd\x01 \x01(\x02H\x05\x88\x01\x01\x12\x33\n\"detection_relative_to_baseline_qps\x18\x85\x9b\xf6\x8a\x01 \x01(\x02H\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\xa5\x01\n\x1btraffic_granularity_configs\x18\xbe\xb4\xda( \x03(\x0b\x32}.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfigB#\n!_auto_deploy_confidence_thresholdB\x1d\n\x1b_auto_deploy_expiration_secB*\n(_auto_deploy_impacted_baseline_thresholdB\x1d\n\x1b_auto_deploy_load_thresholdB\x19\n\x17_detection_absolute_qpsB\x1b\n\x19_detection_load_thresholdB%\n#_detection_relative_to_baseline_qpsB\x07\n\x05_name\"\xd0\x02\ndSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig\x12)\n\x18\x65nable_each_unique_value\x18\xc5\x8a\xde\xdf\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x02\x88\x01\x01\"`\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x18\n\x10HTTP_HEADER_HOST\x10\xe3\xe5\xbe\xb2\x01\x12\x11\n\tHTTP_PATH\x10\xfc\xd2\xc4\x94\x01\x12\x17\n\x10UNSPECIFIED_TYPE\x10\xe2\xee\xdb\x19\x42\x1b\n\x19_enable_each_unique_valueB\x07\n\x05_typeB\x08\n\x06_value\"\xde\x03\n#SecurityPolicyAdvancedOptionsConfig\x12p\n\x12json_custom_config\x18\xb9\xd9\x99\x35 \x01(\x0b\x32L.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigJsonCustomConfigH\x00\x88\x01\x01\x12\x1d\n\x0cjson_parsing\x18\xd9\x84\xda\x86\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\tlog_level\x18\xc9\xbd\x84\x43 \x01(\tH\x02\x88\x01\x01\x12#\n\x17user_ip_request_headers\x18\xb2\xef\xe2\xc8\x01 \x03(\t\"k\n\x0bJsonParsing\x12\x1a\n\x16UNDEFINED_JSON_PARSING\x10\x00\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12\x1c\n\x15STANDARD_WITH_GRAPHQL\x10\x92\xbf\x81\x33\"C\n\x08LogLevel\x12\x17\n\x13UNDEFINED_LOG_LEVEL\x10\x00\x12\r\n\x06NORMAL\x10\xe7\xe1\xe6L\x12\x0f\n\x07VERBOSE\x10\xe2\x8a\xe4\xfd\x01\x42\x15\n\x13_json_custom_configB\x0f\n\r_json_parsingB\x0c\n\n_log_level\"O\n3SecurityPolicyAdvancedOptionsConfigJsonCustomConfig\x12\x18\n\rcontent_types\x18\xb3\xe2\xa7\x08 \x03(\t\"\xc7\x01\n\"SecurityPolicyDdosProtectionConfig\x12 \n\x0f\x64\x64os_protection\x18\x94\x9f\x9b\x83\x01 \x01(\tH\x00\x88\x01\x01\"k\n\x0e\x44\x64osProtection\x12\x1d\n\x19UNDEFINED_DDOS_PROTECTION\x10\x00\x12\x0f\n\x08\x41\x44VANCED\x10\xa2\xb0\xb5\x1e\x12\x17\n\x10\x41\x44VANCED_PREVIEW\x10\x8b\xd9\xc0\x13\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x42\x12\n\x10_ddos_protection\"\x83\x02\n\x12SecurityPolicyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x03\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\n\n\x08_warning\"`\n$SecurityPolicyRecaptchaOptionsConfig\x12\"\n\x11redirect_site_key\x18\xea\x84\xbc\xd5\x01 \x01(\tH\x00\x88\x01\x01\x42\x14\n\x12_redirect_site_key\"N\n\x17SecurityPolicyReference\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_security_policy\"\xf7\x06\n\x12SecurityPolicyRule\x12\x16\n\x06\x61\x63tion\x18\xb6\xfc\xbdY \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12[\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32;.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionH\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12I\n\x05match\x18\xc5\xb3\xb7\x31 \x01(\x0b\x32\x32.google.cloud.compute.v1.SecurityPolicyRuleMatcherH\x04\x88\x01\x01\x12Y\n\rnetwork_match\x18\xf4\xf8\xfa\xdc\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcherH\x05\x88\x01\x01\x12k\n\x18preconfigured_waf_config\x18\xe3\x9f\x96\x38 \x01(\x0b\x32\x41.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigH\x06\x88\x01\x01\x12\x17\n\x07preview\x18\xc8\xc7\xa3h \x01(\x08H\x07\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x08\x88\x01\x01\x12_\n\x12rate_limit_options\x18\xfb\xc9\x9a \x01(\x0b\x32;.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsH\t\x88\x01\x01\x12\\\n\x10redirect_options\x18\xbb\x92\xeeM \x01(\x0b\x32:.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptionsH\n\x88\x01\x01\x42\t\n\x07_actionB\x0e\n\x0c_descriptionB\x10\n\x0e_header_actionB\x07\n\x05_kindB\x08\n\x06_matchB\x10\n\x0e_network_matchB\x1b\n\x19_preconfigured_waf_configB\n\n\x08_previewB\x0b\n\t_priorityB\x15\n\x13_rate_limit_optionsB\x13\n\x11_redirect_options\"\x95\x01\n\"SecurityPolicyRuleHttpHeaderAction\x12o\n\x17request_headers_to_adds\x18\xcd\xab\xfa) \x03(\x0b\x32K.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption\"\x90\x01\n2SecurityPolicyRuleHttpHeaderActionHttpHeaderOption\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cheader_value\x18\xbf\xf2\xeb` \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_header_nameB\x0f\n\r_header_value\"\x9b\x03\n\x19SecurityPolicyRuleMatcher\x12P\n\x06\x63onfig\x18\xc2\x86\xfey \x01(\x0b\x32\x38.google.cloud.compute.v1.SecurityPolicyRuleMatcherConfigH\x00\x88\x01\x01\x12\x33\n\x04\x65xpr\x18\xf5\xf3\xbe\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.ExprH\x01\x88\x01\x01\x12\\\n\x0c\x65xpr_options\x18\xd4\xc4\xec\xe7\x01 \x01(\x0b\x32=.google.cloud.compute.v1.SecurityPolicyRuleMatcherExprOptionsH\x02\x88\x01\x01\x12\x1f\n\x0eversioned_expr\x18\xbd\xe3\xd6\x99\x01 \x01(\tH\x03\x88\x01\x01\"@\n\rVersionedExpr\x12\x1c\n\x18UNDEFINED_VERSIONED_EXPR\x10\x00\x12\x11\n\nSRC_IPS_V1\x10\x89\xfd\xe8!B\t\n\x07_configB\x07\n\x05_exprB\x0f\n\r_expr_optionsB\x11\n\x0f_versioned_expr\"<\n\x1fSecurityPolicyRuleMatcherConfig\x12\x19\n\rsrc_ip_ranges\x18\xd3\x80\x87\xce\x01 \x03(\t\"\xaf\x01\n$SecurityPolicyRuleMatcherExprOptions\x12q\n\x11recaptcha_options\x18\xc6\xf6\xc7\xb9\x01 \x01(\x0b\x32M.google.cloud.compute.v1.SecurityPolicyRuleMatcherExprOptionsRecaptchaOptionsH\x00\x88\x01\x01\x42\x14\n\x12_recaptcha_options\"~\n4SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions\x12!\n\x16\x61\x63tion_token_site_keys\x18\x9d\xea\xc9\x1c \x03(\t\x12#\n\x17session_token_site_keys\x18\xfd\xf2\xfa\x9e\x01 \x03(\t\"\xc3\x02\n SecurityPolicyRuleNetworkMatcher\x12\x1a\n\x0e\x64\x65st_ip_ranges\x18\x91\xd7\xee\xa0\x01 \x03(\t\x12\x16\n\ndest_ports\x18\xb5\xb0\x93\xb5\x01 \x03(\t\x12\x17\n\x0cip_protocols\x18\xc3\x8f\xcd{ \x03(\t\x12\x13\n\x08src_asns\x18\xf2\xbd\x97\x38 \x03(\r\x12\x19\n\rsrc_ip_ranges\x18\xd3\x80\x87\xce\x01 \x03(\t\x12\x15\n\tsrc_ports\x18\xf7\xbb\x9e\xd4\x01 \x03(\t\x12\x1b\n\x10src_region_codes\x18\x96\xe3\x9f/ \x03(\t\x12n\n\x13user_defined_fields\x18\xa3\x89\xc0\r \x03(\x0b\x32N.google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch\"i\n5SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x06values\x18\xa2\xba\x96w \x03(\tB\x07\n\x05_name\"\x8d\x01\n(SecurityPolicyRulePreconfiguredWafConfig\x12\x61\n\nexclusions\x18\xe5\xf8\xbf\x63 \x03(\x0b\x32J.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusion\"\x82\x05\n1SecurityPolicyRulePreconfiguredWafConfigExclusion\x12|\n\x1arequest_cookies_to_exclude\x18\xf6\xde\xdfJ \x03(\x0b\x32U.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams\x12|\n\x1arequest_headers_to_exclude\x18\x9f\xa4\x93\x1e \x03(\x0b\x32U.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams\x12\x82\x01\n\x1frequest_query_params_to_exclude\x18\x88\x9e\xba\xa2\x01 \x03(\x0b\x32U.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams\x12y\n\x17request_uris_to_exclude\x18\x9e\xaa\x9f+ \x03(\x0b\x32U.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams\x12\x1b\n\x0ftarget_rule_ids\x18\xe3\xe3\xd5\xed\x01 \x03(\t\x12 \n\x0ftarget_rule_set\x18\x8d\xaf\xd6\xed\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_target_rule_set\"\xe7\x01\n.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit\x12 \n\x15\x63onsumer_reject_lists\x18\x9e\x99\xa5\x61 \x03(\t\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x17\n\x0c\x64omain_names\x18\x8d\xd8\x89\x03 \x03(\t\x12&\n\x15\x65nable_proxy_protocol\x18\x85\x87\xbc\xad\x01 \x01(\x08H\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x17\n\x0bnat_subnets\x18\x98\x8f\xdb\xb2\x01 \x03(\t\x12(\n\x18producer_forwarding_rule\x18\xd1\xa8\x9cv \x01(\tH\x08\x88\x01\x01\x12,\n\x1bpropagated_connection_limit\x18\xfe\xc8\xd3\x9e\x01 \x01(\rH\t\x88\x01\x01\x12L\n\x19psc_service_attachment_id\x18\xee\xfa\xcf\xfb\x01 \x01(\x0b\x32 .google.cloud.compute.v1.Uint128H\n\x88\x01\x01\x12%\n\x15reconcile_connections\x18\xe4\xc3\xeb; \x01(\x08H\x0b\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0c\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12\x1d\n\x0etarget_service\x18\x87\xfcN \x01(\tH\x0e\x88\x01\x01\"\x95\x01\n\x14\x43onnectionPreference\x12#\n\x1fUNDEFINED_CONNECTION_PREFERENCE\x10\x00\x12\x17\n\x10\x41\x43\x43\x45PT_AUTOMATIC\x10\x94\xf7\xf0#\x12\x15\n\rACCEPT_MANUAL\x10\xdd\xed\xf1\xb1\x01\x12(\n!CONNECTION_PREFERENCE_UNSPECIFIED\x10\xb4\xa0\xbf\x10\x42\x18\n\x16_connection_preferenceB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x18\n\x16_enable_proxy_protocolB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x1b\n\x19_producer_forwarding_ruleB\x1e\n\x1c_propagated_connection_limitB\x1c\n\x1a_psc_service_attachment_idB\x18\n\x16_reconcile_connectionsB\t\n\x07_regionB\x0c\n\n_self_linkB\x11\n\x0f_target_service\"\xd4\x03\n\x1fServiceAttachmentAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12U\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x43.google.cloud.compute.v1.ServiceAttachmentAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x63\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.google.cloud.compute.v1.ServiceAttachmentsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xc4\x03\n\"ServiceAttachmentConnectedEndpoint\x12 \n\x10\x63onsumer_network\x18\xe5\xdd\xa4y \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08\x65ndpoint\x18\x95\xbb\x9c> \x01(\tH\x01\x88\x01\x01\x12,\n\x1bpropagated_connection_count\x18\xd2\xd3\xe3\x9a\x01 \x01(\rH\x02\x88\x01\x01\x12\"\n\x11psc_connection_id\x18\xdd\xa5\xa3\x8b\x01 \x01(\x04H\x03\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x04\x88\x01\x01\"\x94\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x12\x17\n\x0fNEEDS_ATTENTION\x10\xbc\x8b\xa2\xa4\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\x13\n\x11_consumer_networkB\x0b\n\t_endpointB\x1e\n\x1c_propagated_connection_countB\x14\n\x12_psc_connection_idB\t\n\x07_status\"\xc5\x01\n%ServiceAttachmentConsumerProjectLimit\x12 \n\x10\x63onnection_limit\x18\x9a\x9e\xd4> \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0bnetwork_url\x18\xde\x8f\xe6\x62 \x01(\tH\x01\x88\x01\x01\x12\"\n\x11project_id_or_num\x18\xa8\x8a\xe5\xa6\x01 \x01(\tH\x02\x88\x01\x01\x42\x13\n\x11_connection_limitB\x0e\n\x0c_network_urlB\x14\n\x12_project_id_or_num\"\xb3\x02\n\x15ServiceAttachmentList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.ServiceAttachment\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb2\x01\n\x1cServiceAttachmentsScopedList\x12K\n\x13service_attachments\x18\xa6\x92\xba\x92\x01 \x03(\x0b\x32*.google.cloud.compute.v1.ServiceAttachment\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xa6\x02\n&SetBackendServiceTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8a\x01\n7target_ssl_proxies_set_backend_service_request_resource\x18\xa4\xe9\xa8\x42 \x01(\x0b\x32\x41.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequestB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa7\x02\n&SetBackendServiceTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8b\x01\n7target_tcp_proxies_set_backend_service_request_resource\x18\xef\xd1\xc2\x82\x01 \x01(\x0b\x32\x41.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequestB\x03\xe0\x41\x02\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb1\x02\n\x1aSetBackupTargetPoolRequest\x12\x1e\n\x0e\x66\x61ilover_ratio\x18\xfe\x94\xb4\x65 \x01(\x02H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12T\n\x19target_reference_resource\x18\xf0\xb7\xdd\xf9\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetReferenceB\x03\xe0\x41\x02\x42\x11\n\x0f_failover_ratioB\r\n\x0b_request_id\"\xae\x02\n(SetCertificateMapTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8f\x01\n9target_https_proxies_set_certificate_map_request_resource\x18\xbb\xb6\xfe\xde\x01 \x01(\x0b\x32\x43.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequestB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa7\x02\n&SetCertificateMapTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8b\x01\n7target_ssl_proxies_set_certificate_map_request_resource\x18\xba\x96\x83\xa4\x01 \x01(\x0b\x32\x41.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequestB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xea\x01\n\x1fSetCloudArmorTierProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12y\n.projects_set_cloud_armor_tier_request_resource\x18\xcf\xfb\xde$ \x01(\x0b\x32\x39.google.cloud.compute.v1.ProjectsSetCloudArmorTierRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x8c\x03\n*SetCommonInstanceMetadataOperationMetadata\x12$\n\x13\x63lient_operation_id\x18\xe7\x8d\xde\x8d\x01 \x01(\tH\x00\x88\x01\x01\x12\x83\x01\n\x17per_location_operations\x18\x94\xd1\x82\xc3\x01 \x03(\x0b\x32^.google.cloud.compute.v1.SetCommonInstanceMetadataOperationMetadata.PerLocationOperationsEntry\x1a\x99\x01\n\x1aPerLocationOperationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12j\n\x05value\x18\x02 \x01(\x0b\x32[.google.cloud.compute.v1.SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo:\x02\x38\x01\x42\x16\n\x14_client_operation_id\"\xb2\x02\nBSetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo\x12\x36\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x1f.google.cloud.compute.v1.StatusH\x00\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x01\x88\x01\x01\"\x88\x01\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\tABANDONED\x10\xb4\xc3\x80\'\x12\x0b\n\x04\x44ONE\x10\x82\xb7\x80\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x12\n\nPROPAGATED\x10\xdb\xb4\x82\xf2\x01\x12\x12\n\x0bPROPAGATING\x10\x86\x83\xcbN\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x08\n\x06_errorB\x08\n\x06_state\"\xbe\x01\n\'SetCommonInstanceMetadataProjectRequest\x12\x45\n\x11metadata_resource\x18\x9e\xbe\xe6\x8a\x01 \x01(\x0b\x32!.google.cloud.compute.v1.MetadataB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf7\x01\n#SetDefaultNetworkTierProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x81\x01\n2projects_set_default_network_tier_request_resource\x18\x8a\xc0\xa3< \x01(\x0b\x32=.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe9\x01\n$SetDeletionProtectionInstanceRequest\x12$\n\x13\x64\x65letion_protection\x18\xea\xff\xb2\xda\x01 \x01(\x08H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x16\n\x14_deletion_protectionB\r\n\x0b_request_id\"\xe2\x01\n SetDiskAutoDeleteInstanceRequest\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xff\x01\n)SetEdgeSecurityPolicyBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x82\x02\n*SetEdgeSecurityPolicyBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbb\x01\n SetIamPolicyBackendBucketRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xbc\x01\n!SetIamPolicyBackendServiceRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xc4\x01\n\x17SetIamPolicyDiskRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xbb\x01\n!SetIamPolicyFirewallPolicyRequest\x12|\n/global_organization_set_policy_request_resource\x18\xde\x94\xccT \x01(\x0b\x32;.google.cloud.compute.v1.GlobalOrganizationSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xb3\x01\n\x18SetIamPolicyImageRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xc8\x01\n\x1bSetIamPolicyInstanceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xbe\x01\n#SetIamPolicyInstanceTemplateRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xcf\x01\n\"SetIamPolicyInstantSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xb5\x01\n\x1aSetIamPolicyLicenseRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xba\x01\n\x1fSetIamPolicyMachineImageRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xd7\x01\n$SetIamPolicyNetworkAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n(SetIamPolicyNetworkFirewallPolicyRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xc9\x01\n\x1cSetIamPolicyNodeGroupRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xd2\x01\n\x1fSetIamPolicyNodeTemplateRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xda\x01\n\'SetIamPolicyRegionBackendServiceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xd0\x01\n\x1dSetIamPolicyRegionDiskRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xdb\x01\n(SetIamPolicyRegionInstantSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xe1\x01\n.SetIamPolicyRegionNetworkFirewallPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xcb\x01\n\x1eSetIamPolicyReservationRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xd4\x01\n!SetIamPolicyResourcePolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xd7\x01\n$SetIamPolicyServiceAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xb6\x01\n\x1bSetIamPolicySnapshotRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xcb\x01\n\x1eSetIamPolicyStoragePoolRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xd0\x01\n\x1dSetIamPolicySubnetworkRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xde\x02\n.SetInstanceTemplateInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x98\x01\n>instance_group_managers_set_instance_template_request_resource\x18\xc5\xd9\xd6\x04 \x01(\x0b\x32H.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe4\x02\n4SetInstanceTemplateRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x94\x01\n.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequestB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x9d\x02\n#SetProxyHeaderTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x84\x01\n4target_tcp_proxies_set_proxy_header_request_resource\x18\xc3\x98\xf1h \x01(\x0b\x32>.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequestB\x03\xe0\x41\x02\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa7\x02\n&SetQuicOverrideTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8a\x01\n7target_https_proxies_set_quic_override_request_resource\x18\xe2\xf5\xe3\" \x01(\x0b\x32\x41.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequestB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xee\x01\n\x1cSetSchedulingInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12I\n\x13scheduling_resource\x18\xd9\xac\xee\xdc\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SchedulingB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xfe\x01\n&SetSecurityPolicyBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa3\x02\n SetSecurityPolicyInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12z\n.instances_set_security_policy_request_resource\x18\x8a\xd1\xbav \x01(\x0b\x32:.google.cloud.compute.v1.InstancesSetSecurityPolicyRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa5\x02\n,SetSecurityPolicyRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x9b\x02\n&SetSecurityPolicyTargetInstanceRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x12 \n\x0ftarget_instance\x18\x83\x8f\x96\x8a\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x96\x02\n\"SetSecurityPolicyTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa4\x02\n SetServiceAccountInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12{\n.instances_set_service_account_request_resource\x18\xb8\x9e\xb2\x83\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InstancesSetServiceAccountRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb0\x02\n1SetShieldedInstanceIntegrityPolicyInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12v\n+shielded_instance_integrity_policy_resource\x18\xb6\xdc\x8d\xc3\x01 \x01(\x0b\x32\x38.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicyB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe5\x02\n/SetSslCertificatesRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9e\x01\nAregion_target_https_proxies_set_ssl_certificates_request_resource\x18\x87\x84\xa6\xba\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb0\x02\n)SetSslCertificatesTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x90\x01\n:target_https_proxies_set_ssl_certificates_request_resource\x18\xdc\xab\xb2j \x01(\x0b\x32\x44.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequestB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa9\x02\n\'SetSslCertificatesTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8c\x01\n8target_ssl_proxies_set_ssl_certificates_request_resource\x18\xbd\xcb\xc5\x46 \x01(\x0b\x32\x42.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequestB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf3\x01\n#SetSslPolicyTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Z\n\x1dssl_policy_reference_resource\x18\xbc\xf4\x9fp \x01(\x0b\x32+.google.cloud.compute.v1.SslPolicyReferenceB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf0\x01\n!SetSslPolicyTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Z\n\x1dssl_policy_reference_resource\x18\xbc\xf4\x9fp \x01(\x0b\x32+.google.cloud.compute.v1.SslPolicyReferenceB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xdc\x01\n\x16SetTagsInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12=\n\rtags_resource\x18\xf4\x9a\x85\x9e\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.TagsB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x87\x02\n\x1eSetTargetForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12T\n\x19target_reference_resource\x18\xf0\xb7\xdd\xf9\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xec\x01\n$SetTargetGlobalForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12T\n\x19target_reference_resource\x18\xf0\xb7\xdd\xf9\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd0\x02\n)SetTargetPoolsInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n9instance_group_managers_set_target_pools_request_resource\x18\x88\x86\x88\x86\x01 \x01(\x0b\x32\x43.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe6\x02\n/SetTargetPoolsRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9b\x01\n@region_instance_group_managers_set_target_pools_request_resource\x18\xfd\xca\xc5% \x01(\x0b\x32I.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x90\x02\n%SetUrlMapRegionTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1aurl_map_reference_resource\x18\x95\xe6\x8e\xbe\x01 \x01(\x0b\x32(.google.cloud.compute.v1.UrlMapReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x92\x02\n&SetUrlMapRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1aurl_map_reference_resource\x18\x95\xe6\x8e\xbe\x01 \x01(\x0b\x32(.google.cloud.compute.v1.UrlMapReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe9\x01\n\x1fSetUrlMapTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1aurl_map_reference_resource\x18\x95\xe6\x8e\xbe\x01 \x01(\x0b\x32(.google.cloud.compute.v1.UrlMapReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xeb\x01\n SetUrlMapTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1aurl_map_reference_resource\x18\x95\xe6\x8e\xbe\x01 \x01(\x0b\x32(.google.cloud.compute.v1.UrlMapReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd0\x01\n\"SetUsageExportBucketProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\\\n\x1eusage_export_location_resource\x18\xeb\xcc\xd4\t \x01(\x0b\x32,.google.cloud.compute.v1.UsageExportLocationB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xfa\x02\n\rShareSettings\x12N\n\x0bproject_map\x18\xb6\xd6\xff? \x03(\x0b\x32\x36.google.cloud.compute.v1.ShareSettings.ProjectMapEntry\x12\x1b\n\nshare_type\x18\x9a\x97\xb8\xab\x01 \x01(\tH\x00\x88\x01\x01\x1a\x66\n\x0fProjectMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.ShareSettingsProjectConfig:\x02\x38\x01\"\x84\x01\n\tShareType\x12\x18\n\x14UNDEFINED_SHARE_TYPE\x10\x00\x12\x0c\n\x05LOCAL\x10\xcb\xce\xcf\"\x12\x14\n\x0cORGANIZATION\x10\xb3\xaa\x8f\x83\x01\x12\x1e\n\x16SHARE_TYPE_UNSPECIFIED\x10\x92\xbc\xf6\xeb\x01\x12\x19\n\x11SPECIFIC_PROJECTS\x10\xe7\xb1\xee\xa5\x01\x42\r\n\x0b_share_type\"G\n\x1aShareSettingsProjectConfig\x12\x1a\n\nproject_id\x18\x81\xc8\xd2T \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_project_id\"\xce\x01\n\x16ShieldedInstanceConfig\x12,\n\x1b\x65nable_integrity_monitoring\x18\xb6\xdb\x87\xc3\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x12\x65nable_secure_boot\x18\xfe\x83\xf6: \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0b\x65nable_vtpm\x18\xf7\xe4\xdbV \x01(\x08H\x02\x88\x01\x01\x42\x1e\n\x1c_enable_integrity_monitoringB\x15\n\x13_enable_secure_bootB\x0e\n\x0c_enable_vtpm\"\x8b\x02\n\x18ShieldedInstanceIdentity\x12W\n\x0e\x65ncryption_key\x18\xa3\xc7\xe9\xe8\x01 \x01(\x0b\x32\x36.google.cloud.compute.v1.ShieldedInstanceIdentityEntryH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12T\n\x0bsigning_key\x18\xa5\x90\x85\x99\x01 \x01(\x0b\x32\x36.google.cloud.compute.v1.ShieldedInstanceIdentityEntryH\x02\x88\x01\x01\x42\x11\n\x0f_encryption_keyB\x07\n\x05_kindB\x0e\n\x0c_signing_key\"i\n\x1dShieldedInstanceIdentityEntry\x12\x18\n\x07\x65k_cert\x18\x9d\xdc\xd4\xd6\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x06\x65k_pub\x18\xe4\xd7\xa8\x93\x01 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_ek_certB\t\n\x07_ek_pub\"h\n\x1fShieldedInstanceIntegrityPolicy\x12(\n\x18update_auto_learn_policy\x18\xa7\xc4\x87u \x01(\x08H\x00\x88\x01\x01\x42\x1b\n\x19_update_auto_learn_policy\"`\n\x0cSignedUrlKey\x12\x19\n\x08key_name\x18\xeb\xf0\xee\xee\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tkey_value\x18\x91\x9f\xb0\xf0\x01 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_key_nameB\x0c\n\n_key_value\"\xfc\x01\n\'SimulateMaintenanceEventInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12,\n\x1bwith_extended_notifications\x18\xfb\xd7\xc9\xc1\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x1e\n\x1c_with_extended_notifications\"\xc1\x02\n(SimulateMaintenanceEventNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12\x8c\x01\n7node_groups_simulate_maintenance_event_request_resource\x18\xdc\xf9\xcb\xa7\x01 \x01(\x0b\x32\x42.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcd\x14\n\x08Snapshot\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0c\x61uto_created\x18\xd8\xc8\x9b\xdd\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\nchain_name\x18\xc9\xda\xdd \x01(\tH\x02\x88\x01\x01\x12#\n\x13\x63reation_size_bytes\x18\x8d\xe8\xe5; \x01(\x03H\x03\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x06\x88\x01\x01\x12\x1f\n\x0e\x64ownload_bytes\x18\xf4\xcb\xb9\xcf\x01 \x01(\x03H\x07\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x08\x88\x01\x01\x12\x1c\n\x0bguest_flush\x18\xdd\x93\xec\xb7\x01 \x01(\x08H\t\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\n\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x0b\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x0c\x88\x01\x01\x12\x41\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32-.google.cloud.compute.v1.Snapshot.LabelsEntry\x12\x18\n\rlicense_codes\x18\xa8\x85\xd8\x15 \x03(\x03\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x1e\n\rlocation_hint\x18\xd1\x81\x92\xa7\x01 \x01(\tH\r\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x0f\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x10\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x11\x88\x01\x01\x12W\n\x17snapshot_encryption_key\x18\xfe\xf6\xd4\x14 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x12\x88\x01\x01\x12\x1d\n\rsnapshot_type\x18\xd5\xd9\xa5; \x01(\tH\x13\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x14\x88\x01\x01\x12[\n\x1asource_disk_encryption_key\x18\xe1\xa0\xb8\xfd\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x15\x88\x01\x01\x12\x34\n#source_disk_for_recovery_checkpoint\x18\xfe\xe1\xca\xab\x01 \x01(\tH\x16\x88\x01\x01\x12\x1f\n\x0esource_disk_id\x18\xd9\xcd\xc9\xd8\x01 \x01(\tH\x17\x88\x01\x01\x12\'\n\x17source_instant_snapshot\x18\x86\x84\xc3h \x01(\tH\x18\x88\x01\x01\x12g\n&source_instant_snapshot_encryption_key\x18\xfc\x85\x94\xd0\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x19\x88\x01\x01\x12+\n\x1asource_instant_snapshot_id\x18\xf4\xd3\x90\x89\x01 \x01(\tH\x1a\x88\x01\x01\x12/\n\x1fsource_snapshot_schedule_policy\x18\x83\xb6\xb5p \x01(\tH\x1b\x88\x01\x01\x12\x32\n\"source_snapshot_schedule_policy_id\x18\xd7\xa7\xce! \x01(\tH\x1c\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x1d\x88\x01\x01\x12\x1e\n\rstorage_bytes\x18\xa7\xbb\xbd\xca\x01 \x01(\x03H\x1e\x88\x01\x01\x12%\n\x14storage_bytes_status\x18\x8a\xab\x80\xea\x01 \x01(\tH\x1f\x88\x01\x01\x12\x1d\n\x11storage_locations\x18\x9a\xed\xb3\x9c\x01 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"N\n\x0cSnapshotType\x12\x1b\n\x17UNDEFINED_SNAPSHOT_TYPE\x10\x00\x12\x0f\n\x07\x41RCHIVE\x10\xa2\xd9\xd1\xf1\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\"r\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x10\n\tUPLOADING\x10\xa1\x9c\xcd\x7f\"]\n\x12StorageBytesStatus\x12\"\n\x1eUNDEFINED_STORAGE_BYTES_STATUS\x10\x00\x12\x10\n\x08UPDATING\x10\xc6\xee\xec\xeb\x01\x12\x11\n\nUP_TO_DATE\x10\xce\xa2\xa7\x30\x42\x0f\n\r_architectureB\x0f\n\r_auto_createdB\r\n\x0b_chain_nameB\x16\n\x14_creation_size_bytesB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0f\n\r_disk_size_gbB\x11\n\x0f_download_bytesB\x1e\n\x1c_enable_confidential_computeB\x0e\n\x0c_guest_flushB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x10\n\x0e_location_hintB\x07\n\x05_nameB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x1a\n\x18_snapshot_encryption_keyB\x10\n\x0e_snapshot_typeB\x0e\n\x0c_source_diskB\x1d\n\x1b_source_disk_encryption_keyB&\n$_source_disk_for_recovery_checkpointB\x11\n\x0f_source_disk_idB\x1a\n\x18_source_instant_snapshotB)\n\'_source_instant_snapshot_encryption_keyB\x1d\n\x1b_source_instant_snapshot_idB\"\n _source_snapshot_schedule_policyB%\n#_source_snapshot_schedule_policy_idB\t\n\x07_statusB\x10\n\x0e_storage_bytesB\x17\n\x15_storage_bytes_status\"\xa1\x02\n\x0cSnapshotList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.Snapshot\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8c\x01\n\x10SnapshotSettings\x12\x63\n\x10storage_location\x18\xf9\xd1\xe0\xdb\x01 \x01(\x0b\x32@.google.cloud.compute.v1.SnapshotSettingsStorageLocationSettingsH\x00\x88\x01\x01\x42\x13\n\x11_storage_location\"\xde\x03\n\'SnapshotSettingsStorageLocationSettings\x12\x66\n\tlocations\x18\xde\xae\x91\xc5\x01 \x03(\x0b\x32O.google.cloud.compute.v1.SnapshotSettingsStorageLocationSettings.LocationsEntry\x12\x16\n\x06policy\x18\xb2\xca\xb6+ \x01(\tH\x00\x88\x01\x01\x1a\x8b\x01\n\x0eLocationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12h\n\x05value\x18\x02 \x01(\x0b\x32Y.google.cloud.compute.v1.SnapshotSettingsStorageLocationSettingsStorageLocationPreference:\x02\x38\x01\"\x99\x01\n\x06Policy\x12\x14\n\x10UNDEFINED_POLICY\x10\x00\x12\x14\n\x0cLOCAL_REGION\x10\xe8\xec\xb5\xc0\x01\x12\x1b\n\x14NEAREST_MULTI_REGION\x10\xbb\xfe\xa7\x65\x12\x1a\n\x12SPECIFIC_LOCATIONS\x10\xf1\xc8\xc7\x85\x01\x12*\n#STORAGE_LOCATION_POLICY_UNSPECIFIED\x10\xf0\x90\xc2wB\t\n\x07_policy\"a\n@SnapshotSettingsStorageLocationSettingsStorageLocationPreference\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xb5\x01\n\x17SourceDiskEncryptionKey\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x00\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_disk_encryption_keyB\x0e\n\x0c_source_disk\"a\n\x14SourceInstanceParams\x12I\n\x0c\x64isk_configs\x18\xcf\xd9\xaap \x03(\x0b\x32\x30.google.cloud.compute.v1.DiskInstantiationConfig\"\xf1\x08\n\x18SourceInstanceProperties\x12\x1f\n\x0e\x63\x61n_ip_forward\x18\xfc\x86\x84\xdf\x01 \x01(\x08H\x00\x88\x01\x01\x12$\n\x13\x64\x65letion_protection\x18\xea\xff\xb2\xda\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12<\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32*.google.cloud.compute.v1.SavedAttachedDisk\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\x12*\n\x1akey_revocation_action_type\x18\xe2\xdc\xc0p \x01(\tH\x03\x88\x01\x01\x12Q\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32=.google.cloud.compute.v1.SourceInstanceProperties.LabelsEntry\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x04\x88\x01\x01\x12;\n\x08metadata\x18\xaf\xf6\xb5) \x01(\x0b\x32!.google.cloud.compute.v1.MetadataH\x05\x88\x01\x01\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x06\x88\x01\x01\x12H\n\x12network_interfaces\x18\x8b\xda\x92\x19 \x03(\x0b\x32).google.cloud.compute.v1.NetworkInterface\x12@\n\nscheduling\x18\x94\xcb\xb1\xb8\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SchedulingH\x07\x88\x01\x01\x12\x45\n\x10service_accounts\x18\xb0\xc4\xab\x84\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.ServiceAccount\x12\x33\n\x04tags\x18\x99\xe8\xd8\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.TagsH\x08\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8d\x01\n\x17KeyRevocationActionType\x12(\n$UNDEFINED_KEY_REVOCATION_ACTION_TYPE\x10\x00\x12.\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\xda\x91\xde\xde\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x0b\n\x04STOP\x10\x82\x80\x9c\x01\x42\x11\n\x0f_can_ip_forwardB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\r\n\x0b_schedulingB\x07\n\x05_tags\"\xa0\x06\n\x0eSslCertificate\x12\x1c\n\x0b\x63\x65rtificate\x18\x97\x83\xfd\xa2\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x65xpire_time\x18\xed\xd3\x91\xd2\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12V\n\x07managed\x18\x9f\x9f\xa4\x8e\x01 \x01(\x0b\x32<.google.cloud.compute.v1.SslCertificateManagedSslCertificateH\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x1c\n\x0bprivate_key\x18\xa3\xf3\xa5\xac\x01 \x01(\tH\x08\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\t\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12_\n\x0cself_managed\x18\xac\xf3\x81\x9d\x01 \x01(\x0b\x32@.google.cloud.compute.v1.SslCertificateSelfManagedSslCertificateH\x0b\x88\x01\x01\x12%\n\x19subject_alternative_names\x18\xe3\xef\x93\xfc\x01 \x03(\t\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x0c\x88\x01\x01\"[\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x0f\n\x07MANAGED\x10\xff\xb6\xd2\xe4\x01\x12\x14\n\x0cSELF_MANAGED\x10\x8c\xfb\x93\xcf\x01\x12\x18\n\x10TYPE_UNSPECIFIED\x10\x92\xfb\xdb\xd0\x01\x42\x0e\n\x0c_certificateB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_expire_timeB\x05\n\x03_idB\x07\n\x05_kindB\n\n\x08_managedB\x07\n\x05_nameB\x0e\n\x0c_private_keyB\t\n\x07_regionB\x0c\n\n_self_linkB\x0f\n\r_self_managedB\x07\n\x05_type\"\xcb\x03\n\x1cSslCertificateAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.SslCertificateAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a`\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.SslCertificatesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x02\n\x12SslCertificateList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.SslCertificate\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xd0\x03\n#SslCertificateManagedSslCertificate\x12i\n\rdomain_status\x18\xcd\xa7\xe7\xab\x01 \x03(\x0b\x32N.google.cloud.compute.v1.SslCertificateManagedSslCertificate.DomainStatusEntry\x12\x12\n\x07\x64omains\x18\xaf\x88\x9bl \x03(\t\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x00\x88\x01\x01\x1a\x33\n\x11\x44omainStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd1\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12.\n&MANAGED_CERTIFICATE_STATUS_UNSPECIFIED\x10\xd2\xc5\xb3\xe2\x01\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x1a\n\x13PROVISIONING_FAILED\x10\xcf\xab\xd0$\x12\'\n\x1fPROVISIONING_FAILED_PERMANENTLY\x10\xab\xf0\x92\x83\x01\x12\x16\n\x0eRENEWAL_FAILED\x10\x84\xbe\xa1\xcf\x01\x42\t\n\x07_status\"\x85\x01\n\'SslCertificateSelfManagedSslCertificate\x12\x1c\n\x0b\x63\x65rtificate\x18\x97\x83\xfd\xa2\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bprivate_key\x18\xa3\xf3\xa5\xac\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_certificateB\x0e\n\x0c_private_key\"\xa9\x01\n\x19SslCertificatesScopedList\x12\x45\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.SslCertificate\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xe0\x03\n\x19SslPoliciesAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12O\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32=.google.cloud.compute.v1.SslPoliciesAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.SslPoliciesScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0fSslPoliciesList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x34\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\".google.cloud.compute.v1.SslPolicy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"?\n(SslPoliciesListAvailableFeaturesResponse\x12\x13\n\x08\x66\x65\x61tures\x18\xbd\xc8\xb3u \x03(\t\"\x9b\x01\n\x15SslPoliciesScopedList\x12;\n\x0cssl_policies\x18\xa3\xe4\x8d\x64 \x03(\x0b\x32\".google.cloud.compute.v1.SslPolicy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xd9\x05\n\tSslPolicy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1a\n\x0f\x63ustom_features\x18\xcb\xb2\xcb\x10 \x03(\t\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x10\x65nabled_features\x18\xfb\xc6\xd2\xdf\x01 \x03(\t\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x0fmin_tls_version\x18\xa7\xe6\xf1\x03 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07profile\x18\xa9\x93\xbal \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12\x37\n\x08warnings\x18\xd7\x88\xc1\xed\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Warnings\"^\n\rMinTlsVersion\x12\x1d\n\x19UNDEFINED_MIN_TLS_VERSION\x10\x00\x12\x0e\n\x07TLS_1_0\x10\xbe\xa4\xe5\x0f\x12\x0e\n\x07TLS_1_1\x10\xbf\xa4\xe5\x0f\x12\x0e\n\x07TLS_1_2\x10\xc0\xa4\xe5\x0f\"e\n\x07Profile\x12\x15\n\x11UNDEFINED_PROFILE\x10\x00\x12\x11\n\nCOMPATIBLE\x10\xd4\x8d\xc3U\x12\x0e\n\x06\x43USTOM\x10\xf1\xfe\xa5\xb9\x01\x12\r\n\x06MODERN\x10\x9f\xbe\xf9>\x12\x11\n\nRESTRICTED\x10\xdb\xe8\xdb|B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_min_tls_versionB\x07\n\x05_nameB\n\n\x08_profileB\t\n\x07_regionB\x0c\n\n_self_link\"@\n\x12SslPolicyReference\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_ssl_policy\"\xa0\x02\n StartAsyncReplicationDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12{\n.disks_start_async_replication_request_resource\x18\xda\x9e\xc0\xe0\x01 \x01(\x0b\x32:.google.cloud.compute.v1.DisksStartAsyncReplicationRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb8\x02\n&StartAsyncReplicationRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x88\x01\n5region_disks_start_async_replication_request_resource\x18\x85\xc8\x96\xe2\x01 \x01(\x0b\x32@.google.cloud.compute.v1.RegionDisksStartAsyncReplicationRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9b\x01\n\x14StartInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xce\x02\n)StartInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8d\x01\n8instance_group_managers_start_instances_request_resource\x18\xab\xa5\xbf| \x01(\x0b\x32\x43.google.cloud.compute.v1.InstanceGroupManagersStartInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe6\x02\n/StartInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9b\x01\n?region_instance_group_managers_start_instances_request_resource\x18\x96\x9b\xff\xec\x01 \x01(\x0b\x32I.google.cloud.compute.v1.RegionInstanceGroupManagersStartInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb5\x02\n%StartWithEncryptionKeyInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x86\x01\n4instances_start_with_encryption_key_request_resource\x18\xff\xfe\xcf\xd2\x01 \x01(\x0b\x32?.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"|\n\x0eStatefulPolicy\x12V\n\x0fpreserved_state\x18\xaa\xe2\xa0\x01 \x01(\x0b\x32\x35.google.cloud.compute.v1.StatefulPolicyPreservedStateH\x00\x88\x01\x01\x42\x12\n\x10_preserved_state\"\x8e\x05\n\x1cStatefulPolicyPreservedState\x12R\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32@.google.cloud.compute.v1.StatefulPolicyPreservedState.DisksEntry\x12\x61\n\rexternal_i_ps\x18\x8d\xd3\x80\xfe\x01 \x03(\x0b\x32\x46.google.cloud.compute.v1.StatefulPolicyPreservedState.ExternalIPsEntry\x12`\n\rinternal_i_ps\x18\xdb\x9b\xef\x66 \x03(\x0b\x32\x46.google.cloud.compute.v1.StatefulPolicyPreservedState.InternalIPsEntry\x1am\n\nDisksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12N\n\x05value\x18\x02 \x01(\x0b\x32?.google.cloud.compute.v1.StatefulPolicyPreservedStateDiskDevice:\x02\x38\x01\x1ar\n\x10\x45xternalIPsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.compute.v1.StatefulPolicyPreservedStateNetworkIp:\x02\x38\x01\x1ar\n\x10InternalIPsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.compute.v1.StatefulPolicyPreservedStateNetworkIp:\x02\x38\x01\"\xb4\x01\n&StatefulPolicyPreservedStateDiskDevice\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\tH\x00\x88\x01\x01\"\\\n\nAutoDelete\x12\x19\n\x15UNDEFINED_AUTO_DELETE\x10\x00\x12\x0c\n\x05NEVER\x10\xec\xa4\xaf#\x12%\n\x1eON_PERMANENT_INSTANCE_DELETION\x10\xe7\xe0\xd2-B\x0e\n\x0c_auto_delete\"\xb3\x01\n%StatefulPolicyPreservedStateNetworkIp\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\tH\x00\x88\x01\x01\"\\\n\nAutoDelete\x12\x19\n\x15UNDEFINED_AUTO_DELETE\x10\x00\x12\x0c\n\x05NEVER\x10\xec\xa4\xaf#\x12%\n\x1eON_PERMANENT_INSTANCE_DELETION\x10\xe7\xe0\xd2-B\x0e\n\x0c_auto_delete\"x\n\x06Status\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\x05H\x00\x88\x01\x01\x12)\n\x07\x64\x65tails\x18\xc2\xe4\xe3\xe6\x01 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\n\n\x08_message\"\xa2\x01\n\x1fStopAsyncReplicationDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xac\x01\n%StopAsyncReplicationRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9a\x02\n$StopGroupAsyncReplicationDiskRequest\x12\x86\x01\n4disks_stop_group_async_replication_resource_resource\x18\x95\xf8\xaf\xa5\x01 \x01(\x0b\x32?.google.cloud.compute.v1.DisksStopGroupAsyncReplicationResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa4\x02\n*StopGroupAsyncReplicationRegionDiskRequest\x12\x86\x01\n4disks_stop_group_async_replication_resource_resource\x18\x95\xf8\xaf\xa5\x01 \x01(\x0b\x32?.google.cloud.compute.v1.DisksStopGroupAsyncReplicationResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd4\x01\n\x13StopInstanceRequest\x12\"\n\x11\x64iscard_local_ssd\x18\xcf\xe9\xad\x98\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x14\n\x12_discard_local_ssdB\r\n\x0b_request_id\"\xcb\x02\n(StopInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8b\x01\n7instance_group_managers_stop_instances_request_resource\x18\x8d\xa5\xf4\x11 \x01(\x0b\x32\x42.google.cloud.compute.v1.InstanceGroupManagersStopInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe3\x02\n.StopInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x99\x01\n>region_instance_group_managers_stop_instances_request_resource\x18\xc2\x9c\xf2\x80\x01 \x01(\x0b\x32H.google.cloud.compute.v1.RegionInstanceGroupManagersStopInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x85\x0b\n\x0bStoragePool\x12*\n\x1a\x63\x61pacity_provisioning_type\x18\x87\x8a\xfdw \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x05\x88\x01\x01\x12\x44\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x30.google.cloud.compute.v1.StoragePool.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12.\n\x1dperformance_provisioning_type\x18\xfd\x9d\xb6\xdf\x01 \x01(\tH\x07\x88\x01\x01\x12-\n\x1cpool_provisioned_capacity_gb\x18\xd2\xcf\x97\xe4\x01 \x01(\x03H\x08\x88\x01\x01\x12%\n\x15pool_provisioned_iops\x18\x97\xc9\xb9\x35 \x01(\x03H\t\x88\x01\x01\x12+\n\x1bpool_provisioned_throughput\x18\x98\x8d\xd8P \x01(\x03H\n\x88\x01\x01\x12S\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x32.google.cloud.compute.v1.StoragePoolResourceStatusH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\r\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x0e\x88\x01\x01\x12J\n\x06status\x18\xf2\x9f\xb7V \x01(\x0b\x32\x32.google.cloud.compute.v1.StoragePoolResourceStatusH\x0f\x88\x01\x01\x12\"\n\x11storage_pool_type\x18\xb9\x81\xb0\x88\x01 \x01(\tH\x10\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x11\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"D\n\x18\x43\x61pacityProvisioningType\x12(\n$UNDEFINED_CAPACITY_PROVISIONING_TYPE\x10\x00\"J\n\x1bPerformanceProvisioningType\x12+\n\'UNDEFINED_PERFORMANCE_PROVISIONING_TYPE\x10\x00\"^\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x1d\n\x1b_capacity_provisioning_typeB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB \n\x1e_performance_provisioning_typeB\x1f\n\x1d_pool_provisioned_capacity_gbB\x18\n\x16_pool_provisioned_iopsB\x1e\n\x1c_pool_provisioned_throughputB\x12\n\x10_resource_statusB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x08\n\x06_stateB\t\n\x07_statusB\x14\n\x12_storage_pool_typeB\x07\n\x05_zone\"\xe1\x03\n\x19StoragePoolAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12O\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32=.google.cloud.compute.v1.StoragePoolAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1a]\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.StoragePoolsScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe0\x04\n\x0fStoragePoolDisk\x12\x1d\n\x12\x61ttached_instances\x18\xa3\xf3\x8e\x1f \x03(\t\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x02\x88\x01\x01\x12 \n\x10provisioned_iops\x18\xd4\xbd\x87Y \x01(\x03H\x03\x88\x01\x01\x12\'\n\x16provisioned_throughput\x18\x95\xbe\x88\xfb\x01 \x01(\x03H\x04\x88\x01\x01\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12\x18\n\x07size_gb\x18\xd9\x8b\x80\xec\x01 \x01(\x03H\x05\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\nused_bytes\x18\xe9\x9a\xban \x01(\x03H\x08\x88\x01\x01\"\x88\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x11\n\tRESTORING\x10\xab\xa7\xe2\xc0\x01\x12\x13\n\x0bUNAVAILABLE\x10\xb0\xd8\xa5\xc5\x01\x42\x15\n\x13_creation_timestampB\x07\n\x05_diskB\x07\n\x05_nameB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\n\n\x08_size_gbB\t\n\x07_statusB\x07\n\x05_typeB\r\n\x0b_used_bytes\"\xdf\x02\n\x0fStoragePoolList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x36\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32$.google.cloud.compute.v1.StoragePool\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe8\x02\n\x14StoragePoolListDisks\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.StoragePoolDisk\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xed\x05\n\x19StoragePoolResourceStatus\x12\x1a\n\ndisk_count\x18\xed\xaf\x9dW \x01(\x03H\x00\x88\x01\x01\x12&\n\x15last_resize_timestamp\x18\xd4\xfb\xe7\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x36\n&max_total_provisioned_disk_capacity_gb\x18\xdf\xde\x88O \x01(\x03H\x02\x88\x01\x01\x12)\n\x18pool_used_capacity_bytes\x18\xc5\xe9\xb0\xf3\x01 \x01(\x03H\x03\x88\x01\x01\x12\x1e\n\x0epool_used_iops\x18\x88\xc9\xbc/ \x01(\x03H\x04\x88\x01\x01\x12$\n\x14pool_used_throughput\x18\xc9\x9b\xa5\x62 \x01(\x03H\x05\x88\x01\x01\x12\'\n\x17pool_user_written_bytes\x18\xd2\xed\x96m \x01(\x03H\x06\x88\x01\x01\x12\x33\n\"total_provisioned_disk_capacity_gb\x18\xa4\x8d\xb3\xf8\x01 \x01(\x03H\x07\x88\x01\x01\x12+\n\x1btotal_provisioned_disk_iops\x18\x85\xdc\xd2\x0f \x01(\x03H\x08\x88\x01\x01\x12\x32\n!total_provisioned_disk_throughput\x18\x86\x8b\xbc\xd5\x01 \x01(\x03H\t\x88\x01\x01\x42\r\n\x0b_disk_countB\x18\n\x16_last_resize_timestampB)\n\'_max_total_provisioned_disk_capacity_gbB\x1b\n\x19_pool_used_capacity_bytesB\x11\n\x0f_pool_used_iopsB\x17\n\x15_pool_used_throughputB\x1a\n\x18_pool_user_written_bytesB%\n#_total_provisioned_disk_capacity_gbB\x1e\n\x1c_total_provisioned_disk_iopsB$\n\"_total_provisioned_disk_throughput\"\xe7\x07\n\x0fStoragePoolType\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x30\n max_pool_provisioned_capacity_gb\x18\xcd\xf1\xecV \x01(\x03H\x05\x88\x01\x01\x12*\n\x19max_pool_provisioned_iops\x18\xfc\xcf\xd9\xf5\x01 \x01(\x03H\x06\x88\x01\x01\x12/\n\x1fmax_pool_provisioned_throughput\x18\xbd\xd4\x94m \x01(\x03H\x07\x88\x01\x01\x12\x30\n min_pool_provisioned_capacity_gb\x18\x9f\x8d\x8b[ \x01(\x03H\x08\x88\x01\x01\x12*\n\x19min_pool_provisioned_iops\x18\xea\xc4\xcb\xc6\x01 \x01(\x03H\t\x88\x01\x01\x12\x30\n\x1fmin_pool_provisioned_throughput\x18\xab\xb4\xae\xaf\x01 \x01(\x03H\n\x88\x01\x01\x12\x1c\n\x0bmin_size_gb\x18\xec\xc1\xdb\xb7\x01 \x01(\x03H\x0b\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0c\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x0e\x88\x01\x01\x12\x1f\n\x14supported_disk_types\x18\x88\x8f\xe7G \x03(\t\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0f\x88\x01\x01\x42\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB#\n!_max_pool_provisioned_capacity_gbB\x1c\n\x1a_max_pool_provisioned_iopsB\"\n _max_pool_provisioned_throughputB#\n!_min_pool_provisioned_capacity_gbB\x1c\n\x1a_min_pool_provisioned_iopsB\"\n _min_pool_provisioned_throughputB\x0e\n\x0c_min_size_gbB\x07\n\x05_nameB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x07\n\x05_zone\"\xb5\x03\n\x1dStoragePoolTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.StoragePoolTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.StoragePoolTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x02\n\x13StoragePoolTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.StoragePoolType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x01\n\x1aStoragePoolTypesScopedList\x12H\n\x12storage_pool_types\x18\xda\xad\xd0\x83\x01 \x03(\x0b\x32(.google.cloud.compute.v1.StoragePoolType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xa0\x01\n\x16StoragePoolsScopedList\x12?\n\rstorage_pools\x18\x93\x92\xc0\xd0\x01 \x03(\x0b\x32$.google.cloud.compute.v1.StoragePool\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xfd\x11\n\nSubnetwork\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12 \n\x10\x65nable_flow_logs\x18\xe4\xc4\xa1H \x01(\x08H\x02\x88\x01\x01\x12$\n\x14\x65xternal_ipv6_prefix\x18\xf6\x92\xb6\x42 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12 \n\x0fgateway_address\x18\xf9\x89\xa4\xdb\x01 \x01(\tH\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12%\n\x14internal_ipv6_prefix\x18\xe8\xa2\xb4\xf1\x01 \x01(\tH\x07\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x08\x88\x01\x01\x12\x1d\n\rip_collection\x18\xb6\x91\xa8T \x01(\tH\t\x88\x01\x01\x12!\n\x10ipv6_access_type\x18\xdd\xf5\xd1\xf0\x01 \x01(\tH\n\x88\x01\x01\x12 \n\x0fipv6_cidr_range\x18\x8a\x9c\x9f\x82\x01 \x01(\tH\x0b\x88\x01\x01\x12\"\n\x11ipv6_gce_endpoint\x18\xe3\xca\xe2\x98\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\r\x88\x01\x01\x12I\n\nlog_config\x18\x9d\xd1\xc1\xa7\x01 \x01(\x0b\x32,.google.cloud.compute.v1.SubnetworkLogConfigH\x0e\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0f\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x10\x88\x01\x01\x12)\n\x18private_ip_google_access\x18\xce\xe8\xfd\xc8\x01 \x01(\x08H\x11\x88\x01\x01\x12*\n\x1aprivate_ipv6_google_access\x18\x8e\xcc\x82\x17 \x01(\tH\x12\x88\x01\x01\x12\x18\n\x07purpose\x18\x9e\xfa\xef\x96\x01 \x01(\tH\x13\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x14\x88\x01\x01\x12(\n\x17reserved_internal_range\x18\xb2\x9e\xbf\x88\x01 \x01(\tH\x15\x88\x01\x01\x12\x14\n\x04role\x18\xf6\x80\xd6\x01 \x01(\tH\x16\x88\x01\x01\x12Q\n\x13secondary_ip_ranges\x18\xe3\xff\x94\x41 \x03(\x0b\x32\x31.google.cloud.compute.v1.SubnetworkSecondaryRange\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x17\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\x18\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x19\x88\x01\x01\"y\n\x0eIpv6AccessType\x12\x1e\n\x1aUNDEFINED_IPV6_ACCESS_TYPE\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12$\n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\xa5\xf6\xa4\x95\x01\"T\n\x0fIpv6GceEndpoint\x12\x1f\n\x1bUNDEFINED_IPV6_GCE_ENDPOINT\x10\x00\x12\x10\n\tVM_AND_FR\x10\xdc\x8d\xf9\x13\x12\x0e\n\x07VM_ONLY\x10\xb4\xc0\xf3p\"\xbe\x01\n\x17PrivateIpv6GoogleAccess\x12(\n$UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS\x10\x00\x12\x1d\n\x15\x44ISABLE_GOOGLE_ACCESS\x10\xf3\xa9\x84\xd7\x01\x12-\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\xba\xca\x89\xcc\x01\x12+\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\xd7\xfa\xb6\x89\x01\"\xf8\x01\n\x07Purpose\x12\x15\n\x11UNDEFINED_PURPOSE\x10\x00\x12\x1b\n\x14GLOBAL_MANAGED_PROXY\x10\xf2\xcb\xe0p\x12#\n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\xd9\xb6\xcev\x12\x16\n\x0ePEER_MIGRATION\x10\x91\xaa\xc7\xea\x01\x12\x0f\n\x07PRIVATE\x10\xe3\xe2\xb2\xc0\x01\x12\x13\n\x0bPRIVATE_NAT\x10\xa5\xc8\xae\xaf\x01\x12\x17\n\x10PRIVATE_RFC_1918\x10\xdb\xfe\xc5y\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x1d\n\x16REGIONAL_MANAGED_PROXY\x10\xee\xb6\xfdH\":\n\x04Role\x12\x12\n\x0eUNDEFINED_ROLE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x06\x42\x41\x43KUP\x10\xc2\xd3\xcd\xa2\x01\"{\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%\x12\x1e\n\x16UNSPECIFIED_STACK_TYPE\x10\xd9\xd1\x91\x8e\x01\"<\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\x08\x44RAINING\x10\xea\xd5\x8c\xe5\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x13\n\x11_enable_flow_logsB\x17\n\x15_external_ipv6_prefixB\x0e\n\x0c_fingerprintB\x12\n\x10_gateway_addressB\x05\n\x03_idB\x17\n\x15_internal_ipv6_prefixB\x10\n\x0e_ip_cidr_rangeB\x10\n\x0e_ip_collectionB\x13\n\x11_ipv6_access_typeB\x12\n\x10_ipv6_cidr_rangeB\x14\n\x12_ipv6_gce_endpointB\x07\n\x05_kindB\r\n\x0b_log_configB\x07\n\x05_nameB\n\n\x08_networkB\x1b\n\x19_private_ip_google_accessB\x1d\n\x1b_private_ipv6_google_accessB\n\n\x08_purposeB\t\n\x07_regionB\x1a\n\x18_reserved_internal_rangeB\x07\n\x05_roleB\x0c\n\n_self_linkB\r\n\x0b_stack_typeB\x08\n\x06_state\"\xbf\x03\n\x18SubnetworkAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.SubnetworkAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.SubnetworksScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0eSubnetworkList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.Subnetwork\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xdd\x04\n\x13SubnetworkLogConfig\x12$\n\x14\x61ggregation_interval\x18\x82\x9b\xb4S \x01(\tH\x00\x88\x01\x01\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0b\x66ilter_expr\x18\xdc\xa4\xb8W \x01(\tH\x02\x88\x01\x01\x12\x1e\n\rflow_sampling\x18\xd8\xe7\xe5\xfc\x01 \x01(\x02H\x03\x88\x01\x01\x12\x18\n\x08metadata\x18\xaf\xf6\xb5) \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0fmetadata_fields\x18\xc9\xbb\xbb\xb4\x01 \x03(\t\"\xc8\x01\n\x13\x41ggregationInterval\x12\"\n\x1eUNDEFINED_AGGREGATION_INTERVAL\x10\x00\x12\x17\n\x0fINTERVAL_10_MIN\x10\xcc\xd1\xa5\xe8\x01\x12\x17\n\x0fINTERVAL_15_MIN\x10\xd1\xbc\xbf\xea\x01\x12\x15\n\x0eINTERVAL_1_MIN\x10\xaa\xd2\xf6 \x12\x16\n\x0fINTERVAL_30_SEC\x10\x89\xe0\xcc\x03\x12\x15\n\x0eINTERVAL_5_MIN\x10\xae\x8e\xd8\"\x12\x15\n\x0eINTERVAL_5_SEC\x10\xad\xba\xd8\"\"u\n\x08Metadata\x12\x16\n\x12UNDEFINED_METADATA\x10\x00\x12\x16\n\x0f\x43USTOM_METADATA\x10\xbd\xd8\xe3\x1d\x12\x1c\n\x14\x45XCLUDE_ALL_METADATA\x10\x92\xbd\xc1\x9f\x01\x12\x1b\n\x14INCLUDE_ALL_METADATA\x10\x84\xcd\xbfNB\x17\n\x15_aggregation_intervalB\t\n\x07_enableB\x0e\n\x0c_filter_exprB\x10\n\x0e_flow_samplingB\x0b\n\t_metadata\"\xbd\x01\n\x18SubnetworkSecondaryRange\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nrange_name\x18\xcd\xf0\xb4\x9e\x01 \x01(\tH\x01\x88\x01\x01\x12(\n\x17reserved_internal_range\x18\xb2\x9e\xbf\x88\x01 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\r\n\x0b_range_nameB\x1a\n\x18_reserved_internal_range\"V\n#SubnetworksExpandIpCidrRangeRequest\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x00\x88\x01\x01\x42\x10\n\x0e_ip_cidr_range\"\x9c\x01\n\x15SubnetworksScopedList\x12<\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\x0b\x32#.google.cloud.compute.v1.Subnetwork\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"t\n*SubnetworksSetPrivateIpGoogleAccessRequest\x12)\n\x18private_ip_google_access\x18\xce\xe8\xfd\xc8\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1b\n\x19_private_ip_google_access\"\x7f\n\nSubsetting\x12\x16\n\x06policy\x18\xb2\xca\xb6+ \x01(\tH\x00\x88\x01\x01\"N\n\x06Policy\x12\x14\n\x10UNDEFINED_POLICY\x10\x00\x12!\n\x1a\x43ONSISTENT_HASH_SUBSETTING\x10\xb4\x98\xfc\x33\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x42\t\n\x07_policy\"\xd7\x01\n\x16SuspendInstanceRequest\x12\"\n\x11\x64iscard_local_ssd\x18\xcf\xe9\xad\x98\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x14\n\x12_discard_local_ssdB\r\n\x0b_request_id\"\xd4\x02\n+SuspendInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x91\x01\n:instance_group_managers_suspend_instances_request_resource\x18\xd1\x8d\xa1\x16 \x01(\x0b\x32\x45.google.cloud.compute.v1.InstanceGroupManagersSuspendInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xeb\x02\n1SuspendInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9e\x01\nAregion_instance_group_managers_suspend_instances_request_resource\x18\xfc\xe5\x94\x66 \x01(\x0b\x32K.google.cloud.compute.v1.RegionInstanceGroupManagersSuspendInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x89\x01\n SwitchToCustomModeNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x03\n\x0eTCPHealthCheck\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x00\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12port_specification\x18\xc5\xeb\xcc\x18 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07request\x18\x8f\xe5\xbb\n \x01(\tH\x04\x88\x01\x01\x12\x18\n\x08response\x18\xc1\xa8\xdc] \x01(\tH\x05\x88\x01\x01\"~\n\x11PortSpecification\x12 \n\x1cUNDEFINED_PORT_SPECIFICATION\x10\x00\x12\x15\n\x0eUSE_FIXED_PORT\x10\xe4\x88\xdbZ\x12\x16\n\x0eUSE_NAMED_PORT\x10\xbf\xcf\xc7\xa6\x01\x12\x18\n\x10USE_SERVING_PORT\x10\xcc\xd1\xf5\xac\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x07\n\x05_portB\x0c\n\n_port_nameB\x15\n\x13_port_specificationB\x0f\n\r_proxy_headerB\n\n\x08_requestB\x0b\n\t_response\"E\n\x04Tags\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05items\x18\xc0\xcf\xf7/ \x03(\tB\x0e\n\x0c_fingerprint\"\xca\x03\n\x0fTargetGrpcProxy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x06\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tH\x08\x88\x01\x01\x12&\n\x16validate_for_proxyless\x18\xa8\xe3\xc6\x30 \x01(\x08H\t\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\n\n\x08_url_mapB\x19\n\x17_validate_for_proxyless\"\xaf\x02\n\x13TargetGrpcProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.TargetGrpcProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xae\x01\n\x1bTargetHttpProxiesScopedList\x12H\n\x13target_http_proxies\x18\xc3\xd5\xa8M \x03(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xeb\x03\n\x0fTargetHttpProxy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12,\n\x1bhttp_keep_alive_timeout_sec\x18\xde\xce\xa6\xd5\x01 \x01(\x05H\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x1b\n\nproxy_bind\x18\xee\xce\xb1\x88\x01 \x01(\x08H\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tH\n\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x1e\n\x1c_http_keep_alive_timeout_secB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_proxy_bindB\t\n\x07_regionB\x0c\n\n_self_linkB\n\n\x08_url_map\"\x88\x03\n\x1dTargetHttpProxyAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.TargetHttpProxyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x1a\x62\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.compute.v1.TargetHttpProxiesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_link\"\xaf\x02\n\x13TargetHttpProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb2\x01\n\x1cTargetHttpsProxiesScopedList\x12K\n\x14target_https_proxies\x18\x8a\xfc\xe7\xae\x01 \x03(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"a\n*TargetHttpsProxiesSetCertificateMapRequest\x12\x1f\n\x0f\x63\x65rtificate_map\x18\xb4\xe5\xcdJ \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_certificate_map\"\xb6\x01\n(TargetHttpsProxiesSetQuicOverrideRequest\x12\x1e\n\rquic_override\x18\xad\xa1\xdb\xd9\x01 \x01(\tH\x00\x88\x01\x01\"X\n\x0cQuicOverride\x12\x1b\n\x17UNDEFINED_QUIC_OVERRIDE\x10\x00\x12\x0e\n\x07\x44ISABLE\x10\xc8\xdd\xa6s\x12\x0e\n\x06\x45NABLE\x10\x83\xb3\xa0\xd1\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x42\x10\n\x0e_quic_override\"K\n+TargetHttpsProxiesSetSslCertificatesRequest\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\"\x9d\x08\n\x10TargetHttpsProxy\x12$\n\x14\x61uthorization_policy\x18\xb8\xef\x97\x10 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0f\x63\x65rtificate_map\x18\xb4\xe5\xcdJ \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12,\n\x1bhttp_keep_alive_timeout_sec\x18\xde\xce\xa6\xd5\x01 \x01(\x05H\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x1b\n\nproxy_bind\x18\xee\xce\xb1\x88\x01 \x01(\x08H\t\x88\x01\x01\x12\x1e\n\rquic_override\x18\xad\xa1\xdb\xd9\x01 \x01(\tH\n\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\"\n\x11server_tls_policy\x18\xf2\xde\x87\x8d\x01 \x01(\tH\r\x88\x01\x01\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1e\n\x0etls_early_data\x18\xca\xe1\x91\x1d \x01(\tH\x0f\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tH\x10\x88\x01\x01\"X\n\x0cQuicOverride\x12\x1b\n\x17UNDEFINED_QUIC_OVERRIDE\x10\x00\x12\x0e\n\x07\x44ISABLE\x10\xc8\xdd\xa6s\x12\x0e\n\x06\x45NABLE\x10\x83\xb3\xa0\xd1\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\"x\n\x0cTlsEarlyData\x12\x1c\n\x18UNDEFINED_TLS_EARLY_DATA\x10\x00\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x12\n\nPERMISSIVE\x10\x9f\xe5\xbe\xf0\x01\x12\x0e\n\x06STRICT\x10\xc9\xa5\xa1\x93\x01\x12\x14\n\x0cUNRESTRICTED\x10\xb4\xa7\x85\xda\x01\x42\x17\n\x15_authorization_policyB\x12\n\x10_certificate_mapB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x1e\n\x1c_http_keep_alive_timeout_secB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_proxy_bindB\x10\n\x0e_quic_overrideB\t\n\x07_regionB\x0c\n\n_self_linkB\x14\n\x12_server_tls_policyB\r\n\x0b_ssl_policyB\x11\n\x0f_tls_early_dataB\n\n\x08_url_map\"\xd2\x03\n\x1eTargetHttpsProxyAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12T\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x42.google.cloud.compute.v1.TargetHttpsProxyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x63\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.google.cloud.compute.v1.TargetHttpsProxiesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb1\x02\n\x14TargetHttpsProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xfc\x03\n\x0eTargetInstance\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\nnat_policy\x18\x90\xc4\x8a\xf3\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\n\x88\x01\x01\"4\n\tNatPolicy\x12\x18\n\x14UNDEFINED_NAT_POLICY\x10\x00\x12\r\n\x06NO_NAT\x10\x83\xbb\xfeLB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x0b\n\t_instanceB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_nat_policyB\n\n\x08_networkB\x12\n\x10_security_policyB\x0c\n\n_self_linkB\x07\n\x05_zone\"\xcb\x03\n\x1cTargetInstanceAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.TargetInstanceAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a`\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.TargetInstancesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x02\n\x12TargetInstanceList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.TargetInstance\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa9\x01\n\x19TargetInstancesScopedList\x12\x45\n\x10target_instances\x18\xd0\xd2\xad\xbb\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.TargetInstance\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xa5\x06\n\nTargetPool\x12\x1b\n\x0b\x62\x61\x63kup_pool\x18\xf9\xc8\xf0\x15 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x0e\x66\x61ilover_ratio\x18\xfe\x94\xb4\x65 \x01(\x02H\x03\x88\x01\x01\x12\x19\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\t\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12!\n\x10session_affinity\x18\xb1\xc1\x99\xdd\x01 \x01(\tH\n\x88\x01\x01\"\x8b\x02\n\x0fSessionAffinity\x12\x1e\n\x1aUNDEFINED_SESSION_AFFINITY\x10\x00\x12\x11\n\tCLIENT_IP\x10\x9b\xdc\xe9\xa4\x01\x12\x1f\n\x18\x43LIENT_IP_NO_DESTINATION\x10\x94\x9a\xcd\x32\x12\x1b\n\x14\x43LIENT_IP_PORT_PROTO\x10\xae\xf2\xdci\x12\x16\n\x0f\x43LIENT_IP_PROTO\x10\xa4\xc5\x89\x0c\x12\x18\n\x10GENERATED_COOKIE\x10\xb4\xce\xca\xb0\x01\x12\x13\n\x0cHEADER_FIELD\x10\xa8\x89\xdc_\x12\x13\n\x0bHTTP_COOKIE\x10\xfb\xa3\x83\xec\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x1e\n\x16STRONG_COOKIE_AFFINITY\x10\xfb\xdd\x93\xd1\x01\x42\x0e\n\x0c_backup_poolB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x11\n\x0f_failover_ratioB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x12\n\x10_security_policyB\x0c\n\n_self_linkB\x13\n\x11_session_affinity\"\xbf\x03\n\x18TargetPoolAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.TargetPoolAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.TargetPoolsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"{\n\x18TargetPoolInstanceHealth\x12@\n\rhealth_status\x18\xb5\xd6\xba\xb5\x01 \x03(\x0b\x32%.google.cloud.compute.v1.HealthStatus\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_kind\"\xa5\x02\n\x0eTargetPoolList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.TargetPool\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"l\n TargetPoolsAddHealthCheckRequest\x12H\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\x0b\x32-.google.cloud.compute.v1.HealthCheckReference\"a\n\x1dTargetPoolsAddInstanceRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.InstanceReference\"o\n#TargetPoolsRemoveHealthCheckRequest\x12H\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\x0b\x32-.google.cloud.compute.v1.HealthCheckReference\"d\n TargetPoolsRemoveInstanceRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.InstanceReference\"\x9d\x01\n\x15TargetPoolsScopedList\x12=\n\x0ctarget_pools\x18\xa9\x9f\xa0\xa0\x01 \x03(\x0b\x32#.google.cloud.compute.v1.TargetPool\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"4\n\x0fTargetReference\x12\x16\n\x06target\x18\x91\xe3\xf9[ \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_target\"P\n(TargetSslProxiesSetBackendServiceRequest\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_service\"_\n(TargetSslProxiesSetCertificateMapRequest\x12\x1f\n\x0f\x63\x65rtificate_map\x18\xb4\xe5\xcdJ \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_certificate_map\"\xa0\x01\n%TargetSslProxiesSetProxyHeaderRequest\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x00\x88\x01\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x0f\n\r_proxy_header\"I\n)TargetSslProxiesSetSslCertificatesRequest\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\"\x98\x04\n\x0eTargetSslProxy\x12\x1f\n\x0f\x63\x65rtificate_map\x18\xb4\xe5\xcdJ \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tH\t\x88\x01\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x12\n\x10_certificate_mapB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0f\n\r_proxy_headerB\x0c\n\n_self_linkB\n\n\x08_serviceB\r\n\x0b_ssl_policy\"\xad\x02\n\x12TargetSslProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.TargetSslProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x01\n\x1aTargetTcpProxiesScopedList\x12\x46\n\x12target_tcp_proxies\x18\x80\xd7\xfa| \x03(\x0b\x32\'.google.cloud.compute.v1.TargetTcpProxy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"P\n(TargetTcpProxiesSetBackendServiceRequest\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_service\"\xa0\x01\n%TargetTcpProxiesSetProxyHeaderRequest\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x00\x88\x01\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x0f\n\r_proxy_header\"\xe8\x03\n\x0eTargetTcpProxy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\nproxy_bind\x18\xee\xce\xb1\x88\x01 \x01(\x08H\x05\x88\x01\x01\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\t\x88\x01\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_proxy_bindB\x0f\n\r_proxy_headerB\t\n\x07_regionB\x0c\n\n_self_linkB\n\n\x08_service\"\xcc\x03\n\x1cTargetTcpProxyAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.TargetTcpProxyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.TargetTcpProxiesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x02\n\x12TargetTcpProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.TargetTcpProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xae\x05\n\x10TargetVpnGateway\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x10\x66orwarding_rules\x18\xb5\x9a\xcc\x96\x01 \x03(\t\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x04\x88\x01\x01\x12I\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x35.google.cloud.compute.v1.TargetVpnGateway.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\t\x88\x01\x01\x12\x12\n\x07tunnels\x18\x8b\xfa\xed\x31 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_status\"\xd1\x03\n\x1eTargetVpnGatewayAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12T\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x42.google.cloud.compute.v1.TargetVpnGatewayAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x62\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.compute.v1.TargetVpnGatewaysScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb1\x02\n\x14TargetVpnGatewayList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.TargetVpnGateway\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb0\x01\n\x1bTargetVpnGatewaysScopedList\x12J\n\x13target_vpn_gateways\x18\x88\x93\xca\xbf\x01 \x03(\x0b\x32).google.cloud.compute.v1.TargetVpnGateway\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x93\x04\n\x0bTestFailure\x12\"\n\x11\x61\x63tual_output_url\x18\x82\xd9\xf1\x88\x01 \x01(\tH\x00\x88\x01\x01\x12-\n\x1d\x61\x63tual_redirect_response_code\x18\xd9\x83\xbc\x14 \x01(\x05H\x01\x88\x01\x01\x12\x1f\n\x0e\x61\x63tual_service\x18\x84\xd2\xfe\xd1\x01 \x01(\tH\x02\x88\x01\x01\x12$\n\x13\x65xpected_output_url\x18\x98\xa2\xf7\xce\x01 \x01(\tH\x03\x88\x01\x01\x12/\n\x1f\x65xpected_redirect_response_code\x18\xef\xea\x80\t \x01(\x05H\x04\x88\x01\x01\x12 \n\x10\x65xpected_service\x18\xae\xf8\xf1? \x01(\tH\x05\x88\x01\x01\x12=\n\x07headers\x18\x86\xdf\x9d{ \x03(\x0b\x32).google.cloud.compute.v1.UrlMapTestHeader\x12\x14\n\x04host\x18\xa8\xeb\xc3\x01 \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x07\x88\x01\x01\x42\x14\n\x12_actual_output_urlB \n\x1e_actual_redirect_response_codeB\x11\n\x0f_actual_serviceB\x16\n\x14_expected_output_urlB\"\n _expected_redirect_response_codeB\x13\n\x11_expected_serviceB\x07\n\x05_hostB\x07\n\x05_path\"\xc0\x01\n&TestIamPermissionsBackendBucketRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xc1\x01\n\'TestIamPermissionsBackendServiceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xcd\x01\n\x1dTestIamPermissionsDiskRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xc5\x01\n+TestIamPermissionsExternalVpnGatewayRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xa8\x01\n\'TestIamPermissionsFirewallPolicyRequest\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xb8\x01\n\x1eTestIamPermissionsImageRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd1\x01\n!TestIamPermissionsInstanceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n)TestIamPermissionsInstanceTemplateRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd8\x01\n(TestIamPermissionsInstantSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n$TestIamPermissionsLicenseCodeRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xba\x01\n TestIamPermissionsLicenseRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xbf\x01\n%TestIamPermissionsMachineImageRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xdc\x01\n*TestIamPermissionsNetworkAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xdd\x01\n-TestIamPermissionsNetworkEndpointGroupRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xc8\x01\n.TestIamPermissionsNetworkFirewallPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd2\x01\n\"TestIamPermissionsNodeGroupRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xd7\x01\n%TestIamPermissionsNodeTemplateRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xda\x01\n(TestIamPermissionsPacketMirroringRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xdf\x01\n-TestIamPermissionsRegionBackendServiceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd5\x01\n#TestIamPermissionsRegionDiskRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xe0\x01\n.TestIamPermissionsRegionInstantSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xe6\x01\n4TestIamPermissionsRegionNetworkFirewallPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd4\x01\n$TestIamPermissionsReservationRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xd9\x01\n\'TestIamPermissionsResourcePolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xdc\x01\n*TestIamPermissionsServiceAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xbb\x01\n!TestIamPermissionsSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd4\x01\n$TestIamPermissionsStoragePoolRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xd5\x01\n#TestIamPermissionsSubnetworkRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd5\x01\n#TestIamPermissionsVpnGatewayRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"0\n\x16TestPermissionsRequest\x12\x16\n\x0bpermissions\x18\x84\xe9\xcb\x1c \x03(\t\"1\n\x17TestPermissionsResponse\x12\x16\n\x0bpermissions\x18\x84\xe9\xcb\x1c \x03(\t\"D\n\x07Uint128\x12\x14\n\x04high\x18\xa2\xbb\xc3\x01 \x01(\x04H\x00\x88\x01\x01\x12\x12\n\x03low\x18\xd4\xc6\x06 \x01(\x04H\x01\x88\x01\x01\x42\x07\n\x05_highB\x06\n\x04_low\"\x9c\x04\n\x13UpcomingMaintenance\x12\x1e\n\x0e\x63\x61n_reschedule\x18\x99\xa3\xe2- \x01(\x08H\x00\x88\x01\x01\x12(\n\x18latest_window_start_time\x18\x81\xbb\x86= \x01(\tH\x01\x88\x01\x01\x12\"\n\x12maintenance_status\x18\x9e\x9d\xf7& \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x03\x88\x01\x01\x12 \n\x0fwindow_end_time\x18\xa0\xae\xce\x81\x01 \x01(\tH\x04\x88\x01\x01\x12\"\n\x11window_start_time\x18\xb9\xb0\xc9\xe1\x01 \x01(\tH\x05\x88\x01\x01\"g\n\x11MaintenanceStatus\x12 \n\x1cUNDEFINED_MAINTENANCE_STATUS\x10\x00\x12\x0f\n\x07ONGOING\x10\xdb\xa6\xcf\xe1\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\"X\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x11\n\tSCHEDULED\x10\x8d\xa1\x8f\xe4\x01\x12\x14\n\x0cUNKNOWN_TYPE\x10\xaf\xa4\xfe\xe9\x01\x12\x13\n\x0bUNSCHEDULED\x10\x94\xc4\xce\xd6\x01\x42\x11\n\x0f_can_rescheduleB\x1b\n\x19_latest_window_start_timeB\x15\n\x13_maintenance_statusB\x07\n\x05_typeB\x12\n\x10_window_end_timeB\x14\n\x12_window_start_time\"\x9c\x02\n!UpdateAccessConfigInstanceRequest\x12N\n\x16\x61\x63\x63\x65ss_config_resource\x18\x90\xff\xf6\xb8\x01 \x01(\x0b\x32%.google.cloud.compute.v1.AccessConfigB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xfa\x01\n\x17UpdateAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x00\x88\x01\x01\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_autoscalerB\r\n\x0b_request_id\"\xdc\x01\n\x1aUpdateBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12P\n\x17\x62\x61\x63kend_bucket_resource\x18\x98\xce\xc7\xb5\x01 \x01(\x0b\x32&.google.cloud.compute.v1.BackendBucketB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe1\x01\n\x1bUpdateBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa1\x02\n\x11UpdateDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\rdisk_resource\x18\xf0\xd0\xab\x0c \x01(\x0b\x32\x1d.google.cloud.compute.v1.DiskB\x03\xe0\x41\x02\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xfb\x01\n\"UpdateDisplayDeviceInstanceRequest\x12P\n\x17\x64isplay_device_resource\x18\xda\x84\x91\x8a\x01 \x01(\x0b\x32&.google.cloud.compute.v1.DisplayDeviceB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xc6\x01\n\x15UpdateFirewallRequest\x12\x19\n\x08\x66irewall\x18\x80\xfa\xd5\xf3\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x11\x66irewall_resource\x18\xed\xb0\xe0\x13 \x01(\x0b\x32!.google.cloud.compute.v1.FirewallB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd4\x01\n\x18UpdateHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe5\x03\n\x15UpdateInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x11instance_resource\x18\xf8\xf0\xfe\x66 \x01(\x0b\x32!.google.cloud.compute.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\x0eminimal_action\x18\x94\x8d\x82\x81\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x1emost_disruptive_allowed_action\x18\x8d\xce\xc2\x1f \x01(\tH\x01\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zone\"-\n\rMinimalAction\x12\x1c\n\x18UNDEFINED_MINIMAL_ACTION\x10\x00\"K\n\x1bMostDisruptiveAllowedAction\x12,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION\x10\x00\x42\x11\n\x0f_minimal_actionB!\n\x1f_most_disruptive_allowed_actionB\r\n\x0b_request_id\"\xa8\x02\n%UpdateNetworkInterfaceInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\x1anetwork_interface_resource\x18\x85\x94\xae\x9b\x01 \x01(\x0b\x32).google.cloud.compute.v1.NetworkInterfaceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf5\x01\n\x1bUpdatePeeringNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12o\n(networks_update_peering_request_resource\x18\xd9\xaa\x82k \x01(\x0b\x32\x35.google.cloud.compute.v1.NetworksUpdatePeeringRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe6\x02\n3UpdatePerInstanceConfigsInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x9b\x01\n@instance_group_managers_update_per_instance_configs_req_resource\x18\xbe\xc1\xb6\x43 \x01(\x0b\x32I.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReqB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf2\x02\n9UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\nAregion_instance_group_manager_update_instance_config_req_resource\x18\xa7\xae\xba* \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReqB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x84\x02\n\x1dUpdateRegionAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x00\x88\x01\x01\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_autoscalerB\r\n\x0b_request_id\"\x88\x02\n!UpdateRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc4\x02\n\x1dUpdateRegionCommitmentRequest\x12\x1b\n\ncommitment\x18\x95\x96\xf3\xe5\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13\x63ommitment_resource\x18\xf8\xa3\xbbt \x01(\x0b\x32#.google.cloud.compute.v1.CommitmentB\x03\xe0\x41\x02\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xab\x02\n\x17UpdateRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\rdisk_resource\x18\xf0\xd0\xab\x0c \x01(\x0b\x32\x1d.google.cloud.compute.v1.DiskB\x03\xe0\x41\x02\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xfb\x01\n\x1eUpdateRegionHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe7\x01\n\x19UpdateRegionUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbe\x02\n\x18UpdateReservationRequest\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12K\n\x14reservation_resource\x18\xa1\xee\xf4\x87\x01 \x01(\x0b\x32$.google.cloud.compute.v1.ReservationB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xf4\x01\n\x1eUpdateRoutePolicyRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12K\n\x15route_policy_resource\x18\x85\xbd\xb5\x37 \x01(\x0b\x32$.google.cloud.compute.v1.RoutePolicyB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xde\x01\n\x13UpdateRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0frouter_resource\x18\xc4\x80\x82J \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x97\x02\n+UpdateShieldedInstanceConfigInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x63\n!shielded_instance_config_resource\x18\xd8\x96\xdd\x81\x01 \x01(\x0b\x32/.google.cloud.compute.v1.ShieldedInstanceConfigB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x9f\x02\n\x18UpdateStoragePoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15storage_pool_resource\x18\x8d\xbc\xf9J \x01(\x0b\x32$.google.cloud.compute.v1.StoragePoolB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xc0\x01\n\x13UpdateUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf2\x07\n\x06UrlMap\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12h\n$default_custom_error_response_policy\x18\xa9\x8b\xe0& \x01(\x0b\x32\x32.google.cloud.compute.v1.CustomErrorResponsePolicyH\x01\x88\x01\x01\x12O\n\x14\x64\x65\x66\x61ult_route_action\x18\xaa\xb4\xd7\xb4\x01 \x01(\x0b\x32(.google.cloud.compute.v1.HttpRouteActionH\x02\x88\x01\x01\x12 \n\x0f\x64\x65\x66\x61ult_service\x18\xb7\xe5\xc5\xb0\x01 \x01(\tH\x03\x88\x01\x01\x12R\n\x14\x64\x65\x66\x61ult_url_redirect\x18\xea\xab\xb6\xab\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpRedirectActionH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x06\x88\x01\x01\x12I\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32).google.cloud.compute.v1.HttpHeaderActionH\x07\x88\x01\x01\x12\x39\n\nhost_rules\x18\xa0\x87\xd7\x94\x01 \x03(\x0b\x32!.google.cloud.compute.v1.HostRule\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x08\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12?\n\rpath_matchers\x18\xdb\x88\xc5\x81\x01 \x03(\x0b\x32$.google.cloud.compute.v1.PathMatcher\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\x35\n\x05tests\x18\xa1\x9c\xc9\x34 \x03(\x0b\x32#.google.cloud.compute.v1.UrlMapTestB\x15\n\x13_creation_timestampB\'\n%_default_custom_error_response_policyB\x17\n\x15_default_route_actionB\x12\n\x10_default_serviceB\x17\n\x15_default_url_redirectB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x10\n\x0e_header_actionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x0c\n\n_self_link\"\x9d\x02\n\nUrlMapList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x31\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1f.google.cloud.compute.v1.UrlMap\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"7\n\x0fUrlMapReference\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_url_map\"\xf0\x02\n\nUrlMapTest\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12$\n\x13\x65xpected_output_url\x18\x98\xa2\xf7\xce\x01 \x01(\tH\x01\x88\x01\x01\x12/\n\x1f\x65xpected_redirect_response_code\x18\xef\xea\x80\t \x01(\x05H\x02\x88\x01\x01\x12=\n\x07headers\x18\x86\xdf\x9d{ \x03(\x0b\x32).google.cloud.compute.v1.UrlMapTestHeader\x12\x14\n\x04host\x18\xa8\xeb\xc3\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x05\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x16\n\x14_expected_output_urlB\"\n _expected_redirect_response_codeB\x07\n\x05_hostB\x07\n\x05_pathB\n\n\x08_service\"R\n\x10UrlMapTestHeader\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\x08\n\x06_value\"\xd2\x01\n\x16UrlMapValidationResult\x12\x17\n\x0bload_errors\x18\xe4\xf1\xf1\x93\x01 \x03(\t\x12\x1e\n\x0eload_succeeded\x18\xc8\xb4\x98= \x01(\x08H\x00\x88\x01\x01\x12?\n\rtest_failures\x18\xb6\xe2\x9f\xf1\x01 \x03(\x0b\x32$.google.cloud.compute.v1.TestFailure\x12\x1b\n\x0btest_passed\x18\xbd\x81\xf2[ \x01(\x08H\x01\x88\x01\x01\x42\x11\n\x0f_load_succeededB\x0e\n\x0c_test_passed\"\xb5\x03\n\x15UrlMapsAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12K\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x39.google.cloud.compute.v1.UrlMapsAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aX\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.google.cloud.compute.v1.UrlMapsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x90\x01\n\x11UrlMapsScopedList\x12\x34\n\x08url_maps\x18\xe7\x8e\xa4\x31 \x03(\x0b\x32\x1f.google.cloud.compute.v1.UrlMap\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x98\x02\n\x16UrlMapsValidateRequest\x12!\n\x16load_balancing_schemes\x18\xaf\x85\x81\x03 \x03(\t\x12\x39\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapH\x00\x88\x01\x01\"\x92\x01\n\x14LoadBalancingSchemes\x12$\n UNDEFINED_LOAD_BALANCING_SCHEMES\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x18\n\x10\x45XTERNAL_MANAGED\x10\x8b\xb6\x92\xf4\x01\x12)\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\xbc\xbb\x87\xfb\x01\x42\x0b\n\t_resource\"m\n\x17UrlMapsValidateResponse\x12G\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32/.google.cloud.compute.v1.UrlMapValidationResultH\x00\x88\x01\x01\x42\t\n\x07_result\"\xba\x01\n\nUrlRewrite\x12\x1c\n\x0chost_rewrite\x18\xf5\xcb\x9aL \x01(\tH\x00\x88\x01\x01\x12#\n\x13path_prefix_rewrite\x18\xb9\xe8\xd1\x13 \x01(\tH\x01\x88\x01\x01\x12&\n\x15path_template_rewrite\x18\xa1\xef\xf2\xc9\x01 \x01(\tH\x02\x88\x01\x01\x42\x0f\n\r_host_rewriteB\x16\n\x14_path_prefix_rewriteB\x18\n\x16_path_template_rewrite\"\xfe\x07\n\x10UsableSubnetwork\x12$\n\x14\x65xternal_ipv6_prefix\x18\xf6\x92\xb6\x42 \x01(\tH\x00\x88\x01\x01\x12%\n\x14internal_ipv6_prefix\x18\xe8\xa2\xb4\xf1\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x02\x88\x01\x01\x12!\n\x10ipv6_access_type\x18\xdd\xf5\xd1\xf0\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x04\x88\x01\x01\x12\x18\n\x07purpose\x18\x9e\xfa\xef\x96\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04role\x18\xf6\x80\xd6\x01 \x01(\tH\x06\x88\x01\x01\x12W\n\x13secondary_ip_ranges\x18\xe3\xff\x94\x41 \x03(\x0b\x32\x37.google.cloud.compute.v1.UsableSubnetworkSecondaryRange\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\x07\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x08\x88\x01\x01\"S\n\x0eIpv6AccessType\x12\x1e\n\x1aUNDEFINED_IPV6_ACCESS_TYPE\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\"\xf8\x01\n\x07Purpose\x12\x15\n\x11UNDEFINED_PURPOSE\x10\x00\x12\x1b\n\x14GLOBAL_MANAGED_PROXY\x10\xf2\xcb\xe0p\x12#\n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\xd9\xb6\xcev\x12\x16\n\x0ePEER_MIGRATION\x10\x91\xaa\xc7\xea\x01\x12\x0f\n\x07PRIVATE\x10\xe3\xe2\xb2\xc0\x01\x12\x13\n\x0bPRIVATE_NAT\x10\xa5\xc8\xae\xaf\x01\x12\x17\n\x10PRIVATE_RFC_1918\x10\xdb\xfe\xc5y\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x1d\n\x16REGIONAL_MANAGED_PROXY\x10\xee\xb6\xfdH\":\n\x04Role\x12\x12\n\x0eUNDEFINED_ROLE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x06\x42\x41\x43KUP\x10\xc2\xd3\xcd\xa2\x01\"[\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%B\x17\n\x15_external_ipv6_prefixB\x17\n\x15_internal_ipv6_prefixB\x10\n\x0e_ip_cidr_rangeB\x13\n\x11_ipv6_access_typeB\n\n\x08_networkB\n\n\x08_purposeB\x07\n\x05_roleB\r\n\x0b_stack_typeB\r\n\x0b_subnetwork\"}\n\x1eUsableSubnetworkSecondaryRange\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nrange_name\x18\xcd\xf0\xb4\x9e\x01 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\r\n\x0b_range_name\"\xbc\x02\n\x1fUsableSubnetworksAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.UsableSubnetwork\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x7f\n\x13UsageExportLocation\x12\x1c\n\x0b\x62ucket_name\x18\xc0\x97\x9e\x87\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12report_name_prefix\x18\xbb\xb0\xd7\x98\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\x15\n\x13_report_name_prefix\"\xda\x01\n\x1bValidateRegionUrlMapRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12p\n)region_url_maps_validate_request_resource\x18\x9a\xcc\x80\x1b \x01(\x0b\x32\x35.google.cloud.compute.v1.RegionUrlMapsValidateRequestB\x03\xe0\x41\x02\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x15ValidateUrlMapRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"url_maps_validate_request_resource\x18\xef\xd1\xe4\xbc\x01 \x01(\x0b\x32/.google.cloud.compute.v1.UrlMapsValidateRequestB\x03\xe0\x41\x02\"\xaf\x01\n\x15VmEndpointNatMappings\x12\x1d\n\rinstance_name\x18\xf5\xe7\xd8l \x01(\tH\x00\x88\x01\x01\x12\x65\n\x16interface_nat_mappings\x18\x89\x80\x95z \x03(\x0b\x32\x42.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsB\x10\n\x0e_instance_name\"\xe2\x03\n)VmEndpointNatMappingsInterfaceNatMappings\x12$\n\x18\x64rain_nat_ip_port_ranges\x18\xc1\xe3\xc7\xbc\x01 \x03(\t\x12\x1e\n\x12nat_ip_port_ranges\x18\x9a\xb0\xcc\xfd\x01 \x03(\t\x12*\n\x19num_total_drain_nat_ports\x18\xf9\xa5\xff\x9f\x01 \x01(\x05H\x00\x88\x01\x01\x12$\n\x13num_total_nat_ports\x18\x80\xdb\x80\x8f\x01 \x01(\x05H\x01\x88\x01\x01\x12l\n\rrule_mappings\x18\xc8\xee\xea\xe7\x01 \x03(\x0b\x32Q.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings\x12&\n\x15source_alias_ip_range\x18\xd8\xa3\xfc\xd1\x01 \x01(\tH\x02\x88\x01\x01\x12!\n\x11source_virtual_ip\x18\xff\xa2\xb9G \x01(\tH\x03\x88\x01\x01\x42\x1c\n\x1a_num_total_drain_nat_portsB\x16\n\x14_num_total_nat_portsB\x18\n\x16_source_alias_ip_rangeB\x14\n\x12_source_virtual_ip\"\xb6\x02\n8VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings\x12$\n\x18\x64rain_nat_ip_port_ranges\x18\xc1\xe3\xc7\xbc\x01 \x03(\t\x12\x1e\n\x12nat_ip_port_ranges\x18\x9a\xb0\xcc\xfd\x01 \x03(\t\x12*\n\x19num_total_drain_nat_ports\x18\xf9\xa5\xff\x9f\x01 \x01(\x05H\x00\x88\x01\x01\x12$\n\x13num_total_nat_ports\x18\x80\xdb\x80\x8f\x01 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0brule_number\x18\xec\xdb\x9a\xff\x01 \x01(\x05H\x02\x88\x01\x01\x42\x1c\n\x1a_num_total_drain_nat_portsB\x16\n\x14_num_total_nat_portsB\x0e\n\x0c_rule_number\"\xbc\x02\n\x19VmEndpointNatMappingsList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x41\n\x06result\x18\x9d\x90\xb7\x42 \x03(\x0b\x32..google.cloud.compute.v1.VmEndpointNatMappings\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xd2\x06\n\nVpnGateway\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12gateway_ip_version\x18\x9b\xed\x83\x1f \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x05\x88\x01\x01\x12\x43\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32/.google.cloud.compute.v1.VpnGateway.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\n\x88\x01\x01\x12Q\n\x0evpn_interfaces\x18\x85\xcd\xe5+ \x03(\x0b\x32\x36.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"N\n\x10GatewayIpVersion\x12 \n\x1cUNDEFINED_GATEWAY_IP_VERSION\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\"[\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x15\n\x13_gateway_ip_versionB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_linkB\r\n\x0b_stack_type\"\xbf\x03\n\x18VpnGatewayAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.VpnGatewayAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.VpnGatewaysScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0eVpnGatewayList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.VpnGateway\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"g\n\x10VpnGatewayStatus\x12S\n\x0fvpn_connections\x18\x8a\xed\xbe\xd1\x01 \x03(\x0b\x32\x36.google.cloud.compute.v1.VpnGatewayStatusVpnConnection\"\xd1\x02\n0VpnGatewayStatusHighAvailabilityRequirementState\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12unsatisfied_reason\x18\x8a\xf7\x9d\x1a \x01(\tH\x01\x88\x01\x01\"f\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12!\n\x19\x43ONNECTION_REDUNDANCY_MET\x10\x9b\xca\xf5\xf0\x01\x12%\n\x1d\x43ONNECTION_REDUNDANCY_NOT_MET\x10\x8f\xd4\x89\xf4\x01\"Y\n\x11UnsatisfiedReason\x12 \n\x1cUNDEFINED_UNSATISFIED_REASON\x10\x00\x12\"\n\x1bINCOMPLETE_TUNNELS_COVERAGE\x10\xfd\xf6\xd4\x1a\x42\x08\n\x06_stateB\x15\n\x13_unsatisfied_reason\"\xcb\x01\n\x16VpnGatewayStatusTunnel\x12\'\n\x17local_gateway_interface\x18\xaa\x9a\xdaK \x01(\rH\x00\x88\x01\x01\x12&\n\x16peer_gateway_interface\x18\xe1\xde\x9c\x66 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\ntunnel_url\x18\x98\xa2\xd4% \x01(\tH\x02\x88\x01\x01\x42\x1a\n\x18_local_gateway_interfaceB\x19\n\x17_peer_gateway_interfaceB\r\n\x0b_tunnel_url\"\xca\x02\n\x1dVpnGatewayStatusVpnConnection\x12&\n\x15peer_external_gateway\x18\x8d\xee\xc7\xb7\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x10peer_gcp_gateway\x18\xbc\xe9\xb3\x86\x01 \x01(\tH\x01\x88\x01\x01\x12`\n\x05state\x18\x91\x89\xab\x34 \x01(\x0b\x32I.google.cloud.compute.v1.VpnGatewayStatusHighAvailabilityRequirementStateH\x02\x88\x01\x01\x12\x43\n\x07tunnels\x18\x8b\xfa\xed\x31 \x03(\x0b\x32/.google.cloud.compute.v1.VpnGatewayStatusTunnelB\x18\n\x16_peer_external_gatewayB\x13\n\x11_peer_gcp_gatewayB\x08\n\x06_state\"\xda\x01\n\x1dVpnGatewayVpnGatewayInterface\x12\x10\n\x02id\x18\x9b\x1a \x01(\rH\x00\x88\x01\x01\x12(\n\x17interconnect_attachment\x18\xf4\x8a\xf7\x92\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x03\x88\x01\x01\x42\x05\n\x03_idB\x1a\n\x18_interconnect_attachmentB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_address\"l\n\x1cVpnGatewaysGetStatusResponse\x12\x41\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32).google.cloud.compute.v1.VpnGatewayStatusH\x00\x88\x01\x01\x42\t\n\x07_result\"\x9c\x01\n\x15VpnGatewaysScopedList\x12<\n\x0cvpn_gateways\x18\x9a\xfb\xca{ \x03(\x0b\x32#.google.cloud.compute.v1.VpnGateway\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x9b\x0c\n\tVpnTunnel\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12 \n\x0f\x64\x65tailed_status\x18\xe1\xa4\x83\x9f\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0bike_version\x18\x9c\xd0\x90h \x01(\x05H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x06\x88\x01\x01\x12\x42\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32..google.cloud.compute.v1.VpnTunnel.LabelsEntry\x12\"\n\x16local_traffic_selector\x18\xb5\xac\xa7\x97\x01 \x03(\t\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12&\n\x15peer_external_gateway\x18\x8d\xee\xc7\xb7\x01 \x01(\tH\x08\x88\x01\x01\x12\x30\n\x1fpeer_external_gateway_interface\x18\x87\xe5\xf2\xd7\x01 \x01(\x05H\t\x88\x01\x01\x12!\n\x10peer_gcp_gateway\x18\xbc\xe9\xb3\x86\x01 \x01(\tH\n\x88\x01\x01\x12\x18\n\x07peer_ip\x18\xa4\xda\xdf\xb6\x01 \x01(\tH\x0b\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0c\x88\x01\x01\x12#\n\x17remote_traffic_selector\x18\xba\xdd\x90\xab\x01 \x03(\t\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tH\r\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1e\n\rshared_secret\x18\xca\xa7\x8f\xb6\x01 \x01(\tH\x0f\x88\x01\x01\x12#\n\x12shared_secret_hash\x18\xe3\xe8\x99\xbe\x01 \x01(\tH\x10\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x11\x88\x01\x01\x12#\n\x12target_vpn_gateway\x18\xcb\x80\xf6\xfd\x01 \x01(\tH\x12\x88\x01\x01\x12\x1c\n\x0bvpn_gateway\x18\xf9\x83\xf6\xc1\x01 \x01(\tH\x13\x88\x01\x01\x12%\n\x15vpn_gateway_interface\x18\xf3\x8c\xe2- \x01(\x05H\x14\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd3\x02\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x1c\n\x14\x41LLOCATING_RESOURCES\x10\xc0\xc9\x83\x99\x01\x12\x1a\n\x13\x41UTHORIZATION_ERROR\x10\x82\x9d\x9f\x0b\x12\x16\n\x0e\x44\x45PROVISIONING\x10\xee\x93\xc4\xcc\x01\x12\x12\n\x0b\x45STABLISHED\x10\xf8\x8e\xaf*\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x16\n\x0f\x46IRST_HANDSHAKE\x10\xe8\xd9\xa1[\x12\x1b\n\x13NEGOTIATION_FAILURE\x10\xec\xc5\xe8\xab\x01\x12\x14\n\rNETWORK_ERROR\x10\xf7\xc0\xbb\\\x12\x1a\n\x13NO_INCOMING_PACKETS\x10\xf0\x98\x9b\x39\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x1e\n\x17WAITING_FOR_FULL_CONFIG\x10\xca\xc4\xed\x13\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x12\n\x10_detailed_statusB\x05\n\x03_idB\x0e\n\x0c_ike_versionB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\x18\n\x16_peer_external_gatewayB\"\n _peer_external_gateway_interfaceB\x13\n\x11_peer_gcp_gatewayB\n\n\x08_peer_ipB\t\n\x07_regionB\t\n\x07_routerB\x0c\n\n_self_linkB\x10\n\x0e_shared_secretB\x15\n\x13_shared_secret_hashB\t\n\x07_statusB\x15\n\x13_target_vpn_gatewayB\x0e\n\x0c_vpn_gatewayB\x18\n\x16_vpn_gateway_interface\"\xbc\x03\n\x17VpnTunnelAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12M\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32;.google.cloud.compute.v1.VpnTunnelAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a[\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.compute.v1.VpnTunnelsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa3\x02\n\rVpnTunnelList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x34\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\".google.cloud.compute.v1.VpnTunnel\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x99\x01\n\x14VpnTunnelsScopedList\x12:\n\x0bvpn_tunnels\x18\xc0\xf1\xfaM \x03(\x0b\x32\".google.cloud.compute.v1.VpnTunnel\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x8c\x01\n\x10WafExpressionSet\x12\x12\n\x07\x61liases\x18\xfe\x9d\xf5K \x03(\t\x12K\n\x0b\x65xpressions\x18\xdb\x81\xdbS \x03(\x0b\x32\x33.google.cloud.compute.v1.WafExpressionSetExpression\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x42\x05\n\x03_id\"b\n\x1aWafExpressionSetExpression\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bsensitivity\x18\x9f\xbd\x90\r \x01(\x05H\x01\x88\x01\x01\x42\x05\n\x03_idB\x0e\n\x0c_sensitivity\"P\n\x1aWaitGlobalOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"h\n\x1aWaitRegionOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"d\n\x18WaitZoneOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xfd\x08\n\x07Warning\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x04\x64\x61ta\x18\xaa\xdf\xbb\x01 \x03(\x0b\x32\x1d.google.cloud.compute.v1.Data\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\"\xfc\x07\n\x04\x43ode\x12\x12\n\x0eUNDEFINED_CODE\x10\x00\x12\x15\n\x0e\x43LEANUP_FAILED\x10\xd8\x8c\xd6G\x12 \n\x18\x44\x45PRECATED_RESOURCE_USED\x10\xc2\xdf\xeb\xba\x01\x12\x1c\n\x14\x44\x45PRECATED_TYPE_USED\x10\x96\xa4\x9e\xa5\x01\x12(\n DISK_SIZE_LARGER_THAN_IMAGE_SIZE\x10\x97\x81\x95\xb0\x01\x12\x1e\n\x16\x45XPERIMENTAL_TYPE_USED\x10\x8b\x8e\xc1\xd7\x01\x12\x1b\n\x14\x45XTERNAL_API_WARNING\x10\xc3\xbf\xdaS\x12\x1d\n\x15\x46IELD_VALUE_OVERRIDEN\x10\xaf\xb6\x99\x9d\x01\x12#\n\x1bINJECTED_KERNELS_DEPRECATED\x10\x8b\xd9\x82\xc7\x01\x12\x34\n,INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB\x10\xce\x9b\xbc\xbf\x01\x12 \n\x18LARGE_DEPLOYMENT_WARNING\x10\xa6\xe7\xc8\xe5\x01\x12!\n\x1aLIST_OVERHEAD_QUOTA_EXCEED\x10\xc5\xb0\xda\x16\x12\x1f\n\x17MISSING_TYPE_DEPENDENCY\x10\xf7\xf8\xa2\xa4\x01\x12%\n\x1dNEXT_HOP_ADDRESS_NOT_ASSIGNED\x10\x87\xa5\xfa\x9a\x01\x12\"\n\x1aNEXT_HOP_CANNOT_IP_FORWARD\x10\xe7\xea\xe7\xb6\x01\x12.\n\'NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE\x10\x92\xe8\xfc\x45\x12#\n\x1bNEXT_HOP_INSTANCE_NOT_FOUND\x10\xce\xcc\xaf\xdd\x01\x12\'\n NEXT_HOP_INSTANCE_NOT_ON_NETWORK\x10\xc2\xe8\x9dt\x12\x1c\n\x14NEXT_HOP_NOT_RUNNING\x10\xb1\xcf\xf0\xc6\x01\x12\x19\n\x12NOT_CRITICAL_ERROR\x10\xd4\xa8\xb7\x32\x12\x19\n\x12NO_RESULTS_ON_PAGE\x10\x88\xa6\xa9\x0e\x12\x16\n\x0fPARTIAL_SUCCESS\x10\x85\xae\x87\x13\x12\x1e\n\x16QUOTA_INFO_UNAVAILABLE\x10\xa6\xd2\x8c\x91\x01\x12\x1d\n\x16REQUIRED_TOS_AGREEMENT\x10\x83\xce\xe4\x01\x12\x31\n)RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING\x10\xc1\xf4\xed\xec\x01\x12\x1b\n\x14RESOURCE_NOT_DELETED\x10\xbc\xb7\xb2P\x12!\n\x19SCHEMA_VALIDATION_IGNORED\x10\xca\xd4\x9f\x83\x01\x12(\n!SINGLE_INSTANCE_PROPERTY_TEMPLATE\x10\xd1\x89\xf8\x7f\x12\x1d\n\x15UNDECLARED_PROPERTIES\x10\x9f\x86\x9b\xba\x01\x12\x12\n\x0bUNREACHABLE\x10\xb4\xbd\xad\x06\x42\x07\n\x05_codeB\n\n\x08_message\"\xfe\x08\n\x08Warnings\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x04\x64\x61ta\x18\xaa\xdf\xbb\x01 \x03(\x0b\x32\x1d.google.cloud.compute.v1.Data\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\"\xfc\x07\n\x04\x43ode\x12\x12\n\x0eUNDEFINED_CODE\x10\x00\x12\x15\n\x0e\x43LEANUP_FAILED\x10\xd8\x8c\xd6G\x12 \n\x18\x44\x45PRECATED_RESOURCE_USED\x10\xc2\xdf\xeb\xba\x01\x12\x1c\n\x14\x44\x45PRECATED_TYPE_USED\x10\x96\xa4\x9e\xa5\x01\x12(\n DISK_SIZE_LARGER_THAN_IMAGE_SIZE\x10\x97\x81\x95\xb0\x01\x12\x1e\n\x16\x45XPERIMENTAL_TYPE_USED\x10\x8b\x8e\xc1\xd7\x01\x12\x1b\n\x14\x45XTERNAL_API_WARNING\x10\xc3\xbf\xdaS\x12\x1d\n\x15\x46IELD_VALUE_OVERRIDEN\x10\xaf\xb6\x99\x9d\x01\x12#\n\x1bINJECTED_KERNELS_DEPRECATED\x10\x8b\xd9\x82\xc7\x01\x12\x34\n,INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB\x10\xce\x9b\xbc\xbf\x01\x12 \n\x18LARGE_DEPLOYMENT_WARNING\x10\xa6\xe7\xc8\xe5\x01\x12!\n\x1aLIST_OVERHEAD_QUOTA_EXCEED\x10\xc5\xb0\xda\x16\x12\x1f\n\x17MISSING_TYPE_DEPENDENCY\x10\xf7\xf8\xa2\xa4\x01\x12%\n\x1dNEXT_HOP_ADDRESS_NOT_ASSIGNED\x10\x87\xa5\xfa\x9a\x01\x12\"\n\x1aNEXT_HOP_CANNOT_IP_FORWARD\x10\xe7\xea\xe7\xb6\x01\x12.\n\'NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE\x10\x92\xe8\xfc\x45\x12#\n\x1bNEXT_HOP_INSTANCE_NOT_FOUND\x10\xce\xcc\xaf\xdd\x01\x12\'\n NEXT_HOP_INSTANCE_NOT_ON_NETWORK\x10\xc2\xe8\x9dt\x12\x1c\n\x14NEXT_HOP_NOT_RUNNING\x10\xb1\xcf\xf0\xc6\x01\x12\x19\n\x12NOT_CRITICAL_ERROR\x10\xd4\xa8\xb7\x32\x12\x19\n\x12NO_RESULTS_ON_PAGE\x10\x88\xa6\xa9\x0e\x12\x16\n\x0fPARTIAL_SUCCESS\x10\x85\xae\x87\x13\x12\x1e\n\x16QUOTA_INFO_UNAVAILABLE\x10\xa6\xd2\x8c\x91\x01\x12\x1d\n\x16REQUIRED_TOS_AGREEMENT\x10\x83\xce\xe4\x01\x12\x31\n)RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING\x10\xc1\xf4\xed\xec\x01\x12\x1b\n\x14RESOURCE_NOT_DELETED\x10\xbc\xb7\xb2P\x12!\n\x19SCHEMA_VALIDATION_IGNORED\x10\xca\xd4\x9f\x83\x01\x12(\n!SINGLE_INSTANCE_PROPERTY_TEMPLATE\x10\xd1\x89\xf8\x7f\x12\x1d\n\x15UNDECLARED_PROPERTIES\x10\x9f\x86\x9b\xba\x01\x12\x12\n\x0bUNREACHABLE\x10\xb4\xbd\xad\x06\x42\x07\n\x05_codeB\n\n\x08_message\"\xcf\x01\n\x16WeightedBackendService\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tH\x00\x88\x01\x01\x12I\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32).google.cloud.compute.v1.HttpHeaderActionH\x01\x88\x01\x01\x12\x17\n\x06weight\x18\xf8\x84\xc5\x86\x01 \x01(\rH\x02\x88\x01\x01\x42\x12\n\x10_backend_serviceB\x10\n\x0e_header_actionB\t\n\x07_weight\"\xa0\x01\n&WithdrawPublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbf\x01\n%WithdrawPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9f\x02\n\x0bXpnHostList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x32\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32 .google.cloud.compute.v1.Project\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x9a\x01\n\rXpnResourceId\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x01\x88\x01\x01\"Q\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x0f\n\x07PROJECT\x10\xf9\xad\xef\xc2\x01\x12$\n\x1dXPN_RESOURCE_TYPE_UNSPECIFIED\x10\xfa\xad\xa5HB\x05\n\x03_idB\x07\n\x05_type\"\x97\x04\n\x04Zone\x12\"\n\x17\x61vailable_cpu_platforms\x18\x93\xf3\xd9S \x03(\t\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0csupports_pzs\x18\xee\xf6\x85( \x01(\x08H\t\x88\x01\x01\"4\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x07\n\x02UP\x10\x9b\x15\x42\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_statusB\x0f\n\r_supports_pzs\"\x99\x02\n\x08ZoneList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12/\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1d.google.cloud.compute.v1.Zone\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xcd\x01\n\x14ZoneSetLabelsRequest\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x00\x88\x01\x01\x12M\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x39.google.cloud.compute.v1.ZoneSetLabelsRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_label_fingerprint\"\xb1\x01\n\x14ZoneSetPolicyRequest\x12\x36\n\x08\x62indings\x18\x8e\xc5\xa4\xc0\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Binding\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06policy\x18\xb2\xca\xb6+ \x01(\x0b\x32\x1f.google.cloud.compute.v1.PolicyH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_policy2\xb3\x06\n\x10\x41\x63\x63\x65leratorTypes\x12\xd6\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest\x1a\x36.google.cloud.compute.v1.AcceleratorTypeAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/acceleratorTypes\x12\xdc\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetAcceleratorTypeRequest\x1a(.google.cloud.compute.v1.AcceleratorType\"w\xda\x41\x1dproject,zone,accelerator_type\x82\xd3\xe4\x93\x02Q\x12O/compute/v1/projects/{project}/zones/{zone}/acceleratorTypes/{accelerator_type}\x12\xbf\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListAcceleratorTypesRequest\x1a,.google.cloud.compute.v1.AcceleratorTypeList\"S\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02>\x12project,zone,disk,disks_add_resource_policies_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02|\"L/compute/v1/projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies:,disks_add_resource_policies_request_resource\x12\xb5\x01\n\x0e\x41ggregatedList\x12\x33.google.cloud.compute.v1.AggregatedListDisksRequest\x1a+.google.cloud.compute.v1.DiskAggregatedList\"A\xda\x41\x07project\x82\xd3\xe4\x93\x02\x31\x12//compute/v1/projects/{project}/aggregated/disks\x12\x8e\x02\n\nBulkInsert\x12..google.cloud.compute.v1.BulkInsertDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x01\xda\x41/project,zone,bulk_insert_disk_resource_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x62\".google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest\x1a\x41.google.cloud.compute.v1.FirewallPoliciesListAssociationsResponse\"I\xda\x41\x00\x82\xd3\xe4\x93\x02@\x12>/compute/v1/locations/global/firewallPolicies/listAssociations\x12\xe8\x01\n\x04Move\x12\x32.google.cloud.compute.v1.MoveFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41\x19\x66irewall_policy,parent_id\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02\x46\"D/compute/v1/locations/global/firewallPolicies/{firewall_policy}/move\x12\x8e\x02\n\x05Patch\x12\x33.google.cloud.compute.v1.PatchFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x01\xda\x41(firewall_policy,firewall_policy_resource\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02[2?/compute/v1/locations/global/firewallPolicies/{firewall_policy}:\x18\x66irewall_policy_resource\x12\xaa\x02\n\tPatchRule\x12\x37.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xbf\x01\xda\x41-firewall_policy,firewall_policy_rule_resource\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02j\"I/compute/v1/locations/global/firewallPolicies/{firewall_policy}/patchRule:\x1d\x66irewall_policy_rule_resource\x12\x85\x02\n\x11RemoveAssociation\x12?.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x8a\x01\xda\x41\x0f\x66irewall_policy\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02S\"Q/compute/v1/locations/global/firewallPolicies/{firewall_policy}/removeAssociation\x12\xf0\x01\n\nRemoveRule\x12\x38.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x83\x01\xda\x41\x0f\x66irewall_policy\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02L\"J/compute/v1/locations/global/firewallPolicies/{firewall_policy}/removeRule\x12\xa7\x02\n\x0cSetIamPolicy\x12:.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb9\x01\xda\x41\x38resource,global_organization_set_policy_request_resource\x82\xd3\xe4\x93\x02x\"E/compute/v1/locations/global/firewallPolicies/{resource}/setIamPolicy:/global_organization_set_policy_request_resource\x12\xae\x02\n\x12TestIamPermissions\x12@.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xa3\x01\xda\x41*resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02p\"K/compute/v1/locations/global/firewallPolicies/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xcf\n\n\tFirewalls\x12\xc6\x01\n\x06\x44\x65lete\x12..google.cloud.compute.v1.DeleteFirewallRequest\x1a\".google.cloud.compute.v1.Operation\"h\xda\x41\x10project,firewall\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02<*:/compute/v1/projects/{project}/global/firewalls/{firewall}\x12\xac\x01\n\x03Get\x12+.google.cloud.compute.v1.GetFirewallRequest\x1a!.google.cloud.compute.v1.Firewall\"U\xda\x41\x10project,firewall\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/global/firewalls/{firewall}\x12\xd7\x01\n\x06Insert\x12..google.cloud.compute.v1.InsertFirewallRequest\x1a\".google.cloud.compute.v1.Operation\"y\xda\x41\x19project,firewall_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x44\"//compute/v1/projects/{project}/global/firewalls:\x11\x66irewall_resource\x12\x9f\x01\n\x04List\x12-.google.cloud.compute.v1.ListFirewallsRequest\x1a%.google.cloud.compute.v1.FirewallList\"A\xda\x41\x07project\x82\xd3\xe4\x93\x02\x31\x12//compute/v1/projects/{project}/global/firewalls\x12\xea\x01\n\x05Patch\x12-.google.cloud.compute.v1.PatchFirewallRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\"project,firewall,firewall_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02O2:/compute/v1/projects/{project}/global/firewalls/{firewall}:\x11\x66irewall_resource\x12\xec\x01\n\x06Update\x12..google.cloud.compute.v1.UpdateFirewallRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\"project,firewall,firewall_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02O\x1a:/compute/v1/projects/{project}/global/firewalls/{firewall}:\x11\x66irewall_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x99\x11\n\x0f\x46orwardingRules\x12\xd3\x01\n\x0e\x41ggregatedList\x12=.google.cloud.compute.v1.AggregatedListForwardingRulesRequest\x1a\x35.google.cloud.compute.v1.ForwardingRuleAggregatedList\"K\xda\x41\x07project\x82\xd3\xe4\x93\x02;\x12\x39/compute/v1/projects/{project}/aggregated/forwardingRules\x12\xf2\x01\n\x06\x44\x65lete\x12\x34.google.cloud.compute.v1.DeleteForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\x1eproject,region,forwarding_rule\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S*Q/compute/v1/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\x12\xdd\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetForwardingRuleRequest\x1a\'.google.cloud.compute.v1.ForwardingRule\"z\xda\x41\x1eproject,region,forwarding_rule\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\x12\x83\x02\n\x06Insert\x12\x34.google.cloud.compute.v1.InsertForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\x9e\x01\xda\x41\'project,region,forwarding_rule_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02[\"?/compute/v1/projects/{project}/regions/{region}/forwardingRules:\x18\x66orwarding_rule_resource\x12\xc2\x01\n\x04List\x12\x33.google.cloud.compute.v1.ListForwardingRulesRequest\x1a+.google.cloud.compute.v1.ForwardingRuleList\"X\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x41\x12?/compute/v1/projects/{project}/regions/{region}/forwardingRules\x12\xa3\x02\n\x05Patch\x12\x33.google.cloud.compute.v1.PatchForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41\x37project,region,forwarding_rule,forwarding_rule_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02m2Q/compute/v1/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}:\x18\x66orwarding_rule_resource\x12\xbb\x02\n\tSetLabels\x12\x37.google.cloud.compute.v1.SetLabelsForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xd0\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02z\"T/compute/v1/projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels:\"region_set_labels_request_resource\x12\xb7\x02\n\tSetTarget\x12\x37.google.cloud.compute.v1.SetTargetForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xcc\x01\xda\x41\x38project,region,forwarding_rule,target_reference_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02x\"[/compute/v1/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}/setTarget:\x19target_reference_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc9\x0b\n\x0fGlobalAddresses\x12\xc9\x01\n\x06\x44\x65lete\x12\x33.google.cloud.compute.v1.DeleteGlobalAddressRequest\x1a\".google.cloud.compute.v1.Operation\"f\xda\x41\x0fproject,address\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02;*9/compute/v1/projects/{project}/global/addresses/{address}\x12\xae\x01\n\x03Get\x12\x30.google.cloud.compute.v1.GetGlobalAddressRequest\x1a .google.cloud.compute.v1.Address\"S\xda\x41\x0fproject,address\x82\xd3\xe4\x93\x02;\x12\x39/compute/v1/projects/{project}/global/addresses/{address}\x12\xda\x01\n\x06Insert\x12\x33.google.cloud.compute.v1.InsertGlobalAddressRequest\x1a\".google.cloud.compute.v1.Operation\"w\xda\x41\x18project,address_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x43\"//compute/v1/projects/{project}/global/addresses:\x10\x61\x64\x64ress_resource\x12\xa4\x01\n\x04List\x12\x33.google.cloud.compute.v1.ListGlobalAddressesRequest\x1a$.google.cloud.compute.v1.AddressList\"A\xda\x41\x07project\x82\xd3\xe4\x93\x02\x31\x12//compute/v1/projects/{project}/global/addresses\x12\x9a\x02\n\x04Move\x12\x31.google.cloud.compute.v1.MoveGlobalAddressRequest\x1a\".google.cloud.compute.v1.Operation\"\xba\x01\xda\x41\x36project,address,global_addresses_move_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02h\">/compute/v1/projects/{project}/global/addresses/{address}/move:&global_addresses_move_request_resource\x12\xa3\x02\n\tSetLabels\x12\x36.google.cloud.compute.v1.SetLabelsGlobalAddressRequest\x1a\".google.cloud.compute.v1.Operation\"\xb9\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02j\"D/compute/v1/projects/{project}/global/addresses/{resource}/setLabels:\"global_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xfb\x0e\n\x15GlobalForwardingRules\x12\xe6\x01\n\x06\x44\x65lete\x12:.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"|\xda\x41\x17project,forwarding_rule\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02I*G/compute/v1/projects/{project}/global/forwardingRules/{forwarding_rule}\x12\xd2\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetGlobalForwardingRuleRequest\x1a\'.google.cloud.compute.v1.ForwardingRule\"i\xda\x41\x17project,forwarding_rule\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/global/forwardingRules/{forwarding_rule}\x12\xf8\x01\n\x06Insert\x12:.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41 project,forwarding_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02Q\"5/compute/v1/projects/{project}/global/forwardingRules:\x18\x66orwarding_rule_resource\x12\xb7\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListGlobalForwardingRulesRequest\x1a+.google.cloud.compute.v1.ForwardingRuleList\"G\xda\x41\x07project\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/global/forwardingRules\x12\x98\x02\n\x05Patch\x12\x39.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xaf\x01\xda\x41\x30project,forwarding_rule,forwarding_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x63\x32G/compute/v1/projects/{project}/global/forwardingRules/{forwarding_rule}:\x18\x66orwarding_rule_resource\x12\xb0\x02\n\tSetLabels\x12=.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xbf\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02p\"J/compute/v1/projects/{project}/global/forwardingRules/{resource}/setLabels:\"global_set_labels_request_resource\x12\xac\x02\n\tSetTarget\x12=.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xbb\x01\xda\x41\x31project,forwarding_rule,target_reference_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02n\"Q/compute/v1/projects/{project}/global/forwardingRules/{forwarding_rule}/setTarget:\x19target_reference_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xac\x12\n\x1bGlobalNetworkEndpointGroups\x12\xbc\x03\n\x16\x41ttachNetworkEndpoints\x12P.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x02\xda\x41_project,network_endpoint_group,global_network_endpoint_groups_attach_endpoints_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\xaf\x01\"k/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}/attachNetworkEndpoints:@global_network_endpoint_groups_attach_endpoints_request_resource\x12\x81\x02\n\x06\x44\x65lete\x12@.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\x1eproject,network_endpoint_group\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02V*T/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}\x12\xbc\x03\n\x16\x44\x65tachNetworkEndpoints\x12P.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x02\xda\x41_project,network_endpoint_group,global_network_endpoint_groups_detach_endpoints_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\xaf\x01\"k/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}/detachNetworkEndpoints:@global_network_endpoint_groups_detach_endpoints_request_resource\x12\xf2\x01\n\x03Get\x12=.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest\x1a-.google.cloud.compute.v1.NetworkEndpointGroup\"}\xda\x41\x1eproject,network_endpoint_group\x82\xd3\xe4\x93\x02V\x12T/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}\x12\x92\x02\n\x06Insert\x12@.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41\'project,network_endpoint_group_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02^\";/compute/v1/projects/{project}/global/networkEndpointGroups:\x1fnetwork_endpoint_group_resource\x12\xc9\x01\n\x04List\x12?.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest\x1a\x31.google.cloud.compute.v1.NetworkEndpointGroupList\"M\xda\x41\x07project\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/global/networkEndpointGroups\x12\xc0\x02\n\x14ListNetworkEndpoints\x12O.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest\x1a\x42.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints\"\x92\x01\xda\x41\x1eproject,network_endpoint_group\x82\xd3\xe4\x93\x02k\"i/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}/listNetworkEndpoints\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xd0\x08\n\x10GlobalOperations\x12\xca\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest\x1a\x30.google.cloud.compute.v1.OperationAggregatedList\"F\xda\x41\x07project\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/aggregated/operations\x12\xd1\x01\n\x06\x44\x65lete\x12\x35.google.cloud.compute.v1.DeleteGlobalOperationRequest\x1a\x36.google.cloud.compute.v1.DeleteGlobalOperationResponse\"X\xda\x41\x11project,operation\x82\xd3\xe4\x93\x02>*\x12.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest\x1a\".google.cloud.compute.v1.Operation\"J\xda\x41\toperation\x90N\x01\x82\xd3\xe4\x93\x02\x35\x12\x33/compute/v1/locations/global/operations/{operation}\x12\xa4\x01\n\x04List\x12@.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest\x1a&.google.cloud.compute.v1.OperationList\"2\xda\x41\x00\x82\xd3\xe4\x93\x02)\x12\'/compute/v1/locations/global/operations\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xd1\x0b\n\x1dGlobalPublicDelegatedPrefixes\x12\x87\x02\n\x06\x44\x65lete\x12\x42.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\x94\x01\xda\x41\x1fproject,public_delegated_prefix\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02Y*W/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{public_delegated_prefix}\x12\xfa\x01\n\x03Get\x12?.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest\x1a..google.cloud.compute.v1.PublicDelegatedPrefix\"\x81\x01\xda\x41\x1fproject,public_delegated_prefix\x82\xd3\xe4\x93\x02Y\x12W/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{public_delegated_prefix}\x12\x98\x02\n\x06Insert\x12\x42.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x01\xda\x41(project,public_delegated_prefix_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x61\"=/compute/v1/projects/{project}/global/publicDelegatedPrefixes: public_delegated_prefix_resource\x12\xce\x01\n\x04List\x12\x41.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest\x1a\x32.google.cloud.compute.v1.PublicDelegatedPrefixList\"O\xda\x41\x07project\x82\xd3\xe4\x93\x02?\x12=/compute/v1/projects/{project}/global/publicDelegatedPrefixes\x12\xc8\x02\n\x05Patch\x12\x41.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xd7\x01\xda\x41@project,public_delegated_prefix,public_delegated_prefix_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02{2W/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{public_delegated_prefix}: public_delegated_prefix_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x83\r\n\x0cHealthChecks\x12\xcb\x01\n\x0e\x41ggregatedList\x12:.google.cloud.compute.v1.AggregatedListHealthChecksRequest\x1a\x33.google.cloud.compute.v1.HealthChecksAggregatedList\"H\xda\x41\x07project\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/aggregated/healthChecks\x12\xd4\x01\n\x06\x44\x65lete\x12\x31.google.cloud.compute.v1.DeleteHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"s\xda\x41\x14project,health_check\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x43*A/compute/v1/projects/{project}/global/healthChecks/{health_check}\x12\xbd\x01\n\x03Get\x12..google.cloud.compute.v1.GetHealthCheckRequest\x1a$.google.cloud.compute.v1.HealthCheck\"`\xda\x41\x14project,health_check\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/global/healthChecks/{health_check}\x12\xe6\x01\n\x06Insert\x12\x31.google.cloud.compute.v1.InsertHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\x84\x01\xda\x41\x1dproject,health_check_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02K\"2/compute/v1/projects/{project}/global/healthChecks:\x15health_check_resource\x12\xa8\x01\n\x04List\x12\x30.google.cloud.compute.v1.ListHealthChecksRequest\x1a(.google.cloud.compute.v1.HealthCheckList\"D\xda\x41\x07project\x82\xd3\xe4\x93\x02\x34\x12\x32/compute/v1/projects/{project}/global/healthChecks\x12\x80\x02\n\x05Patch\x12\x30.google.cloud.compute.v1.PatchHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\xa0\x01\xda\x41*project,health_check,health_check_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02Z2A/compute/v1/projects/{project}/global/healthChecks/{health_check}:\x15health_check_resource\x12\x82\x02\n\x06Update\x12\x31.google.cloud.compute.v1.UpdateHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\xa0\x01\xda\x41*project,health_check,health_check_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02Z\x1a\x41/compute/v1/projects/{project}/global/healthChecks/{health_check}:\x15health_check_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x84\x03\n\x10ImageFamilyViews\x12\xc8\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetImageFamilyViewRequest\x1a(.google.cloud.compute.v1.ImageFamilyView\"c\xda\x41\x13project,zone,family\x82\xd3\xe4\x93\x02G\x12\x45/compute/v1/projects/{project}/zones/{zone}/imageFamilyViews/{family}\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xfc\x13\n\x06Images\x12\xba\x01\n\x06\x44\x65lete\x12+.google.cloud.compute.v1.DeleteImageRequest\x1a\".google.cloud.compute.v1.Operation\"_\xda\x41\rproject,image\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x36*4/compute/v1/projects/{project}/global/images/{image}\x12\x84\x02\n\tDeprecate\x12..google.cloud.compute.v1.DeprecateImageRequest\x1a\".google.cloud.compute.v1.Operation\"\xa2\x01\xda\x41)project,image,deprecation_status_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02]\">/compute/v1/projects/{project}/global/images/{image}/deprecate:\x1b\x64\x65precation_status_resource\x12\x9d\x01\n\x03Get\x12(.google.cloud.compute.v1.GetImageRequest\x1a\x1e.google.cloud.compute.v1.Image\"L\xda\x41\rproject,image\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/global/images/{image}\x12\xba\x01\n\rGetFromFamily\x12\x32.google.cloud.compute.v1.GetFromFamilyImageRequest\x1a\x1e.google.cloud.compute.v1.Image\"U\xda\x41\x0eproject,family\x82\xd3\xe4\x93\x02>\x12\",/compute/v1/projects/{project}/global/images:\x0eimage_resource\x12\x96\x01\n\x04List\x12*.google.cloud.compute.v1.ListImagesRequest\x1a\".google.cloud.compute.v1.ImageList\">\xda\x41\x07project\x82\xd3\xe4\x93\x02.\x12,/compute/v1/projects/{project}/global/images\x12\xd7\x01\n\x05Patch\x12*.google.cloud.compute.v1.PatchImageRequest\x1a\".google.cloud.compute.v1.Operation\"~\xda\x41\x1cproject,image,image_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x46\x32\x34/compute/v1/projects/{project}/global/images/{image}:\x0eimage_resource\x12\x8b\x02\n\x0cSetIamPolicy\x12\x31.google.cloud.compute.v1.SetIamPolicyImageRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xa6\x01\xda\x41\x33project,resource,global_set_policy_request_resource\x82\xd3\xe4\x93\x02j\"D/compute/v1/projects/{project}/global/images/{resource}/setIamPolicy:\"global_set_policy_request_resource\x12\x98\x02\n\tSetLabels\x12..google.cloud.compute.v1.SetLabelsImageRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02g\"A/compute/v1/projects/{project}/global/images/{resource}/setLabels:\"global_set_labels_request_resource\x12\xac\x02\n\x12TestIamPermissions\x12\x37.google.cloud.compute.v1.TestIamPermissionsImageRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xaa\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02o\"J/compute/v1/projects/{project}/global/images/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xa2\x0e\n\"InstanceGroupManagerResizeRequests\x12\xc9\x02\n\x06\x43\x61ncel\x12G.google.cloud.compute.v1.CancelInstanceGroupManagerResizeRequestRequest\x1a\".google.cloud.compute.v1.Operation\"\xd1\x01\xda\x41\x32project,zone,instance_group_manager,resize_request\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x84\x01\"\x81\x01/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}/cancel\x12\xc0\x02\n\x06\x44\x65lete\x12G.google.cloud.compute.v1.DeleteInstanceGroupManagerResizeRequestRequest\x1a\".google.cloud.compute.v1.Operation\"\xc8\x01\xda\x41\x32project,zone,instance_group_manager,resize_request\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02|*z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}\x12\xc1\x02\n\x03Get\x12\x44.google.cloud.compute.v1.GetInstanceGroupManagerResizeRequestRequest\x1a:.google.cloud.compute.v1.InstanceGroupManagerResizeRequest\"\xb7\x01\xda\x41\x32project,zone,instance_group_manager,resize_request\x82\xd3\xe4\x93\x02|\x12z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}\x12\x80\x03\n\x06Insert\x12G.google.cloud.compute.v1.InsertInstanceGroupManagerResizeRequestRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x02\xda\x41Rproject,zone,instance_group_manager,instance_group_manager_resize_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x9b\x01\"i/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests:.instance_group_manager_resize_request_resource\x12\xb1\x02\n\x04List\x12\x46.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest\x1aG.google.cloud.compute.v1.InstanceGroupManagerResizeRequestsListResponse\"\x97\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02k\x12i/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xd5\x45\n\x15InstanceGroupManagers\x12\xa1\x03\n\x10\x41\x62\x61ndonInstances\x12\x44.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa2\x02\xda\x41^project,zone,instance_group_manager,instance_group_managers_abandon_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa9\x01\"k/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/abandonInstances::instance_group_managers_abandon_instances_request_resource\x12\xe5\x01\n\x0e\x41ggregatedList\x12\x43.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest\x1a;.google.cloud.compute.v1.InstanceGroupManagerAggregatedList\"Q\xda\x41\x07project\x82\xd3\xe4\x93\x02\x41\x12?/compute/v1/projects/{project}/aggregated/instanceGroupManagers\x12\xae\x03\n\x17\x41pplyUpdatesToInstances\x12K.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x02\xda\x41Zproject,zone,instance_group_manager,instance_group_managers_apply_updates_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xac\x01\"r/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/applyUpdatesToInstances:6instance_group_managers_apply_updates_request_resource\x12\x9c\x03\n\x0f\x43reateInstances\x12\x43.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x02\xda\x41]project,zone,instance_group_manager,instance_group_managers_create_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa7\x01\"j/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/createInstances:9instance_group_managers_create_instances_request_resource\x12\x84\x02\n\x06\x44\x65lete\x12:.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x99\x01\xda\x41#project,zone,instance_group_manager\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\\*Z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}\x12\x9c\x03\n\x0f\x44\x65leteInstances\x12\x43.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x02\xda\x41]project,zone,instance_group_manager,instance_group_managers_delete_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa7\x01\"j/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/deleteInstances:9instance_group_managers_delete_instances_request_resource\x12\xc5\x03\n\x18\x44\x65letePerInstanceConfigs\x12L.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x02\xda\x41\x64project,zone,instance_group_manager,instance_group_managers_delete_per_instance_configs_req_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xb7\x01\"s/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/deletePerInstanceConfigs:@instance_group_managers_delete_per_instance_configs_req_resource\x12\xf8\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetInstanceGroupManagerRequest\x1a-.google.cloud.compute.v1.InstanceGroupManager\"\x88\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02\\\x12Z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}\x12\x95\x02\n\x06Insert\x12:.google.cloud.compute.v1.InsertInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xaa\x01\xda\x41,project,zone,instance_group_manager_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x64\"A/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers:\x1finstance_group_manager_resource\x12\xce\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListInstanceGroupManagersRequest\x1a\x31.google.cloud.compute.v1.InstanceGroupManagerList\"X\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers\x12\xa5\x02\n\nListErrors\x12?.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest\x1a@.google.cloud.compute.v1.InstanceGroupManagersListErrorsResponse\"\x93\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02g\x12\x65/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/listErrors\x12\xcd\x02\n\x14ListManagedInstances\x12I.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest\x1aJ.google.cloud.compute.v1.InstanceGroupManagersListManagedInstancesResponse\"\x9d\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02q\"o/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/listManagedInstances\x12\xd1\x02\n\x16ListPerInstanceConfigs\x12K.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest\x1aH.google.cloud.compute.v1.InstanceGroupManagersListPerInstanceConfigsResp\"\x9f\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02s\"q/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/listPerInstanceConfigs\x12\xc3\x02\n\x05Patch\x12\x39.google.cloud.compute.v1.PatchInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xda\x01\xda\x41\x43project,zone,instance_group_manager,instance_group_manager_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02}2Z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}:\x1finstance_group_manager_resource\x12\xc0\x03\n\x17PatchPerInstanceConfigs\x12K.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xb3\x02\xda\x41\x63project,zone,instance_group_manager,instance_group_managers_patch_per_instance_configs_req_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xb5\x01\"r/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/patchPerInstanceConfigs:?instance_group_managers_patch_per_instance_configs_req_resource\x12\xa6\x03\n\x11RecreateInstances\x12\x45.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x02\xda\x41_project,zone,instance_group_manager,instance_group_managers_recreate_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xab\x01\"l/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/recreateInstances:;instance_group_managers_recreate_instances_request_resource\x12\x90\x02\n\x06Resize\x12:.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x01\xda\x41(project,zone,instance_group_manager,size\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x63\"a/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resize\x12\x9c\x03\n\x0fResumeInstances\x12\x43.google.cloud.compute.v1.ResumeInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x02\xda\x41]project,zone,instance_group_manager,instance_group_managers_resume_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa7\x01\"j/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resumeInstances:9instance_group_managers_resume_instances_request_resource\x12\xb2\x03\n\x13SetInstanceTemplate\x12G.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xad\x02\xda\x41\x62project,zone,instance_group_manager,instance_group_managers_set_instance_template_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xb0\x01\"n/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/setInstanceTemplate:>instance_group_managers_set_instance_template_request_resource\x12\x99\x03\n\x0eSetTargetPools\x12\x42.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9e\x02\xda\x41]project,zone,instance_group_manager,instance_group_managers_set_target_pools_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa6\x01\"i/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/setTargetPools:9instance_group_managers_set_target_pools_request_resource\x12\x97\x03\n\x0eStartInstances\x12\x42.google.cloud.compute.v1.StartInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9c\x02\xda\x41\\project,zone,instance_group_manager,instance_group_managers_start_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa5\x01\"i/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/startInstances:8instance_group_managers_start_instances_request_resource\x12\x92\x03\n\rStopInstances\x12\x41.google.cloud.compute.v1.StopInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x99\x02\xda\x41[project,zone,instance_group_manager,instance_group_managers_stop_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa3\x01\"h/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/stopInstances:7instance_group_managers_stop_instances_request_resource\x12\xa1\x03\n\x10SuspendInstances\x12\x44.google.cloud.compute.v1.SuspendInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa2\x02\xda\x41^project,zone,instance_group_manager,instance_group_managers_suspend_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa9\x01\"k/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/suspendInstances::instance_group_managers_suspend_instances_request_resource\x12\xc5\x03\n\x18UpdatePerInstanceConfigs\x12L.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x02\xda\x41\x64project,zone,instance_group_manager,instance_group_managers_update_per_instance_configs_req_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xb7\x01\"s/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/updatePerInstanceConfigs:@instance_group_managers_update_per_instance_configs_req_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf0\x14\n\x0eInstanceGroups\x12\xdf\x02\n\x0c\x41\x64\x64Instances\x12\x39.google.cloud.compute.v1.AddInstancesInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xef\x01\xda\x41Jproject,zone,instance_group,instance_groups_add_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8a\x01\"X/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}/addInstances:.instance_groups_add_instances_request_resource\x12\xd0\x01\n\x0e\x41ggregatedList\x12<.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest\x1a\x34.google.cloud.compute.v1.InstanceGroupAggregatedList\"J\xda\x41\x07project\x82\xd3\xe4\x93\x02:\x12\x38/compute/v1/projects/{project}/aggregated/instanceGroups\x12\xe6\x01\n\x06\x44\x65lete\x12\x33.google.cloud.compute.v1.DeleteInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x82\x01\xda\x41\x1bproject,zone,instance_group\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02M*K/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}\x12\xd2\x01\n\x03Get\x12\x30.google.cloud.compute.v1.GetInstanceGroupRequest\x1a&.google.cloud.compute.v1.InstanceGroup\"q\xda\x41\x1bproject,zone,instance_group\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}\x12\xf7\x01\n\x06Insert\x12\x33.google.cloud.compute.v1.InsertInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x93\x01\xda\x41$project,zone,instance_group_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02U\":/compute/v1/projects/{project}/zones/{zone}/instanceGroups:\x17instance_group_resource\x12\xb9\x01\n\x04List\x12\x32.google.cloud.compute.v1.ListInstanceGroupsRequest\x1a*.google.cloud.compute.v1.InstanceGroupList\"Q\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/zones/{zone}/instanceGroups\x12\xe6\x02\n\rListInstances\x12;.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest\x1a\x34.google.cloud.compute.v1.InstanceGroupsListInstances\"\xe1\x01\xda\x41Kproject,zone,instance_group,instance_groups_list_instances_request_resource\x82\xd3\xe4\x93\x02\x8c\x01\"Y/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}/listInstances:/instance_groups_list_instances_request_resource\x12\xee\x02\n\x0fRemoveInstances\x12<.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xf8\x01\xda\x41Mproject,zone,instance_group,instance_groups_remove_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x90\x01\"[/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}/removeInstances:1instance_groups_remove_instances_request_resource\x12\xe6\x02\n\rSetNamedPorts\x12:.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xf4\x01\xda\x41Lproject,zone,instance_group,instance_groups_set_named_ports_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8d\x01\"Y/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}/setNamedPorts:0instance_groups_set_named_ports_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xcb\x04\n\x17InstanceSettingsService\x12\xb9\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetInstanceSettingRequest\x1a).google.cloud.compute.v1.InstanceSettings\"S\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02>\x12project,zone,instance,network_interface,access_config_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02j\"P/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig:\x16\x61\x63\x63\x65ss_config_resource\x12\xe2\x02\n\x13\x41\x64\x64ResourcePolicies\x12;.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41\x46project,zone,instance,instances_add_resource_policies_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x88\x01\"T/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies:0instances_add_resource_policies_request_resource\x12\xc1\x01\n\x0e\x41ggregatedList\x12\x37.google.cloud.compute.v1.AggregatedListInstancesRequest\x1a/.google.cloud.compute.v1.InstanceAggregatedList\"E\xda\x41\x07project\x82\xd3\xe4\x93\x02\x35\x12\x33/compute/v1/projects/{project}/aggregated/instances\x12\x92\x02\n\nAttachDisk\x12\x32.google.cloud.compute.v1.AttachDiskInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x01\xda\x41,project,zone,instance,attached_disk_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x65\"K/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/attachDisk:\x16\x61ttached_disk_resource\x12\x9e\x02\n\nBulkInsert\x12\x32.google.cloud.compute.v1.BulkInsertInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xb7\x01\xda\x41\x33project,zone,bulk_insert_instance_resource_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02j\"@/compute/v1/projects/{project}/zones/{zone}/instances/bulkInsert:&bulk_insert_instance_resource_resource\x12\xcf\x01\n\x06\x44\x65lete\x12..google.cloud.compute.v1.DeleteInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"q\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x42*@/compute/v1/projects/{project}/zones/{zone}/instances/{instance}\x12\x9b\x02\n\x12\x44\x65leteAccessConfig\x12:.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xa4\x01\xda\x41\x35project,zone,instance,access_config,network_interface\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02U\"S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig\x12\xef\x01\n\nDetachDisk\x12\x32.google.cloud.compute.v1.DetachDiskInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41!project,zone,instance,device_name\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02M\"K/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/detachDisk\x12\xb7\x01\n\x03Get\x12+.google.cloud.compute.v1.GetInstanceRequest\x1a!.google.cloud.compute.v1.Instance\"`\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/zones/{zone}/instances/{instance}\x12\xa2\x02\n\x15GetEffectiveFirewalls\x12=.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest\x1a?.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponse\"\x88\x01\xda\x41\'project,zone,instance,network_interface\x82\xd3\xe4\x93\x02X\x12V/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls\x12\xef\x01\n\x12GetGuestAttributes\x12:.google.cloud.compute.v1.GetGuestAttributesInstanceRequest\x1a(.google.cloud.compute.v1.GuestAttributes\"s\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes\x12\xd4\x01\n\x0cGetIamPolicy\x12\x34.google.cloud.compute.v1.GetIamPolicyInstanceRequest\x1a\x1f.google.cloud.compute.v1.Policy\"m\xda\x41\x15project,zone,resource\x82\xd3\xe4\x93\x02O\x12M/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy\x12\xd8\x01\n\rGetScreenshot\x12\x35.google.cloud.compute.v1.GetScreenshotInstanceRequest\x1a#.google.cloud.compute.v1.Screenshot\"k\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/screenshot\x12\xea\x01\n\x13GetSerialPortOutput\x12;.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest\x1a).google.cloud.compute.v1.SerialPortOutput\"k\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/serialPort\x12\x93\x02\n\x1bGetShieldedInstanceIdentity\x12\x43.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest\x1a\x31.google.cloud.compute.v1.ShieldedInstanceIdentity\"|\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02^\x12\\/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity\x12\xe1\x01\n\x06Insert\x12..google.cloud.compute.v1.InsertInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x82\x01\xda\x41\x1eproject,zone,instance_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02J\"5/compute/v1/projects/{project}/zones/{zone}/instances:\x11instance_resource\x12\xaa\x01\n\x04List\x12-.google.cloud.compute.v1.ListInstancesRequest\x1a%.google.cloud.compute.v1.InstanceList\"L\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/zones/{zone}/instances\x12\xe3\x01\n\rListReferrers\x12\x36.google.cloud.compute.v1.ListReferrersInstancesRequest\x1a..google.cloud.compute.v1.InstanceListReferrers\"j\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02L\x12J/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/referrers\x12\xfb\x01\n\x12PerformMaintenance\x12:.google.cloud.compute.v1.PerformMaintenanceInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x84\x01\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02U\"S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/performMaintenance\x12\xf1\x02\n\x16RemoveResourcePolicies\x12>.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xf2\x01\xda\x41Iproject,zone,instance,instances_remove_resource_policies_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8e\x01\"W/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies:3instances_remove_resource_policies_request_resource\x12\xdf\x02\n\x12ReportHostAsFaulty\x12:.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe8\x01\xda\x41\x46project,zone,instance,instances_report_host_as_faulty_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x87\x01\"S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty:0instances_report_host_as_faulty_request_resource\x12\xd3\x01\n\x05Reset\x12-.google.cloud.compute.v1.ResetInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"w\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02H\"F/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reset\x12\xd6\x01\n\x06Resume\x12..google.cloud.compute.v1.ResumeInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"x\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02I\"G/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/resume\x12\x96\x02\n\x17SendDiagnosticInterrupt\x12?.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest\x1a@.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse\"x\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02Z\"X/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt\x12\x84\x02\n\x15SetDeletionProtection\x12=.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41\x15project,zone,resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02X\"V/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection\x12\x90\x02\n\x11SetDiskAutoDelete\x12\x39.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x9b\x01\xda\x41-project,zone,instance,auto_delete,device_name\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02T\"R/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete\x12\x98\x02\n\x0cSetIamPolicy\x12\x34.google.cloud.compute.v1.SetIamPolicyInstanceRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb0\x01\xda\x41\x36project,zone,resource,zone_set_policy_request_resource\x82\xd3\xe4\x93\x02q\"M/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy: zone_set_policy_request_resource\x12\xad\x02\n\tSetLabels\x12\x31.google.cloud.compute.v1.SetLabelsInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc8\x01\xda\x41;project,zone,instance,instances_set_labels_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02s\"J/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setLabels:%instances_set_labels_request_resource\x12\xe2\x02\n\x13SetMachineResources\x12;.google.cloud.compute.v1.SetMachineResourcesInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41\x46project,zone,instance,instances_set_machine_resources_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x88\x01\"T/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineResources:0instances_set_machine_resources_request_resource\x12\xc8\x02\n\x0eSetMachineType\x12\x36.google.cloud.compute.v1.SetMachineTypeInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xd9\x01\xda\x41\x41project,zone,instance,instances_set_machine_type_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02~\"O/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineType:+instances_set_machine_type_request_resource\x12\x8b\x02\n\x0bSetMetadata\x12\x33.google.cloud.compute.v1.SetMetadataInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xa2\x01\xda\x41\'project,zone,instance,metadata_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x61\"L/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMetadata:\x11metadata_resource\x12\xda\x02\n\x11SetMinCpuPlatform\x12\x39.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe5\x01\xda\x41\x45project,zone,instance,instances_set_min_cpu_platform_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x85\x01\"R/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform:/instances_set_min_cpu_platform_request_resource\x12\xa3\x02\n\x07SetName\x12/.google.cloud.compute.v1.SetNameInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc2\x01\xda\x41\x39project,zone,instance,instances_set_name_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02o\"H/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setName:#instances_set_name_request_resource\x12\x95\x02\n\rSetScheduling\x12\x35.google.cloud.compute.v1.SetSchedulingInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xa8\x01\xda\x41)project,zone,instance,scheduling_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x65\"N/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setScheduling:\x13scheduling_resource\x12\xd8\x02\n\x11SetSecurityPolicy\x12\x39.google.cloud.compute.v1.SetSecurityPolicyInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe3\x01\xda\x41\x44project,zone,instance,instances_set_security_policy_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x84\x01\"R/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy:.instances_set_security_policy_request_resource\x12\xd8\x02\n\x11SetServiceAccount\x12\x39.google.cloud.compute.v1.SetServiceAccountInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe3\x01\xda\x41\x44project,zone,instance,instances_set_service_account_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x84\x01\"R/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount:.instances_set_service_account_request_resource\x12\x85\x03\n\"SetShieldedInstanceIntegrityPolicy\x12J.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xee\x01\xda\x41\x41project,zone,instance,shielded_instance_integrity_policy_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x92\x01\x32\x63/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy:+shielded_instance_integrity_policy_resource\x12\xf7\x01\n\x07SetTags\x12/.google.cloud.compute.v1.SetTagsInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x96\x01\xda\x41#project,zone,instance,tags_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02Y\"H/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setTags:\rtags_resource\x12\x8d\x02\n\x18SimulateMaintenanceEvent\x12@.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x8a\x01\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02[\"Y/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent\x12\xd3\x01\n\x05Start\x12-.google.cloud.compute.v1.StartInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"w\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02H\"F/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/start\x12\xf3\x02\n\x16StartWithEncryptionKey\x12>.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xf4\x01\xda\x41Jproject,zone,instance,instances_start_with_encryption_key_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8f\x01\"W/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey:4instances_start_with_encryption_key_request_resource\x12\xd0\x01\n\x04Stop\x12,.google.cloud.compute.v1.StopInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"v\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02G\"E/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/stop\x12\xd9\x01\n\x07Suspend\x12/.google.cloud.compute.v1.SuspendInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"y\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02J\"H/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/suspend\x12\xbd\x02\n\x12TestIamPermissions\x12:.google.cloud.compute.v1.TestIamPermissionsInstanceRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb8\x01\xda\x41\x37project,zone,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02x\"S/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions:!test_permissions_request_resource\x12\xf5\x01\n\x06Update\x12..google.cloud.compute.v1.UpdateInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x96\x01\xda\x41\'project,zone,instance,instance_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02U\x1a@/compute/v1/projects/{project}/zones/{zone}/instances/{instance}:\x11instance_resource\x12\xbc\x02\n\x12UpdateAccessConfig\x12:.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc5\x01\xda\x41>project,zone,instance,network_interface,access_config_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02m\"S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig:\x16\x61\x63\x63\x65ss_config_resource\x12\xaf\x02\n\x13UpdateDisplayDevice\x12;.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x01\xda\x41-project,zone,instance,display_device_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02o2T/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice:\x17\x64isplay_device_resource\x12\xd0\x02\n\x16UpdateNetworkInterface\x12>.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xd1\x01\xda\x41\x42project,zone,instance,network_interface,network_interface_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02u2W/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface:\x1anetwork_interface_resource\x12\xdf\x02\n\x1cUpdateShieldedInstanceConfig\x12\x44.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xd4\x01\xda\x41\x37project,zone,instance,shielded_instance_config_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x82\x01\x32]/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig:!shielded_instance_config_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x83\x13\n\x10InstantSnapshots\x12\xd6\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListInstantSnapshotsRequest\x1a\x36.google.cloud.compute.v1.InstantSnapshotAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/instantSnapshots\x12\xee\x01\n\x06\x44\x65lete\x12\x35.google.cloud.compute.v1.DeleteInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41\x1dproject,zone,instant_snapshot\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02Q*O/compute/v1/projects/{project}/zones/{zone}/instantSnapshots/{instant_snapshot}\x12\xdc\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetInstantSnapshotRequest\x1a(.google.cloud.compute.v1.InstantSnapshot\"w\xda\x41\x1dproject,zone,instant_snapshot\x82\xd3\xe4\x93\x02Q\x12O/compute/v1/projects/{project}/zones/{zone}/instantSnapshots/{instant_snapshot}\x12\xe2\x01\n\x0cGetIamPolicy\x12;.google.cloud.compute.v1.GetIamPolicyInstantSnapshotRequest\x1a\x1f.google.cloud.compute.v1.Policy\"t\xda\x41\x15project,zone,resource\x82\xd3\xe4\x93\x02V\x12T/compute/v1/projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy\x12\xff\x01\n\x06Insert\x12\x35.google.cloud.compute.v1.InsertInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\x99\x01\xda\x41&project,zone,instant_snapshot_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02Y\"\x12.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb1\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02v\"Q/compute/v1/projects/{project}/global/machineImages/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x83\x06\n\x0cMachineTypes\x12\xca\x01\n\x0e\x41ggregatedList\x12:.google.cloud.compute.v1.AggregatedListMachineTypesRequest\x1a\x32.google.cloud.compute.v1.MachineTypeAggregatedList\"H\xda\x41\x07project\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/aggregated/machineTypes\x12\xc8\x01\n\x03Get\x12..google.cloud.compute.v1.GetMachineTypeRequest\x1a$.google.cloud.compute.v1.MachineType\"k\xda\x41\x19project,zone,machine_type\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/zones/{zone}/machineTypes/{machine_type}\x12\xb3\x01\n\x04List\x12\x30.google.cloud.compute.v1.ListMachineTypesRequest\x1a(.google.cloud.compute.v1.MachineTypeList\"O\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02:\x12\x38/compute/v1/projects/{project}/zones/{zone}/machineTypes\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf0\x13\n\x12NetworkAttachments\x12\xdc\x01\n\x0e\x41ggregatedList\x12@.google.cloud.compute.v1.AggregatedListNetworkAttachmentsRequest\x1a\x38.google.cloud.compute.v1.NetworkAttachmentAggregatedList\"N\xda\x41\x07project\x82\xd3\xe4\x93\x02>\x12.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc4\x01\xda\x41\x35project,firewall_policy,firewall_policy_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02s\"R/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/patchRule:\x1d\x66irewall_policy_rule_resource\x12\x91\x02\n\x11RemoveAssociation\x12\x46.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x8f\x01\xda\x41\x17project,firewall_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\\\"Z/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/removeAssociation\x12\xa9\x02\n\x19RemovePacketMirroringRule\x12N.google.cloud.compute.v1.RemovePacketMirroringRuleNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x97\x01\xda\x41\x17project,firewall_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x64\"b/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/removePacketMirroringRule\x12\xfc\x01\n\nRemoveRule\x12?.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41\x17project,firewall_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02U\"S/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/removeRule\x12\xa5\x02\n\x0cSetIamPolicy\x12\x41.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb0\x01\xda\x41\x33project,resource,global_set_policy_request_resource\x82\xd3\xe4\x93\x02t\"N/compute/v1/projects/{project}/global/firewallPolicies/{resource}/setIamPolicy:\"global_set_policy_request_resource\x12\xc6\x02\n\x12TestIamPermissions\x12G.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb4\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02y\"T/compute/v1/projects/{project}/global/firewallPolicies/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc4\x04\n\x0fNetworkProfiles\x12\xcc\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetNetworkProfileRequest\x1a\'.google.cloud.compute.v1.NetworkProfile\"i\xda\x41\x17project,network_profile\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/global/networkProfiles/{network_profile}\x12\xba\x01\n\x04List\x12\x33.google.cloud.compute.v1.ListNetworkProfilesRequest\x1a\x34.google.cloud.compute.v1.NetworkProfilesListResponse\"G\xda\x41\x07project\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/global/networkProfiles\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb7\x15\n\x08Networks\x12\xa3\x02\n\nAddPeering\x12\x31.google.cloud.compute.v1.AddPeeringNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\xbd\x01\xda\x41\x35project,network,networks_add_peering_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02l\"C/compute/v1/projects/{project}/global/networks/{network}/addPeering:%networks_add_peering_request_resource\x12\xc2\x01\n\x06\x44\x65lete\x12-.google.cloud.compute.v1.DeleteNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"e\xda\x41\x0fproject,network\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02:*8/compute/v1/projects/{project}/global/networks/{network}\x12\xa7\x01\n\x03Get\x12*.google.cloud.compute.v1.GetNetworkRequest\x1a .google.cloud.compute.v1.Network\"R\xda\x41\x0fproject,network\x82\xd3\xe4\x93\x02:\x12\x38/compute/v1/projects/{project}/global/networks/{network}\x12\xff\x01\n\x15GetEffectiveFirewalls\x12<.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest\x1a>.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponse\"h\xda\x41\x0fproject,network\x82\xd3\xe4\x93\x02P\x12N/compute/v1/projects/{project}/global/networks/{network}/getEffectiveFirewalls\x12\xd3\x01\n\x06Insert\x12-.google.cloud.compute.v1.InsertNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"v\xda\x41\x18project,network_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x42\"./compute/v1/projects/{project}/global/networks:\x10network_resource\x12\x9c\x01\n\x04List\x12,.google.cloud.compute.v1.ListNetworksRequest\x1a$.google.cloud.compute.v1.NetworkList\"@\xda\x41\x07project\x82\xd3\xe4\x93\x02\x30\x12./compute/v1/projects/{project}/global/networks\x12\xe9\x01\n\x11ListPeeringRoutes\x12\x39.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest\x1a\x33.google.cloud.compute.v1.ExchangedPeeringRoutesList\"d\xda\x41\x0fproject,network\x82\xd3\xe4\x93\x02L\x12J/compute/v1/projects/{project}/global/networks/{network}/listPeeringRoutes\x12\xe4\x01\n\x05Patch\x12,.google.cloud.compute.v1.PatchNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41 project,network,network_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02L28/compute/v1/projects/{project}/global/networks/{network}:\x10network_resource\x12\xb2\x02\n\rRemovePeering\x12\x34.google.cloud.compute.v1.RemovePeeringNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\xc6\x01\xda\x41\x38project,network,networks_remove_peering_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02r\"F/compute/v1/projects/{project}/global/networks/{network}/removePeering:(networks_remove_peering_request_resource\x12\xed\x01\n\x12SwitchToCustomMode\x12\x39.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"x\xda\x41\x0fproject,network\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02M\"K/compute/v1/projects/{project}/global/networks/{network}/switchToCustomMode\x12\xb2\x02\n\rUpdatePeering\x12\x34.google.cloud.compute.v1.UpdatePeeringNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\xc6\x01\xda\x41\x38project,network,networks_update_peering_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02r2F/compute/v1/projects/{project}/global/networks/{network}/updatePeering:(networks_update_peering_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xeb \n\nNodeGroups\x12\xb2\x02\n\x08\x41\x64\x64Nodes\x12\x31.google.cloud.compute.v1.AddNodesNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xce\x01\xda\x41>project,zone,node_group,node_groups_add_nodes_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02v\"L/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/addNodes:&node_groups_add_nodes_request_resource\x12\xc4\x01\n\x0e\x41ggregatedList\x12\x38.google.cloud.compute.v1.AggregatedListNodeGroupsRequest\x1a\x30.google.cloud.compute.v1.NodeGroupAggregatedList\"F\xda\x41\x07project\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/aggregated/nodeGroups\x12\xd5\x01\n\x06\x44\x65lete\x12/.google.cloud.compute.v1.DeleteNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"v\xda\x41\x17project,zone,node_group\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x45*C/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}\x12\xc1\x02\n\x0b\x44\x65leteNodes\x12\x34.google.cloud.compute.v1.DeleteNodesNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xd7\x01\xda\x41\x41project,zone,node_group,node_groups_delete_nodes_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02|\"O/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/deleteNodes:)node_groups_delete_nodes_request_resource\x12\xbe\x01\n\x03Get\x12,.google.cloud.compute.v1.GetNodeGroupRequest\x1a\".google.cloud.compute.v1.NodeGroup\"e\xda\x41\x17project,zone,node_group\x82\xd3\xe4\x93\x02\x45\x12\x43/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}\x12\xd6\x01\n\x0cGetIamPolicy\x12\x35.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest\x1a\x1f.google.cloud.compute.v1.Policy\"n\xda\x41\x15project,zone,resource\x82\xd3\xe4\x93\x02P\x12N/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy\x12\xfa\x01\n\x06Insert\x12/.google.cloud.compute.v1.InsertNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x9a\x01\xda\x41\x33project,zone,initial_node_count,node_group_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02M\"6/compute/v1/projects/{project}/zones/{zone}/nodeGroups:\x13node_group_resource\x12\xad\x01\n\x04List\x12..google.cloud.compute.v1.ListNodeGroupsRequest\x1a&.google.cloud.compute.v1.NodeGroupList\"M\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/zones/{zone}/nodeGroups\x12\xdf\x01\n\tListNodes\x12\x33.google.cloud.compute.v1.ListNodesNodeGroupsRequest\x1a,.google.cloud.compute.v1.NodeGroupsListNodes\"o\xda\x41\x17project,zone,node_group\x82\xd3\xe4\x93\x02O\"M/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/listNodes\x12\xfd\x01\n\x05Patch\x12..google.cloud.compute.v1.PatchNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x01\xda\x41+project,zone,node_group,node_group_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02Z2C/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}:\x13node_group_resource\x12\xe5\x02\n\x12PerformMaintenance\x12;.google.cloud.compute.v1.PerformMaintenanceNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xed\x01\xda\x41Hproject,zone,node_group,node_groups_perform_maintenance_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8a\x01\"V/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/performMaintenance:0node_groups_perform_maintenance_request_resource\x12\x9a\x02\n\x0cSetIamPolicy\x12\x35.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb1\x01\xda\x41\x36project,zone,resource,zone_set_policy_request_resource\x82\xd3\xe4\x93\x02r\"N/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy: zone_set_policy_request_resource\x12\xd8\x02\n\x0fSetNodeTemplate\x12\x38.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xe6\x01\xda\x41\x46project,zone,node_group,node_groups_set_node_template_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x85\x01\"S/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/setNodeTemplate:.node_groups_set_node_template_request_resource\x12\x85\x03\n\x18SimulateMaintenanceEvent\x12\x41.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x81\x02\xda\x41Oproject,zone,node_group,node_groups_simulate_maintenance_event_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x97\x01\"\\/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/simulateMaintenanceEvent:7node_groups_simulate_maintenance_event_request_resource\x12\xbf\x02\n\x12TestIamPermissions\x12;.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb9\x01\xda\x41\x37project,zone,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02y\"T/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb4\x10\n\rNodeTemplates\x12\xcd\x01\n\x0e\x41ggregatedList\x12;.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest\x1a\x33.google.cloud.compute.v1.NodeTemplateAggregatedList\"I\xda\x41\x07project\x82\xd3\xe4\x93\x02\x39\x12\x37/compute/v1/projects/{project}/aggregated/nodeTemplates\x12\xea\x01\n\x06\x44\x65lete\x12\x32.google.cloud.compute.v1.DeleteNodeTemplateRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41\x1cproject,region,node_template\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02O*M/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{node_template}\x12\xd3\x01\n\x03Get\x12/.google.cloud.compute.v1.GetNodeTemplateRequest\x1a%.google.cloud.compute.v1.NodeTemplate\"t\xda\x41\x1cproject,region,node_template\x82\xd3\xe4\x93\x02O\x12M/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{node_template}\x12\xe2\x01\n\x0cGetIamPolicy\x12\x38.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest\x1a\x1f.google.cloud.compute.v1.Policy\"w\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02W\x12U/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy\x12\xfb\x01\n\x06Insert\x12\x32.google.cloud.compute.v1.InsertNodeTemplateRequest\x1a\".google.cloud.compute.v1.Operation\"\x98\x01\xda\x41%project,region,node_template_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02W\"=/compute/v1/projects/{project}/regions/{region}/nodeTemplates:\x16node_template_resource\x12\xbc\x01\n\x04List\x12\x31.google.cloud.compute.v1.ListNodeTemplatesRequest\x1a).google.cloud.compute.v1.NodeTemplateList\"V\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02?\x12=/compute/v1/projects/{project}/regions/{region}/nodeTemplates\x12\xaa\x02\n\x0cSetIamPolicy\x12\x38.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xbe\x01\xda\x41:project,region,resource,region_set_policy_request_resource\x82\xd3\xe4\x93\x02{\"U/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy:\"region_set_policy_request_resource\x12\xcc\x02\n\x12TestIamPermissions\x12>.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc3\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x80\x01\"[/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xdf\x05\n\tNodeTypes\x12\xc1\x01\n\x0e\x41ggregatedList\x12\x37.google.cloud.compute.v1.AggregatedListNodeTypesRequest\x1a/.google.cloud.compute.v1.NodeTypeAggregatedList\"E\xda\x41\x07project\x82\xd3\xe4\x93\x02\x35\x12\x33/compute/v1/projects/{project}/aggregated/nodeTypes\x12\xb9\x01\n\x03Get\x12+.google.cloud.compute.v1.GetNodeTypeRequest\x1a!.google.cloud.compute.v1.NodeType\"b\xda\x41\x16project,zone,node_type\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/zones/{zone}/nodeTypes/{node_type}\x12\xaa\x01\n\x04List\x12-.google.cloud.compute.v1.ListNodeTypesRequest\x1a%.google.cloud.compute.v1.NodeTypeList\"L\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/zones/{zone}/nodeTypes\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x90\x0f\n\x10PacketMirrorings\x12\xd6\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest\x1a\x36.google.cloud.compute.v1.PacketMirroringAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/packetMirrorings\x12\xf6\x01\n\x06\x44\x65lete\x12\x35.google.cloud.compute.v1.DeletePacketMirroringRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\x1fproject,region,packet_mirroring\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02U*S/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packet_mirroring}\x12\xe2\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetPacketMirroringRequest\x1a(.google.cloud.compute.v1.PacketMirroring\"}\xda\x41\x1fproject,region,packet_mirroring\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packet_mirroring}\x12\x87\x02\n\x06Insert\x12\x35.google.cloud.compute.v1.InsertPacketMirroringRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41(project,region,packet_mirroring_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02]\"@/compute/v1/projects/{project}/regions/{region}/packetMirrorings:\x19packet_mirroring_resource\x12\xc5\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListPacketMirroringsRequest\x1a,.google.cloud.compute.v1.PacketMirroringList\"Y\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/packetMirrorings\x12\xa9\x02\n\x05Patch\x12\x34.google.cloud.compute.v1.PatchPacketMirroringRequest\x1a\".google.cloud.compute.v1.Operation\"\xc5\x01\xda\x41\x39project,region,packet_mirroring,packet_mirroring_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02p2S/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packet_mirroring}:\x19packet_mirroring_resource\x12\xd2\x02\n\x12TestIamPermissions\x12\x41.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc6\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x83\x01\"^/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xab\x1b\n\x08Projects\x12\xbf\x01\n\x0e\x44isableXpnHost\x12\x35.google.cloud.compute.v1.DisableXpnHostProjectRequest\x1a\".google.cloud.compute.v1.Operation\"R\xda\x41\x07project\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02/\"-/compute/v1/projects/{project}/disableXpnHost\x12\xab\x02\n\x12\x44isableXpnResource\x12\x39.google.cloud.compute.v1.DisableXpnResourceProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\xb5\x01\xda\x41\x36project,projects_disable_xpn_resource_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x63\"1/compute/v1/projects/{project}/disableXpnResource:.projects_disable_xpn_resource_request_resource\x12\xbc\x01\n\rEnableXpnHost\x12\x34.google.cloud.compute.v1.EnableXpnHostProjectRequest\x1a\".google.cloud.compute.v1.Operation\"Q\xda\x41\x07project\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02.\",/compute/v1/projects/{project}/enableXpnHost\x12\xa6\x02\n\x11\x45nableXpnResource\x12\x38.google.cloud.compute.v1.EnableXpnResourceProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\xb2\x01\xda\x41\x35project,projects_enable_xpn_resource_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x61\"0/compute/v1/projects/{project}/enableXpnResource:-projects_enable_xpn_resource_request_resource\x12\x85\x01\n\x03Get\x12*.google.cloud.compute.v1.GetProjectRequest\x1a .google.cloud.compute.v1.Project\"0\xda\x41\x07project\x82\xd3\xe4\x93\x02 \x12\x1e/compute/v1/projects/{project}\x12\x9e\x01\n\nGetXpnHost\x12\x31.google.cloud.compute.v1.GetXpnHostProjectRequest\x1a .google.cloud.compute.v1.Project\";\xda\x41\x07project\x82\xd3\xe4\x93\x02+\x12)/compute/v1/projects/{project}/getXpnHost\x12\xbe\x01\n\x0fGetXpnResources\x12\x37.google.cloud.compute.v1.GetXpnResourcesProjectsRequest\x1a\x30.google.cloud.compute.v1.ProjectsGetXpnResources\"@\xda\x41\x07project\x82\xd3\xe4\x93\x02\x30\x12./compute/v1/projects/{project}/getXpnResources\x12\xfd\x01\n\x0cListXpnHosts\x12\x34.google.cloud.compute.v1.ListXpnHostsProjectsRequest\x1a$.google.cloud.compute.v1.XpnHostList\"\x90\x01\xda\x41\x30project,projects_list_xpn_hosts_request_resource\x82\xd3\xe4\x93\x02W\"+/compute/v1/projects/{project}/listXpnHosts:(projects_list_xpn_hosts_request_resource\x12\xe5\x01\n\x08MoveDisk\x12/.google.cloud.compute.v1.MoveDiskProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\x83\x01\xda\x41\"project,disk_move_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x45\"\'/compute/v1/projects/{project}/moveDisk:\x1a\x64isk_move_request_resource\x12\xf9\x01\n\x0cMoveInstance\x12\x33.google.cloud.compute.v1.MoveInstanceProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\x8f\x01\xda\x41&project,instance_move_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02M\"+/compute/v1/projects/{project}/moveInstance:\x1einstance_move_request_resource\x12\xa8\x02\n\x11SetCloudArmorTier\x12\x38.google.cloud.compute.v1.SetCloudArmorTierProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\xb4\x01\xda\x41\x36project,projects_set_cloud_armor_tier_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x62\"0/compute/v1/projects/{project}/setCloudArmorTier:.projects_set_cloud_armor_tier_request_resource\x12\x86\x02\n\x19SetCommonInstanceMetadata\x12@.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\x82\x01\xda\x41\x19project,metadata_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02M\"8/compute/v1/projects/{project}/setCommonInstanceMetadata:\x11metadata_resource\x12\xbc\x02\n\x15SetDefaultNetworkTier\x12<.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41:project,projects_set_default_network_tier_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02j\"4/compute/v1/projects/{project}/setDefaultNetworkTier:2projects_set_default_network_tier_request_resource\x12\x91\x02\n\x14SetUsageExportBucket\x12;.google.cloud.compute.v1.SetUsageExportBucketProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\x97\x01\xda\x41&project,usage_export_location_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02U\"3/compute/v1/projects/{project}/setUsageExportBucket:\x1eusage_export_location_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xee\x0f\n\x18PublicAdvertisedPrefixes\x12\x92\x02\n\x08\x41nnounce\x12?.google.cloud.compute.v1.AnnouncePublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa0\x01\xda\x41 project,public_advertised_prefix\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x64\"b/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}/announce\x12\x85\x02\n\x06\x44\x65lete\x12=.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\x97\x01\xda\x41 project,public_advertised_prefix\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02[*Y/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}\x12\xf9\x01\n\x03Get\x12:.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest\x1a/.google.cloud.compute.v1.PublicAdvertisedPrefix\"\x84\x01\xda\x41 project,public_advertised_prefix\x82\xd3\xe4\x93\x02[\x12Y/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}\x12\x96\x02\n\x06Insert\x12=.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa8\x01\xda\x41)project,public_advertised_prefix_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x63\">/compute/v1/projects/{project}/global/publicAdvertisedPrefixes:!public_advertised_prefix_resource\x12\xcb\x01\n\x04List\x12<.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest\x1a\x33.google.cloud.compute.v1.PublicAdvertisedPrefixList\"P\xda\x41\x07project\x82\xd3\xe4\x93\x02@\x12>/compute/v1/projects/{project}/global/publicAdvertisedPrefixes\x12\xc8\x02\n\x05Patch\x12<.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xdc\x01\xda\x41\x42project,public_advertised_prefix,public_advertised_prefix_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02~2Y/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}:!public_advertised_prefix_resource\x12\x92\x02\n\x08Withdraw\x12?.google.cloud.compute.v1.WithdrawPublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa0\x01\xda\x41 project,public_advertised_prefix\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x64\"b/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}/withdraw\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb4\x12\n\x17PublicDelegatedPrefixes\x12\xea\x01\n\x0e\x41ggregatedList\x12\x45.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest\x1a<.google.cloud.compute.v1.PublicDelegatedPrefixAggregatedList\"S\xda\x41\x07project\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/aggregated/publicDelegatedPrefixes\x12\x9f\x02\n\x08\x41nnounce\x12>.google.cloud.compute.v1.AnnouncePublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xae\x01\xda\x41&project,region,public_delegated_prefix\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02l\"j/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/announce\x12\x92\x02\n\x06\x44\x65lete\x12<.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x01\xda\x41&project,region,public_delegated_prefix\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x63*a/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}\x12\x85\x02\n\x03Get\x12\x39.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest\x1a..google.cloud.compute.v1.PublicDelegatedPrefix\"\x92\x01\xda\x41&project,region,public_delegated_prefix\x82\xd3\xe4\x93\x02\x63\x12\x61/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}\x12\xa3\x02\n\x06Insert\x12<.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x01\xda\x41/project,region,public_delegated_prefix_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02k\"G/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes: public_delegated_prefix_resource\x12\xd9\x01\n\x04List\x12;.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest\x1a\x32.google.cloud.compute.v1.PublicDelegatedPrefixList\"`\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes\x12\xd4\x02\n\x05Patch\x12;.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41Gproject,region,public_delegated_prefix,public_delegated_prefix_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x85\x01\x32\x61/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}: public_delegated_prefix_resource\x12\x9f\x02\n\x08Withdraw\x12>.google.cloud.compute.v1.WithdrawPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xae\x01\xda\x41&project,region,public_delegated_prefix\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02l\"j/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/withdraw\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf0\x0b\n\x11RegionAutoscalers\x12\xe5\x01\n\x06\x44\x65lete\x12\x36.google.cloud.compute.v1.DeleteRegionAutoscalerRequest\x1a\".google.cloud.compute.v1.Operation\"\x7f\xda\x41\x19project,region,autoscaler\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02J*H/compute/v1/projects/{project}/regions/{region}/autoscalers/{autoscaler}\x12\xcd\x01\n\x03Get\x12\x33.google.cloud.compute.v1.GetRegionAutoscalerRequest\x1a#.google.cloud.compute.v1.Autoscaler\"l\xda\x41\x19project,region,autoscaler\x82\xd3\xe4\x93\x02J\x12H/compute/v1/projects/{project}/regions/{region}/autoscalers/{autoscaler}\x12\xf7\x01\n\x06Insert\x12\x36.google.cloud.compute.v1.InsertRegionAutoscalerRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,autoscaler_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R\";/compute/v1/projects/{project}/regions/{region}/autoscalers:\x13\x61utoscaler_resource\x12\xc2\x01\n\x04List\x12\x35.google.cloud.compute.v1.ListRegionAutoscalersRequest\x1a-.google.cloud.compute.v1.RegionAutoscalerList\"T\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/regions/{region}/autoscalers\x12\xf5\x01\n\x05Patch\x12\x35.google.cloud.compute.v1.PatchRegionAutoscalerRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,autoscaler_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R2;/compute/v1/projects/{project}/regions/{region}/autoscalers:\x13\x61utoscaler_resource\x12\xf7\x01\n\x06Update\x12\x36.google.cloud.compute.v1.UpdateRegionAutoscalerRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,autoscaler_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R\x1a;/compute/v1/projects/{project}/regions/{region}/autoscalers:\x13\x61utoscaler_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xbd\x1b\n\x15RegionBackendServices\x12\xf8\x01\n\x06\x44\x65lete\x12:.google.cloud.compute.v1.DeleteRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\x1eproject,region,backend_service\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S*Q/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}\x12\xe3\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetRegionBackendServiceRequest\x1a\'.google.cloud.compute.v1.BackendService\"z\xda\x41\x1eproject,region,backend_service\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}\x12\xcb\x02\n\tGetHealth\x12=.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest\x1a\x32.google.cloud.compute.v1.BackendServiceGroupHealth\"\xca\x01\xda\x41@project,region,backend_service,resource_group_reference_resource\x82\xd3\xe4\x93\x02\x80\x01\"[/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}/getHealth:!resource_group_reference_resource\x12\xec\x01\n\x0cGetIamPolicy\x12@.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest\x1a\x1f.google.cloud.compute.v1.Policy\"y\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02Y\x12W/compute/v1/projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy\x12\x89\x02\n\x06Insert\x12:.google.cloud.compute.v1.InsertRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\x9e\x01\xda\x41\'project,region,backend_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02[\"?/compute/v1/projects/{project}/regions/{region}/backendServices:\x18\x62\x61\x63kend_service_resource\x12\xc8\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListRegionBackendServicesRequest\x1a+.google.cloud.compute.v1.BackendServiceList\"X\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x41\x12?/compute/v1/projects/{project}/regions/{region}/backendServices\x12\xe5\x01\n\nListUsable\x12?.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest\x1a\x31.google.cloud.compute.v1.BackendServiceListUsable\"c\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02L\x12J/compute/v1/projects/{project}/regions/{region}/backendServices/listUsable\x12\xa9\x02\n\x05Patch\x12\x39.google.cloud.compute.v1.PatchRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41\x37project,region,backend_service,backend_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02m2Q/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}:\x18\x62\x61\x63kend_service_resource\x12\xb4\x02\n\x0cSetIamPolicy\x12@.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xc0\x01\xda\x41:project,region,resource,region_set_policy_request_resource\x82\xd3\xe4\x93\x02}\"W/compute/v1/projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy:\"region_set_policy_request_resource\x12\xe8\x02\n\x11SetSecurityPolicy\x12\x45.google.cloud.compute.v1.SetSecurityPolicyRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe7\x01\xda\x41\x41project,region,backend_service,security_policy_reference_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x89\x01\"c/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}/setSecurityPolicy:\"security_policy_reference_resource\x12\xd6\x02\n\x12TestIamPermissions\x12\x46.google.cloud.compute.v1.TestIamPermissionsRegionBackendServiceRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc5\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x82\x01\"]/compute/v1/projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions:!test_permissions_request_resource\x12\xab\x02\n\x06Update\x12:.google.cloud.compute.v1.UpdateRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41\x37project,region,backend_service,backend_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02m\x1aQ/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}:\x18\x62\x61\x63kend_service_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf2\t\n\x11RegionCommitments\x12\xcd\x01\n\x0e\x41ggregatedList\x12?.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest\x1a\x31.google.cloud.compute.v1.CommitmentAggregatedList\"G\xda\x41\x07project\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/aggregated/commitments\x12\xcd\x01\n\x03Get\x12\x33.google.cloud.compute.v1.GetRegionCommitmentRequest\x1a#.google.cloud.compute.v1.Commitment\"l\xda\x41\x19project,region,commitment\x82\xd3\xe4\x93\x02J\x12H/compute/v1/projects/{project}/regions/{region}/commitments/{commitment}\x12\xf7\x01\n\x06Insert\x12\x36.google.cloud.compute.v1.InsertRegionCommitmentRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,commitment_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R\";/compute/v1/projects/{project}/regions/{region}/commitments:\x13\x63ommitment_resource\x12\xbc\x01\n\x04List\x12\x35.google.cloud.compute.v1.ListRegionCommitmentsRequest\x1a\'.google.cloud.compute.v1.CommitmentList\"T\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/regions/{region}/commitments\x12\x8f\x02\n\x06Update\x12\x36.google.cloud.compute.v1.UpdateRegionCommitmentRequest\x1a\".google.cloud.compute.v1.Operation\"\xa8\x01\xda\x41-project,region,commitment,commitment_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_2H/compute/v1/projects/{project}/regions/{region}/commitments/{commitment}:\x13\x63ommitment_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xbf\x04\n\x0fRegionDiskTypes\x12\xc5\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetRegionDiskTypeRequest\x1a!.google.cloud.compute.v1.DiskType\"h\xda\x41\x18project,region,disk_type\x82\xd3\xe4\x93\x02G\x12\x45/compute/v1/projects/{project}/regions/{region}/diskTypes/{disk_type}\x12\xbc\x01\n\x04List\x12\x33.google.cloud.compute.v1.ListRegionDiskTypesRequest\x1a+.google.cloud.compute.v1.RegionDiskTypeList\"R\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02;\x12\x39/compute/v1/projects/{project}/regions/{region}/diskTypes\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x8f&\n\x0bRegionDisks\x12\xe6\x02\n\x13\x41\x64\x64ResourcePolicies\x12=.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xeb\x01\xda\x41Gproject,region,disk,region_disks_add_resource_policies_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x87\x01\"P/compute/v1/projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies:3region_disks_add_resource_policies_request_resource\x12\x9c\x02\n\nBulkInsert\x12\x34.google.cloud.compute.v1.BulkInsertRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xb3\x01\xda\x41\x31project,region,bulk_insert_disk_resource_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x66\"@/compute/v1/projects/{project}/regions/{region}/disks/bulkInsert:\"bulk_insert_disk_resource_resource\x12\x92\x02\n\x0e\x43reateSnapshot\x12\x38.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41%project,region,disk,snapshot_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02`\"K/compute/v1/projects/{project}/regions/{region}/disks/{disk}/createSnapshot:\x11snapshot_resource\x12\xcd\x01\n\x06\x44\x65lete\x12\x30.google.cloud.compute.v1.DeleteRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"m\xda\x41\x13project,region,disk\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02>*\x12.google.cloud.compute.v1.StopAsyncReplicationRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\x82\x01\xda\x41\x13project,region,disk\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S\"Q/compute/v1/projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication\x12\xee\x02\n\x19StopGroupAsyncReplication\x12\x43.google.cloud.compute.v1.StopGroupAsyncReplicationRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xe7\x01\xda\x41\x43project,region,disks_stop_group_async_replication_resource_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x87\x01\"O/compute/v1/projects/{project}/regions/{region}/disks/stopGroupAsyncReplication:4disks_stop_group_async_replication_resource_resource\x12\xc1\x02\n\x12TestIamPermissions\x12<.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xba\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02x\"S/compute/v1/projects/{project}/regions/{region}/disks/{resource}/testIamPermissions:!test_permissions_request_resource\x12\xeb\x01\n\x06Update\x12\x30.google.cloud.compute.v1.UpdateRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\x8a\x01\xda\x41!project,region,disk,disk_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02M2.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\x9b\x01\xda\x41#project,region,health_check_service\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\\*Z/compute/v1/projects/{project}/regions/{region}/healthCheckServices/{health_check_service}\x12\xfa\x01\n\x03Get\x12;.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest\x1a+.google.cloud.compute.v1.HealthCheckService\"\x88\x01\xda\x41#project,region,health_check_service\x82\xd3\xe4\x93\x02\\\x12Z/compute/v1/projects/{project}/regions/{region}/healthCheckServices/{health_check_service}\x12\x9b\x02\n\x06Insert\x12>.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xac\x01\xda\x41,project,region,health_check_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x64\"C/compute/v1/projects/{project}/regions/{region}/healthCheckServices:\x1dhealth_check_service_resource\x12\xd5\x01\n\x04List\x12=.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest\x1a\x30.google.cloud.compute.v1.HealthCheckServicesList\"\\\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x45\x12\x43/compute/v1/projects/{project}/regions/{region}/healthCheckServices\x12\xc5\x02\n\x05Patch\x12=.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xd8\x01\xda\x41\x41project,region,health_check_service,health_check_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02{2Z/compute/v1/projects/{project}/regions/{region}/healthCheckServices/{health_check_service}:\x1dhealth_check_service_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc6\x0c\n\x12RegionHealthChecks\x12\xec\x01\n\x06\x44\x65lete\x12\x37.google.cloud.compute.v1.DeleteRegionHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\x84\x01\xda\x41\x1bproject,region,health_check\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02M*K/compute/v1/projects/{project}/regions/{region}/healthChecks/{health_check}\x12\xd4\x01\n\x03Get\x12\x34.google.cloud.compute.v1.GetRegionHealthCheckRequest\x1a$.google.cloud.compute.v1.HealthCheck\"q\xda\x41\x1bproject,region,health_check\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/regions/{region}/healthChecks/{health_check}\x12\xfd\x01\n\x06Insert\x12\x37.google.cloud.compute.v1.InsertRegionHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\x95\x01\xda\x41$project,region,health_check_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02U\"\x12region_instance_group_managers_stop_instances_request_resource\x12\xbd\x03\n\x10SuspendInstances\x12J.google.cloud.compute.v1.SuspendInstancesRegionInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xb8\x02\xda\x41gproject,region,instance_group_manager,region_instance_group_managers_suspend_instances_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xb4\x01\"o/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/suspendInstances:Aregion_instance_group_managers_suspend_instances_request_resource\x12\xd5\x03\n\x18UpdatePerInstanceConfigs\x12R.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x02\xda\x41gproject,region,instance_group_manager,region_instance_group_manager_update_instance_config_req_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xbc\x01\"w/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/updatePerInstanceConfigs:Aregion_instance_group_manager_update_instance_config_req_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc7\n\n\x14RegionInstanceGroups\x12\xde\x01\n\x03Get\x12\x36.google.cloud.compute.v1.GetRegionInstanceGroupRequest\x1a&.google.cloud.compute.v1.InstanceGroup\"w\xda\x41\x1dproject,region,instance_group\x82\xd3\xe4\x93\x02Q\x12O/compute/v1/projects/{project}/regions/{region}/instanceGroups/{instance_group}\x12\xcb\x01\n\x04List\x12\x38.google.cloud.compute.v1.ListRegionInstanceGroupsRequest\x1a\x30.google.cloud.compute.v1.RegionInstanceGroupList\"W\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02@\x12>/compute/v1/projects/{project}/regions/{region}/instanceGroups\x12\x86\x03\n\rListInstances\x12\x41.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest\x1a:.google.cloud.compute.v1.RegionInstanceGroupsListInstances\"\xf5\x01\xda\x41Tproject,region,instance_group,region_instance_groups_list_instances_request_resource\x82\xd3\xe4\x93\x02\x97\x01\"]/compute/v1/projects/{project}/regions/{region}/instanceGroups/{instance_group}/listInstances:6region_instance_groups_list_instances_request_resource\x12\x82\x03\n\rSetNamedPorts\x12@.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x8a\x02\xda\x41Uproject,region,instance_group,region_instance_groups_set_named_ports_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x98\x01\"]/compute/v1/projects/{project}/regions/{region}/instanceGroups/{instance_group}/setNamedPorts:7region_instance_groups_set_named_ports_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xe6\x08\n\x17RegionInstanceTemplates\x12\x80\x02\n\x06\x44\x65lete\x12<.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest\x1a\".google.cloud.compute.v1.Operation\"\x93\x01\xda\x41 project,region,instance_template\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02W*U/compute/v1/projects/{project}/regions/{region}/instanceTemplates/{instance_template}\x12\xee\x01\n\x03Get\x12\x39.google.cloud.compute.v1.GetRegionInstanceTemplateRequest\x1a).google.cloud.compute.v1.InstanceTemplate\"\x80\x01\xda\x41 project,region,instance_template\x82\xd3\xe4\x93\x02W\x12U/compute/v1/projects/{project}/regions/{region}/instanceTemplates/{instance_template}\x12\x91\x02\n\x06Insert\x12<.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest\x1a\".google.cloud.compute.v1.Operation\"\xa4\x01\xda\x41)project,region,instance_template_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_\"A/compute/v1/projects/{project}/regions/{region}/instanceTemplates:\x1ainstance_template_resource\x12\xce\x01\n\x04List\x12;.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest\x1a-.google.cloud.compute.v1.InstanceTemplateList\"Z\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/regions/{region}/instanceTemplates\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb4\x03\n\x0fRegionInstances\x12\xac\x02\n\nBulkInsert\x12\x38.google.cloud.compute.v1.BulkInsertRegionInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xbf\x01\xda\x41\x35project,region,bulk_insert_instance_resource_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02n\"D/compute/v1/projects/{project}/regions/{region}/instances/bulkInsert:&bulk_insert_instance_resource_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x9f\x12\n\x16RegionInstantSnapshots\x12\xfc\x01\n\x06\x44\x65lete\x12;.google.cloud.compute.v1.DeleteRegionInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\x1fproject,region,instant_snapshot\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02U*S/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{instant_snapshot}\x12\xe8\x01\n\x03Get\x12\x38.google.cloud.compute.v1.GetRegionInstantSnapshotRequest\x1a(.google.cloud.compute.v1.InstantSnapshot\"}\xda\x41\x1fproject,region,instant_snapshot\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{instant_snapshot}\x12\xee\x01\n\x0cGetIamPolicy\x12\x41.google.cloud.compute.v1.GetIamPolicyRegionInstantSnapshotRequest\x1a\x1f.google.cloud.compute.v1.Policy\"z\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02Z\x12X/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy\x12\x8d\x02\n\x06Insert\x12;.google.cloud.compute.v1.InsertRegionInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41(project,region,instant_snapshot_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02]\"@/compute/v1/projects/{project}/regions/{region}/instantSnapshots:\x19instant_snapshot_resource\x12\xcb\x01\n\x04List\x12:.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest\x1a,.google.cloud.compute.v1.InstantSnapshotList\"Y\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/instantSnapshots\x12\xb6\x02\n\x0cSetIamPolicy\x12\x41.google.cloud.compute.v1.SetIamPolicyRegionInstantSnapshotRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xc1\x01\xda\x41:project,region,resource,region_set_policy_request_resource\x82\xd3\xe4\x93\x02~\"X/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy:\"region_set_policy_request_resource\x12\xc3\x02\n\tSetLabels\x12>.google.cloud.compute.v1.SetLabelsRegionInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\xd1\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02{\"U/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels:\"region_set_labels_request_resource\x12\xd8\x02\n\x12TestIamPermissions\x12G.google.cloud.compute.v1.TestIamPermissionsRegionInstantSnapshotRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc6\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x83\x01\"^/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xa4\x13\n\x1bRegionNetworkEndpointGroups\x12\xcd\x03\n\x16\x41ttachNetworkEndpoints\x12P.google.cloud.compute.v1.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xbc\x02\xda\x41\x66project,region,network_endpoint_group,region_network_endpoint_groups_attach_endpoints_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xb9\x01\"u/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/attachNetworkEndpoints:@region_network_endpoint_groups_attach_endpoints_request_resource\x12\x92\x02\n\x06\x44\x65lete\x12@.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41%project,region,network_endpoint_group\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02`*^/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}\x12\xcd\x03\n\x16\x44\x65tachNetworkEndpoints\x12P.google.cloud.compute.v1.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xbc\x02\xda\x41\x66project,region,network_endpoint_group,region_network_endpoint_groups_detach_endpoints_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xb9\x01\"u/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/detachNetworkEndpoints:@region_network_endpoint_groups_detach_endpoints_request_resource\x12\x84\x02\n\x03Get\x12=.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest\x1a-.google.cloud.compute.v1.NetworkEndpointGroup\"\x8e\x01\xda\x41%project,region,network_endpoint_group\x82\xd3\xe4\x93\x02`\x12^/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}\x12\xa3\x02\n\x06Insert\x12@.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xb2\x01\xda\x41.project,region,network_endpoint_group_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02h\"E/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups:\x1fnetwork_endpoint_group_resource\x12\xda\x01\n\x04List\x12?.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest\x1a\x31.google.cloud.compute.v1.NetworkEndpointGroupList\"^\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02G\x12\x45/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups\x12\xd1\x02\n\x14ListNetworkEndpoints\x12O.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest\x1a\x42.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints\"\xa3\x01\xda\x41%project,region,network_endpoint_group\x82\xd3\xe4\x93\x02u\"s/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/listNetworkEndpoints\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf2\'\n\x1dRegionNetworkFirewallPolicies\x12\xeb\x02\n\x0e\x41\x64\x64\x41ssociation\x12I.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41\x43project,region,firewall_policy,firewall_policy_association_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x89\x01\"a/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}/addAssociation:$firewall_policy_association_resource\x12\xc7\x02\n\x07\x41\x64\x64Rule\x12\x42.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd3\x01\xda\x41.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest\x1a\'.google.cloud.compute.v1.FirewallPolicy\"{\xda\x41\x1eproject,region,firewall_policy\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}\x12\x9c\x02\n\x0eGetAssociation\x12I.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest\x1a\x32.google.cloud.compute.v1.FirewallPolicyAssociation\"\x8a\x01\xda\x41\x1eproject,region,firewall_policy\x82\xd3\xe4\x93\x02\x63\x12\x61/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}/getAssociation\x12\xb7\x02\n\x15GetEffectiveFirewalls\x12P.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest\x1aS.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse\"w\xda\x41\x16project,region,network\x82\xd3\xe4\x93\x02X\x12V/compute/v1/projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls\x12\xf4\x01\n\x0cGetIamPolicy\x12G.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"z\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02Z\x12X/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy\x12\x80\x02\n\x07GetRule\x12\x42.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest\x1a+.google.cloud.compute.v1.FirewallPolicyRule\"\x83\x01\xda\x41\x1eproject,region,firewall_policy\x82\xd3\xe4\x93\x02\\\x12Z/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}/getRule\x12\x91\x02\n\x06Insert\x12\x41.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x01\xda\x41\'project,region,firewall_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\\\"@/compute/v1/projects/{project}/regions/{region}/firewallPolicies:\x18\x66irewall_policy_resource\x12\xd1\x01\n\x04List\x12\x41.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest\x1a+.google.cloud.compute.v1.FirewallPolicyList\"Y\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/firewallPolicies\x12\xb1\x02\n\x05Patch\x12@.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc1\x01\xda\x41\x37project,region,firewall_policy,firewall_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02n2R/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}:\x18\x66irewall_policy_resource\x12\xcd\x02\n\tPatchRule\x12\x44.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd5\x01\xda\x41.google.cloud.compute.v1.RemoveRuleRegionSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x99\x01\xda\x41\x1eproject,region,security_policy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_\"]/compute/v1/projects/{project}/regions/{region}/securityPolicies/{security_policy}/removeRule\x12\xc2\x02\n\tSetLabels\x12=.google.cloud.compute.v1.SetLabelsRegionSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd1\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02{\"U/compute/v1/projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels:\"region_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc3\x08\n\x15RegionSslCertificates\x12\xf8\x01\n\x06\x44\x65lete\x12:.google.cloud.compute.v1.DeleteRegionSslCertificateRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\x1eproject,region,ssl_certificate\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S*Q/compute/v1/projects/{project}/regions/{region}/sslCertificates/{ssl_certificate}\x12\xe3\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetRegionSslCertificateRequest\x1a\'.google.cloud.compute.v1.SslCertificate\"z\xda\x41\x1eproject,region,ssl_certificate\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/regions/{region}/sslCertificates/{ssl_certificate}\x12\x89\x02\n\x06Insert\x12:.google.cloud.compute.v1.InsertRegionSslCertificateRequest\x1a\".google.cloud.compute.v1.Operation\"\x9e\x01\xda\x41\'project,region,ssl_certificate_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02[\"?/compute/v1/projects/{project}/regions/{region}/sslCertificates:\x18ssl_certificate_resource\x12\xc8\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListRegionSslCertificatesRequest\x1a+.google.cloud.compute.v1.SslCertificateList\"X\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x41\x12?/compute/v1/projects/{project}/regions/{region}/sslCertificates\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x95\x0c\n\x11RegionSslPolicies\x12\xe4\x01\n\x06\x44\x65lete\x12\x35.google.cloud.compute.v1.DeleteRegionSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x7f\xda\x41\x19project,region,ssl_policy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02J*H/compute/v1/projects/{project}/regions/{region}/sslPolicies/{ssl_policy}\x12\xcb\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetRegionSslPolicyRequest\x1a\".google.cloud.compute.v1.SslPolicy\"l\xda\x41\x19project,region,ssl_policy\x82\xd3\xe4\x93\x02J\x12H/compute/v1/projects/{project}/regions/{region}/sslPolicies/{ssl_policy}\x12\xf6\x01\n\x06Insert\x12\x35.google.cloud.compute.v1.InsertRegionSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,ssl_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R\";/compute/v1/projects/{project}/regions/{region}/sslPolicies:\x13ssl_policy_resource\x12\xbd\x01\n\x04List\x12\x35.google.cloud.compute.v1.ListRegionSslPoliciesRequest\x1a(.google.cloud.compute.v1.SslPoliciesList\"T\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/regions/{region}/sslPolicies\x12\x8e\x02\n\x15ListAvailableFeatures\x12\x46.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest\x1a\x41.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse\"j\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures\x12\x8c\x02\n\x05Patch\x12\x34.google.cloud.compute.v1.PatchRegionSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xa8\x01\xda\x41-project,region,ssl_policy,ssl_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_2H/compute/v1/projects/{project}/regions/{region}/sslPolicies/{ssl_policy}:\x13ssl_policy_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xaa\x0b\n\x17RegionTargetHttpProxies\x12\xff\x01\n\x06\x44\x65lete\x12;.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x93\x01\xda\x41 project,region,target_http_proxy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02W*U/compute/v1/projects/{project}/regions/{region}/targetHttpProxies/{target_http_proxy}\x12\xec\x01\n\x03Get\x12\x38.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest\x1a(.google.cloud.compute.v1.TargetHttpProxy\"\x80\x01\xda\x41 project,region,target_http_proxy\x82\xd3\xe4\x93\x02W\x12U/compute/v1/projects/{project}/regions/{region}/targetHttpProxies/{target_http_proxy}\x12\x90\x02\n\x06Insert\x12;.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xa4\x01\xda\x41)project,region,target_http_proxy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_\"A/compute/v1/projects/{project}/regions/{region}/targetHttpProxies:\x1atarget_http_proxy_resource\x12\xcd\x01\n\x04List\x12;.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest\x1a,.google.cloud.compute.v1.TargetHttpProxyList\"Z\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/regions/{region}/targetHttpProxies\x12\xc6\x02\n\tSetUrlMap\x12>.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd4\x01\xda\x41;project,region,target_http_proxy,url_map_reference_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02}\"_/compute/v1/projects/{project}/regions/{region}/targetHttpProxies/{target_http_proxy}/setUrlMap:\x1aurl_map_reference_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb3\x11\n\x18RegionTargetHttpsProxies\x12\x83\x02\n\x06\x44\x65lete\x12<.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x96\x01\xda\x41!project,region,target_https_proxy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02Y*W/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{target_https_proxy}\x12\xf1\x01\n\x03Get\x12\x39.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest\x1a).google.cloud.compute.v1.TargetHttpsProxy\"\x83\x01\xda\x41!project,region,target_https_proxy\x82\xd3\xe4\x93\x02Y\x12W/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{target_https_proxy}\x12\x94\x02\n\x06Insert\x12<.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xa7\x01\xda\x41*project,region,target_https_proxy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x61\"B/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies:\x1btarget_https_proxy_resource\x12\xd0\x01\n\x04List\x12<.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest\x1a-.google.cloud.compute.v1.TargetHttpsProxyList\"[\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x44\x12\x42/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies\x12\xba\x02\n\x05Patch\x12;.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xcf\x01\xda\x41=project,region,target_https_proxy,target_https_proxy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02v2W/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{target_https_proxy}:\x1btarget_https_proxy_resource\x12\xb4\x03\n\x12SetSslCertificates\x12H.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xaf\x02\xda\x41\x63project,region,target_https_proxy,region_target_https_proxies_set_ssl_certificates_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xaf\x01\"j/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{target_https_proxy}/setSslCertificates:Aregion_target_https_proxies_set_ssl_certificates_request_resource\x12\xca\x02\n\tSetUrlMap\x12?.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd7\x01\xda\x41.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest\x1a\x35.google.cloud.compute.v1.ResourcePolicyAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/resourcePolicies\x12\xf3\x01\n\x06\x44\x65lete\x12\x34.google.cloud.compute.v1.DeleteResourcePolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x8e\x01\xda\x41\x1eproject,region,resource_policy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02T*R/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource_policy}\x12\xde\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetResourcePolicyRequest\x1a\'.google.cloud.compute.v1.ResourcePolicy\"{\xda\x41\x1eproject,region,resource_policy\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource_policy}\x12\xe7\x01\n\x0cGetIamPolicy\x12:.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"z\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02Z\x12X/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy\x12\x84\x02\n\x06Insert\x12\x34.google.cloud.compute.v1.InsertResourcePolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x01\xda\x41\'project,region,resource_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\\\"@/compute/v1/projects/{project}/regions/{region}/resourcePolicies:\x18resource_policy_resource\x12\xc4\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListResourcePoliciesRequest\x1a+.google.cloud.compute.v1.ResourcePolicyList\"Y\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/resourcePolicies\x12\xa4\x02\n\x05Patch\x12\x33.google.cloud.compute.v1.PatchResourcePolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc1\x01\xda\x41\x37project,region,resource_policy,resource_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02n2R/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource_policy}:\x18resource_policy_resource\x12\xaf\x02\n\x0cSetIamPolicy\x12:.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xc1\x01\xda\x41:project,region,resource,region_set_policy_request_resource\x82\xd3\xe4\x93\x02~\"X/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy:\"region_set_policy_request_resource\x12\xd1\x02\n\x12TestIamPermissions\x12@.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc6\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x83\x01\"^/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x8e \n\x07Routers\x12\xbb\x01\n\x0e\x41ggregatedList\x12\x35.google.cloud.compute.v1.AggregatedListRoutersRequest\x1a-.google.cloud.compute.v1.RouterAggregatedList\"C\xda\x41\x07project\x82\xd3\xe4\x93\x02\x33\x12\x31/compute/v1/projects/{project}/aggregated/routers\x12\xcf\x01\n\x06\x44\x65lete\x12,.google.cloud.compute.v1.DeleteRouterRequest\x1a\".google.cloud.compute.v1.Operation\"s\xda\x41\x15project,region,router\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x42*@/compute/v1/projects/{project}/regions/{region}/routers/{router}\x12\xf8\x01\n\x11\x44\x65leteRoutePolicy\x12\x37.google.cloud.compute.v1.DeleteRoutePolicyRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\x85\x01\xda\x41\x15project,region,router\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02T\"R/compute/v1/projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy\x12\xb3\x01\n\x03Get\x12).google.cloud.compute.v1.GetRouterRequest\x1a\x1f.google.cloud.compute.v1.Router\"`\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/routers/{router}\x12\xdd\x01\n\x0cGetNatIpInfo\x12\x32.google.cloud.compute.v1.GetNatIpInfoRouterRequest\x1a*.google.cloud.compute.v1.NatIpInfoResponse\"m\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02O\x12M/compute/v1/projects/{project}/regions/{region}/routers/{router}/getNatIpInfo\x12\xf5\x01\n\x11GetNatMappingInfo\x12\x38.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest\x1a\x32.google.cloud.compute.v1.VmEndpointNatMappingsList\"r\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo\x12\xef\x01\n\x0eGetRoutePolicy\x12\x34.google.cloud.compute.v1.GetRoutePolicyRouterRequest\x1a\x36.google.cloud.compute.v1.RoutersGetRoutePolicyResponse\"o\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02Q\x12O/compute/v1/projects/{project}/regions/{region}/routers/{router}/getRoutePolicy\x12\xe9\x01\n\x0fGetRouterStatus\x12\x35.google.cloud.compute.v1.GetRouterStatusRouterRequest\x1a-.google.cloud.compute.v1.RouterStatusResponse\"p\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02R\x12P/compute/v1/projects/{project}/regions/{region}/routers/{router}/getRouterStatus\x12\xe1\x01\n\x06Insert\x12,.google.cloud.compute.v1.InsertRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\x84\x01\xda\x41\x1eproject,region,router_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02J\"7/compute/v1/projects/{project}/regions/{region}/routers:\x0frouter_resource\x12\xaa\x01\n\x04List\x12+.google.cloud.compute.v1.ListRoutersRequest\x1a#.google.cloud.compute.v1.RouterList\"P\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x39\x12\x37/compute/v1/projects/{project}/regions/{region}/routers\x12\xe4\x01\n\rListBgpRoutes\x12\x34.google.cloud.compute.v1.ListBgpRoutesRoutersRequest\x1a-.google.cloud.compute.v1.RoutersListBgpRoutes\"n\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02P\x12N/compute/v1/projects/{project}/regions/{region}/routers/{router}/listBgpRoutes\x12\xf4\x01\n\x11ListRoutePolicies\x12\x38.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest\x1a\x31.google.cloud.compute.v1.RoutersListRoutePolicies\"r\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/regions/{region}/routers/{router}/listRoutePolicies\x12\xef\x01\n\x05Patch\x12+.google.cloud.compute.v1.PatchRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\x94\x01\xda\x41%project,region,router,router_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S2@/compute/v1/projects/{project}/regions/{region}/routers/{router}:\x0frouter_resource\x12\xa2\x02\n\x10PatchRoutePolicy\x12\x36.google.cloud.compute.v1.PatchRoutePolicyRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\xb1\x01\xda\x41+project,region,router,route_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02j\"Q/compute/v1/projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy:\x15route_policy_resource\x12\xf5\x01\n\x07Preview\x12-.google.cloud.compute.v1.PreviewRouterRequest\x1a/.google.cloud.compute.v1.RoutersPreviewResponse\"\x89\x01\xda\x41%project,region,router,router_resource\x82\xd3\xe4\x93\x02[\"H/compute/v1/projects/{project}/regions/{region}/routers/{router}/preview:\x0frouter_resource\x12\xf1\x01\n\x06Update\x12,.google.cloud.compute.v1.UpdateRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\x94\x01\xda\x41%project,region,router,router_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S\x1a@/compute/v1/projects/{project}/regions/{region}/routers/{router}:\x0frouter_resource\x12\xa5\x02\n\x11UpdateRoutePolicy\x12\x37.google.cloud.compute.v1.UpdateRoutePolicyRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\xb2\x01\xda\x41+project,region,router,route_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02k\"R/compute/v1/projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy:\x15route_policy_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc0\x06\n\x06Routes\x12\xba\x01\n\x06\x44\x65lete\x12+.google.cloud.compute.v1.DeleteRouteRequest\x1a\".google.cloud.compute.v1.Operation\"_\xda\x41\rproject,route\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x36*4/compute/v1/projects/{project}/global/routes/{route}\x12\x9d\x01\n\x03Get\x12(.google.cloud.compute.v1.GetRouteRequest\x1a\x1e.google.cloud.compute.v1.Route\"L\xda\x41\rproject,route\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/global/routes/{route}\x12\xcb\x01\n\x06Insert\x12+.google.cloud.compute.v1.InsertRouteRequest\x1a\".google.cloud.compute.v1.Operation\"p\xda\x41\x16project,route_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02>\",/compute/v1/projects/{project}/global/routes:\x0eroute_resource\x12\x96\x01\n\x04List\x12*.google.cloud.compute.v1.ListRoutesRequest\x1a\".google.cloud.compute.v1.RouteList\">\xda\x41\x07project\x82\xd3\xe4\x93\x02.\x12,/compute/v1/projects/{project}/global/routes\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xef\x18\n\x10SecurityPolicies\x12\xa9\x02\n\x07\x41\x64\x64Rule\x12\x35.google.cloud.compute.v1.AddRuleSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc2\x01\xda\x41\x35project,security_policy,security_policy_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02q\"P/compute/v1/projects/{project}/global/securityPolicies/{security_policy}/addRule:\x1dsecurity_policy_rule_resource\x12\xd7\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest\x1a\x37.google.cloud.compute.v1.SecurityPoliciesAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/securityPolicies\x12\xe1\x01\n\x06\x44\x65lete\x12\x34.google.cloud.compute.v1.DeleteSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"}\xda\x41\x17project,security_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02J*H/compute/v1/projects/{project}/global/securityPolicies/{security_policy}\x12\xcd\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetSecurityPolicyRequest\x1a\'.google.cloud.compute.v1.SecurityPolicy\"j\xda\x41\x17project,security_policy\x82\xd3\xe4\x93\x02J\x12H/compute/v1/projects/{project}/global/securityPolicies/{security_policy}\x12\xe1\x01\n\x07GetRule\x12\x35.google.cloud.compute.v1.GetRuleSecurityPolicyRequest\x1a+.google.cloud.compute.v1.SecurityPolicyRule\"r\xda\x41\x17project,security_policy\x82\xd3\xe4\x93\x02R\x12P/compute/v1/projects/{project}/global/securityPolicies/{security_policy}/getRule\x12\xf3\x01\n\x06Insert\x12\x34.google.cloud.compute.v1.InsertSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x8e\x01\xda\x41 project,security_policy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02R\"6/compute/v1/projects/{project}/global/securityPolicies:\x18security_policy_resource\x12\xb3\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListSecurityPoliciesRequest\x1a+.google.cloud.compute.v1.SecurityPolicyList\"H\xda\x41\x07project\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/global/securityPolicies\x12\xae\x02\n\x1fListPreconfiguredExpressionSets\x12O.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest\x1aP.google.cloud.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse\"h\xda\x41\x07project\x82\xd3\xe4\x93\x02X\x12V/compute/v1/projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets\x12\x93\x02\n\x05Patch\x12\x33.google.cloud.compute.v1.PatchSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xb0\x01\xda\x41\x30project,security_policy,security_policy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x64\x32H/compute/v1/projects/{project}/global/securityPolicies/{security_policy}:\x18security_policy_resource\x12\xaf\x02\n\tPatchRule\x12\x37.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc4\x01\xda\x41\x35project,security_policy,security_policy_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02s\"R/compute/v1/projects/{project}/global/securityPolicies/{security_policy}/patchRule:\x1dsecurity_policy_rule_resource\x12\xf5\x01\n\nRemoveRule\x12\x38.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41\x17project,security_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02U\"S/compute/v1/projects/{project}/global/securityPolicies/{security_policy}/removeRule\x12\xab\x02\n\tSetLabels\x12\x37.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02q\"K/compute/v1/projects/{project}/global/securityPolicies/{resource}/setLabels:\"global_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf0\x13\n\x12ServiceAttachments\x12\xdc\x01\n\x0e\x41ggregatedList\x12@.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest\x1a\x38.google.cloud.compute.v1.ServiceAttachmentAggregatedList\"N\xda\x41\x07project\x82\xd3\xe4\x93\x02>\x12/compute/v1/projects/{project}/global/sslPolicies/{ssl_policy}\x12\xb4\x01\n\x03Get\x12,.google.cloud.compute.v1.GetSslPolicyRequest\x1a\".google.cloud.compute.v1.SslPolicy\"[\xda\x41\x12project,ssl_policy\x82\xd3\xe4\x93\x02@\x12>/compute/v1/projects/{project}/global/sslPolicies/{ssl_policy}\x12\xde\x01\n\x06Insert\x12/.google.cloud.compute.v1.InsertSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x7f\xda\x41\x1bproject,ssl_policy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02H\"1/compute/v1/projects/{project}/global/sslPolicies:\x13ssl_policy_resource\x12\xa6\x01\n\x04List\x12/.google.cloud.compute.v1.ListSslPoliciesRequest\x1a(.google.cloud.compute.v1.SslPoliciesList\"C\xda\x41\x07project\x82\xd3\xe4\x93\x02\x33\x12\x31/compute/v1/projects/{project}/global/sslPolicies\x12\xf7\x01\n\x15ListAvailableFeatures\x12@.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest\x1a\x41.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse\"Y\xda\x41\x07project\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/global/sslPolicies/listAvailableFeatures\x12\xf5\x01\n\x05Patch\x12..google.cloud.compute.v1.PatchSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x97\x01\xda\x41&project,ssl_policy,ssl_policy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02U2>/compute/v1/projects/{project}/global/sslPolicies/{ssl_policy}:\x13ssl_policy_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb5\x06\n\x10StoragePoolTypes\x12\xd6\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListStoragePoolTypesRequest\x1a\x36.google.cloud.compute.v1.StoragePoolTypeAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/storagePoolTypes\x12\xde\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetStoragePoolTypeRequest\x1a(.google.cloud.compute.v1.StoragePoolType\"y\xda\x41\x1eproject,zone,storage_pool_type\x82\xd3\xe4\x93\x02R\x12P/compute/v1/projects/{project}/zones/{zone}/storagePoolTypes/{storage_pool_type}\x12\xbf\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListStoragePoolTypesRequest\x1a,.google.cloud.compute.v1.StoragePoolTypeList\"S\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02>\x12\x12.google.cloud.compute.v1.AggregatedListTargetTcpProxiesRequest\x1a\x35.google.cloud.compute.v1.TargetTcpProxyAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/targetTcpProxies\x12\xe3\x01\n\x06\x44\x65lete\x12\x34.google.cloud.compute.v1.DeleteTargetTcpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x7f\xda\x41\x18project,target_tcp_proxy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02K*I/compute/v1/projects/{project}/global/targetTcpProxies/{target_tcp_proxy}\x12\xcf\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetTargetTcpProxyRequest\x1a\'.google.cloud.compute.v1.TargetTcpProxy\"l\xda\x41\x18project,target_tcp_proxy\x82\xd3\xe4\x93\x02K\x12I/compute/v1/projects/{project}/global/targetTcpProxies/{target_tcp_proxy}\x12\xf5\x01\n\x06Insert\x12\x34.google.cloud.compute.v1.InsertTargetTcpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41!project,target_tcp_proxy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02S\"6/compute/v1/projects/{project}/global/targetTcpProxies:\x19target_tcp_proxy_resource\x12\xb3\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListTargetTcpProxiesRequest\x1a+.google.cloud.compute.v1.TargetTcpProxyList\"H\xda\x41\x07project\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/global/targetTcpProxies\x12\xfe\x02\n\x11SetBackendService\x12?.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x83\x02\xda\x41Pproject,target_tcp_proxy,target_tcp_proxies_set_backend_service_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x96\x01\"[/compute/v1/projects/{project}/global/targetTcpProxies/{target_tcp_proxy}/setBackendService:7target_tcp_proxies_set_backend_service_request_resource\x12\xef\x02\n\x0eSetProxyHeader\x12<.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xfa\x01\xda\x41Mproject,target_tcp_proxy,target_tcp_proxies_set_proxy_header_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x90\x01\"X/compute/v1/projects/{project}/global/targetTcpProxies/{target_tcp_proxy}/setProxyHeader:4target_tcp_proxies_set_proxy_header_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xec\x0c\n\x11TargetVpnGateways\x12\xd9\x01\n\x0e\x41ggregatedList\x12?.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest\x1a\x37.google.cloud.compute.v1.TargetVpnGatewayAggregatedList\"M\xda\x41\x07project\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/aggregated/targetVpnGateways\x12\xfc\x01\n\x06\x44\x65lete\x12\x36.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\x95\x01\xda\x41!project,region,target_vpn_gateway\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02X*V/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{target_vpn_gateway}\x12\xea\x01\n\x03Get\x12\x33.google.cloud.compute.v1.GetTargetVpnGatewayRequest\x1a).google.cloud.compute.v1.TargetVpnGateway\"\x82\x01\xda\x41!project,region,target_vpn_gateway\x82\xd3\xe4\x93\x02X\x12V/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{target_vpn_gateway}\x12\x8d\x02\n\x06Insert\x12\x36.google.cloud.compute.v1.InsertTargetVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\xa6\x01\xda\x41*project,region,target_vpn_gateway_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02`\"A/compute/v1/projects/{project}/regions/{region}/targetVpnGateways:\x1btarget_vpn_gateway_resource\x12\xc8\x01\n\x04List\x12\x35.google.cloud.compute.v1.ListTargetVpnGatewaysRequest\x1a-.google.cloud.compute.v1.TargetVpnGatewayList\"Z\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/regions/{region}/targetVpnGateways\x12\xbf\x02\n\tSetLabels\x12\x39.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\xd2\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02|\"V/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels:\"region_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x9e\x10\n\x07UrlMaps\x12\xbc\x01\n\x0e\x41ggregatedList\x12\x35.google.cloud.compute.v1.AggregatedListUrlMapsRequest\x1a..google.cloud.compute.v1.UrlMapsAggregatedList\"C\xda\x41\x07project\x82\xd3\xe4\x93\x02\x33\x12\x31/compute/v1/projects/{project}/aggregated/urlMaps\x12\xc0\x01\n\x06\x44\x65lete\x12,.google.cloud.compute.v1.DeleteUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"d\xda\x41\x0fproject,url_map\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x39*7/compute/v1/projects/{project}/global/urlMaps/{url_map}\x12\xa4\x01\n\x03Get\x12).google.cloud.compute.v1.GetUrlMapRequest\x1a\x1f.google.cloud.compute.v1.UrlMap\"Q\xda\x41\x0fproject,url_map\x82\xd3\xe4\x93\x02\x39\x12\x37/compute/v1/projects/{project}/global/urlMaps/{url_map}\x12\xd1\x01\n\x06Insert\x12,.google.cloud.compute.v1.InsertUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"u\xda\x41\x18project,url_map_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x41\"-/compute/v1/projects/{project}/global/urlMaps:\x10url_map_resource\x12\xa6\x02\n\x0fInvalidateCache\x12\x35.google.cloud.compute.v1.InvalidateCacheUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"\xb7\x01\xda\x41\x30project,url_map,cache_invalidation_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02k\"G/compute/v1/projects/{project}/global/urlMaps/{url_map}/invalidateCache: cache_invalidation_rule_resource\x12\x99\x01\n\x04List\x12+.google.cloud.compute.v1.ListUrlMapsRequest\x1a#.google.cloud.compute.v1.UrlMapList\"?\xda\x41\x07project\x82\xd3\xe4\x93\x02/\x12-/compute/v1/projects/{project}/global/urlMaps\x12\xe2\x01\n\x05Patch\x12+.google.cloud.compute.v1.PatchUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41 project,url_map,url_map_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02K27/compute/v1/projects/{project}/global/urlMaps/{url_map}:\x10url_map_resource\x12\xe4\x01\n\x06Update\x12,.google.cloud.compute.v1.UpdateUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41 project,url_map,url_map_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02K\x1a\x37/compute/v1/projects/{project}/global/urlMaps/{url_map}:\x10url_map_resource\x12\x90\x02\n\x08Validate\x12..google.cloud.compute.v1.ValidateUrlMapRequest\x1a\x30.google.cloud.compute.v1.UrlMapsValidateResponse\"\xa1\x01\xda\x41\x32project,url_map,url_maps_validate_request_resource\x82\xd3\xe4\x93\x02\x66\"@/compute/v1/projects/{project}/global/urlMaps/{url_map}/validate:\"url_maps_validate_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x9f\x10\n\x0bVpnGateways\x12\xc7\x01\n\x0e\x41ggregatedList\x12\x39.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest\x1a\x31.google.cloud.compute.v1.VpnGatewayAggregatedList\"G\xda\x41\x07project\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/aggregated/vpnGateways\x12\xe2\x01\n\x06\x44\x65lete\x12\x30.google.cloud.compute.v1.DeleteVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\x81\x01\xda\x41\x1aproject,region,vpn_gateway\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02K*I/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}\x12\xc9\x01\n\x03Get\x12-.google.cloud.compute.v1.GetVpnGatewayRequest\x1a#.google.cloud.compute.v1.VpnGateway\"n\xda\x41\x1aproject,region,vpn_gateway\x82\xd3\xe4\x93\x02K\x12I/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}\x12\xf1\x01\n\tGetStatus\x12\x33.google.cloud.compute.v1.GetStatusVpnGatewayRequest\x1a\x35.google.cloud.compute.v1.VpnGatewaysGetStatusResponse\"x\xda\x41\x1aproject,region,vpn_gateway\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}/getStatus\x12\xf3\x01\n\x06Insert\x12\x30.google.cloud.compute.v1.InsertVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\x92\x01\xda\x41#project,region,vpn_gateway_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S\";/compute/v1/projects/{project}/regions/{region}/vpnGateways:\x14vpn_gateway_resource\x12\xb6\x01\n\x04List\x12/.google.cloud.compute.v1.ListVpnGatewaysRequest\x1a\'.google.cloud.compute.v1.VpnGatewayList\"T\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/regions/{region}/vpnGateways\x12\xb3\x02\n\tSetLabels\x12\x33.google.cloud.compute.v1.SetLabelsVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\xcc\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02v\"P/compute/v1/projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels:\"region_set_labels_request_resource\x12\xc7\x02\n\x12TestIamPermissions\x12<.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc0\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02~\"Y/compute/v1/projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xca\x0b\n\nVpnTunnels\x12\xc4\x01\n\x0e\x41ggregatedList\x12\x38.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest\x1a\x30.google.cloud.compute.v1.VpnTunnelAggregatedList\"F\xda\x41\x07project\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/aggregated/vpnTunnels\x12\xdd\x01\n\x06\x44\x65lete\x12/.google.cloud.compute.v1.DeleteVpnTunnelRequest\x1a\".google.cloud.compute.v1.Operation\"~\xda\x41\x19project,region,vpn_tunnel\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02I*G/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{vpn_tunnel}\x12\xc4\x01\n\x03Get\x12,.google.cloud.compute.v1.GetVpnTunnelRequest\x1a\".google.cloud.compute.v1.VpnTunnel\"k\xda\x41\x19project,region,vpn_tunnel\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{vpn_tunnel}\x12\xef\x01\n\x06Insert\x12/.google.cloud.compute.v1.InsertVpnTunnelRequest\x1a\".google.cloud.compute.v1.Operation\"\x8f\x01\xda\x41\"project,region,vpn_tunnel_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02Q\":/compute/v1/projects/{project}/regions/{region}/vpnTunnels:\x13vpn_tunnel_resource\x12\xb3\x01\n\x04List\x12..google.cloud.compute.v1.ListVpnTunnelsRequest\x1a&.google.cloud.compute.v1.VpnTunnelList\"S\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/regions/{region}/vpnTunnels\x12\xb1\x02\n\tSetLabels\x12\x32.google.cloud.compute.v1.SetLabelsVpnTunnelRequest\x1a\".google.cloud.compute.v1.Operation\"\xcb\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02u\"O/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels:\"region_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xa3\x07\n\x0eZoneOperations\x12\xd8\x01\n\x06\x44\x65lete\x12\x33.google.cloud.compute.v1.DeleteZoneOperationRequest\x1a\x34.google.cloud.compute.v1.DeleteZoneOperationResponse\"c\xda\x41\x16project,zone,operation\x82\xd3\xe4\x93\x02\x44*B/compute/v1/projects/{project}/zones/{zone}/operations/{operation}\x12\xc3\x01\n\x03Get\x12\x30.google.cloud.compute.v1.GetZoneOperationRequest\x1a\".google.cloud.compute.v1.Operation\"f\xda\x41\x16project,zone,operation\x90N\x01\x82\xd3\xe4\x93\x02\x44\x12\x42/compute/v1/projects/{project}/zones/{zone}/operations/{operation}\x12\xb1\x01\n\x04List\x12\x32.google.cloud.compute.v1.ListZoneOperationsRequest\x1a&.google.cloud.compute.v1.OperationList\"M\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/zones/{zone}/operations\x12\xc7\x01\n\x04Wait\x12\x31.google.cloud.compute.v1.WaitZoneOperationRequest\x1a\".google.cloud.compute.v1.Operation\"h\xda\x41\x16project,zone,operation\x82\xd3\xe4\x93\x02I\"G/compute/v1/projects/{project}/zones/{zone}/operations/{operation}/wait\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xd1\x03\n\x05Zones\x12\x91\x01\n\x03Get\x12\'.google.cloud.compute.v1.GetZoneRequest\x1a\x1d.google.cloud.compute.v1.Zone\"B\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02-\x12+/compute/v1/projects/{project}/zones/{zone}\x12\x8c\x01\n\x04List\x12).google.cloud.compute.v1.ListZonesRequest\x1a!.google.cloud.compute.v1.ZoneList\"6\xda\x41\x07project\x82\xd3\xe4\x93\x02&\x12$/compute/v1/projects/{project}/zones\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platformB\xa7\x01\n\x1b\x63om.google.cloud.compute.v1P\x01Z5cloud.google.com/go/compute/apiv1/computepb;computepb\xaa\x02\x17Google.Cloud.Compute.V1\xca\x02\x17Google\\Cloud\\Compute\\V1\xea\x02\x1aGoogle::Cloud::Compute::V1b\x06proto3" +descriptor_data = "\n%google/cloud/compute/v1/compute.proto\x12\x17google.cloud.compute.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/extended_operations.proto\x1a\x19google/protobuf/any.proto\"\xda\x01\n\x0e\x41WSV4Signature\x12\x1b\n\naccess_key\x18\x84\xe2\xcc\xdf\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\raccess_key_id\x18\xb6\xe4\xd9\x8b\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x61\x63\x63\x65ss_key_version\x18\x9d\xe1\xa2& \x01(\tH\x02\x88\x01\x01\x12\x1d\n\rorigin_region\x18\xad\xfc\xc0~ \x01(\tH\x03\x88\x01\x01\x42\r\n\x0b_access_keyB\x10\n\x0e_access_key_idB\x15\n\x13_access_key_versionB\x10\n\x0e_origin_region\"\xd5\x02\n+AbandonInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x92\x01\n:instance_group_managers_abandon_instances_request_resource\x18\xf8\xf9\x83\x99\x01 \x01(\x0b\x32\x45.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xec\x02\n1AbandonInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9f\x01\nAregion_instance_group_managers_abandon_instances_request_resource\x18\xa3\xd2\xf7\xe8\x01 \x01(\x0b\x32K.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x84\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x11\x61\x63\x63\x65lerator_count\x18\xbb\xb4\xdf\xf0\x01 \x01(\x05H\x00\x88\x01\x01\x12 \n\x10\x61\x63\x63\x65lerator_type\x18\x8e\xe1\xe8\x41 \x01(\tH\x01\x88\x01\x01\x42\x14\n\x12_accelerator_countB\x13\n\x11_accelerator_type\"\xbd\x03\n\x0f\x41\x63\x63\x65leratorType\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12*\n\x1amaximum_cards_per_instance\x18\xd2\xfa\xe5} \x01(\x05H\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x08\x88\x01\x01\x42\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x1d\n\x1b_maximum_cards_per_instanceB\x07\n\x05_nameB\x0c\n\n_self_linkB\x07\n\x05_zone\"\xce\x03\n\x1d\x41\x63\x63\x65leratorTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.AcceleratorTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.AcceleratorTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x02\n\x13\x41\x63\x63\x65leratorTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.AcceleratorType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xac\x01\n\x1a\x41\x63\x63\x65leratorTypesScopedList\x12G\n\x11\x61\x63\x63\x65lerator_types\x18\xa5\xc3\xaf\xf8\x01 \x03(\x0b\x32(.google.cloud.compute.v1.AcceleratorType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x98\x01\n\x0c\x41\x63\x63\x65lerators\x12(\n\x17guest_accelerator_count\x18\x94\xd7\xb8\xe4\x01 \x01(\x05H\x00\x88\x01\x01\x12\'\n\x16guest_accelerator_type\x18\x95\xa0\xdf\x8b\x01 \x01(\tH\x01\x88\x01\x01\x42\x1a\n\x18_guest_accelerator_countB\x19\n\x17_guest_accelerator_type\"\xc6\x05\n\x0c\x41\x63\x63\x65ssConfig\x12\x1e\n\rexternal_ipv6\x18\xdb\xd3\x81\xfe\x01 \x01(\tH\x00\x88\x01\x01\x12,\n\x1b\x65xternal_ipv6_prefix_length\x18\xcf\xfb\xfc\xca\x01 \x01(\x05H\x01\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07nat_i_p\x18\xfc\xeb\x8b\x38 \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x0cnetwork_tier\x18\xd3\xba\xdb\xf6\x01 \x01(\tH\x05\x88\x01\x01\x12\'\n\x16public_ptr_domain_name\x18\xff\xd6\xfb\x96\x01 \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x07\x88\x01\x01\x12\x1f\n\x0eset_public_ptr\x18\x95\xc0\xe6\xf9\x01 \x01(\x08H\x08\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\t\x88\x01\x01\"\x8f\x01\n\x0bNetworkTier\x12\x1a\n\x16UNDEFINED_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"E\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x12\n\x0b\x44IRECT_IPV6\x10\x9d\xb1\x8c\x02\x12\x15\n\x0eONE_TO_ONE_NAT\x10\xdd\xba\x8c(B\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_nat_i_pB\x0f\n\r_network_tierB\x19\n\x17_public_ptr_domain_nameB\x12\n\x10_security_policyB\x11\n\x0f_set_public_ptrB\x07\n\x05_type\"\x99\x02\n\x1e\x41\x64\x64\x41\x63\x63\x65ssConfigInstanceRequest\x12N\n\x16\x61\x63\x63\x65ss_config_resource\x18\x90\xff\xf6\xb8\x01 \x01(\x0b\x32%.google.cloud.compute.v1.AccessConfigB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xab\x02\n#AddAssociationFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12h\n$firewall_policy_association_resource\x18\xba\xb8\xe1{ \x01(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociationB\x03\xe0\x41\x02\x12,\n\x1creplace_existing_association\x18\xf8\xb0\xf5\x63 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x1f\n\x1d_replace_existing_associationB\r\n\x0b_request_id\"\xd5\x02\n*AddAssociationNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12h\n$firewall_policy_association_resource\x18\xba\xb8\xe1{ \x01(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociationB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12,\n\x1creplace_existing_association\x18\xf8\xb0\xf5\x63 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x1f\n\x1d_replace_existing_associationB\r\n\x0b_request_id\"\xfc\x02\n0AddAssociationRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12h\n$firewall_policy_association_resource\x18\xba\xb8\xe1{ \x01(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociationB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12,\n\x1creplace_existing_association\x18\xf8\xb0\xf5\x63 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x1f\n\x1d_replace_existing_associationB\r\n\x0b_request_id\"\xa9\x02\n\x1f\x41\x64\x64HealthCheckTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12z\n.target_pools_add_health_check_request_resource\x18\xa4\xba\xc5\x80\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x9f\x02\n\x1c\x41\x64\x64InstanceTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12s\n*target_pools_add_instance_request_resource\x18\xf4\xd3\xbb\xcc\x01 \x01(\x0b\x32\x36.google.cloud.compute.v1.TargetPoolsAddInstanceRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xaa\x02\n AddInstancesInstanceGroupRequest\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12{\n.instance_groups_add_instances_request_resource\x18\xde\xba\xac\xd8\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InstanceGroupsAddInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x8e\x02\n\x18\x41\x64\x64NodesNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12j\n&node_groups_add_nodes_request_resource\x18\xb8\xd6\xcb> \x01(\x0b\x32\x32.google.cloud.compute.v1.NodeGroupsAddNodesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xdf\x02\n2AddPacketMirroringRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\x0cmax_priority\x18\x9f\xac\x97\x9d\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0cmin_priority\x18\xf1\x81\xb4\x7f \x01(\x05H\x01\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x02\x88\x01\x01\x42\x0f\n\r_max_priorityB\x0f\n\r_min_priorityB\r\n\x0b_request_id\"\xed\x01\n\x18\x41\x64\x64PeeringNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12j\n%networks_add_peering_request_resource\x18\xb5\x8d\xb3\xb9\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.NetworksAddPeeringRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9a\x02\n\x1e\x41\x64\x64ResourcePoliciesDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12w\n,disks_add_resource_policies_request_resource\x18\xa3\xf8\xde\xec\x01 \x01(\x0b\x32\x38.google.cloud.compute.v1.DisksAddResourcePoliciesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xaa\x02\n\"AddResourcePoliciesInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x7f\n0instances_add_resource_policies_request_resource\x18\x9b\xd6\xab\xe9\x01 \x01(\x0b\x32<.google.cloud.compute.v1.InstancesAddResourcePoliciesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb2\x02\n$AddResourcePoliciesRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x84\x01\n3region_disks_add_resource_policies_request_resource\x18\x8e\xff\xc1\x87\x01 \x01(\x0b\x32>.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc7\x01\n\x1c\x41\x64\x64RuleFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd0\x02\n#AddRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\x0cmax_priority\x18\x9f\xac\x97\x9d\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0cmin_priority\x18\xf1\x81\xb4\x7f \x01(\x05H\x01\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x02\x88\x01\x01\x42\x0f\n\r_max_priorityB\x0f\n\r_min_priorityB\r\n\x0b_request_id\"\xf7\x02\n)AddRuleRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\x0cmax_priority\x18\x9f\xac\x97\x9d\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0cmin_priority\x18\xf1\x81\xb4\x7f \x01(\x05H\x01\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x02\x88\x01\x01\x42\x0f\n\r_max_priorityB\x0f\n\r_min_priorityB\r\n\x0b_request_id\"\x97\x02\n\"AddRuleRegionSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dsecurity_policy_rule_resource\x18\xc3\xba\x82\xc0\x01 \x01(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_validate_only\"\xf0\x01\n\x1c\x41\x64\x64RuleSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dsecurity_policy_rule_resource\x18\xc3\xba\x82\xc0\x01 \x01(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRuleB\x03\xe0\x41\x02\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_validate_only\"\xe4\x01\n#AddSignedUrlKeyBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12O\n\x17signed_url_key_resource\x18\x81\xa3\x9b\xda\x01 \x01(\x0b\x32%.google.cloud.compute.v1.SignedUrlKeyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe7\x01\n$AddSignedUrlKeyBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12O\n\x17signed_url_key_resource\x18\x81\xa3\x9b\xda\x01 \x01(\x0b\x32%.google.cloud.compute.v1.SignedUrlKeyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe6\x0c\n\x07\x41\x64\x64ress\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0c\x61\x64\x64ress_type\x18\xa5\x89\x84~ \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x1b\n\nip_version\x18\xc0\xf3\xd2\x8c\x01 \x01(\tH\x05\x88\x01\x01\x12\"\n\x12ipv6_endpoint_type\x18\xcc\xfe\xbe. \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x08\x88\x01\x01\x12@\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32,.google.cloud.compute.v1.Address.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\n\x88\x01\x01\x12\x1d\n\x0cnetwork_tier\x18\xd3\xba\xdb\xf6\x01 \x01(\tH\x0b\x88\x01\x01\x12\x1e\n\rprefix_length\x18\xb3\xba\xa3\xd8\x01 \x01(\x05H\x0c\x88\x01\x01\x12\x18\n\x07purpose\x18\x9e\xfa\xef\x96\x01 \x01(\tH\r\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0e\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0f\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x10\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x11\x88\x01\x01\x12\x10\n\x05users\x18\x88\x9c\x9a\x35 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"e\n\x0b\x41\x64\x64ressType\x12\x1a\n\x16UNDEFINED_ADDRESS_TYPE\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12\x17\n\x10UNSPECIFIED_TYPE\x10\xe2\xee\xdb\x19\"[\n\tIpVersion\x12\x18\n\x14UNDEFINED_IP_VERSION\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\x12\x1a\n\x13UNSPECIFIED_VERSION\x10\x90\xcf\xb5\n\"K\n\x10Ipv6EndpointType\x12 \n\x1cUNDEFINED_IPV6_ENDPOINT_TYPE\x10\x00\x12\x0c\n\x05NETLB\x10\xb3\x97\xaf#\x12\x07\n\x02VM\x10\xb7\x15\"\x8f\x01\n\x0bNetworkTier\x12\x1a\n\x16UNDEFINED_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"\xe2\x01\n\x07Purpose\x12\x15\n\x11UNDEFINED_PURPOSE\x10\x00\x12\x14\n\x0c\x44NS_RESOLVER\x10\xfc\xdc\x83\xe3\x01\x12\x13\n\x0cGCE_ENDPOINT\x10\xab\xc4\xf5m\x12\x1a\n\x12IPSEC_INTERCONNECT\x10\x83\xd2\xaa\xa2\x01\x12\x0f\n\x08NAT_AUTO\x10\xad\xb4\x85N\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x12\n\nSERVERLESS\x10\xdc\xc6\xfd\x80\x01\x12\x1f\n\x17SHARED_LOADBALANCER_VIP\x10\xd4\xd3\xb3\x8c\x01\x12\x13\n\x0bVPC_PEERING\x10\xaa\xf3\x8e\xbf\x01\"R\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\r\n\x06IN_USE\x10\xcd\xce\xa5\x08\x12\x10\n\x08RESERVED\x10\xa8\xf6\x8d\xce\x01\x12\x11\n\tRESERVING\x10\xd9\xf4\xaf\xf5\x01\x42\n\n\x08_addressB\x0f\n\r_address_typeB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\r\n\x0b_ip_versionB\x15\n\x13_ipv6_endpoint_typeB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\n\n\x08_networkB\x0f\n\r_network_tierB\x10\n\x0e_prefix_lengthB\n\n\x08_purposeB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_statusB\r\n\x0b_subnetwork\"\xb7\x03\n\x15\x41\x64\x64ressAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12K\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x39.google.cloud.compute.v1.AddressAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aZ\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.compute.v1.AddressesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x9f\x02\n\x0b\x41\x64\x64ressList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x32\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32 .google.cloud.compute.v1.Address\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x95\x01\n\x13\x41\x64\x64ressesScopedList\x12\x37\n\taddresses\x18\xa2\xf7\x81\xa1\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Address\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xcd\x04\n\x17\x41\x64vancedMachineFeatures\x12,\n\x1c\x65nable_nested_virtualization\x18\x85\xcb\xf7\x07 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x16\x65nable_uefi_networking\x18\xa4\xb1\xbf\x9f\x01 \x01(\x08H\x01\x88\x01\x01\x12,\n\x1bperformance_monitoring_unit\x18\x8c\xc2\xb9\xfe\x01 \x01(\tH\x02\x88\x01\x01\x12!\n\x10threads_per_core\x18\xd7\xda\x91\xa8\x01 \x01(\x05H\x03\x88\x01\x01\x12\x1b\n\nturbo_mode\x18\xa4\x8e\xba\xce\x01 \x01(\tH\x04\x88\x01\x01\x12\"\n\x12visible_core_count\x18\xdc\xf4\x8f\\ \x01(\x05H\x05\x88\x01\x01\"\xb1\x01\n\x19PerformanceMonitoringUnit\x12)\n%UNDEFINED_PERFORMANCE_MONITORING_UNIT\x10\x00\x12\x14\n\rARCHITECTURAL\x10\xdd\xb1\xfbI\x12\x10\n\x08\x45NHANCED\x10\xf6\x86\xb2\xe3\x01\x12/\n\'PERFORMANCE_MONITORING_UNIT_UNSPECIFIED\x10\xc4\xf8\xd4\xcc\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x19\n\x17_enable_uefi_networkingB\x1e\n\x1c_performance_monitoring_unitB\x13\n\x11_threads_per_coreB\r\n\x0b_turbo_modeB\x15\n\x13_visible_core_count\"\xa7\x03\n%AggregatedListAcceleratorTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa0\x03\n\x1e\x41ggregatedListAddressesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListAutoscalersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa6\x03\n$AggregatedListBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa0\x03\n\x1e\x41ggregatedListDiskTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\x9c\x03\n\x1a\x41ggregatedListDisksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa6\x03\n$AggregatedListForwardingRulesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListGlobalOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa3\x03\n!AggregatedListHealthChecksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xac\x03\n*AggregatedListInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa5\x03\n#AggregatedListInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa8\x03\n&AggregatedListInstanceTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa0\x03\n\x1e\x41ggregatedListInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListInstantSnapshotsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xae\x03\n,AggregatedListInterconnectAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa3\x03\n!AggregatedListMachineTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa9\x03\n\'AggregatedListNetworkAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xb2\x03\n0AggregatedListNetworkEdgeSecurityServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xac\x03\n*AggregatedListNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xae\x03\n,AggregatedListNetworkFirewallPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa1\x03\n\x1f\x41ggregatedListNodeGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa4\x03\n\"AggregatedListNodeTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa0\x03\n\x1e\x41ggregatedListNodeTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListPacketMirroringsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xae\x03\n,AggregatedListPublicDelegatedPrefixesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa8\x03\n&AggregatedListRegionCommitmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa3\x03\n!AggregatedListReservationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListResourcePoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\x9e\x03\n\x1c\x41ggregatedListRoutersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListSecurityPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa9\x03\n\'AggregatedListServiceAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa6\x03\n$AggregatedListSslCertificatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListStoragePoolTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa3\x03\n!AggregatedListStoragePoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListSubnetworksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa8\x03\n&AggregatedListTargetHttpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa9\x03\n\'AggregatedListTargetHttpsProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa6\x03\n$AggregatedListTargetInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListTargetPoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa7\x03\n%AggregatedListTargetTcpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa8\x03\n&AggregatedListTargetVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\x9e\x03\n\x1c\x41ggregatedListUrlMapsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa2\x03\n AggregatedListVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\xa1\x03\n\x1f\x41ggregatedListVpnTunnelsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12include_all_scopes\x18\xf4\xe1\xcc\xba\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x12\'\n\x16service_project_number\x18\xf9\xab\x85\x97\x01 \x01(\x03H\x06\x88\x01\x01\x42\t\n\x07_filterB\x15\n\x13_include_all_scopesB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x19\n\x17_service_project_number\"\x81\x01\n\x0c\x41liasIpRange\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x00\x88\x01\x01\x12&\n\x15subnetwork_range_name\x18\xbe\xb2\x81\xb9\x01 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\x92\x06\n\x1e\x41llocationAggregateReservation\x12i\n\x10in_use_resources\x18\xd3\xf7\x83\xc3\x01 \x03(\x0b\x32K.google.cloud.compute.v1.AllocationAggregateReservationReservedResourceInfo\x12j\n\x12reserved_resources\x18\xce\xe3\xd5\x65 \x03(\x0b\x32K.google.cloud.compute.v1.AllocationAggregateReservationReservedResourceInfo\x12\x19\n\tvm_family\x18\xec\xbb\xce; \x01(\tH\x00\x88\x01\x01\x12\x1e\n\rworkload_type\x18\x82\xfe\xb0\x82\x01 \x01(\tH\x01\x88\x01\x01\"\xdd\x02\n\x08VmFamily\x12\x17\n\x13UNDEFINED_VM_FAMILY\x10\x00\x12%\n\x1eVM_FAMILY_CLOUD_TPU_DEVICE_CT3\x10\xfc\x8d\xb7\x14\x12+\n$VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L\x10\xe3\x82\xc1\x33\x12/\n(VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP\x10\xf3\xd6\xf5\x08\x12/\n\'VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E\x10\x95\xc9\x9c\xbe\x01\x12*\n\"VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P\x10\xb8\xd1\xda\xf6\x01\x12*\n\"VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P\x10\xd7\xd1\xda\xf6\x01\x12*\n\"VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P\x10\xf6\xd1\xda\xf6\x01\"^\n\x0cWorkloadType\x12\x1b\n\x17UNDEFINED_WORKLOAD_TYPE\x10\x00\x12\x0c\n\x05\x42\x41TCH\x10\x9a\xbe\x83\x1e\x12\x0e\n\x07SERVING\x10\xec\xa7\xbd\x08\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x0c\n\n_vm_familyB\x10\n\x0e_workload_type\"\xba\x01\n2AllocationAggregateReservationReservedResourceInfo\x12t\n\x0b\x61\x63\x63\x65lerator\x18\xeb\xc4\xab\xca\x01 \x01(\x0b\x32V.google.cloud.compute.v1.AllocationAggregateReservationReservedResourceInfoAcceleratorH\x00\x88\x01\x01\x42\x0e\n\x0c_accelerator\"\xb0\x01\n=AllocationAggregateReservationReservedResourceInfoAccelerator\x12\"\n\x11\x61\x63\x63\x65lerator_count\x18\xbb\xb4\xdf\xf0\x01 \x01(\x05H\x00\x88\x01\x01\x12 \n\x10\x61\x63\x63\x65lerator_type\x18\x8e\xe1\xe8\x41 \x01(\tH\x01\x88\x01\x01\x42\x14\n\x12_accelerator_countB\x13\n\x11_accelerator_type\"\xe8\x01\n\"AllocationReservationSharingPolicy\x12#\n\x12service_share_type\x18\xe4\x8e\xab\xf5\x01 \x01(\tH\x00\x88\x01\x01\"\x85\x01\n\x10ServiceShareType\x12 \n\x1cUNDEFINED_SERVICE_SHARE_TYPE\x10\x00\x12\x11\n\tALLOW_ALL\x10\xeb\xb6\xe0\xe2\x01\x12\x14\n\x0c\x44ISALLOW_ALL\x10\xbd\xdd\xba\x84\x01\x12&\n\x1eSERVICE_SHARE_TYPE_UNSPECIFIED\x10\xfc\xa5\x88\x85\x01\x42\x15\n\x13_service_share_type\"\xcb\x03\n\x18\x41llocationResourceStatus\x12X\n\x0bhealth_info\x18\xb1\xe9\x98p \x01(\x0b\x32;.google.cloud.compute.v1.AllocationResourceStatusHealthInfoH\x00\x88\x01\x01\x12\'\n\x17reservation_block_count\x18\xea\xd5\x95M \x01(\x05H\x01\x88\x01\x01\x12W\n\x17reservation_maintenance\x18\xa0\x86\xb5\xa2\x01 \x01(\x0b\x32-.google.cloud.compute.v1.GroupMaintenanceInfoH\x02\x88\x01\x01\x12o\n\x17specific_sku_allocation\x18\xef\xff\xc8] \x01(\x0b\x32\x46.google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocationH\x03\x88\x01\x01\x42\x0e\n\x0c_health_infoB\x1a\n\x18_reservation_block_countB\x1a\n\x18_reservation_maintenanceB\x1a\n\x18_specific_sku_allocation\"\xc6\x02\n\"AllocationResourceStatusHealthInfo\x12%\n\x14\x64\x65graded_block_count\x18\xcc\x8e\x91\xf5\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1e\n\rhealth_status\x18\xb5\xd6\xba\xb5\x01 \x01(\tH\x01\x88\x01\x01\x12#\n\x13healthy_block_count\x18\xbb\xfe\xd0j \x01(\x05H\x02\x88\x01\x01\"q\n\x0cHealthStatus\x12\x1b\n\x17UNDEFINED_HEALTH_STATUS\x10\x00\x12\x10\n\x08\x44\x45GRADED\x10\xae\xa6\xa0\xbd\x01\x12\x0f\n\x07HEALTHY\x10\xfd\xaa\xdb\xd1\x01\x12!\n\x19HEALTH_STATUS_UNSPECIFIED\x10\x8d\x82\xfa\xe5\x01\x42\x17\n\x15_degraded_block_countB\x10\n\x0e_health_statusB\x16\n\x14_healthy_block_count\"\xa5\x02\n-AllocationResourceStatusSpecificSKUAllocation\x12+\n\x1bsource_instance_template_id\x18\xfa\xef\x82\x35 \x01(\tH\x00\x88\x01\x01\x12r\n\x0cutilizations\x18\x91\xad\xf6\xbf\x01 \x03(\x0b\x32X.google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation.UtilizationsEntry\x1a\x33\n\x11UtilizationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x42\x1e\n\x1c_source_instance_template_id\"\xe2\x01\nFAllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\tinterface\x18\xb9\xda\xd5\xef\x01 \x01(\tH\x01\x88\x01\x01\">\n\tInterface\x12\x17\n\x13UNDEFINED_INTERFACE\x10\x00\x12\x0b\n\x04NVME\x10\xe0\x82\x93\x01\x12\x0b\n\x04SCSI\x10\xa6\x81\x9b\x01\x42\x0f\n\r_disk_size_gbB\x0c\n\n_interface\"\x97\x03\n9AllocationSpecificSKUAllocationReservedInstanceProperties\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\x12v\n\nlocal_ssds\x18\xc3\x8e\xd3m \x03(\x0b\x32_.google.cloud.compute.v1.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk\x12\x1e\n\rlocation_hint\x18\xd1\x81\x92\xa7\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x01\x88\x01\x01\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_location_hintB\x0f\n\r_machine_typeB\x13\n\x11_min_cpu_platform\"\xfe\x02\n AllocationSpecificSKUReservation\x12\x1e\n\rassured_count\x18\xcd\xf8\x8a\x86\x01 \x01(\x03H\x00\x88\x01\x01\x12\x15\n\x05\x63ount\x18\x8f\xa2\x9d- \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x0cin_use_count\x18\xbd\xab\xa6\xeb\x01 \x01(\x03H\x02\x88\x01\x01\x12w\n\x13instance_properties\x18\x9d\x9e\xd8\x66 \x01(\x0b\x32R.google.cloud.compute.v1.AllocationSpecificSKUAllocationReservedInstancePropertiesH\x03\x88\x01\x01\x12)\n\x18source_instance_template\x18\xc0\xc3\xc1\x9e\x01 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_assured_countB\x08\n\x06_countB\x0f\n\r_in_use_countB\x16\n\x14_instance_propertiesB\x1b\n\x19_source_instance_template\"K\n\x07\x41llowed\x12\x1d\n\x0cI_p_protocol\x18\xbd\xf6\xde\xe8\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05ports\x18\x92\xf0\xf9\x32 \x03(\tB\x0f\n\r_I_p_protocol\"\xa0\x01\n&AnnouncePublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbf\x01\n%AnnouncePublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa8\x02\n2ApplyUpdatesToInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x89\x01\n6instance_group_managers_apply_updates_request_resource\x18\xd3\xf6\xce{ \x01(\x0b\x32\x41.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zone\"\xbf\x02\n8ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x96\x01\n=region_instance_group_managers_apply_updates_request_resource\x18\xfe\xe9\xad$ \x01(\x0b\x32G.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequestB\x03\xe0\x41\x02\"\x9e\x02\n\x19\x41ttachDiskInstanceRequest\x12M\n\x16\x61ttached_disk_resource\x18\x95\x92\x9a+ \x01(\x0b\x32%.google.cloud.compute.v1.AttachedDiskB\x03\xe0\x41\x02\x12\x1c\n\x0c\x66orce_attach\x18\x99\xa4\x89\x44 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x0f\n\r_force_attachB\r\n\x0b_request_id\"\xcf\x02\n7AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest\x12\x9c\x01\n@global_network_endpoint_groups_attach_endpoints_request_resource\x18\xeb\xa1\xd1\x0e \x01(\x0b\x32J.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequestB\x03\xe0\x41\x02\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x02\n1AttachNetworkEndpointsNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x8e\x01\n9network_endpoint_groups_attach_endpoints_request_resource\x18\x87\xb5 \x01(\x0b\x32\x44.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf1\x02\n7AttachNetworkEndpointsRegionNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_network_endpoint_groups_attach_endpoints_request_resource\x18\xfc\xf9\xdd\x9f\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionNetworkEndpointGroupsAttachEndpointsRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xdc\n\n\x0c\x41ttachedDisk\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\x08H\x01\x88\x01\x01\x12\x14\n\x04\x62oot\x18\xf2\xf5\xb8\x01 \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tH\x03\x88\x01\x01\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x04\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x05\x88\x01\x01\x12\x1c\n\x0c\x66orce_attach\x18\x99\xa4\x89\x44 \x01(\x08H\x06\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x15\n\x05index\x18\xd2\xd1\xec/ \x01(\x05H\x07\x88\x01\x01\x12X\n\x11initialize_params\x18\x95\x92\xb8\x08 \x01(\x0b\x32\x35.google.cloud.compute.v1.AttachedDiskInitializeParamsH\x08\x88\x01\x01\x12\x1a\n\tinterface\x18\xb9\xda\xd5\xef\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0bsaved_state\x18\xd9\xa9\xa1\xc4\x01 \x01(\tH\x0c\x88\x01\x01\x12\\\n\x1fshielded_instance_initial_state\x18\x83\xc4\xdc[ \x01(\x0b\x32+.google.cloud.compute.v1.InitialStateConfigH\r\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x0e\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x0f\x88\x01\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\">\n\tInterface\x12\x17\n\x13UNDEFINED_INTERFACE\x10\x00\x12\x0b\n\x04NVME\x10\xe0\x82\x93\x01\x12\x0b\n\x04SCSI\x10\xa6\x81\x9b\x01\"?\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x10\n\tREAD_ONLY\x10\xb5\x99\xec+\x12\x11\n\nREAD_WRITE\x10\xd6\x97\xe4R\"_\n\nSavedState\x12\x19\n\x15UNDEFINED_SAVED_STATE\x10\x00\x12$\n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\xcf\xbf\xca\xba\x01\x12\x10\n\tPRESERVED\x10\xf8\xd6\x98y\"?\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x12\n\nPERSISTENT\x10\x97\xf5\xd5\xdb\x01\x12\x0f\n\x07SCRATCH\x10\xda\xfd\xf0\xec\x01\x42\x0f\n\r_architectureB\x0e\n\x0c_auto_deleteB\x07\n\x05_bootB\x0e\n\x0c_device_nameB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0f\n\r_force_attachB\x08\n\x06_indexB\x14\n\x12_initialize_paramsB\x0c\n\n_interfaceB\x07\n\x05_kindB\x07\n\x05_modeB\x0e\n\x0c_saved_stateB\"\n _shielded_instance_initial_stateB\t\n\x07_sourceB\x07\n\x05_type\"\x8f\x0c\n\x1c\x41ttachedDiskInitializeParams\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\tdisk_name\x18\xed\xbf\xa0, \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x03\x88\x01\x01\x12\x19\n\tdisk_type\x18\x9c\xe9\xac, \x01(\tH\x04\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x05\x88\x01\x01\x12U\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x41.google.cloud.compute.v1.AttachedDiskInitializeParams.LabelsEntry\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12 \n\x10on_update_action\x18\x8c\xd8\xc4` \x01(\tH\x06\x88\x01\x01\x12 \n\x10provisioned_iops\x18\xd4\xbd\x87Y \x01(\x03H\x07\x88\x01\x01\x12\'\n\x16provisioned_throughput\x18\x95\xbe\x88\xfb\x01 \x01(\x03H\x08\x88\x01\x01\x12\x18\n\rreplica_zones\x18\x80\xb8\x8c\x17 \x03(\t\x12q\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32N.google.cloud.compute.v1.AttachedDiskInitializeParams.ResourceManagerTagsEntry\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\t\x88\x01\x01\x12\\\n\x1bsource_image_encryption_key\x18\xab\x91\xf5\xb5\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\n\x88\x01\x01\x12\x1f\n\x0fsource_snapshot\x18\xe8\x9a\x8e< \x01(\tH\x0b\x88\x01\x01\x12_\n\x1esource_snapshot_encryption_key\x18\xda\x8e\xe7\x90\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x0c\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tH\r\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"\x8a\x01\n\x0eOnUpdateAction\x12\x1e\n\x1aUNDEFINED_ON_UPDATE_ACTION\x10\x00\x12\x15\n\rRECREATE_DISK\x10\xed\x9d\xf6\xeb\x01\x12\'\n\x1fRECREATE_DISK_IF_SOURCE_CHANGED\x10\x80\x8a\xea\xbd\x01\x12\x18\n\x11USE_EXISTING_DISK\x10\xf9\xe5\xf9nB\x0f\n\r_architectureB\x0e\n\x0c_descriptionB\x0c\n\n_disk_nameB\x0f\n\r_disk_size_gbB\x0c\n\n_disk_typeB\x1e\n\x1c_enable_confidential_computeB\x13\n\x11_on_update_actionB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x0f\n\r_source_imageB\x1e\n\x1c_source_image_encryption_keyB\x12\n\x10_source_snapshotB!\n\x1f_source_snapshot_encryption_keyB\x0f\n\r_storage_pool\"\x98\x01\n\x0b\x41uditConfig\x12\x46\n\x11\x61udit_log_configs\x18\x92\xea\xf2\xe8\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.AuditLogConfig\x12\x1b\n\x10\x65xempted_members\x18\x98\xdd\xf5n \x03(\t\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_service\"\x94\x02\n\x0e\x41uditLogConfig\x12\x1b\n\x10\x65xempted_members\x18\x98\xdd\xf5n \x03(\t\x12\'\n\x17ignore_child_exemptions\x18\x9a\x8f\xb9! \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x08log_type\x18\xd5\x9e\x9c\xc0\x01 \x01(\tH\x01\x88\x01\x01\"x\n\x07LogType\x12\x16\n\x12UNDEFINED_LOG_TYPE\x10\x00\x12\x11\n\nADMIN_READ\x10\xa6\xc9\xbe=\x12\x11\n\tDATA_READ\x10\x8b\xba\xc5\x91\x01\x12\x12\n\nDATA_WRITE\x10\xea\x85\x9b\xa2\x01\x12\x1b\n\x14LOG_TYPE_UNSPECIFIED\x10\xcd\xca\xd7IB\x1a\n\x18_ignore_child_exemptionsB\x0b\n\t_log_type\"\x9d\x07\n\nAutoscaler\x12N\n\x12\x61utoscaling_policy\x18\xd9\xe0\xeai \x01(\x0b\x32*.google.cloud.compute.v1.AutoscalingPolicyH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12 \n\x10recommended_size\x18\xe5\xf6\xfdz \x01(\x05H\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x63\n\x17scaling_schedule_status\x18\xe2\xab\x97\xde\x01 \x03(\x0b\x32>.google.cloud.compute.v1.Autoscaler.ScalingScheduleStatusEntry\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\t\x88\x01\x01\x12L\n\x0estatus_details\x18\xf5\xad\xa1\xad\x01 \x03(\x0b\x32\x30.google.cloud.compute.v1.AutoscalerStatusDetails\x12\x16\n\x06target\x18\x91\xe3\xf9[ \x01(\tH\n\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0b\x88\x01\x01\x1al\n\x1aScalingScheduleStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.ScalingScheduleStatus:\x02\x38\x01\"^\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0c\n\x05\x45RROR\x10\xe8\xb3\xcb\x1f\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x42\x15\n\x13_autoscaling_policyB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x13\n\x11_recommended_sizeB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_statusB\t\n\x07_targetB\x07\n\x05_zone\"\xbf\x03\n\x18\x41utoscalerAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.AutoscalerAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.AutoscalersScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0e\x41utoscalerList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.Autoscaler\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xcb\x06\n\x17\x41utoscalerStatusDetails\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x01\x88\x01\x01\"\xea\x05\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x1f\n\x17\x41LL_INSTANCES_UNHEALTHY\x10\xe5\x90\x8d\xc1\x01\x12%\n\x1e\x42\x41\x43KEND_SERVICE_DOES_NOT_EXIST\x10\x9a\x9a\xa3[\x12 \n\x1a\x43\x41PPED_AT_MAX_NUM_REPLICAS\x10\xd9\xd3\x1f\x12,\n$CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE\x10\xb3\xb4\xee\x9c\x01\x12\x1c\n\x15\x43USTOM_METRIC_INVALID\x10\xd6\xb9\xbd\x61\x12\x15\n\x0eMIN_EQUALS_MAX\x10\xf1\x99\xac\x01\x12(\n!MISSING_CUSTOM_METRIC_DATA_POINTS\x10\xde\xa9\x9f-\x12*\n\"MISSING_LOAD_BALANCING_DATA_POINTS\x10\xd2\xa8\x8f\xf3\x01\x12\x0f\n\x08MODE_OFF\x10\xb3\x91\xa4N\x12\x1a\n\x13MODE_ONLY_SCALE_OUT\x10\xe2\xb7\xea\x01\x12\x13\n\x0cMODE_ONLY_UP\x10\xf2\xda\x92\x30\x12$\n\x1dMORE_THAN_ONE_BACKEND_SERVICE\x10\xdd\xcb\xb8H\x12\"\n\x1aNOT_ENOUGH_QUOTA_AVAILABLE\x10\xbf\xaf\x9b\xc0\x01\x12 \n\x18REGION_RESOURCE_STOCKOUT\x10\xfe\xc9\x88\xfc\x01\x12$\n\x1dSCALING_TARGET_DOES_NOT_EXIST\x10\x9b\x93\xbd:\x12\x36\n/SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX\x10\xc2\xeb\xfa\r\x12\x34\n,SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN\x10\xb5\xc6\xf5\xbd\x01\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\x12\x39\n1UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION\x10\xd1\x96\xe1\x9d\x01\x12\x1d\n\x16ZONE_RESOURCE_STOCKOUT\x10\xb6\xcf\x9d\x64\x42\n\n\x08_messageB\x07\n\x05_type\"\x9c\x01\n\x15\x41utoscalersScopedList\x12<\n\x0b\x61utoscalers\x18\xfc\xb8\x8c\xde\x01 \x03(\x0b\x32#.google.cloud.compute.v1.Autoscaler\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xe9\x07\n\x11\x41utoscalingPolicy\x12$\n\x14\x63ool_down_period_sec\x18\x9a\x87\xad\x33 \x01(\x05H\x00\x88\x01\x01\x12Z\n\x0f\x63pu_utilization\x18\x8b\xa4\xe3\xb5\x01 \x01(\x0b\x32\x38.google.cloud.compute.v1.AutoscalingPolicyCpuUtilizationH\x01\x88\x01\x01\x12h\n\x1a\x63ustom_metric_utilizations\x18\xf2\xfd\xf6> \x03(\x0b\x32\x41.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization\x12o\n\x1aload_balancing_utilization\x18\xe3\xd1\xf5\xcc\x01 \x01(\x0b\x32\x42.google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilizationH\x02\x88\x01\x01\x12 \n\x10max_num_replicas\x18\xcf\x94\xdc\x1d \x01(\x05H\x03\x88\x01\x01\x12!\n\x10min_num_replicas\x18\xa1\xf8\xa1\xff\x01 \x01(\x05H\x04\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x05\x88\x01\x01\x12[\n\x10scale_in_control\x18\xd8\xbc\xce\xfb\x01 \x01(\x0b\x32\x38.google.cloud.compute.v1.AutoscalingPolicyScaleInControlH\x06\x88\x01\x01\x12_\n\x11scaling_schedules\x18\x84\xf4\xbc\xa9\x01 \x03(\x0b\x32@.google.cloud.compute.v1.AutoscalingPolicy.ScalingSchedulesEntry\x1ar\n\x15ScalingSchedulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.compute.v1.AutoscalingPolicyScalingSchedule:\x02\x38\x01\"V\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\t\n\x03OFF\x10\xcf\xe2\x04\x12\x07\n\x02ON\x10\xdf\x13\x12\x15\n\x0eONLY_SCALE_OUT\x10\xc6\xf3\xe8H\x12\x0f\n\x07ONLY_UP\x10\x8e\xd0\xfc\xe3\x01\x42\x17\n\x15_cool_down_period_secB\x12\n\x10_cpu_utilizationB\x1d\n\x1b_load_balancing_utilizationB\x13\n\x11_max_num_replicasB\x13\n\x11_min_num_replicasB\x07\n\x05_modeB\x13\n\x11_scale_in_control\"\xf6\x01\n\x1f\x41utoscalingPolicyCpuUtilization\x12\"\n\x11predictive_method\x18\xc1\x97\x89\xba\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12utilization_target\x18\xce\xec\xf9\x66 \x01(\x01H\x01\x88\x01\x01\"^\n\x10PredictiveMethod\x12\x1f\n\x1bUNDEFINED_PREDICTIVE_METHOD\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x1c\n\x15OPTIMIZE_AVAILABILITY\x10\xfd\xe6\xc5\x05\x42\x14\n\x12_predictive_methodB\x15\n\x13_utilization_target\"\xbf\x03\n(AutoscalingPolicyCustomMetricUtilization\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x06metric\x18\xb0\xeb\x97\xfe\x01 \x01(\tH\x01\x88\x01\x01\x12+\n\x1asingle_instance_assignment\x18\xc0\xcc\xd8\xf0\x01 \x01(\x01H\x02\x88\x01\x01\x12\"\n\x12utilization_target\x18\xce\xec\xf9\x66 \x01(\x01H\x03\x88\x01\x01\x12(\n\x17utilization_target_type\x18\x8b\xa5\x9a\xa2\x01 \x01(\tH\x04\x88\x01\x01\"~\n\x15UtilizationTargetType\x12%\n!UNDEFINED_UTILIZATION_TARGET_TYPE\x10\x00\x12\x17\n\x10\x44\x45LTA_PER_MINUTE\x10\x9d\xbd\xd8)\x12\x17\n\x10\x44\x45LTA_PER_SECOND\x10\xfd\xf9\xd6y\x12\x0c\n\x05GAUGE\x10\xd9\xb1\x9d B\t\n\x07_filterB\t\n\x07_metricB\x1d\n\x1b_single_instance_assignmentB\x15\n\x13_utilization_targetB\x1a\n\x18_utilization_target_type\"f\n)AutoscalingPolicyLoadBalancingUtilization\x12\"\n\x12utilization_target\x18\xce\xec\xf9\x66 \x01(\x01H\x00\x88\x01\x01\x42\x15\n\x13_utilization_target\"\xc2\x01\n\x1f\x41utoscalingPolicyScaleInControl\x12O\n\x16max_scaled_in_replicas\x18\xeb\xd5\x95V \x01(\x0b\x32\'.google.cloud.compute.v1.FixedOrPercentH\x00\x88\x01\x01\x12\x1f\n\x0ftime_window_sec\x18\xb4\x80\xae\x11 \x01(\x05H\x01\x88\x01\x01\x42\x19\n\x17_max_scaled_in_replicasB\x12\n\x10_time_window_sec\"\xba\x02\n AutoscalingPolicyScalingSchedule\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x08\x64isabled\x18\xfc\xf4\x98\x81\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1c\n\x0c\x64uration_sec\x18\xa6\x9e\xa1\x65 \x01(\x05H\x02\x88\x01\x01\x12&\n\x15min_required_replicas\x18\xae\x9d\xa5\xae\x01 \x01(\x05H\x03\x88\x01\x01\x12\x19\n\x08schedule\x18\x97\xa5\x9a\xb3\x01 \x01(\tH\x04\x88\x01\x01\x12\x19\n\ttime_zone\x18\xde\x83\xc9\x11 \x01(\tH\x05\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x0b\n\t_disabledB\x0f\n\r_duration_secB\x18\n\x16_min_required_replicasB\x0b\n\t_scheduleB\x0c\n\n_time_zone\"\xf6\x07\n\x07\x42\x61\x63kend\x12\x1f\n\x0e\x62\x61lancing_mode\x18\x89\xcb\x96\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x0f\x63\x61pacity_scaler\x18\x8d\xc7\xd4\x96\x01 \x01(\x02H\x01\x88\x01\x01\x12H\n\x0e\x63ustom_metrics\x18\xf5\xe3\xe3\xcc\x01 \x03(\x0b\x32,.google.cloud.compute.v1.BackendCustomMetric\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08\x66\x61ilover\x18\xf2\xa9\x9d\x42 \x01(\x08H\x03\x88\x01\x01\x12\x15\n\x05group\x18\xff\xec\x83/ \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x0fmax_connections\x18\xfa\xd5\xe1\x34 \x01(\x05H\x05\x88\x01\x01\x12,\n\x1cmax_connections_per_endpoint\x18\x9c\xe7\xb6g \x01(\x05H\x06\x88\x01\x01\x12,\n\x1cmax_connections_per_instance\x18\x9c\xd5\xf4\x31 \x01(\x05H\x07\x88\x01\x01\x12\x19\n\x08max_rate\x18\xdb\xbd\xc8\xc2\x01 \x01(\x05H\x08\x88\x01\x01\x12%\n\x15max_rate_per_endpoint\x18\xdb\xaa\xf4= \x01(\x02H\t\x88\x01\x01\x12%\n\x15max_rate_per_instance\x18\xdb\x98\xb2\x08 \x01(\x02H\n\x88\x01\x01\x12\x1f\n\x0fmax_utilization\x18\xc7\xf7\xd4\x46 \x01(\x02H\x0b\x88\x01\x01\x12\x1a\n\npreference\x18\xdb\xf9\xf2G \x01(\tH\x0c\x88\x01\x01\"y\n\rBalancingMode\x12\x1c\n\x18UNDEFINED_BALANCING_MODE\x10\x00\x12\x11\n\nCONNECTION\x10\xde\xd5\xb9u\x12\x16\n\x0e\x43USTOM_METRICS\x10\xd5\xe3\x8d\x9e\x01\x12\x0b\n\x04RATE\x10\xe0\x89\x99\x01\x12\x12\n\x0bUTILIZATION\x10\x82\x84\xefJ\"i\n\nPreference\x12\x18\n\x14UNDEFINED_PREFERENCE\x10\x00\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\x12\x1e\n\x16PREFERENCE_UNSPECIFIED\x10\xb3\xeb\xce\xec\x01\x12\x11\n\tPREFERRED\x10\xe1\xb8\xdc\xc7\x01\x42\x11\n\x0f_balancing_modeB\x12\n\x10_capacity_scalerB\x0e\n\x0c_descriptionB\x0b\n\t_failoverB\x08\n\x06_groupB\x12\n\x10_max_connectionsB\x1f\n\x1d_max_connections_per_endpointB\x1f\n\x1d_max_connections_per_instanceB\x0b\n\t_max_rateB\x18\n\x16_max_rate_per_endpointB\x18\n\x16_max_rate_per_instanceB\x12\n\x10_max_utilizationB\r\n\x0b_preference\"\xcc\x07\n\rBackendBucket\x12\x1c\n\x0b\x62ucket_name\x18\xc0\x97\x9e\x87\x01 \x01(\tH\x00\x88\x01\x01\x12K\n\ncdn_policy\x18\x84\x8b\x84\x66 \x01(\x0b\x32/.google.cloud.compute.v1.BackendBucketCdnPolicyH\x01\x88\x01\x01\x12 \n\x10\x63ompression_mode\x18\xdc\x91\xc6- \x01(\tH\x02\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x03\x88\x01\x01\x12#\n\x17\x63ustom_response_headers\x18\x96\xc1\xe5\xb8\x01 \x03(\t\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12$\n\x14\x65\x64ge_security_policy\x18\x8f\xd9\xc8\x13 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\nenable_cdn\x18\xf1\xb6\xf5\x86\x01 \x01(\x08H\x06\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12&\n\x15load_balancing_scheme\x18\xc4\x8c\xc2\xad\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12\x44\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32,.google.cloud.compute.v1.BackendBucketParamsH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\x41\n\x07used_by\x18\x99\xa0\xd2\xb9\x01 \x03(\x0b\x32,.google.cloud.compute.v1.BackendBucketUsedBy\"U\n\x0f\x43ompressionMode\x12\x1e\n\x1aUNDEFINED_COMPRESSION_MODE\x10\x00\x12\x10\n\tAUTOMATIC\x10\x8b\x84\xe9N\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\"S\n\x13LoadBalancingScheme\x12#\n\x1fUNDEFINED_LOAD_BALANCING_SCHEME\x10\x00\x12\x17\n\x10INTERNAL_MANAGED\x10\xfd\xd7\xe7\x11\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_cdn_policyB\x13\n\x11_compression_modeB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x17\n\x15_edge_security_policyB\r\n\x0b_enable_cdnB\x05\n\x03_idB\x07\n\x05_kindB\x18\n\x16_load_balancing_schemeB\x07\n\x05_nameB\t\n\x07_paramsB\x0c\n\n_self_link\"\xca\x07\n\x16\x42\x61\x63kendBucketCdnPolicy\x12v\n\x1f\x62ypass_cache_on_request_headers\x18\xca\xbd\xeb\xe7\x01 \x03(\x0b\x32I.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader\x12_\n\x10\x63\x61\x63he_key_policy\x18\xef\xd7\xf8K \x01(\x0b\x32=.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicyH\x00\x88\x01\x01\x12\x1a\n\ncache_mode\x18\xc0\xc8\xe2\r \x01(\tH\x01\x88\x01\x01\x12\x1a\n\nclient_ttl\x18\xf8\x8e\xec\r \x01(\x05H\x02\x88\x01\x01\x12\x1b\n\x0b\x64\x65\x66\x61ult_ttl\x18\xee\xfd\xe6/ \x01(\x05H\x03\x88\x01\x01\x12\x18\n\x07max_ttl\x18\x91\x89\xd5\x92\x01 \x01(\x05H\x04\x88\x01\x01\x12!\n\x10negative_caching\x18\xb5\xc3\xa2\xa0\x01 \x01(\x08H\x05\x88\x01\x01\x12h\n\x17negative_caching_policy\x18\xfc\xb5\x8aJ \x03(\x0b\x32\x44.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy\x12#\n\x12request_coalescing\x18\xd4\x84\x88\xfe\x01 \x01(\x08H\x06\x88\x01\x01\x12!\n\x11serve_while_stale\x18\xdb\xf7\xedp \x01(\x05H\x07\x88\x01\x01\x12-\n\x1csigned_url_cache_max_age_sec\x18\xc6\xa8\xb9\x80\x01 \x01(\x03H\x08\x88\x01\x01\x12 \n\x14signed_url_key_names\x18\xb5\xed\xa7\xb1\x01 \x03(\t\"\x8f\x01\n\tCacheMode\x12\x18\n\x14UNDEFINED_CACHE_MODE\x10\x00\x12\x18\n\x10\x43\x41\x43HE_ALL_STATIC\x10\xe9\x97\xa5\xa9\x01\x12\x17\n\x0f\x46ORCE_CACHE_ALL\x10\xb0\xdd\xe0\xe7\x01\x12\x1a\n\x12INVALID_CACHE_MODE\x10\xc8\xb7\xe8\xb5\x01\x12\x19\n\x12USE_ORIGIN_HEADERS\x10\xa5\x92\xb4\x1a\x42\x13\n\x11_cache_key_policyB\r\n\x0b_cache_modeB\r\n\x0b_client_ttlB\x0e\n\x0c_default_ttlB\n\n\x08_max_ttlB\x13\n\x11_negative_cachingB\x15\n\x13_request_coalescingB\x14\n\x12_serve_while_staleB\x1f\n\x1d_signed_url_cache_max_age_sec\"_\n0BackendBucketCdnPolicyBypassCacheOnRequestHeader\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_header_name\"j\n$BackendBucketCdnPolicyCacheKeyPolicy\x12\x1f\n\x14include_http_headers\x18\x86\xfa\x97\x01 \x03(\t\x12!\n\x16query_string_whitelist\x18\xb0\xd8\x81\x19 \x03(\t\"h\n+BackendBucketCdnPolicyNegativeCachingPolicy\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x03ttl\x18\xec\x83\x07 \x01(\x05H\x01\x88\x01\x01\x42\x07\n\x05_codeB\x06\n\x04_ttl\"\xab\x02\n\x11\x42\x61\x63kendBucketList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x38\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32&.google.cloud.compute.v1.BackendBucket\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbb\x01\n\x13\x42\x61\x63kendBucketParams\x12h\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32\x45.google.cloud.compute.v1.BackendBucketParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x13\x42\x61\x63kendBucketUsedBy\x12\x19\n\treference\x18\xcb\xfe\xec\x46 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_reference\"\x8f\x01\n\x13\x42\x61\x63kendCustomMetric\x12\x18\n\x07\x64ry_run\x18\xf7\xc3\xb6\x9a\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1f\n\x0fmax_utilization\x18\xc7\xf7\xd4\x46 \x01(\x02H\x01\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x02\x88\x01\x01\x42\n\n\x08_dry_runB\x12\n\x10_max_utilizationB\x07\n\x05_name\"\xd2%\n\x0e\x42\x61\x63kendService\x12(\n\x17\x61\x66\x66inity_cookie_ttl_sec\x18\x9a\xe9\xb6\xb0\x01 \x01(\x05H\x00\x88\x01\x01\x12\x36\n\x08\x62\x61\x63kends\x18\xdf\x98\xcb\xf3\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Backend\x12L\n\ncdn_policy\x18\x84\x8b\x84\x66 \x01(\x0b\x32\x30.google.cloud.compute.v1.BackendServiceCdnPolicyH\x01\x88\x01\x01\x12K\n\x10\x63ircuit_breakers\x18\x9d\xc7\xf4\xc8\x01 \x01(\x0b\x32(.google.cloud.compute.v1.CircuitBreakersH\x02\x88\x01\x01\x12 \n\x10\x63ompression_mode\x18\xdc\x91\xc6- \x01(\tH\x03\x88\x01\x01\x12Q\n\x13\x63onnection_draining\x18\xab\x8e\xef\xdb\x01 \x01(\x0b\x32+.google.cloud.compute.v1.ConnectionDrainingH\x04\x88\x01\x01\x12k\n\x1a\x63onnection_tracking_policy\x18\xd9\xe0\xd4\x44 \x01(\x0b\x32?.google.cloud.compute.v1.BackendServiceConnectionTrackingPolicyH\x05\x88\x01\x01\x12[\n\x0f\x63onsistent_hash\x18\x9b\xa5\x37 \x01(\x0b\x32;.google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsH\x06\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x07\x88\x01\x01\x12O\n\x0e\x63ustom_metrics\x18\xf5\xe3\xe3\xcc\x01 \x03(\x0b\x32\x33.google.cloud.compute.v1.BackendServiceCustomMetric\x12!\n\x16\x63ustom_request_headers\x18\x88\xd2\xab\r \x03(\t\x12#\n\x17\x63ustom_response_headers\x18\x96\xc1\xe5\xb8\x01 \x03(\t\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x08\x88\x01\x01\x12$\n\x14\x65\x64ge_security_policy\x18\x8f\xd9\xc8\x13 \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0c\x65nable_c_d_n\x18\xbb\xc7\xc7w \x01(\x08H\n\x88\x01\x01\x12\x30\n external_managed_migration_state\x18\xcc\x8f\xf6\x1f \x01(\tH\x0b\x88\x01\x01\x12>\n-external_managed_migration_testing_percentage\x18\xce\x81\xef\xf1\x01 \x01(\x02H\x0c\x88\x01\x01\x12V\n\x0f\x66\x61ilover_policy\x18\x9f\xf2\xb0\x32 \x01(\x0b\x32\x35.google.cloud.compute.v1.BackendServiceFailoverPolicyH\r\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x0e\x88\x01\x01\x12K\n\tha_policy\x18\xb8\xf6\xf2\xf7\x01 \x01(\x0b\x32/.google.cloud.compute.v1.BackendServiceHAPolicyH\x0f\x88\x01\x01\x12\x19\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\t\x12>\n\x03iap\x18\xd8\xac\x06 \x01(\x0b\x32*.google.cloud.compute.v1.BackendServiceIAPH\x10\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x11\x88\x01\x01\x12+\n\x1bip_address_selection_policy\x18\xc8\xb0\x80% \x01(\tH\x12\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x13\x88\x01\x01\x12&\n\x15load_balancing_scheme\x18\xc4\x8c\xc2\xad\x01 \x01(\tH\x14\x88\x01\x01\x12i\n\x14locality_lb_policies\x18\x9d\xf2\x9c\x43 \x03(\x0b\x32H.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfig\x12\"\n\x12locality_lb_policy\x18\xbf\xf8\xd5> \x01(\tH\x15\x88\x01\x01\x12M\n\nlog_config\x18\x9d\xd1\xc1\xa7\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.BackendServiceLogConfigH\x16\x88\x01\x01\x12\x46\n\x13max_stream_duration\x18\x98\xa5\xa5\x1d \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x17\x88\x01\x01\x12L\n\tmetadatas\x18\xa4\xd6\x87\x04 \x03(\x0b\x32\x36.google.cloud.compute.v1.BackendService.MetadatasEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x18\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x19\x88\x01\x01\x12M\n\x11outlier_detection\x18\xbe\xcc\x8c\xa9\x01 \x01(\x0b\x32).google.cloud.compute.v1.OutlierDetectionH\x1a\x88\x01\x01\x12\x45\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32-.google.cloud.compute.v1.BackendServiceParamsH\x1b\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x1c\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x1d\x88\x01\x01\x12\x18\n\x08protocol\x18\x98\x9d\xaa( \x01(\tH\x1e\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x1f\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH \x88\x01\x01\x12M\n\x11security_settings\x18\xc2\xbc\x9e\xe4\x01 \x01(\x0b\x32).google.cloud.compute.v1.SecuritySettingsH!\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\"\x88\x01\x01\x12\x1b\n\x10service_bindings\x18\xd8\x91\xd9? \x03(\t\x12!\n\x11service_lb_policy\x18\x91\x8e\x9d- \x01(\tH#\x88\x01\x01\x12!\n\x10session_affinity\x18\xb1\xc1\x99\xdd\x01 \x01(\tH$\x88\x01\x01\x12\x61\n\x1estrong_session_affinity_cookie\x18\x8a\xa8\xcaq \x01(\x0b\x32\x31.google.cloud.compute.v1.BackendServiceHttpCookieH%\x88\x01\x01\x12@\n\nsubsetting\x18\x90\x90\xdb\xd6\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SubsettingH&\x88\x01\x01\x12\x1b\n\x0btimeout_sec\x18\xf3\xc0\x92& \x01(\x05H\'\x88\x01\x01\x12P\n\x0ctls_settings\x18\xe7\xad\x80\' \x01(\x0b\x32\x32.google.cloud.compute.v1.BackendServiceTlsSettingsH(\x88\x01\x01\x12\x42\n\x07used_by\x18\x99\xa0\xd2\xb9\x01 \x03(\x0b\x32-.google.cloud.compute.v1.BackendServiceUsedBy\x1a\x30\n\x0eMetadatasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"U\n\x0f\x43ompressionMode\x12\x1e\n\x1aUNDEFINED_COMPRESSION_MODE\x10\x00\x12\x10\n\tAUTOMATIC\x10\x8b\x84\xe9N\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\"\x95\x01\n\x1d\x45xternalManagedMigrationState\x12.\n*UNDEFINED_EXTERNAL_MANAGED_MIGRATION_STATE\x10\x00\x12\x0f\n\x07PREPARE\x10\xe7\xb1\xc6\xbe\x01\x12\x17\n\x10TEST_ALL_TRAFFIC\x10\xf2\xa1\x82&\x12\x1a\n\x12TEST_BY_PERCENTAGE\x10\x95\x8d\xfc\xf4\x01\"\xae\x01\n\x18IpAddressSelectionPolicy\x12)\n%UNDEFINED_IP_ADDRESS_SELECTION_POLICY\x10\x00\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%\x12.\n\'IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED\x10\xe0\x8b\xa2\x11\x12\x13\n\x0bPREFER_IPV6\x10\xd6\x85\xeb\xc2\x01\"\xd5\x01\n\x13LoadBalancingScheme\x12#\n\x1fUNDEFINED_LOAD_BALANCING_SCHEME\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x18\n\x10\x45XTERNAL_MANAGED\x10\x8b\xb6\x92\xf4\x01\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12\x17\n\x10INTERNAL_MANAGED\x10\xfd\xd7\xe7\x11\x12\x1c\n\x15INTERNAL_SELF_MANAGED\x10\xce\x97\xd1p\x12%\n\x1dINVALID_LOAD_BALANCING_SCHEME\x10\xfc\x93\xa6\x83\x01\"\xfc\x01\n\x10LocalityLbPolicy\x12 \n\x1cUNDEFINED_LOCALITY_LB_POLICY\x10\x00\x12\x19\n\x11INVALID_LB_POLICY\x10\xb3\xe7\x95\x9a\x01\x12\x14\n\rLEAST_REQUEST\x10\xf9\xc4\x9c\x16\x12\r\n\x06MAGLEV\x10\xea\x97\xea\x38\x12\x1b\n\x14ORIGINAL_DESTINATION\x10\x80\xfd\xa5O\x12\r\n\x06RANDOM\x10\xc3\xb1\x97}\x12\x11\n\tRING_HASH\x10\xbd\xdb\xaf\xce\x01\x12\x12\n\x0bROUND_ROBIN\x10\xf9\x86\xb1I\x12\x16\n\x0fWEIGHTED_MAGLEV\x10\x92\xe0\xc7y\x12\x1b\n\x14WEIGHTED_ROUND_ROBIN\x10\xd1\xf0\xd4\x02\"\x99\x01\n\x08Protocol\x12\x16\n\x12UNDEFINED_PROTOCOL\x10\x00\x12\x0b\n\x04GRPC\x10\x9e\x88\x86\x01\x12\t\n\x03H2C\x10\x99\xa9\x04\x12\x0b\n\x04HTTP\x10\x88\x81\x88\x01\x12\x0c\n\x05HTTP2\x10\xaa\xa1\xf8 \x12\x0c\n\x05HTTPS\x10\xcb\xa1\xf8 \x12\t\n\x03SSL\x10\xec\x83\x05\x12\t\n\x03TCP\x10\xc1\x87\x05\x12\t\n\x03UDP\x10\xa1\x8f\x05\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\"\x8b\x02\n\x0fSessionAffinity\x12\x1e\n\x1aUNDEFINED_SESSION_AFFINITY\x10\x00\x12\x11\n\tCLIENT_IP\x10\x9b\xdc\xe9\xa4\x01\x12\x1f\n\x18\x43LIENT_IP_NO_DESTINATION\x10\x94\x9a\xcd\x32\x12\x1b\n\x14\x43LIENT_IP_PORT_PROTO\x10\xae\xf2\xdci\x12\x16\n\x0f\x43LIENT_IP_PROTO\x10\xa4\xc5\x89\x0c\x12\x18\n\x10GENERATED_COOKIE\x10\xb4\xce\xca\xb0\x01\x12\x13\n\x0cHEADER_FIELD\x10\xa8\x89\xdc_\x12\x13\n\x0bHTTP_COOKIE\x10\xfb\xa3\x83\xec\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x1e\n\x16STRONG_COOKIE_AFFINITY\x10\xfb\xdd\x93\xd1\x01\x42\x1a\n\x18_affinity_cookie_ttl_secB\r\n\x0b_cdn_policyB\x13\n\x11_circuit_breakersB\x13\n\x11_compression_modeB\x16\n\x14_connection_drainingB\x1d\n\x1b_connection_tracking_policyB\x12\n\x10_consistent_hashB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x17\n\x15_edge_security_policyB\x0f\n\r_enable_c_d_nB#\n!_external_managed_migration_stateB0\n._external_managed_migration_testing_percentageB\x12\n\x10_failover_policyB\x0e\n\x0c_fingerprintB\x0c\n\n_ha_policyB\x06\n\x04_iapB\x05\n\x03_idB\x1e\n\x1c_ip_address_selection_policyB\x07\n\x05_kindB\x18\n\x16_load_balancing_schemeB\x15\n\x13_locality_lb_policyB\r\n\x0b_log_configB\x16\n\x14_max_stream_durationB\x07\n\x05_nameB\n\n\x08_networkB\x14\n\x12_outlier_detectionB\t\n\x07_paramsB\x07\n\x05_portB\x0c\n\n_port_nameB\x0b\n\t_protocolB\t\n\x07_regionB\x12\n\x10_security_policyB\x14\n\x12_security_settingsB\x0c\n\n_self_linkB\x14\n\x12_service_lb_policyB\x13\n\x11_session_affinityB!\n\x1f_strong_session_affinity_cookieB\r\n\x0b_subsettingB\x0e\n\x0c_timeout_secB\x0f\n\r_tls_settings\"\xcb\x03\n\x1c\x42\x61\x63kendServiceAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.BackendServiceAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a`\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.BackendServicesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb7\x07\n\x17\x42\x61\x63kendServiceCdnPolicy\x12w\n\x1f\x62ypass_cache_on_request_headers\x18\xca\xbd\xeb\xe7\x01 \x03(\x0b\x32J.google.cloud.compute.v1.BackendServiceCdnPolicyBypassCacheOnRequestHeader\x12I\n\x10\x63\x61\x63he_key_policy\x18\xef\xd7\xf8K \x01(\x0b\x32\'.google.cloud.compute.v1.CacheKeyPolicyH\x00\x88\x01\x01\x12\x1a\n\ncache_mode\x18\xc0\xc8\xe2\r \x01(\tH\x01\x88\x01\x01\x12\x1a\n\nclient_ttl\x18\xf8\x8e\xec\r \x01(\x05H\x02\x88\x01\x01\x12\x1b\n\x0b\x64\x65\x66\x61ult_ttl\x18\xee\xfd\xe6/ \x01(\x05H\x03\x88\x01\x01\x12\x18\n\x07max_ttl\x18\x91\x89\xd5\x92\x01 \x01(\x05H\x04\x88\x01\x01\x12!\n\x10negative_caching\x18\xb5\xc3\xa2\xa0\x01 \x01(\x08H\x05\x88\x01\x01\x12i\n\x17negative_caching_policy\x18\xfc\xb5\x8aJ \x03(\x0b\x32\x45.google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy\x12#\n\x12request_coalescing\x18\xd4\x84\x88\xfe\x01 \x01(\x08H\x06\x88\x01\x01\x12!\n\x11serve_while_stale\x18\xdb\xf7\xedp \x01(\x05H\x07\x88\x01\x01\x12-\n\x1csigned_url_cache_max_age_sec\x18\xc6\xa8\xb9\x80\x01 \x01(\x03H\x08\x88\x01\x01\x12 \n\x14signed_url_key_names\x18\xb5\xed\xa7\xb1\x01 \x03(\t\"\x8f\x01\n\tCacheMode\x12\x18\n\x14UNDEFINED_CACHE_MODE\x10\x00\x12\x18\n\x10\x43\x41\x43HE_ALL_STATIC\x10\xe9\x97\xa5\xa9\x01\x12\x17\n\x0f\x46ORCE_CACHE_ALL\x10\xb0\xdd\xe0\xe7\x01\x12\x1a\n\x12INVALID_CACHE_MODE\x10\xc8\xb7\xe8\xb5\x01\x12\x19\n\x12USE_ORIGIN_HEADERS\x10\xa5\x92\xb4\x1a\x42\x13\n\x11_cache_key_policyB\r\n\x0b_cache_modeB\r\n\x0b_client_ttlB\x0e\n\x0c_default_ttlB\n\n\x08_max_ttlB\x13\n\x11_negative_cachingB\x15\n\x13_request_coalescingB\x14\n\x12_serve_while_staleB\x1f\n\x1d_signed_url_cache_max_age_sec\"`\n1BackendServiceCdnPolicyBypassCacheOnRequestHeader\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_header_name\"i\n,BackendServiceCdnPolicyNegativeCachingPolicy\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x03ttl\x18\xec\x83\x07 \x01(\x05H\x01\x88\x01\x01\x42\x07\n\x05_codeB\x06\n\x04_ttl\"\xeb\x04\n&BackendServiceConnectionTrackingPolicy\x12<\n,connection_persistence_on_unhealthy_backends\x18\xf9\x91\xd8H \x01(\tH\x00\x88\x01\x01\x12&\n\x16\x65nable_strong_affinity\x18\x94\xe6\xd9\x0b \x01(\x08H\x01\x88\x01\x01\x12 \n\x10idle_timeout_sec\x18\x88\xc1\xf4\x0b \x01(\x05H\x02\x88\x01\x01\x12\x1d\n\rtracking_mode\x18\xab\xdc\xf5< \x01(\tH\x03\x88\x01\x01\"\xb0\x01\n(ConnectionPersistenceOnUnhealthyBackends\x12:\n6UNDEFINED_CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS\x10\x00\x12\x15\n\x0e\x41LWAYS_PERSIST\x10\x84\xe7\xa7\x12\x12\x1b\n\x14\x44\x45\x46\x41ULT_FOR_PROTOCOL\x10\xcc\xa5\xa2\x45\x12\x14\n\rNEVER_PERSIST\x10\xe1\xa5\x8e\x42\"t\n\x0cTrackingMode\x12\x1b\n\x17UNDEFINED_TRACKING_MODE\x10\x00\x12\x1c\n\x15INVALID_TRACKING_MODE\x10\xc3\x83\xbd\x17\x12\x15\n\x0ePER_CONNECTION\x10\xe0\xf6\xcd(\x12\x12\n\x0bPER_SESSION\x10\xb4\xba\xeaVB/\n-_connection_persistence_on_unhealthy_backendsB\x19\n\x17_enable_strong_affinityB\x13\n\x11_idle_timeout_secB\x10\n\x0e_tracking_mode\"a\n\x1a\x42\x61\x63kendServiceCustomMetric\x12\x18\n\x07\x64ry_run\x18\xf7\xc3\xb6\x9a\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_dry_runB\x07\n\x05_name\"\xf9\x01\n\x1c\x42\x61\x63kendServiceFailoverPolicy\x12\x34\n$disable_connection_drain_on_failover\x18\xe1\xcc\xedV \x01(\x08H\x00\x88\x01\x01\x12)\n\x19\x64rop_traffic_if_unhealthy\x18\x94\xcd\xc5\x35 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x0e\x66\x61ilover_ratio\x18\xfe\x94\xb4\x65 \x01(\x02H\x02\x88\x01\x01\x42\'\n%_disable_connection_drain_on_failoverB\x1c\n\x1a_drop_traffic_if_unhealthyB\x11\n\x0f_failover_ratio\"\x8d\x02\n\x19\x42\x61\x63kendServiceGroupHealth\x12[\n\x0b\x61nnotations\x18\xa4\xf6\xb5\x35 \x03(\x0b\x32\x43.google.cloud.compute.v1.BackendServiceGroupHealth.AnnotationsEntry\x12@\n\rhealth_status\x18\xb5\xd6\xba\xb5\x01 \x03(\x0b\x32%.google.cloud.compute.v1.HealthStatus\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05_kind\"\xf2\x01\n\x16\x42\x61\x63kendServiceHAPolicy\x12\x1d\n\rfast_i_p_move\x18\xd9\xbe\x94j \x01(\tH\x00\x88\x01\x01\x12N\n\x06leader\x18\x89\x8a\xa1\xf0\x01 \x01(\x0b\x32\x35.google.cloud.compute.v1.BackendServiceHAPolicyLeaderH\x01\x88\x01\x01\"L\n\nFastIPMove\x12\x1b\n\x17UNDEFINED_FAST_I_P_MOVE\x10\x00\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0f\n\x07GARP_RA\x10\xb6\x86\xbb\xfb\x01\x42\x10\n\x0e_fast_i_p_moveB\t\n\x07_leader\"\xcd\x01\n\x1c\x42\x61\x63kendServiceHAPolicyLeader\x12\x1e\n\rbackend_group\x18\x94\xc2\xa4\xda\x01 \x01(\tH\x00\x88\x01\x01\x12\x66\n\x10network_endpoint\x18\x86\x91\x8a\x1b \x01(\x0b\x32\x44.google.cloud.compute.v1.BackendServiceHAPolicyLeaderNetworkEndpointH\x01\x88\x01\x01\x42\x10\n\x0e_backend_groupB\x13\n\x11_network_endpoint\"T\n+BackendServiceHAPolicyLeaderNetworkEndpoint\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_instance\"\x97\x01\n\x18\x42\x61\x63kendServiceHttpCookie\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x01\x88\x01\x01\x12\x35\n\x03ttl\x18\xec\x83\x07 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x07\n\x05_pathB\x06\n\x04_ttl\"\xfb\x01\n\x11\x42\x61\x63kendServiceIAP\x12\x16\n\x07\x65nabled\x18\xc1\x96> \x01(\x08H\x00\x88\x01\x01\x12!\n\x10oauth2_client_id\x18\xcb\x8e\xde\x95\x01 \x01(\tH\x01\x88\x01\x01\x12$\n\x14oauth2_client_secret\x18\xe0\xe1\xa8\x18 \x01(\tH\x02\x88\x01\x01\x12+\n\x1boauth2_client_secret_sha256\x18\xe6\x8c\xeb\x35 \x01(\tH\x03\x88\x01\x01\x42\n\n\x08_enabledB\x13\n\x11_oauth2_client_idB\x17\n\x15_oauth2_client_secretB\x1e\n\x1c_oauth2_client_secret_sha256\"\xad\x02\n\x12\x42\x61\x63kendServiceList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.BackendService\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb3\x02\n\x18\x42\x61\x63kendServiceListUsable\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.BackendService\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x02\n/BackendServiceLocalityLoadBalancingPolicyConfig\x12s\n\rcustom_policy\x18\xc0\x8b\xa6\x02 \x01(\x0b\x32T.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicyH\x00\x88\x01\x01\x12\x66\n\x06policy\x18\xb2\xca\xb6+ \x01(\x0b\x32N.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigPolicyH\x01\x88\x01\x01\x42\x10\n\x0e_custom_policyB\t\n\x07_policy\"{\n;BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy\x12\x14\n\x04\x64\x61ta\x18\xaa\xdf\xbb\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_dataB\x07\n\x05_name\"\xbb\x02\n5BackendServiceLocalityLoadBalancingPolicyConfigPolicy\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\"\xe2\x01\n\x04Name\x12\x12\n\x0eUNDEFINED_NAME\x10\x00\x12\x19\n\x11INVALID_LB_POLICY\x10\xb3\xe7\x95\x9a\x01\x12\x14\n\rLEAST_REQUEST\x10\xf9\xc4\x9c\x16\x12\r\n\x06MAGLEV\x10\xea\x97\xea\x38\x12\x1b\n\x14ORIGINAL_DESTINATION\x10\x80\xfd\xa5O\x12\r\n\x06RANDOM\x10\xc3\xb1\x97}\x12\x11\n\tRING_HASH\x10\xbd\xdb\xaf\xce\x01\x12\x12\n\x0bROUND_ROBIN\x10\xf9\x86\xb1I\x12\x16\n\x0fWEIGHTED_MAGLEV\x10\x92\xe0\xc7y\x12\x1b\n\x14WEIGHTED_ROUND_ROBIN\x10\xd1\xf0\xd4\x02\x42\x07\n\x05_name\"\xb0\x02\n\x17\x42\x61\x63kendServiceLogConfig\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1b\n\x0foptional_fields\x18\xf8\xc8\x86\xfc\x01 \x03(\t\x12\x1d\n\roptional_mode\x18\xa2\x86\xaf= \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0bsample_rate\x18\xd5\x94\x86I \x01(\x02H\x02\x88\x01\x01\"v\n\x0cOptionalMode\x12\x1b\n\x17UNDEFINED_OPTIONAL_MODE\x10\x00\x12\x0e\n\x06\x43USTOM\x10\xf1\xfe\xa5\xb9\x01\x12\x1b\n\x14\x45XCLUDE_ALL_OPTIONAL\x10\xc3\xdd\xb4P\x12\x1c\n\x14INCLUDE_ALL_OPTIONAL\x10\xb5\xed\xb2\xff\x01\x42\t\n\x07_enableB\x10\n\x0e_optional_modeB\x0e\n\x0c_sample_rate\"\xbd\x01\n\x14\x42\x61\x63kendServiceParams\x12i\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32\x46.google.cloud.compute.v1.BackendServiceParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"O\n\x17\x42\x61\x63kendServiceReference\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_backend_service\"\xda\x01\n\x19\x42\x61\x63kendServiceTlsSettings\x12&\n\x15\x61uthentication_config\x18\xe9\xcd\xc9\xc2\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03sni\x18\xee\xfa\x06 \x01(\tH\x01\x88\x01\x01\x12_\n\x11subject_alt_names\x18\xdf\xb3\xaf\x9d\x01 \x03(\x0b\x32@.google.cloud.compute.v1.BackendServiceTlsSettingsSubjectAltNameB\x18\n\x16_authentication_configB\x06\n\x04_sni\"\x9f\x01\n\'BackendServiceTlsSettingsSubjectAltName\x12\x19\n\x08\x64ns_name\x18\xe1\xff\xb9\xc4\x01 \x01(\tH\x00\x88\x01\x01\x12,\n\x1buniform_resource_identifier\x18\xef\x9c\xa9\xea\x01 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_dns_nameB\x1e\n\x1c_uniform_resource_identifier\"?\n\x14\x42\x61\x63kendServiceUsedBy\x12\x19\n\treference\x18\xcb\xfe\xec\x46 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_reference\"\xa9\x01\n\x19\x42\x61\x63kendServicesScopedList\x12\x45\n\x10\x62\x61\x63kend_services\x18\xa9\xc3\xa1\xb9\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.BackendService\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xe7\t\n\tBfdPacket\x12&\n\x16\x61uthentication_present\x18\xf4\x93\xc4\x32 \x01(\x08H\x00\x88\x01\x01\x12)\n\x19\x63ontrol_plane_independent\x18\xb5\xaf\xde\x1d \x01(\x08H\x01\x88\x01\x01\x12\x17\n\x06\x64\x65mand\x18\xcb\xd4\x9b\x83\x01 \x01(\x08H\x02\x88\x01\x01\x12\x1a\n\ndiagnostic\x18\xa7\xb7\xf3\x1d \x01(\tH\x03\x88\x01\x01\x12\x15\n\x05\x66inal\x18\xf6\x82\xbb. \x01(\x08H\x04\x88\x01\x01\x12\x17\n\x06length\x18\xe6\xf5\xb8\xf0\x01 \x01(\rH\x05\x88\x01\x01\x12\'\n\x17min_echo_rx_interval_ms\x18\xd4\xf5\xb1. \x01(\rH\x06\x88\x01\x01\x12#\n\x12min_rx_interval_ms\x18\xf4\xd0\xfb\xdc\x01 \x01(\rH\x07\x88\x01\x01\x12#\n\x12min_tx_interval_ms\x18\xb2\xf7\xe9\xfa\x01 \x01(\rH\x08\x88\x01\x01\x12\x1a\n\nmultiplier\x18\xc1\xfb\x9d[ \x01(\rH\t\x88\x01\x01\x12\x1a\n\nmultipoint\x18\xf7\xb7\xa3[ \x01(\x08H\n\x88\x01\x01\x12 \n\x10my_discriminator\x18\xc9\x92\xc7$ \x01(\rH\x0b\x88\x01\x01\x12\x14\n\x04poll\x18\xbf\xaf\xd2\x01 \x01(\x08H\x0c\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\r\x88\x01\x01\x12\x18\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\rH\x0e\x88\x01\x01\x12#\n\x12your_discriminator\x18\x90\xe7\xef\xf5\x01 \x01(\rH\x0f\x88\x01\x01\"\xde\x02\n\nDiagnostic\x12\x18\n\x14UNDEFINED_DIAGNOSTIC\x10\x00\x12\x1c\n\x15\x41\x44MINISTRATIVELY_DOWN\x10\xa6\x8e\x83:\x12\x1d\n\x16\x43ONCATENATED_PATH_DOWN\x10\x8c\xa9\xbe\x0c\x12%\n\x1e\x43ONTROL_DETECTION_TIME_EXPIRED\x10\xef\xf8\xcc@\x12\x1d\n\x16\x44IAGNOSTIC_UNSPECIFIED\x10\xff\x84\x80\x1c\x12\x1b\n\x14\x45\x43HO_FUNCTION_FAILED\x10\xea\xd8\x9di\x12\x1d\n\x16\x46ORWARDING_PLANE_RESET\x10\xaa\xae\xb3\t\x12&\n\x1eNEIGHBOR_SIGNALED_SESSION_DOWN\x10\xb6\xfe\xb8\xb2\x01\x12\x14\n\rNO_DIAGNOSTIC\x10\xe5\xc1\x8cj\x12\x11\n\tPATH_DOWN\x10\xfc\x90\xc9\x8a\x01\x12&\n\x1eREVERSE_CONCATENATED_PATH_DOWN\x10\xa9\xb5\xc8\xe4\x01\"m\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x11\n\nADMIN_DOWN\x10\xb2\xdf\xa5=\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x0b\n\x04INIT\x10\x90\xba\x89\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x07\n\x02UP\x10\x9b\x15\x42\x19\n\x17_authentication_presentB\x1c\n\x1a_control_plane_independentB\t\n\x07_demandB\r\n\x0b_diagnosticB\x08\n\x06_finalB\t\n\x07_lengthB\x1a\n\x18_min_echo_rx_interval_msB\x15\n\x13_min_rx_interval_msB\x15\n\x13_min_tx_interval_msB\r\n\x0b_multiplierB\r\n\x0b_multipointB\x13\n\x11_my_discriminatorB\x07\n\x05_pollB\x08\n\x06_stateB\n\n\x08_versionB\x15\n\x13_your_discriminator\"\xec\n\n\tBfdStatus\x12/\n\x1f\x62\x66\x64_session_initialization_mode\x18\x9a\x9f\x83h \x01(\tH\x00\x88\x01\x01\x12/\n\x1e\x63onfig_update_timestamp_micros\x18\xb1\x80\x81\xda\x01 \x01(\x03H\x01\x88\x01\x01\x12U\n\x15\x63ontrol_packet_counts\x18\xf9\xd2\x9b? \x01(\x0b\x32..google.cloud.compute.v1.BfdStatusPacketCountsH\x02\x88\x01\x01\x12N\n\x18\x63ontrol_packet_intervals\x18\xf9\xe7\xe6\xee\x01 \x03(\x0b\x32(.google.cloud.compute.v1.PacketIntervals\x12!\n\x10local_diagnostic\x18\xfb\xa1\x90\xdd\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0blocal_state\x18\xbd\x95\x92G \x01(\tH\x04\x88\x01\x01\x12\x37\n\'negotiated_local_control_tx_interval_ms\x18\x94\xd1\xb0\n \x01(\rH\x05\x88\x01\x01\x12>\n\trx_packet\x18\xa1\x81\xeb\xf0\x01 \x01(\x0b\x32\".google.cloud.compute.v1.BfdPacketH\x06\x88\x01\x01\x12=\n\ttx_packet\x18\xa3\xbd\x8e\x35 \x01(\x0b\x32\".google.cloud.compute.v1.BfdPacketH\x07\x88\x01\x01\x12\x19\n\tuptime_ms\x18\xdd\xda\xe5; \x01(\x03H\x08\x88\x01\x01\"\x80\x01\n\x1c\x42\x66\x64SessionInitializationMode\x12-\n)UNDEFINED_BFD_SESSION_INITIALIZATION_MODE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0f\n\x07PASSIVE\x10\x87\xf6\xd7\xdc\x01\"\xe9\x02\n\x0fLocalDiagnostic\x12\x1e\n\x1aUNDEFINED_LOCAL_DIAGNOSTIC\x10\x00\x12\x1c\n\x15\x41\x44MINISTRATIVELY_DOWN\x10\xa6\x8e\x83:\x12\x1d\n\x16\x43ONCATENATED_PATH_DOWN\x10\x8c\xa9\xbe\x0c\x12%\n\x1e\x43ONTROL_DETECTION_TIME_EXPIRED\x10\xef\xf8\xcc@\x12\x1d\n\x16\x44IAGNOSTIC_UNSPECIFIED\x10\xff\x84\x80\x1c\x12\x1b\n\x14\x45\x43HO_FUNCTION_FAILED\x10\xea\xd8\x9di\x12\x1d\n\x16\x46ORWARDING_PLANE_RESET\x10\xaa\xae\xb3\t\x12&\n\x1eNEIGHBOR_SIGNALED_SESSION_DOWN\x10\xb6\xfe\xb8\xb2\x01\x12\x14\n\rNO_DIAGNOSTIC\x10\xe5\xc1\x8cj\x12\x11\n\tPATH_DOWN\x10\xfc\x90\xc9\x8a\x01\x12&\n\x1eREVERSE_CONCATENATED_PATH_DOWN\x10\xa9\xb5\xc8\xe4\x01\"x\n\nLocalState\x12\x19\n\x15UNDEFINED_LOCAL_STATE\x10\x00\x12\x11\n\nADMIN_DOWN\x10\xb2\xdf\xa5=\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x0b\n\x04INIT\x10\x90\xba\x89\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x07\n\x02UP\x10\x9b\x15\x42\"\n _bfd_session_initialization_modeB!\n\x1f_config_update_timestamp_microsB\x18\n\x16_control_packet_countsB\x13\n\x11_local_diagnosticB\x0e\n\x0c_local_stateB*\n(_negotiated_local_control_tx_interval_msB\x0c\n\n_rx_packetB\x0c\n\n_tx_packetB\x0c\n\n_uptime_ms\"\xcd\x01\n\x15\x42\x66\x64StatusPacketCounts\x12\x16\n\x06num_rx\x18\x9f\xa3\xe3\x12 \x01(\rH\x00\x88\x01\x01\x12 \n\x0fnum_rx_rejected\x18\x9e\xae\xff\x85\x01 \x01(\rH\x01\x88\x01\x01\x12\"\n\x11num_rx_successful\x18\xba\x8a\x91\xd9\x01 \x01(\rH\x02\x88\x01\x01\x12\x16\n\x06num_tx\x18\xdd\xa3\xe3\x12 \x01(\rH\x03\x88\x01\x01\x42\t\n\x07_num_rxB\x12\n\x10_num_rx_rejectedB\x14\n\x12_num_rx_successfulB\t\n\x07_num_tx\"\x81\x03\n\x08\x42gpRoute\x12<\n\x08\x61s_paths\x18\xa1\xc5\xcc\x41 \x03(\x0b\x32\'.google.cloud.compute.v1.BgpRouteAsPath\x12\x16\n\x0b\x63ommunities\x18\xc7\xd4\xe2Y \x03(\t\x12\x61\n\x0b\x64\x65stination\x18\x8e\x88\x99V \x01(\x0b\x32\x44.google.cloud.compute.v1.BgpRouteNetworkLayerReachabilityInformationH\x00\x88\x01\x01\x12\x12\n\x03med\x18\xcc\xcb\x06 \x01(\rH\x01\x88\x01\x01\x12\x16\n\x06origin\x18\xa6\xde\x86\x1f \x01(\tH\x02\x88\x01\x01\"m\n\x06Origin\x12\x14\n\x10UNDEFINED_ORIGIN\x10\x00\x12\x16\n\x0e\x42GP_ORIGIN_EGP\x10\xe9\xce\xd6\xb4\x01\x12\x16\n\x0e\x42GP_ORIGIN_IGP\x10\xed\xec\xd6\xb4\x01\x12\x1d\n\x15\x42GP_ORIGIN_INCOMPLETE\x10\x83\x93\xf7\xd7\x01\x42\x0e\n\x0c_destinationB\x06\n\x04_medB\t\n\x07_origin\"\x95\x01\n\x0e\x42gpRouteAsPath\x12\x0f\n\x04\x61sns\x18\xf7\xaa\xb7\x01 \x03(\x05\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x00\x88\x01\x01\"S\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x1d\n\x15\x41S_PATH_TYPE_SEQUENCE\x10\xb9\xf3\x84\xad\x01\x12\x18\n\x10\x41S_PATH_TYPE_SET\x10\xca\xa6\xa4\x90\x01\x42\x07\n\x05_type\"v\n+BgpRouteNetworkLayerReachabilityInformation\x12\x18\n\x07path_id\x18\xf5\xbe\xcd\x86\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\x06prefix\x18\x92\xe5\xd2, \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_path_idB\t\n\x07_prefix\"\xb1\x01\n\x07\x42inding\x12\x1b\n\nbinding_id\x18\x95\xf2\xa9\xd2\x01 \x01(\tH\x00\x88\x01\x01\x12\x38\n\tcondition\x18\x9b\xda\xa5\x65 \x01(\x0b\x32\x1d.google.cloud.compute.v1.ExprH\x01\x88\x01\x01\x12\x13\n\x07members\x18\x99\x92\xbb\xc4\x01 \x03(\t\x12\x14\n\x04role\x18\xf6\x80\xd6\x01 \x01(\tH\x02\x88\x01\x01\x42\r\n\x0b_binding_idB\x0c\n\n_conditionB\x07\n\x05_role\"\xe8\x01\n\x15\x42ulkInsertDiskRequest\x12\x64\n\"bulk_insert_disk_resource_resource\x18\xd6\xf9\x97\x8a\x01 \x01(\x0b\x32/.google.cloud.compute.v1.BulkInsertDiskResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"m\n\x16\x42ulkInsertDiskResource\x12/\n\x1fsource_consistency_group_policy\x18\xdd\xa2\xad\t \x01(\tH\x00\x88\x01\x01\x42\"\n _source_consistency_group_policy\"\xf3\x01\n\x19\x42ulkInsertInstanceRequest\x12k\n&bulk_insert_instance_resource_resource\x18\xce\xc2\xe0\x13 \x01(\x0b\x32\x33.google.cloud.compute.v1.BulkInsertInstanceResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa5\x05\n\x1a\x42ulkInsertInstanceResource\x12\x15\n\x05\x63ount\x18\x8f\xa2\x9d- \x01(\x03H\x00\x88\x01\x01\x12P\n\x13instance_properties\x18\x9d\x9e\xd8\x66 \x01(\x0b\x32+.google.cloud.compute.v1.InstancePropertiesH\x01\x88\x01\x01\x12I\n\x0flocation_policy\x18\xfc\xb9\x87\xde\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.LocationPolicyH\x02\x88\x01\x01\x12\x1a\n\tmin_count\x18\xe2\xa9\xbf\xf9\x01 \x01(\x03H\x03\x88\x01\x01\x12\x1d\n\x0cname_pattern\x18\xdc\xa3\xa9\xc5\x01 \x01(\tH\x04\x88\x01\x01\x12r\n\x17per_instance_properties\x18\xfb\xb9\xde\x33 \x03(\x0b\x32N.google.cloud.compute.v1.BulkInsertInstanceResource.PerInstancePropertiesEntry\x12)\n\x18source_instance_template\x18\xc0\xc3\xc1\x9e\x01 \x01(\tH\x05\x88\x01\x01\x1a\x86\x01\n\x1aPerInstancePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12W\n\x05value\x18\x02 \x01(\x0b\x32H.google.cloud.compute.v1.BulkInsertInstanceResourcePerInstanceProperties:\x02\x38\x01\x42\x08\n\x06_countB\x16\n\x14_instance_propertiesB\x12\n\x10_location_policyB\x0c\n\n_min_countB\x0f\n\r_name_patternB\x1b\n\x19_source_instance_template\"w\n/BulkInsertInstanceResourcePerInstanceProperties\x12\x18\n\x08hostname\x18\xb3\xb8\x85q \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_hostnameB\x07\n\x05_name\"\x9c\x03\n\x19\x42ulkInsertOperationStatus\x12!\n\x10\x63reated_vm_count\x18\xfe\xa9\xa2\xbd\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x10\x64\x65leted_vm_count\x18\xed\xd5\xca\x81\x01 \x01(\x05H\x01\x88\x01\x01\x12)\n\x19\x66\x61iled_to_create_vm_count\x18\xe8\xbd\xeb\x1b \x01(\x05H\x02\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x03\x88\x01\x01\x12 \n\x0ftarget_vm_count\x18\xf5\xa0\x92\xfe\x01 \x01(\x05H\x04\x88\x01\x01\"m\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x0b\n\x04\x44ONE\x10\x82\xb7\x80\x01\x12\x13\n\x0cROLLING_BACK\x10\xc1\x9d\xd9{\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\x13\n\x11_created_vm_countB\x13\n\x11_deleted_vm_countB\x1c\n\x1a_failed_to_create_vm_countB\t\n\x07_statusB\x12\n\x10_target_vm_count\"\xf2\x01\n\x1b\x42ulkInsertRegionDiskRequest\x12\x64\n\"bulk_insert_disk_resource_resource\x18\xd6\xf9\x97\x8a\x01 \x01(\x0b\x32/.google.cloud.compute.v1.BulkInsertDiskResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xfd\x01\n\x1f\x42ulkInsertRegionInstanceRequest\x12k\n&bulk_insert_instance_resource_resource\x18\xce\xc2\xe0\x13 \x01(\x0b\x32\x33.google.cloud.compute.v1.BulkInsertInstanceResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x97\x02\n\x18\x42ulkSetLabelsDiskRequest\x12i\n%bulk_zone_set_labels_request_resource\x18\x9b\xa5\xac\xfd\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.BulkZoneSetLabelsRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x0b\n\t_resource\"\xcd\x01\n\x14\x42ulkSetLabelsRequest\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x00\x88\x01\x01\x12M\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x39.google.cloud.compute.v1.BulkSetLabelsRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_label_fingerprint\"^\n\x18\x42ulkZoneSetLabelsRequest\x12\x42\n\x08requests\x18\xc4\xbf\xbd\x44 \x03(\x0b\x32-.google.cloud.compute.v1.BulkSetLabelsRequest\"l\n\x15\x43\x61\x63heInvalidationRule\x12\x15\n\ncache_tags\x18\xb6\xbd\xee\r \x03(\t\x12\x14\n\x04host\x18\xa8\xeb\xc3\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_hostB\x07\n\x05_path\"\xc2\x02\n\x0e\x43\x61\x63heKeyPolicy\x12\x1d\n\x0cinclude_host\x18\xdf\x85\x94\xe8\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1f\n\x14include_http_headers\x18\x86\xfa\x97\x01 \x03(\t\x12 \n\x15include_named_cookies\x18\xb2\xb0\xd1) \x03(\t\x12!\n\x10include_protocol\x18\xcf\xd0\xdc\x90\x01 \x01(\x08H\x01\x88\x01\x01\x12%\n\x14include_query_string\x18\x9f\xf3\x84\xe2\x01 \x01(\x08H\x02\x88\x01\x01\x12\"\n\x16query_string_blacklist\x18\x86\xaa\xa1\xa9\x01 \x03(\t\x12!\n\x16query_string_whitelist\x18\xb0\xd8\x81\x19 \x03(\tB\x0f\n\r_include_hostB\x13\n\x11_include_protocolB\x17\n\x15_include_query_string\"\xe3\x01\n.CancelInstanceGroupManagerResizeRequestRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0eresize_request\x18\x84\x84\xb9g \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb0\x02\n\x0f\x43ircuitBreakers\x12\x1f\n\x0fmax_connections\x18\xfa\xd5\xe1\x34 \x01(\x05H\x00\x88\x01\x01\x12%\n\x14max_pending_requests\x18\xe7\xa5\x8a\xb3\x01 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0cmax_requests\x18\xbf\xf8\xb2\r \x01(\x05H\x02\x88\x01\x01\x12,\n\x1bmax_requests_per_connection\x18\xc0\x96\xb8\xac\x01 \x01(\x05H\x03\x88\x01\x01\x12\x1b\n\x0bmax_retries\x18\xeb\xa2\xbe\x1a \x01(\x05H\x04\x88\x01\x01\x42\x12\n\x10_max_connectionsB\x17\n\x15_max_pending_requestsB\x0f\n\r_max_requestsB\x1e\n\x1c_max_requests_per_connectionB\x0e\n\x0c_max_retries\"\xb1\x01\n\x1f\x43loneRulesFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12&\n\x16source_firewall_policy\x18\xad\xda\xf6\x0b \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x19\n\x17_source_firewall_policy\"\xdb\x01\n&CloneRulesNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12&\n\x16source_firewall_policy\x18\xad\xda\xf6\x0b \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x19\n\x17_source_firewall_policy\"\x82\x02\n,CloneRulesRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12&\n\x16source_firewall_policy\x18\xad\xda\xf6\x0b \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x19\n\x17_source_firewall_policy\"\xe8\x12\n\nCommitment\x12\x1b\n\nauto_renew\x18\xfd\x97\xa4\xec\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08\x63\x61tegory\x18\xfe\xf9\x8a\x18 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12$\n\x14\x63ustom_end_timestamp\x18\xe4\xb4\xd6V \x01(\tH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12\x1e\n\rend_timestamp\x18\xb2\xad\x9a\xdf\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x15\x65xisting_reservations\x18\xdb\x88\x8c\xeb\x01 \x03(\t\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12U\n\x10license_resource\x18\xcc\xd4\xea\xd0\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.LicenseResourceCommitmentH\x08\x88\x01\x01\x12#\n\x18merge_source_commitments\x18\xc1\xaa\xd8Y \x03(\t\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04plan\x18\xa9\x96\xd2\x01 \x01(\tH\n\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12>\n\x0creservations\x18\xa7\xec\xcc\xbe\x01 \x03(\x0b\x32$.google.cloud.compute.v1.Reservation\x12R\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x31.google.cloud.compute.v1.CommitmentResourceStatusH\x0c\x88\x01\x01\x12\x41\n\tresources\x18\xa5\xfc\xb2N \x03(\x0b\x32+.google.cloud.compute.v1.ResourceCommitment\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12(\n\x17split_source_commitment\x18\xd4\xb7\xfd\xbf\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1f\n\x0fstart_timestamp\x18\xf9\xaa\xf1\' \x01(\tH\x0f\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x10\x88\x01\x01\x12\x1f\n\x0estatus_message\x18\xba\xc9\xe9\x8d\x01 \x01(\tH\x11\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x12\x88\x01\x01\"b\n\x08\x43\x61tegory\x12\x16\n\x12UNDEFINED_CATEGORY\x10\x00\x12\x1c\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\xd6\xba\xe6\xf2\x01\x12\x0f\n\x07LICENSE\x10\xa1\xa0\xf0\xa5\x01\x12\x0f\n\x07MACHINE\x10\xa7\xa0\xf3\xdf\x01\"Y\n\x04Plan\x12\x12\n\x0eUNDEFINED_PLAN\x10\x00\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x17\n\x10THIRTY_SIX_MONTH\x10\x86\xb5\xfd~\x12\x13\n\x0cTWELVE_MONTH\x10\xba\x9a\xc4R\"z\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\tCANCELLED\x10\xb1\xf2\x80\x14\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x0f\n\x07\x45XPIRED\x10\x85\xe6\x88\xe6\x01\x12\x15\n\x0eNOT_YET_ACTIVE\x10\xe9\xe2\xe9\t\"\x9e\x07\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x1d\n\x15\x41\x43\x43\x45LERATOR_OPTIMIZED\x10\x93\xd0\xf5\x85\x01\x12\x1f\n\x18\x41\x43\x43\x45LERATOR_OPTIMIZED_A3\x10\xbe\xcf\xceK\x12$\n\x1d\x41\x43\x43\x45LERATOR_OPTIMIZED_A3_MEGA\x10\xd3\x88\xd1J\x12%\n\x1e\x41\x43\x43\x45LERATOR_OPTIMIZED_A3_ULTRA\x10\xcb\xc7\xa1\r\x12\x1f\n\x18\x41\x43\x43\x45LERATOR_OPTIMIZED_A4\x10\xbf\xcf\xceK\x12\x18\n\x11\x43OMPUTE_OPTIMIZED\x10\xdf\xed\xc0K\x12\x1d\n\x15\x43OMPUTE_OPTIMIZED_C2D\x10\xf5\xc0\xdf\xb6\x01\x12\x1c\n\x14\x43OMPUTE_OPTIMIZED_C3\x10\xb0\xab\x8b\xcc\x01\x12\x1d\n\x15\x43OMPUTE_OPTIMIZED_C3D\x10\x94\xc1\xdf\xb6\x01\x12\x1c\n\x14\x43OMPUTE_OPTIMIZED_H3\x10\xcb\xac\x8b\xcc\x01\x12\x1d\n\x15\x43OMPUTE_OPTIMIZED_H4D\x10\xf8\xe6\xdf\xb6\x01\x12\x17\n\x0fGENERAL_PURPOSE\x10\x87\xf9\xf9\x8e\x01\x12\x1a\n\x12GENERAL_PURPOSE_C4\x10\x89\x9e\xfb\x8f\x01\x12\x1a\n\x13GENERAL_PURPOSE_C4A\x10\xd8\xa4\xecn\x12\x1a\n\x13GENERAL_PURPOSE_C4D\x10\xdb\xa4\xecn\x12\x1a\n\x12GENERAL_PURPOSE_E2\x10\xc5\x9e\xfb\x8f\x01\x12\x1a\n\x12GENERAL_PURPOSE_N2\x10\xdc\xa0\xfb\x8f\x01\x12\x1a\n\x13GENERAL_PURPOSE_N2D\x10\xe8\xf6\xecn\x12\x1a\n\x12GENERAL_PURPOSE_N4\x10\xde\xa0\xfb\x8f\x01\x12\x1a\n\x13GENERAL_PURPOSE_T2D\x10\xee\xa3\xedn\x12\x19\n\x12GRAPHICS_OPTIMIZED\x10\xd3\xf8\xd4 \x12\x18\n\x10MEMORY_OPTIMIZED\x10\xc9\xee\xac\x86\x01\x12\x1b\n\x13MEMORY_OPTIMIZED_M3\x10\xbc\x8c\xe0\x83\x01\x12\x1b\n\x13MEMORY_OPTIMIZED_M4\x10\xbd\x8c\xe0\x83\x01\x12\x1e\n\x17MEMORY_OPTIMIZED_M4_6TB\x10\xa2\xc8\xb2\x64\x12\x1f\n\x18MEMORY_OPTIMIZED_X4_16TB\x10\xe0\xef\xa6W\x12\x1f\n\x18MEMORY_OPTIMIZED_X4_24TB\x10\xbd\xc9\xa8W\x12\x1f\n\x18MEMORY_OPTIMIZED_X4_32TB\x10\x9a\xa3\xaaW\x12\x1c\n\x14STORAGE_OPTIMIZED_Z3\x10\xb5\xd9\x87\x97\x01\x12\x18\n\x10TYPE_UNSPECIFIED\x10\x92\xfb\xdb\xd0\x01\x42\r\n\x0b_auto_renewB\x0b\n\t_categoryB\x15\n\x13_creation_timestampB\x17\n\x15_custom_end_timestampB\x0e\n\x0c_descriptionB\x10\n\x0e_end_timestampB\x05\n\x03_idB\x07\n\x05_kindB\x13\n\x11_license_resourceB\x07\n\x05_nameB\x07\n\x05_planB\t\n\x07_regionB\x12\n\x10_resource_statusB\x0c\n\n_self_linkB\x1a\n\x18_split_source_commitmentB\x12\n\x10_start_timestampB\t\n\x07_statusB\x11\n\x0f_status_messageB\x07\n\x05_type\"\xbf\x03\n\x18\x43ommitmentAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.CommitmentAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.CommitmentsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0e\x43ommitmentList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.Commitment\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"|\n\x18\x43ommitmentResourceStatus\x12\x36\n%custom_term_eligibility_end_timestamp\x18\xfb\xab\xc7\xad\x01 \x01(\tH\x00\x88\x01\x01\x42(\n&_custom_term_eligibility_end_timestamp\"\x9c\x01\n\x15\x43ommitmentsScopedList\x12<\n\x0b\x63ommitments\x18\xfe\xaf\xf2\xd6\x01 \x03(\x0b\x32#.google.cloud.compute.v1.Commitment\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xd0\x02\n\x1a\x43onfidentialInstanceConfig\x12*\n\x1a\x63onfidential_instance_type\x18\xad\x8c\xde\x14 \x01(\tH\x00\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x01\x88\x01\x01\"\x99\x01\n\x18\x43onfidentialInstanceType\x12(\n$UNDEFINED_CONFIDENTIAL_INSTANCE_TYPE\x10\x00\x12-\n&CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED\x10\x85\xb0\xec\x36\x12\t\n\x03SEV\x10\xc4\x80\x05\x12\x0e\n\x07SEV_SNP\x10\xda\xdd\xaf\n\x12\t\n\x03TDX\x10\xe8\x87\x05\x42\x1d\n\x1b_confidential_instance_typeB\x1e\n\x1c_enable_confidential_compute\"S\n\x12\x43onnectionDraining\x12$\n\x14\x64raining_timeout_sec\x18\x9e\xd5\xack \x01(\x05H\x00\x88\x01\x01\x42\x17\n\x15_draining_timeout_sec\"\x88\x02\n\"ConsistentHashLoadBalancerSettings\x12\x62\n\x0bhttp_cookie\x18\xfb\xab\x97\x03 \x01(\x0b\x32\x45.google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookieH\x00\x88\x01\x01\x12 \n\x10http_header_name\x18\xc6\xf7\xfao \x01(\tH\x01\x88\x01\x01\x12!\n\x11minimum_ring_size\x18\xbf\xbb\xe1o \x01(\x03H\x02\x88\x01\x01\x42\x0e\n\x0c_http_cookieB\x13\n\x11_http_header_nameB\x14\n\x12_minimum_ring_size\"\xab\x01\n,ConsistentHashLoadBalancerSettingsHttpCookie\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x01\x88\x01\x01\x12\x35\n\x03ttl\x18\xec\x83\x07 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x07\n\x05_pathB\x06\n\x04_ttl\"\x9e\x02\n\nCorsPolicy\x12\"\n\x11\x61llow_credentials\x18\x86\xfe\xbd\xe5\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\rallow_headers\x18\x90\xc1\xc5\x15 \x03(\t\x12\x18\n\rallow_methods\x18\xbc\xf9\xf8\x61 \x03(\t\x12\x1f\n\x14\x61llow_origin_regexes\x18\xd2\x8d\xda\x66 \x03(\t\x12\x18\n\rallow_origins\x18\x97\xce\xf8\\ \x03(\t\x12\x19\n\x08\x64isabled\x18\xfc\xf4\x98\x81\x01 \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0e\x65xpose_headers\x18\x8b\xcc\x88v \x03(\t\x12\x18\n\x07max_age\x18\xa4\xf7\xd3\x92\x01 \x01(\x05H\x02\x88\x01\x01\x42\x14\n\x12_allow_credentialsB\x0b\n\t_disabledB\n\n\x08_max_age\"\xd1\x02\n*CreateInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n9instance_group_managers_create_instances_request_resource\x18\x93\xfa\xda\x0b \x01(\x0b\x32\x44.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe9\x02\n0CreateInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_instance_group_managers_create_instances_request_resource\x18\x88\xbf\x98\xab\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf7\x01\n%CreateMembersInterconnectGroupRequest\x12#\n\x12interconnect_group\x18\x8e\xb7\xa9\xb9\x01 \x01(\tB\x03\xe0\x41\x02\x12\x85\x01\n3interconnect_groups_create_members_request_resource\x18\xed\xfc\x8b\xa6\x01 \x01(\x0b\x32?.google.cloud.compute.v1.InterconnectGroupsCreateMembersRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\"\x91\x02\n\x19\x43reateSnapshotDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0bguest_flush\x18\xdd\x93\xec\xb7\x01 \x01(\x08H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x45\n\x11snapshot_resource\x18\xa9\xb8\xc1\xe5\x01 \x01(\x0b\x32!.google.cloud.compute.v1.SnapshotB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x0e\n\x0c_guest_flushB\r\n\x0b_request_id\"\xed\x01\n\x1f\x43reateSnapshotRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x45\n\x11snapshot_resource\x18\xa9\xb8\xc1\xe5\x01 \x01(\x0b\x32!.google.cloud.compute.v1.SnapshotB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb8\x01\n\x19\x43ustomErrorResponsePolicy\x12j\n\x14\x65rror_response_rules\x18\x90\xad\xfc\x06 \x03(\x0b\x32I.google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule\x12\x1d\n\rerror_service\x18\xfe\xee\xa6N \x01(\tH\x00\x88\x01\x01\x42\x10\n\x0e_error_service\"\xb6\x01\n0CustomErrorResponsePolicyCustomErrorResponseRule\x12\x1f\n\x14match_response_codes\x18\xe2\x88\x87\x32 \x03(\t\x12\'\n\x16override_response_code\x18\xf8\xd7\xf0\xfc\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x01\x88\x01\x01\x42\x19\n\x17_override_response_codeB\x07\n\x05_path\"\x8f\x02\n\x15\x43ustomerEncryptionKey\x12\x1d\n\x0ckms_key_name\x18\x99\xeb\xfb\xe6\x01 \x01(\tH\x00\x88\x01\x01\x12\'\n\x17kms_key_service_account\x18\xd5\xc5\x90\x64 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x07raw_key\x18\xc8\xe3\x98\xd6\x01 \x01(\tH\x02\x88\x01\x01\x12\"\n\x11rsa_encrypted_key\x18\xa5\xc3\xfc\x9f\x01 \x01(\tH\x03\x88\x01\x01\x12\x16\n\x06sha256\x18\xa7\xec\x8eQ \x01(\tH\x04\x88\x01\x01\x42\x0f\n\r_kms_key_nameB\x1a\n\x18_kms_key_service_accountB\n\n\x08_raw_keyB\x14\n\x12_rsa_encrypted_keyB\t\n\x07_sha256\"\xb5\x01\n\"CustomerEncryptionKeyProtectedDisk\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x00\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_disk_encryption_keyB\t\n\x07_source\"C\n\x04\x44\x61ta\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"\xeb\x01\n!DeleteAccessConfigInstanceRequest\x12\x1d\n\raccess_config\x18\xfd\xe4\xde\" \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x9f\x01\n\x14\x44\x65leteAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa1\x01\n\x17\x44\x65leteAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x8a\x01\n\x1a\x44\x65leteBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x8d\x01\n\x1b\x44\x65leteBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x94\x01\n\x11\x44\x65leteDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x95\x01\n\x1f\x44\x65leteExternalVpnGatewayRequest\x12$\n\x14\x65xternal_vpn_gateway\x18\x85\xd7\xb3\x34 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"j\n\x1b\x44\x65leteFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x80\x01\n\x15\x44\x65leteFirewallRequest\x12\x19\n\x08\x66irewall\x18\x80\xfa\xd5\xf3\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xae\x01\n\x1b\x44\x65leteForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x84\x01\n\x1a\x44\x65leteGlobalAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x93\x01\n!DeleteGlobalForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa0\x01\n\'DeleteGlobalNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"R\n\x1c\x44\x65leteGlobalOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"\x1f\n\x1d\x44\x65leteGlobalOperationResponse\"o\n(DeleteGlobalOrganizationOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_parent_id\"+\n)DeleteGlobalOrganizationOperationResponse\"\xa2\x01\n)DeleteGlobalPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x87\x01\n\x18\x44\x65leteHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"y\n\x12\x44\x65leteImageRequest\x12\x15\n\x05image\x18\xdb\xd2\xea/ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb6\x01\n!DeleteInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe3\x01\n.DeleteInstanceGroupManagerResizeRequestRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0eresize_request\x18\x84\x84\xb9g \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa7\x01\n\x1a\x44\x65leteInstanceGroupRequest\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x9c\x01\n\x15\x44\x65leteInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x91\x01\n\x1d\x44\x65leteInstanceTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd1\x02\n*DeleteInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n9instance_group_managers_delete_instances_request_resource\x18\x84\xc6\xadO \x01(\x0b\x32\x44.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe9\x02\n0DeleteInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_instance_group_managers_delete_instances_request_resource\x18\xf9\x8a\xeb\xee\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xac\x01\n\x1c\x44\x65leteInstantSnapshotRequest\x12!\n\x10instant_snapshot\x18\xe2\xdc\xdf\xba\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa7\x01\n(DeleteInterconnectAttachmentGroupRequest\x12-\n\x1dinterconnect_attachment_group\x18\xf4\xef\x98$ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbe\x01\n#DeleteInterconnectAttachmentRequest\x12(\n\x17interconnect_attachment\x18\xf4\x8a\xf7\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x93\x01\n\x1e\x44\x65leteInterconnectGroupRequest\x12#\n\x12interconnect_group\x18\x8e\xb7\xa9\xb9\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x87\x01\n\x19\x44\x65leteInterconnectRequest\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"}\n\x14\x44\x65leteLicenseRequest\x12\x17\n\x07license\x18\xc1\x88\xc2O \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x88\x01\n\x19\x44\x65leteMachineImageRequest\x12\x1d\n\rmachine_image\x18\xe3\xfe\xfe \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb3\x01\n\x1e\x44\x65leteNetworkAttachmentRequest\x12\"\n\x12network_attachment\x18\xd4\x97\x8fk \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc7\x01\n\'DeleteNetworkEdgeSecurityServiceRequest\x12-\n\x1dnetwork_edge_security_service\x18\xa7\x9f\xefJ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb7\x01\n!DeleteNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x94\x01\n\"DeleteNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"}\n\x14\x44\x65leteNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa0\x01\n\x16\x44\x65leteNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xaa\x01\n\x19\x44\x65leteNodeTemplateRequest\x12\x1e\n\rnode_template\x18\x97\xe4\x8b\x9a\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x97\x02\n\x1b\x44\x65leteNodesNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12p\n)node_groups_delete_nodes_request_resource\x18\x92\xd7\xb3W \x01(\x0b\x32\x35.google.cloud.compute.v1.NodeGroupsDeleteNodesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xaf\x01\n\x1c\x44\x65letePacketMirroringRequest\x12 \n\x10packet_mirroring\x18\xcc\xb9\xd1\n \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbc\x02\n3DeletePerInstanceConfigsInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x9c\x01\n@instance_group_managers_delete_per_instance_configs_req_resource\x18\xa0\xea\xe8\xac\x01 \x01(\x0b\x32I.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReqB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zone\"\xc6\x02\n9DeletePerInstanceConfigsRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9c\x01\nAregion_instance_group_manager_delete_instance_config_req_resource\x18\x85\x9b- \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReqB\x03\xe0\x41\x02\"\x9e\x01\n$DeletePublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbd\x01\n#DeletePublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xab\x01\n\x1d\x44\x65leteRegionAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb4\x01\n!DeleteRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9e\x01\n\x17\x44\x65leteRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xae\x01\n\x1e\x44\x65leteRegionHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbd\x01\n%DeleteRegionHealthCheckServiceRequest\x12%\n\x14health_check_service\x18\xdb\x9b\xdd\xc2\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc0\x01\n\'DeleteRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb8\x01\n#DeleteRegionInstanceTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb6\x01\n\"DeleteRegionInstantSnapshotRequest\x12!\n\x10instant_snapshot\x18\xe2\xdc\xdf\xba\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc1\x01\n\'DeleteRegionNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbb\x01\n(DeleteRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc0\x01\n\'DeleteRegionNotificationEndpointRequest\x12&\n\x15notification_endpoint\x18\xe9\xbc\xd6\xb3\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"j\n\x1c\x44\x65leteRegionOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"\x1f\n\x1d\x44\x65leteRegionOperationResponse\"\xb3\x01\n!DeleteRegionSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb3\x01\n!DeleteRegionSslCertificateRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fssl_certificate\x18\xe4\xd7\x92\x16 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xaa\x01\n\x1c\x44\x65leteRegionSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb6\x01\n\"DeleteRegionTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb8\x01\n#DeleteRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb5\x01\n!DeleteRegionTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa4\x01\n\x19\x44\x65leteRegionUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa2\x01\n\x18\x44\x65leteReservationRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xad\x01\n\x1b\x44\x65leteResourcePolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fresource_policy\x18\x83\xa5\xf7K \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xca\x01\n\x1e\x44\x65leteRoutePolicyRouterRequest\x12\x16\n\x06policy\x18\xb2\xca\xb6+ \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_policyB\r\n\x0b_request_id\"y\n\x12\x44\x65leteRouteRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05route\x18\xc9\xe4\xea\x33 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x9c\x01\n\x13\x44\x65leteRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8c\x01\n\x1b\x44\x65leteSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb4\x01\n\x1e\x44\x65leteServiceAttachmentRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12#\n\x12service_attachment\x18\xed\xa9\xd0\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb1\x01\n&DeleteSignedUrlKeyBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08key_name\x18\xeb\xf0\xee\xee\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb4\x01\n\'DeleteSignedUrlKeyBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08key_name\x18\xeb\xf0\xee\xee\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x80\x01\n\x15\x44\x65leteSnapshotRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x08snapshot\x18\xc4\xab\xeb\x87\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8c\x01\n\x1b\x44\x65leteSslCertificateRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fssl_certificate\x18\xe4\xd7\x92\x16 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x83\x01\n\x16\x44\x65leteSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa4\x01\n\x18\x44\x65leteStoragePoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa5\x01\n\x17\x44\x65leteSubnetworkRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8f\x01\n\x1c\x44\x65leteTargetGrpcProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_grpc_proxy\x18\xfb\xb4\xb2\x02 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8f\x01\n\x1c\x44\x65leteTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x91\x01\n\x1d\x44\x65leteTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xaa\x01\n\x1b\x44\x65leteTargetInstanceRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12 \n\x0ftarget_instance\x18\x83\x8f\x96\x8a\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa5\x01\n\x17\x44\x65leteTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8e\x01\n\x1b\x44\x65leteTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8e\x01\n\x1b\x44\x65leteTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb3\x01\n\x1d\x44\x65leteTargetVpnGatewayRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12#\n\x12target_vpn_gateway\x18\xcb\x80\xf6\xfd\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"}\n\x13\x44\x65leteUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa6\x01\n\x17\x44\x65leteVpnGatewayRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bvpn_gateway\x18\xf9\x83\xf6\xc1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa3\x01\n\x16\x44\x65leteVpnTunnelRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\nvpn_tunnel\x18\x93\x94\xca\x44 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"f\n\x1a\x44\x65leteZoneOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\x1d\n\x1b\x44\x65leteZoneOperationResponse\"J\n\x06\x44\x65nied\x12\x1d\n\x0cI_p_protocol\x18\xbd\xf6\xde\xe8\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05ports\x18\x92\xf0\xf9\x32 \x03(\tB\x0f\n\r_I_p_protocol\"\xd6\x01\n\x15\x44\x65precateImageRequest\x12X\n\x1b\x64\x65precation_status_resource\x18\xf0\x89\xe5\x9e\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusB\x03\xe0\x41\x02\x12\x15\n\x05image\x18\xdb\xd2\xea/ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbf\x02\n\x11\x44\x65precationStatus\x12\x18\n\x07\x64\x65leted\x18\x99\xe0\xa8\xe3\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x08obsolete\x18\x99\x8b\xc5\xaa\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0breplacement\x18\x92\x9c\xbd\xcd\x01 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x04\x88\x01\x01\"a\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x07\x44\x45LETED\x10\xf9\xf7\xd6\x39\x12\x12\n\nDEPRECATED\x10\xb3\xa3\xf9\xdc\x01\x12\x0f\n\x08OBSOLETE\x10\x99\xeb\xdc\x1f\x42\n\n\x08_deletedB\r\n\x0b_deprecatedB\x0b\n\t_obsoleteB\x0e\n\x0c_replacementB\x08\n\x06_state\"\xbd\x01\n\x19\x44\x65tachDiskInstanceRequest\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcf\x02\n7DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest\x12\x9c\x01\n@global_network_endpoint_groups_detach_endpoints_request_resource\x18\xdd\x8d\x9f\x04 \x01(\x0b\x32J.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequestB\x03\xe0\x41\x02\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xda\x02\n1DetachNetworkEndpointsNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x90\x01\n9network_endpoint_groups_detach_endpoints_request_resource\x18\xf9\xa0\xee\xf5\x01 \x01(\x0b\x32\x44.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf1\x02\n7DetachNetworkEndpointsRegionNetworkEndpointGroupRequest\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_network_endpoint_groups_detach_endpoints_request_resource\x18\xee\xe5\xab\x95\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionNetworkEndpointGroupsDetachEndpointsRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"l\n\x1c\x44isableXpnHostProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xec\x01\n DisableXpnResourceProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12z\n.projects_disable_xpn_resource_request_resource\x18\xaa\xd4\xdc\x63 \x01(\x0b\x32:.google.cloud.compute.v1.ProjectsDisableXpnResourceRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xcf\x1a\n\x04\x44isk\x12\x1b\n\x0b\x61\x63\x63\x65ss_mode\x18\x9e\xf7\xcf\x13 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x01\x88\x01\x01\x12Q\n\x12\x61sync_primary_disk\x18\x9d\xf5\x89V \x01(\x0b\x32-.google.cloud.compute.v1.DiskAsyncReplicationH\x02\x88\x01\x01\x12Y\n\x15\x61sync_secondary_disks\x18\xa8\xe8\xfd\x99\x01 \x03(\x0b\x32\x36.google.cloud.compute.v1.Disk.AsyncSecondaryDisksEntry\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x05\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x06\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\t\x88\x01\x01\x12=\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32).google.cloud.compute.v1.Disk.LabelsEntry\x12%\n\x15last_attach_timestamp\x18\xa5\x9c\x8d\x14 \x01(\tH\n\x88\x01\x01\x12%\n\x15last_detach_timestamp\x18\xf3\xdb\xf6\x1a \x01(\tH\x0b\x88\x01\x01\x12\x18\n\rlicense_codes\x18\xa8\x85\xd8\x15 \x03(\x03\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x1e\n\rlocation_hint\x18\xd1\x81\x92\xa7\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\r\x88\x01\x01\x12\x18\n\x07options\x18\x9e\x8d\x9a\xac\x01 \x01(\tH\x0e\x88\x01\x01\x12;\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32#.google.cloud.compute.v1.DiskParamsH\x0f\x88\x01\x01\x12*\n\x19physical_block_size_bytes\x18\x87\xa0\xa3\xc8\x01 \x01(\x03H\x10\x88\x01\x01\x12 \n\x10provisioned_iops\x18\xd4\xbd\x87Y \x01(\x03H\x11\x88\x01\x01\x12\'\n\x16provisioned_throughput\x18\x95\xbe\x88\xfb\x01 \x01(\x03H\x12\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x13\x88\x01\x01\x12\x18\n\rreplica_zones\x18\x80\xb8\x8c\x17 \x03(\t\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12L\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32+.google.cloud.compute.v1.DiskResourceStatusH\x14\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x15\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x16\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x17\x88\x01\x01\x12\x18\n\x07size_gb\x18\xd9\x8b\x80\xec\x01 \x01(\x03H\x18\x88\x01\x01\x12/\n\x1fsource_consistency_group_policy\x18\xdd\xa2\xad\t \x01(\tH\x19\x88\x01\x01\x12\x32\n\"source_consistency_group_policy_id\x18\xbd\x8e\xcb\x7f \x01(\tH\x1a\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x1b\x88\x01\x01\x12\x1f\n\x0esource_disk_id\x18\xd9\xcd\xc9\xd8\x01 \x01(\tH\x1c\x88\x01\x01\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\x1d\x88\x01\x01\x12\\\n\x1bsource_image_encryption_key\x18\xab\x91\xf5\xb5\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x1e\x88\x01\x01\x12\x1f\n\x0fsource_image_id\x18\xa3\xfc\xb0\x1a \x01(\tH\x1f\x88\x01\x01\x12\'\n\x17source_instant_snapshot\x18\x86\x84\xc3h \x01(\tH \x88\x01\x01\x12+\n\x1asource_instant_snapshot_id\x18\xf4\xd3\x90\x89\x01 \x01(\tH!\x88\x01\x01\x12\x1f\n\x0fsource_snapshot\x18\xe8\x9a\x8e< \x01(\tH\"\x88\x01\x01\x12_\n\x1esource_snapshot_encryption_key\x18\xda\x8e\xe7\x90\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH#\x88\x01\x01\x12\"\n\x12source_snapshot_id\x18\xd2\x96\x98/ \x01(\tH$\x88\x01\x01\x12%\n\x15source_storage_object\x18\xa7\xb4\x90o \x01(\tH%\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH&\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tH\'\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH(\x88\x01\x01\x12\x10\n\x05users\x18\x88\x9c\x9a\x35 \x03(\t\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH)\x88\x01\x01\x1am\n\x18\x41syncSecondaryDisksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.compute.v1.DiskAsyncReplicationList:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"q\n\nAccessMode\x12\x19\n\x15UNDEFINED_ACCESS_MODE\x10\x00\x12\x15\n\x0eREAD_ONLY_MANY\x10\xa9\xa7\xa1\x1e\x12\x17\n\x0fREAD_WRITE_MANY\x10\xa8\xc2\x86\xe9\x01\x12\x18\n\x11READ_WRITE_SINGLE\x10\xd1\x99\xae/\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"\x88\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x11\n\tRESTORING\x10\xab\xa7\xe2\xc0\x01\x12\x13\n\x0bUNAVAILABLE\x10\xb0\xd8\xa5\xc5\x01\x42\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x15\n\x13_async_primary_diskB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x16\n\x14_disk_encryption_keyB\x1e\n\x1c_enable_confidential_computeB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x18\n\x16_last_attach_timestampB\x18\n\x16_last_detach_timestampB\x10\n\x0e_location_hintB\x07\n\x05_nameB\n\n\x08_optionsB\t\n\x07_paramsB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\t\n\x07_regionB\x12\n\x10_resource_statusB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\n\n\x08_size_gbB\"\n _source_consistency_group_policyB%\n#_source_consistency_group_policy_idB\x0e\n\x0c_source_diskB\x11\n\x0f_source_disk_idB\x0f\n\r_source_imageB\x1e\n\x1c_source_image_encryption_keyB\x12\n\x10_source_image_idB\x1a\n\x18_source_instant_snapshotB\x1d\n\x1b_source_instant_snapshot_idB\x12\n\x10_source_snapshotB!\n\x1f_source_snapshot_encryption_keyB\x15\n\x13_source_snapshot_idB\x18\n\x16_source_storage_objectB\t\n\x07_statusB\x0f\n\r_storage_poolB\x07\n\x05_typeB\x07\n\x05_zone\"\xad\x03\n\x12\x44iskAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12H\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x36.google.cloud.compute.v1.DiskAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aV\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.google.cloud.compute.v1.DisksScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xed\x01\n\x14\x44iskAsyncReplication\x12\'\n\x18\x63onsistency_group_policy\x18\xb9\xc3y \x01(\tH\x00\x88\x01\x01\x12+\n\x1b\x63onsistency_group_policy_id\x18\xe1\x92\xbe| \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tH\x02\x88\x01\x01\x12\x17\n\x07\x64isk_id\x18\xfd\xc5\x8a\x1d \x01(\tH\x03\x88\x01\x01\x42\x1b\n\x19_consistency_group_policyB\x1e\n\x1c_consistency_group_policy_idB\x07\n\x05_diskB\n\n\x08_disk_id\"\x8c\x01\n\x18\x44iskAsyncReplicationList\x12U\n\x16\x61sync_replication_disk\x18\x93\xcb\xc3n \x01(\x0b\x32-.google.cloud.compute.v1.DiskAsyncReplicationH\x00\x88\x01\x01\x42\x19\n\x17_async_replication_disk\"\xa4\x03\n\x17\x44iskInstantiationConfig\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0c\x63ustom_image\x18\x8d\xfe\xe5W \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tH\x02\x88\x01\x01\x12!\n\x10instantiate_from\x18\xdf\x9f\xca\xbb\x01 \x01(\tH\x03\x88\x01\x01\"\xc6\x01\n\x0fInstantiateFrom\x12\x1e\n\x1aUNDEFINED_INSTANTIATE_FROM\x10\x00\x12\x18\n\x10\x41TTACH_READ_ONLY\x10\xbb\xae\xfe\xf4\x01\x12\x0c\n\x05\x42LANK\x10\xb4\xb2\x96\x1e\x12\x13\n\x0c\x43USTOM_IMAGE\x10\xed\xf5\xcd]\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\x12\x15\n\x0e\x44O_NOT_INCLUDE\x10\xc8\x82\xd9\x31\x12\x13\n\x0cSOURCE_IMAGE\x10\x97\xe0\xee\x1d\x12\x1a\n\x13SOURCE_IMAGE_FAMILY\x10\x8c\xc9\xd2$B\x0e\n\x0c_auto_deleteB\x0f\n\r_custom_imageB\x0e\n\x0c_device_nameB\x13\n\x11_instantiate_from\"\x99\x02\n\x08\x44iskList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12/\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1d.google.cloud.compute.v1.Disk\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"u\n\x0f\x44iskMoveRequest\x12 \n\x10\x64\x65stination_zone\x18\xbd\xe2\xef> \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_disk\x18\x8b\xcf\xe2\x1d \x01(\tH\x01\x88\x01\x01\x42\x13\n\x11_destination_zoneB\x0e\n\x0c_target_disk\"\xa9\x01\n\nDiskParams\x12_\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32<.google.cloud.compute.v1.DiskParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfa\x02\n\x12\x44iskResourceStatus\x12\x65\n\x12\x61sync_primary_disk\x18\x9d\xf5\x89V \x01(\x0b\x32\x41.google.cloud.compute.v1.DiskResourceStatusAsyncReplicationStatusH\x00\x88\x01\x01\x12g\n\x15\x61sync_secondary_disks\x18\xa8\xe8\xfd\x99\x01 \x03(\x0b\x32\x44.google.cloud.compute.v1.DiskResourceStatus.AsyncSecondaryDisksEntry\x1a}\n\x18\x41syncSecondaryDisksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12P\n\x05value\x18\x02 \x01(\x0b\x32\x41.google.cloud.compute.v1.DiskResourceStatusAsyncReplicationStatus:\x02\x38\x01\x42\x15\n\x13_async_primary_disk\"\xda\x01\n(DiskResourceStatusAsyncReplicationStatus\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x00\x88\x01\x01\"\x8c\x01\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x07\x43REATED\x10\xc8\x95\xe8@\x12\x10\n\x08STARTING\x10\xc0\xa0\x8b\xe9\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x42\x08\n\x06_state\"\x84\x04\n\x08\x44iskType\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12%\n\x14\x64\x65\x66\x61ult_disk_size_gb\x18\xf5\xa4\x85\x81\x01 \x01(\x03H\x01\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12 \n\x0fvalid_disk_size\x18\xe0\x89\xc5\xeb\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\n\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x17\n\x15_default_disk_size_gbB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x0c\n\n_self_linkB\x12\n\x10_valid_disk_sizeB\x07\n\x05_zone\"\xb9\x03\n\x16\x44iskTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12L\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32:.google.cloud.compute.v1.DiskTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aZ\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.compute.v1.DiskTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa1\x02\n\x0c\x44iskTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.DiskType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x96\x01\n\x13\x44iskTypesScopedList\x12\x38\n\ndisk_types\x18\xd7\xbe\xed^ \x03(\x0b\x32!.google.cloud.compute.v1.DiskType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"?\n\x1f\x44isksAddResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"B\n\"DisksRemoveResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\":\n\x12\x44isksResizeRequest\x12\x18\n\x07size_gb\x18\xd9\x8b\x80\xec\x01 \x01(\x03H\x00\x88\x01\x01\x42\n\n\x08_size_gb\"\x89\x01\n\x0f\x44isksScopedList\x12/\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32\x1d.google.cloud.compute.v1.Disk\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"b\n!DisksStartAsyncReplicationRequest\x12$\n\x14\x61sync_secondary_disk\x18\xab\x83\xe3> \x01(\tH\x00\x88\x01\x01\x42\x17\n\x15_async_secondary_disk\"]\n&DisksStopGroupAsyncReplicationResource\x12\x1f\n\x0fresource_policy\x18\x83\xa5\xf7K \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_resource_policy\"B\n\rDisplayDevice\x12\x1e\n\x0e\x65nable_display\x18\x86\xe4\xe6\x06 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x81\x02\n\x12\x44istributionPolicy\x12\x1d\n\x0ctarget_shape\x18\xf3\xe6\xbb\xa1\x01 \x01(\tH\x00\x88\x01\x01\x12N\n\x05zones\x18\xc7\xa4\xad\x37 \x03(\x0b\x32<.google.cloud.compute.v1.DistributionPolicyZoneConfiguration\"k\n\x0bTargetShape\x12\x1a\n\x16UNDEFINED_TARGET_SHAPE\x10\x00\x12\t\n\x03\x41NY\x10\xcc\xfb\x03\x12\x16\n\x0f\x41NY_SINGLE_ZONE\x10\xd0\xa6\x91\x1d\x12\x10\n\x08\x42\x41LANCED\x10\x88\xba\xad\xdf\x01\x12\x0b\n\x04\x45VEN\x10\x9a\xd2\x82\x01\x42\x0f\n\r_target_shape\"D\n#DistributionPolicyZoneConfiguration\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_zone\"Q\n\x08\x44uration\x12\x15\n\x05nanos\x18\xbf\xb8\xef\x31 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x07seconds\x18\xff\x94\xb5\xab\x01 \x01(\x03H\x01\x88\x01\x01\x42\x08\n\x06_nanosB\n\n\x08_seconds\"k\n\x1b\x45nableXpnHostProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xea\x01\n\x1f\x45nableXpnResourceProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12y\n-projects_enable_xpn_resource_request_resource\x18\xaf\xd0\x9b\xc9\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.ProjectsEnableXpnResourceRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"<\n\x05\x45rror\x12\x33\n\x06\x65rrors\x18\xeb\xde\xd5\x96\x01 \x03(\x0b\x32\x1f.google.cloud.compute.v1.Errors\"\xd7\x02\n\x0c\x45rrorDetails\x12>\n\nerror_info\x18\x85\xa1\x85\x0c \x01(\x0b\x32\".google.cloud.compute.v1.ErrorInfoH\x00\x88\x01\x01\x12\x33\n\x04help\x18\xc1\x9e\xc3\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.HelpH\x01\x88\x01\x01\x12M\n\x11localized_message\x18\xc3\xfe\xf2\xc0\x01 \x01(\x0b\x32).google.cloud.compute.v1.LocalizedMessageH\x02\x88\x01\x01\x12\x46\n\nquota_info\x18\x95\xd4\xe4, \x01(\x0b\x32*.google.cloud.compute.v1.QuotaExceededInfoH\x03\x88\x01\x01\x42\r\n\x0b_error_infoB\x07\n\x05_helpB\x14\n\x12_localized_messageB\r\n\x0b_quota_info\"\xcd\x01\n\tErrorInfo\x12\x17\n\x06\x64omain\x18\xc4\xa9\xcf\x87\x01 \x01(\tH\x00\x88\x01\x01\x12G\n\tmetadatas\x18\xa4\xd6\x87\x04 \x03(\x0b\x32\x31.google.cloud.compute.v1.ErrorInfo.MetadatasEntry\x12\x16\n\x06reason\x18\xc4\xa4\x96\x42 \x01(\tH\x01\x88\x01\x01\x1a\x30\n\x0eMetadatasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_domainB\t\n\x07_reason\"\xb7\x01\n\x06\x45rrors\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\rerror_details\x18\x8b\xc6\xfb\x82\x01 \x03(\x0b\x32%.google.cloud.compute.v1.ErrorDetails\x12\x19\n\x08location\x18\xb5\xbf\xbe\x8a\x01 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_codeB\x0b\n\t_locationB\n\n\x08_message\"\xdd\x02\n\x15\x45xchangedPeeringRoute\x12\x1b\n\ndest_range\x18\xe0\xb2\xea\xb5\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08imported\x18\x84\xd6\xcc\x36 \x01(\x08H\x01\x88\x01\x01\x12\x1f\n\x0fnext_hop_region\x18\xf6\xc0\xb9: \x01(\tH\x02\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\rH\x03\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x04\x88\x01\x01\"u\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x1d\n\x15\x44YNAMIC_PEERING_ROUTE\x10\xaa\x80\x82\xe0\x01\x12\x1c\n\x14STATIC_PEERING_ROUTE\x10\xb9\xc0\xde\xe1\x01\x12\x1c\n\x14SUBNET_PEERING_ROUTE\x10\xe8\x8d\x8d\xde\x01\x42\r\n\x0b_dest_rangeB\x0b\n\t_importedB\x12\n\x10_next_hop_regionB\x0b\n\t_priorityB\x07\n\x05_type\"\xbc\x02\n\x1a\x45xchangedPeeringRoutesList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12@\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32..google.cloud.compute.v1.ExchangedPeeringRoute\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb3\x02\n\"ExpandIpCidrRangeSubnetworkRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x80\x01\n1subnetworks_expand_ip_cidr_range_request_resource\x18\xde\xd0\xba\xe3\x01 \x01(\x0b\x32<.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa9\x01\n\x04\x45xpr\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nexpression\x18\x98\xa5\xee\xa7\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x08location\x18\xb5\xbf\xbe\x8a\x01 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x05title\x18\xd8\xc4\xd0\x34 \x01(\tH\x03\x88\x01\x01\x42\x0e\n\x0c_descriptionB\r\n\x0b_expressionB\x0b\n\t_locationB\x08\n\x06_title\"\xc8\x05\n\x12\x45xternalVpnGateway\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12K\n\ninterfaces\x18\xda\xf4\xe0\x05 \x03(\x0b\x32\x34.google.cloud.compute.v1.ExternalVpnGatewayInterface\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x04\x88\x01\x01\x12K\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x37.google.cloud.compute.v1.ExternalVpnGateway.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12 \n\x0fredundancy_type\x18\x9c\xce\xb7\x81\x01 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8f\x01\n\x0eRedundancyType\x12\x1d\n\x19UNDEFINED_REDUNDANCY_TYPE\x10\x00\x12\x1b\n\x13\x46OUR_IPS_REDUNDANCY\x10\xe9\xd2\xff\xf7\x01\x12%\n\x1eSINGLE_IP_INTERNALLY_REDUNDANT\x10\xf9\xc1\xed?\x12\x1a\n\x12TWO_IPS_REDUNDANCY\x10\xa3\xf7\x82\xaf\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\x12\n\x10_redundancy_typeB\x0c\n\n_self_link\"\x92\x01\n\x1b\x45xternalVpnGatewayInterface\x12\x10\n\x02id\x18\x9b\x1a \x01(\rH\x00\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x02\x88\x01\x01\x42\x05\n\x03_idB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_address\"\xd4\x02\n\x16\x45xternalVpnGatewayList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12=\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32+.google.cloud.compute.v1.ExternalVpnGateway\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb2\x01\n\x11\x46ileContentBuffer\x12\x18\n\x07\x63ontent\x18\xf9\xe8\xdc\xc5\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tfile_type\x18\x9d\xc0\xad\x8c\x01 \x01(\tH\x01\x88\x01\x01\"M\n\x08\x46ileType\x12\x17\n\x13UNDEFINED_FILE_TYPE\x10\x00\x12\t\n\x03\x42IN\x10\xe7\x81\x04\x12\x10\n\tUNDEFINED\x10\xb0\xe2\xdd\x41\x12\x0b\n\x04X509\x10\xa6\x9b\xa3\x01\x42\n\n\x08_contentB\x0c\n\n_file_type\"\x9c\x07\n\x08\x46irewall\x12\x34\n\x07\x61llowed\x18\xa8\x83\xb8M \x03(\x0b\x32 .google.cloud.compute.v1.Allowed\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x33\n\x06\x64\x65nied\x18\x9b\xf7\x9d\x83\x01 \x03(\x0b\x32\x1f.google.cloud.compute.v1.Denied\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x12\x64\x65stination_ranges\x18\xa7\xb8\xe2\x91\x01 \x03(\t\x12\x19\n\tdirection\x18\xff\x8e\x80\x35 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x08\x64isabled\x18\xfc\xf4\x98\x81\x01 \x01(\x08H\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12G\n\nlog_config\x18\x9d\xd1\xc1\xa7\x01 \x01(\x0b\x32*.google.cloud.compute.v1.FirewallLogConfigH\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x08\x88\x01\x01\x12?\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallParamsH\t\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\n\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0b\x88\x01\x01\x12\x18\n\rsource_ranges\x18\xfa\xfe\xb4_ \x03(\t\x12\"\n\x17source_service_accounts\x18\xd4\xeb\x8e\x32 \x03(\t\x12\x17\n\x0bsource_tags\x18\xbd\xbb\xd1\xd7\x01 \x03(\t\x12#\n\x17target_service_accounts\x18\x9e\x8e\x9c\xda\x01 \x03(\t\x12\x16\n\x0btarget_tags\x18\x87\x9c\xff\x1d \x03(\t\"E\n\tDirection\x12\x17\n\x13UNDEFINED_DIRECTION\x10\x00\x12\x0e\n\x06\x45GRESS\x10\xf5\xf6\xb4\xce\x01\x12\x0f\n\x07INGRESS\x10\x95\xfd\xbe\xf6\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0c\n\n_directionB\x0b\n\t_disabledB\x05\n\x03_idB\x07\n\x05_kindB\r\n\x0b_log_configB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_paramsB\x0b\n\t_priorityB\x0c\n\n_self_link\"\xa1\x02\n\x0c\x46irewallList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.Firewall\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbd\x01\n\x11\x46irewallLogConfig\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08metadata\x18\xaf\xf6\xb5) \x01(\tH\x01\x88\x01\x01\"]\n\x08Metadata\x12\x16\n\x12UNDEFINED_METADATA\x10\x00\x12\x1c\n\x14\x45XCLUDE_ALL_METADATA\x10\x92\xbd\xc1\x9f\x01\x12\x1b\n\x14INCLUDE_ALL_METADATA\x10\x84\xcd\xbfNB\t\n\x07_enableB\x0b\n\t_metadata\"\xb1\x01\n\x0e\x46irewallParams\x12\x63\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32@.google.cloud.compute.v1.FirewallParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x97\x01\n(FirewallPoliciesListAssociationsResponse\x12L\n\x0c\x61ssociations\x18\x92\xe8\xca\xf2\x01 \x03(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_kind\"\xab\x01\n\x1a\x46irewallPoliciesScopedList\x12\x46\n\x11\x66irewall_policies\x18\xaf\x8b\x95\xbb\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x97\x06\n\x0e\x46irewallPolicy\x12L\n\x0c\x61ssociations\x18\x92\xe8\xca\xf2\x01 \x03(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyAssociation\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0c\x64isplay_name\x18\xe8\x87\x91\x02 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12O\n\x16packet_mirroring_rules\x18\xc4\xff\xc0\xfd\x01 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x16\n\x06parent\x18\xaa\x91\xac% \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12!\n\x10rule_tuple_count\x18\x95\xc2\x96\xb9\x01 \x01(\x05H\t\x88\x01\x01\x12=\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x0b\x88\x01\x01\x12\x1b\n\nshort_name\x18\xee\xb8\xd0\xea\x01 \x01(\tH\x0c\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0f\n\r_display_nameB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_parentB\t\n\x07_regionB\x13\n\x11_rule_tuple_countB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\r\n\x0b_short_name\"\x8a\x02\n\x19\x46irewallPolicyAssociation\x12!\n\x11\x61ttachment_target\x18\xad\xb0\xe8S \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0c\x64isplay_name\x18\xe8\x87\x91\x02 \x01(\tH\x01\x88\x01\x01\x12#\n\x12\x66irewall_policy_id\x18\xc9\xbd\xaa\xaa\x01 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nshort_name\x18\xee\xb8\xd0\xea\x01 \x01(\tH\x04\x88\x01\x01\x42\x14\n\x12_attachment_targetB\x0f\n\r_display_nameB\x15\n\x13_firewall_policy_idB\x07\n\x05_nameB\r\n\x0b_short_name\"\x83\x02\n\x12\x46irewallPolicyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x03\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\n\n\x08_warning\"\xb7\x06\n\x12\x46irewallPolicyRule\x12\x16\n\x06\x61\x63tion\x18\xb6\xfc\xbdY \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\tdirection\x18\xff\x8e\x80\x35 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x08\x64isabled\x18\xfc\xf4\x98\x81\x01 \x01(\x08H\x03\x88\x01\x01\x12\x1f\n\x0e\x65nable_logging\x18\xa3\xc9\xed\x8c\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12I\n\x05match\x18\xc5\xb3\xb7\x31 \x01(\x0b\x32\x32.google.cloud.compute.v1.FirewallPolicyRuleMatcherH\x06\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x07\x88\x01\x01\x12\x19\n\trule_name\x18\xee\xb3\xae\x1a \x01(\tH\x08\x88\x01\x01\x12!\n\x10rule_tuple_count\x18\x95\xc2\x96\xb9\x01 \x01(\x05H\t\x88\x01\x01\x12&\n\x16security_profile_group\x18\xaa\xb3\xf3\x62 \x01(\tH\n\x88\x01\x01\x12\x1c\n\x10target_resources\x18\xf7\xd1\xf0\xfb\x01 \x03(\t\x12T\n\x12target_secure_tags\x18\xb3\xc4\x9c\xdf\x01 \x03(\x0b\x32\x34.google.cloud.compute.v1.FirewallPolicyRuleSecureTag\x12#\n\x17target_service_accounts\x18\x9e\x8e\x9c\xda\x01 \x03(\t\x12\x1b\n\x0btls_inspect\x18\xd0\xbd\xda\x14 \x01(\x08H\x0b\x88\x01\x01\"E\n\tDirection\x12\x17\n\x13UNDEFINED_DIRECTION\x10\x00\x12\x0e\n\x06\x45GRESS\x10\xf5\xf6\xb4\xce\x01\x12\x0f\n\x07INGRESS\x10\x95\xfd\xbe\xf6\x01\x42\t\n\x07_actionB\x0e\n\x0c_descriptionB\x0c\n\n_directionB\x0b\n\t_disabledB\x11\n\x0f_enable_loggingB\x07\n\x05_kindB\x08\n\x06_matchB\x0b\n\t_priorityB\x0c\n\n_rule_nameB\x13\n\x11_rule_tuple_countB\x19\n\x17_security_profile_groupB\x0e\n\x0c_tls_inspect\"\xe9\x05\n\x19\x46irewallPolicyRuleMatcher\x12\x1f\n\x13\x64\x65st_address_groups\x18\xbc\xef\xc2\xdf\x01 \x03(\t\x12\x16\n\ndest_fqdns\x18\xa1\xc1\xe2\xb0\x01 \x03(\t\x12\x1a\n\x0e\x64\x65st_ip_ranges\x18\x91\xd7\xee\xa0\x01 \x03(\t\x12\"\n\x11\x64\x65st_network_type\x18\xa8\xba\xb7\xc3\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x11\x64\x65st_region_codes\x18\x98\xab\xf9^ \x03(\t\x12$\n\x19\x64\x65st_threat_intelligences\x18\xac\xf3\x95\x39 \x03(\t\x12Z\n\x0elayer4_configs\x18\xb5\xdc\x8e\xb2\x01 \x03(\x0b\x32>.google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config\x12\x1e\n\x12src_address_groups\x18\xba\x98\x8d\xd0\x01 \x03(\t\x12\x15\n\tsrc_fqdns\x18\xe3\xcc\xed\xcf\x01 \x03(\t\x12\x19\n\rsrc_ip_ranges\x18\xd3\x80\x87\xce\x01 \x03(\t\x12!\n\x10src_network_type\x18\xa6\xf2\xdd\x93\x01 \x01(\tH\x01\x88\x01\x01\x12\x17\n\x0csrc_networks\x18\x80\x80\xebu \x03(\t\x12\x1b\n\x10src_region_codes\x18\x96\xe3\x9f/ \x03(\t\x12Q\n\x0fsrc_secure_tags\x18\x86\x94\xce\xf2\x01 \x03(\x0b\x32\x34.google.cloud.compute.v1.FirewallPolicyRuleSecureTag\x12$\n\x18src_threat_intelligences\x18\xaa\xef\xa8\x9a\x01 \x03(\t\"2\n\x0f\x44\x65stNetworkType\x12\x1f\n\x1bUNDEFINED_DEST_NETWORK_TYPE\x10\x00\"0\n\x0eSrcNetworkType\x12\x1e\n\x1aUNDEFINED_SRC_NETWORK_TYPE\x10\x00\x42\x14\n\x12_dest_network_typeB\x13\n\x11_src_network_type\"g\n%FirewallPolicyRuleMatcherLayer4Config\x12\x1c\n\x0bip_protocol\x18\xb0\x9d\xfa\xe2\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05ports\x18\x92\xf0\xf9\x32 \x03(\tB\x0e\n\x0c_ip_protocol\"\xa2\x01\n\x1b\x46irewallPolicyRuleSecureTag\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x01\x88\x01\x01\"C\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\tEFFECTIVE\x10\x87\xf3\xb8t\x12\x13\n\x0bINEFFECTIVE\x10\x82\xd4\x96\x91\x01\x42\x07\n\x05_nameB\x08\n\x06_state\"\x83\x01\n\x0e\x46ixedOrPercent\x12\x1b\n\ncalculated\x18\xbe\xd3\x8d\xe1\x01 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x05\x66ixed\x18\xf4\xce\xbb. \x01(\x05H\x01\x88\x01\x01\x12\x18\n\x07percent\x18\xc5\xc8\xa1\xbc\x01 \x01(\x05H\x02\x88\x01\x01\x42\r\n\x0b_calculatedB\x08\n\x06_fixedB\n\n\x08_percent\"\x8f\x18\n\x0e\x46orwardingRule\x12\x1b\n\x0bI_p_address\x18\xaf\x8d\xbf\x14 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0cI_p_protocol\x18\xbd\xf6\xde\xe8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\tall_ports\x18\xf4\xaf\xa3\xd4\x01 \x01(\x08H\x02\x88\x01\x01\x12$\n\x13\x61llow_global_access\x18\x8a\xc6\x91\xee\x01 \x01(\x08H\x03\x88\x01\x01\x12\'\n\x17\x61llow_psc_global_access\x18\xcb\x85\xd1} \x01(\x08H\x04\x88\x01\x01\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tH\x05\x88\x01\x01\x12%\n\x14\x62\x61se_forwarding_rule\x18\x90\xdb\xa3\xfa\x01 \x01(\tH\x06\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x07\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x08\x88\x01\x01\x12?\n/external_managed_backend_bucket_migration_state\x18\xaa\xa4\xb4\x33 \x01(\tH\t\x88\x01\x01\x12L\n.google.cloud.compute.v1.HealthChecksAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a]\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.HealthChecksScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa0\x01\n\x16HealthChecksScopedList\x12?\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\x0b\x32$.google.cloud.compute.v1.HealthCheck\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xf2\x06\n\x0cHealthStatus\x12N\n\x0b\x61nnotations\x18\xa4\xf6\xb5\x35 \x03(\x0b\x32\x36.google.cloud.compute.v1.HealthStatus.AnnotationsEntry\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x66orwarding_rule_ip\x18\x88\xac\x91R \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0chealth_state\x18\xee\xe9\xbf\x9a\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x11ipv6_health_state\x18\xc6\x80\xe0Z \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x07\x88\x01\x01\x12\x17\n\x06weight\x18\xf8\x84\xc5\x86\x01 \x01(\tH\x08\x88\x01\x01\x12\x1d\n\x0cweight_error\x18\x81\xfb\x92\xf9\x01 \x01(\tH\t\x88\x01\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"M\n\x0bHealthState\x12\x1a\n\x16UNDEFINED_HEALTH_STATE\x10\x00\x12\x0f\n\x07HEALTHY\x10\xfd\xaa\xdb\xd1\x01\x12\x11\n\tUNHEALTHY\x10\xc4\xb9\xad\xdc\x01\"2\n\x0fIpv6HealthState\x12\x1f\n\x1bUNDEFINED_IPV6_HEALTH_STATE\x10\x00\"\x8a\x01\n\x0bWeightError\x12\x1a\n\x16UNDEFINED_WEIGHT_ERROR\x10\x00\x12\x16\n\x0eINVALID_WEIGHT\x10\xe0\x8b\xfb\xb6\x01\x12\x16\n\x0eMISSING_WEIGHT\x10\x91\x97\x8f\xb7\x01\x12\x1a\n\x12UNAVAILABLE_WEIGHT\x10\xe7\xe2\xc6\xd1\x01\x12\x13\n\x0bWEIGHT_NONE\x10\x9f\xe9\xc9\xef\x01\x42\x12\n\x10_forwarding_ruleB\x15\n\x13_forwarding_rule_ipB\x0f\n\r_health_stateB\x0b\n\t_instanceB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x14\n\x12_ipv6_health_stateB\x07\n\x05_portB\t\n\x07_weightB\x0f\n\r_weight_error\"\xd4\x05\n\x1eHealthStatusForNetworkEndpoint\x12R\n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.BackendServiceReferenceH\x00\x88\x01\x01\x12R\n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.ForwardingRuleReferenceH\x01\x88\x01\x01\x12L\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\x0b\x32-.google.cloud.compute.v1.HealthCheckReferenceH\x02\x88\x01\x01\x12[\n\x14health_check_service\x18\xdb\x9b\xdd\xc2\x01 \x01(\x0b\x32\x34.google.cloud.compute.v1.HealthCheckServiceReferenceH\x03\x88\x01\x01\x12\x1d\n\x0chealth_state\x18\xee\xe9\xbf\x9a\x01 \x01(\tH\x04\x88\x01\x01\x12!\n\x11ipv6_health_state\x18\xc6\x80\xe0Z \x01(\tH\x05\x88\x01\x01\"p\n\x0bHealthState\x12\x1a\n\x16UNDEFINED_HEALTH_STATE\x10\x00\x12\x10\n\x08\x44RAINING\x10\xea\xd5\x8c\xe5\x01\x12\x0f\n\x07HEALTHY\x10\xfd\xaa\xdb\xd1\x01\x12\x11\n\tUNHEALTHY\x10\xc4\xb9\xad\xdc\x01\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\"2\n\x0fIpv6HealthState\x12\x1f\n\x1bUNDEFINED_IPV6_HEALTH_STATE\x10\x00\x42\x12\n\x10_backend_serviceB\x12\n\x10_forwarding_ruleB\x0f\n\r_health_checkB\x17\n\x15_health_check_serviceB\x0f\n\r_health_stateB\x14\n\x12_ipv6_health_state\";\n\x04Help\x12\x33\n\x05links\x18\xb9\x9f\x8d\x31 \x03(\x0b\x32!.google.cloud.compute.v1.HelpLink\"T\n\x08HelpLink\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x06\n\x04_url\"z\n\x08HostRule\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05hosts\x18\xcb\xff\xb6/ \x03(\t\x12\x1d\n\x0cpath_matcher\x18\x98\xbe\x8a\xa1\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x0f\n\r_path_matcher\"i\n\x0eHttpFaultAbort\x12\x1c\n\x0bhttp_status\x18\x89\xb7\xce\xdf\x01 \x01(\rH\x00\x88\x01\x01\x12\x1a\n\npercentage\x18\x9a\xe5\xb7H \x01(\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_http_statusB\r\n\x0b_percentage\"\x8c\x01\n\x0eHttpFaultDelay\x12?\n\x0b\x66ixed_delay\x18\xf8\xb9\x96\x97\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x00\x88\x01\x01\x12\x1a\n\npercentage\x18\x9a\xe5\xb7H \x01(\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_fixed_delayB\r\n\x0b_percentage\"\xa8\x01\n\x12HttpFaultInjection\x12>\n\x05\x61\x62ort\x18\xb0\xc6\x94, \x01(\x0b\x32\'.google.cloud.compute.v1.HttpFaultAbortH\x00\x88\x01\x01\x12>\n\x05\x64\x65lay\x18\x83\xf3\xc2- \x01(\x0b\x32\'.google.cloud.compute.v1.HttpFaultDelayH\x01\x88\x01\x01\x42\x08\n\x06_abortB\x08\n\x06_delay\"\xfc\x01\n\x10HttpHeaderAction\x12L\n\x16request_headers_to_add\x18\xe6\xae\xb1\" \x03(\x0b\x32).google.cloud.compute.v1.HttpHeaderOption\x12$\n\x19request_headers_to_remove\x18\x9f\xcf\x93h \x03(\t\x12M\n\x17response_headers_to_add\x18\xf4\xb6\xa9\x0f \x03(\x0b\x32).google.cloud.compute.v1.HttpHeaderOption\x12%\n\x1aresponse_headers_to_remove\x18\xd1\x81\xfb# \x03(\t\"\xb0\x03\n\x0fHttpHeaderMatch\x12\x1c\n\x0b\x65xact_match\x18\x85\x99\x9c\xda\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0cinvert_match\x18\x9c\xc8\xfa\xee\x01 \x01(\x08H\x02\x88\x01\x01\x12\x1c\n\x0cprefix_match\x18\xd8\xf3\xfcz \x01(\tH\x03\x88\x01\x01\x12\x1d\n\rpresent_match\x18\xc1\xfa\x93 \x01(\x08H\x04\x88\x01\x01\x12\x45\n\x0brange_match\x18\xc3\xa8\xaf. \x01(\x0b\x32(.google.cloud.compute.v1.Int64RangeMatchH\x05\x88\x01\x01\x12\x1b\n\x0bregex_match\x18\xcd\xb7\x9a\x33 \x01(\tH\x06\x88\x01\x01\x12\x1d\n\x0csuffix_match\x18\xd7\xe6\xae\xcb\x01 \x01(\tH\x07\x88\x01\x01\x42\x0e\n\x0c_exact_matchB\x0e\n\x0c_header_nameB\x0f\n\r_invert_matchB\x0f\n\r_prefix_matchB\x10\n\x0e_present_matchB\x0e\n\x0c_range_matchB\x0e\n\x0c_regex_matchB\x0f\n\r_suffix_match\"\x93\x01\n\x10HttpHeaderOption\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cheader_value\x18\xbf\xf2\xeb` \x01(\tH\x01\x88\x01\x01\x12\x17\n\x07replace\x18\xb4\xe5\xf2\t \x01(\x08H\x02\x88\x01\x01\x42\x0e\n\x0c_header_nameB\x0f\n\r_header_valueB\n\n\x08_replace\"\xc4\x01\n\x17HttpQueryParameterMatch\x12\x1c\n\x0b\x65xact_match\x18\x85\x99\x9c\xda\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rpresent_match\x18\xc1\xfa\x93 \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\x0bregex_match\x18\xcd\xb7\x9a\x33 \x01(\tH\x03\x88\x01\x01\x42\x0e\n\x0c_exact_matchB\x07\n\x05_nameB\x10\n\x0e_present_matchB\x0e\n\x0c_regex_match\"\x8c\x04\n\x12HttpRedirectAction\x12\x1d\n\rhost_redirect\x18\x93\xa1\x9c\x33 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0ehttps_redirect\x18\xb0\xf1\x97Q \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\rpath_redirect\x18\xb6\xbd\xee\x81\x01 \x01(\tH\x02\x88\x01\x01\x12 \n\x0fprefix_redirect\x18\xe9\xf5\xe0\xd4\x01 \x01(\tH\x03\x88\x01\x01\x12\'\n\x16redirect_response_code\x18\x88\xd8\x9e\xd0\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0bstrip_query\x18\xe1\x99\xf7\x18 \x01(\x08H\x05\x88\x01\x01\"\xb8\x01\n\x14RedirectResponseCode\x12$\n UNDEFINED_REDIRECT_RESPONSE_CODE\x10\x00\x12\x0c\n\x05\x46OUND\x10\xe2\xbe\xfe\x1f\x12!\n\x19MOVED_PERMANENTLY_DEFAULT\x10\xd1\x99\xb2\xb8\x01\x12\x1a\n\x12PERMANENT_REDIRECT\x10\xed\xe8\x93\xb6\x01\x12\x11\n\tSEE_OTHER\x10\xe4\xef\xaf\xd4\x01\x12\x1a\n\x12TEMPORARY_REDIRECT\x10\xaa\xe4\xb7\xe9\x01\x42\x10\n\x0e_host_redirectB\x11\n\x0f_https_redirectB\x10\n\x0e_path_redirectB\x12\n\x10_prefix_redirectB\x19\n\x17_redirect_response_codeB\x0e\n\x0c_strip_query\"\xb4\x01\n\x0fHttpRetryPolicy\x12\x1b\n\x0bnum_retries\x18\x8d\xab\x81x \x01(\rH\x00\x88\x01\x01\x12\x43\n\x0fper_try_timeout\x18\xbb\xad\xc4\x85\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x01\x88\x01\x01\x12\x1b\n\x10retry_conditions\x18\xaf\xe1\xde\r \x03(\tB\x0e\n\x0c_num_retriesB\x12\n\x10_per_try_timeout\"\xf1\x05\n\x0fHttpRouteAction\x12\x41\n\x0b\x63ors_policy\x18\x84\xcc\x9d\xbe\x01 \x01(\x0b\x32#.google.cloud.compute.v1.CorsPolicyH\x00\x88\x01\x01\x12T\n\x16\x66\x61ult_injection_policy\x18\x97\x94\xea\xc4\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpFaultInjectionH\x01\x88\x01\x01\x12\x46\n\x13max_stream_duration\x18\x98\xa5\xa5\x1d \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x02\x88\x01\x01\x12S\n\x15request_mirror_policy\x18\x82\xe0\xffh \x01(\x0b\x32,.google.cloud.compute.v1.RequestMirrorPolicyH\x03\x88\x01\x01\x12\x46\n\x0cretry_policy\x18\xa9\xe5\x8a\x1b \x01(\x0b\x32(.google.cloud.compute.v1.HttpRetryPolicyH\x04\x88\x01\x01\x12;\n\x07timeout\x18\xe1\x9a\xbd\x8d\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x05\x88\x01\x01\x12\x41\n\x0burl_rewrite\x18\xbc\xfd\xaa\x82\x01 \x01(\x0b\x32#.google.cloud.compute.v1.UrlRewriteH\x06\x88\x01\x01\x12V\n\x19weighted_backend_services\x18\xd1\xc7\xda\xa0\x01 \x03(\x0b\x32/.google.cloud.compute.v1.WeightedBackendServiceB\x0e\n\x0c_cors_policyB\x19\n\x17_fault_injection_policyB\x16\n\x14_max_stream_durationB\x18\n\x16_request_mirror_policyB\x0f\n\r_retry_policyB\n\n\x08_timeoutB\x0e\n\x0c_url_rewrite\"\xe8\x04\n\rHttpRouteRule\x12`\n\x1c\x63ustom_error_response_policy\x18\xeb\xf8\xda` \x01(\x0b\x32\x32.google.cloud.compute.v1.CustomErrorResponsePolicyH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12I\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32).google.cloud.compute.v1.HttpHeaderActionH\x02\x88\x01\x01\x12\x44\n\x0bmatch_rules\x18\xfd\xbb\xb1\xb3\x01 \x03(\x0b\x32+.google.cloud.compute.v1.HttpRouteRuleMatch\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x03\x88\x01\x01\x12G\n\x0croute_action\x18\xec\xa9\xb9\xca\x01 \x01(\x0b\x32(.google.cloud.compute.v1.HttpRouteActionH\x04\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x05\x88\x01\x01\x12J\n\x0curl_redirect\x18\xac\xa1\x98\xc1\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpRedirectActionH\x06\x88\x01\x01\x42\x1f\n\x1d_custom_error_response_policyB\x0e\n\x0c_descriptionB\x10\n\x0e_header_actionB\x0b\n\t_priorityB\x0f\n\r_route_actionB\n\n\x08_serviceB\x0f\n\r_url_redirect\"\xf5\x03\n\x12HttpRouteRuleMatch\x12\x1f\n\x0f\x66ull_path_match\x18\xdb\x89\xaa\x66 \x01(\tH\x00\x88\x01\x01\x12\x44\n\x0eheader_matches\x18\x81\xeb\xc8\xac\x01 \x03(\x0b\x32(.google.cloud.compute.v1.HttpHeaderMatch\x12\x1c\n\x0bignore_case\x18\xfd\x92\xb4\xdd\x01 \x01(\x08H\x01\x88\x01\x01\x12\x45\n\x10metadata_filters\x18\xeb\xcd\xcc\xdd\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.MetadataFilter\x12$\n\x13path_template_match\x18\x9a\xc2\xb3\x8b\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0cprefix_match\x18\xd8\xf3\xfcz \x01(\tH\x03\x88\x01\x01\x12U\n\x17query_parameter_matches\x18\xe6\x95\xbe\x88\x01 \x03(\x0b\x32\x30.google.cloud.compute.v1.HttpQueryParameterMatch\x12\x1b\n\x0bregex_match\x18\xcd\xb7\x9a\x33 \x01(\tH\x04\x88\x01\x01\x42\x12\n\x10_full_path_matchB\x0e\n\x0c_ignore_caseB\x16\n\x14_path_template_matchB\x0f\n\r_prefix_matchB\x0e\n\x0c_regex_match\"\xb9\x12\n\x05Image\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12\x61rchive_size_bytes\x18\xca\x8c\xdc\xb5\x01 \x01(\x03H\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x05\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x06\x88\x01\x01\x12\x17\n\x06\x66\x61mily\x18\xe4\xb6\xe1\x9c\x01 \x01(\tH\x07\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x08\x88\x01\x01\x12U\n\x14image_encryption_key\x18\x87\xce\xfb\xb4\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x0b\x88\x01\x01\x12>\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32*.google.cloud.compute.v1.Image.LabelsEntry\x12\x18\n\rlicense_codes\x18\xa8\x85\xd8\x15 \x03(\x03\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0c\x88\x01\x01\x12;\n\x08raw_disk\x18\xd4\xce\xf3\xef\x01 \x01(\x0b\x32 .google.cloud.compute.v1.RawDiskH\r\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x0e\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x0f\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x10\x88\x01\x01\x12\\\n\x1fshielded_instance_initial_state\x18\x83\xc4\xdc[ \x01(\x0b\x32+.google.cloud.compute.v1.InitialStateConfigH\x11\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x12\x88\x01\x01\x12[\n\x1asource_disk_encryption_key\x18\xe1\xa0\xb8\xfd\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x13\x88\x01\x01\x12\x1f\n\x0esource_disk_id\x18\xd9\xcd\xc9\xd8\x01 \x01(\tH\x14\x88\x01\x01\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\x15\x88\x01\x01\x12\\\n\x1bsource_image_encryption_key\x18\xab\x91\xf5\xb5\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x16\x88\x01\x01\x12\x1f\n\x0fsource_image_id\x18\xa3\xfc\xb0\x1a \x01(\tH\x17\x88\x01\x01\x12\x1f\n\x0fsource_snapshot\x18\xe8\x9a\x8e< \x01(\tH\x18\x88\x01\x01\x12_\n\x1esource_snapshot_encryption_key\x18\xda\x8e\xe7\x90\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x19\x88\x01\x01\x12\"\n\x12source_snapshot_id\x18\xd2\x96\x98/ \x01(\tH\x1a\x88\x01\x01\x12\x1c\n\x0bsource_type\x18\xde\xf1\xd2\xd7\x01 \x01(\tH\x1b\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x1c\x88\x01\x01\x12\x1d\n\x11storage_locations\x18\x9a\xed\xb3\x9c\x01 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"2\n\nSourceType\x12\x19\n\x15UNDEFINED_SOURCE_TYPE\x10\x00\x12\t\n\x03RAW\x10\x88\xf8\x04\"^\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x0f\n\r_architectureB\x15\n\x13_archive_size_bytesB\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x0f\n\r_disk_size_gbB\x1e\n\x1c_enable_confidential_computeB\t\n\x07_familyB\x05\n\x03_idB\x17\n\x15_image_encryption_keyB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\x0b\n\t_raw_diskB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\"\n _shielded_instance_initial_stateB\x0e\n\x0c_source_diskB\x1d\n\x1b_source_disk_encryption_keyB\x11\n\x0f_source_disk_idB\x0f\n\r_source_imageB\x1e\n\x1c_source_image_encryption_keyB\x12\n\x10_source_image_idB\x12\n\x10_source_snapshotB!\n\x1f_source_snapshot_encryption_keyB\x15\n\x13_source_snapshot_idB\x0e\n\x0c_source_typeB\t\n\x07_status\"R\n\x0fImageFamilyView\x12\x35\n\x05image\x18\xdb\xd2\xea/ \x01(\x0b\x32\x1e.google.cloud.compute.v1.ImageH\x00\x88\x01\x01\x42\x08\n\x06_image\"\x9b\x02\n\tImageList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x30\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1e.google.cloud.compute.v1.Image\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8e\x02\n\x12InitialStateConfig\x12\x39\n\x03\x64\x62s\x18\xb5\x87\x06 \x03(\x0b\x32*.google.cloud.compute.v1.FileContentBuffer\x12;\n\x04\x64\x62xs\x18\xf9\xe7\xbb\x01 \x03(\x0b\x32*.google.cloud.compute.v1.FileContentBuffer\x12;\n\x04keks\x18\xc2\xd8\xc8\x01 \x03(\x0b\x32*.google.cloud.compute.v1.FileContentBuffer\x12<\n\x02pk\x18\xfb\x1b \x01(\x0b\x32*.google.cloud.compute.v1.FileContentBufferH\x00\x88\x01\x01\x42\x05\n\x03_pk\"\xca\x01\n\x14InsertAddressRequest\x12\x43\n\x10\x61\x64\x64ress_resource\x18\xf9\x97\xde\xe6\x01 \x01(\x0b\x32 .google.cloud.compute.v1.AddressB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xce\x01\n\x17InsertAutoscalerRequest\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xbc\x01\n\x1aInsertBackendBucketRequest\x12P\n\x17\x62\x61\x63kend_bucket_resource\x18\x98\xce\xc7\xb5\x01 \x01(\x0b\x32&.google.cloud.compute.v1.BackendBucketB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbf\x01\n\x1bInsertBackendServiceRequest\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xeb\x01\n\x11InsertDiskRequest\x12<\n\rdisk_resource\x18\xf0\xd0\xab\x0c \x01(\x0b\x32\x1d.google.cloud.compute.v1.DiskB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x0f\n\r_source_image\"\xcc\x01\n\x1fInsertExternalVpnGatewayRequest\x12[\n\x1d\x65xternal_vpn_gateway_resource\x18\x88\xdf\x90\xe8\x01 \x01(\x0b\x32+.google.cloud.compute.v1.ExternalVpnGatewayB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc4\x01\n\x1bInsertFirewallPolicyRequest\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12&\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tB\x0f\xe0\x41\x02\xf2G\tparent_id\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xab\x01\n\x15InsertFirewallRequest\x12\x44\n\x11\x66irewall_resource\x18\xed\xb0\xe0\x13 \x01(\x0b\x32!.google.cloud.compute.v1.FirewallB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe0\x01\n\x1bInsertForwardingRuleRequest\x12R\n\x18\x66orwarding_rule_resource\x18\xaf\xc0\xd0\x8f\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.ForwardingRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xaf\x01\n\x1aInsertGlobalAddressRequest\x12\x43\n\x10\x61\x64\x64ress_resource\x18\xf9\x97\xde\xe6\x01 \x01(\x0b\x32 .google.cloud.compute.v1.AddressB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc5\x01\n!InsertGlobalForwardingRuleRequest\x12R\n\x18\x66orwarding_rule_resource\x18\xaf\xc0\xd0\x8f\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.ForwardingRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x01\n\'InsertGlobalNetworkEndpointGroupRequest\x12_\n\x1fnetwork_endpoint_group_resource\x18\xa7\xcd\xdb\xfa\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xdb\x01\n)InsertGlobalPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12`\n public_delegated_prefix_resource\x18\x85\xf8\xd8\x16 \x01(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefixB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb5\x01\n\x18InsertHealthCheckRequest\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd2\x01\n\x12InsertImageRequest\x12\x1c\n\x0c\x66orce_create\x18\xd0\x89\xa4^ \x01(\x08H\x00\x88\x01\x01\x12?\n\x0eimage_resource\x18\xf2\xc4\xfe\xb0\x01 \x01(\x0b\x32\x1e.google.cloud.compute.v1.ImageB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0f\n\r_force_createB\r\n\x0b_request_id\"\xee\x01\n!InsertInstanceGroupManagerRequest\x12^\n\x1finstance_group_manager_resource\x18\x8a\x8a\xbe| \x01(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManagerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xc0\x02\n.InsertInstanceGroupManagerResizeRequestRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12{\n.instance_group_manager_resize_request_resource\x18\xed\xbe\xb5\xdf\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InstanceGroupManagerResizeRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd9\x01\n\x1aInsertInstanceGroupRequest\x12P\n\x17instance_group_resource\x18\xb8\xb5\xd5\x88\x01 \x01(\x0b\x32&.google.cloud.compute.v1.InstanceGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcf\x02\n\x15InsertInstanceRequest\x12\x44\n\x11instance_resource\x18\xf8\xf0\xfe\x66 \x01(\x0b\x32!.google.cloud.compute.v1.InstanceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12)\n\x18source_instance_template\x18\xc0\xc3\xc1\x9e\x01 \x01(\tH\x01\x88\x01\x01\x12$\n\x14source_machine_image\x18\xbf\xdc\xb0\n \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x1b\n\x19_source_instance_templateB\x17\n\x15_source_machine_image\"\xc4\x01\n\x1dInsertInstanceTemplateRequest\x12U\n\x1ainstance_template_resource\x18\x89\xea\x8b\x05 \x01(\x0b\x32).google.cloud.compute.v1.InstanceTemplateB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xdf\x01\n\x1cInsertInstantSnapshotRequest\x12T\n\x19instant_snapshot_resource\x18\xcb\xaa\x88\xb7\x01 \x01(\x0b\x32(.google.cloud.compute.v1.InstantSnapshotB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe6\x01\n(InsertInterconnectAttachmentGroupRequest\x12l\n&interconnect_attachment_group_resource\x18\xf9\xdf\xe1\x04 \x01(\x0b\x32\x34.google.cloud.compute.v1.InterconnectAttachmentGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa8\x02\n#InsertInterconnectAttachmentRequest\x12\x61\n interconnect_attachment_resource\x18\xf9\xa4\xa0\x65 \x01(\x0b\x32/.google.cloud.compute.v1.InterconnectAttachmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x10\n\x0e_validate_only\"\xc7\x01\n\x1eInsertInterconnectGroupRequest\x12W\n\x1binterconnect_group_resource\x18\x9f\xf3\xe6( \x01(\x0b\x32*.google.cloud.compute.v1.InterconnectGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb8\x01\n\x19InsertInterconnectRequest\x12M\n\x15interconnect_resource\x18\x9f\xa1\xcc\xbd\x01 \x01(\x0b\x32%.google.cloud.compute.v1.InterconnectB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa9\x01\n\x14InsertLicenseRequest\x12\x43\n\x10license_resource\x18\xcc\xd4\xea\xd0\x01 \x01(\x0b\x32 .google.cloud.compute.v1.LicenseB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xee\x01\n\x19InsertMachineImageRequest\x12M\n\x16machine_image_resource\x18\xea\xaa\xfb\x1c \x01(\x0b\x32%.google.cloud.compute.v1.MachineImageB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12 \n\x0fsource_instance\x18\xb9\x98\xfd\xbc\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x12\n\x10_source_instance\"\xe8\x01\n\x1eInsertNetworkAttachmentRequest\x12W\n\x1bnetwork_attachment_resource\x18\x99\xf0\xcc\x64 \x01(\x0b\x32*.google.cloud.compute.v1.NetworkAttachmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb7\x02\n\'InsertNetworkEdgeSecurityServiceRequest\x12l\n&network_edge_security_service_resource\x18\xa6\xa3\xdb\xe3\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.NetworkEdgeSecurityServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x10\n\x0e_validate_only\"\xef\x01\n!InsertNetworkEndpointGroupRequest\x12_\n\x1fnetwork_endpoint_group_resource\x18\xa7\xcd\xdb\xfa\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xc6\x01\n\"InsertNetworkFirewallPolicyRequest\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa8\x01\n\x14InsertNetworkRequest\x12\x42\n\x10network_resource\x18\xff\xdd\x9c: \x01(\x0b\x32 .google.cloud.compute.v1.NetworkB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf1\x01\n\x16InsertNodeGroupRequest\x12\"\n\x12initial_node_count\x18\xed\xc8\xa7\" \x01(\x05\x42\x03\xe0\x41\x02\x12H\n\x13node_group_resource\x18\xab\xb3\xfa\xf0\x01 \x01(\x0b\x32\".google.cloud.compute.v1.NodeGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd9\x01\n\x19InsertNodeTemplateRequest\x12M\n\x16node_template_resource\x18\xb6\xda\xdd< \x01(\x0b\x32%.google.cloud.compute.v1.NodeTemplateB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe3\x01\n\x1cInsertPacketMirroringRequest\x12T\n\x19packet_mirroring_resource\x18\xa1\xfc\xa8\xeb\x01 \x01(\x0b\x32(.google.cloud.compute.v1.PacketMirroringB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x01\n$InsertPublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x62\n!public_advertised_prefix_resource\x18\x8f\xd7\xb2o \x01(\x0b\x32/.google.cloud.compute.v1.PublicAdvertisedPrefixB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf6\x01\n#InsertPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12`\n public_delegated_prefix_resource\x18\x85\xf8\xd8\x16 \x01(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefixB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x01\n\x1dInsertRegionAutoscalerRequest\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe6\x01\n!InsertRegionBackendServiceRequest\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x01\n\x1dInsertRegionCommitmentRequest\x12H\n\x13\x63ommitment_resource\x18\xf8\xa3\xbbt \x01(\x0b\x32#.google.cloud.compute.v1.CommitmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf5\x01\n\x17InsertRegionDiskRequest\x12<\n\rdisk_resource\x18\xf0\xd0\xab\x0c \x01(\x0b\x32\x1d.google.cloud.compute.v1.DiskB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0csource_image\x18\xb7\xe8\x86\x18 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0f\n\r_source_image\"\xdc\x01\n\x1eInsertRegionHealthCheckRequest\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf3\x01\n%InsertRegionHealthCheckServiceRequest\x12[\n\x1dhealth_check_service_resource\x18\xf2\x9b\xd0\xe3\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HealthCheckServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf8\x01\n\'InsertRegionInstanceGroupManagerRequest\x12^\n\x1finstance_group_manager_resource\x18\x8a\x8a\xbe| \x01(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManagerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xeb\x01\n#InsertRegionInstanceTemplateRequest\x12U\n\x1ainstance_template_resource\x18\x89\xea\x8b\x05 \x01(\x0b\x32).google.cloud.compute.v1.InstanceTemplateB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe9\x01\n\"InsertRegionInstantSnapshotRequest\x12T\n\x19instant_snapshot_resource\x18\xcb\xaa\x88\xb7\x01 \x01(\x0b\x32(.google.cloud.compute.v1.InstantSnapshotB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf9\x01\n\'InsertRegionNetworkEndpointGroupRequest\x12_\n\x1fnetwork_endpoint_group_resource\x18\xa7\xcd\xdb\xfa\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xed\x01\n(InsertRegionNetworkFirewallPolicyRequest\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf8\x01\n\'InsertRegionNotificationEndpointRequest\x12^\n\x1enotification_endpoint_resource\x18\xa4\xfa\xb1\xa1\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NotificationEndpointB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x96\x02\n!InsertRegionSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18security_policy_resource\x18\xfc\xaa\x89g \x01(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicyB\x03\xe0\x41\x02\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x10\n\x0e_validate_only\"\xe5\x01\n!InsertRegionSslCertificateRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18ssl_certificate_resource\x18\x89\xd4\x95V \x01(\x0b\x32\'.google.cloud.compute.v1.SslCertificateB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd7\x01\n\x1cInsertRegionSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12H\n\x13ssl_policy_resource\x18\xc8\x88\x8a\x83\x01 \x01(\x0b\x32\".google.cloud.compute.v1.SslPolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe9\x01\n\"InsertRegionTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12T\n\x1atarget_http_proxy_resource\x18\xa8\xaf\xe3\x0b \x01(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xed\x01\n#InsertRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12W\n\x1btarget_https_proxy_resource\x18\x81\xad\xe4\xce\x01 \x01(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe6\x01\n!InsertRegionTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12R\n\x19target_tcp_proxy_resource\x18\xcb\xf0\xc9\x45 \x01(\x0b\x32\'.google.cloud.compute.v1.TargetTcpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xcd\x01\n\x19InsertRegionUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd2\x01\n\x18InsertReservationRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12K\n\x14reservation_resource\x18\xa1\xee\xf4\x87\x01 \x01(\x0b\x32$.google.cloud.compute.v1.ReservationB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xdf\x01\n\x1bInsertResourcePolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18resource_policy_resource\x18\xca\x8c\xd1$ \x01(\x0b\x32\'.google.cloud.compute.v1.ResourcePolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa2\x01\n\x12InsertRouteRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12>\n\x0eroute_resource\x18\xc4\x8a\xbfk \x01(\x0b\x32\x1e.google.cloud.compute.v1.RouteB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xc6\x01\n\x13InsertRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12@\n\x0frouter_resource\x18\xc4\x80\x82J \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xef\x01\n\x1bInsertSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18security_policy_resource\x18\xfc\xaa\x89g \x01(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicyB\x03\xe0\x41\x02\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x10\n\x0e_validate_only\"\xe9\x01\n\x1eInsertServiceAttachmentRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12X\n\x1bservice_attachment_resource\x18\xa0\xb6\xc4\xe1\x01 \x01(\x0b\x32*.google.cloud.compute.v1.ServiceAttachmentB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xac\x01\n\x15InsertSnapshotRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x45\n\x11snapshot_resource\x18\xa9\xb8\xc1\xe5\x01 \x01(\x0b\x32!.google.cloud.compute.v1.SnapshotB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbe\x01\n\x1bInsertSslCertificateRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Q\n\x18ssl_certificate_resource\x18\x89\xd4\x95V \x01(\x0b\x32\'.google.cloud.compute.v1.SslCertificateB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb0\x01\n\x16InsertSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12H\n\x13ssl_policy_resource\x18\xc8\x88\x8a\x83\x01 \x01(\x0b\x32\".google.cloud.compute.v1.SslPolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd2\x01\n\x18InsertStoragePoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12K\n\x15storage_pool_resource\x18\x8d\xbc\xf9J \x01(\x0b\x32$.google.cloud.compute.v1.StoragePoolB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd2\x01\n\x17InsertSubnetworkRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12H\n\x13subnetwork_resource\x18\xbf\xda\x91\x14 \x01(\x0b\x32#.google.cloud.compute.v1.SubnetworkB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xc3\x01\n\x1cInsertTargetGrpcProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12U\n\x1atarget_grpc_proxy_resource\x18\xd2\xea\xeb\x9c\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetGrpcProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xc2\x01\n\x1cInsertTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12T\n\x1atarget_http_proxy_resource\x18\xa8\xaf\xe3\x0b \x01(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xc6\x01\n\x1dInsertTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12W\n\x1btarget_https_proxy_resource\x18\x81\xad\xe4\xce\x01 \x01(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xdc\x01\n\x1bInsertTargetInstanceRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12R\n\x18target_instance_resource\x18\xca\xe2\xa0\xcd\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.TargetInstanceB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd3\x01\n\x17InsertTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12I\n\x14target_pool_resource\x18\xa3\xdd\xa5\x30 \x01(\x0b\x32#.google.cloud.compute.v1.TargetPoolB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbf\x01\n\x1bInsertTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12R\n\x19target_ssl_proxy_resource\x18\xc0\xfd\xdb\x43 \x01(\x0b\x32\'.google.cloud.compute.v1.TargetSslProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbf\x01\n\x1bInsertTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12R\n\x19target_tcp_proxy_resource\x18\xcb\xf0\xc9\x45 \x01(\x0b\x32\'.google.cloud.compute.v1.TargetTcpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe5\x01\n\x1dInsertTargetVpnGatewayRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12U\n\x1btarget_vpn_gateway_resource\x18\x82\xb3\x1e \x01(\x0b\x32).google.cloud.compute.v1.TargetVpnGatewayB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa6\x01\n\x13InsertUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd3\x01\n\x17InsertVpnGatewayRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12I\n\x14vpn_gateway_resource\x18\x94\xb7\x8eW \x01(\x0b\x32#.google.cloud.compute.v1.VpnGatewayB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd0\x01\n\x16InsertVpnTunnelRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12G\n\x13vpn_tunnel_resource\x18\xba\xa1\xb4) \x01(\x0b\x32\".google.cloud.compute.v1.VpnTunnelB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe7\x1d\n\x08Instance\x12\\\n\x19\x61\x64vanced_machine_features\x18\xb2\xe7\xaa\xc3\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.AdvancedMachineFeaturesH\x00\x88\x01\x01\x12\x1f\n\x0e\x63\x61n_ip_forward\x18\xfc\x86\x84\xdf\x01 \x01(\x08H\x01\x88\x01\x01\x12\x62\n\x1c\x63onfidential_instance_config\x18\xf5\x92\xfa\xe9\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.ConfidentialInstanceConfigH\x02\x88\x01\x01\x12\x1d\n\x0c\x63pu_platform\x18\xaa\xea\xd1\xc3\x01 \x01(\tH\x03\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x04\x88\x01\x01\x12$\n\x13\x64\x65letion_protection\x18\xea\xff\xb2\xda\x01 \x01(\x08H\x05\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x06\x88\x01\x01\x12\x37\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32%.google.cloud.compute.v1.AttachedDisk\x12\x46\n\x0e\x64isplay_device\x18\xf3\x88\xbc{ \x01(\x0b\x32&.google.cloud.compute.v1.DisplayDeviceH\x07\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x08\x88\x01\x01\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\x12\x18\n\x08hostname\x18\xb3\xb8\x85q \x01(\tH\t\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\n\x88\x01\x01\x12W\n\x17instance_encryption_key\x18\x8d\xc1\xef\x1e \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x0b\x88\x01\x01\x12*\n\x1akey_revocation_action_type\x18\xe2\xdc\xc0p \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\r\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x0e\x88\x01\x01\x12\x41\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32-.google.cloud.compute.v1.Instance.LabelsEntry\x12%\n\x14last_start_timestamp\x18\xd0\xa3\xd1\xd3\x01 \x01(\tH\x0f\x88\x01\x01\x12$\n\x13last_stop_timestamp\x18\xe2\xdb\xec\xc4\x01 \x01(\tH\x10\x88\x01\x01\x12)\n\x18last_suspended_timestamp\x18\x89\xa9\xf1\xa9\x01 \x01(\tH\x11\x88\x01\x01\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x12\x88\x01\x01\x12;\n\x08metadata\x18\xaf\xf6\xb5) \x01(\x0b\x32!.google.cloud.compute.v1.MetadataH\x13\x88\x01\x01\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x14\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x15\x88\x01\x01\x12H\n\x12network_interfaces\x18\x8b\xda\x92\x19 \x03(\x0b\x32).google.cloud.compute.v1.NetworkInterface\x12^\n\x1anetwork_performance_config\x18\xe2\x97\xf8\xbd\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.NetworkPerformanceConfigH\x16\x88\x01\x01\x12?\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32\'.google.cloud.compute.v1.InstanceParamsH\x17\x88\x01\x01\x12*\n\x1aprivate_ipv6_google_access\x18\x8e\xcc\x82\x17 \x01(\tH\x18\x88\x01\x01\x12R\n\x14reservation_affinity\x18\xbb\xb8\xa2K \x01(\x0b\x32,.google.cloud.compute.v1.ReservationAffinityH\x19\x88\x01\x01\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12H\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\'.google.cloud.compute.v1.ResourceStatusH\x1a\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x1b\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x1c\x88\x01\x01\x12@\n\nscheduling\x18\x94\xcb\xb1\xb8\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SchedulingH\x1d\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x1e\x88\x01\x01\x12\x45\n\x10service_accounts\x18\xb0\xc4\xab\x84\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.ServiceAccount\x12Y\n\x18shielded_instance_config\x18\xb5\x8b\x91\x06 \x01(\x0b\x32/.google.cloud.compute.v1.ShieldedInstanceConfigH\x1f\x88\x01\x01\x12l\n\"shielded_instance_integrity_policy\x18\x97\xa2\x87N \x01(\x0b\x32\x38.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicyH \x88\x01\x01\x12$\n\x14source_machine_image\x18\xbf\xdc\xb0\n \x01(\tH!\x88\x01\x01\x12\x63\n#source_machine_image_encryption_key\x18\xa3\xfb\xf9[ \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\"\x88\x01\x01\x12 \n\x10start_restricted\x18\xd8\xd0\xfd: \x01(\x08H#\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH$\x88\x01\x01\x12\x1f\n\x0estatus_message\x18\xba\xc9\xe9\x8d\x01 \x01(\tH%\x88\x01\x01\x12\x33\n\x04tags\x18\x99\xe8\xd8\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.TagsH&\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\'\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8d\x01\n\x17KeyRevocationActionType\x12(\n$UNDEFINED_KEY_REVOCATION_ACTION_TYPE\x10\x00\x12.\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\xda\x91\xde\xde\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x0b\n\x04STOP\x10\x82\x80\x9c\x01\"\xc0\x01\n\x17PrivateIpv6GoogleAccess\x12(\n$UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS\x10\x00\x12-\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\xba\xca\x89\xcc\x01\x12+\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\xd7\xfa\xb6\x89\x01\x12\x1f\n\x17INHERIT_FROM_SUBNETWORK\x10\xbf\xa8\xec\xfc\x01\"\xdc\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x16\n\x0e\x44\x45PROVISIONING\x10\xee\x93\xc4\xcc\x01\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x11\n\tREPAIRING\x10\x95\x82\x95\xc5\x01\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x12\x0f\n\x07STAGING\x10\x9b\xc8\xc6\xcd\x01\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x12\x10\n\tSUSPENDED\x10\xbb\xbb\xb6\x18\x12\x12\n\nSUSPENDING\x10\xa6\xd4\x98\xf5\x01\x12\x11\n\nTERMINATED\x10\xa3\xf4\x9bwB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x0f\n\r_cpu_platformB\x15\n\x13_creation_timestampB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0e\n\x0c_fingerprintB\x0b\n\t_hostnameB\x05\n\x03_idB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x17\n\x15_last_start_timestampB\x16\n\x14_last_stop_timestampB\x1b\n\x19_last_suspended_timestampB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x07\n\x05_nameB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x17\n\x15_reservation_affinityB\x12\n\x10_resource_statusB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\r\n\x0b_schedulingB\x0c\n\n_self_linkB\x1b\n\x19_shielded_instance_configB%\n#_shielded_instance_integrity_policyB\x17\n\x15_source_machine_imageB&\n$_source_machine_image_encryption_keyB\x13\n\x11_start_restrictedB\t\n\x07_statusB\x11\n\x0f_status_messageB\x07\n\x05_tagsB\x07\n\x05_zone\"\xb9\x03\n\x16InstanceAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12L\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32:.google.cloud.compute.v1.InstanceAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aZ\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.compute.v1.InstancesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa9\x01\n\x17InstanceConsumptionData\x12R\n\x10\x63onsumption_info\x18\xd2\xe5\xe4\x45 \x01(\x0b\x32\x30.google.cloud.compute.v1.InstanceConsumptionInfoH\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x01\x88\x01\x01\x42\x13\n\x11_consumption_infoB\x0b\n\t_instance\"\xd0\x01\n\x17InstanceConsumptionInfo\x12\x1b\n\nguest_cpus\x18\xd2\xcb\xc8\xbb\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x0clocal_ssd_gb\x18\xca\x88\xff\x9c\x01 \x01(\x05H\x01\x88\x01\x01\x12\x19\n\tmemory_mb\x18\x93\x93\xa8\x37 \x01(\x05H\x02\x88\x01\x01\x12\x1e\n\rmin_node_cpus\x18\xbb\xa4\xa2\x97\x01 \x01(\x05H\x03\x88\x01\x01\x42\r\n\x0b_guest_cpusB\x0f\n\r_local_ssd_gbB\x0c\n\n_memory_mbB\x10\n\x0e_min_node_cpus\"\x95\x04\n\rInstanceGroup\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPort\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04size\x18\x81\xc0\xd7\x01 \x01(\x05H\t\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\n\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0b\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_linkB\x07\n\x05_sizeB\r\n\x0b_subnetworkB\x07\n\x05_zone\"\xc8\x03\n\x1bInstanceGroupAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12Q\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32?.google.cloud.compute.v1.InstanceGroupAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a_\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.compute.v1.InstanceGroupsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x02\n\x11InstanceGroupList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x38\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32&.google.cloud.compute.v1.InstanceGroup\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xfd\x12\n\x14InstanceGroupManager\x12\x65\n\x14\x61ll_instances_config\x18\x81\xae\xd8\x35 \x01(\x0b\x32?.google.cloud.compute.v1.InstanceGroupManagerAllInstancesConfigH\x00\x88\x01\x01\x12\x61\n\x15\x61uto_healing_policies\x18\x85\xe7\xe8\xd9\x01 \x03(\x0b\x32>.google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy\x12#\n\x12\x62\x61se_instance_name\x18\x87\x96\xc5\xb9\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\\\n\x0f\x63urrent_actions\x18\xb7\xc8\x9cN \x01(\x0b\x32;.google.cloud.compute.v1.InstanceGroupManagerActionsSummaryH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12Q\n\x13\x64istribution_policy\x18\xcd\xee\xf2\xfe\x01 \x01(\x0b\x32+.google.cloud.compute.v1.DistributionPolicyH\x05\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x06\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12s\n\x1binstance_flexibility_policy\x18\x82\x8e\xec\x0c \x01(\x0b\x32\x46.google.cloud.compute.v1.InstanceGroupManagerInstanceFlexibilityPolicyH\x08\x88\x01\x01\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tH\t\x88\x01\x01\x12p\n\x19instance_lifecycle_policy\x18\x91\xb4\xcd\xd5\x01 \x01(\x0b\x32\x44.google.cloud.compute.v1.InstanceGroupManagerInstanceLifecyclePolicyH\n\x88\x01\x01\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x0b\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x0c\x88\x01\x01\x12/\n\x1elist_managed_instances_results\x18\xb4\xa4\x95\x8d\x01 \x01(\tH\r\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0e\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPort\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0f\x88\x01\x01\x12`\n\x11resource_policies\x18\xe1\x9c\xcc\n \x01(\x0b\x32=.google.cloud.compute.v1.InstanceGroupManagerResourcePoliciesH\x10\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x11\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x12\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x13\x88\x01\x01\x12[\n\x0estandby_policy\x18\x84\x86\x8e\xee\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InstanceGroupManagerStandbyPolicyH\x14\x88\x01\x01\x12H\n\x0fstateful_policy\x18\x85\xc3\xd5\x16 \x01(\x0b\x32\'.google.cloud.compute.v1.StatefulPolicyH\x15\x88\x01\x01\x12K\n\x06status\x18\xf2\x9f\xb7V \x01(\x0b\x32\x33.google.cloud.compute.v1.InstanceGroupManagerStatusH\x16\x88\x01\x01\x12\x18\n\x0ctarget_pools\x18\xa9\x9f\xa0\xa0\x01 \x03(\t\x12\x1b\n\x0btarget_size\x18\xef\xf3\xfd\x1d \x01(\x05H\x17\x88\x01\x01\x12#\n\x13target_stopped_size\x18\xa1\xd6\x93\x01 \x01(\x05H\x18\x88\x01\x01\x12&\n\x15target_suspended_size\x18\xd3\x88\xf4\x92\x01 \x01(\x05H\x19\x88\x01\x01\x12X\n\rupdate_policy\x18\xe8\xca\xeaS \x01(\x0b\x32\x39.google.cloud.compute.v1.InstanceGroupManagerUpdatePolicyH\x1a\x88\x01\x01\x12I\n\x08versions\x18\x9b\xfd\xb9M \x03(\x0b\x32\x34.google.cloud.compute.v1.InstanceGroupManagerVersion\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x1b\x88\x01\x01\"n\n\x1bListManagedInstancesResults\x12,\n(UNDEFINED_LIST_MANAGED_INSTANCES_RESULTS\x10\x00\x12\x0f\n\x08PAGELESS\x10\xa8\xa9\xac\x0f\x12\x10\n\tPAGINATED\x10\xad\x85\x95\x13\x42\x17\n\x15_all_instances_configB\x15\n\x13_base_instance_nameB\x15\n\x13_creation_timestampB\x12\n\x10_current_actionsB\x0e\n\x0c_descriptionB\x16\n\x14_distribution_policyB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x1e\n\x1c_instance_flexibility_policyB\x11\n\x0f_instance_groupB\x1c\n\x1a_instance_lifecycle_policyB\x14\n\x12_instance_templateB\x07\n\x05_kindB!\n\x1f_list_managed_instances_resultsB\x07\n\x05_nameB\t\n\x07_regionB\x14\n\x12_resource_policiesB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x11\n\x0f_standby_policyB\x12\n\x10_stateful_policyB\t\n\x07_statusB\x0e\n\x0c_target_sizeB\x16\n\x14_target_stopped_sizeB\x18\n\x16_target_suspended_sizeB\x10\n\x0e_update_policyB\x07\n\x05_zone\"\xd3\x04\n\"InstanceGroupManagerActionsSummary\x12\x1b\n\nabandoning\x18\xcd\xf2\xe8\xd1\x01 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x08\x63reating\x18\xb9\xdd\x85\x64 \x01(\x05H\x01\x88\x01\x01\x12)\n\x18\x63reating_without_retries\x18\xc9\xf6\xb1\xb0\x01 \x01(\x05H\x02\x88\x01\x01\x12\x19\n\x08\x64\x65leting\x18\xa8\xc7\xef\x86\x01 \x01(\x05H\x03\x88\x01\x01\x12\x14\n\x04none\x18\xb8\xde\xce\x01 \x01(\x05H\x04\x88\x01\x01\x12\x1b\n\nrecreating\x18\xec\xb3\xd6\xa1\x01 \x01(\x05H\x05\x88\x01\x01\x12\x1a\n\nrefreshing\x18\xa7\xa6\xc5\x66 \x01(\x05H\x06\x88\x01\x01\x12\x1b\n\nrestarting\x18\xf3\x96\xc4\xb1\x01 \x01(\x05H\x07\x88\x01\x01\x12\x18\n\x08resuming\x18\xaa\x9b\xf2_ \x01(\x05H\x08\x88\x01\x01\x12\x18\n\x08starting\x18\xc0\xc0\xf3s \x01(\x05H\t\x88\x01\x01\x12\x18\n\x08stopping\x18\xf4\xf0\x8a\x32 \x01(\x05H\n\x88\x01\x01\x12\x1a\n\nsuspending\x18\xa6\xfc\xf0\r \x01(\x05H\x0b\x88\x01\x01\x12\x1a\n\tverifying\x18\xc9\xa1\xac\xd7\x01 \x01(\x05H\x0c\x88\x01\x01\x42\r\n\x0b_abandoningB\x0b\n\t_creatingB\x1b\n\x19_creating_without_retriesB\x0b\n\t_deletingB\x07\n\x05_noneB\r\n\x0b_recreatingB\r\n\x0b_refreshingB\r\n\x0b_restartingB\x0b\n\t_resumingB\x0b\n\t_startingB\x0b\n\t_stoppingB\r\n\x0b_suspendingB\x0c\n\n_verifying\"\xdd\x03\n\"InstanceGroupManagerAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12X\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x46.google.cloud.compute.v1.InstanceGroupManagerAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x66\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.compute.v1.InstanceGroupManagersScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x85\x01\n&InstanceGroupManagerAllInstancesConfig\x12L\n\nproperties\x18\xb3\x9a\xb6\x46 \x01(\x0b\x32\x30.google.cloud.compute.v1.InstancePropertiesPatchH\x00\x88\x01\x01\x42\r\n\x0b_properties\"\x90\x01\n%InstanceGroupManagerAutoHealingPolicy\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x11initial_delay_sec\x18\xda\xf0\xc0} \x01(\x05H\x01\x88\x01\x01\x42\x0f\n\r_health_checkB\x14\n\x12_initial_delay_sec\"\xc4\x02\n-InstanceGroupManagerInstanceFlexibilityPolicy\x12~\n\x13instance_selections\x18\xd1\x84\xf9\n \x03(\x0b\x32^.google.cloud.compute.v1.InstanceGroupManagerInstanceFlexibilityPolicy.InstanceSelectionsEntry\x1a\x92\x01\n\x17InstanceSelectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x66\n\x05value\x18\x02 \x01(\x0b\x32W.google.cloud.compute.v1.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection:\x02\x38\x01\"y\n>InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection\x12\x18\n\rmachine_types\x18\x81\xdd\x81& \x03(\t\x12\x14\n\x04rank\x18\xac\x98\xd5\x01 \x01(\x05H\x00\x88\x01\x01\x42\x07\n\x05_rank\"\xf1\x02\n+InstanceGroupManagerInstanceLifecyclePolicy\x12)\n\x19\x64\x65\x66\x61ult_action_on_failure\x18\xd5\xc4\xa2\x1d \x01(\tH\x00\x88\x01\x01\x12\'\n\x16\x66orce_update_on_repair\x18\xcb\xf9\xf2\xa9\x01 \x01(\tH\x01\x88\x01\x01\"d\n\x16\x44\x65\x66\x61ultActionOnFailure\x12\'\n#UNDEFINED_DEFAULT_ACTION_ON_FAILURE\x10\x00\x12\x12\n\nDO_NOTHING\x10\xf9\xcf\x99\xd7\x01\x12\r\n\x06REPAIR\x10\x8d\xa7\xfc~\"O\n\x13\x46orceUpdateOnRepair\x12$\n UNDEFINED_FORCE_UPDATE_ON_REPAIR\x10\x00\x12\x07\n\x02NO\x10\xc1\x13\x12\t\n\x03YES\x10\xc7\xad\x05\x42\x1c\n\x1a_default_action_on_failureB\x19\n\x17_force_update_on_repair\"\xb9\x02\n\x18InstanceGroupManagerList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManager\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8d\x06\n!InstanceGroupManagerResizeRequest\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x04\x88\x01\x01\x12I\n\x16requested_run_duration\x18\xf9\x8b\xd9n \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x05\x88\x01\x01\x12\x1a\n\tresize_by\x18\xc2\xcf\xc0\xfe\x01 \x01(\x05H\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x08\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\t\x88\x01\x01\x12X\n\x06status\x18\xf2\x9f\xb7V \x01(\x0b\x32@.google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatusH\n\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0b\x88\x01\x01\"\x8f\x01\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x10\n\tCANCELLED\x10\xb1\xf2\x80\x14\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x11\n\tSUCCEEDED\x10\xc1\xa4\xdb\xf3\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x19\n\x17_requested_run_durationB\x0c\n\n_resize_byB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x08\n\x06_stateB\t\n\x07_statusB\x07\n\x05_zone\"\xe7\x01\n\'InstanceGroupManagerResizeRequestStatus\x12\x35\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x1e.google.cloud.compute.v1.ErrorH\x00\x88\x01\x01\x12j\n\x0clast_attempt\x18\xa4\xac\xa8\xcf\x01 \x01(\x0b\x32K.google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatusLastAttemptH\x01\x88\x01\x01\x42\x08\n\x06_errorB\x0f\n\r_last_attempt\"u\n2InstanceGroupManagerResizeRequestStatusLastAttempt\x12\x35\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x1e.google.cloud.compute.v1.ErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xdc\x02\n.InstanceGroupManagerResizeRequestsListResponse\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12L\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32:.google.cloud.compute.v1.InstanceGroupManagerResizeRequest\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"[\n$InstanceGroupManagerResourcePolicies\x12\x1f\n\x0fworkload_policy\x18\xfa\x85\xda\x36 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_workload_policy\"\xbc\x01\n!InstanceGroupManagerStandbyPolicy\x12!\n\x11initial_delay_sec\x18\xda\xf0\xc0} \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x01\x88\x01\x01\"?\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\r\n\x06MANUAL\x10\xc6\xb7\xf7\x38\x12\x14\n\x0eSCALE_OUT_POOL\x10\x82\xe4&B\x14\n\x12_initial_delay_secB\x07\n\x05_mode\"\xd1\x03\n\x1aInstanceGroupManagerStatus\x12k\n\x14\x61ll_instances_config\x18\x81\xae\xd8\x35 \x01(\x0b\x32\x45.google.cloud.compute.v1.InstanceGroupManagerStatusAllInstancesConfigH\x00\x88\x01\x01\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\tis_stable\x18\xf0\xef\xd8\x33 \x01(\x08H\x02\x88\x01\x01\x12U\n\x08stateful\x18\xcc\xe6\xc8t \x01(\x0b\x32;.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulH\x03\x88\x01\x01\x12\x61\n\x0eversion_target\x18\xd8\xdd\xfe\x89\x01 \x01(\x0b\x32@.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTargetH\x04\x88\x01\x01\x42\x17\n\x15_all_instances_configB\r\n\x0b_autoscalerB\x0c\n\n_is_stableB\x0b\n\t_statefulB\x11\n\x0f_version_target\"\x8e\x01\n,InstanceGroupManagerStatusAllInstancesConfig\x12 \n\x10\x63urrent_revision\x18\xe1\x87\xa5\x12 \x01(\tH\x00\x88\x01\x01\x12\x19\n\teffective\x18\xa7\xd3\xd8\x43 \x01(\x08H\x01\x88\x01\x01\x42\x13\n\x11_current_revisionB\x0c\n\n_effective\"\xf0\x01\n\"InstanceGroupManagerStatusStateful\x12#\n\x13has_stateful_config\x18\xf0\xe7\xd6\x34 \x01(\x08H\x00\x88\x01\x01\x12t\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x01(\x0b\x32M.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigsH\x01\x88\x01\x01\x42\x16\n\x14_has_stateful_configB\x17\n\x15_per_instance_configs\"h\n4InstanceGroupManagerStatusStatefulPerInstanceConfigs\x12\x1e\n\rall_effective\x18\x89\x91\xa7\xf6\x01 \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_all_effective\"U\n\'InstanceGroupManagerStatusVersionTarget\x12\x1b\n\nis_reached\x18\xbd\xfe\xc8\xce\x01 \x01(\x08H\x00\x88\x01\x01\x42\r\n\x0b_is_reached\"\xdc\x06\n InstanceGroupManagerUpdatePolicy\x12-\n\x1cinstance_redistribution_type\x18\x98\xdf\xc4\x8b\x01 \x01(\tH\x00\x88\x01\x01\x12\x43\n\tmax_surge\x18\x93\xc9\xa3\x90\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FixedOrPercentH\x01\x88\x01\x01\x12I\n\x0fmax_unavailable\x18\xf5\xcb\x8b\xc1\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FixedOrPercentH\x02\x88\x01\x01\x12\x1f\n\x0eminimal_action\x18\x94\x8d\x82\x81\x01 \x01(\tH\x03\x88\x01\x01\x12.\n\x1emost_disruptive_allowed_action\x18\x8d\xce\xc2\x1f \x01(\tH\x04\x88\x01\x01\x12#\n\x12replacement_method\x18\xae\xcf\x9f\xf1\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x06\x88\x01\x01\"H\n\x1aInstanceRedistributionType\x12*\n&UNDEFINED_INSTANCE_REDISTRIBUTION_TYPE\x10\x00\"-\n\rMinimalAction\x12\x1c\n\x18UNDEFINED_MINIMAL_ACTION\x10\x00\"K\n\x1bMostDisruptiveAllowedAction\x12,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION\x10\x00\"[\n\x11ReplacementMethod\x12 \n\x1cUNDEFINED_REPLACEMENT_METHOD\x10\x00\x12\x10\n\x08RECREATE\x10\xef\xd9\x9b\xf9\x01\x12\x12\n\nSUBSTITUTE\x10\x9a\xa1\xfa\x85\x01\"1\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x15\n\rOPPORTUNISTIC\x10\xe9\xb7\xe8\xcc\x01\x42\x1f\n\x1d_instance_redistribution_typeB\x0c\n\n_max_surgeB\x12\n\x10_max_unavailableB\x11\n\x0f_minimal_actionB!\n\x1f_most_disruptive_allowed_actionB\x15\n\x13_replacement_methodB\x07\n\x05_type\"\xcc\x01\n\x1bInstanceGroupManagerVersion\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12\x44\n\x0btarget_size\x18\xef\xf3\xfd\x1d \x01(\x0b\x32\'.google.cloud.compute.v1.FixedOrPercentH\x02\x88\x01\x01\x42\x14\n\x12_instance_templateB\x07\n\x05_nameB\x0e\n\x0c_target_size\"D\n,InstanceGroupManagersAbandonInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"\xf5\x02\n(InstanceGroupManagersApplyUpdatesRequest\x12\x1e\n\rall_instances\x18\xe0\xba\xbe\xc0\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x1f\n\x0eminimal_action\x18\x94\x8d\x82\x81\x01 \x01(\tH\x01\x88\x01\x01\x12.\n\x1emost_disruptive_allowed_action\x18\x8d\xce\xc2\x1f \x01(\tH\x02\x88\x01\x01\"-\n\rMinimalAction\x12\x1c\n\x18UNDEFINED_MINIMAL_ACTION\x10\x00\"K\n\x1bMostDisruptiveAllowedAction\x12,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION\x10\x00\x42\x10\n\x0e_all_instancesB\x11\n\x0f_minimal_actionB!\n\x1f_most_disruptive_allowed_action\"o\n+InstanceGroupManagersCreateInstancesRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"\x9e\x01\n+InstanceGroupManagersDeleteInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x32\n\"skip_instances_on_validation_error\x18\xa1\xf6\xaf\x13 \x01(\x08H\x00\x88\x01\x01\x42%\n#_skip_instances_on_validation_error\"D\n0InstanceGroupManagersDeletePerInstanceConfigsReq\x12\x10\n\x05names\x18\xc8\xae\xef\x31 \x03(\t\"\xa4\x01\n\'InstanceGroupManagersListErrorsResponse\x12\x44\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x32.google.cloud.compute.v1.InstanceManagedByIgmError\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_next_page_token\"\xb1\x01\n1InstanceGroupManagersListManagedInstancesResponse\x12G\n\x11managed_instances\x18\xde\x9b\xa9\xa0\x01 \x03(\x0b\x32(.google.cloud.compute.v1.ManagedInstance\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_next_page_token\"\xeb\x01\n/InstanceGroupManagersListPerInstanceConfigsResp\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x01\x88\x01\x01\x42\x12\n\x10_next_page_tokenB\n\n\x08_warning\"\x7f\n/InstanceGroupManagersPatchPerInstanceConfigsReq\x12L\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"E\n-InstanceGroupManagersRecreateInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"C\n+InstanceGroupManagersResumeInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"\xbb\x01\n\x1fInstanceGroupManagersScopedList\x12Q\n\x17instance_group_managers\x18\x90\xfa\x89\x66 \x03(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManager\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"k\n/InstanceGroupManagersSetInstanceTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x00\x88\x01\x01\x42\x14\n\x12_instance_template\"s\n*InstanceGroupManagersSetTargetPoolsRequest\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0ctarget_pools\x18\xa9\x9f\xa0\xa0\x01 \x03(\tB\x0e\n\x0c_fingerprint\"B\n*InstanceGroupManagersStartInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"l\n)InstanceGroupManagersStopInstancesRequest\x12\x1a\n\nforce_stop\x18\xd6\xa1\xa1@ \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\tB\r\n\x0b_force_stop\"u\n,InstanceGroupManagersSuspendInstancesRequest\x12\x1d\n\rforce_suspend\x18\xe8\xed\x96\r \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\tB\x10\n\x0e_force_suspend\"\x80\x01\n0InstanceGroupManagersUpdatePerInstanceConfigsReq\x12L\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"e\n!InstanceGroupsAddInstancesRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.InstanceReference\"\xbe\x02\n\x1bInstanceGroupsListInstances\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x41\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32/.google.cloud.compute.v1.InstanceWithNamedPorts\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa1\x01\n\"InstanceGroupsListInstancesRequest\x12\x1e\n\x0einstance_state\x18\xe7\xf0\xfc+ \x01(\tH\x00\x88\x01\x01\"H\n\rInstanceState\x12\x1c\n\x18UNDEFINED_INSTANCE_STATE\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x42\x11\n\x0f_instance_state\"h\n$InstanceGroupsRemoveInstancesRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.InstanceReference\"\xa6\x01\n\x18InstanceGroupsScopedList\x12\x43\n\x0finstance_groups\x18\xbe\xc1\xdf\xae\x01 \x03(\x0b\x32&.google.cloud.compute.v1.InstanceGroup\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x8e\x01\n\"InstanceGroupsSetNamedPortsRequest\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPortB\x0e\n\x0c_fingerprint\"\xa1\x02\n\x0cInstanceList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.Instance\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x02\n\x15InstanceListReferrers\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x34\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\".google.cloud.compute.v1.Reference\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbc\x02\n\x19InstanceManagedByIgmError\x12]\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x46.google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceErrorH\x00\x88\x01\x01\x12q\n\x17instance_action_details\x18\xa3\xfc\xab\x8b\x01 \x01(\x0b\x32G.google.cloud.compute.v1.InstanceManagedByIgmErrorInstanceActionDetailsH\x01\x88\x01\x01\x12\x19\n\ttimestamp\x18\x96\xd2\xa4\x1a \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_errorB\x1a\n\x18_instance_action_detailsB\x0c\n\n_timestamp\"\xf0\x03\n.InstanceManagedByIgmErrorInstanceActionDetails\x12\x16\n\x06\x61\x63tion\x18\xb6\xfc\xbdY \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x01\x88\x01\x01\x12I\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\x0b\x32/.google.cloud.compute.v1.ManagedInstanceVersionH\x02\x88\x01\x01\"\x9c\x02\n\x06\x41\x63tion\x12\x14\n\x10UNDEFINED_ACTION\x10\x00\x12\x12\n\nABANDONING\x10\xcd\xca\x90\xb9\x01\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12 \n\x18\x43REATING_WITHOUT_RETRIES\x10\x89\xc6\xbe\xcc\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x12\n\nRECREATING\x10\xec\x8b\xfe\x88\x01\x12\x11\n\nREFRESHING\x10\xa7\xfe\xecM\x12\x12\n\nRESTARTING\x10\xf3\xee\xeb\x98\x01\x12\x10\n\x08RESUMING\x10\xaa\xfb\x89\xd5\x01\x12\x10\n\x08STARTING\x10\xc0\xa0\x8b\xe9\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x12\x12\n\nSUSPENDING\x10\xa6\xd4\x98\xf5\x01\x12\x10\n\tVERIFYING\x10\xa9\xc1\x8c\x08\x42\t\n\x07_actionB\x0b\n\t_instanceB\n\n\x08_version\"t\n-InstanceManagedByIgmErrorManagedInstanceError\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\n\n\x08_message\"\x82\x01\n\x13InstanceMoveRequest\x12 \n\x10\x64\x65stination_zone\x18\xbd\xe2\xef> \x01(\tH\x00\x88\x01\x01\x12 \n\x0ftarget_instance\x18\x83\x8f\x96\x8a\x01 \x01(\tH\x01\x88\x01\x01\x42\x13\n\x11_destination_zoneB\x12\n\x10_target_instance\"\xb1\x01\n\x0eInstanceParams\x12\x63\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32@.google.cloud.compute.v1.InstanceParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd8\x10\n\x12InstanceProperties\x12\\\n\x19\x61\x64vanced_machine_features\x18\xb2\xe7\xaa\xc3\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.AdvancedMachineFeaturesH\x00\x88\x01\x01\x12\x1f\n\x0e\x63\x61n_ip_forward\x18\xfc\x86\x84\xdf\x01 \x01(\x08H\x01\x88\x01\x01\x12\x62\n\x1c\x63onfidential_instance_config\x18\xf5\x92\xfa\xe9\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.ConfidentialInstanceConfigH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x37\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32%.google.cloud.compute.v1.AttachedDisk\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\x12*\n\x1akey_revocation_action_type\x18\xe2\xdc\xc0p \x01(\tH\x04\x88\x01\x01\x12K\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x37.google.cloud.compute.v1.InstanceProperties.LabelsEntry\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x05\x88\x01\x01\x12;\n\x08metadata\x18\xaf\xf6\xb5) \x01(\x0b\x32!.google.cloud.compute.v1.MetadataH\x06\x88\x01\x01\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x07\x88\x01\x01\x12H\n\x12network_interfaces\x18\x8b\xda\x92\x19 \x03(\x0b\x32).google.cloud.compute.v1.NetworkInterface\x12^\n\x1anetwork_performance_config\x18\xe2\x97\xf8\xbd\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.NetworkPerformanceConfigH\x08\x88\x01\x01\x12*\n\x1aprivate_ipv6_google_access\x18\x8e\xcc\x82\x17 \x01(\tH\t\x88\x01\x01\x12R\n\x14reservation_affinity\x18\xbb\xb8\xa2K \x01(\x0b\x32,.google.cloud.compute.v1.ReservationAffinityH\n\x88\x01\x01\x12g\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32\x44.google.cloud.compute.v1.InstanceProperties.ResourceManagerTagsEntry\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12@\n\nscheduling\x18\x94\xcb\xb1\xb8\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SchedulingH\x0b\x88\x01\x01\x12\x45\n\x10service_accounts\x18\xb0\xc4\xab\x84\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.ServiceAccount\x12Y\n\x18shielded_instance_config\x18\xb5\x8b\x91\x06 \x01(\x0b\x32/.google.cloud.compute.v1.ShieldedInstanceConfigH\x0c\x88\x01\x01\x12\x33\n\x04tags\x18\x99\xe8\xd8\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.TagsH\r\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8d\x01\n\x17KeyRevocationActionType\x12(\n$UNDEFINED_KEY_REVOCATION_ACTION_TYPE\x10\x00\x12.\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\xda\x91\xde\xde\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x0b\n\x04STOP\x10\x82\x80\x9c\x01\"\xc0\x01\n\x17PrivateIpv6GoogleAccess\x12(\n$UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS\x10\x00\x12-\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\xba\xca\x89\xcc\x01\x12+\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\xd7\xfa\xb6\x89\x01\x12\x1f\n\x17INHERIT_FROM_SUBNETWORK\x10\xbf\xa8\xec\xfc\x01\x42\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x0e\n\x0c_descriptionB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\x1d\n\x1b_private_ipv6_google_accessB\x17\n\x15_reservation_affinityB\r\n\x0b_schedulingB\x1b\n\x19_shielded_instance_configB\x07\n\x05_tags\"\xa0\x02\n\x17InstancePropertiesPatch\x12P\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32<.google.cloud.compute.v1.InstancePropertiesPatch.LabelsEntry\x12S\n\x08metadata\x18\xaf\xf6\xb5) \x03(\x0b\x32>.google.cloud.compute.v1.InstancePropertiesPatch.MetadataEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x11InstanceReference\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_instance\"\xd7\x01\n\x10InstanceSettings\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12K\n\x08metadata\x18\xaf\xf6\xb5) \x01(\x0b\x32\x31.google.cloud.compute.v1.InstanceSettingsMetadataH\x02\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x03\x88\x01\x01\x42\x0e\n\x0c_fingerprintB\x07\n\x05_kindB\x0b\n\t_metadataB\x07\n\x05_zone\"\xb7\x01\n\x18InstanceSettingsMetadata\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.InstanceSettingsMetadata.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x1a,\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05_kind\"\x9f\x04\n\x10InstanceTemplate\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x04\x88\x01\x01\x12G\n\nproperties\x18\xb3\x9a\xb6\x46 \x01(\x0b\x32+.google.cloud.compute.v1.InstancePropertiesH\x05\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12 \n\x0fsource_instance\x18\xb9\x98\xfd\xbc\x01 \x01(\tH\x08\x88\x01\x01\x12U\n\x16source_instance_params\x18\xcc\xd0\xc4@ \x01(\x0b\x32-.google.cloud.compute.v1.SourceInstanceParamsH\t\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_propertiesB\t\n\x07_regionB\x0c\n\n_self_linkB\x12\n\x10_source_instanceB\x19\n\x17_source_instance_params\"\xb8\x03\n\x1eInstanceTemplateAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12T\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x42.google.cloud.compute.v1.InstanceTemplateAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x62\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.compute.v1.InstanceTemplatesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb1\x02\n\x14InstanceTemplateList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.InstanceTemplate\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x01\n\x1bInstanceTemplatesScopedList\x12I\n\x12instance_templates\x18\x8f\xb8\xa5\xdb\x01 \x03(\x0b\x32).google.cloud.compute.v1.InstanceTemplate\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xfe\x02\n\x16InstanceWithNamedPorts\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x00\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPort\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x01\x88\x01\x01\"\xdc\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x16\n\x0e\x44\x45PROVISIONING\x10\xee\x93\xc4\xcc\x01\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x11\n\tREPAIRING\x10\x95\x82\x95\xc5\x01\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x12\x0f\n\x07STAGING\x10\x9b\xc8\xc6\xcd\x01\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x12\x10\n\tSUSPENDED\x10\xbb\xbb\xb6\x18\x12\x12\n\nSUSPENDING\x10\xa6\xd4\x98\xf5\x01\x12\x11\n\nTERMINATED\x10\xa3\xf4\x9bwB\x0b\n\t_instanceB\t\n\x07_status\"C\n#InstancesAddResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"\x8a\x02\n$InstancesBulkInsertOperationMetadata\x12t\n\x13per_location_status\x18\x9a\xe9\x84P \x03(\x0b\x32T.google.cloud.compute.v1.InstancesBulkInsertOperationMetadata.PerLocationStatusEntry\x1al\n\x16PerLocationStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.BulkInsertOperationStatus:\x02\x38\x01\"\xd8\x01\n&InstancesGetEffectiveFirewallsResponse\x12t\n\x10\x66irewall_policys\x18\xc2\xca\xfc\xc3\x01 \x03(\x0b\x32V.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x38\n\tfirewalls\x18\xf3\xc6\xe8\x81\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Firewall\"\xac\x04\n=InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x1c\n\x0c\x64isplay_name\x18\xe8\x87\x91\x02 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12O\n\x16packet_mirroring_rules\x18\xc4\xff\xc0\xfd\x01 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x02\x88\x01\x01\x12=\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x1b\n\nshort_name\x18\xee\xb8\xd0\xea\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x04\x88\x01\x01\"\x99\x01\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\tHIERARCHY\x10\x95\xc4\xaa!\x12\x0f\n\x07NETWORK\x10\x8e\xcc\xb3\xc5\x01\x12\x17\n\x10NETWORK_REGIONAL\x10\xb0\xe2\xfdZ\x12\x14\n\rSYSTEM_GLOBAL\x10\xb3\x97\xd4\x1c\x12\x16\n\x0fSYSTEM_REGIONAL\x10\xaf\x8c\x92M\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x0f\n\r_display_nameB\x07\n\x05_nameB\x0b\n\t_priorityB\r\n\x0b_short_nameB\x07\n\x05_type\"F\n&InstancesRemoveResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"\xc8\x02\n\"InstancesReportHostAsFaultyRequest\x12#\n\x13\x64isruption_schedule\x18\x83\xc5\xdb- \x01(\tH\x00\x88\x01\x01\x12`\n\rfault_reasons\x18\x92\xab\x91P \x03(\x0b\x32\x46.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason\"\x82\x01\n\x12\x44isruptionSchedule\x12!\n\x1dUNDEFINED_DISRUPTION_SCHEDULE\x10\x00\x12\'\n\x1f\x44ISRUPTION_SCHEDULE_UNSPECIFIED\x10\xdb\xee\xc8\x9e\x01\x12\x0e\n\x06\x46UTURE\x10\xc3\x83\xa2\xe2\x01\x12\x10\n\tIMMEDIATE\x10\x91\x8f\xf3HB\x16\n\x14_disruption_schedule\"\x9b\x02\n-InstancesReportHostAsFaultyRequestFaultReason\x12\x19\n\x08\x62\x65havior\x18\xd2\xe4\xba\xd0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\"\x93\x01\n\x08\x42\x65havior\x12\x16\n\x12UNDEFINED_BEHAVIOR\x10\x00\x12\x1b\n\x14\x42\x45HAVIOR_UNSPECIFIED\x10\xaa\xe9\xf0(\x12\x12\n\x0bPERFORMANCE\x10\x90\xc8\xda@\x12\x1d\n\x16SILENT_DATA_CORRUPTION\x10\xa6\xf5\x8c\x35\x12\x1f\n\x17UNRECOVERABLE_GPU_ERROR\x10\x9b\x92\xb7\xad\x01\x42\x0b\n\t_behaviorB\x0e\n\x0c_description\"\x95\x01\n\x13InstancesScopedList\x12\x37\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32!.google.cloud.compute.v1.Instance\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xd7\x01\n\x19InstancesSetLabelsRequest\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x00\x88\x01\x01\x12R\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32>.google.cloud.compute.v1.InstancesSetLabelsRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_label_fingerprint\"q\n#InstancesSetMachineResourcesRequest\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\"O\n\x1eInstancesSetMachineTypeRequest\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_machine_type\"Z\n!InstancesSetMinCpuPlatformRequest\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_min_cpu_platform\"h\n\x17InstancesSetNameRequest\x12\x1d\n\x0c\x63urrent_name\x18\x91\xf3\xab\xbc\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x0f\n\r_current_nameB\x07\n\x05_name\"w\n!InstancesSetSecurityPolicyRequest\x12\x1d\n\x12network_interfaces\x18\x8b\xda\x92\x19 \x03(\t\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_security_policy\"W\n!InstancesSetServiceAccountRequest\x12\x15\n\x05\x65mail\x18\x9c\x97\x89. \x01(\tH\x00\x88\x01\x01\x12\x11\n\x06scopes\x18\x9f\x99\x92O \x03(\tB\x08\n\x06_email\"w\n&InstancesStartWithEncryptionKeyRequest\x12M\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32;.google.cloud.compute.v1.CustomerEncryptionKeyProtectedDisk\"\xc1\t\n\x0fInstantSnapshot\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x06\x88\x01\x01\x12H\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x34.google.cloud.compute.v1.InstantSnapshot.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12W\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x36.google.cloud.compute.v1.InstantSnapshotResourceStatusH\t\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\n\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1f\n\x0esource_disk_id\x18\xd9\xcd\xc9\xd8\x01 \x01(\tH\x0f\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x10\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x11\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"u\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x13\n\x0bUNAVAILABLE\x10\xb0\xd8\xa5\xc5\x01\x42\x0f\n\r_architectureB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0f\n\r_disk_size_gbB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\t\n\x07_regionB\x12\n\x10_resource_statusB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x0e\n\x0c_source_diskB\x11\n\x0f_source_disk_idB\t\n\x07_statusB\x07\n\x05_zone\"\xce\x03\n\x1dInstantSnapshotAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.InstantSnapshotAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.InstantSnapshotsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x02\n\x13InstantSnapshotList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.InstantSnapshot\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"[\n\x1dInstantSnapshotResourceStatus\x12#\n\x12storage_size_bytes\x18\xf1\x8d\xe6\xb8\x01 \x01(\x03H\x00\x88\x01\x01\x42\x15\n\x13_storage_size_bytes\"\xac\x01\n\x1aInstantSnapshotsScopedList\x12G\n\x11instant_snapshots\x18\xd1\xbc\x97\x9d\x01 \x03(\x0b\x32(.google.cloud.compute.v1.InstantSnapshot\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"h\n\x0fInt64RangeMatch\x12\x1a\n\trange_end\x18\xd9\x95\xe0\x99\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1b\n\x0brange_start\x18\xe0\xfd\xa2\x31 \x01(\x03H\x01\x88\x01\x01\x42\x0c\n\n_range_endB\x0e\n\x0c_range_start\"\xc5\x12\n\x0cInterconnect\x12\x1c\n\x0b\x61\x61i_enabled\x18\xcb\xa2\xb1\xb9\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1e\n\radmin_enabled\x18\xd1\xec\xc1\xd4\x01 \x01(\x08H\x01\x88\x01\x01\x12r\n\x1e\x61pplication_aware_interconnect\x18\x9e\xf8\xcd\xcc\x01 \x01(\x0b\x32\x41.google.cloud.compute.v1.InterconnectApplicationAwareInterconnectH\x02\x88\x01\x01\x12\x1e\n\x12\x61vailable_features\x18\xf3\xb9\xd6\xec\x01 \x03(\t\x12J\n\rcircuit_infos\x18\xaf\x83\xcdN \x03(\x0b\x32\x30.google.cloud.compute.v1.InterconnectCircuitInfo\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x03\x88\x01\x01\x12\x1d\n\rcustomer_name\x18\xcc\xdc\xdf\x01 \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12T\n\x10\x65xpected_outages\x18\x9b\xea\x8e~ \x03(\x0b\x32\x37.google.cloud.compute.v1.InterconnectOutageNotification\x12\"\n\x11google_ip_address\x18\xa2\x85\xa5\xd3\x01 \x01(\tH\x06\x88\x01\x01\x12$\n\x13google_reference_id\x18\xd5\xb5\x8a\xff\x01 \x01(\tH\x07\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x08\x88\x01\x01\x12$\n\x18interconnect_attachments\x18\xff\xd2\xeb\xca\x01 \x03(\t\x12\x1e\n\x13interconnect_groups\x18\xa5\xad\x84q \x03(\t\x12\"\n\x11interconnect_type\x18\xcb\x98\xd3\xf5\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x0b\x88\x01\x01\x12\x45\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x31.google.cloud.compute.v1.Interconnect.LabelsEntry\x12\x1a\n\tlink_type\x18\xdf\x88\xbe\xf9\x01 \x01(\tH\x0c\x88\x01\x01\x12\x19\n\x08location\x18\xb5\xbf\xbe\x8a\x01 \x01(\tH\r\x88\x01\x01\x12\x44\n\x06macsec\x18\xa2\xc1\x97\xfc\x01 \x01(\x0b\x32+.google.cloud.compute.v1.InterconnectMacsecH\x0e\x88\x01\x01\x12\x1e\n\x0emacsec_enabled\x18\xa4\xa1\xcd\\ \x01(\x08H\x0f\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x10\x88\x01\x01\x12!\n\x11noc_contact_email\x18\x80\xf8\xda\x06 \x01(\tH\x11\x88\x01\x01\x12\"\n\x12operational_status\x18\xff\xb1\xf0_ \x01(\tH\x12\x88\x01\x01\x12\x1f\n\x0fpeer_ip_address\x18\xd9\x97\x87\x63 \x01(\tH\x13\x88\x01\x01\x12\'\n\x16provisioned_link_count\x18\xf5\xd2\xf6\xc3\x01 \x01(\x05H\x14\x88\x01\x01\x12 \n\x0fremote_location\x18\x8e\x8f\xd7\x9a\x01 \x01(\tH\x15\x88\x01\x01\x12\x1e\n\x12requested_features\x18\xee\xf3\xf7\xdb\x01 \x03(\t\x12$\n\x14requested_link_count\x18\xfb\xdb\xbd\x15 \x01(\x05H\x16\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x17\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x18\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x19\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x11\x41vailableFeatures\x12 \n\x1cUNDEFINED_AVAILABLE_FEATURES\x10\x00\"j\n\x10InterconnectType\x12\x1f\n\x1bUNDEFINED_INTERCONNECT_TYPE\x10\x00\x12\x10\n\tDEDICATED\x10\xcf\x9b\x9c{\x12\x12\n\nIT_PRIVATE\x10\xcf\x8c\x88\xa0\x01\x12\x0f\n\x07PARTNER\x10\xa8\xd1\xa1\xdc\x01\"\x8d\x01\n\x08LinkType\x12\x17\n\x13UNDEFINED_LINK_TYPE\x10\x00\x12\"\n\x1aLINK_TYPE_ETHERNET_100G_LR\x10\xe7\xf2\x81\xa1\x01\x12 \n\x19LINK_TYPE_ETHERNET_10G_LR\x10\xa5\xb9\xf1p\x12\"\n\x1bLINK_TYPE_ETHERNET_400G_LR4\x10\xca\xf4\xc8<\"`\n\x11OperationalStatus\x12 \n\x1cUNDEFINED_OPERATIONAL_STATUS\x10\x00\x12\x10\n\tOS_ACTIVE\x10\xc1\xfb\xc8\x1a\x12\x17\n\x10OS_UNPROVISIONED\x10\xc0\xc1\xaar\"5\n\x11RequestedFeatures\x12 \n\x1cUNDEFINED_REQUESTED_FEATURES\x10\x00\"C\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x15\n\rUNPROVISIONED\x10\xdb\xc7\xd7\xf6\x01\x42\x0e\n\x0c_aai_enabledB\x10\n\x0e_admin_enabledB!\n\x1f_application_aware_interconnectB\x15\n\x13_creation_timestampB\x10\n\x0e_customer_nameB\x0e\n\x0c_descriptionB\x14\n\x12_google_ip_addressB\x16\n\x14_google_reference_idB\x05\n\x03_idB\x14\n\x12_interconnect_typeB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x0c\n\n_link_typeB\x0b\n\t_locationB\t\n\x07_macsecB\x11\n\x0f_macsec_enabledB\x07\n\x05_nameB\x14\n\x12_noc_contact_emailB\x15\n\x13_operational_statusB\x12\n\x10_peer_ip_addressB\x19\n\x17_provisioned_link_countB\x12\n\x10_remote_locationB\x17\n\x15_requested_link_countB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x08\n\x06_state\"\xa7\x04\n(InterconnectApplicationAwareInterconnect\x12\x87\x01\n\x1b\x62\x61ndwidth_percentage_policy\x18\xe9\xdc\x96Y \x01(\x0b\x32Z.google.cloud.compute.v1.InterconnectApplicationAwareInterconnectBandwidthPercentagePolicyH\x00\x88\x01\x01\x12#\n\x13profile_description\x18\xe6\xec\xa8} \x01(\tH\x01\x88\x01\x01\x12z\n\x19shape_average_percentages\x18\xd9\xb8\xf4{ \x03(\x0b\x32T.google.cloud.compute.v1.InterconnectApplicationAwareInterconnectBandwidthPercentage\x12}\n\x16strict_priority_policy\x18\xb7\x95\x97\x45 \x01(\x0b\x32U.google.cloud.compute.v1.InterconnectApplicationAwareInterconnectStrictPriorityPolicyH\x02\x88\x01\x01\x42\x1e\n\x1c_bandwidth_percentage_policyB\x16\n\x14_profile_descriptionB\x19\n\x17_strict_priority_policy\"\x88\x02\n;InterconnectApplicationAwareInterconnectBandwidthPercentage\x12\x1a\n\npercentage\x18\x9a\xe5\xb7H \x01(\rH\x00\x88\x01\x01\x12\x1d\n\rtraffic_class\x18\xb6\xf9\xbf^ \x01(\tH\x01\x88\x01\x01\"m\n\x0cTrafficClass\x12\x1b\n\x17UNDEFINED_TRAFFIC_CLASS\x10\x00\x12\t\n\x03TC1\x10\xa2\x87\x05\x12\t\n\x03TC2\x10\xa3\x87\x05\x12\t\n\x03TC3\x10\xa4\x87\x05\x12\t\n\x03TC4\x10\xa5\x87\x05\x12\t\n\x03TC5\x10\xa6\x87\x05\x12\t\n\x03TC6\x10\xa7\x87\x05\x42\r\n\x0b_percentageB\x10\n\x0e_traffic_class\"\xbb\x01\nAInterconnectApplicationAwareInterconnectBandwidthPercentagePolicy\x12v\n\x15\x62\x61ndwidth_percentages\x18\x8b\xfd\xa3o \x03(\x0b\x32T.google.cloud.compute.v1.InterconnectApplicationAwareInterconnectBandwidthPercentage\">\n.google.cloud.compute.v1.InterconnectAttachmentPartnerMetadataH\x19\x88\x01\x01\x12\x65\n\x19private_interconnect_info\x18\x83\xec\x91q \x01(\x0b\x32:.google.cloud.compute.v1.InterconnectAttachmentPrivateInfoH\x1a\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x1b\x88\x01\x01\x12\x1f\n\x0eremote_service\x18\xbc\xff\xf2\xba\x01 \x01(\tH\x1c\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tH\x1d\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x1e\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x1f\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH \x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH!\x88\x01\x01\x12\x1e\n\rsubnet_length\x18\x88\xc4\xb7\x85\x01 \x01(\x05H\"\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH#\x88\x01\x01\x12\x1d\n\rvlan_tag8021q\x18\x9c\xe8\x97\x39 \x01(\x05H$\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfe\x01\n\tBandwidth\x12\x17\n\x13UNDEFINED_BANDWIDTH\x10\x00\x12\x0f\n\x08\x42PS_100G\x10\xb0\x95\xd0\x17\x12\x0f\n\x08\x42PS_100M\x10\xb6\x95\xd0\x17\x12\x0f\n\x07\x42PS_10G\x10\x8e\x89\xf2\x84\x01\x12\x0e\n\x06\x42PS_1G\x10\xf0\xad\xb9\xa9\x01\x12\x0f\n\x08\x42PS_200M\x10\x95\xfe\xd1\x17\x12\x0f\n\x07\x42PS_20G\x10\xcf\x90\xf2\x84\x01\x12\x0e\n\x06\x42PS_2G\x10\x8f\xae\xb9\xa9\x01\x12\x0f\n\x08\x42PS_300M\x10\xf4\xe6\xd3\x17\x12\x0f\n\x08\x42PS_400M\x10\xd3\xcf\xd5\x17\x12\x0f\n\x08\x42PS_500M\x10\xb2\xb8\xd7\x17\x12\x0f\n\x07\x42PS_50G\x10\x92\xa7\xf2\x84\x01\x12\x0f\n\x07\x42PS_50M\x10\x98\xa7\xf2\x84\x01\x12\x0e\n\x06\x42PS_5G\x10\xec\xae\xb9\xa9\x01\"\x9f\x01\n\x16\x45\x64geAvailabilityDomain\x12&\n\"UNDEFINED_EDGE_AVAILABILITY_DOMAIN\x10\x00\x12\x1d\n\x15\x41VAILABILITY_DOMAIN_1\x10\xda\xfb\xd6\xa6\x01\x12\x1d\n\x15\x41VAILABILITY_DOMAIN_2\x10\xdb\xfb\xd6\xa6\x01\x12\x1f\n\x17\x41VAILABILITY_DOMAIN_ANY\x10\xb5\xea\xf7\xb2\x01\"A\n\nEncryption\x12\x18\n\x14UNDEFINED_ENCRYPTION\x10\x00\x12\x0c\n\x05IPSEC\x10\xaa\xa3\xa9!\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\"`\n\x11OperationalStatus\x12 \n\x1cUNDEFINED_OPERATIONAL_STATUS\x10\x00\x12\x10\n\tOS_ACTIVE\x10\xc1\xfb\xc8\x1a\x12\x17\n\x10OS_UNPROVISIONED\x10\xc0\xc1\xaar\"I\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\"\xc2\x01\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x07\x44\x45\x46UNCT\x10\xaf\xbc\xa1\x37\x12 \n\x18PARTNER_REQUEST_RECEIVED\x10\xe8\xf0\xf2\xf4\x01\x12\x17\n\x10PENDING_CUSTOMER\x10\xa6\x83\xefO\x12\x17\n\x0fPENDING_PARTNER\x10\xe0\xfb\xfa\xb8\x01\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x15\n\rUNPROVISIONED\x10\xdb\xc7\xd7\xf6\x01\"W\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\tDEDICATED\x10\xcf\x9b\x9c{\x12\x0f\n\x07PARTNER\x10\xa8\xd1\xa1\xdc\x01\x12\x18\n\x10PARTNER_PROVIDER\x10\xa8\xf7\xb7\xe6\x01\x42\x10\n\x0e_admin_enabledB\x13\n\x11_attachment_groupB\x0c\n\n_bandwidthB\x1a\n\x18_cloud_router_ip_addressB\x1c\n\x1a_cloud_router_ipv6_addressB!\n\x1f_cloud_router_ipv6_interface_idB\x1c\n\x1a_configuration_constraintsB\x15\n\x13_creation_timestampB\x1d\n\x1b_customer_router_ip_addressB\x1f\n\x1d_customer_router_ipv6_addressB$\n\"_customer_router_ipv6_interface_idB\x14\n\x12_dataplane_versionB\x0e\n\x0c_descriptionB\x1b\n\x19_edge_availability_domainB\r\n\x0b_encryptionB\x16\n\x14_google_reference_idB\x05\n\x03_idB\x0f\n\r_interconnectB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x06\n\x04_mtuB\x07\n\x05_nameB\x15\n\x13_operational_statusB\x0e\n\x0c_pairing_keyB\x0e\n\x0c_partner_asnB\x13\n\x11_partner_metadataB\x1c\n\x1a_private_interconnect_infoB\t\n\x07_regionB\x11\n\x0f_remote_serviceB\t\n\x07_routerB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\r\n\x0b_stack_typeB\x08\n\x06_stateB\x10\n\x0e_subnet_lengthB\x07\n\x05_typeB\x10\n\x0e_vlan_tag8021q\"\xe3\x03\n$InterconnectAttachmentAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12Z\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32H.google.cloud.compute.v1.InterconnectAttachmentAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1ah\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12I\n\x05value\x18\x02 \x01(\x0b\x32:.google.cloud.compute.v1.InterconnectAttachmentsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb3\x02\n.InterconnectAttachmentConfigurationConstraints\x12\x18\n\x07\x62gp_md5\x18\x8a\xe8\xf3\xb1\x01 \x01(\tH\x00\x88\x01\x01\x12w\n\x13\x62gp_peer_asn_ranges\x18\x82\xbb\xf9\xe2\x01 \x03(\x0b\x32V.google.cloud.compute.v1.InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange\"b\n\x06\x42gpMd5\x12\x15\n\x11UNDEFINED_BGP_MD5\x10\x00\x12\x14\n\x0cMD5_OPTIONAL\x10\x81\xa2\xe0\xfd\x01\x12\x13\n\x0cMD5_REQUIRED\x10\xc0\xe2\xfbg\x12\x16\n\x0fMD5_UNSUPPORTED\x10\xd4\xe1\xbb)B\n\n\x08_bgp_md5\"w\n=InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange\x12\x12\n\x03max\x18\xe4\xca\x06 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x03min\x18\xd2\xcc\x06 \x01(\rH\x01\x88\x01\x01\x42\x06\n\x04_maxB\x06\n\x04_min\"\x81\x07\n\x1bInterconnectAttachmentGroup\x12^\n\x0b\x61ttachments\x18\xb0\x97\xcf\x9f\x01 \x03(\x0b\x32\x45.google.cloud.compute.v1.InterconnectAttachmentGroup.AttachmentsEntry\x12[\n\nconfigured\x18\xbe\xf4\xfb\x8c\x01 \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12S\n\x06intent\x18\x9c\xed\xc4\xcb\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InterconnectAttachmentGroupIntentH\x05\x88\x01\x01\x12#\n\x12interconnect_group\x18\x8e\xb7\xa9\xb9\x01 \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12g\n\x11logical_structure\x18\xbd\x99\xf4\x43 \x01(\x0b\x32\x44.google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureH\x08\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x1ar\n\x10\x41ttachmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectAttachmentGroupAttachment:\x02\x38\x01\x42\r\n\x0b_configuredB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x07\n\x05_etagB\x05\n\x03_idB\t\n\x07_intentB\x15\n\x13_interconnect_groupB\x07\n\x05_kindB\x14\n\x12_logical_structureB\x07\n\x05_nameB\x0c\n\n_self_link\"R\n%InterconnectAttachmentGroupAttachment\x12\x1a\n\nattachment\x18\xa3\xb2\xddW \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_attachment\"\xae\x01\n%InterconnectAttachmentGroupConfigured\x12p\n\x10\x61vailability_sla\x18\xc4\xb8\xb3\xe1\x01 \x01(\x0b\x32M.google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredAvailabilitySLAH\x00\x88\x01\x01\x42\x13\n\x11_availability_sla\"\x8a\x03\n4InterconnectAttachmentGroupConfiguredAvailabilitySLA\x12\x1d\n\reffective_sla\x18\x90\xd5\xdf\x44 \x01(\tH\x00\x88\x01\x01\x12\x83\x01\n\x15intended_sla_blockers\x18\x84\xad\xe6\xd5\x01 \x03(\x0b\x32`.google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers\"\x9a\x01\n\x0c\x45\x66\x66\x65\x63tiveSla\x12\x1b\n\x17UNDEFINED_EFFECTIVE_SLA\x10\x00\x12!\n\x19\x45\x46\x46\x45\x43TIVE_SLA_UNSPECIFIED\x10\xa8\xa7\x90\xea\x01\x12\r\n\x06NO_SLA\x10\x8a\xe3\xfeL\x12\x1b\n\x13PRODUCTION_CRITICAL\x10\xe5\xf8\xa7\xe0\x01\x12\x1e\n\x17PRODUCTION_NON_CRITICAL\x10\xb7\xbd\xfd\x37\x42\x10\n\x0e_effective_sla\"\xab\x04\nGInterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers\x12\x17\n\x0b\x61ttachments\x18\xb0\x97\xcf\x9f\x01 \x03(\t\x12\x1d\n\x0c\x62locker_type\x18\xdf\xa4\xe2\xb5\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x64ocumentation_link\x18\xdf\xd4\xc8, \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x65xplanation\x18\x99\x9c\xd7\xf0\x01 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x06metros\x18\xfa\xec\x97\xfe\x01 \x03(\t\x12\x12\n\x07regions\x18\xff\xef\xf2\x05 \x03(\t\x12\x10\n\x05zones\x18\xc7\xa4\xad\x37 \x03(\t\"\xf3\x01\n\x0b\x42lockerType\x12\x1a\n\x16UNDEFINED_BLOCKER_TYPE\x10\x00\x12 \n\x18\x42LOCKER_TYPE_UNSPECIFIED\x10\xd7\xc2\xf8\xcc\x01\x12\x1b\n\x13INCOMPATIBLE_METROS\x10\xc0\x9f\xbd\x8a\x01\x12\x1b\n\x14INCOMPATIBLE_REGIONS\x10\xd9\x8e\xfa\x02\x12\x1d\n\x16MISSING_GLOBAL_ROUTING\x10\xa3\xc8\x8eO\x12\x16\n\x0eNO_ATTACHMENTS\x10\x92\xdc\xd8\xd9\x01\x12\'\n NO_ATTACHMENTS_IN_METRO_AND_ZONE\x10\xa7\xc6\xd2\x18\x12\x0c\n\x05OTHER\x10\xf0\x8d\x82$B\x0f\n\r_blocker_typeB\x15\n\x13_documentation_linkB\x0e\n\x0c_explanation\"\x80\x02\n!InterconnectAttachmentGroupIntent\x12!\n\x10\x61vailability_sla\x18\xc4\xb8\xb3\xe1\x01 \x01(\tH\x00\x88\x01\x01\"\xa2\x01\n\x0f\x41vailabilitySla\x12\x1e\n\x1aUNDEFINED_AVAILABILITY_SLA\x10\x00\x12#\n\x1c\x41VAILABILITY_SLA_UNSPECIFIED\x10\xfc\xde\xaa\x05\x12\r\n\x06NO_SLA\x10\x8a\xe3\xfeL\x12\x1b\n\x13PRODUCTION_CRITICAL\x10\xe5\xf8\xa7\xe0\x01\x12\x1e\n\x17PRODUCTION_NON_CRITICAL\x10\xb7\xbd\xfd\x37\x42\x13\n\x11_availability_sla\"\x8d\x01\n+InterconnectAttachmentGroupLogicalStructure\x12^\n\x07regions\x18\xff\xef\xf2\x05 \x03(\x0b\x32J.google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureRegion\"\xbb\x01\n1InterconnectAttachmentGroupLogicalStructureRegion\x12\x63\n\x06metros\x18\xfa\xec\x97\xfe\x01 \x03(\x0b\x32O.google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureRegionMetro\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_region\"\xca\x01\n6InterconnectAttachmentGroupLogicalStructureRegionMetro\x12o\n\nfacilities\x18\x81\xc5\xf4\xff\x01 \x03(\x0b\x32W.google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureRegionMetroFacility\x12\x15\n\x05metro\x18\x99\xda\xbe\x31 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_metro\"\xd7\x01\n>InterconnectAttachmentGroupLogicalStructureRegionMetroFacility\x12\x19\n\x08\x66\x61\x63ility\x18\xa3\xdd\xf9\xee\x01 \x01(\tH\x00\x88\x01\x01\x12m\n\x05zones\x18\xc7\xa4\xad\x37 \x03(\x0b\x32[.google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZoneB\x0b\n\t_facility\"|\nBInterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone\x12\x17\n\x0b\x61ttachments\x18\xb0\x97\xcf\x9f\x01 \x03(\t\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_zone\"\xc4\x01\n8InterconnectAttachmentGroupsGetOperationalStatusResponse\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12^\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32\x46.google.cloud.compute.v1.InterconnectAttachmentGroupsOperationalStatusH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_result\"\x88\x03\n(InterconnectAttachmentGroupsListResponse\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x46\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x34.google.cloud.compute.v1.InterconnectAttachmentGroup\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x88\x05\n-InterconnectAttachmentGroupsOperationalStatus\x12w\n\x13\x61ttachment_statuses\x18\xbc\xaf\x98\xea\x01 \x03(\x0b\x32V.google.cloud.compute.v1.InterconnectAttachmentGroupsOperationalStatusAttachmentStatus\x12[\n\nconfigured\x18\xbe\xf4\xfb\x8c\x01 \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredH\x00\x88\x01\x01\x12\x1d\n\x0cgroup_status\x18\xb2\xb3\xc5\xa1\x01 \x01(\tH\x01\x88\x01\x01\x12S\n\x06intent\x18\x9c\xed\xc4\xcb\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InterconnectAttachmentGroupIntentH\x02\x88\x01\x01\x12[\n\x0boperational\x18\xd2\xc7\xec= \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredH\x03\x88\x01\x01\"u\n\x0bGroupStatus\x12\x1a\n\x16UNDEFINED_GROUP_STATUS\x10\x00\x12\x10\n\x08\x44\x45GRADED\x10\xae\xa6\xa0\xbd\x01\x12\x11\n\nFULLY_DOWN\x10\x97\xb0\xeby\x12\x10\n\x08\x46ULLY_UP\x10\xd0\xbe\xb4\xf0\x01\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\r\n\x0b_configuredB\x0f\n\r_group_statusB\t\n\x07_intentB\x0e\n\x0c_operational\"\x94\x06\n=InterconnectAttachmentGroupsOperationalStatusAttachmentStatus\x12\x1e\n\radmin_enabled\x18\xd1\xec\xc1\xd4\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\nattachment\x18\xa3\xb2\xddW \x01(\tH\x01\x88\x01\x01\x12\x19\n\tis_active\x18\xbb\xd7\xe0\x36 \x01(\tH\x02\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x03\x88\x01\x01\"Z\n\x08IsActive\x12\x17\n\x13UNDEFINED_IS_ACTIVE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08INACTIVE\x10\xeb\x98\xf9\x80\x01\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\"\xcd\x03\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12!\n\x19\x41TTACHMENT_STATUS_UNKNOWN\x10\xf9\xde\xa5\xe1\x01\x12\x1b\n\x13\x43ONNECTION_DISABLED\x10\xbd\x95\xa9\xce\x01\x12\x16\n\x0f\x43ONNECTION_DOWN\x10\xe3\x8a\xca\x7f\x12\x15\n\rCONNECTION_UP\x10\x9c\xdf\x9e\xd9\x01\x12\x0e\n\x07\x44\x45\x46UNCT\x10\xaf\xbc\xa1\x37\x12)\n!IPSEC_CONFIGURATION_NEEDED_STATUS\x10\xfe\xb5\x87\xd9\x01\x12)\n!IPSEC_READY_TO_RESUME_FLOW_STATUS\x10\x84\x99\xc0\xb7\x01\x12\x19\n\x11IPV4_DOWN_IPV6_UP\x10\xb0\xda\xa8\x84\x01\x12\x19\n\x11IPV4_UP_IPV6_DOWN\x10\xb0\x9e\xda\x96\x01\x12 \n\x18PARTNER_REQUEST_RECEIVED\x10\xe8\xf0\xf2\xf4\x01\x12\x17\n\x10PENDING_CUSTOMER\x10\xa6\x83\xefO\x12\x17\n\x0fPENDING_PARTNER\x10\xe0\xfb\xfa\xb8\x01\x12\x13\n\x0bPROVISIONED\x10\x94\xb0\xd1\xa9\x01\x12\"\n\x1bROUTER_CONFIGURATION_BROKEN\x10\x94\x8d\xe2G\x12\x15\n\rUNPROVISIONED\x10\xdb\xc7\xd7\xf6\x01\x42\x10\n\x0e_admin_enabledB\r\n\x0b_attachmentB\x0c\n\n_is_activeB\t\n\x07_status\"\xbd\x02\n\x1aInterconnectAttachmentList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x41\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32/.google.cloud.compute.v1.InterconnectAttachment\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbc\x01\n%InterconnectAttachmentPartnerMetadata\x12\"\n\x11interconnect_name\x18\x9c\xef\xc6\xf5\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cpartner_name\x18\xa2\xa7\x90M \x01(\tH\x01\x88\x01\x01\x12\x1b\n\nportal_url\x18\x9c\xce\xad\x80\x01 \x01(\tH\x02\x88\x01\x01\x42\x14\n\x12_interconnect_nameB\x0f\n\r_partner_nameB\r\n\x0b_portal_url\"K\n!InterconnectAttachmentPrivateInfo\x12\x19\n\x08tag8021q\x18\xc0\xd1\xce\x81\x01 \x01(\rH\x00\x88\x01\x01\x42\x0b\n\t_tag8021q\"\xc1\x01\n!InterconnectAttachmentsScopedList\x12U\n\x18interconnect_attachments\x18\xff\xd2\xeb\xca\x01 \x03(\x0b\x32/.google.cloud.compute.v1.InterconnectAttachment\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xc5\x01\n\x17InterconnectCircuitInfo\x12\"\n\x12\x63ustomer_demarc_id\x18\x93\x8c\xdc\r \x01(\tH\x00\x88\x01\x01\x12!\n\x11google_circuit_id\x18\xf7\x8d\xf8| \x01(\tH\x01\x88\x01\x01\x12!\n\x10google_demarc_id\x18\xae\xdd\xdb\xd5\x01 \x01(\tH\x02\x88\x01\x01\x42\x15\n\x13_customer_demarc_idB\x14\n\x12_google_circuit_idB\x13\n\x11_google_demarc_id\"\x95\x05\n\x17InterconnectDiagnostics\x12P\n\narp_caches\x18\x91\xd6\xd8\xc5\x01 \x03(\x0b\x32\x38.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry\x12(\n\x17\x62undle_aggregation_type\x18\x94\xc9\xb2\xcf\x01 \x01(\tH\x00\x88\x01\x01\x12)\n\x19\x62undle_operational_status\x18\xdc\x97\xe0\x32 \x01(\tH\x01\x88\x01\x01\x12L\n\x05links\x18\xb9\x9f\x8d\x31 \x03(\x0b\x32:.google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus\x12\x1c\n\x0bmac_address\x18\x84\xd2\xc8\x9e\x01 \x01(\tH\x02\x88\x01\x01\"\x8a\x01\n\x15\x42undleAggregationType\x12%\n!UNDEFINED_BUNDLE_AGGREGATION_TYPE\x10\x00\x12#\n\x1c\x42UNDLE_AGGREGATION_TYPE_LACP\x10\xcd\xa2\x9e\r\x12%\n\x1e\x42UNDLE_AGGREGATION_TYPE_STATIC\x10\xd9\x98\x95\x18\"\x8f\x01\n\x17\x42undleOperationalStatus\x12\'\n#UNDEFINED_BUNDLE_OPERATIONAL_STATUS\x10\x00\x12&\n\x1e\x42UNDLE_OPERATIONAL_STATUS_DOWN\x10\x85\xae\xb4\xd8\x01\x12#\n\x1c\x42UNDLE_OPERATIONAL_STATUS_UP\x10\xbe\x83\xf9LB\x1a\n\x18_bundle_aggregation_typeB\x1c\n\x1a_bundle_operational_statusB\x0e\n\x0c_mac_address\"{\n\x1fInterconnectDiagnosticsARPEntry\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bmac_address\x18\x84\xd2\xc8\x9e\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_ip_addressB\x0e\n\x0c_mac_address\"\xfa\x01\n%InterconnectDiagnosticsLinkLACPStatus\x12 \n\x10google_system_id\x18\xa5\x85\xbf+ \x01(\tH\x00\x88\x01\x01\x12#\n\x12neighbor_system_id\x18\x9e\x98\xf9\xa3\x01 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x02\x88\x01\x01\"=\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0f\n\x08\x44\x45TACHED\x10\xf2\xf6\xa1gB\x13\n\x11_google_system_idB\x15\n\x13_neighbor_system_idB\x08\n\x06_state\"\xe3\x01\n\'InterconnectDiagnosticsLinkOpticalPower\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\x02H\x01\x88\x01\x01\"v\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x12\n\nHIGH_ALARM\x10\xd4\xf2\xcd\x91\x01\x12\x13\n\x0cHIGH_WARNING\x10\xdf\xeb\xafi\x12\x11\n\tLOW_ALARM\x10\xe6\xaa\xff\x96\x01\x12\x13\n\x0bLOW_WARNING\x10\xf1\xaa\xc6\xa1\x01\x12\x07\n\x02OK\x10\xdc\x13\x42\x08\n\x06_stateB\x08\n\x06_value\"\xf1\x06\n!InterconnectDiagnosticsLinkStatus\x12P\n\narp_caches\x18\x91\xd6\xd8\xc5\x01 \x03(\x0b\x32\x38.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry\x12\x1a\n\ncircuit_id\x18\xb1\xfa\xafk \x01(\tH\x00\x88\x01\x01\x12\x1c\n\rgoogle_demarc\x18\x8c\x8f\x03 \x01(\tH\x01\x88\x01\x01\x12\\\n\x0blacp_status\x18\xaf\xc4\x9e\xac\x01 \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectDiagnosticsLinkLACPStatusH\x02\x88\x01\x01\x12U\n\x06macsec\x18\xa2\xc1\x97\xfc\x01 \x01(\x0b\x32<.google.cloud.compute.v1.InterconnectDiagnosticsMacsecStatusH\x03\x88\x01\x01\x12\"\n\x12operational_status\x18\xff\xb1\xf0_ \x01(\tH\x04\x88\x01\x01\x12i\n\x17receiving_optical_power\x18\xdf\xad\xd8t \x01(\x0b\x32@.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPowerH\x05\x88\x01\x01\x12m\n\x1atransmitting_optical_power\x18\x9d\xba\x89\xdb\x01 \x01(\x0b\x32@.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPowerH\x06\x88\x01\x01\"\x7f\n\x11OperationalStatus\x12 \n\x1cUNDEFINED_OPERATIONAL_STATUS\x10\x00\x12$\n\x1cLINK_OPERATIONAL_STATUS_DOWN\x10\xfd\xe4\xa6\x86\x01\x12\"\n\x1aLINK_OPERATIONAL_STATUS_UP\x10\xb6\xb6\xed\x91\x01\x42\r\n\x0b_circuit_idB\x10\n\x0e_google_demarcB\x0e\n\x0c_lacp_statusB\t\n\x07_macsecB\x15\n\x13_operational_statusB\x1a\n\x18_receiving_optical_powerB\x1d\n\x1b_transmitting_optical_power\"n\n#InterconnectDiagnosticsMacsecStatus\x12\x12\n\x03\x63kn\x18\x86\x82\x06 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0boperational\x18\xd2\xc7\xec= \x01(\x08H\x01\x88\x01\x01\x42\x06\n\x04_cknB\x0e\n\x0c_operational\"\x94\x06\n\x11InterconnectGroup\x12Q\n\nconfigured\x18\xbe\xf4\xfb\x8c\x01 \x01(\x0b\x32\x34.google.cloud.compute.v1.InterconnectGroupConfiguredH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12I\n\x06intent\x18\x9c\xed\xc4\xcb\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.InterconnectGroupIntentH\x05\x88\x01\x01\x12X\n\rinterconnects\x18\xa5\xdb\x85\xf8\x01 \x03(\x0b\x32=.google.cloud.compute.v1.InterconnectGroup.InterconnectsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12_\n\x12physical_structure\x18\x8b\xd0\x90] \x01(\x0b\x32;.google.cloud.compute.v1.InterconnectGroupPhysicalStructureH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x1al\n\x12InterconnectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.compute.v1.InterconnectGroupInterconnect:\x02\x38\x01\x42\r\n\x0b_configuredB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x07\n\x05_etagB\x05\n\x03_idB\t\n\x07_intentB\x07\n\x05_kindB\x07\n\x05_nameB\x15\n\x13_physical_structureB\x0c\n\n_self_link\"\xa2\x01\n\x1bInterconnectGroupConfigured\x12k\n\x13topology_capability\x18\xe8\xd9\xe0\x44 \x01(\x0b\x32\x46.google.cloud.compute.v1.InterconnectGroupConfiguredTopologyCapabilityH\x00\x88\x01\x01\x42\x16\n\x14_topology_capability\"\xfc\x02\n-InterconnectGroupConfiguredTopologyCapability\x12\x8a\x01\n\x1cintended_capability_blockers\x18\xec\xfd\xc0\xfd\x01 \x03(\x0b\x32`.google.cloud.compute.v1.InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers\x12\x1d\n\rsupported_sla\x18\x97\xf4\xa2\x1c \x01(\tH\x00\x88\x01\x01\"\x8c\x01\n\x0cSupportedSla\x12\x1b\n\x17UNDEFINED_SUPPORTED_SLA\x10\x00\x12\r\n\x06NO_SLA\x10\x8a\xe3\xfeL\x12\x1b\n\x13PRODUCTION_CRITICAL\x10\xe5\xf8\xa7\xe0\x01\x12\x1e\n\x17PRODUCTION_NON_CRITICAL\x10\xb7\xbd\xfd\x37\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x10\n\x0e_supported_sla\"\x83\x04\nGInterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers\x12\x1d\n\x0c\x62locker_type\x18\xdf\xa4\xe2\xb5\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x64ocumentation_link\x18\xdf\xd4\xc8, \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x65xplanation\x18\x99\x9c\xd7\xf0\x01 \x01(\tH\x02\x88\x01\x01\x12\x16\n\nfacilities\x18\x81\xc5\xf4\xff\x01 \x03(\t\x12\x19\n\rinterconnects\x18\xa5\xdb\x85\xf8\x01 \x03(\t\x12\x12\n\x06metros\x18\xfa\xec\x97\xfe\x01 \x03(\t\x12\x10\n\x05zones\x18\xc7\xa4\xad\x37 \x03(\t\"\xc5\x01\n\x0b\x42lockerType\x12\x1a\n\x16UNDEFINED_BLOCKER_TYPE\x10\x00\x12\x1b\n\x13INCOMPATIBLE_METROS\x10\xc0\x9f\xbd\x8a\x01\x12\x14\n\rNOT_AVAILABLE\x10\x9d\x80\x8d\x43\x12\x18\n\x10NO_INTERCONNECTS\x10\x87\xf7\xd2\xf9\x01\x12*\n\"NO_INTERCONNECTS_IN_METRO_AND_ZONE\x10\xdc\xba\xa2\xd2\x01\x12\x0c\n\x05OTHER\x10\xf0\x8d\x82$\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x0f\n\r_blocker_typeB\x15\n\x13_documentation_linkB\x0e\n\x0c_explanation\"\xf1\x01\n\x17InterconnectGroupIntent\x12#\n\x13topology_capability\x18\xe8\xd9\xe0\x44 \x01(\tH\x00\x88\x01\x01\"\x98\x01\n\x12TopologyCapability\x12!\n\x1dUNDEFINED_TOPOLOGY_CAPABILITY\x10\x00\x12\r\n\x06NO_SLA\x10\x8a\xe3\xfeL\x12\x1b\n\x13PRODUCTION_CRITICAL\x10\xe5\xf8\xa7\xe0\x01\x12\x1e\n\x17PRODUCTION_NON_CRITICAL\x10\xb7\xbd\xfd\x37\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x16\n\x14_topology_capability\"N\n\x1dInterconnectGroupInterconnect\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_interconnect\"{\n\"InterconnectGroupPhysicalStructure\x12U\n\x06metros\x18\xfa\xec\x97\xfe\x01 \x03(\x0b\x32\x41.google.cloud.compute.v1.InterconnectGroupPhysicalStructureMetros\"\xb0\x01\n(InterconnectGroupPhysicalStructureMetros\x12\x63\n\nfacilities\x18\x81\xc5\xf4\xff\x01 \x03(\x0b\x32K.google.cloud.compute.v1.InterconnectGroupPhysicalStructureMetrosFacilities\x12\x15\n\x05metro\x18\x99\xda\xbe\x31 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_metro\"\xc0\x01\n2InterconnectGroupPhysicalStructureMetrosFacilities\x12\x19\n\x08\x66\x61\x63ility\x18\xa3\xdd\xf9\xee\x01 \x01(\tH\x00\x88\x01\x01\x12\x62\n\x05zones\x18\xc7\xa4\xad\x37 \x03(\x0b\x32P.google.cloud.compute.v1.InterconnectGroupPhysicalStructureMetrosFacilitiesZonesB\x0b\n\t_facility\"s\n7InterconnectGroupPhysicalStructureMetrosFacilitiesZones\x12\x19\n\rinterconnects\x18\xa5\xdb\x85\xf8\x01 \x03(\t\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_zone\"\xd0\x03\n\x1fInterconnectGroupsCreateMembers\x12(\n\x18intent_mismatch_behavior\x18\xc0\xd5\xb2N \x01(\tH\x00\x88\x01\x01\x12\x64\n\rinterconnects\x18\xa5\xdb\x85\xf8\x01 \x03(\x0b\x32I.google.cloud.compute.v1.InterconnectGroupsCreateMembersInterconnectInput\x12p\n\x15template_interconnect\x18\xb3\xb0\x95k \x01(\x0b\x32I.google.cloud.compute.v1.InterconnectGroupsCreateMembersInterconnectInputH\x01\x88\x01\x01\"t\n\x16IntentMismatchBehavior\x12&\n\"UNDEFINED_INTENT_MISMATCH_BEHAVIOR\x10\x00\x12\x0e\n\x06\x43REATE\x10\xfc\xa9\xe2\xb7\x01\x12\r\n\x06REJECT\x10\x9f\xcf\xf1~\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x1b\n\x19_intent_mismatch_behaviorB\x18\n\x16_template_interconnect\"\x82\x07\n0InterconnectGroupsCreateMembersInterconnectInput\x12\x1e\n\radmin_enabled\x18\xd1\xec\xc1\xd4\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1d\n\rcustomer_name\x18\xcc\xdc\xdf\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x08\x66\x61\x63ility\x18\xa3\xdd\xf9\xee\x01 \x01(\tH\x03\x88\x01\x01\x12\"\n\x11interconnect_type\x18\xcb\x98\xd3\xf5\x01 \x01(\tH\x04\x88\x01\x01\x12\x1a\n\tlink_type\x18\xdf\x88\xbe\xf9\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12!\n\x11noc_contact_email\x18\x80\xf8\xda\x06 \x01(\tH\x07\x88\x01\x01\x12 \n\x0fremote_location\x18\x8e\x8f\xd7\x9a\x01 \x01(\tH\x08\x88\x01\x01\x12\x1e\n\x12requested_features\x18\xee\xf3\xf7\xdb\x01 \x03(\t\x12$\n\x14requested_link_count\x18\xfb\xdb\xbd\x15 \x01(\x05H\t\x88\x01\x01\"j\n\x10InterconnectType\x12\x1f\n\x1bUNDEFINED_INTERCONNECT_TYPE\x10\x00\x12\x10\n\tDEDICATED\x10\xcf\x9b\x9c{\x12\x12\n\nIT_PRIVATE\x10\xcf\x8c\x88\xa0\x01\x12\x0f\n\x07PARTNER\x10\xa8\xd1\xa1\xdc\x01\"\x8d\x01\n\x08LinkType\x12\x17\n\x13UNDEFINED_LINK_TYPE\x10\x00\x12\"\n\x1aLINK_TYPE_ETHERNET_100G_LR\x10\xe7\xf2\x81\xa1\x01\x12 \n\x19LINK_TYPE_ETHERNET_10G_LR\x10\xa5\xb9\xf1p\x12\"\n\x1bLINK_TYPE_ETHERNET_400G_LR4\x10\xca\xf4\xc8<\"H\n\x11RequestedFeatures\x12 \n\x1cUNDEFINED_REQUESTED_FEATURES\x10\x00\x12\x11\n\tIF_MACSEC\x10\x84\xfc\xfa\xbc\x01\x42\x10\n\x0e_admin_enabledB\x10\n\x0e_customer_nameB\x0e\n\x0c_descriptionB\x0b\n\t_facilityB\x14\n\x12_interconnect_typeB\x0c\n\n_link_typeB\x07\n\x05_nameB\x14\n\x12_noc_contact_emailB\x12\n\x10_remote_locationB\x17\n\x15_requested_link_count\"\x87\x01\n&InterconnectGroupsCreateMembersRequest\x12Q\n\x07request\x18\x8f\xe5\xbb\n \x01(\x0b\x32\x38.google.cloud.compute.v1.InterconnectGroupsCreateMembersH\x00\x88\x01\x01\x42\n\n\x08_request\"\xb0\x01\n.InterconnectGroupsGetOperationalStatusResponse\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12T\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32<.google.cloud.compute.v1.InterconnectGroupsOperationalStatusH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_result\"\xf4\x02\n\x1eInterconnectGroupsListResponse\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.InterconnectGroup\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe8\x04\n#InterconnectGroupsOperationalStatus\x12Q\n\nconfigured\x18\xbe\xf4\xfb\x8c\x01 \x01(\x0b\x32\x34.google.cloud.compute.v1.InterconnectGroupConfiguredH\x00\x88\x01\x01\x12\x1d\n\x0cgroup_status\x18\xb2\xb3\xc5\xa1\x01 \x01(\tH\x01\x88\x01\x01\x12I\n\x06intent\x18\x9c\xed\xc4\xcb\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.InterconnectGroupIntentH\x02\x88\x01\x01\x12q\n\x15interconnect_statuses\x18\xb1\xe9\x83\xd5\x01 \x03(\x0b\x32N.google.cloud.compute.v1.InterconnectGroupsOperationalStatusInterconnectStatus\x12Q\n\x0boperational\x18\xd2\xc7\xec= \x01(\x0b\x32\x34.google.cloud.compute.v1.InterconnectGroupConfiguredH\x03\x88\x01\x01\"\x82\x01\n\x0bGroupStatus\x12\x1a\n\x16UNDEFINED_GROUP_STATUS\x10\x00\x12\x10\n\x08\x44\x45GRADED\x10\xae\xa6\xa0\xbd\x01\x12\x11\n\nFULLY_DOWN\x10\x97\xb0\xeby\x12\x10\n\x08\x46ULLY_UP\x10\xd0\xbe\xb4\xf0\x01\x12 \n\x19GROUPS_STATUS_UNSPECIFIED\x10\x95\x8d\xf3|B\r\n\x0b_configuredB\x0f\n\r_group_statusB\t\n\x07_intentB\x0e\n\x0c_operational\"\x87\x03\n5InterconnectGroupsOperationalStatusInterconnectStatus\x12\x1e\n\radmin_enabled\x18\xd1\xec\xc1\xd4\x01 \x01(\x08H\x00\x88\x01\x01\x12N\n\x0b\x64iagnostics\x18\xac\xb3\xfa\x9e\x01 \x01(\x0b\x32\x30.google.cloud.compute.v1.InterconnectDiagnosticsH\x01\x88\x01\x01\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tH\x02\x88\x01\x01\x12\x19\n\tis_active\x18\xbb\xd7\xe0\x36 \x01(\tH\x03\x88\x01\x01\"d\n\x08IsActive\x12\x17\n\x13UNDEFINED_IS_ACTIVE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08INACTIVE\x10\xeb\x98\xf9\x80\x01\x12\x1d\n\x15IS_ACTIVE_UNSPECIFIED\x10\x93\xc1\x8d\x83\x01\x42\x10\n\x0e_admin_enabledB\x0e\n\x0c_diagnosticsB\x0f\n\r_interconnectB\x0c\n\n_is_active\"\xa9\x02\n\x10InterconnectList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x37\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32%.google.cloud.compute.v1.Interconnect\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xfa\n\n\x14InterconnectLocation\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x11\x61vailability_zone\x18\x90\xd0\xc7K \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x12\x61vailable_features\x18\xf3\xb9\xd6\xec\x01 \x03(\t\x12 \n\x14\x61vailable_link_types\x18\xaa\xd6\xf9\xf2\x01 \x03(\t\x12\x14\n\x04\x63ity\x18\xeb\xb2\xba\x01 \x01(\tH\x02\x88\x01\x01\x12\x19\n\tcontinent\x18\xb4\xdb\xd0? \x01(\tH\x03\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\"\n\x11\x66\x61\x63ility_provider\x18\x8d\xa0\xa6\xfe\x01 \x01(\tH\x06\x88\x01\x01\x12-\n\x1d\x66\x61\x63ility_provider_facility_id\x18\x85\xbe\xce) \x01(\tH\x07\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x08\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12&\n\x15peeringdb_facility_id\x18\xb6\xba\xed\xff\x01 \x01(\tH\x0b\x88\x01\x01\x12Q\n\x0cregion_infos\x18\xfa\xe8\xee\x94\x01 \x03(\x0b\x32\x37.google.cloud.compute.v1.InterconnectLocationRegionInfo\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0csupports_pzs\x18\xee\xf6\x85( \x01(\x08H\x0e\x88\x01\x01\"H\n\x11\x41vailableFeatures\x12 \n\x1cUNDEFINED_AVAILABLE_FEATURES\x10\x00\x12\x11\n\tIF_MACSEC\x10\x84\xfc\xfa\xbc\x01\"\xa2\x01\n\x12\x41vailableLinkTypes\x12\"\n\x1eUNDEFINED_AVAILABLE_LINK_TYPES\x10\x00\x12\"\n\x1aLINK_TYPE_ETHERNET_100G_LR\x10\xe7\xf2\x81\xa1\x01\x12 \n\x19LINK_TYPE_ETHERNET_10G_LR\x10\xa5\xb9\xf1p\x12\"\n\x1bLINK_TYPE_ETHERNET_400G_LR4\x10\xca\xf4\xc8<\"\xea\x01\n\tContinent\x12\x17\n\x13UNDEFINED_CONTINENT\x10\x00\x12\x0e\n\x06\x41\x46RICA\x10\xfa\x9c\xaf\x97\x01\x12\x0f\n\x08\x41SIA_PAC\x10\xfd\xf6\x8e\x39\x12\x0f\n\x08\x43_AFRICA\x10\xf6\x93\xaa\"\x12\x12\n\nC_ASIA_PAC\x10\xf9\x8f\x86\xde\x01\x12\x0f\n\x08\x43_EUROPE\x10\x9e\xca\xc5_\x12\x17\n\x0f\x43_NORTH_AMERICA\x10\x98\x9b\xbb\x83\x01\x12\x17\n\x0f\x43_SOUTH_AMERICA\x10\xe0\x8c\xb0\xbd\x01\x12\x0e\n\x06\x45UROPE\x10\xa2\xd3\xca\xd4\x01\x12\x15\n\rNORTH_AMERICA\x10\x94\xd9\xd0\xd5\x01\x12\x14\n\rSOUTH_AMERICA\x10\xdc\xca\xc5\x0f\"A\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x11\n\tAVAILABLE\x10\xa9\xb5\xe6\xd2\x01\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x42\n\n\x08_addressB\x14\n\x12_availability_zoneB\x07\n\x05_cityB\x0c\n\n_continentB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x14\n\x12_facility_providerB \n\x1e_facility_provider_facility_idB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x18\n\x16_peeringdb_facility_idB\x0c\n\n_self_linkB\t\n\x07_statusB\x0f\n\r_supports_pzs\"\xb9\x02\n\x18InterconnectLocationList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.InterconnectLocation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xba\x02\n\x1eInterconnectLocationRegionInfo\x12 \n\x0f\x65xpected_rtt_ms\x18\xfa\x83\xbe\xc9\x01 \x01(\x03H\x00\x88\x01\x01\x12!\n\x11location_presence\x18\xc5\x94\xb4\x30 \x01(\tH\x01\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x02\x88\x01\x01\"\x85\x01\n\x10LocationPresence\x12\x1f\n\x1bUNDEFINED_LOCATION_PRESENCE\x10\x00\x12\x0e\n\x06GLOBAL\x10\xa3\xef\xef\xeb\x01\x12\x14\n\x0cLOCAL_REGION\x10\xe8\xec\xb5\xc0\x01\x12\x11\n\tLP_GLOBAL\x10\xbe\xdd\xeb\xcc\x01\x12\x17\n\x0fLP_LOCAL_REGION\x10\xc3\xda\xfd\xe8\x01\x42\x12\n\x10_expected_rtt_msB\x14\n\x12_location_presenceB\t\n\x07_region\"\x94\x01\n\x12InterconnectMacsec\x12\x1a\n\tfail_open\x18\xcb\x95\xfb\xfd\x01 \x01(\x08H\x00\x88\x01\x01\x12T\n\x0fpre_shared_keys\x18\xf2\xcb\xb5\xc8\x01 \x03(\x0b\x32\x37.google.cloud.compute.v1.InterconnectMacsecPreSharedKeyB\x0c\n\n_fail_open\"v\n\x18InterconnectMacsecConfig\x12Z\n\x0fpre_shared_keys\x18\xf2\xcb\xb5\xc8\x01 \x03(\x0b\x32=.google.cloud.compute.v1.InterconnectMacsecConfigPreSharedKey\"\xa8\x01\n$InterconnectMacsecConfigPreSharedKey\x12\x12\n\x03\x63\x61k\x18\xcd\xff\x05 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03\x63kn\x18\x86\x82\x06 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x03\x88\x01\x01\x42\x06\n\x04_cakB\x06\n\x04_cknB\x07\n\x05_nameB\r\n\x0b_start_time\"j\n\x1eInterconnectMacsecPreSharedKey\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\r\n\x0b_start_time\"\x85\x05\n\x1eInterconnectOutageNotification\x12\x1c\n\x11\x61\x66\x66\x65\x63ted_circuits\x18\x95\xfe\xdeT \x03(\t\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08\x65nd_time\x18\xb1\xa7\xe7\x36 \x01(\x03H\x01\x88\x01\x01\x12\x1b\n\nissue_type\x18\xe0\xfd\xa0\xb0\x01 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x03\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x04\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\x03H\x05\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x06\x88\x01\x01\"w\n\tIssueType\x12\x18\n\x14UNDEFINED_ISSUE_TYPE\x10\x00\x12\x10\n\tIT_OUTAGE\x10\x85\xe1\xe8S\x12\x18\n\x11IT_PARTIAL_OUTAGE\x10\xa3\xca\xf5+\x12\r\n\x06OUTAGE\x10\xf1\xa5\x8f]\x12\x15\n\x0ePARTIAL_OUTAGE\x10\x8f\xb7\x8f\x46\"C\n\x06Source\x12\x14\n\x10UNDEFINED_SOURCE\x10\x00\x12\x0e\n\x06GOOGLE\x10\xb9\xa4\x99\xed\x01\x12\x13\n\x0bNSRC_GOOGLE\x10\xe2\xff\xba\xf3\x01\"x\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\tCANCELLED\x10\xb1\xf2\x80\x14\x12\x11\n\tCOMPLETED\x10\xab\x8c\xe4\x93\x01\x12\x10\n\tNS_ACTIVE\x10\xc0\x9d\xb7x\x12\x13\n\x0bNS_CANCELED\x10\xd3\x93\xc7\xf1\x01\x42\x0e\n\x0c_descriptionB\x0b\n\t_end_timeB\r\n\x0b_issue_typeB\x07\n\x05_nameB\t\n\x07_sourceB\r\n\x0b_start_timeB\x08\n\x06_state\"\xcb\x0b\n\x1aInterconnectRemoteLocation\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tH\x00\x88\x01\x01\x12~\n$attachment_configuration_constraints\x18\xd1\xe8\xeb\x9b\x01 \x01(\x0b\x32G.google.cloud.compute.v1.InterconnectAttachmentConfigurationConstraintsH\x01\x88\x01\x01\x12\x14\n\x04\x63ity\x18\xeb\xb2\xba\x01 \x01(\tH\x02\x88\x01\x01\x12[\n\x0b\x63onstraints\x18\xb6\xcc\xee\x01 \x01(\x0b\x32>.google.cloud.compute.v1.InterconnectRemoteLocationConstraintsH\x03\x88\x01\x01\x12\x19\n\tcontinent\x18\xb4\xdb\xd0? \x01(\tH\x04\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x06\x88\x01\x01\x12\"\n\x11\x66\x61\x63ility_provider\x18\x8d\xa0\xa6\xfe\x01 \x01(\tH\x07\x88\x01\x01\x12-\n\x1d\x66\x61\x63ility_provider_facility_id\x18\x85\xbe\xce) \x01(\tH\x08\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12\x14\n\x04lacp\x18\xa2\xa1\xca\x01 \x01(\tH\x0b\x88\x01\x01\x12$\n\x14max_lag_size100_gbps\x18\xb5\xff\xf6t \x01(\x05H\x0c\x88\x01\x01\x12$\n\x13max_lag_size10_gbps\x18\x95\xe6\x98\x8c\x01 \x01(\x05H\r\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0e\x88\x01\x01\x12&\n\x15peeringdb_facility_id\x18\xb6\xba\xed\xff\x01 \x01(\tH\x0f\x88\x01\x01\x12j\n\x15permitted_connections\x18\xae\xb3\xe5\xd2\x01 \x03(\x0b\x32G.google.cloud.compute.v1.InterconnectRemoteLocationPermittedConnections\x12\x1f\n\x0eremote_service\x18\xbc\xff\xf2\xba\x01 \x01(\tH\x10\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x11\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x12\x88\x01\x01\"\x82\x01\n\tContinent\x12\x17\n\x13UNDEFINED_CONTINENT\x10\x00\x12\x0e\n\x06\x41\x46RICA\x10\xfa\x9c\xaf\x97\x01\x12\x0f\n\x08\x41SIA_PAC\x10\xfd\xf6\x8e\x39\x12\x0e\n\x06\x45UROPE\x10\xa2\xd3\xca\xd4\x01\x12\x15\n\rNORTH_AMERICA\x10\x94\xd9\xd0\xd5\x01\x12\x14\n\rSOUTH_AMERICA\x10\xdc\xca\xc5\x0f\"K\n\x04Lacp\x12\x12\n\x0eUNDEFINED_LACP\x10\x00\x12\x16\n\x0eLACP_SUPPORTED\x10\xb1\x8a\xf6\xa1\x01\x12\x17\n\x10LACP_UNSUPPORTED\x10\xf8\xf3\x9e\x61\"A\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x11\n\tAVAILABLE\x10\xa9\xb5\xe6\xd2\x01\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x42\n\n\x08_addressB\'\n%_attachment_configuration_constraintsB\x07\n\x05_cityB\x0e\n\x0c_constraintsB\x0c\n\n_continentB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x14\n\x12_facility_providerB \n\x1e_facility_provider_facility_idB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_lacpB\x17\n\x15_max_lag_size100_gbpsB\x16\n\x14_max_lag_size10_gbpsB\x07\n\x05_nameB\x18\n\x16_peeringdb_facility_idB\x11\n\x0f_remote_serviceB\x0c\n\n_self_linkB\t\n\x07_status\"\xc5\x04\n%InterconnectRemoteLocationConstraints\x12*\n\x19port_pair_remote_location\x18\xa7\xb2\xbc\xec\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0eport_pair_vlan\x18\xea\xf2\x83\xe4\x01 \x01(\tH\x01\x88\x01\x01\x12t\n\x13subnet_length_range\x18\xc6\xb0\xfbW \x01(\x0b\x32O.google.cloud.compute.v1.InterconnectRemoteLocationConstraintsSubnetLengthRangeH\x02\x88\x01\x01\"\x9c\x01\n\x16PortPairRemoteLocation\x12\'\n#UNDEFINED_PORT_PAIR_REMOTE_LOCATION\x10\x00\x12)\n\"PORT_PAIR_MATCHING_REMOTE_LOCATION\x10\xd3\x8b\xec\x62\x12.\n\'PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION\x10\xa5\xaa\xf3\x1c\"q\n\x0cPortPairVlan\x12\x1c\n\x18UNDEFINED_PORT_PAIR_VLAN\x10\x00\x12\x1e\n\x17PORT_PAIR_MATCHING_VLAN\x10\xbe\xe8\xacw\x12#\n\x1cPORT_PAIR_UNCONSTRAINED_VLAN\x10\xac\x88\xc7SB\x1c\n\x1a_port_pair_remote_locationB\x11\n\x0f_port_pair_vlanB\x16\n\x14_subnet_length_range\"p\n6InterconnectRemoteLocationConstraintsSubnetLengthRange\x12\x12\n\x03max\x18\xe4\xca\x06 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x03min\x18\xd2\xcc\x06 \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04_maxB\x06\n\x04_min\"\xc5\x02\n\x1eInterconnectRemoteLocationList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x45\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x33.google.cloud.compute.v1.InterconnectRemoteLocation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"r\n.InterconnectRemoteLocationPermittedConnections\x12&\n\x15interconnect_location\x18\xc6\xd8\xdb\xea\x01 \x01(\tH\x00\x88\x01\x01\x42\x18\n\x16_interconnect_location\"z\n#InterconnectsGetDiagnosticsResponse\x12H\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32\x30.google.cloud.compute.v1.InterconnectDiagnosticsH\x00\x88\x01\x01\x42\t\n\x07_result\"\x9b\x01\n$InterconnectsGetMacsecConfigResponse\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12I\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32\x31.google.cloud.compute.v1.InterconnectMacsecConfigH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_result\"\xe9\x01\n\x1cInvalidateCacheUrlMapRequest\x12\x61\n cache_invalidation_rule_resource\x18\xad\xc3\x93\x95\x01 \x01(\x0b\x32..google.cloud.compute.v1.CacheInvalidationRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"D\n\x05Items\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"\xd4\x08\n\x07License\x12\'\n\x1c\x61llowed_replacement_licenses\x18\x96\x9c\xa7] \x03(\t\x12\"\n\x12\x61ppendable_to_disk\x18\x96\x8e\x8b\x08 \x01(\x08H\x00\x88\x01\x01\x12 \n\x0f\x63harges_use_fee\x18\xce\xa1\xca\xb1\x01 \x01(\x08H\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12!\n\x15incompatible_licenses\x18\x98\xb0\xb0\x9f\x01 \x03(\t\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0clicense_code\x18\xab\xc6Y \x01(\x04H\x06\x88\x01\x01\x12\x44\n\x11minimum_retention\x18\xad\xe0\x8cJ \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x07\x88\x01\x01\x12\"\n\x11multi_tenant_only\x18\x9b\xe0\xeb\x82\x01 \x01(\x08H\x08\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12\x1b\n\nos_license\x18\xe6\xa9\xd8\xe8\x01 \x01(\x08H\n\x88\x01\x01\x12#\n\x13removable_from_disk\x18\xae\x85\xaa\x0c \x01(\x08H\x0b\x88\x01\x01\x12\'\n\x1crequired_coattached_licenses\x18\x81\xba\xcd= \x03(\t\x12[\n\x15resource_requirements\x18\xa1\xb2\x97\x66 \x01(\x0b\x32\x34.google.cloud.compute.v1.LicenseResourceRequirementsH\x0c\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x0e\x88\x01\x01\x12!\n\x10sole_tenant_only\x18\xb7\x8b\xee\xcb\x01 \x01(\x08H\x0f\x88\x01\x01\x12\x1c\n\x0ctransferable\x18\xc5\xbf\x89\x02 \x01(\x08H\x10\x88\x01\x01\x12 \n\x10update_timestamp\x18\xa0\xea\xd2\x39 \x01(\tH\x11\x88\x01\x01\x42\x15\n\x13_appendable_to_diskB\x12\n\x10_charges_use_feeB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x0f\n\r_license_codeB\x14\n\x12_minimum_retentionB\x14\n\x12_multi_tenant_onlyB\x07\n\x05_nameB\r\n\x0b_os_licenseB\x16\n\x14_removable_from_diskB\x18\n\x16_resource_requirementsB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x13\n\x11_sole_tenant_onlyB\x0f\n\r_transferableB\x13\n\x11_update_timestamp\"\x94\x04\n\x0bLicenseCode\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12J\n\rlicense_alias\x18\xd2\x91\xe2\x14 \x03(\x0b\x32\x30.google.cloud.compute.v1.LicenseCodeLicenseAlias\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x04\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x05\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x06\x88\x01\x01\x12\x1c\n\x0ctransferable\x18\xc5\xbf\x89\x02 \x01(\x08H\x07\x88\x01\x01\"\x7f\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0e\n\x07\x45NABLED\x10\xa1\xae\xecV\x12\x11\n\nRESTRICTED\x10\xdb\xe8\xdb|\x12\x19\n\x11STATE_UNSPECIFIED\x10\xc9\xd0\xbc\xe0\x01\x12\x11\n\nTERMINATED\x10\xa3\xf4\x9bwB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_self_linkB\x08\n\x06_stateB\x0f\n\r_transferable\"q\n\x17LicenseCodeLicenseAlias\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x0c\n\n_self_link\"\x9c\x01\n\x19LicenseResourceCommitment\x12\x16\n\x06\x61mount\x18\xd8\xa0\xe9] \x01(\x03H\x00\x88\x01\x01\x12!\n\x11\x63ores_per_license\x18\x94\xc8\xbe\x0f \x01(\tH\x01\x88\x01\x01\x12\x17\n\x07license\x18\xc1\x88\xc2O \x01(\tH\x02\x88\x01\x01\x42\t\n\x07_amountB\x14\n\x12_cores_per_licenseB\n\n\x08_license\"\x8d\x01\n\x1bLicenseResourceRequirements\x12$\n\x13min_guest_cpu_count\x18\xa4\xd4\xf4\xe3\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1e\n\rmin_memory_mb\x18\xe6\xd7\xd9\xf0\x01 \x01(\x05H\x01\x88\x01\x01\x42\x16\n\x14_min_guest_cpu_countB\x10\n\x0e_min_memory_mb\"\x89\x02\n\x14LicensesListResponse\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x32\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32 .google.cloud.compute.v1.License\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x01\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x02\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x03\x88\x01\x01\x42\x05\n\x03_idB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb3\x02\n\x1bListAcceleratorTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xae\x02\n\x14ListAddressesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"]\n%ListAssociationsFirewallPolicyRequest\x12 \n\x0ftarget_resource\x18\xfc\xed\xea\xde\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_target_resource\"\xae\x02\n\x16ListAutoscalersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc7\x02\n-ListAvailableFeaturesRegionSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa9\x02\n\'ListAvailableFeaturesSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9b\x02\n\x19ListBackendBucketsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9c\x02\n\x1aListBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x8b\x06\n\x1bListBgpRoutesRoutersRequest\x12\x1e\n\x0e\x61\x64\x64ress_family\x18\x8f\xc4\xecR \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x64\x65stination_prefix\x18\xe3\xbf\xe9} \x01(\tH\x01\x88\x01\x01\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x03\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x04\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04peer\x18\xe2\xe2\xd1\x01 \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x0epolicy_applied\x18\xf0\xd4\xf8\xb4\x01 \x01(\x08H\x07\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x08\x88\x01\x01\x12\x1b\n\nroute_type\x18\xf0\xb6\x9e\xb3\x01 \x01(\tH\t\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\"f\n\rAddressFamily\x12\x1c\n\x18UNDEFINED_ADDRESS_FAMILY\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\x12\x1d\n\x16UNSPECIFIED_IP_VERSION\x10\xc8\xe7\xe3\"\"g\n\tRouteType\x12\x18\n\x14UNDEFINED_ROUTE_TYPE\x10\x00\x12\x11\n\nADVERTISED\x10\x9d\x92\xd7\t\x12\x0e\n\x07LEARNED\x10\xc3\xcb\xc9n\x12\x1d\n\x16UNSPECIFIED_ROUTE_TYPE\x10\xb8\xd3\xa4vB\x11\n\x0f_address_familyB\x15\n\x13_destination_prefixB\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x07\n\x05_peerB\x11\n\x0f_policy_appliedB\x19\n\x17_return_partial_successB\r\n\x0b_route_type\"\xac\x02\n\x14ListDiskTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa8\x02\n\x10ListDisksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd3\x02\n\x1cListDisksStoragePoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xe6\x02\n&ListErrorsInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xee\x02\n,ListErrorsRegionInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa0\x02\n\x1eListExternalVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xae\x02\n\x1bListFirewallPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tH\x04\x88\x01\x01\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x0c\n\n_parent_idB\x19\n\x17_return_partial_success\"\x96\x02\n\x14ListFirewallsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb4\x02\n\x1aListForwardingRulesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9c\x02\n\x1aListGlobalAddressesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa2\x02\n ListGlobalForwardingRulesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa8\x02\n&ListGlobalNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9d\x02\n\x1bListGlobalOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xba\x02\n\'ListGlobalOrganizationOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tH\x04\x88\x01\x01\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x05\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x0c\n\n_parent_idB\x19\n\x17_return_partial_success\"\xaa\x02\n(ListGlobalPublicDelegatedPrefixesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x99\x02\n\x17ListHealthChecksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x93\x02\n\x11ListImagesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xed\x02\n-ListInstanceGroupManagerResizeRequestsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb8\x02\n ListInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb1\x02\n\x19ListInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9e\x02\n\x1cListInstanceTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd9\x03\n\"ListInstancesInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12}\n/instance_groups_list_instances_request_resource\x18\x9f\xa8\x8c\xe3\x01 \x01(\x0b\x32;.google.cloud.compute.v1.InstanceGroupsListInstancesRequestB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xee\x03\n(ListInstancesRegionInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x89\x01\n6region_instance_groups_list_instances_request_resource\x18\xd4\xa9\x80\x17 \x01(\x0b\x32\x41.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequestB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xac\x02\n\x14ListInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb3\x02\n\x1bListInstantSnapshotsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa9\x02\n\'ListInterconnectAttachmentGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbc\x02\n\"ListInterconnectAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9f\x02\n\x1dListInterconnectGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa2\x02\n ListInterconnectLocationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa8\x02\n&ListInterconnectRemoteLocationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9a\x02\n\x18ListInterconnectsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x95\x02\n\x13ListLicensesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9a\x02\n\x18ListMachineImagesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xaf\x02\n\x17ListMachineTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xf0\x02\n0ListManagedInstancesInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xf8\x02\n6ListManagedInstancesRegionInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb7\x02\n\x1dListNetworkAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb8\x02\n ListNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xe1\x02\n6ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xff\x03\n0ListNetworkEndpointsNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x8b\x01\n7network_endpoint_groups_list_endpoints_request_resource\x18\x8e\x98\xaf\x1c \x01(\x0b\x32\x42.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequestB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xf9\x02\n6ListNetworkEndpointsRegionNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\'\n\x16network_endpoint_group\x18\x86\xcb\xf3\xce\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa4\x02\n\"ListNetworkFirewallPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9c\x02\n\x1aListNetworkProfilesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x95\x02\n\x13ListNetworksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xad\x02\n\x15ListNodeGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb2\x02\n\x18ListNodeTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xac\x02\n\x14ListNodeTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xcf\x02\n\x1aListNodesNodeGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb5\x02\n\x1bListPacketMirroringsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x80\x04\n ListPeeringRoutesNetworksRequest\x12\x19\n\tdirection\x18\xff\x8e\x80\x35 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x02\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x03\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0cpeering_name\x18\xaa\xd0\x80w \x01(\tH\x05\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x07\x88\x01\x01\"H\n\tDirection\x12\x17\n\x13UNDEFINED_DIRECTION\x10\x00\x12\x10\n\x08INCOMING\x10\xa6\xd0\xb7\xa1\x01\x12\x10\n\x08OUTGOING\x10\xec\xc6\xcc\x92\x01\x42\x0c\n\n_directionB\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x0f\n\r_peering_nameB\t\n\x07_regionB\x19\n\x17_return_partial_success\"\xf2\x02\n2ListPerInstanceConfigsInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xfa\x02\n8ListPerInstanceConfigsRegionInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb8\x02\n6ListPreconfiguredExpressionSetsSecurityPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa5\x02\n#ListPublicAdvertisedPrefixesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbc\x02\n\"ListPublicDelegatedPrefixesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xcf\x02\n\x1dListReferrersInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb6\x02\n\x1cListRegionAutoscalersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xba\x02\n ListRegionBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb6\x02\n\x1cListRegionCommitmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb4\x02\n\x1aListRegionDiskTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListRegionDisksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbe\x02\n$ListRegionHealthCheckServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb7\x02\n\x1dListRegionHealthChecksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc0\x02\n&ListRegionInstanceGroupManagersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb9\x02\n\x1fListRegionInstanceGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbc\x02\n\"ListRegionInstanceTemplatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbb\x02\n!ListRegionInstantSnapshotsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc0\x02\n&ListRegionNetworkEndpointGroupsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc2\x02\n(ListRegionNetworkFirewallPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc0\x02\n&ListRegionNotificationEndpointsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb5\x02\n\x1bListRegionOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbb\x02\n!ListRegionSecurityPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xba\x02\n ListRegionSslCertificatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb6\x02\n\x1cListRegionSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbc\x02\n\"ListRegionTargetHttpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbd\x02\n#ListRegionTargetHttpsProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xbb\x02\n!ListRegionTargetTcpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb2\x02\n\x18ListRegionUrlMapsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListRegionZonesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x94\x02\n\x12ListRegionsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd1\x02\n\x1cListReservationBlocksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd5\x02\n\x1fListReservationSubBlocksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x1c\n\x0bparent_name\x18\x80\x8a\x80\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xaf\x02\n\x17ListReservationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb5\x02\n\x1bListResourcePoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd1\x02\n\x1fListRoutePoliciesRoutersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xac\x02\n\x12ListRoutersRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x93\x02\n\x11ListRoutesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9d\x02\n\x1bListSecurityPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb7\x02\n\x1dListServiceAttachmentsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x96\x02\n\x14ListSnapshotsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9c\x02\n\x1aListSslCertificatesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x98\x02\n\x16ListSslPoliciesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb3\x02\n\x1bListStoragePoolTypesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xaf\x02\n\x17ListStoragePoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListSubnetworksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9e\x02\n\x1cListTargetGrpcProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9e\x02\n\x1cListTargetHttpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9f\x02\n\x1dListTargetHttpsProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb2\x02\n\x1aListTargetInstancesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb0\x02\n\x16ListTargetPoolsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9d\x02\n\x1bListTargetSslProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x9d\x02\n\x1bListTargetTcpProxiesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb6\x02\n\x1cListTargetVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x94\x02\n\x12ListUrlMapsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xa2\x02\n ListUsableBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xc0\x02\n&ListUsableRegionBackendServicesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xd4\x02\n\x1cListUsableSubnetworksRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12 \n\x0fservice_project\x18\x8f\xe7\x80\xfd\x01 \x01(\tH\x05\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_successB\x12\n\x10_service_project\"\xb0\x02\n\x16ListVpnGatewaysRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xaf\x02\n\x15ListVpnTunnelsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x8d\x03\n\x1bListXpnHostsProjectsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12n\n(projects_list_xpn_hosts_request_resource\x18\x97\xd0\xceq \x01(\x0b\x32\x34.google.cloud.compute.v1.ProjectsListXpnHostsRequestB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\xb1\x02\n\x19ListZoneOperationsRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x92\x02\n\x10ListZonesRequest\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bmax_results\x18\x9b\xc8\x8b\x1a \x01(\rH\x01\x88\x01\x01\x12\x18\n\x08order_by\x18\xe8\xfd\xc7L \x01(\tH\x02\x88\x01\x01\x12\x1a\n\npage_token\x18\xc9\xb0\xc4\t \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\'\n\x16return_partial_success\x18\xb6\xa4\xcf\xf6\x01 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_filterB\x0e\n\x0c_max_resultsB\x0b\n\t_order_byB\r\n\x0b_page_tokenB\x19\n\x17_return_partial_success\"\x8f\x01\n\tLocalDisk\x12\x1a\n\ndisk_count\x18\xed\xaf\x9dW \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x05H\x01\x88\x01\x01\x12\x19\n\tdisk_type\x18\x9c\xe9\xac, \x01(\tH\x02\x88\x01\x01\x42\r\n\x0b_disk_countB\x0f\n\r_disk_size_gbB\x0c\n\n_disk_type\"\\\n\x10LocalizedMessage\x12\x17\n\x06locale\x18\xda\x9c\xd8\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_localeB\n\n\x08_message\"\xd2\x02\n\x0eLocationPolicy\x12M\n\tlocations\x18\xde\xae\x91\xc5\x01 \x03(\x0b\x32\x36.google.cloud.compute.v1.LocationPolicy.LocationsEntry\x12\x1d\n\x0ctarget_shape\x18\xf3\xe6\xbb\xa1\x01 \x01(\tH\x00\x88\x01\x01\x1a\x61\n\x0eLocationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.LocationPolicyLocation:\x02\x38\x01\"^\n\x0bTargetShape\x12\x1a\n\x16UNDEFINED_TARGET_SHAPE\x10\x00\x12\t\n\x03\x41NY\x10\xcc\xfb\x03\x12\x16\n\x0f\x41NY_SINGLE_ZONE\x10\xd0\xa6\x91\x1d\x12\x10\n\x08\x42\x41LANCED\x10\x88\xba\xad\xdf\x01\x42\x0f\n\r_target_shape\"\x8e\x02\n\x16LocationPolicyLocation\x12W\n\x0b\x63onstraints\x18\xb6\xcc\xee\x01 \x01(\x0b\x32:.google.cloud.compute.v1.LocationPolicyLocationConstraintsH\x00\x88\x01\x01\x12\x1a\n\npreference\x18\xdb\xf9\xf2G \x01(\tH\x01\x88\x01\x01\"`\n\nPreference\x12\x18\n\x14UNDEFINED_PREFERENCE\x10\x00\x12\x0c\n\x05\x41LLOW\x10\xa9\xd6\xde\x1d\x12\n\n\x04\x44\x45NY\x10\x8c\xec\x7f\x12\x1e\n\x16PREFERENCE_UNSPECIFIED\x10\xb3\xeb\xce\xec\x01\x42\x0e\n\x0c_constraintsB\r\n\x0b_preference\"M\n!LocationPolicyLocationConstraints\x12\x1a\n\tmax_count\x18\xf4\xfc\x92\x89\x01 \x01(\x05H\x00\x88\x01\x01\x42\x0c\n\n_max_count\"\xe4\n\n\x0cMachineImage\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bguest_flush\x18\xdd\x93\xec\xb7\x01 \x01(\x08H\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12P\n\x13instance_properties\x18\x9d\x9e\xd8\x66 \x01(\x0b\x32+.google.cloud.compute.v1.InstancePropertiesH\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x06\x88\x01\x01\x12\x45\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x31.google.cloud.compute.v1.MachineImage.LabelsEntry\x12]\n\x1cmachine_image_encryption_key\x18\xff\xff\xe7\xfb\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\t\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\n\x88\x01\x01\x12;\n\x0bsaved_disks\x18\xbe\xed\xc0\xbd\x01 \x03(\x0b\x32\".google.cloud.compute.v1.SavedDisk\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0b\x88\x01\x01\x12Y\n\x1bsource_disk_encryption_keys\x18\xb2\xf8\xcf\xb0\x01 \x03(\x0b\x32\x30.google.cloud.compute.v1.SourceDiskEncryptionKey\x12 \n\x0fsource_instance\x18\xb9\x98\xfd\xbc\x01 \x01(\tH\x0c\x88\x01\x01\x12^\n\x1asource_instance_properties\x18\xf9\xd1\xcb\xe2\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.SourceInstancePropertiesH\r\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0e\x88\x01\x01\x12\x1d\n\x11storage_locations\x18\x9a\xed\xb3\x9c\x01 \x03(\t\x12#\n\x13total_storage_bytes\x18\xec\x87\x84\' \x01(\x03H\x0f\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"s\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x10\n\tUPLOADING\x10\xa1\x9c\xcd\x7f\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_guest_flushB\x05\n\x03_idB\x16\n\x14_instance_propertiesB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x1f\n\x1d_machine_image_encryption_keyB\x07\n\x05_nameB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x12\n\x10_source_instanceB\x1d\n\x1b_source_instance_propertiesB\t\n\x07_statusB\x16\n\x14_total_storage_bytes\"\xa9\x02\n\x10MachineImageList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x37\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32%.google.cloud.compute.v1.MachineImage\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa4\x07\n\x0bMachineType\x12?\n\x0c\x61\x63\x63\x65lerators\x18\xe8\xd6\xc5\x80\x01 \x03(\x0b\x32%.google.cloud.compute.v1.Accelerators\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nguest_cpus\x18\xd2\xcb\xc8\xbb\x01 \x01(\x05H\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x1e\n\x0eimage_space_gb\x18\x98\xf2\xf5# \x01(\x05H\x06\x88\x01\x01\x12\x1e\n\ris_shared_cpu\x18\x83\xda\xcf\xf8\x01 \x01(\x08H\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12)\n\x18maximum_persistent_disks\x18\x8d\xf6\xce\xec\x01 \x01(\x05H\t\x88\x01\x01\x12\x30\n maximum_persistent_disks_size_gb\x18\xa7\x95\xc8I \x01(\x03H\n\x88\x01\x01\x12\x19\n\tmemory_mb\x18\x93\x93\xa8\x37 \x01(\x05H\x0b\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0c\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0e\x88\x01\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\x42\x0f\n\r_architectureB\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\r\n\x0b_guest_cpusB\x05\n\x03_idB\x11\n\x0f_image_space_gbB\x10\n\x0e_is_shared_cpuB\x07\n\x05_kindB\x1b\n\x19_maximum_persistent_disksB#\n!_maximum_persistent_disks_size_gbB\x0c\n\n_memory_mbB\x07\n\x05_nameB\x0c\n\n_self_linkB\x07\n\x05_zone\"\xc2\x03\n\x19MachineTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12O\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32=.google.cloud.compute.v1.MachineTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a]\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.MachineTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa7\x02\n\x0fMachineTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x36\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32$.google.cloud.compute.v1.MachineType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x9f\x01\n\x16MachineTypesScopedList\x12>\n\rmachine_types\x18\x81\xdd\x81& \x03(\x0b\x32$.google.cloud.compute.v1.MachineType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xf2\n\n\x0fManagedInstance\x12\x1e\n\x0e\x63urrent_action\x18\xbc\xa7\x8dU \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x01\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x02\x88\x01\x01\x12S\n\x0finstance_health\x18\xc6\x92\xbc\xb6\x01 \x03(\x0b\x32\x36.google.cloud.compute.v1.ManagedInstanceInstanceHealth\x12\x1f\n\x0finstance_status\x18\xdc\xad\x9fS \x01(\tH\x03\x88\x01\x01\x12R\n\x0clast_attempt\x18\xa4\xac\xa8\xcf\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.ManagedInstanceLastAttemptH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12T\n\x1bpreserved_state_from_config\x18\xe2\xeb\x85/ \x01(\x0b\x32\'.google.cloud.compute.v1.PreservedStateH\x06\x88\x01\x01\x12U\n\x1bpreserved_state_from_policy\x18\xd2\xaf\xbe\xe0\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.PreservedStateH\x07\x88\x01\x01\x12{\n\"properties_from_flexibility_policy\x18\xc1\xc5\x94J \x01(\x0b\x32G.google.cloud.compute.v1.ManagedInstancePropertiesFromFlexibilityPolicyH\x08\x88\x01\x01\x12I\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\x0b\x32/.google.cloud.compute.v1.ManagedInstanceVersionH\t\x88\x01\x01\"\x85\x02\n\rCurrentAction\x12\x1c\n\x18UNDEFINED_CURRENT_ACTION\x10\x00\x12\x12\n\nABANDONING\x10\xcd\xca\x90\xb9\x01\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12 \n\x18\x43REATING_WITHOUT_RETRIES\x10\x89\xc6\xbe\xcc\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x12\n\nRECREATING\x10\xec\x8b\xfe\x88\x01\x12\x11\n\nREFRESHING\x10\xa7\xfe\xecM\x12\x12\n\nRESTARTING\x10\xf3\xee\xeb\x98\x01\x12\x10\n\x08RESUMING\x10\xaa\xfb\x89\xd5\x01\x12\x10\n\x08STARTING\x10\xc0\xa0\x8b\xe9\x01\x12\x10\n\tVERIFYING\x10\xa9\xc1\x8c\x08\"\xed\x01\n\x0eInstanceStatus\x12\x1d\n\x19UNDEFINED_INSTANCE_STATUS\x10\x00\x12\x16\n\x0e\x44\x45PROVISIONING\x10\xee\x93\xc4\xcc\x01\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x11\n\tREPAIRING\x10\x95\x82\x95\xc5\x01\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x12\x0f\n\x07STAGING\x10\x9b\xc8\xc6\xcd\x01\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x10\n\x08STOPPING\x10\xf4\xd0\xa2\xa7\x01\x12\x10\n\tSUSPENDED\x10\xbb\xbb\xb6\x18\x12\x12\n\nSUSPENDING\x10\xa6\xd4\x98\xf5\x01\x12\x11\n\nTERMINATED\x10\xa3\xf4\x9bwB\x11\n\x0f_current_actionB\x05\n\x03_idB\x0b\n\t_instanceB\x12\n\x10_instance_statusB\x0f\n\r_last_attemptB\x07\n\x05_nameB\x1e\n\x1c_preserved_state_from_configB\x1e\n\x1c_preserved_state_from_policyB%\n#_properties_from_flexibility_policyB\n\n\x08_version\"\xa6\x02\n\x1dManagedInstanceInstanceHealth\x12&\n\x15\x64\x65tailed_health_state\x18\x9d\xd0\xb4\xf3\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tH\x01\x88\x01\x01\"\x92\x01\n\x13\x44\x65tailedHealthState\x12#\n\x1fUNDEFINED_DETAILED_HEALTH_STATE\x10\x00\x12\x10\n\x08\x44RAINING\x10\xea\xd5\x8c\xe5\x01\x12\x0f\n\x07HEALTHY\x10\xfd\xaa\xdb\xd1\x01\x12\x0f\n\x07TIMEOUT\x10\xc1\xb2\xeb\xe3\x01\x12\x11\n\tUNHEALTHY\x10\xc4\xb9\xad\xdc\x01\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\x42\x18\n\x16_detailed_health_stateB\x0f\n\r_health_check\"{\n\x1aManagedInstanceLastAttempt\x12R\n\x06\x65rrors\x18\xeb\xde\xd5\x96\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.ManagedInstanceLastAttemptErrorsH\x00\x88\x01\x01\x42\t\n\x07_errors\"W\n ManagedInstanceLastAttemptErrors\x12\x33\n\x06\x65rrors\x18\xeb\xde\xd5\x96\x01 \x03(\x0b\x32\x1f.google.cloud.compute.v1.Errors\"_\n.ManagedInstancePropertiesFromFlexibilityPolicy\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_machine_type\"q\n\x16ManagedInstanceVersion\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x14\n\x12_instance_templateB\x07\n\x05_name\"\x88\x01\n\x08Metadata\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x30\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1e.google.cloud.compute.v1.Items\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_fingerprintB\x07\n\x05_kind\"\x8f\x02\n\x0eMetadataFilter\x12L\n\rfilter_labels\x18\xa6\xf5\xe8\x92\x01 \x03(\x0b\x32\x31.google.cloud.compute.v1.MetadataFilterLabelMatch\x12%\n\x15\x66ilter_match_criteria\x18\xc0\xd0\xb6r \x01(\tH\x00\x88\x01\x01\"n\n\x13\x46ilterMatchCriteria\x12#\n\x1fUNDEFINED_FILTER_MATCH_CRITERIA\x10\x00\x12\x10\n\tMATCH_ALL\x10\xe7\xe7\x92V\x12\x10\n\tMATCH_ANY\x10\xb2\xe8\x92V\x12\x0e\n\x07NOT_SET\x10\xb6\x99\x84NB\x18\n\x16_filter_match_criteria\"Z\n\x18MetadataFilterLabelMatch\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\x08\n\x06_value\"\x8b\x02\n\x12MoveAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12l\n®ion_addresses_move_request_resource\x18\xc4\xb0\x88\xc3\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.RegionAddressesMoveRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbd\x01\n\x16MoveDiskProjectRequest\x12U\n\x1a\x64isk_move_request_resource\x18\xca\xc2\xa0\x95\x01 \x01(\x0b\x32(.google.cloud.compute.v1.DiskMoveRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x90\x01\n\x19MoveFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12&\n\tparent_id\x18\xd0\xe1\x9a\xdb\x01 \x01(\tB\x0f\xe0\x41\x02\xf2G\tparent_id\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf0\x01\n\x18MoveGlobalAddressRequest\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tB\x03\xe0\x41\x02\x12l\n&global_addresses_move_request_resource\x18\xf3\xf1\xb1\x90\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.GlobalAddressesMoveRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc9\x01\n\x1aMoveInstanceProjectRequest\x12]\n\x1einstance_move_request_resource\x18\xc2\xbc\xce\x94\x01 \x01(\x0b\x32,.google.cloud.compute.v1.InstanceMoveRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"I\n\tNamedPort\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x01\x88\x01\x01\x42\x07\n\x05_nameB\x07\n\x05_port\"\x88\x01\n\tNatIpInfo\x12S\n\x14nat_ip_info_mappings\x18\x9c\x80\x8es \x03(\x0b\x32\x32.google.cloud.compute.v1.NatIpInfoNatIpInfoMapping\x12\x19\n\x08nat_name\x18\xe9\xad\xf8\xca\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_nat_name\"\xf2\x01\n\x19NatIpInfoNatIpInfoMapping\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06nat_ip\x18\x85\xd2\x88\n \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05usage\x18\xa1\xfb\x99\x35 \x01(\tH\x02\x88\x01\x01\"5\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\n\n\x04\x41UTO\x10\xaf\xab{\x12\r\n\x06MANUAL\x10\xc6\xb7\xf7\x38\";\n\x05Usage\x12\x13\n\x0fUNDEFINED_USAGE\x10\x00\x12\r\n\x06IN_USE\x10\xcd\xce\xa5\x08\x12\x0e\n\x06UNUSED\x10\xd6\xf3\xfb\xab\x01\x42\x07\n\x05_modeB\t\n\x07_nat_ipB\x08\n\x06_usage\"J\n\x11NatIpInfoResponse\x12\x35\n\x06result\x18\x9d\x90\xb7\x42 \x03(\x0b\x32\".google.cloud.compute.v1.NatIpInfo\"\xed\t\n\x07Network\x12\x1b\n\x0bI_pv4_range\x18\xb6\xb0\x9f\x1c \x01(\tH\x00\x88\x01\x01\x12\'\n\x17\x61uto_create_subnetworks\x18\x92\xc8\x92z \x01(\x08H\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12)\n\x18\x65nable_ula_internal_ipv6\x18\x98\x8f\x88\xca\x01 \x01(\x08H\x04\x88\x01\x01\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tH\x05\x88\x01\x01\x12\x1d\n\rgateway_i_pv4\x18\xdd\xd8\x99U \x01(\tH\x06\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12$\n\x13internal_ipv6_range\x18\xa7\xcf\xa6\x84\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\t\x88\x01\x01\x12\x12\n\x03mtu\x18\xae\xcf\x06 \x01(\x05H\n\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0b\x88\x01\x01\x12\x39\n)network_firewall_policy_enforcement_order\x18\xd0\x82\x8d\x03 \x01(\tH\x0c\x88\x01\x01\x12\x1f\n\x0fnetwork_profile\x18\x98\xf9\xc5R \x01(\tH\r\x88\x01\x01\x12>\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32&.google.cloud.compute.v1.NetworkParamsH\x0e\x88\x01\x01\x12<\n\x08peerings\x18\xb3\xaa\xa9! \x03(\x0b\x32\'.google.cloud.compute.v1.NetworkPeering\x12N\n\x0erouting_config\x18\xdb\xa9\xd3\xf9\x01 \x01(\x0b\x32-.google.cloud.compute.v1.NetworkRoutingConfigH\x0f\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x10\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x11\x88\x01\x01\x12\x17\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\t\"\xa0\x01\n%NetworkFirewallPolicyEnforcementOrder\x12\x37\n3UNDEFINED_NETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDER\x10\x00\x12\x1d\n\x16\x41\x46TER_CLASSIC_FIREWALL\x10\xd0\xfc\xdaI\x12\x1f\n\x17\x42\x45\x46ORE_CLASSIC_FIREWALL\x10\xed\xed\xb1\xa1\x01\x42\x0e\n\x0c_I_pv4_rangeB\x1a\n\x18_auto_create_subnetworksB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x1b\n\x19_enable_ula_internal_ipv6B\x12\n\x10_firewall_policyB\x10\n\x0e_gateway_i_pv4B\x05\n\x03_idB\x16\n\x14_internal_ipv6_rangeB\x07\n\x05_kindB\x06\n\x04_mtuB\x07\n\x05_nameB,\n*_network_firewall_policy_enforcement_orderB\x12\n\x10_network_profileB\t\n\x07_paramsB\x11\n\x0f_routing_configB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_id\"\xa7\x06\n\x11NetworkAttachment\x12]\n\x14\x63onnection_endpoints\x18\xdd\xa2\xbe\x9b\x01 \x03(\x0b\x32;.google.cloud.compute.v1.NetworkAttachmentConnectedEndpoint\x12&\n\x15\x63onnection_preference\x18\xdc\xf9\xa4\x88\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12 \n\x15producer_accept_lists\x18\xab\x9a\xda` \x03(\t\x12 \n\x15producer_reject_lists\x18\x82\xfd\xfa\x01 \x03(\t\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\n\x88\x01\x01\x12\x17\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\t\"|\n\x14\x43onnectionPreference\x12#\n\x1fUNDEFINED_CONNECTION_PREFERENCE\x10\x00\x12\x17\n\x10\x41\x43\x43\x45PT_AUTOMATIC\x10\x94\xf7\xf0#\x12\x15\n\rACCEPT_MANUAL\x10\xdd\xed\xf1\xb1\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x42\x18\n\x16_connection_preferenceB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_id\"\xbb\x03\n\x1fNetworkAttachmentAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12U\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x43.google.cloud.compute.v1.NetworkAttachmentAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x63\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.google.cloud.compute.v1.NetworkAttachmentsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x87\x04\n\"NetworkAttachmentConnectedEndpoint\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x11project_id_or_num\x18\xa8\x8a\xe5\xa6\x01 \x01(\tH\x02\x88\x01\x01\x12#\n\x18secondary_ip_cidr_ranges\x18\x94\xb2\xf0\x37 \x03(\t\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x04\x88\x01\x01\x12&\n\x15subnetwork_cidr_range\x18\xa3\xdb\xdf\xb6\x01 \x01(\tH\x05\x88\x01\x01\"\x94\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x12\x17\n\x0fNEEDS_ATTENTION\x10\xbc\x8b\xa2\xa4\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x14\n\x12_project_id_or_numB\t\n\x07_statusB\r\n\x0b_subnetworkB\x18\n\x16_subnetwork_cidr_range\"\xb3\x02\n\x15NetworkAttachmentList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.NetworkAttachment\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb2\x01\n\x1cNetworkAttachmentsScopedList\x12K\n\x13network_attachments\x18\x9f\xde\xd6\xf8\x01 \x03(\x0b\x32*.google.cloud.compute.v1.NetworkAttachment\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xc4\x03\n\x1aNetworkEdgeSecurityService\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\t\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x12\n\x10_security_policyB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_id\"\x8e\x04\n(NetworkEdgeSecurityServiceAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12^\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32L.google.cloud.compute.v1.NetworkEdgeSecurityServiceAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1al\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xce\x01\n%NetworkEdgeSecurityServicesScopedList\x12^\n\x1enetwork_edge_security_services\x18\xac\xcb\xf8\x10 \x03(\x0b\x32\x33.google.cloud.compute.v1.NetworkEdgeSecurityService\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x9e\x03\n\x0fNetworkEndpoint\x12Q\n\x0b\x61nnotations\x18\xa4\xf6\xb5\x35 \x03(\x0b\x32\x39.google.cloud.compute.v1.NetworkEndpoint.AnnotationsEntry\x12\'\n\x17\x63lient_destination_port\x18\x86\x88\x82; \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x04\x66qdn\x18\x95\xa5\xc0\x01 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x03\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x05\x88\x01\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1a\n\x18_client_destination_portB\x07\n\x05_fqdnB\x0b\n\t_instanceB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x07\n\x05_port\"\x89\x0b\n\x14NetworkEndpointGroup\x12V\n\x0b\x61nnotations\x18\xa4\xf6\xb5\x35 \x03(\x0b\x32>.google.cloud.compute.v1.NetworkEndpointGroup.AnnotationsEntry\x12S\n\napp_engine\x18\xa0\x8c\xc0\xa2\x01 \x01(\x0b\x32\x36.google.cloud.compute.v1.NetworkEndpointGroupAppEngineH\x00\x88\x01\x01\x12[\n\x0e\x63loud_function\x18\xa2\xe5\xf3\xf7\x01 \x01(\x0b\x32:.google.cloud.compute.v1.NetworkEndpointGroupCloudFunctionH\x01\x88\x01\x01\x12P\n\tcloud_run\x18\x81\xcb\xfa\x34 \x01(\x0b\x32\x35.google.cloud.compute.v1.NetworkEndpointGroupCloudRunH\x02\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x03\x88\x01\x01\x12\x1d\n\x0c\x64\x65\x66\x61ult_port\x18\xbf\xf7\xf0\xc9\x01 \x01(\x05H\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\t\x88\x01\x01\x12%\n\x15network_endpoint_type\x18\xd3\xc6\xb4\x38 \x01(\tH\n\x88\x01\x01\x12N\n\x08psc_data\x18\xc9\xdb\xa6\" \x01(\x0b\x32\x34.google.cloud.compute.v1.NetworkEndpointGroupPscDataH\x0b\x88\x01\x01\x12#\n\x12psc_target_service\x18\xe6\xc2\xaa\x80\x01 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\r\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0e\x88\x01\x01\x12\x14\n\x04size\x18\x81\xc0\xd7\x01 \x01(\x05H\x0f\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x10\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x11\x88\x01\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x02\n\x13NetworkEndpointType\x12#\n\x1fUNDEFINED_NETWORK_ENDPOINT_TYPE\x10\x00\x12\x11\n\tGCE_VM_IP\x10\xd9\xed\xd0\xbf\x01\x12\x16\n\x0eGCE_VM_IP_PORT\x10\xa7\xe4\xa5\xef\x01\x12\x18\n\x11GCE_VM_IP_PORTMAP\x10\xb5\xe3\xf0\n\x12\x1a\n\x12INTERNET_FQDN_PORT\x10\xed\xd0\xdb\xc0\x01\x12\x18\n\x10INTERNET_IP_PORT\x10\x9b\xdb\xe5\xe3\x01\x12\x1f\n\x17NON_GCP_PRIVATE_IP_PORT\x10\xe0\x93\xb7\xa0\x01\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x12\n\nSERVERLESS\x10\xdc\xc6\xfd\x80\x01\x42\r\n\x0b_app_engineB\x11\n\x0f_cloud_functionB\x0c\n\n_cloud_runB\x15\n\x13_creation_timestampB\x0f\n\r_default_portB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\x18\n\x16_network_endpoint_typeB\x0b\n\t_psc_dataB\x15\n\x13_psc_target_serviceB\t\n\x07_regionB\x0c\n\n_self_linkB\x07\n\x05_sizeB\r\n\x0b_subnetworkB\x07\n\x05_zone\"\xdd\x03\n\"NetworkEndpointGroupAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12X\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x46.google.cloud.compute.v1.NetworkEndpointGroupAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x66\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.compute.v1.NetworkEndpointGroupsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x92\x01\n\x1dNetworkEndpointGroupAppEngine\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08url_mask\x18\xbc\x8f\xa4\x31 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\tH\x02\x88\x01\x01\x42\n\n\x08_serviceB\x0b\n\t_url_maskB\n\n\x08_version\"r\n!NetworkEndpointGroupCloudFunction\x12\x19\n\x08\x66unction\x18\xd8\xe7\xbd\x92\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08url_mask\x18\xbc\x8f\xa4\x31 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_functionB\x0b\n\t_url_mask\"\x87\x01\n\x1cNetworkEndpointGroupCloudRun\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03tag\x18\x9a\xff\x06 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x08url_mask\x18\xbc\x8f\xa4\x31 \x01(\tH\x02\x88\x01\x01\x42\n\n\x08_serviceB\x06\n\x04_tagB\x0b\n\t_url_mask\"\xb9\x02\n\x18NetworkEndpointGroupList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroup\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbd\x03\n\x1bNetworkEndpointGroupPscData\x12%\n\x14\x63onsumer_psc_address\x18\xac\xad\xeb\xd7\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\rproducer_port\x18\x8e\xda\xc1\xc3\x01 \x01(\x05H\x01\x88\x01\x01\x12\"\n\x11psc_connection_id\x18\xdd\xa5\xa3\x8b\x01 \x01(\x04H\x02\x88\x01\x01\x12%\n\x15psc_connection_status\x18\xb4\xc9\xe7W \x01(\tH\x03\x88\x01\x01\"\xb0\x01\n\x13PscConnectionStatus\x12#\n\x1fUNDEFINED_PSC_CONNECTION_STATUS\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x12\x17\n\x0fNEEDS_ATTENTION\x10\xbc\x8b\xa2\xa4\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\x17\n\x15_consumer_psc_addressB\x10\n\x0e_producer_portB\x14\n\x12_psc_connection_idB\x18\n\x16_psc_connection_status\"u\n+NetworkEndpointGroupsAttachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"u\n+NetworkEndpointGroupsDetachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"\xa4\x01\n)NetworkEndpointGroupsListEndpointsRequest\x12\x1e\n\rhealth_status\x18\xb5\xd6\xba\xb5\x01 \x01(\tH\x00\x88\x01\x01\"E\n\x0cHealthStatus\x12\x1b\n\x17UNDEFINED_HEALTH_STATUS\x10\x00\x12\x0b\n\x04SHOW\x10\xfd\xa5\x9b\x01\x12\x0b\n\x04SKIP\x10\xff\xba\x9b\x01\x42\x10\n\x0e_health_status\"\xab\x02\n)NetworkEndpointGroupsListNetworkEndpoints\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12J\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x38.google.cloud.compute.v1.NetworkEndpointWithHealthStatus\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x03\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\n\n\x08_warning\"\xbb\x01\n\x1fNetworkEndpointGroupsScopedList\x12Q\n\x17network_endpoint_groups\x18\xad\x97\xff\r \x03(\x0b\x32-.google.cloud.compute.v1.NetworkEndpointGroup\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xcf\x01\n\x1fNetworkEndpointWithHealthStatus\x12K\n\x07healths\x18\x97\x93\xad{ \x03(\x0b\x32\x37.google.cloud.compute.v1.HealthStatusForNetworkEndpoint\x12J\n\x10network_endpoint\x18\x86\x91\x8a\x1b \x01(\x0b\x32(.google.cloud.compute.v1.NetworkEndpointH\x00\x88\x01\x01\x42\x13\n\x11_network_endpoint\"\xda\x03\n#NetworkFirewallPolicyAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12Y\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32G.google.cloud.compute.v1.NetworkFirewallPolicyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.FirewallPoliciesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbd\t\n\x10NetworkInterface\x12@\n\x0e\x61\x63\x63\x65ss_configs\x18\x96\xbb\xfa\x34 \x03(\x0b\x32%.google.cloud.compute.v1.AccessConfig\x12\x41\n\x0f\x61lias_ip_ranges\x18\xbf\x83\xdcN \x03(\x0b\x32%.google.cloud.compute.v1.AliasIpRange\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12+\n\x1binternal_ipv6_prefix_length\x18\x9d\x83\x99\x61 \x01(\x05H\x01\x88\x01\x01\x12\x46\n\x13ipv6_access_configs\x18\xee\xe5\xc4\xe6\x01 \x03(\x0b\x32%.google.cloud.compute.v1.AccessConfig\x12!\n\x10ipv6_access_type\x18\xdd\xf5\xd1\xf0\x01 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x06\x88\x01\x01\x12\"\n\x12network_attachment\x18\xd4\x97\x8fk \x01(\tH\x07\x88\x01\x01\x12\x1b\n\x0bnetwork_i_p\x18\x89\xb1\xe5\x62 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x08nic_type\x18\x91\xc6\xc2\x1c \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0bqueue_count\x18\xe1\xf8\x97\xf0\x01 \x01(\x05H\n\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\x0b\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x0c\x88\x01\x01\"y\n\x0eIpv6AccessType\x12\x1e\n\x1aUNDEFINED_IPV6_ACCESS_TYPE\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12$\n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\xa5\xf6\xa4\x95\x01\"\x89\x01\n\x07NicType\x12\x16\n\x12UNDEFINED_NIC_TYPE\x10\x00\x12\x0c\n\x05GVNIC\x10\x99\x95\xc3 \x12\x0b\n\x04IDPF\x10\xd1\xf0\x88\x01\x12\x0c\n\x05IRDMA\x10\x8f\x86\xac!\x12\x0c\n\x05MRDMA\x10\x93\xc2\x8d#\x12\x1b\n\x14UNSPECIFIED_NIC_TYPE\x10\xd9\xbe\x92 \x12\x12\n\nVIRTIO_NET\x10\xd9\xb6\xcb\xd7\x01\"{\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%\x12\x1e\n\x16UNSPECIFIED_STACK_TYPE\x10\xd9\xd1\x91\x8e\x01\x42\x0e\n\x0c_fingerprintB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x13\n\x11_ipv6_access_typeB\x0f\n\r_ipv6_addressB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\x15\n\x13_network_attachmentB\x0e\n\x0c_network_i_pB\x0b\n\t_nic_typeB\x0e\n\x0c_queue_countB\r\n\x0b_stack_typeB\r\n\x0b_subnetwork\"\x9f\x02\n\x0bNetworkList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x32\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32 .google.cloud.compute.v1.Network\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x01\n\rNetworkParams\x12\x62\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32?.google.cloud.compute.v1.NetworkParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xce\x08\n\x0eNetworkPeering\x12\"\n\x12\x61uto_create_routes\x18\xdd\xe2\xb2\x1b \x01(\x08H\x00\x88\x01\x01\x12[\n\x11\x63onnection_status\x18\xf3\xf0\xd1\xfa\x01 \x01(\x0b\x32\x37.google.cloud.compute.v1.NetworkPeeringConnectionStatusH\x01\x88\x01\x01\x12&\n\x16\x65xchange_subnet_routes\x18\xd0\xca\xc6\x0c \x01(\x08H\x02\x88\x01\x01\x12$\n\x14\x65xport_custom_routes\x18\x8d\xa5\xdf\x1c \x01(\x08H\x03\x88\x01\x01\x12\x33\n#export_subnet_routes_with_public_ip\x18\xe2\xea\xd9. \x01(\x08H\x04\x88\x01\x01\x12$\n\x14import_custom_routes\x18\xbe\xf1\xb3^ \x01(\x08H\x05\x88\x01\x01\x12\x33\n#import_subnet_routes_with_public_ip\x18\x91\x8e\xf0\x06 \x01(\x08H\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x08\x88\x01\x01\x12\x18\n\x08peer_mtu\x18\xd1\x8e\x97! \x01(\x05H\t\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\n\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x0b\x88\x01\x01\x12\x1d\n\rstate_details\x18\x94\xf9\xc8- \x01(\tH\x0c\x88\x01\x01\x12\x1f\n\x0fupdate_strategy\x18\xa9\xdc\xf5\x02 \x01(\tH\r\x88\x01\x01\"I\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\">\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08INACTIVE\x10\xeb\x98\xf9\x80\x01\"j\n\x0eUpdateStrategy\x12\x1d\n\x19UNDEFINED_UPDATE_STRATEGY\x10\x00\x12\x10\n\tCONSENSUS\x10\xd7\xf8\xfc`\x12\x12\n\x0bINDEPENDENT\x10\xda\x96\xc8<\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x15\n\x13_auto_create_routesB\x14\n\x12_connection_statusB\x19\n\x17_exchange_subnet_routesB\x17\n\x15_export_custom_routesB&\n$_export_subnet_routes_with_public_ipB\x17\n\x15_import_custom_routesB&\n$_import_subnet_routes_with_public_ipB\x07\n\x05_nameB\n\n\x08_networkB\x0b\n\t_peer_mtuB\r\n\x0b_stack_typeB\x08\n\x06_stateB\x10\n\x0e_state_detailsB\x12\n\x10_update_strategy\"\xcc\x03\n\x1eNetworkPeeringConnectionStatus\x12g\n\x0f\x63onsensus_state\x18\xc9\xbd\x8b\xb5\x01 \x01(\x0b\x32\x45.google.cloud.compute.v1.NetworkPeeringConnectionStatusConsensusStateH\x00\x88\x01\x01\x12r\n\x15traffic_configuration\x18\xb4\xd4\xb6? \x01(\x0b\x32K.google.cloud.compute.v1.NetworkPeeringConnectionStatusTrafficConfigurationH\x01\x88\x01\x01\x12\x1f\n\x0fupdate_strategy\x18\xa9\xdc\xf5\x02 \x01(\tH\x02\x88\x01\x01\"j\n\x0eUpdateStrategy\x12\x1d\n\x19UNDEFINED_UPDATE_STRATEGY\x10\x00\x12\x10\n\tCONSENSUS\x10\xd7\xf8\xfc`\x12\x12\n\x0bINDEPENDENT\x10\xda\x96\xc8<\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x12\n\x10_consensus_stateB\x18\n\x16_traffic_configurationB\x12\n\x10_update_strategy\"\xe6\x03\n,NetworkPeeringConnectionStatusConsensusState\x12\x1e\n\rdelete_status\x18\x86\xc2\xc2\xe6\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\rupdate_status\x18\xa8\xa0\xeb~ \x01(\tH\x01\x88\x01\x01\"\xa8\x01\n\x0c\x44\x65leteStatus\x12\x1b\n\x17UNDEFINED_DELETE_STATUS\x10\x00\x12\x1b\n\x13\x44\x45LETE_ACKNOWLEDGED\x10\xdc\xae\x8e\x9b\x01\x12!\n\x19\x44\x45LETE_STATUS_UNSPECIFIED\x10\xde\x8a\xc5\xbc\x01\x12\x1d\n\x16LOCAL_DELETE_REQUESTED\x10\xae\xb8\xb3l\x12\x1c\n\x15PEER_DELETE_REQUESTED\x10\xf7\xd5\xab^\"\xa7\x01\n\x0cUpdateStatus\x12\x1b\n\x17UNDEFINED_UPDATE_STATUS\x10\x00\x12\x0e\n\x07IN_SYNC\x10\xf5\xe2\x8a\x01\x12\"\n\x1bPENDING_LOCAL_ACKNOWLEDMENT\x10\xc0\xcd\xd1m\x12$\n\x1cPENDING_PEER_ACKNOWLEDGEMENT\x10\xc5\x8d\xae\xc8\x01\x12 \n\x19UPDATE_STATUS_UNSPECIFIED\x10\x80\xa3\xcf\x39\x42\x10\n\x0e_delete_statusB\x10\n\x0e_update_status\"\xad\x04\n2NetworkPeeringConnectionStatusTrafficConfiguration\x12-\n\x1c\x65xport_custom_routes_to_peer\x18\xf4\x99\xca\x88\x01 \x01(\x08H\x00\x88\x01\x01\x12;\n+export_subnet_routes_with_public_ip_to_peer\x18\xc9\x95\xfe\x03 \x01(\x08H\x01\x88\x01\x01\x12/\n\x1eimport_custom_routes_from_peer\x18\x96\xd5\x87\xbe\x01 \x01(\x08H\x02\x88\x01\x01\x12=\n-import_subnet_routes_with_public_ip_from_peer\x18\xa9\xda\xf5o \x01(\x08H\x03\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\x04\x88\x01\x01\"I\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\nB\x1f\n\x1d_export_custom_routes_to_peerB.\n,_export_subnet_routes_with_public_ip_to_peerB!\n\x1f_import_custom_routes_from_peerB0\n._import_subnet_routes_with_public_ip_from_peerB\r\n\x0b_stack_type\"\xce\x01\n\x18NetworkPerformanceConfig\x12+\n\x1btotal_egress_bandwidth_tier\x18\xff\x9f\x85> \x01(\tH\x00\x88\x01\x01\"e\n\x18TotalEgressBandwidthTier\x12)\n%UNDEFINED_TOTAL_EGRESS_BANDWIDTH_TIER\x10\x00\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\x12\x0e\n\x06TIER_1\x10\x94\xca\xf1\x9b\x01\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\x8a\x04\n\x0eNetworkProfile\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12P\n\x08\x66\x65\x61tures\x18\xbd\xc8\xb3u \x01(\x0b\x32\x36.google.cloud.compute.v1.NetworkProfileNetworkFeaturesH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12J\n\x08location\x18\xb5\xbf\xbe\x8a\x01 \x01(\x0b\x32/.google.cloud.compute.v1.NetworkProfileLocationH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\t\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0b\n\t_featuresB\x05\n\x03_idB\x07\n\x05_kindB\x0b\n\t_locationB\x07\n\x05_nameB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x07\n\x05_zone\"\x92\x01\n\x16NetworkProfileLocation\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05scope\x18\xd4\xfc\x8c\x34 \x01(\tH\x01\x88\x01\x01\"8\n\x05Scope\x12\x13\n\x0fUNDEFINED_SCOPE\x10\x00\x12\r\n\x06REGION\x10\xf4\xb5\xec~\x12\x0b\n\x04ZONE\x10\xac\xb7\xa8\x01\x42\x07\n\x05_nameB\x08\n\x06_scope\"\xfe(\n\x1dNetworkProfileNetworkFeatures\x12\x1c\n\x10\x61\x64\x64ress_purposes\x18\x80\xde\xbd\xce\x01 \x03(\t\x12&\n\x15\x61llow_alias_ip_ranges\x18\xc9\x91\xb1\xda\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x16\x61llow_auto_mode_subnet\x18\x9f\x82\xc9H \x01(\tH\x01\x88\x01\x01\x12\'\n\x17\x61llow_class_d_firewalls\x18\x9b\xe3\xe0> \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0f\x61llow_cloud_nat\x18\xa1\xd5\xc1y \x01(\tH\x03\x88\x01\x01\x12#\n\x12\x61llow_cloud_router\x18\xc9\xcb\x8d\xd7\x01 \x01(\tH\x04\x88\x01\x01\x12,\n\x1c\x61llow_default_nic_attachment\x18\xae\xee\xda\x19 \x01(\tH\x05\x88\x01\x01\x12(\n\x18\x61llow_external_ip_access\x18\xbe\xb9\xdc> \x01(\tH\x06\x88\x01\x01\x12#\n\x12\x61llow_interconnect\x18\xc4\x93\xe1\x85\x01 \x01(\tH\x07\x88\x01\x01\x12$\n\x13\x61llow_ip_forwarding\x18\x9f\xdd\xe8\xee\x01 \x01(\tH\x08\x88\x01\x01\x12$\n\x14\x61llow_load_balancing\x18\xb6\x98\xc1j \x01(\tH\t\x88\x01\x01\x12/\n\x1f\x61llow_multi_nic_in_same_network\x18\xfc\xb4\x8a* \x01(\tH\n\x88\x01\x01\x12\x1a\n\tallow_ncc\x18\xd8\xde\xc6\xb1\x01 \x01(\tH\x0b\x88\x01\x01\x12\'\n\x17\x61llow_network_migration\x18\x87\xa7\x9fr \x01(\tH\x0c\x88\x01\x01\x12\'\n\x16\x61llow_packet_mirroring\x18\x82\xee\x9f\xf4\x01 \x01(\tH\r\x88\x01\x01\x12,\n\x1b\x61llow_private_google_access\x18\xf8\xff\xd5\xb2\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1a\n\tallow_psc\x18\xca\xf1\xc6\xb1\x01 \x01(\tH\x0f\x88\x01\x01\x12*\n\x1a\x61llow_same_network_unicast\x18\xfb\xa8\xf1O \x01(\tH\x10\x88\x01\x01\x12#\n\x13\x61llow_static_routes\x18\xc5\x9f\xabX \x01(\tH\x11\x88\x01\x01\x12$\n\x14\x61llow_sub_interfaces\x18\xef\xb2\xf0u \x01(\tH\x12\x88\x01\x01\x12!\n\x11\x61llow_vpc_peering\x18\xf4\xcb\x83\x37 \x01(\tH\x13\x88\x01\x01\x12\x1a\n\tallow_vpn\x18\xfe\x9d\xc7\xb1\x01 \x01(\tH\x14\x88\x01\x01\x12\x1a\n\x0finterface_types\x18\xf3\xb3\xaaK \x03(\t\x12\x1b\n\x0fsubnet_purposes\x18\xb7\x9b\xd8\x8f\x01 \x03(\t\x12\x1e\n\x12subnet_stack_types\x18\xa0\xec\xb7\xf8\x01 \x03(\t\x12\x1f\n\x13subnetwork_purposes\x18\xc6\xa0\xf1\xfb\x01 \x03(\t\x12\"\n\x16subnetwork_stack_types\x18\xb1\xea\xa5\xd0\x01 \x03(\t\x12\x17\n\x07unicast\x18\xaf\x90\x91w \x01(\tH\x15\x88\x01\x01\"\xf3\x01\n\x0f\x41\x64\x64ressPurposes\x12\x1e\n\x1aUNDEFINED_ADDRESS_PURPOSES\x10\x00\x12\x14\n\x0c\x44NS_RESOLVER\x10\xfc\xdc\x83\xe3\x01\x12\x13\n\x0cGCE_ENDPOINT\x10\xab\xc4\xf5m\x12\x1a\n\x12IPSEC_INTERCONNECT\x10\x83\xd2\xaa\xa2\x01\x12\x0f\n\x08NAT_AUTO\x10\xad\xb4\x85N\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x12\n\nSERVERLESS\x10\xdc\xc6\xfd\x80\x01\x12\x1f\n\x17SHARED_LOADBALANCER_VIP\x10\xd4\xd3\xb3\x8c\x01\x12\x13\n\x0bVPC_PEERING\x10\xaa\xf3\x8e\xbf\x01\"{\n\x12\x41llowAliasIpRanges\x12#\n\x1fUNDEFINED_ALLOW_ALIAS_IP_RANGES\x10\x00\x12\x1f\n\x17\x41LIAS_IP_RANGES_ALLOWED\x10\xe8\x9d\xd5\xdd\x01\x12\x1f\n\x17\x41LIAS_IP_RANGES_BLOCKED\x10\xac\xde\x80\x86\x01\"~\n\x13\x41llowAutoModeSubnet\x12$\n UNDEFINED_ALLOW_AUTO_MODE_SUBNET\x10\x00\x12 \n\x18\x41UTO_MODE_SUBNET_ALLOWED\x10\xb2\xac\xbb\xba\x01\x12\x1f\n\x18\x41UTO_MODE_SUBNET_BLOCKED\x10\xf6\xec\xe6\x62\"\x82\x01\n\x14\x41llowClassDFirewalls\x12%\n!UNDEFINED_ALLOW_CLASS_D_FIREWALLS\x10\x00\x12!\n\x19\x43LASS_D_FIREWALLS_ALLOWED\x10\xfa\xcf\x85\xa6\x01\x12 \n\x19\x43LASS_D_FIREWALLS_BLOCKED\x10\xbe\x90\xb1N\"b\n\rAllowCloudNat\x12\x1d\n\x19UNDEFINED_ALLOW_CLOUD_NAT\x10\x00\x12\x18\n\x11\x43LOUD_NAT_ALLOWED\x10\xa0\xba\xa2u\x12\x18\n\x11\x43LOUD_NAT_BLOCKED\x10\xe4\xfa\xcd\x1d\"o\n\x10\x41llowCloudRouter\x12 \n\x1cUNDEFINED_ALLOW_CLOUD_ROUTER\x10\x00\x12\x1c\n\x14\x43LOUD_ROUTER_ALLOWED\x10\xfc\xc3\x9d\xae\x01\x12\x1b\n\x14\x43LOUD_ROUTER_BLOCKED\x10\xc0\x84\xc9V\"\x96\x01\n\x19\x41llowDefaultNicAttachment\x12*\n&UNDEFINED_ALLOW_DEFAULT_NIC_ATTACHMENT\x10\x00\x12%\n\x1e\x44\x45\x46\x41ULT_NIC_ATTACHMENT_ALLOWED\x10\x81\x9c\xc2\x05\x12&\n\x1e\x44\x45\x46\x41ULT_NIC_ATTACHMENT_BLOCKED\x10\xc5\xdc\xed\xad\x01\"\x86\x01\n\x15\x41llowExternalIpAccess\x12&\n\"UNDEFINED_ALLOW_EXTERNAL_IP_ACCESS\x10\x00\x12!\n\x1a\x45XTERNAL_IP_ACCESS_ALLOWED\x10\xd1\x98\x9d\x34\x12\"\n\x1a\x45XTERNAL_IP_ACCESS_BLOCKED\x10\x95\xd9\xc8\xdc\x01\"p\n\x11\x41llowInterconnect\x12 \n\x1cUNDEFINED_ALLOW_INTERCONNECT\x10\x00\x12\x1b\n\x14INTERCONNECT_ALLOWED\x10\xd7\xa5\xd3M\x12\x1c\n\x14INTERCONNECT_BLOCKED\x10\x9b\xe6\xfe\xf5\x01\"s\n\x11\x41llowIpForwarding\x12!\n\x1dUNDEFINED_ALLOW_IP_FORWARDING\x10\x00\x12\x1c\n\x15IP_FORWARDING_ALLOWED\x10\xde\xd8\xe1H\x12\x1d\n\x15IP_FORWARDING_BLOCKED\x10\xa2\x99\x8d\xf1\x01\"w\n\x12\x41llowLoadBalancing\x12\"\n\x1eUNDEFINED_ALLOW_LOAD_BALANCING\x10\x00\x12\x1d\n\x16LOAD_BALANCING_ALLOWED\x10\xa9\xf1\xc5\r\x12\x1e\n\x16LOAD_BALANCING_BLOCKED\x10\xed\xb1\xf1\xb5\x01\"\xa1\x01\n\x1a\x41llowMultiNicInSameNetwork\x12-\n)UNDEFINED_ALLOW_MULTI_NIC_IN_SAME_NETWORK\x10\x00\x12)\n!MULTI_NIC_IN_SAME_NETWORK_ALLOWED\x10\xdb\xfb\x96\xda\x01\x12)\n!MULTI_NIC_IN_SAME_NETWORK_BLOCKED\x10\x9f\xbc\xc2\x82\x01\"M\n\x08\x41llowNcc\x12\x17\n\x13UNDEFINED_ALLOW_NCC\x10\x00\x12\x13\n\x0bNCC_ALLOWED\x10\xf7\xa6\xe5\xde\x01\x12\x13\n\x0bNCC_BLOCKED\x10\xbb\xe7\x90\x87\x01\"\x83\x01\n\x15\x41llowNetworkMigration\x12%\n!UNDEFINED_ALLOW_NETWORK_MIGRATION\x10\x00\x12 \n\x19NETWORK_MIGRATION_ALLOWED\x10\x86\xa4\xee\x06\x12!\n\x19NETWORK_MIGRATION_BLOCKED\x10\xca\xe4\x99\xaf\x01\"\x7f\n\x14\x41llowPacketMirroring\x12$\n UNDEFINED_ALLOW_PACKET_MIRRORING\x10\x00\x12\x1f\n\x18PACKET_MIRRORING_ALLOWED\x10\xf5\xd1\x88,\x12 \n\x18PACKET_MIRRORING_BLOCKED\x10\xb9\x92\xb4\xd4\x01\"\x91\x01\n\x18\x41llowPrivateGoogleAccess\x12)\n%UNDEFINED_ALLOW_PRIVATE_GOOGLE_ACCESS\x10\x00\x12$\n\x1dPRIVATE_GOOGLE_ACCESS_ALLOWED\x10\x97\xe5\xa3i\x12$\n\x1dPRIVATE_GOOGLE_ACCESS_BLOCKED\x10\xdb\xa5\xcf\x11\"L\n\x08\x41llowPsc\x12\x17\n\x13UNDEFINED_ALLOW_PSC\x10\x00\x12\x12\n\x0bPSC_ALLOWED\x10\xe9\x95\xe7Q\x12\x13\n\x0bPSC_BLOCKED\x10\xad\xd6\x92\xfa\x01\"\x8e\x01\n\x17\x41llowSameNetworkUnicast\x12(\n$UNDEFINED_ALLOW_SAME_NETWORK_UNICAST\x10\x00\x12#\n\x1cSAME_NETWORK_UNICAST_ALLOWED\x10\xce\xa8\x95L\x12$\n\x1cSAME_NETWORK_UNICAST_BLOCKED\x10\x92\xe9\xc0\xf4\x01\"s\n\x11\x41llowStaticRoutes\x12!\n\x1dUNDEFINED_ALLOW_STATIC_ROUTES\x10\x00\x12\x1d\n\x15STATIC_ROUTES_ALLOWED\x10\x84\xaf\x86\xc3\x01\x12\x1c\n\x15STATIC_ROUTES_BLOCKED\x10\xc8\xef\xb1k\"u\n\x12\x41llowSubInterfaces\x12\"\n\x1eUNDEFINED_ALLOW_SUB_INTERFACES\x10\x00\x12\x1c\n\x15SUBINTERFACES_ALLOWED\x10\xc3\xb5\xd5K\x12\x1d\n\x15SUBINTERFACES_BLOCKED\x10\x87\xf6\x80\xf4\x01\"j\n\x0f\x41llowVpcPeering\x12\x1f\n\x1bUNDEFINED_ALLOW_VPC_PEERING\x10\x00\x12\x1a\n\x13VPC_PEERING_ALLOWED\x10\xf3\xc7\xd6|\x12\x1a\n\x13VPC_PEERING_BLOCKED\x10\xb7\x88\x82%\"L\n\x08\x41llowVpn\x12\x17\n\x13UNDEFINED_ALLOW_VPN\x10\x00\x12\x12\n\x0bVPN_ALLOWED\x10\x9d\xda\xa9M\x12\x13\n\x0bVPN_BLOCKED\x10\xe1\x9a\xd5\xf5\x01\"\x97\x01\n\x0eInterfaceTypes\x12\x1d\n\x19UNDEFINED_INTERFACE_TYPES\x10\x00\x12\x0c\n\x05GVNIC\x10\x99\x95\xc3 \x12\x0b\n\x04IDPF\x10\xd1\xf0\x88\x01\x12\x0c\n\x05IRDMA\x10\x8f\x86\xac!\x12\x0c\n\x05MRDMA\x10\x93\xc2\x8d#\x12\x1b\n\x14UNSPECIFIED_NIC_TYPE\x10\xd9\xbe\x92 \x12\x12\n\nVIRTIO_NET\x10\xd9\xb6\xcb\xd7\x01\"w\n\x0eSubnetPurposes\x12\x1d\n\x19UNDEFINED_SUBNET_PURPOSES\x10\x00\x12&\n\x1eSUBNET_PURPOSE_CUSTOM_HARDWARE\x10\xd3\xdd\x82\x87\x01\x12\x1e\n\x16SUBNET_PURPOSE_PRIVATE\x10\xc0\xec\xe8\xc0\x01\"\xa0\x01\n\x10SubnetStackTypes\x12 \n\x1cUNDEFINED_SUBNET_STACK_TYPES\x10\x00\x12\"\n\x1bSUBNET_STACK_TYPE_IPV4_IPV6\x10\x95\x97\xe2\x13\x12\"\n\x1bSUBNET_STACK_TYPE_IPV4_ONLY\x10\xba\xfa\xec\x13\x12\"\n\x1bSUBNET_STACK_TYPE_IPV6_ONLY\x10\xf8\xdc\x93/\"\xef\x01\n\x12SubnetworkPurposes\x12!\n\x1dUNDEFINED_SUBNETWORK_PURPOSES\x10\x00\x12\x1b\n\x14GLOBAL_MANAGED_PROXY\x10\xf2\xcb\xe0p\x12#\n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\xd9\xb6\xcev\x12\x16\n\x0ePEER_MIGRATION\x10\x91\xaa\xc7\xea\x01\x12\x0f\n\x07PRIVATE\x10\xe3\xe2\xb2\xc0\x01\x12\x13\n\x0bPRIVATE_NAT\x10\xa5\xc8\xae\xaf\x01\x12\x17\n\x10PRIVATE_RFC_1918\x10\xdb\xfe\xc5y\x12\x1d\n\x16REGIONAL_MANAGED_PROXY\x10\xee\xb6\xfdH\"r\n\x14SubnetworkStackTypes\x12$\n UNDEFINED_SUBNETWORK_STACK_TYPES\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%\"J\n\x07Unicast\x12\x15\n\x11UNDEFINED_UNICAST\x10\x00\x12\x13\n\x0bUNICAST_SDN\x10\xed\xc7\x96\xb5\x01\x12\x13\n\x0bUNICAST_ULL\x10\xe5\xd8\x96\xb5\x01\x42\x18\n\x16_allow_alias_ip_rangesB\x19\n\x17_allow_auto_mode_subnetB\x1a\n\x18_allow_class_d_firewallsB\x12\n\x10_allow_cloud_natB\x15\n\x13_allow_cloud_routerB\x1f\n\x1d_allow_default_nic_attachmentB\x1b\n\x19_allow_external_ip_accessB\x15\n\x13_allow_interconnectB\x16\n\x14_allow_ip_forwardingB\x17\n\x15_allow_load_balancingB\"\n _allow_multi_nic_in_same_networkB\x0c\n\n_allow_nccB\x1a\n\x18_allow_network_migrationB\x19\n\x17_allow_packet_mirroringB\x1e\n\x1c_allow_private_google_accessB\x0c\n\n_allow_pscB\x1d\n\x1b_allow_same_network_unicastB\x16\n\x14_allow_static_routesB\x17\n\x15_allow_sub_interfacesB\x14\n\x12_allow_vpc_peeringB\x0c\n\n_allow_vpnB\n\n\x08_unicast\"\xee\x02\n\x1bNetworkProfilesListResponse\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.NetworkProfile\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xae\x06\n\x14NetworkRoutingConfig\x12&\n\x16\x62gp_always_compare_med\x18\xb6\xe2\xce\x65 \x01(\x08H\x00\x88\x01\x01\x12-\n\x1c\x62gp_best_path_selection_mode\x18\xe9\xfb\xc5\x97\x01 \x01(\tH\x01\x88\x01\x01\x12&\n\x15\x62gp_inter_region_cost\x18\xe1\xf9\xae\xdc\x01 \x01(\tH\x02\x88\x01\x01\x12\x30\n effective_bgp_always_compare_med\x18\xce\xf5\xad\x66 \x01(\x08H\x03\x88\x01\x01\x12/\n\x1f\x65\x66\x66\x65\x63tive_bgp_inter_region_cost\x18\xc9\xc0\xa1X \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x0crouting_mode\x18\xfc\xba\xc8\xe2\x01 \x01(\tH\x05\x88\x01\x01\"g\n\x18\x42gpBestPathSelectionMode\x12*\n&UNDEFINED_BGP_BEST_PATH_SELECTION_MODE\x10\x00\x12\r\n\x06LEGACY\x10\xc9\xcf\xf7,\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\"b\n\x12\x42gpInterRegionCost\x12#\n\x1fUNDEFINED_BGP_INTER_REGION_COST\x10\x00\x12\x17\n\x0f\x41\x44\x44_COST_TO_MED\x10\xdc\xe7\xf6\xe9\x01\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\"L\n\x1b\x45\x66\x66\x65\x63tiveBgpInterRegionCost\x12-\n)UNDEFINED_EFFECTIVE_BGP_INTER_REGION_COST\x10\x00\"J\n\x0bRoutingMode\x12\x1a\n\x16UNDEFINED_ROUTING_MODE\x10\x00\x12\x0e\n\x06GLOBAL\x10\xa3\xef\xef\xeb\x01\x12\x0f\n\x08REGIONAL\x10\x9f\xec\x80,B\x19\n\x17_bgp_always_compare_medB\x1f\n\x1d_bgp_best_path_selection_modeB\x18\n\x16_bgp_inter_region_costB#\n!_effective_bgp_always_compare_medB\"\n _effective_bgp_inter_region_costB\x0f\n\r_routing_mode\"\x84\x02\n\x19NetworksAddPeeringRequest\x12\"\n\x12\x61uto_create_routes\x18\xdd\xe2\xb2\x1b \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12I\n\x0fnetwork_peering\x18\xaf\x8c\xec\x9c\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.NetworkPeeringH\x02\x88\x01\x01\x12\x1d\n\x0cpeer_network\x18\xd1\xe0\xdb\xee\x01 \x01(\tH\x03\x88\x01\x01\x42\x15\n\x13_auto_create_routesB\x07\n\x05_nameB\x12\n\x10_network_peeringB\x0f\n\r_peer_network\"\xd6\x01\n%NetworksGetEffectiveFirewallsResponse\x12s\n\x10\x66irewall_policys\x18\xc2\xca\xfc\xc3\x01 \x03(\x0b\x32U.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x38\n\tfirewalls\x18\xf3\xc6\xe8\x81\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Firewall\"\xf3\x03\n.google.cloud.compute.v1.NodeTemplateAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a^\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.compute.v1.NodeTemplatesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa9\x02\n\x10NodeTemplateList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x37\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32%.google.cloud.compute.v1.NodeTemplate\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8e\x01\n\x1fNodeTemplateNodeTypeFlexibility\x12\x14\n\x04\x63pus\x18\xcb\xe7\xba\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tlocal_ssd\x18\xb0\xbe\xbc\xc1\x01 \x01(\tH\x01\x88\x01\x01\x12\x17\n\x06memory\x18\x81\xfa\x8a\xfe\x01 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_cpusB\x0c\n\n_local_ssdB\t\n\x07_memory\"\xa3\x01\n\x17NodeTemplatesScopedList\x12\x41\n\x0enode_templates\x18\xbc\xa2\xed\xa8\x01 \x03(\x0b\x32%.google.cloud.compute.v1.NodeTemplate\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xc6\x04\n\x08NodeType\x12\x1d\n\x0c\x63pu_platform\x18\xaa\xea\xd1\xc3\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nguest_cpus\x18\xd2\xcb\xc8\xbb\x01 \x01(\x05H\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12\x1d\n\x0clocal_ssd_gb\x18\xca\x88\xff\x9c\x01 \x01(\x05H\x07\x88\x01\x01\x12\x18\n\x07max_vms\x18\xc1\x96\xd5\x92\x01 \x01(\x05H\x08\x88\x01\x01\x12\x19\n\tmemory_mb\x18\x93\x93\xa8\x37 \x01(\x05H\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0b\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0c\x88\x01\x01\x42\x0f\n\r_cpu_platformB\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\r\n\x0b_guest_cpusB\x05\n\x03_idB\x07\n\x05_kindB\x0f\n\r_local_ssd_gbB\n\n\x08_max_vmsB\x0c\n\n_memory_mbB\x07\n\x05_nameB\x0c\n\n_self_linkB\x07\n\x05_zone\"\xb9\x03\n\x16NodeTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12L\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32:.google.cloud.compute.v1.NodeTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aZ\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.compute.v1.NodeTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa1\x02\n\x0cNodeTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.NodeType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x97\x01\n\x13NodeTypesScopedList\x12\x39\n\nnode_types\x18\xfc\xbf\xf5\xe5\x01 \x03(\x0b\x32!.google.cloud.compute.v1.NodeType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x90\x03\n\x14NotificationEndpoint\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12Y\n\rgrpc_settings\x18\xa4\xc6\xc0\xd9\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.NotificationEndpointGrpcSettingsH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x10\n\x0e_grpc_settingsB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x0c\n\n_self_link\"\xb7\x02\n NotificationEndpointGrpcSettings\x12\x1a\n\tauthority\x18\xc3\x8e\xd0\xbf\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08\x65ndpoint\x18\x95\xbb\x9c> \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0cpayload_name\x18\x9c\xb5\x9c\x8f\x01 \x01(\tH\x02\x88\x01\x01\x12\x43\n\x0fresend_interval\x18\xc9\xb8\x88\xe4\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x03\x88\x01\x01\x12\"\n\x12retry_duration_sec\x18\xdd\xce\x94\x37 \x01(\rH\x04\x88\x01\x01\x42\x0c\n\n_authorityB\x0b\n\t_endpointB\x0f\n\r_payload_nameB\x12\n\x10_resend_intervalB\x15\n\x13_retry_duration_sec\"\xb9\x02\n\x18NotificationEndpointList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.NotificationEndpoint\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbd\x0c\n\tOperation\x12$\n\x13\x63lient_operation_id\x18\xe7\x8d\xde\x8d\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08\x65nd_time\x18\xb1\xa7\xe7\x36 \x01(\tH\x03\x88\x01\x01\x12\x35\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x1e.google.cloud.compute.v1.ErrorH\x04\x88\x01\x01\x12\'\n\x12http_error_message\x18\xd9\xfa\xc8` \x01(\tB\x03\xe8G\x04H\x05\x88\x01\x01\x12,\n\x16http_error_status_code\x18\xec\x84\xf8\x94\x01 \x01(\x05\x42\x03\xe8G\x03H\x06\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x07\x88\x01\x01\x12\x1c\n\x0binsert_time\x18\x93\xa9\xe8\xce\x01 \x01(\tH\x08\x88\x01\x01\x12w\n(instances_bulk_insert_operation_metadata\x18\xc1\x86\xc1* \x01(\x0b\x32=.google.cloud.compute.v1.InstancesBulkInsertOperationMetadataH\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12\x19\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tB\x03\xe8G\x01H\x0b\x88\x01\x01\x12\"\n\x12operation_group_id\x18\xb3\xed\x93\x13 \x01(\tH\x0c\x88\x01\x01\x12\x1e\n\x0eoperation_type\x18\x92\xf6\xdaT \x01(\tH\r\x88\x01\x01\x12\x18\n\x08progress\x18\xad\x84\xd3\" \x01(\x05H\x0e\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0f\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x10\x88\x01\x01\x12\x85\x01\n/set_common_instance_metadata_operation_metadata\x18\xe4\xad\xea\xe9\x01 \x01(\x0b\x32\x43.google.cloud.compute.v1.SetCommonInstanceMetadataOperationMetadataH\x11\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x12\x88\x01\x01\x12\x46\n\x06status\x18\xf2\x9f\xb7V \x01(\x0e\x32).google.cloud.compute.v1.Operation.StatusB\x03\xe8G\x02H\x13\x88\x01\x01\x12\x1f\n\x0estatus_message\x18\xba\xc9\xe9\x8d\x01 \x01(\tH\x14\x88\x01\x01\x12\x19\n\ttarget_id\x18\x89\x95\x8d{ \x01(\x04H\x15\x88\x01\x01\x12\x1b\n\x0btarget_link\x18\xe8\x93\xf1\x1d \x01(\tH\x16\x88\x01\x01\x12\x14\n\x04user\x18\xcb\xd7\xdb\x01 \x01(\tH\x17\x88\x01\x01\x12\x37\n\x08warnings\x18\xd7\x88\xc1\xed\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Warnings\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x18\x88\x01\x01\"K\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0b\n\x04\x44ONE\x10\x82\xb7\x80\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x42\x16\n\x14_client_operation_idB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0b\n\t_end_timeB\x08\n\x06_errorB\x15\n\x13_http_error_messageB\x19\n\x17_http_error_status_codeB\x05\n\x03_idB\x0e\n\x0c_insert_timeB+\n)_instances_bulk_insert_operation_metadataB\x07\n\x05_kindB\x07\n\x05_nameB\x15\n\x13_operation_group_idB\x11\n\x0f_operation_typeB\x0b\n\t_progressB\t\n\x07_regionB\x0c\n\n_self_linkB2\n0_set_common_instance_metadata_operation_metadataB\r\n\x0b_start_timeB\t\n\x07_statusB\x11\n\x0f_status_messageB\x0c\n\n_target_idB\x0e\n\x0c_target_linkB\x07\n\x05_userB\x07\n\x05_zone\"\xbc\x03\n\x17OperationAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12M\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32;.google.cloud.compute.v1.OperationAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a[\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.compute.v1.OperationsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa3\x02\n\rOperationList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x34\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\".google.cloud.compute.v1.Operation\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x98\x01\n\x14OperationsScopedList\x12\x39\n\noperations\x18\xec\xaf\xff\x01 \x03(\x0b\x32\".google.cloud.compute.v1.Operation\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xda\x06\n\x10OutlierDetection\x12\x45\n\x12\x62\x61se_ejection_time\x18\x87\xd7\xcf& \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x00\x88\x01\x01\x12#\n\x12\x63onsecutive_errors\x18\xa0\xb3\xd0\xb8\x01 \x01(\x05H\x01\x88\x01\x01\x12,\n\x1b\x63onsecutive_gateway_failure\x18\xfa\xb7\x8a\xc7\x01 \x01(\x05H\x02\x88\x01\x01\x12,\n\x1c\x65nforcing_consecutive_errors\x18\xc0\xd3\xd0\x65 \x01(\x05H\x03\x88\x01\x01\x12\x36\n%enforcing_consecutive_gateway_failure\x18\xda\xdf\x8a\xbc\x01 \x01(\x05H\x04\x88\x01\x01\x12&\n\x16\x65nforcing_success_rate\x18\xbc\xef\xdf\\ \x01(\x05H\x05\x88\x01\x01\x12;\n\x08interval\x18\xc5\xc9\xff\x0f \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x06\x88\x01\x01\x12$\n\x14max_ejection_percent\x18\x98\xa6\xe5\x08 \x01(\x05H\x07\x88\x01\x01\x12+\n\x1asuccess_rate_minimum_hosts\x18\xf7\xa1\xda\xfa\x01 \x01(\x05H\x08\x88\x01\x01\x12,\n\x1bsuccess_rate_request_volume\x18\xcd\xeb\x98\x86\x01 \x01(\x05H\t\x88\x01\x01\x12)\n\x19success_rate_stdev_factor\x18\x9d\x83\xa9S \x01(\x05H\n\x88\x01\x01\x42\x15\n\x13_base_ejection_timeB\x15\n\x13_consecutive_errorsB\x1e\n\x1c_consecutive_gateway_failureB\x1f\n\x1d_enforcing_consecutive_errorsB(\n&_enforcing_consecutive_gateway_failureB\x19\n\x17_enforcing_success_rateB\x0b\n\t_intervalB\x17\n\x15_max_ejection_percentB\x1d\n\x1b_success_rate_minimum_hostsB\x1e\n\x1c_success_rate_request_volumeB\x1c\n\x1a_success_rate_stdev_factor\"\xc6\x03\n\x0fPacketIntervals\x12\x16\n\x06\x61vg_ms\x18\xb3\xdc\xd4\x61 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x08\x64uration\x18\x94\x9b\x91J \x01(\tH\x01\x88\x01\x01\x12\x17\n\x06max_ms\x18\xe1\xc4\xbc\xfc\x01 \x01(\x03H\x02\x88\x01\x01\x12\x17\n\x06min_ms\x18\xb3\xa5\xed\xff\x01 \x01(\x03H\x03\x88\x01\x01\x12\x1d\n\rnum_intervals\x18\xd5\xd5\xecX \x01(\x03H\x04\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x05\x88\x01\x01\"g\n\x08\x44uration\x12\x16\n\x12UNDEFINED_DURATION\x10\x00\x12\x1c\n\x14\x44URATION_UNSPECIFIED\x10\xec\xf9\xa3\xfc\x01\x12\x0b\n\x04HOUR\x10\xe4\xdb\x87\x01\x12\t\n\x03MAX\x10\xc4\xd2\x04\x12\r\n\x06MINUTE\x10\x94\xb4\xba<\"h\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\x08LOOPBACK\x10\x8b\x93\xeb\xa9\x01\x12\x0e\n\x07RECEIVE\x10\xc3\xfd\xb7Z\x12\x10\n\x08TRANSMIT\x10\xb0\x85\xfb\xd7\x01\x12\x18\n\x10TYPE_UNSPECIFIED\x10\x92\xfb\xdb\xd0\x01\x42\t\n\x07_avg_msB\x0b\n\t_durationB\t\n\x07_max_msB\t\n\x07_min_msB\x10\n\x0e_num_intervalsB\x07\n\x05_type\"\xba\x06\n\x0fPacketMirroring\x12Z\n\rcollector_ilb\x18\xed\x89\xb6\xcb\x01 \x01(\x0b\x32:.google.cloud.compute.v1.PacketMirroringForwardingRuleInfoH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\tH\x03\x88\x01\x01\x12G\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\x0b\x32..google.cloud.compute.v1.PacketMirroringFilterH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12`\n\x12mirrored_resources\x18\xc4\x9f\xc2; \x01(\x0b\x32<.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12L\n\x07network\x18\xae\xb4\x85o \x01(\x0b\x32\x33.google.cloud.compute.v1.PacketMirroringNetworkInfoH\t\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\rH\n\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\"9\n\x06\x45nable\x12\x14\n\x10UNDEFINED_ENABLE\x10\x00\x12\x0c\n\x05\x46\x41LSE\x10\x83\xc2\xe4\x1f\x12\x0b\n\x04TRUE\x10\x8e\xdb\x9d\x01\x42\x10\n\x0e_collector_ilbB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\t\n\x07_enableB\t\n\x07_filterB\x05\n\x03_idB\x07\n\x05_kindB\x15\n\x13_mirrored_resourcesB\x07\n\x05_nameB\n\n\x08_networkB\x0b\n\t_priorityB\t\n\x07_regionB\x0c\n\n_self_link\"\xce\x03\n\x1dPacketMirroringAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.PacketMirroringAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.PacketMirroringsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xc6\x01\n\x15PacketMirroringFilter\x12\x18\n\rI_p_protocols\x18\xd6\xd9\xfe. \x03(\t\x12\x17\n\x0b\x63idr_ranges\x18\x81\x94\xd3\xe8\x01 \x03(\t\x12\x19\n\tdirection\x18\xff\x8e\x80\x35 \x01(\tH\x00\x88\x01\x01\"Q\n\tDirection\x12\x17\n\x13UNDEFINED_DIRECTION\x10\x00\x12\n\n\x04\x42OTH\x10\x81\xe7|\x12\x0e\n\x06\x45GRESS\x10\xf5\xf6\xb4\xce\x01\x12\x0f\n\x07INGRESS\x10\x95\xfd\xbe\xf6\x01\x42\x0c\n\n_direction\"q\n!PacketMirroringForwardingRuleInfo\x12\x1e\n\rcanonical_url\x18\xa4\xff\xa3\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_canonical_urlB\x06\n\x04_url\"\xaf\x02\n\x13PacketMirroringList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.PacketMirroring\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xf7\x01\n#PacketMirroringMirroredResourceInfo\x12^\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32H.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo\x12_\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\x0b\x32\x46.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo\x12\x0f\n\x04tags\x18\x99\xe8\xd8\x01 \x03(\t\"\x7f\n/PacketMirroringMirroredResourceInfoInstanceInfo\x12\x1e\n\rcanonical_url\x18\xa4\xff\xa3\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_canonical_urlB\x06\n\x04_url\"}\n-PacketMirroringMirroredResourceInfoSubnetInfo\x12\x1e\n\rcanonical_url\x18\xa4\xff\xa3\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_canonical_urlB\x06\n\x04_url\"j\n\x1aPacketMirroringNetworkInfo\x12\x1e\n\rcanonical_url\x18\xa4\xff\xa3\xf4\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03url\x18\xef\x8a\x07 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_canonical_urlB\x06\n\x04_url\"\xab\x01\n\x1aPacketMirroringsScopedList\x12\x46\n\x11packet_mirrorings\x18\xa7\xfa\xdcI \x03(\x0b\x32(.google.cloud.compute.v1.PacketMirroring\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xf9\x01\n\x16PatchAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x00\x88\x01\x01\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_autoscalerB\r\n\x0b_request_id\"\xdb\x01\n\x19PatchBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12P\n\x17\x62\x61\x63kend_bucket_resource\x18\x98\xce\xc7\xb5\x01 \x01(\x0b\x32&.google.cloud.compute.v1.BackendBucketB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe0\x01\n\x1aPatchBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbd\x01\n\x1aPatchFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc5\x01\n\x14PatchFirewallRequest\x12\x19\n\x08\x66irewall\x18\x80\xfa\xd5\xf3\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x11\x66irewall_resource\x18\xed\xb0\xe0\x13 \x01(\x0b\x32!.google.cloud.compute.v1.FirewallB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x81\x02\n\x1aPatchForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66orwarding_rule_resource\x18\xaf\xc0\xd0\x8f\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.ForwardingRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe6\x01\n PatchGlobalForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66orwarding_rule_resource\x18\xaf\xc0\xd0\x8f\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.ForwardingRuleB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x83\x02\n(PatchGlobalPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12`\n public_delegated_prefix_resource\x18\x85\xf8\xd8\x16 \x01(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefixB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd3\x01\n\x17PatchHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb9\x01\n\x11PatchImageRequest\x12\x15\n\x05image\x18\xdb\xd2\xea/ \x01(\tB\x03\xe0\x41\x02\x12?\n\x0eimage_resource\x18\xf2\xc4\xfe\xb0\x01 \x01(\x0b\x32\x1e.google.cloud.compute.v1.ImageB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x95\x02\n PatchInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12^\n\x1finstance_group_manager_resource\x18\x8a\x8a\xbe| \x01(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManagerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x8e\x02\n\x1bPatchInstanceSettingRequest\x12V\n\x1ainstance_settings_resource\x18\x80\xa7\xce\x8a\x01 \x01(\x0b\x32).google.cloud.compute.v1.InstanceSettingsB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xc2\x02\n\'PatchInterconnectAttachmentGroupRequest\x12-\n\x1dinterconnect_attachment_group\x18\xf4\xef\x98$ \x01(\tB\x03\xe0\x41\x02\x12l\n&interconnect_attachment_group_resource\x18\xf9\xdf\xe1\x04 \x01(\x0b\x32\x34.google.cloud.compute.v1.InterconnectAttachmentGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xa0\x02\n\"PatchInterconnectAttachmentRequest\x12(\n\x17interconnect_attachment\x18\xf4\x8a\xf7\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12\x61\n interconnect_attachment_resource\x18\xf9\xa4\xa0\x65 \x01(\x0b\x32/.google.cloud.compute.v1.InterconnectAttachmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x99\x02\n\x1dPatchInterconnectGroupRequest\x12#\n\x12interconnect_group\x18\x8e\xb7\xa9\xb9\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x1binterconnect_group_resource\x18\x9f\xf3\xe6( \x01(\x0b\x32*.google.cloud.compute.v1.InterconnectGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xd5\x01\n\x18PatchInterconnectRequest\x12\x1c\n\x0cinterconnect\x18\x8e\xc9\x8ck \x01(\tB\x03\xe0\x41\x02\x12M\n\x15interconnect_resource\x18\x9f\xa1\xcc\xbd\x01 \x01(\x0b\x32%.google.cloud.compute.v1.InterconnectB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x8b\x02\n\x1dPatchNetworkAttachmentRequest\x12\"\n\x12network_attachment\x18\xd4\x97\x8fk \x01(\tB\x03\xe0\x41\x02\x12W\n\x1bnetwork_attachment_resource\x18\x99\xf0\xcc\x64 \x01(\x0b\x32*.google.cloud.compute.v1.NetworkAttachmentB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x83\x03\n&PatchNetworkEdgeSecurityServiceRequest\x12-\n\x1dnetwork_edge_security_service\x18\xa7\x9f\xefJ \x01(\tB\x03\xe0\x41\x02\x12l\n&network_edge_security_service_resource\x18\xa6\xa3\xdb\xe3\x01 \x01(\x0b\x32\x33.google.cloud.compute.v1.NetworkEdgeSecurityServiceB\x03\xe0\x41\x02\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xe7\x01\n!PatchNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc0\x01\n\x13PatchNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x10network_resource\x18\xff\xdd\x9c: \x01(\x0b\x32 .google.cloud.compute.v1.NetworkB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe9\x01\n\x15PatchNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13node_group_resource\x18\xab\xb3\xfa\xf0\x01 \x01(\x0b\x32\".google.cloud.compute.v1.NodeGroupB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x84\x02\n\x1bPatchPacketMirroringRequest\x12 \n\x10packet_mirroring\x18\xcc\xb9\xd1\n \x01(\tB\x03\xe0\x41\x02\x12T\n\x19packet_mirroring_resource\x18\xa1\xfc\xa8\xeb\x01 \x01(\x0b\x32(.google.cloud.compute.v1.PacketMirroringB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xaa\x02\n4PatchPacketMirroringRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xe4\x02\n2PatchPerInstanceConfigsInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x9a\x01\n?instance_group_managers_patch_per_instance_configs_req_resource\x18\xff\x9b\x88\xaa\x01 \x01(\x0b\x32H.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReqB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xef\x02\n8PatchPerInstanceConfigsRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9b\x01\n@region_instance_group_manager_patch_instance_config_req_resource\x18\xca\xcd\xa1^ \x01(\x0b\x32I.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReqB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x81\x02\n#PatchPublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\x12\x62\n!public_advertised_prefix_resource\x18\x8f\xd7\xb2o \x01(\x0b\x32/.google.cloud.compute.v1.PublicAdvertisedPrefixB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9e\x02\n\"PatchPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12`\n public_delegated_prefix_resource\x18\x85\xf8\xd8\x16 \x01(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefixB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x83\x02\n\x1cPatchRegionAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x00\x88\x01\x01\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_autoscalerB\r\n\x0b_request_id\"\x87\x02\n PatchRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xfa\x01\n\x1dPatchRegionHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x99\x02\n$PatchRegionHealthCheckServiceRequest\x12%\n\x14health_check_service\x18\xdb\x9b\xdd\xc2\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dhealth_check_service_resource\x18\xf2\x9b\xd0\xe3\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HealthCheckServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9f\x02\n&PatchRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12^\n\x1finstance_group_manager_resource\x18\x8a\x8a\xbe| \x01(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManagerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x8e\x02\n\'PatchRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x66irewall_policy_resource\x18\xbc\xb6\x87\xec\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.FirewallPolicyB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb3\x02\n PatchRegionSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12Q\n\x18security_policy_resource\x18\xfc\xaa\x89g \x01(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicyB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xf3\x01\n\x1bPatchRegionSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13ssl_policy_resource\x18\xc8\x88\x8a\x83\x01 \x01(\x0b\x32\".google.cloud.compute.v1.SslPolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x90\x02\n\"PatchRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x12W\n\x1btarget_https_proxy_resource\x18\x81\xad\xe4\xce\x01 \x01(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe6\x01\n\x18PatchRegionUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xad\x02\n\x1aPatchResourcePolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fresource_policy\x18\x83\xa5\xf7K \x01(\tB\x03\xe0\x41\x02\x12Q\n\x18resource_policy_resource\x18\xca\x8c\xd1$ \x01(\x0b\x32\'.google.cloud.compute.v1.ResourcePolicyB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xf3\x01\n\x1dPatchRoutePolicyRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12K\n\x15route_policy_resource\x18\x85\xbd\xb5\x37 \x01(\x0b\x32$.google.cloud.compute.v1.RoutePolicyB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xdd\x01\n\x12PatchRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0frouter_resource\x18\xc4\x80\x82J \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf1\x01\n\x1ePatchRuleFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\x9b\x02\n%PatchRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xc2\x02\n+PatchRuleRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x66irewall_policy_rule_resource\x18\x83\xdf\xbaw \x01(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRuleB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xef\x02\n$PatchRuleRegionSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dsecurity_policy_rule_resource\x18\xc3\xba\x82\xc0\x01 \x01(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRuleB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x02\x88\x01\x01\x42\x0b\n\t_priorityB\x0e\n\x0c_update_maskB\x10\n\x0e_validate_only\"\xc8\x02\n\x1ePatchRuleSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dsecurity_policy_rule_resource\x18\xc3\xba\x82\xc0\x01 \x01(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRuleB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rvalidate_only\x18\xb5\xfa\xdfs \x01(\x08H\x02\x88\x01\x01\x42\x0b\n\t_priorityB\x0e\n\x0c_update_maskB\x10\n\x0e_validate_only\"\x8c\x02\n\x1aPatchSecurityPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x12Q\n\x18security_policy_resource\x18\xfc\xaa\x89g \x01(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicyB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\x8d\x02\n\x1dPatchServiceAttachmentRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12#\n\x12service_attachment\x18\xed\xa9\xd0\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x12X\n\x1bservice_attachment_resource\x18\xa0\xb6\xc4\xe1\x01 \x01(\x0b\x32*.google.cloud.compute.v1.ServiceAttachmentB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf1\x01\n\x1bPatchSnapshotSettingRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12V\n\x1asnapshot_settings_resource\x18\xef\x8d\xc6\xaa\x01 \x01(\x0b\x32).google.cloud.compute.v1.SnapshotSettingsB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xcc\x01\n\x15PatchSslPolicyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13ssl_policy_resource\x18\xc8\x88\x8a\x83\x01 \x01(\x0b\x32\".google.cloud.compute.v1.SslPolicyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb0\x02\n\x16PatchSubnetworkRequest\x12&\n\x15\x64rain_timeout_seconds\x18\xda\xda\xc8\xaa\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13subnetwork_resource\x18\xbf\xda\x91\x14 \x01(\x0b\x32#.google.cloud.compute.v1.SubnetworkB\x03\xe0\x41\x02\x42\x18\n\x16_drain_timeout_secondsB\r\n\x0b_request_id\"\xe5\x01\n\x1bPatchTargetGrpcProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_grpc_proxy\x18\xfb\xb4\xb2\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1atarget_grpc_proxy_resource\x18\xd2\xea\xeb\x9c\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetGrpcProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe4\x01\n\x1bPatchTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x12T\n\x1atarget_http_proxy_resource\x18\xa8\xaf\xe3\x0b \x01(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe9\x01\n\x1cPatchTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x12W\n\x1btarget_https_proxy_resource\x18\x81\xad\xe4\xce\x01 \x01(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxyB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbf\x01\n\x12PatchUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd2\x05\n\x0bPathMatcher\x12h\n$default_custom_error_response_policy\x18\xa9\x8b\xe0& \x01(\x0b\x32\x32.google.cloud.compute.v1.CustomErrorResponsePolicyH\x00\x88\x01\x01\x12O\n\x14\x64\x65\x66\x61ult_route_action\x18\xaa\xb4\xd7\xb4\x01 \x01(\x0b\x32(.google.cloud.compute.v1.HttpRouteActionH\x01\x88\x01\x01\x12 \n\x0f\x64\x65\x66\x61ult_service\x18\xb7\xe5\xc5\xb0\x01 \x01(\tH\x02\x88\x01\x01\x12R\n\x14\x64\x65\x66\x61ult_url_redirect\x18\xea\xab\xb6\xab\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpRedirectActionH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12I\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32).google.cloud.compute.v1.HttpHeaderActionH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x38\n\npath_rules\x18\xdd\xc0\xe6\x31 \x03(\x0b\x32!.google.cloud.compute.v1.PathRule\x12?\n\x0broute_rules\x18\x81\x87\xb7\xb3\x01 \x03(\x0b\x32&.google.cloud.compute.v1.HttpRouteRuleB\'\n%_default_custom_error_response_policyB\x17\n\x15_default_route_actionB\x12\n\x10_default_serviceB\x17\n\x15_default_url_redirectB\x0e\n\x0c_descriptionB\x10\n\x0e_header_actionB\x07\n\x05_name\"\xfc\x02\n\x08PathRule\x12`\n\x1c\x63ustom_error_response_policy\x18\xeb\xf8\xda` \x01(\x0b\x32\x32.google.cloud.compute.v1.CustomErrorResponsePolicyH\x00\x88\x01\x01\x12\x10\n\x05paths\x18\xee\xc1\xe0\x32 \x03(\t\x12G\n\x0croute_action\x18\xec\xa9\xb9\xca\x01 \x01(\x0b\x32(.google.cloud.compute.v1.HttpRouteActionH\x01\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x02\x88\x01\x01\x12J\n\x0curl_redirect\x18\xac\xa1\x98\xc1\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpRedirectActionH\x03\x88\x01\x01\x42\x1f\n\x1d_custom_error_response_policyB\x0f\n\r_route_actionB\n\n\x08_serviceB\x0f\n\r_url_redirect\"\xf3\x02\n\x11PerInstanceConfig\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12H\n\x0fpreserved_state\x18\xaa\xe2\xa0\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.PreservedStateH\x02\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x03\x88\x01\x01\"\x90\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x41PPLYING\x10\xb4\xcb\xec\xa7\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x10\n\tEFFECTIVE\x10\x87\xf3\xb8t\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x11\n\tUNAPPLIED\x10\xa4\x87\xe1\xe6\x01\x12\x1a\n\x12UNAPPLIED_DELETION\x10\x89\xb4\xda\x95\x01\x42\x0e\n\x0c_fingerprintB\x07\n\x05_nameB\x12\n\x10_preserved_stateB\t\n\x07_status\"\xa8\x01\n!PerformMaintenanceInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xac\x02\n\"PerformMaintenanceNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12~\n0node_groups_perform_maintenance_request_resource\x18\xd6\xb8\xaeX \x01(\x0b\x32<.google.cloud.compute.v1.NodeGroupsPerformMaintenanceRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe9\x02\n)PerformMaintenanceReservationBlockRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11reservation_block\x18\xda\xc4\x89\xfe\x01 \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n8reservations_blocks_perform_maintenance_request_resource\x18\x89\xa9\xd4\xe7\x01 \x01(\x0b\x32\x44.google.cloud.compute.v1.ReservationsBlocksPerformMaintenanceRequestB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb2\x02\n$PerformMaintenanceReservationRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12\x81\x01\n1reservations_perform_maintenance_request_resource\x18\xa0\xf5\x94\x0e \x01(\x0b\x32>.google.cloud.compute.v1.ReservationsPerformMaintenanceRequestB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xde\x01\n,PerformMaintenanceReservationSubBlockRequest\x12\x1c\n\x0bparent_name\x18\x80\x8a\x80\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12%\n\x15reservation_sub_block\x18\x9b\xca\xec\n \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf0\x01\n\x06Policy\x12?\n\raudit_configs\x18\x8d\xba\xb8\x9c\x01 \x03(\x0b\x32$.google.cloud.compute.v1.AuditConfig\x12\x36\n\x08\x62indings\x18\x8e\xc5\xa4\xc0\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Binding\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tiam_owned\x18\xbb\xb0\xec\xd6\x01 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x07version\x18\xd8\xb9\xd4\xa7\x01 \x01(\x05H\x02\x88\x01\x01\x42\x07\n\x05_etagB\x0c\n\n_iam_ownedB\n\n\x08_version\"]\n\x13PreconfiguredWafSet\x12\x46\n\x0f\x65xpression_sets\x18\x98\xab\x83\xe2\x01 \x03(\x0b\x32).google.cloud.compute.v1.WafExpressionSet\"\xbe\x05\n\x0ePreservedState\x12\x44\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32\x32.google.cloud.compute.v1.PreservedState.DisksEntry\x12S\n\rexternal_i_ps\x18\x8d\xd3\x80\xfe\x01 \x03(\x0b\x32\x38.google.cloud.compute.v1.PreservedState.ExternalIPsEntry\x12R\n\rinternal_i_ps\x18\xdb\x9b\xef\x66 \x03(\x0b\x32\x38.google.cloud.compute.v1.PreservedState.InternalIPsEntry\x12J\n\x08metadata\x18\xaf\xf6\xb5) \x03(\x0b\x32\x35.google.cloud.compute.v1.PreservedState.MetadataEntry\x1a\x62\n\nDisksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.compute.v1.PreservedStatePreservedDisk:\x02\x38\x01\x1am\n\x10\x45xternalIPsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.compute.v1.PreservedStatePreservedNetworkIp:\x02\x38\x01\x1am\n\x10InternalIPsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.compute.v1.PreservedStatePreservedNetworkIp:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xac\x02\n\x1bPreservedStatePreservedDisk\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x01\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x02\x88\x01\x01\"\\\n\nAutoDelete\x12\x19\n\x15UNDEFINED_AUTO_DELETE\x10\x00\x12\x0c\n\x05NEVER\x10\xec\xa4\xaf#\x12%\n\x1eON_PERMANENT_INSTANCE_DELETION\x10\xe7\xe0\xd2-\"?\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x10\n\tREAD_ONLY\x10\xb5\x99\xec+\x12\x11\n\nREAD_WRITE\x10\xd6\x97\xe4RB\x0e\n\x0c_auto_deleteB\x07\n\x05_modeB\t\n\x07_source\"\x9e\x02\n PreservedStatePreservedNetworkIp\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\tH\x00\x88\x01\x01\x12_\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\x0b\x32\x42.google.cloud.compute.v1.PreservedStatePreservedNetworkIpIpAddressH\x01\x88\x01\x01\"\\\n\nAutoDelete\x12\x19\n\x15UNDEFINED_AUTO_DELETE\x10\x00\x12\x0c\n\x05NEVER\x10\xec\xa4\xaf#\x12%\n\x1eON_PERMANENT_INSTANCE_DELETION\x10\xe7\xe0\xd2-B\x0e\n\x0c_auto_deleteB\r\n\x0b_ip_address\"v\n)PreservedStatePreservedNetworkIpIpAddress\x12\x18\n\x07\x61\x64\x64ress\x18\xf4\xb7\xde\xdc\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x07literal\x18\xaf\xc1\x80W \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_addressB\n\n\x08_literal\"\xa1\x01\n\x14PreviewRouterRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0frouter_resource\x18\xc4\x80\x82J \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterB\x03\xe0\x41\x02\"\xea\n\n\x07Project\x12 \n\x10\x63loud_armor_tier\x18\xac\x9a\x8e\x02 \x01(\tH\x00\x88\x01\x01\x12K\n\x18\x63ommon_instance_metadata\x18\xc5\xfc\xcbX \x01(\x0b\x32!.google.cloud.compute.v1.MetadataH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12%\n\x14\x64\x65\x66\x61ult_network_tier\x18\x91\xc5\xf9\xe0\x01 \x01(\tH\x03\x88\x01\x01\x12(\n\x17\x64\x65\x66\x61ult_service_account\x18\xa5\xf9\xb7\x8e\x01 \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x10\x65nabled_features\x18\xfb\xc6\xd2\xdf\x01 \x03(\t\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x31\n\x06quotas\x18\xfb\xa1\xe2; \x03(\x0b\x32\x1e.google.cloud.compute.v1.Quota\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12T\n\x15usage_export_location\x18\xc2\xb2\xdc\xa5\x01 \x01(\x0b\x32,.google.cloud.compute.v1.UsageExportLocationH\n\x88\x01\x01\x12\x1e\n\x0evm_dns_setting\x18\xb2\xa7\x88\x1c \x01(\tH\x0b\x88\x01\x01\x12\"\n\x12xpn_project_status\x18\xc1\xcd\xf5l \x01(\tH\x0c\x88\x01\x01\"~\n\x0e\x43loudArmorTier\x12\x1e\n\x1aUNDEFINED_CLOUD_ARMOR_TIER\x10\x00\x12\x1b\n\x14\x43\x41_ENTERPRISE_ANNUAL\x10\xdc\xf5\xeeh\x12\x1b\n\x13\x43\x41_ENTERPRISE_PAYGO\x10\xd3\xa5\xa1\xd8\x01\x12\x12\n\x0b\x43\x41_STANDARD\x10\xfe\x82\xa3\x06\"\x9e\x01\n\x12\x44\x65\x66\x61ultNetworkTier\x12\"\n\x1eUNDEFINED_DEFAULT_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"\x92\x01\n\x0cVmDnsSetting\x12\x1c\n\x18UNDEFINED_VM_DNS_SETTING\x10\x00\x12\x16\n\x0eGLOBAL_DEFAULT\x10\x85\xdb\xda\xa4\x01\x12!\n\x1aUNSPECIFIED_VM_DNS_SETTING\x10\x9a\xbb\x82\x11\x12\x15\n\rZONAL_DEFAULT\x10\x86\xfd\xd9\xaf\x01\x12\x12\n\nZONAL_ONLY\x10\xe7\xba\xc3\xf8\x01\"i\n\x10XpnProjectStatus\x12 \n\x1cUNDEFINED_XPN_PROJECT_STATUS\x10\x00\x12\x0b\n\x04HOST\x10\xa8\xdb\x87\x01\x12&\n\x1eUNSPECIFIED_XPN_PROJECT_STATUS\x10\xa9\xfa\xa7\xa2\x01\x42\x13\n\x11_cloud_armor_tierB\x1b\n\x19_common_instance_metadataB\x15\n\x13_creation_timestampB\x17\n\x15_default_network_tierB\x1a\n\x18_default_service_accountB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_self_linkB\x18\n\x16_usage_export_locationB\x11\n\x0f_vm_dns_settingB\x15\n\x13_xpn_project_status\"z\n!ProjectsDisableXpnResourceRequest\x12\x44\n\x0cxpn_resource\x18\xb7\x93\xcd? \x01(\x0b\x32&.google.cloud.compute.v1.XpnResourceIdH\x00\x88\x01\x01\x42\x0f\n\r_xpn_resource\"y\n ProjectsEnableXpnResourceRequest\x12\x44\n\x0cxpn_resource\x18\xb7\x93\xcd? \x01(\x0b\x32&.google.cloud.compute.v1.XpnResourceIdH\x00\x88\x01\x01\x42\x0f\n\r_xpn_resource\"\xab\x01\n\x17ProjectsGetXpnResources\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x01\x88\x01\x01\x12<\n\tresources\x18\xa5\xfc\xb2N \x03(\x0b\x32&.google.cloud.compute.v1.XpnResourceIdB\x07\n\x05_kindB\x12\n\x10_next_page_token\"L\n\x1bProjectsListXpnHostsRequest\x12\x1c\n\x0corganization\x18\xb3\xda\x93\x32 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_organization\"\xd9\x01\n ProjectsSetCloudArmorTierRequest\x12 \n\x10\x63loud_armor_tier\x18\xac\x9a\x8e\x02 \x01(\tH\x00\x88\x01\x01\"~\n\x0e\x43loudArmorTier\x12\x1e\n\x1aUNDEFINED_CLOUD_ARMOR_TIER\x10\x00\x12\x1b\n\x14\x43\x41_ENTERPRISE_ANNUAL\x10\xdc\xf5\xeeh\x12\x1b\n\x13\x43\x41_ENTERPRISE_PAYGO\x10\xd3\xa5\xa1\xd8\x01\x12\x12\n\x0b\x43\x41_STANDARD\x10\xfe\x82\xa3\x06\x42\x13\n\x11_cloud_armor_tier\"\xe8\x01\n$ProjectsSetDefaultNetworkTierRequest\x12\x1d\n\x0cnetwork_tier\x18\xd3\xba\xdb\xf6\x01 \x01(\tH\x00\x88\x01\x01\"\x8f\x01\n\x0bNetworkTier\x12\x1a\n\x16UNDEFINED_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\x42\x0f\n\r_network_tier\"\x96\t\n\x16PublicAdvertisedPrefix\x12!\n\x11\x62yoip_api_version\x18\x93\xb3\xc9M \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12#\n\x13\x64ns_verification_ip\x18\xb5\x95\xf6r \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tpdp_scope\x18\xd1\xca\xfe\xf9\x01 \x01(\tH\t\x88\x01\x01\x12j\n\x18public_delegated_prefixs\x18\x8b\xbe\x85\xcb\x01 \x03(\x0b\x32\x44.google.cloud.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12\x1e\n\rshared_secret\x18\xca\xa7\x8f\xb6\x01 \x01(\tH\x0b\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0c\x88\x01\x01\"D\n\x0f\x42yoipApiVersion\x12\x1f\n\x1bUNDEFINED_BYOIP_API_VERSION\x10\x00\x12\x07\n\x02V1\x10\x9b\x15\x12\x07\n\x02V2\x10\x9c\x15\"a\n\x08PdpScope\x12\x17\n\x13UNDEFINED_PDP_SCOPE\x10\x00\x12\x0e\n\x06GLOBAL\x10\xa3\xef\xef\xeb\x01\x12\x1b\n\x13GLOBAL_AND_REGIONAL\x10\xc3\xb5\xd4\x97\x01\x12\x0f\n\x08REGIONAL\x10\x9f\xec\x80,\"\xa9\x02\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x1c\n\x15\x41NNOUNCED_TO_INTERNET\x10\xc1\xfe\xe8T\x12\x0f\n\x07INITIAL\x10\xa4\xc6\xb3\xf7\x01\x12%\n\x1dPREFIX_CONFIGURATION_COMPLETE\x10\xcf\x95\xa7\xe5\x01\x12(\n PREFIX_CONFIGURATION_IN_PROGRESS\x10\xb1\xf5\xc0\xb4\x01\x12\"\n\x1aPREFIX_REMOVAL_IN_PROGRESS\x10\xe7\xf5\xcc\x87\x01\x12\x16\n\x0ePTR_CONFIGURED\x10\xcf\xb0\xed\xf4\x01\x12\x18\n\x11READY_TO_ANNOUNCE\x10\xf1\xb1\xe9\x1e\x12!\n\x19REVERSE_DNS_LOOKUP_FAILED\x10\xaf\xbb\x83\x8d\x01\x12\x10\n\tVALIDATED\x10\xee\xb3\xc8\x1f\x42\x14\n\x12_byoip_api_versionB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x16\n\x14_dns_verification_ipB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x10\n\x0e_ip_cidr_rangeB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_pdp_scopeB\x0c\n\n_self_linkB\x10\n\x0e_shared_secretB\t\n\x07_status\"\xbd\x02\n\x1aPublicAdvertisedPrefixList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x41\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32/.google.cloud.compute.v1.PublicAdvertisedPrefix\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xde\x01\n+PublicAdvertisedPrefixPublicDelegatedPrefix\x12\x18\n\x08ip_range\x18\xa5\xe0\x97\x45 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tH\x02\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x03\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x04\x88\x01\x01\x42\x0b\n\t_ip_rangeB\x07\n\x05_nameB\n\n\x08_projectB\t\n\x07_regionB\t\n\x07_status\"\xa3\t\n\x15PublicDelegatedPrefix\x12)\n\x19\x61llocatable_prefix_length\x18\xb6\xb6\xa9\x12 \x01(\x05H\x00\x88\x01\x01\x12!\n\x11\x62yoip_api_version\x18\x93\xb3\xc9M \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x06\x88\x01\x01\x12\"\n\x11is_live_migration\x18\xf0\x9f\x87\xf4\x01 \x01(\x08H\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12\x1d\n\rparent_prefix\x18\xc7\xe7\xa1\x07 \x01(\tH\x0b\x88\x01\x01\x12o\n\x1cpublic_delegated_sub_prefixs\x18\x8c\xfe\x8bZ \x03(\x0b\x32\x46.google.cloud.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0c\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0e\x88\x01\x01\"D\n\x0f\x42yoipApiVersion\x12\x1f\n\x1bUNDEFINED_BYOIP_API_VERSION\x10\x00\x12\x07\n\x02V1\x10\x9b\x15\x12\x07\n\x02V2\x10\x9c\x15\"\x87\x01\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x11\n\nDELEGATION\x10\xa8\xb2\xfa}\x12.\n&EXTERNAL_IPV6_FORWARDING_RULE_CREATION\x10\xc4\xe1\x8d\xbe\x01\x12(\n!EXTERNAL_IPV6_SUBNETWORK_CREATION\x10\xcc\x9f\x97\x1d\"\xae\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x11\n\tANNOUNCED\x10\xfb\x91\x8c\xae\x01\x12\x1b\n\x13\x41NNOUNCED_TO_GOOGLE\x10\xb9\xb4\xf3\xd8\x01\x12\x1c\n\x15\x41NNOUNCED_TO_INTERNET\x10\xc1\xfe\xe8T\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x14\n\x0cINITIALIZING\x10\xcd\xd8\x98\x92\x01\x12\x18\n\x11READY_TO_ANNOUNCE\x10\xf1\xb1\xe9\x1e\x42\x1c\n\x1a_allocatable_prefix_lengthB\x14\n\x12_byoip_api_versionB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x10\n\x0e_ip_cidr_rangeB\x14\n\x12_is_live_migrationB\x07\n\x05_kindB\x07\n\x05_modeB\x07\n\x05_nameB\x10\n\x0e_parent_prefixB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_status\"\xe1\x03\n#PublicDelegatedPrefixAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12Y\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32G.google.cloud.compute.v1.PublicDelegatedPrefixAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1ah\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12I\n\x05value\x18\x02 \x01(\x0b\x32:.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbb\x02\n\x19PublicDelegatedPrefixList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12@\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefix\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8d\x05\n-PublicDelegatedPrefixPublicDelegatedSubPrefix\x12)\n\x19\x61llocatable_prefix_length\x18\xb6\xb6\xa9\x12 \x01(\x05H\x00\x88\x01\x01\x12\"\n\x11\x64\x65legatee_project\x18\xda\x8a\xe9\xc5\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x03\x88\x01\x01\x12\x1b\n\nis_address\x18\xdf\x8b\x92\xa8\x01 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x08\x88\x01\x01\"\x87\x01\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x11\n\nDELEGATION\x10\xa8\xb2\xfa}\x12.\n&EXTERNAL_IPV6_FORWARDING_RULE_CREATION\x10\xc4\xe1\x8d\xbe\x01\x12(\n!EXTERNAL_IPV6_SUBNETWORK_CREATION\x10\xcc\x9f\x97\x1d\"@\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08INACTIVE\x10\xeb\x98\xf9\x80\x01\x42\x1c\n\x1a_allocatable_prefix_lengthB\x14\n\x12_delegatee_projectB\x0e\n\x0c_descriptionB\x10\n\x0e_ip_cidr_rangeB\r\n\x0b_is_addressB\x07\n\x05_modeB\x07\n\x05_nameB\t\n\x07_regionB\t\n\x07_status\"\xc1\x01\n!PublicDelegatedPrefixesScopedList\x12U\n\x19public_delegated_prefixes\x18\x96\x82\xaa\x96\x01 \x03(\x0b\x32..google.cloud.compute.v1.PublicDelegatedPrefix\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xe6(\n\x05Quota\x12\x15\n\x05limit\x18\xbb\x97\x8d\x31 \x01(\x01H\x00\x88\x01\x01\x12\x17\n\x06metric\x18\xb0\xeb\x97\xfe\x01 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05owner\x18\xb3\xe5\xcf\x32 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x05usage\x18\xa1\xfb\x99\x35 \x01(\x01H\x03\x88\x01\x01\"\xd5\'\n\x06Metric\x12\x14\n\x10UNDEFINED_METRIC\x10\x00\x12\x0e\n\x07\x41\x32_CPUS\x10\xb9\xfe\x86I\x12\x16\n\x0f\x41\x46\x46INITY_GROUPS\x10\xcb\xa9\xd2\x33\x12\x13\n\x0b\x41UTOSCALERS\x10\xdc\xe0\xda\xe0\x01\x12\x16\n\x0f\x42\x41\x43KEND_BUCKETS\x10\xde\x89\xd0\x41\x12\x18\n\x10\x42\x41\x43KEND_SERVICES\x10\xc9\xc3\xc8\x80\x01\x12\x10\n\x08\x43\x32\x44_CPUS\x10\xf5\xff\xa8\xf2\x01\x12\x0f\n\x07\x43\x32_CPUS\x10\xbb\xeb\xb8\x97\x01\x12\x0f\n\x07\x43\x33_CPUS\x10\xda\x9c\x8c\xa5\x01\x12\x13\n\x0b\x43OMMITMENTS\x10\xde\xd7\xc0\xd9\x01\x12\x18\n\x11\x43OMMITTED_A2_CPUS\x10\xd6\xa2\xa5\x1c\x12\x1a\n\x12\x43OMMITTED_C2D_CPUS\x10\xf8\xe2\xd3\x86\x01\x12\x18\n\x11\x43OMMITTED_C2_CPUS\x10\xd8\x8f\xd7j\x12\x18\n\x11\x43OMMITTED_C3_CPUS\x10\xf7\xc0\xaax\x12\x16\n\x0e\x43OMMITTED_CPUS\x10\xce\xad\xb6\x8b\x01\x12\x19\n\x11\x43OMMITTED_E2_CPUS\x10\xda\xfc\x88\xb9\x01\x12\x1a\n\x12\x43OMMITTED_LICENSES\x10\xd5\xcb\xc2\xaa\x01\x12$\n\x1c\x43OMMITTED_LOCAL_SSD_TOTAL_GB\x10\x88\xec\x86\x93\x01\x12\x17\n\x11\x43OMMITTED_M3_CPUS\x10\x81\xe2#\x12\'\n\x1f\x43OMMITTED_MEMORY_OPTIMIZED_CPUS\x10\xde\xdc\x99\xe9\x01\x12\x19\n\x12\x43OMMITTED_N2A_CPUS\x10\xb0\xaa\x8d\x13\x12\x19\n\x12\x43OMMITTED_N2D_CPUS\x10\x8d\xbe\x87<\x12\x19\n\x11\x43OMMITTED_N2_CPUS\x10\xa3\xa7\xe9\x99\x01\x12\'\n\x1f\x43OMMITTED_NVIDIA_A100_80GB_GPUS\x10\xa5\x9f\xb4\xdd\x01\x12\"\n\x1a\x43OMMITTED_NVIDIA_A100_GPUS\x10\x95\xfd\x98\xb3\x01\x12!\n\x1a\x43OMMITTED_NVIDIA_H100_GPUS\x10\x9c\x8f\x95\"\x12 \n\x19\x43OMMITTED_NVIDIA_K80_GPUS\x10\xa4\xb6\xeb\x01\x12\x1f\n\x18\x43OMMITTED_NVIDIA_L4_GPUS\x10\xfd\xd3\x91\t\x12!\n\x1a\x43OMMITTED_NVIDIA_P100_GPUS\x10\xa4\xff\xa2\x33\x12 \n\x18\x43OMMITTED_NVIDIA_P4_GPUS\x10\x81\xae\xf5\xa5\x01\x12\x1f\n\x18\x43OMMITTED_NVIDIA_T4_GPUS\x10\x85\x88\xd9\x42\x12 \n\x1a\x43OMMITTED_NVIDIA_V100_GPUS\x10\xaa\xb3\r\x12\x1a\n\x12\x43OMMITTED_T2A_CPUS\x10\xea\xc4\xa9\x8d\x01\x12\x1a\n\x12\x43OMMITTED_T2D_CPUS\x10\xc7\xd8\xa3\xb6\x01\x12\x18\n\x11\x43OMMITTED_Z3_CPUS\x10\xce\xe6\xe7}\x12\n\n\x04\x43PUS\x10\xcb\xd7~\x12\x18\n\x10\x43PUS_ALL_REGIONS\x10\xad\x91\xc6\xe0\x01\x12\x16\n\x0e\x44ISKS_TOTAL_GB\x10\x9f\x97\xc9\xa8\x01\x12\x0f\n\x07\x45\x32_CPUS\x10\xbd\xd8\xea\xe5\x01\x12(\n!EXTERNAL_MANAGED_FORWARDING_RULES\x10\xc9\xbf\xf3G\x12,\n$EXTERNAL_NETWORK_LB_FORWARDING_RULES\x10\x99\xad\xbd\xb2\x01\x12)\n\"EXTERNAL_PROTOCOL_FORWARDING_RULES\x10\xe8\xb8\xa2\x1e\x12\x1d\n\x15\x45XTERNAL_VPN_GATEWAYS\x10\xae\xbb\xf5\x81\x01\x12\x11\n\tFIREWALLS\x10\xd3\xe6\xc8\xb2\x01\x12\x18\n\x10\x46ORWARDING_RULES\x10\x95\x82\xa8\xce\x01\x12/\n(GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES\x10\xe1\xad\xbcN\x12\x30\n(GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES\x10\xad\xec\x9b\x9c\x01\x12\x31\n)GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES\x10\xa9\xd9\xed\xbe\x01\x12 \n\x19GLOBAL_INTERNAL_ADDRESSES\x10\x9c\xc5\xb0\x14\x12/\n(GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES\x10\xaf\x90\xaez\x12\x39\n1GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES\x10\xd4\xde\xa1\x9a\x01\x12\x17\n\x10GPUS_ALL_REGIONS\x10\xa9\x80\xe4\x12\x12\x14\n\x0cHDB_TOTAL_GB\x10\xaf\xc2\xa1\x98\x01\x12\x16\n\x0eHDB_TOTAL_IOPS\x10\xfd\xe9\xd7\x93\x01\x12\x1b\n\x14HDB_TOTAL_THROUGHPUT\x10\xfe\xcc\x80\n\x12\x15\n\rHEALTH_CHECKS\x10\xae\xaf\xfc\x89\x01\x12\r\n\x06IMAGES\x10\xf8\xec\xb5\x07\x12\x10\n\tINSTANCES\x10\xde\x9c\xd0>\x12\x17\n\x0fINSTANCE_GROUPS\x10\xbe\xc9\xdb\xa9\x01\x12\x1e\n\x17INSTANCE_GROUP_MANAGERS\x10\xb0\xa2\xc5\x30\x12\x19\n\x12INSTANCE_TEMPLATES\x10\xef\xb7\xedk\x12\x15\n\rINTERCONNECTS\x10\x85\x8b\xfe\xc5\x01\x12*\n#INTERCONNECT_ATTACHMENTS_PER_REGION\x10\xd6\xd6\xa3L\x12+\n#INTERCONNECT_ATTACHMENTS_TOTAL_MBPS\x10\xf3\xba\xd9\xca\x01\x12\x1f\n\x17INTERCONNECT_TOTAL_GBPS\x10\xaa\xf1\x87\x88\x01\x12\x19\n\x12INTERNAL_ADDRESSES\x10\x80\xe9\xae^\x12\x31\n*INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES\x10\x84\xe9\x85\x7f\x12\x19\n\x12IN_PLACE_SNAPSHOTS\x10\x9d\x9d\x96H\x12\x18\n\x10IN_USE_ADDRESSES\x10\x90\xe2\xdf\xbf\x01\x12\x1e\n\x17IN_USE_BACKUP_SCHEDULES\x10\x91\x92\xd1\x0f\x12!\n\x19IN_USE_SNAPSHOT_SCHEDULES\x10\x93\xcc\xac\xdc\x01\x12\x1a\n\x12LOCAL_SSD_TOTAL_GB\x10\xc5\x98\xe3\x9d\x01\x12\x0e\n\x07M1_CPUS\x10\xa6\xdb\xde\x11\x12\x0e\n\x07M2_CPUS\x10\xc5\x8c\xb2\x1f\x12\x0e\n\x07M3_CPUS\x10\xe4\xbd\x85-\x12\x16\n\x0eMACHINE_IMAGES\x10\x90\xf3\x91\xd5\x01\x12\x0f\n\x08N2A_CPUS\x10\xad\xc7\xe2~\x12\x10\n\x08N2D_CPUS\x10\x8a\xdb\xdc\xa7\x01\x12\x0f\n\x07N2_CPUS\x10\x86\x83\xcb\xc6\x01\x12\x10\n\x08NETWORKS\x10\x85\xb8\xbf\xe7\x01\x12\x1a\n\x13NETWORK_ATTACHMENTS\x10\xdf\xfd\x87G\x12\x1e\n\x17NETWORK_ENDPOINT_GROUPS\x10\x8d\xb7\xda\x30\x12 \n\x19NETWORK_FIREWALL_POLICIES\x10\xbe\xdb\x9b\x30\x12*\n#NET_LB_SECURITY_POLICIES_PER_REGION\x10\xad\xfd\xa4K\x12/\n\'NET_LB_SECURITY_POLICY_RULES_PER_REGION\x10\xb3\x88\xe6\xa9\x01\x12\x39\n1NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION\x10\xf0\xe8\xb4\x94\x01\x12\x12\n\x0bNODE_GROUPS\x10\xb1\xfd\xde\x0b\x12\x16\n\x0eNODE_TEMPLATES\x10\x9c\xb2\xb9\xe2\x01\x12\x1d\n\x15NVIDIA_A100_80GB_GPUS\x10\xc8\xe8\xc7\x88\x01\x12\x18\n\x10NVIDIA_A100_GPUS\x10\x92\x80\xdf\xf0\x01\x12\x16\n\x0fNVIDIA_K80_GPUS\x10\x87\xec\x92N\x12\x16\n\x0eNVIDIA_L4_GPUS\x10\xba\xcd\xc8\xea\x01\x12\x17\n\x10NVIDIA_P100_GPUS\x10\xa1\x82\xe9p\x12\x1b\n\x14NVIDIA_P100_VWS_GPUS\x10\x8e\xdd\x83\x66\x12\x16\n\x0eNVIDIA_P4_GPUS\x10\xbe\xa7\xac\x87\x01\x12\x1a\n\x12NVIDIA_P4_VWS_GPUS\x10\xab\xd5\xf4\xfb\x01\x12\x15\n\x0eNVIDIA_T4_GPUS\x10\xc2\x81\x90$\x12\x1a\n\x12NVIDIA_T4_VWS_GPUS\x10\xaf\xeb\xbf\x98\x01\x12\x17\n\x10NVIDIA_V100_GPUS\x10\xa7\xb6\xd3=\x12\x18\n\x11PACKET_MIRRORINGS\x10\xa7\xea\xb6\x07\x12(\n!PD_EXTREME_TOTAL_PROVISIONED_IOPS\x10\xed\xd6\x97!\x12\x17\n\x10PREEMPTIBLE_CPUS\x10\xc9\x8d\xe3w\x12\x1f\n\x18PREEMPTIBLE_LOCAL_SSD_GB\x10\x88\x93\xaf|\x12(\n!PREEMPTIBLE_NVIDIA_A100_80GB_GPUS\x10\x8a\xea\xb9H\x12#\n\x1cPREEMPTIBLE_NVIDIA_A100_GPUS\x10\x90\x9c\xe9 \x12$\n\x1cPREEMPTIBLE_NVIDIA_H100_GPUS\x10\x97\xae\xe5\x8f\x01\x12#\n\x1bPREEMPTIBLE_NVIDIA_K80_GPUS\x10\xc9\xe0\xe5\xb2\x01\x12!\n\x1aPREEMPTIBLE_NVIDIA_L4_GPUS\x10\xb8\xb8\xf0/\x12$\n\x1cPREEMPTIBLE_NVIDIA_P100_GPUS\x10\x9f\x9e\xf3\xa0\x01\x12(\n PREEMPTIBLE_NVIDIA_P100_VWS_GPUS\x10\x8c\x9b\xc1\x95\x01\x12\"\n\x1aPREEMPTIBLE_NVIDIA_P4_GPUS\x10\xbc\x92\xd4\xcc\x01\x12%\n\x1ePREEMPTIBLE_NVIDIA_P4_VWS_GPUS\x10\xa9\xe2\xd0x\x12!\n\x1aPREEMPTIBLE_NVIDIA_T4_GPUS\x10\xc0\xec\xb7i\x12%\n\x1ePREEMPTIBLE_NVIDIA_T4_VWS_GPUS\x10\xad\xf8\x9b\x15\x12#\n\x1cPREEMPTIBLE_NVIDIA_V100_GPUS\x10\xa5\xd2\xddm\x12%\n\x1ePREEMPTIBLE_TPU_LITE_DEVICE_V5\x10\xfb\x91\x8cS\x12\'\n PREEMPTIBLE_TPU_LITE_PODSLICE_V5\x10\xc4\x91\xc5\x35\x12#\n\x1bPREEMPTIBLE_TPU_PODSLICE_V4\x10\x8c\xfc\xf4\xca\x01\x12=\n6PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK\x10\x83\x93\x9dn\x12\'\n PSC_INTERNAL_LB_FORWARDING_RULES\x10\xfb\xa2\xcbP\x12\"\n\x1aPUBLIC_ADVERTISED_PREFIXES\x10\xcc\xa1\xe2\xe0\x01\x12!\n\x19PUBLIC_DELEGATED_PREFIXES\x10\xb6\x92\xf3\xfd\x01\x12\x1b\n\x14REGIONAL_AUTOSCALERS\x10\xbc\x9c\x80\x0e\x12\x31\n*REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES\x10\xdd\xec\x82\x02\x12\x35\n-REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES\x10\xed\xea\xa5\xc3\x01\x12\'\n REGIONAL_INSTANCE_GROUP_MANAGERS\x10\x90\xbe\xf3\x11\x12,\n%REGIONAL_INTERNAL_LB_BACKEND_SERVICES\x10\x90\xee\xe5\x41\x12\x31\n*REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES\x10\xab\xcf\xf4-\x12;\n3REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES\x10\xd8\xf6\xb1\xe6\x01\x12\x13\n\x0cRESERVATIONS\x10\xa7\xbc\xc8\x0f\x12\x18\n\x11RESOURCE_POLICIES\x10\xe1\x9c\x84(\x12\x0f\n\x07ROUTERS\x10\xaa\xbc\x8b\xeb\x01\x12\x0e\n\x06ROUTES\x10\xca\x96\xba\x83\x01\x12\x18\n\x11SECURITY_POLICIES\x10\xef\xa6\xafZ\x12#\n\x1cSECURITY_POLICIES_PER_REGION\x10\xc6\xa6\xe0v\x12\x31\n)SECURITY_POLICY_ADVANCED_RULES_PER_REGION\x10\xad\xe7\xa5\xb1\x01\x12#\n\x1bSECURITY_POLICY_CEVAL_RULES\x10\xc9\xa7\xc0\xe0\x01\x12\x1c\n\x15SECURITY_POLICY_RULES\x10\xa9\xd4\x87\x61\x12\'\n SECURITY_POLICY_RULES_PER_REGION\x10\xcc\xc8\xa9<\x12\x1b\n\x13SERVICE_ATTACHMENTS\x10\xe6\xb1\xeb\xe0\x01\x12\x11\n\tSNAPSHOTS\x10\x8f\xe6\xdf\xa3\x01\x12\x13\n\x0cSSD_TOTAL_GB\x10\xd1\xaf\x8fM\x12\x18\n\x10SSL_CERTIFICATES\x10\xaf\x82\xb6\xb4\x01\x12\x14\n\x0cSSL_POLICIES\x10\xc3\xf4\xc0\xf9\x01\x12\x17\n\x10STATIC_ADDRESSES\x10\xf1\xad\xd2,\x12\x1e\n\x16STATIC_BYOIP_ADDRESSES\x10\xf1\x8a\xc2\x83\x01\x12+\n#STATIC_EXTERNAL_IPV6_ADDRESS_RANGES\x10\x96\xe1\x9d\xe1\x01\x12\x13\n\x0bSUBNETWORKS\x10\xa5\xfc\xf3\xc8\x01\x12\x10\n\x08T2A_CPUS\x10\xe7\xe1\xfe\xf8\x01\x12\x0f\n\x08T2D_CPUS\x10\xc4\xf5\xf8!\x12\x1b\n\x14TARGET_HTTPS_PROXIES\x10\xca\xcb\xd6h\x12\x1a\n\x13TARGET_HTTP_PROXIES\x10\xa3\xf5\xa0N\x12\x18\n\x10TARGET_INSTANCES\x10\xb0\xda\xd5\x87\x01\x12\x14\n\x0cTARGET_POOLS\x10\x89\x97\x88\xa6\x01\x12\x19\n\x12TARGET_SSL_PROXIES\x10\xeb\xe4\xf5K\x12\x19\n\x12TARGET_TCP_PROXIES\x10\xc0\x9e\xf3V\x12\x1a\n\x13TARGET_VPN_GATEWAYS\x10\xa8\xbb\xe3#\x12\x1a\n\x12TPU_LITE_DEVICE_V5\x10\xfd\x84\xb0\xd6\x01\x12\x1b\n\x14TPU_LITE_PODSLICE_V5\x10\xc6\xd3\x87\x06\x12\x16\n\x0fTPU_PODSLICE_V4\x10\xca\x87\xa2\x66\x12\x10\n\x08URL_MAPS\x10\x87\xcf\xc7\xb4\x01\x12.\n\'VARIABLE_IPV6_PUBLIC_DELEGATED_PREFIXES\x10\xa1\xf6\x9c=\x12\x13\n\x0cVPN_GATEWAYS\x10\xba\x8b\xfe\x10\x12\x12\n\x0bVPN_TUNNELS\x10\x80\xd1\xdf\x31\x12\x1b\n\x14XPN_SERVICE_PROJECTS\x10\xad\x87\xb2-B\x08\n\x06_limitB\t\n\x07_metricB\x08\n\x06_ownerB\x08\n\x06_usage\"\xe0\x03\n\x11QuotaExceededInfo\x12R\n\ndimensions\x18\xcd\xff\xc8\xc5\x01 \x03(\x0b\x32:.google.cloud.compute.v1.QuotaExceededInfo.DimensionsEntry\x12\x1d\n\x0c\x66uture_limit\x18\xbf\xbc\xda\xd9\x01 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x05limit\x18\xbb\x97\x8d\x31 \x01(\x01H\x01\x88\x01\x01\x12\x1b\n\nlimit_name\x18\x8f\x89\xf0\xbd\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0bmetric_name\x18\xba\x97\xb9\xc3\x01 \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x0erollout_status\x18\xc0\xe4\x96\xe3\x01 \x01(\tH\x04\x88\x01\x01\x1a\x31\n\x0f\x44imensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"e\n\rRolloutStatus\x12\x1c\n\x18UNDEFINED_ROLLOUT_STATUS\x10\x00\x12\x13\n\x0bIN_PROGRESS\x10\x87\xa8\xdd\xdf\x01\x12!\n\x1aROLLOUT_STATUS_UNSPECIFIED\x10\xb8\xd7\xe7\x0c\x42\x0f\n\r_future_limitB\x08\n\x06_limitB\r\n\x0b_limit_nameB\x0e\n\x0c_metric_nameB\x11\n\x0f_rollout_status\"\x88\t\n\x12QuotaStatusWarning\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x04\x64\x61ta\x18\xaa\xdf\xbb\x01 \x03(\x0b\x32\x1d.google.cloud.compute.v1.Data\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\"\xfc\x07\n\x04\x43ode\x12\x12\n\x0eUNDEFINED_CODE\x10\x00\x12\x15\n\x0e\x43LEANUP_FAILED\x10\xd8\x8c\xd6G\x12 \n\x18\x44\x45PRECATED_RESOURCE_USED\x10\xc2\xdf\xeb\xba\x01\x12\x1c\n\x14\x44\x45PRECATED_TYPE_USED\x10\x96\xa4\x9e\xa5\x01\x12(\n DISK_SIZE_LARGER_THAN_IMAGE_SIZE\x10\x97\x81\x95\xb0\x01\x12\x1e\n\x16\x45XPERIMENTAL_TYPE_USED\x10\x8b\x8e\xc1\xd7\x01\x12\x1b\n\x14\x45XTERNAL_API_WARNING\x10\xc3\xbf\xdaS\x12\x1d\n\x15\x46IELD_VALUE_OVERRIDEN\x10\xaf\xb6\x99\x9d\x01\x12#\n\x1bINJECTED_KERNELS_DEPRECATED\x10\x8b\xd9\x82\xc7\x01\x12\x34\n,INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB\x10\xce\x9b\xbc\xbf\x01\x12 \n\x18LARGE_DEPLOYMENT_WARNING\x10\xa6\xe7\xc8\xe5\x01\x12!\n\x1aLIST_OVERHEAD_QUOTA_EXCEED\x10\xc5\xb0\xda\x16\x12\x1f\n\x17MISSING_TYPE_DEPENDENCY\x10\xf7\xf8\xa2\xa4\x01\x12%\n\x1dNEXT_HOP_ADDRESS_NOT_ASSIGNED\x10\x87\xa5\xfa\x9a\x01\x12\"\n\x1aNEXT_HOP_CANNOT_IP_FORWARD\x10\xe7\xea\xe7\xb6\x01\x12.\n\'NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE\x10\x92\xe8\xfc\x45\x12#\n\x1bNEXT_HOP_INSTANCE_NOT_FOUND\x10\xce\xcc\xaf\xdd\x01\x12\'\n NEXT_HOP_INSTANCE_NOT_ON_NETWORK\x10\xc2\xe8\x9dt\x12\x1c\n\x14NEXT_HOP_NOT_RUNNING\x10\xb1\xcf\xf0\xc6\x01\x12\x19\n\x12NOT_CRITICAL_ERROR\x10\xd4\xa8\xb7\x32\x12\x19\n\x12NO_RESULTS_ON_PAGE\x10\x88\xa6\xa9\x0e\x12\x16\n\x0fPARTIAL_SUCCESS\x10\x85\xae\x87\x13\x12\x1e\n\x16QUOTA_INFO_UNAVAILABLE\x10\xa6\xd2\x8c\x91\x01\x12\x1d\n\x16REQUIRED_TOS_AGREEMENT\x10\x83\xce\xe4\x01\x12\x31\n)RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING\x10\xc1\xf4\xed\xec\x01\x12\x1b\n\x14RESOURCE_NOT_DELETED\x10\xbc\xb7\xb2P\x12!\n\x19SCHEMA_VALIDATION_IGNORED\x10\xca\xd4\x9f\x83\x01\x12(\n!SINGLE_INSTANCE_PROPERTY_TEMPLATE\x10\xd1\x89\xf8\x7f\x12\x1d\n\x15UNDECLARED_PROPERTIES\x10\x9f\x86\x9b\xba\x01\x12\x12\n\x0bUNREACHABLE\x10\xb4\xbd\xad\x06\x42\x07\n\x05_codeB\n\n\x08_message\"\xcc\x01\n\x07RawDisk\x12\x1f\n\x0e\x63ontainer_type\x18\xb8\xc8\x82\x98\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\rsha1_checksum\x18\xbd\x94\xf8\x95\x01 \x01(\tH\x01\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\x02\x88\x01\x01\"8\n\rContainerType\x12\x1c\n\x18UNDEFINED_CONTAINER_TYPE\x10\x00\x12\t\n\x03TAR\x10\x85\x87\x05\x42\x11\n\x0f_container_typeB\x10\n\x0e_sha1_checksumB\t\n\x07_source\"\xd7\x02\n,RecreateInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x93\x01\n;instance_group_managers_recreate_instances_request_resource\x18\x80\xc2\x9a\n \x01(\x0b\x32\x46.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xdb\x02\n2RecreateInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x8d\x01\n8region_instance_group_managers_recreate_request_resource\x18\x94\xfc\xc4Q \x01(\x0b\x32\x43.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa8\x01\n\tReference\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x0ereference_type\x18\xae\xbf\x83v \x01(\tH\x01\x88\x01\x01\x12\x19\n\x08referrer\x18\x9f\xf8\xb9\xa7\x01 \x01(\tH\x02\x88\x01\x01\x12\x16\n\x06target\x18\x91\xe3\xf9[ \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_kindB\x11\n\x0f_reference_typeB\x0b\n\t_referrerB\t\n\x07_target\"\x84\x05\n\x06Region\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12R\n\x14quota_status_warning\x18\xf6\x89\xba\x90\x01 \x01(\x0b\x32+.google.cloud.compute.v1.QuotaStatusWarningH\x06\x88\x01\x01\x12\x31\n\x06quotas\x18\xfb\xa1\xe2; \x03(\x0b\x32\x1e.google.cloud.compute.v1.Quota\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0csupports_pzs\x18\xee\xf6\x85( \x01(\x08H\t\x88\x01\x01\x12\x10\n\x05zones\x18\xc7\xa4\xad\x37 \x03(\t\"4\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x07\n\x02UP\x10\x9b\x15\x42\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x17\n\x15_quota_status_warningB\x0c\n\n_self_linkB\t\n\x07_statusB\x0f\n\r_supports_pzs\"\x88\x01\n\x1aRegionAddressesMoveRequest\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12$\n\x13\x64\x65stination_address\x18\xc3\xb1\x9e\xb1\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x16\n\x14_destination_address\"\xab\x02\n\x14RegionAutoscalerList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.Autoscaler\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa7\x02\n\x12RegionDiskTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.DiskType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"E\n%RegionDisksAddResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"H\n(RegionDisksRemoveResourcePoliciesRequest\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\"@\n\x18RegionDisksResizeRequest\x12\x18\n\x07size_gb\x18\xd9\x8b\x80\xec\x01 \x01(\x03H\x00\x88\x01\x01\x42\n\n\x08_size_gb\"h\n\'RegionDisksStartAsyncReplicationRequest\x12$\n\x14\x61sync_secondary_disk\x18\xab\x83\xe3> \x01(\tH\x00\x88\x01\x01\x42\x17\n\x15_async_secondary_disk\"\xb1\x02\n\x17RegionInstanceGroupList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x38\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32&.google.cloud.compute.v1.InstanceGroup\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"E\n1RegionInstanceGroupManagerDeleteInstanceConfigReq\x12\x10\n\x05names\x18\xc8\xae\xef\x31 \x03(\t\"\xbf\x02\n\x1eRegionInstanceGroupManagerList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12?\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32-.google.cloud.compute.v1.InstanceGroupManager\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x80\x01\n0RegionInstanceGroupManagerPatchInstanceConfigReq\x12L\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"\x81\x01\n1RegionInstanceGroupManagerUpdateInstanceConfigReq\x12L\n\x14per_instance_configs\x18\xa9\xd5\xf8\xfa\x01 \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"J\n2RegionInstanceGroupManagersAbandonInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"\xfb\x02\n.RegionInstanceGroupManagersApplyUpdatesRequest\x12\x1e\n\rall_instances\x18\xe0\xba\xbe\xc0\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x1f\n\x0eminimal_action\x18\x94\x8d\x82\x81\x01 \x01(\tH\x01\x88\x01\x01\x12.\n\x1emost_disruptive_allowed_action\x18\x8d\xce\xc2\x1f \x01(\tH\x02\x88\x01\x01\"-\n\rMinimalAction\x12\x1c\n\x18UNDEFINED_MINIMAL_ACTION\x10\x00\"K\n\x1bMostDisruptiveAllowedAction\x12,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION\x10\x00\x42\x10\n\x0e_all_instancesB\x11\n\x0f_minimal_actionB!\n\x1f_most_disruptive_allowed_action\"u\n1RegionInstanceGroupManagersCreateInstancesRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\"\xa4\x01\n1RegionInstanceGroupManagersDeleteInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x32\n\"skip_instances_on_validation_error\x18\xa1\xf6\xaf\x13 \x01(\x08H\x00\x88\x01\x01\x42%\n#_skip_instances_on_validation_error\"\xaa\x01\n-RegionInstanceGroupManagersListErrorsResponse\x12\x44\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x32.google.cloud.compute.v1.InstanceManagedByIgmError\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_next_page_token\"\xee\x01\n2RegionInstanceGroupManagersListInstanceConfigsResp\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.PerInstanceConfig\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x01\x88\x01\x01\x42\x12\n\x10_next_page_tokenB\n\n\x08_warning\"\xb0\x01\n0RegionInstanceGroupManagersListInstancesResponse\x12G\n\x11managed_instances\x18\xde\x9b\xa9\xa0\x01 \x03(\x0b\x32(.google.cloud.compute.v1.ManagedInstance\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_next_page_token\"B\n*RegionInstanceGroupManagersRecreateRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"I\n1RegionInstanceGroupManagersResumeInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"y\n0RegionInstanceGroupManagersSetTargetPoolsRequest\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0ctarget_pools\x18\xa9\x9f\xa0\xa0\x01 \x03(\tB\x0e\n\x0c_fingerprint\"i\n-RegionInstanceGroupManagersSetTemplateRequest\x12\"\n\x11instance_template\x18\xe4\x81\xbb\x93\x01 \x01(\tH\x00\x88\x01\x01\x42\x14\n\x12_instance_template\"H\n0RegionInstanceGroupManagersStartInstancesRequest\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\"r\n/RegionInstanceGroupManagersStopInstancesRequest\x12\x1a\n\nforce_stop\x18\xd6\xa1\xa1@ \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\tB\r\n\x0b_force_stop\"{\n2RegionInstanceGroupManagersSuspendInstancesRequest\x12\x1d\n\rforce_suspend\x18\xe8\xed\x96\r \x01(\x08H\x00\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\tB\x10\n\x0e_force_suspend\"\xc4\x02\n!RegionInstanceGroupsListInstances\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x41\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32/.google.cloud.compute.v1.InstanceWithNamedPorts\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xd0\x01\n(RegionInstanceGroupsListInstancesRequest\x12\x1e\n\x0einstance_state\x18\xe7\xf0\xfc+ \x01(\tH\x00\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x01\x88\x01\x01\"H\n\rInstanceState\x12\x1c\n\x18UNDEFINED_INSTANCE_STATE\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12\x0e\n\x07RUNNING\x10\x9f\xc3\xea\x39\x42\x11\n\x0f_instance_stateB\x0c\n\n_port_name\"\x94\x01\n(RegionInstanceGroupsSetNamedPortsRequest\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12;\n\x0bnamed_ports\x18\x8c\xc7\xf2\xcb\x01 \x03(\x0b\x32\".google.cloud.compute.v1.NamedPortB\x0e\n\x0c_fingerprint\"\x9d\x02\n\nRegionList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x31\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1f.google.cloud.compute.v1.Region\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"{\n1RegionNetworkEndpointGroupsAttachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"{\n1RegionNetworkEndpointGroupsDetachEndpointsRequest\x12\x46\n\x11network_endpoints\x18\xad\x91\xbaG \x03(\x0b\x32(.google.cloud.compute.v1.NetworkEndpoint\"\x81\x02\n:RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse\x12\x88\x01\n\x10\x66irewall_policys\x18\xc2\xca\xfc\xc3\x01 \x03(\x0b\x32j.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x38\n\tfirewalls\x18\xf3\xc6\xe8\x81\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Firewall\"\x94\x04\nQRegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy\x12\x1c\n\x0c\x64isplay_name\x18\xe8\x87\x91\x02 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12O\n\x16packet_mirroring_rules\x18\xc4\xff\xc0\xfd\x01 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x02\x88\x01\x01\x12=\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32+.google.cloud.compute.v1.FirewallPolicyRule\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x03\x88\x01\x01\"\x99\x01\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\tHIERARCHY\x10\x95\xc4\xaa!\x12\x0f\n\x07NETWORK\x10\x8e\xcc\xb3\xc5\x01\x12\x17\n\x10NETWORK_REGIONAL\x10\xb0\xe2\xfdZ\x12\x14\n\rSYSTEM_GLOBAL\x10\xb3\x97\xd4\x1c\x12\x16\n\x0fSYSTEM_REGIONAL\x10\xaf\x8c\x92M\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x0f\n\r_display_nameB\x07\n\x05_nameB\x0b\n\t_priorityB\x07\n\x05_type\"\xd1\x01\n\x16RegionSetLabelsRequest\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x00\x88\x01\x01\x12O\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32;.google.cloud.compute.v1.RegionSetLabelsRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_label_fingerprint\"\xb3\x01\n\x16RegionSetPolicyRequest\x12\x36\n\x08\x62indings\x18\x8e\xc5\xa4\xc0\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Binding\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06policy\x18\xb2\xca\xb6+ \x01(\x0b\x32\x1f.google.cloud.compute.v1.PolicyH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_policy\"Q\n1RegionTargetHttpsProxiesSetSslCertificatesRequest\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\"f\n\x1cRegionUrlMapsValidateRequest\x12\x39\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapH\x00\x88\x01\x01\x42\x0b\n\t_resource\"\x94\x01\n&RemoveAssociationFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\r\n\x0b_request_id\"\xbe\x01\n-RemoveAssociationNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\r\n\x0b_request_id\"\xe5\x01\n3RemoveAssociationRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\r\n\x0b_request_id\"\xb3\x02\n\"RemoveHealthCheckTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12\x80\x01\n1target_pools_remove_health_check_request_resource\x18\xb3\xe7\xb6\x91\x01 \x01(\x0b\x32<.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa7\x02\n\x1fRemoveInstanceTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12x\n-target_pools_remove_instance_request_resource\x18\x83\xc0\x8b\x0e \x01(\x0b\x32\x39.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequestB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb4\x02\n#RemoveInstancesInstanceGroupRequest\x12\x1e\n\x0einstance_group\x18\xd5\xd4\xd5& \x01(\tB\x03\xe0\x41\x02\x12\x81\x01\n1instance_groups_remove_instances_request_resource\x18\xb9\xd1\xb7\xba\x01 \x01(\x0b\x32=.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcf\x01\n5RemovePacketMirroringRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xf6\x01\n\x1bRemovePeeringNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12p\n(networks_remove_peering_request_resource\x18\xfe\xdb\xe9\xc8\x01 \x01(\x0b\x32\x35.google.cloud.compute.v1.NetworksRemovePeeringRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa3\x02\n!RemoveResourcePoliciesDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12}\n/disks_remove_resource_policies_request_resource\x18\xee\xc1\xa1\xd0\x01 \x01(\x0b\x32;.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb3\x02\n%RemoveResourcePoliciesInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x84\x01\n3instances_remove_resource_policies_request_resource\x18\xf6\xdd\xbc\x17 \x01(\x0b\x32?.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xba\x02\n\'RemoveResourcePoliciesRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x89\x01\n6region_disks_remove_resource_policies_request_resource\x18\xa3\xc3\x95\x04 \x01(\x0b\x32\x41.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x96\x01\n\x1fRemoveRuleFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xc0\x01\n&RemoveRuleNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xe7\x01\n,RemoveRuleRegionNetworkFirewallPolicyRequest\x12 \n\x0f\x66irewall_policy\x18\xd1\x8a\xc6\xed\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_priorityB\r\n\x0b_request_id\"\xb4\x01\n%RemoveRuleRegionSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\"\x8d\x01\n\x1fRemoveRuleSecurityPolicyRequest\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\t_priority\"\xa8\x02\n!ReportHostAsFaultyInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12~\n0instances_report_host_as_faulty_request_resource\x18\xa6\x94\xcd\xeb\x01 \x01(\x0b\x32;.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"K\n\x13RequestMirrorPolicy\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_backend_service\"\x8b\x02\n\"RequestRemovePeeringNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12~\n0networks_request_remove_peering_request_resource\x18\xce\xe4\xf7G \x01(\x0b\x32<.google.cloud.compute.v1.NetworksRequestRemovePeeringRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x95\x10\n\x0bReservation\x12k\n\x1b\x61\x64vanced_deployment_control\x18\xa0\x92\xe6\xc3\x01 \x01(\x0b\x32=.google.cloud.compute.v1.ReservationAdvancedDeploymentControlH\x00\x88\x01\x01\x12_\n\x15\x61ggregate_reservation\x18\xcc\xf2\x83\x8b\x01 \x01(\x0b\x32\x37.google.cloud.compute.v1.AllocationAggregateReservationH\x01\x88\x01\x01\x12\x1b\n\ncommitment\x18\x95\x96\xf3\xe5\x01 \x01(\tH\x02\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x03\x88\x01\x01\x12I\n\x15\x64\x65lete_after_duration\x18\xab\x9b\xbf\x9a\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x04\x88\x01\x01\x12\x1e\n\x0e\x64\x65lete_at_time\x18\xc5\xf1\xdb\' \x01(\tH\x05\x88\x01\x01\x12 \n\x0f\x64\x65ployment_type\x18\xf4\x80\x96\xbd\x01 \x01(\tH\x06\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x07\x88\x01\x01\x12,\n\x1b\x65nable_emergent_maintenance\x18\x89\xe2\xd7\xa8\x01 \x01(\x08H\x08\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\t\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\n\x88\x01\x01\x12\x1e\n\x12linked_commitments\x18\xd8\xfd\xc8\xe0\x01 \x03(\t\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0b\x88\x01\x01\x12g\n\x1areservation_sharing_policy\x18\xc8\xb5\x9b\x62 \x01(\x0b\x32;.google.cloud.compute.v1.AllocationReservationSharingPolicyH\x0c\x88\x01\x01\x12X\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\x0b\x32:.google.cloud.compute.v1.Reservation.ResourcePoliciesEntry\x12R\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x31.google.cloud.compute.v1.AllocationResourceStatusH\r\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x0e\x88\x01\x01\x12\x1f\n\x0fscheduling_type\x18\x85\xfe\xa4_ \x01(\tH\x0f\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x10\x88\x01\x01\x12\x46\n\x0eshare_settings\x18\x83\x91\x94\x7f \x01(\x0b\x32&.google.cloud.compute.v1.ShareSettingsH\x11\x88\x01\x01\x12`\n\x14specific_reservation\x18\xbf\xa0\x89\xc1\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.AllocationSpecificSKUReservationH\x12\x88\x01\x01\x12-\n\x1dspecific_reservation_required\x18\x9f\xc7\x83l \x01(\x08H\x13\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x14\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x15\x88\x01\x01\x1a\x37\n\x15ResourcePoliciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"a\n\x0e\x44\x65ploymentType\x12\x1d\n\x19UNDEFINED_DEPLOYMENT_TYPE\x10\x00\x12\x0c\n\x05\x44\x45NSE\x10\xff\x95\xfb\x1e\x12\"\n\x1b\x44\x45PLOYMENT_TYPE_UNSPECIFIED\x10\xcc\xf7\xfdo\"\x80\x01\n\x0eSchedulingType\x12\x1d\n\x19UNDEFINED_SCHEDULING_TYPE\x10\x00\x12\x0f\n\x07GROUPED\x10\xbe\xd6\xa3\xe2\x01\x12*\n\"GROUP_MAINTENANCE_TYPE_UNSPECIFIED\x10\xbe\xf6\x9d\xd5\x01\x12\x12\n\x0bINDEPENDENT\x10\xda\x96\xc8<\"s\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x10\n\x08UPDATING\x10\xc6\xee\xec\xeb\x01\x42\x1e\n\x1c_advanced_deployment_controlB\x18\n\x16_aggregate_reservationB\r\n\x0b_commitmentB\x15\n\x13_creation_timestampB\x18\n\x16_delete_after_durationB\x11\n\x0f_delete_at_timeB\x12\n\x10_deployment_typeB\x0e\n\x0c_descriptionB\x1e\n\x1c_enable_emergent_maintenanceB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x1d\n\x1b_reservation_sharing_policyB\x12\n\x10_resource_statusB\x10\n\x0e_satisfies_pzsB\x12\n\x10_scheduling_typeB\x0c\n\n_self_linkB\x11\n\x0f_share_settingsB\x17\n\x15_specific_reservationB \n\x1e_specific_reservation_requiredB\t\n\x07_statusB\x07\n\x05_zone\"\xaa\x02\n$ReservationAdvancedDeploymentControl\x12-\n\x1creservation_operational_mode\x18\x83\xa4\xb4\xee\x01 \x01(\tH\x00\x88\x01\x01\"\xb1\x01\n\x1aReservationOperationalMode\x12*\n&UNDEFINED_RESERVATION_OPERATIONAL_MODE\x10\x00\x12\x14\n\x0c\x41LL_CAPACITY\x10\xb8\xb3\xb7\xee\x01\x12 \n\x19HIGHLY_AVAILABLE_CAPACITY\x10\xa0\xba\xee\x34\x12/\n(RESERVATION_OPERATIONAL_MODE_UNSPECIFIED\x10\x9b\xf6\xd2\\B\x1f\n\x1d_reservation_operational_mode\"\xb0\x02\n\x13ReservationAffinity\x12)\n\x18\x63onsume_reservation_type\x18\xb0\xc3\xb3\x8f\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x06values\x18\xa2\xba\x96w \x03(\t\"\xa1\x01\n\x16\x43onsumeReservationType\x12&\n\"UNDEFINED_CONSUME_RESERVATION_TYPE\x10\x00\x12\x16\n\x0f\x41NY_RESERVATION\x10\xb9\xc3\xaf_\x12\x15\n\x0eNO_RESERVATION\x10\xae\xcc\xdeP\x12\x1b\n\x14SPECIFIC_RESERVATION\x10\x9f\xa8\xcfm\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x1b\n\x19_consume_reservation_typeB\x06\n\x04_key\"\xc2\x03\n\x19ReservationAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12O\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32=.google.cloud.compute.v1.ReservationAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a]\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.ReservationsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xf2\x07\n\x10ReservationBlock\x12\x15\n\x05\x63ount\x18\x8f\xa2\x9d- \x01(\x05H\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12P\n\x0bhealth_info\x18\xb1\xe9\x98p \x01(\x0b\x32\x33.google.cloud.compute.v1.ReservationBlockHealthInfoH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x1d\n\x0cin_use_count\x18\xbd\xab\xa6\xeb\x01 \x01(\x05H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12]\n\x11physical_topology\x18\xd7\xa9\xb4\x85\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.ReservationBlockPhysicalTopologyH\x07\x88\x01\x01\x12W\n\x17reservation_maintenance\x18\xa0\x86\xb5\xa2\x01 \x01(\x0b\x32-.google.cloud.compute.v1.GroupMaintenanceInfoH\x08\x88\x01\x01\x12,\n\x1breservation_sub_block_count\x18\xeb\xb1\xdd\x9d\x01 \x01(\x05H\t\x88\x01\x01\x12\x32\n\"reservation_sub_block_in_use_count\x18\xe1\xfc\xd8X \x01(\x05H\n\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0b\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\r\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0e\x88\x01\x01\"a\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x08\n\x06_countB\x15\n\x13_creation_timestampB\x0e\n\x0c_health_infoB\x05\n\x03_idB\x0f\n\r_in_use_countB\x07\n\x05_kindB\x07\n\x05_nameB\x14\n\x12_physical_topologyB\x1a\n\x18_reservation_maintenanceB\x1e\n\x1c_reservation_sub_block_countB%\n#_reservation_sub_block_in_use_countB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\t\n\x07_statusB\x07\n\x05_zone\"\xce\x02\n\x1aReservationBlockHealthInfo\x12)\n\x18\x64\x65graded_sub_block_count\x18\xcd\xe8\xb4\xda\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1e\n\rhealth_status\x18\xb5\xd6\xba\xb5\x01 \x01(\tH\x01\x88\x01\x01\x12\'\n\x17healthy_sub_block_count\x18\xbc\xb9\xc6\x02 \x01(\x05H\x02\x88\x01\x01\"q\n\x0cHealthStatus\x12\x1b\n\x17UNDEFINED_HEALTH_STATUS\x10\x00\x12\x10\n\x08\x44\x45GRADED\x10\xae\xa6\xa0\xbd\x01\x12\x0f\n\x07HEALTHY\x10\xfd\xaa\xdb\xd1\x01\x12!\n\x19HEALTH_STATUS_UNSPECIFIED\x10\x8d\x82\xfa\xe5\x01\x42\x1b\n\x19_degraded_sub_block_countB\x10\n\x0e_health_statusB\x1a\n\x18_healthy_sub_block_count\"\xc2\x01\n ReservationBlockPhysicalTopology\x12\x15\n\x05\x62lock\x18\x8d\x89\xdf, \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07\x63luster\x18\xfa\xa3\xec\x9f\x01 \x01(\tH\x01\x88\x01\x01\x12W\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32\x41.google.cloud.compute.v1.ReservationBlockPhysicalTopologyInstanceB\x08\n\x06_blockB\n\n\x08_cluster\"\x9d\x02\n(ReservationBlockPhysicalTopologyInstance\x12\x1b\n\x0binstance_id\x18\x85\xb2\xd8\x15 \x01(\x04H\x00\x88\x01\x01\x12~\n\x16physical_host_topology\x18\xbe\x93\xaf\xba\x01 \x01(\x0b\x32U.google.cloud.compute.v1.ReservationBlockPhysicalTopologyInstancePhysicalHostTopologyH\x01\x88\x01\x01\x12\x1a\n\nproject_id\x18\x81\xc8\xd2T \x01(\x04H\x02\x88\x01\x01\x42\x0e\n\x0c_instance_idB\x19\n\x17_physical_host_topologyB\r\n\x0b_project_id\"\x87\x01\n\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32,.google.cloud.compute.v1.ReservationSubBlock\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xfa\x01\n+ReservationsBlocksPerformMaintenanceRequest\x12!\n\x11maintenance_scope\x18\xa8\xf4\x8a\x43 \x01(\tH\x00\x88\x01\x01\"\x91\x01\n\x10MaintenanceScope\x12\x1f\n\x1bUNDEFINED_MAINTENANCE_SCOPE\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12$\n\x1dMAINTENANCE_SCOPE_UNSPECIFIED\x10\xc0\x9e\xcb%\x12\x13\n\x0bRUNNING_VMS\x10\xdc\xeb\xbc\xff\x01\x12\x16\n\x0fUNUSED_CAPACITY\x10\x83\xda\xb7\x65\x42\x14\n\x12_maintenance_scope\"\xf4\x01\n%ReservationsPerformMaintenanceRequest\x12!\n\x11maintenance_scope\x18\xa8\xf4\x8a\x43 \x01(\tH\x00\x88\x01\x01\"\x91\x01\n\x10MaintenanceScope\x12\x1f\n\x1bUNDEFINED_MAINTENANCE_SCOPE\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12$\n\x1dMAINTENANCE_SCOPE_UNSPECIFIED\x10\xc0\x9e\xcb%\x12\x13\n\x0bRUNNING_VMS\x10\xdc\xeb\xbc\xff\x01\x12\x16\n\x0fUNUSED_CAPACITY\x10\x83\xda\xb7\x65\x42\x14\n\x12_maintenance_scope\"V\n\x19ReservationsResizeRequest\x12\"\n\x12specific_sku_count\x18\xa0\xe9\xcf\x06 \x01(\x03H\x00\x88\x01\x01\x42\x15\n\x13_specific_sku_count\"\x9f\x01\n\x16ReservationsScopedList\x12>\n\x0creservations\x18\xa7\xec\xcc\xbe\x01 \x03(\x0b\x32$.google.cloud.compute.v1.Reservation\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x9b\x01\n\x14ResetInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf0\x01\n\x11ResizeDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x1d\x64isks_resize_request_resource\x18\xa0\xc2\xab% \x01(\x0b\x32+.google.cloud.compute.v1.DisksResizeRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcc\x01\n!ResizeInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04size\x18\x81\xc0\xd7\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x88\x02\n\x17ResizeRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12h\n$region_disks_resize_request_resource\x18\x95\xaa\xfc\xd4\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.RegionDisksResizeRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd6\x01\n\'ResizeRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04size\x18\x81\xc0\xd7\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x8d\x02\n\x18ResizeReservationRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12i\n$reservations_resize_request_resource\x18\xd1\xdb\xce\xb9\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.ReservationsResizeRequestB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x82\x02\n\x12ResourceCommitment\x12 \n\x10\x61\x63\x63\x65lerator_type\x18\x8e\xe1\xe8\x41 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06\x61mount\x18\xd8\xa0\xe9] \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x02\x88\x01\x01\"s\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x13\n\x0b\x41\x43\x43\x45LERATOR\x10\xcb\xec\xf9\xcc\x01\x12\x11\n\tLOCAL_SSD\x10\xf0\xf5\xd6\xf2\x01\x12\r\n\x06MEMORY\x10\x81\xe2\xd6:\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x12\x0b\n\x04VCPU\x10\xf2\xba\xa0\x01\x42\x13\n\x11_accelerator_typeB\t\n\x07_amountB\x07\n\x05_type\"9\n\x16ResourceGroupReference\x12\x15\n\x05group\x18\xff\xec\x83/ \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_group\"\xaa\x01\n\x1aResourcePoliciesScopedList\x12\x45\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\x0b\x32\'.google.cloud.compute.v1.ResourcePolicy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xae\t\n\x0eResourcePolicy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12q\n\x1d\x64isk_consistency_group_policy\x18\x9b\x84\xf2\xe1\x01 \x01(\x0b\x32\x41.google.cloud.compute.v1.ResourcePolicyDiskConsistencyGroupPolicyH\x02\x88\x01\x01\x12\x63\n\x16group_placement_policy\x18\x8c\x9b\x9b\x05 \x01(\x0b\x32;.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicyH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12h\n\x18instance_schedule_policy\x18\xb0\xd0\xb9\xa4\x01 \x01(\x0b\x32=.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyH\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12V\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x35.google.cloud.compute.v1.ResourcePolicyResourceStatusH\t\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12g\n\x18snapshot_schedule_policy\x18\xdf\xd6\x81h \x01(\x0b\x32=.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyH\x0b\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0c\x88\x01\x01\x12V\n\x0fworkload_policy\x18\xfa\x85\xda\x36 \x01(\x0b\x32\x35.google.cloud.compute.v1.ResourcePolicyWorkloadPolicyH\r\x88\x01\x01\"r\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0f\n\x07\x45XPIRED\x10\x85\xe6\x88\xe6\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB \n\x1e_disk_consistency_group_policyB\x19\n\x17_group_placement_policyB\x05\n\x03_idB\x1b\n\x19_instance_schedule_policyB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x12\n\x10_resource_statusB\x0c\n\n_self_linkB\x1b\n\x19_snapshot_schedule_policyB\t\n\x07_statusB\x12\n\x10_workload_policy\"\xeb\x03\n\x1cResourcePolicyAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.ResourcePolicyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.ResourcePoliciesScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x9e\x01\n\x18ResourcePolicyDailyCycle\x12\x1e\n\rdays_in_cycle\x18\xb4\x98\xaa\xb0\x01 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x08\x64uration\x18\x94\x9b\x91J \x01(\tH\x01\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_days_in_cycleB\x0b\n\t_durationB\r\n\x0b_start_time\"*\n(ResourcePolicyDiskConsistencyGroupPolicy\"\xcf\x02\n\"ResourcePolicyGroupPlacementPolicy\x12)\n\x19\x61vailability_domain_count\x18\xb8\x8c\xf8\x05 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0b\x63ollocation\x18\xb5\xc2\xde\xf3\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0cgpu_topology\x18\xa2\xc9\x9dv \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08vm_count\x18\x87\xbb\xd6| \x01(\x05H\x03\x88\x01\x01\"\\\n\x0b\x43ollocation\x12\x19\n\x15UNDEFINED_COLLOCATION\x10\x00\x12\x11\n\nCOLLOCATED\x10\xd2\xab\x9e\x31\x12\x1f\n\x17UNSPECIFIED_COLLOCATION\x10\xed\x8f\xb3\xdd\x01\x42\x1c\n\x1a_availability_domain_countB\x0e\n\x0c_collocationB\x0f\n\r_gpu_topologyB\x0b\n\t_vm_count\"\xa1\x01\n\x19ResourcePolicyHourlyCycle\x12\x18\n\x08\x64uration\x18\x94\x9b\x91J \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0ehours_in_cycle\x18\xfc\x88\x97\xfb\x01 \x01(\x05H\x01\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_durationB\x11\n\x0f_hours_in_cycleB\r\n\x0b_start_time\"\xae\x03\n$ResourcePolicyInstanceSchedulePolicy\x12\x1f\n\x0f\x65xpiration_time\x18\xdd\xac\xe8m \x01(\tH\x00\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x01\x88\x01\x01\x12\x19\n\ttime_zone\x18\xde\x83\xc9\x11 \x01(\tH\x02\x88\x01\x01\x12h\n\x11vm_start_schedule\x18\xdc\x90\xbc\x08 \x01(\x0b\x32\x45.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyScheduleH\x03\x88\x01\x01\x12h\n\x10vm_stop_schedule\x18\xac\xe5\x9f\xcb\x01 \x01(\x0b\x32\x45.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicyScheduleH\x04\x88\x01\x01\x42\x12\n\x10_expiration_timeB\r\n\x0b_start_timeB\x0c\n\n_time_zoneB\x14\n\x12_vm_start_scheduleB\x13\n\x11_vm_stop_schedule\"V\n,ResourcePolicyInstanceSchedulePolicySchedule\x12\x19\n\x08schedule\x18\x97\xa5\x9a\xb3\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_schedule\"\xcc\x02\n\x12ResourcePolicyList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.ResourcePolicy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb9\x01\n\x1cResourcePolicyResourceStatus\x12|\n\x18instance_schedule_policy\x18\xb0\xd0\xb9\xa4\x01 \x01(\x0b\x32Q.google.cloud.compute.v1.ResourcePolicyResourceStatusInstanceSchedulePolicyStatusH\x00\x88\x01\x01\x42\x1b\n\x19_instance_schedule_policy\"\xb6\x01\n8ResourcePolicyResourceStatusInstanceSchedulePolicyStatus\x12$\n\x13last_run_start_time\x18\x87\xef\xc1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12$\n\x13next_run_start_time\x18\x8a\xb3\xf8\x97\x01 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_last_run_start_timeB\x16\n\x14_next_run_start_time\"\xa8\x03\n$ResourcePolicySnapshotSchedulePolicy\x12n\n\x10retention_policy\x18\xf3\xca\xdc \x01(\x0b\x32L.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicyH\x00\x88\x01\x01\x12`\n\x08schedule\x18\x97\xa5\x9a\xb3\x01 \x01(\x0b\x32\x45.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyScheduleH\x01\x88\x01\x01\x12t\n\x13snapshot_properties\x18\x8e\x95\xb2X \x01(\x0b\x32O.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesH\x02\x88\x01\x01\x42\x13\n\x11_retention_policyB\x0b\n\t_scheduleB\x16\n\x14_snapshot_properties\"\xd5\x02\n3ResourcePolicySnapshotSchedulePolicyRetentionPolicy\x12#\n\x12max_retention_days\x18\x93\xc2\xd1\x9a\x01 \x01(\x05H\x00\x88\x01\x01\x12&\n\x15on_source_disk_delete\x18\xc9\xcd\xc2\x99\x01 \x01(\tH\x01\x88\x01\x01\"\x9f\x01\n\x12OnSourceDiskDelete\x12#\n\x1fUNDEFINED_ON_SOURCE_DISK_DELETE\x10\x00\x12\x1e\n\x16\x41PPLY_RETENTION_POLICY\x10\xe4\x94\x92\xff\x01\x12\x1a\n\x13KEEP_AUTO_SNAPSHOTS\x10\xf9\xc8\xbb{\x12(\n!UNSPECIFIED_ON_SOURCE_DISK_DELETE\x10\xa1\xff\x83rB\x15\n\x13_max_retention_daysB\x18\n\x16_on_source_disk_delete\"\xe7\x02\n,ResourcePolicySnapshotSchedulePolicySchedule\x12Q\n\x0e\x64\x61ily_schedule\x18\xfd\xe3\x8a) \x01(\x0b\x32\x31.google.cloud.compute.v1.ResourcePolicyDailyCycleH\x00\x88\x01\x01\x12S\n\x0fhourly_schedule\x18\xa5\xb1\xa3\x12 \x01(\x0b\x32\x32.google.cloud.compute.v1.ResourcePolicyHourlyCycleH\x01\x88\x01\x01\x12T\n\x0fweekly_schedule\x18\x95\x89\xb9\xab\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.ResourcePolicyWeeklyCycleH\x02\x88\x01\x01\x42\x11\n\x0f_daily_scheduleB\x12\n\x10_hourly_scheduleB\x12\n\x10_weekly_schedule\"\xd0\x02\n6ResourcePolicySnapshotSchedulePolicySnapshotProperties\x12\x1a\n\nchain_name\x18\xc9\xda\xdd \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bguest_flush\x18\xdd\x93\xec\xb7\x01 \x01(\x08H\x01\x88\x01\x01\x12o\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32[.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties.LabelsEntry\x12\x1d\n\x11storage_locations\x18\x9a\xed\xb3\x9c\x01 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b_chain_nameB\x0e\n\x0c_guest_flush\"q\n\x19ResourcePolicyWeeklyCycle\x12T\n\x0c\x64\x61y_of_weeks\x18\xda\x9f\xfbz \x03(\x0b\x32;.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek\"\xb4\x02\n\"ResourcePolicyWeeklyCycleDayOfWeek\x12\x12\n\x03\x64\x61y\x18\x9c\x87\x06 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08\x64uration\x18\x94\x9b\x91J \x01(\tH\x01\x88\x01\x01\x12\x1a\n\nstart_time\x18\x8a\xe9\xee\x11 \x01(\tH\x02\x88\x01\x01\"\x9f\x01\n\x03\x44\x61y\x12\x11\n\rUNDEFINED_DAY\x10\x00\x12\x0e\n\x06\x46RIDAY\x10\xdf\xf2\xe3\xe0\x01\x12\x0f\n\x07INVALID\x10\xd7\xfb\xed\xfc\x01\x12\r\n\x06MONDAY\x10\x90\xca\x8b?\x12\x10\n\x08SATURDAY\x10\xb9\x8f\x87\x85\x01\x12\x0e\n\x06SUNDAY\x10\xd0\x8b\xd2\x93\x01\x12\x0f\n\x08THURSDAY\x10\xda\xb3\xe6\x62\x12\x0f\n\x07TUESDAY\x10\xad\xec\xa9\x84\x01\x12\x11\n\tWEDNESDAY\x10\xb6\xce\x9e\xc9\x01\x42\x06\n\x04_dayB\x0b\n\t_durationB\r\n\x0b_start_time\"\xfa\x02\n\x1cResourcePolicyWorkloadPolicy\x12%\n\x14\x61\x63\x63\x65lerator_topology\x18\xc3\xb3\xd2\xb9\x01 \x01(\tH\x00\x88\x01\x01\x12%\n\x15max_topology_distance\x18\xaa\x8b\xcb\x03 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x02\x88\x01\x01\"k\n\x13MaxTopologyDistance\x12#\n\x1fUNDEFINED_MAX_TOPOLOGY_DISTANCE\x10\x00\x12\x0c\n\x05\x42LOCK\x10\xed\x98\x97\x1e\x12\x0f\n\x07\x43LUSTER\x10\xda\xbb\x9a\xf6\x01\x12\x10\n\x08SUBBLOCK\x10\xcd\xbc\xe3\x96\x01\"M\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x19\n\x11HIGH_AVAILABILITY\x10\xd8\x91\xa1\xc3\x01\x12\x16\n\x0fHIGH_THROUGHPUT\x10\xe7\xd1\xed\x45\x42\x17\n\x15_accelerator_topologyB\x18\n\x16_max_topology_distanceB\x07\n\x05_type\"\x8f\x03\n\x0eResourceStatus\x12\x1e\n\rphysical_host\x18\x90\xf8\xb6\xdd\x01 \x01(\tH\x00\x88\x01\x01\x12\x64\n\x16physical_host_topology\x18\xbe\x93\xaf\xba\x01 \x01(\x0b\x32;.google.cloud.compute.v1.ResourceStatusPhysicalHostTopologyH\x01\x88\x01\x01\x12N\n\nscheduling\x18\x94\xcb\xb1\xb8\x01 \x01(\x0b\x32\x31.google.cloud.compute.v1.ResourceStatusSchedulingH\x02\x88\x01\x01\x12R\n\x14upcoming_maintenance\x18\xf0\xa0\xb4l \x01(\x0b\x32,.google.cloud.compute.v1.UpcomingMaintenanceH\x03\x88\x01\x01\x42\x10\n\x0e_physical_hostB\x19\n\x17_physical_host_topologyB\r\n\x0b_schedulingB\x17\n\x15_upcoming_maintenance\"\xb1\x01\n\"ResourceStatusPhysicalHostTopology\x12\x15\n\x05\x62lock\x18\x8d\x89\xdf, \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07\x63luster\x18\xfa\xa3\xec\x9f\x01 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04host\x18\xa8\xeb\xc3\x01 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x08subblock\x18\xcd\xdc\xcb! \x01(\tH\x03\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_clusterB\x07\n\x05_hostB\x0b\n\t_subblock\"W\n\x18ResourceStatusScheduling\x12#\n\x13\x61vailability_domain\x18\xa8\xa0\xb4x \x01(\x05H\x00\x88\x01\x01\x42\x16\n\x14_availability_domain\"\x9c\x01\n\x15ResumeInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xd1\x02\n*ResumeInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n9instance_group_managers_resume_instances_request_resource\x18\xc2\xbe\xc2= \x01(\x0b\x32\x44.google.cloud.compute.v1.InstanceGroupManagersResumeInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe9\x02\n0ResumeInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\n@region_instance_group_managers_resume_instances_request_resource\x18\xb7\x83\x80\xdd\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagersResumeInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x96\x0c\n\x05Route\x12\x39\n\x08\x61s_paths\x18\xa1\xc5\xcc\x41 \x03(\x0b\x32$.google.cloud.compute.v1.RouteAsPath\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\ndest_range\x18\xe0\xb2\xea\xb5\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x06\x88\x01\x01\x12!\n\x10next_hop_gateway\x18\x82\xfa\xec\xb3\x01 \x01(\tH\x07\x88\x01\x01\x12\x1c\n\x0cnext_hop_hub\x18\xb3\xb5\xde^ \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0cnext_hop_ilb\x18\xdd\xba\xde^ \x01(\tH\t\x88\x01\x01\x12\"\n\x11next_hop_instance\x18\x97\xeb\xd1\xbb\x01 \x01(\tH\n\x88\x01\x01\x12*\n\x1anext_hop_inter_region_cost\x18\x93\xe9\xd3\x0b \x01(\rH\x0b\x88\x01\x01\x12\x1b\n\x0bnext_hop_ip\x18\xa9\xaf\xcd\x34 \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0cnext_hop_med\x18\x8a\xd7\xde^ \x01(\rH\r\x88\x01\x01\x12 \n\x10next_hop_network\x18\xec\xa1\x89} \x01(\tH\x0e\x88\x01\x01\x12\x1f\n\x0fnext_hop_origin\x18\xa8\xd1\x9f\x17 \x01(\tH\x0f\x88\x01\x01\x12!\n\x10next_hop_peering\x18\xfe\x93\xe4\xc4\x01 \x01(\tH\x10\x88\x01\x01\x12$\n\x13next_hop_vpn_tunnel\x18\x95\xe5\xf0\xf7\x01 \x01(\tH\x11\x88\x01\x01\x12<\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32$.google.cloud.compute.v1.RouteParamsH\x12\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\rH\x13\x88\x01\x01\x12\x1d\n\x0croute_status\x18\xa8\xcd\xb2\xc7\x01 \x01(\tH\x14\x88\x01\x01\x12\x1b\n\nroute_type\x18\xf0\xb6\x9e\xb3\x01 \x01(\tH\x15\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x16\x88\x01\x01\x12\x0f\n\x04tags\x18\x99\xe8\xd8\x01 \x03(\t\x12\x37\n\x08warnings\x18\xd7\x88\xc1\xed\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Warnings\"W\n\rNextHopOrigin\x12\x1d\n\x19UNDEFINED_NEXT_HOP_ORIGIN\x10\x00\x12\t\n\x03\x45GP\x10\xee\x97\x04\x12\t\n\x03IGP\x10\xf2\xb5\x04\x12\x11\n\nINCOMPLETE\x10\xde\xea\xd8\x05\"l\n\x0bRouteStatus\x12\x1a\n\x16UNDEFINED_ROUTE_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0f\n\x07\x44ROPPED\x10\xa0\xe7\xcf\xec\x01\x12\x10\n\x08INACTIVE\x10\xeb\x98\xf9\x80\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\"`\n\tRouteType\x12\x18\n\x14UNDEFINED_ROUTE_TYPE\x10\x00\x12\t\n\x03\x42GP\x10\xab\x81\x04\x12\x0e\n\x06STATIC\x10\xee\x84\x83\x93\x01\x12\x0e\n\x06SUBNET\x10\xdd\xee\xbc\x93\x01\x12\x0e\n\x07TRANSIT\x10\xb3\x83\xc6YB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\r\n\x0b_dest_rangeB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\x13\n\x11_next_hop_gatewayB\x0f\n\r_next_hop_hubB\x0f\n\r_next_hop_ilbB\x14\n\x12_next_hop_instanceB\x1d\n\x1b_next_hop_inter_region_costB\x0e\n\x0c_next_hop_ipB\x0f\n\r_next_hop_medB\x13\n\x11_next_hop_networkB\x12\n\x10_next_hop_originB\x13\n\x11_next_hop_peeringB\x16\n\x14_next_hop_vpn_tunnelB\t\n\x07_paramsB\x0b\n\t_priorityB\x0f\n\r_route_statusB\r\n\x0b_route_typeB\x0c\n\n_self_link\"\xe7\x01\n\x0bRouteAsPath\x12\x13\n\x08\x61s_lists\x18\xc8\xca\xf9? \x03(\r\x12\"\n\x11path_segment_type\x18\xa0\xb5\xeb\xf4\x01 \x01(\tH\x00\x88\x01\x01\"\x88\x01\n\x0fPathSegmentType\x12\x1f\n\x1bUNDEFINED_PATH_SEGMENT_TYPE\x10\x00\x12\x19\n\x12\x41S_CONFED_SEQUENCE\x10\xb0\x8f\xf7i\x12\x15\n\rAS_CONFED_SET\x10\xf3\xcd\xad\xb2\x01\x12\x12\n\x0b\x41S_SEQUENCE\x10\xae\xd2\xf2\x32\x12\x0e\n\x06\x41S_SET\x10\xb5\x9d\xa4\x9d\x01\x42\x14\n\x12_path_segment_type\"\x9b\x02\n\tRouteList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x30\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1e.google.cloud.compute.v1.Route\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x01\n\x0bRouteParams\x12`\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32=.google.cloud.compute.v1.RouteParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc8\x02\n\x0bRoutePolicy\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x02\x88\x01\x01\x12@\n\x05terms\x18\x87\x93\xc9\x34 \x03(\x0b\x32..google.cloud.compute.v1.RoutePolicyPolicyTerm\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x03\x88\x01\x01\"^\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12 \n\x18ROUTE_POLICY_TYPE_EXPORT\x10\xa2\xcd\xe0\x8b\x01\x12 \n\x18ROUTE_POLICY_TYPE_IMPORT\x10\x93\x8d\xc2\xbd\x01\x42\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x07\n\x05_nameB\x07\n\x05_type\"\xb3\x01\n\x15RoutePolicyPolicyTerm\x12\x32\n\x07\x61\x63tions\x18\xfd\x91\x81\xd6\x01 \x03(\x0b\x32\x1d.google.cloud.compute.v1.Expr\x12\x34\n\x05match\x18\xc5\xb3\xb7\x31 \x01(\x0b\x32\x1d.google.cloud.compute.v1.ExprH\x00\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x01\x88\x01\x01\x42\x08\n\x06_matchB\x0b\n\t_priority\"\xda\x05\n\x06Router\x12\x36\n\x03\x62gp\x18\xcb\xf9\x05 \x01(\x0b\x32\".google.cloud.compute.v1.RouterBgpH\x00\x88\x01\x01\x12=\n\tbgp_peers\x18\xdd\xad\xee\xd7\x01 \x03(\x0b\x32&.google.cloud.compute.v1.RouterBgpPeer\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12.\n\x1d\x65ncrypted_interconnect_router\x18\x9f\xa2\x8c\x8e\x01 \x01(\x08H\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12?\n\ninterfaces\x18\xda\xf4\xe0\x05 \x03(\x0b\x32(.google.cloud.compute.v1.RouterInterface\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12W\n\x17md5_authentication_keys\x18\x9a\xae\xf1! \x03(\x0b\x32\x33.google.cloud.compute.v1.RouterMd5AuthenticationKey\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x33\n\x04nats\x18\xf2\xf6\xcd\x01 \x03(\x0b\x32\".google.cloud.compute.v1.RouterNat\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x42\x06\n\x04_bgpB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB \n\x1e_encrypted_interconnect_routerB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_link\"h\n\x17RouterAdvertisedIpRange\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05range\x18\xbd\xf2\xd0\x33 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x08\n\x06_range\"\xb3\x03\n\x14RouterAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12J\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x38.google.cloud.compute.v1.RouterAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aX\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.google.cloud.compute.v1.RoutersScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xd8\x03\n\tRouterBgp\x12\x1f\n\x0e\x61\x64vertise_mode\x18\xbb\x95\xeb\x94\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x11\x61\x64vertised_groups\x18\xb6\xde\x85\n \x03(\t\x12Q\n\x14\x61\x64vertised_ip_ranges\x18\xcc\xd8\xf3\x10 \x03(\x0b\x32\x30.google.cloud.compute.v1.RouterAdvertisedIpRange\x12\x12\n\x03\x61sn\x18\xfc\xf4\x05 \x01(\rH\x01\x88\x01\x01\x12!\n\x10identifier_range\x18\xa7\xcc\x95\xef\x01 \x01(\tH\x02\x88\x01\x01\x12#\n\x12keepalive_interval\x18\xbc\xe5\xfc\x83\x01 \x01(\rH\x03\x88\x01\x01\"M\n\rAdvertiseMode\x12\x1c\n\x18UNDEFINED_ADVERTISE_MODE\x10\x00\x12\x0e\n\x06\x43USTOM\x10\xf1\xfe\xa5\xb9\x01\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\"G\n\x10\x41\x64vertisedGroups\x12\x1f\n\x1bUNDEFINED_ADVERTISED_GROUPS\x10\x00\x12\x12\n\x0b\x41LL_SUBNETS\x10\xd8\x8f\xdd\x01\x42\x11\n\x0f_advertise_modeB\x06\n\x04_asnB\x13\n\x11_identifier_rangeB\x15\n\x13_keepalive_interval\"\xa5\r\n\rRouterBgpPeer\x12\x1f\n\x0e\x61\x64vertise_mode\x18\xbb\x95\xeb\x94\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x11\x61\x64vertised_groups\x18\xb6\xde\x85\n \x03(\t\x12Q\n\x14\x61\x64vertised_ip_ranges\x18\xcc\xd8\xf3\x10 \x03(\x0b\x32\x30.google.cloud.compute.v1.RouterAdvertisedIpRange\x12)\n\x19\x61\x64vertised_route_priority\x18\xbc\x9c\xf6X \x01(\rH\x01\x88\x01\x01\x12=\n\x03\x62\x66\x64\x18\xa0\xf9\x05 \x01(\x0b\x32).google.cloud.compute.v1.RouterBgpPeerBfdH\x02\x88\x01\x01\x12`\n\x18\x63ustom_learned_ip_ranges\x18\xc4\x88\xc4\xe5\x01 \x03(\x0b\x32:.google.cloud.compute.v1.RouterBgpPeerCustomLearnedIpRange\x12.\n\x1d\x63ustom_learned_route_priority\x18\xc4\xe2\xc6\x9d\x01 \x01(\x05H\x03\x88\x01\x01\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0b\x65nable_ipv4\x18\xa1\xf6\xc3V \x01(\x08H\x05\x88\x01\x01\x12\x1b\n\x0b\x65nable_ipv6\x18\xa3\xf6\xc3V \x01(\x08H\x06\x88\x01\x01\x12\x1a\n\x0f\x65xport_policies\x18\xfb\xf2\xf7? \x03(\t\x12\x1b\n\x0fimport_policies\x18\xaa\xf1\x8f\xd7\x01 \x03(\t\x12\x1f\n\x0einterface_name\x18\xd1\xc3\xe4\xd0\x01 \x01(\tH\x07\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x08\x88\x01\x01\x12$\n\x14ipv4_nexthop_address\x18\xd1\x8d\xdc\x02 \x01(\tH\t\x88\x01\x01\x12$\n\x14ipv6_nexthop_address\x18\xd3\x85\xab\r \x01(\tH\n\x88\x01\x01\x12\x1f\n\x0fmanagement_type\x18\xb6\x83\xeaR \x01(\tH\x0b\x88\x01\x01\x12,\n\x1bmd5_authentication_key_name\x18\x91\xbd\x83\x86\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\r\x88\x01\x01\x12\x18\n\x08peer_asn\x18\x9f\xb4\x96! \x01(\rH\x0e\x88\x01\x01\x12\x1f\n\x0fpeer_ip_address\x18\xd9\x97\x87\x63 \x01(\tH\x0f\x88\x01\x01\x12*\n\x19peer_ipv4_nexthop_address\x18\x8e\x83\xdf\xdf\x01 \x01(\tH\x10\x88\x01\x01\x12*\n\x19peer_ipv6_nexthop_address\x18\x90\xfb\xad\xea\x01 \x01(\tH\x11\x88\x01\x01\x12*\n\x19router_appliance_instance\x18\x9d\xc7\xa7\xdf\x01 \x01(\tH\x12\x88\x01\x01\"M\n\rAdvertiseMode\x12\x1c\n\x18UNDEFINED_ADVERTISE_MODE\x10\x00\x12\x0e\n\x06\x43USTOM\x10\xf1\xfe\xa5\xb9\x01\x12\x0e\n\x07\x44\x45\x46\x41ULT\x10\xa1\xc4\xfd\x36\"G\n\x10\x41\x64vertisedGroups\x12\x1f\n\x1bUNDEFINED_ADVERTISED_GROUPS\x10\x00\x12\x12\n\x0b\x41LL_SUBNETS\x10\xd8\x8f\xdd\x01\"9\n\x06\x45nable\x12\x14\n\x10UNDEFINED_ENABLE\x10\x00\x12\x0c\n\x05\x46\x41LSE\x10\x83\xc2\xe4\x1f\x12\x0b\n\x04TRUE\x10\x8e\xdb\x9d\x01\"g\n\x0eManagementType\x12\x1d\n\x19UNDEFINED_MANAGEMENT_TYPE\x10\x00\x12\x1d\n\x15MANAGED_BY_ATTACHMENT\x10\xcb\xd2\xea\xda\x01\x12\x17\n\x0fMANAGED_BY_USER\x10\xf3\x8b\xa6\x97\x01\x42\x11\n\x0f_advertise_modeB\x1c\n\x1a_advertised_route_priorityB\x06\n\x04_bfdB \n\x1e_custom_learned_route_priorityB\t\n\x07_enableB\x0e\n\x0c_enable_ipv4B\x0e\n\x0c_enable_ipv6B\x11\n\x0f_interface_nameB\r\n\x0b_ip_addressB\x17\n\x15_ipv4_nexthop_addressB\x17\n\x15_ipv6_nexthop_addressB\x12\n\x10_management_typeB\x1e\n\x1c_md5_authentication_key_nameB\x07\n\x05_nameB\x0b\n\t_peer_asnB\x12\n\x10_peer_ip_addressB\x1c\n\x1a_peer_ipv4_nexthop_addressB\x1c\n\x1a_peer_ipv6_nexthop_addressB\x1c\n\x1a_router_appliance_instance\"\x86\x03\n\x10RouterBgpPeerBfd\x12$\n\x14min_receive_interval\x18\xee\xb9\x94Y \x01(\rH\x00\x88\x01\x01\x12&\n\x15min_transmit_interval\x18\xc7\xd1\xc2\xf9\x01 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\nmultiplier\x18\xc1\xfb\x9d[ \x01(\rH\x02\x88\x01\x01\x12+\n\x1bsession_initialization_mode\x18\xb9\x8d\xc3\x32 \x01(\tH\x03\x88\x01\x01\"y\n\x19SessionInitializationMode\x12)\n%UNDEFINED_SESSION_INITIALIZATION_MODE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0f\n\x07PASSIVE\x10\x87\xf6\xd7\xdc\x01\x42\x17\n\x15_min_receive_intervalB\x18\n\x16_min_transmit_intervalB\r\n\x0b_multiplierB\x1e\n\x1c_session_initialization_mode\"D\n!RouterBgpPeerCustomLearnedIpRange\x12\x15\n\x05range\x18\xbd\xf2\xd0\x33 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_range\"\x95\x05\n\x0fRouterInterface\x12\x18\n\x08ip_range\x18\xa5\xe0\x97\x45 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nip_version\x18\xc0\xf3\xd2\x8c\x01 \x01(\tH\x01\x88\x01\x01\x12/\n\x1elinked_interconnect_attachment\x18\xce\xea\xf7\xee\x01 \x01(\tH\x02\x88\x01\x01\x12\"\n\x11linked_vpn_tunnel\x18\xf9\xbf\xfe\xa7\x01 \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x0fmanagement_type\x18\xb6\x83\xeaR \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\"\n\x12private_ip_address\x18\x98\xd2\x8b\x30 \x01(\tH\x06\x88\x01\x01\x12$\n\x13redundant_interface\x18\xe7\xe8\xbc\xf9\x01 \x01(\tH\x07\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x08\x88\x01\x01\"?\n\tIpVersion\x12\x18\n\x14UNDEFINED_IP_VERSION\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\"g\n\x0eManagementType\x12\x1d\n\x19UNDEFINED_MANAGEMENT_TYPE\x10\x00\x12\x1d\n\x15MANAGED_BY_ATTACHMENT\x10\xcb\xd2\xea\xda\x01\x12\x17\n\x0fMANAGED_BY_USER\x10\xf3\x8b\xa6\x97\x01\x42\x0b\n\t_ip_rangeB\r\n\x0b_ip_versionB!\n\x1f_linked_interconnect_attachmentB\x14\n\x12_linked_vpn_tunnelB\x12\n\x10_management_typeB\x07\n\x05_nameB\x15\n\x13_private_ip_addressB\x16\n\x14_redundant_interfaceB\r\n\x0b_subnetwork\"\x9d\x02\n\nRouterList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x31\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1f.google.cloud.compute.v1.Router\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"W\n\x1aRouterMd5AuthenticationKey\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\x07\n\x05_name\"\xb5\x11\n\tRouterNat\x12\"\n\x11\x61uto_network_tier\x18\xe3\xbb\xd1\x80\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\rdrain_nat_ips\x18\xc7\xc1\xae\xf0\x01 \x03(\t\x12/\n\x1e\x65nable_dynamic_port_allocation\x18\xa2\x99\xdd\xfd\x01 \x01(\x08H\x01\x88\x01\x01\x12\x33\n#enable_endpoint_independent_mapping\x18\x9b\x89\xdb{ \x01(\x08H\x02\x88\x01\x01\x12\x1a\n\x0e\x65ndpoint_types\x18\xcf\xaa\xd6\xef\x01 \x03(\t\x12%\n\x15icmp_idle_timeout_sec\x18\xca\xd0\xde\x01 \x01(\x05H\x03\x88\x01\x01\x12H\n\nlog_config\x18\x9d\xd1\xc1\xa7\x01 \x01(\x0b\x32+.google.cloud.compute.v1.RouterNatLogConfigH\x04\x88\x01\x01\x12 \n\x10max_ports_per_vm\x18\xe1\xc9\x9ew \x01(\x05H\x05\x88\x01\x01\x12 \n\x10min_ports_per_vm\x18\xb3\xad\xe4X \x01(\x05H\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12Q\n\x11nat64_subnetworks\x18\xa5\xfb\xa8\x1e \x03(\x0b\x32\x33.google.cloud.compute.v1.RouterNatSubnetworkToNat64\x12\'\n\x16nat_ip_allocate_option\x18\xfd\xb8\xf4\xcc\x01 \x01(\tH\x08\x88\x01\x01\x12\x12\n\x07nat_ips\x18\x8e\xf0\x8b\x38 \x03(\t\x12\x38\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32&.google.cloud.compute.v1.RouterNatRule\x12\x32\n\"source_subnetwork_ip_ranges_to_nat\x18\xdb\xef\xa1x \x01(\tH\t\x88\x01\x01\x12\x34\n$source_subnetwork_ip_ranges_to_nat64\x18\xd9\xe7\xa7v \x01(\tH\n\x88\x01\x01\x12J\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\x0b\x32\x31.google.cloud.compute.v1.RouterNatSubnetworkToNat\x12\x30\n tcp_established_idle_timeout_sec\x18\xed\xeb\xb0j \x01(\x05H\x0b\x88\x01\x01\x12*\n\x19tcp_time_wait_timeout_sec\x18\xfd\xbb\xf3\xf4\x01 \x01(\x05H\x0c\x88\x01\x01\x12/\n\x1ftcp_transitory_idle_timeout_sec\x18\xa6\xfb\xe1\x61 \x01(\x05H\r\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x0e\x88\x01\x01\x12$\n\x14udp_idle_timeout_sec\x18\xc6\xb2\xfa\x1e \x01(\x05H\x0f\x88\x01\x01\"\x98\x01\n\x0f\x41utoNetworkTier\x12\x1f\n\x1bUNDEFINED_AUTO_NETWORK_TIER\x10\x00\x12\x16\n\x0e\x46IXED_STANDARD\x10\xc8\x9e\x85\x94\x01\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12)\n!STANDARD_OVERRIDES_FIXED_STANDARD\x10\xc2\x87\x91\xde\x01\"\x88\x01\n\rEndpointTypes\x12\x1c\n\x18UNDEFINED_ENDPOINT_TYPES\x10\x00\x12&\n\x1e\x45NDPOINT_TYPE_MANAGED_PROXY_LB\x10\x82\xba\xb6\xd1\x01\x12\x18\n\x11\x45NDPOINT_TYPE_SWG\x10\xc8\xce\xfdK\x12\x17\n\x10\x45NDPOINT_TYPE_VM\x10\xb2\xea\x9c\x1b\"a\n\x13NatIpAllocateOption\x12$\n UNDEFINED_NAT_IP_ALLOCATE_OPTION\x10\x00\x12\x10\n\tAUTO_ONLY\x10\xbc\xe0\xf8V\x12\x12\n\x0bMANUAL_ONLY\x10\x85\xc1\xc9|\"\xc2\x01\n\x1dSourceSubnetworkIpRangesToNat\x12\x30\n,UNDEFINED_SOURCE_SUBNETWORK_IP_RANGES_TO_NAT\x10\x00\x12$\n\x1d\x41LL_SUBNETWORKS_ALL_IP_RANGES\x10\xd8\x93\xe8U\x12,\n%ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES\x10\xbb\xc3\xbeX\x12\x1b\n\x13LIST_OF_SUBNETWORKS\x10\xfe\xa2\xe4\xf6\x01\"\x95\x01\n\x1fSourceSubnetworkIpRangesToNat64\x12\x32\n.UNDEFINED_SOURCE_SUBNETWORK_IP_RANGES_TO_NAT64\x10\x00\x12\x1c\n\x14\x41LL_IPV6_SUBNETWORKS\x10\xeb\xcd\xf3\xa2\x01\x12 \n\x18LIST_OF_IPV6_SUBNETWORKS\x10\xb4\x98\xbc\xf8\x01\":\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x0f\n\x07PRIVATE\x10\xe3\xe2\xb2\xc0\x01\x12\r\n\x06PUBLIC\x10\xe9\xcc\xc2jB\x14\n\x12_auto_network_tierB!\n\x1f_enable_dynamic_port_allocationB&\n$_enable_endpoint_independent_mappingB\x18\n\x16_icmp_idle_timeout_secB\r\n\x0b_log_configB\x13\n\x11_max_ports_per_vmB\x13\n\x11_min_ports_per_vmB\x07\n\x05_nameB\x19\n\x17_nat_ip_allocate_optionB%\n#_source_subnetwork_ip_ranges_to_natB\'\n%_source_subnetwork_ip_ranges_to_nat64B#\n!_tcp_established_idle_timeout_secB\x1c\n\x1a_tcp_time_wait_timeout_secB\"\n _tcp_transitory_idle_timeout_secB\x07\n\x05_typeB\x17\n\x15_udp_idle_timeout_sec\"\xb7\x01\n\x12RouterNatLogConfig\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x00\x88\x01\x01\x12\x17\n\x06\x66ilter\x18\xf8\x96\xa3\xa0\x01 \x01(\tH\x01\x88\x01\x01\"Y\n\x06\x46ilter\x12\x14\n\x10UNDEFINED_FILTER\x10\x00\x12\t\n\x03\x41LL\x10\x81\xfb\x03\x12\x13\n\x0b\x45RRORS_ONLY\x10\x80\xb0\xcf\x92\x01\x12\x19\n\x11TRANSLATIONS_ONLY\x10\xe9\xc3\xaa\xaa\x01\x42\t\n\x07_enableB\t\n\x07_filter\"\xdd\x01\n\rRouterNatRule\x12\x44\n\x06\x61\x63tion\x18\xb6\xfc\xbdY \x01(\x0b\x32,.google.cloud.compute.v1.RouterNatRuleActionH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05match\x18\xc5\xb3\xb7\x31 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0brule_number\x18\xec\xdb\x9a\xff\x01 \x01(\rH\x03\x88\x01\x01\x42\t\n\x07_actionB\x0e\n\x0c_descriptionB\x08\n\x06_matchB\x0e\n\x0c_rule_number\"\xa2\x01\n\x13RouterNatRuleAction\x12 \n\x15source_nat_active_ips\x18\xf5\xbb\xa8\x64 \x03(\t\x12#\n\x18source_nat_active_ranges\x18\xed\xd0\xeeZ \x03(\t\x12 \n\x14source_nat_drain_ips\x18\xa3\xc5\xc1\xa2\x01 \x03(\t\x12\"\n\x17source_nat_drain_ranges\x18\xff\xf9\xb7( \x03(\t\"\x96\x02\n\x18RouterNatSubnetworkToNat\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x18secondary_ip_range_names\x18\xd9\xc1\x84~ \x03(\t\x12#\n\x17source_ip_ranges_to_nat\x18\xf2\xca\x94\xb9\x01 \x03(\t\"\x90\x01\n\x13SourceIpRangesToNat\x12%\n!UNDEFINED_SOURCE_IP_RANGES_TO_NAT\x10\x00\x12\x14\n\rALL_IP_RANGES\x10\xb0\xaf\xfd\x10\x12\"\n\x1bLIST_OF_SECONDARY_IP_RANGES\x10\x9c\xb4\xd8[\x12\x18\n\x10PRIMARY_IP_RANGE\x10\xc2\x93\xd6\x8d\x01\x42\x07\n\x05_name\";\n\x1aRouterNatSubnetworkToNat64\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xc6\x02\n\x0cRouterStatus\x12\x37\n\x0b\x62\x65st_routes\x18\x85\xac\xdf\xbc\x01 \x03(\x0b\x32\x1e.google.cloud.compute.v1.Route\x12\x41\n\x16\x62\x65st_routes_for_router\x18\xf9\xfb\xf6\x38 \x03(\x0b\x32\x1e.google.cloud.compute.v1.Route\x12N\n\x0f\x62gp_peer_status\x18\xfb\xd7\x95h \x03(\x0b\x32\x32.google.cloud.compute.v1.RouterStatusBgpPeerStatus\x12\x45\n\nnat_status\x18\xd0\x99\x8b\x1e \x03(\x0b\x32..google.cloud.compute.v1.RouterStatusNatStatus\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_network\"\xe9\n\n\x19RouterStatusBgpPeerStatus\x12=\n\x11\x61\x64vertised_routes\x18\xac\xd9\xfc\x9e\x01 \x03(\x0b\x32\x1e.google.cloud.compute.v1.Route\x12?\n\nbfd_status\x18\xf1\xb8\xd3\xbc\x01 \x01(\x0b\x32\".google.cloud.compute.v1.BfdStatusH\x00\x88\x01\x01\x12\x1b\n\x0b\x65nable_ipv4\x18\xa1\xf6\xc3V \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0b\x65nable_ipv6\x18\xa3\xf6\xc3V \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x03\x88\x01\x01\x12$\n\x14ipv4_nexthop_address\x18\xd1\x8d\xdc\x02 \x01(\tH\x04\x88\x01\x01\x12$\n\x14ipv6_nexthop_address\x18\xd3\x85\xab\r \x01(\tH\x05\x88\x01\x01\x12\"\n\x11linked_vpn_tunnel\x18\xf9\xbf\xfe\xa7\x01 \x01(\tH\x06\x88\x01\x01\x12!\n\x10md5_auth_enabled\x18\xcb\x91\x90\xd7\x01 \x01(\x08H\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\"\n\x12num_learned_routes\x18\xff\xd5\xcb@ \x01(\rH\t\x88\x01\x01\x12\x1f\n\x0fpeer_ip_address\x18\xd9\x97\x87\x63 \x01(\tH\n\x88\x01\x01\x12*\n\x19peer_ipv4_nexthop_address\x18\x8e\x83\xdf\xdf\x01 \x01(\tH\x0b\x88\x01\x01\x12*\n\x19peer_ipv6_nexthop_address\x18\x90\xfb\xad\xea\x01 \x01(\tH\x0c\x88\x01\x01\x12*\n\x19router_appliance_instance\x18\x9d\xc7\xa7\xdf\x01 \x01(\tH\r\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x0e\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x0f\x88\x01\x01\x12\x1e\n\rstatus_reason\x18\xb1\x96\xb5\xa3\x01 \x01(\tH\x10\x88\x01\x01\x12\x16\n\x06uptime\x18\xe8\xb7\x9ep \x01(\tH\x11\x88\x01\x01\x12\x1e\n\x0euptime_seconds\x18\xa8\xca\xf8\x31 \x01(\tH\x12\x88\x01\x01\"E\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\x12\x07\n\x02UP\x10\x9b\x15\"\xc6\x01\n\x0cStatusReason\x12\x1b\n\x17UNDEFINED_STATUS_REASON\x10\x00\x12)\n!IPV4_PEER_ON_IPV6_ONLY_CONNECTION\x10\x96\xbb\xef\xcf\x01\x12)\n!IPV6_PEER_ON_IPV4_ONLY_CONNECTION\x10\xd2\xf1\x85\xd0\x01\x12 \n\x19MD5_AUTH_INTERNAL_PROBLEM\x10\xb3\x91\xfd\x42\x12!\n\x19STATUS_REASON_UNSPECIFIED\x10\x89\x8e\x84\xbc\x01\x42\r\n\x0b_bfd_statusB\x0e\n\x0c_enable_ipv4B\x0e\n\x0c_enable_ipv6B\r\n\x0b_ip_addressB\x17\n\x15_ipv4_nexthop_addressB\x17\n\x15_ipv6_nexthop_addressB\x14\n\x12_linked_vpn_tunnelB\x13\n\x11_md5_auth_enabledB\x07\n\x05_nameB\x15\n\x13_num_learned_routesB\x12\n\x10_peer_ip_addressB\x1c\n\x1a_peer_ipv4_nexthop_addressB\x1c\n\x1a_peer_ipv6_nexthop_addressB\x1c\n\x1a_router_appliance_instanceB\x08\n\x06_stateB\t\n\x07_statusB\x10\n\x0e_status_reasonB\t\n\x07_uptimeB\x11\n\x0f_uptime_seconds\"\xf7\x03\n\x15RouterStatusNatStatus\x12\"\n\x16\x61uto_allocated_nat_ips\x18\x86\xb4\xc8\xf3\x01 \x03(\t\x12(\n\x1c\x64rain_auto_allocated_nat_ips\x18\xad\x90\xb7\x93\x01 \x03(\t\x12(\n\x1c\x64rain_user_allocated_nat_ips\x18\xc9\x8e\xc8\x91\x01 \x03(\t\x12)\n\x18min_extra_nat_ips_needed\x18\xe2\xe9\xb5\xae\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x01\x88\x01\x01\x12\x33\n\"num_vm_endpoints_with_nat_mappings\x18\xec\xb6\xa8\xf4\x01 \x01(\x05H\x02\x88\x01\x01\x12S\n\x0brule_status\x18\x95\xc5\xee\x42 \x03(\x0b\x32;.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus\x12*\n\x1fuser_allocated_nat_ip_resources\x18\xd7\xe9\xba\x65 \x03(\t\x12\"\n\x16user_allocated_nat_ips\x18\xa2\xb2\xd9\xf1\x01 \x03(\tB\x1b\n\x19_min_extra_nat_ips_neededB\x07\n\x05_nameB%\n#_num_vm_endpoints_with_nat_mappings\"\xa4\x02\n\"RouterStatusNatStatusNatRuleStatus\x12\x19\n\x0e\x61\x63tive_nat_ips\x18\xd5\xef\xb6\x63 \x03(\t\x12\x19\n\rdrain_nat_ips\x18\xc7\xc1\xae\xf0\x01 \x03(\t\x12%\n\x14min_extra_ips_needed\x18\x84\xca\xa9\xa8\x01 \x01(\x05H\x00\x88\x01\x01\x12\x33\n\"num_vm_endpoints_with_nat_mappings\x18\xec\xb6\xa8\xf4\x01 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0brule_number\x18\xec\xdb\x9a\xff\x01 \x01(\x05H\x02\x88\x01\x01\x42\x17\n\x15_min_extra_ips_neededB%\n#_num_vm_endpoints_with_nat_mappingsB\x0e\n\x0c_rule_number\"\x7f\n\x14RouterStatusResponse\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x12=\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32%.google.cloud.compute.v1.RouterStatusH\x01\x88\x01\x01\x42\x07\n\x05_kindB\t\n\x07_result\"l\n\x1dRoutersGetRoutePolicyResponse\x12>\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32$.google.cloud.compute.v1.RoutePolicyH\x00\x88\x01\x01\x42\x0b\n\t_resource\"\xe2\x02\n\x14RoutersListBgpRoutes\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x34\n\x06result\x18\x9d\x90\xb7\x42 \x03(\x0b\x32!.google.cloud.compute.v1.BgpRoute\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe9\x02\n\x18RoutersListRoutePolicies\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x37\n\x06result\x18\x9d\x90\xb7\x42 \x03(\x0b\x32$.google.cloud.compute.v1.RoutePolicy\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"`\n\x16RoutersPreviewResponse\x12\x39\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterH\x00\x88\x01\x01\x42\x0b\n\t_resource\"\x90\x01\n\x11RoutersScopedList\x12\x34\n\x07routers\x18\xca\xa4\xdd\x94\x01 \x03(\x0b\x32\x1f.google.cloud.compute.v1.Router\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xd8\x03\n\x0eSSLHealthCheck\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x00\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12port_specification\x18\xc5\xeb\xcc\x18 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07request\x18\x8f\xe5\xbb\n \x01(\tH\x04\x88\x01\x01\x12\x18\n\x08response\x18\xc1\xa8\xdc] \x01(\tH\x05\x88\x01\x01\"~\n\x11PortSpecification\x12 \n\x1cUNDEFINED_PORT_SPECIFICATION\x10\x00\x12\x15\n\x0eUSE_FIXED_PORT\x10\xe4\x88\xdbZ\x12\x16\n\x0eUSE_NAMED_PORT\x10\xbf\xcf\xc7\xa6\x01\x12\x18\n\x10USE_SERVING_PORT\x10\xcc\xd1\xf5\xac\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x07\n\x05_portB\x0c\n\n_port_nameB\x15\n\x13_port_specificationB\x0f\n\r_proxy_headerB\n\n\x08_requestB\x0b\n\t_response\"\x8f\x08\n\x11SavedAttachedDisk\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x04\x62oot\x18\xf2\xf5\xb8\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tH\x02\x88\x01\x01\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x03\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x04\x88\x01\x01\x12\x19\n\tdisk_type\x18\x9c\xe9\xac, \x01(\tH\x05\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x15\n\x05index\x18\xd2\xd1\xec/ \x01(\x05H\x06\x88\x01\x01\x12\x1a\n\tinterface\x18\xb9\xda\xd5\xef\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x08\x88\x01\x01\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x14\n\x04mode\x18\xa3\xf3\xcc\x01 \x01(\tH\t\x88\x01\x01\x12\x16\n\x06source\x18\x9b\xd0\xc1T \x01(\tH\n\x88\x01\x01\x12\x1e\n\rstorage_bytes\x18\xa7\xbb\xbd\xca\x01 \x01(\x03H\x0b\x88\x01\x01\x12%\n\x14storage_bytes_status\x18\x8a\xab\x80\xea\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\r\x88\x01\x01\">\n\tInterface\x12\x17\n\x13UNDEFINED_INTERFACE\x10\x00\x12\x0b\n\x04NVME\x10\xe0\x82\x93\x01\x12\x0b\n\x04SCSI\x10\xa6\x81\x9b\x01\"?\n\x04Mode\x12\x12\n\x0eUNDEFINED_MODE\x10\x00\x12\x10\n\tREAD_ONLY\x10\xb5\x99\xec+\x12\x11\n\nREAD_WRITE\x10\xd6\x97\xe4R\"]\n\x12StorageBytesStatus\x12\"\n\x1eUNDEFINED_STORAGE_BYTES_STATUS\x10\x00\x12\x10\n\x08UPDATING\x10\xc6\xee\xec\xeb\x01\x12\x11\n\nUP_TO_DATE\x10\xce\xa2\xa7\x30\"?\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x12\n\nPERSISTENT\x10\x97\xf5\xd5\xdb\x01\x12\x0f\n\x07SCRATCH\x10\xda\xfd\xf0\xec\x01\x42\x0e\n\x0c_auto_deleteB\x07\n\x05_bootB\x0e\n\x0c_device_nameB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0c\n\n_disk_typeB\x08\n\x06_indexB\x0c\n\n_interfaceB\x07\n\x05_kindB\x07\n\x05_modeB\t\n\x07_sourceB\x10\n\x0e_storage_bytesB\x17\n\x15_storage_bytes_statusB\x07\n\x05_type\"\xc5\x03\n\tSavedDisk\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\rstorage_bytes\x18\xa7\xbb\xbd\xca\x01 \x01(\x03H\x03\x88\x01\x01\x12%\n\x14storage_bytes_status\x18\x8a\xab\x80\xea\x01 \x01(\tH\x04\x88\x01\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"]\n\x12StorageBytesStatus\x12\"\n\x1eUNDEFINED_STORAGE_BYTES_STATUS\x10\x00\x12\x10\n\x08UPDATING\x10\xc6\xee\xec\xeb\x01\x12\x11\n\nUP_TO_DATE\x10\xce\xa2\xa7\x30\x42\x0f\n\r_architectureB\x07\n\x05_kindB\x0e\n\x0c_source_diskB\x10\n\x0e_storage_bytesB\x17\n\x15_storage_bytes_status\"\x81\x02\n\x15ScalingScheduleStatus\x12\x1f\n\x0flast_start_time\x18\xd3\xbb\xbc\x10 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0fnext_start_time\x18\xd6\xf2\xb0. \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x02\x88\x01\x01\"]\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x0f\n\x08OBSOLETE\x10\x99\xeb\xdc\x1f\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x12\n\x10_last_start_timeB\x12\n\x10_next_start_timeB\x08\n\x06_state\"\xd5\n\n\nScheduling\x12\"\n\x11\x61utomatic_restart\x18\xfb\xb7\xa4\xa7\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x13\x61vailability_domain\x18\xa8\xa0\xb4x \x01(\x05H\x01\x88\x01\x01\x12+\n\x1ahost_error_timeout_seconds\x18\x93\xdc\xd9\xc2\x01 \x01(\x05H\x02\x88\x01\x01\x12+\n\x1binstance_termination_action\x18\xbb\xff\x99\x33 \x01(\tH\x03\x88\x01\x01\x12M\n\x1alocal_ssd_recovery_timeout\x18\xe6\xaf\xe6\x7f \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x04\x88\x01\x01\x12\x1e\n\rlocation_hint\x18\xd1\x81\x92\xa7\x01 \x01(\tH\x05\x88\x01\x01\x12\x44\n\x10max_run_duration\x18\xc3\xaf\xb8\xcd\x01 \x01(\x0b\x32!.google.cloud.compute.v1.DurationH\x06\x88\x01\x01\x12\x1e\n\rmin_node_cpus\x18\xbb\xa4\xa2\x97\x01 \x01(\x05H\x07\x88\x01\x01\x12L\n\x0fnode_affinities\x18\xa3\x84\x9a\xdc\x01 \x03(\x0b\x32/.google.cloud.compute.v1.SchedulingNodeAffinity\x12#\n\x13on_host_maintenance\x18\xdc\xf2\xe7\x1e \x01(\tH\x08\x88\x01\x01\x12\x61\n\x17on_instance_stop_action\x18\xc9\x8d\xd5\xfc\x01 \x01(\x0b\x32\x37.google.cloud.compute.v1.SchedulingOnInstanceStopActionH\t\x88\x01\x01\x12\x1c\n\x0bpreemptible\x18\xa1\xe5\xcb\x9a\x01 \x01(\x08H\n\x88\x01\x01\x12!\n\x12provisioning_model\x18\xd7\x96\x1e \x01(\tH\x0b\x88\x01\x01\x12!\n\x10termination_time\x18\xa8\x8e\x90\xcc\x01 \x01(\tH\x0c\x88\x01\x01\"\x93\x01\n\x19InstanceTerminationAction\x12)\n%UNDEFINED_INSTANCE_TERMINATION_ACTION\x10\x00\x12\x0e\n\x06\x44\x45LETE\x10\xab\xf3\xe5\xbf\x01\x12.\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\xb3\xc1\xa9,\x12\x0b\n\x04STOP\x10\x82\x80\x9c\x01\"Y\n\x11OnHostMaintenance\x12!\n\x1dUNDEFINED_ON_HOST_MAINTENANCE\x10\x00\x12\x0e\n\x07MIGRATE\x10\x8b\xc3\x81O\x12\x11\n\tTERMINATE\x10\xc1\x9c\xcb\xfb\x01\"o\n\x11ProvisioningModel\x12 \n\x1cUNDEFINED_PROVISIONING_MODEL\x10\x00\x12\x19\n\x11RESERVATION_BOUND\x10\x8b\x96\xfc\x8b\x01\x12\x0b\n\x04SPOT\x10\x82\xe2\x9b\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x42\x14\n\x12_automatic_restartB\x16\n\x14_availability_domainB\x1d\n\x1b_host_error_timeout_secondsB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeoutB\x10\n\x0e_location_hintB\x13\n\x11_max_run_durationB\x10\n\x0e_min_node_cpusB\x16\n\x14_on_host_maintenanceB\x1a\n\x18_on_instance_stop_actionB\x0e\n\x0c_preemptibleB\x15\n\x13_provisioning_modelB\x13\n\x11_termination_time\"\xc7\x01\n\x16SchedulingNodeAffinity\x12\x12\n\x03key\x18\xdf\xbc\x06 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08operator\x18\xa4\xd1\xa8\x11 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x06values\x18\xa2\xba\x96w \x03(\t\"W\n\x08Operator\x12\x16\n\x12UNDEFINED_OPERATOR\x10\x00\x12\x07\n\x02IN\x10\xa5\x12\x12\r\n\x06NOT_IN\x10\xb1\xbc\xebL\x12\x1b\n\x14OPERATOR_UNSPECIFIED\x10\xfc\xff\xba=B\x06\n\x04_keyB\x0b\n\t_operator\"Z\n\x1eSchedulingOnInstanceStopAction\x12\"\n\x11\x64iscard_local_ssd\x18\xcf\xe9\xad\x98\x01 \x01(\x08H\x00\x88\x01\x01\x42\x14\n\x12_discard_local_ssd\"S\n\nScreenshot\x12\x19\n\x08\x63ontents\x18\x9a\xb6\xbd\xf1\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_contentsB\x07\n\x05_kind\"\xef\x03\n\x1eSecurityPoliciesAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12T\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x42.google.cloud.compute.v1.SecurityPoliciesAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.SecurityPoliciesScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xbf\x01\n7SecurityPoliciesListPreconfiguredExpressionSetsResponse\x12\x62\n\x1dpreconfigured_expression_sets\x18\xfa\x8c\xd7\xff\x01 \x01(\x0b\x32\x32.google.cloud.compute.v1.SecurityPoliciesWafConfigH\x00\x88\x01\x01\x42 \n\x1e_preconfigured_expression_sets\"\xaa\x01\n\x1aSecurityPoliciesScopedList\x12\x45\n\x11security_policies\x18\xef\xa6\xf7< \x03(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"r\n\x19SecurityPoliciesWafConfig\x12G\n\twaf_rules\x18\xd4\xc3\xdb# \x01(\x0b\x32,.google.cloud.compute.v1.PreconfiguredWafSetH\x00\x88\x01\x01\x42\x0c\n\n_waf_rules\"\xaf\n\n\x0eSecurityPolicy\x12k\n\x1a\x61\x64\x61ptive_protection_config\x18\xdf\xfb\xd1G \x01(\x0b\x32?.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigH\x00\x88\x01\x01\x12\x66\n\x17\x61\x64vanced_options_config\x18\xc0\xd3\x9d\xd6\x01 \x01(\x0b\x32<.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x63\n\x16\x64\x64os_protection_config\x18\xcd\x84\xff\x17 \x01(\x0b\x32;.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfigH\x03\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x08\x88\x01\x01\x12G\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x33.google.cloud.compute.v1.SecurityPolicy.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\t\x88\x01\x01\x12h\n\x18recaptcha_options_config\x18\xdb\xd4\xbd\xf7\x01 \x01(\x0b\x32=.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfigH\n\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12=\n\x05rules\x18\xf7\x91\xf5\x33 \x03(\x0b\x32+.google.cloud.compute.v1.SecurityPolicyRule\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\r\x88\x01\x01\x12W\n\x13user_defined_fields\x18\xa3\x89\xc0\r \x03(\x0b\x32\x37.google.cloud.compute.v1.SecurityPolicyUserDefinedField\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"d\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x12\n\x0b\x43LOUD_ARMOR\x10\xf5\x9c\xa4|\x12\x17\n\x10\x43LOUD_ARMOR_EDGE\x10\xc7\xa2\xc7w\x12\x1b\n\x13\x43LOUD_ARMOR_NETWORK\x10\xc4\xac\xf9\xe8\x01\x42\x1d\n\x1b_adaptive_protection_configB\x1a\n\x18_advanced_options_configB\x15\n\x13_creation_timestampB\x19\n\x17_ddos_protection_configB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\x1b\n\x19_recaptcha_options_configB\t\n\x07_regionB\x0c\n\n_self_linkB\x07\n\x05_type\"\xcd\x01\n&SecurityPolicyAdaptiveProtectionConfig\x12\x83\x01\n\x1alayer7_ddos_defense_config\x18\xa3\xd9\xc3\xd0\x01 \x01(\x0b\x32V.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigH\x00\x88\x01\x01\x42\x1d\n\x1b_layer7_ddos_defense_config\"\xf3\x02\n=SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x00\x88\x01\x01\x12 \n\x0frule_visibility\x18\xb5\xd8\x90\xd8\x01 \x01(\tH\x01\x88\x01\x01\x12\x83\x01\n\x11threshold_configs\x18\x9d\xab\xe3\x1c \x03(\x0b\x32\x65.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig\"R\n\x0eRuleVisibility\x12\x1d\n\x19UNDEFINED_RULE_VISIBILITY\x10\x00\x12\x0f\n\x07PREMIUM\x10\xb7\xb4\xc1\xbe\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x42\t\n\x07_enableB\x12\n\x10_rule_visibility\"\xd1\x06\nLSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig\x12\x30\n auto_deploy_confidence_threshold\x18\xbe\xed\x99( \x01(\x02H\x00\x88\x01\x01\x12*\n\x1a\x61uto_deploy_expiration_sec\x18\x89\xb5\x9a! \x01(\x05H\x01\x88\x01\x01\x12\x38\n\'auto_deploy_impacted_baseline_threshold\x18\xc3\x9c\xb9\x8b\x01 \x01(\x02H\x02\x88\x01\x01\x12+\n\x1a\x61uto_deploy_load_threshold\x18\x9a\xa0\x82\xf9\x01 \x01(\x02H\x03\x88\x01\x01\x12\'\n\x16\x64\x65tection_absolute_qps\x18\xe6\xfd\xd7\xb6\x01 \x01(\x02H\x04\x88\x01\x01\x12)\n\x18\x64\x65tection_load_threshold\x18\xcc\xca\xa3\xcd\x01 \x01(\x02H\x05\x88\x01\x01\x12\x33\n\"detection_relative_to_baseline_qps\x18\x85\x9b\xf6\x8a\x01 \x01(\x02H\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\xa5\x01\n\x1btraffic_granularity_configs\x18\xbe\xb4\xda( \x03(\x0b\x32}.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfigB#\n!_auto_deploy_confidence_thresholdB\x1d\n\x1b_auto_deploy_expiration_secB*\n(_auto_deploy_impacted_baseline_thresholdB\x1d\n\x1b_auto_deploy_load_thresholdB\x19\n\x17_detection_absolute_qpsB\x1b\n\x19_detection_load_thresholdB%\n#_detection_relative_to_baseline_qpsB\x07\n\x05_name\"\xd0\x02\ndSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig\x12)\n\x18\x65nable_each_unique_value\x18\xc5\x8a\xde\xdf\x01 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x02\x88\x01\x01\"`\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x18\n\x10HTTP_HEADER_HOST\x10\xe3\xe5\xbe\xb2\x01\x12\x11\n\tHTTP_PATH\x10\xfc\xd2\xc4\x94\x01\x12\x17\n\x10UNSPECIFIED_TYPE\x10\xe2\xee\xdb\x19\x42\x1b\n\x19_enable_each_unique_valueB\x07\n\x05_typeB\x08\n\x06_value\"\xde\x03\n#SecurityPolicyAdvancedOptionsConfig\x12p\n\x12json_custom_config\x18\xb9\xd9\x99\x35 \x01(\x0b\x32L.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigJsonCustomConfigH\x00\x88\x01\x01\x12\x1d\n\x0cjson_parsing\x18\xd9\x84\xda\x86\x01 \x01(\tH\x01\x88\x01\x01\x12\x19\n\tlog_level\x18\xc9\xbd\x84\x43 \x01(\tH\x02\x88\x01\x01\x12#\n\x17user_ip_request_headers\x18\xb2\xef\xe2\xc8\x01 \x03(\t\"k\n\x0bJsonParsing\x12\x1a\n\x16UNDEFINED_JSON_PARSING\x10\x00\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x12\x1c\n\x15STANDARD_WITH_GRAPHQL\x10\x92\xbf\x81\x33\"C\n\x08LogLevel\x12\x17\n\x13UNDEFINED_LOG_LEVEL\x10\x00\x12\r\n\x06NORMAL\x10\xe7\xe1\xe6L\x12\x0f\n\x07VERBOSE\x10\xe2\x8a\xe4\xfd\x01\x42\x15\n\x13_json_custom_configB\x0f\n\r_json_parsingB\x0c\n\n_log_level\"O\n3SecurityPolicyAdvancedOptionsConfigJsonCustomConfig\x12\x18\n\rcontent_types\x18\xb3\xe2\xa7\x08 \x03(\t\"\xc7\x01\n\"SecurityPolicyDdosProtectionConfig\x12 \n\x0f\x64\x64os_protection\x18\x94\x9f\x9b\x83\x01 \x01(\tH\x00\x88\x01\x01\"k\n\x0e\x44\x64osProtection\x12\x1d\n\x19UNDEFINED_DDOS_PROTECTION\x10\x00\x12\x0f\n\x08\x41\x44VANCED\x10\xa2\xb0\xb5\x1e\x12\x17\n\x10\x41\x44VANCED_PREVIEW\x10\x8b\xd9\xc0\x13\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\x42\x12\n\x10_ddos_protection\"\x83\x02\n\x12SecurityPolicyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.SecurityPolicy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x03\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\n\n\x08_warning\"`\n$SecurityPolicyRecaptchaOptionsConfig\x12\"\n\x11redirect_site_key\x18\xea\x84\xbc\xd5\x01 \x01(\tH\x00\x88\x01\x01\x42\x14\n\x12_redirect_site_key\"N\n\x17SecurityPolicyReference\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_security_policy\"\xf7\x06\n\x12SecurityPolicyRule\x12\x16\n\x06\x61\x63tion\x18\xb6\xfc\xbdY \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12[\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32;.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionH\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12I\n\x05match\x18\xc5\xb3\xb7\x31 \x01(\x0b\x32\x32.google.cloud.compute.v1.SecurityPolicyRuleMatcherH\x04\x88\x01\x01\x12Y\n\rnetwork_match\x18\xf4\xf8\xfa\xdc\x01 \x01(\x0b\x32\x39.google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcherH\x05\x88\x01\x01\x12k\n\x18preconfigured_waf_config\x18\xe3\x9f\x96\x38 \x01(\x0b\x32\x41.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigH\x06\x88\x01\x01\x12\x17\n\x07preview\x18\xc8\xc7\xa3h \x01(\x08H\x07\x88\x01\x01\x12\x19\n\x08priority\x18\xa4\xf3\xa1\xd4\x01 \x01(\x05H\x08\x88\x01\x01\x12_\n\x12rate_limit_options\x18\xfb\xc9\x9a \x01(\x0b\x32;.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsH\t\x88\x01\x01\x12\\\n\x10redirect_options\x18\xbb\x92\xeeM \x01(\x0b\x32:.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptionsH\n\x88\x01\x01\x42\t\n\x07_actionB\x0e\n\x0c_descriptionB\x10\n\x0e_header_actionB\x07\n\x05_kindB\x08\n\x06_matchB\x10\n\x0e_network_matchB\x1b\n\x19_preconfigured_waf_configB\n\n\x08_previewB\x0b\n\t_priorityB\x15\n\x13_rate_limit_optionsB\x13\n\x11_redirect_options\"\x95\x01\n\"SecurityPolicyRuleHttpHeaderAction\x12o\n\x17request_headers_to_adds\x18\xcd\xab\xfa) \x03(\x0b\x32K.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption\"\x90\x01\n2SecurityPolicyRuleHttpHeaderActionHttpHeaderOption\x12\x1b\n\x0bheader_name\x18\xfd\xc1\xc7\x34 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0cheader_value\x18\xbf\xf2\xeb` \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_header_nameB\x0f\n\r_header_value\"\x9b\x03\n\x19SecurityPolicyRuleMatcher\x12P\n\x06\x63onfig\x18\xc2\x86\xfey \x01(\x0b\x32\x38.google.cloud.compute.v1.SecurityPolicyRuleMatcherConfigH\x00\x88\x01\x01\x12\x33\n\x04\x65xpr\x18\xf5\xf3\xbe\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.ExprH\x01\x88\x01\x01\x12\\\n\x0c\x65xpr_options\x18\xd4\xc4\xec\xe7\x01 \x01(\x0b\x32=.google.cloud.compute.v1.SecurityPolicyRuleMatcherExprOptionsH\x02\x88\x01\x01\x12\x1f\n\x0eversioned_expr\x18\xbd\xe3\xd6\x99\x01 \x01(\tH\x03\x88\x01\x01\"@\n\rVersionedExpr\x12\x1c\n\x18UNDEFINED_VERSIONED_EXPR\x10\x00\x12\x11\n\nSRC_IPS_V1\x10\x89\xfd\xe8!B\t\n\x07_configB\x07\n\x05_exprB\x0f\n\r_expr_optionsB\x11\n\x0f_versioned_expr\"<\n\x1fSecurityPolicyRuleMatcherConfig\x12\x19\n\rsrc_ip_ranges\x18\xd3\x80\x87\xce\x01 \x03(\t\"\xaf\x01\n$SecurityPolicyRuleMatcherExprOptions\x12q\n\x11recaptcha_options\x18\xc6\xf6\xc7\xb9\x01 \x01(\x0b\x32M.google.cloud.compute.v1.SecurityPolicyRuleMatcherExprOptionsRecaptchaOptionsH\x00\x88\x01\x01\x42\x14\n\x12_recaptcha_options\"~\n4SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions\x12!\n\x16\x61\x63tion_token_site_keys\x18\x9d\xea\xc9\x1c \x03(\t\x12#\n\x17session_token_site_keys\x18\xfd\xf2\xfa\x9e\x01 \x03(\t\"\xc3\x02\n SecurityPolicyRuleNetworkMatcher\x12\x1a\n\x0e\x64\x65st_ip_ranges\x18\x91\xd7\xee\xa0\x01 \x03(\t\x12\x16\n\ndest_ports\x18\xb5\xb0\x93\xb5\x01 \x03(\t\x12\x17\n\x0cip_protocols\x18\xc3\x8f\xcd{ \x03(\t\x12\x13\n\x08src_asns\x18\xf2\xbd\x97\x38 \x03(\r\x12\x19\n\rsrc_ip_ranges\x18\xd3\x80\x87\xce\x01 \x03(\t\x12\x15\n\tsrc_ports\x18\xf7\xbb\x9e\xd4\x01 \x03(\t\x12\x1b\n\x10src_region_codes\x18\x96\xe3\x9f/ \x03(\t\x12n\n\x13user_defined_fields\x18\xa3\x89\xc0\r \x03(\x0b\x32N.google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch\"i\n5SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x06values\x18\xa2\xba\x96w \x03(\tB\x07\n\x05_name\"\x8d\x01\n(SecurityPolicyRulePreconfiguredWafConfig\x12\x61\n\nexclusions\x18\xe5\xf8\xbf\x63 \x03(\x0b\x32J.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusion\"\x82\x05\n1SecurityPolicyRulePreconfiguredWafConfigExclusion\x12|\n\x1arequest_cookies_to_exclude\x18\xf6\xde\xdfJ \x03(\x0b\x32U.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams\x12|\n\x1arequest_headers_to_exclude\x18\x9f\xa4\x93\x1e \x03(\x0b\x32U.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams\x12\x82\x01\n\x1frequest_query_params_to_exclude\x18\x88\x9e\xba\xa2\x01 \x03(\x0b\x32U.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams\x12y\n\x17request_uris_to_exclude\x18\x9e\xaa\x9f+ \x03(\x0b\x32U.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams\x12\x1b\n\x0ftarget_rule_ids\x18\xe3\xe3\xd5\xed\x01 \x03(\t\x12 \n\x0ftarget_rule_set\x18\x8d\xaf\xd6\xed\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_target_rule_set\"\xe7\x01\n.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit\x12 \n\x15\x63onsumer_reject_lists\x18\x9e\x99\xa5\x61 \x03(\t\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x17\n\x0c\x64omain_names\x18\x8d\xd8\x89\x03 \x03(\t\x12&\n\x15\x65nable_proxy_protocol\x18\x85\x87\xbc\xad\x01 \x01(\x08H\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x05\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x06\x88\x01\x01\x12M\n\x08metadata\x18\xaf\xf6\xb5) \x03(\x0b\x32\x38.google.cloud.compute.v1.ServiceAttachment.MetadataEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x17\n\x0bnat_subnets\x18\x98\x8f\xdb\xb2\x01 \x03(\t\x12(\n\x18producer_forwarding_rule\x18\xd1\xa8\x9cv \x01(\tH\x08\x88\x01\x01\x12,\n\x1bpropagated_connection_limit\x18\xfe\xc8\xd3\x9e\x01 \x01(\rH\t\x88\x01\x01\x12L\n\x19psc_service_attachment_id\x18\xee\xfa\xcf\xfb\x01 \x01(\x0b\x32 .google.cloud.compute.v1.Uint128H\n\x88\x01\x01\x12%\n\x15reconcile_connections\x18\xe4\xc3\xeb; \x01(\x08H\x0b\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0c\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12\x1d\n\x0etarget_service\x18\x87\xfcN \x01(\tH\x0e\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x95\x01\n\x14\x43onnectionPreference\x12#\n\x1fUNDEFINED_CONNECTION_PREFERENCE\x10\x00\x12\x17\n\x10\x41\x43\x43\x45PT_AUTOMATIC\x10\x94\xf7\xf0#\x12\x15\n\rACCEPT_MANUAL\x10\xdd\xed\xf1\xb1\x01\x12(\n!CONNECTION_PREFERENCE_UNSPECIFIED\x10\xb4\xa0\xbf\x10\x42\x18\n\x16_connection_preferenceB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x18\n\x16_enable_proxy_protocolB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x1b\n\x19_producer_forwarding_ruleB\x1e\n\x1c_propagated_connection_limitB\x1c\n\x1a_psc_service_attachment_idB\x18\n\x16_reconcile_connectionsB\t\n\x07_regionB\x0c\n\n_self_linkB\x11\n\x0f_target_service\"\xd4\x03\n\x1fServiceAttachmentAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12U\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x43.google.cloud.compute.v1.ServiceAttachmentAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x63\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.google.cloud.compute.v1.ServiceAttachmentsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xc4\x03\n\"ServiceAttachmentConnectedEndpoint\x12 \n\x10\x63onsumer_network\x18\xe5\xdd\xa4y \x01(\tH\x00\x88\x01\x01\x12\x18\n\x08\x65ndpoint\x18\x95\xbb\x9c> \x01(\tH\x01\x88\x01\x01\x12,\n\x1bpropagated_connection_count\x18\xd2\xd3\xe3\x9a\x01 \x01(\rH\x02\x88\x01\x01\x12\"\n\x11psc_connection_id\x18\xdd\xa5\xa3\x8b\x01 \x01(\x04H\x03\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x04\x88\x01\x01\"\x94\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0f\n\x08\x41\x43\x43\x45PTED\x10\xa7\x9f\xd2u\x12\x0e\n\x06\x43LOSED\x10\xec\xaa\xa3\xb5\x01\x12\x17\n\x0fNEEDS_ATTENTION\x10\xbc\x8b\xa2\xa4\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x19\n\x12STATUS_UNSPECIFIED\x10\xca\xcc\x8b\x14\x42\x13\n\x11_consumer_networkB\x0b\n\t_endpointB\x1e\n\x1c_propagated_connection_countB\x14\n\x12_psc_connection_idB\t\n\x07_status\"\xc5\x01\n%ServiceAttachmentConsumerProjectLimit\x12 \n\x10\x63onnection_limit\x18\x9a\x9e\xd4> \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0bnetwork_url\x18\xde\x8f\xe6\x62 \x01(\tH\x01\x88\x01\x01\x12\"\n\x11project_id_or_num\x18\xa8\x8a\xe5\xa6\x01 \x01(\tH\x02\x88\x01\x01\x42\x13\n\x11_connection_limitB\x0e\n\x0c_network_urlB\x14\n\x12_project_id_or_num\"\xb3\x02\n\x15ServiceAttachmentList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12<\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32*.google.cloud.compute.v1.ServiceAttachment\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb2\x01\n\x1cServiceAttachmentsScopedList\x12K\n\x13service_attachments\x18\xa6\x92\xba\x92\x01 \x03(\x0b\x32*.google.cloud.compute.v1.ServiceAttachment\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xa6\x02\n&SetBackendServiceTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8a\x01\n7target_ssl_proxies_set_backend_service_request_resource\x18\xa4\xe9\xa8\x42 \x01(\x0b\x32\x41.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequestB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa7\x02\n&SetBackendServiceTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8b\x01\n7target_tcp_proxies_set_backend_service_request_resource\x18\xef\xd1\xc2\x82\x01 \x01(\x0b\x32\x41.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequestB\x03\xe0\x41\x02\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb1\x02\n\x1aSetBackupTargetPoolRequest\x12\x1e\n\x0e\x66\x61ilover_ratio\x18\xfe\x94\xb4\x65 \x01(\x02H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x12T\n\x19target_reference_resource\x18\xf0\xb7\xdd\xf9\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetReferenceB\x03\xe0\x41\x02\x42\x11\n\x0f_failover_ratioB\r\n\x0b_request_id\"\xae\x02\n(SetCertificateMapTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8f\x01\n9target_https_proxies_set_certificate_map_request_resource\x18\xbb\xb6\xfe\xde\x01 \x01(\x0b\x32\x43.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequestB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa7\x02\n&SetCertificateMapTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8b\x01\n7target_ssl_proxies_set_certificate_map_request_resource\x18\xba\x96\x83\xa4\x01 \x01(\x0b\x32\x41.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequestB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xea\x01\n\x1fSetCloudArmorTierProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12y\n.projects_set_cloud_armor_tier_request_resource\x18\xcf\xfb\xde$ \x01(\x0b\x32\x39.google.cloud.compute.v1.ProjectsSetCloudArmorTierRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x8c\x03\n*SetCommonInstanceMetadataOperationMetadata\x12$\n\x13\x63lient_operation_id\x18\xe7\x8d\xde\x8d\x01 \x01(\tH\x00\x88\x01\x01\x12\x83\x01\n\x17per_location_operations\x18\x94\xd1\x82\xc3\x01 \x03(\x0b\x32^.google.cloud.compute.v1.SetCommonInstanceMetadataOperationMetadata.PerLocationOperationsEntry\x1a\x99\x01\n\x1aPerLocationOperationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12j\n\x05value\x18\x02 \x01(\x0b\x32[.google.cloud.compute.v1.SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo:\x02\x38\x01\x42\x16\n\x14_client_operation_id\"\xb2\x02\nBSetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo\x12\x36\n\x05\x65rror\x18\x88\xa4\x93. \x01(\x0b\x32\x1f.google.cloud.compute.v1.StatusH\x00\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x01\x88\x01\x01\"\x88\x01\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\tABANDONED\x10\xb4\xc3\x80\'\x12\x0b\n\x04\x44ONE\x10\x82\xb7\x80\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x12\n\nPROPAGATED\x10\xdb\xb4\x82\xf2\x01\x12\x12\n\x0bPROPAGATING\x10\x86\x83\xcbN\x12\x13\n\x0bUNSPECIFIED\x10\x97\xbe\x98\xfb\x01\x42\x08\n\x06_errorB\x08\n\x06_state\"\xbe\x01\n\'SetCommonInstanceMetadataProjectRequest\x12\x45\n\x11metadata_resource\x18\x9e\xbe\xe6\x8a\x01 \x01(\x0b\x32!.google.cloud.compute.v1.MetadataB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xf7\x01\n#SetDefaultNetworkTierProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x81\x01\n2projects_set_default_network_tier_request_resource\x18\x8a\xc0\xa3< \x01(\x0b\x32=.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe9\x01\n$SetDeletionProtectionInstanceRequest\x12$\n\x13\x64\x65letion_protection\x18\xea\xff\xb2\xda\x01 \x01(\x08H\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x16\n\x14_deletion_protectionB\r\n\x0b_request_id\"\xe2\x01\n SetDiskAutoDeleteInstanceRequest\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1b\n\x0b\x64\x65vice_name\x18\xd4\xb5\x9a \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xff\x01\n)SetEdgeSecurityPolicyBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x82\x02\n*SetEdgeSecurityPolicyBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbb\x01\n SetIamPolicyBackendBucketRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xbc\x01\n!SetIamPolicyBackendServiceRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xc4\x01\n\x17SetIamPolicyDiskRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xbb\x01\n!SetIamPolicyFirewallPolicyRequest\x12|\n/global_organization_set_policy_request_resource\x18\xde\x94\xccT \x01(\x0b\x32;.google.cloud.compute.v1.GlobalOrganizationSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xb3\x01\n\x18SetIamPolicyImageRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xc8\x01\n\x1bSetIamPolicyInstanceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xbe\x01\n#SetIamPolicyInstanceTemplateRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xcf\x01\n\"SetIamPolicyInstantSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xc9\x01\n.SetIamPolicyInterconnectAttachmentGroupRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n$SetIamPolicyInterconnectGroupRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xb5\x01\n\x1aSetIamPolicyLicenseRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xba\x01\n\x1fSetIamPolicyMachineImageRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xd7\x01\n$SetIamPolicyNetworkAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n(SetIamPolicyNetworkFirewallPolicyRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xc9\x01\n\x1cSetIamPolicyNodeGroupRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xd2\x01\n\x1fSetIamPolicyNodeTemplateRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xda\x01\n\'SetIamPolicyRegionBackendServiceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xd0\x01\n\x1dSetIamPolicyRegionDiskRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xdb\x01\n(SetIamPolicyRegionInstantSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xe1\x01\n.SetIamPolicyRegionNetworkFirewallPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xcb\x01\n\x1eSetIamPolicyReservationRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xd4\x01\n!SetIamPolicyResourcePolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xd7\x01\n$SetIamPolicyServiceAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xb6\x01\n\x1bSetIamPolicySnapshotRequest\x12\x64\n\"global_set_policy_request_resource\x18\xb2\xe7\xdb\xa0\x01 \x01(\x0b\x32/.google.cloud.compute.v1.GlobalSetPolicyRequestB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xcb\x01\n\x1eSetIamPolicyStoragePoolRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n zone_set_policy_request_resource\x18\xbb\xb8\x98\xb6\x01 \x01(\x0b\x32-.google.cloud.compute.v1.ZoneSetPolicyRequestB\x03\xe0\x41\x02\"\xd0\x01\n\x1dSetIamPolicySubnetworkRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"region_set_policy_request_resource\x18\x83\xc7\xeb\x83\x01 \x01(\x0b\x32/.google.cloud.compute.v1.RegionSetPolicyRequestB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\"\xde\x02\n.SetInstanceTemplateInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x98\x01\n>instance_group_managers_set_instance_template_request_resource\x18\xc5\xd9\xd6\x04 \x01(\x0b\x32H.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe4\x02\n4SetInstanceTemplateRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x94\x01\n.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequestB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x9d\x02\n#SetProxyHeaderTargetTcpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x84\x01\n4target_tcp_proxies_set_proxy_header_request_resource\x18\xc3\x98\xf1h \x01(\x0b\x32>.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequestB\x03\xe0\x41\x02\x12!\n\x10target_tcp_proxy\x18\xe2\xd6\xf0\xef\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa7\x02\n&SetQuicOverrideTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8a\x01\n7target_https_proxies_set_quic_override_request_resource\x18\xe2\xf5\xe3\" \x01(\x0b\x32\x41.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequestB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xee\x01\n\x1cSetSchedulingInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12I\n\x13scheduling_resource\x18\xd9\xac\xee\xdc\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SchedulingB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xfe\x01\n&SetSecurityPolicyBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa3\x02\n SetSecurityPolicyInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12z\n.instances_set_security_policy_request_resource\x18\x8a\xd1\xbav \x01(\x0b\x32:.google.cloud.compute.v1.InstancesSetSecurityPolicyRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa5\x02\n,SetSecurityPolicyRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x9b\x02\n&SetSecurityPolicyTargetInstanceRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x12 \n\x0ftarget_instance\x18\x83\x8f\x96\x8a\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x96\x02\n\"SetSecurityPolicyTargetPoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x64\n\"security_policy_reference_resource\x18\xf0\xb4\xab\x61 \x01(\x0b\x32\x30.google.cloud.compute.v1.SecurityPolicyReferenceB\x03\xe0\x41\x02\x12\x1b\n\x0btarget_pool\x18\x8a\xe4\xf8\x1d \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa4\x02\n SetServiceAccountInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12{\n.instances_set_service_account_request_resource\x18\xb8\x9e\xb2\x83\x01 \x01(\x0b\x32:.google.cloud.compute.v1.InstancesSetServiceAccountRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb0\x02\n1SetShieldedInstanceIntegrityPolicyInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12v\n+shielded_instance_integrity_policy_resource\x18\xb6\xdc\x8d\xc3\x01 \x01(\x0b\x32\x38.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicyB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe5\x02\n/SetSslCertificatesRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9e\x01\nAregion_target_https_proxies_set_ssl_certificates_request_resource\x18\x87\x84\xa6\xba\x01 \x01(\x0b\x32J.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xb0\x02\n)SetSslCertificatesTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x90\x01\n:target_https_proxies_set_ssl_certificates_request_resource\x18\xdc\xab\xb2j \x01(\x0b\x32\x44.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequestB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xa9\x02\n\'SetSslCertificatesTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x8c\x01\n8target_ssl_proxies_set_ssl_certificates_request_resource\x18\xbd\xcb\xc5\x46 \x01(\x0b\x32\x42.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequestB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf3\x01\n#SetSslPolicyTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Z\n\x1dssl_policy_reference_resource\x18\xbc\xf4\x9fp \x01(\x0b\x32+.google.cloud.compute.v1.SslPolicyReferenceB\x03\xe0\x41\x02\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf0\x01\n!SetSslPolicyTargetSslProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12Z\n\x1dssl_policy_reference_resource\x18\xbc\xf4\x9fp \x01(\x0b\x32+.google.cloud.compute.v1.SslPolicyReferenceB\x03\xe0\x41\x02\x12!\n\x10target_ssl_proxy\x18\xcd\xba\xc6\xa1\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xdc\x01\n\x16SetTagsInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12=\n\rtags_resource\x18\xf4\x9a\x85\x9e\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.TagsB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x87\x02\n\x1eSetTargetForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12T\n\x19target_reference_resource\x18\xf0\xb7\xdd\xf9\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xec\x01\n$SetTargetGlobalForwardingRuleRequest\x12 \n\x0f\x66orwarding_rule\x18\xfe\xa5\xdd\x80\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12T\n\x19target_reference_resource\x18\xf0\xb7\xdd\xf9\x01 \x01(\x0b\x32(.google.cloud.compute.v1.TargetReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd0\x02\n)SetTargetPoolsInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8f\x01\n9instance_group_managers_set_target_pools_request_resource\x18\x88\x86\x88\x86\x01 \x01(\x0b\x32\x43.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe6\x02\n/SetTargetPoolsRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9b\x01\n@region_instance_group_managers_set_target_pools_request_resource\x18\xfd\xca\xc5% \x01(\x0b\x32I.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x90\x02\n%SetUrlMapRegionTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1aurl_map_reference_resource\x18\x95\xe6\x8e\xbe\x01 \x01(\x0b\x32(.google.cloud.compute.v1.UrlMapReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x92\x02\n&SetUrlMapRegionTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1aurl_map_reference_resource\x18\x95\xe6\x8e\xbe\x01 \x01(\x0b\x32(.google.cloud.compute.v1.UrlMapReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xe9\x01\n\x1fSetUrlMapTargetHttpProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12!\n\x11target_http_proxy\x18\xe5\xbe\xd2\x62 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1aurl_map_reference_resource\x18\x95\xe6\x8e\xbe\x01 \x01(\x0b\x32(.google.cloud.compute.v1.UrlMapReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xeb\x01\n SetUrlMapTargetHttpsProxyRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12target_https_proxy\x18\xec\xb0\xfa\x18 \x01(\tB\x03\xe0\x41\x02\x12U\n\x1aurl_map_reference_resource\x18\x95\xe6\x8e\xbe\x01 \x01(\x0b\x32(.google.cloud.compute.v1.UrlMapReferenceB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xd0\x01\n\"SetUsageExportBucketProjectRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\\\n\x1eusage_export_location_resource\x18\xeb\xcc\xd4\t \x01(\x0b\x32,.google.cloud.compute.v1.UsageExportLocationB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xfa\x02\n\rShareSettings\x12N\n\x0bproject_map\x18\xb6\xd6\xff? \x03(\x0b\x32\x36.google.cloud.compute.v1.ShareSettings.ProjectMapEntry\x12\x1b\n\nshare_type\x18\x9a\x97\xb8\xab\x01 \x01(\tH\x00\x88\x01\x01\x1a\x66\n\x0fProjectMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.ShareSettingsProjectConfig:\x02\x38\x01\"\x84\x01\n\tShareType\x12\x18\n\x14UNDEFINED_SHARE_TYPE\x10\x00\x12\x0c\n\x05LOCAL\x10\xcb\xce\xcf\"\x12\x14\n\x0cORGANIZATION\x10\xb3\xaa\x8f\x83\x01\x12\x1e\n\x16SHARE_TYPE_UNSPECIFIED\x10\x92\xbc\xf6\xeb\x01\x12\x19\n\x11SPECIFIC_PROJECTS\x10\xe7\xb1\xee\xa5\x01\x42\r\n\x0b_share_type\"G\n\x1aShareSettingsProjectConfig\x12\x1a\n\nproject_id\x18\x81\xc8\xd2T \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_project_id\"\xce\x01\n\x16ShieldedInstanceConfig\x12,\n\x1b\x65nable_integrity_monitoring\x18\xb6\xdb\x87\xc3\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x12\x65nable_secure_boot\x18\xfe\x83\xf6: \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0b\x65nable_vtpm\x18\xf7\xe4\xdbV \x01(\x08H\x02\x88\x01\x01\x42\x1e\n\x1c_enable_integrity_monitoringB\x15\n\x13_enable_secure_bootB\x0e\n\x0c_enable_vtpm\"\x8b\x02\n\x18ShieldedInstanceIdentity\x12W\n\x0e\x65ncryption_key\x18\xa3\xc7\xe9\xe8\x01 \x01(\x0b\x32\x36.google.cloud.compute.v1.ShieldedInstanceIdentityEntryH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12T\n\x0bsigning_key\x18\xa5\x90\x85\x99\x01 \x01(\x0b\x32\x36.google.cloud.compute.v1.ShieldedInstanceIdentityEntryH\x02\x88\x01\x01\x42\x11\n\x0f_encryption_keyB\x07\n\x05_kindB\x0e\n\x0c_signing_key\"i\n\x1dShieldedInstanceIdentityEntry\x12\x18\n\x07\x65k_cert\x18\x9d\xdc\xd4\xd6\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x06\x65k_pub\x18\xe4\xd7\xa8\x93\x01 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_ek_certB\t\n\x07_ek_pub\"h\n\x1fShieldedInstanceIntegrityPolicy\x12(\n\x18update_auto_learn_policy\x18\xa7\xc4\x87u \x01(\x08H\x00\x88\x01\x01\x42\x1b\n\x19_update_auto_learn_policy\"`\n\x0cSignedUrlKey\x12\x19\n\x08key_name\x18\xeb\xf0\xee\xee\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\tkey_value\x18\x91\x9f\xb0\xf0\x01 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_key_nameB\x0c\n\n_key_value\"\xfc\x01\n\'SimulateMaintenanceEventInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12,\n\x1bwith_extended_notifications\x18\xfb\xd7\xc9\xc1\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x1e\n\x1c_with_extended_notifications\"\xc1\x02\n(SimulateMaintenanceEventNodeGroupRequest\x12\x1b\n\nnode_group\x18\x82\xfc\x8b\xe0\x01 \x01(\tB\x03\xe0\x41\x02\x12\x8c\x01\n7node_groups_simulate_maintenance_event_request_resource\x18\xdc\xf9\xcb\xa7\x01 \x01(\x0b\x32\x42.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xcd\x14\n\x08Snapshot\x12\x1d\n\x0c\x61rchitecture\x18\xd3\xd2\xb1\x90\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0c\x61uto_created\x18\xd8\xc8\x9b\xdd\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\nchain_name\x18\xc9\xda\xdd \x01(\tH\x02\x88\x01\x01\x12#\n\x13\x63reation_size_bytes\x18\x8d\xe8\xe5; \x01(\x03H\x03\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\x1d\n\x0c\x64isk_size_gb\x18\xb7\x9a\xe7\x96\x01 \x01(\x03H\x06\x88\x01\x01\x12\x1f\n\x0e\x64ownload_bytes\x18\xf4\xcb\xb9\xcf\x01 \x01(\x03H\x07\x88\x01\x01\x12+\n\x1b\x65nable_confidential_compute\x18\xbc\xeb\xd9\x30 \x01(\x08H\x08\x88\x01\x01\x12\x1c\n\x0bguest_flush\x18\xdd\x93\xec\xb7\x01 \x01(\x08H\t\x88\x01\x01\x12\x45\n\x11guest_os_features\x18\xd1\xe0\xe7% \x03(\x0b\x32\'.google.cloud.compute.v1.GuestOsFeature\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\n\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x0b\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x0c\x88\x01\x01\x12\x41\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32-.google.cloud.compute.v1.Snapshot.LabelsEntry\x12\x18\n\rlicense_codes\x18\xa8\x85\xd8\x15 \x03(\x03\x12\x14\n\x08licenses\x18\xd2\x88\x80\xa1\x01 \x03(\t\x12\x1e\n\rlocation_hint\x18\xd1\x81\x92\xa7\x01 \x01(\tH\r\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1e\n\rsatisfies_pzi\x18\xa1\xdd\xab\xe5\x01 \x01(\x08H\x0f\x88\x01\x01\x12\x1e\n\rsatisfies_pzs\x18\xab\xdd\xab\xe5\x01 \x01(\x08H\x10\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x11\x88\x01\x01\x12W\n\x17snapshot_encryption_key\x18\xfe\xf6\xd4\x14 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x12\x88\x01\x01\x12\x1d\n\rsnapshot_type\x18\xd5\xd9\xa5; \x01(\tH\x13\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x14\x88\x01\x01\x12[\n\x1asource_disk_encryption_key\x18\xe1\xa0\xb8\xfd\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x15\x88\x01\x01\x12\x34\n#source_disk_for_recovery_checkpoint\x18\xfe\xe1\xca\xab\x01 \x01(\tH\x16\x88\x01\x01\x12\x1f\n\x0esource_disk_id\x18\xd9\xcd\xc9\xd8\x01 \x01(\tH\x17\x88\x01\x01\x12\'\n\x17source_instant_snapshot\x18\x86\x84\xc3h \x01(\tH\x18\x88\x01\x01\x12g\n&source_instant_snapshot_encryption_key\x18\xfc\x85\x94\xd0\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x19\x88\x01\x01\x12+\n\x1asource_instant_snapshot_id\x18\xf4\xd3\x90\x89\x01 \x01(\tH\x1a\x88\x01\x01\x12/\n\x1fsource_snapshot_schedule_policy\x18\x83\xb6\xb5p \x01(\tH\x1b\x88\x01\x01\x12\x32\n\"source_snapshot_schedule_policy_id\x18\xd7\xa7\xce! \x01(\tH\x1c\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x1d\x88\x01\x01\x12\x1e\n\rstorage_bytes\x18\xa7\xbb\xbd\xca\x01 \x01(\x03H\x1e\x88\x01\x01\x12%\n\x14storage_bytes_status\x18\x8a\xab\x80\xea\x01 \x01(\tH\x1f\x88\x01\x01\x12\x1d\n\x11storage_locations\x18\x9a\xed\xb3\x9c\x01 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\x0c\x41rchitecture\x12\x1a\n\x16UNDEFINED_ARCHITECTURE\x10\x00\x12 \n\x18\x41RCHITECTURE_UNSPECIFIED\x10\xab\xd4\x9d\xbc\x01\x12\x0c\n\x05\x41RM64\x10\xfa\xcb\xe9\x1d\x12\x0e\n\x06X86_64\x10\xc7\xa4\xe6\xca\x01\"N\n\x0cSnapshotType\x12\x1b\n\x17UNDEFINED_SNAPSHOT_TYPE\x10\x00\x12\x0f\n\x07\x41RCHIVE\x10\xa2\xd9\xd1\xf1\x01\x12\x10\n\x08STANDARD\x10\xbd\x9d\x8c\xe7\x01\"r\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x10\n\tUPLOADING\x10\xa1\x9c\xcd\x7f\"]\n\x12StorageBytesStatus\x12\"\n\x1eUNDEFINED_STORAGE_BYTES_STATUS\x10\x00\x12\x10\n\x08UPDATING\x10\xc6\xee\xec\xeb\x01\x12\x11\n\nUP_TO_DATE\x10\xce\xa2\xa7\x30\x42\x0f\n\r_architectureB\x0f\n\r_auto_createdB\r\n\x0b_chain_nameB\x16\n\x14_creation_size_bytesB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0f\n\r_disk_size_gbB\x11\n\x0f_download_bytesB\x1e\n\x1c_enable_confidential_computeB\x0e\n\x0c_guest_flushB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x10\n\x0e_location_hintB\x07\n\x05_nameB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzsB\x0c\n\n_self_linkB\x1a\n\x18_snapshot_encryption_keyB\x10\n\x0e_snapshot_typeB\x0e\n\x0c_source_diskB\x1d\n\x1b_source_disk_encryption_keyB&\n$_source_disk_for_recovery_checkpointB\x11\n\x0f_source_disk_idB\x1a\n\x18_source_instant_snapshotB)\n\'_source_instant_snapshot_encryption_keyB\x1d\n\x1b_source_instant_snapshot_idB\"\n _source_snapshot_schedule_policyB%\n#_source_snapshot_schedule_policy_idB\t\n\x07_statusB\x10\n\x0e_storage_bytesB\x17\n\x15_storage_bytes_status\"\xa1\x02\n\x0cSnapshotList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32!.google.cloud.compute.v1.Snapshot\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x8c\x01\n\x10SnapshotSettings\x12\x63\n\x10storage_location\x18\xf9\xd1\xe0\xdb\x01 \x01(\x0b\x32@.google.cloud.compute.v1.SnapshotSettingsStorageLocationSettingsH\x00\x88\x01\x01\x42\x13\n\x11_storage_location\"\xde\x03\n\'SnapshotSettingsStorageLocationSettings\x12\x66\n\tlocations\x18\xde\xae\x91\xc5\x01 \x03(\x0b\x32O.google.cloud.compute.v1.SnapshotSettingsStorageLocationSettings.LocationsEntry\x12\x16\n\x06policy\x18\xb2\xca\xb6+ \x01(\tH\x00\x88\x01\x01\x1a\x8b\x01\n\x0eLocationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12h\n\x05value\x18\x02 \x01(\x0b\x32Y.google.cloud.compute.v1.SnapshotSettingsStorageLocationSettingsStorageLocationPreference:\x02\x38\x01\"\x99\x01\n\x06Policy\x12\x14\n\x10UNDEFINED_POLICY\x10\x00\x12\x14\n\x0cLOCAL_REGION\x10\xe8\xec\xb5\xc0\x01\x12\x1b\n\x14NEAREST_MULTI_REGION\x10\xbb\xfe\xa7\x65\x12\x1a\n\x12SPECIFIC_LOCATIONS\x10\xf1\xc8\xc7\x85\x01\x12*\n#STORAGE_LOCATION_POLICY_UNSPECIFIED\x10\xf0\x90\xc2wB\t\n\x07_policy\"a\n@SnapshotSettingsStorageLocationSettingsStorageLocationPreference\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xb5\x01\n\x17SourceDiskEncryptionKey\x12T\n\x13\x64isk_encryption_key\x18\x85\xed\xc4\x81\x01 \x01(\x0b\x32..google.cloud.compute.v1.CustomerEncryptionKeyH\x00\x88\x01\x01\x12\x1c\n\x0bsource_disk\x18\xc1\xee\xb4\xd7\x01 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_disk_encryption_keyB\x0e\n\x0c_source_disk\"a\n\x14SourceInstanceParams\x12I\n\x0c\x64isk_configs\x18\xcf\xd9\xaap \x03(\x0b\x32\x30.google.cloud.compute.v1.DiskInstantiationConfig\"\xf1\x08\n\x18SourceInstanceProperties\x12\x1f\n\x0e\x63\x61n_ip_forward\x18\xfc\x86\x84\xdf\x01 \x01(\x08H\x00\x88\x01\x01\x12$\n\x13\x64\x65letion_protection\x18\xea\xff\xb2\xda\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12<\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32*.google.cloud.compute.v1.SavedAttachedDisk\x12J\n\x12guest_accelerators\x18\xef\xcc\x87\xdd\x01 \x03(\x0b\x32*.google.cloud.compute.v1.AcceleratorConfig\x12*\n\x1akey_revocation_action_type\x18\xe2\xdc\xc0p \x01(\tH\x03\x88\x01\x01\x12Q\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32=.google.cloud.compute.v1.SourceInstanceProperties.LabelsEntry\x12\x1c\n\x0cmachine_type\x18\xb2\xb0\xcal \x01(\tH\x04\x88\x01\x01\x12;\n\x08metadata\x18\xaf\xf6\xb5) \x01(\x0b\x32!.google.cloud.compute.v1.MetadataH\x05\x88\x01\x01\x12 \n\x10min_cpu_platform\x18\xf7\x9b\xeas \x01(\tH\x06\x88\x01\x01\x12H\n\x12network_interfaces\x18\x8b\xda\x92\x19 \x03(\x0b\x32).google.cloud.compute.v1.NetworkInterface\x12@\n\nscheduling\x18\x94\xcb\xb1\xb8\x01 \x01(\x0b\x32#.google.cloud.compute.v1.SchedulingH\x07\x88\x01\x01\x12\x45\n\x10service_accounts\x18\xb0\xc4\xab\x84\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.ServiceAccount\x12\x33\n\x04tags\x18\x99\xe8\xd8\x01 \x01(\x0b\x32\x1d.google.cloud.compute.v1.TagsH\x08\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8d\x01\n\x17KeyRevocationActionType\x12(\n$UNDEFINED_KEY_REVOCATION_ACTION_TYPE\x10\x00\x12.\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\xda\x91\xde\xde\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x0b\n\x04STOP\x10\x82\x80\x9c\x01\x42\x11\n\x0f_can_ip_forwardB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\r\n\x0b_schedulingB\x07\n\x05_tags\"\xa0\x06\n\x0eSslCertificate\x12\x1c\n\x0b\x63\x65rtificate\x18\x97\x83\xfd\xa2\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x65xpire_time\x18\xed\xd3\x91\xd2\x01 \x01(\tH\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12V\n\x07managed\x18\x9f\x9f\xa4\x8e\x01 \x01(\x0b\x32<.google.cloud.compute.v1.SslCertificateManagedSslCertificateH\x06\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12\x1c\n\x0bprivate_key\x18\xa3\xf3\xa5\xac\x01 \x01(\tH\x08\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\t\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\n\x88\x01\x01\x12_\n\x0cself_managed\x18\xac\xf3\x81\x9d\x01 \x01(\x0b\x32@.google.cloud.compute.v1.SslCertificateSelfManagedSslCertificateH\x0b\x88\x01\x01\x12%\n\x19subject_alternative_names\x18\xe3\xef\x93\xfc\x01 \x03(\t\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x0c\x88\x01\x01\"[\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x0f\n\x07MANAGED\x10\xff\xb6\xd2\xe4\x01\x12\x14\n\x0cSELF_MANAGED\x10\x8c\xfb\x93\xcf\x01\x12\x18\n\x10TYPE_UNSPECIFIED\x10\x92\xfb\xdb\xd0\x01\x42\x0e\n\x0c_certificateB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_expire_timeB\x05\n\x03_idB\x07\n\x05_kindB\n\n\x08_managedB\x07\n\x05_nameB\x0e\n\x0c_private_keyB\t\n\x07_regionB\x0c\n\n_self_linkB\x0f\n\r_self_managedB\x07\n\x05_type\"\xcb\x03\n\x1cSslCertificateAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.SslCertificateAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a`\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.SslCertificatesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x02\n\x12SslCertificateList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.SslCertificate\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xd0\x03\n#SslCertificateManagedSslCertificate\x12i\n\rdomain_status\x18\xcd\xa7\xe7\xab\x01 \x03(\x0b\x32N.google.cloud.compute.v1.SslCertificateManagedSslCertificate.DomainStatusEntry\x12\x12\n\x07\x64omains\x18\xaf\x88\x9bl \x03(\t\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x00\x88\x01\x01\x1a\x33\n\x11\x44omainStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd1\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12.\n&MANAGED_CERTIFICATE_STATUS_UNSPECIFIED\x10\xd2\xc5\xb3\xe2\x01\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x1a\n\x13PROVISIONING_FAILED\x10\xcf\xab\xd0$\x12\'\n\x1fPROVISIONING_FAILED_PERMANENTLY\x10\xab\xf0\x92\x83\x01\x12\x16\n\x0eRENEWAL_FAILED\x10\x84\xbe\xa1\xcf\x01\x42\t\n\x07_status\"\x85\x01\n\'SslCertificateSelfManagedSslCertificate\x12\x1c\n\x0b\x63\x65rtificate\x18\x97\x83\xfd\xa2\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bprivate_key\x18\xa3\xf3\xa5\xac\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_certificateB\x0e\n\x0c_private_key\"\xa9\x01\n\x19SslCertificatesScopedList\x12\x45\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.SslCertificate\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xe0\x03\n\x19SslPoliciesAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12O\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32=.google.cloud.compute.v1.SslPoliciesAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.SslPoliciesScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0fSslPoliciesList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x34\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\".google.cloud.compute.v1.SslPolicy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"?\n(SslPoliciesListAvailableFeaturesResponse\x12\x13\n\x08\x66\x65\x61tures\x18\xbd\xc8\xb3u \x03(\t\"\x9b\x01\n\x15SslPoliciesScopedList\x12;\n\x0cssl_policies\x18\xa3\xe4\x8d\x64 \x03(\x0b\x32\".google.cloud.compute.v1.SslPolicy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xd9\x05\n\tSslPolicy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1a\n\x0f\x63ustom_features\x18\xcb\xb2\xcb\x10 \x03(\t\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x10\x65nabled_features\x18\xfb\xc6\xd2\xdf\x01 \x03(\t\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x0fmin_tls_version\x18\xa7\xe6\xf1\x03 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07profile\x18\xa9\x93\xbal \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12\x37\n\x08warnings\x18\xd7\x88\xc1\xed\x01 \x03(\x0b\x32!.google.cloud.compute.v1.Warnings\"^\n\rMinTlsVersion\x12\x1d\n\x19UNDEFINED_MIN_TLS_VERSION\x10\x00\x12\x0e\n\x07TLS_1_0\x10\xbe\xa4\xe5\x0f\x12\x0e\n\x07TLS_1_1\x10\xbf\xa4\xe5\x0f\x12\x0e\n\x07TLS_1_2\x10\xc0\xa4\xe5\x0f\"e\n\x07Profile\x12\x15\n\x11UNDEFINED_PROFILE\x10\x00\x12\x11\n\nCOMPATIBLE\x10\xd4\x8d\xc3U\x12\x0e\n\x06\x43USTOM\x10\xf1\xfe\xa5\xb9\x01\x12\r\n\x06MODERN\x10\x9f\xbe\xf9>\x12\x11\n\nRESTRICTED\x10\xdb\xe8\xdb|B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_min_tls_versionB\x07\n\x05_nameB\n\n\x08_profileB\t\n\x07_regionB\x0c\n\n_self_link\"@\n\x12SslPolicyReference\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_ssl_policy\"\xa0\x02\n StartAsyncReplicationDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12{\n.disks_start_async_replication_request_resource\x18\xda\x9e\xc0\xe0\x01 \x01(\x0b\x32:.google.cloud.compute.v1.DisksStartAsyncReplicationRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xb8\x02\n&StartAsyncReplicationRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x88\x01\n5region_disks_start_async_replication_request_resource\x18\x85\xc8\x96\xe2\x01 \x01(\x0b\x32@.google.cloud.compute.v1.RegionDisksStartAsyncReplicationRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9b\x01\n\x14StartInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xce\x02\n)StartInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8d\x01\n8instance_group_managers_start_instances_request_resource\x18\xab\xa5\xbf| \x01(\x0b\x32\x43.google.cloud.compute.v1.InstanceGroupManagersStartInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe6\x02\n/StartInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9b\x01\n?region_instance_group_managers_start_instances_request_resource\x18\x96\x9b\xff\xec\x01 \x01(\x0b\x32I.google.cloud.compute.v1.RegionInstanceGroupManagersStartInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xb5\x02\n%StartWithEncryptionKeyInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x86\x01\n4instances_start_with_encryption_key_request_resource\x18\xff\xfe\xcf\xd2\x01 \x01(\x0b\x32?.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"|\n\x0eStatefulPolicy\x12V\n\x0fpreserved_state\x18\xaa\xe2\xa0\x01 \x01(\x0b\x32\x35.google.cloud.compute.v1.StatefulPolicyPreservedStateH\x00\x88\x01\x01\x42\x12\n\x10_preserved_state\"\x8e\x05\n\x1cStatefulPolicyPreservedState\x12R\n\x05\x64isks\x18\xf6\xcc\xca- \x03(\x0b\x32@.google.cloud.compute.v1.StatefulPolicyPreservedState.DisksEntry\x12\x61\n\rexternal_i_ps\x18\x8d\xd3\x80\xfe\x01 \x03(\x0b\x32\x46.google.cloud.compute.v1.StatefulPolicyPreservedState.ExternalIPsEntry\x12`\n\rinternal_i_ps\x18\xdb\x9b\xef\x66 \x03(\x0b\x32\x46.google.cloud.compute.v1.StatefulPolicyPreservedState.InternalIPsEntry\x1am\n\nDisksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12N\n\x05value\x18\x02 \x01(\x0b\x32?.google.cloud.compute.v1.StatefulPolicyPreservedStateDiskDevice:\x02\x38\x01\x1ar\n\x10\x45xternalIPsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.compute.v1.StatefulPolicyPreservedStateNetworkIp:\x02\x38\x01\x1ar\n\x10InternalIPsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.compute.v1.StatefulPolicyPreservedStateNetworkIp:\x02\x38\x01\"\xb4\x01\n&StatefulPolicyPreservedStateDiskDevice\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\tH\x00\x88\x01\x01\"\\\n\nAutoDelete\x12\x19\n\x15UNDEFINED_AUTO_DELETE\x10\x00\x12\x0c\n\x05NEVER\x10\xec\xa4\xaf#\x12%\n\x1eON_PERMANENT_INSTANCE_DELETION\x10\xe7\xe0\xd2-B\x0e\n\x0c_auto_delete\"\xb3\x01\n%StatefulPolicyPreservedStateNetworkIp\x12\x1c\n\x0b\x61uto_delete\x18\xbb\xe4\xce\xdd\x01 \x01(\tH\x00\x88\x01\x01\"\\\n\nAutoDelete\x12\x19\n\x15UNDEFINED_AUTO_DELETE\x10\x00\x12\x0c\n\x05NEVER\x10\xec\xa4\xaf#\x12%\n\x1eON_PERMANENT_INSTANCE_DELETION\x10\xe7\xe0\xd2-B\x0e\n\x0c_auto_delete\"x\n\x06Status\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\x05H\x00\x88\x01\x01\x12)\n\x07\x64\x65tails\x18\xc2\xe4\xe3\xe6\x01 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\n\n\x08_message\"\xa2\x01\n\x1fStopAsyncReplicationDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xac\x01\n%StopAsyncReplicationRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9a\x02\n$StopGroupAsyncReplicationDiskRequest\x12\x86\x01\n4disks_stop_group_async_replication_resource_resource\x18\x95\xf8\xaf\xa5\x01 \x01(\x0b\x32?.google.cloud.compute.v1.DisksStopGroupAsyncReplicationResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xa4\x02\n*StopGroupAsyncReplicationRegionDiskRequest\x12\x86\x01\n4disks_stop_group_async_replication_resource_resource\x18\x95\xf8\xaf\xa5\x01 \x01(\x0b\x32?.google.cloud.compute.v1.DisksStopGroupAsyncReplicationResourceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd4\x01\n\x13StopInstanceRequest\x12\"\n\x11\x64iscard_local_ssd\x18\xcf\xe9\xad\x98\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x14\n\x12_discard_local_ssdB\r\n\x0b_request_id\"\xcb\x02\n(StopInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x8b\x01\n7instance_group_managers_stop_instances_request_resource\x18\x8d\xa5\xf4\x11 \x01(\x0b\x32\x42.google.cloud.compute.v1.InstanceGroupManagersStopInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xe3\x02\n.StopInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x99\x01\n>region_instance_group_managers_stop_instances_request_resource\x18\xc2\x9c\xf2\x80\x01 \x01(\x0b\x32H.google.cloud.compute.v1.RegionInstanceGroupManagersStopInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x85\x0b\n\x0bStoragePool\x12*\n\x1a\x63\x61pacity_provisioning_type\x18\x87\x8a\xfdw \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x05\x88\x01\x01\x12\x44\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x30.google.cloud.compute.v1.StoragePool.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12.\n\x1dperformance_provisioning_type\x18\xfd\x9d\xb6\xdf\x01 \x01(\tH\x07\x88\x01\x01\x12-\n\x1cpool_provisioned_capacity_gb\x18\xd2\xcf\x97\xe4\x01 \x01(\x03H\x08\x88\x01\x01\x12%\n\x15pool_provisioned_iops\x18\x97\xc9\xb9\x35 \x01(\x03H\t\x88\x01\x01\x12+\n\x1bpool_provisioned_throughput\x18\x98\x8d\xd8P \x01(\x03H\n\x88\x01\x01\x12S\n\x0fresource_status\x18\xc3\xfa\xf7v \x01(\x0b\x32\x32.google.cloud.compute.v1.StoragePoolResourceStatusH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\r\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x0e\x88\x01\x01\x12J\n\x06status\x18\xf2\x9f\xb7V \x01(\x0b\x32\x32.google.cloud.compute.v1.StoragePoolResourceStatusH\x0f\x88\x01\x01\x12\"\n\x11storage_pool_type\x18\xb9\x81\xb0\x88\x01 \x01(\tH\x10\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x11\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"D\n\x18\x43\x61pacityProvisioningType\x12(\n$UNDEFINED_CAPACITY_PROVISIONING_TYPE\x10\x00\"J\n\x1bPerformanceProvisioningType\x12+\n\'UNDEFINED_PERFORMANCE_PROVISIONING_TYPE\x10\x00\"^\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x1d\n\x1b_capacity_provisioning_typeB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB \n\x1e_performance_provisioning_typeB\x1f\n\x1d_pool_provisioned_capacity_gbB\x18\n\x16_pool_provisioned_iopsB\x1e\n\x1c_pool_provisioned_throughputB\x12\n\x10_resource_statusB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x08\n\x06_stateB\t\n\x07_statusB\x14\n\x12_storage_pool_typeB\x07\n\x05_zone\"\xe1\x03\n\x19StoragePoolAggregatedList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12O\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32=.google.cloud.compute.v1.StoragePoolAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x1a]\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.compute.v1.StoragePoolsScopedList:\x02\x38\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe0\x04\n\x0fStoragePoolDisk\x12\x1d\n\x12\x61ttached_instances\x18\xa3\xf3\x8e\x1f \x03(\t\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x02\x88\x01\x01\x12 \n\x10provisioned_iops\x18\xd4\xbd\x87Y \x01(\x03H\x03\x88\x01\x01\x12\'\n\x16provisioned_throughput\x18\x95\xbe\x88\xfb\x01 \x01(\x03H\x04\x88\x01\x01\x12\x1c\n\x11resource_policies\x18\xe1\x9c\xcc\n \x03(\t\x12\x18\n\x07size_gb\x18\xd9\x8b\x80\xec\x01 \x01(\x03H\x05\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\nused_bytes\x18\xe9\x9a\xban \x01(\x03H\x08\x88\x01\x01\"\x88\x01\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%\x12\x11\n\tRESTORING\x10\xab\xa7\xe2\xc0\x01\x12\x13\n\x0bUNAVAILABLE\x10\xb0\xd8\xa5\xc5\x01\x42\x15\n\x13_creation_timestampB\x07\n\x05_diskB\x07\n\x05_nameB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\n\n\x08_size_gbB\t\n\x07_statusB\x07\n\x05_typeB\r\n\x0b_used_bytes\"\xdf\x02\n\x0fStoragePoolList\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12\x36\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32$.google.cloud.compute.v1.StoragePool\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xe8\x02\n\x14StoragePoolListDisks\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x01\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.StoragePoolDisk\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x03\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x04\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x05\x88\x01\x01\x42\x07\n\x05_etagB\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xed\x05\n\x19StoragePoolResourceStatus\x12\x1a\n\ndisk_count\x18\xed\xaf\x9dW \x01(\x03H\x00\x88\x01\x01\x12&\n\x15last_resize_timestamp\x18\xd4\xfb\xe7\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x36\n&max_total_provisioned_disk_capacity_gb\x18\xdf\xde\x88O \x01(\x03H\x02\x88\x01\x01\x12)\n\x18pool_used_capacity_bytes\x18\xc5\xe9\xb0\xf3\x01 \x01(\x03H\x03\x88\x01\x01\x12\x1e\n\x0epool_used_iops\x18\x88\xc9\xbc/ \x01(\x03H\x04\x88\x01\x01\x12$\n\x14pool_used_throughput\x18\xc9\x9b\xa5\x62 \x01(\x03H\x05\x88\x01\x01\x12\'\n\x17pool_user_written_bytes\x18\xd2\xed\x96m \x01(\x03H\x06\x88\x01\x01\x12\x33\n\"total_provisioned_disk_capacity_gb\x18\xa4\x8d\xb3\xf8\x01 \x01(\x03H\x07\x88\x01\x01\x12+\n\x1btotal_provisioned_disk_iops\x18\x85\xdc\xd2\x0f \x01(\x03H\x08\x88\x01\x01\x12\x32\n!total_provisioned_disk_throughput\x18\x86\x8b\xbc\xd5\x01 \x01(\x03H\t\x88\x01\x01\x42\r\n\x0b_disk_countB\x18\n\x16_last_resize_timestampB)\n\'_max_total_provisioned_disk_capacity_gbB\x1b\n\x19_pool_used_capacity_bytesB\x11\n\x0f_pool_used_iopsB\x17\n\x15_pool_used_throughputB\x1a\n\x18_pool_user_written_bytesB%\n#_total_provisioned_disk_capacity_gbB\x1e\n\x1c_total_provisioned_disk_iopsB$\n\"_total_provisioned_disk_throughput\"\xe7\x07\n\x0fStoragePoolType\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x30\n max_pool_provisioned_capacity_gb\x18\xcd\xf1\xecV \x01(\x03H\x05\x88\x01\x01\x12*\n\x19max_pool_provisioned_iops\x18\xfc\xcf\xd9\xf5\x01 \x01(\x03H\x06\x88\x01\x01\x12/\n\x1fmax_pool_provisioned_throughput\x18\xbd\xd4\x94m \x01(\x03H\x07\x88\x01\x01\x12\x30\n min_pool_provisioned_capacity_gb\x18\x9f\x8d\x8b[ \x01(\x03H\x08\x88\x01\x01\x12*\n\x19min_pool_provisioned_iops\x18\xea\xc4\xcb\xc6\x01 \x01(\x03H\t\x88\x01\x01\x12\x30\n\x1fmin_pool_provisioned_throughput\x18\xab\xb4\xae\xaf\x01 \x01(\x03H\n\x88\x01\x01\x12\x1c\n\x0bmin_size_gb\x18\xec\xc1\xdb\xb7\x01 \x01(\x03H\x0b\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0c\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\r\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x0e\x88\x01\x01\x12\x1f\n\x14supported_disk_types\x18\x88\x8f\xe7G \x03(\t\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\x0f\x88\x01\x01\x42\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB#\n!_max_pool_provisioned_capacity_gbB\x1c\n\x1a_max_pool_provisioned_iopsB\"\n _max_pool_provisioned_throughputB#\n!_min_pool_provisioned_capacity_gbB\x1c\n\x1a_min_pool_provisioned_iopsB\"\n _min_pool_provisioned_throughputB\x0e\n\x0c_min_size_gbB\x07\n\x05_nameB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\x07\n\x05_zone\"\xb5\x03\n\x1dStoragePoolTypeAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.StoragePoolTypeAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.StoragePoolTypesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xaf\x02\n\x13StoragePoolTypeList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.StoragePoolType\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x01\n\x1aStoragePoolTypesScopedList\x12H\n\x12storage_pool_types\x18\xda\xad\xd0\x83\x01 \x03(\x0b\x32(.google.cloud.compute.v1.StoragePoolType\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xa0\x01\n\x16StoragePoolsScopedList\x12?\n\rstorage_pools\x18\x93\x92\xc0\xd0\x01 \x03(\x0b\x32$.google.cloud.compute.v1.StoragePool\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xae\x13\n\nSubnetwork\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12 \n\x10\x65nable_flow_logs\x18\xe4\xc4\xa1H \x01(\x08H\x02\x88\x01\x01\x12$\n\x14\x65xternal_ipv6_prefix\x18\xf6\x92\xb6\x42 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12 \n\x0fgateway_address\x18\xf9\x89\xa4\xdb\x01 \x01(\tH\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12%\n\x14internal_ipv6_prefix\x18\xe8\xa2\xb4\xf1\x01 \x01(\tH\x07\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x08\x88\x01\x01\x12\x1d\n\rip_collection\x18\xb6\x91\xa8T \x01(\tH\t\x88\x01\x01\x12!\n\x10ipv6_access_type\x18\xdd\xf5\xd1\xf0\x01 \x01(\tH\n\x88\x01\x01\x12 \n\x0fipv6_cidr_range\x18\x8a\x9c\x9f\x82\x01 \x01(\tH\x0b\x88\x01\x01\x12\"\n\x11ipv6_gce_endpoint\x18\xe3\xca\xe2\x98\x01 \x01(\tH\x0c\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\r\x88\x01\x01\x12I\n\nlog_config\x18\x9d\xd1\xc1\xa7\x01 \x01(\x0b\x32,.google.cloud.compute.v1.SubnetworkLogConfigH\x0e\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x0f\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x10\x88\x01\x01\x12\x41\n\x06params\x18\x86\xf3\xab% \x01(\x0b\x32).google.cloud.compute.v1.SubnetworkParamsH\x11\x88\x01\x01\x12)\n\x18private_ip_google_access\x18\xce\xe8\xfd\xc8\x01 \x01(\x08H\x12\x88\x01\x01\x12*\n\x1aprivate_ipv6_google_access\x18\x8e\xcc\x82\x17 \x01(\tH\x13\x88\x01\x01\x12\x18\n\x07purpose\x18\x9e\xfa\xef\x96\x01 \x01(\tH\x14\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x15\x88\x01\x01\x12(\n\x17reserved_internal_range\x18\xb2\x9e\xbf\x88\x01 \x01(\tH\x16\x88\x01\x01\x12\x14\n\x04role\x18\xf6\x80\xd6\x01 \x01(\tH\x17\x88\x01\x01\x12Q\n\x13secondary_ip_ranges\x18\xe3\xff\x94\x41 \x03(\x0b\x32\x31.google.cloud.compute.v1.SubnetworkSecondaryRange\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x18\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\x19\x88\x01\x01\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x1a\x88\x01\x01\x12/\n$system_reserved_external_ipv6_ranges\x18\xe1\x88\x93\x1f \x03(\t\x12\x30\n$system_reserved_internal_ipv6_ranges\x18\xd3\x98\x91\xce\x01 \x03(\t\"y\n\x0eIpv6AccessType\x12\x1e\n\x1aUNDEFINED_IPV6_ACCESS_TYPE\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\x12$\n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\xa5\xf6\xa4\x95\x01\"T\n\x0fIpv6GceEndpoint\x12\x1f\n\x1bUNDEFINED_IPV6_GCE_ENDPOINT\x10\x00\x12\x10\n\tVM_AND_FR\x10\xdc\x8d\xf9\x13\x12\x0e\n\x07VM_ONLY\x10\xb4\xc0\xf3p\"\xbe\x01\n\x17PrivateIpv6GoogleAccess\x12(\n$UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS\x10\x00\x12\x1d\n\x15\x44ISABLE_GOOGLE_ACCESS\x10\xf3\xa9\x84\xd7\x01\x12-\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\xba\xca\x89\xcc\x01\x12+\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\xd7\xfa\xb6\x89\x01\"\xf8\x01\n\x07Purpose\x12\x15\n\x11UNDEFINED_PURPOSE\x10\x00\x12\x1b\n\x14GLOBAL_MANAGED_PROXY\x10\xf2\xcb\xe0p\x12#\n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\xd9\xb6\xcev\x12\x16\n\x0ePEER_MIGRATION\x10\x91\xaa\xc7\xea\x01\x12\x0f\n\x07PRIVATE\x10\xe3\xe2\xb2\xc0\x01\x12\x13\n\x0bPRIVATE_NAT\x10\xa5\xc8\xae\xaf\x01\x12\x17\n\x10PRIVATE_RFC_1918\x10\xdb\xfe\xc5y\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x1d\n\x16REGIONAL_MANAGED_PROXY\x10\xee\xb6\xfdH\":\n\x04Role\x12\x12\n\x0eUNDEFINED_ROLE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x06\x42\x41\x43KUP\x10\xc2\xd3\xcd\xa2\x01\"{\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%\x12\x1e\n\x16UNSPECIFIED_STACK_TYPE\x10\xd9\xd1\x91\x8e\x01\"<\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12\x10\n\x08\x44RAINING\x10\xea\xd5\x8c\xe5\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x13\n\x11_enable_flow_logsB\x17\n\x15_external_ipv6_prefixB\x0e\n\x0c_fingerprintB\x12\n\x10_gateway_addressB\x05\n\x03_idB\x17\n\x15_internal_ipv6_prefixB\x10\n\x0e_ip_cidr_rangeB\x10\n\x0e_ip_collectionB\x13\n\x11_ipv6_access_typeB\x12\n\x10_ipv6_cidr_rangeB\x14\n\x12_ipv6_gce_endpointB\x07\n\x05_kindB\r\n\x0b_log_configB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_paramsB\x1b\n\x19_private_ip_google_accessB\x1d\n\x1b_private_ipv6_google_accessB\n\n\x08_purposeB\t\n\x07_regionB\x1a\n\x18_reserved_internal_rangeB\x07\n\x05_roleB\x0c\n\n_self_linkB\r\n\x0b_stack_typeB\x08\n\x06_state\"\xbf\x03\n\x18SubnetworkAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.SubnetworkAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.SubnetworksScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0eSubnetworkList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.Subnetwork\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xdd\x04\n\x13SubnetworkLogConfig\x12$\n\x14\x61ggregation_interval\x18\x82\x9b\xb4S \x01(\tH\x00\x88\x01\x01\x12\x17\n\x06\x65nable\x18\x83\xcb\xd4\x94\x01 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0b\x66ilter_expr\x18\xdc\xa4\xb8W \x01(\tH\x02\x88\x01\x01\x12\x1e\n\rflow_sampling\x18\xd8\xe7\xe5\xfc\x01 \x01(\x02H\x03\x88\x01\x01\x12\x18\n\x08metadata\x18\xaf\xf6\xb5) \x01(\tH\x04\x88\x01\x01\x12\x1b\n\x0fmetadata_fields\x18\xc9\xbb\xbb\xb4\x01 \x03(\t\"\xc8\x01\n\x13\x41ggregationInterval\x12\"\n\x1eUNDEFINED_AGGREGATION_INTERVAL\x10\x00\x12\x17\n\x0fINTERVAL_10_MIN\x10\xcc\xd1\xa5\xe8\x01\x12\x17\n\x0fINTERVAL_15_MIN\x10\xd1\xbc\xbf\xea\x01\x12\x15\n\x0eINTERVAL_1_MIN\x10\xaa\xd2\xf6 \x12\x16\n\x0fINTERVAL_30_SEC\x10\x89\xe0\xcc\x03\x12\x15\n\x0eINTERVAL_5_MIN\x10\xae\x8e\xd8\"\x12\x15\n\x0eINTERVAL_5_SEC\x10\xad\xba\xd8\"\"u\n\x08Metadata\x12\x16\n\x12UNDEFINED_METADATA\x10\x00\x12\x16\n\x0f\x43USTOM_METADATA\x10\xbd\xd8\xe3\x1d\x12\x1c\n\x14\x45XCLUDE_ALL_METADATA\x10\x92\xbd\xc1\x9f\x01\x12\x1b\n\x14INCLUDE_ALL_METADATA\x10\x84\xcd\xbfNB\x17\n\x15_aggregation_intervalB\t\n\x07_enableB\x0e\n\x0c_filter_exprB\x10\n\x0e_flow_samplingB\x0b\n\t_metadata\"\xb5\x01\n\x10SubnetworkParams\x12\x65\n\x15resource_manager_tags\x18\xfc\x9b\x8b\xb4\x01 \x03(\x0b\x32\x42.google.cloud.compute.v1.SubnetworkParams.ResourceManagerTagsEntry\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbd\x01\n\x18SubnetworkSecondaryRange\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nrange_name\x18\xcd\xf0\xb4\x9e\x01 \x01(\tH\x01\x88\x01\x01\x12(\n\x17reserved_internal_range\x18\xb2\x9e\xbf\x88\x01 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\r\n\x0b_range_nameB\x1a\n\x18_reserved_internal_range\"V\n#SubnetworksExpandIpCidrRangeRequest\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x00\x88\x01\x01\x42\x10\n\x0e_ip_cidr_range\"\x9c\x01\n\x15SubnetworksScopedList\x12<\n\x0bsubnetworks\x18\xc5\xd4\xa5\xc6\x01 \x03(\x0b\x32#.google.cloud.compute.v1.Subnetwork\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x8d\x01\n\x18SubnetworksScopedWarning\x12\x1b\n\nscope_name\x18\x96\x93\xe3\xa4\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x01\x88\x01\x01\x42\r\n\x0b_scope_nameB\n\n\x08_warning\"t\n*SubnetworksSetPrivateIpGoogleAccessRequest\x12)\n\x18private_ip_google_access\x18\xce\xe8\xfd\xc8\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1b\n\x19_private_ip_google_access\"\x7f\n\nSubsetting\x12\x16\n\x06policy\x18\xb2\xca\xb6+ \x01(\tH\x00\x88\x01\x01\"N\n\x06Policy\x12\x14\n\x10UNDEFINED_POLICY\x10\x00\x12!\n\x1a\x43ONSISTENT_HASH_SUBSETTING\x10\xb4\x98\xfc\x33\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x42\t\n\x07_policy\"\xd7\x01\n\x16SuspendInstanceRequest\x12\"\n\x11\x64iscard_local_ssd\x18\xcf\xe9\xad\x98\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x14\n\x12_discard_local_ssdB\r\n\x0b_request_id\"\xd4\x02\n+SuspendInstancesInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x91\x01\n:instance_group_managers_suspend_instances_request_resource\x18\xd1\x8d\xa1\x16 \x01(\x0b\x32\x45.google.cloud.compute.v1.InstanceGroupManagersSuspendInstancesRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xeb\x02\n1SuspendInstancesRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9e\x01\nAregion_instance_group_managers_suspend_instances_request_resource\x18\xfc\xe5\x94\x66 \x01(\x0b\x32K.google.cloud.compute.v1.RegionInstanceGroupManagersSuspendInstancesRequestB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x89\x01\n SwitchToCustomModeNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd8\x03\n\x0eTCPHealthCheck\x12\x14\n\x04port\x18\x81\xb1\xd2\x01 \x01(\x05H\x00\x88\x01\x01\x12\x19\n\tport_name\x18\x89\x87\xe7\x13 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12port_specification\x18\xc5\xeb\xcc\x18 \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07request\x18\x8f\xe5\xbb\n \x01(\tH\x04\x88\x01\x01\x12\x18\n\x08response\x18\xc1\xa8\xdc] \x01(\tH\x05\x88\x01\x01\"~\n\x11PortSpecification\x12 \n\x1cUNDEFINED_PORT_SPECIFICATION\x10\x00\x12\x15\n\x0eUSE_FIXED_PORT\x10\xe4\x88\xdbZ\x12\x16\n\x0eUSE_NAMED_PORT\x10\xbf\xcf\xc7\xa6\x01\x12\x18\n\x10USE_SERVING_PORT\x10\xcc\xd1\xf5\xac\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x07\n\x05_portB\x0c\n\n_port_nameB\x15\n\x13_port_specificationB\x0f\n\r_proxy_headerB\n\n\x08_requestB\x0b\n\t_response\"E\n\x04Tags\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x00\x88\x01\x01\x12\x10\n\x05items\x18\xc0\xcf\xf7/ \x03(\tB\x0e\n\x0c_fingerprint\"\xca\x03\n\x0fTargetGrpcProxy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x06\x88\x01\x01\x12!\n\x11self_link_with_id\x18\x82\xac\x9d\x15 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tH\x08\x88\x01\x01\x12&\n\x16validate_for_proxyless\x18\xa8\xe3\xc6\x30 \x01(\x08H\t\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0c\n\n_self_linkB\x14\n\x12_self_link_with_idB\n\n\x08_url_mapB\x19\n\x17_validate_for_proxyless\"\xaf\x02\n\x13TargetGrpcProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.TargetGrpcProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xae\x01\n\x1bTargetHttpProxiesScopedList\x12H\n\x13target_http_proxies\x18\xc3\xd5\xa8M \x03(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xeb\x03\n\x0fTargetHttpProxy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x02\x88\x01\x01\x12,\n\x1bhttp_keep_alive_timeout_sec\x18\xde\xce\xa6\xd5\x01 \x01(\x05H\x03\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x1b\n\nproxy_bind\x18\xee\xce\xb1\x88\x01 \x01(\x08H\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tH\n\x88\x01\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x1e\n\x1c_http_keep_alive_timeout_secB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_proxy_bindB\t\n\x07_regionB\x0c\n\n_self_linkB\n\n\x08_url_map\"\x88\x03\n\x1dTargetHttpProxyAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12S\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x41.google.cloud.compute.v1.TargetHttpProxyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x1a\x62\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.compute.v1.TargetHttpProxiesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_link\"\xaf\x02\n\x13TargetHttpProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12:\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32(.google.cloud.compute.v1.TargetHttpProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb2\x01\n\x1cTargetHttpsProxiesScopedList\x12K\n\x14target_https_proxies\x18\x8a\xfc\xe7\xae\x01 \x03(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"a\n*TargetHttpsProxiesSetCertificateMapRequest\x12\x1f\n\x0f\x63\x65rtificate_map\x18\xb4\xe5\xcdJ \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_certificate_map\"\xb6\x01\n(TargetHttpsProxiesSetQuicOverrideRequest\x12\x1e\n\rquic_override\x18\xad\xa1\xdb\xd9\x01 \x01(\tH\x00\x88\x01\x01\"X\n\x0cQuicOverride\x12\x1b\n\x17UNDEFINED_QUIC_OVERRIDE\x10\x00\x12\x0e\n\x07\x44ISABLE\x10\xc8\xdd\xa6s\x12\x0e\n\x06\x45NABLE\x10\x83\xb3\xa0\xd1\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x42\x10\n\x0e_quic_override\"K\n+TargetHttpsProxiesSetSslCertificatesRequest\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\"\x9d\x08\n\x10TargetHttpsProxy\x12$\n\x14\x61uthorization_policy\x18\xb8\xef\x97\x10 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x0f\x63\x65rtificate_map\x18\xb4\xe5\xcdJ \x01(\tH\x01\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x04\x88\x01\x01\x12,\n\x1bhttp_keep_alive_timeout_sec\x18\xde\xce\xa6\xd5\x01 \x01(\x05H\x05\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x06\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x07\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x08\x88\x01\x01\x12\x1b\n\nproxy_bind\x18\xee\xce\xb1\x88\x01 \x01(\x08H\t\x88\x01\x01\x12\x1e\n\rquic_override\x18\xad\xa1\xdb\xd9\x01 \x01(\tH\n\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\"\n\x11server_tls_policy\x18\xf2\xde\x87\x8d\x01 \x01(\tH\r\x88\x01\x01\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1e\n\x0etls_early_data\x18\xca\xe1\x91\x1d \x01(\tH\x0f\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tH\x10\x88\x01\x01\"X\n\x0cQuicOverride\x12\x1b\n\x17UNDEFINED_QUIC_OVERRIDE\x10\x00\x12\x0e\n\x07\x44ISABLE\x10\xc8\xdd\xa6s\x12\x0e\n\x06\x45NABLE\x10\x83\xb3\xa0\xd1\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\"x\n\x0cTlsEarlyData\x12\x1c\n\x18UNDEFINED_TLS_EARLY_DATA\x10\x00\x12\x10\n\x08\x44ISABLED\x10\xfc\xd4\xb0\xf6\x01\x12\x12\n\nPERMISSIVE\x10\x9f\xe5\xbe\xf0\x01\x12\x0e\n\x06STRICT\x10\xc9\xa5\xa1\x93\x01\x12\x14\n\x0cUNRESTRICTED\x10\xb4\xa7\x85\xda\x01\x42\x17\n\x15_authorization_policyB\x12\n\x10_certificate_mapB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x1e\n\x1c_http_keep_alive_timeout_secB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_proxy_bindB\x10\n\x0e_quic_overrideB\t\n\x07_regionB\x0c\n\n_self_linkB\x14\n\x12_server_tls_policyB\r\n\x0b_ssl_policyB\x11\n\x0f_tls_early_dataB\n\n\x08_url_map\"\xd2\x03\n\x1eTargetHttpsProxyAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12T\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x42.google.cloud.compute.v1.TargetHttpsProxyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x63\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.google.cloud.compute.v1.TargetHttpsProxiesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb1\x02\n\x14TargetHttpsProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.TargetHttpsProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xfc\x03\n\x0eTargetInstance\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\nnat_policy\x18\x90\xc4\x8a\xf3\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tH\n\x88\x01\x01\"4\n\tNatPolicy\x12\x18\n\x14UNDEFINED_NAT_POLICY\x10\x00\x12\r\n\x06NO_NAT\x10\x83\xbb\xfeLB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x0b\n\t_instanceB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_nat_policyB\n\n\x08_networkB\x12\n\x10_security_policyB\x0c\n\n_self_linkB\x07\n\x05_zone\"\xcb\x03\n\x1cTargetInstanceAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.TargetInstanceAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a`\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.compute.v1.TargetInstancesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x02\n\x12TargetInstanceList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.TargetInstance\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa9\x01\n\x19TargetInstancesScopedList\x12\x45\n\x10target_instances\x18\xd0\xd2\xad\xbb\x01 \x03(\x0b\x32\'.google.cloud.compute.v1.TargetInstance\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\xa5\x06\n\nTargetPool\x12\x1b\n\x0b\x62\x61\x63kup_pool\x18\xf9\xc8\xf0\x15 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x0e\x66\x61ilover_ratio\x18\xfe\x94\xb4\x65 \x01(\x02H\x03\x88\x01\x01\x12\x19\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\t\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x04\x88\x01\x01\x12\x14\n\tinstances\x18\xfe\xfc\xef\r \x03(\t\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1f\n\x0fsecurity_policy\x18\x91\x86\xcaQ \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12!\n\x10session_affinity\x18\xb1\xc1\x99\xdd\x01 \x01(\tH\n\x88\x01\x01\"\x8b\x02\n\x0fSessionAffinity\x12\x1e\n\x1aUNDEFINED_SESSION_AFFINITY\x10\x00\x12\x11\n\tCLIENT_IP\x10\x9b\xdc\xe9\xa4\x01\x12\x1f\n\x18\x43LIENT_IP_NO_DESTINATION\x10\x94\x9a\xcd\x32\x12\x1b\n\x14\x43LIENT_IP_PORT_PROTO\x10\xae\xf2\xdci\x12\x16\n\x0f\x43LIENT_IP_PROTO\x10\xa4\xc5\x89\x0c\x12\x18\n\x10GENERATED_COOKIE\x10\xb4\xce\xca\xb0\x01\x12\x13\n\x0cHEADER_FIELD\x10\xa8\x89\xdc_\x12\x13\n\x0bHTTP_COOKIE\x10\xfb\xa3\x83\xec\x01\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x1e\n\x16STRONG_COOKIE_AFFINITY\x10\xfb\xdd\x93\xd1\x01\x42\x0e\n\x0c_backup_poolB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x11\n\x0f_failover_ratioB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x12\n\x10_security_policyB\x0c\n\n_self_linkB\x13\n\x11_session_affinity\"\xbf\x03\n\x18TargetPoolAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.TargetPoolAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.TargetPoolsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"{\n\x18TargetPoolInstanceHealth\x12@\n\rhealth_status\x18\xb5\xd6\xba\xb5\x01 \x03(\x0b\x32%.google.cloud.compute.v1.HealthStatus\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_kind\"\xa5\x02\n\x0eTargetPoolList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.TargetPool\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"l\n TargetPoolsAddHealthCheckRequest\x12H\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\x0b\x32-.google.cloud.compute.v1.HealthCheckReference\"a\n\x1dTargetPoolsAddInstanceRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.InstanceReference\"o\n#TargetPoolsRemoveHealthCheckRequest\x12H\n\rhealth_checks\x18\xae\xaf\xe6\xd5\x01 \x03(\x0b\x32-.google.cloud.compute.v1.HealthCheckReference\"d\n TargetPoolsRemoveInstanceRequest\x12@\n\tinstances\x18\xfe\xfc\xef\r \x03(\x0b\x32*.google.cloud.compute.v1.InstanceReference\"\x9d\x01\n\x15TargetPoolsScopedList\x12=\n\x0ctarget_pools\x18\xa9\x9f\xa0\xa0\x01 \x03(\x0b\x32#.google.cloud.compute.v1.TargetPool\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"4\n\x0fTargetReference\x12\x16\n\x06target\x18\x91\xe3\xf9[ \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_target\"P\n(TargetSslProxiesSetBackendServiceRequest\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_service\"_\n(TargetSslProxiesSetCertificateMapRequest\x12\x1f\n\x0f\x63\x65rtificate_map\x18\xb4\xe5\xcdJ \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_certificate_map\"\xa0\x01\n%TargetSslProxiesSetProxyHeaderRequest\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x00\x88\x01\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x0f\n\r_proxy_header\"I\n)TargetSslProxiesSetSslCertificatesRequest\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\"\x98\x04\n\x0eTargetSslProxy\x12\x1f\n\x0f\x63\x65rtificate_map\x18\xb4\xe5\xcdJ \x01(\tH\x00\x88\x01\x01\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x10ssl_certificates\x18\x8f\xa2\xc3\xae\x01 \x03(\t\x12\x1b\n\nssl_policy\x18\xc5\xfd\xe0\x8c\x01 \x01(\tH\t\x88\x01\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x12\n\x10_certificate_mapB\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\x0f\n\r_proxy_headerB\x0c\n\n_self_linkB\n\n\x08_serviceB\r\n\x0b_ssl_policy\"\xad\x02\n\x12TargetSslProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.TargetSslProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xab\x01\n\x1aTargetTcpProxiesScopedList\x12\x46\n\x12target_tcp_proxies\x18\x80\xd7\xfa| \x03(\x0b\x32\'.google.cloud.compute.v1.TargetTcpProxy\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"P\n(TargetTcpProxiesSetBackendServiceRequest\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_service\"\xa0\x01\n%TargetTcpProxiesSetProxyHeaderRequest\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x00\x88\x01\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x0f\n\r_proxy_header\"\xe8\x03\n\x0eTargetTcpProxy\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x04\x88\x01\x01\x12\x1b\n\nproxy_bind\x18\xee\xce\xb1\x88\x01 \x01(\x08H\x05\x88\x01\x01\x12\x1c\n\x0cproxy_header\x18\xfe\xba\xbcL \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\t\x88\x01\x01\"H\n\x0bProxyHeader\x12\x1a\n\x16UNDEFINED_PROXY_HEADER\x10\x00\x12\x0b\n\x04NONE\x10\xb8\xce\x92\x01\x12\x10\n\x08PROXY_V1\x10\xac\xa4\xb7\x9f\x01\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\r\n\x0b_proxy_bindB\x0f\n\r_proxy_headerB\t\n\x07_regionB\x0c\n\n_self_linkB\n\n\x08_service\"\xcc\x03\n\x1cTargetTcpProxyAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12R\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32@.google.cloud.compute.v1.TargetTcpProxyAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x61\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.compute.v1.TargetTcpProxiesScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xad\x02\n\x12TargetTcpProxyList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x39\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\'.google.cloud.compute.v1.TargetTcpProxy\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xae\x05\n\x10TargetVpnGateway\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x10\x66orwarding_rules\x18\xb5\x9a\xcc\x96\x01 \x03(\t\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x02\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x03\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x04\x88\x01\x01\x12I\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x35.google.cloud.compute.v1.TargetVpnGateway.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x06\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x07\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x08\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\t\x88\x01\x01\x12\x12\n\x07tunnels\x18\x8b\xfa\xed\x31 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x10\n\x08\x43REATING\x10\xb9\xbd\x9d\xd9\x01\x12\x10\n\x08\x44\x45LETING\x10\xa8\xa7\x87\xfc\x01\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x0c\n\x05READY\x10\x83\xc3\x8f%B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_status\"\xd1\x03\n\x1eTargetVpnGatewayAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12T\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x42.google.cloud.compute.v1.TargetVpnGatewayAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\x62\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.cloud.compute.v1.TargetVpnGatewaysScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb1\x02\n\x14TargetVpnGatewayList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.TargetVpnGateway\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xb0\x01\n\x1bTargetVpnGatewaysScopedList\x12J\n\x13target_vpn_gateways\x18\x88\x93\xca\xbf\x01 \x03(\x0b\x32).google.cloud.compute.v1.TargetVpnGateway\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x93\x04\n\x0bTestFailure\x12\"\n\x11\x61\x63tual_output_url\x18\x82\xd9\xf1\x88\x01 \x01(\tH\x00\x88\x01\x01\x12-\n\x1d\x61\x63tual_redirect_response_code\x18\xd9\x83\xbc\x14 \x01(\x05H\x01\x88\x01\x01\x12\x1f\n\x0e\x61\x63tual_service\x18\x84\xd2\xfe\xd1\x01 \x01(\tH\x02\x88\x01\x01\x12$\n\x13\x65xpected_output_url\x18\x98\xa2\xf7\xce\x01 \x01(\tH\x03\x88\x01\x01\x12/\n\x1f\x65xpected_redirect_response_code\x18\xef\xea\x80\t \x01(\x05H\x04\x88\x01\x01\x12 \n\x10\x65xpected_service\x18\xae\xf8\xf1? \x01(\tH\x05\x88\x01\x01\x12=\n\x07headers\x18\x86\xdf\x9d{ \x03(\x0b\x32).google.cloud.compute.v1.UrlMapTestHeader\x12\x14\n\x04host\x18\xa8\xeb\xc3\x01 \x01(\tH\x06\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x07\x88\x01\x01\x42\x14\n\x12_actual_output_urlB \n\x1e_actual_redirect_response_codeB\x11\n\x0f_actual_serviceB\x16\n\x14_expected_output_urlB\"\n _expected_redirect_response_codeB\x13\n\x11_expected_serviceB\x07\n\x05_hostB\x07\n\x05_path\"\xc0\x01\n&TestIamPermissionsBackendBucketRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xc1\x01\n\'TestIamPermissionsBackendServiceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xcd\x01\n\x1dTestIamPermissionsDiskRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xc5\x01\n+TestIamPermissionsExternalVpnGatewayRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xa8\x01\n\'TestIamPermissionsFirewallPolicyRequest\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xb8\x01\n\x1eTestIamPermissionsImageRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd1\x01\n!TestIamPermissionsInstanceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n)TestIamPermissionsInstanceTemplateRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd8\x01\n(TestIamPermissionsInstantSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xce\x01\n4TestIamPermissionsInterconnectAttachmentGroupRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xc4\x01\n*TestIamPermissionsInterconnectGroupRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xbe\x01\n$TestIamPermissionsLicenseCodeRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xba\x01\n TestIamPermissionsLicenseRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xbf\x01\n%TestIamPermissionsMachineImageRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xdc\x01\n*TestIamPermissionsNetworkAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xdd\x01\n-TestIamPermissionsNetworkEndpointGroupRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xc8\x01\n.TestIamPermissionsNetworkFirewallPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd2\x01\n\"TestIamPermissionsNodeGroupRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xd7\x01\n%TestIamPermissionsNodeTemplateRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xda\x01\n(TestIamPermissionsPacketMirroringRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xdf\x01\n-TestIamPermissionsRegionBackendServiceRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd5\x01\n#TestIamPermissionsRegionDiskRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xe0\x01\n.TestIamPermissionsRegionInstantSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xe6\x01\n4TestIamPermissionsRegionNetworkFirewallPolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd4\x01\n$TestIamPermissionsReservationRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xd9\x01\n\'TestIamPermissionsResourcePolicyRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xdc\x01\n*TestIamPermissionsServiceAttachmentRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xbb\x01\n!TestIamPermissionsSnapshotRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd4\x01\n$TestIamPermissionsStoragePoolRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xd5\x01\n#TestIamPermissionsSubnetworkRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"\xd5\x01\n#TestIamPermissionsVpnGatewayRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08resource\x18\x8e\x88\xaf] \x01(\tB\x03\xe0\x41\x02\x12\x63\n!test_permissions_request_resource\x18\xa6\xc5\xb7\xd1\x01 \x01(\x0b\x32/.google.cloud.compute.v1.TestPermissionsRequestB\x03\xe0\x41\x02\"0\n\x16TestPermissionsRequest\x12\x16\n\x0bpermissions\x18\x84\xe9\xcb\x1c \x03(\t\"1\n\x17TestPermissionsResponse\x12\x16\n\x0bpermissions\x18\x84\xe9\xcb\x1c \x03(\t\"D\n\x07Uint128\x12\x14\n\x04high\x18\xa2\xbb\xc3\x01 \x01(\x04H\x00\x88\x01\x01\x12\x12\n\x03low\x18\xd4\xc6\x06 \x01(\x04H\x01\x88\x01\x01\x42\x07\n\x05_highB\x06\n\x04_low\"\xa5\x08\n\x13UpcomingMaintenance\x12\x1e\n\x0e\x63\x61n_reschedule\x18\x99\xa3\xe2- \x01(\x08H\x00\x88\x01\x01\x12(\n\x18latest_window_start_time\x18\x81\xbb\x86= \x01(\tH\x01\x88\x01\x01\x12\'\n\x17maintenance_on_shutdown\x18\x8a\xc3\x96n \x01(\x08H\x02\x88\x01\x01\x12\x1e\n\x13maintenance_reasons\x18\x83\x9b\xf2\x42 \x03(\t\x12\"\n\x12maintenance_status\x18\x9e\x9d\xf7& \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x04\x88\x01\x01\x12 \n\x0fwindow_end_time\x18\xa0\xae\xce\x81\x01 \x01(\tH\x05\x88\x01\x01\x12\"\n\x11window_start_time\x18\xb9\xb0\xc9\xe1\x01 \x01(\tH\x06\x88\x01\x01\"\x8f\x03\n\x12MaintenanceReasons\x12!\n\x1dUNDEFINED_MAINTENANCE_REASONS\x10\x00\x12\x13\n\x0c\x46\x41ILURE_DISK\x10\xd2\xa6\x8b\x04\x12\x13\n\x0b\x46\x41ILURE_GPU\x10\xb7\xf8\x8c\xdf\x01\x12\x1e\n\x17\x46\x41ILURE_GPU_TEMPERATURE\x10\xcc\xb2\xf1\x0b\x12\x16\n\x0f\x46\x41ILURE_GPU_XID\x10\xeb\x96\xe3\x18\x12\x15\n\rFAILURE_INFRA\x10\x9b\xc5\x80\x81\x01\x12\x19\n\x11\x46\x41ILURE_INTERFACE\x10\x84\xf1\xff\xb9\x01\x12\x16\n\x0e\x46\x41ILURE_MEMORY\x10\xf6\xca\xef\xd1\x01\x12\x16\n\x0f\x46\x41ILURE_NETWORK\x10\xb9\x80\xb5\x14\x12\x16\n\x0e\x46\x41ILURE_NVLINK\x10\xb7\x84\xff\xe6\x01\x12!\n\x19INFRASTRUCTURE_RELOCATION\x10\x84\x9e\xcb\xab\x01\x12!\n\x1aMAINTENANCE_REASON_UNKNOWN\x10\xfb\xc7\x8e\x18\x12\x1d\n\x16PLANNED_NETWORK_UPDATE\x10\x95\xf8\xcd@\x12\x15\n\x0ePLANNED_UPDATE\x10\xc4\xb7\x8fM\"g\n\x11MaintenanceStatus\x12 \n\x1cUNDEFINED_MAINTENANCE_STATUS\x10\x00\x12\x0f\n\x07ONGOING\x10\xdb\xa6\xcf\xe1\x01\x12\x0e\n\x07PENDING\x10\xf7\xaa\xf0\x10\x12\x0f\n\x07UNKNOWN\x10\xaa\xf0\xc4\xce\x01\"j\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x10\n\x08MULTIPLE\x10\x90\xac\xfa\xac\x01\x12\x11\n\tSCHEDULED\x10\x8d\xa1\x8f\xe4\x01\x12\x14\n\x0cUNKNOWN_TYPE\x10\xaf\xa4\xfe\xe9\x01\x12\x13\n\x0bUNSCHEDULED\x10\x94\xc4\xce\xd6\x01\x42\x11\n\x0f_can_rescheduleB\x1b\n\x19_latest_window_start_timeB\x1a\n\x18_maintenance_on_shutdownB\x15\n\x13_maintenance_statusB\x07\n\x05_typeB\x12\n\x10_window_end_timeB\x14\n\x12_window_start_time\"\x9c\x02\n!UpdateAccessConfigInstanceRequest\x12N\n\x16\x61\x63\x63\x65ss_config_resource\x18\x90\xff\xf6\xb8\x01 \x01(\x0b\x32%.google.cloud.compute.v1.AccessConfigB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xfa\x01\n\x17UpdateAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x00\x88\x01\x01\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_autoscalerB\r\n\x0b_request_id\"\xdc\x01\n\x1aUpdateBackendBucketRequest\x12\x1e\n\x0e\x62\x61\x63kend_bucket\x18\xf5\xe3\xdd+ \x01(\tB\x03\xe0\x41\x02\x12P\n\x17\x62\x61\x63kend_bucket_resource\x18\x98\xce\xc7\xb5\x01 \x01(\x0b\x32&.google.cloud.compute.v1.BackendBucketB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe1\x01\n\x1bUpdateBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xa1\x02\n\x11UpdateDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\rdisk_resource\x18\xf0\xd0\xab\x0c \x01(\x0b\x32\x1d.google.cloud.compute.v1.DiskB\x03\xe0\x41\x02\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xfb\x01\n\"UpdateDisplayDeviceInstanceRequest\x12P\n\x17\x64isplay_device_resource\x18\xda\x84\x91\x8a\x01 \x01(\x0b\x32&.google.cloud.compute.v1.DisplayDeviceB\x03\xe0\x41\x02\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xc6\x01\n\x15UpdateFirewallRequest\x12\x19\n\x08\x66irewall\x18\x80\xfa\xd5\xf3\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x11\x66irewall_resource\x18\xed\xb0\xe0\x13 \x01(\x0b\x32!.google.cloud.compute.v1.FirewallB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xd4\x01\n\x18UpdateHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe5\x03\n\x15UpdateInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x11instance_resource\x18\xf8\xf0\xfe\x66 \x01(\x0b\x32!.google.cloud.compute.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\x0eminimal_action\x18\x94\x8d\x82\x81\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x1emost_disruptive_allowed_action\x18\x8d\xce\xc2\x1f \x01(\tH\x01\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zone\"-\n\rMinimalAction\x12\x1c\n\x18UNDEFINED_MINIMAL_ACTION\x10\x00\"K\n\x1bMostDisruptiveAllowedAction\x12,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION\x10\x00\x42\x11\n\x0f_minimal_actionB!\n\x1f_most_disruptive_allowed_actionB\r\n\x0b_request_id\"\xf0\x01\n\x14UpdateLicenseRequest\x12\x17\n\x07license\x18\xc1\x88\xc2O \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x10license_resource\x18\xcc\xd4\xea\xd0\x01 \x01(\x0b\x32 .google.cloud.compute.v1.LicenseB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xa8\x02\n%UpdateNetworkInterfaceInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x11network_interface\x18\xe8\xc0\x9d\xae\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\x1anetwork_interface_resource\x18\x85\x94\xae\x9b\x01 \x01(\x0b\x32).google.cloud.compute.v1.NetworkInterfaceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf5\x01\n\x1bUpdatePeeringNetworkRequest\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tB\x03\xe0\x41\x02\x12o\n(networks_update_peering_request_resource\x18\xd9\xaa\x82k \x01(\x0b\x32\x35.google.cloud.compute.v1.NetworksUpdatePeeringRequestB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe6\x02\n3UpdatePerInstanceConfigsInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12\x9b\x01\n@instance_group_managers_update_per_instance_configs_req_resource\x18\xbe\xc1\xb6\x43 \x01(\x0b\x32I.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReqB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\xf2\x02\n9UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest\x12&\n\x16instance_group_manager\x18\xc3\xf7\xf3v \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x9d\x01\nAregion_instance_group_manager_update_instance_config_req_resource\x18\xa7\xae\xba* \x01(\x0b\x32J.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReqB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x84\x02\n\x1dUpdateRegionAutoscalerRequest\x12\x1b\n\nautoscaler\x18\xd7\xfd\xd2\xf6\x01 \x01(\tH\x00\x88\x01\x01\x12H\n\x13\x61utoscaler_resource\x18\xf6\xf0\xff\x62 \x01(\x0b\x32#.google.cloud.compute.v1.AutoscalerB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_autoscalerB\r\n\x0b_request_id\"\x88\x02\n!UpdateRegionBackendServiceRequest\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x18\x62\x61\x63kend_service_resource\x18\xa3\x81\xdf\xa5\x01 \x01(\x0b\x32\'.google.cloud.compute.v1.BackendServiceB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xc4\x02\n\x1dUpdateRegionCommitmentRequest\x12\x1b\n\ncommitment\x18\x95\x96\xf3\xe5\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x13\x63ommitment_resource\x18\xf8\xa3\xbbt \x01(\x0b\x32#.google.cloud.compute.v1.CommitmentB\x03\xe0\x41\x02\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xab\x02\n\x17UpdateRegionDiskRequest\x12\x14\n\x04\x64isk\x18\x9d\x9b\xbc\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\rdisk_resource\x18\xf0\xd0\xab\x0c \x01(\x0b\x32\x1d.google.cloud.compute.v1.DiskB\x03\xe0\x41\x02\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xfb\x01\n\x1eUpdateRegionHealthCheckRequest\x12\x1d\n\x0chealth_check\x18\xe5\xaa\xa4\x93\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15health_check_resource\x18\xa8\xc3\xa4` \x01(\x0b\x32$.google.cloud.compute.v1.HealthCheckB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xe7\x01\n\x19UpdateRegionUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xbe\x02\n\x18UpdateReservationRequest\x12\x15\n\x05paths\x18\xee\xc1\xe0\x32 \x01(\tH\x00\x88\x01\x01\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0breservation\x18\xcc\x87\xd5\x16 \x01(\tB\x03\xe0\x41\x02\x12K\n\x14reservation_resource\x18\xa1\xee\xf4\x87\x01 \x01(\x0b\x32$.google.cloud.compute.v1.ReservationB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\x08\n\x06_pathsB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xf4\x01\n\x1eUpdateRoutePolicyRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12K\n\x15route_policy_resource\x18\x85\xbd\xb5\x37 \x01(\x0b\x32$.google.cloud.compute.v1.RoutePolicyB\x03\xe0\x41\x02\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xde\x01\n\x13UpdateRouterRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0frouter_resource\x18\xc4\x80\x82J \x01(\x0b\x32\x1f.google.cloud.compute.v1.RouterB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\x97\x02\n+UpdateShieldedInstanceConfigInstanceRequest\x12\x18\n\x08instance\x18\x95\xa9\xda\x08 \x01(\tB\x03\xe0\x41\x02\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x63\n!shielded_instance_config_resource\x18\xd8\x96\xdd\x81\x01 \x01(\x0b\x32/.google.cloud.compute.v1.ShieldedInstanceConfigB\x03\xe0\x41\x02\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_id\"\x9f\x02\n\x18UpdateStoragePoolRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0cstorage_pool\x18\xe0\xc6\xf1\xab\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x15storage_pool_resource\x18\x8d\xbc\xf9J \x01(\x0b\x32$.google.cloud.compute.v1.StoragePoolB\x03\xe0\x41\x02\x12\x1c\n\x0bupdate_mask\x18\xa2\xb9\xba\xee\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\n\xe0\x41\x02\xf2G\x04zoneB\r\n\x0b_request_idB\x0e\n\x0c_update_mask\"\xc0\x01\n\x13UpdateUrlMapRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x10url_map_resource\x18\xe1\x90\xb7P \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapB\x03\xe0\x41\x02\x42\r\n\x0b_request_id\"\xf2\x07\n\x06UrlMap\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12h\n$default_custom_error_response_policy\x18\xa9\x8b\xe0& \x01(\x0b\x32\x32.google.cloud.compute.v1.CustomErrorResponsePolicyH\x01\x88\x01\x01\x12O\n\x14\x64\x65\x66\x61ult_route_action\x18\xaa\xb4\xd7\xb4\x01 \x01(\x0b\x32(.google.cloud.compute.v1.HttpRouteActionH\x02\x88\x01\x01\x12 \n\x0f\x64\x65\x66\x61ult_service\x18\xb7\xe5\xc5\xb0\x01 \x01(\tH\x03\x88\x01\x01\x12R\n\x14\x64\x65\x66\x61ult_url_redirect\x18\xea\xab\xb6\xab\x01 \x01(\x0b\x32+.google.cloud.compute.v1.HttpRedirectActionH\x04\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0b\x66ingerprint\x18\xe4\xd1\xf3o \x01(\tH\x06\x88\x01\x01\x12I\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32).google.cloud.compute.v1.HttpHeaderActionH\x07\x88\x01\x01\x12\x39\n\nhost_rules\x18\xa0\x87\xd7\x94\x01 \x03(\x0b\x32!.google.cloud.compute.v1.HostRule\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x08\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\t\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\n\x88\x01\x01\x12?\n\rpath_matchers\x18\xdb\x88\xc5\x81\x01 \x03(\x0b\x32$.google.cloud.compute.v1.PathMatcher\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0b\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0c\x88\x01\x01\x12\x35\n\x05tests\x18\xa1\x9c\xc9\x34 \x03(\x0b\x32#.google.cloud.compute.v1.UrlMapTestB\x15\n\x13_creation_timestampB\'\n%_default_custom_error_response_policyB\x17\n\x15_default_route_actionB\x12\n\x10_default_serviceB\x17\n\x15_default_url_redirectB\x0e\n\x0c_descriptionB\x0e\n\x0c_fingerprintB\x10\n\x0e_header_actionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x0c\n\n_self_link\"\x9d\x02\n\nUrlMapList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x31\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1f.google.cloud.compute.v1.UrlMap\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"7\n\x0fUrlMapReference\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_url_map\"\xf0\x02\n\nUrlMapTest\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x00\x88\x01\x01\x12$\n\x13\x65xpected_output_url\x18\x98\xa2\xf7\xce\x01 \x01(\tH\x01\x88\x01\x01\x12/\n\x1f\x65xpected_redirect_response_code\x18\xef\xea\x80\t \x01(\x05H\x02\x88\x01\x01\x12=\n\x07headers\x18\x86\xdf\x9d{ \x03(\x0b\x32).google.cloud.compute.v1.UrlMapTestHeader\x12\x14\n\x04host\x18\xa8\xeb\xc3\x01 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x04path\x18\xa5\xc8\xd1\x01 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x07service\x18\xb5\x8d\x8f\xb2\x01 \x01(\tH\x05\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x16\n\x14_expected_output_urlB\"\n _expected_redirect_response_codeB\x07\n\x05_hostB\x07\n\x05_pathB\n\n\x08_service\"R\n\x10UrlMapTestHeader\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x05value\x18\xf1\xa2\xb2\x35 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\x08\n\x06_value\"\xd2\x01\n\x16UrlMapValidationResult\x12\x17\n\x0bload_errors\x18\xe4\xf1\xf1\x93\x01 \x03(\t\x12\x1e\n\x0eload_succeeded\x18\xc8\xb4\x98= \x01(\x08H\x00\x88\x01\x01\x12?\n\rtest_failures\x18\xb6\xe2\x9f\xf1\x01 \x03(\x0b\x32$.google.cloud.compute.v1.TestFailure\x12\x1b\n\x0btest_passed\x18\xbd\x81\xf2[ \x01(\x08H\x01\x88\x01\x01\x42\x11\n\x0f_load_succeededB\x0e\n\x0c_test_passed\"\xb5\x03\n\x15UrlMapsAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12K\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x39.google.cloud.compute.v1.UrlMapsAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1aX\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.google.cloud.compute.v1.UrlMapsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x90\x01\n\x11UrlMapsScopedList\x12\x34\n\x08url_maps\x18\xe7\x8e\xa4\x31 \x03(\x0b\x32\x1f.google.cloud.compute.v1.UrlMap\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x98\x02\n\x16UrlMapsValidateRequest\x12!\n\x16load_balancing_schemes\x18\xaf\x85\x81\x03 \x03(\t\x12\x39\n\x08resource\x18\x8e\x88\xaf] \x01(\x0b\x32\x1f.google.cloud.compute.v1.UrlMapH\x00\x88\x01\x01\"\x92\x01\n\x14LoadBalancingSchemes\x12$\n UNDEFINED_LOAD_BALANCING_SCHEMES\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x18\n\x10\x45XTERNAL_MANAGED\x10\x8b\xb6\x92\xf4\x01\x12)\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\xbc\xbb\x87\xfb\x01\x42\x0b\n\t_resource\"m\n\x17UrlMapsValidateResponse\x12G\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32/.google.cloud.compute.v1.UrlMapValidationResultH\x00\x88\x01\x01\x42\t\n\x07_result\"\xba\x01\n\nUrlRewrite\x12\x1c\n\x0chost_rewrite\x18\xf5\xcb\x9aL \x01(\tH\x00\x88\x01\x01\x12#\n\x13path_prefix_rewrite\x18\xb9\xe8\xd1\x13 \x01(\tH\x01\x88\x01\x01\x12&\n\x15path_template_rewrite\x18\xa1\xef\xf2\xc9\x01 \x01(\tH\x02\x88\x01\x01\x42\x0f\n\r_host_rewriteB\x16\n\x14_path_prefix_rewriteB\x18\n\x16_path_template_rewrite\"\xfe\x07\n\x10UsableSubnetwork\x12$\n\x14\x65xternal_ipv6_prefix\x18\xf6\x92\xb6\x42 \x01(\tH\x00\x88\x01\x01\x12%\n\x14internal_ipv6_prefix\x18\xe8\xa2\xb4\xf1\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x02\x88\x01\x01\x12!\n\x10ipv6_access_type\x18\xdd\xf5\xd1\xf0\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x04\x88\x01\x01\x12\x18\n\x07purpose\x18\x9e\xfa\xef\x96\x01 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x04role\x18\xf6\x80\xd6\x01 \x01(\tH\x06\x88\x01\x01\x12W\n\x13secondary_ip_ranges\x18\xe3\xff\x94\x41 \x03(\x0b\x32\x37.google.cloud.compute.v1.UsableSubnetworkSecondaryRange\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\x07\x88\x01\x01\x12\x1b\n\nsubnetwork\x18\xee\xa7\xe4\x92\x01 \x01(\tH\x08\x88\x01\x01\"S\n\x0eIpv6AccessType\x12\x1e\n\x1aUNDEFINED_IPV6_ACCESS_TYPE\x10\x00\x12\x0f\n\x08\x45XTERNAL\x10\xcb\xa7\xfd\x10\x12\x10\n\x08INTERNAL\x10\xbd\xed\x96\x85\x01\"\xf8\x01\n\x07Purpose\x12\x15\n\x11UNDEFINED_PURPOSE\x10\x00\x12\x1b\n\x14GLOBAL_MANAGED_PROXY\x10\xf2\xcb\xe0p\x12#\n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\xd9\xb6\xcev\x12\x16\n\x0ePEER_MIGRATION\x10\x91\xaa\xc7\xea\x01\x12\x0f\n\x07PRIVATE\x10\xe3\xe2\xb2\xc0\x01\x12\x13\n\x0bPRIVATE_NAT\x10\xa5\xc8\xae\xaf\x01\x12\x17\n\x10PRIVATE_RFC_1918\x10\xdb\xfe\xc5y\x12\x1e\n\x17PRIVATE_SERVICE_CONNECT\x10\xc4\xf4\xf9\x16\x12\x1d\n\x16REGIONAL_MANAGED_PROXY\x10\xee\xb6\xfdH\":\n\x04Role\x12\x12\n\x0eUNDEFINED_ROLE\x10\x00\x12\x0e\n\x06\x41\x43TIVE\x10\x86\xe6\x89\x96\x01\x12\x0e\n\x06\x42\x41\x43KUP\x10\xc2\xd3\xcd\xa2\x01\"[\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%B\x17\n\x15_external_ipv6_prefixB\x17\n\x15_internal_ipv6_prefixB\x10\n\x0e_ip_cidr_rangeB\x13\n\x11_ipv6_access_typeB\n\n\x08_networkB\n\n\x08_purposeB\x07\n\x05_roleB\r\n\x0b_stack_typeB\r\n\x0b_subnetwork\"}\n\x1eUsableSubnetworkSecondaryRange\x12\x1d\n\rip_cidr_range\x18\xca\xcd\xe4. \x01(\tH\x00\x88\x01\x01\x12\x1b\n\nrange_name\x18\xcd\xf0\xb4\x9e\x01 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\r\n\x0b_range_name\"\xa4\x03\n\x1fUsableSubnetworksAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12;\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32).google.cloud.compute.v1.UsableSubnetwork\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12M\n\x0fscoped_warnings\x18\xa6\x96\xf8\x66 \x03(\x0b\x32\x31.google.cloud.compute.v1.SubnetworksScopedWarning\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x7f\n\x13UsageExportLocation\x12\x1c\n\x0b\x62ucket_name\x18\xc0\x97\x9e\x87\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x12report_name_prefix\x18\xbb\xb0\xd7\x98\x01 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\x15\n\x13_report_name_prefix\"\xda\x01\n\x1bValidateRegionUrlMapRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\x12p\n)region_url_maps_validate_request_resource\x18\x9a\xcc\x80\x1b \x01(\x0b\x32\x35.google.cloud.compute.v1.RegionUrlMapsValidateRequestB\x03\xe0\x41\x02\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x15ValidateUrlMapRequest\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x07url_map\x18\x8c\x95\x81\xaf\x01 \x01(\tB\x03\xe0\x41\x02\x12\x64\n\"url_maps_validate_request_resource\x18\xef\xd1\xe4\xbc\x01 \x01(\x0b\x32/.google.cloud.compute.v1.UrlMapsValidateRequestB\x03\xe0\x41\x02\"\xaf\x01\n\x15VmEndpointNatMappings\x12\x1d\n\rinstance_name\x18\xf5\xe7\xd8l \x01(\tH\x00\x88\x01\x01\x12\x65\n\x16interface_nat_mappings\x18\x89\x80\x95z \x03(\x0b\x32\x42.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsB\x10\n\x0e_instance_name\"\xe2\x03\n)VmEndpointNatMappingsInterfaceNatMappings\x12$\n\x18\x64rain_nat_ip_port_ranges\x18\xc1\xe3\xc7\xbc\x01 \x03(\t\x12\x1e\n\x12nat_ip_port_ranges\x18\x9a\xb0\xcc\xfd\x01 \x03(\t\x12*\n\x19num_total_drain_nat_ports\x18\xf9\xa5\xff\x9f\x01 \x01(\x05H\x00\x88\x01\x01\x12$\n\x13num_total_nat_ports\x18\x80\xdb\x80\x8f\x01 \x01(\x05H\x01\x88\x01\x01\x12l\n\rrule_mappings\x18\xc8\xee\xea\xe7\x01 \x03(\x0b\x32Q.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings\x12&\n\x15source_alias_ip_range\x18\xd8\xa3\xfc\xd1\x01 \x01(\tH\x02\x88\x01\x01\x12!\n\x11source_virtual_ip\x18\xff\xa2\xb9G \x01(\tH\x03\x88\x01\x01\x42\x1c\n\x1a_num_total_drain_nat_portsB\x16\n\x14_num_total_nat_portsB\x18\n\x16_source_alias_ip_rangeB\x14\n\x12_source_virtual_ip\"\xb6\x02\n8VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings\x12$\n\x18\x64rain_nat_ip_port_ranges\x18\xc1\xe3\xc7\xbc\x01 \x03(\t\x12\x1e\n\x12nat_ip_port_ranges\x18\x9a\xb0\xcc\xfd\x01 \x03(\t\x12*\n\x19num_total_drain_nat_ports\x18\xf9\xa5\xff\x9f\x01 \x01(\x05H\x00\x88\x01\x01\x12$\n\x13num_total_nat_ports\x18\x80\xdb\x80\x8f\x01 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0brule_number\x18\xec\xdb\x9a\xff\x01 \x01(\x05H\x02\x88\x01\x01\x42\x1c\n\x1a_num_total_drain_nat_portsB\x16\n\x14_num_total_nat_portsB\x0e\n\x0c_rule_number\"\xbc\x02\n\x19VmEndpointNatMappingsList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x41\n\x06result\x18\x9d\x90\xb7\x42 \x03(\x0b\x32..google.cloud.compute.v1.VmEndpointNatMappings\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xd2\x06\n\nVpnGateway\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12\"\n\x12gateway_ip_version\x18\x9b\xed\x83\x1f \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x05\x88\x01\x01\x12\x43\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32/.google.cloud.compute.v1.VpnGateway.LabelsEntry\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x06\x88\x01\x01\x12\x17\n\x07network\x18\xae\xb4\x85o \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x08\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\t\x88\x01\x01\x12\x1b\n\nstack_type\x18\x91\xb5\x8b\xcb\x01 \x01(\tH\n\x88\x01\x01\x12Q\n\x0evpn_interfaces\x18\x85\xcd\xe5+ \x03(\x0b\x32\x36.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"N\n\x10GatewayIpVersion\x12 \n\x1cUNDEFINED_GATEWAY_IP_VERSION\x10\x00\x12\x0b\n\x04IPV4\x10\x85\xcc\x89\x01\x12\x0b\n\x04IPV6\x10\x87\xcc\x89\x01\"[\n\tStackType\x12\x18\n\x14UNDEFINED_STACK_TYPE\x10\x00\x12\x10\n\tIPV4_IPV6\x10\x81\xe8\xca\n\x12\x10\n\tIPV4_ONLY\x10\xa6\xcb\xd5\n\x12\x10\n\tIPV6_ONLY\x10\xe4\xad\xfc%B\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x15\n\x13_gateway_ip_versionB\x05\n\x03_idB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\n\n\x08_networkB\t\n\x07_regionB\x0c\n\n_self_linkB\r\n\x0b_stack_type\"\xbf\x03\n\x18VpnGatewayAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12N\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32<.google.cloud.compute.v1.VpnGatewayAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a\\\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.compute.v1.VpnGatewaysScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa5\x02\n\x0eVpnGatewayList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x35\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32#.google.cloud.compute.v1.VpnGateway\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"g\n\x10VpnGatewayStatus\x12S\n\x0fvpn_connections\x18\x8a\xed\xbe\xd1\x01 \x03(\x0b\x32\x36.google.cloud.compute.v1.VpnGatewayStatusVpnConnection\"\xd1\x02\n0VpnGatewayStatusHighAvailabilityRequirementState\x12\x15\n\x05state\x18\x91\x89\xab\x34 \x01(\tH\x00\x88\x01\x01\x12\"\n\x12unsatisfied_reason\x18\x8a\xf7\x9d\x1a \x01(\tH\x01\x88\x01\x01\"f\n\x05State\x12\x13\n\x0fUNDEFINED_STATE\x10\x00\x12!\n\x19\x43ONNECTION_REDUNDANCY_MET\x10\x9b\xca\xf5\xf0\x01\x12%\n\x1d\x43ONNECTION_REDUNDANCY_NOT_MET\x10\x8f\xd4\x89\xf4\x01\"Y\n\x11UnsatisfiedReason\x12 \n\x1cUNDEFINED_UNSATISFIED_REASON\x10\x00\x12\"\n\x1bINCOMPLETE_TUNNELS_COVERAGE\x10\xfd\xf6\xd4\x1a\x42\x08\n\x06_stateB\x15\n\x13_unsatisfied_reason\"\xcb\x01\n\x16VpnGatewayStatusTunnel\x12\'\n\x17local_gateway_interface\x18\xaa\x9a\xdaK \x01(\rH\x00\x88\x01\x01\x12&\n\x16peer_gateway_interface\x18\xe1\xde\x9c\x66 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\ntunnel_url\x18\x98\xa2\xd4% \x01(\tH\x02\x88\x01\x01\x42\x1a\n\x18_local_gateway_interfaceB\x19\n\x17_peer_gateway_interfaceB\r\n\x0b_tunnel_url\"\xca\x02\n\x1dVpnGatewayStatusVpnConnection\x12&\n\x15peer_external_gateway\x18\x8d\xee\xc7\xb7\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x10peer_gcp_gateway\x18\xbc\xe9\xb3\x86\x01 \x01(\tH\x01\x88\x01\x01\x12`\n\x05state\x18\x91\x89\xab\x34 \x01(\x0b\x32I.google.cloud.compute.v1.VpnGatewayStatusHighAvailabilityRequirementStateH\x02\x88\x01\x01\x12\x43\n\x07tunnels\x18\x8b\xfa\xed\x31 \x03(\x0b\x32/.google.cloud.compute.v1.VpnGatewayStatusTunnelB\x18\n\x16_peer_external_gatewayB\x13\n\x11_peer_gcp_gatewayB\x08\n\x06_state\"\xda\x01\n\x1dVpnGatewayVpnGatewayInterface\x12\x10\n\x02id\x18\x9b\x1a \x01(\rH\x00\x88\x01\x01\x12(\n\x17interconnect_attachment\x18\xf4\x8a\xf7\x92\x01 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\nip_address\x18\xdc\xf1\xdc\xc1\x01 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x0cipv6_address\x18\x9c\xb3\xef\xa2\x01 \x01(\tH\x03\x88\x01\x01\x42\x05\n\x03_idB\x1a\n\x18_interconnect_attachmentB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_address\"l\n\x1cVpnGatewaysGetStatusResponse\x12\x41\n\x06result\x18\x9d\x90\xb7\x42 \x01(\x0b\x32).google.cloud.compute.v1.VpnGatewayStatusH\x00\x88\x01\x01\x42\t\n\x07_result\"\x9c\x01\n\x15VpnGatewaysScopedList\x12<\n\x0cvpn_gateways\x18\x9a\xfb\xca{ \x03(\x0b\x32#.google.cloud.compute.v1.VpnGateway\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x9b\x0c\n\tVpnTunnel\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x01\x88\x01\x01\x12 \n\x0f\x64\x65tailed_status\x18\xe1\xa4\x83\x9f\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0bike_version\x18\x9c\xd0\x90h \x01(\x05H\x04\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x05\x88\x01\x01\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x06\x88\x01\x01\x12\x42\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32..google.cloud.compute.v1.VpnTunnel.LabelsEntry\x12\"\n\x16local_traffic_selector\x18\xb5\xac\xa7\x97\x01 \x03(\t\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x07\x88\x01\x01\x12&\n\x15peer_external_gateway\x18\x8d\xee\xc7\xb7\x01 \x01(\tH\x08\x88\x01\x01\x12\x30\n\x1fpeer_external_gateway_interface\x18\x87\xe5\xf2\xd7\x01 \x01(\x05H\t\x88\x01\x01\x12!\n\x10peer_gcp_gateway\x18\xbc\xe9\xb3\x86\x01 \x01(\tH\n\x88\x01\x01\x12\x18\n\x07peer_ip\x18\xa4\xda\xdf\xb6\x01 \x01(\tH\x0b\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x0c\x88\x01\x01\x12#\n\x17remote_traffic_selector\x18\xba\xdd\x90\xab\x01 \x03(\t\x12\x16\n\x06router\x18\xc9\xae\xee\x46 \x01(\tH\r\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x0e\x88\x01\x01\x12\x1e\n\rshared_secret\x18\xca\xa7\x8f\xb6\x01 \x01(\tH\x0f\x88\x01\x01\x12#\n\x12shared_secret_hash\x18\xe3\xe8\x99\xbe\x01 \x01(\tH\x10\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x11\x88\x01\x01\x12#\n\x12target_vpn_gateway\x18\xcb\x80\xf6\xfd\x01 \x01(\tH\x12\x88\x01\x01\x12\x1c\n\x0bvpn_gateway\x18\xf9\x83\xf6\xc1\x01 \x01(\tH\x13\x88\x01\x01\x12%\n\x15vpn_gateway_interface\x18\xf3\x8c\xe2- \x01(\x05H\x14\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd3\x02\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x1c\n\x14\x41LLOCATING_RESOURCES\x10\xc0\xc9\x83\x99\x01\x12\x1a\n\x13\x41UTHORIZATION_ERROR\x10\x82\x9d\x9f\x0b\x12\x16\n\x0e\x44\x45PROVISIONING\x10\xee\x93\xc4\xcc\x01\x12\x12\n\x0b\x45STABLISHED\x10\xf8\x8e\xaf*\x12\x0e\n\x06\x46\x41ILED\x10\xbd\x90\xa6\xd9\x01\x12\x16\n\x0f\x46IRST_HANDSHAKE\x10\xe8\xd9\xa1[\x12\x1b\n\x13NEGOTIATION_FAILURE\x10\xec\xc5\xe8\xab\x01\x12\x14\n\rNETWORK_ERROR\x10\xf7\xc0\xbb\\\x12\x1a\n\x13NO_INCOMING_PACKETS\x10\xf0\x98\x9b\x39\x12\x14\n\x0cPROVISIONING\x10\xed\xf5\xda\x8a\x01\x12\x0f\n\x08REJECTED\x10\xfe\x88\x84S\x12\x0f\n\x07STOPPED\x10\xad\xbb\xec\xd3\x01\x12\x1e\n\x17WAITING_FOR_FULL_CONFIG\x10\xca\xc4\xed\x13\x42\x15\n\x13_creation_timestampB\x0e\n\x0c_descriptionB\x12\n\x10_detailed_statusB\x05\n\x03_idB\x0e\n\x0c_ike_versionB\x07\n\x05_kindB\x14\n\x12_label_fingerprintB\x07\n\x05_nameB\x18\n\x16_peer_external_gatewayB\"\n _peer_external_gateway_interfaceB\x13\n\x11_peer_gcp_gatewayB\n\n\x08_peer_ipB\t\n\x07_regionB\t\n\x07_routerB\x0c\n\n_self_linkB\x10\n\x0e_shared_secretB\x15\n\x13_shared_secret_hashB\t\n\x07_statusB\x15\n\x13_target_vpn_gatewayB\x0e\n\x0c_vpn_gatewayB\x18\n\x16_vpn_gateway_interface\"\xbc\x03\n\x17VpnTunnelAggregatedList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12M\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32;.google.cloud.compute.v1.VpnTunnelAggregatedList.ItemsEntry\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x17\n\x0cunreachables\x18\x9f\xa0\x86t \x03(\t\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x1a[\n\nItemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.compute.v1.VpnTunnelsScopedList:\x02\x38\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xa3\x02\n\rVpnTunnelList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x34\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\".google.cloud.compute.v1.VpnTunnel\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x99\x01\n\x14VpnTunnelsScopedList\x12:\n\x0bvpn_tunnels\x18\xc0\xf1\xfaM \x03(\x0b\x32\".google.cloud.compute.v1.VpnTunnel\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x00\x88\x01\x01\x42\n\n\x08_warning\"\x8c\x01\n\x10WafExpressionSet\x12\x12\n\x07\x61liases\x18\xfe\x9d\xf5K \x03(\t\x12K\n\x0b\x65xpressions\x18\xdb\x81\xdbS \x03(\x0b\x32\x33.google.cloud.compute.v1.WafExpressionSetExpression\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x42\x05\n\x03_id\"b\n\x1aWafExpressionSetExpression\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0bsensitivity\x18\x9f\xbd\x90\r \x01(\x05H\x01\x88\x01\x01\x42\x05\n\x03_idB\x0e\n\x0c_sensitivity\"P\n\x1aWaitGlobalOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\"h\n\x1aWaitRegionOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x03\xe0\x41\x02\"d\n\x18WaitZoneOperationRequest\x12\x19\n\toperation\x18\xe7\xaa\xeb\x18 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x07project\x18\x99\x96\xc1l \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x04zone\x18\xac\xc7\xe4\x01 \x01(\tB\x03\xe0\x41\x02\"\xfd\x08\n\x07Warning\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x04\x64\x61ta\x18\xaa\xdf\xbb\x01 \x03(\x0b\x32\x1d.google.cloud.compute.v1.Data\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\"\xfc\x07\n\x04\x43ode\x12\x12\n\x0eUNDEFINED_CODE\x10\x00\x12\x15\n\x0e\x43LEANUP_FAILED\x10\xd8\x8c\xd6G\x12 \n\x18\x44\x45PRECATED_RESOURCE_USED\x10\xc2\xdf\xeb\xba\x01\x12\x1c\n\x14\x44\x45PRECATED_TYPE_USED\x10\x96\xa4\x9e\xa5\x01\x12(\n DISK_SIZE_LARGER_THAN_IMAGE_SIZE\x10\x97\x81\x95\xb0\x01\x12\x1e\n\x16\x45XPERIMENTAL_TYPE_USED\x10\x8b\x8e\xc1\xd7\x01\x12\x1b\n\x14\x45XTERNAL_API_WARNING\x10\xc3\xbf\xdaS\x12\x1d\n\x15\x46IELD_VALUE_OVERRIDEN\x10\xaf\xb6\x99\x9d\x01\x12#\n\x1bINJECTED_KERNELS_DEPRECATED\x10\x8b\xd9\x82\xc7\x01\x12\x34\n,INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB\x10\xce\x9b\xbc\xbf\x01\x12 \n\x18LARGE_DEPLOYMENT_WARNING\x10\xa6\xe7\xc8\xe5\x01\x12!\n\x1aLIST_OVERHEAD_QUOTA_EXCEED\x10\xc5\xb0\xda\x16\x12\x1f\n\x17MISSING_TYPE_DEPENDENCY\x10\xf7\xf8\xa2\xa4\x01\x12%\n\x1dNEXT_HOP_ADDRESS_NOT_ASSIGNED\x10\x87\xa5\xfa\x9a\x01\x12\"\n\x1aNEXT_HOP_CANNOT_IP_FORWARD\x10\xe7\xea\xe7\xb6\x01\x12.\n\'NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE\x10\x92\xe8\xfc\x45\x12#\n\x1bNEXT_HOP_INSTANCE_NOT_FOUND\x10\xce\xcc\xaf\xdd\x01\x12\'\n NEXT_HOP_INSTANCE_NOT_ON_NETWORK\x10\xc2\xe8\x9dt\x12\x1c\n\x14NEXT_HOP_NOT_RUNNING\x10\xb1\xcf\xf0\xc6\x01\x12\x19\n\x12NOT_CRITICAL_ERROR\x10\xd4\xa8\xb7\x32\x12\x19\n\x12NO_RESULTS_ON_PAGE\x10\x88\xa6\xa9\x0e\x12\x16\n\x0fPARTIAL_SUCCESS\x10\x85\xae\x87\x13\x12\x1e\n\x16QUOTA_INFO_UNAVAILABLE\x10\xa6\xd2\x8c\x91\x01\x12\x1d\n\x16REQUIRED_TOS_AGREEMENT\x10\x83\xce\xe4\x01\x12\x31\n)RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING\x10\xc1\xf4\xed\xec\x01\x12\x1b\n\x14RESOURCE_NOT_DELETED\x10\xbc\xb7\xb2P\x12!\n\x19SCHEMA_VALIDATION_IGNORED\x10\xca\xd4\x9f\x83\x01\x12(\n!SINGLE_INSTANCE_PROPERTY_TEMPLATE\x10\xd1\x89\xf8\x7f\x12\x1d\n\x15UNDECLARED_PROPERTIES\x10\x9f\x86\x9b\xba\x01\x12\x12\n\x0bUNREACHABLE\x10\xb4\xbd\xad\x06\x42\x07\n\x05_codeB\n\n\x08_message\"\xfe\x08\n\x08Warnings\x12\x14\n\x04\x63ode\x18\xed\xdb\xba\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x04\x64\x61ta\x18\xaa\xdf\xbb\x01 \x03(\x0b\x32\x1d.google.cloud.compute.v1.Data\x12\x18\n\x07message\x18\x87\x80\xac\xc7\x01 \x01(\tH\x01\x88\x01\x01\"\xfc\x07\n\x04\x43ode\x12\x12\n\x0eUNDEFINED_CODE\x10\x00\x12\x15\n\x0e\x43LEANUP_FAILED\x10\xd8\x8c\xd6G\x12 \n\x18\x44\x45PRECATED_RESOURCE_USED\x10\xc2\xdf\xeb\xba\x01\x12\x1c\n\x14\x44\x45PRECATED_TYPE_USED\x10\x96\xa4\x9e\xa5\x01\x12(\n DISK_SIZE_LARGER_THAN_IMAGE_SIZE\x10\x97\x81\x95\xb0\x01\x12\x1e\n\x16\x45XPERIMENTAL_TYPE_USED\x10\x8b\x8e\xc1\xd7\x01\x12\x1b\n\x14\x45XTERNAL_API_WARNING\x10\xc3\xbf\xdaS\x12\x1d\n\x15\x46IELD_VALUE_OVERRIDEN\x10\xaf\xb6\x99\x9d\x01\x12#\n\x1bINJECTED_KERNELS_DEPRECATED\x10\x8b\xd9\x82\xc7\x01\x12\x34\n,INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB\x10\xce\x9b\xbc\xbf\x01\x12 \n\x18LARGE_DEPLOYMENT_WARNING\x10\xa6\xe7\xc8\xe5\x01\x12!\n\x1aLIST_OVERHEAD_QUOTA_EXCEED\x10\xc5\xb0\xda\x16\x12\x1f\n\x17MISSING_TYPE_DEPENDENCY\x10\xf7\xf8\xa2\xa4\x01\x12%\n\x1dNEXT_HOP_ADDRESS_NOT_ASSIGNED\x10\x87\xa5\xfa\x9a\x01\x12\"\n\x1aNEXT_HOP_CANNOT_IP_FORWARD\x10\xe7\xea\xe7\xb6\x01\x12.\n\'NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE\x10\x92\xe8\xfc\x45\x12#\n\x1bNEXT_HOP_INSTANCE_NOT_FOUND\x10\xce\xcc\xaf\xdd\x01\x12\'\n NEXT_HOP_INSTANCE_NOT_ON_NETWORK\x10\xc2\xe8\x9dt\x12\x1c\n\x14NEXT_HOP_NOT_RUNNING\x10\xb1\xcf\xf0\xc6\x01\x12\x19\n\x12NOT_CRITICAL_ERROR\x10\xd4\xa8\xb7\x32\x12\x19\n\x12NO_RESULTS_ON_PAGE\x10\x88\xa6\xa9\x0e\x12\x16\n\x0fPARTIAL_SUCCESS\x10\x85\xae\x87\x13\x12\x1e\n\x16QUOTA_INFO_UNAVAILABLE\x10\xa6\xd2\x8c\x91\x01\x12\x1d\n\x16REQUIRED_TOS_AGREEMENT\x10\x83\xce\xe4\x01\x12\x31\n)RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING\x10\xc1\xf4\xed\xec\x01\x12\x1b\n\x14RESOURCE_NOT_DELETED\x10\xbc\xb7\xb2P\x12!\n\x19SCHEMA_VALIDATION_IGNORED\x10\xca\xd4\x9f\x83\x01\x12(\n!SINGLE_INSTANCE_PROPERTY_TEMPLATE\x10\xd1\x89\xf8\x7f\x12\x1d\n\x15UNDECLARED_PROPERTIES\x10\x9f\x86\x9b\xba\x01\x12\x12\n\x0bUNREACHABLE\x10\xb4\xbd\xad\x06\x42\x07\n\x05_codeB\n\n\x08_message\"\xcf\x01\n\x16WeightedBackendService\x12 \n\x0f\x62\x61\x63kend_service\x18\x8a\xc0\xae\x92\x01 \x01(\tH\x00\x88\x01\x01\x12I\n\rheader_action\x18\xa8\xa0\xb8\x9c\x01 \x01(\x0b\x32).google.cloud.compute.v1.HttpHeaderActionH\x01\x88\x01\x01\x12\x17\n\x06weight\x18\xf8\x84\xc5\x86\x01 \x01(\rH\x02\x88\x01\x01\x42\x12\n\x10_backend_serviceB\x10\n\x0e_header_actionB\t\n\x07_weight\"\xa0\x01\n&WithdrawPublicAdvertisedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12(\n\x18public_advertised_prefix\x18\x9e\xf7\xc9\x30 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\xbf\x01\n%WithdrawPublicDelegatedPrefixeRequest\x12!\n\x07project\x18\x99\x96\xc1l \x01(\tB\r\xe0\x41\x02\xf2G\x07project\x12\'\n\x17public_delegated_prefix\x18\xe8\xdc\xb1\x61 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tB\x0c\xe0\x41\x02\xf2G\x06region\x12\x1a\n\nrequest_id\x18\xcb\x81\xd9\x11 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_request_id\"\x9f\x02\n\x0bXpnHostList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x32\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32 .google.cloud.compute.v1.Project\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\x9a\x01\n\rXpnResourceId\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12\x14\n\x04type\x18\xba\x9e\xda\x01 \x01(\tH\x01\x88\x01\x01\"Q\n\x04Type\x12\x12\n\x0eUNDEFINED_TYPE\x10\x00\x12\x0f\n\x07PROJECT\x10\xf9\xad\xef\xc2\x01\x12$\n\x1dXPN_RESOURCE_TYPE_UNSPECIFIED\x10\xfa\xad\xa5HB\x05\n\x03_idB\x07\n\x05_type\"\x97\x04\n\x04Zone\x12\"\n\x17\x61vailable_cpu_platforms\x18\x93\xf3\xd9S \x03(\t\x12\"\n\x12\x63reation_timestamp\x18\xb6\x8f\xc7\x0e \x01(\tH\x00\x88\x01\x01\x12G\n\ndeprecated\x18\xb3\xcb\xd1\xf5\x01 \x01(\x0b\x32*.google.cloud.compute.v1.DeprecationStatusH\x01\x88\x01\x01\x12\x1c\n\x0b\x64\x65scription\x18\xfc\x87\xd6\xc9\x01 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x02id\x18\x9b\x1a \x01(\x04H\x03\x88\x01\x01\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x04name\x18\x8b\xf5\xcd\x01 \x01(\tH\x05\x88\x01\x01\x12\x16\n\x06region\x18\xf4\xcd\xa0\x42 \x01(\tH\x06\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x07\x88\x01\x01\x12\x16\n\x06status\x18\xf2\x9f\xb7V \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0csupports_pzs\x18\xee\xf6\x85( \x01(\x08H\t\x88\x01\x01\"4\n\x06Status\x12\x14\n\x10UNDEFINED_STATUS\x10\x00\x12\x0b\n\x04\x44OWN\x10\xa2\xb9\x80\x01\x12\x07\n\x02UP\x10\x9b\x15\x42\x15\n\x13_creation_timestampB\r\n\x0b_deprecatedB\x0e\n\x0c_descriptionB\x05\n\x03_idB\x07\n\x05_kindB\x07\n\x05_nameB\t\n\x07_regionB\x0c\n\n_self_linkB\t\n\x07_statusB\x0f\n\r_supports_pzs\"\x99\x02\n\x08ZoneList\x12\x10\n\x02id\x18\x9b\x1a \x01(\tH\x00\x88\x01\x01\x12/\n\x05items\x18\xc0\xcf\xf7/ \x03(\x0b\x32\x1d.google.cloud.compute.v1.Zone\x12\x14\n\x04kind\x18\x94\xf7\xc8\x01 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x0fnext_page_token\x18\x95\xba\x86& \x01(\tH\x02\x88\x01\x01\x12\x1a\n\tself_link\x18\x8d\x92\xc5\xd9\x01 \x01(\tH\x03\x88\x01\x01\x12\x39\n\x07warning\x18\x9c\xdf\x96\x18 \x01(\x0b\x32 .google.cloud.compute.v1.WarningH\x04\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_kindB\x12\n\x10_next_page_tokenB\x0c\n\n_self_linkB\n\n\x08_warning\"\xcd\x01\n\x14ZoneSetLabelsRequest\x12!\n\x11label_fingerprint\x18\x99\xf0\xf7T \x01(\tH\x00\x88\x01\x01\x12M\n\x06labels\x18\xff\xbf\xc1\xee\x01 \x03(\x0b\x32\x39.google.cloud.compute.v1.ZoneSetLabelsRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_label_fingerprint\"\xb1\x01\n\x14ZoneSetPolicyRequest\x12\x36\n\x08\x62indings\x18\x8e\xc5\xa4\xc0\x01 \x03(\x0b\x32 .google.cloud.compute.v1.Binding\x12\x14\n\x04\x65tag\x18\x95\xd2\xbe\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06policy\x18\xb2\xca\xb6+ \x01(\x0b\x32\x1f.google.cloud.compute.v1.PolicyH\x01\x88\x01\x01\x42\x07\n\x05_etagB\t\n\x07_policy2\xb3\x06\n\x10\x41\x63\x63\x65leratorTypes\x12\xd6\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest\x1a\x36.google.cloud.compute.v1.AcceleratorTypeAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/acceleratorTypes\x12\xdc\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetAcceleratorTypeRequest\x1a(.google.cloud.compute.v1.AcceleratorType\"w\xda\x41\x1dproject,zone,accelerator_type\x82\xd3\xe4\x93\x02Q\x12O/compute/v1/projects/{project}/zones/{zone}/acceleratorTypes/{accelerator_type}\x12\xbf\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListAcceleratorTypesRequest\x1a,.google.cloud.compute.v1.AcceleratorTypeList\"S\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02>\x12project,zone,disk,disks_add_resource_policies_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02|\"L/compute/v1/projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies:,disks_add_resource_policies_request_resource\x12\xb5\x01\n\x0e\x41ggregatedList\x12\x33.google.cloud.compute.v1.AggregatedListDisksRequest\x1a+.google.cloud.compute.v1.DiskAggregatedList\"A\xda\x41\x07project\x82\xd3\xe4\x93\x02\x31\x12//compute/v1/projects/{project}/aggregated/disks\x12\x8e\x02\n\nBulkInsert\x12..google.cloud.compute.v1.BulkInsertDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x01\xda\x41/project,zone,bulk_insert_disk_resource_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x62\".google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest\x1a\x41.google.cloud.compute.v1.FirewallPoliciesListAssociationsResponse\"I\xda\x41\x00\x82\xd3\xe4\x93\x02@\x12>/compute/v1/locations/global/firewallPolicies/listAssociations\x12\xe8\x01\n\x04Move\x12\x32.google.cloud.compute.v1.MoveFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41\x19\x66irewall_policy,parent_id\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02\x46\"D/compute/v1/locations/global/firewallPolicies/{firewall_policy}/move\x12\x8e\x02\n\x05Patch\x12\x33.google.cloud.compute.v1.PatchFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x01\xda\x41(firewall_policy,firewall_policy_resource\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02[2?/compute/v1/locations/global/firewallPolicies/{firewall_policy}:\x18\x66irewall_policy_resource\x12\xaa\x02\n\tPatchRule\x12\x37.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xbf\x01\xda\x41-firewall_policy,firewall_policy_rule_resource\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02j\"I/compute/v1/locations/global/firewallPolicies/{firewall_policy}/patchRule:\x1d\x66irewall_policy_rule_resource\x12\x85\x02\n\x11RemoveAssociation\x12?.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x8a\x01\xda\x41\x0f\x66irewall_policy\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02S\"Q/compute/v1/locations/global/firewallPolicies/{firewall_policy}/removeAssociation\x12\xf0\x01\n\nRemoveRule\x12\x38.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x83\x01\xda\x41\x0f\x66irewall_policy\x8aN\x1cGlobalOrganizationOperations\x82\xd3\xe4\x93\x02L\"J/compute/v1/locations/global/firewallPolicies/{firewall_policy}/removeRule\x12\xa7\x02\n\x0cSetIamPolicy\x12:.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb9\x01\xda\x41\x38resource,global_organization_set_policy_request_resource\x82\xd3\xe4\x93\x02x\"E/compute/v1/locations/global/firewallPolicies/{resource}/setIamPolicy:/global_organization_set_policy_request_resource\x12\xae\x02\n\x12TestIamPermissions\x12@.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xa3\x01\xda\x41*resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02p\"K/compute/v1/locations/global/firewallPolicies/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xcf\n\n\tFirewalls\x12\xc6\x01\n\x06\x44\x65lete\x12..google.cloud.compute.v1.DeleteFirewallRequest\x1a\".google.cloud.compute.v1.Operation\"h\xda\x41\x10project,firewall\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02<*:/compute/v1/projects/{project}/global/firewalls/{firewall}\x12\xac\x01\n\x03Get\x12+.google.cloud.compute.v1.GetFirewallRequest\x1a!.google.cloud.compute.v1.Firewall\"U\xda\x41\x10project,firewall\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/global/firewalls/{firewall}\x12\xd7\x01\n\x06Insert\x12..google.cloud.compute.v1.InsertFirewallRequest\x1a\".google.cloud.compute.v1.Operation\"y\xda\x41\x19project,firewall_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x44\"//compute/v1/projects/{project}/global/firewalls:\x11\x66irewall_resource\x12\x9f\x01\n\x04List\x12-.google.cloud.compute.v1.ListFirewallsRequest\x1a%.google.cloud.compute.v1.FirewallList\"A\xda\x41\x07project\x82\xd3\xe4\x93\x02\x31\x12//compute/v1/projects/{project}/global/firewalls\x12\xea\x01\n\x05Patch\x12-.google.cloud.compute.v1.PatchFirewallRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\"project,firewall,firewall_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02O2:/compute/v1/projects/{project}/global/firewalls/{firewall}:\x11\x66irewall_resource\x12\xec\x01\n\x06Update\x12..google.cloud.compute.v1.UpdateFirewallRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\"project,firewall,firewall_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02O\x1a:/compute/v1/projects/{project}/global/firewalls/{firewall}:\x11\x66irewall_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x99\x11\n\x0f\x46orwardingRules\x12\xd3\x01\n\x0e\x41ggregatedList\x12=.google.cloud.compute.v1.AggregatedListForwardingRulesRequest\x1a\x35.google.cloud.compute.v1.ForwardingRuleAggregatedList\"K\xda\x41\x07project\x82\xd3\xe4\x93\x02;\x12\x39/compute/v1/projects/{project}/aggregated/forwardingRules\x12\xf2\x01\n\x06\x44\x65lete\x12\x34.google.cloud.compute.v1.DeleteForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\x1eproject,region,forwarding_rule\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S*Q/compute/v1/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\x12\xdd\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetForwardingRuleRequest\x1a\'.google.cloud.compute.v1.ForwardingRule\"z\xda\x41\x1eproject,region,forwarding_rule\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\x12\x83\x02\n\x06Insert\x12\x34.google.cloud.compute.v1.InsertForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\x9e\x01\xda\x41\'project,region,forwarding_rule_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02[\"?/compute/v1/projects/{project}/regions/{region}/forwardingRules:\x18\x66orwarding_rule_resource\x12\xc2\x01\n\x04List\x12\x33.google.cloud.compute.v1.ListForwardingRulesRequest\x1a+.google.cloud.compute.v1.ForwardingRuleList\"X\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x41\x12?/compute/v1/projects/{project}/regions/{region}/forwardingRules\x12\xa3\x02\n\x05Patch\x12\x33.google.cloud.compute.v1.PatchForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41\x37project,region,forwarding_rule,forwarding_rule_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02m2Q/compute/v1/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}:\x18\x66orwarding_rule_resource\x12\xbb\x02\n\tSetLabels\x12\x37.google.cloud.compute.v1.SetLabelsForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xd0\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02z\"T/compute/v1/projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels:\"region_set_labels_request_resource\x12\xb7\x02\n\tSetTarget\x12\x37.google.cloud.compute.v1.SetTargetForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xcc\x01\xda\x41\x38project,region,forwarding_rule,target_reference_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02x\"[/compute/v1/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}/setTarget:\x19target_reference_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc9\x0b\n\x0fGlobalAddresses\x12\xc9\x01\n\x06\x44\x65lete\x12\x33.google.cloud.compute.v1.DeleteGlobalAddressRequest\x1a\".google.cloud.compute.v1.Operation\"f\xda\x41\x0fproject,address\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02;*9/compute/v1/projects/{project}/global/addresses/{address}\x12\xae\x01\n\x03Get\x12\x30.google.cloud.compute.v1.GetGlobalAddressRequest\x1a .google.cloud.compute.v1.Address\"S\xda\x41\x0fproject,address\x82\xd3\xe4\x93\x02;\x12\x39/compute/v1/projects/{project}/global/addresses/{address}\x12\xda\x01\n\x06Insert\x12\x33.google.cloud.compute.v1.InsertGlobalAddressRequest\x1a\".google.cloud.compute.v1.Operation\"w\xda\x41\x18project,address_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x43\"//compute/v1/projects/{project}/global/addresses:\x10\x61\x64\x64ress_resource\x12\xa4\x01\n\x04List\x12\x33.google.cloud.compute.v1.ListGlobalAddressesRequest\x1a$.google.cloud.compute.v1.AddressList\"A\xda\x41\x07project\x82\xd3\xe4\x93\x02\x31\x12//compute/v1/projects/{project}/global/addresses\x12\x9a\x02\n\x04Move\x12\x31.google.cloud.compute.v1.MoveGlobalAddressRequest\x1a\".google.cloud.compute.v1.Operation\"\xba\x01\xda\x41\x36project,address,global_addresses_move_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02h\">/compute/v1/projects/{project}/global/addresses/{address}/move:&global_addresses_move_request_resource\x12\xa3\x02\n\tSetLabels\x12\x36.google.cloud.compute.v1.SetLabelsGlobalAddressRequest\x1a\".google.cloud.compute.v1.Operation\"\xb9\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02j\"D/compute/v1/projects/{project}/global/addresses/{resource}/setLabels:\"global_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xfb\x0e\n\x15GlobalForwardingRules\x12\xe6\x01\n\x06\x44\x65lete\x12:.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"|\xda\x41\x17project,forwarding_rule\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02I*G/compute/v1/projects/{project}/global/forwardingRules/{forwarding_rule}\x12\xd2\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetGlobalForwardingRuleRequest\x1a\'.google.cloud.compute.v1.ForwardingRule\"i\xda\x41\x17project,forwarding_rule\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/global/forwardingRules/{forwarding_rule}\x12\xf8\x01\n\x06Insert\x12:.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41 project,forwarding_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02Q\"5/compute/v1/projects/{project}/global/forwardingRules:\x18\x66orwarding_rule_resource\x12\xb7\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListGlobalForwardingRulesRequest\x1a+.google.cloud.compute.v1.ForwardingRuleList\"G\xda\x41\x07project\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/global/forwardingRules\x12\x98\x02\n\x05Patch\x12\x39.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xaf\x01\xda\x41\x30project,forwarding_rule,forwarding_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x63\x32G/compute/v1/projects/{project}/global/forwardingRules/{forwarding_rule}:\x18\x66orwarding_rule_resource\x12\xb0\x02\n\tSetLabels\x12=.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xbf\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02p\"J/compute/v1/projects/{project}/global/forwardingRules/{resource}/setLabels:\"global_set_labels_request_resource\x12\xac\x02\n\tSetTarget\x12=.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest\x1a\".google.cloud.compute.v1.Operation\"\xbb\x01\xda\x41\x31project,forwarding_rule,target_reference_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02n\"Q/compute/v1/projects/{project}/global/forwardingRules/{forwarding_rule}/setTarget:\x19target_reference_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xac\x12\n\x1bGlobalNetworkEndpointGroups\x12\xbc\x03\n\x16\x41ttachNetworkEndpoints\x12P.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x02\xda\x41_project,network_endpoint_group,global_network_endpoint_groups_attach_endpoints_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\xaf\x01\"k/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}/attachNetworkEndpoints:@global_network_endpoint_groups_attach_endpoints_request_resource\x12\x81\x02\n\x06\x44\x65lete\x12@.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\x1eproject,network_endpoint_group\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02V*T/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}\x12\xbc\x03\n\x16\x44\x65tachNetworkEndpoints\x12P.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x02\xda\x41_project,network_endpoint_group,global_network_endpoint_groups_detach_endpoints_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\xaf\x01\"k/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}/detachNetworkEndpoints:@global_network_endpoint_groups_detach_endpoints_request_resource\x12\xf2\x01\n\x03Get\x12=.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest\x1a-.google.cloud.compute.v1.NetworkEndpointGroup\"}\xda\x41\x1eproject,network_endpoint_group\x82\xd3\xe4\x93\x02V\x12T/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}\x12\x92\x02\n\x06Insert\x12@.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41\'project,network_endpoint_group_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02^\";/compute/v1/projects/{project}/global/networkEndpointGroups:\x1fnetwork_endpoint_group_resource\x12\xc9\x01\n\x04List\x12?.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest\x1a\x31.google.cloud.compute.v1.NetworkEndpointGroupList\"M\xda\x41\x07project\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/global/networkEndpointGroups\x12\xc0\x02\n\x14ListNetworkEndpoints\x12O.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest\x1a\x42.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints\"\x92\x01\xda\x41\x1eproject,network_endpoint_group\x82\xd3\xe4\x93\x02k\"i/compute/v1/projects/{project}/global/networkEndpointGroups/{network_endpoint_group}/listNetworkEndpoints\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xd0\x08\n\x10GlobalOperations\x12\xca\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest\x1a\x30.google.cloud.compute.v1.OperationAggregatedList\"F\xda\x41\x07project\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/aggregated/operations\x12\xd1\x01\n\x06\x44\x65lete\x12\x35.google.cloud.compute.v1.DeleteGlobalOperationRequest\x1a\x36.google.cloud.compute.v1.DeleteGlobalOperationResponse\"X\xda\x41\x11project,operation\x82\xd3\xe4\x93\x02>*\x12.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest\x1a\".google.cloud.compute.v1.Operation\"J\xda\x41\toperation\x90N\x01\x82\xd3\xe4\x93\x02\x35\x12\x33/compute/v1/locations/global/operations/{operation}\x12\xa4\x01\n\x04List\x12@.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest\x1a&.google.cloud.compute.v1.OperationList\"2\xda\x41\x00\x82\xd3\xe4\x93\x02)\x12\'/compute/v1/locations/global/operations\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xd1\x0b\n\x1dGlobalPublicDelegatedPrefixes\x12\x87\x02\n\x06\x44\x65lete\x12\x42.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\x94\x01\xda\x41\x1fproject,public_delegated_prefix\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02Y*W/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{public_delegated_prefix}\x12\xfa\x01\n\x03Get\x12?.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest\x1a..google.cloud.compute.v1.PublicDelegatedPrefix\"\x81\x01\xda\x41\x1fproject,public_delegated_prefix\x82\xd3\xe4\x93\x02Y\x12W/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{public_delegated_prefix}\x12\x98\x02\n\x06Insert\x12\x42.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x01\xda\x41(project,public_delegated_prefix_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x61\"=/compute/v1/projects/{project}/global/publicDelegatedPrefixes: public_delegated_prefix_resource\x12\xce\x01\n\x04List\x12\x41.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest\x1a\x32.google.cloud.compute.v1.PublicDelegatedPrefixList\"O\xda\x41\x07project\x82\xd3\xe4\x93\x02?\x12=/compute/v1/projects/{project}/global/publicDelegatedPrefixes\x12\xc8\x02\n\x05Patch\x12\x41.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xd7\x01\xda\x41@project,public_delegated_prefix,public_delegated_prefix_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02{2W/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{public_delegated_prefix}: public_delegated_prefix_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x83\r\n\x0cHealthChecks\x12\xcb\x01\n\x0e\x41ggregatedList\x12:.google.cloud.compute.v1.AggregatedListHealthChecksRequest\x1a\x33.google.cloud.compute.v1.HealthChecksAggregatedList\"H\xda\x41\x07project\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/aggregated/healthChecks\x12\xd4\x01\n\x06\x44\x65lete\x12\x31.google.cloud.compute.v1.DeleteHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"s\xda\x41\x14project,health_check\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x43*A/compute/v1/projects/{project}/global/healthChecks/{health_check}\x12\xbd\x01\n\x03Get\x12..google.cloud.compute.v1.GetHealthCheckRequest\x1a$.google.cloud.compute.v1.HealthCheck\"`\xda\x41\x14project,health_check\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/global/healthChecks/{health_check}\x12\xe6\x01\n\x06Insert\x12\x31.google.cloud.compute.v1.InsertHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\x84\x01\xda\x41\x1dproject,health_check_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02K\"2/compute/v1/projects/{project}/global/healthChecks:\x15health_check_resource\x12\xa8\x01\n\x04List\x12\x30.google.cloud.compute.v1.ListHealthChecksRequest\x1a(.google.cloud.compute.v1.HealthCheckList\"D\xda\x41\x07project\x82\xd3\xe4\x93\x02\x34\x12\x32/compute/v1/projects/{project}/global/healthChecks\x12\x80\x02\n\x05Patch\x12\x30.google.cloud.compute.v1.PatchHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\xa0\x01\xda\x41*project,health_check,health_check_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02Z2A/compute/v1/projects/{project}/global/healthChecks/{health_check}:\x15health_check_resource\x12\x82\x02\n\x06Update\x12\x31.google.cloud.compute.v1.UpdateHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\xa0\x01\xda\x41*project,health_check,health_check_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02Z\x1a\x41/compute/v1/projects/{project}/global/healthChecks/{health_check}:\x15health_check_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x84\x03\n\x10ImageFamilyViews\x12\xc8\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetImageFamilyViewRequest\x1a(.google.cloud.compute.v1.ImageFamilyView\"c\xda\x41\x13project,zone,family\x82\xd3\xe4\x93\x02G\x12\x45/compute/v1/projects/{project}/zones/{zone}/imageFamilyViews/{family}\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xfc\x13\n\x06Images\x12\xba\x01\n\x06\x44\x65lete\x12+.google.cloud.compute.v1.DeleteImageRequest\x1a\".google.cloud.compute.v1.Operation\"_\xda\x41\rproject,image\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x36*4/compute/v1/projects/{project}/global/images/{image}\x12\x84\x02\n\tDeprecate\x12..google.cloud.compute.v1.DeprecateImageRequest\x1a\".google.cloud.compute.v1.Operation\"\xa2\x01\xda\x41)project,image,deprecation_status_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02]\">/compute/v1/projects/{project}/global/images/{image}/deprecate:\x1b\x64\x65precation_status_resource\x12\x9d\x01\n\x03Get\x12(.google.cloud.compute.v1.GetImageRequest\x1a\x1e.google.cloud.compute.v1.Image\"L\xda\x41\rproject,image\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/global/images/{image}\x12\xba\x01\n\rGetFromFamily\x12\x32.google.cloud.compute.v1.GetFromFamilyImageRequest\x1a\x1e.google.cloud.compute.v1.Image\"U\xda\x41\x0eproject,family\x82\xd3\xe4\x93\x02>\x12\",/compute/v1/projects/{project}/global/images:\x0eimage_resource\x12\x96\x01\n\x04List\x12*.google.cloud.compute.v1.ListImagesRequest\x1a\".google.cloud.compute.v1.ImageList\">\xda\x41\x07project\x82\xd3\xe4\x93\x02.\x12,/compute/v1/projects/{project}/global/images\x12\xd7\x01\n\x05Patch\x12*.google.cloud.compute.v1.PatchImageRequest\x1a\".google.cloud.compute.v1.Operation\"~\xda\x41\x1cproject,image,image_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x46\x32\x34/compute/v1/projects/{project}/global/images/{image}:\x0eimage_resource\x12\x8b\x02\n\x0cSetIamPolicy\x12\x31.google.cloud.compute.v1.SetIamPolicyImageRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xa6\x01\xda\x41\x33project,resource,global_set_policy_request_resource\x82\xd3\xe4\x93\x02j\"D/compute/v1/projects/{project}/global/images/{resource}/setIamPolicy:\"global_set_policy_request_resource\x12\x98\x02\n\tSetLabels\x12..google.cloud.compute.v1.SetLabelsImageRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02g\"A/compute/v1/projects/{project}/global/images/{resource}/setLabels:\"global_set_labels_request_resource\x12\xac\x02\n\x12TestIamPermissions\x12\x37.google.cloud.compute.v1.TestIamPermissionsImageRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xaa\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02o\"J/compute/v1/projects/{project}/global/images/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xa2\x0e\n\"InstanceGroupManagerResizeRequests\x12\xc9\x02\n\x06\x43\x61ncel\x12G.google.cloud.compute.v1.CancelInstanceGroupManagerResizeRequestRequest\x1a\".google.cloud.compute.v1.Operation\"\xd1\x01\xda\x41\x32project,zone,instance_group_manager,resize_request\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x84\x01\"\x81\x01/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}/cancel\x12\xc0\x02\n\x06\x44\x65lete\x12G.google.cloud.compute.v1.DeleteInstanceGroupManagerResizeRequestRequest\x1a\".google.cloud.compute.v1.Operation\"\xc8\x01\xda\x41\x32project,zone,instance_group_manager,resize_request\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02|*z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}\x12\xc1\x02\n\x03Get\x12\x44.google.cloud.compute.v1.GetInstanceGroupManagerResizeRequestRequest\x1a:.google.cloud.compute.v1.InstanceGroupManagerResizeRequest\"\xb7\x01\xda\x41\x32project,zone,instance_group_manager,resize_request\x82\xd3\xe4\x93\x02|\x12z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}\x12\x80\x03\n\x06Insert\x12G.google.cloud.compute.v1.InsertInstanceGroupManagerResizeRequestRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x02\xda\x41Rproject,zone,instance_group_manager,instance_group_manager_resize_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x9b\x01\"i/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests:.instance_group_manager_resize_request_resource\x12\xb1\x02\n\x04List\x12\x46.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest\x1aG.google.cloud.compute.v1.InstanceGroupManagerResizeRequestsListResponse\"\x97\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02k\x12i/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xd5\x45\n\x15InstanceGroupManagers\x12\xa1\x03\n\x10\x41\x62\x61ndonInstances\x12\x44.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa2\x02\xda\x41^project,zone,instance_group_manager,instance_group_managers_abandon_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa9\x01\"k/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/abandonInstances::instance_group_managers_abandon_instances_request_resource\x12\xe5\x01\n\x0e\x41ggregatedList\x12\x43.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest\x1a;.google.cloud.compute.v1.InstanceGroupManagerAggregatedList\"Q\xda\x41\x07project\x82\xd3\xe4\x93\x02\x41\x12?/compute/v1/projects/{project}/aggregated/instanceGroupManagers\x12\xae\x03\n\x17\x41pplyUpdatesToInstances\x12K.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x02\xda\x41Zproject,zone,instance_group_manager,instance_group_managers_apply_updates_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xac\x01\"r/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/applyUpdatesToInstances:6instance_group_managers_apply_updates_request_resource\x12\x9c\x03\n\x0f\x43reateInstances\x12\x43.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x02\xda\x41]project,zone,instance_group_manager,instance_group_managers_create_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa7\x01\"j/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/createInstances:9instance_group_managers_create_instances_request_resource\x12\x84\x02\n\x06\x44\x65lete\x12:.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x99\x01\xda\x41#project,zone,instance_group_manager\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\\*Z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}\x12\x9c\x03\n\x0f\x44\x65leteInstances\x12\x43.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x02\xda\x41]project,zone,instance_group_manager,instance_group_managers_delete_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa7\x01\"j/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/deleteInstances:9instance_group_managers_delete_instances_request_resource\x12\xc5\x03\n\x18\x44\x65letePerInstanceConfigs\x12L.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x02\xda\x41\x64project,zone,instance_group_manager,instance_group_managers_delete_per_instance_configs_req_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xb7\x01\"s/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/deletePerInstanceConfigs:@instance_group_managers_delete_per_instance_configs_req_resource\x12\xf8\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetInstanceGroupManagerRequest\x1a-.google.cloud.compute.v1.InstanceGroupManager\"\x88\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02\\\x12Z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}\x12\x95\x02\n\x06Insert\x12:.google.cloud.compute.v1.InsertInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xaa\x01\xda\x41,project,zone,instance_group_manager_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x64\"A/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers:\x1finstance_group_manager_resource\x12\xce\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListInstanceGroupManagersRequest\x1a\x31.google.cloud.compute.v1.InstanceGroupManagerList\"X\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers\x12\xa5\x02\n\nListErrors\x12?.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest\x1a@.google.cloud.compute.v1.InstanceGroupManagersListErrorsResponse\"\x93\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02g\x12\x65/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/listErrors\x12\xcd\x02\n\x14ListManagedInstances\x12I.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest\x1aJ.google.cloud.compute.v1.InstanceGroupManagersListManagedInstancesResponse\"\x9d\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02q\"o/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/listManagedInstances\x12\xd1\x02\n\x16ListPerInstanceConfigs\x12K.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest\x1aH.google.cloud.compute.v1.InstanceGroupManagersListPerInstanceConfigsResp\"\x9f\x01\xda\x41#project,zone,instance_group_manager\x82\xd3\xe4\x93\x02s\"q/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/listPerInstanceConfigs\x12\xc3\x02\n\x05Patch\x12\x39.google.cloud.compute.v1.PatchInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xda\x01\xda\x41\x43project,zone,instance_group_manager,instance_group_manager_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02}2Z/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}:\x1finstance_group_manager_resource\x12\xc0\x03\n\x17PatchPerInstanceConfigs\x12K.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xb3\x02\xda\x41\x63project,zone,instance_group_manager,instance_group_managers_patch_per_instance_configs_req_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xb5\x01\"r/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/patchPerInstanceConfigs:?instance_group_managers_patch_per_instance_configs_req_resource\x12\xa6\x03\n\x11RecreateInstances\x12\x45.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x02\xda\x41_project,zone,instance_group_manager,instance_group_managers_recreate_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xab\x01\"l/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/recreateInstances:;instance_group_managers_recreate_instances_request_resource\x12\x90\x02\n\x06Resize\x12:.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x01\xda\x41(project,zone,instance_group_manager,size\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x63\"a/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resize\x12\x9c\x03\n\x0fResumeInstances\x12\x43.google.cloud.compute.v1.ResumeInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x02\xda\x41]project,zone,instance_group_manager,instance_group_managers_resume_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa7\x01\"j/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resumeInstances:9instance_group_managers_resume_instances_request_resource\x12\xb2\x03\n\x13SetInstanceTemplate\x12G.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xad\x02\xda\x41\x62project,zone,instance_group_manager,instance_group_managers_set_instance_template_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xb0\x01\"n/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/setInstanceTemplate:>instance_group_managers_set_instance_template_request_resource\x12\x99\x03\n\x0eSetTargetPools\x12\x42.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9e\x02\xda\x41]project,zone,instance_group_manager,instance_group_managers_set_target_pools_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa6\x01\"i/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/setTargetPools:9instance_group_managers_set_target_pools_request_resource\x12\x97\x03\n\x0eStartInstances\x12\x42.google.cloud.compute.v1.StartInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x9c\x02\xda\x41\\project,zone,instance_group_manager,instance_group_managers_start_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa5\x01\"i/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/startInstances:8instance_group_managers_start_instances_request_resource\x12\x92\x03\n\rStopInstances\x12\x41.google.cloud.compute.v1.StopInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\x99\x02\xda\x41[project,zone,instance_group_manager,instance_group_managers_stop_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa3\x01\"h/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/stopInstances:7instance_group_managers_stop_instances_request_resource\x12\xa1\x03\n\x10SuspendInstances\x12\x44.google.cloud.compute.v1.SuspendInstancesInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xa2\x02\xda\x41^project,zone,instance_group_manager,instance_group_managers_suspend_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xa9\x01\"k/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/suspendInstances::instance_group_managers_suspend_instances_request_resource\x12\xc5\x03\n\x18UpdatePerInstanceConfigs\x12L.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x02\xda\x41\x64project,zone,instance_group_manager,instance_group_managers_update_per_instance_configs_req_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\xb7\x01\"s/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/updatePerInstanceConfigs:@instance_group_managers_update_per_instance_configs_req_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf0\x14\n\x0eInstanceGroups\x12\xdf\x02\n\x0c\x41\x64\x64Instances\x12\x39.google.cloud.compute.v1.AddInstancesInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xef\x01\xda\x41Jproject,zone,instance_group,instance_groups_add_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8a\x01\"X/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}/addInstances:.instance_groups_add_instances_request_resource\x12\xd0\x01\n\x0e\x41ggregatedList\x12<.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest\x1a\x34.google.cloud.compute.v1.InstanceGroupAggregatedList\"J\xda\x41\x07project\x82\xd3\xe4\x93\x02:\x12\x38/compute/v1/projects/{project}/aggregated/instanceGroups\x12\xe6\x01\n\x06\x44\x65lete\x12\x33.google.cloud.compute.v1.DeleteInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x82\x01\xda\x41\x1bproject,zone,instance_group\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02M*K/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}\x12\xd2\x01\n\x03Get\x12\x30.google.cloud.compute.v1.GetInstanceGroupRequest\x1a&.google.cloud.compute.v1.InstanceGroup\"q\xda\x41\x1bproject,zone,instance_group\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}\x12\xf7\x01\n\x06Insert\x12\x33.google.cloud.compute.v1.InsertInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x93\x01\xda\x41$project,zone,instance_group_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02U\":/compute/v1/projects/{project}/zones/{zone}/instanceGroups:\x17instance_group_resource\x12\xb9\x01\n\x04List\x12\x32.google.cloud.compute.v1.ListInstanceGroupsRequest\x1a*.google.cloud.compute.v1.InstanceGroupList\"Q\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/zones/{zone}/instanceGroups\x12\xe6\x02\n\rListInstances\x12;.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest\x1a\x34.google.cloud.compute.v1.InstanceGroupsListInstances\"\xe1\x01\xda\x41Kproject,zone,instance_group,instance_groups_list_instances_request_resource\x82\xd3\xe4\x93\x02\x8c\x01\"Y/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}/listInstances:/instance_groups_list_instances_request_resource\x12\xee\x02\n\x0fRemoveInstances\x12<.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xf8\x01\xda\x41Mproject,zone,instance_group,instance_groups_remove_instances_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x90\x01\"[/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}/removeInstances:1instance_groups_remove_instances_request_resource\x12\xe6\x02\n\rSetNamedPorts\x12:.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xf4\x01\xda\x41Lproject,zone,instance_group,instance_groups_set_named_ports_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8d\x01\"Y/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instance_group}/setNamedPorts:0instance_groups_set_named_ports_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xcb\x04\n\x17InstanceSettingsService\x12\xb9\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetInstanceSettingRequest\x1a).google.cloud.compute.v1.InstanceSettings\"S\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02>\x12project,zone,instance,network_interface,access_config_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02j\"P/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig:\x16\x61\x63\x63\x65ss_config_resource\x12\xe2\x02\n\x13\x41\x64\x64ResourcePolicies\x12;.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41\x46project,zone,instance,instances_add_resource_policies_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x88\x01\"T/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies:0instances_add_resource_policies_request_resource\x12\xc1\x01\n\x0e\x41ggregatedList\x12\x37.google.cloud.compute.v1.AggregatedListInstancesRequest\x1a/.google.cloud.compute.v1.InstanceAggregatedList\"E\xda\x41\x07project\x82\xd3\xe4\x93\x02\x35\x12\x33/compute/v1/projects/{project}/aggregated/instances\x12\x92\x02\n\nAttachDisk\x12\x32.google.cloud.compute.v1.AttachDiskInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xab\x01\xda\x41,project,zone,instance,attached_disk_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x65\"K/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/attachDisk:\x16\x61ttached_disk_resource\x12\x9e\x02\n\nBulkInsert\x12\x32.google.cloud.compute.v1.BulkInsertInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xb7\x01\xda\x41\x33project,zone,bulk_insert_instance_resource_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02j\"@/compute/v1/projects/{project}/zones/{zone}/instances/bulkInsert:&bulk_insert_instance_resource_resource\x12\xcf\x01\n\x06\x44\x65lete\x12..google.cloud.compute.v1.DeleteInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"q\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x42*@/compute/v1/projects/{project}/zones/{zone}/instances/{instance}\x12\x9b\x02\n\x12\x44\x65leteAccessConfig\x12:.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xa4\x01\xda\x41\x35project,zone,instance,access_config,network_interface\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02U\"S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig\x12\xef\x01\n\nDetachDisk\x12\x32.google.cloud.compute.v1.DetachDiskInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41!project,zone,instance,device_name\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02M\"K/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/detachDisk\x12\xb7\x01\n\x03Get\x12+.google.cloud.compute.v1.GetInstanceRequest\x1a!.google.cloud.compute.v1.Instance\"`\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/zones/{zone}/instances/{instance}\x12\xa2\x02\n\x15GetEffectiveFirewalls\x12=.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest\x1a?.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponse\"\x88\x01\xda\x41\'project,zone,instance,network_interface\x82\xd3\xe4\x93\x02X\x12V/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls\x12\xef\x01\n\x12GetGuestAttributes\x12:.google.cloud.compute.v1.GetGuestAttributesInstanceRequest\x1a(.google.cloud.compute.v1.GuestAttributes\"s\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes\x12\xd4\x01\n\x0cGetIamPolicy\x12\x34.google.cloud.compute.v1.GetIamPolicyInstanceRequest\x1a\x1f.google.cloud.compute.v1.Policy\"m\xda\x41\x15project,zone,resource\x82\xd3\xe4\x93\x02O\x12M/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy\x12\xd8\x01\n\rGetScreenshot\x12\x35.google.cloud.compute.v1.GetScreenshotInstanceRequest\x1a#.google.cloud.compute.v1.Screenshot\"k\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/screenshot\x12\xea\x01\n\x13GetSerialPortOutput\x12;.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest\x1a).google.cloud.compute.v1.SerialPortOutput\"k\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/serialPort\x12\x93\x02\n\x1bGetShieldedInstanceIdentity\x12\x43.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest\x1a\x31.google.cloud.compute.v1.ShieldedInstanceIdentity\"|\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02^\x12\\/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity\x12\xe1\x01\n\x06Insert\x12..google.cloud.compute.v1.InsertInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x82\x01\xda\x41\x1eproject,zone,instance_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02J\"5/compute/v1/projects/{project}/zones/{zone}/instances:\x11instance_resource\x12\xaa\x01\n\x04List\x12-.google.cloud.compute.v1.ListInstancesRequest\x1a%.google.cloud.compute.v1.InstanceList\"L\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/zones/{zone}/instances\x12\xe3\x01\n\rListReferrers\x12\x36.google.cloud.compute.v1.ListReferrersInstancesRequest\x1a..google.cloud.compute.v1.InstanceListReferrers\"j\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02L\x12J/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/referrers\x12\xfb\x01\n\x12PerformMaintenance\x12:.google.cloud.compute.v1.PerformMaintenanceInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x84\x01\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02U\"S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/performMaintenance\x12\xf1\x02\n\x16RemoveResourcePolicies\x12>.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xf2\x01\xda\x41Iproject,zone,instance,instances_remove_resource_policies_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8e\x01\"W/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies:3instances_remove_resource_policies_request_resource\x12\xdf\x02\n\x12ReportHostAsFaulty\x12:.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe8\x01\xda\x41\x46project,zone,instance,instances_report_host_as_faulty_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x87\x01\"S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty:0instances_report_host_as_faulty_request_resource\x12\xd3\x01\n\x05Reset\x12-.google.cloud.compute.v1.ResetInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"w\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02H\"F/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reset\x12\xd6\x01\n\x06Resume\x12..google.cloud.compute.v1.ResumeInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"x\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02I\"G/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/resume\x12\x96\x02\n\x17SendDiagnosticInterrupt\x12?.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest\x1a@.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse\"x\xda\x41\x15project,zone,instance\x82\xd3\xe4\x93\x02Z\"X/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt\x12\x84\x02\n\x15SetDeletionProtection\x12=.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41\x15project,zone,resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02X\"V/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection\x12\x90\x02\n\x11SetDiskAutoDelete\x12\x39.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x9b\x01\xda\x41-project,zone,instance,auto_delete,device_name\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02T\"R/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete\x12\x98\x02\n\x0cSetIamPolicy\x12\x34.google.cloud.compute.v1.SetIamPolicyInstanceRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb0\x01\xda\x41\x36project,zone,resource,zone_set_policy_request_resource\x82\xd3\xe4\x93\x02q\"M/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy: zone_set_policy_request_resource\x12\xad\x02\n\tSetLabels\x12\x31.google.cloud.compute.v1.SetLabelsInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc8\x01\xda\x41;project,zone,instance,instances_set_labels_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02s\"J/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setLabels:%instances_set_labels_request_resource\x12\xe2\x02\n\x13SetMachineResources\x12;.google.cloud.compute.v1.SetMachineResourcesInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41\x46project,zone,instance,instances_set_machine_resources_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x88\x01\"T/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineResources:0instances_set_machine_resources_request_resource\x12\xc8\x02\n\x0eSetMachineType\x12\x36.google.cloud.compute.v1.SetMachineTypeInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xd9\x01\xda\x41\x41project,zone,instance,instances_set_machine_type_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02~\"O/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineType:+instances_set_machine_type_request_resource\x12\x8b\x02\n\x0bSetMetadata\x12\x33.google.cloud.compute.v1.SetMetadataInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xa2\x01\xda\x41\'project,zone,instance,metadata_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x61\"L/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMetadata:\x11metadata_resource\x12\xda\x02\n\x11SetMinCpuPlatform\x12\x39.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe5\x01\xda\x41\x45project,zone,instance,instances_set_min_cpu_platform_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x85\x01\"R/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform:/instances_set_min_cpu_platform_request_resource\x12\xa3\x02\n\x07SetName\x12/.google.cloud.compute.v1.SetNameInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc2\x01\xda\x41\x39project,zone,instance,instances_set_name_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02o\"H/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setName:#instances_set_name_request_resource\x12\x95\x02\n\rSetScheduling\x12\x35.google.cloud.compute.v1.SetSchedulingInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xa8\x01\xda\x41)project,zone,instance,scheduling_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x65\"N/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setScheduling:\x13scheduling_resource\x12\xd8\x02\n\x11SetSecurityPolicy\x12\x39.google.cloud.compute.v1.SetSecurityPolicyInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe3\x01\xda\x41\x44project,zone,instance,instances_set_security_policy_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x84\x01\"R/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy:.instances_set_security_policy_request_resource\x12\xd8\x02\n\x11SetServiceAccount\x12\x39.google.cloud.compute.v1.SetServiceAccountInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe3\x01\xda\x41\x44project,zone,instance,instances_set_service_account_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x84\x01\"R/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount:.instances_set_service_account_request_resource\x12\x85\x03\n\"SetShieldedInstanceIntegrityPolicy\x12J.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xee\x01\xda\x41\x41project,zone,instance,shielded_instance_integrity_policy_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x92\x01\x32\x63/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy:+shielded_instance_integrity_policy_resource\x12\xf7\x01\n\x07SetTags\x12/.google.cloud.compute.v1.SetTagsInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x96\x01\xda\x41#project,zone,instance,tags_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02Y\"H/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setTags:\rtags_resource\x12\x8d\x02\n\x18SimulateMaintenanceEvent\x12@.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x8a\x01\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02[\"Y/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent\x12\xd3\x01\n\x05Start\x12-.google.cloud.compute.v1.StartInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"w\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02H\"F/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/start\x12\xf3\x02\n\x16StartWithEncryptionKey\x12>.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xf4\x01\xda\x41Jproject,zone,instance,instances_start_with_encryption_key_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8f\x01\"W/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey:4instances_start_with_encryption_key_request_resource\x12\xd0\x01\n\x04Stop\x12,.google.cloud.compute.v1.StopInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"v\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02G\"E/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/stop\x12\xd9\x01\n\x07Suspend\x12/.google.cloud.compute.v1.SuspendInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"y\xda\x41\x15project,zone,instance\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02J\"H/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/suspend\x12\xbd\x02\n\x12TestIamPermissions\x12:.google.cloud.compute.v1.TestIamPermissionsInstanceRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb8\x01\xda\x41\x37project,zone,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02x\"S/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions:!test_permissions_request_resource\x12\xf5\x01\n\x06Update\x12..google.cloud.compute.v1.UpdateInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\x96\x01\xda\x41\'project,zone,instance,instance_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02U\x1a@/compute/v1/projects/{project}/zones/{zone}/instances/{instance}:\x11instance_resource\x12\xbc\x02\n\x12UpdateAccessConfig\x12:.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc5\x01\xda\x41>project,zone,instance,network_interface,access_config_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02m\"S/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig:\x16\x61\x63\x63\x65ss_config_resource\x12\xaf\x02\n\x13UpdateDisplayDevice\x12;.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x01\xda\x41-project,zone,instance,display_device_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02o2T/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice:\x17\x64isplay_device_resource\x12\xd0\x02\n\x16UpdateNetworkInterface\x12>.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xd1\x01\xda\x41\x42project,zone,instance,network_interface,network_interface_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02u2W/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface:\x1anetwork_interface_resource\x12\xdf\x02\n\x1cUpdateShieldedInstanceConfig\x12\x44.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xd4\x01\xda\x41\x37project,zone,instance,shielded_instance_config_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x82\x01\x32]/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig:!shielded_instance_config_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x83\x13\n\x10InstantSnapshots\x12\xd6\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListInstantSnapshotsRequest\x1a\x36.google.cloud.compute.v1.InstantSnapshotAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/instantSnapshots\x12\xee\x01\n\x06\x44\x65lete\x12\x35.google.cloud.compute.v1.DeleteInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41\x1dproject,zone,instant_snapshot\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02Q*O/compute/v1/projects/{project}/zones/{zone}/instantSnapshots/{instant_snapshot}\x12\xdc\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetInstantSnapshotRequest\x1a(.google.cloud.compute.v1.InstantSnapshot\"w\xda\x41\x1dproject,zone,instant_snapshot\x82\xd3\xe4\x93\x02Q\x12O/compute/v1/projects/{project}/zones/{zone}/instantSnapshots/{instant_snapshot}\x12\xe2\x01\n\x0cGetIamPolicy\x12;.google.cloud.compute.v1.GetIamPolicyInstantSnapshotRequest\x1a\x1f.google.cloud.compute.v1.Policy\"t\xda\x41\x15project,zone,resource\x82\xd3\xe4\x93\x02V\x12T/compute/v1/projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy\x12\xff\x01\n\x06Insert\x12\x35.google.cloud.compute.v1.InsertInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\x99\x01\xda\x41&project,zone,instant_snapshot_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02Y\"\x12.google.cloud.compute.v1.GetInterconnectAttachmentGroupRequest\x1a\x34.google.cloud.compute.v1.InterconnectAttachmentGroup\"\x92\x01\xda\x41%project,interconnect_attachment_group\x82\xd3\xe4\x93\x02\x64\x12\x62/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{interconnect_attachment_group}\x12\xef\x01\n\x0cGetIamPolicy\x12G.google.cloud.compute.v1.GetIamPolicyInterconnectAttachmentGroupRequest\x1a\x1f.google.cloud.compute.v1.Policy\"u\xda\x41\x10project,resource\x82\xd3\xe4\x93\x02\\\x12Z/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{resource}/getIamPolicy\x12\xe4\x02\n\x14GetOperationalStatus\x12O.google.cloud.compute.v1.GetOperationalStatusInterconnectAttachmentGroupRequest\x1aQ.google.cloud.compute.v1.InterconnectAttachmentGroupsGetOperationalStatusResponse\"\xa7\x01\xda\x41%project,interconnect_attachment_group\x82\xd3\xe4\x93\x02y\x12w/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{interconnect_attachment_group}/getOperationalStatus\x12\xa8\x02\n\x06Insert\x12\x41.google.cloud.compute.v1.InsertInterconnectAttachmentGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x01\xda\x41.project,interconnect_attachment_group_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02l\"B/compute/v1/projects/{project}/global/interconnectAttachmentGroups:&interconnect_attachment_group_resource\x12\xe1\x01\n\x04List\x12@.google.cloud.compute.v1.ListInterconnectAttachmentGroupsRequest\x1a\x41.google.cloud.compute.v1.InterconnectAttachmentGroupsListResponse\"T\xda\x41\x07project\x82\xd3\xe4\x93\x02\x44\x12\x42/compute/v1/projects/{project}/global/interconnectAttachmentGroups\x12\xe5\x02\n\x05Patch\x12@.google.cloud.compute.v1.PatchInterconnectAttachmentGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xf5\x01\xda\x41Lproject,interconnect_attachment_group,interconnect_attachment_group_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x8c\x01\x32\x62/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{interconnect_attachment_group}:&interconnect_attachment_group_resource\x12\xb8\x02\n\x0cSetIamPolicy\x12G.google.cloud.compute.v1.SetIamPolicyInterconnectAttachmentGroupRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xbd\x01\xda\x41\x33project,resource,global_set_policy_request_resource\x82\xd3\xe4\x93\x02\x80\x01\"Z/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{resource}/setIamPolicy:\"global_set_policy_request_resource\x12\xd9\x02\n\x12TestIamPermissions\x12M.google.cloud.compute.v1.TestIamPermissionsInterconnectAttachmentGroupRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc1\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x85\x01\"`/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc2\x10\n\x17InterconnectAttachments\x12\xeb\x01\n\x0e\x41ggregatedList\x12\x45.google.cloud.compute.v1.AggregatedListInterconnectAttachmentsRequest\x1a=.google.cloud.compute.v1.InterconnectAttachmentAggregatedList\"S\xda\x41\x07project\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/aggregated/interconnectAttachments\x12\x92\x02\n\x06\x44\x65lete\x12<.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x01\xda\x41&project,region,interconnect_attachment\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x63*a/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}\x12\x86\x02\n\x03Get\x12\x39.google.cloud.compute.v1.GetInterconnectAttachmentRequest\x1a/.google.cloud.compute.v1.InterconnectAttachment\"\x92\x01\xda\x41&project,region,interconnect_attachment\x82\xd3\xe4\x93\x02\x63\x12\x61/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}\x12\xa3\x02\n\x06Insert\x12<.google.cloud.compute.v1.InsertInterconnectAttachmentRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x01\xda\x41/project,region,interconnect_attachment_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02k\"G/compute/v1/projects/{project}/regions/{region}/interconnectAttachments: interconnect_attachment_resource\x12\xda\x01\n\x04List\x12;.google.cloud.compute.v1.ListInterconnectAttachmentsRequest\x1a\x33.google.cloud.compute.v1.InterconnectAttachmentList\"`\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/regions/{region}/interconnectAttachments\x12\xd4\x02\n\x05Patch\x12;.google.cloud.compute.v1.PatchInterconnectAttachmentRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41Gproject,region,interconnect_attachment,interconnect_attachment_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x85\x01\x32\x61/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}: interconnect_attachment_resource\x12\xcc\x02\n\tSetLabels\x12?.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest\x1a\".google.cloud.compute.v1.Operation\"\xd9\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x82\x01\"\\/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels:\"region_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb8\x16\n\x12InterconnectGroups\x12\xf3\x02\n\rCreateMembers\x12>.google.cloud.compute.v1.CreateMembersInterconnectGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xfd\x01\xda\x41Nproject,interconnect_group,interconnect_groups_create_members_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x92\x01\"[/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}/createMembers:3interconnect_groups_create_members_request_resource\x12\xed\x01\n\x06\x44\x65lete\x12\x37.google.cloud.compute.v1.DeleteInterconnectGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x85\x01\xda\x41\x1aproject,interconnect_group\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02O*M/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}\x12\xdb\x01\n\x03Get\x12\x34.google.cloud.compute.v1.GetInterconnectGroupRequest\x1a*.google.cloud.compute.v1.InterconnectGroup\"r\xda\x41\x1aproject,interconnect_group\x82\xd3\xe4\x93\x02O\x12M/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}\x12\xdb\x01\n\x0cGetIamPolicy\x12=.google.cloud.compute.v1.GetIamPolicyInterconnectGroupRequest\x1a\x1f.google.cloud.compute.v1.Policy\"k\xda\x41\x10project,resource\x82\xd3\xe4\x93\x02R\x12P/compute/v1/projects/{project}/global/interconnectGroups/{resource}/getIamPolicy\x12\xb0\x02\n\x14GetOperationalStatus\x12\x45.google.cloud.compute.v1.GetOperationalStatusInterconnectGroupRequest\x1aG.google.cloud.compute.v1.InterconnectGroupsGetOperationalStatusResponse\"\x87\x01\xda\x41\x1aproject,interconnect_group\x82\xd3\xe4\x93\x02\x64\x12\x62/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}/getOperationalStatus\x12\xfe\x01\n\x06Insert\x12\x37.google.cloud.compute.v1.InsertInterconnectGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x96\x01\xda\x41#project,interconnect_group_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02W\"8/compute/v1/projects/{project}/global/interconnectGroups:\x1binterconnect_group_resource\x12\xc3\x01\n\x04List\x12\x36.google.cloud.compute.v1.ListInterconnectGroupsRequest\x1a\x37.google.cloud.compute.v1.InterconnectGroupsListResponse\"J\xda\x41\x07project\x82\xd3\xe4\x93\x02:\x12\x38/compute/v1/projects/{project}/global/interconnectGroups\x12\xa4\x02\n\x05Patch\x12\x36.google.cloud.compute.v1.PatchInterconnectGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xbe\x01\xda\x41\x36project,interconnect_group,interconnect_group_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02l2M/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}:\x1binterconnect_group_resource\x12\xa3\x02\n\x0cSetIamPolicy\x12=.google.cloud.compute.v1.SetIamPolicyInterconnectGroupRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb2\x01\xda\x41\x33project,resource,global_set_policy_request_resource\x82\xd3\xe4\x93\x02v\"P/compute/v1/projects/{project}/global/interconnectGroups/{resource}/setIamPolicy:\"global_set_policy_request_resource\x12\xc4\x02\n\x12TestIamPermissions\x12\x43.google.cloud.compute.v1.TestIamPermissionsInterconnectGroupRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb6\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02{\"V/compute/v1/projects/{project}/global/interconnectGroups/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf1\x04\n\x15InterconnectLocations\x12\xea\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetInterconnectLocationRequest\x1a-.google.cloud.compute.v1.InterconnectLocation\"{\xda\x41\x1dproject,interconnect_location\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/global/interconnectLocations/{interconnect_location}\x12\xc3\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListInterconnectLocationsRequest\x1a\x31.google.cloud.compute.v1.InterconnectLocationList\"M\xda\x41\x07project\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/global/interconnectLocations\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xaa\x05\n\x1bInterconnectRemoteLocations\x12\x8b\x02\n\x03Get\x12=.google.cloud.compute.v1.GetInterconnectRemoteLocationRequest\x1a\x33.google.cloud.compute.v1.InterconnectRemoteLocation\"\x8f\x01\xda\x41$project,interconnect_remote_location\x82\xd3\xe4\x93\x02\x62\x12`/compute/v1/projects/{project}/global/interconnectRemoteLocations/{interconnect_remote_location}\x12\xd5\x01\n\x04List\x12?.google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest\x1a\x37.google.cloud.compute.v1.InterconnectRemoteLocationList\"S\xda\x41\x07project\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/global/interconnectRemoteLocations\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xe8\x0f\n\rInterconnects\x12\xd6\x01\n\x06\x44\x65lete\x12\x32.google.cloud.compute.v1.DeleteInterconnectRequest\x1a\".google.cloud.compute.v1.Operation\"t\xda\x41\x14project,interconnect\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x44*B/compute/v1/projects/{project}/global/interconnects/{interconnect}\x12\xc0\x01\n\x03Get\x12/.google.cloud.compute.v1.GetInterconnectRequest\x1a%.google.cloud.compute.v1.Interconnect\"a\xda\x41\x14project,interconnect\x82\xd3\xe4\x93\x02\x44\x12\x42/compute/v1/projects/{project}/global/interconnects/{interconnect}\x12\xfc\x01\n\x0eGetDiagnostics\x12:.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest\x1a<.google.cloud.compute.v1.InterconnectsGetDiagnosticsResponse\"p\xda\x41\x14project,interconnect\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/global/interconnects/{interconnect}/getDiagnostics\x12\x80\x02\n\x0fGetMacsecConfig\x12;.google.cloud.compute.v1.GetMacsecConfigInterconnectRequest\x1a=.google.cloud.compute.v1.InterconnectsGetMacsecConfigResponse\"q\xda\x41\x14project,interconnect\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/global/interconnects/{interconnect}/getMacsecConfig\x12\xe8\x01\n\x06Insert\x12\x32.google.cloud.compute.v1.InsertInterconnectRequest\x1a\".google.cloud.compute.v1.Operation\"\x85\x01\xda\x41\x1dproject,interconnect_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02L\"3/compute/v1/projects/{project}/global/interconnects:\x15interconnect_resource\x12\xab\x01\n\x04List\x12\x31.google.cloud.compute.v1.ListInterconnectsRequest\x1a).google.cloud.compute.v1.InterconnectList\"E\xda\x41\x07project\x82\xd3\xe4\x93\x02\x35\x12\x33/compute/v1/projects/{project}/global/interconnects\x12\x82\x02\n\x05Patch\x12\x31.google.cloud.compute.v1.PatchInterconnectRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41*project,interconnect,interconnect_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02[2B/compute/v1/projects/{project}/global/interconnects/{interconnect}:\x15interconnect_resource\x12\xa6\x02\n\tSetLabels\x12\x35.google.cloud.compute.v1.SetLabelsInterconnectRequest\x1a\".google.cloud.compute.v1.Operation\"\xbd\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02n\"H/compute/v1/projects/{project}/global/interconnects/{resource}/setLabels:\"global_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb0\x05\n\x0cLicenseCodes\x12\xbd\x01\n\x03Get\x12..google.cloud.compute.v1.GetLicenseCodeRequest\x1a$.google.cloud.compute.v1.LicenseCode\"`\xda\x41\x14project,license_code\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/global/licenseCodes/{license_code}\x12\xb8\x02\n\x12TestIamPermissions\x12=.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb0\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02u\"P/compute/v1/projects/{project}/global/licenseCodes/{resource}/testIamPermissions:!test_permissions_request_resource\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xe3\x0e\n\x08Licenses\x12\xc2\x01\n\x06\x44\x65lete\x12-.google.cloud.compute.v1.DeleteLicenseRequest\x1a\".google.cloud.compute.v1.Operation\"e\xda\x41\x0fproject,license\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02:*8/compute/v1/projects/{project}/global/licenses/{license}\x12\xa7\x01\n\x03Get\x12*.google.cloud.compute.v1.GetLicenseRequest\x1a .google.cloud.compute.v1.License\"R\xda\x41\x0fproject,license\x82\xd3\xe4\x93\x02:\x12\x38/compute/v1/projects/{project}/global/licenses/{license}\x12\xc7\x01\n\x0cGetIamPolicy\x12\x33.google.cloud.compute.v1.GetIamPolicyLicenseRequest\x1a\x1f.google.cloud.compute.v1.Policy\"a\xda\x41\x10project,resource\x82\xd3\xe4\x93\x02H\x12\x46/compute/v1/projects/{project}/global/licenses/{resource}/getIamPolicy\x12\xd3\x01\n\x06Insert\x12-.google.cloud.compute.v1.InsertLicenseRequest\x1a\".google.cloud.compute.v1.Operation\"v\xda\x41\x18project,license_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x42\"./compute/v1/projects/{project}/global/licenses:\x10license_resource\x12\xa5\x01\n\x04List\x12,.google.cloud.compute.v1.ListLicensesRequest\x1a-.google.cloud.compute.v1.LicensesListResponse\"@\xda\x41\x07project\x82\xd3\xe4\x93\x02\x30\x12./compute/v1/projects/{project}/global/licenses\x12\x8f\x02\n\x0cSetIamPolicy\x12\x33.google.cloud.compute.v1.SetIamPolicyLicenseRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xa8\x01\xda\x41\x33project,resource,global_set_policy_request_resource\x82\xd3\xe4\x93\x02l\"F/compute/v1/projects/{project}/global/licenses/{resource}/setIamPolicy:\"global_set_policy_request_resource\x12\xb0\x02\n\x12TestIamPermissions\x12\x39.google.cloud.compute.v1.TestIamPermissionsLicenseRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xac\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02q\"L/compute/v1/projects/{project}/global/licenses/{resource}/testIamPermissions:!test_permissions_request_resource\x12\xe6\x01\n\x06Update\x12-.google.cloud.compute.v1.UpdateLicenseRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41 project,license,license_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02L28/compute/v1/projects/{project}/global/licenses/{license}:\x10license_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x94\x10\n\rMachineImages\x12\xd8\x01\n\x06\x44\x65lete\x12\x32.google.cloud.compute.v1.DeleteMachineImageRequest\x1a\".google.cloud.compute.v1.Operation\"v\xda\x41\x15project,machine_image\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x45*C/compute/v1/projects/{project}/global/machineImages/{machine_image}\x12\xc2\x01\n\x03Get\x12/.google.cloud.compute.v1.GetMachineImageRequest\x1a%.google.cloud.compute.v1.MachineImage\"c\xda\x41\x15project,machine_image\x82\xd3\xe4\x93\x02\x45\x12\x43/compute/v1/projects/{project}/global/machineImages/{machine_image}\x12\xd1\x01\n\x0cGetIamPolicy\x12\x38.google.cloud.compute.v1.GetIamPolicyMachineImageRequest\x1a\x1f.google.cloud.compute.v1.Policy\"f\xda\x41\x10project,resource\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/global/machineImages/{resource}/getIamPolicy\x12\xea\x01\n\x06Insert\x12\x32.google.cloud.compute.v1.InsertMachineImageRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41\x1eproject,machine_image_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02M\"3/compute/v1/projects/{project}/global/machineImages:\x16machine_image_resource\x12\xab\x01\n\x04List\x12\x31.google.cloud.compute.v1.ListMachineImagesRequest\x1a).google.cloud.compute.v1.MachineImageList\"E\xda\x41\x07project\x82\xd3\xe4\x93\x02\x35\x12\x33/compute/v1/projects/{project}/global/machineImages\x12\x99\x02\n\x0cSetIamPolicy\x12\x38.google.cloud.compute.v1.SetIamPolicyMachineImageRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xad\x01\xda\x41\x33project,resource,global_set_policy_request_resource\x82\xd3\xe4\x93\x02q\"K/compute/v1/projects/{project}/global/machineImages/{resource}/setIamPolicy:\"global_set_policy_request_resource\x12\xa6\x02\n\tSetLabels\x12\x35.google.cloud.compute.v1.SetLabelsMachineImageRequest\x1a\".google.cloud.compute.v1.Operation\"\xbd\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02n\"H/compute/v1/projects/{project}/global/machineImages/{resource}/setLabels:\"global_set_labels_request_resource\x12\xba\x02\n\x12TestIamPermissions\x12>.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb1\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02v\"Q/compute/v1/projects/{project}/global/machineImages/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x83\x06\n\x0cMachineTypes\x12\xca\x01\n\x0e\x41ggregatedList\x12:.google.cloud.compute.v1.AggregatedListMachineTypesRequest\x1a\x32.google.cloud.compute.v1.MachineTypeAggregatedList\"H\xda\x41\x07project\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/aggregated/machineTypes\x12\xc8\x01\n\x03Get\x12..google.cloud.compute.v1.GetMachineTypeRequest\x1a$.google.cloud.compute.v1.MachineType\"k\xda\x41\x19project,zone,machine_type\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/zones/{zone}/machineTypes/{machine_type}\x12\xb3\x01\n\x04List\x12\x30.google.cloud.compute.v1.ListMachineTypesRequest\x1a(.google.cloud.compute.v1.MachineTypeList\"O\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02:\x12\x38/compute/v1/projects/{project}/zones/{zone}/machineTypes\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf0\x13\n\x12NetworkAttachments\x12\xdc\x01\n\x0e\x41ggregatedList\x12@.google.cloud.compute.v1.AggregatedListNetworkAttachmentsRequest\x1a\x38.google.cloud.compute.v1.NetworkAttachmentAggregatedList\"N\xda\x41\x07project\x82\xd3\xe4\x93\x02>\x12.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc4\x01\xda\x41\x35project,firewall_policy,firewall_policy_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02s\"R/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/patchRule:\x1d\x66irewall_policy_rule_resource\x12\x91\x02\n\x11RemoveAssociation\x12\x46.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x8f\x01\xda\x41\x17project,firewall_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\\\"Z/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/removeAssociation\x12\xa9\x02\n\x19RemovePacketMirroringRule\x12N.google.cloud.compute.v1.RemovePacketMirroringRuleNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x97\x01\xda\x41\x17project,firewall_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x64\"b/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/removePacketMirroringRule\x12\xfc\x01\n\nRemoveRule\x12?.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41\x17project,firewall_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02U\"S/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/removeRule\x12\xa5\x02\n\x0cSetIamPolicy\x12\x41.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb0\x01\xda\x41\x33project,resource,global_set_policy_request_resource\x82\xd3\xe4\x93\x02t\"N/compute/v1/projects/{project}/global/firewallPolicies/{resource}/setIamPolicy:\"global_set_policy_request_resource\x12\xc6\x02\n\x12TestIamPermissions\x12G.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb4\x01\xda\x41\x32project,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02y\"T/compute/v1/projects/{project}/global/firewallPolicies/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc4\x04\n\x0fNetworkProfiles\x12\xcc\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetNetworkProfileRequest\x1a\'.google.cloud.compute.v1.NetworkProfile\"i\xda\x41\x17project,network_profile\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/global/networkProfiles/{network_profile}\x12\xba\x01\n\x04List\x12\x33.google.cloud.compute.v1.ListNetworkProfilesRequest\x1a\x34.google.cloud.compute.v1.NetworkProfilesListResponse\"G\xda\x41\x07project\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/global/networkProfiles\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x92\x18\n\x08Networks\x12\xa3\x02\n\nAddPeering\x12\x31.google.cloud.compute.v1.AddPeeringNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\xbd\x01\xda\x41\x35project,network,networks_add_peering_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02l\"C/compute/v1/projects/{project}/global/networks/{network}/addPeering:%networks_add_peering_request_resource\x12\xc2\x01\n\x06\x44\x65lete\x12-.google.cloud.compute.v1.DeleteNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"e\xda\x41\x0fproject,network\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02:*8/compute/v1/projects/{project}/global/networks/{network}\x12\xa7\x01\n\x03Get\x12*.google.cloud.compute.v1.GetNetworkRequest\x1a .google.cloud.compute.v1.Network\"R\xda\x41\x0fproject,network\x82\xd3\xe4\x93\x02:\x12\x38/compute/v1/projects/{project}/global/networks/{network}\x12\xff\x01\n\x15GetEffectiveFirewalls\x12<.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest\x1a>.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponse\"h\xda\x41\x0fproject,network\x82\xd3\xe4\x93\x02P\x12N/compute/v1/projects/{project}/global/networks/{network}/getEffectiveFirewalls\x12\xd3\x01\n\x06Insert\x12-.google.cloud.compute.v1.InsertNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"v\xda\x41\x18project,network_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x42\"./compute/v1/projects/{project}/global/networks:\x10network_resource\x12\x9c\x01\n\x04List\x12,.google.cloud.compute.v1.ListNetworksRequest\x1a$.google.cloud.compute.v1.NetworkList\"@\xda\x41\x07project\x82\xd3\xe4\x93\x02\x30\x12./compute/v1/projects/{project}/global/networks\x12\xe9\x01\n\x11ListPeeringRoutes\x12\x39.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest\x1a\x33.google.cloud.compute.v1.ExchangedPeeringRoutesList\"d\xda\x41\x0fproject,network\x82\xd3\xe4\x93\x02L\x12J/compute/v1/projects/{project}/global/networks/{network}/listPeeringRoutes\x12\xe4\x01\n\x05Patch\x12,.google.cloud.compute.v1.PatchNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41 project,network,network_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02L28/compute/v1/projects/{project}/global/networks/{network}:\x10network_resource\x12\xb2\x02\n\rRemovePeering\x12\x34.google.cloud.compute.v1.RemovePeeringNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\xc6\x01\xda\x41\x38project,network,networks_remove_peering_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02r\"F/compute/v1/projects/{project}/global/networks/{network}/removePeering:(networks_remove_peering_request_resource\x12\xd8\x02\n\x14RequestRemovePeering\x12;.google.cloud.compute.v1.RequestRemovePeeringNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\xde\x01\xda\x41@project,network,networks_request_remove_peering_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x81\x01\"M/compute/v1/projects/{project}/global/networks/{network}/requestRemovePeering:0networks_request_remove_peering_request_resource\x12\xed\x01\n\x12SwitchToCustomMode\x12\x39.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"x\xda\x41\x0fproject,network\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02M\"K/compute/v1/projects/{project}/global/networks/{network}/switchToCustomMode\x12\xb2\x02\n\rUpdatePeering\x12\x34.google.cloud.compute.v1.UpdatePeeringNetworkRequest\x1a\".google.cloud.compute.v1.Operation\"\xc6\x01\xda\x41\x38project,network,networks_update_peering_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02r2F/compute/v1/projects/{project}/global/networks/{network}/updatePeering:(networks_update_peering_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xeb \n\nNodeGroups\x12\xb2\x02\n\x08\x41\x64\x64Nodes\x12\x31.google.cloud.compute.v1.AddNodesNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xce\x01\xda\x41>project,zone,node_group,node_groups_add_nodes_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02v\"L/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/addNodes:&node_groups_add_nodes_request_resource\x12\xc4\x01\n\x0e\x41ggregatedList\x12\x38.google.cloud.compute.v1.AggregatedListNodeGroupsRequest\x1a\x30.google.cloud.compute.v1.NodeGroupAggregatedList\"F\xda\x41\x07project\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/aggregated/nodeGroups\x12\xd5\x01\n\x06\x44\x65lete\x12/.google.cloud.compute.v1.DeleteNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"v\xda\x41\x17project,zone,node_group\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x45*C/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}\x12\xc1\x02\n\x0b\x44\x65leteNodes\x12\x34.google.cloud.compute.v1.DeleteNodesNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xd7\x01\xda\x41\x41project,zone,node_group,node_groups_delete_nodes_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02|\"O/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/deleteNodes:)node_groups_delete_nodes_request_resource\x12\xbe\x01\n\x03Get\x12,.google.cloud.compute.v1.GetNodeGroupRequest\x1a\".google.cloud.compute.v1.NodeGroup\"e\xda\x41\x17project,zone,node_group\x82\xd3\xe4\x93\x02\x45\x12\x43/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}\x12\xd6\x01\n\x0cGetIamPolicy\x12\x35.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest\x1a\x1f.google.cloud.compute.v1.Policy\"n\xda\x41\x15project,zone,resource\x82\xd3\xe4\x93\x02P\x12N/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy\x12\xfa\x01\n\x06Insert\x12/.google.cloud.compute.v1.InsertNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x9a\x01\xda\x41\x33project,zone,initial_node_count,node_group_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02M\"6/compute/v1/projects/{project}/zones/{zone}/nodeGroups:\x13node_group_resource\x12\xad\x01\n\x04List\x12..google.cloud.compute.v1.ListNodeGroupsRequest\x1a&.google.cloud.compute.v1.NodeGroupList\"M\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/zones/{zone}/nodeGroups\x12\xdf\x01\n\tListNodes\x12\x33.google.cloud.compute.v1.ListNodesNodeGroupsRequest\x1a,.google.cloud.compute.v1.NodeGroupsListNodes\"o\xda\x41\x17project,zone,node_group\x82\xd3\xe4\x93\x02O\"M/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/listNodes\x12\xfd\x01\n\x05Patch\x12..google.cloud.compute.v1.PatchNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x01\xda\x41+project,zone,node_group,node_group_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02Z2C/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}:\x13node_group_resource\x12\xe5\x02\n\x12PerformMaintenance\x12;.google.cloud.compute.v1.PerformMaintenanceNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xed\x01\xda\x41Hproject,zone,node_group,node_groups_perform_maintenance_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x8a\x01\"V/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/performMaintenance:0node_groups_perform_maintenance_request_resource\x12\x9a\x02\n\x0cSetIamPolicy\x12\x35.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xb1\x01\xda\x41\x36project,zone,resource,zone_set_policy_request_resource\x82\xd3\xe4\x93\x02r\"N/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy: zone_set_policy_request_resource\x12\xd8\x02\n\x0fSetNodeTemplate\x12\x38.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xe6\x01\xda\x41\x46project,zone,node_group,node_groups_set_node_template_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x85\x01\"S/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/setNodeTemplate:.node_groups_set_node_template_request_resource\x12\x85\x03\n\x18SimulateMaintenanceEvent\x12\x41.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x81\x02\xda\x41Oproject,zone,node_group,node_groups_simulate_maintenance_event_request_resource\x8aN\x0eZoneOperations\x82\xd3\xe4\x93\x02\x97\x01\"\\/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/simulateMaintenanceEvent:7node_groups_simulate_maintenance_event_request_resource\x12\xbf\x02\n\x12TestIamPermissions\x12;.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xb9\x01\xda\x41\x37project,zone,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02y\"T/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb4\x10\n\rNodeTemplates\x12\xcd\x01\n\x0e\x41ggregatedList\x12;.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest\x1a\x33.google.cloud.compute.v1.NodeTemplateAggregatedList\"I\xda\x41\x07project\x82\xd3\xe4\x93\x02\x39\x12\x37/compute/v1/projects/{project}/aggregated/nodeTemplates\x12\xea\x01\n\x06\x44\x65lete\x12\x32.google.cloud.compute.v1.DeleteNodeTemplateRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41\x1cproject,region,node_template\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02O*M/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{node_template}\x12\xd3\x01\n\x03Get\x12/.google.cloud.compute.v1.GetNodeTemplateRequest\x1a%.google.cloud.compute.v1.NodeTemplate\"t\xda\x41\x1cproject,region,node_template\x82\xd3\xe4\x93\x02O\x12M/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{node_template}\x12\xe2\x01\n\x0cGetIamPolicy\x12\x38.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest\x1a\x1f.google.cloud.compute.v1.Policy\"w\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02W\x12U/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy\x12\xfb\x01\n\x06Insert\x12\x32.google.cloud.compute.v1.InsertNodeTemplateRequest\x1a\".google.cloud.compute.v1.Operation\"\x98\x01\xda\x41%project,region,node_template_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02W\"=/compute/v1/projects/{project}/regions/{region}/nodeTemplates:\x16node_template_resource\x12\xbc\x01\n\x04List\x12\x31.google.cloud.compute.v1.ListNodeTemplatesRequest\x1a).google.cloud.compute.v1.NodeTemplateList\"V\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02?\x12=/compute/v1/projects/{project}/regions/{region}/nodeTemplates\x12\xaa\x02\n\x0cSetIamPolicy\x12\x38.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xbe\x01\xda\x41:project,region,resource,region_set_policy_request_resource\x82\xd3\xe4\x93\x02{\"U/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy:\"region_set_policy_request_resource\x12\xcc\x02\n\x12TestIamPermissions\x12>.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc3\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x80\x01\"[/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xdf\x05\n\tNodeTypes\x12\xc1\x01\n\x0e\x41ggregatedList\x12\x37.google.cloud.compute.v1.AggregatedListNodeTypesRequest\x1a/.google.cloud.compute.v1.NodeTypeAggregatedList\"E\xda\x41\x07project\x82\xd3\xe4\x93\x02\x35\x12\x33/compute/v1/projects/{project}/aggregated/nodeTypes\x12\xb9\x01\n\x03Get\x12+.google.cloud.compute.v1.GetNodeTypeRequest\x1a!.google.cloud.compute.v1.NodeType\"b\xda\x41\x16project,zone,node_type\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/zones/{zone}/nodeTypes/{node_type}\x12\xaa\x01\n\x04List\x12-.google.cloud.compute.v1.ListNodeTypesRequest\x1a%.google.cloud.compute.v1.NodeTypeList\"L\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/zones/{zone}/nodeTypes\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x90\x0f\n\x10PacketMirrorings\x12\xd6\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest\x1a\x36.google.cloud.compute.v1.PacketMirroringAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/packetMirrorings\x12\xf6\x01\n\x06\x44\x65lete\x12\x35.google.cloud.compute.v1.DeletePacketMirroringRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\x1fproject,region,packet_mirroring\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02U*S/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packet_mirroring}\x12\xe2\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetPacketMirroringRequest\x1a(.google.cloud.compute.v1.PacketMirroring\"}\xda\x41\x1fproject,region,packet_mirroring\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packet_mirroring}\x12\x87\x02\n\x06Insert\x12\x35.google.cloud.compute.v1.InsertPacketMirroringRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41(project,region,packet_mirroring_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02]\"@/compute/v1/projects/{project}/regions/{region}/packetMirrorings:\x19packet_mirroring_resource\x12\xc5\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListPacketMirroringsRequest\x1a,.google.cloud.compute.v1.PacketMirroringList\"Y\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/packetMirrorings\x12\xa9\x02\n\x05Patch\x12\x34.google.cloud.compute.v1.PatchPacketMirroringRequest\x1a\".google.cloud.compute.v1.Operation\"\xc5\x01\xda\x41\x39project,region,packet_mirroring,packet_mirroring_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02p2S/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packet_mirroring}:\x19packet_mirroring_resource\x12\xd2\x02\n\x12TestIamPermissions\x12\x41.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc6\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x83\x01\"^/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xab\x1b\n\x08Projects\x12\xbf\x01\n\x0e\x44isableXpnHost\x12\x35.google.cloud.compute.v1.DisableXpnHostProjectRequest\x1a\".google.cloud.compute.v1.Operation\"R\xda\x41\x07project\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02/\"-/compute/v1/projects/{project}/disableXpnHost\x12\xab\x02\n\x12\x44isableXpnResource\x12\x39.google.cloud.compute.v1.DisableXpnResourceProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\xb5\x01\xda\x41\x36project,projects_disable_xpn_resource_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x63\"1/compute/v1/projects/{project}/disableXpnResource:.projects_disable_xpn_resource_request_resource\x12\xbc\x01\n\rEnableXpnHost\x12\x34.google.cloud.compute.v1.EnableXpnHostProjectRequest\x1a\".google.cloud.compute.v1.Operation\"Q\xda\x41\x07project\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02.\",/compute/v1/projects/{project}/enableXpnHost\x12\xa6\x02\n\x11\x45nableXpnResource\x12\x38.google.cloud.compute.v1.EnableXpnResourceProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\xb2\x01\xda\x41\x35project,projects_enable_xpn_resource_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x61\"0/compute/v1/projects/{project}/enableXpnResource:-projects_enable_xpn_resource_request_resource\x12\x85\x01\n\x03Get\x12*.google.cloud.compute.v1.GetProjectRequest\x1a .google.cloud.compute.v1.Project\"0\xda\x41\x07project\x82\xd3\xe4\x93\x02 \x12\x1e/compute/v1/projects/{project}\x12\x9e\x01\n\nGetXpnHost\x12\x31.google.cloud.compute.v1.GetXpnHostProjectRequest\x1a .google.cloud.compute.v1.Project\";\xda\x41\x07project\x82\xd3\xe4\x93\x02+\x12)/compute/v1/projects/{project}/getXpnHost\x12\xbe\x01\n\x0fGetXpnResources\x12\x37.google.cloud.compute.v1.GetXpnResourcesProjectsRequest\x1a\x30.google.cloud.compute.v1.ProjectsGetXpnResources\"@\xda\x41\x07project\x82\xd3\xe4\x93\x02\x30\x12./compute/v1/projects/{project}/getXpnResources\x12\xfd\x01\n\x0cListXpnHosts\x12\x34.google.cloud.compute.v1.ListXpnHostsProjectsRequest\x1a$.google.cloud.compute.v1.XpnHostList\"\x90\x01\xda\x41\x30project,projects_list_xpn_hosts_request_resource\x82\xd3\xe4\x93\x02W\"+/compute/v1/projects/{project}/listXpnHosts:(projects_list_xpn_hosts_request_resource\x12\xe5\x01\n\x08MoveDisk\x12/.google.cloud.compute.v1.MoveDiskProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\x83\x01\xda\x41\"project,disk_move_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x45\"\'/compute/v1/projects/{project}/moveDisk:\x1a\x64isk_move_request_resource\x12\xf9\x01\n\x0cMoveInstance\x12\x33.google.cloud.compute.v1.MoveInstanceProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\x8f\x01\xda\x41&project,instance_move_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02M\"+/compute/v1/projects/{project}/moveInstance:\x1einstance_move_request_resource\x12\xa8\x02\n\x11SetCloudArmorTier\x12\x38.google.cloud.compute.v1.SetCloudArmorTierProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\xb4\x01\xda\x41\x36project,projects_set_cloud_armor_tier_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x62\"0/compute/v1/projects/{project}/setCloudArmorTier:.projects_set_cloud_armor_tier_request_resource\x12\x86\x02\n\x19SetCommonInstanceMetadata\x12@.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\x82\x01\xda\x41\x19project,metadata_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02M\"8/compute/v1/projects/{project}/setCommonInstanceMetadata:\x11metadata_resource\x12\xbc\x02\n\x15SetDefaultNetworkTier\x12<.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41:project,projects_set_default_network_tier_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02j\"4/compute/v1/projects/{project}/setDefaultNetworkTier:2projects_set_default_network_tier_request_resource\x12\x91\x02\n\x14SetUsageExportBucket\x12;.google.cloud.compute.v1.SetUsageExportBucketProjectRequest\x1a\".google.cloud.compute.v1.Operation\"\x97\x01\xda\x41&project,usage_export_location_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02U\"3/compute/v1/projects/{project}/setUsageExportBucket:\x1eusage_export_location_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xee\x0f\n\x18PublicAdvertisedPrefixes\x12\x92\x02\n\x08\x41nnounce\x12?.google.cloud.compute.v1.AnnouncePublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa0\x01\xda\x41 project,public_advertised_prefix\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x64\"b/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}/announce\x12\x85\x02\n\x06\x44\x65lete\x12=.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\x97\x01\xda\x41 project,public_advertised_prefix\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02[*Y/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}\x12\xf9\x01\n\x03Get\x12:.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest\x1a/.google.cloud.compute.v1.PublicAdvertisedPrefix\"\x84\x01\xda\x41 project,public_advertised_prefix\x82\xd3\xe4\x93\x02[\x12Y/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}\x12\x96\x02\n\x06Insert\x12=.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa8\x01\xda\x41)project,public_advertised_prefix_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x63\">/compute/v1/projects/{project}/global/publicAdvertisedPrefixes:!public_advertised_prefix_resource\x12\xcb\x01\n\x04List\x12<.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest\x1a\x33.google.cloud.compute.v1.PublicAdvertisedPrefixList\"P\xda\x41\x07project\x82\xd3\xe4\x93\x02@\x12>/compute/v1/projects/{project}/global/publicAdvertisedPrefixes\x12\xc8\x02\n\x05Patch\x12<.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xdc\x01\xda\x41\x42project,public_advertised_prefix,public_advertised_prefix_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02~2Y/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}:!public_advertised_prefix_resource\x12\x92\x02\n\x08Withdraw\x12?.google.cloud.compute.v1.WithdrawPublicAdvertisedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa0\x01\xda\x41 project,public_advertised_prefix\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x64\"b/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{public_advertised_prefix}/withdraw\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb4\x12\n\x17PublicDelegatedPrefixes\x12\xea\x01\n\x0e\x41ggregatedList\x12\x45.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest\x1a<.google.cloud.compute.v1.PublicDelegatedPrefixAggregatedList\"S\xda\x41\x07project\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/aggregated/publicDelegatedPrefixes\x12\x9f\x02\n\x08\x41nnounce\x12>.google.cloud.compute.v1.AnnouncePublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xae\x01\xda\x41&project,region,public_delegated_prefix\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02l\"j/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/announce\x12\x92\x02\n\x06\x44\x65lete\x12<.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xa5\x01\xda\x41&project,region,public_delegated_prefix\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x63*a/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}\x12\x85\x02\n\x03Get\x12\x39.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest\x1a..google.cloud.compute.v1.PublicDelegatedPrefix\"\x92\x01\xda\x41&project,region,public_delegated_prefix\x82\xd3\xe4\x93\x02\x63\x12\x61/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}\x12\xa3\x02\n\x06Insert\x12<.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xb6\x01\xda\x41/project,region,public_delegated_prefix_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02k\"G/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes: public_delegated_prefix_resource\x12\xd9\x01\n\x04List\x12;.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest\x1a\x32.google.cloud.compute.v1.PublicDelegatedPrefixList\"`\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes\x12\xd4\x02\n\x05Patch\x12;.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41Gproject,region,public_delegated_prefix,public_delegated_prefix_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x85\x01\x32\x61/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}: public_delegated_prefix_resource\x12\x9f\x02\n\x08Withdraw\x12>.google.cloud.compute.v1.WithdrawPublicDelegatedPrefixeRequest\x1a\".google.cloud.compute.v1.Operation\"\xae\x01\xda\x41&project,region,public_delegated_prefix\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02l\"j/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/withdraw\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf0\x0b\n\x11RegionAutoscalers\x12\xe5\x01\n\x06\x44\x65lete\x12\x36.google.cloud.compute.v1.DeleteRegionAutoscalerRequest\x1a\".google.cloud.compute.v1.Operation\"\x7f\xda\x41\x19project,region,autoscaler\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02J*H/compute/v1/projects/{project}/regions/{region}/autoscalers/{autoscaler}\x12\xcd\x01\n\x03Get\x12\x33.google.cloud.compute.v1.GetRegionAutoscalerRequest\x1a#.google.cloud.compute.v1.Autoscaler\"l\xda\x41\x19project,region,autoscaler\x82\xd3\xe4\x93\x02J\x12H/compute/v1/projects/{project}/regions/{region}/autoscalers/{autoscaler}\x12\xf7\x01\n\x06Insert\x12\x36.google.cloud.compute.v1.InsertRegionAutoscalerRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,autoscaler_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R\";/compute/v1/projects/{project}/regions/{region}/autoscalers:\x13\x61utoscaler_resource\x12\xc2\x01\n\x04List\x12\x35.google.cloud.compute.v1.ListRegionAutoscalersRequest\x1a-.google.cloud.compute.v1.RegionAutoscalerList\"T\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/regions/{region}/autoscalers\x12\xf5\x01\n\x05Patch\x12\x35.google.cloud.compute.v1.PatchRegionAutoscalerRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,autoscaler_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R2;/compute/v1/projects/{project}/regions/{region}/autoscalers:\x13\x61utoscaler_resource\x12\xf7\x01\n\x06Update\x12\x36.google.cloud.compute.v1.UpdateRegionAutoscalerRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,autoscaler_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R\x1a;/compute/v1/projects/{project}/regions/{region}/autoscalers:\x13\x61utoscaler_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xbd\x1b\n\x15RegionBackendServices\x12\xf8\x01\n\x06\x44\x65lete\x12:.google.cloud.compute.v1.DeleteRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\x1eproject,region,backend_service\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S*Q/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}\x12\xe3\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetRegionBackendServiceRequest\x1a\'.google.cloud.compute.v1.BackendService\"z\xda\x41\x1eproject,region,backend_service\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}\x12\xcb\x02\n\tGetHealth\x12=.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest\x1a\x32.google.cloud.compute.v1.BackendServiceGroupHealth\"\xca\x01\xda\x41@project,region,backend_service,resource_group_reference_resource\x82\xd3\xe4\x93\x02\x80\x01\"[/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}/getHealth:!resource_group_reference_resource\x12\xec\x01\n\x0cGetIamPolicy\x12@.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest\x1a\x1f.google.cloud.compute.v1.Policy\"y\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02Y\x12W/compute/v1/projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy\x12\x89\x02\n\x06Insert\x12:.google.cloud.compute.v1.InsertRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\x9e\x01\xda\x41\'project,region,backend_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02[\"?/compute/v1/projects/{project}/regions/{region}/backendServices:\x18\x62\x61\x63kend_service_resource\x12\xc8\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListRegionBackendServicesRequest\x1a+.google.cloud.compute.v1.BackendServiceList\"X\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x41\x12?/compute/v1/projects/{project}/regions/{region}/backendServices\x12\xe5\x01\n\nListUsable\x12?.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest\x1a\x31.google.cloud.compute.v1.BackendServiceListUsable\"c\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02L\x12J/compute/v1/projects/{project}/regions/{region}/backendServices/listUsable\x12\xa9\x02\n\x05Patch\x12\x39.google.cloud.compute.v1.PatchRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41\x37project,region,backend_service,backend_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02m2Q/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}:\x18\x62\x61\x63kend_service_resource\x12\xb4\x02\n\x0cSetIamPolicy\x12@.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xc0\x01\xda\x41:project,region,resource,region_set_policy_request_resource\x82\xd3\xe4\x93\x02}\"W/compute/v1/projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy:\"region_set_policy_request_resource\x12\xe8\x02\n\x11SetSecurityPolicy\x12\x45.google.cloud.compute.v1.SetSecurityPolicyRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xe7\x01\xda\x41\x41project,region,backend_service,security_policy_reference_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x89\x01\"c/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}/setSecurityPolicy:\"security_policy_reference_resource\x12\xd6\x02\n\x12TestIamPermissions\x12\x46.google.cloud.compute.v1.TestIamPermissionsRegionBackendServiceRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc5\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x82\x01\"]/compute/v1/projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions:!test_permissions_request_resource\x12\xab\x02\n\x06Update\x12:.google.cloud.compute.v1.UpdateRegionBackendServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41\x37project,region,backend_service,backend_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02m\x1aQ/compute/v1/projects/{project}/regions/{region}/backendServices/{backend_service}:\x18\x62\x61\x63kend_service_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf2\t\n\x11RegionCommitments\x12\xcd\x01\n\x0e\x41ggregatedList\x12?.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest\x1a\x31.google.cloud.compute.v1.CommitmentAggregatedList\"G\xda\x41\x07project\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/aggregated/commitments\x12\xcd\x01\n\x03Get\x12\x33.google.cloud.compute.v1.GetRegionCommitmentRequest\x1a#.google.cloud.compute.v1.Commitment\"l\xda\x41\x19project,region,commitment\x82\xd3\xe4\x93\x02J\x12H/compute/v1/projects/{project}/regions/{region}/commitments/{commitment}\x12\xf7\x01\n\x06Insert\x12\x36.google.cloud.compute.v1.InsertRegionCommitmentRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,commitment_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R\";/compute/v1/projects/{project}/regions/{region}/commitments:\x13\x63ommitment_resource\x12\xbc\x01\n\x04List\x12\x35.google.cloud.compute.v1.ListRegionCommitmentsRequest\x1a\'.google.cloud.compute.v1.CommitmentList\"T\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/regions/{region}/commitments\x12\x8f\x02\n\x06Update\x12\x36.google.cloud.compute.v1.UpdateRegionCommitmentRequest\x1a\".google.cloud.compute.v1.Operation\"\xa8\x01\xda\x41-project,region,commitment,commitment_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_2H/compute/v1/projects/{project}/regions/{region}/commitments/{commitment}:\x13\x63ommitment_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xbf\x04\n\x0fRegionDiskTypes\x12\xc5\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetRegionDiskTypeRequest\x1a!.google.cloud.compute.v1.DiskType\"h\xda\x41\x18project,region,disk_type\x82\xd3\xe4\x93\x02G\x12\x45/compute/v1/projects/{project}/regions/{region}/diskTypes/{disk_type}\x12\xbc\x01\n\x04List\x12\x33.google.cloud.compute.v1.ListRegionDiskTypesRequest\x1a+.google.cloud.compute.v1.RegionDiskTypeList\"R\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02;\x12\x39/compute/v1/projects/{project}/regions/{region}/diskTypes\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x8f&\n\x0bRegionDisks\x12\xe6\x02\n\x13\x41\x64\x64ResourcePolicies\x12=.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xeb\x01\xda\x41Gproject,region,disk,region_disks_add_resource_policies_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x87\x01\"P/compute/v1/projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies:3region_disks_add_resource_policies_request_resource\x12\x9c\x02\n\nBulkInsert\x12\x34.google.cloud.compute.v1.BulkInsertRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xb3\x01\xda\x41\x31project,region,bulk_insert_disk_resource_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x66\"@/compute/v1/projects/{project}/regions/{region}/disks/bulkInsert:\"bulk_insert_disk_resource_resource\x12\x92\x02\n\x0e\x43reateSnapshot\x12\x38.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41%project,region,disk,snapshot_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02`\"K/compute/v1/projects/{project}/regions/{region}/disks/{disk}/createSnapshot:\x11snapshot_resource\x12\xcd\x01\n\x06\x44\x65lete\x12\x30.google.cloud.compute.v1.DeleteRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"m\xda\x41\x13project,region,disk\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02>*\x12.google.cloud.compute.v1.StopAsyncReplicationRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\x82\x01\xda\x41\x13project,region,disk\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S\"Q/compute/v1/projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication\x12\xee\x02\n\x19StopGroupAsyncReplication\x12\x43.google.cloud.compute.v1.StopGroupAsyncReplicationRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\xe7\x01\xda\x41\x43project,region,disks_stop_group_async_replication_resource_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x87\x01\"O/compute/v1/projects/{project}/regions/{region}/disks/stopGroupAsyncReplication:4disks_stop_group_async_replication_resource_resource\x12\xc1\x02\n\x12TestIamPermissions\x12<.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xba\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02x\"S/compute/v1/projects/{project}/regions/{region}/disks/{resource}/testIamPermissions:!test_permissions_request_resource\x12\xeb\x01\n\x06Update\x12\x30.google.cloud.compute.v1.UpdateRegionDiskRequest\x1a\".google.cloud.compute.v1.Operation\"\x8a\x01\xda\x41!project,region,disk,disk_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02M2.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\x9b\x01\xda\x41#project,region,health_check_service\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\\*Z/compute/v1/projects/{project}/regions/{region}/healthCheckServices/{health_check_service}\x12\xfa\x01\n\x03Get\x12;.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest\x1a+.google.cloud.compute.v1.HealthCheckService\"\x88\x01\xda\x41#project,region,health_check_service\x82\xd3\xe4\x93\x02\\\x12Z/compute/v1/projects/{project}/regions/{region}/healthCheckServices/{health_check_service}\x12\x9b\x02\n\x06Insert\x12>.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xac\x01\xda\x41,project,region,health_check_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x64\"C/compute/v1/projects/{project}/regions/{region}/healthCheckServices:\x1dhealth_check_service_resource\x12\xd5\x01\n\x04List\x12=.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest\x1a\x30.google.cloud.compute.v1.HealthCheckServicesList\"\\\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x45\x12\x43/compute/v1/projects/{project}/regions/{region}/healthCheckServices\x12\xc5\x02\n\x05Patch\x12=.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest\x1a\".google.cloud.compute.v1.Operation\"\xd8\x01\xda\x41\x41project,region,health_check_service,health_check_service_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02{2Z/compute/v1/projects/{project}/regions/{region}/healthCheckServices/{health_check_service}:\x1dhealth_check_service_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc6\x0c\n\x12RegionHealthChecks\x12\xec\x01\n\x06\x44\x65lete\x12\x37.google.cloud.compute.v1.DeleteRegionHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\x84\x01\xda\x41\x1bproject,region,health_check\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02M*K/compute/v1/projects/{project}/regions/{region}/healthChecks/{health_check}\x12\xd4\x01\n\x03Get\x12\x34.google.cloud.compute.v1.GetRegionHealthCheckRequest\x1a$.google.cloud.compute.v1.HealthCheck\"q\xda\x41\x1bproject,region,health_check\x82\xd3\xe4\x93\x02M\x12K/compute/v1/projects/{project}/regions/{region}/healthChecks/{health_check}\x12\xfd\x01\n\x06Insert\x12\x37.google.cloud.compute.v1.InsertRegionHealthCheckRequest\x1a\".google.cloud.compute.v1.Operation\"\x95\x01\xda\x41$project,region,health_check_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02U\"\x12region_instance_group_managers_stop_instances_request_resource\x12\xbd\x03\n\x10SuspendInstances\x12J.google.cloud.compute.v1.SuspendInstancesRegionInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xb8\x02\xda\x41gproject,region,instance_group_manager,region_instance_group_managers_suspend_instances_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xb4\x01\"o/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/suspendInstances:Aregion_instance_group_managers_suspend_instances_request_resource\x12\xd5\x03\n\x18UpdatePerInstanceConfigs\x12R.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x02\xda\x41gproject,region,instance_group_manager,region_instance_group_manager_update_instance_config_req_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xbc\x01\"w/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/updatePerInstanceConfigs:Aregion_instance_group_manager_update_instance_config_req_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc7\n\n\x14RegionInstanceGroups\x12\xde\x01\n\x03Get\x12\x36.google.cloud.compute.v1.GetRegionInstanceGroupRequest\x1a&.google.cloud.compute.v1.InstanceGroup\"w\xda\x41\x1dproject,region,instance_group\x82\xd3\xe4\x93\x02Q\x12O/compute/v1/projects/{project}/regions/{region}/instanceGroups/{instance_group}\x12\xcb\x01\n\x04List\x12\x38.google.cloud.compute.v1.ListRegionInstanceGroupsRequest\x1a\x30.google.cloud.compute.v1.RegionInstanceGroupList\"W\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02@\x12>/compute/v1/projects/{project}/regions/{region}/instanceGroups\x12\x86\x03\n\rListInstances\x12\x41.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest\x1a:.google.cloud.compute.v1.RegionInstanceGroupsListInstances\"\xf5\x01\xda\x41Tproject,region,instance_group,region_instance_groups_list_instances_request_resource\x82\xd3\xe4\x93\x02\x97\x01\"]/compute/v1/projects/{project}/regions/{region}/instanceGroups/{instance_group}/listInstances:6region_instance_groups_list_instances_request_resource\x12\x82\x03\n\rSetNamedPorts\x12@.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\x8a\x02\xda\x41Uproject,region,instance_group,region_instance_groups_set_named_ports_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x98\x01\"]/compute/v1/projects/{project}/regions/{region}/instanceGroups/{instance_group}/setNamedPorts:7region_instance_groups_set_named_ports_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xe6\x08\n\x17RegionInstanceTemplates\x12\x80\x02\n\x06\x44\x65lete\x12<.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest\x1a\".google.cloud.compute.v1.Operation\"\x93\x01\xda\x41 project,region,instance_template\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02W*U/compute/v1/projects/{project}/regions/{region}/instanceTemplates/{instance_template}\x12\xee\x01\n\x03Get\x12\x39.google.cloud.compute.v1.GetRegionInstanceTemplateRequest\x1a).google.cloud.compute.v1.InstanceTemplate\"\x80\x01\xda\x41 project,region,instance_template\x82\xd3\xe4\x93\x02W\x12U/compute/v1/projects/{project}/regions/{region}/instanceTemplates/{instance_template}\x12\x91\x02\n\x06Insert\x12<.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest\x1a\".google.cloud.compute.v1.Operation\"\xa4\x01\xda\x41)project,region,instance_template_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_\"A/compute/v1/projects/{project}/regions/{region}/instanceTemplates:\x1ainstance_template_resource\x12\xce\x01\n\x04List\x12;.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest\x1a-.google.cloud.compute.v1.InstanceTemplateList\"Z\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/regions/{region}/instanceTemplates\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb4\x03\n\x0fRegionInstances\x12\xac\x02\n\nBulkInsert\x12\x38.google.cloud.compute.v1.BulkInsertRegionInstanceRequest\x1a\".google.cloud.compute.v1.Operation\"\xbf\x01\xda\x41\x35project,region,bulk_insert_instance_resource_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02n\"D/compute/v1/projects/{project}/regions/{region}/instances/bulkInsert:&bulk_insert_instance_resource_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x9f\x12\n\x16RegionInstantSnapshots\x12\xfc\x01\n\x06\x44\x65lete\x12;.google.cloud.compute.v1.DeleteRegionInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\x1fproject,region,instant_snapshot\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02U*S/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{instant_snapshot}\x12\xe8\x01\n\x03Get\x12\x38.google.cloud.compute.v1.GetRegionInstantSnapshotRequest\x1a(.google.cloud.compute.v1.InstantSnapshot\"}\xda\x41\x1fproject,region,instant_snapshot\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{instant_snapshot}\x12\xee\x01\n\x0cGetIamPolicy\x12\x41.google.cloud.compute.v1.GetIamPolicyRegionInstantSnapshotRequest\x1a\x1f.google.cloud.compute.v1.Policy\"z\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02Z\x12X/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy\x12\x8d\x02\n\x06Insert\x12;.google.cloud.compute.v1.InsertRegionInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41(project,region,instant_snapshot_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02]\"@/compute/v1/projects/{project}/regions/{region}/instantSnapshots:\x19instant_snapshot_resource\x12\xcb\x01\n\x04List\x12:.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest\x1a,.google.cloud.compute.v1.InstantSnapshotList\"Y\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/instantSnapshots\x12\xb6\x02\n\x0cSetIamPolicy\x12\x41.google.cloud.compute.v1.SetIamPolicyRegionInstantSnapshotRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xc1\x01\xda\x41:project,region,resource,region_set_policy_request_resource\x82\xd3\xe4\x93\x02~\"X/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy:\"region_set_policy_request_resource\x12\xc3\x02\n\tSetLabels\x12>.google.cloud.compute.v1.SetLabelsRegionInstantSnapshotRequest\x1a\".google.cloud.compute.v1.Operation\"\xd1\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02{\"U/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels:\"region_set_labels_request_resource\x12\xd8\x02\n\x12TestIamPermissions\x12G.google.cloud.compute.v1.TestIamPermissionsRegionInstantSnapshotRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc6\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x83\x01\"^/compute/v1/projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xa4\x13\n\x1bRegionNetworkEndpointGroups\x12\xcd\x03\n\x16\x41ttachNetworkEndpoints\x12P.google.cloud.compute.v1.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xbc\x02\xda\x41\x66project,region,network_endpoint_group,region_network_endpoint_groups_attach_endpoints_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xb9\x01\"u/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/attachNetworkEndpoints:@region_network_endpoint_groups_attach_endpoints_request_resource\x12\x92\x02\n\x06\x44\x65lete\x12@.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xa1\x01\xda\x41%project,region,network_endpoint_group\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02`*^/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}\x12\xcd\x03\n\x16\x44\x65tachNetworkEndpoints\x12P.google.cloud.compute.v1.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xbc\x02\xda\x41\x66project,region,network_endpoint_group,region_network_endpoint_groups_detach_endpoints_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xb9\x01\"u/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/detachNetworkEndpoints:@region_network_endpoint_groups_detach_endpoints_request_resource\x12\x84\x02\n\x03Get\x12=.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest\x1a-.google.cloud.compute.v1.NetworkEndpointGroup\"\x8e\x01\xda\x41%project,region,network_endpoint_group\x82\xd3\xe4\x93\x02`\x12^/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}\x12\xa3\x02\n\x06Insert\x12@.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest\x1a\".google.cloud.compute.v1.Operation\"\xb2\x01\xda\x41.project,region,network_endpoint_group_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02h\"E/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups:\x1fnetwork_endpoint_group_resource\x12\xda\x01\n\x04List\x12?.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest\x1a\x31.google.cloud.compute.v1.NetworkEndpointGroupList\"^\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02G\x12\x45/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups\x12\xd1\x02\n\x14ListNetworkEndpoints\x12O.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest\x1a\x42.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints\"\xa3\x01\xda\x41%project,region,network_endpoint_group\x82\xd3\xe4\x93\x02u\"s/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/listNetworkEndpoints\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf2\'\n\x1dRegionNetworkFirewallPolicies\x12\xeb\x02\n\x0e\x41\x64\x64\x41ssociation\x12I.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xe9\x01\xda\x41\x43project,region,firewall_policy,firewall_policy_association_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x89\x01\"a/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}/addAssociation:$firewall_policy_association_resource\x12\xc7\x02\n\x07\x41\x64\x64Rule\x12\x42.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd3\x01\xda\x41.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest\x1a\'.google.cloud.compute.v1.FirewallPolicy\"{\xda\x41\x1eproject,region,firewall_policy\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}\x12\x9c\x02\n\x0eGetAssociation\x12I.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest\x1a\x32.google.cloud.compute.v1.FirewallPolicyAssociation\"\x8a\x01\xda\x41\x1eproject,region,firewall_policy\x82\xd3\xe4\x93\x02\x63\x12\x61/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}/getAssociation\x12\xb7\x02\n\x15GetEffectiveFirewalls\x12P.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest\x1aS.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse\"w\xda\x41\x16project,region,network\x82\xd3\xe4\x93\x02X\x12V/compute/v1/projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls\x12\xf4\x01\n\x0cGetIamPolicy\x12G.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"z\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02Z\x12X/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy\x12\x80\x02\n\x07GetRule\x12\x42.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest\x1a+.google.cloud.compute.v1.FirewallPolicyRule\"\x83\x01\xda\x41\x1eproject,region,firewall_policy\x82\xd3\xe4\x93\x02\\\x12Z/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}/getRule\x12\x91\x02\n\x06Insert\x12\x41.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x01\xda\x41\'project,region,firewall_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\\\"@/compute/v1/projects/{project}/regions/{region}/firewallPolicies:\x18\x66irewall_policy_resource\x12\xd1\x01\n\x04List\x12\x41.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest\x1a+.google.cloud.compute.v1.FirewallPolicyList\"Y\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/firewallPolicies\x12\xb1\x02\n\x05Patch\x12@.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc1\x01\xda\x41\x37project,region,firewall_policy,firewall_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02n2R/compute/v1/projects/{project}/regions/{region}/firewallPolicies/{firewall_policy}:\x18\x66irewall_policy_resource\x12\xcd\x02\n\tPatchRule\x12\x44.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd5\x01\xda\x41.google.cloud.compute.v1.RemoveRuleRegionSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x99\x01\xda\x41\x1eproject,region,security_policy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_\"]/compute/v1/projects/{project}/regions/{region}/securityPolicies/{security_policy}/removeRule\x12\xc2\x02\n\tSetLabels\x12=.google.cloud.compute.v1.SetLabelsRegionSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd1\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02{\"U/compute/v1/projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels:\"region_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc3\x08\n\x15RegionSslCertificates\x12\xf8\x01\n\x06\x44\x65lete\x12:.google.cloud.compute.v1.DeleteRegionSslCertificateRequest\x1a\".google.cloud.compute.v1.Operation\"\x8d\x01\xda\x41\x1eproject,region,ssl_certificate\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S*Q/compute/v1/projects/{project}/regions/{region}/sslCertificates/{ssl_certificate}\x12\xe3\x01\n\x03Get\x12\x37.google.cloud.compute.v1.GetRegionSslCertificateRequest\x1a\'.google.cloud.compute.v1.SslCertificate\"z\xda\x41\x1eproject,region,ssl_certificate\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/regions/{region}/sslCertificates/{ssl_certificate}\x12\x89\x02\n\x06Insert\x12:.google.cloud.compute.v1.InsertRegionSslCertificateRequest\x1a\".google.cloud.compute.v1.Operation\"\x9e\x01\xda\x41\'project,region,ssl_certificate_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02[\"?/compute/v1/projects/{project}/regions/{region}/sslCertificates:\x18ssl_certificate_resource\x12\xc8\x01\n\x04List\x12\x39.google.cloud.compute.v1.ListRegionSslCertificatesRequest\x1a+.google.cloud.compute.v1.SslCertificateList\"X\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x41\x12?/compute/v1/projects/{project}/regions/{region}/sslCertificates\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x95\x0c\n\x11RegionSslPolicies\x12\xe4\x01\n\x06\x44\x65lete\x12\x35.google.cloud.compute.v1.DeleteRegionSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x7f\xda\x41\x19project,region,ssl_policy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02J*H/compute/v1/projects/{project}/regions/{region}/sslPolicies/{ssl_policy}\x12\xcb\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetRegionSslPolicyRequest\x1a\".google.cloud.compute.v1.SslPolicy\"l\xda\x41\x19project,region,ssl_policy\x82\xd3\xe4\x93\x02J\x12H/compute/v1/projects/{project}/regions/{region}/sslPolicies/{ssl_policy}\x12\xf6\x01\n\x06Insert\x12\x35.google.cloud.compute.v1.InsertRegionSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41\"project,region,ssl_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02R\";/compute/v1/projects/{project}/regions/{region}/sslPolicies:\x13ssl_policy_resource\x12\xbd\x01\n\x04List\x12\x35.google.cloud.compute.v1.ListRegionSslPoliciesRequest\x1a(.google.cloud.compute.v1.SslPoliciesList\"T\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/regions/{region}/sslPolicies\x12\x8e\x02\n\x15ListAvailableFeatures\x12\x46.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest\x1a\x41.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse\"j\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02S\x12Q/compute/v1/projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures\x12\x8c\x02\n\x05Patch\x12\x34.google.cloud.compute.v1.PatchRegionSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xa8\x01\xda\x41-project,region,ssl_policy,ssl_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_2H/compute/v1/projects/{project}/regions/{region}/sslPolicies/{ssl_policy}:\x13ssl_policy_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xaa\x0b\n\x17RegionTargetHttpProxies\x12\xff\x01\n\x06\x44\x65lete\x12;.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x93\x01\xda\x41 project,region,target_http_proxy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02W*U/compute/v1/projects/{project}/regions/{region}/targetHttpProxies/{target_http_proxy}\x12\xec\x01\n\x03Get\x12\x38.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest\x1a(.google.cloud.compute.v1.TargetHttpProxy\"\x80\x01\xda\x41 project,region,target_http_proxy\x82\xd3\xe4\x93\x02W\x12U/compute/v1/projects/{project}/regions/{region}/targetHttpProxies/{target_http_proxy}\x12\x90\x02\n\x06Insert\x12;.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xa4\x01\xda\x41)project,region,target_http_proxy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02_\"A/compute/v1/projects/{project}/regions/{region}/targetHttpProxies:\x1atarget_http_proxy_resource\x12\xcd\x01\n\x04List\x12;.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest\x1a,.google.cloud.compute.v1.TargetHttpProxyList\"Z\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/regions/{region}/targetHttpProxies\x12\xc6\x02\n\tSetUrlMap\x12>.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd4\x01\xda\x41;project,region,target_http_proxy,url_map_reference_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02}\"_/compute/v1/projects/{project}/regions/{region}/targetHttpProxies/{target_http_proxy}/setUrlMap:\x1aurl_map_reference_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb3\x11\n\x18RegionTargetHttpsProxies\x12\x83\x02\n\x06\x44\x65lete\x12<.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x96\x01\xda\x41!project,region,target_https_proxy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02Y*W/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{target_https_proxy}\x12\xf1\x01\n\x03Get\x12\x39.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest\x1a).google.cloud.compute.v1.TargetHttpsProxy\"\x83\x01\xda\x41!project,region,target_https_proxy\x82\xd3\xe4\x93\x02Y\x12W/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{target_https_proxy}\x12\x94\x02\n\x06Insert\x12<.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xa7\x01\xda\x41*project,region,target_https_proxy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x61\"B/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies:\x1btarget_https_proxy_resource\x12\xd0\x01\n\x04List\x12<.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest\x1a-.google.cloud.compute.v1.TargetHttpsProxyList\"[\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x44\x12\x42/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies\x12\xba\x02\n\x05Patch\x12;.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xcf\x01\xda\x41=project,region,target_https_proxy,target_https_proxy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02v2W/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{target_https_proxy}:\x1btarget_https_proxy_resource\x12\xb4\x03\n\x12SetSslCertificates\x12H.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xaf\x02\xda\x41\x63project,region,target_https_proxy,region_target_https_proxies_set_ssl_certificates_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\xaf\x01\"j/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{target_https_proxy}/setSslCertificates:Aregion_target_https_proxies_set_ssl_certificates_request_resource\x12\xca\x02\n\tSetUrlMap\x12?.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xd7\x01\xda\x41.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest\x1a\x35.google.cloud.compute.v1.ResourcePolicyAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/resourcePolicies\x12\xf3\x01\n\x06\x44\x65lete\x12\x34.google.cloud.compute.v1.DeleteResourcePolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x8e\x01\xda\x41\x1eproject,region,resource_policy\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02T*R/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource_policy}\x12\xde\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetResourcePolicyRequest\x1a\'.google.cloud.compute.v1.ResourcePolicy\"{\xda\x41\x1eproject,region,resource_policy\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource_policy}\x12\xe7\x01\n\x0cGetIamPolicy\x12:.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"z\xda\x41\x17project,region,resource\x82\xd3\xe4\x93\x02Z\x12X/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy\x12\x84\x02\n\x06Insert\x12\x34.google.cloud.compute.v1.InsertResourcePolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x9f\x01\xda\x41\'project,region,resource_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\\\"@/compute/v1/projects/{project}/regions/{region}/resourcePolicies:\x18resource_policy_resource\x12\xc4\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListResourcePoliciesRequest\x1a+.google.cloud.compute.v1.ResourcePolicyList\"Y\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/resourcePolicies\x12\xa4\x02\n\x05Patch\x12\x33.google.cloud.compute.v1.PatchResourcePolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc1\x01\xda\x41\x37project,region,resource_policy,resource_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02n2R/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource_policy}:\x18resource_policy_resource\x12\xaf\x02\n\x0cSetIamPolicy\x12:.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest\x1a\x1f.google.cloud.compute.v1.Policy\"\xc1\x01\xda\x41:project,region,resource,region_set_policy_request_resource\x82\xd3\xe4\x93\x02~\"X/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy:\"region_set_policy_request_resource\x12\xd1\x02\n\x12TestIamPermissions\x12@.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc6\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02\x83\x01\"^/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x8e \n\x07Routers\x12\xbb\x01\n\x0e\x41ggregatedList\x12\x35.google.cloud.compute.v1.AggregatedListRoutersRequest\x1a-.google.cloud.compute.v1.RouterAggregatedList\"C\xda\x41\x07project\x82\xd3\xe4\x93\x02\x33\x12\x31/compute/v1/projects/{project}/aggregated/routers\x12\xcf\x01\n\x06\x44\x65lete\x12,.google.cloud.compute.v1.DeleteRouterRequest\x1a\".google.cloud.compute.v1.Operation\"s\xda\x41\x15project,region,router\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02\x42*@/compute/v1/projects/{project}/regions/{region}/routers/{router}\x12\xf8\x01\n\x11\x44\x65leteRoutePolicy\x12\x37.google.cloud.compute.v1.DeleteRoutePolicyRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\x85\x01\xda\x41\x15project,region,router\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02T\"R/compute/v1/projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy\x12\xb3\x01\n\x03Get\x12).google.cloud.compute.v1.GetRouterRequest\x1a\x1f.google.cloud.compute.v1.Router\"`\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02\x42\x12@/compute/v1/projects/{project}/regions/{region}/routers/{router}\x12\xdd\x01\n\x0cGetNatIpInfo\x12\x32.google.cloud.compute.v1.GetNatIpInfoRouterRequest\x1a*.google.cloud.compute.v1.NatIpInfoResponse\"m\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02O\x12M/compute/v1/projects/{project}/regions/{region}/routers/{router}/getNatIpInfo\x12\xf5\x01\n\x11GetNatMappingInfo\x12\x38.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest\x1a\x32.google.cloud.compute.v1.VmEndpointNatMappingsList\"r\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo\x12\xef\x01\n\x0eGetRoutePolicy\x12\x34.google.cloud.compute.v1.GetRoutePolicyRouterRequest\x1a\x36.google.cloud.compute.v1.RoutersGetRoutePolicyResponse\"o\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02Q\x12O/compute/v1/projects/{project}/regions/{region}/routers/{router}/getRoutePolicy\x12\xe9\x01\n\x0fGetRouterStatus\x12\x35.google.cloud.compute.v1.GetRouterStatusRouterRequest\x1a-.google.cloud.compute.v1.RouterStatusResponse\"p\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02R\x12P/compute/v1/projects/{project}/regions/{region}/routers/{router}/getRouterStatus\x12\xe1\x01\n\x06Insert\x12,.google.cloud.compute.v1.InsertRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\x84\x01\xda\x41\x1eproject,region,router_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02J\"7/compute/v1/projects/{project}/regions/{region}/routers:\x0frouter_resource\x12\xaa\x01\n\x04List\x12+.google.cloud.compute.v1.ListRoutersRequest\x1a#.google.cloud.compute.v1.RouterList\"P\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x39\x12\x37/compute/v1/projects/{project}/regions/{region}/routers\x12\xe4\x01\n\rListBgpRoutes\x12\x34.google.cloud.compute.v1.ListBgpRoutesRoutersRequest\x1a-.google.cloud.compute.v1.RoutersListBgpRoutes\"n\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02P\x12N/compute/v1/projects/{project}/regions/{region}/routers/{router}/listBgpRoutes\x12\xf4\x01\n\x11ListRoutePolicies\x12\x38.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest\x1a\x31.google.cloud.compute.v1.RoutersListRoutePolicies\"r\xda\x41\x15project,region,router\x82\xd3\xe4\x93\x02T\x12R/compute/v1/projects/{project}/regions/{region}/routers/{router}/listRoutePolicies\x12\xef\x01\n\x05Patch\x12+.google.cloud.compute.v1.PatchRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\x94\x01\xda\x41%project,region,router,router_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S2@/compute/v1/projects/{project}/regions/{region}/routers/{router}:\x0frouter_resource\x12\xa2\x02\n\x10PatchRoutePolicy\x12\x36.google.cloud.compute.v1.PatchRoutePolicyRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\xb1\x01\xda\x41+project,region,router,route_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02j\"Q/compute/v1/projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy:\x15route_policy_resource\x12\xf5\x01\n\x07Preview\x12-.google.cloud.compute.v1.PreviewRouterRequest\x1a/.google.cloud.compute.v1.RoutersPreviewResponse\"\x89\x01\xda\x41%project,region,router,router_resource\x82\xd3\xe4\x93\x02[\"H/compute/v1/projects/{project}/regions/{region}/routers/{router}/preview:\x0frouter_resource\x12\xf1\x01\n\x06Update\x12,.google.cloud.compute.v1.UpdateRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\x94\x01\xda\x41%project,region,router,router_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S\x1a@/compute/v1/projects/{project}/regions/{region}/routers/{router}:\x0frouter_resource\x12\xa5\x02\n\x11UpdateRoutePolicy\x12\x37.google.cloud.compute.v1.UpdateRoutePolicyRouterRequest\x1a\".google.cloud.compute.v1.Operation\"\xb2\x01\xda\x41+project,region,router,route_policy_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02k\"R/compute/v1/projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy:\x15route_policy_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xc0\x06\n\x06Routes\x12\xba\x01\n\x06\x44\x65lete\x12+.google.cloud.compute.v1.DeleteRouteRequest\x1a\".google.cloud.compute.v1.Operation\"_\xda\x41\rproject,route\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x36*4/compute/v1/projects/{project}/global/routes/{route}\x12\x9d\x01\n\x03Get\x12(.google.cloud.compute.v1.GetRouteRequest\x1a\x1e.google.cloud.compute.v1.Route\"L\xda\x41\rproject,route\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/global/routes/{route}\x12\xcb\x01\n\x06Insert\x12+.google.cloud.compute.v1.InsertRouteRequest\x1a\".google.cloud.compute.v1.Operation\"p\xda\x41\x16project,route_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02>\",/compute/v1/projects/{project}/global/routes:\x0eroute_resource\x12\x96\x01\n\x04List\x12*.google.cloud.compute.v1.ListRoutesRequest\x1a\".google.cloud.compute.v1.RouteList\">\xda\x41\x07project\x82\xd3\xe4\x93\x02.\x12,/compute/v1/projects/{project}/global/routes\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xef\x18\n\x10SecurityPolicies\x12\xa9\x02\n\x07\x41\x64\x64Rule\x12\x35.google.cloud.compute.v1.AddRuleSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc2\x01\xda\x41\x35project,security_policy,security_policy_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02q\"P/compute/v1/projects/{project}/global/securityPolicies/{security_policy}/addRule:\x1dsecurity_policy_rule_resource\x12\xd7\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest\x1a\x37.google.cloud.compute.v1.SecurityPoliciesAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/securityPolicies\x12\xe1\x01\n\x06\x44\x65lete\x12\x34.google.cloud.compute.v1.DeleteSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"}\xda\x41\x17project,security_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02J*H/compute/v1/projects/{project}/global/securityPolicies/{security_policy}\x12\xcd\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetSecurityPolicyRequest\x1a\'.google.cloud.compute.v1.SecurityPolicy\"j\xda\x41\x17project,security_policy\x82\xd3\xe4\x93\x02J\x12H/compute/v1/projects/{project}/global/securityPolicies/{security_policy}\x12\xe1\x01\n\x07GetRule\x12\x35.google.cloud.compute.v1.GetRuleSecurityPolicyRequest\x1a+.google.cloud.compute.v1.SecurityPolicyRule\"r\xda\x41\x17project,security_policy\x82\xd3\xe4\x93\x02R\x12P/compute/v1/projects/{project}/global/securityPolicies/{security_policy}/getRule\x12\xf3\x01\n\x06Insert\x12\x34.google.cloud.compute.v1.InsertSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x8e\x01\xda\x41 project,security_policy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02R\"6/compute/v1/projects/{project}/global/securityPolicies:\x18security_policy_resource\x12\xb3\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListSecurityPoliciesRequest\x1a+.google.cloud.compute.v1.SecurityPolicyList\"H\xda\x41\x07project\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/global/securityPolicies\x12\xae\x02\n\x1fListPreconfiguredExpressionSets\x12O.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest\x1aP.google.cloud.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse\"h\xda\x41\x07project\x82\xd3\xe4\x93\x02X\x12V/compute/v1/projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets\x12\x93\x02\n\x05Patch\x12\x33.google.cloud.compute.v1.PatchSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xb0\x01\xda\x41\x30project,security_policy,security_policy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x64\x32H/compute/v1/projects/{project}/global/securityPolicies/{security_policy}:\x18security_policy_resource\x12\xaf\x02\n\tPatchRule\x12\x37.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc4\x01\xda\x41\x35project,security_policy,security_policy_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02s\"R/compute/v1/projects/{project}/global/securityPolicies/{security_policy}/patchRule:\x1dsecurity_policy_rule_resource\x12\xf5\x01\n\nRemoveRule\x12\x38.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x88\x01\xda\x41\x17project,security_policy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02U\"S/compute/v1/projects/{project}/global/securityPolicies/{security_policy}/removeRule\x12\xab\x02\n\tSetLabels\x12\x37.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\xc0\x01\xda\x41\x33project,resource,global_set_labels_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02q\"K/compute/v1/projects/{project}/global/securityPolicies/{resource}/setLabels:\"global_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xf0\x13\n\x12ServiceAttachments\x12\xdc\x01\n\x0e\x41ggregatedList\x12@.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest\x1a\x38.google.cloud.compute.v1.ServiceAttachmentAggregatedList\"N\xda\x41\x07project\x82\xd3\xe4\x93\x02>\x12/compute/v1/projects/{project}/global/sslPolicies/{ssl_policy}\x12\xb4\x01\n\x03Get\x12,.google.cloud.compute.v1.GetSslPolicyRequest\x1a\".google.cloud.compute.v1.SslPolicy\"[\xda\x41\x12project,ssl_policy\x82\xd3\xe4\x93\x02@\x12>/compute/v1/projects/{project}/global/sslPolicies/{ssl_policy}\x12\xde\x01\n\x06Insert\x12/.google.cloud.compute.v1.InsertSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x7f\xda\x41\x1bproject,ssl_policy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02H\"1/compute/v1/projects/{project}/global/sslPolicies:\x13ssl_policy_resource\x12\xa6\x01\n\x04List\x12/.google.cloud.compute.v1.ListSslPoliciesRequest\x1a(.google.cloud.compute.v1.SslPoliciesList\"C\xda\x41\x07project\x82\xd3\xe4\x93\x02\x33\x12\x31/compute/v1/projects/{project}/global/sslPolicies\x12\xf7\x01\n\x15ListAvailableFeatures\x12@.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest\x1a\x41.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse\"Y\xda\x41\x07project\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/global/sslPolicies/listAvailableFeatures\x12\xf5\x01\n\x05Patch\x12..google.cloud.compute.v1.PatchSslPolicyRequest\x1a\".google.cloud.compute.v1.Operation\"\x97\x01\xda\x41&project,ssl_policy,ssl_policy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02U2>/compute/v1/projects/{project}/global/sslPolicies/{ssl_policy}:\x13ssl_policy_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xb5\x06\n\x10StoragePoolTypes\x12\xd6\x01\n\x0e\x41ggregatedList\x12>.google.cloud.compute.v1.AggregatedListStoragePoolTypesRequest\x1a\x36.google.cloud.compute.v1.StoragePoolTypeAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/storagePoolTypes\x12\xde\x01\n\x03Get\x12\x32.google.cloud.compute.v1.GetStoragePoolTypeRequest\x1a(.google.cloud.compute.v1.StoragePoolType\"y\xda\x41\x1eproject,zone,storage_pool_type\x82\xd3\xe4\x93\x02R\x12P/compute/v1/projects/{project}/zones/{zone}/storagePoolTypes/{storage_pool_type}\x12\xbf\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListStoragePoolTypesRequest\x1a,.google.cloud.compute.v1.StoragePoolTypeList\"S\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02>\x12\x12.google.cloud.compute.v1.AggregatedListTargetTcpProxiesRequest\x1a\x35.google.cloud.compute.v1.TargetTcpProxyAggregatedList\"L\xda\x41\x07project\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/aggregated/targetTcpProxies\x12\xe3\x01\n\x06\x44\x65lete\x12\x34.google.cloud.compute.v1.DeleteTargetTcpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x7f\xda\x41\x18project,target_tcp_proxy\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02K*I/compute/v1/projects/{project}/global/targetTcpProxies/{target_tcp_proxy}\x12\xcf\x01\n\x03Get\x12\x31.google.cloud.compute.v1.GetTargetTcpProxyRequest\x1a\'.google.cloud.compute.v1.TargetTcpProxy\"l\xda\x41\x18project,target_tcp_proxy\x82\xd3\xe4\x93\x02K\x12I/compute/v1/projects/{project}/global/targetTcpProxies/{target_tcp_proxy}\x12\xf5\x01\n\x06Insert\x12\x34.google.cloud.compute.v1.InsertTargetTcpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x90\x01\xda\x41!project,target_tcp_proxy_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02S\"6/compute/v1/projects/{project}/global/targetTcpProxies:\x19target_tcp_proxy_resource\x12\xb3\x01\n\x04List\x12\x34.google.cloud.compute.v1.ListTargetTcpProxiesRequest\x1a+.google.cloud.compute.v1.TargetTcpProxyList\"H\xda\x41\x07project\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/global/targetTcpProxies\x12\xfe\x02\n\x11SetBackendService\x12?.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\x83\x02\xda\x41Pproject,target_tcp_proxy,target_tcp_proxies_set_backend_service_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x96\x01\"[/compute/v1/projects/{project}/global/targetTcpProxies/{target_tcp_proxy}/setBackendService:7target_tcp_proxies_set_backend_service_request_resource\x12\xef\x02\n\x0eSetProxyHeader\x12<.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest\x1a\".google.cloud.compute.v1.Operation\"\xfa\x01\xda\x41Mproject,target_tcp_proxy,target_tcp_proxies_set_proxy_header_request_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x90\x01\"X/compute/v1/projects/{project}/global/targetTcpProxies/{target_tcp_proxy}/setProxyHeader:4target_tcp_proxies_set_proxy_header_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xec\x0c\n\x11TargetVpnGateways\x12\xd9\x01\n\x0e\x41ggregatedList\x12?.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest\x1a\x37.google.cloud.compute.v1.TargetVpnGatewayAggregatedList\"M\xda\x41\x07project\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/aggregated/targetVpnGateways\x12\xfc\x01\n\x06\x44\x65lete\x12\x36.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\x95\x01\xda\x41!project,region,target_vpn_gateway\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02X*V/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{target_vpn_gateway}\x12\xea\x01\n\x03Get\x12\x33.google.cloud.compute.v1.GetTargetVpnGatewayRequest\x1a).google.cloud.compute.v1.TargetVpnGateway\"\x82\x01\xda\x41!project,region,target_vpn_gateway\x82\xd3\xe4\x93\x02X\x12V/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{target_vpn_gateway}\x12\x8d\x02\n\x06Insert\x12\x36.google.cloud.compute.v1.InsertTargetVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\xa6\x01\xda\x41*project,region,target_vpn_gateway_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02`\"A/compute/v1/projects/{project}/regions/{region}/targetVpnGateways:\x1btarget_vpn_gateway_resource\x12\xc8\x01\n\x04List\x12\x35.google.cloud.compute.v1.ListTargetVpnGatewaysRequest\x1a-.google.cloud.compute.v1.TargetVpnGatewayList\"Z\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02\x43\x12\x41/compute/v1/projects/{project}/regions/{region}/targetVpnGateways\x12\xbf\x02\n\tSetLabels\x12\x39.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\xd2\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02|\"V/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels:\"region_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x9e\x10\n\x07UrlMaps\x12\xbc\x01\n\x0e\x41ggregatedList\x12\x35.google.cloud.compute.v1.AggregatedListUrlMapsRequest\x1a..google.cloud.compute.v1.UrlMapsAggregatedList\"C\xda\x41\x07project\x82\xd3\xe4\x93\x02\x33\x12\x31/compute/v1/projects/{project}/aggregated/urlMaps\x12\xc0\x01\n\x06\x44\x65lete\x12,.google.cloud.compute.v1.DeleteUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"d\xda\x41\x0fproject,url_map\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x39*7/compute/v1/projects/{project}/global/urlMaps/{url_map}\x12\xa4\x01\n\x03Get\x12).google.cloud.compute.v1.GetUrlMapRequest\x1a\x1f.google.cloud.compute.v1.UrlMap\"Q\xda\x41\x0fproject,url_map\x82\xd3\xe4\x93\x02\x39\x12\x37/compute/v1/projects/{project}/global/urlMaps/{url_map}\x12\xd1\x01\n\x06Insert\x12,.google.cloud.compute.v1.InsertUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"u\xda\x41\x18project,url_map_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02\x41\"-/compute/v1/projects/{project}/global/urlMaps:\x10url_map_resource\x12\xa6\x02\n\x0fInvalidateCache\x12\x35.google.cloud.compute.v1.InvalidateCacheUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"\xb7\x01\xda\x41\x30project,url_map,cache_invalidation_rule_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02k\"G/compute/v1/projects/{project}/global/urlMaps/{url_map}/invalidateCache: cache_invalidation_rule_resource\x12\x99\x01\n\x04List\x12+.google.cloud.compute.v1.ListUrlMapsRequest\x1a#.google.cloud.compute.v1.UrlMapList\"?\xda\x41\x07project\x82\xd3\xe4\x93\x02/\x12-/compute/v1/projects/{project}/global/urlMaps\x12\xe2\x01\n\x05Patch\x12+.google.cloud.compute.v1.PatchUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41 project,url_map,url_map_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02K27/compute/v1/projects/{project}/global/urlMaps/{url_map}:\x10url_map_resource\x12\xe4\x01\n\x06Update\x12,.google.cloud.compute.v1.UpdateUrlMapRequest\x1a\".google.cloud.compute.v1.Operation\"\x87\x01\xda\x41 project,url_map,url_map_resource\x8aN\x10GlobalOperations\x82\xd3\xe4\x93\x02K\x1a\x37/compute/v1/projects/{project}/global/urlMaps/{url_map}:\x10url_map_resource\x12\x90\x02\n\x08Validate\x12..google.cloud.compute.v1.ValidateUrlMapRequest\x1a\x30.google.cloud.compute.v1.UrlMapsValidateResponse\"\xa1\x01\xda\x41\x32project,url_map,url_maps_validate_request_resource\x82\xd3\xe4\x93\x02\x66\"@/compute/v1/projects/{project}/global/urlMaps/{url_map}/validate:\"url_maps_validate_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\x9f\x10\n\x0bVpnGateways\x12\xc7\x01\n\x0e\x41ggregatedList\x12\x39.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest\x1a\x31.google.cloud.compute.v1.VpnGatewayAggregatedList\"G\xda\x41\x07project\x82\xd3\xe4\x93\x02\x37\x12\x35/compute/v1/projects/{project}/aggregated/vpnGateways\x12\xe2\x01\n\x06\x44\x65lete\x12\x30.google.cloud.compute.v1.DeleteVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\x81\x01\xda\x41\x1aproject,region,vpn_gateway\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02K*I/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}\x12\xc9\x01\n\x03Get\x12-.google.cloud.compute.v1.GetVpnGatewayRequest\x1a#.google.cloud.compute.v1.VpnGateway\"n\xda\x41\x1aproject,region,vpn_gateway\x82\xd3\xe4\x93\x02K\x12I/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}\x12\xf1\x01\n\tGetStatus\x12\x33.google.cloud.compute.v1.GetStatusVpnGatewayRequest\x1a\x35.google.cloud.compute.v1.VpnGatewaysGetStatusResponse\"x\xda\x41\x1aproject,region,vpn_gateway\x82\xd3\xe4\x93\x02U\x12S/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}/getStatus\x12\xf3\x01\n\x06Insert\x12\x30.google.cloud.compute.v1.InsertVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\x92\x01\xda\x41#project,region,vpn_gateway_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02S\";/compute/v1/projects/{project}/regions/{region}/vpnGateways:\x14vpn_gateway_resource\x12\xb6\x01\n\x04List\x12/.google.cloud.compute.v1.ListVpnGatewaysRequest\x1a\'.google.cloud.compute.v1.VpnGatewayList\"T\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02=\x12;/compute/v1/projects/{project}/regions/{region}/vpnGateways\x12\xb3\x02\n\tSetLabels\x12\x33.google.cloud.compute.v1.SetLabelsVpnGatewayRequest\x1a\".google.cloud.compute.v1.Operation\"\xcc\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02v\"P/compute/v1/projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels:\"region_set_labels_request_resource\x12\xc7\x02\n\x12TestIamPermissions\x12<.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest\x1a\x30.google.cloud.compute.v1.TestPermissionsResponse\"\xc0\x01\xda\x41\x39project,region,resource,test_permissions_request_resource\x82\xd3\xe4\x93\x02~\"Y/compute/v1/projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions:!test_permissions_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xca\x0b\n\nVpnTunnels\x12\xc4\x01\n\x0e\x41ggregatedList\x12\x38.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest\x1a\x30.google.cloud.compute.v1.VpnTunnelAggregatedList\"F\xda\x41\x07project\x82\xd3\xe4\x93\x02\x36\x12\x34/compute/v1/projects/{project}/aggregated/vpnTunnels\x12\xdd\x01\n\x06\x44\x65lete\x12/.google.cloud.compute.v1.DeleteVpnTunnelRequest\x1a\".google.cloud.compute.v1.Operation\"~\xda\x41\x19project,region,vpn_tunnel\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02I*G/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{vpn_tunnel}\x12\xc4\x01\n\x03Get\x12,.google.cloud.compute.v1.GetVpnTunnelRequest\x1a\".google.cloud.compute.v1.VpnTunnel\"k\xda\x41\x19project,region,vpn_tunnel\x82\xd3\xe4\x93\x02I\x12G/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{vpn_tunnel}\x12\xef\x01\n\x06Insert\x12/.google.cloud.compute.v1.InsertVpnTunnelRequest\x1a\".google.cloud.compute.v1.Operation\"\x8f\x01\xda\x41\"project,region,vpn_tunnel_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02Q\":/compute/v1/projects/{project}/regions/{region}/vpnTunnels:\x13vpn_tunnel_resource\x12\xb3\x01\n\x04List\x12..google.cloud.compute.v1.ListVpnTunnelsRequest\x1a&.google.cloud.compute.v1.VpnTunnelList\"S\xda\x41\x0eproject,region\x82\xd3\xe4\x93\x02<\x12:/compute/v1/projects/{project}/regions/{region}/vpnTunnels\x12\xb1\x02\n\tSetLabels\x12\x32.google.cloud.compute.v1.SetLabelsVpnTunnelRequest\x1a\".google.cloud.compute.v1.Operation\"\xcb\x01\xda\x41:project,region,resource,region_set_labels_request_resource\x8aN\x10RegionOperations\x82\xd3\xe4\x93\x02u\"O/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels:\"region_set_labels_request_resource\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xa3\x07\n\x0eZoneOperations\x12\xd8\x01\n\x06\x44\x65lete\x12\x33.google.cloud.compute.v1.DeleteZoneOperationRequest\x1a\x34.google.cloud.compute.v1.DeleteZoneOperationResponse\"c\xda\x41\x16project,zone,operation\x82\xd3\xe4\x93\x02\x44*B/compute/v1/projects/{project}/zones/{zone}/operations/{operation}\x12\xc3\x01\n\x03Get\x12\x30.google.cloud.compute.v1.GetZoneOperationRequest\x1a\".google.cloud.compute.v1.Operation\"f\xda\x41\x16project,zone,operation\x90N\x01\x82\xd3\xe4\x93\x02\x44\x12\x42/compute/v1/projects/{project}/zones/{zone}/operations/{operation}\x12\xb1\x01\n\x04List\x12\x32.google.cloud.compute.v1.ListZoneOperationsRequest\x1a&.google.cloud.compute.v1.OperationList\"M\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02\x38\x12\x36/compute/v1/projects/{project}/zones/{zone}/operations\x12\xc7\x01\n\x04Wait\x12\x31.google.cloud.compute.v1.WaitZoneOperationRequest\x1a\".google.cloud.compute.v1.Operation\"h\xda\x41\x16project,zone,operation\x82\xd3\xe4\x93\x02I\"G/compute/v1/projects/{project}/zones/{zone}/operations/{operation}/wait\x1ar\xca\x41\x16\x63ompute.googleapis.com\xd2\x41Vhttps://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platform2\xd1\x03\n\x05Zones\x12\x91\x01\n\x03Get\x12\'.google.cloud.compute.v1.GetZoneRequest\x1a\x1d.google.cloud.compute.v1.Zone\"B\xda\x41\x0cproject,zone\x82\xd3\xe4\x93\x02-\x12+/compute/v1/projects/{project}/zones/{zone}\x12\x8c\x01\n\x04List\x12).google.cloud.compute.v1.ListZonesRequest\x1a!.google.cloud.compute.v1.ZoneList\"6\xda\x41\x07project\x82\xd3\xe4\x93\x02&\x12$/compute/v1/projects/{project}/zones\x1a\xa4\x01\xca\x41\x16\x63ompute.googleapis.com\xd2\x41\x87\x01https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/cloud-platformB\xa7\x01\n\x1b\x63om.google.cloud.compute.v1P\x01Z5cloud.google.com/go/compute/apiv1/computepb;computepb\xaa\x02\x17Google.Cloud.Compute.V1\xca\x02\x17Google\\Cloud\\Compute\\V1\xea\x02\x1aGoogle::Cloud::Compute::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -141,6 +141,8 @@ module V1 AllocationReservationSharingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.AllocationReservationSharingPolicy").msgclass AllocationReservationSharingPolicy::ServiceShareType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.AllocationReservationSharingPolicy.ServiceShareType").enummodule AllocationResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.AllocationResourceStatus").msgclass + AllocationResourceStatusHealthInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.AllocationResourceStatusHealthInfo").msgclass + AllocationResourceStatusHealthInfo::HealthStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.AllocationResourceStatusHealthInfo.HealthStatus").enummodule AllocationResourceStatusSpecificSKUAllocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation").msgclass AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk").msgclass AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk::Interface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk.Interface").enummodule @@ -188,12 +190,14 @@ module V1 Backend::Preference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Backend.Preference").enummodule BackendBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucket").msgclass BackendBucket::CompressionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucket.CompressionMode").enummodule + BackendBucket::LoadBalancingScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucket.LoadBalancingScheme").enummodule BackendBucketCdnPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucketCdnPolicy").msgclass BackendBucketCdnPolicy::CacheMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucketCdnPolicy.CacheMode").enummodule BackendBucketCdnPolicyBypassCacheOnRequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader").msgclass BackendBucketCdnPolicyCacheKeyPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy").msgclass BackendBucketCdnPolicyNegativeCachingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy").msgclass BackendBucketList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucketList").msgclass + BackendBucketParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucketParams").msgclass BackendBucketUsedBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendBucketUsedBy").msgclass BackendCustomMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendCustomMetric").msgclass BackendService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendService").msgclass @@ -217,6 +221,8 @@ module V1 BackendServiceGroupHealth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceGroupHealth").msgclass BackendServiceHAPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceHAPolicy").msgclass BackendServiceHAPolicy::FastIPMove = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceHAPolicy.FastIPMove").enummodule + BackendServiceHAPolicyLeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceHAPolicyLeader").msgclass + BackendServiceHAPolicyLeaderNetworkEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceHAPolicyLeaderNetworkEndpoint").msgclass BackendServiceHttpCookie = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceHttpCookie").msgclass BackendServiceIAP = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceIAP").msgclass BackendServiceList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceList").msgclass @@ -227,7 +233,10 @@ module V1 BackendServiceLocalityLoadBalancingPolicyConfigPolicy::Name = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigPolicy.Name").enummodule BackendServiceLogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceLogConfig").msgclass BackendServiceLogConfig::OptionalMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceLogConfig.OptionalMode").enummodule + BackendServiceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceParams").msgclass BackendServiceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceReference").msgclass + BackendServiceTlsSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceTlsSettings").msgclass + BackendServiceTlsSettingsSubjectAltName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceTlsSettingsSubjectAltName").msgclass BackendServiceUsedBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServiceUsedBy").msgclass BackendServicesScopedList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BackendServicesScopedList").msgclass BfdPacket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BfdPacket").msgclass @@ -253,6 +262,9 @@ module V1 BulkInsertOperationStatus::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BulkInsertOperationStatus.Status").enummodule BulkInsertRegionDiskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BulkInsertRegionDiskRequest").msgclass BulkInsertRegionInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BulkInsertRegionInstanceRequest").msgclass + BulkSetLabelsDiskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BulkSetLabelsDiskRequest").msgclass + BulkSetLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BulkSetLabelsRequest").msgclass + BulkZoneSetLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.BulkZoneSetLabelsRequest").msgclass CacheInvalidationRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CacheInvalidationRule").msgclass CacheKeyPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CacheKeyPolicy").msgclass CancelInstanceGroupManagerResizeRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CancelInstanceGroupManagerResizeRequestRequest").msgclass @@ -277,6 +289,7 @@ module V1 CorsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CorsPolicy").msgclass CreateInstancesInstanceGroupManagerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest").msgclass CreateInstancesRegionInstanceGroupManagerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest").msgclass + CreateMembersInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CreateMembersInterconnectGroupRequest").msgclass CreateSnapshotDiskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CreateSnapshotDiskRequest").msgclass CreateSnapshotRegionDiskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CreateSnapshotRegionDiskRequest").msgclass CustomErrorResponsePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.CustomErrorResponsePolicy").msgclass @@ -312,7 +325,9 @@ module V1 DeleteInstancesInstanceGroupManagerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest").msgclass DeleteInstancesRegionInstanceGroupManagerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest").msgclass DeleteInstantSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteInstantSnapshotRequest").msgclass + DeleteInterconnectAttachmentGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteInterconnectAttachmentGroupRequest").msgclass DeleteInterconnectAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteInterconnectAttachmentRequest").msgclass + DeleteInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteInterconnectGroupRequest").msgclass DeleteInterconnectRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteInterconnectRequest").msgclass DeleteLicenseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteLicenseRequest").msgclass DeleteMachineImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.DeleteMachineImageRequest").msgclass @@ -438,6 +453,7 @@ module V1 FirewallList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallList").msgclass FirewallLogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallLogConfig").msgclass FirewallLogConfig::Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallLogConfig.Metadata").enummodule + FirewallParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallParams").msgclass FirewallPoliciesListAssociationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPoliciesListAssociationsResponse").msgclass FirewallPoliciesScopedList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPoliciesScopedList").msgclass FirewallPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicy").msgclass @@ -446,11 +462,14 @@ module V1 FirewallPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicyRule").msgclass FirewallPolicyRule::Direction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicyRule.Direction").enummodule FirewallPolicyRuleMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicyRuleMatcher").msgclass + FirewallPolicyRuleMatcher::DestNetworkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicyRuleMatcher.DestNetworkType").enummodule + FirewallPolicyRuleMatcher::SrcNetworkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicyRuleMatcher.SrcNetworkType").enummodule FirewallPolicyRuleMatcherLayer4Config = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config").msgclass FirewallPolicyRuleSecureTag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicyRuleSecureTag").msgclass FirewallPolicyRuleSecureTag::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FirewallPolicyRuleSecureTag.State").enummodule FixedOrPercent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.FixedOrPercent").msgclass ForwardingRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ForwardingRule").msgclass + ForwardingRule::ExternalManagedBackendBucketMigrationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ForwardingRule.ExternalManagedBackendBucketMigrationState").enummodule ForwardingRule::IPProtocolEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ForwardingRule.IPProtocolEnum").enummodule ForwardingRule::IpVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ForwardingRule.IpVersion").enummodule ForwardingRule::LoadBalancingScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ForwardingRule.LoadBalancingScheme").enummodule @@ -501,6 +520,8 @@ module V1 GetIamPolicyInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetIamPolicyInstanceRequest").msgclass GetIamPolicyInstanceTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest").msgclass GetIamPolicyInstantSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetIamPolicyInstantSnapshotRequest").msgclass + GetIamPolicyInterconnectAttachmentGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetIamPolicyInterconnectAttachmentGroupRequest").msgclass + GetIamPolicyInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetIamPolicyInterconnectGroupRequest").msgclass GetIamPolicyLicenseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetIamPolicyLicenseRequest").msgclass GetIamPolicyMachineImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetIamPolicyMachineImageRequest").msgclass GetIamPolicyNetworkAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetIamPolicyNetworkAttachmentRequest").msgclass @@ -526,7 +547,9 @@ module V1 GetInstanceSettingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInstanceSettingRequest").msgclass GetInstanceTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInstanceTemplateRequest").msgclass GetInstantSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInstantSnapshotRequest").msgclass + GetInterconnectAttachmentGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInterconnectAttachmentGroupRequest").msgclass GetInterconnectAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInterconnectAttachmentRequest").msgclass + GetInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInterconnectGroupRequest").msgclass GetInterconnectLocationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInterconnectLocationRequest").msgclass GetInterconnectRemoteLocationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInterconnectRemoteLocationRequest").msgclass GetInterconnectRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetInterconnectRequest").msgclass @@ -546,6 +569,8 @@ module V1 GetNodeGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetNodeGroupRequest").msgclass GetNodeTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetNodeTemplateRequest").msgclass GetNodeTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetNodeTypeRequest").msgclass + GetOperationalStatusInterconnectAttachmentGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetOperationalStatusInterconnectAttachmentGroupRequest").msgclass + GetOperationalStatusInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetOperationalStatusInterconnectGroupRequest").msgclass GetPacketMirroringRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetPacketMirroringRequest").msgclass GetPacketMirroringRuleNetworkFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetPacketMirroringRuleNetworkFirewallPolicyRequest").msgclass GetProjectRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetProjectRequest").msgclass @@ -575,7 +600,9 @@ module V1 GetRegionTargetTcpProxyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetRegionTargetTcpProxyRequest").msgclass GetRegionUrlMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetRegionUrlMapRequest").msgclass GetReservationBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetReservationBlockRequest").msgclass + GetReservationBlockRequest::View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetReservationBlockRequest.View").enummodule GetReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetReservationRequest").msgclass + GetReservationSubBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetReservationSubBlockRequest").msgclass GetResourcePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetResourcePolicyRequest").msgclass GetRoutePolicyRouterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetRoutePolicyRouterRequest").msgclass GetRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.GetRouteRequest").msgclass @@ -698,7 +725,9 @@ module V1 InsertInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertInstanceRequest").msgclass InsertInstanceTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertInstanceTemplateRequest").msgclass InsertInstantSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertInstantSnapshotRequest").msgclass + InsertInterconnectAttachmentGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertInterconnectAttachmentGroupRequest").msgclass InsertInterconnectAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertInterconnectAttachmentRequest").msgclass + InsertInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertInterconnectGroupRequest").msgclass InsertInterconnectRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertInterconnectRequest").msgclass InsertLicenseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertLicenseRequest").msgclass InsertMachineImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InsertMachineImageRequest").msgclass @@ -877,6 +906,11 @@ module V1 Interconnect::OperationalStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Interconnect.OperationalStatus").enummodule Interconnect::RequestedFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Interconnect.RequestedFeatures").enummodule Interconnect::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Interconnect.State").enummodule + InterconnectApplicationAwareInterconnect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectApplicationAwareInterconnect").msgclass + InterconnectApplicationAwareInterconnectBandwidthPercentage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectApplicationAwareInterconnectBandwidthPercentage").msgclass + InterconnectApplicationAwareInterconnectBandwidthPercentage::TrafficClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectApplicationAwareInterconnectBandwidthPercentage.TrafficClass").enummodule + InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy").msgclass + InterconnectApplicationAwareInterconnectStrictPriorityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectApplicationAwareInterconnectStrictPriorityPolicy").msgclass InterconnectAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachment").msgclass InterconnectAttachment::Bandwidth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachment.Bandwidth").enummodule InterconnectAttachment::EdgeAvailabilityDomain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachment.EdgeAvailabilityDomain").enummodule @@ -889,6 +923,27 @@ module V1 InterconnectAttachmentConfigurationConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentConfigurationConstraints").msgclass InterconnectAttachmentConfigurationConstraints::BgpMd5 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentConfigurationConstraints.BgpMd5").enummodule InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange").msgclass + InterconnectAttachmentGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroup").msgclass + InterconnectAttachmentGroupAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupAttachment").msgclass + InterconnectAttachmentGroupConfigured = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupConfigured").msgclass + InterconnectAttachmentGroupConfiguredAvailabilitySLA = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredAvailabilitySLA").msgclass + InterconnectAttachmentGroupConfiguredAvailabilitySLA::EffectiveSla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredAvailabilitySLA.EffectiveSla").enummodule + InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers").msgclass + InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers::BlockerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers.BlockerType").enummodule + InterconnectAttachmentGroupIntent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupIntent").msgclass + InterconnectAttachmentGroupIntent::AvailabilitySla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupIntent.AvailabilitySla").enummodule + InterconnectAttachmentGroupLogicalStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructure").msgclass + InterconnectAttachmentGroupLogicalStructureRegion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureRegion").msgclass + InterconnectAttachmentGroupLogicalStructureRegionMetro = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureRegionMetro").msgclass + InterconnectAttachmentGroupLogicalStructureRegionMetroFacility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureRegionMetroFacility").msgclass + InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone").msgclass + InterconnectAttachmentGroupsGetOperationalStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupsGetOperationalStatusResponse").msgclass + InterconnectAttachmentGroupsListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupsListResponse").msgclass + InterconnectAttachmentGroupsOperationalStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupsOperationalStatus").msgclass + InterconnectAttachmentGroupsOperationalStatus::GroupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupsOperationalStatus.GroupStatus").enummodule + InterconnectAttachmentGroupsOperationalStatusAttachmentStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupsOperationalStatusAttachmentStatus").msgclass + InterconnectAttachmentGroupsOperationalStatusAttachmentStatus::IsActive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupsOperationalStatusAttachmentStatus.IsActive").enummodule + InterconnectAttachmentGroupsOperationalStatusAttachmentStatus::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentGroupsOperationalStatusAttachmentStatus.Status").enummodule InterconnectAttachmentList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentList").msgclass InterconnectAttachmentPartnerMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentPartnerMetadata").msgclass InterconnectAttachmentPrivateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectAttachmentPrivateInfo").msgclass @@ -905,6 +960,32 @@ module V1 InterconnectDiagnosticsLinkStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus").msgclass InterconnectDiagnosticsLinkStatus::OperationalStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus.OperationalStatus").enummodule InterconnectDiagnosticsMacsecStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectDiagnosticsMacsecStatus").msgclass + InterconnectGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroup").msgclass + InterconnectGroupConfigured = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupConfigured").msgclass + InterconnectGroupConfiguredTopologyCapability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupConfiguredTopologyCapability").msgclass + InterconnectGroupConfiguredTopologyCapability::SupportedSla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupConfiguredTopologyCapability.SupportedSla").enummodule + InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers").msgclass + InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers::BlockerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers.BlockerType").enummodule + InterconnectGroupIntent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupIntent").msgclass + InterconnectGroupIntent::TopologyCapability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupIntent.TopologyCapability").enummodule + InterconnectGroupInterconnect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupInterconnect").msgclass + InterconnectGroupPhysicalStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupPhysicalStructure").msgclass + InterconnectGroupPhysicalStructureMetros = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupPhysicalStructureMetros").msgclass + InterconnectGroupPhysicalStructureMetrosFacilities = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupPhysicalStructureMetrosFacilities").msgclass + InterconnectGroupPhysicalStructureMetrosFacilitiesZones = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupPhysicalStructureMetrosFacilitiesZones").msgclass + InterconnectGroupsCreateMembers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsCreateMembers").msgclass + InterconnectGroupsCreateMembers::IntentMismatchBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsCreateMembers.IntentMismatchBehavior").enummodule + InterconnectGroupsCreateMembersInterconnectInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsCreateMembersInterconnectInput").msgclass + InterconnectGroupsCreateMembersInterconnectInput::InterconnectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsCreateMembersInterconnectInput.InterconnectType").enummodule + InterconnectGroupsCreateMembersInterconnectInput::LinkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsCreateMembersInterconnectInput.LinkType").enummodule + InterconnectGroupsCreateMembersInterconnectInput::RequestedFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsCreateMembersInterconnectInput.RequestedFeatures").enummodule + InterconnectGroupsCreateMembersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsCreateMembersRequest").msgclass + InterconnectGroupsGetOperationalStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsGetOperationalStatusResponse").msgclass + InterconnectGroupsListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsListResponse").msgclass + InterconnectGroupsOperationalStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsOperationalStatus").msgclass + InterconnectGroupsOperationalStatus::GroupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsOperationalStatus.GroupStatus").enummodule + InterconnectGroupsOperationalStatusInterconnectStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsOperationalStatusInterconnectStatus").msgclass + InterconnectGroupsOperationalStatusInterconnectStatus::IsActive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectGroupsOperationalStatusInterconnectStatus.IsActive").enummodule InterconnectList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectList").msgclass InterconnectLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectLocation").msgclass InterconnectLocation::AvailableFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.InterconnectLocation.AvailableFeatures").enummodule @@ -979,7 +1060,9 @@ module V1 ListInstancesRegionInstanceGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest").msgclass ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInstancesRequest").msgclass ListInstantSnapshotsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInstantSnapshotsRequest").msgclass + ListInterconnectAttachmentGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInterconnectAttachmentGroupsRequest").msgclass ListInterconnectAttachmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInterconnectAttachmentsRequest").msgclass + ListInterconnectGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInterconnectGroupsRequest").msgclass ListInterconnectLocationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInterconnectLocationsRequest").msgclass ListInterconnectRemoteLocationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest").msgclass ListInterconnectsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListInterconnectsRequest").msgclass @@ -1034,6 +1117,7 @@ module V1 ListRegionZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListRegionZonesRequest").msgclass ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListRegionsRequest").msgclass ListReservationBlocksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListReservationBlocksRequest").msgclass + ListReservationSubBlocksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListReservationSubBlocksRequest").msgclass ListReservationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListReservationsRequest").msgclass ListResourcePoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListResourcePoliciesRequest").msgclass ListRoutePoliciesRoutersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ListRoutePoliciesRoutersRequest").msgclass @@ -1138,9 +1222,18 @@ module V1 NetworkInterface::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkInterface.NicType").enummodule NetworkInterface::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkInterface.StackType").enummodule NetworkList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkList").msgclass + NetworkParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkParams").msgclass NetworkPeering = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeering").msgclass NetworkPeering::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeering.StackType").enummodule NetworkPeering::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeering.State").enummodule + NetworkPeering::UpdateStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeering.UpdateStrategy").enummodule + NetworkPeeringConnectionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeeringConnectionStatus").msgclass + NetworkPeeringConnectionStatus::UpdateStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeeringConnectionStatus.UpdateStrategy").enummodule + NetworkPeeringConnectionStatusConsensusState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeeringConnectionStatusConsensusState").msgclass + NetworkPeeringConnectionStatusConsensusState::DeleteStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeeringConnectionStatusConsensusState.DeleteStatus").enummodule + NetworkPeeringConnectionStatusConsensusState::UpdateStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeeringConnectionStatusConsensusState.UpdateStatus").enummodule + NetworkPeeringConnectionStatusTrafficConfiguration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeeringConnectionStatusTrafficConfiguration").msgclass + NetworkPeeringConnectionStatusTrafficConfiguration::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPeeringConnectionStatusTrafficConfiguration.StackType").enummodule NetworkPerformanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPerformanceConfig").msgclass NetworkPerformanceConfig::TotalEgressBandwidthTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkPerformanceConfig.TotalEgressBandwidthTier").enummodule NetworkProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworkProfile").msgclass @@ -1186,6 +1279,7 @@ module V1 NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy").msgclass NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy.Type").enummodule NetworksRemovePeeringRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworksRemovePeeringRequest").msgclass + NetworksRequestRemovePeeringRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworksRequestRemovePeeringRequest").msgclass NetworksUpdatePeeringRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NetworksUpdatePeeringRequest").msgclass NodeGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NodeGroup").msgclass NodeGroup::MaintenanceInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.NodeGroup.MaintenanceInterval").enummodule @@ -1253,7 +1347,9 @@ module V1 PatchImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchImageRequest").msgclass PatchInstanceGroupManagerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchInstanceGroupManagerRequest").msgclass PatchInstanceSettingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchInstanceSettingRequest").msgclass + PatchInterconnectAttachmentGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchInterconnectAttachmentGroupRequest").msgclass PatchInterconnectAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchInterconnectAttachmentRequest").msgclass + PatchInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchInterconnectGroupRequest").msgclass PatchInterconnectRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchInterconnectRequest").msgclass PatchNetworkAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchNetworkAttachmentRequest").msgclass PatchNetworkEdgeSecurityServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest").msgclass @@ -1301,6 +1397,7 @@ module V1 PerformMaintenanceNodeGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PerformMaintenanceNodeGroupRequest").msgclass PerformMaintenanceReservationBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PerformMaintenanceReservationBlockRequest").msgclass PerformMaintenanceReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PerformMaintenanceReservationRequest").msgclass + PerformMaintenanceReservationSubBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PerformMaintenanceReservationSubBlockRequest").msgclass Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Policy").msgclass PreconfiguredWafSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PreconfiguredWafSet").msgclass PreservedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.PreservedState").msgclass @@ -1413,18 +1510,33 @@ module V1 RemoveRuleSecurityPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest").msgclass ReportHostAsFaultyInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest").msgclass RequestMirrorPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RequestMirrorPolicy").msgclass + RequestRemovePeeringNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RequestRemovePeeringNetworkRequest").msgclass Reservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Reservation").msgclass Reservation::DeploymentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Reservation.DeploymentType").enummodule + Reservation::SchedulingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Reservation.SchedulingType").enummodule Reservation::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Reservation.Status").enummodule + ReservationAdvancedDeploymentControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationAdvancedDeploymentControl").msgclass + ReservationAdvancedDeploymentControl::ReservationOperationalMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationAdvancedDeploymentControl.ReservationOperationalMode").enummodule ReservationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationAffinity").msgclass ReservationAffinity::ConsumeReservationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationAffinity.ConsumeReservationType").enummodule ReservationAggregatedList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationAggregatedList").msgclass ReservationBlock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlock").msgclass ReservationBlock::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlock.Status").enummodule + ReservationBlockHealthInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlockHealthInfo").msgclass + ReservationBlockHealthInfo::HealthStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlockHealthInfo.HealthStatus").enummodule ReservationBlockPhysicalTopology = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlockPhysicalTopology").msgclass + ReservationBlockPhysicalTopologyInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlockPhysicalTopologyInstance").msgclass + ReservationBlockPhysicalTopologyInstancePhysicalHostTopology = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlockPhysicalTopologyInstancePhysicalHostTopology").msgclass ReservationBlocksGetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlocksGetResponse").msgclass ReservationBlocksListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationBlocksListResponse").msgclass ReservationList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationList").msgclass + ReservationSubBlock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationSubBlock").msgclass + ReservationSubBlock::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationSubBlock.Status").enummodule + ReservationSubBlockHealthInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationSubBlockHealthInfo").msgclass + ReservationSubBlockHealthInfo::HealthStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationSubBlockHealthInfo.HealthStatus").enummodule + ReservationSubBlockPhysicalTopology = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationSubBlockPhysicalTopology").msgclass + ReservationSubBlocksGetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationSubBlocksGetResponse").msgclass + ReservationSubBlocksListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationSubBlocksListResponse").msgclass ReservationsBlocksPerformMaintenanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationsBlocksPerformMaintenanceRequest").msgclass ReservationsBlocksPerformMaintenanceRequest::MaintenanceScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationsBlocksPerformMaintenanceRequest.MaintenanceScope").enummodule ReservationsPerformMaintenanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ReservationsPerformMaintenanceRequest").msgclass @@ -1462,6 +1574,9 @@ module V1 ResourcePolicyWeeklyCycle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourcePolicyWeeklyCycle").msgclass ResourcePolicyWeeklyCycleDayOfWeek = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek").msgclass ResourcePolicyWeeklyCycleDayOfWeek::Day = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek.Day").enummodule + ResourcePolicyWorkloadPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourcePolicyWorkloadPolicy").msgclass + ResourcePolicyWorkloadPolicy::MaxTopologyDistance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourcePolicyWorkloadPolicy.MaxTopologyDistance").enummodule + ResourcePolicyWorkloadPolicy::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourcePolicyWorkloadPolicy.Type").enummodule ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourceStatus").msgclass ResourceStatusPhysicalHostTopology = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourceStatusPhysicalHostTopology").msgclass ResourceStatusScheduling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ResourceStatusScheduling").msgclass @@ -1475,6 +1590,7 @@ module V1 RouteAsPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RouteAsPath").msgclass RouteAsPath::PathSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RouteAsPath.PathSegmentType").enummodule RouteList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RouteList").msgclass + RouteParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RouteParams").msgclass RoutePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RoutePolicy").msgclass RoutePolicy::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RoutePolicy.Type").enummodule RoutePolicyPolicyTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.RoutePolicyPolicyTerm").msgclass @@ -1543,7 +1659,6 @@ module V1 SchedulingNodeAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SchedulingNodeAffinity").msgclass SchedulingNodeAffinity::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SchedulingNodeAffinity.Operator").enummodule SchedulingOnInstanceStopAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SchedulingOnInstanceStopAction").msgclass - ScratchDisks = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.ScratchDisks").msgclass Screenshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Screenshot").msgclass SecurityPoliciesAggregatedList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SecurityPoliciesAggregatedList").msgclass SecurityPoliciesListPreconfiguredExpressionSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse").msgclass @@ -1627,6 +1742,8 @@ module V1 SetIamPolicyInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SetIamPolicyInstanceRequest").msgclass SetIamPolicyInstanceTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest").msgclass SetIamPolicyInstantSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SetIamPolicyInstantSnapshotRequest").msgclass + SetIamPolicyInterconnectAttachmentGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SetIamPolicyInterconnectAttachmentGroupRequest").msgclass + SetIamPolicyInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SetIamPolicyInterconnectGroupRequest").msgclass SetIamPolicyLicenseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SetIamPolicyLicenseRequest").msgclass SetIamPolicyMachineImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SetIamPolicyMachineImageRequest").msgclass SetIamPolicyNetworkAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SetIamPolicyNetworkAttachmentRequest").msgclass @@ -1788,9 +1905,11 @@ module V1 SubnetworkLogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworkLogConfig").msgclass SubnetworkLogConfig::AggregationInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworkLogConfig.AggregationInterval").enummodule SubnetworkLogConfig::Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworkLogConfig.Metadata").enummodule + SubnetworkParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworkParams").msgclass SubnetworkSecondaryRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworkSecondaryRange").msgclass SubnetworksExpandIpCidrRangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest").msgclass SubnetworksScopedList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworksScopedList").msgclass + SubnetworksScopedWarning = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworksScopedWarning").msgclass SubnetworksSetPrivateIpGoogleAccessRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest").msgclass Subsetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Subsetting").msgclass Subsetting::Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Subsetting.Policy").enummodule @@ -1865,6 +1984,8 @@ module V1 TestIamPermissionsInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestIamPermissionsInstanceRequest").msgclass TestIamPermissionsInstanceTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest").msgclass TestIamPermissionsInstantSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestIamPermissionsInstantSnapshotRequest").msgclass + TestIamPermissionsInterconnectAttachmentGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestIamPermissionsInterconnectAttachmentGroupRequest").msgclass + TestIamPermissionsInterconnectGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestIamPermissionsInterconnectGroupRequest").msgclass TestIamPermissionsLicenseCodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest").msgclass TestIamPermissionsLicenseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestIamPermissionsLicenseRequest").msgclass TestIamPermissionsMachineImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestIamPermissionsMachineImageRequest").msgclass @@ -1889,6 +2010,7 @@ module V1 TestPermissionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.TestPermissionsResponse").msgclass Uint128 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.Uint128").msgclass UpcomingMaintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpcomingMaintenance").msgclass + UpcomingMaintenance::MaintenanceReasons = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpcomingMaintenance.MaintenanceReasons").enummodule UpcomingMaintenance::MaintenanceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpcomingMaintenance.MaintenanceStatus").enummodule UpcomingMaintenance::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpcomingMaintenance.Type").enummodule UpdateAccessConfigInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpdateAccessConfigInstanceRequest").msgclass @@ -1902,6 +2024,7 @@ module V1 UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpdateInstanceRequest").msgclass UpdateInstanceRequest::MinimalAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpdateInstanceRequest.MinimalAction").enummodule UpdateInstanceRequest::MostDisruptiveAllowedAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpdateInstanceRequest.MostDisruptiveAllowedAction").enummodule + UpdateLicenseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpdateLicenseRequest").msgclass UpdateNetworkInterfaceInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest").msgclass UpdatePeeringNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpdatePeeringNetworkRequest").msgclass UpdatePerInstanceConfigsInstanceGroupManagerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest").msgclass diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/disks/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/disks/rest/client.rb index 40dfe415e1f3..eb56f3db28eb 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/disks/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/disks/rest/client.rb @@ -80,6 +80,8 @@ def self.configure default_config.rpcs.bulk_insert.timeout = 600.0 + default_config.rpcs.bulk_set_labels.timeout = 600.0 + default_config.rpcs.create_snapshot.timeout = 600.0 default_config.rpcs.delete.timeout = 600.0 @@ -521,6 +523,102 @@ def bulk_insert request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Sets the labels on many disks at once. To learn more about labels, read the Labeling Resources documentation. + # + # @overload bulk_set_labels(request, options = nil) + # Pass arguments to `bulk_set_labels` via a request object, either of type + # {::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest, ::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 bulk_set_labels(bulk_zone_set_labels_request_resource: nil, project: nil, request_id: nil, resource: nil, zone: nil) + # Pass arguments to `bulk_set_labels` 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 bulk_zone_set_labels_request_resource [::Google::Cloud::Compute::V1::BulkZoneSetLabelsRequest, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + # @param resource [::String] + # Name or id of the resource for this request. + # @param zone [::String] + # The name of the zone for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Disks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest.new + # + # # Call the bulk_set_labels method. + # result = client.bulk_set_labels request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def bulk_set_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest + + # 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.bulk_set_labels.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::Compute::V1::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.bulk_set_labels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_set_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @disks_stub.bulk_set_labels request, options do |result, response| + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project. # @@ -2068,6 +2166,11 @@ class Rpcs # attr_reader :bulk_insert ## + # RPC-specific configuration for `bulk_set_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_set_labels + ## # RPC-specific configuration for `create_snapshot` # @return [::Gapic::Config::Method] # @@ -2151,6 +2254,8 @@ def initialize parent_rpcs = nil @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config bulk_insert_config = parent_rpcs.bulk_insert if parent_rpcs.respond_to? :bulk_insert @bulk_insert = ::Gapic::Config::Method.new bulk_insert_config + bulk_set_labels_config = parent_rpcs.bulk_set_labels if parent_rpcs.respond_to? :bulk_set_labels + @bulk_set_labels = ::Gapic::Config::Method.new bulk_set_labels_config create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/disks/rest/service_stub.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/disks/rest/service_stub.rb index be142d2932e5..3af51b4e6927 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/disks/rest/service_stub.rb @@ -193,6 +193,46 @@ def bulk_insert request_pb, options = nil end end + ## + # Baseline implementation for the bulk_set_labels REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def bulk_set_labels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_set_labels_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: "bulk_set_labels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # Baseline implementation for the create_snapshot REST call # @@ -861,6 +901,29 @@ def self.transcode_bulk_insert_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the bulk_set_labels REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_set_labels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/bulkSetLabels", + body: "bulk_zone_set_labels_request_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["zone", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb index 8f9e7e73a57e..1ea34f27611f 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb @@ -285,9 +285,9 @@ def delete request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param operation [::String] - # Name of the Operations resource to return, or its unique numeric identifier. + # Name of the Operations resource to return. Parent is derived from this field. # @param parent_id [::String] - # Parent ID for this request. + # Parent ID for this request. Not used. Parent is derived from resource_id. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups.rb new file mode 100644 index 000000000000..448b880bcffd --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/cloud/compute/v1/version" + +require "google/cloud/compute/v1/interconnect_attachment_groups/credentials" +require "google/cloud/compute/v1/interconnect_attachment_groups/rest" + +module Google + module Cloud + module Compute + module V1 + ## + # The InterconnectAttachmentGroups API. + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/compute/v1/interconnect_attachment_groups/rest" + # client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + module InterconnectAttachmentGroups + end + end + end + end +end + +helper_path = ::File.join __dir__, "interconnect_attachment_groups", "helpers.rb" +require "google/cloud/compute/v1/interconnect_attachment_groups/helpers" if ::File.file? helper_path diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/credentials.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/credentials.rb new file mode 100644 index 000000000000..fa2f96b33626 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Compute + module V1 + module InterconnectAttachmentGroups + # Credentials for the InterconnectAttachmentGroups API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "COMPUTE_CREDENTIALS", + "COMPUTE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "COMPUTE_CREDENTIALS_JSON", + "COMPUTE_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest.rb new file mode 100644 index 000000000000..6fbdbd1baa5b --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/version" + +require "google/cloud/compute/v1/interconnect_attachment_groups/credentials" +require "google/cloud/compute/v1/interconnect_attachment_groups/rest/client" + +module Google + module Cloud + module Compute + module V1 + ## + # The InterconnectAttachmentGroups API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/compute/v1/interconnect_attachment_groups/rest" + # client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + module InterconnectAttachmentGroups + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/compute/v1/interconnect_attachment_groups/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb new file mode 100644 index 000000000000..756d61c7e1b0 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb @@ -0,0 +1,1218 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" +require "google/cloud/compute/v1/interconnect_attachment_groups/rest/service_stub" +require "google/cloud/compute/v1/global_operations/rest" + +module Google + module Cloud + module Compute + module V1 + module InterconnectAttachmentGroups + module Rest + ## + # REST client for the InterconnectAttachmentGroups service. + # + # The InterconnectAttachmentGroups API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :interconnect_attachment_groups_stub + + ## + # Configure the InterconnectAttachmentGroups Client class. + # + # See {::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InterconnectAttachmentGroups clients + # ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::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", "Compute", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.delete.timeout = 600.0 + + default_config.rpcs.get.timeout = 600.0 + default_config.rpcs.get.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_iam_policy.timeout = 600.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_operational_status.timeout = 600.0 + default_config.rpcs.get_operational_status.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.insert.timeout = 600.0 + + default_config.rpcs.list.timeout = 600.0 + default_config.rpcs.list.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.patch.timeout = 600.0 + + default_config.rpcs.set_iam_policy.timeout = 600.0 + + default_config.rpcs.test_iam_permissions.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InterconnectAttachmentGroups 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::Compute::V1::InterconnectAttachmentGroups::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 + @interconnect_attachment_groups_stub.universe_domain + end + + ## + # Create a new InterconnectAttachmentGroups REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InterconnectAttachmentGroups 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 + + @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @interconnect_attachment_groups_stub = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @interconnect_attachment_groups_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 + + ## + # Get the associated client for long-running operations via GlobalOperations. + # + # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client] + # + attr_reader :global_operations + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @interconnect_attachment_groups_stub.logger + end + + # Service calls + + ## + # Deletes the specified InterconnectAttachmentGroup in the given scope + # + # @overload delete(request, options = nil) + # Pass arguments to `delete` via a request object, either of type + # {::Google::Cloud::Compute::V1::DeleteInterconnectAttachmentGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::DeleteInterconnectAttachmentGroupRequest, ::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(interconnect_attachment_group: nil, project: nil, request_id: nil) + # Pass arguments to `delete` 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 interconnect_attachment_group [::String] + # Name of the InterconnectAttachmentGroup resource to delete. + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::DeleteInterconnectAttachmentGroupRequest.new + # + # # Call the delete method. + # result = client.delete request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def delete request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInterconnectAttachmentGroupRequest + + # 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.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::Compute::V1::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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.delete request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified InterconnectAttachmentGroup resource in the given scope. + # + # @overload get(request, options = nil) + # Pass arguments to `get` via a request object, either of type + # {::Google::Cloud::Compute::V1::GetInterconnectAttachmentGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::GetInterconnectAttachmentGroupRequest, ::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(interconnect_attachment_group: nil, project: nil) + # Pass arguments to `get` 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 interconnect_attachment_group [::String] + # Name of the InterconnectAttachmentGroup resource to return. + # @param project [::String] + # Project ID for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::InterconnectAttachmentGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetInterconnectAttachmentGroupRequest.new + # + # # Call the get method. + # result = client.get request + # + # # The returned object is of type Google::Cloud::Compute::V1::InterconnectAttachmentGroup. + # p result + # + def get request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetInterconnectAttachmentGroupRequest + + # 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.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::Compute::V1::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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.get 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 the access control policy for a resource. May be empty if no such policy or resource exists. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Cloud::Compute::V1::GetIamPolicyInterconnectAttachmentGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::GetIamPolicyInterconnectAttachmentGroupRequest, ::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_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil) + # Pass arguments to `get_iam_policy` 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 options_requested_policy_version [::Integer] + # Requested IAM Policy version. + # @param project [::String] + # Project ID for this request. + # @param resource [::String] + # Name or id of the resource for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetIamPolicyInterconnectAttachmentGroupRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Cloud::Compute::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyInterconnectAttachmentGroupRequest + + # 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_iam_policy.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::Compute::V1::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_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.get_iam_policy 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 + + ## + # Returns the InterconnectAttachmentStatuses for the specified InterconnectAttachmentGroup resource. + # + # @overload get_operational_status(request, options = nil) + # Pass arguments to `get_operational_status` via a request object, either of type + # {::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectAttachmentGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectAttachmentGroupRequest, ::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_operational_status(interconnect_attachment_group: nil, project: nil) + # Pass arguments to `get_operational_status` 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 interconnect_attachment_group [::String] + # Name of the interconnectAttachmentGroup resource to query. + # @param project [::String] + # Project ID for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsGetOperationalStatusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsGetOperationalStatusResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetOperationalStatusInterconnectAttachmentGroupRequest.new + # + # # Call the get_operational_status method. + # result = client.get_operational_status request + # + # # The returned object is of type Google::Cloud::Compute::V1::InterconnectAttachmentGroupsGetOperationalStatusResponse. + # p result + # + def get_operational_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectAttachmentGroupRequest + + # 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_operational_status.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::Compute::V1::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_operational_status.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operational_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.get_operational_status 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 + + ## + # Creates a InterconnectAttachmentGroup in the specified project in the given scope using the parameters that are included in the request. + # + # @overload insert(request, options = nil) + # Pass arguments to `insert` via a request object, either of type + # {::Google::Cloud::Compute::V1::InsertInterconnectAttachmentGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::InsertInterconnectAttachmentGroupRequest, ::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 insert(interconnect_attachment_group_resource: nil, project: nil, request_id: nil) + # Pass arguments to `insert` 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 interconnect_attachment_group_resource [::Google::Cloud::Compute::V1::InterconnectAttachmentGroup, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::InsertInterconnectAttachmentGroupRequest.new + # + # # Call the insert method. + # result = client.insert request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def insert request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertInterconnectAttachmentGroupRequest + + # 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.insert.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::Compute::V1::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.insert.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.insert request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the InterconnectAttachmentGroups for a project in the given scope. + # + # @overload list(request, options = nil) + # Pass arguments to `list` via a request object, either of type + # {::Google::Cloud::Compute::V1::ListInterconnectAttachmentGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::ListInterconnectAttachmentGroupsRequest, ::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(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil) + # Pass arguments to `list` 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 filter [::String] + # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + # @param max_results [::Integer] + # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + # @param order_by [::String] + # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + # @param page_token [::String] + # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + # @param project [::String] + # Project ID for this request. + # @param return_partial_success [::Boolean] + # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InterconnectAttachmentGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InterconnectAttachmentGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::ListInterconnectAttachmentGroupsRequest.new + # + # # Call the list method. + # result = client.list request + # + # # The returned object is of type Google::Cloud::Compute::V1::InterconnectAttachmentGroupsListResponse. + # p result + # + def list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListInterconnectAttachmentGroupsRequest + + # 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.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::Compute::V1::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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.list request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @interconnect_attachment_groups_stub, :list, "items", 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 + + ## + # Patches the specified InterconnectAttachmentGroup resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. + # + # @overload patch(request, options = nil) + # Pass arguments to `patch` via a request object, either of type + # {::Google::Cloud::Compute::V1::PatchInterconnectAttachmentGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::PatchInterconnectAttachmentGroupRequest, ::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 patch(interconnect_attachment_group: nil, interconnect_attachment_group_resource: nil, project: nil, request_id: nil, update_mask: nil) + # Pass arguments to `patch` 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 interconnect_attachment_group [::String] + # Name of the InterconnectAttachmentGroup resource to patch. + # @param interconnect_attachment_group_resource [::Google::Cloud::Compute::V1::InterconnectAttachmentGroup, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + # @param update_mask [::String] + # The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::PatchInterconnectAttachmentGroupRequest.new + # + # # Call the patch method. + # result = client.patch request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def patch request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchInterconnectAttachmentGroupRequest + + # 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.patch.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::Compute::V1::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.patch.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.patch.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.patch request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified resource. Replaces any existing policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Cloud::Compute::V1::SetIamPolicyInterconnectAttachmentGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::SetIamPolicyInterconnectAttachmentGroupRequest, ::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 set_iam_policy(global_set_policy_request_resource: nil, project: nil, resource: nil) + # Pass arguments to `set_iam_policy` 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 global_set_policy_request_resource [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param resource [::String] + # Name or id of the resource for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::SetIamPolicyInterconnectAttachmentGroupRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Cloud::Compute::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyInterconnectAttachmentGroupRequest + + # 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.set_iam_policy.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::Compute::V1::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.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.set_iam_policy 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 + + ## + # Returns permissions that a caller has on the specified resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectAttachmentGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectAttachmentGroupRequest, ::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 test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil) + # Pass arguments to `test_iam_permissions` 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 project [::String] + # Project ID for this request. + # @param resource [::String] + # Name or id of the resource for this request. + # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash] + # The body resource for this request + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::TestIamPermissionsInterconnectAttachmentGroupRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectAttachmentGroupRequest + + # 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.test_iam_permissions.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::Compute::V1::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.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_attachment_groups_stub.test_iam_permissions 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 + + ## + # Configuration class for the InterconnectAttachmentGroups REST API. + # + # This class represents the configuration for InterconnectAttachmentGroups 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::Compute::V1::InterconnectAttachmentGroups::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 + # # delete to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.delete.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.delete.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 = "compute.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 InterconnectAttachmentGroups 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 `delete` + # @return [::Gapic::Config::Method] + # + attr_reader :delete + ## + # RPC-specific configuration for `get` + # @return [::Gapic::Config::Method] + # + attr_reader :get + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_operational_status` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operational_status + ## + # RPC-specific configuration for `insert` + # @return [::Gapic::Config::Method] + # + attr_reader :insert + ## + # RPC-specific configuration for `list` + # @return [::Gapic::Config::Method] + # + attr_reader :list + ## + # RPC-specific configuration for `patch` + # @return [::Gapic::Config::Method] + # + attr_reader :patch + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete + @delete = ::Gapic::Config::Method.new delete_config + get_config = parent_rpcs.get if parent_rpcs.respond_to? :get + @get = ::Gapic::Config::Method.new get_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_operational_status_config = parent_rpcs.get_operational_status if parent_rpcs.respond_to? :get_operational_status + @get_operational_status = ::Gapic::Config::Method.new get_operational_status_config + insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert + @insert = ::Gapic::Config::Method.new insert_config + list_config = parent_rpcs.list if parent_rpcs.respond_to? :list + @list = ::Gapic::Config::Method.new list_config + patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch + @patch = ::Gapic::Config::Method.new patch_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/service_stub.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/service_stub.rb new file mode 100644 index 000000000000..f0e4dd19fe74 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/service_stub.rb @@ -0,0 +1,641 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" + +module Google + module Cloud + module Compute + module V1 + module InterconnectAttachmentGroups + module Rest + ## + # REST service stub for the InterconnectAttachmentGroups 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 delete REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::DeleteInterconnectAttachmentGroupRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def delete request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.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 REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetInterconnectAttachmentGroupRequest] + # 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::Compute::V1::InterconnectAttachmentGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroup] + # A result object deserialized from the server's reply + def get request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroup.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_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInterconnectAttachmentGroupRequest] + # 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::Compute::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_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_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Policy.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_operational_status REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectAttachmentGroupRequest] + # 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::Compute::V1::InterconnectAttachmentGroupsGetOperationalStatusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsGetOperationalStatusResponse] + # A result object deserialized from the server's reply + def get_operational_status request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_operational_status_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_operational_status", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsGetOperationalStatusResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::InsertInterconnectAttachmentGroupRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def insert request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_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: "insert", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.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 REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::ListInterconnectAttachmentGroupsRequest] + # 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::Compute::V1::InterconnectAttachmentGroupsListResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsListResponse] + # A result object deserialized from the server's reply + def list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsListResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the patch REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::PatchInterconnectAttachmentGroupRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def patch request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_patch_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: "patch", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInterconnectAttachmentGroupRequest] + # 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::Compute::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_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: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectAttachmentGroupRequest] + # 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::Compute::V1::TestPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.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 delete REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::DeleteInterconnectAttachmentGroupRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{interconnect_attachment_group}", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_attachment_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetInterconnectAttachmentGroupRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{interconnect_attachment_group}", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_attachment_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInterconnectAttachmentGroupRequest] + # 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_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{resource}/getIamPolicy", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["resource", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operational_status REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectAttachmentGroupRequest] + # 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_operational_status_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{interconnect_attachment_group}/getOperationalStatus", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_attachment_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::InsertInterconnectAttachmentGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups", + body: "interconnect_attachment_group_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::ListInterconnectAttachmentGroupsRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups", + matches: [ + ["project", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the patch REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::PatchInterconnectAttachmentGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_patch_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{interconnect_attachment_group}", + body: "interconnect_attachment_group_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_attachment_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInterconnectAttachmentGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{resource}/setIamPolicy", + body: "global_set_policy_request_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["resource", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectAttachmentGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/global/interconnectAttachmentGroups/{resource}/testIamPermissions", + body: "test_permissions_request_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["resource", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups.rb new file mode 100644 index 000000000000..51a89992bd09 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/cloud/compute/v1/version" + +require "google/cloud/compute/v1/interconnect_groups/credentials" +require "google/cloud/compute/v1/interconnect_groups/rest" + +module Google + module Cloud + module Compute + module V1 + ## + # The InterconnectGroups API. + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/compute/v1/interconnect_groups/rest" + # client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + module InterconnectGroups + end + end + end + end +end + +helper_path = ::File.join __dir__, "interconnect_groups", "helpers.rb" +require "google/cloud/compute/v1/interconnect_groups/helpers" if ::File.file? helper_path diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/credentials.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/credentials.rb new file mode 100644 index 000000000000..5a3d4bb19b4a --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Compute + module V1 + module InterconnectGroups + # Credentials for the InterconnectGroups API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "COMPUTE_CREDENTIALS", + "COMPUTE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "COMPUTE_CREDENTIALS_JSON", + "COMPUTE_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest.rb new file mode 100644 index 000000000000..d72ad971e096 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/version" + +require "google/cloud/compute/v1/interconnect_groups/credentials" +require "google/cloud/compute/v1/interconnect_groups/rest/client" + +module Google + module Cloud + module Compute + module V1 + ## + # The InterconnectGroups API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/compute/v1/interconnect_groups/rest" + # client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + module InterconnectGroups + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/compute/v1/interconnect_groups/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb new file mode 100644 index 000000000000..0d141b93ab31 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb @@ -0,0 +1,1318 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" +require "google/cloud/compute/v1/interconnect_groups/rest/service_stub" +require "google/cloud/compute/v1/global_operations/rest" + +module Google + module Cloud + module Compute + module V1 + module InterconnectGroups + module Rest + ## + # REST client for the InterconnectGroups service. + # + # The InterconnectGroups API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :interconnect_groups_stub + + ## + # Configure the InterconnectGroups Client class. + # + # See {::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InterconnectGroups clients + # ::Google::Cloud::Compute::V1::InterconnectGroups::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", "Compute", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_members.timeout = 600.0 + + default_config.rpcs.delete.timeout = 600.0 + + default_config.rpcs.get.timeout = 600.0 + default_config.rpcs.get.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_iam_policy.timeout = 600.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_operational_status.timeout = 600.0 + default_config.rpcs.get_operational_status.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.insert.timeout = 600.0 + + default_config.rpcs.list.timeout = 600.0 + default_config.rpcs.list.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.patch.timeout = 600.0 + + default_config.rpcs.set_iam_policy.timeout = 600.0 + + default_config.rpcs.test_iam_permissions.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InterconnectGroups 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::Compute::V1::InterconnectGroups::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 + @interconnect_groups_stub.universe_domain + end + + ## + # Create a new InterconnectGroups REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InterconnectGroups 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 + + @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @interconnect_groups_stub = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @interconnect_groups_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 + + ## + # Get the associated client for long-running operations via GlobalOperations. + # + # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client] + # + attr_reader :global_operations + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @interconnect_groups_stub.logger + end + + # Service calls + + ## + # Create Interconnects with redundancy by creating them in a specified interconnect group. + # + # @overload create_members(request, options = nil) + # Pass arguments to `create_members` via a request object, either of type + # {::Google::Cloud::Compute::V1::CreateMembersInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::CreateMembersInterconnectGroupRequest, ::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_members(interconnect_group: nil, interconnect_groups_create_members_request_resource: nil, project: nil) + # Pass arguments to `create_members` 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 interconnect_group [::String] + # Name of the group resource to create members for. + # @param interconnect_groups_create_members_request_resource [::Google::Cloud::Compute::V1::InterconnectGroupsCreateMembersRequest, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::CreateMembersInterconnectGroupRequest.new + # + # # Call the create_members method. + # result = client.create_members request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def create_members request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CreateMembersInterconnectGroupRequest + + # 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_members.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::Compute::V1::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_members.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_members.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.create_members request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified InterconnectGroup in the given scope + # + # @overload delete(request, options = nil) + # Pass arguments to `delete` via a request object, either of type + # {::Google::Cloud::Compute::V1::DeleteInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::DeleteInterconnectGroupRequest, ::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(interconnect_group: nil, project: nil, request_id: nil) + # Pass arguments to `delete` 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 interconnect_group [::String] + # Name of the InterconnectGroup resource to delete. + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::DeleteInterconnectGroupRequest.new + # + # # Call the delete method. + # result = client.delete request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def delete request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInterconnectGroupRequest + + # 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.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::Compute::V1::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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.delete request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified InterconnectGroup resource in the given scope. + # + # @overload get(request, options = nil) + # Pass arguments to `get` via a request object, either of type + # {::Google::Cloud::Compute::V1::GetInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::GetInterconnectGroupRequest, ::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(interconnect_group: nil, project: nil) + # Pass arguments to `get` 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 interconnect_group [::String] + # Name of the InterconnectGroup resource to return. + # @param project [::String] + # Project ID for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::InterconnectGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetInterconnectGroupRequest.new + # + # # Call the get method. + # result = client.get request + # + # # The returned object is of type Google::Cloud::Compute::V1::InterconnectGroup. + # p result + # + def get request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetInterconnectGroupRequest + + # 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.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::Compute::V1::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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.get 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 the access control policy for a resource. May be empty if no such policy or resource exists. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Cloud::Compute::V1::GetIamPolicyInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::GetIamPolicyInterconnectGroupRequest, ::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_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil) + # Pass arguments to `get_iam_policy` 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 options_requested_policy_version [::Integer] + # Requested IAM Policy version. + # @param project [::String] + # Project ID for this request. + # @param resource [::String] + # Name or id of the resource for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetIamPolicyInterconnectGroupRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Cloud::Compute::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyInterconnectGroupRequest + + # 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_iam_policy.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::Compute::V1::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_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.get_iam_policy 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 + + ## + # Returns the interconnectStatuses for the specified InterconnectGroup. + # + # @overload get_operational_status(request, options = nil) + # Pass arguments to `get_operational_status` via a request object, either of type + # {::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectGroupRequest, ::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_operational_status(interconnect_group: nil, project: nil) + # Pass arguments to `get_operational_status` 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 interconnect_group [::String] + # Name of the interconnectGroup resource to query. + # @param project [::String] + # Project ID for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::InterconnectGroupsGetOperationalStatusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectGroupsGetOperationalStatusResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetOperationalStatusInterconnectGroupRequest.new + # + # # Call the get_operational_status method. + # result = client.get_operational_status request + # + # # The returned object is of type Google::Cloud::Compute::V1::InterconnectGroupsGetOperationalStatusResponse. + # p result + # + def get_operational_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectGroupRequest + + # 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_operational_status.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::Compute::V1::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_operational_status.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operational_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.get_operational_status 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 + + ## + # Creates a InterconnectGroup in the specified project in the given scope using the parameters that are included in the request. + # + # @overload insert(request, options = nil) + # Pass arguments to `insert` via a request object, either of type + # {::Google::Cloud::Compute::V1::InsertInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::InsertInterconnectGroupRequest, ::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 insert(interconnect_group_resource: nil, project: nil, request_id: nil) + # Pass arguments to `insert` 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 interconnect_group_resource [::Google::Cloud::Compute::V1::InterconnectGroup, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::InsertInterconnectGroupRequest.new + # + # # Call the insert method. + # result = client.insert request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def insert request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertInterconnectGroupRequest + + # 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.insert.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::Compute::V1::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.insert.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.insert request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the InterconnectGroups for a project in the given scope. + # + # @overload list(request, options = nil) + # Pass arguments to `list` via a request object, either of type + # {::Google::Cloud::Compute::V1::ListInterconnectGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::ListInterconnectGroupsRequest, ::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(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil) + # Pass arguments to `list` 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 filter [::String] + # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + # @param max_results [::Integer] + # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + # @param order_by [::String] + # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + # @param page_token [::String] + # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + # @param project [::String] + # Project ID for this request. + # @param return_partial_success [::Boolean] + # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InterconnectGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InterconnectGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::ListInterconnectGroupsRequest.new + # + # # Call the list method. + # result = client.list request + # + # # The returned object is of type Google::Cloud::Compute::V1::InterconnectGroupsListResponse. + # p result + # + def list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListInterconnectGroupsRequest + + # 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.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::Compute::V1::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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.list request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @interconnect_groups_stub, :list, "items", 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 + + ## + # Patches the specified InterconnectGroup resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. + # + # @overload patch(request, options = nil) + # Pass arguments to `patch` via a request object, either of type + # {::Google::Cloud::Compute::V1::PatchInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::PatchInterconnectGroupRequest, ::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 patch(interconnect_group: nil, interconnect_group_resource: nil, project: nil, request_id: nil, update_mask: nil) + # Pass arguments to `patch` 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 interconnect_group [::String] + # Name of the InterconnectGroup resource to patch. + # @param interconnect_group_resource [::Google::Cloud::Compute::V1::InterconnectGroup, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + # @param update_mask [::String] + # The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::PatchInterconnectGroupRequest.new + # + # # Call the patch method. + # result = client.patch request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def patch request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchInterconnectGroupRequest + + # 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.patch.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::Compute::V1::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.patch.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.patch.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.patch request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified resource. Replaces any existing policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Cloud::Compute::V1::SetIamPolicyInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::SetIamPolicyInterconnectGroupRequest, ::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 set_iam_policy(global_set_policy_request_resource: nil, project: nil, resource: nil) + # Pass arguments to `set_iam_policy` 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 global_set_policy_request_resource [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param resource [::String] + # Name or id of the resource for this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::SetIamPolicyInterconnectGroupRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Cloud::Compute::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyInterconnectGroupRequest + + # 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.set_iam_policy.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::Compute::V1::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.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.set_iam_policy 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 + + ## + # Returns permissions that a caller has on the specified resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectGroupRequest, ::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 test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil) + # Pass arguments to `test_iam_permissions` 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 project [::String] + # Project ID for this request. + # @param resource [::String] + # Name or id of the resource for this request. + # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash] + # The body resource for this request + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::TestIamPermissionsInterconnectGroupRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectGroupRequest + + # 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.test_iam_permissions.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::Compute::V1::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.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @interconnect_groups_stub.test_iam_permissions 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 + + ## + # Configuration class for the InterconnectGroups REST API. + # + # This class represents the configuration for InterconnectGroups 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::Compute::V1::InterconnectGroups::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_members to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_members.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_members.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 = "compute.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 InterconnectGroups 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_members` + # @return [::Gapic::Config::Method] + # + attr_reader :create_members + ## + # RPC-specific configuration for `delete` + # @return [::Gapic::Config::Method] + # + attr_reader :delete + ## + # RPC-specific configuration for `get` + # @return [::Gapic::Config::Method] + # + attr_reader :get + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_operational_status` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operational_status + ## + # RPC-specific configuration for `insert` + # @return [::Gapic::Config::Method] + # + attr_reader :insert + ## + # RPC-specific configuration for `list` + # @return [::Gapic::Config::Method] + # + attr_reader :list + ## + # RPC-specific configuration for `patch` + # @return [::Gapic::Config::Method] + # + attr_reader :patch + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_members_config = parent_rpcs.create_members if parent_rpcs.respond_to? :create_members + @create_members = ::Gapic::Config::Method.new create_members_config + delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete + @delete = ::Gapic::Config::Method.new delete_config + get_config = parent_rpcs.get if parent_rpcs.respond_to? :get + @get = ::Gapic::Config::Method.new get_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_operational_status_config = parent_rpcs.get_operational_status if parent_rpcs.respond_to? :get_operational_status + @get_operational_status = ::Gapic::Config::Method.new get_operational_status_config + insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert + @insert = ::Gapic::Config::Method.new insert_config + list_config = parent_rpcs.list if parent_rpcs.respond_to? :list + @list = ::Gapic::Config::Method.new list_config + patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch + @patch = ::Gapic::Config::Method.new patch_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest/service_stub.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest/service_stub.rb new file mode 100644 index 000000000000..d32158f2a0e0 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/interconnect_groups/rest/service_stub.rb @@ -0,0 +1,704 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" + +module Google + module Cloud + module Compute + module V1 + module InterconnectGroups + module Rest + ## + # REST service stub for the InterconnectGroups 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_members REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::CreateMembersInterconnectGroupRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def create_members request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_members_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_members", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.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 REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::DeleteInterconnectGroupRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def delete request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.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 REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetInterconnectGroupRequest] + # 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::Compute::V1::InterconnectGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectGroup] + # A result object deserialized from the server's reply + def get request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::InterconnectGroup.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_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInterconnectGroupRequest] + # 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::Compute::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_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_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Policy.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_operational_status REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectGroupRequest] + # 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::Compute::V1::InterconnectGroupsGetOperationalStatusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectGroupsGetOperationalStatusResponse] + # A result object deserialized from the server's reply + def get_operational_status request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_operational_status_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_operational_status", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::InterconnectGroupsGetOperationalStatusResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::InsertInterconnectGroupRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def insert request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_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: "insert", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.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 REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::ListInterconnectGroupsRequest] + # 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::Compute::V1::InterconnectGroupsListResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::InterconnectGroupsListResponse] + # A result object deserialized from the server's reply + def list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::InterconnectGroupsListResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the patch REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::PatchInterconnectGroupRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def patch request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_patch_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: "patch", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInterconnectGroupRequest] + # 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::Compute::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_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: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectGroupRequest] + # 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::Compute::V1::TestPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.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_members REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::CreateMembersInterconnectGroupRequest] + # 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_members_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}/createMembers", + body: "interconnect_groups_create_members_request_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::DeleteInterconnectGroupRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetInterconnectGroupRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInterconnectGroupRequest] + # 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_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups/{resource}/getIamPolicy", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["resource", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operational_status REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectGroupRequest] + # 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_operational_status_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}/getOperationalStatus", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::InsertInterconnectGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups", + body: "interconnect_group_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::ListInterconnectGroupsRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups", + matches: [ + ["project", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the patch REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::PatchInterconnectGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_patch_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups/{interconnect_group}", + body: "interconnect_group_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["interconnect_group", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInterconnectGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups/{resource}/setIamPolicy", + body: "global_set_policy_request_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["resource", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/global/interconnectGroups/{resource}/testIamPermissions", + body: "test_permissions_request_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["resource", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/licenses/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/licenses/rest/client.rb index dfeeeb9be16d..6e2411d50afa 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/licenses/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/licenses/rest/client.rb @@ -94,6 +94,8 @@ def self.configure default_config.rpcs.test_iam_permissions.timeout = 600.0 + default_config.rpcs.update.timeout = 600.0 + default_config end yield @configure if block_given? @@ -810,6 +812,101 @@ def test_iam_permissions request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Updates a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + # + # @overload update(request, options = nil) + # Pass arguments to `update` via a request object, either of type + # {::Google::Cloud::Compute::V1::UpdateLicenseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::UpdateLicenseRequest, ::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 update(license: nil, license_resource: nil, project: nil, request_id: nil, update_mask: nil) + # Pass arguments to `update` 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 license [::String] + # The license name for this request. + # @param license_resource [::Google::Cloud::Compute::V1::License, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + # @param update_mask [::String] + # update_mask indicates fields to be updated as part of this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Licenses::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::UpdateLicenseRequest.new + # + # # Call the update method. + # result = client.update request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def update request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdateLicenseRequest + + # 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.update.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::Compute::V1::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.update.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @licenses_stub.update request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the Licenses REST API. # @@ -991,6 +1088,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `update` + # @return [::Gapic::Config::Method] + # + attr_reader :update # @private def initialize parent_rpcs = nil @@ -1008,6 +1110,8 @@ def initialize parent_rpcs = nil @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + update_config = parent_rpcs.update if parent_rpcs.respond_to? :update + @update = ::Gapic::Config::Method.new update_config yield self if block_given? end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb index 844e8e2526cb..3b92fc263902 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb @@ -353,6 +353,46 @@ def test_iam_permissions request_pb, options = nil end end + ## + # Baseline implementation for the update REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::UpdateLicenseRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def update request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -507,6 +547,29 @@ def self.transcode_test_iam_permissions_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the update REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::UpdateLicenseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/compute/v1/projects/{project}/global/licenses/{license}", + body: "license_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["license", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/network_profiles/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/network_profiles/rest/client.rb index 47650b323e54..a72b87b87f41 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/network_profiles/rest/client.rb @@ -295,10 +295,10 @@ def get request, options = nil # @param return_partial_success [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Compute::V1::NetworkProfilesListResponse] + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkProfile>] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Compute::V1::NetworkProfilesListResponse] + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkProfile>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -346,7 +346,9 @@ def list request, options = nil retry_policy: @config.retry_policy @network_profiles_stub.list request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_profiles_stub, :list, "items", 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) diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/networks/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/networks/rest/client.rb index d1a78d9784fc..1f91f9a1858b 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/networks/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/networks/rest/client.rb @@ -101,6 +101,8 @@ def self.configure default_config.rpcs.remove_peering.timeout = 600.0 + default_config.rpcs.request_remove_peering.timeout = 600.0 + default_config.rpcs.switch_to_custom_mode.timeout = 600.0 default_config.rpcs.update_peering.timeout = 600.0 @@ -1033,6 +1035,99 @@ def remove_peering request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Requests to remove a peering from the specified network. Applicable only for PeeringConnection with update_strategy=CONSENSUS. + # + # @overload request_remove_peering(request, options = nil) + # Pass arguments to `request_remove_peering` via a request object, either of type + # {::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest, ::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 request_remove_peering(network: nil, networks_request_remove_peering_request_resource: nil, project: nil, request_id: nil) + # Pass arguments to `request_remove_peering` 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 network [::String] + # Name of the network resource to remove peering from. + # @param networks_request_remove_peering_request_resource [::Google::Cloud::Compute::V1::NetworksRequestRemovePeeringRequest, ::Hash] + # The body resource for this request + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Networks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest.new + # + # # Call the request_remove_peering method. + # result = client.request_remove_peering request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def request_remove_peering request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest + + # 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.request_remove_peering.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::Compute::V1::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.request_remove_peering.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.request_remove_peering.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @networks_stub.request_remove_peering request, options do |result, response| + result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: global_operations, + request_values: { + "project" => request.project + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Switches the network mode from auto subnet mode to custom subnet mode. # @@ -1409,6 +1504,11 @@ class Rpcs # attr_reader :remove_peering ## + # RPC-specific configuration for `request_remove_peering` + # @return [::Gapic::Config::Method] + # + attr_reader :request_remove_peering + ## # RPC-specific configuration for `switch_to_custom_mode` # @return [::Gapic::Config::Method] # @@ -1439,6 +1539,8 @@ def initialize parent_rpcs = nil @patch = ::Gapic::Config::Method.new patch_config remove_peering_config = parent_rpcs.remove_peering if parent_rpcs.respond_to? :remove_peering @remove_peering = ::Gapic::Config::Method.new remove_peering_config + request_remove_peering_config = parent_rpcs.request_remove_peering if parent_rpcs.respond_to? :request_remove_peering + @request_remove_peering = ::Gapic::Config::Method.new request_remove_peering_config switch_to_custom_mode_config = parent_rpcs.switch_to_custom_mode if parent_rpcs.respond_to? :switch_to_custom_mode @switch_to_custom_mode = ::Gapic::Config::Method.new switch_to_custom_mode_config update_peering_config = parent_rpcs.update_peering if parent_rpcs.respond_to? :update_peering diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/networks/rest/service_stub.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/networks/rest/service_stub.rb index 990890841e3b..b33293addd9d 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/networks/rest/service_stub.rb @@ -433,6 +433,46 @@ def remove_peering request_pb, options = nil end end + ## + # Baseline implementation for the request_remove_peering REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def request_remove_peering request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_request_remove_peering_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: "request_remove_peering", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # Baseline implementation for the switch_to_custom_mode REST call # @@ -713,6 +753,29 @@ def self.transcode_remove_peering_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the request_remove_peering REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_request_remove_peering_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/global/networks/{network}/requestRemovePeering", + body: "networks_request_remove_peering_request_resource", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["network", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb index 3a3aff63a73a..f8d0648956ef 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb @@ -214,7 +214,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload get(project: nil, reservation: nil, reservation_block: nil, zone: nil) + # @overload get(project: nil, reservation: nil, reservation_block: nil, view: nil, zone: nil) # Pass arguments to `get` 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). @@ -225,6 +225,9 @@ def logger # The name of the reservation. Name should conform to RFC1035 or be a resource ID. # @param reservation_block [::String] # The name of the reservation block. Name should conform to RFC1035 or be a resource ID. + # @param view [::String] + # View of the Block. + # Check the View enum for the list of possible values. # @param zone [::String] # Name of the zone for this request. Zone name should conform to RFC1035. # @yield [result, operation] Access the result along with the TransportOperation object diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks.rb new file mode 100644 index 000000000000..586d09f9567e --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/config" +require "gapic/config/method" + +require "google/cloud/compute/v1/version" + +require "google/cloud/compute/v1/reservation_sub_blocks/credentials" +require "google/cloud/compute/v1/reservation_sub_blocks/rest" + +module Google + module Cloud + module Compute + module V1 + ## + # The ReservationSubBlocks API. + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/compute/v1/reservation_sub_blocks/rest" + # client = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new + # + module ReservationSubBlocks + end + end + end + end +end + +helper_path = ::File.join __dir__, "reservation_sub_blocks", "helpers.rb" +require "google/cloud/compute/v1/reservation_sub_blocks/helpers" if ::File.file? helper_path diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/credentials.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/credentials.rb new file mode 100644 index 000000000000..14414908a300 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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 Compute + module V1 + module ReservationSubBlocks + # Credentials for the ReservationSubBlocks API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "COMPUTE_CREDENTIALS", + "COMPUTE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "COMPUTE_CREDENTIALS_JSON", + "COMPUTE_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest.rb new file mode 100644 index 000000000000..13a4a22b7202 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/version" + +require "google/cloud/compute/v1/reservation_sub_blocks/credentials" +require "google/cloud/compute/v1/reservation_sub_blocks/rest/client" + +module Google + module Cloud + module Compute + module V1 + ## + # The ReservationSubBlocks API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/compute/v1/reservation_sub_blocks/rest" + # client = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new + # + module ReservationSubBlocks + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/compute/v1/reservation_sub_blocks/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb new file mode 100644 index 000000000000..d21a00d99267 --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb @@ -0,0 +1,659 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" +require "google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub" +require "google/cloud/compute/v1/zone_operations/rest" + +module Google + module Cloud + module Compute + module V1 + module ReservationSubBlocks + module Rest + ## + # REST client for the ReservationSubBlocks service. + # + # The ReservationSubBlocks API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :reservation_sub_blocks_stub + + ## + # Configure the ReservationSubBlocks Client class. + # + # See {::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReservationSubBlocks clients + # ::Google::Cloud::Compute::V1::ReservationSubBlocks::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", "Compute", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get.timeout = 600.0 + default_config.rpcs.get.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list.timeout = 600.0 + default_config.rpcs.list.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.perform_maintenance.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReservationSubBlocks 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::Compute::V1::ReservationSubBlocks::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 + @reservation_sub_blocks_stub.universe_domain + end + + ## + # Create a new ReservationSubBlocks REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReservationSubBlocks 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 + + @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @reservation_sub_blocks_stub = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @reservation_sub_blocks_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 + + ## + # Get the associated client for long-running operations via ZoneOperations. + # + # @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client] + # + attr_reader :zone_operations + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reservation_sub_blocks_stub.logger + end + + # Service calls + + ## + # Retrieves information about the specified reservation subBlock. + # + # @overload get(request, options = nil) + # Pass arguments to `get` via a request object, either of type + # {::Google::Cloud::Compute::V1::GetReservationSubBlockRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::GetReservationSubBlockRequest, ::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(parent_name: nil, project: nil, reservation_sub_block: nil, zone: nil) + # Pass arguments to `get` 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_name [::String] + # The name of the parent reservation and parent block. In the format of reservations/\\{reservation_name}/reservationBlocks/\\{reservation_block_name} + # @param project [::String] + # Project ID for this request. + # @param reservation_sub_block [::String] + # The name of the reservation subBlock. Name should conform to RFC1035 or be a resource ID. + # @param zone [::String] + # Name of the zone for this request. Zone name should conform to RFC1035. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Compute::V1::ReservationSubBlocksGetResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::ReservationSubBlocksGetResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetReservationSubBlockRequest.new + # + # # Call the get method. + # result = client.get request + # + # # The returned object is of type Google::Cloud::Compute::V1::ReservationSubBlocksGetResponse. + # p result + # + def get request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetReservationSubBlockRequest + + # 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.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::Compute::V1::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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_sub_blocks_stub.get 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 + + ## + # Retrieves a list of reservation subBlocks under a single reservation. + # + # @overload list(request, options = nil) + # Pass arguments to `list` via a request object, either of type + # {::Google::Cloud::Compute::V1::ListReservationSubBlocksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::ListReservationSubBlocksRequest, ::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(filter: nil, max_results: nil, order_by: nil, page_token: nil, parent_name: nil, project: nil, return_partial_success: nil, zone: nil) + # Pass arguments to `list` 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 filter [::String] + # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + # @param max_results [::Integer] + # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + # @param order_by [::String] + # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + # @param page_token [::String] + # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + # @param parent_name [::String] + # The name of the parent reservation and parent block. In the format of reservations/\\{reservation_name}/reservationBlocks/\\{reservation_block_name} + # @param project [::String] + # Project ID for this request. + # @param return_partial_success [::Boolean] + # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + # @param zone [::String] + # Name of the zone for this request. Zone name should conform to RFC1035. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ReservationSubBlock>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ReservationSubBlock>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::ListReservationSubBlocksRequest.new + # + # # Call the list method. + # result = client.list request + # + # # The returned object is of type Google::Cloud::Compute::V1::ReservationSubBlocksListResponse. + # p result + # + def list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListReservationSubBlocksRequest + + # 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.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::Compute::V1::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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_sub_blocks_stub.list request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_sub_blocks_stub, :list, "items", 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 + + ## + # Allows customers to perform maintenance on a reservation subBlock + # + # @overload perform_maintenance(request, options = nil) + # Pass arguments to `perform_maintenance` via a request object, either of type + # {::Google::Cloud::Compute::V1::PerformMaintenanceReservationSubBlockRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Compute::V1::PerformMaintenanceReservationSubBlockRequest, ::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 perform_maintenance(parent_name: nil, project: nil, request_id: nil, reservation_sub_block: nil, zone: nil) + # Pass arguments to `perform_maintenance` 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_name [::String] + # The name of the parent reservation and parent block. In the format of reservations/\\{reservation_name}/reservationBlocks/\\{reservation_block_name} + # @param project [::String] + # Project ID for this request. + # @param request_id [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + # @param reservation_sub_block [::String] + # The name of the reservation subBlock. Name should conform to RFC1035 or be a resource ID. + # @param zone [::String] + # Name of the zone for this request. Zone name should conform to RFC1035. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::GenericLRO::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::GenericLRO::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::PerformMaintenanceReservationSubBlockRequest.new + # + # # Call the perform_maintenance method. + # result = client.perform_maintenance request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # + def perform_maintenance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PerformMaintenanceReservationSubBlockRequest + + # 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.perform_maintenance.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::Compute::V1::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.perform_maintenance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.perform_maintenance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_sub_blocks_stub.perform_maintenance request, options do |result, response| + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) + yield result, response if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ReservationSubBlocks REST API. + # + # This class represents the configuration for ReservationSubBlocks 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::Compute::V1::ReservationSubBlocks::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 + # # get to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get.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 = "compute.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 ReservationSubBlocks 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 `get` + # @return [::Gapic::Config::Method] + # + attr_reader :get + ## + # RPC-specific configuration for `list` + # @return [::Gapic::Config::Method] + # + attr_reader :list + ## + # RPC-specific configuration for `perform_maintenance` + # @return [::Gapic::Config::Method] + # + attr_reader :perform_maintenance + + # @private + def initialize parent_rpcs = nil + get_config = parent_rpcs.get if parent_rpcs.respond_to? :get + @get = ::Gapic::Config::Method.new get_config + list_config = parent_rpcs.list if parent_rpcs.respond_to? :list + @list = ::Gapic::Config::Method.new list_config + perform_maintenance_config = parent_rpcs.perform_maintenance if parent_rpcs.respond_to? :perform_maintenance + @perform_maintenance = ::Gapic::Config::Method.new perform_maintenance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb new file mode 100644 index 000000000000..7e2cfc640b8e --- /dev/null +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb @@ -0,0 +1,272 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" + +module Google + module Cloud + module Compute + module V1 + module ReservationSubBlocks + module Rest + ## + # REST service stub for the ReservationSubBlocks 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 get REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetReservationSubBlockRequest] + # 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::Compute::V1::ReservationSubBlocksGetResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::ReservationSubBlocksGetResponse] + # A result object deserialized from the server's reply + def get request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::ReservationSubBlocksGetResponse.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 REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::ListReservationSubBlocksRequest] + # 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::Compute::V1::ReservationSubBlocksListResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::ReservationSubBlocksListResponse] + # A result object deserialized from the server's reply + def list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::ReservationSubBlocksListResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the perform_maintenance REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::PerformMaintenanceReservationSubBlockRequest] + # 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::Compute::V1::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Compute::V1::Operation] + # A result object deserialized from the server's reply + def perform_maintenance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_perform_maintenance_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: "perform_maintenance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Compute::V1::Operation.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 get REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::GetReservationSubBlockRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/zones/{zone}/{parent_name}/reservationSubBlocks/{reservation_sub_block}", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["zone", %r{^[^/]+/?$}, false], + ["parent_name", %r{^[^/]+/?$}, false], + ["reservation_sub_block", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::ListReservationSubBlocksRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/compute/v1/projects/{project}/zones/{zone}/{parent_name}/reservationSubBlocks", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["zone", %r{^[^/]+/?$}, false], + ["parent_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the perform_maintenance REST call + # + # @param request_pb [::Google::Cloud::Compute::V1::PerformMaintenanceReservationSubBlockRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_perform_maintenance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/compute/v1/projects/{project}/zones/{zone}/{parent_name}/reservationSubBlocks/{reservation_sub_block}/performMaintenance", + matches: [ + ["project", %r{^[^/]+/?$}, false], + ["zone", %r{^[^/]+/?$}, false], + ["parent_name", %r{^[^/]+/?$}, false], + ["reservation_sub_block", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/rest.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/rest.rb index 24707d157da4..0d5ed070c62b 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/rest.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/rest.rb @@ -43,7 +43,9 @@ require "google/cloud/compute/v1/instance_templates/rest" require "google/cloud/compute/v1/instances/rest" require "google/cloud/compute/v1/instant_snapshots/rest" +require "google/cloud/compute/v1/interconnect_attachment_groups/rest" require "google/cloud/compute/v1/interconnect_attachments/rest" +require "google/cloud/compute/v1/interconnect_groups/rest" require "google/cloud/compute/v1/interconnect_locations/rest" require "google/cloud/compute/v1/interconnect_remote_locations/rest" require "google/cloud/compute/v1/interconnects/rest" @@ -90,6 +92,7 @@ require "google/cloud/compute/v1/region_zones/rest" require "google/cloud/compute/v1/regions/rest" require "google/cloud/compute/v1/reservation_blocks/rest" +require "google/cloud/compute/v1/reservation_sub_blocks/rest" require "google/cloud/compute/v1/reservations/rest" require "google/cloud/compute/v1/resource_policies/rest" require "google/cloud/compute/v1/routers/rest" diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/routers/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/routers/rest/client.rb index 80ec96291060..4b76bd1aa920 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/routers/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/routers/rest/client.rb @@ -1195,10 +1195,10 @@ def list request, options = nil # @param router [::String] # Name or id of the resource for this request. Name should conform to RFC1035. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Compute::V1::RoutersListBgpRoutes] + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::BgpRoute>] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Compute::V1::RoutersListBgpRoutes] + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::BgpRoute>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -1246,7 +1246,9 @@ def list_bgp_routes request, options = nil retry_policy: @config.retry_policy @routers_stub.list_bgp_routes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @routers_stub, :list_bgp_routes, "result", 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) @@ -1287,10 +1289,10 @@ def list_bgp_routes request, options = nil # @param router [::String] # Name or id of the resource for this request. Name should conform to RFC1035. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Compute::V1::RoutersListRoutePolicies] + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::RoutePolicy>] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Compute::V1::RoutersListRoutePolicies] + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::RoutePolicy>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -1338,7 +1340,9 @@ def list_route_policies request, options = nil retry_policy: @config.retry_policy @routers_stub.list_route_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @routers_stub, :list_route_policies, "result", 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) diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/storage_pools/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/storage_pools/rest/client.rb index be0d7f1dd674..804151d3ddbc 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/storage_pools/rest/client.rb @@ -705,10 +705,10 @@ def insert request, options = nil # @param zone [::String] # The name of the zone for this request. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Compute::V1::StoragePoolList] + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::StoragePool>] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Compute::V1::StoragePoolList] + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::StoragePool>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -756,7 +756,9 @@ def list request, options = nil retry_policy: @config.retry_policy @storage_pools_stub.list request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @storage_pools_stub, :list, "items", 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) @@ -797,10 +799,10 @@ def list request, options = nil # @param zone [::String] # The name of the zone for this request. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Compute::V1::StoragePoolListDisks] + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::StoragePoolDisk>] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Compute::V1::StoragePoolListDisks] + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::StoragePoolDisk>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -848,7 +850,9 @@ def list_disks request, options = nil retry_policy: @config.retry_policy @storage_pools_stub.list_disks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @storage_pools_stub, :list_disks, "items", 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) diff --git a/google-cloud-compute-v1/lib/google/cloud/compute/v1/subnetworks/rest/client.rb b/google-cloud-compute-v1/lib/google/cloud/compute/v1/subnetworks/rest/client.rb index a843813a38aa..57516bec23e3 100644 --- a/google-cloud-compute-v1/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +++ b/google-cloud-compute-v1/lib/google/cloud/compute/v1/subnetworks/rest/client.rb @@ -877,7 +877,7 @@ def list request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_usable(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil) + # @overload list_usable(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project: nil) # Pass arguments to `list_usable` 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). @@ -894,6 +894,8 @@ def list request, options = nil # Project ID for this request. # @param return_partial_success [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + # @param service_project [::String] + # The project id or project number in which the subnetwork is intended to be used. Only applied for Shared VPC. See [Shared VPC documentation](https://cloud.google.com/vpc/docs/shared-vpc/) # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::UsableSubnetwork>] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-compute-v1/proto_docs/google/cloud/compute/v1/compute.rb b/google-cloud-compute-v1/proto_docs/google/cloud/compute/v1/compute.rb index aa1364752677..fce17494a531 100644 --- a/google-cloud-compute-v1/proto_docs/google/cloud/compute/v1/compute.rb +++ b/google-cloud-compute-v1/proto_docs/google/cloud/compute/v1/compute.rb @@ -2445,6 +2445,9 @@ module ServiceShareType end # [Output Only] Contains output only fields. + # @!attribute [rw] health_info + # @return [::Google::Cloud::Compute::V1::AllocationResourceStatusHealthInfo] + # [Output only] Health information for the reservation. # @!attribute [rw] reservation_block_count # @return [::Integer] # The number of reservation blocks associated with this reservation. @@ -2459,6 +2462,37 @@ class AllocationResourceStatus extend ::Google::Protobuf::MessageExts::ClassMethods end + # Health information for the reservation. + # @!attribute [rw] degraded_block_count + # @return [::Integer] + # The number of reservation blocks that are degraded. + # @!attribute [rw] health_status + # @return [::String] + # The health status of the reservation. + # Check the HealthStatus enum for the list of possible values. + # @!attribute [rw] healthy_block_count + # @return [::Integer] + # The number of reservation blocks that are healthy. + class AllocationResourceStatusHealthInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The health status of the reservation. + module HealthStatus + # A value indicating that the enum field is not set. + UNDEFINED_HEALTH_STATUS = 0 + + # The reservation is degraded. + DEGRADED = 396_890_926 + + # The reservation is healthy. + HEALTHY = 439_801_213 + + # The health status of the reservation is unspecified. + HEALTH_STATUS_UNSPECIFIED = 482_246_925 + end + end + # Contains Properties set for the reservation. # @!attribute [rw] source_instance_template_id # @return [::String] @@ -3497,9 +3531,16 @@ module Preference # @!attribute [rw] kind # @return [::String] # Type of the resource. + # @!attribute [rw] load_balancing_scheme + # @return [::String] + # The value can only be INTERNAL_MANAGED for cross-region internal layer 7 load balancer. If loadBalancingScheme is not specified, the backend bucket can be used by classic global external load balancers, or global application external load balancers, or both. + # Check the LoadBalancingScheme enum for the list of possible values. # @!attribute [rw] name # @return [::String] # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + # @!attribute [rw] params + # @return [::Google::Cloud::Compute::V1::BackendBucketParams] + # Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. # @!attribute [rw] self_link # @return [::String] # [Output Only] Server-defined URL for the resource. @@ -3521,6 +3562,15 @@ module CompressionMode # Disables compression. Existing compressed responses cached by Cloud CDN will not be served to clients. DISABLED = 516_696_700 end + + # The value can only be INTERNAL_MANAGED for cross-region internal layer 7 load balancer. If loadBalancingScheme is not specified, the backend bucket can be used by classic global external load balancers, or global application external load balancers, or both. + module LoadBalancingScheme + # A value indicating that the enum field is not set. + UNDEFINED_LOAD_BALANCING_SCHEME = 0 + + # Signifies that this will be used for internal Application Load Balancers. + INTERNAL_MANAGED = 37_350_397 + end end # Message containing Cloud CDN configuration for a backend bucket. @@ -3640,6 +3690,24 @@ class BackendBucketList extend ::Google::Protobuf::MessageExts::ClassMethods end + # Additional Backend Bucket parameters. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * \\{"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} * \\{"123/environment" : "production", "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is not supported. For instance: \\{"123/environment" : "tagValues/444"} is invalid. + class BackendBucketParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # @!attribute [rw] reference # @return [::String] # [Output Only] Server-defined URL for UrlMaps referencing that BackendBucket. @@ -3657,7 +3725,7 @@ class BackendBucketUsedBy # Optional parameter to define a target utilization for the Custom Metrics balancing mode. The valid range is [0.0, 1.0]. # @!attribute [rw] name # @return [::String] - # Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED. + # Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED. class BackendCustomMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -3687,7 +3755,7 @@ class BackendCustomMetric # Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for external passthrough Network Load Balancers and internal passthrough Network Load Balancers. connectionTrackingPolicy cannot be specified with haPolicy. # @!attribute [rw] consistent_hash # @return [::Google::Cloud::Compute::V1::ConsistentHashLoadBalancerSettings] - # Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. + # Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. # @!attribute [rw] creation_timestamp # @return [::String] # [Output Only] Creation timestamp in RFC3339 text format. @@ -3750,7 +3818,7 @@ class BackendCustomMetric # A list of locality load-balancing policies to be used in order of preference. When you use localityLbPolicies, you must set at least one value for either the localityLbPolicies[].policy or the localityLbPolicies[].customPolicy field. localityLbPolicies overrides any value set in the localityLbPolicy field. For an example of how to use this field, see Define a list of preferred policies. Caution: This field and its children are intended for use in a service mesh that includes gRPC clients only. Envoy proxies can't use backend services that have this configuration. # @!attribute [rw] locality_lb_policy # @return [::String] - # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy. + # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy. # Check the LocalityLbPolicy enum for the list of possible values. # @!attribute [rw] log_config # @return [::Google::Cloud::Compute::V1::BackendServiceLogConfig] @@ -3766,10 +3834,13 @@ class BackendCustomMetric # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. # @!attribute [rw] network # @return [::String] - # The URL of the network to which this backend service belongs. This field must be set for Internal Passthrough Network Load Balancers when the haPolicy is enabled, and for External Passthrough Network Load Balancers when the haPolicy fastIpMove is enabled. This field can only be specified when the load balancing scheme is set to INTERNAL. + # The URL of the network to which this backend service belongs. This field must be set for Internal Passthrough Network Load Balancers when the haPolicy is enabled, and for External Passthrough Network Load Balancers when the haPolicy fastIpMove is enabled. This field can only be specified when the load balancing scheme is set to INTERNAL, or when the load balancing scheme is set to EXTERNAL and haPolicy fastIpMove is enabled. # @!attribute [rw] outlier_detection # @return [::Google::Cloud::Compute::V1::OutlierDetection] - # Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be: - VM instances in an Instance Group - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud Functions Services - Private Service Connect NEGs, that resolve to Google-managed regional API endpoints or managed services published using Private Service Connect Applicable backend service types can be: - A global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A regional backend service with the serviceProtocol set to HTTP, HTTPS, or HTTP2, and loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for Serverless NEGs. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. + # Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be: - VM instances in an Instance Group - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud Functions Services - Private Service Connect NEGs, that resolve to Google-managed regional API endpoints or managed services published using Private Service Connect Applicable backend service types can be: - A global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A regional backend service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for Serverless NEGs. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. + # @!attribute [rw] params + # @return [::Google::Cloud::Compute::V1::BackendServiceParams] + # Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. # @!attribute [rw] port # @return [::Integer] # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For internal passthrough Network Load Balancers and external passthrough Network Load Balancers, omit port. @@ -3778,7 +3849,7 @@ class BackendCustomMetric # A named port on a backend instance group representing the port for communication to the backend VMs in that group. The named port must be [defined on each backend instance group](https://cloud.google.com/load-balancing/docs/backend-service#named_ports). This parameter has no meaning if the backends are NEGs. For internal passthrough Network Load Balancers and external passthrough Network Load Balancers, omit port_name. # @!attribute [rw] protocol # @return [::String] - # The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy. + # The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy. # Check the Protocol enum for the list of possible values. # @!attribute [rw] region # @return [::String] @@ -3811,6 +3882,9 @@ class BackendCustomMetric # @!attribute [rw] timeout_sec # @return [::Integer] # The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration. + # @!attribute [rw] tls_settings + # @return [::Google::Cloud::Compute::V1::BackendServiceTlsSettings] + # Configuration for Backend Authenticated TLS and mTLS. May only be specified when the backend protocol is SSL, HTTPS or HTTP2. # @!attribute [rw] used_by # @return [::Array<::Google::Cloud::Compute::V1::BackendServiceUsedBy>] # [Output Only] List of resources referencing given backend service. @@ -3892,7 +3966,7 @@ module LoadBalancingScheme INVALID_LOAD_BALANCING_SCHEME = 275_352_060 end - # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy. + # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy. module LocalityLbPolicy # A value indicating that the enum field is not set. UNDEFINED_LOCALITY_LB_POLICY = 0 @@ -3920,11 +3994,11 @@ module LocalityLbPolicy # Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weighted based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This option is only supported in Network Load Balancing. WEIGHTED_MAGLEV = 254_930_962 - # Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field X-Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the backends[].customMetrics fields. + # Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics fields. WEIGHTED_ROUND_ROBIN = 5_584_977 end - # The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy. + # The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy. module Protocol # A value indicating that the enum field is not set. UNDEFINED_PROTOCOL = 0 @@ -3932,6 +4006,9 @@ module Protocol # gRPC (available for Traffic Director). GRPC = 2_196_510 + # HTTP2 over cleartext + H2C = 70_809 + HTTP = 2_228_360 # HTTP/2 with SSL. @@ -4153,7 +4230,7 @@ module TrackingMode # If true, the metric data is not used for load balancing. # @!attribute [rw] name # @return [::String] - # Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED. + # Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED. class BackendServiceCustomMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -4199,13 +4276,16 @@ class AnnotationsEntry # @!attribute [rw] fast_i_p_move # @return [::String] - # Specifies whether fast IP move is enabled, and if so, the mechanism to achieve it. Supported values are: - DISABLED: Fast IP Move is disabled. You can only use the haPolicy.leader API to update the leader. - >GARP_RA: Provides a method to very quickly define a new network endpoint as the leader. This method is faster than updating the leader using the haPolicy.leader API. Fast IP move works as follows: The VM hosting the network endpoint that should become the new leader sends either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router Advertisement(RA) packet (IPv6). Google Cloud immediately but temporarily associates the forwarding rule IP address with that VM, and both new and in-flight packets are quickly delivered to that VM. Note the important properties of the Fast IP Move functionality: - The GARP/RA-initiated re-routing stays active for approximately 20 minutes. After triggering fast failover, you must also appropriately set the haPolicy.leader. - The new leader instance should continue to send GARP/RA packets periodically every 10 seconds until at least 10 minutes after updating the haPolicy.leader (but stop immediately if it is no longer the leader). - After triggering a fast failover, we recommend that you wait at least 3 seconds before sending another GARP/RA packet from a different VM instance to avoid race conditions. - Don't send GARP/RA packets from different VM instances at the same time. If multiple instances continue to send GARP/RA packets, traffic might be routed to different destinations in an alternating order. This condition ceases when a single instance issues a GARP/RA packet. - The GARP/RA request always takes priority over the leader API. Using the haPolicy.leader API to change the leader to a different instance will have no effect until the GARP/RA request becomes inactive. - The GARP/RA packets should follow the GARP/RA Packet Specifications.. - When multiple forwarding rules refer to a regional backend service, you need only send a GARP or RA packet for a single forwarding rule virtual IP. The virtual IPs for all forwarding rules targeting the same backend service will also be moved to the sender of the GARP or RA packet. The following are the Fast IP Move limitations (that is, when fastIPMove is not DISABLED): - Multiple forwarding rules cannot use the same IP address if one of them refers to a regional backend service with fastIPMove. - The regional backend service must set the network field, and all NEGs must belong to that network. However, individual NEGs can belong to different subnetworks of that network. - The maximum number of network endpoints across all backends of a backend service with fastIPMove is 64. - The maximum number of backend services with fastIPMove that can have the same network endpoint attached to one of its backends is 64. - The maximum number of backend services with fastIPMove in a VPC in a region is 64. - The network endpoints that are attached to a backend of a backend service with fastIPMove cannot resolve to Gen3+ machines for IPv6. - Traffic directed to the leader by a static route next hop will not be redirected to a new leader by fast failover. Such traffic will only be redirected once an haPolicy.leader update has taken effect. Only traffic to the forwarding rule's virtual IP will be redirected to a new leader by fast failover. haPolicy.fastIPMove can be set only at backend service creation time. Once set, it cannot be updated. By default, fastIpMove is set to DISABLED. + # Specifies whether fast IP move is enabled, and if so, the mechanism to achieve it. Supported values are: - DISABLED: Fast IP Move is disabled. You can only use the haPolicy.leader API to update the leader. - >GARP_RA: Provides a method to very quickly define a new network endpoint as the leader. This method is faster than updating the leader using the haPolicy.leader API. Fast IP move works as follows: The VM hosting the network endpoint that should become the new leader sends either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router Advertisement(RA) packet (IPv6). Google Cloud immediately but temporarily associates the forwarding rule IP address with that VM, and both new and in-flight packets are quickly delivered to that VM. Note the important properties of the Fast IP Move functionality: - The GARP/RA-initiated re-routing stays active for approximately 20 minutes. After triggering fast failover, you must also appropriately set the haPolicy.leader. - The new leader instance should continue to send GARP/RA packets periodically every 10 seconds until at least 10 minutes after updating the haPolicy.leader (but stop immediately if it is no longer the leader). - After triggering a fast failover, we recommend that you wait at least 3 seconds before sending another GARP/RA packet from a different VM instance to avoid race conditions. - Don't send GARP/RA packets from different VM instances at the same time. If multiple instances continue to send GARP/RA packets, traffic might be routed to different destinations in an alternating order. This condition ceases when a single instance issues a GARP/RA packet. - The GARP/RA request always takes priority over the leader API. Using the haPolicy.leader API to change the leader to a different instance will have no effect until the GARP/RA request becomes inactive. - The GARP/RA packets should follow the GARP/RA Packet Specifications.. - When multiple forwarding rules refer to a regional backend service, you need only send a GARP or RA packet for a single forwarding rule virtual IP. The virtual IPs for all forwarding rules targeting the same backend service will also be moved to the sender of the GARP or RA packet. The following are the Fast IP Move limitations (that is, when fastIPMove is not DISABLED): - Multiple forwarding rules cannot use the same IP address if one of them refers to a regional backend service with fastIPMove. - The regional backend service must set the network field, and all NEGs must belong to that network. However, individual NEGs can belong to different subnetworks of that network. - The maximum number of network endpoints across all backends of a backend service with fastIPMove is 32. - The maximum number of backend services with fastIPMove that can have the same network endpoint attached to one of its backends is 64. - The maximum number of backend services with fastIPMove in a VPC in a region is 64. - The network endpoints that are attached to a backend of a backend service with fastIPMove cannot resolve to Gen3+ machines for IPv6. - Traffic directed to the leader by a static route next hop will not be redirected to a new leader by fast failover. Such traffic will only be redirected once an haPolicy.leader update has taken effect. Only traffic to the forwarding rule's virtual IP will be redirected to a new leader by fast failover. haPolicy.fastIPMove can be set only at backend service creation time. Once set, it cannot be updated. By default, fastIpMove is set to DISABLED. # Check the FastIPMove enum for the list of possible values. + # @!attribute [rw] leader + # @return [::Google::Cloud::Compute::V1::BackendServiceHAPolicyLeader] + # Selects one of the network endpoints attached to the backend NEGs of this service as the active endpoint (the leader) that receives all traffic. When the leader changes, there is no connection draining to persist existing connections on the old leader. You are responsible for selecting a suitable endpoint as the leader. For example, preferring a healthy endpoint over unhealthy ones. Note that this service does not track backend endpoint health, and selects the configured leader unconditionally. class BackendServiceHAPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # Specifies whether fast IP move is enabled, and if so, the mechanism to achieve it. Supported values are: - DISABLED: Fast IP Move is disabled. You can only use the haPolicy.leader API to update the leader. - >GARP_RA: Provides a method to very quickly define a new network endpoint as the leader. This method is faster than updating the leader using the haPolicy.leader API. Fast IP move works as follows: The VM hosting the network endpoint that should become the new leader sends either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router Advertisement(RA) packet (IPv6). Google Cloud immediately but temporarily associates the forwarding rule IP address with that VM, and both new and in-flight packets are quickly delivered to that VM. Note the important properties of the Fast IP Move functionality: - The GARP/RA-initiated re-routing stays active for approximately 20 minutes. After triggering fast failover, you must also appropriately set the haPolicy.leader. - The new leader instance should continue to send GARP/RA packets periodically every 10 seconds until at least 10 minutes after updating the haPolicy.leader (but stop immediately if it is no longer the leader). - After triggering a fast failover, we recommend that you wait at least 3 seconds before sending another GARP/RA packet from a different VM instance to avoid race conditions. - Don't send GARP/RA packets from different VM instances at the same time. If multiple instances continue to send GARP/RA packets, traffic might be routed to different destinations in an alternating order. This condition ceases when a single instance issues a GARP/RA packet. - The GARP/RA request always takes priority over the leader API. Using the haPolicy.leader API to change the leader to a different instance will have no effect until the GARP/RA request becomes inactive. - The GARP/RA packets should follow the GARP/RA Packet Specifications.. - When multiple forwarding rules refer to a regional backend service, you need only send a GARP or RA packet for a single forwarding rule virtual IP. The virtual IPs for all forwarding rules targeting the same backend service will also be moved to the sender of the GARP or RA packet. The following are the Fast IP Move limitations (that is, when fastIPMove is not DISABLED): - Multiple forwarding rules cannot use the same IP address if one of them refers to a regional backend service with fastIPMove. - The regional backend service must set the network field, and all NEGs must belong to that network. However, individual NEGs can belong to different subnetworks of that network. - The maximum number of network endpoints across all backends of a backend service with fastIPMove is 64. - The maximum number of backend services with fastIPMove that can have the same network endpoint attached to one of its backends is 64. - The maximum number of backend services with fastIPMove in a VPC in a region is 64. - The network endpoints that are attached to a backend of a backend service with fastIPMove cannot resolve to Gen3+ machines for IPv6. - Traffic directed to the leader by a static route next hop will not be redirected to a new leader by fast failover. Such traffic will only be redirected once an haPolicy.leader update has taken effect. Only traffic to the forwarding rule's virtual IP will be redirected to a new leader by fast failover. haPolicy.fastIPMove can be set only at backend service creation time. Once set, it cannot be updated. By default, fastIpMove is set to DISABLED. + # Specifies whether fast IP move is enabled, and if so, the mechanism to achieve it. Supported values are: - DISABLED: Fast IP Move is disabled. You can only use the haPolicy.leader API to update the leader. - >GARP_RA: Provides a method to very quickly define a new network endpoint as the leader. This method is faster than updating the leader using the haPolicy.leader API. Fast IP move works as follows: The VM hosting the network endpoint that should become the new leader sends either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router Advertisement(RA) packet (IPv6). Google Cloud immediately but temporarily associates the forwarding rule IP address with that VM, and both new and in-flight packets are quickly delivered to that VM. Note the important properties of the Fast IP Move functionality: - The GARP/RA-initiated re-routing stays active for approximately 20 minutes. After triggering fast failover, you must also appropriately set the haPolicy.leader. - The new leader instance should continue to send GARP/RA packets periodically every 10 seconds until at least 10 minutes after updating the haPolicy.leader (but stop immediately if it is no longer the leader). - After triggering a fast failover, we recommend that you wait at least 3 seconds before sending another GARP/RA packet from a different VM instance to avoid race conditions. - Don't send GARP/RA packets from different VM instances at the same time. If multiple instances continue to send GARP/RA packets, traffic might be routed to different destinations in an alternating order. This condition ceases when a single instance issues a GARP/RA packet. - The GARP/RA request always takes priority over the leader API. Using the haPolicy.leader API to change the leader to a different instance will have no effect until the GARP/RA request becomes inactive. - The GARP/RA packets should follow the GARP/RA Packet Specifications.. - When multiple forwarding rules refer to a regional backend service, you need only send a GARP or RA packet for a single forwarding rule virtual IP. The virtual IPs for all forwarding rules targeting the same backend service will also be moved to the sender of the GARP or RA packet. The following are the Fast IP Move limitations (that is, when fastIPMove is not DISABLED): - Multiple forwarding rules cannot use the same IP address if one of them refers to a regional backend service with fastIPMove. - The regional backend service must set the network field, and all NEGs must belong to that network. However, individual NEGs can belong to different subnetworks of that network. - The maximum number of network endpoints across all backends of a backend service with fastIPMove is 32. - The maximum number of backend services with fastIPMove that can have the same network endpoint attached to one of its backends is 64. - The maximum number of backend services with fastIPMove in a VPC in a region is 64. - The network endpoints that are attached to a backend of a backend service with fastIPMove cannot resolve to Gen3+ machines for IPv6. - Traffic directed to the leader by a static route next hop will not be redirected to a new leader by fast failover. Such traffic will only be redirected once an haPolicy.leader update has taken effect. Only traffic to the forwarding rule's virtual IP will be redirected to a new leader by fast failover. haPolicy.fastIPMove can be set only at backend service creation time. Once set, it cannot be updated. By default, fastIpMove is set to DISABLED. module FastIPMove # A value indicating that the enum field is not set. UNDEFINED_FAST_I_P_MOVE = 0 @@ -4216,6 +4296,25 @@ module FastIPMove end end + # @!attribute [rw] backend_group + # @return [::String] + # A fully-qualified URL (starting with https://www.googleapis.com/) of the zonal Network Endpoint Group (NEG) with `GCE_VM_IP` endpoints that the leader is attached to. The leader's backendGroup must already be specified as a backend of this backend service. Removing a backend that is designated as the leader's backendGroup is not permitted. + # @!attribute [rw] network_endpoint + # @return [::Google::Cloud::Compute::V1::BackendServiceHAPolicyLeaderNetworkEndpoint] + # The network endpoint within the leader.backendGroup that is designated as the leader. This network endpoint cannot be detached from the NEG specified in the haPolicy.leader.backendGroup until the leader is updated with another network endpoint, or the leader is removed from the haPolicy. + class BackendServiceHAPolicyLeader + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] instance + # @return [::String] + # The name of the VM instance of the leader network endpoint. The instance must already be attached to the NEG specified in the haPolicy.leader.backendGroup. The name must be 1-63 characters long, and comply with RFC1035. Authorization requires the following IAM permission on the specified resource instance: compute.instances.use + class BackendServiceHAPolicyLeaderNetworkEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The HTTP cookie used for stateful session affinity. # @!attribute [rw] name # @return [::String] @@ -4356,7 +4455,7 @@ module Name # Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weighted based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This option is only supported in Network Load Balancing. WEIGHTED_MAGLEV = 254_930_962 - # Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field X-Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the backends[].customMetrics fields. + # Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics fields. WEIGHTED_ROUND_ROBIN = 5_584_977 end end @@ -4395,6 +4494,24 @@ module OptionalMode end end + # Additional Backend Service parameters. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * \\{"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} * \\{"123/environment" : "production", "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is not supported. For instance: \\{"123/environment" : "tagValues/444"} is invalid. + class BackendServiceParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # @!attribute [rw] backend_service # @return [::String] class BackendServiceReference @@ -4402,6 +4519,32 @@ class BackendServiceReference extend ::Google::Protobuf::MessageExts::ClassMethods end + # @!attribute [rw] authentication_config + # @return [::String] + # Reference to the BackendAuthenticationConfig resource from the networksecurity.googleapis.com namespace. Can be used in authenticating TLS connections to the backend, as specified by the authenticationMode field. Can only be specified if authenticationMode is not NONE. + # @!attribute [rw] sni + # @return [::String] + # Server Name Indication - see RFC3546 section 3.1. If set, the load balancer sends this string as the SNI hostname in the TLS connection to the backend, and requires that this string match a Subject Alternative Name (SAN) in the backend's server certificate. With a Regional Internet NEG backend, if the SNI is specified here, the load balancer uses it regardless of whether the Regional Internet NEG is specified with FQDN or IP address and port. When both sni and subjectAltNames[] are specified, the load balancer matches the backend certificate's SAN only to subjectAltNames[]. + # @!attribute [rw] subject_alt_names + # @return [::Array<::Google::Cloud::Compute::V1::BackendServiceTlsSettingsSubjectAltName>] + # A list of Subject Alternative Names (SANs) that the Load Balancer verifies during a TLS handshake with the backend. When the server presents its X.509 certificate to the Load Balancer, the Load Balancer inspects the certificate's SAN field, and requires that at least one SAN match one of the subjectAltNames in the list. This field is limited to 5 entries. When both sni and subjectAltNames[] are specified, the load balancer matches the backend certificate's SAN only to subjectAltNames[]. + class BackendServiceTlsSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Subject Alternative Name that the load balancer matches against the SAN field in the TLS certificate provided by the backend, specified as either a DNS name or a URI, in accordance with RFC 5280 4.2.1.6 + # @!attribute [rw] dns_name + # @return [::String] + # The SAN specified as a DNS Name. + # @!attribute [rw] uniform_resource_identifier + # @return [::String] + # The SAN specified as a URI. + class BackendServiceTlsSettingsSubjectAltName + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] reference # @return [::String] # [Output Only] Server-defined URL for resources referencing given BackendService like UrlMaps, TargetTcpProxies, TargetSslProxies and ForwardingRule. @@ -4879,6 +5022,54 @@ class BulkInsertRegionInstanceRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for Disks.BulkSetLabels. See the method description for details. + # @!attribute [rw] bulk_zone_set_labels_request_resource + # @return [::Google::Cloud::Compute::V1::BulkZoneSetLabelsRequest] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + # @!attribute [rw] resource + # @return [::String] + # Name or id of the resource for this request. + # @!attribute [rw] zone + # @return [::String] + # The name of the zone for this request. + class BulkSetLabelsDiskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] label_fingerprint + # @return [::String] + # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You may optionally provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels to set for this resource. + class BulkSetLabelsRequest + 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 + + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Compute::V1::BulkSetLabelsRequest>] + class BulkZoneSetLabelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] cache_tags # @return [::Array<::String>] # A list of cache tags used to identify cached objects. - Cache tags are specified when the response is first cached, by setting the `Cache-Tag` response header at the origin. - Multiple cache tags in the same invalidation request are treated as Boolean `OR` - for example, `tag1 OR tag2 OR tag3`. - If other fields are also specified, these are treated as Boolean `AND` with any tags. Up to 10 tags can be specified in a single invalidation request. @@ -5158,12 +5349,16 @@ module Type COMPUTE_OPTIMIZED_H3 = 428_004_939 + COMPUTE_OPTIMIZED_H4D = 383_251_320 + GENERAL_PURPOSE = 299_793_543 GENERAL_PURPOSE_C4 = 301_911_817 GENERAL_PURPOSE_C4A = 232_460_888 + GENERAL_PURPOSE_C4D = 232_460_891 + GENERAL_PURPOSE_E2 = 301_911_877 GENERAL_PURPOSE_N2 = 301_912_156 @@ -5182,6 +5377,8 @@ module Type MEMORY_OPTIMIZED_M4 = 276_301_373 + MEMORY_OPTIMIZED_M4_6TB = 210_543_650 + MEMORY_OPTIMIZED_X4_16TB = 183_089_120 MEMORY_OPTIMIZED_X4_24TB = 183_116_989 @@ -5416,6 +5613,21 @@ class CreateInstancesRegionInstanceGroupManagerRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectGroups.CreateMembers. See the method description for details. + # @!attribute [rw] interconnect_group + # @return [::String] + # Name of the group resource to create members for. + # @!attribute [rw] interconnect_groups_create_members_request_resource + # @return [::Google::Cloud::Compute::V1::InterconnectGroupsCreateMembersRequest] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + class CreateMembersInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for Disks.CreateSnapshot. See the method description for details. # @!attribute [rw] disk # @return [::String] @@ -5974,6 +6186,21 @@ class DeleteInstantSnapshotRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.Delete. See the method description for details. + # @!attribute [rw] interconnect_attachment_group + # @return [::String] + # Name of the InterconnectAttachmentGroup resource to delete. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + class DeleteInterconnectAttachmentGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for InterconnectAttachments.Delete. See the method description for details. # @!attribute [rw] interconnect_attachment # @return [::String] @@ -5992,6 +6219,21 @@ class DeleteInterconnectAttachmentRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectGroups.Delete. See the method description for details. + # @!attribute [rw] interconnect_group + # @return [::String] + # Name of the InterconnectGroup resource to delete. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + class DeleteInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for Interconnects.Delete. See the method description for details. # @!attribute [rw] interconnect # @return [::String] @@ -8235,6 +8477,9 @@ module FileType # @!attribute [rw] network # @return [::String] # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default + # @!attribute [rw] params + # @return [::Google::Cloud::Compute::V1::FirewallParams] + # Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. # @!attribute [rw] priority # @return [::Integer] # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. @@ -8320,6 +8565,24 @@ module Metadata end end + # Additional firewall parameters. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * \\{"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} * \\{"123/environment" : "production", "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is not supported. For instance: \\{"123/environment" : "tagValues/444"} is invalid. + class FirewallParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # @!attribute [rw] associations # @return [::Array<::Google::Cloud::Compute::V1::FirewallPolicyAssociation>] # A list of associations. @@ -8508,6 +8771,10 @@ module Direction # @!attribute [rw] dest_ip_ranges # @return [::Array<::String>] # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. + # @!attribute [rw] dest_network_type + # @return [::String] + # Network type of the traffic destination. Allowed values are: - UNSPECIFIED - INTERNET - NON_INTERNET + # Check the DestNetworkType enum for the list of possible values. # @!attribute [rw] dest_region_codes # @return [::Array<::String>] # Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000. @@ -8526,6 +8793,13 @@ module Direction # @!attribute [rw] src_ip_ranges # @return [::Array<::String>] # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. + # @!attribute [rw] src_network_type + # @return [::String] + # Network type of the traffic source. Allowed values are: - UNSPECIFIED - INTERNET - INTRA_VPC - NON_INTERNET - VPC_NETWORKS + # Check the SrcNetworkType enum for the list of possible values. + # @!attribute [rw] src_networks + # @return [::Array<::String>] + # Networks of the traffic source. It can be either a full or partial url. # @!attribute [rw] src_region_codes # @return [::Array<::String>] # Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000. @@ -8538,6 +8812,30 @@ module Direction class FirewallPolicyRuleMatcher include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # Network type of the traffic destination. Allowed values are: - UNSPECIFIED - INTERNET - NON_INTERNET + # Additional supported values which may be not listed in the enum directly due to technical reasons: + # INTERNET + # INTRA_VPC + # NON_INTERNET + # UNSPECIFIED + # VPC_NETWORKS + module DestNetworkType + # A value indicating that the enum field is not set. + UNDEFINED_DEST_NETWORK_TYPE = 0 + end + + # Network type of the traffic source. Allowed values are: - UNSPECIFIED - INTERNET - INTRA_VPC - NON_INTERNET - VPC_NETWORKS + # Additional supported values which may be not listed in the enum directly due to technical reasons: + # INTERNET + # INTRA_VPC + # NON_INTERNET + # UNSPECIFIED + # VPC_NETWORKS + module SrcNetworkType + # A value indicating that the enum field is not set. + UNDEFINED_SRC_NETWORK_TYPE = 0 + end end # @!attribute [rw] ip_protocol @@ -8617,6 +8915,13 @@ class FixedOrPercent # @!attribute [rw] description # @return [::String] # An optional description of this resource. Provide this property when you create the resource. + # @!attribute [rw] external_managed_backend_bucket_migration_state + # @return [::String] + # Specifies the canary migration state for the backend buckets attached to this forwarding rule. Possible values are PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate traffic to backend buckets attached to this forwarding rule by percentage using externalManagedBackendBucketMigrationTestingPercentage. Rolling back a migration requires the states to be set in reverse order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC at the same time. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some traffic back to EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL. + # Check the ExternalManagedBackendBucketMigrationState enum for the list of possible values. + # @!attribute [rw] external_managed_backend_bucket_migration_testing_percentage + # @return [::Float] + # Determines the fraction of requests to backend buckets that should be processed by the global external Application Load Balancer. The value of this field must be in the range [0, 100]. This value can only be set if the loadBalancingScheme in the BackendService is set to EXTERNAL (when using the classic Application Load Balancer) and the migration state is TEST_BY_PERCENTAGE. # @!attribute [rw] fingerprint # @return [::String] # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ForwardingRule. Include the fingerprint in patch request to ensure that you do not overwrite changes that were applied from another concurrent request. To see the latest fingerprint, make a get() request to retrieve a ForwardingRule. @@ -8680,6 +8985,9 @@ class FixedOrPercent # @!attribute [rw] self_link # @return [::String] # [Output Only] Server-defined URL for the resource. + # @!attribute [rw] self_link_with_id + # @return [::String] + # [Output Only] Server-defined URL for this resource with the resource id. # @!attribute [rw] service_directory_registrations # @return [::Array<::Google::Cloud::Compute::V1::ForwardingRuleServiceDirectoryRegistration>] # Service Directory resources to register this forwarding rule with. Currently, only supports a single Service Directory resource. @@ -8711,6 +9019,18 @@ class LabelsEntry extend ::Google::Protobuf::MessageExts::ClassMethods end + # Specifies the canary migration state for the backend buckets attached to this forwarding rule. Possible values are PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate traffic to backend buckets attached to this forwarding rule by percentage using externalManagedBackendBucketMigrationTestingPercentage. Rolling back a migration requires the states to be set in reverse order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC at the same time. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some traffic back to EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL. + module ExternalManagedBackendBucketMigrationState + # A value indicating that the enum field is not set. + UNDEFINED_EXTERNAL_MANAGED_BACKEND_BUCKET_MIGRATION_STATE = 0 + + PREPARE = 399_612_135 + + TEST_ALL_TRAFFIC = 79_728_882 + + TEST_BY_PERCENTAGE = 513_738_389 + end + # The IP protocol to which this rule applies. For protocol forwarding, valid options are TCP, UDP, ESP, AH, SCTP, ICMP and L3_DEFAULT. The valid IP protocols are different for different load balancing products as described in [Load balancing features](https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends). module IPProtocolEnum # A value indicating that the enum field is not set. @@ -9239,10 +9559,10 @@ class GetGlobalOperationRequest # A request message for GlobalOrganizationOperations.Get. See the method description for details. # @!attribute [rw] operation # @return [::String] - # Name of the Operations resource to return, or its unique numeric identifier. + # Name of the Operations resource to return. Parent is derived from this field. # @!attribute [rw] parent_id # @return [::String] - # Parent ID for this request. + # Parent ID for this request. Not used. Parent is derived from resource_id. class GetGlobalOrganizationOperationRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -9468,6 +9788,36 @@ class GetIamPolicyInstantSnapshotRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.GetIamPolicy. See the method description for details. + # @!attribute [rw] options_requested_policy_version + # @return [::Integer] + # Requested IAM Policy version. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] resource + # @return [::String] + # Name or id of the resource for this request. + class GetIamPolicyInterconnectAttachmentGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request message for InterconnectGroups.GetIamPolicy. See the method description for details. + # @!attribute [rw] options_requested_policy_version + # @return [::Integer] + # Requested IAM Policy version. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] resource + # @return [::String] + # Name or id of the resource for this request. + class GetIamPolicyInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for Licenses.GetIamPolicy. See the method description for details. # @!attribute [rw] options_requested_policy_version # @return [::Integer] @@ -9873,6 +10223,18 @@ class GetInstantSnapshotRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.Get. See the method description for details. + # @!attribute [rw] interconnect_attachment_group + # @return [::String] + # Name of the InterconnectAttachmentGroup resource to return. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + class GetInterconnectAttachmentGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for InterconnectAttachments.Get. See the method description for details. # @!attribute [rw] interconnect_attachment # @return [::String] @@ -9888,6 +10250,18 @@ class GetInterconnectAttachmentRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectGroups.Get. See the method description for details. + # @!attribute [rw] interconnect_group + # @return [::String] + # Name of the InterconnectGroup resource to return. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + class GetInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for InterconnectLocations.Get. See the method description for details. # @!attribute [rw] interconnect_location # @return [::String] @@ -10164,6 +10538,30 @@ class GetNodeTypeRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.GetOperationalStatus. See the method description for details. + # @!attribute [rw] interconnect_attachment_group + # @return [::String] + # Name of the interconnectAttachmentGroup resource to query. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + class GetOperationalStatusInterconnectAttachmentGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request message for InterconnectGroups.GetOperationalStatus. See the method description for details. + # @!attribute [rw] interconnect_group + # @return [::String] + # Name of the interconnectGroup resource to query. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + class GetOperationalStatusInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for PacketMirrorings.Get. See the method description for details. # @!attribute [rw] packet_mirroring # @return [::String] @@ -10582,12 +10980,31 @@ class GetRegionUrlMapRequest # @!attribute [rw] reservation_block # @return [::String] # The name of the reservation block. Name should conform to RFC1035 or be a resource ID. + # @!attribute [rw] view + # @return [::String] + # View of the Block. + # Check the View enum for the list of possible values. # @!attribute [rw] zone # @return [::String] # Name of the zone for this request. Zone name should conform to RFC1035. class GetReservationBlockRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # View of the Block. + module View + # A value indicating that the enum field is not set. + UNDEFINED_VIEW = 0 + + # This view includes basic information about the reservation block + BASIC = 62_970_894 + + # The default / unset value. The API will default to the BASIC view. + BLOCK_VIEW_UNSPECIFIED = 275_070_479 + + # Includes detailed topology view. + FULL = 2_169_487 + end end # A request message for Reservations.Get. See the method description for details. @@ -10605,6 +11022,24 @@ class GetReservationRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for ReservationSubBlocks.Get. See the method description for details. + # @!attribute [rw] parent_name + # @return [::String] + # The name of the parent reservation and parent block. In the format of reservations/\\{reservation_name}/reservationBlocks/\\{reservation_block_name} + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] reservation_sub_block + # @return [::String] + # The name of the reservation subBlock. Name should conform to RFC1035 or be a resource ID. + # @!attribute [rw] zone + # @return [::String] + # Name of the zone for this request. Zone name should conform to RFC1035. + class GetReservationSubBlockRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for ResourcePolicies.Get. See the method description for details. # @!attribute [rw] project # @return [::String] @@ -11224,6 +11659,12 @@ class GlobalSetPolicyRequest end # Maintenance Info for ReservationBlocks. + # @!attribute [rw] instance_maintenance_ongoing_count + # @return [::Integer] + # Describes number of instances that have ongoing maintenance. + # @!attribute [rw] instance_maintenance_pending_count + # @return [::Integer] + # Describes number of instances that have pending maintenance. # @!attribute [rw] maintenance_ongoing_count # @return [::Integer] # Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have ongoing maintenance. @@ -11234,6 +11675,12 @@ class GlobalSetPolicyRequest # @return [::String] # The type of maintenance for the reservation. # Check the SchedulingType enum for the list of possible values. + # @!attribute [rw] subblock_infra_maintenance_ongoing_count + # @return [::Integer] + # Describes number of subblock Infrastructure that has ongoing maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream hardware contained in the Subblock that is necessary for a VM Family(e.g. NVLink Domains). Not all VM Families will support this field. + # @!attribute [rw] subblock_infra_maintenance_pending_count + # @return [::Integer] + # Describes number of subblock Infrastructure that has pending maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream hardware contained in the Subblock that is necessary for a VM Family (e.g. NVLink Domains). Not all VM Families will support this field. # @!attribute [rw] upcoming_group_maintenance # @return [::Google::Cloud::Compute::V1::UpcomingMaintenance] # Maintenance information on this group of VMs. @@ -11318,6 +11765,8 @@ module Type # A value indicating that the enum field is not set. UNDEFINED_TYPE = 0 + BARE_METAL_LINUX_COMPATIBLE = 354_232_740 + FEATURE_TYPE_UNSPECIFIED = 531_767_259 GVNIC = 68_209_305 @@ -11336,6 +11785,8 @@ module Type SEV_SNP_CAPABLE = 426_919 + SNP_SVSM_CAPABLE = 52_921_460 + TDX_CAPABLE = 240_446_133 UEFI_COMPATIBLE = 195_865_408 @@ -12029,7 +12480,7 @@ class HttpHeaderMatch # The value of the header to add. # @!attribute [rw] replace # @return [::Boolean] - # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. + # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is true, unless a variable is present in headerValue, in which case the default value is false. . class HttpHeaderOption include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -12771,6 +13222,21 @@ class InsertInstantSnapshotRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.Insert. See the method description for details. + # @!attribute [rw] interconnect_attachment_group_resource + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroup] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + class InsertInterconnectAttachmentGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for InterconnectAttachments.Insert. See the method description for details. # @!attribute [rw] interconnect_attachment_resource # @return [::Google::Cloud::Compute::V1::InterconnectAttachment] @@ -12792,6 +13258,21 @@ class InsertInterconnectAttachmentRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectGroups.Insert. See the method description for details. + # @!attribute [rw] interconnect_group_resource + # @return [::Google::Cloud::Compute::V1::InterconnectGroup] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + class InsertInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for Interconnects.Insert. See the method description for details. # @!attribute [rw] interconnect_resource # @return [::Google::Cloud::Compute::V1::Interconnect] @@ -13800,7 +14281,7 @@ class InsertVpnTunnelRequest # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For example: zones/us-central1-f/machineTypes/custom-4-5120 For a full list of restrictions, read the Specifications for custom machine types. # @!attribute [rw] metadata # @return [::Google::Cloud::Compute::V1::Metadata] - # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. + # The metadata key/value pairs assigned to this instance. This includes metadata keys that were explicitly defined for the instance. # @!attribute [rw] min_cpu_platform # @return [::String] # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". @@ -15953,9 +16434,15 @@ class Int64RangeMatch end # Represents an Interconnect resource. An Interconnect resource is a dedicated connection between the Google Cloud network and your on-premises network. For more information, read the Dedicated Interconnect Overview. + # @!attribute [rw] aai_enabled + # @return [::Boolean] + # Enable or disable the application awareness feature on this Cloud Interconnect. # @!attribute [rw] admin_enabled # @return [::Boolean] # Administrative status of the interconnect. When this is set to true, the Interconnect is functional and can carry traffic. When set to false, no packets can be carried over the interconnect and no BGP routes are exchanged over it. By default, the status is set to true. + # @!attribute [rw] application_aware_interconnect + # @return [::Google::Cloud::Compute::V1::InterconnectApplicationAwareInterconnect] + # Configuration information for application awareness on this Cloud Interconnect. # @!attribute [rw] available_features # @return [::Array<::String>] # [Output only] List of features available for this Interconnect connection, which can take one of the following values: - IF_MACSEC If present then the Interconnect connection is provisioned on MACsec capable hardware ports. If not present then the Interconnect connection is provisioned on non-MACsec capable ports and MACsec isn't supported and enabling MACsec fails. @@ -15987,6 +16474,9 @@ class Int64RangeMatch # @!attribute [rw] interconnect_attachments # @return [::Array<::String>] # [Output Only] A list of the URLs of all InterconnectAttachments configured to use this Interconnect. + # @!attribute [rw] interconnect_groups + # @return [::Array<::String>] + # [Output Only] URLs of InterconnectGroups that include this Interconnect. Order is arbitrary and items are unique. # @!attribute [rw] interconnect_type # @return [::String] # Type of interconnect, which can take one of the following values: - PARTNER: A partner-managed interconnection shared between customers though a partner. - DEDICATED: A dedicated physical interconnection with the customer. Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED. @@ -16131,10 +16621,80 @@ module State end end + # Configuration information for application awareness on this Cloud Interconnect. + # @!attribute [rw] bandwidth_percentage_policy + # @return [::Google::Cloud::Compute::V1::InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy] + # @!attribute [rw] profile_description + # @return [::String] + # Description for the application awareness profile on this Cloud Interconnect. + # @!attribute [rw] shape_average_percentages + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectApplicationAwareInterconnectBandwidthPercentage>] + # Optional field to specify a list of shape average percentages to be applied in conjunction with StrictPriorityPolicy or BandwidthPercentagePolicy. + # @!attribute [rw] strict_priority_policy + # @return [::Google::Cloud::Compute::V1::InterconnectApplicationAwareInterconnectStrictPriorityPolicy] + class InterconnectApplicationAwareInterconnect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specify bandwidth percentages [1-100] for various traffic classes in BandwidthPercentagePolicy. The sum of all percentages must equal 100. All traffic classes must have a percentage value specified. + # @!attribute [rw] percentage + # @return [::Integer] + # Bandwidth percentage for a specific traffic class. + # @!attribute [rw] traffic_class + # @return [::String] + # TrafficClass whose bandwidth percentage is being specified. + # Check the TrafficClass enum for the list of possible values. + class InterconnectApplicationAwareInterconnectBandwidthPercentage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # TrafficClass whose bandwidth percentage is being specified. + module TrafficClass + # A value indicating that the enum field is not set. + UNDEFINED_TRAFFIC_CLASS = 0 + + # Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx. + TC1 = 82_850 + + # Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx. + TC2 = 82_851 + + # Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx. + TC3 = 82_852 + + # Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx. + TC4 = 82_853 + + # Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx. + TC5 = 82_854 + + # Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx. + TC6 = 82_855 + end + end + + # @!attribute [rw] bandwidth_percentages + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectApplicationAwareInterconnectBandwidthPercentage>] + # Specify bandwidth percentages for various traffic classes for queuing type Bandwidth Percent. + class InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specify configuration for StrictPriorityPolicy. + class InterconnectApplicationAwareInterconnectStrictPriorityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Represents an Interconnect Attachment (VLAN) resource. You can use Interconnect attachments (VLANS) to connect your Virtual Private Cloud networks to your on-premises networks through an Interconnect. For more information, read Creating VLAN Attachments. # @!attribute [rw] admin_enabled # @return [::Boolean] # Determines whether this Attachment will carry packets. Not present for PARTNER_PROVIDER. + # @!attribute [rw] attachment_group + # @return [::String] + # [Output Only] URL of the AttachmentGroup that includes this Attachment. # @!attribute [rw] bandwidth # @return [::String] # Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: - BPS_50M: 50 Mbit/s - BPS_100M: 100 Mbit/s - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - BPS_400M: 400 Mbit/s - BPS_500M: 500 Mbit/s - BPS_1G: 1 Gbit/s - BPS_2G: 2 Gbit/s - BPS_5G: 5 Gbit/s - BPS_10G: 10 Gbit/s - BPS_20G: 20 Gbit/s - BPS_50G: 50 Gbit/s - BPS_100G: 100 Gbit/s @@ -16206,7 +16766,7 @@ module State # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. # @!attribute [rw] mtu # @return [::Integer] - # Maximum Transmission Unit (MTU), in bytes, of packets passing through this interconnect attachment. Only 1440 and 1500 are allowed. If not specified, the value will default to 1440. + # Maximum Transmission Unit (MTU), in bytes, of packets passing through this interconnect attachment. Valid values are 1440, 1460, 1500, and 8896. If not specified, the value will default to 1440. # @!attribute [rw] name # @return [::String] # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. @@ -16478,6 +17038,355 @@ class InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange extend ::Google::Protobuf::MessageExts::ClassMethods end + # An interconnect attachment group resource allows customers to create, analyze, and expand highly available deployments. + # @!attribute [rw] attachments + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::InterconnectAttachmentGroupAttachment}] + # Attachments in the AttachmentGroup. Keys are arbitrary user-specified strings. Users are encouraged, but not required, to use their preferred format for resource links as keys. Note that there are add-members and remove-members methods in gcloud. The size of this map is limited by an "Attachments per group" quota. + # @!attribute [rw] configured + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupConfigured] + # @!attribute [rw] creation_timestamp + # @return [::String] + # [Output Only] Creation timestamp in RFC3339 text format. + # @!attribute [rw] description + # @return [::String] + # An optional description of this resource. Provide this property when you create the resource. + # @!attribute [rw] etag + # @return [::String] + # Opaque system-generated token that uniquely identifies the configuration. If provided when patching a configuration in update mode, the provided token must match the current token or the update is rejected. This provides a reliable means of doing read-modify-write (optimistic locking) as described by AIP 154. + # @!attribute [rw] id + # @return [::Integer] + # [Output Only] The unique identifier for the resource type. The server generates this identifier. + # @!attribute [rw] intent + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupIntent] + # @!attribute [rw] interconnect_group + # @return [::String] + # The URL of an InterconnectGroup that groups these Attachments' Interconnects. Customers do not need to set this unless directed by Google Support. + # @!attribute [rw] kind + # @return [::String] + # [Output Only] Type of the resource. Always compute#interconnectAttachmentGroup. + # @!attribute [rw] logical_structure + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupLogicalStructure] + # @!attribute [rw] name + # @return [::String] + # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + # @!attribute [rw] self_link + # @return [::String] + # [Output Only] Server-defined URL for the resource. + class InterconnectAttachmentGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupAttachment] + class AttachmentsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An Attachment in this AttachmentGroup. + # @!attribute [rw] attachment + # @return [::String] + class InterconnectAttachmentGroupAttachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] The redundancy this group is configured to support. The way a user queries what SLA their Attachment gets is by looking at this field of the Attachment's AttachmentGroup. + # @!attribute [rw] availability_sla + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupConfiguredAvailabilitySLA] + class InterconnectAttachmentGroupConfigured + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] Which SLA this group is configured to support, and why this group does or does not meet that SLA's requirements. + # @!attribute [rw] effective_sla + # @return [::String] + # Check the EffectiveSla enum for the list of possible values. + # @!attribute [rw] intended_sla_blockers + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers>] + class InterconnectAttachmentGroupConfiguredAvailabilitySLA + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + + module EffectiveSla + # A value indicating that the enum field is not set. + UNDEFINED_EFFECTIVE_SLA = 0 + + EFFECTIVE_SLA_UNSPECIFIED = 491_000_744 + + NO_SLA = 161_460_618 + + PRODUCTION_CRITICAL = 470_416_485 + + PRODUCTION_NON_CRITICAL = 117_399_223 + end + end + + # [Output Only] Reasons why configuration.availabilitySLA.sla differs from intent.availabilitySLA. This list is empty if and only if those are the same. + # @!attribute [rw] attachments + # @return [::Array<::String>] + # [Output Only] URLs of any particular Attachments to explain this blocker in more detail. + # @!attribute [rw] blocker_type + # @return [::String] + # Check the BlockerType enum for the list of possible values. + # @!attribute [rw] documentation_link + # @return [::String] + # [Output Only] The url of Google Cloud public documentation explaining this requirement. This is set for every type of requirement. + # @!attribute [rw] explanation + # @return [::String] + # [Output Only] A human-readable explanation of this requirement and why it's not met. This is set for every type of requirement. + # @!attribute [rw] metros + # @return [::Array<::String>] + # [Output Only] Metros used to explain this blocker in more detail. These are three-letter lowercase strings like "iad". This will be set for some blockers (like NO_ATTACHMENTS_IN_METRO_AND_ZONE) but does not apply to others. + # @!attribute [rw] regions + # @return [::Array<::String>] + # [Output Only] Regions used to explain this blocker in more detail. These are region names formatted like "us-central1". This will be set for some blockers (like INCOMPATIBLE_REGIONS) but does not apply to others. + # @!attribute [rw] zones + # @return [::Array<::String>] + # [Output Only] Zones used to explain this blocker in more detail. Format is "zone1" and/or "zone2". This will be set for some blockers (like MISSING_ZONE) but does not apply to others. + class InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + + module BlockerType + # A value indicating that the enum field is not set. + UNDEFINED_BLOCKER_TYPE = 0 + + BLOCKER_TYPE_UNSPECIFIED = 429_793_623 + + INCOMPATIBLE_METROS = 290_410_432 + + INCOMPATIBLE_REGIONS = 6_195_033 + + MISSING_GLOBAL_ROUTING = 165_913_635 + + NO_ATTACHMENTS = 456_535_570 + + NO_ATTACHMENTS_IN_METRO_AND_ZONE = 51_684_135 + + OTHER = 75_532_016 + end + end + + # The user's intent for this AttachmentGroup. This is the only required field besides the name that must be specified on group creation. + # @!attribute [rw] availability_sla + # @return [::String] + # Check the AvailabilitySla enum for the list of possible values. + class InterconnectAttachmentGroupIntent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + + module AvailabilitySla + # A value indicating that the enum field is not set. + UNDEFINED_AVAILABILITY_SLA = 0 + + AVAILABILITY_SLA_UNSPECIFIED = 11_186_044 + + NO_SLA = 161_460_618 + + PRODUCTION_CRITICAL = 470_416_485 + + PRODUCTION_NON_CRITICAL = 117_399_223 + end + end + + # [Output Only] An analysis of the logical layout of Attachments in this group. Every Attachment in the group is shown once in this structure. + # @!attribute [rw] regions + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectAttachmentGroupLogicalStructureRegion>] + class InterconnectAttachmentGroupLogicalStructure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] The regions Attachments in this group are in. + # @!attribute [rw] metros + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectAttachmentGroupLogicalStructureRegionMetro>] + # @!attribute [rw] region + # @return [::String] + # [Output Only] The name of a region, like "us-central1". + class InterconnectAttachmentGroupLogicalStructureRegion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] The metros of Attachments in this group in this region. + # @!attribute [rw] facilities + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectAttachmentGroupLogicalStructureRegionMetroFacility>] + # @!attribute [rw] metro + # @return [::String] + # [Output Only] The name of the metro, as a three-letter lowercase string like "iad". This is the first component of the location of an Interconnect. + class InterconnectAttachmentGroupLogicalStructureRegionMetro + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] The facilities used for this group's Attachments' Interconnects. + # @!attribute [rw] facility + # @return [::String] + # [Output Only] The name of a facility, like "iad-1234". + # @!attribute [rw] zones + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone>] + class InterconnectAttachmentGroupLogicalStructureRegionMetroFacility + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] The zones that Attachments in this group are present in, in the given facilities. This is inherited from their Interconnects. + # @!attribute [rw] attachments + # @return [::Array<::String>] + # [Output Only] URLs of Attachments in the given zone, to the given region, on Interconnects in the given facility and metro. Every Attachment in the AG has such an entry. + # @!attribute [rw] zone + # @return [::String] + # [Output Only] The name of a zone, either "zone1" or "zone2". + class InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the InterconnectAttachmentGroupsGetOperationalStatusResponse. + # @!attribute [rw] etag + # @return [::String] + # @!attribute [rw] result + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsOperationalStatus] + class InterconnectAttachmentGroupsGetOperationalStatusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] etag + # @return [::String] + # @!attribute [rw] id + # @return [::String] + # [Output Only] Unique identifier for the resource; defined by the server. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectAttachmentGroup>] + # A list of InterconnectAttachmentGroup resources. + # @!attribute [rw] kind + # @return [::String] + # @!attribute [rw] next_page_token + # @return [::String] + # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + # @!attribute [rw] self_link + # @return [::String] + # [Output Only] Server-defined URL for this resource. + # @!attribute [rw] unreachables + # @return [::Array<::String>] + # [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + # @!attribute [rw] warning + # @return [::Google::Cloud::Compute::V1::Warning] + # [Output Only] Informational warning message. + class InterconnectAttachmentGroupsListResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] attachment_statuses + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsOperationalStatusAttachmentStatus>] + # @!attribute [rw] configured + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupConfigured] + # @!attribute [rw] group_status + # @return [::String] + # Summarizes the status of the group. + # Check the GroupStatus enum for the list of possible values. + # @!attribute [rw] intent + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupIntent] + # @!attribute [rw] operational + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroupConfigured] + # The operational state of the group, including only active Attachments. + class InterconnectAttachmentGroupsOperationalStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Summarizes the status of the group. + module GroupStatus + # A value indicating that the enum field is not set. + UNDEFINED_GROUP_STATUS = 0 + + DEGRADED = 396_890_926 + + FULLY_DOWN = 255_514_647 + + FULLY_UP = 504_176_464 + + UNSPECIFIED = 526_786_327 + end + end + + # The status of one Attachment in the group. List order is arbitrary. + # @!attribute [rw] admin_enabled + # @return [::Boolean] + # Whether this Attachment is enabled. This becomes false when the customer drains their Attachment. + # @!attribute [rw] attachment + # @return [::String] + # The URL of the Attachment being described. + # @!attribute [rw] is_active + # @return [::String] + # Whether this Attachment is participating in the redundant configuration. This will be ACTIVE if and only if the status below is CONNECTION_UP. Any INACTIVE Attachments are excluded from the analysis that generates operational.availabilitySLA. + # Check the IsActive enum for the list of possible values. + # @!attribute [rw] status + # @return [::String] + # Whether this Attachment is active, and if so, whether BGP is up. This is based on the statuses available in the Pantheon UI here: http://google3/java/com/google/cloud/boq/clientapi/gce/hybrid/api/interconnect_models.proto + # Check the Status enum for the list of possible values. + class InterconnectAttachmentGroupsOperationalStatusAttachmentStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Whether this Attachment is participating in the redundant configuration. This will be ACTIVE if and only if the status below is CONNECTION_UP. Any INACTIVE Attachments are excluded from the analysis that generates operational.availabilitySLA. + module IsActive + # A value indicating that the enum field is not set. + UNDEFINED_IS_ACTIVE = 0 + + ACTIVE = 314_733_318 + + INACTIVE = 270_421_099 + + UNSPECIFIED = 526_786_327 + end + + # Whether this Attachment is active, and if so, whether BGP is up. This is based on the statuses available in the Pantheon UI here: http://google3/java/com/google/cloud/boq/clientapi/gce/hybrid/api/interconnect_models.proto + module Status + # A value indicating that the enum field is not set. + UNDEFINED_STATUS = 0 + + ATTACHMENT_STATUS_UNKNOWN = 472_477_561 + + CONNECTION_DISABLED = 432_687_805 + + CONNECTION_DOWN = 267_552_099 + + CONNECTION_UP = 455_585_692 + + DEFUNCT = 115_891_759 + + IPSEC_CONFIGURATION_NEEDED_STATUS = 455_203_582 + + IPSEC_READY_TO_RESUME_FLOW_STATUS = 384_830_596 + + IPV4_DOWN_IPV6_UP = 277_490_992 + + IPV4_UP_IPV6_DOWN = 316_051_248 + + PARTNER_REQUEST_RECEIVED = 513_587_304 + + PENDING_CUSTOMER = 167_494_054 + + PENDING_PARTNER = 387_890_656 + + PROVISIONED = 355_751_956 + + ROUTER_CONFIGURATION_BROKEN = 150_505_108 + + UNPROVISIONED = 517_333_979 + end + end + # Response to the list request, and contains a list of interconnect attachments. # @!attribute [rw] id # @return [::String] @@ -16724,6 +17633,419 @@ class InterconnectDiagnosticsMacsecStatus extend ::Google::Protobuf::MessageExts::ClassMethods end + # An interconnect group resource allows customers to create, analyze, and expand their redundant connections. + # @!attribute [rw] configured + # @return [::Google::Cloud::Compute::V1::InterconnectGroupConfigured] + # @!attribute [rw] creation_timestamp + # @return [::String] + # [Output Only] Creation timestamp in RFC3339 text format. + # @!attribute [rw] description + # @return [::String] + # An optional description of this resource. Provide this property when you create the resource. + # @!attribute [rw] etag + # @return [::String] + # Opaque system-generated token that uniquely identifies the configuration. If provided when patching a configuration in update mode, the provided token must match the current token or the update is rejected. This provides a reliable means of doing read-modify-write (optimistic locking) as described by API 154. + # @!attribute [rw] id + # @return [::Integer] + # [Output Only] The unique identifier for the resource type. The server generates this identifier. + # @!attribute [rw] intent + # @return [::Google::Cloud::Compute::V1::InterconnectGroupIntent] + # @!attribute [rw] interconnects + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::InterconnectGroupInterconnect}] + # Interconnects in the InterconnectGroup. Keys are arbitrary user-specified strings. Users are encouraged, but not required, to use their preferred format for resource links as keys. Note that there are add-members and remove-members methods in gcloud. The size of this map is limited by an "Interconnects per group" quota. + # @!attribute [rw] kind + # @return [::String] + # [Output Only] Type of the resource. Always compute#InterconnectGroup + # @!attribute [rw] name + # @return [::String] + # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + # @!attribute [rw] physical_structure + # @return [::Google::Cloud::Compute::V1::InterconnectGroupPhysicalStructure] + # @!attribute [rw] self_link + # @return [::String] + # [Output Only] Server-defined URL for the resource. + class InterconnectGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Compute::V1::InterconnectGroupInterconnect] + class InterconnectsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # [Output Only] The status of the group as configured. This has the same structure as the operational field reported by the OperationalStatus method, but does not take into account the operational status of each resource. + # @!attribute [rw] topology_capability + # @return [::Google::Cloud::Compute::V1::InterconnectGroupConfiguredTopologyCapability] + class InterconnectGroupConfigured + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] How reliable this topology is configured to be, and why this group does or does not meet the requirements for the intended capability. + # @!attribute [rw] intended_capability_blockers + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers>] + # @!attribute [rw] supported_sla + # @return [::String] + # Check the SupportedSla enum for the list of possible values. + class InterconnectGroupConfiguredTopologyCapability + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + + module SupportedSla + # A value indicating that the enum field is not set. + UNDEFINED_SUPPORTED_SLA = 0 + + NO_SLA = 161_460_618 + + PRODUCTION_CRITICAL = 470_416_485 + + PRODUCTION_NON_CRITICAL = 117_399_223 + + UNSPECIFIED = 526_786_327 + end + end + + # [Output Only] Reasons why configuration.topologyCapability.sla differs from intent.topologyCapability. This list is empty if and only if those are the same. + # @!attribute [rw] blocker_type + # @return [::String] + # Check the BlockerType enum for the list of possible values. + # @!attribute [rw] documentation_link + # @return [::String] + # [Output Only] The url of Google Cloud public documentation explaining this requirement. This is set for every type of requirement. + # @!attribute [rw] explanation + # @return [::String] + # [Output Only] A human-readable explanation of this requirement and why it's not met. This is set for every type of requirement. + # @!attribute [rw] facilities + # @return [::Array<::String>] + # [Output Only] Facilities used to explain this blocker in more detail. Like physicalStructure.metros.facilities.facility, this is a numeric string like "5467". + # @!attribute [rw] interconnects + # @return [::Array<::String>] + # [Output Only] Interconnects used to explain this blocker in more detail. + # @!attribute [rw] metros + # @return [::Array<::String>] + # [Output Only] Metros used to explain this blocker in more detail. These are three-letter lowercase strings like "iad". A blocker like INCOMPATIBLE_METROS will specify the problematic metros in this field. + # @!attribute [rw] zones + # @return [::Array<::String>] + # [Output Only] Zones used to explain this blocker in more detail. Zone names are "zone1" and/or "zone2". + class InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + + module BlockerType + # A value indicating that the enum field is not set. + UNDEFINED_BLOCKER_TYPE = 0 + + INCOMPATIBLE_METROS = 290_410_432 + + NOT_AVAILABLE = 140_722_205 + + NO_INTERCONNECTS = 523_549_575 + + NO_INTERCONNECTS_IN_METRO_AND_ZONE = 440_966_492 + + OTHER = 75_532_016 + + UNSPECIFIED = 526_786_327 + end + end + + # The user's intent for this group. This is the only required field besides the name that must be specified on group creation. + # @!attribute [rw] topology_capability + # @return [::String] + # Check the TopologyCapability enum for the list of possible values. + class InterconnectGroupIntent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + + module TopologyCapability + # A value indicating that the enum field is not set. + UNDEFINED_TOPOLOGY_CAPABILITY = 0 + + NO_SLA = 161_460_618 + + PRODUCTION_CRITICAL = 470_416_485 + + PRODUCTION_NON_CRITICAL = 117_399_223 + + UNSPECIFIED = 526_786_327 + end + end + + # An Interconnect in this InterconnectGroup. + # @!attribute [rw] interconnect + # @return [::String] + # The URL of an Interconnect in this group. All Interconnects in the group are unique. + class InterconnectGroupInterconnect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] An analysis of the physical layout of Interconnects in this group. Every Interconnect in the group is shown once in this structure. + # @!attribute [rw] metros + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectGroupPhysicalStructureMetros>] + class InterconnectGroupPhysicalStructure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] The metros Interconnects in this group are in. + # @!attribute [rw] facilities + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectGroupPhysicalStructureMetrosFacilities>] + # @!attribute [rw] metro + # @return [::String] + # [Output Only] The name of the metro, as a three-letter lowercase string like "iad". This is the first component of the location of Interconnects underneath this. + class InterconnectGroupPhysicalStructureMetros + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] The facilities Interconnects in this metro are present in. + # @!attribute [rw] facility + # @return [::String] + # [Output Only] The ID of this facility, as a numeric string like "5467". This is the third component of the location of Interconnects in this facility. + # @!attribute [rw] zones + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectGroupPhysicalStructureMetrosFacilitiesZones>] + class InterconnectGroupPhysicalStructureMetrosFacilities + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Output Only] The zones that Interconnects in this facility are present in. + # @!attribute [rw] interconnects + # @return [::Array<::String>] + # [Output Only] URLs of Interconnects in this redundancy group in the given metro, facility, and zone. + # @!attribute [rw] zone + # @return [::String] + # [Output Only] The name of the zone, either "zone1" or "zone2". This is the second component of the location of Interconnects in this facility. + class InterconnectGroupPhysicalStructureMetrosFacilitiesZones + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] intent_mismatch_behavior + # @return [::String] + # How to behave when configured.topologyCapability.supportedSLA would not equal intent.topologyCapability after this call. + # Check the IntentMismatchBehavior enum for the list of possible values. + # @!attribute [rw] interconnects + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectGroupsCreateMembersInterconnectInput>] + # @!attribute [rw] template_interconnect + # @return [::Google::Cloud::Compute::V1::InterconnectGroupsCreateMembersInterconnectInput] + # Parameters for the Interconnects to create. + class InterconnectGroupsCreateMembers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How to behave when configured.topologyCapability.supportedSLA would not equal intent.topologyCapability after this call. + module IntentMismatchBehavior + # A value indicating that the enum field is not set. + UNDEFINED_INTENT_MISMATCH_BEHAVIOR = 0 + + CREATE = 385_389_820 + + REJECT = 266_102_687 + + UNSPECIFIED = 526_786_327 + end + end + + # LINT.IfChange + # @!attribute [rw] admin_enabled + # @return [::Boolean] + # Administrative status of the interconnect. When this is set to true, the Interconnect is functional and can carry traffic. When set to false, no packets can be carried over the interconnect and no BGP routes are exchanged over it. By default, the status is set to true. + # @!attribute [rw] customer_name + # @return [::String] + # Customer name, to put in the Letter of Authorization as the party authorized to request a crossconnect. + # @!attribute [rw] description + # @return [::String] + # An optional description of this resource. Provide this property when you create the resource. + # @!attribute [rw] facility + # @return [::String] + # A zone-free location to use for all Interconnects created in this call, like "iad-1234". + # @!attribute [rw] interconnect_type + # @return [::String] + # Type of interconnect, which can take one of the following values: - PARTNER: A partner-managed interconnection shared between customers though a partner. - DEDICATED: A dedicated physical interconnection with the customer. Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED. + # Check the InterconnectType enum for the list of possible values. + # @!attribute [rw] link_type + # @return [::String] + # Type of link requested, which can take one of the following values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. Note that this field indicates the speed of each of the links in the bundle, not the speed of the entire bundle. + # Check the LinkType enum for the list of possible values. + # @!attribute [rw] name + # @return [::String] + # Name of the Interconnects to be created. This must be specified on the template and/or on each individual interconnect. The name, if not empty, must be 1-63 characters long, and comply with RFC1035. Specifically, any nonempty name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + # @!attribute [rw] noc_contact_email + # @return [::String] + # Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Cloud Monitoring logs alerting and Cloud Notifications. This field is required for users who sign up for Cloud Interconnect using workforce identity federation. + # @!attribute [rw] remote_location + # @return [::String] + # Indicates that this is a Cross-Cloud Interconnect. This field specifies the location outside of Google's network that the interconnect is connected to. + # @!attribute [rw] requested_features + # @return [::Array<::String>] + # Optional. List of features requested for this Interconnect connection, which can take one of the following values: - IF_MACSEC If specified then the connection is created on MACsec capable hardware ports. If not specified, the default value is false, which allocates non-MACsec capable ports first if available. This parameter can be provided only with Interconnect INSERT. It isn't valid for Interconnect PATCH. + # Check the RequestedFeatures enum for the list of possible values. + # @!attribute [rw] requested_link_count + # @return [::Integer] + # Target number of physical links in the link bundle, as requested by the customer. + class InterconnectGroupsCreateMembersInterconnectInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of interconnect, which can take one of the following values: - PARTNER: A partner-managed interconnection shared between customers though a partner. - DEDICATED: A dedicated physical interconnection with the customer. Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED. + module InterconnectType + # A value indicating that the enum field is not set. + UNDEFINED_INTERCONNECT_TYPE = 0 + + # A dedicated physical interconnection with the customer. + DEDICATED = 258_411_983 + + # [Deprecated] A private, physical interconnection with the customer. + IT_PRIVATE = 335_677_007 + + # A partner-managed interconnection shared between customers via partner. + PARTNER = 461_924_520 + end + + # Type of link requested, which can take one of the following values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. Note that this field indicates the speed of each of the links in the bundle, not the speed of the entire bundle. + module LinkType + # A value indicating that the enum field is not set. + UNDEFINED_LINK_TYPE = 0 + + # 100G Ethernet, LR Optics. + LINK_TYPE_ETHERNET_100G_LR = 337_672_551 + + # 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; + LINK_TYPE_ETHERNET_10G_LR = 236_739_749 + + # 400G Ethernet, LR4 Optics. + LINK_TYPE_ETHERNET_400G_LR4 = 127_023_690 + end + + module RequestedFeatures + # A value indicating that the enum field is not set. + UNDEFINED_REQUESTED_FEATURES = 0 + + # Media Access Control security (MACsec) + IF_MACSEC = 396_279_300 + end + end + + # @!attribute [rw] request + # @return [::Google::Cloud::Compute::V1::InterconnectGroupsCreateMembers] + class InterconnectGroupsCreateMembersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the InterconnectGroupsGetOperationalStatusResponse. + # @!attribute [rw] etag + # @return [::String] + # @!attribute [rw] result + # @return [::Google::Cloud::Compute::V1::InterconnectGroupsOperationalStatus] + class InterconnectGroupsGetOperationalStatusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] etag + # @return [::String] + # @!attribute [rw] id + # @return [::String] + # [Output Only] Unique identifier for the resource; defined by the server. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectGroup>] + # A list of InterconnectGroup resources. + # @!attribute [rw] kind + # @return [::String] + # @!attribute [rw] next_page_token + # @return [::String] + # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + # @!attribute [rw] self_link + # @return [::String] + # [Output Only] Server-defined URL for this resource. + # @!attribute [rw] unreachables + # @return [::Array<::String>] + # [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + # @!attribute [rw] warning + # @return [::Google::Cloud::Compute::V1::Warning] + # [Output Only] Informational warning message. + class InterconnectGroupsListResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get the status of the interconnect group with extra detail. + # @!attribute [rw] configured + # @return [::Google::Cloud::Compute::V1::InterconnectGroupConfigured] + # The configuration analysis, as returned by Get. + # @!attribute [rw] group_status + # @return [::String] + # Summarizes the status of the group. + # Check the GroupStatus enum for the list of possible values. + # @!attribute [rw] intent + # @return [::Google::Cloud::Compute::V1::InterconnectGroupIntent] + # The intent of the resource, as returned by Get. + # @!attribute [rw] interconnect_statuses + # @return [::Array<::Google::Cloud::Compute::V1::InterconnectGroupsOperationalStatusInterconnectStatus>] + # @!attribute [rw] operational + # @return [::Google::Cloud::Compute::V1::InterconnectGroupConfigured] + # The operational state of the group, including only active Interconnects. + class InterconnectGroupsOperationalStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Summarizes the status of the group. + module GroupStatus + # A value indicating that the enum field is not set. + UNDEFINED_GROUP_STATUS = 0 + + DEGRADED = 396_890_926 + + FULLY_DOWN = 255_514_647 + + FULLY_UP = 504_176_464 + + GROUPS_STATUS_UNSPECIFIED = 261_932_693 + end + end + + # The status of one Interconnect in the group. The order is arbitrary. + # @!attribute [rw] admin_enabled + # @return [::Boolean] + # Whether the Interconnect is enabled. + # @!attribute [rw] diagnostics + # @return [::Google::Cloud::Compute::V1::InterconnectDiagnostics] + # The diagnostics of the Interconnect, as returned by the existing get-diagnostics method. + # @!attribute [rw] interconnect + # @return [::String] + # The URL of the Interconnect being described. + # @!attribute [rw] is_active + # @return [::String] + # Whether this interconnect is participating in the redundant configuration. + # Check the IsActive enum for the list of possible values. + class InterconnectGroupsOperationalStatusInterconnectStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Whether this interconnect is participating in the redundant configuration. + module IsActive + # A value indicating that the enum field is not set. + UNDEFINED_IS_ACTIVE = 0 + + ACTIVE = 314_733_318 + + INACTIVE = 270_421_099 + + IS_ACTIVE_UNSPECIFIED = 274_948_243 + end + end + # Response to the list request, and contains a list of interconnects. # @!attribute [rw] id # @return [::String] @@ -17306,6 +18628,12 @@ class Items end # Represents a License resource. A License represents billing and aggregate usage data for public and marketplace images. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + # @!attribute [rw] allowed_replacement_licenses + # @return [::Array<::String>] + # Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false. + # @!attribute [rw] appendable_to_disk + # @return [::Boolean] + # If true, this license can be appended to an existing disk's set of licenses. # @!attribute [rw] charges_use_fee # @return [::Boolean] # [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. @@ -17318,24 +18646,51 @@ class Items # @!attribute [rw] id # @return [::Integer] # [Output Only] The unique identifier for the resource. This identifier is defined by the server. + # @!attribute [rw] incompatible_licenses + # @return [::Array<::String>] + # Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image. # @!attribute [rw] kind # @return [::String] # [Output Only] Type of resource. Always compute#license for licenses. # @!attribute [rw] license_code # @return [::Integer] # [Output Only] The unique code used to attach this license to images, snapshots, and disks. + # @!attribute [rw] minimum_retention + # @return [::Google::Cloud::Compute::V1::Duration] + # If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed. + # @!attribute [rw] multi_tenant_only + # @return [::Boolean] + # If true, this license can only be used on VMs on multi tenant nodes. # @!attribute [rw] name # @return [::String] # Name of the resource. The name must be 1-63 characters long and comply with RFC1035. + # @!attribute [rw] os_license + # @return [::Boolean] + # If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time. + # @!attribute [rw] removable_from_disk + # @return [::Boolean] + # If true, this license can be removed from a disk's set of licenses, with no replacement license needed. + # @!attribute [rw] required_coattached_licenses + # @return [::Array<::String>] + # Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license. # @!attribute [rw] resource_requirements # @return [::Google::Cloud::Compute::V1::LicenseResourceRequirements] # [Input Only] Deprecated. # @!attribute [rw] self_link # @return [::String] # [Output Only] Server-defined URL for the resource. + # @!attribute [rw] self_link_with_id + # @return [::String] + # [Output Only] Server-defined URL for this resource with the resource id. + # @!attribute [rw] sole_tenant_only + # @return [::Boolean] + # If true, this license can only be used on VMs on sole tenant nodes. # @!attribute [rw] transferable # @return [::Boolean] # If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. + # @!attribute [rw] update_timestamp + # @return [::String] + # [Output Only] Last update timestamp in RFC3339 text format. class License include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -18375,6 +19730,30 @@ class ListInstantSnapshotsRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.List. See the method description for details. + # @!attribute [rw] filter + # @return [::String] + # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + # @!attribute [rw] max_results + # @return [::Integer] + # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + # @!attribute [rw] order_by + # @return [::String] + # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + # @!attribute [rw] page_token + # @return [::String] + # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + class ListInterconnectAttachmentGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for InterconnectAttachments.List. See the method description for details. # @!attribute [rw] filter # @return [::String] @@ -18402,6 +19781,30 @@ class ListInterconnectAttachmentsRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectGroups.List. See the method description for details. + # @!attribute [rw] filter + # @return [::String] + # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + # @!attribute [rw] max_results + # @return [::Integer] + # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + # @!attribute [rw] order_by + # @return [::String] + # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + # @!attribute [rw] page_token + # @return [::String] + # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + class ListInterconnectGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for InterconnectLocations.List. See the method description for details. # @!attribute [rw] filter # @return [::String] @@ -19658,12 +21061,39 @@ class ListRegionSslCertificatesRequest # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. - class ListRegionSslPoliciesRequest + class ListRegionSslPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request message for RegionTargetHttpProxies.List. See the method description for details. + # @!attribute [rw] filter + # @return [::String] + # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + # @!attribute [rw] max_results + # @return [::Integer] + # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + # @!attribute [rw] order_by + # @return [::String] + # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + # @!attribute [rw] page_token + # @return [::String] + # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] region + # @return [::String] + # Name of the region scoping this request. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + class ListRegionTargetHttpProxiesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # A request message for RegionTargetHttpProxies.List. See the method description for details. + # A request message for RegionTargetHttpsProxies.List. See the method description for details. # @!attribute [rw] filter # @return [::String] # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. @@ -19685,12 +21115,12 @@ class ListRegionSslPoliciesRequest # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. - class ListRegionTargetHttpProxiesRequest + class ListRegionTargetHttpsProxiesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # A request message for RegionTargetHttpsProxies.List. See the method description for details. + # A request message for RegionTargetTcpProxies.List. See the method description for details. # @!attribute [rw] filter # @return [::String] # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. @@ -19712,12 +21142,12 @@ class ListRegionTargetHttpProxiesRequest # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. - class ListRegionTargetHttpsProxiesRequest + class ListRegionTargetTcpProxiesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # A request message for RegionTargetTcpProxies.List. See the method description for details. + # A request message for RegionUrlMaps.List. See the method description for details. # @!attribute [rw] filter # @return [::String] # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. @@ -19739,12 +21169,12 @@ class ListRegionTargetHttpsProxiesRequest # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. - class ListRegionTargetTcpProxiesRequest + class ListRegionUrlMapsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # A request message for RegionUrlMaps.List. See the method description for details. + # A request message for RegionZones.List. See the method description for details. # @!attribute [rw] filter # @return [::String] # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. @@ -19762,16 +21192,16 @@ class ListRegionTargetTcpProxiesRequest # Project ID for this request. # @!attribute [rw] region # @return [::String] - # Name of the region scoping this request. + # Region for this request. # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. - class ListRegionUrlMapsRequest + class ListRegionZonesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # A request message for RegionZones.List. See the method description for details. + # A request message for Regions.List. See the method description for details. # @!attribute [rw] filter # @return [::String] # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. @@ -19787,18 +21217,15 @@ class ListRegionUrlMapsRequest # @!attribute [rw] project # @return [::String] # Project ID for this request. - # @!attribute [rw] region - # @return [::String] - # Region for this request. # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. - class ListRegionZonesRequest + class ListRegionsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # A request message for Regions.List. See the method description for details. + # A request message for ReservationBlocks.List. See the method description for details. # @!attribute [rw] filter # @return [::String] # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. @@ -19814,15 +21241,21 @@ class ListRegionZonesRequest # @!attribute [rw] project # @return [::String] # Project ID for this request. + # @!attribute [rw] reservation + # @return [::String] + # The name of the reservation. Name should conform to RFC1035 or be a resource ID. # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. - class ListRegionsRequest + # @!attribute [rw] zone + # @return [::String] + # Name of the zone for this request. Zone name should conform to RFC1035. + class ListReservationBlocksRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # A request message for ReservationBlocks.List. See the method description for details. + # A request message for ReservationSubBlocks.List. See the method description for details. # @!attribute [rw] filter # @return [::String] # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. @@ -19835,19 +21268,19 @@ class ListRegionsRequest # @!attribute [rw] page_token # @return [::String] # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + # @!attribute [rw] parent_name + # @return [::String] + # The name of the parent reservation and parent block. In the format of reservations/\\{reservation_name}/reservationBlocks/\\{reservation_block_name} # @!attribute [rw] project # @return [::String] # Project ID for this request. - # @!attribute [rw] reservation - # @return [::String] - # The name of the reservation. Name should conform to RFC1035 or be a resource ID. # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. # @!attribute [rw] zone # @return [::String] # Name of the zone for this request. Zone name should conform to RFC1035. - class ListReservationBlocksRequest + class ListReservationSubBlocksRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end @@ -20486,6 +21919,9 @@ class ListUsableRegionBackendServicesRequest # @!attribute [rw] return_partial_success # @return [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + # @!attribute [rw] service_project + # @return [::String] + # The project id or project number in which the subnetwork is intended to be used. Only applied for Shared VPC. See [Shared VPC documentation](https://cloud.google.com/vpc/docs/shared-vpc/) class ListUsableSubnetworksRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -20882,9 +22318,6 @@ class MachineImageList # @!attribute [rw] name # @return [::String] # [Output Only] Name of the resource. - # @!attribute [rw] scratch_disks - # @return [::Array<::Google::Cloud::Compute::V1::ScratchDisks>] - # [Output Only] A list of extended scratch disks assigned to the instance. # @!attribute [rw] self_link # @return [::String] # [Output Only] Server-defined URL for the resource. @@ -21422,6 +22855,9 @@ class NatIpInfoResponse # @!attribute [rw] network_profile # @return [::String] # A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - https://www.googleapis.com/compute/\\{api_version}/projects/\\{project_id}/global/networkProfiles/\\{network_profile_name} - projects/\\{project_id}/global/networkProfiles/\\{network_profile_name} + # @!attribute [rw] params + # @return [::Google::Cloud::Compute::V1::NetworkParams] + # Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. # @!attribute [rw] peerings # @return [::Array<::Google::Cloud::Compute::V1::NetworkPeering>] # [Output Only] A list of network peerings for the resource. @@ -22246,10 +23682,31 @@ class NetworkList extend ::Google::Protobuf::MessageExts::ClassMethods end + # Additional network parameters. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * \\{"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} * \\{"123/environment" : "production", "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is not supported. For instance: \\{"123/environment" : "tagValues/444"} is invalid. + class NetworkParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. # @!attribute [rw] auto_create_routes # @return [::Boolean] # This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. + # @!attribute [rw] connection_status + # @return [::Google::Cloud::Compute::V1::NetworkPeeringConnectionStatus] + # [Output Only] The effective state of the peering connection as a whole. # @!attribute [rw] exchange_subnet_routes # @return [::Boolean] # Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. @@ -22285,6 +23742,10 @@ class NetworkList # @!attribute [rw] state_details # @return [::String] # [Output Only] Details about the current state of the peering. + # @!attribute [rw] update_strategy + # @return [::String] + # The update strategy determines the semantics for updates and deletes to the peering connection configuration. + # Check the UpdateStrategy enum for the list of possible values. class NetworkPeering include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -22312,6 +23773,133 @@ module State # There is no matching configuration on the peer, including the case when peer does not exist. INACTIVE = 270_421_099 end + + # The update strategy determines the semantics for updates and deletes to the peering connection configuration. + module UpdateStrategy + # A value indicating that the enum field is not set. + UNDEFINED_UPDATE_STRATEGY = 0 + + # Updates are reflected in the local peering but aren't applied to the peering connection until a complementary change is made to the matching peering. To delete a peering with the consensus update strategy, both the peerings must request the deletion of the peering before the peering can be deleted. + CONSENSUS = 203_373_655 + + # In this mode, changes to the peering configuration can be unilaterally altered by changing either side of the peering. This is the default value if the field is unspecified. + INDEPENDENT = 127_011_674 + + # Peerings with update strategy UNSPECIFIED are created with update strategy INDEPENDENT. + UNSPECIFIED = 526_786_327 + end + end + + # [Output Only] Describes the state of a peering connection, not just the local peering. This field provides information about the effective settings for the connection as a whole, including pending delete/update requests for CONSENSUS peerings. + # @!attribute [rw] consensus_state + # @return [::Google::Cloud::Compute::V1::NetworkPeeringConnectionStatusConsensusState] + # The consensus state contains information about the status of update and delete for a consensus peering connection. + # @!attribute [rw] traffic_configuration + # @return [::Google::Cloud::Compute::V1::NetworkPeeringConnectionStatusTrafficConfiguration] + # The active connectivity settings for the peering connection based on the settings of the network peerings. + # @!attribute [rw] update_strategy + # @return [::String] + # The update strategy determines the update/delete semantics for this peering connection. + # Check the UpdateStrategy enum for the list of possible values. + class NetworkPeeringConnectionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The update strategy determines the update/delete semantics for this peering connection. + module UpdateStrategy + # A value indicating that the enum field is not set. + UNDEFINED_UPDATE_STRATEGY = 0 + + # Updates are reflected in the local peering but aren't applied to the peering connection until a complementary change is made to the matching peering. To delete a peering with the consensus update strategy, both the peerings must request the deletion of the peering before the peering can be deleted. + CONSENSUS = 203_373_655 + + # In this mode, changes to the peering configuration can be unilaterally altered by changing either side of the peering. This is the default value if the field is unspecified. + INDEPENDENT = 127_011_674 + + # Peerings with update strategy UNSPECIFIED are created with update strategy INDEPENDENT. + UNSPECIFIED = 526_786_327 + end + end + + # The status of update/delete for a consensus peering connection. Only set when connection_status.update_strategy is CONSENSUS or a network peering is proposing to update the strategy to CONSENSUS. + # @!attribute [rw] delete_status + # @return [::String] + # The status of the delete request. + # Check the DeleteStatus enum for the list of possible values. + # @!attribute [rw] update_status + # @return [::String] + # The status of the update request. + # Check the UpdateStatus enum for the list of possible values. + class NetworkPeeringConnectionStatusConsensusState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The status of the delete request. + module DeleteStatus + # A value indicating that the enum field is not set. + UNDEFINED_DELETE_STATUS = 0 + + # Both network admins have agreed this consensus peering connection can be deleted. + DELETE_ACKNOWLEDGED = 325_293_916 + + DELETE_STATUS_UNSPECIFIED = 395_396_446 + + # Network admin has requested deletion of this peering connection. + LOCAL_DELETE_REQUESTED = 227_335_214 + + # The peer network admin has requested deletion of this peering connection. + PEER_DELETE_REQUESTED = 197_847_799 + end + + # The status of the update request. + module UpdateStatus + # A value indicating that the enum field is not set. + UNDEFINED_UPDATE_STATUS = 0 + + # No pending configuration update proposals to the peering connection. + IN_SYNC = 2_273_653 + + # The peer network admin has made an updatePeering call. The change is awaiting acknowledgment from this peering's network admin. + PENDING_LOCAL_ACKNOWLEDMENT = 229_926_592 + + # The local network admin has made an updatePeering call. The change is awaiting acknowledgment from the peer network admin. + PENDING_PEER_ACKNOWLEDGEMENT = 420_185_797 + + UPDATE_STATUS_UNSPECIFIED = 120_836_480 + end + end + + # @!attribute [rw] export_custom_routes_to_peer + # @return [::Boolean] + # Whether custom routes are being exported to the peer network. + # @!attribute [rw] export_subnet_routes_with_public_ip_to_peer + # @return [::Boolean] + # Whether subnet routes with public IP ranges are being exported to the peer network. + # @!attribute [rw] import_custom_routes_from_peer + # @return [::Boolean] + # Whether custom routes are being imported from the peer network. + # @!attribute [rw] import_subnet_routes_with_public_ip_from_peer + # @return [::Boolean] + # Whether subnet routes with public IP ranges are being imported from the peer network. + # @!attribute [rw] stack_type + # @return [::String] + # Which IP version(s) of traffic and routes are being imported or exported between peer networks. + # Check the StackType enum for the list of possible values. + class NetworkPeeringConnectionStatusTrafficConfiguration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Which IP version(s) of traffic and routes are being imported or exported between peer networks. + module StackType + # A value indicating that the enum field is not set. + UNDEFINED_STACK_TYPE = 0 + + # This Peering will allow IPv4 traffic and routes to be exchanged. Additionally if the matching peering is IPV4_IPV6, IPv6 traffic and routes will be exchanged as well. + IPV4_IPV6 = 22_197_249 + + # This Peering will only allow IPv4 traffic and routes to be exchanged, even if the matching peering is IPV4_IPV6. + IPV4_ONLY = 22_373_798 + end end # @!attribute [rw] total_egress_bandwidth_tier @@ -23015,6 +24603,14 @@ class NetworksRemovePeeringRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # @!attribute [rw] name + # @return [::String] + # Name of the peering, which should conform to RFC1035. + class NetworksRequestRemovePeeringRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] network_peering # @return [::Google::Cloud::Compute::V1::NetworkPeering] class NetworksUpdatePeeringRequest @@ -24441,6 +26037,27 @@ class PatchInstanceSettingRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.Patch. See the method description for details. + # @!attribute [rw] interconnect_attachment_group + # @return [::String] + # Name of the InterconnectAttachmentGroup resource to patch. + # @!attribute [rw] interconnect_attachment_group_resource + # @return [::Google::Cloud::Compute::V1::InterconnectAttachmentGroup] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + # @!attribute [rw] update_mask + # @return [::String] + # The list of fields to update. + class PatchInterconnectAttachmentGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for InterconnectAttachments.Patch. See the method description for details. # @!attribute [rw] interconnect_attachment # @return [::String] @@ -24462,6 +26079,27 @@ class PatchInterconnectAttachmentRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectGroups.Patch. See the method description for details. + # @!attribute [rw] interconnect_group + # @return [::String] + # Name of the InterconnectGroup resource to patch. + # @!attribute [rw] interconnect_group_resource + # @return [::Google::Cloud::Compute::V1::InterconnectGroup] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + # @!attribute [rw] update_mask + # @return [::String] + # The list of fields to update. + class PatchInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for Interconnects.Patch. See the method description for details. # @!attribute [rw] interconnect # @return [::String] @@ -25454,6 +27092,27 @@ class PerformMaintenanceReservationRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for ReservationSubBlocks.PerformMaintenance. See the method description for details. + # @!attribute [rw] parent_name + # @return [::String] + # The name of the parent reservation and parent block. In the format of reservations/\\{reservation_name}/reservationBlocks/\\{reservation_block_name} + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + # @!attribute [rw] reservation_sub_block + # @return [::String] + # The name of the reservation subBlock. Name should conform to RFC1035 or be a resource ID. + # @!attribute [rw] zone + # @return [::String] + # Name of the zone for this request. Zone name should conform to RFC1035. + class PerformMaintenanceReservationSubBlockRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # @!attribute [rw] audit_configs # @return [::Array<::Google::Cloud::Compute::V1::AuditConfig>] @@ -26031,7 +27690,7 @@ class PublicAdvertisedPrefixPublicDelegatedPrefix # [Output Only] Server-defined URL for the resource. # @!attribute [rw] status # @return [::String] - # [Output Only] The status of the public delegated prefix, which can be one of following values: - `INITIALIZING` The public delegated prefix is being initialized and addresses cannot be created yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration prefix and is active. - `ANNOUNCED` The public delegated prefix is active. - `DELETING` The public delegated prefix is being deprovsioned. + # [Output Only] The status of the public delegated prefix, which can be one of following values: - `INITIALIZING` The public delegated prefix is being initialized and addresses cannot be created yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration prefix and is active. - `ANNOUNCED` The public delegated prefix is announced and ready to use. - `DELETING` The public delegated prefix is being deprovsioned. # Check the Status enum for the list of possible values. class PublicDelegatedPrefix include ::Google::Protobuf::MessageExts @@ -26064,12 +27723,12 @@ module Mode EXTERNAL_IPV6_SUBNETWORK_CREATION = 61_198_284 end - # [Output Only] The status of the public delegated prefix, which can be one of following values: - `INITIALIZING` The public delegated prefix is being initialized and addresses cannot be created yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration prefix and is active. - `ANNOUNCED` The public delegated prefix is active. - `DELETING` The public delegated prefix is being deprovsioned. + # [Output Only] The status of the public delegated prefix, which can be one of following values: - `INITIALIZING` The public delegated prefix is being initialized and addresses cannot be created yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration prefix and is active. - `ANNOUNCED` The public delegated prefix is announced and ready to use. - `DELETING` The public delegated prefix is being deprovsioned. module Status # A value indicating that the enum field is not set. UNDEFINED_STATUS = 0 - # The public delegated prefix is active. + # The public delegated prefix is announced and ready to use. ANNOUNCED = 365_103_355 # The prefix is announced within Google network. @@ -27735,7 +29394,28 @@ class RequestMirrorPolicy extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for Networks.RequestRemovePeering. See the method description for details. + # @!attribute [rw] network + # @return [::String] + # Name of the network resource to remove peering from. + # @!attribute [rw] networks_request_remove_peering_request_resource + # @return [::Google::Cloud::Compute::V1::NetworksRequestRemovePeeringRequest] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + class RequestRemovePeeringNetworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. + # @!attribute [rw] advanced_deployment_control + # @return [::Google::Cloud::Compute::V1::ReservationAdvancedDeploymentControl] + # Advanced control for cluster management, applicable only to DENSE deployment type reservations. # @!attribute [rw] aggregate_reservation # @return [::Google::Cloud::Compute::V1::AllocationAggregateReservation] # Reservation for aggregated resources, providing shape flexibility. @@ -27745,6 +29425,12 @@ class RequestMirrorPolicy # @!attribute [rw] creation_timestamp # @return [::String] # [Output Only] Creation timestamp in RFC3339 text format. + # @!attribute [rw] delete_after_duration + # @return [::Google::Cloud::Compute::V1::Duration] + # Duration time relative to reservation creation when Compute Engine will automatically delete this resource. + # @!attribute [rw] delete_at_time + # @return [::String] + # Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. # @!attribute [rw] deployment_type # @return [::String] # Specifies the deployment strategy for this reservation. @@ -27752,6 +29438,9 @@ class RequestMirrorPolicy # @!attribute [rw] description # @return [::String] # An optional description of this resource. Provide this property when you create the resource. + # @!attribute [rw] enable_emergent_maintenance + # @return [::Boolean] + # Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors. # @!attribute [rw] id # @return [::Integer] # [Output Only] The unique identifier for the resource. This identifier is defined by the server. @@ -27776,6 +29465,10 @@ class RequestMirrorPolicy # @!attribute [rw] satisfies_pzs # @return [::Boolean] # [Output Only] Reserved for future use. + # @!attribute [rw] scheduling_type + # @return [::String] + # The type of maintenance for the reservation. + # Check the SchedulingType enum for the list of possible values. # @!attribute [rw] self_link # @return [::String] # [Output Only] Server-defined fully-qualified URL for this resource. @@ -27819,6 +29512,21 @@ module DeploymentType DEPLOYMENT_TYPE_UNSPECIFIED = 234_847_180 end + # The type of maintenance for the reservation. + module SchedulingType + # A value indicating that the enum field is not set. + UNDEFINED_SCHEDULING_TYPE = 0 + + # Maintenance on all reserved instances in the reservation is synchronized. + GROUPED = 474_540_862 + + # Unknown maintenance type. + GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447_183_678 + + # Maintenance is not synchronized for this reservation. Instead, each instance has its own maintenance window. + INDEPENDENT = 127_011_674 + end + # [Output Only] The status of the reservation. - CREATING: Reservation resources are being allocated. - READY: Reservation resources have been allocated, and the reservation is ready for use. - DELETING: Reservation deletion is in progress. - UPDATING: Reservation update is in progress. module Status # A value indicating that the enum field is not set. @@ -27840,6 +29548,30 @@ module Status end end + # Advance control for cluster management, applicable only to DENSE deployment type reservations. + # @!attribute [rw] reservation_operational_mode + # @return [::String] + # Indicates chosen reservation operational mode for the reservation. + # Check the ReservationOperationalMode enum for the list of possible values. + class ReservationAdvancedDeploymentControl + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates chosen reservation operational mode for the reservation. + module ReservationOperationalMode + # A value indicating that the enum field is not set. + UNDEFINED_RESERVATION_OPERATIONAL_MODE = 0 + + # Google Cloud does not manage the failure of machines, but provides additional capacity, which is not guaranteed to be available. + ALL_CAPACITY = 500_029_880 + + # Google Cloud manages the failure of machines to provide high availability. + HIGHLY_AVAILABLE_CAPACITY = 110_861_600 + + RESERVATION_OPERATIONAL_MODE_UNSPECIFIED = 194_296_603 + end + end + # Specifies the reservations that this instance can consume from. # @!attribute [rw] consume_reservation_type # @return [::String] @@ -27916,6 +29648,9 @@ class ItemsEntry # @!attribute [rw] creation_timestamp # @return [::String] # [Output Only] Creation timestamp in RFC3339 text format. + # @!attribute [rw] health_info + # @return [::Google::Cloud::Compute::V1::ReservationBlockHealthInfo] + # [Output Only] Health information for the reservation block. # @!attribute [rw] id # @return [::Integer] # [Output Only] The unique identifier for the resource. This identifier is defined by the server. @@ -27934,6 +29669,12 @@ class ItemsEntry # @!attribute [rw] reservation_maintenance # @return [::Google::Cloud::Compute::V1::GroupMaintenanceInfo] # [Output Only] Maintenance information for this reservation block. + # @!attribute [rw] reservation_sub_block_count + # @return [::Integer] + # [Output Only] The number of reservation subBlocks associated with this reservation block. + # @!attribute [rw] reservation_sub_block_in_use_count + # @return [::Integer] + # [Output Only] The number of in-use reservation subBlocks associated with this reservation block. If at least one VM is running on a subBlock, it is considered in-use. # @!attribute [rw] self_link # @return [::String] # [Output Only] Server-defined fully-qualified URL for this resource. @@ -27969,17 +29710,78 @@ module Status end end + # Health information for the reservation block. + # @!attribute [rw] degraded_sub_block_count + # @return [::Integer] + # The number of subBlocks that are degraded. + # @!attribute [rw] health_status + # @return [::String] + # The health status of the reservation block. + # Check the HealthStatus enum for the list of possible values. + # @!attribute [rw] healthy_sub_block_count + # @return [::Integer] + # The number of subBlocks that are healthy. + class ReservationBlockHealthInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The health status of the reservation block. + module HealthStatus + # A value indicating that the enum field is not set. + UNDEFINED_HEALTH_STATUS = 0 + + # The reservation block is degraded. + DEGRADED = 396_890_926 + + # The reservation block is healthy. + HEALTHY = 439_801_213 + + # The health status of the reservation block is unspecified. + HEALTH_STATUS_UNSPECIFIED = 482_246_925 + end + end + # @!attribute [rw] block # @return [::String] # The hash of the capacity block within the cluster. # @!attribute [rw] cluster # @return [::String] # The cluster name of the reservation block. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::Compute::V1::ReservationBlockPhysicalTopologyInstance>] + # The detailed instances information for a given Block class ReservationBlockPhysicalTopology include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # The instances information for a given Block + # @!attribute [rw] instance_id + # @return [::Integer] + # The InstanceId of the instance + # @!attribute [rw] physical_host_topology + # @return [::Google::Cloud::Compute::V1::ReservationBlockPhysicalTopologyInstancePhysicalHostTopology] + # The PhysicalHostTopology of instances within a Block resource. + # @!attribute [rw] project_id + # @return [::Integer] + # Project where the instance lives + class ReservationBlockPhysicalTopologyInstance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The PhysicalHostTopology of the instance within a Block resource. + # @!attribute [rw] host + # @return [::String] + # Host hash for a given instance + # @!attribute [rw] sub_block + # @return [::String] + # Sub block hash for a given instance + class ReservationBlockPhysicalTopologyInstancePhysicalHostTopology + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] resource # @return [::Google::Cloud::Compute::V1::ReservationBlock] class ReservationBlocksGetResponse @@ -28034,6 +29836,151 @@ class ReservationList extend ::Google::Protobuf::MessageExts::ClassMethods end + # Represents a reservation subBlock resource. + # @!attribute [rw] count + # @return [::Integer] + # [Output Only] The number of hosts that are allocated in this reservation subBlock. + # @!attribute [rw] creation_timestamp + # @return [::String] + # [Output Only] Creation timestamp in RFC3339 text format. + # @!attribute [rw] health_info + # @return [::Google::Cloud::Compute::V1::ReservationSubBlockHealthInfo] + # [Output Only] Health information for the reservation subBlock. + # @!attribute [rw] id + # @return [::Integer] + # [Output Only] The unique identifier for the resource. This identifier is defined by the server. + # @!attribute [rw] in_use_count + # @return [::Integer] + # [Output Only] The number of instances that are currently in use on this reservation subBlock. + # @!attribute [rw] kind + # @return [::String] + # [Output Only] Type of the resource. Always compute#reservationSubBlock for reservation subBlocks. + # @!attribute [rw] name + # @return [::String] + # [Output Only] The name of this reservation subBlock generated by Google Compute Engine. The name must be 1-63 characters long, and comply with RFC1035 @pattern [a-z](?:[-a-z0-9]\\{0,61}[a-z0-9])? + # @!attribute [rw] physical_topology + # @return [::Google::Cloud::Compute::V1::ReservationSubBlockPhysicalTopology] + # [Output Only] The physical topology of the reservation subBlock. + # @!attribute [rw] reservation_sub_block_maintenance + # @return [::Google::Cloud::Compute::V1::GroupMaintenanceInfo] + # Maintenance information for this reservation subBlock. + # @!attribute [rw] self_link + # @return [::String] + # [Output Only] Server-defined fully-qualified URL for this resource. + # @!attribute [rw] self_link_with_id + # @return [::String] + # [Output Only] Server-defined URL for this resource with the resource id. + # @!attribute [rw] status + # @return [::String] + # [Output Only] Status of the reservation subBlock. + # Check the Status enum for the list of possible values. + # @!attribute [rw] zone + # @return [::String] + # [Output Only] Zone in which the reservation subBlock resides. + class ReservationSubBlock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # [Output Only] Status of the reservation subBlock. + module Status + # A value indicating that the enum field is not set. + UNDEFINED_STATUS = 0 + + # Resources are being allocated for the reservation subBlock. + CREATING = 455_564_985 + + # Reservation subBlock is currently being deleted. + DELETING = 528_602_024 + + INVALID = 530_283_991 + + # Reservation subBlock has allocated all its resources. + READY = 77_848_963 + end + end + + # Health information for the reservation subBlock. + # @!attribute [rw] degraded_host_count + # @return [::Integer] + # The number of degraded hosts in the reservation subBlock. + # @!attribute [rw] degraded_infra_count + # @return [::Integer] + # The number of degraded infrastructure (e.g NV link domain) in the reservation subblock. + # @!attribute [rw] health_status + # @return [::String] + # The health status of the reservation subBlock. + # Check the HealthStatus enum for the list of possible values. + # @!attribute [rw] healthy_host_count + # @return [::Integer] + # The number of healthy hosts in the reservation subBlock. + # @!attribute [rw] healthy_infra_count + # @return [::Integer] + # The number of healthy infrastructure (e.g NV link domain) in the reservation subblock. + class ReservationSubBlockHealthInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The health status of the reservation subBlock. + module HealthStatus + # A value indicating that the enum field is not set. + UNDEFINED_HEALTH_STATUS = 0 + + # The reservation subBlock is degraded. + DEGRADED = 396_890_926 + + # The reservation subBlock is healthy. + HEALTHY = 439_801_213 + + # The health status of the reservation subBlock is unspecified. + HEALTH_STATUS_UNSPECIFIED = 482_246_925 + end + end + + # @!attribute [rw] block + # @return [::String] + # The hash of the capacity block within the cluster. + # @!attribute [rw] cluster + # @return [::String] + # The cluster name of the reservation subBlock. + # @!attribute [rw] sub_block + # @return [::String] + # The hash of the capacity sub-block within the capacity block. + class ReservationSubBlockPhysicalTopology + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] resource + # @return [::Google::Cloud::Compute::V1::ReservationSubBlock] + class ReservationSubBlocksGetResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of reservation subBlocks under a single reservation. + # @!attribute [rw] id + # @return [::String] + # Unique identifier for the resource; defined by the server. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::Compute::V1::ReservationSubBlock>] + # A list of reservation subBlock resources. + # @!attribute [rw] kind + # @return [::String] + # Type of the resource. Always compute#reservationSubBlock for a list of reservation subBlocks. + # @!attribute [rw] next_page_token + # @return [::String] + # This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + # @!attribute [rw] self_link + # @return [::String] + # Server-defined URL for this resource. + # @!attribute [rw] warning + # @return [::Google::Cloud::Compute::V1::Warning] + # Informational warning message. + class ReservationSubBlocksListResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] maintenance_scope # @return [::String] # Specifies if all, running or unused hosts are in scope for this request. @@ -28320,6 +30267,9 @@ class ResourcePoliciesScopedList # @return [::String] # [Output Only] The status of resource policy creation. # Check the Status enum for the list of possible values. + # @!attribute [rw] workload_policy + # @return [::Google::Cloud::Compute::V1::ResourcePolicyWorkloadPolicy] + # Resource policy for defining instance placement for MIGs. class ResourcePolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -28412,6 +30362,9 @@ class ResourcePolicyDiskConsistencyGroupPolicy # @return [::String] # Specifies network collocation # Check the Collocation enum for the list of possible values. + # @!attribute [rw] gpu_topology + # @return [::String] + # Specifies the shape of the GPU slice, in slice based GPU families eg. A4X. # @!attribute [rw] vm_count # @return [::Integer] # Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs. @@ -28645,6 +30598,50 @@ module Day end end + # Represents the workload policy. + # @!attribute [rw] accelerator_topology + # @return [::String] + # Specifies the topology required to create a partition for VMs that have interconnected GPUs. + # @!attribute [rw] max_topology_distance + # @return [::String] + # Specifies the maximum distance between instances. + # Check the MaxTopologyDistance enum for the list of possible values. + # @!attribute [rw] type + # @return [::String] + # Specifies the intent of the instance placement in the MIG. + # Check the Type enum for the list of possible values. + class ResourcePolicyWorkloadPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the maximum distance between instances. + module MaxTopologyDistance + # A value indicating that the enum field is not set. + UNDEFINED_MAX_TOPOLOGY_DISTANCE = 0 + + # VMs must be provisioned in the same block. + BLOCK = 63_294_573 + + # VMs must be provisioned in the same cluster. + CLUSTER = 516_333_018 + + # VMs must be provisioned in the same subblock. + SUBBLOCK = 316_202_573 + end + + # Specifies the intent of the instance placement in the MIG. + module Type + # A value indicating that the enum field is not set. + UNDEFINED_TYPE = 0 + + # MIG spreads out the instances as much as possible for high availability. + HIGH_AVAILABILITY = 409_487_576 + + # MIG provisions instances as close to each other as possible for high throughput. + HIGH_THROUGHPUT = 146_499_815 + end + end + # Contains output only fields. Use this sub-message for actual values set on Instance attributes as compared to the value requested by the user (intent) in their instance CRUD calls. # @!attribute [rw] physical_host # @return [::String] @@ -28806,6 +30803,9 @@ class ResumeInstancesRegionInstanceGroupManagerRequest # @!attribute [rw] next_hop_vpn_tunnel # @return [::String] # The URL to a VpnTunnel that should handle matching packets. + # @!attribute [rw] params + # @return [::Google::Cloud::Compute::V1::RouteParams] + # Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. # @!attribute [rw] priority # @return [::Integer] # The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive. @@ -28925,6 +30925,24 @@ class RouteList extend ::Google::Protobuf::MessageExts::ClassMethods end + # Additional route parameters. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * \\{"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} * \\{"123/environment" : "production", "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is not supported. For instance: \\{"123/environment" : "tagValues/444"} is invalid. + class RouteParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # @!attribute [rw] description # @return [::String] # An optional description of route policy. @@ -30243,14 +32261,6 @@ class SchedulingOnInstanceStopAction extend ::Google::Protobuf::MessageExts::ClassMethods end - # @!attribute [rw] disk_gb - # @return [::Integer] - # Size of the scratch disk, defined in GB. - class ScratchDisks - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - # An instance's screenshot. # @!attribute [rw] contents # @return [::String] @@ -30924,13 +32934,13 @@ class SecurityPolicyRuleRateLimitOptionsThreshold # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. # @!attribute [rw] type # @return [::String] - # Type of the redirect action. + # Type of the redirect action. Possible values are: - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual challenge assessment. - EXTERNAL_302: redirect to a different URL via a 302 response. # Check the Type enum for the list of possible values. class SecurityPolicyRuleRedirectOptions include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # Type of the redirect action. + # Type of the redirect action. Possible values are: - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual challenge assessment. - EXTERNAL_302: redirect to a different URL via a 302 response. module Type # A value indicating that the enum field is not set. UNDEFINED_TYPE = 0 @@ -31077,7 +33087,7 @@ class ServiceAccount # Check the ConnectionPreference enum for the list of possible values. # @!attribute [rw] consumer_accept_lists # @return [::Array<::Google::Cloud::Compute::V1::ServiceAttachmentConsumerProjectLimit>] - # Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks. + # Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints. # @!attribute [rw] consumer_reject_lists # @return [::Array<::String>] # Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks. @@ -31102,6 +33112,9 @@ class ServiceAccount # @!attribute [rw] kind # @return [::String] # [Output Only] Type of the resource. Always compute#serviceAttachment for service attachments. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Metadata of the service attachment. # @!attribute [rw] name # @return [::String] # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. @@ -31133,6 +33146,15 @@ class ServiceAttachment 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 + # The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules. module ConnectionPreference # A value indicating that the enum field is not set. @@ -31229,7 +33251,7 @@ module Status # @!attribute [rw] connection_limit # @return [::Integer] - # The value of the limit to set. + # The value of the limit to set. For endpoint_url, the limit should be no more than 1. # @!attribute [rw] network_url # @return [::String] # The network URL for the network to set the limit for. @@ -31678,6 +33700,36 @@ class SetIamPolicyInstantSnapshotRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.SetIamPolicy. See the method description for details. + # @!attribute [rw] global_set_policy_request_resource + # @return [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] resource + # @return [::String] + # Name or id of the resource for this request. + class SetIamPolicyInterconnectAttachmentGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request message for InterconnectGroups.SetIamPolicy. See the method description for details. + # @!attribute [rw] global_set_policy_request_resource + # @return [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] resource + # @return [::String] + # Name or id of the resource for this request. + class SetIamPolicyInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for Licenses.SetIamPolicy. See the method description for details. # @!attribute [rw] global_set_policy_request_resource # @return [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest] @@ -34327,13 +36379,13 @@ class StopInstancesRegionInstanceGroupManagerRequest # Check the PerformanceProvisioningType enum for the list of possible values. # @!attribute [rw] pool_provisioned_capacity_gb # @return [::Integer] - # Size, in GiB, of the storage pool. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools. + # Size of the storage pool in GiB. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools. # @!attribute [rw] pool_provisioned_iops # @return [::Integer] # Provisioned IOPS of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced. # @!attribute [rw] pool_provisioned_throughput # @return [::Integer] - # Provisioned throughput of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput. + # Provisioned throughput of the storage pool in MiB/s. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput. # @!attribute [rw] resource_status # @return [::Google::Cloud::Compute::V1::StoragePoolResourceStatus] # [Output Only] Status information for the storage pool resource. @@ -34574,7 +36626,7 @@ class StoragePoolListDisks # [Output Only] Timestamp of the last successful resize in RFC3339 text format. # @!attribute [rw] max_total_provisioned_disk_capacity_gb # @return [::Integer] - # [Output Only] Maximum allowed aggregate disk size in gigabytes. + # [Output Only] Maximum allowed aggregate disk size in GiB. # @!attribute [rw] pool_used_capacity_bytes # @return [::Integer] # [Output Only] Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks. @@ -34583,19 +36635,19 @@ class StoragePoolListDisks # [Output Only] Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools. # @!attribute [rw] pool_used_throughput # @return [::Integer] - # [Output Only] Sum of all the disks' provisioned throughput in MB/s. + # [Output Only] Sum of all the disks' provisioned throughput in MiB/s. # @!attribute [rw] pool_user_written_bytes # @return [::Integer] # [Output Only] Amount of data written into the pool, before it is compacted. # @!attribute [rw] total_provisioned_disk_capacity_gb # @return [::Integer] - # [Output Only] Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity. + # [Output Only] Sum of all the disks' provisioned capacity (in GiB) in this storage pool. A disk's provisioned capacity is the same as its total capacity. # @!attribute [rw] total_provisioned_disk_iops # @return [::Integer] # [Output Only] Sum of all the disks' provisioned IOPS. # @!attribute [rw] total_provisioned_disk_throughput # @return [::Integer] - # [Output Only] Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. + # [Output Only] Sum of all the disks' provisioned throughput in MiB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. class StoragePoolResourceStatus include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -34789,6 +36841,9 @@ class StoragePoolsScopedList # @!attribute [rw] network # @return [::String] # The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time. + # @!attribute [rw] params + # @return [::Google::Cloud::Compute::V1::SubnetworkParams] + # Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. # @!attribute [rw] private_ip_google_access # @return [::Boolean] # Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. @@ -34823,6 +36878,12 @@ class StoragePoolsScopedList # @return [::String] # [Output Only] The state of the subnetwork, which can be one of the following values: READY: Subnetwork is created and ready to use DRAINING: only applicable to subnetworks that have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or modified until it reaches a status of READY # Check the State enum for the list of possible values. + # @!attribute [rw] system_reserved_external_ipv6_ranges + # @return [::Array<::String>] + # Output only. [Output Only] The array of external IPv6 network ranges reserved from the subnetwork's external IPv6 range for system use. + # @!attribute [rw] system_reserved_internal_ipv6_ranges + # @return [::Array<::String>] + # Output only. [Output Only] The array of internal IPv6 network ranges reserved from the subnetwork's internal IPv6 range for system use. class Subnetwork include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -35052,6 +37113,24 @@ module Metadata end end + # Additional subnetwork parameters. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * \\{"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} * \\{"123/environment" : "production", "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is not supported. For instance: \\{"123/environment" : "tagValues/444"} is invalid. + class SubnetworkParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # Represents a secondary IP range of a subnetwork. # @!attribute [rw] ip_cidr_range # @return [::String] @@ -35086,6 +37165,17 @@ class SubnetworksScopedList extend ::Google::Protobuf::MessageExts::ClassMethods end + # @!attribute [rw] scope_name + # @return [::String] + # Name of the scope containing this set of Subnetworks. + # @!attribute [rw] warning + # @return [::Google::Cloud::Compute::V1::Warning] + # An informational warning about unreachable scope + class SubnetworksScopedWarning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # @!attribute [rw] private_ip_google_access # @return [::Boolean] class SubnetworksSetPrivateIpGoogleAccessRequest @@ -36514,6 +38604,36 @@ class TestIamPermissionsInstantSnapshotRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request message for InterconnectAttachmentGroups.TestIamPermissions. See the method description for details. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] resource + # @return [::String] + # Name or id of the resource for this request. + # @!attribute [rw] test_permissions_request_resource + # @return [::Google::Cloud::Compute::V1::TestPermissionsRequest] + # The body resource for this request + class TestIamPermissionsInterconnectAttachmentGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request message for InterconnectGroups.TestIamPermissions. See the method description for details. + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] resource + # @return [::String] + # Name or id of the resource for this request. + # @!attribute [rw] test_permissions_request_resource + # @return [::Google::Cloud::Compute::V1::TestPermissionsRequest] + # The body resource for this request + class TestIamPermissionsInterconnectGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for LicenseCodes.TestIamPermissions. See the method description for details. # @!attribute [rw] project # @return [::String] @@ -36891,6 +39011,13 @@ class Uint128 # @!attribute [rw] latest_window_start_time # @return [::String] # The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format. + # @!attribute [rw] maintenance_on_shutdown + # @return [::Boolean] + # Indicates whether the UpcomingMaintenance will be triggered on VM shutdown. + # @!attribute [rw] maintenance_reasons + # @return [::Array<::String>] + # The reasons for the maintenance. Only valid for vms. + # Check the MaintenanceReasons enum for the list of possible values. # @!attribute [rw] maintenance_status # @return [::String] # Check the MaintenanceStatus enum for the list of possible values. @@ -36909,6 +39036,50 @@ class UpcomingMaintenance extend ::Google::Protobuf::MessageExts::ClassMethods + module MaintenanceReasons + # A value indicating that the enum field is not set. + UNDEFINED_MAINTENANCE_REASONS = 0 + + # Maintenance due to disk errors. + FAILURE_DISK = 8_573_778 + + # Maintenance due to GPU errors. + FAILURE_GPU = 467_876_919 + + # Maintenance due to high GPU temperature. + FAILURE_GPU_TEMPERATURE = 24_926_540 + + # Maintenance due to GPU xid failure. + FAILURE_GPU_XID = 51_956_587 + + # Maintenance due to infrastructure errors. + FAILURE_INFRA = 270_541_467 + + # Maintenance due to interface errors. + FAILURE_INTERFACE = 390_068_356 + + # Maintenance due to memory errors. + FAILURE_MEMORY = 440_132_982 + + # Maintenance due to network errors. + FAILURE_NETWORK = 42_811_449 + + # Maintenance due to NVLink failure. + FAILURE_NVLINK = 484_426_295 + + # Maintenance due to infrastructure relocation. + INFRASTRUCTURE_RELOCATION = 359_845_636 + + # Unknown maintenance reason. Do not use this value. + MAINTENANCE_REASON_UNKNOWN = 50_570_235 + + # Maintenance due to planned network update. + PLANNED_NETWORK_UPDATE = 135_494_677 + + # Maintenance due to planned update to the instance. + PLANNED_UPDATE = 161_733_572 + end + module MaintenanceStatus # A value indicating that the enum field is not set. UNDEFINED_MAINTENANCE_STATUS = 0 @@ -36928,6 +39099,9 @@ module Type # A value indicating that the enum field is not set. UNDEFINED_TYPE = 0 + # Multiple maintenance types in one window. This is only intended to be used for groups. + MULTIPLE = 362_714_640 + # Scheduled maintenance (e.g. maintenance after uptime guarantee is complete). SCHEDULED = 478_400_653 @@ -37154,6 +39328,27 @@ module MostDisruptiveAllowedAction end end + # A request message for Licenses.Update. See the method description for details. + # @!attribute [rw] license + # @return [::String] + # The license name for this request. + # @!attribute [rw] license_resource + # @return [::Google::Cloud::Compute::V1::License] + # The body resource for this request + # @!attribute [rw] project + # @return [::String] + # Project ID for this request. + # @!attribute [rw] request_id + # @return [::String] + # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + # @!attribute [rw] update_mask + # @return [::String] + # update_mask indicates fields to be updated as part of this request. + class UpdateLicenseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request message for Instances.UpdateNetworkInterface. See the method description for details. # @!attribute [rw] instance # @return [::String] @@ -37871,9 +40066,15 @@ class UsableSubnetworkSecondaryRange # @!attribute [rw] next_page_token # @return [::String] # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. In special cases listUsable may return 0 subnetworks and nextPageToken which still should be used to get the next page of results. + # @!attribute [rw] scoped_warnings + # @return [::Array<::Google::Cloud::Compute::V1::SubnetworksScopedWarning>] + # [Output Only] Informational warning messages for failures encountered from scopes. # @!attribute [rw] self_link # @return [::String] # [Output Only] Server-defined URL for this resource. + # @!attribute [rw] unreachables + # @return [::Array<::String>] + # [Output Only] Unreachable resources. # @!attribute [rw] warning # @return [::Google::Cloud::Compute::V1::Warning] # [Output Only] Informational warning message. diff --git a/google-cloud-compute-v1/test/google/cloud/compute/v1/disks_rest_test.rb b/google-cloud-compute-v1/test/google/cloud/compute/v1/disks_rest_test.rb index 744581b89ff8..43aa3f07c872 100644 --- a/google-cloud-compute-v1/test/google/cloud/compute/v1/disks_rest_test.rb +++ b/google-cloud-compute-v1/test/google/cloud/compute/v1/disks_rest_test.rb @@ -254,6 +254,64 @@ def test_bulk_insert end end + def test_bulk_set_labels + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + bulk_zone_set_labels_request_resource = {} + project = "hello world" + request_id = "hello world" + resource = "hello world" + zone = "hello world" + + bulk_set_labels_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::Compute::V1::Disks::Rest::ServiceStub.stub :transcode_bulk_set_labels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_set_labels_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::Disks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_set_labels({ bulk_zone_set_labels_request_resource: bulk_zone_set_labels_request_resource, project: project, request_id: request_id, resource: resource, zone: zone }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_set_labels bulk_zone_set_labels_request_resource: bulk_zone_set_labels_request_resource, project: project, request_id: request_id, resource: resource, zone: zone do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_set_labels ::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest.new(bulk_zone_set_labels_request_resource: bulk_zone_set_labels_request_resource, project: project, request_id: request_id, resource: resource, zone: zone) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_set_labels({ bulk_zone_set_labels_request_resource: bulk_zone_set_labels_request_resource, project: project, request_id: request_id, resource: resource, zone: zone }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_set_labels(::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest.new(bulk_zone_set_labels_request_resource: bulk_zone_set_labels_request_resource, project: project, request_id: request_id, resource: resource, zone: zone), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_set_labels_client_stub.call_count + end + end + end + def test_create_snapshot # Create test objects. client_result = ::Google::Cloud::Compute::V1::Operation.new diff --git a/google-cloud-compute-v1/test/google/cloud/compute/v1/interconnect_attachment_groups_rest_test.rb b/google-cloud-compute-v1/test/google/cloud/compute/v1/interconnect_attachment_groups_rest_test.rb new file mode 100644 index 000000000000..6e839810f539 --- /dev/null +++ b/google-cloud-compute-v1/test/google/cloud/compute/v1/interconnect_attachment_groups_rest_test.rb @@ -0,0 +1,606 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" +require "google/cloud/compute/v1/interconnect_attachment_groups/rest" + + +class ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::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_delete + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_attachment_group = "hello world" + project = "hello world" + request_id = "hello world" + + delete_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_delete_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete({ interconnect_attachment_group: interconnect_attachment_group, project: project, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete interconnect_attachment_group: interconnect_attachment_group, project: project, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete ::Google::Cloud::Compute::V1::DeleteInterconnectAttachmentGroupRequest.new(interconnect_attachment_group: interconnect_attachment_group, project: project, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete({ interconnect_attachment_group: interconnect_attachment_group, project: project, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete(::Google::Cloud::Compute::V1::DeleteInterconnectAttachmentGroupRequest.new(interconnect_attachment_group: interconnect_attachment_group, project: project, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_client_stub.call_count + end + end + end + + def test_get + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_attachment_group = "hello world" + project = "hello world" + + get_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_get_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get({ interconnect_attachment_group: interconnect_attachment_group, project: project }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get interconnect_attachment_group: interconnect_attachment_group, project: project do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get ::Google::Cloud::Compute::V1::GetInterconnectAttachmentGroupRequest.new(interconnect_attachment_group: interconnect_attachment_group, project: project) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get({ interconnect_attachment_group: interconnect_attachment_group, project: project }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get(::Google::Cloud::Compute::V1::GetInterconnectAttachmentGroupRequest.new(interconnect_attachment_group: interconnect_attachment_group, project: project), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + options_requested_policy_version = 42 + project = "hello world" + resource = "hello world" + + get_iam_policy_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ options_requested_policy_version: options_requested_policy_version, project: project, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy options_requested_policy_version: options_requested_policy_version, project: project, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Cloud::Compute::V1::GetIamPolicyInterconnectAttachmentGroupRequest.new(options_requested_policy_version: options_requested_policy_version, project: project, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ options_requested_policy_version: options_requested_policy_version, project: project, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Cloud::Compute::V1::GetIamPolicyInterconnectAttachmentGroupRequest.new(options_requested_policy_version: options_requested_policy_version, project: project, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_get_operational_status + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsGetOperationalStatusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_attachment_group = "hello world" + project = "hello world" + + get_operational_status_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_get_operational_status_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_operational_status_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_operational_status({ interconnect_attachment_group: interconnect_attachment_group, project: project }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_operational_status interconnect_attachment_group: interconnect_attachment_group, project: project do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_operational_status ::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectAttachmentGroupRequest.new(interconnect_attachment_group: interconnect_attachment_group, project: project) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_operational_status({ interconnect_attachment_group: interconnect_attachment_group, project: project }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_operational_status(::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectAttachmentGroupRequest.new(interconnect_attachment_group: interconnect_attachment_group, project: project), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_operational_status_client_stub.call_count + end + end + end + + def test_insert + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_attachment_group_resource = {} + project = "hello world" + request_id = "hello world" + + insert_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_insert_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert({ interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert ::Google::Cloud::Compute::V1::InsertInterconnectAttachmentGroupRequest.new(interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert({ interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert(::Google::Cloud::Compute::V1::InsertInterconnectAttachmentGroupRequest.new(interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_client_stub.call_count + end + end + end + + def test_list + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroupsListResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + filter = "hello world" + max_results = 42 + order_by = "hello world" + page_token = "hello world" + project = "hello world" + return_partial_success = true + + list_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list ::Google::Cloud::Compute::V1::ListInterconnectAttachmentGroupsRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list(::Google::Cloud::Compute::V1::ListInterconnectAttachmentGroupsRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_client_stub.call_count + end + end + end + + def test_patch + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_attachment_group = "hello world" + interconnect_attachment_group_resource = {} + project = "hello world" + request_id = "hello world" + update_mask = "hello world" + + patch_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_patch_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, patch_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.patch({ interconnect_attachment_group: interconnect_attachment_group, interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.patch interconnect_attachment_group: interconnect_attachment_group, interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.patch ::Google::Cloud::Compute::V1::PatchInterconnectAttachmentGroupRequest.new(interconnect_attachment_group: interconnect_attachment_group, interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.patch({ interconnect_attachment_group: interconnect_attachment_group, interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.patch(::Google::Cloud::Compute::V1::PatchInterconnectAttachmentGroupRequest.new(interconnect_attachment_group: interconnect_attachment_group, interconnect_attachment_group_resource: interconnect_attachment_group_resource, project: project, request_id: request_id, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, patch_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + global_set_policy_request_resource = {} + project = "hello world" + resource = "hello world" + + set_iam_policy_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Cloud::Compute::V1::SetIamPolicyInterconnectAttachmentGroupRequest.new(global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Cloud::Compute::V1::SetIamPolicyInterconnectAttachmentGroupRequest.new(global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project = "hello world" + resource = "hello world" + test_permissions_request_resource = {} + + test_iam_permissions_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::Compute::V1::InterconnectAttachmentGroups::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectAttachmentGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectAttachmentGroupRequest.new(project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectAttachmentGroupRequest.new(project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_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::Compute::V1::InterconnectAttachmentGroups::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::Compute::V1::InterconnectAttachmentGroups::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-compute-v1/test/google/cloud/compute/v1/interconnect_groups_rest_test.rb b/google-cloud-compute-v1/test/google/cloud/compute/v1/interconnect_groups_rest_test.rb new file mode 100644 index 000000000000..764e0c101ac8 --- /dev/null +++ b/google-cloud-compute-v1/test/google/cloud/compute/v1/interconnect_groups_rest_test.rb @@ -0,0 +1,662 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" +require "google/cloud/compute/v1/interconnect_groups/rest" + + +class ::Google::Cloud::Compute::V1::InterconnectGroups::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_members + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_group = "hello world" + interconnect_groups_create_members_request_resource = {} + project = "hello world" + + create_members_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_create_members_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_members_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_members({ interconnect_group: interconnect_group, interconnect_groups_create_members_request_resource: interconnect_groups_create_members_request_resource, project: project }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_members interconnect_group: interconnect_group, interconnect_groups_create_members_request_resource: interconnect_groups_create_members_request_resource, project: project do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_members ::Google::Cloud::Compute::V1::CreateMembersInterconnectGroupRequest.new(interconnect_group: interconnect_group, interconnect_groups_create_members_request_resource: interconnect_groups_create_members_request_resource, project: project) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_members({ interconnect_group: interconnect_group, interconnect_groups_create_members_request_resource: interconnect_groups_create_members_request_resource, project: project }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_members(::Google::Cloud::Compute::V1::CreateMembersInterconnectGroupRequest.new(interconnect_group: interconnect_group, interconnect_groups_create_members_request_resource: interconnect_groups_create_members_request_resource, project: project), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_members_client_stub.call_count + end + end + end + + def test_delete + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_group = "hello world" + project = "hello world" + request_id = "hello world" + + delete_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_delete_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete({ interconnect_group: interconnect_group, project: project, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete interconnect_group: interconnect_group, project: project, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete ::Google::Cloud::Compute::V1::DeleteInterconnectGroupRequest.new(interconnect_group: interconnect_group, project: project, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete({ interconnect_group: interconnect_group, project: project, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete(::Google::Cloud::Compute::V1::DeleteInterconnectGroupRequest.new(interconnect_group: interconnect_group, project: project, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_client_stub.call_count + end + end + end + + def test_get + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::InterconnectGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_group = "hello world" + project = "hello world" + + get_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_get_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get({ interconnect_group: interconnect_group, project: project }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get interconnect_group: interconnect_group, project: project do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get ::Google::Cloud::Compute::V1::GetInterconnectGroupRequest.new(interconnect_group: interconnect_group, project: project) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get({ interconnect_group: interconnect_group, project: project }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get(::Google::Cloud::Compute::V1::GetInterconnectGroupRequest.new(interconnect_group: interconnect_group, project: project), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + options_requested_policy_version = 42 + project = "hello world" + resource = "hello world" + + get_iam_policy_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ options_requested_policy_version: options_requested_policy_version, project: project, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy options_requested_policy_version: options_requested_policy_version, project: project, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Cloud::Compute::V1::GetIamPolicyInterconnectGroupRequest.new(options_requested_policy_version: options_requested_policy_version, project: project, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ options_requested_policy_version: options_requested_policy_version, project: project, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Cloud::Compute::V1::GetIamPolicyInterconnectGroupRequest.new(options_requested_policy_version: options_requested_policy_version, project: project, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_get_operational_status + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::InterconnectGroupsGetOperationalStatusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_group = "hello world" + project = "hello world" + + get_operational_status_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_get_operational_status_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_operational_status_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_operational_status({ interconnect_group: interconnect_group, project: project }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_operational_status interconnect_group: interconnect_group, project: project do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_operational_status ::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectGroupRequest.new(interconnect_group: interconnect_group, project: project) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_operational_status({ interconnect_group: interconnect_group, project: project }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_operational_status(::Google::Cloud::Compute::V1::GetOperationalStatusInterconnectGroupRequest.new(interconnect_group: interconnect_group, project: project), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_operational_status_client_stub.call_count + end + end + end + + def test_insert + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_group_resource = {} + project = "hello world" + request_id = "hello world" + + insert_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_insert_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert({ interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert ::Google::Cloud::Compute::V1::InsertInterconnectGroupRequest.new(interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert({ interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert(::Google::Cloud::Compute::V1::InsertInterconnectGroupRequest.new(interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_client_stub.call_count + end + end + end + + def test_list + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::InterconnectGroupsListResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + filter = "hello world" + max_results = 42 + order_by = "hello world" + page_token = "hello world" + project = "hello world" + return_partial_success = true + + list_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list ::Google::Cloud::Compute::V1::ListInterconnectGroupsRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list(::Google::Cloud::Compute::V1::ListInterconnectGroupsRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_client_stub.call_count + end + end + end + + def test_patch + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + interconnect_group = "hello world" + interconnect_group_resource = {} + project = "hello world" + request_id = "hello world" + update_mask = "hello world" + + patch_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_patch_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, patch_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.patch({ interconnect_group: interconnect_group, interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.patch interconnect_group: interconnect_group, interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.patch ::Google::Cloud::Compute::V1::PatchInterconnectGroupRequest.new(interconnect_group: interconnect_group, interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.patch({ interconnect_group: interconnect_group, interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.patch(::Google::Cloud::Compute::V1::PatchInterconnectGroupRequest.new(interconnect_group: interconnect_group, interconnect_group_resource: interconnect_group_resource, project: project, request_id: request_id, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, patch_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + global_set_policy_request_resource = {} + project = "hello world" + resource = "hello world" + + set_iam_policy_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Cloud::Compute::V1::SetIamPolicyInterconnectGroupRequest.new(global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Cloud::Compute::V1::SetIamPolicyInterconnectGroupRequest.new(global_set_policy_request_resource: global_set_policy_request_resource, project: project, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project = "hello world" + resource = "hello world" + test_permissions_request_resource = {} + + test_iam_permissions_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::Compute::V1::InterconnectGroups::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectGroupRequest.new(project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Cloud::Compute::V1::TestIamPermissionsInterconnectGroupRequest.new(project: project, resource: resource, test_permissions_request_resource: test_permissions_request_resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_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::Compute::V1::InterconnectGroups::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::Compute::V1::InterconnectGroups::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-compute-v1/test/google/cloud/compute/v1/licenses_rest_test.rb b/google-cloud-compute-v1/test/google/cloud/compute/v1/licenses_rest_test.rb index 69c59e58d1c2..32972417a9ac 100644 --- a/google-cloud-compute-v1/test/google/cloud/compute/v1/licenses_rest_test.rb +++ b/google-cloud-compute-v1/test/google/cloud/compute/v1/licenses_rest_test.rb @@ -472,6 +472,64 @@ def test_test_iam_permissions end end + def test_update + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + license = "hello world" + license_resource = {} + project = "hello world" + request_id = "hello world" + update_mask = "hello world" + + update_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::Compute::V1::Licenses::Rest::ServiceStub.stub :transcode_update_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::Licenses::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update({ license: license, license_resource: license_resource, project: project, request_id: request_id, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update license: license, license_resource: license_resource, project: project, request_id: request_id, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update ::Google::Cloud::Compute::V1::UpdateLicenseRequest.new(license: license, license_resource: license_resource, project: project, request_id: request_id, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update({ license: license, license_resource: license_resource, project: project, request_id: request_id, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update(::Google::Cloud::Compute::V1::UpdateLicenseRequest.new(license: license, license_resource: license_resource, project: project, request_id: request_id, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-compute-v1/test/google/cloud/compute/v1/networks_rest_test.rb b/google-cloud-compute-v1/test/google/cloud/compute/v1/networks_rest_test.rb index 582d2fa789d6..c5045a6d8c9d 100644 --- a/google-cloud-compute-v1/test/google/cloud/compute/v1/networks_rest_test.rb +++ b/google-cloud-compute-v1/test/google/cloud/compute/v1/networks_rest_test.rb @@ -593,6 +593,63 @@ def test_remove_peering end end + def test_request_remove_peering + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + network = "hello world" + networks_request_remove_peering_request_resource = {} + project = "hello world" + request_id = "hello world" + + request_remove_peering_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::Compute::V1::Networks::Rest::ServiceStub.stub :transcode_request_remove_peering_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, request_remove_peering_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::Networks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.request_remove_peering({ network: network, networks_request_remove_peering_request_resource: networks_request_remove_peering_request_resource, project: project, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.request_remove_peering network: network, networks_request_remove_peering_request_resource: networks_request_remove_peering_request_resource, project: project, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.request_remove_peering ::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest.new(network: network, networks_request_remove_peering_request_resource: networks_request_remove_peering_request_resource, project: project, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.request_remove_peering({ network: network, networks_request_remove_peering_request_resource: networks_request_remove_peering_request_resource, project: project, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.request_remove_peering(::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest.new(network: network, networks_request_remove_peering_request_resource: networks_request_remove_peering_request_resource, project: project, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, request_remove_peering_client_stub.call_count + end + end + end + def test_switch_to_custom_mode # Create test objects. client_result = ::Google::Cloud::Compute::V1::Operation.new diff --git a/google-cloud-compute-v1/test/google/cloud/compute/v1/reservation_blocks_rest_test.rb b/google-cloud-compute-v1/test/google/cloud/compute/v1/reservation_blocks_rest_test.rb index 7412a86d66a1..1fa75e348850 100644 --- a/google-cloud-compute-v1/test/google/cloud/compute/v1/reservation_blocks_rest_test.rb +++ b/google-cloud-compute-v1/test/google/cloud/compute/v1/reservation_blocks_rest_test.rb @@ -89,6 +89,7 @@ def test_get project = "hello world" reservation = "hello world" reservation_block = "hello world" + view = "hello world" zone = "hello world" get_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| @@ -105,27 +106,27 @@ def test_get end # Use hash object - client.get({ project: project, reservation: reservation, reservation_block: reservation_block, zone: zone }) do |_result, response| + client.get({ project: project, reservation: reservation, reservation_block: reservation_block, view: view, zone: zone }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.get project: project, reservation: reservation, reservation_block: reservation_block, zone: zone do |_result, response| + client.get project: project, reservation: reservation, reservation_block: reservation_block, view: view, zone: zone do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.get ::Google::Cloud::Compute::V1::GetReservationBlockRequest.new(project: project, reservation: reservation, reservation_block: reservation_block, zone: zone) do |_result, response| + client.get ::Google::Cloud::Compute::V1::GetReservationBlockRequest.new(project: project, reservation: reservation, reservation_block: reservation_block, view: view, zone: zone) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.get({ project: project, reservation: reservation, reservation_block: reservation_block, zone: zone }, call_options) do |_result, response| + client.get({ project: project, reservation: reservation, reservation_block: reservation_block, view: view, zone: zone }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.get(::Google::Cloud::Compute::V1::GetReservationBlockRequest.new(project: project, reservation: reservation, reservation_block: reservation_block, zone: zone), call_options) do |_result, response| + client.get(::Google::Cloud::Compute::V1::GetReservationBlockRequest.new(project: project, reservation: reservation, reservation_block: reservation_block, view: view, zone: zone), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-compute-v1/test/google/cloud/compute/v1/reservation_sub_blocks_rest_test.rb b/google-cloud-compute-v1/test/google/cloud/compute/v1/reservation_sub_blocks_rest_test.rb new file mode 100644 index 000000000000..b882b511c36d --- /dev/null +++ b/google-cloud-compute-v1/test/google/cloud/compute/v1/reservation_sub_blocks_rest_test.rb @@ -0,0 +1,275 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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/compute/v1/compute_pb" +require "google/cloud/compute/v1/reservation_sub_blocks/rest" + + +class ::Google::Cloud::Compute::V1::ReservationSubBlocks::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_get + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::ReservationSubBlocksGetResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent_name = "hello world" + project = "hello world" + reservation_sub_block = "hello world" + zone = "hello world" + + get_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::Compute::V1::ReservationSubBlocks::Rest::ServiceStub.stub :transcode_get_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get({ parent_name: parent_name, project: project, reservation_sub_block: reservation_sub_block, zone: zone }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get parent_name: parent_name, project: project, reservation_sub_block: reservation_sub_block, zone: zone do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get ::Google::Cloud::Compute::V1::GetReservationSubBlockRequest.new(parent_name: parent_name, project: project, reservation_sub_block: reservation_sub_block, zone: zone) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get({ parent_name: parent_name, project: project, reservation_sub_block: reservation_sub_block, zone: zone }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get(::Google::Cloud::Compute::V1::GetReservationSubBlockRequest.new(parent_name: parent_name, project: project, reservation_sub_block: reservation_sub_block, zone: zone), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_client_stub.call_count + end + end + end + + def test_list + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::ReservationSubBlocksListResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + filter = "hello world" + max_results = 42 + order_by = "hello world" + page_token = "hello world" + parent_name = "hello world" + project = "hello world" + return_partial_success = true + zone = "hello world" + + list_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::Compute::V1::ReservationSubBlocks::Rest::ServiceStub.stub :transcode_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, parent_name: parent_name, project: project, return_partial_success: return_partial_success, zone: zone }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, parent_name: parent_name, project: project, return_partial_success: return_partial_success, zone: zone do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list ::Google::Cloud::Compute::V1::ListReservationSubBlocksRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, parent_name: parent_name, project: project, return_partial_success: return_partial_success, zone: zone) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, parent_name: parent_name, project: project, return_partial_success: return_partial_success, zone: zone }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list(::Google::Cloud::Compute::V1::ListReservationSubBlocksRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, parent_name: parent_name, project: project, return_partial_success: return_partial_success, zone: zone), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_client_stub.call_count + end + end + end + + def test_perform_maintenance + # Create test objects. + client_result = ::Google::Cloud::Compute::V1::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent_name = "hello world" + project = "hello world" + request_id = "hello world" + reservation_sub_block = "hello world" + zone = "hello world" + + perform_maintenance_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::Compute::V1::ReservationSubBlocks::Rest::ServiceStub.stub :transcode_perform_maintenance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, perform_maintenance_client_stub do + # Create client + client = ::Google::Cloud::Compute::V1::ReservationSubBlocks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.perform_maintenance({ parent_name: parent_name, project: project, request_id: request_id, reservation_sub_block: reservation_sub_block, zone: zone }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.perform_maintenance parent_name: parent_name, project: project, request_id: request_id, reservation_sub_block: reservation_sub_block, zone: zone do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.perform_maintenance ::Google::Cloud::Compute::V1::PerformMaintenanceReservationSubBlockRequest.new(parent_name: parent_name, project: project, request_id: request_id, reservation_sub_block: reservation_sub_block, zone: zone) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.perform_maintenance({ parent_name: parent_name, project: project, request_id: request_id, reservation_sub_block: reservation_sub_block, zone: zone }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.perform_maintenance(::Google::Cloud::Compute::V1::PerformMaintenanceReservationSubBlockRequest.new(parent_name: parent_name, project: project, request_id: request_id, reservation_sub_block: reservation_sub_block, zone: zone), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, perform_maintenance_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::Compute::V1::ReservationSubBlocks::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::Compute::V1::ReservationSubBlocks::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-compute-v1/test/google/cloud/compute/v1/subnetworks_rest_test.rb b/google-cloud-compute-v1/test/google/cloud/compute/v1/subnetworks_rest_test.rb index 13b3c7a87236..27b724c5b137 100644 --- a/google-cloud-compute-v1/test/google/cloud/compute/v1/subnetworks_rest_test.rb +++ b/google-cloud-compute-v1/test/google/cloud/compute/v1/subnetworks_rest_test.rb @@ -498,6 +498,7 @@ def test_list_usable page_token = "hello world" project = "hello world" return_partial_success = true + service_project = "hello world" list_usable_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -513,27 +514,27 @@ def test_list_usable end # Use hash object - client.list_usable({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success }) do |_result, response| + client.list_usable({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success, service_project: service_project }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_usable filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success do |_result, response| + client.list_usable filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success, service_project: service_project do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_usable ::Google::Cloud::Compute::V1::ListUsableSubnetworksRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success) do |_result, response| + client.list_usable ::Google::Cloud::Compute::V1::ListUsableSubnetworksRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success, service_project: service_project) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_usable({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success }, call_options) do |_result, response| + client.list_usable({ filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success, service_project: service_project }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_usable(::Google::Cloud::Compute::V1::ListUsableSubnetworksRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success), call_options) do |_result, response| + client.list_usable(::Google::Cloud::Compute::V1::ListUsableSubnetworksRequest.new(filter: filter, max_results: max_results, order_by: order_by, page_token: page_token, project: project, return_partial_success: return_partial_success, service_project: service_project), call_options) do |_result, response| assert_equal http_response, response.underlying_op end From 75f2613c0faece787f99ad9f9538fcd7feb5fd9f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:40:01 -0700 Subject: [PATCH 444/457] chore: use HTTP binding configuration class from new gapic-common (#30839) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwaWdlZV9yZWdpc3RyeS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwcF9lbmdpbmUtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwcF9odWItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFydGlmYWN0X3JlZ2lzdHJ5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFydGlmYWN0X3JlZ2lzdHJ5LXYxYmV0YTIvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc2V0LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc3VyZWRfd29ya2xvYWRzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc3VyZWRfd29ya2xvYWRzLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1dG9tbC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1dG9tbC12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhcmVfbWV0YWxfc29sdXRpb24tdjIvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhdGNoLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9jb25uZWN0aW9ucy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9jb25uZWN0b3JzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9nYXRld2F5cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWNsaWVudF9nYXRld2F5cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWFuYWx5dGljc19odWItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWNvbm5lY3Rpb24tdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfZXhjaGFuZ2UtdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-cloud-apigee_registry-v1.gemspec | 2 +- .../apigee_registry/v1/bindings_override.rb | 31 ++----------------- .../apigee_registry/v1/provisioning_test.rb | 1 - .../cloud/apigee_registry/v1/registry_test.rb | 1 - .../google-cloud-app_engine-v1.gemspec | 2 +- .../cloud/app_engine/v1/applications_test.rb | 1 - .../v1/authorized_certificates_test.rb | 1 - .../app_engine/v1/authorized_domains_test.rb | 1 - .../app_engine/v1/domain_mappings_test.rb | 1 - .../cloud/app_engine/v1/firewall_test.rb | 1 - .../cloud/app_engine/v1/instances_test.rb | 1 - .../cloud/app_engine/v1/services_test.rb | 1 - .../cloud/app_engine/v1/versions_test.rb | 1 - .../google-cloud-app_hub-v1.gemspec | 2 +- .../cloud/app_hub/v1/bindings_override.rb | 31 ++----------------- .../google/cloud/app_hub/v1/app_hub_test.rb | 1 - .../google-cloud-artifact_registry-v1.gemspec | 2 +- .../artifact_registry/v1/bindings_override.rb | 31 ++----------------- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../v1/artifact_registry_test.rb | 1 - ...le-cloud-artifact_registry-v1beta2.gemspec | 2 +- .../v1beta2/bindings_override.rb | 31 ++----------------- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../v1beta2/artifact_registry_test.rb | 1 - .../google-cloud-asset-v1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../cloud/asset/v1/asset_service_test.rb | 1 - .../google-cloud-assured_workloads-v1.gemspec | 2 +- .../v1/assured_workloads_service_test.rb | 1 - ...le-cloud-assured_workloads-v1beta1.gemspec | 2 +- .../v1beta1/assured_workloads_service_test.rb | 1 - .../google-cloud-automl-v1.gemspec | 2 +- .../google/cloud/automl/v1/automl_test.rb | 1 - .../automl/v1/prediction_service_test.rb | 1 - .../google-cloud-automl-v1beta1.gemspec | 2 +- .../cloud/automl/v1beta1/automl_test.rb | 1 - .../automl/v1beta1/prediction_service_test.rb | 1 - .../google-cloud-backupdr-v1.gemspec | 2 +- .../cloud/backupdr/v1/bindings_override.rb | 31 ++----------------- .../google/cloud/backupdr/v1/backupdr_test.rb | 1 - ...oogle-cloud-bare_metal_solution-v2.gemspec | 2 +- .../v2/bindings_override.rb | 31 ++----------------- .../v2/bare_metal_solution_test.rb | 1 - .../google-cloud-batch-v1.gemspec | 2 +- .../cloud/batch/v1/bindings_override.rb | 31 ++----------------- .../lib/google/iam/v1/bindings_override.rb | 31 ++----------------- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../cloud/batch/v1/batch_service_test.rb | 1 - .../test/google/iam/v1/iam_policy_test.rb | 1 - ...oud-beyond_corp-app_connections-v1.gemspec | 2 +- .../v1/app_connections_service_test.rb | 1 - ...loud-beyond_corp-app_connectors-v1.gemspec | 2 +- .../v1/app_connectors_service_test.rb | 1 - ...-cloud-beyond_corp-app_gateways-v1.gemspec | 2 +- .../v1/app_gateways_service_test.rb | 1 - ...oud-beyond_corp-client_gateways-v1.gemspec | 2 +- .../v1/client_gateways_service_test.rb | 1 - ...le-cloud-bigquery-analytics_hub-v1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../v1/analytics_hub_service_test.rb | 1 - ...oogle-cloud-bigquery-connection-v1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../connection/v1/connection_service_test.rb | 1 - ...oud-bigquery-data_exchange-v1beta1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../v1beta1/analytics_hub_service_test.rb | 1 - 66 files changed, 43 insertions(+), 290 deletions(-) diff --git a/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec b/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec index 93bf0fe9aa8a..e6859b1243c1 100644 --- a/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec +++ b/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb index ca726c331f15..ce1c18a81ea6 100644 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb +++ b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -318,33 +318,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.apigeeregistry.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.apigeeregistry.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb index 5251699c9a06..e1d550cf68da 100644 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb +++ b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigeeregistry/v1/provisioning_service_services_pb" require "google/cloud/apigee_registry/v1/provisioning" class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::ClientTest < Minitest::Test diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb index eab3c01bdadf..507c79511b19 100644 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb +++ b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/apigeeregistry/v1/registry_service_pb" -require "google/cloud/apigeeregistry/v1/registry_service_services_pb" require "google/cloud/apigee_registry/v1/registry" class ::Google::Cloud::ApigeeRegistry::V1::Registry::ClientTest < Minitest::Test diff --git a/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec b/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec index 1d40e5050b5b..04c14a30d9f1 100644 --- a/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec +++ b/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb index 10877b44895e..47e3c512e058 100644 --- a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb +++ b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" require "google/cloud/app_engine/v1/applications" class ::Google::Cloud::AppEngine::V1::Applications::ClientTest < Minitest::Test diff --git a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb index bb8e05cefd4c..7865f2bb1ecc 100644 --- a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb +++ b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" require "google/cloud/app_engine/v1/authorized_certificates" class ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::ClientTest < Minitest::Test diff --git a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb index 73dc517deb23..b7bd73e416f7 100644 --- a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb +++ b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" require "google/cloud/app_engine/v1/authorized_domains" class ::Google::Cloud::AppEngine::V1::AuthorizedDomains::ClientTest < Minitest::Test diff --git a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb index 569e39746e57..3fe6b61d74d5 100644 --- a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb +++ b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" require "google/cloud/app_engine/v1/domain_mappings" class ::Google::Cloud::AppEngine::V1::DomainMappings::ClientTest < Minitest::Test diff --git a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb index 143d3aca5d37..fadf5f30df3e 100644 --- a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb +++ b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" require "google/cloud/app_engine/v1/firewall" class ::Google::Cloud::AppEngine::V1::Firewall::ClientTest < Minitest::Test diff --git a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb index 951ac274aef3..0734b45a11ad 100644 --- a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb +++ b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" require "google/cloud/app_engine/v1/instances" class ::Google::Cloud::AppEngine::V1::Instances::ClientTest < Minitest::Test diff --git a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb index 14bf5c064a86..d68aee132220 100644 --- a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb +++ b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" require "google/cloud/app_engine/v1/services" class ::Google::Cloud::AppEngine::V1::Services::ClientTest < Minitest::Test diff --git a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb index dd206ce248e6..0c3f3531ce0c 100644 --- a/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb +++ b/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" require "google/cloud/app_engine/v1/versions" class ::Google::Cloud::AppEngine::V1::Versions::ClientTest < Minitest::Test diff --git a/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec b/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec index 37e4fb43baed..8486af7db7cc 100644 --- a/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec +++ b/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb index 911b86850d18..f2ca06629fae 100644 --- a/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb +++ b/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -102,33 +102,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.apphub.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.apphub.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb index 84e8d37399ca..be5160cd96fd 100644 --- a/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb +++ b/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/apphub/v1/apphub_service_pb" -require "google/cloud/apphub/v1/apphub_service_services_pb" require "google/cloud/app_hub/v1/app_hub" class ::Google::Cloud::AppHub::V1::AppHub::ClientTest < Minitest::Test diff --git a/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec b/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec index cabd8539aa14..0bbc756d2c3a 100644 --- a/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec +++ b/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" diff --git a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb index 4917d12c7b0f..9db3336f3de3 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.devtools.artifactregistry.v1 package. - # - # This class contains common configuration for all services - # of the google.devtools.artifactregistry.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb index da77440d0b3c..47d11893ed7b 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb index f0a17ee8fff9..3d81f7c7815e 100644 --- a/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb +++ b/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/artifactregistry/v1/service_pb" -require "google/devtools/artifactregistry/v1/service_services_pb" require "google/cloud/artifact_registry/v1/artifact_registry" class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::ClientTest < Minitest::Test diff --git a/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec b/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec index 7fdd2aea61bd..3314cdcfc497 100644 --- a/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec +++ b/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" diff --git a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb index 87ea7da1eba6..81cb12ec86f7 100644 --- a/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb +++ b/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.devtools.artifactregistry.v1beta2 package. - # - # This class contains common configuration for all services - # of the google.devtools.artifactregistry.v1beta2 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb index 96e77ec64ded..3e6a8d5d47d9 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb index 89fede172eac..470219cd52bc 100644 --- a/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb +++ b/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/devtools/artifactregistry/v1beta2/service_services_pb" require "google/cloud/artifact_registry/v1beta2/artifact_registry" class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::ClientTest < Minitest::Test diff --git a/google-cloud-asset-v1/google-cloud-asset-v1.gemspec b/google-cloud-asset-v1/google-cloud-asset-v1.gemspec index 7323c54cde07..de4de6f54f59 100644 --- a/google-cloud-asset-v1/google-cloud-asset-v1.gemspec +++ b/google-cloud-asset-v1/google-cloud-asset-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-os_config-v1", "> 0.0", "< 2.a" gem.add_dependency "google-identity-access_context_manager-v1", "> 0.0", "< 2.a" diff --git a/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb index 96e77ec64ded..3e6a8d5d47d9 100644 --- a/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb b/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb index 84d6f11e8cb6..447634076e5a 100644 --- a/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb +++ b/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/asset/v1/asset_service_pb" -require "google/cloud/asset/v1/asset_service_services_pb" require "google/cloud/asset/v1/asset_service" class ::Google::Cloud::Asset::V1::AssetService::ClientTest < Minitest::Test diff --git a/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec b/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec index 891367e08cc8..a6beab5a7849 100644 --- a/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec +++ b/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb index 68ee40e2e9f8..264193ae1b74 100644 --- a/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb +++ b/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assuredworkloads/v1/assuredworkloads_services_pb" require "google/cloud/assured_workloads/v1/assured_workloads_service" class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::ClientTest < Minitest::Test diff --git a/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec b/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec index f029a729016d..f9eff05e210d 100644 --- a/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec +++ b/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb index f67101b28b30..46947e0d3c7b 100644 --- a/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb +++ b/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb" require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::ClientTest < Minitest::Test diff --git a/google-cloud-automl-v1/google-cloud-automl-v1.gemspec b/google-cloud-automl-v1/google-cloud-automl-v1.gemspec index ce0287c43266..2df92aa0b319 100644 --- a/google-cloud-automl-v1/google-cloud-automl-v1.gemspec +++ b/google-cloud-automl-v1/google-cloud-automl-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb index 7b57f0831f3c..8531e3784c29 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/automl/v1/service_pb" -require "google/cloud/automl/v1/service_services_pb" require "google/cloud/automl/v1/automl" class ::Google::Cloud::AutoML::V1::AutoML::ClientTest < Minitest::Test diff --git a/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb index 3227cca2740e..9f1ddad92c51 100644 --- a/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb +++ b/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service_services_pb" require "google/cloud/automl/v1/prediction_service" class ::Google::Cloud::AutoML::V1::PredictionService::ClientTest < Minitest::Test diff --git a/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec b/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec index 9a1cb79ce153..87302579c078 100644 --- a/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec +++ b/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb index 90982658fdd5..de0b368f0ec2 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/service_services_pb" require "google/cloud/automl/v1beta1/automl" class ::Google::Cloud::AutoML::V1beta1::AutoML::ClientTest < Minitest::Test diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb index fa2cee72351c..a5f34bee1ccf 100644 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb +++ b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service_services_pb" require "google/cloud/automl/v1beta1/prediction_service" class ::Google::Cloud::AutoML::V1beta1::PredictionService::ClientTest < Minitest::Test diff --git a/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec b/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec index 1195b9bfa5cc..dc86d0e725f5 100644 --- a/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec +++ b/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb index 446c7133bf55..48941e26616d 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -102,33 +102,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.backupdr.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.backupdr.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb index 744cd86f92cd..0a8b6cceeb9a 100644 --- a/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb +++ b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr_services_pb" require "google/cloud/backupdr/v1/backupdr" class ::Google::Cloud::BackupDR::V1::BackupDR::ClientTest < Minitest::Test diff --git a/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec b/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec index 46993c0a3288..d4df5106092a 100644 --- a/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec +++ b/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb index 976896e9d983..8e07f319f574 100644 --- a/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb +++ b/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.baremetalsolution.v2 package. - # - # This class contains common configuration for all services - # of the google.cloud.baremetalsolution.v2 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb index 0f04547e8b84..946cea1c5f24 100644 --- a/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb +++ b/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/baremetalsolution/v2/baremetalsolution_services_pb" require "google/cloud/bare_metal_solution/v2/bare_metal_solution" class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::ClientTest < Minitest::Test diff --git a/google-cloud-batch-v1/google-cloud-batch-v1.gemspec b/google-cloud-batch-v1/google-cloud-batch-v1.gemspec index e502200504a4..3a155e645c3b 100644 --- a/google-cloud-batch-v1/google-cloud-batch-v1.gemspec +++ b/google-cloud-batch-v1/google-cloud-batch-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" diff --git a/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb b/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb index a04668580f9c..8c7198e42d32 100644 --- a/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb +++ b/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.batch.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.batch.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb b/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb index 50e76f05b8b0..74a624be6a38 100644 --- a/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb +++ b/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Iam @@ -41,7 +41,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -68,33 +68,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.iam.v1 package. - # - # This class contains common configuration for all services - # of the google.iam.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb index 751130dab8db..94233fb73c36 100644 --- a/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb index 2a0003e07a76..6aa6fac333af 100644 --- a/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb +++ b/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_services_pb" require "google/cloud/batch/v1/batch_service" class ::Google::Cloud::Batch::V1::BatchService::ClientTest < Minitest::Test diff --git a/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb b/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb index 04152f2ccc5f..0a49716213e2 100644 --- a/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb +++ b/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/iam/v1/iam_policy_pb" -require "google/iam/v1/iam_policy_services_pb" require "google/iam/v1/iam_policy" class ::Google::Iam::V1::IAMPolicy::ClientTest < Minitest::Test diff --git a/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec b/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec index fc32d9fd7668..6522b802667c 100644 --- a/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec +++ b/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb b/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb index 90a9d04a7f89..c051ea87ec1c 100644 --- a/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb +++ b/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb" -require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb" require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::ClientTest < Minitest::Test diff --git a/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec b/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec index 8824da18bfb4..f294d3b7483d 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec +++ b/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb b/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb index a2161354c5f7..f0daa241d331 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" -require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb" require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::ClientTest < Minitest::Test diff --git a/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec b/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec index 8c5ea4924468..7235e924c104 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec +++ b/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb b/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb index ac2ccee9cd8c..360f3a521131 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb" -require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb" require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::ClientTest < Minitest::Test diff --git a/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec b/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec index d5bbb3d28f44..b36d3b0cc10f 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec +++ b/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb b/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb index 49d33982ed6b..5594b3dc31d7 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb" -require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb" require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::ClientTest < Minitest::Test diff --git a/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec b/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec index 979788eec713..424fdd099873 100644 --- a/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec +++ b/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" end diff --git a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb index d6a6f800fd50..49cc5ebe1a2d 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb index 8562412914f4..c623c58e2911 100644 --- a/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb +++ b/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb" require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientTest < Minitest::Test diff --git a/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec b/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec index 43528e3149a3..5f9502f3adcb 100644 --- a/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec +++ b/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" end diff --git a/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb index 96e77ec64ded..3e6a8d5d47d9 100644 --- a/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb b/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb index 236e9496495b..834d9244a704 100644 --- a/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb +++ b/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/connection/v1/connection_pb" -require "google/cloud/bigquery/connection/v1/connection_services_pb" require "google/cloud/bigquery/connection/v1/connection_service" class ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::ClientTest < Minitest::Test diff --git a/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec b/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec index 01d19d11e5cd..be0f11bd1b83 100644 --- a/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec +++ b/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" diff --git a/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb b/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb index d6a6f800fd50..49cc5ebe1a2d 100644 --- a/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb b/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb index b4ddd8b3bc5a..983bacf9fa23 100644 --- a/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb +++ b/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb" -require "google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb" require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service" class ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::ClientTest < Minitest::Test From fcd2e2f62c13d89b0ae019e31b537d1e7522cbbd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:40:57 -0700 Subject: [PATCH 445/457] chore: use HTTP binding configuration class from new gapic-common (#30851) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLW1hcHMtZmxlZXRfZW5naW5lLWRlbGl2ZXJ5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLW1hcHMtZmxlZXRfZW5naW5lLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLWNzcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWNvbnZlcnNpb25zLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWNvbnZlcnNpb25zLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFfc291cmNlcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFfc291cmNlcy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWlzc3VlX3Jlc29sdXRpb24tdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWlzc3VlX3Jlc29sdXRpb24tdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW5vdGlmaWNhdGlvbnMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW5vdGlmaWNhdGlvbnMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW9yZGVyX3RyYWNraW5nLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW9yZGVyX3RyYWNraW5nLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-maps-fleet_engine-delivery-v1.gemspec | 2 +- .../maps/fleet_engine/delivery/v1/delivery_service_test.rb | 1 - google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec | 2 +- .../test/google/maps/fleet_engine/v1/trip_service_test.rb | 1 - .../test/google/maps/fleet_engine/v1/vehicle_service_test.rb | 1 - google-shopping-css-v1/google-shopping-css-v1.gemspec | 2 +- .../test/google/shopping/css/v1/account_labels_service_test.rb | 1 - .../test/google/shopping/css/v1/accounts_service_test.rb | 1 - .../google/shopping/css/v1/css_product_inputs_service_test.rb | 1 - .../test/google/shopping/css/v1/css_products_service_test.rb | 1 - .../test/google/shopping/css/v1/quota_service_test.rb | 1 - .../google-shopping-merchant-accounts-v1.gemspec | 2 +- .../shopping/merchant/accounts/v1/account_issue_service_test.rb | 1 - .../merchant/accounts/v1/account_relationships_service_test.rb | 1 - .../merchant/accounts/v1/account_services_service_test.rb | 1 - .../shopping/merchant/accounts/v1/accounts_service_test.rb | 1 - .../merchant/accounts/v1/autofeed_settings_service_test.rb | 1 - .../merchant/accounts/v1/automatic_improvements_service_test.rb | 1 - .../merchant/accounts/v1/business_identity_service_test.rb | 1 - .../shopping/merchant/accounts/v1/business_info_service_test.rb | 1 - .../merchant/accounts/v1/checkout_settings_service_test.rb | 1 - .../merchant/accounts/v1/developer_registration_service_test.rb | 1 - .../merchant/accounts/v1/email_preferences_service_test.rb | 1 - .../shopping/merchant/accounts/v1/gbp_accounts_service_test.rb | 1 - .../shopping/merchant/accounts/v1/homepage_service_test.rb | 1 - .../shopping/merchant/accounts/v1/lfp_providers_service_test.rb | 1 - .../merchant/accounts/v1/omnichannel_settings_service_test.rb | 1 - .../merchant/accounts/v1/online_return_policy_service_test.rb | 1 - .../shopping/merchant/accounts/v1/programs_service_test.rb | 1 - .../shopping/merchant/accounts/v1/regions_service_test.rb | 1 - .../merchant/accounts/v1/shipping_settings_service_test.rb | 1 - .../v1/terms_of_service_agreement_state_service_test.rb | 1 - .../merchant/accounts/v1/terms_of_service_service_test.rb | 1 - .../google/shopping/merchant/accounts/v1/user_service_test.rb | 1 - .../google-shopping-merchant-accounts-v1beta.gemspec | 2 +- .../merchant/accounts/v1beta/account_issue_service_test.rb | 1 - .../merchant/accounts/v1beta/account_tax_service_test.rb | 1 - .../shopping/merchant/accounts/v1beta/accounts_service_test.rb | 1 - .../merchant/accounts/v1beta/autofeed_settings_service_test.rb | 1 - .../accounts/v1beta/automatic_improvements_service_test.rb | 1 - .../merchant/accounts/v1beta/business_identity_service_test.rb | 1 - .../merchant/accounts/v1beta/business_info_service_test.rb | 1 - .../merchant/accounts/v1beta/checkout_settings_service_test.rb | 1 - .../merchant/accounts/v1beta/email_preferences_service_test.rb | 1 - .../merchant/accounts/v1beta/gbp_accounts_service_test.rb | 1 - .../shopping/merchant/accounts/v1beta/homepage_service_test.rb | 1 - .../merchant/accounts/v1beta/lfp_providers_service_test.rb | 1 - .../accounts/v1beta/omnichannel_settings_service_test.rb | 1 - .../accounts/v1beta/online_return_policy_service_test.rb | 1 - .../shopping/merchant/accounts/v1beta/programs_service_test.rb | 1 - .../shopping/merchant/accounts/v1beta/regions_service_test.rb | 1 - .../merchant/accounts/v1beta/shipping_settings_service_test.rb | 1 - .../v1beta/terms_of_service_agreement_state_service_test.rb | 1 - .../merchant/accounts/v1beta/terms_of_service_service_test.rb | 1 - .../shopping/merchant/accounts/v1beta/user_service_test.rb | 1 - .../google-shopping-merchant-conversions-v1.gemspec | 2 +- .../merchant/conversions/v1/conversion_sources_service_test.rb | 1 - .../google-shopping-merchant-conversions-v1beta.gemspec | 2 +- .../conversions/v1beta/conversion_sources_service_test.rb | 1 - .../google-shopping-merchant-data_sources-v1.gemspec | 2 +- .../merchant/data_sources/v1/data_sources_service_test.rb | 1 - .../merchant/data_sources/v1/file_uploads_service_test.rb | 1 - .../google-shopping-merchant-data_sources-v1beta.gemspec | 2 +- .../merchant/data_sources/v1beta/data_sources_service_test.rb | 1 - .../merchant/data_sources/v1beta/file_uploads_service_test.rb | 1 - .../google-shopping-merchant-inventories-v1.gemspec | 2 +- .../merchant/inventories/v1/local_inventory_service_test.rb | 1 - .../merchant/inventories/v1/regional_inventory_service_test.rb | 1 - .../google-shopping-merchant-inventories-v1beta.gemspec | 2 +- .../merchant/inventories/v1beta/local_inventory_service_test.rb | 1 - .../inventories/v1beta/regional_inventory_service_test.rb | 1 - .../google-shopping-merchant-issue_resolution-v1.gemspec | 2 +- .../v1/aggregate_product_statuses_service_test.rb | 1 - .../issue_resolution/v1/issue_resolution_service_test.rb | 1 - .../google-shopping-merchant-issue_resolution-v1beta.gemspec | 2 +- .../v1beta/aggregate_product_statuses_service_test.rb | 1 - .../issue_resolution/v1beta/issue_resolution_service_test.rb | 1 - .../google-shopping-merchant-lfp-v1.gemspec | 2 +- .../shopping/merchant/lfp/v1/lfp_inventory_service_test.rb | 1 - .../shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb | 1 - .../google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb | 1 - .../google/shopping/merchant/lfp/v1/lfp_store_service_test.rb | 1 - .../google-shopping-merchant-lfp-v1beta.gemspec | 2 +- .../shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb | 1 - .../merchant/lfp/v1beta/lfp_merchant_state_service_test.rb | 1 - .../shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb | 1 - .../shopping/merchant/lfp/v1beta/lfp_store_service_test.rb | 1 - .../google-shopping-merchant-notifications-v1.gemspec | 2 +- .../merchant/notifications/v1/notifications_api_service_test.rb | 1 - .../google-shopping-merchant-notifications-v1beta.gemspec | 2 +- .../notifications/v1beta/notifications_api_service_test.rb | 1 - .../google-shopping-merchant-order_tracking-v1.gemspec | 2 +- .../order_tracking/v1/order_tracking_signals_service_test.rb | 1 - .../google-shopping-merchant-order_tracking-v1beta.gemspec | 2 +- .../v1beta/order_tracking_signals_service_test.rb | 1 - .../google-shopping-merchant-products-v1.gemspec | 2 +- .../merchant/products/v1/product_inputs_service_test.rb | 1 - .../shopping/merchant/products/v1/products_service_test.rb | 1 - 98 files changed, 20 insertions(+), 98 deletions(-) diff --git a/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec b/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec index a638486cbcb2..4b13ae6e0223 100644 --- a/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec +++ b/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-geo-type", "> 0.0", "< 2.a" end diff --git a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb index 9c532cd9df02..7bb6266569f0 100644 --- a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb +++ b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleetengine/delivery/v1/delivery_api_services_pb" require "google/maps/fleet_engine/delivery/v1/delivery_service" class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::ClientTest < Minitest::Test diff --git a/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec b/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec index 9d213bc96f4a..c5867107e99e 100644 --- a/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec +++ b/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-geo-type", "> 0.0", "< 2.a" end diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb index 8daf7969353c..2300b4d87bf0 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleetengine/v1/trip_api_services_pb" require "google/maps/fleet_engine/v1/trip_service" class ::Google::Maps::FleetEngine::V1::TripService::ClientTest < Minitest::Test diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb index 944fbbc83f7e..ca3942c3b166 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleetengine/v1/vehicle_api_services_pb" require "google/maps/fleet_engine/v1/vehicle_service" class ::Google::Maps::FleetEngine::V1::VehicleService::ClientTest < Minitest::Test diff --git a/google-shopping-css-v1/google-shopping-css-v1.gemspec b/google-shopping-css-v1/google-shopping-css-v1.gemspec index 84e43b60d8e8..da4803a869cf 100644 --- a/google-shopping-css-v1/google-shopping-css-v1.gemspec +++ b/google-shopping-css-v1/google-shopping-css-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb index 101d14fb6a31..c5f787ac8814 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/accounts_labels_services_pb" require "google/shopping/css/v1/account_labels_service" class ::Google::Shopping::Css::V1::AccountLabelsService::ClientTest < Minitest::Test diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb index ebeb9946e94a..59bb3ed5f563 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_services_pb" require "google/shopping/css/v1/accounts_service" class ::Google::Shopping::Css::V1::AccountsService::ClientTest < Minitest::Test diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb index 8429a6b609d1..7e975554908b 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_services_pb" require "google/shopping/css/v1/css_product_inputs_service" class ::Google::Shopping::Css::V1::CssProductInputsService::ClientTest < Minitest::Test diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb index 295c73ae366e..683401b8a3ff 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_services_pb" require "google/shopping/css/v1/css_products_service" class ::Google::Shopping::Css::V1::CssProductsService::ClientTest < Minitest::Test diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb index 40999908e6ce..f3511725373f 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_services_pb" require "google/shopping/css/v1/quota_service" class ::Google::Shopping::Css::V1::QuotaService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec b/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec index 588a8bf0177e..73edb5819556 100644 --- a/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec +++ b/google-shopping-merchant-accounts-v1/google-shopping-merchant-accounts-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb index 95f59cff2cde..e3e857e82a2d 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_issue_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/accountissue_pb" -require "google/shopping/merchant/accounts/v1/accountissue_services_pb" require "google/shopping/merchant/accounts/v1/account_issue_service" class ::Google::Shopping::Merchant::Accounts::V1::AccountIssueService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb index 5a144df4bb4a..52386f9a207a 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_relationships_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/accountrelationships_pb" -require "google/shopping/merchant/accounts/v1/accountrelationships_services_pb" require "google/shopping/merchant/accounts/v1/account_relationships_service" class ::Google::Shopping::Merchant::Accounts::V1::AccountRelationshipsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb index f8a4b7a9951d..065b26dea622 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/account_services_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/accountservices_pb" -require "google/shopping/merchant/accounts/v1/accountservices_services_pb" require "google/shopping/merchant/accounts/v1/account_services_service" class ::Google::Shopping::Merchant::Accounts::V1::AccountServicesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb index b63c9cec1291..9a73cd659d6c 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/accounts_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/accounts_pb" -require "google/shopping/merchant/accounts/v1/accounts_services_pb" require "google/shopping/merchant/accounts/v1/accounts_service" class ::Google::Shopping::Merchant::Accounts::V1::AccountsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb index a965758dde4a..c602975b9795 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/autofeed_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1/autofeedsettings_services_pb" require "google/shopping/merchant/accounts/v1/autofeed_settings_service" class ::Google::Shopping::Merchant::Accounts::V1::AutofeedSettingsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb index 17fc092d1270..033e13e0c57b 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/automatic_improvements_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1/automaticimprovements_services_pb" require "google/shopping/merchant/accounts/v1/automatic_improvements_service" class ::Google::Shopping::Merchant::Accounts::V1::AutomaticImprovementsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb index 4a563476aa76..ed1dc2ebf3c4 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_identity_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/businessidentity_pb" -require "google/shopping/merchant/accounts/v1/businessidentity_services_pb" require "google/shopping/merchant/accounts/v1/business_identity_service" class ::Google::Shopping::Merchant::Accounts::V1::BusinessIdentityService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb index b6ae407666be..3f266b45e09b 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/business_info_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/businessinfo_pb" -require "google/shopping/merchant/accounts/v1/businessinfo_services_pb" require "google/shopping/merchant/accounts/v1/business_info_service" class ::Google::Shopping::Merchant::Accounts::V1::BusinessInfoService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb index de11f48b9ddc..ae427025ddb6 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/checkout_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1/checkoutsettings_services_pb" require "google/shopping/merchant/accounts/v1/checkout_settings_service" class ::Google::Shopping::Merchant::Accounts::V1::CheckoutSettingsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb index 632b4b34a12f..32fb75a2114a 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/developer_registration_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/developerregistration_pb" -require "google/shopping/merchant/accounts/v1/developerregistration_services_pb" require "google/shopping/merchant/accounts/v1/developer_registration_service" class ::Google::Shopping::Merchant::Accounts::V1::DeveloperRegistrationService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb index 1dacfd7e6900..5dc7ac81480b 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/email_preferences_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1/emailpreferences_services_pb" require "google/shopping/merchant/accounts/v1/email_preferences_service" class ::Google::Shopping::Merchant::Accounts::V1::EmailPreferencesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb index beef6408a920..bef51b743505 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/gbp_accounts_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1/gbpaccounts_services_pb" require "google/shopping/merchant/accounts/v1/gbp_accounts_service" class ::Google::Shopping::Merchant::Accounts::V1::GbpAccountsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb index 1513e4d32066..eb2694476ccf 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/homepage_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/homepage_pb" -require "google/shopping/merchant/accounts/v1/homepage_services_pb" require "google/shopping/merchant/accounts/v1/homepage_service" class ::Google::Shopping::Merchant::Accounts::V1::HomepageService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb index 3061c126be51..04f8a4f418e8 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/lfp_providers_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1/lfpproviders_services_pb" require "google/shopping/merchant/accounts/v1/lfp_providers_service" class ::Google::Shopping::Merchant::Accounts::V1::LfpProvidersService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb index 4afa8bc1a588..01a251d45ad8 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/omnichannel_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1/omnichannelsettings_services_pb" require "google/shopping/merchant/accounts/v1/omnichannel_settings_service" class ::Google::Shopping::Merchant::Accounts::V1::OmnichannelSettingsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb index 2f4a992854b6..3baa1131de9f 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/online_return_policy_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1/online_return_policy_services_pb" require "google/shopping/merchant/accounts/v1/online_return_policy_service" class ::Google::Shopping::Merchant::Accounts::V1::OnlineReturnPolicyService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb index 4825eb1f6562..a3eb17b98743 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/programs_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/programs_pb" -require "google/shopping/merchant/accounts/v1/programs_services_pb" require "google/shopping/merchant/accounts/v1/programs_service" class ::Google::Shopping::Merchant::Accounts::V1::ProgramsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb index d44f0f8fc523..4b617d6494bf 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/regions_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/regions_pb" -require "google/shopping/merchant/accounts/v1/regions_services_pb" require "google/shopping/merchant/accounts/v1/regions_service" class ::Google::Shopping::Merchant::Accounts::V1::RegionsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb index 437b6f601cda..22d6abf62c1d 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/shipping_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1/shippingsettings_services_pb" require "google/shopping/merchant/accounts/v1/shipping_settings_service" class ::Google::Shopping::Merchant::Accounts::V1::ShippingSettingsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb index 945ab074fc81..b8d08a834efb 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1/termsofserviceagreementstate_services_pb" require "google/shopping/merchant/accounts/v1/terms_of_service_agreement_state_service" class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceAgreementStateService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb index 299943c9c8d7..61108582ae2b 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/terms_of_service_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/termsofservice_pb" -require "google/shopping/merchant/accounts/v1/termsofservice_services_pb" require "google/shopping/merchant/accounts/v1/terms_of_service_service" class ::Google::Shopping::Merchant::Accounts::V1::TermsOfServiceService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb index 02939760495b..cede9ed475da 100644 --- a/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb +++ b/google-shopping-merchant-accounts-v1/test/google/shopping/merchant/accounts/v1/user_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1/user_pb" -require "google/shopping/merchant/accounts/v1/user_services_pb" require "google/shopping/merchant/accounts/v1/user_service" class ::Google::Shopping::Merchant::Accounts::V1::UserService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec b/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec index 9114c28718ac..b276ed30bf5f 100644 --- a/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec +++ b/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb index 3d44534862c3..5e4759bffae9 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/accountissue_services_pb" require "google/shopping/merchant/accounts/v1beta/account_issue_service" class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb index 567223d81251..8b5aebd83a55 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_services_pb" require "google/shopping/merchant/accounts/v1beta/account_tax_service" class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb index 1d193edda638..9bb8cf23c30a 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_services_pb" require "google/shopping/merchant/accounts/v1beta/accounts_service" class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb index f3f2148437ce..8985bf72dc40 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb" require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb index 681ac4eed5d8..cb826c6f748a 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb" require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb index 180287021962..15873f41d5d8 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/businessidentity_services_pb" require "google/shopping/merchant/accounts/v1beta/business_identity_service" class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb index 9132810bcbfd..de7005d999ce 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/businessinfo_services_pb" require "google/shopping/merchant/accounts/v1beta/business_info_service" class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb index 64bc4ed0f210..ef85ff07a6cd 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb" require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb index 923758cc839c..ebfc04130631 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb" require "google/shopping/merchant/accounts/v1beta/email_preferences_service" class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb index a74731244007..14cee2ea2c67 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb" require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb index 9518c11149a7..c796bc56d715 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_services_pb" require "google/shopping/merchant/accounts/v1beta/homepage_service" class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb index 54685a4be77c..7b81bbc6d232 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb" require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb index da3246a99082..7b7d5fd32db3 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb" require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb index d1030d22e977..aea6c2dd544a 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb" require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb index bd60cece9b84..16f1d31a1aac 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_services_pb" require "google/shopping/merchant/accounts/v1beta/programs_service" class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb index e6b4831bcd5f..4598e6c98751 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_services_pb" require "google/shopping/merchant/accounts/v1beta/regions_service" class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb index 52912e178267..58752c5cba7b 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb" require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb index d40aebde59b9..e3b98cc13381 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb" require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb index 834d0696b771..860027178ee4 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/termsofservice_services_pb" require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb index a686e05fb039..e445951018d9 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_services_pb" require "google/shopping/merchant/accounts/v1beta/user_service" class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec b/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec index fdd25ca92568..db7aff9b88fe 100644 --- a/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec +++ b/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb index 25af1d228f89..8ac8db056dc4 100644 --- a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversionsources_services_pb" require "google/shopping/merchant/conversions/v1/conversion_sources_service" class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec b/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec index abcc47c23084..741aee856181 100644 --- a/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec +++ b/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb index 61324a8a460b..912488727588 100644 --- a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb +++ b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversionsources_services_pb" require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec b/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec index da01eaad697f..961fda10ab78 100644 --- a/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec +++ b/google-shopping-merchant-data_sources-v1/google-shopping-merchant-data_sources-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb index 06ecfa6e6242..1741943702da 100644 --- a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/datasources/v1/datasources_pb" -require "google/shopping/merchant/datasources/v1/datasources_services_pb" require "google/shopping/merchant/data_sources/v1/data_sources_service" class ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb index dbbc3deabf48..692d1263d1c3 100644 --- a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/datasources/v1/fileuploads_pb" -require "google/shopping/merchant/datasources/v1/fileuploads_services_pb" require "google/shopping/merchant/data_sources/v1/file_uploads_service" class ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec b/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec index 9afe851a4c83..f1ecee4aed74 100644 --- a/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec +++ b/google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb index fb98d511d96f..34b7126768b4 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/datasources/v1beta/datasources_pb" -require "google/shopping/merchant/datasources/v1beta/datasources_services_pb" require "google/shopping/merchant/data_sources/v1beta/data_sources_service" class ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb index 1ca0f19c22c8..bdf3dad1c516 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/datasources/v1beta/fileuploads_pb" -require "google/shopping/merchant/datasources/v1beta/fileuploads_services_pb" require "google/shopping/merchant/data_sources/v1beta/file_uploads_service" class ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec b/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec index 163d75af76f4..ea604a578794 100644 --- a/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec +++ b/google-shopping-merchant-inventories-v1/google-shopping-merchant-inventories-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb index db80a897ab4c..da1f677ad402 100644 --- a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/inventories/v1/localinventory_pb" -require "google/shopping/merchant/inventories/v1/localinventory_services_pb" require "google/shopping/merchant/inventories/v1/local_inventory_service" class ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb index df5e8a05cf3d..8a70019aa87a 100644 --- a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/inventories/v1/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1/regionalinventory_services_pb" require "google/shopping/merchant/inventories/v1/regional_inventory_service" class ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec b/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec index 687711083aa0..da82e94cf383 100644 --- a/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec +++ b/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb index f3303b208b81..8a2c9e273109 100644 --- a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb +++ b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/inventories/v1beta/localinventory_pb" -require "google/shopping/merchant/inventories/v1beta/localinventory_services_pb" require "google/shopping/merchant/inventories/v1beta/local_inventory_service" class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb index 9a4b04289ee6..b6ce466cf586 100644 --- a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb +++ b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb" require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec b/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec index 959c0f001437..2af6740fdfa0 100644 --- a/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec +++ b/google-shopping-merchant-issue_resolution-v1/google-shopping-merchant-issue_resolution-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb index 3c58c0768605..6455daa6013f 100644 --- a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb +++ b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb" -require "google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb" require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service" class ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb index 13dba636731d..fe3a633ba201 100644 --- a/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb +++ b/google-shopping-merchant-issue_resolution-v1/test/google/shopping/merchant/issue_resolution/v1/issue_resolution_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/issueresolution/v1/issueresolution_pb" -require "google/shopping/merchant/issueresolution/v1/issueresolution_services_pb" require "google/shopping/merchant/issue_resolution/v1/issue_resolution_service" class ::Google::Shopping::Merchant::IssueResolution::V1::IssueResolutionService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec b/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec index 39424e7da8d4..ed6dbbd655af 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec +++ b/google-shopping-merchant-issue_resolution-v1beta/google-shopping-merchant-issue_resolution-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb index da9316e2100d..a3286b2897df 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb +++ b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_pb" -require "google/shopping/merchant/issueresolution/v1beta/aggregateproductstatuses_services_pb" require "google/shopping/merchant/issue_resolution/v1beta/aggregate_product_statuses_service" class ::Google::Shopping::Merchant::IssueResolution::V1beta::AggregateProductStatusesService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb index 68ca85b23f9a..2946d9eab27f 100644 --- a/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb +++ b/google-shopping-merchant-issue_resolution-v1beta/test/google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/issueresolution/v1beta/issueresolution_pb" -require "google/shopping/merchant/issueresolution/v1beta/issueresolution_services_pb" require "google/shopping/merchant/issue_resolution/v1beta/issue_resolution_service" class ::Google::Shopping::Merchant::IssueResolution::V1beta::IssueResolutionService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec b/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec index 4c1dd8c48457..badcd50d9815 100644 --- a/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec +++ b/google-shopping-merchant-lfp-v1/google-shopping-merchant-lfp-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb index 34089a47e1dd..aa1b816e36fb 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/lfp/v1/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1/lfpinventory_services_pb" require "google/shopping/merchant/lfp/v1/lfp_inventory_service" class ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb index 9afcba876650..2e72ca0f63b1 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/lfp/v1/lfpmerchantstate_pb" -require "google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb" require "google/shopping/merchant/lfp/v1/lfp_merchant_state_service" class ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb index be5fdee96488..8e01b8810e55 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/lfp/v1/lfpsale_pb" -require "google/shopping/merchant/lfp/v1/lfpsale_services_pb" require "google/shopping/merchant/lfp/v1/lfp_sale_service" class ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb index d26b7998c4eb..2bb0ebaaa054 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/lfp/v1/lfpstore_pb" -require "google/shopping/merchant/lfp/v1/lfpstore_services_pb" require "google/shopping/merchant/lfp/v1/lfp_store_service" class ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec b/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec index 6b9ed8f6b5e3..5300eb7e3a03 100644 --- a/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec +++ b/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb index 10f86e1cd644..cab698941c91 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb" require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb index 74028e096416..50c34fc625fd 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb" -require "google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb" require "google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service" class ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb index 5170a7760274..5feb3aa5e930 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" -require "google/shopping/merchant/lfp/v1beta/lfpsale_services_pb" require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb index 3882f02141b9..1fea18eaa345 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" -require "google/shopping/merchant/lfp/v1beta/lfpstore_services_pb" require "google/shopping/merchant/lfp/v1beta/lfp_store_service" class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec b/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec index 375e1eaae98a..3cc1b4d88f5a 100644 --- a/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec +++ b/google-shopping-merchant-notifications-v1/google-shopping-merchant-notifications-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb b/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb index 7b8ecb2e81ef..f49d6c974ff9 100644 --- a/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb +++ b/google-shopping-merchant-notifications-v1/test/google/shopping/merchant/notifications/v1/notifications_api_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/notifications/v1/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1/notificationsapi_services_pb" require "google/shopping/merchant/notifications/v1/notifications_api_service" class ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec b/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec index d316da5dddc6..85691a068f2a 100644 --- a/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec +++ b/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb b/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb index 26f151e0e6cc..044f8fe7d970 100644 --- a/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb +++ b/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb" require "google/shopping/merchant/notifications/v1beta/notifications_api_service" class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec b/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec index b75afc115aa3..d08867ec8986 100644 --- a/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec +++ b/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb b/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb index 62eb5d67a64c..6fea873d7ac9 100644 --- a/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb +++ b/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" -require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb" require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service" class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec b/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec index 80c8efccc01d..828d16b4546a 100644 --- a/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec +++ b/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" end diff --git a/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb b/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb index ae4202683fb9..b91fc0e2ea82 100644 --- a/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb +++ b/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" -require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb" require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service" class ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec b/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec index 50c1dd6fd4f9..e2203bb4802b 100644 --- a/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec +++ b/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-shopping-type", "~> 1.0" end diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb index 9ec2b72a2ddd..64d25bf96a78 100644 --- a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/products/v1/productinputs_pb" -require "google/shopping/merchant/products/v1/productinputs_services_pb" require "google/shopping/merchant/products/v1/product_inputs_service" class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::ClientTest < Minitest::Test diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb index ccec00216f98..9baac61c77c8 100644 --- a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/shopping/merchant/products/v1/products_pb" -require "google/shopping/merchant/products/v1/products_services_pb" require "google/shopping/merchant/products/v1/products_service" class ::Google::Shopping::Merchant::Products::V1::ProductsService::ClientTest < Minitest::Test From 0ab16b7a1a2a407314688737e9c9825410f77cc0 Mon Sep 17 00:00:00 2001 From: Charlotte Y <38296042+cy-yun@users.noreply.github.com> Date: Tue, 19 Aug 2025 14:24:48 -0700 Subject: [PATCH 446/457] feat(BigQuery): Add support for IAM Condition in Dataset Access (#30854) --- .../bigquery/dataset_access_test.rb | 286 ++++++++++++++++ .../lib/google/cloud/bigquery/condition.rb | 218 ++++++++++++ .../lib/google/cloud/bigquery/dataset.rb | 12 +- .../google/cloud/bigquery/dataset/access.rb | 309 ++++++++++++++++-- .../lib/google/cloud/bigquery/project.rb | 40 ++- .../lib/google/cloud/bigquery/service.rb | 17 +- .../google/cloud/bigquery/backoff_test.rb | 4 +- .../cloud/bigquery/dataset_access_test.rb | 242 +++++++++++++- .../cloud/bigquery/dataset_attributes_test.rb | 12 +- .../cloud/bigquery/dataset_exists_test.rb | 2 +- .../cloud/bigquery/dataset_reference_test.rb | 4 +- .../bigquery/dataset_reference_update_test.rb | 24 +- .../cloud/bigquery/dataset_reload_test.rb | 6 +- .../google/cloud/bigquery/dataset_test.rb | 2 +- .../cloud/bigquery/dataset_update_test.rb | 12 +- .../google/cloud/bigquery/project_test.rb | 16 +- 16 files changed, 1105 insertions(+), 101 deletions(-) create mode 100644 google-cloud-bigquery/lib/google/cloud/bigquery/condition.rb diff --git a/google-cloud-bigquery/acceptance/bigquery/dataset_access_test.rb b/google-cloud-bigquery/acceptance/bigquery/dataset_access_test.rb index 6efcbf374e22..277935ccd1e6 100644 --- a/google-cloud-bigquery/acceptance/bigquery/dataset_access_test.rb +++ b/google-cloud-bigquery/acceptance/bigquery/dataset_access_test.rb @@ -13,6 +13,7 @@ # limitations under the License. require "bigquery_helper" +require "google/cloud/bigquery/condition" describe Google::Cloud::Bigquery::Dataset, :access, :bigquery do let(:publicdata_query) { "SELECT url FROM `bigquery-public-data.samples.github_nested` LIMIT 100" } @@ -161,4 +162,289 @@ refute dataset.access.reader_routine? routine end end + + describe :condition do + let(:dataset_id) { "#{prefix}_dataset_with_condition" } + let(:dataset) do + bigquery.dataset(dataset_id, access_policy_version: 3) || + bigquery.create_dataset(dataset_id, access_policy_version: 3) + end + let(:condition) do + Google::Cloud::Bigquery::Condition.new( + "true", + description: "example description", + location: "path/to/example/location", + title: "example title" + ) + end + let(:condition_hash) { condition.to_gapi.to_h } + let(:group_val) { "ruby-cloud-eng@google.com" } + let(:service_account) { "helical-zone-771@appspot.gserviceaccount.com" } + let(:iam_member_val) { "serviceAccount:#{service_account}" } + let(:domain_val) { "google.com" } + + it "adds a reader access entry with specifying user scope and condition" do + dataset.access do |acl| + acl.add_reader_user user_val, condition: condition + end + + dataset.reload! + assert dataset.access.reader_user? user_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:user_by_email] == user_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "READER" + end) + end + + dataset.access do |acl| + acl.remove_reader_user user_val + end + dataset.reload! + refute dataset.access.reader_user? user_val + end + + it "adds a reader access entry with specifying group scope and condition" do + dataset.access do |acl| + acl.add_reader_group group_val, condition: condition + end + + dataset.reload! + assert dataset.access.reader_group? group_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:group_by_email] == group_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "READER" + end) + end + + dataset.access do |acl| + acl.remove_reader_group group_val + end + dataset.reload! + refute dataset.access.reader_group? group_val + end + + it "adds a reader access entry with specifying iam_member scope and condition" do + dataset.access do |acl| + acl.add_reader_iam_member iam_member_val, condition: condition + end + + dataset.reload! + assert dataset.access.reader_user? service_account + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:user_by_email] == service_account && rule_hash[:condition] == condition_hash && rule_hash[:role] == "READER" + end) + end + + dataset.access do |acl| + acl.remove_reader_user service_account + end + dataset.reload! + refute dataset.access.reader_user? service_account + end + + it "adds a reader access entry with specifying domain scope and condition" do + dataset.access do |acl| + acl.add_reader_domain domain_val, condition: condition + end + + dataset.reload! + assert dataset.access.reader_domain? domain_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:domain] == domain_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "READER" + end) + end + + dataset.access do |acl| + acl.remove_reader_domain domain_val + end + dataset.reload! + refute dataset.access.reader_domain? domain_val + end + + it "adds a writer access entry with specifying user scope and condition" do + dataset.access do |acl| + acl.add_writer_user user_val, condition: condition + end + + dataset.reload! + assert dataset.access.writer_user? user_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:user_by_email] == user_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "WRITER" + end) + end + + dataset.access do |acl| + acl.remove_writer_user user_val + end + dataset.reload! + refute dataset.access.writer_user? user_val + end + + it "adds a writer access entry with specifying group scope and condition" do + dataset.access do |acl| + acl.add_writer_group group_val, condition: condition + end + + dataset.reload! + assert dataset.access.writer_group? group_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:group_by_email] == group_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "WRITER" + end) + end + + dataset.access do |acl| + acl.remove_writer_group group_val + end + dataset.reload! + refute dataset.access.writer_group? group_val + end + + it "adds a writer access entry with specifying iam_member scope and condition" do + dataset.access do |acl| + acl.add_writer_iam_member iam_member_val, condition: condition + end + + dataset.reload! + assert dataset.access.writer_user? service_account + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:user_by_email] == service_account && rule_hash[:condition] == condition_hash && rule_hash[:role] == "WRITER" + end) + end + + dataset.access do |acl| + acl.remove_writer_user service_account + end + dataset.reload! + refute dataset.access.writer_user? service_account + end + + it "adds a writer access entry with specifying domain scope and condition" do + dataset.access do |acl| + acl.add_writer_domain domain_val, condition: condition + end + + dataset.reload! + assert dataset.access.writer_domain? domain_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:domain] == domain_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "WRITER" + end) + end + + dataset.access do |acl| + acl.remove_writer_domain domain_val + end + dataset.reload! + refute dataset.access.writer_domain? domain_val + end + + it "adds a owner access entry with specifying user scope and condition" do + dataset.access do |acl| + acl.add_owner_user user_val, condition: condition + end + + dataset.reload! + assert dataset.access.owner_user? user_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:user_by_email] == user_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "OWNER" + end) + end + + dataset.access do |acl| + acl.remove_owner_user user_val + end + dataset.reload! + refute dataset.access.owner_user? user_val + end + + it "adds a owner access entry with specifying group scope and condition" do + dataset.access do |acl| + acl.add_owner_group group_val, condition: condition + end + + dataset.reload! + assert dataset.access.owner_group? group_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:group_by_email] == group_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "OWNER" + end) + end + + dataset.access do |acl| + acl.remove_owner_group group_val + end + dataset.reload! + refute dataset.access.owner_group? group_val + end + + it "adds a owner access entry with specifying iam_member scope and condition" do + dataset.access do |acl| + acl.add_owner_iam_member iam_member_val, condition: condition + end + + dataset.reload! + assert dataset.access.owner_user? service_account + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:user_by_email] == service_account && rule_hash[:condition] == condition_hash && rule_hash[:role] == "OWNER" + end) + end + + dataset.access do |acl| + acl.remove_owner_user service_account + end + dataset.reload! + refute dataset.access.owner_user? service_account + end + + it "adds a owner access entry with specifying domain scope and condition" do + dataset.access do |acl| + acl.add_owner_domain domain_val, condition: condition + end + + dataset.reload! + assert dataset.access.owner_domain? domain_val + + dataset.access do |acl| + assert(acl.rules.find do |rule| + rule_hash = rule.to_h + rule_hash[:domain] == domain_val && rule_hash[:condition] == condition_hash && rule_hash[:role] == "OWNER" + end) + end + + dataset.access do |acl| + acl.remove_owner_domain domain_val + end + dataset.reload! + refute dataset.access.owner_domain? domain_val + end + end end diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/condition.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/condition.rb new file mode 100644 index 000000000000..43077f4efff7 --- /dev/null +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/condition.rb @@ -0,0 +1,218 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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. + +require "google/apis/bigquery_v2" + +module Google + module Cloud + module Bigquery + ## + # # Condition + # + # Represents a textual expression in the Common Expression Language (CEL) syntax. + # CEL is a C-like expression language. The syntax and semantics of CEL are documented + # at https://github.com/google/cel-spec + # + # Used to define condition for {Dataset::Access} rules + # + class Condition + ## + # Returns the textual representation of an expression in Common Expression Language syntax. + # + # @return [String] The expression of the condition. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith('projects/my-project')" + # ) + # puts condition.expression # => "resource.name.startsWith('projects/my-project')" + # + def expression + @expression + end + + ## + # Sets the textual representation of an expression in Common Expression Language syntax. + # + # @param [String] val The expression to set. + # + # @raise [ArgumentError] if the expression is nil or empty. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith('projects/my-project')" + # ) + # condition.expression = "document.summary.size() < 100" + # + def expression= val + if val.nil? || val.strip.empty? + raise ArgumentError, "Expression cannot be nil or empty" + end + @expression = val + end + + ## + # Returns the optional description of the expression. This is a longer text which describes + # the expression, e.g. when hovered over it in a UI. + # + # @return [String, nil] The description of the condition. nil if not set. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "document.summary.size() < 100", + # description: "Checks if summary is less than 100 chars" + # ) + # puts condition.description # => "Checks if summary is less than 100 chars" + # + def description + @description + end + + ## + # Sets the optional description of the expression. This is a longer text which describes + # the expression, e.g. when hovered over it in a UI. + # + # @param [String, nil] val The description to set. nil to unset. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "document.summary.size() < 100" + # ) + # condition.description = "Checks if summary is less than 100 chars" + # + def description= val + @description = val + end + + ## + # Returns the optional string indicating the location of the expression for error reporting, + # e.g. a file name and a position in the file. + # + # @return [String, nil] The location of the condition. nil if not set. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "document.summary.size() < 100", + # location: "document/summary" + # ) + # puts condition.location # => "document/summary" + # + def location + @location + end + + ## + # Sets the optional string indicating the location of the expression for error reporting, + # e.g. a file name and a position in the file. + # + # @param [String, nil] val The location to set. nil to unset. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "document.summary.size() < 100" + # ) + # condition.location = "document/summary" + # + def location= val + @location = val + end + + ## + # Returns the optional title for the expression, i.e. a short string describing its purpose. + # This can be used e.g. in UIs which allow to enter the expression. + # + # @return [String, nil] The title of the condition. nil if not set. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "document.summary.size() < 100", + # title: "Summary size limit" + # ) + # puts condition.title # => "Summary size limit" + # + def title + @title + end + + ## + # Sets the optional title for the expression, i.e. a short string describing its purpose. + # This can be used e.g. in UIs which allow to enter the expression. + # + # @param [String, nil] val The title to set. nil to unset. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "document.summary.size() < 100" + # ) + # condition.title = "Summary size limit" + # + def title= val + @title = val + end + + ## + # Create a new Condition object. + # + # @param [String] expression The expression in CEL syntax. + # @param [String] description Optional description of the expression. + # @param [String] location Optional location of the expression for error reporting. + # @param [String] title Optional title for the expression. + # + # @raise [ArgumentError] if expression is nil or empty. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "document.summary.size() < 100", + # description: "Determines if a summary is less than 100 chars", + # location: "document/summary", + # title: "Summary size limit" + # ) + # + # @see https://cloud.google.com/bigquery/docs/reference/auditlogs/rest/Shared.Types/Expr + # + def initialize expression, description: nil, location: nil, title: nil + if expression.nil? || expression.strip.empty? + raise ArgumentError, "Expression cannot be nil or empty" + end + @expression = expression + @description = description + @location = location + @title = title + end + + ## + # @private Convert the Condition object to a Google API Client object. + # + # @return [Google::Apis::BigqueryV2::Expr] The Google API Client object representing the condition. + # + # @example + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith('projects/my-project')" + # ) + # gapi_condition = condition.to_gapi + # + # @see https://cloud.google.com/bigquery/docs/reference/auditlogs/rest/Shared.Types/Expr + # + def to_gapi + gapi = Google::Apis::BigqueryV2::Expr.new + gapi.description = @description unless @description.nil? + gapi.expression = @expression + gapi.location = @location unless @location.nil? + gapi.title = @title unless @title.nil? + gapi + end + end + end + end +end diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb index e7529f2ed786..691d13097826 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/dataset.rb @@ -59,12 +59,17 @@ class Dataset # @private A Google API Client Dataset Reference object. attr_reader :reference + ## + # @private Access Policy Version for get, update, patch, and insert API calls + attr_accessor :access_policy_version + ## # @private Create an empty Dataset object. def initialize @service = nil @gapi = nil @reference = nil + @access_policy_version = nil end ## @@ -2447,7 +2452,7 @@ def load table_id, files, format: nil, create: nil, write: nil, projection_field # def reload! ensure_service! - @gapi = service.get_project_dataset project_id, dataset_id + @gapi = service.get_project_dataset project_id, dataset_id, access_policy_version: @access_policy_version @reference = nil @exists = nil self @@ -2576,10 +2581,11 @@ def resource_full? ## # @private New Dataset from a Google API Client object. - def self.from_gapi gapi, conn + def self.from_gapi gapi, conn, access_policy_version: nil new.tap do |f| f.gapi = gapi f.service = conn + f.access_policy_version = access_policy_version end end @@ -2903,7 +2909,7 @@ def patch_gapi! *attributes patch_args = attributes.to_h { |attr| [attr, @gapi.send(attr)] } patch_gapi = Google::Apis::BigqueryV2::Dataset.new(**patch_args) patch_gapi.etag = etag if etag - @gapi = service.patch_dataset dataset_id, patch_gapi + @gapi = service.patch_dataset dataset_id, patch_gapi, access_policy_version: @access_policy_version end ## diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/dataset/access.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/dataset/access.rb index f85637015be2..e50872b431b1 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/dataset/access.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/dataset/access.rb @@ -121,6 +121,13 @@ def to_a # Add reader access to a user. # # @param [String] email The email address for the entity. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -132,14 +139,35 @@ def to_a # access.add_reader_user "entity@example.com" # end # - def add_reader_user email - add_access_role_scope_value :reader, :user, email + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_reader_user "entity@example.com", condition: condition + # end + # + def add_reader_user email, condition: nil + add_access_role_scope_value :reader, :user, email, condition end ## # Add reader access to a group. # # @param [String] email The email address for the entity. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -151,8 +179,22 @@ def add_reader_user email # access.add_reader_group "entity@example.com" # end # - def add_reader_group email - add_access_role_scope_value :reader, :group, email + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_reader_group "entity@example.com", condition: condition + # end + # + def add_reader_group email, condition: nil + add_access_role_scope_value :reader, :group, email, condition end ## @@ -160,6 +202,13 @@ def add_reader_group email # Policy but isn't a user, group, domain, or special group. # # @param [String] identity The identity reference. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -171,8 +220,22 @@ def add_reader_group email # access.add_reader_iam_member "entity@example.com" # end # - def add_reader_iam_member identity - add_access_role_scope_value :reader, :iam_member, identity + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_reader_iam_member "entity@example.com", condition: condition + # end + # + def add_reader_iam_member identity, condition: nil + add_access_role_scope_value :reader, :iam_member, identity, condition end ## @@ -180,6 +243,13 @@ def add_reader_iam_member identity # # @param [String] domain A [Cloud Identity # domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain). + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -191,8 +261,22 @@ def add_reader_iam_member identity # access.add_reader_domain "example.com" # end # - def add_reader_domain domain - add_access_role_scope_value :reader, :domain, domain + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_reader_domain "example.com", condition: condition + # end + # + def add_reader_domain domain, condition: nil + add_access_role_scope_value :reader, :domain, domain, condition end ## @@ -212,7 +296,7 @@ def add_reader_domain domain # end # def add_reader_special group - add_access_role_scope_value :reader, :special, group + add_access_role_scope_value :reader, :special, group, nil end ## @@ -311,6 +395,13 @@ def add_reader_dataset dataset # Add writer access to a user. # # @param [String] email The email address for the entity. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -322,14 +413,35 @@ def add_reader_dataset dataset # access.add_writer_user "entity@example.com" # end # - def add_writer_user email - add_access_role_scope_value :writer, :user, email + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_writer_user "entity@example.com", condition: condition + # end + # + def add_writer_user email, condition: nil + add_access_role_scope_value :writer, :user, email, condition end ## # Add writer access to a group. # # @param [String] email The email address for the entity. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -341,8 +453,22 @@ def add_writer_user email # access.add_writer_group "entity@example.com" # end # - def add_writer_group email - add_access_role_scope_value :writer, :group, email + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_writer_group "entity@example.com", condition: condition + # end + # + def add_writer_group email, condition: nil + add_access_role_scope_value :writer, :group, email, condition end ## @@ -350,6 +476,13 @@ def add_writer_group email # Policy but isn't a user, group, domain, or special group. # # @param [String] identity The identity reference. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -361,8 +494,22 @@ def add_writer_group email # access.add_writer_iam_member "entity@example.com" # end # - def add_writer_iam_member identity - add_access_role_scope_value :writer, :iam_member, identity + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_writer_iam_member "entity@example.com", condition: condition + # end + # + def add_writer_iam_member identity, condition: nil + add_access_role_scope_value :writer, :iam_member, identity, condition end ## @@ -370,6 +517,13 @@ def add_writer_iam_member identity # # @param [String] domain A [Cloud Identity # domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain). + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -381,8 +535,22 @@ def add_writer_iam_member identity # access.add_writer_domain "example.com" # end # - def add_writer_domain domain - add_access_role_scope_value :writer, :domain, domain + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_writer_domain "example.com", condition: condition + # end + # + def add_writer_domain domain, condition: nil + add_access_role_scope_value :writer, :domain, domain, condition end ## @@ -402,13 +570,20 @@ def add_writer_domain domain # end # def add_writer_special group - add_access_role_scope_value :writer, :special, group + add_access_role_scope_value :writer, :special, group, nil end ## # Add owner access to a user. # # @param [String] email The email address for the entity. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -420,14 +595,35 @@ def add_writer_special group # access.add_owner_user "entity@example.com" # end # - def add_owner_user email - add_access_role_scope_value :owner, :user, email + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_owner_user "entity@example.com", condition: condition + # end + # + def add_owner_user email, condition: nil + add_access_role_scope_value :owner, :user, email, condition end ## # Add owner access to a group. # # @param [String] email The email address for the entity. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -439,8 +635,22 @@ def add_owner_user email # access.add_owner_group "entity@example.com" # end # - def add_owner_group email - add_access_role_scope_value :owner, :group, email + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_owner_group "entity@example.com", condition: condition + # end + # + def add_owner_group email, condition: nil + add_access_role_scope_value :owner, :group, email, condition end ## @@ -448,6 +658,13 @@ def add_owner_group email # Policy but isn't a user, group, domain, or special group. # # @param [String] identity The identity reference. + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -459,8 +676,22 @@ def add_owner_group email # access.add_owner_iam_member "entity@example.com" # end # - def add_owner_iam_member identity - add_access_role_scope_value :owner, :iam_member, identity + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_owner_iam_member "entity@example.com", condition: condition + # end + # + def add_owner_iam_member identity, condition: nil + add_access_role_scope_value :owner, :iam_member, identity, condition end ## @@ -468,6 +699,13 @@ def add_owner_iam_member identity # # @param [String] domain A [Cloud Identity # domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain). + # @param [Google::Cloud::Bigquery::Condition, nil] condition An + # optional condition for the access rule. A condition is a CEL + # expression that is evaluated to determine if the access rule + # should be applied. See {Google::Cloud::Bigquery::Condition} for + # more information. To specify a condition, the + # `access_policy_version` on the dataset must be set to `3`. `nil` + # represents an absence of a condition. The default is `nil`. # # @example # require "google/cloud/bigquery" @@ -479,8 +717,22 @@ def add_owner_iam_member identity # access.add_owner_domain "example.com" # end # - def add_owner_domain domain - add_access_role_scope_value :owner, :domain, domain + # @example With a condition: + # require "google/cloud/bigquery" + # + # bigquery = Google::Cloud::Bigquery.new + # dataset = bigquery.dataset "my_dataset" + # condition = Google::Cloud::Bigquery::Condition.new( + # "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")", + # title: "Table foo only" + # ) + # + # dataset.access do |access| + # access.add_owner_domain "example.com", condition: condition + # end + # + def add_owner_domain domain, condition: nil + add_access_role_scope_value :owner, :domain, domain, condition end ## @@ -500,7 +752,7 @@ def add_owner_domain domain # end # def add_owner_special group - add_access_role_scope_value :owner, :special, group + add_access_role_scope_value :owner, :special, group, nil end ## @@ -1309,7 +1561,7 @@ def validate_dataset dataset end # @private - def add_access_role_scope_value role, scope, value + def add_access_role_scope_value role, scope, value, condition role = validate_role role scope = validate_scope scope # If scope is special group, make sure value is in the list @@ -1318,6 +1570,7 @@ def add_access_role_scope_value role, scope, value @rules.reject!(&find_by_scope_and_value(scope, value)) # Add new rule for this role, scope, and value opts = { role: role, scope => value } + opts[:condition] = condition.to_gapi unless condition.nil? @rules << Google::Apis::BigqueryV2::Dataset::Access.new(**opts) end diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb index b7a144323033..6fa8bf340de5 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/project.rb @@ -1382,6 +1382,20 @@ def external url, format: nil # service. Calls made on this object will raise errors if the resource # does not exist. Default is `false`. Optional. # @param [String] project_id The GCP Project where the dataset lives. + # @param [Integer] access_policy_version Optional. The version of the + # provided access policy schema. Valid values are `0`, `1`, and `3`. + # Requests specifying an invalid value will be rejected. This + # version refers to the schema version of the access policy and not + # the version of access policy. This field's value can be equal or + # more than the access policy schema provided in the request. For + # example, requests with conditional access policy binding in datasets + # must specify version `3`. But dataset with no conditional role + # bindings in access policy may specify any valid value or leave the + # field unset. If unset or if `0` or `1` value is used for dataset with + # conditional bindings, request will be rejected. This field will be + # mapped to + # [IAM Policy version](https://cloud.google.com/iam/docs/policies#versions) + # and will be used to set policy in IAM. # # @return [Google::Cloud::Bigquery::Dataset, nil] Returns `nil` if the # dataset does not exist. @@ -1409,12 +1423,12 @@ def external url, format: nil # # dataset = bigquery.dataset "my_dataset", skip_lookup: true # - def dataset dataset_id, skip_lookup: nil, project_id: nil + def dataset dataset_id, skip_lookup: nil, project_id: nil, access_policy_version: nil ensure_service! project_id ||= project return Dataset.new_reference project_id, dataset_id, service if skip_lookup - gapi = service.get_project_dataset project_id, dataset_id - Dataset.from_gapi gapi, service + gapi = service.get_project_dataset project_id, dataset_id, access_policy_version: access_policy_version + Dataset.from_gapi gapi, service, access_policy_version: access_policy_version rescue Google::Cloud::NotFoundError nil end @@ -1433,6 +1447,20 @@ def dataset dataset_id, skip_lookup: nil, project_id: nil # @param [String] location The geographic location where the dataset # should reside. Possible values include `EU` and `US`. The default # value is `US`. + # @param [Integer] access_policy_version Optional. The version of the + # provided access policy schema. Valid values are `0`, `1`, and `3`. + # Requests specifying an invalid value will be rejected. This + # version refers to the schema version of the access policy and not + # the version of access policy. This field's value can be equal or + # more than the access policy schema provided in the request. For + # example, requests with conditional access policy binding in datasets + # must specify version `3`. But dataset with no conditional role + # bindings in access policy may specify any valid value or leave the + # field unset. If unset or if `0` or `1` value is used for dataset with + # conditional bindings, request will be rejected. This field will be + # mapped to + # [IAM Policy version](https://cloud.google.com/iam/docs/policies#versions) + # and will be used to set policy in IAM. # @yield [access] a block for setting rules # @yieldparam [Google::Cloud::Bigquery::Dataset] access the object # accepting rules @@ -1465,7 +1493,7 @@ def dataset dataset_id, skip_lookup: nil, project_id: nil # end # def create_dataset dataset_id, name: nil, description: nil, - expiration: nil, location: nil + expiration: nil, location: nil, access_policy_version: nil ensure_service! new_ds = Google::Apis::BigqueryV2::Dataset.new( @@ -1488,8 +1516,8 @@ def create_dataset dataset_id, name: nil, description: nil, updater.check_for_mutated_access! end - gapi = service.insert_dataset new_ds - Dataset.from_gapi gapi, service + gapi = service.insert_dataset new_ds, access_policy_version: access_policy_version + Dataset.from_gapi gapi, service, access_policy_version: access_policy_version end ## diff --git a/google-cloud-bigquery/lib/google/cloud/bigquery/service.rb b/google-cloud-bigquery/lib/google/cloud/bigquery/service.rb index 5af40429b0af..6624d6409303 100644 --- a/google-cloud-bigquery/lib/google/cloud/bigquery/service.rb +++ b/google-cloud-bigquery/lib/google/cloud/bigquery/service.rb @@ -109,29 +109,29 @@ def list_datasets all: nil, filter: nil, max: nil, token: nil ## # Returns the dataset specified by datasetID. - def get_dataset dataset_id - get_project_dataset @project, dataset_id + def get_dataset dataset_id, access_policy_version: nil + get_project_dataset @project, dataset_id, access_policy_version: access_policy_version end ## # Gets the specified dataset resource by full dataset reference. - def get_project_dataset project_id, dataset_id + def get_project_dataset project_id, dataset_id, access_policy_version: nil # The get operation is considered idempotent execute backoff: true do - service.get_dataset project_id, dataset_id + service.get_dataset project_id, dataset_id, access_policy_version: access_policy_version end end ## # Creates a new empty dataset. - def insert_dataset new_dataset_gapi - execute { service.insert_dataset @project, new_dataset_gapi } + def insert_dataset new_dataset_gapi, access_policy_version: nil + execute { service.insert_dataset @project, new_dataset_gapi, access_policy_version: access_policy_version } end ## # Updates information in an existing dataset, only replacing # fields that are provided in the submitted dataset resource. - def patch_dataset dataset_id, patched_dataset_gapi + def patch_dataset dataset_id, patched_dataset_gapi, access_policy_version: nil patch_with_backoff = false options = {} if patched_dataset_gapi.etag @@ -140,7 +140,8 @@ def patch_dataset dataset_id, patched_dataset_gapi patch_with_backoff = true end execute backoff: patch_with_backoff do - service.patch_dataset @project, dataset_id, patched_dataset_gapi, options: options + service.patch_dataset @project, dataset_id, patched_dataset_gapi, options: options, +access_policy_version: access_policy_version end end diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/backoff_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/backoff_test.rb index 70f6657fefd6..87d2337cc06a 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/backoff_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/backoff_test.rb @@ -21,10 +21,10 @@ it "finds a dataset without any retry or backoff" do mock = Minitest::Mock.new mock.expect :get_dataset, find_dataset_gapi(dataset_id), - [project, dataset_id] + [project, dataset_id], access_policy_version: nil bigquery.service.mocked_service = mock - dataset = bigquery.dataset dataset_id + dataset = bigquery.dataset dataset_id, access_policy_version: nil mock.verify diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_access_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_access_test.rb index 947c535ef2e6..7f5abb201883 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_access_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_access_test.rb @@ -13,13 +13,25 @@ # limitations under the License. require "helper" +require "google/cloud/bigquery/condition" describe Google::Cloud::Bigquery::Dataset, :access, :mock_bigquery do # Create a dataset object with the project's mocked connection object let(:dataset_id) { "my_dataset" } let(:dataset_gapi) { random_dataset_gapi dataset_id } - let(:dataset) { Google::Cloud::Bigquery::Dataset.from_gapi dataset_gapi, - bigquery.service } + let(:dataset) do + Google::Cloud::Bigquery::Dataset.from_gapi dataset_gapi, + bigquery.service + end + + let(:condition) do + Google::Cloud::Bigquery::Condition.new( + "true", + description: "example description", + location: "path/to/example/location", + title: "example title" + ) + end it "gets the access rules" do _(dataset.access).must_be :empty? @@ -32,7 +44,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "WRITER", user_by_email: "writer@example.com" updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.access).must_be_kind_of Google::Cloud::Bigquery::Dataset::Access _(dataset.access).must_be :frozen? @@ -81,7 +93,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "WRITER", group_by_email: "writers@example.com" updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| # reader @@ -116,7 +128,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "WRITER", iam_member: "writers@example.com" updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| # reader @@ -151,7 +163,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "OWNER", domain: "example.com" updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| # reader @@ -186,7 +198,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "READER", special_group: "allAuthenticatedUsers" updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| # writer @@ -214,6 +226,206 @@ mock.verify end + it "adds an access entry with specifying user scope and condition" do + mock = Minitest::Mock.new + bigquery.service.mocked_service = mock + updated_gapi = dataset_gapi.dup + new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "WRITER", user_by_email: "writer@example.com", + condition: condition.to_gapi + updated_gapi.access = new_access + patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], + options: { header: { "If-Match" => dataset_gapi.etag } }, access_policy_version: nil + + _(dataset.access).must_be_kind_of Google::Cloud::Bigquery::Dataset::Access + _(dataset.access).must_be :frozen? + + refute dataset.access.writer_user? "writer@example.com" + + dataset.access do |acl| + _(acl).must_be_kind_of Google::Cloud::Bigquery::Dataset::Access + _(acl).wont_be :frozen? + + # reader + refute acl.reader_user? "reader@example.com" + acl.add_reader_user "reader@example.com", condition: condition + assert acl.reader_user? "reader@example.com" + + assert(acl.rules.find do |rule| + rule.to_h[:user_by_email] == "reader@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "READER" + end) + + acl.remove_reader_user "reader@example.com" + refute acl.reader_user? "reader@example.com" + + # writer + refute acl.writer_user? "writer@example.com" + acl.add_writer_user "writer@example.com", condition: condition + assert acl.writer_user? "writer@example.com" + assert(acl.rules.find do |rule| + rule.to_h[:user_by_email] == "writer@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "WRITER" + end) + acl.remove_writer_user "writer@example.com" + refute acl.writer_user? "writer@example.com" + acl.add_writer_user "writer@example.com", condition: condition # this entry goes into the request + + # owner + refute acl.owner_user? "owner@example.com" + acl.add_owner_user "owner@example.com", condition: condition + assert acl.owner_user? "owner@example.com" + assert(acl.rules.find do |rule| + rule.to_h[:user_by_email] == "owner@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "OWNER" + end) + acl.remove_owner_user "owner@example.com" + refute acl.owner_user? "owner@example.com" + end + + _(dataset.access).must_be_kind_of Google::Cloud::Bigquery::Dataset::Access + _(dataset.access).must_be :frozen? + + assert dataset.access.writer_user? "writer@example.com" + + mock.verify + end + + it "adds an access entry with specifying group scope and condition" do + mock = Minitest::Mock.new + bigquery.service.mocked_service = mock + updated_gapi = dataset_gapi.dup + new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "WRITER", + group_by_email: "writers@example.com", condition: condition.to_gapi + updated_gapi.access = new_access + patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], + options: { header: { "If-Match" => dataset_gapi.etag } }, access_policy_version: nil + + dataset.access do |acl| + # reader + refute acl.reader_group? "readers@example.com" + acl.add_reader_group "readers@example.com", condition: condition + assert acl.reader_group? "readers@example.com" + assert(acl.rules.find do |rule| + rule.to_h[:group_by_email] == "readers@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "READER" + end) + acl.remove_reader_group "readers@example.com" + refute acl.reader_group? "readers@example.com" + + # writer + refute acl.writer_group? "writers@example.com" + acl.add_writer_group "writers@example.com", condition: condition + assert acl.writer_group? "writers@example.com" + assert(acl.rules.find do |rule| + rule.to_h[:group_by_email] == "writers@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "WRITER" + end) + acl.remove_writer_group "writers@example.com" + refute acl.writer_group? "writers@example.com" + acl.add_writer_group "writers@example.com", condition: condition # this entry goes into the request + + # owner + refute acl.owner_group? "owners@example.com" + acl.add_owner_group "owners@example.com", condition: condition + assert acl.owner_group? "owners@example.com" + assert(acl.rules.find do |rule| + rule.to_h[:group_by_email] == "owners@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "OWNER" + end) + acl.remove_owner_group "owners@example.com" + refute acl.owner_group? "owners@example.com" + end + mock.verify + end + + it "adds an access entry with specifying iam_member scope and condition" do + mock = Minitest::Mock.new + bigquery.service.mocked_service = mock + updated_gapi = dataset_gapi.dup + new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "WRITER", iam_member: "writers@example.com", + condition: condition.to_gapi + updated_gapi.access = new_access + patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], + options: { header: { "If-Match" => dataset_gapi.etag } }, access_policy_version: nil + + dataset.access do |acl| + # reader + refute acl.reader_iam_member? "readers@example.com" + acl.add_reader_iam_member "readers@example.com", condition: condition + assert acl.reader_iam_member? "readers@example.com" + assert(acl.rules.find do |rule| + rule.to_h[:iam_member] == "readers@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "READER" + end) + acl.remove_reader_iam_member "readers@example.com" + refute acl.reader_iam_member? "readers@example.com" + + # writer + refute acl.writer_iam_member? "writers@example.com" + acl.add_writer_iam_member "writers@example.com", condition: condition + assert acl.writer_iam_member? "writers@example.com" + assert(acl.rules.find do |rule| + rule.to_h[:iam_member] == "writers@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "WRITER" + end) + acl.remove_writer_iam_member "writers@example.com" + refute acl.writer_iam_member? "writers@example.com" + acl.add_writer_iam_member "writers@example.com", condition: condition # this entry goes into the request + + # owner + refute acl.owner_iam_member? "owners@example.com" + acl.add_owner_iam_member "owners@example.com", condition: condition + assert acl.owner_iam_member? "owners@example.com" + assert(acl.rules.find do |rule| + rule.to_h[:iam_member] == "owners@example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "OWNER" + end) + acl.remove_owner_iam_member "owners@example.com" + refute acl.owner_iam_member? "owners@example.com" + end + mock.verify + end + + it "adds an access entry with specifying domain scope and condition" do + mock = Minitest::Mock.new + bigquery.service.mocked_service = mock + updated_gapi = dataset_gapi.dup + new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "OWNER", domain: "example.com", + condition: condition.to_gapi + updated_gapi.access = new_access + patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], + options: { header: { "If-Match" => dataset_gapi.etag } }, access_policy_version: nil + + dataset.access do |acl| + # reader + refute acl.reader_domain? "example.com" + acl.add_reader_domain "example.com", condition: condition + assert acl.reader_domain? "example.com" + assert(acl.rules.find do |rule| +rule.to_h[:domain] == "example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "READER" + end) + acl.remove_reader_domain "example.com" + refute acl.reader_domain? "example.com" + + # writer + refute acl.writer_domain? "example.com" + acl.add_writer_domain "example.com", condition: condition + assert acl.writer_domain? "example.com" + assert(acl.rules.find do |rule| +rule.to_h[:domain] == "example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "WRITER" + end) + acl.remove_writer_domain "example.com" + refute acl.writer_domain? "example.com" + + # owner + refute acl.owner_domain? "example.com" + acl.add_owner_domain "example.com", condition: condition + assert acl.owner_domain? "example.com" + assert(acl.rules.find do |rule| +rule.to_h[:domain] == "example.com" && rule.to_h[:condition] == condition.to_gapi.to_h && rule.to_h[:role] == "OWNER" + end) + acl.remove_owner_domain "example.com" + refute acl.owner_domain? "example.com" + acl.add_owner_domain "example.com", condition: condition # this entry goes into the request + end + mock.verify + end + describe :routine do let(:routine_id) { "new-routine" } let(:routine_gapi) { random_routine_gapi dataset_id, routine_id } @@ -226,7 +438,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new routine: routine_gapi.routine_reference updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| refute acl.reader_routine? routine @@ -252,7 +464,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new view: view_gapi.table_reference updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| refute acl.reader_view? view @@ -275,7 +487,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new view: view_reference updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| acl.add_reader_view "test-project_id:test-dataset_id.test-view_id" @@ -299,7 +511,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new dataset: dataset_1.build_access_entry(target_types: ["VIEWS"]) updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| refute acl.reader_dataset? dataset_1.build_access_entry(target_types: target_types) @@ -319,7 +531,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new dataset: dataset_1.build_access_entry(target_types: target_types) updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil params = { project_id: dataset_1.project_id, @@ -348,7 +560,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new view: view_reference updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| acl.add_reader_view "test-project_id:test-dataset_id.test-view_id" @@ -365,7 +577,7 @@ new_access_2 = Google::Apis::BigqueryV2::Dataset::Access.new role: "READER", group_by_email: "readers@example.com" updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access, new_access_2], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| refute acl.writer_user? "writer@example.com" @@ -404,7 +616,7 @@ new_access = Google::Apis::BigqueryV2::Dataset::Access.new role: "WRITER", user_by_email: "writer@example.com" updated_gapi.access = new_access patch_gapi = Google::Apis::BigqueryV2::Dataset.new access: [new_access], etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil dataset.access do |acl| assert acl.writer_user? "writer@example.com" diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_attributes_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_attributes_test.rb index a24d32ebde58..85cfc563c7fd 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_attributes_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_attributes_test.rb @@ -31,7 +31,7 @@ it "gets full data for created_at" do mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id], access_policy_version: nil _(dataset.created_at).must_be_close_to ::Time.now, 1 @@ -43,7 +43,7 @@ it "gets full data for modified_at" do mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id], access_policy_version: nil _(dataset.modified_at).must_be_close_to ::Time.now, 1 @@ -55,7 +55,7 @@ it "gets full data for default_encryption" do mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id], access_policy_version: nil _(dataset.default_encryption).must_be_nil @@ -67,7 +67,7 @@ it "gets full data for storage_billing_model" do mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id], access_policy_version: nil _(dataset.storage_billing_model).must_be_nil @@ -79,7 +79,7 @@ it "gets full data for tags" do mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id], access_policy_version: nil _(dataset.tags).must_be_kind_of Array @@ -93,7 +93,7 @@ def self.attr_test attr, val define_method "test_#{attr}" do mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_full_gapi, [project, dataset_id], access_policy_version: nil _(dataset.send(attr)).must_equal val diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_exists_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_exists_test.rb index ceda4100a4e9..706252dbb2ad 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_exists_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_exists_test.rb @@ -67,7 +67,7 @@ it "checks if the dataset exists by making an HTTP call" do mock = Minitest::Mock.new - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil dataset.service.mocked_service = mock _(dataset).must_be :reference? diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reference_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reference_test.rb index 480c778ff568..5bf8996a3ac4 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reference_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reference_test.rb @@ -54,7 +54,7 @@ it "can test its existence" do mock = Minitest::Mock.new - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil dataset.service.mocked_service = mock _(dataset.exists?).must_equal true @@ -64,7 +64,7 @@ it "can test its existence with force to load resource" do mock = Minitest::Mock.new - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil dataset.service.mocked_service = mock _(dataset.exists?(force: true)).must_equal true diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reference_update_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reference_update_test.rb index 1514f500a69a..82ba82d2ec80 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reference_update_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reference_update_test.rb @@ -28,11 +28,11 @@ mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil updated_gapi = dataset_gapi.dup updated_gapi.friendly_name = new_dataset_name patch_dataset_gapi = Google::Apis::BigqueryV2::Dataset.new friendly_name: new_dataset_name, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_dataset_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_dataset_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.name).must_be_nil @@ -47,11 +47,11 @@ mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil updated_gapi = dataset_gapi.dup updated_gapi.description = new_description patch_gapi = Google::Apis::BigqueryV2::Dataset.new description: new_description, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.description).must_be_nil @@ -68,11 +68,11 @@ mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil updated_gapi = dataset_gapi.dup updated_gapi.default_table_expiration_ms = new_default_expiration patch_gapi = Google::Apis::BigqueryV2::Dataset.new default_table_expiration_ms: new_default_expiration, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.default_expiration).must_be_nil @@ -89,11 +89,11 @@ mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil updated_gapi = dataset_gapi.dup updated_gapi.labels = new_labels patch_gapi = Google::Apis::BigqueryV2::Dataset.new labels: new_labels, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.labels).must_be_nil @@ -108,11 +108,11 @@ mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil updated_gapi = dataset_gapi.dup updated_gapi.default_encryption_configuration = Google::Apis::BigqueryV2::EncryptionConfiguration.new kms_key_name: kms_key patch_gapi = Google::Apis::BigqueryV2::Dataset.new default_encryption_configuration: updated_gapi.default_encryption_configuration, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.default_encryption).must_be_nil @@ -129,11 +129,11 @@ mock = Minitest::Mock.new bigquery.service.mocked_service = mock - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil updated_gapi = dataset_gapi.dup updated_gapi.storage_billing_model = storage_billing_model patch_gapi = Google::Apis::BigqueryV2::Dataset.new storage_billing_model: storage_billing_model, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.storage_billing_model).must_be_nil diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reload_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reload_test.rb index 500da014fcf5..447ad61241c1 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reload_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_reload_test.rb @@ -23,7 +23,7 @@ it "loads the dataset full resource by making an HTTP call" do mock = Minitest::Mock.new - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil dataset.service.mocked_service = mock _(dataset).wont_be :reference? @@ -46,7 +46,7 @@ it "loads the dataset full resource by making an HTTP call" do mock = Minitest::Mock.new - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil dataset.service.mocked_service = mock _(dataset).wont_be :reference? @@ -69,7 +69,7 @@ it "loads the dataset full resource by making an HTTP call" do mock = Minitest::Mock.new - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil dataset.service.mocked_service = mock _(dataset).must_be :reference? diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_test.rb index 0846a1a286d8..6efc714e3df9 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_test.rb @@ -102,7 +102,7 @@ it "can test its existence with force reload" do mock = Minitest::Mock.new - mock.expect :get_dataset, dataset_gapi, [project, dataset_id] + mock.expect :get_dataset, dataset_gapi, [project, dataset_id], access_policy_version: nil dataset.service.mocked_service = mock _(dataset.exists?(force: true)).must_equal true diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_update_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_update_test.rb index 50fff83715cb..75e1e5719792 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/dataset_update_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/dataset_update_test.rb @@ -33,7 +33,7 @@ updated_gapi = dataset_gapi.dup updated_gapi.friendly_name = new_dataset_name patch_dataset_gapi = Google::Apis::BigqueryV2::Dataset.new friendly_name: new_dataset_name, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_dataset_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_dataset_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.name).must_equal dataset_name _(dataset.description).must_equal description @@ -55,7 +55,7 @@ updated_gapi = dataset_gapi.dup updated_gapi.description = new_description patch_gapi = Google::Apis::BigqueryV2::Dataset.new description: new_description, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.name).must_equal dataset_name _(dataset.description).must_equal description @@ -77,7 +77,7 @@ updated_gapi = dataset_gapi.dup updated_gapi.default_table_expiration_ms = new_default_expiration patch_gapi = Google::Apis::BigqueryV2::Dataset.new default_table_expiration_ms: new_default_expiration, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.name).must_equal dataset_name _(dataset.description).must_equal description @@ -99,7 +99,7 @@ updated_gapi = dataset_gapi.dup updated_gapi.labels = new_labels patch_gapi = Google::Apis::BigqueryV2::Dataset.new labels: new_labels, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.labels).must_equal labels @@ -117,7 +117,7 @@ updated_gapi = dataset_gapi.dup updated_gapi.default_encryption_configuration = Google::Apis::BigqueryV2::EncryptionConfiguration.new kms_key_name: kms_key patch_gapi = Google::Apis::BigqueryV2::Dataset.new default_encryption_configuration: updated_gapi.default_encryption_configuration, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.default_encryption).must_be_nil @@ -137,7 +137,7 @@ updated_gapi = dataset_gapi.dup updated_gapi.storage_billing_model = storage_billing_model patch_gapi = Google::Apis::BigqueryV2::Dataset.new storage_billing_model: storage_billing_model, etag: dataset_gapi.etag - mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}} + mock.expect :patch_dataset, updated_gapi, [project, dataset_id, patch_gapi], options: {header: {"If-Match" => dataset_gapi.etag}}, access_policy_version: nil _(dataset.storage_billing_model).must_be_nil diff --git a/google-cloud-bigquery/test/google/cloud/bigquery/project_test.rb b/google-cloud-bigquery/test/google/cloud/bigquery/project_test.rb index fea143c4a1b3..5d2e9520562e 100644 --- a/google-cloud-bigquery/test/google/cloud/bigquery/project_test.rb +++ b/google-cloud-bigquery/test/google/cloud/bigquery/project_test.rb @@ -52,7 +52,7 @@ def creds.is_a? target dataset_reference: Google::Apis::BigqueryV2::DatasetReference.new( project_id: project, dataset_id: dataset_id) ) - mock.expect :insert_dataset, created_dataset, [project, inserted_dataset] + mock.expect :insert_dataset, created_dataset, [project, inserted_dataset], access_policy_version: nil bigquery.service.mocked_service = mock dataset = bigquery.create_dataset dataset_id @@ -77,7 +77,7 @@ def creds.is_a? target description: description, default_table_expiration_ms: default_expiration, location: location) - mock.expect :insert_dataset, created_dataset, [project, inserted_dataset] + mock.expect :insert_dataset, created_dataset, [project, inserted_dataset], access_policy_version: nil bigquery.service.mocked_service = mock dataset = bigquery.create_dataset dataset_id, name: name, @@ -104,7 +104,7 @@ def creds.is_a? target dataset_reference: Google::Apis::BigqueryV2::DatasetReference.new( project_id: project, dataset_id: dataset_id), access: filled_access) - mock.expect :insert_dataset, created_dataset, [project, inserted_dataset] + mock.expect :insert_dataset, created_dataset, [project, inserted_dataset], access_policy_version: nil bigquery.service.mocked_service = mock dataset = bigquery.create_dataset dataset_id do |ds| @@ -142,7 +142,7 @@ def creds.is_a? target labels: labels, location: location, access: filled_access) - mock.expect :insert_dataset, created_dataset, [project, inserted_dataset] + mock.expect :insert_dataset, created_dataset, [project, inserted_dataset], access_policy_version: nil bigquery.service.mocked_service = mock dataset = bigquery.create_dataset dataset_id, location: location do |ds| @@ -205,7 +205,7 @@ def creds.is_a? target default_table_expiration_ms: default_expiration, location: location, access: filled_access) - mock.expect :insert_dataset, created_dataset, [project, inserted_dataset] + mock.expect :insert_dataset, created_dataset, [project, inserted_dataset], access_policy_version: nil bigquery.service.mocked_service = mock dataset = bigquery.create_dataset dataset_id, location: location do |ds| @@ -518,7 +518,7 @@ def stub.insert_dataset *args mock = Minitest::Mock.new mock.expect :get_dataset, find_dataset_gapi(dataset_id, dataset_name), - [project, dataset_id] + [project, dataset_id], access_policy_version: nil bigquery.service.mocked_service = mock dataset = bigquery.dataset dataset_id @@ -549,7 +549,7 @@ def stub.insert_dataset *args mock = Minitest::Mock.new mock.expect :get_dataset, find_dataset_gapi(dataset_id, dataset_name), - [project, dataset_id] + [project, dataset_id], access_policy_version: nil bigquery.service.mocked_service = mock dataset = bigquery.dataset dataset_id, skip_lookup: true @@ -577,7 +577,7 @@ def stub.insert_dataset *args mock = Minitest::Mock.new mock.expect :get_dataset, find_dataset_gapi(dataset_id, dataset_name), - [project, dataset_id] + [project, dataset_id], access_policy_version: nil bigquery.service.mocked_service = mock dataset = bigquery.dataset dataset_id, skip_lookup: true From 4e428ebc41e09a8ffff7e446a1da4dce79d3a6ea Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 09:06:12 -0700 Subject: [PATCH 447/457] chore(main): release google-cloud-config_delivery 0.1.0 (#30870) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-config_delivery 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- google-cloud-config_delivery/.repo-metadata.json | 2 +- google-cloud-config_delivery/CHANGELOG.md | 9 ++++++++- .../lib/google/cloud/config_delivery/version.rb | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5bf9854476bd..394a34365aaa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -231,7 +231,7 @@ "google-cloud-confidential_computing+FILLER": "0.0.0", "google-cloud-confidential_computing-v1": "1.6.1", "google-cloud-confidential_computing-v1+FILLER": "0.0.0", - "google-cloud-config_delivery": "0.0.1", + "google-cloud-config_delivery": "0.1.0", "google-cloud-config_delivery+FILLER": "0.0.0", "google-cloud-config_delivery-v1": "0.1.0", "google-cloud-config_delivery-v1+FILLER": "0.0.0", diff --git a/google-cloud-config_delivery/.repo-metadata.json b/google-cloud-config_delivery/.repo-metadata.json index 98d090aae198..ba25d36c633f 100644 --- a/google-cloud-config_delivery/.repo-metadata.json +++ b/google-cloud-config_delivery/.repo-metadata.json @@ -5,7 +5,7 @@ "is_cloud": true, "language": "ruby", "name_pretty": "Google Cloud ConfigDelivery API", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "google-cloud-config_delivery is the official client library for the Google Cloud ConfigDelivery API.", diff --git a/google-cloud-config_delivery/CHANGELOG.md b/google-cloud-config_delivery/CHANGELOG.md index f88957a62ba2..8d2e955c7dd8 100644 --- a/google-cloud-config_delivery/CHANGELOG.md +++ b/google-cloud-config_delivery/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-21) + +#### Features + +* Initial generation of google-cloud-config_delivery ([#30865](https://github.com/googleapis/google-cloud-ruby/issues/30865)) + +## Release History diff --git a/google-cloud-config_delivery/lib/google/cloud/config_delivery/version.rb b/google-cloud-config_delivery/lib/google/cloud/config_delivery/version.rb index 36e15eef2b1d..3e9b49c45464 100644 --- a/google-cloud-config_delivery/lib/google/cloud/config_delivery/version.rb +++ b/google-cloud-config_delivery/lib/google/cloud/config_delivery/version.rb @@ -20,7 +20,7 @@ module Google module Cloud module ConfigDelivery - VERSION = "0.0.1" + VERSION = "0.1.0" end end end From c52b1bb70e877a2e6462501c86f1a7e632f40320 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 09:06:42 -0700 Subject: [PATCH 448/457] chore(main): release google-cloud-managed_kafka-schema_registry 0.1.0 (#30872) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release google-cloud-managed_kafka-schema_registry 0.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- .../.repo-metadata.json | 2 +- google-cloud-managed_kafka-schema_registry/CHANGELOG.md | 9 ++++++++- .../cloud/managed_kafka/schema_registry/version.rb | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 394a34365aaa..641c1341febc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -481,7 +481,7 @@ "google-cloud-managed_identities-v1+FILLER": "0.0.0", "google-cloud-managed_kafka": "2.1.1", "google-cloud-managed_kafka+FILLER": "0.0.0", - "google-cloud-managed_kafka-schema_registry": "0.0.1", + "google-cloud-managed_kafka-schema_registry": "0.1.0", "google-cloud-managed_kafka-schema_registry+FILLER": "0.0.0", "google-cloud-managed_kafka-schema_registry-v1": "0.1.0", "google-cloud-managed_kafka-schema_registry-v1+FILLER": "0.0.0", diff --git a/google-cloud-managed_kafka-schema_registry/.repo-metadata.json b/google-cloud-managed_kafka-schema_registry/.repo-metadata.json index 8871039b7407..6db627bef2ab 100644 --- a/google-cloud-managed_kafka-schema_registry/.repo-metadata.json +++ b/google-cloud-managed_kafka-schema_registry/.repo-metadata.json @@ -8,7 +8,7 @@ "name": "managedkafka", "name_pretty": "Managed Service for Apache Kafka API", "product_documentation": "https://cloud.google.com/managed-service-for-apache-kafka/docs", - "release_level": "unreleased", + "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, "ruby-cloud-description": "Manage Apache Kafka clusters and resources.", diff --git a/google-cloud-managed_kafka-schema_registry/CHANGELOG.md b/google-cloud-managed_kafka-schema_registry/CHANGELOG.md index f88957a62ba2..587a4b352735 100644 --- a/google-cloud-managed_kafka-schema_registry/CHANGELOG.md +++ b/google-cloud-managed_kafka-schema_registry/CHANGELOG.md @@ -1,2 +1,9 @@ -# Release History +# Changelog +### 0.1.0 (2025-08-21) + +#### Features + +* Initial generation of google-cloud-managed_kafka-schema_registry ([#30866](https://github.com/googleapis/google-cloud-ruby/issues/30866)) + +## Release History diff --git a/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry/version.rb b/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry/version.rb index 0a0dfaac4633..2f4957bf4bd8 100644 --- a/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry/version.rb +++ b/google-cloud-managed_kafka-schema_registry/lib/google/cloud/managed_kafka/schema_registry/version.rb @@ -21,7 +21,7 @@ module Google module Cloud module ManagedKafka module SchemaRegistry - VERSION = "0.0.1" + VERSION = "0.1.0" end end end From 7cf3dbf4dd005084d669fc176e079297a259d9c7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 10:10:14 -0700 Subject: [PATCH 449/457] chore: use HTTP binding configuration class from new gapic-common (#30840) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfcG9saWNpZXMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfcG9saWNpZXMtdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfdHJhbnNmZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LW1pZ3JhdGlvbi12Mi8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXJlc2VydmF0aW9uLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXN0b3JhZ2UtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbGxpbmctYnVkZ2V0cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbGxpbmctYnVkZ2V0cy12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbGxpbmctdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbmFyeV9hdXRob3JpemF0aW9uLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbmFyeV9hdXRob3JpemF0aW9uLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJ1aWxkLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJ1aWxkLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNlcnRpZmljYXRlX21hbmFnZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNoYW5uZWwtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNocm9uaWNsZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX2NvbnRyb2xzX3BhcnRuZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX2NvbnRyb2xzX3BhcnRuZXItdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX2Rtcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- ...le-cloud-bigquery-data_policies-v1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../v1/data_policy_service_test.rb | 1 - ...oud-bigquery-data_policies-v1beta1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../v1beta1/data_policy_service_test.rb | 1 - ...le-cloud-bigquery-data_transfer-v1.gemspec | 2 +- .../data_transfer/v1/bindings_override.rb | 31 ++----------------- .../v1/data_transfer_service_test.rb | 1 - ...google-cloud-bigquery-migration-v2.gemspec | 2 +- .../migration/v2/migration_service_test.rb | 1 - .../google-cloud-bigquery-storage-v1.gemspec | 2 +- .../storage/v1/big_query_read_test.rb | 1 - .../storage/v1/big_query_write_test.rb | 1 - .../google-cloud-bigtable-v2.gemspec | 2 +- .../google/cloud/bigtable/v2/bigtable_test.rb | 1 - .../google-cloud-billing-budgets-v1.gemspec | 2 +- .../billing/budgets/v1/budget_service_test.rb | 1 - ...ogle-cloud-billing-budgets-v1beta1.gemspec | 2 +- .../budgets/v1beta1/budget_service_test.rb | 1 - .../google-cloud-billing-v1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../cloud/billing/v1/cloud_billing_test.rb | 1 - .../cloud/billing/v1/cloud_catalog_test.rb | 1 - ...ogle-cloud-binary_authorization-v1.gemspec | 2 +- .../v1/binauthz_management_service_test.rb | 1 - .../v1/system_policy_test.rb | 1 - .../v1/validation_helper_test.rb | 1 - ...cloud-binary_authorization-v1beta1.gemspec | 2 +- .../binauthz_management_service_test.rb | 1 - .../v1beta1/system_policy_test.rb | 1 - .../google-cloud-build-v2.gemspec | 2 +- .../cloud/build/v2/repository_manager_test.rb | 1 - ...oogle-cloud-certificate_manager-v1.gemspec | 2 +- .../v1/bindings_override.rb | 31 ++----------------- .../v1/certificate_manager_test.rb | 1 - .../google-cloud-channel-v1.gemspec | 2 +- .../v1/cloud_channel_reports_service_test.rb | 1 - .../channel/v1/cloud_channel_service_test.rb | 1 - .../google-cloud-chronicle-v1.gemspec | 2 +- .../v1/data_access_control_service_test.rb | 1 - .../cloud/chronicle/v1/entity_service_test.rb | 1 - .../chronicle/v1/instance_service_test.rb | 1 - .../v1/reference_list_service_test.rb | 1 - .../cloud/chronicle/v1/rule_service_test.rb | 1 - ...le-cloud-cloud_controls_partner-v1.gemspec | 2 +- .../v1/cloud_controls_partner_core_test.rb | 1 - .../cloud_controls_partner_monitoring_test.rb | 1 - ...loud-cloud_controls_partner-v1beta.gemspec | 2 +- .../cloud_controls_partner_core_test.rb | 1 - .../cloud_controls_partner_monitoring_test.rb | 1 - .../google-cloud-cloud_dms-v1.gemspec | 2 +- .../v1/data_migration_service_test.rb | 1 - 53 files changed, 25 insertions(+), 109 deletions(-) diff --git a/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec b/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec index ae80fa7c3989..9403e20daf8d 100644 --- a/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec +++ b/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" end diff --git a/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb index 751130dab8db..94233fb73c36 100644 --- a/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb b/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb index b2e938c3134b..eaea5785bfd9 100644 --- a/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb +++ b/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/datapolicies/v1/datapolicy_pb" -require "google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb" require "google/cloud/bigquery/data_policies/v1/data_policy_service" class ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::ClientTest < Minitest::Test diff --git a/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec b/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec index 95c61acd67b3..c2e7bde65d9f 100644 --- a/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec +++ b/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" end diff --git a/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb b/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb index d6a6f800fd50..49cc5ebe1a2d 100644 --- a/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb b/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb index 1adc9122aebb..5efc9ac9317e 100644 --- a/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb +++ b/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb" -require "google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb" require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service" class ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::ClientTest < Minitest::Test diff --git a/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec b/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec index 4e00107598d2..33eeaea6ec3c 100644 --- a/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec +++ b/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb index c017855abd7f..4409604ec38a 100644 --- a/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb +++ b/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -43,7 +43,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -70,33 +70,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.bigquery.datatransfer.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.bigquery.datatransfer.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb b/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb index 6fc0d34df3bc..a2efc4d092a5 100644 --- a/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb +++ b/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb" require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::ClientTest < Minitest::Test diff --git a/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec b/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec index 01a185aa3ec5..9f942707d5af 100644 --- a/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec +++ b/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb b/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb index 76d26dee33f6..d20cd93123fe 100644 --- a/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb +++ b/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service_services_pb" require "google/cloud/bigquery/migration/v2/migration_service" class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::ClientTest < Minitest::Test diff --git a/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec b/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec index 549c982b0932..0a9f1b784dba 100644 --- a/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec +++ b/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb b/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb index 0a1be2df3841..d6a3f5700717 100644 --- a/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb +++ b/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/storage/v1/storage_pb" -require "google/cloud/bigquery/storage/v1/storage_services_pb" require "google/cloud/bigquery/storage/v1/big_query_read" class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::ClientTest < Minitest::Test diff --git a/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb b/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb index 4f0af66f1dc0..c41b06e48101 100644 --- a/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb +++ b/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/bigquery/storage/v1/storage_pb" -require "google/cloud/bigquery/storage/v1/storage_services_pb" require "google/cloud/bigquery/storage/v1/big_query_write" class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::ClientTest < Minitest::Test diff --git a/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec b/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec index 57b1cc3a1c59..234ab6616450 100644 --- a/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec +++ b/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb b/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb index 4e06c26b0f97..d3247e35708a 100644 --- a/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb +++ b/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/bigtable/v2/bigtable_pb" -require "google/bigtable/v2/bigtable_services_pb" require "google/cloud/bigtable/v2/bigtable" class ::Google::Cloud::Bigtable::V2::Bigtable::ClientTest < Minitest::Test diff --git a/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec b/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec index 0f6c9cf56edc..c25efdb001f9 100644 --- a/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec +++ b/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb b/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb index 90d1849d8ec6..cbc2c43536b7 100644 --- a/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb +++ b/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/billing/budgets/v1/budget_service_pb" -require "google/cloud/billing/budgets/v1/budget_service_services_pb" require "google/cloud/billing/budgets/v1/budget_service" class ::Google::Cloud::Billing::Budgets::V1::BudgetService::ClientTest < Minitest::Test diff --git a/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec b/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec index 423c0bcec42d..664e0110f86a 100644 --- a/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec +++ b/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb b/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb index 0c6ece8be01c..99dea7194783 100644 --- a/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb +++ b/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/billing/budgets/v1beta1/budget_service_pb" -require "google/cloud/billing/budgets/v1beta1/budget_service_services_pb" require "google/cloud/billing/budgets/v1beta1/budget_service" class ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::ClientTest < Minitest::Test diff --git a/google-cloud-billing-v1/google-cloud-billing-v1.gemspec b/google-cloud-billing-v1/google-cloud-billing-v1.gemspec index c6eeacb7cd65..486a9759eb2c 100644 --- a/google-cloud-billing-v1/google-cloud-billing-v1.gemspec +++ b/google-cloud-billing-v1/google-cloud-billing-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" end diff --git a/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb index 96e77ec64ded..3e6a8d5d47d9 100644 --- a/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb b/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb index 5ef9f2337312..b8d10ad827e9 100644 --- a/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb +++ b/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/billing/v1/cloud_billing_pb" -require "google/cloud/billing/v1/cloud_billing_services_pb" require "google/cloud/billing/v1/cloud_billing" class ::Google::Cloud::Billing::V1::CloudBilling::ClientTest < Minitest::Test diff --git a/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb b/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb index 6e1bfbbc8de7..aedc8482dfa8 100644 --- a/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb +++ b/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/billing/v1/cloud_catalog_pb" -require "google/cloud/billing/v1/cloud_catalog_services_pb" require "google/cloud/billing/v1/cloud_catalog" class ::Google::Cloud::Billing::V1::CloudCatalog::ClientTest < Minitest::Test diff --git a/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec b/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec index 645261f8433c..49e056e7da1d 100644 --- a/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec +++ b/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grafeas-v1", "> 0.0", "< 2.a" end diff --git a/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb b/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb index 5ed0afce35b4..76e054824f8e 100644 --- a/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb +++ b/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binaryauthorization/v1/service_services_pb" require "google/cloud/binary_authorization/v1/binauthz_management_service" class ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::ClientTest < Minitest::Test diff --git a/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb b/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb index d36faef86e7b..bf0916d55c13 100644 --- a/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb +++ b/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binaryauthorization/v1/service_services_pb" require "google/cloud/binary_authorization/v1/system_policy" class ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::ClientTest < Minitest::Test diff --git a/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb b/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb index 8d265f263af8..2e46af8def69 100644 --- a/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb +++ b/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binaryauthorization/v1/service_services_pb" require "google/cloud/binary_authorization/v1/validation_helper" class ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::ClientTest < Minitest::Test diff --git a/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec b/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec index 3a709c78d339..03fd4b32ae5e 100644 --- a/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec +++ b/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb b/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb index e65452eb9668..8faa7000204c 100644 --- a/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb +++ b/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binaryauthorization/v1beta1/service_services_pb" require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::ClientTest < Minitest::Test diff --git a/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb b/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb index aa5cf495d860..4fd95be99bca 100644 --- a/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb +++ b/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binaryauthorization/v1beta1/service_services_pb" require "google/cloud/binary_authorization/v1beta1/system_policy" class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::ClientTest < Minitest::Test diff --git a/google-cloud-build-v2/google-cloud-build-v2.gemspec b/google-cloud-build-v2/google-cloud-build-v2.gemspec index e0b140a1f872..9dd41f5f04d6 100644 --- a/google-cloud-build-v2/google-cloud-build-v2.gemspec +++ b/google-cloud-build-v2/google-cloud-build-v2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb b/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb index 376bd0b394c0..9a8c0b18d9f8 100644 --- a/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb +++ b/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/cloudbuild/v2/repositories_pb" -require "google/devtools/cloudbuild/v2/repositories_services_pb" require "google/cloud/build/v2/repository_manager" class ::Google::Cloud::Build::V2::RepositoryManager::ClientTest < Minitest::Test diff --git a/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec b/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec index 32c7060e3d85..524cf4619958 100644 --- a/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec +++ b/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb b/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb index 0ee93faebf86..c6b9bbee5d2c 100644 --- a/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb +++ b/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.certificatemanager.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.certificatemanager.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb b/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb index c8f0144b1962..ba1f655bc7cb 100644 --- a/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb +++ b/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/certificatemanager/v1/certificate_manager_pb" -require "google/cloud/certificatemanager/v1/certificate_manager_services_pb" require "google/cloud/certificate_manager/v1/certificate_manager" class ::Google::Cloud::CertificateManager::V1::CertificateManager::ClientTest < Minitest::Test diff --git a/google-cloud-channel-v1/google-cloud-channel-v1.gemspec b/google-cloud-channel-v1/google-cloud-channel-v1.gemspec index b24e3808096a..a3fa71d84a4d 100644 --- a/google-cloud-channel-v1/google-cloud-channel-v1.gemspec +++ b/google-cloud-channel-v1/google-cloud-channel-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb index 8b9d693f73ed..13cbad1dfc82 100644 --- a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb +++ b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/channel/v1/reports_service_pb" -require "google/cloud/channel/v1/reports_service_services_pb" require "google/cloud/channel/v1/cloud_channel_reports_service" class ::Google::Cloud::Channel::V1::CloudChannelReportsService::ClientTest < Minitest::Test diff --git a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb index 8bdf7b8dc633..edbb7ffe4819 100644 --- a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb +++ b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/channel/v1/service_pb" -require "google/cloud/channel/v1/service_services_pb" require "google/cloud/channel/v1/cloud_channel_service" class ::Google::Cloud::Channel::V1::CloudChannelService::ClientTest < Minitest::Test diff --git a/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec b/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec index 36196fd6f23d..9234fb893c47 100644 --- a/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec +++ b/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb index 6fb576a7c856..2b75713089a7 100644 --- a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb +++ b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_services_pb" require "google/cloud/chronicle/v1/data_access_control_service" class ::Google::Cloud::Chronicle::V1::DataAccessControlService::ClientTest < Minitest::Test diff --git a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb index d88fa4bfa047..16f09b44a91f 100644 --- a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb +++ b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_services_pb" require "google/cloud/chronicle/v1/entity_service" class ::Google::Cloud::Chronicle::V1::EntityService::ClientTest < Minitest::Test diff --git a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb index caa32983a455..85a32c93390d 100644 --- a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb +++ b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_services_pb" require "google/cloud/chronicle/v1/instance_service" class ::Google::Cloud::Chronicle::V1::InstanceService::ClientTest < Minitest::Test diff --git a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb index d0a846e3f68f..0ed6f4302f04 100644 --- a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb +++ b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_services_pb" require "google/cloud/chronicle/v1/reference_list_service" class ::Google::Cloud::Chronicle::V1::ReferenceListService::ClientTest < Minitest::Test diff --git a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb index 56885ef09e48..4ec480ad2e5a 100644 --- a/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb +++ b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_services_pb" require "google/cloud/chronicle/v1/rule_service" class ::Google::Cloud::Chronicle::V1::RuleService::ClientTest < Minitest::Test diff --git a/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec b/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec index 7f9b494bc1ce..4fc254f71619 100644 --- a/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec +++ b/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb b/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb index 8c370cd7a0bc..bf7bb49130fa 100644 --- a/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb +++ b/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/cloudcontrolspartner/v1/core_pb" -require "google/cloud/cloudcontrolspartner/v1/core_services_pb" require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core" class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::ClientTest < Minitest::Test diff --git a/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb b/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb index fc1e0c20358d..d0a569ade671 100644 --- a/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb +++ b/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/cloudcontrolspartner/v1/monitoring_pb" -require "google/cloud/cloudcontrolspartner/v1/monitoring_services_pb" require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring" class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::ClientTest < Minitest::Test diff --git a/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec b/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec index 19580ab11112..5c25b06099a2 100644 --- a/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec +++ b/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb b/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb index 659b85b0029e..0c5276c70f0d 100644 --- a/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb +++ b/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/cloudcontrolspartner/v1beta/core_pb" -require "google/cloud/cloudcontrolspartner/v1beta/core_services_pb" require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core" class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::ClientTest < Minitest::Test diff --git a/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb b/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb index 5fca341bfa38..e46dfe3924a7 100644 --- a/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb +++ b/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/cloudcontrolspartner/v1beta/monitoring_pb" -require "google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb" require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::ClientTest < Minitest::Test diff --git a/google-cloud-cloud_dms-v1/google-cloud-cloud_dms-v1.gemspec b/google-cloud-cloud_dms-v1/google-cloud-cloud_dms-v1.gemspec index e4fe4368e60e..3a5b38888433 100644 --- a/google-cloud-cloud_dms-v1/google-cloud-cloud_dms-v1.gemspec +++ b/google-cloud-cloud_dms-v1/google-cloud-cloud_dms-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-cloud_dms-v1/test/google/cloud/cloud_dms/v1/data_migration_service_test.rb b/google-cloud-cloud_dms-v1/test/google/cloud/cloud_dms/v1/data_migration_service_test.rb index 2304adfdf168..ba921d5e10fe 100644 --- a/google-cloud-cloud_dms-v1/test/google/cloud/cloud_dms/v1/data_migration_service_test.rb +++ b/google-cloud-cloud_dms-v1/test/google/cloud/cloud_dms/v1/data_migration_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/clouddms/v1/clouddms_pb" -require "google/cloud/clouddms/v1/clouddms_services_pb" require "google/cloud/cloud_dms/v1/data_migration_service" class ::Google::Cloud::CloudDMS::V1::DataMigrationService::ClientTest < Minitest::Test From 55a4c066f81b624389bff4bba0112d502c8c15bb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 10:31:01 -0700 Subject: [PATCH 450/457] chore: use HTTP binding configuration class from new gapic-common (#30841) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX3F1b3Rhcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX3F1b3Rhcy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbW1lcmNlLWNvbnN1bWVyLXByb2N1cmVtZW50LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbmZpZGVudGlhbF9jb21wdXRpbmctdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbmZpZ19kZWxpdmVyeS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbmZpZ19zZXJ2aWNlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbm5lY3RvcnMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbnRhY3RfY2VudGVyX2luc2lnaHRzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbnRhaW5lcl9hbmFseXNpcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfY2F0YWxvZy1saW5lYWdlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfY2F0YWxvZy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfY2F0YWxvZy12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfZnVzaW9uLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfbGFiZWxpbmctdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFmbG93LXYxYmV0YTMvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFmb3JtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFmb3JtLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFwbGV4LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-cloud-cloud_quotas-v1.gemspec | 2 +- .../cloud_quotas/v1/cloud_quotas_test.rb | 1 - .../google-cloud-cloud_quotas-v1beta.gemspec | 2 +- .../cloud_quotas/v1beta/cloud_quotas_test.rb | 1 - .../quota_adjuster_settings_manager_test.rb | 1 - ...d-commerce-consumer-procurement-v1.gemspec | 2 +- .../v1/consumer_procurement_service_test.rb | 1 - .../v1/license_management_service_test.rb | 1 - ...le-cloud-confidential_computing-v1.gemspec | 2 +- .../v1/bindings_override.rb | 31 ++----------------- .../v1/confidential_computing_test.rb | 1 - .../google-cloud-config_delivery-v1.gemspec | 2 +- .../config_delivery/v1/bindings_override.rb | 31 ++----------------- .../v1/config_delivery_test.rb | 1 - .../google-cloud-config_service-v1.gemspec | 2 +- .../config_service/v1/bindings_override.rb | 31 ++----------------- .../cloud/config_service/v1/config_test.rb | 1 - .../google-cloud-connectors-v1.gemspec | 2 +- .../cloud/connectors/v1/bindings_override.rb | 31 ++----------------- .../cloud/connectors/v1/connectors_test.rb | 1 - ...e-cloud-contact_center_insights-v1.gemspec | 2 +- .../v1/contact_center_insights_test.rb | 1 - .../google-cloud-container-v1.gemspec | 2 +- .../container/v1/cluster_manager_test.rb | 1 - .../google-cloud-container-v1beta1.gemspec | 2 +- .../container/v1beta1/cluster_manager_test.rb | 1 - ...google-cloud-container_analysis-v1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../v1/container_analysis_test.rb | 1 - ...ogle-cloud-data_catalog-lineage-v1.gemspec | 2 +- .../data_catalog/lineage/v1/lineage_test.rb | 1 - .../google-cloud-data_catalog-v1.gemspec | 2 +- .../data_catalog/v1/data_catalog_test.rb | 1 - .../policy_tag_manager_serialization_test.rb | 1 - .../v1/policy_tag_manager_test.rb | 1 - .../google-cloud-data_catalog-v1beta1.gemspec | 2 +- .../data_catalog/v1beta1/data_catalog_test.rb | 1 - .../policy_tag_manager_serialization_test.rb | 1 - .../v1beta1/policy_tag_manager_test.rb | 1 - .../google-cloud-data_fusion-v1.gemspec | 2 +- .../cloud/data_fusion/v1/data_fusion_test.rb | 1 - ...google-cloud-data_labeling-v1beta1.gemspec | 2 +- .../v1beta1/data_labeling_service_test.rb | 1 - .../google-cloud-dataflow-v1beta3.gemspec | 2 +- .../v1beta3/flex_templates_service_test.rb | 1 - .../cloud/dataflow/v1beta3/jobs_test.rb | 1 - .../cloud/dataflow/v1beta3/messages_test.rb | 1 - .../cloud/dataflow/v1beta3/metrics_test.rb | 1 - .../cloud/dataflow/v1beta3/snapshots_test.rb | 1 - .../v1beta3/templates_service_test.rb | 1 - .../google-cloud-dataform-v1.gemspec | 2 +- .../cloud/dataform/v1/bindings_override.rb | 31 ++----------------- .../google/cloud/dataform/v1/dataform_test.rb | 1 - .../google-cloud-dataform-v1beta1.gemspec | 2 +- .../dataform/v1beta1/bindings_override.rb | 31 ++----------------- .../cloud/dataform/v1beta1/dataform_test.rb | 1 - .../google-cloud-dataplex-v1.gemspec | 2 +- .../cloud/dataplex/v1/bindings_override.rb | 31 ++----------------- .../cloud/dataplex/v1/catalog_service_test.rb | 1 - .../cloud/dataplex/v1/cmek_service_test.rb | 1 - .../cloud/dataplex/v1/content_service_test.rb | 1 - .../dataplex/v1/data_scan_service_test.rb | 1 - .../dataplex/v1/data_taxonomy_service_test.rb | 1 - .../dataplex/v1/dataplex_service_test.rb | 1 - .../dataplex/v1/metadata_service_test.rb | 1 - 65 files changed, 35 insertions(+), 261 deletions(-) diff --git a/google-cloud-cloud_quotas-v1/google-cloud-cloud_quotas-v1.gemspec b/google-cloud-cloud_quotas-v1/google-cloud-cloud_quotas-v1.gemspec index 4be1b3e1266f..b3e57e46e965 100644 --- a/google-cloud-cloud_quotas-v1/google-cloud-cloud_quotas-v1.gemspec +++ b/google-cloud-cloud_quotas-v1/google-cloud-cloud_quotas-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-cloud_quotas-v1/test/google/cloud/cloud_quotas/v1/cloud_quotas_test.rb b/google-cloud-cloud_quotas-v1/test/google/cloud/cloud_quotas/v1/cloud_quotas_test.rb index 133ee1caaf86..6048062189e7 100644 --- a/google-cloud-cloud_quotas-v1/test/google/cloud/cloud_quotas/v1/cloud_quotas_test.rb +++ b/google-cloud-cloud_quotas-v1/test/google/cloud/cloud_quotas/v1/cloud_quotas_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/api/cloudquotas/v1/cloudquotas_pb" -require "google/api/cloudquotas/v1/cloudquotas_services_pb" require "google/cloud/cloud_quotas/v1/cloud_quotas" class ::Google::Cloud::CloudQuotas::V1::CloudQuotas::ClientTest < Minitest::Test diff --git a/google-cloud-cloud_quotas-v1beta/google-cloud-cloud_quotas-v1beta.gemspec b/google-cloud-cloud_quotas-v1beta/google-cloud-cloud_quotas-v1beta.gemspec index a6e4e39d4eff..e8fce5c77088 100644 --- a/google-cloud-cloud_quotas-v1beta/google-cloud-cloud_quotas-v1beta.gemspec +++ b/google-cloud-cloud_quotas-v1beta/google-cloud-cloud_quotas-v1beta.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/cloud_quotas_test.rb b/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/cloud_quotas_test.rb index 335f4c8e3cfa..ad5d1e3688b3 100644 --- a/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/cloud_quotas_test.rb +++ b/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/cloud_quotas_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/api/cloudquotas/v1beta/cloudquotas_pb" -require "google/api/cloudquotas/v1beta/cloudquotas_services_pb" require "google/cloud/cloud_quotas/v1beta/cloud_quotas" class ::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::ClientTest < Minitest::Test diff --git a/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager_test.rb b/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager_test.rb index 35438d2f639b..1a5f942219a7 100644 --- a/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager_test.rb +++ b/google-cloud-cloud_quotas-v1beta/test/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/api/cloudquotas/v1beta/quota_adjuster_settings_pb" -require "google/api/cloudquotas/v1beta/quota_adjuster_settings_services_pb" require "google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager" class ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::ClientTest < Minitest::Test diff --git a/google-cloud-commerce-consumer-procurement-v1/google-cloud-commerce-consumer-procurement-v1.gemspec b/google-cloud-commerce-consumer-procurement-v1/google-cloud-commerce-consumer-procurement-v1.gemspec index 104d3f491db9..df7e2c4bdc5b 100644 --- a/google-cloud-commerce-consumer-procurement-v1/google-cloud-commerce-consumer-procurement-v1.gemspec +++ b/google-cloud-commerce-consumer-procurement-v1/google-cloud-commerce-consumer-procurement-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-commerce-consumer-procurement-v1/test/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service_test.rb b/google-cloud-commerce-consumer-procurement-v1/test/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service_test.rb index c66d524340b4..55ee549932ff 100644 --- a/google-cloud-commerce-consumer-procurement-v1/test/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service_test.rb +++ b/google-cloud-commerce-consumer-procurement-v1/test/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/commerce/consumer/procurement/v1/procurement_service_pb" -require "google/cloud/commerce/consumer/procurement/v1/procurement_service_services_pb" require "google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service" class ::Google::Cloud::Commerce::Consumer::Procurement::V1::ConsumerProcurementService::ClientTest < Minitest::Test diff --git a/google-cloud-commerce-consumer-procurement-v1/test/google/cloud/commerce/consumer/procurement/v1/license_management_service_test.rb b/google-cloud-commerce-consumer-procurement-v1/test/google/cloud/commerce/consumer/procurement/v1/license_management_service_test.rb index a00a3bd4dcc1..c9f051673e98 100644 --- a/google-cloud-commerce-consumer-procurement-v1/test/google/cloud/commerce/consumer/procurement/v1/license_management_service_test.rb +++ b/google-cloud-commerce-consumer-procurement-v1/test/google/cloud/commerce/consumer/procurement/v1/license_management_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/commerce/consumer/procurement/v1/license_management_service_pb" -require "google/cloud/commerce/consumer/procurement/v1/license_management_service_services_pb" require "google/cloud/commerce/consumer/procurement/v1/license_management_service" class ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicenseManagementService::ClientTest < Minitest::Test diff --git a/google-cloud-confidential_computing-v1/google-cloud-confidential_computing-v1.gemspec b/google-cloud-confidential_computing-v1/google-cloud-confidential_computing-v1.gemspec index c18bfdd3fc93..ee782d10029f 100644 --- a/google-cloud-confidential_computing-v1/google-cloud-confidential_computing-v1.gemspec +++ b/google-cloud-confidential_computing-v1/google-cloud-confidential_computing-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/bindings_override.rb b/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/bindings_override.rb index 04686a26a739..32143f9b8fa9 100644 --- a/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/bindings_override.rb +++ b/google-cloud-confidential_computing-v1/lib/google/cloud/confidential_computing/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.confidentialcomputing.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.confidentialcomputing.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-confidential_computing-v1/test/google/cloud/confidential_computing/v1/confidential_computing_test.rb b/google-cloud-confidential_computing-v1/test/google/cloud/confidential_computing/v1/confidential_computing_test.rb index 25d3cc2d6bd2..8a5b8bbc257f 100644 --- a/google-cloud-confidential_computing-v1/test/google/cloud/confidential_computing/v1/confidential_computing_test.rb +++ b/google-cloud-confidential_computing-v1/test/google/cloud/confidential_computing/v1/confidential_computing_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/confidentialcomputing/v1/service_pb" -require "google/cloud/confidentialcomputing/v1/service_services_pb" require "google/cloud/confidential_computing/v1/confidential_computing" class ::Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::ClientTest < Minitest::Test diff --git a/google-cloud-config_delivery-v1/google-cloud-config_delivery-v1.gemspec b/google-cloud-config_delivery-v1/google-cloud-config_delivery-v1.gemspec index d32d6ffe934a..99bc8c00f4e6 100644 --- a/google-cloud-config_delivery-v1/google-cloud-config_delivery-v1.gemspec +++ b/google-cloud-config_delivery-v1/google-cloud-config_delivery-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/bindings_override.rb b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/bindings_override.rb index 04627bbf382a..9424c505d1a0 100644 --- a/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/bindings_override.rb +++ b/google-cloud-config_delivery-v1/lib/google/cloud/config_delivery/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.configdelivery.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.configdelivery.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_test.rb b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_test.rb index e4f78ca46494..baabb8863c31 100644 --- a/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_test.rb +++ b/google-cloud-config_delivery-v1/test/google/cloud/config_delivery/v1/config_delivery_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/configdelivery/v1/config_delivery_pb" -require "google/cloud/configdelivery/v1/config_delivery_services_pb" require "google/cloud/config_delivery/v1/config_delivery" class ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::ClientTest < Minitest::Test diff --git a/google-cloud-config_service-v1/google-cloud-config_service-v1.gemspec b/google-cloud-config_service-v1/google-cloud-config_service-v1.gemspec index f24c89257dcf..762a06395d4a 100644 --- a/google-cloud-config_service-v1/google-cloud-config_service-v1.gemspec +++ b/google-cloud-config_service-v1/google-cloud-config_service-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/bindings_override.rb b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/bindings_override.rb index fdff3bcf95d5..1a525b99495a 100644 --- a/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/bindings_override.rb +++ b/google-cloud-config_service-v1/lib/google/cloud/config_service/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -102,33 +102,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.config.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.config.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_test.rb b/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_test.rb index e85d6db49f09..2f69a7e4de15 100644 --- a/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_test.rb +++ b/google-cloud-config_service-v1/test/google/cloud/config_service/v1/config_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/config/v1/config_pb" -require "google/cloud/config/v1/config_services_pb" require "google/cloud/config_service/v1/config" class ::Google::Cloud::ConfigService::V1::Config::ClientTest < Minitest::Test diff --git a/google-cloud-connectors-v1/google-cloud-connectors-v1.gemspec b/google-cloud-connectors-v1/google-cloud-connectors-v1.gemspec index 566e1d539ad2..2dc52b6f2972 100644 --- a/google-cloud-connectors-v1/google-cloud-connectors-v1.gemspec +++ b/google-cloud-connectors-v1/google-cloud-connectors-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-connectors-v1/lib/google/cloud/connectors/v1/bindings_override.rb b/google-cloud-connectors-v1/lib/google/cloud/connectors/v1/bindings_override.rb index cf7e4dcbbd33..dcd736296126 100644 --- a/google-cloud-connectors-v1/lib/google/cloud/connectors/v1/bindings_override.rb +++ b/google-cloud-connectors-v1/lib/google/cloud/connectors/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -126,33 +126,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.connectors.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.connectors.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-connectors-v1/test/google/cloud/connectors/v1/connectors_test.rb b/google-cloud-connectors-v1/test/google/cloud/connectors/v1/connectors_test.rb index 094620c6ce31..c6c6818c7a4f 100644 --- a/google-cloud-connectors-v1/test/google/cloud/connectors/v1/connectors_test.rb +++ b/google-cloud-connectors-v1/test/google/cloud/connectors/v1/connectors_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/connectors/v1/connectors_service_pb" -require "google/cloud/connectors/v1/connectors_service_services_pb" require "google/cloud/connectors/v1/connectors" class ::Google::Cloud::Connectors::V1::Connectors::ClientTest < Minitest::Test diff --git a/google-cloud-contact_center_insights-v1/google-cloud-contact_center_insights-v1.gemspec b/google-cloud-contact_center_insights-v1/google-cloud-contact_center_insights-v1.gemspec index cf8dd304dacf..a21f4e34362d 100644 --- a/google-cloud-contact_center_insights-v1/google-cloud-contact_center_insights-v1.gemspec +++ b/google-cloud-contact_center_insights-v1/google-cloud-contact_center_insights-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" end diff --git a/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_test.rb b/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_test.rb index 48842b50cd9e..1cbd7f413f93 100644 --- a/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_test.rb +++ b/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb" -require "google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb" require "google/cloud/contact_center_insights/v1/contact_center_insights" class ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::ClientTest < Minitest::Test diff --git a/google-cloud-container-v1/google-cloud-container-v1.gemspec b/google-cloud-container-v1/google-cloud-container-v1.gemspec index 15bee3b6ab16..20ad39cde92d 100644 --- a/google-cloud-container-v1/google-cloud-container-v1.gemspec +++ b/google-cloud-container-v1/google-cloud-container-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb index c32c0b2c86ab..f601b1ca5b6a 100644 --- a/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb +++ b/google-cloud-container-v1/test/google/cloud/container/v1/cluster_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/container/v1/cluster_service_pb" -require "google/container/v1/cluster_service_services_pb" require "google/cloud/container/v1/cluster_manager" class ::Google::Cloud::Container::V1::ClusterManager::ClientTest < Minitest::Test diff --git a/google-cloud-container-v1beta1/google-cloud-container-v1beta1.gemspec b/google-cloud-container-v1beta1/google-cloud-container-v1beta1.gemspec index f0c7064c7fa6..677ab7be9824 100644 --- a/google-cloud-container-v1beta1/google-cloud-container-v1beta1.gemspec +++ b/google-cloud-container-v1beta1/google-cloud-container-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb b/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb index 68b627ce6d35..e7ad17c9b7ee 100644 --- a/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb +++ b/google-cloud-container-v1beta1/test/google/cloud/container/v1beta1/cluster_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/container/v1beta1/cluster_service_pb" -require "google/container/v1beta1/cluster_service_services_pb" require "google/cloud/container/v1beta1/cluster_manager" class ::Google::Cloud::Container::V1beta1::ClusterManager::ClientTest < Minitest::Test diff --git a/google-cloud-container_analysis-v1/google-cloud-container_analysis-v1.gemspec b/google-cloud-container_analysis-v1/google-cloud-container_analysis-v1.gemspec index 6b80ca5757f1..164f71d5f9aa 100644 --- a/google-cloud-container_analysis-v1/google-cloud-container_analysis-v1.gemspec +++ b/google-cloud-container_analysis-v1/google-cloud-container_analysis-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grafeas-v1", ">= 0.4", "< 2.a" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" diff --git a/google-cloud-container_analysis-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-container_analysis-v1/proto_docs/google/iam/v1/policy.rb index 96e77ec64ded..3e6a8d5d47d9 100644 --- a/google-cloud-container_analysis-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-container_analysis-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-container_analysis-v1/test/google/cloud/container_analysis/v1/container_analysis_test.rb b/google-cloud-container_analysis-v1/test/google/cloud/container_analysis/v1/container_analysis_test.rb index 71ba22c151b3..0bb23e55bc50 100644 --- a/google-cloud-container_analysis-v1/test/google/cloud/container_analysis/v1/container_analysis_test.rb +++ b/google-cloud-container_analysis-v1/test/google/cloud/container_analysis/v1/container_analysis_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/containeranalysis/v1/containeranalysis_pb" -require "google/devtools/containeranalysis/v1/containeranalysis_services_pb" require "google/cloud/container_analysis/v1/container_analysis" class ::Google::Cloud::ContainerAnalysis::V1::ContainerAnalysis::ClientTest < Minitest::Test diff --git a/google-cloud-data_catalog-lineage-v1/google-cloud-data_catalog-lineage-v1.gemspec b/google-cloud-data_catalog-lineage-v1/google-cloud-data_catalog-lineage-v1.gemspec index fcd886f1062a..2f1661bec861 100644 --- a/google-cloud-data_catalog-lineage-v1/google-cloud-data_catalog-lineage-v1.gemspec +++ b/google-cloud-data_catalog-lineage-v1/google-cloud-data_catalog-lineage-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-data_catalog-lineage-v1/test/google/cloud/data_catalog/lineage/v1/lineage_test.rb b/google-cloud-data_catalog-lineage-v1/test/google/cloud/data_catalog/lineage/v1/lineage_test.rb index 1feac8430a98..f273610f73c8 100644 --- a/google-cloud-data_catalog-lineage-v1/test/google/cloud/data_catalog/lineage/v1/lineage_test.rb +++ b/google-cloud-data_catalog-lineage-v1/test/google/cloud/data_catalog/lineage/v1/lineage_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datacatalog/lineage/v1/lineage_pb" -require "google/cloud/datacatalog/lineage/v1/lineage_services_pb" require "google/cloud/data_catalog/lineage/v1/lineage" class ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::ClientTest < Minitest::Test diff --git a/google-cloud-data_catalog-v1/google-cloud-data_catalog-v1.gemspec b/google-cloud-data_catalog-v1/google-cloud-data_catalog-v1.gemspec index 13a464416137..d01348b1f208 100644 --- a/google-cloud-data_catalog-v1/google-cloud-data_catalog-v1.gemspec +++ b/google-cloud-data_catalog-v1/google-cloud-data_catalog-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" end diff --git a/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/data_catalog_test.rb b/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/data_catalog_test.rb index 17724c142d96..b834b52b744e 100644 --- a/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/data_catalog_test.rb +++ b/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/data_catalog_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datacatalog/v1/datacatalog_pb" -require "google/cloud/datacatalog/v1/datacatalog_services_pb" require "google/cloud/data_catalog/v1/data_catalog" class ::Google::Cloud::DataCatalog::V1::DataCatalog::ClientTest < Minitest::Test diff --git a/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/policy_tag_manager_serialization_test.rb b/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/policy_tag_manager_serialization_test.rb index a421d2716f12..9b9af852d44b 100644 --- a/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/policy_tag_manager_serialization_test.rb +++ b/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/policy_tag_manager_serialization_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datacatalog/v1/policytagmanagerserialization_pb" -require "google/cloud/datacatalog/v1/policytagmanagerserialization_services_pb" require "google/cloud/data_catalog/v1/policy_tag_manager_serialization" class ::Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::ClientTest < Minitest::Test diff --git a/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/policy_tag_manager_test.rb b/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/policy_tag_manager_test.rb index 63afc1c28714..a82d8d3321a0 100644 --- a/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/policy_tag_manager_test.rb +++ b/google-cloud-data_catalog-v1/test/google/cloud/data_catalog/v1/policy_tag_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datacatalog/v1/policytagmanager_pb" -require "google/cloud/datacatalog/v1/policytagmanager_services_pb" require "google/cloud/data_catalog/v1/policy_tag_manager" class ::Google::Cloud::DataCatalog::V1::PolicyTagManager::ClientTest < Minitest::Test diff --git a/google-cloud-data_catalog-v1beta1/google-cloud-data_catalog-v1beta1.gemspec b/google-cloud-data_catalog-v1beta1/google-cloud-data_catalog-v1beta1.gemspec index 6f91782932e8..298ad3be6eea 100644 --- a/google-cloud-data_catalog-v1beta1/google-cloud-data_catalog-v1beta1.gemspec +++ b/google-cloud-data_catalog-v1beta1/google-cloud-data_catalog-v1beta1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" end diff --git a/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/data_catalog_test.rb b/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/data_catalog_test.rb index f6ed7823b98b..5e2e305e8723 100644 --- a/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/data_catalog_test.rb +++ b/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/data_catalog_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datacatalog/v1beta1/datacatalog_pb" -require "google/cloud/datacatalog/v1beta1/datacatalog_services_pb" require "google/cloud/data_catalog/v1beta1/data_catalog" class ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::ClientTest < Minitest::Test diff --git a/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization_test.rb b/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization_test.rb index ac527b0339ca..6f937b2f5750 100644 --- a/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization_test.rb +++ b/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datacatalog/v1beta1/policytagmanagerserialization_pb" -require "google/cloud/datacatalog/v1beta1/policytagmanagerserialization_services_pb" require "google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization" class ::Google::Cloud::DataCatalog::V1beta1::PolicyTagManagerSerialization::ClientTest < Minitest::Test diff --git a/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/policy_tag_manager_test.rb b/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/policy_tag_manager_test.rb index 8818c64eaba5..2597ee023f40 100644 --- a/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/policy_tag_manager_test.rb +++ b/google-cloud-data_catalog-v1beta1/test/google/cloud/data_catalog/v1beta1/policy_tag_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datacatalog/v1beta1/policytagmanager_pb" -require "google/cloud/datacatalog/v1beta1/policytagmanager_services_pb" require "google/cloud/data_catalog/v1beta1/policy_tag_manager" class ::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::ClientTest < Minitest::Test diff --git a/google-cloud-data_fusion-v1/google-cloud-data_fusion-v1.gemspec b/google-cloud-data_fusion-v1/google-cloud-data_fusion-v1.gemspec index 2e864d5be720..cab45886514b 100644 --- a/google-cloud-data_fusion-v1/google-cloud-data_fusion-v1.gemspec +++ b/google-cloud-data_fusion-v1/google-cloud-data_fusion-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-data_fusion-v1/test/google/cloud/data_fusion/v1/data_fusion_test.rb b/google-cloud-data_fusion-v1/test/google/cloud/data_fusion/v1/data_fusion_test.rb index 1f753be0e59d..1afb93c8df65 100644 --- a/google-cloud-data_fusion-v1/test/google/cloud/data_fusion/v1/data_fusion_test.rb +++ b/google-cloud-data_fusion-v1/test/google/cloud/data_fusion/v1/data_fusion_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datafusion/v1/datafusion_pb" -require "google/cloud/datafusion/v1/datafusion_services_pb" require "google/cloud/data_fusion/v1/data_fusion" class ::Google::Cloud::DataFusion::V1::DataFusion::ClientTest < Minitest::Test diff --git a/google-cloud-data_labeling-v1beta1/google-cloud-data_labeling-v1beta1.gemspec b/google-cloud-data_labeling-v1beta1/google-cloud-data_labeling-v1beta1.gemspec index e0e2c6c1b9a9..8c67f9eb5ad2 100644 --- a/google-cloud-data_labeling-v1beta1/google-cloud-data_labeling-v1beta1.gemspec +++ b/google-cloud-data_labeling-v1beta1/google-cloud-data_labeling-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-data_labeling-v1beta1/test/google/cloud/data_labeling/v1beta1/data_labeling_service_test.rb b/google-cloud-data_labeling-v1beta1/test/google/cloud/data_labeling/v1beta1/data_labeling_service_test.rb index 78af80205972..1b82d77d485b 100644 --- a/google-cloud-data_labeling-v1beta1/test/google/cloud/data_labeling/v1beta1/data_labeling_service_test.rb +++ b/google-cloud-data_labeling-v1beta1/test/google/cloud/data_labeling/v1beta1/data_labeling_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datalabeling/v1beta1/data_labeling_service_pb" -require "google/cloud/datalabeling/v1beta1/data_labeling_service_services_pb" require "google/cloud/data_labeling/v1beta1/data_labeling_service" class ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::ClientTest < Minitest::Test diff --git a/google-cloud-dataflow-v1beta3/google-cloud-dataflow-v1beta3.gemspec b/google-cloud-dataflow-v1beta3/google-cloud-dataflow-v1beta3.gemspec index 9c513e921822..08b0cfb7915b 100644 --- a/google-cloud-dataflow-v1beta3/google-cloud-dataflow-v1beta3.gemspec +++ b/google-cloud-dataflow-v1beta3/google-cloud-dataflow-v1beta3.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/flex_templates_service_test.rb b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/flex_templates_service_test.rb index 93a5eca6f99a..d7218857fa60 100644 --- a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/flex_templates_service_test.rb +++ b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/flex_templates_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/dataflow/v1beta3/templates_pb" -require "google/dataflow/v1beta3/templates_services_pb" require "google/cloud/dataflow/v1beta3/flex_templates_service" class ::Google::Cloud::Dataflow::V1beta3::FlexTemplatesService::ClientTest < Minitest::Test diff --git a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/jobs_test.rb b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/jobs_test.rb index a5be9f011f01..052c3a74386f 100644 --- a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/jobs_test.rb +++ b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/jobs_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/dataflow/v1beta3/jobs_pb" -require "google/dataflow/v1beta3/jobs_services_pb" require "google/cloud/dataflow/v1beta3/jobs" class ::Google::Cloud::Dataflow::V1beta3::Jobs::ClientTest < Minitest::Test diff --git a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/messages_test.rb b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/messages_test.rb index 656c5aea0323..e362a76e1bf9 100644 --- a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/messages_test.rb +++ b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/messages_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/dataflow/v1beta3/messages_pb" -require "google/dataflow/v1beta3/messages_services_pb" require "google/cloud/dataflow/v1beta3/messages" class ::Google::Cloud::Dataflow::V1beta3::Messages::ClientTest < Minitest::Test diff --git a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/metrics_test.rb b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/metrics_test.rb index 102eac4d4331..5b3e9c39e957 100644 --- a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/metrics_test.rb +++ b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/metrics_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/dataflow/v1beta3/metrics_pb" -require "google/dataflow/v1beta3/metrics_services_pb" require "google/cloud/dataflow/v1beta3/metrics" class ::Google::Cloud::Dataflow::V1beta3::Metrics::ClientTest < Minitest::Test diff --git a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/snapshots_test.rb b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/snapshots_test.rb index 44b42a3f023a..a606dadc57a2 100644 --- a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/snapshots_test.rb +++ b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/snapshots_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/dataflow/v1beta3/snapshots_pb" -require "google/dataflow/v1beta3/snapshots_services_pb" require "google/cloud/dataflow/v1beta3/snapshots" class ::Google::Cloud::Dataflow::V1beta3::Snapshots::ClientTest < Minitest::Test diff --git a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/templates_service_test.rb b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/templates_service_test.rb index 9e34a14dd398..a85290e028a9 100644 --- a/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/templates_service_test.rb +++ b/google-cloud-dataflow-v1beta3/test/google/cloud/dataflow/v1beta3/templates_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/dataflow/v1beta3/templates_pb" -require "google/dataflow/v1beta3/templates_services_pb" require "google/cloud/dataflow/v1beta3/templates_service" class ::Google::Cloud::Dataflow::V1beta3::TemplatesService::ClientTest < Minitest::Test diff --git a/google-cloud-dataform-v1/google-cloud-dataform-v1.gemspec b/google-cloud-dataform-v1/google-cloud-dataform-v1.gemspec index 5819c6e0ffa7..71f760ddfc79 100644 --- a/google-cloud-dataform-v1/google-cloud-dataform-v1.gemspec +++ b/google-cloud-dataform-v1/google-cloud-dataform-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/bindings_override.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/bindings_override.rb index 734f079bba23..e4e03b7f81fa 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/bindings_override.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -126,33 +126,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.dataform.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.dataform.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_test.rb b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_test.rb index 98f914ce0195..8792f753b40f 100644 --- a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_test.rb +++ b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataform/v1/dataform_pb" -require "google/cloud/dataform/v1/dataform_services_pb" require "google/cloud/dataform/v1/dataform" class ::Google::Cloud::Dataform::V1::Dataform::ClientTest < Minitest::Test diff --git a/google-cloud-dataform-v1beta1/google-cloud-dataform-v1beta1.gemspec b/google-cloud-dataform-v1beta1/google-cloud-dataform-v1beta1.gemspec index 7dd8c3e0ae8d..3d8103785752 100644 --- a/google-cloud-dataform-v1beta1/google-cloud-dataform-v1beta1.gemspec +++ b/google-cloud-dataform-v1beta1/google-cloud-dataform-v1beta1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/bindings_override.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/bindings_override.rb index 1dc797ef26ec..b2212fc64ac5 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/bindings_override.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -126,33 +126,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.dataform.v1beta1 package. - # - # This class contains common configuration for all services - # of the google.cloud.dataform.v1beta1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_test.rb b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_test.rb index 9664d7d753e3..ab7d4f59fdb0 100644 --- a/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_test.rb +++ b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataform/v1beta1/dataform_pb" -require "google/cloud/dataform/v1beta1/dataform_services_pb" require "google/cloud/dataform/v1beta1/dataform" class ::Google::Cloud::Dataform::V1beta1::Dataform::ClientTest < Minitest::Test diff --git a/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec b/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec index 2b0f14edc2b6..47e7e79ba558 100644 --- a/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec +++ b/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb index 700a57ed9f9e..e3def83c35f0 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -510,33 +510,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.dataplex.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.dataplex.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb index 98630d62de2f..ee104342f7c3 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_services_pb" require "google/cloud/dataplex/v1/catalog_service" class ::Google::Cloud::Dataplex::V1::CatalogService::ClientTest < Minitest::Test diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb index bdee65adba09..37ea4c3641bd 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataplex/v1/cmek_pb" -require "google/cloud/dataplex/v1/cmek_services_pb" require "google/cloud/dataplex/v1/cmek_service" class ::Google::Cloud::Dataplex::V1::CmekService::ClientTest < Minitest::Test diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb index a2ea490f2ddc..f449054f54e4 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/dataplex/v1/content_services_pb" require "google/cloud/dataplex/v1/content_service" class ::Google::Cloud::Dataplex::V1::ContentService::ClientTest < Minitest::Test diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb index 8d4b7cd23d62..04d0a717c592 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/datascans_services_pb" require "google/cloud/dataplex/v1/data_scan_service" class ::Google::Cloud::Dataplex::V1::DataScanService::ClientTest < Minitest::Test diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb index f75c3643e290..d6805c1935a2 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_services_pb" require "google/cloud/dataplex/v1/data_taxonomy_service" class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientTest < Minitest::Test diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb index 800f7ad58158..bb60bdeece78 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/service_services_pb" require "google/cloud/dataplex/v1/dataplex_service" class ::Google::Cloud::Dataplex::V1::DataplexService::ClientTest < Minitest::Test diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb index e53afeb10d0d..5a0f9221fd75 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataplex/v1/metadata_pb" -require "google/cloud/dataplex/v1/metadata_services_pb" require "google/cloud/dataplex/v1/metadata_service" class ::Google::Cloud::Dataplex::V1::MetadataService::ClientTest < Minitest::Test From f3c206efe0d2feee68a3f88902b072ffaaecd55f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 10:32:47 -0700 Subject: [PATCH 451/457] chore: use HTTP binding configuration class from new gapic-common (#30842) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFxbmEtdjFhbHBoYS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFzdG9yZS1hZG1pbi12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFzdG9yZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0tdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0tdjFhbHBoYTEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRlcGxveS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRldmVsb3Blcl9jb25uZWN0LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRldmljZV9zdHJlYW1pbmctdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gtdjMvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctdjIvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeV9lbmdpbmUtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRscC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRvY3VtZW50X2FpLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRvY3VtZW50X2FpLXYxYmV0YTMvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRvbWFpbnMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRvbWFpbnMtdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWVkZ2VfY29udGFpbmVyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWVkZ2VfbmV0d29yay12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-cloud-dataproc-v1.gemspec | 2 +- .../cloud/dataproc/v1/bindings_override.rb | 31 ++----------------- .../v1/autoscaling_policy_service_test.rb | 1 - .../dataproc/v1/batch_controller_test.rb | 1 - .../dataproc/v1/cluster_controller_test.rb | 1 - .../cloud/dataproc/v1/job_controller_test.rb | 1 - .../dataproc/v1/node_group_controller_test.rb | 1 - .../dataproc/v1/session_controller_test.rb | 1 - .../v1/session_template_controller_test.rb | 1 - .../v1/workflow_template_service_test.rb | 1 - .../google-cloud-dataqna-v1alpha.gemspec | 2 +- .../v1alpha/auto_suggestion_service_test.rb | 1 - .../dataqna/v1alpha/question_service_test.rb | 1 - .../google-cloud-datastore-admin-v1.gemspec | 2 +- .../admin/v1/datastore_admin_test.rb | 1 - .../google-cloud-datastore-v1.gemspec | 2 +- .../cloud/datastore/v1/datastore_test.rb | 1 - .../google-cloud-datastream-v1.gemspec | 2 +- .../cloud/datastream/v1/bindings_override.rb | 31 ++----------------- .../cloud/datastream/v1/datastream_test.rb | 1 - .../google-cloud-datastream-v1alpha1.gemspec | 2 +- .../datastream/v1alpha1/datastream_test.rb | 1 - .../google-cloud-deploy-v1.gemspec | 2 +- .../cloud/deploy/v1/bindings_override.rb | 31 ++----------------- .../cloud/deploy/v1/cloud_deploy_test.rb | 1 - .../google-cloud-developer_connect-v1.gemspec | 2 +- .../developer_connect/v1/bindings_override.rb | 31 ++----------------- .../v1/developer_connect_test.rb | 1 - .../v1/insights_config_service_test.rb | 1 - .../google-cloud-device_streaming-v1.gemspec | 2 +- .../v1/direct_access_service_test.rb | 1 - .../google-cloud-dialogflow-cx-v3.gemspec | 2 +- .../dialogflow/cx/v3/bindings_override.rb | 31 ++----------------- .../cloud/dialogflow/cx/v3/agents_test.rb | 1 - .../cloud/dialogflow/cx/v3/changelogs_test.rb | 1 - .../dialogflow/cx/v3/deployments_test.rb | 1 - .../dialogflow/cx/v3/entity_types_test.rb | 1 - .../dialogflow/cx/v3/environments_test.rb | 1 - .../dialogflow/cx/v3/experiments_test.rb | 1 - .../cloud/dialogflow/cx/v3/flows_test.rb | 1 - .../cloud/dialogflow/cx/v3/generators_test.rb | 1 - .../cloud/dialogflow/cx/v3/intents_test.rb | 1 - .../cloud/dialogflow/cx/v3/pages_test.rb | 1 - .../cx/v3/security_settings_service_test.rb | 1 - .../cx/v3/session_entity_types_test.rb | 1 - .../cloud/dialogflow/cx/v3/sessions_test.rb | 1 - .../cloud/dialogflow/cx/v3/test_cases_test.rb | 1 - .../cx/v3/transition_route_groups_test.rb | 1 - .../cloud/dialogflow/cx/v3/versions_test.rb | 1 - .../cloud/dialogflow/cx/v3/webhooks_test.rb | 1 - .../google-cloud-dialogflow-v2.gemspec | 2 +- .../cloud/dialogflow/v2/bindings_override.rb | 31 ++----------------- .../google/cloud/dialogflow/v2/agents_test.rb | 1 - .../dialogflow/v2/answer_records_test.rb | 1 - .../cloud/dialogflow/v2/contexts_test.rb | 1 - .../v2/conversation_datasets_test.rb | 1 - .../dialogflow/v2/conversation_models_test.rb | 1 - .../v2/conversation_profiles_test.rb | 1 - .../cloud/dialogflow/v2/conversations_test.rb | 1 - .../cloud/dialogflow/v2/documents_test.rb | 1 - .../v2/encryption_spec_service_test.rb | 1 - .../cloud/dialogflow/v2/entity_types_test.rb | 1 - .../cloud/dialogflow/v2/environments_test.rb | 1 - .../cloud/dialogflow/v2/fulfillments_test.rb | 1 - .../cloud/dialogflow/v2/generators_test.rb | 1 - .../cloud/dialogflow/v2/intents_test.rb | 1 - .../dialogflow/v2/knowledge_bases_test.rb | 1 - .../cloud/dialogflow/v2/participants_test.rb | 1 - .../v2/session_entity_types_test.rb | 1 - .../cloud/dialogflow/v2/sessions_test.rb | 1 - .../cloud/dialogflow/v2/versions_test.rb | 1 - .../google-cloud-discovery_engine-v1.gemspec | 2 +- .../v1/user_event_service/client.rb | 4 +-- .../v1/user_event_service/rest/client.rb | 4 +-- .../discoveryengine/v1/user_event_service.rb | 4 +-- .../v1/assistant_service_test.rb | 1 - .../v1/cmek_config_service_test.rb | 1 - .../v1/completion_service_test.rb | 1 - .../v1/control_service_test.rb | 1 - .../v1/conversational_search_service_test.rb | 1 - .../v1/data_store_service_test.rb | 1 - .../v1/document_service_test.rb | 1 - .../v1/engine_service_test.rb | 1 - .../v1/grounded_generation_service_test.rb | 1 - .../v1/identity_mapping_store_service_test.rb | 1 - .../v1/project_service_test.rb | 1 - .../discovery_engine/v1/rank_service_test.rb | 1 - .../v1/recommendation_service_test.rb | 1 - .../v1/schema_service_test.rb | 1 - .../v1/search_service_test.rb | 1 - .../v1/search_tuning_service_test.rb | 1 - .../v1/serving_config_service_test.rb | 1 - .../v1/session_service_test.rb | 1 - .../v1/site_search_engine_service_test.rb | 1 - .../v1/user_event_service_test.rb | 1 - .../v1/user_license_service_test.rb | 1 - ...ogle-cloud-discovery_engine-v1beta.gemspec | 2 +- .../v1beta/completion_service_test.rb | 1 - .../v1beta/control_service_test.rb | 1 - .../conversational_search_service_test.rb | 1 - .../v1beta/data_store_service_test.rb | 1 - .../v1beta/document_service_test.rb | 1 - .../v1beta/engine_service_test.rb | 1 - .../v1beta/evaluation_service_test.rb | 1 - .../grounded_generation_service_test.rb | 1 - .../v1beta/project_service_test.rb | 1 - .../v1beta/rank_service_test.rb | 1 - .../v1beta/recommendation_service_test.rb | 1 - .../v1beta/sample_query_service_test.rb | 1 - .../v1beta/sample_query_set_service_test.rb | 1 - .../v1beta/schema_service_test.rb | 1 - .../v1beta/search_service_test.rb | 1 - .../v1beta/search_tuning_service_test.rb | 1 - .../v1beta/serving_config_service_test.rb | 1 - .../v1beta/session_service_test.rb | 1 - .../v1beta/site_search_engine_service_test.rb | 1 - .../v1beta/user_event_service_test.rb | 1 - .../google-cloud-dlp-v2.gemspec | 2 +- .../google/cloud/dlp/v2/dlp_service_test.rb | 1 - .../google-cloud-document_ai-v1beta3.gemspec | 2 +- .../document_ai/v1beta3/bindings_override.rb | 31 ++----------------- .../document_processor_service_test.rb | 1 - .../v1beta3/document_service_test.rb | 1 - .../google-cloud-domains-v1.gemspec | 2 +- .../google/cloud/domains/v1/domains_test.rb | 1 - .../google-cloud-domains-v1beta1.gemspec | 2 +- .../cloud/domains/v1beta1/domains_test.rb | 1 - .../google-cloud-edge_container-v1.gemspec | 2 +- .../edge_container/v1/bindings_override.rb | 31 ++----------------- .../cloud/edgecontainer/v1/resources.rb | 2 +- .../edge_container/v1/edge_container_test.rb | 1 - .../google-cloud-edge_network-v1.gemspec | 2 +- .../edge_network/v1/bindings_override.rb | 31 ++----------------- .../edge_network/v1/edge_network_test.rb | 1 - 134 files changed, 44 insertions(+), 389 deletions(-) diff --git a/google-cloud-dataproc-v1/google-cloud-dataproc-v1.gemspec b/google-cloud-dataproc-v1/google-cloud-dataproc-v1.gemspec index b9289c2a944c..3d3c4158fdee 100644 --- a/google-cloud-dataproc-v1/google-cloud-dataproc-v1.gemspec +++ b/google-cloud-dataproc-v1/google-cloud-dataproc-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" end diff --git a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/bindings_override.rb b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/bindings_override.rb index c51658de7a66..79824e4a4b4b 100644 --- a/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/bindings_override.rb +++ b/google-cloud-dataproc-v1/lib/google/cloud/dataproc/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :post, @@ -224,33 +224,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.dataproc.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.dataproc.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/autoscaling_policy_service_test.rb b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/autoscaling_policy_service_test.rb index 7464aed6cd58..3bb9dbbf5867 100644 --- a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/autoscaling_policy_service_test.rb +++ b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/autoscaling_policy_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataproc/v1/autoscaling_policies_pb" -require "google/cloud/dataproc/v1/autoscaling_policies_services_pb" require "google/cloud/dataproc/v1/autoscaling_policy_service" class ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::ClientTest < Minitest::Test diff --git a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/batch_controller_test.rb b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/batch_controller_test.rb index 41f7fa64ff66..c8fcf26097b6 100644 --- a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/batch_controller_test.rb +++ b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/batch_controller_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataproc/v1/batches_pb" -require "google/cloud/dataproc/v1/batches_services_pb" require "google/cloud/dataproc/v1/batch_controller" class ::Google::Cloud::Dataproc::V1::BatchController::ClientTest < Minitest::Test diff --git a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/cluster_controller_test.rb b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/cluster_controller_test.rb index 90a660646d3c..bb271ff5b3bd 100644 --- a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/cluster_controller_test.rb +++ b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/cluster_controller_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataproc/v1/clusters_pb" -require "google/cloud/dataproc/v1/clusters_services_pb" require "google/cloud/dataproc/v1/cluster_controller" class ::Google::Cloud::Dataproc::V1::ClusterController::ClientTest < Minitest::Test diff --git a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/job_controller_test.rb b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/job_controller_test.rb index 58bc0c03c821..20d709eeee69 100644 --- a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/job_controller_test.rb +++ b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/job_controller_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataproc/v1/jobs_pb" -require "google/cloud/dataproc/v1/jobs_services_pb" require "google/cloud/dataproc/v1/job_controller" class ::Google::Cloud::Dataproc::V1::JobController::ClientTest < Minitest::Test diff --git a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/node_group_controller_test.rb b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/node_group_controller_test.rb index c4b843b3db2c..043d114537a3 100644 --- a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/node_group_controller_test.rb +++ b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/node_group_controller_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataproc/v1/node_groups_pb" -require "google/cloud/dataproc/v1/node_groups_services_pb" require "google/cloud/dataproc/v1/node_group_controller" class ::Google::Cloud::Dataproc::V1::NodeGroupController::ClientTest < Minitest::Test diff --git a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/session_controller_test.rb b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/session_controller_test.rb index 90c127fbf2ad..4791c9a9789e 100644 --- a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/session_controller_test.rb +++ b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/session_controller_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataproc/v1/sessions_pb" -require "google/cloud/dataproc/v1/sessions_services_pb" require "google/cloud/dataproc/v1/session_controller" class ::Google::Cloud::Dataproc::V1::SessionController::ClientTest < Minitest::Test diff --git a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/session_template_controller_test.rb b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/session_template_controller_test.rb index 42d094c95a0b..a84beb9aa811 100644 --- a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/session_template_controller_test.rb +++ b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/session_template_controller_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataproc/v1/session_templates_pb" -require "google/cloud/dataproc/v1/session_templates_services_pb" require "google/cloud/dataproc/v1/session_template_controller" class ::Google::Cloud::Dataproc::V1::SessionTemplateController::ClientTest < Minitest::Test diff --git a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/workflow_template_service_test.rb b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/workflow_template_service_test.rb index 77c8eb12117f..e315978db25d 100644 --- a/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/workflow_template_service_test.rb +++ b/google-cloud-dataproc-v1/test/google/cloud/dataproc/v1/workflow_template_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataproc/v1/workflow_templates_pb" -require "google/cloud/dataproc/v1/workflow_templates_services_pb" require "google/cloud/dataproc/v1/workflow_template_service" class ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::ClientTest < Minitest::Test diff --git a/google-cloud-dataqna-v1alpha/google-cloud-dataqna-v1alpha.gemspec b/google-cloud-dataqna-v1alpha/google-cloud-dataqna-v1alpha.gemspec index aba5f7422eed..01e2dda28278 100644 --- a/google-cloud-dataqna-v1alpha/google-cloud-dataqna-v1alpha.gemspec +++ b/google-cloud-dataqna-v1alpha/google-cloud-dataqna-v1alpha.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-dataqna-v1alpha/test/google/cloud/dataqna/v1alpha/auto_suggestion_service_test.rb b/google-cloud-dataqna-v1alpha/test/google/cloud/dataqna/v1alpha/auto_suggestion_service_test.rb index a4ae0bc5b898..f744e17724aa 100644 --- a/google-cloud-dataqna-v1alpha/test/google/cloud/dataqna/v1alpha/auto_suggestion_service_test.rb +++ b/google-cloud-dataqna-v1alpha/test/google/cloud/dataqna/v1alpha/auto_suggestion_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataqna/v1alpha/auto_suggestion_service_pb" -require "google/cloud/dataqna/v1alpha/auto_suggestion_service_services_pb" require "google/cloud/dataqna/v1alpha/auto_suggestion_service" class ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::ClientTest < Minitest::Test diff --git a/google-cloud-dataqna-v1alpha/test/google/cloud/dataqna/v1alpha/question_service_test.rb b/google-cloud-dataqna-v1alpha/test/google/cloud/dataqna/v1alpha/question_service_test.rb index d8a8811dcfa4..559a0ce380cf 100644 --- a/google-cloud-dataqna-v1alpha/test/google/cloud/dataqna/v1alpha/question_service_test.rb +++ b/google-cloud-dataqna-v1alpha/test/google/cloud/dataqna/v1alpha/question_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dataqna/v1alpha/question_service_pb" -require "google/cloud/dataqna/v1alpha/question_service_services_pb" require "google/cloud/dataqna/v1alpha/question_service" class ::Google::Cloud::DataQnA::V1alpha::QuestionService::ClientTest < Minitest::Test diff --git a/google-cloud-datastore-admin-v1/google-cloud-datastore-admin-v1.gemspec b/google-cloud-datastore-admin-v1/google-cloud-datastore-admin-v1.gemspec index aea3709f3062..5840d1c8b83f 100644 --- a/google-cloud-datastore-admin-v1/google-cloud-datastore-admin-v1.gemspec +++ b/google-cloud-datastore-admin-v1/google-cloud-datastore-admin-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-datastore-admin-v1/test/google/cloud/datastore/admin/v1/datastore_admin_test.rb b/google-cloud-datastore-admin-v1/test/google/cloud/datastore/admin/v1/datastore_admin_test.rb index 84cbf49b7447..f949d227ab7c 100644 --- a/google-cloud-datastore-admin-v1/test/google/cloud/datastore/admin/v1/datastore_admin_test.rb +++ b/google-cloud-datastore-admin-v1/test/google/cloud/datastore/admin/v1/datastore_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/datastore/admin/v1/datastore_admin_pb" -require "google/datastore/admin/v1/datastore_admin_services_pb" require "google/cloud/datastore/admin/v1/datastore_admin" class ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-datastore-v1/google-cloud-datastore-v1.gemspec b/google-cloud-datastore-v1/google-cloud-datastore-v1.gemspec index 511de7d544ed..5c1cecce2a4f 100644 --- a/google-cloud-datastore-v1/google-cloud-datastore-v1.gemspec +++ b/google-cloud-datastore-v1/google-cloud-datastore-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-datastore-v1/test/google/cloud/datastore/v1/datastore_test.rb b/google-cloud-datastore-v1/test/google/cloud/datastore/v1/datastore_test.rb index 25ea4f186fcd..f1bb9ce76151 100644 --- a/google-cloud-datastore-v1/test/google/cloud/datastore/v1/datastore_test.rb +++ b/google-cloud-datastore-v1/test/google/cloud/datastore/v1/datastore_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/datastore/v1/datastore_pb" -require "google/datastore/v1/datastore_services_pb" require "google/cloud/datastore/v1/datastore" class ::Google::Cloud::Datastore::V1::Datastore::ClientTest < Minitest::Test diff --git a/google-cloud-datastream-v1/google-cloud-datastream-v1.gemspec b/google-cloud-datastream-v1/google-cloud-datastream-v1.gemspec index 1a1cd0e3c3c1..1279ee0c9555 100644 --- a/google-cloud-datastream-v1/google-cloud-datastream-v1.gemspec +++ b/google-cloud-datastream-v1/google-cloud-datastream-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/bindings_override.rb b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/bindings_override.rb index c8c99b9a3a94..610fc8d41df9 100644 --- a/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/bindings_override.rb +++ b/google-cloud-datastream-v1/lib/google/cloud/datastream/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.datastream.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.datastream.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_test.rb b/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_test.rb index c9f467b0d696..72699b9ea9fc 100644 --- a/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_test.rb +++ b/google-cloud-datastream-v1/test/google/cloud/datastream/v1/datastream_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datastream/v1/datastream_pb" -require "google/cloud/datastream/v1/datastream_services_pb" require "google/cloud/datastream/v1/datastream" class ::Google::Cloud::Datastream::V1::Datastream::ClientTest < Minitest::Test diff --git a/google-cloud-datastream-v1alpha1/google-cloud-datastream-v1alpha1.gemspec b/google-cloud-datastream-v1alpha1/google-cloud-datastream-v1alpha1.gemspec index 9b2f9a0baae9..03de127a38a0 100644 --- a/google-cloud-datastream-v1alpha1/google-cloud-datastream-v1alpha1.gemspec +++ b/google-cloud-datastream-v1alpha1/google-cloud-datastream-v1alpha1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-datastream-v1alpha1/test/google/cloud/datastream/v1alpha1/datastream_test.rb b/google-cloud-datastream-v1alpha1/test/google/cloud/datastream/v1alpha1/datastream_test.rb index cc3940d7cb23..c563c351f922 100644 --- a/google-cloud-datastream-v1alpha1/test/google/cloud/datastream/v1alpha1/datastream_test.rb +++ b/google-cloud-datastream-v1alpha1/test/google/cloud/datastream/v1alpha1/datastream_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/datastream/v1alpha1/datastream_pb" -require "google/cloud/datastream/v1alpha1/datastream_services_pb" require "google/cloud/datastream/v1alpha1/datastream" class ::Google::Cloud::Datastream::V1alpha1::Datastream::ClientTest < Minitest::Test diff --git a/google-cloud-deploy-v1/google-cloud-deploy-v1.gemspec b/google-cloud-deploy-v1/google-cloud-deploy-v1.gemspec index 003fe007eddf..e2f41f6d3423 100644 --- a/google-cloud-deploy-v1/google-cloud-deploy-v1.gemspec +++ b/google-cloud-deploy-v1/google-cloud-deploy-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-deploy-v1/lib/google/cloud/deploy/v1/bindings_override.rb b/google-cloud-deploy-v1/lib/google/cloud/deploy/v1/bindings_override.rb index 9780dea614bf..11af4cb2e87c 100644 --- a/google-cloud-deploy-v1/lib/google/cloud/deploy/v1/bindings_override.rb +++ b/google-cloud-deploy-v1/lib/google/cloud/deploy/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -158,33 +158,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.deploy.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.deploy.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-deploy-v1/test/google/cloud/deploy/v1/cloud_deploy_test.rb b/google-cloud-deploy-v1/test/google/cloud/deploy/v1/cloud_deploy_test.rb index 0372b8eff530..2103c762a51f 100644 --- a/google-cloud-deploy-v1/test/google/cloud/deploy/v1/cloud_deploy_test.rb +++ b/google-cloud-deploy-v1/test/google/cloud/deploy/v1/cloud_deploy_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/deploy/v1/cloud_deploy_pb" -require "google/cloud/deploy/v1/cloud_deploy_services_pb" require "google/cloud/deploy/v1/cloud_deploy" class ::Google::Cloud::Deploy::V1::CloudDeploy::ClientTest < Minitest::Test diff --git a/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec b/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec index d61eaf46d24d..36ab7ac269ac 100644 --- a/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec +++ b/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb index 531ba3c34cb2..47747d6e5922 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.developerconnect.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.developerconnect.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb index 7539a8e8bf15..824b8723b3b7 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/developerconnect/v1/developer_connect_pb" -require "google/cloud/developerconnect/v1/developer_connect_services_pb" require "google/cloud/developer_connect/v1/developer_connect" class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::ClientTest < Minitest::Test diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb index 8f323dfa601f..aef930c944d2 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/developerconnect/v1/insights_config_pb" -require "google/cloud/developerconnect/v1/insights_config_services_pb" require "google/cloud/developerconnect/v1/insights_config_service" class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::ClientTest < Minitest::Test diff --git a/google-cloud-device_streaming-v1/google-cloud-device_streaming-v1.gemspec b/google-cloud-device_streaming-v1/google-cloud-device_streaming-v1.gemspec index e1f578394299..65411313d5fe 100644 --- a/google-cloud-device_streaming-v1/google-cloud-device_streaming-v1.gemspec +++ b/google-cloud-device_streaming-v1/google-cloud-device_streaming-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-device_streaming-v1/test/google/cloud/device_streaming/v1/direct_access_service_test.rb b/google-cloud-device_streaming-v1/test/google/cloud/device_streaming/v1/direct_access_service_test.rb index 725a7190ddb4..bccf2d41f948 100644 --- a/google-cloud-device_streaming-v1/test/google/cloud/device_streaming/v1/direct_access_service_test.rb +++ b/google-cloud-device_streaming-v1/test/google/cloud/device_streaming/v1/direct_access_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/devicestreaming/v1/service_pb" -require "google/cloud/devicestreaming/v1/service_services_pb" require "google/cloud/device_streaming/v1/direct_access_service" class ::Google::Cloud::DeviceStreaming::V1::DirectAccessService::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/google-cloud-dialogflow-cx-v3.gemspec b/google-cloud-dialogflow-cx-v3/google-cloud-dialogflow-cx-v3.gemspec index 1c55af0debe6..d83d017a44c9 100644 --- a/google-cloud-dialogflow-cx-v3/google-cloud-dialogflow-cx-v3.gemspec +++ b/google-cloud-dialogflow-cx-v3/google-cloud-dialogflow-cx-v3.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/bindings_override.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/bindings_override.rb index e94ca89aa181..1f17fe59b4fa 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/bindings_override.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -43,7 +43,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -70,33 +70,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.dialogflow.cx.v3 package. - # - # This class contains common configuration for all services - # of the google.cloud.dialogflow.cx.v3 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/agents_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/agents_test.rb index e0b12b3bb475..e8cf375ccfc3 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/agents_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/agents_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/agent_pb" -require "google/cloud/dialogflow/cx/v3/agent_services_pb" require "google/cloud/dialogflow/cx/v3/agents" class ::Google::Cloud::Dialogflow::CX::V3::Agents::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/changelogs_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/changelogs_test.rb index 563b8540e1ab..b4b6c534fead 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/changelogs_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/changelogs_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/changelog_pb" -require "google/cloud/dialogflow/cx/v3/changelog_services_pb" require "google/cloud/dialogflow/cx/v3/changelogs" class ::Google::Cloud::Dialogflow::CX::V3::Changelogs::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/deployments_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/deployments_test.rb index a38f4788b91f..466a536a2e19 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/deployments_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/deployments_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/deployment_pb" -require "google/cloud/dialogflow/cx/v3/deployment_services_pb" require "google/cloud/dialogflow/cx/v3/deployments" class ::Google::Cloud::Dialogflow::CX::V3::Deployments::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/entity_types_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/entity_types_test.rb index 884562ac566d..21b5e292b283 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/entity_types_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/entity_types_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/entity_type_pb" -require "google/cloud/dialogflow/cx/v3/entity_type_services_pb" require "google/cloud/dialogflow/cx/v3/entity_types" class ::Google::Cloud::Dialogflow::CX::V3::EntityTypes::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/environments_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/environments_test.rb index 3642498c1d54..c45bce95c610 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/environments_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/environments_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/environment_pb" -require "google/cloud/dialogflow/cx/v3/environment_services_pb" require "google/cloud/dialogflow/cx/v3/environments" class ::Google::Cloud::Dialogflow::CX::V3::Environments::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/experiments_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/experiments_test.rb index 77062dfc446d..89505afa198a 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/experiments_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/experiments_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/experiment_pb" -require "google/cloud/dialogflow/cx/v3/experiment_services_pb" require "google/cloud/dialogflow/cx/v3/experiments" class ::Google::Cloud::Dialogflow::CX::V3::Experiments::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/flows_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/flows_test.rb index 5d9a704e5c21..1b8748fb80f3 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/flows_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/flows_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/flow_pb" -require "google/cloud/dialogflow/cx/v3/flow_services_pb" require "google/cloud/dialogflow/cx/v3/flows" class ::Google::Cloud::Dialogflow::CX::V3::Flows::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/generators_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/generators_test.rb index dd40b92a5302..68e6509ca44c 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/generators_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/generators_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/generator_pb" -require "google/cloud/dialogflow/cx/v3/generator_services_pb" require "google/cloud/dialogflow/cx/v3/generators" class ::Google::Cloud::Dialogflow::CX::V3::Generators::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/intents_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/intents_test.rb index bfc5e6a959b7..32c52e2c2a63 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/intents_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/intents_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/intent_pb" -require "google/cloud/dialogflow/cx/v3/intent_services_pb" require "google/cloud/dialogflow/cx/v3/intents" class ::Google::Cloud::Dialogflow::CX::V3::Intents::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/pages_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/pages_test.rb index b1bb4956a29b..3af5f34d470a 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/pages_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/pages_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/page_pb" -require "google/cloud/dialogflow/cx/v3/page_services_pb" require "google/cloud/dialogflow/cx/v3/pages" class ::Google::Cloud::Dialogflow::CX::V3::Pages::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/security_settings_service_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/security_settings_service_test.rb index 2ea094b0674a..c9e64b5dca44 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/security_settings_service_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/security_settings_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/security_settings_pb" -require "google/cloud/dialogflow/cx/v3/security_settings_services_pb" require "google/cloud/dialogflow/cx/v3/security_settings_service" class ::Google::Cloud::Dialogflow::CX::V3::SecuritySettingsService::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/session_entity_types_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/session_entity_types_test.rb index 007e3690015d..2a40a63e2012 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/session_entity_types_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/session_entity_types_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/session_entity_type_pb" -require "google/cloud/dialogflow/cx/v3/session_entity_type_services_pb" require "google/cloud/dialogflow/cx/v3/session_entity_types" class ::Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/sessions_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/sessions_test.rb index bc960bfe6a5b..a102d7975824 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/sessions_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/sessions_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/session_pb" -require "google/cloud/dialogflow/cx/v3/session_services_pb" require "google/cloud/dialogflow/cx/v3/sessions" class ::Google::Cloud::Dialogflow::CX::V3::Sessions::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/test_cases_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/test_cases_test.rb index 11fda5e4725f..ffb912f9c08d 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/test_cases_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/test_cases_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/test_case_pb" -require "google/cloud/dialogflow/cx/v3/test_case_services_pb" require "google/cloud/dialogflow/cx/v3/test_cases" class ::Google::Cloud::Dialogflow::CX::V3::TestCases::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/transition_route_groups_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/transition_route_groups_test.rb index 5aaeb1239add..0521ac3570e4 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/transition_route_groups_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/transition_route_groups_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/transition_route_group_pb" -require "google/cloud/dialogflow/cx/v3/transition_route_group_services_pb" require "google/cloud/dialogflow/cx/v3/transition_route_groups" class ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/versions_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/versions_test.rb index a8719232b6da..3fec8a5e9c99 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/versions_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/versions_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/version_pb" -require "google/cloud/dialogflow/cx/v3/version_services_pb" require "google/cloud/dialogflow/cx/v3/versions" class ::Google::Cloud::Dialogflow::CX::V3::Versions::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/webhooks_test.rb b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/webhooks_test.rb index edb4318df2bf..92b1085a2e98 100644 --- a/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/webhooks_test.rb +++ b/google-cloud-dialogflow-cx-v3/test/google/cloud/dialogflow/cx/v3/webhooks_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/cx/v3/webhook_pb" -require "google/cloud/dialogflow/cx/v3/webhook_services_pb" require "google/cloud/dialogflow/cx/v3/webhooks" class ::Google::Cloud::Dialogflow::CX::V3::Webhooks::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/google-cloud-dialogflow-v2.gemspec b/google-cloud-dialogflow-v2/google-cloud-dialogflow-v2.gemspec index 86cb7ae73418..8317c236de28 100644 --- a/google-cloud-dialogflow-v2/google-cloud-dialogflow-v2.gemspec +++ b/google-cloud-dialogflow-v2/google-cloud-dialogflow-v2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/bindings_override.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/bindings_override.rb index 0fd9a6bee371..4e8b7dfc27f3 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/bindings_override.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.dialogflow.v2 package. - # - # This class contains common configuration for all services - # of the google.cloud.dialogflow.v2 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/agents_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/agents_test.rb index 19b43655bc64..b301127e075a 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/agents_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/agents_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/agent_pb" -require "google/cloud/dialogflow/v2/agent_services_pb" require "google/cloud/dialogflow/v2/agents" class ::Google::Cloud::Dialogflow::V2::Agents::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/answer_records_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/answer_records_test.rb index 5a29cf1c6705..4a22e130f8a0 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/answer_records_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/answer_records_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/answer_record_pb" -require "google/cloud/dialogflow/v2/answer_record_services_pb" require "google/cloud/dialogflow/v2/answer_records" class ::Google::Cloud::Dialogflow::V2::AnswerRecords::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/contexts_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/contexts_test.rb index 7f768b3c326b..ff4fe702f855 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/contexts_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/contexts_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/context_pb" -require "google/cloud/dialogflow/v2/context_services_pb" require "google/cloud/dialogflow/v2/contexts" class ::Google::Cloud::Dialogflow::V2::Contexts::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_datasets_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_datasets_test.rb index 0e155ad8f506..18de081a2480 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_datasets_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_datasets_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/conversation_dataset_pb" -require "google/cloud/dialogflow/v2/conversation_dataset_services_pb" require "google/cloud/dialogflow/v2/conversation_datasets" class ::Google::Cloud::Dialogflow::V2::ConversationDatasets::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_models_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_models_test.rb index d33571cce981..8c56883b889c 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_models_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_models_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/conversation_model_pb" -require "google/cloud/dialogflow/v2/conversation_model_services_pb" require "google/cloud/dialogflow/v2/conversation_models" class ::Google::Cloud::Dialogflow::V2::ConversationModels::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_profiles_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_profiles_test.rb index 0916cd7ef3c5..7bcc45c3756c 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_profiles_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversation_profiles_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/conversation_profile_pb" -require "google/cloud/dialogflow/v2/conversation_profile_services_pb" require "google/cloud/dialogflow/v2/conversation_profiles" class ::Google::Cloud::Dialogflow::V2::ConversationProfiles::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversations_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversations_test.rb index 497d33dc980b..66352e3d322c 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversations_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/conversations_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/conversation_pb" -require "google/cloud/dialogflow/v2/conversation_services_pb" require "google/cloud/dialogflow/v2/conversations" class ::Google::Cloud::Dialogflow::V2::Conversations::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/documents_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/documents_test.rb index ae5aa677a354..d79c25bcb11f 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/documents_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/documents_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/document_pb" -require "google/cloud/dialogflow/v2/document_services_pb" require "google/cloud/dialogflow/v2/documents" class ::Google::Cloud::Dialogflow::V2::Documents::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/encryption_spec_service_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/encryption_spec_service_test.rb index 404cc5572b2b..25fc25ef200f 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/encryption_spec_service_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/encryption_spec_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/encryption_spec_pb" -require "google/cloud/dialogflow/v2/encryption_spec_services_pb" require "google/cloud/dialogflow/v2/encryption_spec_service" class ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/entity_types_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/entity_types_test.rb index 6c693474d998..01fe2e430f3c 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/entity_types_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/entity_types_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/entity_type_pb" -require "google/cloud/dialogflow/v2/entity_type_services_pb" require "google/cloud/dialogflow/v2/entity_types" class ::Google::Cloud::Dialogflow::V2::EntityTypes::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/environments_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/environments_test.rb index d54f3e20bb15..caf60227ebe6 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/environments_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/environments_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/environment_pb" -require "google/cloud/dialogflow/v2/environment_services_pb" require "google/cloud/dialogflow/v2/environments" class ::Google::Cloud::Dialogflow::V2::Environments::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/fulfillments_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/fulfillments_test.rb index 48a040f39a9d..9718320c6886 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/fulfillments_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/fulfillments_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/fulfillment_pb" -require "google/cloud/dialogflow/v2/fulfillment_services_pb" require "google/cloud/dialogflow/v2/fulfillments" class ::Google::Cloud::Dialogflow::V2::Fulfillments::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/generators_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/generators_test.rb index c69aa286325f..c016971d0fe8 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/generators_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/generators_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/generator_pb" -require "google/cloud/dialogflow/v2/generator_services_pb" require "google/cloud/dialogflow/v2/generators" class ::Google::Cloud::Dialogflow::V2::Generators::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/intents_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/intents_test.rb index 62b3fdfab049..1d7ab8fc7830 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/intents_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/intents_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/intent_pb" -require "google/cloud/dialogflow/v2/intent_services_pb" require "google/cloud/dialogflow/v2/intents" class ::Google::Cloud::Dialogflow::V2::Intents::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/knowledge_bases_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/knowledge_bases_test.rb index 247344d085d6..28fcc8b024d2 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/knowledge_bases_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/knowledge_bases_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/knowledge_base_pb" -require "google/cloud/dialogflow/v2/knowledge_base_services_pb" require "google/cloud/dialogflow/v2/knowledge_bases" class ::Google::Cloud::Dialogflow::V2::KnowledgeBases::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/participants_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/participants_test.rb index edca51ac3bd5..e6ab97b87036 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/participants_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/participants_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/participant_pb" -require "google/cloud/dialogflow/v2/participant_services_pb" require "google/cloud/dialogflow/v2/participants" class ::Google::Cloud::Dialogflow::V2::Participants::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/session_entity_types_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/session_entity_types_test.rb index a605b16e3321..3d7cf2ab6782 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/session_entity_types_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/session_entity_types_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/session_entity_type_pb" -require "google/cloud/dialogflow/v2/session_entity_type_services_pb" require "google/cloud/dialogflow/v2/session_entity_types" class ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/sessions_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/sessions_test.rb index 1bc40dbc8fd5..c529ea4fa74e 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/sessions_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/sessions_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/session_pb" -require "google/cloud/dialogflow/v2/session_services_pb" require "google/cloud/dialogflow/v2/sessions" class ::Google::Cloud::Dialogflow::V2::Sessions::ClientTest < Minitest::Test diff --git a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/versions_test.rb b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/versions_test.rb index d07b48774471..2f3ecee30da1 100644 --- a/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/versions_test.rb +++ b/google-cloud-dialogflow-v2/test/google/cloud/dialogflow/v2/versions_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/dialogflow/v2/version_pb" -require "google/cloud/dialogflow/v2/version_services_pb" require "google/cloud/dialogflow/v2/versions" class ::Google::Cloud::Dialogflow::V2::Versions::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/google-cloud-discovery_engine-v1.gemspec b/google-cloud-discovery_engine-v1/google-cloud-discovery_engine-v1.gemspec index 7aec22984a8f..00ddffab98c6 100644 --- a/google-cloud-discovery_engine-v1/google-cloud-discovery_engine-v1.gemspec +++ b/google-cloud-discovery_engine-v1/google-cloud-discovery_engine-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb index 08bd0442c50a..8dba1c6a633d 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb @@ -248,7 +248,7 @@ def logger # is: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. # If the write user event action is applied in - # `::Google::Cloud::Location::Location` level, for example, the event + # [Location][google.cloud.location.Location] level, for example, the event # with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is: # `projects/{project}/locations/{location}`. @@ -351,7 +351,7 @@ def write_user_event request, options = nil # is: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. # If the collect user event action is applied in - # `::Google::Cloud::Location::Location` level, for example, the event + # [Location][google.cloud.location.Location] level, for example, the event # with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is: # `projects/{project}/locations/{location}`. diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb index 58a59cafcdea..b898f6ba641d 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb @@ -241,7 +241,7 @@ def logger # is: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. # If the write user event action is applied in - # `::Google::Cloud::Location::Location` level, for example, the event + # [Location][google.cloud.location.Location] level, for example, the event # with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is: # `projects/{project}/locations/{location}`. @@ -337,7 +337,7 @@ def write_user_event request, options = nil # is: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. # If the collect user event action is applied in - # `::Google::Cloud::Location::Location` level, for example, the event + # [Location][google.cloud.location.Location] level, for example, the event # with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is: # `projects/{project}/locations/{location}`. diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb index 6ed214e0083d..3b9ab36dfd9e 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb @@ -30,7 +30,7 @@ module V1 # is: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. # If the write user event action is applied in - # `::Google::Cloud::Location::Location` level, for example, the event + # [Location][google.cloud.location.Location] level, for example, the event # with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is: # `projects/{project}/locations/{location}`. @@ -55,7 +55,7 @@ class WriteUserEventRequest # is: # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. # If the collect user event action is applied in - # `::Google::Cloud::Location::Location` level, for example, the event + # [Location][google.cloud.location.Location] level, for example, the event # with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is: # `projects/{project}/locations/{location}`. diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_test.rb index cd9efd419a46..9cb82e5e5d0d 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/assistant_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/assistant_service_pb" -require "google/cloud/discoveryengine/v1/assistant_service_services_pb" require "google/cloud/discovery_engine/v1/assistant_service" class ::Google::Cloud::DiscoveryEngine::V1::AssistantService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb index c72d0ca5f3eb..439565364d7b 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/cmek_config_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/cmek_config_service_pb" -require "google/cloud/discoveryengine/v1/cmek_config_service_services_pb" require "google/cloud/discovery_engine/v1/cmek_config_service" class ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/completion_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/completion_service_test.rb index e709f7053d15..7936c6ff2b1d 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/completion_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/completion_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/completion_service_pb" -require "google/cloud/discoveryengine/v1/completion_service_services_pb" require "google/cloud/discovery_engine/v1/completion_service" class ::Google::Cloud::DiscoveryEngine::V1::CompletionService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/control_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/control_service_test.rb index 6381dd49a579..5918884d23b3 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/control_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/control_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/control_service_pb" -require "google/cloud/discoveryengine/v1/control_service_services_pb" require "google/cloud/discovery_engine/v1/control_service" class ::Google::Cloud::DiscoveryEngine::V1::ControlService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/conversational_search_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/conversational_search_service_test.rb index ac952cda4b61..32eff344d50f 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/conversational_search_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/conversational_search_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/conversational_search_service_pb" -require "google/cloud/discoveryengine/v1/conversational_search_service_services_pb" require "google/cloud/discovery_engine/v1/conversational_search_service" class ::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_test.rb index 683d301237bf..5ee3c1fc9b03 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/data_store_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/data_store_service_pb" -require "google/cloud/discoveryengine/v1/data_store_service_services_pb" require "google/cloud/discovery_engine/v1/data_store_service" class ::Google::Cloud::DiscoveryEngine::V1::DataStoreService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/document_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/document_service_test.rb index 25a4ddddac93..3ae40bcdde3c 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/document_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/document_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/document_service_pb" -require "google/cloud/discoveryengine/v1/document_service_services_pb" require "google/cloud/discovery_engine/v1/document_service" class ::Google::Cloud::DiscoveryEngine::V1::DocumentService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/engine_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/engine_service_test.rb index 455733f524f0..411e3339cf26 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/engine_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/engine_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/engine_service_pb" -require "google/cloud/discoveryengine/v1/engine_service_services_pb" require "google/cloud/discovery_engine/v1/engine_service" class ::Google::Cloud::DiscoveryEngine::V1::EngineService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/grounded_generation_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/grounded_generation_service_test.rb index bf1b01b5692a..afc7ccefb9f8 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/grounded_generation_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/grounded_generation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/grounded_generation_service_pb" -require "google/cloud/discoveryengine/v1/grounded_generation_service_services_pb" require "google/cloud/discovery_engine/v1/grounded_generation_service" class ::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb index 2edb6bb53d4b..7ba50d387ebd 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/identity_mapping_store_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/identity_mapping_store_service_pb" -require "google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb" require "google/cloud/discovery_engine/v1/identity_mapping_store_service" class ::Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/project_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/project_service_test.rb index 47ba14b0ec2a..8a881984ac8c 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/project_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/project_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/project_service_pb" -require "google/cloud/discoveryengine/v1/project_service_services_pb" require "google/cloud/discovery_engine/v1/project_service" class ::Google::Cloud::DiscoveryEngine::V1::ProjectService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/rank_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/rank_service_test.rb index 683e41f537a4..943a111d47ba 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/rank_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/rank_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/rank_service_pb" -require "google/cloud/discoveryengine/v1/rank_service_services_pb" require "google/cloud/discovery_engine/v1/rank_service" class ::Google::Cloud::DiscoveryEngine::V1::RankService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/recommendation_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/recommendation_service_test.rb index 95ce42778260..5b13470e2db4 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/recommendation_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/recommendation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/recommendation_service_pb" -require "google/cloud/discoveryengine/v1/recommendation_service_services_pb" require "google/cloud/discovery_engine/v1/recommendation_service" class ::Google::Cloud::DiscoveryEngine::V1::RecommendationService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/schema_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/schema_service_test.rb index 0a91292d0adf..6c8e68cf07fa 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/schema_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/schema_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/schema_service_pb" -require "google/cloud/discoveryengine/v1/schema_service_services_pb" require "google/cloud/discovery_engine/v1/schema_service" class ::Google::Cloud::DiscoveryEngine::V1::SchemaService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_test.rb index 3f80520f3289..f6012957c12a 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/search_service_pb" -require "google/cloud/discoveryengine/v1/search_service_services_pb" require "google/cloud/discovery_engine/v1/search_service" class ::Google::Cloud::DiscoveryEngine::V1::SearchService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_tuning_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_tuning_service_test.rb index 260707d9e62d..e03cd2e1a307 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_tuning_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_tuning_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/search_tuning_service_pb" -require "google/cloud/discoveryengine/v1/search_tuning_service_services_pb" require "google/cloud/discovery_engine/v1/search_tuning_service" class ::Google::Cloud::DiscoveryEngine::V1::SearchTuningService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/serving_config_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/serving_config_service_test.rb index 23a760e0c643..6f709c2f192e 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/serving_config_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/serving_config_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/serving_config_service_pb" -require "google/cloud/discoveryengine/v1/serving_config_service_services_pb" require "google/cloud/discovery_engine/v1/serving_config_service" class ::Google::Cloud::DiscoveryEngine::V1::ServingConfigService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_test.rb index 8db9fc904b82..d588f46e45c6 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/session_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/session_service_pb" -require "google/cloud/discoveryengine/v1/session_service_services_pb" require "google/cloud/discovery_engine/v1/session_service" class ::Google::Cloud::DiscoveryEngine::V1::SessionService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/site_search_engine_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/site_search_engine_service_test.rb index 7b0e354874e5..6583ef564c61 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/site_search_engine_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/site_search_engine_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/site_search_engine_service_pb" -require "google/cloud/discoveryengine/v1/site_search_engine_service_services_pb" require "google/cloud/discovery_engine/v1/site_search_engine_service" class ::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_event_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_event_service_test.rb index e1d30e563498..0721ec09b577 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_event_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_event_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/user_event_service_pb" -require "google/cloud/discoveryengine/v1/user_event_service_services_pb" require "google/cloud/discovery_engine/v1/user_event_service" class ::Google::Cloud::DiscoveryEngine::V1::UserEventService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_test.rb index c152d2b57688..d4f5ac68188b 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/user_license_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1/user_license_service_pb" -require "google/cloud/discoveryengine/v1/user_license_service_services_pb" require "google/cloud/discovery_engine/v1/user_license_service" class ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/google-cloud-discovery_engine-v1beta.gemspec b/google-cloud-discovery_engine-v1beta/google-cloud-discovery_engine-v1beta.gemspec index aa972dede030..fa56ce247823 100644 --- a/google-cloud-discovery_engine-v1beta/google-cloud-discovery_engine-v1beta.gemspec +++ b/google-cloud-discovery_engine-v1beta/google-cloud-discovery_engine-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/completion_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/completion_service_test.rb index 6f56de38276c..e18ab2b8bb1b 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/completion_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/completion_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/completion_service_pb" -require "google/cloud/discoveryengine/v1beta/completion_service_services_pb" require "google/cloud/discovery_engine/v1beta/completion_service" class ::Google::Cloud::DiscoveryEngine::V1beta::CompletionService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/control_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/control_service_test.rb index 16a48db516ae..d734dfc2fae1 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/control_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/control_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/control_service_pb" -require "google/cloud/discoveryengine/v1beta/control_service_services_pb" require "google/cloud/discovery_engine/v1beta/control_service" class ::Google::Cloud::DiscoveryEngine::V1beta::ControlService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_test.rb index e527e1d12855..1e4acca40c30 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/conversational_search_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/conversational_search_service_pb" -require "google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb" require "google/cloud/discovery_engine/v1beta/conversational_search_service" class ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/data_store_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/data_store_service_test.rb index fa87693a1b83..6ad5cce7752e 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/data_store_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/data_store_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/data_store_service_pb" -require "google/cloud/discoveryengine/v1beta/data_store_service_services_pb" require "google/cloud/discovery_engine/v1beta/data_store_service" class ::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/document_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/document_service_test.rb index a1e1ac56b791..c145d2ac225e 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/document_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/document_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/document_service_pb" -require "google/cloud/discoveryengine/v1beta/document_service_services_pb" require "google/cloud/discovery_engine/v1beta/document_service" class ::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/engine_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/engine_service_test.rb index f4a4b0b7ecd9..c102a40cee8b 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/engine_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/engine_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/engine_service_pb" -require "google/cloud/discoveryengine/v1beta/engine_service_services_pb" require "google/cloud/discovery_engine/v1beta/engine_service" class ::Google::Cloud::DiscoveryEngine::V1beta::EngineService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/evaluation_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/evaluation_service_test.rb index 250ecac3849a..302cef491ee9 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/evaluation_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/evaluation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/evaluation_service_pb" -require "google/cloud/discoveryengine/v1beta/evaluation_service_services_pb" require "google/cloud/discovery_engine/v1beta/evaluation_service" class ::Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/grounded_generation_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/grounded_generation_service_test.rb index d31f6e52aab4..ca8186f13abd 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/grounded_generation_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/grounded_generation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/grounded_generation_service_pb" -require "google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb" require "google/cloud/discovery_engine/v1beta/grounded_generation_service" class ::Google::Cloud::DiscoveryEngine::V1beta::GroundedGenerationService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/project_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/project_service_test.rb index d1123c057d50..acebe82282ba 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/project_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/project_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/project_service_pb" -require "google/cloud/discoveryengine/v1beta/project_service_services_pb" require "google/cloud/discovery_engine/v1beta/project_service" class ::Google::Cloud::DiscoveryEngine::V1beta::ProjectService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/rank_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/rank_service_test.rb index c0740daf7321..d6497c2909f1 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/rank_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/rank_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/rank_service_pb" -require "google/cloud/discoveryengine/v1beta/rank_service_services_pb" require "google/cloud/discovery_engine/v1beta/rank_service" class ::Google::Cloud::DiscoveryEngine::V1beta::RankService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/recommendation_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/recommendation_service_test.rb index 8aaa633a3f19..0b6eb7b74e37 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/recommendation_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/recommendation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/recommendation_service_pb" -require "google/cloud/discoveryengine/v1beta/recommendation_service_services_pb" require "google/cloud/discovery_engine/v1beta/recommendation_service" class ::Google::Cloud::DiscoveryEngine::V1beta::RecommendationService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/sample_query_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/sample_query_service_test.rb index 47e9306cfa29..3f6f1ee13be8 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/sample_query_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/sample_query_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/sample_query_service_pb" -require "google/cloud/discoveryengine/v1beta/sample_query_service_services_pb" require "google/cloud/discovery_engine/v1beta/sample_query_service" class ::Google::Cloud::DiscoveryEngine::V1beta::SampleQueryService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/sample_query_set_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/sample_query_set_service_test.rb index ad7e9c529274..071f0a52ac99 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/sample_query_set_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/sample_query_set_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/sample_query_set_service_pb" -require "google/cloud/discoveryengine/v1beta/sample_query_set_service_services_pb" require "google/cloud/discovery_engine/v1beta/sample_query_set_service" class ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySetService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/schema_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/schema_service_test.rb index ddae1497a9df..bbc2ab8db301 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/schema_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/schema_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/schema_service_pb" -require "google/cloud/discoveryengine/v1beta/schema_service_services_pb" require "google/cloud/discovery_engine/v1beta/schema_service" class ::Google::Cloud::DiscoveryEngine::V1beta::SchemaService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/search_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/search_service_test.rb index b1f3b9441153..502590b486ce 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/search_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/search_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/search_service_pb" -require "google/cloud/discoveryengine/v1beta/search_service_services_pb" require "google/cloud/discovery_engine/v1beta/search_service" class ::Google::Cloud::DiscoveryEngine::V1beta::SearchService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/search_tuning_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/search_tuning_service_test.rb index b897b9798904..d7bc43bd25e3 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/search_tuning_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/search_tuning_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/search_tuning_service_pb" -require "google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb" require "google/cloud/discovery_engine/v1beta/search_tuning_service" class ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/serving_config_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/serving_config_service_test.rb index 1c9bb7cff8c6..441d49c96483 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/serving_config_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/serving_config_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/serving_config_service_pb" -require "google/cloud/discoveryengine/v1beta/serving_config_service_services_pb" require "google/cloud/discovery_engine/v1beta/serving_config_service" class ::Google::Cloud::DiscoveryEngine::V1beta::ServingConfigService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_test.rb index eeb8961003f0..433be4384531 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/session_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/session_service_pb" -require "google/cloud/discoveryengine/v1beta/session_service_services_pb" require "google/cloud/discovery_engine/v1beta/session_service" class ::Google::Cloud::DiscoveryEngine::V1beta::SessionService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/site_search_engine_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/site_search_engine_service_test.rb index 748e53b89e98..e437101f1c7a 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/site_search_engine_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/site_search_engine_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/site_search_engine_service_pb" -require "google/cloud/discoveryengine/v1beta/site_search_engine_service_services_pb" require "google/cloud/discovery_engine/v1beta/site_search_engine_service" class ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::ClientTest < Minitest::Test diff --git a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/user_event_service_test.rb b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/user_event_service_test.rb index ec46e7ce5c6a..a07d215af4b1 100644 --- a/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/user_event_service_test.rb +++ b/google-cloud-discovery_engine-v1beta/test/google/cloud/discovery_engine/v1beta/user_event_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/discoveryengine/v1beta/user_event_service_pb" -require "google/cloud/discoveryengine/v1beta/user_event_service_services_pb" require "google/cloud/discovery_engine/v1beta/user_event_service" class ::Google::Cloud::DiscoveryEngine::V1beta::UserEventService::ClientTest < Minitest::Test diff --git a/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec b/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec index 80be5ff435d0..27911ef6a1a0 100644 --- a/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec +++ b/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb b/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb index 78b7b7ad2d34..18a7e08bf2cd 100644 --- a/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb +++ b/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/privacy/dlp/v2/dlp_pb" -require "google/privacy/dlp/v2/dlp_services_pb" require "google/cloud/dlp/v2/dlp_service" class ::Google::Cloud::Dlp::V2::DlpService::ClientTest < Minitest::Test diff --git a/google-cloud-document_ai-v1beta3/google-cloud-document_ai-v1beta3.gemspec b/google-cloud-document_ai-v1beta3/google-cloud-document_ai-v1beta3.gemspec index 0bb349ef7c58..534d46eb22ca 100644 --- a/google-cloud-document_ai-v1beta3/google-cloud-document_ai-v1beta3.gemspec +++ b/google-cloud-document_ai-v1beta3/google-cloud-document_ai-v1beta3.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/bindings_override.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/bindings_override.rb index f10525932f59..96f4c4ab3ef4 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/bindings_override.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -85,33 +85,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.documentai.v1beta3 package. - # - # This class contains common configuration for all services - # of the google.cloud.documentai.v1beta3 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-document_ai-v1beta3/test/google/cloud/document_ai/v1beta3/document_processor_service_test.rb b/google-cloud-document_ai-v1beta3/test/google/cloud/document_ai/v1beta3/document_processor_service_test.rb index 0c616355e934..858092128c47 100644 --- a/google-cloud-document_ai-v1beta3/test/google/cloud/document_ai/v1beta3/document_processor_service_test.rb +++ b/google-cloud-document_ai-v1beta3/test/google/cloud/document_ai/v1beta3/document_processor_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/documentai/v1beta3/document_processor_service_pb" -require "google/cloud/documentai/v1beta3/document_processor_service_services_pb" require "google/cloud/document_ai/v1beta3/document_processor_service" class ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::ClientTest < Minitest::Test diff --git a/google-cloud-document_ai-v1beta3/test/google/cloud/document_ai/v1beta3/document_service_test.rb b/google-cloud-document_ai-v1beta3/test/google/cloud/document_ai/v1beta3/document_service_test.rb index f30384834c8d..4a93430b4796 100644 --- a/google-cloud-document_ai-v1beta3/test/google/cloud/document_ai/v1beta3/document_service_test.rb +++ b/google-cloud-document_ai-v1beta3/test/google/cloud/document_ai/v1beta3/document_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/documentai/v1beta3/document_service_pb" -require "google/cloud/documentai/v1beta3/document_service_services_pb" require "google/cloud/document_ai/v1beta3/document_service" class ::Google::Cloud::DocumentAI::V1beta3::DocumentService::ClientTest < Minitest::Test diff --git a/google-cloud-domains-v1/google-cloud-domains-v1.gemspec b/google-cloud-domains-v1/google-cloud-domains-v1.gemspec index 299372f091b4..a684029c6808 100644 --- a/google-cloud-domains-v1/google-cloud-domains-v1.gemspec +++ b/google-cloud-domains-v1/google-cloud-domains-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-domains-v1/test/google/cloud/domains/v1/domains_test.rb b/google-cloud-domains-v1/test/google/cloud/domains/v1/domains_test.rb index 3fbbe1b4f858..e9e8106ee122 100644 --- a/google-cloud-domains-v1/test/google/cloud/domains/v1/domains_test.rb +++ b/google-cloud-domains-v1/test/google/cloud/domains/v1/domains_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/domains/v1/domains_pb" -require "google/cloud/domains/v1/domains_services_pb" require "google/cloud/domains/v1/domains" class ::Google::Cloud::Domains::V1::Domains::ClientTest < Minitest::Test diff --git a/google-cloud-domains-v1beta1/google-cloud-domains-v1beta1.gemspec b/google-cloud-domains-v1beta1/google-cloud-domains-v1beta1.gemspec index 8a6b066f06c3..bb1252d3991c 100644 --- a/google-cloud-domains-v1beta1/google-cloud-domains-v1beta1.gemspec +++ b/google-cloud-domains-v1beta1/google-cloud-domains-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-domains-v1beta1/test/google/cloud/domains/v1beta1/domains_test.rb b/google-cloud-domains-v1beta1/test/google/cloud/domains/v1beta1/domains_test.rb index fe319b9219b1..2d118d172583 100644 --- a/google-cloud-domains-v1beta1/test/google/cloud/domains/v1beta1/domains_test.rb +++ b/google-cloud-domains-v1beta1/test/google/cloud/domains/v1beta1/domains_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/domains/v1beta1/domains_pb" -require "google/cloud/domains/v1beta1/domains_services_pb" require "google/cloud/domains/v1beta1/domains" class ::Google::Cloud::Domains::V1beta1::Domains::ClientTest < Minitest::Test diff --git a/google-cloud-edge_container-v1/google-cloud-edge_container-v1.gemspec b/google-cloud-edge_container-v1/google-cloud-edge_container-v1.gemspec index 1a1173ab97e8..06e54d91b880 100644 --- a/google-cloud-edge_container-v1/google-cloud-edge_container-v1.gemspec +++ b/google-cloud-edge_container-v1/google-cloud-edge_container-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-edge_container-v1/lib/google/cloud/edge_container/v1/bindings_override.rb b/google-cloud-edge_container-v1/lib/google/cloud/edge_container/v1/bindings_override.rb index 41a3dc461003..cc7a24840742 100644 --- a/google-cloud-edge_container-v1/lib/google/cloud/edge_container/v1/bindings_override.rb +++ b/google-cloud-edge_container-v1/lib/google/cloud/edge_container/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.edgecontainer.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.edgecontainer.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-edge_container-v1/proto_docs/google/cloud/edgecontainer/v1/resources.rb b/google-cloud-edge_container-v1/proto_docs/google/cloud/edgecontainer/v1/resources.rb index 11fefa58e910..d90563d8c320 100644 --- a/google-cloud-edge_container-v1/proto_docs/google/cloud/edgecontainer/v1/resources.rb +++ b/google-cloud-edge_container-v1/proto_docs/google/cloud/edgecontainer/v1/resources.rb @@ -768,7 +768,7 @@ module BgpRoutingMode end # Metadata for a given - # `::Google::Cloud::Location::Location`. + # [google.cloud.location.Location][google.cloud.location.Location]. # @!attribute [rw] available_zones # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::EdgeContainer::V1::ZoneMetadata}] # The set of available Google Distributed Cloud Edge zones in the location. diff --git a/google-cloud-edge_container-v1/test/google/cloud/edge_container/v1/edge_container_test.rb b/google-cloud-edge_container-v1/test/google/cloud/edge_container/v1/edge_container_test.rb index 4360f7b7a43a..ce50562597e1 100644 --- a/google-cloud-edge_container-v1/test/google/cloud/edge_container/v1/edge_container_test.rb +++ b/google-cloud-edge_container-v1/test/google/cloud/edge_container/v1/edge_container_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/edgecontainer/v1/service_pb" -require "google/cloud/edgecontainer/v1/service_services_pb" require "google/cloud/edge_container/v1/edge_container" class ::Google::Cloud::EdgeContainer::V1::EdgeContainer::ClientTest < Minitest::Test diff --git a/google-cloud-edge_network-v1/google-cloud-edge_network-v1.gemspec b/google-cloud-edge_network-v1/google-cloud-edge_network-v1.gemspec index 38b5eb540210..edccb579d0db 100644 --- a/google-cloud-edge_network-v1/google-cloud-edge_network-v1.gemspec +++ b/google-cloud-edge_network-v1/google-cloud-edge_network-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/bindings_override.rb b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/bindings_override.rb index 31aa7ac4b9c3..d0a5aec3bd30 100644 --- a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/bindings_override.rb +++ b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.edgenetwork.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.edgenetwork.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-edge_network-v1/test/google/cloud/edge_network/v1/edge_network_test.rb b/google-cloud-edge_network-v1/test/google/cloud/edge_network/v1/edge_network_test.rb index 0b33e6ad298d..fc2cc7579f12 100644 --- a/google-cloud-edge_network-v1/test/google/cloud/edge_network/v1/edge_network_test.rb +++ b/google-cloud-edge_network-v1/test/google/cloud/edge_network/v1/edge_network_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/edgenetwork/v1/service_pb" -require "google/cloud/edgenetwork/v1/service_services_pb" require "google/cloud/edge_network/v1/edge_network" class ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::ClientTest < Minitest::Test From 7501c62e2ece562478e02af1d3b7f79b71b709ef Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 15:39:41 -0700 Subject: [PATCH 452/457] chore: use HTTP binding configuration class from new gapic-common (#30843) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWVycm9yX3JlcG9ydGluZy12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWVzc2VudGlhbF9jb250YWN0cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXB1Ymxpc2hpbmctdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpbGVzdG9yZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpbmFuY2lhbF9zZXJ2aWNlcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpcmVzdG9yZS1hZG1pbi12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpcmVzdG9yZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy12Mi8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdkY19oYXJkd2FyZV9tYW5hZ2VtZW50LXYxYWxwaGEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9iYWNrdXAtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9jb25uZWN0LWdhdGV3YXktdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9jb25uZWN0LWdhdGV3YXktdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9odWItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9odWItdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9tdWx0aV9jbG91ZC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdzdWl0ZV9hZGRfb25zLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWlhcC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWlkcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- ...ogle-cloud-error_reporting-v1beta1.gemspec | 2 +- .../v1beta1/error_group_service_test.rb | 1 - .../v1beta1/error_stats_service_test.rb | 1 - .../v1beta1/report_errors_service_test.rb | 1 - ...google-cloud-essential_contacts-v1.gemspec | 2 +- .../v1/essential_contacts_service_test.rb | 1 - ...oogle-cloud-eventarc-publishing-v1.gemspec | 2 +- .../eventarc/publishing/v1/publisher_test.rb | 1 - .../google-cloud-eventarc-v1.gemspec | 2 +- .../cloud/eventarc/v1/bindings_override.rb | 31 ++----------------- .../google/cloud/eventarc/v1/eventarc_test.rb | 1 - .../google-cloud-filestore-v1.gemspec | 2 +- .../cloud/filestore/v1/bindings_override.rb | 31 ++----------------- .../v1/cloud_filestore_manager_test.rb | 1 - ...google-cloud-financial_services-v1.gemspec | 2 +- .../v1/bindings_override.rb | 31 ++----------------- .../cloud/financial_services/v1/aml_test.rb | 1 - .../google-cloud-firestore-admin-v1.gemspec | 2 +- .../google/firestore/admin/v1/location.rb | 2 +- .../admin/v1/firestore_admin_test.rb | 1 - .../google-cloud-firestore-v1.gemspec | 2 +- .../cloud/firestore/v1/firestore_test.rb | 1 - .../google-cloud-functions-v1.gemspec | 2 +- .../cloud/functions/v1/bindings_override.rb | 31 ++----------------- .../v1/cloud_functions_service_test.rb | 1 - .../google-cloud-functions-v2.gemspec | 2 +- .../cloud/functions/v2/bindings_override.rb | 31 ++----------------- .../functions/v2/function_service_test.rb | 1 - ...ud-gdc_hardware_management-v1alpha.gemspec | 2 +- .../v1alpha/bindings_override.rb | 31 ++----------------- .../v1alpha/gdc_hardware_management_test.rb | 1 - .../google-cloud-gke_backup-v1.gemspec | 2 +- .../cloud/gke_backup/v1/bindings_override.rb | 31 ++----------------- .../gke_backup/v1/backup_for_gke_test.rb | 1 - ...oogle-cloud-gke_connect-gateway-v1.gemspec | 2 +- ...-cloud-gke_connect-gateway-v1beta1.gemspec | 2 +- .../google-cloud-gke_hub-v1.gemspec | 2 +- .../google/cloud/gke_hub/v1/gke_hub_test.rb | 1 - .../google-cloud-gke_hub-v1beta1.gemspec | 2 +- .../gke_hub/v1beta1/bindings_override.rb | 31 ++----------------- .../gke_hub_membership_service_test.rb | 1 - .../google-cloud-gke_multi_cloud-v1.gemspec | 2 +- .../v1/attached_clusters_test.rb | 1 - .../gke_multi_cloud/v1/aws_clusters_test.rb | 1 - .../gke_multi_cloud/v1/azure_clusters_test.rb | 1 - .../google-cloud-gsuite_add_ons-v1.gemspec | 2 +- .../gsuite_add_ons/v1/gsuite_add_ons_test.rb | 1 - .../google-cloud-iap-v1.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- ...identity_aware_proxy_admin_service_test.rb | 1 - ...dentity_aware_proxy_o_auth_service_test.rb | 1 - .../google-cloud-ids-v1.gemspec | 2 +- .../test/google/cloud/ids/v1/ids_test.rb | 1 - 53 files changed, 38 insertions(+), 277 deletions(-) diff --git a/google-cloud-error_reporting-v1beta1/google-cloud-error_reporting-v1beta1.gemspec b/google-cloud-error_reporting-v1beta1/google-cloud-error_reporting-v1beta1.gemspec index 2e03a92c417f..f899d8d33882 100644 --- a/google-cloud-error_reporting-v1beta1/google-cloud-error_reporting-v1beta1.gemspec +++ b/google-cloud-error_reporting-v1beta1/google-cloud-error_reporting-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/error_group_service_test.rb b/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/error_group_service_test.rb index bc9bc48995a3..db7080691c2e 100644 --- a/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/error_group_service_test.rb +++ b/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/error_group_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/clouderrorreporting/v1beta1/error_group_service_pb" -require "google/devtools/clouderrorreporting/v1beta1/error_group_service_services_pb" require "google/cloud/error_reporting/v1beta1/error_group_service" class ::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupService::ClientTest < Minitest::Test diff --git a/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/error_stats_service_test.rb b/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/error_stats_service_test.rb index 829571c006f4..b6d394445b1d 100644 --- a/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/error_stats_service_test.rb +++ b/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/error_stats_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/clouderrorreporting/v1beta1/error_stats_service_pb" -require "google/devtools/clouderrorreporting/v1beta1/error_stats_service_services_pb" require "google/cloud/error_reporting/v1beta1/error_stats_service" class ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::ClientTest < Minitest::Test diff --git a/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/report_errors_service_test.rb b/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/report_errors_service_test.rb index 4090e7028cc7..0fcf429511b8 100644 --- a/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/report_errors_service_test.rb +++ b/google-cloud-error_reporting-v1beta1/test/google/cloud/error_reporting/v1beta1/report_errors_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/clouderrorreporting/v1beta1/report_errors_service_pb" -require "google/devtools/clouderrorreporting/v1beta1/report_errors_service_services_pb" require "google/cloud/error_reporting/v1beta1/report_errors_service" class ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::ClientTest < Minitest::Test diff --git a/google-cloud-essential_contacts-v1/google-cloud-essential_contacts-v1.gemspec b/google-cloud-essential_contacts-v1/google-cloud-essential_contacts-v1.gemspec index 68690f8bc6f2..6f4866d18699 100644 --- a/google-cloud-essential_contacts-v1/google-cloud-essential_contacts-v1.gemspec +++ b/google-cloud-essential_contacts-v1/google-cloud-essential_contacts-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-essential_contacts-v1/test/google/cloud/essential_contacts/v1/essential_contacts_service_test.rb b/google-cloud-essential_contacts-v1/test/google/cloud/essential_contacts/v1/essential_contacts_service_test.rb index 3b8123b569e6..8c883a74ad2a 100644 --- a/google-cloud-essential_contacts-v1/test/google/cloud/essential_contacts/v1/essential_contacts_service_test.rb +++ b/google-cloud-essential_contacts-v1/test/google/cloud/essential_contacts/v1/essential_contacts_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/essentialcontacts/v1/service_pb" -require "google/cloud/essentialcontacts/v1/service_services_pb" require "google/cloud/essential_contacts/v1/essential_contacts_service" class ::Google::Cloud::EssentialContacts::V1::EssentialContactsService::ClientTest < Minitest::Test diff --git a/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec b/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec index a726e704c3a6..13430899f43a 100644 --- a/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec +++ b/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb b/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb index 9cfdb6d7b16e..888bf3b1c053 100644 --- a/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb +++ b/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/eventarc/publishing/v1/publisher_pb" -require "google/cloud/eventarc/publishing/v1/publisher_services_pb" require "google/cloud/eventarc/publishing/v1/publisher" class ::Google::Cloud::Eventarc::Publishing::V1::Publisher::ClientTest < Minitest::Test diff --git a/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec b/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec index 67a599debb79..7a1efe91dd2e 100644 --- a/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec +++ b/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb index 5e37804baec8..6779045ffd72 100644 --- a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb +++ b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -246,33 +246,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.eventarc.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.eventarc.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb b/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb index 5cd8a3a95ef4..977f1323a5e7 100644 --- a/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb +++ b/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/eventarc/v1/eventarc_pb" -require "google/cloud/eventarc/v1/eventarc_services_pb" require "google/cloud/eventarc/v1/eventarc" class ::Google::Cloud::Eventarc::V1::Eventarc::ClientTest < Minitest::Test diff --git a/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec b/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec index 40c69a7fbf24..1856cd85eeda 100644 --- a/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec +++ b/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-common", "~> 1.0" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" diff --git a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb index 91c0aaed160b..38a27961cab0 100644 --- a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb +++ b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.filestore.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.filestore.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb b/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb index d442ceef1aa0..20003b790d1f 100644 --- a/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb +++ b/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/filestore/v1/cloud_filestore_service_pb" -require "google/cloud/filestore/v1/cloud_filestore_service_services_pb" require "google/cloud/filestore/v1/cloud_filestore_manager" class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::ClientTest < Minitest::Test diff --git a/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec b/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec index 3284f79770a6..10c01257e363 100644 --- a/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec +++ b/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb b/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb index d58ac60c63e6..0135cc1bac5c 100644 --- a/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb +++ b/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.financialservices.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.financialservices.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb b/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb index 7cc839a06d90..25b20fbc67dd 100644 --- a/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb +++ b/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/financialservices/v1/service_pb" -require "google/cloud/financialservices/v1/service_services_pb" require "google/cloud/financial_services/v1/aml" class ::Google::Cloud::FinancialServices::V1::AML::ClientTest < Minitest::Test diff --git a/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec b/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec index 3df0e07f93fb..14b541472a99 100644 --- a/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec +++ b/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb index 31e9cd4a6943..b36d8a274a38 100644 --- a/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb +++ b/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb @@ -23,7 +23,7 @@ module Firestore module Admin module V1 # The metadata message for - # `::Google::Cloud::Location::Location#metadata`. + # [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata]. class LocationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb index bb0ac14d41e1..047539aaff3e 100644 --- a/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb +++ b/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/firestore/admin/v1/firestore_admin_pb" -require "google/firestore/admin/v1/firestore_admin_services_pb" require "google/cloud/firestore/admin/v1/firestore_admin" class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec b/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec index f90121fe60c7..70fce8f0cc1e 100644 --- a/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec +++ b/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb b/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb index 26da56bd7a51..78f166a029eb 100644 --- a/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb +++ b/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/firestore/v1/firestore_pb" -require "google/firestore/v1/firestore_services_pb" require "google/cloud/firestore/v1/firestore" class ::Google::Cloud::Firestore::V1::Firestore::ClientTest < Minitest::Test diff --git a/google-cloud-functions-v1/google-cloud-functions-v1.gemspec b/google-cloud-functions-v1/google-cloud-functions-v1.gemspec index ace301712907..2687536cb630 100644 --- a/google-cloud-functions-v1/google-cloud-functions-v1.gemspec +++ b/google-cloud-functions-v1/google-cloud-functions-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb b/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb index fb24a95a20a8..3ff8d8e0b43c 100644 --- a/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb +++ b/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -58,33 +58,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.functions.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.functions.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb b/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb index 3b961ecae2df..c17fb79234b4 100644 --- a/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb +++ b/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/functions/v1/functions_pb" -require "google/cloud/functions/v1/functions_services_pb" require "google/cloud/functions/v1/cloud_functions_service" class ::Google::Cloud::Functions::V1::CloudFunctionsService::ClientTest < Minitest::Test diff --git a/google-cloud-functions-v2/google-cloud-functions-v2.gemspec b/google-cloud-functions-v2/google-cloud-functions-v2.gemspec index 1cb0671475a6..669b5de12b3c 100644 --- a/google-cloud-functions-v2/google-cloud-functions-v2.gemspec +++ b/google-cloud-functions-v2/google-cloud-functions-v2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb b/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb index e50d5d91bc9a..a05ac47841a5 100644 --- a/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb +++ b/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -91,33 +91,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.functions.v2 package. - # - # This class contains common configuration for all services - # of the google.cloud.functions.v2 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb b/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb index e50624f900b8..0afdc10fb864 100644 --- a/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb +++ b/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/functions/v2/functions_pb" -require "google/cloud/functions/v2/functions_services_pb" require "google/cloud/functions/v2/function_service" class ::Google::Cloud::Functions::V2::FunctionService::ClientTest < Minitest::Test diff --git a/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec b/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec index dd70dc880d60..00f2507f94fd 100644 --- a/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec +++ b/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb b/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb index 8adccc2ea706..ede722abab68 100644 --- a/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb +++ b/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.gdchardwaremanagement.v1alpha package. - # - # This class contains common configuration for all services - # of the google.cloud.gdchardwaremanagement.v1alpha package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb b/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb index 9f222a30d7c0..19caa08e9e0b 100644 --- a/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb +++ b/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/gdchardwaremanagement/v1alpha/service_pb" -require "google/cloud/gdchardwaremanagement/v1alpha/service_services_pb" require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management" class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::ClientTest < Minitest::Test diff --git a/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec b/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec index c1ce1be5ac8c..fc7024f23faa 100644 --- a/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec +++ b/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb index db7a8b3ac8ff..ecada47034d8 100644 --- a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb +++ b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -222,33 +222,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.gkebackup.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.gkebackup.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb b/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb index bab8fb8f6ad0..1c0524892d9b 100644 --- a/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb +++ b/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/gkebackup/v1/gkebackup_pb" -require "google/cloud/gkebackup/v1/gkebackup_services_pb" require "google/cloud/gke_backup/v1/backup_for_gke" class ::Google::Cloud::GkeBackup::V1::BackupForGKE::ClientTest < Minitest::Test diff --git a/google-cloud-gke_connect-gateway-v1/google-cloud-gke_connect-gateway-v1.gemspec b/google-cloud-gke_connect-gateway-v1/google-cloud-gke_connect-gateway-v1.gemspec index 8fe26fe37c28..6ba03d59ce11 100644 --- a/google-cloud-gke_connect-gateway-v1/google-cloud-gke_connect-gateway-v1.gemspec +++ b/google-cloud-gke_connect-gateway-v1/google-cloud-gke_connect-gateway-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-gke_connect-gateway-v1beta1/google-cloud-gke_connect-gateway-v1beta1.gemspec b/google-cloud-gke_connect-gateway-v1beta1/google-cloud-gke_connect-gateway-v1beta1.gemspec index 0f2dc7d62ac6..1eb58558492f 100644 --- a/google-cloud-gke_connect-gateway-v1beta1/google-cloud-gke_connect-gateway-v1beta1.gemspec +++ b/google-cloud-gke_connect-gateway-v1beta1/google-cloud-gke_connect-gateway-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec b/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec index 545ca83d0e65..db7ea9a2b4c1 100644 --- a/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec +++ b/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb b/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb index acf8de8637b0..a2072566ff18 100644 --- a/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb +++ b/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/gkehub/v1/service_pb" -require "google/cloud/gkehub/v1/service_services_pb" require "google/cloud/gke_hub/v1/gke_hub" class ::Google::Cloud::GkeHub::V1::GkeHub::ClientTest < Minitest::Test diff --git a/google-cloud-gke_hub-v1beta1/google-cloud-gke_hub-v1beta1.gemspec b/google-cloud-gke_hub-v1beta1/google-cloud-gke_hub-v1beta1.gemspec index 8b19251f6d27..73acc332150d 100644 --- a/google-cloud-gke_hub-v1beta1/google-cloud-gke_hub-v1beta1.gemspec +++ b/google-cloud-gke_hub-v1beta1/google-cloud-gke_hub-v1beta1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-gke_hub-v1beta1/lib/google/cloud/gke_hub/v1beta1/bindings_override.rb b/google-cloud-gke_hub-v1beta1/lib/google/cloud/gke_hub/v1beta1/bindings_override.rb index a31c88724f42..4e3bea0c7405 100644 --- a/google-cloud-gke_hub-v1beta1/lib/google/cloud/gke_hub/v1beta1/bindings_override.rb +++ b/google-cloud-gke_hub-v1beta1/lib/google/cloud/gke_hub/v1beta1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -102,33 +102,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.gkehub.v1beta1 package. - # - # This class contains common configuration for all services - # of the google.cloud.gkehub.v1beta1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-gke_hub-v1beta1/test/google/cloud/gke_hub/v1beta1/gke_hub_membership_service_test.rb b/google-cloud-gke_hub-v1beta1/test/google/cloud/gke_hub/v1beta1/gke_hub_membership_service_test.rb index 4b11515ab9c1..1400e1e9abb0 100644 --- a/google-cloud-gke_hub-v1beta1/test/google/cloud/gke_hub/v1beta1/gke_hub_membership_service_test.rb +++ b/google-cloud-gke_hub-v1beta1/test/google/cloud/gke_hub/v1beta1/gke_hub_membership_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/gkehub/v1beta1/membership_pb" -require "google/cloud/gkehub/v1beta1/membership_services_pb" require "google/cloud/gke_hub/v1beta1/gke_hub_membership_service" class ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::ClientTest < Minitest::Test diff --git a/google-cloud-gke_multi_cloud-v1/google-cloud-gke_multi_cloud-v1.gemspec b/google-cloud-gke_multi_cloud-v1/google-cloud-gke_multi_cloud-v1.gemspec index 72953355b941..69e82c51ccc7 100644 --- a/google-cloud-gke_multi_cloud-v1/google-cloud-gke_multi_cloud-v1.gemspec +++ b/google-cloud-gke_multi_cloud-v1/google-cloud-gke_multi_cloud-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/attached_clusters_test.rb b/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/attached_clusters_test.rb index cdd61dd13977..149c8c271b16 100644 --- a/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/attached_clusters_test.rb +++ b/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/attached_clusters_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/gkemulticloud/v1/attached_service_pb" -require "google/cloud/gkemulticloud/v1/attached_service_services_pb" require "google/cloud/gke_multi_cloud/v1/attached_clusters" class ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::ClientTest < Minitest::Test diff --git a/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/aws_clusters_test.rb b/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/aws_clusters_test.rb index a6d0038402a4..2d17240631e4 100644 --- a/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/aws_clusters_test.rb +++ b/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/aws_clusters_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/gkemulticloud/v1/aws_service_pb" -require "google/cloud/gkemulticloud/v1/aws_service_services_pb" require "google/cloud/gke_multi_cloud/v1/aws_clusters" class ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::ClientTest < Minitest::Test diff --git a/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/azure_clusters_test.rb b/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/azure_clusters_test.rb index e6f88d9c14d0..b1f85f323c10 100644 --- a/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/azure_clusters_test.rb +++ b/google-cloud-gke_multi_cloud-v1/test/google/cloud/gke_multi_cloud/v1/azure_clusters_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/gkemulticloud/v1/azure_service_pb" -require "google/cloud/gkemulticloud/v1/azure_service_services_pb" require "google/cloud/gke_multi_cloud/v1/azure_clusters" class ::Google::Cloud::GkeMultiCloud::V1::AzureClusters::ClientTest < Minitest::Test diff --git a/google-cloud-gsuite_add_ons-v1/google-cloud-gsuite_add_ons-v1.gemspec b/google-cloud-gsuite_add_ons-v1/google-cloud-gsuite_add_ons-v1.gemspec index 7ebc34e4ca1d..4e50c653d614 100644 --- a/google-cloud-gsuite_add_ons-v1/google-cloud-gsuite_add_ons-v1.gemspec +++ b/google-cloud-gsuite_add_ons-v1/google-cloud-gsuite_add_ons-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-apps-script-type", "> 0.0", "< 2.a" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-gsuite_add_ons-v1/test/google/cloud/gsuite_add_ons/v1/gsuite_add_ons_test.rb b/google-cloud-gsuite_add_ons-v1/test/google/cloud/gsuite_add_ons/v1/gsuite_add_ons_test.rb index cbb085f40012..4e5f6bbb2d4b 100644 --- a/google-cloud-gsuite_add_ons-v1/test/google/cloud/gsuite_add_ons/v1/gsuite_add_ons_test.rb +++ b/google-cloud-gsuite_add_ons-v1/test/google/cloud/gsuite_add_ons/v1/gsuite_add_ons_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/gsuiteaddons/v1/gsuiteaddons_pb" -require "google/cloud/gsuiteaddons/v1/gsuiteaddons_services_pb" require "google/cloud/gsuite_add_ons/v1/gsuite_add_ons" class ::Google::Cloud::GSuiteAddOns::V1::GSuiteAddOns::ClientTest < Minitest::Test diff --git a/google-cloud-iap-v1/google-cloud-iap-v1.gemspec b/google-cloud-iap-v1/google-cloud-iap-v1.gemspec index 9a9b3ebf0efa..18971743b808 100644 --- a/google-cloud-iap-v1/google-cloud-iap-v1.gemspec +++ b/google-cloud-iap-v1/google-cloud-iap-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" end diff --git a/google-cloud-iap-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-iap-v1/proto_docs/google/iam/v1/policy.rb index da77440d0b3c..47d11893ed7b 100644 --- a/google-cloud-iap-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-iap-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-iap-v1/test/google/cloud/iap/v1/identity_aware_proxy_admin_service_test.rb b/google-cloud-iap-v1/test/google/cloud/iap/v1/identity_aware_proxy_admin_service_test.rb index f5f1f065564b..4afc75815f45 100644 --- a/google-cloud-iap-v1/test/google/cloud/iap/v1/identity_aware_proxy_admin_service_test.rb +++ b/google-cloud-iap-v1/test/google/cloud/iap/v1/identity_aware_proxy_admin_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/iap/v1/service_pb" -require "google/cloud/iap/v1/service_services_pb" require "google/cloud/iap/v1/identity_aware_proxy_admin_service" class ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::ClientTest < Minitest::Test diff --git a/google-cloud-iap-v1/test/google/cloud/iap/v1/identity_aware_proxy_o_auth_service_test.rb b/google-cloud-iap-v1/test/google/cloud/iap/v1/identity_aware_proxy_o_auth_service_test.rb index a26f6242ce48..48788f7ad52a 100644 --- a/google-cloud-iap-v1/test/google/cloud/iap/v1/identity_aware_proxy_o_auth_service_test.rb +++ b/google-cloud-iap-v1/test/google/cloud/iap/v1/identity_aware_proxy_o_auth_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/iap/v1/service_pb" -require "google/cloud/iap/v1/service_services_pb" require "google/cloud/iap/v1/identity_aware_proxy_o_auth_service" class ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::ClientTest < Minitest::Test diff --git a/google-cloud-ids-v1/google-cloud-ids-v1.gemspec b/google-cloud-ids-v1/google-cloud-ids-v1.gemspec index 7be3e27bd720..f7eec7069231 100644 --- a/google-cloud-ids-v1/google-cloud-ids-v1.gemspec +++ b/google-cloud-ids-v1/google-cloud-ids-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-ids-v1/test/google/cloud/ids/v1/ids_test.rb b/google-cloud-ids-v1/test/google/cloud/ids/v1/ids_test.rb index 5107aa2f8c56..33705abbf698 100644 --- a/google-cloud-ids-v1/test/google/cloud/ids/v1/ids_test.rb +++ b/google-cloud-ids-v1/test/google/cloud/ids/v1/ids_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/ids/v1/ids_pb" -require "google/cloud/ids/v1/ids_services_pb" require "google/cloud/ids/v1/ids" class ::Google::Cloud::IDS::V1::IDS::ClientTest < Minitest::Test From 3a809502182b1e7cd930c3fdd2cb3318388eb1ae Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 15:50:46 -0700 Subject: [PATCH 453/457] chore: use HTTP binding configuration class from new gapic-common (#30844) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWttcy1pbnZlbnRvcnktdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWttcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWxhbmd1YWdlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWxhbmd1YWdlLXYxYmV0YTIvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWxhbmd1YWdlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWxpZmVfc2NpZW5jZXMtdjJiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWxvY2F0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWxvZ2dpbmctdjIvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWx1c3RyZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1haW50ZW5hbmNlLWFwaS12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1hbmFnZWRfaWRlbnRpdGllcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1hbmFnZWRfa2Fma2EtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1lZGlhX3RyYW5zbGF0aW9uLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1lbWNhY2hlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1lbWNhY2hlLXYxYmV0YTIvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1lbW9yeXN0b3JlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1lbW9yeXN0b3JlLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1ldGFzdG9yZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1ldGFzdG9yZS12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1pZ3JhdGlvbl9jZW50ZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-cloud-kms-inventory-v1.gemspec | 2 +- .../v1/key_dashboard_service_test.rb | 1 - .../inventory/v1/key_tracking_service_test.rb | 1 - .../google-cloud-kms-v1.gemspec | 2 +- .../google/cloud/kms/v1/bindings_override.rb | 31 ++----------------- .../proto_docs/google/cloud/kms/v1/service.rb | 2 +- .../google/cloud/kms/v1/autokey_admin_test.rb | 1 - .../test/google/cloud/kms/v1/autokey_test.rb | 1 - .../google/cloud/kms/v1/ekm_service_test.rb | 1 - .../kms/v1/key_management_service_test.rb | 1 - .../google-cloud-language-v1.gemspec | 2 +- .../language/v1/language_service_test.rb | 1 - .../google-cloud-language-v1beta2.gemspec | 2 +- .../language/v1beta2/language_service_test.rb | 1 - .../google-cloud-language-v2.gemspec | 2 +- .../language/v2/language_service_test.rb | 1 - .../google-cloud-life_sciences-v2beta.gemspec | 2 +- .../life_sciences/v2beta/bindings_override.rb | 31 ++----------------- .../v2beta/workflows_service_test.rb | 1 - .../google-cloud-location.gemspec | 2 +- .../google/cloud/location/locations_test.rb | 1 - .../google-cloud-logging-v2.gemspec | 2 +- .../cloud/logging/v2/config_service_test.rb | 1 - .../cloud/logging/v2/logging_service_test.rb | 1 - .../cloud/logging/v2/metrics_service_test.rb | 1 - .../google-cloud-lustre-v1.gemspec | 2 +- .../cloud/lustre/v1/bindings_override.rb | 31 ++----------------- .../google/cloud/lustre/v1/lustre_test.rb | 1 - ...oogle-cloud-maintenance-api-v1beta.gemspec | 2 +- .../api/v1beta/bindings_override.rb | 31 ++----------------- .../api/v1beta/maintenance_test.rb | 1 - ...google-cloud-managed_identities-v1.gemspec | 2 +- .../v1/managed_identities_service_test.rb | 1 - .../google-cloud-managed_kafka-v1.gemspec | 2 +- .../managed_kafka/v1/bindings_override.rb | 31 ++----------------- .../v1/managed_kafka_connect_test.rb | 1 - .../managed_kafka/v1/managed_kafka_test.rb | 1 - ...le-cloud-media_translation-v1beta1.gemspec | 2 +- .../speech_translation_service_test.rb | 1 - .../google-cloud-memcache-v1.gemspec | 2 +- .../cloud/memcache/v1/bindings_override.rb | 31 ++----------------- .../cloud/memcache/v1/cloud_memcache.rb | 2 +- .../cloud/memcache/v1/cloud_memcache_test.rb | 1 - .../google-cloud-memcache-v1beta2.gemspec | 2 +- .../memcache/v1beta2/bindings_override.rb | 31 ++----------------- .../cloud/memcache/v1beta2/cloud_memcache.rb | 2 +- .../memcache/v1beta2/cloud_memcache_test.rb | 1 - .../google-cloud-memorystore-v1.gemspec | 2 +- .../cloud/memorystore/v1/bindings_override.rb | 31 ++----------------- .../google-cloud-memorystore-v1beta.gemspec | 2 +- .../memorystore/v1beta/bindings_override.rb | 31 ++----------------- .../google-cloud-metastore-v1.gemspec | 2 +- .../cloud/metastore/v1/bindings_override.rb | 31 ++----------------- .../v1/dataproc_metastore_federation_test.rb | 1 - .../metastore/v1/dataproc_metastore_test.rb | 1 - .../google-cloud-metastore-v1beta.gemspec | 2 +- .../metastore/v1beta/bindings_override.rb | 31 ++----------------- .../dataproc_metastore_federation_test.rb | 1 - .../v1beta/dataproc_metastore_test.rb | 1 - .../google-cloud-migration_center-v1.gemspec | 2 +- .../migration_center/v1/bindings_override.rb | 31 ++----------------- .../v1/migration_center_test.rb | 1 - 62 files changed, 47 insertions(+), 398 deletions(-) diff --git a/google-cloud-kms-inventory-v1/google-cloud-kms-inventory-v1.gemspec b/google-cloud-kms-inventory-v1/google-cloud-kms-inventory-v1.gemspec index df7a7d887839..90c8d6f346fc 100644 --- a/google-cloud-kms-inventory-v1/google-cloud-kms-inventory-v1.gemspec +++ b/google-cloud-kms-inventory-v1/google-cloud-kms-inventory-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-kms-v1", "> 0.0", "< 2.a" end diff --git a/google-cloud-kms-inventory-v1/test/google/cloud/kms/inventory/v1/key_dashboard_service_test.rb b/google-cloud-kms-inventory-v1/test/google/cloud/kms/inventory/v1/key_dashboard_service_test.rb index 9e0659667d01..98624864dde9 100644 --- a/google-cloud-kms-inventory-v1/test/google/cloud/kms/inventory/v1/key_dashboard_service_test.rb +++ b/google-cloud-kms-inventory-v1/test/google/cloud/kms/inventory/v1/key_dashboard_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/kms/inventory/v1/key_dashboard_service_pb" -require "google/cloud/kms/inventory/v1/key_dashboard_service_services_pb" require "google/cloud/kms/inventory/v1/key_dashboard_service" class ::Google::Cloud::Kms::Inventory::V1::KeyDashboardService::ClientTest < Minitest::Test diff --git a/google-cloud-kms-inventory-v1/test/google/cloud/kms/inventory/v1/key_tracking_service_test.rb b/google-cloud-kms-inventory-v1/test/google/cloud/kms/inventory/v1/key_tracking_service_test.rb index 665645b8cc4f..cc458cf2f1cf 100644 --- a/google-cloud-kms-inventory-v1/test/google/cloud/kms/inventory/v1/key_tracking_service_test.rb +++ b/google-cloud-kms-inventory-v1/test/google/cloud/kms/inventory/v1/key_tracking_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/kms/inventory/v1/key_tracking_service_pb" -require "google/cloud/kms/inventory/v1/key_tracking_service_services_pb" require "google/cloud/kms/inventory/v1/key_tracking_service" class ::Google::Cloud::Kms::Inventory::V1::KeyTrackingService::ClientTest < Minitest::Test diff --git a/google-cloud-kms-v1/google-cloud-kms-v1.gemspec b/google-cloud-kms-v1/google-cloud-kms-v1.gemspec index d2fd4cae247e..55b42c85224b 100644 --- a/google-cloud-kms-v1/google-cloud-kms-v1.gemspec +++ b/google-cloud-kms-v1/google-cloud-kms-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-kms-v1/lib/google/cloud/kms/v1/bindings_override.rb b/google-cloud-kms-v1/lib/google/cloud/kms/v1/bindings_override.rb index 65731ab2cd52..d4e064b20eb6 100644 --- a/google-cloud-kms-v1/lib/google/cloud/kms/v1/bindings_override.rb +++ b/google-cloud-kms-v1/lib/google/cloud/kms/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -198,33 +198,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.kms.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.kms.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-kms-v1/proto_docs/google/cloud/kms/v1/service.rb b/google-cloud-kms-v1/proto_docs/google/cloud/kms/v1/service.rb index 160bf9872c6c..3526f644d0a4 100644 --- a/google-cloud-kms-v1/proto_docs/google/cloud/kms/v1/service.rb +++ b/google-cloud-kms-v1/proto_docs/google/cloud/kms/v1/service.rb @@ -1683,7 +1683,7 @@ class Digest end # Cloud KMS metadata for the given - # `::Google::Cloud::Location::Location`. + # [google.cloud.location.Location][google.cloud.location.Location]. # @!attribute [rw] hsm_available # @return [::Boolean] # Indicates whether {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with diff --git a/google-cloud-kms-v1/test/google/cloud/kms/v1/autokey_admin_test.rb b/google-cloud-kms-v1/test/google/cloud/kms/v1/autokey_admin_test.rb index d63fbfb0bacb..562e890cb0c6 100644 --- a/google-cloud-kms-v1/test/google/cloud/kms/v1/autokey_admin_test.rb +++ b/google-cloud-kms-v1/test/google/cloud/kms/v1/autokey_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/kms/v1/autokey_admin_pb" -require "google/cloud/kms/v1/autokey_admin_services_pb" require "google/cloud/kms/v1/autokey_admin" class ::Google::Cloud::Kms::V1::AutokeyAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-kms-v1/test/google/cloud/kms/v1/autokey_test.rb b/google-cloud-kms-v1/test/google/cloud/kms/v1/autokey_test.rb index 4826656f8595..7cd9f6879245 100644 --- a/google-cloud-kms-v1/test/google/cloud/kms/v1/autokey_test.rb +++ b/google-cloud-kms-v1/test/google/cloud/kms/v1/autokey_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/kms/v1/autokey_pb" -require "google/cloud/kms/v1/autokey_services_pb" require "google/cloud/kms/v1/autokey" class ::Google::Cloud::Kms::V1::Autokey::ClientTest < Minitest::Test diff --git a/google-cloud-kms-v1/test/google/cloud/kms/v1/ekm_service_test.rb b/google-cloud-kms-v1/test/google/cloud/kms/v1/ekm_service_test.rb index 2601ad1d127b..6029ff709acb 100644 --- a/google-cloud-kms-v1/test/google/cloud/kms/v1/ekm_service_test.rb +++ b/google-cloud-kms-v1/test/google/cloud/kms/v1/ekm_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/kms/v1/ekm_service_pb" -require "google/cloud/kms/v1/ekm_service_services_pb" require "google/cloud/kms/v1/ekm_service" class ::Google::Cloud::Kms::V1::EkmService::ClientTest < Minitest::Test diff --git a/google-cloud-kms-v1/test/google/cloud/kms/v1/key_management_service_test.rb b/google-cloud-kms-v1/test/google/cloud/kms/v1/key_management_service_test.rb index a975ff281736..3f3968f4a8f6 100644 --- a/google-cloud-kms-v1/test/google/cloud/kms/v1/key_management_service_test.rb +++ b/google-cloud-kms-v1/test/google/cloud/kms/v1/key_management_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/kms/v1/service_pb" -require "google/cloud/kms/v1/service_services_pb" require "google/cloud/kms/v1/key_management_service" class ::Google::Cloud::Kms::V1::KeyManagementService::ClientTest < Minitest::Test diff --git a/google-cloud-language-v1/google-cloud-language-v1.gemspec b/google-cloud-language-v1/google-cloud-language-v1.gemspec index 5332cf719203..3704b8f92e02 100644 --- a/google-cloud-language-v1/google-cloud-language-v1.gemspec +++ b/google-cloud-language-v1/google-cloud-language-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-language-v1/test/google/cloud/language/v1/language_service_test.rb b/google-cloud-language-v1/test/google/cloud/language/v1/language_service_test.rb index cae666bf8105..d61b3dbbb1b5 100644 --- a/google-cloud-language-v1/test/google/cloud/language/v1/language_service_test.rb +++ b/google-cloud-language-v1/test/google/cloud/language/v1/language_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/language/v1/language_service_pb" -require "google/cloud/language/v1/language_service_services_pb" require "google/cloud/language/v1/language_service" class ::Google::Cloud::Language::V1::LanguageService::ClientTest < Minitest::Test diff --git a/google-cloud-language-v1beta2/google-cloud-language-v1beta2.gemspec b/google-cloud-language-v1beta2/google-cloud-language-v1beta2.gemspec index 3d1506fef7e3..7fa9063ae91f 100644 --- a/google-cloud-language-v1beta2/google-cloud-language-v1beta2.gemspec +++ b/google-cloud-language-v1beta2/google-cloud-language-v1beta2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-language-v1beta2/test/google/cloud/language/v1beta2/language_service_test.rb b/google-cloud-language-v1beta2/test/google/cloud/language/v1beta2/language_service_test.rb index d223db2ef509..89e2a7e5488c 100644 --- a/google-cloud-language-v1beta2/test/google/cloud/language/v1beta2/language_service_test.rb +++ b/google-cloud-language-v1beta2/test/google/cloud/language/v1beta2/language_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/language/v1beta2/language_service_pb" -require "google/cloud/language/v1beta2/language_service_services_pb" require "google/cloud/language/v1beta2/language_service" class ::Google::Cloud::Language::V1beta2::LanguageService::ClientTest < Minitest::Test diff --git a/google-cloud-language-v2/google-cloud-language-v2.gemspec b/google-cloud-language-v2/google-cloud-language-v2.gemspec index ab0ebc3d16ca..5a5db1731471 100644 --- a/google-cloud-language-v2/google-cloud-language-v2.gemspec +++ b/google-cloud-language-v2/google-cloud-language-v2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-language-v2/test/google/cloud/language/v2/language_service_test.rb b/google-cloud-language-v2/test/google/cloud/language/v2/language_service_test.rb index 86c9c83f6816..18ff644a18fb 100644 --- a/google-cloud-language-v2/test/google/cloud/language/v2/language_service_test.rb +++ b/google-cloud-language-v2/test/google/cloud/language/v2/language_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/language/v2/language_service_pb" -require "google/cloud/language/v2/language_service_services_pb" require "google/cloud/language/v2/language_service" class ::Google::Cloud::Language::V2::LanguageService::ClientTest < Minitest::Test diff --git a/google-cloud-life_sciences-v2beta/google-cloud-life_sciences-v2beta.gemspec b/google-cloud-life_sciences-v2beta/google-cloud-life_sciences-v2beta.gemspec index 26c8fb4ffd0e..b4f3e578745f 100644 --- a/google-cloud-life_sciences-v2beta/google-cloud-life_sciences-v2beta.gemspec +++ b/google-cloud-life_sciences-v2beta/google-cloud-life_sciences-v2beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-life_sciences-v2beta/lib/google/cloud/life_sciences/v2beta/bindings_override.rb b/google-cloud-life_sciences-v2beta/lib/google/cloud/life_sciences/v2beta/bindings_override.rb index 9e260b13950e..0ac498d3d230 100644 --- a/google-cloud-life_sciences-v2beta/lib/google/cloud/life_sciences/v2beta/bindings_override.rb +++ b/google-cloud-life_sciences-v2beta/lib/google/cloud/life_sciences/v2beta/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.lifesciences.v2beta package. - # - # This class contains common configuration for all services - # of the google.cloud.lifesciences.v2beta package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-life_sciences-v2beta/test/google/cloud/life_sciences/v2beta/workflows_service_test.rb b/google-cloud-life_sciences-v2beta/test/google/cloud/life_sciences/v2beta/workflows_service_test.rb index 74295d499942..0b9e77c261f7 100644 --- a/google-cloud-life_sciences-v2beta/test/google/cloud/life_sciences/v2beta/workflows_service_test.rb +++ b/google-cloud-life_sciences-v2beta/test/google/cloud/life_sciences/v2beta/workflows_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/lifesciences/v2beta/workflows_pb" -require "google/cloud/lifesciences/v2beta/workflows_services_pb" require "google/cloud/life_sciences/v2beta/workflows_service" class ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::ClientTest < Minitest::Test diff --git a/google-cloud-location/google-cloud-location.gemspec b/google-cloud-location/google-cloud-location.gemspec index b14e0752db40..333db2425e1e 100644 --- a/google-cloud-location/google-cloud-location.gemspec +++ b/google-cloud-location/google-cloud-location.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-location/test/google/cloud/location/locations_test.rb b/google-cloud-location/test/google/cloud/location/locations_test.rb index 574bc1c713e2..8b7e25bb77b6 100644 --- a/google-cloud-location/test/google/cloud/location/locations_test.rb +++ b/google-cloud-location/test/google/cloud/location/locations_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/location/locations_pb" -require "google/cloud/location/locations_services_pb" require "google/cloud/location/locations" class ::Google::Cloud::Location::Locations::ClientTest < Minitest::Test diff --git a/google-cloud-logging-v2/google-cloud-logging-v2.gemspec b/google-cloud-logging-v2/google-cloud-logging-v2.gemspec index 40c75b4c171b..df85b170f0a8 100644 --- a/google-cloud-logging-v2/google-cloud-logging-v2.gemspec +++ b/google-cloud-logging-v2/google-cloud-logging-v2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-logging-v2/test/google/cloud/logging/v2/config_service_test.rb b/google-cloud-logging-v2/test/google/cloud/logging/v2/config_service_test.rb index 485c94f7a61e..619598135e25 100644 --- a/google-cloud-logging-v2/test/google/cloud/logging/v2/config_service_test.rb +++ b/google-cloud-logging-v2/test/google/cloud/logging/v2/config_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/logging/v2/logging_config_pb" -require "google/logging/v2/logging_config_services_pb" require "google/cloud/logging/v2/config_service" class ::Google::Cloud::Logging::V2::ConfigService::ClientTest < Minitest::Test diff --git a/google-cloud-logging-v2/test/google/cloud/logging/v2/logging_service_test.rb b/google-cloud-logging-v2/test/google/cloud/logging/v2/logging_service_test.rb index c466be647d19..36ad92cea1b4 100644 --- a/google-cloud-logging-v2/test/google/cloud/logging/v2/logging_service_test.rb +++ b/google-cloud-logging-v2/test/google/cloud/logging/v2/logging_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/logging/v2/logging_pb" -require "google/logging/v2/logging_services_pb" require "google/cloud/logging/v2/logging_service" class ::Google::Cloud::Logging::V2::LoggingService::ClientTest < Minitest::Test diff --git a/google-cloud-logging-v2/test/google/cloud/logging/v2/metrics_service_test.rb b/google-cloud-logging-v2/test/google/cloud/logging/v2/metrics_service_test.rb index cddd523c2440..2b71ef7dee54 100644 --- a/google-cloud-logging-v2/test/google/cloud/logging/v2/metrics_service_test.rb +++ b/google-cloud-logging-v2/test/google/cloud/logging/v2/metrics_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/logging/v2/logging_metrics_pb" -require "google/logging/v2/logging_metrics_services_pb" require "google/cloud/logging/v2/metrics_service" class ::Google::Cloud::Logging::V2::MetricsService::ClientTest < Minitest::Test diff --git a/google-cloud-lustre-v1/google-cloud-lustre-v1.gemspec b/google-cloud-lustre-v1/google-cloud-lustre-v1.gemspec index b3253861ad82..060739f2cb71 100644 --- a/google-cloud-lustre-v1/google-cloud-lustre-v1.gemspec +++ b/google-cloud-lustre-v1/google-cloud-lustre-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/bindings_override.rb b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/bindings_override.rb index 0d80a73a5acd..6916baf9736b 100644 --- a/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/bindings_override.rb +++ b/google-cloud-lustre-v1/lib/google/cloud/lustre/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.lustre.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.lustre.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-lustre-v1/test/google/cloud/lustre/v1/lustre_test.rb b/google-cloud-lustre-v1/test/google/cloud/lustre/v1/lustre_test.rb index dc41709e611a..ebdeb0a637b4 100644 --- a/google-cloud-lustre-v1/test/google/cloud/lustre/v1/lustre_test.rb +++ b/google-cloud-lustre-v1/test/google/cloud/lustre/v1/lustre_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/lustre/v1/lustre_pb" -require "google/cloud/lustre/v1/lustre_services_pb" require "google/cloud/lustre/v1/lustre" class ::Google::Cloud::Lustre::V1::Lustre::ClientTest < Minitest::Test diff --git a/google-cloud-maintenance-api-v1beta/google-cloud-maintenance-api-v1beta.gemspec b/google-cloud-maintenance-api-v1beta/google-cloud-maintenance-api-v1beta.gemspec index e8ab59300909..10d8fadd6d00 100644 --- a/google-cloud-maintenance-api-v1beta/google-cloud-maintenance-api-v1beta.gemspec +++ b/google-cloud-maintenance-api-v1beta/google-cloud-maintenance-api-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb index c0dd98ba7b0b..7bd3a80988a5 100644 --- a/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb +++ b/google-cloud-maintenance-api-v1beta/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -43,7 +43,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -70,33 +70,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.maintenance.api.v1beta package. - # - # This class contains common configuration for all services - # of the google.cloud.maintenance.api.v1beta package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_test.rb b/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_test.rb index 0e13e092d66d..4f697743690a 100644 --- a/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_test.rb +++ b/google-cloud-maintenance-api-v1beta/test/google/cloud/maintenance/api/v1beta/maintenance_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/maintenance/api/v1beta/maintenance_service_pb" -require "google/cloud/maintenance/api/v1beta/maintenance_service_services_pb" require "google/cloud/maintenance/api/v1beta/maintenance" class ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::ClientTest < Minitest::Test diff --git a/google-cloud-managed_identities-v1/google-cloud-managed_identities-v1.gemspec b/google-cloud-managed_identities-v1/google-cloud-managed_identities-v1.gemspec index a039b082f352..19c2ff3b86a3 100644 --- a/google-cloud-managed_identities-v1/google-cloud-managed_identities-v1.gemspec +++ b/google-cloud-managed_identities-v1/google-cloud-managed_identities-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-managed_identities-v1/test/google/cloud/managed_identities/v1/managed_identities_service_test.rb b/google-cloud-managed_identities-v1/test/google/cloud/managed_identities/v1/managed_identities_service_test.rb index 02c40f3ef79f..e7d7bdd28062 100644 --- a/google-cloud-managed_identities-v1/test/google/cloud/managed_identities/v1/managed_identities_service_test.rb +++ b/google-cloud-managed_identities-v1/test/google/cloud/managed_identities/v1/managed_identities_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/managedidentities/v1/managed_identities_service_pb" -require "google/cloud/managedidentities/v1/managed_identities_service_services_pb" require "google/cloud/managed_identities/v1/managed_identities_service" class ::Google::Cloud::ManagedIdentities::V1::ManagedIdentitiesService::ClientTest < Minitest::Test diff --git a/google-cloud-managed_kafka-v1/google-cloud-managed_kafka-v1.gemspec b/google-cloud-managed_kafka-v1/google-cloud-managed_kafka-v1.gemspec index c5b3aff1c12b..3acdbffa5f9a 100644 --- a/google-cloud-managed_kafka-v1/google-cloud-managed_kafka-v1.gemspec +++ b/google-cloud-managed_kafka-v1/google-cloud-managed_kafka-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/bindings_override.rb b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/bindings_override.rb index 0b4f8fa9ad29..8a0e7ab10576 100644 --- a/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/bindings_override.rb +++ b/google-cloud-managed_kafka-v1/lib/google/cloud/managed_kafka/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.managedkafka.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.managedkafka.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_connect_test.rb b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_connect_test.rb index bafa8bc79e46..8186fb8ddbc2 100644 --- a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_connect_test.rb +++ b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_connect_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/managedkafka/v1/managed_kafka_connect_pb" -require "google/cloud/managedkafka/v1/managed_kafka_connect_services_pb" require "google/cloud/managed_kafka/v1/managed_kafka_connect" class ::Google::Cloud::ManagedKafka::V1::ManagedKafkaConnect::ClientTest < Minitest::Test diff --git a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_test.rb b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_test.rb index 556918fe72ef..96c67ed920e4 100644 --- a/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_test.rb +++ b/google-cloud-managed_kafka-v1/test/google/cloud/managed_kafka/v1/managed_kafka_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/managedkafka/v1/managed_kafka_pb" -require "google/cloud/managedkafka/v1/managed_kafka_services_pb" require "google/cloud/managed_kafka/v1/managed_kafka" class ::Google::Cloud::ManagedKafka::V1::ManagedKafka::ClientTest < Minitest::Test diff --git a/google-cloud-media_translation-v1beta1/google-cloud-media_translation-v1beta1.gemspec b/google-cloud-media_translation-v1beta1/google-cloud-media_translation-v1beta1.gemspec index 2d35262f1b37..120b3330ee7a 100644 --- a/google-cloud-media_translation-v1beta1/google-cloud-media_translation-v1beta1.gemspec +++ b/google-cloud-media_translation-v1beta1/google-cloud-media_translation-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-media_translation-v1beta1/test/google/cloud/media_translation/v1beta1/speech_translation_service_test.rb b/google-cloud-media_translation-v1beta1/test/google/cloud/media_translation/v1beta1/speech_translation_service_test.rb index c3ea96e1a017..6236996392a2 100644 --- a/google-cloud-media_translation-v1beta1/test/google/cloud/media_translation/v1beta1/speech_translation_service_test.rb +++ b/google-cloud-media_translation-v1beta1/test/google/cloud/media_translation/v1beta1/speech_translation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/mediatranslation/v1beta1/media_translation_pb" -require "google/cloud/mediatranslation/v1beta1/media_translation_services_pb" require "google/cloud/media_translation/v1beta1/speech_translation_service" class ::Google::Cloud::MediaTranslation::V1beta1::SpeechTranslationService::ClientTest < Minitest::Test diff --git a/google-cloud-memcache-v1/google-cloud-memcache-v1.gemspec b/google-cloud-memcache-v1/google-cloud-memcache-v1.gemspec index 73eb387836eb..299027782e8f 100644 --- a/google-cloud-memcache-v1/google-cloud-memcache-v1.gemspec +++ b/google-cloud-memcache-v1/google-cloud-memcache-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-memcache-v1/lib/google/cloud/memcache/v1/bindings_override.rb b/google-cloud-memcache-v1/lib/google/cloud/memcache/v1/bindings_override.rb index 712cbbbe47ab..7a65fe50f45f 100644 --- a/google-cloud-memcache-v1/lib/google/cloud/memcache/v1/bindings_override.rb +++ b/google-cloud-memcache-v1/lib/google/cloud/memcache/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.memcache.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.memcache.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-memcache-v1/proto_docs/google/cloud/memcache/v1/cloud_memcache.rb b/google-cloud-memcache-v1/proto_docs/google/cloud/memcache/v1/cloud_memcache.rb index 4847cafb2fc6..0b4cfd732842 100644 --- a/google-cloud-memcache-v1/proto_docs/google/cloud/memcache/v1/cloud_memcache.rb +++ b/google-cloud-memcache-v1/proto_docs/google/cloud/memcache/v1/cloud_memcache.rb @@ -501,7 +501,7 @@ class OperationMetadata extend ::Google::Protobuf::MessageExts::ClassMethods end - # Metadata for the given `::Google::Cloud::Location::Location`. + # Metadata for the given [google.cloud.location.Location][google.cloud.location.Location]. # @!attribute [r] available_zones # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Memcache::V1::ZoneMetadata}] # Output only. The set of available zones in the location. The map is keyed diff --git a/google-cloud-memcache-v1/test/google/cloud/memcache/v1/cloud_memcache_test.rb b/google-cloud-memcache-v1/test/google/cloud/memcache/v1/cloud_memcache_test.rb index e8b9e4b620d3..62931423db5c 100644 --- a/google-cloud-memcache-v1/test/google/cloud/memcache/v1/cloud_memcache_test.rb +++ b/google-cloud-memcache-v1/test/google/cloud/memcache/v1/cloud_memcache_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/memcache/v1/cloud_memcache_pb" -require "google/cloud/memcache/v1/cloud_memcache_services_pb" require "google/cloud/memcache/v1/cloud_memcache" class ::Google::Cloud::Memcache::V1::CloudMemcache::ClientTest < Minitest::Test diff --git a/google-cloud-memcache-v1beta2/google-cloud-memcache-v1beta2.gemspec b/google-cloud-memcache-v1beta2/google-cloud-memcache-v1beta2.gemspec index 38f9b31215bd..b31ab4cdcdb6 100644 --- a/google-cloud-memcache-v1beta2/google-cloud-memcache-v1beta2.gemspec +++ b/google-cloud-memcache-v1beta2/google-cloud-memcache-v1beta2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-memcache-v1beta2/lib/google/cloud/memcache/v1beta2/bindings_override.rb b/google-cloud-memcache-v1beta2/lib/google/cloud/memcache/v1beta2/bindings_override.rb index b3f28e0491ab..0d4b9f3dc206 100644 --- a/google-cloud-memcache-v1beta2/lib/google/cloud/memcache/v1beta2/bindings_override.rb +++ b/google-cloud-memcache-v1beta2/lib/google/cloud/memcache/v1beta2/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.memcache.v1beta2 package. - # - # This class contains common configuration for all services - # of the google.cloud.memcache.v1beta2 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-memcache-v1beta2/proto_docs/google/cloud/memcache/v1beta2/cloud_memcache.rb b/google-cloud-memcache-v1beta2/proto_docs/google/cloud/memcache/v1beta2/cloud_memcache.rb index 3f3522d1482d..dfbe2f3aa92d 100644 --- a/google-cloud-memcache-v1beta2/proto_docs/google/cloud/memcache/v1beta2/cloud_memcache.rb +++ b/google-cloud-memcache-v1beta2/proto_docs/google/cloud/memcache/v1beta2/cloud_memcache.rb @@ -526,7 +526,7 @@ class OperationMetadata extend ::Google::Protobuf::MessageExts::ClassMethods end - # Metadata for the given `::Google::Cloud::Location::Location`. + # Metadata for the given [google.cloud.location.Location][google.cloud.location.Location]. # @!attribute [r] available_zones # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Memcache::V1beta2::ZoneMetadata}] # Output only. The set of available zones in the location. The map is keyed diff --git a/google-cloud-memcache-v1beta2/test/google/cloud/memcache/v1beta2/cloud_memcache_test.rb b/google-cloud-memcache-v1beta2/test/google/cloud/memcache/v1beta2/cloud_memcache_test.rb index 45308429b439..f7629daa1dbd 100644 --- a/google-cloud-memcache-v1beta2/test/google/cloud/memcache/v1beta2/cloud_memcache_test.rb +++ b/google-cloud-memcache-v1beta2/test/google/cloud/memcache/v1beta2/cloud_memcache_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/memcache/v1beta2/cloud_memcache_pb" -require "google/cloud/memcache/v1beta2/cloud_memcache_services_pb" require "google/cloud/memcache/v1beta2/cloud_memcache" class ::Google::Cloud::Memcache::V1beta2::CloudMemcache::ClientTest < Minitest::Test diff --git a/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec b/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec index 83721f03c4a5..a28440a5ef03 100644 --- a/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec +++ b/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb index 4b962b050f72..35c119379b9e 100644 --- a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb +++ b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.memorystore.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.memorystore.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-memorystore-v1beta/google-cloud-memorystore-v1beta.gemspec b/google-cloud-memorystore-v1beta/google-cloud-memorystore-v1beta.gemspec index 87f86b9c0fe2..00f9b1396651 100644 --- a/google-cloud-memorystore-v1beta/google-cloud-memorystore-v1beta.gemspec +++ b/google-cloud-memorystore-v1beta/google-cloud-memorystore-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-memorystore-v1beta/lib/google/cloud/memorystore/v1beta/bindings_override.rb b/google-cloud-memorystore-v1beta/lib/google/cloud/memorystore/v1beta/bindings_override.rb index 3a839c357bff..69a351cb9afd 100644 --- a/google-cloud-memorystore-v1beta/lib/google/cloud/memorystore/v1beta/bindings_override.rb +++ b/google-cloud-memorystore-v1beta/lib/google/cloud/memorystore/v1beta/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.memorystore.v1beta package. - # - # This class contains common configuration for all services - # of the google.cloud.memorystore.v1beta package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-metastore-v1/google-cloud-metastore-v1.gemspec b/google-cloud-metastore-v1/google-cloud-metastore-v1.gemspec index 6ae1a31f19db..b82d06293524 100644 --- a/google-cloud-metastore-v1/google-cloud-metastore-v1.gemspec +++ b/google-cloud-metastore-v1/google-cloud-metastore-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-metastore-v1/lib/google/cloud/metastore/v1/bindings_override.rb b/google-cloud-metastore-v1/lib/google/cloud/metastore/v1/bindings_override.rb index 88e5b3af2d0b..b9ed41758622 100644 --- a/google-cloud-metastore-v1/lib/google/cloud/metastore/v1/bindings_override.rb +++ b/google-cloud-metastore-v1/lib/google/cloud/metastore/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -142,33 +142,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.metastore.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.metastore.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-metastore-v1/test/google/cloud/metastore/v1/dataproc_metastore_federation_test.rb b/google-cloud-metastore-v1/test/google/cloud/metastore/v1/dataproc_metastore_federation_test.rb index 182be71ee552..efd5ff71b12c 100644 --- a/google-cloud-metastore-v1/test/google/cloud/metastore/v1/dataproc_metastore_federation_test.rb +++ b/google-cloud-metastore-v1/test/google/cloud/metastore/v1/dataproc_metastore_federation_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/metastore/v1/metastore_federation_pb" -require "google/cloud/metastore/v1/metastore_federation_services_pb" require "google/cloud/metastore/v1/dataproc_metastore_federation" class ::Google::Cloud::Metastore::V1::DataprocMetastoreFederation::ClientTest < Minitest::Test diff --git a/google-cloud-metastore-v1/test/google/cloud/metastore/v1/dataproc_metastore_test.rb b/google-cloud-metastore-v1/test/google/cloud/metastore/v1/dataproc_metastore_test.rb index 26a83fd0ae49..b23cfa229e27 100644 --- a/google-cloud-metastore-v1/test/google/cloud/metastore/v1/dataproc_metastore_test.rb +++ b/google-cloud-metastore-v1/test/google/cloud/metastore/v1/dataproc_metastore_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/metastore/v1/metastore_pb" -require "google/cloud/metastore/v1/metastore_services_pb" require "google/cloud/metastore/v1/dataproc_metastore" class ::Google::Cloud::Metastore::V1::DataprocMetastore::ClientTest < Minitest::Test diff --git a/google-cloud-metastore-v1beta/google-cloud-metastore-v1beta.gemspec b/google-cloud-metastore-v1beta/google-cloud-metastore-v1beta.gemspec index 08e12bb8fd96..3b640988ad81 100644 --- a/google-cloud-metastore-v1beta/google-cloud-metastore-v1beta.gemspec +++ b/google-cloud-metastore-v1beta/google-cloud-metastore-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-metastore-v1beta/lib/google/cloud/metastore/v1beta/bindings_override.rb b/google-cloud-metastore-v1beta/lib/google/cloud/metastore/v1beta/bindings_override.rb index 631d75f5e259..a06f9216c128 100644 --- a/google-cloud-metastore-v1beta/lib/google/cloud/metastore/v1beta/bindings_override.rb +++ b/google-cloud-metastore-v1beta/lib/google/cloud/metastore/v1beta/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -198,33 +198,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.metastore.v1beta package. - # - # This class contains common configuration for all services - # of the google.cloud.metastore.v1beta package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-metastore-v1beta/test/google/cloud/metastore/v1beta/dataproc_metastore_federation_test.rb b/google-cloud-metastore-v1beta/test/google/cloud/metastore/v1beta/dataproc_metastore_federation_test.rb index 43562ed3dbc0..32db7228a07a 100644 --- a/google-cloud-metastore-v1beta/test/google/cloud/metastore/v1beta/dataproc_metastore_federation_test.rb +++ b/google-cloud-metastore-v1beta/test/google/cloud/metastore/v1beta/dataproc_metastore_federation_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/metastore/v1beta/metastore_federation_pb" -require "google/cloud/metastore/v1beta/metastore_federation_services_pb" require "google/cloud/metastore/v1beta/dataproc_metastore_federation" class ::Google::Cloud::Metastore::V1beta::DataprocMetastoreFederation::ClientTest < Minitest::Test diff --git a/google-cloud-metastore-v1beta/test/google/cloud/metastore/v1beta/dataproc_metastore_test.rb b/google-cloud-metastore-v1beta/test/google/cloud/metastore/v1beta/dataproc_metastore_test.rb index 414c9264f129..cc422e9a7b36 100644 --- a/google-cloud-metastore-v1beta/test/google/cloud/metastore/v1beta/dataproc_metastore_test.rb +++ b/google-cloud-metastore-v1beta/test/google/cloud/metastore/v1beta/dataproc_metastore_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/metastore/v1beta/metastore_pb" -require "google/cloud/metastore/v1beta/metastore_services_pb" require "google/cloud/metastore/v1beta/dataproc_metastore" class ::Google::Cloud::Metastore::V1beta::DataprocMetastore::ClientTest < Minitest::Test diff --git a/google-cloud-migration_center-v1/google-cloud-migration_center-v1.gemspec b/google-cloud-migration_center-v1/google-cloud-migration_center-v1.gemspec index e9466aa5156f..c137e047b699 100644 --- a/google-cloud-migration_center-v1/google-cloud-migration_center-v1.gemspec +++ b/google-cloud-migration_center-v1/google-cloud-migration_center-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-migration_center-v1/lib/google/cloud/migration_center/v1/bindings_override.rb b/google-cloud-migration_center-v1/lib/google/cloud/migration_center/v1/bindings_override.rb index dcd21eaa50c6..655484c5f886 100644 --- a/google-cloud-migration_center-v1/lib/google/cloud/migration_center/v1/bindings_override.rb +++ b/google-cloud-migration_center-v1/lib/google/cloud/migration_center/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.migrationcenter.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.migrationcenter.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-migration_center-v1/test/google/cloud/migration_center/v1/migration_center_test.rb b/google-cloud-migration_center-v1/test/google/cloud/migration_center/v1/migration_center_test.rb index 63a47ef2c501..b22ec82fd87b 100644 --- a/google-cloud-migration_center-v1/test/google/cloud/migration_center/v1/migration_center_test.rb +++ b/google-cloud-migration_center-v1/test/google/cloud/migration_center/v1/migration_center_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/migrationcenter/v1/migrationcenter_pb" -require "google/cloud/migrationcenter/v1/migrationcenter_services_pb" require "google/cloud/migration_center/v1/migration_center" class ::Google::Cloud::MigrationCenter::V1::MigrationCenter::ClientTest < Minitest::Test From 10ba20de73226a9bae3e4aa45c631051578b9b03 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 15:51:59 -0700 Subject: [PATCH 454/457] chore: use HTTP binding configuration class from new gapic-common (#30845) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmctZGFzaGJvYXJkLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmctbWV0cmljc19zY29wZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmctdjMvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldGFwcC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfY29ubmVjdGl2aXR5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfY29ubmVjdGl2aXR5LXYxYWxwaGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfbWFuYWdlbWVudC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfc2VjdXJpdHktdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfc2VydmljZXMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5vdGVib29rcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5vdGVib29rcy12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5vdGVib29rcy12Mi8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9wdGltaXphdGlvbi12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9yYWNsZV9kYXRhYmFzZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9yY2hlc3RyYXRpb24tYWlyZmxvdy1zZXJ2aWNlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9yZ19wb2xpY3ktdjIvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2NvbmZpZy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2NvbmZpZy12MWFscGhhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2xvZ2luLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2xvZ2luLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- ...ogle-cloud-monitoring-dashboard-v1.gemspec | 2 +- .../dashboard/v1/dashboards_service_test.rb | 1 - ...-cloud-monitoring-metrics_scope-v1.gemspec | 2 +- .../metrics_scope/v1/metrics_scopes_test.rb | 1 - .../google-cloud-monitoring-v3.gemspec | 2 +- .../v3/alert_policy_service_test.rb | 1 - .../cloud/monitoring/v3/group_service_test.rb | 1 - .../monitoring/v3/metric_service_test.rb | 1 - .../v3/notification_channel_service_test.rb | 1 - .../cloud/monitoring/v3/query_service_test.rb | 1 - .../v3/service_monitoring_service_test.rb | 1 - .../monitoring/v3/snooze_service_test.rb | 1 - .../v3/uptime_check_service_test.rb | 1 - .../google-cloud-netapp-v1.gemspec | 2 +- .../cloud/netapp/v1/bindings_override.rb | 31 ++----------------- .../google/cloud/netapp/v1/common.rb | 2 +- .../google/cloud/netapp/v1/netapp_test.rb | 1 - ...ogle-cloud-network_connectivity-v1.gemspec | 2 +- .../cross_network_automation_service_test.rb | 1 - .../v1/hub_service_test.rb | 1 - .../v1/internal_range_service_test.rb | 1 - .../v1/policy_based_routing_service_test.rb | 1 - ...loud-network_connectivity-v1alpha1.gemspec | 2 +- .../v1alpha1/hub_service_test.rb | 1 - ...google-cloud-network_management-v1.gemspec | 2 +- .../v1/bindings_override.rb | 31 ++----------------- .../v1/reachability_service_test.rb | 1 - .../v1/vpc_flow_logs_service_test.rb | 1 - ...gle-cloud-network_security-v1beta1.gemspec | 2 +- .../v1beta1/bindings_override.rb | 31 ++----------------- .../v1beta1/network_security_test.rb | 1 - .../google-cloud-network_services-v1.gemspec | 2 +- .../network_services/v1/bindings_override.rb | 31 ++----------------- .../network_services/v1/dep_service_test.rb | 1 - .../v1/network_services_test.rb | 1 - .../google-cloud-notebooks-v1.gemspec | 2 +- .../cloud/notebooks/v1/bindings_override.rb | 31 ++----------------- .../v1/managed_notebook_service_test.rb | 1 - .../notebooks/v1/notebook_service_test.rb | 1 - .../google-cloud-notebooks-v1beta1.gemspec | 2 +- .../v1beta1/notebook_service_test.rb | 1 - .../google-cloud-notebooks-v2.gemspec | 2 +- .../cloud/notebooks/v2/bindings_override.rb | 31 ++----------------- .../notebooks/v2/notebook_service_test.rb | 1 - .../google-cloud-optimization-v1.gemspec | 2 +- .../optimization/v1/fleet_routing_test.rb | 1 - .../google-cloud-oracle_database-v1.gemspec | 2 +- .../oracle_database/v1/bindings_override.rb | 31 ++----------------- .../oracledatabase/v1/location_metadata.rb | 2 +- .../v1/oracle_database_test.rb | 1 - ...d-orchestration-airflow-service-v1.gemspec | 2 +- .../airflow/service/v1/environments_test.rb | 1 - .../airflow/service/v1/image_versions_test.rb | 1 - .../google-cloud-org_policy-v2.gemspec | 2 +- .../cloud/org_policy/v2/org_policy_test.rb | 1 - .../google-cloud-os_config-v1.gemspec | 2 +- .../os_config/v1/os_config_service_test.rb | 1 - .../v1/os_config_zonal_service_test.rb | 1 - .../google-cloud-os_config-v1alpha.gemspec | 2 +- .../v1alpha/os_config_zonal_service_test.rb | 1 - .../google-cloud-os_login-v1.gemspec | 2 +- .../os_login/v1/os_login_service_test.rb | 1 - .../google-cloud-os_login-v1beta.gemspec | 2 +- .../os_login/v1beta/os_login_service_test.rb | 1 - 64 files changed, 36 insertions(+), 260 deletions(-) diff --git a/google-cloud-monitoring-dashboard-v1/google-cloud-monitoring-dashboard-v1.gemspec b/google-cloud-monitoring-dashboard-v1/google-cloud-monitoring-dashboard-v1.gemspec index 80129c4e251f..5e5ed038891a 100644 --- a/google-cloud-monitoring-dashboard-v1/google-cloud-monitoring-dashboard-v1.gemspec +++ b/google-cloud-monitoring-dashboard-v1/google-cloud-monitoring-dashboard-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-monitoring-dashboard-v1/test/google/cloud/monitoring/dashboard/v1/dashboards_service_test.rb b/google-cloud-monitoring-dashboard-v1/test/google/cloud/monitoring/dashboard/v1/dashboards_service_test.rb index 35182f8673a7..84999c994277 100644 --- a/google-cloud-monitoring-dashboard-v1/test/google/cloud/monitoring/dashboard/v1/dashboards_service_test.rb +++ b/google-cloud-monitoring-dashboard-v1/test/google/cloud/monitoring/dashboard/v1/dashboards_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/dashboard/v1/dashboards_service_pb" -require "google/monitoring/dashboard/v1/dashboards_service_services_pb" require "google/cloud/monitoring/dashboard/v1/dashboards_service" class ::Google::Cloud::Monitoring::Dashboard::V1::DashboardsService::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-metrics_scope-v1/google-cloud-monitoring-metrics_scope-v1.gemspec b/google-cloud-monitoring-metrics_scope-v1/google-cloud-monitoring-metrics_scope-v1.gemspec index 8fa067fec33d..d6dc564d47da 100644 --- a/google-cloud-monitoring-metrics_scope-v1/google-cloud-monitoring-metrics_scope-v1.gemspec +++ b/google-cloud-monitoring-metrics_scope-v1/google-cloud-monitoring-metrics_scope-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-monitoring-metrics_scope-v1/test/google/cloud/monitoring/metrics_scope/v1/metrics_scopes_test.rb b/google-cloud-monitoring-metrics_scope-v1/test/google/cloud/monitoring/metrics_scope/v1/metrics_scopes_test.rb index 5429a5b10a65..4eba2aa74774 100644 --- a/google-cloud-monitoring-metrics_scope-v1/test/google/cloud/monitoring/metrics_scope/v1/metrics_scopes_test.rb +++ b/google-cloud-monitoring-metrics_scope-v1/test/google/cloud/monitoring/metrics_scope/v1/metrics_scopes_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/metricsscope/v1/metrics_scopes_pb" -require "google/monitoring/metricsscope/v1/metrics_scopes_services_pb" require "google/cloud/monitoring/metrics_scope/v1/metrics_scopes" class ::Google::Cloud::Monitoring::MetricsScope::V1::MetricsScopes::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-v3/google-cloud-monitoring-v3.gemspec b/google-cloud-monitoring-v3/google-cloud-monitoring-v3.gemspec index a32c76f89723..b204b1ca896f 100644 --- a/google-cloud-monitoring-v3/google-cloud-monitoring-v3.gemspec +++ b/google-cloud-monitoring-v3/google-cloud-monitoring-v3.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/alert_policy_service_test.rb b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/alert_policy_service_test.rb index 54112dbf5435..304158a0e93d 100644 --- a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/alert_policy_service_test.rb +++ b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/alert_policy_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/v3/alert_service_pb" -require "google/monitoring/v3/alert_service_services_pb" require "google/cloud/monitoring/v3/alert_policy_service" class ::Google::Cloud::Monitoring::V3::AlertPolicyService::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/group_service_test.rb b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/group_service_test.rb index b5aa52b19bbc..d97767d533a1 100644 --- a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/group_service_test.rb +++ b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/group_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/v3/group_service_pb" -require "google/monitoring/v3/group_service_services_pb" require "google/cloud/monitoring/v3/group_service" class ::Google::Cloud::Monitoring::V3::GroupService::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/metric_service_test.rb b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/metric_service_test.rb index 175e906b2374..abc1447d56d0 100644 --- a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/metric_service_test.rb +++ b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/metric_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/v3/metric_service_pb" -require "google/monitoring/v3/metric_service_services_pb" require "google/cloud/monitoring/v3/metric_service" class ::Google::Cloud::Monitoring::V3::MetricService::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/notification_channel_service_test.rb b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/notification_channel_service_test.rb index 9e8868951273..97f375b7dc08 100644 --- a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/notification_channel_service_test.rb +++ b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/notification_channel_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/v3/notification_service_pb" -require "google/monitoring/v3/notification_service_services_pb" require "google/cloud/monitoring/v3/notification_channel_service" class ::Google::Cloud::Monitoring::V3::NotificationChannelService::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/query_service_test.rb b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/query_service_test.rb index 457a7c43295c..51d16863e355 100644 --- a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/query_service_test.rb +++ b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/query_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/v3/query_service_pb" -require "google/monitoring/v3/query_service_services_pb" require "google/cloud/monitoring/v3/query_service" class ::Google::Cloud::Monitoring::V3::QueryService::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/service_monitoring_service_test.rb b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/service_monitoring_service_test.rb index 6cdfdb9d6487..1fd8ee6fb7e7 100644 --- a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/service_monitoring_service_test.rb +++ b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/service_monitoring_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/v3/service_service_pb" -require "google/monitoring/v3/service_service_services_pb" require "google/cloud/monitoring/v3/service_monitoring_service" class ::Google::Cloud::Monitoring::V3::ServiceMonitoringService::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/snooze_service_test.rb b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/snooze_service_test.rb index fc750f63d254..a1c6963ab51e 100644 --- a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/snooze_service_test.rb +++ b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/snooze_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/v3/snooze_service_pb" -require "google/monitoring/v3/snooze_service_services_pb" require "google/cloud/monitoring/v3/snooze_service" class ::Google::Cloud::Monitoring::V3::SnoozeService::ClientTest < Minitest::Test diff --git a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/uptime_check_service_test.rb b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/uptime_check_service_test.rb index 2b4c075fd137..8cf87ce91288 100644 --- a/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/uptime_check_service_test.rb +++ b/google-cloud-monitoring-v3/test/google/cloud/monitoring/v3/uptime_check_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/monitoring/v3/uptime_service_pb" -require "google/monitoring/v3/uptime_service_services_pb" require "google/cloud/monitoring/v3/uptime_check_service" class ::Google::Cloud::Monitoring::V3::UptimeCheckService::ClientTest < Minitest::Test diff --git a/google-cloud-netapp-v1/google-cloud-netapp-v1.gemspec b/google-cloud-netapp-v1/google-cloud-netapp-v1.gemspec index 48b5a408f3bb..a6f0128cf3ee 100644 --- a/google-cloud-netapp-v1/google-cloud-netapp-v1.gemspec +++ b/google-cloud-netapp-v1/google-cloud-netapp-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-netapp-v1/lib/google/cloud/netapp/v1/bindings_override.rb b/google-cloud-netapp-v1/lib/google/cloud/netapp/v1/bindings_override.rb index b31ab532ded3..93aa6ce2e43d 100644 --- a/google-cloud-netapp-v1/lib/google/cloud/netapp/v1/bindings_override.rb +++ b/google-cloud-netapp-v1/lib/google/cloud/netapp/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.netapp.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.netapp.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-netapp-v1/proto_docs/google/cloud/netapp/v1/common.rb b/google-cloud-netapp-v1/proto_docs/google/cloud/netapp/v1/common.rb index 423411ac89af..d58360f2d37e 100644 --- a/google-cloud-netapp-v1/proto_docs/google/cloud/netapp/v1/common.rb +++ b/google-cloud-netapp-v1/proto_docs/google/cloud/netapp/v1/common.rb @@ -22,7 +22,7 @@ module Cloud module NetApp module V1 # Metadata for a given - # Location. + # [google.cloud.location.Location][google.cloud.location.Location]. # @!attribute [r] supported_service_levels # @return [::Array<::Google::Cloud::NetApp::V1::ServiceLevel>] # Output only. Supported service levels in a location. diff --git a/google-cloud-netapp-v1/test/google/cloud/netapp/v1/netapp_test.rb b/google-cloud-netapp-v1/test/google/cloud/netapp/v1/netapp_test.rb index 0b59c00a1ab1..b488e8a0829b 100644 --- a/google-cloud-netapp-v1/test/google/cloud/netapp/v1/netapp_test.rb +++ b/google-cloud-netapp-v1/test/google/cloud/netapp/v1/netapp_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/netapp/v1/cloud_netapp_service_pb" -require "google/cloud/netapp/v1/cloud_netapp_service_services_pb" require "google/cloud/netapp/v1/netapp" class ::Google::Cloud::NetApp::V1::NetApp::ClientTest < Minitest::Test diff --git a/google-cloud-network_connectivity-v1/google-cloud-network_connectivity-v1.gemspec b/google-cloud-network_connectivity-v1/google-cloud-network_connectivity-v1.gemspec index 252ea98dcb00..400dc99eb03f 100644 --- a/google-cloud-network_connectivity-v1/google-cloud-network_connectivity-v1.gemspec +++ b/google-cloud-network_connectivity-v1/google-cloud-network_connectivity-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/cross_network_automation_service_test.rb b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/cross_network_automation_service_test.rb index 44c1afe94ac9..a28908326d17 100644 --- a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/cross_network_automation_service_test.rb +++ b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/cross_network_automation_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkconnectivity/v1/cross_network_automation_pb" -require "google/cloud/networkconnectivity/v1/cross_network_automation_services_pb" require "google/cloud/network_connectivity/v1/cross_network_automation_service" class ::Google::Cloud::NetworkConnectivity::V1::CrossNetworkAutomationService::ClientTest < Minitest::Test diff --git a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/hub_service_test.rb b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/hub_service_test.rb index 0dd6c21b306b..8c960824d4aa 100644 --- a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/hub_service_test.rb +++ b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/hub_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkconnectivity/v1/hub_pb" -require "google/cloud/networkconnectivity/v1/hub_services_pb" require "google/cloud/network_connectivity/v1/hub_service" class ::Google::Cloud::NetworkConnectivity::V1::HubService::ClientTest < Minitest::Test diff --git a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_test.rb b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_test.rb index 50e76448fce3..2456edeb1549 100644 --- a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_test.rb +++ b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/internal_range_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkconnectivity/v1/internal_range_pb" -require "google/cloud/networkconnectivity/v1/internal_range_services_pb" require "google/cloud/network_connectivity/v1/internal_range_service" class ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::ClientTest < Minitest::Test diff --git a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/policy_based_routing_service_test.rb b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/policy_based_routing_service_test.rb index 67b0fea7785d..5761f1a98664 100644 --- a/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/policy_based_routing_service_test.rb +++ b/google-cloud-network_connectivity-v1/test/google/cloud/network_connectivity/v1/policy_based_routing_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkconnectivity/v1/policy_based_routing_pb" -require "google/cloud/networkconnectivity/v1/policy_based_routing_services_pb" require "google/cloud/network_connectivity/v1/policy_based_routing_service" class ::Google::Cloud::NetworkConnectivity::V1::PolicyBasedRoutingService::ClientTest < Minitest::Test diff --git a/google-cloud-network_connectivity-v1alpha1/google-cloud-network_connectivity-v1alpha1.gemspec b/google-cloud-network_connectivity-v1alpha1/google-cloud-network_connectivity-v1alpha1.gemspec index 8ea6756b377f..52bbfebab06d 100644 --- a/google-cloud-network_connectivity-v1alpha1/google-cloud-network_connectivity-v1alpha1.gemspec +++ b/google-cloud-network_connectivity-v1alpha1/google-cloud-network_connectivity-v1alpha1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-network_connectivity-v1alpha1/test/google/cloud/network_connectivity/v1alpha1/hub_service_test.rb b/google-cloud-network_connectivity-v1alpha1/test/google/cloud/network_connectivity/v1alpha1/hub_service_test.rb index 226999e46416..c2e5108b0cff 100644 --- a/google-cloud-network_connectivity-v1alpha1/test/google/cloud/network_connectivity/v1alpha1/hub_service_test.rb +++ b/google-cloud-network_connectivity-v1alpha1/test/google/cloud/network_connectivity/v1alpha1/hub_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkconnectivity/v1alpha1/hub_pb" -require "google/cloud/networkconnectivity/v1alpha1/hub_services_pb" require "google/cloud/network_connectivity/v1alpha1/hub_service" class ::Google::Cloud::NetworkConnectivity::V1alpha1::HubService::ClientTest < Minitest::Test diff --git a/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec b/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec index e2df435b847f..4ddbd03bf5ff 100644 --- a/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec +++ b/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb b/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb index d9650f391731..03fc92790e3e 100644 --- a/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb +++ b/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -102,33 +102,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.networkmanagement.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.networkmanagement.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb b/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb index 7a54deba0981..b93502cf59e0 100644 --- a/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb +++ b/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkmanagement/v1/reachability_pb" -require "google/cloud/networkmanagement/v1/reachability_services_pb" require "google/cloud/network_management/v1/reachability_service" class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::ClientTest < Minitest::Test diff --git a/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb b/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb index c3c97dd0599b..264fea58acc4 100644 --- a/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb +++ b/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb" require "google/cloud/network_management/v1/vpc_flow_logs_service" class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::ClientTest < Minitest::Test diff --git a/google-cloud-network_security-v1beta1/google-cloud-network_security-v1beta1.gemspec b/google-cloud-network_security-v1beta1/google-cloud-network_security-v1beta1.gemspec index c0901df3ee88..e8c5b7e47f55 100644 --- a/google-cloud-network_security-v1beta1/google-cloud-network_security-v1beta1.gemspec +++ b/google-cloud-network_security-v1beta1/google-cloud-network_security-v1beta1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-network_security-v1beta1/lib/google/cloud/network_security/v1beta1/bindings_override.rb b/google-cloud-network_security-v1beta1/lib/google/cloud/network_security/v1beta1/bindings_override.rb index 54fdf875321f..de81ece0d27b 100644 --- a/google-cloud-network_security-v1beta1/lib/google/cloud/network_security/v1beta1/bindings_override.rb +++ b/google-cloud-network_security-v1beta1/lib/google/cloud/network_security/v1beta1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -150,33 +150,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.networksecurity.v1beta1 package. - # - # This class contains common configuration for all services - # of the google.cloud.networksecurity.v1beta1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-network_security-v1beta1/test/google/cloud/network_security/v1beta1/network_security_test.rb b/google-cloud-network_security-v1beta1/test/google/cloud/network_security/v1beta1/network_security_test.rb index 746ed2a009da..b8a6d4400205 100644 --- a/google-cloud-network_security-v1beta1/test/google/cloud/network_security/v1beta1/network_security_test.rb +++ b/google-cloud-network_security-v1beta1/test/google/cloud/network_security/v1beta1/network_security_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networksecurity/v1beta1/network_security_pb" -require "google/cloud/networksecurity/v1beta1/network_security_services_pb" require "google/cloud/network_security/v1beta1/network_security" class ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::ClientTest < Minitest::Test diff --git a/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec b/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec index 7030b93e8a8a..d49233387af4 100644 --- a/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec +++ b/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb index c918690c7636..6f84b6c9c958 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -246,33 +246,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.networkservices.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.networkservices.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb index c25dc6015ac9..7985ba6fd48e 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkservices/v1/dep_pb" -require "google/cloud/networkservices/v1/dep_services_pb" require "google/cloud/network_services/v1/dep_service" class ::Google::Cloud::NetworkServices::V1::DepService::ClientTest < Minitest::Test diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb index e83eabb359d0..bc316eac566f 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/networkservices/v1/network_services_pb" -require "google/cloud/networkservices/v1/network_services_services_pb" require "google/cloud/network_services/v1/network_services" class ::Google::Cloud::NetworkServices::V1::NetworkServices::ClientTest < Minitest::Test diff --git a/google-cloud-notebooks-v1/google-cloud-notebooks-v1.gemspec b/google-cloud-notebooks-v1/google-cloud-notebooks-v1.gemspec index 0124b91d590d..05ce7fb5dea9 100644 --- a/google-cloud-notebooks-v1/google-cloud-notebooks-v1.gemspec +++ b/google-cloud-notebooks-v1/google-cloud-notebooks-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-notebooks-v1/lib/google/cloud/notebooks/v1/bindings_override.rb b/google-cloud-notebooks-v1/lib/google/cloud/notebooks/v1/bindings_override.rb index b7a6a6acbb3c..6abad35e7778 100644 --- a/google-cloud-notebooks-v1/lib/google/cloud/notebooks/v1/bindings_override.rb +++ b/google-cloud-notebooks-v1/lib/google/cloud/notebooks/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -126,33 +126,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.notebooks.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.notebooks.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-notebooks-v1/test/google/cloud/notebooks/v1/managed_notebook_service_test.rb b/google-cloud-notebooks-v1/test/google/cloud/notebooks/v1/managed_notebook_service_test.rb index 7aee587d9ecd..27b6d686b922 100644 --- a/google-cloud-notebooks-v1/test/google/cloud/notebooks/v1/managed_notebook_service_test.rb +++ b/google-cloud-notebooks-v1/test/google/cloud/notebooks/v1/managed_notebook_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/notebooks/v1/managed_service_pb" -require "google/cloud/notebooks/v1/managed_service_services_pb" require "google/cloud/notebooks/v1/managed_notebook_service" class ::Google::Cloud::Notebooks::V1::ManagedNotebookService::ClientTest < Minitest::Test diff --git a/google-cloud-notebooks-v1/test/google/cloud/notebooks/v1/notebook_service_test.rb b/google-cloud-notebooks-v1/test/google/cloud/notebooks/v1/notebook_service_test.rb index 2c0c80814fc7..ebf4004f7d92 100644 --- a/google-cloud-notebooks-v1/test/google/cloud/notebooks/v1/notebook_service_test.rb +++ b/google-cloud-notebooks-v1/test/google/cloud/notebooks/v1/notebook_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/notebooks/v1/service_pb" -require "google/cloud/notebooks/v1/service_services_pb" require "google/cloud/notebooks/v1/notebook_service" class ::Google::Cloud::Notebooks::V1::NotebookService::ClientTest < Minitest::Test diff --git a/google-cloud-notebooks-v1beta1/google-cloud-notebooks-v1beta1.gemspec b/google-cloud-notebooks-v1beta1/google-cloud-notebooks-v1beta1.gemspec index 34e0aad81852..a0d357e9c444 100644 --- a/google-cloud-notebooks-v1beta1/google-cloud-notebooks-v1beta1.gemspec +++ b/google-cloud-notebooks-v1beta1/google-cloud-notebooks-v1beta1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-notebooks-v1beta1/test/google/cloud/notebooks/v1beta1/notebook_service_test.rb b/google-cloud-notebooks-v1beta1/test/google/cloud/notebooks/v1beta1/notebook_service_test.rb index 51fa5992127f..33b7ece3f3ed 100644 --- a/google-cloud-notebooks-v1beta1/test/google/cloud/notebooks/v1beta1/notebook_service_test.rb +++ b/google-cloud-notebooks-v1beta1/test/google/cloud/notebooks/v1beta1/notebook_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/notebooks/v1beta1/service_pb" -require "google/cloud/notebooks/v1beta1/service_services_pb" require "google/cloud/notebooks/v1beta1/notebook_service" class ::Google::Cloud::Notebooks::V1beta1::NotebookService::ClientTest < Minitest::Test diff --git a/google-cloud-notebooks-v2/google-cloud-notebooks-v2.gemspec b/google-cloud-notebooks-v2/google-cloud-notebooks-v2.gemspec index 23a7902e9a37..b54e5c29d47f 100644 --- a/google-cloud-notebooks-v2/google-cloud-notebooks-v2.gemspec +++ b/google-cloud-notebooks-v2/google-cloud-notebooks-v2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" diff --git a/google-cloud-notebooks-v2/lib/google/cloud/notebooks/v2/bindings_override.rb b/google-cloud-notebooks-v2/lib/google/cloud/notebooks/v2/bindings_override.rb index 3db4064322c5..2b1e4659596a 100644 --- a/google-cloud-notebooks-v2/lib/google/cloud/notebooks/v2/bindings_override.rb +++ b/google-cloud-notebooks-v2/lib/google/cloud/notebooks/v2/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -102,33 +102,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.notebooks.v2 package. - # - # This class contains common configuration for all services - # of the google.cloud.notebooks.v2 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-notebooks-v2/test/google/cloud/notebooks/v2/notebook_service_test.rb b/google-cloud-notebooks-v2/test/google/cloud/notebooks/v2/notebook_service_test.rb index effb0ccdc419..b36f7e2ac6a1 100644 --- a/google-cloud-notebooks-v2/test/google/cloud/notebooks/v2/notebook_service_test.rb +++ b/google-cloud-notebooks-v2/test/google/cloud/notebooks/v2/notebook_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/notebooks/v2/service_pb" -require "google/cloud/notebooks/v2/service_services_pb" require "google/cloud/notebooks/v2/notebook_service" class ::Google::Cloud::Notebooks::V2::NotebookService::ClientTest < Minitest::Test diff --git a/google-cloud-optimization-v1/google-cloud-optimization-v1.gemspec b/google-cloud-optimization-v1/google-cloud-optimization-v1.gemspec index 0e7d46f13c13..22de9ba21045 100644 --- a/google-cloud-optimization-v1/google-cloud-optimization-v1.gemspec +++ b/google-cloud-optimization-v1/google-cloud-optimization-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-optimization-v1/test/google/cloud/optimization/v1/fleet_routing_test.rb b/google-cloud-optimization-v1/test/google/cloud/optimization/v1/fleet_routing_test.rb index c77f09b25e47..a59ba2975ac0 100644 --- a/google-cloud-optimization-v1/test/google/cloud/optimization/v1/fleet_routing_test.rb +++ b/google-cloud-optimization-v1/test/google/cloud/optimization/v1/fleet_routing_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/optimization/v1/fleet_routing_pb" -require "google/cloud/optimization/v1/fleet_routing_services_pb" require "google/cloud/optimization/v1/fleet_routing" class ::Google::Cloud::Optimization::V1::FleetRouting::ClientTest < Minitest::Test diff --git a/google-cloud-oracle_database-v1/google-cloud-oracle_database-v1.gemspec b/google-cloud-oracle_database-v1/google-cloud-oracle_database-v1.gemspec index 3e91a39dadba..6228d743bdd5 100644 --- a/google-cloud-oracle_database-v1/google-cloud-oracle_database-v1.gemspec +++ b/google-cloud-oracle_database-v1/google-cloud-oracle_database-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-oracle_database-v1/lib/google/cloud/oracle_database/v1/bindings_override.rb b/google-cloud-oracle_database-v1/lib/google/cloud/oracle_database/v1/bindings_override.rb index a793434ec72a..714f216a5625 100644 --- a/google-cloud-oracle_database-v1/lib/google/cloud/oracle_database/v1/bindings_override.rb +++ b/google-cloud-oracle_database-v1/lib/google/cloud/oracle_database/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.oracledatabase.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.oracledatabase.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-oracle_database-v1/proto_docs/google/cloud/oracledatabase/v1/location_metadata.rb b/google-cloud-oracle_database-v1/proto_docs/google/cloud/oracledatabase/v1/location_metadata.rb index a614155cf2de..96173246b306 100644 --- a/google-cloud-oracle_database-v1/proto_docs/google/cloud/oracledatabase/v1/location_metadata.rb +++ b/google-cloud-oracle_database-v1/proto_docs/google/cloud/oracledatabase/v1/location_metadata.rb @@ -21,7 +21,7 @@ module Google module Cloud module OracleDatabase module V1 - # Metadata for a given `::Google::Cloud::Location::Location`. + # Metadata for a given [Location][google.cloud.location.Location]. # @!attribute [r] gcp_oracle_zones # @return [::Array<::String>] # Output only. Google Cloud Platform Oracle zones in a location. diff --git a/google-cloud-oracle_database-v1/test/google/cloud/oracle_database/v1/oracle_database_test.rb b/google-cloud-oracle_database-v1/test/google/cloud/oracle_database/v1/oracle_database_test.rb index 354a54606686..140073a8817b 100644 --- a/google-cloud-oracle_database-v1/test/google/cloud/oracle_database/v1/oracle_database_test.rb +++ b/google-cloud-oracle_database-v1/test/google/cloud/oracle_database/v1/oracle_database_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/oracledatabase/v1/oracledatabase_pb" -require "google/cloud/oracledatabase/v1/oracledatabase_services_pb" require "google/cloud/oracle_database/v1/oracle_database" class ::Google::Cloud::OracleDatabase::V1::OracleDatabase::ClientTest < Minitest::Test diff --git a/google-cloud-orchestration-airflow-service-v1/google-cloud-orchestration-airflow-service-v1.gemspec b/google-cloud-orchestration-airflow-service-v1/google-cloud-orchestration-airflow-service-v1.gemspec index 92641d386676..7985e8f2e22d 100644 --- a/google-cloud-orchestration-airflow-service-v1/google-cloud-orchestration-airflow-service-v1.gemspec +++ b/google-cloud-orchestration-airflow-service-v1/google-cloud-orchestration-airflow-service-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-orchestration-airflow-service-v1/test/google/cloud/orchestration/airflow/service/v1/environments_test.rb b/google-cloud-orchestration-airflow-service-v1/test/google/cloud/orchestration/airflow/service/v1/environments_test.rb index 62d48759bead..e1c25cd3095e 100644 --- a/google-cloud-orchestration-airflow-service-v1/test/google/cloud/orchestration/airflow/service/v1/environments_test.rb +++ b/google-cloud-orchestration-airflow-service-v1/test/google/cloud/orchestration/airflow/service/v1/environments_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/orchestration/airflow/service/v1/environments_pb" -require "google/cloud/orchestration/airflow/service/v1/environments_services_pb" require "google/cloud/orchestration/airflow/service/v1/environments" class ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::ClientTest < Minitest::Test diff --git a/google-cloud-orchestration-airflow-service-v1/test/google/cloud/orchestration/airflow/service/v1/image_versions_test.rb b/google-cloud-orchestration-airflow-service-v1/test/google/cloud/orchestration/airflow/service/v1/image_versions_test.rb index 710aa8c27423..4a5bebb998b0 100644 --- a/google-cloud-orchestration-airflow-service-v1/test/google/cloud/orchestration/airflow/service/v1/image_versions_test.rb +++ b/google-cloud-orchestration-airflow-service-v1/test/google/cloud/orchestration/airflow/service/v1/image_versions_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/orchestration/airflow/service/v1/image_versions_pb" -require "google/cloud/orchestration/airflow/service/v1/image_versions_services_pb" require "google/cloud/orchestration/airflow/service/v1/image_versions" class ::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::ClientTest < Minitest::Test diff --git a/google-cloud-org_policy-v2/google-cloud-org_policy-v2.gemspec b/google-cloud-org_policy-v2/google-cloud-org_policy-v2.gemspec index 3ab48e112e8c..f6c992a1a640 100644 --- a/google-cloud-org_policy-v2/google-cloud-org_policy-v2.gemspec +++ b/google-cloud-org_policy-v2/google-cloud-org_policy-v2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-org_policy-v2/test/google/cloud/org_policy/v2/org_policy_test.rb b/google-cloud-org_policy-v2/test/google/cloud/org_policy/v2/org_policy_test.rb index 065d812ee5eb..611e4d447a82 100644 --- a/google-cloud-org_policy-v2/test/google/cloud/org_policy/v2/org_policy_test.rb +++ b/google-cloud-org_policy-v2/test/google/cloud/org_policy/v2/org_policy_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/orgpolicy/v2/orgpolicy_pb" -require "google/cloud/orgpolicy/v2/orgpolicy_services_pb" require "google/cloud/org_policy/v2/org_policy" class ::Google::Cloud::OrgPolicy::V2::OrgPolicy::ClientTest < Minitest::Test diff --git a/google-cloud-os_config-v1/google-cloud-os_config-v1.gemspec b/google-cloud-os_config-v1/google-cloud-os_config-v1.gemspec index 6d4782fc31d4..a6c871480094 100644 --- a/google-cloud-os_config-v1/google-cloud-os_config-v1.gemspec +++ b/google-cloud-os_config-v1/google-cloud-os_config-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-os_config-v1/test/google/cloud/os_config/v1/os_config_service_test.rb b/google-cloud-os_config-v1/test/google/cloud/os_config/v1/os_config_service_test.rb index 924e40674be3..03c599a6fd0f 100644 --- a/google-cloud-os_config-v1/test/google/cloud/os_config/v1/os_config_service_test.rb +++ b/google-cloud-os_config-v1/test/google/cloud/os_config/v1/os_config_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/osconfig/v1/osconfig_service_pb" -require "google/cloud/osconfig/v1/osconfig_service_services_pb" require "google/cloud/os_config/v1/os_config_service" class ::Google::Cloud::OsConfig::V1::OsConfigService::ClientTest < Minitest::Test diff --git a/google-cloud-os_config-v1/test/google/cloud/os_config/v1/os_config_zonal_service_test.rb b/google-cloud-os_config-v1/test/google/cloud/os_config/v1/os_config_zonal_service_test.rb index 83fe8d26f24d..a27d5bc7b27e 100644 --- a/google-cloud-os_config-v1/test/google/cloud/os_config/v1/os_config_zonal_service_test.rb +++ b/google-cloud-os_config-v1/test/google/cloud/os_config/v1/os_config_zonal_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/osconfig/v1/osconfig_zonal_service_pb" -require "google/cloud/osconfig/v1/osconfig_zonal_service_services_pb" require "google/cloud/os_config/v1/os_config_zonal_service" class ::Google::Cloud::OsConfig::V1::OsConfigZonalService::ClientTest < Minitest::Test diff --git a/google-cloud-os_config-v1alpha/google-cloud-os_config-v1alpha.gemspec b/google-cloud-os_config-v1alpha/google-cloud-os_config-v1alpha.gemspec index b4dec85b4384..f1c6161aeca0 100644 --- a/google-cloud-os_config-v1alpha/google-cloud-os_config-v1alpha.gemspec +++ b/google-cloud-os_config-v1alpha/google-cloud-os_config-v1alpha.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-os_config-v1alpha/test/google/cloud/os_config/v1alpha/os_config_zonal_service_test.rb b/google-cloud-os_config-v1alpha/test/google/cloud/os_config/v1alpha/os_config_zonal_service_test.rb index 643e4d74c16b..ff366da2c453 100644 --- a/google-cloud-os_config-v1alpha/test/google/cloud/os_config/v1alpha/os_config_zonal_service_test.rb +++ b/google-cloud-os_config-v1alpha/test/google/cloud/os_config/v1alpha/os_config_zonal_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/osconfig/v1alpha/osconfig_zonal_service_pb" -require "google/cloud/osconfig/v1alpha/osconfig_zonal_service_services_pb" require "google/cloud/os_config/v1alpha/os_config_zonal_service" class ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::ClientTest < Minitest::Test diff --git a/google-cloud-os_login-v1/google-cloud-os_login-v1.gemspec b/google-cloud-os_login-v1/google-cloud-os_login-v1.gemspec index 47da95c3da06..1d833893267c 100644 --- a/google-cloud-os_login-v1/google-cloud-os_login-v1.gemspec +++ b/google-cloud-os_login-v1/google-cloud-os_login-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-os_login-v1/test/google/cloud/os_login/v1/os_login_service_test.rb b/google-cloud-os_login-v1/test/google/cloud/os_login/v1/os_login_service_test.rb index e88beb7521d7..1d2c243fbfbe 100644 --- a/google-cloud-os_login-v1/test/google/cloud/os_login/v1/os_login_service_test.rb +++ b/google-cloud-os_login-v1/test/google/cloud/os_login/v1/os_login_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/oslogin/v1/oslogin_pb" -require "google/cloud/oslogin/v1/oslogin_services_pb" require "google/cloud/os_login/v1/os_login_service" class ::Google::Cloud::OsLogin::V1::OsLoginService::ClientTest < Minitest::Test diff --git a/google-cloud-os_login-v1beta/google-cloud-os_login-v1beta.gemspec b/google-cloud-os_login-v1beta/google-cloud-os_login-v1beta.gemspec index 1b9166eca6f7..832a95c7c735 100644 --- a/google-cloud-os_login-v1beta/google-cloud-os_login-v1beta.gemspec +++ b/google-cloud-os_login-v1beta/google-cloud-os_login-v1beta.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-os_login-v1beta/test/google/cloud/os_login/v1beta/os_login_service_test.rb b/google-cloud-os_login-v1beta/test/google/cloud/os_login/v1beta/os_login_service_test.rb index 215e00a414e1..1255640795fe 100644 --- a/google-cloud-os_login-v1beta/test/google/cloud/os_login/v1beta/os_login_service_test.rb +++ b/google-cloud-os_login-v1beta/test/google/cloud/os_login/v1beta/os_login_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/oslogin/v1beta/oslogin_pb" -require "google/cloud/oslogin/v1beta/oslogin_services_pb" require "google/cloud/os_login/v1beta/os_login_service" class ::Google::Cloud::OsLogin::V1beta::OsLoginService::ClientTest < Minitest::Test From 84745eee2c69fbb776b6a34fb699f6c6b32aadb6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 15:53:27 -0700 Subject: [PATCH 455/457] chore: use HTTP binding configuration class from new gapic-common (#30846) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use HTTP binding configuration class from new gapic-common chore: Remove unnecessary services_pb import from tests docs: no longer generate cross-package references for mixin objects chore: add support for multiple patterns with same arguments PiperOrigin-RevId: 795110862 Source-Link: https://github.com/googleapis/googleapis/commit/b1e61e0ad25d5e6050e8da295f5e14f999f06632 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc17c45ac64c6fa83a3e472488d60e852fda2da9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUtdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBhcmFtZXRlcl9tYW5hZ2VyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBoaXNoaW5nX3Byb3RlY3Rpb24tdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBvbGljeV9zaW11bGF0b3ItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBvbGljeV90cm91Ymxlc2hvb3Rlci1pYW0tdjMvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBvbGljeV90cm91Ymxlc2hvb3Rlci12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXByaXZhdGVfY2F0YWxvZy12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXByaXZpbGVnZWRfYWNjZXNzX21hbmFnZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXByb2ZpbGVyLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXB1YnN1Yi12MS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJhcGlkX21pZ3JhdGlvbl9hc3Nlc3NtZW50LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYV9lbnRlcnByaXNlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYV9lbnRlcnByaXNlLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGF0aW9uX2VuZ2luZS12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGVyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlZGlzLWNsdXN0ZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlZGlzLWNsdXN0ZXItdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiYmMxN2M0NWFjNjRjNmZhODNhM2U0NzI0ODhkNjBlODUyZmRhMmRhOSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlZGlzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJiYzE3YzQ1YWM2NGM2ZmE4M2EzZTQ3MjQ4OGQ2MGU4NTJmZGEyZGE5In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlZGlzLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImJjMTdjNDVhYzY0YzZmYTgzYTNlNDcyNDg4ZDYwZTg1MmZkYTJkYTkifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-cloud-parallelstore-v1.gemspec | 2 +- .../parallelstore/v1/bindings_override.rb | 31 ++----------------- .../parallelstore/v1/parallelstore_test.rb | 1 - .../google-cloud-parallelstore-v1beta.gemspec | 2 +- .../parallelstore/v1beta/bindings_override.rb | 31 ++----------------- .../v1beta/parallelstore_test.rb | 1 - .../google-cloud-parameter_manager-v1.gemspec | 2 +- .../parameter_manager/v1/bindings_override.rb | 31 ++----------------- .../v1/parameter_manager_test.rb | 1 - ...-cloud-phishing_protection-v1beta1.gemspec | 2 +- .../phishing_protection_service_test.rb | 1 - .../google-cloud-policy_simulator-v1.gemspec | 2 +- .../cloud/policysimulator/v1/explanations.rb | 2 +- .../cloud/policysimulator/v1/simulator.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- ..._policy_violations_preview_service_test.rb | 1 - .../policy_simulator/v1/simulator_test.rb | 1 - ...cloud-policy_troubleshooter-iam-v3.gemspec | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../iam/v3/policy_troubleshooter_test.rb | 1 - ...gle-cloud-policy_troubleshooter-v1.gemspec | 2 +- .../policytroubleshooter/v1/explanations.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../v1/iam_checker_test.rb | 1 - ...ogle-cloud-private_catalog-v1beta1.gemspec | 2 +- .../v1beta1/private_catalog_test.rb | 1 - ...cloud-privileged_access_manager-v1.gemspec | 2 +- .../v1/bindings_override.rb | 31 ++----------------- .../v1/privileged_access_manager_test.rb | 1 - .../google-cloud-profiler-v2.gemspec | 2 +- .../cloud/profiler/v2/export_service_test.rb | 1 - .../profiler/v2/profiler_service_test.rb | 1 - .../google-cloud-pubsub-v1.gemspec | 2 +- .../cloud/pubsub/v1/schema_service_test.rb | 1 - .../pubsub/v1/subscription_admin_test.rb | 1 - .../cloud/pubsub/v1/topic_admin_test.rb | 1 - ...loud-rapid_migration_assessment-v1.gemspec | 2 +- .../v1/bindings_override.rb | 31 ++----------------- .../v1/rapid_migration_assessment_test.rb | 1 - ...ogle-cloud-recaptcha_enterprise-v1.gemspec | 2 +- .../v1/recaptcha_enterprise_service_test.rb | 1 - ...cloud-recaptcha_enterprise-v1beta1.gemspec | 2 +- .../recaptcha_enterprise_service_test.rb | 1 - ...loud-recommendation_engine-v1beta1.gemspec | 2 +- .../v1beta1/catalog_service_test.rb | 1 - .../prediction_api_key_registry_test.rb | 1 - .../v1beta1/prediction_service_test.rb | 1 - .../v1beta1/user_event_service_test.rb | 1 - .../google-cloud-recommender-v1.gemspec | 2 +- .../cloud/recommender/v1/recommender_test.rb | 1 - .../google-cloud-redis-cluster-v1.gemspec | 2 +- .../redis/cluster/v1/bindings_override.rb | 31 ++----------------- .../cluster/v1/cloud_redis_cluster_test.rb | 1 - ...google-cloud-redis-cluster-v1beta1.gemspec | 2 +- .../cluster/v1beta1/bindings_override.rb | 31 ++----------------- .../v1beta1/cloud_redis_cluster_test.rb | 1 - .../google-cloud-redis-v1.gemspec | 2 +- .../cloud/redis/v1/bindings_override.rb | 31 ++----------------- .../google/cloud/redis/v1/cloud_redis_test.rb | 1 - .../google-cloud-redis-v1beta1.gemspec | 2 +- .../cloud/redis/v1beta1/cloud_redis_test.rb | 1 - 61 files changed, 42 insertions(+), 285 deletions(-) diff --git a/google-cloud-parallelstore-v1/google-cloud-parallelstore-v1.gemspec b/google-cloud-parallelstore-v1/google-cloud-parallelstore-v1.gemspec index 7eea7a3e33c8..8b6234d27210 100644 --- a/google-cloud-parallelstore-v1/google-cloud-parallelstore-v1.gemspec +++ b/google-cloud-parallelstore-v1/google-cloud-parallelstore-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-parallelstore-v1/lib/google/cloud/parallelstore/v1/bindings_override.rb b/google-cloud-parallelstore-v1/lib/google/cloud/parallelstore/v1/bindings_override.rb index 6fa2c19e0c62..88094fffa568 100644 --- a/google-cloud-parallelstore-v1/lib/google/cloud/parallelstore/v1/bindings_override.rb +++ b/google-cloud-parallelstore-v1/lib/google/cloud/parallelstore/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.parallelstore.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.parallelstore.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-parallelstore-v1/test/google/cloud/parallelstore/v1/parallelstore_test.rb b/google-cloud-parallelstore-v1/test/google/cloud/parallelstore/v1/parallelstore_test.rb index d54ee4baf302..8ec081b17d14 100644 --- a/google-cloud-parallelstore-v1/test/google/cloud/parallelstore/v1/parallelstore_test.rb +++ b/google-cloud-parallelstore-v1/test/google/cloud/parallelstore/v1/parallelstore_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/parallelstore/v1/parallelstore_pb" -require "google/cloud/parallelstore/v1/parallelstore_services_pb" require "google/cloud/parallelstore/v1/parallelstore" class ::Google::Cloud::Parallelstore::V1::Parallelstore::ClientTest < Minitest::Test diff --git a/google-cloud-parallelstore-v1beta/google-cloud-parallelstore-v1beta.gemspec b/google-cloud-parallelstore-v1beta/google-cloud-parallelstore-v1beta.gemspec index c6c54022e75d..a57d1d695977 100644 --- a/google-cloud-parallelstore-v1beta/google-cloud-parallelstore-v1beta.gemspec +++ b/google-cloud-parallelstore-v1beta/google-cloud-parallelstore-v1beta.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/bindings_override.rb b/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/bindings_override.rb index 0c76a45d13ef..1d25601c178f 100644 --- a/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/bindings_override.rb +++ b/google-cloud-parallelstore-v1beta/lib/google/cloud/parallelstore/v1beta/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.parallelstore.v1beta package. - # - # This class contains common configuration for all services - # of the google.cloud.parallelstore.v1beta package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-parallelstore-v1beta/test/google/cloud/parallelstore/v1beta/parallelstore_test.rb b/google-cloud-parallelstore-v1beta/test/google/cloud/parallelstore/v1beta/parallelstore_test.rb index 3f31b876b69d..ab5c6d345ea9 100644 --- a/google-cloud-parallelstore-v1beta/test/google/cloud/parallelstore/v1beta/parallelstore_test.rb +++ b/google-cloud-parallelstore-v1beta/test/google/cloud/parallelstore/v1beta/parallelstore_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/parallelstore/v1beta/parallelstore_pb" -require "google/cloud/parallelstore/v1beta/parallelstore_services_pb" require "google/cloud/parallelstore/v1beta/parallelstore" class ::Google::Cloud::Parallelstore::V1beta::Parallelstore::ClientTest < Minitest::Test diff --git a/google-cloud-parameter_manager-v1/google-cloud-parameter_manager-v1.gemspec b/google-cloud-parameter_manager-v1/google-cloud-parameter_manager-v1.gemspec index bfd3281aca23..156f5373ff14 100644 --- a/google-cloud-parameter_manager-v1/google-cloud-parameter_manager-v1.gemspec +++ b/google-cloud-parameter_manager-v1/google-cloud-parameter_manager-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" diff --git a/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/bindings_override.rb b/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/bindings_override.rb index 4aedc5249080..35555608b804 100644 --- a/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/bindings_override.rb +++ b/google-cloud-parameter_manager-v1/lib/google/cloud/parameter_manager/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.parametermanager.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.parametermanager.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-parameter_manager-v1/test/google/cloud/parameter_manager/v1/parameter_manager_test.rb b/google-cloud-parameter_manager-v1/test/google/cloud/parameter_manager/v1/parameter_manager_test.rb index 235a1713f589..3530e8914391 100644 --- a/google-cloud-parameter_manager-v1/test/google/cloud/parameter_manager/v1/parameter_manager_test.rb +++ b/google-cloud-parameter_manager-v1/test/google/cloud/parameter_manager/v1/parameter_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/parametermanager/v1/service_pb" -require "google/cloud/parametermanager/v1/service_services_pb" require "google/cloud/parameter_manager/v1/parameter_manager" class ::Google::Cloud::ParameterManager::V1::ParameterManager::ClientTest < Minitest::Test diff --git a/google-cloud-phishing_protection-v1beta1/google-cloud-phishing_protection-v1beta1.gemspec b/google-cloud-phishing_protection-v1beta1/google-cloud-phishing_protection-v1beta1.gemspec index cc337e1cc3db..963643b0d7c3 100644 --- a/google-cloud-phishing_protection-v1beta1/google-cloud-phishing_protection-v1beta1.gemspec +++ b/google-cloud-phishing_protection-v1beta1/google-cloud-phishing_protection-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-phishing_protection-v1beta1/test/google/cloud/phishing_protection/v1beta1/phishing_protection_service_test.rb b/google-cloud-phishing_protection-v1beta1/test/google/cloud/phishing_protection/v1beta1/phishing_protection_service_test.rb index f42fc0681066..325849cac1e8 100644 --- a/google-cloud-phishing_protection-v1beta1/test/google/cloud/phishing_protection/v1beta1/phishing_protection_service_test.rb +++ b/google-cloud-phishing_protection-v1beta1/test/google/cloud/phishing_protection/v1beta1/phishing_protection_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/phishingprotection/v1beta1/phishingprotection_pb" -require "google/cloud/phishingprotection/v1beta1/phishingprotection_services_pb" require "google/cloud/phishing_protection/v1beta1/phishing_protection_service" class ::Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::ClientTest < Minitest::Test diff --git a/google-cloud-policy_simulator-v1/google-cloud-policy_simulator-v1.gemspec b/google-cloud-policy_simulator-v1/google-cloud-policy_simulator-v1.gemspec index c7d6a7b38e7e..d8a39fa61d3b 100644 --- a/google-cloud-policy_simulator-v1/google-cloud-policy_simulator-v1.gemspec +++ b/google-cloud-policy_simulator-v1/google-cloud-policy_simulator-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-org_policy-v2", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" diff --git a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/explanations.rb b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/explanations.rb index f9fd706a4704..7dcd2e6d9806 100644 --- a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/explanations.rb +++ b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/explanations.rb @@ -53,7 +53,7 @@ class AccessTuple extend ::Google::Protobuf::MessageExts::ClassMethods end - # Details about how a specific IAM {::Google::Iam::V1::Policy Policy} contributed + # Details about how a specific IAM [Policy][google.iam.v1.Policy] contributed # to the access check. # @!attribute [rw] access # @return [::Google::Cloud::PolicySimulator::V1::AccessState] diff --git a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/simulator.rb b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/simulator.rb index 5a8d8e2e29be..de38bb1e5589 100644 --- a/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/simulator.rb +++ b/google-cloud-policy_simulator-v1/proto_docs/google/cloud/policysimulator/v1/simulator.rb @@ -242,7 +242,7 @@ class ListReplayResultsResponse # For examples of full resource names for Google Cloud services, see # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. # - # Values are {::Google::Iam::V1::Policy Policy} objects representing the policies + # Values are [Policy][google.iam.v1.Policy] objects representing the policies # that you want to simulate. # # Replays automatically take into account any IAM policies inherited through diff --git a/google-cloud-policy_simulator-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-policy_simulator-v1/proto_docs/google/iam/v1/policy.rb index 751130dab8db..94233fb73c36 100644 --- a/google-cloud-policy_simulator-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-policy_simulator-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb index 7816c8ca512f..5224de658687 100644 --- a/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb +++ b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/org_policy_violations_preview_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/policysimulator/v1/orgpolicy_pb" -require "google/cloud/policysimulator/v1/orgpolicy_services_pb" require "google/cloud/policy_simulator/v1/org_policy_violations_preview_service" class ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::ClientTest < Minitest::Test diff --git a/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/simulator_test.rb b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/simulator_test.rb index 8bb0f428149d..cf4107ebfbe2 100644 --- a/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/simulator_test.rb +++ b/google-cloud-policy_simulator-v1/test/google/cloud/policy_simulator/v1/simulator_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/policysimulator/v1/simulator_pb" -require "google/cloud/policysimulator/v1/simulator_services_pb" require "google/cloud/policy_simulator/v1/simulator" class ::Google::Cloud::PolicySimulator::V1::Simulator::ClientTest < Minitest::Test diff --git a/google-cloud-policy_troubleshooter-iam-v3/google-cloud-policy_troubleshooter-iam-v3.gemspec b/google-cloud-policy_troubleshooter-iam-v3/google-cloud-policy_troubleshooter-iam-v3.gemspec index fb45e5ca2110..a5520ef5a68d 100644 --- a/google-cloud-policy_troubleshooter-iam-v3/google-cloud-policy_troubleshooter-iam-v3.gemspec +++ b/google-cloud-policy_troubleshooter-iam-v3/google-cloud-policy_troubleshooter-iam-v3.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-iam-v1", "> 0.5", "< 2.a" gem.add_dependency "google-iam-v2", "> 0.3", "< 2.a" diff --git a/google-cloud-policy_troubleshooter-iam-v3/proto_docs/google/iam/v1/policy.rb b/google-cloud-policy_troubleshooter-iam-v3/proto_docs/google/iam/v1/policy.rb index 751130dab8db..94233fb73c36 100644 --- a/google-cloud-policy_troubleshooter-iam-v3/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-policy_troubleshooter-iam-v3/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-policy_troubleshooter-iam-v3/test/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter_test.rb b/google-cloud-policy_troubleshooter-iam-v3/test/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter_test.rb index 91f2fad8dda1..cc3053a1b84b 100644 --- a/google-cloud-policy_troubleshooter-iam-v3/test/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter_test.rb +++ b/google-cloud-policy_troubleshooter-iam-v3/test/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/policytroubleshooter/iam/v3/troubleshooter_pb" -require "google/cloud/policytroubleshooter/iam/v3/troubleshooter_services_pb" require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter" class ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::ClientTest < Minitest::Test diff --git a/google-cloud-policy_troubleshooter-v1/google-cloud-policy_troubleshooter-v1.gemspec b/google-cloud-policy_troubleshooter-v1/google-cloud-policy_troubleshooter-v1.gemspec index 7106a39ce74e..509808dbf0ca 100644 --- a/google-cloud-policy_troubleshooter-v1/google-cloud-policy_troubleshooter-v1.gemspec +++ b/google-cloud-policy_troubleshooter-v1/google-cloud-policy_troubleshooter-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.11" end diff --git a/google-cloud-policy_troubleshooter-v1/proto_docs/google/cloud/policytroubleshooter/v1/explanations.rb b/google-cloud-policy_troubleshooter-v1/proto_docs/google/cloud/policytroubleshooter/v1/explanations.rb index 733e4ef06a22..51be9b8ef440 100644 --- a/google-cloud-policy_troubleshooter-v1/proto_docs/google/cloud/policytroubleshooter/v1/explanations.rb +++ b/google-cloud-policy_troubleshooter-v1/proto_docs/google/cloud/policytroubleshooter/v1/explanations.rb @@ -53,7 +53,7 @@ class AccessTuple extend ::Google::Protobuf::MessageExts::ClassMethods end - # Details about how a specific IAM {::Google::Iam::V1::Policy Policy} contributed + # Details about how a specific IAM [Policy][google.iam.v1.Policy] contributed # to the access check. # @!attribute [rw] access # @return [::Google::Cloud::PolicyTroubleshooter::V1::AccessState] diff --git a/google-cloud-policy_troubleshooter-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-policy_troubleshooter-v1/proto_docs/google/iam/v1/policy.rb index 96e77ec64ded..3e6a8d5d47d9 100644 --- a/google-cloud-policy_troubleshooter-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-policy_troubleshooter-v1/proto_docs/google/iam/v1/policy.rb @@ -313,7 +313,7 @@ class AuditConfig # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of - # {::Google::Iam::V1::Binding#members Binding.members}. + # [Binding.members][google.iam.v1.Binding.members]. class AuditLogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-policy_troubleshooter-v1/test/google/cloud/policy_troubleshooter/v1/iam_checker_test.rb b/google-cloud-policy_troubleshooter-v1/test/google/cloud/policy_troubleshooter/v1/iam_checker_test.rb index 60edd3933e05..47089cbc80e1 100644 --- a/google-cloud-policy_troubleshooter-v1/test/google/cloud/policy_troubleshooter/v1/iam_checker_test.rb +++ b/google-cloud-policy_troubleshooter-v1/test/google/cloud/policy_troubleshooter/v1/iam_checker_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/policytroubleshooter/v1/checker_pb" -require "google/cloud/policytroubleshooter/v1/checker_services_pb" require "google/cloud/policy_troubleshooter/v1/iam_checker" class ::Google::Cloud::PolicyTroubleshooter::V1::IamChecker::ClientTest < Minitest::Test diff --git a/google-cloud-private_catalog-v1beta1/google-cloud-private_catalog-v1beta1.gemspec b/google-cloud-private_catalog-v1beta1/google-cloud-private_catalog-v1beta1.gemspec index ab3b20b06705..69b53662822b 100644 --- a/google-cloud-private_catalog-v1beta1/google-cloud-private_catalog-v1beta1.gemspec +++ b/google-cloud-private_catalog-v1beta1/google-cloud-private_catalog-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-private_catalog-v1beta1/test/google/cloud/private_catalog/v1beta1/private_catalog_test.rb b/google-cloud-private_catalog-v1beta1/test/google/cloud/private_catalog/v1beta1/private_catalog_test.rb index fd994c24f7d7..7c8a4aaffde2 100644 --- a/google-cloud-private_catalog-v1beta1/test/google/cloud/private_catalog/v1beta1/private_catalog_test.rb +++ b/google-cloud-private_catalog-v1beta1/test/google/cloud/private_catalog/v1beta1/private_catalog_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/privatecatalog/v1beta1/private_catalog_pb" -require "google/cloud/privatecatalog/v1beta1/private_catalog_services_pb" require "google/cloud/private_catalog/v1beta1/private_catalog" class ::Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::ClientTest < Minitest::Test diff --git a/google-cloud-privileged_access_manager-v1/google-cloud-privileged_access_manager-v1.gemspec b/google-cloud-privileged_access_manager-v1/google-cloud-privileged_access_manager-v1.gemspec index cb8ca2555f5c..bfba79292d67 100644 --- a/google-cloud-privileged_access_manager-v1/google-cloud-privileged_access_manager-v1.gemspec +++ b/google-cloud-privileged_access_manager-v1/google-cloud-privileged_access_manager-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-privileged_access_manager-v1/lib/google/cloud/privileged_access_manager/v1/bindings_override.rb b/google-cloud-privileged_access_manager-v1/lib/google/cloud/privileged_access_manager/v1/bindings_override.rb index 70a1ba4f76c1..6ad5be6ceadf 100644 --- a/google-cloud-privileged_access_manager-v1/lib/google/cloud/privileged_access_manager/v1/bindings_override.rb +++ b/google-cloud-privileged_access_manager-v1/lib/google/cloud/privileged_access_manager/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -101,33 +101,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.privilegedaccessmanager.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.privilegedaccessmanager.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-privileged_access_manager-v1/test/google/cloud/privileged_access_manager/v1/privileged_access_manager_test.rb b/google-cloud-privileged_access_manager-v1/test/google/cloud/privileged_access_manager/v1/privileged_access_manager_test.rb index ab6816b47b96..59db9e0f93b4 100644 --- a/google-cloud-privileged_access_manager-v1/test/google/cloud/privileged_access_manager/v1/privileged_access_manager_test.rb +++ b/google-cloud-privileged_access_manager-v1/test/google/cloud/privileged_access_manager/v1/privileged_access_manager_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager_pb" -require "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager_services_pb" require "google/cloud/privileged_access_manager/v1/privileged_access_manager" class ::Google::Cloud::PrivilegedAccessManager::V1::PrivilegedAccessManager::ClientTest < Minitest::Test diff --git a/google-cloud-profiler-v2/google-cloud-profiler-v2.gemspec b/google-cloud-profiler-v2/google-cloud-profiler-v2.gemspec index 6e5a9c85d622..03a9dd3e0248 100644 --- a/google-cloud-profiler-v2/google-cloud-profiler-v2.gemspec +++ b/google-cloud-profiler-v2/google-cloud-profiler-v2.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-profiler-v2/test/google/cloud/profiler/v2/export_service_test.rb b/google-cloud-profiler-v2/test/google/cloud/profiler/v2/export_service_test.rb index 63aa08f288a4..8716db80cd5f 100644 --- a/google-cloud-profiler-v2/test/google/cloud/profiler/v2/export_service_test.rb +++ b/google-cloud-profiler-v2/test/google/cloud/profiler/v2/export_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/cloudprofiler/v2/profiler_pb" -require "google/devtools/cloudprofiler/v2/profiler_services_pb" require "google/cloud/profiler/v2/export_service" class ::Google::Cloud::Profiler::V2::ExportService::ClientTest < Minitest::Test diff --git a/google-cloud-profiler-v2/test/google/cloud/profiler/v2/profiler_service_test.rb b/google-cloud-profiler-v2/test/google/cloud/profiler/v2/profiler_service_test.rb index 02bf8964d839..35021a6c5af9 100644 --- a/google-cloud-profiler-v2/test/google/cloud/profiler/v2/profiler_service_test.rb +++ b/google-cloud-profiler-v2/test/google/cloud/profiler/v2/profiler_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/devtools/cloudprofiler/v2/profiler_pb" -require "google/devtools/cloudprofiler/v2/profiler_services_pb" require "google/cloud/profiler/v2/profiler_service" class ::Google::Cloud::Profiler::V2::ProfilerService::ClientTest < Minitest::Test diff --git a/google-cloud-pubsub-v1/google-cloud-pubsub-v1.gemspec b/google-cloud-pubsub-v1/google-cloud-pubsub-v1.gemspec index d07846109078..281eead9ea17 100644 --- a/google-cloud-pubsub-v1/google-cloud-pubsub-v1.gemspec +++ b/google-cloud-pubsub-v1/google-cloud-pubsub-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-iam-v1", "~> 1.3" end diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/schema_service_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/schema_service_test.rb index da53460f4bd9..43c02ab9f6e5 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/schema_service_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/schema_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/pubsub/v1/schema_pb" -require "google/pubsub/v1/schema_services_pb" require "google/cloud/pubsub/v1/schema_service" class ::Google::Cloud::PubSub::V1::SchemaService::ClientTest < Minitest::Test diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_test.rb index 72f7af5acd61..b99df9d0ffa4 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/subscription_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/pubsub/v1/pubsub_pb" - require "google/cloud/pubsub/v1/subscription_admin" class ::Google::Cloud::PubSub::V1::SubscriptionAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_test.rb b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_test.rb index f7531255eb88..f5df8558a001 100644 --- a/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_test.rb +++ b/google-cloud-pubsub-v1/test/google/cloud/pubsub/v1/topic_admin_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/pubsub/v1/pubsub_pb" - require "google/cloud/pubsub/v1/topic_admin" class ::Google::Cloud::PubSub::V1::TopicAdmin::ClientTest < Minitest::Test diff --git a/google-cloud-rapid_migration_assessment-v1/google-cloud-rapid_migration_assessment-v1.gemspec b/google-cloud-rapid_migration_assessment-v1/google-cloud-rapid_migration_assessment-v1.gemspec index 35add3717cbe..9fa33b4946ca 100644 --- a/google-cloud-rapid_migration_assessment-v1/google-cloud-rapid_migration_assessment-v1.gemspec +++ b/google-cloud-rapid_migration_assessment-v1/google-cloud-rapid_migration_assessment-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-rapid_migration_assessment-v1/lib/google/cloud/rapid_migration_assessment/v1/bindings_override.rb b/google-cloud-rapid_migration_assessment-v1/lib/google/cloud/rapid_migration_assessment/v1/bindings_override.rb index 9a026a18702f..d9c609a2ba09 100644 --- a/google-cloud-rapid_migration_assessment-v1/lib/google/cloud/rapid_migration_assessment/v1/bindings_override.rb +++ b/google-cloud-rapid_migration_assessment-v1/lib/google/cloud/rapid_migration_assessment/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.rapidmigrationassessment.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.rapidmigrationassessment.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-rapid_migration_assessment-v1/test/google/cloud/rapid_migration_assessment/v1/rapid_migration_assessment_test.rb b/google-cloud-rapid_migration_assessment-v1/test/google/cloud/rapid_migration_assessment/v1/rapid_migration_assessment_test.rb index 5f470aeb6ee3..d760554aa5ea 100644 --- a/google-cloud-rapid_migration_assessment-v1/test/google/cloud/rapid_migration_assessment/v1/rapid_migration_assessment_test.rb +++ b/google-cloud-rapid_migration_assessment-v1/test/google/cloud/rapid_migration_assessment/v1/rapid_migration_assessment_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment_pb" -require "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment_services_pb" require "google/cloud/rapid_migration_assessment/v1/rapid_migration_assessment" class ::Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::ClientTest < Minitest::Test diff --git a/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec b/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec index c43657727b4f..56a08755d093 100644 --- a/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec +++ b/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb b/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb index 671dea645f68..73023d03af98 100644 --- a/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb +++ b/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb" -require "google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb" require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service" class ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::ClientTest < Minitest::Test diff --git a/google-cloud-recaptcha_enterprise-v1beta1/google-cloud-recaptcha_enterprise-v1beta1.gemspec b/google-cloud-recaptcha_enterprise-v1beta1/google-cloud-recaptcha_enterprise-v1beta1.gemspec index d37940794557..4023bbeecdb0 100644 --- a/google-cloud-recaptcha_enterprise-v1beta1/google-cloud-recaptcha_enterprise-v1beta1.gemspec +++ b/google-cloud-recaptcha_enterprise-v1beta1/google-cloud-recaptcha_enterprise-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-recaptcha_enterprise-v1beta1/test/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service_test.rb b/google-cloud-recaptcha_enterprise-v1beta1/test/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service_test.rb index 9a41ee928468..3c9a901d5862 100644 --- a/google-cloud-recaptcha_enterprise-v1beta1/test/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service_test.rb +++ b/google-cloud-recaptcha_enterprise-v1beta1/test/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_pb" -require "google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_services_pb" require "google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service" class ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::ClientTest < Minitest::Test diff --git a/google-cloud-recommendation_engine-v1beta1/google-cloud-recommendation_engine-v1beta1.gemspec b/google-cloud-recommendation_engine-v1beta1/google-cloud-recommendation_engine-v1beta1.gemspec index 8b2907d58ed6..857baf0c3b7b 100644 --- a/google-cloud-recommendation_engine-v1beta1/google-cloud-recommendation_engine-v1beta1.gemspec +++ b/google-cloud-recommendation_engine-v1beta1/google-cloud-recommendation_engine-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/catalog_service_test.rb b/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/catalog_service_test.rb index 976fc3a9cb26..67d963520a6b 100644 --- a/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/catalog_service_test.rb +++ b/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/catalog_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/recommendationengine/v1beta1/catalog_service_pb" -require "google/cloud/recommendationengine/v1beta1/catalog_service_services_pb" require "google/cloud/recommendation_engine/v1beta1/catalog_service" class ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::ClientTest < Minitest::Test diff --git a/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry_test.rb b/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry_test.rb index cbe89ff3fbb4..4faa7065238a 100644 --- a/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry_test.rb +++ b/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service_pb" -require "google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service_services_pb" require "google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry" class ::Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::ClientTest < Minitest::Test diff --git a/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/prediction_service_test.rb b/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/prediction_service_test.rb index 81ccd38adac4..6e942df9702d 100644 --- a/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/prediction_service_test.rb +++ b/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/prediction_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/recommendationengine/v1beta1/prediction_service_pb" -require "google/cloud/recommendationengine/v1beta1/prediction_service_services_pb" require "google/cloud/recommendation_engine/v1beta1/prediction_service" class ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::ClientTest < Minitest::Test diff --git a/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/user_event_service_test.rb b/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/user_event_service_test.rb index 2f69b354ce28..63bb97accf49 100644 --- a/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/user_event_service_test.rb +++ b/google-cloud-recommendation_engine-v1beta1/test/google/cloud/recommendation_engine/v1beta1/user_event_service_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/recommendationengine/v1beta1/user_event_service_pb" -require "google/cloud/recommendationengine/v1beta1/user_event_service_services_pb" require "google/cloud/recommendation_engine/v1beta1/user_event_service" class ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::ClientTest < Minitest::Test diff --git a/google-cloud-recommender-v1/google-cloud-recommender-v1.gemspec b/google-cloud-recommender-v1/google-cloud-recommender-v1.gemspec index 060b358c76d4..324530c2551e 100644 --- a/google-cloud-recommender-v1/google-cloud-recommender-v1.gemspec +++ b/google-cloud-recommender-v1/google-cloud-recommender-v1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-recommender-v1/test/google/cloud/recommender/v1/recommender_test.rb b/google-cloud-recommender-v1/test/google/cloud/recommender/v1/recommender_test.rb index f5e2a875e1f3..2d8aba106ba1 100644 --- a/google-cloud-recommender-v1/test/google/cloud/recommender/v1/recommender_test.rb +++ b/google-cloud-recommender-v1/test/google/cloud/recommender/v1/recommender_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/recommender/v1/recommender_service_pb" -require "google/cloud/recommender/v1/recommender_service_services_pb" require "google/cloud/recommender/v1/recommender" class ::Google::Cloud::Recommender::V1::Recommender::ClientTest < Minitest::Test diff --git a/google-cloud-redis-cluster-v1/google-cloud-redis-cluster-v1.gemspec b/google-cloud-redis-cluster-v1/google-cloud-redis-cluster-v1.gemspec index d49b010b3731..3bd100c3f48e 100644 --- a/google-cloud-redis-cluster-v1/google-cloud-redis-cluster-v1.gemspec +++ b/google-cloud-redis-cluster-v1/google-cloud-redis-cluster-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-redis-cluster-v1/lib/google/cloud/redis/cluster/v1/bindings_override.rb b/google-cloud-redis-cluster-v1/lib/google/cloud/redis/cluster/v1/bindings_override.rb index 4276261c053f..f8560c5de49e 100644 --- a/google-cloud-redis-cluster-v1/lib/google/cloud/redis/cluster/v1/bindings_override.rb +++ b/google-cloud-redis-cluster-v1/lib/google/cloud/redis/cluster/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -43,7 +43,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -70,33 +70,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.redis.cluster.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.redis.cluster.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-redis-cluster-v1/test/google/cloud/redis/cluster/v1/cloud_redis_cluster_test.rb b/google-cloud-redis-cluster-v1/test/google/cloud/redis/cluster/v1/cloud_redis_cluster_test.rb index a0dd3e2b7a8d..76fc5126393d 100644 --- a/google-cloud-redis-cluster-v1/test/google/cloud/redis/cluster/v1/cloud_redis_cluster_test.rb +++ b/google-cloud-redis-cluster-v1/test/google/cloud/redis/cluster/v1/cloud_redis_cluster_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/redis/cluster/v1/cloud_redis_cluster_pb" -require "google/cloud/redis/cluster/v1/cloud_redis_cluster_services_pb" require "google/cloud/redis/cluster/v1/cloud_redis_cluster" class ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::ClientTest < Minitest::Test diff --git a/google-cloud-redis-cluster-v1beta1/google-cloud-redis-cluster-v1beta1.gemspec b/google-cloud-redis-cluster-v1beta1/google-cloud-redis-cluster-v1beta1.gemspec index 91a778e670a4..ae12cfd75bd6 100644 --- a/google-cloud-redis-cluster-v1beta1/google-cloud-redis-cluster-v1beta1.gemspec +++ b/google-cloud-redis-cluster-v1beta1/google-cloud-redis-cluster-v1beta1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-redis-cluster-v1beta1/lib/google/cloud/redis/cluster/v1beta1/bindings_override.rb b/google-cloud-redis-cluster-v1beta1/lib/google/cloud/redis/cluster/v1beta1/bindings_override.rb index caeca4ca80be..432700efe449 100644 --- a/google-cloud-redis-cluster-v1beta1/lib/google/cloud/redis/cluster/v1beta1/bindings_override.rb +++ b/google-cloud-redis-cluster-v1beta1/lib/google/cloud/redis/cluster/v1beta1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -43,7 +43,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -70,33 +70,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.redis.cluster.v1beta1 package. - # - # This class contains common configuration for all services - # of the google.cloud.redis.cluster.v1beta1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-redis-cluster-v1beta1/test/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster_test.rb b/google-cloud-redis-cluster-v1beta1/test/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster_test.rb index bbdc4dcdeda1..8fabb82bd971 100644 --- a/google-cloud-redis-cluster-v1beta1/test/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster_test.rb +++ b/google-cloud-redis-cluster-v1beta1/test/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/redis/cluster/v1beta1/cloud_redis_cluster_pb" -require "google/cloud/redis/cluster/v1beta1/cloud_redis_cluster_services_pb" require "google/cloud/redis/cluster/v1beta1/cloud_redis_cluster" class ::Google::Cloud::Redis::Cluster::V1beta1::CloudRedisCluster::ClientTest < Minitest::Test diff --git a/google-cloud-redis-v1/google-cloud-redis-v1.gemspec b/google-cloud-redis-v1/google-cloud-redis-v1.gemspec index 8f972345f980..3a8b5e91616c 100644 --- a/google-cloud-redis-v1/google-cloud-redis-v1.gemspec +++ b/google-cloud-redis-v1/google-cloud-redis-v1.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "google-cloud-location", "~> 1.0" end diff --git a/google-cloud-redis-v1/lib/google/cloud/redis/v1/bindings_override.rb b/google-cloud-redis-v1/lib/google/cloud/redis/v1/bindings_override.rb index 135449b6f342..cab59c3007dd 100644 --- a/google-cloud-redis-v1/lib/google/cloud/redis/v1/bindings_override.rb +++ b/google-cloud-redis-v1/lib/google/cloud/redis/v1/bindings_override.rb @@ -16,7 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "gapic/config" +require "gapic/rest" module Google module Cloud @@ -42,7 +42,7 @@ def self.configure namespace.pop end - default_config = Configuration.new parent_config + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( uri_method: :get, @@ -69,33 +69,6 @@ def self.configure yield @configure if block_given? @configure end - - ## - # @private - # Configuration class for the google.cloud.redis.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.redis.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end end end end diff --git a/google-cloud-redis-v1/test/google/cloud/redis/v1/cloud_redis_test.rb b/google-cloud-redis-v1/test/google/cloud/redis/v1/cloud_redis_test.rb index 5867822d9d1c..b0aee110e601 100644 --- a/google-cloud-redis-v1/test/google/cloud/redis/v1/cloud_redis_test.rb +++ b/google-cloud-redis-v1/test/google/cloud/redis/v1/cloud_redis_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/redis/v1/cloud_redis_pb" -require "google/cloud/redis/v1/cloud_redis_services_pb" require "google/cloud/redis/v1/cloud_redis" class ::Google::Cloud::Redis::V1::CloudRedis::ClientTest < Minitest::Test diff --git a/google-cloud-redis-v1beta1/google-cloud-redis-v1beta1.gemspec b/google-cloud-redis-v1beta1/google-cloud-redis-v1beta1.gemspec index 421f9c55f157..2fbbfe33d925 100644 --- a/google-cloud-redis-v1beta1/google-cloud-redis-v1beta1.gemspec +++ b/google-cloud-redis-v1beta1/google-cloud-redis-v1beta1.gemspec @@ -23,6 +23,6 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 3.1" - gem.add_dependency "gapic-common", "~> 1.0" + gem.add_dependency "gapic-common", "~> 1.1" gem.add_dependency "google-cloud-errors", "~> 1.0" end diff --git a/google-cloud-redis-v1beta1/test/google/cloud/redis/v1beta1/cloud_redis_test.rb b/google-cloud-redis-v1beta1/test/google/cloud/redis/v1beta1/cloud_redis_test.rb index 9adbf622169f..6a6ff242ce9f 100644 --- a/google-cloud-redis-v1beta1/test/google/cloud/redis/v1beta1/cloud_redis_test.rb +++ b/google-cloud-redis-v1beta1/test/google/cloud/redis/v1beta1/cloud_redis_test.rb @@ -21,7 +21,6 @@ require "gapic/grpc/service_stub" require "google/cloud/redis/v1beta1/cloud_redis_pb" -require "google/cloud/redis/v1beta1/cloud_redis_services_pb" require "google/cloud/redis/v1beta1/cloud_redis" class ::Google::Cloud::Redis::V1beta1::CloudRedis::ClientTest < Minitest::Test From f75dedf6a7eed8ffb5c55748865c8a696db486ee Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Tue, 2 Sep 2025 12:48:46 +0000 Subject: [PATCH 456/457] try waiting for operation complete --- .../storage_control_anywhere_cache_test.rb | 89 +++++++++++++++++++ .../storage_control_create_anywhere_cache.rb | 13 ++- 2 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb diff --git a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb new file mode 100644 index 000000000000..e000cc2438ae --- /dev/null +++ b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb @@ -0,0 +1,89 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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_relative "helper" +require_relative "../storage_control_create_anywhere_cache" +require_relative "../storage_control_list_anywhere_caches" +require_relative "../storage_control_get_anywhere_cache" +require_relative "../storage_control_update_anywhere_cache" +require_relative "../storage_control_pause_anywhere_cache" +require_relative "../storage_control_resume_anywhere_cache" +require_relative "../storage_control_disable_anywhere_cache" + +require 'pry' + +describe "Storage Control Anywhere Cache" do + let(:bucket_name) { random_bucket_name } + let(:storage_client) { Google::Cloud::Storage.new } + let(:zone) {'us-east1-b'} + # let(:zone) {@bucket.location} + + before :all do + @bucket= storage_client.bucket bucket_name + @bucket = create_bucket_helper bucket_name + end + + # after do + # delete_bucket_helper bucket_name + # end + + it "create Anywhere cache" do + create_anywhere_cache bucket_name: bucket_name, zone: zone + end + + # it "list Anywhere cache" do + # # create_anywhere_cache bucket_name: bucket_name, zone: zone + + # out, _err = capture_io do + # list_anywhere_caches bucket_name: bucket_name + # end + + # assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" + # end + + # it "Get Anywhere cache" do + # out, _err = capture_io do + # get_anywhere_cache bucket_name: bucket_name, anywhere_cache_id: zone + # end + # assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" + # end + + # it "Pause Anywhere cache" do + # out, _err = capture_io do + # pause_anywhere_cache bucket_name: bucket_name, anywhere_cache_id: zone + # end + # assert_includes out, "#{bucket_name}/anywhereCaches/#{zone} paused" + # end + + # it "Resume Anywhere cache" do + # out, _err = capture_io do + # resume_anywhere_cache bucket_name: bucket_name, anywhere_cache_id: zone + # end + # assert_includes out, "#{bucket_name}/anywhereCaches/#{zone} running" + # end + + # it "Disable Anywhere cache" do + # out, _err = capture_io do + # disable_anywhere_cache bucket_name: bucket_name, anywhere_cache_id: zone + # end + # assert_includes out, "#{bucket_name}/anywhereCaches/#{zone} disabled" + # end + + # it "Update Anywhere cache" do + # out, _err = capture_io do + # update_anywhere_cache bucket_name: bucket_name, anywhere_cache_id: zone + # end + # assert_includes out, "#{bucket_name}/anywhereCaches/#{zone}" + # end +end \ No newline at end of file diff --git a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb index 9bc1f977af1f..850afdbfa822 100644 --- a/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb +++ b/google-cloud-storage-control/samples/storage_control_create_anywhere_cache.rb @@ -39,8 +39,17 @@ def create_anywhere_cache bucket_name:, zone: # The request creates a new cache in the specified zone. # The cache is created in the specified bucket. begin - result = storage_control_client.create_anywhere_cache request - puts "AnywhereCache created - #{result.name}" + operation = storage_control_client.create_anywhere_cache request + puts "*******************************AnywhereCache creating - #{operation.name}" + operation.refresh! + + while !operation.done? + sleep 3600 + operation.refresh! + end + + puts "*******************************AnywhereCache created" + rescue StandardError => e puts "Error creating AnywhereCache: #{e.message}" end From f880819feb81fc1c8c2d5d9716f245130a1faf5f Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Tue, 2 Sep 2025 12:48:55 +0000 Subject: [PATCH 457/457] try --- .../samples/acceptance/storage_control_anywhere_cache_test.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb index e000cc2438ae..f43d98e94cc8 100644 --- a/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb +++ b/google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb @@ -21,8 +21,6 @@ require_relative "../storage_control_resume_anywhere_cache" require_relative "../storage_control_disable_anywhere_cache" -require 'pry' - describe "Storage Control Anywhere Cache" do let(:bucket_name) { random_bucket_name } let(:storage_client) { Google::Cloud::Storage.new }